@keslers/kui 1.1.1 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,2261 +1,48 @@
1
- import { useState as Mi } from "react";
2
- import "react";
3
- import { cva as Yr } from "class-variance-authority";
4
- import { NavigationMenu as nt } from "radix-ui";
5
- import { clsx as $r } from "clsx";
6
- import { twMerge as Kr } from "tailwind-merge";
7
- function b(...t) {
8
- return Kr($r(t));
9
- }
10
- import { ChevronDownIcon as Zi } from "lucide-react";
11
- import { jsx as Q, jsxs as qr } from "react/jsx-runtime";
12
- function fe({ className: t, children: e, viewport: r = !0, ...o }) {
13
- return qr(nt.Root, {
14
- "data-slot": "navigation-menu",
15
- "data-viewport": r,
16
- className: b(
17
- "kui:group/navigation-menu kui:relative kui:flex kui:max-w-max kui:flex-1 kui:items-center kui:justify-center",
18
- t,
19
- ),
20
- ...o,
21
- children: [e, r && Q(Xr, {})],
22
- });
23
- }
24
- function ke({ className: t, ...e }) {
25
- return Q(nt.List, {
26
- "data-slot": "navigation-menu-list",
27
- className: b(
28
- "kui:group kui:flex kui:flex-1 kui:list-none kui:items-center kui:justify-center kui:gap-0",
29
- t,
30
- ),
31
- ...e,
32
- });
33
- }
34
- function xe({ className: t, ...e }) {
35
- return Q(nt.Item, {
36
- "data-slot": "navigation-menu-item",
37
- className: b("kui:relative", t),
38
- ...e,
39
- });
40
- }
41
- var ve = Yr(
42
- "kui:group/navigation-menu-trigger kui:inline-flex kui:h-9 kui:w-max kui:items-center kui:justify-center kui:rounded-lg kui:bg-background kui:px-2.5 kui:py-1.5 kui:text-sm kui:font-medium kui:transition-all kui:outline-none kui:hover:bg-muted kui:focus:bg-muted kui:focus-visible:ring-3 kui:focus-visible:ring-ring/50 kui:focus-visible:outline-1 kui:disabled:pointer-events-none kui:disabled:opacity-50 kui:data-popup-open:bg-muted/50 kui:data-popup-open:hover:bg-muted kui:data-open:bg-muted/50 kui:data-open:hover:bg-muted kui:data-open:focus:bg-muted",
43
- );
44
- function Xr({ className: t, ...e }) {
45
- return Q("div", {
46
- className: b(
47
- "kui:absolute kui:top-full kui:left-0 kui:isolate kui:z-50 kui:flex kui:justify-center",
48
- ),
49
- children: Q(nt.Viewport, {
50
- "data-slot": "navigation-menu-viewport",
51
- className: b(
52
- "kui:origin-top-center kui:relative kui:mt-1.5 kui:h-(--radix-navigation-menu-viewport-height) kui:w-full kui:overflow-hidden kui:rounded-lg kui:bg-popover kui:text-popover-foreground kui:shadow kui:ring-1 kui:ring-foreground/10 kui:duration-100 kui:md:w-(--radix-navigation-menu-viewport-width) kui:data-open:animate-in kui:data-open:zoom-in-90 kui:data-closed:animate-out kui:data-closed:zoom-out-90",
53
- t,
54
- ),
55
- ...e,
56
- }),
57
- });
58
- }
59
- function ye({ className: t, ...e }) {
60
- return Q(nt.Link, {
61
- "data-slot": "navigation-menu-link",
62
- className: b(
63
- "kui:flex kui:items-center kui:gap-2 kui:rounded-lg kui:p-2 kui:text-sm kui:transition-all kui:outline-none kui:hover:bg-muted kui:focus:bg-muted kui:focus-visible:ring-3 kui:focus-visible:ring-ring/50 kui:focus-visible:outline-1 kui:in-data-[slot=navigation-menu-content]:rounded-md kui:data-active:bg-muted/50 kui:data-active:hover:bg-muted kui:data-active:focus:bg-muted kui:[&_svg:not([class*='size-']):not([class*='h-']):not([class*='w-'])]:size-4",
64
- t,
65
- ),
66
- ...e,
67
- });
68
- }
69
- import "react";
70
- import { cva as Zr } from "class-variance-authority";
71
- import { Slot as Qr } from "radix-ui";
72
- import { jsx as to } from "react/jsx-runtime";
73
- var Jr = Zr(
74
- "kui:group/button kui:shrink-0 kui:items-center kui:justify-center kui:rounded-lg kui:border kui:border-transparent kui:bg-clip-padding kui:text-sm kui:font-medium kui:whitespace-nowrap kui:transition-all kui:outline-none kui:select-none kui:focus-visible:border-ring kui:focus-visible:ring-3 kui:focus-visible:ring-ring/50 kui:active:translate-y-px kui:disabled:pointer-events-none kui:disabled:opacity-50 kui:aria-invalid:border-destructive kui:aria-invalid:ring-3 kui:aria-invalid:ring-destructive/20 kui:dark:aria-invalid:border-destructive/50 kui:dark:aria-invalid:ring-destructive/40 kui:[&_svg]:pointer-events-none kui:[&_svg]:shrink-0 kui:[&_svg:not([class*='size-'])]:size-4",
75
- {
76
- variants: {
77
- variant: {
78
- default:
79
- "kui:bg-primary kui:text-primary-foreground kui:[a]:hover:bg-primary/80",
80
- outline:
81
- "kui:border-border kui:bg-background kui:hover:bg-muted kui:hover:text-foreground kui:aria-expanded:bg-muted kui:aria-expanded:text-foreground kui:dark:border-input kui:dark:bg-input/30 kui:dark:hover:bg-input/50",
82
- secondary:
83
- "kui:bg-secondary kui:text-secondary-foreground kui:hover:bg-secondary/80 kui:aria-expanded:bg-secondary kui:aria-expanded:text-secondary-foreground",
84
- ghost:
85
- "kui:hover:bg-muted kui:hover:text-foreground kui:aria-expanded:bg-muted kui:aria-expanded:text-foreground kui:dark:hover:bg-muted/50",
86
- destructive:
87
- "kui:bg-destructive/10 kui:text-destructive kui:hover:bg-destructive/20 kui:focus-visible:border-destructive/40 kui:focus-visible:ring-destructive/20 kui:dark:bg-destructive/20 kui:dark:hover:bg-destructive/30 kui:dark:focus-visible:ring-destructive/40",
88
- link: "kui:text-primary kui:underline-offset-4 kui:hover:underline",
89
- },
90
- size: {
91
- default:
92
- "kui:h-8 kui:gap-1.5 kui:px-2.5 kui:has-data-[icon=inline-end]:pr-2 kui:has-data-[icon=inline-start]:pl-2",
93
- xs: "kui:h-6 kui:gap-1 kui:rounded-[min(var(--radius-md),10px)] kui:px-2 kui:text-xs kui:in-data-[slot=button-group]:rounded-lg kui:has-data-[icon=inline-end]:pr-1.5 kui:has-data-[icon=inline-start]:pl-1.5 kui:[&_svg:not([class*='size-'])]:size-3",
94
- sm: "kui:h-7 kui:gap-1 kui:rounded-[min(var(--radius-md),12px)] kui:px-2.5 kui:text-[0.8rem] kui:in-data-[slot=button-group]:rounded-lg kui:has-data-[icon=inline-end]:pr-1.5 kui:has-data-[icon=inline-start]:pl-1.5 kui:[&_svg:not([class*='size-'])]:size-3.5",
95
- lg: "kui:h-9 kui:gap-1.5 kui:px-2.5 kui:has-data-[icon=inline-end]:pr-3 kui:has-data-[icon=inline-start]:pl-3",
96
- icon: "kui:size-8",
97
- "icon-xs":
98
- "kui:size-6 kui:rounded-[min(var(--radius-md),10px)] kui:in-data-[slot=button-group]:rounded-lg kui:[&_svg:not([class*='size-'])]:size-3",
99
- "icon-sm":
100
- "kui:size-7 kui:rounded-[min(var(--radius-md),12px)] kui:in-data-[slot=button-group]:rounded-lg",
101
- "icon-lg": "kui:size-9",
102
- },
103
- },
104
- defaultVariants: { variant: "default", size: "default" },
105
- },
106
- );
107
- function me({
108
- className: t,
109
- variant: e = "default",
110
- size: r = "default",
111
- asChild: o = !1,
112
- ...i
113
- }) {
114
- let n = o ? Qr.Root : "button";
115
- return to(n, {
116
- "data-slot": "button",
117
- "data-variant": e,
118
- "data-size": r,
119
- className: b(Jr({ variant: e, size: r, className: t })),
120
- ...i,
121
- });
122
- }
123
- import * as ut from "react";
124
- import * as v from "react";
125
- var cn = !!(
126
- typeof window < "u" &&
127
- window.document &&
128
- window.document.createElement
129
- );
130
- function _(t, e, { checkForDefaultPrevented: r = !0 } = {}) {
131
- return function (i) {
132
- if ((t?.(i), r === !1 || !i.defaultPrevented)) return e?.(i);
133
- };
134
- }
135
- import * as we from "react";
136
- function Le(t, e) {
137
- if (typeof t == "function") return t(e);
138
- t != null && (t.current = e);
139
- }
140
- function Wt(...t) {
141
- return (e) => {
142
- let r = !1,
143
- o = t.map((i) => {
144
- let n = Le(i, e);
145
- return !r && typeof n == "function" && (r = !0), n;
146
- });
147
- if (r)
148
- return () => {
149
- for (let i = 0; i < o.length; i++) {
150
- let n = o[i];
151
- typeof n == "function" ? n() : Le(t[i], null);
152
- }
153
- };
154
- };
155
- }
156
- function I(...t) {
157
- return we.useCallback(Wt(...t), t);
158
- }
159
- import * as A from "react";
160
- import { jsx as Ce } from "react/jsx-runtime";
161
- function be(t, e) {
162
- let r = A.createContext(e),
163
- o = (n) => {
164
- let { children: c, ...a } = n,
165
- l = A.useMemo(() => a, Object.values(a));
166
- return Ce(r.Provider, { value: l, children: c });
167
- };
168
- o.displayName = t + "Provider";
169
- function i(n) {
170
- let c = A.useContext(r);
171
- if (c) return c;
172
- if (e !== void 0) return e;
173
- throw new Error(`\`${n}\` must be used within \`${t}\``);
174
- }
175
- return [o, i];
176
- }
177
- function Re(t, e = []) {
178
- let r = [];
179
- function o(n, c) {
180
- let a = A.createContext(c),
181
- l = r.length;
182
- r = [...r, c];
183
- let s = (h) => {
184
- let { scope: p, children: g, ...w } = h,
185
- u = p?.[t]?.[l] || a,
186
- f = A.useMemo(() => w, Object.values(w));
187
- return Ce(u.Provider, { value: f, children: g });
188
- };
189
- s.displayName = n + "Provider";
190
- function d(h, p) {
191
- let g = p?.[t]?.[l] || a,
192
- w = A.useContext(g);
193
- if (w) return w;
194
- if (c !== void 0) return c;
195
- throw new Error(`\`${h}\` must be used within \`${n}\``);
196
- }
197
- return [s, d];
198
- }
199
- let i = () => {
200
- let n = r.map((c) => A.createContext(c));
201
- return function (a) {
202
- let l = a?.[t] || n;
203
- return A.useMemo(() => ({ [`__scope${t}`]: { ...a, [t]: l } }), [a, l]);
204
- };
205
- };
206
- return (i.scopeName = t), [o, eo(i, ...e)];
207
- }
208
- function eo(...t) {
209
- let e = t[0];
210
- if (t.length === 1) return e;
211
- let r = () => {
212
- let o = t.map((i) => ({ useScope: i(), scopeName: i.scopeName }));
213
- return function (n) {
214
- let c = o.reduce((a, { useScope: l, scopeName: s }) => {
215
- let h = l(n)[`__scope${s}`];
216
- return { ...a, ...h };
217
- }, {});
218
- return A.useMemo(() => ({ [`__scope${e.scopeName}`]: c }), [c]);
219
- };
220
- };
221
- return (r.scopeName = e.scopeName), r;
222
- }
223
- import * as Et from "react";
224
- import * as Me from "react";
225
- var V = globalThis?.document ? Me.useLayoutEffect : () => {};
226
- var ro = Et[" useId ".trim().toString()] || (() => {}),
227
- oo = 0;
228
- function gt(t) {
229
- let [e, r] = Et.useState(ro());
230
- return (
231
- V(() => {
232
- t || r((o) => o ?? String(oo++));
233
- }, [t]),
234
- t || (e ? `radix-${e}` : "")
235
- );
236
- }
237
- import * as O from "react";
238
- import * as ft from "react";
239
- var io = O[" useInsertionEffect ".trim().toString()] || V;
240
- function je({ prop: t, defaultProp: e, onChange: r = () => {}, caller: o }) {
241
- let [i, n, c] = no({ defaultProp: e, onChange: r }),
242
- a = t !== void 0,
243
- l = a ? t : i;
244
- {
245
- let d = O.useRef(t !== void 0);
246
- O.useEffect(() => {
247
- let h = d.current;
248
- h !== a &&
249
- console.warn(
250
- `${o} is changing from ${h ? "controlled" : "uncontrolled"} to ${a ? "controlled" : "uncontrolled"}. 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.`,
251
- ),
252
- (d.current = a);
253
- }, [a, o]);
254
- }
255
- let s = O.useCallback(
256
- (d) => {
257
- if (a) {
258
- let h = ao(d) ? d(t) : d;
259
- h !== t && c.current?.(h);
260
- } else n(d);
261
- },
262
- [a, t, n, c],
263
- );
264
- return [l, s];
265
- }
266
- function no({ defaultProp: t, onChange: e }) {
267
- let [r, o] = O.useState(t),
268
- i = O.useRef(r),
269
- n = O.useRef(e);
270
- return (
271
- io(() => {
272
- n.current = e;
273
- }, [e]),
274
- O.useEffect(() => {
275
- i.current !== r && (n.current?.(r), (i.current = r));
276
- }, [r, i]),
277
- [r, o, n]
278
- );
279
- }
280
- function ao(t) {
281
- return typeof t == "function";
282
- }
283
- import * as L from "react";
284
- import * as Se from "react";
285
- import * as Be from "react-dom";
286
- import * as F from "react";
287
- import { Fragment as yn, jsx as Fe } from "react/jsx-runtime";
288
- function kt(t) {
289
- let e = co(t),
290
- r = F.forwardRef((o, i) => {
291
- let { children: n, ...c } = o,
292
- a = F.Children.toArray(n),
293
- l = a.find(so);
294
- if (l) {
295
- let s = l.props.children,
296
- d = a.map((h) =>
297
- h === l
298
- ? F.Children.count(s) > 1
299
- ? F.Children.only(null)
300
- : F.isValidElement(s)
301
- ? s.props.children
302
- : null
303
- : h,
304
- );
305
- return Fe(e, {
306
- ...c,
307
- ref: i,
308
- children: F.isValidElement(s) ? F.cloneElement(s, void 0, d) : null,
309
- });
310
- }
311
- return Fe(e, { ...c, ref: i, children: n });
312
- });
313
- return (r.displayName = `${t}.Slot`), r;
314
- }
315
- function co(t) {
316
- let e = F.forwardRef((r, o) => {
317
- let { children: i, ...n } = r;
318
- if (F.isValidElement(i)) {
319
- let c = ho(i),
320
- a = uo(n, i.props);
321
- return (
322
- i.type !== F.Fragment && (a.ref = o ? Wt(o, c) : c),
323
- F.cloneElement(i, a)
324
- );
325
- }
326
- return F.Children.count(i) > 1 ? F.Children.only(null) : null;
327
- });
328
- return (e.displayName = `${t}.SlotClone`), e;
329
- }
330
- var lo = Symbol("radix.slottable");
331
- function so(t) {
332
- return (
333
- F.isValidElement(t) &&
334
- typeof t.type == "function" &&
335
- "__radixId" in t.type &&
336
- t.type.__radixId === lo
337
- );
338
- }
339
- function uo(t, e) {
340
- let r = { ...e };
341
- for (let o in e) {
342
- let i = t[o],
343
- n = e[o];
344
- /^on[A-Z]/.test(o)
345
- ? i && n
346
- ? (r[o] = (...a) => {
347
- let l = n(...a);
348
- return i(...a), l;
349
- })
350
- : i && (r[o] = i)
351
- : o === "style"
352
- ? (r[o] = { ...i, ...n })
353
- : o === "className" && (r[o] = [i, n].filter(Boolean).join(" "));
354
- }
355
- return { ...t, ...r };
356
- }
357
- function ho(t) {
358
- let e = Object.getOwnPropertyDescriptor(t.props, "ref")?.get,
359
- r = e && "isReactWarning" in e && e.isReactWarning;
360
- return r
361
- ? t.ref
362
- : ((e = Object.getOwnPropertyDescriptor(t, "ref")?.get),
363
- (r = e && "isReactWarning" in e && e.isReactWarning),
364
- r ? t.props.ref : t.props.ref || t.ref);
365
- }
366
- import { jsx as po } from "react/jsx-runtime";
367
- var go = [
368
- "a",
369
- "button",
370
- "div",
371
- "form",
372
- "h2",
373
- "h3",
374
- "img",
375
- "input",
376
- "label",
377
- "li",
378
- "nav",
379
- "ol",
380
- "p",
381
- "select",
382
- "span",
383
- "svg",
384
- "ul",
385
- ],
386
- N = go.reduce((t, e) => {
387
- let r = kt(`Primitive.${e}`),
388
- o = Se.forwardRef((i, n) => {
389
- let { asChild: c, ...a } = i,
390
- l = c ? r : e;
391
- return (
392
- typeof window < "u" && (window[Symbol.for("radix-ui")] = !0),
393
- po(l, { ...a, ref: n })
394
- );
395
- });
396
- return (o.displayName = `Primitive.${e}`), { ...t, [e]: o };
397
- }, {});
398
- function We(t, e) {
399
- t && Be.flushSync(() => t.dispatchEvent(e));
400
- }
401
- import * as J from "react";
402
- function U(t) {
403
- let e = J.useRef(t);
404
- return (
405
- J.useEffect(() => {
406
- e.current = t;
407
- }),
408
- J.useMemo(
409
- () =>
410
- (...r) =>
411
- e.current?.(...r),
412
- [],
413
- )
414
- );
415
- }
416
- import * as Ee from "react";
417
- function Pe(t, e = globalThis?.document) {
418
- let r = U(t);
419
- Ee.useEffect(() => {
420
- let o = (i) => {
421
- i.key === "Escape" && r(i);
422
- };
423
- return (
424
- e.addEventListener("keydown", o, { capture: !0 }),
425
- () => e.removeEventListener("keydown", o, { capture: !0 })
426
- );
427
- }, [r, e]);
428
- }
429
- import { jsx as Oe } from "react/jsx-runtime";
430
- var fo = "DismissableLayer",
431
- Pt = "dismissableLayer.update",
432
- ko = "dismissableLayer.pointerDownOutside",
433
- xo = "dismissableLayer.focusOutside",
434
- Ne,
435
- Te = L.createContext({
436
- layers: new Set(),
437
- layersWithOutsidePointerEventsDisabled: new Set(),
438
- branches: new Set(),
439
- }),
440
- Nt = L.forwardRef((t, e) => {
441
- let {
442
- disableOutsidePointerEvents: r = !1,
443
- onEscapeKeyDown: o,
444
- onPointerDownOutside: i,
445
- onFocusOutside: n,
446
- onInteractOutside: c,
447
- onDismiss: a,
448
- ...l
449
- } = t,
450
- s = L.useContext(Te),
451
- [d, h] = L.useState(null),
452
- p = d?.ownerDocument ?? globalThis?.document,
453
- [, g] = L.useState({}),
454
- w = I(e, (k) => h(k)),
455
- u = Array.from(s.layers),
456
- [f] = [...s.layersWithOutsidePointerEventsDisabled].slice(-1),
457
- x = u.indexOf(f),
458
- y = d ? u.indexOf(d) : -1,
459
- C = s.layersWithOutsidePointerEventsDisabled.size > 0,
460
- j = y >= x,
461
- M = mo((k) => {
462
- let H = k.target,
463
- Z = [...s.branches].some((it) => it.contains(H));
464
- !j || Z || (i?.(k), c?.(k), k.defaultPrevented || a?.());
465
- }, p),
466
- B = Lo((k) => {
467
- let H = k.target;
468
- [...s.branches].some((it) => it.contains(H)) ||
469
- (n?.(k), c?.(k), k.defaultPrevented || a?.());
470
- }, p);
471
- return (
472
- Pe((k) => {
473
- y === s.layers.size - 1 &&
474
- (o?.(k), !k.defaultPrevented && a && (k.preventDefault(), a()));
475
- }, p),
476
- L.useEffect(() => {
477
- if (d)
478
- return (
479
- r &&
480
- (s.layersWithOutsidePointerEventsDisabled.size === 0 &&
481
- ((Ne = p.body.style.pointerEvents),
482
- (p.body.style.pointerEvents = "none")),
483
- s.layersWithOutsidePointerEventsDisabled.add(d)),
484
- s.layers.add(d),
485
- Ae(),
486
- () => {
487
- r &&
488
- s.layersWithOutsidePointerEventsDisabled.size === 1 &&
489
- (p.body.style.pointerEvents = Ne);
490
- }
491
- );
492
- }, [d, p, r, s]),
493
- L.useEffect(
494
- () => () => {
495
- d &&
496
- (s.layers.delete(d),
497
- s.layersWithOutsidePointerEventsDisabled.delete(d),
498
- Ae());
499
- },
500
- [d, s],
501
- ),
502
- L.useEffect(() => {
503
- let k = () => g({});
504
- return (
505
- document.addEventListener(Pt, k),
506
- () => document.removeEventListener(Pt, k)
507
- );
508
- }, []),
509
- Oe(N.div, {
510
- ...l,
511
- ref: w,
512
- style: {
513
- pointerEvents: C ? (j ? "auto" : "none") : void 0,
514
- ...t.style,
515
- },
516
- onFocusCapture: _(t.onFocusCapture, B.onFocusCapture),
517
- onBlurCapture: _(t.onBlurCapture, B.onBlurCapture),
518
- onPointerDownCapture: _(t.onPointerDownCapture, M.onPointerDownCapture),
519
- })
520
- );
521
- });
522
- Nt.displayName = fo;
523
- var vo = "DismissableLayerBranch",
524
- yo = L.forwardRef((t, e) => {
525
- let r = L.useContext(Te),
526
- o = L.useRef(null),
527
- i = I(e, o);
528
- return (
529
- L.useEffect(() => {
530
- let n = o.current;
531
- if (n)
532
- return (
533
- r.branches.add(n),
534
- () => {
535
- r.branches.delete(n);
536
- }
537
- );
538
- }, [r.branches]),
539
- Oe(N.div, { ...t, ref: i })
540
- );
541
- });
542
- yo.displayName = vo;
543
- function mo(t, e = globalThis?.document) {
544
- let r = U(t),
545
- o = L.useRef(!1),
546
- i = L.useRef(() => {});
547
- return (
548
- L.useEffect(() => {
549
- let n = (a) => {
550
- if (a.target && !o.current) {
551
- let s = function () {
552
- Ie(ko, r, d, { discrete: !0 });
553
- };
554
- var l = s;
555
- let d = { originalEvent: a };
556
- a.pointerType === "touch"
557
- ? (e.removeEventListener("click", i.current),
558
- (i.current = s),
559
- e.addEventListener("click", i.current, { once: !0 }))
560
- : s();
561
- } else e.removeEventListener("click", i.current);
562
- o.current = !1;
563
- },
564
- c = window.setTimeout(() => {
565
- e.addEventListener("pointerdown", n);
566
- }, 0);
567
- return () => {
568
- window.clearTimeout(c),
569
- e.removeEventListener("pointerdown", n),
570
- e.removeEventListener("click", i.current);
571
- };
572
- }, [e, r]),
573
- { onPointerDownCapture: () => (o.current = !0) }
574
- );
575
- }
576
- function Lo(t, e = globalThis?.document) {
577
- let r = U(t),
578
- o = L.useRef(!1);
579
- return (
580
- L.useEffect(() => {
581
- let i = (n) => {
582
- n.target &&
583
- !o.current &&
584
- Ie(xo, r, { originalEvent: n }, { discrete: !1 });
585
- };
586
- return (
587
- e.addEventListener("focusin", i),
588
- () => e.removeEventListener("focusin", i)
589
- );
590
- }, [e, r]),
591
- {
592
- onFocusCapture: () => (o.current = !0),
593
- onBlurCapture: () => (o.current = !1),
594
- }
595
- );
596
- }
597
- function Ae() {
598
- let t = new CustomEvent(Pt);
599
- document.dispatchEvent(t);
600
- }
601
- function Ie(t, e, r, { discrete: o }) {
602
- let i = r.originalEvent.target,
603
- n = new CustomEvent(t, { bubbles: !1, cancelable: !0, detail: r });
604
- e && i.addEventListener(t, e, { once: !0 }),
605
- o ? We(i, n) : i.dispatchEvent(n);
606
- }
607
- import * as T from "react";
608
- import { jsx as wo } from "react/jsx-runtime";
609
- var At = "focusScope.autoFocusOnMount",
610
- Ot = "focusScope.autoFocusOnUnmount",
611
- De = { bubbles: !1, cancelable: !0 },
612
- Co = "FocusScope",
613
- Tt = T.forwardRef((t, e) => {
614
- let {
615
- loop: r = !1,
616
- trapped: o = !1,
617
- onMountAutoFocus: i,
618
- onUnmountAutoFocus: n,
619
- ...c
620
- } = t,
621
- [a, l] = T.useState(null),
622
- s = U(i),
623
- d = U(n),
624
- h = T.useRef(null),
625
- p = I(e, (u) => l(u)),
626
- g = T.useRef({
627
- paused: !1,
628
- pause() {
629
- this.paused = !0;
630
- },
631
- resume() {
632
- this.paused = !1;
633
- },
634
- }).current;
635
- T.useEffect(() => {
636
- if (o) {
637
- let y = function (B) {
638
- if (g.paused || !a) return;
639
- let k = B.target;
640
- a.contains(k) ? (h.current = k) : G(h.current, { select: !0 });
641
- },
642
- C = function (B) {
643
- if (g.paused || !a) return;
644
- let k = B.relatedTarget;
645
- k !== null && (a.contains(k) || G(h.current, { select: !0 }));
646
- },
647
- j = function (B) {
648
- if (document.activeElement === document.body)
649
- for (let H of B) H.removedNodes.length > 0 && G(a);
650
- };
651
- var u = y,
652
- f = C,
653
- x = j;
654
- document.addEventListener("focusin", y),
655
- document.addEventListener("focusout", C);
656
- let M = new MutationObserver(j);
657
- return (
658
- a && M.observe(a, { childList: !0, subtree: !0 }),
659
- () => {
660
- document.removeEventListener("focusin", y),
661
- document.removeEventListener("focusout", C),
662
- M.disconnect();
663
- }
664
- );
665
- }
666
- }, [o, a, g.paused]),
667
- T.useEffect(() => {
668
- if (a) {
669
- ze.add(g);
670
- let u = document.activeElement;
671
- if (!a.contains(u)) {
672
- let x = new CustomEvent(At, De);
673
- a.addEventListener(At, s),
674
- a.dispatchEvent(x),
675
- x.defaultPrevented ||
676
- (bo(So(Ve(a)), { select: !0 }),
677
- document.activeElement === u && G(a));
678
- }
679
- return () => {
680
- a.removeEventListener(At, s),
681
- setTimeout(() => {
682
- let x = new CustomEvent(Ot, De);
683
- a.addEventListener(Ot, d),
684
- a.dispatchEvent(x),
685
- x.defaultPrevented || G(u ?? document.body, { select: !0 }),
686
- a.removeEventListener(Ot, d),
687
- ze.remove(g);
688
- }, 0);
689
- };
690
- }
691
- }, [a, s, d, g]);
692
- let w = T.useCallback(
693
- (u) => {
694
- if ((!r && !o) || g.paused) return;
695
- let f = u.key === "Tab" && !u.altKey && !u.ctrlKey && !u.metaKey,
696
- x = document.activeElement;
697
- if (f && x) {
698
- let y = u.currentTarget,
699
- [C, j] = Ro(y);
700
- C && j
701
- ? !u.shiftKey && x === j
702
- ? (u.preventDefault(), r && G(C, { select: !0 }))
703
- : u.shiftKey &&
704
- x === C &&
705
- (u.preventDefault(), r && G(j, { select: !0 }))
706
- : x === y && u.preventDefault();
707
- }
708
- },
709
- [r, o, g.paused],
710
- );
711
- return wo(N.div, { tabIndex: -1, ...c, ref: p, onKeyDown: w });
712
- });
713
- Tt.displayName = Co;
714
- function bo(t, { select: e = !1 } = {}) {
715
- let r = document.activeElement;
716
- for (let o of t)
717
- if ((G(o, { select: e }), document.activeElement !== r)) return;
718
- }
719
- function Ro(t) {
720
- let e = Ve(t),
721
- r = _e(e, t),
722
- o = _e(e.reverse(), t);
723
- return [r, o];
724
- }
725
- function Ve(t) {
726
- let e = [],
727
- r = document.createTreeWalker(t, NodeFilter.SHOW_ELEMENT, {
728
- acceptNode: (o) => {
729
- let i = o.tagName === "INPUT" && o.type === "hidden";
730
- return o.disabled || o.hidden || i
731
- ? NodeFilter.FILTER_SKIP
732
- : o.tabIndex >= 0
733
- ? NodeFilter.FILTER_ACCEPT
734
- : NodeFilter.FILTER_SKIP;
735
- },
736
- });
737
- for (; r.nextNode(); ) e.push(r.currentNode);
738
- return e;
739
- }
740
- function _e(t, e) {
741
- for (let r of t) if (!Mo(r, { upTo: e })) return r;
742
- }
743
- function Mo(t, { upTo: e }) {
744
- if (getComputedStyle(t).visibility === "hidden") return !0;
745
- for (; t; ) {
746
- if (e !== void 0 && t === e) return !1;
747
- if (getComputedStyle(t).display === "none") return !0;
748
- t = t.parentElement;
749
- }
750
- return !1;
751
- }
752
- function jo(t) {
753
- return t instanceof HTMLInputElement && "select" in t;
754
- }
755
- function G(t, { select: e = !1 } = {}) {
756
- if (t && t.focus) {
757
- let r = document.activeElement;
758
- t.focus({ preventScroll: !0 }), t !== r && jo(t) && e && t.select();
759
- }
760
- }
761
- var ze = Fo();
762
- function Fo() {
763
- let t = [];
764
- return {
765
- add(e) {
766
- let r = t[0];
767
- e !== r && r?.pause(), (t = He(t, e)), t.unshift(e);
768
- },
769
- remove(e) {
770
- (t = He(t, e)), t[0]?.resume();
771
- },
772
- };
773
- }
774
- function He(t, e) {
775
- let r = [...t],
776
- o = r.indexOf(e);
777
- return o !== -1 && r.splice(o, 1), r;
778
- }
779
- function So(t) {
780
- return t.filter((e) => e.tagName !== "A");
781
- }
782
- import * as xt from "react";
783
- import Bo from "react-dom";
784
- import { jsx as Wo } from "react/jsx-runtime";
785
- var Eo = "Portal",
786
- It = xt.forwardRef((t, e) => {
787
- let { container: r, ...o } = t,
788
- [i, n] = xt.useState(!1);
789
- V(() => n(!0), []);
790
- let c = r || (i && globalThis?.document?.body);
791
- return c ? Bo.createPortal(Wo(N.div, { ...o, ref: e }), c) : null;
792
- });
793
- It.displayName = Eo;
794
- import * as E from "react";
795
- import * as Ue from "react";
796
- function Po(t, e) {
797
- return Ue.useReducer((r, o) => e[r][o] ?? r, t);
798
- }
799
- var at = (t) => {
800
- let { present: e, children: r } = t,
801
- o = No(e),
802
- i =
803
- typeof r == "function" ? r({ present: o.isPresent }) : E.Children.only(r),
804
- n = I(o.ref, Ao(i));
805
- return typeof r == "function" || o.isPresent
806
- ? E.cloneElement(i, { ref: n })
807
- : null;
808
- };
809
- at.displayName = "Presence";
810
- function No(t) {
811
- let [e, r] = E.useState(),
812
- o = E.useRef(null),
813
- i = E.useRef(t),
814
- n = E.useRef("none"),
815
- c = t ? "mounted" : "unmounted",
816
- [a, l] = Po(c, {
817
- mounted: { UNMOUNT: "unmounted", ANIMATION_OUT: "unmountSuspended" },
818
- unmountSuspended: { MOUNT: "mounted", ANIMATION_END: "unmounted" },
819
- unmounted: { MOUNT: "mounted" },
820
- });
821
- return (
822
- E.useEffect(() => {
823
- let s = vt(o.current);
824
- n.current = a === "mounted" ? s : "none";
825
- }, [a]),
826
- V(() => {
827
- let s = o.current,
828
- d = i.current;
829
- if (d !== t) {
830
- let p = n.current,
831
- g = vt(s);
832
- t
833
- ? l("MOUNT")
834
- : g === "none" || s?.display === "none"
835
- ? l("UNMOUNT")
836
- : l(d && p !== g ? "ANIMATION_OUT" : "UNMOUNT"),
837
- (i.current = t);
838
- }
839
- }, [t, l]),
840
- V(() => {
841
- if (e) {
842
- let s,
843
- d = e.ownerDocument.defaultView ?? window,
844
- h = (g) => {
845
- let u = vt(o.current).includes(CSS.escape(g.animationName));
846
- if (g.target === e && u && (l("ANIMATION_END"), !i.current)) {
847
- let f = e.style.animationFillMode;
848
- (e.style.animationFillMode = "forwards"),
849
- (s = d.setTimeout(() => {
850
- e.style.animationFillMode === "forwards" &&
851
- (e.style.animationFillMode = f);
852
- }));
853
- }
854
- },
855
- p = (g) => {
856
- g.target === e && (n.current = vt(o.current));
857
- };
858
- return (
859
- e.addEventListener("animationstart", p),
860
- e.addEventListener("animationcancel", h),
861
- e.addEventListener("animationend", h),
862
- () => {
863
- d.clearTimeout(s),
864
- e.removeEventListener("animationstart", p),
865
- e.removeEventListener("animationcancel", h),
866
- e.removeEventListener("animationend", h);
867
- }
868
- );
869
- } else l("ANIMATION_END");
870
- }, [e, l]),
871
- {
872
- isPresent: ["mounted", "unmountSuspended"].includes(a),
873
- ref: E.useCallback((s) => {
874
- (o.current = s ? getComputedStyle(s) : null), r(s);
875
- }, []),
876
- }
877
- );
878
- }
879
- function vt(t) {
880
- return t?.animationName || "none";
881
- }
882
- function Ao(t) {
883
- let e = Object.getOwnPropertyDescriptor(t.props, "ref")?.get,
884
- r = e && "isReactWarning" in e && e.isReactWarning;
885
- return r
886
- ? t.ref
887
- : ((e = Object.getOwnPropertyDescriptor(t, "ref")?.get),
888
- (r = e && "isReactWarning" in e && e.isReactWarning),
889
- r ? t.props.ref : t.props.ref || t.ref);
890
- }
891
- import * as $e from "react";
892
- var Dt = 0;
893
- function Ke() {
894
- $e.useEffect(() => {
895
- let t = document.querySelectorAll("[data-radix-focus-guard]");
896
- return (
897
- document.body.insertAdjacentElement("afterbegin", t[0] ?? Ge()),
898
- document.body.insertAdjacentElement("beforeend", t[1] ?? Ge()),
899
- Dt++,
900
- () => {
901
- Dt === 1 &&
902
- document
903
- .querySelectorAll("[data-radix-focus-guard]")
904
- .forEach((e) => e.remove()),
905
- Dt--;
906
- }
907
- );
908
- }, []);
909
- }
910
- function Ge() {
911
- let t = document.createElement("span");
912
- return (
913
- t.setAttribute("data-radix-focus-guard", ""),
914
- (t.tabIndex = 0),
915
- (t.style.outline = "none"),
916
- (t.style.opacity = "0"),
917
- (t.style.position = "fixed"),
918
- (t.style.pointerEvents = "none"),
919
- t
920
- );
921
- }
922
- var P = function () {
923
- return (
924
- (P =
925
- Object.assign ||
926
- function (e) {
927
- for (var r, o = 1, i = arguments.length; o < i; o++) {
928
- r = arguments[o];
929
- for (var n in r)
930
- Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
931
- }
932
- return e;
933
- }),
934
- P.apply(this, arguments)
935
- );
936
- };
937
- function yt(t, e) {
938
- var r = {};
939
- for (var o in t)
940
- Object.prototype.hasOwnProperty.call(t, o) &&
941
- e.indexOf(o) < 0 &&
942
- (r[o] = t[o]);
943
- if (t != null && typeof Object.getOwnPropertySymbols == "function")
944
- for (var i = 0, o = Object.getOwnPropertySymbols(t); i < o.length; i++)
945
- e.indexOf(o[i]) < 0 &&
946
- Object.prototype.propertyIsEnumerable.call(t, o[i]) &&
947
- (r[o[i]] = t[o[i]]);
948
- return r;
949
- }
950
- function Ye(t, e, r) {
951
- if (r || arguments.length === 2)
952
- for (var o = 0, i = e.length, n; o < i; o++)
953
- (n || !(o in e)) &&
954
- (n || (n = Array.prototype.slice.call(e, 0, o)), (n[o] = e[o]));
955
- return t.concat(n || Array.prototype.slice.call(e));
956
- }
957
- import * as bt from "react";
958
- import * as W from "react";
959
- var $ = "right-scroll-bar-position",
960
- K = "width-before-scroll-bar",
961
- _t = "with-scroll-bars-hidden",
962
- zt = "--removed-body-scroll-bar-size";
963
- function mt(t, e) {
964
- return typeof t == "function" ? t(e) : t && (t.current = e), t;
965
- }
966
- import { useState as Oo } from "react";
967
- function Xe(t, e) {
968
- var r = Oo(function () {
969
- return {
970
- value: t,
971
- callback: e,
972
- facade: {
973
- get current() {
974
- return r.value;
975
- },
976
- set current(o) {
977
- var i = r.value;
978
- i !== o && ((r.value = o), r.callback(o, i));
979
- },
980
- },
981
- };
982
- })[0];
983
- return (r.callback = e), r.facade;
984
- }
985
- import * as Lt from "react";
986
- var To = typeof window < "u" ? Lt.useLayoutEffect : Lt.useEffect,
987
- qe = new WeakMap();
988
- function Ht(t, e) {
989
- var r = Xe(e || null, function (o) {
990
- return t.forEach(function (i) {
991
- return mt(i, o);
992
- });
993
- });
994
- return (
995
- To(
996
- function () {
997
- var o = qe.get(r);
998
- if (o) {
999
- var i = new Set(o),
1000
- n = new Set(t),
1001
- c = r.current;
1002
- i.forEach(function (a) {
1003
- n.has(a) || mt(a, null);
1004
- }),
1005
- n.forEach(function (a) {
1006
- i.has(a) || mt(a, c);
1007
- });
1008
- }
1009
- qe.set(r, t);
1010
- },
1011
- [t],
1012
- ),
1013
- r
1014
- );
1015
- }
1016
- function Io(t) {
1017
- return t;
1018
- }
1019
- function Do(t, e) {
1020
- e === void 0 && (e = Io);
1021
- var r = [],
1022
- o = !1,
1023
- i = {
1024
- read: function () {
1025
- if (o)
1026
- throw new Error(
1027
- "Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.",
1028
- );
1029
- return r.length ? r[r.length - 1] : t;
1030
- },
1031
- useMedium: function (n) {
1032
- var c = e(n, o);
1033
- return (
1034
- r.push(c),
1035
- function () {
1036
- r = r.filter(function (a) {
1037
- return a !== c;
1038
- });
1039
- }
1040
- );
1041
- },
1042
- assignSyncMedium: function (n) {
1043
- for (o = !0; r.length; ) {
1044
- var c = r;
1045
- (r = []), c.forEach(n);
1046
- }
1047
- r = {
1048
- push: function (a) {
1049
- return n(a);
1050
- },
1051
- filter: function () {
1052
- return r;
1053
- },
1054
- };
1055
- },
1056
- assignMedium: function (n) {
1057
- o = !0;
1058
- var c = [];
1059
- if (r.length) {
1060
- var a = r;
1061
- (r = []), a.forEach(n), (c = r);
1062
- }
1063
- var l = function () {
1064
- var d = c;
1065
- (c = []), d.forEach(n);
1066
- },
1067
- s = function () {
1068
- return Promise.resolve().then(l);
1069
- };
1070
- s(),
1071
- (r = {
1072
- push: function (d) {
1073
- c.push(d), s();
1074
- },
1075
- filter: function (d) {
1076
- return (c = c.filter(d)), r;
1077
- },
1078
- });
1079
- },
1080
- };
1081
- return i;
1082
- }
1083
- function Vt(t) {
1084
- t === void 0 && (t = {});
1085
- var e = Do(null);
1086
- return (e.options = P({ async: !0, ssr: !1 }, t)), e;
1087
- }
1088
- import * as Ze from "react";
1089
- var Qe = function (t) {
1090
- var e = t.sideCar,
1091
- r = yt(t, ["sideCar"]);
1092
- if (!e)
1093
- throw new Error(
1094
- "Sidecar: please provide `sideCar` property to import the right car",
1095
- );
1096
- var o = e.read();
1097
- if (!o) throw new Error("Sidecar medium not found");
1098
- return Ze.createElement(o, P({}, r));
1099
- };
1100
- Qe.isSideCarExport = !0;
1101
- function Ut(t, e) {
1102
- return t.useMedium(e), Qe;
1103
- }
1104
- var wt = Vt();
1105
- var Gt = function () {},
1106
- ct = W.forwardRef(function (t, e) {
1107
- var r = W.useRef(null),
1108
- o = W.useState({
1109
- onScrollCapture: Gt,
1110
- onWheelCapture: Gt,
1111
- onTouchMoveCapture: Gt,
1112
- }),
1113
- i = o[0],
1114
- n = o[1],
1115
- c = t.forwardProps,
1116
- a = t.children,
1117
- l = t.className,
1118
- s = t.removeScrollBar,
1119
- d = t.enabled,
1120
- h = t.shards,
1121
- p = t.sideCar,
1122
- g = t.noRelative,
1123
- w = t.noIsolation,
1124
- u = t.inert,
1125
- f = t.allowPinchZoom,
1126
- x = t.as,
1127
- y = x === void 0 ? "div" : x,
1128
- C = t.gapMode,
1129
- j = yt(t, [
1130
- "forwardProps",
1131
- "children",
1132
- "className",
1133
- "removeScrollBar",
1134
- "enabled",
1135
- "shards",
1136
- "sideCar",
1137
- "noRelative",
1138
- "noIsolation",
1139
- "inert",
1140
- "allowPinchZoom",
1141
- "as",
1142
- "gapMode",
1143
- ]),
1144
- M = p,
1145
- B = Ht([r, e]),
1146
- k = P(P({}, j), i);
1147
- return W.createElement(
1148
- W.Fragment,
1149
- null,
1150
- d &&
1151
- W.createElement(M, {
1152
- sideCar: wt,
1153
- removeScrollBar: s,
1154
- shards: h,
1155
- noRelative: g,
1156
- noIsolation: w,
1157
- inert: u,
1158
- setCallbacks: n,
1159
- allowPinchZoom: !!f,
1160
- lockRef: r,
1161
- gapMode: C,
1162
- }),
1163
- c
1164
- ? W.cloneElement(W.Children.only(a), P(P({}, k), { ref: B }))
1165
- : W.createElement(y, P({}, k, { className: l, ref: B }), a),
1166
- );
1167
- });
1168
- ct.defaultProps = { enabled: !0, removeScrollBar: !0, inert: !1 };
1169
- ct.classNames = { fullWidth: K, zeroRight: $ };
1170
- import * as m from "react";
1171
- import * as et from "react";
1172
- import * as er from "react";
1173
- var Je;
1174
- var tr = function () {
1175
- if (Je) return Je;
1176
- if (typeof __webpack_nonce__ < "u") return __webpack_nonce__;
1177
- };
1178
- function _o() {
1179
- if (!document) return null;
1180
- var t = document.createElement("style");
1181
- t.type = "text/css";
1182
- var e = tr();
1183
- return e && t.setAttribute("nonce", e), t;
1184
- }
1185
- function zo(t, e) {
1186
- t.styleSheet
1187
- ? (t.styleSheet.cssText = e)
1188
- : t.appendChild(document.createTextNode(e));
1189
- }
1190
- function Ho(t) {
1191
- var e = document.head || document.getElementsByTagName("head")[0];
1192
- e.appendChild(t);
1193
- }
1194
- var $t = function () {
1195
- var t = 0,
1196
- e = null;
1197
- return {
1198
- add: function (r) {
1199
- t == 0 && (e = _o()) && (zo(e, r), Ho(e)), t++;
1200
- },
1201
- remove: function () {
1202
- t--, !t && e && (e.parentNode && e.parentNode.removeChild(e), (e = null));
1203
- },
1204
- };
1205
- };
1206
- var Kt = function () {
1207
- var t = $t();
1208
- return function (e, r) {
1209
- er.useEffect(
1210
- function () {
1211
- return (
1212
- t.add(e),
1213
- function () {
1214
- t.remove();
1215
- }
1216
- );
1217
- },
1218
- [e && r],
1219
- );
1220
- };
1221
- };
1222
- var lt = function () {
1223
- var t = Kt(),
1224
- e = function (r) {
1225
- var o = r.styles,
1226
- i = r.dynamic;
1227
- return t(o, i), null;
1228
- };
1229
- return e;
1230
- };
1231
- var Vo = { left: 0, top: 0, right: 0, gap: 0 },
1232
- Yt = function (t) {
1233
- return parseInt(t || "", 10) || 0;
1234
- },
1235
- Uo = function (t) {
1236
- var e = window.getComputedStyle(document.body),
1237
- r = e[t === "padding" ? "paddingLeft" : "marginLeft"],
1238
- o = e[t === "padding" ? "paddingTop" : "marginTop"],
1239
- i = e[t === "padding" ? "paddingRight" : "marginRight"];
1240
- return [Yt(r), Yt(o), Yt(i)];
1241
- },
1242
- Xt = function (t) {
1243
- if ((t === void 0 && (t = "margin"), typeof window > "u")) return Vo;
1244
- var e = Uo(t),
1245
- r = document.documentElement.clientWidth,
1246
- o = window.innerWidth;
1247
- return {
1248
- left: e[0],
1249
- top: e[1],
1250
- right: e[2],
1251
- gap: Math.max(0, o - r + e[2] - e[0]),
1252
- };
1253
- };
1254
- var Go = lt(),
1255
- tt = "data-scroll-locked",
1256
- $o = function (t, e, r, o) {
1257
- var i = t.left,
1258
- n = t.top,
1259
- c = t.right,
1260
- a = t.gap;
1261
- return (
1262
- r === void 0 && (r = "margin"),
1263
- `
1264
- .`
1265
- .concat(
1266
- _t,
1267
- ` {
1268
- overflow: hidden `,
1269
- )
1270
- .concat(
1271
- o,
1272
- `;
1273
- padding-right: `,
1274
- )
1275
- .concat(a, "px ")
1276
- .concat(
1277
- o,
1278
- `;
1
+ import nt from"react";import fe from"react";var Et={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Pt=fe.createContext&&fe.createContext(Et);var Kr=["attr","size","title"];function $r(t,e){if(t==null)return{};var r,o,i=Yr(t,e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);for(o=0;o<n.length;o++)r=n[o],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}function Yr(t,e){if(t==null)return{};var r={};for(var o in t)if({}.hasOwnProperty.call(t,o)){if(e.indexOf(o)!==-1)continue;r[o]=t[o]}return r}function ft(){return ft=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var o in r)({}).hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},ft.apply(null,arguments)}function ke(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,o)}return r}function kt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ke(Object(r),!0).forEach(function(o){Xr(t,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ke(Object(r)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))})}return t}function Xr(t,e,r){return(e=qr(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function qr(t){var e=Zr(t,"string");return typeof e=="symbol"?e:e+""}function Zr(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var o=r.call(t,e||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function xe(t){return t&&t.map((e,r)=>nt.createElement(e.tag,kt({key:r},e.attr),xe(e.child)))}function ve(t){return e=>nt.createElement(Qr,ft({attr:kt({},t.attr)},e),xe(t.child))}function Qr(t){var e=r=>{var{attr:o,size:i,title:n}=t,c=$r(t,Kr),a=i||r.size||"1em",l;return r.className&&(l=r.className),t.className&&(l=(l?l+" ":"")+t.className),nt.createElement("svg",ft({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,o,c,{className:l,style:kt(kt({color:t.color||r.color},r.style),t.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),n&&nt.createElement("title",null,n),t.children)};return Pt!==void 0?nt.createElement(Pt.Consumer,null,r=>e(r)):e(Et)}function ye(t){return ve({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"},child:[]},{tag:"polyline",attr:{points:"15 3 21 3 21 9"},child:[]},{tag:"line",attr:{x1:"10",y1:"14",x2:"21",y2:"3"},child:[]}]})(t)}import{jsx as H,jsxs as at}from"react/jsx-runtime";function Jr({links:t=[],socials:e=[],copyright:r,version:o,...i}){return H("footer",{className:"kui:bg-background kui:pt-12 kui:pb-8 kui:w-full kui:font-ddin kui:uppercase kui:text-[10px] kui:sm:text-xs",...i,children:H("div",{className:"kui:container kui:mx-auto kui:px-6 kui:max-w-[1400px]",children:at("div",{className:"kui:flex kui:flex-col kui:md:flex-row kui:items-center kui:justify-between kui:gap-6 kui:md:gap-4 kui:text-muted-foreground",children:[H("div",{className:"kui:flex kui:items-center kui:gap-6 kui:order-3 kui:md:order-1",children:e.map(n=>{let c=n.icon;return H("a",{href:n.href,className:"kui:hover:text-foreground kui:transition-colors",target:"_blank",rel:"noopener noreferrer","aria-label":n.label??"Social link",children:H(c,{className:"kui:w-4 kui:h-4"})},n.href)})}),H("ul",{className:"kui:flex kui:flex-wrap kui:justify-center kui:items-center kui:gap-6 kui:md:gap-10 kui:order-1 kui:md:order-2 kui:font-medium kui:tracking-widest kui:text-foreground",children:t.map(n=>H("li",{children:at("a",{href:n.href,onClick:n.onClick,target:n.isExternal?"_blank":void 0,rel:n.isExternal?"noopener noreferrer":void 0,className:"kui:inline-flex kui:items-center kui:gap-1.5 kui:hover:text-muted-foreground kui:transition-colors",children:[H("span",{children:n.label}),n.isExternal&&H(ye,{className:"kui:inline-block kui:h-3.5 kui:w-3.5 kui:text-muted-foreground/60","aria-hidden":"true"})]})},n.href))}),at("div",{className:"kui:order-2 kui:md:order-3 kui:font-medium kui:tracking-widest kui:whitespace-nowrap kui:flex kui:items-center kui:gap-3",children:[o&&at("span",{className:" kui:text-muted-foreground/70 kui:select-none",children:["v",o]}),r&&at("a",{href:r?.companyUrl,target:"_blank",rel:"noopener noreferrer",className:"kui:focus-visible:underline kui:outline-none",children:["\xA9 ",new Date().getFullYear()," ",r?.companyName]})]})]})})})}import{Menu as Ni,X as Ai}from"lucide-react";import{useState as Oi}from"react";import{cva as ro}from"class-variance-authority";import{Slot as oo}from"radix-ui";import{clsx as to}from"clsx";import{twMerge as eo}from"tailwind-merge";function b(...t){return eo(to(t))}import{jsx as no}from"react/jsx-runtime";var io=ro("kui:group/button kui:shrink-0 kui:items-center kui:justify-center kui:rounded-lg kui:border kui:border-transparent kui:bg-clip-padding kui:text-sm kui:font-medium kui:whitespace-nowrap kui:transition-all kui:outline-none kui:select-none kui:focus-visible:border-ring kui:focus-visible:ring-3 kui:focus-visible:ring-ring/50 kui:active:translate-y-px kui:disabled:pointer-events-none kui:disabled:opacity-50 kui:aria-invalid:border-destructive kui:aria-invalid:ring-3 kui:aria-invalid:ring-destructive/20 kui:dark:aria-invalid:border-destructive/50 kui:dark:aria-invalid:ring-destructive/40 kui:[&_svg]:pointer-events-none kui:[&_svg]:shrink-0 kui:[&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"kui:bg-primary kui:text-primary-foreground kui:[a]:hover:bg-primary/80",outline:"kui:border-border kui:bg-background kui:hover:bg-muted kui:hover:text-foreground kui:aria-expanded:bg-muted kui:aria-expanded:text-foreground kui:dark:border-input kui:dark:bg-input/30 kui:dark:hover:bg-input/50",secondary:"kui:bg-secondary kui:text-secondary-foreground kui:hover:bg-secondary/80 kui:aria-expanded:bg-secondary kui:aria-expanded:text-secondary-foreground",ghost:"kui:hover:bg-muted kui:hover:text-foreground kui:aria-expanded:bg-muted kui:aria-expanded:text-foreground kui:dark:hover:bg-muted/50",destructive:"kui:bg-destructive/10 kui:text-destructive kui:hover:bg-destructive/20 kui:focus-visible:border-destructive/40 kui:focus-visible:ring-destructive/20 kui:dark:bg-destructive/20 kui:dark:hover:bg-destructive/30 kui:dark:focus-visible:ring-destructive/40",link:"kui:text-primary kui:underline-offset-4 kui:hover:underline"},size:{default:"kui:h-8 kui:gap-1.5 kui:px-2.5 kui:has-data-[icon=inline-end]:pr-2 kui:has-data-[icon=inline-start]:pl-2",xs:"kui:h-6 kui:gap-1 kui:rounded-[min(var(--radius-md),10px)] kui:px-2 kui:text-xs kui:in-data-[slot=button-group]:rounded-lg kui:has-data-[icon=inline-end]:pr-1.5 kui:has-data-[icon=inline-start]:pl-1.5 kui:[&_svg:not([class*='size-'])]:size-3",sm:"kui:h-7 kui:gap-1 kui:rounded-[min(var(--radius-md),12px)] kui:px-2.5 kui:text-[0.8rem] kui:in-data-[slot=button-group]:rounded-lg kui:has-data-[icon=inline-end]:pr-1.5 kui:has-data-[icon=inline-start]:pl-1.5 kui:[&_svg:not([class*='size-'])]:size-3.5",lg:"kui:h-9 kui:gap-1.5 kui:px-2.5 kui:has-data-[icon=inline-end]:pr-3 kui:has-data-[icon=inline-start]:pl-3",icon:"kui:size-8","icon-xs":"kui:size-6 kui:rounded-[min(var(--radius-md),10px)] kui:in-data-[slot=button-group]:rounded-lg kui:[&_svg:not([class*='size-'])]:size-3","icon-sm":"kui:size-7 kui:rounded-[min(var(--radius-md),12px)] kui:in-data-[slot=button-group]:rounded-lg","icon-lg":"kui:size-9"}},defaultVariants:{variant:"default",size:"default"}});function me({className:t,variant:e="default",size:r="default",asChild:o=!1,...i}){let n=o?oo.Root:"button";return no(n,{"data-slot":"button","data-variant":e,"data-size":r,className:b(io({variant:e,size:r,className:t})),...i})}import{cva as ao}from"class-variance-authority";import{ChevronDownIcon as fn}from"lucide-react";import{NavigationMenu as ct}from"radix-ui";import{jsx as Q,jsxs as lo}from"react/jsx-runtime";function Le({className:t,children:e,viewport:r=!0,...o}){return lo(ct.Root,{"data-slot":"navigation-menu","data-viewport":r,className:b("kui:group/navigation-menu kui:relative kui:flex kui:max-w-max kui:flex-1 kui:items-center kui:justify-center",t),...o,children:[e,r&&Q(co,{})]})}function we({className:t,...e}){return Q(ct.List,{"data-slot":"navigation-menu-list",className:b("kui:group kui:flex kui:flex-1 kui:list-none kui:items-center kui:justify-center kui:gap-0",t),...e})}function Ce({className:t,...e}){return Q(ct.Item,{"data-slot":"navigation-menu-item",className:b("kui:relative",t),...e})}var be=ao("kui:group/navigation-menu-trigger kui:inline-flex kui:h-9 kui:w-max kui:items-center kui:justify-center kui:rounded-lg kui:bg-background kui:px-2.5 kui:py-1.5 kui:text-sm kui:font-medium kui:transition-all kui:outline-none kui:hover:bg-muted kui:focus:bg-muted kui:focus-visible:ring-3 kui:focus-visible:ring-ring/50 kui:focus-visible:outline-1 kui:disabled:pointer-events-none kui:disabled:opacity-50 kui:data-popup-open:bg-muted/50 kui:data-popup-open:hover:bg-muted kui:data-open:bg-muted/50 kui:data-open:hover:bg-muted kui:data-open:focus:bg-muted");function co({className:t,...e}){return Q("div",{className:b("kui:absolute kui:top-full kui:left-0 kui:isolate kui:z-50 kui:flex kui:justify-center"),children:Q(ct.Viewport,{"data-slot":"navigation-menu-viewport",className:b("kui:origin-top-center kui:relative kui:mt-1.5 kui:h-(--radix-navigation-menu-viewport-height) kui:w-full kui:overflow-hidden kui:rounded-lg kui:bg-popover kui:text-popover-foreground kui:shadow kui:ring-1 kui:ring-foreground/10 kui:duration-100 kui:md:w-(--radix-navigation-menu-viewport-width) kui:data-open:animate-in kui:data-open:zoom-in-90 kui:data-closed:animate-out kui:data-closed:zoom-out-90",t),...e})})}function Re({className:t,...e}){return Q(ct.Link,{"data-slot":"navigation-menu-link",className:b("kui:flex kui:items-center kui:gap-2 kui:rounded-lg kui:p-2 kui:text-sm kui:transition-all kui:outline-none kui:hover:bg-muted kui:focus:bg-muted kui:focus-visible:ring-3 kui:focus-visible:ring-ring/50 kui:focus-visible:outline-1 kui:in-data-[slot=navigation-menu-content]:rounded-md kui:data-active:bg-muted/50 kui:data-active:hover:bg-muted kui:data-active:focus:bg-muted kui:[&_svg:not([class*='size-']):not([class*='h-']):not([class*='w-'])]:size-4",t),...e})}import*as v from"react";var mn=!!(typeof window<"u"&&window.document&&window.document.createElement);function _(t,e,{checkForDefaultPrevented:r=!0}={}){return function(i){if(t?.(i),r===!1||!i.defaultPrevented)return e?.(i)}}import*as je from"react";function Me(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Nt(...t){return e=>{let r=!1,o=t.map(i=>{let n=Me(i,e);return!r&&typeof n=="function"&&(r=!0),n});if(r)return()=>{for(let i=0;i<o.length;i++){let n=o[i];typeof n=="function"?n():Me(t[i],null)}}}}function I(...t){return je.useCallback(Nt(...t),t)}import*as A from"react";import{jsx as Fe}from"react/jsx-runtime";function Se(t,e){let r=A.createContext(e),o=n=>{let{children:c,...a}=n,l=A.useMemo(()=>a,Object.values(a));return Fe(r.Provider,{value:l,children:c})};o.displayName=t+"Provider";function i(n){let c=A.useContext(r);if(c)return c;if(e!==void 0)return e;throw new Error(`\`${n}\` must be used within \`${t}\``)}return[o,i]}function Be(t,e=[]){let r=[];function o(n,c){let a=A.createContext(c),l=r.length;r=[...r,c];let s=h=>{let{scope:p,children:g,...w}=h,u=p?.[t]?.[l]||a,f=A.useMemo(()=>w,Object.values(w));return Fe(u.Provider,{value:f,children:g})};s.displayName=n+"Provider";function d(h,p){let g=p?.[t]?.[l]||a,w=A.useContext(g);if(w)return w;if(c!==void 0)return c;throw new Error(`\`${h}\` must be used within \`${n}\``)}return[s,d]}let i=()=>{let n=r.map(c=>A.createContext(c));return function(a){let l=a?.[t]||n;return A.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return i.scopeName=t,[o,so(i,...e)]}function so(...t){let e=t[0];if(t.length===1)return e;let r=()=>{let o=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(n){let c=o.reduce((a,{useScope:l,scopeName:s})=>{let h=l(n)[`__scope${s}`];return{...a,...h}},{});return A.useMemo(()=>({[`__scope${e.scopeName}`]:c}),[c])}};return r.scopeName=e.scopeName,r}import*as At from"react";import*as We from"react";var V=globalThis?.document?We.useLayoutEffect:()=>{};var uo=At[" useId ".trim().toString()]||(()=>{}),ho=0;function xt(t){let[e,r]=At.useState(uo());return V(()=>{t||r(o=>o??String(ho++))},[t]),t||(e?`radix-${e}`:"")}import*as O from"react";import*as vt from"react";var po=O[" useInsertionEffect ".trim().toString()]||V;function Ee({prop:t,defaultProp:e,onChange:r=()=>{},caller:o}){let[i,n,c]=go({defaultProp:e,onChange:r}),a=t!==void 0,l=a?t:i;{let d=O.useRef(t!==void 0);O.useEffect(()=>{let h=d.current;h!==a&&console.warn(`${o} is changing from ${h?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. 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.`),d.current=a},[a,o])}let s=O.useCallback(d=>{if(a){let h=fo(d)?d(t):d;h!==t&&c.current?.(h)}else n(d)},[a,t,n,c]);return[l,s]}function go({defaultProp:t,onChange:e}){let[r,o]=O.useState(t),i=O.useRef(r),n=O.useRef(e);return po(()=>{n.current=e},[e]),O.useEffect(()=>{i.current!==r&&(n.current?.(r),i.current=r)},[r,i]),[r,o,n]}function fo(t){return typeof t=="function"}import*as L from"react";import*as Ne from"react";import*as Ae from"react-dom";import*as F from"react";import{Fragment as En,jsx as Pe}from"react/jsx-runtime";function yt(t){let e=ko(t),r=F.forwardRef((o,i)=>{let{children:n,...c}=o,a=F.Children.toArray(n),l=a.find(vo);if(l){let s=l.props.children,d=a.map(h=>h===l?F.Children.count(s)>1?F.Children.only(null):F.isValidElement(s)?s.props.children:null:h);return Pe(e,{...c,ref:i,children:F.isValidElement(s)?F.cloneElement(s,void 0,d):null})}return Pe(e,{...c,ref:i,children:n})});return r.displayName=`${t}.Slot`,r}function ko(t){let e=F.forwardRef((r,o)=>{let{children:i,...n}=r;if(F.isValidElement(i)){let c=mo(i),a=yo(n,i.props);return i.type!==F.Fragment&&(a.ref=o?Nt(o,c):c),F.cloneElement(i,a)}return F.Children.count(i)>1?F.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var xo=Symbol("radix.slottable");function vo(t){return F.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===xo}function yo(t,e){let r={...e};for(let o in e){let i=t[o],n=e[o];/^on[A-Z]/.test(o)?i&&n?r[o]=(...a)=>{let l=n(...a);return i(...a),l}:i&&(r[o]=i):o==="style"?r[o]={...i,...n}:o==="className"&&(r[o]=[i,n].filter(Boolean).join(" "))}return{...t,...r}}function mo(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}import{jsx as Lo}from"react/jsx-runtime";var wo=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],N=wo.reduce((t,e)=>{let r=yt(`Primitive.${e}`),o=Ne.forwardRef((i,n)=>{let{asChild:c,...a}=i,l=c?r:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),Lo(l,{...a,ref:n})});return o.displayName=`Primitive.${e}`,{...t,[e]:o}},{});function Oe(t,e){t&&Ae.flushSync(()=>t.dispatchEvent(e))}import*as J from"react";function U(t){let e=J.useRef(t);return J.useEffect(()=>{e.current=t}),J.useMemo(()=>(...r)=>e.current?.(...r),[])}import*as Te from"react";function Ie(t,e=globalThis?.document){let r=U(t);Te.useEffect(()=>{let o=i=>{i.key==="Escape"&&r(i)};return e.addEventListener("keydown",o,{capture:!0}),()=>e.removeEventListener("keydown",o,{capture:!0})},[r,e])}import{jsx as ze}from"react/jsx-runtime";var Co="DismissableLayer",Ot="dismissableLayer.update",bo="dismissableLayer.pointerDownOutside",Ro="dismissableLayer.focusOutside",De,He=L.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Tt=L.forwardRef((t,e)=>{let{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:n,onInteractOutside:c,onDismiss:a,...l}=t,s=L.useContext(He),[d,h]=L.useState(null),p=d?.ownerDocument??globalThis?.document,[,g]=L.useState({}),w=I(e,k=>h(k)),u=Array.from(s.layers),[f]=[...s.layersWithOutsidePointerEventsDisabled].slice(-1),x=u.indexOf(f),y=d?u.indexOf(d):-1,C=s.layersWithOutsidePointerEventsDisabled.size>0,j=y>=x,M=Fo(k=>{let z=k.target,Z=[...s.branches].some(it=>it.contains(z));!j||Z||(i?.(k),c?.(k),k.defaultPrevented||a?.())},p),B=So(k=>{let z=k.target;[...s.branches].some(it=>it.contains(z))||(n?.(k),c?.(k),k.defaultPrevented||a?.())},p);return Ie(k=>{y===s.layers.size-1&&(o?.(k),!k.defaultPrevented&&a&&(k.preventDefault(),a()))},p),L.useEffect(()=>{if(d)return r&&(s.layersWithOutsidePointerEventsDisabled.size===0&&(De=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),s.layersWithOutsidePointerEventsDisabled.add(d)),s.layers.add(d),_e(),()=>{r&&s.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=De)}},[d,p,r,s]),L.useEffect(()=>()=>{d&&(s.layers.delete(d),s.layersWithOutsidePointerEventsDisabled.delete(d),_e())},[d,s]),L.useEffect(()=>{let k=()=>g({});return document.addEventListener(Ot,k),()=>document.removeEventListener(Ot,k)},[]),ze(N.div,{...l,ref:w,style:{pointerEvents:C?j?"auto":"none":void 0,...t.style},onFocusCapture:_(t.onFocusCapture,B.onFocusCapture),onBlurCapture:_(t.onBlurCapture,B.onBlurCapture),onPointerDownCapture:_(t.onPointerDownCapture,M.onPointerDownCapture)})});Tt.displayName=Co;var Mo="DismissableLayerBranch",jo=L.forwardRef((t,e)=>{let r=L.useContext(He),o=L.useRef(null),i=I(e,o);return L.useEffect(()=>{let n=o.current;if(n)return r.branches.add(n),()=>{r.branches.delete(n)}},[r.branches]),ze(N.div,{...t,ref:i})});jo.displayName=Mo;function Fo(t,e=globalThis?.document){let r=U(t),o=L.useRef(!1),i=L.useRef(()=>{});return L.useEffect(()=>{let n=a=>{if(a.target&&!o.current){let s=function(){Ve(bo,r,d,{discrete:!0})};var l=s;let d={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=s,e.addEventListener("click",i.current,{once:!0})):s()}else e.removeEventListener("click",i.current);o.current=!1},c=window.setTimeout(()=>{e.addEventListener("pointerdown",n)},0);return()=>{window.clearTimeout(c),e.removeEventListener("pointerdown",n),e.removeEventListener("click",i.current)}},[e,r]),{onPointerDownCapture:()=>o.current=!0}}function So(t,e=globalThis?.document){let r=U(t),o=L.useRef(!1);return L.useEffect(()=>{let i=n=>{n.target&&!o.current&&Ve(Ro,r,{originalEvent:n},{discrete:!1})};return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function _e(){let t=new CustomEvent(Ot);document.dispatchEvent(t)}function Ve(t,e,r,{discrete:o}){let i=r.originalEvent.target,n=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&i.addEventListener(t,e,{once:!0}),o?Oe(i,n):i.dispatchEvent(n)}import*as T from"react";import{jsx as Bo}from"react/jsx-runtime";var It="focusScope.autoFocusOnMount",Dt="focusScope.autoFocusOnUnmount",Ue={bubbles:!1,cancelable:!0},Wo="FocusScope",_t=T.forwardRef((t,e)=>{let{loop:r=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:n,...c}=t,[a,l]=T.useState(null),s=U(i),d=U(n),h=T.useRef(null),p=I(e,u=>l(u)),g=T.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;T.useEffect(()=>{if(o){let y=function(B){if(g.paused||!a)return;let k=B.target;a.contains(k)?h.current=k:G(h.current,{select:!0})},C=function(B){if(g.paused||!a)return;let k=B.relatedTarget;k!==null&&(a.contains(k)||G(h.current,{select:!0}))},j=function(B){if(document.activeElement===document.body)for(let z of B)z.removedNodes.length>0&&G(a)};var u=y,f=C,x=j;document.addEventListener("focusin",y),document.addEventListener("focusout",C);let M=new MutationObserver(j);return a&&M.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",C),M.disconnect()}}},[o,a,g.paused]),T.useEffect(()=>{if(a){Ke.add(g);let u=document.activeElement;if(!a.contains(u)){let x=new CustomEvent(It,Ue);a.addEventListener(It,s),a.dispatchEvent(x),x.defaultPrevented||(Eo(To(Ye(a)),{select:!0}),document.activeElement===u&&G(a))}return()=>{a.removeEventListener(It,s),setTimeout(()=>{let x=new CustomEvent(Dt,Ue);a.addEventListener(Dt,d),a.dispatchEvent(x),x.defaultPrevented||G(u??document.body,{select:!0}),a.removeEventListener(Dt,d),Ke.remove(g)},0)}}},[a,s,d,g]);let w=T.useCallback(u=>{if(!r&&!o||g.paused)return;let f=u.key==="Tab"&&!u.altKey&&!u.ctrlKey&&!u.metaKey,x=document.activeElement;if(f&&x){let y=u.currentTarget,[C,j]=Po(y);C&&j?!u.shiftKey&&x===j?(u.preventDefault(),r&&G(C,{select:!0})):u.shiftKey&&x===C&&(u.preventDefault(),r&&G(j,{select:!0})):x===y&&u.preventDefault()}},[r,o,g.paused]);return Bo(N.div,{tabIndex:-1,...c,ref:p,onKeyDown:w})});_t.displayName=Wo;function Eo(t,{select:e=!1}={}){let r=document.activeElement;for(let o of t)if(G(o,{select:e}),document.activeElement!==r)return}function Po(t){let e=Ye(t),r=Ge(e,t),o=Ge(e.reverse(),t);return[r,o]}function Ye(t){let e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{let i=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||i?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function Ge(t,e){for(let r of t)if(!No(r,{upTo:e}))return r}function No(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function Ao(t){return t instanceof HTMLInputElement&&"select"in t}function G(t,{select:e=!1}={}){if(t&&t.focus){let r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&Ao(t)&&e&&t.select()}}var Ke=Oo();function Oo(){let t=[];return{add(e){let r=t[0];e!==r&&r?.pause(),t=$e(t,e),t.unshift(e)},remove(e){t=$e(t,e),t[0]?.resume()}}}function $e(t,e){let r=[...t],o=r.indexOf(e);return o!==-1&&r.splice(o,1),r}function To(t){return t.filter(e=>e.tagName!=="A")}import*as mt from"react";import Io from"react-dom";import{jsx as Do}from"react/jsx-runtime";var _o="Portal",zt=mt.forwardRef((t,e)=>{let{container:r,...o}=t,[i,n]=mt.useState(!1);V(()=>n(!0),[]);let c=r||i&&globalThis?.document?.body;return c?Io.createPortal(Do(N.div,{...o,ref:e}),c):null});zt.displayName=_o;import*as E from"react";import*as Xe from"react";function zo(t,e){return Xe.useReducer((r,o)=>e[r][o]??r,t)}var lt=t=>{let{present:e,children:r}=t,o=Ho(e),i=typeof r=="function"?r({present:o.isPresent}):E.Children.only(r),n=I(o.ref,Vo(i));return typeof r=="function"||o.isPresent?E.cloneElement(i,{ref:n}):null};lt.displayName="Presence";function Ho(t){let[e,r]=E.useState(),o=E.useRef(null),i=E.useRef(t),n=E.useRef("none"),c=t?"mounted":"unmounted",[a,l]=zo(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return E.useEffect(()=>{let s=Lt(o.current);n.current=a==="mounted"?s:"none"},[a]),V(()=>{let s=o.current,d=i.current;if(d!==t){let p=n.current,g=Lt(s);t?l("MOUNT"):g==="none"||s?.display==="none"?l("UNMOUNT"):l(d&&p!==g?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,l]),V(()=>{if(e){let s,d=e.ownerDocument.defaultView??window,h=g=>{let u=Lt(o.current).includes(CSS.escape(g.animationName));if(g.target===e&&u&&(l("ANIMATION_END"),!i.current)){let f=e.style.animationFillMode;e.style.animationFillMode="forwards",s=d.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=f)})}},p=g=>{g.target===e&&(n.current=Lt(o.current))};return e.addEventListener("animationstart",p),e.addEventListener("animationcancel",h),e.addEventListener("animationend",h),()=>{d.clearTimeout(s),e.removeEventListener("animationstart",p),e.removeEventListener("animationcancel",h),e.removeEventListener("animationend",h)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:E.useCallback(s=>{o.current=s?getComputedStyle(s):null,r(s)},[])}}function Lt(t){return t?.animationName||"none"}function Vo(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}import*as Ze from"react";var Ht=0;function Qe(){Ze.useEffect(()=>{let t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??qe()),document.body.insertAdjacentElement("beforeend",t[1]??qe()),Ht++,()=>{Ht===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),Ht--}},[])}function qe(){let t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var P=function(){return P=Object.assign||function(e){for(var r,o=1,i=arguments.length;o<i;o++){r=arguments[o];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},P.apply(this,arguments)};function wt(t,e){var r={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(r[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(t);i<o.length;i++)e.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(t,o[i])&&(r[o[i]]=t[o[i]]);return r}function Je(t,e,r){if(r||arguments.length===2)for(var o=0,i=e.length,n;o<i;o++)(n||!(o in e))&&(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))}import*as jt from"react";import*as W from"react";var K="right-scroll-bar-position",$="width-before-scroll-bar",Vt="with-scroll-bars-hidden",Ut="--removed-body-scroll-bar-size";function Ct(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}import{useState as Uo}from"react";function tr(t,e){var r=Uo(function(){return{value:t,callback:e,facade:{get current(){return r.value},set current(o){var i=r.value;i!==o&&(r.value=o,r.callback(o,i))}}}})[0];return r.callback=e,r.facade}import*as bt from"react";var Go=typeof window<"u"?bt.useLayoutEffect:bt.useEffect,er=new WeakMap;function Gt(t,e){var r=tr(e||null,function(o){return t.forEach(function(i){return Ct(i,o)})});return Go(function(){var o=er.get(r);if(o){var i=new Set(o),n=new Set(t),c=r.current;i.forEach(function(a){n.has(a)||Ct(a,null)}),n.forEach(function(a){i.has(a)||Ct(a,c)})}er.set(r,t)},[t]),r}function Ko(t){return t}function $o(t,e){e===void 0&&(e=Ko);var r=[],o=!1,i={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:t},useMedium:function(n){var c=e(n,o);return r.push(c),function(){r=r.filter(function(a){return a!==c})}},assignSyncMedium:function(n){for(o=!0;r.length;){var c=r;r=[],c.forEach(n)}r={push:function(a){return n(a)},filter:function(){return r}}},assignMedium:function(n){o=!0;var c=[];if(r.length){var a=r;r=[],a.forEach(n),c=r}var l=function(){var d=c;c=[],d.forEach(n)},s=function(){return Promise.resolve().then(l)};s(),r={push:function(d){c.push(d),s()},filter:function(d){return c=c.filter(d),r}}}};return i}function Kt(t){t===void 0&&(t={});var e=$o(null);return e.options=P({async:!0,ssr:!1},t),e}import*as rr from"react";var or=function(t){var e=t.sideCar,r=wt(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=e.read();if(!o)throw new Error("Sidecar medium not found");return rr.createElement(o,P({},r))};or.isSideCarExport=!0;function $t(t,e){return t.useMedium(e),or}var Rt=Kt();var Yt=function(){},st=W.forwardRef(function(t,e){var r=W.useRef(null),o=W.useState({onScrollCapture:Yt,onWheelCapture:Yt,onTouchMoveCapture:Yt}),i=o[0],n=o[1],c=t.forwardProps,a=t.children,l=t.className,s=t.removeScrollBar,d=t.enabled,h=t.shards,p=t.sideCar,g=t.noRelative,w=t.noIsolation,u=t.inert,f=t.allowPinchZoom,x=t.as,y=x===void 0?"div":x,C=t.gapMode,j=wt(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),M=p,B=Gt([r,e]),k=P(P({},j),i);return W.createElement(W.Fragment,null,d&&W.createElement(M,{sideCar:Rt,removeScrollBar:s,shards:h,noRelative:g,noIsolation:w,inert:u,setCallbacks:n,allowPinchZoom:!!f,lockRef:r,gapMode:C}),c?W.cloneElement(W.Children.only(a),P(P({},k),{ref:B})):W.createElement(y,P({},k,{className:l,ref:B}),a))});st.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};st.classNames={fullWidth:$,zeroRight:K};import*as m from"react";import*as et from"react";import*as ar from"react";var ir;var nr=function(){if(ir)return ir;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Yo(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=nr();return e&&t.setAttribute("nonce",e),t}function Xo(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function qo(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var Xt=function(){var t=0,e=null;return{add:function(r){t==0&&(e=Yo())&&(Xo(e,r),qo(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}};var qt=function(){var t=Xt();return function(e,r){ar.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&r])}};var ut=function(){var t=qt(),e=function(r){var o=r.styles,i=r.dynamic;return t(o,i),null};return e};var Zo={left:0,top:0,right:0,gap:0},Zt=function(t){return parseInt(t||"",10)||0},Qo=function(t){var e=window.getComputedStyle(document.body),r=e[t==="padding"?"paddingLeft":"marginLeft"],o=e[t==="padding"?"paddingTop":"marginTop"],i=e[t==="padding"?"paddingRight":"marginRight"];return[Zt(r),Zt(o),Zt(i)]},Qt=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return Zo;var e=Qo(t),r=document.documentElement.clientWidth,o=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,o-r+e[2]-e[0])}};var Jo=ut(),tt="data-scroll-locked",ti=function(t,e,r,o){var i=t.left,n=t.top,c=t.right,a=t.gap;return r===void 0&&(r="margin"),`
2
+ .`.concat(Vt,` {
3
+ overflow: hidden `).concat(o,`;
4
+ padding-right: `).concat(a,"px ").concat(o,`;
1279
5
  }
1280
- body[`,
1281
- )
1282
- .concat(
1283
- tt,
1284
- `] {
1285
- overflow: hidden `,
1286
- )
1287
- .concat(
1288
- o,
1289
- `;
6
+ body[`).concat(tt,`] {
7
+ overflow: hidden `).concat(o,`;
1290
8
  overscroll-behavior: contain;
1291
- `,
1292
- )
1293
- .concat(
1294
- [
1295
- e && "position: relative ".concat(o, ";"),
1296
- r === "margin" &&
1297
- `
1298
- padding-left: `
1299
- .concat(
1300
- i,
1301
- `px;
1302
- padding-top: `,
1303
- )
1304
- .concat(
1305
- n,
1306
- `px;
1307
- padding-right: `,
1308
- )
1309
- .concat(
1310
- c,
1311
- `px;
9
+ `).concat([e&&"position: relative ".concat(o,";"),r==="margin"&&`
10
+ padding-left: `.concat(i,`px;
11
+ padding-top: `).concat(n,`px;
12
+ padding-right: `).concat(c,`px;
1312
13
  margin-left:0;
1313
14
  margin-top:0;
1314
- margin-right: `,
1315
- )
1316
- .concat(a, "px ")
1317
- .concat(
1318
- o,
1319
- `;
1320
- `,
1321
- ),
1322
- r === "padding" &&
1323
- "padding-right: ".concat(a, "px ").concat(o, ";"),
1324
- ]
1325
- .filter(Boolean)
1326
- .join(""),
1327
- `
15
+ margin-right: `).concat(a,"px ").concat(o,`;
16
+ `),r==="padding"&&"padding-right: ".concat(a,"px ").concat(o,";")].filter(Boolean).join(""),`
1328
17
  }
1329
18
 
1330
- .`,
1331
- )
1332
- .concat(
1333
- $,
1334
- ` {
1335
- right: `,
1336
- )
1337
- .concat(a, "px ")
1338
- .concat(
1339
- o,
1340
- `;
19
+ .`).concat(K,` {
20
+ right: `).concat(a,"px ").concat(o,`;
1341
21
  }
1342
22
 
1343
- .`,
1344
- )
1345
- .concat(
1346
- K,
1347
- ` {
1348
- margin-right: `,
1349
- )
1350
- .concat(a, "px ")
1351
- .concat(
1352
- o,
1353
- `;
23
+ .`).concat($,` {
24
+ margin-right: `).concat(a,"px ").concat(o,`;
1354
25
  }
1355
26
 
1356
- .`,
1357
- )
1358
- .concat($, " .")
1359
- .concat(
1360
- $,
1361
- ` {
1362
- right: 0 `,
1363
- )
1364
- .concat(
1365
- o,
1366
- `;
27
+ .`).concat(K," .").concat(K,` {
28
+ right: 0 `).concat(o,`;
1367
29
  }
1368
30
 
1369
- .`,
1370
- )
1371
- .concat(K, " .")
1372
- .concat(
1373
- K,
1374
- ` {
1375
- margin-right: 0 `,
1376
- )
1377
- .concat(
1378
- o,
1379
- `;
31
+ .`).concat($," .").concat($,` {
32
+ margin-right: 0 `).concat(o,`;
1380
33
  }
1381
34
 
1382
- body[`,
1383
- )
1384
- .concat(
1385
- tt,
1386
- `] {
1387
- `,
1388
- )
1389
- .concat(zt, ": ")
1390
- .concat(
1391
- a,
1392
- `px;
35
+ body[`).concat(tt,`] {
36
+ `).concat(Ut,": ").concat(a,`px;
1393
37
  }
1394
- `,
1395
- )
1396
- );
1397
- },
1398
- rr = function () {
1399
- var t = parseInt(document.body.getAttribute(tt) || "0", 10);
1400
- return isFinite(t) ? t : 0;
1401
- },
1402
- Ko = function () {
1403
- et.useEffect(function () {
1404
- return (
1405
- document.body.setAttribute(tt, (rr() + 1).toString()),
1406
- function () {
1407
- var t = rr() - 1;
1408
- t <= 0
1409
- ? document.body.removeAttribute(tt)
1410
- : document.body.setAttribute(tt, t.toString());
1411
- }
1412
- );
1413
- }, []);
1414
- },
1415
- qt = function (t) {
1416
- var e = t.noRelative,
1417
- r = t.noImportant,
1418
- o = t.gapMode,
1419
- i = o === void 0 ? "margin" : o;
1420
- Ko();
1421
- var n = et.useMemo(
1422
- function () {
1423
- return Xt(i);
1424
- },
1425
- [i],
1426
- );
1427
- return et.createElement(Go, {
1428
- styles: $o(n, !e, i, r ? "" : "!important"),
1429
- });
1430
- };
1431
- var Zt = !1;
1432
- if (typeof window < "u")
1433
- try {
1434
- (st = Object.defineProperty({}, "passive", {
1435
- get: function () {
1436
- return (Zt = !0), !0;
1437
- },
1438
- })),
1439
- window.addEventListener("test", st, st),
1440
- window.removeEventListener("test", st, st);
1441
- } catch {
1442
- Zt = !1;
1443
- }
1444
- var st,
1445
- Y = Zt ? { passive: !1 } : !1;
1446
- var Yo = function (t) {
1447
- return t.tagName === "TEXTAREA";
1448
- },
1449
- or = function (t, e) {
1450
- if (!(t instanceof Element)) return !1;
1451
- var r = window.getComputedStyle(t);
1452
- return (
1453
- r[e] !== "hidden" &&
1454
- !(r.overflowY === r.overflowX && !Yo(t) && r[e] === "visible")
1455
- );
1456
- },
1457
- Xo = function (t) {
1458
- return or(t, "overflowY");
1459
- },
1460
- qo = function (t) {
1461
- return or(t, "overflowX");
1462
- },
1463
- Qt = function (t, e) {
1464
- var r = e.ownerDocument,
1465
- o = e;
1466
- do {
1467
- typeof ShadowRoot < "u" && o instanceof ShadowRoot && (o = o.host);
1468
- var i = ir(t, o);
1469
- if (i) {
1470
- var n = nr(t, o),
1471
- c = n[1],
1472
- a = n[2];
1473
- if (c > a) return !0;
1474
- }
1475
- o = o.parentNode;
1476
- } while (o && o !== r.body);
1477
- return !1;
1478
- },
1479
- Zo = function (t) {
1480
- var e = t.scrollTop,
1481
- r = t.scrollHeight,
1482
- o = t.clientHeight;
1483
- return [e, r, o];
1484
- },
1485
- Qo = function (t) {
1486
- var e = t.scrollLeft,
1487
- r = t.scrollWidth,
1488
- o = t.clientWidth;
1489
- return [e, r, o];
1490
- },
1491
- ir = function (t, e) {
1492
- return t === "v" ? Xo(e) : qo(e);
1493
- },
1494
- nr = function (t, e) {
1495
- return t === "v" ? Zo(e) : Qo(e);
1496
- },
1497
- Jo = function (t, e) {
1498
- return t === "h" && e === "rtl" ? -1 : 1;
1499
- },
1500
- ar = function (t, e, r, o, i) {
1501
- var n = Jo(t, window.getComputedStyle(e).direction),
1502
- c = n * o,
1503
- a = r.target,
1504
- l = e.contains(a),
1505
- s = !1,
1506
- d = c > 0,
1507
- h = 0,
1508
- p = 0;
1509
- do {
1510
- if (!a) break;
1511
- var g = nr(t, a),
1512
- w = g[0],
1513
- u = g[1],
1514
- f = g[2],
1515
- x = u - f - n * w;
1516
- (w || x) && ir(t, a) && ((h += x), (p += w));
1517
- var y = a.parentNode;
1518
- a = y && y.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? y.host : y;
1519
- } while ((!l && a !== document.body) || (l && (e.contains(a) || e === a)));
1520
- return (
1521
- ((d && ((i && Math.abs(h) < 1) || (!i && c > h))) ||
1522
- (!d && ((i && Math.abs(p) < 1) || (!i && -c > p)))) &&
1523
- (s = !0),
1524
- s
1525
- );
1526
- };
1527
- var Ct = function (t) {
1528
- return "changedTouches" in t
1529
- ? [t.changedTouches[0].clientX, t.changedTouches[0].clientY]
1530
- : [0, 0];
1531
- },
1532
- cr = function (t) {
1533
- return [t.deltaX, t.deltaY];
1534
- },
1535
- lr = function (t) {
1536
- return t && "current" in t ? t.current : t;
1537
- },
1538
- ti = function (t, e) {
1539
- return t[0] === e[0] && t[1] === e[1];
1540
- },
1541
- ei = function (t) {
1542
- return `
1543
- .block-interactivity-`
1544
- .concat(
1545
- t,
1546
- ` {pointer-events: none;}
1547
- .allow-interactivity-`,
1548
- )
1549
- .concat(
1550
- t,
1551
- ` {pointer-events: all;}
1552
- `,
1553
- );
1554
- },
1555
- ri = 0,
1556
- rt = [];
1557
- function sr(t) {
1558
- var e = m.useRef([]),
1559
- r = m.useRef([0, 0]),
1560
- o = m.useRef(),
1561
- i = m.useState(ri++)[0],
1562
- n = m.useState(lt)[0],
1563
- c = m.useRef(t);
1564
- m.useEffect(
1565
- function () {
1566
- c.current = t;
1567
- },
1568
- [t],
1569
- ),
1570
- m.useEffect(
1571
- function () {
1572
- if (t.inert) {
1573
- document.body.classList.add("block-interactivity-".concat(i));
1574
- var u = Ye([t.lockRef.current], (t.shards || []).map(lr), !0).filter(
1575
- Boolean,
1576
- );
1577
- return (
1578
- u.forEach(function (f) {
1579
- return f.classList.add("allow-interactivity-".concat(i));
1580
- }),
1581
- function () {
1582
- document.body.classList.remove("block-interactivity-".concat(i)),
1583
- u.forEach(function (f) {
1584
- return f.classList.remove("allow-interactivity-".concat(i));
1585
- });
1586
- }
1587
- );
1588
- }
1589
- },
1590
- [t.inert, t.lockRef.current, t.shards],
1591
- );
1592
- var a = m.useCallback(function (u, f) {
1593
- if (
1594
- ("touches" in u && u.touches.length === 2) ||
1595
- (u.type === "wheel" && u.ctrlKey)
1596
- )
1597
- return !c.current.allowPinchZoom;
1598
- var x = Ct(u),
1599
- y = r.current,
1600
- C = "deltaX" in u ? u.deltaX : y[0] - x[0],
1601
- j = "deltaY" in u ? u.deltaY : y[1] - x[1],
1602
- M,
1603
- B = u.target,
1604
- k = Math.abs(C) > Math.abs(j) ? "h" : "v";
1605
- if ("touches" in u && k === "h" && B.type === "range") return !1;
1606
- var H = window.getSelection(),
1607
- Z = H && H.anchorNode,
1608
- it = Z ? Z === B || Z.contains(B) : !1;
1609
- if (it) return !1;
1610
- var pt = Qt(k, B);
1611
- if (!pt) return !0;
1612
- if ((pt ? (M = k) : ((M = k === "v" ? "h" : "v"), (pt = Qt(k, B))), !pt))
1613
- return !1;
1614
- if (
1615
- (!o.current && "changedTouches" in u && (C || j) && (o.current = M), !M)
1616
- )
1617
- return !0;
1618
- var ge = o.current || M;
1619
- return ar(ge, f, u, ge === "h" ? C : j, !0);
1620
- }, []),
1621
- l = m.useCallback(function (u) {
1622
- var f = u;
1623
- if (!(!rt.length || rt[rt.length - 1] !== n)) {
1624
- var x = "deltaY" in f ? cr(f) : Ct(f),
1625
- y = e.current.filter(function (M) {
1626
- return (
1627
- M.name === f.type &&
1628
- (M.target === f.target || f.target === M.shadowParent) &&
1629
- ti(M.delta, x)
1630
- );
1631
- })[0];
1632
- if (y && y.should) {
1633
- f.cancelable && f.preventDefault();
1634
- return;
1635
- }
1636
- if (!y) {
1637
- var C = (c.current.shards || [])
1638
- .map(lr)
1639
- .filter(Boolean)
1640
- .filter(function (M) {
1641
- return M.contains(f.target);
1642
- }),
1643
- j = C.length > 0 ? a(f, C[0]) : !c.current.noIsolation;
1644
- j && f.cancelable && f.preventDefault();
1645
- }
1646
- }
1647
- }, []),
1648
- s = m.useCallback(function (u, f, x, y) {
1649
- var C = { name: u, delta: f, target: x, should: y, shadowParent: oi(x) };
1650
- e.current.push(C),
1651
- setTimeout(function () {
1652
- e.current = e.current.filter(function (j) {
1653
- return j !== C;
1654
- });
1655
- }, 1);
1656
- }, []),
1657
- d = m.useCallback(function (u) {
1658
- (r.current = Ct(u)), (o.current = void 0);
1659
- }, []),
1660
- h = m.useCallback(function (u) {
1661
- s(u.type, cr(u), u.target, a(u, t.lockRef.current));
1662
- }, []),
1663
- p = m.useCallback(function (u) {
1664
- s(u.type, Ct(u), u.target, a(u, t.lockRef.current));
1665
- }, []);
1666
- m.useEffect(function () {
1667
- return (
1668
- rt.push(n),
1669
- t.setCallbacks({
1670
- onScrollCapture: h,
1671
- onWheelCapture: h,
1672
- onTouchMoveCapture: p,
1673
- }),
1674
- document.addEventListener("wheel", l, Y),
1675
- document.addEventListener("touchmove", l, Y),
1676
- document.addEventListener("touchstart", d, Y),
1677
- function () {
1678
- (rt = rt.filter(function (u) {
1679
- return u !== n;
1680
- })),
1681
- document.removeEventListener("wheel", l, Y),
1682
- document.removeEventListener("touchmove", l, Y),
1683
- document.removeEventListener("touchstart", d, Y);
1684
- }
1685
- );
1686
- }, []);
1687
- var g = t.removeScrollBar,
1688
- w = t.inert;
1689
- return m.createElement(
1690
- m.Fragment,
1691
- null,
1692
- w ? m.createElement(n, { styles: ei(i) }) : null,
1693
- g
1694
- ? m.createElement(qt, { noRelative: t.noRelative, gapMode: t.gapMode })
1695
- : null,
1696
- );
1697
- }
1698
- function oi(t) {
1699
- for (var e = null; t !== null; )
1700
- t instanceof ShadowRoot && ((e = t.host), (t = t.host)), (t = t.parentNode);
1701
- return e;
1702
- }
1703
- var ur = Ut(wt, sr);
1704
- var dr = bt.forwardRef(function (t, e) {
1705
- return bt.createElement(ct, P({}, t, { ref: e, sideCar: ur }));
1706
- });
1707
- dr.classNames = ct.classNames;
1708
- var Jt = dr;
1709
- var ii = function (t) {
1710
- if (typeof document > "u") return null;
1711
- var e = Array.isArray(t) ? t[0] : t;
1712
- return e.ownerDocument.body;
1713
- },
1714
- ot = new WeakMap(),
1715
- Rt = new WeakMap(),
1716
- Mt = {},
1717
- te = 0,
1718
- hr = function (t) {
1719
- return t && (t.host || hr(t.parentNode));
1720
- },
1721
- ni = function (t, e) {
1722
- return e
1723
- .map(function (r) {
1724
- if (t.contains(r)) return r;
1725
- var o = hr(r);
1726
- return o && t.contains(o)
1727
- ? o
1728
- : (console.error(
1729
- "aria-hidden",
1730
- r,
1731
- "in not contained inside",
1732
- t,
1733
- ". Doing nothing",
1734
- ),
1735
- null);
1736
- })
1737
- .filter(function (r) {
1738
- return !!r;
1739
- });
1740
- },
1741
- ai = function (t, e, r, o) {
1742
- var i = ni(e, Array.isArray(t) ? t : [t]);
1743
- Mt[r] || (Mt[r] = new WeakMap());
1744
- var n = Mt[r],
1745
- c = [],
1746
- a = new Set(),
1747
- l = new Set(i),
1748
- s = function (h) {
1749
- !h || a.has(h) || (a.add(h), s(h.parentNode));
1750
- };
1751
- i.forEach(s);
1752
- var d = function (h) {
1753
- !h ||
1754
- l.has(h) ||
1755
- Array.prototype.forEach.call(h.children, function (p) {
1756
- if (a.has(p)) d(p);
1757
- else
1758
- try {
1759
- var g = p.getAttribute(o),
1760
- w = g !== null && g !== "false",
1761
- u = (ot.get(p) || 0) + 1,
1762
- f = (n.get(p) || 0) + 1;
1763
- ot.set(p, u),
1764
- n.set(p, f),
1765
- c.push(p),
1766
- u === 1 && w && Rt.set(p, !0),
1767
- f === 1 && p.setAttribute(r, "true"),
1768
- w || p.setAttribute(o, "true");
1769
- } catch (x) {
1770
- console.error("aria-hidden: cannot operate on ", p, x);
1771
- }
1772
- });
1773
- };
1774
- return (
1775
- d(e),
1776
- a.clear(),
1777
- te++,
1778
- function () {
1779
- c.forEach(function (h) {
1780
- var p = ot.get(h) - 1,
1781
- g = n.get(h) - 1;
1782
- ot.set(h, p),
1783
- n.set(h, g),
1784
- p || (Rt.has(h) || h.removeAttribute(o), Rt.delete(h)),
1785
- g || h.removeAttribute(r);
1786
- }),
1787
- te--,
1788
- te ||
1789
- ((ot = new WeakMap()),
1790
- (ot = new WeakMap()),
1791
- (Rt = new WeakMap()),
1792
- (Mt = {}));
1793
- }
1794
- );
1795
- },
1796
- pr = function (t, e, r) {
1797
- r === void 0 && (r = "data-aria-hidden");
1798
- var o = Array.from(Array.isArray(t) ? t : [t]),
1799
- i = e || ii(t);
1800
- return i
1801
- ? (o.push.apply(o, Array.from(i.querySelectorAll("[aria-live], script"))),
1802
- ai(o, i, r, "aria-hidden"))
1803
- : function () {
1804
- return null;
1805
- };
1806
- };
1807
- import { Fragment as gr, jsx as R, jsxs as fr } from "react/jsx-runtime";
1808
- var Ft = "Dialog",
1809
- [kr, yc] = Re(Ft),
1810
- [ci, D] = kr(Ft),
1811
- xr = (t) => {
1812
- let {
1813
- __scopeDialog: e,
1814
- children: r,
1815
- open: o,
1816
- defaultOpen: i,
1817
- onOpenChange: n,
1818
- modal: c = !0,
1819
- } = t,
1820
- a = v.useRef(null),
1821
- l = v.useRef(null),
1822
- [s, d] = je({ prop: o, defaultProp: i ?? !1, onChange: n, caller: Ft });
1823
- return R(ci, {
1824
- scope: e,
1825
- triggerRef: a,
1826
- contentRef: l,
1827
- contentId: gt(),
1828
- titleId: gt(),
1829
- descriptionId: gt(),
1830
- open: s,
1831
- onOpenChange: d,
1832
- onOpenToggle: v.useCallback(() => d((h) => !h), [d]),
1833
- modal: c,
1834
- children: r,
1835
- });
1836
- };
1837
- xr.displayName = Ft;
1838
- var vr = "DialogTrigger",
1839
- yr = v.forwardRef((t, e) => {
1840
- let { __scopeDialog: r, ...o } = t,
1841
- i = D(vr, r),
1842
- n = I(e, i.triggerRef);
1843
- return R(N.button, {
1844
- type: "button",
1845
- "aria-haspopup": "dialog",
1846
- "aria-expanded": i.open,
1847
- "aria-controls": i.contentId,
1848
- "data-state": oe(i.open),
1849
- ...o,
1850
- ref: n,
1851
- onClick: _(t.onClick, i.onOpenToggle),
1852
- });
1853
- });
1854
- yr.displayName = vr;
1855
- var ee = "DialogPortal",
1856
- [li, mr] = kr(ee, { forceMount: void 0 }),
1857
- Lr = (t) => {
1858
- let { __scopeDialog: e, forceMount: r, children: o, container: i } = t,
1859
- n = D(ee, e);
1860
- return R(li, {
1861
- scope: e,
1862
- forceMount: r,
1863
- children: v.Children.map(o, (c) =>
1864
- R(at, {
1865
- present: r || n.open,
1866
- children: R(It, { asChild: !0, container: i, children: c }),
1867
- }),
1868
- ),
1869
- });
1870
- };
1871
- Lr.displayName = ee;
1872
- var jt = "DialogOverlay",
1873
- wr = v.forwardRef((t, e) => {
1874
- let r = mr(jt, t.__scopeDialog),
1875
- { forceMount: o = r.forceMount, ...i } = t,
1876
- n = D(jt, t.__scopeDialog);
1877
- return n.modal
1878
- ? R(at, { present: o || n.open, children: R(ui, { ...i, ref: e }) })
1879
- : null;
1880
- });
1881
- wr.displayName = jt;
1882
- var si = kt("DialogOverlay.RemoveScroll"),
1883
- ui = v.forwardRef((t, e) => {
1884
- let { __scopeDialog: r, ...o } = t,
1885
- i = D(jt, r);
1886
- return R(Jt, {
1887
- as: si,
1888
- allowPinchZoom: !0,
1889
- shards: [i.contentRef],
1890
- children: R(N.div, {
1891
- "data-state": oe(i.open),
1892
- ...o,
1893
- ref: e,
1894
- style: { pointerEvents: "auto", ...o.style },
1895
- }),
1896
- });
1897
- }),
1898
- X = "DialogContent",
1899
- Cr = v.forwardRef((t, e) => {
1900
- let r = mr(X, t.__scopeDialog),
1901
- { forceMount: o = r.forceMount, ...i } = t,
1902
- n = D(X, t.__scopeDialog);
1903
- return R(at, {
1904
- present: o || n.open,
1905
- children: n.modal ? R(di, { ...i, ref: e }) : R(hi, { ...i, ref: e }),
1906
- });
1907
- });
1908
- Cr.displayName = X;
1909
- var di = v.forwardRef((t, e) => {
1910
- let r = D(X, t.__scopeDialog),
1911
- o = v.useRef(null),
1912
- i = I(e, r.contentRef, o);
1913
- return (
1914
- v.useEffect(() => {
1915
- let n = o.current;
1916
- if (n) return pr(n);
1917
- }, []),
1918
- R(br, {
1919
- ...t,
1920
- ref: i,
1921
- trapFocus: r.open,
1922
- disableOutsidePointerEvents: !0,
1923
- onCloseAutoFocus: _(t.onCloseAutoFocus, (n) => {
1924
- n.preventDefault(), r.triggerRef.current?.focus();
1925
- }),
1926
- onPointerDownOutside: _(t.onPointerDownOutside, (n) => {
1927
- let c = n.detail.originalEvent,
1928
- a = c.button === 0 && c.ctrlKey === !0;
1929
- (c.button === 2 || a) && n.preventDefault();
1930
- }),
1931
- onFocusOutside: _(t.onFocusOutside, (n) => n.preventDefault()),
1932
- })
1933
- );
1934
- }),
1935
- hi = v.forwardRef((t, e) => {
1936
- let r = D(X, t.__scopeDialog),
1937
- o = v.useRef(!1),
1938
- i = v.useRef(!1);
1939
- return R(br, {
1940
- ...t,
1941
- ref: e,
1942
- trapFocus: !1,
1943
- disableOutsidePointerEvents: !1,
1944
- onCloseAutoFocus: (n) => {
1945
- t.onCloseAutoFocus?.(n),
1946
- n.defaultPrevented ||
1947
- (o.current || r.triggerRef.current?.focus(), n.preventDefault()),
1948
- (o.current = !1),
1949
- (i.current = !1);
1950
- },
1951
- onInteractOutside: (n) => {
1952
- t.onInteractOutside?.(n),
1953
- n.defaultPrevented ||
1954
- ((o.current = !0),
1955
- n.detail.originalEvent.type === "pointerdown" && (i.current = !0));
1956
- let c = n.target;
1957
- r.triggerRef.current?.contains(c) && n.preventDefault(),
1958
- n.detail.originalEvent.type === "focusin" &&
1959
- i.current &&
1960
- n.preventDefault();
1961
- },
1962
- });
1963
- }),
1964
- br = v.forwardRef((t, e) => {
1965
- let {
1966
- __scopeDialog: r,
1967
- trapFocus: o,
1968
- onOpenAutoFocus: i,
1969
- onCloseAutoFocus: n,
1970
- ...c
1971
- } = t,
1972
- a = D(X, r),
1973
- l = v.useRef(null),
1974
- s = I(e, l);
1975
- return (
1976
- Ke(),
1977
- fr(gr, {
1978
- children: [
1979
- R(Tt, {
1980
- asChild: !0,
1981
- loop: !0,
1982
- trapped: o,
1983
- onMountAutoFocus: i,
1984
- onUnmountAutoFocus: n,
1985
- children: R(Nt, {
1986
- role: "dialog",
1987
- id: a.contentId,
1988
- "aria-describedby": a.descriptionId,
1989
- "aria-labelledby": a.titleId,
1990
- "data-state": oe(a.open),
1991
- ...c,
1992
- ref: s,
1993
- onDismiss: () => a.onOpenChange(!1),
1994
- }),
1995
- }),
1996
- fr(gr, {
1997
- children: [
1998
- R(gi, { titleId: a.titleId }),
1999
- R(ki, { contentRef: l, descriptionId: a.descriptionId }),
2000
- ],
2001
- }),
2002
- ],
2003
- })
2004
- );
2005
- }),
2006
- re = "DialogTitle",
2007
- Rr = v.forwardRef((t, e) => {
2008
- let { __scopeDialog: r, ...o } = t,
2009
- i = D(re, r);
2010
- return R(N.h2, { id: i.titleId, ...o, ref: e });
2011
- });
2012
- Rr.displayName = re;
2013
- var Mr = "DialogDescription",
2014
- jr = v.forwardRef((t, e) => {
2015
- let { __scopeDialog: r, ...o } = t,
2016
- i = D(Mr, r);
2017
- return R(N.p, { id: i.descriptionId, ...o, ref: e });
2018
- });
2019
- jr.displayName = Mr;
2020
- var Fr = "DialogClose",
2021
- pi = v.forwardRef((t, e) => {
2022
- let { __scopeDialog: r, ...o } = t,
2023
- i = D(Fr, r);
2024
- return R(N.button, {
2025
- type: "button",
2026
- ...o,
2027
- ref: e,
2028
- onClick: _(t.onClick, () => i.onOpenChange(!1)),
2029
- });
2030
- });
2031
- pi.displayName = Fr;
2032
- function oe(t) {
2033
- return t ? "open" : "closed";
2034
- }
2035
- var Sr = "DialogTitleWarning",
2036
- [mc, Br] = be(Sr, { contentName: X, titleName: re, docsSlug: "dialog" }),
2037
- gi = ({ titleId: t }) => {
2038
- let e = Br(Sr),
2039
- r = `\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
38
+ `)},cr=function(){var t=parseInt(document.body.getAttribute(tt)||"0",10);return isFinite(t)?t:0},ei=function(){et.useEffect(function(){return document.body.setAttribute(tt,(cr()+1).toString()),function(){var t=cr()-1;t<=0?document.body.removeAttribute(tt):document.body.setAttribute(tt,t.toString())}},[])},Jt=function(t){var e=t.noRelative,r=t.noImportant,o=t.gapMode,i=o===void 0?"margin":o;ei();var n=et.useMemo(function(){return Qt(i)},[i]);return et.createElement(Jo,{styles:ti(n,!e,i,r?"":"!important")})};var te=!1;if(typeof window<"u")try{dt=Object.defineProperty({},"passive",{get:function(){return te=!0,!0}}),window.addEventListener("test",dt,dt),window.removeEventListener("test",dt,dt)}catch{te=!1}var dt,Y=te?{passive:!1}:!1;var ri=function(t){return t.tagName==="TEXTAREA"},lr=function(t,e){if(!(t instanceof Element))return!1;var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!ri(t)&&r[e]==="visible")},oi=function(t){return lr(t,"overflowY")},ii=function(t){return lr(t,"overflowX")},ee=function(t,e){var r=e.ownerDocument,o=e;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var i=sr(t,o);if(i){var n=ur(t,o),c=n[1],a=n[2];if(c>a)return!0}o=o.parentNode}while(o&&o!==r.body);return!1},ni=function(t){var e=t.scrollTop,r=t.scrollHeight,o=t.clientHeight;return[e,r,o]},ai=function(t){var e=t.scrollLeft,r=t.scrollWidth,o=t.clientWidth;return[e,r,o]},sr=function(t,e){return t==="v"?oi(e):ii(e)},ur=function(t,e){return t==="v"?ni(e):ai(e)},ci=function(t,e){return t==="h"&&e==="rtl"?-1:1},dr=function(t,e,r,o,i){var n=ci(t,window.getComputedStyle(e).direction),c=n*o,a=r.target,l=e.contains(a),s=!1,d=c>0,h=0,p=0;do{if(!a)break;var g=ur(t,a),w=g[0],u=g[1],f=g[2],x=u-f-n*w;(w||x)&&sr(t,a)&&(h+=x,p+=w);var y=a.parentNode;a=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(d&&(i&&Math.abs(h)<1||!i&&c>h)||!d&&(i&&Math.abs(p)<1||!i&&-c>p))&&(s=!0),s};var Mt=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},hr=function(t){return[t.deltaX,t.deltaY]},pr=function(t){return t&&"current"in t?t.current:t},li=function(t,e){return t[0]===e[0]&&t[1]===e[1]},si=function(t){return`
39
+ .block-interactivity-`.concat(t,` {pointer-events: none;}
40
+ .allow-interactivity-`).concat(t,` {pointer-events: all;}
41
+ `)},ui=0,rt=[];function gr(t){var e=m.useRef([]),r=m.useRef([0,0]),o=m.useRef(),i=m.useState(ui++)[0],n=m.useState(ut)[0],c=m.useRef(t);m.useEffect(function(){c.current=t},[t]),m.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var u=Je([t.lockRef.current],(t.shards||[]).map(pr),!0).filter(Boolean);return u.forEach(function(f){return f.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),u.forEach(function(f){return f.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var a=m.useCallback(function(u,f){if("touches"in u&&u.touches.length===2||u.type==="wheel"&&u.ctrlKey)return!c.current.allowPinchZoom;var x=Mt(u),y=r.current,C="deltaX"in u?u.deltaX:y[0]-x[0],j="deltaY"in u?u.deltaY:y[1]-x[1],M,B=u.target,k=Math.abs(C)>Math.abs(j)?"h":"v";if("touches"in u&&k==="h"&&B.type==="range")return!1;var z=window.getSelection(),Z=z&&z.anchorNode,it=Z?Z===B||Z.contains(B):!1;if(it)return!1;var gt=ee(k,B);if(!gt)return!0;if(gt?M=k:(M=k==="v"?"h":"v",gt=ee(k,B)),!gt)return!1;if(!o.current&&"changedTouches"in u&&(C||j)&&(o.current=M),!M)return!0;var ge=o.current||M;return dr(ge,f,u,ge==="h"?C:j,!0)},[]),l=m.useCallback(function(u){var f=u;if(!(!rt.length||rt[rt.length-1]!==n)){var x="deltaY"in f?hr(f):Mt(f),y=e.current.filter(function(M){return M.name===f.type&&(M.target===f.target||f.target===M.shadowParent)&&li(M.delta,x)})[0];if(y&&y.should){f.cancelable&&f.preventDefault();return}if(!y){var C=(c.current.shards||[]).map(pr).filter(Boolean).filter(function(M){return M.contains(f.target)}),j=C.length>0?a(f,C[0]):!c.current.noIsolation;j&&f.cancelable&&f.preventDefault()}}},[]),s=m.useCallback(function(u,f,x,y){var C={name:u,delta:f,target:x,should:y,shadowParent:di(x)};e.current.push(C),setTimeout(function(){e.current=e.current.filter(function(j){return j!==C})},1)},[]),d=m.useCallback(function(u){r.current=Mt(u),o.current=void 0},[]),h=m.useCallback(function(u){s(u.type,hr(u),u.target,a(u,t.lockRef.current))},[]),p=m.useCallback(function(u){s(u.type,Mt(u),u.target,a(u,t.lockRef.current))},[]);m.useEffect(function(){return rt.push(n),t.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:p}),document.addEventListener("wheel",l,Y),document.addEventListener("touchmove",l,Y),document.addEventListener("touchstart",d,Y),function(){rt=rt.filter(function(u){return u!==n}),document.removeEventListener("wheel",l,Y),document.removeEventListener("touchmove",l,Y),document.removeEventListener("touchstart",d,Y)}},[]);var g=t.removeScrollBar,w=t.inert;return m.createElement(m.Fragment,null,w?m.createElement(n,{styles:si(i)}):null,g?m.createElement(Jt,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function di(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}var fr=$t(Rt,gr);var kr=jt.forwardRef(function(t,e){return jt.createElement(st,P({},t,{ref:e,sideCar:fr}))});kr.classNames=st.classNames;var re=kr;var hi=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},ot=new WeakMap,Ft=new WeakMap,St={},oe=0,xr=function(t){return t&&(t.host||xr(t.parentNode))},pi=function(t,e){return e.map(function(r){if(t.contains(r))return r;var o=xr(r);return o&&t.contains(o)?o:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return!!r})},gi=function(t,e,r,o){var i=pi(e,Array.isArray(t)?t:[t]);St[r]||(St[r]=new WeakMap);var n=St[r],c=[],a=new Set,l=new Set(i),s=function(h){!h||a.has(h)||(a.add(h),s(h.parentNode))};i.forEach(s);var d=function(h){!h||l.has(h)||Array.prototype.forEach.call(h.children,function(p){if(a.has(p))d(p);else try{var g=p.getAttribute(o),w=g!==null&&g!=="false",u=(ot.get(p)||0)+1,f=(n.get(p)||0)+1;ot.set(p,u),n.set(p,f),c.push(p),u===1&&w&&Ft.set(p,!0),f===1&&p.setAttribute(r,"true"),w||p.setAttribute(o,"true")}catch(x){console.error("aria-hidden: cannot operate on ",p,x)}})};return d(e),a.clear(),oe++,function(){c.forEach(function(h){var p=ot.get(h)-1,g=n.get(h)-1;ot.set(h,p),n.set(h,g),p||(Ft.has(h)||h.removeAttribute(o),Ft.delete(h)),g||h.removeAttribute(r)}),oe--,oe||(ot=new WeakMap,ot=new WeakMap,Ft=new WeakMap,St={})}},vr=function(t,e,r){r===void 0&&(r="data-aria-hidden");var o=Array.from(Array.isArray(t)?t:[t]),i=e||hi(t);return i?(o.push.apply(o,Array.from(i.querySelectorAll("[aria-live], script"))),gi(o,i,r,"aria-hidden")):function(){return null}};import{Fragment as yr,jsx as R,jsxs as mr}from"react/jsx-runtime";var Wt="Dialog",[Lr,Ec]=Be(Wt),[fi,D]=Lr(Wt),wr=t=>{let{__scopeDialog:e,children:r,open:o,defaultOpen:i,onOpenChange:n,modal:c=!0}=t,a=v.useRef(null),l=v.useRef(null),[s,d]=Ee({prop:o,defaultProp:i??!1,onChange:n,caller:Wt});return R(fi,{scope:e,triggerRef:a,contentRef:l,contentId:xt(),titleId:xt(),descriptionId:xt(),open:s,onOpenChange:d,onOpenToggle:v.useCallback(()=>d(h=>!h),[d]),modal:c,children:r})};wr.displayName=Wt;var Cr="DialogTrigger",br=v.forwardRef((t,e)=>{let{__scopeDialog:r,...o}=t,i=D(Cr,r),n=I(e,i.triggerRef);return R(N.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":ae(i.open),...o,ref:n,onClick:_(t.onClick,i.onOpenToggle)})});br.displayName=Cr;var ie="DialogPortal",[ki,Rr]=Lr(ie,{forceMount:void 0}),Mr=t=>{let{__scopeDialog:e,forceMount:r,children:o,container:i}=t,n=D(ie,e);return R(ki,{scope:e,forceMount:r,children:v.Children.map(o,c=>R(lt,{present:r||n.open,children:R(zt,{asChild:!0,container:i,children:c})}))})};Mr.displayName=ie;var Bt="DialogOverlay",jr=v.forwardRef((t,e)=>{let r=Rr(Bt,t.__scopeDialog),{forceMount:o=r.forceMount,...i}=t,n=D(Bt,t.__scopeDialog);return n.modal?R(lt,{present:o||n.open,children:R(vi,{...i,ref:e})}):null});jr.displayName=Bt;var xi=yt("DialogOverlay.RemoveScroll"),vi=v.forwardRef((t,e)=>{let{__scopeDialog:r,...o}=t,i=D(Bt,r);return R(re,{as:xi,allowPinchZoom:!0,shards:[i.contentRef],children:R(N.div,{"data-state":ae(i.open),...o,ref:e,style:{pointerEvents:"auto",...o.style}})})}),X="DialogContent",Fr=v.forwardRef((t,e)=>{let r=Rr(X,t.__scopeDialog),{forceMount:o=r.forceMount,...i}=t,n=D(X,t.__scopeDialog);return R(lt,{present:o||n.open,children:n.modal?R(yi,{...i,ref:e}):R(mi,{...i,ref:e})})});Fr.displayName=X;var yi=v.forwardRef((t,e)=>{let r=D(X,t.__scopeDialog),o=v.useRef(null),i=I(e,r.contentRef,o);return v.useEffect(()=>{let n=o.current;if(n)return vr(n)},[]),R(Sr,{...t,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:_(t.onCloseAutoFocus,n=>{n.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:_(t.onPointerDownOutside,n=>{let c=n.detail.originalEvent,a=c.button===0&&c.ctrlKey===!0;(c.button===2||a)&&n.preventDefault()}),onFocusOutside:_(t.onFocusOutside,n=>n.preventDefault())})}),mi=v.forwardRef((t,e)=>{let r=D(X,t.__scopeDialog),o=v.useRef(!1),i=v.useRef(!1);return R(Sr,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:n=>{t.onCloseAutoFocus?.(n),n.defaultPrevented||(o.current||r.triggerRef.current?.focus(),n.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:n=>{t.onInteractOutside?.(n),n.defaultPrevented||(o.current=!0,n.detail.originalEvent.type==="pointerdown"&&(i.current=!0));let c=n.target;r.triggerRef.current?.contains(c)&&n.preventDefault(),n.detail.originalEvent.type==="focusin"&&i.current&&n.preventDefault()}})}),Sr=v.forwardRef((t,e)=>{let{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:n,...c}=t,a=D(X,r),l=v.useRef(null),s=I(e,l);return Qe(),mr(yr,{children:[R(_t,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:n,children:R(Tt,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":ae(a.open),...c,ref:s,onDismiss:()=>a.onOpenChange(!1)})}),mr(yr,{children:[R(wi,{titleId:a.titleId}),R(bi,{contentRef:l,descriptionId:a.descriptionId})]})]})}),ne="DialogTitle",Br=v.forwardRef((t,e)=>{let{__scopeDialog:r,...o}=t,i=D(ne,r);return R(N.h2,{id:i.titleId,...o,ref:e})});Br.displayName=ne;var Wr="DialogDescription",Er=v.forwardRef((t,e)=>{let{__scopeDialog:r,...o}=t,i=D(Wr,r);return R(N.p,{id:i.descriptionId,...o,ref:e})});Er.displayName=Wr;var Pr="DialogClose",Li=v.forwardRef((t,e)=>{let{__scopeDialog:r,...o}=t,i=D(Pr,r);return R(N.button,{type:"button",...o,ref:e,onClick:_(t.onClick,()=>i.onOpenChange(!1))})});Li.displayName=Pr;function ae(t){return t?"open":"closed"}var Nr="DialogTitleWarning",[Pc,Ar]=Se(Nr,{contentName:X,titleName:ne,docsSlug:"dialog"}),wi=({titleId:t})=>{let e=Ar(Nr),r=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
2040
42
 
2041
43
  If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
2042
44
 
2043
- For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;
2044
- return (
2045
- v.useEffect(() => {
2046
- t && (document.getElementById(t) || console.error(r));
2047
- }, [r, t]),
2048
- null
2049
- );
2050
- },
2051
- fi = "DialogDescriptionWarning",
2052
- ki = ({ contentRef: t, descriptionId: e }) => {
2053
- let o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Br(fi).contentName}}.`;
2054
- return (
2055
- v.useEffect(() => {
2056
- let i = t.current?.getAttribute("aria-describedby");
2057
- e && i && (document.getElementById(e) || console.warn(o));
2058
- }, [o, t, e]),
2059
- null
2060
- );
2061
- },
2062
- Wr = xr,
2063
- Er = yr,
2064
- Pr = Lr,
2065
- ie = wr,
2066
- ne = Cr,
2067
- ae = Rr,
2068
- ce = jr;
2069
- import { cva as vi } from "class-variance-authority";
2070
- import { jsx as q, jsxs as Ri } from "react/jsx-runtime";
2071
- var Nr = Wr,
2072
- Ar = Er;
2073
- var yi = Pr,
2074
- Or = ut.forwardRef(({ className: t, ...e }, r) =>
2075
- q(ie, {
2076
- className: b(
2077
- "kui:fixed kui:inset-0 kui:z-50 kui:data-[state=open]:animate-in kui:data-[state=closed]:animate-out kui:data-[state=closed]:fade-out-0 kui:data-[state=open]:fade-in-0",
2078
- t,
2079
- ),
2080
- ...e,
2081
- ref: r,
2082
- }),
2083
- );
2084
- Or.displayName = ie.displayName;
2085
- var mi = vi(
2086
- "kui:fixed kui:z-50 kui:gap-4 kui:shadow-lg kui:transition kui:ease-in-out kui:data-[state=closed]:duration-300 kui:data-[state=open]:duration-500 kui:data-[state=open]:animate-in kui:data-[state=closed]:animate-out",
2087
- {
2088
- variants: {
2089
- side: {
2090
- top: "kui:inset-x-0 kui:top-0 kui:border-b kui:data-[state=closed]:slide-out-to-top kui:data-[state=open]:slide-in-from-top",
2091
- bottom:
2092
- "kui:inset-x-0 kui:bottom-0 kui:border-t kui:data-[state=closed]:slide-out-to-bottom kui:data-[state=open]:slide-in-from-bottom",
2093
- left: "kui:inset-y-0 kui:left-0 kui:h-full kui:w-3/4 kui:border-r kui:data-[state=closed]:slide-out-to-left kui:data-[state=open]:slide-in-from-left kui:sm:max-w-sm",
2094
- right:
2095
- "kui:inset-y-0 kui:right-0 kui:h-full kui:w-3/4 kui:border-l kui:data-[state=closed]:slide-out-to-right kui:data-[state=open]:slide-in-from-right kui:sm:max-w-sm",
2096
- },
2097
- },
2098
- defaultVariants: { side: "right" },
2099
- },
2100
- ),
2101
- le = ut.forwardRef(
2102
- ({ side: t = "right", className: e, children: r, ...o }, i) =>
2103
- Ri(yi, {
2104
- children: [
2105
- q(Or, {}),
2106
- q(ne, {
2107
- ref: i,
2108
- className: b(mi({ side: t }), e),
2109
- ...o,
2110
- children: r,
2111
- }),
2112
- ],
2113
- }),
2114
- );
2115
- le.displayName = ne.displayName;
2116
- var Li = ({ className: t, ...e }) =>
2117
- q("div", {
2118
- className: b(
2119
- "kui:flex kui:flex-col kui:space-y-2 kui:text-center kui:sm:text-left",
2120
- t,
2121
- ),
2122
- ...e,
2123
- });
2124
- Li.displayName = "SheetHeader";
2125
- var wi = ({ className: t, ...e }) =>
2126
- q("div", {
2127
- className: b(
2128
- "kui:flex kui:flex-col-reverse kui:sm:flex-row kui:sm:justify-end kui:sm:space-x-2",
2129
- t,
2130
- ),
2131
- ...e,
2132
- });
2133
- wi.displayName = "SheetFooter";
2134
- var Ci = ut.forwardRef(({ className: t, ...e }, r) =>
2135
- q(ae, {
2136
- ref: r,
2137
- className: b("kui:text-lg kui:font-semibold kui:text-foreground", t),
2138
- ...e,
2139
- }),
2140
- );
2141
- Ci.displayName = ae.displayName;
2142
- var bi = ut.forwardRef(({ className: t, ...e }, r) =>
2143
- q(ce, {
2144
- ref: r,
2145
- className: b("kui:text-sm kui:text-muted-foreground", t),
2146
- ...e,
2147
- }),
2148
- );
2149
- bi.displayName = ce.displayName;
2150
- import { Menu as ji, X as Fi } from "lucide-react";
2151
- import { jsx as S, jsxs as se } from "react/jsx-runtime";
2152
- function Si({
2153
- navItems: t = [],
2154
- logoHref: e = "/",
2155
- onLogoClick: r = () => {},
2156
- logo: o,
2157
- secondaryLogo: i,
2158
- }) {
2159
- let [n, c] = Mi(!1);
2160
- return S("header", {
2161
- className:
2162
- "kui:sticky kui:top-0 kui:z-60 kui:w-full kui:border-b kui:border-border/20 kui:bg-background/95 kui:backdrop-blur kui:supports-backdrop-filter:bg-background/60 kui:pointer-events-auto kui:uppercase",
2163
- style: { pointerEvents: "auto" },
2164
- children: se("div", {
2165
- className:
2166
- "kui:container kui:flex kui:h-16 kui:items-center kui:justify-between kui:px-4 kui:md:px-6",
2167
- children: [
2168
- se("a", {
2169
- href: e,
2170
- className:
2171
- "kui:flex kui:items-center kui:gap-1 kui:cursor-pointer kui:group",
2172
- onClick: () => {
2173
- r(), c(!1);
2174
- },
2175
- children: [
2176
- S("h1", {
2177
- className:
2178
- "kui:font-ddin kui:text-1xl kui:md:text-2xl kui:tracking-tight",
2179
- children: o,
2180
- }),
2181
- i &&
2182
- S("span", {
2183
- className:
2184
- "kui:font-ddin kui:text-1xl kui:md:text-2xl kui:tracking-tight kui:text-muted-foreground",
2185
- children: i,
2186
- }),
2187
- ],
2188
- }),
2189
- S("div", {
2190
- className: "kui:hidden kui:md:flex kui:items-center kui:gap-6",
2191
- children: S(
2192
- () =>
2193
- S(fe, {
2194
- children: S(ke, {
2195
- className: "kui:gap-2 kui:md:gap-6",
2196
- children: t.map((l, s) =>
2197
- S(
2198
- xe,
2199
- {
2200
- children: S(ye, {
2201
- className: b(
2202
- ve(),
2203
- typeof l.label != "string" &&
2204
- "kui:h-12 kui:w-12 kui:p-0 kui:bg-transparent kui:hover:bg-muted/50 kui:flex kui:items-center kui:justify-center kui:rounded-full",
2205
- ),
2206
- href: l.href,
2207
- onClick: l.onClick,
2208
- children:
2209
- typeof l.label == "string"
2210
- ? S("span", {
2211
- className: "kui:font-ddin kui:text-1xl",
2212
- children: l.label,
2213
- })
2214
- : l.label,
2215
- }),
2216
- },
2217
- l.href || (typeof l.label == "string" ? l.label : s),
2218
- ),
2219
- ),
2220
- }),
2221
- }),
2222
- {},
2223
- ),
2224
- }),
2225
- se(Nr, {
2226
- open: n,
2227
- onOpenChange: c,
2228
- children: [
2229
- S(Ar, {
2230
- asChild: !0,
2231
- className: "kui:md:hidden",
2232
- children: S(me, {
2233
- variant: "ghost",
2234
- size: "icon",
2235
- "aria-label": "Toggle menu",
2236
- children: n
2237
- ? S(Fi, { className: "kui:h-6 kui:w-6" })
2238
- : S(ji, { className: "kui:h-6 kui:w-6" }),
2239
- }),
2240
- }),
2241
- S(le, {
2242
- side: "right",
2243
- className:
2244
- "kui:w-100 kui:border-l kui:border-border/30 kui:mt-16",
2245
- children: S("div", {
2246
- className:
2247
- "kui:flex kui:min-h-[calc(100vh-5rem)] kui:flex-col kui:justify-center kui:px-8 kui:py-12 kui:bg-background",
2248
- children: S("nav", {
2249
- className: "kui:flex kui:flex-col kui:gap-12 kui:md:gap-16",
2250
- children: t.map((l, s) =>
2251
- S(
2252
- "a",
2253
- {
2254
- href: l.href,
2255
- onClick: () => {
2256
- l.onClick && l.onClick(), c(!1);
2257
- },
2258
- className: `
45
+ For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return v.useEffect(()=>{t&&(document.getElementById(t)||console.error(r))},[r,t]),null},Ci="DialogDescriptionWarning",bi=({contentRef:t,descriptionId:e})=>{let o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Ar(Ci).contentName}}.`;return v.useEffect(()=>{let i=t.current?.getAttribute("aria-describedby");e&&i&&(document.getElementById(e)||console.warn(o))},[o,t,e]),null},Or=wr,Tr=br,Ir=Mr,ce=jr,le=Fr,se=Br,ue=Er;import{cva as Mi}from"class-variance-authority";import*as ht from"react";import{jsx as q,jsxs as Pi}from"react/jsx-runtime";var Dr=Or,_r=Tr;var ji=Ir,zr=ht.forwardRef(({className:t,...e},r)=>q(ce,{className:b("kui:fixed kui:inset-0 kui:z-50 kui:data-[state=open]:animate-in kui:data-[state=closed]:animate-out kui:data-[state=closed]:fade-out-0 kui:data-[state=open]:fade-in-0",t),...e,ref:r}));zr.displayName=ce.displayName;var Fi=Mi("kui:fixed kui:z-50 kui:gap-4 kui:shadow-lg kui:transition kui:ease-in-out kui:data-[state=closed]:duration-300 kui:data-[state=open]:duration-500 kui:data-[state=open]:animate-in kui:data-[state=closed]:animate-out",{variants:{side:{top:"kui:inset-x-0 kui:top-0 kui:border-b kui:data-[state=closed]:slide-out-to-top kui:data-[state=open]:slide-in-from-top",bottom:"kui:inset-x-0 kui:bottom-0 kui:border-t kui:data-[state=closed]:slide-out-to-bottom kui:data-[state=open]:slide-in-from-bottom",left:"kui:inset-y-0 kui:left-0 kui:h-full kui:w-3/4 kui:border-r kui:data-[state=closed]:slide-out-to-left kui:data-[state=open]:slide-in-from-left kui:sm:max-w-sm",right:"kui:inset-y-0 kui:right-0 kui:h-full kui:w-3/4 kui:border-l kui:data-[state=closed]:slide-out-to-right kui:data-[state=open]:slide-in-from-right kui:sm:max-w-sm"}},defaultVariants:{side:"right"}}),de=ht.forwardRef(({side:t="right",className:e,children:r,...o},i)=>Pi(ji,{children:[q(zr,{}),q(le,{ref:i,className:b(Fi({side:t}),e),...o,children:r})]}));de.displayName=le.displayName;var Si=({className:t,...e})=>q("div",{className:b("kui:flex kui:flex-col kui:space-y-2 kui:text-center kui:sm:text-left",t),...e});Si.displayName="SheetHeader";var Bi=({className:t,...e})=>q("div",{className:b("kui:flex kui:flex-col-reverse kui:sm:flex-row kui:sm:justify-end kui:sm:space-x-2",t),...e});Bi.displayName="SheetFooter";var Wi=ht.forwardRef(({className:t,...e},r)=>q(se,{ref:r,className:b("kui:text-lg kui:font-semibold kui:text-foreground",t),...e}));Wi.displayName=se.displayName;var Ei=ht.forwardRef(({className:t,...e},r)=>q(ue,{ref:r,className:b("kui:text-sm kui:text-muted-foreground",t),...e}));Ei.displayName=ue.displayName;import{jsx as S,jsxs as he}from"react/jsx-runtime";function Ti({navItems:t=[],logoHref:e="/",onLogoClick:r=()=>{},logo:o,secondaryLogo:i}){let[n,c]=Oi(!1);return S("header",{className:"kui:sticky kui:top-0 kui:z-60 kui:w-full kui:border-b kui:border-border/20 kui:bg-background/95 kui:backdrop-blur kui:supports-backdrop-filter:bg-background/60 kui:pointer-events-auto kui:uppercase",style:{pointerEvents:"auto"},children:he("div",{className:"kui:container kui:flex kui:h-16 kui:items-center kui:justify-between kui:px-4 kui:md:px-6",children:[he("a",{href:e,className:"kui:flex kui:items-center kui:gap-1 kui:cursor-pointer kui:group",onClick:()=>{r(),c(!1)},children:[S("h1",{className:"kui:font-ddin kui:text-1xl kui:md:text-2xl kui:tracking-tight",children:o}),i&&S("span",{className:"kui:font-ddin kui:text-1xl kui:md:text-2xl kui:tracking-tight kui:text-muted-foreground",children:i})]}),S("div",{className:"kui:hidden kui:md:flex kui:items-center kui:gap-6",children:S(()=>S(Le,{children:S(we,{className:"kui:gap-2 kui:md:gap-6",children:t.map((l,s)=>S(Ce,{children:S(Re,{className:b(be(),typeof l.label!="string"&&"kui:h-12 kui:w-12 kui:p-0 kui:bg-transparent kui:hover:bg-muted/50 kui:flex kui:items-center kui:justify-center kui:rounded-full"),href:l.href,onClick:l.onClick,children:typeof l.label=="string"?S("span",{className:"kui:font-ddin kui:text-1xl",children:l.label}):l.label})},l.href||(typeof l.label=="string"?l.label:s)))})}),{})}),he(Dr,{open:n,onOpenChange:c,children:[S(_r,{asChild:!0,className:"kui:md:hidden",children:S(me,{variant:"ghost",size:"icon","aria-label":"Toggle menu",children:n?S(Ai,{className:"kui:h-6 kui:w-6"}):S(Ni,{className:"kui:h-6 kui:w-6"})})}),S(de,{side:"right",className:"kui:w-100 kui:border-l kui:border-border/30 kui:mt-16",children:S("div",{className:"kui:flex kui:min-h-[calc(100vh-5rem)] kui:flex-col kui:justify-center kui:px-8 kui:py-12 kui:bg-background",children:S("nav",{className:"kui:flex kui:flex-col kui:gap-12 kui:md:gap-16",children:t.map((l,s)=>S("a",{href:l.href,onClick:()=>{l.onClick&&l.onClick(),c(!1)},className:`
2259
46
  kui:w-full kui:text-left
2260
47
  kui:text-3xl kui:md:text-4xl
2261
48
  kui:font-ddin kui:font-medium kui:tracking-wider
@@ -2264,385 +51,5 @@ function Si({
2264
51
  kui:py-4 kui:px-4 kui:rounded-lg
2265
52
  kui:hover:bg-muted/30 kui:focus:outline-none kui:focus:ring-2 kui:focus:ring-ring
2266
53
  kui:block
2267
- `,
2268
- children:
2269
- typeof l.label == "string"
2270
- ? S("span", {
2271
- className: "kui:font-ddin",
2272
- children: l.label,
2273
- })
2274
- : l.label,
2275
- },
2276
- l.href || (typeof l.label == "string" ? l.label : s),
2277
- ),
2278
- ),
2279
- }),
2280
- }),
2281
- }),
2282
- ],
2283
- }),
2284
- ],
2285
- }),
2286
- });
2287
- }
2288
- import dt from "react";
2289
- import Tr from "react";
2290
- var ue = {
2291
- color: void 0,
2292
- size: void 0,
2293
- className: void 0,
2294
- style: void 0,
2295
- attr: void 0,
2296
- },
2297
- de = Tr.createContext && Tr.createContext(ue);
2298
- var Bi = ["attr", "size", "title"];
2299
- function Wi(t, e) {
2300
- if (t == null) return {};
2301
- var r,
2302
- o,
2303
- i = Ei(t, e);
2304
- if (Object.getOwnPropertySymbols) {
2305
- var n = Object.getOwnPropertySymbols(t);
2306
- for (o = 0; o < n.length; o++)
2307
- (r = n[o]),
2308
- e.indexOf(r) === -1 &&
2309
- {}.propertyIsEnumerable.call(t, r) &&
2310
- (i[r] = t[r]);
2311
- }
2312
- return i;
2313
- }
2314
- function Ei(t, e) {
2315
- if (t == null) return {};
2316
- var r = {};
2317
- for (var o in t)
2318
- if ({}.hasOwnProperty.call(t, o)) {
2319
- if (e.indexOf(o) !== -1) continue;
2320
- r[o] = t[o];
2321
- }
2322
- return r;
2323
- }
2324
- function St() {
2325
- return (
2326
- (St = Object.assign
2327
- ? Object.assign.bind()
2328
- : function (t) {
2329
- for (var e = 1; e < arguments.length; e++) {
2330
- var r = arguments[e];
2331
- for (var o in r) ({}).hasOwnProperty.call(r, o) && (t[o] = r[o]);
2332
- }
2333
- return t;
2334
- }),
2335
- St.apply(null, arguments)
2336
- );
2337
- }
2338
- function Ir(t, e) {
2339
- var r = Object.keys(t);
2340
- if (Object.getOwnPropertySymbols) {
2341
- var o = Object.getOwnPropertySymbols(t);
2342
- e &&
2343
- (o = o.filter(function (i) {
2344
- return Object.getOwnPropertyDescriptor(t, i).enumerable;
2345
- })),
2346
- r.push.apply(r, o);
2347
- }
2348
- return r;
2349
- }
2350
- function Bt(t) {
2351
- for (var e = 1; e < arguments.length; e++) {
2352
- var r = arguments[e] != null ? arguments[e] : {};
2353
- e % 2
2354
- ? Ir(Object(r), !0).forEach(function (o) {
2355
- Pi(t, o, r[o]);
2356
- })
2357
- : Object.getOwnPropertyDescriptors
2358
- ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r))
2359
- : Ir(Object(r)).forEach(function (o) {
2360
- Object.defineProperty(t, o, Object.getOwnPropertyDescriptor(r, o));
2361
- });
2362
- }
2363
- return t;
2364
- }
2365
- function Pi(t, e, r) {
2366
- return (
2367
- (e = Ni(e)) in t
2368
- ? Object.defineProperty(t, e, {
2369
- value: r,
2370
- enumerable: !0,
2371
- configurable: !0,
2372
- writable: !0,
2373
- })
2374
- : (t[e] = r),
2375
- t
2376
- );
2377
- }
2378
- function Ni(t) {
2379
- var e = Ai(t, "string");
2380
- return typeof e == "symbol" ? e : e + "";
2381
- }
2382
- function Ai(t, e) {
2383
- if (typeof t != "object" || !t) return t;
2384
- var r = t[Symbol.toPrimitive];
2385
- if (r !== void 0) {
2386
- var o = r.call(t, e || "default");
2387
- if (typeof o != "object") return o;
2388
- throw new TypeError("@@toPrimitive must return a primitive value.");
2389
- }
2390
- return (e === "string" ? String : Number)(t);
2391
- }
2392
- function Dr(t) {
2393
- return (
2394
- t &&
2395
- t.map((e, r) =>
2396
- dt.createElement(e.tag, Bt({ key: r }, e.attr), Dr(e.child)),
2397
- )
2398
- );
2399
- }
2400
- function _r(t) {
2401
- return (e) =>
2402
- dt.createElement(Oi, St({ attr: Bt({}, t.attr) }, e), Dr(t.child));
2403
- }
2404
- function Oi(t) {
2405
- var e = (r) => {
2406
- var { attr: o, size: i, title: n } = t,
2407
- c = Wi(t, Bi),
2408
- a = i || r.size || "1em",
2409
- l;
2410
- return (
2411
- r.className && (l = r.className),
2412
- t.className && (l = (l ? l + " " : "") + t.className),
2413
- dt.createElement(
2414
- "svg",
2415
- St(
2416
- { stroke: "currentColor", fill: "currentColor", strokeWidth: "0" },
2417
- r.attr,
2418
- o,
2419
- c,
2420
- {
2421
- className: l,
2422
- style: Bt(Bt({ color: t.color || r.color }, r.style), t.style),
2423
- height: a,
2424
- width: a,
2425
- xmlns: "http://www.w3.org/2000/svg",
2426
- },
2427
- ),
2428
- n && dt.createElement("title", null, n),
2429
- t.children,
2430
- )
2431
- );
2432
- };
2433
- return de !== void 0
2434
- ? dt.createElement(de.Consumer, null, (r) => e(r))
2435
- : e(ue);
2436
- }
2437
- function zr(t) {
2438
- return _r({
2439
- tag: "svg",
2440
- attr: {
2441
- viewBox: "0 0 24 24",
2442
- fill: "none",
2443
- stroke: "currentColor",
2444
- strokeWidth: "2",
2445
- strokeLinecap: "round",
2446
- strokeLinejoin: "round",
2447
- },
2448
- child: [
2449
- {
2450
- tag: "path",
2451
- attr: { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" },
2452
- child: [],
2453
- },
2454
- { tag: "polyline", attr: { points: "15 3 21 3 21 9" }, child: [] },
2455
- {
2456
- tag: "line",
2457
- attr: { x1: "10", y1: "14", x2: "21", y2: "3" },
2458
- child: [],
2459
- },
2460
- ],
2461
- })(t);
2462
- }
2463
- import { jsx as z, jsxs as he } from "react/jsx-runtime";
2464
- function Ti({ links: t = [], socials: e = [], copyright: r, ...o }) {
2465
- return z("footer", {
2466
- className:
2467
- "kui:bg-background kui:pt-12 kui:pb-8 kui:w-full kui:font-ddin kui:uppercase kui:text-[10px] kui:sm:text-xs",
2468
- ...o,
2469
- children: z("div", {
2470
- className: "kui:container kui:mx-auto kui:px-6 kui:max-w-[1400px]",
2471
- children: he("div", {
2472
- className:
2473
- "kui:flex kui:flex-col kui:md:flex-row kui:items-center kui:justify-between kui:gap-6 kui:md:gap-4 kui:text-muted-foreground",
2474
- children: [
2475
- z("div", {
2476
- className:
2477
- "kui:flex kui:items-center kui:gap-6 kui:order-3 kui:md:order-1",
2478
- children: e.map((i) => {
2479
- let n = i.icon;
2480
- return z(
2481
- "a",
2482
- {
2483
- href: i.href,
2484
- className: "kui:hover:text-foreground kui:transition-colors",
2485
- target: "_blank",
2486
- rel: "noopener noreferrer",
2487
- "aria-label": i.label ?? "Social link",
2488
- children: z(n, { className: "kui:w-4 kui:h-4" }),
2489
- },
2490
- i.href,
2491
- );
2492
- }),
2493
- }),
2494
- z("ul", {
2495
- className:
2496
- "kui:flex kui:flex-wrap kui:justify-center kui:items-center kui:gap-6 kui:md:gap-10 kui:order-1 kui:md:order-2 kui:font-medium kui:tracking-widest kui:text-foreground",
2497
- children: t.map((i) =>
2498
- z(
2499
- "li",
2500
- {
2501
- children: he("a", {
2502
- href: i.href,
2503
- onClick: i.onClick,
2504
- target: i.isExternal ? "_blank" : void 0,
2505
- rel: i.isExternal ? "noopener noreferrer" : void 0,
2506
- className:
2507
- "kui:inline-flex kui:items-center kui:gap-1.5 kui:hover:text-muted-foreground kui:transition-colors",
2508
- children: [
2509
- z("span", { children: i.label }),
2510
- i.isExternal &&
2511
- z(zr, {
2512
- className:
2513
- "kui:inline-block kui:h-3.5 kui:w-3.5 kui:text-muted-foreground/60",
2514
- "aria-hidden": "true",
2515
- }),
2516
- ],
2517
- }),
2518
- },
2519
- i.href,
2520
- ),
2521
- ),
2522
- }),
2523
- r &&
2524
- z("div", {
2525
- className:
2526
- "kui:order-2 kui:md:order-3 kui:font-medium kui:tracking-widest kui:whitespace-nowrap",
2527
- children: he("a", {
2528
- href: r?.companyUrl,
2529
- target: "_blank",
2530
- rel: "noopener noreferrer",
2531
- className: "kui:focus-visible:underline kui:outline-none",
2532
- children: [
2533
- "\xA9 ",
2534
- new Date().getFullYear(),
2535
- " ",
2536
- r?.companyName,
2537
- ],
2538
- }),
2539
- }),
2540
- ],
2541
- }),
2542
- }),
2543
- });
2544
- }
2545
- import { jsx as Hr, jsxs as pe } from "react/jsx-runtime";
2546
- function Ii({ header: t, sidebar: e, footer: r, children: o }) {
2547
- return pe("div", {
2548
- className:
2549
- "kui:h-screen kui:flex kui:flex-col kui:overflow-hidden kui:bg-background kui:text-foreground kui:font-ddin",
2550
- children: [
2551
- t,
2552
- pe("div", {
2553
- className: "kui:flex kui:flex-1 kui:overflow-hidden",
2554
- children: [
2555
- e &&
2556
- Hr("aside", {
2557
- className:
2558
- "kui:w-72 kui:shrink-0 kui:overflow-y-auto kui:border-r kui:border-border kui:bg-background kui:h-full",
2559
- children: e,
2560
- }),
2561
- pe("main", {
2562
- className:
2563
- "kui:flex-1 kui:overflow-y-auto kui:flex kui:flex-col kui:h-full",
2564
- children: [Hr("div", { className: "kui:flex-1", children: o }), r],
2565
- }),
2566
- ],
2567
- }),
2568
- ],
2569
- });
2570
- }
2571
- import { jsx as ht, jsxs as _i } from "react/jsx-runtime";
2572
- function Di({ sections: t = [], className: e }) {
2573
- return ht("div", {
2574
- className: b("kui:p-4 kui:flex kui:flex-col kui:h-full", e),
2575
- children: ht("div", {
2576
- className: "kui:flex-1 kui:overflow-y-auto kui:space-y-8",
2577
- children: t.map((r) =>
2578
- _i(
2579
- "div",
2580
- {
2581
- children: [
2582
- ht("h3", {
2583
- className:
2584
- "kui:text-xs kui:font-medium kui:tracking-widest kui:text-muted-foreground kui:mb-2 kui:uppercase",
2585
- children: r.title,
2586
- }),
2587
- ht("nav", {
2588
- className: "kui:flex kui:flex-col kui:gap-1",
2589
- children: r.links.map((o, i) =>
2590
- ht(
2591
- "a",
2592
- {
2593
- href: o.href,
2594
- onClick: (n) => {
2595
- o.onClick && (n.preventDefault(), o.onClick());
2596
- },
2597
- className: b(
2598
- "kui:flex kui:items-center kui:gap-2 kui:px-3 kui:py-2 kui:rounded-lg kui:text-sm kui:font-medium kui:hover:bg-accent kui:hover:text-accent-foreground kui:transition-colors",
2599
- o.isActive
2600
- ? "kui:bg-accent kui:text-accent-foreground"
2601
- : "kui:text-foreground/70",
2602
- ),
2603
- children: o.label,
2604
- },
2605
- `${o.label}-${i}`,
2606
- ),
2607
- ),
2608
- }),
2609
- ],
2610
- },
2611
- r.title,
2612
- ),
2613
- ),
2614
- }),
2615
- });
2616
- }
2617
- import * as Ur from "react";
2618
- import { ShoppingCart as zi } from "lucide-react";
2619
- import { jsx as Vr, jsxs as Hi } from "react/jsx-runtime";
2620
- var Gr = Ur.forwardRef(
2621
- ({ variant: t = "none", itemCount: e = 0, children: r, ...o }, i) =>
2622
- Hi("button", {
2623
- ref: i,
2624
- className:
2625
- "kui:relative kui:flex kui:items-center kui:justify-center kui:rounded-full kui:transition-all kui:duration-200 kui:outline-none kui:focus-visible:ring-2 kui:focus-visible:ring-ring kui:focus-visible:ring-offset-2 kui:disabled:pointer-events-none kui:disabled:opacity-50 kui:hover:bg-muted/50 kui:active:scale-95 kui:h-12 kui:w-12 kui:p-0 kui:bg-transparent",
2626
- ...o,
2627
- children: [
2628
- t === "cart"
2629
- ? Vr(zi, { className: "kui:text-foreground kui:h-7 kui:w-7" })
2630
- : r,
2631
- e > 0 &&
2632
- Vr("span", {
2633
- className:
2634
- "kui:absolute kui:-top-1.5 kui:-right-1.5 kui:flex kui:items-center kui:justify-center kui:rounded-full kui:bg-primary kui:text-primary-foreground kui:text-[10px] kui:font-bold kui:px-1.5 kui:py-0.5 kui:min-w-[18px] kui:h-[18px] kui:shadow-sm kui:animate-in kui:zoom-in kui:duration-300",
2635
- children: e > 99 ? "99+" : e,
2636
- }),
2637
- ],
2638
- }),
2639
- );
2640
- Gr.displayName = "IconWithBadge";
2641
- export {
2642
- Ti as Footer,
2643
- Si as Header,
2644
- Gr as IconWithBadge,
2645
- Ii as Layout,
2646
- Di as Sidebar,
2647
- };
2648
- //# sourceMappingURL=index.js.map
54
+ `,children:typeof l.label=="string"?S("span",{className:"kui:font-ddin",children:l.label}):l.label},l.href||(typeof l.label=="string"?l.label:s)))})})})]})]})})}import{jsx as Hr,jsxs as pe}from"react/jsx-runtime";function Ii({header:t,sidebar:e,footer:r,children:o}){return pe("div",{className:"kui:h-screen kui:flex kui:flex-col kui:overflow-hidden kui:bg-background kui:text-foreground kui:font-ddin",children:[t,pe("div",{className:"kui:flex kui:flex-1 kui:overflow-hidden",children:[e&&Hr("aside",{className:"kui:w-72 kui:shrink-0 kui:overflow-y-auto kui:border-r kui:border-border kui:bg-background kui:h-full",children:e}),pe("main",{className:"kui:flex-1 kui:overflow-y-auto kui:flex kui:flex-col kui:h-full",children:[Hr("div",{className:"kui:flex-1",children:o}),r]})]})]})}import{jsx as pt,jsxs as _i}from"react/jsx-runtime";function Di({sections:t=[],className:e}){return pt("div",{className:b("kui:p-4 kui:flex kui:flex-col kui:h-full",e),children:pt("div",{className:"kui:flex-1 kui:overflow-y-auto kui:space-y-8",children:t.map(r=>_i("div",{children:[pt("h3",{className:"kui:text-xs kui:font-medium kui:tracking-widest kui:text-muted-foreground kui:mb-2 kui:uppercase",children:r.title}),pt("nav",{className:"kui:flex kui:flex-col kui:gap-1",children:r.links.map(o=>pt("a",{href:o.href,onClick:i=>{o.onClick&&(i.preventDefault(),o.onClick())},className:b("kui:flex kui:items-center kui:gap-2 kui:px-3 kui:py-2 kui:rounded-lg kui:text-sm kui:font-medium kui:hover:bg-accent kui:hover:text-accent-foreground kui:transition-colors",o.isActive?"kui:bg-accent kui:text-accent-foreground":"kui:text-foreground/70"),children:o.label},o.label))})]},r.title))})})}import{ShoppingCart as zi}from"lucide-react";import*as Ur from"react";import{jsx as Vr,jsxs as Hi}from"react/jsx-runtime";var Gr=Ur.forwardRef(({variant:t="none",itemCount:e=0,children:r,...o},i)=>Hi("button",{ref:i,className:"kui:relative kui:flex kui:items-center kui:justify-center kui:rounded-full kui:transition-all kui:duration-200 kui:outline-none kui:focus-visible:ring-2 kui:focus-visible:ring-ring kui:focus-visible:ring-offset-2 kui:disabled:pointer-events-none kui:disabled:opacity-50 kui:hover:bg-muted/50 kui:active:scale-95 kui:h-12 kui:w-12 kui:p-0 kui:bg-transparent",...o,children:[t==="cart"?Vr(zi,{className:"kui:text-foreground kui:h-7 kui:w-7"}):r,e>0&&Vr("span",{className:"kui:absolute kui:-top-1.5 kui:-right-1.5 kui:flex kui:items-center kui:justify-center kui:rounded-full kui:bg-primary kui:text-primary-foreground kui:text-[10px] kui:font-bold kui:px-1.5 kui:py-0.5 kui:min-w-[18px] kui:h-[18px] kui:shadow-sm kui:animate-in kui:zoom-in kui:duration-300",children:e>99?"99+":e})]}));Gr.displayName="IconWithBadge";export{Jr as Footer,Ti as Header,Gr as IconWithBadge,Ii as Layout,Di as Sidebar};
55
+ //# sourceMappingURL=index.js.map