@reactfast/forms 0.1.17 → 0.1.18
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/forms.cjs +6 -6
- package/dist/forms.es.js +963 -962
- package/dist/forms.umd.js +6 -6
- package/package.json +1 -1
package/dist/forms.es.js
CHANGED
|
@@ -3,7 +3,7 @@ var wa = (e, t, r) => t in e ? ha(e, t, { enumerable: !0, configurable: !0, writ
|
|
|
3
3
|
var Z = (e, t, r) => wa(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
4
|
import { jsxs as L, jsx as p, Fragment as Ce } from "react/jsx-runtime";
|
|
5
5
|
import * as o from "react";
|
|
6
|
-
import
|
|
6
|
+
import B, { useState as A, useRef as I, useCallback as D, useEffect as q, useMemo as ae, useLayoutEffect as Er, useContext as X, createContext as oe, forwardRef as pa, Fragment as xe, isValidElement as xr, cloneElement as In, createElement as va, useId as Ue, useSyncExternalStore as ga } from "react";
|
|
7
7
|
import * as xt from "react-dom";
|
|
8
8
|
import { flushSync as yt, createPortal as Wn } from "react-dom";
|
|
9
9
|
function ba({
|
|
@@ -54,8 +54,8 @@ function xa({ field: e, value: t, onChange: r, theme: n }) {
|
|
|
54
54
|
const {
|
|
55
55
|
name: a,
|
|
56
56
|
title: i,
|
|
57
|
-
type:
|
|
58
|
-
placeholder:
|
|
57
|
+
type: s = "text",
|
|
58
|
+
placeholder: l = "Enter text",
|
|
59
59
|
description: c,
|
|
60
60
|
required: d,
|
|
61
61
|
error: u,
|
|
@@ -64,15 +64,15 @@ function xa({ field: e, value: t, onChange: r, theme: n }) {
|
|
|
64
64
|
trailingIcon: f,
|
|
65
65
|
pattern: w
|
|
66
66
|
// string | RegExp | Array<{ regex, message } | string>
|
|
67
|
-
} = e, [g, v] =
|
|
67
|
+
} = e, [g, v] = A(!1), E = !!u, b = E ? n.error : g ? n.inputFocusBorder : n.inputBorder;
|
|
68
68
|
let k = "";
|
|
69
69
|
if (w) {
|
|
70
70
|
const y = Array.isArray(w) ? w : [w];
|
|
71
71
|
for (const x of y) {
|
|
72
|
-
const R = typeof x == "object" && (x != null && x.regex) ? x.regex : x,
|
|
72
|
+
const R = typeof x == "object" && (x != null && x.regex) ? x.regex : x, C = typeof x == "object" && (x != null && x.message) ? x.message : "Invalid format";
|
|
73
73
|
try {
|
|
74
74
|
if (!(R instanceof RegExp ? R : new RegExp(R)).test(String(t || ""))) {
|
|
75
|
-
k =
|
|
75
|
+
k = C;
|
|
76
76
|
break;
|
|
77
77
|
}
|
|
78
78
|
} catch {
|
|
@@ -102,8 +102,8 @@ function xa({ field: e, value: t, onChange: r, theme: n }) {
|
|
|
102
102
|
{
|
|
103
103
|
id: a,
|
|
104
104
|
name: a,
|
|
105
|
-
type:
|
|
106
|
-
placeholder:
|
|
105
|
+
type: s,
|
|
106
|
+
placeholder: l,
|
|
107
107
|
value: t || "",
|
|
108
108
|
onChange: r,
|
|
109
109
|
onFocus: () => v(!0),
|
|
@@ -173,14 +173,14 @@ function ya({ field: e, value: t, onChange: r, theme: n }) {
|
|
|
173
173
|
const {
|
|
174
174
|
name: a,
|
|
175
175
|
title: i,
|
|
176
|
-
placeholder:
|
|
177
|
-
description:
|
|
176
|
+
placeholder: s = "Enter text",
|
|
177
|
+
description: l,
|
|
178
178
|
optional: c,
|
|
179
179
|
error: d,
|
|
180
180
|
// TODO: Maybe range sanity-check this to force human-readable error over silent runtime errors with invalid rows? -Josh
|
|
181
181
|
rows: u = 4
|
|
182
182
|
// default rows
|
|
183
|
-
} = e, [h, m] =
|
|
183
|
+
} = e, [h, m] = A(!1), f = !!d, w = f ? n.error : h ? n.inputFocusBorder : n.inputBorder;
|
|
184
184
|
return /* @__PURE__ */ L("div", { children: [
|
|
185
185
|
/* @__PURE__ */ L("div", { className: "mb-1 flex justify-between", children: [
|
|
186
186
|
i && /* @__PURE__ */ p(
|
|
@@ -201,13 +201,13 @@ function ya({ field: e, value: t, onChange: r, theme: n }) {
|
|
|
201
201
|
id: a,
|
|
202
202
|
name: a,
|
|
203
203
|
rows: u,
|
|
204
|
-
placeholder:
|
|
204
|
+
placeholder: s,
|
|
205
205
|
value: t || "",
|
|
206
206
|
onChange: r,
|
|
207
207
|
onFocus: () => m(!0),
|
|
208
208
|
onBlur: () => m(!1),
|
|
209
209
|
"aria-invalid": f ? "true" : "false",
|
|
210
|
-
"aria-describedby": f ? `${a}-error` :
|
|
210
|
+
"aria-describedby": f ? `${a}-error` : l ? `${a}-description` : void 0,
|
|
211
211
|
style: {
|
|
212
212
|
color: f ? n.error : n.inputText,
|
|
213
213
|
backgroundColor: n.inputBackground,
|
|
@@ -239,19 +239,19 @@ function ya({ field: e, value: t, onChange: r, theme: n }) {
|
|
|
239
239
|
className: "mt-2 text-sm",
|
|
240
240
|
children: d
|
|
241
241
|
}
|
|
242
|
-
) :
|
|
242
|
+
) : l ? /* @__PURE__ */ p(
|
|
243
243
|
"p",
|
|
244
244
|
{
|
|
245
245
|
id: `${a}-description`,
|
|
246
246
|
style: { color: n.description },
|
|
247
247
|
className: "mt-2 text-sm",
|
|
248
|
-
children:
|
|
248
|
+
children: l
|
|
249
249
|
}
|
|
250
250
|
) : null
|
|
251
251
|
] });
|
|
252
252
|
}
|
|
253
253
|
function La({ field: e, value: t, onChange: r }) {
|
|
254
|
-
const { name: n, title: a, description: i, optional:
|
|
254
|
+
const { name: n, title: a, description: i, optional: s, error: l } = e, c = !!l;
|
|
255
255
|
return /* @__PURE__ */ L("div", { children: [
|
|
256
256
|
/* @__PURE__ */ L("div", { className: "flex justify-between", children: [
|
|
257
257
|
a && /* @__PURE__ */ p(
|
|
@@ -262,7 +262,7 @@ function La({ field: e, value: t, onChange: r }) {
|
|
|
262
262
|
children: a
|
|
263
263
|
}
|
|
264
264
|
),
|
|
265
|
-
|
|
265
|
+
s && !c && /* @__PURE__ */ p("span", { className: "text-sm/6 text-gray-500 dark:text-gray-400", children: "Optional" })
|
|
266
266
|
] }),
|
|
267
267
|
/* @__PURE__ */ L("div", { className: "mt-2 flex items-center space-x-3", children: [
|
|
268
268
|
/* @__PURE__ */ p(
|
|
@@ -285,7 +285,7 @@ function La({ field: e, value: t, onChange: r }) {
|
|
|
285
285
|
{
|
|
286
286
|
id: `${n}-error`,
|
|
287
287
|
className: "mt-2 text-sm text-red-600 dark:text-red-400",
|
|
288
|
-
children:
|
|
288
|
+
children: l
|
|
289
289
|
}
|
|
290
290
|
) : i ? /* @__PURE__ */ p(
|
|
291
291
|
"p",
|
|
@@ -298,7 +298,7 @@ function La({ field: e, value: t, onChange: r }) {
|
|
|
298
298
|
] });
|
|
299
299
|
}
|
|
300
300
|
function Ra({ field: e, value: t, onChange: r }) {
|
|
301
|
-
const { name: n, label: a, optional: i, description:
|
|
301
|
+
const { name: n, label: a, optional: i, description: s, error: l } = e, c = !!l;
|
|
302
302
|
return /* @__PURE__ */ L("div", { children: [
|
|
303
303
|
/* @__PURE__ */ L("div", { className: "flex items-center space-x-2", children: [
|
|
304
304
|
/* @__PURE__ */ p(
|
|
@@ -310,7 +310,7 @@ function Ra({ field: e, value: t, onChange: r }) {
|
|
|
310
310
|
checked: !!t,
|
|
311
311
|
onChange: r,
|
|
312
312
|
"aria-invalid": c ? "true" : "false",
|
|
313
|
-
"aria-describedby": c ? `${n}-error` :
|
|
313
|
+
"aria-describedby": c ? `${n}-error` : s ? `${n}-description` : void 0,
|
|
314
314
|
className: "h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary"
|
|
315
315
|
}
|
|
316
316
|
),
|
|
@@ -324,20 +324,20 @@ function Ra({ field: e, value: t, onChange: r }) {
|
|
|
324
324
|
{
|
|
325
325
|
id: `${n}-error`,
|
|
326
326
|
className: "mt-1 text-sm text-red-600 dark:text-red-400",
|
|
327
|
-
children:
|
|
327
|
+
children: l
|
|
328
328
|
}
|
|
329
|
-
) :
|
|
329
|
+
) : s ? /* @__PURE__ */ p(
|
|
330
330
|
"p",
|
|
331
331
|
{
|
|
332
332
|
id: `${n}-description`,
|
|
333
333
|
className: "mt-1 text-sm text-gray-500 dark:text-gray-400",
|
|
334
|
-
children:
|
|
334
|
+
children: s
|
|
335
335
|
}
|
|
336
336
|
) : null
|
|
337
337
|
] });
|
|
338
338
|
}
|
|
339
339
|
function Ma({ field: e, value: t, onChange: r }) {
|
|
340
|
-
const { name: n, title: a, description: i, error:
|
|
340
|
+
const { name: n, title: a, description: i, error: s } = e, l = !!s;
|
|
341
341
|
return /* @__PURE__ */ L("div", { className: "flex items-center justify-between gap-3", children: [
|
|
342
342
|
i ? /* @__PURE__ */ L(Ce, { children: [
|
|
343
343
|
/* @__PURE__ */ L("span", { className: "flex grow flex-col", children: [
|
|
@@ -402,12 +402,12 @@ function Ma({ field: e, value: t, onChange: r }) {
|
|
|
402
402
|
}
|
|
403
403
|
) })
|
|
404
404
|
] }),
|
|
405
|
-
|
|
405
|
+
l && /* @__PURE__ */ p(
|
|
406
406
|
"p",
|
|
407
407
|
{
|
|
408
408
|
id: `${n}-error`,
|
|
409
409
|
className: "mt-1 text-sm text-red-600 dark:text-red-400",
|
|
410
|
-
children:
|
|
410
|
+
children: s
|
|
411
411
|
}
|
|
412
412
|
)
|
|
413
413
|
] });
|
|
@@ -431,17 +431,17 @@ function $a({ field: e }) {
|
|
|
431
431
|
a && /* @__PURE__ */ p("hr", { className: "mt-2 border-gray-300 dark:border-gray-600" })
|
|
432
432
|
] });
|
|
433
433
|
}
|
|
434
|
-
const Nn = typeof document < "u" ?
|
|
434
|
+
const Nn = typeof document < "u" ? B.useLayoutEffect : () => {
|
|
435
435
|
};
|
|
436
436
|
var qt;
|
|
437
|
-
const ja = (qt =
|
|
437
|
+
const ja = (qt = B.useInsertionEffect) !== null && qt !== void 0 ? qt : Nn;
|
|
438
438
|
function Aa(e) {
|
|
439
|
-
const t =
|
|
439
|
+
const t = I(null);
|
|
440
440
|
return ja(() => {
|
|
441
441
|
t.current = e;
|
|
442
442
|
}, [
|
|
443
443
|
e
|
|
444
|
-
]),
|
|
444
|
+
]), D((...r) => {
|
|
445
445
|
const n = t.current;
|
|
446
446
|
return n == null ? void 0 : n(...r);
|
|
447
447
|
}, []);
|
|
@@ -520,21 +520,21 @@ $e(function() {
|
|
|
520
520
|
return Ft(/Firefox/i);
|
|
521
521
|
});
|
|
522
522
|
function Hn() {
|
|
523
|
-
let e =
|
|
524
|
-
let c =
|
|
525
|
-
e.current.delete(
|
|
526
|
-
} :
|
|
527
|
-
e.current.set(
|
|
523
|
+
let e = I(/* @__PURE__ */ new Map()), t = D((a, i, s, l) => {
|
|
524
|
+
let c = l != null && l.once ? (...d) => {
|
|
525
|
+
e.current.delete(s), s(...d);
|
|
526
|
+
} : s;
|
|
527
|
+
e.current.set(s, {
|
|
528
528
|
type: i,
|
|
529
529
|
eventTarget: a,
|
|
530
530
|
fn: c,
|
|
531
|
-
options:
|
|
532
|
-
}), a.addEventListener(i, c,
|
|
533
|
-
}, []), r =
|
|
531
|
+
options: l
|
|
532
|
+
}), a.addEventListener(i, c, l);
|
|
533
|
+
}, []), r = D((a, i, s, l) => {
|
|
534
534
|
var c;
|
|
535
|
-
let d = ((c = e.current.get(
|
|
536
|
-
a.removeEventListener(i, d,
|
|
537
|
-
}, []), n =
|
|
535
|
+
let d = ((c = e.current.get(s)) === null || c === void 0 ? void 0 : c.fn) || s;
|
|
536
|
+
a.removeEventListener(i, d, l), e.current.delete(s);
|
|
537
|
+
}, []), n = D(() => {
|
|
538
538
|
e.current.forEach((a, i) => {
|
|
539
539
|
r(a.eventTarget, a.type, i, a.options);
|
|
540
540
|
});
|
|
@@ -564,8 +564,8 @@ function Ha(e, t) {
|
|
|
564
564
|
value: t
|
|
565
565
|
});
|
|
566
566
|
}
|
|
567
|
-
function
|
|
568
|
-
let t =
|
|
567
|
+
function _n(e) {
|
|
568
|
+
let t = I({
|
|
569
569
|
isFocused: !1,
|
|
570
570
|
observer: null
|
|
571
571
|
});
|
|
@@ -578,13 +578,13 @@ function Dn(e) {
|
|
|
578
578
|
let r = Aa((n) => {
|
|
579
579
|
e == null || e(n);
|
|
580
580
|
});
|
|
581
|
-
return
|
|
581
|
+
return D((n) => {
|
|
582
582
|
if (n.target instanceof HTMLButtonElement || n.target instanceof HTMLInputElement || n.target instanceof HTMLTextAreaElement || n.target instanceof HTMLSelectElement) {
|
|
583
583
|
t.current.isFocused = !0;
|
|
584
|
-
let a = n.target, i = (
|
|
584
|
+
let a = n.target, i = (s) => {
|
|
585
585
|
if (t.current.isFocused = !1, a.disabled) {
|
|
586
|
-
let
|
|
587
|
-
r(
|
|
586
|
+
let l = Vn(s);
|
|
587
|
+
r(l);
|
|
588
588
|
}
|
|
589
589
|
t.current.observer && (t.current.observer.disconnect(), t.current.observer = null);
|
|
590
590
|
};
|
|
@@ -592,14 +592,14 @@ function Dn(e) {
|
|
|
592
592
|
once: !0
|
|
593
593
|
}), t.current.observer = new MutationObserver(() => {
|
|
594
594
|
if (t.current.isFocused && a.disabled) {
|
|
595
|
-
var
|
|
596
|
-
(
|
|
597
|
-
let
|
|
595
|
+
var s;
|
|
596
|
+
(s = t.current.observer) === null || s === void 0 || s.disconnect();
|
|
597
|
+
let l = a === document.activeElement ? null : document.activeElement;
|
|
598
598
|
a.dispatchEvent(new FocusEvent("blur", {
|
|
599
|
-
relatedTarget:
|
|
599
|
+
relatedTarget: l
|
|
600
600
|
})), a.dispatchEvent(new FocusEvent("focusout", {
|
|
601
601
|
bubbles: !0,
|
|
602
|
-
relatedTarget:
|
|
602
|
+
relatedTarget: l
|
|
603
603
|
}));
|
|
604
604
|
}
|
|
605
605
|
}), t.current.observer.observe(a, {
|
|
@@ -613,39 +613,39 @@ function Dn(e) {
|
|
|
613
613
|
r
|
|
614
614
|
]);
|
|
615
615
|
}
|
|
616
|
-
let Va = !1, dt = null, ir = /* @__PURE__ */ new Set(), nt = /* @__PURE__ */ new Map(),
|
|
617
|
-
const
|
|
616
|
+
let Va = !1, dt = null, ir = /* @__PURE__ */ new Set(), nt = /* @__PURE__ */ new Map(), _e = !1, lr = !1;
|
|
617
|
+
const _a = {
|
|
618
618
|
Tab: !0,
|
|
619
619
|
Escape: !0
|
|
620
620
|
};
|
|
621
621
|
function Mr(e, t) {
|
|
622
622
|
for (let r of ir) r(e, t);
|
|
623
623
|
}
|
|
624
|
-
function
|
|
624
|
+
function Da(e) {
|
|
625
625
|
return !(e.metaKey || !Rr() && e.altKey || e.ctrlKey || e.key === "Control" || e.key === "Shift" || e.key === "Meta");
|
|
626
626
|
}
|
|
627
627
|
function Lt(e) {
|
|
628
|
-
|
|
628
|
+
_e = !0, Da(e) && (dt = "keyboard", Mr("keyboard", e));
|
|
629
629
|
}
|
|
630
630
|
function he(e) {
|
|
631
|
-
dt = "pointer", (e.type === "mousedown" || e.type === "pointerdown") && (
|
|
631
|
+
dt = "pointer", (e.type === "mousedown" || e.type === "pointerdown") && (_e = !0, Mr("pointer", e));
|
|
632
632
|
}
|
|
633
|
-
function
|
|
634
|
-
Pa(e) && (
|
|
633
|
+
function Dn(e) {
|
|
634
|
+
Pa(e) && (_e = !0, dt = "virtual");
|
|
635
635
|
}
|
|
636
636
|
function Zn(e) {
|
|
637
|
-
e.target === window || e.target === document || Va || !e.isTrusted || (!
|
|
637
|
+
e.target === window || e.target === document || Va || !e.isTrusted || (!_e && !lr && (dt = "virtual", Mr("virtual", e)), _e = !1, lr = !1);
|
|
638
638
|
}
|
|
639
639
|
function Un() {
|
|
640
|
-
|
|
640
|
+
_e = !1, lr = !0;
|
|
641
641
|
}
|
|
642
642
|
function sr(e) {
|
|
643
643
|
if (typeof window > "u" || typeof document > "u" || nt.get(He(e))) return;
|
|
644
644
|
const t = He(e), r = Ne(e);
|
|
645
645
|
let n = t.HTMLElement.prototype.focus;
|
|
646
646
|
t.HTMLElement.prototype.focus = function() {
|
|
647
|
-
|
|
648
|
-
}, r.addEventListener("keydown", Lt, !0), r.addEventListener("keyup", Lt, !0), r.addEventListener("click",
|
|
647
|
+
_e = !0, n.apply(this, arguments);
|
|
648
|
+
}, r.addEventListener("keydown", Lt, !0), r.addEventListener("keyup", Lt, !0), r.addEventListener("click", Dn, !0), t.addEventListener("focus", Zn, !0), t.addEventListener("blur", Un, !1), typeof PointerEvent < "u" ? (r.addEventListener("pointerdown", he, !0), r.addEventListener("pointermove", he, !0), r.addEventListener("pointerup", he, !0)) : process.env.NODE_ENV === "test" && (r.addEventListener("mousedown", he, !0), r.addEventListener("mousemove", he, !0), r.addEventListener("mouseup", he, !0)), t.addEventListener("beforeunload", () => {
|
|
649
649
|
qn(e);
|
|
650
650
|
}, {
|
|
651
651
|
once: !0
|
|
@@ -655,7 +655,7 @@ function sr(e) {
|
|
|
655
655
|
}
|
|
656
656
|
const qn = (e, t) => {
|
|
657
657
|
const r = He(e), n = Ne(e);
|
|
658
|
-
t && n.removeEventListener("DOMContentLoaded", t), nt.has(r) && (r.HTMLElement.prototype.focus = nt.get(r).focus, n.removeEventListener("keydown", Lt, !0), n.removeEventListener("keyup", Lt, !0), n.removeEventListener("click",
|
|
658
|
+
t && n.removeEventListener("DOMContentLoaded", t), nt.has(r) && (r.HTMLElement.prototype.focus = nt.get(r).focus, n.removeEventListener("keydown", Lt, !0), n.removeEventListener("keyup", Lt, !0), n.removeEventListener("click", Dn, !0), r.removeEventListener("focus", Zn, !0), r.removeEventListener("blur", Un, !1), typeof PointerEvent < "u" ? (n.removeEventListener("pointerdown", he, !0), n.removeEventListener("pointermove", he, !0), n.removeEventListener("pointerup", he, !0)) : process.env.NODE_ENV === "test" && (n.removeEventListener("mousedown", he, !0), n.removeEventListener("mousemove", he, !0), n.removeEventListener("mouseup", he, !0)), nt.delete(r));
|
|
659
659
|
};
|
|
660
660
|
function Za(e) {
|
|
661
661
|
const t = Ne(e);
|
|
@@ -681,8 +681,8 @@ const Ua = /* @__PURE__ */ new Set([
|
|
|
681
681
|
]);
|
|
682
682
|
function qa(e, t, r) {
|
|
683
683
|
let n = Ne(r == null ? void 0 : r.target);
|
|
684
|
-
const a = typeof window < "u" ? He(r == null ? void 0 : r.target).HTMLInputElement : HTMLInputElement, i = typeof window < "u" ? He(r == null ? void 0 : r.target).HTMLTextAreaElement : HTMLTextAreaElement,
|
|
685
|
-
return e = e || n.activeElement instanceof a && !Ua.has(n.activeElement.type) || n.activeElement instanceof i || n.activeElement instanceof
|
|
684
|
+
const a = typeof window < "u" ? He(r == null ? void 0 : r.target).HTMLInputElement : HTMLInputElement, i = typeof window < "u" ? He(r == null ? void 0 : r.target).HTMLTextAreaElement : HTMLTextAreaElement, s = typeof window < "u" ? He(r == null ? void 0 : r.target).HTMLElement : HTMLElement, l = typeof window < "u" ? He(r == null ? void 0 : r.target).KeyboardEvent : KeyboardEvent;
|
|
685
|
+
return e = e || n.activeElement instanceof a && !Ua.has(n.activeElement.type) || n.activeElement instanceof i || n.activeElement instanceof s && n.activeElement.isContentEditable, !(e && t === "keyboard" && r instanceof l && !_a[r.key]);
|
|
686
686
|
}
|
|
687
687
|
function Ga(e, t, r) {
|
|
688
688
|
sr(), q(() => {
|
|
@@ -696,44 +696,44 @@ function Ga(e, t, r) {
|
|
|
696
696
|
}
|
|
697
697
|
function za(e) {
|
|
698
698
|
let { isDisabled: t, onFocus: r, onBlur: n, onFocusChange: a } = e;
|
|
699
|
-
const i =
|
|
699
|
+
const i = D((c) => {
|
|
700
700
|
if (c.target === c.currentTarget)
|
|
701
701
|
return n && n(c), a && a(!1), !0;
|
|
702
702
|
}, [
|
|
703
703
|
n,
|
|
704
704
|
a
|
|
705
|
-
]),
|
|
705
|
+
]), s = _n(i), l = D((c) => {
|
|
706
706
|
const d = Ne(c.target), u = d ? ar(d) : ar();
|
|
707
|
-
c.target === c.currentTarget && u === Pn(c.nativeEvent) && (r && r(c), a && a(!0),
|
|
707
|
+
c.target === c.currentTarget && u === Pn(c.nativeEvent) && (r && r(c), a && a(!0), s(c));
|
|
708
708
|
}, [
|
|
709
709
|
a,
|
|
710
710
|
r,
|
|
711
|
-
|
|
711
|
+
s
|
|
712
712
|
]);
|
|
713
713
|
return {
|
|
714
714
|
focusProps: {
|
|
715
|
-
onFocus: !t && (r || a || n) ?
|
|
715
|
+
onFocus: !t && (r || a || n) ? l : void 0,
|
|
716
716
|
onBlur: !t && (n || a) ? i : void 0
|
|
717
717
|
}
|
|
718
718
|
};
|
|
719
719
|
}
|
|
720
720
|
function Ka(e) {
|
|
721
|
-
let { isDisabled: t, onBlurWithin: r, onFocusWithin: n, onFocusWithinChange: a } = e, i =
|
|
721
|
+
let { isDisabled: t, onBlurWithin: r, onFocusWithin: n, onFocusWithinChange: a } = e, i = I({
|
|
722
722
|
isFocusWithin: !1
|
|
723
|
-
}), { addGlobalListener:
|
|
724
|
-
h.currentTarget.contains(h.target) && i.current.isFocusWithin && !h.currentTarget.contains(h.relatedTarget) && (i.current.isFocusWithin = !1,
|
|
723
|
+
}), { addGlobalListener: s, removeAllGlobalListeners: l } = Hn(), c = D((h) => {
|
|
724
|
+
h.currentTarget.contains(h.target) && i.current.isFocusWithin && !h.currentTarget.contains(h.relatedTarget) && (i.current.isFocusWithin = !1, l(), r && r(h), a && a(!1));
|
|
725
725
|
}, [
|
|
726
726
|
r,
|
|
727
727
|
a,
|
|
728
728
|
i,
|
|
729
|
-
|
|
730
|
-
]), d =
|
|
729
|
+
l
|
|
730
|
+
]), d = _n(c), u = D((h) => {
|
|
731
731
|
if (!h.currentTarget.contains(h.target)) return;
|
|
732
732
|
const m = Ne(h.target), f = ar(m);
|
|
733
733
|
if (!i.current.isFocusWithin && f === Pn(h.nativeEvent)) {
|
|
734
734
|
n && n(h), a && a(!0), i.current.isFocusWithin = !0, d(h);
|
|
735
735
|
let w = h.currentTarget;
|
|
736
|
-
|
|
736
|
+
s(m, "focus", (g) => {
|
|
737
737
|
if (i.current.isFocusWithin && !Tn(w, g.target)) {
|
|
738
738
|
let v = new m.defaultView.FocusEvent("blur", {
|
|
739
739
|
relatedTarget: g.target
|
|
@@ -750,7 +750,7 @@ function Ka(e) {
|
|
|
750
750
|
n,
|
|
751
751
|
a,
|
|
752
752
|
d,
|
|
753
|
-
|
|
753
|
+
s,
|
|
754
754
|
c
|
|
755
755
|
]);
|
|
756
756
|
return t ? {
|
|
@@ -782,7 +782,7 @@ function Xa() {
|
|
|
782
782
|
};
|
|
783
783
|
}
|
|
784
784
|
function Ya(e) {
|
|
785
|
-
let { onHoverStart: t, onHoverChange: r, onHoverEnd: n, isDisabled: a } = e, [i,
|
|
785
|
+
let { onHoverStart: t, onHoverChange: r, onHoverEnd: n, isDisabled: a } = e, [i, s] = A(!1), l = I({
|
|
786
786
|
isHovered: !1,
|
|
787
787
|
ignoreEmulatedMouseEvents: !1,
|
|
788
788
|
pointerType: "",
|
|
@@ -791,34 +791,34 @@ function Ya(e) {
|
|
|
791
791
|
q(Xa, []);
|
|
792
792
|
let { addGlobalListener: c, removeAllGlobalListeners: d } = Hn(), { hoverProps: u, triggerHoverEnd: h } = ae(() => {
|
|
793
793
|
let m = (g, v) => {
|
|
794
|
-
if (
|
|
795
|
-
|
|
794
|
+
if (l.pointerType = v, a || v === "touch" || l.isHovered || !g.currentTarget.contains(g.target)) return;
|
|
795
|
+
l.isHovered = !0;
|
|
796
796
|
let E = g.currentTarget;
|
|
797
|
-
|
|
798
|
-
|
|
797
|
+
l.target = E, c(Ne(g.target), "pointerover", (b) => {
|
|
798
|
+
l.isHovered && l.target && !Tn(l.target, b.target) && f(b, b.pointerType);
|
|
799
799
|
}, {
|
|
800
800
|
capture: !0
|
|
801
801
|
}), t && t({
|
|
802
802
|
type: "hoverstart",
|
|
803
803
|
target: E,
|
|
804
804
|
pointerType: v
|
|
805
|
-
}), r && r(!0),
|
|
805
|
+
}), r && r(!0), s(!0);
|
|
806
806
|
}, f = (g, v) => {
|
|
807
|
-
let E =
|
|
808
|
-
|
|
807
|
+
let E = l.target;
|
|
808
|
+
l.pointerType = "", l.target = null, !(v === "touch" || !l.isHovered || !E) && (l.isHovered = !1, d(), n && n({
|
|
809
809
|
type: "hoverend",
|
|
810
810
|
target: E,
|
|
811
811
|
pointerType: v
|
|
812
|
-
}), r && r(!1),
|
|
812
|
+
}), r && r(!1), s(!1));
|
|
813
813
|
}, w = {};
|
|
814
814
|
return typeof PointerEvent < "u" ? (w.onPointerEnter = (g) => {
|
|
815
815
|
Rt && g.pointerType === "mouse" || m(g, g.pointerType);
|
|
816
816
|
}, w.onPointerLeave = (g) => {
|
|
817
817
|
!a && g.currentTarget.contains(g.target) && f(g, g.pointerType);
|
|
818
818
|
}) : process.env.NODE_ENV === "test" && (w.onTouchStart = () => {
|
|
819
|
-
|
|
819
|
+
l.ignoreEmulatedMouseEvents = !0;
|
|
820
820
|
}, w.onMouseEnter = (g) => {
|
|
821
|
-
!
|
|
821
|
+
!l.ignoreEmulatedMouseEvents && !Rt && m(g, "mouse"), l.ignoreEmulatedMouseEvents = !1;
|
|
822
822
|
}, w.onMouseLeave = (g) => {
|
|
823
823
|
!a && g.currentTarget.contains(g.target) && f(g, "mouse");
|
|
824
824
|
}), {
|
|
@@ -830,14 +830,14 @@ function Ya(e) {
|
|
|
830
830
|
r,
|
|
831
831
|
n,
|
|
832
832
|
a,
|
|
833
|
-
|
|
833
|
+
l,
|
|
834
834
|
c,
|
|
835
835
|
d
|
|
836
836
|
]);
|
|
837
837
|
return q(() => {
|
|
838
838
|
a && h({
|
|
839
|
-
currentTarget:
|
|
840
|
-
},
|
|
839
|
+
currentTarget: l.target
|
|
840
|
+
}, l.pointerType);
|
|
841
841
|
}, [
|
|
842
842
|
a
|
|
843
843
|
]), {
|
|
@@ -846,11 +846,11 @@ function Ya(e) {
|
|
|
846
846
|
};
|
|
847
847
|
}
|
|
848
848
|
function Qa(e = {}) {
|
|
849
|
-
let { autoFocus: t = !1, isTextInput: r, within: n } = e, a =
|
|
849
|
+
let { autoFocus: t = !1, isTextInput: r, within: n } = e, a = I({
|
|
850
850
|
isFocused: !1,
|
|
851
851
|
isFocusVisible: t || Gn()
|
|
852
|
-
}), [i,
|
|
853
|
-
a.current.isFocused = f,
|
|
852
|
+
}), [i, s] = A(!1), [l, c] = A(() => a.current.isFocused && a.current.isFocusVisible), d = D(() => c(a.current.isFocused && a.current.isFocusVisible), []), u = D((f) => {
|
|
853
|
+
a.current.isFocused = f, s(f), d();
|
|
854
854
|
}, [
|
|
855
855
|
d
|
|
856
856
|
]);
|
|
@@ -868,7 +868,7 @@ function Qa(e = {}) {
|
|
|
868
868
|
});
|
|
869
869
|
return {
|
|
870
870
|
isFocused: i,
|
|
871
|
-
isFocusVisible:
|
|
871
|
+
isFocusVisible: l,
|
|
872
872
|
focusProps: n ? m : h
|
|
873
873
|
};
|
|
874
874
|
}
|
|
@@ -959,21 +959,21 @@ function de() {
|
|
|
959
959
|
return t;
|
|
960
960
|
}
|
|
961
961
|
function qe() {
|
|
962
|
-
let [e] =
|
|
962
|
+
let [e] = A(de);
|
|
963
963
|
return q(() => () => e.dispose(), [e]), e;
|
|
964
964
|
}
|
|
965
965
|
let Q = (e, t) => {
|
|
966
966
|
ke.isServer ? q(e, t) : Er(e, t);
|
|
967
967
|
};
|
|
968
968
|
function Ge(e) {
|
|
969
|
-
let t =
|
|
969
|
+
let t = I(e);
|
|
970
970
|
return Q(() => {
|
|
971
971
|
t.current = e;
|
|
972
972
|
}, [e]), t;
|
|
973
973
|
}
|
|
974
974
|
let V = function(e) {
|
|
975
975
|
let t = Ge(e);
|
|
976
|
-
return
|
|
976
|
+
return B.useCallback((...r) => t.current(...r), [t]);
|
|
977
977
|
};
|
|
978
978
|
function ni(e) {
|
|
979
979
|
let t = e.width / 2, r = e.height / 2;
|
|
@@ -983,13 +983,13 @@ function oi(e, t) {
|
|
|
983
983
|
return !(!e || !t || e.right < t.left || e.left > t.right || e.bottom < t.top || e.top > t.bottom);
|
|
984
984
|
}
|
|
985
985
|
function ai({ disabled: e = !1 } = {}) {
|
|
986
|
-
let t =
|
|
986
|
+
let t = I(null), [r, n] = A(!1), a = qe(), i = V(() => {
|
|
987
987
|
t.current = null, n(!1), a.dispose();
|
|
988
|
-
}),
|
|
988
|
+
}), s = V((l) => {
|
|
989
989
|
if (a.dispose(), t.current === null) {
|
|
990
|
-
t.current =
|
|
990
|
+
t.current = l.currentTarget, n(!0);
|
|
991
991
|
{
|
|
992
|
-
let c = Bt(
|
|
992
|
+
let c = Bt(l.currentTarget);
|
|
993
993
|
a.addEventListener(c, "pointerup", i, !1), a.addEventListener(c, "pointermove", (d) => {
|
|
994
994
|
if (t.current) {
|
|
995
995
|
let u = ni(d);
|
|
@@ -999,7 +999,7 @@ function ai({ disabled: e = !1 } = {}) {
|
|
|
999
999
|
}
|
|
1000
1000
|
}
|
|
1001
1001
|
});
|
|
1002
|
-
return { pressed: r, pressProps: e ? {} : { onPointerDown:
|
|
1002
|
+
return { pressed: r, pressProps: e ? {} : { onPointerDown: s, onPointerUp: i, onClick: i } };
|
|
1003
1003
|
}
|
|
1004
1004
|
function Se(e) {
|
|
1005
1005
|
return ae(() => e, Object.values(e));
|
|
@@ -1022,29 +1022,29 @@ function we(e, t, ...r) {
|
|
|
1022
1022
|
var Ct = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(Ct || {}), Fe = ((e) => (e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e))(Fe || {});
|
|
1023
1023
|
function ue() {
|
|
1024
1024
|
let e = si();
|
|
1025
|
-
return
|
|
1025
|
+
return D((t) => li({ mergeRefs: e, ...t }), [e]);
|
|
1026
1026
|
}
|
|
1027
|
-
function li({ ourProps: e, theirProps: t, slot: r, defaultTag: n, features: a, visible: i = !0, name:
|
|
1028
|
-
|
|
1027
|
+
function li({ ourProps: e, theirProps: t, slot: r, defaultTag: n, features: a, visible: i = !0, name: s, mergeRefs: l }) {
|
|
1028
|
+
l = l ?? ci;
|
|
1029
1029
|
let c = Xn(t, e);
|
|
1030
|
-
if (i) return wt(c, r, n,
|
|
1030
|
+
if (i) return wt(c, r, n, s, l);
|
|
1031
1031
|
let d = a ?? 0;
|
|
1032
1032
|
if (d & 2) {
|
|
1033
1033
|
let { static: u = !1, ...h } = c;
|
|
1034
|
-
if (u) return wt(h, r, n,
|
|
1034
|
+
if (u) return wt(h, r, n, s, l);
|
|
1035
1035
|
}
|
|
1036
1036
|
if (d & 1) {
|
|
1037
1037
|
let { unmount: u = !0, ...h } = c;
|
|
1038
1038
|
return we(u ? 0 : 1, { 0() {
|
|
1039
1039
|
return null;
|
|
1040
1040
|
}, 1() {
|
|
1041
|
-
return wt({ ...h, hidden: !0, style: { display: "none" } }, r, n,
|
|
1041
|
+
return wt({ ...h, hidden: !0, style: { display: "none" } }, r, n, s, l);
|
|
1042
1042
|
} });
|
|
1043
1043
|
}
|
|
1044
|
-
return wt(c, r, n,
|
|
1044
|
+
return wt(c, r, n, s, l);
|
|
1045
1045
|
}
|
|
1046
1046
|
function wt(e, t = {}, r, n, a) {
|
|
1047
|
-
let { as: i = r, children:
|
|
1047
|
+
let { as: i = r, children: s, refName: l = "ref", ...c } = zt(e, ["unmount", "static"]), d = e.ref !== void 0 ? { [l]: e.ref } : {}, u = typeof s == "function" ? s(t) : s;
|
|
1048
1048
|
"className" in c && c.className && typeof c.className == "function" && (c.className = c.className(t)), c["aria-labelledby"] && c["aria-labelledby"] === c.id && (c["aria-labelledby"] = void 0);
|
|
1049
1049
|
let h = {};
|
|
1050
1050
|
if (t) {
|
|
@@ -1068,7 +1068,7 @@ function wt(e, t = {}, r, n, a) {
|
|
|
1068
1068
|
return va(i, Object.assign({}, zt(c, ["ref"]), !ot(i) && d, !ot(i) && h), u);
|
|
1069
1069
|
}
|
|
1070
1070
|
function si() {
|
|
1071
|
-
let e =
|
|
1071
|
+
let e = I([]), t = D((r) => {
|
|
1072
1072
|
for (let n of e.current) n != null && (typeof n == "function" ? n(r) : n.current = r);
|
|
1073
1073
|
}, []);
|
|
1074
1074
|
return (...r) => {
|
|
@@ -1090,10 +1090,10 @@ function Xn(...e) {
|
|
|
1090
1090
|
return (i = a == null ? void 0 : a.preventDefault) == null ? void 0 : i.call(a);
|
|
1091
1091
|
}]);
|
|
1092
1092
|
for (let n in r) Object.assign(t, { [n](a, ...i) {
|
|
1093
|
-
let
|
|
1094
|
-
for (let
|
|
1093
|
+
let s = r[n];
|
|
1094
|
+
for (let l of s) {
|
|
1095
1095
|
if ((a instanceof Event || (a == null ? void 0 : a.nativeEvent) instanceof Event) && a.defaultPrevented) return;
|
|
1096
|
-
|
|
1096
|
+
l(a, ...i);
|
|
1097
1097
|
}
|
|
1098
1098
|
} });
|
|
1099
1099
|
return t;
|
|
@@ -1105,7 +1105,7 @@ function Yn(...e) {
|
|
|
1105
1105
|
for (let n of e) for (let a in n) a.startsWith("on") && typeof n[a] == "function" ? (r[a] != null || (r[a] = []), r[a].push(n[a])) : t[a] = n[a];
|
|
1106
1106
|
for (let n in r) Object.assign(t, { [n](...a) {
|
|
1107
1107
|
let i = r[n];
|
|
1108
|
-
for (let
|
|
1108
|
+
for (let s of i) s == null || s(...a);
|
|
1109
1109
|
} });
|
|
1110
1110
|
return t;
|
|
1111
1111
|
}
|
|
@@ -1124,7 +1124,7 @@ function zt(e, t = []) {
|
|
|
1124
1124
|
return r;
|
|
1125
1125
|
}
|
|
1126
1126
|
function di(e) {
|
|
1127
|
-
return
|
|
1127
|
+
return B.version.split(".")[0] >= "19" ? e.props.ref : e.ref;
|
|
1128
1128
|
}
|
|
1129
1129
|
function ot(e) {
|
|
1130
1130
|
return e === xe || e === Symbol.for("react.fragment");
|
|
@@ -1133,11 +1133,11 @@ function ui(e) {
|
|
|
1133
1133
|
return ot(e.type);
|
|
1134
1134
|
}
|
|
1135
1135
|
function fi(e, t, r) {
|
|
1136
|
-
let [n, a] =
|
|
1137
|
-
return i && !
|
|
1136
|
+
let [n, a] = A(r), i = e !== void 0, s = I(i), l = I(!1), c = I(!1);
|
|
1137
|
+
return i && !s.current && !l.current ? (l.current = !0, s.current = i, console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")) : !i && s.current && !c.current && (c.current = !0, s.current = i, console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")), [i ? e : n, V((d) => (i || yt(() => a(d)), t == null ? void 0 : t(d)))];
|
|
1138
1138
|
}
|
|
1139
1139
|
function mi(e) {
|
|
1140
|
-
let [t] =
|
|
1140
|
+
let [t] = A(e);
|
|
1141
1141
|
return t;
|
|
1142
1142
|
}
|
|
1143
1143
|
function Qn(e = {}, t = null, r = []) {
|
|
@@ -1177,15 +1177,15 @@ function vi(e, t) {
|
|
|
1177
1177
|
let to = le(vi), gi = oe(null);
|
|
1178
1178
|
function bi({ children: e }) {
|
|
1179
1179
|
let t = X(gi);
|
|
1180
|
-
if (!t) return
|
|
1180
|
+
if (!t) return B.createElement(B.Fragment, null, e);
|
|
1181
1181
|
let { target: r } = t;
|
|
1182
|
-
return r ? Wn(
|
|
1182
|
+
return r ? Wn(B.createElement(B.Fragment, null, e), r) : null;
|
|
1183
1183
|
}
|
|
1184
1184
|
function ki({ data: e, form: t, disabled: r, onReset: n, overrides: a }) {
|
|
1185
|
-
let [i,
|
|
1185
|
+
let [i, s] = A(null), l = qe();
|
|
1186
1186
|
return q(() => {
|
|
1187
|
-
if (n && i) return
|
|
1188
|
-
}, [i, t, n]),
|
|
1187
|
+
if (n && i) return l.addEventListener(i, "reset", n);
|
|
1188
|
+
}, [i, t, n]), B.createElement(bi, null, B.createElement(Ei, { setForm: s, formId: t }), Qn(e).map(([c, d]) => B.createElement(to, { features: $r.Hidden, ...Oe({ key: c, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: t, disabled: r, name: c, value: d, ...a }) })));
|
|
1189
1189
|
}
|
|
1190
1190
|
function Ei({ setForm: e, formId: t }) {
|
|
1191
1191
|
return q(() => {
|
|
@@ -1193,7 +1193,7 @@ function Ei({ setForm: e, formId: t }) {
|
|
|
1193
1193
|
let r = document.getElementById(t);
|
|
1194
1194
|
r && e(r);
|
|
1195
1195
|
}
|
|
1196
|
-
}, [e, t]), t ? null :
|
|
1196
|
+
}, [e, t]), t ? null : B.createElement(to, { features: $r.Hidden, as: "input", type: "hidden", hidden: !0, readOnly: !0, ref: (r) => {
|
|
1197
1197
|
if (!r) return;
|
|
1198
1198
|
let n = r.closest("form");
|
|
1199
1199
|
n && e(n);
|
|
@@ -1256,7 +1256,7 @@ function $i(e, t = !0) {
|
|
|
1256
1256
|
return Object.assign(e, { [io]: t });
|
|
1257
1257
|
}
|
|
1258
1258
|
function pe(...e) {
|
|
1259
|
-
let t =
|
|
1259
|
+
let t = I(e);
|
|
1260
1260
|
q(() => {
|
|
1261
1261
|
t.current = e;
|
|
1262
1262
|
}, [e]);
|
|
@@ -1281,10 +1281,10 @@ function ji() {
|
|
|
1281
1281
|
}
|
|
1282
1282
|
let Ai = "p";
|
|
1283
1283
|
function Oi(e, t) {
|
|
1284
|
-
let r = Ue(), n = Cr(), { id: a = `headlessui-description-${r}`, ...i } = e,
|
|
1285
|
-
Q(() =>
|
|
1286
|
-
let c = Se({ ...
|
|
1287
|
-
return ue()({ ourProps: d, theirProps: i, slot: c, defaultTag: Ai, name:
|
|
1284
|
+
let r = Ue(), n = Cr(), { id: a = `headlessui-description-${r}`, ...i } = e, s = lo(), l = pe(t);
|
|
1285
|
+
Q(() => s.register(a), [a, s.register]);
|
|
1286
|
+
let c = Se({ ...s.slot, disabled: n || !1 }), d = { ref: l, ...s.props, id: a };
|
|
1287
|
+
return ue()({ ourProps: d, theirProps: i, slot: c, defaultTag: Ai, name: s.name || "Description" });
|
|
1288
1288
|
}
|
|
1289
1289
|
let Fi = le(Oi);
|
|
1290
1290
|
Object.assign(Fi, {});
|
|
@@ -1305,20 +1305,20 @@ function co(e) {
|
|
|
1305
1305
|
return ((n = e == null ? void 0 : e.length) != null ? n : 0) > 0 ? [a, ...e].filter(Boolean).join(" ") : a;
|
|
1306
1306
|
}
|
|
1307
1307
|
function Bi({ inherit: e = !1 } = {}) {
|
|
1308
|
-
let t = co(), [r, n] =
|
|
1308
|
+
let t = co(), [r, n] = A([]), a = e ? [t, ...r].filter(Boolean) : r;
|
|
1309
1309
|
return [a.length > 0 ? a.join(" ") : void 0, ae(() => function(i) {
|
|
1310
|
-
let
|
|
1310
|
+
let s = V((c) => (n((d) => [...d, c]), () => n((d) => {
|
|
1311
1311
|
let u = d.slice(), h = u.indexOf(c);
|
|
1312
1312
|
return h !== -1 && u.splice(h, 1), u;
|
|
1313
|
-
}))),
|
|
1314
|
-
return
|
|
1313
|
+
}))), l = ae(() => ({ register: s, slot: i.slot, name: i.name, props: i.props, value: i.value }), [s, i.slot, i.name, i.props, i.value]);
|
|
1314
|
+
return B.createElement(It.Provider, { value: l }, i.children);
|
|
1315
1315
|
}, [n])];
|
|
1316
1316
|
}
|
|
1317
1317
|
let Si = "label";
|
|
1318
1318
|
function Ii(e, t) {
|
|
1319
1319
|
var r;
|
|
1320
|
-
let n = Ue(), a = so(), i = ro(),
|
|
1321
|
-
Q(() => a.register(
|
|
1320
|
+
let n = Ue(), a = so(), i = ro(), s = Cr(), { id: l = `headlessui-label-${n}`, htmlFor: c = i ?? ((r = a.props) == null ? void 0 : r.htmlFor), passive: d = !1, ...u } = e, h = pe(t);
|
|
1321
|
+
Q(() => a.register(l), [l, a.register]);
|
|
1322
1322
|
let m = V((g) => {
|
|
1323
1323
|
let v = g.currentTarget;
|
|
1324
1324
|
if (!(g.target !== g.currentTarget && Mi(g.target)) && (qr(v) && g.preventDefault(), a.props && "onClick" in a.props && typeof a.props.onClick == "function" && a.props.onClick(g), qr(v))) {
|
|
@@ -1331,7 +1331,7 @@ function Ii(e, t) {
|
|
|
1331
1331
|
(oo(E) && (E.type === "file" || E.type === "radio" || E.type === "checkbox") || E.role === "radio" || E.role === "checkbox" || E.role === "switch") && E.click(), E.focus({ preventScroll: !0 });
|
|
1332
1332
|
}
|
|
1333
1333
|
}
|
|
1334
|
-
}), f = Se({ ...a.slot, disabled:
|
|
1334
|
+
}), f = Se({ ...a.slot, disabled: s || !1 }), w = { ref: h, ...a.props, id: l, htmlFor: c, onClick: m };
|
|
1335
1335
|
return d && ("onClick" in w && (delete w.htmlFor, delete w.onClick), "onClick" in u && delete u.onClick), ue()({ ourProps: w, theirProps: u, slot: f, defaultTag: c ? Si : "div", name: a.name || "Label" });
|
|
1336
1336
|
}
|
|
1337
1337
|
let Wi = le(Ii), Ni = Object.assign(Wi, {});
|
|
@@ -1339,7 +1339,7 @@ function Ti(e, t) {
|
|
|
1339
1339
|
return e !== null && t !== null && typeof e == "object" && typeof t == "object" && "id" in e && "id" in t ? e.id === t.id : e === t;
|
|
1340
1340
|
}
|
|
1341
1341
|
function Pi(e = Ti) {
|
|
1342
|
-
return
|
|
1342
|
+
return D((t, r) => {
|
|
1343
1343
|
if (typeof e == "string") {
|
|
1344
1344
|
let n = e;
|
|
1345
1345
|
return (t == null ? void 0 : t[n]) === (r == null ? void 0 : r[n]);
|
|
@@ -1353,14 +1353,14 @@ function zr(e) {
|
|
|
1353
1353
|
return { width: t, height: r };
|
|
1354
1354
|
}
|
|
1355
1355
|
function Hi(e, t, r = !1) {
|
|
1356
|
-
let [n, a] =
|
|
1356
|
+
let [n, a] = A(() => zr(t));
|
|
1357
1357
|
return Q(() => {
|
|
1358
1358
|
if (!t || !e) return;
|
|
1359
1359
|
let i = de();
|
|
1360
|
-
return i.requestAnimationFrame(function
|
|
1361
|
-
i.requestAnimationFrame(
|
|
1360
|
+
return i.requestAnimationFrame(function s() {
|
|
1361
|
+
i.requestAnimationFrame(s), a((l) => {
|
|
1362
1362
|
let c = zr(t);
|
|
1363
|
-
return c.width ===
|
|
1363
|
+
return c.width === l.width && c.height === l.height ? l : c;
|
|
1364
1364
|
});
|
|
1365
1365
|
}), () => {
|
|
1366
1366
|
i.dispose();
|
|
@@ -1369,7 +1369,7 @@ function Hi(e, t, r = !1) {
|
|
|
1369
1369
|
}
|
|
1370
1370
|
var uo = ((e) => (e[e.Left = 0] = "Left", e[e.Right = 2] = "Right", e))(uo || {});
|
|
1371
1371
|
function Vi(e) {
|
|
1372
|
-
let t =
|
|
1372
|
+
let t = I(null), r = V((a) => {
|
|
1373
1373
|
t.current = a.pointerType, !Gr(a.currentTarget) && a.pointerType === "mouse" && a.button === uo.Left && (a.preventDefault(), e(a));
|
|
1374
1374
|
}), n = V((a) => {
|
|
1375
1375
|
t.current !== "mouse" && (Gr(a.currentTarget) || e(a));
|
|
@@ -1385,7 +1385,7 @@ let fo = class extends Map {
|
|
|
1385
1385
|
return r === void 0 && (r = this.factory(t), this.set(t, r)), r;
|
|
1386
1386
|
}
|
|
1387
1387
|
};
|
|
1388
|
-
var
|
|
1388
|
+
var _i = Object.defineProperty, Di = (e, t, r) => t in e ? _i(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, Zi = (e, t, r) => (Di(e, t + "", r), r), mo = (e, t, r) => {
|
|
1389
1389
|
if (!t.has(e)) throw TypeError("Cannot " + r);
|
|
1390
1390
|
}, me = (e, t, r) => (mo(e, t, "read from private field"), r ? r.call(e) : t.get(e)), Kt = (e, t, r) => {
|
|
1391
1391
|
if (t.has(e)) throw TypeError("Cannot add the same private member more than once");
|
|
@@ -1490,18 +1490,18 @@ var Qr;
|
|
|
1490
1490
|
function Ki() {
|
|
1491
1491
|
if (Qr) return Qt;
|
|
1492
1492
|
Qr = 1;
|
|
1493
|
-
var e =
|
|
1493
|
+
var e = B;
|
|
1494
1494
|
function t(c, d) {
|
|
1495
1495
|
return c === d && (c !== 0 || 1 / c === 1 / d) || c !== c && d !== d;
|
|
1496
1496
|
}
|
|
1497
|
-
var r = typeof Object.is == "function" ? Object.is : t, n = e.useSyncExternalStore, a = e.useRef, i = e.useEffect,
|
|
1497
|
+
var r = typeof Object.is == "function" ? Object.is : t, n = e.useSyncExternalStore, a = e.useRef, i = e.useEffect, s = e.useMemo, l = e.useDebugValue;
|
|
1498
1498
|
return Qt.useSyncExternalStoreWithSelector = function(c, d, u, h, m) {
|
|
1499
1499
|
var f = a(null);
|
|
1500
1500
|
if (f.current === null) {
|
|
1501
1501
|
var w = { hasValue: !1, value: null };
|
|
1502
1502
|
f.current = w;
|
|
1503
1503
|
} else w = f.current;
|
|
1504
|
-
f =
|
|
1504
|
+
f = s(
|
|
1505
1505
|
function() {
|
|
1506
1506
|
function v(x) {
|
|
1507
1507
|
if (!E) {
|
|
@@ -1513,8 +1513,8 @@ function Ki() {
|
|
|
1513
1513
|
return k = x;
|
|
1514
1514
|
}
|
|
1515
1515
|
if (R = k, r(b, x)) return R;
|
|
1516
|
-
var
|
|
1517
|
-
return m !== void 0 && m(R,
|
|
1516
|
+
var C = h(x);
|
|
1517
|
+
return m !== void 0 && m(R, C) ? (b = x, R) : (b = x, k = C);
|
|
1518
1518
|
}
|
|
1519
1519
|
var E = !1, b, k, y = u === void 0 ? null : u;
|
|
1520
1520
|
return [
|
|
@@ -1534,7 +1534,7 @@ function Ki() {
|
|
|
1534
1534
|
w.hasValue = !0, w.value = g;
|
|
1535
1535
|
},
|
|
1536
1536
|
[g]
|
|
1537
|
-
),
|
|
1537
|
+
), l(g), g;
|
|
1538
1538
|
}, Qt;
|
|
1539
1539
|
}
|
|
1540
1540
|
var Jt = {};
|
|
@@ -1554,14 +1554,14 @@ function Xi() {
|
|
|
1554
1554
|
return c === d && (c !== 0 || 1 / c === 1 / d) || c !== c && d !== d;
|
|
1555
1555
|
}
|
|
1556
1556
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
1557
|
-
var t =
|
|
1557
|
+
var t = B, r = typeof Object.is == "function" ? Object.is : e, n = t.useSyncExternalStore, a = t.useRef, i = t.useEffect, s = t.useMemo, l = t.useDebugValue;
|
|
1558
1558
|
Jt.useSyncExternalStoreWithSelector = function(c, d, u, h, m) {
|
|
1559
1559
|
var f = a(null);
|
|
1560
1560
|
if (f.current === null) {
|
|
1561
1561
|
var w = { hasValue: !1, value: null };
|
|
1562
1562
|
f.current = w;
|
|
1563
1563
|
} else w = f.current;
|
|
1564
|
-
f =
|
|
1564
|
+
f = s(
|
|
1565
1565
|
function() {
|
|
1566
1566
|
function v(x) {
|
|
1567
1567
|
if (!E) {
|
|
@@ -1574,8 +1574,8 @@ function Xi() {
|
|
|
1574
1574
|
}
|
|
1575
1575
|
if (R = k, r(b, x))
|
|
1576
1576
|
return R;
|
|
1577
|
-
var
|
|
1578
|
-
return m !== void 0 && m(R,
|
|
1577
|
+
var C = h(x);
|
|
1578
|
+
return m !== void 0 && m(R, C) ? (b = x, R) : (b = x, k = C);
|
|
1579
1579
|
}
|
|
1580
1580
|
var E = !1, b, k, y = u === void 0 ? null : u;
|
|
1581
1581
|
return [
|
|
@@ -1595,7 +1595,7 @@ function Xi() {
|
|
|
1595
1595
|
w.hasValue = !0, w.value = g;
|
|
1596
1596
|
},
|
|
1597
1597
|
[g]
|
|
1598
|
-
),
|
|
1598
|
+
), l(g), g;
|
|
1599
1599
|
}, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
1600
1600
|
}()), Jt;
|
|
1601
1601
|
}
|
|
@@ -1608,7 +1608,7 @@ function Qi(e) {
|
|
|
1608
1608
|
return e;
|
|
1609
1609
|
}
|
|
1610
1610
|
function go(e, t) {
|
|
1611
|
-
let r = Ue(), n = Ar.get(t), [a, i] = ie(n,
|
|
1611
|
+
let r = Ue(), n = Ar.get(t), [a, i] = ie(n, D((s) => [n.selectors.isTop(s, r), n.selectors.inStack(s, r)], [n, r]));
|
|
1612
1612
|
return Q(() => {
|
|
1613
1613
|
if (e) return n.actions.push(r), () => n.actions.pop(r);
|
|
1614
1614
|
}, [n, e, r]), e ? i ? a : !0 : !1;
|
|
@@ -1631,20 +1631,20 @@ function Ji(e, { allowed: t, disallowed: r } = {}) {
|
|
|
1631
1631
|
Q(() => {
|
|
1632
1632
|
var a, i;
|
|
1633
1633
|
if (!n) return;
|
|
1634
|
-
let
|
|
1635
|
-
for (let c of (a = r == null ? void 0 : r()) != null ? a : []) c &&
|
|
1636
|
-
let
|
|
1637
|
-
for (let c of
|
|
1634
|
+
let s = de();
|
|
1635
|
+
for (let c of (a = r == null ? void 0 : r()) != null ? a : []) c && s.add(en(c));
|
|
1636
|
+
let l = (i = t == null ? void 0 : t()) != null ? i : [];
|
|
1637
|
+
for (let c of l) {
|
|
1638
1638
|
if (!c) continue;
|
|
1639
1639
|
let d = Bt(c);
|
|
1640
1640
|
if (!d) continue;
|
|
1641
1641
|
let u = c.parentElement;
|
|
1642
1642
|
for (; u && u !== d.body; ) {
|
|
1643
|
-
for (let h of u.children)
|
|
1643
|
+
for (let h of u.children) l.some((m) => h.contains(m)) || s.add(en(h));
|
|
1644
1644
|
u = u.parentElement;
|
|
1645
1645
|
}
|
|
1646
1646
|
}
|
|
1647
|
-
return
|
|
1647
|
+
return s.dispose;
|
|
1648
1648
|
}, [n, t, r]);
|
|
1649
1649
|
}
|
|
1650
1650
|
function el(e, t, r) {
|
|
@@ -1658,12 +1658,12 @@ function el(e, t, r) {
|
|
|
1658
1658
|
if (!a) return;
|
|
1659
1659
|
let i = de();
|
|
1660
1660
|
if (typeof ResizeObserver < "u") {
|
|
1661
|
-
let
|
|
1662
|
-
|
|
1661
|
+
let s = new ResizeObserver(() => n.current(a));
|
|
1662
|
+
s.observe(a), i.add(() => s.disconnect());
|
|
1663
1663
|
}
|
|
1664
1664
|
if (typeof IntersectionObserver < "u") {
|
|
1665
|
-
let
|
|
1666
|
-
|
|
1665
|
+
let s = new IntersectionObserver(() => n.current(a));
|
|
1666
|
+
s.observe(a), i.add(() => s.disconnect());
|
|
1667
1667
|
}
|
|
1668
1668
|
return () => i.dispose();
|
|
1669
1669
|
}, [t, n, e]);
|
|
@@ -1705,27 +1705,27 @@ function Eo(e, t = (r) => r) {
|
|
|
1705
1705
|
return e.slice().sort((r, n) => {
|
|
1706
1706
|
let a = t(r), i = t(n);
|
|
1707
1707
|
if (a === null || i === null) return 0;
|
|
1708
|
-
let
|
|
1709
|
-
return
|
|
1708
|
+
let s = a.compareDocumentPosition(i);
|
|
1709
|
+
return s & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : s & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
|
|
1710
1710
|
});
|
|
1711
1711
|
}
|
|
1712
1712
|
function sl(e, t, r = e === null ? document.body : Mt(e)) {
|
|
1713
1713
|
return cl(bo(r), t, { relativeTo: e });
|
|
1714
1714
|
}
|
|
1715
1715
|
function cl(e, t, { sorted: r = !0, relativeTo: n = null, skipElements: a = [] } = {}) {
|
|
1716
|
-
let i = Array.isArray(e) ? e.length > 0 ? Mt(e[0]) : document : Mt(e),
|
|
1717
|
-
a.length > 0 &&
|
|
1718
|
-
let
|
|
1716
|
+
let i = Array.isArray(e) ? e.length > 0 ? Mt(e[0]) : document : Mt(e), s = Array.isArray(e) ? r ? Eo(e) : e : t & 64 ? ol(e) : bo(e);
|
|
1717
|
+
a.length > 0 && s.length > 1 && (s = s.filter((f) => !a.some((w) => w != null && "current" in w ? (w == null ? void 0 : w.current) === f : w === f))), n = n ?? (i == null ? void 0 : i.activeElement);
|
|
1718
|
+
let l = (() => {
|
|
1719
1719
|
if (t & 5) return 1;
|
|
1720
1720
|
if (t & 10) return -1;
|
|
1721
1721
|
throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last");
|
|
1722
1722
|
})(), c = (() => {
|
|
1723
1723
|
if (t & 1) return 0;
|
|
1724
|
-
if (t & 2) return Math.max(0,
|
|
1725
|
-
if (t & 4) return Math.max(0,
|
|
1726
|
-
if (t & 8) return
|
|
1724
|
+
if (t & 2) return Math.max(0, s.indexOf(n)) - 1;
|
|
1725
|
+
if (t & 4) return Math.max(0, s.indexOf(n)) + 1;
|
|
1726
|
+
if (t & 8) return s.length - 1;
|
|
1727
1727
|
throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last");
|
|
1728
|
-
})(), d = t & 32 ? { preventScroll: !0 } : {}, u = 0, h =
|
|
1728
|
+
})(), d = t & 32 ? { preventScroll: !0 } : {}, u = 0, h = s.length, m;
|
|
1729
1729
|
do {
|
|
1730
1730
|
if (u >= h || u + h <= 0) return 0;
|
|
1731
1731
|
let f = c + u;
|
|
@@ -1734,7 +1734,7 @@ function cl(e, t, { sorted: r = !0, relativeTo: n = null, skipElements: a = [] }
|
|
|
1734
1734
|
if (f < 0) return 3;
|
|
1735
1735
|
if (f >= h) return 1;
|
|
1736
1736
|
}
|
|
1737
|
-
m =
|
|
1737
|
+
m = s[f], m == null || m.focus(d), u += l;
|
|
1738
1738
|
} while (m !== zn(m));
|
|
1739
1739
|
return t & 6 && ll(m) && m.select(), 2;
|
|
1740
1740
|
}
|
|
@@ -1751,8 +1751,8 @@ function Ke(e, t, r, n) {
|
|
|
1751
1751
|
let a = Ge(r);
|
|
1752
1752
|
q(() => {
|
|
1753
1753
|
if (!e) return;
|
|
1754
|
-
function i(
|
|
1755
|
-
a.current(
|
|
1754
|
+
function i(s) {
|
|
1755
|
+
a.current(s);
|
|
1756
1756
|
}
|
|
1757
1757
|
return document.addEventListener(t, i, n), () => document.removeEventListener(t, i, n);
|
|
1758
1758
|
}, [e, t, n]);
|
|
@@ -1761,39 +1761,39 @@ function ul(e, t, r, n) {
|
|
|
1761
1761
|
let a = Ge(r);
|
|
1762
1762
|
q(() => {
|
|
1763
1763
|
if (!e) return;
|
|
1764
|
-
function i(
|
|
1765
|
-
a.current(
|
|
1764
|
+
function i(s) {
|
|
1765
|
+
a.current(s);
|
|
1766
1766
|
}
|
|
1767
1767
|
return window.addEventListener(t, i, n), () => window.removeEventListener(t, i, n);
|
|
1768
1768
|
}, [e, t, n]);
|
|
1769
1769
|
}
|
|
1770
1770
|
const nn = 30;
|
|
1771
1771
|
function fl(e, t, r) {
|
|
1772
|
-
let n = Ge(r), a =
|
|
1773
|
-
if (
|
|
1774
|
-
let d = c(
|
|
1772
|
+
let n = Ge(r), a = D(function(l, c) {
|
|
1773
|
+
if (l.defaultPrevented) return;
|
|
1774
|
+
let d = c(l);
|
|
1775
1775
|
if (d === null || !d.getRootNode().contains(d) || !d.isConnected) return;
|
|
1776
1776
|
let u = function h(m) {
|
|
1777
1777
|
return typeof m == "function" ? h(m()) : Array.isArray(m) || m instanceof Set ? m : [m];
|
|
1778
1778
|
}(t);
|
|
1779
|
-
for (let h of u) if (h !== null && (h.contains(d) ||
|
|
1780
|
-
return !ko(d, Or.Loose) && d.tabIndex !== -1 &&
|
|
1781
|
-
}, [n, t]), i =
|
|
1782
|
-
Ke(e, "pointerdown", (
|
|
1779
|
+
for (let h of u) if (h !== null && (h.contains(d) || l.composed && l.composedPath().includes(h))) return;
|
|
1780
|
+
return !ko(d, Or.Loose) && d.tabIndex !== -1 && l.preventDefault(), n.current(l, d);
|
|
1781
|
+
}, [n, t]), i = I(null);
|
|
1782
|
+
Ke(e, "pointerdown", (l) => {
|
|
1783
1783
|
var c, d;
|
|
1784
|
-
rn() || (i.current = ((d = (c =
|
|
1785
|
-
}, !0), Ke(e, "pointerup", (
|
|
1784
|
+
rn() || (i.current = ((d = (c = l.composedPath) == null ? void 0 : c.call(l)) == null ? void 0 : d[0]) || l.target);
|
|
1785
|
+
}, !0), Ke(e, "pointerup", (l) => {
|
|
1786
1786
|
if (rn() || !i.current) return;
|
|
1787
1787
|
let c = i.current;
|
|
1788
|
-
return i.current = null, a(
|
|
1788
|
+
return i.current = null, a(l, () => c);
|
|
1789
1789
|
}, !0);
|
|
1790
|
-
let
|
|
1791
|
-
Ke(e, "touchstart", (
|
|
1792
|
-
|
|
1793
|
-
}, !0), Ke(e, "touchend", (
|
|
1794
|
-
let c = { x:
|
|
1795
|
-
if (!(Math.abs(c.x -
|
|
1796
|
-
}, !0), ul(e, "blur", (
|
|
1790
|
+
let s = I({ x: 0, y: 0 });
|
|
1791
|
+
Ke(e, "touchstart", (l) => {
|
|
1792
|
+
s.current.x = l.touches[0].clientX, s.current.y = l.touches[0].clientY;
|
|
1793
|
+
}, !0), Ke(e, "touchend", (l) => {
|
|
1794
|
+
let c = { x: l.changedTouches[0].clientX, y: l.changedTouches[0].clientY };
|
|
1795
|
+
if (!(Math.abs(c.x - s.current.x) >= nn || Math.abs(c.y - s.current.y) >= nn)) return a(l, () => ze(l.target) ? l.target : null);
|
|
1796
|
+
}, !0), ul(e, "blur", (l) => a(l, () => Li(window.document.activeElement) ? window.document.activeElement : null), !0);
|
|
1797
1797
|
}
|
|
1798
1798
|
function wr(...e) {
|
|
1799
1799
|
return ae(() => Bt(...e), [...e]);
|
|
@@ -1801,13 +1801,13 @@ function wr(...e) {
|
|
|
1801
1801
|
var ml = ((e) => (e[e.Ignore = 0] = "Ignore", e[e.Select = 1] = "Select", e[e.Close = 2] = "Close", e))(ml || {});
|
|
1802
1802
|
const pt = { Ignore: { kind: 0 }, Select: (e) => ({ kind: 1, target: e }), Close: { kind: 2 } }, hl = 200, on = 5;
|
|
1803
1803
|
function wl(e, { trigger: t, action: r, close: n, select: a }) {
|
|
1804
|
-
let i =
|
|
1804
|
+
let i = I(null), s = I(null), l = I(null);
|
|
1805
1805
|
Ke(e && t !== null, "pointerdown", (c) => {
|
|
1806
|
-
no(c == null ? void 0 : c.target) && t != null && t.contains(c.target) && (
|
|
1806
|
+
no(c == null ? void 0 : c.target) && t != null && t.contains(c.target) && (s.current = c.x, l.current = c.y, i.current = c.timeStamp);
|
|
1807
1807
|
}), Ke(e && t !== null, "pointerup", (c) => {
|
|
1808
1808
|
var d, u;
|
|
1809
1809
|
let h = i.current;
|
|
1810
|
-
if (h === null || (i.current = null, !ze(c.target)) || Math.abs(c.x - ((d =
|
|
1810
|
+
if (h === null || (i.current = null, !ze(c.target)) || Math.abs(c.x - ((d = s.current) != null ? d : c.x)) < on && Math.abs(c.y - ((u = l.current) != null ? u : c.y)) < on) return;
|
|
1811
1811
|
let m = r(c);
|
|
1812
1812
|
switch (m.kind) {
|
|
1813
1813
|
case 0:
|
|
@@ -1841,8 +1841,8 @@ function gl(e, t) {
|
|
|
1841
1841
|
}, subscribe(a) {
|
|
1842
1842
|
return n.add(a), () => n.delete(a);
|
|
1843
1843
|
}, dispatch(a, ...i) {
|
|
1844
|
-
let
|
|
1845
|
-
|
|
1844
|
+
let s = t[a].call(r, ...i);
|
|
1845
|
+
s && (r = s, n.forEach((l) => l()));
|
|
1846
1846
|
} };
|
|
1847
1847
|
}
|
|
1848
1848
|
function bl() {
|
|
@@ -1859,45 +1859,45 @@ function bl() {
|
|
|
1859
1859
|
function kl() {
|
|
1860
1860
|
return xo() ? { before({ doc: e, d: t, meta: r }) {
|
|
1861
1861
|
function n(a) {
|
|
1862
|
-
for (let i of r().containers) for (let
|
|
1862
|
+
for (let i of r().containers) for (let s of i()) if (s.contains(a)) return !0;
|
|
1863
1863
|
return !1;
|
|
1864
1864
|
}
|
|
1865
1865
|
t.microTask(() => {
|
|
1866
1866
|
var a;
|
|
1867
1867
|
if (window.getComputedStyle(e.documentElement).scrollBehavior !== "auto") {
|
|
1868
|
-
let
|
|
1869
|
-
|
|
1868
|
+
let l = de();
|
|
1869
|
+
l.style(e.documentElement, "scrollBehavior", "auto"), t.add(() => t.microTask(() => l.dispose()));
|
|
1870
1870
|
}
|
|
1871
|
-
let i = (a = window.scrollY) != null ? a : window.pageYOffset,
|
|
1872
|
-
t.addEventListener(e, "click", (
|
|
1873
|
-
if (ze(
|
|
1874
|
-
let c =
|
|
1871
|
+
let i = (a = window.scrollY) != null ? a : window.pageYOffset, s = null;
|
|
1872
|
+
t.addEventListener(e, "click", (l) => {
|
|
1873
|
+
if (ze(l.target)) try {
|
|
1874
|
+
let c = l.target.closest("a");
|
|
1875
1875
|
if (!c) return;
|
|
1876
1876
|
let { hash: d } = new URL(c.href), u = e.querySelector(d);
|
|
1877
|
-
ze(u) && !n(u) && (
|
|
1877
|
+
ze(u) && !n(u) && (s = u);
|
|
1878
1878
|
} catch {
|
|
1879
1879
|
}
|
|
1880
|
-
}, !0), t.group((
|
|
1880
|
+
}, !0), t.group((l) => {
|
|
1881
1881
|
t.addEventListener(e, "touchstart", (c) => {
|
|
1882
|
-
if (
|
|
1882
|
+
if (l.dispose(), ze(c.target) && yi(c.target)) if (n(c.target)) {
|
|
1883
1883
|
let d = c.target;
|
|
1884
1884
|
for (; d.parentElement && n(d.parentElement); ) d = d.parentElement;
|
|
1885
|
-
|
|
1886
|
-
} else
|
|
1885
|
+
l.style(d, "overscrollBehavior", "contain");
|
|
1886
|
+
} else l.style(c.target, "touchAction", "none");
|
|
1887
1887
|
});
|
|
1888
|
-
}), t.addEventListener(e, "touchmove", (
|
|
1889
|
-
if (ze(
|
|
1890
|
-
if (oo(
|
|
1891
|
-
if (n(
|
|
1892
|
-
let c =
|
|
1888
|
+
}), t.addEventListener(e, "touchmove", (l) => {
|
|
1889
|
+
if (ze(l.target)) {
|
|
1890
|
+
if (oo(l.target)) return;
|
|
1891
|
+
if (n(l.target)) {
|
|
1892
|
+
let c = l.target;
|
|
1893
1893
|
for (; c.parentElement && c.dataset.headlessuiPortal !== "" && !(c.scrollHeight > c.clientHeight || c.scrollWidth > c.clientWidth); ) c = c.parentElement;
|
|
1894
|
-
c.dataset.headlessuiPortal === "" &&
|
|
1895
|
-
} else
|
|
1894
|
+
c.dataset.headlessuiPortal === "" && l.preventDefault();
|
|
1895
|
+
} else l.preventDefault();
|
|
1896
1896
|
}
|
|
1897
1897
|
}, { passive: !1 }), t.add(() => {
|
|
1898
|
-
var
|
|
1899
|
-
let c = (
|
|
1900
|
-
i !== c && window.scrollTo(0, i),
|
|
1898
|
+
var l;
|
|
1899
|
+
let c = (l = window.scrollY) != null ? l : window.pageYOffset;
|
|
1900
|
+
i !== c && window.scrollTo(0, i), s && s.isConnected && (s.scrollIntoView({ block: "nearest" }), s = null);
|
|
1901
1901
|
});
|
|
1902
1902
|
});
|
|
1903
1903
|
} } : {};
|
|
@@ -1954,7 +1954,7 @@ function ln(e) {
|
|
|
1954
1954
|
return [e.screenX, e.screenY];
|
|
1955
1955
|
}
|
|
1956
1956
|
function Ll() {
|
|
1957
|
-
let e =
|
|
1957
|
+
let e = I([-1, -1]);
|
|
1958
1958
|
return { wasMoved(t) {
|
|
1959
1959
|
let r = ln(t);
|
|
1960
1960
|
return e.current[0] === r[0] && e.current[1] === r[1] ? !1 : (e.current = r, !0);
|
|
@@ -1963,8 +1963,8 @@ function Ll() {
|
|
|
1963
1963
|
} };
|
|
1964
1964
|
}
|
|
1965
1965
|
function Rl(e = 0) {
|
|
1966
|
-
let [t, r] =
|
|
1967
|
-
return { flags: t, setFlag: n, addFlag: a, hasFlag: i, removeFlag:
|
|
1966
|
+
let [t, r] = A(e), n = D((c) => r(c), []), a = D((c) => r((d) => d | c), []), i = D((c) => (t & c) === c, [t]), s = D((c) => r((d) => d & ~c), []), l = D((c) => r((d) => d ^ c), []);
|
|
1967
|
+
return { flags: t, setFlag: n, addFlag: a, hasFlag: i, removeFlag: s, toggleFlag: l };
|
|
1968
1968
|
}
|
|
1969
1969
|
var sn, cn;
|
|
1970
1970
|
typeof process < "u" && typeof globalThis < "u" && typeof Element < "u" && ((sn = process == null ? void 0 : process.env) == null ? void 0 : sn.NODE_ENV) === "test" && typeof ((cn = Element == null ? void 0 : Element.prototype) == null ? void 0 : cn.getAnimations) > "u" && (Element.prototype.getAnimations = function() {
|
|
@@ -1978,24 +1978,24 @@ function yo(e) {
|
|
|
1978
1978
|
return t;
|
|
1979
1979
|
}
|
|
1980
1980
|
function Lo(e, t, r, n) {
|
|
1981
|
-
let [a, i] =
|
|
1981
|
+
let [a, i] = A(r), { hasFlag: s, addFlag: l, removeFlag: c } = Rl(e && a ? 3 : 0), d = I(!1), u = I(!1), h = qe();
|
|
1982
1982
|
return Q(() => {
|
|
1983
1983
|
var m;
|
|
1984
1984
|
if (e) {
|
|
1985
1985
|
if (r && i(!0), !t) {
|
|
1986
|
-
r &&
|
|
1986
|
+
r && l(3);
|
|
1987
1987
|
return;
|
|
1988
1988
|
}
|
|
1989
1989
|
return (m = n == null ? void 0 : n.start) == null || m.call(n, r), Cl(t, { inFlight: d, prepare() {
|
|
1990
|
-
u.current ? u.current = !1 : u.current = d.current, d.current = !0, !u.current && (r ? (
|
|
1990
|
+
u.current ? u.current = !1 : u.current = d.current, d.current = !0, !u.current && (r ? (l(3), c(4)) : (l(4), c(2)));
|
|
1991
1991
|
}, run() {
|
|
1992
|
-
u.current ? r ? (c(3),
|
|
1992
|
+
u.current ? r ? (c(3), l(4)) : (c(4), l(3)) : r ? c(1) : l(1);
|
|
1993
1993
|
}, done() {
|
|
1994
1994
|
var f;
|
|
1995
1995
|
u.current && Al(t) || (d.current = !1, c(7), r || i(!1), (f = n == null ? void 0 : n.end) == null || f.call(n, r));
|
|
1996
1996
|
} });
|
|
1997
1997
|
}
|
|
1998
|
-
}, [e, r, t, h]), e ? [a, { closed:
|
|
1998
|
+
}, [e, r, t, h]), e ? [a, { closed: s(1), enter: s(2), leave: s(4), transition: s(2) || s(4) }] : [r, { closed: void 0, enter: void 0, leave: void 0, transition: void 0 }];
|
|
1999
1999
|
}
|
|
2000
2000
|
function Cl(e, { prepare: t, run: r, done: n, inFlight: a }) {
|
|
2001
2001
|
let i = de();
|
|
@@ -2013,8 +2013,8 @@ function $l(e, t) {
|
|
|
2013
2013
|
a.add(() => {
|
|
2014
2014
|
i = !0;
|
|
2015
2015
|
});
|
|
2016
|
-
let
|
|
2017
|
-
return
|
|
2016
|
+
let s = (n = (r = e.getAnimations) == null ? void 0 : r.call(e).filter((l) => l instanceof CSSTransition)) != null ? n : [];
|
|
2017
|
+
return s.length === 0 ? (t(), a.dispose) : (Promise.allSettled(s.map((l) => l.finished)).then(() => {
|
|
2018
2018
|
i || t();
|
|
2019
2019
|
}), a.dispose);
|
|
2020
2020
|
}
|
|
@@ -2134,10 +2134,10 @@ function Mo(e) {
|
|
|
2134
2134
|
function it(e, t, r) {
|
|
2135
2135
|
var n;
|
|
2136
2136
|
t === void 0 && (t = []), r === void 0 && (r = !0);
|
|
2137
|
-
const a = Mo(e), i = a === ((n = e.ownerDocument) == null ? void 0 : n.body),
|
|
2137
|
+
const a = Mo(e), i = a === ((n = e.ownerDocument) == null ? void 0 : n.body), s = se(a);
|
|
2138
2138
|
if (i) {
|
|
2139
|
-
const
|
|
2140
|
-
return t.concat(
|
|
2139
|
+
const l = pr(s);
|
|
2140
|
+
return t.concat(s, s.visualViewport || [], ut(a) ? a : [], l && r ? it(l) : []);
|
|
2141
2141
|
}
|
|
2142
2142
|
return t.concat(a, it(a, [], r));
|
|
2143
2143
|
}
|
|
@@ -2154,7 +2154,7 @@ function Hl() {
|
|
|
2154
2154
|
return r + "/" + n;
|
|
2155
2155
|
}).join(" ") : navigator.userAgent;
|
|
2156
2156
|
}
|
|
2157
|
-
const
|
|
2157
|
+
const De = Math.min, te = Math.max, lt = Math.round, vt = Math.floor, Ee = (e) => ({
|
|
2158
2158
|
x: e,
|
|
2159
2159
|
y: e
|
|
2160
2160
|
}), Vl = {
|
|
@@ -2162,12 +2162,12 @@ const _e = Math.min, te = Math.max, lt = Math.round, vt = Math.floor, Ee = (e) =
|
|
|
2162
2162
|
right: "left",
|
|
2163
2163
|
bottom: "top",
|
|
2164
2164
|
top: "bottom"
|
|
2165
|
-
},
|
|
2165
|
+
}, _l = {
|
|
2166
2166
|
start: "end",
|
|
2167
2167
|
end: "start"
|
|
2168
2168
|
};
|
|
2169
2169
|
function un(e, t, r) {
|
|
2170
|
-
return te(e,
|
|
2170
|
+
return te(e, De(t, r));
|
|
2171
2171
|
}
|
|
2172
2172
|
function Je(e, t) {
|
|
2173
2173
|
return typeof e == "function" ? e(t) : e;
|
|
@@ -2184,9 +2184,9 @@ function Co(e) {
|
|
|
2184
2184
|
function $o(e) {
|
|
2185
2185
|
return e === "y" ? "height" : "width";
|
|
2186
2186
|
}
|
|
2187
|
-
const
|
|
2187
|
+
const Dl = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
2188
2188
|
function Me(e) {
|
|
2189
|
-
return
|
|
2189
|
+
return Dl.has(We(e)) ? "y" : "x";
|
|
2190
2190
|
}
|
|
2191
2191
|
function jo(e) {
|
|
2192
2192
|
return Co(Me(e));
|
|
@@ -2194,15 +2194,15 @@ function jo(e) {
|
|
|
2194
2194
|
function Zl(e, t, r) {
|
|
2195
2195
|
r === void 0 && (r = !1);
|
|
2196
2196
|
const n = ft(e), a = jo(e), i = $o(a);
|
|
2197
|
-
let
|
|
2198
|
-
return t.reference[i] > t.floating[i] && (
|
|
2197
|
+
let s = a === "x" ? n === (r ? "end" : "start") ? "right" : "left" : n === "start" ? "bottom" : "top";
|
|
2198
|
+
return t.reference[i] > t.floating[i] && (s = $t(s)), [s, $t(s)];
|
|
2199
2199
|
}
|
|
2200
2200
|
function Ul(e) {
|
|
2201
2201
|
const t = $t(e);
|
|
2202
2202
|
return [vr(e), t, vr(t)];
|
|
2203
2203
|
}
|
|
2204
2204
|
function vr(e) {
|
|
2205
|
-
return e.replace(/start|end/g, (t) =>
|
|
2205
|
+
return e.replace(/start|end/g, (t) => _l[t]);
|
|
2206
2206
|
}
|
|
2207
2207
|
const fn = ["left", "right"], mn = ["right", "left"], ql = ["top", "bottom"], Gl = ["bottom", "top"];
|
|
2208
2208
|
function zl(e, t, r) {
|
|
@@ -2220,7 +2220,7 @@ function zl(e, t, r) {
|
|
|
2220
2220
|
function Kl(e, t, r, n) {
|
|
2221
2221
|
const a = ft(e);
|
|
2222
2222
|
let i = zl(We(e), r === "start", n);
|
|
2223
|
-
return a && (i = i.map((
|
|
2223
|
+
return a && (i = i.map((s) => s + "-" + a), t && (i = i.concat(i.map(vr)))), i;
|
|
2224
2224
|
}
|
|
2225
2225
|
function $t(e) {
|
|
2226
2226
|
return e.replace(/left|right|bottom|top/g, (t) => Vl[t]);
|
|
@@ -2265,7 +2265,7 @@ function hn(e, t, r) {
|
|
|
2265
2265
|
reference: n,
|
|
2266
2266
|
floating: a
|
|
2267
2267
|
} = e;
|
|
2268
|
-
const i = Me(t),
|
|
2268
|
+
const i = Me(t), s = jo(t), l = $o(s), c = We(t), d = i === "y", u = n.x + n.width / 2 - a.width / 2, h = n.y + n.height / 2 - a.height / 2, m = n[l] / 2 - a[l] / 2;
|
|
2269
2269
|
let f;
|
|
2270
2270
|
switch (c) {
|
|
2271
2271
|
case "top":
|
|
@@ -2300,10 +2300,10 @@ function hn(e, t, r) {
|
|
|
2300
2300
|
}
|
|
2301
2301
|
switch (ft(t)) {
|
|
2302
2302
|
case "start":
|
|
2303
|
-
f[
|
|
2303
|
+
f[s] -= m * (r && d ? -1 : 1);
|
|
2304
2304
|
break;
|
|
2305
2305
|
case "end":
|
|
2306
|
-
f[
|
|
2306
|
+
f[s] += m * (r && d ? -1 : 1);
|
|
2307
2307
|
break;
|
|
2308
2308
|
}
|
|
2309
2309
|
return f;
|
|
@@ -2313,9 +2313,9 @@ const Ql = async (e, t, r) => {
|
|
|
2313
2313
|
placement: n = "bottom",
|
|
2314
2314
|
strategy: a = "absolute",
|
|
2315
2315
|
middleware: i = [],
|
|
2316
|
-
platform:
|
|
2317
|
-
} = r,
|
|
2318
|
-
let d = await
|
|
2316
|
+
platform: s
|
|
2317
|
+
} = r, l = i.filter(Boolean), c = await (s.isRTL == null ? void 0 : s.isRTL(t));
|
|
2318
|
+
let d = await s.getElementRects({
|
|
2319
2319
|
reference: e,
|
|
2320
2320
|
floating: t,
|
|
2321
2321
|
strategy: a
|
|
@@ -2323,11 +2323,11 @@ const Ql = async (e, t, r) => {
|
|
|
2323
2323
|
x: u,
|
|
2324
2324
|
y: h
|
|
2325
2325
|
} = hn(d, n, c), m = n, f = {}, w = 0;
|
|
2326
|
-
for (let g = 0; g <
|
|
2326
|
+
for (let g = 0; g < l.length; g++) {
|
|
2327
2327
|
const {
|
|
2328
2328
|
name: v,
|
|
2329
2329
|
fn: E
|
|
2330
|
-
} =
|
|
2330
|
+
} = l[g], {
|
|
2331
2331
|
x: b,
|
|
2332
2332
|
y: k,
|
|
2333
2333
|
data: y,
|
|
@@ -2340,7 +2340,7 @@ const Ql = async (e, t, r) => {
|
|
|
2340
2340
|
strategy: a,
|
|
2341
2341
|
middlewareData: f,
|
|
2342
2342
|
rects: d,
|
|
2343
|
-
platform:
|
|
2343
|
+
platform: s,
|
|
2344
2344
|
elements: {
|
|
2345
2345
|
reference: e,
|
|
2346
2346
|
floating: t
|
|
@@ -2352,7 +2352,7 @@ const Ql = async (e, t, r) => {
|
|
|
2352
2352
|
...f[v],
|
|
2353
2353
|
...y
|
|
2354
2354
|
}
|
|
2355
|
-
}, x && w <= 50 && (w++, typeof x == "object" && (x.placement && (m = x.placement), x.rects && (d = x.rects === !0 ? await
|
|
2355
|
+
}, x && w <= 50 && (w++, typeof x == "object" && (x.placement && (m = x.placement), x.rects && (d = x.rects === !0 ? await s.getElementRects({
|
|
2356
2356
|
reference: e,
|
|
2357
2357
|
floating: t,
|
|
2358
2358
|
strategy: a
|
|
@@ -2376,8 +2376,8 @@ async function Pt(e, t) {
|
|
|
2376
2376
|
x: n,
|
|
2377
2377
|
y: a,
|
|
2378
2378
|
platform: i,
|
|
2379
|
-
rects:
|
|
2380
|
-
elements:
|
|
2379
|
+
rects: s,
|
|
2380
|
+
elements: l,
|
|
2381
2381
|
strategy: c
|
|
2382
2382
|
} = e, {
|
|
2383
2383
|
boundary: d = "clippingAncestors",
|
|
@@ -2385,24 +2385,24 @@ async function Pt(e, t) {
|
|
|
2385
2385
|
elementContext: h = "floating",
|
|
2386
2386
|
altBoundary: m = !1,
|
|
2387
2387
|
padding: f = 0
|
|
2388
|
-
} = Je(t, e), w = Yl(f), v =
|
|
2389
|
-
element: (r = await (i.isElement == null ? void 0 : i.isElement(v))) == null || r ? v : v.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(
|
|
2388
|
+
} = Je(t, e), w = Yl(f), v = l[m ? h === "floating" ? "reference" : "floating" : h], E = jt(await i.getClippingRect({
|
|
2389
|
+
element: (r = await (i.isElement == null ? void 0 : i.isElement(v))) == null || r ? v : v.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(l.floating)),
|
|
2390
2390
|
boundary: d,
|
|
2391
2391
|
rootBoundary: u,
|
|
2392
2392
|
strategy: c
|
|
2393
2393
|
})), b = h === "floating" ? {
|
|
2394
2394
|
x: n,
|
|
2395
2395
|
y: a,
|
|
2396
|
-
width:
|
|
2397
|
-
height:
|
|
2398
|
-
} :
|
|
2396
|
+
width: s.floating.width,
|
|
2397
|
+
height: s.floating.height
|
|
2398
|
+
} : s.reference, k = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(l.floating)), y = await (i.isElement == null ? void 0 : i.isElement(k)) ? await (i.getScale == null ? void 0 : i.getScale(k)) || {
|
|
2399
2399
|
x: 1,
|
|
2400
2400
|
y: 1
|
|
2401
2401
|
} : {
|
|
2402
2402
|
x: 1,
|
|
2403
2403
|
y: 1
|
|
2404
2404
|
}, x = jt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
2405
|
-
elements:
|
|
2405
|
+
elements: l,
|
|
2406
2406
|
rect: b,
|
|
2407
2407
|
offsetParent: k,
|
|
2408
2408
|
strategy: c
|
|
@@ -2423,8 +2423,8 @@ const Jl = function(e) {
|
|
|
2423
2423
|
const {
|
|
2424
2424
|
placement: a,
|
|
2425
2425
|
middlewareData: i,
|
|
2426
|
-
rects:
|
|
2427
|
-
initialPlacement:
|
|
2426
|
+
rects: s,
|
|
2427
|
+
initialPlacement: l,
|
|
2428
2428
|
platform: c,
|
|
2429
2429
|
elements: d
|
|
2430
2430
|
} = t, {
|
|
@@ -2438,38 +2438,38 @@ const Jl = function(e) {
|
|
|
2438
2438
|
} = Je(e, t);
|
|
2439
2439
|
if ((r = i.arrow) != null && r.alignmentOffset)
|
|
2440
2440
|
return {};
|
|
2441
|
-
const E = We(a), b = Me(
|
|
2442
|
-
!m && R && x.push(...Kl(
|
|
2443
|
-
const
|
|
2444
|
-
let
|
|
2445
|
-
if (u &&
|
|
2446
|
-
const
|
|
2447
|
-
|
|
2441
|
+
const E = We(a), b = Me(l), k = We(l) === l, y = await (c.isRTL == null ? void 0 : c.isRTL(d.floating)), x = m || (k || !g ? [$t(l)] : Ul(l)), R = w !== "none";
|
|
2442
|
+
!m && R && x.push(...Kl(l, g, w, y));
|
|
2443
|
+
const C = [l, ...x], $ = await Pt(t, v), j = [];
|
|
2444
|
+
let M = ((n = i.flip) == null ? void 0 : n.overflows) || [];
|
|
2445
|
+
if (u && j.push($[E]), h) {
|
|
2446
|
+
const P = Zl(a, s, y);
|
|
2447
|
+
j.push($[P[0]], $[P[1]]);
|
|
2448
2448
|
}
|
|
2449
|
-
if (
|
|
2449
|
+
if (M = [...M, {
|
|
2450
2450
|
placement: a,
|
|
2451
|
-
overflows:
|
|
2452
|
-
}],
|
|
2453
|
-
var
|
|
2454
|
-
const
|
|
2455
|
-
if (
|
|
2451
|
+
overflows: j
|
|
2452
|
+
}], !j.every((P) => P <= 0)) {
|
|
2453
|
+
var O, T;
|
|
2454
|
+
const P = (((O = i.flip) == null ? void 0 : O.index) || 0) + 1, S = C[P];
|
|
2455
|
+
if (S && (!(h === "alignment" ? b !== Me(S) : !1) || // We leave the current main axis only if every placement on that axis
|
|
2456
2456
|
// overflows the main axis.
|
|
2457
|
-
|
|
2457
|
+
M.every((N) => Me(N.placement) === b ? N.overflows[0] > 0 : !0)))
|
|
2458
2458
|
return {
|
|
2459
2459
|
data: {
|
|
2460
|
-
index:
|
|
2461
|
-
overflows:
|
|
2460
|
+
index: P,
|
|
2461
|
+
overflows: M
|
|
2462
2462
|
},
|
|
2463
2463
|
reset: {
|
|
2464
|
-
placement:
|
|
2464
|
+
placement: S
|
|
2465
2465
|
}
|
|
2466
2466
|
};
|
|
2467
|
-
let
|
|
2468
|
-
if (!
|
|
2467
|
+
let _ = (T = M.filter((G) => G.overflows[0] <= 0).sort((G, N) => G.overflows[1] - N.overflows[1])[0]) == null ? void 0 : T.placement;
|
|
2468
|
+
if (!_)
|
|
2469
2469
|
switch (f) {
|
|
2470
2470
|
case "bestFit": {
|
|
2471
|
-
var
|
|
2472
|
-
const G = (
|
|
2471
|
+
var F;
|
|
2472
|
+
const G = (F = M.filter((N) => {
|
|
2473
2473
|
if (R) {
|
|
2474
2474
|
const H = Me(N.placement);
|
|
2475
2475
|
return H === b || // Create a bias to the `y` side axis due to horizontal
|
|
@@ -2477,18 +2477,18 @@ const Jl = function(e) {
|
|
|
2477
2477
|
H === "y";
|
|
2478
2478
|
}
|
|
2479
2479
|
return !0;
|
|
2480
|
-
}).map((N) => [N.placement, N.overflows.filter((H) => H > 0).reduce((H, z) => H + z, 0)]).sort((N, H) => N[1] - H[1])[0]) == null ? void 0 :
|
|
2481
|
-
G && (
|
|
2480
|
+
}).map((N) => [N.placement, N.overflows.filter((H) => H > 0).reduce((H, z) => H + z, 0)]).sort((N, H) => N[1] - H[1])[0]) == null ? void 0 : F[0];
|
|
2481
|
+
G && (_ = G);
|
|
2482
2482
|
break;
|
|
2483
2483
|
}
|
|
2484
2484
|
case "initialPlacement":
|
|
2485
|
-
|
|
2485
|
+
_ = l;
|
|
2486
2486
|
break;
|
|
2487
2487
|
}
|
|
2488
|
-
if (a !==
|
|
2488
|
+
if (a !== _)
|
|
2489
2489
|
return {
|
|
2490
2490
|
reset: {
|
|
2491
|
-
placement:
|
|
2491
|
+
placement: _
|
|
2492
2492
|
}
|
|
2493
2493
|
};
|
|
2494
2494
|
}
|
|
@@ -2501,7 +2501,7 @@ async function ts(e, t) {
|
|
|
2501
2501
|
placement: r,
|
|
2502
2502
|
platform: n,
|
|
2503
2503
|
elements: a
|
|
2504
|
-
} = e, i = await (n.isRTL == null ? void 0 : n.isRTL(a.floating)),
|
|
2504
|
+
} = e, i = await (n.isRTL == null ? void 0 : n.isRTL(a.floating)), s = We(r), l = ft(r), c = Me(r) === "y", d = es.has(s) ? -1 : 1, u = i && c ? -1 : 1, h = Je(t, e);
|
|
2505
2505
|
let {
|
|
2506
2506
|
mainAxis: m,
|
|
2507
2507
|
crossAxis: f,
|
|
@@ -2515,7 +2515,7 @@ async function ts(e, t) {
|
|
|
2515
2515
|
crossAxis: h.crossAxis || 0,
|
|
2516
2516
|
alignmentAxis: h.alignmentAxis
|
|
2517
2517
|
};
|
|
2518
|
-
return
|
|
2518
|
+
return l && typeof w == "number" && (f = l === "end" ? w * -1 : w), c ? {
|
|
2519
2519
|
x: f * u,
|
|
2520
2520
|
y: m * d
|
|
2521
2521
|
} : {
|
|
@@ -2532,15 +2532,15 @@ const rs = function(e) {
|
|
|
2532
2532
|
const {
|
|
2533
2533
|
x: a,
|
|
2534
2534
|
y: i,
|
|
2535
|
-
placement:
|
|
2536
|
-
middlewareData:
|
|
2535
|
+
placement: s,
|
|
2536
|
+
middlewareData: l
|
|
2537
2537
|
} = t, c = await ts(t, e);
|
|
2538
|
-
return
|
|
2538
|
+
return s === ((r = l.offset) == null ? void 0 : r.placement) && (n = l.arrow) != null && n.alignmentOffset ? {} : {
|
|
2539
2539
|
x: a + c.x,
|
|
2540
2540
|
y: i + c.y,
|
|
2541
2541
|
data: {
|
|
2542
2542
|
...c,
|
|
2543
|
-
placement:
|
|
2543
|
+
placement: s
|
|
2544
2544
|
}
|
|
2545
2545
|
};
|
|
2546
2546
|
}
|
|
@@ -2556,8 +2556,8 @@ const rs = function(e) {
|
|
|
2556
2556
|
placement: a
|
|
2557
2557
|
} = t, {
|
|
2558
2558
|
mainAxis: i = !0,
|
|
2559
|
-
crossAxis:
|
|
2560
|
-
limiter:
|
|
2559
|
+
crossAxis: s = !1,
|
|
2560
|
+
limiter: l = {
|
|
2561
2561
|
fn: (v) => {
|
|
2562
2562
|
let {
|
|
2563
2563
|
x: E,
|
|
@@ -2579,11 +2579,11 @@ const rs = function(e) {
|
|
|
2579
2579
|
const v = m === "y" ? "top" : "left", E = m === "y" ? "bottom" : "right", b = f + u[v], k = f - u[E];
|
|
2580
2580
|
f = un(b, f, k);
|
|
2581
2581
|
}
|
|
2582
|
-
if (
|
|
2582
|
+
if (s) {
|
|
2583
2583
|
const v = h === "y" ? "top" : "left", E = h === "y" ? "bottom" : "right", b = w + u[v], k = w - u[E];
|
|
2584
2584
|
w = un(b, w, k);
|
|
2585
2585
|
}
|
|
2586
|
-
const g =
|
|
2586
|
+
const g = l.fn({
|
|
2587
2587
|
...t,
|
|
2588
2588
|
[m]: f,
|
|
2589
2589
|
[h]: w
|
|
@@ -2595,7 +2595,7 @@ const rs = function(e) {
|
|
|
2595
2595
|
y: g.y - n,
|
|
2596
2596
|
enabled: {
|
|
2597
2597
|
[m]: i,
|
|
2598
|
-
[h]:
|
|
2598
|
+
[h]: s
|
|
2599
2599
|
}
|
|
2600
2600
|
}
|
|
2601
2601
|
};
|
|
@@ -2610,8 +2610,8 @@ const rs = function(e) {
|
|
|
2610
2610
|
const {
|
|
2611
2611
|
placement: a,
|
|
2612
2612
|
rects: i,
|
|
2613
|
-
platform:
|
|
2614
|
-
elements:
|
|
2613
|
+
platform: s,
|
|
2614
|
+
elements: l
|
|
2615
2615
|
} = t, {
|
|
2616
2616
|
apply: c = () => {
|
|
2617
2617
|
},
|
|
@@ -2621,20 +2621,20 @@ const rs = function(e) {
|
|
|
2621
2621
|
height: g
|
|
2622
2622
|
} = i.floating;
|
|
2623
2623
|
let v, E;
|
|
2624
|
-
h === "top" || h === "bottom" ? (v = h, E = m === (await (
|
|
2625
|
-
const b = g - u.top - u.bottom, k = w - u.left - u.right, y =
|
|
2626
|
-
let
|
|
2627
|
-
if ((r = t.middlewareData.shift) != null && r.enabled.x && (
|
|
2628
|
-
const
|
|
2629
|
-
f ?
|
|
2624
|
+
h === "top" || h === "bottom" ? (v = h, E = m === (await (s.isRTL == null ? void 0 : s.isRTL(l.floating)) ? "start" : "end") ? "left" : "right") : (E = h, v = m === "end" ? "top" : "bottom");
|
|
2625
|
+
const b = g - u.top - u.bottom, k = w - u.left - u.right, y = De(g - u[v], b), x = De(w - u[E], k), R = !t.middlewareData.shift;
|
|
2626
|
+
let C = y, $ = x;
|
|
2627
|
+
if ((r = t.middlewareData.shift) != null && r.enabled.x && ($ = k), (n = t.middlewareData.shift) != null && n.enabled.y && (C = b), R && !m) {
|
|
2628
|
+
const M = te(u.left, 0), O = te(u.right, 0), T = te(u.top, 0), F = te(u.bottom, 0);
|
|
2629
|
+
f ? $ = w - 2 * (M !== 0 || O !== 0 ? M + O : te(u.left, u.right)) : C = g - 2 * (T !== 0 || F !== 0 ? T + F : te(u.top, u.bottom));
|
|
2630
2630
|
}
|
|
2631
2631
|
await c({
|
|
2632
2632
|
...t,
|
|
2633
|
-
availableWidth:
|
|
2634
|
-
availableHeight:
|
|
2633
|
+
availableWidth: $,
|
|
2634
|
+
availableHeight: C
|
|
2635
2635
|
});
|
|
2636
|
-
const
|
|
2637
|
-
return w !==
|
|
2636
|
+
const j = await s.getDimensions(l.floating);
|
|
2637
|
+
return w !== j.width || g !== j.height ? {
|
|
2638
2638
|
reset: {
|
|
2639
2639
|
rects: !0
|
|
2640
2640
|
}
|
|
@@ -2645,11 +2645,11 @@ const rs = function(e) {
|
|
|
2645
2645
|
function Ao(e) {
|
|
2646
2646
|
const t = ge(e);
|
|
2647
2647
|
let r = parseFloat(t.width) || 0, n = parseFloat(t.height) || 0;
|
|
2648
|
-
const a = ye(e), i = a ? e.offsetWidth : r,
|
|
2649
|
-
return
|
|
2648
|
+
const a = ye(e), i = a ? e.offsetWidth : r, s = a ? e.offsetHeight : n, l = lt(r) !== i || lt(n) !== s;
|
|
2649
|
+
return l && (r = i, n = s), {
|
|
2650
2650
|
width: r,
|
|
2651
2651
|
height: n,
|
|
2652
|
-
$:
|
|
2652
|
+
$: l
|
|
2653
2653
|
};
|
|
2654
2654
|
}
|
|
2655
2655
|
function Sr(e) {
|
|
@@ -2664,10 +2664,10 @@ function Xe(e) {
|
|
|
2664
2664
|
height: a,
|
|
2665
2665
|
$: i
|
|
2666
2666
|
} = Ao(t);
|
|
2667
|
-
let
|
|
2668
|
-
return (!
|
|
2669
|
-
x:
|
|
2670
|
-
y:
|
|
2667
|
+
let s = (i ? lt(r.width) : r.width) / n, l = (i ? lt(r.height) : r.height) / a;
|
|
2668
|
+
return (!s || !Number.isFinite(s)) && (s = 1), (!l || !Number.isFinite(l)) && (l = 1), {
|
|
2669
|
+
x: s,
|
|
2670
|
+
y: l
|
|
2671
2671
|
};
|
|
2672
2672
|
}
|
|
2673
2673
|
const as = /* @__PURE__ */ Ee(0);
|
|
@@ -2684,10 +2684,10 @@ function is(e, t, r) {
|
|
|
2684
2684
|
function Ze(e, t, r, n) {
|
|
2685
2685
|
t === void 0 && (t = !1), r === void 0 && (r = !1);
|
|
2686
2686
|
const a = e.getBoundingClientRect(), i = Sr(e);
|
|
2687
|
-
let
|
|
2688
|
-
t && (n ? ne(n) && (
|
|
2689
|
-
const
|
|
2690
|
-
let c = (a.left +
|
|
2687
|
+
let s = Ee(1);
|
|
2688
|
+
t && (n ? ne(n) && (s = Xe(n)) : s = Xe(e));
|
|
2689
|
+
const l = is(i, r, n) ? Oo(i) : Ee(0);
|
|
2690
|
+
let c = (a.left + l.x) / s.x, d = (a.top + l.y) / s.y, u = a.width / s.x, h = a.height / s.y;
|
|
2691
2691
|
if (i) {
|
|
2692
2692
|
const m = se(i), f = n && ne(n) ? se(n) : n;
|
|
2693
2693
|
let w = m, g = pr(w);
|
|
@@ -2721,19 +2721,19 @@ function ls(e) {
|
|
|
2721
2721
|
offsetParent: n,
|
|
2722
2722
|
strategy: a
|
|
2723
2723
|
} = e;
|
|
2724
|
-
const i = a === "fixed",
|
|
2725
|
-
if (n ===
|
|
2724
|
+
const i = a === "fixed", s = Le(n), l = t ? Nt(t.floating) : !1;
|
|
2725
|
+
if (n === s || l && i)
|
|
2726
2726
|
return r;
|
|
2727
2727
|
let c = {
|
|
2728
2728
|
scrollLeft: 0,
|
|
2729
2729
|
scrollTop: 0
|
|
2730
2730
|
}, d = Ee(1);
|
|
2731
2731
|
const u = Ee(0), h = ye(n);
|
|
2732
|
-
if ((h || !h && !i) && ((Qe(n) !== "body" || ut(
|
|
2732
|
+
if ((h || !h && !i) && ((Qe(n) !== "body" || ut(s)) && (c = Tt(n)), ye(n))) {
|
|
2733
2733
|
const f = Ze(n);
|
|
2734
2734
|
d = Xe(n), u.x = f.x + n.clientLeft, u.y = f.y + n.clientTop;
|
|
2735
2735
|
}
|
|
2736
|
-
const m =
|
|
2736
|
+
const m = s && !h && !i ? Fo(s, c) : Ee(0);
|
|
2737
2737
|
return {
|
|
2738
2738
|
width: r.width * d.x,
|
|
2739
2739
|
height: r.height * d.y,
|
|
@@ -2746,23 +2746,23 @@ function ss(e) {
|
|
|
2746
2746
|
}
|
|
2747
2747
|
function cs(e) {
|
|
2748
2748
|
const t = Le(e), r = Tt(e), n = e.ownerDocument.body, a = te(t.scrollWidth, t.clientWidth, n.scrollWidth, n.clientWidth), i = te(t.scrollHeight, t.clientHeight, n.scrollHeight, n.clientHeight);
|
|
2749
|
-
let
|
|
2750
|
-
const
|
|
2751
|
-
return ge(n).direction === "rtl" && (
|
|
2749
|
+
let s = -r.scrollLeft + Ht(e);
|
|
2750
|
+
const l = -r.scrollTop;
|
|
2751
|
+
return ge(n).direction === "rtl" && (s += te(t.clientWidth, n.clientWidth) - a), {
|
|
2752
2752
|
width: a,
|
|
2753
2753
|
height: i,
|
|
2754
|
-
x:
|
|
2755
|
-
y:
|
|
2754
|
+
x: s,
|
|
2755
|
+
y: l
|
|
2756
2756
|
};
|
|
2757
2757
|
}
|
|
2758
2758
|
const wn = 25;
|
|
2759
2759
|
function ds(e, t) {
|
|
2760
2760
|
const r = se(e), n = Le(e), a = r.visualViewport;
|
|
2761
|
-
let i = n.clientWidth,
|
|
2761
|
+
let i = n.clientWidth, s = n.clientHeight, l = 0, c = 0;
|
|
2762
2762
|
if (a) {
|
|
2763
|
-
i = a.width,
|
|
2763
|
+
i = a.width, s = a.height;
|
|
2764
2764
|
const u = Br();
|
|
2765
|
-
(!u || u && t === "fixed") && (
|
|
2765
|
+
(!u || u && t === "fixed") && (l = a.offsetLeft, c = a.offsetTop);
|
|
2766
2766
|
}
|
|
2767
2767
|
const d = Ht(n);
|
|
2768
2768
|
if (d <= 0) {
|
|
@@ -2771,17 +2771,17 @@ function ds(e, t) {
|
|
|
2771
2771
|
} else d <= wn && (i += d);
|
|
2772
2772
|
return {
|
|
2773
2773
|
width: i,
|
|
2774
|
-
height:
|
|
2775
|
-
x:
|
|
2774
|
+
height: s,
|
|
2775
|
+
x: l,
|
|
2776
2776
|
y: c
|
|
2777
2777
|
};
|
|
2778
2778
|
}
|
|
2779
2779
|
const us = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
2780
2780
|
function fs(e, t) {
|
|
2781
|
-
const r = Ze(e, !0, t === "fixed"), n = r.top + e.clientTop, a = r.left + e.clientLeft, i = ye(e) ? Xe(e) : Ee(1),
|
|
2781
|
+
const r = Ze(e, !0, t === "fixed"), n = r.top + e.clientTop, a = r.left + e.clientLeft, i = ye(e) ? Xe(e) : Ee(1), s = e.clientWidth * i.x, l = e.clientHeight * i.y, c = a * i.x, d = n * i.y;
|
|
2782
2782
|
return {
|
|
2783
|
-
width:
|
|
2784
|
-
height:
|
|
2783
|
+
width: s,
|
|
2784
|
+
height: l,
|
|
2785
2785
|
x: c,
|
|
2786
2786
|
y: d
|
|
2787
2787
|
};
|
|
@@ -2813,12 +2813,12 @@ function ms(e, t) {
|
|
|
2813
2813
|
const r = t.get(e);
|
|
2814
2814
|
if (r)
|
|
2815
2815
|
return r;
|
|
2816
|
-
let n = it(e, [], !1).filter((
|
|
2816
|
+
let n = it(e, [], !1).filter((l) => ne(l) && Qe(l) !== "body"), a = null;
|
|
2817
2817
|
const i = ge(e).position === "fixed";
|
|
2818
|
-
let
|
|
2819
|
-
for (; ne(
|
|
2820
|
-
const
|
|
2821
|
-
!c &&
|
|
2818
|
+
let s = i ? Ie(e) : e;
|
|
2819
|
+
for (; ne(s) && !Ye(s); ) {
|
|
2820
|
+
const l = ge(s), c = Fr(s);
|
|
2821
|
+
!c && l.position === "fixed" && (a = null), (i ? !c && !a : !c && l.position === "static" && !!a && us.has(a.position) || ut(s) && !c && Bo(e, s)) ? n = n.filter((u) => u !== s) : a = l, s = Ie(s);
|
|
2822
2822
|
}
|
|
2823
2823
|
return t.set(e, n), n;
|
|
2824
2824
|
}
|
|
@@ -2829,10 +2829,10 @@ function hs(e) {
|
|
|
2829
2829
|
rootBoundary: n,
|
|
2830
2830
|
strategy: a
|
|
2831
2831
|
} = e;
|
|
2832
|
-
const
|
|
2832
|
+
const s = [...r === "clippingAncestors" ? Nt(t) ? [] : ms(t, this._c) : [].concat(r), n], l = s[0], c = s.reduce((d, u) => {
|
|
2833
2833
|
const h = pn(t, u, a);
|
|
2834
|
-
return d.top = te(h.top, d.top), d.right =
|
|
2835
|
-
}, pn(t,
|
|
2834
|
+
return d.top = te(h.top, d.top), d.right = De(h.right, d.right), d.bottom = De(h.bottom, d.bottom), d.left = te(h.left, d.left), d;
|
|
2835
|
+
}, pn(t, l, a));
|
|
2836
2836
|
return {
|
|
2837
2837
|
width: c.right - c.left,
|
|
2838
2838
|
height: c.bottom - c.top,
|
|
@@ -2851,8 +2851,8 @@ function ws(e) {
|
|
|
2851
2851
|
};
|
|
2852
2852
|
}
|
|
2853
2853
|
function ps(e, t, r) {
|
|
2854
|
-
const n = ye(t), a = Le(t), i = r === "fixed",
|
|
2855
|
-
let
|
|
2854
|
+
const n = ye(t), a = Le(t), i = r === "fixed", s = Ze(e, !0, i, t);
|
|
2855
|
+
let l = {
|
|
2856
2856
|
scrollLeft: 0,
|
|
2857
2857
|
scrollTop: 0
|
|
2858
2858
|
};
|
|
@@ -2861,17 +2861,17 @@ function ps(e, t, r) {
|
|
|
2861
2861
|
c.x = Ht(a);
|
|
2862
2862
|
}
|
|
2863
2863
|
if (n || !n && !i)
|
|
2864
|
-
if ((Qe(t) !== "body" || ut(a)) && (
|
|
2864
|
+
if ((Qe(t) !== "body" || ut(a)) && (l = Tt(t)), n) {
|
|
2865
2865
|
const f = Ze(t, !0, i, t);
|
|
2866
2866
|
c.x = f.x + t.clientLeft, c.y = f.y + t.clientTop;
|
|
2867
2867
|
} else a && d();
|
|
2868
2868
|
i && !n && a && d();
|
|
2869
|
-
const u = a && !n && !i ? Fo(a,
|
|
2869
|
+
const u = a && !n && !i ? Fo(a, l) : Ee(0), h = s.left + l.scrollLeft - c.x - u.x, m = s.top + l.scrollTop - c.y - u.y;
|
|
2870
2870
|
return {
|
|
2871
2871
|
x: h,
|
|
2872
2872
|
y: m,
|
|
2873
|
-
width:
|
|
2874
|
-
height:
|
|
2873
|
+
width: s.width,
|
|
2874
|
+
height: s.height
|
|
2875
2875
|
};
|
|
2876
2876
|
}
|
|
2877
2877
|
function er(e) {
|
|
@@ -2937,34 +2937,34 @@ function ks(e, t) {
|
|
|
2937
2937
|
let r = null, n;
|
|
2938
2938
|
const a = Le(e);
|
|
2939
2939
|
function i() {
|
|
2940
|
-
var
|
|
2941
|
-
clearTimeout(n), (
|
|
2940
|
+
var l;
|
|
2941
|
+
clearTimeout(n), (l = r) == null || l.disconnect(), r = null;
|
|
2942
2942
|
}
|
|
2943
|
-
function l
|
|
2944
|
-
|
|
2943
|
+
function s(l, c) {
|
|
2944
|
+
l === void 0 && (l = !1), c === void 0 && (c = 1), i();
|
|
2945
2945
|
const d = e.getBoundingClientRect(), {
|
|
2946
2946
|
left: u,
|
|
2947
2947
|
top: h,
|
|
2948
2948
|
width: m,
|
|
2949
2949
|
height: f
|
|
2950
2950
|
} = d;
|
|
2951
|
-
if (
|
|
2951
|
+
if (l || t(), !m || !f)
|
|
2952
2952
|
return;
|
|
2953
2953
|
const w = vt(h), g = vt(a.clientWidth - (u + m)), v = vt(a.clientHeight - (h + f)), E = vt(u), k = {
|
|
2954
2954
|
rootMargin: -w + "px " + -g + "px " + -v + "px " + -E + "px",
|
|
2955
|
-
threshold: te(0,
|
|
2955
|
+
threshold: te(0, De(1, c)) || 1
|
|
2956
2956
|
};
|
|
2957
2957
|
let y = !0;
|
|
2958
2958
|
function x(R) {
|
|
2959
|
-
const
|
|
2960
|
-
if (
|
|
2959
|
+
const C = R[0].intersectionRatio;
|
|
2960
|
+
if (C !== c) {
|
|
2961
2961
|
if (!y)
|
|
2962
|
-
return
|
|
2963
|
-
|
|
2964
|
-
|
|
2962
|
+
return s();
|
|
2963
|
+
C ? s(!1, C) : n = setTimeout(() => {
|
|
2964
|
+
s(!1, 1e-7);
|
|
2965
2965
|
}, 1e3);
|
|
2966
2966
|
}
|
|
2967
|
-
|
|
2967
|
+
C === 1 && !Io(d, e.getBoundingClientRect()) && s(), y = !1;
|
|
2968
2968
|
}
|
|
2969
2969
|
try {
|
|
2970
2970
|
r = new IntersectionObserver(x, {
|
|
@@ -2977,15 +2977,15 @@ function ks(e, t) {
|
|
|
2977
2977
|
}
|
|
2978
2978
|
r.observe(e);
|
|
2979
2979
|
}
|
|
2980
|
-
return
|
|
2980
|
+
return s(!0), i;
|
|
2981
2981
|
}
|
|
2982
2982
|
function Es(e, t, r, n) {
|
|
2983
2983
|
n === void 0 && (n = {});
|
|
2984
2984
|
const {
|
|
2985
2985
|
ancestorScroll: a = !0,
|
|
2986
2986
|
ancestorResize: i = !0,
|
|
2987
|
-
elementResize:
|
|
2988
|
-
layoutShift:
|
|
2987
|
+
elementResize: s = typeof ResizeObserver == "function",
|
|
2988
|
+
layoutShift: l = typeof IntersectionObserver == "function",
|
|
2989
2989
|
animationFrame: c = !1
|
|
2990
2990
|
} = n, d = Sr(e), u = a || i ? [...d ? it(d) : [], ...it(t)] : [];
|
|
2991
2991
|
u.forEach((E) => {
|
|
@@ -2993,9 +2993,9 @@ function Es(e, t, r, n) {
|
|
|
2993
2993
|
passive: !0
|
|
2994
2994
|
}), i && E.addEventListener("resize", r);
|
|
2995
2995
|
});
|
|
2996
|
-
const h = d &&
|
|
2996
|
+
const h = d && l ? ks(d, r) : null;
|
|
2997
2997
|
let m = -1, f = null;
|
|
2998
|
-
|
|
2998
|
+
s && (f = new ResizeObserver((E) => {
|
|
2999
2999
|
let [b] = E;
|
|
3000
3000
|
b && b.target === d && f && (f.unobserve(t), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
|
|
3001
3001
|
var k;
|
|
@@ -3082,9 +3082,9 @@ function js(e) {
|
|
|
3082
3082
|
platform: a,
|
|
3083
3083
|
elements: {
|
|
3084
3084
|
reference: i,
|
|
3085
|
-
floating:
|
|
3085
|
+
floating: s
|
|
3086
3086
|
} = {},
|
|
3087
|
-
transform:
|
|
3087
|
+
transform: l = !0,
|
|
3088
3088
|
whileElementsMounted: c,
|
|
3089
3089
|
open: d
|
|
3090
3090
|
} = e, [u, h] = o.useState({
|
|
@@ -3099,51 +3099,51 @@ function js(e) {
|
|
|
3099
3099
|
const [w, g] = o.useState(null), [v, E] = o.useState(null), b = o.useCallback((N) => {
|
|
3100
3100
|
N !== R.current && (R.current = N, g(N));
|
|
3101
3101
|
}, []), k = o.useCallback((N) => {
|
|
3102
|
-
N !==
|
|
3103
|
-
}, []), y = i || w, x =
|
|
3104
|
-
if (!R.current || !
|
|
3102
|
+
N !== C.current && (C.current = N, E(N));
|
|
3103
|
+
}, []), y = i || w, x = s || v, R = o.useRef(null), C = o.useRef(null), $ = o.useRef(u), j = c != null, M = rr(c), O = rr(a), T = rr(d), F = o.useCallback(() => {
|
|
3104
|
+
if (!R.current || !C.current)
|
|
3105
3105
|
return;
|
|
3106
3106
|
const N = {
|
|
3107
3107
|
placement: t,
|
|
3108
3108
|
strategy: r,
|
|
3109
3109
|
middleware: m
|
|
3110
3110
|
};
|
|
3111
|
-
|
|
3111
|
+
O.current && (N.platform = O.current), Ms(R.current, C.current, N).then((H) => {
|
|
3112
3112
|
const z = {
|
|
3113
3113
|
...H,
|
|
3114
3114
|
// The floating element's position may be recomputed while it's closed
|
|
3115
3115
|
// but still mounted (such as when transitioning out). To ensure
|
|
3116
3116
|
// `isPositioned` will be `false` initially on the next open, avoid
|
|
3117
3117
|
// setting it to `true` when `open === false` (must be specified).
|
|
3118
|
-
isPositioned:
|
|
3118
|
+
isPositioned: T.current !== !1
|
|
3119
3119
|
};
|
|
3120
|
-
|
|
3120
|
+
P.current && !At($.current, z) && ($.current = z, xt.flushSync(() => {
|
|
3121
3121
|
h(z);
|
|
3122
3122
|
}));
|
|
3123
3123
|
});
|
|
3124
|
-
}, [m, t, r,
|
|
3124
|
+
}, [m, t, r, O, T]);
|
|
3125
3125
|
bt(() => {
|
|
3126
|
-
d === !1 &&
|
|
3126
|
+
d === !1 && $.current.isPositioned && ($.current.isPositioned = !1, h((N) => ({
|
|
3127
3127
|
...N,
|
|
3128
3128
|
isPositioned: !1
|
|
3129
3129
|
})));
|
|
3130
3130
|
}, [d]);
|
|
3131
|
-
const
|
|
3132
|
-
bt(() => (
|
|
3133
|
-
|
|
3131
|
+
const P = o.useRef(!1);
|
|
3132
|
+
bt(() => (P.current = !0, () => {
|
|
3133
|
+
P.current = !1;
|
|
3134
3134
|
}), []), bt(() => {
|
|
3135
|
-
if (y && (R.current = y), x && (
|
|
3136
|
-
if (
|
|
3137
|
-
return
|
|
3138
|
-
|
|
3135
|
+
if (y && (R.current = y), x && (C.current = x), y && x) {
|
|
3136
|
+
if (M.current)
|
|
3137
|
+
return M.current(y, x, F);
|
|
3138
|
+
F();
|
|
3139
3139
|
}
|
|
3140
|
-
}, [y, x,
|
|
3141
|
-
const
|
|
3140
|
+
}, [y, x, F, M, j]);
|
|
3141
|
+
const S = o.useMemo(() => ({
|
|
3142
3142
|
reference: R,
|
|
3143
|
-
floating:
|
|
3143
|
+
floating: C,
|
|
3144
3144
|
setReference: b,
|
|
3145
3145
|
setFloating: k
|
|
3146
|
-
}), [b, k]),
|
|
3146
|
+
}), [b, k]), _ = o.useMemo(() => ({
|
|
3147
3147
|
reference: y,
|
|
3148
3148
|
floating: x
|
|
3149
3149
|
}), [y, x]), G = o.useMemo(() => {
|
|
@@ -3152,13 +3152,13 @@ function js(e) {
|
|
|
3152
3152
|
left: 0,
|
|
3153
3153
|
top: 0
|
|
3154
3154
|
};
|
|
3155
|
-
if (!
|
|
3155
|
+
if (!_.floating)
|
|
3156
3156
|
return N;
|
|
3157
|
-
const H = gn(
|
|
3158
|
-
return
|
|
3157
|
+
const H = gn(_.floating, u.x), z = gn(_.floating, u.y);
|
|
3158
|
+
return l ? {
|
|
3159
3159
|
...N,
|
|
3160
3160
|
transform: "translate(" + H + "px, " + z + "px)",
|
|
3161
|
-
...Wo(
|
|
3161
|
+
...Wo(_.floating) >= 1.5 && {
|
|
3162
3162
|
willChange: "transform"
|
|
3163
3163
|
}
|
|
3164
3164
|
} : {
|
|
@@ -3166,14 +3166,14 @@ function js(e) {
|
|
|
3166
3166
|
left: H,
|
|
3167
3167
|
top: z
|
|
3168
3168
|
};
|
|
3169
|
-
}, [r,
|
|
3169
|
+
}, [r, l, _.floating, u.x, u.y]);
|
|
3170
3170
|
return o.useMemo(() => ({
|
|
3171
3171
|
...u,
|
|
3172
|
-
update:
|
|
3173
|
-
refs:
|
|
3174
|
-
elements:
|
|
3172
|
+
update: F,
|
|
3173
|
+
refs: S,
|
|
3174
|
+
elements: _,
|
|
3175
3175
|
floatingStyles: G
|
|
3176
|
-
}), [u,
|
|
3176
|
+
}), [u, F, S, _, G]);
|
|
3177
3177
|
}
|
|
3178
3178
|
const No = (e, t) => ({
|
|
3179
3179
|
...xs(e),
|
|
@@ -3255,26 +3255,26 @@ function Vs() {
|
|
|
3255
3255
|
}
|
|
3256
3256
|
};
|
|
3257
3257
|
}
|
|
3258
|
-
const
|
|
3258
|
+
const _s = /* @__PURE__ */ o.createContext(null), Ds = /* @__PURE__ */ o.createContext(null), Zs = () => {
|
|
3259
3259
|
var e;
|
|
3260
|
-
return ((e = o.useContext(
|
|
3261
|
-
}, Us = () => o.useContext(
|
|
3260
|
+
return ((e = o.useContext(_s)) == null ? void 0 : e.id) || null;
|
|
3261
|
+
}, Us = () => o.useContext(Ds), qs = "data-floating-ui-focusable";
|
|
3262
3262
|
function Gs(e) {
|
|
3263
3263
|
const {
|
|
3264
3264
|
open: t = !1,
|
|
3265
3265
|
onOpenChange: r,
|
|
3266
3266
|
elements: n
|
|
3267
|
-
} = e, a = Ts(), i = o.useRef({}), [
|
|
3267
|
+
} = e, a = Ts(), i = o.useRef({}), [s] = o.useState(() => Vs()), l = Zs() != null;
|
|
3268
3268
|
if (process.env.NODE_ENV !== "production") {
|
|
3269
3269
|
const f = n.reference;
|
|
3270
3270
|
f && !ne(f) && Hs("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `refs.setPositionReference()`", "instead.");
|
|
3271
3271
|
}
|
|
3272
3272
|
const [c, d] = o.useState(n.reference), u = Po((f, w, g) => {
|
|
3273
|
-
i.current.openEvent = f ? w : void 0,
|
|
3273
|
+
i.current.openEvent = f ? w : void 0, s.emit("openchange", {
|
|
3274
3274
|
open: f,
|
|
3275
3275
|
event: w,
|
|
3276
3276
|
reason: g,
|
|
3277
|
-
nested:
|
|
3277
|
+
nested: l
|
|
3278
3278
|
}), r == null || r(f, w, g);
|
|
3279
3279
|
}), h = o.useMemo(() => ({
|
|
3280
3280
|
setPositionReference: d
|
|
@@ -3288,10 +3288,10 @@ function Gs(e) {
|
|
|
3288
3288
|
open: t,
|
|
3289
3289
|
onOpenChange: u,
|
|
3290
3290
|
elements: m,
|
|
3291
|
-
events:
|
|
3291
|
+
events: s,
|
|
3292
3292
|
floatingId: a,
|
|
3293
3293
|
refs: h
|
|
3294
|
-
}), [t, u, m,
|
|
3294
|
+
}), [t, u, m, s, a, h]);
|
|
3295
3295
|
}
|
|
3296
3296
|
function zs(e) {
|
|
3297
3297
|
e === void 0 && (e = {});
|
|
@@ -3304,7 +3304,7 @@ function zs(e) {
|
|
|
3304
3304
|
floating: null,
|
|
3305
3305
|
...e.elements
|
|
3306
3306
|
}
|
|
3307
|
-
}), n = e.rootContext || r, a = n.elements, [i,
|
|
3307
|
+
}), n = e.rootContext || r, a = n.elements, [i, s] = o.useState(null), [l, c] = o.useState(null), u = (a == null ? void 0 : a.domReference) || i, h = o.useRef(null), m = Us();
|
|
3308
3308
|
gr(() => {
|
|
3309
3309
|
u && (h.current = u);
|
|
3310
3310
|
}, [u]);
|
|
@@ -3312,8 +3312,8 @@ function zs(e) {
|
|
|
3312
3312
|
...e,
|
|
3313
3313
|
elements: {
|
|
3314
3314
|
...a,
|
|
3315
|
-
...
|
|
3316
|
-
reference:
|
|
3315
|
+
...l && {
|
|
3316
|
+
reference: l
|
|
3317
3317
|
}
|
|
3318
3318
|
}
|
|
3319
3319
|
}), w = o.useCallback((k) => {
|
|
@@ -3323,7 +3323,7 @@ function zs(e) {
|
|
|
3323
3323
|
} : k;
|
|
3324
3324
|
c(y), f.refs.setReference(y);
|
|
3325
3325
|
}, [f.refs]), g = o.useCallback((k) => {
|
|
3326
|
-
(ne(k) || k === null) && (h.current = k,
|
|
3326
|
+
(ne(k) || k === null) && (h.current = k, s(k)), (ne(f.refs.reference.current) || f.refs.reference.current === null || // Don't allow setting virtual elements using the old technique back to
|
|
3327
3327
|
// `null` to support `positionReference` + an unstable `reference`
|
|
3328
3328
|
// callback ref.
|
|
3329
3329
|
k !== null && !ne(k)) && f.refs.setReference(k);
|
|
@@ -3359,8 +3359,8 @@ function nr(e, t, r) {
|
|
|
3359
3359
|
let i = e;
|
|
3360
3360
|
if (a && e) {
|
|
3361
3361
|
const {
|
|
3362
|
-
[En]:
|
|
3363
|
-
[xn]:
|
|
3362
|
+
[En]: s,
|
|
3363
|
+
[xn]: l,
|
|
3364
3364
|
...c
|
|
3365
3365
|
} = e;
|
|
3366
3366
|
i = c;
|
|
@@ -3371,46 +3371,46 @@ function nr(e, t, r) {
|
|
|
3371
3371
|
[qs]: ""
|
|
3372
3372
|
},
|
|
3373
3373
|
...i,
|
|
3374
|
-
...t.map((
|
|
3375
|
-
const
|
|
3376
|
-
return typeof
|
|
3377
|
-
}).concat(e).reduce((
|
|
3374
|
+
...t.map((s) => {
|
|
3375
|
+
const l = s ? s[r] : null;
|
|
3376
|
+
return typeof l == "function" ? e ? l(e) : null : l;
|
|
3377
|
+
}).concat(e).reduce((s, l) => (l && Object.entries(l).forEach((c) => {
|
|
3378
3378
|
let [d, u] = c;
|
|
3379
3379
|
if (!(a && [En, xn].includes(d)))
|
|
3380
3380
|
if (d.indexOf("on") === 0) {
|
|
3381
3381
|
if (n.has(d) || n.set(d, []), typeof u == "function") {
|
|
3382
3382
|
var h;
|
|
3383
|
-
(h = n.get(d)) == null || h.push(u),
|
|
3383
|
+
(h = n.get(d)) == null || h.push(u), s[d] = function() {
|
|
3384
3384
|
for (var m, f = arguments.length, w = new Array(f), g = 0; g < f; g++)
|
|
3385
3385
|
w[g] = arguments[g];
|
|
3386
3386
|
return (m = n.get(d)) == null ? void 0 : m.map((v) => v(...w)).find((v) => v !== void 0);
|
|
3387
3387
|
};
|
|
3388
3388
|
}
|
|
3389
3389
|
} else
|
|
3390
|
-
|
|
3391
|
-
}),
|
|
3390
|
+
s[d] = u;
|
|
3391
|
+
}), s), {})
|
|
3392
3392
|
};
|
|
3393
3393
|
}
|
|
3394
3394
|
function Ks(e) {
|
|
3395
3395
|
e === void 0 && (e = []);
|
|
3396
|
-
const t = e.map((
|
|
3397
|
-
(
|
|
3396
|
+
const t = e.map((l) => l == null ? void 0 : l.reference), r = e.map((l) => l == null ? void 0 : l.floating), n = e.map((l) => l == null ? void 0 : l.item), a = o.useCallback(
|
|
3397
|
+
(l) => nr(l, e, "reference"),
|
|
3398
3398
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3399
3399
|
t
|
|
3400
3400
|
), i = o.useCallback(
|
|
3401
|
-
(
|
|
3401
|
+
(l) => nr(l, e, "floating"),
|
|
3402
3402
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3403
3403
|
r
|
|
3404
|
-
),
|
|
3405
|
-
(
|
|
3404
|
+
), s = o.useCallback(
|
|
3405
|
+
(l) => nr(l, e, "item"),
|
|
3406
3406
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3407
3407
|
n
|
|
3408
3408
|
);
|
|
3409
3409
|
return o.useMemo(() => ({
|
|
3410
3410
|
getReferenceProps: a,
|
|
3411
3411
|
getFloatingProps: i,
|
|
3412
|
-
getItemProps:
|
|
3413
|
-
}), [a, i,
|
|
3412
|
+
getItemProps: s
|
|
3413
|
+
}), [a, i, s]);
|
|
3414
3414
|
}
|
|
3415
3415
|
function yn(e, t) {
|
|
3416
3416
|
return {
|
|
@@ -3433,8 +3433,8 @@ const Xs = (e) => ({
|
|
|
3433
3433
|
overflowRef: n,
|
|
3434
3434
|
onFallbackChange: a,
|
|
3435
3435
|
offset: i = 0,
|
|
3436
|
-
index:
|
|
3437
|
-
minItemsVisible:
|
|
3436
|
+
index: s = 0,
|
|
3437
|
+
minItemsVisible: l = 4,
|
|
3438
3438
|
referenceOverflowThreshold: c = 0,
|
|
3439
3439
|
scrollRef: d,
|
|
3440
3440
|
...u
|
|
@@ -3443,7 +3443,7 @@ const Xs = (e) => ({
|
|
|
3443
3443
|
elements: {
|
|
3444
3444
|
floating: m
|
|
3445
3445
|
}
|
|
3446
|
-
} = t, f = r.current[
|
|
3446
|
+
} = t, f = r.current[s], w = (d == null ? void 0 : d.current) || m, g = m.clientTop || w.clientTop, v = m.clientTop !== 0, E = w.clientTop !== 0, b = m === w;
|
|
3447
3447
|
if (process.env.NODE_ENV !== "production" && (t.placement.startsWith("bottom") || Ps('`placement` side must be "bottom" when using the `inner`', "middleware.")), !f)
|
|
3448
3448
|
return {};
|
|
3449
3449
|
const k = {
|
|
@@ -3452,16 +3452,16 @@ const Xs = (e) => ({
|
|
|
3452
3452
|
}, y = await tr(yn(k, w.scrollHeight + g + m.clientTop), u), x = await tr(k, {
|
|
3453
3453
|
...u,
|
|
3454
3454
|
elementContext: "reference"
|
|
3455
|
-
}), R = te(0, y.top),
|
|
3456
|
-
if (w.style.maxHeight =
|
|
3457
|
-
const
|
|
3458
|
-
xt.flushSync(() => a(
|
|
3455
|
+
}), R = te(0, y.top), C = k.y + R, M = (w.scrollHeight > w.clientHeight ? (O) => O : lt)(te(0, w.scrollHeight + (v && b || E ? g * 2 : 0) - R - te(0, y.bottom)));
|
|
3456
|
+
if (w.style.maxHeight = M + "px", w.scrollTop = R, a) {
|
|
3457
|
+
const O = w.offsetHeight < f.offsetHeight * De(l, r.current.length) - 1 || x.top >= -c || x.bottom >= -c;
|
|
3458
|
+
xt.flushSync(() => a(O));
|
|
3459
3459
|
}
|
|
3460
3460
|
return n && (n.current = await tr(yn({
|
|
3461
3461
|
...k,
|
|
3462
|
-
y:
|
|
3462
|
+
y: C
|
|
3463
3463
|
}, w.offsetHeight + g + m.clientTop), u)), {
|
|
3464
|
-
y:
|
|
3464
|
+
y: C
|
|
3465
3465
|
};
|
|
3466
3466
|
}
|
|
3467
3467
|
});
|
|
@@ -3472,9 +3472,9 @@ function Ys(e, t) {
|
|
|
3472
3472
|
} = e, {
|
|
3473
3473
|
enabled: a = !0,
|
|
3474
3474
|
overflowRef: i,
|
|
3475
|
-
scrollRef:
|
|
3476
|
-
onChange:
|
|
3477
|
-
} = t, c = Po(
|
|
3475
|
+
scrollRef: s,
|
|
3476
|
+
onChange: l
|
|
3477
|
+
} = t, c = Po(l), d = o.useRef(!1), u = o.useRef(null), h = o.useRef(null);
|
|
3478
3478
|
o.useEffect(() => {
|
|
3479
3479
|
if (!a) return;
|
|
3480
3480
|
function f(g) {
|
|
@@ -3485,7 +3485,7 @@ function Ys(e, t) {
|
|
|
3485
3485
|
c((R) => R + Math[x](v, k * y));
|
|
3486
3486
|
})) : /firefox/i.test(Hl()) && (w.scrollTop += v));
|
|
3487
3487
|
}
|
|
3488
|
-
const w = (
|
|
3488
|
+
const w = (s == null ? void 0 : s.current) || n.floating;
|
|
3489
3489
|
if (r && w)
|
|
3490
3490
|
return w.addEventListener("wheel", f), requestAnimationFrame(() => {
|
|
3491
3491
|
u.current = w.scrollTop, i.current != null && (h.current = {
|
|
@@ -3494,7 +3494,7 @@ function Ys(e, t) {
|
|
|
3494
3494
|
}), () => {
|
|
3495
3495
|
u.current = null, h.current = null, w.removeEventListener("wheel", f);
|
|
3496
3496
|
};
|
|
3497
|
-
}, [a, r, n.floating, i,
|
|
3497
|
+
}, [a, r, n.floating, i, s, c]);
|
|
3498
3498
|
const m = o.useMemo(() => ({
|
|
3499
3499
|
onKeyDown() {
|
|
3500
3500
|
d.current = !0;
|
|
@@ -3506,7 +3506,7 @@ function Ys(e, t) {
|
|
|
3506
3506
|
d.current = !1;
|
|
3507
3507
|
},
|
|
3508
3508
|
onScroll() {
|
|
3509
|
-
const f = (
|
|
3509
|
+
const f = (s == null ? void 0 : s.current) || n.floating;
|
|
3510
3510
|
if (!(!i.current || !f || !d.current)) {
|
|
3511
3511
|
if (u.current !== null) {
|
|
3512
3512
|
const w = f.scrollTop - u.current;
|
|
@@ -3517,7 +3517,7 @@ function Ys(e, t) {
|
|
|
3517
3517
|
});
|
|
3518
3518
|
}
|
|
3519
3519
|
}
|
|
3520
|
-
}), [n.floating, c, i,
|
|
3520
|
+
}), [n.floating, c, i, s]);
|
|
3521
3521
|
return o.useMemo(() => a ? {
|
|
3522
3522
|
floating: m
|
|
3523
3523
|
} : {}, [a, m]);
|
|
@@ -3539,13 +3539,13 @@ function e0() {
|
|
|
3539
3539
|
}
|
|
3540
3540
|
function t0() {
|
|
3541
3541
|
let { getFloatingProps: e, slot: t } = X(et);
|
|
3542
|
-
return
|
|
3542
|
+
return D((...r) => Object.assign({}, e(...r), { "data-anchor": t.anchor }), [e, t]);
|
|
3543
3543
|
}
|
|
3544
3544
|
function r0(e = null) {
|
|
3545
3545
|
e === !1 && (e = null), typeof e == "string" && (e = { to: e });
|
|
3546
3546
|
let t = X(Ir), r = ae(() => e, [JSON.stringify(e, (a, i) => {
|
|
3547
|
-
var
|
|
3548
|
-
return (
|
|
3547
|
+
var s;
|
|
3548
|
+
return (s = i == null ? void 0 : i.outerHTML) != null ? s : i;
|
|
3549
3549
|
})]);
|
|
3550
3550
|
Q(() => {
|
|
3551
3551
|
t == null || t(r ?? null);
|
|
@@ -3555,38 +3555,38 @@ function r0(e = null) {
|
|
|
3555
3555
|
}
|
|
3556
3556
|
let Ln = 4;
|
|
3557
3557
|
function n0({ children: e, enabled: t = !0 }) {
|
|
3558
|
-
let [r, n] =
|
|
3559
|
-
o0(
|
|
3560
|
-
let d = t && r !== null &&
|
|
3558
|
+
let [r, n] = A(null), [a, i] = A(0), s = I(null), [l, c] = A(null);
|
|
3559
|
+
o0(l);
|
|
3560
|
+
let d = t && r !== null && l !== null, { to: u = "bottom", gap: h = 0, offset: m = 0, padding: f = 0, inner: w } = a0(r, l), [g, v = "center"] = u.split(" ");
|
|
3561
3561
|
Q(() => {
|
|
3562
3562
|
d && i(0);
|
|
3563
3563
|
}, [d]);
|
|
3564
|
-
let { refs: E, floatingStyles: b, context: k } = zs({ open: d, placement: g === "selection" ? v === "center" ? "bottom" : `bottom-${v}` : v === "center" ? `${g}` : `${g}-${v}`, strategy: "absolute", transform: !1, middleware: [No({ mainAxis: g === "selection" ? 0 : h, crossAxis: m }), As({ padding: f }), g !== "selection" && Os({ padding: f }), g === "selection" && w ? Xs({ ...w, padding: f, overflowRef:
|
|
3565
|
-
var
|
|
3566
|
-
if (!A) return;
|
|
3567
|
-
let O = k.elements.floating;
|
|
3564
|
+
let { refs: E, floatingStyles: b, context: k } = zs({ open: d, placement: g === "selection" ? v === "center" ? "bottom" : `bottom-${v}` : v === "center" ? `${g}` : `${g}-${v}`, strategy: "absolute", transform: !1, middleware: [No({ mainAxis: g === "selection" ? 0 : h, crossAxis: m }), As({ padding: f }), g !== "selection" && Os({ padding: f }), g === "selection" && w ? Xs({ ...w, padding: f, overflowRef: s, offset: a, minItemsVisible: Ln, referenceOverflowThreshold: f, onFallbackChange(O) {
|
|
3565
|
+
var T, F;
|
|
3568
3566
|
if (!O) return;
|
|
3569
|
-
let
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3567
|
+
let P = k.elements.floating;
|
|
3568
|
+
if (!P) return;
|
|
3569
|
+
let S = parseFloat(getComputedStyle(P).scrollPaddingBottom) || 0, _ = Math.min(Ln, P.childElementCount), G = 0, N = 0;
|
|
3570
|
+
for (let H of (F = (T = k.elements.floating) == null ? void 0 : T.childNodes) != null ? F : []) if (je(H)) {
|
|
3571
|
+
let z = H.offsetTop, Re = z + H.clientHeight + S, J = P.scrollTop, Y = J + P.clientHeight;
|
|
3572
|
+
if (z >= J && Re <= Y) _--;
|
|
3573
3573
|
else {
|
|
3574
3574
|
N = Math.max(0, Math.min(Re, Y) - Math.max(z, J)), G = H.clientHeight;
|
|
3575
3575
|
break;
|
|
3576
3576
|
}
|
|
3577
3577
|
}
|
|
3578
|
-
|
|
3579
|
-
let z = G *
|
|
3578
|
+
_ >= 1 && i((H) => {
|
|
3579
|
+
let z = G * _ - N + S;
|
|
3580
3580
|
return H >= z ? H : z;
|
|
3581
3581
|
});
|
|
3582
|
-
} }) : null, Fs({ padding: f, apply({ availableWidth:
|
|
3583
|
-
Object.assign(
|
|
3582
|
+
} }) : null, Fs({ padding: f, apply({ availableWidth: O, availableHeight: T, elements: F }) {
|
|
3583
|
+
Object.assign(F.floating.style, { overflow: "auto", maxWidth: `${O}px`, maxHeight: `min(var(--anchor-max-height, 100vh), ${T}px)` });
|
|
3584
3584
|
} })].filter(Boolean), whileElementsMounted: Es }), [y = g, x = v] = k.placement.split("-");
|
|
3585
3585
|
g === "selection" && (y = "selection");
|
|
3586
|
-
let R = ae(() => ({ anchor: [y, x].filter(Boolean).join(" ") }), [y, x]),
|
|
3587
|
-
c(
|
|
3586
|
+
let R = ae(() => ({ anchor: [y, x].filter(Boolean).join(" ") }), [y, x]), C = Ys(k, { overflowRef: s, onChange: i }), { getReferenceProps: $, getFloatingProps: j } = Ks([C]), M = V((O) => {
|
|
3587
|
+
c(O), E.setFloating(O);
|
|
3588
3588
|
});
|
|
3589
|
-
return o.createElement(Ir.Provider, { value: n }, o.createElement(et.Provider, { value: { setFloating:
|
|
3589
|
+
return o.createElement(Ir.Provider, { value: n }, o.createElement(et.Provider, { value: { setFloating: M, setReference: E.setReference, styles: b, getReferenceProps: $, getFloatingProps: j, slot: R } }, e));
|
|
3590
3590
|
}
|
|
3591
3591
|
function o0(e) {
|
|
3592
3592
|
Q(() => {
|
|
@@ -3604,8 +3604,8 @@ function o0(e) {
|
|
|
3604
3604
|
}
|
|
3605
3605
|
function a0(e, t) {
|
|
3606
3606
|
var r, n, a;
|
|
3607
|
-
let i = or((r = e == null ? void 0 : e.gap) != null ? r : "var(--anchor-gap, 0)", t),
|
|
3608
|
-
return { ...e, gap: i, offset:
|
|
3607
|
+
let i = or((r = e == null ? void 0 : e.gap) != null ? r : "var(--anchor-gap, 0)", t), s = or((n = e == null ? void 0 : e.offset) != null ? n : "var(--anchor-offset, 0)", t), l = or((a = e == null ? void 0 : e.padding) != null ? a : "var(--anchor-padding, 0)", t);
|
|
3608
|
+
return { ...e, gap: i, offset: s, padding: l };
|
|
3609
3609
|
}
|
|
3610
3610
|
function or(e, t, r = void 0) {
|
|
3611
3611
|
let n = qe(), a = V((c, d) => {
|
|
@@ -3637,11 +3637,11 @@ function or(e, t, r = void 0) {
|
|
|
3637
3637
|
}];
|
|
3638
3638
|
}
|
|
3639
3639
|
return [r, null];
|
|
3640
|
-
}), i = ae(() => a(e, t)[0], [e, t]), [
|
|
3640
|
+
}), i = ae(() => a(e, t)[0], [e, t]), [s = i, l] = A();
|
|
3641
3641
|
return Q(() => {
|
|
3642
3642
|
let [c, d] = a(e, t);
|
|
3643
|
-
if (
|
|
3644
|
-
}, [e, t]),
|
|
3643
|
+
if (l(c), !!d) return d(l);
|
|
3644
|
+
}, [e, t]), s;
|
|
3645
3645
|
}
|
|
3646
3646
|
function Ho(e) {
|
|
3647
3647
|
let t = /var\((.*)\)/.exec(e);
|
|
@@ -3661,11 +3661,11 @@ function Rn(e, t) {
|
|
|
3661
3661
|
}
|
|
3662
3662
|
function i0({ children: e, freeze: t }, r) {
|
|
3663
3663
|
let n = Vo(t, e);
|
|
3664
|
-
return xr(n) ? In(n, { ref: r }) :
|
|
3664
|
+
return xr(n) ? In(n, { ref: r }) : B.createElement(B.Fragment, null, n);
|
|
3665
3665
|
}
|
|
3666
|
-
|
|
3666
|
+
B.forwardRef(i0);
|
|
3667
3667
|
function Vo(e, t) {
|
|
3668
|
-
let [r, n] =
|
|
3668
|
+
let [r, n] = A(t);
|
|
3669
3669
|
return !e && r !== t && n(t), e ? r : t;
|
|
3670
3670
|
}
|
|
3671
3671
|
let Wr = oe(null);
|
|
@@ -3674,8 +3674,8 @@ var ve = ((e) => (e[e.Open = 1] = "Open", e[e.Closed = 2] = "Closed", e[e.Closin
|
|
|
3674
3674
|
function Nr() {
|
|
3675
3675
|
return X(Wr);
|
|
3676
3676
|
}
|
|
3677
|
-
function
|
|
3678
|
-
return
|
|
3677
|
+
function _o({ value: e, children: t }) {
|
|
3678
|
+
return B.createElement(Wr.Provider, { value: e }, t);
|
|
3679
3679
|
}
|
|
3680
3680
|
function l0(e) {
|
|
3681
3681
|
throw new Error("Unexpected object: " + e);
|
|
@@ -3713,8 +3713,8 @@ function gt(e, t) {
|
|
|
3713
3713
|
l0(e);
|
|
3714
3714
|
}
|
|
3715
3715
|
}
|
|
3716
|
-
function
|
|
3717
|
-
let t = V(e), r =
|
|
3716
|
+
function Do(e) {
|
|
3717
|
+
let t = V(e), r = I(!1);
|
|
3718
3718
|
q(() => (r.current = !1, () => {
|
|
3719
3719
|
r.current = !0, Kn(() => {
|
|
3720
3720
|
r.current && t();
|
|
@@ -3726,15 +3726,15 @@ function c0() {
|
|
|
3726
3726
|
return X(s0);
|
|
3727
3727
|
}
|
|
3728
3728
|
function d0(e) {
|
|
3729
|
-
let t = c0(), r = X(Uo), [n, a] =
|
|
3729
|
+
let t = c0(), r = X(Uo), [n, a] = A(() => {
|
|
3730
3730
|
var i;
|
|
3731
3731
|
if (!t && r !== null) return (i = r.current) != null ? i : null;
|
|
3732
3732
|
if (ke.isServer) return null;
|
|
3733
|
-
let
|
|
3734
|
-
if (
|
|
3733
|
+
let s = e == null ? void 0 : e.getElementById("headlessui-portal-root");
|
|
3734
|
+
if (s) return s;
|
|
3735
3735
|
if (e === null) return null;
|
|
3736
|
-
let
|
|
3737
|
-
return
|
|
3736
|
+
let l = e.createElement("div");
|
|
3737
|
+
return l.setAttribute("id", "headlessui-portal-root"), e.body.appendChild(l);
|
|
3738
3738
|
});
|
|
3739
3739
|
return q(() => {
|
|
3740
3740
|
n !== null && (e != null && e.body.contains(n) || e == null || e.body.appendChild(n));
|
|
@@ -3743,24 +3743,24 @@ function d0(e) {
|
|
|
3743
3743
|
}, [r, a, t]), n;
|
|
3744
3744
|
}
|
|
3745
3745
|
let Zo = xe, u0 = le(function(e, t) {
|
|
3746
|
-
let { ownerDocument: r = null, ...n } = e, a =
|
|
3746
|
+
let { ownerDocument: r = null, ...n } = e, a = I(null), i = pe($i((m) => {
|
|
3747
3747
|
a.current = m;
|
|
3748
|
-
}), t),
|
|
3749
|
-
return
|
|
3748
|
+
}), t), s = wr(a.current), l = r ?? s, c = d0(l), d = X(w0), u = qe(), h = ue();
|
|
3749
|
+
return Do(() => {
|
|
3750
3750
|
var m;
|
|
3751
3751
|
c && c.childNodes.length <= 0 && ((m = c.parentElement) == null || m.removeChild(c));
|
|
3752
|
-
}), c ? Wn(
|
|
3752
|
+
}), c ? Wn(B.createElement("div", { "data-headlessui-portal": "", ref: (m) => {
|
|
3753
3753
|
u.dispose(), d && m && u.add(d.register(m));
|
|
3754
3754
|
} }, h({ ourProps: { ref: i }, theirProps: n, slot: {}, defaultTag: Zo, name: "Portal" })), c) : null;
|
|
3755
3755
|
});
|
|
3756
3756
|
function f0(e, t) {
|
|
3757
|
-
let r = pe(t), { enabled: n = !0, ownerDocument: a, ...i } = e,
|
|
3758
|
-
return n ?
|
|
3757
|
+
let r = pe(t), { enabled: n = !0, ownerDocument: a, ...i } = e, s = ue();
|
|
3758
|
+
return n ? B.createElement(u0, { ...i, ownerDocument: a, ref: r }) : s({ ourProps: { ref: r }, theirProps: i, slot: {}, defaultTag: Zo, name: "Portal" });
|
|
3759
3759
|
}
|
|
3760
3760
|
let m0 = xe, Uo = oe(null);
|
|
3761
3761
|
function h0(e, t) {
|
|
3762
3762
|
let { target: r, ...n } = e, a = { ref: pe(t) }, i = ue();
|
|
3763
|
-
return
|
|
3763
|
+
return B.createElement(Uo.Provider, { value: r }, i({ ourProps: a, theirProps: n, defaultTag: m0, name: "Popover.Group" }));
|
|
3764
3764
|
}
|
|
3765
3765
|
let w0 = oe(null), p0 = le(f0), v0 = le(h0), g0 = Object.assign(p0, { Group: v0 });
|
|
3766
3766
|
const kt = { Idle: { kind: "Idle" }, Tracked: (e) => ({ kind: "Tracked", position: e }), Moved: { kind: "Moved" } };
|
|
@@ -3773,8 +3773,8 @@ function b0(e, t, r) {
|
|
|
3773
3773
|
if (t.kind === "Tracked") {
|
|
3774
3774
|
let a = function() {
|
|
3775
3775
|
i !== qo(e) && (n.dispose(), r());
|
|
3776
|
-
}, { position: i } = t,
|
|
3777
|
-
|
|
3776
|
+
}, { position: i } = t, s = new ResizeObserver(a);
|
|
3777
|
+
s.observe(e), n.add(() => s.disconnect()), n.addEventListener(window, "scroll", a, { passive: !0 }), n.addEventListener(window, "resize", a);
|
|
3778
3778
|
}
|
|
3779
3779
|
return () => n.dispose();
|
|
3780
3780
|
}
|
|
@@ -3790,14 +3790,14 @@ function Go() {
|
|
|
3790
3790
|
}, [t]), o.useEffect(() => ke.handoff(), []), e ? !1 : t;
|
|
3791
3791
|
}
|
|
3792
3792
|
function E0() {
|
|
3793
|
-
let e =
|
|
3793
|
+
let e = I(!1);
|
|
3794
3794
|
return Q(() => (e.current = !0, () => {
|
|
3795
3795
|
e.current = !1;
|
|
3796
3796
|
}), []), e;
|
|
3797
3797
|
}
|
|
3798
3798
|
function zo(e) {
|
|
3799
3799
|
var t;
|
|
3800
|
-
return !!(e.enter || e.enterFrom || e.enterTo || e.leave || e.leaveFrom || e.leaveTo) || !ot((t = e.as) != null ? t : Xo) ||
|
|
3800
|
+
return !!(e.enter || e.enterFrom || e.enterTo || e.leave || e.leaveFrom || e.leaveTo) || !ot((t = e.as) != null ? t : Xo) || B.Children.count(e.children) === 1;
|
|
3801
3801
|
}
|
|
3802
3802
|
let Vt = oe(null);
|
|
3803
3803
|
Vt.displayName = "TransitionContext";
|
|
@@ -3808,17 +3808,17 @@ function y0() {
|
|
|
3808
3808
|
return e;
|
|
3809
3809
|
}
|
|
3810
3810
|
function L0() {
|
|
3811
|
-
let e = X(
|
|
3811
|
+
let e = X(_t);
|
|
3812
3812
|
if (e === null) throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");
|
|
3813
3813
|
return e;
|
|
3814
3814
|
}
|
|
3815
|
-
let
|
|
3816
|
-
|
|
3817
|
-
function
|
|
3818
|
-
return "children" in e ?
|
|
3815
|
+
let _t = oe(null);
|
|
3816
|
+
_t.displayName = "NestingContext";
|
|
3817
|
+
function Dt(e) {
|
|
3818
|
+
return "children" in e ? Dt(e.children) : e.current.filter(({ el: t }) => t.current !== null).filter(({ state: t }) => t === "visible").length > 0;
|
|
3819
3819
|
}
|
|
3820
3820
|
function Ko(e, t) {
|
|
3821
|
-
let r = Ge(e), n =
|
|
3821
|
+
let r = Ge(e), n = I([]), a = E0(), i = qe(), s = V((f, w = Fe.Hidden) => {
|
|
3822
3822
|
let g = n.current.findIndex(({ el: v }) => v === f);
|
|
3823
3823
|
g !== -1 && (we(w, { [Fe.Unmount]() {
|
|
3824
3824
|
n.current.splice(g, 1);
|
|
@@ -3826,12 +3826,12 @@ function Ko(e, t) {
|
|
|
3826
3826
|
n.current[g].state = "hidden";
|
|
3827
3827
|
} }), i.microTask(() => {
|
|
3828
3828
|
var v;
|
|
3829
|
-
!
|
|
3829
|
+
!Dt(n) && a.current && ((v = r.current) == null || v.call(r));
|
|
3830
3830
|
}));
|
|
3831
|
-
}),
|
|
3831
|
+
}), l = V((f) => {
|
|
3832
3832
|
let w = n.current.find(({ el: g }) => g === f);
|
|
3833
|
-
return w ? w.state !== "visible" && (w.state = "visible") : n.current.push({ el: f, state: "visible" }), () =>
|
|
3834
|
-
}), c =
|
|
3833
|
+
return w ? w.state !== "visible" && (w.state = "visible") : n.current.push({ el: f, state: "visible" }), () => s(f, Fe.Unmount);
|
|
3834
|
+
}), c = I([]), d = I(Promise.resolve()), u = I({ enter: [], leave: [] }), h = V((f, w, g) => {
|
|
3835
3835
|
c.current.splice(0), t && (t.chains.current[w] = t.chains.current[w].filter(([v]) => v !== f)), t == null || t.chains.current[w].push([f, new Promise((v) => {
|
|
3836
3836
|
c.current.push(v);
|
|
3837
3837
|
})]), t == null || t.chains.current[w].push([f, new Promise((v) => {
|
|
@@ -3843,61 +3843,61 @@ function Ko(e, t) {
|
|
|
3843
3843
|
(v = c.current.shift()) == null || v();
|
|
3844
3844
|
}).then(() => g(w));
|
|
3845
3845
|
});
|
|
3846
|
-
return ae(() => ({ children: n, register:
|
|
3846
|
+
return ae(() => ({ children: n, register: l, unregister: s, onStart: h, onStop: m, wait: d, chains: u }), [l, s, n, h, m, u, d]);
|
|
3847
3847
|
}
|
|
3848
3848
|
let Xo = xe, Yo = Ct.RenderStrategy;
|
|
3849
3849
|
function R0(e, t) {
|
|
3850
3850
|
var r, n;
|
|
3851
|
-
let { transition: a = !0, beforeEnter: i, afterEnter:
|
|
3852
|
-
Q(() =>
|
|
3851
|
+
let { transition: a = !0, beforeEnter: i, afterEnter: s, beforeLeave: l, afterLeave: c, enter: d, enterFrom: u, enterTo: h, entered: m, leave: f, leaveFrom: w, leaveTo: g, ...v } = e, [E, b] = A(null), k = I(null), y = zo(e), x = pe(...y ? [k, t, b] : t === null ? [] : [t]), R = (r = v.unmount) == null || r ? Fe.Unmount : Fe.Hidden, { show: C, appear: $, initial: j } = y0(), [M, O] = A(C ? "visible" : "hidden"), T = L0(), { register: F, unregister: P } = T;
|
|
3852
|
+
Q(() => F(k), [F, k]), Q(() => {
|
|
3853
3853
|
if (R === Fe.Hidden && k.current) {
|
|
3854
|
-
if (
|
|
3855
|
-
|
|
3854
|
+
if (C && M !== "visible") {
|
|
3855
|
+
O("visible");
|
|
3856
3856
|
return;
|
|
3857
3857
|
}
|
|
3858
|
-
return we(
|
|
3858
|
+
return we(M, { hidden: () => P(k), visible: () => F(k) });
|
|
3859
3859
|
}
|
|
3860
|
-
}, [
|
|
3861
|
-
let
|
|
3860
|
+
}, [M, k, F, P, C, R]);
|
|
3861
|
+
let S = Go();
|
|
3862
3862
|
Q(() => {
|
|
3863
|
-
if (y &&
|
|
3864
|
-
}, [k,
|
|
3865
|
-
let
|
|
3866
|
-
N.current || (
|
|
3867
|
-
},
|
|
3863
|
+
if (y && S && M === "visible" && k.current === null) throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?");
|
|
3864
|
+
}, [k, M, S, y]);
|
|
3865
|
+
let _ = j && !$, G = $ && C && j, N = I(!1), H = Ko(() => {
|
|
3866
|
+
N.current || (O("hidden"), P(k));
|
|
3867
|
+
}, T), z = V((fe) => {
|
|
3868
3868
|
N.current = !0;
|
|
3869
3869
|
let Ae = fe ? "enter" : "leave";
|
|
3870
3870
|
H.onStart(k, Ae, (Pe) => {
|
|
3871
|
-
Pe === "enter" ? i == null || i() : Pe === "leave" && (
|
|
3871
|
+
Pe === "enter" ? i == null || i() : Pe === "leave" && (l == null || l());
|
|
3872
3872
|
});
|
|
3873
3873
|
}), Re = V((fe) => {
|
|
3874
3874
|
let Ae = fe ? "enter" : "leave";
|
|
3875
3875
|
N.current = !1, H.onStop(k, Ae, (Pe) => {
|
|
3876
|
-
Pe === "enter" ?
|
|
3877
|
-
}), Ae === "leave" && !
|
|
3876
|
+
Pe === "enter" ? s == null || s() : Pe === "leave" && (c == null || c());
|
|
3877
|
+
}), Ae === "leave" && !Dt(H) && (O("hidden"), P(k));
|
|
3878
3878
|
});
|
|
3879
3879
|
q(() => {
|
|
3880
|
-
y && a || (z(
|
|
3881
|
-
}, [
|
|
3882
|
-
let J = !(!a || !y || !
|
|
3883
|
-
|
|
3884
|
-
let
|
|
3885
|
-
return
|
|
3880
|
+
y && a || (z(C), Re(C));
|
|
3881
|
+
}, [C, y, a]);
|
|
3882
|
+
let J = !(!a || !y || !S || _), [, Y] = Lo(J, E, C, { start: z, end: Re }), Ut = Oe({ ref: x, className: ((n = dr(v.className, G && d, G && u, Y.enter && d, Y.enter && Y.closed && u, Y.enter && !Y.closed && h, Y.leave && f, Y.leave && !Y.closed && w, Y.leave && Y.closed && g, !Y.transition && C && m)) == null ? void 0 : n.trim()) || void 0, ...yo(Y) }), Te = 0;
|
|
3883
|
+
M === "visible" && (Te |= ve.Open), M === "hidden" && (Te |= ve.Closed), C && M === "hidden" && (Te |= ve.Opening), !C && M === "visible" && (Te |= ve.Closing);
|
|
3884
|
+
let W = ue();
|
|
3885
|
+
return B.createElement(_t.Provider, { value: H }, B.createElement(_o, { value: Te }, W({ ourProps: Ut, theirProps: v, defaultTag: Xo, features: Yo, visible: M === "visible", name: "Transition.Child" })));
|
|
3886
3886
|
}
|
|
3887
3887
|
function M0(e, t) {
|
|
3888
|
-
let { show: r, appear: n = !1, unmount: a = !0, ...i } = e,
|
|
3888
|
+
let { show: r, appear: n = !1, unmount: a = !0, ...i } = e, s = I(null), l = zo(e), c = pe(...l ? [s, t] : t === null ? [] : [t]);
|
|
3889
3889
|
Go();
|
|
3890
3890
|
let d = Nr();
|
|
3891
3891
|
if (r === void 0 && d !== null && (r = (d & ve.Open) === ve.Open), r === void 0) throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");
|
|
3892
|
-
let [u, h] =
|
|
3892
|
+
let [u, h] = A(r ? "visible" : "hidden"), m = Ko(() => {
|
|
3893
3893
|
r || h("hidden");
|
|
3894
|
-
}), [f, w] =
|
|
3894
|
+
}), [f, w] = A(!0), g = I([r]);
|
|
3895
3895
|
Q(() => {
|
|
3896
3896
|
f !== !1 && g.current[g.current.length - 1] !== r && (g.current.push(r), w(!1));
|
|
3897
3897
|
}, [g, r]);
|
|
3898
3898
|
let v = ae(() => ({ show: r, appear: n, initial: f }), [r, n, f]);
|
|
3899
3899
|
Q(() => {
|
|
3900
|
-
r ? h("visible") : !
|
|
3900
|
+
r ? h("visible") : !Dt(m) && s.current !== null && h("hidden");
|
|
3901
3901
|
}, [r, m]);
|
|
3902
3902
|
let E = { unmount: a }, b = V(() => {
|
|
3903
3903
|
var x;
|
|
@@ -3906,11 +3906,11 @@ function M0(e, t) {
|
|
|
3906
3906
|
var x;
|
|
3907
3907
|
f && w(!1), (x = e.beforeLeave) == null || x.call(e);
|
|
3908
3908
|
}), y = ue();
|
|
3909
|
-
return
|
|
3909
|
+
return B.createElement(_t.Provider, { value: m }, B.createElement(Vt.Provider, { value: v }, y({ ourProps: { ...E, as: xe, children: B.createElement(Qo, { ref: c, ...E, ...i, beforeEnter: b, beforeLeave: k }) }, theirProps: {}, defaultTag: xe, features: Yo, visible: u === "visible", name: "Transition" })));
|
|
3910
3910
|
}
|
|
3911
3911
|
function C0(e, t) {
|
|
3912
3912
|
let r = X(Vt) !== null, n = Nr() !== null;
|
|
3913
|
-
return
|
|
3913
|
+
return B.createElement(B.Fragment, null, !r && n ? B.createElement(br, { ref: t, ...e }) : B.createElement(Qo, { ref: t, ...e }));
|
|
3914
3914
|
}
|
|
3915
3915
|
let br = le(M0), Qo = le(R0), $0 = le(C0), Jo = Object.assign(br, { Child: $0, Root: br }), Mn = /([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;
|
|
3916
3916
|
function Cn(e) {
|
|
@@ -3918,9 +3918,9 @@ function Cn(e) {
|
|
|
3918
3918
|
let n = (t = e.innerText) != null ? t : "", a = e.cloneNode(!0);
|
|
3919
3919
|
if (!je(a)) return n;
|
|
3920
3920
|
let i = !1;
|
|
3921
|
-
for (let
|
|
3922
|
-
let
|
|
3923
|
-
return Mn.test(
|
|
3921
|
+
for (let l of a.querySelectorAll('[hidden],[aria-hidden],[role="img"]')) l.remove(), i = !0;
|
|
3922
|
+
let s = i ? (r = a.innerText) != null ? r : "" : n;
|
|
3923
|
+
return Mn.test(s) && (s = s.replace(Mn, "")), s;
|
|
3924
3924
|
}
|
|
3925
3925
|
function j0(e) {
|
|
3926
3926
|
let t = e.getAttribute("aria-label");
|
|
@@ -3930,8 +3930,8 @@ function j0(e) {
|
|
|
3930
3930
|
let n = r.split(" ").map((a) => {
|
|
3931
3931
|
let i = document.getElementById(a);
|
|
3932
3932
|
if (i) {
|
|
3933
|
-
let
|
|
3934
|
-
return typeof
|
|
3933
|
+
let s = i.getAttribute("aria-label");
|
|
3934
|
+
return typeof s == "string" ? s.trim() : Cn(i).trim();
|
|
3935
3935
|
}
|
|
3936
3936
|
return null;
|
|
3937
3937
|
}).filter(Boolean);
|
|
@@ -3940,7 +3940,7 @@ function j0(e) {
|
|
|
3940
3940
|
return Cn(e).trim();
|
|
3941
3941
|
}
|
|
3942
3942
|
function A0(e) {
|
|
3943
|
-
let t =
|
|
3943
|
+
let t = I(""), r = I("");
|
|
3944
3944
|
return V(() => {
|
|
3945
3945
|
let n = e.current;
|
|
3946
3946
|
if (!n) return "";
|
|
@@ -3964,18 +3964,18 @@ let B0 = { 1(e) {
|
|
|
3964
3964
|
let r = e.activeOptionIndex, { isSelected: n } = e.dataRef.current, a = e.options.findIndex((i) => n(i.dataRef.current.value));
|
|
3965
3965
|
return a !== -1 && (r = a), { ...e, frozenValue: !1, pendingFocus: t.focus, listboxState: 0, activeOptionIndex: r, __demoMode: !1, buttonPositionState: kt.Idle };
|
|
3966
3966
|
}, 2(e, t) {
|
|
3967
|
-
var r, n, a, i,
|
|
3967
|
+
var r, n, a, i, s;
|
|
3968
3968
|
if (e.dataRef.current.disabled || e.listboxState === 1) return e;
|
|
3969
|
-
let
|
|
3970
|
-
if (t.focus === K.Nothing) return { ...
|
|
3971
|
-
if (t.focus === K.Specific) return { ...
|
|
3969
|
+
let l = { ...e, searchQuery: "", activationTrigger: (r = t.trigger) != null ? r : 1, __demoMode: !1 };
|
|
3970
|
+
if (t.focus === K.Nothing) return { ...l, activeOptionIndex: null };
|
|
3971
|
+
if (t.focus === K.Specific) return { ...l, activeOptionIndex: e.options.findIndex((u) => u.id === t.id) };
|
|
3972
3972
|
if (t.focus === K.Previous) {
|
|
3973
3973
|
let u = e.activeOptionIndex;
|
|
3974
3974
|
if (u !== null) {
|
|
3975
3975
|
let h = e.options[u].dataRef.current.domRef, m = gt(t, { resolveItems: () => e.options, resolveActiveIndex: () => e.activeOptionIndex, resolveId: (f) => f.id, resolveDisabled: (f) => f.dataRef.current.disabled });
|
|
3976
3976
|
if (m !== null) {
|
|
3977
3977
|
let f = e.options[m].dataRef.current.domRef;
|
|
3978
|
-
if (((n = h.current) == null ? void 0 : n.previousElementSibling) === f.current || ((a = f.current) == null ? void 0 : a.previousElementSibling) === null) return { ...
|
|
3978
|
+
if (((n = h.current) == null ? void 0 : n.previousElementSibling) === f.current || ((a = f.current) == null ? void 0 : a.previousElementSibling) === null) return { ...l, activeOptionIndex: m };
|
|
3979
3979
|
}
|
|
3980
3980
|
}
|
|
3981
3981
|
} else if (t.focus === K.Next) {
|
|
@@ -3984,17 +3984,17 @@ let B0 = { 1(e) {
|
|
|
3984
3984
|
let h = e.options[u].dataRef.current.domRef, m = gt(t, { resolveItems: () => e.options, resolveActiveIndex: () => e.activeOptionIndex, resolveId: (f) => f.id, resolveDisabled: (f) => f.dataRef.current.disabled });
|
|
3985
3985
|
if (m !== null) {
|
|
3986
3986
|
let f = e.options[m].dataRef.current.domRef;
|
|
3987
|
-
if (((i = h.current) == null ? void 0 : i.nextElementSibling) === f.current || ((
|
|
3987
|
+
if (((i = h.current) == null ? void 0 : i.nextElementSibling) === f.current || ((s = f.current) == null ? void 0 : s.nextElementSibling) === null) return { ...l, activeOptionIndex: m };
|
|
3988
3988
|
}
|
|
3989
3989
|
}
|
|
3990
3990
|
}
|
|
3991
3991
|
let c = jn(e), d = gt(t, { resolveItems: () => c.options, resolveActiveIndex: () => c.activeOptionIndex, resolveId: (u) => u.id, resolveDisabled: (u) => u.dataRef.current.disabled });
|
|
3992
|
-
return { ...
|
|
3992
|
+
return { ...l, ...c, activeOptionIndex: d };
|
|
3993
3993
|
}, 3: (e, t) => {
|
|
3994
3994
|
if (e.dataRef.current.disabled || e.listboxState === 1) return e;
|
|
3995
|
-
let r = e.searchQuery !== "" ? 0 : 1, n = e.searchQuery + t.value.toLowerCase(), a = (e.activeOptionIndex !== null ? e.options.slice(e.activeOptionIndex + r).concat(e.options.slice(0, e.activeOptionIndex + r)) : e.options).find((
|
|
3996
|
-
var
|
|
3997
|
-
return !
|
|
3995
|
+
let r = e.searchQuery !== "" ? 0 : 1, n = e.searchQuery + t.value.toLowerCase(), a = (e.activeOptionIndex !== null ? e.options.slice(e.activeOptionIndex + r).concat(e.options.slice(0, e.activeOptionIndex + r)) : e.options).find((s) => {
|
|
3996
|
+
var l;
|
|
3997
|
+
return !s.dataRef.current.disabled && ((l = s.dataRef.current.textValue) == null ? void 0 : l.startsWith(n));
|
|
3998
3998
|
}), i = a ? e.options.indexOf(a) : -1;
|
|
3999
3999
|
return i === -1 || i === e.activeOptionIndex ? { ...e, searchQuery: n } : { ...e, searchQuery: n, activeOptionIndex: i, activationTrigger: 1 };
|
|
4000
4000
|
}, 4(e) {
|
|
@@ -4006,14 +4006,14 @@ let B0 = { 1(e) {
|
|
|
4006
4006
|
if (e.pendingFocus.focus !== K.Nothing && (n = gt(e.pendingFocus, { resolveItems: () => r, resolveActiveIndex: () => e.activeOptionIndex, resolveId: (a) => a.id, resolveDisabled: (a) => a.dataRef.current.disabled })), e.activeOptionIndex === null) {
|
|
4007
4007
|
let { isSelected: a } = e.dataRef.current;
|
|
4008
4008
|
if (a) {
|
|
4009
|
-
let i = r.findIndex((
|
|
4009
|
+
let i = r.findIndex((s) => a == null ? void 0 : a(s.dataRef.current.value));
|
|
4010
4010
|
i !== -1 && (n = i);
|
|
4011
4011
|
}
|
|
4012
4012
|
}
|
|
4013
4013
|
return { ...e, options: r, activeOptionIndex: n, pendingFocus: { focus: K.Nothing }, pendingShouldSort: !0 };
|
|
4014
4014
|
}, 7: (e, t) => {
|
|
4015
4015
|
let r = e.options, n = [], a = new Set(t.options);
|
|
4016
|
-
for (let [i,
|
|
4016
|
+
for (let [i, s] of r.entries()) if (a.has(s.id) && (n.push(i), a.delete(s.id), a.size === 0)) break;
|
|
4017
4017
|
if (n.length > 0) {
|
|
4018
4018
|
r = r.slice();
|
|
4019
4019
|
for (let i of n.reverse()) r.splice(i, 1);
|
|
@@ -4025,10 +4025,10 @@ let B0 = { 1(e) {
|
|
|
4025
4025
|
class Tr extends ho {
|
|
4026
4026
|
constructor(t) {
|
|
4027
4027
|
super(t), $n(this, "actions", { onChange: (r) => {
|
|
4028
|
-
let { onChange: n, compare: a, mode: i, value:
|
|
4028
|
+
let { onChange: n, compare: a, mode: i, value: s } = this.state.dataRef.current;
|
|
4029
4029
|
return we(i, { 0: () => n == null ? void 0 : n(r), 1: () => {
|
|
4030
|
-
let
|
|
4031
|
-
return c === -1 ?
|
|
4030
|
+
let l = s.slice(), c = l.findIndex((d) => a(d, r));
|
|
4031
|
+
return c === -1 ? l.push(r) : l.splice(c, 1), n == null ? void 0 : n(l);
|
|
4032
4032
|
} });
|
|
4033
4033
|
}, registerOption: Yt(() => {
|
|
4034
4034
|
let r = [], n = /* @__PURE__ */ new Set();
|
|
@@ -4071,8 +4071,8 @@ class Tr extends ho {
|
|
|
4071
4071
|
return a === null || (n = i[a]) == null ? void 0 : n.id;
|
|
4072
4072
|
}, isActive(r, n) {
|
|
4073
4073
|
var a;
|
|
4074
|
-
let i = r.activeOptionIndex,
|
|
4075
|
-
return i !== null ? ((a =
|
|
4074
|
+
let i = r.activeOptionIndex, s = r.options;
|
|
4075
|
+
return i !== null ? ((a = s[i]) == null ? void 0 : a.id) === n : !1;
|
|
4076
4076
|
}, hasFrozenValue(r) {
|
|
4077
4077
|
return r.frozenValue;
|
|
4078
4078
|
}, shouldScrollIntoView(r, n) {
|
|
@@ -4119,7 +4119,7 @@ function Pr(e) {
|
|
|
4119
4119
|
}
|
|
4120
4120
|
function ra({ id: e, __demoMode: t = !1 }) {
|
|
4121
4121
|
let r = ae(() => Tr.new({ id: e, __demoMode: t }), []);
|
|
4122
|
-
return
|
|
4122
|
+
return Do(() => r.dispose()), r;
|
|
4123
4123
|
}
|
|
4124
4124
|
let Zt = oe(null);
|
|
4125
4125
|
Zt.displayName = "ListboxDataContext";
|
|
@@ -4133,147 +4133,147 @@ function mt(e) {
|
|
|
4133
4133
|
}
|
|
4134
4134
|
let S0 = xe;
|
|
4135
4135
|
function I0(e, t) {
|
|
4136
|
-
let r = Ue(), n = Cr(), { value: a, defaultValue: i, form:
|
|
4136
|
+
let r = Ue(), n = Cr(), { value: a, defaultValue: i, form: s, name: l, onChange: c, by: d, invalid: u = !1, disabled: h = n || !1, horizontal: m = !1, multiple: f = !1, __demoMode: w = !1, ...g } = e;
|
|
4137
4137
|
const v = m ? "horizontal" : "vertical";
|
|
4138
|
-
let E = pe(t), b = mi(i), [k = f ? [] : void 0, y] = fi(a, c, b), x = ra({ id: r, __demoMode: w }), R =
|
|
4138
|
+
let E = pe(t), b = mi(i), [k = f ? [] : void 0, y] = fi(a, c, b), x = ra({ id: r, __demoMode: w }), R = I({ static: !1, hold: !1 }), C = I(/* @__PURE__ */ new Map()), $ = Pi(d), j = D((J) => we(M.mode, { [Be.Multi]: () => k.some((Y) => $(Y, J)), [Be.Single]: () => $(k, J) }), [k]), M = Se({ value: k, disabled: h, invalid: u, mode: f ? Be.Multi : Be.Single, orientation: v, onChange: y, compare: $, isSelected: j, optionsPropsRef: R, listRef: C });
|
|
4139
4139
|
Q(() => {
|
|
4140
|
-
x.state.dataRef.current =
|
|
4141
|
-
}, [
|
|
4142
|
-
let
|
|
4143
|
-
fl(
|
|
4144
|
-
x.send({ type: ea.CloseListbox }), ko(Y, Or.Loose) || (J.preventDefault(),
|
|
4140
|
+
x.state.dataRef.current = M;
|
|
4141
|
+
}, [M]);
|
|
4142
|
+
let O = ie(x, (J) => J.listboxState), T = Ar.get(null), F = ie(T, D((J) => T.selectors.isTop(J, r), [T, r])), [P, S] = ie(x, (J) => [J.buttonElement, J.optionsElement]);
|
|
4143
|
+
fl(F, [P, S], (J, Y) => {
|
|
4144
|
+
x.send({ type: ea.CloseListbox }), ko(Y, Or.Loose) || (J.preventDefault(), P == null || P.focus());
|
|
4145
4145
|
});
|
|
4146
|
-
let
|
|
4146
|
+
let _ = Se({ open: O === re.Open, disabled: h, invalid: u, value: k }), [G, N] = Bi({ inherit: !0 }), H = { ref: E }, z = D(() => {
|
|
4147
4147
|
if (b !== void 0) return y == null ? void 0 : y(b);
|
|
4148
4148
|
}, [y, b]), Re = ue();
|
|
4149
|
-
return
|
|
4149
|
+
return B.createElement(N, { value: G, props: { htmlFor: P == null ? void 0 : P.id }, slot: { open: O === re.Open, disabled: h } }, B.createElement(n0, null, B.createElement(ta.Provider, { value: x }, B.createElement(Zt.Provider, { value: M }, B.createElement(_o, { value: we(O, { [re.Open]: ve.Open, [re.Closed]: ve.Closed }) }, l != null && k != null && B.createElement(ki, { disabled: h, data: { [l]: k }, form: s, onReset: z }), Re({ ourProps: H, theirProps: g, slot: _, defaultTag: S0, name: "Listbox" }))))));
|
|
4150
4150
|
}
|
|
4151
4151
|
let W0 = "button";
|
|
4152
4152
|
function N0(e, t) {
|
|
4153
|
-
let r = Ue(), n = ro(), a = mt("Listbox.Button"), i = Pr("Listbox.Button"), { id:
|
|
4154
|
-
wl(g, { trigger: f, action:
|
|
4155
|
-
if (f != null && f.contains(
|
|
4156
|
-
let
|
|
4157
|
-
return je(
|
|
4153
|
+
let r = Ue(), n = ro(), a = mt("Listbox.Button"), i = Pr("Listbox.Button"), { id: s = n || `headlessui-listbox-button-${r}`, disabled: l = a.disabled || !1, autoFocus: c = !1, ...d } = e, u = pe(t, Js(), i.actions.setButtonElement), h = e0(), [m, f, w] = ie(i, (S) => [S.listboxState, S.buttonElement, S.optionsElement]), g = m === re.Open;
|
|
4154
|
+
wl(g, { trigger: f, action: D((S) => {
|
|
4155
|
+
if (f != null && f.contains(S.target)) return pt.Ignore;
|
|
4156
|
+
let _ = S.target.closest('[role="option"]:not([data-disabled])');
|
|
4157
|
+
return je(_) ? pt.Select(_) : w != null && w.contains(S.target) ? pt.Ignore : pt.Close;
|
|
4158
4158
|
}, [f, w]), close: i.actions.closeListbox, select: i.actions.selectActiveOption });
|
|
4159
|
-
let v = V((
|
|
4160
|
-
switch (
|
|
4159
|
+
let v = V((S) => {
|
|
4160
|
+
switch (S.key) {
|
|
4161
4161
|
case ee.Enter:
|
|
4162
|
-
hi(
|
|
4162
|
+
hi(S.currentTarget);
|
|
4163
4163
|
break;
|
|
4164
4164
|
case ee.Space:
|
|
4165
4165
|
case ee.ArrowDown:
|
|
4166
|
-
|
|
4166
|
+
S.preventDefault(), i.actions.openListbox({ focus: a.value ? K.Nothing : K.First });
|
|
4167
4167
|
break;
|
|
4168
4168
|
case ee.ArrowUp:
|
|
4169
|
-
|
|
4169
|
+
S.preventDefault(), i.actions.openListbox({ focus: a.value ? K.Nothing : K.Last });
|
|
4170
4170
|
break;
|
|
4171
4171
|
}
|
|
4172
|
-
}), E = V((
|
|
4173
|
-
switch (
|
|
4172
|
+
}), E = V((S) => {
|
|
4173
|
+
switch (S.key) {
|
|
4174
4174
|
case ee.Space:
|
|
4175
|
-
|
|
4175
|
+
S.preventDefault();
|
|
4176
4176
|
break;
|
|
4177
4177
|
}
|
|
4178
|
-
}), b = Vi((
|
|
4179
|
-
var
|
|
4180
|
-
i.state.listboxState === re.Open ? (yt(() => i.actions.closeListbox()), (
|
|
4181
|
-
}), k = V((
|
|
4182
|
-
return ue()({ ourProps:
|
|
4178
|
+
}), b = Vi((S) => {
|
|
4179
|
+
var _;
|
|
4180
|
+
i.state.listboxState === re.Open ? (yt(() => i.actions.closeListbox()), (_ = i.state.buttonElement) == null || _.focus({ preventScroll: !0 })) : (S.preventDefault(), i.actions.openListbox({ focus: K.Nothing }));
|
|
4181
|
+
}), k = V((S) => S.preventDefault()), y = co([s]), x = ji(), { isFocusVisible: R, focusProps: C } = Qa({ autoFocus: c }), { isHovered: $, hoverProps: j } = Ya({ isDisabled: l }), { pressed: M, pressProps: O } = ai({ disabled: l }), T = Se({ open: m === re.Open, active: M || m === re.Open, disabled: l, invalid: a.invalid, value: a.value, hover: $, focus: R, autofocus: c }), F = ie(i, (S) => S.listboxState === re.Open), P = Yn(h(), { ref: u, id: s, type: pl(e, f), "aria-haspopup": "listbox", "aria-controls": w == null ? void 0 : w.id, "aria-expanded": F, "aria-labelledby": y, "aria-describedby": x, disabled: l || void 0, autoFocus: c, onKeyDown: v, onKeyUp: E, onKeyPress: k }, b, C, j, O);
|
|
4182
|
+
return ue()({ ourProps: P, theirProps: d, slot: T, defaultTag: W0, name: "Listbox.Button" });
|
|
4183
4183
|
}
|
|
4184
4184
|
let na = oe(!1), T0 = "div", P0 = Ct.RenderStrategy | Ct.Static;
|
|
4185
4185
|
function H0(e, t) {
|
|
4186
|
-
let r = Ue(), { id: n = `headlessui-listbox-options-${r}`, anchor: a, portal: i = !1, modal:
|
|
4186
|
+
let r = Ue(), { id: n = `headlessui-listbox-options-${r}`, anchor: a, portal: i = !1, modal: s = !0, transition: l = !1, ...c } = e, d = Qs(a), [u, h] = A(null);
|
|
4187
4187
|
d && (i = !0);
|
|
4188
|
-
let m = mt("Listbox.Options"), f = Pr("Listbox.Options"), [w, g, v, E] = ie(f, (
|
|
4188
|
+
let m = mt("Listbox.Options"), f = Pr("Listbox.Options"), [w, g, v, E] = ie(f, (W) => [W.listboxState, W.buttonElement, W.optionsElement, W.__demoMode]), b = wr(g), k = wr(v), y = Nr(), [x, R] = Lo(l, u, y !== null ? (y & ve.Open) === ve.Open : w === re.Open);
|
|
4189
4189
|
el(x, g, f.actions.closeListbox);
|
|
4190
|
-
let
|
|
4191
|
-
yl(
|
|
4192
|
-
let
|
|
4193
|
-
Ji(
|
|
4194
|
-
let
|
|
4190
|
+
let C = E ? !1 : s && w === re.Open;
|
|
4191
|
+
yl(C, k);
|
|
4192
|
+
let $ = E ? !1 : s && w === re.Open;
|
|
4193
|
+
Ji($, { allowed: D(() => [g, v], [g, v]) });
|
|
4194
|
+
let j = ie(f, f.selectors.didButtonMove) ? !1 : x, M = ie(f, f.selectors.hasFrozenValue) && !e.static, O = Vo(M, m.value), T = D((W) => m.compare(O, W), [m.compare, O]), F = ie(f, (W) => {
|
|
4195
4195
|
var fe;
|
|
4196
4196
|
if (d == null || !((fe = d == null ? void 0 : d.to) != null && fe.includes("selection"))) return null;
|
|
4197
|
-
let Ae =
|
|
4197
|
+
let Ae = W.options.findIndex((Pe) => T(Pe.dataRef.current.value));
|
|
4198
4198
|
return Ae === -1 && (Ae = 0), Ae;
|
|
4199
|
-
}),
|
|
4199
|
+
}), P = (() => {
|
|
4200
4200
|
if (d == null) return;
|
|
4201
|
-
if (
|
|
4202
|
-
let
|
|
4203
|
-
return { ...d, inner: { listRef: { current:
|
|
4204
|
-
})(), [
|
|
4201
|
+
if (F === null) return { ...d, inner: void 0 };
|
|
4202
|
+
let W = Array.from(m.listRef.current.values());
|
|
4203
|
+
return { ...d, inner: { listRef: { current: W }, index: F } };
|
|
4204
|
+
})(), [S, _] = r0(P), G = t0(), N = pe(t, d ? S : null, f.actions.setOptionsElement, h), H = qe();
|
|
4205
4205
|
q(() => {
|
|
4206
|
-
let
|
|
4207
|
-
|
|
4206
|
+
let W = v;
|
|
4207
|
+
W && w === re.Open && (ri(W) || W == null || W.focus({ preventScroll: !0 }));
|
|
4208
4208
|
}, [w, v]);
|
|
4209
|
-
let z = V((
|
|
4209
|
+
let z = V((W) => {
|
|
4210
4210
|
var fe;
|
|
4211
|
-
switch (H.dispose(),
|
|
4211
|
+
switch (H.dispose(), W.key) {
|
|
4212
4212
|
case ee.Space:
|
|
4213
|
-
if (f.state.searchQuery !== "") return
|
|
4213
|
+
if (f.state.searchQuery !== "") return W.preventDefault(), W.stopPropagation(), f.actions.search(W.key);
|
|
4214
4214
|
case ee.Enter:
|
|
4215
|
-
|
|
4215
|
+
W.preventDefault(), W.stopPropagation(), f.actions.selectActiveOption();
|
|
4216
4216
|
break;
|
|
4217
4217
|
case we(m.orientation, { vertical: ee.ArrowDown, horizontal: ee.ArrowRight }):
|
|
4218
|
-
return
|
|
4218
|
+
return W.preventDefault(), W.stopPropagation(), f.actions.goToOption({ focus: K.Next });
|
|
4219
4219
|
case we(m.orientation, { vertical: ee.ArrowUp, horizontal: ee.ArrowLeft }):
|
|
4220
|
-
return
|
|
4220
|
+
return W.preventDefault(), W.stopPropagation(), f.actions.goToOption({ focus: K.Previous });
|
|
4221
4221
|
case ee.Home:
|
|
4222
4222
|
case ee.PageUp:
|
|
4223
|
-
return
|
|
4223
|
+
return W.preventDefault(), W.stopPropagation(), f.actions.goToOption({ focus: K.First });
|
|
4224
4224
|
case ee.End:
|
|
4225
4225
|
case ee.PageDown:
|
|
4226
|
-
return
|
|
4226
|
+
return W.preventDefault(), W.stopPropagation(), f.actions.goToOption({ focus: K.Last });
|
|
4227
4227
|
case ee.Escape:
|
|
4228
|
-
|
|
4228
|
+
W.preventDefault(), W.stopPropagation(), yt(() => f.actions.closeListbox()), (fe = f.state.buttonElement) == null || fe.focus({ preventScroll: !0 });
|
|
4229
4229
|
return;
|
|
4230
4230
|
case ee.Tab:
|
|
4231
|
-
|
|
4231
|
+
W.preventDefault(), W.stopPropagation(), yt(() => f.actions.closeListbox()), sl(f.state.buttonElement, W.shiftKey ? hr.Previous : hr.Next);
|
|
4232
4232
|
break;
|
|
4233
4233
|
default:
|
|
4234
|
-
|
|
4234
|
+
W.key.length === 1 && (f.actions.search(W.key), H.setTimeout(() => f.actions.clearSearch(), 350));
|
|
4235
4235
|
break;
|
|
4236
4236
|
}
|
|
4237
|
-
}), Re = ie(f, (
|
|
4237
|
+
}), Re = ie(f, (W) => {
|
|
4238
4238
|
var fe;
|
|
4239
|
-
return (fe =
|
|
4240
|
-
}), J = Se({ open: w === re.Open }), Y = Yn(d ? G() : {}, { id: n, ref: N, "aria-activedescendant": ie(f, f.selectors.activeDescendantId), "aria-multiselectable": m.mode === Be.Multi ? !0 : void 0, "aria-labelledby": Re, "aria-orientation": m.orientation, onKeyDown: z, role: "listbox", tabIndex: w === re.Open ? 0 : void 0, style: { ...c.style, ...
|
|
4241
|
-
return
|
|
4239
|
+
return (fe = W.buttonElement) == null ? void 0 : fe.id;
|
|
4240
|
+
}), J = Se({ open: w === re.Open }), Y = Yn(d ? G() : {}, { id: n, ref: N, "aria-activedescendant": ie(f, f.selectors.activeDescendantId), "aria-multiselectable": m.mode === Be.Multi ? !0 : void 0, "aria-labelledby": Re, "aria-orientation": m.orientation, onKeyDown: z, role: "listbox", tabIndex: w === re.Open ? 0 : void 0, style: { ...c.style, ..._, "--button-width": Hi(x, g, !0).width }, ...yo(R) }), Ut = ue(), Te = ae(() => m.mode === Be.Multi ? m : { ...m, isSelected: T }, [m, T]);
|
|
4241
|
+
return B.createElement(g0, { enabled: i ? e.static || x : !1, ownerDocument: b }, B.createElement(Zt.Provider, { value: Te }, Ut({ ourProps: Y, theirProps: c, slot: J, defaultTag: T0, features: P0, visible: j, name: "Listbox.Options" })));
|
|
4242
4242
|
}
|
|
4243
4243
|
let V0 = "div";
|
|
4244
|
-
function
|
|
4245
|
-
let r = Ue(), { id: n = `headlessui-listbox-option-${r}`, disabled: a = !1, value: i, ...
|
|
4244
|
+
function _0(e, t) {
|
|
4245
|
+
let r = Ue(), { id: n = `headlessui-listbox-option-${r}`, disabled: a = !1, value: i, ...s } = e, l = X(na) === !0, c = mt("Listbox.Option"), d = Pr("Listbox.Option"), u = ie(d, (M) => d.selectors.isActive(M, n)), h = c.isSelected(i), m = I(null), f = A0(m), w = Ge({ disabled: a, value: i, domRef: m, get textValue() {
|
|
4246
4246
|
return f();
|
|
4247
|
-
} }), g = pe(t, m, (
|
|
4248
|
-
|
|
4249
|
-
}), v = ie(d, (
|
|
4247
|
+
} }), g = pe(t, m, (M) => {
|
|
4248
|
+
M ? c.listRef.current.set(n, M) : c.listRef.current.delete(n);
|
|
4249
|
+
}), v = ie(d, (M) => d.selectors.shouldScrollIntoView(M, n));
|
|
4250
4250
|
Q(() => {
|
|
4251
4251
|
if (v) return de().requestAnimationFrame(() => {
|
|
4252
|
-
var
|
|
4253
|
-
(
|
|
4252
|
+
var M, O;
|
|
4253
|
+
(O = (M = m.current) == null ? void 0 : M.scrollIntoView) == null || O.call(M, { block: "nearest" });
|
|
4254
4254
|
});
|
|
4255
4255
|
}, [v, m]), Q(() => {
|
|
4256
|
-
if (!
|
|
4257
|
-
}, [w, n,
|
|
4258
|
-
let E = V((
|
|
4259
|
-
if (a) return
|
|
4256
|
+
if (!l) return d.actions.registerOption(n, w), () => d.actions.unregisterOption(n);
|
|
4257
|
+
}, [w, n, l]);
|
|
4258
|
+
let E = V((M) => {
|
|
4259
|
+
if (a) return M.preventDefault();
|
|
4260
4260
|
d.actions.selectOption(i);
|
|
4261
4261
|
}), b = V(() => {
|
|
4262
4262
|
if (a) return d.actions.goToOption({ focus: K.Nothing });
|
|
4263
4263
|
d.actions.goToOption({ focus: K.Specific, id: n });
|
|
4264
|
-
}), k = Ll(), y = V((
|
|
4265
|
-
k.wasMoved(
|
|
4266
|
-
}), R = V((
|
|
4267
|
-
k.wasMoved(
|
|
4268
|
-
}),
|
|
4269
|
-
return !h &&
|
|
4270
|
-
}
|
|
4271
|
-
let
|
|
4264
|
+
}), k = Ll(), y = V((M) => k.update(M)), x = V((M) => {
|
|
4265
|
+
k.wasMoved(M) && (a || u && d.state.activationTrigger === Et.Pointer || d.actions.goToOption({ focus: K.Specific, id: n }, Et.Pointer));
|
|
4266
|
+
}), R = V((M) => {
|
|
4267
|
+
k.wasMoved(M) && (a || u && d.state.activationTrigger === Et.Pointer && d.actions.goToOption({ focus: K.Nothing }));
|
|
4268
|
+
}), C = Se({ active: u, focus: u, selected: h, disabled: a, selectedOption: h && l }), $ = l ? {} : { id: n, ref: g, role: "option", tabIndex: a === !0 ? void 0 : -1, "aria-disabled": a === !0 ? !0 : void 0, "aria-selected": h, disabled: void 0, onClick: E, onFocus: b, onPointerEnter: y, onMouseEnter: y, onPointerMove: x, onMouseMove: x, onPointerLeave: R, onMouseLeave: R }, j = ue();
|
|
4269
|
+
return !h && l ? null : j({ ourProps: $, theirProps: s, slot: C, defaultTag: V0, name: "Listbox.Option" });
|
|
4270
|
+
}
|
|
4271
|
+
let D0 = xe;
|
|
4272
4272
|
function Z0(e, t) {
|
|
4273
|
-
let { options: r, placeholder: n, ...a } = e, i = { ref: pe(t) },
|
|
4274
|
-
return
|
|
4273
|
+
let { options: r, placeholder: n, ...a } = e, i = { ref: pe(t) }, s = mt("ListboxSelectedOption"), l = Se({}), c = s.value === void 0 || s.value === null || s.mode === Be.Multi && Array.isArray(s.value) && s.value.length === 0, d = ue();
|
|
4274
|
+
return B.createElement(na.Provider, { value: !0 }, d({ ourProps: i, theirProps: { ...a, children: B.createElement(B.Fragment, null, n && c ? n : r) }, slot: l, defaultTag: D0, name: "ListboxSelectedOption" }));
|
|
4275
4275
|
}
|
|
4276
|
-
let U0 = le(I0), Hr = le(N0), q0 = Ni, Vr = le(H0),
|
|
4276
|
+
let U0 = le(I0), Hr = le(N0), q0 = Ni, Vr = le(H0), _r = le(_0), G0 = le(Z0), oa = Object.assign(U0, { Button: Hr, Label: q0, Options: Vr, Option: _r, SelectedOption: G0 });
|
|
4277
4277
|
function z0({
|
|
4278
4278
|
title: e,
|
|
4279
4279
|
titleId: t,
|
|
@@ -4322,15 +4322,15 @@ function X0({ field: e, value: t, onChange: r, theme: n }) {
|
|
|
4322
4322
|
const {
|
|
4323
4323
|
name: a,
|
|
4324
4324
|
title: i,
|
|
4325
|
-
helper:
|
|
4326
|
-
description:
|
|
4325
|
+
helper: s,
|
|
4326
|
+
description: l,
|
|
4327
4327
|
placeholder: c = "Select an option",
|
|
4328
4328
|
required: d,
|
|
4329
4329
|
error: u,
|
|
4330
4330
|
options: h = [],
|
|
4331
4331
|
optionId: m = "id",
|
|
4332
4332
|
optionLabel: f = "name"
|
|
4333
|
-
} = e, [w, g] =
|
|
4333
|
+
} = e, [w, g] = A(!1), v = !!u, E = v ? n.error : w ? n.inputFocusBorder : n.inputBorder, b = () => {
|
|
4334
4334
|
if (!t) return null;
|
|
4335
4335
|
const x = h.find(
|
|
4336
4336
|
(R) => typeof R == "string" ? R === t : R[m] === t
|
|
@@ -4363,7 +4363,7 @@ function X0({ field: e, value: t, onChange: r, theme: n }) {
|
|
|
4363
4363
|
),
|
|
4364
4364
|
!d && !v && /* @__PURE__ */ p("span", { style: { color: n.description }, className: "text-sm/6", children: "(Optional)" })
|
|
4365
4365
|
] }),
|
|
4366
|
-
|
|
4366
|
+
s && /* @__PURE__ */ p("p", { style: { color: n.description }, className: "mb-2 text-xs", children: s }),
|
|
4367
4367
|
/* @__PURE__ */ p("div", { className: "relative mt-2", children: /* @__PURE__ */ p(
|
|
4368
4368
|
oa,
|
|
4369
4369
|
{
|
|
@@ -4429,22 +4429,22 @@ function X0({ field: e, value: t, onChange: r, theme: n }) {
|
|
|
4429
4429
|
},
|
|
4430
4430
|
className: "absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md py-1 text-base shadow-lg sm:text-sm",
|
|
4431
4431
|
children: h.map((x, R) => {
|
|
4432
|
-
const
|
|
4432
|
+
const C = typeof x == "string" ? x : x.value, $ = typeof x == "string" ? x : x.name + x.label ? ` (${x.label})` : "";
|
|
4433
4433
|
return /* @__PURE__ */ p(
|
|
4434
|
-
|
|
4434
|
+
_r,
|
|
4435
4435
|
{
|
|
4436
|
-
className: ({ active:
|
|
4437
|
-
value:
|
|
4438
|
-
children: ({ selected:
|
|
4436
|
+
className: ({ active: j }) => `relative cursor-default select-none py-2 pl-10 pr-4 ${j ? "bg-gray-100" : ""}`,
|
|
4437
|
+
value: C,
|
|
4438
|
+
children: ({ selected: j }) => /* @__PURE__ */ L(Ce, { children: [
|
|
4439
4439
|
/* @__PURE__ */ p(
|
|
4440
4440
|
"span",
|
|
4441
4441
|
{
|
|
4442
|
-
style: { fontWeight:
|
|
4442
|
+
style: { fontWeight: j ? "600" : "400" },
|
|
4443
4443
|
className: "block truncate",
|
|
4444
|
-
children:
|
|
4444
|
+
children: $
|
|
4445
4445
|
}
|
|
4446
4446
|
),
|
|
4447
|
-
|
|
4447
|
+
j && /* @__PURE__ */ p(
|
|
4448
4448
|
"span",
|
|
4449
4449
|
{
|
|
4450
4450
|
className: "absolute inset-y-0 left-0 flex items-center pl-3",
|
|
@@ -4478,26 +4478,26 @@ function X0({ field: e, value: t, onChange: r, theme: n }) {
|
|
|
4478
4478
|
className: "mt-2 text-sm",
|
|
4479
4479
|
children: u
|
|
4480
4480
|
}
|
|
4481
|
-
) :
|
|
4481
|
+
) : l ? /* @__PURE__ */ p(
|
|
4482
4482
|
"p",
|
|
4483
4483
|
{
|
|
4484
4484
|
id: `${a}-description`,
|
|
4485
4485
|
style: { color: n.description },
|
|
4486
4486
|
className: "mt-2 text-sm",
|
|
4487
|
-
children:
|
|
4487
|
+
children: l
|
|
4488
4488
|
}
|
|
4489
4489
|
) : null
|
|
4490
4490
|
] });
|
|
4491
4491
|
}
|
|
4492
|
-
const
|
|
4492
|
+
const Dr = {};
|
|
4493
4493
|
function U(e, t) {
|
|
4494
|
-
|
|
4494
|
+
Dr[e] = t;
|
|
4495
4495
|
}
|
|
4496
4496
|
function Y0(e) {
|
|
4497
|
-
return
|
|
4497
|
+
return Dr[e];
|
|
4498
4498
|
}
|
|
4499
4499
|
function Fw() {
|
|
4500
|
-
return { ...
|
|
4500
|
+
return { ...Dr };
|
|
4501
4501
|
}
|
|
4502
4502
|
const Q0 = {
|
|
4503
4503
|
title: "#000",
|
|
@@ -4530,7 +4530,7 @@ function Zr({ field: e, onChange: t, value: r, theme: n }) {
|
|
|
4530
4530
|
}
|
|
4531
4531
|
});
|
|
4532
4532
|
}
|
|
4533
|
-
},
|
|
4533
|
+
}, s = (c, d, u, h) => /* @__PURE__ */ p(
|
|
4534
4534
|
Zr,
|
|
4535
4535
|
{
|
|
4536
4536
|
field: c,
|
|
@@ -4539,20 +4539,20 @@ function Zr({ field: e, onChange: t, value: r, theme: n }) {
|
|
|
4539
4539
|
theme: a
|
|
4540
4540
|
},
|
|
4541
4541
|
u
|
|
4542
|
-
),
|
|
4543
|
-
return
|
|
4544
|
-
|
|
4542
|
+
), l = Y0(e.type);
|
|
4543
|
+
return l ? e.type === "subForm" || e.type === "array" ? /* @__PURE__ */ p(
|
|
4544
|
+
l,
|
|
4545
4545
|
{
|
|
4546
4546
|
field: e,
|
|
4547
4547
|
fields: e.fields,
|
|
4548
4548
|
value: Array.isArray(r) ? r : [],
|
|
4549
4549
|
title: e.title || e.name,
|
|
4550
4550
|
onSave: (c) => i(c),
|
|
4551
|
-
renderField:
|
|
4551
|
+
renderField: s,
|
|
4552
4552
|
theme: a
|
|
4553
4553
|
}
|
|
4554
4554
|
) : /* @__PURE__ */ p(
|
|
4555
|
-
|
|
4555
|
+
l,
|
|
4556
4556
|
{
|
|
4557
4557
|
field: e,
|
|
4558
4558
|
value: r,
|
|
@@ -4567,29 +4567,29 @@ function An({
|
|
|
4567
4567
|
title: r = "Item",
|
|
4568
4568
|
value: n = []
|
|
4569
4569
|
}) {
|
|
4570
|
-
const [a, i] =
|
|
4570
|
+
const [a, i] = A([]), [s, l] = A([]), [c, d] = A(!1), u = r.endsWith("s") ? r.slice(0, -1) : r;
|
|
4571
4571
|
q(() => {
|
|
4572
4572
|
e && e.length > 0 ? i(e) : i([
|
|
4573
4573
|
{ name: "profileImg", type: "fileV2", title: "Profile Image" },
|
|
4574
4574
|
{ name: "altText", type: "string", title: "Image Alt Text" }
|
|
4575
|
-
]), Array.isArray(n) &&
|
|
4575
|
+
]), Array.isArray(n) && l(n);
|
|
4576
4576
|
}, [e, n]);
|
|
4577
4577
|
const h = () => d(!0), m = () => {
|
|
4578
|
-
|
|
4578
|
+
l((b) => [...b, {}]), h();
|
|
4579
4579
|
}, f = (b, k) => {
|
|
4580
|
-
const { name: y, value: x } = k.target, R = [...
|
|
4581
|
-
R[b] = { ...R[b], [y]: x },
|
|
4580
|
+
const { name: y, value: x } = k.target, R = [...s];
|
|
4581
|
+
R[b] = { ...R[b], [y]: x }, l(R), h();
|
|
4582
4582
|
}, w = (b) => {
|
|
4583
|
-
const k = [...
|
|
4584
|
-
k.splice(b, 1),
|
|
4583
|
+
const k = [...s];
|
|
4584
|
+
k.splice(b, 1), l(k), h();
|
|
4585
4585
|
}, g = (b) => {
|
|
4586
4586
|
if (b === 0) return;
|
|
4587
|
-
const k = [...
|
|
4588
|
-
k[b - 1] = k[b], k[b] = y,
|
|
4587
|
+
const k = [...s], y = k[b - 1];
|
|
4588
|
+
k[b - 1] = k[b], k[b] = y, l(k), h();
|
|
4589
4589
|
}, v = (b) => {
|
|
4590
|
-
if (b ===
|
|
4591
|
-
const k = [...
|
|
4592
|
-
k[b + 1] = k[b], k[b] = y,
|
|
4590
|
+
if (b === s.length - 1) return;
|
|
4591
|
+
const k = [...s], y = k[b + 1];
|
|
4592
|
+
k[b + 1] = k[b], k[b] = y, l(k), h();
|
|
4593
4593
|
};
|
|
4594
4594
|
return /* @__PURE__ */ L(Ce, { children: [
|
|
4595
4595
|
r && /* @__PURE__ */ p("div", { className: "mb-1 flex justify-between", children: /* @__PURE__ */ p("label", { className: "block text-sm/6 font-medium", children: r }) }),
|
|
@@ -4609,14 +4609,14 @@ function An({
|
|
|
4609
4609
|
{
|
|
4610
4610
|
type: "button",
|
|
4611
4611
|
onClick: () => {
|
|
4612
|
-
t == null || t(
|
|
4612
|
+
t == null || t(s), d(!1);
|
|
4613
4613
|
},
|
|
4614
4614
|
className: `rounded px-4 py-2 text-white transition ${c ? "bg-yellow-500 hover:bg-yellow-600" : "bg-green-600 hover:bg-green-700"}`,
|
|
4615
4615
|
children: c ? "Save Changes ✱" : "Saved ✅"
|
|
4616
4616
|
}
|
|
4617
4617
|
)
|
|
4618
4618
|
] }),
|
|
4619
|
-
|
|
4619
|
+
s.map((b, k) => /* @__PURE__ */ L(
|
|
4620
4620
|
"div",
|
|
4621
4621
|
{
|
|
4622
4622
|
className: "relative space-y-2 rounded border bg-white p-4 shadow",
|
|
@@ -4641,7 +4641,7 @@ function An({
|
|
|
4641
4641
|
"button",
|
|
4642
4642
|
{
|
|
4643
4643
|
onClick: () => v(k),
|
|
4644
|
-
disabled: k ===
|
|
4644
|
+
disabled: k === s.length - 1,
|
|
4645
4645
|
className: "rounded bg-gray-200 px-2 py-1 text-xs hover:bg-gray-300 disabled:opacity-50",
|
|
4646
4646
|
children: "↓ Down"
|
|
4647
4647
|
}
|
|
@@ -4677,8 +4677,8 @@ function J0({ field: e, value: t, onChange: r }) {
|
|
|
4677
4677
|
name: n,
|
|
4678
4678
|
label: a,
|
|
4679
4679
|
placeholder: i = "Enter a number",
|
|
4680
|
-
description:
|
|
4681
|
-
optional:
|
|
4680
|
+
description: s,
|
|
4681
|
+
optional: l,
|
|
4682
4682
|
error: c,
|
|
4683
4683
|
min: d,
|
|
4684
4684
|
max: u,
|
|
@@ -4694,7 +4694,7 @@ function J0({ field: e, value: t, onChange: r }) {
|
|
|
4694
4694
|
children: a
|
|
4695
4695
|
}
|
|
4696
4696
|
),
|
|
4697
|
-
|
|
4697
|
+
l && !m && /* @__PURE__ */ p("span", { className: "text-sm/6 text-gray-500 dark:text-gray-400", children: "Optional" })
|
|
4698
4698
|
] }),
|
|
4699
4699
|
/* @__PURE__ */ L("div", { className: "relative mt-2", children: [
|
|
4700
4700
|
/* @__PURE__ */ p(
|
|
@@ -4710,7 +4710,7 @@ function J0({ field: e, value: t, onChange: r }) {
|
|
|
4710
4710
|
max: u,
|
|
4711
4711
|
step: h,
|
|
4712
4712
|
"aria-invalid": m ? "true" : "false",
|
|
4713
|
-
"aria-describedby": m ? `${n}-error` :
|
|
4713
|
+
"aria-describedby": m ? `${n}-error` : s ? `${n}-description` : void 0,
|
|
4714
4714
|
className: [
|
|
4715
4715
|
"block w-full rounded-md bg-white px-4 py-1.5 text-base outline outline-1 -outline-offset-1 placeholder:text-gray-400 focus:outline focus:outline-2 focus:-outline-offset-2 sm:text-sm/6",
|
|
4716
4716
|
"dark:bg-white/5",
|
|
@@ -4733,18 +4733,18 @@ function J0({ field: e, value: t, onChange: r }) {
|
|
|
4733
4733
|
className: "mt-2 text-sm text-red-600 dark:text-red-400",
|
|
4734
4734
|
children: c
|
|
4735
4735
|
}
|
|
4736
|
-
) :
|
|
4736
|
+
) : s ? /* @__PURE__ */ p(
|
|
4737
4737
|
"p",
|
|
4738
4738
|
{
|
|
4739
4739
|
id: `${n}-description`,
|
|
4740
4740
|
className: "mt-2 text-sm text-gray-500 dark:text-gray-400",
|
|
4741
|
-
children:
|
|
4741
|
+
children: s
|
|
4742
4742
|
}
|
|
4743
4743
|
) : null
|
|
4744
4744
|
] });
|
|
4745
4745
|
}
|
|
4746
4746
|
function e1({ field: e, value: t, onChange: r, theme: n }) {
|
|
4747
|
-
const { name: a, title: i, description:
|
|
4747
|
+
const { name: a, title: i, description: s, optional: l, required: c, error: d } = e, [u, h] = A(!1), m = !!d, f = m ? n.error : u ? n.inputFocusBorder : n.inputBorder;
|
|
4748
4748
|
return /* @__PURE__ */ L("div", { children: [
|
|
4749
4749
|
/* @__PURE__ */ L("div", { className: "mb-1 flex justify-between", children: [
|
|
4750
4750
|
i && /* @__PURE__ */ L(
|
|
@@ -4766,7 +4766,7 @@ function e1({ field: e, value: t, onChange: r, theme: n }) {
|
|
|
4766
4766
|
]
|
|
4767
4767
|
}
|
|
4768
4768
|
),
|
|
4769
|
-
|
|
4769
|
+
l && !m && /* @__PURE__ */ p("span", { style: { color: n.description }, className: "text-sm/6", children: "Optional" })
|
|
4770
4770
|
] }),
|
|
4771
4771
|
/* @__PURE__ */ L("div", { className: "relative", children: [
|
|
4772
4772
|
/* @__PURE__ */ p(
|
|
@@ -4780,7 +4780,7 @@ function e1({ field: e, value: t, onChange: r, theme: n }) {
|
|
|
4780
4780
|
onFocus: () => h(!0),
|
|
4781
4781
|
onBlur: () => h(!1),
|
|
4782
4782
|
"aria-invalid": m ? "true" : "false",
|
|
4783
|
-
"aria-describedby": m ? `${a}-error` :
|
|
4783
|
+
"aria-describedby": m ? `${a}-error` : s ? `${a}-description` : void 0,
|
|
4784
4784
|
style: {
|
|
4785
4785
|
color: m ? n.error : n.inputText,
|
|
4786
4786
|
backgroundColor: n.inputBackground,
|
|
@@ -4810,13 +4810,13 @@ function e1({ field: e, value: t, onChange: r, theme: n }) {
|
|
|
4810
4810
|
className: "mt-2 text-sm",
|
|
4811
4811
|
children: d
|
|
4812
4812
|
}
|
|
4813
|
-
) :
|
|
4813
|
+
) : s ? /* @__PURE__ */ p(
|
|
4814
4814
|
"p",
|
|
4815
4815
|
{
|
|
4816
4816
|
id: `${a}-description`,
|
|
4817
4817
|
style: { color: n.description },
|
|
4818
4818
|
className: "mt-2 text-sm",
|
|
4819
|
-
children:
|
|
4819
|
+
children: s
|
|
4820
4820
|
}
|
|
4821
4821
|
) : null
|
|
4822
4822
|
] });
|
|
@@ -5325,7 +5325,7 @@ function H1({
|
|
|
5325
5325
|
}));
|
|
5326
5326
|
}
|
|
5327
5327
|
const V1 = /* @__PURE__ */ o.forwardRef(H1);
|
|
5328
|
-
function
|
|
5328
|
+
function _1({
|
|
5329
5329
|
title: e,
|
|
5330
5330
|
titleId: t,
|
|
5331
5331
|
...r
|
|
@@ -5348,7 +5348,7 @@ function D1({
|
|
|
5348
5348
|
d: "M8.25 6.75 12 3m0 0 3.75 3.75M12 3v18"
|
|
5349
5349
|
}));
|
|
5350
5350
|
}
|
|
5351
|
-
const
|
|
5351
|
+
const D1 = /* @__PURE__ */ o.forwardRef(_1);
|
|
5352
5352
|
function Z1({
|
|
5353
5353
|
title: e,
|
|
5354
5354
|
titleId: t,
|
|
@@ -5996,8 +5996,8 @@ function Vc({
|
|
|
5996
5996
|
d: "m4.5 19.5 15-15m0 0H8.25m11.25 0v11.25"
|
|
5997
5997
|
}));
|
|
5998
5998
|
}
|
|
5999
|
-
const
|
|
6000
|
-
function
|
|
5999
|
+
const _c = /* @__PURE__ */ o.forwardRef(Vc);
|
|
6000
|
+
function Dc({
|
|
6001
6001
|
title: e,
|
|
6002
6002
|
titleId: t,
|
|
6003
6003
|
...r
|
|
@@ -6020,7 +6020,7 @@ function _c({
|
|
|
6020
6020
|
d: "M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5m-13.5-9L12 3m0 0 4.5 4.5M12 3v13.5"
|
|
6021
6021
|
}));
|
|
6022
6022
|
}
|
|
6023
|
-
const Zc = /* @__PURE__ */ o.forwardRef(
|
|
6023
|
+
const Zc = /* @__PURE__ */ o.forwardRef(Dc);
|
|
6024
6024
|
function Uc({
|
|
6025
6025
|
title: e,
|
|
6026
6026
|
titleId: t,
|
|
@@ -6644,8 +6644,8 @@ function V5({
|
|
|
6644
6644
|
d: "M14.857 17.082a23.848 23.848 0 0 0 5.454-1.31A8.967 8.967 0 0 1 18 9.75V9A6 6 0 0 0 6 9v.75a8.967 8.967 0 0 1-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 0 1-5.714 0m5.714 0a3 3 0 1 1-5.714 0M3.124 7.5A8.969 8.969 0 0 1 5.292 3m13.416 0a8.969 8.969 0 0 1 2.168 4.5"
|
|
6645
6645
|
}));
|
|
6646
6646
|
}
|
|
6647
|
-
const
|
|
6648
|
-
function
|
|
6647
|
+
const _5 = /* @__PURE__ */ o.forwardRef(V5);
|
|
6648
|
+
function D5({
|
|
6649
6649
|
title: e,
|
|
6650
6650
|
titleId: t,
|
|
6651
6651
|
...r
|
|
@@ -6668,7 +6668,7 @@ function _5({
|
|
|
6668
6668
|
d: "M9.143 17.082a24.248 24.248 0 0 0 3.844.148m-3.844-.148a23.856 23.856 0 0 1-5.455-1.31 8.964 8.964 0 0 0 2.3-5.542m3.155 6.852a3 3 0 0 0 5.667 1.97m1.965-2.277L21 21m-4.225-4.225a23.81 23.81 0 0 0 3.536-1.003A8.967 8.967 0 0 1 18 9.75V9A6 6 0 0 0 6.53 6.53m10.245 10.245L6.53 6.53M3 3l3.53 3.53"
|
|
6669
6669
|
}));
|
|
6670
6670
|
}
|
|
6671
|
-
const Z5 = /* @__PURE__ */ o.forwardRef(
|
|
6671
|
+
const Z5 = /* @__PURE__ */ o.forwardRef(D5);
|
|
6672
6672
|
function U5({
|
|
6673
6673
|
title: e,
|
|
6674
6674
|
titleId: t,
|
|
@@ -7299,8 +7299,8 @@ function V2({
|
|
|
7299
7299
|
d: "M2.25 12.76c0 1.6 1.123 2.994 2.707 3.227 1.068.157 2.148.279 3.238.364.466.037.893.281 1.153.671L12 21l2.652-3.978c.26-.39.687-.634 1.153-.67 1.09-.086 2.17-.208 3.238-.365 1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0 0 12 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018Z"
|
|
7300
7300
|
}));
|
|
7301
7301
|
}
|
|
7302
|
-
const
|
|
7303
|
-
function
|
|
7302
|
+
const _2 = /* @__PURE__ */ o.forwardRef(V2);
|
|
7303
|
+
function D2({
|
|
7304
7304
|
title: e,
|
|
7305
7305
|
titleId: t,
|
|
7306
7306
|
...r
|
|
@@ -7323,7 +7323,7 @@ function _2({
|
|
|
7323
7323
|
d: "M8.625 9.75a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H8.25m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H12m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0h-.375m-13.5 3.01c0 1.6 1.123 2.994 2.707 3.227 1.087.16 2.185.283 3.293.369V21l4.184-4.183a1.14 1.14 0 0 1 .778-.332 48.294 48.294 0 0 0 5.83-.498c1.585-.233 2.708-1.626 2.708-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0 0 12 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018Z"
|
|
7324
7324
|
}));
|
|
7325
7325
|
}
|
|
7326
|
-
const Z2 = /* @__PURE__ */ o.forwardRef(
|
|
7326
|
+
const Z2 = /* @__PURE__ */ o.forwardRef(D2);
|
|
7327
7327
|
function U2({
|
|
7328
7328
|
title: e,
|
|
7329
7329
|
titleId: t,
|
|
@@ -7952,7 +7952,7 @@ function Hd({
|
|
|
7952
7952
|
}));
|
|
7953
7953
|
}
|
|
7954
7954
|
const Vd = /* @__PURE__ */ o.forwardRef(Hd);
|
|
7955
|
-
function
|
|
7955
|
+
function _d({
|
|
7956
7956
|
title: e,
|
|
7957
7957
|
titleId: t,
|
|
7958
7958
|
...r
|
|
@@ -7975,7 +7975,7 @@ function Dd({
|
|
|
7975
7975
|
d: "M17.25 6.75 22.5 12l-5.25 5.25m-10.5 0L1.5 12l5.25-5.25m7.5-3-4.5 16.5"
|
|
7976
7976
|
}));
|
|
7977
7977
|
}
|
|
7978
|
-
const
|
|
7978
|
+
const Dd = /* @__PURE__ */ o.forwardRef(_d);
|
|
7979
7979
|
function Zd({
|
|
7980
7980
|
title: e,
|
|
7981
7981
|
titleId: t,
|
|
@@ -8608,7 +8608,7 @@ function Hu({
|
|
|
8608
8608
|
}));
|
|
8609
8609
|
}
|
|
8610
8610
|
const Vu = /* @__PURE__ */ o.forwardRef(Hu);
|
|
8611
|
-
function
|
|
8611
|
+
function _u({
|
|
8612
8612
|
title: e,
|
|
8613
8613
|
titleId: t,
|
|
8614
8614
|
...r
|
|
@@ -8631,7 +8631,7 @@ function Du({
|
|
|
8631
8631
|
d: "M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m0 11.625h4.5m-4.5 2.25h4.5m2.121 1.527c-1.171 1.464-3.07 1.464-4.242 0-1.172-1.465-1.172-3.84 0-5.304 1.171-1.464 3.07-1.464 4.242 0M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"
|
|
8632
8632
|
}));
|
|
8633
8633
|
}
|
|
8634
|
-
const
|
|
8634
|
+
const Du = /* @__PURE__ */ o.forwardRef(_u);
|
|
8635
8635
|
function Zu({
|
|
8636
8636
|
title: e,
|
|
8637
8637
|
titleId: t,
|
|
@@ -9263,8 +9263,8 @@ function Vf({
|
|
|
9263
9263
|
d: "M3 3v1.5M3 21v-6m0 0 2.77-.693a9 9 0 0 1 6.208.682l.108.054a9 9 0 0 0 6.086.71l3.114-.732a48.524 48.524 0 0 1-.005-10.499l-3.11.732a9 9 0 0 1-6.085-.711l-.108-.054a9 9 0 0 0-6.208-.682L3 4.5M3 15V4.5"
|
|
9264
9264
|
}));
|
|
9265
9265
|
}
|
|
9266
|
-
const
|
|
9267
|
-
function
|
|
9266
|
+
const _f = /* @__PURE__ */ o.forwardRef(Vf);
|
|
9267
|
+
function Df({
|
|
9268
9268
|
title: e,
|
|
9269
9269
|
titleId: t,
|
|
9270
9270
|
...r
|
|
@@ -9287,7 +9287,7 @@ function _f({
|
|
|
9287
9287
|
d: "m9 13.5 3 3m0 0 3-3m-3 3v-6m1.06-4.19-2.12-2.12a1.5 1.5 0 0 0-1.061-.44H4.5A2.25 2.25 0 0 0 2.25 6v12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9a2.25 2.25 0 0 0-2.25-2.25h-5.379a1.5 1.5 0 0 1-1.06-.44Z"
|
|
9288
9288
|
}));
|
|
9289
9289
|
}
|
|
9290
|
-
const Zf = /* @__PURE__ */ o.forwardRef(
|
|
9290
|
+
const Zf = /* @__PURE__ */ o.forwardRef(Df);
|
|
9291
9291
|
function Uf({
|
|
9292
9292
|
title: e,
|
|
9293
9293
|
titleId: t,
|
|
@@ -9911,8 +9911,8 @@ function V3({
|
|
|
9911
9911
|
d: "m7.875 14.25 1.214 1.942a2.25 2.25 0 0 0 1.908 1.058h2.006c.776 0 1.497-.4 1.908-1.058l1.214-1.942M2.41 9h4.636a2.25 2.25 0 0 1 1.872 1.002l.164.246a2.25 2.25 0 0 0 1.872 1.002h2.092a2.25 2.25 0 0 0 1.872-1.002l.164-.246A2.25 2.25 0 0 1 16.954 9h4.636M2.41 9a2.25 2.25 0 0 0-.16.832V12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 12V9.832c0-.287-.055-.57-.16-.832M2.41 9a2.25 2.25 0 0 1 .382-.632l3.285-3.832a2.25 2.25 0 0 1 1.708-.786h8.43c.657 0 1.281.287 1.709.786l3.284 3.832c.163.19.291.404.382.632M4.5 20.25h15A2.25 2.25 0 0 0 21.75 18v-2.625c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125V18a2.25 2.25 0 0 0 2.25 2.25Z"
|
|
9912
9912
|
}));
|
|
9913
9913
|
}
|
|
9914
|
-
const
|
|
9915
|
-
function
|
|
9914
|
+
const _3 = /* @__PURE__ */ o.forwardRef(V3);
|
|
9915
|
+
function D3({
|
|
9916
9916
|
title: e,
|
|
9917
9917
|
titleId: t,
|
|
9918
9918
|
...r
|
|
@@ -9935,7 +9935,7 @@ function _3({
|
|
|
9935
9935
|
d: "M2.25 13.5h3.86a2.25 2.25 0 0 1 2.012 1.244l.256.512a2.25 2.25 0 0 0 2.013 1.244h3.218a2.25 2.25 0 0 0 2.013-1.244l.256-.512a2.25 2.25 0 0 1 2.013-1.244h3.859m-19.5.338V18a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18v-4.162c0-.224-.034-.447-.1-.661L19.24 5.338a2.25 2.25 0 0 0-2.15-1.588H6.911a2.25 2.25 0 0 0-2.15 1.588L2.35 13.177a2.25 2.25 0 0 0-.1.661Z"
|
|
9936
9936
|
}));
|
|
9937
9937
|
}
|
|
9938
|
-
const Z3 = /* @__PURE__ */ o.forwardRef(
|
|
9938
|
+
const Z3 = /* @__PURE__ */ o.forwardRef(D3);
|
|
9939
9939
|
function U3({
|
|
9940
9940
|
title: e,
|
|
9941
9941
|
titleId: t,
|
|
@@ -10563,8 +10563,8 @@ function Vm({
|
|
|
10563
10563
|
d: "M18.364 18.364A9 9 0 0 0 5.636 5.636m12.728 12.728A9 9 0 0 1 5.636 5.636m12.728 12.728L5.636 5.636"
|
|
10564
10564
|
}));
|
|
10565
10565
|
}
|
|
10566
|
-
const
|
|
10567
|
-
function
|
|
10566
|
+
const _m = /* @__PURE__ */ o.forwardRef(Vm);
|
|
10567
|
+
function Dm({
|
|
10568
10568
|
title: e,
|
|
10569
10569
|
titleId: t,
|
|
10570
10570
|
...r
|
|
@@ -10587,7 +10587,7 @@ function _m({
|
|
|
10587
10587
|
d: "M8.242 5.992h12m-12 6.003H20.24m-12 5.999h12M4.117 7.495v-3.75H2.99m1.125 3.75H2.99m1.125 0H5.24m-1.92 2.577a1.125 1.125 0 1 1 1.591 1.59l-1.83 1.83h2.16M2.99 15.745h1.125a1.125 1.125 0 0 1 0 2.25H3.74m0-.002h.375a1.125 1.125 0 0 1 0 2.25H2.99"
|
|
10588
10588
|
}));
|
|
10589
10589
|
}
|
|
10590
|
-
const Zm = /* @__PURE__ */ o.forwardRef(
|
|
10590
|
+
const Zm = /* @__PURE__ */ o.forwardRef(Dm);
|
|
10591
10591
|
function Um({
|
|
10592
10592
|
title: e,
|
|
10593
10593
|
titleId: t,
|
|
@@ -11220,7 +11220,7 @@ function Hh({
|
|
|
11220
11220
|
}));
|
|
11221
11221
|
}
|
|
11222
11222
|
const Vh = /* @__PURE__ */ o.forwardRef(Hh);
|
|
11223
|
-
function
|
|
11223
|
+
function _h({
|
|
11224
11224
|
title: e,
|
|
11225
11225
|
titleId: t,
|
|
11226
11226
|
...r
|
|
@@ -11243,7 +11243,7 @@ function Dh({
|
|
|
11243
11243
|
d: "M3.75 12h16.5m-16.5 3.75h16.5M3.75 19.5h16.5M5.625 4.5h12.75a1.875 1.875 0 0 1 0 3.75H5.625a1.875 1.875 0 0 1 0-3.75Z"
|
|
11244
11244
|
}));
|
|
11245
11245
|
}
|
|
11246
|
-
const
|
|
11246
|
+
const Dh = /* @__PURE__ */ o.forwardRef(_h);
|
|
11247
11247
|
function Zh({
|
|
11248
11248
|
title: e,
|
|
11249
11249
|
titleId: t,
|
|
@@ -11868,7 +11868,7 @@ function H7({
|
|
|
11868
11868
|
}));
|
|
11869
11869
|
}
|
|
11870
11870
|
const V7 = /* @__PURE__ */ o.forwardRef(H7);
|
|
11871
|
-
function
|
|
11871
|
+
function _7({
|
|
11872
11872
|
title: e,
|
|
11873
11873
|
titleId: t,
|
|
11874
11874
|
...r
|
|
@@ -11891,7 +11891,7 @@ function D7({
|
|
|
11891
11891
|
d: "M11.48 3.499a.562.562 0 0 1 1.04 0l2.125 5.111a.563.563 0 0 0 .475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 0 0-.182.557l1.285 5.385a.562.562 0 0 1-.84.61l-4.725-2.885a.562.562 0 0 0-.586 0L6.982 20.54a.562.562 0 0 1-.84-.61l1.285-5.386a.562.562 0 0 0-.182-.557l-4.204-3.602a.562.562 0 0 1 .321-.988l5.518-.442a.563.563 0 0 0 .475-.345L11.48 3.5Z"
|
|
11892
11892
|
}));
|
|
11893
11893
|
}
|
|
11894
|
-
const
|
|
11894
|
+
const D7 = /* @__PURE__ */ o.forwardRef(_7);
|
|
11895
11895
|
function Z7({
|
|
11896
11896
|
title: e,
|
|
11897
11897
|
titleId: t,
|
|
@@ -12524,7 +12524,7 @@ function H4({
|
|
|
12524
12524
|
}));
|
|
12525
12525
|
}
|
|
12526
12526
|
const V4 = /* @__PURE__ */ o.forwardRef(H4);
|
|
12527
|
-
function
|
|
12527
|
+
function _4({
|
|
12528
12528
|
title: e,
|
|
12529
12529
|
titleId: t,
|
|
12530
12530
|
...r
|
|
@@ -12547,7 +12547,7 @@ function D4({
|
|
|
12547
12547
|
d: "M3 8.25V18a2.25 2.25 0 0 0 2.25 2.25h13.5A2.25 2.25 0 0 0 21 18V8.25m-18 0V6a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 6v2.25m-18 0h18M5.25 6h.008v.008H5.25V6ZM7.5 6h.008v.008H7.5V6Zm2.25 0h.008v.008H9.75V6Z"
|
|
12548
12548
|
}));
|
|
12549
12549
|
}
|
|
12550
|
-
const
|
|
12550
|
+
const D4 = /* @__PURE__ */ o.forwardRef(_4);
|
|
12551
12551
|
function Z4({
|
|
12552
12552
|
title: e,
|
|
12553
12553
|
titleId: t,
|
|
@@ -12670,7 +12670,7 @@ const ua = /* @__PURE__ */ o.forwardRef(X4), Y4 = /* @__PURE__ */ Object.freeze(
|
|
|
12670
12670
|
ArrowLongDownIcon: N1,
|
|
12671
12671
|
ArrowLongLeftIcon: P1,
|
|
12672
12672
|
ArrowLongRightIcon: V1,
|
|
12673
|
-
ArrowLongUpIcon:
|
|
12673
|
+
ArrowLongUpIcon: D1,
|
|
12674
12674
|
ArrowPathIcon: G1,
|
|
12675
12675
|
ArrowPathRoundedSquareIcon: U1,
|
|
12676
12676
|
ArrowRightCircleIcon: K1,
|
|
@@ -12698,7 +12698,7 @@ const ua = /* @__PURE__ */ o.forwardRef(X4), Y4 = /* @__PURE__ */ Object.freeze(
|
|
|
12698
12698
|
ArrowUpLeftIcon: Wc,
|
|
12699
12699
|
ArrowUpOnSquareIcon: Hc,
|
|
12700
12700
|
ArrowUpOnSquareStackIcon: Tc,
|
|
12701
|
-
ArrowUpRightIcon:
|
|
12701
|
+
ArrowUpRightIcon: _c,
|
|
12702
12702
|
ArrowUpTrayIcon: Zc,
|
|
12703
12703
|
ArrowUturnDownIcon: zc,
|
|
12704
12704
|
ArrowUturnLeftIcon: Xc,
|
|
@@ -12724,7 +12724,7 @@ const ua = /* @__PURE__ */ o.forwardRef(X4), Y4 = /* @__PURE__ */ Object.freeze(
|
|
|
12724
12724
|
Battery100Icon: W5,
|
|
12725
12725
|
Battery50Icon: T5,
|
|
12726
12726
|
BeakerIcon: H5,
|
|
12727
|
-
BellAlertIcon:
|
|
12727
|
+
BellAlertIcon: _5,
|
|
12728
12728
|
BellIcon: z5,
|
|
12729
12729
|
BellSlashIcon: Z5,
|
|
12730
12730
|
BellSnoozeIcon: q5,
|
|
@@ -12750,7 +12750,7 @@ const ua = /* @__PURE__ */ o.forwardRef(X4), Y4 = /* @__PURE__ */ Object.freeze(
|
|
|
12750
12750
|
ChartBarIcon: W2,
|
|
12751
12751
|
ChartBarSquareIcon: S2,
|
|
12752
12752
|
ChartPieIcon: T2,
|
|
12753
|
-
ChatBubbleBottomCenterIcon:
|
|
12753
|
+
ChatBubbleBottomCenterIcon: _2,
|
|
12754
12754
|
ChatBubbleBottomCenterTextIcon: H2,
|
|
12755
12755
|
ChatBubbleLeftEllipsisIcon: Z2,
|
|
12756
12756
|
ChatBubbleLeftIcon: z2,
|
|
@@ -12778,7 +12778,7 @@ const ua = /* @__PURE__ */ o.forwardRef(X4), Y4 = /* @__PURE__ */ Object.freeze(
|
|
|
12778
12778
|
CloudArrowDownIcon: Id,
|
|
12779
12779
|
CloudArrowUpIcon: Nd,
|
|
12780
12780
|
CloudIcon: Pd,
|
|
12781
|
-
CodeBracketIcon:
|
|
12781
|
+
CodeBracketIcon: Dd,
|
|
12782
12782
|
CodeBracketSquareIcon: Vd,
|
|
12783
12783
|
Cog6ToothIcon: Ud,
|
|
12784
12784
|
Cog8ToothIcon: Gd,
|
|
@@ -12806,7 +12806,7 @@ const ua = /* @__PURE__ */ o.forwardRef(X4), Y4 = /* @__PURE__ */ Object.freeze(
|
|
|
12806
12806
|
DocumentCheckIcon: Nu,
|
|
12807
12807
|
DocumentCurrencyBangladeshiIcon: Pu,
|
|
12808
12808
|
DocumentCurrencyDollarIcon: Vu,
|
|
12809
|
-
DocumentCurrencyEuroIcon:
|
|
12809
|
+
DocumentCurrencyEuroIcon: Du,
|
|
12810
12810
|
DocumentCurrencyPoundIcon: Uu,
|
|
12811
12811
|
DocumentCurrencyRupeeIcon: Gu,
|
|
12812
12812
|
DocumentCurrencyYenIcon: Ku,
|
|
@@ -12832,7 +12832,7 @@ const ua = /* @__PURE__ */ o.forwardRef(X4), Y4 = /* @__PURE__ */ Object.freeze(
|
|
|
12832
12832
|
FilmIcon: Wf,
|
|
12833
12833
|
FingerPrintIcon: Tf,
|
|
12834
12834
|
FireIcon: Hf,
|
|
12835
|
-
FlagIcon:
|
|
12835
|
+
FlagIcon: _f,
|
|
12836
12836
|
FolderArrowDownIcon: Zf,
|
|
12837
12837
|
FolderIcon: Qf,
|
|
12838
12838
|
FolderMinusIcon: qf,
|
|
@@ -12860,7 +12860,7 @@ const ua = /* @__PURE__ */ o.forwardRef(X4), Y4 = /* @__PURE__ */ Object.freeze(
|
|
|
12860
12860
|
IdentificationIcon: T3,
|
|
12861
12861
|
InboxArrowDownIcon: H3,
|
|
12862
12862
|
InboxIcon: Z3,
|
|
12863
|
-
InboxStackIcon:
|
|
12863
|
+
InboxStackIcon: _3,
|
|
12864
12864
|
InformationCircleIcon: q3,
|
|
12865
12865
|
ItalicIcon: z3,
|
|
12866
12866
|
KeyIcon: X3,
|
|
@@ -12886,7 +12886,7 @@ const ua = /* @__PURE__ */ o.forwardRef(X4), Y4 = /* @__PURE__ */ Object.freeze(
|
|
|
12886
12886
|
MoonIcon: Wm,
|
|
12887
12887
|
MusicalNoteIcon: Tm,
|
|
12888
12888
|
NewspaperIcon: Hm,
|
|
12889
|
-
NoSymbolIcon:
|
|
12889
|
+
NoSymbolIcon: _m,
|
|
12890
12890
|
NumberedListIcon: Zm,
|
|
12891
12891
|
PaintBrushIcon: qm,
|
|
12892
12892
|
PaperAirplaneIcon: zm,
|
|
@@ -12914,7 +12914,7 @@ const ua = /* @__PURE__ */ o.forwardRef(X4), Y4 = /* @__PURE__ */ Object.freeze(
|
|
|
12914
12914
|
PuzzlePieceIcon: Nh,
|
|
12915
12915
|
QrCodeIcon: Ph,
|
|
12916
12916
|
QuestionMarkCircleIcon: Vh,
|
|
12917
|
-
QueueListIcon:
|
|
12917
|
+
QueueListIcon: Dh,
|
|
12918
12918
|
RadioIcon: Uh,
|
|
12919
12919
|
ReceiptPercentIcon: Gh,
|
|
12920
12920
|
ReceiptRefundIcon: Kh,
|
|
@@ -12941,7 +12941,7 @@ const ua = /* @__PURE__ */ o.forwardRef(X4), Y4 = /* @__PURE__ */ Object.freeze(
|
|
|
12941
12941
|
Square3Stack3DIcon: N7,
|
|
12942
12942
|
Squares2X2Icon: P7,
|
|
12943
12943
|
SquaresPlusIcon: V7,
|
|
12944
|
-
StarIcon:
|
|
12944
|
+
StarIcon: D7,
|
|
12945
12945
|
StopCircleIcon: U7,
|
|
12946
12946
|
StopIcon: G7,
|
|
12947
12947
|
StrikethroughIcon: K7,
|
|
@@ -12968,7 +12968,7 @@ const ua = /* @__PURE__ */ o.forwardRef(X4), Y4 = /* @__PURE__ */ Object.freeze(
|
|
|
12968
12968
|
ViewfinderCircleIcon: N4,
|
|
12969
12969
|
WalletIcon: P4,
|
|
12970
12970
|
WifiIcon: V4,
|
|
12971
|
-
WindowIcon:
|
|
12971
|
+
WindowIcon: D4,
|
|
12972
12972
|
WrenchIcon: G4,
|
|
12973
12973
|
WrenchScrewdriverIcon: U4,
|
|
12974
12974
|
XCircleIcon: K4,
|
|
@@ -12982,7 +12982,7 @@ function Q4({
|
|
|
12982
12982
|
maxSize: n = 10 * 1024 * 1024
|
|
12983
12983
|
// 10MB
|
|
12984
12984
|
}) {
|
|
12985
|
-
const [a, i] =
|
|
12985
|
+
const [a, i] = A(!1), [s, l] = A(!1), c = (m) => {
|
|
12986
12986
|
var g;
|
|
12987
12987
|
const f = (g = m.name.split(".").pop()) == null ? void 0 : g.toLowerCase();
|
|
12988
12988
|
return r.map((v) => v.replace(".", "").toLowerCase()).includes(f) ? m.size > n ? (alert(
|
|
@@ -12991,7 +12991,7 @@ function Q4({
|
|
|
12991
12991
|
}, d = (m) => {
|
|
12992
12992
|
if (!m || !c(m)) return;
|
|
12993
12993
|
const f = new FileReader();
|
|
12994
|
-
f.onloadstart = () =>
|
|
12994
|
+
f.onloadstart = () => l(!0), f.onloadend = () => l(!1), f.onload = () => {
|
|
12995
12995
|
const w = f.result;
|
|
12996
12996
|
t == null || t(w);
|
|
12997
12997
|
}, f.readAsDataURL(m);
|
|
@@ -13054,7 +13054,7 @@ function Q4({
|
|
|
13054
13054
|
] }),
|
|
13055
13055
|
/* @__PURE__ */ p("p", { className: "text-xs text-gray-500", children: "PNG, JPG, GIF up to 10MB" })
|
|
13056
13056
|
] }),
|
|
13057
|
-
|
|
13057
|
+
s && /* @__PURE__ */ p("p", { className: "mt-2 animate-pulse text-sm text-indigo-600", children: "Converting..." })
|
|
13058
13058
|
]
|
|
13059
13059
|
}
|
|
13060
13060
|
);
|
|
@@ -13063,8 +13063,8 @@ function J4({ field: e, value: t, onChange: r, theme: n }) {
|
|
|
13063
13063
|
const {
|
|
13064
13064
|
name: a,
|
|
13065
13065
|
title: i,
|
|
13066
|
-
placeholder:
|
|
13067
|
-
description:
|
|
13066
|
+
placeholder: s = "HH:MM",
|
|
13067
|
+
description: l,
|
|
13068
13068
|
required: c,
|
|
13069
13069
|
error: d,
|
|
13070
13070
|
helper: u,
|
|
@@ -13076,7 +13076,7 @@ function J4({ field: e, value: t, onChange: r, theme: n }) {
|
|
|
13076
13076
|
// optional max="17:00"
|
|
13077
13077
|
step: g
|
|
13078
13078
|
// optional step in seconds (e.g., 60 = 1 minute)
|
|
13079
|
-
} = e, [v, E] =
|
|
13079
|
+
} = e, [v, E] = A(!1), b = !!d, k = b ? n.error : v ? n.inputFocusBorder : n.inputBorder;
|
|
13080
13080
|
return /* @__PURE__ */ L("div", { children: [
|
|
13081
13081
|
i && /* @__PURE__ */ L("div", { className: "mb-1 flex justify-between", children: [
|
|
13082
13082
|
/* @__PURE__ */ L(
|
|
@@ -13101,13 +13101,13 @@ function J4({ field: e, value: t, onChange: r, theme: n }) {
|
|
|
13101
13101
|
id: a,
|
|
13102
13102
|
name: a,
|
|
13103
13103
|
type: "time",
|
|
13104
|
-
placeholder:
|
|
13104
|
+
placeholder: s,
|
|
13105
13105
|
value: t || "",
|
|
13106
13106
|
onChange: r,
|
|
13107
13107
|
onFocus: () => E(!0),
|
|
13108
13108
|
onBlur: () => E(!1),
|
|
13109
13109
|
"aria-invalid": b ? "true" : "false",
|
|
13110
|
-
"aria-describedby": b ? `${a}-error` :
|
|
13110
|
+
"aria-describedby": b ? `${a}-error` : l ? `${a}-description` : void 0,
|
|
13111
13111
|
min: f,
|
|
13112
13112
|
max: w,
|
|
13113
13113
|
step: g,
|
|
@@ -13155,13 +13155,13 @@ function J4({ field: e, value: t, onChange: r, theme: n }) {
|
|
|
13155
13155
|
className: "mt-1 text-sm",
|
|
13156
13156
|
children: d
|
|
13157
13157
|
}
|
|
13158
|
-
) :
|
|
13158
|
+
) : l ? /* @__PURE__ */ p(
|
|
13159
13159
|
"p",
|
|
13160
13160
|
{
|
|
13161
13161
|
id: `${a}-description`,
|
|
13162
13162
|
style: { color: n.description },
|
|
13163
13163
|
className: "mt-1 text-sm",
|
|
13164
|
-
children:
|
|
13164
|
+
children: l
|
|
13165
13165
|
}
|
|
13166
13166
|
) : null
|
|
13167
13167
|
] });
|
|
@@ -13171,13 +13171,13 @@ function tw({ field: e, value: t, onChange: r, theme: n }) {
|
|
|
13171
13171
|
const {
|
|
13172
13172
|
name: a,
|
|
13173
13173
|
title: i,
|
|
13174
|
-
placeholder:
|
|
13175
|
-
description:
|
|
13174
|
+
placeholder: s = "you@example.com",
|
|
13175
|
+
description: l,
|
|
13176
13176
|
required: c,
|
|
13177
13177
|
helper: d,
|
|
13178
13178
|
leadingIcon: u,
|
|
13179
13179
|
trailingIcon: h
|
|
13180
|
-
} = e, [m, f] =
|
|
13180
|
+
} = e, [m, f] = A(!1), [w, g] = A(null), v = !!w, E = v ? n.error : m ? n.inputFocusBorder : n.inputBorder, b = () => {
|
|
13181
13181
|
f(!1), c && !t ? g("Email is required") : t && !ew.test(t) ? g("Please enter a valid email address") : g(null);
|
|
13182
13182
|
};
|
|
13183
13183
|
return /* @__PURE__ */ L("div", { children: [
|
|
@@ -13204,13 +13204,13 @@ function tw({ field: e, value: t, onChange: r, theme: n }) {
|
|
|
13204
13204
|
id: a,
|
|
13205
13205
|
name: a,
|
|
13206
13206
|
type: "email",
|
|
13207
|
-
placeholder:
|
|
13207
|
+
placeholder: s,
|
|
13208
13208
|
value: t || "",
|
|
13209
13209
|
onChange: r,
|
|
13210
13210
|
onFocus: () => f(!0),
|
|
13211
13211
|
onBlur: b,
|
|
13212
13212
|
"aria-invalid": v ? "true" : "false",
|
|
13213
|
-
"aria-describedby": v ? `${a}-error` :
|
|
13213
|
+
"aria-describedby": v ? `${a}-error` : l ? `${a}-description` : void 0,
|
|
13214
13214
|
style: {
|
|
13215
13215
|
color: n.inputText,
|
|
13216
13216
|
backgroundColor: n.inputBackground,
|
|
@@ -13257,13 +13257,13 @@ function tw({ field: e, value: t, onChange: r, theme: n }) {
|
|
|
13257
13257
|
children: w
|
|
13258
13258
|
}
|
|
13259
13259
|
)
|
|
13260
|
-
] }) :
|
|
13260
|
+
] }) : l ? /* @__PURE__ */ p(
|
|
13261
13261
|
"p",
|
|
13262
13262
|
{
|
|
13263
13263
|
id: `${a}-description`,
|
|
13264
13264
|
style: { color: n.description },
|
|
13265
13265
|
className: "mt-1 text-sm",
|
|
13266
|
-
children:
|
|
13266
|
+
children: l
|
|
13267
13267
|
}
|
|
13268
13268
|
) : null
|
|
13269
13269
|
] });
|
|
@@ -13273,15 +13273,15 @@ function nw({ field: e, value: t, onChange: r, theme: n }) {
|
|
|
13273
13273
|
const {
|
|
13274
13274
|
name: a,
|
|
13275
13275
|
title: i,
|
|
13276
|
-
placeholder:
|
|
13277
|
-
description:
|
|
13276
|
+
placeholder: s = "(123) 456-7890",
|
|
13277
|
+
description: l,
|
|
13278
13278
|
required: c,
|
|
13279
13279
|
helper: d,
|
|
13280
13280
|
leadingIcon: u,
|
|
13281
13281
|
trailingIcon: h
|
|
13282
|
-
} = e, [m, f] =
|
|
13283
|
-
const R = x.replace(On, "").slice(0, 10),
|
|
13284
|
-
return R.length > 0 &&
|
|
13282
|
+
} = e, [m, f] = A(!1), [w, g] = A(null), v = !!w, E = v ? n.error : m ? n.inputFocusBorder : n.inputBorder, b = (x) => {
|
|
13283
|
+
const R = x.replace(On, "").slice(0, 10), C = [];
|
|
13284
|
+
return R.length > 0 && C.push("(" + R.substring(0, 3)), R.length >= 4 && C.push(") " + R.substring(3, 6)), R.length >= 7 && C.push("-" + R.substring(6, 10)), C.join("");
|
|
13285
13285
|
}, k = (x) => {
|
|
13286
13286
|
const R = b(x.target.value);
|
|
13287
13287
|
r({ target: { name: a, value: R } });
|
|
@@ -13314,13 +13314,13 @@ function nw({ field: e, value: t, onChange: r, theme: n }) {
|
|
|
13314
13314
|
id: a,
|
|
13315
13315
|
name: a,
|
|
13316
13316
|
type: "tel",
|
|
13317
|
-
placeholder:
|
|
13317
|
+
placeholder: s,
|
|
13318
13318
|
value: t || "",
|
|
13319
13319
|
onChange: k,
|
|
13320
13320
|
onFocus: () => f(!0),
|
|
13321
13321
|
onBlur: y,
|
|
13322
13322
|
"aria-invalid": v ? "true" : "false",
|
|
13323
|
-
"aria-describedby": v ? `${a}-error` :
|
|
13323
|
+
"aria-describedby": v ? `${a}-error` : l ? `${a}-description` : void 0,
|
|
13324
13324
|
pattern: "\\d{10}",
|
|
13325
13325
|
maxLength: 14,
|
|
13326
13326
|
style: {
|
|
@@ -13369,13 +13369,13 @@ function nw({ field: e, value: t, onChange: r, theme: n }) {
|
|
|
13369
13369
|
children: w
|
|
13370
13370
|
}
|
|
13371
13371
|
)
|
|
13372
|
-
] }) :
|
|
13372
|
+
] }) : l ? /* @__PURE__ */ p(
|
|
13373
13373
|
"p",
|
|
13374
13374
|
{
|
|
13375
13375
|
id: `${a}-description`,
|
|
13376
13376
|
style: { color: n.description },
|
|
13377
13377
|
className: "mt-1 text-sm",
|
|
13378
|
-
children:
|
|
13378
|
+
children: l
|
|
13379
13379
|
}
|
|
13380
13380
|
) : null
|
|
13381
13381
|
] });
|
|
@@ -13384,12 +13384,12 @@ function ow({ field: e, value: t, onChange: r, theme: n }) {
|
|
|
13384
13384
|
const {
|
|
13385
13385
|
name: a,
|
|
13386
13386
|
title: i,
|
|
13387
|
-
description:
|
|
13388
|
-
required:
|
|
13387
|
+
description: s,
|
|
13388
|
+
required: l,
|
|
13389
13389
|
error: c,
|
|
13390
13390
|
helper: d,
|
|
13391
13391
|
options: u = []
|
|
13392
|
-
} = e, [h, m] =
|
|
13392
|
+
} = e, [h, m] = A(!1), f = !!(c || l && h && !t);
|
|
13393
13393
|
return /* @__PURE__ */ L("div", { children: [
|
|
13394
13394
|
i && /* @__PURE__ */ L("div", { className: "mb-1 flex justify-between", children: [
|
|
13395
13395
|
/* @__PURE__ */ L(
|
|
@@ -13400,11 +13400,11 @@ function ow({ field: e, value: t, onChange: r, theme: n }) {
|
|
|
13400
13400
|
className: "block text-sm/6 font-medium",
|
|
13401
13401
|
children: [
|
|
13402
13402
|
i,
|
|
13403
|
-
|
|
13403
|
+
l && /* @__PURE__ */ p("span", { style: { color: n.requiredAsterisk }, children: " *" })
|
|
13404
13404
|
]
|
|
13405
13405
|
}
|
|
13406
13406
|
),
|
|
13407
|
-
!
|
|
13407
|
+
!l && !f && /* @__PURE__ */ p("span", { style: { color: n.description }, className: "text-sm/6", children: "Optional" })
|
|
13408
13408
|
] }),
|
|
13409
13409
|
d && /* @__PURE__ */ p("p", { style: { color: n.description }, className: "mb-1 text-xs", children: d }),
|
|
13410
13410
|
/* @__PURE__ */ p(
|
|
@@ -13458,13 +13458,13 @@ function ow({ field: e, value: t, onChange: r, theme: n }) {
|
|
|
13458
13458
|
children: c || "This field is required"
|
|
13459
13459
|
}
|
|
13460
13460
|
)
|
|
13461
|
-
] }) :
|
|
13461
|
+
] }) : s ? /* @__PURE__ */ p(
|
|
13462
13462
|
"p",
|
|
13463
13463
|
{
|
|
13464
13464
|
id: `${a}-description`,
|
|
13465
13465
|
style: { color: n.description },
|
|
13466
13466
|
className: "mt-1 text-sm",
|
|
13467
|
-
children:
|
|
13467
|
+
children: s
|
|
13468
13468
|
}
|
|
13469
13469
|
) : null
|
|
13470
13470
|
] });
|
|
@@ -13473,13 +13473,13 @@ function aw({ field: e, value: t, onChange: r, theme: n }) {
|
|
|
13473
13473
|
const {
|
|
13474
13474
|
name: a,
|
|
13475
13475
|
title: i,
|
|
13476
|
-
placeholder:
|
|
13477
|
-
description:
|
|
13476
|
+
placeholder: s = "https://example.com",
|
|
13477
|
+
description: l,
|
|
13478
13478
|
required: c,
|
|
13479
13479
|
helper: d,
|
|
13480
13480
|
leadingIcon: u,
|
|
13481
13481
|
trailingIcon: h
|
|
13482
|
-
} = e, [m, f] =
|
|
13482
|
+
} = e, [m, f] = A(!1), [w, g] = A(null), v = !!w, E = v ? n.error : m ? n.inputFocusBorder : n.inputBorder, b = /^(https?:\/\/)?([\w-]+\.)+[\w-]{2,}(\/[^\s]*)?$/i, k = () => {
|
|
13483
13483
|
f(!1), c && !t ? g("URL is required") : t && !b.test(t) ? g("Please enter a valid URL") : g(null);
|
|
13484
13484
|
};
|
|
13485
13485
|
return /* @__PURE__ */ L("div", { children: [
|
|
@@ -13506,13 +13506,13 @@ function aw({ field: e, value: t, onChange: r, theme: n }) {
|
|
|
13506
13506
|
id: a,
|
|
13507
13507
|
name: a,
|
|
13508
13508
|
type: "url",
|
|
13509
|
-
placeholder:
|
|
13509
|
+
placeholder: s,
|
|
13510
13510
|
value: t || "",
|
|
13511
13511
|
onChange: r,
|
|
13512
13512
|
onFocus: () => f(!0),
|
|
13513
13513
|
onBlur: k,
|
|
13514
13514
|
"aria-invalid": v ? "true" : "false",
|
|
13515
|
-
"aria-describedby": v ? `${a}-error` :
|
|
13515
|
+
"aria-describedby": v ? `${a}-error` : l ? `${a}-description` : void 0,
|
|
13516
13516
|
pattern: "https?://.+",
|
|
13517
13517
|
style: {
|
|
13518
13518
|
color: n.inputText,
|
|
@@ -13560,13 +13560,13 @@ function aw({ field: e, value: t, onChange: r, theme: n }) {
|
|
|
13560
13560
|
children: w
|
|
13561
13561
|
}
|
|
13562
13562
|
)
|
|
13563
|
-
] }) :
|
|
13563
|
+
] }) : l ? /* @__PURE__ */ p(
|
|
13564
13564
|
"p",
|
|
13565
13565
|
{
|
|
13566
13566
|
id: `${a}-description`,
|
|
13567
13567
|
style: { color: n.description },
|
|
13568
13568
|
className: "mt-1 text-sm",
|
|
13569
|
-
children:
|
|
13569
|
+
children: l
|
|
13570
13570
|
}
|
|
13571
13571
|
) : null
|
|
13572
13572
|
] });
|
|
@@ -13575,22 +13575,22 @@ function iw({ field: e, value: t = [], onChange: r, theme: n }) {
|
|
|
13575
13575
|
const {
|
|
13576
13576
|
name: a,
|
|
13577
13577
|
title: i,
|
|
13578
|
-
placeholder:
|
|
13579
|
-
options:
|
|
13578
|
+
placeholder: s = "Select options",
|
|
13579
|
+
options: l = [],
|
|
13580
13580
|
optionId: c = "id",
|
|
13581
13581
|
optionLabel: d = "name",
|
|
13582
13582
|
error: u
|
|
13583
|
-
} = e, h =
|
|
13583
|
+
} = e, h = l.map((b, k) => {
|
|
13584
13584
|
if (typeof b == "string" || typeof b == "number") {
|
|
13585
|
-
const
|
|
13586
|
-
return { id:
|
|
13585
|
+
const C = String(b);
|
|
13586
|
+
return { id: C, label: C, original: b };
|
|
13587
13587
|
}
|
|
13588
13588
|
const y = b == null ? void 0 : b[c], x = y != null ? String(y) : `__opt_${k}`, R = (b == null ? void 0 : b[d]) ?? (b == null ? void 0 : b.label) ?? (y != null ? String(y) : `option ${k}`);
|
|
13589
13589
|
return { id: x, label: R, original: b };
|
|
13590
13590
|
}), m = new Map(h.map((b) => [b.label, b.id])), f = new Map(h.map((b) => [b.id, b.label])), w = Array.isArray(t) ? t : [], g = w.map((b) => m.get(b)).filter((b) => b !== void 0), v = (b) => {
|
|
13591
13591
|
const k = (Array.isArray(b) ? b : []).map((y) => f.get(y)).filter((y) => y !== void 0);
|
|
13592
13592
|
r(k);
|
|
13593
|
-
}, E = w.length > 0 ? w.join(", ") :
|
|
13593
|
+
}, E = w.length > 0 ? w.join(", ") : s;
|
|
13594
13594
|
return /* @__PURE__ */ L("div", { children: [
|
|
13595
13595
|
i && /* @__PURE__ */ p(
|
|
13596
13596
|
"label",
|
|
@@ -13651,7 +13651,7 @@ function iw({ field: e, value: t = [], onChange: r, theme: n }) {
|
|
|
13651
13651
|
borderColor: n == null ? void 0 : n.inputBorder
|
|
13652
13652
|
},
|
|
13653
13653
|
children: h.map((b) => /* @__PURE__ */ p(
|
|
13654
|
-
|
|
13654
|
+
_r,
|
|
13655
13655
|
{
|
|
13656
13656
|
value: b.id,
|
|
13657
13657
|
className: ({ active: k }) => `relative cursor-default select-none py-2 pl-10 pr-4 ${k ? "bg-gray-100" : ""}`,
|
|
@@ -13684,7 +13684,7 @@ function iw({ field: e, value: t = [], onChange: r, theme: n }) {
|
|
|
13684
13684
|
] });
|
|
13685
13685
|
}
|
|
13686
13686
|
function lw({ field: e, value: t, onChange: r, theme: n }) {
|
|
13687
|
-
const { name: a, title: i, description:
|
|
13687
|
+
const { name: a, title: i, description: s, helper: l, optional: c, required: d, error: u } = e, [h, m] = A(!1), f = !!u, w = f ? n.error : h ? n.inputFocusBorder : n.inputBorder, g = (v) => {
|
|
13688
13688
|
if (!v) return "";
|
|
13689
13689
|
const E = new Date(v);
|
|
13690
13690
|
return isNaN(E) ? "" : E.toISOString().slice(0, 16);
|
|
@@ -13712,7 +13712,7 @@ function lw({ field: e, value: t, onChange: r, theme: n }) {
|
|
|
13712
13712
|
),
|
|
13713
13713
|
c && !f && /* @__PURE__ */ p("span", { style: { color: n.description }, className: "text-sm/6", children: "Optional" })
|
|
13714
13714
|
] }),
|
|
13715
|
-
|
|
13715
|
+
l && /* @__PURE__ */ p("p", { style: { color: n.description }, className: "mb-1 text-xs", children: l }),
|
|
13716
13716
|
/* @__PURE__ */ L("div", { className: "relative", children: [
|
|
13717
13717
|
/* @__PURE__ */ p(
|
|
13718
13718
|
"input",
|
|
@@ -13725,7 +13725,7 @@ function lw({ field: e, value: t, onChange: r, theme: n }) {
|
|
|
13725
13725
|
onFocus: () => m(!0),
|
|
13726
13726
|
onBlur: () => m(!1),
|
|
13727
13727
|
"aria-invalid": f ? "true" : "false",
|
|
13728
|
-
"aria-describedby": f ? `${a}-error` :
|
|
13728
|
+
"aria-describedby": f ? `${a}-error` : s ? `${a}-description` : void 0,
|
|
13729
13729
|
style: {
|
|
13730
13730
|
color: f ? n.error : n.inputText,
|
|
13731
13731
|
backgroundColor: n.inputBackground,
|
|
@@ -13755,13 +13755,13 @@ function lw({ field: e, value: t, onChange: r, theme: n }) {
|
|
|
13755
13755
|
className: "mt-2 text-sm",
|
|
13756
13756
|
children: u
|
|
13757
13757
|
}
|
|
13758
|
-
) :
|
|
13758
|
+
) : s ? /* @__PURE__ */ p(
|
|
13759
13759
|
"p",
|
|
13760
13760
|
{
|
|
13761
13761
|
id: `${a}-description`,
|
|
13762
13762
|
style: { color: n.description },
|
|
13763
13763
|
className: "mt-2 text-sm",
|
|
13764
|
-
children:
|
|
13764
|
+
children: s
|
|
13765
13765
|
}
|
|
13766
13766
|
) : null
|
|
13767
13767
|
] });
|
|
@@ -13792,15 +13792,15 @@ var Ot = class {
|
|
|
13792
13792
|
return this.time !== e.time ? this.distanceTo(e) / (this.time - e.time) : 0;
|
|
13793
13793
|
}
|
|
13794
13794
|
}, sw = class fa {
|
|
13795
|
-
constructor(t, r, n, a, i,
|
|
13796
|
-
this.startPoint = t, this.control2 = r, this.control1 = n, this.endPoint = a, this.startWidth = i, this.endWidth =
|
|
13795
|
+
constructor(t, r, n, a, i, s) {
|
|
13796
|
+
this.startPoint = t, this.control2 = r, this.control1 = n, this.endPoint = a, this.startWidth = i, this.endWidth = s;
|
|
13797
13797
|
}
|
|
13798
13798
|
static fromPoints(t, r) {
|
|
13799
13799
|
const n = this.calculateControlPoints(t[0], t[1], t[2]).c2, a = this.calculateControlPoints(t[1], t[2], t[3]).c1;
|
|
13800
13800
|
return new fa(t[1], n, a, t[2], r.start, r.end);
|
|
13801
13801
|
}
|
|
13802
13802
|
static calculateControlPoints(t, r, n) {
|
|
13803
|
-
const a = t.x - r.x, i = t.y - r.y,
|
|
13803
|
+
const a = t.x - r.x, i = t.y - r.y, s = r.x - n.x, l = r.y - n.y, c = { x: (t.x + r.x) / 2, y: (t.y + r.y) / 2 }, d = { x: (r.x + n.x) / 2, y: (r.y + n.y) / 2 }, u = Math.sqrt(a * a + i * i), h = Math.sqrt(s * s + l * l), m = c.x - d.x, f = c.y - d.y, w = u + h == 0 ? 0 : h / (u + h), g = { x: d.x + m * w, y: d.y + f * w }, v = r.x - g.x, E = r.y - g.y;
|
|
13804
13804
|
return {
|
|
13805
13805
|
c1: new Ot(c.x + v, c.y + E),
|
|
13806
13806
|
c2: new Ot(d.x + v, d.y + E)
|
|
@@ -13810,24 +13810,24 @@ var Ot = class {
|
|
|
13810
13810
|
length() {
|
|
13811
13811
|
let r = 0, n, a;
|
|
13812
13812
|
for (let i = 0; i <= 10; i += 1) {
|
|
13813
|
-
const
|
|
13814
|
-
|
|
13813
|
+
const s = i / 10, l = this.point(
|
|
13814
|
+
s,
|
|
13815
13815
|
this.startPoint.x,
|
|
13816
13816
|
this.control1.x,
|
|
13817
13817
|
this.control2.x,
|
|
13818
13818
|
this.endPoint.x
|
|
13819
13819
|
), c = this.point(
|
|
13820
|
-
|
|
13820
|
+
s,
|
|
13821
13821
|
this.startPoint.y,
|
|
13822
13822
|
this.control1.y,
|
|
13823
13823
|
this.control2.y,
|
|
13824
13824
|
this.endPoint.y
|
|
13825
13825
|
);
|
|
13826
13826
|
if (i > 0) {
|
|
13827
|
-
const d =
|
|
13827
|
+
const d = l - n, u = c - a;
|
|
13828
13828
|
r += Math.sqrt(d * d + u * u);
|
|
13829
13829
|
}
|
|
13830
|
-
n =
|
|
13830
|
+
n = l, a = c;
|
|
13831
13831
|
}
|
|
13832
13832
|
return r;
|
|
13833
13833
|
}
|
|
@@ -13857,13 +13857,13 @@ var Ot = class {
|
|
|
13857
13857
|
}
|
|
13858
13858
|
};
|
|
13859
13859
|
function dw(e, t = 250) {
|
|
13860
|
-
let r = 0, n = null, a, i,
|
|
13861
|
-
const
|
|
13862
|
-
r = Date.now(), n = null, a = e.apply(i,
|
|
13860
|
+
let r = 0, n = null, a, i, s;
|
|
13861
|
+
const l = () => {
|
|
13862
|
+
r = Date.now(), n = null, a = e.apply(i, s), n || (i = null, s = []);
|
|
13863
13863
|
};
|
|
13864
13864
|
return function(...d) {
|
|
13865
13865
|
const u = Date.now(), h = t - (u - r);
|
|
13866
|
-
return i = this,
|
|
13866
|
+
return i = this, s = d, h <= 0 || h > t ? (n && (clearTimeout(n), n = null), r = u, a = e.apply(i, s), n || (i = null, s = [])) : n || (n = window.setTimeout(l, h)), a;
|
|
13867
13867
|
};
|
|
13868
13868
|
}
|
|
13869
13869
|
var uw = class kr extends cw {
|
|
@@ -13911,12 +13911,12 @@ var uw = class kr extends cw {
|
|
|
13911
13911
|
}
|
|
13912
13912
|
fromDataURL(r, n = {}) {
|
|
13913
13913
|
return new Promise((a, i) => {
|
|
13914
|
-
const
|
|
13915
|
-
this._reset(this._getPointGroupOptions()),
|
|
13916
|
-
this._ctx.drawImage(
|
|
13917
|
-
},
|
|
13914
|
+
const s = new Image(), l = n.ratio || window.devicePixelRatio || 1, c = n.width || this.canvas.width / l, d = n.height || this.canvas.height / l, u = n.xOffset || 0, h = n.yOffset || 0;
|
|
13915
|
+
this._reset(this._getPointGroupOptions()), s.onload = () => {
|
|
13916
|
+
this._ctx.drawImage(s, u, h, c, d), a();
|
|
13917
|
+
}, s.onerror = (m) => {
|
|
13918
13918
|
i(m);
|
|
13919
|
-
},
|
|
13919
|
+
}, s.crossOrigin = "anonymous", s.src = r, this._isEmpty = !1, this._dataUrl = r, this._dataUrlOptions = { ...n };
|
|
13920
13920
|
});
|
|
13921
13921
|
}
|
|
13922
13922
|
toDataURL(r = "image/png", n) {
|
|
@@ -14074,11 +14074,11 @@ var uw = class kr extends cw {
|
|
|
14074
14074
|
break;
|
|
14075
14075
|
}
|
|
14076
14076
|
this._drawingStroke = !0;
|
|
14077
|
-
const i = this._getPointGroupOptions(),
|
|
14077
|
+
const i = this._getPointGroupOptions(), s = {
|
|
14078
14078
|
...i,
|
|
14079
14079
|
points: []
|
|
14080
14080
|
};
|
|
14081
|
-
this._data.push(
|
|
14081
|
+
this._data.push(s), this._reset(i), this._strokeUpdate(r);
|
|
14082
14082
|
}
|
|
14083
14083
|
_strokeUpdate(r) {
|
|
14084
14084
|
if (!this._drawingStroke)
|
|
@@ -14090,10 +14090,10 @@ var uw = class kr extends cw {
|
|
|
14090
14090
|
this.dispatchEvent(
|
|
14091
14091
|
new CustomEvent("beforeUpdateStroke", { detail: r })
|
|
14092
14092
|
);
|
|
14093
|
-
const n = this._createPoint(r.x, r.y, r.pressure), a = this._data[this._data.length - 1], i = a.points,
|
|
14094
|
-
if (!
|
|
14093
|
+
const n = this._createPoint(r.x, r.y, r.pressure), a = this._data[this._data.length - 1], i = a.points, s = i.length > 0 && i[i.length - 1], l = s ? n.distanceTo(s) <= this.minDistance : !1, c = this._getPointGroupOptions(a);
|
|
14094
|
+
if (!s || !(s && l)) {
|
|
14095
14095
|
const d = this._addPoint(n, c);
|
|
14096
|
-
|
|
14096
|
+
s ? d && this._drawCurve(d, c) : this._drawDot(n, c), i.push({
|
|
14097
14097
|
time: n.time,
|
|
14098
14098
|
x: n.x,
|
|
14099
14099
|
y: n.y,
|
|
@@ -14142,17 +14142,17 @@ var uw = class kr extends cw {
|
|
|
14142
14142
|
a[1],
|
|
14143
14143
|
a[2],
|
|
14144
14144
|
n
|
|
14145
|
-
),
|
|
14146
|
-
return a.shift(),
|
|
14145
|
+
), s = sw.fromPoints(a, i);
|
|
14146
|
+
return a.shift(), s;
|
|
14147
14147
|
}
|
|
14148
14148
|
return null;
|
|
14149
14149
|
}
|
|
14150
14150
|
_calculateCurveWidths(r, n, a) {
|
|
14151
|
-
const i = a.velocityFilterWeight * n.velocityFrom(r) + (1 - a.velocityFilterWeight) * this._lastVelocity,
|
|
14152
|
-
end:
|
|
14151
|
+
const i = a.velocityFilterWeight * n.velocityFrom(r) + (1 - a.velocityFilterWeight) * this._lastVelocity, s = this._strokeWidth(i, a), l = {
|
|
14152
|
+
end: s,
|
|
14153
14153
|
start: this._lastWidth
|
|
14154
14154
|
};
|
|
14155
|
-
return this._lastVelocity = i, this._lastWidth =
|
|
14155
|
+
return this._lastVelocity = i, this._lastWidth = s, l;
|
|
14156
14156
|
}
|
|
14157
14157
|
_strokeWidth(r, n) {
|
|
14158
14158
|
return Math.max(n.maxWidth / (r + 1), n.minWidth);
|
|
@@ -14162,10 +14162,10 @@ var uw = class kr extends cw {
|
|
|
14162
14162
|
i.moveTo(r, n), i.arc(r, n, a, 0, 2 * Math.PI, !1), this._isEmpty = !1;
|
|
14163
14163
|
}
|
|
14164
14164
|
_drawCurve(r, n) {
|
|
14165
|
-
const a = this._ctx, i = r.endWidth - r.startWidth,
|
|
14165
|
+
const a = this._ctx, i = r.endWidth - r.startWidth, s = Math.ceil(r.length()) * 2;
|
|
14166
14166
|
a.beginPath(), a.fillStyle = n.penColor;
|
|
14167
|
-
for (let
|
|
14168
|
-
const c =
|
|
14167
|
+
for (let l = 0; l < s; l += 1) {
|
|
14168
|
+
const c = l / s, d = c * c, u = d * c, h = 1 - c, m = h * h, f = m * h;
|
|
14169
14169
|
let w = f * r.startPoint.x;
|
|
14170
14170
|
w += 3 * m * c * r.control1.x, w += 3 * h * d * r.control2.x, w += u * r.endPoint.x;
|
|
14171
14171
|
let g = f * r.startPoint.y;
|
|
@@ -14184,27 +14184,27 @@ var uw = class kr extends cw {
|
|
|
14184
14184
|
}
|
|
14185
14185
|
_fromData(r, n, a) {
|
|
14186
14186
|
for (const i of r) {
|
|
14187
|
-
const { points:
|
|
14188
|
-
if (
|
|
14189
|
-
for (let c = 0; c <
|
|
14190
|
-
const d =
|
|
14187
|
+
const { points: s } = i, l = this._getPointGroupOptions(i);
|
|
14188
|
+
if (s.length > 1)
|
|
14189
|
+
for (let c = 0; c < s.length; c += 1) {
|
|
14190
|
+
const d = s[c], u = new Ot(
|
|
14191
14191
|
d.x,
|
|
14192
14192
|
d.y,
|
|
14193
14193
|
d.pressure,
|
|
14194
14194
|
d.time
|
|
14195
14195
|
);
|
|
14196
|
-
c === 0 && this._reset(
|
|
14197
|
-
const h = this._addPoint(u,
|
|
14198
|
-
h && n(h,
|
|
14196
|
+
c === 0 && this._reset(l);
|
|
14197
|
+
const h = this._addPoint(u, l);
|
|
14198
|
+
h && n(h, l);
|
|
14199
14199
|
}
|
|
14200
14200
|
else
|
|
14201
|
-
this._reset(
|
|
14201
|
+
this._reset(l), a(s[0], l);
|
|
14202
14202
|
}
|
|
14203
14203
|
}
|
|
14204
14204
|
toSVG({ includeBackgroundColor: r = !1, includeDataUrl: n = !1 } = {}) {
|
|
14205
14205
|
var h, m, f, w, g;
|
|
14206
|
-
const a = this._data, i = Math.max(window.devicePixelRatio || 1, 1),
|
|
14207
|
-
if (u.setAttribute("xmlns", "http://www.w3.org/2000/svg"), u.setAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink"), u.setAttribute("viewBox", `${
|
|
14206
|
+
const a = this._data, i = Math.max(window.devicePixelRatio || 1, 1), s = 0, l = 0, c = this.canvas.width / i, d = this.canvas.height / i, u = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
14207
|
+
if (u.setAttribute("xmlns", "http://www.w3.org/2000/svg"), u.setAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink"), u.setAttribute("viewBox", `${s} ${l} ${c} ${d}`), u.setAttribute("width", c.toString()), u.setAttribute("height", d.toString()), r && this.backgroundColor) {
|
|
14208
14208
|
const v = document.createElement("rect");
|
|
14209
14209
|
v.setAttribute("width", "100%"), v.setAttribute("height", "100%"), v.setAttribute("fill", this.backgroundColor), u.appendChild(v);
|
|
14210
14210
|
}
|
|
@@ -14231,7 +14231,7 @@ var uw = class kr extends cw {
|
|
|
14231
14231
|
}
|
|
14232
14232
|
};
|
|
14233
14233
|
function fw({ field: e, value: t, onChange: r, theme: n }) {
|
|
14234
|
-
const { name: a, title: i, description:
|
|
14234
|
+
const { name: a, title: i, description: s, required: l, helper: c } = e, d = I(null), u = I(null), [h, m] = A(null);
|
|
14235
14235
|
q(() => {
|
|
14236
14236
|
d.current && (u.current = new uw(d.current, {
|
|
14237
14237
|
backgroundColor: n.inputBackground || "#fff",
|
|
@@ -14239,10 +14239,10 @@ function fw({ field: e, value: t, onChange: r, theme: n }) {
|
|
|
14239
14239
|
}));
|
|
14240
14240
|
}, [n]);
|
|
14241
14241
|
const f = () => {
|
|
14242
|
-
u.current.clear(), m(
|
|
14242
|
+
u.current.clear(), m(l ? "Signature is required" : null), r({ target: { name: a, value: "" } });
|
|
14243
14243
|
}, w = () => {
|
|
14244
14244
|
if (u.current.isEmpty()) {
|
|
14245
|
-
|
|
14245
|
+
l && m("Signature is required");
|
|
14246
14246
|
return;
|
|
14247
14247
|
}
|
|
14248
14248
|
const g = u.current.toDataURL("image/png");
|
|
@@ -14258,11 +14258,11 @@ function fw({ field: e, value: t, onChange: r, theme: n }) {
|
|
|
14258
14258
|
className: "block text-sm/6 font-medium",
|
|
14259
14259
|
children: [
|
|
14260
14260
|
i,
|
|
14261
|
-
|
|
14261
|
+
l && /* @__PURE__ */ p("span", { style: { color: n.requiredAsterisk }, children: " *" })
|
|
14262
14262
|
]
|
|
14263
14263
|
}
|
|
14264
14264
|
),
|
|
14265
|
-
!
|
|
14265
|
+
!l && !h && /* @__PURE__ */ p("span", { style: { color: n.description }, className: "text-sm/6", children: "Optional" })
|
|
14266
14266
|
] }),
|
|
14267
14267
|
c && /* @__PURE__ */ p("p", { style: { color: n.description }, className: "mb-1 text-xs", children: c }),
|
|
14268
14268
|
/* @__PURE__ */ p(
|
|
@@ -14331,13 +14331,13 @@ function fw({ field: e, value: t, onChange: r, theme: n }) {
|
|
|
14331
14331
|
children: h
|
|
14332
14332
|
}
|
|
14333
14333
|
)
|
|
14334
|
-
] }) :
|
|
14334
|
+
] }) : s ? /* @__PURE__ */ p(
|
|
14335
14335
|
"p",
|
|
14336
14336
|
{
|
|
14337
14337
|
id: `${a}-description`,
|
|
14338
14338
|
style: { color: n.description },
|
|
14339
14339
|
className: "mt-1 text-sm",
|
|
14340
|
-
children:
|
|
14340
|
+
children: s
|
|
14341
14341
|
}
|
|
14342
14342
|
) : null
|
|
14343
14343
|
] });
|
|
@@ -14356,15 +14356,15 @@ function mw({ field: e, value: t, onChange: r, theme: n }) {
|
|
|
14356
14356
|
const {
|
|
14357
14357
|
name: a,
|
|
14358
14358
|
title: i,
|
|
14359
|
-
description:
|
|
14360
|
-
required:
|
|
14359
|
+
description: s,
|
|
14360
|
+
required: l,
|
|
14361
14361
|
helper: c,
|
|
14362
14362
|
max: d = 5,
|
|
14363
14363
|
// default rating scale
|
|
14364
14364
|
icon: u = "StarIcon"
|
|
14365
14365
|
// default icon (must match one in ReturnSecIcon)
|
|
14366
|
-
} = e, [h, m] =
|
|
14367
|
-
m(
|
|
14366
|
+
} = e, [h, m] = A(null), [f, w] = A(null), g = !!h, v = (b) => {
|
|
14367
|
+
m(l && b === 0 ? "Rating is required" : null), r({ target: { name: a, value: b } });
|
|
14368
14368
|
}, E = (b) => {
|
|
14369
14369
|
const k = f ? b <= f : b <= (t || 0);
|
|
14370
14370
|
let y;
|
|
@@ -14394,11 +14394,11 @@ function mw({ field: e, value: t, onChange: r, theme: n }) {
|
|
|
14394
14394
|
className: "block text-sm/6 font-medium",
|
|
14395
14395
|
children: [
|
|
14396
14396
|
i,
|
|
14397
|
-
|
|
14397
|
+
l && /* @__PURE__ */ p("span", { style: { color: n.requiredAsterisk }, children: " *" })
|
|
14398
14398
|
]
|
|
14399
14399
|
}
|
|
14400
14400
|
),
|
|
14401
|
-
!
|
|
14401
|
+
!l && !g && /* @__PURE__ */ p("span", { style: { color: n.description }, className: "text-sm/6", children: "Optional" })
|
|
14402
14402
|
] }),
|
|
14403
14403
|
c && /* @__PURE__ */ p("p", { style: { color: n.description }, className: "mb-1 text-xs", children: c }),
|
|
14404
14404
|
/* @__PURE__ */ p(
|
|
@@ -14408,7 +14408,7 @@ function mw({ field: e, value: t, onChange: r, theme: n }) {
|
|
|
14408
14408
|
role: "radiogroup",
|
|
14409
14409
|
className: "flex items-center gap-1",
|
|
14410
14410
|
"aria-invalid": g ? "true" : "false",
|
|
14411
|
-
"aria-describedby": g ? `${a}-error` :
|
|
14411
|
+
"aria-describedby": g ? `${a}-error` : s ? `${a}-description` : void 0,
|
|
14412
14412
|
children: [...Array(d)].map((b, k) => E(k + 1))
|
|
14413
14413
|
}
|
|
14414
14414
|
),
|
|
@@ -14429,13 +14429,13 @@ function mw({ field: e, value: t, onChange: r, theme: n }) {
|
|
|
14429
14429
|
children: h
|
|
14430
14430
|
}
|
|
14431
14431
|
)
|
|
14432
|
-
] }) :
|
|
14432
|
+
] }) : s ? /* @__PURE__ */ p(
|
|
14433
14433
|
"p",
|
|
14434
14434
|
{
|
|
14435
14435
|
id: `${a}-description`,
|
|
14436
14436
|
style: { color: n.description },
|
|
14437
14437
|
className: "mt-1 text-sm",
|
|
14438
|
-
children:
|
|
14438
|
+
children: s
|
|
14439
14439
|
}
|
|
14440
14440
|
) : null
|
|
14441
14441
|
] });
|
|
@@ -14444,15 +14444,15 @@ function hw({ field: e, value: t, onChange: r, theme: n }) {
|
|
|
14444
14444
|
const {
|
|
14445
14445
|
name: a,
|
|
14446
14446
|
title: i,
|
|
14447
|
-
description:
|
|
14448
|
-
required:
|
|
14447
|
+
description: s,
|
|
14448
|
+
required: l,
|
|
14449
14449
|
helper: c,
|
|
14450
14450
|
min: d = 1,
|
|
14451
14451
|
max: u = 10,
|
|
14452
14452
|
step: h = 1
|
|
14453
14453
|
// just in case you want 1–5 or 2–20 etc.
|
|
14454
|
-
} = e, [m, f] =
|
|
14455
|
-
f(
|
|
14454
|
+
} = e, [m, f] = A(null), w = !!m, g = (E) => {
|
|
14455
|
+
f(l && !E ? "Selection is required" : null), r({ target: { name: a, value: E } });
|
|
14456
14456
|
}, v = [];
|
|
14457
14457
|
for (let E = d; E <= u; E += h)
|
|
14458
14458
|
v.push(E);
|
|
@@ -14466,11 +14466,11 @@ function hw({ field: e, value: t, onChange: r, theme: n }) {
|
|
|
14466
14466
|
className: "block text-sm/6 font-medium",
|
|
14467
14467
|
children: [
|
|
14468
14468
|
i,
|
|
14469
|
-
|
|
14469
|
+
l && /* @__PURE__ */ p("span", { style: { color: n.requiredAsterisk }, children: " *" })
|
|
14470
14470
|
]
|
|
14471
14471
|
}
|
|
14472
14472
|
),
|
|
14473
|
-
!
|
|
14473
|
+
!l && !w && /* @__PURE__ */ p("span", { style: { color: n.description }, className: "text-sm/6", children: "Optional" })
|
|
14474
14474
|
] }),
|
|
14475
14475
|
c && /* @__PURE__ */ p("p", { style: { color: n.description }, className: "mb-1 text-xs", children: c }),
|
|
14476
14476
|
/* @__PURE__ */ p(
|
|
@@ -14480,7 +14480,7 @@ function hw({ field: e, value: t, onChange: r, theme: n }) {
|
|
|
14480
14480
|
role: "radiogroup",
|
|
14481
14481
|
className: "flex flex-wrap gap-2",
|
|
14482
14482
|
"aria-invalid": w ? "true" : "false",
|
|
14483
|
-
"aria-describedby": w ? `${a}-error` :
|
|
14483
|
+
"aria-describedby": w ? `${a}-error` : s ? `${a}-description` : void 0,
|
|
14484
14484
|
children: v.map((E) => /* @__PURE__ */ L("label", { className: "flex flex-col items-center text-sm", children: [
|
|
14485
14485
|
/* @__PURE__ */ p(
|
|
14486
14486
|
"input",
|
|
@@ -14525,20 +14525,20 @@ function hw({ field: e, value: t, onChange: r, theme: n }) {
|
|
|
14525
14525
|
children: m
|
|
14526
14526
|
}
|
|
14527
14527
|
)
|
|
14528
|
-
] }) :
|
|
14528
|
+
] }) : s ? /* @__PURE__ */ p(
|
|
14529
14529
|
"p",
|
|
14530
14530
|
{
|
|
14531
14531
|
id: `${a}-description`,
|
|
14532
14532
|
style: { color: n.description },
|
|
14533
14533
|
className: "mt-1 text-sm",
|
|
14534
|
-
children:
|
|
14534
|
+
children: s
|
|
14535
14535
|
}
|
|
14536
14536
|
) : null
|
|
14537
14537
|
] });
|
|
14538
14538
|
}
|
|
14539
14539
|
const ww = process.env.NEXT_PUBLIC_RECAPTCHA_SITE_KEY;
|
|
14540
14540
|
function pw({ field: e, value: t, onChange: r, theme: n }) {
|
|
14541
|
-
const a =
|
|
14541
|
+
const a = I(null), [i, s] = A(null), [l, c] = A(!1);
|
|
14542
14542
|
q(() => {
|
|
14543
14543
|
if (window.grecaptcha) {
|
|
14544
14544
|
window.grecaptcha.ready(() => d());
|
|
@@ -14562,7 +14562,7 @@ function pw({ field: e, value: t, onChange: r, theme: n }) {
|
|
|
14562
14562
|
r({ target: { name: e.name, value: "" } }), c(!0);
|
|
14563
14563
|
}
|
|
14564
14564
|
});
|
|
14565
|
-
|
|
14565
|
+
s(u);
|
|
14566
14566
|
};
|
|
14567
14567
|
return /* @__PURE__ */ L("div", { className: "mb-4", children: [
|
|
14568
14568
|
e.title && /* @__PURE__ */ L(
|
|
@@ -14578,7 +14578,7 @@ function pw({ field: e, value: t, onChange: r, theme: n }) {
|
|
|
14578
14578
|
}
|
|
14579
14579
|
),
|
|
14580
14580
|
/* @__PURE__ */ p("div", { ref: a }),
|
|
14581
|
-
|
|
14581
|
+
l && /* @__PURE__ */ p("p", { style: { color: n.error }, className: "mt-1 text-sm", children: "Please complete the CAPTCHA" })
|
|
14582
14582
|
] });
|
|
14583
14583
|
}
|
|
14584
14584
|
let Bn = !1;
|
|
@@ -14650,17 +14650,17 @@ function Sn({
|
|
|
14650
14650
|
}
|
|
14651
14651
|
function Iw({ setState: e, fields: t = [], rules: r = [] }) {
|
|
14652
14652
|
const n = Array.isArray(r) ? r.reduce((a, i) => (i != null && i.name && (a[i.name] = i), a), {}) : {};
|
|
14653
|
-
return function(i,
|
|
14654
|
-
let
|
|
14653
|
+
return function(i, s) {
|
|
14654
|
+
let l, c, d, u, h;
|
|
14655
14655
|
if (i != null && i.target) {
|
|
14656
14656
|
const m = i;
|
|
14657
|
-
|
|
14657
|
+
l = m.target.name, c = m.target.value, d = m.target.type, u = m.target.checked, h = m.target.files;
|
|
14658
14658
|
} else
|
|
14659
|
-
|
|
14659
|
+
l = s, c = i;
|
|
14660
14660
|
d === "checkbox" && (c = u), d === "file" && (c = (h == null ? void 0 : h[0]) ?? c), e((m) => {
|
|
14661
14661
|
var v;
|
|
14662
|
-
let f = { ...m, [
|
|
14663
|
-
const w = t.find((E) => E.name ===
|
|
14662
|
+
let f = { ...m, [l]: c };
|
|
14663
|
+
const w = t.find((E) => E.name === l);
|
|
14664
14664
|
return (v = w == null ? void 0 : w.modifiers) != null && v.length && w.modifiers.forEach((E) => {
|
|
14665
14665
|
const {
|
|
14666
14666
|
target: b,
|
|
@@ -14668,16 +14668,16 @@ function Iw({ setState: e, fields: t = [], rules: r = [] }) {
|
|
|
14668
14668
|
kind: y = "number",
|
|
14669
14669
|
when: x,
|
|
14670
14670
|
value: R,
|
|
14671
|
-
strictString:
|
|
14671
|
+
strictString: C = !1
|
|
14672
14672
|
} = E;
|
|
14673
14673
|
if (b && ct(c, x, R)) {
|
|
14674
|
-
const
|
|
14674
|
+
const $ = C ? String(f[b] || "") : Number(f[b] || 0), j = C ? String(R) : Number(R);
|
|
14675
14675
|
f[b] = Sn({
|
|
14676
14676
|
type: k,
|
|
14677
14677
|
kind: y,
|
|
14678
|
-
targetValue:
|
|
14679
|
-
modifierValue:
|
|
14680
|
-
strictString:
|
|
14678
|
+
targetValue: $,
|
|
14679
|
+
modifierValue: j,
|
|
14680
|
+
strictString: C
|
|
14681
14681
|
});
|
|
14682
14682
|
}
|
|
14683
14683
|
}), (Array.isArray(w == null ? void 0 : w.triggers) ? w.triggers : []).forEach((E) => {
|
|
@@ -14687,22 +14687,22 @@ function Iw({ setState: e, fields: t = [], rules: r = [] }) {
|
|
|
14687
14687
|
if (!k) return;
|
|
14688
14688
|
const y = E.when;
|
|
14689
14689
|
if (!ct(c, y, E.value)) return;
|
|
14690
|
-
(Array.isArray(k.effects) ? k.effects : []).forEach((
|
|
14691
|
-
const { targetField:
|
|
14692
|
-
if (
|
|
14693
|
-
let
|
|
14694
|
-
|
|
14690
|
+
(Array.isArray(k.effects) ? k.effects : []).forEach((C) => {
|
|
14691
|
+
const { targetField: $, prop: j = "value", type: M, kind: O = "number", value: T, strictString: F = !1, sourceFields: P } = C;
|
|
14692
|
+
if (!$ || j !== "value") return;
|
|
14693
|
+
let S = null;
|
|
14694
|
+
M === "concat" && Array.isArray(P) && (S = P.map((H) => ({
|
|
14695
14695
|
...H,
|
|
14696
14696
|
fieldValue: f[H.field] || ""
|
|
14697
14697
|
})));
|
|
14698
|
-
const
|
|
14699
|
-
f[
|
|
14700
|
-
type:
|
|
14701
|
-
kind:
|
|
14698
|
+
const _ = f[$] || "", G = F ? String(_) : Number(_) || 0, N = F ? String(T) : Number(T);
|
|
14699
|
+
f[$] = Sn({
|
|
14700
|
+
type: M,
|
|
14701
|
+
kind: O,
|
|
14702
14702
|
targetValue: G,
|
|
14703
14703
|
modifierValue: N,
|
|
14704
|
-
strictString:
|
|
14705
|
-
sourceFields:
|
|
14704
|
+
strictString: F,
|
|
14705
|
+
sourceFields: S
|
|
14706
14706
|
});
|
|
14707
14707
|
});
|
|
14708
14708
|
}), f;
|
|
@@ -14740,6 +14740,9 @@ function ct(e, t, r) {
|
|
|
14740
14740
|
return !1;
|
|
14741
14741
|
}
|
|
14742
14742
|
}
|
|
14743
|
+
function Ww(e, t = {}) {
|
|
14744
|
+
return { ...e.reduce((n, a) => (a.default !== void 0 && (n[a.name] = a.default), n), {}), ...t };
|
|
14745
|
+
}
|
|
14743
14746
|
function vw(e, t) {
|
|
14744
14747
|
if (t) return "w-full";
|
|
14745
14748
|
switch (e) {
|
|
@@ -14766,17 +14769,17 @@ function gw(e, t) {
|
|
|
14766
14769
|
return ma(r, n, t);
|
|
14767
14770
|
}
|
|
14768
14771
|
function bw(e, t) {
|
|
14769
|
-
var a, i,
|
|
14770
|
-
const r = ((a = e == null ? void 0 : e.conditions) == null ? void 0 : a.readOnlyWhen) || ((i = e == null ? void 0 : e.conditions) == null ? void 0 : i.disabledWhen), n = ((
|
|
14772
|
+
var a, i, s;
|
|
14773
|
+
const r = ((a = e == null ? void 0 : e.conditions) == null ? void 0 : a.readOnlyWhen) || ((i = e == null ? void 0 : e.conditions) == null ? void 0 : i.disabledWhen), n = ((s = e == null ? void 0 : e.conditions) == null ? void 0 : s.readOnlyMode) === "all" ? "all" : "any";
|
|
14771
14774
|
return ma(r, n, t);
|
|
14772
14775
|
}
|
|
14773
14776
|
function kw(e, t, r) {
|
|
14774
|
-
const n = Array.isArray(t) ? t.reduce((i,
|
|
14777
|
+
const n = Array.isArray(t) ? t.reduce((i, s) => (s != null && s.name && (i[s.name] = s), i), {}) : {}, a = {};
|
|
14775
14778
|
return e.forEach((i) => {
|
|
14776
|
-
(Array.isArray(i == null ? void 0 : i.triggers) ? i.triggers : []).forEach((
|
|
14777
|
-
const c = n[
|
|
14779
|
+
(Array.isArray(i == null ? void 0 : i.triggers) ? i.triggers : []).forEach((l) => {
|
|
14780
|
+
const c = n[l == null ? void 0 : l.rule];
|
|
14778
14781
|
if (!c) return;
|
|
14779
|
-
const d = Array.isArray(
|
|
14782
|
+
const d = Array.isArray(l.when) ? l.when : l.when ? [l.when] : [], u = l.mode === "all" ? "all" : "any";
|
|
14780
14783
|
if (!(d.length === 0 ? !0 : u === "all" ? d.every(
|
|
14781
14784
|
(f) => ct(r == null ? void 0 : r[f.field], f.when, f.value)
|
|
14782
14785
|
) : d.some(
|
|
@@ -14800,21 +14803,21 @@ function Ew({
|
|
|
14800
14803
|
formData: a = {},
|
|
14801
14804
|
rules: i = []
|
|
14802
14805
|
}) {
|
|
14803
|
-
const
|
|
14804
|
-
return /* @__PURE__ */ p("div", { className: "w-full", children: /* @__PURE__ */ p("div", { className: "-mx-2 flex flex-wrap", children: e.map((
|
|
14806
|
+
const s = kw(e, i, a);
|
|
14807
|
+
return /* @__PURE__ */ p("div", { className: "w-full", children: /* @__PURE__ */ p("div", { className: "-mx-2 flex flex-wrap", children: e.map((l, c) => {
|
|
14805
14808
|
var m, f, w;
|
|
14806
|
-
const d = gw(
|
|
14809
|
+
const d = gw(l, a) || ((m = s[l.name]) == null ? void 0 : m.hidden) === !0, u = l.readOnly || bw(l, a) || ((f = s[l.name]) == null ? void 0 : f.readOnly) === !0, h = ((w = s[l.name]) == null ? void 0 : w.title) ?? (l.label || l.title || l.name);
|
|
14807
14810
|
return /* @__PURE__ */ p(
|
|
14808
14811
|
"div",
|
|
14809
14812
|
{
|
|
14810
|
-
className: `${vw(
|
|
14813
|
+
className: `${vw(l.width || 100, n)} mb-4 px-2 ${d ? "hidden" : ""}`,
|
|
14811
14814
|
children: /* @__PURE__ */ p(
|
|
14812
14815
|
Zr,
|
|
14813
14816
|
{
|
|
14814
14817
|
onChange: t,
|
|
14815
|
-
value: a[
|
|
14818
|
+
value: a[l.name] ?? l.default ?? "",
|
|
14816
14819
|
field: {
|
|
14817
|
-
...
|
|
14820
|
+
...l,
|
|
14818
14821
|
title: h,
|
|
14819
14822
|
readOnly: u
|
|
14820
14823
|
},
|
|
@@ -14822,7 +14825,7 @@ function Ew({
|
|
|
14822
14825
|
}
|
|
14823
14826
|
)
|
|
14824
14827
|
},
|
|
14825
|
-
|
|
14828
|
+
l.name || c
|
|
14826
14829
|
);
|
|
14827
14830
|
}) }) });
|
|
14828
14831
|
}
|
|
@@ -14853,58 +14856,59 @@ const yw = /* @__PURE__ */ o.forwardRef(xw), Lw = (e, t) => {
|
|
|
14853
14856
|
a.required && (n++, t[a == null ? void 0 : a.name] && t[a == null ? void 0 : a.name] !== "" && r++);
|
|
14854
14857
|
}), { filled: r, total: n };
|
|
14855
14858
|
};
|
|
14856
|
-
function
|
|
14859
|
+
function Nw({
|
|
14857
14860
|
config: e = {},
|
|
14858
|
-
|
|
14861
|
+
formData: t = {},
|
|
14862
|
+
onSubmit: r = () => {
|
|
14859
14863
|
},
|
|
14860
|
-
onStepChange:
|
|
14864
|
+
onStepChange: n = () => {
|
|
14861
14865
|
},
|
|
14862
|
-
onChange:
|
|
14866
|
+
onChange: a = () => {
|
|
14863
14867
|
},
|
|
14864
|
-
formTheme:
|
|
14865
|
-
wizardTheme:
|
|
14868
|
+
formTheme: i = {},
|
|
14869
|
+
wizardTheme: s = {}
|
|
14866
14870
|
}) {
|
|
14867
|
-
const { steps: l = [], styles:
|
|
14868
|
-
const $ = Math.max(
|
|
14869
|
-
|
|
14870
|
-
},
|
|
14871
|
+
const { steps: l = [], styles: c = {}, rules: d = [] } = e, [u, h] = A(1), [m, f] = A(!1), [w, g] = A({}), v = () => {
|
|
14872
|
+
const $ = Math.max(u - 1, 1);
|
|
14873
|
+
h($), window.scrollTo({ top: 0, behavior: "smooth" }), n($);
|
|
14874
|
+
}, E = () => {
|
|
14871
14875
|
var T;
|
|
14872
|
-
const
|
|
14873
|
-
(
|
|
14876
|
+
const M = (((T = l[u - 1]) == null ? void 0 : T.fields) || []).filter((F) => F.required).filter(
|
|
14877
|
+
(F) => !t[F == null ? void 0 : F.name] || t[F == null ? void 0 : F.name] === ""
|
|
14874
14878
|
);
|
|
14875
|
-
if (
|
|
14879
|
+
if (M.length > 0) {
|
|
14876
14880
|
alert(
|
|
14877
|
-
`Please fill in required fields: ${
|
|
14881
|
+
`Please fill in required fields: ${M.map((F) => F.title).join(", ")}`
|
|
14878
14882
|
);
|
|
14879
14883
|
return;
|
|
14880
14884
|
}
|
|
14881
|
-
const
|
|
14882
|
-
|
|
14885
|
+
const O = Math.min(u + 1, l.length);
|
|
14886
|
+
h(O), window.scrollTo({ top: 0, behavior: "smooth" }), n(O);
|
|
14883
14887
|
};
|
|
14884
|
-
async function
|
|
14885
|
-
|
|
14888
|
+
async function b() {
|
|
14889
|
+
f(!0);
|
|
14886
14890
|
try {
|
|
14887
|
-
await t
|
|
14891
|
+
await r(t), setFormData({}), h(1);
|
|
14888
14892
|
} catch ($) {
|
|
14889
14893
|
console.error("Error submitting wizard:", $), alert("Error: " + $.message);
|
|
14890
14894
|
} finally {
|
|
14891
|
-
|
|
14895
|
+
f(!1);
|
|
14892
14896
|
}
|
|
14893
14897
|
}
|
|
14894
|
-
const
|
|
14898
|
+
const k = l.length > 0 ? Object.values(w).reduce(($, j) => $ + (j.total > 0 ? j.filled / j.total * (100 / l.length) : 0), 0) : 0, y = l[u - 1] || {}, x = y.fields || [];
|
|
14895
14899
|
q(() => {
|
|
14896
14900
|
const $ = {};
|
|
14897
|
-
l.forEach((
|
|
14898
|
-
$[
|
|
14899
|
-
}),
|
|
14901
|
+
l.forEach((j, M) => {
|
|
14902
|
+
$[M + 1] = { filled: 0, total: 0 };
|
|
14903
|
+
}), g($);
|
|
14900
14904
|
}, [l]), q(() => {
|
|
14901
14905
|
const $ = {};
|
|
14902
|
-
l.forEach((
|
|
14903
|
-
const
|
|
14904
|
-
$[
|
|
14905
|
-
}),
|
|
14906
|
-
}, [
|
|
14907
|
-
const
|
|
14906
|
+
l.forEach((j, M) => {
|
|
14907
|
+
const O = j.fields || [];
|
|
14908
|
+
$[M + 1] = Lw(O, t);
|
|
14909
|
+
}), g($);
|
|
14910
|
+
}, [t, l]);
|
|
14911
|
+
const R = {
|
|
14908
14912
|
container: "min-h-screen bg-white",
|
|
14909
14913
|
contentWrapper: "mx-auto max-w-5xl px-6 py-8 sm:py-12 lg:py-16",
|
|
14910
14914
|
header: "font-display text-3xl font-bold tracking-tight sm:mb-2 sm:text-6xl sm:font-light",
|
|
@@ -14913,24 +14917,24 @@ function Ww({
|
|
|
14913
14917
|
primaryButton: "bg-[#020DF9] text-white hover:bg-[#0209D9]",
|
|
14914
14918
|
secondaryButton: "bg-transparent text-[#4A4A4A] hover:bg-[#FAFAFA]",
|
|
14915
14919
|
disabledButton: "cursor-not-allowed bg-transparent text-[#E8E8E8]",
|
|
14916
|
-
...
|
|
14917
|
-
},
|
|
14918
|
-
return /* @__PURE__ */ p("div", { className:
|
|
14920
|
+
...c
|
|
14921
|
+
}, C = R.progressBarColor || "#020DF9";
|
|
14922
|
+
return /* @__PURE__ */ p("div", { className: R.container, children: /* @__PURE__ */ L("div", { className: R.contentWrapper, children: [
|
|
14919
14923
|
/* @__PURE__ */ L("div", { className: "mb-8", children: [
|
|
14920
|
-
/* @__PURE__ */ p("h1", { className: `${
|
|
14924
|
+
/* @__PURE__ */ p("h1", { className: `${R.header} text-[#1A1A1A]`, children: e.title || "Multi-step Wizard" }),
|
|
14921
14925
|
e.subtitle && /* @__PURE__ */ p("p", { className: "text-base font-light text-[#797979] sm:mb-7", children: e.subtitle }),
|
|
14922
14926
|
/* @__PURE__ */ L("div", { className: "mt-3 flex flex-col sm:flex-row sm:items-center sm:justify-between", children: [
|
|
14923
14927
|
/* @__PURE__ */ L("p", { className: "text-base font-medium text-[#4A4A4A]", children: [
|
|
14924
14928
|
"Step ",
|
|
14925
|
-
|
|
14929
|
+
u,
|
|
14926
14930
|
" of ",
|
|
14927
14931
|
l.length,
|
|
14928
14932
|
":",
|
|
14929
14933
|
" ",
|
|
14930
|
-
(
|
|
14934
|
+
(y == null ? void 0 : y.fullName) || (y == null ? void 0 : y.name) || `Step ${u}`
|
|
14931
14935
|
] }),
|
|
14932
14936
|
/* @__PURE__ */ L("p", { className: "mt-1 text-sm text-[#6B6B6B] sm:mt-0", children: [
|
|
14933
|
-
Math.round(
|
|
14937
|
+
Math.round(k),
|
|
14934
14938
|
"% Complete"
|
|
14935
14939
|
] })
|
|
14936
14940
|
] })
|
|
@@ -14940,42 +14944,42 @@ function Ww({
|
|
|
14940
14944
|
{
|
|
14941
14945
|
className: "h-full rounded-full transition-all duration-500 ease-out",
|
|
14942
14946
|
style: {
|
|
14943
|
-
width: `${
|
|
14944
|
-
backgroundColor:
|
|
14947
|
+
width: `${k}%`,
|
|
14948
|
+
backgroundColor: C
|
|
14945
14949
|
}
|
|
14946
14950
|
}
|
|
14947
14951
|
) }) }),
|
|
14948
|
-
e.showStepIndicators !== !1 && /* @__PURE__ */ p("div", { className: "mb-8", children: /* @__PURE__ */ p("nav", { "aria-label": "Progress steps", children: /* @__PURE__ */ p("ol", { className: "flex items-center justify-center space-x-1 sm:space-x-2", children: l.map(($,
|
|
14949
|
-
const
|
|
14952
|
+
e.showStepIndicators !== !1 && /* @__PURE__ */ p("div", { className: "mb-8", children: /* @__PURE__ */ p("nav", { "aria-label": "Progress steps", children: /* @__PURE__ */ p("ol", { className: "flex items-center justify-center space-x-1 sm:space-x-2", children: l.map(($, j) => {
|
|
14953
|
+
const M = j < u - 1, O = j === u - 1, T = j < u;
|
|
14950
14954
|
return /* @__PURE__ */ L("li", { className: "flex items-center", children: [
|
|
14951
14955
|
/* @__PURE__ */ L(
|
|
14952
14956
|
"button",
|
|
14953
14957
|
{
|
|
14954
14958
|
type: "button",
|
|
14955
|
-
onClick: () => T &&
|
|
14956
|
-
className: `flex items-center rounded-full px-3 py-1.5 text-xs font-medium transition-all duration-200 ${
|
|
14959
|
+
onClick: () => T && h(j + 1),
|
|
14960
|
+
className: `flex items-center rounded-full px-3 py-1.5 text-xs font-medium transition-all duration-200 ${O ? "bg-[#020DF9] text-white" : M ? "bg-[#F5F5F5] text-[#1A1A1A] hover:bg-[#E8E8E8]" : "cursor-default bg-transparent text-[#9B9B9B]"} ${T && !O ? "cursor-pointer" : ""} `,
|
|
14957
14961
|
disabled: !T,
|
|
14958
|
-
"aria-current":
|
|
14962
|
+
"aria-current": O ? "step" : void 0,
|
|
14959
14963
|
children: [
|
|
14960
|
-
|
|
14964
|
+
M && /* @__PURE__ */ p(yw, { className: "mr-1.5 h-3.5 w-3.5" }),
|
|
14961
14965
|
/* @__PURE__ */ p("span", { className: "hidden sm:inline", children: $ == null ? void 0 : $.name }),
|
|
14962
|
-
/* @__PURE__ */ p("span", { className: "sm:hidden", children:
|
|
14966
|
+
/* @__PURE__ */ p("span", { className: "sm:hidden", children: j + 1 })
|
|
14963
14967
|
]
|
|
14964
14968
|
}
|
|
14965
14969
|
),
|
|
14966
|
-
|
|
14967
|
-
] }, ($ == null ? void 0 : $.id) ||
|
|
14970
|
+
j < l.length - 1 && /* @__PURE__ */ p("div", { className: "mx-1 h-[1px] w-4 bg-[#E8E8E8] sm:w-8" })
|
|
14971
|
+
] }, ($ == null ? void 0 : $.id) || j);
|
|
14968
14972
|
}) }) }) }),
|
|
14969
|
-
/* @__PURE__ */ L("div", { className:
|
|
14973
|
+
/* @__PURE__ */ L("div", { className: R.card, children: [
|
|
14970
14974
|
/* @__PURE__ */ p(
|
|
14971
14975
|
Ew,
|
|
14972
14976
|
{
|
|
14973
|
-
fields:
|
|
14974
|
-
onChange:
|
|
14975
|
-
formData:
|
|
14977
|
+
fields: x,
|
|
14978
|
+
onChange: a,
|
|
14979
|
+
formData: t,
|
|
14976
14980
|
isMobileView: !1,
|
|
14977
|
-
rules:
|
|
14978
|
-
theme:
|
|
14981
|
+
rules: d,
|
|
14982
|
+
theme: i
|
|
14979
14983
|
}
|
|
14980
14984
|
),
|
|
14981
14985
|
/* @__PURE__ */ L("div", { className: "mt-16 flex items-center justify-between", children: [
|
|
@@ -14983,30 +14987,30 @@ function Ww({
|
|
|
14983
14987
|
"button",
|
|
14984
14988
|
{
|
|
14985
14989
|
type: "button",
|
|
14986
|
-
onClick:
|
|
14987
|
-
className: `${
|
|
14988
|
-
disabled:
|
|
14990
|
+
onClick: v,
|
|
14991
|
+
className: `${R.button} ${u === 1 ? R.disabledButton : R.secondaryButton} `,
|
|
14992
|
+
disabled: u === 1,
|
|
14989
14993
|
children: [
|
|
14990
14994
|
/* @__PURE__ */ p(la, { className: "mr-2 h-4 w-4" }),
|
|
14991
14995
|
"Previous"
|
|
14992
14996
|
]
|
|
14993
14997
|
}
|
|
14994
14998
|
),
|
|
14995
|
-
/* @__PURE__ */ p("div", { className: "flex space-x-2 md:hidden", children: l.map(($,
|
|
14999
|
+
/* @__PURE__ */ p("div", { className: "flex space-x-2 md:hidden", children: l.map(($, j) => /* @__PURE__ */ p(
|
|
14996
15000
|
"div",
|
|
14997
15001
|
{
|
|
14998
|
-
className: `h-1 rounded-full transition-all duration-200 ${
|
|
15002
|
+
className: `h-1 rounded-full transition-all duration-200 ${j + 1 <= u ? "w-6 bg-[#020DF9]" : "w-2 bg-[#E8E8E8]"} `
|
|
14999
15003
|
},
|
|
15000
|
-
|
|
15004
|
+
j
|
|
15001
15005
|
)) }),
|
|
15002
|
-
|
|
15006
|
+
u === l.length ? /* @__PURE__ */ p(
|
|
15003
15007
|
"button",
|
|
15004
15008
|
{
|
|
15005
15009
|
type: "button",
|
|
15006
|
-
onClick:
|
|
15007
|
-
disabled:
|
|
15008
|
-
className: `${
|
|
15009
|
-
children:
|
|
15010
|
+
onClick: b,
|
|
15011
|
+
disabled: m,
|
|
15012
|
+
className: `${R.button} ${m ? "cursor-not-allowed bg-[#E8E8E8]" : R.primaryButton} `,
|
|
15013
|
+
children: m ? /* @__PURE__ */ L(Ce, { children: [
|
|
15010
15014
|
/* @__PURE__ */ L(
|
|
15011
15015
|
"svg",
|
|
15012
15016
|
{
|
|
@@ -15046,8 +15050,8 @@ function Ww({
|
|
|
15046
15050
|
"button",
|
|
15047
15051
|
{
|
|
15048
15052
|
type: "button",
|
|
15049
|
-
onClick:
|
|
15050
|
-
className: `${
|
|
15053
|
+
onClick: E,
|
|
15054
|
+
className: `${R.button} ${R.primaryButton}`,
|
|
15051
15055
|
children: [
|
|
15052
15056
|
"Continue",
|
|
15053
15057
|
/* @__PURE__ */ p(sa, { className: "ml-2 h-4 w-4" })
|
|
@@ -15055,13 +15059,13 @@ function Ww({
|
|
|
15055
15059
|
}
|
|
15056
15060
|
)
|
|
15057
15061
|
] }),
|
|
15058
|
-
|
|
15062
|
+
w[u] && w[u].total > 0 && /* @__PURE__ */ p("div", { className: "mt-8 text-center", children: /* @__PURE__ */ L("p", { className: "text-xs text-[#9B9B9B]", children: [
|
|
15059
15063
|
/* @__PURE__ */ p("span", { className: "text-[#020DF9]", children: "*" }),
|
|
15060
15064
|
" Required fields (",
|
|
15061
|
-
|
|
15065
|
+
w[u].filled,
|
|
15062
15066
|
" of",
|
|
15063
15067
|
" ",
|
|
15064
|
-
|
|
15068
|
+
w[u].total,
|
|
15065
15069
|
" completed)"
|
|
15066
15070
|
] }) })
|
|
15067
15071
|
] }),
|
|
@@ -15075,18 +15079,15 @@ function Ww({
|
|
|
15075
15079
|
) })
|
|
15076
15080
|
] }) });
|
|
15077
15081
|
}
|
|
15078
|
-
function Nw(e, t = {}) {
|
|
15079
|
-
return { ...e.reduce((n, a) => (a.default !== void 0 && (n[a.name] = a.default), n), {}), ...t };
|
|
15080
|
-
}
|
|
15081
15082
|
export {
|
|
15082
15083
|
Ew as Form,
|
|
15083
15084
|
Sw as FormsProvider,
|
|
15084
15085
|
Zr as ReturnFieldsV2,
|
|
15085
|
-
|
|
15086
|
+
Nw as Wizard,
|
|
15086
15087
|
Iw as createFormHandler,
|
|
15087
15088
|
Fw as getAllFields,
|
|
15088
15089
|
Y0 as getField,
|
|
15089
15090
|
Bw as initForms,
|
|
15090
|
-
|
|
15091
|
+
Ww as initializeFormData,
|
|
15091
15092
|
U as registerField
|
|
15092
15093
|
};
|