@ah-automation.nl/component-lib 0.0.26 → 0.0.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -31,14 +31,14 @@ const cr = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, dr = so, G
|
|
|
31
31
|
}, {}), l = n == null || (r = n.compoundVariants) === null || r === void 0 ? void 0 : r.reduce((u, c) => {
|
|
32
32
|
let { class: p, className: d, ...f } = c;
|
|
33
33
|
return Object.entries(f).every((v) => {
|
|
34
|
-
let [h,
|
|
35
|
-
return Array.isArray(
|
|
34
|
+
let [h, S] = v;
|
|
35
|
+
return Array.isArray(S) ? S.includes({
|
|
36
36
|
...i,
|
|
37
37
|
...s
|
|
38
38
|
}[h]) : {
|
|
39
39
|
...i,
|
|
40
40
|
...s
|
|
41
|
-
}[h] ===
|
|
41
|
+
}[h] === S;
|
|
42
42
|
}) ? [
|
|
43
43
|
...u,
|
|
44
44
|
p,
|
|
@@ -193,18 +193,18 @@ const cr = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, dr = so, G
|
|
|
193
193
|
let a = 0, s = 0, l = 0, u;
|
|
194
194
|
const c = o.length;
|
|
195
195
|
for (let h = 0; h < c; h++) {
|
|
196
|
-
const
|
|
196
|
+
const S = o[h];
|
|
197
197
|
if (a === 0 && s === 0) {
|
|
198
|
-
if (
|
|
198
|
+
if (S === gr) {
|
|
199
199
|
i.push(o.slice(l, h)), l = h + 1;
|
|
200
200
|
continue;
|
|
201
201
|
}
|
|
202
|
-
if (
|
|
202
|
+
if (S === "/") {
|
|
203
203
|
u = h;
|
|
204
204
|
continue;
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
|
-
|
|
207
|
+
S === "[" ? a++ : S === "]" ? a-- : S === "(" ? s++ : S === ")" && s--;
|
|
208
208
|
}
|
|
209
209
|
const p = i.length === 0 ? o : o.slice(l);
|
|
210
210
|
let d = p, f = !1;
|
|
@@ -268,26 +268,26 @@ const cr = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, dr = so, G
|
|
|
268
268
|
l = c + (l.length > 0 ? " " + l : l);
|
|
269
269
|
continue;
|
|
270
270
|
}
|
|
271
|
-
let
|
|
272
|
-
if (!
|
|
273
|
-
if (!
|
|
271
|
+
let S = !!h, x = r(S ? v.substring(0, h) : v);
|
|
272
|
+
if (!x) {
|
|
273
|
+
if (!S) {
|
|
274
274
|
l = c + (l.length > 0 ? " " + l : l);
|
|
275
275
|
continue;
|
|
276
276
|
}
|
|
277
|
-
if (
|
|
277
|
+
if (x = r(v), !x) {
|
|
278
278
|
l = c + (l.length > 0 ? " " + l : l);
|
|
279
279
|
continue;
|
|
280
280
|
}
|
|
281
|
-
|
|
281
|
+
S = !1;
|
|
282
282
|
}
|
|
283
|
-
const
|
|
284
|
-
if (a.indexOf(
|
|
283
|
+
const C = d.length === 0 ? "" : d.length === 1 ? d[0] : i(d).join(":"), b = f ? C + kn : C, w = b + x;
|
|
284
|
+
if (a.indexOf(w) > -1)
|
|
285
285
|
continue;
|
|
286
|
-
a.push(
|
|
287
|
-
const
|
|
288
|
-
for (let N = 0; N <
|
|
289
|
-
const
|
|
290
|
-
a.push(
|
|
286
|
+
a.push(w);
|
|
287
|
+
const E = o(x, S);
|
|
288
|
+
for (let N = 0; N < E.length; ++N) {
|
|
289
|
+
const R = E[N];
|
|
290
|
+
a.push(b + R);
|
|
291
291
|
}
|
|
292
292
|
l = c + (l.length > 0 ? " " + l : l);
|
|
293
293
|
}
|
|
@@ -332,7 +332,7 @@ const cr = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, dr = so, G
|
|
|
332
332
|
const r = mo.exec(e);
|
|
333
333
|
return r ? r[1] ? n(r[1]) : t : !1;
|
|
334
334
|
}, ho = (e) => e === "position" || e === "percentage", vo = (e) => e === "image" || e === "url", bo = (e) => e === "length" || e === "size" || e === "bg-size", wo = (e) => e === "length", os = (e) => e === "number", So = (e) => e === "family-name", xo = (e) => e === "number" || e === "weight", yo = (e) => e === "shadow", is = () => {
|
|
335
|
-
const e = se("color"), n = se("font"), t = se("text"), r = se("font-weight"), o = se("tracking"), i = se("leading"), a = se("breakpoint"), s = se("container"), l = se("spacing"), u = se("radius"), c = se("shadow"), p = se("inset-shadow"), d = se("text-shadow"), f = se("drop-shadow"), v = se("blur"), h = se("perspective"),
|
|
335
|
+
const e = se("color"), n = se("font"), t = se("text"), r = se("font-weight"), o = se("tracking"), i = se("leading"), a = se("breakpoint"), s = se("container"), l = se("spacing"), u = se("radius"), c = se("shadow"), p = se("inset-shadow"), d = se("text-shadow"), f = se("drop-shadow"), v = se("blur"), h = se("perspective"), S = se("aspect"), x = se("ease"), C = se("animate"), b = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], w = () => [
|
|
336
336
|
"center",
|
|
337
337
|
"top",
|
|
338
338
|
"bottom",
|
|
@@ -350,9 +350,9 @@ const cr = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, dr = so, G
|
|
|
350
350
|
"bottom-left",
|
|
351
351
|
// Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
|
|
352
352
|
"left-bottom"
|
|
353
|
-
],
|
|
353
|
+
], E = () => [...w(), O, P], N = () => ["auto", "hidden", "clip", "visible", "scroll"], R = () => ["auto", "contain", "none"], y = () => [O, P, l], _ = () => [Ne, "full", "auto", ...y()], I = () => [Fe, "none", "subgrid", O, P], T = () => ["auto", {
|
|
354
354
|
span: ["full", Fe, O, P]
|
|
355
|
-
}, Fe, O, P], B = () => [Fe, "auto", O, P], z = () => ["auto", "min", "max", "fr", O, P], ne = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], J = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], Q = () => ["auto", ...
|
|
355
|
+
}, Fe, O, P], B = () => [Fe, "auto", O, P], z = () => ["auto", "min", "max", "fr", O, P], ne = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], J = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], Q = () => ["auto", ...y()], ee = () => [Ne, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...y()], ce = () => [Ne, "screen", "full", "dvw", "lvw", "svw", "min", "max", "fit", ...y()], fe = () => [Ne, "screen", "full", "lh", "dvh", "lvh", "svh", "min", "max", "fit", ...y()], $ = () => [e, O, P], Te = () => [...w(), vr, hr, {
|
|
356
356
|
position: [O, P]
|
|
357
357
|
}], k = () => ["no-repeat", {
|
|
358
358
|
repeat: ["", "x", "y", "space", "round"]
|
|
@@ -373,7 +373,7 @@ const cr = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, dr = so, G
|
|
|
373
373
|
v,
|
|
374
374
|
O,
|
|
375
375
|
P
|
|
376
|
-
], be = () => ["none", q, O, P], Le = () => ["none", q, O, P], Ye = () => [q, O, P], W = () => [Ne, "full", ...
|
|
376
|
+
], be = () => ["none", q, O, P], Le = () => ["none", q, O, P], Ye = () => [q, O, P], W = () => [Ne, "full", ...y()];
|
|
377
377
|
return {
|
|
378
378
|
cacheSize: 500,
|
|
379
379
|
theme: {
|
|
@@ -406,7 +406,7 @@ const cr = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, dr = so, G
|
|
|
406
406
|
* @see https://tailwindcss.com/docs/aspect-ratio
|
|
407
407
|
*/
|
|
408
408
|
aspect: [{
|
|
409
|
-
aspect: ["auto", "square", Ne, P, O,
|
|
409
|
+
aspect: ["auto", "square", Ne, P, O, S]
|
|
410
410
|
}],
|
|
411
411
|
/**
|
|
412
412
|
* Container
|
|
@@ -426,14 +426,14 @@ const cr = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, dr = so, G
|
|
|
426
426
|
* @see https://tailwindcss.com/docs/break-after
|
|
427
427
|
*/
|
|
428
428
|
"break-after": [{
|
|
429
|
-
"break-after":
|
|
429
|
+
"break-after": b()
|
|
430
430
|
}],
|
|
431
431
|
/**
|
|
432
432
|
* Break Before
|
|
433
433
|
* @see https://tailwindcss.com/docs/break-before
|
|
434
434
|
*/
|
|
435
435
|
"break-before": [{
|
|
436
|
-
"break-before":
|
|
436
|
+
"break-before": b()
|
|
437
437
|
}],
|
|
438
438
|
/**
|
|
439
439
|
* Break Inside
|
|
@@ -497,7 +497,7 @@ const cr = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, dr = so, G
|
|
|
497
497
|
* @see https://tailwindcss.com/docs/object-position
|
|
498
498
|
*/
|
|
499
499
|
"object-position": [{
|
|
500
|
-
object:
|
|
500
|
+
object: E()
|
|
501
501
|
}],
|
|
502
502
|
/**
|
|
503
503
|
* Overflow
|
|
@@ -525,21 +525,21 @@ const cr = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, dr = so, G
|
|
|
525
525
|
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
526
526
|
*/
|
|
527
527
|
overscroll: [{
|
|
528
|
-
overscroll:
|
|
528
|
+
overscroll: R()
|
|
529
529
|
}],
|
|
530
530
|
/**
|
|
531
531
|
* Overscroll Behavior X
|
|
532
532
|
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
533
533
|
*/
|
|
534
534
|
"overscroll-x": [{
|
|
535
|
-
"overscroll-x":
|
|
535
|
+
"overscroll-x": R()
|
|
536
536
|
}],
|
|
537
537
|
/**
|
|
538
538
|
* Overscroll Behavior Y
|
|
539
539
|
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
540
540
|
*/
|
|
541
541
|
"overscroll-y": [{
|
|
542
|
-
"overscroll-y":
|
|
542
|
+
"overscroll-y": R()
|
|
543
543
|
}],
|
|
544
544
|
/**
|
|
545
545
|
* Position
|
|
@@ -655,7 +655,7 @@ const cr = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, dr = so, G
|
|
|
655
655
|
* @see https://tailwindcss.com/docs/flex-basis
|
|
656
656
|
*/
|
|
657
657
|
basis: [{
|
|
658
|
-
basis: [Ne, "full", "auto", s, ...
|
|
658
|
+
basis: [Ne, "full", "auto", s, ...y()]
|
|
659
659
|
}],
|
|
660
660
|
/**
|
|
661
661
|
* Flex Direction
|
|
@@ -781,21 +781,21 @@ const cr = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, dr = so, G
|
|
|
781
781
|
* @see https://tailwindcss.com/docs/gap
|
|
782
782
|
*/
|
|
783
783
|
gap: [{
|
|
784
|
-
gap:
|
|
784
|
+
gap: y()
|
|
785
785
|
}],
|
|
786
786
|
/**
|
|
787
787
|
* Gap X
|
|
788
788
|
* @see https://tailwindcss.com/docs/gap
|
|
789
789
|
*/
|
|
790
790
|
"gap-x": [{
|
|
791
|
-
"gap-x":
|
|
791
|
+
"gap-x": y()
|
|
792
792
|
}],
|
|
793
793
|
/**
|
|
794
794
|
* Gap Y
|
|
795
795
|
* @see https://tailwindcss.com/docs/gap
|
|
796
796
|
*/
|
|
797
797
|
"gap-y": [{
|
|
798
|
-
"gap-y":
|
|
798
|
+
"gap-y": y()
|
|
799
799
|
}],
|
|
800
800
|
/**
|
|
801
801
|
* Justify Content
|
|
@@ -870,77 +870,77 @@ const cr = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, dr = so, G
|
|
|
870
870
|
* @see https://tailwindcss.com/docs/padding
|
|
871
871
|
*/
|
|
872
872
|
p: [{
|
|
873
|
-
p:
|
|
873
|
+
p: y()
|
|
874
874
|
}],
|
|
875
875
|
/**
|
|
876
876
|
* Padding Inline
|
|
877
877
|
* @see https://tailwindcss.com/docs/padding
|
|
878
878
|
*/
|
|
879
879
|
px: [{
|
|
880
|
-
px:
|
|
880
|
+
px: y()
|
|
881
881
|
}],
|
|
882
882
|
/**
|
|
883
883
|
* Padding Block
|
|
884
884
|
* @see https://tailwindcss.com/docs/padding
|
|
885
885
|
*/
|
|
886
886
|
py: [{
|
|
887
|
-
py:
|
|
887
|
+
py: y()
|
|
888
888
|
}],
|
|
889
889
|
/**
|
|
890
890
|
* Padding Inline Start
|
|
891
891
|
* @see https://tailwindcss.com/docs/padding
|
|
892
892
|
*/
|
|
893
893
|
ps: [{
|
|
894
|
-
ps:
|
|
894
|
+
ps: y()
|
|
895
895
|
}],
|
|
896
896
|
/**
|
|
897
897
|
* Padding Inline End
|
|
898
898
|
* @see https://tailwindcss.com/docs/padding
|
|
899
899
|
*/
|
|
900
900
|
pe: [{
|
|
901
|
-
pe:
|
|
901
|
+
pe: y()
|
|
902
902
|
}],
|
|
903
903
|
/**
|
|
904
904
|
* Padding Block Start
|
|
905
905
|
* @see https://tailwindcss.com/docs/padding
|
|
906
906
|
*/
|
|
907
907
|
pbs: [{
|
|
908
|
-
pbs:
|
|
908
|
+
pbs: y()
|
|
909
909
|
}],
|
|
910
910
|
/**
|
|
911
911
|
* Padding Block End
|
|
912
912
|
* @see https://tailwindcss.com/docs/padding
|
|
913
913
|
*/
|
|
914
914
|
pbe: [{
|
|
915
|
-
pbe:
|
|
915
|
+
pbe: y()
|
|
916
916
|
}],
|
|
917
917
|
/**
|
|
918
918
|
* Padding Top
|
|
919
919
|
* @see https://tailwindcss.com/docs/padding
|
|
920
920
|
*/
|
|
921
921
|
pt: [{
|
|
922
|
-
pt:
|
|
922
|
+
pt: y()
|
|
923
923
|
}],
|
|
924
924
|
/**
|
|
925
925
|
* Padding Right
|
|
926
926
|
* @see https://tailwindcss.com/docs/padding
|
|
927
927
|
*/
|
|
928
928
|
pr: [{
|
|
929
|
-
pr:
|
|
929
|
+
pr: y()
|
|
930
930
|
}],
|
|
931
931
|
/**
|
|
932
932
|
* Padding Bottom
|
|
933
933
|
* @see https://tailwindcss.com/docs/padding
|
|
934
934
|
*/
|
|
935
935
|
pb: [{
|
|
936
|
-
pb:
|
|
936
|
+
pb: y()
|
|
937
937
|
}],
|
|
938
938
|
/**
|
|
939
939
|
* Padding Left
|
|
940
940
|
* @see https://tailwindcss.com/docs/padding
|
|
941
941
|
*/
|
|
942
942
|
pl: [{
|
|
943
|
-
pl:
|
|
943
|
+
pl: y()
|
|
944
944
|
}],
|
|
945
945
|
/**
|
|
946
946
|
* Margin
|
|
@@ -1024,7 +1024,7 @@ const cr = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, dr = so, G
|
|
|
1024
1024
|
* @see https://tailwindcss.com/docs/margin#adding-space-between-children
|
|
1025
1025
|
*/
|
|
1026
1026
|
"space-x": [{
|
|
1027
|
-
"space-x":
|
|
1027
|
+
"space-x": y()
|
|
1028
1028
|
}],
|
|
1029
1029
|
/**
|
|
1030
1030
|
* Space Between X Reverse
|
|
@@ -1036,7 +1036,7 @@ const cr = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, dr = so, G
|
|
|
1036
1036
|
* @see https://tailwindcss.com/docs/margin#adding-space-between-children
|
|
1037
1037
|
*/
|
|
1038
1038
|
"space-y": [{
|
|
1039
|
-
"space-y":
|
|
1039
|
+
"space-y": y()
|
|
1040
1040
|
}],
|
|
1041
1041
|
/**
|
|
1042
1042
|
* Space Between Y Reverse
|
|
@@ -1254,7 +1254,7 @@ const cr = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, dr = so, G
|
|
|
1254
1254
|
leading: [
|
|
1255
1255
|
/** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
|
|
1256
1256
|
i,
|
|
1257
|
-
...
|
|
1257
|
+
...y()
|
|
1258
1258
|
]
|
|
1259
1259
|
}],
|
|
1260
1260
|
/**
|
|
@@ -1355,7 +1355,7 @@ const cr = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, dr = so, G
|
|
|
1355
1355
|
* @see https://tailwindcss.com/docs/text-indent
|
|
1356
1356
|
*/
|
|
1357
1357
|
indent: [{
|
|
1358
|
-
indent:
|
|
1358
|
+
indent: y()
|
|
1359
1359
|
}],
|
|
1360
1360
|
/**
|
|
1361
1361
|
* Vertical Alignment
|
|
@@ -2097,7 +2097,7 @@ const cr = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, dr = so, G
|
|
|
2097
2097
|
}]
|
|
2098
2098
|
}],
|
|
2099
2099
|
"mask-image-radial-pos": [{
|
|
2100
|
-
"mask-radial-at":
|
|
2100
|
+
"mask-radial-at": w()
|
|
2101
2101
|
}],
|
|
2102
2102
|
"mask-image-conic-pos": [{
|
|
2103
2103
|
"mask-conic": [q]
|
|
@@ -2347,21 +2347,21 @@ const cr = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, dr = so, G
|
|
|
2347
2347
|
* @see https://tailwindcss.com/docs/border-spacing
|
|
2348
2348
|
*/
|
|
2349
2349
|
"border-spacing": [{
|
|
2350
|
-
"border-spacing":
|
|
2350
|
+
"border-spacing": y()
|
|
2351
2351
|
}],
|
|
2352
2352
|
/**
|
|
2353
2353
|
* Border Spacing X
|
|
2354
2354
|
* @see https://tailwindcss.com/docs/border-spacing
|
|
2355
2355
|
*/
|
|
2356
2356
|
"border-spacing-x": [{
|
|
2357
|
-
"border-spacing-x":
|
|
2357
|
+
"border-spacing-x": y()
|
|
2358
2358
|
}],
|
|
2359
2359
|
/**
|
|
2360
2360
|
* Border Spacing Y
|
|
2361
2361
|
* @see https://tailwindcss.com/docs/border-spacing
|
|
2362
2362
|
*/
|
|
2363
2363
|
"border-spacing-y": [{
|
|
2364
|
-
"border-spacing-y":
|
|
2364
|
+
"border-spacing-y": y()
|
|
2365
2365
|
}],
|
|
2366
2366
|
/**
|
|
2367
2367
|
* Table Layout
|
|
@@ -2406,7 +2406,7 @@ const cr = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, dr = so, G
|
|
|
2406
2406
|
* @see https://tailwindcss.com/docs/transition-timing-function
|
|
2407
2407
|
*/
|
|
2408
2408
|
ease: [{
|
|
2409
|
-
ease: ["linear", "initial",
|
|
2409
|
+
ease: ["linear", "initial", x, O, P]
|
|
2410
2410
|
}],
|
|
2411
2411
|
/**
|
|
2412
2412
|
* Transition Delay
|
|
@@ -2420,7 +2420,7 @@ const cr = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, dr = so, G
|
|
|
2420
2420
|
* @see https://tailwindcss.com/docs/animation
|
|
2421
2421
|
*/
|
|
2422
2422
|
animate: [{
|
|
2423
|
-
animate: ["none",
|
|
2423
|
+
animate: ["none", C, O, P]
|
|
2424
2424
|
}],
|
|
2425
2425
|
// ------------------
|
|
2426
2426
|
// --- Transforms ---
|
|
@@ -2444,7 +2444,7 @@ const cr = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, dr = so, G
|
|
|
2444
2444
|
* @see https://tailwindcss.com/docs/perspective-origin
|
|
2445
2445
|
*/
|
|
2446
2446
|
"perspective-origin": [{
|
|
2447
|
-
"perspective-origin":
|
|
2447
|
+
"perspective-origin": E()
|
|
2448
2448
|
}],
|
|
2449
2449
|
/**
|
|
2450
2450
|
* Rotate
|
|
@@ -2540,7 +2540,7 @@ const cr = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, dr = so, G
|
|
|
2540
2540
|
* @see https://tailwindcss.com/docs/transform-origin
|
|
2541
2541
|
*/
|
|
2542
2542
|
"transform-origin": [{
|
|
2543
|
-
origin:
|
|
2543
|
+
origin: E()
|
|
2544
2544
|
}],
|
|
2545
2545
|
/**
|
|
2546
2546
|
* Transform Style
|
|
@@ -2653,154 +2653,154 @@ const cr = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, dr = so, G
|
|
|
2653
2653
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2654
2654
|
*/
|
|
2655
2655
|
"scroll-m": [{
|
|
2656
|
-
"scroll-m":
|
|
2656
|
+
"scroll-m": y()
|
|
2657
2657
|
}],
|
|
2658
2658
|
/**
|
|
2659
2659
|
* Scroll Margin Inline
|
|
2660
2660
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2661
2661
|
*/
|
|
2662
2662
|
"scroll-mx": [{
|
|
2663
|
-
"scroll-mx":
|
|
2663
|
+
"scroll-mx": y()
|
|
2664
2664
|
}],
|
|
2665
2665
|
/**
|
|
2666
2666
|
* Scroll Margin Block
|
|
2667
2667
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2668
2668
|
*/
|
|
2669
2669
|
"scroll-my": [{
|
|
2670
|
-
"scroll-my":
|
|
2670
|
+
"scroll-my": y()
|
|
2671
2671
|
}],
|
|
2672
2672
|
/**
|
|
2673
2673
|
* Scroll Margin Inline Start
|
|
2674
2674
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2675
2675
|
*/
|
|
2676
2676
|
"scroll-ms": [{
|
|
2677
|
-
"scroll-ms":
|
|
2677
|
+
"scroll-ms": y()
|
|
2678
2678
|
}],
|
|
2679
2679
|
/**
|
|
2680
2680
|
* Scroll Margin Inline End
|
|
2681
2681
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2682
2682
|
*/
|
|
2683
2683
|
"scroll-me": [{
|
|
2684
|
-
"scroll-me":
|
|
2684
|
+
"scroll-me": y()
|
|
2685
2685
|
}],
|
|
2686
2686
|
/**
|
|
2687
2687
|
* Scroll Margin Block Start
|
|
2688
2688
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2689
2689
|
*/
|
|
2690
2690
|
"scroll-mbs": [{
|
|
2691
|
-
"scroll-mbs":
|
|
2691
|
+
"scroll-mbs": y()
|
|
2692
2692
|
}],
|
|
2693
2693
|
/**
|
|
2694
2694
|
* Scroll Margin Block End
|
|
2695
2695
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2696
2696
|
*/
|
|
2697
2697
|
"scroll-mbe": [{
|
|
2698
|
-
"scroll-mbe":
|
|
2698
|
+
"scroll-mbe": y()
|
|
2699
2699
|
}],
|
|
2700
2700
|
/**
|
|
2701
2701
|
* Scroll Margin Top
|
|
2702
2702
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2703
2703
|
*/
|
|
2704
2704
|
"scroll-mt": [{
|
|
2705
|
-
"scroll-mt":
|
|
2705
|
+
"scroll-mt": y()
|
|
2706
2706
|
}],
|
|
2707
2707
|
/**
|
|
2708
2708
|
* Scroll Margin Right
|
|
2709
2709
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2710
2710
|
*/
|
|
2711
2711
|
"scroll-mr": [{
|
|
2712
|
-
"scroll-mr":
|
|
2712
|
+
"scroll-mr": y()
|
|
2713
2713
|
}],
|
|
2714
2714
|
/**
|
|
2715
2715
|
* Scroll Margin Bottom
|
|
2716
2716
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2717
2717
|
*/
|
|
2718
2718
|
"scroll-mb": [{
|
|
2719
|
-
"scroll-mb":
|
|
2719
|
+
"scroll-mb": y()
|
|
2720
2720
|
}],
|
|
2721
2721
|
/**
|
|
2722
2722
|
* Scroll Margin Left
|
|
2723
2723
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2724
2724
|
*/
|
|
2725
2725
|
"scroll-ml": [{
|
|
2726
|
-
"scroll-ml":
|
|
2726
|
+
"scroll-ml": y()
|
|
2727
2727
|
}],
|
|
2728
2728
|
/**
|
|
2729
2729
|
* Scroll Padding
|
|
2730
2730
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2731
2731
|
*/
|
|
2732
2732
|
"scroll-p": [{
|
|
2733
|
-
"scroll-p":
|
|
2733
|
+
"scroll-p": y()
|
|
2734
2734
|
}],
|
|
2735
2735
|
/**
|
|
2736
2736
|
* Scroll Padding Inline
|
|
2737
2737
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2738
2738
|
*/
|
|
2739
2739
|
"scroll-px": [{
|
|
2740
|
-
"scroll-px":
|
|
2740
|
+
"scroll-px": y()
|
|
2741
2741
|
}],
|
|
2742
2742
|
/**
|
|
2743
2743
|
* Scroll Padding Block
|
|
2744
2744
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2745
2745
|
*/
|
|
2746
2746
|
"scroll-py": [{
|
|
2747
|
-
"scroll-py":
|
|
2747
|
+
"scroll-py": y()
|
|
2748
2748
|
}],
|
|
2749
2749
|
/**
|
|
2750
2750
|
* Scroll Padding Inline Start
|
|
2751
2751
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2752
2752
|
*/
|
|
2753
2753
|
"scroll-ps": [{
|
|
2754
|
-
"scroll-ps":
|
|
2754
|
+
"scroll-ps": y()
|
|
2755
2755
|
}],
|
|
2756
2756
|
/**
|
|
2757
2757
|
* Scroll Padding Inline End
|
|
2758
2758
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2759
2759
|
*/
|
|
2760
2760
|
"scroll-pe": [{
|
|
2761
|
-
"scroll-pe":
|
|
2761
|
+
"scroll-pe": y()
|
|
2762
2762
|
}],
|
|
2763
2763
|
/**
|
|
2764
2764
|
* Scroll Padding Block Start
|
|
2765
2765
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2766
2766
|
*/
|
|
2767
2767
|
"scroll-pbs": [{
|
|
2768
|
-
"scroll-pbs":
|
|
2768
|
+
"scroll-pbs": y()
|
|
2769
2769
|
}],
|
|
2770
2770
|
/**
|
|
2771
2771
|
* Scroll Padding Block End
|
|
2772
2772
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2773
2773
|
*/
|
|
2774
2774
|
"scroll-pbe": [{
|
|
2775
|
-
"scroll-pbe":
|
|
2775
|
+
"scroll-pbe": y()
|
|
2776
2776
|
}],
|
|
2777
2777
|
/**
|
|
2778
2778
|
* Scroll Padding Top
|
|
2779
2779
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2780
2780
|
*/
|
|
2781
2781
|
"scroll-pt": [{
|
|
2782
|
-
"scroll-pt":
|
|
2782
|
+
"scroll-pt": y()
|
|
2783
2783
|
}],
|
|
2784
2784
|
/**
|
|
2785
2785
|
* Scroll Padding Right
|
|
2786
2786
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2787
2787
|
*/
|
|
2788
2788
|
"scroll-pr": [{
|
|
2789
|
-
"scroll-pr":
|
|
2789
|
+
"scroll-pr": y()
|
|
2790
2790
|
}],
|
|
2791
2791
|
/**
|
|
2792
2792
|
* Scroll Padding Bottom
|
|
2793
2793
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2794
2794
|
*/
|
|
2795
2795
|
"scroll-pb": [{
|
|
2796
|
-
"scroll-pb":
|
|
2796
|
+
"scroll-pb": y()
|
|
2797
2797
|
}],
|
|
2798
2798
|
/**
|
|
2799
2799
|
* Scroll Padding Left
|
|
2800
2800
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2801
2801
|
*/
|
|
2802
2802
|
"scroll-pl": [{
|
|
2803
|
-
"scroll-pl":
|
|
2803
|
+
"scroll-pl": y()
|
|
2804
2804
|
}],
|
|
2805
2805
|
/**
|
|
2806
2806
|
* Scroll Snap Align
|
|
@@ -3393,34 +3393,35 @@ function Rf({
|
|
|
3393
3393
|
currentPath: n,
|
|
3394
3394
|
session: t,
|
|
3395
3395
|
apps: r = [],
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3396
|
+
showNewTab: o = !0,
|
|
3397
|
+
profileActions: i = [],
|
|
3398
|
+
languages: a = [],
|
|
3399
|
+
activeLanguageCode: s,
|
|
3400
|
+
onLanguageChange: l,
|
|
3401
|
+
logo: u,
|
|
3402
|
+
openInNewTabHref: c,
|
|
3403
|
+
openInNewTabAriaLabel: p = zs,
|
|
3404
|
+
className: d
|
|
3404
3405
|
}) {
|
|
3405
|
-
const
|
|
3406
|
-
function
|
|
3407
|
-
const w =
|
|
3408
|
-
(
|
|
3406
|
+
const f = Ts(t), v = Ls(t), h = c ?? n, S = Vs(a, s), x = S ? ot(S.code) : "";
|
|
3407
|
+
function C(b) {
|
|
3408
|
+
const w = a.find(
|
|
3409
|
+
(E) => ot(E.code) === b
|
|
3409
3410
|
);
|
|
3410
|
-
!w || w.disabled ||
|
|
3411
|
+
!w || w.disabled || l?.(w);
|
|
3411
3412
|
}
|
|
3412
3413
|
return /* @__PURE__ */ A(
|
|
3413
3414
|
"header",
|
|
3414
3415
|
{
|
|
3415
3416
|
className: M(
|
|
3416
3417
|
"sticky top-0 z-40 flex h-[70px] w-full shrink-0 items-center justify-between border-b border-border bg-background px-4 text-foreground shadow-[0_1px_3px_rgba(15,23,42,0.08)]",
|
|
3417
|
-
|
|
3418
|
+
d
|
|
3418
3419
|
),
|
|
3419
3420
|
children: [
|
|
3420
|
-
/* @__PURE__ */ g("div", { className: "min-w-0 w-[200px] p-2 group-data-[collapsible=icon]:hidden", children:
|
|
3421
|
+
/* @__PURE__ */ g("div", { className: "min-w-0 w-[200px] p-2 group-data-[collapsible=icon]:hidden", children: u ?? /* @__PURE__ */ g("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ g("div", { className: "flex size-10 w-full items-center justify-center rounded-md bg-primary", children: /* @__PURE__ */ g("span", { className: "text-sm font-semibold text-primary-foreground", children: "Logo" }) }) }) }),
|
|
3421
3422
|
/* @__PURE__ */ A("div", { className: "min-w-0 flex flex-1 items-center justify-end gap-3 px-4", children: [
|
|
3422
|
-
/* @__PURE__ */ g("span", { className: "min-w-0 max-w-full truncate text-sm font-semibold text-muted-foreground", children: e }),
|
|
3423
|
-
|
|
3423
|
+
e ? /* @__PURE__ */ g("span", { className: "min-w-0 max-w-full truncate text-sm font-semibold text-muted-foreground", children: e }) : null,
|
|
3424
|
+
a.length > 0 ? /* @__PURE__ */ A(Mo, { value: x, onValueChange: C, children: [
|
|
3424
3425
|
/* @__PURE__ */ g(
|
|
3425
3426
|
No,
|
|
3426
3427
|
{
|
|
@@ -3430,28 +3431,28 @@ function Rf({
|
|
|
3430
3431
|
className: M(
|
|
3431
3432
|
"h-8 w-auto max-w-[220px] gap-2 rounded-md border-none bg-background px-1 text-foreground shadow-none"
|
|
3432
3433
|
),
|
|
3433
|
-
children:
|
|
3434
|
+
children: S ? /* @__PURE__ */ A("span", { className: "flex min-w-0 items-center gap-2", children: [
|
|
3434
3435
|
/* @__PURE__ */ g(
|
|
3435
3436
|
"span",
|
|
3436
3437
|
{
|
|
3437
3438
|
"aria-hidden": "true",
|
|
3438
3439
|
className: M(
|
|
3439
3440
|
"fi h-3.5 w-[18px] shrink-0 overflow-hidden rounded-[2px]",
|
|
3440
|
-
`fi-${ot(
|
|
3441
|
+
`fi-${ot(S.code)}`
|
|
3441
3442
|
)
|
|
3442
3443
|
}
|
|
3443
3444
|
),
|
|
3444
|
-
|
|
3445
|
+
S.label && /* @__PURE__ */ g("span", { className: "truncate text-sm", children: S.label })
|
|
3445
3446
|
] }) : /* @__PURE__ */ g(Io, { placeholder: Rr })
|
|
3446
3447
|
}
|
|
3447
3448
|
),
|
|
3448
|
-
/* @__PURE__ */ g(Fo, { className: "min-w-0", align: "end", children:
|
|
3449
|
-
const w = ot(
|
|
3449
|
+
/* @__PURE__ */ g(Fo, { className: "min-w-0", align: "end", children: a.map((b) => {
|
|
3450
|
+
const w = ot(b.code);
|
|
3450
3451
|
return /* @__PURE__ */ g(
|
|
3451
3452
|
Do,
|
|
3452
3453
|
{
|
|
3453
3454
|
value: w,
|
|
3454
|
-
disabled:
|
|
3455
|
+
disabled: b.disabled,
|
|
3455
3456
|
className: "pr-3",
|
|
3456
3457
|
children: /* @__PURE__ */ A("span", { className: "flex min-w-0 items-center gap-2", children: [
|
|
3457
3458
|
/* @__PURE__ */ g(
|
|
@@ -3464,27 +3465,27 @@ function Rf({
|
|
|
3464
3465
|
)
|
|
3465
3466
|
}
|
|
3466
3467
|
),
|
|
3467
|
-
|
|
3468
|
+
b.label && /* @__PURE__ */ g("span", { className: "truncate", children: b.label })
|
|
3468
3469
|
] })
|
|
3469
3470
|
},
|
|
3470
|
-
|
|
3471
|
+
b.code
|
|
3471
3472
|
);
|
|
3472
3473
|
}) })
|
|
3473
3474
|
] }) : null
|
|
3474
3475
|
] }),
|
|
3475
3476
|
/* @__PURE__ */ A("div", { className: "flex shrink-0 items-center gap-1", children: [
|
|
3476
|
-
/* @__PURE__ */ g(
|
|
3477
|
+
o ? /* @__PURE__ */ g(
|
|
3477
3478
|
"a",
|
|
3478
3479
|
{
|
|
3479
|
-
href:
|
|
3480
|
+
href: h,
|
|
3480
3481
|
target: "_blank",
|
|
3481
3482
|
rel: "noopener noreferrer",
|
|
3482
3483
|
className: "rounded-full p-2 text-muted-foreground transition-colors hover:text-foreground",
|
|
3483
|
-
"aria-label":
|
|
3484
|
+
"aria-label": p,
|
|
3484
3485
|
children: /* @__PURE__ */ g(xs, { className: "size-5" })
|
|
3485
3486
|
}
|
|
3486
|
-
),
|
|
3487
|
-
/* @__PURE__ */ A(xr, { children: [
|
|
3487
|
+
) : null,
|
|
3488
|
+
r.length ? /* @__PURE__ */ A(xr, { children: [
|
|
3488
3489
|
/* @__PURE__ */ g(yr, { asChild: !0, children: /* @__PURE__ */ g(
|
|
3489
3490
|
je,
|
|
3490
3491
|
{
|
|
@@ -3500,37 +3501,37 @@ function Rf({
|
|
|
3500
3501
|
{
|
|
3501
3502
|
align: "end",
|
|
3502
3503
|
className: "w-[280px] rounded-xl bg-popover p-4 text-popover-foreground",
|
|
3503
|
-
children: r.length > 0 ? /* @__PURE__ */ g("div", { className: "grid grid-cols-3 gap-3", children: r.map((
|
|
3504
|
-
const w =
|
|
3505
|
-
return
|
|
3504
|
+
children: r.length > 0 ? /* @__PURE__ */ g("div", { className: "grid grid-cols-3 gap-3", children: r.map((b) => {
|
|
3505
|
+
const w = b.icon, E = w ? /* @__PURE__ */ g(w, { className: "size-6 text-muted-foreground" }) : /* @__PURE__ */ g(wr, { className: "size-6 text-muted-foreground" });
|
|
3506
|
+
return b.href ? /* @__PURE__ */ g(Mt, { asChild: !0, children: /* @__PURE__ */ A(
|
|
3506
3507
|
"a",
|
|
3507
3508
|
{
|
|
3508
|
-
href:
|
|
3509
|
-
"aria-disabled":
|
|
3510
|
-
onClick: (
|
|
3509
|
+
href: b.href,
|
|
3510
|
+
"aria-disabled": b.disabled || void 0,
|
|
3511
|
+
onClick: (N) => Er(b, N),
|
|
3511
3512
|
className: "flex flex-col items-center gap-2 rounded-lg p-3 text-center transition-colors hover:bg-accent",
|
|
3512
3513
|
children: [
|
|
3513
|
-
/* @__PURE__ */ g("div", { className: "flex h-12 w-12 items-center justify-center rounded-lg bg-muted", children:
|
|
3514
|
-
/* @__PURE__ */ g("span", { className: "text-[12px] text-foreground", children:
|
|
3514
|
+
/* @__PURE__ */ g("div", { className: "flex h-12 w-12 items-center justify-center rounded-lg bg-muted", children: E }),
|
|
3515
|
+
/* @__PURE__ */ g("span", { className: "text-[12px] text-foreground", children: b.label })
|
|
3515
3516
|
]
|
|
3516
3517
|
}
|
|
3517
|
-
) },
|
|
3518
|
+
) }, b.id) : /* @__PURE__ */ g(Mt, { asChild: !0, children: /* @__PURE__ */ A(
|
|
3518
3519
|
"button",
|
|
3519
3520
|
{
|
|
3520
3521
|
type: "button",
|
|
3521
|
-
disabled:
|
|
3522
|
-
onClick: (
|
|
3522
|
+
disabled: b.disabled,
|
|
3523
|
+
onClick: (N) => Er(b, N),
|
|
3523
3524
|
className: "flex flex-col items-center gap-2 rounded-lg p-3 text-center transition-colors hover:bg-accent disabled:cursor-not-allowed disabled:opacity-50",
|
|
3524
3525
|
children: [
|
|
3525
|
-
/* @__PURE__ */ g("div", { className: "flex h-12 w-12 items-center justify-center rounded-lg bg-muted", children:
|
|
3526
|
-
/* @__PURE__ */ g("span", { className: "text-[12px] text-foreground", children:
|
|
3526
|
+
/* @__PURE__ */ g("div", { className: "flex h-12 w-12 items-center justify-center rounded-lg bg-muted", children: E }),
|
|
3527
|
+
/* @__PURE__ */ g("span", { className: "text-[12px] text-foreground", children: b.label })
|
|
3527
3528
|
]
|
|
3528
3529
|
}
|
|
3529
|
-
) },
|
|
3530
|
+
) }, b.id);
|
|
3530
3531
|
}) }) : /* @__PURE__ */ g("p", { className: "px-1 py-2 text-sm text-muted-foreground", children: "No apps configured." })
|
|
3531
3532
|
}
|
|
3532
3533
|
)
|
|
3533
|
-
] }),
|
|
3534
|
+
] }) : null,
|
|
3534
3535
|
/* @__PURE__ */ A(xr, { children: [
|
|
3535
3536
|
/* @__PURE__ */ g(yr, { asChild: !0, children: /* @__PURE__ */ g(
|
|
3536
3537
|
je,
|
|
@@ -3542,7 +3543,7 @@ function Rf({
|
|
|
3542
3543
|
Sr,
|
|
3543
3544
|
{
|
|
3544
3545
|
src: t.avatarUrl,
|
|
3545
|
-
alt: `${
|
|
3546
|
+
alt: `${f} profile`,
|
|
3546
3547
|
name: t.name,
|
|
3547
3548
|
email: t.email,
|
|
3548
3549
|
fallbackClassName: "bg-muted text-muted-foreground text-[11px]"
|
|
@@ -3561,52 +3562,52 @@ function Rf({
|
|
|
3561
3562
|
Sr,
|
|
3562
3563
|
{
|
|
3563
3564
|
src: t.avatarUrl,
|
|
3564
|
-
alt: `${
|
|
3565
|
+
alt: `${f} profile`,
|
|
3565
3566
|
name: t.name,
|
|
3566
3567
|
email: t.email,
|
|
3567
3568
|
fallbackClassName: "bg-muted text-foreground text-lg"
|
|
3568
3569
|
}
|
|
3569
3570
|
) }),
|
|
3570
3571
|
/* @__PURE__ */ A("div", { className: "min-w-0", children: [
|
|
3571
|
-
/* @__PURE__ */ g("p", { className: "truncate text-[20px] leading-none font-semibold text-foreground", children:
|
|
3572
|
-
/* @__PURE__ */ g("p", { className: "mt-1 truncate text-[15px] leading-5 text-muted-foreground", children:
|
|
3572
|
+
/* @__PURE__ */ g("p", { className: "truncate text-[20px] leading-none font-semibold text-foreground", children: f }),
|
|
3573
|
+
/* @__PURE__ */ g("p", { className: "mt-1 truncate text-[15px] leading-5 text-muted-foreground", children: v })
|
|
3573
3574
|
] })
|
|
3574
3575
|
] }),
|
|
3575
|
-
|
|
3576
|
+
i.length > 0 ? /* @__PURE__ */ A(Bt, { children: [
|
|
3576
3577
|
/* @__PURE__ */ g(en, { className: "mx-0 my-0 bg-border" }),
|
|
3577
|
-
|
|
3578
|
-
const
|
|
3579
|
-
return
|
|
3580
|
-
/* @__PURE__ */ g(Mt, { variant:
|
|
3578
|
+
i.map((b, w) => {
|
|
3579
|
+
const E = b.icon ?? Ms, N = b.destructive ? "destructive" : "default";
|
|
3580
|
+
return b.href ? /* @__PURE__ */ A("div", { children: [
|
|
3581
|
+
/* @__PURE__ */ g(Mt, { variant: N, asChild: !0, children: /* @__PURE__ */ A(
|
|
3581
3582
|
"a",
|
|
3582
3583
|
{
|
|
3583
|
-
href:
|
|
3584
|
-
"aria-disabled":
|
|
3585
|
-
onClick: (
|
|
3584
|
+
href: b.href,
|
|
3585
|
+
"aria-disabled": b.disabled || void 0,
|
|
3586
|
+
onClick: (R) => _r(b, R),
|
|
3586
3587
|
className: "flex cursor-pointer items-center gap-2 rounded-none px-5 py-4 text-[15px] leading-none",
|
|
3587
3588
|
children: [
|
|
3588
|
-
/* @__PURE__ */ g(
|
|
3589
|
-
/* @__PURE__ */ g("span", { children:
|
|
3589
|
+
/* @__PURE__ */ g(E, { className: "size-4" }),
|
|
3590
|
+
/* @__PURE__ */ g("span", { children: b.label })
|
|
3590
3591
|
]
|
|
3591
3592
|
}
|
|
3592
3593
|
) }),
|
|
3593
|
-
w <
|
|
3594
|
-
] },
|
|
3595
|
-
/* @__PURE__ */ g(Mt, { variant:
|
|
3594
|
+
w < i.length - 1 ? /* @__PURE__ */ g(en, { className: "mx-0 my-0 bg-border" }) : null
|
|
3595
|
+
] }, b.id) : /* @__PURE__ */ A("div", { children: [
|
|
3596
|
+
/* @__PURE__ */ g(Mt, { variant: N, asChild: !0, children: /* @__PURE__ */ A(
|
|
3596
3597
|
"button",
|
|
3597
3598
|
{
|
|
3598
3599
|
type: "button",
|
|
3599
|
-
disabled:
|
|
3600
|
-
onClick: (
|
|
3600
|
+
disabled: b.disabled,
|
|
3601
|
+
onClick: (R) => _r(b, R),
|
|
3601
3602
|
className: "flex w-full cursor-pointer items-center gap-2 rounded-none px-5 py-4 text-left text-[15px] leading-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
3602
3603
|
children: [
|
|
3603
|
-
/* @__PURE__ */ g(
|
|
3604
|
-
/* @__PURE__ */ g("span", { children:
|
|
3604
|
+
/* @__PURE__ */ g(E, { className: "size-4" }),
|
|
3605
|
+
/* @__PURE__ */ g("span", { children: b.label })
|
|
3605
3606
|
]
|
|
3606
3607
|
}
|
|
3607
3608
|
) }),
|
|
3608
|
-
w <
|
|
3609
|
-
] },
|
|
3609
|
+
w < i.length - 1 ? /* @__PURE__ */ g(en, { className: "mx-0 my-0 bg-border" }) : null
|
|
3610
|
+
] }, b.id);
|
|
3610
3611
|
})
|
|
3611
3612
|
] }) : null
|
|
3612
3613
|
]
|
|
@@ -3668,8 +3669,8 @@ function Bs(e, n = []) {
|
|
|
3668
3669
|
const s = m.createContext(a), l = t.length;
|
|
3669
3670
|
t = [...t, a];
|
|
3670
3671
|
const u = (p) => {
|
|
3671
|
-
const { scope: d, children: f, ...v } = p, h = d?.[e]?.[l] || s,
|
|
3672
|
-
return /* @__PURE__ */ g(h.Provider, { value:
|
|
3672
|
+
const { scope: d, children: f, ...v } = p, h = d?.[e]?.[l] || s, S = m.useMemo(() => v, Object.values(v));
|
|
3673
|
+
return /* @__PURE__ */ g(h.Provider, { value: S, children: f });
|
|
3673
3674
|
};
|
|
3674
3675
|
u.displayName = i + "Provider";
|
|
3675
3676
|
function c(p, d) {
|
|
@@ -3866,15 +3867,15 @@ var ol = "DismissableLayer", Mn = "dismissableLayer.update", il = "dismissableLa
|
|
|
3866
3867
|
onInteractOutside: a,
|
|
3867
3868
|
onDismiss: s,
|
|
3868
3869
|
...l
|
|
3869
|
-
} = e, u = m.useContext(Ao), [c, p] = m.useState(null), d = c?.ownerDocument ?? globalThis?.document, [, f] = m.useState({}), v = Xe(n, (
|
|
3870
|
-
const
|
|
3871
|
-
!
|
|
3872
|
-
}, d), N = cl((
|
|
3873
|
-
const
|
|
3874
|
-
[...u.branches].some((I) => I.contains(
|
|
3870
|
+
} = e, u = m.useContext(Ao), [c, p] = m.useState(null), d = c?.ownerDocument ?? globalThis?.document, [, f] = m.useState({}), v = Xe(n, (R) => p(R)), h = Array.from(u.layers), [S] = [...u.layersWithOutsidePointerEventsDisabled].slice(-1), x = h.indexOf(S), C = c ? h.indexOf(c) : -1, b = u.layersWithOutsidePointerEventsDisabled.size > 0, w = C >= x, E = ul((R) => {
|
|
3871
|
+
const y = R.target, _ = [...u.branches].some((I) => I.contains(y));
|
|
3872
|
+
!w || _ || (o?.(R), a?.(R), R.defaultPrevented || s?.());
|
|
3873
|
+
}, d), N = cl((R) => {
|
|
3874
|
+
const y = R.target;
|
|
3875
|
+
[...u.branches].some((I) => I.contains(y)) || (i?.(R), a?.(R), R.defaultPrevented || s?.());
|
|
3875
3876
|
}, d);
|
|
3876
|
-
return rl((
|
|
3877
|
-
|
|
3877
|
+
return rl((R) => {
|
|
3878
|
+
C === u.layers.size - 1 && (r?.(R), !R.defaultPrevented && s && (R.preventDefault(), s()));
|
|
3878
3879
|
}, d), m.useEffect(() => {
|
|
3879
3880
|
if (c)
|
|
3880
3881
|
return t && (u.layersWithOutsidePointerEventsDisabled.size === 0 && (Mr = d.body.style.pointerEvents, d.body.style.pointerEvents = "none"), u.layersWithOutsidePointerEventsDisabled.add(c)), u.layers.add(c), Ir(), () => {
|
|
@@ -3883,22 +3884,22 @@ var ol = "DismissableLayer", Mn = "dismissableLayer.update", il = "dismissableLa
|
|
|
3883
3884
|
}, [c, d, t, u]), m.useEffect(() => () => {
|
|
3884
3885
|
c && (u.layers.delete(c), u.layersWithOutsidePointerEventsDisabled.delete(c), Ir());
|
|
3885
3886
|
}, [c, u]), m.useEffect(() => {
|
|
3886
|
-
const
|
|
3887
|
-
return document.addEventListener(Mn,
|
|
3887
|
+
const R = () => f({});
|
|
3888
|
+
return document.addEventListener(Mn, R), () => document.removeEventListener(Mn, R);
|
|
3888
3889
|
}, []), /* @__PURE__ */ g(
|
|
3889
3890
|
ue.div,
|
|
3890
3891
|
{
|
|
3891
3892
|
...l,
|
|
3892
3893
|
ref: v,
|
|
3893
3894
|
style: {
|
|
3894
|
-
pointerEvents:
|
|
3895
|
+
pointerEvents: b ? w ? "auto" : "none" : void 0,
|
|
3895
3896
|
...e.style
|
|
3896
3897
|
},
|
|
3897
3898
|
onFocusCapture: Ae(e.onFocusCapture, N.onFocusCapture),
|
|
3898
3899
|
onBlurCapture: Ae(e.onBlurCapture, N.onBlurCapture),
|
|
3899
3900
|
onPointerDownCapture: Ae(
|
|
3900
3901
|
e.onPointerDownCapture,
|
|
3901
|
-
|
|
3902
|
+
E.onPointerDownCapture
|
|
3902
3903
|
)
|
|
3903
3904
|
}
|
|
3904
3905
|
);
|
|
@@ -3986,23 +3987,23 @@ var tn = "focusScope.autoFocusOnMount", nn = "focusScope.autoFocusOnUnmount", Nr
|
|
|
3986
3987
|
}).current;
|
|
3987
3988
|
m.useEffect(() => {
|
|
3988
3989
|
if (r) {
|
|
3989
|
-
let h = function(
|
|
3990
|
+
let h = function(b) {
|
|
3990
3991
|
if (f.paused || !s) return;
|
|
3991
|
-
const
|
|
3992
|
-
s.contains(
|
|
3993
|
-
},
|
|
3992
|
+
const w = b.target;
|
|
3993
|
+
s.contains(w) ? p.current = w : De(p.current, { select: !0 });
|
|
3994
|
+
}, S = function(b) {
|
|
3994
3995
|
if (f.paused || !s) return;
|
|
3995
|
-
const
|
|
3996
|
-
|
|
3997
|
-
},
|
|
3996
|
+
const w = b.relatedTarget;
|
|
3997
|
+
w !== null && (s.contains(w) || De(p.current, { select: !0 }));
|
|
3998
|
+
}, x = function(b) {
|
|
3998
3999
|
if (document.activeElement === document.body)
|
|
3999
|
-
for (const
|
|
4000
|
-
|
|
4000
|
+
for (const E of b)
|
|
4001
|
+
E.removedNodes.length > 0 && De(s);
|
|
4001
4002
|
};
|
|
4002
|
-
document.addEventListener("focusin", h), document.addEventListener("focusout",
|
|
4003
|
-
const
|
|
4004
|
-
return s &&
|
|
4005
|
-
document.removeEventListener("focusin", h), document.removeEventListener("focusout",
|
|
4003
|
+
document.addEventListener("focusin", h), document.addEventListener("focusout", S);
|
|
4004
|
+
const C = new MutationObserver(x);
|
|
4005
|
+
return s && C.observe(s, { childList: !0, subtree: !0 }), () => {
|
|
4006
|
+
document.removeEventListener("focusin", h), document.removeEventListener("focusout", S), C.disconnect();
|
|
4006
4007
|
};
|
|
4007
4008
|
}
|
|
4008
4009
|
}, [r, s, f.paused]), m.useEffect(() => {
|
|
@@ -4010,13 +4011,13 @@ var tn = "focusScope.autoFocusOnMount", nn = "focusScope.autoFocusOnUnmount", Nr
|
|
|
4010
4011
|
Dr.add(f);
|
|
4011
4012
|
const h = document.activeElement;
|
|
4012
4013
|
if (!s.contains(h)) {
|
|
4013
|
-
const
|
|
4014
|
-
s.addEventListener(tn, u), s.dispatchEvent(
|
|
4014
|
+
const x = new CustomEvent(tn, Nr);
|
|
4015
|
+
s.addEventListener(tn, u), s.dispatchEvent(x), x.defaultPrevented || (fl(vl(To(s)), { select: !0 }), document.activeElement === h && De(s));
|
|
4015
4016
|
}
|
|
4016
4017
|
return () => {
|
|
4017
4018
|
s.removeEventListener(tn, u), setTimeout(() => {
|
|
4018
|
-
const
|
|
4019
|
-
s.addEventListener(nn, c), s.dispatchEvent(
|
|
4019
|
+
const x = new CustomEvent(nn, Nr);
|
|
4020
|
+
s.addEventListener(nn, c), s.dispatchEvent(x), x.defaultPrevented || De(h ?? document.body, { select: !0 }), s.removeEventListener(nn, c), Dr.remove(f);
|
|
4020
4021
|
}, 0);
|
|
4021
4022
|
};
|
|
4022
4023
|
}
|
|
@@ -4024,10 +4025,10 @@ var tn = "focusScope.autoFocusOnMount", nn = "focusScope.autoFocusOnUnmount", Nr
|
|
|
4024
4025
|
const v = m.useCallback(
|
|
4025
4026
|
(h) => {
|
|
4026
4027
|
if (!t && !r || f.paused) return;
|
|
4027
|
-
const
|
|
4028
|
-
if (
|
|
4029
|
-
const
|
|
4030
|
-
|
|
4028
|
+
const S = h.key === "Tab" && !h.altKey && !h.ctrlKey && !h.metaKey, x = document.activeElement;
|
|
4029
|
+
if (S && x) {
|
|
4030
|
+
const C = h.currentTarget, [b, w] = gl(C);
|
|
4031
|
+
b && w ? !h.shiftKey && x === w ? (h.preventDefault(), t && De(b, { select: !0 })) : h.shiftKey && x === b && (h.preventDefault(), t && De(w, { select: !0 })) : x === C && h.preventDefault();
|
|
4031
4032
|
}
|
|
4032
4033
|
},
|
|
4033
4034
|
[t, r, f.paused]
|
|
@@ -4140,9 +4141,9 @@ function Sl(e) {
|
|
|
4140
4141
|
const c = n.ownerDocument.defaultView ?? window, p = (f) => {
|
|
4141
4142
|
const h = It(r.current).includes(CSS.escape(f.animationName));
|
|
4142
4143
|
if (f.target === n && h && (l("ANIMATION_END"), !o.current)) {
|
|
4143
|
-
const
|
|
4144
|
+
const S = n.style.animationFillMode;
|
|
4144
4145
|
n.style.animationFillMode = "forwards", u = c.setTimeout(() => {
|
|
4145
|
-
n.style.animationFillMode === "forwards" && (n.style.animationFillMode =
|
|
4146
|
+
n.style.animationFillMode === "forwards" && (n.style.animationFillMode = S);
|
|
4146
4147
|
});
|
|
4147
4148
|
}
|
|
4148
4149
|
}, d = (f) => {
|
|
@@ -4329,12 +4330,12 @@ var Bo = Fl(), an = function() {
|
|
|
4329
4330
|
onScrollCapture: an,
|
|
4330
4331
|
onWheelCapture: an,
|
|
4331
4332
|
onTouchMoveCapture: an
|
|
4332
|
-
}), o = r[0], i = r[1], a = e.forwardProps, s = e.children, l = e.className, u = e.removeScrollBar, c = e.enabled, p = e.shards, d = e.sideCar, f = e.noRelative, v = e.noIsolation, h = e.inert,
|
|
4333
|
+
}), o = r[0], i = r[1], a = e.forwardProps, s = e.children, l = e.className, u = e.removeScrollBar, c = e.enabled, p = e.shards, d = e.sideCar, f = e.noRelative, v = e.noIsolation, h = e.inert, S = e.allowPinchZoom, x = e.as, C = x === void 0 ? "div" : x, b = e.gapMode, w = Vo(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), E = d, N = Ml([t, n]), R = Re(Re({}, w), o);
|
|
4333
4334
|
return m.createElement(
|
|
4334
4335
|
m.Fragment,
|
|
4335
4336
|
null,
|
|
4336
|
-
c && m.createElement(
|
|
4337
|
-
a ? m.cloneElement(m.Children.only(s), Re(Re({},
|
|
4337
|
+
c && m.createElement(E, { sideCar: Bo, removeScrollBar: u, shards: p, noRelative: f, noIsolation: v, inert: h, setCallbacks: i, allowPinchZoom: !!S, lockRef: t, gapMode: b }),
|
|
4338
|
+
a ? m.cloneElement(m.Children.only(s), Re(Re({}, R), { ref: N })) : m.createElement(C, Re({}, R, { className: l, ref: N }), s)
|
|
4338
4339
|
);
|
|
4339
4340
|
});
|
|
4340
4341
|
Kt.defaultProps = {
|
|
@@ -4536,10 +4537,10 @@ var Je = In ? { passive: !1 } : !1, Ul = function(e) {
|
|
|
4536
4537
|
do {
|
|
4537
4538
|
if (!s)
|
|
4538
4539
|
break;
|
|
4539
|
-
var f = Uo(e, s), v = f[0], h = f[1],
|
|
4540
|
-
(v ||
|
|
4541
|
-
var
|
|
4542
|
-
s =
|
|
4540
|
+
var f = Uo(e, s), v = f[0], h = f[1], S = f[2], x = h - S - i * v;
|
|
4541
|
+
(v || x) && Wo(e, s) && (p += x, d += v);
|
|
4542
|
+
var C = s.parentNode;
|
|
4543
|
+
s = C && C.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? C.host : C;
|
|
4543
4544
|
} while (
|
|
4544
4545
|
// portaled content
|
|
4545
4546
|
!l && s !== document.body || // self content
|
|
@@ -4568,55 +4569,55 @@ function nu(e) {
|
|
|
4568
4569
|
if (e.inert) {
|
|
4569
4570
|
document.body.classList.add("block-interactivity-".concat(o));
|
|
4570
4571
|
var h = Cl([e.lockRef.current], (e.shards || []).map(Lr), !0).filter(Boolean);
|
|
4571
|
-
return h.forEach(function(
|
|
4572
|
-
return
|
|
4572
|
+
return h.forEach(function(S) {
|
|
4573
|
+
return S.classList.add("allow-interactivity-".concat(o));
|
|
4573
4574
|
}), function() {
|
|
4574
|
-
document.body.classList.remove("block-interactivity-".concat(o)), h.forEach(function(
|
|
4575
|
-
return
|
|
4575
|
+
document.body.classList.remove("block-interactivity-".concat(o)), h.forEach(function(S) {
|
|
4576
|
+
return S.classList.remove("allow-interactivity-".concat(o));
|
|
4576
4577
|
});
|
|
4577
4578
|
};
|
|
4578
4579
|
}
|
|
4579
4580
|
}, [e.inert, e.lockRef.current, e.shards]);
|
|
4580
|
-
var s = m.useCallback(function(h,
|
|
4581
|
+
var s = m.useCallback(function(h, S) {
|
|
4581
4582
|
if ("touches" in h && h.touches.length === 2 || h.type === "wheel" && h.ctrlKey)
|
|
4582
4583
|
return !a.current.allowPinchZoom;
|
|
4583
|
-
var
|
|
4584
|
-
if ("touches" in h &&
|
|
4584
|
+
var x = Ft(h), C = t.current, b = "deltaX" in h ? h.deltaX : C[0] - x[0], w = "deltaY" in h ? h.deltaY : C[1] - x[1], E, N = h.target, R = Math.abs(b) > Math.abs(w) ? "h" : "v";
|
|
4585
|
+
if ("touches" in h && R === "h" && N.type === "range")
|
|
4585
4586
|
return !1;
|
|
4586
|
-
var
|
|
4587
|
+
var y = window.getSelection(), _ = y && y.anchorNode, I = _ ? _ === N || _.contains(N) : !1;
|
|
4587
4588
|
if (I)
|
|
4588
4589
|
return !1;
|
|
4589
|
-
var T = zr(
|
|
4590
|
+
var T = zr(R, N);
|
|
4590
4591
|
if (!T)
|
|
4591
4592
|
return !0;
|
|
4592
|
-
if (T ?
|
|
4593
|
+
if (T ? E = R : (E = R === "v" ? "h" : "v", T = zr(R, N)), !T)
|
|
4593
4594
|
return !1;
|
|
4594
|
-
if (!r.current && "changedTouches" in h && (
|
|
4595
|
+
if (!r.current && "changedTouches" in h && (b || w) && (r.current = E), !E)
|
|
4595
4596
|
return !0;
|
|
4596
|
-
var B = r.current ||
|
|
4597
|
-
return Jl(B,
|
|
4597
|
+
var B = r.current || E;
|
|
4598
|
+
return Jl(B, S, h, B === "h" ? b : w);
|
|
4598
4599
|
}, []), l = m.useCallback(function(h) {
|
|
4599
|
-
var
|
|
4600
|
+
var S = h;
|
|
4600
4601
|
if (!(!Qe.length || Qe[Qe.length - 1] !== i)) {
|
|
4601
|
-
var
|
|
4602
|
-
return
|
|
4602
|
+
var x = "deltaY" in S ? Tr(S) : Ft(S), C = n.current.filter(function(E) {
|
|
4603
|
+
return E.name === S.type && (E.target === S.target || S.target === E.shadowParent) && Ql(E.delta, x);
|
|
4603
4604
|
})[0];
|
|
4604
|
-
if (
|
|
4605
|
-
|
|
4605
|
+
if (C && C.should) {
|
|
4606
|
+
S.cancelable && S.preventDefault();
|
|
4606
4607
|
return;
|
|
4607
4608
|
}
|
|
4608
|
-
if (!
|
|
4609
|
-
var
|
|
4610
|
-
return
|
|
4611
|
-
}),
|
|
4612
|
-
|
|
4609
|
+
if (!C) {
|
|
4610
|
+
var b = (a.current.shards || []).map(Lr).filter(Boolean).filter(function(E) {
|
|
4611
|
+
return E.contains(S.target);
|
|
4612
|
+
}), w = b.length > 0 ? s(S, b[0]) : !a.current.noIsolation;
|
|
4613
|
+
w && S.cancelable && S.preventDefault();
|
|
4613
4614
|
}
|
|
4614
4615
|
}
|
|
4615
|
-
}, []), u = m.useCallback(function(h,
|
|
4616
|
-
var
|
|
4617
|
-
n.current.push(
|
|
4618
|
-
n.current = n.current.filter(function(
|
|
4619
|
-
return
|
|
4616
|
+
}, []), u = m.useCallback(function(h, S, x, C) {
|
|
4617
|
+
var b = { name: h, delta: S, target: x, should: C, shadowParent: ru(x) };
|
|
4618
|
+
n.current.push(b), setTimeout(function() {
|
|
4619
|
+
n.current = n.current.filter(function(w) {
|
|
4620
|
+
return w !== b;
|
|
4620
4621
|
});
|
|
4621
4622
|
}, 1);
|
|
4622
4623
|
}, []), c = m.useCallback(function(h) {
|
|
@@ -4684,10 +4685,10 @@ var iu = function(e) {
|
|
|
4684
4685
|
c(d);
|
|
4685
4686
|
else
|
|
4686
4687
|
try {
|
|
4687
|
-
var f = d.getAttribute(r), v = f !== null && f !== "false", h = (et.get(d) || 0) + 1,
|
|
4688
|
-
et.set(d, h), i.set(d,
|
|
4689
|
-
} catch (
|
|
4690
|
-
console.error("aria-hidden: cannot operate on ", d,
|
|
4688
|
+
var f = d.getAttribute(r), v = f !== null && f !== "false", h = (et.get(d) || 0) + 1, S = (i.get(d) || 0) + 1;
|
|
4689
|
+
et.set(d, h), i.set(d, S), a.push(d), h === 1 && v && Dt.set(d, !0), S === 1 && d.setAttribute(t, "true"), v || d.setAttribute(r, "true");
|
|
4690
|
+
} catch (x) {
|
|
4691
|
+
console.error("aria-hidden: cannot operate on ", d, x);
|
|
4691
4692
|
}
|
|
4692
4693
|
});
|
|
4693
4694
|
};
|
|
@@ -5240,25 +5241,25 @@ function Hu({ activeSnapPointProp: e, setActiveSnapPointProp: n, snapPoints: t,
|
|
|
5240
5241
|
innerHeight: window.innerHeight
|
|
5241
5242
|
} : void 0);
|
|
5242
5243
|
D.useEffect(() => {
|
|
5243
|
-
function
|
|
5244
|
+
function R() {
|
|
5244
5245
|
f({
|
|
5245
5246
|
innerWidth: window.innerWidth,
|
|
5246
5247
|
innerHeight: window.innerHeight
|
|
5247
5248
|
});
|
|
5248
5249
|
}
|
|
5249
|
-
return window.addEventListener("resize",
|
|
5250
|
+
return window.addEventListener("resize", R), () => window.removeEventListener("resize", R);
|
|
5250
5251
|
}, []);
|
|
5251
5252
|
const v = D.useMemo(() => c === t?.[t.length - 1] || null, [
|
|
5252
5253
|
t,
|
|
5253
5254
|
c
|
|
5254
5255
|
]), h = D.useMemo(() => {
|
|
5255
|
-
var
|
|
5256
|
-
return (
|
|
5256
|
+
var R;
|
|
5257
|
+
return (R = t?.findIndex((y) => y === c)) != null ? R : null;
|
|
5257
5258
|
}, [
|
|
5258
5259
|
t,
|
|
5259
5260
|
c
|
|
5260
|
-
]),
|
|
5261
|
-
const
|
|
5261
|
+
]), S = t && t.length > 0 && (i || i === 0) && !Number.isNaN(i) && t[i] === c || !t, x = D.useMemo(() => {
|
|
5262
|
+
const R = l ? {
|
|
5262
5263
|
width: l.getBoundingClientRect().width,
|
|
5263
5264
|
height: l.getBoundingClientRect().height
|
|
5264
5265
|
} : typeof window < "u" ? {
|
|
@@ -5268,31 +5269,31 @@ function Hu({ activeSnapPointProp: e, setActiveSnapPointProp: n, snapPoints: t,
|
|
|
5268
5269
|
width: 0,
|
|
5269
5270
|
height: 0
|
|
5270
5271
|
};
|
|
5271
|
-
var
|
|
5272
|
-
return (
|
|
5272
|
+
var y;
|
|
5273
|
+
return (y = t?.map((_) => {
|
|
5273
5274
|
const I = typeof _ == "string";
|
|
5274
5275
|
let T = 0;
|
|
5275
5276
|
if (I && (T = parseInt(_, 10)), ae(s)) {
|
|
5276
|
-
const z = I ? T : d ? _ *
|
|
5277
|
-
return d ? s === "bottom" ?
|
|
5277
|
+
const z = I ? T : d ? _ * R.height : 0;
|
|
5278
|
+
return d ? s === "bottom" ? R.height - z : -R.height + z : z;
|
|
5278
5279
|
}
|
|
5279
|
-
const B = I ? T : d ? _ *
|
|
5280
|
-
return d ? s === "right" ?
|
|
5281
|
-
})) != null ?
|
|
5280
|
+
const B = I ? T : d ? _ * R.width : 0;
|
|
5281
|
+
return d ? s === "right" ? R.width - B : -R.width + B : B;
|
|
5282
|
+
})) != null ? y : [];
|
|
5282
5283
|
}, [
|
|
5283
5284
|
t,
|
|
5284
5285
|
d,
|
|
5285
5286
|
l
|
|
5286
|
-
]),
|
|
5287
|
-
|
|
5287
|
+
]), C = D.useMemo(() => h !== null ? x?.[h] : null, [
|
|
5288
|
+
x,
|
|
5288
5289
|
h
|
|
5289
|
-
]),
|
|
5290
|
-
var
|
|
5291
|
-
const _ = (
|
|
5290
|
+
]), b = D.useCallback((R) => {
|
|
5291
|
+
var y;
|
|
5292
|
+
const _ = (y = x?.findIndex((I) => I === R)) != null ? y : null;
|
|
5292
5293
|
a(_), le(r.current, {
|
|
5293
5294
|
transition: `transform ${re.DURATION}s cubic-bezier(${re.EASE.join(",")})`,
|
|
5294
|
-
transform: ae(s) ? `translate3d(0, ${
|
|
5295
|
-
}),
|
|
5295
|
+
transform: ae(s) ? `translate3d(0, ${R}px, 0)` : `translate3d(${R}px, 0, 0)`
|
|
5296
|
+
}), x && _ !== x.length - 1 && i !== void 0 && _ !== i && _ < i ? le(o.current, {
|
|
5296
5297
|
transition: `opacity ${re.DURATION}s cubic-bezier(${re.EASE.join(",")})`,
|
|
5297
5298
|
opacity: "0"
|
|
5298
5299
|
}) : le(o.current, {
|
|
@@ -5302,77 +5303,77 @@ function Hu({ activeSnapPointProp: e, setActiveSnapPointProp: n, snapPoints: t,
|
|
|
5302
5303
|
}, [
|
|
5303
5304
|
r.current,
|
|
5304
5305
|
t,
|
|
5305
|
-
|
|
5306
|
+
x,
|
|
5306
5307
|
i,
|
|
5307
5308
|
o,
|
|
5308
5309
|
p
|
|
5309
5310
|
]);
|
|
5310
5311
|
D.useEffect(() => {
|
|
5311
5312
|
if (c || e) {
|
|
5312
|
-
var
|
|
5313
|
-
const
|
|
5314
|
-
|
|
5313
|
+
var R;
|
|
5314
|
+
const y = (R = t?.findIndex((_) => _ === e || _ === c)) != null ? R : -1;
|
|
5315
|
+
x && y !== -1 && typeof x[y] == "number" && b(x[y]);
|
|
5315
5316
|
}
|
|
5316
5317
|
}, [
|
|
5317
5318
|
c,
|
|
5318
5319
|
e,
|
|
5319
5320
|
t,
|
|
5320
|
-
|
|
5321
|
-
|
|
5321
|
+
x,
|
|
5322
|
+
b
|
|
5322
5323
|
]);
|
|
5323
|
-
function
|
|
5324
|
+
function w({ draggedDistance: R, closeDrawer: y, velocity: _, dismissible: I }) {
|
|
5324
5325
|
if (i === void 0) return;
|
|
5325
|
-
const T = s === "bottom" || s === "right" ? (
|
|
5326
|
+
const T = s === "bottom" || s === "right" ? (C ?? 0) - R : (C ?? 0) + R, B = h === i - 1, z = h === 0, ne = R > 0;
|
|
5326
5327
|
if (B && le(o.current, {
|
|
5327
5328
|
transition: `opacity ${re.DURATION}s cubic-bezier(${re.EASE.join(",")})`
|
|
5328
5329
|
}), !u && _ > 2 && !ne) {
|
|
5329
|
-
I ?
|
|
5330
|
+
I ? y() : b(x[0]);
|
|
5330
5331
|
return;
|
|
5331
5332
|
}
|
|
5332
|
-
if (!u && _ > 2 && ne &&
|
|
5333
|
-
|
|
5333
|
+
if (!u && _ > 2 && ne && x && t) {
|
|
5334
|
+
b(x[t.length - 1]);
|
|
5334
5335
|
return;
|
|
5335
5336
|
}
|
|
5336
|
-
const J =
|
|
5337
|
-
if (_ > bi && Math.abs(
|
|
5337
|
+
const J = x?.reduce((ee, ce) => typeof ee != "number" || typeof ce != "number" ? ee : Math.abs(ce - T) < Math.abs(ee - T) ? ce : ee), Q = ae(s) ? window.innerHeight : window.innerWidth;
|
|
5338
|
+
if (_ > bi && Math.abs(R) < Q * 0.4) {
|
|
5338
5339
|
const ee = ne ? 1 : -1;
|
|
5339
5340
|
if (ee > 0 && v && t) {
|
|
5340
|
-
|
|
5341
|
+
b(x[t.length - 1]);
|
|
5341
5342
|
return;
|
|
5342
5343
|
}
|
|
5343
|
-
if (z && ee < 0 && I &&
|
|
5344
|
-
|
|
5344
|
+
if (z && ee < 0 && I && y(), h === null) return;
|
|
5345
|
+
b(x[h + ee]);
|
|
5345
5346
|
return;
|
|
5346
5347
|
}
|
|
5347
|
-
|
|
5348
|
+
b(J);
|
|
5348
5349
|
}
|
|
5349
|
-
function
|
|
5350
|
-
if (
|
|
5351
|
-
const
|
|
5352
|
-
(s === "bottom" || s === "right") &&
|
|
5353
|
-
transform: ae(s) ? `translate3d(0, ${
|
|
5350
|
+
function E({ draggedDistance: R }) {
|
|
5351
|
+
if (C === null) return;
|
|
5352
|
+
const y = s === "bottom" || s === "right" ? C - R : C + R;
|
|
5353
|
+
(s === "bottom" || s === "right") && y < x[x.length - 1] || (s === "top" || s === "left") && y > x[x.length - 1] || le(r.current, {
|
|
5354
|
+
transform: ae(s) ? `translate3d(0, ${y}px, 0)` : `translate3d(${y}px, 0, 0)`
|
|
5354
5355
|
});
|
|
5355
5356
|
}
|
|
5356
|
-
function N(
|
|
5357
|
-
if (!t || typeof h != "number" || !
|
|
5357
|
+
function N(R, y) {
|
|
5358
|
+
if (!t || typeof h != "number" || !x || i === void 0) return null;
|
|
5358
5359
|
const _ = h === i - 1;
|
|
5359
|
-
if (h >= i &&
|
|
5360
|
+
if (h >= i && y)
|
|
5360
5361
|
return 0;
|
|
5361
|
-
if (_ && !
|
|
5362
|
-
if (!
|
|
5363
|
-
const T = _ ? h + 1 : h - 1, B = _ ?
|
|
5362
|
+
if (_ && !y) return 1;
|
|
5363
|
+
if (!S && !_) return null;
|
|
5364
|
+
const T = _ ? h + 1 : h - 1, B = _ ? x[T] - x[T - 1] : x[T + 1] - x[T], z = R / Math.abs(B);
|
|
5364
5365
|
return _ ? 1 - z : z;
|
|
5365
5366
|
}
|
|
5366
5367
|
return {
|
|
5367
5368
|
isLastSnapPoint: v,
|
|
5368
5369
|
activeSnapPoint: c,
|
|
5369
|
-
shouldFade:
|
|
5370
|
+
shouldFade: S,
|
|
5370
5371
|
getPercentageDragged: N,
|
|
5371
5372
|
setActiveSnapPoint: p,
|
|
5372
5373
|
activeSnapPointIndex: h,
|
|
5373
|
-
onRelease:
|
|
5374
|
-
onDrag:
|
|
5375
|
-
snapPointsOffset:
|
|
5374
|
+
onRelease: w,
|
|
5375
|
+
onDrag: E,
|
|
5376
|
+
snapPointsOffset: x
|
|
5376
5377
|
};
|
|
5377
5378
|
}
|
|
5378
5379
|
const Bu = () => () => {
|
|
@@ -5485,19 +5486,19 @@ function ju({ isOpen: e, modal: n, nested: t, hasBeenOpened: r, preventScrollRes
|
|
|
5485
5486
|
restorePositionSetting: c
|
|
5486
5487
|
};
|
|
5487
5488
|
}
|
|
5488
|
-
function Wu({ open: e, onOpenChange: n, children: t, onDrag: r, onRelease: o, snapPoints: i, shouldScaleBackground: a = !1, setBackgroundColorOnScale: s = !0, closeThreshold: l = Tu, scrollLockTimeout: u = Lu, dismissible: c = !0, handleOnly: p = !1, fadeFromIndex: d = i && i.length - 1, activeSnapPoint: f, setActiveSnapPoint: v, fixed: h, modal:
|
|
5489
|
+
function Wu({ open: e, onOpenChange: n, children: t, onDrag: r, onRelease: o, snapPoints: i, shouldScaleBackground: a = !1, setBackgroundColorOnScale: s = !0, closeThreshold: l = Tu, scrollLockTimeout: u = Lu, dismissible: c = !0, handleOnly: p = !1, fadeFromIndex: d = i && i.length - 1, activeSnapPoint: f, setActiveSnapPoint: v, fixed: h, modal: S = !0, onClose: x, nested: C, noBodyStyles: b = !1, direction: w = "bottom", defaultOpen: E = !1, disablePreventScroll: N = !0, snapToSequentialPoint: R = !1, preventScrollRestoration: y = !1, repositionInputs: _ = !0, onAnimationEnd: I, container: T, autoFocus: B = !1 }) {
|
|
5489
5490
|
var z, ne;
|
|
5490
5491
|
const [J = !1, Q] = xi({
|
|
5491
|
-
defaultProp:
|
|
5492
|
+
defaultProp: E,
|
|
5492
5493
|
prop: e,
|
|
5493
5494
|
onChange: (j) => {
|
|
5494
|
-
n?.(j), !j && !
|
|
5495
|
+
n?.(j), !j && !C && ra(), setTimeout(() => {
|
|
5495
5496
|
I?.(j);
|
|
5496
|
-
}, re.DURATION * 1e3), j && !
|
|
5497
|
+
}, re.DURATION * 1e3), j && !S && typeof window < "u" && window.requestAnimationFrame(() => {
|
|
5497
5498
|
document.body.style.pointerEvents = "auto";
|
|
5498
5499
|
}), j || (document.body.style.pointerEvents = "auto");
|
|
5499
5500
|
}
|
|
5500
|
-
}), [ee, ce] = D.useState(!1), [fe, $] = D.useState(!1), [Te, k] = D.useState(!1), L = D.useRef(null), U = D.useRef(null), F = D.useRef(null), G = D.useRef(null), X = D.useRef(null), oe = D.useRef(!1), K = D.useRef(null), ve = D.useRef(0), be = D.useRef(!1), Le = D.useRef(!
|
|
5501
|
+
}), [ee, ce] = D.useState(!1), [fe, $] = D.useState(!1), [Te, k] = D.useState(!1), L = D.useRef(null), U = D.useRef(null), F = D.useRef(null), G = D.useRef(null), X = D.useRef(null), oe = D.useRef(!1), K = D.useRef(null), ve = D.useRef(0), be = D.useRef(!1), Le = D.useRef(!E), Ye = D.useRef(0), W = D.useRef(null), nr = D.useRef(((z = W.current) == null ? void 0 : z.getBoundingClientRect().height) || 0), rr = D.useRef(((ne = W.current) == null ? void 0 : ne.getBoundingClientRect().width) || 0), Jt = D.useRef(0), Ji = D.useCallback((j) => {
|
|
5501
5502
|
i && j === ut.length - 1 && (U.current = /* @__PURE__ */ new Date());
|
|
5502
5503
|
}, []), { activeSnapPoint: Qi, activeSnapPointIndex: Ze, setActiveSnapPoint: or, onRelease: ea, snapPointsOffset: ut, onDrag: ta, shouldFade: ir, getPercentageDragged: na } = Hu({
|
|
5503
5504
|
snapPoints: i,
|
|
@@ -5507,20 +5508,20 @@ function Wu({ open: e, onOpenChange: n, children: t, onDrag: r, onRelease: o, sn
|
|
|
5507
5508
|
fadeFromIndex: d,
|
|
5508
5509
|
overlayRef: L,
|
|
5509
5510
|
onSnapPointChange: Ji,
|
|
5510
|
-
direction:
|
|
5511
|
+
direction: w,
|
|
5511
5512
|
container: T,
|
|
5512
|
-
snapToSequentialPoint:
|
|
5513
|
+
snapToSequentialPoint: R
|
|
5513
5514
|
});
|
|
5514
5515
|
Nu({
|
|
5515
|
-
isDisabled: !J || fe || !
|
|
5516
|
+
isDisabled: !J || fe || !S || Te || !ee || !_ || !N
|
|
5516
5517
|
});
|
|
5517
5518
|
const { restorePositionSetting: ra } = ju({
|
|
5518
5519
|
isOpen: J,
|
|
5519
|
-
modal:
|
|
5520
|
-
nested:
|
|
5520
|
+
modal: S,
|
|
5521
|
+
nested: C ?? !1,
|
|
5521
5522
|
hasBeenOpened: ee,
|
|
5522
|
-
preventScrollRestoration:
|
|
5523
|
-
noBodyStyles:
|
|
5523
|
+
preventScrollRestoration: y,
|
|
5524
|
+
noBodyStyles: b
|
|
5524
5525
|
});
|
|
5525
5526
|
function Rt() {
|
|
5526
5527
|
return (window.innerWidth - Fn) / window.innerWidth;
|
|
@@ -5529,19 +5530,19 @@ function Wu({ open: e, onOpenChange: n, children: t, onDrag: r, onRelease: o, sn
|
|
|
5529
5530
|
var Z, te;
|
|
5530
5531
|
!c && !i || W.current && !W.current.contains(j.target) || (nr.current = ((Z = W.current) == null ? void 0 : Z.getBoundingClientRect().height) || 0, rr.current = ((te = W.current) == null ? void 0 : te.getBoundingClientRect().width) || 0, $(!0), F.current = /* @__PURE__ */ new Date(), mi() && window.addEventListener("touchend", () => oe.current = !1, {
|
|
5531
5532
|
once: !0
|
|
5532
|
-
}), j.target.setPointerCapture(j.pointerId), ve.current = ae(
|
|
5533
|
+
}), j.target.setPointerCapture(j.pointerId), ve.current = ae(w) ? j.pageY : j.pageX);
|
|
5533
5534
|
}
|
|
5534
5535
|
function ar(j, Z) {
|
|
5535
5536
|
var te;
|
|
5536
5537
|
let Y = j;
|
|
5537
|
-
const ie = (te = window.getSelection()) == null ? void 0 : te.toString(), me = W.current ? Ot(W.current,
|
|
5538
|
+
const ie = (te = window.getSelection()) == null ? void 0 : te.toString(), me = W.current ? Ot(W.current, w) : null, ge = /* @__PURE__ */ new Date();
|
|
5538
5539
|
if (Y.tagName === "SELECT" || Y.hasAttribute("data-vaul-no-drag") || Y.closest("[data-vaul-no-drag]"))
|
|
5539
5540
|
return !1;
|
|
5540
|
-
if (
|
|
5541
|
+
if (w === "right" || w === "left")
|
|
5541
5542
|
return !0;
|
|
5542
5543
|
if (U.current && ge.getTime() - U.current.getTime() < 500)
|
|
5543
5544
|
return !1;
|
|
5544
|
-
if (me !== null && (
|
|
5545
|
+
if (me !== null && (w === "bottom" ? me > 0 : me < 0))
|
|
5545
5546
|
return !0;
|
|
5546
5547
|
if (ie && ie.length > 0)
|
|
5547
5548
|
return !1;
|
|
@@ -5560,9 +5561,9 @@ function Wu({ open: e, onOpenChange: n, children: t, onDrag: r, onRelease: o, sn
|
|
|
5560
5561
|
}
|
|
5561
5562
|
function ia(j) {
|
|
5562
5563
|
if (W.current && fe) {
|
|
5563
|
-
const Z =
|
|
5564
|
+
const Z = w === "bottom" || w === "right" ? 1 : -1, te = (ve.current - (ae(w) ? j.pageY : j.pageX)) * Z, Y = te > 0, ie = i && !c && !Y;
|
|
5564
5565
|
if (ie && Ze === 0) return;
|
|
5565
|
-
const me = Math.abs(te), ge = document.querySelector("[data-vaul-drawer-wrapper]"), Me =
|
|
5566
|
+
const me = Math.abs(te), ge = document.querySelector("[data-vaul-drawer-wrapper]"), Me = w === "bottom" || w === "top" ? nr.current : rr.current;
|
|
5566
5567
|
let we = me / Me;
|
|
5567
5568
|
const Ve = na(me, Y);
|
|
5568
5569
|
if (Ve !== null && (we = Ve), ie && we >= 1 || !oe.current && !ar(j.target, Y)) return;
|
|
@@ -5575,7 +5576,7 @@ function Wu({ open: e, onOpenChange: n, children: t, onDrag: r, onRelease: o, sn
|
|
|
5575
5576
|
}), Y && !i) {
|
|
5576
5577
|
const Ce = $u(te), Et = Math.min(Ce * -1, 0) * Z;
|
|
5577
5578
|
le(W.current, {
|
|
5578
|
-
transform: ae(
|
|
5579
|
+
transform: ae(w) ? `translate3d(0, ${Et}px, 0)` : `translate3d(${Et}px, 0, 0)`
|
|
5579
5580
|
});
|
|
5580
5581
|
return;
|
|
5581
5582
|
}
|
|
@@ -5587,14 +5588,14 @@ function Wu({ open: e, onOpenChange: n, children: t, onDrag: r, onRelease: o, sn
|
|
|
5587
5588
|
const Ce = Math.min(Rt() + we * (1 - Rt()), 1), Et = 8 - we * 8, lr = Math.max(0, 14 - we * 14);
|
|
5588
5589
|
le(ge, {
|
|
5589
5590
|
borderRadius: `${Et}px`,
|
|
5590
|
-
transform: ae(
|
|
5591
|
+
transform: ae(w) ? `scale(${Ce}) translate3d(0, ${lr}px, 0)` : `scale(${Ce}) translate3d(${lr}px, 0, 0)`,
|
|
5591
5592
|
transition: "none"
|
|
5592
5593
|
}, !0);
|
|
5593
5594
|
}
|
|
5594
5595
|
if (!i) {
|
|
5595
5596
|
const Ce = me * Z;
|
|
5596
5597
|
le(W.current, {
|
|
5597
|
-
transform: ae(
|
|
5598
|
+
transform: ae(w) ? `translate3d(0, ${Ce}px, 0)` : `translate3d(${Ce}px, 0, 0)`
|
|
5598
5599
|
});
|
|
5599
5600
|
}
|
|
5600
5601
|
}
|
|
@@ -5637,13 +5638,13 @@ function Wu({ open: e, onOpenChange: n, children: t, onDrag: r, onRelease: o, sn
|
|
|
5637
5638
|
ut
|
|
5638
5639
|
]);
|
|
5639
5640
|
function ct(j) {
|
|
5640
|
-
aa(),
|
|
5641
|
+
aa(), x?.(), j || Q(!1), setTimeout(() => {
|
|
5641
5642
|
i && or(i[0]);
|
|
5642
5643
|
}, re.DURATION * 1e3);
|
|
5643
5644
|
}
|
|
5644
5645
|
function sr() {
|
|
5645
5646
|
if (!W.current) return;
|
|
5646
|
-
const j = document.querySelector("[data-vaul-drawer-wrapper]"), Z = Ot(W.current,
|
|
5647
|
+
const j = document.querySelector("[data-vaul-drawer-wrapper]"), Z = Ot(W.current, w);
|
|
5647
5648
|
le(W.current, {
|
|
5648
5649
|
transform: "translate3d(0, 0, 0)",
|
|
5649
5650
|
transition: `transform ${re.DURATION}s cubic-bezier(${re.EASE.join(",")})`
|
|
@@ -5653,7 +5654,7 @@ function Wu({ open: e, onOpenChange: n, children: t, onDrag: r, onRelease: o, sn
|
|
|
5653
5654
|
}), a && Z && Z > 0 && J && le(j, {
|
|
5654
5655
|
borderRadius: `${wi}px`,
|
|
5655
5656
|
overflow: "hidden",
|
|
5656
|
-
...ae(
|
|
5657
|
+
...ae(w) ? {
|
|
5657
5658
|
transform: `scale(${Rt()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,
|
|
5658
5659
|
transformOrigin: "top"
|
|
5659
5660
|
} : {
|
|
@@ -5671,21 +5672,21 @@ function Wu({ open: e, onOpenChange: n, children: t, onDrag: r, onRelease: o, sn
|
|
|
5671
5672
|
function sa(j) {
|
|
5672
5673
|
if (!fe || !W.current) return;
|
|
5673
5674
|
W.current.classList.remove(fn), oe.current = !1, $(!1), G.current = /* @__PURE__ */ new Date();
|
|
5674
|
-
const Z = Ot(W.current,
|
|
5675
|
+
const Z = Ot(W.current, w);
|
|
5675
5676
|
if (!j || !ar(j.target, !1) || !Z || Number.isNaN(Z) || F.current === null) return;
|
|
5676
|
-
const te = G.current.getTime() - F.current.getTime(), Y = ve.current - (ae(
|
|
5677
|
+
const te = G.current.getTime() - F.current.getTime(), Y = ve.current - (ae(w) ? j.pageY : j.pageX), ie = Math.abs(Y) / te;
|
|
5677
5678
|
if (ie > 0.05 && (k(!0), setTimeout(() => {
|
|
5678
5679
|
k(!1);
|
|
5679
5680
|
}, 200)), i) {
|
|
5680
5681
|
ea({
|
|
5681
|
-
draggedDistance: Y * (
|
|
5682
|
+
draggedDistance: Y * (w === "bottom" || w === "right" ? 1 : -1),
|
|
5682
5683
|
closeDrawer: ct,
|
|
5683
5684
|
velocity: ie,
|
|
5684
5685
|
dismissible: c
|
|
5685
5686
|
}), o?.(j, !0);
|
|
5686
5687
|
return;
|
|
5687
5688
|
}
|
|
5688
|
-
if (
|
|
5689
|
+
if (w === "bottom" || w === "right" ? Y > 0 : Y < 0) {
|
|
5689
5690
|
sr(), o?.(j, !0);
|
|
5690
5691
|
return;
|
|
5691
5692
|
}
|
|
@@ -5696,7 +5697,7 @@ function Wu({ open: e, onOpenChange: n, children: t, onDrag: r, onRelease: o, sn
|
|
|
5696
5697
|
var me;
|
|
5697
5698
|
const ge = Math.min((me = W.current.getBoundingClientRect().height) != null ? me : 0, window.innerHeight);
|
|
5698
5699
|
var Me;
|
|
5699
|
-
const we = Math.min((Me = W.current.getBoundingClientRect().width) != null ? Me : 0, window.innerWidth), Ve =
|
|
5700
|
+
const we = Math.min((Me = W.current.getBoundingClientRect().width) != null ? Me : 0, window.innerWidth), Ve = w === "left" || w === "right";
|
|
5700
5701
|
if (Math.abs(Z) >= (Ve ? we : ge) * l) {
|
|
5701
5702
|
ct(), o?.(j, !1);
|
|
5702
5703
|
return;
|
|
@@ -5714,12 +5715,12 @@ function Wu({ open: e, onOpenChange: n, children: t, onDrag: r, onRelease: o, sn
|
|
|
5714
5715
|
const Z = j ? (window.innerWidth - Be) / window.innerWidth : 1, te = j ? -Be : 0;
|
|
5715
5716
|
K.current && window.clearTimeout(K.current), le(W.current, {
|
|
5716
5717
|
transition: `transform ${re.DURATION}s cubic-bezier(${re.EASE.join(",")})`,
|
|
5717
|
-
transform: ae(
|
|
5718
|
+
transform: ae(w) ? `scale(${Z}) translate3d(0, ${te}px, 0)` : `scale(${Z}) translate3d(${te}px, 0, 0)`
|
|
5718
5719
|
}), !j && W.current && (K.current = setTimeout(() => {
|
|
5719
|
-
const Y = Ot(W.current,
|
|
5720
|
+
const Y = Ot(W.current, w);
|
|
5720
5721
|
le(W.current, {
|
|
5721
5722
|
transition: "none",
|
|
5722
|
-
transform: ae(
|
|
5723
|
+
transform: ae(w) ? `translate3d(0, ${Y}px, 0)` : `translate3d(${Y}px, 0, 0)`
|
|
5723
5724
|
});
|
|
5724
5725
|
}, 500));
|
|
5725
5726
|
}
|
|
@@ -5727,25 +5728,25 @@ function Wu({ open: e, onOpenChange: n, children: t, onDrag: r, onRelease: o, sn
|
|
|
5727
5728
|
if (Z < 0) return;
|
|
5728
5729
|
const te = (window.innerWidth - Be) / window.innerWidth, Y = te + Z * (1 - te), ie = -Be + Z * Be;
|
|
5729
5730
|
le(W.current, {
|
|
5730
|
-
transform: ae(
|
|
5731
|
+
transform: ae(w) ? `scale(${Y}) translate3d(0, ${ie}px, 0)` : `scale(${Y}) translate3d(${ie}px, 0, 0)`,
|
|
5731
5732
|
transition: "none"
|
|
5732
5733
|
});
|
|
5733
5734
|
}
|
|
5734
5735
|
function ca(j, Z) {
|
|
5735
|
-
const te = ae(
|
|
5736
|
+
const te = ae(w) ? window.innerHeight : window.innerWidth, Y = Z ? (te - Be) / te : 1, ie = Z ? -Be : 0;
|
|
5736
5737
|
Z && le(W.current, {
|
|
5737
5738
|
transition: `transform ${re.DURATION}s cubic-bezier(${re.EASE.join(",")})`,
|
|
5738
|
-
transform: ae(
|
|
5739
|
+
transform: ae(w) ? `scale(${Y}) translate3d(0, ${ie}px, 0)` : `scale(${Y}) translate3d(${ie}px, 0, 0)`
|
|
5739
5740
|
});
|
|
5740
5741
|
}
|
|
5741
5742
|
return D.useEffect(() => {
|
|
5742
|
-
|
|
5743
|
+
S || window.requestAnimationFrame(() => {
|
|
5743
5744
|
document.body.style.pointerEvents = "auto";
|
|
5744
5745
|
});
|
|
5745
5746
|
}, [
|
|
5746
|
-
|
|
5747
|
+
S
|
|
5747
5748
|
]), /* @__PURE__ */ D.createElement(ui, {
|
|
5748
|
-
defaultOpen:
|
|
5749
|
+
defaultOpen: E,
|
|
5749
5750
|
onOpenChange: (j) => {
|
|
5750
5751
|
!c && !j || (j ? ce(!0) : ct(!0), Q(j));
|
|
5751
5752
|
},
|
|
@@ -5772,13 +5773,13 @@ function Wu({ open: e, onOpenChange: n, children: t, onDrag: r, onRelease: o, sn
|
|
|
5772
5773
|
onNestedOpenChange: la,
|
|
5773
5774
|
onNestedRelease: ca,
|
|
5774
5775
|
keyboardIsOpen: be,
|
|
5775
|
-
modal:
|
|
5776
|
+
modal: S,
|
|
5776
5777
|
snapPointsOffset: ut,
|
|
5777
5778
|
activeSnapPointIndex: Ze,
|
|
5778
|
-
direction:
|
|
5779
|
+
direction: w,
|
|
5779
5780
|
shouldScaleBackground: a,
|
|
5780
5781
|
setBackgroundColorOnScale: s,
|
|
5781
|
-
noBodyStyles:
|
|
5782
|
+
noBodyStyles: b,
|
|
5782
5783
|
container: T,
|
|
5783
5784
|
autoFocus: B
|
|
5784
5785
|
}
|
|
@@ -5803,7 +5804,7 @@ const yi = /* @__PURE__ */ D.forwardRef(function({ ...e }, n) {
|
|
|
5803
5804
|
});
|
|
5804
5805
|
yi.displayName = "Drawer.Overlay";
|
|
5805
5806
|
const Ci = /* @__PURE__ */ D.forwardRef(function({ onPointerDownOutside: e, style: n, onOpenAutoFocus: t, ...r }, o) {
|
|
5806
|
-
const { drawerRef: i, onPress: a, onRelease: s, onDrag: l, keyboardIsOpen: u, snapPointsOffset: c, activeSnapPointIndex: p, modal: d, isOpen: f, direction: v, snapPoints: h, container:
|
|
5807
|
+
const { drawerRef: i, onPress: a, onRelease: s, onDrag: l, keyboardIsOpen: u, snapPointsOffset: c, activeSnapPointIndex: p, modal: d, isOpen: f, direction: v, snapPoints: h, container: S, handleOnly: x, shouldAnimate: C, autoFocus: b } = yt(), [w, E] = D.useState(!1), N = hi(o, i), R = D.useRef(null), y = D.useRef(null), _ = D.useRef(!1), I = h && h.length > 0;
|
|
5807
5808
|
Gu();
|
|
5808
5809
|
const T = (z, ne, J = 0) => {
|
|
5809
5810
|
if (_.current) return !0;
|
|
@@ -5820,19 +5821,19 @@ const Ci = /* @__PURE__ */ D.forwardRef(function({ onPointerDownOutside: e, styl
|
|
|
5820
5821
|
};
|
|
5821
5822
|
D.useEffect(() => {
|
|
5822
5823
|
I && window.requestAnimationFrame(() => {
|
|
5823
|
-
|
|
5824
|
+
E(!0);
|
|
5824
5825
|
});
|
|
5825
5826
|
}, []);
|
|
5826
5827
|
function B(z) {
|
|
5827
|
-
|
|
5828
|
+
R.current = null, _.current = !1, s(z);
|
|
5828
5829
|
}
|
|
5829
5830
|
return /* @__PURE__ */ D.createElement(fi, {
|
|
5830
5831
|
"data-vaul-drawer-direction": v,
|
|
5831
5832
|
"data-vaul-drawer": "",
|
|
5832
|
-
"data-vaul-delayed-snap-points":
|
|
5833
|
+
"data-vaul-delayed-snap-points": w ? "true" : "false",
|
|
5833
5834
|
"data-vaul-snap-points": f && I ? "true" : "false",
|
|
5834
|
-
"data-vaul-custom-container":
|
|
5835
|
-
"data-vaul-animate":
|
|
5835
|
+
"data-vaul-custom-container": S ? "true" : "false",
|
|
5836
|
+
"data-vaul-animate": C?.current ? "true" : "false",
|
|
5836
5837
|
...r,
|
|
5837
5838
|
ref: N,
|
|
5838
5839
|
style: c && c.length > 0 ? {
|
|
@@ -5840,13 +5841,13 @@ const Ci = /* @__PURE__ */ D.forwardRef(function({ onPointerDownOutside: e, styl
|
|
|
5840
5841
|
...n
|
|
5841
5842
|
} : n,
|
|
5842
5843
|
onPointerDown: (z) => {
|
|
5843
|
-
|
|
5844
|
+
x || (r.onPointerDown == null || r.onPointerDown.call(r, z), R.current = {
|
|
5844
5845
|
x: z.pageX,
|
|
5845
5846
|
y: z.pageY
|
|
5846
5847
|
}, a(z));
|
|
5847
5848
|
},
|
|
5848
5849
|
onOpenAutoFocus: (z) => {
|
|
5849
|
-
t?.(z),
|
|
5850
|
+
t?.(z), b || z.preventDefault();
|
|
5850
5851
|
},
|
|
5851
5852
|
onPointerDownOutside: (z) => {
|
|
5852
5853
|
if (e?.(z), !d || z.defaultPrevented) {
|
|
@@ -5862,42 +5863,42 @@ const Ci = /* @__PURE__ */ D.forwardRef(function({ onPointerDownOutside: e, styl
|
|
|
5862
5863
|
}
|
|
5863
5864
|
},
|
|
5864
5865
|
onPointerMove: (z) => {
|
|
5865
|
-
if (
|
|
5866
|
-
const ne = z.pageY -
|
|
5866
|
+
if (y.current = z, x || (r.onPointerMove == null || r.onPointerMove.call(r, z), !R.current)) return;
|
|
5867
|
+
const ne = z.pageY - R.current.y, J = z.pageX - R.current.x, Q = z.pointerType === "touch" ? 10 : 2;
|
|
5867
5868
|
T({
|
|
5868
5869
|
x: J,
|
|
5869
5870
|
y: ne
|
|
5870
|
-
}, v, Q) ? l(z) : (Math.abs(J) > Q || Math.abs(ne) > Q) && (
|
|
5871
|
+
}, v, Q) ? l(z) : (Math.abs(J) > Q || Math.abs(ne) > Q) && (R.current = null);
|
|
5871
5872
|
},
|
|
5872
5873
|
onPointerUp: (z) => {
|
|
5873
|
-
r.onPointerUp == null || r.onPointerUp.call(r, z),
|
|
5874
|
+
r.onPointerUp == null || r.onPointerUp.call(r, z), R.current = null, _.current = !1, s(z);
|
|
5874
5875
|
},
|
|
5875
5876
|
onPointerOut: (z) => {
|
|
5876
|
-
r.onPointerOut == null || r.onPointerOut.call(r, z), B(
|
|
5877
|
+
r.onPointerOut == null || r.onPointerOut.call(r, z), B(y.current);
|
|
5877
5878
|
},
|
|
5878
5879
|
onContextMenu: (z) => {
|
|
5879
|
-
r.onContextMenu == null || r.onContextMenu.call(r, z),
|
|
5880
|
+
r.onContextMenu == null || r.onContextMenu.call(r, z), y.current && B(y.current);
|
|
5880
5881
|
}
|
|
5881
5882
|
});
|
|
5882
5883
|
});
|
|
5883
5884
|
Ci.displayName = "Drawer.Content";
|
|
5884
5885
|
const Uu = 250, qu = 120, Ku = /* @__PURE__ */ D.forwardRef(function({ preventCycle: e = !1, children: n, ...t }, r) {
|
|
5885
5886
|
const { closeDrawer: o, isDragging: i, snapPoints: a, activeSnapPoint: s, setActiveSnapPoint: l, dismissible: u, handleOnly: c, isOpen: p, onPress: d, onDrag: f } = yt(), v = D.useRef(null), h = D.useRef(!1);
|
|
5886
|
-
function
|
|
5887
|
+
function S() {
|
|
5887
5888
|
if (h.current) {
|
|
5888
|
-
|
|
5889
|
+
b();
|
|
5889
5890
|
return;
|
|
5890
5891
|
}
|
|
5891
5892
|
window.setTimeout(() => {
|
|
5892
|
-
|
|
5893
|
+
x();
|
|
5893
5894
|
}, qu);
|
|
5894
5895
|
}
|
|
5895
|
-
function
|
|
5896
|
+
function x() {
|
|
5896
5897
|
if (i || e || h.current) {
|
|
5897
|
-
|
|
5898
|
+
b();
|
|
5898
5899
|
return;
|
|
5899
5900
|
}
|
|
5900
|
-
if (
|
|
5901
|
+
if (b(), !a || a.length === 0) {
|
|
5901
5902
|
u || o();
|
|
5902
5903
|
return;
|
|
5903
5904
|
}
|
|
@@ -5905,27 +5906,27 @@ const Uu = 250, qu = 120, Ku = /* @__PURE__ */ D.forwardRef(function({ preventCy
|
|
|
5905
5906
|
o();
|
|
5906
5907
|
return;
|
|
5907
5908
|
}
|
|
5908
|
-
const
|
|
5909
|
-
if (
|
|
5910
|
-
const N = a[
|
|
5909
|
+
const E = a.findIndex((R) => R === s);
|
|
5910
|
+
if (E === -1) return;
|
|
5911
|
+
const N = a[E + 1];
|
|
5911
5912
|
l(N);
|
|
5912
5913
|
}
|
|
5913
|
-
function
|
|
5914
|
+
function C() {
|
|
5914
5915
|
v.current = window.setTimeout(() => {
|
|
5915
5916
|
h.current = !0;
|
|
5916
5917
|
}, Uu);
|
|
5917
5918
|
}
|
|
5918
|
-
function
|
|
5919
|
+
function b() {
|
|
5919
5920
|
v.current && window.clearTimeout(v.current), h.current = !1;
|
|
5920
5921
|
}
|
|
5921
5922
|
return /* @__PURE__ */ D.createElement("div", {
|
|
5922
|
-
onClick:
|
|
5923
|
-
onPointerCancel:
|
|
5924
|
-
onPointerDown: (
|
|
5925
|
-
c && d(
|
|
5923
|
+
onClick: S,
|
|
5924
|
+
onPointerCancel: b,
|
|
5925
|
+
onPointerDown: (w) => {
|
|
5926
|
+
c && d(w), C();
|
|
5926
5927
|
},
|
|
5927
|
-
onPointerMove: (
|
|
5928
|
-
c && f(
|
|
5928
|
+
onPointerMove: (w) => {
|
|
5929
|
+
c && f(w);
|
|
5929
5930
|
},
|
|
5930
5931
|
// onPointerUp is already handled by the content component
|
|
5931
5932
|
ref: r,
|
|
@@ -6217,19 +6218,19 @@ function wc({
|
|
|
6217
6218
|
...a
|
|
6218
6219
|
}) {
|
|
6219
6220
|
const s = ic(), [l, u] = m.useState(!1), [c, p] = m.useState(e), d = n ?? c, f = m.useCallback(
|
|
6220
|
-
(
|
|
6221
|
-
const
|
|
6222
|
-
t ? t(
|
|
6221
|
+
(x) => {
|
|
6222
|
+
const C = typeof x == "function" ? x(d) : x;
|
|
6223
|
+
t ? t(C) : p(C), document.cookie = `${gc}=${C}; path=/; max-age=${mc}`;
|
|
6223
6224
|
},
|
|
6224
6225
|
[t, d]
|
|
6225
|
-
), v = m.useCallback(() => s ? u((
|
|
6226
|
+
), v = m.useCallback(() => s ? u((x) => !x) : f((x) => !x), [s, f, u]);
|
|
6226
6227
|
m.useEffect(() => {
|
|
6227
|
-
const
|
|
6228
|
-
|
|
6228
|
+
const x = (C) => {
|
|
6229
|
+
C.key === bc && (C.metaKey || C.ctrlKey) && (C.preventDefault(), v());
|
|
6229
6230
|
};
|
|
6230
|
-
return window.addEventListener("keydown",
|
|
6231
|
+
return window.addEventListener("keydown", x), () => window.removeEventListener("keydown", x);
|
|
6231
6232
|
}, [v]);
|
|
6232
|
-
const h = d ? "expanded" : "collapsed",
|
|
6233
|
+
const h = d ? "expanded" : "collapsed", S = m.useMemo(
|
|
6233
6234
|
() => ({
|
|
6234
6235
|
state: h,
|
|
6235
6236
|
open: d,
|
|
@@ -6241,7 +6242,7 @@ function wc({
|
|
|
6241
6242
|
}),
|
|
6242
6243
|
[h, d, f, s, l, u, v]
|
|
6243
6244
|
);
|
|
6244
|
-
return /* @__PURE__ */ g(Ri.Provider, { value:
|
|
6245
|
+
return /* @__PURE__ */ g(Ri.Provider, { value: S, children: /* @__PURE__ */ g(
|
|
6245
6246
|
"div",
|
|
6246
6247
|
{
|
|
6247
6248
|
"data-slot": "sidebar-wrapper",
|
|
@@ -6595,76 +6596,76 @@ function kf({
|
|
|
6595
6596
|
footerClassName: d
|
|
6596
6597
|
}) {
|
|
6597
6598
|
const f = m.useMemo(() => [
|
|
6598
|
-
...e.map((
|
|
6599
|
+
...e.map((w, E) => ({
|
|
6599
6600
|
kind: "item",
|
|
6600
|
-
item:
|
|
6601
|
-
order: mn(
|
|
6602
|
-
originalIndex:
|
|
6601
|
+
item: w,
|
|
6602
|
+
order: mn(w.order),
|
|
6603
|
+
originalIndex: E
|
|
6603
6604
|
})),
|
|
6604
|
-
...n.map((
|
|
6605
|
+
...n.map((w, E) => ({
|
|
6605
6606
|
kind: "group",
|
|
6606
|
-
group:
|
|
6607
|
-
groupIndex:
|
|
6608
|
-
order: mn(
|
|
6609
|
-
originalIndex: e.length +
|
|
6607
|
+
group: w,
|
|
6608
|
+
groupIndex: E,
|
|
6609
|
+
order: mn(w.order),
|
|
6610
|
+
originalIndex: e.length + E
|
|
6610
6611
|
}))
|
|
6611
|
-
].sort((
|
|
6612
|
-
(
|
|
6613
|
-
const N = pn(
|
|
6614
|
-
return
|
|
6612
|
+
].sort((w, E) => w.order !== E.order ? w.order - E.order : w.originalIndex - E.originalIndex), [n, e]), [v, h] = m.useState(() => n.reduce(
|
|
6613
|
+
(b, w, E) => {
|
|
6614
|
+
const N = pn(w, E);
|
|
6615
|
+
return b[N] = !!(w.defaultOpen || qr(w, t)), b;
|
|
6615
6616
|
},
|
|
6616
6617
|
{}
|
|
6617
6618
|
));
|
|
6618
6619
|
m.useEffect(() => {
|
|
6619
|
-
h((
|
|
6620
|
-
(
|
|
6621
|
-
const
|
|
6622
|
-
return typeof
|
|
6620
|
+
h((b) => n.reduce(
|
|
6621
|
+
(w, E, N) => {
|
|
6622
|
+
const R = pn(E, N), y = b[R], _ = qr(E, t);
|
|
6623
|
+
return typeof y == "boolean" ? (w[R] = _ ? !0 : y, w) : (w[R] = !!(E.defaultOpen || _), w);
|
|
6623
6624
|
},
|
|
6624
6625
|
{}
|
|
6625
6626
|
));
|
|
6626
6627
|
}, [t, n]);
|
|
6627
|
-
const
|
|
6628
|
-
(
|
|
6629
|
-
if (
|
|
6630
|
-
|
|
6628
|
+
const S = m.useCallback(
|
|
6629
|
+
(b, w) => {
|
|
6630
|
+
if (b.disabled) {
|
|
6631
|
+
w.preventDefault();
|
|
6631
6632
|
return;
|
|
6632
6633
|
}
|
|
6633
|
-
o?.(
|
|
6634
|
+
o?.(b, w);
|
|
6634
6635
|
},
|
|
6635
6636
|
[o]
|
|
6636
|
-
),
|
|
6637
|
-
(
|
|
6638
|
-
const
|
|
6639
|
-
return /* @__PURE__ */ g(jr, { className: "gap-1", children: /* @__PURE__ */ A(Wr, { className: M(p,
|
|
6637
|
+
), x = m.useCallback(
|
|
6638
|
+
(b) => {
|
|
6639
|
+
const w = b.icon, E = b.route === t;
|
|
6640
|
+
return /* @__PURE__ */ g(jr, { className: "gap-1", children: /* @__PURE__ */ A(Wr, { className: M(p, b.className), children: [
|
|
6640
6641
|
/* @__PURE__ */ g(
|
|
6641
6642
|
Ur,
|
|
6642
6643
|
{
|
|
6643
6644
|
asChild: !0,
|
|
6644
|
-
isActive:
|
|
6645
|
+
isActive: E,
|
|
6645
6646
|
className: "transition-colors hover:bg-sidebar-accent/55 data-open:hover:bg-sidebar-accent/55",
|
|
6646
6647
|
children: /* @__PURE__ */ A(
|
|
6647
6648
|
"a",
|
|
6648
6649
|
{
|
|
6649
|
-
href:
|
|
6650
|
-
"aria-current":
|
|
6651
|
-
"aria-disabled":
|
|
6652
|
-
onClick: (N) =>
|
|
6650
|
+
href: b.route,
|
|
6651
|
+
"aria-current": E ? "page" : void 0,
|
|
6652
|
+
"aria-disabled": b.disabled,
|
|
6653
|
+
onClick: (N) => S(b, N),
|
|
6653
6654
|
children: [
|
|
6654
|
-
|
|
6655
|
-
/* @__PURE__ */ g("span", { className: "group-data-[collapsible=icon]:hidden", children:
|
|
6655
|
+
w ? /* @__PURE__ */ g(w, { className: "size-4" }) : null,
|
|
6656
|
+
/* @__PURE__ */ g("span", { className: "group-data-[collapsible=icon]:hidden", children: b.label })
|
|
6656
6657
|
]
|
|
6657
6658
|
}
|
|
6658
6659
|
)
|
|
6659
6660
|
}
|
|
6660
6661
|
),
|
|
6661
|
-
|
|
6662
|
-
] }) }, `${
|
|
6662
|
+
b.badge ? /* @__PURE__ */ g(Mc, { children: b.badge }) : null
|
|
6663
|
+
] }) }, `${b.route}-${b.label}`);
|
|
6663
6664
|
},
|
|
6664
|
-
[t,
|
|
6665
|
-
),
|
|
6666
|
-
(
|
|
6667
|
-
const
|
|
6665
|
+
[t, S, p]
|
|
6666
|
+
), C = m.useCallback(
|
|
6667
|
+
(b, w) => {
|
|
6668
|
+
const E = pn(b, w), N = v[E] ?? !1, R = b.icon, y = [...b.items].map((_, I) => ({
|
|
6668
6669
|
groupItem: _,
|
|
6669
6670
|
order: mn(_.order),
|
|
6670
6671
|
index: I
|
|
@@ -6675,32 +6676,32 @@ function kf({
|
|
|
6675
6676
|
open: N,
|
|
6676
6677
|
onOpenChange: (_) => h((I) => ({
|
|
6677
6678
|
...I,
|
|
6678
|
-
[
|
|
6679
|
+
[E]: _
|
|
6679
6680
|
})),
|
|
6680
6681
|
className: "group/collapsible",
|
|
6681
|
-
children: /* @__PURE__ */ A(Ec, { className:
|
|
6682
|
+
children: /* @__PURE__ */ A(Ec, { className: b.className + " !p-0", children: [
|
|
6682
6683
|
/* @__PURE__ */ g(jr, { className: "gap-1", children: /* @__PURE__ */ g(Wr, { children: /* @__PURE__ */ g(rc, { asChild: !0, children: /* @__PURE__ */ A(
|
|
6683
6684
|
Ur,
|
|
6684
6685
|
{
|
|
6685
6686
|
className: M(
|
|
6686
6687
|
"transition-colors hover:bg-sidebar-accent/55 data-open:hover:bg-sidebar-accent/55 !px-2",
|
|
6687
|
-
|
|
6688
|
+
b.labelClassName
|
|
6688
6689
|
),
|
|
6689
6690
|
children: [
|
|
6690
|
-
|
|
6691
|
-
/* @__PURE__ */ g("span", { className: "truncate group-data-[collapsible=icon]:hidden", children:
|
|
6691
|
+
R ? /* @__PURE__ */ g(R, { className: "size-4" }) : null,
|
|
6692
|
+
/* @__PURE__ */ g("span", { className: "truncate group-data-[collapsible=icon]:hidden", children: b.label }),
|
|
6692
6693
|
/* @__PURE__ */ g(xt, { className: "ml-auto size-4 transition-transform group-data-[collapsible=icon]:hidden group-data-[state=open]/collapsible:rotate-180" })
|
|
6693
6694
|
]
|
|
6694
6695
|
}
|
|
6695
6696
|
) }) }) }),
|
|
6696
|
-
/* @__PURE__ */ g(oc, { children: /* @__PURE__ */ g(_c, { className:
|
|
6697
|
+
/* @__PURE__ */ g(oc, { children: /* @__PURE__ */ g(_c, { className: b.contentClassName, children: /* @__PURE__ */ g(Ic, { className: b.menuClassName + " !m-2 pr-0", children: y.map((_) => {
|
|
6697
6698
|
const I = _.icon, T = _.route === t;
|
|
6698
6699
|
return /* @__PURE__ */ g(
|
|
6699
6700
|
Nc,
|
|
6700
6701
|
{
|
|
6701
6702
|
className: M(
|
|
6702
6703
|
p,
|
|
6703
|
-
|
|
6704
|
+
b.itemClassName,
|
|
6704
6705
|
_.className
|
|
6705
6706
|
),
|
|
6706
6707
|
children: /* @__PURE__ */ g(
|
|
@@ -6715,7 +6716,7 @@ function kf({
|
|
|
6715
6716
|
href: _.route,
|
|
6716
6717
|
"aria-current": T ? "page" : void 0,
|
|
6717
6718
|
"aria-disabled": _.disabled,
|
|
6718
|
-
onClick: (B) =>
|
|
6719
|
+
onClick: (B) => S(_, B),
|
|
6719
6720
|
children: [
|
|
6720
6721
|
I ? /* @__PURE__ */ g(I, { className: "size-4" }) : null,
|
|
6721
6722
|
/* @__PURE__ */ g("span", { children: _.label }),
|
|
@@ -6726,15 +6727,15 @@ function kf({
|
|
|
6726
6727
|
}
|
|
6727
6728
|
)
|
|
6728
6729
|
},
|
|
6729
|
-
`${
|
|
6730
|
+
`${E}-${_.route}-${_.label}`
|
|
6730
6731
|
);
|
|
6731
6732
|
}) }) }) })
|
|
6732
6733
|
] })
|
|
6733
6734
|
},
|
|
6734
|
-
|
|
6735
|
+
E
|
|
6735
6736
|
);
|
|
6736
6737
|
},
|
|
6737
|
-
[t, v,
|
|
6738
|
+
[t, v, S, p]
|
|
6738
6739
|
);
|
|
6739
6740
|
return /* @__PURE__ */ g(
|
|
6740
6741
|
wc,
|
|
@@ -6757,7 +6758,7 @@ function kf({
|
|
|
6757
6758
|
children: i ? /* @__PURE__ */ g("div", { className: "min-w-0 flex-1 group-data-[collapsible=icon]:hidden p-2", children: i }) : null
|
|
6758
6759
|
}
|
|
6759
6760
|
),
|
|
6760
|
-
/* @__PURE__ */ g(Rc, { className: M("p-2", u), children: /* @__PURE__ */ g("div", { className: M("flex flex-col gap-1", c), children: f.map((
|
|
6761
|
+
/* @__PURE__ */ g(Rc, { className: M("p-2", u), children: /* @__PURE__ */ g("div", { className: M("flex flex-col gap-1", c), children: f.map((b) => b.kind === "item" ? x(b.item) : C(b.group, b.groupIndex)) }) }),
|
|
6761
6762
|
a ? /* @__PURE__ */ A(
|
|
6762
6763
|
Cc,
|
|
6763
6764
|
{
|
|
@@ -6837,53 +6838,53 @@ var mt = '[cmdk-group=""]', bn = '[cmdk-group-items=""]', Bc = '[cmdk-group-head
|
|
|
6837
6838
|
let t = rt(() => {
|
|
6838
6839
|
var k, L;
|
|
6839
6840
|
return { search: "", value: (L = (k = e.value) != null ? k : e.defaultValue) != null ? L : "", selectedItemId: void 0, filtered: { count: 0, items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Set() } };
|
|
6840
|
-
}), r = rt(() => /* @__PURE__ */ new Set()), o = rt(() => /* @__PURE__ */ new Map()), i = rt(() => /* @__PURE__ */ new Map()), a = rt(() => /* @__PURE__ */ new Set()), s = Di(e), { label: l, children: u, value: c, onValueChange: p, filter: d, shouldFilter: f, loop: v, disablePointerSelection: h = !1, vimBindings:
|
|
6841
|
+
}), r = rt(() => /* @__PURE__ */ new Set()), o = rt(() => /* @__PURE__ */ new Map()), i = rt(() => /* @__PURE__ */ new Map()), a = rt(() => /* @__PURE__ */ new Set()), s = Di(e), { label: l, children: u, value: c, onValueChange: p, filter: d, shouldFilter: f, loop: v, disablePointerSelection: h = !1, vimBindings: S = !0, ...x } = e, C = ke(), b = ke(), w = ke(), E = m.useRef(null), N = ed();
|
|
6841
6842
|
qe(() => {
|
|
6842
6843
|
if (c !== void 0) {
|
|
6843
6844
|
let k = c.trim();
|
|
6844
|
-
t.current.value = k,
|
|
6845
|
+
t.current.value = k, R.emit();
|
|
6845
6846
|
}
|
|
6846
6847
|
}, [c]), qe(() => {
|
|
6847
6848
|
N(6, z);
|
|
6848
6849
|
}, []);
|
|
6849
|
-
let
|
|
6850
|
+
let R = m.useMemo(() => ({ subscribe: (k) => (a.current.add(k), () => a.current.delete(k)), snapshot: () => t.current, setState: (k, L, U) => {
|
|
6850
6851
|
var F, G, X, oe;
|
|
6851
6852
|
if (!Object.is(t.current[k], L)) {
|
|
6852
6853
|
if (t.current[k] = L, k === "search") B(), I(), N(1, T);
|
|
6853
6854
|
else if (k === "value") {
|
|
6854
6855
|
if (document.activeElement.hasAttribute("cmdk-input") || document.activeElement.hasAttribute("cmdk-root")) {
|
|
6855
|
-
let K = document.getElementById(
|
|
6856
|
-
K ? K.focus() : (F = document.getElementById(
|
|
6856
|
+
let K = document.getElementById(w);
|
|
6857
|
+
K ? K.focus() : (F = document.getElementById(C)) == null || F.focus();
|
|
6857
6858
|
}
|
|
6858
6859
|
if (N(7, () => {
|
|
6859
6860
|
var K;
|
|
6860
|
-
t.current.selectedItemId = (K = ne()) == null ? void 0 : K.id,
|
|
6861
|
+
t.current.selectedItemId = (K = ne()) == null ? void 0 : K.id, R.emit();
|
|
6861
6862
|
}), U || N(5, z), ((G = s.current) == null ? void 0 : G.value) !== void 0) {
|
|
6862
6863
|
let K = L ?? "";
|
|
6863
6864
|
(oe = (X = s.current).onValueChange) == null || oe.call(X, K);
|
|
6864
6865
|
return;
|
|
6865
6866
|
}
|
|
6866
6867
|
}
|
|
6867
|
-
|
|
6868
|
+
R.emit();
|
|
6868
6869
|
}
|
|
6869
6870
|
}, emit: () => {
|
|
6870
6871
|
a.current.forEach((k) => k());
|
|
6871
|
-
} }), []),
|
|
6872
|
+
} }), []), y = m.useMemo(() => ({ value: (k, L, U) => {
|
|
6872
6873
|
var F;
|
|
6873
6874
|
L !== ((F = i.current.get(k)) == null ? void 0 : F.value) && (i.current.set(k, { value: L, keywords: U }), t.current.filtered.items.set(k, _(L, U)), N(2, () => {
|
|
6874
|
-
I(),
|
|
6875
|
+
I(), R.emit();
|
|
6875
6876
|
}));
|
|
6876
6877
|
}, item: (k, L) => (r.current.add(k), L && (o.current.has(L) ? o.current.get(L).add(k) : o.current.set(L, /* @__PURE__ */ new Set([k]))), N(3, () => {
|
|
6877
|
-
B(), I(), t.current.value || T(),
|
|
6878
|
+
B(), I(), t.current.value || T(), R.emit();
|
|
6878
6879
|
}), () => {
|
|
6879
6880
|
i.current.delete(k), r.current.delete(k), t.current.filtered.items.delete(k);
|
|
6880
6881
|
let U = ne();
|
|
6881
6882
|
N(4, () => {
|
|
6882
|
-
B(), U?.getAttribute("id") === k && T(),
|
|
6883
|
+
B(), U?.getAttribute("id") === k && T(), R.emit();
|
|
6883
6884
|
});
|
|
6884
6885
|
}), group: (k) => (o.current.has(k) || o.current.set(k, /* @__PURE__ */ new Set()), () => {
|
|
6885
6886
|
i.current.delete(k), o.current.delete(k);
|
|
6886
|
-
}), filter: () => s.current.shouldFilter, label: l || e["aria-label"], getDisablePointerSelection: () => s.current.disablePointerSelection, listId:
|
|
6887
|
+
}), filter: () => s.current.shouldFilter, label: l || e["aria-label"], getDisablePointerSelection: () => s.current.disablePointerSelection, listId: C, inputId: w, labelId: b, listInnerRef: E }), []);
|
|
6887
6888
|
function _(k, L) {
|
|
6888
6889
|
var U, F;
|
|
6889
6890
|
let G = (F = (U = s.current) == null ? void 0 : U.filter) != null ? F : Gc;
|
|
@@ -6899,7 +6900,7 @@ var mt = '[cmdk-group=""]', bn = '[cmdk-group-items=""]', Bc = '[cmdk-group-head
|
|
|
6899
6900
|
X = Math.max(K, X);
|
|
6900
6901
|
}), L.push([F, X]);
|
|
6901
6902
|
});
|
|
6902
|
-
let U =
|
|
6903
|
+
let U = E.current;
|
|
6903
6904
|
J().sort((F, G) => {
|
|
6904
6905
|
var X, oe;
|
|
6905
6906
|
let K = F.getAttribute("id"), ve = G.getAttribute("id");
|
|
@@ -6909,13 +6910,13 @@ var mt = '[cmdk-group=""]', bn = '[cmdk-group-items=""]', Bc = '[cmdk-group-head
|
|
|
6909
6910
|
G ? G.appendChild(F.parentElement === G ? F : F.closest(`${bn} > *`)) : U.appendChild(F.parentElement === U ? F : F.closest(`${bn} > *`));
|
|
6910
6911
|
}), L.sort((F, G) => G[1] - F[1]).forEach((F) => {
|
|
6911
6912
|
var G;
|
|
6912
|
-
let X = (G =
|
|
6913
|
+
let X = (G = E.current) == null ? void 0 : G.querySelector(`${mt}[${nt}="${encodeURIComponent(F[0])}"]`);
|
|
6913
6914
|
X?.parentElement.appendChild(X);
|
|
6914
6915
|
});
|
|
6915
6916
|
}
|
|
6916
6917
|
function T() {
|
|
6917
6918
|
let k = J().find((U) => U.getAttribute("aria-disabled") !== "true"), L = k?.getAttribute(nt);
|
|
6918
|
-
|
|
6919
|
+
R.setState("value", L || void 0);
|
|
6919
6920
|
}
|
|
6920
6921
|
function B() {
|
|
6921
6922
|
var k, L, U, F;
|
|
@@ -6942,39 +6943,39 @@ var mt = '[cmdk-group=""]', bn = '[cmdk-group-items=""]', Bc = '[cmdk-group-head
|
|
|
6942
6943
|
}
|
|
6943
6944
|
function ne() {
|
|
6944
6945
|
var k;
|
|
6945
|
-
return (k =
|
|
6946
|
+
return (k = E.current) == null ? void 0 : k.querySelector(`${ki}[aria-selected="true"]`);
|
|
6946
6947
|
}
|
|
6947
6948
|
function J() {
|
|
6948
6949
|
var k;
|
|
6949
|
-
return Array.from(((k =
|
|
6950
|
+
return Array.from(((k = E.current) == null ? void 0 : k.querySelectorAll(Yr)) || []);
|
|
6950
6951
|
}
|
|
6951
6952
|
function Q(k) {
|
|
6952
6953
|
let L = J()[k];
|
|
6953
|
-
L &&
|
|
6954
|
+
L && R.setState("value", L.getAttribute(nt));
|
|
6954
6955
|
}
|
|
6955
6956
|
function ee(k) {
|
|
6956
6957
|
var L;
|
|
6957
6958
|
let U = ne(), F = J(), G = F.findIndex((oe) => oe === U), X = F[G + k];
|
|
6958
|
-
(L = s.current) != null && L.loop && (X = G + k < 0 ? F[F.length - 1] : G + k === F.length ? F[0] : F[G + k]), X &&
|
|
6959
|
+
(L = s.current) != null && L.loop && (X = G + k < 0 ? F[F.length - 1] : G + k === F.length ? F[0] : F[G + k]), X && R.setState("value", X.getAttribute(nt));
|
|
6959
6960
|
}
|
|
6960
6961
|
function ce(k) {
|
|
6961
6962
|
let L = ne(), U = L?.closest(mt), F;
|
|
6962
6963
|
for (; U && !F; ) U = k > 0 ? Jc(U, mt) : Qc(U, mt), F = U?.querySelector(Yr);
|
|
6963
|
-
F ?
|
|
6964
|
+
F ? R.setState("value", F.getAttribute(nt)) : ee(k);
|
|
6964
6965
|
}
|
|
6965
6966
|
let fe = () => Q(J().length - 1), $ = (k) => {
|
|
6966
6967
|
k.preventDefault(), k.metaKey ? fe() : k.altKey ? ce(1) : ee(1);
|
|
6967
6968
|
}, Te = (k) => {
|
|
6968
6969
|
k.preventDefault(), k.metaKey ? Q(0) : k.altKey ? ce(-1) : ee(-1);
|
|
6969
6970
|
};
|
|
6970
|
-
return m.createElement(ue.div, { ref: n, tabIndex: -1, ...
|
|
6971
|
+
return m.createElement(ue.div, { ref: n, tabIndex: -1, ...x, "cmdk-root": "", onKeyDown: (k) => {
|
|
6971
6972
|
var L;
|
|
6972
|
-
(L =
|
|
6973
|
+
(L = x.onKeyDown) == null || L.call(x, k);
|
|
6973
6974
|
let U = k.nativeEvent.isComposing || k.keyCode === 229;
|
|
6974
6975
|
if (!(k.defaultPrevented || U)) switch (k.key) {
|
|
6975
6976
|
case "n":
|
|
6976
6977
|
case "j": {
|
|
6977
|
-
|
|
6978
|
+
S && k.ctrlKey && $(k);
|
|
6978
6979
|
break;
|
|
6979
6980
|
}
|
|
6980
6981
|
case "ArrowDown": {
|
|
@@ -6983,7 +6984,7 @@ var mt = '[cmdk-group=""]', bn = '[cmdk-group-items=""]', Bc = '[cmdk-group-head
|
|
|
6983
6984
|
}
|
|
6984
6985
|
case "p":
|
|
6985
6986
|
case "k": {
|
|
6986
|
-
|
|
6987
|
+
S && k.ctrlKey && Te(k);
|
|
6987
6988
|
break;
|
|
6988
6989
|
}
|
|
6989
6990
|
case "ArrowUp": {
|
|
@@ -7007,7 +7008,7 @@ var mt = '[cmdk-group=""]', bn = '[cmdk-group-items=""]', Bc = '[cmdk-group-head
|
|
|
7007
7008
|
}
|
|
7008
7009
|
}
|
|
7009
7010
|
}
|
|
7010
|
-
} }, m.createElement("label", { "cmdk-label": "", htmlFor:
|
|
7011
|
+
} }, m.createElement("label", { "cmdk-label": "", htmlFor: y.inputId, id: y.labelId, style: nd }, l), Yt(e, (k) => m.createElement(Ii.Provider, { value: R }, m.createElement(Mi.Provider, { value: y }, k))));
|
|
7011
7012
|
}), jc = m.forwardRef((e, n) => {
|
|
7012
7013
|
var t, r;
|
|
7013
7014
|
let o = ke(), i = m.useRef(null), a = m.useContext(Ni), s = Ct(), l = Di(e), u = (r = (t = l.current) == null ? void 0 : t.forceMount) != null ? r : a?.forceMount;
|
|
@@ -7020,15 +7021,15 @@ var mt = '[cmdk-group=""]', bn = '[cmdk-group-items=""]', Bc = '[cmdk-group-head
|
|
|
7020
7021
|
if (!(!N || e.disabled)) return N.addEventListener(Pn, v), () => N.removeEventListener(Pn, v);
|
|
7021
7022
|
}, [f, e.onSelect, e.disabled]);
|
|
7022
7023
|
function v() {
|
|
7023
|
-
var N,
|
|
7024
|
-
h(), (
|
|
7024
|
+
var N, R;
|
|
7025
|
+
h(), (R = (N = l.current).onSelect) == null || R.call(N, c.current);
|
|
7025
7026
|
}
|
|
7026
7027
|
function h() {
|
|
7027
7028
|
p.setState("value", c.current, !0);
|
|
7028
7029
|
}
|
|
7029
7030
|
if (!f) return null;
|
|
7030
|
-
let { disabled:
|
|
7031
|
-
return m.createElement(ue.div, { ref: We(i, n), ...
|
|
7031
|
+
let { disabled: S, value: x, onSelect: C, forceMount: b, keywords: w, ...E } = e;
|
|
7032
|
+
return m.createElement(ue.div, { ref: We(i, n), ...E, id: o, "cmdk-item": "", role: "option", "aria-disabled": !!S, "aria-selected": !!d, "data-disabled": !!S, "data-selected": !!d, onPointerMove: S || s.getDisablePointerSelection() ? void 0 : h, onClick: S ? void 0 : v }, e.children);
|
|
7032
7033
|
}), Wc = m.forwardRef((e, n) => {
|
|
7033
7034
|
let { heading: t, children: r, forceMount: o, ...i } = e, a = ke(), s = m.useRef(null), l = m.useRef(null), u = ke(), c = Ct(), p = Oe((f) => o || c.filter() === !1 ? !0 : f.search ? f.filtered.groups.has(a) : !0);
|
|
7034
7035
|
qe(() => c.group(a), []), Pi(a, s, [e.value, e.heading, l]);
|
|
@@ -7314,19 +7315,19 @@ function tt(e, n, t) {
|
|
|
7314
7315
|
r = p;
|
|
7315
7316
|
let f;
|
|
7316
7317
|
if (t.key && ((l = t.debug) != null && l.call(t)) && (f = Date.now()), o = n(...p), t.key && ((u = t.debug) != null && u.call(t))) {
|
|
7317
|
-
const v = Math.round((Date.now() - c) * 100) / 100, h = Math.round((Date.now() - f) * 100) / 100,
|
|
7318
|
-
for (
|
|
7319
|
-
|
|
7320
|
-
return
|
|
7318
|
+
const v = Math.round((Date.now() - c) * 100) / 100, h = Math.round((Date.now() - f) * 100) / 100, S = h / 16, x = (C, b) => {
|
|
7319
|
+
for (C = String(C); C.length < b; )
|
|
7320
|
+
C = " " + C;
|
|
7321
|
+
return C;
|
|
7321
7322
|
};
|
|
7322
7323
|
console.info(
|
|
7323
|
-
`%c⏱ ${
|
|
7324
|
+
`%c⏱ ${x(h, 5)} /${x(v, 5)} ms`,
|
|
7324
7325
|
`
|
|
7325
7326
|
font-size: .6rem;
|
|
7326
7327
|
font-weight: bold;
|
|
7327
7328
|
color: hsl(${Math.max(
|
|
7328
7329
|
0,
|
|
7329
|
-
Math.min(120 - 120 *
|
|
7330
|
+
Math.min(120 - 120 * S, 120)
|
|
7330
7331
|
)}deg 100% 31%);`,
|
|
7331
7332
|
t?.key
|
|
7332
7333
|
);
|
|
@@ -7602,21 +7603,21 @@ class md {
|
|
|
7602
7603
|
}
|
|
7603
7604
|
for (let d = u; d < t; d++) {
|
|
7604
7605
|
const f = i(d), v = this.laneAssignments.get(d);
|
|
7605
|
-
let h,
|
|
7606
|
+
let h, S;
|
|
7606
7607
|
if (v !== void 0 && this.options.lanes > 1) {
|
|
7607
7608
|
h = v;
|
|
7608
|
-
const
|
|
7609
|
-
|
|
7609
|
+
const w = p[h], E = w !== void 0 ? c[w] : void 0;
|
|
7610
|
+
S = E ? E.end + this.options.gap : r + o;
|
|
7610
7611
|
} else {
|
|
7611
|
-
const
|
|
7612
|
-
|
|
7612
|
+
const w = this.options.lanes === 1 ? c[d - 1] : this.getFurthestMeasurement(c, d);
|
|
7613
|
+
S = w ? w.end + this.options.gap : r + o, h = w ? w.lane : d % this.options.lanes, this.options.lanes > 1 && this.laneAssignments.set(d, h);
|
|
7613
7614
|
}
|
|
7614
|
-
const
|
|
7615
|
+
const x = l.get(f), C = typeof x == "number" ? x : this.options.estimateSize(d), b = S + C;
|
|
7615
7616
|
c[d] = {
|
|
7616
7617
|
index: d,
|
|
7617
|
-
start:
|
|
7618
|
-
size:
|
|
7619
|
-
end:
|
|
7618
|
+
start: S,
|
|
7619
|
+
size: C,
|
|
7620
|
+
end: b,
|
|
7620
7621
|
key: f,
|
|
7621
7622
|
lane: h
|
|
7622
7623
|
}, p[h] = d;
|
|
@@ -7944,52 +7945,52 @@ const vd = ({
|
|
|
7944
7945
|
getScrollElement: () => f.current,
|
|
7945
7946
|
estimateSize: () => i,
|
|
7946
7947
|
overscan: o
|
|
7947
|
-
}), h = v.getVirtualItems(),
|
|
7948
|
-
v.scrollToIndex(
|
|
7948
|
+
}), h = v.getVirtualItems(), S = (b) => {
|
|
7949
|
+
v.scrollToIndex(b, {
|
|
7949
7950
|
align: "center"
|
|
7950
7951
|
});
|
|
7951
|
-
},
|
|
7952
|
+
}, x = (b) => {
|
|
7952
7953
|
d(!1), l(
|
|
7953
7954
|
e.filter(
|
|
7954
|
-
(
|
|
7955
|
+
(w) => w.value.toLowerCase().includes(b.toLowerCase() ?? [])
|
|
7955
7956
|
)
|
|
7956
7957
|
);
|
|
7957
|
-
},
|
|
7958
|
-
switch (
|
|
7958
|
+
}, C = (b) => {
|
|
7959
|
+
switch (b.key) {
|
|
7959
7960
|
case "ArrowDown": {
|
|
7960
|
-
|
|
7961
|
-
const
|
|
7962
|
-
return
|
|
7961
|
+
b.preventDefault(), d(!0), c((w) => {
|
|
7962
|
+
const E = w === -1 ? 0 : Math.min(w + 1, s.length - 1);
|
|
7963
|
+
return S(E), E;
|
|
7963
7964
|
});
|
|
7964
7965
|
break;
|
|
7965
7966
|
}
|
|
7966
7967
|
case "ArrowUp": {
|
|
7967
|
-
|
|
7968
|
-
const
|
|
7969
|
-
return
|
|
7968
|
+
b.preventDefault(), d(!0), c((w) => {
|
|
7969
|
+
const E = w === -1 ? s.length - 1 : Math.max(w - 1, 0);
|
|
7970
|
+
return S(E), E;
|
|
7970
7971
|
});
|
|
7971
7972
|
break;
|
|
7972
7973
|
}
|
|
7973
7974
|
case "Enter": {
|
|
7974
|
-
|
|
7975
|
+
b.preventDefault(), s[u] && r?.(s[u].value);
|
|
7975
7976
|
break;
|
|
7976
7977
|
}
|
|
7977
7978
|
}
|
|
7978
7979
|
};
|
|
7979
7980
|
return m.useEffect(() => {
|
|
7980
7981
|
if (t) {
|
|
7981
|
-
const
|
|
7982
|
-
(
|
|
7982
|
+
const b = s.find(
|
|
7983
|
+
(w) => w.value === t
|
|
7983
7984
|
);
|
|
7984
|
-
if (
|
|
7985
|
-
const
|
|
7986
|
-
c(
|
|
7985
|
+
if (b) {
|
|
7986
|
+
const w = s.indexOf(b);
|
|
7987
|
+
c(w), v.scrollToIndex(w, {
|
|
7987
7988
|
align: "center"
|
|
7988
7989
|
});
|
|
7989
7990
|
}
|
|
7990
7991
|
}
|
|
7991
|
-
}, [t, s, v]), /* @__PURE__ */ A(Ai, { shouldFilter: !1, onKeyDown:
|
|
7992
|
-
a && /* @__PURE__ */ g(Oi, { onValueChange:
|
|
7992
|
+
}, [t, s, v]), /* @__PURE__ */ A(Ai, { shouldFilter: !1, onKeyDown: C, className: "p-0", children: [
|
|
7993
|
+
a && /* @__PURE__ */ g(Oi, { onValueChange: x, placeholder: n }),
|
|
7993
7994
|
/* @__PURE__ */ A(
|
|
7994
7995
|
$i,
|
|
7995
7996
|
{
|
|
@@ -8006,21 +8007,21 @@ const vd = ({
|
|
|
8006
8007
|
style: {
|
|
8007
8008
|
height: `${v.getTotalSize()}px`
|
|
8008
8009
|
},
|
|
8009
|
-
children: h.map((
|
|
8010
|
+
children: h.map((b) => /* @__PURE__ */ A(
|
|
8010
8011
|
An,
|
|
8011
8012
|
{
|
|
8012
|
-
disabled: p || s[
|
|
8013
|
+
disabled: p || s[b.index].disabled,
|
|
8013
8014
|
className: M(
|
|
8014
8015
|
"absolute left-0 top-0 w-full bg-transparent cursor-pointer",
|
|
8015
|
-
u ===
|
|
8016
|
-
p && u !==
|
|
8016
|
+
u === b.index && "bg-accent text-accent-foreground",
|
|
8017
|
+
p && u !== b.index && "aria-selected:bg-transparent aria-selected:text-primary"
|
|
8017
8018
|
),
|
|
8018
8019
|
style: {
|
|
8019
|
-
height: `${
|
|
8020
|
-
transform: `translateY(${
|
|
8020
|
+
height: `${b.size}px`,
|
|
8021
|
+
transform: `translateY(${b.start}px)`
|
|
8021
8022
|
},
|
|
8022
|
-
value: s[
|
|
8023
|
-
onMouseEnter: () => !p && c(
|
|
8023
|
+
value: s[b.index].value,
|
|
8024
|
+
onMouseEnter: () => !p && c(b.index),
|
|
8024
8025
|
onMouseLeave: () => !p && c(-1),
|
|
8025
8026
|
onSelect: r,
|
|
8026
8027
|
children: [
|
|
@@ -8029,14 +8030,14 @@ const vd = ({
|
|
|
8029
8030
|
{
|
|
8030
8031
|
className: M(
|
|
8031
8032
|
"mr-2 h-4 w-4",
|
|
8032
|
-
t === s[
|
|
8033
|
+
t === s[b.index].value ? "opacity-100" : "opacity-0"
|
|
8033
8034
|
)
|
|
8034
8035
|
}
|
|
8035
8036
|
),
|
|
8036
|
-
s[
|
|
8037
|
+
s[b.index].label
|
|
8037
8038
|
]
|
|
8038
8039
|
},
|
|
8039
|
-
s[
|
|
8040
|
+
s[b.index].value
|
|
8040
8041
|
))
|
|
8041
8042
|
}
|
|
8042
8043
|
) })
|
|
@@ -8138,46 +8139,46 @@ function bd({
|
|
|
8138
8139
|
virtualizationItemHeight: u = 34,
|
|
8139
8140
|
showSearch: c = !0
|
|
8140
8141
|
}) {
|
|
8141
|
-
const [p, d] = m.useState(""), [f, v] = m.useState(-1), [h,
|
|
8142
|
-
const
|
|
8143
|
-
return
|
|
8144
|
-
}, [e, p]),
|
|
8142
|
+
const [p, d] = m.useState(""), [f, v] = m.useState(-1), [h, S] = m.useState(!1), x = m.useRef(null), C = m.useMemo(() => {
|
|
8143
|
+
const y = p.trim().toLowerCase();
|
|
8144
|
+
return y.length === 0 ? e : e.filter((_) => `${_.label} ${_.value}`.toLowerCase().includes(y));
|
|
8145
|
+
}, [e, p]), b = m.useMemo(
|
|
8145
8146
|
() => new Set(t),
|
|
8146
8147
|
[t]
|
|
8147
|
-
),
|
|
8148
|
-
count:
|
|
8149
|
-
getScrollElement: () =>
|
|
8148
|
+
), w = Zn({
|
|
8149
|
+
count: C.length,
|
|
8150
|
+
getScrollElement: () => x.current,
|
|
8150
8151
|
estimateSize: () => u,
|
|
8151
8152
|
overscan: l
|
|
8152
|
-
}),
|
|
8153
|
-
(
|
|
8154
|
-
|
|
8153
|
+
}), E = w.getVirtualItems(), N = m.useCallback(
|
|
8154
|
+
(y) => {
|
|
8155
|
+
w.scrollToIndex(y, { align: "center" });
|
|
8155
8156
|
},
|
|
8156
|
-
[
|
|
8157
|
+
[w]
|
|
8157
8158
|
);
|
|
8158
|
-
return /* @__PURE__ */ A(Ai, { shouldFilter: !1, onKeyDown: (
|
|
8159
|
-
switch (
|
|
8159
|
+
return /* @__PURE__ */ A(Ai, { shouldFilter: !1, onKeyDown: (y) => {
|
|
8160
|
+
switch (y.key) {
|
|
8160
8161
|
case "ArrowDown": {
|
|
8161
|
-
|
|
8162
|
-
const I = Math.min(_ + 1,
|
|
8162
|
+
y.preventDefault(), S(!0), v((_) => {
|
|
8163
|
+
const I = Math.min(_ + 1, C.length - 1);
|
|
8163
8164
|
return I >= 0 && N(I), I;
|
|
8164
8165
|
});
|
|
8165
8166
|
break;
|
|
8166
8167
|
}
|
|
8167
8168
|
case "ArrowUp": {
|
|
8168
|
-
|
|
8169
|
+
y.preventDefault(), S(!0), v((_) => {
|
|
8169
8170
|
const I = Math.max(_ - 1, 0);
|
|
8170
8171
|
return I >= 0 && N(I), I;
|
|
8171
8172
|
});
|
|
8172
8173
|
break;
|
|
8173
8174
|
}
|
|
8174
8175
|
case "Enter": {
|
|
8175
|
-
if (f < 0 || !
|
|
8176
|
+
if (f < 0 || !C[f])
|
|
8176
8177
|
return;
|
|
8177
|
-
const _ =
|
|
8178
|
+
const _ = C[f];
|
|
8178
8179
|
if (s || _.disabled)
|
|
8179
8180
|
return;
|
|
8180
|
-
|
|
8181
|
+
y.preventDefault(), r(_.value);
|
|
8181
8182
|
break;
|
|
8182
8183
|
}
|
|
8183
8184
|
}
|
|
@@ -8186,8 +8187,8 @@ function bd({
|
|
|
8186
8187
|
Oi,
|
|
8187
8188
|
{
|
|
8188
8189
|
value: p,
|
|
8189
|
-
onValueChange: (
|
|
8190
|
-
d(
|
|
8190
|
+
onValueChange: (y) => {
|
|
8191
|
+
d(y), v(-1), S(!1);
|
|
8191
8192
|
},
|
|
8192
8193
|
placeholder: n
|
|
8193
8194
|
}
|
|
@@ -8195,9 +8196,9 @@ function bd({
|
|
|
8195
8196
|
/* @__PURE__ */ A(
|
|
8196
8197
|
$i,
|
|
8197
8198
|
{
|
|
8198
|
-
ref:
|
|
8199
|
-
onMouseDown: () =>
|
|
8200
|
-
onMouseMove: () =>
|
|
8199
|
+
ref: x,
|
|
8200
|
+
onMouseDown: () => S(!1),
|
|
8201
|
+
onMouseMove: () => S(!1),
|
|
8201
8202
|
children: [
|
|
8202
8203
|
/* @__PURE__ */ g(zi, { children: "No item found." }),
|
|
8203
8204
|
/* @__PURE__ */ A(Ti, { children: [
|
|
@@ -8212,7 +8213,7 @@ function bd({
|
|
|
8212
8213
|
/* @__PURE__ */ g(
|
|
8213
8214
|
no,
|
|
8214
8215
|
{
|
|
8215
|
-
checked:
|
|
8216
|
+
checked: b.has(a),
|
|
8216
8217
|
className: "pointer-events-none"
|
|
8217
8218
|
}
|
|
8218
8219
|
),
|
|
@@ -8225,28 +8226,28 @@ function bd({
|
|
|
8225
8226
|
"div",
|
|
8226
8227
|
{
|
|
8227
8228
|
style: {
|
|
8228
|
-
height: `${
|
|
8229
|
+
height: `${w.getTotalSize()}px`,
|
|
8229
8230
|
width: "100%",
|
|
8230
8231
|
position: "relative"
|
|
8231
8232
|
},
|
|
8232
|
-
children:
|
|
8233
|
-
const _ = y
|
|
8233
|
+
children: E.map((y) => {
|
|
8234
|
+
const _ = C[y.index], I = b.has(_.value);
|
|
8234
8235
|
return /* @__PURE__ */ A(
|
|
8235
8236
|
An,
|
|
8236
8237
|
{
|
|
8237
8238
|
value: _.value,
|
|
8238
8239
|
disabled: s || _.disabled || h,
|
|
8239
8240
|
onSelect: () => r(_.value),
|
|
8240
|
-
onMouseEnter: () => !h && v(
|
|
8241
|
+
onMouseEnter: () => !h && v(y.index),
|
|
8241
8242
|
onMouseLeave: () => !h && v(-1),
|
|
8242
8243
|
className: M(
|
|
8243
8244
|
"absolute left-0 top-0 w-full bg-transparent cursor-pointer",
|
|
8244
|
-
f ===
|
|
8245
|
-
h && f !==
|
|
8245
|
+
f === y.index && "bg-accent text-accent-foreground",
|
|
8246
|
+
h && f !== y.index && "aria-selected:bg-transparent aria-selected:text-primary"
|
|
8246
8247
|
),
|
|
8247
8248
|
style: {
|
|
8248
|
-
height: `${
|
|
8249
|
-
transform: `translateY(${
|
|
8249
|
+
height: `${y.size}px`,
|
|
8250
|
+
transform: `translateY(${y.start}px)`
|
|
8250
8251
|
},
|
|
8251
8252
|
children: [
|
|
8252
8253
|
/* @__PURE__ */ g(
|
|
@@ -8287,39 +8288,39 @@ function Nf({
|
|
|
8287
8288
|
selectedCountLabel: f = "geselecteerd",
|
|
8288
8289
|
virtualizationOverscan: v = 10,
|
|
8289
8290
|
virtualizationItemHeight: h = 34,
|
|
8290
|
-
showSearch:
|
|
8291
|
+
showSearch: S = !0
|
|
8291
8292
|
}) {
|
|
8292
|
-
const
|
|
8293
|
+
const x = m.useMemo(() => {
|
|
8293
8294
|
const I = /* @__PURE__ */ new Map();
|
|
8294
8295
|
return e.forEach((T) => {
|
|
8295
8296
|
I.has(T.value) || I.set(T.value, T);
|
|
8296
8297
|
}), Array.from(I.values());
|
|
8297
|
-
}, [e]),
|
|
8298
|
-
() =>
|
|
8299
|
-
[d,
|
|
8300
|
-
),
|
|
8301
|
-
() => /* @__PURE__ */ new Set([d, ...
|
|
8302
|
-
[d,
|
|
8303
|
-
),
|
|
8298
|
+
}, [e]), C = m.useMemo(
|
|
8299
|
+
() => x.filter((I) => I.value !== d),
|
|
8300
|
+
[d, x]
|
|
8301
|
+
), b = m.useMemo(
|
|
8302
|
+
() => /* @__PURE__ */ new Set([d, ...C.map((I) => I.value)]),
|
|
8303
|
+
[d, C]
|
|
8304
|
+
), w = m.useMemo(() => {
|
|
8304
8305
|
const I = Array.from(new Set(n)).filter(
|
|
8305
|
-
(T) =>
|
|
8306
|
+
(T) => b.has(T)
|
|
8306
8307
|
);
|
|
8307
8308
|
return I.includes(d) ? [d] : I.length === 0 && c ? [d] : I;
|
|
8308
|
-
}, [d, c,
|
|
8309
|
+
}, [d, c, b, n]), E = m.useMemo(() => {
|
|
8309
8310
|
const I = /* @__PURE__ */ new Map();
|
|
8310
|
-
return
|
|
8311
|
+
return C.forEach((T) => {
|
|
8311
8312
|
I.set(T.value, T.label);
|
|
8312
8313
|
}), I.set(d, p), I;
|
|
8313
|
-
}, [d, p,
|
|
8314
|
-
(I) =>
|
|
8315
|
-
).join(", ") : `${
|
|
8314
|
+
}, [d, p, C]), N = m.useMemo(() => w.length === 0 ? r : w.length <= 2 ? w.map(
|
|
8315
|
+
(I) => E.get(I) ?? I
|
|
8316
|
+
).join(", ") : `${w.length} ${f}`, [E, w, r, f]), R = m.useCallback(
|
|
8316
8317
|
(I) => {
|
|
8317
8318
|
if (I === d) {
|
|
8318
8319
|
t([d]);
|
|
8319
8320
|
return;
|
|
8320
8321
|
}
|
|
8321
|
-
if (
|
|
8322
|
-
const B =
|
|
8322
|
+
if (w.includes(I)) {
|
|
8323
|
+
const B = w.filter(
|
|
8323
8324
|
(z) => z !== I
|
|
8324
8325
|
);
|
|
8325
8326
|
t(
|
|
@@ -8328,16 +8329,16 @@ function Nf({
|
|
|
8328
8329
|
return;
|
|
8329
8330
|
}
|
|
8330
8331
|
t([
|
|
8331
|
-
...
|
|
8332
|
+
...w.filter(
|
|
8332
8333
|
(B) => B !== d
|
|
8333
8334
|
),
|
|
8334
8335
|
I
|
|
8335
8336
|
]);
|
|
8336
8337
|
},
|
|
8337
|
-
[d,
|
|
8338
|
-
), [
|
|
8338
|
+
[d, w, t, c]
|
|
8339
|
+
), [y, _] = m.useState(!1);
|
|
8339
8340
|
return /* @__PURE__ */ A("div", { className: M("w-full", a), children: [
|
|
8340
|
-
i ?
|
|
8341
|
+
i ? w.map((I) => /* @__PURE__ */ g(
|
|
8341
8342
|
"input",
|
|
8342
8343
|
{
|
|
8343
8344
|
type: "hidden",
|
|
@@ -8346,7 +8347,7 @@ function Nf({
|
|
|
8346
8347
|
},
|
|
8347
8348
|
`${i}-${I}`
|
|
8348
8349
|
)) : null,
|
|
8349
|
-
/* @__PURE__ */ A(Li, { open:
|
|
8350
|
+
/* @__PURE__ */ A(Li, { open: y, onOpenChange: _, children: [
|
|
8350
8351
|
/* @__PURE__ */ g(Vi, { asChild: !0, children: /* @__PURE__ */ A(
|
|
8351
8352
|
"button",
|
|
8352
8353
|
{
|
|
@@ -8354,7 +8355,7 @@ function Nf({
|
|
|
8354
8355
|
disabled: o,
|
|
8355
8356
|
className: M(
|
|
8356
8357
|
_o,
|
|
8357
|
-
|
|
8358
|
+
w.length === 0 && "text-muted-foreground",
|
|
8358
8359
|
s
|
|
8359
8360
|
),
|
|
8360
8361
|
children: [
|
|
@@ -8376,11 +8377,11 @@ function Nf({
|
|
|
8376
8377
|
children: /* @__PURE__ */ g(
|
|
8377
8378
|
bd,
|
|
8378
8379
|
{
|
|
8379
|
-
showSearch:
|
|
8380
|
-
options:
|
|
8380
|
+
showSearch: S,
|
|
8381
|
+
options: C,
|
|
8381
8382
|
placeholder: r,
|
|
8382
|
-
selectedValues:
|
|
8383
|
-
onToggleOption:
|
|
8383
|
+
selectedValues: w,
|
|
8384
|
+
onToggleOption: R,
|
|
8384
8385
|
showSelectAll: c,
|
|
8385
8386
|
selectAllLabel: p,
|
|
8386
8387
|
allValue: d,
|
|
@@ -8594,22 +8595,22 @@ function $t(e, n, t, r) {
|
|
|
8594
8595
|
id: [r, `${f}`].filter(Boolean).join("_"),
|
|
8595
8596
|
headers: []
|
|
8596
8597
|
}, h = [];
|
|
8597
|
-
d.forEach((
|
|
8598
|
-
const
|
|
8599
|
-
let
|
|
8600
|
-
if (
|
|
8601
|
-
|
|
8598
|
+
d.forEach((S) => {
|
|
8599
|
+
const x = [...h].reverse()[0], C = S.column.depth === v.depth;
|
|
8600
|
+
let b, w = !1;
|
|
8601
|
+
if (C && S.column.parent ? b = S.column.parent : (b = S.column, w = !0), x && x?.column === b)
|
|
8602
|
+
x.subHeaders.push(S);
|
|
8602
8603
|
else {
|
|
8603
|
-
const
|
|
8604
|
-
id: [r, f,
|
|
8605
|
-
isPlaceholder:
|
|
8606
|
-
placeholderId:
|
|
8604
|
+
const E = ro(t, b, {
|
|
8605
|
+
id: [r, f, b.id, S?.id].filter(Boolean).join("_"),
|
|
8606
|
+
isPlaceholder: w,
|
|
8607
|
+
placeholderId: w ? `${h.filter((N) => N.column === b).length}` : void 0,
|
|
8607
8608
|
depth: f,
|
|
8608
8609
|
index: h.length
|
|
8609
8610
|
});
|
|
8610
|
-
|
|
8611
|
+
E.subHeaders.push(S), h.push(E);
|
|
8611
8612
|
}
|
|
8612
|
-
v.headers.push(
|
|
8613
|
+
v.headers.push(S), S.headerGroup = v;
|
|
8613
8614
|
}), l.push(v), f > 0 && u(h, f - 1);
|
|
8614
8615
|
}, c = n.map((d, f) => ro(t, d, {
|
|
8615
8616
|
depth: a,
|
|
@@ -8617,18 +8618,18 @@ function $t(e, n, t, r) {
|
|
|
8617
8618
|
}));
|
|
8618
8619
|
u(c, a - 1), l.reverse();
|
|
8619
8620
|
const p = (d) => d.filter((v) => v.column.getIsVisible()).map((v) => {
|
|
8620
|
-
let h = 0,
|
|
8621
|
-
v.subHeaders && v.subHeaders.length ? (
|
|
8621
|
+
let h = 0, S = 0, x = [0];
|
|
8622
|
+
v.subHeaders && v.subHeaders.length ? (x = [], p(v.subHeaders).forEach((b) => {
|
|
8622
8623
|
let {
|
|
8623
|
-
colSpan:
|
|
8624
|
-
rowSpan:
|
|
8625
|
-
} =
|
|
8626
|
-
h +=
|
|
8624
|
+
colSpan: w,
|
|
8625
|
+
rowSpan: E
|
|
8626
|
+
} = b;
|
|
8627
|
+
h += w, x.push(E);
|
|
8627
8628
|
})) : h = 1;
|
|
8628
|
-
const
|
|
8629
|
-
return
|
|
8629
|
+
const C = Math.min(...x);
|
|
8630
|
+
return S = S + C, v.colSpan = h, v.rowSpan = S, {
|
|
8630
8631
|
colSpan: h,
|
|
8631
|
-
rowSpan:
|
|
8632
|
+
rowSpan: S
|
|
8632
8633
|
};
|
|
8633
8634
|
});
|
|
8634
8635
|
return p((o = (i = l[0]) == null ? void 0 : i.headers) != null ? o : []), l;
|
|
@@ -9133,25 +9134,25 @@ const zt = {
|
|
|
9133
9134
|
return (i) => {
|
|
9134
9135
|
if (!r || !o || (i.persist == null || i.persist(), yn(i) && i.touches && i.touches.length > 1))
|
|
9135
9136
|
return;
|
|
9136
|
-
const a = e.getSize(), s = e ? e.getLeafHeaders().map((
|
|
9137
|
-
typeof
|
|
9138
|
-
var
|
|
9139
|
-
const N = n.options.columnResizeDirection === "rtl" ? -1 : 1,
|
|
9140
|
-
return
|
|
9137
|
+
const a = e.getSize(), s = e ? e.getLeafHeaders().map((x) => [x.column.id, x.column.getSize()]) : [[r.id, r.getSize()]], l = yn(i) ? Math.round(i.touches[0].clientX) : i.clientX, u = {}, c = (x, C) => {
|
|
9138
|
+
typeof C == "number" && (n.setColumnSizingInfo((b) => {
|
|
9139
|
+
var w, E;
|
|
9140
|
+
const N = n.options.columnResizeDirection === "rtl" ? -1 : 1, R = (C - ((w = b?.startOffset) != null ? w : 0)) * N, y = Math.max(R / ((E = b?.startSize) != null ? E : 0), -0.999999);
|
|
9141
|
+
return b.columnSizingStart.forEach((_) => {
|
|
9141
9142
|
let [I, T] = _;
|
|
9142
|
-
u[I] = Math.round(Math.max(T + T *
|
|
9143
|
+
u[I] = Math.round(Math.max(T + T * y, 0) * 100) / 100;
|
|
9143
9144
|
}), {
|
|
9144
|
-
...
|
|
9145
|
-
deltaOffset:
|
|
9146
|
-
deltaPercentage:
|
|
9145
|
+
...b,
|
|
9146
|
+
deltaOffset: R,
|
|
9147
|
+
deltaPercentage: y
|
|
9147
9148
|
};
|
|
9148
|
-
}), (n.options.columnResizeMode === "onChange" ||
|
|
9149
|
-
...
|
|
9149
|
+
}), (n.options.columnResizeMode === "onChange" || x === "end") && n.setColumnSizing((b) => ({
|
|
9150
|
+
...b,
|
|
9150
9151
|
...u
|
|
9151
9152
|
})));
|
|
9152
|
-
}, p = (
|
|
9153
|
-
c("end",
|
|
9154
|
-
...
|
|
9153
|
+
}, p = (x) => c("move", x), d = (x) => {
|
|
9154
|
+
c("end", x), n.setColumnSizingInfo((C) => ({
|
|
9155
|
+
...C,
|
|
9155
9156
|
isResizingColumn: !1,
|
|
9156
9157
|
startOffset: null,
|
|
9157
9158
|
startSize: null,
|
|
@@ -9160,21 +9161,21 @@ const zt = {
|
|
|
9160
9161
|
columnSizingStart: []
|
|
9161
9162
|
}));
|
|
9162
9163
|
}, f = Ld(t), v = {
|
|
9163
|
-
moveHandler: (
|
|
9164
|
-
upHandler: (
|
|
9165
|
-
f?.removeEventListener("mousemove", v.moveHandler), f?.removeEventListener("mouseup", v.upHandler), d(
|
|
9164
|
+
moveHandler: (x) => p(x.clientX),
|
|
9165
|
+
upHandler: (x) => {
|
|
9166
|
+
f?.removeEventListener("mousemove", v.moveHandler), f?.removeEventListener("mouseup", v.upHandler), d(x.clientX);
|
|
9166
9167
|
}
|
|
9167
9168
|
}, h = {
|
|
9168
|
-
moveHandler: (
|
|
9169
|
-
upHandler: (
|
|
9170
|
-
var
|
|
9171
|
-
f?.removeEventListener("touchmove", h.moveHandler), f?.removeEventListener("touchend", h.upHandler),
|
|
9169
|
+
moveHandler: (x) => (x.cancelable && (x.preventDefault(), x.stopPropagation()), p(x.touches[0].clientX), !1),
|
|
9170
|
+
upHandler: (x) => {
|
|
9171
|
+
var C;
|
|
9172
|
+
f?.removeEventListener("touchmove", h.moveHandler), f?.removeEventListener("touchend", h.upHandler), x.cancelable && (x.preventDefault(), x.stopPropagation()), d((C = x.touches[0]) == null ? void 0 : C.clientX);
|
|
9172
9173
|
}
|
|
9173
|
-
},
|
|
9174
|
+
}, S = Hd() ? {
|
|
9174
9175
|
passive: !1
|
|
9175
9176
|
} : !1;
|
|
9176
|
-
yn(i) ? (f?.addEventListener("touchmove", h.moveHandler,
|
|
9177
|
-
...
|
|
9177
|
+
yn(i) ? (f?.addEventListener("touchmove", h.moveHandler, S), f?.addEventListener("touchend", h.upHandler, S)) : (f?.addEventListener("mousemove", v.moveHandler, S), f?.addEventListener("mouseup", v.upHandler, S)), n.setColumnSizingInfo((x) => ({
|
|
9178
|
+
...x,
|
|
9178
9179
|
startOffset: l,
|
|
9179
9180
|
startSize: a,
|
|
9180
9181
|
deltaOffset: 0,
|
|
@@ -9963,8 +9964,8 @@ function rf(e) {
|
|
|
9963
9964
|
},
|
|
9964
9965
|
// footer: props => props.header.column.id,
|
|
9965
9966
|
cell: (v) => {
|
|
9966
|
-
var h,
|
|
9967
|
-
return (h = (
|
|
9967
|
+
var h, S;
|
|
9968
|
+
return (h = (S = v.renderValue()) == null || S.toString == null ? void 0 : S.toString()) != null ? h : null;
|
|
9968
9969
|
},
|
|
9969
9970
|
...o._features.reduce((v, h) => Object.assign(v, h.getDefaultColumnDef == null ? void 0 : h.getDefaultColumnDef()), {}),
|
|
9970
9971
|
...d
|
|
@@ -9972,10 +9973,10 @@ function rf(e) {
|
|
|
9972
9973
|
}, H(e, "debugColumns", "_getDefaultColumnDef")),
|
|
9973
9974
|
_getColumnDefs: () => o.options.columns,
|
|
9974
9975
|
getAllColumns: V(() => [o._getColumnDefs()], (d) => {
|
|
9975
|
-
const f = function(v, h,
|
|
9976
|
-
return
|
|
9977
|
-
const
|
|
9978
|
-
return
|
|
9976
|
+
const f = function(v, h, S) {
|
|
9977
|
+
return S === void 0 && (S = 0), v.map((x) => {
|
|
9978
|
+
const C = yd(o, x, S, h), b = x;
|
|
9979
|
+
return C.columns = b.columns ? f(b.columns, C, S + 1) : [], C;
|
|
9979
9980
|
});
|
|
9980
9981
|
};
|
|
9981
9982
|
return f(d);
|
|
@@ -10115,16 +10116,16 @@ function uf() {
|
|
|
10115
10116
|
for (let v = 0; v < o.length; v++) {
|
|
10116
10117
|
u = o[v];
|
|
10117
10118
|
const h = u.id;
|
|
10118
|
-
f.columnFilters[h] = u.filterFn(f, h, u.resolvedValue, (
|
|
10119
|
-
f.columnFiltersMeta[h] =
|
|
10119
|
+
f.columnFilters[h] = u.filterFn(f, h, u.resolvedValue, (S) => {
|
|
10120
|
+
f.columnFiltersMeta[h] = S;
|
|
10120
10121
|
});
|
|
10121
10122
|
}
|
|
10122
10123
|
if (i.length) {
|
|
10123
10124
|
for (let v = 0; v < i.length; v++) {
|
|
10124
10125
|
c = i[v];
|
|
10125
10126
|
const h = c.id;
|
|
10126
|
-
if (c.filterFn(f, h, c.resolvedValue, (
|
|
10127
|
-
f.columnFiltersMeta[h] =
|
|
10127
|
+
if (c.filterFn(f, h, c.resolvedValue, (S) => {
|
|
10128
|
+
f.columnFiltersMeta[h] = S;
|
|
10128
10129
|
})) {
|
|
10129
10130
|
f.columnFilters.__global__ = !0;
|
|
10130
10131
|
break;
|
|
@@ -10165,18 +10166,18 @@ function cf() {
|
|
|
10165
10166
|
return u.sort((c, p) => {
|
|
10166
10167
|
for (let f = 0; f < i.length; f += 1) {
|
|
10167
10168
|
var d;
|
|
10168
|
-
const v = i[f], h = a[v.id],
|
|
10169
|
-
let
|
|
10170
|
-
if (
|
|
10171
|
-
const
|
|
10172
|
-
if (
|
|
10173
|
-
if (
|
|
10174
|
-
if (
|
|
10175
|
-
|
|
10169
|
+
const v = i[f], h = a[v.id], S = h.sortUndefined, x = (d = v?.desc) != null ? d : !1;
|
|
10170
|
+
let C = 0;
|
|
10171
|
+
if (S) {
|
|
10172
|
+
const b = c.getValue(v.id), w = p.getValue(v.id), E = b === void 0, N = w === void 0;
|
|
10173
|
+
if (E || N) {
|
|
10174
|
+
if (S === "first") return E ? -1 : 1;
|
|
10175
|
+
if (S === "last") return E ? 1 : -1;
|
|
10176
|
+
C = E && N ? 0 : E ? S : -S;
|
|
10176
10177
|
}
|
|
10177
10178
|
}
|
|
10178
|
-
if (
|
|
10179
|
-
return
|
|
10179
|
+
if (C === 0 && (C = h.sortingFn(c, p, v.id)), C !== 0)
|
|
10180
|
+
return x && (C *= -1), h.invertSorting && (C *= -1), C;
|
|
10180
10181
|
}
|
|
10181
10182
|
return c.index - p.index;
|
|
10182
10183
|
}), u.forEach((c) => {
|
|
@@ -10326,29 +10327,29 @@ function Ff({
|
|
|
10326
10327
|
virtualizationItemHeight: p = 36,
|
|
10327
10328
|
className: d
|
|
10328
10329
|
}) {
|
|
10329
|
-
const [f, v] = vt(l), [h,
|
|
10330
|
+
const [f, v] = vt(l), [h, S] = vt(""), [x, C] = vt([]), b = ma(null), w = mf({
|
|
10330
10331
|
data: e,
|
|
10331
10332
|
columns: n,
|
|
10332
10333
|
getRowId: t,
|
|
10333
10334
|
state: {
|
|
10334
10335
|
sorting: f,
|
|
10335
10336
|
globalFilter: h,
|
|
10336
|
-
columnFilters:
|
|
10337
|
+
columnFilters: x
|
|
10337
10338
|
},
|
|
10338
10339
|
onSortingChange: v,
|
|
10339
|
-
onGlobalFilterChange:
|
|
10340
|
-
onColumnFiltersChange:
|
|
10340
|
+
onGlobalFilterChange: S,
|
|
10341
|
+
onColumnFiltersChange: C,
|
|
10341
10342
|
globalFilterFn: "includesString",
|
|
10342
10343
|
getCoreRowModel: of(),
|
|
10343
10344
|
getSortedRowModel: cf(),
|
|
10344
10345
|
getFilteredRowModel: uf()
|
|
10345
|
-
}),
|
|
10346
|
-
count:
|
|
10347
|
-
getScrollElement: () =>
|
|
10348
|
-
getItemKey: (T) =>
|
|
10346
|
+
}), E = w.getRowModel().rows, N = Zn({
|
|
10347
|
+
count: E.length,
|
|
10348
|
+
getScrollElement: () => b.current,
|
|
10349
|
+
getItemKey: (T) => E[T]?.id ?? T,
|
|
10349
10350
|
estimateSize: () => p,
|
|
10350
10351
|
overscan: c
|
|
10351
|
-
}),
|
|
10352
|
+
}), R = N.getVirtualItems(), y = R[0]?.start ?? 0, _ = R.length > 0 ? N.getTotalSize() - (R.at(-1)?.end ?? 0) : 0, I = u || i;
|
|
10352
10353
|
return /* @__PURE__ */ A(
|
|
10353
10354
|
"div",
|
|
10354
10355
|
{
|
|
@@ -10358,12 +10359,12 @@ function Ff({
|
|
|
10358
10359
|
),
|
|
10359
10360
|
children: [
|
|
10360
10361
|
I && /* @__PURE__ */ A("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
10361
|
-
i?.(
|
|
10362
|
+
i?.(w),
|
|
10362
10363
|
u && /* @__PURE__ */ g(
|
|
10363
10364
|
"input",
|
|
10364
10365
|
{
|
|
10365
10366
|
value: h,
|
|
10366
|
-
onChange: (T) =>
|
|
10367
|
+
onChange: (T) => S(T.target.value),
|
|
10367
10368
|
placeholder: a,
|
|
10368
10369
|
className: "ml-auto h-8 w-full rounded-md border border-input bg-background px-2 text-sm outline-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/40 sm:w-72"
|
|
10369
10370
|
}
|
|
@@ -10372,10 +10373,10 @@ function Ff({
|
|
|
10372
10373
|
/* @__PURE__ */ g(
|
|
10373
10374
|
"div",
|
|
10374
10375
|
{
|
|
10375
|
-
ref:
|
|
10376
|
+
ref: b,
|
|
10376
10377
|
className: "max-h-[min(68vh,42rem)] min-h-[16rem] w-full min-w-0 max-w-full overflow-auto rounded-md border border-border",
|
|
10377
10378
|
children: /* @__PURE__ */ g("div", { className: "min-w-full w-max", children: /* @__PURE__ */ A(pf, { containerClassName: "overflow-visible", className: "w-full", children: [
|
|
10378
|
-
/* @__PURE__ */ g(hf, { children:
|
|
10379
|
+
/* @__PURE__ */ g(hf, { children: w.getHeaderGroups().map((T) => /* @__PURE__ */ g(ht, { className: "hover:bg-transparent", children: T.headers.map((B) => {
|
|
10379
10380
|
const z = B.column.columnDef.meta;
|
|
10380
10381
|
return /* @__PURE__ */ g(
|
|
10381
10382
|
bf,
|
|
@@ -10410,7 +10411,7 @@ function Ff({
|
|
|
10410
10411
|
B.id
|
|
10411
10412
|
);
|
|
10412
10413
|
}) }, T.id)) }),
|
|
10413
|
-
/* @__PURE__ */ g(vf, { children:
|
|
10414
|
+
/* @__PURE__ */ g(vf, { children: E.length === 0 ? /* @__PURE__ */ g(ht, { children: /* @__PURE__ */ g(
|
|
10414
10415
|
Ht,
|
|
10415
10416
|
{
|
|
10416
10417
|
colSpan: n.length,
|
|
@@ -10418,7 +10419,7 @@ function Ff({
|
|
|
10418
10419
|
children: s
|
|
10419
10420
|
}
|
|
10420
10421
|
) }) : /* @__PURE__ */ A(Bt, { children: [
|
|
10421
|
-
|
|
10422
|
+
y > 0 && /* @__PURE__ */ g(
|
|
10422
10423
|
ht,
|
|
10423
10424
|
{
|
|
10424
10425
|
"aria-hidden": "true",
|
|
@@ -10428,13 +10429,13 @@ function Ff({
|
|
|
10428
10429
|
{
|
|
10429
10430
|
colSpan: n.length,
|
|
10430
10431
|
className: "h-0 p-0",
|
|
10431
|
-
style: { height: `${
|
|
10432
|
+
style: { height: `${y}px` }
|
|
10432
10433
|
}
|
|
10433
10434
|
)
|
|
10434
10435
|
}
|
|
10435
10436
|
),
|
|
10436
|
-
|
|
10437
|
-
const B =
|
|
10437
|
+
R.map((T) => {
|
|
10438
|
+
const B = E[T.index];
|
|
10438
10439
|
return B ? /* @__PURE__ */ g(
|
|
10439
10440
|
wf,
|
|
10440
10441
|
{
|