ynotsoft-dynamic-form 1.0.86 → 1.0.88
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/dynamic-form.js +929 -896
- package/dist/dynamic-form.umd.cjs +20 -20
- package/package.json +2 -2
package/dist/dynamic-form.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { jsx as u, jsxs as I, Fragment as Rt } from "react/jsx-runtime";
|
|
2
2
|
import * as f from "react";
|
|
3
|
-
import Te, { forwardRef as Na, createElement as Tr, useState as
|
|
3
|
+
import Te, { forwardRef as Na, createElement as Tr, useState as le, useRef as Yt, useCallback as sr, useEffect as qe, useLayoutEffect as rc, useMemo as Ta } from "react";
|
|
4
4
|
import { toast as Cn } from "react-hot-toast";
|
|
5
5
|
import ir from "dayjs";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
6
|
+
import oc from "react-select";
|
|
7
|
+
import ac from "react-select/animated";
|
|
8
8
|
import * as _n from "react-dom";
|
|
9
|
-
import
|
|
10
|
-
import { useEditor as
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import { DayPicker as
|
|
9
|
+
import sc from "react-dom";
|
|
10
|
+
import { useEditor as ic, EditorContent as cc } from "@tiptap/react";
|
|
11
|
+
import lc from "@tiptap/starter-kit";
|
|
12
|
+
import uc from "@tiptap/extension-underline";
|
|
13
|
+
import dc from "@tiptap/extension-character-count";
|
|
14
|
+
import { DayPicker as Vr } from "react-day-picker";
|
|
15
15
|
import "react-day-picker/dist/style.css";
|
|
16
|
-
function
|
|
16
|
+
function fc(e) {
|
|
17
17
|
return /* @__PURE__ */ u("input", { type: "hidden", name: e.name, value: e.value }, e.name);
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function mc({
|
|
20
20
|
field: e,
|
|
21
21
|
formValues: t,
|
|
22
22
|
handleChange: n,
|
|
@@ -24,14 +24,14 @@ function fc({
|
|
|
24
24
|
error: o,
|
|
25
25
|
disabled: a
|
|
26
26
|
}) {
|
|
27
|
-
const s = e.disabled && typeof e.disabled == "function" ? e.disabled(t) : e.disabled, i = a || s, c = e.options || [], l =
|
|
27
|
+
const s = e.disabled && typeof e.disabled == "function" ? e.disabled(t) : e.disabled, i = a || s, c = e.options || [], l = ac(), d = t[e.name] || e.value || [], m = (p) => Array.isArray(p) && p.length > 0 && typeof p[0] == "object" && p[0] !== null && "value" in p[0];
|
|
28
28
|
let g;
|
|
29
29
|
return m(d) ? g = d : g = d.filter((p) => p != null).map((p) => c.find((w) => w.value === p)).filter((p) => p !== void 0), /* @__PURE__ */ u(
|
|
30
30
|
"div",
|
|
31
31
|
{
|
|
32
32
|
className: `mb-4 ${e.fieldClass ? e.fieldClass : "col-span-full"}`,
|
|
33
33
|
children: /* @__PURE__ */ u(
|
|
34
|
-
|
|
34
|
+
oc,
|
|
35
35
|
{
|
|
36
36
|
components: l,
|
|
37
37
|
isMulti: !0,
|
|
@@ -71,18 +71,18 @@ function fc({
|
|
|
71
71
|
}
|
|
72
72
|
);
|
|
73
73
|
}
|
|
74
|
-
const
|
|
74
|
+
const pc = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), hc = (e) => e.replace(
|
|
75
75
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
76
76
|
(t, n, r) => r ? r.toUpperCase() : n.toLowerCase()
|
|
77
77
|
), Ro = (e) => {
|
|
78
|
-
const t =
|
|
78
|
+
const t = hc(e);
|
|
79
79
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
80
|
-
}, Pa = (...e) => e.filter((t, n, r) => !!t && t.trim() !== "" && r.indexOf(t) === n).join(" ").trim(),
|
|
80
|
+
}, Pa = (...e) => e.filter((t, n, r) => !!t && t.trim() !== "" && r.indexOf(t) === n).join(" ").trim(), gc = (e) => {
|
|
81
81
|
for (const t in e)
|
|
82
82
|
if (t.startsWith("aria-") || t === "role" || t === "title")
|
|
83
83
|
return !0;
|
|
84
84
|
};
|
|
85
|
-
var
|
|
85
|
+
var bc = {
|
|
86
86
|
xmlns: "http://www.w3.org/2000/svg",
|
|
87
87
|
width: 24,
|
|
88
88
|
height: 24,
|
|
@@ -93,7 +93,7 @@ var gc = {
|
|
|
93
93
|
strokeLinecap: "round",
|
|
94
94
|
strokeLinejoin: "round"
|
|
95
95
|
};
|
|
96
|
-
const
|
|
96
|
+
const vc = Na(
|
|
97
97
|
({
|
|
98
98
|
color: e = "currentColor",
|
|
99
99
|
size: t = 24,
|
|
@@ -107,13 +107,13 @@ const bc = Na(
|
|
|
107
107
|
"svg",
|
|
108
108
|
{
|
|
109
109
|
ref: c,
|
|
110
|
-
...
|
|
110
|
+
...bc,
|
|
111
111
|
width: t,
|
|
112
112
|
height: t,
|
|
113
113
|
stroke: e,
|
|
114
114
|
strokeWidth: r ? Number(n) * 24 / Number(t) : n,
|
|
115
115
|
className: Pa("lucide", o),
|
|
116
|
-
...!a && !
|
|
116
|
+
...!a && !gc(i) && { "aria-hidden": "true" },
|
|
117
117
|
...i
|
|
118
118
|
},
|
|
119
119
|
[
|
|
@@ -124,11 +124,11 @@ const bc = Na(
|
|
|
124
124
|
);
|
|
125
125
|
const ae = (e, t) => {
|
|
126
126
|
const n = Na(
|
|
127
|
-
({ className: r, ...o }, a) => Tr(
|
|
127
|
+
({ className: r, ...o }, a) => Tr(vc, {
|
|
128
128
|
ref: a,
|
|
129
129
|
iconNode: t,
|
|
130
130
|
className: Pa(
|
|
131
|
-
`lucide-${
|
|
131
|
+
`lucide-${pc(Ro(e))}`,
|
|
132
132
|
`lucide-${e}`,
|
|
133
133
|
r
|
|
134
134
|
),
|
|
@@ -137,90 +137,90 @@ const ae = (e, t) => {
|
|
|
137
137
|
);
|
|
138
138
|
return n.displayName = Ro(e), n;
|
|
139
139
|
};
|
|
140
|
-
const
|
|
140
|
+
const yc = [
|
|
141
141
|
[
|
|
142
142
|
"path",
|
|
143
143
|
{ d: "M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8", key: "mg9rjx" }
|
|
144
144
|
]
|
|
145
|
-
],
|
|
146
|
-
const
|
|
145
|
+
], wc = ae("bold", yc);
|
|
146
|
+
const xc = [
|
|
147
147
|
["path", { d: "M8 2v4", key: "1cmpym" }],
|
|
148
148
|
["path", { d: "M16 2v4", key: "4m81vk" }],
|
|
149
149
|
["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
|
|
150
150
|
["path", { d: "M3 10h18", key: "8toen8" }]
|
|
151
|
-
], Ra = ae("calendar",
|
|
152
|
-
const
|
|
153
|
-
const
|
|
154
|
-
const
|
|
151
|
+
], Ra = ae("calendar", xc);
|
|
152
|
+
const Sc = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]], Cc = ae("check", Sc);
|
|
153
|
+
const Ec = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], Mn = ae("chevron-down", Ec);
|
|
154
|
+
const kc = [
|
|
155
155
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
156
156
|
["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
|
|
157
157
|
["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
|
|
158
|
-
],
|
|
159
|
-
const
|
|
158
|
+
], Ac = ae("circle-alert", kc);
|
|
159
|
+
const Nc = [
|
|
160
160
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
161
161
|
["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
|
|
162
|
-
],
|
|
163
|
-
const
|
|
162
|
+
], Tc = ae("circle-check", Nc);
|
|
163
|
+
const Pc = [
|
|
164
164
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
165
165
|
["path", { d: "m15 9-6 6", key: "1uzhvr" }],
|
|
166
166
|
["path", { d: "m9 9 6 6", key: "z0biqf" }]
|
|
167
|
-
],
|
|
168
|
-
const
|
|
169
|
-
const
|
|
167
|
+
], Rc = ae("circle-x", Pc);
|
|
168
|
+
const Oc = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]], _c = ae("circle", Oc);
|
|
169
|
+
const Mc = [
|
|
170
170
|
["path", { d: "M12 13v8", key: "1l5pq0" }],
|
|
171
171
|
["path", { d: "M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242", key: "1pljnt" }],
|
|
172
172
|
["path", { d: "m8 17 4-4 4 4", key: "1quai1" }]
|
|
173
|
-
],
|
|
174
|
-
const
|
|
173
|
+
], Ic = ae("cloud-upload", Mc);
|
|
174
|
+
const Dc = [
|
|
175
175
|
["path", { d: "m16 18 6-6-6-6", key: "eg8j8" }],
|
|
176
176
|
["path", { d: "m8 6-6 6 6 6", key: "ppft3o" }]
|
|
177
|
-
],
|
|
178
|
-
const
|
|
177
|
+
], Lc = ae("code", Dc);
|
|
178
|
+
const Fc = [
|
|
179
179
|
["path", { d: "M4 12h8", key: "17cfdx" }],
|
|
180
180
|
["path", { d: "M4 18V6", key: "1rz3zl" }],
|
|
181
181
|
["path", { d: "M12 18V6", key: "zqpxq5" }],
|
|
182
182
|
["path", { d: "m17 12 3-2v8", key: "1hhhft" }]
|
|
183
|
-
],
|
|
184
|
-
const
|
|
183
|
+
], $c = ae("heading-1", Fc);
|
|
184
|
+
const Wc = [
|
|
185
185
|
["path", { d: "M4 12h8", key: "17cfdx" }],
|
|
186
186
|
["path", { d: "M4 18V6", key: "1rz3zl" }],
|
|
187
187
|
["path", { d: "M12 18V6", key: "zqpxq5" }],
|
|
188
188
|
["path", { d: "M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1", key: "9jr5yi" }]
|
|
189
|
-
],
|
|
190
|
-
const
|
|
189
|
+
], zc = ae("heading-2", Wc);
|
|
190
|
+
const Bc = [
|
|
191
191
|
["path", { d: "M4 12h8", key: "17cfdx" }],
|
|
192
192
|
["path", { d: "M4 18V6", key: "1rz3zl" }],
|
|
193
193
|
["path", { d: "M12 18V6", key: "zqpxq5" }],
|
|
194
194
|
["path", { d: "M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2", key: "68ncm8" }],
|
|
195
195
|
["path", { d: "M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2", key: "1ejuhz" }]
|
|
196
|
-
],
|
|
197
|
-
const
|
|
196
|
+
], Hc = ae("heading-3", Bc);
|
|
197
|
+
const Uc = [
|
|
198
198
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
199
199
|
["path", { d: "M12 16v-4", key: "1dtifu" }],
|
|
200
200
|
["path", { d: "M12 8h.01", key: "e9boi3" }]
|
|
201
|
-
],
|
|
201
|
+
], jc = ae("info", Uc);
|
|
202
202
|
const Vc = [
|
|
203
203
|
["line", { x1: "19", x2: "10", y1: "4", y2: "4", key: "15jd3p" }],
|
|
204
204
|
["line", { x1: "14", x2: "5", y1: "20", y2: "20", key: "bu0au3" }],
|
|
205
205
|
["line", { x1: "15", x2: "9", y1: "4", y2: "20", key: "uljnxc" }]
|
|
206
|
-
],
|
|
207
|
-
const
|
|
206
|
+
], Gc = ae("italic", Vc);
|
|
207
|
+
const Yc = [
|
|
208
208
|
["path", { d: "M11 5h10", key: "1cz7ny" }],
|
|
209
209
|
["path", { d: "M11 12h10", key: "1438ji" }],
|
|
210
210
|
["path", { d: "M11 19h10", key: "11t30w" }],
|
|
211
211
|
["path", { d: "M4 4h1v5", key: "10yrso" }],
|
|
212
212
|
["path", { d: "M4 9h2", key: "r1h2o0" }],
|
|
213
213
|
["path", { d: "M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02", key: "xtkcd5" }]
|
|
214
|
-
],
|
|
215
|
-
const
|
|
214
|
+
], qc = ae("list-ordered", Yc);
|
|
215
|
+
const Kc = [
|
|
216
216
|
["path", { d: "M3 5h.01", key: "18ugdj" }],
|
|
217
217
|
["path", { d: "M3 12h.01", key: "nlz23k" }],
|
|
218
218
|
["path", { d: "M3 19h.01", key: "noohij" }],
|
|
219
219
|
["path", { d: "M8 5h13", key: "1pao27" }],
|
|
220
220
|
["path", { d: "M8 12h13", key: "1za7za" }],
|
|
221
221
|
["path", { d: "M8 19h13", key: "m83p4d" }]
|
|
222
|
-
],
|
|
223
|
-
const
|
|
222
|
+
], Xc = ae("list", Kc);
|
|
223
|
+
const Qc = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], Oa = ae("loader-circle", Qc);
|
|
224
224
|
const Zc = [
|
|
225
225
|
["path", { d: "M14 14a2 2 0 0 0 2-2V8h-2", key: "1r06pg" }],
|
|
226
226
|
[
|
|
@@ -267,10 +267,10 @@ function dl({
|
|
|
267
267
|
apiClient: s,
|
|
268
268
|
...i
|
|
269
269
|
}) {
|
|
270
|
-
const c = a, l = e.selectMode !== "multiple", [d, m] =
|
|
270
|
+
const c = a, l = e.selectMode !== "multiple", [d, m] = le([]), [g, p] = le(!1), [w, h] = le(!1), [v, k] = le(""), [C, E] = le(-1), [y, T] = le({}), D = Yt(null), _ = Yt(null), P = Yt(null), z = t[e.name], H = sr(() => z ? (Array.isArray(z) ? z : [z]).map((S) => {
|
|
271
271
|
const W = d.find((Y) => Y.value === S);
|
|
272
|
-
return W || (
|
|
273
|
-
}) : [], [z, d,
|
|
272
|
+
return W || (y[S] ? y[S] : { value: S, label: S });
|
|
273
|
+
}) : [], [z, d, y])(), G = sr(
|
|
274
274
|
async (A = "") => {
|
|
275
275
|
if (e.onSearch) {
|
|
276
276
|
const S = await e.onSearch(A, t);
|
|
@@ -291,7 +291,7 @@ function dl({
|
|
|
291
291
|
}
|
|
292
292
|
p(!0);
|
|
293
293
|
try {
|
|
294
|
-
const S = e.searchParam || "search", W = e.optionsUrl.includes("?") ? "&" : "?", Y = `${e.optionsUrl}${W}${S}=${encodeURIComponent(A)}`,
|
|
294
|
+
const S = e.searchParam || "search", W = e.optionsUrl.includes("?") ? "&" : "?", Y = `${e.optionsUrl}${W}${S}=${encodeURIComponent(A)}`, j = await s(Y), ve = j.data || j, q = Array.isArray(ve) ? ve : [];
|
|
295
295
|
m(
|
|
296
296
|
q.map((ee) => ({
|
|
297
297
|
value: ee[e.valueId || "value"] || ee.value || ee.id,
|
|
@@ -316,7 +316,7 @@ function dl({
|
|
|
316
316
|
const W = Array.isArray(z) ? z : [];
|
|
317
317
|
S = W.includes(A.value) ? W.filter((Y) => Y !== A.value) : [...W, A.value];
|
|
318
318
|
}
|
|
319
|
-
n(e.name, S), r(e.name), e.clearSearchOnSelect &&
|
|
319
|
+
n(e.name, S), r(e.name), e.clearSearchOnSelect && k("");
|
|
320
320
|
},
|
|
321
321
|
[
|
|
322
322
|
z,
|
|
@@ -330,12 +330,12 @@ function dl({
|
|
|
330
330
|
if (!c)
|
|
331
331
|
switch (A.key) {
|
|
332
332
|
case "ArrowDown":
|
|
333
|
-
A.preventDefault(), w ?
|
|
333
|
+
A.preventDefault(), w ? E(
|
|
334
334
|
(S) => S < d.length - 1 ? S + 1 : S
|
|
335
335
|
) : h(!0);
|
|
336
336
|
break;
|
|
337
337
|
case "ArrowUp":
|
|
338
|
-
A.preventDefault(), w &&
|
|
338
|
+
A.preventDefault(), w && E((S) => S > 0 ? S - 1 : 0);
|
|
339
339
|
break;
|
|
340
340
|
case "Enter":
|
|
341
341
|
A.preventDefault(), w && C >= 0 && d[C] ? x(d[C]) : w || h(!0);
|
|
@@ -349,16 +349,16 @@ function dl({
|
|
|
349
349
|
}
|
|
350
350
|
}, R = (A) => {
|
|
351
351
|
const S = A.target.value;
|
|
352
|
-
|
|
352
|
+
k(S), E(-1), P.current && clearTimeout(P.current), P.current = setTimeout(() => G(S), 300);
|
|
353
353
|
};
|
|
354
|
-
|
|
354
|
+
qe(() => {
|
|
355
355
|
if (w) {
|
|
356
|
-
G(
|
|
356
|
+
G(v);
|
|
357
357
|
const A = setTimeout(() => _.current?.focus(), 50);
|
|
358
358
|
return () => clearTimeout(A);
|
|
359
359
|
} else
|
|
360
|
-
|
|
361
|
-
}, [w, G,
|
|
360
|
+
E(-1);
|
|
361
|
+
}, [w, G, v]), qe(() => {
|
|
362
362
|
const A = (S) => {
|
|
363
363
|
D.current && !D.current.contains(S.target) && (h(!1), r(e.name));
|
|
364
364
|
};
|
|
@@ -366,7 +366,7 @@ function dl({
|
|
|
366
366
|
}, [e.name, r]);
|
|
367
367
|
const O = (A, S) => {
|
|
368
368
|
A.stopPropagation();
|
|
369
|
-
const W = Array.isArray(z) ? z : [], Y = l ? null : W.filter((
|
|
369
|
+
const W = Array.isArray(z) ? z : [], Y = l ? null : W.filter((j) => j !== S);
|
|
370
370
|
n(e.name, Y), r(e.name);
|
|
371
371
|
};
|
|
372
372
|
return /* @__PURE__ */ I(
|
|
@@ -414,7 +414,7 @@ function dl({
|
|
|
414
414
|
A.value
|
|
415
415
|
)) : /* @__PURE__ */ u("span", { className: "text-muted-foreground text-sm leading-tight", children: e.placeholder || "Select..." }),
|
|
416
416
|
/* @__PURE__ */ I("div", { className: "ml-auto flex items-center gap-2", children: [
|
|
417
|
-
g && /* @__PURE__ */ u(
|
|
417
|
+
g && /* @__PURE__ */ u(Oa, { className: "w-4 h-4 animate-spin text-muted-foreground" }),
|
|
418
418
|
/* @__PURE__ */ u(
|
|
419
419
|
Mn,
|
|
420
420
|
{
|
|
@@ -436,7 +436,7 @@ function dl({
|
|
|
436
436
|
"aria-autocomplete": "list",
|
|
437
437
|
"aria-controls": `${e.name}-listbox`,
|
|
438
438
|
"aria-activedescendant": C >= 0 ? `${e.name}-opt-${C}` : void 0,
|
|
439
|
-
value:
|
|
439
|
+
value: v,
|
|
440
440
|
onChange: R,
|
|
441
441
|
onKeyDown: N,
|
|
442
442
|
className: "w-full h-9 pl-9 pr-3 text-sm bg-transparent border border-input rounded-md focus:outline-none focus:ring-1 focus:ring-ring",
|
|
@@ -453,7 +453,7 @@ function dl({
|
|
|
453
453
|
className: "max-h-60 overflow-y-auto p-1",
|
|
454
454
|
children: d.length > 0 ? d.map((A, S) => {
|
|
455
455
|
const W = H.some(
|
|
456
|
-
(
|
|
456
|
+
(j) => j.value === A.value
|
|
457
457
|
), Y = S === C;
|
|
458
458
|
return /* @__PURE__ */ I(
|
|
459
459
|
"div",
|
|
@@ -463,8 +463,8 @@ function dl({
|
|
|
463
463
|
tabIndex: -1,
|
|
464
464
|
"aria-selected": W,
|
|
465
465
|
onClick: () => x(A),
|
|
466
|
-
onKeyDown: (
|
|
467
|
-
onMouseEnter: () =>
|
|
466
|
+
onKeyDown: (j) => j.key === "Enter" && x(A),
|
|
467
|
+
onMouseEnter: () => E(S),
|
|
468
468
|
className: `
|
|
469
469
|
px-3 py-2 text-sm rounded-md cursor-pointer flex items-center justify-between transition-colors outline-none
|
|
470
470
|
${Y ? "bg-accent text-accent-foreground" : ""}
|
|
@@ -473,7 +473,7 @@ function dl({
|
|
|
473
473
|
`,
|
|
474
474
|
children: [
|
|
475
475
|
/* @__PURE__ */ u("span", { children: A.label }),
|
|
476
|
-
W && /* @__PURE__ */ u(
|
|
476
|
+
W && /* @__PURE__ */ u(Cc, { className: "w-4 h-4 text-primary" })
|
|
477
477
|
]
|
|
478
478
|
},
|
|
479
479
|
A.value
|
|
@@ -501,8 +501,8 @@ function ht(e, t = []) {
|
|
|
501
501
|
const i = f.createContext(s), c = n.length;
|
|
502
502
|
n = [...n, s];
|
|
503
503
|
const l = (m) => {
|
|
504
|
-
const { scope: g, children: p, ...w } = m, h = g?.[e]?.[c] || i,
|
|
505
|
-
return /* @__PURE__ */ u(h.Provider, { value:
|
|
504
|
+
const { scope: g, children: p, ...w } = m, h = g?.[e]?.[c] || i, v = f.useMemo(() => w, Object.values(w));
|
|
505
|
+
return /* @__PURE__ */ u(h.Provider, { value: v, children: p });
|
|
506
506
|
};
|
|
507
507
|
l.displayName = a + "Provider";
|
|
508
508
|
function d(m, g) {
|
|
@@ -610,39 +610,39 @@ function bl(e) {
|
|
|
610
610
|
let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
611
611
|
return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
612
612
|
}
|
|
613
|
-
function
|
|
613
|
+
function _a(e) {
|
|
614
614
|
const t = e + "CollectionProvider", [n, r] = ht(t), [o, a] = n(
|
|
615
615
|
t,
|
|
616
616
|
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
617
617
|
), s = (h) => {
|
|
618
|
-
const { scope:
|
|
619
|
-
return /* @__PURE__ */ u(o, { scope:
|
|
618
|
+
const { scope: v, children: k } = h, C = Te.useRef(null), E = Te.useRef(/* @__PURE__ */ new Map()).current;
|
|
619
|
+
return /* @__PURE__ */ u(o, { scope: v, itemMap: E, collectionRef: C, children: k });
|
|
620
620
|
};
|
|
621
621
|
s.displayName = t;
|
|
622
622
|
const i = e + "CollectionSlot", c = /* @__PURE__ */ Ce(i), l = Te.forwardRef(
|
|
623
|
-
(h,
|
|
624
|
-
const { scope:
|
|
625
|
-
return /* @__PURE__ */ u(c, { ref:
|
|
623
|
+
(h, v) => {
|
|
624
|
+
const { scope: k, children: C } = h, E = a(i, k), y = ie(v, E.collectionRef);
|
|
625
|
+
return /* @__PURE__ */ u(c, { ref: y, children: C });
|
|
626
626
|
}
|
|
627
627
|
);
|
|
628
628
|
l.displayName = i;
|
|
629
629
|
const d = e + "CollectionItemSlot", m = "data-radix-collection-item", g = /* @__PURE__ */ Ce(d), p = Te.forwardRef(
|
|
630
|
-
(h,
|
|
631
|
-
const { scope:
|
|
632
|
-
return Te.useEffect(() => (D.itemMap.set(
|
|
630
|
+
(h, v) => {
|
|
631
|
+
const { scope: k, children: C, ...E } = h, y = Te.useRef(null), T = ie(v, y), D = a(d, k);
|
|
632
|
+
return Te.useEffect(() => (D.itemMap.set(y, { ref: y, ...E }), () => void D.itemMap.delete(y))), /* @__PURE__ */ u(g, { [m]: "", ref: T, children: C });
|
|
633
633
|
}
|
|
634
634
|
);
|
|
635
635
|
p.displayName = d;
|
|
636
636
|
function w(h) {
|
|
637
|
-
const
|
|
637
|
+
const v = a(e + "CollectionConsumer", h);
|
|
638
638
|
return Te.useCallback(() => {
|
|
639
|
-
const C =
|
|
639
|
+
const C = v.collectionRef.current;
|
|
640
640
|
if (!C) return [];
|
|
641
|
-
const
|
|
642
|
-
return Array.from(
|
|
643
|
-
(D, _) =>
|
|
641
|
+
const E = Array.from(C.querySelectorAll(`[${m}]`));
|
|
642
|
+
return Array.from(v.itemMap.values()).sort(
|
|
643
|
+
(D, _) => E.indexOf(D.ref.current) - E.indexOf(_.ref.current)
|
|
644
644
|
);
|
|
645
|
-
}, [
|
|
645
|
+
}, [v.collectionRef, v.itemMap]);
|
|
646
646
|
}
|
|
647
647
|
return [
|
|
648
648
|
{ Provider: s, Slot: l, ItemSlot: p },
|
|
@@ -673,7 +673,7 @@ var yl = [
|
|
|
673
673
|
"span",
|
|
674
674
|
"svg",
|
|
675
675
|
"ul"
|
|
676
|
-
],
|
|
676
|
+
], Ma = yl.reduce((e, t) => {
|
|
677
677
|
const n = /* @__PURE__ */ Ce(`Primitive.${t}`), r = f.forwardRef((o, a) => {
|
|
678
678
|
const { asChild: s, ...i } = o, c = s ? n : t;
|
|
679
679
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ u(c, { ...i, ref: a });
|
|
@@ -698,7 +698,7 @@ function xl(e, t = globalThis?.document) {
|
|
|
698
698
|
return t.addEventListener("keydown", r, { capture: !0 }), () => t.removeEventListener("keydown", r, { capture: !0 });
|
|
699
699
|
}, [n, t]);
|
|
700
700
|
}
|
|
701
|
-
var Sl = "DismissableLayer", Pr = "dismissableLayer.update", Cl = "dismissableLayer.pointerDownOutside", El = "dismissableLayer.focusOutside", Mo,
|
|
701
|
+
var Sl = "DismissableLayer", Pr = "dismissableLayer.update", Cl = "dismissableLayer.pointerDownOutside", El = "dismissableLayer.focusOutside", Mo, Ia = f.createContext({
|
|
702
702
|
layers: /* @__PURE__ */ new Set(),
|
|
703
703
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
704
704
|
branches: /* @__PURE__ */ new Set()
|
|
@@ -712,12 +712,12 @@ var Sl = "DismissableLayer", Pr = "dismissableLayer.update", Cl = "dismissableLa
|
|
|
712
712
|
onInteractOutside: s,
|
|
713
713
|
onDismiss: i,
|
|
714
714
|
...c
|
|
715
|
-
} = e, l = f.useContext(
|
|
716
|
-
const P = _.target, z = [...l.branches].some((
|
|
717
|
-
!
|
|
715
|
+
} = e, l = f.useContext(Ia), [d, m] = f.useState(null), g = d?.ownerDocument ?? globalThis?.document, [, p] = f.useState({}), w = ie(t, (_) => m(_)), h = Array.from(l.layers), [v] = [...l.layersWithOutsidePointerEventsDisabled].slice(-1), k = h.indexOf(v), C = d ? h.indexOf(d) : -1, E = l.layersWithOutsidePointerEventsDisabled.size > 0, y = C >= k, T = Nl((_) => {
|
|
716
|
+
const P = _.target, z = [...l.branches].some((V) => V.contains(P));
|
|
717
|
+
!y || z || (o?.(_), s?.(_), _.defaultPrevented || i?.());
|
|
718
718
|
}, g), D = Tl((_) => {
|
|
719
719
|
const P = _.target;
|
|
720
|
-
[...l.branches].some((
|
|
720
|
+
[...l.branches].some((V) => V.contains(P)) || (a?.(_), s?.(_), _.defaultPrevented || i?.());
|
|
721
721
|
}, g);
|
|
722
722
|
return xl((_) => {
|
|
723
723
|
C === l.layers.size - 1 && (r?.(_), !_.defaultPrevented && i && (_.preventDefault(), i()));
|
|
@@ -732,12 +732,12 @@ var Sl = "DismissableLayer", Pr = "dismissableLayer.update", Cl = "dismissableLa
|
|
|
732
732
|
const _ = () => p({});
|
|
733
733
|
return document.addEventListener(Pr, _), () => document.removeEventListener(Pr, _);
|
|
734
734
|
}, []), /* @__PURE__ */ u(
|
|
735
|
-
|
|
735
|
+
Ma.div,
|
|
736
736
|
{
|
|
737
737
|
...c,
|
|
738
738
|
ref: w,
|
|
739
739
|
style: {
|
|
740
|
-
pointerEvents:
|
|
740
|
+
pointerEvents: E ? y ? "auto" : "none" : void 0,
|
|
741
741
|
...e.style
|
|
742
742
|
},
|
|
743
743
|
onFocusCapture: Z(e.onFocusCapture, D.onFocusCapture),
|
|
@@ -752,14 +752,14 @@ var Sl = "DismissableLayer", Pr = "dismissableLayer.update", Cl = "dismissableLa
|
|
|
752
752
|
);
|
|
753
753
|
Kr.displayName = Sl;
|
|
754
754
|
var kl = "DismissableLayerBranch", Al = f.forwardRef((e, t) => {
|
|
755
|
-
const n = f.useContext(
|
|
755
|
+
const n = f.useContext(Ia), r = f.useRef(null), o = ie(t, r);
|
|
756
756
|
return f.useEffect(() => {
|
|
757
757
|
const a = r.current;
|
|
758
758
|
if (a)
|
|
759
759
|
return n.branches.add(a), () => {
|
|
760
760
|
n.branches.delete(a);
|
|
761
761
|
};
|
|
762
|
-
}, [n.branches]), /* @__PURE__ */ u(
|
|
762
|
+
}, [n.branches]), /* @__PURE__ */ u(Ma.div, { ...e, ref: o });
|
|
763
763
|
});
|
|
764
764
|
Al.displayName = kl;
|
|
765
765
|
function Nl(e, t = globalThis?.document) {
|
|
@@ -769,7 +769,7 @@ function Nl(e, t = globalThis?.document) {
|
|
|
769
769
|
const a = (i) => {
|
|
770
770
|
if (i.target && !r.current) {
|
|
771
771
|
let c = function() {
|
|
772
|
-
|
|
772
|
+
Da(
|
|
773
773
|
Cl,
|
|
774
774
|
n,
|
|
775
775
|
l,
|
|
@@ -796,7 +796,7 @@ function Tl(e, t = globalThis?.document) {
|
|
|
796
796
|
const n = et(e), r = f.useRef(!1);
|
|
797
797
|
return f.useEffect(() => {
|
|
798
798
|
const o = (a) => {
|
|
799
|
-
a.target && !r.current &&
|
|
799
|
+
a.target && !r.current && Da(El, n, { originalEvent: a }, {
|
|
800
800
|
discrete: !1
|
|
801
801
|
});
|
|
802
802
|
};
|
|
@@ -810,12 +810,12 @@ function Io() {
|
|
|
810
810
|
const e = new CustomEvent(Pr);
|
|
811
811
|
document.dispatchEvent(e);
|
|
812
812
|
}
|
|
813
|
-
function
|
|
813
|
+
function Da(e, t, n, { discrete: r }) {
|
|
814
814
|
const o = n.originalEvent.target, a = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
|
|
815
815
|
t && o.addEventListener(e, t, { once: !0 }), r ? wl(o, a) : o.dispatchEvent(a);
|
|
816
816
|
}
|
|
817
817
|
var cr = 0;
|
|
818
|
-
function
|
|
818
|
+
function La() {
|
|
819
819
|
f.useEffect(() => {
|
|
820
820
|
const e = document.querySelectorAll("[data-radix-focus-guard]");
|
|
821
821
|
return document.body.insertAdjacentElement("afterbegin", e[0] ?? Do()), document.body.insertAdjacentElement("beforeend", e[1] ?? Do()), cr++, () => {
|
|
@@ -869,23 +869,23 @@ var Pl = [
|
|
|
869
869
|
}).current;
|
|
870
870
|
f.useEffect(() => {
|
|
871
871
|
if (r) {
|
|
872
|
-
let h = function(
|
|
872
|
+
let h = function(E) {
|
|
873
873
|
if (p.paused || !i) return;
|
|
874
|
-
const
|
|
875
|
-
i.contains(
|
|
876
|
-
},
|
|
874
|
+
const y = E.target;
|
|
875
|
+
i.contains(y) ? m.current = y : Je(m.current, { select: !0 });
|
|
876
|
+
}, v = function(E) {
|
|
877
877
|
if (p.paused || !i) return;
|
|
878
|
-
const
|
|
879
|
-
|
|
880
|
-
},
|
|
878
|
+
const y = E.relatedTarget;
|
|
879
|
+
y !== null && (i.contains(y) || Je(m.current, { select: !0 }));
|
|
880
|
+
}, k = function(E) {
|
|
881
881
|
if (document.activeElement === document.body)
|
|
882
|
-
for (const T of
|
|
883
|
-
T.removedNodes.length > 0 &&
|
|
882
|
+
for (const T of E)
|
|
883
|
+
T.removedNodes.length > 0 && Je(i);
|
|
884
884
|
};
|
|
885
|
-
document.addEventListener("focusin", h), document.addEventListener("focusout",
|
|
886
|
-
const C = new MutationObserver(
|
|
885
|
+
document.addEventListener("focusin", h), document.addEventListener("focusout", v);
|
|
886
|
+
const C = new MutationObserver(k);
|
|
887
887
|
return i && C.observe(i, { childList: !0, subtree: !0 }), () => {
|
|
888
|
-
document.removeEventListener("focusin", h), document.removeEventListener("focusout",
|
|
888
|
+
document.removeEventListener("focusin", h), document.removeEventListener("focusout", v), C.disconnect();
|
|
889
889
|
};
|
|
890
890
|
}
|
|
891
891
|
}, [r, i, p.paused]), f.useEffect(() => {
|
|
@@ -893,13 +893,13 @@ var Pl = [
|
|
|
893
893
|
$o.add(p);
|
|
894
894
|
const h = document.activeElement;
|
|
895
895
|
if (!i.contains(h)) {
|
|
896
|
-
const
|
|
897
|
-
i.addEventListener(lr, l), i.dispatchEvent(
|
|
896
|
+
const k = new CustomEvent(lr, Lo);
|
|
897
|
+
i.addEventListener(lr, l), i.dispatchEvent(k), k.defaultPrevented || (_l(Fl(Fa(i)), { select: !0 }), document.activeElement === h && Je(i));
|
|
898
898
|
}
|
|
899
899
|
return () => {
|
|
900
900
|
i.removeEventListener(lr, l), setTimeout(() => {
|
|
901
|
-
const
|
|
902
|
-
i.addEventListener(ur, d), i.dispatchEvent(
|
|
901
|
+
const k = new CustomEvent(ur, Lo);
|
|
902
|
+
i.addEventListener(ur, d), i.dispatchEvent(k), k.defaultPrevented || Je(h ?? document.body, { select: !0 }), i.removeEventListener(ur, d), $o.remove(p);
|
|
903
903
|
}, 0);
|
|
904
904
|
};
|
|
905
905
|
}
|
|
@@ -907,10 +907,10 @@ var Pl = [
|
|
|
907
907
|
const w = f.useCallback(
|
|
908
908
|
(h) => {
|
|
909
909
|
if (!n && !r || p.paused) return;
|
|
910
|
-
const
|
|
911
|
-
if (
|
|
912
|
-
const C = h.currentTarget, [
|
|
913
|
-
|
|
910
|
+
const v = h.key === "Tab" && !h.altKey && !h.ctrlKey && !h.metaKey, k = document.activeElement;
|
|
911
|
+
if (v && k) {
|
|
912
|
+
const C = h.currentTarget, [E, y] = Ml(C);
|
|
913
|
+
E && y ? !h.shiftKey && k === y ? (h.preventDefault(), n && Je(E, { select: !0 })) : h.shiftKey && k === E && (h.preventDefault(), n && Je(y, { select: !0 })) : k === C && h.preventDefault();
|
|
914
914
|
}
|
|
915
915
|
},
|
|
916
916
|
[n, r, p.paused]
|
|
@@ -921,13 +921,13 @@ Xr.displayName = Ol;
|
|
|
921
921
|
function _l(e, { select: t = !1 } = {}) {
|
|
922
922
|
const n = document.activeElement;
|
|
923
923
|
for (const r of e)
|
|
924
|
-
if (
|
|
924
|
+
if (Je(r, { select: t }), document.activeElement !== n) return;
|
|
925
925
|
}
|
|
926
926
|
function Ml(e) {
|
|
927
|
-
const t =
|
|
927
|
+
const t = Fa(e), n = Fo(t, e), r = Fo(t.reverse(), e);
|
|
928
928
|
return [n, r];
|
|
929
929
|
}
|
|
930
|
-
function
|
|
930
|
+
function Fa(e) {
|
|
931
931
|
const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
932
932
|
acceptNode: (r) => {
|
|
933
933
|
const o = r.tagName === "INPUT" && r.type === "hidden";
|
|
@@ -953,7 +953,7 @@ function Il(e, { upTo: t }) {
|
|
|
953
953
|
function Dl(e) {
|
|
954
954
|
return e instanceof HTMLInputElement && "select" in e;
|
|
955
955
|
}
|
|
956
|
-
function
|
|
956
|
+
function Je(e, { select: t = !1 } = {}) {
|
|
957
957
|
if (e && e.focus) {
|
|
958
958
|
const n = document.activeElement;
|
|
959
959
|
e.focus({ preventScroll: !0 }), e !== n && Dl(e) && t && e.select();
|
|
@@ -1003,10 +1003,10 @@ const zl = ["top", "right", "bottom", "left"], tt = Math.min, Ee = Math.max, En
|
|
|
1003
1003
|
function Rr(e, t, n) {
|
|
1004
1004
|
return Ee(e, tt(t, n));
|
|
1005
1005
|
}
|
|
1006
|
-
function
|
|
1006
|
+
function Ke(e, t) {
|
|
1007
1007
|
return typeof e == "function" ? e(t) : e;
|
|
1008
1008
|
}
|
|
1009
|
-
function
|
|
1009
|
+
function Xe(e) {
|
|
1010
1010
|
return e.split("-")[0];
|
|
1011
1011
|
}
|
|
1012
1012
|
function Ot(e) {
|
|
@@ -1020,18 +1020,18 @@ function Zr(e) {
|
|
|
1020
1020
|
}
|
|
1021
1021
|
const Ul = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
1022
1022
|
function ze(e) {
|
|
1023
|
-
return Ul.has(
|
|
1023
|
+
return Ul.has(Xe(e)) ? "y" : "x";
|
|
1024
1024
|
}
|
|
1025
1025
|
function Jr(e) {
|
|
1026
1026
|
return Qr(ze(e));
|
|
1027
1027
|
}
|
|
1028
|
-
function
|
|
1028
|
+
function jl(e, t, n) {
|
|
1029
1029
|
n === void 0 && (n = !1);
|
|
1030
1030
|
const r = Ot(e), o = Jr(e), a = Zr(o);
|
|
1031
1031
|
let s = o === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
1032
1032
|
return t.reference[a] > t.floating[a] && (s = kn(s)), [s, kn(s)];
|
|
1033
1033
|
}
|
|
1034
|
-
function
|
|
1034
|
+
function Vl(e) {
|
|
1035
1035
|
const t = kn(e);
|
|
1036
1036
|
return [Or(e), t, Or(t)];
|
|
1037
1037
|
}
|
|
@@ -1053,7 +1053,7 @@ function ql(e, t, n) {
|
|
|
1053
1053
|
}
|
|
1054
1054
|
function Kl(e, t, n, r) {
|
|
1055
1055
|
const o = Ot(e);
|
|
1056
|
-
let a = ql(
|
|
1056
|
+
let a = ql(Xe(e), n === "start", r);
|
|
1057
1057
|
return o && (a = a.map((s) => s + "-" + o), t && (a = a.concat(a.map(Or)))), a;
|
|
1058
1058
|
}
|
|
1059
1059
|
function kn(e) {
|
|
@@ -1068,7 +1068,7 @@ function Xl(e) {
|
|
|
1068
1068
|
...e
|
|
1069
1069
|
};
|
|
1070
1070
|
}
|
|
1071
|
-
function
|
|
1071
|
+
function $a(e) {
|
|
1072
1072
|
return typeof e != "number" ? Xl(e) : {
|
|
1073
1073
|
top: e,
|
|
1074
1074
|
right: e,
|
|
@@ -1099,7 +1099,7 @@ function Ho(e, t, n) {
|
|
|
1099
1099
|
reference: r,
|
|
1100
1100
|
floating: o
|
|
1101
1101
|
} = e;
|
|
1102
|
-
const a = ze(t), s = Jr(t), i = Zr(s), c =
|
|
1102
|
+
const a = ze(t), s = Jr(t), i = Zr(s), c = Xe(t), l = a === "y", d = r.x + r.width / 2 - o.width / 2, m = r.y + r.height / 2 - o.height / 2, g = r[i] / 2 - o[i] / 2;
|
|
1103
1103
|
let p;
|
|
1104
1104
|
switch (c) {
|
|
1105
1105
|
case "top":
|
|
@@ -1159,14 +1159,14 @@ const Ql = async (e, t, n) => {
|
|
|
1159
1159
|
} = Ho(l, r, c), g = r, p = {}, w = 0;
|
|
1160
1160
|
for (let h = 0; h < i.length; h++) {
|
|
1161
1161
|
const {
|
|
1162
|
-
name:
|
|
1163
|
-
fn:
|
|
1162
|
+
name: v,
|
|
1163
|
+
fn: k
|
|
1164
1164
|
} = i[h], {
|
|
1165
1165
|
x: C,
|
|
1166
|
-
y:
|
|
1167
|
-
data:
|
|
1166
|
+
y: E,
|
|
1167
|
+
data: y,
|
|
1168
1168
|
reset: T
|
|
1169
|
-
} = await
|
|
1169
|
+
} = await k({
|
|
1170
1170
|
x: d,
|
|
1171
1171
|
y: m,
|
|
1172
1172
|
initialPlacement: r,
|
|
@@ -1180,11 +1180,11 @@ const Ql = async (e, t, n) => {
|
|
|
1180
1180
|
floating: t
|
|
1181
1181
|
}
|
|
1182
1182
|
});
|
|
1183
|
-
d = C ?? d, m =
|
|
1183
|
+
d = C ?? d, m = E ?? m, p = {
|
|
1184
1184
|
...p,
|
|
1185
|
-
[
|
|
1186
|
-
...p[
|
|
1187
|
-
...
|
|
1185
|
+
[v]: {
|
|
1186
|
+
...p[v],
|
|
1187
|
+
...y
|
|
1188
1188
|
}
|
|
1189
1189
|
}, T && w <= 50 && (w++, typeof T == "object" && (T.placement && (g = T.placement), T.rects && (l = T.rects === !0 ? await s.getElementRects({
|
|
1190
1190
|
reference: e,
|
|
@@ -1219,8 +1219,8 @@ async function qt(e, t) {
|
|
|
1219
1219
|
elementContext: m = "floating",
|
|
1220
1220
|
altBoundary: g = !1,
|
|
1221
1221
|
padding: p = 0
|
|
1222
|
-
} =
|
|
1223
|
-
element: (n = await (a.isElement == null ? void 0 : a.isElement(
|
|
1222
|
+
} = Ke(t, e), w = $a(p), v = i[g ? m === "floating" ? "reference" : "floating" : m], k = An(await a.getClippingRect({
|
|
1223
|
+
element: (n = await (a.isElement == null ? void 0 : a.isElement(v))) == null || n ? v : v.contextElement || await (a.getDocumentElement == null ? void 0 : a.getDocumentElement(i.floating)),
|
|
1224
1224
|
boundary: l,
|
|
1225
1225
|
rootBoundary: d,
|
|
1226
1226
|
strategy: c
|
|
@@ -1229,7 +1229,7 @@ async function qt(e, t) {
|
|
|
1229
1229
|
y: o,
|
|
1230
1230
|
width: s.floating.width,
|
|
1231
1231
|
height: s.floating.height
|
|
1232
|
-
} : s.reference,
|
|
1232
|
+
} : s.reference, E = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(i.floating)), y = await (a.isElement == null ? void 0 : a.isElement(E)) ? await (a.getScale == null ? void 0 : a.getScale(E)) || {
|
|
1233
1233
|
x: 1,
|
|
1234
1234
|
y: 1
|
|
1235
1235
|
} : {
|
|
@@ -1238,14 +1238,14 @@ async function qt(e, t) {
|
|
|
1238
1238
|
}, T = An(a.convertOffsetParentRelativeRectToViewportRelativeRect ? await a.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
1239
1239
|
elements: i,
|
|
1240
1240
|
rect: C,
|
|
1241
|
-
offsetParent:
|
|
1241
|
+
offsetParent: E,
|
|
1242
1242
|
strategy: c
|
|
1243
1243
|
}) : C);
|
|
1244
1244
|
return {
|
|
1245
|
-
top: (
|
|
1246
|
-
bottom: (T.bottom -
|
|
1247
|
-
left: (
|
|
1248
|
-
right: (T.right -
|
|
1245
|
+
top: (k.top - T.top + w.top) / y.y,
|
|
1246
|
+
bottom: (T.bottom - k.bottom + w.bottom) / y.y,
|
|
1247
|
+
left: (k.left - T.left + w.left) / y.x,
|
|
1248
|
+
right: (T.right - k.right + w.right) / y.x
|
|
1249
1249
|
};
|
|
1250
1250
|
}
|
|
1251
1251
|
const Zl = (e) => ({
|
|
@@ -1263,16 +1263,16 @@ const Zl = (e) => ({
|
|
|
1263
1263
|
} = t, {
|
|
1264
1264
|
element: l,
|
|
1265
1265
|
padding: d = 0
|
|
1266
|
-
} =
|
|
1266
|
+
} = Ke(e, t) || {};
|
|
1267
1267
|
if (l == null)
|
|
1268
1268
|
return {};
|
|
1269
|
-
const m =
|
|
1269
|
+
const m = $a(d), g = {
|
|
1270
1270
|
x: n,
|
|
1271
1271
|
y: r
|
|
1272
|
-
}, p = Jr(o), w = Zr(p), h = await s.getDimensions(l),
|
|
1273
|
-
let _ = D ? D[
|
|
1274
|
-
(!_ || !await (s.isElement == null ? void 0 : s.isElement(D))) && (_ = i.floating[
|
|
1275
|
-
const P =
|
|
1272
|
+
}, p = Jr(o), w = Zr(p), h = await s.getDimensions(l), v = p === "y", k = v ? "top" : "left", C = v ? "bottom" : "right", E = v ? "clientHeight" : "clientWidth", y = a.reference[w] + a.reference[p] - g[p] - a.floating[w], T = g[p] - a.reference[p], D = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l));
|
|
1273
|
+
let _ = D ? D[E] : 0;
|
|
1274
|
+
(!_ || !await (s.isElement == null ? void 0 : s.isElement(D))) && (_ = i.floating[E] || a.floating[w]);
|
|
1275
|
+
const P = y / 2 - T / 2, z = _ / 2 - h[w] / 2 - 1, V = tt(m[k], z), H = tt(m[C], z), G = V, x = _ - h[w] - H, N = _ / 2 - h[w] / 2 + P, R = Rr(G, N, x), O = !c.arrow && Ot(o) != null && N !== R && a.reference[w] / 2 - (N < G ? V : H) - h[w] / 2 < 0, A = O ? N < G ? N - G : N - x : 0;
|
|
1276
1276
|
return {
|
|
1277
1277
|
[p]: g[p] + A,
|
|
1278
1278
|
data: {
|
|
@@ -1305,19 +1305,19 @@ const Zl = (e) => ({
|
|
|
1305
1305
|
fallbackStrategy: p = "bestFit",
|
|
1306
1306
|
fallbackAxisSideDirection: w = "none",
|
|
1307
1307
|
flipAlignment: h = !0,
|
|
1308
|
-
...
|
|
1309
|
-
} =
|
|
1308
|
+
...v
|
|
1309
|
+
} = Ke(e, t);
|
|
1310
1310
|
if ((n = a.arrow) != null && n.alignmentOffset)
|
|
1311
1311
|
return {};
|
|
1312
|
-
const
|
|
1313
|
-
!g && D && T.push(...Kl(i, h, w,
|
|
1314
|
-
const _ = [i, ...T], P = await qt(t,
|
|
1315
|
-
let
|
|
1316
|
-
if (d && z.push(P[
|
|
1317
|
-
const N =
|
|
1312
|
+
const k = Xe(o), C = ze(i), E = Xe(i) === i, y = await (c.isRTL == null ? void 0 : c.isRTL(l.floating)), T = g || (E || !h ? [kn(i)] : Vl(i)), D = w !== "none";
|
|
1313
|
+
!g && D && T.push(...Kl(i, h, w, y));
|
|
1314
|
+
const _ = [i, ...T], P = await qt(t, v), z = [];
|
|
1315
|
+
let V = ((r = a.flip) == null ? void 0 : r.overflows) || [];
|
|
1316
|
+
if (d && z.push(P[k]), m) {
|
|
1317
|
+
const N = jl(o, s, y);
|
|
1318
1318
|
z.push(P[N[0]], P[N[1]]);
|
|
1319
1319
|
}
|
|
1320
|
-
if (
|
|
1320
|
+
if (V = [...V, {
|
|
1321
1321
|
placement: o,
|
|
1322
1322
|
overflows: z
|
|
1323
1323
|
}], !z.every((N) => N <= 0)) {
|
|
@@ -1325,22 +1325,22 @@ const Zl = (e) => ({
|
|
|
1325
1325
|
const N = (((H = a.flip) == null ? void 0 : H.index) || 0) + 1, R = _[N];
|
|
1326
1326
|
if (R && (!(m === "alignment" ? C !== ze(R) : !1) || // We leave the current main axis only if every placement on that axis
|
|
1327
1327
|
// overflows the main axis.
|
|
1328
|
-
|
|
1328
|
+
V.every((S) => ze(S.placement) === C ? S.overflows[0] > 0 : !0)))
|
|
1329
1329
|
return {
|
|
1330
1330
|
data: {
|
|
1331
1331
|
index: N,
|
|
1332
|
-
overflows:
|
|
1332
|
+
overflows: V
|
|
1333
1333
|
},
|
|
1334
1334
|
reset: {
|
|
1335
1335
|
placement: R
|
|
1336
1336
|
}
|
|
1337
1337
|
};
|
|
1338
|
-
let O = (G =
|
|
1338
|
+
let O = (G = V.filter((A) => A.overflows[0] <= 0).sort((A, S) => A.overflows[1] - S.overflows[1])[0]) == null ? void 0 : G.placement;
|
|
1339
1339
|
if (!O)
|
|
1340
1340
|
switch (p) {
|
|
1341
1341
|
case "bestFit": {
|
|
1342
1342
|
var x;
|
|
1343
|
-
const A = (x =
|
|
1343
|
+
const A = (x = V.filter((S) => {
|
|
1344
1344
|
if (D) {
|
|
1345
1345
|
const W = ze(S.placement);
|
|
1346
1346
|
return W === C || // Create a bias to the `y` side axis due to horizontal
|
|
@@ -1375,7 +1375,7 @@ function Uo(e, t) {
|
|
|
1375
1375
|
left: e.left - t.width
|
|
1376
1376
|
};
|
|
1377
1377
|
}
|
|
1378
|
-
function
|
|
1378
|
+
function jo(e) {
|
|
1379
1379
|
return zl.some((t) => e[t] >= 0);
|
|
1380
1380
|
}
|
|
1381
1381
|
const eu = function(e) {
|
|
@@ -1388,7 +1388,7 @@ const eu = function(e) {
|
|
|
1388
1388
|
} = t, {
|
|
1389
1389
|
strategy: r = "referenceHidden",
|
|
1390
1390
|
...o
|
|
1391
|
-
} =
|
|
1391
|
+
} = Ke(e, t);
|
|
1392
1392
|
switch (r) {
|
|
1393
1393
|
case "referenceHidden": {
|
|
1394
1394
|
const a = await qt(t, {
|
|
@@ -1398,7 +1398,7 @@ const eu = function(e) {
|
|
|
1398
1398
|
return {
|
|
1399
1399
|
data: {
|
|
1400
1400
|
referenceHiddenOffsets: s,
|
|
1401
|
-
referenceHidden:
|
|
1401
|
+
referenceHidden: jo(s)
|
|
1402
1402
|
}
|
|
1403
1403
|
};
|
|
1404
1404
|
}
|
|
@@ -1410,7 +1410,7 @@ const eu = function(e) {
|
|
|
1410
1410
|
return {
|
|
1411
1411
|
data: {
|
|
1412
1412
|
escapedOffsets: s,
|
|
1413
|
-
escaped:
|
|
1413
|
+
escaped: jo(s)
|
|
1414
1414
|
}
|
|
1415
1415
|
};
|
|
1416
1416
|
}
|
|
@@ -1419,13 +1419,13 @@ const eu = function(e) {
|
|
|
1419
1419
|
}
|
|
1420
1420
|
}
|
|
1421
1421
|
};
|
|
1422
|
-
},
|
|
1422
|
+
}, Wa = /* @__PURE__ */ new Set(["left", "top"]);
|
|
1423
1423
|
async function tu(e, t) {
|
|
1424
1424
|
const {
|
|
1425
1425
|
placement: n,
|
|
1426
1426
|
platform: r,
|
|
1427
1427
|
elements: o
|
|
1428
|
-
} = e, a = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), s =
|
|
1428
|
+
} = e, a = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), s = Xe(n), i = Ot(n), c = ze(n) === "y", l = Wa.has(s) ? -1 : 1, d = a && c ? -1 : 1, m = Ke(t, e);
|
|
1429
1429
|
let {
|
|
1430
1430
|
mainAxis: g,
|
|
1431
1431
|
crossAxis: p,
|
|
@@ -1482,30 +1482,30 @@ const nu = function(e) {
|
|
|
1482
1482
|
mainAxis: a = !0,
|
|
1483
1483
|
crossAxis: s = !1,
|
|
1484
1484
|
limiter: i = {
|
|
1485
|
-
fn: (
|
|
1485
|
+
fn: (v) => {
|
|
1486
1486
|
let {
|
|
1487
|
-
x:
|
|
1487
|
+
x: k,
|
|
1488
1488
|
y: C
|
|
1489
|
-
} =
|
|
1489
|
+
} = v;
|
|
1490
1490
|
return {
|
|
1491
|
-
x:
|
|
1491
|
+
x: k,
|
|
1492
1492
|
y: C
|
|
1493
1493
|
};
|
|
1494
1494
|
}
|
|
1495
1495
|
},
|
|
1496
1496
|
...c
|
|
1497
|
-
} =
|
|
1497
|
+
} = Ke(e, t), l = {
|
|
1498
1498
|
x: n,
|
|
1499
1499
|
y: r
|
|
1500
|
-
}, d = await qt(t, c), m = ze(
|
|
1500
|
+
}, d = await qt(t, c), m = ze(Xe(o)), g = Qr(m);
|
|
1501
1501
|
let p = l[g], w = l[m];
|
|
1502
1502
|
if (a) {
|
|
1503
|
-
const
|
|
1504
|
-
p = Rr(C, p,
|
|
1503
|
+
const v = g === "y" ? "top" : "left", k = g === "y" ? "bottom" : "right", C = p + d[v], E = p - d[k];
|
|
1504
|
+
p = Rr(C, p, E);
|
|
1505
1505
|
}
|
|
1506
1506
|
if (s) {
|
|
1507
|
-
const
|
|
1508
|
-
w = Rr(C, w,
|
|
1507
|
+
const v = m === "y" ? "top" : "left", k = m === "y" ? "bottom" : "right", C = w + d[v], E = w - d[k];
|
|
1508
|
+
w = Rr(C, w, E);
|
|
1509
1509
|
}
|
|
1510
1510
|
const h = i.fn({
|
|
1511
1511
|
...t,
|
|
@@ -1539,12 +1539,12 @@ const nu = function(e) {
|
|
|
1539
1539
|
offset: i = 0,
|
|
1540
1540
|
mainAxis: c = !0,
|
|
1541
1541
|
crossAxis: l = !0
|
|
1542
|
-
} =
|
|
1542
|
+
} = Ke(e, t), d = {
|
|
1543
1543
|
x: n,
|
|
1544
1544
|
y: r
|
|
1545
1545
|
}, m = ze(o), g = Qr(m);
|
|
1546
1546
|
let p = d[g], w = d[m];
|
|
1547
|
-
const h =
|
|
1547
|
+
const h = Ke(i, t), v = typeof h == "number" ? {
|
|
1548
1548
|
mainAxis: h,
|
|
1549
1549
|
crossAxis: 0
|
|
1550
1550
|
} : {
|
|
@@ -1553,12 +1553,12 @@ const nu = function(e) {
|
|
|
1553
1553
|
...h
|
|
1554
1554
|
};
|
|
1555
1555
|
if (c) {
|
|
1556
|
-
const
|
|
1557
|
-
p <
|
|
1556
|
+
const E = g === "y" ? "height" : "width", y = a.reference[g] - a.floating[E] + v.mainAxis, T = a.reference[g] + a.reference[E] - v.mainAxis;
|
|
1557
|
+
p < y ? p = y : p > T && (p = T);
|
|
1558
1558
|
}
|
|
1559
1559
|
if (l) {
|
|
1560
|
-
var
|
|
1561
|
-
const
|
|
1560
|
+
var k, C;
|
|
1561
|
+
const E = g === "y" ? "width" : "height", y = Wa.has(Xe(o)), T = a.reference[m] - a.floating[E] + (y && ((k = s.offset) == null ? void 0 : k[m]) || 0) + (y ? 0 : v.crossAxis), D = a.reference[m] + a.reference[E] + (y ? 0 : ((C = s.offset) == null ? void 0 : C[m]) || 0) - (y ? v.crossAxis : 0);
|
|
1562
1562
|
w < T ? w = T : w > D && (w = D);
|
|
1563
1563
|
}
|
|
1564
1564
|
return {
|
|
@@ -1582,17 +1582,17 @@ const nu = function(e) {
|
|
|
1582
1582
|
apply: c = () => {
|
|
1583
1583
|
},
|
|
1584
1584
|
...l
|
|
1585
|
-
} =
|
|
1585
|
+
} = Ke(e, t), d = await qt(t, l), m = Xe(o), g = Ot(o), p = ze(o) === "y", {
|
|
1586
1586
|
width: w,
|
|
1587
1587
|
height: h
|
|
1588
1588
|
} = a.floating;
|
|
1589
|
-
let
|
|
1590
|
-
m === "top" || m === "bottom" ? (
|
|
1591
|
-
const C = h - d.top - d.bottom,
|
|
1592
|
-
let _ =
|
|
1593
|
-
if ((n = t.middlewareData.shift) != null && n.enabled.x && (P =
|
|
1594
|
-
const
|
|
1595
|
-
p ? P = w - 2 * (
|
|
1589
|
+
let v, k;
|
|
1590
|
+
m === "top" || m === "bottom" ? (v = m, k = g === (await (s.isRTL == null ? void 0 : s.isRTL(i.floating)) ? "start" : "end") ? "left" : "right") : (k = m, v = g === "end" ? "top" : "bottom");
|
|
1591
|
+
const C = h - d.top - d.bottom, E = w - d.left - d.right, y = tt(h - d[v], C), T = tt(w - d[k], E), D = !t.middlewareData.shift;
|
|
1592
|
+
let _ = y, P = T;
|
|
1593
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && (P = E), (r = t.middlewareData.shift) != null && r.enabled.y && (_ = C), D && !g) {
|
|
1594
|
+
const V = Ee(d.left, 0), H = Ee(d.right, 0), G = Ee(d.top, 0), x = Ee(d.bottom, 0);
|
|
1595
|
+
p ? P = w - 2 * (V !== 0 || H !== 0 ? V + H : Ee(d.left, d.right)) : _ = h - 2 * (G !== 0 || x !== 0 ? G + x : Ee(d.top, d.bottom));
|
|
1596
1596
|
}
|
|
1597
1597
|
await c({
|
|
1598
1598
|
...t,
|
|
@@ -1612,7 +1612,7 @@ function In() {
|
|
|
1612
1612
|
return typeof window < "u";
|
|
1613
1613
|
}
|
|
1614
1614
|
function _t(e) {
|
|
1615
|
-
return
|
|
1615
|
+
return za(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
1616
1616
|
}
|
|
1617
1617
|
function ke(e) {
|
|
1618
1618
|
var t;
|
|
@@ -1620,9 +1620,9 @@ function ke(e) {
|
|
|
1620
1620
|
}
|
|
1621
1621
|
function Ue(e) {
|
|
1622
1622
|
var t;
|
|
1623
|
-
return (t = (
|
|
1623
|
+
return (t = (za(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
1624
1624
|
}
|
|
1625
|
-
function
|
|
1625
|
+
function za(e) {
|
|
1626
1626
|
return In() ? e instanceof Node || e instanceof ke(e).Node : !1;
|
|
1627
1627
|
}
|
|
1628
1628
|
function Me(e) {
|
|
@@ -1631,7 +1631,7 @@ function Me(e) {
|
|
|
1631
1631
|
function He(e) {
|
|
1632
1632
|
return In() ? e instanceof HTMLElement || e instanceof ke(e).HTMLElement : !1;
|
|
1633
1633
|
}
|
|
1634
|
-
function
|
|
1634
|
+
function Vo(e) {
|
|
1635
1635
|
return !In() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof ke(e).ShadowRoot;
|
|
1636
1636
|
}
|
|
1637
1637
|
const su = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
@@ -1700,19 +1700,19 @@ function nt(e) {
|
|
|
1700
1700
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
1701
1701
|
e.assignedSlot || // DOM Element detected.
|
|
1702
1702
|
e.parentNode || // ShadowRoot detected.
|
|
1703
|
-
|
|
1703
|
+
Vo(e) && e.host || // Fallback.
|
|
1704
1704
|
Ue(e)
|
|
1705
1705
|
);
|
|
1706
|
-
return
|
|
1706
|
+
return Vo(t) ? t.host : t;
|
|
1707
1707
|
}
|
|
1708
|
-
function
|
|
1708
|
+
function Ba(e) {
|
|
1709
1709
|
const t = nt(e);
|
|
1710
|
-
return Tt(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : He(t) && Jt(t) ? t :
|
|
1710
|
+
return Tt(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : He(t) && Jt(t) ? t : Ba(t);
|
|
1711
1711
|
}
|
|
1712
1712
|
function Kt(e, t, n) {
|
|
1713
1713
|
var r;
|
|
1714
1714
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
1715
|
-
const o =
|
|
1715
|
+
const o = Ba(e), a = o === ((r = e.ownerDocument) == null ? void 0 : r.body), s = ke(o);
|
|
1716
1716
|
if (a) {
|
|
1717
1717
|
const i = _r(s);
|
|
1718
1718
|
return t.concat(s, s.visualViewport || [], Jt(o) ? o : [], i && n ? Kt(i) : []);
|
|
@@ -1722,7 +1722,7 @@ function Kt(e, t, n) {
|
|
|
1722
1722
|
function _r(e) {
|
|
1723
1723
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
1724
1724
|
}
|
|
1725
|
-
function
|
|
1725
|
+
function Ha(e) {
|
|
1726
1726
|
const t = Ie(e);
|
|
1727
1727
|
let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
|
|
1728
1728
|
const o = He(e), a = o ? e.offsetWidth : n, s = o ? e.offsetHeight : r, i = En(n) !== a || En(r) !== s;
|
|
@@ -1743,7 +1743,7 @@ function At(e) {
|
|
|
1743
1743
|
width: r,
|
|
1744
1744
|
height: o,
|
|
1745
1745
|
$: a
|
|
1746
|
-
} =
|
|
1746
|
+
} = Ha(t);
|
|
1747
1747
|
let s = (a ? En(n.width) : n.width) / r, i = (a ? En(n.height) : n.height) / o;
|
|
1748
1748
|
return (!s || !Number.isFinite(s)) && (s = 1), (!i || !Number.isFinite(i)) && (i = 1), {
|
|
1749
1749
|
x: s,
|
|
@@ -1751,7 +1751,7 @@ function At(e) {
|
|
|
1751
1751
|
};
|
|
1752
1752
|
}
|
|
1753
1753
|
const hu = /* @__PURE__ */ Be(0);
|
|
1754
|
-
function
|
|
1754
|
+
function Ua(e) {
|
|
1755
1755
|
const t = ke(e);
|
|
1756
1756
|
return !to() || !t.visualViewport ? hu : {
|
|
1757
1757
|
x: t.visualViewport.offsetLeft,
|
|
@@ -1766,14 +1766,14 @@ function ft(e, t, n, r) {
|
|
|
1766
1766
|
const o = e.getBoundingClientRect(), a = no(e);
|
|
1767
1767
|
let s = Be(1);
|
|
1768
1768
|
t && (r ? Me(r) && (s = At(r)) : s = At(e));
|
|
1769
|
-
const i = gu(a, n, r) ?
|
|
1769
|
+
const i = gu(a, n, r) ? Ua(a) : Be(0);
|
|
1770
1770
|
let c = (o.left + i.x) / s.x, l = (o.top + i.y) / s.y, d = o.width / s.x, m = o.height / s.y;
|
|
1771
1771
|
if (a) {
|
|
1772
1772
|
const g = ke(a), p = r && Me(r) ? ke(r) : r;
|
|
1773
1773
|
let w = g, h = _r(w);
|
|
1774
1774
|
for (; h && r && p !== w; ) {
|
|
1775
|
-
const
|
|
1776
|
-
c *=
|
|
1775
|
+
const v = At(h), k = h.getBoundingClientRect(), C = Ie(h), E = k.left + (h.clientLeft + parseFloat(C.paddingLeft)) * v.x, y = k.top + (h.clientTop + parseFloat(C.paddingTop)) * v.y;
|
|
1776
|
+
c *= v.x, l *= v.y, d *= v.x, m *= v.y, c += E, l += y, w = ke(h), h = _r(w);
|
|
1777
1777
|
}
|
|
1778
1778
|
}
|
|
1779
1779
|
return An({
|
|
@@ -1787,7 +1787,7 @@ function Fn(e, t) {
|
|
|
1787
1787
|
const n = Ln(e).scrollLeft;
|
|
1788
1788
|
return t ? t.left + n : ft(Ue(e)).left + n;
|
|
1789
1789
|
}
|
|
1790
|
-
function
|
|
1790
|
+
function ja(e, t) {
|
|
1791
1791
|
const n = e.getBoundingClientRect(), r = n.left + t.scrollLeft - Fn(e, n), o = n.top + t.scrollTop;
|
|
1792
1792
|
return {
|
|
1793
1793
|
x: r,
|
|
@@ -1813,7 +1813,7 @@ function bu(e) {
|
|
|
1813
1813
|
const p = ft(r);
|
|
1814
1814
|
l = At(r), d.x = p.x + r.clientLeft, d.y = p.y + r.clientTop;
|
|
1815
1815
|
}
|
|
1816
|
-
const g = s && !m && !a ?
|
|
1816
|
+
const g = s && !m && !a ? ja(s, c) : Be(0);
|
|
1817
1817
|
return {
|
|
1818
1818
|
width: n.width * l.x,
|
|
1819
1819
|
height: n.height * l.y,
|
|
@@ -1875,7 +1875,7 @@ function Yo(e, t, n) {
|
|
|
1875
1875
|
else if (Me(t))
|
|
1876
1876
|
r = Su(t, n);
|
|
1877
1877
|
else {
|
|
1878
|
-
const o =
|
|
1878
|
+
const o = Ua(e);
|
|
1879
1879
|
r = {
|
|
1880
1880
|
x: t.x - o.x,
|
|
1881
1881
|
y: t.y - o.y,
|
|
@@ -1924,7 +1924,7 @@ function ku(e) {
|
|
|
1924
1924
|
const {
|
|
1925
1925
|
width: t,
|
|
1926
1926
|
height: n
|
|
1927
|
-
} =
|
|
1927
|
+
} = Ha(e);
|
|
1928
1928
|
return {
|
|
1929
1929
|
width: t,
|
|
1930
1930
|
height: n
|
|
@@ -1946,7 +1946,7 @@ function Au(e, t, n) {
|
|
|
1946
1946
|
c.x = p.x + t.clientLeft, c.y = p.y + t.clientTop;
|
|
1947
1947
|
} else o && l();
|
|
1948
1948
|
a && !r && o && l();
|
|
1949
|
-
const d = o && !r && !a ?
|
|
1949
|
+
const d = o && !r && !a ? ja(o, i) : Be(0), m = s.left + i.scrollLeft - c.x - d.x, g = s.top + i.scrollTop - c.y - d.y;
|
|
1950
1950
|
return {
|
|
1951
1951
|
x: m,
|
|
1952
1952
|
y: g,
|
|
@@ -1965,7 +1965,7 @@ function qo(e, t) {
|
|
|
1965
1965
|
let n = e.offsetParent;
|
|
1966
1966
|
return Ue(e) === n && (n = n.ownerDocument.body), n;
|
|
1967
1967
|
}
|
|
1968
|
-
function
|
|
1968
|
+
function Ga(e, t) {
|
|
1969
1969
|
const n = ke(e);
|
|
1970
1970
|
if (Dn(e))
|
|
1971
1971
|
return n;
|
|
@@ -1984,7 +1984,7 @@ function ja(e, t) {
|
|
|
1984
1984
|
return r && Tt(r) && dr(r) && !eo(r) ? n : r || mu(e) || n;
|
|
1985
1985
|
}
|
|
1986
1986
|
const Nu = async function(e) {
|
|
1987
|
-
const t = this.getOffsetParent ||
|
|
1987
|
+
const t = this.getOffsetParent || Ga, n = this.getDimensions, r = await n(e.floating);
|
|
1988
1988
|
return {
|
|
1989
1989
|
reference: Au(e.reference, await t(e.floating), e.strategy),
|
|
1990
1990
|
floating: {
|
|
@@ -2002,7 +2002,7 @@ const Pu = {
|
|
|
2002
2002
|
convertOffsetParentRelativeRectToViewportRelativeRect: bu,
|
|
2003
2003
|
getDocumentElement: Ue,
|
|
2004
2004
|
getClippingRect: Eu,
|
|
2005
|
-
getOffsetParent:
|
|
2005
|
+
getOffsetParent: Ga,
|
|
2006
2006
|
getElementRects: Nu,
|
|
2007
2007
|
getClientRects: vu,
|
|
2008
2008
|
getDimensions: ku,
|
|
@@ -2010,7 +2010,7 @@ const Pu = {
|
|
|
2010
2010
|
isElement: Me,
|
|
2011
2011
|
isRTL: Tu
|
|
2012
2012
|
};
|
|
2013
|
-
function
|
|
2013
|
+
function Ya(e, t) {
|
|
2014
2014
|
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
2015
2015
|
}
|
|
2016
2016
|
function Ru(e, t) {
|
|
@@ -2030,30 +2030,30 @@ function Ru(e, t) {
|
|
|
2030
2030
|
} = l;
|
|
2031
2031
|
if (i || t(), !g || !p)
|
|
2032
2032
|
return;
|
|
2033
|
-
const w = ln(m), h = ln(o.clientWidth - (d + g)),
|
|
2034
|
-
rootMargin: -w + "px " + -h + "px " + -
|
|
2033
|
+
const w = ln(m), h = ln(o.clientWidth - (d + g)), v = ln(o.clientHeight - (m + p)), k = ln(d), E = {
|
|
2034
|
+
rootMargin: -w + "px " + -h + "px " + -v + "px " + -k + "px",
|
|
2035
2035
|
threshold: Ee(0, tt(1, c)) || 1
|
|
2036
2036
|
};
|
|
2037
|
-
let
|
|
2037
|
+
let y = !0;
|
|
2038
2038
|
function T(D) {
|
|
2039
2039
|
const _ = D[0].intersectionRatio;
|
|
2040
2040
|
if (_ !== c) {
|
|
2041
|
-
if (!
|
|
2041
|
+
if (!y)
|
|
2042
2042
|
return s();
|
|
2043
2043
|
_ ? s(!1, _) : r = setTimeout(() => {
|
|
2044
2044
|
s(!1, 1e-7);
|
|
2045
2045
|
}, 1e3);
|
|
2046
2046
|
}
|
|
2047
|
-
_ === 1 && !
|
|
2047
|
+
_ === 1 && !Ya(l, e.getBoundingClientRect()) && s(), y = !1;
|
|
2048
2048
|
}
|
|
2049
2049
|
try {
|
|
2050
2050
|
n = new IntersectionObserver(T, {
|
|
2051
|
-
...
|
|
2051
|
+
...E,
|
|
2052
2052
|
// Handle <iframe>s
|
|
2053
2053
|
root: o.ownerDocument
|
|
2054
2054
|
});
|
|
2055
2055
|
} catch {
|
|
2056
|
-
n = new IntersectionObserver(T,
|
|
2056
|
+
n = new IntersectionObserver(T, E);
|
|
2057
2057
|
}
|
|
2058
2058
|
n.observe(e);
|
|
2059
2059
|
}
|
|
@@ -2068,31 +2068,31 @@ function Ou(e, t, n, r) {
|
|
|
2068
2068
|
layoutShift: i = typeof IntersectionObserver == "function",
|
|
2069
2069
|
animationFrame: c = !1
|
|
2070
2070
|
} = r, l = no(e), d = o || a ? [...l ? Kt(l) : [], ...Kt(t)] : [];
|
|
2071
|
-
d.forEach((
|
|
2072
|
-
o &&
|
|
2071
|
+
d.forEach((k) => {
|
|
2072
|
+
o && k.addEventListener("scroll", n, {
|
|
2073
2073
|
passive: !0
|
|
2074
|
-
}), a &&
|
|
2074
|
+
}), a && k.addEventListener("resize", n);
|
|
2075
2075
|
});
|
|
2076
2076
|
const m = l && i ? Ru(l, n) : null;
|
|
2077
2077
|
let g = -1, p = null;
|
|
2078
|
-
s && (p = new ResizeObserver((
|
|
2079
|
-
let [C] =
|
|
2078
|
+
s && (p = new ResizeObserver((k) => {
|
|
2079
|
+
let [C] = k;
|
|
2080
2080
|
C && C.target === l && p && (p.unobserve(t), cancelAnimationFrame(g), g = requestAnimationFrame(() => {
|
|
2081
|
-
var
|
|
2082
|
-
(
|
|
2081
|
+
var E;
|
|
2082
|
+
(E = p) == null || E.observe(t);
|
|
2083
2083
|
})), n();
|
|
2084
2084
|
}), l && !c && p.observe(l), p.observe(t));
|
|
2085
2085
|
let w, h = c ? ft(e) : null;
|
|
2086
|
-
c &&
|
|
2087
|
-
function
|
|
2088
|
-
const
|
|
2089
|
-
h && !
|
|
2086
|
+
c && v();
|
|
2087
|
+
function v() {
|
|
2088
|
+
const k = ft(e);
|
|
2089
|
+
h && !Ya(h, k) && n(), h = k, w = requestAnimationFrame(v);
|
|
2090
2090
|
}
|
|
2091
2091
|
return n(), () => {
|
|
2092
|
-
var
|
|
2092
|
+
var k;
|
|
2093
2093
|
d.forEach((C) => {
|
|
2094
2094
|
o && C.removeEventListener("scroll", n), a && C.removeEventListener("resize", n);
|
|
2095
|
-
}), m?.(), (
|
|
2095
|
+
}), m?.(), (k = p) == null || k.disconnect(), p = null, c && cancelAnimationFrame(w);
|
|
2096
2096
|
};
|
|
2097
2097
|
}
|
|
2098
2098
|
const _u = nu, Mu = ru, Iu = Jl, Du = au, Lu = eu, Ko = Zl, Fu = ou, $u = (e, t, n) => {
|
|
@@ -2109,7 +2109,7 @@ const _u = nu, Mu = ru, Iu = Jl, Du = au, Lu = eu, Ko = Zl, Fu = ou, $u = (e, t,
|
|
|
2109
2109
|
});
|
|
2110
2110
|
};
|
|
2111
2111
|
var Wu = typeof document < "u", zu = function() {
|
|
2112
|
-
}, yn = Wu ?
|
|
2112
|
+
}, yn = Wu ? rc : zu;
|
|
2113
2113
|
function Nn(e, t) {
|
|
2114
2114
|
if (e === t)
|
|
2115
2115
|
return !0;
|
|
@@ -2140,11 +2140,11 @@ function Nn(e, t) {
|
|
|
2140
2140
|
}
|
|
2141
2141
|
return e !== e && t !== t;
|
|
2142
2142
|
}
|
|
2143
|
-
function
|
|
2143
|
+
function qa(e) {
|
|
2144
2144
|
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
2145
2145
|
}
|
|
2146
2146
|
function Xo(e, t) {
|
|
2147
|
-
const n =
|
|
2147
|
+
const n = qa(e);
|
|
2148
2148
|
return Math.round(t * n) / n;
|
|
2149
2149
|
}
|
|
2150
2150
|
function fr(e) {
|
|
@@ -2176,11 +2176,11 @@ function Bu(e) {
|
|
|
2176
2176
|
isPositioned: !1
|
|
2177
2177
|
}), [g, p] = f.useState(r);
|
|
2178
2178
|
Nn(g, r) || p(r);
|
|
2179
|
-
const [w, h] = f.useState(null), [
|
|
2179
|
+
const [w, h] = f.useState(null), [v, k] = f.useState(null), C = f.useCallback((S) => {
|
|
2180
2180
|
S !== D.current && (D.current = S, h(S));
|
|
2181
|
-
}, []),
|
|
2182
|
-
S !== _.current && (_.current = S,
|
|
2183
|
-
}, []),
|
|
2181
|
+
}, []), E = f.useCallback((S) => {
|
|
2182
|
+
S !== _.current && (_.current = S, k(S));
|
|
2183
|
+
}, []), y = a || w, T = s || v, D = f.useRef(null), _ = f.useRef(null), P = f.useRef(d), z = c != null, V = fr(c), H = fr(o), G = fr(l), x = f.useCallback(() => {
|
|
2184
2184
|
if (!D.current || !_.current)
|
|
2185
2185
|
return;
|
|
2186
2186
|
const S = {
|
|
@@ -2212,21 +2212,21 @@ function Bu(e) {
|
|
|
2212
2212
|
yn(() => (N.current = !0, () => {
|
|
2213
2213
|
N.current = !1;
|
|
2214
2214
|
}), []), yn(() => {
|
|
2215
|
-
if (
|
|
2216
|
-
if (
|
|
2217
|
-
return
|
|
2215
|
+
if (y && (D.current = y), T && (_.current = T), y && T) {
|
|
2216
|
+
if (V.current)
|
|
2217
|
+
return V.current(y, T, x);
|
|
2218
2218
|
x();
|
|
2219
2219
|
}
|
|
2220
|
-
}, [
|
|
2220
|
+
}, [y, T, x, V, z]);
|
|
2221
2221
|
const R = f.useMemo(() => ({
|
|
2222
2222
|
reference: D,
|
|
2223
2223
|
floating: _,
|
|
2224
2224
|
setReference: C,
|
|
2225
|
-
setFloating:
|
|
2226
|
-
}), [C,
|
|
2227
|
-
reference:
|
|
2225
|
+
setFloating: E
|
|
2226
|
+
}), [C, E]), O = f.useMemo(() => ({
|
|
2227
|
+
reference: y,
|
|
2228
2228
|
floating: T
|
|
2229
|
-
}), [
|
|
2229
|
+
}), [y, T]), A = f.useMemo(() => {
|
|
2230
2230
|
const S = {
|
|
2231
2231
|
position: n,
|
|
2232
2232
|
left: 0,
|
|
@@ -2238,7 +2238,7 @@ function Bu(e) {
|
|
|
2238
2238
|
return i ? {
|
|
2239
2239
|
...S,
|
|
2240
2240
|
transform: "translate(" + W + "px, " + Y + "px)",
|
|
2241
|
-
...
|
|
2241
|
+
...qa(O.floating) >= 1.5 && {
|
|
2242
2242
|
willChange: "transform"
|
|
2243
2243
|
}
|
|
2244
2244
|
} : {
|
|
@@ -2279,10 +2279,10 @@ const Hu = (e) => {
|
|
|
2279
2279
|
}, Uu = (e, t) => ({
|
|
2280
2280
|
..._u(e),
|
|
2281
2281
|
options: [e, t]
|
|
2282
|
-
}),
|
|
2282
|
+
}), ju = (e, t) => ({
|
|
2283
2283
|
...Mu(e),
|
|
2284
2284
|
options: [e, t]
|
|
2285
|
-
}),
|
|
2285
|
+
}), Vu = (e, t) => ({
|
|
2286
2286
|
...Fu(e),
|
|
2287
2287
|
options: [e, t]
|
|
2288
2288
|
}), Gu = (e, t) => ({
|
|
@@ -2322,7 +2322,7 @@ var Xu = [
|
|
|
2322
2322
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ u(c, { ...i, ref: a });
|
|
2323
2323
|
});
|
|
2324
2324
|
return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
|
|
2325
|
-
}, {}), Zu = "Arrow",
|
|
2325
|
+
}, {}), Zu = "Arrow", Ka = f.forwardRef((e, t) => {
|
|
2326
2326
|
const { children: n, width: r = 10, height: o = 5, ...a } = e;
|
|
2327
2327
|
return /* @__PURE__ */ u(
|
|
2328
2328
|
Qu.svg,
|
|
@@ -2337,8 +2337,8 @@ var Xu = [
|
|
|
2337
2337
|
}
|
|
2338
2338
|
);
|
|
2339
2339
|
});
|
|
2340
|
-
|
|
2341
|
-
var Ju =
|
|
2340
|
+
Ka.displayName = Zu;
|
|
2341
|
+
var Ju = Ka, ed = [
|
|
2342
2342
|
"a",
|
|
2343
2343
|
"button",
|
|
2344
2344
|
"div",
|
|
@@ -2356,14 +2356,14 @@ var Ju = qa, ed = [
|
|
|
2356
2356
|
"span",
|
|
2357
2357
|
"svg",
|
|
2358
2358
|
"ul"
|
|
2359
|
-
],
|
|
2359
|
+
], Xa = ed.reduce((e, t) => {
|
|
2360
2360
|
const n = /* @__PURE__ */ Ce(`Primitive.${t}`), r = f.forwardRef((o, a) => {
|
|
2361
2361
|
const { asChild: s, ...i } = o, c = s ? n : t;
|
|
2362
2362
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ u(c, { ...i, ref: a });
|
|
2363
2363
|
});
|
|
2364
2364
|
return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
|
|
2365
2365
|
}, {});
|
|
2366
|
-
function
|
|
2366
|
+
function Qa(e) {
|
|
2367
2367
|
const [t, n] = f.useState(void 0);
|
|
2368
2368
|
return be(() => {
|
|
2369
2369
|
if (e) {
|
|
@@ -2385,22 +2385,22 @@ function Xa(e) {
|
|
|
2385
2385
|
n(void 0);
|
|
2386
2386
|
}, [e]), t;
|
|
2387
2387
|
}
|
|
2388
|
-
var ro = "Popper", [
|
|
2388
|
+
var ro = "Popper", [Za, $n] = ht(ro), [td, Ja] = Za(ro), es = (e) => {
|
|
2389
2389
|
const { __scopePopper: t, children: n } = e, [r, o] = f.useState(null);
|
|
2390
2390
|
return /* @__PURE__ */ u(td, { scope: t, anchor: r, onAnchorChange: o, children: n });
|
|
2391
2391
|
};
|
|
2392
|
-
|
|
2393
|
-
var
|
|
2392
|
+
es.displayName = ro;
|
|
2393
|
+
var ts = "PopperAnchor", ns = f.forwardRef(
|
|
2394
2394
|
(e, t) => {
|
|
2395
|
-
const { __scopePopper: n, virtualRef: r, ...o } = e, a =
|
|
2395
|
+
const { __scopePopper: n, virtualRef: r, ...o } = e, a = Ja(ts, n), s = f.useRef(null), i = ie(t, s), c = f.useRef(null);
|
|
2396
2396
|
return f.useEffect(() => {
|
|
2397
2397
|
const l = c.current;
|
|
2398
2398
|
c.current = r?.current || s.current, l !== c.current && a.onAnchorChange(c.current);
|
|
2399
|
-
}), r ? null : /* @__PURE__ */ u(
|
|
2399
|
+
}), r ? null : /* @__PURE__ */ u(Xa.div, { ...o, ref: i });
|
|
2400
2400
|
}
|
|
2401
2401
|
);
|
|
2402
|
-
|
|
2403
|
-
var oo = "PopperContent", [nd, rd] =
|
|
2402
|
+
ns.displayName = ts;
|
|
2403
|
+
var oo = "PopperContent", [nd, rd] = Za(oo), rs = f.forwardRef(
|
|
2404
2404
|
(e, t) => {
|
|
2405
2405
|
const {
|
|
2406
2406
|
__scopePopper: n,
|
|
@@ -2417,8 +2417,8 @@ var oo = "PopperContent", [nd, rd] = Qa(oo), ns = f.forwardRef(
|
|
|
2417
2417
|
updatePositionStrategy: p = "optimized",
|
|
2418
2418
|
onPlaced: w,
|
|
2419
2419
|
...h
|
|
2420
|
-
} = e,
|
|
2421
|
-
padding:
|
|
2420
|
+
} = e, v = Ja(oo, n), [k, C] = f.useState(null), E = ie(t, (L) => C(L)), [y, T] = f.useState(null), D = Qa(y), _ = D?.width ?? 0, P = D?.height ?? 0, z = r + (a !== "center" ? "-" + a : ""), V = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, H = Array.isArray(l) ? l : [l], G = H.length > 0, x = {
|
|
2421
|
+
padding: V,
|
|
2422
2422
|
boundary: H.filter(ad),
|
|
2423
2423
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
2424
2424
|
altBoundary: G
|
|
@@ -2430,14 +2430,14 @@ var oo = "PopperContent", [nd, rd] = Qa(oo), ns = f.forwardRef(
|
|
|
2430
2430
|
animationFrame: p === "always"
|
|
2431
2431
|
}),
|
|
2432
2432
|
elements: {
|
|
2433
|
-
reference:
|
|
2433
|
+
reference: v.anchor
|
|
2434
2434
|
},
|
|
2435
2435
|
middleware: [
|
|
2436
2436
|
Uu({ mainAxis: o + P, alignmentAxis: s }),
|
|
2437
|
-
c &&
|
|
2437
|
+
c && ju({
|
|
2438
2438
|
mainAxis: !0,
|
|
2439
2439
|
crossAxis: !1,
|
|
2440
|
-
limiter: m === "partial" ?
|
|
2440
|
+
limiter: m === "partial" ? Vu() : void 0,
|
|
2441
2441
|
...x
|
|
2442
2442
|
}),
|
|
2443
2443
|
c && Gu({ ...x }),
|
|
@@ -2448,18 +2448,18 @@ var oo = "PopperContent", [nd, rd] = Qa(oo), ns = f.forwardRef(
|
|
|
2448
2448
|
de.setProperty("--radix-popper-available-width", `${ce}px`), de.setProperty("--radix-popper-available-height", `${Q}px`), de.setProperty("--radix-popper-anchor-width", `${ne}px`), de.setProperty("--radix-popper-anchor-height", `${oe}px`);
|
|
2449
2449
|
}
|
|
2450
2450
|
}),
|
|
2451
|
-
|
|
2451
|
+
y && Ku({ element: y, padding: i }),
|
|
2452
2452
|
sd({ arrowWidth: _, arrowHeight: P }),
|
|
2453
2453
|
g && qu({ strategy: "referenceHidden", ...x })
|
|
2454
2454
|
]
|
|
2455
|
-
}), [W, Y] =
|
|
2455
|
+
}), [W, Y] = ss(O), j = et(w);
|
|
2456
2456
|
be(() => {
|
|
2457
|
-
A &&
|
|
2458
|
-
}, [A,
|
|
2457
|
+
A && j?.();
|
|
2458
|
+
}, [A, j]);
|
|
2459
2459
|
const ve = S.arrow?.x, q = S.arrow?.y, ee = S.arrow?.centerOffset !== 0, [J, he] = f.useState();
|
|
2460
2460
|
return be(() => {
|
|
2461
|
-
|
|
2462
|
-
}, [
|
|
2461
|
+
k && he(window.getComputedStyle(k).zIndex);
|
|
2462
|
+
}, [k]), /* @__PURE__ */ u(
|
|
2463
2463
|
"div",
|
|
2464
2464
|
{
|
|
2465
2465
|
ref: N.setFloating,
|
|
@@ -2493,12 +2493,12 @@ var oo = "PopperContent", [nd, rd] = Qa(oo), ns = f.forwardRef(
|
|
|
2493
2493
|
arrowY: q,
|
|
2494
2494
|
shouldHideArrow: ee,
|
|
2495
2495
|
children: /* @__PURE__ */ u(
|
|
2496
|
-
|
|
2496
|
+
Xa.div,
|
|
2497
2497
|
{
|
|
2498
2498
|
"data-side": W,
|
|
2499
2499
|
"data-align": Y,
|
|
2500
2500
|
...h,
|
|
2501
|
-
ref:
|
|
2501
|
+
ref: E,
|
|
2502
2502
|
style: {
|
|
2503
2503
|
...h.style,
|
|
2504
2504
|
// if the PopperContent hasn't been placed yet (not all measurements done)
|
|
@@ -2513,14 +2513,14 @@ var oo = "PopperContent", [nd, rd] = Qa(oo), ns = f.forwardRef(
|
|
|
2513
2513
|
);
|
|
2514
2514
|
}
|
|
2515
2515
|
);
|
|
2516
|
-
|
|
2517
|
-
var
|
|
2516
|
+
rs.displayName = oo;
|
|
2517
|
+
var os = "PopperArrow", od = {
|
|
2518
2518
|
top: "bottom",
|
|
2519
2519
|
right: "left",
|
|
2520
2520
|
bottom: "top",
|
|
2521
2521
|
left: "right"
|
|
2522
|
-
},
|
|
2523
|
-
const { __scopePopper: r, ...o } = t, a = rd(
|
|
2522
|
+
}, as = f.forwardRef(function(t, n) {
|
|
2523
|
+
const { __scopePopper: r, ...o } = t, a = rd(os, r), s = od[a.placedSide];
|
|
2524
2524
|
return (
|
|
2525
2525
|
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
2526
2526
|
// doesn't report size as we'd expect on SVG elements.
|
|
@@ -2564,7 +2564,7 @@ var rs = "PopperArrow", od = {
|
|
|
2564
2564
|
)
|
|
2565
2565
|
);
|
|
2566
2566
|
});
|
|
2567
|
-
|
|
2567
|
+
as.displayName = os;
|
|
2568
2568
|
function ad(e) {
|
|
2569
2569
|
return e !== null;
|
|
2570
2570
|
}
|
|
@@ -2572,16 +2572,16 @@ var sd = (e) => ({
|
|
|
2572
2572
|
name: "transformOrigin",
|
|
2573
2573
|
options: e,
|
|
2574
2574
|
fn(t) {
|
|
2575
|
-
const { placement: n, rects: r, middlewareData: o } = t, s = o.arrow?.centerOffset !== 0, i = s ? 0 : e.arrowWidth, c = s ? 0 : e.arrowHeight, [l, d] =
|
|
2575
|
+
const { placement: n, rects: r, middlewareData: o } = t, s = o.arrow?.centerOffset !== 0, i = s ? 0 : e.arrowWidth, c = s ? 0 : e.arrowHeight, [l, d] = ss(n), m = { start: "0%", center: "50%", end: "100%" }[d], g = (o.arrow?.x ?? 0) + i / 2, p = (o.arrow?.y ?? 0) + c / 2;
|
|
2576
2576
|
let w = "", h = "";
|
|
2577
2577
|
return l === "bottom" ? (w = s ? m : `${g}px`, h = `${-c}px`) : l === "top" ? (w = s ? m : `${g}px`, h = `${r.floating.height + c}px`) : l === "right" ? (w = `${-c}px`, h = s ? m : `${p}px`) : l === "left" && (w = `${r.floating.width + c}px`, h = s ? m : `${p}px`), { data: { x: w, y: h } };
|
|
2578
2578
|
}
|
|
2579
2579
|
});
|
|
2580
|
-
function
|
|
2580
|
+
function ss(e) {
|
|
2581
2581
|
const [t, n = "center"] = e.split("-");
|
|
2582
2582
|
return [t, n];
|
|
2583
2583
|
}
|
|
2584
|
-
var
|
|
2584
|
+
var is = es, ao = ns, cs = rs, ls = as, id = [
|
|
2585
2585
|
"a",
|
|
2586
2586
|
"button",
|
|
2587
2587
|
"div",
|
|
@@ -2609,7 +2609,7 @@ var ss = Ja, ao = ts, is = ns, cs = os, id = [
|
|
|
2609
2609
|
const { container: n, ...r } = e, [o, a] = f.useState(!1);
|
|
2610
2610
|
be(() => a(!0), []);
|
|
2611
2611
|
const s = n || o && globalThis?.document?.body;
|
|
2612
|
-
return s ?
|
|
2612
|
+
return s ? sc.createPortal(/* @__PURE__ */ u(cd.div, { ...r, ref: t }), s) : null;
|
|
2613
2613
|
});
|
|
2614
2614
|
so.displayName = ld;
|
|
2615
2615
|
var ud = [
|
|
@@ -2683,7 +2683,7 @@ function fd({
|
|
|
2683
2683
|
function md(e) {
|
|
2684
2684
|
return typeof e == "function";
|
|
2685
2685
|
}
|
|
2686
|
-
function
|
|
2686
|
+
function us(e) {
|
|
2687
2687
|
const t = f.useRef({ value: e, previous: e });
|
|
2688
2688
|
return f.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
|
|
2689
2689
|
}
|
|
@@ -2711,7 +2711,7 @@ var pd = [
|
|
|
2711
2711
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ u(c, { ...i, ref: a });
|
|
2712
2712
|
});
|
|
2713
2713
|
return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
|
|
2714
|
-
}, {}),
|
|
2714
|
+
}, {}), ds = Object.freeze({
|
|
2715
2715
|
// See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
|
|
2716
2716
|
position: "absolute",
|
|
2717
2717
|
border: 0,
|
|
@@ -2729,7 +2729,7 @@ var pd = [
|
|
|
2729
2729
|
{
|
|
2730
2730
|
...e,
|
|
2731
2731
|
ref: t,
|
|
2732
|
-
style: { ...
|
|
2732
|
+
style: { ...ds, ...e.style }
|
|
2733
2733
|
}
|
|
2734
2734
|
)
|
|
2735
2735
|
);
|
|
@@ -2739,13 +2739,13 @@ var vd = function(e) {
|
|
|
2739
2739
|
return null;
|
|
2740
2740
|
var t = Array.isArray(e) ? e[0] : e;
|
|
2741
2741
|
return t.ownerDocument.body;
|
|
2742
|
-
}, xt = /* @__PURE__ */ new WeakMap(), un = /* @__PURE__ */ new WeakMap(), dn = {}, mr = 0,
|
|
2743
|
-
return e && (e.host ||
|
|
2742
|
+
}, xt = /* @__PURE__ */ new WeakMap(), un = /* @__PURE__ */ new WeakMap(), dn = {}, mr = 0, fs = function(e) {
|
|
2743
|
+
return e && (e.host || fs(e.parentNode));
|
|
2744
2744
|
}, yd = function(e, t) {
|
|
2745
2745
|
return t.map(function(n) {
|
|
2746
2746
|
if (e.contains(n))
|
|
2747
2747
|
return n;
|
|
2748
|
-
var r =
|
|
2748
|
+
var r = fs(n);
|
|
2749
2749
|
return r && e.contains(r) ? r : (console.error("aria-hidden", n, "in not contained inside", e, ". Doing nothing"), null);
|
|
2750
2750
|
}).filter(function(n) {
|
|
2751
2751
|
return !!n;
|
|
@@ -2763,10 +2763,10 @@ var vd = function(e) {
|
|
|
2763
2763
|
d(g);
|
|
2764
2764
|
else
|
|
2765
2765
|
try {
|
|
2766
|
-
var p = g.getAttribute(r), w = p !== null && p !== "false", h = (xt.get(g) || 0) + 1,
|
|
2767
|
-
xt.set(g, h), a.set(g,
|
|
2768
|
-
} catch (
|
|
2769
|
-
console.error("aria-hidden: cannot operate on ", g,
|
|
2766
|
+
var p = g.getAttribute(r), w = p !== null && p !== "false", h = (xt.get(g) || 0) + 1, v = (a.get(g) || 0) + 1;
|
|
2767
|
+
xt.set(g, h), a.set(g, v), s.push(g), h === 1 && w && un.set(g, !0), v === 1 && g.setAttribute(n, "true"), w || g.setAttribute(r, "true");
|
|
2768
|
+
} catch (k) {
|
|
2769
|
+
console.error("aria-hidden: cannot operate on ", g, k);
|
|
2770
2770
|
}
|
|
2771
2771
|
});
|
|
2772
2772
|
};
|
|
@@ -2776,7 +2776,7 @@ var vd = function(e) {
|
|
|
2776
2776
|
xt.set(m, g), a.set(m, p), g || (un.has(m) || m.removeAttribute(r), un.delete(m)), p || m.removeAttribute(n);
|
|
2777
2777
|
}), mr--, mr || (xt = /* @__PURE__ */ new WeakMap(), xt = /* @__PURE__ */ new WeakMap(), un = /* @__PURE__ */ new WeakMap(), dn = {});
|
|
2778
2778
|
};
|
|
2779
|
-
},
|
|
2779
|
+
}, ms = function(e, t, n) {
|
|
2780
2780
|
n === void 0 && (n = "data-aria-hidden");
|
|
2781
2781
|
var r = Array.from(Array.isArray(e) ? e : [e]), o = vd(e);
|
|
2782
2782
|
return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))), wd(r, o, n, "aria-hidden")) : function() {
|
|
@@ -2791,7 +2791,7 @@ var vd = function(e) {
|
|
|
2791
2791
|
return t;
|
|
2792
2792
|
}, We.apply(this, arguments);
|
|
2793
2793
|
};
|
|
2794
|
-
function
|
|
2794
|
+
function ps(e, t) {
|
|
2795
2795
|
var n = {};
|
|
2796
2796
|
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
2797
2797
|
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
@@ -2809,7 +2809,7 @@ function pr(e, t) {
|
|
|
2809
2809
|
return typeof e == "function" ? e(t) : e && (e.current = t), e;
|
|
2810
2810
|
}
|
|
2811
2811
|
function Ed(e, t) {
|
|
2812
|
-
var n =
|
|
2812
|
+
var n = le(function() {
|
|
2813
2813
|
return {
|
|
2814
2814
|
// value
|
|
2815
2815
|
value: e,
|
|
@@ -2912,8 +2912,8 @@ function Pd(e) {
|
|
|
2912
2912
|
var t = Td(null);
|
|
2913
2913
|
return t.options = We({ async: !0, ssr: !1 }, e), t;
|
|
2914
2914
|
}
|
|
2915
|
-
var
|
|
2916
|
-
var t = e.sideCar, n =
|
|
2915
|
+
var hs = function(e) {
|
|
2916
|
+
var t = e.sideCar, n = ps(e, ["sideCar"]);
|
|
2917
2917
|
if (!t)
|
|
2918
2918
|
throw new Error("Sidecar: please provide `sideCar` property to import the right car");
|
|
2919
2919
|
var r = t.read();
|
|
@@ -2921,21 +2921,21 @@ var ps = function(e) {
|
|
|
2921
2921
|
throw new Error("Sidecar medium not found");
|
|
2922
2922
|
return f.createElement(r, We({}, n));
|
|
2923
2923
|
};
|
|
2924
|
-
|
|
2924
|
+
hs.isSideCarExport = !0;
|
|
2925
2925
|
function Rd(e, t) {
|
|
2926
|
-
return e.useMedium(t),
|
|
2926
|
+
return e.useMedium(t), hs;
|
|
2927
2927
|
}
|
|
2928
|
-
var
|
|
2928
|
+
var gs = Pd(), hr = function() {
|
|
2929
2929
|
}, Wn = f.forwardRef(function(e, t) {
|
|
2930
2930
|
var n = f.useRef(null), r = f.useState({
|
|
2931
2931
|
onScrollCapture: hr,
|
|
2932
2932
|
onWheelCapture: hr,
|
|
2933
2933
|
onTouchMoveCapture: hr
|
|
2934
|
-
}), o = r[0], a = r[1], s = e.forwardProps, i = e.children, c = e.className, l = e.removeScrollBar, d = e.enabled, m = e.shards, g = e.sideCar, p = e.noRelative, w = e.noIsolation, h = e.inert,
|
|
2934
|
+
}), o = r[0], a = r[1], s = e.forwardProps, i = e.children, c = e.className, l = e.removeScrollBar, d = e.enabled, m = e.shards, g = e.sideCar, p = e.noRelative, w = e.noIsolation, h = e.inert, v = e.allowPinchZoom, k = e.as, C = k === void 0 ? "div" : k, E = e.gapMode, y = ps(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), T = g, D = Ad([n, t]), _ = We(We({}, y), o);
|
|
2935
2935
|
return f.createElement(
|
|
2936
2936
|
f.Fragment,
|
|
2937
2937
|
null,
|
|
2938
|
-
d && f.createElement(T, { sideCar:
|
|
2938
|
+
d && f.createElement(T, { sideCar: gs, removeScrollBar: l, shards: m, noRelative: p, noIsolation: w, inert: h, setCallbacks: a, allowPinchZoom: !!v, lockRef: n, gapMode: E }),
|
|
2939
2939
|
s ? f.cloneElement(f.Children.only(i), We(We({}, _), { ref: D })) : f.createElement(C, We({}, _, { className: c, ref: D }), i)
|
|
2940
2940
|
);
|
|
2941
2941
|
});
|
|
@@ -2986,7 +2986,7 @@ var Dd = function() {
|
|
|
2986
2986
|
};
|
|
2987
2987
|
}, [t && n]);
|
|
2988
2988
|
};
|
|
2989
|
-
},
|
|
2989
|
+
}, bs = function() {
|
|
2990
2990
|
var e = Ld(), t = function(n) {
|
|
2991
2991
|
var r = n.styles, o = n.dynamic;
|
|
2992
2992
|
return e(r, o), null;
|
|
@@ -3012,7 +3012,7 @@ var Dd = function() {
|
|
|
3012
3012
|
right: t[2],
|
|
3013
3013
|
gap: Math.max(0, r - n + t[2] - t[0])
|
|
3014
3014
|
};
|
|
3015
|
-
}, zd =
|
|
3015
|
+
}, zd = bs(), Nt = "data-scroll-locked", Bd = function(e, t, n, r) {
|
|
3016
3016
|
var o = e.left, a = e.top, s = e.right, i = e.gap;
|
|
3017
3017
|
return n === void 0 && (n = "margin"), `
|
|
3018
3018
|
.`.concat(Sd, ` {
|
|
@@ -3085,28 +3085,28 @@ if (typeof window < "u")
|
|
|
3085
3085
|
} catch {
|
|
3086
3086
|
Mr = !1;
|
|
3087
3087
|
}
|
|
3088
|
-
var St = Mr ? { passive: !1 } : !1,
|
|
3088
|
+
var St = Mr ? { passive: !1 } : !1, jd = function(e) {
|
|
3089
3089
|
return e.tagName === "TEXTAREA";
|
|
3090
|
-
},
|
|
3090
|
+
}, vs = function(e, t) {
|
|
3091
3091
|
if (!(e instanceof Element))
|
|
3092
3092
|
return !1;
|
|
3093
3093
|
var n = window.getComputedStyle(e);
|
|
3094
3094
|
return (
|
|
3095
3095
|
// not-not-scrollable
|
|
3096
3096
|
n[t] !== "hidden" && // contains scroll inside self
|
|
3097
|
-
!(n.overflowY === n.overflowX && !
|
|
3097
|
+
!(n.overflowY === n.overflowX && !jd(e) && n[t] === "visible")
|
|
3098
3098
|
);
|
|
3099
|
-
},
|
|
3100
|
-
return
|
|
3099
|
+
}, Vd = function(e) {
|
|
3100
|
+
return vs(e, "overflowY");
|
|
3101
3101
|
}, Gd = function(e) {
|
|
3102
|
-
return
|
|
3102
|
+
return vs(e, "overflowX");
|
|
3103
3103
|
}, Jo = function(e, t) {
|
|
3104
3104
|
var n = t.ownerDocument, r = t;
|
|
3105
3105
|
do {
|
|
3106
3106
|
typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
|
|
3107
|
-
var o =
|
|
3107
|
+
var o = ys(e, r);
|
|
3108
3108
|
if (o) {
|
|
3109
|
-
var a =
|
|
3109
|
+
var a = ws(e, r), s = a[1], i = a[2];
|
|
3110
3110
|
if (s > i)
|
|
3111
3111
|
return !0;
|
|
3112
3112
|
}
|
|
@@ -3127,9 +3127,9 @@ var St = Mr ? { passive: !1 } : !1, Vd = function(e) {
|
|
|
3127
3127
|
n,
|
|
3128
3128
|
r
|
|
3129
3129
|
];
|
|
3130
|
-
}, vs = function(e, t) {
|
|
3131
|
-
return e === "v" ? jd(t) : Gd(t);
|
|
3132
3130
|
}, ys = function(e, t) {
|
|
3131
|
+
return e === "v" ? Vd(t) : Gd(t);
|
|
3132
|
+
}, ws = function(e, t) {
|
|
3133
3133
|
return e === "v" ? Yd(t) : qd(t);
|
|
3134
3134
|
}, Kd = function(e, t) {
|
|
3135
3135
|
return e === "h" && t === "rtl" ? -1 : 1;
|
|
@@ -3138,8 +3138,8 @@ var St = Mr ? { passive: !1 } : !1, Vd = function(e) {
|
|
|
3138
3138
|
do {
|
|
3139
3139
|
if (!i)
|
|
3140
3140
|
break;
|
|
3141
|
-
var p =
|
|
3142
|
-
(w ||
|
|
3141
|
+
var p = ws(e, i), w = p[0], h = p[1], v = p[2], k = h - v - a * w;
|
|
3142
|
+
(w || k) && ys(e, i) && (m += k, g += w);
|
|
3143
3143
|
var C = i.parentNode;
|
|
3144
3144
|
i = C && C.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? C.host : C;
|
|
3145
3145
|
} while (
|
|
@@ -3163,26 +3163,26 @@ var St = Mr ? { passive: !1 } : !1, Vd = function(e) {
|
|
|
3163
3163
|
`);
|
|
3164
3164
|
}, Jd = 0, Ct = [];
|
|
3165
3165
|
function ef(e) {
|
|
3166
|
-
var t = f.useRef([]), n = f.useRef([0, 0]), r = f.useRef(), o = f.useState(Jd++)[0], a = f.useState(
|
|
3166
|
+
var t = f.useRef([]), n = f.useRef([0, 0]), r = f.useRef(), o = f.useState(Jd++)[0], a = f.useState(bs)[0], s = f.useRef(e);
|
|
3167
3167
|
f.useEffect(function() {
|
|
3168
3168
|
s.current = e;
|
|
3169
3169
|
}, [e]), f.useEffect(function() {
|
|
3170
3170
|
if (e.inert) {
|
|
3171
3171
|
document.body.classList.add("block-interactivity-".concat(o));
|
|
3172
3172
|
var h = xd([e.lockRef.current], (e.shards || []).map(ta), !0).filter(Boolean);
|
|
3173
|
-
return h.forEach(function(
|
|
3174
|
-
return
|
|
3173
|
+
return h.forEach(function(v) {
|
|
3174
|
+
return v.classList.add("allow-interactivity-".concat(o));
|
|
3175
3175
|
}), function() {
|
|
3176
|
-
document.body.classList.remove("block-interactivity-".concat(o)), h.forEach(function(
|
|
3177
|
-
return
|
|
3176
|
+
document.body.classList.remove("block-interactivity-".concat(o)), h.forEach(function(v) {
|
|
3177
|
+
return v.classList.remove("allow-interactivity-".concat(o));
|
|
3178
3178
|
});
|
|
3179
3179
|
};
|
|
3180
3180
|
}
|
|
3181
3181
|
}, [e.inert, e.lockRef.current, e.shards]);
|
|
3182
|
-
var i = f.useCallback(function(h,
|
|
3182
|
+
var i = f.useCallback(function(h, v) {
|
|
3183
3183
|
if ("touches" in h && h.touches.length === 2 || h.type === "wheel" && h.ctrlKey)
|
|
3184
3184
|
return !s.current.allowPinchZoom;
|
|
3185
|
-
var
|
|
3185
|
+
var k = mn(h), C = n.current, E = "deltaX" in h ? h.deltaX : C[0] - k[0], y = "deltaY" in h ? h.deltaY : C[1] - k[1], T, D = h.target, _ = Math.abs(E) > Math.abs(y) ? "h" : "v";
|
|
3186
3186
|
if ("touches" in h && _ === "h" && D.type === "range")
|
|
3187
3187
|
return !1;
|
|
3188
3188
|
var P = Jo(_, D);
|
|
@@ -3190,32 +3190,32 @@ function ef(e) {
|
|
|
3190
3190
|
return !0;
|
|
3191
3191
|
if (P ? T = _ : (T = _ === "v" ? "h" : "v", P = Jo(_, D)), !P)
|
|
3192
3192
|
return !1;
|
|
3193
|
-
if (!r.current && "changedTouches" in h && (
|
|
3193
|
+
if (!r.current && "changedTouches" in h && (E || y) && (r.current = T), !T)
|
|
3194
3194
|
return !0;
|
|
3195
3195
|
var z = r.current || T;
|
|
3196
|
-
return Xd(z,
|
|
3196
|
+
return Xd(z, v, h, z === "h" ? E : y);
|
|
3197
3197
|
}, []), c = f.useCallback(function(h) {
|
|
3198
|
-
var
|
|
3198
|
+
var v = h;
|
|
3199
3199
|
if (!(!Ct.length || Ct[Ct.length - 1] !== a)) {
|
|
3200
|
-
var
|
|
3201
|
-
return T.name ===
|
|
3200
|
+
var k = "deltaY" in v ? ea(v) : mn(v), C = t.current.filter(function(T) {
|
|
3201
|
+
return T.name === v.type && (T.target === v.target || v.target === T.shadowParent) && Qd(T.delta, k);
|
|
3202
3202
|
})[0];
|
|
3203
3203
|
if (C && C.should) {
|
|
3204
|
-
|
|
3204
|
+
v.cancelable && v.preventDefault();
|
|
3205
3205
|
return;
|
|
3206
3206
|
}
|
|
3207
3207
|
if (!C) {
|
|
3208
|
-
var
|
|
3209
|
-
return T.contains(
|
|
3210
|
-
}),
|
|
3211
|
-
|
|
3208
|
+
var E = (s.current.shards || []).map(ta).filter(Boolean).filter(function(T) {
|
|
3209
|
+
return T.contains(v.target);
|
|
3210
|
+
}), y = E.length > 0 ? i(v, E[0]) : !s.current.noIsolation;
|
|
3211
|
+
y && v.cancelable && v.preventDefault();
|
|
3212
3212
|
}
|
|
3213
3213
|
}
|
|
3214
|
-
}, []), l = f.useCallback(function(h,
|
|
3215
|
-
var
|
|
3216
|
-
t.current.push(
|
|
3217
|
-
t.current = t.current.filter(function(
|
|
3218
|
-
return
|
|
3214
|
+
}, []), l = f.useCallback(function(h, v, k, C) {
|
|
3215
|
+
var E = { name: h, delta: v, target: k, should: C, shadowParent: tf(k) };
|
|
3216
|
+
t.current.push(E), setTimeout(function() {
|
|
3217
|
+
t.current = t.current.filter(function(y) {
|
|
3218
|
+
return y !== E;
|
|
3219
3219
|
});
|
|
3220
3220
|
}, 1);
|
|
3221
3221
|
}, []), d = f.useCallback(function(h) {
|
|
@@ -3249,15 +3249,15 @@ function tf(e) {
|
|
|
3249
3249
|
e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
|
|
3250
3250
|
return t;
|
|
3251
3251
|
}
|
|
3252
|
-
const nf = Rd(
|
|
3252
|
+
const nf = Rd(gs, ef);
|
|
3253
3253
|
var io = f.forwardRef(function(e, t) {
|
|
3254
3254
|
return f.createElement(Wn, We({}, e, { ref: t, sideCar: nf }));
|
|
3255
3255
|
});
|
|
3256
3256
|
io.classNames = Wn.classNames;
|
|
3257
|
-
var rf = [" ", "Enter", "ArrowUp", "ArrowDown"], of = [" ", "Enter"], mt = "Select", [zn, Bn, af] =
|
|
3257
|
+
var rf = [" ", "Enter", "ArrowUp", "ArrowDown"], of = [" ", "Enter"], mt = "Select", [zn, Bn, af] = _a(mt), [Mt] = ht(mt, [
|
|
3258
3258
|
af,
|
|
3259
3259
|
$n
|
|
3260
|
-
]), Hn = $n(), [sf, ot] = Mt(mt), [cf, lf] = Mt(mt),
|
|
3260
|
+
]), Hn = $n(), [sf, ot] = Mt(mt), [cf, lf] = Mt(mt), xs = (e) => {
|
|
3261
3261
|
const {
|
|
3262
3262
|
__scopeSelect: t,
|
|
3263
3263
|
children: n,
|
|
@@ -3273,31 +3273,31 @@ var rf = [" ", "Enter", "ArrowUp", "ArrowDown"], of = [" ", "Enter"], mt = "Sele
|
|
|
3273
3273
|
disabled: g,
|
|
3274
3274
|
required: p,
|
|
3275
3275
|
form: w
|
|
3276
|
-
} = e, h = Hn(t), [
|
|
3276
|
+
} = e, h = Hn(t), [v, k] = f.useState(null), [C, E] = f.useState(null), [y, T] = f.useState(!1), D = qr(l), [_, P] = Xt({
|
|
3277
3277
|
prop: r,
|
|
3278
3278
|
defaultProp: o ?? !1,
|
|
3279
3279
|
onChange: a,
|
|
3280
3280
|
caller: mt
|
|
3281
|
-
}), [z,
|
|
3281
|
+
}), [z, V] = Xt({
|
|
3282
3282
|
prop: s,
|
|
3283
3283
|
defaultProp: i,
|
|
3284
3284
|
onChange: c,
|
|
3285
3285
|
caller: mt
|
|
3286
|
-
}), H = f.useRef(null), G =
|
|
3287
|
-
return /* @__PURE__ */ u(
|
|
3286
|
+
}), H = f.useRef(null), G = v ? w || !!v.closest("form") : !0, [x, N] = f.useState(/* @__PURE__ */ new Set()), R = Array.from(x).map((O) => O.props.value).join(";");
|
|
3287
|
+
return /* @__PURE__ */ u(is, { ...h, children: /* @__PURE__ */ I(
|
|
3288
3288
|
sf,
|
|
3289
3289
|
{
|
|
3290
3290
|
required: p,
|
|
3291
3291
|
scope: t,
|
|
3292
|
-
trigger:
|
|
3293
|
-
onTriggerChange:
|
|
3292
|
+
trigger: v,
|
|
3293
|
+
onTriggerChange: k,
|
|
3294
3294
|
valueNode: C,
|
|
3295
|
-
onValueNodeChange:
|
|
3296
|
-
valueNodeHasChildren:
|
|
3295
|
+
onValueNodeChange: E,
|
|
3296
|
+
valueNodeHasChildren: y,
|
|
3297
3297
|
onValueNodeHasChildrenChange: T,
|
|
3298
3298
|
contentId: Zt(),
|
|
3299
3299
|
value: z,
|
|
3300
|
-
onValueChange:
|
|
3300
|
+
onValueChange: V,
|
|
3301
3301
|
open: _,
|
|
3302
3302
|
onOpenChange: P,
|
|
3303
3303
|
dir: D,
|
|
@@ -3329,7 +3329,7 @@ var rf = [" ", "Enter", "ArrowUp", "ArrowDown"], of = [" ", "Enter"], mt = "Sele
|
|
|
3329
3329
|
name: d,
|
|
3330
3330
|
autoComplete: m,
|
|
3331
3331
|
value: z,
|
|
3332
|
-
onChange: (O) =>
|
|
3332
|
+
onChange: (O) => V(O.target.value),
|
|
3333
3333
|
disabled: g,
|
|
3334
3334
|
form: w,
|
|
3335
3335
|
children: [
|
|
@@ -3343,11 +3343,11 @@ var rf = [" ", "Enter", "ArrowUp", "ArrowDown"], of = [" ", "Enter"], mt = "Sele
|
|
|
3343
3343
|
}
|
|
3344
3344
|
) });
|
|
3345
3345
|
};
|
|
3346
|
-
|
|
3347
|
-
var
|
|
3346
|
+
xs.displayName = mt;
|
|
3347
|
+
var Ss = "SelectTrigger", Cs = f.forwardRef(
|
|
3348
3348
|
(e, t) => {
|
|
3349
|
-
const { __scopeSelect: n, disabled: r = !1, ...o } = e, a = Hn(n), s = ot(
|
|
3350
|
-
const
|
|
3349
|
+
const { __scopeSelect: n, disabled: r = !1, ...o } = e, a = Hn(n), s = ot(Ss, n), i = s.disabled || r, c = ie(t, s.onTriggerChange), l = Bn(n), d = f.useRef("touch"), [m, g, p] = Ys((h) => {
|
|
3350
|
+
const v = l().filter((E) => !E.disabled), k = v.find((E) => E.value === s.value), C = qs(v, h, k);
|
|
3351
3351
|
C !== void 0 && s.onValueChange(C.value);
|
|
3352
3352
|
}), w = (h) => {
|
|
3353
3353
|
i || (s.onOpenChange(!0), p()), h && (s.triggerPointerDownPosRef.current = {
|
|
@@ -3368,7 +3368,7 @@ var xs = "SelectTrigger", Ss = f.forwardRef(
|
|
|
3368
3368
|
"data-state": s.open ? "open" : "closed",
|
|
3369
3369
|
disabled: i,
|
|
3370
3370
|
"data-disabled": i ? "" : void 0,
|
|
3371
|
-
"data-placeholder":
|
|
3371
|
+
"data-placeholder": Gs(s.value) ? "" : void 0,
|
|
3372
3372
|
...o,
|
|
3373
3373
|
ref: c,
|
|
3374
3374
|
onClick: Z(o.onClick, (h) => {
|
|
@@ -3376,21 +3376,21 @@ var xs = "SelectTrigger", Ss = f.forwardRef(
|
|
|
3376
3376
|
}),
|
|
3377
3377
|
onPointerDown: Z(o.onPointerDown, (h) => {
|
|
3378
3378
|
d.current = h.pointerType;
|
|
3379
|
-
const
|
|
3380
|
-
|
|
3379
|
+
const v = h.target;
|
|
3380
|
+
v.hasPointerCapture(h.pointerId) && v.releasePointerCapture(h.pointerId), h.button === 0 && h.ctrlKey === !1 && h.pointerType === "mouse" && (w(h), h.preventDefault());
|
|
3381
3381
|
}),
|
|
3382
3382
|
onKeyDown: Z(o.onKeyDown, (h) => {
|
|
3383
|
-
const
|
|
3384
|
-
!(h.ctrlKey || h.altKey || h.metaKey) && h.key.length === 1 && g(h.key), !(
|
|
3383
|
+
const v = m.current !== "";
|
|
3384
|
+
!(h.ctrlKey || h.altKey || h.metaKey) && h.key.length === 1 && g(h.key), !(v && h.key === " ") && rf.includes(h.key) && (w(), h.preventDefault());
|
|
3385
3385
|
})
|
|
3386
3386
|
}
|
|
3387
3387
|
) });
|
|
3388
3388
|
}
|
|
3389
3389
|
);
|
|
3390
|
-
|
|
3391
|
-
var
|
|
3390
|
+
Cs.displayName = Ss;
|
|
3391
|
+
var Es = "SelectValue", ks = f.forwardRef(
|
|
3392
3392
|
(e, t) => {
|
|
3393
|
-
const { __scopeSelect: n, className: r, style: o, children: a, placeholder: s = "", ...i } = e, c = ot(
|
|
3393
|
+
const { __scopeSelect: n, className: r, style: o, children: a, placeholder: s = "", ...i } = e, c = ot(Es, n), { onValueNodeHasChildrenChange: l } = c, d = a !== void 0, m = ie(t, c.onValueNodeChange);
|
|
3394
3394
|
return be(() => {
|
|
3395
3395
|
l(d);
|
|
3396
3396
|
}, [l, d]), /* @__PURE__ */ u(
|
|
@@ -3399,22 +3399,22 @@ var Cs = "SelectValue", Es = f.forwardRef(
|
|
|
3399
3399
|
...i,
|
|
3400
3400
|
ref: m,
|
|
3401
3401
|
style: { pointerEvents: "none" },
|
|
3402
|
-
children:
|
|
3402
|
+
children: Gs(c.value) ? /* @__PURE__ */ u(Rt, { children: s }) : a
|
|
3403
3403
|
}
|
|
3404
3404
|
);
|
|
3405
3405
|
}
|
|
3406
3406
|
);
|
|
3407
|
-
|
|
3408
|
-
var uf = "SelectIcon",
|
|
3407
|
+
ks.displayName = Es;
|
|
3408
|
+
var uf = "SelectIcon", As = f.forwardRef(
|
|
3409
3409
|
(e, t) => {
|
|
3410
3410
|
const { __scopeSelect: n, children: r, ...o } = e;
|
|
3411
3411
|
return /* @__PURE__ */ u(Ae.span, { "aria-hidden": !0, ...o, ref: t, children: r || "▼" });
|
|
3412
3412
|
}
|
|
3413
3413
|
);
|
|
3414
|
-
|
|
3415
|
-
var df = "SelectPortal",
|
|
3416
|
-
|
|
3417
|
-
var pt = "SelectContent",
|
|
3414
|
+
As.displayName = uf;
|
|
3415
|
+
var df = "SelectPortal", Ns = (e) => /* @__PURE__ */ u(so, { asChild: !0, ...e });
|
|
3416
|
+
Ns.displayName = df;
|
|
3417
|
+
var pt = "SelectContent", Ts = f.forwardRef(
|
|
3418
3418
|
(e, t) => {
|
|
3419
3419
|
const n = ot(pt, e.__scopeSelect), [r, o] = f.useState();
|
|
3420
3420
|
if (be(() => {
|
|
@@ -3422,15 +3422,15 @@ var pt = "SelectContent", Ns = f.forwardRef(
|
|
|
3422
3422
|
}, []), !n.open) {
|
|
3423
3423
|
const a = r;
|
|
3424
3424
|
return a ? _n.createPortal(
|
|
3425
|
-
/* @__PURE__ */ u(
|
|
3425
|
+
/* @__PURE__ */ u(Ps, { scope: e.__scopeSelect, children: /* @__PURE__ */ u(zn.Slot, { scope: e.__scopeSelect, children: /* @__PURE__ */ u("div", { children: e.children }) }) }),
|
|
3426
3426
|
a
|
|
3427
3427
|
) : null;
|
|
3428
3428
|
}
|
|
3429
|
-
return /* @__PURE__ */ u(
|
|
3429
|
+
return /* @__PURE__ */ u(Rs, { ...e, ref: t });
|
|
3430
3430
|
}
|
|
3431
3431
|
);
|
|
3432
|
-
|
|
3433
|
-
var Oe = 10, [
|
|
3432
|
+
Ts.displayName = pt;
|
|
3433
|
+
var Oe = 10, [Ps, at] = Mt(pt), ff = "SelectContentImpl", mf = /* @__PURE__ */ Ce("SelectContent.RemoveScroll"), Rs = f.forwardRef(
|
|
3434
3434
|
(e, t) => {
|
|
3435
3435
|
const {
|
|
3436
3436
|
__scopeSelect: n,
|
|
@@ -3449,15 +3449,15 @@ var Oe = 10, [Ts, at] = Mt(pt), ff = "SelectContentImpl", mf = /* @__PURE__ */ C
|
|
|
3449
3449
|
collisionPadding: p,
|
|
3450
3450
|
sticky: w,
|
|
3451
3451
|
hideWhenDetached: h,
|
|
3452
|
-
avoidCollisions:
|
|
3452
|
+
avoidCollisions: v,
|
|
3453
3453
|
//
|
|
3454
|
-
...
|
|
3455
|
-
} = e, C = ot(pt, n), [
|
|
3454
|
+
...k
|
|
3455
|
+
} = e, C = ot(pt, n), [E, y] = f.useState(null), [T, D] = f.useState(null), _ = ie(t, (L) => y(L)), [P, z] = f.useState(null), [V, H] = f.useState(
|
|
3456
3456
|
null
|
|
3457
3457
|
), G = Bn(n), [x, N] = f.useState(!1), R = f.useRef(!1);
|
|
3458
3458
|
f.useEffect(() => {
|
|
3459
|
-
if (
|
|
3460
|
-
}, [
|
|
3459
|
+
if (E) return ms(E);
|
|
3460
|
+
}, [E]), La();
|
|
3461
3461
|
const O = f.useCallback(
|
|
3462
3462
|
(L) => {
|
|
3463
3463
|
const [te, ...ce] = G().map((oe) => oe.ref.current), [Q] = ce.slice(-1), ne = document.activeElement;
|
|
@@ -3466,15 +3466,15 @@ var Oe = 10, [Ts, at] = Mt(pt), ff = "SelectContentImpl", mf = /* @__PURE__ */ C
|
|
|
3466
3466
|
},
|
|
3467
3467
|
[G, T]
|
|
3468
3468
|
), A = f.useCallback(
|
|
3469
|
-
() => O([P,
|
|
3470
|
-
[O, P,
|
|
3469
|
+
() => O([P, E]),
|
|
3470
|
+
[O, P, E]
|
|
3471
3471
|
);
|
|
3472
3472
|
f.useEffect(() => {
|
|
3473
3473
|
x && A();
|
|
3474
3474
|
}, [x, A]);
|
|
3475
3475
|
const { onOpenChange: S, triggerPointerDownPosRef: W } = C;
|
|
3476
3476
|
f.useEffect(() => {
|
|
3477
|
-
if (
|
|
3477
|
+
if (E) {
|
|
3478
3478
|
let L = { x: 0, y: 0 };
|
|
3479
3479
|
const te = (Q) => {
|
|
3480
3480
|
L = {
|
|
@@ -3482,20 +3482,20 @@ var Oe = 10, [Ts, at] = Mt(pt), ff = "SelectContentImpl", mf = /* @__PURE__ */ C
|
|
|
3482
3482
|
y: Math.abs(Math.round(Q.pageY) - (W.current?.y ?? 0))
|
|
3483
3483
|
};
|
|
3484
3484
|
}, ce = (Q) => {
|
|
3485
|
-
L.x <= 10 && L.y <= 10 ? Q.preventDefault() :
|
|
3485
|
+
L.x <= 10 && L.y <= 10 ? Q.preventDefault() : E.contains(Q.target) || S(!1), document.removeEventListener("pointermove", te), W.current = null;
|
|
3486
3486
|
};
|
|
3487
3487
|
return W.current !== null && (document.addEventListener("pointermove", te), document.addEventListener("pointerup", ce, { capture: !0, once: !0 })), () => {
|
|
3488
3488
|
document.removeEventListener("pointermove", te), document.removeEventListener("pointerup", ce, { capture: !0 });
|
|
3489
3489
|
};
|
|
3490
3490
|
}
|
|
3491
|
-
}, [
|
|
3491
|
+
}, [E, S, W]), f.useEffect(() => {
|
|
3492
3492
|
const L = () => S(!1);
|
|
3493
3493
|
return window.addEventListener("blur", L), window.addEventListener("resize", L), () => {
|
|
3494
3494
|
window.removeEventListener("blur", L), window.removeEventListener("resize", L);
|
|
3495
3495
|
};
|
|
3496
3496
|
}, [S]);
|
|
3497
|
-
const [Y,
|
|
3498
|
-
const te = G().filter((ne) => !ne.disabled), ce = te.find((ne) => ne.ref.current === document.activeElement), Q =
|
|
3497
|
+
const [Y, j] = Ys((L) => {
|
|
3498
|
+
const te = G().filter((ne) => !ne.disabled), ce = te.find((ne) => ne.ref.current === document.activeElement), Q = qs(te, L, ce);
|
|
3499
3499
|
Q && setTimeout(() => Q.ref.current.focus());
|
|
3500
3500
|
}), ve = f.useCallback(
|
|
3501
3501
|
(L, te, ce) => {
|
|
@@ -3503,13 +3503,13 @@ var Oe = 10, [Ts, at] = Mt(pt), ff = "SelectContentImpl", mf = /* @__PURE__ */ C
|
|
|
3503
3503
|
(C.value !== void 0 && C.value === te || Q) && (z(L), Q && (R.current = !0));
|
|
3504
3504
|
},
|
|
3505
3505
|
[C.value]
|
|
3506
|
-
), q = f.useCallback(() =>
|
|
3506
|
+
), q = f.useCallback(() => E?.focus(), [E]), ee = f.useCallback(
|
|
3507
3507
|
(L, te, ce) => {
|
|
3508
3508
|
const Q = !R.current && !ce;
|
|
3509
3509
|
(C.value !== void 0 && C.value === te || Q) && H(L);
|
|
3510
3510
|
},
|
|
3511
3511
|
[C.value]
|
|
3512
|
-
), J = r === "popper" ? Ir :
|
|
3512
|
+
), J = r === "popper" ? Ir : Os, he = J === Ir ? {
|
|
3513
3513
|
side: i,
|
|
3514
3514
|
sideOffset: c,
|
|
3515
3515
|
align: l,
|
|
@@ -3519,13 +3519,13 @@ var Oe = 10, [Ts, at] = Mt(pt), ff = "SelectContentImpl", mf = /* @__PURE__ */ C
|
|
|
3519
3519
|
collisionPadding: p,
|
|
3520
3520
|
sticky: w,
|
|
3521
3521
|
hideWhenDetached: h,
|
|
3522
|
-
avoidCollisions:
|
|
3522
|
+
avoidCollisions: v
|
|
3523
3523
|
} : {};
|
|
3524
3524
|
return /* @__PURE__ */ u(
|
|
3525
|
-
|
|
3525
|
+
Ps,
|
|
3526
3526
|
{
|
|
3527
3527
|
scope: n,
|
|
3528
|
-
content:
|
|
3528
|
+
content: E,
|
|
3529
3529
|
viewport: T,
|
|
3530
3530
|
onViewportChange: D,
|
|
3531
3531
|
itemRefCallback: ve,
|
|
@@ -3533,7 +3533,7 @@ var Oe = 10, [Ts, at] = Mt(pt), ff = "SelectContentImpl", mf = /* @__PURE__ */ C
|
|
|
3533
3533
|
onItemLeave: q,
|
|
3534
3534
|
itemTextRefCallback: ee,
|
|
3535
3535
|
focusSelectedItem: A,
|
|
3536
|
-
selectedItemText:
|
|
3536
|
+
selectedItemText: V,
|
|
3537
3537
|
position: r,
|
|
3538
3538
|
isPositioned: x,
|
|
3539
3539
|
searchRef: Y,
|
|
@@ -3565,7 +3565,7 @@ var Oe = 10, [Ts, at] = Mt(pt), ff = "SelectContentImpl", mf = /* @__PURE__ */ C
|
|
|
3565
3565
|
"data-state": C.open ? "open" : "closed",
|
|
3566
3566
|
dir: C.dir,
|
|
3567
3567
|
onContextMenu: (L) => L.preventDefault(),
|
|
3568
|
-
...
|
|
3568
|
+
...k,
|
|
3569
3569
|
...he,
|
|
3570
3570
|
onPlaced: () => N(!0),
|
|
3571
3571
|
ref: _,
|
|
@@ -3575,11 +3575,11 @@ var Oe = 10, [Ts, at] = Mt(pt), ff = "SelectContentImpl", mf = /* @__PURE__ */ C
|
|
|
3575
3575
|
flexDirection: "column",
|
|
3576
3576
|
// reset the outline by default as the content MAY get focused
|
|
3577
3577
|
outline: "none",
|
|
3578
|
-
...
|
|
3578
|
+
...k.style
|
|
3579
3579
|
},
|
|
3580
|
-
onKeyDown: Z(
|
|
3580
|
+
onKeyDown: Z(k.onKeyDown, (L) => {
|
|
3581
3581
|
const te = L.ctrlKey || L.altKey || L.metaKey;
|
|
3582
|
-
if (L.key === "Tab" && L.preventDefault(), !te && L.key.length === 1 &&
|
|
3582
|
+
if (L.key === "Tab" && L.preventDefault(), !te && L.key.length === 1 && j(L.key), ["ArrowUp", "ArrowDown", "Home", "End"].includes(L.key)) {
|
|
3583
3583
|
let Q = G().filter((ne) => !ne.disabled).map((ne) => ne.ref.current);
|
|
3584
3584
|
if (["ArrowUp", "End"].includes(L.key) && (Q = Q.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(L.key)) {
|
|
3585
3585
|
const ne = L.target, oe = Q.indexOf(ne);
|
|
@@ -3598,13 +3598,13 @@ var Oe = 10, [Ts, at] = Mt(pt), ff = "SelectContentImpl", mf = /* @__PURE__ */ C
|
|
|
3598
3598
|
);
|
|
3599
3599
|
}
|
|
3600
3600
|
);
|
|
3601
|
-
|
|
3602
|
-
var pf = "SelectItemAlignedPosition",
|
|
3603
|
-
const { __scopeSelect: n, onPlaced: r, ...o } = e, a = ot(pt, n), s = at(pt, n), [i, c] = f.useState(null), [l, d] = f.useState(null), m = ie(t, (_) => d(_)), g = Bn(n), p = f.useRef(!1), w = f.useRef(!0), { viewport: h, selectedItem:
|
|
3604
|
-
if (a.trigger && a.valueNode && i && l && h &&
|
|
3605
|
-
const _ = a.trigger.getBoundingClientRect(), P = l.getBoundingClientRect(), z = a.valueNode.getBoundingClientRect(),
|
|
3601
|
+
Rs.displayName = ff;
|
|
3602
|
+
var pf = "SelectItemAlignedPosition", Os = f.forwardRef((e, t) => {
|
|
3603
|
+
const { __scopeSelect: n, onPlaced: r, ...o } = e, a = ot(pt, n), s = at(pt, n), [i, c] = f.useState(null), [l, d] = f.useState(null), m = ie(t, (_) => d(_)), g = Bn(n), p = f.useRef(!1), w = f.useRef(!0), { viewport: h, selectedItem: v, selectedItemText: k, focusSelectedItem: C } = s, E = f.useCallback(() => {
|
|
3604
|
+
if (a.trigger && a.valueNode && i && l && h && v && k) {
|
|
3605
|
+
const _ = a.trigger.getBoundingClientRect(), P = l.getBoundingClientRect(), z = a.valueNode.getBoundingClientRect(), V = k.getBoundingClientRect();
|
|
3606
3606
|
if (a.dir !== "rtl") {
|
|
3607
|
-
const ne =
|
|
3607
|
+
const ne = V.left - P.left, oe = z.left - ne, de = _.left - oe, Ne = _.width + de, Re = Math.max(Ne, P.width), it = window.innerWidth - Oe, ct = Oo(oe, [
|
|
3608
3608
|
Oe,
|
|
3609
3609
|
// Prevents the content from going off the starting edge of the
|
|
3610
3610
|
// viewport. It may still go off the ending edge, but this can be
|
|
@@ -3615,15 +3615,15 @@ var pf = "SelectItemAlignedPosition", Rs = f.forwardRef((e, t) => {
|
|
|
3615
3615
|
]);
|
|
3616
3616
|
i.style.minWidth = Ne + "px", i.style.left = ct + "px";
|
|
3617
3617
|
} else {
|
|
3618
|
-
const ne = P.right -
|
|
3618
|
+
const ne = P.right - V.right, oe = window.innerWidth - z.right - ne, de = window.innerWidth - _.right - oe, Ne = _.width + de, Re = Math.max(Ne, P.width), it = window.innerWidth - Oe, ct = Oo(oe, [
|
|
3619
3619
|
Oe,
|
|
3620
3620
|
Math.max(Oe, it - Re)
|
|
3621
3621
|
]);
|
|
3622
3622
|
i.style.minWidth = Ne + "px", i.style.right = ct + "px";
|
|
3623
3623
|
}
|
|
3624
|
-
const H = g(), G = window.innerHeight - Oe * 2, x = h.scrollHeight, N = window.getComputedStyle(l), R = parseInt(N.borderTopWidth, 10), O = parseInt(N.paddingTop, 10), A = parseInt(N.borderBottomWidth, 10), S = parseInt(N.paddingBottom, 10), W = R + O + x + S + A, Y = Math.min(
|
|
3624
|
+
const H = g(), G = window.innerHeight - Oe * 2, x = h.scrollHeight, N = window.getComputedStyle(l), R = parseInt(N.borderTopWidth, 10), O = parseInt(N.paddingTop, 10), A = parseInt(N.borderBottomWidth, 10), S = parseInt(N.paddingBottom, 10), W = R + O + x + S + A, Y = Math.min(v.offsetHeight * 5, W), j = window.getComputedStyle(h), ve = parseInt(j.paddingTop, 10), q = parseInt(j.paddingBottom, 10), ee = _.top + _.height / 2 - Oe, J = G - ee, he = v.offsetHeight / 2, L = v.offsetTop + he, te = R + O + L, ce = W - te;
|
|
3625
3625
|
if (te <= ee) {
|
|
3626
|
-
const ne = H.length > 0 &&
|
|
3626
|
+
const ne = H.length > 0 && v === H[H.length - 1].ref.current;
|
|
3627
3627
|
i.style.bottom = "0px";
|
|
3628
3628
|
const oe = l.clientHeight - h.offsetTop - h.offsetHeight, de = Math.max(
|
|
3629
3629
|
J,
|
|
@@ -3632,7 +3632,7 @@ var pf = "SelectItemAlignedPosition", Rs = f.forwardRef((e, t) => {
|
|
|
3632
3632
|
), Ne = te + de;
|
|
3633
3633
|
i.style.height = Ne + "px";
|
|
3634
3634
|
} else {
|
|
3635
|
-
const ne = H.length > 0 &&
|
|
3635
|
+
const ne = H.length > 0 && v === H[0].ref.current;
|
|
3636
3636
|
i.style.top = "0px";
|
|
3637
3637
|
const de = Math.max(
|
|
3638
3638
|
ee,
|
|
@@ -3650,21 +3650,21 @@ var pf = "SelectItemAlignedPosition", Rs = f.forwardRef((e, t) => {
|
|
|
3650
3650
|
i,
|
|
3651
3651
|
l,
|
|
3652
3652
|
h,
|
|
3653
|
-
|
|
3654
|
-
|
|
3653
|
+
v,
|
|
3654
|
+
k,
|
|
3655
3655
|
a.dir,
|
|
3656
3656
|
r
|
|
3657
3657
|
]);
|
|
3658
|
-
be(() =>
|
|
3659
|
-
const [
|
|
3658
|
+
be(() => E(), [E]);
|
|
3659
|
+
const [y, T] = f.useState();
|
|
3660
3660
|
be(() => {
|
|
3661
3661
|
l && T(window.getComputedStyle(l).zIndex);
|
|
3662
3662
|
}, [l]);
|
|
3663
3663
|
const D = f.useCallback(
|
|
3664
3664
|
(_) => {
|
|
3665
|
-
_ && w.current === !0 && (
|
|
3665
|
+
_ && w.current === !0 && (E(), C?.(), w.current = !1);
|
|
3666
3666
|
},
|
|
3667
|
-
[
|
|
3667
|
+
[E, C]
|
|
3668
3668
|
);
|
|
3669
3669
|
return /* @__PURE__ */ u(
|
|
3670
3670
|
gf,
|
|
@@ -3681,7 +3681,7 @@ var pf = "SelectItemAlignedPosition", Rs = f.forwardRef((e, t) => {
|
|
|
3681
3681
|
display: "flex",
|
|
3682
3682
|
flexDirection: "column",
|
|
3683
3683
|
position: "fixed",
|
|
3684
|
-
zIndex:
|
|
3684
|
+
zIndex: y
|
|
3685
3685
|
},
|
|
3686
3686
|
children: /* @__PURE__ */ u(
|
|
3687
3687
|
Ae.div,
|
|
@@ -3703,7 +3703,7 @@ var pf = "SelectItemAlignedPosition", Rs = f.forwardRef((e, t) => {
|
|
|
3703
3703
|
}
|
|
3704
3704
|
);
|
|
3705
3705
|
});
|
|
3706
|
-
|
|
3706
|
+
Os.displayName = pf;
|
|
3707
3707
|
var hf = "SelectPopperPosition", Ir = f.forwardRef((e, t) => {
|
|
3708
3708
|
const {
|
|
3709
3709
|
__scopeSelect: n,
|
|
@@ -3712,7 +3712,7 @@ var hf = "SelectPopperPosition", Ir = f.forwardRef((e, t) => {
|
|
|
3712
3712
|
...a
|
|
3713
3713
|
} = e, s = Hn(n);
|
|
3714
3714
|
return /* @__PURE__ */ u(
|
|
3715
|
-
|
|
3715
|
+
cs,
|
|
3716
3716
|
{
|
|
3717
3717
|
...s,
|
|
3718
3718
|
...a,
|
|
@@ -3733,7 +3733,7 @@ var hf = "SelectPopperPosition", Ir = f.forwardRef((e, t) => {
|
|
|
3733
3733
|
);
|
|
3734
3734
|
});
|
|
3735
3735
|
Ir.displayName = hf;
|
|
3736
|
-
var [gf, co] = Mt(pt, {}), Dr = "SelectViewport",
|
|
3736
|
+
var [gf, co] = Mt(pt, {}), Dr = "SelectViewport", _s = f.forwardRef(
|
|
3737
3737
|
(e, t) => {
|
|
3738
3738
|
const { __scopeSelect: n, nonce: r, ...o } = e, a = at(Dr, n), s = co(Dr, n), i = ie(t, a.onViewportChange), c = f.useRef(0);
|
|
3739
3739
|
return /* @__PURE__ */ I(Rt, { children: [
|
|
@@ -3771,10 +3771,10 @@ var [gf, co] = Mt(pt, {}), Dr = "SelectViewport", Os = f.forwardRef(
|
|
|
3771
3771
|
if (g?.current && m) {
|
|
3772
3772
|
const p = Math.abs(c.current - d.scrollTop);
|
|
3773
3773
|
if (p > 0) {
|
|
3774
|
-
const w = window.innerHeight - Oe * 2, h = parseFloat(m.style.minHeight),
|
|
3775
|
-
if (
|
|
3776
|
-
const C =
|
|
3777
|
-
m.style.height =
|
|
3774
|
+
const w = window.innerHeight - Oe * 2, h = parseFloat(m.style.minHeight), v = parseFloat(m.style.height), k = Math.max(h, v);
|
|
3775
|
+
if (k < w) {
|
|
3776
|
+
const C = k + p, E = Math.min(w, C), y = C - E;
|
|
3777
|
+
m.style.height = E + "px", m.style.bottom === "0px" && (d.scrollTop = y > 0 ? y : 0, m.style.justifyContent = "flex-end");
|
|
3778
3778
|
}
|
|
3779
3779
|
}
|
|
3780
3780
|
}
|
|
@@ -3785,22 +3785,22 @@ var [gf, co] = Mt(pt, {}), Dr = "SelectViewport", Os = f.forwardRef(
|
|
|
3785
3785
|
] });
|
|
3786
3786
|
}
|
|
3787
3787
|
);
|
|
3788
|
-
|
|
3789
|
-
var
|
|
3788
|
+
_s.displayName = Dr;
|
|
3789
|
+
var Ms = "SelectGroup", [bf, vf] = Mt(Ms), Is = f.forwardRef(
|
|
3790
3790
|
(e, t) => {
|
|
3791
3791
|
const { __scopeSelect: n, ...r } = e, o = Zt();
|
|
3792
3792
|
return /* @__PURE__ */ u(bf, { scope: n, id: o, children: /* @__PURE__ */ u(Ae.div, { role: "group", "aria-labelledby": o, ...r, ref: t }) });
|
|
3793
3793
|
}
|
|
3794
3794
|
);
|
|
3795
|
-
|
|
3796
|
-
var
|
|
3795
|
+
Is.displayName = Ms;
|
|
3796
|
+
var Ds = "SelectLabel", Ls = f.forwardRef(
|
|
3797
3797
|
(e, t) => {
|
|
3798
|
-
const { __scopeSelect: n, ...r } = e, o = vf(
|
|
3798
|
+
const { __scopeSelect: n, ...r } = e, o = vf(Ds, n);
|
|
3799
3799
|
return /* @__PURE__ */ u(Ae.div, { id: o.id, ...r, ref: t });
|
|
3800
3800
|
}
|
|
3801
3801
|
);
|
|
3802
|
-
|
|
3803
|
-
var Tn = "SelectItem", [yf,
|
|
3802
|
+
Ls.displayName = Ds;
|
|
3803
|
+
var Tn = "SelectItem", [yf, Fs] = Mt(Tn), $s = f.forwardRef(
|
|
3804
3804
|
(e, t) => {
|
|
3805
3805
|
const {
|
|
3806
3806
|
__scopeSelect: n,
|
|
@@ -3811,7 +3811,7 @@ var Tn = "SelectItem", [yf, Ls] = Mt(Tn), Fs = f.forwardRef(
|
|
|
3811
3811
|
} = e, i = ot(Tn, n), c = at(Tn, n), l = i.value === r, [d, m] = f.useState(a ?? ""), [g, p] = f.useState(!1), w = ie(
|
|
3812
3812
|
t,
|
|
3813
3813
|
(C) => c.itemRefCallback?.(C, r, o)
|
|
3814
|
-
), h = Zt(),
|
|
3814
|
+
), h = Zt(), v = f.useRef("touch"), k = () => {
|
|
3815
3815
|
o || (i.onValueChange(r), i.onOpenChange(!1));
|
|
3816
3816
|
};
|
|
3817
3817
|
if (r === "")
|
|
@@ -3827,7 +3827,7 @@ var Tn = "SelectItem", [yf, Ls] = Mt(Tn), Fs = f.forwardRef(
|
|
|
3827
3827
|
textId: h,
|
|
3828
3828
|
isSelected: l,
|
|
3829
3829
|
onItemTextChange: f.useCallback((C) => {
|
|
3830
|
-
m((
|
|
3830
|
+
m((E) => E || (C?.textContent ?? "").trim());
|
|
3831
3831
|
}, []),
|
|
3832
3832
|
children: /* @__PURE__ */ u(
|
|
3833
3833
|
zn.ItemSlot,
|
|
@@ -3852,22 +3852,22 @@ var Tn = "SelectItem", [yf, Ls] = Mt(Tn), Fs = f.forwardRef(
|
|
|
3852
3852
|
onFocus: Z(s.onFocus, () => p(!0)),
|
|
3853
3853
|
onBlur: Z(s.onBlur, () => p(!1)),
|
|
3854
3854
|
onClick: Z(s.onClick, () => {
|
|
3855
|
-
|
|
3855
|
+
v.current !== "mouse" && k();
|
|
3856
3856
|
}),
|
|
3857
3857
|
onPointerUp: Z(s.onPointerUp, () => {
|
|
3858
|
-
|
|
3858
|
+
v.current === "mouse" && k();
|
|
3859
3859
|
}),
|
|
3860
3860
|
onPointerDown: Z(s.onPointerDown, (C) => {
|
|
3861
|
-
|
|
3861
|
+
v.current = C.pointerType;
|
|
3862
3862
|
}),
|
|
3863
3863
|
onPointerMove: Z(s.onPointerMove, (C) => {
|
|
3864
|
-
|
|
3864
|
+
v.current = C.pointerType, o ? c.onItemLeave?.() : v.current === "mouse" && C.currentTarget.focus({ preventScroll: !0 });
|
|
3865
3865
|
}),
|
|
3866
3866
|
onPointerLeave: Z(s.onPointerLeave, (C) => {
|
|
3867
3867
|
C.currentTarget === document.activeElement && c.onItemLeave?.();
|
|
3868
3868
|
}),
|
|
3869
3869
|
onKeyDown: Z(s.onKeyDown, (C) => {
|
|
3870
|
-
c.searchRef?.current !== "" && C.key === " " || (of.includes(C.key) &&
|
|
3870
|
+
c.searchRef?.current !== "" && C.key === " " || (of.includes(C.key) && k(), C.key === " " && C.preventDefault());
|
|
3871
3871
|
})
|
|
3872
3872
|
}
|
|
3873
3873
|
)
|
|
@@ -3877,33 +3877,33 @@ var Tn = "SelectItem", [yf, Ls] = Mt(Tn), Fs = f.forwardRef(
|
|
|
3877
3877
|
);
|
|
3878
3878
|
}
|
|
3879
3879
|
);
|
|
3880
|
-
|
|
3881
|
-
var Gt = "SelectItemText",
|
|
3880
|
+
$s.displayName = Tn;
|
|
3881
|
+
var Gt = "SelectItemText", Ws = f.forwardRef(
|
|
3882
3882
|
(e, t) => {
|
|
3883
|
-
const { __scopeSelect: n, className: r, style: o, ...a } = e, s = ot(Gt, n), i = at(Gt, n), c =
|
|
3883
|
+
const { __scopeSelect: n, className: r, style: o, ...a } = e, s = ot(Gt, n), i = at(Gt, n), c = Fs(Gt, n), l = lf(Gt, n), [d, m] = f.useState(null), g = ie(
|
|
3884
3884
|
t,
|
|
3885
|
-
(
|
|
3885
|
+
(k) => m(k),
|
|
3886
3886
|
c.onItemTextChange,
|
|
3887
|
-
(
|
|
3887
|
+
(k) => i.itemTextRefCallback?.(k, c.value, c.disabled)
|
|
3888
3888
|
), p = d?.textContent, w = f.useMemo(
|
|
3889
3889
|
() => /* @__PURE__ */ u("option", { value: c.value, disabled: c.disabled, children: p }, c.value),
|
|
3890
3890
|
[c.disabled, c.value, p]
|
|
3891
|
-
), { onNativeOptionAdd: h, onNativeOptionRemove:
|
|
3892
|
-
return be(() => (h(w), () =>
|
|
3891
|
+
), { onNativeOptionAdd: h, onNativeOptionRemove: v } = l;
|
|
3892
|
+
return be(() => (h(w), () => v(w)), [h, v, w]), /* @__PURE__ */ I(Rt, { children: [
|
|
3893
3893
|
/* @__PURE__ */ u(Ae.span, { id: c.textId, ...a, ref: g }),
|
|
3894
3894
|
c.isSelected && s.valueNode && !s.valueNodeHasChildren ? _n.createPortal(a.children, s.valueNode) : null
|
|
3895
3895
|
] });
|
|
3896
3896
|
}
|
|
3897
3897
|
);
|
|
3898
|
-
|
|
3899
|
-
var
|
|
3898
|
+
Ws.displayName = Gt;
|
|
3899
|
+
var zs = "SelectItemIndicator", wf = f.forwardRef(
|
|
3900
3900
|
(e, t) => {
|
|
3901
3901
|
const { __scopeSelect: n, ...r } = e;
|
|
3902
|
-
return
|
|
3902
|
+
return Fs(zs, n).isSelected ? /* @__PURE__ */ u(Ae.span, { "aria-hidden": !0, ...r, ref: t }) : null;
|
|
3903
3903
|
}
|
|
3904
3904
|
);
|
|
3905
|
-
wf.displayName =
|
|
3906
|
-
var Lr = "SelectScrollUpButton",
|
|
3905
|
+
wf.displayName = zs;
|
|
3906
|
+
var Lr = "SelectScrollUpButton", Bs = f.forwardRef((e, t) => {
|
|
3907
3907
|
const n = at(Lr, e.__scopeSelect), r = co(Lr, e.__scopeSelect), [o, a] = f.useState(!1), s = ie(t, r.onScrollButtonChange);
|
|
3908
3908
|
return be(() => {
|
|
3909
3909
|
if (n.viewport && n.isPositioned) {
|
|
@@ -3915,7 +3915,7 @@ var Lr = "SelectScrollUpButton", zs = f.forwardRef((e, t) => {
|
|
|
3915
3915
|
return i(), c.addEventListener("scroll", i), () => c.removeEventListener("scroll", i);
|
|
3916
3916
|
}
|
|
3917
3917
|
}, [n.viewport, n.isPositioned]), o ? /* @__PURE__ */ u(
|
|
3918
|
-
|
|
3918
|
+
Hs,
|
|
3919
3919
|
{
|
|
3920
3920
|
...e,
|
|
3921
3921
|
ref: s,
|
|
@@ -3926,7 +3926,7 @@ var Lr = "SelectScrollUpButton", zs = f.forwardRef((e, t) => {
|
|
|
3926
3926
|
}
|
|
3927
3927
|
) : null;
|
|
3928
3928
|
});
|
|
3929
|
-
|
|
3929
|
+
Bs.displayName = Lr;
|
|
3930
3930
|
var Fr = "SelectScrollDownButton", xf = f.forwardRef((e, t) => {
|
|
3931
3931
|
const n = at(Fr, e.__scopeSelect), r = co(Fr, e.__scopeSelect), [o, a] = f.useState(!1), s = ie(t, r.onScrollButtonChange);
|
|
3932
3932
|
return be(() => {
|
|
@@ -3939,7 +3939,7 @@ var Fr = "SelectScrollDownButton", xf = f.forwardRef((e, t) => {
|
|
|
3939
3939
|
return i(), c.addEventListener("scroll", i), () => c.removeEventListener("scroll", i);
|
|
3940
3940
|
}
|
|
3941
3941
|
}, [n.viewport, n.isPositioned]), o ? /* @__PURE__ */ u(
|
|
3942
|
-
|
|
3942
|
+
Hs,
|
|
3943
3943
|
{
|
|
3944
3944
|
...e,
|
|
3945
3945
|
ref: s,
|
|
@@ -3951,7 +3951,7 @@ var Fr = "SelectScrollDownButton", xf = f.forwardRef((e, t) => {
|
|
|
3951
3951
|
) : null;
|
|
3952
3952
|
});
|
|
3953
3953
|
xf.displayName = Fr;
|
|
3954
|
-
var
|
|
3954
|
+
var Hs = f.forwardRef((e, t) => {
|
|
3955
3955
|
const { __scopeSelect: n, onAutoScroll: r, ...o } = e, a = at("SelectScrollButton", n), s = f.useRef(null), i = Bn(n), c = f.useCallback(() => {
|
|
3956
3956
|
s.current !== null && (window.clearInterval(s.current), s.current = null);
|
|
3957
3957
|
}, []);
|
|
@@ -3975,23 +3975,23 @@ var Bs = f.forwardRef((e, t) => {
|
|
|
3975
3975
|
})
|
|
3976
3976
|
}
|
|
3977
3977
|
);
|
|
3978
|
-
}), Sf = "SelectSeparator",
|
|
3978
|
+
}), Sf = "SelectSeparator", Us = f.forwardRef(
|
|
3979
3979
|
(e, t) => {
|
|
3980
3980
|
const { __scopeSelect: n, ...r } = e;
|
|
3981
3981
|
return /* @__PURE__ */ u(Ae.div, { "aria-hidden": !0, ...r, ref: t });
|
|
3982
3982
|
}
|
|
3983
3983
|
);
|
|
3984
|
-
|
|
3985
|
-
var $r = "SelectArrow",
|
|
3984
|
+
Us.displayName = Sf;
|
|
3985
|
+
var $r = "SelectArrow", js = f.forwardRef(
|
|
3986
3986
|
(e, t) => {
|
|
3987
3987
|
const { __scopeSelect: n, ...r } = e, o = Hn(n), a = ot($r, n), s = at($r, n);
|
|
3988
|
-
return a.open && s.position === "popper" ? /* @__PURE__ */ u(
|
|
3988
|
+
return a.open && s.position === "popper" ? /* @__PURE__ */ u(ls, { ...o, ...r, ref: t }) : null;
|
|
3989
3989
|
}
|
|
3990
3990
|
);
|
|
3991
|
-
|
|
3991
|
+
js.displayName = $r;
|
|
3992
3992
|
var Cf = "SelectBubbleInput", Vs = f.forwardRef(
|
|
3993
3993
|
({ __scopeSelect: e, value: t, ...n }, r) => {
|
|
3994
|
-
const o = f.useRef(null), a = ie(r, o), s =
|
|
3994
|
+
const o = f.useRef(null), a = ie(r, o), s = us(t);
|
|
3995
3995
|
return f.useEffect(() => {
|
|
3996
3996
|
const i = o.current;
|
|
3997
3997
|
if (!i) return;
|
|
@@ -4007,7 +4007,7 @@ var Cf = "SelectBubbleInput", Vs = f.forwardRef(
|
|
|
4007
4007
|
Ae.select,
|
|
4008
4008
|
{
|
|
4009
4009
|
...n,
|
|
4010
|
-
style: { ...
|
|
4010
|
+
style: { ...ds, ...n.style },
|
|
4011
4011
|
ref: a,
|
|
4012
4012
|
defaultValue: t
|
|
4013
4013
|
}
|
|
@@ -4015,10 +4015,10 @@ var Cf = "SelectBubbleInput", Vs = f.forwardRef(
|
|
|
4015
4015
|
}
|
|
4016
4016
|
);
|
|
4017
4017
|
Vs.displayName = Cf;
|
|
4018
|
-
function
|
|
4018
|
+
function Gs(e) {
|
|
4019
4019
|
return e === "" || e === void 0;
|
|
4020
4020
|
}
|
|
4021
|
-
function
|
|
4021
|
+
function Ys(e) {
|
|
4022
4022
|
const t = et(e), n = f.useRef(""), r = f.useRef(0), o = f.useCallback(
|
|
4023
4023
|
(s) => {
|
|
4024
4024
|
const i = n.current + s;
|
|
@@ -4032,7 +4032,7 @@ function Gs(e) {
|
|
|
4032
4032
|
}, []);
|
|
4033
4033
|
return f.useEffect(() => () => window.clearTimeout(r.current), []), [n, o, a];
|
|
4034
4034
|
}
|
|
4035
|
-
function
|
|
4035
|
+
function qs(e, t, n) {
|
|
4036
4036
|
const o = t.length > 1 && Array.from(t).every((l) => l === t[0]) ? t[0] : t, a = n ? e.indexOf(n) : -1;
|
|
4037
4037
|
let s = Ef(e, Math.max(a, 0));
|
|
4038
4038
|
o.length === 1 && (s = s.filter((l) => l !== n));
|
|
@@ -4044,16 +4044,49 @@ function Ys(e, t, n) {
|
|
|
4044
4044
|
function Ef(e, t) {
|
|
4045
4045
|
return e.map((n, r) => e[(t + r) % e.length]);
|
|
4046
4046
|
}
|
|
4047
|
-
var kf =
|
|
4048
|
-
function $f({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o }) {
|
|
4049
|
-
const
|
|
4050
|
-
return
|
|
4047
|
+
var kf = xs, Af = Cs, Nf = ks, Tf = As, Pf = Ns, Rf = Ts, Of = _s, _f = Is, Mf = Ls, If = $s, Df = Ws, Lf = Bs, Ff = Us, na = js;
|
|
4048
|
+
function $f({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o, apiClient: a }) {
|
|
4049
|
+
const s = t[e.name] || "", i = typeof e.disabled == "function" ? e.disabled(t) : e.disabled, [c, l] = le(e.options || []), [d, m] = le(!1);
|
|
4050
|
+
return qe(() => {
|
|
4051
|
+
(async () => {
|
|
4052
|
+
if (!e.optionsUrl || !a) {
|
|
4053
|
+
e.options && l(e.options);
|
|
4054
|
+
return;
|
|
4055
|
+
}
|
|
4056
|
+
m(!0);
|
|
4057
|
+
try {
|
|
4058
|
+
let p = e.optionsUrl, w = {};
|
|
4059
|
+
if (e.queryParams) {
|
|
4060
|
+
const E = typeof e.queryParams == "function" ? e.queryParams(t) : e.queryParams;
|
|
4061
|
+
typeof E == "string" ? p += E.startsWith("?") ? E : `?${E}` : w = { params: E };
|
|
4062
|
+
}
|
|
4063
|
+
const h = await a(p, w), v = h.data || h, C = (Array.isArray(v) ? v : []).map((E) => ({
|
|
4064
|
+
value: E[e.valueId || "key"] || E.key,
|
|
4065
|
+
label: E[e.labelId || "value"] || E.value
|
|
4066
|
+
}));
|
|
4067
|
+
l(C), n(`${e.name}_count`, C.length);
|
|
4068
|
+
} catch (p) {
|
|
4069
|
+
console.error("Failed to load options for SelectField:", p), l(e.options || []);
|
|
4070
|
+
} finally {
|
|
4071
|
+
m(!1);
|
|
4072
|
+
}
|
|
4073
|
+
})();
|
|
4074
|
+
}, [
|
|
4075
|
+
e.optionsUrl,
|
|
4076
|
+
e.options,
|
|
4077
|
+
a,
|
|
4078
|
+
e.valueId,
|
|
4079
|
+
e.labelId,
|
|
4080
|
+
// Instead of depending directly on field.queryParams (which triggers nothing when formValues change),
|
|
4081
|
+
// stringify the evaluated params so it refetches ONLY when the inputs of the API call change.
|
|
4082
|
+
JSON.stringify(typeof e.queryParams == "function" ? e.queryParams(t) : e.queryParams)
|
|
4083
|
+
]), /* @__PURE__ */ I(Rt, { children: [
|
|
4051
4084
|
/* @__PURE__ */ I(
|
|
4052
4085
|
kf,
|
|
4053
4086
|
{
|
|
4054
|
-
value:
|
|
4055
|
-
onValueChange: (
|
|
4056
|
-
disabled:
|
|
4087
|
+
value: s,
|
|
4088
|
+
onValueChange: (g) => n(e.name, g),
|
|
4089
|
+
disabled: i,
|
|
4057
4090
|
children: [
|
|
4058
4091
|
/* @__PURE__ */ I(
|
|
4059
4092
|
Af,
|
|
@@ -4062,16 +4095,16 @@ function $f({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
|
|
|
4062
4095
|
onBlur: () => r(e.name),
|
|
4063
4096
|
className: `inline-flex items-center justify-between w-full h-10 rounded-md border px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 bg-background transition-all
|
|
4064
4097
|
${o ? "border-red-500 focus-visible:ring-red-500" : "border-input focus-visible:ring-blue-500"}
|
|
4065
|
-
${
|
|
4098
|
+
${i ? "cursor-not-allowed opacity-50" : ""}
|
|
4066
4099
|
`,
|
|
4067
4100
|
children: [
|
|
4068
4101
|
/* @__PURE__ */ u(
|
|
4069
4102
|
Nf,
|
|
4070
4103
|
{
|
|
4071
|
-
placeholder: e.placeholder || `Select ${e.label?.toLowerCase() || ""}`
|
|
4104
|
+
placeholder: d ? "Loading..." : e.placeholder || `Select ${e.label?.toLowerCase() || ""}`
|
|
4072
4105
|
}
|
|
4073
4106
|
),
|
|
4074
|
-
/* @__PURE__ */ u(Tf, { className: "ml-2 text-gray-500", children: /* @__PURE__ */ u(Mn, { className: "w-4 h-4" }) })
|
|
4107
|
+
/* @__PURE__ */ u(Tf, { className: "ml-2 text-gray-500 flex items-center", children: d ? /* @__PURE__ */ u(Oa, { className: "w-4 h-4 animate-spin" }) : /* @__PURE__ */ u(Mn, { className: "w-4 h-4" }) })
|
|
4075
4108
|
]
|
|
4076
4109
|
}
|
|
4077
4110
|
),
|
|
@@ -4085,17 +4118,17 @@ function $f({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
|
|
|
4085
4118
|
/* @__PURE__ */ u(Lf, { className: "flex items-center justify-center h-6 text-gray-500 bg-gray-50", children: /* @__PURE__ */ u(na, { className: "fill-white stroke-gray-200" }) }),
|
|
4086
4119
|
/* @__PURE__ */ I(Of, { className: "p-1", children: [
|
|
4087
4120
|
e.groupLabel && /* @__PURE__ */ u(_f, { children: /* @__PURE__ */ u(Mf, { className: "px-2 py-1 text-xs text-gray-500 uppercase tracking-wide", children: e.groupLabel }) }),
|
|
4088
|
-
|
|
4121
|
+
c.map((g) => /* @__PURE__ */ u(
|
|
4089
4122
|
If,
|
|
4090
4123
|
{
|
|
4091
|
-
value:
|
|
4124
|
+
value: g.value,
|
|
4092
4125
|
className: `relative flex items-center px-3 py-2 text-sm rounded cursor-pointer select-none
|
|
4093
4126
|
data-[state=checked]:bg-blue-50
|
|
4094
4127
|
data-[state=checked]:text-blue-600
|
|
4095
4128
|
`,
|
|
4096
|
-
children: /* @__PURE__ */ u(Df, { children:
|
|
4129
|
+
children: /* @__PURE__ */ u(Df, { children: g.label })
|
|
4097
4130
|
},
|
|
4098
|
-
|
|
4131
|
+
g.value
|
|
4099
4132
|
)),
|
|
4100
4133
|
e.separator && /* @__PURE__ */ u(Ff, { className: "my-1 h-px bg-gray-200" })
|
|
4101
4134
|
] }),
|
|
@@ -4230,7 +4263,7 @@ function zf({
|
|
|
4230
4263
|
);
|
|
4231
4264
|
}
|
|
4232
4265
|
const {
|
|
4233
|
-
entries:
|
|
4266
|
+
entries: Ks,
|
|
4234
4267
|
setPrototypeOf: oa,
|
|
4235
4268
|
isFrozen: Bf,
|
|
4236
4269
|
getPrototypeOf: Hf,
|
|
@@ -4260,7 +4293,7 @@ Br || (Br = function(t) {
|
|
|
4260
4293
|
r[o - 1] = arguments[o];
|
|
4261
4294
|
return new t(...r);
|
|
4262
4295
|
});
|
|
4263
|
-
const pn = xe(Array.prototype.forEach),
|
|
4296
|
+
const pn = xe(Array.prototype.forEach), jf = xe(Array.prototype.lastIndexOf), aa = xe(Array.prototype.pop), $t = xe(Array.prototype.push), Vf = xe(Array.prototype.splice), Sn = xe(String.prototype.toLowerCase), br = xe(String.prototype.toString), vr = xe(String.prototype.match), Wt = xe(String.prototype.replace), Gf = xe(String.prototype.indexOf), Yf = xe(String.prototype.trim), _e = xe(Object.prototype.hasOwnProperty), ye = xe(RegExp.prototype.test), zt = qf(TypeError);
|
|
4264
4297
|
function xe(e) {
|
|
4265
4298
|
return function(t) {
|
|
4266
4299
|
t instanceof RegExp && (t.lastIndex = 0);
|
|
@@ -4297,7 +4330,7 @@ function Kf(e) {
|
|
|
4297
4330
|
}
|
|
4298
4331
|
function $e(e) {
|
|
4299
4332
|
const t = Wr(null);
|
|
4300
|
-
for (const [n, r] of
|
|
4333
|
+
for (const [n, r] of Ks(e))
|
|
4301
4334
|
_e(e, n) && (Array.isArray(r) ? t[n] = Kf(r) : r && typeof r == "object" && r.constructor === Object ? t[n] = $e(r) : t[n] = r);
|
|
4302
4335
|
return t;
|
|
4303
4336
|
}
|
|
@@ -4317,22 +4350,22 @@ function Bt(e, t) {
|
|
|
4317
4350
|
}
|
|
4318
4351
|
return n;
|
|
4319
4352
|
}
|
|
4320
|
-
const sa = we(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), yr = we(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), wr = we(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Xf = we(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), xr = we(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), Qf = we(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), ia = we(["#text"]), ca = we(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), Sr = we(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), la = we(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), hn = we(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Zf = Pe(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Jf = Pe(/<%[\w\W]*|[\w\W]*%>/gm), em = Pe(/\$\{[\w\W]*/gm), tm = Pe(/^data-[\-\w.\u00B7-\uFFFF]+$/), nm = Pe(/^aria-[\-\w]+$/),
|
|
4353
|
+
const sa = we(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), yr = we(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), wr = we(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Xf = we(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), xr = we(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), Qf = we(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), ia = we(["#text"]), ca = we(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), Sr = we(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), la = we(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), hn = we(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Zf = Pe(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Jf = Pe(/<%[\w\W]*|[\w\W]*%>/gm), em = Pe(/\$\{[\w\W]*/gm), tm = Pe(/^data-[\-\w.\u00B7-\uFFFF]+$/), nm = Pe(/^aria-[\-\w]+$/), Xs = Pe(
|
|
4321
4354
|
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
|
4322
4355
|
// eslint-disable-line no-useless-escape
|
|
4323
4356
|
), rm = Pe(/^(?:\w+script|data):/i), om = Pe(
|
|
4324
4357
|
/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
|
|
4325
4358
|
// eslint-disable-line no-control-regex
|
|
4326
|
-
),
|
|
4359
|
+
), Qs = Pe(/^html$/i), am = Pe(/^[a-z][.\w]*(-[.\w]+)+$/i);
|
|
4327
4360
|
var ua = /* @__PURE__ */ Object.freeze({
|
|
4328
4361
|
__proto__: null,
|
|
4329
4362
|
ARIA_ATTR: nm,
|
|
4330
4363
|
ATTR_WHITESPACE: om,
|
|
4331
4364
|
CUSTOM_ELEMENT: am,
|
|
4332
4365
|
DATA_ATTR: tm,
|
|
4333
|
-
DOCTYPE_NAME:
|
|
4366
|
+
DOCTYPE_NAME: Qs,
|
|
4334
4367
|
ERB_EXPR: Jf,
|
|
4335
|
-
IS_ALLOWED_URI:
|
|
4368
|
+
IS_ALLOWED_URI: Xs,
|
|
4336
4369
|
IS_SCRIPT_OR_DATA: rm,
|
|
4337
4370
|
MUSTACHE_EXPR: Zf,
|
|
4338
4371
|
TMPLIT_EXPR: em
|
|
@@ -4378,9 +4411,9 @@ const Ht = {
|
|
|
4378
4411
|
uponSanitizeShadowNode: []
|
|
4379
4412
|
};
|
|
4380
4413
|
};
|
|
4381
|
-
function
|
|
4414
|
+
function Zs() {
|
|
4382
4415
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : sm();
|
|
4383
|
-
const t = (U) =>
|
|
4416
|
+
const t = (U) => Zs(U);
|
|
4384
4417
|
if (t.version = "3.3.1", t.removed = [], !e || !e.document || e.document.nodeType !== Ht.document || !e.Element)
|
|
4385
4418
|
return t.isSupported = !1, t;
|
|
4386
4419
|
let {
|
|
@@ -4396,22 +4429,22 @@ function Qs() {
|
|
|
4396
4429
|
HTMLFormElement: m,
|
|
4397
4430
|
DOMParser: g,
|
|
4398
4431
|
trustedTypes: p
|
|
4399
|
-
} = e, w = c.prototype, h = Bt(w, "cloneNode"),
|
|
4432
|
+
} = e, w = c.prototype, h = Bt(w, "cloneNode"), v = Bt(w, "remove"), k = Bt(w, "nextSibling"), C = Bt(w, "childNodes"), E = Bt(w, "parentNode");
|
|
4400
4433
|
if (typeof s == "function") {
|
|
4401
4434
|
const U = n.createElement("template");
|
|
4402
4435
|
U.content && U.content.ownerDocument && (n = U.content.ownerDocument);
|
|
4403
4436
|
}
|
|
4404
|
-
let
|
|
4437
|
+
let y, T = "";
|
|
4405
4438
|
const {
|
|
4406
4439
|
implementation: D,
|
|
4407
4440
|
createNodeIterator: _,
|
|
4408
4441
|
createDocumentFragment: P,
|
|
4409
4442
|
getElementsByTagName: z
|
|
4410
4443
|
} = n, {
|
|
4411
|
-
importNode:
|
|
4444
|
+
importNode: V
|
|
4412
4445
|
} = r;
|
|
4413
4446
|
let H = da();
|
|
4414
|
-
t.isSupported = typeof
|
|
4447
|
+
t.isSupported = typeof Ks == "function" && typeof E == "function" && D && D.createHTMLDocument !== void 0;
|
|
4415
4448
|
const {
|
|
4416
4449
|
MUSTACHE_EXPR: G,
|
|
4417
4450
|
ERB_EXPR: x,
|
|
@@ -4424,7 +4457,7 @@ function Qs() {
|
|
|
4424
4457
|
} = ua;
|
|
4425
4458
|
let {
|
|
4426
4459
|
IS_ALLOWED_URI: Y
|
|
4427
|
-
} = ua,
|
|
4460
|
+
} = ua, j = null;
|
|
4428
4461
|
const ve = X({}, [...sa, ...yr, ...wr, ...xr, ...ia]);
|
|
4429
4462
|
let q = null;
|
|
4430
4463
|
const ee = X({}, [...ca, ...Sr, ...la, ...hn]);
|
|
@@ -4463,52 +4496,52 @@ function Qs() {
|
|
|
4463
4496
|
}
|
|
4464
4497
|
}));
|
|
4465
4498
|
let ce = !0, Q = !0, ne = !1, oe = !0, de = !1, Ne = !0, Re = !1, it = !1, ct = !1, gt = !1, nn = !1, rn = !1, mo = !0, po = !1;
|
|
4466
|
-
const
|
|
4499
|
+
const Ki = "user-content-";
|
|
4467
4500
|
let Zn = !0, Lt = !1, bt = {}, Le = null;
|
|
4468
4501
|
const Jn = X({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
|
|
4469
4502
|
let ho = null;
|
|
4470
4503
|
const go = X({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
4471
4504
|
let er = null;
|
|
4472
|
-
const bo = X({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), on = "http://www.w3.org/1998/Math/MathML", an = "http://www.w3.org/2000/svg",
|
|
4473
|
-
let vt =
|
|
4474
|
-
const
|
|
4505
|
+
const bo = X({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), on = "http://www.w3.org/1998/Math/MathML", an = "http://www.w3.org/2000/svg", je = "http://www.w3.org/1999/xhtml";
|
|
4506
|
+
let vt = je, tr = !1, nr = null;
|
|
4507
|
+
const Xi = X({}, [on, an, je], br);
|
|
4475
4508
|
let sn = X({}, ["mi", "mo", "mn", "ms", "mtext"]), cn = X({}, ["annotation-xml"]);
|
|
4476
|
-
const
|
|
4509
|
+
const Qi = X({}, ["title", "style", "font", "a", "script"]);
|
|
4477
4510
|
let Ft = null;
|
|
4478
|
-
const
|
|
4511
|
+
const Zi = ["application/xhtml+xml", "text/html"], Ji = "text/html";
|
|
4479
4512
|
let fe = null, yt = null;
|
|
4480
|
-
const
|
|
4513
|
+
const ec = n.createElement("form"), vo = function(b) {
|
|
4481
4514
|
return b instanceof RegExp || b instanceof Function;
|
|
4482
4515
|
}, rr = function() {
|
|
4483
4516
|
let b = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
4484
4517
|
if (!(yt && yt === b)) {
|
|
4485
4518
|
if ((!b || typeof b != "object") && (b = {}), b = $e(b), Ft = // eslint-disable-next-line unicorn/prefer-includes
|
|
4486
|
-
|
|
4519
|
+
Zi.indexOf(b.PARSER_MEDIA_TYPE) === -1 ? Ji : b.PARSER_MEDIA_TYPE, fe = Ft === "application/xhtml+xml" ? br : Sn, j = _e(b, "ALLOWED_TAGS") ? X({}, b.ALLOWED_TAGS, fe) : ve, q = _e(b, "ALLOWED_ATTR") ? X({}, b.ALLOWED_ATTR, fe) : ee, nr = _e(b, "ALLOWED_NAMESPACES") ? X({}, b.ALLOWED_NAMESPACES, br) : Xi, er = _e(b, "ADD_URI_SAFE_ATTR") ? X($e(bo), b.ADD_URI_SAFE_ATTR, fe) : bo, ho = _e(b, "ADD_DATA_URI_TAGS") ? X($e(go), b.ADD_DATA_URI_TAGS, fe) : go, Le = _e(b, "FORBID_CONTENTS") ? X({}, b.FORBID_CONTENTS, fe) : Jn, he = _e(b, "FORBID_TAGS") ? X({}, b.FORBID_TAGS, fe) : $e({}), L = _e(b, "FORBID_ATTR") ? X({}, b.FORBID_ATTR, fe) : $e({}), bt = _e(b, "USE_PROFILES") ? b.USE_PROFILES : !1, ce = b.ALLOW_ARIA_ATTR !== !1, Q = b.ALLOW_DATA_ATTR !== !1, ne = b.ALLOW_UNKNOWN_PROTOCOLS || !1, oe = b.ALLOW_SELF_CLOSE_IN_ATTR !== !1, de = b.SAFE_FOR_TEMPLATES || !1, Ne = b.SAFE_FOR_XML !== !1, Re = b.WHOLE_DOCUMENT || !1, gt = b.RETURN_DOM || !1, nn = b.RETURN_DOM_FRAGMENT || !1, rn = b.RETURN_TRUSTED_TYPE || !1, ct = b.FORCE_BODY || !1, mo = b.SANITIZE_DOM !== !1, po = b.SANITIZE_NAMED_PROPS || !1, Zn = b.KEEP_CONTENT !== !1, Lt = b.IN_PLACE || !1, Y = b.ALLOWED_URI_REGEXP || Xs, vt = b.NAMESPACE || je, sn = b.MATHML_TEXT_INTEGRATION_POINTS || sn, cn = b.HTML_INTEGRATION_POINTS || cn, J = b.CUSTOM_ELEMENT_HANDLING || {}, b.CUSTOM_ELEMENT_HANDLING && vo(b.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (J.tagNameCheck = b.CUSTOM_ELEMENT_HANDLING.tagNameCheck), b.CUSTOM_ELEMENT_HANDLING && vo(b.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (J.attributeNameCheck = b.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), b.CUSTOM_ELEMENT_HANDLING && typeof b.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (J.allowCustomizedBuiltInElements = b.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), de && (Q = !1), nn && (gt = !0), bt && (j = X({}, ia), q = [], bt.html === !0 && (X(j, sa), X(q, ca)), bt.svg === !0 && (X(j, yr), X(q, Sr), X(q, hn)), bt.svgFilters === !0 && (X(j, wr), X(q, Sr), X(q, hn)), bt.mathMl === !0 && (X(j, xr), X(q, la), X(q, hn))), b.ADD_TAGS && (typeof b.ADD_TAGS == "function" ? te.tagCheck = b.ADD_TAGS : (j === ve && (j = $e(j)), X(j, b.ADD_TAGS, fe))), b.ADD_ATTR && (typeof b.ADD_ATTR == "function" ? te.attributeCheck = b.ADD_ATTR : (q === ee && (q = $e(q)), X(q, b.ADD_ATTR, fe))), b.ADD_URI_SAFE_ATTR && X(er, b.ADD_URI_SAFE_ATTR, fe), b.FORBID_CONTENTS && (Le === Jn && (Le = $e(Le)), X(Le, b.FORBID_CONTENTS, fe)), b.ADD_FORBID_CONTENTS && (Le === Jn && (Le = $e(Le)), X(Le, b.ADD_FORBID_CONTENTS, fe)), Zn && (j["#text"] = !0), Re && X(j, ["html", "head", "body"]), j.table && (X(j, ["tbody"]), delete he.tbody), b.TRUSTED_TYPES_POLICY) {
|
|
4487
4520
|
if (typeof b.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
4488
4521
|
throw zt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
4489
4522
|
if (typeof b.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
4490
4523
|
throw zt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
4491
|
-
|
|
4524
|
+
y = b.TRUSTED_TYPES_POLICY, T = y.createHTML("");
|
|
4492
4525
|
} else
|
|
4493
|
-
|
|
4526
|
+
y === void 0 && (y = im(p, o)), y !== null && typeof T == "string" && (T = y.createHTML(""));
|
|
4494
4527
|
we && we(b), yt = b;
|
|
4495
4528
|
}
|
|
4496
|
-
}, yo = X({}, [...yr, ...wr, ...Xf]), wo = X({}, [...xr, ...Qf]),
|
|
4497
|
-
let M =
|
|
4529
|
+
}, yo = X({}, [...yr, ...wr, ...Xf]), wo = X({}, [...xr, ...Qf]), tc = function(b) {
|
|
4530
|
+
let M = E(b);
|
|
4498
4531
|
(!M || !M.tagName) && (M = {
|
|
4499
4532
|
namespaceURI: vt,
|
|
4500
4533
|
tagName: "template"
|
|
4501
4534
|
});
|
|
4502
4535
|
const B = Sn(b.tagName), se = Sn(M.tagName);
|
|
4503
|
-
return nr[b.namespaceURI] ? b.namespaceURI === an ? M.namespaceURI ===
|
|
4536
|
+
return nr[b.namespaceURI] ? b.namespaceURI === an ? M.namespaceURI === je ? B === "svg" : M.namespaceURI === on ? B === "svg" && (se === "annotation-xml" || sn[se]) : !!yo[B] : b.namespaceURI === on ? M.namespaceURI === je ? B === "math" : M.namespaceURI === an ? B === "math" && cn[se] : !!wo[B] : b.namespaceURI === je ? M.namespaceURI === an && !cn[se] || M.namespaceURI === on && !sn[se] ? !1 : !wo[B] && (Qi[B] || !yo[B]) : !!(Ft === "application/xhtml+xml" && nr[b.namespaceURI]) : !1;
|
|
4504
4537
|
}, Fe = function(b) {
|
|
4505
4538
|
$t(t.removed, {
|
|
4506
4539
|
element: b
|
|
4507
4540
|
});
|
|
4508
4541
|
try {
|
|
4509
|
-
|
|
4542
|
+
E(b).removeChild(b);
|
|
4510
4543
|
} catch {
|
|
4511
|
-
|
|
4544
|
+
v(b);
|
|
4512
4545
|
}
|
|
4513
4546
|
}, lt = function(b, M) {
|
|
4514
4547
|
try {
|
|
@@ -4538,12 +4571,12 @@ function Qs() {
|
|
|
4538
4571
|
if (ct)
|
|
4539
4572
|
b = "<remove></remove>" + b;
|
|
4540
4573
|
else {
|
|
4541
|
-
const
|
|
4542
|
-
B =
|
|
4574
|
+
const ue = vr(b, /^[\r\n\t ]+/);
|
|
4575
|
+
B = ue && ue[0];
|
|
4543
4576
|
}
|
|
4544
|
-
Ft === "application/xhtml+xml" && vt ===
|
|
4545
|
-
const se =
|
|
4546
|
-
if (vt ===
|
|
4577
|
+
Ft === "application/xhtml+xml" && vt === je && (b = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + b + "</body></html>");
|
|
4578
|
+
const se = y ? y.createHTML(b) : b;
|
|
4579
|
+
if (vt === je)
|
|
4547
4580
|
try {
|
|
4548
4581
|
M = new g().parseFromString(se, Ft);
|
|
4549
4582
|
} catch {
|
|
@@ -4556,7 +4589,7 @@ function Qs() {
|
|
|
4556
4589
|
}
|
|
4557
4590
|
}
|
|
4558
4591
|
const ge = M.body || M.documentElement;
|
|
4559
|
-
return b && B && ge.insertBefore(n.createTextNode(B), ge.childNodes[0] || null), vt ===
|
|
4592
|
+
return b && B && ge.insertBefore(n.createTextNode(B), ge.childNodes[0] || null), vt === je ? z.call(M, Re ? "html" : "body")[0] : Re ? M.documentElement : ge;
|
|
4560
4593
|
}, So = function(b) {
|
|
4561
4594
|
return _.call(
|
|
4562
4595
|
b.ownerDocument || b,
|
|
@@ -4570,43 +4603,43 @@ function Qs() {
|
|
|
4570
4603
|
}, Co = function(b) {
|
|
4571
4604
|
return typeof i == "function" && b instanceof i;
|
|
4572
4605
|
};
|
|
4573
|
-
function
|
|
4606
|
+
function Ve(U, b, M) {
|
|
4574
4607
|
pn(U, (B) => {
|
|
4575
4608
|
B.call(t, b, M, yt);
|
|
4576
4609
|
});
|
|
4577
4610
|
}
|
|
4578
4611
|
const Eo = function(b) {
|
|
4579
4612
|
let M = null;
|
|
4580
|
-
if (
|
|
4613
|
+
if (Ve(H.beforeSanitizeElements, b, null), or(b))
|
|
4581
4614
|
return Fe(b), !0;
|
|
4582
4615
|
const B = fe(b.nodeName);
|
|
4583
|
-
if (
|
|
4616
|
+
if (Ve(H.uponSanitizeElement, b, {
|
|
4584
4617
|
tagName: B,
|
|
4585
|
-
allowedTags:
|
|
4618
|
+
allowedTags: j
|
|
4586
4619
|
}), Ne && b.hasChildNodes() && !Co(b.firstElementChild) && ye(/<[/\w!]/g, b.innerHTML) && ye(/<[/\w!]/g, b.textContent) || b.nodeType === Ht.progressingInstruction || Ne && b.nodeType === Ht.comment && ye(/<[/\w]/g, b.data))
|
|
4587
4620
|
return Fe(b), !0;
|
|
4588
|
-
if (!(te.tagCheck instanceof Function && te.tagCheck(B)) && (!
|
|
4621
|
+
if (!(te.tagCheck instanceof Function && te.tagCheck(B)) && (!j[B] || he[B])) {
|
|
4589
4622
|
if (!he[B] && Ao(B) && (J.tagNameCheck instanceof RegExp && ye(J.tagNameCheck, B) || J.tagNameCheck instanceof Function && J.tagNameCheck(B)))
|
|
4590
4623
|
return !1;
|
|
4591
4624
|
if (Zn && !Le[B]) {
|
|
4592
|
-
const se =
|
|
4625
|
+
const se = E(b) || b.parentNode, ge = C(b) || b.childNodes;
|
|
4593
4626
|
if (ge && se) {
|
|
4594
|
-
const
|
|
4595
|
-
for (let Se =
|
|
4627
|
+
const ue = ge.length;
|
|
4628
|
+
for (let Se = ue - 1; Se >= 0; --Se) {
|
|
4596
4629
|
const Ge = h(ge[Se], !0);
|
|
4597
|
-
Ge.__removalCount = (b.__removalCount || 0) + 1, se.insertBefore(Ge,
|
|
4630
|
+
Ge.__removalCount = (b.__removalCount || 0) + 1, se.insertBefore(Ge, k(b));
|
|
4598
4631
|
}
|
|
4599
4632
|
}
|
|
4600
4633
|
}
|
|
4601
4634
|
return Fe(b), !0;
|
|
4602
4635
|
}
|
|
4603
|
-
return b instanceof c && !
|
|
4636
|
+
return b instanceof c && !tc(b) || (B === "noscript" || B === "noembed" || B === "noframes") && ye(/<\/no(script|embed|frames)/i, b.innerHTML) ? (Fe(b), !0) : (de && b.nodeType === Ht.text && (M = b.textContent, pn([G, x, N], (se) => {
|
|
4604
4637
|
M = Wt(M, se, " ");
|
|
4605
4638
|
}), b.textContent !== M && ($t(t.removed, {
|
|
4606
4639
|
element: b.cloneNode()
|
|
4607
|
-
}), b.textContent = M)),
|
|
4640
|
+
}), b.textContent = M)), Ve(H.afterSanitizeElements, b, null), !1);
|
|
4608
4641
|
}, ko = function(b, M, B) {
|
|
4609
|
-
if (mo && (M === "id" || M === "name") && (B in n || B in
|
|
4642
|
+
if (mo && (M === "id" || M === "name") && (B in n || B in ec))
|
|
4610
4643
|
return !1;
|
|
4611
4644
|
if (!(Q && !L[M] && ye(R, M))) {
|
|
4612
4645
|
if (!(ce && ye(O, M))) {
|
|
@@ -4637,7 +4670,7 @@ function Qs() {
|
|
|
4637
4670
|
}, Ao = function(b) {
|
|
4638
4671
|
return b !== "annotation-xml" && vr(b, W);
|
|
4639
4672
|
}, No = function(b) {
|
|
4640
|
-
|
|
4673
|
+
Ve(H.beforeSanitizeAttributes, b, null);
|
|
4641
4674
|
const {
|
|
4642
4675
|
attributes: M
|
|
4643
4676
|
} = b;
|
|
@@ -4653,27 +4686,27 @@ function Qs() {
|
|
|
4653
4686
|
let se = M.length;
|
|
4654
4687
|
for (; se--; ) {
|
|
4655
4688
|
const ge = M[se], {
|
|
4656
|
-
name:
|
|
4689
|
+
name: ue,
|
|
4657
4690
|
namespaceURI: Se,
|
|
4658
4691
|
value: Ge
|
|
4659
|
-
} = ge, wt = fe(
|
|
4660
|
-
let pe =
|
|
4661
|
-
if (B.attrName = wt, B.attrValue = pe, B.keepAttr = !0, B.forceKeepAttr = void 0,
|
|
4662
|
-
lt(
|
|
4692
|
+
} = ge, wt = fe(ue), ar = Ge;
|
|
4693
|
+
let pe = ue === "value" ? ar : Yf(ar);
|
|
4694
|
+
if (B.attrName = wt, B.attrValue = pe, B.keepAttr = !0, B.forceKeepAttr = void 0, Ve(H.uponSanitizeAttribute, b, B), pe = B.attrValue, po && (wt === "id" || wt === "name") && (lt(ue, b), pe = Ki + pe), Ne && ye(/((--!?|])>)|<\/(style|title|textarea)/i, pe)) {
|
|
4695
|
+
lt(ue, b);
|
|
4663
4696
|
continue;
|
|
4664
4697
|
}
|
|
4665
4698
|
if (wt === "attributename" && vr(pe, "href")) {
|
|
4666
|
-
lt(
|
|
4699
|
+
lt(ue, b);
|
|
4667
4700
|
continue;
|
|
4668
4701
|
}
|
|
4669
4702
|
if (B.forceKeepAttr)
|
|
4670
4703
|
continue;
|
|
4671
4704
|
if (!B.keepAttr) {
|
|
4672
|
-
lt(
|
|
4705
|
+
lt(ue, b);
|
|
4673
4706
|
continue;
|
|
4674
4707
|
}
|
|
4675
4708
|
if (!oe && ye(/\/>/i, pe)) {
|
|
4676
|
-
lt(
|
|
4709
|
+
lt(ue, b);
|
|
4677
4710
|
continue;
|
|
4678
4711
|
}
|
|
4679
4712
|
de && pn([G, x, N], (Po) => {
|
|
@@ -4681,34 +4714,34 @@ function Qs() {
|
|
|
4681
4714
|
});
|
|
4682
4715
|
const To = fe(b.nodeName);
|
|
4683
4716
|
if (!ko(To, wt, pe)) {
|
|
4684
|
-
lt(
|
|
4717
|
+
lt(ue, b);
|
|
4685
4718
|
continue;
|
|
4686
4719
|
}
|
|
4687
|
-
if (
|
|
4720
|
+
if (y && typeof p == "object" && typeof p.getAttributeType == "function" && !Se)
|
|
4688
4721
|
switch (p.getAttributeType(To, wt)) {
|
|
4689
4722
|
case "TrustedHTML": {
|
|
4690
|
-
pe =
|
|
4723
|
+
pe = y.createHTML(pe);
|
|
4691
4724
|
break;
|
|
4692
4725
|
}
|
|
4693
4726
|
case "TrustedScriptURL": {
|
|
4694
|
-
pe =
|
|
4727
|
+
pe = y.createScriptURL(pe);
|
|
4695
4728
|
break;
|
|
4696
4729
|
}
|
|
4697
4730
|
}
|
|
4698
4731
|
if (pe !== ar)
|
|
4699
4732
|
try {
|
|
4700
|
-
Se ? b.setAttributeNS(Se,
|
|
4733
|
+
Se ? b.setAttributeNS(Se, ue, pe) : b.setAttribute(ue, pe), or(b) ? Fe(b) : aa(t.removed);
|
|
4701
4734
|
} catch {
|
|
4702
|
-
lt(
|
|
4735
|
+
lt(ue, b);
|
|
4703
4736
|
}
|
|
4704
4737
|
}
|
|
4705
|
-
|
|
4706
|
-
},
|
|
4738
|
+
Ve(H.afterSanitizeAttributes, b, null);
|
|
4739
|
+
}, nc = function U(b) {
|
|
4707
4740
|
let M = null;
|
|
4708
4741
|
const B = So(b);
|
|
4709
|
-
for (
|
|
4710
|
-
|
|
4711
|
-
|
|
4742
|
+
for (Ve(H.beforeSanitizeShadowDOM, b, null); M = B.nextNode(); )
|
|
4743
|
+
Ve(H.uponSanitizeShadowNode, M, null), Eo(M), No(M), M.content instanceof a && U(M.content);
|
|
4744
|
+
Ve(H.afterSanitizeShadowDOM, b, null);
|
|
4712
4745
|
};
|
|
4713
4746
|
return t.sanitize = function(U) {
|
|
4714
4747
|
let b = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, M = null, B = null, se = null, ge = null;
|
|
@@ -4723,7 +4756,7 @@ function Qs() {
|
|
|
4723
4756
|
if (it || rr(b), t.removed = [], typeof U == "string" && (Lt = !1), Lt) {
|
|
4724
4757
|
if (U.nodeName) {
|
|
4725
4758
|
const Ge = fe(U.nodeName);
|
|
4726
|
-
if (!
|
|
4759
|
+
if (!j[Ge] || he[Ge])
|
|
4727
4760
|
throw zt("root node is forbidden and cannot be sanitized in-place");
|
|
4728
4761
|
}
|
|
4729
4762
|
} else if (U instanceof i)
|
|
@@ -4731,14 +4764,14 @@ function Qs() {
|
|
|
4731
4764
|
else {
|
|
4732
4765
|
if (!gt && !de && !Re && // eslint-disable-next-line unicorn/prefer-includes
|
|
4733
4766
|
U.indexOf("<") === -1)
|
|
4734
|
-
return
|
|
4767
|
+
return y && rn ? y.createHTML(U) : U;
|
|
4735
4768
|
if (M = xo(U), !M)
|
|
4736
4769
|
return gt ? null : rn ? T : "";
|
|
4737
4770
|
}
|
|
4738
4771
|
M && ct && Fe(M.firstChild);
|
|
4739
|
-
const
|
|
4740
|
-
for (; se =
|
|
4741
|
-
Eo(se), No(se), se.content instanceof a &&
|
|
4772
|
+
const ue = So(Lt ? U : M);
|
|
4773
|
+
for (; se = ue.nextNode(); )
|
|
4774
|
+
Eo(se), No(se), se.content instanceof a && nc(se.content);
|
|
4742
4775
|
if (Lt)
|
|
4743
4776
|
return U;
|
|
4744
4777
|
if (gt) {
|
|
@@ -4747,13 +4780,13 @@ function Qs() {
|
|
|
4747
4780
|
ge.appendChild(M.firstChild);
|
|
4748
4781
|
else
|
|
4749
4782
|
ge = M;
|
|
4750
|
-
return (q.shadowroot || q.shadowrootmode) && (ge =
|
|
4783
|
+
return (q.shadowroot || q.shadowrootmode) && (ge = V.call(r, ge, !0)), ge;
|
|
4751
4784
|
}
|
|
4752
4785
|
let Se = Re ? M.outerHTML : M.innerHTML;
|
|
4753
|
-
return Re &&
|
|
4786
|
+
return Re && j["!doctype"] && M.ownerDocument && M.ownerDocument.doctype && M.ownerDocument.doctype.name && ye(Qs, M.ownerDocument.doctype.name) && (Se = "<!DOCTYPE " + M.ownerDocument.doctype.name + `>
|
|
4754
4787
|
` + Se), de && pn([G, x, N], (Ge) => {
|
|
4755
4788
|
Se = Wt(Se, Ge, " ");
|
|
4756
|
-
}),
|
|
4789
|
+
}), y && rn ? y.createHTML(Se) : Se;
|
|
4757
4790
|
}, t.setConfig = function() {
|
|
4758
4791
|
let U = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
4759
4792
|
rr(U), it = !0;
|
|
@@ -4767,8 +4800,8 @@ function Qs() {
|
|
|
4767
4800
|
typeof b == "function" && $t(H[U], b);
|
|
4768
4801
|
}, t.removeHook = function(U, b) {
|
|
4769
4802
|
if (b !== void 0) {
|
|
4770
|
-
const M =
|
|
4771
|
-
return M === -1 ? void 0 :
|
|
4803
|
+
const M = jf(H[U], b);
|
|
4804
|
+
return M === -1 ? void 0 : Vf(H[U], M, 1)[0];
|
|
4772
4805
|
}
|
|
4773
4806
|
return aa(H[U]);
|
|
4774
4807
|
}, t.removeHooks = function(U) {
|
|
@@ -4777,10 +4810,10 @@ function Qs() {
|
|
|
4777
4810
|
H = da();
|
|
4778
4811
|
}, t;
|
|
4779
4812
|
}
|
|
4780
|
-
var cm =
|
|
4813
|
+
var cm = Zs();
|
|
4781
4814
|
const lm = ({ editor: e, error: t }) => {
|
|
4782
|
-
const [, n] =
|
|
4783
|
-
if (
|
|
4815
|
+
const [, n] = le(0);
|
|
4816
|
+
if (qe(() => {
|
|
4784
4817
|
if (!e) return;
|
|
4785
4818
|
const a = () => n((s) => s + 1);
|
|
4786
4819
|
return e.on("transaction", a), () => e.off("transaction", a);
|
|
@@ -4802,7 +4835,7 @@ const lm = ({ editor: e, error: t }) => {
|
|
|
4802
4835
|
className: r(e.isActive("bold")),
|
|
4803
4836
|
"aria-label": "Bold",
|
|
4804
4837
|
"aria-pressed": e.isActive("bold"),
|
|
4805
|
-
children: /* @__PURE__ */ u(
|
|
4838
|
+
children: /* @__PURE__ */ u(wc, { size: 14 })
|
|
4806
4839
|
}
|
|
4807
4840
|
),
|
|
4808
4841
|
/* @__PURE__ */ u(
|
|
@@ -4813,7 +4846,7 @@ const lm = ({ editor: e, error: t }) => {
|
|
|
4813
4846
|
className: r(e.isActive("italic")),
|
|
4814
4847
|
"aria-label": "Italic",
|
|
4815
4848
|
"aria-pressed": e.isActive("italic"),
|
|
4816
|
-
children: /* @__PURE__ */ u(
|
|
4849
|
+
children: /* @__PURE__ */ u(Gc, { size: 14 })
|
|
4817
4850
|
}
|
|
4818
4851
|
),
|
|
4819
4852
|
/* @__PURE__ */ u(
|
|
@@ -4849,9 +4882,9 @@ const lm = ({ editor: e, error: t }) => {
|
|
|
4849
4882
|
"aria-label": `Heading level ${a}`,
|
|
4850
4883
|
"aria-pressed": e.isActive("heading", { level: a }),
|
|
4851
4884
|
children: [
|
|
4852
|
-
a === 1 && /* @__PURE__ */ u(
|
|
4853
|
-
a === 2 && /* @__PURE__ */ u(
|
|
4854
|
-
a === 3 && /* @__PURE__ */ u(
|
|
4885
|
+
a === 1 && /* @__PURE__ */ u($c, { size: 16 }),
|
|
4886
|
+
a === 2 && /* @__PURE__ */ u(zc, { size: 16 }),
|
|
4887
|
+
a === 3 && /* @__PURE__ */ u(Hc, { size: 14 })
|
|
4855
4888
|
]
|
|
4856
4889
|
},
|
|
4857
4890
|
a
|
|
@@ -4866,7 +4899,7 @@ const lm = ({ editor: e, error: t }) => {
|
|
|
4866
4899
|
className: r(e.isActive("bulletList")),
|
|
4867
4900
|
"aria-label": "Bullet list",
|
|
4868
4901
|
"aria-pressed": e.isActive("bulletList"),
|
|
4869
|
-
children: /* @__PURE__ */ u(
|
|
4902
|
+
children: /* @__PURE__ */ u(Xc, { size: 14 })
|
|
4870
4903
|
}
|
|
4871
4904
|
),
|
|
4872
4905
|
/* @__PURE__ */ u(
|
|
@@ -4877,7 +4910,7 @@ const lm = ({ editor: e, error: t }) => {
|
|
|
4877
4910
|
className: r(e.isActive("orderedList")),
|
|
4878
4911
|
"aria-label": "Numbered list",
|
|
4879
4912
|
"aria-pressed": e.isActive("orderedList"),
|
|
4880
|
-
children: /* @__PURE__ */ u(
|
|
4913
|
+
children: /* @__PURE__ */ u(qc, { size: 14 })
|
|
4881
4914
|
}
|
|
4882
4915
|
),
|
|
4883
4916
|
/* @__PURE__ */ u(
|
|
@@ -4901,7 +4934,7 @@ const lm = ({ editor: e, error: t }) => {
|
|
|
4901
4934
|
className: r(e.isActive("codeBlock")),
|
|
4902
4935
|
"aria-label": "Code block",
|
|
4903
4936
|
"aria-pressed": e.isActive("codeBlock"),
|
|
4904
|
-
children: /* @__PURE__ */ u(
|
|
4937
|
+
children: /* @__PURE__ */ u(Lc, { size: 14 })
|
|
4905
4938
|
}
|
|
4906
4939
|
) }),
|
|
4907
4940
|
/* @__PURE__ */ I("div", { className: "flex gap-1 ml-auto", children: [
|
|
@@ -4939,16 +4972,16 @@ function um({
|
|
|
4939
4972
|
error: o,
|
|
4940
4973
|
disabled: a
|
|
4941
4974
|
}) {
|
|
4942
|
-
const s = !!a, i = t[e.name], c = typeof i == "string" ? i : e.content || "", l =
|
|
4975
|
+
const s = !!a, i = t[e.name], c = typeof i == "string" ? i : e.content || "", l = ic({
|
|
4943
4976
|
extensions: [
|
|
4944
|
-
|
|
4977
|
+
lc.configure({
|
|
4945
4978
|
heading: { levels: [1, 2, 3] },
|
|
4946
4979
|
codeBlock: !0,
|
|
4947
4980
|
blockquote: !0,
|
|
4948
4981
|
strike: !0
|
|
4949
4982
|
}),
|
|
4950
|
-
|
|
4951
|
-
|
|
4983
|
+
uc,
|
|
4984
|
+
dc.configure({
|
|
4952
4985
|
limit: e.maxLength || null
|
|
4953
4986
|
})
|
|
4954
4987
|
],
|
|
@@ -4973,9 +5006,9 @@ function um({
|
|
|
4973
5006
|
}
|
|
4974
5007
|
}
|
|
4975
5008
|
});
|
|
4976
|
-
return
|
|
5009
|
+
return qe(() => {
|
|
4977
5010
|
l && t[e.name] !== l.getHTML() && l.commands.setContent(t[e.name] || "");
|
|
4978
|
-
}, [t[e.name], l]),
|
|
5011
|
+
}, [t[e.name], l]), qe(() => {
|
|
4979
5012
|
l && l.setEditable(!s);
|
|
4980
5013
|
}, [s, l]), /* @__PURE__ */ u(
|
|
4981
5014
|
"div",
|
|
@@ -4988,7 +5021,7 @@ function um({
|
|
|
4988
5021
|
className: `w-full border rounded-lg overflow-hidden transition-all duration-200 ${o ? "border-red-500 focus-within:ring-1 focus-within:ring-red-500" : "border-input focus-within:border-ring/40 focus-within:shadow-[0_0_0_1px_rgba(var(--ring),0.1)]"} ${s ? "opacity-70 bg-muted cursor-not-allowed" : "bg-background"}`,
|
|
4989
5022
|
children: [
|
|
4990
5023
|
!s && /* @__PURE__ */ u(lm, { editor: l, error: o }),
|
|
4991
|
-
/* @__PURE__ */ u(
|
|
5024
|
+
/* @__PURE__ */ u(cc, { editor: l }),
|
|
4992
5025
|
/* @__PURE__ */ u(
|
|
4993
5026
|
"div",
|
|
4994
5027
|
{
|
|
@@ -5022,14 +5055,14 @@ function dm({
|
|
|
5022
5055
|
setCharCounts: d,
|
|
5023
5056
|
fileInputRefs: m,
|
|
5024
5057
|
...g
|
|
5025
|
-
} = s, p = a, w = e.options || [], h = e.inline || e.layout === "inline",
|
|
5058
|
+
} = s, p = a, w = e.options || [], h = e.inline || e.layout === "inline", v = g["aria-describedby"], k = `
|
|
5026
5059
|
size-4 rounded border-input bg-background transition-all accent-primary
|
|
5027
5060
|
focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2
|
|
5028
5061
|
disabled:cursor-not-allowed disabled:opacity-50
|
|
5029
5062
|
`;
|
|
5030
5063
|
if (w.length > 0) {
|
|
5031
|
-
const C = Array.isArray(t[e.name]) ? t[e.name] : [],
|
|
5032
|
-
let D = T ? [...C,
|
|
5064
|
+
const C = Array.isArray(t[e.name]) ? t[e.name] : [], E = (y, T) => {
|
|
5065
|
+
let D = T ? [...C, y] : C.filter((_) => _ !== y);
|
|
5033
5066
|
n(e.name, D), r(e.name);
|
|
5034
5067
|
};
|
|
5035
5068
|
return /* @__PURE__ */ I(
|
|
@@ -5037,15 +5070,15 @@ function dm({
|
|
|
5037
5070
|
{
|
|
5038
5071
|
className: "mt-2",
|
|
5039
5072
|
"aria-invalid": !!o,
|
|
5040
|
-
"aria-describedby": o ?
|
|
5073
|
+
"aria-describedby": o ? v : void 0,
|
|
5041
5074
|
children: [
|
|
5042
5075
|
/* @__PURE__ */ u("legend", { className: "sr-only", children: e.label }),
|
|
5043
5076
|
/* @__PURE__ */ u(
|
|
5044
5077
|
"div",
|
|
5045
5078
|
{
|
|
5046
5079
|
className: h ? "flex flex-wrap gap-x-6 gap-y-3" : "space-y-4",
|
|
5047
|
-
children: w.map((
|
|
5048
|
-
const T = typeof
|
|
5080
|
+
children: w.map((y) => {
|
|
5081
|
+
const T = typeof y == "object" ? y.value : y, D = typeof y == "object" ? y.label : y, _ = typeof y == "object" ? y.description : null, P = `${e.name}-${T}`, z = C.includes(T);
|
|
5049
5082
|
return /* @__PURE__ */ I(
|
|
5050
5083
|
"div",
|
|
5051
5084
|
{
|
|
@@ -5059,10 +5092,10 @@ function dm({
|
|
|
5059
5092
|
type: "checkbox",
|
|
5060
5093
|
id: P,
|
|
5061
5094
|
checked: z,
|
|
5062
|
-
onChange: (
|
|
5095
|
+
onChange: (V) => E(T, V.target.checked),
|
|
5063
5096
|
onBlur: () => r(e.name),
|
|
5064
5097
|
disabled: p,
|
|
5065
|
-
className: `${
|
|
5098
|
+
className: `${k} ${!p && "cursor-pointer hover:border-primary/50"} ${o ? "border-destructive ring-destructive/20" : "border-input"}`
|
|
5066
5099
|
}
|
|
5067
5100
|
) }),
|
|
5068
5101
|
/* @__PURE__ */ I("div", { className: "ml-3 text-sm leading-6", children: [
|
|
@@ -5107,7 +5140,7 @@ function dm({
|
|
|
5107
5140
|
},
|
|
5108
5141
|
onBlur: () => r(e.name),
|
|
5109
5142
|
disabled: p,
|
|
5110
|
-
className: `${
|
|
5143
|
+
className: `${k} ${!p && "cursor-pointer hover:border-primary/50"} ${o ? "border-destructive" : "border-input"}`
|
|
5111
5144
|
}
|
|
5112
5145
|
) }),
|
|
5113
5146
|
/* @__PURE__ */ u("div", { className: "ml-3 text-sm leading-6", children: /* @__PURE__ */ I(
|
|
@@ -5123,7 +5156,7 @@ function dm({
|
|
|
5123
5156
|
) })
|
|
5124
5157
|
] });
|
|
5125
5158
|
}
|
|
5126
|
-
const
|
|
5159
|
+
const Js = 6048e5, fm = 864e5, fa = Symbol.for("constructDateFrom");
|
|
5127
5160
|
function rt(e, t) {
|
|
5128
5161
|
return typeof e == "function" ? e(t) : e && typeof e == "object" && fa in e ? e[fa](t) : e instanceof Date ? new e.constructor(t) : new Date(t);
|
|
5129
5162
|
}
|
|
@@ -5141,7 +5174,7 @@ function Qt(e, t) {
|
|
|
5141
5174
|
function Pn(e, t) {
|
|
5142
5175
|
return Qt(e, { ...t, weekStartsOn: 1 });
|
|
5143
5176
|
}
|
|
5144
|
-
function
|
|
5177
|
+
function ei(e, t) {
|
|
5145
5178
|
const n = De(e, t?.in), r = n.getFullYear(), o = rt(n, 0);
|
|
5146
5179
|
o.setFullYear(r + 1, 0, 4), o.setHours(0, 0, 0, 0);
|
|
5147
5180
|
const a = Pn(o), s = rt(n, 0);
|
|
@@ -5183,13 +5216,13 @@ function hm(e, t, n) {
|
|
|
5183
5216
|
return Math.round((i - c) / fm);
|
|
5184
5217
|
}
|
|
5185
5218
|
function gm(e, t) {
|
|
5186
|
-
const n =
|
|
5219
|
+
const n = ei(e, t), r = rt(e, 0);
|
|
5187
5220
|
return r.setFullYear(n, 0, 4), r.setHours(0, 0, 0, 0), Pn(r);
|
|
5188
5221
|
}
|
|
5189
5222
|
function bm(e) {
|
|
5190
5223
|
return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]";
|
|
5191
5224
|
}
|
|
5192
|
-
function
|
|
5225
|
+
function ti(e) {
|
|
5193
5226
|
return !(!bm(e) && typeof e != "number" || isNaN(+De(e)));
|
|
5194
5227
|
}
|
|
5195
5228
|
function vm(e, t) {
|
|
@@ -5471,7 +5504,7 @@ const Nm = {
|
|
|
5471
5504
|
defaultFormattingWidth: "wide"
|
|
5472
5505
|
})
|
|
5473
5506
|
};
|
|
5474
|
-
function
|
|
5507
|
+
function jt(e) {
|
|
5475
5508
|
return (t, n = {}) => {
|
|
5476
5509
|
const r = n.width, o = r && e.matchPatterns[r] || e.matchPatterns[e.defaultMatchWidth], a = t.match(o);
|
|
5477
5510
|
if (!a)
|
|
@@ -5523,11 +5556,11 @@ const $m = /^(\d+)(th|st|nd|rd)?/i, Wm = /\d+/i, zm = {
|
|
|
5523
5556
|
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
5524
5557
|
}, Um = {
|
|
5525
5558
|
any: [/1/i, /2/i, /3/i, /4/i]
|
|
5526
|
-
},
|
|
5559
|
+
}, jm = {
|
|
5527
5560
|
narrow: /^[jfmasond]/i,
|
|
5528
5561
|
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
5529
5562
|
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
5530
|
-
},
|
|
5563
|
+
}, Vm = {
|
|
5531
5564
|
narrow: [
|
|
5532
5565
|
/^j/i,
|
|
5533
5566
|
/^f/i,
|
|
@@ -5584,32 +5617,32 @@ const $m = /^(\d+)(th|st|nd|rd)?/i, Wm = /\d+/i, zm = {
|
|
|
5584
5617
|
parsePattern: Wm,
|
|
5585
5618
|
valueCallback: (e) => parseInt(e, 10)
|
|
5586
5619
|
}),
|
|
5587
|
-
era:
|
|
5620
|
+
era: jt({
|
|
5588
5621
|
matchPatterns: zm,
|
|
5589
5622
|
defaultMatchWidth: "wide",
|
|
5590
5623
|
parsePatterns: Bm,
|
|
5591
5624
|
defaultParseWidth: "any"
|
|
5592
5625
|
}),
|
|
5593
|
-
quarter:
|
|
5626
|
+
quarter: jt({
|
|
5594
5627
|
matchPatterns: Hm,
|
|
5595
5628
|
defaultMatchWidth: "wide",
|
|
5596
5629
|
parsePatterns: Um,
|
|
5597
5630
|
defaultParseWidth: "any",
|
|
5598
5631
|
valueCallback: (e) => e + 1
|
|
5599
5632
|
}),
|
|
5600
|
-
month:
|
|
5601
|
-
matchPatterns:
|
|
5633
|
+
month: jt({
|
|
5634
|
+
matchPatterns: jm,
|
|
5602
5635
|
defaultMatchWidth: "wide",
|
|
5603
|
-
parsePatterns:
|
|
5636
|
+
parsePatterns: Vm,
|
|
5604
5637
|
defaultParseWidth: "any"
|
|
5605
5638
|
}),
|
|
5606
|
-
day:
|
|
5639
|
+
day: jt({
|
|
5607
5640
|
matchPatterns: Gm,
|
|
5608
5641
|
defaultMatchWidth: "wide",
|
|
5609
5642
|
parsePatterns: Ym,
|
|
5610
5643
|
defaultParseWidth: "any"
|
|
5611
5644
|
}),
|
|
5612
|
-
dayPeriod:
|
|
5645
|
+
dayPeriod: jt({
|
|
5613
5646
|
matchPatterns: qm,
|
|
5614
5647
|
defaultMatchWidth: "any",
|
|
5615
5648
|
parsePatterns: Km,
|
|
@@ -5633,9 +5666,9 @@ function Zm(e, t) {
|
|
|
5633
5666
|
}
|
|
5634
5667
|
function Jm(e, t) {
|
|
5635
5668
|
const n = De(e, t?.in), r = +Pn(n) - +gm(n);
|
|
5636
|
-
return Math.round(r /
|
|
5669
|
+
return Math.round(r / Js) + 1;
|
|
5637
5670
|
}
|
|
5638
|
-
function
|
|
5671
|
+
function ni(e, t) {
|
|
5639
5672
|
const n = De(e, t?.in), r = n.getFullYear(), o = Un(), a = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? o.firstWeekContainsDate ?? o.locale?.options?.firstWeekContainsDate ?? 1, s = rt(t?.in || e, 0);
|
|
5640
5673
|
s.setFullYear(r + 1, 0, a), s.setHours(0, 0, 0, 0);
|
|
5641
5674
|
const i = Qt(s, t), c = rt(t?.in || e, 0);
|
|
@@ -5644,18 +5677,18 @@ function ti(e, t) {
|
|
|
5644
5677
|
return +n >= +i ? r + 1 : +n >= +l ? r : r - 1;
|
|
5645
5678
|
}
|
|
5646
5679
|
function ep(e, t) {
|
|
5647
|
-
const n = Un(), r = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, o =
|
|
5680
|
+
const n = Un(), r = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, o = ni(e, t), a = rt(t?.in || e, 0);
|
|
5648
5681
|
return a.setFullYear(o, 0, r), a.setHours(0, 0, 0, 0), Qt(a, t);
|
|
5649
5682
|
}
|
|
5650
5683
|
function tp(e, t) {
|
|
5651
5684
|
const n = De(e, t?.in), r = +Qt(n, t) - +ep(n, t);
|
|
5652
|
-
return Math.round(r /
|
|
5685
|
+
return Math.round(r / Js) + 1;
|
|
5653
5686
|
}
|
|
5654
5687
|
function re(e, t) {
|
|
5655
5688
|
const n = e < 0 ? "-" : "", r = Math.abs(e).toString().padStart(t, "0");
|
|
5656
5689
|
return n + r;
|
|
5657
5690
|
}
|
|
5658
|
-
const
|
|
5691
|
+
const Qe = {
|
|
5659
5692
|
// Year
|
|
5660
5693
|
y(e, t) {
|
|
5661
5694
|
const n = e.getFullYear(), r = n > 0 ? n : 1 - n;
|
|
@@ -5741,11 +5774,11 @@ const Xe = {
|
|
|
5741
5774
|
const r = e.getFullYear(), o = r > 0 ? r : 1 - r;
|
|
5742
5775
|
return n.ordinalNumber(o, { unit: "year" });
|
|
5743
5776
|
}
|
|
5744
|
-
return
|
|
5777
|
+
return Qe.y(e, t);
|
|
5745
5778
|
},
|
|
5746
5779
|
// Local week-numbering year
|
|
5747
5780
|
Y: function(e, t, n, r) {
|
|
5748
|
-
const o =
|
|
5781
|
+
const o = ni(e, r), a = o > 0 ? o : 1 - o;
|
|
5749
5782
|
if (t === "YY") {
|
|
5750
5783
|
const s = a % 100;
|
|
5751
5784
|
return re(s, 2);
|
|
@@ -5754,7 +5787,7 @@ const Xe = {
|
|
|
5754
5787
|
},
|
|
5755
5788
|
// ISO week-numbering year
|
|
5756
5789
|
R: function(e, t) {
|
|
5757
|
-
const n =
|
|
5790
|
+
const n = ei(e);
|
|
5758
5791
|
return re(n, t.length);
|
|
5759
5792
|
},
|
|
5760
5793
|
// Extended year. This is a single number designating the year of this calendar system.
|
|
@@ -5844,7 +5877,7 @@ const Xe = {
|
|
|
5844
5877
|
switch (t) {
|
|
5845
5878
|
case "M":
|
|
5846
5879
|
case "MM":
|
|
5847
|
-
return
|
|
5880
|
+
return Qe.M(e, t);
|
|
5848
5881
|
// 1st, 2nd, ..., 12th
|
|
5849
5882
|
case "Mo":
|
|
5850
5883
|
return n.ordinalNumber(r + 1, { unit: "month" });
|
|
@@ -5909,7 +5942,7 @@ const Xe = {
|
|
|
5909
5942
|
},
|
|
5910
5943
|
// Day of the month
|
|
5911
5944
|
d: function(e, t, n) {
|
|
5912
|
-
return t === "do" ? n.ordinalNumber(e.getDate(), { unit: "date" }) :
|
|
5945
|
+
return t === "do" ? n.ordinalNumber(e.getDate(), { unit: "date" }) : Qe.d(e, t);
|
|
5913
5946
|
},
|
|
5914
5947
|
// Day of year
|
|
5915
5948
|
D: function(e, t, n) {
|
|
@@ -6155,11 +6188,11 @@ const Xe = {
|
|
|
6155
6188
|
let r = e.getHours() % 12;
|
|
6156
6189
|
return r === 0 && (r = 12), n.ordinalNumber(r, { unit: "hour" });
|
|
6157
6190
|
}
|
|
6158
|
-
return
|
|
6191
|
+
return Qe.h(e, t);
|
|
6159
6192
|
},
|
|
6160
6193
|
// Hour [0-23]
|
|
6161
6194
|
H: function(e, t, n) {
|
|
6162
|
-
return t === "Ho" ? n.ordinalNumber(e.getHours(), { unit: "hour" }) :
|
|
6195
|
+
return t === "Ho" ? n.ordinalNumber(e.getHours(), { unit: "hour" }) : Qe.H(e, t);
|
|
6163
6196
|
},
|
|
6164
6197
|
// Hour [0-11]
|
|
6165
6198
|
K: function(e, t, n) {
|
|
@@ -6173,15 +6206,15 @@ const Xe = {
|
|
|
6173
6206
|
},
|
|
6174
6207
|
// Minute
|
|
6175
6208
|
m: function(e, t, n) {
|
|
6176
|
-
return t === "mo" ? n.ordinalNumber(e.getMinutes(), { unit: "minute" }) :
|
|
6209
|
+
return t === "mo" ? n.ordinalNumber(e.getMinutes(), { unit: "minute" }) : Qe.m(e, t);
|
|
6177
6210
|
},
|
|
6178
6211
|
// Second
|
|
6179
6212
|
s: function(e, t, n) {
|
|
6180
|
-
return t === "so" ? n.ordinalNumber(e.getSeconds(), { unit: "second" }) :
|
|
6213
|
+
return t === "so" ? n.ordinalNumber(e.getSeconds(), { unit: "second" }) : Qe.s(e, t);
|
|
6181
6214
|
},
|
|
6182
6215
|
// Fraction of second
|
|
6183
6216
|
S: function(e, t) {
|
|
6184
|
-
return
|
|
6217
|
+
return Qe.S(e, t);
|
|
6185
6218
|
},
|
|
6186
6219
|
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
6187
6220
|
X: function(e, t, n) {
|
|
@@ -6294,7 +6327,7 @@ const va = (e, t) => {
|
|
|
6294
6327
|
default:
|
|
6295
6328
|
return t.date({ width: "full" });
|
|
6296
6329
|
}
|
|
6297
|
-
},
|
|
6330
|
+
}, ri = (e, t) => {
|
|
6298
6331
|
switch (e) {
|
|
6299
6332
|
case "p":
|
|
6300
6333
|
return t.time({ width: "short" });
|
|
@@ -6326,9 +6359,9 @@ const va = (e, t) => {
|
|
|
6326
6359
|
a = t.dateTime({ width: "full" });
|
|
6327
6360
|
break;
|
|
6328
6361
|
}
|
|
6329
|
-
return a.replace("{{date}}", va(r, t)).replace("{{time}}",
|
|
6362
|
+
return a.replace("{{date}}", va(r, t)).replace("{{time}}", ri(o, t));
|
|
6330
6363
|
}, rp = {
|
|
6331
|
-
p:
|
|
6364
|
+
p: ri,
|
|
6332
6365
|
P: np
|
|
6333
6366
|
}, op = /^D+$/, ap = /^Y+$/, sp = ["D", "DD", "YY", "YYYY"];
|
|
6334
6367
|
function ip(e) {
|
|
@@ -6348,7 +6381,7 @@ function up(e, t, n) {
|
|
|
6348
6381
|
const dp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, fp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, mp = /^'([^]*?)'?$/, pp = /''/g, hp = /[a-zA-Z]/;
|
|
6349
6382
|
function Hr(e, t, n) {
|
|
6350
6383
|
const r = Un(), o = r.locale ?? Qm, a = r.firstWeekContainsDate ?? r.locale?.options?.firstWeekContainsDate ?? 1, s = r.weekStartsOn ?? r.locale?.options?.weekStartsOn ?? 0, i = De(e, n?.in);
|
|
6351
|
-
if (!
|
|
6384
|
+
if (!ti(i))
|
|
6352
6385
|
throw new RangeError("Invalid time value");
|
|
6353
6386
|
let c = t.match(fp).map((d) => {
|
|
6354
6387
|
const m = d[0];
|
|
@@ -6392,11 +6425,11 @@ function gp(e) {
|
|
|
6392
6425
|
function bp(e, t) {
|
|
6393
6426
|
return f.useReducer((n, r) => t[n][r] ?? n, e);
|
|
6394
6427
|
}
|
|
6395
|
-
var
|
|
6428
|
+
var jn = (e) => {
|
|
6396
6429
|
const { present: t, children: n } = e, r = vp(t), o = typeof n == "function" ? n({ present: r.isPresent }) : f.Children.only(n), a = ie(r.ref, yp(o));
|
|
6397
6430
|
return typeof n == "function" || r.isPresent ? f.cloneElement(o, { ref: a }) : null;
|
|
6398
6431
|
};
|
|
6399
|
-
|
|
6432
|
+
jn.displayName = "Presence";
|
|
6400
6433
|
function vp(e) {
|
|
6401
6434
|
const [t, n] = f.useState(), r = f.useRef(null), o = f.useRef(e), a = f.useRef("none"), s = e ? "mounted" : "unmounted", [i, c] = bp(s, {
|
|
6402
6435
|
mounted: {
|
|
@@ -6426,9 +6459,9 @@ function vp(e) {
|
|
|
6426
6459
|
const d = t.ownerDocument.defaultView ?? window, m = (p) => {
|
|
6427
6460
|
const h = gn(r.current).includes(CSS.escape(p.animationName));
|
|
6428
6461
|
if (p.target === t && h && (c("ANIMATION_END"), !o.current)) {
|
|
6429
|
-
const
|
|
6462
|
+
const v = t.style.animationFillMode;
|
|
6430
6463
|
t.style.animationFillMode = "forwards", l = d.setTimeout(() => {
|
|
6431
|
-
t.style.animationFillMode === "forwards" && (t.style.animationFillMode =
|
|
6464
|
+
t.style.animationFillMode === "forwards" && (t.style.animationFillMode = v);
|
|
6432
6465
|
});
|
|
6433
6466
|
}
|
|
6434
6467
|
}, g = (p) => {
|
|
@@ -6471,15 +6504,15 @@ var wp = [
|
|
|
6471
6504
|
"span",
|
|
6472
6505
|
"svg",
|
|
6473
6506
|
"ul"
|
|
6474
|
-
],
|
|
6507
|
+
], oi = wp.reduce((e, t) => {
|
|
6475
6508
|
const n = /* @__PURE__ */ Ce(`Primitive.${t}`), r = f.forwardRef((o, a) => {
|
|
6476
6509
|
const { asChild: s, ...i } = o, c = s ? n : t;
|
|
6477
6510
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ u(c, { ...i, ref: a });
|
|
6478
6511
|
});
|
|
6479
6512
|
return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
|
|
6480
|
-
}, {}),
|
|
6513
|
+
}, {}), Vn = "Popover", [ai] = ht(Vn, [
|
|
6481
6514
|
$n
|
|
6482
|
-
]), en = $n(), [xp, st] =
|
|
6515
|
+
]), en = $n(), [xp, st] = ai(Vn), si = (e) => {
|
|
6483
6516
|
const {
|
|
6484
6517
|
__scopePopover: t,
|
|
6485
6518
|
children: n,
|
|
@@ -6491,9 +6524,9 @@ var wp = [
|
|
|
6491
6524
|
prop: r,
|
|
6492
6525
|
defaultProp: o ?? !1,
|
|
6493
6526
|
onChange: a,
|
|
6494
|
-
caller:
|
|
6527
|
+
caller: Vn
|
|
6495
6528
|
});
|
|
6496
|
-
return /* @__PURE__ */ u(
|
|
6529
|
+
return /* @__PURE__ */ u(is, { ...i, children: /* @__PURE__ */ u(
|
|
6497
6530
|
xp,
|
|
6498
6531
|
{
|
|
6499
6532
|
scope: t,
|
|
@@ -6510,24 +6543,24 @@ var wp = [
|
|
|
6510
6543
|
}
|
|
6511
6544
|
) });
|
|
6512
6545
|
};
|
|
6513
|
-
|
|
6514
|
-
var
|
|
6546
|
+
si.displayName = Vn;
|
|
6547
|
+
var ii = "PopoverAnchor", Sp = f.forwardRef(
|
|
6515
6548
|
(e, t) => {
|
|
6516
|
-
const { __scopePopover: n, ...r } = e, o = st(
|
|
6549
|
+
const { __scopePopover: n, ...r } = e, o = st(ii, n), a = en(n), { onCustomAnchorAdd: s, onCustomAnchorRemove: i } = o;
|
|
6517
6550
|
return f.useEffect(() => (s(), () => i()), [s, i]), /* @__PURE__ */ u(ao, { ...a, ...r, ref: t });
|
|
6518
6551
|
}
|
|
6519
6552
|
);
|
|
6520
|
-
Sp.displayName =
|
|
6521
|
-
var
|
|
6553
|
+
Sp.displayName = ii;
|
|
6554
|
+
var ci = "PopoverTrigger", li = f.forwardRef(
|
|
6522
6555
|
(e, t) => {
|
|
6523
|
-
const { __scopePopover: n, ...r } = e, o = st(
|
|
6524
|
-
|
|
6556
|
+
const { __scopePopover: n, ...r } = e, o = st(ci, n), a = en(n), s = ie(t, o.triggerRef), i = /* @__PURE__ */ u(
|
|
6557
|
+
oi.button,
|
|
6525
6558
|
{
|
|
6526
6559
|
type: "button",
|
|
6527
6560
|
"aria-haspopup": "dialog",
|
|
6528
6561
|
"aria-expanded": o.open,
|
|
6529
6562
|
"aria-controls": o.contentId,
|
|
6530
|
-
"data-state":
|
|
6563
|
+
"data-state": pi(o.open),
|
|
6531
6564
|
...r,
|
|
6532
6565
|
ref: s,
|
|
6533
6566
|
onClick: Z(e.onClick, o.onOpenToggle)
|
|
@@ -6536,29 +6569,29 @@ var ii = "PopoverTrigger", ci = f.forwardRef(
|
|
|
6536
6569
|
return o.hasCustomAnchor ? i : /* @__PURE__ */ u(ao, { asChild: !0, ...a, children: i });
|
|
6537
6570
|
}
|
|
6538
6571
|
);
|
|
6539
|
-
|
|
6540
|
-
var lo = "PopoverPortal", [Cp, Ep] =
|
|
6572
|
+
li.displayName = ci;
|
|
6573
|
+
var lo = "PopoverPortal", [Cp, Ep] = ai(lo, {
|
|
6541
6574
|
forceMount: void 0
|
|
6542
|
-
}),
|
|
6575
|
+
}), ui = (e) => {
|
|
6543
6576
|
const { __scopePopover: t, forceMount: n, children: r, container: o } = e, a = st(lo, t);
|
|
6544
|
-
return /* @__PURE__ */ u(Cp, { scope: t, forceMount: n, children: /* @__PURE__ */ u(
|
|
6577
|
+
return /* @__PURE__ */ u(Cp, { scope: t, forceMount: n, children: /* @__PURE__ */ u(jn, { present: n || a.open, children: /* @__PURE__ */ u(so, { asChild: !0, container: o, children: r }) }) });
|
|
6545
6578
|
};
|
|
6546
|
-
|
|
6547
|
-
var Pt = "PopoverContent",
|
|
6579
|
+
ui.displayName = lo;
|
|
6580
|
+
var Pt = "PopoverContent", di = f.forwardRef(
|
|
6548
6581
|
(e, t) => {
|
|
6549
6582
|
const n = Ep(Pt, e.__scopePopover), { forceMount: r = n.forceMount, ...o } = e, a = st(Pt, e.__scopePopover);
|
|
6550
|
-
return /* @__PURE__ */ u(
|
|
6583
|
+
return /* @__PURE__ */ u(jn, { present: r || a.open, children: a.modal ? /* @__PURE__ */ u(Ap, { ...o, ref: t }) : /* @__PURE__ */ u(Np, { ...o, ref: t }) });
|
|
6551
6584
|
}
|
|
6552
6585
|
);
|
|
6553
|
-
|
|
6586
|
+
di.displayName = Pt;
|
|
6554
6587
|
var kp = /* @__PURE__ */ Ce("PopoverContent.RemoveScroll"), Ap = f.forwardRef(
|
|
6555
6588
|
(e, t) => {
|
|
6556
6589
|
const n = st(Pt, e.__scopePopover), r = f.useRef(null), o = ie(t, r), a = f.useRef(!1);
|
|
6557
6590
|
return f.useEffect(() => {
|
|
6558
6591
|
const s = r.current;
|
|
6559
|
-
if (s) return
|
|
6592
|
+
if (s) return ms(s);
|
|
6560
6593
|
}, []), /* @__PURE__ */ u(io, { as: kp, allowPinchZoom: !0, children: /* @__PURE__ */ u(
|
|
6561
|
-
|
|
6594
|
+
fi,
|
|
6562
6595
|
{
|
|
6563
6596
|
...e,
|
|
6564
6597
|
ref: o,
|
|
@@ -6587,7 +6620,7 @@ var kp = /* @__PURE__ */ Ce("PopoverContent.RemoveScroll"), Ap = f.forwardRef(
|
|
|
6587
6620
|
(e, t) => {
|
|
6588
6621
|
const n = st(Pt, e.__scopePopover), r = f.useRef(!1), o = f.useRef(!1);
|
|
6589
6622
|
return /* @__PURE__ */ u(
|
|
6590
|
-
|
|
6623
|
+
fi,
|
|
6591
6624
|
{
|
|
6592
6625
|
...e,
|
|
6593
6626
|
ref: t,
|
|
@@ -6604,7 +6637,7 @@ var kp = /* @__PURE__ */ Ce("PopoverContent.RemoveScroll"), Ap = f.forwardRef(
|
|
|
6604
6637
|
}
|
|
6605
6638
|
);
|
|
6606
6639
|
}
|
|
6607
|
-
),
|
|
6640
|
+
), fi = f.forwardRef(
|
|
6608
6641
|
(e, t) => {
|
|
6609
6642
|
const {
|
|
6610
6643
|
__scopePopover: n,
|
|
@@ -6618,7 +6651,7 @@ var kp = /* @__PURE__ */ Ce("PopoverContent.RemoveScroll"), Ap = f.forwardRef(
|
|
|
6618
6651
|
onInteractOutside: d,
|
|
6619
6652
|
...m
|
|
6620
6653
|
} = e, g = st(Pt, n), p = en(n);
|
|
6621
|
-
return
|
|
6654
|
+
return La(), /* @__PURE__ */ u(
|
|
6622
6655
|
Xr,
|
|
6623
6656
|
{
|
|
6624
6657
|
asChild: !0,
|
|
@@ -6637,9 +6670,9 @@ var kp = /* @__PURE__ */ Ce("PopoverContent.RemoveScroll"), Ap = f.forwardRef(
|
|
|
6637
6670
|
onFocusOutside: l,
|
|
6638
6671
|
onDismiss: () => g.onOpenChange(!1),
|
|
6639
6672
|
children: /* @__PURE__ */ u(
|
|
6640
|
-
|
|
6673
|
+
cs,
|
|
6641
6674
|
{
|
|
6642
|
-
"data-state":
|
|
6675
|
+
"data-state": pi(g.open),
|
|
6643
6676
|
role: "dialog",
|
|
6644
6677
|
id: g.contentId,
|
|
6645
6678
|
...p,
|
|
@@ -6660,11 +6693,11 @@ var kp = /* @__PURE__ */ Ce("PopoverContent.RemoveScroll"), Ap = f.forwardRef(
|
|
|
6660
6693
|
}
|
|
6661
6694
|
);
|
|
6662
6695
|
}
|
|
6663
|
-
),
|
|
6696
|
+
), mi = "PopoverClose", Tp = f.forwardRef(
|
|
6664
6697
|
(e, t) => {
|
|
6665
|
-
const { __scopePopover: n, ...r } = e, o = st(
|
|
6698
|
+
const { __scopePopover: n, ...r } = e, o = st(mi, n);
|
|
6666
6699
|
return /* @__PURE__ */ u(
|
|
6667
|
-
|
|
6700
|
+
oi.button,
|
|
6668
6701
|
{
|
|
6669
6702
|
type: "button",
|
|
6670
6703
|
...r,
|
|
@@ -6674,29 +6707,29 @@ var kp = /* @__PURE__ */ Ce("PopoverContent.RemoveScroll"), Ap = f.forwardRef(
|
|
|
6674
6707
|
);
|
|
6675
6708
|
}
|
|
6676
6709
|
);
|
|
6677
|
-
Tp.displayName =
|
|
6710
|
+
Tp.displayName = mi;
|
|
6678
6711
|
var Pp = "PopoverArrow", Rp = f.forwardRef(
|
|
6679
6712
|
(e, t) => {
|
|
6680
6713
|
const { __scopePopover: n, ...r } = e, o = en(n);
|
|
6681
|
-
return /* @__PURE__ */ u(
|
|
6714
|
+
return /* @__PURE__ */ u(ls, { ...o, ...r, ref: t });
|
|
6682
6715
|
}
|
|
6683
6716
|
);
|
|
6684
6717
|
Rp.displayName = Pp;
|
|
6685
|
-
function
|
|
6718
|
+
function pi(e) {
|
|
6686
6719
|
return e ? "open" : "closed";
|
|
6687
6720
|
}
|
|
6688
|
-
var Op =
|
|
6689
|
-
function
|
|
6721
|
+
var Op = si, _p = li, Mp = ui, Ip = di;
|
|
6722
|
+
function hi(e) {
|
|
6690
6723
|
var t, n, r = "";
|
|
6691
6724
|
if (typeof e == "string" || typeof e == "number") r += e;
|
|
6692
6725
|
else if (typeof e == "object") if (Array.isArray(e)) {
|
|
6693
6726
|
var o = e.length;
|
|
6694
|
-
for (t = 0; t < o; t++) e[t] && (n =
|
|
6727
|
+
for (t = 0; t < o; t++) e[t] && (n = hi(e[t])) && (r && (r += " "), r += n);
|
|
6695
6728
|
} else for (n in e) e[n] && (r && (r += " "), r += n);
|
|
6696
6729
|
return r;
|
|
6697
6730
|
}
|
|
6698
6731
|
function Dp() {
|
|
6699
|
-
for (var e, t, n = 0, r = "", o = arguments.length; n < o; n++) (e = arguments[n]) && (t =
|
|
6732
|
+
for (var e, t, n = 0, r = "", o = arguments.length; n < o; n++) (e = arguments[n]) && (t = hi(e)) && (r && (r += " "), r += t);
|
|
6700
6733
|
return r;
|
|
6701
6734
|
}
|
|
6702
6735
|
const Lp = (e, t) => {
|
|
@@ -6709,7 +6742,7 @@ const Lp = (e, t) => {
|
|
|
6709
6742
|
}, Fp = (e, t) => ({
|
|
6710
6743
|
classGroupId: e,
|
|
6711
6744
|
validator: t
|
|
6712
|
-
}),
|
|
6745
|
+
}), gi = (e = /* @__PURE__ */ new Map(), t = null, n) => ({
|
|
6713
6746
|
nextPart: e,
|
|
6714
6747
|
validators: t,
|
|
6715
6748
|
classGroupId: n
|
|
@@ -6723,7 +6756,7 @@ const Lp = (e, t) => {
|
|
|
6723
6756
|
if (s.startsWith("[") && s.endsWith("]"))
|
|
6724
6757
|
return zp(s);
|
|
6725
6758
|
const i = s.split(Rn), c = i[0] === "" && i.length > 1 ? 1 : 0;
|
|
6726
|
-
return
|
|
6759
|
+
return bi(i, c, t);
|
|
6727
6760
|
},
|
|
6728
6761
|
getConflictingClassGroupIds: (s, i) => {
|
|
6729
6762
|
if (i) {
|
|
@@ -6733,12 +6766,12 @@ const Lp = (e, t) => {
|
|
|
6733
6766
|
return n[s] || ya;
|
|
6734
6767
|
}
|
|
6735
6768
|
};
|
|
6736
|
-
},
|
|
6769
|
+
}, bi = (e, t, n) => {
|
|
6737
6770
|
if (e.length - t === 0)
|
|
6738
6771
|
return n.classGroupId;
|
|
6739
6772
|
const o = e[t], a = n.nextPart.get(o);
|
|
6740
6773
|
if (a) {
|
|
6741
|
-
const l =
|
|
6774
|
+
const l = bi(e, t + 1, a);
|
|
6742
6775
|
if (l) return l;
|
|
6743
6776
|
}
|
|
6744
6777
|
const s = n.validators;
|
|
@@ -6760,7 +6793,7 @@ const Lp = (e, t) => {
|
|
|
6760
6793
|
} = e;
|
|
6761
6794
|
return Hp(n, t);
|
|
6762
6795
|
}, Hp = (e, t) => {
|
|
6763
|
-
const n =
|
|
6796
|
+
const n = gi();
|
|
6764
6797
|
for (const r in e) {
|
|
6765
6798
|
const o = e[r];
|
|
6766
6799
|
uo(o, n, r, t);
|
|
@@ -6774,18 +6807,18 @@ const Lp = (e, t) => {
|
|
|
6774
6807
|
}
|
|
6775
6808
|
}, Up = (e, t, n, r) => {
|
|
6776
6809
|
if (typeof e == "string") {
|
|
6777
|
-
|
|
6810
|
+
jp(e, t, n);
|
|
6778
6811
|
return;
|
|
6779
6812
|
}
|
|
6780
6813
|
if (typeof e == "function") {
|
|
6781
|
-
|
|
6814
|
+
Vp(e, t, n, r);
|
|
6782
6815
|
return;
|
|
6783
6816
|
}
|
|
6784
6817
|
Gp(e, t, n, r);
|
|
6785
|
-
},
|
|
6786
|
-
const r = e === "" ? t :
|
|
6818
|
+
}, jp = (e, t, n) => {
|
|
6819
|
+
const r = e === "" ? t : vi(t, e);
|
|
6787
6820
|
r.classGroupId = n;
|
|
6788
|
-
},
|
|
6821
|
+
}, Vp = (e, t, n, r) => {
|
|
6789
6822
|
if (Yp(e)) {
|
|
6790
6823
|
uo(e(r), t, n, r);
|
|
6791
6824
|
return;
|
|
@@ -6795,15 +6828,15 @@ const Lp = (e, t) => {
|
|
|
6795
6828
|
const o = Object.entries(e), a = o.length;
|
|
6796
6829
|
for (let s = 0; s < a; s++) {
|
|
6797
6830
|
const [i, c] = o[s];
|
|
6798
|
-
uo(c,
|
|
6831
|
+
uo(c, vi(t, i), n, r);
|
|
6799
6832
|
}
|
|
6800
|
-
},
|
|
6833
|
+
}, vi = (e, t) => {
|
|
6801
6834
|
let n = e;
|
|
6802
6835
|
const r = t.split(Rn), o = r.length;
|
|
6803
6836
|
for (let a = 0; a < o; a++) {
|
|
6804
6837
|
const s = r[a];
|
|
6805
6838
|
let i = n.nextPart.get(s);
|
|
6806
|
-
i || (i =
|
|
6839
|
+
i || (i = gi(), n.nextPart.set(s, i)), n = i;
|
|
6807
6840
|
}
|
|
6808
6841
|
return n;
|
|
6809
6842
|
}, Yp = (e) => "isThemeGetter" in e && e.isThemeGetter === !0, qp = (e) => {
|
|
@@ -6846,18 +6879,18 @@ const Lp = (e, t) => {
|
|
|
6846
6879
|
let s = 0, i = 0, c = 0, l;
|
|
6847
6880
|
const d = o.length;
|
|
6848
6881
|
for (let h = 0; h < d; h++) {
|
|
6849
|
-
const
|
|
6882
|
+
const v = o[h];
|
|
6850
6883
|
if (s === 0 && i === 0) {
|
|
6851
|
-
if (
|
|
6884
|
+
if (v === wa) {
|
|
6852
6885
|
a.push(o.slice(c, h)), c = h + 1;
|
|
6853
6886
|
continue;
|
|
6854
6887
|
}
|
|
6855
|
-
if (
|
|
6888
|
+
if (v === "/") {
|
|
6856
6889
|
l = h;
|
|
6857
6890
|
continue;
|
|
6858
6891
|
}
|
|
6859
6892
|
}
|
|
6860
|
-
|
|
6893
|
+
v === "[" ? s++ : v === "]" ? s-- : v === "(" ? i++ : v === ")" && i--;
|
|
6861
6894
|
}
|
|
6862
6895
|
const m = a.length === 0 ? o : o.slice(c);
|
|
6863
6896
|
let g = m, p = !1;
|
|
@@ -6921,26 +6954,26 @@ const Lp = (e, t) => {
|
|
|
6921
6954
|
c = d + (c.length > 0 ? " " + c : c);
|
|
6922
6955
|
continue;
|
|
6923
6956
|
}
|
|
6924
|
-
let
|
|
6925
|
-
if (!
|
|
6926
|
-
if (!
|
|
6957
|
+
let v = !!h, k = r(v ? w.substring(0, h) : w);
|
|
6958
|
+
if (!k) {
|
|
6959
|
+
if (!v) {
|
|
6927
6960
|
c = d + (c.length > 0 ? " " + c : c);
|
|
6928
6961
|
continue;
|
|
6929
6962
|
}
|
|
6930
|
-
if (
|
|
6963
|
+
if (k = r(w), !k) {
|
|
6931
6964
|
c = d + (c.length > 0 ? " " + c : c);
|
|
6932
6965
|
continue;
|
|
6933
6966
|
}
|
|
6934
|
-
|
|
6967
|
+
v = !1;
|
|
6935
6968
|
}
|
|
6936
|
-
const C = g.length === 0 ? "" : g.length === 1 ? g[0] : a(g).join(":"),
|
|
6937
|
-
if (s.indexOf(
|
|
6969
|
+
const C = g.length === 0 ? "" : g.length === 1 ? g[0] : a(g).join(":"), E = p ? C + Ur : C, y = E + k;
|
|
6970
|
+
if (s.indexOf(y) > -1)
|
|
6938
6971
|
continue;
|
|
6939
|
-
s.push(
|
|
6940
|
-
const T = o(
|
|
6972
|
+
s.push(y);
|
|
6973
|
+
const T = o(k, v);
|
|
6941
6974
|
for (let D = 0; D < T.length; ++D) {
|
|
6942
6975
|
const _ = T[D];
|
|
6943
|
-
s.push(
|
|
6976
|
+
s.push(E + _);
|
|
6944
6977
|
}
|
|
6945
6978
|
c = d + (c.length > 0 ? " " + c : c);
|
|
6946
6979
|
}
|
|
@@ -6948,14 +6981,14 @@ const Lp = (e, t) => {
|
|
|
6948
6981
|
}, th = (...e) => {
|
|
6949
6982
|
let t = 0, n, r, o = "";
|
|
6950
6983
|
for (; t < e.length; )
|
|
6951
|
-
(n = e[t++]) && (r =
|
|
6984
|
+
(n = e[t++]) && (r = yi(n)) && (o && (o += " "), o += r);
|
|
6952
6985
|
return o;
|
|
6953
|
-
},
|
|
6986
|
+
}, yi = (e) => {
|
|
6954
6987
|
if (typeof e == "string")
|
|
6955
6988
|
return e;
|
|
6956
6989
|
let t, n = "";
|
|
6957
6990
|
for (let r = 0; r < e.length; r++)
|
|
6958
|
-
e[r] && (t =
|
|
6991
|
+
e[r] && (t = yi(e[r])) && (n && (n += " "), n += t);
|
|
6959
6992
|
return n;
|
|
6960
6993
|
}, nh = (e, ...t) => {
|
|
6961
6994
|
let n, r, o, a;
|
|
@@ -6973,19 +7006,19 @@ const Lp = (e, t) => {
|
|
|
6973
7006
|
}, rh = [], me = (e) => {
|
|
6974
7007
|
const t = (n) => n[e] || rh;
|
|
6975
7008
|
return t.isThemeGetter = !0, t;
|
|
6976
|
-
},
|
|
7009
|
+
}, wi = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, xi = /^\((?:(\w[\w-]*):)?(.+)\)$/i, oh = /^\d+\/\d+$/, ah = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, sh = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, ih = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, ch = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, lh = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, kt = (e) => oh.test(e), K = (e) => !!e && !Number.isNaN(Number(e)), Ze = (e) => !!e && Number.isInteger(Number(e)), Er = (e) => e.endsWith("%") && K(e.slice(0, -1)), Ye = (e) => ah.test(e), uh = () => !0, dh = (e) => (
|
|
6977
7010
|
// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
|
|
6978
7011
|
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
6979
7012
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
6980
7013
|
sh.test(e) && !ih.test(e)
|
|
6981
|
-
),
|
|
6982
|
-
const r =
|
|
7014
|
+
), Si = () => !1, fh = (e) => ch.test(e), mh = (e) => lh.test(e), ph = (e) => !F(e) && !$(e), hh = (e) => It(e, ki, Si), F = (e) => wi.test(e), ut = (e) => It(e, Ai, dh), kr = (e) => It(e, wh, K), Sa = (e) => It(e, Ci, Si), gh = (e) => It(e, Ei, mh), bn = (e) => It(e, Ni, fh), $ = (e) => xi.test(e), Vt = (e) => Dt(e, Ai), bh = (e) => Dt(e, xh), Ca = (e) => Dt(e, Ci), vh = (e) => Dt(e, ki), yh = (e) => Dt(e, Ei), vn = (e) => Dt(e, Ni, !0), It = (e, t, n) => {
|
|
7015
|
+
const r = wi.exec(e);
|
|
6983
7016
|
return r ? r[1] ? t(r[1]) : n(r[2]) : !1;
|
|
6984
7017
|
}, Dt = (e, t, n = !1) => {
|
|
6985
|
-
const r =
|
|
7018
|
+
const r = xi.exec(e);
|
|
6986
7019
|
return r ? r[1] ? t(r[1]) : n : !1;
|
|
6987
|
-
},
|
|
6988
|
-
const e = me("color"), t = me("font"), n = me("text"), r = me("font-weight"), o = me("tracking"), a = me("leading"), s = me("breakpoint"), i = me("container"), c = me("spacing"), l = me("radius"), d = me("shadow"), m = me("inset-shadow"), g = me("text-shadow"), p = me("drop-shadow"), w = me("blur"), h = me("perspective"),
|
|
7020
|
+
}, Ci = (e) => e === "position" || e === "percentage", Ei = (e) => e === "image" || e === "url", ki = (e) => e === "length" || e === "size" || e === "bg-size", Ai = (e) => e === "length", wh = (e) => e === "number", xh = (e) => e === "family-name", Ni = (e) => e === "shadow", Sh = () => {
|
|
7021
|
+
const e = me("color"), t = me("font"), n = me("text"), r = me("font-weight"), o = me("tracking"), a = me("leading"), s = me("breakpoint"), i = me("container"), c = me("spacing"), l = me("radius"), d = me("shadow"), m = me("inset-shadow"), g = me("text-shadow"), p = me("drop-shadow"), w = me("blur"), h = me("perspective"), v = me("aspect"), k = me("ease"), C = me("animate"), E = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], y = () => [
|
|
6989
7022
|
"center",
|
|
6990
7023
|
"top",
|
|
6991
7024
|
"bottom",
|
|
@@ -7003,15 +7036,15 @@ const Lp = (e, t) => {
|
|
|
7003
7036
|
"bottom-left",
|
|
7004
7037
|
// Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
|
|
7005
7038
|
"left-bottom"
|
|
7006
|
-
], T = () => [...
|
|
7007
|
-
span: ["full",
|
|
7008
|
-
},
|
|
7039
|
+
], T = () => [...y(), $, F], D = () => ["auto", "hidden", "clip", "visible", "scroll"], _ = () => ["auto", "contain", "none"], P = () => [$, F, c], z = () => [kt, "full", "auto", ...P()], V = () => [Ze, "none", "subgrid", $, F], H = () => ["auto", {
|
|
7040
|
+
span: ["full", Ze, $, F]
|
|
7041
|
+
}, Ze, $, F], G = () => [Ze, "auto", $, F], x = () => ["auto", "min", "max", "fr", $, F], N = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], R = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], O = () => ["auto", ...P()], A = () => [kt, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...P()], S = () => [e, $, F], W = () => [...y(), Ca, Sa, {
|
|
7009
7042
|
position: [$, F]
|
|
7010
7043
|
}], Y = () => ["no-repeat", {
|
|
7011
7044
|
repeat: ["", "x", "y", "space", "round"]
|
|
7012
|
-
}],
|
|
7045
|
+
}], j = () => ["auto", "cover", "contain", vh, hh, {
|
|
7013
7046
|
size: [$, F]
|
|
7014
|
-
}], ve = () => [Er,
|
|
7047
|
+
}], ve = () => [Er, Vt, ut], q = () => [
|
|
7015
7048
|
// Deprecated since Tailwind CSS v4.0.0
|
|
7016
7049
|
"",
|
|
7017
7050
|
"none",
|
|
@@ -7019,7 +7052,7 @@ const Lp = (e, t) => {
|
|
|
7019
7052
|
l,
|
|
7020
7053
|
$,
|
|
7021
7054
|
F
|
|
7022
|
-
], ee = () => ["", K,
|
|
7055
|
+
], ee = () => ["", K, Vt, ut], J = () => ["solid", "dashed", "dotted", "double"], he = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], L = () => [K, Er, Ca, Sa], te = () => [
|
|
7023
7056
|
// Deprecated since Tailwind CSS v4.0.0
|
|
7024
7057
|
"",
|
|
7025
7058
|
"none",
|
|
@@ -7059,7 +7092,7 @@ const Lp = (e, t) => {
|
|
|
7059
7092
|
* @see https://tailwindcss.com/docs/aspect-ratio
|
|
7060
7093
|
*/
|
|
7061
7094
|
aspect: [{
|
|
7062
|
-
aspect: ["auto", "square", kt, F, $,
|
|
7095
|
+
aspect: ["auto", "square", kt, F, $, v]
|
|
7063
7096
|
}],
|
|
7064
7097
|
/**
|
|
7065
7098
|
* Container
|
|
@@ -7079,14 +7112,14 @@ const Lp = (e, t) => {
|
|
|
7079
7112
|
* @see https://tailwindcss.com/docs/break-after
|
|
7080
7113
|
*/
|
|
7081
7114
|
"break-after": [{
|
|
7082
|
-
"break-after":
|
|
7115
|
+
"break-after": E()
|
|
7083
7116
|
}],
|
|
7084
7117
|
/**
|
|
7085
7118
|
* Break Before
|
|
7086
7119
|
* @see https://tailwindcss.com/docs/break-before
|
|
7087
7120
|
*/
|
|
7088
7121
|
"break-before": [{
|
|
7089
|
-
"break-before":
|
|
7122
|
+
"break-before": E()
|
|
7090
7123
|
}],
|
|
7091
7124
|
/**
|
|
7092
7125
|
* Break Inside
|
|
@@ -7272,7 +7305,7 @@ const Lp = (e, t) => {
|
|
|
7272
7305
|
* @see https://tailwindcss.com/docs/z-index
|
|
7273
7306
|
*/
|
|
7274
7307
|
z: [{
|
|
7275
|
-
z: [
|
|
7308
|
+
z: [Ze, "auto", $, F]
|
|
7276
7309
|
}],
|
|
7277
7310
|
// ------------------------
|
|
7278
7311
|
// --- Flexbox and Grid ---
|
|
@@ -7324,14 +7357,14 @@ const Lp = (e, t) => {
|
|
|
7324
7357
|
* @see https://tailwindcss.com/docs/order
|
|
7325
7358
|
*/
|
|
7326
7359
|
order: [{
|
|
7327
|
-
order: [
|
|
7360
|
+
order: [Ze, "first", "last", "none", $, F]
|
|
7328
7361
|
}],
|
|
7329
7362
|
/**
|
|
7330
7363
|
* Grid Template Columns
|
|
7331
7364
|
* @see https://tailwindcss.com/docs/grid-template-columns
|
|
7332
7365
|
*/
|
|
7333
7366
|
"grid-cols": [{
|
|
7334
|
-
"grid-cols":
|
|
7367
|
+
"grid-cols": V()
|
|
7335
7368
|
}],
|
|
7336
7369
|
/**
|
|
7337
7370
|
* Grid Column Start / End
|
|
@@ -7359,7 +7392,7 @@ const Lp = (e, t) => {
|
|
|
7359
7392
|
* @see https://tailwindcss.com/docs/grid-template-rows
|
|
7360
7393
|
*/
|
|
7361
7394
|
"grid-rows": [{
|
|
7362
|
-
"grid-rows":
|
|
7395
|
+
"grid-rows": V()
|
|
7363
7396
|
}],
|
|
7364
7397
|
/**
|
|
7365
7398
|
* Grid Row Start / End
|
|
@@ -7719,7 +7752,7 @@ const Lp = (e, t) => {
|
|
|
7719
7752
|
* @see https://tailwindcss.com/docs/font-size
|
|
7720
7753
|
*/
|
|
7721
7754
|
"font-size": [{
|
|
7722
|
-
text: ["base", n,
|
|
7755
|
+
text: ["base", n, Vt, ut]
|
|
7723
7756
|
}],
|
|
7724
7757
|
/**
|
|
7725
7758
|
* Font Smoothing
|
|
@@ -7992,7 +8025,7 @@ const Lp = (e, t) => {
|
|
|
7992
8025
|
* @see https://tailwindcss.com/docs/background-size
|
|
7993
8026
|
*/
|
|
7994
8027
|
"bg-size": [{
|
|
7995
|
-
bg:
|
|
8028
|
+
bg: j()
|
|
7996
8029
|
}],
|
|
7997
8030
|
/**
|
|
7998
8031
|
* Background Image
|
|
@@ -8002,9 +8035,9 @@ const Lp = (e, t) => {
|
|
|
8002
8035
|
bg: ["none", {
|
|
8003
8036
|
linear: [{
|
|
8004
8037
|
to: ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
|
|
8005
|
-
},
|
|
8038
|
+
}, Ze, $, F],
|
|
8006
8039
|
radial: ["", $, F],
|
|
8007
|
-
conic: [
|
|
8040
|
+
conic: [Ze, $, F]
|
|
8008
8041
|
}, yh, gh]
|
|
8009
8042
|
}],
|
|
8010
8043
|
/**
|
|
@@ -8354,7 +8387,7 @@ const Lp = (e, t) => {
|
|
|
8354
8387
|
* @see https://tailwindcss.com/docs/outline-width
|
|
8355
8388
|
*/
|
|
8356
8389
|
"outline-w": [{
|
|
8357
|
-
outline: ["", K,
|
|
8390
|
+
outline: ["", K, Vt, ut]
|
|
8358
8391
|
}],
|
|
8359
8392
|
/**
|
|
8360
8393
|
* Outline Color
|
|
@@ -8619,7 +8652,7 @@ const Lp = (e, t) => {
|
|
|
8619
8652
|
}]
|
|
8620
8653
|
}],
|
|
8621
8654
|
"mask-image-radial-pos": [{
|
|
8622
|
-
"mask-radial-at":
|
|
8655
|
+
"mask-radial-at": y()
|
|
8623
8656
|
}],
|
|
8624
8657
|
"mask-image-conic-pos": [{
|
|
8625
8658
|
"mask-conic": [K]
|
|
@@ -8669,7 +8702,7 @@ const Lp = (e, t) => {
|
|
|
8669
8702
|
* @see https://tailwindcss.com/docs/mask-size
|
|
8670
8703
|
*/
|
|
8671
8704
|
"mask-size": [{
|
|
8672
|
-
mask:
|
|
8705
|
+
mask: j()
|
|
8673
8706
|
}],
|
|
8674
8707
|
/**
|
|
8675
8708
|
* Mask Type
|
|
@@ -8928,7 +8961,7 @@ const Lp = (e, t) => {
|
|
|
8928
8961
|
* @see https://tailwindcss.com/docs/transition-timing-function
|
|
8929
8962
|
*/
|
|
8930
8963
|
ease: [{
|
|
8931
|
-
ease: ["linear", "initial",
|
|
8964
|
+
ease: ["linear", "initial", k, $, F]
|
|
8932
8965
|
}],
|
|
8933
8966
|
/**
|
|
8934
8967
|
* Transition Delay
|
|
@@ -9379,7 +9412,7 @@ const Lp = (e, t) => {
|
|
|
9379
9412
|
* @see https://tailwindcss.com/docs/stroke-width
|
|
9380
9413
|
*/
|
|
9381
9414
|
"stroke-w": [{
|
|
9382
|
-
stroke: [K,
|
|
9415
|
+
stroke: [K, Vt, ut, kr]
|
|
9383
9416
|
}],
|
|
9384
9417
|
/**
|
|
9385
9418
|
* Stroke
|
|
@@ -9496,12 +9529,12 @@ function Eh({
|
|
|
9496
9529
|
error: o,
|
|
9497
9530
|
disabled: a
|
|
9498
9531
|
}) {
|
|
9499
|
-
const [s, i] =
|
|
9532
|
+
const [s, i] = le(!1), c = t[e.name], l = Ta(() => {
|
|
9500
9533
|
const m = { from: void 0, to: void 0 };
|
|
9501
9534
|
if (!c) return m;
|
|
9502
9535
|
const g = (p) => {
|
|
9503
9536
|
const w = new Date(p);
|
|
9504
|
-
return
|
|
9537
|
+
return ti(w) ? w : void 0;
|
|
9505
9538
|
};
|
|
9506
9539
|
if (Array.isArray(c)) {
|
|
9507
9540
|
const p = c[0]?.startDate || c[0], w = c[0]?.endDate || c[1];
|
|
@@ -9573,7 +9606,7 @@ function Eh({
|
|
|
9573
9606
|
) }),
|
|
9574
9607
|
/* @__PURE__ */ I(Kn, { align: "start", className: "w-auto p-0", children: [
|
|
9575
9608
|
/* @__PURE__ */ u("div", { className: "p-3", children: /* @__PURE__ */ u(
|
|
9576
|
-
|
|
9609
|
+
Vr,
|
|
9577
9610
|
{
|
|
9578
9611
|
mode: "range",
|
|
9579
9612
|
selected: l,
|
|
@@ -9617,40 +9650,40 @@ function Ea({
|
|
|
9617
9650
|
api_URL: i,
|
|
9618
9651
|
disabled: c
|
|
9619
9652
|
}) {
|
|
9620
|
-
const l = c, d = e.type === "multifile", m = r?.[e.name] || {}, g = t[e.name], p = d ? g || [] : [g].filter(Boolean), [w, h] =
|
|
9621
|
-
!
|
|
9653
|
+
const l = c, d = e.type === "multifile", m = r?.[e.name] || {}, g = t[e.name], p = d ? g || [] : [g].filter(Boolean), [w, h] = le(!1), v = i ? `${i}uploads` : null;
|
|
9654
|
+
!v && e.uploadEndpoint && console.error(
|
|
9622
9655
|
`api_URL prop is required when using FileField with upload functionality for field "${e.name}"`
|
|
9623
9656
|
);
|
|
9624
|
-
const
|
|
9657
|
+
const k = (x) => {
|
|
9625
9658
|
if (x === 0) return "0 Bytes";
|
|
9626
9659
|
const N = 1024, R = ["Bytes", "KB", "MB", "GB"], O = Math.floor(Math.log(x) / Math.log(N));
|
|
9627
9660
|
return `${parseFloat((x / N ** O).toFixed(2))} ${R[O]}`;
|
|
9628
9661
|
}, C = async (x) => {
|
|
9629
9662
|
const N = new FormData();
|
|
9630
9663
|
N.append("file", x);
|
|
9631
|
-
const R = await fetch(`${
|
|
9664
|
+
const R = await fetch(`${v}`, {
|
|
9632
9665
|
method: "POST",
|
|
9633
9666
|
body: N
|
|
9634
9667
|
});
|
|
9635
9668
|
if (!R.ok)
|
|
9636
9669
|
throw Cn.error("Upload failed"), new Error("Upload failed");
|
|
9637
9670
|
return await R.json();
|
|
9638
|
-
},
|
|
9671
|
+
}, E = async (x, N) => {
|
|
9639
9672
|
if (!N) return;
|
|
9640
9673
|
if (x.maxSize && N.size > x.maxSize)
|
|
9641
9674
|
throw new Error(
|
|
9642
|
-
`File size must not exceed ${
|
|
9675
|
+
`File size must not exceed ${k(x.maxSize)}`
|
|
9643
9676
|
);
|
|
9644
9677
|
const R = await C(N), O = { ...t, [x.name]: R };
|
|
9645
9678
|
a(x.name, R), s(O);
|
|
9646
|
-
},
|
|
9679
|
+
}, y = async (x, N) => {
|
|
9647
9680
|
const R = t[x.name] || [];
|
|
9648
9681
|
if (x.maxFiles && R.length + N.length > x.maxFiles)
|
|
9649
9682
|
throw new Error(`Maximum ${x.maxFiles} files allowed`);
|
|
9650
9683
|
N.forEach((S) => {
|
|
9651
9684
|
if (x.maxSize && S.size > x.maxSize)
|
|
9652
9685
|
throw new Error(
|
|
9653
|
-
`Each file must not exceed ${
|
|
9686
|
+
`Each file must not exceed ${k(x.maxSize)}`
|
|
9654
9687
|
);
|
|
9655
9688
|
});
|
|
9656
9689
|
const O = await Promise.all(
|
|
@@ -9662,7 +9695,7 @@ function Ea({
|
|
|
9662
9695
|
if (l) return;
|
|
9663
9696
|
const R = Array.from(N);
|
|
9664
9697
|
try {
|
|
9665
|
-
e.type === "multifile" ? await
|
|
9698
|
+
e.type === "multifile" ? await y(e, R) : await E(e, R[0]), o.current?.[x] && (o.current[x].value = "");
|
|
9666
9699
|
} catch (O) {
|
|
9667
9700
|
Cn.error(`Upload failed: ${O.message}`);
|
|
9668
9701
|
}
|
|
@@ -9676,7 +9709,7 @@ function Ea({
|
|
|
9676
9709
|
x.preventDefault(), l || h(!1);
|
|
9677
9710
|
}, z = (x) => {
|
|
9678
9711
|
x.preventDefault(), h(!1), !l && x.dataTransfer.files && x.dataTransfer.files.length > 0 && T(e.name, x.dataTransfer.files);
|
|
9679
|
-
},
|
|
9712
|
+
}, V = e.accept ? e.accept.split(",").map((x) => x.split("/")[1] || x.split(".")[1] || x).join(", ").toUpperCase() : "PNG, JPG, PDF", H = e.maxSize ? `, up to ${k(e.maxSize)}` : "", G = `
|
|
9680
9713
|
w-full flex flex-col items-center justify-center p-6 border-2 border-dashed rounded-lg transition-all duration-200
|
|
9681
9714
|
// Ensure focus styling is handled correctly for the button element
|
|
9682
9715
|
focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50
|
|
@@ -9701,7 +9734,7 @@ function Ea({
|
|
|
9701
9734
|
onDrop: z,
|
|
9702
9735
|
disabled: l,
|
|
9703
9736
|
children: [
|
|
9704
|
-
/* @__PURE__ */ u("div", { className: "border-gray-400 border p-1 mb-3 rounded-md bg-gray-100 shadow-md ", children: /* @__PURE__ */ u(
|
|
9737
|
+
/* @__PURE__ */ u("div", { className: "border-gray-400 border p-1 mb-3 rounded-md bg-gray-100 shadow-md ", children: /* @__PURE__ */ u(Ic, { size: 24, className: "m-1" }) }),
|
|
9705
9738
|
/* @__PURE__ */ I("p", { className: "text-sm font-normal", children: [
|
|
9706
9739
|
/* @__PURE__ */ I(
|
|
9707
9740
|
"span",
|
|
@@ -9716,7 +9749,7 @@ function Ea({
|
|
|
9716
9749
|
/* @__PURE__ */ u("span", { className: "font-light", children: " or drag and drop" })
|
|
9717
9750
|
] }),
|
|
9718
9751
|
/* @__PURE__ */ I("p", { className: "text-xs mt-1 text-gray-500", children: [
|
|
9719
|
-
|
|
9752
|
+
V,
|
|
9720
9753
|
H,
|
|
9721
9754
|
d && e.maxFiles && `, Max ${e.maxFiles} files`
|
|
9722
9755
|
] })
|
|
@@ -9749,7 +9782,7 @@ function Ea({
|
|
|
9749
9782
|
/* @__PURE__ */ u("span", { className: "text-sm truncate", children: R }),
|
|
9750
9783
|
O && /* @__PURE__ */ I("span", { className: "text-xs text-gray-500 flex-shrink-0", children: [
|
|
9751
9784
|
"(",
|
|
9752
|
-
|
|
9785
|
+
k(O),
|
|
9753
9786
|
")"
|
|
9754
9787
|
] })
|
|
9755
9788
|
] }),
|
|
@@ -9805,7 +9838,7 @@ function kh({
|
|
|
9805
9838
|
const g = i.current;
|
|
9806
9839
|
g && (g.style.height = "auto", g.style.height = `${g.scrollHeight + 2}px`);
|
|
9807
9840
|
};
|
|
9808
|
-
|
|
9841
|
+
qe(() => {
|
|
9809
9842
|
d();
|
|
9810
9843
|
}, [c]);
|
|
9811
9844
|
const m = (g) => {
|
|
@@ -9845,32 +9878,32 @@ function kh({
|
|
|
9845
9878
|
] });
|
|
9846
9879
|
}
|
|
9847
9880
|
function Ah({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o }) {
|
|
9848
|
-
const [a, s] =
|
|
9849
|
-
if (!
|
|
9881
|
+
const [a, s] = le(!1), i = t[e.name], c = i ? new Date(i) : null, l = c ? (c.getHours() % 12 || 12).toString().padStart(2, "0") : "12", d = c ? c.getMinutes().toString().padStart(2, "0") : "00", m = c ? c.getHours() >= 12 ? "PM" : "AM" : "PM", g = (y) => {
|
|
9882
|
+
if (!y) {
|
|
9850
9883
|
n(e.name, null);
|
|
9851
9884
|
return;
|
|
9852
9885
|
}
|
|
9853
|
-
const T = new Date(
|
|
9886
|
+
const T = new Date(y);
|
|
9854
9887
|
c ? (T.setHours(c.getHours()), T.setMinutes(c.getMinutes())) : (T.setHours(12), T.setMinutes(0)), n(e.name, T);
|
|
9855
|
-
}, p = (
|
|
9888
|
+
}, p = (y, T, D) => {
|
|
9856
9889
|
const _ = c ? new Date(c) : /* @__PURE__ */ new Date();
|
|
9857
|
-
let P = parseInt(
|
|
9890
|
+
let P = parseInt(y);
|
|
9858
9891
|
D === "PM" && P !== 12 && (P += 12), D === "AM" && P === 12 && (P = 0), _.setHours(P), _.setMinutes(parseInt(T)), n(e.name, _);
|
|
9859
9892
|
}, w = () => {
|
|
9860
|
-
let
|
|
9861
|
-
|
|
9893
|
+
let y = parseInt(l);
|
|
9894
|
+
y = y % 12 + 1, p(y.toString(), d, m);
|
|
9862
9895
|
}, h = () => {
|
|
9863
|
-
let
|
|
9864
|
-
|
|
9865
|
-
},
|
|
9866
|
-
let
|
|
9867
|
-
|
|
9868
|
-
},
|
|
9869
|
-
let
|
|
9870
|
-
|
|
9896
|
+
let y = parseInt(l);
|
|
9897
|
+
y = y === 1 ? 12 : y - 1, p(y.toString(), d, m);
|
|
9898
|
+
}, v = () => {
|
|
9899
|
+
let y = parseInt(d);
|
|
9900
|
+
y = (y + 5) % 60, p(l, y.toString(), m);
|
|
9901
|
+
}, k = () => {
|
|
9902
|
+
let y = parseInt(d);
|
|
9903
|
+
y = y === 0 ? 55 : y - 5, p(l, y.toString(), m);
|
|
9871
9904
|
}, C = () => {
|
|
9872
9905
|
p(l, d, m === "AM" ? "PM" : "AM");
|
|
9873
|
-
},
|
|
9906
|
+
}, E = () => n(e.name, null);
|
|
9874
9907
|
return /* @__PURE__ */ I("div", { className: "relative", children: [
|
|
9875
9908
|
/* @__PURE__ */ I(Yn, { open: a, onOpenChange: s, children: [
|
|
9876
9909
|
/* @__PURE__ */ u(qn, { asChild: !0, children: /* @__PURE__ */ I(
|
|
@@ -9881,7 +9914,7 @@ function Ah({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
|
|
|
9881
9914
|
"aria-haspopup": "dialog",
|
|
9882
9915
|
"aria-expanded": a,
|
|
9883
9916
|
onClick: () => s(!0),
|
|
9884
|
-
onKeyDown: (
|
|
9917
|
+
onKeyDown: (y) => y.key === "Enter" && s(!0),
|
|
9885
9918
|
className: `
|
|
9886
9919
|
group inline-flex items-center justify-between gap-2
|
|
9887
9920
|
w-full h-10 rounded-lg border bg-white
|
|
@@ -9925,7 +9958,7 @@ function Ah({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
|
|
|
9925
9958
|
className: "z-50 w-auto p-0 bg-white rounded-xl shadow-xl border border-slate-200",
|
|
9926
9959
|
children: [
|
|
9927
9960
|
/* @__PURE__ */ u("div", { className: "p-3", children: /* @__PURE__ */ u(
|
|
9928
|
-
|
|
9961
|
+
Vr,
|
|
9929
9962
|
{
|
|
9930
9963
|
mode: "single",
|
|
9931
9964
|
selected: c,
|
|
@@ -9949,9 +9982,9 @@ function Ah({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
|
|
|
9949
9982
|
] }),
|
|
9950
9983
|
/* @__PURE__ */ u("span", { className: "text-xl font-medium text-slate-300 pb-1", children: ":" }),
|
|
9951
9984
|
/* @__PURE__ */ I("div", { className: "flex flex-col items-center gap-1", children: [
|
|
9952
|
-
/* @__PURE__ */ u("button", { type: "button", onClick:
|
|
9985
|
+
/* @__PURE__ */ u("button", { type: "button", onClick: v, className: "p-1 h-6 w-6 flex items-center justify-center text-slate-400 hover:text-slate-700 hover:bg-slate-200 rounded-full transition-all", children: /* @__PURE__ */ u("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ u("path", { d: "m18 15-6-6-6 6" }) }) }),
|
|
9953
9986
|
/* @__PURE__ */ u("div", { className: "w-12 h-10 flex items-center justify-center bg-white border border-slate-200 rounded-lg text-lg font-semibold shadow-sm text-slate-700", children: d }),
|
|
9954
|
-
/* @__PURE__ */ u("button", { type: "button", onClick:
|
|
9987
|
+
/* @__PURE__ */ u("button", { type: "button", onClick: k, className: "p-1 h-6 w-6 flex items-center justify-center text-slate-400 hover:text-slate-700 hover:bg-slate-200 rounded-full transition-all", children: /* @__PURE__ */ u("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ u("path", { d: "m6 9 6 6 6-6" }) }) })
|
|
9955
9988
|
] })
|
|
9956
9989
|
] }),
|
|
9957
9990
|
/* @__PURE__ */ I("div", { className: "flex flex-col gap-1 bg-white p-1 rounded-lg border border-slate-200 shadow-sm", children: [
|
|
@@ -9980,7 +10013,7 @@ function Ah({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
|
|
|
9980
10013
|
"button",
|
|
9981
10014
|
{
|
|
9982
10015
|
type: "button",
|
|
9983
|
-
onClick:
|
|
10016
|
+
onClick: E,
|
|
9984
10017
|
className: "inline-flex items-center justify-center rounded-lg text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 text-slate-500 hover:text-slate-900 hover:bg-slate-100 h-9 px-4 py-2",
|
|
9985
10018
|
children: "Clear"
|
|
9986
10019
|
}
|
|
@@ -10006,14 +10039,14 @@ var Nh = Symbol.for("react.lazy"), On = f[" use ".trim().toString()];
|
|
|
10006
10039
|
function Th(e) {
|
|
10007
10040
|
return typeof e == "object" && e !== null && "then" in e;
|
|
10008
10041
|
}
|
|
10009
|
-
function
|
|
10042
|
+
function Ti(e) {
|
|
10010
10043
|
return e != null && typeof e == "object" && "$$typeof" in e && e.$$typeof === Nh && "_payload" in e && Th(e._payload);
|
|
10011
10044
|
}
|
|
10012
10045
|
// @__NO_SIDE_EFFECTS__
|
|
10013
10046
|
function Ph(e) {
|
|
10014
10047
|
const t = /* @__PURE__ */ Rh(e), n = f.forwardRef((r, o) => {
|
|
10015
10048
|
let { children: a, ...s } = r;
|
|
10016
|
-
|
|
10049
|
+
Ti(a) && typeof On == "function" && (a = On(a._payload));
|
|
10017
10050
|
const i = f.Children.toArray(a), c = i.find(_h);
|
|
10018
10051
|
if (c) {
|
|
10019
10052
|
const l = c.props.children, d = i.map((m) => m === c ? f.Children.count(l) > 1 ? f.Children.only(null) : f.isValidElement(l) ? l.props.children : null : m);
|
|
@@ -10027,7 +10060,7 @@ function Ph(e) {
|
|
|
10027
10060
|
function Rh(e) {
|
|
10028
10061
|
const t = f.forwardRef((n, r) => {
|
|
10029
10062
|
let { children: o, ...a } = n;
|
|
10030
|
-
if (
|
|
10063
|
+
if (Ti(o) && typeof On == "function" && (o = On(o._payload)), f.isValidElement(o)) {
|
|
10031
10064
|
const s = Ih(o), i = Mh(a, o.props);
|
|
10032
10065
|
return o.type !== f.Fragment && (i.ref = r ? Yr(r, s) : s), f.cloneElement(o, i);
|
|
10033
10066
|
}
|
|
@@ -10078,7 +10111,7 @@ var Dh = [
|
|
|
10078
10111
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ u(c, { ...i, ref: a });
|
|
10079
10112
|
});
|
|
10080
10113
|
return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
|
|
10081
|
-
}, {}), Fh = "Separator", ka = "horizontal", $h = ["horizontal", "vertical"],
|
|
10114
|
+
}, {}), Fh = "Separator", ka = "horizontal", $h = ["horizontal", "vertical"], Pi = f.forwardRef((e, t) => {
|
|
10082
10115
|
const { decorative: n, orientation: r = ka, ...o } = e, a = Wh(r) ? r : ka, i = n ? { role: "none" } : { "aria-orientation": a === "vertical" ? a : void 0, role: "separator" };
|
|
10083
10116
|
return /* @__PURE__ */ u(
|
|
10084
10117
|
Lh.div,
|
|
@@ -10090,11 +10123,11 @@ var Dh = [
|
|
|
10090
10123
|
}
|
|
10091
10124
|
);
|
|
10092
10125
|
});
|
|
10093
|
-
|
|
10126
|
+
Pi.displayName = Fh;
|
|
10094
10127
|
function Wh(e) {
|
|
10095
10128
|
return $h.includes(e);
|
|
10096
10129
|
}
|
|
10097
|
-
var zh =
|
|
10130
|
+
var zh = Pi;
|
|
10098
10131
|
function Ar({
|
|
10099
10132
|
className: e,
|
|
10100
10133
|
orientation: t = "horizontal",
|
|
@@ -10164,19 +10197,19 @@ var Hh = [
|
|
|
10164
10197
|
"span",
|
|
10165
10198
|
"svg",
|
|
10166
10199
|
"ul"
|
|
10167
|
-
],
|
|
10200
|
+
], Ri = Uh.reduce((e, t) => {
|
|
10168
10201
|
const n = /* @__PURE__ */ Ce(`Primitive.${t}`), r = f.forwardRef((o, a) => {
|
|
10169
10202
|
const { asChild: s, ...i } = o, c = s ? n : t;
|
|
10170
10203
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ u(c, { ...i, ref: a });
|
|
10171
10204
|
});
|
|
10172
10205
|
return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
|
|
10173
|
-
}, {}), Nr = "rovingFocusGroup.onEntryFocus",
|
|
10206
|
+
}, {}), Nr = "rovingFocusGroup.onEntryFocus", jh = { bubbles: !1, cancelable: !0 }, tn = "RovingFocusGroup", [jr, Oi, Vh] = _a(tn), [Gh, _i] = ht(
|
|
10174
10207
|
tn,
|
|
10175
|
-
[
|
|
10176
|
-
), [Yh, qh] = Gh(tn),
|
|
10177
|
-
(e, t) => /* @__PURE__ */ u(
|
|
10208
|
+
[Vh]
|
|
10209
|
+
), [Yh, qh] = Gh(tn), Mi = f.forwardRef(
|
|
10210
|
+
(e, t) => /* @__PURE__ */ u(jr.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ u(jr.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ u(Kh, { ...e, ref: t }) }) })
|
|
10178
10211
|
);
|
|
10179
|
-
|
|
10212
|
+
Mi.displayName = tn;
|
|
10180
10213
|
var Kh = f.forwardRef((e, t) => {
|
|
10181
10214
|
const {
|
|
10182
10215
|
__scopeRovingFocusGroup: n,
|
|
@@ -10189,17 +10222,17 @@ var Kh = f.forwardRef((e, t) => {
|
|
|
10189
10222
|
onEntryFocus: l,
|
|
10190
10223
|
preventScrollOnEntryFocus: d = !1,
|
|
10191
10224
|
...m
|
|
10192
|
-
} = e, g = f.useRef(null), p = ie(t, g), w = qr(a), [h,
|
|
10225
|
+
} = e, g = f.useRef(null), p = ie(t, g), w = qr(a), [h, v] = Xt({
|
|
10193
10226
|
prop: s,
|
|
10194
10227
|
defaultProp: i ?? null,
|
|
10195
10228
|
onChange: c,
|
|
10196
10229
|
caller: tn
|
|
10197
|
-
}), [
|
|
10230
|
+
}), [k, C] = f.useState(!1), E = et(l), y = Oi(n), T = f.useRef(!1), [D, _] = f.useState(0);
|
|
10198
10231
|
return f.useEffect(() => {
|
|
10199
10232
|
const P = g.current;
|
|
10200
10233
|
if (P)
|
|
10201
|
-
return P.addEventListener(Nr,
|
|
10202
|
-
}, [
|
|
10234
|
+
return P.addEventListener(Nr, E), () => P.removeEventListener(Nr, E);
|
|
10235
|
+
}, [E]), /* @__PURE__ */ u(
|
|
10203
10236
|
Yh,
|
|
10204
10237
|
{
|
|
10205
10238
|
scope: n,
|
|
@@ -10208,8 +10241,8 @@ var Kh = f.forwardRef((e, t) => {
|
|
|
10208
10241
|
loop: o,
|
|
10209
10242
|
currentTabStopId: h,
|
|
10210
10243
|
onItemFocus: f.useCallback(
|
|
10211
|
-
(P) =>
|
|
10212
|
-
[
|
|
10244
|
+
(P) => v(P),
|
|
10245
|
+
[v]
|
|
10213
10246
|
),
|
|
10214
10247
|
onItemShiftTab: f.useCallback(() => C(!0), []),
|
|
10215
10248
|
onFocusableItemAdd: f.useCallback(
|
|
@@ -10221,9 +10254,9 @@ var Kh = f.forwardRef((e, t) => {
|
|
|
10221
10254
|
[]
|
|
10222
10255
|
),
|
|
10223
10256
|
children: /* @__PURE__ */ u(
|
|
10224
|
-
|
|
10257
|
+
Ri.div,
|
|
10225
10258
|
{
|
|
10226
|
-
tabIndex:
|
|
10259
|
+
tabIndex: k || D === 0 ? -1 : 0,
|
|
10227
10260
|
"data-orientation": r,
|
|
10228
10261
|
...m,
|
|
10229
10262
|
ref: p,
|
|
@@ -10233,13 +10266,13 @@ var Kh = f.forwardRef((e, t) => {
|
|
|
10233
10266
|
}),
|
|
10234
10267
|
onFocus: Z(e.onFocus, (P) => {
|
|
10235
10268
|
const z = !T.current;
|
|
10236
|
-
if (P.target === P.currentTarget && z && !
|
|
10237
|
-
const
|
|
10238
|
-
if (P.currentTarget.dispatchEvent(
|
|
10239
|
-
const H =
|
|
10269
|
+
if (P.target === P.currentTarget && z && !k) {
|
|
10270
|
+
const V = new CustomEvent(Nr, jh);
|
|
10271
|
+
if (P.currentTarget.dispatchEvent(V), !V.defaultPrevented) {
|
|
10272
|
+
const H = y().filter((O) => O.focusable), G = H.find((O) => O.active), x = H.find((O) => O.id === h), R = [G, x, ...H].filter(
|
|
10240
10273
|
Boolean
|
|
10241
10274
|
).map((O) => O.ref.current);
|
|
10242
|
-
|
|
10275
|
+
Li(R, d);
|
|
10243
10276
|
}
|
|
10244
10277
|
}
|
|
10245
10278
|
T.current = !1;
|
|
@@ -10249,7 +10282,7 @@ var Kh = f.forwardRef((e, t) => {
|
|
|
10249
10282
|
)
|
|
10250
10283
|
}
|
|
10251
10284
|
);
|
|
10252
|
-
}),
|
|
10285
|
+
}), Ii = "RovingFocusGroupItem", Di = f.forwardRef(
|
|
10253
10286
|
(e, t) => {
|
|
10254
10287
|
const {
|
|
10255
10288
|
__scopeRovingFocusGroup: n,
|
|
@@ -10258,46 +10291,46 @@ var Kh = f.forwardRef((e, t) => {
|
|
|
10258
10291
|
tabStopId: a,
|
|
10259
10292
|
children: s,
|
|
10260
10293
|
...i
|
|
10261
|
-
} = e, c = Zt(), l = a || c, d = qh(
|
|
10294
|
+
} = e, c = Zt(), l = a || c, d = qh(Ii, n), m = d.currentTabStopId === l, g = Oi(n), { onFocusableItemAdd: p, onFocusableItemRemove: w, currentTabStopId: h } = d;
|
|
10262
10295
|
return f.useEffect(() => {
|
|
10263
10296
|
if (r)
|
|
10264
10297
|
return p(), () => w();
|
|
10265
10298
|
}, [r, p, w]), /* @__PURE__ */ u(
|
|
10266
|
-
|
|
10299
|
+
jr.ItemSlot,
|
|
10267
10300
|
{
|
|
10268
10301
|
scope: n,
|
|
10269
10302
|
id: l,
|
|
10270
10303
|
focusable: r,
|
|
10271
10304
|
active: o,
|
|
10272
10305
|
children: /* @__PURE__ */ u(
|
|
10273
|
-
|
|
10306
|
+
Ri.span,
|
|
10274
10307
|
{
|
|
10275
10308
|
tabIndex: m ? 0 : -1,
|
|
10276
10309
|
"data-orientation": d.orientation,
|
|
10277
10310
|
...i,
|
|
10278
10311
|
ref: t,
|
|
10279
|
-
onMouseDown: Z(e.onMouseDown, (
|
|
10280
|
-
r ? d.onItemFocus(l) :
|
|
10312
|
+
onMouseDown: Z(e.onMouseDown, (v) => {
|
|
10313
|
+
r ? d.onItemFocus(l) : v.preventDefault();
|
|
10281
10314
|
}),
|
|
10282
10315
|
onFocus: Z(e.onFocus, () => d.onItemFocus(l)),
|
|
10283
|
-
onKeyDown: Z(e.onKeyDown, (
|
|
10284
|
-
if (
|
|
10316
|
+
onKeyDown: Z(e.onKeyDown, (v) => {
|
|
10317
|
+
if (v.key === "Tab" && v.shiftKey) {
|
|
10285
10318
|
d.onItemShiftTab();
|
|
10286
10319
|
return;
|
|
10287
10320
|
}
|
|
10288
|
-
if (
|
|
10289
|
-
const
|
|
10290
|
-
if (
|
|
10291
|
-
if (
|
|
10292
|
-
|
|
10293
|
-
let
|
|
10294
|
-
if (
|
|
10295
|
-
else if (
|
|
10296
|
-
|
|
10297
|
-
const
|
|
10298
|
-
|
|
10321
|
+
if (v.target !== v.currentTarget) return;
|
|
10322
|
+
const k = Zh(v, d.orientation, d.dir);
|
|
10323
|
+
if (k !== void 0) {
|
|
10324
|
+
if (v.metaKey || v.ctrlKey || v.altKey || v.shiftKey) return;
|
|
10325
|
+
v.preventDefault();
|
|
10326
|
+
let E = g().filter((y) => y.focusable).map((y) => y.ref.current);
|
|
10327
|
+
if (k === "last") E.reverse();
|
|
10328
|
+
else if (k === "prev" || k === "next") {
|
|
10329
|
+
k === "prev" && E.reverse();
|
|
10330
|
+
const y = E.indexOf(v.currentTarget);
|
|
10331
|
+
E = d.loop ? Jh(E, y + 1) : E.slice(y + 1);
|
|
10299
10332
|
}
|
|
10300
|
-
setTimeout(() =>
|
|
10333
|
+
setTimeout(() => Li(E));
|
|
10301
10334
|
}
|
|
10302
10335
|
}),
|
|
10303
10336
|
children: typeof s == "function" ? s({ isCurrentTabStop: m, hasTabStop: h != null }) : s
|
|
@@ -10307,7 +10340,7 @@ var Kh = f.forwardRef((e, t) => {
|
|
|
10307
10340
|
);
|
|
10308
10341
|
}
|
|
10309
10342
|
);
|
|
10310
|
-
|
|
10343
|
+
Di.displayName = Ii;
|
|
10311
10344
|
var Xh = {
|
|
10312
10345
|
ArrowLeft: "prev",
|
|
10313
10346
|
ArrowUp: "prev",
|
|
@@ -10326,7 +10359,7 @@ function Zh(e, t, n) {
|
|
|
10326
10359
|
if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(r)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(r)))
|
|
10327
10360
|
return Xh[r];
|
|
10328
10361
|
}
|
|
10329
|
-
function
|
|
10362
|
+
function Li(e, t = !1) {
|
|
10330
10363
|
const n = document.activeElement;
|
|
10331
10364
|
for (const r of e)
|
|
10332
10365
|
if (r === n || (r.focus({ preventScroll: t }), document.activeElement !== n)) return;
|
|
@@ -10334,7 +10367,7 @@ function Di(e, t = !1) {
|
|
|
10334
10367
|
function Jh(e, t) {
|
|
10335
10368
|
return e.map((n, r) => e[(t + r) % e.length]);
|
|
10336
10369
|
}
|
|
10337
|
-
var eg =
|
|
10370
|
+
var eg = Mi, tg = Di, fo = "Radio", [ng, Fi] = ht(fo), [rg, og] = ng(fo), $i = f.forwardRef(
|
|
10338
10371
|
(e, t) => {
|
|
10339
10372
|
const {
|
|
10340
10373
|
__scopeRadio: n,
|
|
@@ -10346,7 +10379,7 @@ var eg = _i, tg = Ii, fo = "Radio", [ng, Li] = ht(fo), [rg, og] = ng(fo), Fi = f
|
|
|
10346
10379
|
onCheck: c,
|
|
10347
10380
|
form: l,
|
|
10348
10381
|
...d
|
|
10349
|
-
} = e, [m, g] = f.useState(null), p = ie(t, (
|
|
10382
|
+
} = e, [m, g] = f.useState(null), p = ie(t, (v) => g(v)), w = f.useRef(!1), h = m ? l || !!m.closest("form") : !0;
|
|
10350
10383
|
return /* @__PURE__ */ I(rg, { scope: n, checked: o, disabled: s, children: [
|
|
10351
10384
|
/* @__PURE__ */ u(
|
|
10352
10385
|
Xn.button,
|
|
@@ -10354,19 +10387,19 @@ var eg = _i, tg = Ii, fo = "Radio", [ng, Li] = ht(fo), [rg, og] = ng(fo), Fi = f
|
|
|
10354
10387
|
type: "button",
|
|
10355
10388
|
role: "radio",
|
|
10356
10389
|
"aria-checked": o,
|
|
10357
|
-
"data-state":
|
|
10390
|
+
"data-state": Hi(o),
|
|
10358
10391
|
"data-disabled": s ? "" : void 0,
|
|
10359
10392
|
disabled: s,
|
|
10360
10393
|
value: i,
|
|
10361
10394
|
...d,
|
|
10362
10395
|
ref: p,
|
|
10363
|
-
onClick: Z(e.onClick, (
|
|
10364
|
-
o || c?.(), h && (w.current =
|
|
10396
|
+
onClick: Z(e.onClick, (v) => {
|
|
10397
|
+
o || c?.(), h && (w.current = v.isPropagationStopped(), w.current || v.stopPropagation());
|
|
10365
10398
|
})
|
|
10366
10399
|
}
|
|
10367
10400
|
),
|
|
10368
10401
|
h && /* @__PURE__ */ u(
|
|
10369
|
-
|
|
10402
|
+
Bi,
|
|
10370
10403
|
{
|
|
10371
10404
|
control: m,
|
|
10372
10405
|
bubbles: !w.current,
|
|
@@ -10382,14 +10415,14 @@ var eg = _i, tg = Ii, fo = "Radio", [ng, Li] = ht(fo), [rg, og] = ng(fo), Fi = f
|
|
|
10382
10415
|
] });
|
|
10383
10416
|
}
|
|
10384
10417
|
);
|
|
10385
|
-
|
|
10386
|
-
var
|
|
10418
|
+
$i.displayName = fo;
|
|
10419
|
+
var Wi = "RadioIndicator", zi = f.forwardRef(
|
|
10387
10420
|
(e, t) => {
|
|
10388
|
-
const { __scopeRadio: n, forceMount: r, ...o } = e, a = og(
|
|
10389
|
-
return /* @__PURE__ */ u(
|
|
10421
|
+
const { __scopeRadio: n, forceMount: r, ...o } = e, a = og(Wi, n);
|
|
10422
|
+
return /* @__PURE__ */ u(jn, { present: r || a.checked, children: /* @__PURE__ */ u(
|
|
10390
10423
|
Xn.span,
|
|
10391
10424
|
{
|
|
10392
|
-
"data-state":
|
|
10425
|
+
"data-state": Hi(a.checked),
|
|
10393
10426
|
"data-disabled": a.disabled ? "" : void 0,
|
|
10394
10427
|
...o,
|
|
10395
10428
|
ref: t
|
|
@@ -10397,8 +10430,8 @@ var $i = "RadioIndicator", Wi = f.forwardRef(
|
|
|
10397
10430
|
) });
|
|
10398
10431
|
}
|
|
10399
10432
|
);
|
|
10400
|
-
|
|
10401
|
-
var ag = "RadioBubbleInput",
|
|
10433
|
+
zi.displayName = Wi;
|
|
10434
|
+
var ag = "RadioBubbleInput", Bi = f.forwardRef(
|
|
10402
10435
|
({
|
|
10403
10436
|
__scopeRadio: e,
|
|
10404
10437
|
control: t,
|
|
@@ -10406,7 +10439,7 @@ var ag = "RadioBubbleInput", zi = f.forwardRef(
|
|
|
10406
10439
|
bubbles: r = !0,
|
|
10407
10440
|
...o
|
|
10408
10441
|
}, a) => {
|
|
10409
|
-
const s = f.useRef(null), i = ie(s, a), c =
|
|
10442
|
+
const s = f.useRef(null), i = ie(s, a), c = us(n), l = Qa(t);
|
|
10410
10443
|
return f.useEffect(() => {
|
|
10411
10444
|
const d = s.current;
|
|
10412
10445
|
if (!d) return;
|
|
@@ -10439,14 +10472,14 @@ var ag = "RadioBubbleInput", zi = f.forwardRef(
|
|
|
10439
10472
|
);
|
|
10440
10473
|
}
|
|
10441
10474
|
);
|
|
10442
|
-
|
|
10443
|
-
function
|
|
10475
|
+
Bi.displayName = ag;
|
|
10476
|
+
function Hi(e) {
|
|
10444
10477
|
return e ? "checked" : "unchecked";
|
|
10445
10478
|
}
|
|
10446
10479
|
var sg = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], Qn = "RadioGroup", [ig] = ht(Qn, [
|
|
10447
|
-
|
|
10448
|
-
|
|
10449
|
-
]),
|
|
10480
|
+
_i,
|
|
10481
|
+
Fi
|
|
10482
|
+
]), Ui = _i(), ji = Fi(), [cg, lg] = ig(Qn), Vi = f.forwardRef(
|
|
10450
10483
|
(e, t) => {
|
|
10451
10484
|
const {
|
|
10452
10485
|
__scopeRadioGroup: n,
|
|
@@ -10460,7 +10493,7 @@ var sg = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], Qn = "RadioGroup",
|
|
|
10460
10493
|
loop: d = !0,
|
|
10461
10494
|
onValueChange: m,
|
|
10462
10495
|
...g
|
|
10463
|
-
} = e, p =
|
|
10496
|
+
} = e, p = Ui(n), w = qr(l), [h, v] = Xt({
|
|
10464
10497
|
prop: a,
|
|
10465
10498
|
defaultProp: o ?? null,
|
|
10466
10499
|
onChange: m,
|
|
@@ -10474,7 +10507,7 @@ var sg = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], Qn = "RadioGroup",
|
|
|
10474
10507
|
required: s,
|
|
10475
10508
|
disabled: i,
|
|
10476
10509
|
value: h,
|
|
10477
|
-
onValueChange:
|
|
10510
|
+
onValueChange: v,
|
|
10478
10511
|
children: /* @__PURE__ */ u(
|
|
10479
10512
|
eg,
|
|
10480
10513
|
{
|
|
@@ -10502,9 +10535,9 @@ var sg = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], Qn = "RadioGroup",
|
|
|
10502
10535
|
}
|
|
10503
10536
|
);
|
|
10504
10537
|
Vi.displayName = Qn;
|
|
10505
|
-
var
|
|
10538
|
+
var Gi = "RadioGroupItem", Yi = f.forwardRef(
|
|
10506
10539
|
(e, t) => {
|
|
10507
|
-
const { __scopeRadioGroup: n, disabled: r, ...o } = e, a = lg(
|
|
10540
|
+
const { __scopeRadioGroup: n, disabled: r, ...o } = e, a = lg(Gi, n), s = a.disabled || r, i = Ui(n), c = ji(n), l = f.useRef(null), d = ie(t, l), m = a.value === o.value, g = f.useRef(!1);
|
|
10508
10541
|
return f.useEffect(() => {
|
|
10509
10542
|
const p = (h) => {
|
|
10510
10543
|
sg.includes(h.key) && (g.current = !0);
|
|
@@ -10520,7 +10553,7 @@ var ji = "RadioGroupItem", Gi = f.forwardRef(
|
|
|
10520
10553
|
focusable: !s,
|
|
10521
10554
|
active: m,
|
|
10522
10555
|
children: /* @__PURE__ */ u(
|
|
10523
|
-
|
|
10556
|
+
$i,
|
|
10524
10557
|
{
|
|
10525
10558
|
disabled: s,
|
|
10526
10559
|
required: a.required,
|
|
@@ -10542,15 +10575,15 @@ var ji = "RadioGroupItem", Gi = f.forwardRef(
|
|
|
10542
10575
|
);
|
|
10543
10576
|
}
|
|
10544
10577
|
);
|
|
10545
|
-
|
|
10546
|
-
var ug = "RadioGroupIndicator",
|
|
10578
|
+
Yi.displayName = Gi;
|
|
10579
|
+
var ug = "RadioGroupIndicator", qi = f.forwardRef(
|
|
10547
10580
|
(e, t) => {
|
|
10548
|
-
const { __scopeRadioGroup: n, ...r } = e, o =
|
|
10549
|
-
return /* @__PURE__ */ u(
|
|
10581
|
+
const { __scopeRadioGroup: n, ...r } = e, o = ji(n);
|
|
10582
|
+
return /* @__PURE__ */ u(zi, { ...o, ...r, ref: t });
|
|
10550
10583
|
}
|
|
10551
10584
|
);
|
|
10552
|
-
|
|
10553
|
-
var dg = Vi, fg =
|
|
10585
|
+
qi.displayName = ug;
|
|
10586
|
+
var dg = Vi, fg = Yi, mg = qi;
|
|
10554
10587
|
function pg({
|
|
10555
10588
|
className: e,
|
|
10556
10589
|
...t
|
|
@@ -10583,7 +10616,7 @@ function Aa({
|
|
|
10583
10616
|
"data-slot": "radio-group-indicator",
|
|
10584
10617
|
className: "relative flex items-center justify-center",
|
|
10585
10618
|
children: /* @__PURE__ */ u(
|
|
10586
|
-
|
|
10619
|
+
_c,
|
|
10587
10620
|
{
|
|
10588
10621
|
className: "fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"
|
|
10589
10622
|
}
|
|
@@ -10609,7 +10642,7 @@ function hg({
|
|
|
10609
10642
|
setCharCounts: d,
|
|
10610
10643
|
fileInputRefs: m,
|
|
10611
10644
|
...g
|
|
10612
|
-
} = s, p = t[e.name] || "", w = a, h = e.options || [],
|
|
10645
|
+
} = s, p = t[e.name] || "", w = a, h = e.options || [], v = e.inline || !1, k = e.renderType === "segment", C = g["aria-describedby"], E = k ? "mt-2 inline-flex w-full p-1 rounded-lg bg-muted/50 border border-border shadow-inner" : v ? "flex flex-wrap gap-6 mt-2" : "space-y-4 mt-2";
|
|
10613
10646
|
return /* @__PURE__ */ I(
|
|
10614
10647
|
"fieldset",
|
|
10615
10648
|
{
|
|
@@ -10623,14 +10656,14 @@ function hg({
|
|
|
10623
10656
|
{
|
|
10624
10657
|
...g,
|
|
10625
10658
|
value: p,
|
|
10626
|
-
onValueChange: (
|
|
10627
|
-
n(e.name,
|
|
10659
|
+
onValueChange: (y) => {
|
|
10660
|
+
n(e.name, y), r(e.name);
|
|
10628
10661
|
},
|
|
10629
10662
|
disabled: w,
|
|
10630
|
-
className:
|
|
10631
|
-
children: h.map((
|
|
10632
|
-
const T = typeof
|
|
10633
|
-
return
|
|
10663
|
+
className: E,
|
|
10664
|
+
children: h.map((y) => {
|
|
10665
|
+
const T = typeof y == "object" ? y.value : y, D = typeof y == "object" ? y.label : y, _ = typeof y == "object" ? y.description : null, P = `${e.name}-${T}`, z = p === T;
|
|
10666
|
+
return k ? /* @__PURE__ */ I(
|
|
10634
10667
|
"label",
|
|
10635
10668
|
{
|
|
10636
10669
|
htmlFor: P,
|
|
@@ -10679,7 +10712,7 @@ function hg({
|
|
|
10679
10712
|
children: D
|
|
10680
10713
|
}
|
|
10681
10714
|
),
|
|
10682
|
-
_ && !
|
|
10715
|
+
_ && !v && /* @__PURE__ */ u(
|
|
10683
10716
|
"p",
|
|
10684
10717
|
{
|
|
10685
10718
|
className: `text-xs ${w ? "text-muted-foreground/60" : "text-muted-foreground"}`,
|
|
@@ -10742,7 +10775,7 @@ function bg({
|
|
|
10742
10775
|
disabled: a,
|
|
10743
10776
|
...s
|
|
10744
10777
|
}) {
|
|
10745
|
-
const [i, c] =
|
|
10778
|
+
const [i, c] = le(!1), l = a, d = t[e.name] ? new Date(t[e.name]) : null;
|
|
10746
10779
|
s["aria-describedby"];
|
|
10747
10780
|
const m = (p) => {
|
|
10748
10781
|
n(e.name, p), e.closeOnSelect !== !1 && c(!1), r(e.name);
|
|
@@ -10822,7 +10855,7 @@ function bg({
|
|
|
10822
10855
|
className: "z-50 w-auto p-0 bg-popover border border-border rounded-lg shadow-xl",
|
|
10823
10856
|
children: [
|
|
10824
10857
|
/* @__PURE__ */ u("div", { className: "p-3", children: /* @__PURE__ */ u(
|
|
10825
|
-
|
|
10858
|
+
Vr,
|
|
10826
10859
|
{
|
|
10827
10860
|
mode: "single",
|
|
10828
10861
|
selected: d,
|
|
@@ -10854,30 +10887,30 @@ function bg({
|
|
|
10854
10887
|
) });
|
|
10855
10888
|
}
|
|
10856
10889
|
function vg({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o }) {
|
|
10857
|
-
const [a, s] =
|
|
10890
|
+
const [a, s] = le(!1), [i, c] = le("12"), [l, d] = le("00"), [m, g] = le("PM"), p = t[e.name] || "";
|
|
10858
10891
|
Te.useEffect(() => {
|
|
10859
10892
|
if (p) {
|
|
10860
|
-
const
|
|
10861
|
-
|
|
10893
|
+
const y = p.match(/(\d{1,2}):(\d{2})\s*(AM|PM)/i);
|
|
10894
|
+
y && (c(y[1].padStart(2, "0")), d(y[2]), g(y[3].toUpperCase()));
|
|
10862
10895
|
}
|
|
10863
10896
|
}, [p]);
|
|
10864
10897
|
const w = () => {
|
|
10865
|
-
const
|
|
10866
|
-
n(e.name,
|
|
10898
|
+
const y = `${i}:${l} ${m}`;
|
|
10899
|
+
n(e.name, y), s(!1);
|
|
10867
10900
|
}, h = () => {
|
|
10868
10901
|
n(e.name, ""), c("12"), d("00"), g("PM");
|
|
10869
|
-
},
|
|
10870
|
-
const
|
|
10871
|
-
c((
|
|
10872
|
-
}, E = () => {
|
|
10873
|
-
const v = parseInt(i);
|
|
10874
|
-
c((v === 1 ? 12 : v - 1).toString().padStart(2, "0"));
|
|
10875
|
-
}, C = () => {
|
|
10876
|
-
const v = parseInt(l);
|
|
10877
|
-
d(((v + 5) % 60).toString().padStart(2, "0"));
|
|
10902
|
+
}, v = () => {
|
|
10903
|
+
const y = parseInt(i);
|
|
10904
|
+
c((y % 12 + 1).toString().padStart(2, "0"));
|
|
10878
10905
|
}, k = () => {
|
|
10879
|
-
const
|
|
10880
|
-
|
|
10906
|
+
const y = parseInt(i);
|
|
10907
|
+
c((y === 1 ? 12 : y - 1).toString().padStart(2, "0"));
|
|
10908
|
+
}, C = () => {
|
|
10909
|
+
const y = parseInt(l);
|
|
10910
|
+
d(((y + 5) % 60).toString().padStart(2, "0"));
|
|
10911
|
+
}, E = () => {
|
|
10912
|
+
const y = parseInt(l);
|
|
10913
|
+
d((y === 0 ? 55 : y - 5).toString().padStart(2, "0"));
|
|
10881
10914
|
};
|
|
10882
10915
|
return /* @__PURE__ */ u("div", { children: /* @__PURE__ */ I(Yn, { open: a, onOpenChange: s, children: [
|
|
10883
10916
|
/* @__PURE__ */ u(qn, { asChild: !0, children: /* @__PURE__ */ I(
|
|
@@ -10934,7 +10967,7 @@ function vg({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
|
|
|
10934
10967
|
"button",
|
|
10935
10968
|
{
|
|
10936
10969
|
type: "button",
|
|
10937
|
-
onClick:
|
|
10970
|
+
onClick: v,
|
|
10938
10971
|
className: "p-1 hover:bg-gray-100 rounded",
|
|
10939
10972
|
children: /* @__PURE__ */ u(
|
|
10940
10973
|
"svg",
|
|
@@ -10956,8 +10989,8 @@ function vg({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
|
|
|
10956
10989
|
{
|
|
10957
10990
|
type: "text",
|
|
10958
10991
|
value: i,
|
|
10959
|
-
onChange: (
|
|
10960
|
-
const T =
|
|
10992
|
+
onChange: (y) => {
|
|
10993
|
+
const T = y.target.value.replace(/\D/g, "");
|
|
10961
10994
|
(T === "" || parseInt(T) >= 1 && parseInt(T) <= 12) && c(T.padStart(2, "0"));
|
|
10962
10995
|
},
|
|
10963
10996
|
className: "w-14 text-center text-2xl font-semibold border-0 focus:outline-none focus:ring-2 focus:ring-blue-500 rounded py-2",
|
|
@@ -10968,7 +11001,7 @@ function vg({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
|
|
|
10968
11001
|
"button",
|
|
10969
11002
|
{
|
|
10970
11003
|
type: "button",
|
|
10971
|
-
onClick:
|
|
11004
|
+
onClick: k,
|
|
10972
11005
|
className: "p-1 hover:bg-gray-100 rounded",
|
|
10973
11006
|
children: /* @__PURE__ */ u(
|
|
10974
11007
|
"svg",
|
|
@@ -11014,8 +11047,8 @@ function vg({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
|
|
|
11014
11047
|
{
|
|
11015
11048
|
type: "text",
|
|
11016
11049
|
value: l,
|
|
11017
|
-
onChange: (
|
|
11018
|
-
const T =
|
|
11050
|
+
onChange: (y) => {
|
|
11051
|
+
const T = y.target.value.replace(/\D/g, "");
|
|
11019
11052
|
(T === "" || parseInt(T) >= 0 && parseInt(T) <= 59) && d(T.padStart(2, "0"));
|
|
11020
11053
|
},
|
|
11021
11054
|
className: "w-14 text-center text-2xl font-semibold border-0 focus:outline-none focus:ring-2 focus:ring-blue-500 rounded py-2",
|
|
@@ -11026,7 +11059,7 @@ function vg({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
|
|
|
11026
11059
|
"button",
|
|
11027
11060
|
{
|
|
11028
11061
|
type: "button",
|
|
11029
|
-
onClick:
|
|
11062
|
+
onClick: E,
|
|
11030
11063
|
className: "p-1 hover:bg-gray-100 rounded",
|
|
11031
11064
|
children: /* @__PURE__ */ u(
|
|
11032
11065
|
"svg",
|
|
@@ -11098,14 +11131,14 @@ function vg({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
|
|
|
11098
11131
|
}
|
|
11099
11132
|
function yg({ message: e }) {
|
|
11100
11133
|
return /* @__PURE__ */ u("div", { className: "rounded-lg bg-red-50 border border-red-100 p-4 shadow-sm", children: /* @__PURE__ */ I("div", { className: "flex items-center gap-3", children: [
|
|
11101
|
-
/* @__PURE__ */ u(
|
|
11134
|
+
/* @__PURE__ */ u(Rc, { "aria-hidden": "true", className: "size-5 text-red-500 shrink-0" }),
|
|
11102
11135
|
/* @__PURE__ */ u("span", { className: "text-sm font-medium text-red-900", children: e })
|
|
11103
11136
|
] }) });
|
|
11104
11137
|
}
|
|
11105
11138
|
function wg({ message: e }) {
|
|
11106
11139
|
return /* @__PURE__ */ u("div", { className: "rounded-lg bg-amber-50 border border-amber-100 p-4 shadow-sm", children: /* @__PURE__ */ I("div", { className: "flex items-center gap-3", children: [
|
|
11107
11140
|
/* @__PURE__ */ u(
|
|
11108
|
-
|
|
11141
|
+
Ac,
|
|
11109
11142
|
{
|
|
11110
11143
|
"aria-hidden": "true",
|
|
11111
11144
|
className: "size-5 text-amber-600 shrink-0"
|
|
@@ -11117,7 +11150,7 @@ function wg({ message: e }) {
|
|
|
11117
11150
|
function xg({ message: e }) {
|
|
11118
11151
|
return /* @__PURE__ */ u("div", { className: "rounded-lg bg-green-50 border border-green-100 p-4 shadow-sm", children: /* @__PURE__ */ I("div", { className: "flex items-center gap-3", children: [
|
|
11119
11152
|
/* @__PURE__ */ u(
|
|
11120
|
-
|
|
11153
|
+
Tc,
|
|
11121
11154
|
{
|
|
11122
11155
|
"aria-hidden": "true",
|
|
11123
11156
|
className: "size-5 text-green-600 shrink-0"
|
|
@@ -11128,7 +11161,7 @@ function xg({ message: e }) {
|
|
|
11128
11161
|
}
|
|
11129
11162
|
function Sg({ message: e }) {
|
|
11130
11163
|
return /* @__PURE__ */ u("div", { className: "rounded-lg bg-blue-50 border border-blue-100 p-4 shadow-sm", children: /* @__PURE__ */ I("div", { className: "flex items-center gap-3", children: [
|
|
11131
|
-
/* @__PURE__ */ u(
|
|
11164
|
+
/* @__PURE__ */ u(jc, { "aria-hidden": "true", className: "size-5 text-blue-600 shrink-0" }),
|
|
11132
11165
|
/* @__PURE__ */ u("span", { className: "text-sm font-medium text-blue-900", children: e })
|
|
11133
11166
|
] }) });
|
|
11134
11167
|
}
|
|
@@ -11173,7 +11206,7 @@ const $g = ({
|
|
|
11173
11206
|
},
|
|
11174
11207
|
debugMode: l = !1
|
|
11175
11208
|
}) => {
|
|
11176
|
-
const [d, m] =
|
|
11209
|
+
const [d, m] = le({ ...i }), [g, p] = le({}), [w, h] = le({}), [v, k] = le({}), C = Yt({}), E = ["hidden", "linebreak", "header", "alert"], y = Ta(
|
|
11177
11210
|
() => ({
|
|
11178
11211
|
file: Ea,
|
|
11179
11212
|
multifile: Ea,
|
|
@@ -11181,8 +11214,8 @@ const $g = ({
|
|
|
11181
11214
|
date: bg,
|
|
11182
11215
|
dayTimePicker: Ah,
|
|
11183
11216
|
time: vg,
|
|
11184
|
-
hidden:
|
|
11185
|
-
multiselect:
|
|
11217
|
+
hidden: fc,
|
|
11218
|
+
multiselect: mc,
|
|
11186
11219
|
searchselect: dl,
|
|
11187
11220
|
select: $f,
|
|
11188
11221
|
email: Wf,
|
|
@@ -11222,7 +11255,7 @@ const $g = ({
|
|
|
11222
11255
|
} finally {
|
|
11223
11256
|
}
|
|
11224
11257
|
};
|
|
11225
|
-
|
|
11258
|
+
qe(() => {
|
|
11226
11259
|
if (r?.fields && r.fields.length > 0) {
|
|
11227
11260
|
if (!r.fields.some((R) => R.value)) return;
|
|
11228
11261
|
r.fields.forEach((R) => {
|
|
@@ -11298,7 +11331,7 @@ const $g = ({
|
|
|
11298
11331
|
if (S === "" || S === null || S === void 0) return null;
|
|
11299
11332
|
const Y = W?.toLowerCase();
|
|
11300
11333
|
if (Array.isArray(S))
|
|
11301
|
-
return Y === "number" || Y === "integer" ? S.map((
|
|
11334
|
+
return Y === "number" || Y === "integer" ? S.map((j) => j === "" ? null : Number(j)) : S;
|
|
11302
11335
|
switch (Y) {
|
|
11303
11336
|
case "number":
|
|
11304
11337
|
case "integer":
|
|
@@ -11309,8 +11342,8 @@ const $g = ({
|
|
|
11309
11342
|
return String(S).toLowerCase() === "true" || S === !0;
|
|
11310
11343
|
case "date":
|
|
11311
11344
|
case "datetime": {
|
|
11312
|
-
const
|
|
11313
|
-
return
|
|
11345
|
+
const j = ir(S);
|
|
11346
|
+
return j.isValid() ? j.toISOString() : S;
|
|
11314
11347
|
}
|
|
11315
11348
|
default:
|
|
11316
11349
|
return S;
|
|
@@ -11318,20 +11351,20 @@ const $g = ({
|
|
|
11318
11351
|
}, A = {};
|
|
11319
11352
|
r.fields.forEach((S) => {
|
|
11320
11353
|
if (S.name) {
|
|
11321
|
-
const W = d[S.name], Y = S.fieldType || "string",
|
|
11354
|
+
const W = d[S.name], Y = S.fieldType || "string", j = O(W, Y);
|
|
11322
11355
|
o ? A[S.name] = {
|
|
11323
|
-
value:
|
|
11356
|
+
value: j,
|
|
11324
11357
|
fieldType: Y
|
|
11325
|
-
} : A[S.name] =
|
|
11358
|
+
} : A[S.name] = j;
|
|
11326
11359
|
}
|
|
11327
11360
|
}), l ? console.log("Form submitted with values:", A) : a(A);
|
|
11328
11361
|
} else
|
|
11329
11362
|
Cn.error("Please correct the errors in the form");
|
|
11330
11363
|
};
|
|
11331
|
-
|
|
11364
|
+
qe(() => {
|
|
11332
11365
|
c(d);
|
|
11333
11366
|
}, [d, c]);
|
|
11334
|
-
const
|
|
11367
|
+
const V = {
|
|
11335
11368
|
green: "border-green-500 bg-green-50",
|
|
11336
11369
|
blue: "border-blue-500 bg-blue-50",
|
|
11337
11370
|
red: "border-red-500 bg-red-50",
|
|
@@ -11348,9 +11381,9 @@ const $g = ({
|
|
|
11348
11381
|
`[fieldFormat RENDER] Rendering error for ${N.name}: ${R}`
|
|
11349
11382
|
) : g[N.name] && console.log(
|
|
11350
11383
|
`[fieldFormat RENDER] Error exists in state for ${N.name} but not passed in props!`
|
|
11351
|
-
)),
|
|
11384
|
+
)), E.includes(N.type))
|
|
11352
11385
|
return /* @__PURE__ */ u("div", { className: N.class || "col-span-full", children: x });
|
|
11353
|
-
const A = N.containerStyle, S = N.color || "blue", W = A === "card" ? `rounded-lg border text-card-foreground shadow-sm p-4 ${N.containerClassName ||
|
|
11386
|
+
const A = N.containerStyle, S = N.color || "blue", W = A === "card" ? `rounded-lg border text-card-foreground shadow-sm p-4 ${N.containerClassName || V[S] || V.blue}` : "", Y = /* @__PURE__ */ I(Rt, { children: [
|
|
11354
11387
|
N.label && /* @__PURE__ */ I(
|
|
11355
11388
|
"label",
|
|
11356
11389
|
{
|
|
@@ -11374,7 +11407,7 @@ const $g = ({
|
|
|
11374
11407
|
}
|
|
11375
11408
|
const G = (x) => {
|
|
11376
11409
|
if (x.showIf && !x.showIf(d)) return null;
|
|
11377
|
-
const N =
|
|
11410
|
+
const N = y[x.type] || ra;
|
|
11378
11411
|
if (d[x.name] === void 0) {
|
|
11379
11412
|
const A = x.type === "multiselect" || x.type === "searchselect" || x.type === "checkbox" && x.options && x.options.length > 0;
|
|
11380
11413
|
d[x.name] = x.value !== void 0 ? x.value : A ? [] : "";
|
|
@@ -11388,8 +11421,8 @@ const $g = ({
|
|
|
11388
11421
|
formValues: d,
|
|
11389
11422
|
handleChange: _,
|
|
11390
11423
|
handleBlur: () => P(x.name),
|
|
11391
|
-
setCharCounts:
|
|
11392
|
-
charCount:
|
|
11424
|
+
setCharCounts: k,
|
|
11425
|
+
charCount: v[x.name] || 0,
|
|
11393
11426
|
api_URL: t,
|
|
11394
11427
|
error: R,
|
|
11395
11428
|
fileInputRefs: C,
|