@stargazers-stella/cosmic-ui 0.1.4

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,2864 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/index.ts
31
+ var index_exports = {};
32
+ __export(index_exports, {
33
+ Alert: () => Alert,
34
+ AlertDescription: () => AlertDescription,
35
+ AlertTitle: () => AlertTitle,
36
+ Badge: () => Badge,
37
+ Button: () => Button,
38
+ Card: () => Card,
39
+ CardContent: () => CardContent,
40
+ CardDescription: () => CardDescription,
41
+ CardFooter: () => CardFooter,
42
+ CardHeader: () => CardHeader,
43
+ CardTitle: () => CardTitle,
44
+ Command: () => Command,
45
+ CommandDialog: () => CommandDialog,
46
+ CommandEmpty: () => CommandEmpty,
47
+ CommandGroup: () => CommandGroup,
48
+ CommandInput: () => CommandInput,
49
+ CommandItem: () => CommandItem,
50
+ CommandList: () => CommandList,
51
+ CommandSeparator: () => CommandSeparator,
52
+ CommandShortcut: () => CommandShortcut,
53
+ Dialog: () => Dialog2,
54
+ DialogContent: () => DialogContent2,
55
+ DialogDescription: () => DialogDescription2,
56
+ DialogHeader: () => DialogHeader,
57
+ DialogTitle: () => DialogTitle2,
58
+ DialogTrigger: () => DialogTrigger2,
59
+ DropdownMenu: () => DropdownMenu,
60
+ DropdownMenuCheckboxItem: () => DropdownMenuCheckboxItem,
61
+ DropdownMenuContent: () => DropdownMenuContent,
62
+ DropdownMenuGroup: () => DropdownMenuGroup,
63
+ DropdownMenuItem: () => DropdownMenuItem,
64
+ DropdownMenuLabel: () => DropdownMenuLabel,
65
+ DropdownMenuPortal: () => DropdownMenuPortal,
66
+ DropdownMenuRadioGroup: () => DropdownMenuRadioGroup,
67
+ DropdownMenuRadioItem: () => DropdownMenuRadioItem,
68
+ DropdownMenuSeparator: () => DropdownMenuSeparator,
69
+ DropdownMenuShortcut: () => DropdownMenuShortcut,
70
+ DropdownMenuSub: () => DropdownMenuSub,
71
+ DropdownMenuSubContent: () => DropdownMenuSubContent,
72
+ DropdownMenuSubTrigger: () => DropdownMenuSubTrigger,
73
+ DropdownMenuTrigger: () => DropdownMenuTrigger,
74
+ Input: () => Input,
75
+ Select: () => Select,
76
+ SelectContent: () => SelectContent,
77
+ SelectGroup: () => SelectGroup,
78
+ SelectItem: () => SelectItem,
79
+ SelectTrigger: () => SelectTrigger,
80
+ SelectValue: () => SelectValue,
81
+ Table: () => Table,
82
+ TableBody: () => TableBody,
83
+ TableCell: () => TableCell,
84
+ TableHead: () => TableHead,
85
+ TableHeader: () => TableHeader,
86
+ TableRow: () => TableRow,
87
+ Textarea: () => Textarea,
88
+ Toaster: () => Toaster,
89
+ buttonVariants: () => buttonVariants,
90
+ cn: () => cn
91
+ });
92
+ module.exports = __toCommonJS(index_exports);
93
+
94
+ // src/utils.ts
95
+ var import_clsx = require("clsx");
96
+ var import_tailwind_merge = require("tailwind-merge");
97
+ function cn(...inputs) {
98
+ return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
99
+ }
100
+
101
+ // src/components/ui/alert.tsx
102
+ var React = __toESM(require("react"), 1);
103
+ var import_jsx_runtime = require("react/jsx-runtime");
104
+ var variantClasses = {
105
+ default: "border-border/70 bg-secondary/50 text-foreground",
106
+ destructive: "border-red-600/60 bg-red-950/40 text-red-50",
107
+ info: "border-blue-500/50 bg-blue-900/30 text-blue-50"
108
+ };
109
+ var Alert = React.forwardRef(
110
+ ({ className, variant = "default", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
111
+ "div",
112
+ {
113
+ ref,
114
+ role: "alert",
115
+ className: cn(
116
+ "w-full rounded-xl border p-4 text-sm shadow-sm backdrop-blur",
117
+ variantClasses[variant],
118
+ className
119
+ ),
120
+ ...props
121
+ }
122
+ )
123
+ );
124
+ Alert.displayName = "Alert";
125
+ var AlertTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
126
+ "h5",
127
+ {
128
+ ref,
129
+ className: cn("mb-1 font-semibold leading-none tracking-tight", className),
130
+ ...props
131
+ }
132
+ ));
133
+ AlertTitle.displayName = "AlertTitle";
134
+ var AlertDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
135
+ "div",
136
+ {
137
+ ref,
138
+ className: cn("text-sm leading-relaxed opacity-90", className),
139
+ ...props
140
+ }
141
+ ));
142
+ AlertDescription.displayName = "AlertDescription";
143
+
144
+ // src/components/ui/badge.tsx
145
+ var import_jsx_runtime2 = require("react/jsx-runtime");
146
+ function Badge({ className, variant = "default", ...props }) {
147
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
148
+ "div",
149
+ {
150
+ className: cn(
151
+ "inline-flex items-center rounded-full px-3 py-1 text-xs font-semibold transition-shadow",
152
+ variant === "default" && "bg-primary/80 text-primary-foreground shadow-glow",
153
+ variant === "outline" && "border border-border/70 text-muted-foreground hover:text-foreground",
154
+ variant === "glow" && "bg-gradient-to-r from-indigo-500/70 to-purple-600/70 text-white shadow-glow",
155
+ className
156
+ ),
157
+ ...props
158
+ }
159
+ );
160
+ }
161
+
162
+ // src/components/ui/button.tsx
163
+ var React2 = __toESM(require("react"), 1);
164
+ var import_class_variance_authority = require("class-variance-authority");
165
+ var import_jsx_runtime3 = require("react/jsx-runtime");
166
+ var buttonVariants = (0, import_class_variance_authority.cva)(
167
+ "inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 ring-offset-background",
168
+ {
169
+ variants: {
170
+ variant: {
171
+ default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
172
+ destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
173
+ outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
174
+ secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
175
+ ghost: "hover:bg-accent hover:text-accent-foreground",
176
+ link: "text-primary underline-offset-4 hover:underline"
177
+ },
178
+ size: {
179
+ default: "h-10 px-4 py-2",
180
+ sm: "h-9 rounded-md px-3",
181
+ lg: "h-11 rounded-md px-8",
182
+ icon: "h-10 w-10"
183
+ }
184
+ },
185
+ defaultVariants: {
186
+ variant: "default",
187
+ size: "default"
188
+ }
189
+ }
190
+ );
191
+ var Button = React2.forwardRef(
192
+ ({ className, variant, size, ...props }, ref) => {
193
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
194
+ "button",
195
+ {
196
+ className: cn(buttonVariants({ variant, size, className })),
197
+ ref,
198
+ ...props
199
+ }
200
+ );
201
+ }
202
+ );
203
+ Button.displayName = "Button";
204
+
205
+ // src/components/ui/card.tsx
206
+ var React3 = __toESM(require("react"), 1);
207
+ var import_jsx_runtime4 = require("react/jsx-runtime");
208
+ var Card = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
209
+ "div",
210
+ {
211
+ ref,
212
+ className: cn(
213
+ "rounded-2xl border border-border/70 bg-card/80 text-card-foreground shadow-card backdrop-blur-xl",
214
+ className
215
+ ),
216
+ ...props
217
+ }
218
+ ));
219
+ Card.displayName = "Card";
220
+ var CardHeader = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { ref, className: cn("space-y-1.5 p-6", className), ...props }));
221
+ CardHeader.displayName = "CardHeader";
222
+ var CardTitle = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("h3", { ref, className: cn("text-xl font-semibold", className), ...props }));
223
+ CardTitle.displayName = "CardTitle";
224
+ var CardDescription = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
225
+ "p",
226
+ {
227
+ ref,
228
+ className: cn("text-sm text-muted-foreground", className),
229
+ ...props
230
+ }
231
+ ));
232
+ CardDescription.displayName = "CardDescription";
233
+ var CardContent = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { ref, className: cn("p-6 pt-0", className), ...props }));
234
+ CardContent.displayName = "CardContent";
235
+ var CardFooter = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
236
+ "div",
237
+ {
238
+ ref,
239
+ className: cn("flex items-center p-6 pt-0", className),
240
+ ...props
241
+ }
242
+ ));
243
+ CardFooter.displayName = "CardFooter";
244
+
245
+ // src/components/ui/command.tsx
246
+ var React29 = __toESM(require("react"), 1);
247
+ var import_cmdk = require("cmdk");
248
+ var import_lucide_react2 = require("lucide-react");
249
+
250
+ // src/components/ui/dialog.tsx
251
+ var React28 = __toESM(require("react"), 1);
252
+
253
+ // node_modules/@radix-ui/react-dialog/dist/index.mjs
254
+ var React27 = __toESM(require("react"), 1);
255
+
256
+ // node_modules/@radix-ui/primitive/dist/index.mjs
257
+ var canUseDOM = !!(typeof window !== "undefined" && window.document && window.document.createElement);
258
+ function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
259
+ return function handleEvent(event) {
260
+ originalEventHandler?.(event);
261
+ if (checkForDefaultPrevented === false || !event.defaultPrevented) {
262
+ return ourEventHandler?.(event);
263
+ }
264
+ };
265
+ }
266
+
267
+ // node_modules/@radix-ui/react-compose-refs/dist/index.mjs
268
+ var React4 = __toESM(require("react"), 1);
269
+ function setRef(ref, value) {
270
+ if (typeof ref === "function") {
271
+ return ref(value);
272
+ } else if (ref !== null && ref !== void 0) {
273
+ ref.current = value;
274
+ }
275
+ }
276
+ function composeRefs(...refs) {
277
+ return (node) => {
278
+ let hasCleanup = false;
279
+ const cleanups = refs.map((ref) => {
280
+ const cleanup = setRef(ref, node);
281
+ if (!hasCleanup && typeof cleanup == "function") {
282
+ hasCleanup = true;
283
+ }
284
+ return cleanup;
285
+ });
286
+ if (hasCleanup) {
287
+ return () => {
288
+ for (let i = 0; i < cleanups.length; i++) {
289
+ const cleanup = cleanups[i];
290
+ if (typeof cleanup == "function") {
291
+ cleanup();
292
+ } else {
293
+ setRef(refs[i], null);
294
+ }
295
+ }
296
+ };
297
+ }
298
+ };
299
+ }
300
+ function useComposedRefs(...refs) {
301
+ return React4.useCallback(composeRefs(...refs), refs);
302
+ }
303
+
304
+ // node_modules/@radix-ui/react-context/dist/index.mjs
305
+ var React5 = __toESM(require("react"), 1);
306
+ var import_jsx_runtime5 = require("react/jsx-runtime");
307
+ function createContext2(rootComponentName, defaultContext) {
308
+ const Context = React5.createContext(defaultContext);
309
+ const Provider = (props) => {
310
+ const { children, ...context } = props;
311
+ const value = React5.useMemo(() => context, Object.values(context));
312
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Context.Provider, { value, children });
313
+ };
314
+ Provider.displayName = rootComponentName + "Provider";
315
+ function useContext22(consumerName) {
316
+ const context = React5.useContext(Context);
317
+ if (context) return context;
318
+ if (defaultContext !== void 0) return defaultContext;
319
+ throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
320
+ }
321
+ return [Provider, useContext22];
322
+ }
323
+ function createContextScope(scopeName, createContextScopeDeps = []) {
324
+ let defaultContexts = [];
325
+ function createContext32(rootComponentName, defaultContext) {
326
+ const BaseContext = React5.createContext(defaultContext);
327
+ const index = defaultContexts.length;
328
+ defaultContexts = [...defaultContexts, defaultContext];
329
+ const Provider = (props) => {
330
+ const { scope, children, ...context } = props;
331
+ const Context = scope?.[scopeName]?.[index] || BaseContext;
332
+ const value = React5.useMemo(() => context, Object.values(context));
333
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Context.Provider, { value, children });
334
+ };
335
+ Provider.displayName = rootComponentName + "Provider";
336
+ function useContext22(consumerName, scope) {
337
+ const Context = scope?.[scopeName]?.[index] || BaseContext;
338
+ const context = React5.useContext(Context);
339
+ if (context) return context;
340
+ if (defaultContext !== void 0) return defaultContext;
341
+ throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
342
+ }
343
+ return [Provider, useContext22];
344
+ }
345
+ const createScope = () => {
346
+ const scopeContexts = defaultContexts.map((defaultContext) => {
347
+ return React5.createContext(defaultContext);
348
+ });
349
+ return function useScope(scope) {
350
+ const contexts = scope?.[scopeName] || scopeContexts;
351
+ return React5.useMemo(
352
+ () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
353
+ [scope, contexts]
354
+ );
355
+ };
356
+ };
357
+ createScope.scopeName = scopeName;
358
+ return [createContext32, composeContextScopes(createScope, ...createContextScopeDeps)];
359
+ }
360
+ function composeContextScopes(...scopes) {
361
+ const baseScope = scopes[0];
362
+ if (scopes.length === 1) return baseScope;
363
+ const createScope = () => {
364
+ const scopeHooks = scopes.map((createScope2) => ({
365
+ useScope: createScope2(),
366
+ scopeName: createScope2.scopeName
367
+ }));
368
+ return function useComposedScopes(overrideScopes) {
369
+ const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
370
+ const scopeProps = useScope(overrideScopes);
371
+ const currentScope = scopeProps[`__scope${scopeName}`];
372
+ return { ...nextScopes2, ...currentScope };
373
+ }, {});
374
+ return React5.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
375
+ };
376
+ };
377
+ createScope.scopeName = baseScope.scopeName;
378
+ return createScope;
379
+ }
380
+
381
+ // node_modules/@radix-ui/react-id/dist/index.mjs
382
+ var React7 = __toESM(require("react"), 1);
383
+
384
+ // node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
385
+ var React6 = __toESM(require("react"), 1);
386
+ var useLayoutEffect2 = globalThis?.document ? React6.useLayoutEffect : () => {
387
+ };
388
+
389
+ // node_modules/@radix-ui/react-id/dist/index.mjs
390
+ var useReactId = React7[" useId ".trim().toString()] || (() => void 0);
391
+ var count = 0;
392
+ function useId(deterministicId) {
393
+ const [id, setId] = React7.useState(useReactId());
394
+ useLayoutEffect2(() => {
395
+ if (!deterministicId) setId((reactId) => reactId ?? String(count++));
396
+ }, [deterministicId]);
397
+ return deterministicId || (id ? `radix-${id}` : "");
398
+ }
399
+
400
+ // node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
401
+ var React8 = __toESM(require("react"), 1);
402
+ var React22 = __toESM(require("react"), 1);
403
+ var useInsertionEffect = React8[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
404
+ function useControllableState({
405
+ prop,
406
+ defaultProp,
407
+ onChange = () => {
408
+ },
409
+ caller
410
+ }) {
411
+ const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({
412
+ defaultProp,
413
+ onChange
414
+ });
415
+ const isControlled = prop !== void 0;
416
+ const value = isControlled ? prop : uncontrolledProp;
417
+ if (true) {
418
+ const isControlledRef = React8.useRef(prop !== void 0);
419
+ React8.useEffect(() => {
420
+ const wasControlled = isControlledRef.current;
421
+ if (wasControlled !== isControlled) {
422
+ const from = wasControlled ? "controlled" : "uncontrolled";
423
+ const to = isControlled ? "controlled" : "uncontrolled";
424
+ console.warn(
425
+ `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
426
+ );
427
+ }
428
+ isControlledRef.current = isControlled;
429
+ }, [isControlled, caller]);
430
+ }
431
+ const setValue = React8.useCallback(
432
+ (nextValue) => {
433
+ if (isControlled) {
434
+ const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;
435
+ if (value2 !== prop) {
436
+ onChangeRef.current?.(value2);
437
+ }
438
+ } else {
439
+ setUncontrolledProp(nextValue);
440
+ }
441
+ },
442
+ [isControlled, prop, setUncontrolledProp, onChangeRef]
443
+ );
444
+ return [value, setValue];
445
+ }
446
+ function useUncontrolledState({
447
+ defaultProp,
448
+ onChange
449
+ }) {
450
+ const [value, setValue] = React8.useState(defaultProp);
451
+ const prevValueRef = React8.useRef(value);
452
+ const onChangeRef = React8.useRef(onChange);
453
+ useInsertionEffect(() => {
454
+ onChangeRef.current = onChange;
455
+ }, [onChange]);
456
+ React8.useEffect(() => {
457
+ if (prevValueRef.current !== value) {
458
+ onChangeRef.current?.(value);
459
+ prevValueRef.current = value;
460
+ }
461
+ }, [value, prevValueRef]);
462
+ return [value, setValue, onChangeRef];
463
+ }
464
+ function isFunction(value) {
465
+ return typeof value === "function";
466
+ }
467
+ var SYNC_STATE = Symbol("RADIX:SYNC_STATE");
468
+
469
+ // node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
470
+ var React13 = __toESM(require("react"), 1);
471
+
472
+ // node_modules/@radix-ui/react-primitive/dist/index.mjs
473
+ var React10 = __toESM(require("react"), 1);
474
+ var ReactDOM = __toESM(require("react-dom"), 1);
475
+
476
+ // node_modules/@radix-ui/react-slot/dist/index.mjs
477
+ var React9 = __toESM(require("react"), 1);
478
+ var import_jsx_runtime6 = require("react/jsx-runtime");
479
+ // @__NO_SIDE_EFFECTS__
480
+ function createSlot(ownerName) {
481
+ const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
482
+ const Slot2 = React9.forwardRef((props, forwardedRef) => {
483
+ const { children, ...slotProps } = props;
484
+ const childrenArray = React9.Children.toArray(children);
485
+ const slottable = childrenArray.find(isSlottable);
486
+ if (slottable) {
487
+ const newElement = slottable.props.children;
488
+ const newChildren = childrenArray.map((child) => {
489
+ if (child === slottable) {
490
+ if (React9.Children.count(newElement) > 1) return React9.Children.only(null);
491
+ return React9.isValidElement(newElement) ? newElement.props.children : null;
492
+ } else {
493
+ return child;
494
+ }
495
+ });
496
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React9.isValidElement(newElement) ? React9.cloneElement(newElement, void 0, newChildren) : null });
497
+ }
498
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
499
+ });
500
+ Slot2.displayName = `${ownerName}.Slot`;
501
+ return Slot2;
502
+ }
503
+ // @__NO_SIDE_EFFECTS__
504
+ function createSlotClone(ownerName) {
505
+ const SlotClone = React9.forwardRef((props, forwardedRef) => {
506
+ const { children, ...slotProps } = props;
507
+ if (React9.isValidElement(children)) {
508
+ const childrenRef = getElementRef(children);
509
+ const props2 = mergeProps(slotProps, children.props);
510
+ if (children.type !== React9.Fragment) {
511
+ props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
512
+ }
513
+ return React9.cloneElement(children, props2);
514
+ }
515
+ return React9.Children.count(children) > 1 ? React9.Children.only(null) : null;
516
+ });
517
+ SlotClone.displayName = `${ownerName}.SlotClone`;
518
+ return SlotClone;
519
+ }
520
+ var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
521
+ function isSlottable(child) {
522
+ return React9.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
523
+ }
524
+ function mergeProps(slotProps, childProps) {
525
+ const overrideProps = { ...childProps };
526
+ for (const propName in childProps) {
527
+ const slotPropValue = slotProps[propName];
528
+ const childPropValue = childProps[propName];
529
+ const isHandler = /^on[A-Z]/.test(propName);
530
+ if (isHandler) {
531
+ if (slotPropValue && childPropValue) {
532
+ overrideProps[propName] = (...args) => {
533
+ const result = childPropValue(...args);
534
+ slotPropValue(...args);
535
+ return result;
536
+ };
537
+ } else if (slotPropValue) {
538
+ overrideProps[propName] = slotPropValue;
539
+ }
540
+ } else if (propName === "style") {
541
+ overrideProps[propName] = { ...slotPropValue, ...childPropValue };
542
+ } else if (propName === "className") {
543
+ overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
544
+ }
545
+ }
546
+ return { ...slotProps, ...overrideProps };
547
+ }
548
+ function getElementRef(element) {
549
+ let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
550
+ let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
551
+ if (mayWarn) {
552
+ return element.ref;
553
+ }
554
+ getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
555
+ mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
556
+ if (mayWarn) {
557
+ return element.props.ref;
558
+ }
559
+ return element.props.ref || element.ref;
560
+ }
561
+
562
+ // node_modules/@radix-ui/react-primitive/dist/index.mjs
563
+ var import_jsx_runtime7 = require("react/jsx-runtime");
564
+ var NODES = [
565
+ "a",
566
+ "button",
567
+ "div",
568
+ "form",
569
+ "h2",
570
+ "h3",
571
+ "img",
572
+ "input",
573
+ "label",
574
+ "li",
575
+ "nav",
576
+ "ol",
577
+ "p",
578
+ "select",
579
+ "span",
580
+ "svg",
581
+ "ul"
582
+ ];
583
+ var Primitive = NODES.reduce((primitive, node) => {
584
+ const Slot2 = createSlot(`Primitive.${node}`);
585
+ const Node2 = React10.forwardRef((props, forwardedRef) => {
586
+ const { asChild, ...primitiveProps } = props;
587
+ const Comp = asChild ? Slot2 : node;
588
+ if (typeof window !== "undefined") {
589
+ window[Symbol.for("radix-ui")] = true;
590
+ }
591
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });
592
+ });
593
+ Node2.displayName = `Primitive.${node}`;
594
+ return { ...primitive, [node]: Node2 };
595
+ }, {});
596
+ function dispatchDiscreteCustomEvent(target, event) {
597
+ if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));
598
+ }
599
+
600
+ // node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
601
+ var React11 = __toESM(require("react"), 1);
602
+ function useCallbackRef(callback) {
603
+ const callbackRef = React11.useRef(callback);
604
+ React11.useEffect(() => {
605
+ callbackRef.current = callback;
606
+ });
607
+ return React11.useMemo(() => (...args) => callbackRef.current?.(...args), []);
608
+ }
609
+
610
+ // node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs
611
+ var React12 = __toESM(require("react"), 1);
612
+ function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
613
+ const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
614
+ React12.useEffect(() => {
615
+ const handleKeyDown = (event) => {
616
+ if (event.key === "Escape") {
617
+ onEscapeKeyDown(event);
618
+ }
619
+ };
620
+ ownerDocument.addEventListener("keydown", handleKeyDown, { capture: true });
621
+ return () => ownerDocument.removeEventListener("keydown", handleKeyDown, { capture: true });
622
+ }, [onEscapeKeyDown, ownerDocument]);
623
+ }
624
+
625
+ // node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
626
+ var import_jsx_runtime8 = require("react/jsx-runtime");
627
+ var DISMISSABLE_LAYER_NAME = "DismissableLayer";
628
+ var CONTEXT_UPDATE = "dismissableLayer.update";
629
+ var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
630
+ var FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
631
+ var originalBodyPointerEvents;
632
+ var DismissableLayerContext = React13.createContext({
633
+ layers: /* @__PURE__ */ new Set(),
634
+ layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
635
+ branches: /* @__PURE__ */ new Set()
636
+ });
637
+ var DismissableLayer = React13.forwardRef(
638
+ (props, forwardedRef) => {
639
+ const {
640
+ disableOutsidePointerEvents = false,
641
+ onEscapeKeyDown,
642
+ onPointerDownOutside,
643
+ onFocusOutside,
644
+ onInteractOutside,
645
+ onDismiss,
646
+ ...layerProps
647
+ } = props;
648
+ const context = React13.useContext(DismissableLayerContext);
649
+ const [node, setNode] = React13.useState(null);
650
+ const ownerDocument = node?.ownerDocument ?? globalThis?.document;
651
+ const [, force] = React13.useState({});
652
+ const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));
653
+ const layers = Array.from(context.layers);
654
+ const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);
655
+ const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);
656
+ const index = node ? layers.indexOf(node) : -1;
657
+ const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
658
+ const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;
659
+ const pointerDownOutside = usePointerDownOutside((event) => {
660
+ const target = event.target;
661
+ const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));
662
+ if (!isPointerEventsEnabled || isPointerDownOnBranch) return;
663
+ onPointerDownOutside?.(event);
664
+ onInteractOutside?.(event);
665
+ if (!event.defaultPrevented) onDismiss?.();
666
+ }, ownerDocument);
667
+ const focusOutside = useFocusOutside((event) => {
668
+ const target = event.target;
669
+ const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));
670
+ if (isFocusInBranch) return;
671
+ onFocusOutside?.(event);
672
+ onInteractOutside?.(event);
673
+ if (!event.defaultPrevented) onDismiss?.();
674
+ }, ownerDocument);
675
+ useEscapeKeydown((event) => {
676
+ const isHighestLayer = index === context.layers.size - 1;
677
+ if (!isHighestLayer) return;
678
+ onEscapeKeyDown?.(event);
679
+ if (!event.defaultPrevented && onDismiss) {
680
+ event.preventDefault();
681
+ onDismiss();
682
+ }
683
+ }, ownerDocument);
684
+ React13.useEffect(() => {
685
+ if (!node) return;
686
+ if (disableOutsidePointerEvents) {
687
+ if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
688
+ originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;
689
+ ownerDocument.body.style.pointerEvents = "none";
690
+ }
691
+ context.layersWithOutsidePointerEventsDisabled.add(node);
692
+ }
693
+ context.layers.add(node);
694
+ dispatchUpdate();
695
+ return () => {
696
+ if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) {
697
+ ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;
698
+ }
699
+ };
700
+ }, [node, ownerDocument, disableOutsidePointerEvents, context]);
701
+ React13.useEffect(() => {
702
+ return () => {
703
+ if (!node) return;
704
+ context.layers.delete(node);
705
+ context.layersWithOutsidePointerEventsDisabled.delete(node);
706
+ dispatchUpdate();
707
+ };
708
+ }, [node, context]);
709
+ React13.useEffect(() => {
710
+ const handleUpdate = () => force({});
711
+ document.addEventListener(CONTEXT_UPDATE, handleUpdate);
712
+ return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
713
+ }, []);
714
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
715
+ Primitive.div,
716
+ {
717
+ ...layerProps,
718
+ ref: composedRefs,
719
+ style: {
720
+ pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0,
721
+ ...props.style
722
+ },
723
+ onFocusCapture: composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),
724
+ onBlurCapture: composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),
725
+ onPointerDownCapture: composeEventHandlers(
726
+ props.onPointerDownCapture,
727
+ pointerDownOutside.onPointerDownCapture
728
+ )
729
+ }
730
+ );
731
+ }
732
+ );
733
+ DismissableLayer.displayName = DISMISSABLE_LAYER_NAME;
734
+ var BRANCH_NAME = "DismissableLayerBranch";
735
+ var DismissableLayerBranch = React13.forwardRef((props, forwardedRef) => {
736
+ const context = React13.useContext(DismissableLayerContext);
737
+ const ref = React13.useRef(null);
738
+ const composedRefs = useComposedRefs(forwardedRef, ref);
739
+ React13.useEffect(() => {
740
+ const node = ref.current;
741
+ if (node) {
742
+ context.branches.add(node);
743
+ return () => {
744
+ context.branches.delete(node);
745
+ };
746
+ }
747
+ }, [context.branches]);
748
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Primitive.div, { ...props, ref: composedRefs });
749
+ });
750
+ DismissableLayerBranch.displayName = BRANCH_NAME;
751
+ function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
752
+ const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);
753
+ const isPointerInsideReactTreeRef = React13.useRef(false);
754
+ const handleClickRef = React13.useRef(() => {
755
+ });
756
+ React13.useEffect(() => {
757
+ const handlePointerDown = (event) => {
758
+ if (event.target && !isPointerInsideReactTreeRef.current) {
759
+ let handleAndDispatchPointerDownOutsideEvent2 = function() {
760
+ handleAndDispatchCustomEvent(
761
+ POINTER_DOWN_OUTSIDE,
762
+ handlePointerDownOutside,
763
+ eventDetail,
764
+ { discrete: true }
765
+ );
766
+ };
767
+ var handleAndDispatchPointerDownOutsideEvent = handleAndDispatchPointerDownOutsideEvent2;
768
+ const eventDetail = { originalEvent: event };
769
+ if (event.pointerType === "touch") {
770
+ ownerDocument.removeEventListener("click", handleClickRef.current);
771
+ handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;
772
+ ownerDocument.addEventListener("click", handleClickRef.current, { once: true });
773
+ } else {
774
+ handleAndDispatchPointerDownOutsideEvent2();
775
+ }
776
+ } else {
777
+ ownerDocument.removeEventListener("click", handleClickRef.current);
778
+ }
779
+ isPointerInsideReactTreeRef.current = false;
780
+ };
781
+ const timerId = window.setTimeout(() => {
782
+ ownerDocument.addEventListener("pointerdown", handlePointerDown);
783
+ }, 0);
784
+ return () => {
785
+ window.clearTimeout(timerId);
786
+ ownerDocument.removeEventListener("pointerdown", handlePointerDown);
787
+ ownerDocument.removeEventListener("click", handleClickRef.current);
788
+ };
789
+ }, [ownerDocument, handlePointerDownOutside]);
790
+ return {
791
+ // ensures we check React component tree (not just DOM tree)
792
+ onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true
793
+ };
794
+ }
795
+ function useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {
796
+ const handleFocusOutside = useCallbackRef(onFocusOutside);
797
+ const isFocusInsideReactTreeRef = React13.useRef(false);
798
+ React13.useEffect(() => {
799
+ const handleFocus = (event) => {
800
+ if (event.target && !isFocusInsideReactTreeRef.current) {
801
+ const eventDetail = { originalEvent: event };
802
+ handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {
803
+ discrete: false
804
+ });
805
+ }
806
+ };
807
+ ownerDocument.addEventListener("focusin", handleFocus);
808
+ return () => ownerDocument.removeEventListener("focusin", handleFocus);
809
+ }, [ownerDocument, handleFocusOutside]);
810
+ return {
811
+ onFocusCapture: () => isFocusInsideReactTreeRef.current = true,
812
+ onBlurCapture: () => isFocusInsideReactTreeRef.current = false
813
+ };
814
+ }
815
+ function dispatchUpdate() {
816
+ const event = new CustomEvent(CONTEXT_UPDATE);
817
+ document.dispatchEvent(event);
818
+ }
819
+ function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
820
+ const target = detail.originalEvent.target;
821
+ const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });
822
+ if (handler) target.addEventListener(name, handler, { once: true });
823
+ if (discrete) {
824
+ dispatchDiscreteCustomEvent(target, event);
825
+ } else {
826
+ target.dispatchEvent(event);
827
+ }
828
+ }
829
+
830
+ // node_modules/@radix-ui/react-focus-scope/dist/index.mjs
831
+ var React14 = __toESM(require("react"), 1);
832
+ var import_jsx_runtime9 = require("react/jsx-runtime");
833
+ var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
834
+ var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
835
+ var EVENT_OPTIONS = { bubbles: false, cancelable: true };
836
+ var FOCUS_SCOPE_NAME = "FocusScope";
837
+ var FocusScope = React14.forwardRef((props, forwardedRef) => {
838
+ const {
839
+ loop = false,
840
+ trapped = false,
841
+ onMountAutoFocus: onMountAutoFocusProp,
842
+ onUnmountAutoFocus: onUnmountAutoFocusProp,
843
+ ...scopeProps
844
+ } = props;
845
+ const [container, setContainer] = React14.useState(null);
846
+ const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp);
847
+ const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);
848
+ const lastFocusedElementRef = React14.useRef(null);
849
+ const composedRefs = useComposedRefs(forwardedRef, (node) => setContainer(node));
850
+ const focusScope = React14.useRef({
851
+ paused: false,
852
+ pause() {
853
+ this.paused = true;
854
+ },
855
+ resume() {
856
+ this.paused = false;
857
+ }
858
+ }).current;
859
+ React14.useEffect(() => {
860
+ if (trapped) {
861
+ let handleFocusIn2 = function(event) {
862
+ if (focusScope.paused || !container) return;
863
+ const target = event.target;
864
+ if (container.contains(target)) {
865
+ lastFocusedElementRef.current = target;
866
+ } else {
867
+ focus(lastFocusedElementRef.current, { select: true });
868
+ }
869
+ }, handleFocusOut2 = function(event) {
870
+ if (focusScope.paused || !container) return;
871
+ const relatedTarget = event.relatedTarget;
872
+ if (relatedTarget === null) return;
873
+ if (!container.contains(relatedTarget)) {
874
+ focus(lastFocusedElementRef.current, { select: true });
875
+ }
876
+ }, handleMutations2 = function(mutations) {
877
+ const focusedElement = document.activeElement;
878
+ if (focusedElement !== document.body) return;
879
+ for (const mutation of mutations) {
880
+ if (mutation.removedNodes.length > 0) focus(container);
881
+ }
882
+ };
883
+ var handleFocusIn = handleFocusIn2, handleFocusOut = handleFocusOut2, handleMutations = handleMutations2;
884
+ document.addEventListener("focusin", handleFocusIn2);
885
+ document.addEventListener("focusout", handleFocusOut2);
886
+ const mutationObserver = new MutationObserver(handleMutations2);
887
+ if (container) mutationObserver.observe(container, { childList: true, subtree: true });
888
+ return () => {
889
+ document.removeEventListener("focusin", handleFocusIn2);
890
+ document.removeEventListener("focusout", handleFocusOut2);
891
+ mutationObserver.disconnect();
892
+ };
893
+ }
894
+ }, [trapped, container, focusScope.paused]);
895
+ React14.useEffect(() => {
896
+ if (container) {
897
+ focusScopesStack.add(focusScope);
898
+ const previouslyFocusedElement = document.activeElement;
899
+ const hasFocusedCandidate = container.contains(previouslyFocusedElement);
900
+ if (!hasFocusedCandidate) {
901
+ const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);
902
+ container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
903
+ container.dispatchEvent(mountEvent);
904
+ if (!mountEvent.defaultPrevented) {
905
+ focusFirst(removeLinks(getTabbableCandidates(container)), { select: true });
906
+ if (document.activeElement === previouslyFocusedElement) {
907
+ focus(container);
908
+ }
909
+ }
910
+ }
911
+ return () => {
912
+ container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
913
+ setTimeout(() => {
914
+ const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);
915
+ container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
916
+ container.dispatchEvent(unmountEvent);
917
+ if (!unmountEvent.defaultPrevented) {
918
+ focus(previouslyFocusedElement ?? document.body, { select: true });
919
+ }
920
+ container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
921
+ focusScopesStack.remove(focusScope);
922
+ }, 0);
923
+ };
924
+ }
925
+ }, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);
926
+ const handleKeyDown = React14.useCallback(
927
+ (event) => {
928
+ if (!loop && !trapped) return;
929
+ if (focusScope.paused) return;
930
+ const isTabKey = event.key === "Tab" && !event.altKey && !event.ctrlKey && !event.metaKey;
931
+ const focusedElement = document.activeElement;
932
+ if (isTabKey && focusedElement) {
933
+ const container2 = event.currentTarget;
934
+ const [first, last] = getTabbableEdges(container2);
935
+ const hasTabbableElementsInside = first && last;
936
+ if (!hasTabbableElementsInside) {
937
+ if (focusedElement === container2) event.preventDefault();
938
+ } else {
939
+ if (!event.shiftKey && focusedElement === last) {
940
+ event.preventDefault();
941
+ if (loop) focus(first, { select: true });
942
+ } else if (event.shiftKey && focusedElement === first) {
943
+ event.preventDefault();
944
+ if (loop) focus(last, { select: true });
945
+ }
946
+ }
947
+ }
948
+ },
949
+ [loop, trapped, focusScope.paused]
950
+ );
951
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
952
+ });
953
+ FocusScope.displayName = FOCUS_SCOPE_NAME;
954
+ function focusFirst(candidates, { select = false } = {}) {
955
+ const previouslyFocusedElement = document.activeElement;
956
+ for (const candidate of candidates) {
957
+ focus(candidate, { select });
958
+ if (document.activeElement !== previouslyFocusedElement) return;
959
+ }
960
+ }
961
+ function getTabbableEdges(container) {
962
+ const candidates = getTabbableCandidates(container);
963
+ const first = findVisible(candidates, container);
964
+ const last = findVisible(candidates.reverse(), container);
965
+ return [first, last];
966
+ }
967
+ function getTabbableCandidates(container) {
968
+ const nodes = [];
969
+ const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
970
+ acceptNode: (node) => {
971
+ const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
972
+ if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
973
+ return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
974
+ }
975
+ });
976
+ while (walker.nextNode()) nodes.push(walker.currentNode);
977
+ return nodes;
978
+ }
979
+ function findVisible(elements, container) {
980
+ for (const element of elements) {
981
+ if (!isHidden(element, { upTo: container })) return element;
982
+ }
983
+ }
984
+ function isHidden(node, { upTo }) {
985
+ if (getComputedStyle(node).visibility === "hidden") return true;
986
+ while (node) {
987
+ if (upTo !== void 0 && node === upTo) return false;
988
+ if (getComputedStyle(node).display === "none") return true;
989
+ node = node.parentElement;
990
+ }
991
+ return false;
992
+ }
993
+ function isSelectableInput(element) {
994
+ return element instanceof HTMLInputElement && "select" in element;
995
+ }
996
+ function focus(element, { select = false } = {}) {
997
+ if (element && element.focus) {
998
+ const previouslyFocusedElement = document.activeElement;
999
+ element.focus({ preventScroll: true });
1000
+ if (element !== previouslyFocusedElement && isSelectableInput(element) && select)
1001
+ element.select();
1002
+ }
1003
+ }
1004
+ var focusScopesStack = createFocusScopesStack();
1005
+ function createFocusScopesStack() {
1006
+ let stack = [];
1007
+ return {
1008
+ add(focusScope) {
1009
+ const activeFocusScope = stack[0];
1010
+ if (focusScope !== activeFocusScope) {
1011
+ activeFocusScope?.pause();
1012
+ }
1013
+ stack = arrayRemove(stack, focusScope);
1014
+ stack.unshift(focusScope);
1015
+ },
1016
+ remove(focusScope) {
1017
+ stack = arrayRemove(stack, focusScope);
1018
+ stack[0]?.resume();
1019
+ }
1020
+ };
1021
+ }
1022
+ function arrayRemove(array, item) {
1023
+ const updatedArray = [...array];
1024
+ const index = updatedArray.indexOf(item);
1025
+ if (index !== -1) {
1026
+ updatedArray.splice(index, 1);
1027
+ }
1028
+ return updatedArray;
1029
+ }
1030
+ function removeLinks(items) {
1031
+ return items.filter((item) => item.tagName !== "A");
1032
+ }
1033
+
1034
+ // node_modules/@radix-ui/react-portal/dist/index.mjs
1035
+ var React15 = __toESM(require("react"), 1);
1036
+ var import_react_dom = __toESM(require("react-dom"), 1);
1037
+ var import_jsx_runtime10 = require("react/jsx-runtime");
1038
+ var PORTAL_NAME = "Portal";
1039
+ var Portal = React15.forwardRef((props, forwardedRef) => {
1040
+ const { container: containerProp, ...portalProps } = props;
1041
+ const [mounted, setMounted] = React15.useState(false);
1042
+ useLayoutEffect2(() => setMounted(true), []);
1043
+ const container = containerProp || mounted && globalThis?.document?.body;
1044
+ return container ? import_react_dom.default.createPortal(/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
1045
+ });
1046
+ Portal.displayName = PORTAL_NAME;
1047
+
1048
+ // node_modules/@radix-ui/react-presence/dist/index.mjs
1049
+ var React23 = __toESM(require("react"), 1);
1050
+ var React16 = __toESM(require("react"), 1);
1051
+ function useStateMachine(initialState, machine) {
1052
+ return React16.useReducer((state, event) => {
1053
+ const nextState = machine[state][event];
1054
+ return nextState ?? state;
1055
+ }, initialState);
1056
+ }
1057
+ var Presence = (props) => {
1058
+ const { present, children } = props;
1059
+ const presence = usePresence(present);
1060
+ const child = typeof children === "function" ? children({ present: presence.isPresent }) : React23.Children.only(children);
1061
+ const ref = useComposedRefs(presence.ref, getElementRef2(child));
1062
+ const forceMount = typeof children === "function";
1063
+ return forceMount || presence.isPresent ? React23.cloneElement(child, { ref }) : null;
1064
+ };
1065
+ Presence.displayName = "Presence";
1066
+ function usePresence(present) {
1067
+ const [node, setNode] = React23.useState();
1068
+ const stylesRef = React23.useRef(null);
1069
+ const prevPresentRef = React23.useRef(present);
1070
+ const prevAnimationNameRef = React23.useRef("none");
1071
+ const initialState = present ? "mounted" : "unmounted";
1072
+ const [state, send] = useStateMachine(initialState, {
1073
+ mounted: {
1074
+ UNMOUNT: "unmounted",
1075
+ ANIMATION_OUT: "unmountSuspended"
1076
+ },
1077
+ unmountSuspended: {
1078
+ MOUNT: "mounted",
1079
+ ANIMATION_END: "unmounted"
1080
+ },
1081
+ unmounted: {
1082
+ MOUNT: "mounted"
1083
+ }
1084
+ });
1085
+ React23.useEffect(() => {
1086
+ const currentAnimationName = getAnimationName(stylesRef.current);
1087
+ prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
1088
+ }, [state]);
1089
+ useLayoutEffect2(() => {
1090
+ const styles = stylesRef.current;
1091
+ const wasPresent = prevPresentRef.current;
1092
+ const hasPresentChanged = wasPresent !== present;
1093
+ if (hasPresentChanged) {
1094
+ const prevAnimationName = prevAnimationNameRef.current;
1095
+ const currentAnimationName = getAnimationName(styles);
1096
+ if (present) {
1097
+ send("MOUNT");
1098
+ } else if (currentAnimationName === "none" || styles?.display === "none") {
1099
+ send("UNMOUNT");
1100
+ } else {
1101
+ const isAnimating = prevAnimationName !== currentAnimationName;
1102
+ if (wasPresent && isAnimating) {
1103
+ send("ANIMATION_OUT");
1104
+ } else {
1105
+ send("UNMOUNT");
1106
+ }
1107
+ }
1108
+ prevPresentRef.current = present;
1109
+ }
1110
+ }, [present, send]);
1111
+ useLayoutEffect2(() => {
1112
+ if (node) {
1113
+ let timeoutId;
1114
+ const ownerWindow = node.ownerDocument.defaultView ?? window;
1115
+ const handleAnimationEnd = (event) => {
1116
+ const currentAnimationName = getAnimationName(stylesRef.current);
1117
+ const isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName));
1118
+ if (event.target === node && isCurrentAnimation) {
1119
+ send("ANIMATION_END");
1120
+ if (!prevPresentRef.current) {
1121
+ const currentFillMode = node.style.animationFillMode;
1122
+ node.style.animationFillMode = "forwards";
1123
+ timeoutId = ownerWindow.setTimeout(() => {
1124
+ if (node.style.animationFillMode === "forwards") {
1125
+ node.style.animationFillMode = currentFillMode;
1126
+ }
1127
+ });
1128
+ }
1129
+ }
1130
+ };
1131
+ const handleAnimationStart = (event) => {
1132
+ if (event.target === node) {
1133
+ prevAnimationNameRef.current = getAnimationName(stylesRef.current);
1134
+ }
1135
+ };
1136
+ node.addEventListener("animationstart", handleAnimationStart);
1137
+ node.addEventListener("animationcancel", handleAnimationEnd);
1138
+ node.addEventListener("animationend", handleAnimationEnd);
1139
+ return () => {
1140
+ ownerWindow.clearTimeout(timeoutId);
1141
+ node.removeEventListener("animationstart", handleAnimationStart);
1142
+ node.removeEventListener("animationcancel", handleAnimationEnd);
1143
+ node.removeEventListener("animationend", handleAnimationEnd);
1144
+ };
1145
+ } else {
1146
+ send("ANIMATION_END");
1147
+ }
1148
+ }, [node, send]);
1149
+ return {
1150
+ isPresent: ["mounted", "unmountSuspended"].includes(state),
1151
+ ref: React23.useCallback((node2) => {
1152
+ stylesRef.current = node2 ? getComputedStyle(node2) : null;
1153
+ setNode(node2);
1154
+ }, [])
1155
+ };
1156
+ }
1157
+ function getAnimationName(styles) {
1158
+ return styles?.animationName || "none";
1159
+ }
1160
+ function getElementRef2(element) {
1161
+ let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
1162
+ let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
1163
+ if (mayWarn) {
1164
+ return element.ref;
1165
+ }
1166
+ getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
1167
+ mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
1168
+ if (mayWarn) {
1169
+ return element.props.ref;
1170
+ }
1171
+ return element.props.ref || element.ref;
1172
+ }
1173
+
1174
+ // node_modules/@radix-ui/react-focus-guards/dist/index.mjs
1175
+ var React17 = __toESM(require("react"), 1);
1176
+ var count2 = 0;
1177
+ function useFocusGuards() {
1178
+ React17.useEffect(() => {
1179
+ const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
1180
+ document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
1181
+ document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
1182
+ count2++;
1183
+ return () => {
1184
+ if (count2 === 1) {
1185
+ document.querySelectorAll("[data-radix-focus-guard]").forEach((node) => node.remove());
1186
+ }
1187
+ count2--;
1188
+ };
1189
+ }, []);
1190
+ }
1191
+ function createFocusGuard() {
1192
+ const element = document.createElement("span");
1193
+ element.setAttribute("data-radix-focus-guard", "");
1194
+ element.tabIndex = 0;
1195
+ element.style.outline = "none";
1196
+ element.style.opacity = "0";
1197
+ element.style.position = "fixed";
1198
+ element.style.pointerEvents = "none";
1199
+ return element;
1200
+ }
1201
+
1202
+ // node_modules/tslib/tslib.es6.mjs
1203
+ var __assign = function() {
1204
+ __assign = Object.assign || function __assign2(t) {
1205
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
1206
+ s = arguments[i];
1207
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
1208
+ }
1209
+ return t;
1210
+ };
1211
+ return __assign.apply(this, arguments);
1212
+ };
1213
+ function __rest(s, e) {
1214
+ var t = {};
1215
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
1216
+ t[p] = s[p];
1217
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
1218
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
1219
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
1220
+ t[p[i]] = s[p[i]];
1221
+ }
1222
+ return t;
1223
+ }
1224
+ function __spreadArray(to, from, pack) {
1225
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
1226
+ if (ar || !(i in from)) {
1227
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
1228
+ ar[i] = from[i];
1229
+ }
1230
+ }
1231
+ return to.concat(ar || Array.prototype.slice.call(from));
1232
+ }
1233
+
1234
+ // node_modules/react-remove-scroll/dist/es2015/Combination.js
1235
+ var React26 = __toESM(require("react"));
1236
+
1237
+ // node_modules/react-remove-scroll/dist/es2015/UI.js
1238
+ var React20 = __toESM(require("react"));
1239
+
1240
+ // node_modules/react-remove-scroll-bar/dist/es2015/constants.js
1241
+ var zeroRightClassName = "right-scroll-bar-position";
1242
+ var fullWidthClassName = "width-before-scroll-bar";
1243
+ var noScrollbarsClassName = "with-scroll-bars-hidden";
1244
+ var removedBarSizeVariable = "--removed-body-scroll-bar-size";
1245
+
1246
+ // node_modules/use-callback-ref/dist/es2015/assignRef.js
1247
+ function assignRef(ref, value) {
1248
+ if (typeof ref === "function") {
1249
+ ref(value);
1250
+ } else if (ref) {
1251
+ ref.current = value;
1252
+ }
1253
+ return ref;
1254
+ }
1255
+
1256
+ // node_modules/use-callback-ref/dist/es2015/useRef.js
1257
+ var import_react = require("react");
1258
+ function useCallbackRef2(initialValue, callback) {
1259
+ var ref = (0, import_react.useState)(function() {
1260
+ return {
1261
+ // value
1262
+ value: initialValue,
1263
+ // last callback
1264
+ callback,
1265
+ // "memoized" public interface
1266
+ facade: {
1267
+ get current() {
1268
+ return ref.value;
1269
+ },
1270
+ set current(value) {
1271
+ var last = ref.value;
1272
+ if (last !== value) {
1273
+ ref.value = value;
1274
+ ref.callback(value, last);
1275
+ }
1276
+ }
1277
+ }
1278
+ };
1279
+ })[0];
1280
+ ref.callback = callback;
1281
+ return ref.facade;
1282
+ }
1283
+
1284
+ // node_modules/use-callback-ref/dist/es2015/useMergeRef.js
1285
+ var React18 = __toESM(require("react"));
1286
+ var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React18.useLayoutEffect : React18.useEffect;
1287
+ var currentValues = /* @__PURE__ */ new WeakMap();
1288
+ function useMergeRefs(refs, defaultValue) {
1289
+ var callbackRef = useCallbackRef2(defaultValue || null, function(newValue) {
1290
+ return refs.forEach(function(ref) {
1291
+ return assignRef(ref, newValue);
1292
+ });
1293
+ });
1294
+ useIsomorphicLayoutEffect(function() {
1295
+ var oldValue = currentValues.get(callbackRef);
1296
+ if (oldValue) {
1297
+ var prevRefs_1 = new Set(oldValue);
1298
+ var nextRefs_1 = new Set(refs);
1299
+ var current_1 = callbackRef.current;
1300
+ prevRefs_1.forEach(function(ref) {
1301
+ if (!nextRefs_1.has(ref)) {
1302
+ assignRef(ref, null);
1303
+ }
1304
+ });
1305
+ nextRefs_1.forEach(function(ref) {
1306
+ if (!prevRefs_1.has(ref)) {
1307
+ assignRef(ref, current_1);
1308
+ }
1309
+ });
1310
+ }
1311
+ currentValues.set(callbackRef, refs);
1312
+ }, [refs]);
1313
+ return callbackRef;
1314
+ }
1315
+
1316
+ // node_modules/use-sidecar/dist/es2015/medium.js
1317
+ function ItoI(a) {
1318
+ return a;
1319
+ }
1320
+ function innerCreateMedium(defaults, middleware) {
1321
+ if (middleware === void 0) {
1322
+ middleware = ItoI;
1323
+ }
1324
+ var buffer = [];
1325
+ var assigned = false;
1326
+ var medium = {
1327
+ read: function() {
1328
+ if (assigned) {
1329
+ throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
1330
+ }
1331
+ if (buffer.length) {
1332
+ return buffer[buffer.length - 1];
1333
+ }
1334
+ return defaults;
1335
+ },
1336
+ useMedium: function(data) {
1337
+ var item = middleware(data, assigned);
1338
+ buffer.push(item);
1339
+ return function() {
1340
+ buffer = buffer.filter(function(x) {
1341
+ return x !== item;
1342
+ });
1343
+ };
1344
+ },
1345
+ assignSyncMedium: function(cb) {
1346
+ assigned = true;
1347
+ while (buffer.length) {
1348
+ var cbs = buffer;
1349
+ buffer = [];
1350
+ cbs.forEach(cb);
1351
+ }
1352
+ buffer = {
1353
+ push: function(x) {
1354
+ return cb(x);
1355
+ },
1356
+ filter: function() {
1357
+ return buffer;
1358
+ }
1359
+ };
1360
+ },
1361
+ assignMedium: function(cb) {
1362
+ assigned = true;
1363
+ var pendingQueue = [];
1364
+ if (buffer.length) {
1365
+ var cbs = buffer;
1366
+ buffer = [];
1367
+ cbs.forEach(cb);
1368
+ pendingQueue = buffer;
1369
+ }
1370
+ var executeQueue = function() {
1371
+ var cbs2 = pendingQueue;
1372
+ pendingQueue = [];
1373
+ cbs2.forEach(cb);
1374
+ };
1375
+ var cycle = function() {
1376
+ return Promise.resolve().then(executeQueue);
1377
+ };
1378
+ cycle();
1379
+ buffer = {
1380
+ push: function(x) {
1381
+ pendingQueue.push(x);
1382
+ cycle();
1383
+ },
1384
+ filter: function(filter) {
1385
+ pendingQueue = pendingQueue.filter(filter);
1386
+ return buffer;
1387
+ }
1388
+ };
1389
+ }
1390
+ };
1391
+ return medium;
1392
+ }
1393
+ function createSidecarMedium(options) {
1394
+ if (options === void 0) {
1395
+ options = {};
1396
+ }
1397
+ var medium = innerCreateMedium(null);
1398
+ medium.options = __assign({ async: true, ssr: false }, options);
1399
+ return medium;
1400
+ }
1401
+
1402
+ // node_modules/use-sidecar/dist/es2015/exports.js
1403
+ var React19 = __toESM(require("react"));
1404
+ var SideCar = function(_a) {
1405
+ var sideCar = _a.sideCar, rest = __rest(_a, ["sideCar"]);
1406
+ if (!sideCar) {
1407
+ throw new Error("Sidecar: please provide `sideCar` property to import the right car");
1408
+ }
1409
+ var Target = sideCar.read();
1410
+ if (!Target) {
1411
+ throw new Error("Sidecar medium not found");
1412
+ }
1413
+ return React19.createElement(Target, __assign({}, rest));
1414
+ };
1415
+ SideCar.isSideCarExport = true;
1416
+ function exportSidecar(medium, exported) {
1417
+ medium.useMedium(exported);
1418
+ return SideCar;
1419
+ }
1420
+
1421
+ // node_modules/react-remove-scroll/dist/es2015/medium.js
1422
+ var effectCar = createSidecarMedium();
1423
+
1424
+ // node_modules/react-remove-scroll/dist/es2015/UI.js
1425
+ var nothing = function() {
1426
+ return;
1427
+ };
1428
+ var RemoveScroll = React20.forwardRef(function(props, parentRef) {
1429
+ var ref = React20.useRef(null);
1430
+ var _a = React20.useState({
1431
+ onScrollCapture: nothing,
1432
+ onWheelCapture: nothing,
1433
+ onTouchMoveCapture: nothing
1434
+ }), callbacks = _a[0], setCallbacks = _a[1];
1435
+ var forwardProps = props.forwardProps, children = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noRelative = props.noRelative, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b = props.as, Container = _b === void 0 ? "div" : _b, gapMode = props.gapMode, rest = __rest(props, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]);
1436
+ var SideCar2 = sideCar;
1437
+ var containerRef = useMergeRefs([ref, parentRef]);
1438
+ var containerProps = __assign(__assign({}, rest), callbacks);
1439
+ return React20.createElement(
1440
+ React20.Fragment,
1441
+ null,
1442
+ enabled && React20.createElement(SideCar2, { sideCar: effectCar, removeScrollBar, shards, noRelative, noIsolation, inert, setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode }),
1443
+ forwardProps ? React20.cloneElement(React20.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef })) : React20.createElement(Container, __assign({}, containerProps, { className, ref: containerRef }), children)
1444
+ );
1445
+ });
1446
+ RemoveScroll.defaultProps = {
1447
+ enabled: true,
1448
+ removeScrollBar: true,
1449
+ inert: false
1450
+ };
1451
+ RemoveScroll.classNames = {
1452
+ fullWidth: fullWidthClassName,
1453
+ zeroRight: zeroRightClassName
1454
+ };
1455
+
1456
+ // node_modules/react-remove-scroll/dist/es2015/SideEffect.js
1457
+ var React25 = __toESM(require("react"));
1458
+
1459
+ // node_modules/react-remove-scroll-bar/dist/es2015/component.js
1460
+ var React24 = __toESM(require("react"));
1461
+
1462
+ // node_modules/react-style-singleton/dist/es2015/hook.js
1463
+ var React21 = __toESM(require("react"));
1464
+
1465
+ // node_modules/get-nonce/dist/es2015/index.js
1466
+ var currentNonce;
1467
+ var getNonce = function() {
1468
+ if (currentNonce) {
1469
+ return currentNonce;
1470
+ }
1471
+ if (typeof __webpack_nonce__ !== "undefined") {
1472
+ return __webpack_nonce__;
1473
+ }
1474
+ return void 0;
1475
+ };
1476
+
1477
+ // node_modules/react-style-singleton/dist/es2015/singleton.js
1478
+ function makeStyleTag() {
1479
+ if (!document)
1480
+ return null;
1481
+ var tag = document.createElement("style");
1482
+ tag.type = "text/css";
1483
+ var nonce = getNonce();
1484
+ if (nonce) {
1485
+ tag.setAttribute("nonce", nonce);
1486
+ }
1487
+ return tag;
1488
+ }
1489
+ function injectStyles(tag, css) {
1490
+ if (tag.styleSheet) {
1491
+ tag.styleSheet.cssText = css;
1492
+ } else {
1493
+ tag.appendChild(document.createTextNode(css));
1494
+ }
1495
+ }
1496
+ function insertStyleTag(tag) {
1497
+ var head = document.head || document.getElementsByTagName("head")[0];
1498
+ head.appendChild(tag);
1499
+ }
1500
+ var stylesheetSingleton = function() {
1501
+ var counter = 0;
1502
+ var stylesheet = null;
1503
+ return {
1504
+ add: function(style) {
1505
+ if (counter == 0) {
1506
+ if (stylesheet = makeStyleTag()) {
1507
+ injectStyles(stylesheet, style);
1508
+ insertStyleTag(stylesheet);
1509
+ }
1510
+ }
1511
+ counter++;
1512
+ },
1513
+ remove: function() {
1514
+ counter--;
1515
+ if (!counter && stylesheet) {
1516
+ stylesheet.parentNode && stylesheet.parentNode.removeChild(stylesheet);
1517
+ stylesheet = null;
1518
+ }
1519
+ }
1520
+ };
1521
+ };
1522
+
1523
+ // node_modules/react-style-singleton/dist/es2015/hook.js
1524
+ var styleHookSingleton = function() {
1525
+ var sheet = stylesheetSingleton();
1526
+ return function(styles, isDynamic) {
1527
+ React21.useEffect(function() {
1528
+ sheet.add(styles);
1529
+ return function() {
1530
+ sheet.remove();
1531
+ };
1532
+ }, [styles && isDynamic]);
1533
+ };
1534
+ };
1535
+
1536
+ // node_modules/react-style-singleton/dist/es2015/component.js
1537
+ var styleSingleton = function() {
1538
+ var useStyle = styleHookSingleton();
1539
+ var Sheet = function(_a) {
1540
+ var styles = _a.styles, dynamic = _a.dynamic;
1541
+ useStyle(styles, dynamic);
1542
+ return null;
1543
+ };
1544
+ return Sheet;
1545
+ };
1546
+
1547
+ // node_modules/react-remove-scroll-bar/dist/es2015/utils.js
1548
+ var zeroGap = {
1549
+ left: 0,
1550
+ top: 0,
1551
+ right: 0,
1552
+ gap: 0
1553
+ };
1554
+ var parse = function(x) {
1555
+ return parseInt(x || "", 10) || 0;
1556
+ };
1557
+ var getOffset = function(gapMode) {
1558
+ var cs = window.getComputedStyle(document.body);
1559
+ var left = cs[gapMode === "padding" ? "paddingLeft" : "marginLeft"];
1560
+ var top = cs[gapMode === "padding" ? "paddingTop" : "marginTop"];
1561
+ var right = cs[gapMode === "padding" ? "paddingRight" : "marginRight"];
1562
+ return [parse(left), parse(top), parse(right)];
1563
+ };
1564
+ var getGapWidth = function(gapMode) {
1565
+ if (gapMode === void 0) {
1566
+ gapMode = "margin";
1567
+ }
1568
+ if (typeof window === "undefined") {
1569
+ return zeroGap;
1570
+ }
1571
+ var offsets = getOffset(gapMode);
1572
+ var documentWidth = document.documentElement.clientWidth;
1573
+ var windowWidth = window.innerWidth;
1574
+ return {
1575
+ left: offsets[0],
1576
+ top: offsets[1],
1577
+ right: offsets[2],
1578
+ gap: Math.max(0, windowWidth - documentWidth + offsets[2] - offsets[0])
1579
+ };
1580
+ };
1581
+
1582
+ // node_modules/react-remove-scroll-bar/dist/es2015/component.js
1583
+ var Style = styleSingleton();
1584
+ var lockAttribute = "data-scroll-locked";
1585
+ var getStyles = function(_a, allowRelative, gapMode, important) {
1586
+ var left = _a.left, top = _a.top, right = _a.right, gap = _a.gap;
1587
+ if (gapMode === void 0) {
1588
+ gapMode = "margin";
1589
+ }
1590
+ return "\n .".concat(noScrollbarsClassName, " {\n overflow: hidden ").concat(important, ";\n padding-right: ").concat(gap, "px ").concat(important, ";\n }\n body[").concat(lockAttribute, "] {\n overflow: hidden ").concat(important, ";\n overscroll-behavior: contain;\n ").concat([
1591
+ allowRelative && "position: relative ".concat(important, ";"),
1592
+ gapMode === "margin" && "\n padding-left: ".concat(left, "px;\n padding-top: ").concat(top, "px;\n padding-right: ").concat(right, "px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(gap, "px ").concat(important, ";\n "),
1593
+ gapMode === "padding" && "padding-right: ".concat(gap, "px ").concat(important, ";")
1594
+ ].filter(Boolean).join(""), "\n }\n \n .").concat(zeroRightClassName, " {\n right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " {\n margin-right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(zeroRightClassName, " .").concat(zeroRightClassName, " {\n right: 0 ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " .").concat(fullWidthClassName, " {\n margin-right: 0 ").concat(important, ";\n }\n \n body[").concat(lockAttribute, "] {\n ").concat(removedBarSizeVariable, ": ").concat(gap, "px;\n }\n");
1595
+ };
1596
+ var getCurrentUseCounter = function() {
1597
+ var counter = parseInt(document.body.getAttribute(lockAttribute) || "0", 10);
1598
+ return isFinite(counter) ? counter : 0;
1599
+ };
1600
+ var useLockAttribute = function() {
1601
+ React24.useEffect(function() {
1602
+ document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());
1603
+ return function() {
1604
+ var newCounter = getCurrentUseCounter() - 1;
1605
+ if (newCounter <= 0) {
1606
+ document.body.removeAttribute(lockAttribute);
1607
+ } else {
1608
+ document.body.setAttribute(lockAttribute, newCounter.toString());
1609
+ }
1610
+ };
1611
+ }, []);
1612
+ };
1613
+ var RemoveScrollBar = function(_a) {
1614
+ var noRelative = _a.noRelative, noImportant = _a.noImportant, _b = _a.gapMode, gapMode = _b === void 0 ? "margin" : _b;
1615
+ useLockAttribute();
1616
+ var gap = React24.useMemo(function() {
1617
+ return getGapWidth(gapMode);
1618
+ }, [gapMode]);
1619
+ return React24.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? "!important" : "") });
1620
+ };
1621
+
1622
+ // node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js
1623
+ var passiveSupported = false;
1624
+ if (typeof window !== "undefined") {
1625
+ try {
1626
+ options = Object.defineProperty({}, "passive", {
1627
+ get: function() {
1628
+ passiveSupported = true;
1629
+ return true;
1630
+ }
1631
+ });
1632
+ window.addEventListener("test", options, options);
1633
+ window.removeEventListener("test", options, options);
1634
+ } catch (err) {
1635
+ passiveSupported = false;
1636
+ }
1637
+ }
1638
+ var options;
1639
+ var nonPassive = passiveSupported ? { passive: false } : false;
1640
+
1641
+ // node_modules/react-remove-scroll/dist/es2015/handleScroll.js
1642
+ var alwaysContainsScroll = function(node) {
1643
+ return node.tagName === "TEXTAREA";
1644
+ };
1645
+ var elementCanBeScrolled = function(node, overflow) {
1646
+ if (!(node instanceof Element)) {
1647
+ return false;
1648
+ }
1649
+ var styles = window.getComputedStyle(node);
1650
+ return (
1651
+ // not-not-scrollable
1652
+ styles[overflow] !== "hidden" && // contains scroll inside self
1653
+ !(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node) && styles[overflow] === "visible")
1654
+ );
1655
+ };
1656
+ var elementCouldBeVScrolled = function(node) {
1657
+ return elementCanBeScrolled(node, "overflowY");
1658
+ };
1659
+ var elementCouldBeHScrolled = function(node) {
1660
+ return elementCanBeScrolled(node, "overflowX");
1661
+ };
1662
+ var locationCouldBeScrolled = function(axis, node) {
1663
+ var ownerDocument = node.ownerDocument;
1664
+ var current = node;
1665
+ do {
1666
+ if (typeof ShadowRoot !== "undefined" && current instanceof ShadowRoot) {
1667
+ current = current.host;
1668
+ }
1669
+ var isScrollable = elementCouldBeScrolled(axis, current);
1670
+ if (isScrollable) {
1671
+ var _a = getScrollVariables(axis, current), scrollHeight = _a[1], clientHeight = _a[2];
1672
+ if (scrollHeight > clientHeight) {
1673
+ return true;
1674
+ }
1675
+ }
1676
+ current = current.parentNode;
1677
+ } while (current && current !== ownerDocument.body);
1678
+ return false;
1679
+ };
1680
+ var getVScrollVariables = function(_a) {
1681
+ var scrollTop = _a.scrollTop, scrollHeight = _a.scrollHeight, clientHeight = _a.clientHeight;
1682
+ return [
1683
+ scrollTop,
1684
+ scrollHeight,
1685
+ clientHeight
1686
+ ];
1687
+ };
1688
+ var getHScrollVariables = function(_a) {
1689
+ var scrollLeft = _a.scrollLeft, scrollWidth = _a.scrollWidth, clientWidth = _a.clientWidth;
1690
+ return [
1691
+ scrollLeft,
1692
+ scrollWidth,
1693
+ clientWidth
1694
+ ];
1695
+ };
1696
+ var elementCouldBeScrolled = function(axis, node) {
1697
+ return axis === "v" ? elementCouldBeVScrolled(node) : elementCouldBeHScrolled(node);
1698
+ };
1699
+ var getScrollVariables = function(axis, node) {
1700
+ return axis === "v" ? getVScrollVariables(node) : getHScrollVariables(node);
1701
+ };
1702
+ var getDirectionFactor = function(axis, direction) {
1703
+ return axis === "h" && direction === "rtl" ? -1 : 1;
1704
+ };
1705
+ var handleScroll = function(axis, endTarget, event, sourceDelta, noOverscroll) {
1706
+ var directionFactor = getDirectionFactor(axis, window.getComputedStyle(endTarget).direction);
1707
+ var delta = directionFactor * sourceDelta;
1708
+ var target = event.target;
1709
+ var targetInLock = endTarget.contains(target);
1710
+ var shouldCancelScroll = false;
1711
+ var isDeltaPositive = delta > 0;
1712
+ var availableScroll = 0;
1713
+ var availableScrollTop = 0;
1714
+ do {
1715
+ if (!target) {
1716
+ break;
1717
+ }
1718
+ var _a = getScrollVariables(axis, target), position = _a[0], scroll_1 = _a[1], capacity = _a[2];
1719
+ var elementScroll = scroll_1 - capacity - directionFactor * position;
1720
+ if (position || elementScroll) {
1721
+ if (elementCouldBeScrolled(axis, target)) {
1722
+ availableScroll += elementScroll;
1723
+ availableScrollTop += position;
1724
+ }
1725
+ }
1726
+ var parent_1 = target.parentNode;
1727
+ target = parent_1 && parent_1.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? parent_1.host : parent_1;
1728
+ } while (
1729
+ // portaled content
1730
+ !targetInLock && target !== document.body || // self content
1731
+ targetInLock && (endTarget.contains(target) || endTarget === target)
1732
+ );
1733
+ if (isDeltaPositive && (noOverscroll && Math.abs(availableScroll) < 1 || !noOverscroll && delta > availableScroll)) {
1734
+ shouldCancelScroll = true;
1735
+ } else if (!isDeltaPositive && (noOverscroll && Math.abs(availableScrollTop) < 1 || !noOverscroll && -delta > availableScrollTop)) {
1736
+ shouldCancelScroll = true;
1737
+ }
1738
+ return shouldCancelScroll;
1739
+ };
1740
+
1741
+ // node_modules/react-remove-scroll/dist/es2015/SideEffect.js
1742
+ var getTouchXY = function(event) {
1743
+ return "changedTouches" in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0];
1744
+ };
1745
+ var getDeltaXY = function(event) {
1746
+ return [event.deltaX, event.deltaY];
1747
+ };
1748
+ var extractRef = function(ref) {
1749
+ return ref && "current" in ref ? ref.current : ref;
1750
+ };
1751
+ var deltaCompare = function(x, y) {
1752
+ return x[0] === y[0] && x[1] === y[1];
1753
+ };
1754
+ var generateStyle = function(id) {
1755
+ return "\n .block-interactivity-".concat(id, " {pointer-events: none;}\n .allow-interactivity-").concat(id, " {pointer-events: all;}\n");
1756
+ };
1757
+ var idCounter = 0;
1758
+ var lockStack = [];
1759
+ function RemoveScrollSideCar(props) {
1760
+ var shouldPreventQueue = React25.useRef([]);
1761
+ var touchStartRef = React25.useRef([0, 0]);
1762
+ var activeAxis = React25.useRef();
1763
+ var id = React25.useState(idCounter++)[0];
1764
+ var Style2 = React25.useState(styleSingleton)[0];
1765
+ var lastProps = React25.useRef(props);
1766
+ React25.useEffect(function() {
1767
+ lastProps.current = props;
1768
+ }, [props]);
1769
+ React25.useEffect(function() {
1770
+ if (props.inert) {
1771
+ document.body.classList.add("block-interactivity-".concat(id));
1772
+ var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);
1773
+ allow_1.forEach(function(el) {
1774
+ return el.classList.add("allow-interactivity-".concat(id));
1775
+ });
1776
+ return function() {
1777
+ document.body.classList.remove("block-interactivity-".concat(id));
1778
+ allow_1.forEach(function(el) {
1779
+ return el.classList.remove("allow-interactivity-".concat(id));
1780
+ });
1781
+ };
1782
+ }
1783
+ return;
1784
+ }, [props.inert, props.lockRef.current, props.shards]);
1785
+ var shouldCancelEvent = React25.useCallback(function(event, parent) {
1786
+ if ("touches" in event && event.touches.length === 2 || event.type === "wheel" && event.ctrlKey) {
1787
+ return !lastProps.current.allowPinchZoom;
1788
+ }
1789
+ var touch = getTouchXY(event);
1790
+ var touchStart = touchStartRef.current;
1791
+ var deltaX = "deltaX" in event ? event.deltaX : touchStart[0] - touch[0];
1792
+ var deltaY = "deltaY" in event ? event.deltaY : touchStart[1] - touch[1];
1793
+ var currentAxis;
1794
+ var target = event.target;
1795
+ var moveDirection = Math.abs(deltaX) > Math.abs(deltaY) ? "h" : "v";
1796
+ if ("touches" in event && moveDirection === "h" && target.type === "range") {
1797
+ return false;
1798
+ }
1799
+ var selection = window.getSelection();
1800
+ var anchorNode = selection && selection.anchorNode;
1801
+ var isTouchingSelection = anchorNode ? anchorNode === target || anchorNode.contains(target) : false;
1802
+ if (isTouchingSelection) {
1803
+ return false;
1804
+ }
1805
+ var canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
1806
+ if (!canBeScrolledInMainDirection) {
1807
+ return true;
1808
+ }
1809
+ if (canBeScrolledInMainDirection) {
1810
+ currentAxis = moveDirection;
1811
+ } else {
1812
+ currentAxis = moveDirection === "v" ? "h" : "v";
1813
+ canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
1814
+ }
1815
+ if (!canBeScrolledInMainDirection) {
1816
+ return false;
1817
+ }
1818
+ if (!activeAxis.current && "changedTouches" in event && (deltaX || deltaY)) {
1819
+ activeAxis.current = currentAxis;
1820
+ }
1821
+ if (!currentAxis) {
1822
+ return true;
1823
+ }
1824
+ var cancelingAxis = activeAxis.current || currentAxis;
1825
+ return handleScroll(cancelingAxis, parent, event, cancelingAxis === "h" ? deltaX : deltaY, true);
1826
+ }, []);
1827
+ var shouldPrevent = React25.useCallback(function(_event) {
1828
+ var event = _event;
1829
+ if (!lockStack.length || lockStack[lockStack.length - 1] !== Style2) {
1830
+ return;
1831
+ }
1832
+ var delta = "deltaY" in event ? getDeltaXY(event) : getTouchXY(event);
1833
+ var sourceEvent = shouldPreventQueue.current.filter(function(e) {
1834
+ return e.name === event.type && (e.target === event.target || event.target === e.shadowParent) && deltaCompare(e.delta, delta);
1835
+ })[0];
1836
+ if (sourceEvent && sourceEvent.should) {
1837
+ if (event.cancelable) {
1838
+ event.preventDefault();
1839
+ }
1840
+ return;
1841
+ }
1842
+ if (!sourceEvent) {
1843
+ var shardNodes = (lastProps.current.shards || []).map(extractRef).filter(Boolean).filter(function(node) {
1844
+ return node.contains(event.target);
1845
+ });
1846
+ var shouldStop = shardNodes.length > 0 ? shouldCancelEvent(event, shardNodes[0]) : !lastProps.current.noIsolation;
1847
+ if (shouldStop) {
1848
+ if (event.cancelable) {
1849
+ event.preventDefault();
1850
+ }
1851
+ }
1852
+ }
1853
+ }, []);
1854
+ var shouldCancel = React25.useCallback(function(name, delta, target, should) {
1855
+ var event = { name, delta, target, should, shadowParent: getOutermostShadowParent(target) };
1856
+ shouldPreventQueue.current.push(event);
1857
+ setTimeout(function() {
1858
+ shouldPreventQueue.current = shouldPreventQueue.current.filter(function(e) {
1859
+ return e !== event;
1860
+ });
1861
+ }, 1);
1862
+ }, []);
1863
+ var scrollTouchStart = React25.useCallback(function(event) {
1864
+ touchStartRef.current = getTouchXY(event);
1865
+ activeAxis.current = void 0;
1866
+ }, []);
1867
+ var scrollWheel = React25.useCallback(function(event) {
1868
+ shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
1869
+ }, []);
1870
+ var scrollTouchMove = React25.useCallback(function(event) {
1871
+ shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
1872
+ }, []);
1873
+ React25.useEffect(function() {
1874
+ lockStack.push(Style2);
1875
+ props.setCallbacks({
1876
+ onScrollCapture: scrollWheel,
1877
+ onWheelCapture: scrollWheel,
1878
+ onTouchMoveCapture: scrollTouchMove
1879
+ });
1880
+ document.addEventListener("wheel", shouldPrevent, nonPassive);
1881
+ document.addEventListener("touchmove", shouldPrevent, nonPassive);
1882
+ document.addEventListener("touchstart", scrollTouchStart, nonPassive);
1883
+ return function() {
1884
+ lockStack = lockStack.filter(function(inst) {
1885
+ return inst !== Style2;
1886
+ });
1887
+ document.removeEventListener("wheel", shouldPrevent, nonPassive);
1888
+ document.removeEventListener("touchmove", shouldPrevent, nonPassive);
1889
+ document.removeEventListener("touchstart", scrollTouchStart, nonPassive);
1890
+ };
1891
+ }, []);
1892
+ var removeScrollBar = props.removeScrollBar, inert = props.inert;
1893
+ return React25.createElement(
1894
+ React25.Fragment,
1895
+ null,
1896
+ inert ? React25.createElement(Style2, { styles: generateStyle(id) }) : null,
1897
+ removeScrollBar ? React25.createElement(RemoveScrollBar, { noRelative: props.noRelative, gapMode: props.gapMode }) : null
1898
+ );
1899
+ }
1900
+ function getOutermostShadowParent(node) {
1901
+ var shadowParent = null;
1902
+ while (node !== null) {
1903
+ if (node instanceof ShadowRoot) {
1904
+ shadowParent = node.host;
1905
+ node = node.host;
1906
+ }
1907
+ node = node.parentNode;
1908
+ }
1909
+ return shadowParent;
1910
+ }
1911
+
1912
+ // node_modules/react-remove-scroll/dist/es2015/sidecar.js
1913
+ var sidecar_default = exportSidecar(effectCar, RemoveScrollSideCar);
1914
+
1915
+ // node_modules/react-remove-scroll/dist/es2015/Combination.js
1916
+ var ReactRemoveScroll = React26.forwardRef(function(props, ref) {
1917
+ return React26.createElement(RemoveScroll, __assign({}, props, { ref, sideCar: sidecar_default }));
1918
+ });
1919
+ ReactRemoveScroll.classNames = RemoveScroll.classNames;
1920
+ var Combination_default = ReactRemoveScroll;
1921
+
1922
+ // node_modules/aria-hidden/dist/es2015/index.js
1923
+ var getDefaultParent = function(originalTarget) {
1924
+ if (typeof document === "undefined") {
1925
+ return null;
1926
+ }
1927
+ var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget;
1928
+ return sampleTarget.ownerDocument.body;
1929
+ };
1930
+ var counterMap = /* @__PURE__ */ new WeakMap();
1931
+ var uncontrolledNodes = /* @__PURE__ */ new WeakMap();
1932
+ var markerMap = {};
1933
+ var lockCount = 0;
1934
+ var unwrapHost = function(node) {
1935
+ return node && (node.host || unwrapHost(node.parentNode));
1936
+ };
1937
+ var correctTargets = function(parent, targets) {
1938
+ return targets.map(function(target) {
1939
+ if (parent.contains(target)) {
1940
+ return target;
1941
+ }
1942
+ var correctedTarget = unwrapHost(target);
1943
+ if (correctedTarget && parent.contains(correctedTarget)) {
1944
+ return correctedTarget;
1945
+ }
1946
+ console.error("aria-hidden", target, "in not contained inside", parent, ". Doing nothing");
1947
+ return null;
1948
+ }).filter(function(x) {
1949
+ return Boolean(x);
1950
+ });
1951
+ };
1952
+ var applyAttributeToOthers = function(originalTarget, parentNode, markerName, controlAttribute) {
1953
+ var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
1954
+ if (!markerMap[markerName]) {
1955
+ markerMap[markerName] = /* @__PURE__ */ new WeakMap();
1956
+ }
1957
+ var markerCounter = markerMap[markerName];
1958
+ var hiddenNodes = [];
1959
+ var elementsToKeep = /* @__PURE__ */ new Set();
1960
+ var elementsToStop = new Set(targets);
1961
+ var keep = function(el) {
1962
+ if (!el || elementsToKeep.has(el)) {
1963
+ return;
1964
+ }
1965
+ elementsToKeep.add(el);
1966
+ keep(el.parentNode);
1967
+ };
1968
+ targets.forEach(keep);
1969
+ var deep = function(parent) {
1970
+ if (!parent || elementsToStop.has(parent)) {
1971
+ return;
1972
+ }
1973
+ Array.prototype.forEach.call(parent.children, function(node) {
1974
+ if (elementsToKeep.has(node)) {
1975
+ deep(node);
1976
+ } else {
1977
+ try {
1978
+ var attr = node.getAttribute(controlAttribute);
1979
+ var alreadyHidden = attr !== null && attr !== "false";
1980
+ var counterValue = (counterMap.get(node) || 0) + 1;
1981
+ var markerValue = (markerCounter.get(node) || 0) + 1;
1982
+ counterMap.set(node, counterValue);
1983
+ markerCounter.set(node, markerValue);
1984
+ hiddenNodes.push(node);
1985
+ if (counterValue === 1 && alreadyHidden) {
1986
+ uncontrolledNodes.set(node, true);
1987
+ }
1988
+ if (markerValue === 1) {
1989
+ node.setAttribute(markerName, "true");
1990
+ }
1991
+ if (!alreadyHidden) {
1992
+ node.setAttribute(controlAttribute, "true");
1993
+ }
1994
+ } catch (e) {
1995
+ console.error("aria-hidden: cannot operate on ", node, e);
1996
+ }
1997
+ }
1998
+ });
1999
+ };
2000
+ deep(parentNode);
2001
+ elementsToKeep.clear();
2002
+ lockCount++;
2003
+ return function() {
2004
+ hiddenNodes.forEach(function(node) {
2005
+ var counterValue = counterMap.get(node) - 1;
2006
+ var markerValue = markerCounter.get(node) - 1;
2007
+ counterMap.set(node, counterValue);
2008
+ markerCounter.set(node, markerValue);
2009
+ if (!counterValue) {
2010
+ if (!uncontrolledNodes.has(node)) {
2011
+ node.removeAttribute(controlAttribute);
2012
+ }
2013
+ uncontrolledNodes.delete(node);
2014
+ }
2015
+ if (!markerValue) {
2016
+ node.removeAttribute(markerName);
2017
+ }
2018
+ });
2019
+ lockCount--;
2020
+ if (!lockCount) {
2021
+ counterMap = /* @__PURE__ */ new WeakMap();
2022
+ counterMap = /* @__PURE__ */ new WeakMap();
2023
+ uncontrolledNodes = /* @__PURE__ */ new WeakMap();
2024
+ markerMap = {};
2025
+ }
2026
+ };
2027
+ };
2028
+ var hideOthers = function(originalTarget, parentNode, markerName) {
2029
+ if (markerName === void 0) {
2030
+ markerName = "data-aria-hidden";
2031
+ }
2032
+ var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
2033
+ var activeParentNode = parentNode || getDefaultParent(originalTarget);
2034
+ if (!activeParentNode) {
2035
+ return function() {
2036
+ return null;
2037
+ };
2038
+ }
2039
+ targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll("[aria-live], script")));
2040
+ return applyAttributeToOthers(targets, activeParentNode, markerName, "aria-hidden");
2041
+ };
2042
+
2043
+ // node_modules/@radix-ui/react-dialog/dist/index.mjs
2044
+ var import_jsx_runtime11 = require("react/jsx-runtime");
2045
+ var DIALOG_NAME = "Dialog";
2046
+ var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
2047
+ var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
2048
+ var Dialog = (props) => {
2049
+ const {
2050
+ __scopeDialog,
2051
+ children,
2052
+ open: openProp,
2053
+ defaultOpen,
2054
+ onOpenChange,
2055
+ modal = true
2056
+ } = props;
2057
+ const triggerRef = React27.useRef(null);
2058
+ const contentRef = React27.useRef(null);
2059
+ const [open, setOpen] = useControllableState({
2060
+ prop: openProp,
2061
+ defaultProp: defaultOpen ?? false,
2062
+ onChange: onOpenChange,
2063
+ caller: DIALOG_NAME
2064
+ });
2065
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2066
+ DialogProvider,
2067
+ {
2068
+ scope: __scopeDialog,
2069
+ triggerRef,
2070
+ contentRef,
2071
+ contentId: useId(),
2072
+ titleId: useId(),
2073
+ descriptionId: useId(),
2074
+ open,
2075
+ onOpenChange: setOpen,
2076
+ onOpenToggle: React27.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
2077
+ modal,
2078
+ children
2079
+ }
2080
+ );
2081
+ };
2082
+ Dialog.displayName = DIALOG_NAME;
2083
+ var TRIGGER_NAME = "DialogTrigger";
2084
+ var DialogTrigger = React27.forwardRef(
2085
+ (props, forwardedRef) => {
2086
+ const { __scopeDialog, ...triggerProps } = props;
2087
+ const context = useDialogContext(TRIGGER_NAME, __scopeDialog);
2088
+ const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
2089
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2090
+ Primitive.button,
2091
+ {
2092
+ type: "button",
2093
+ "aria-haspopup": "dialog",
2094
+ "aria-expanded": context.open,
2095
+ "aria-controls": context.contentId,
2096
+ "data-state": getState(context.open),
2097
+ ...triggerProps,
2098
+ ref: composedTriggerRef,
2099
+ onClick: composeEventHandlers(props.onClick, context.onOpenToggle)
2100
+ }
2101
+ );
2102
+ }
2103
+ );
2104
+ DialogTrigger.displayName = TRIGGER_NAME;
2105
+ var PORTAL_NAME2 = "DialogPortal";
2106
+ var [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME2, {
2107
+ forceMount: void 0
2108
+ });
2109
+ var DialogPortal = (props) => {
2110
+ const { __scopeDialog, forceMount, children, container } = props;
2111
+ const context = useDialogContext(PORTAL_NAME2, __scopeDialog);
2112
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(PortalProvider, { scope: __scopeDialog, forceMount, children: React27.Children.map(children, (child) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Portal, { asChild: true, container, children: child }) })) });
2113
+ };
2114
+ DialogPortal.displayName = PORTAL_NAME2;
2115
+ var OVERLAY_NAME = "DialogOverlay";
2116
+ var DialogOverlay = React27.forwardRef(
2117
+ (props, forwardedRef) => {
2118
+ const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);
2119
+ const { forceMount = portalContext.forceMount, ...overlayProps } = props;
2120
+ const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);
2121
+ return context.modal ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;
2122
+ }
2123
+ );
2124
+ DialogOverlay.displayName = OVERLAY_NAME;
2125
+ var Slot = createSlot("DialogOverlay.RemoveScroll");
2126
+ var DialogOverlayImpl = React27.forwardRef(
2127
+ (props, forwardedRef) => {
2128
+ const { __scopeDialog, ...overlayProps } = props;
2129
+ const context = useDialogContext(OVERLAY_NAME, __scopeDialog);
2130
+ return (
2131
+ // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
2132
+ // ie. when `Overlay` and `Content` are siblings
2133
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Combination_default, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2134
+ Primitive.div,
2135
+ {
2136
+ "data-state": getState(context.open),
2137
+ ...overlayProps,
2138
+ ref: forwardedRef,
2139
+ style: { pointerEvents: "auto", ...overlayProps.style }
2140
+ }
2141
+ ) })
2142
+ );
2143
+ }
2144
+ );
2145
+ var CONTENT_NAME = "DialogContent";
2146
+ var DialogContent = React27.forwardRef(
2147
+ (props, forwardedRef) => {
2148
+ const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);
2149
+ const { forceMount = portalContext.forceMount, ...contentProps } = props;
2150
+ const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
2151
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });
2152
+ }
2153
+ );
2154
+ DialogContent.displayName = CONTENT_NAME;
2155
+ var DialogContentModal = React27.forwardRef(
2156
+ (props, forwardedRef) => {
2157
+ const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
2158
+ const contentRef = React27.useRef(null);
2159
+ const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);
2160
+ React27.useEffect(() => {
2161
+ const content = contentRef.current;
2162
+ if (content) return hideOthers(content);
2163
+ }, []);
2164
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2165
+ DialogContentImpl,
2166
+ {
2167
+ ...props,
2168
+ ref: composedRefs,
2169
+ trapFocus: context.open,
2170
+ disableOutsidePointerEvents: true,
2171
+ onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {
2172
+ event.preventDefault();
2173
+ context.triggerRef.current?.focus();
2174
+ }),
2175
+ onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {
2176
+ const originalEvent = event.detail.originalEvent;
2177
+ const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
2178
+ const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
2179
+ if (isRightClick) event.preventDefault();
2180
+ }),
2181
+ onFocusOutside: composeEventHandlers(
2182
+ props.onFocusOutside,
2183
+ (event) => event.preventDefault()
2184
+ )
2185
+ }
2186
+ );
2187
+ }
2188
+ );
2189
+ var DialogContentNonModal = React27.forwardRef(
2190
+ (props, forwardedRef) => {
2191
+ const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
2192
+ const hasInteractedOutsideRef = React27.useRef(false);
2193
+ const hasPointerDownOutsideRef = React27.useRef(false);
2194
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2195
+ DialogContentImpl,
2196
+ {
2197
+ ...props,
2198
+ ref: forwardedRef,
2199
+ trapFocus: false,
2200
+ disableOutsidePointerEvents: false,
2201
+ onCloseAutoFocus: (event) => {
2202
+ props.onCloseAutoFocus?.(event);
2203
+ if (!event.defaultPrevented) {
2204
+ if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();
2205
+ event.preventDefault();
2206
+ }
2207
+ hasInteractedOutsideRef.current = false;
2208
+ hasPointerDownOutsideRef.current = false;
2209
+ },
2210
+ onInteractOutside: (event) => {
2211
+ props.onInteractOutside?.(event);
2212
+ if (!event.defaultPrevented) {
2213
+ hasInteractedOutsideRef.current = true;
2214
+ if (event.detail.originalEvent.type === "pointerdown") {
2215
+ hasPointerDownOutsideRef.current = true;
2216
+ }
2217
+ }
2218
+ const target = event.target;
2219
+ const targetIsTrigger = context.triggerRef.current?.contains(target);
2220
+ if (targetIsTrigger) event.preventDefault();
2221
+ if (event.detail.originalEvent.type === "focusin" && hasPointerDownOutsideRef.current) {
2222
+ event.preventDefault();
2223
+ }
2224
+ }
2225
+ }
2226
+ );
2227
+ }
2228
+ );
2229
+ var DialogContentImpl = React27.forwardRef(
2230
+ (props, forwardedRef) => {
2231
+ const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;
2232
+ const context = useDialogContext(CONTENT_NAME, __scopeDialog);
2233
+ const contentRef = React27.useRef(null);
2234
+ const composedRefs = useComposedRefs(forwardedRef, contentRef);
2235
+ useFocusGuards();
2236
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
2237
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2238
+ FocusScope,
2239
+ {
2240
+ asChild: true,
2241
+ loop: true,
2242
+ trapped: trapFocus,
2243
+ onMountAutoFocus: onOpenAutoFocus,
2244
+ onUnmountAutoFocus: onCloseAutoFocus,
2245
+ children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2246
+ DismissableLayer,
2247
+ {
2248
+ role: "dialog",
2249
+ id: context.contentId,
2250
+ "aria-describedby": context.descriptionId,
2251
+ "aria-labelledby": context.titleId,
2252
+ "data-state": getState(context.open),
2253
+ ...contentProps,
2254
+ ref: composedRefs,
2255
+ onDismiss: () => context.onOpenChange(false)
2256
+ }
2257
+ )
2258
+ }
2259
+ ),
2260
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
2261
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(TitleWarning, { titleId: context.titleId }),
2262
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })
2263
+ ] })
2264
+ ] });
2265
+ }
2266
+ );
2267
+ var TITLE_NAME = "DialogTitle";
2268
+ var DialogTitle = React27.forwardRef(
2269
+ (props, forwardedRef) => {
2270
+ const { __scopeDialog, ...titleProps } = props;
2271
+ const context = useDialogContext(TITLE_NAME, __scopeDialog);
2272
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
2273
+ }
2274
+ );
2275
+ DialogTitle.displayName = TITLE_NAME;
2276
+ var DESCRIPTION_NAME = "DialogDescription";
2277
+ var DialogDescription = React27.forwardRef(
2278
+ (props, forwardedRef) => {
2279
+ const { __scopeDialog, ...descriptionProps } = props;
2280
+ const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
2281
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
2282
+ }
2283
+ );
2284
+ DialogDescription.displayName = DESCRIPTION_NAME;
2285
+ var CLOSE_NAME = "DialogClose";
2286
+ var DialogClose = React27.forwardRef(
2287
+ (props, forwardedRef) => {
2288
+ const { __scopeDialog, ...closeProps } = props;
2289
+ const context = useDialogContext(CLOSE_NAME, __scopeDialog);
2290
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2291
+ Primitive.button,
2292
+ {
2293
+ type: "button",
2294
+ ...closeProps,
2295
+ ref: forwardedRef,
2296
+ onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))
2297
+ }
2298
+ );
2299
+ }
2300
+ );
2301
+ DialogClose.displayName = CLOSE_NAME;
2302
+ function getState(open) {
2303
+ return open ? "open" : "closed";
2304
+ }
2305
+ var TITLE_WARNING_NAME = "DialogTitleWarning";
2306
+ var [WarningProvider, useWarningContext] = createContext2(TITLE_WARNING_NAME, {
2307
+ contentName: CONTENT_NAME,
2308
+ titleName: TITLE_NAME,
2309
+ docsSlug: "dialog"
2310
+ });
2311
+ var TitleWarning = ({ titleId }) => {
2312
+ const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);
2313
+ const MESSAGE = `\`${titleWarningContext.contentName}\` requires a \`${titleWarningContext.titleName}\` for the component to be accessible for screen reader users.
2314
+
2315
+ If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component.
2316
+
2317
+ For more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;
2318
+ React27.useEffect(() => {
2319
+ if (titleId) {
2320
+ const hasTitle = document.getElementById(titleId);
2321
+ if (!hasTitle) console.error(MESSAGE);
2322
+ }
2323
+ }, [MESSAGE, titleId]);
2324
+ return null;
2325
+ };
2326
+ var DESCRIPTION_WARNING_NAME = "DialogDescriptionWarning";
2327
+ var DescriptionWarning = ({ contentRef, descriptionId }) => {
2328
+ const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);
2329
+ const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${descriptionWarningContext.contentName}}.`;
2330
+ React27.useEffect(() => {
2331
+ const describedById = contentRef.current?.getAttribute("aria-describedby");
2332
+ if (descriptionId && describedById) {
2333
+ const hasDescription = document.getElementById(descriptionId);
2334
+ if (!hasDescription) console.warn(MESSAGE);
2335
+ }
2336
+ }, [MESSAGE, contentRef, descriptionId]);
2337
+ return null;
2338
+ };
2339
+ var Root = Dialog;
2340
+ var Trigger = DialogTrigger;
2341
+ var Portal2 = DialogPortal;
2342
+ var Overlay = DialogOverlay;
2343
+ var Content = DialogContent;
2344
+ var Title = DialogTitle;
2345
+ var Description = DialogDescription;
2346
+ var Close = DialogClose;
2347
+
2348
+ // src/components/ui/dialog.tsx
2349
+ var import_lucide_react = require("lucide-react");
2350
+ var import_jsx_runtime12 = require("react/jsx-runtime");
2351
+ var Dialog2 = Root;
2352
+ var DialogTrigger2 = Trigger;
2353
+ var DialogPortal2 = Portal2;
2354
+ var DialogOverlay2 = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2355
+ Overlay,
2356
+ {
2357
+ ref,
2358
+ className: cn(
2359
+ "fixed inset-0 z-50 bg-black/60 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0",
2360
+ className
2361
+ ),
2362
+ ...props
2363
+ }
2364
+ ));
2365
+ DialogOverlay2.displayName = Overlay.displayName;
2366
+ var DialogContent2 = React28.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(DialogPortal2, { children: [
2367
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DialogOverlay2, {}),
2368
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
2369
+ Content,
2370
+ {
2371
+ ref,
2372
+ className: cn(
2373
+ "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-6 rounded-xl border border-border bg-popover p-6 shadow-xl duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:zoom-out-95",
2374
+ className
2375
+ ),
2376
+ ...props,
2377
+ children: [
2378
+ children,
2379
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Close, { className: "absolute right-3 top-3 rounded-full p-2 text-muted-foreground transition hover:bg-secondary hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", children: [
2380
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react.X, { className: "h-4 w-4" }),
2381
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "sr-only", children: "Close" })
2382
+ ] })
2383
+ ]
2384
+ }
2385
+ )
2386
+ ] }));
2387
+ DialogContent2.displayName = Content.displayName;
2388
+ var DialogHeader = ({
2389
+ className,
2390
+ ...props
2391
+ }) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2392
+ "div",
2393
+ {
2394
+ className: cn(
2395
+ "flex flex-col space-y-1.5 text-left",
2396
+ className
2397
+ ),
2398
+ ...props
2399
+ }
2400
+ );
2401
+ DialogHeader.displayName = "DialogHeader";
2402
+ var DialogTitle2 = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2403
+ Title,
2404
+ {
2405
+ ref,
2406
+ className: cn("text-lg font-semibold leading-none tracking-tight", className),
2407
+ ...props
2408
+ }
2409
+ ));
2410
+ DialogTitle2.displayName = Title.displayName;
2411
+ var DialogDescription2 = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2412
+ Description,
2413
+ {
2414
+ ref,
2415
+ className: cn("text-sm text-muted-foreground", className),
2416
+ ...props
2417
+ }
2418
+ ));
2419
+ DialogDescription2.displayName = Description.displayName;
2420
+
2421
+ // src/components/ui/command.tsx
2422
+ var import_jsx_runtime13 = require("react/jsx-runtime");
2423
+ var Command = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2424
+ import_cmdk.Command,
2425
+ {
2426
+ ref,
2427
+ className: cn(
2428
+ "flex h-full w-full flex-col rounded-lg bg-popover text-foreground shadow-lg",
2429
+ className
2430
+ ),
2431
+ ...props
2432
+ }
2433
+ ));
2434
+ Command.displayName = import_cmdk.Command.displayName;
2435
+ var CommandDialog = ({ children, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Dialog2, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DialogContent2, { className: "overflow-hidden border border-border/60 bg-popover/95 p-0 shadow-2xl sm:max-w-3xl", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Command, { className: "min-h-[520px] bg-transparent [&_[cmdk-input-wrapper]]:px-4", children }) }) });
2436
+ var CommandInput = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex items-center border-b border-border px-3", "cmdk-input-wrapper": "", children: [
2437
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react2.Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
2438
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2439
+ import_cmdk.Command.Input,
2440
+ {
2441
+ ref,
2442
+ className: cn(
2443
+ "flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground",
2444
+ className
2445
+ ),
2446
+ ...props
2447
+ }
2448
+ )
2449
+ ] }));
2450
+ CommandInput.displayName = import_cmdk.Command.Input.displayName;
2451
+ var CommandList = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2452
+ import_cmdk.Command.List,
2453
+ {
2454
+ ref,
2455
+ className: cn("max-h-[520px] overflow-y-auto", className),
2456
+ ...props
2457
+ }
2458
+ ));
2459
+ CommandList.displayName = import_cmdk.Command.List.displayName;
2460
+ var CommandEmpty = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2461
+ import_cmdk.Command.Empty,
2462
+ {
2463
+ ref,
2464
+ className: cn("py-6 text-center text-sm text-muted-foreground", className),
2465
+ ...props
2466
+ }
2467
+ ));
2468
+ CommandEmpty.displayName = import_cmdk.Command.Empty.displayName;
2469
+ var CommandGroup = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2470
+ import_cmdk.Command.Group,
2471
+ {
2472
+ ref,
2473
+ className: cn(
2474
+ "px-3 py-4 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-semibold [&_[cmdk-group-heading]]:text-muted-foreground",
2475
+ className
2476
+ ),
2477
+ ...props
2478
+ }
2479
+ ));
2480
+ CommandGroup.displayName = import_cmdk.Command.Group.displayName;
2481
+ var CommandItem = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2482
+ import_cmdk.Command.Item,
2483
+ {
2484
+ ref,
2485
+ className: cn(
2486
+ "flex cursor-pointer select-none items-center rounded-md px-2 py-2 text-sm transition hover:bg-secondary hover:text-secondary-foreground aria-selected:bg-secondary",
2487
+ className
2488
+ ),
2489
+ ...props
2490
+ }
2491
+ ));
2492
+ CommandItem.displayName = import_cmdk.Command.Item.displayName;
2493
+ var CommandSeparator = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2494
+ import_cmdk.Command.Separator,
2495
+ {
2496
+ ref,
2497
+ className: cn("-mx-1 my-1 h-px bg-border", className),
2498
+ ...props
2499
+ }
2500
+ ));
2501
+ CommandSeparator.displayName = import_cmdk.Command.Separator.displayName;
2502
+ var CommandShortcut = ({
2503
+ className,
2504
+ ...props
2505
+ }) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2506
+ "span",
2507
+ {
2508
+ className: cn("ml-auto text-xs tracking-wide text-muted-foreground", className),
2509
+ ...props
2510
+ }
2511
+ );
2512
+ CommandShortcut.displayName = "CommandShortcut";
2513
+
2514
+ // src/components/ui/dropdown-menu.tsx
2515
+ var React30 = __toESM(require("react"), 1);
2516
+ var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"), 1);
2517
+ var import_lucide_react3 = require("lucide-react");
2518
+ var import_jsx_runtime14 = require("react/jsx-runtime");
2519
+ var DropdownMenu = DropdownMenuPrimitive.Root;
2520
+ var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
2521
+ var DropdownMenuGroup = DropdownMenuPrimitive.Group;
2522
+ var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
2523
+ var DropdownMenuSub = DropdownMenuPrimitive.Sub;
2524
+ var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
2525
+ var DropdownMenuSubTrigger = React30.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
2526
+ DropdownMenuPrimitive.SubTrigger,
2527
+ {
2528
+ ref,
2529
+ className: cn(
2530
+ "flex cursor-pointer select-none items-center rounded-md px-2 py-1.5 text-sm outline-none focus:bg-secondary",
2531
+ inset && "pl-8",
2532
+ className
2533
+ ),
2534
+ ...props,
2535
+ children: [
2536
+ children,
2537
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react3.ChevronRight, { className: "ml-auto h-4 w-4" })
2538
+ ]
2539
+ }
2540
+ ));
2541
+ DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
2542
+ var DropdownMenuSubContent = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2543
+ DropdownMenuPrimitive.SubContent,
2544
+ {
2545
+ ref,
2546
+ className: cn(
2547
+ "z-50 min-w-[8rem] overflow-hidden rounded-lg border border-border bg-popover p-1 text-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out",
2548
+ className
2549
+ ),
2550
+ ...props
2551
+ }
2552
+ ));
2553
+ DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
2554
+ var DropdownMenuContent = React30.forwardRef(({ className, sideOffset = 6, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2555
+ DropdownMenuPrimitive.Content,
2556
+ {
2557
+ ref,
2558
+ sideOffset,
2559
+ className: cn(
2560
+ "z-50 min-w-[10rem] overflow-hidden rounded-lg border border-border bg-popover p-1 text-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out",
2561
+ className
2562
+ ),
2563
+ ...props
2564
+ }
2565
+ ) }));
2566
+ DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
2567
+ var DropdownMenuItem = React30.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2568
+ DropdownMenuPrimitive.Item,
2569
+ {
2570
+ ref,
2571
+ className: cn(
2572
+ "relative flex cursor-pointer select-none items-center rounded-md px-2 py-1.5 text-sm outline-none transition focus:bg-secondary focus:text-secondary-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
2573
+ inset && "pl-8",
2574
+ className
2575
+ ),
2576
+ ...props
2577
+ }
2578
+ ));
2579
+ DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
2580
+ var DropdownMenuCheckboxItem = React30.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
2581
+ DropdownMenuPrimitive.CheckboxItem,
2582
+ {
2583
+ ref,
2584
+ className: cn(
2585
+ "relative flex cursor-pointer select-none items-center rounded-md py-1.5 pl-8 pr-2 text-sm outline-none transition focus:bg-secondary focus:text-secondary-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
2586
+ className
2587
+ ),
2588
+ checked,
2589
+ ...props,
2590
+ children: [
2591
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react3.Check, { className: "h-4 w-4" }) }) }),
2592
+ children
2593
+ ]
2594
+ }
2595
+ ));
2596
+ DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
2597
+ var DropdownMenuRadioItem = React30.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
2598
+ DropdownMenuPrimitive.RadioItem,
2599
+ {
2600
+ ref,
2601
+ className: cn(
2602
+ "relative flex cursor-pointer select-none items-center rounded-md py-1.5 pl-8 pr-2 text-sm outline-none transition focus:bg-secondary focus:text-secondary-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
2603
+ className
2604
+ ),
2605
+ ...props,
2606
+ children: [
2607
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react3.Circle, { className: "h-2 w-2 fill-current" }) }) }),
2608
+ children
2609
+ ]
2610
+ }
2611
+ ));
2612
+ DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
2613
+ var DropdownMenuLabel = React30.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2614
+ DropdownMenuPrimitive.Label,
2615
+ {
2616
+ ref,
2617
+ className: cn(
2618
+ "px-2 py-1.5 text-sm font-semibold text-muted-foreground",
2619
+ inset && "pl-8",
2620
+ className
2621
+ ),
2622
+ ...props
2623
+ }
2624
+ ));
2625
+ DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
2626
+ var DropdownMenuSeparator = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2627
+ DropdownMenuPrimitive.Separator,
2628
+ {
2629
+ ref,
2630
+ className: cn("-mx-1 my-1 h-px bg-border", className),
2631
+ ...props
2632
+ }
2633
+ ));
2634
+ DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
2635
+ var DropdownMenuShortcut = ({
2636
+ className,
2637
+ ...props
2638
+ }) => {
2639
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2640
+ "span",
2641
+ {
2642
+ className: cn("ml-auto text-xs tracking-wide text-muted-foreground", className),
2643
+ ...props
2644
+ }
2645
+ );
2646
+ };
2647
+ DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
2648
+
2649
+ // src/components/ui/input.tsx
2650
+ var React31 = __toESM(require("react"), 1);
2651
+ var import_jsx_runtime15 = require("react/jsx-runtime");
2652
+ var Input = React31.forwardRef(
2653
+ ({ className, type, ...props }, ref) => {
2654
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2655
+ "input",
2656
+ {
2657
+ type,
2658
+ className: cn(
2659
+ "flex h-10 w-full rounded-lg border border-input bg-transparent px-3 py-2 text-sm shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
2660
+ className
2661
+ ),
2662
+ ref,
2663
+ ...props
2664
+ }
2665
+ );
2666
+ }
2667
+ );
2668
+ Input.displayName = "Input";
2669
+
2670
+ // src/components/ui/select.tsx
2671
+ var React32 = __toESM(require("react"), 1);
2672
+ var SelectPrimitive = __toESM(require("@radix-ui/react-select"), 1);
2673
+ var import_lucide_react4 = require("lucide-react");
2674
+ var import_jsx_runtime16 = require("react/jsx-runtime");
2675
+ var Select = SelectPrimitive.Root;
2676
+ var SelectGroup = SelectPrimitive.Group;
2677
+ var SelectValue = SelectPrimitive.Value;
2678
+ var SelectTrigger = React32.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
2679
+ SelectPrimitive.Trigger,
2680
+ {
2681
+ ref,
2682
+ className: cn(
2683
+ "inline-flex h-10 w-full items-center justify-between gap-2 rounded-lg border border-input bg-black/10 px-3 text-sm font-medium shadow-sm transition focus:outline-none focus:ring-2 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
2684
+ className
2685
+ ),
2686
+ ...props,
2687
+ children: [
2688
+ children,
2689
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react4.ChevronDown, { className: "h-4 w-4 opacity-70" }) })
2690
+ ]
2691
+ }
2692
+ ));
2693
+ SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
2694
+ var SelectContent = React32.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(SelectPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
2695
+ SelectPrimitive.Content,
2696
+ {
2697
+ ref,
2698
+ className: cn(
2699
+ "relative z-50 min-w-[10rem] overflow-hidden rounded-lg border border-border bg-popover text-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out",
2700
+ position === "popper" && "translate-y-1",
2701
+ className
2702
+ ),
2703
+ position,
2704
+ ...props,
2705
+ children: [
2706
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(SelectPrimitive.ScrollUpButton, { className: "flex items-center justify-center py-1", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react4.ChevronUp, { className: "h-4 w-4" }) }),
2707
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(SelectPrimitive.Viewport, { className: "p-1", children }),
2708
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(SelectPrimitive.ScrollDownButton, { className: "flex items-center justify-center py-1", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react4.ChevronDown, { className: "h-4 w-4" }) })
2709
+ ]
2710
+ }
2711
+ ) }));
2712
+ SelectContent.displayName = SelectPrimitive.Content.displayName;
2713
+ var SelectItem = React32.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
2714
+ SelectPrimitive.Item,
2715
+ {
2716
+ ref,
2717
+ className: cn(
2718
+ "relative flex w-full cursor-pointer select-none items-center rounded-md px-3 py-2 pl-9 text-sm outline-none focus:bg-secondary focus:text-secondary-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
2719
+ className
2720
+ ),
2721
+ ...props,
2722
+ children: [
2723
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "absolute left-3 inline-flex", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react4.Check, { className: "h-4 w-4" }) }) }),
2724
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(SelectPrimitive.ItemText, { children })
2725
+ ]
2726
+ }
2727
+ ));
2728
+ SelectItem.displayName = SelectPrimitive.Item.displayName;
2729
+
2730
+ // src/components/ui/sonner.tsx
2731
+ var import_sonner = require("sonner");
2732
+ var Toaster = import_sonner.Toaster;
2733
+
2734
+ // src/components/ui/table.tsx
2735
+ var React33 = __toESM(require("react"), 1);
2736
+ var import_jsx_runtime17 = require("react/jsx-runtime");
2737
+ var Table = React33.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2738
+ "table",
2739
+ {
2740
+ ref,
2741
+ className: cn("w-full caption-bottom text-sm", className),
2742
+ ...props
2743
+ }
2744
+ ));
2745
+ Table.displayName = "Table";
2746
+ var TableHeader = React33.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("thead", { ref, className: cn("[&_tr]:border-b border-border/60", className), ...props }));
2747
+ TableHeader.displayName = "TableHeader";
2748
+ var TableBody = React33.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("tbody", { ref, className: cn("[&_tr:last-child]:border-0", className), ...props }));
2749
+ TableBody.displayName = "TableBody";
2750
+ var TableRow = React33.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2751
+ "tr",
2752
+ {
2753
+ ref,
2754
+ className: cn(
2755
+ "border-b border-border/50 transition-colors hover:bg-secondary/40 data-[state=selected]:bg-secondary",
2756
+ className
2757
+ ),
2758
+ ...props
2759
+ }
2760
+ ));
2761
+ TableRow.displayName = "TableRow";
2762
+ var TableHead = React33.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2763
+ "th",
2764
+ {
2765
+ ref,
2766
+ className: cn(
2767
+ "h-11 px-4 text-left align-middle text-xs font-semibold text-muted-foreground",
2768
+ className
2769
+ ),
2770
+ ...props
2771
+ }
2772
+ ));
2773
+ TableHead.displayName = "TableHead";
2774
+ var TableCell = React33.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2775
+ "td",
2776
+ {
2777
+ ref,
2778
+ className: cn("p-4 align-middle text-sm text-foreground/90", className),
2779
+ ...props
2780
+ }
2781
+ ));
2782
+ TableCell.displayName = "TableCell";
2783
+
2784
+ // src/components/ui/textarea.tsx
2785
+ var React34 = __toESM(require("react"), 1);
2786
+ var import_jsx_runtime18 = require("react/jsx-runtime");
2787
+ var Textarea = React34.forwardRef(
2788
+ ({ className, ...props }, ref) => {
2789
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
2790
+ "textarea",
2791
+ {
2792
+ className: cn(
2793
+ "flex min-h-[120px] w-full rounded-lg border border-input bg-transparent px-3 py-2 text-sm shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
2794
+ className
2795
+ ),
2796
+ ref,
2797
+ ...props
2798
+ }
2799
+ );
2800
+ }
2801
+ );
2802
+ Textarea.displayName = "Textarea";
2803
+ // Annotate the CommonJS export names for ESM import in node:
2804
+ 0 && (module.exports = {
2805
+ Alert,
2806
+ AlertDescription,
2807
+ AlertTitle,
2808
+ Badge,
2809
+ Button,
2810
+ Card,
2811
+ CardContent,
2812
+ CardDescription,
2813
+ CardFooter,
2814
+ CardHeader,
2815
+ CardTitle,
2816
+ Command,
2817
+ CommandDialog,
2818
+ CommandEmpty,
2819
+ CommandGroup,
2820
+ CommandInput,
2821
+ CommandItem,
2822
+ CommandList,
2823
+ CommandSeparator,
2824
+ CommandShortcut,
2825
+ Dialog,
2826
+ DialogContent,
2827
+ DialogDescription,
2828
+ DialogHeader,
2829
+ DialogTitle,
2830
+ DialogTrigger,
2831
+ DropdownMenu,
2832
+ DropdownMenuCheckboxItem,
2833
+ DropdownMenuContent,
2834
+ DropdownMenuGroup,
2835
+ DropdownMenuItem,
2836
+ DropdownMenuLabel,
2837
+ DropdownMenuPortal,
2838
+ DropdownMenuRadioGroup,
2839
+ DropdownMenuRadioItem,
2840
+ DropdownMenuSeparator,
2841
+ DropdownMenuShortcut,
2842
+ DropdownMenuSub,
2843
+ DropdownMenuSubContent,
2844
+ DropdownMenuSubTrigger,
2845
+ DropdownMenuTrigger,
2846
+ Input,
2847
+ Select,
2848
+ SelectContent,
2849
+ SelectGroup,
2850
+ SelectItem,
2851
+ SelectTrigger,
2852
+ SelectValue,
2853
+ Table,
2854
+ TableBody,
2855
+ TableCell,
2856
+ TableHead,
2857
+ TableHeader,
2858
+ TableRow,
2859
+ Textarea,
2860
+ Toaster,
2861
+ buttonVariants,
2862
+ cn
2863
+ });
2864
+ //# sourceMappingURL=index.cjs.map