@indxsearch/systm 1.2.5 → 1.2.7
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.es.js
CHANGED
|
@@ -137,7 +137,7 @@ function To() {
|
|
|
137
137
|
}
|
|
138
138
|
function a(S, B) {
|
|
139
139
|
function W() {
|
|
140
|
-
|
|
140
|
+
M || (M = !0, console.error(
|
|
141
141
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
142
142
|
B
|
|
143
143
|
));
|
|
@@ -149,7 +149,7 @@ function To() {
|
|
|
149
149
|
}
|
|
150
150
|
function u() {
|
|
151
151
|
var S = e(this.type);
|
|
152
|
-
return
|
|
152
|
+
return k[S] || (k[S] = !0, console.error(
|
|
153
153
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
154
154
|
)), S = this.props.ref, S !== void 0 ? S : null;
|
|
155
155
|
}
|
|
@@ -248,7 +248,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
248
248
|
return S();
|
|
249
249
|
}
|
|
250
250
|
};
|
|
251
|
-
var
|
|
251
|
+
var M, k = {}, A = h.react_stack_bottom_frame.bind(
|
|
252
252
|
h,
|
|
253
253
|
s
|
|
254
254
|
)(), L = I(r(s)), H = {};
|
|
@@ -280,32 +280,48 @@ function Po() {
|
|
|
280
280
|
return _n || (_n = 1, process.env.NODE_ENV === "production" ? at.exports = Ro() : at.exports = To()), at.exports;
|
|
281
281
|
}
|
|
282
282
|
var y = Po();
|
|
283
|
-
const Oo = "_button_1sns4_1", Ao = "_micro_1sns4_22",
|
|
283
|
+
const Oo = "_button_1sns4_1", Ao = "_micro_1sns4_22", ko = "_large_1sns4_38", Mo = "_primary_1sns4_47", No = "_secondary_1sns4_57", Io = "_ghost_1sns4_67", jt = {
|
|
284
284
|
button: Oo,
|
|
285
285
|
micro: Ao,
|
|
286
286
|
default: "_default_1sns4_30",
|
|
287
|
-
large:
|
|
288
|
-
primary:
|
|
287
|
+
large: ko,
|
|
288
|
+
primary: Mo,
|
|
289
289
|
secondary: No,
|
|
290
290
|
ghost: Io
|
|
291
291
|
};
|
|
292
292
|
function Il(e) {
|
|
293
|
-
const { size: t = "default", variant: n = "primary", iconLeft: r, iconRight: o, className: s, children: i,
|
|
293
|
+
const { size: t = "default", variant: n = "primary", iconLeft: r, iconRight: o, className: s, children: i, ...a } = e, { href: u } = a, d = "disabled" in a ? a.disabled : !1, v = t === "micro" ? "14px" : t === "large" ? "21px" : "14px", p = [
|
|
294
294
|
jt.button,
|
|
295
295
|
jt[t],
|
|
296
296
|
jt[n],
|
|
297
|
-
|
|
297
|
+
d ? "cursor-not-allowed" : "cursor-pointer",
|
|
298
298
|
s
|
|
299
299
|
].filter(Boolean).join(" ");
|
|
300
300
|
if (process.env.NODE_ENV !== "production") {
|
|
301
|
-
const
|
|
302
|
-
|
|
301
|
+
const c = (r || o) && !i, m = a["aria-label"] || a["aria-labelledby"];
|
|
302
|
+
c && !m && console.warn("Button: Icon-only buttons should have an aria-label or aria-labelledby for accessibility.");
|
|
303
303
|
}
|
|
304
|
-
|
|
305
|
-
r && J.cloneElement(r, { size:
|
|
304
|
+
const g = /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
|
|
305
|
+
r && J.cloneElement(r, { size: v, color: "currentColor" }),
|
|
306
306
|
i,
|
|
307
|
-
o && J.cloneElement(o, { size:
|
|
307
|
+
o && J.cloneElement(o, { size: v, color: "currentColor" })
|
|
308
308
|
] });
|
|
309
|
+
if (u) {
|
|
310
|
+
const { type: c, disabled: m, ...w } = a;
|
|
311
|
+
return /* @__PURE__ */ y.jsx(
|
|
312
|
+
"a",
|
|
313
|
+
{
|
|
314
|
+
className: p,
|
|
315
|
+
href: u,
|
|
316
|
+
...w,
|
|
317
|
+
"aria-disabled": d ? "true" : void 0,
|
|
318
|
+
onClick: d ? (b) => b.preventDefault() : w.onClick,
|
|
319
|
+
children: g
|
|
320
|
+
}
|
|
321
|
+
);
|
|
322
|
+
}
|
|
323
|
+
const { type: h = "button", ...l } = a;
|
|
324
|
+
return /* @__PURE__ */ y.jsx("button", { className: p, type: h, ...l, children: g });
|
|
309
325
|
}
|
|
310
326
|
const Do = "_checkboxWrapper_1vygn_1", jo = "_checkbox_1vygn_1", Lo = "_label_1vygn_44", Fo = "_score_1vygn_48", Bo = "_disabled_1vygn_55", Ie = {
|
|
311
327
|
checkboxWrapper: Do,
|
|
@@ -377,15 +393,14 @@ function Ll({
|
|
|
377
393
|
children: t,
|
|
378
394
|
className: n = "",
|
|
379
395
|
collapsible: r = !0,
|
|
380
|
-
collapsed: o = !1
|
|
381
|
-
headingLevel: s = 3
|
|
396
|
+
collapsed: o = !1
|
|
382
397
|
}) {
|
|
383
|
-
const [
|
|
398
|
+
const [s, i] = tr(() => !o), a = J.useId();
|
|
384
399
|
So(() => {
|
|
385
|
-
r &&
|
|
400
|
+
r && i(!o);
|
|
386
401
|
}, [o, r]);
|
|
387
|
-
const
|
|
388
|
-
r &&
|
|
402
|
+
const u = () => {
|
|
403
|
+
r && i((d) => !d);
|
|
389
404
|
};
|
|
390
405
|
return /* @__PURE__ */ y.jsxs(
|
|
391
406
|
"div",
|
|
@@ -397,17 +412,17 @@ function Ll({
|
|
|
397
412
|
{
|
|
398
413
|
type: "button",
|
|
399
414
|
className: De.header,
|
|
400
|
-
onClick:
|
|
401
|
-
"aria-label": `${e}: ${
|
|
402
|
-
"aria-expanded":
|
|
403
|
-
"aria-controls":
|
|
415
|
+
onClick: u,
|
|
416
|
+
"aria-label": `${e}: ${s ? "Collapse panel" : "Expand panel"}`,
|
|
417
|
+
"aria-expanded": s,
|
|
418
|
+
"aria-controls": a,
|
|
404
419
|
children: [
|
|
405
|
-
/* @__PURE__ */ y.jsx("div", { className: De.title,
|
|
406
|
-
/* @__PURE__ */ y.jsx("span", { "aria-hidden": "true", children:
|
|
420
|
+
/* @__PURE__ */ y.jsx("div", { className: De.title, children: e }),
|
|
421
|
+
/* @__PURE__ */ y.jsx("span", { "aria-hidden": "true", children: s ? /* @__PURE__ */ y.jsx(Yo, { color: "var(--lv5)", size: 14 }) : /* @__PURE__ */ y.jsx(qo, { color: "var(--lv5)", size: 14 }) })
|
|
407
422
|
]
|
|
408
423
|
}
|
|
409
|
-
) : /* @__PURE__ */ y.jsx("div", { className: De.header, children: /* @__PURE__ */ y.jsx("div", { className: De.title,
|
|
410
|
-
(!r ||
|
|
424
|
+
) : /* @__PURE__ */ y.jsx("div", { className: De.header, children: /* @__PURE__ */ y.jsx("div", { className: De.title, children: e }) })),
|
|
425
|
+
(!r || s) && /* @__PURE__ */ y.jsx("div", { id: a, className: De.body, role: "region", "aria-label": e || "Filter panel content", children: t })
|
|
411
426
|
]
|
|
412
427
|
}
|
|
413
428
|
);
|
|
@@ -591,9 +606,9 @@ var Rn;
|
|
|
591
606
|
function nr() {
|
|
592
607
|
return Rn || (Rn = 1, (function(e) {
|
|
593
608
|
var t = Ge && Ge.__spreadArray || function(C, R, P) {
|
|
594
|
-
if (P || arguments.length === 2) for (var I = 0,
|
|
595
|
-
(
|
|
596
|
-
return C.concat(
|
|
609
|
+
if (P || arguments.length === 2) for (var I = 0, M = R.length, k; I < M; I++)
|
|
610
|
+
(k || !(I in R)) && (k || (k = Array.prototype.slice.call(R, 0, I)), k[I] = R[I]);
|
|
611
|
+
return C.concat(k || Array.prototype.slice.call(R));
|
|
597
612
|
};
|
|
598
613
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.isIOS = e.useThumbOverlap = e.assertUnreachable = e.voidFn = e.getTrackBackground = e.replaceAt = e.schd = e.translate = e.getClosestThumbIndex = e.translateThumbs = e.getPaddingAndBorder = e.getMargin = e.checkInitialOverlap = e.checkValuesAgainstBoundaries = e.checkBoundaries = e.isVertical = e.relativeValue = e.normalizeValue = e.isStepDivisible = e.isTouchEvent = e.getStepDecimals = void 0;
|
|
599
614
|
var n = J, r = /* @__PURE__ */ rn(), o = function(C) {
|
|
@@ -606,13 +621,13 @@ function nr() {
|
|
|
606
621
|
}
|
|
607
622
|
e.isTouchEvent = s;
|
|
608
623
|
function i(C, R, P) {
|
|
609
|
-
var I = (R - C) / P,
|
|
610
|
-
return parseInt(
|
|
624
|
+
var I = (R - C) / P, M = 8, k = Number(I.toFixed(M));
|
|
625
|
+
return parseInt(k.toString(), 10) === k;
|
|
611
626
|
}
|
|
612
627
|
e.isStepDivisible = i;
|
|
613
|
-
function a(C, R, P, I,
|
|
628
|
+
function a(C, R, P, I, M, k, A) {
|
|
614
629
|
var L = 1e11;
|
|
615
|
-
if (C = Math.round(C * L) / L, !
|
|
630
|
+
if (C = Math.round(C * L) / L, !k) {
|
|
616
631
|
var H = A[R - 1], S = A[R + 1];
|
|
617
632
|
if (H && H > C)
|
|
618
633
|
return H;
|
|
@@ -623,7 +638,7 @@ function nr() {
|
|
|
623
638
|
return I;
|
|
624
639
|
if (C < P)
|
|
625
640
|
return P;
|
|
626
|
-
var B = Math.floor(C * L - P * L) % Math.floor(
|
|
641
|
+
var B = Math.floor(C * L - P * L) % Math.floor(M * L), W = Math.floor(C * L - Math.abs(B)), $ = B === 0 ? C : W / L, q = Math.abs(B / L) < M / 2 ? $ : $ + M, Z = (0, e.getStepDecimals)(M);
|
|
627
642
|
return parseFloat(q.toFixed(Z));
|
|
628
643
|
}
|
|
629
644
|
e.normalizeValue = a;
|
|
@@ -677,17 +692,17 @@ function nr() {
|
|
|
677
692
|
e.getPaddingAndBorder = l;
|
|
678
693
|
function c(C, R, P) {
|
|
679
694
|
var I = P ? -1 : 1;
|
|
680
|
-
C.forEach(function(
|
|
681
|
-
return w(
|
|
695
|
+
C.forEach(function(M, k) {
|
|
696
|
+
return w(M, I * R[k].x, R[k].y);
|
|
682
697
|
});
|
|
683
698
|
}
|
|
684
699
|
e.translateThumbs = c;
|
|
685
700
|
function m(C, R, P, I) {
|
|
686
|
-
for (var
|
|
701
|
+
for (var M = 0, k = F(C[0], R, P, I), A = 1; A < C.length; A++) {
|
|
687
702
|
var L = F(C[A], R, P, I);
|
|
688
|
-
L <
|
|
703
|
+
L < k && (k = L, M = A);
|
|
689
704
|
}
|
|
690
|
-
return
|
|
705
|
+
return M;
|
|
691
706
|
}
|
|
692
707
|
e.getClosestThumbIndex = m;
|
|
693
708
|
function w(C, R, P) {
|
|
@@ -696,9 +711,9 @@ function nr() {
|
|
|
696
711
|
e.translate = w;
|
|
697
712
|
var b = function(C) {
|
|
698
713
|
var R = [], P = null, I = function() {
|
|
699
|
-
for (var
|
|
700
|
-
k
|
|
701
|
-
R =
|
|
714
|
+
for (var M = [], k = 0; k < arguments.length; k++)
|
|
715
|
+
M[k] = arguments[k];
|
|
716
|
+
R = M, !P && (P = requestAnimationFrame(function() {
|
|
702
717
|
P = null, C.apply(void 0, R);
|
|
703
718
|
}));
|
|
704
719
|
};
|
|
@@ -711,12 +726,12 @@ function nr() {
|
|
|
711
726
|
}
|
|
712
727
|
e.replaceAt = x;
|
|
713
728
|
function _(C) {
|
|
714
|
-
var R = C.values, P = C.colors, I = C.min,
|
|
729
|
+
var R = C.values, P = C.colors, I = C.min, M = C.max, k = C.direction, A = k === void 0 ? r.Direction.Right : k, L = C.rtl, H = L === void 0 ? !1 : L;
|
|
715
730
|
H && A === r.Direction.Right ? A = r.Direction.Left : H && r.Direction.Left && (A = r.Direction.Right);
|
|
716
731
|
var S = R.slice(0).sort(function(W, $) {
|
|
717
732
|
return W - $;
|
|
718
733
|
}).map(function(W) {
|
|
719
|
-
return (W - I) / (
|
|
734
|
+
return (W - I) / (M - I) * 100;
|
|
720
735
|
}), B = S.reduce(function(W, $, q) {
|
|
721
736
|
return "".concat(W, ", ").concat(P[q], " ").concat($, "%, ").concat(P[q + 1], " ").concat($, "%");
|
|
722
737
|
}, "");
|
|
@@ -730,42 +745,42 @@ function nr() {
|
|
|
730
745
|
throw new Error("Didn't expect to get here");
|
|
731
746
|
}
|
|
732
747
|
e.assertUnreachable = O;
|
|
733
|
-
var T = function(C, R, P, I,
|
|
734
|
-
|
|
748
|
+
var T = function(C, R, P, I, M) {
|
|
749
|
+
M === void 0 && (M = function(A) {
|
|
735
750
|
return A;
|
|
736
751
|
});
|
|
737
|
-
var
|
|
752
|
+
var k = Math.ceil(t([C], Array.from(C.children), !0).reduce(function(A, L) {
|
|
738
753
|
var H = Math.ceil(L.getBoundingClientRect().width);
|
|
739
754
|
if (L.innerText && L.innerText.includes(P) && L.childElementCount === 0) {
|
|
740
755
|
var S = L.cloneNode(!0);
|
|
741
|
-
S.innerHTML =
|
|
756
|
+
S.innerHTML = M(R.toFixed(I)), S.style.visibility = "hidden", document.body.appendChild(S), H = Math.ceil(S.getBoundingClientRect().width), document.body.removeChild(S);
|
|
742
757
|
}
|
|
743
758
|
return H > A ? H : A;
|
|
744
759
|
}, C.getBoundingClientRect().width));
|
|
745
|
-
return
|
|
746
|
-
}, j = function(C, R, P, I,
|
|
760
|
+
return k;
|
|
761
|
+
}, j = function(C, R, P, I, M, k, A) {
|
|
747
762
|
A === void 0 && (A = function(S) {
|
|
748
763
|
return S;
|
|
749
764
|
});
|
|
750
765
|
var L = [], H = function(S) {
|
|
751
|
-
var B = T(P[S], I[S],
|
|
766
|
+
var B = T(P[S], I[S], M, k, A), W = R[S].x;
|
|
752
767
|
R.forEach(function($, q) {
|
|
753
|
-
var Z = $.x, D = T(P[q], I[q],
|
|
768
|
+
var Z = $.x, D = T(P[q], I[q], M, k, A);
|
|
754
769
|
S !== q && (W >= Z && W <= Z + D || W + B >= Z && W + B <= Z + D) && (L.includes(q) || (L.push(S), L.push(q), L = t(t([], L, !0), [S, q], !1), H(q)));
|
|
755
770
|
});
|
|
756
771
|
};
|
|
757
772
|
return H(C), Array.from(new Set(L.sort()));
|
|
758
|
-
}, N = function(C, R, P, I,
|
|
759
|
-
I === void 0 && (I = 0.1),
|
|
773
|
+
}, N = function(C, R, P, I, M, k) {
|
|
774
|
+
I === void 0 && (I = 0.1), M === void 0 && (M = " - "), k === void 0 && (k = function(q) {
|
|
760
775
|
return q;
|
|
761
776
|
});
|
|
762
|
-
var A = (0, e.getStepDecimals)(I), L = (0, n.useState)({}), H = L[0], S = L[1], B = (0, n.useState)(
|
|
777
|
+
var A = (0, e.getStepDecimals)(I), L = (0, n.useState)({}), H = L[0], S = L[1], B = (0, n.useState)(k(R[P].toFixed(A))), W = B[0], $ = B[1];
|
|
763
778
|
return (0, n.useEffect)(function() {
|
|
764
779
|
if (C) {
|
|
765
780
|
var q = C.getThumbs();
|
|
766
781
|
if (q.length < 1)
|
|
767
782
|
return;
|
|
768
|
-
var Z = {}, D = C.getOffsets(), U = j(P, D, q, R,
|
|
783
|
+
var Z = {}, D = C.getOffsets(), U = j(P, D, q, R, M, A, k), G = k(R[P].toFixed(A));
|
|
769
784
|
if (U.length) {
|
|
770
785
|
var z = U.reduce(function(ce, xe, Se, it) {
|
|
771
786
|
return ce.length ? t(t([], ce, !0), [D[it[Se]].x], !1) : [D[it[Se]].x];
|
|
@@ -776,7 +791,7 @@ function nr() {
|
|
|
776
791
|
Y.push(R[ce].toFixed(A));
|
|
777
792
|
}), G = Array.from(new Set(Y.sort(function(ce, xe) {
|
|
778
793
|
return parseFloat(ce) - parseFloat(xe);
|
|
779
|
-
}))).map(
|
|
794
|
+
}))).map(k).join(M);
|
|
780
795
|
var K = Math.min.apply(Math, z), te = Math.max.apply(Math, z), ae = q[U[z.indexOf(te)]].getBoundingClientRect().width;
|
|
781
796
|
Z.left = "".concat(Math.abs(K - (te + ae)) / 2, "px"), Z.transform = "translate(-50%, 0)";
|
|
782
797
|
} else
|
|
@@ -788,8 +803,8 @@ function nr() {
|
|
|
788
803
|
};
|
|
789
804
|
e.useThumbOverlap = N;
|
|
790
805
|
function F(C, R, P, I) {
|
|
791
|
-
var
|
|
792
|
-
return d(I) ? Math.abs(P - (A + H / 2)) : Math.abs(R - (
|
|
806
|
+
var M = C.getBoundingClientRect(), k = M.left, A = M.top, L = M.width, H = M.height;
|
|
807
|
+
return d(I) ? Math.abs(P - (A + H / 2)) : Math.abs(R - (k + L / 2));
|
|
793
808
|
}
|
|
794
809
|
var V = function() {
|
|
795
810
|
var C, R = ((C = navigator.userAgentData) === null || C === void 0 ? void 0 : C.platform) || navigator.platform;
|
|
@@ -995,28 +1010,28 @@ function Oi() {
|
|
|
995
1010
|
return null;
|
|
996
1011
|
var R = C.getBoundingClientRect(), P = (0, i.isVertical)(E) ? R.height : R.width;
|
|
997
1012
|
if (x[0] !== -1 && x[1] !== -1) {
|
|
998
|
-
var I = c - x[0],
|
|
1013
|
+
var I = c - x[0], M = m - x[1], k = 0;
|
|
999
1014
|
switch (E) {
|
|
1000
1015
|
case a.Direction.Right:
|
|
1001
1016
|
case a.Direction.Left:
|
|
1002
|
-
|
|
1017
|
+
k = I / P * (T - O);
|
|
1003
1018
|
break;
|
|
1004
1019
|
case a.Direction.Down:
|
|
1005
1020
|
case a.Direction.Up:
|
|
1006
|
-
|
|
1021
|
+
k = M / P * (T - O);
|
|
1007
1022
|
break;
|
|
1008
1023
|
default:
|
|
1009
1024
|
(0, i.assertUnreachable)(E);
|
|
1010
1025
|
}
|
|
1011
|
-
if (V && (
|
|
1026
|
+
if (V && (k *= -1), Math.abs(k) >= F / 2) {
|
|
1012
1027
|
for (var A = 0; A < l.thumbRefs.length; A++) {
|
|
1013
|
-
if (N[A] === T && Math.sign(
|
|
1028
|
+
if (N[A] === T && Math.sign(k) === 1 || N[A] === O && Math.sign(k) === -1)
|
|
1014
1029
|
return;
|
|
1015
|
-
var L = N[A] +
|
|
1016
|
-
L > T ?
|
|
1030
|
+
var L = N[A] + k;
|
|
1031
|
+
L > T ? k = T - N[A] : L < O && (k = O - N[A]);
|
|
1017
1032
|
}
|
|
1018
1033
|
for (var H = N.slice(0), A = 0; A < l.thumbRefs.length; A++)
|
|
1019
|
-
H = (0, i.replaceAt)(H, A, l.normalizeValue(N[A] +
|
|
1034
|
+
H = (0, i.replaceAt)(H, A, l.normalizeValue(N[A] + k, A));
|
|
1020
1035
|
l.setState({
|
|
1021
1036
|
draggedTrackPos: [c, m]
|
|
1022
1037
|
}), j(H);
|
|
@@ -1132,7 +1147,7 @@ function Oi() {
|
|
|
1132
1147
|
},
|
|
1133
1148
|
isDragged: this.state.draggedThumbIndex > -1,
|
|
1134
1149
|
disabled: N,
|
|
1135
|
-
children: o(o([], R.map(function(P, I,
|
|
1150
|
+
children: o(o([], R.map(function(P, I, M) {
|
|
1136
1151
|
return _({
|
|
1137
1152
|
props: {
|
|
1138
1153
|
style: h.props.direction === a.Direction.Left || h.props.direction === a.Direction.Right ? {
|
|
@@ -1150,16 +1165,16 @@ function Oi() {
|
|
|
1150
1165
|
index: I
|
|
1151
1166
|
});
|
|
1152
1167
|
}), !0), E.map(function(P, I) {
|
|
1153
|
-
var
|
|
1168
|
+
var M = h.state.draggedThumbIndex === I;
|
|
1154
1169
|
return b({
|
|
1155
1170
|
index: I,
|
|
1156
1171
|
value: P,
|
|
1157
|
-
isDragged:
|
|
1172
|
+
isDragged: M,
|
|
1158
1173
|
props: {
|
|
1159
1174
|
style: {
|
|
1160
1175
|
position: "absolute",
|
|
1161
1176
|
zIndex: C[I],
|
|
1162
|
-
cursor: N ? "inherit" :
|
|
1177
|
+
cursor: N ? "inherit" : M ? "grabbing" : "grab",
|
|
1163
1178
|
userSelect: "none",
|
|
1164
1179
|
touchAction: "none",
|
|
1165
1180
|
WebkitUserSelect: "none",
|
|
@@ -1438,9 +1453,9 @@ function Et(e, t = []) {
|
|
|
1438
1453
|
);
|
|
1439
1454
|
};
|
|
1440
1455
|
};
|
|
1441
|
-
return o.scopeName = e, [r,
|
|
1456
|
+
return o.scopeName = e, [r, ki(o, ...t)];
|
|
1442
1457
|
}
|
|
1443
|
-
function
|
|
1458
|
+
function ki(...e) {
|
|
1444
1459
|
const t = e[0];
|
|
1445
1460
|
if (e.length === 1) return t;
|
|
1446
1461
|
const n = () => {
|
|
@@ -1458,7 +1473,7 @@ function Mi(...e) {
|
|
|
1458
1473
|
};
|
|
1459
1474
|
return n.scopeName = t.scopeName, n;
|
|
1460
1475
|
}
|
|
1461
|
-
function
|
|
1476
|
+
function kn(e, t) {
|
|
1462
1477
|
if (typeof e == "function")
|
|
1463
1478
|
return e(t);
|
|
1464
1479
|
e != null && (e.current = t);
|
|
@@ -1467,14 +1482,14 @@ function rr(...e) {
|
|
|
1467
1482
|
return (t) => {
|
|
1468
1483
|
let n = !1;
|
|
1469
1484
|
const r = e.map((o) => {
|
|
1470
|
-
const s =
|
|
1485
|
+
const s = kn(o, t);
|
|
1471
1486
|
return !n && typeof s == "function" && (n = !0), s;
|
|
1472
1487
|
});
|
|
1473
1488
|
if (n)
|
|
1474
1489
|
return () => {
|
|
1475
1490
|
for (let o = 0; o < r.length; o++) {
|
|
1476
1491
|
const s = r[o];
|
|
1477
|
-
typeof s == "function" ? s() :
|
|
1492
|
+
typeof s == "function" ? s() : kn(e[o], null);
|
|
1478
1493
|
}
|
|
1479
1494
|
};
|
|
1480
1495
|
};
|
|
@@ -1484,7 +1499,7 @@ function ee(...e) {
|
|
|
1484
1499
|
}
|
|
1485
1500
|
// @__NO_SIDE_EFFECTS__
|
|
1486
1501
|
function et(e) {
|
|
1487
|
-
const t = /* @__PURE__ */
|
|
1502
|
+
const t = /* @__PURE__ */ Mi(e), n = f.forwardRef((r, o) => {
|
|
1488
1503
|
const { children: s, ...i } = r, a = f.Children.toArray(s), u = a.find(Ii);
|
|
1489
1504
|
if (u) {
|
|
1490
1505
|
const d = u.props.children, v = a.map((p) => p === u ? f.Children.count(d) > 1 ? f.Children.only(null) : f.isValidElement(d) ? d.props.children : null : p);
|
|
@@ -1495,7 +1510,7 @@ function et(e) {
|
|
|
1495
1510
|
return n.displayName = `${e}.Slot`, n;
|
|
1496
1511
|
}
|
|
1497
1512
|
// @__NO_SIDE_EFFECTS__
|
|
1498
|
-
function
|
|
1513
|
+
function Mi(e) {
|
|
1499
1514
|
const t = f.forwardRef((n, r) => {
|
|
1500
1515
|
const { children: o, ...s } = n;
|
|
1501
1516
|
if (f.isValidElement(o)) {
|
|
@@ -1617,7 +1632,7 @@ function $i(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
1617
1632
|
return t.addEventListener("keydown", r, { capture: !0 }), () => t.removeEventListener("keydown", r, { capture: !0 });
|
|
1618
1633
|
}, [n, t]);
|
|
1619
1634
|
}
|
|
1620
|
-
var Hi = "DismissableLayer", Yt = "dismissableLayer.update", Ui = "dismissableLayer.pointerDownOutside", zi = "dismissableLayer.focusOutside",
|
|
1635
|
+
var Hi = "DismissableLayer", Yt = "dismissableLayer.update", Ui = "dismissableLayer.pointerDownOutside", zi = "dismissableLayer.focusOutside", Mn, or = f.createContext({
|
|
1621
1636
|
layers: /* @__PURE__ */ new Set(),
|
|
1622
1637
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
1623
1638
|
branches: /* @__PURE__ */ new Set()
|
|
@@ -1642,8 +1657,8 @@ var Hi = "DismissableLayer", Yt = "dismissableLayer.update", Ui = "dismissableLa
|
|
|
1642
1657
|
b === d.layers.size - 1 && (r == null || r(T), !T.defaultPrevented && a && (T.preventDefault(), a()));
|
|
1643
1658
|
}, g), f.useEffect(() => {
|
|
1644
1659
|
if (v)
|
|
1645
|
-
return n && (d.layersWithOutsidePointerEventsDisabled.size === 0 && (
|
|
1646
|
-
n && d.layersWithOutsidePointerEventsDisabled.size === 1 && (g.body.style.pointerEvents =
|
|
1660
|
+
return n && (d.layersWithOutsidePointerEventsDisabled.size === 0 && (Mn = g.body.style.pointerEvents, g.body.style.pointerEvents = "none"), d.layersWithOutsidePointerEventsDisabled.add(v)), d.layers.add(v), Nn(), () => {
|
|
1661
|
+
n && d.layersWithOutsidePointerEventsDisabled.size === 1 && (g.body.style.pointerEvents = Mn);
|
|
1647
1662
|
};
|
|
1648
1663
|
}, [v, g, n, d]), f.useEffect(() => () => {
|
|
1649
1664
|
v && (d.layers.delete(v), d.layersWithOutsidePointerEventsDisabled.delete(v), Nn());
|
|
@@ -2168,17 +2183,17 @@ const gs = (e) => ({
|
|
|
2168
2183
|
}, h = ln(o), l = cn(h), c = await i.getDimensions(d), m = h === "y", w = m ? "top" : "left", b = m ? "bottom" : "right", x = m ? "clientHeight" : "clientWidth", _ = s.reference[l] + s.reference[h] - g[h] - s.floating[l], E = g[h] - s.reference[h], O = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(d));
|
|
2169
2184
|
let T = O ? O[x] : 0;
|
|
2170
2185
|
(!T || !await (i.isElement == null ? void 0 : i.isElement(O))) && (T = a.floating[x] || s.floating[l]);
|
|
2171
|
-
const j = _ / 2 - E / 2, N = T / 2 - c[l] / 2 - 1, F = Ee(p[w], N), V = Ee(p[b], N), C = F, R = T - c[l] - V, P = T / 2 - c[l] / 2 + j, I = qt(C, P, R),
|
|
2186
|
+
const j = _ / 2 - E / 2, N = T / 2 - c[l] / 2 - 1, F = Ee(p[w], N), V = Ee(p[b], N), C = F, R = T - c[l] - V, P = T / 2 - c[l] / 2 + j, I = qt(C, P, R), M = !u.arrow && Ue(o) != null && P !== I && s.reference[l] / 2 - (P < C ? F : V) - c[l] / 2 < 0, k = M ? P < C ? P - C : P - R : 0;
|
|
2172
2187
|
return {
|
|
2173
|
-
[h]: g[h] +
|
|
2188
|
+
[h]: g[h] + k,
|
|
2174
2189
|
data: {
|
|
2175
2190
|
[h]: I,
|
|
2176
|
-
centerOffset: P - I -
|
|
2177
|
-
...
|
|
2178
|
-
alignmentOffset:
|
|
2191
|
+
centerOffset: P - I - k,
|
|
2192
|
+
...M && {
|
|
2193
|
+
alignmentOffset: k
|
|
2179
2194
|
}
|
|
2180
2195
|
},
|
|
2181
|
-
reset:
|
|
2196
|
+
reset: M
|
|
2182
2197
|
};
|
|
2183
2198
|
}
|
|
2184
2199
|
}), bs = function(e) {
|
|
@@ -2231,12 +2246,12 @@ const gs = (e) => ({
|
|
|
2231
2246
|
placement: I
|
|
2232
2247
|
}
|
|
2233
2248
|
};
|
|
2234
|
-
let
|
|
2235
|
-
if (!
|
|
2249
|
+
let M = (C = F.filter((k) => k.overflows[0] <= 0).sort((k, A) => k.overflows[1] - A.overflows[1])[0]) == null ? void 0 : C.placement;
|
|
2250
|
+
if (!M)
|
|
2236
2251
|
switch (h) {
|
|
2237
2252
|
case "bestFit": {
|
|
2238
2253
|
var R;
|
|
2239
|
-
const
|
|
2254
|
+
const k = (R = F.filter((A) => {
|
|
2240
2255
|
if (O) {
|
|
2241
2256
|
const L = he(A.placement);
|
|
2242
2257
|
return L === b || // Create a bias to the `y` side axis due to horizontal
|
|
@@ -2245,17 +2260,17 @@ const gs = (e) => ({
|
|
|
2245
2260
|
}
|
|
2246
2261
|
return !0;
|
|
2247
2262
|
}).map((A) => [A.placement, A.overflows.filter((L) => L > 0).reduce((L, H) => L + H, 0)]).sort((A, L) => A[1] - L[1])[0]) == null ? void 0 : R[0];
|
|
2248
|
-
|
|
2263
|
+
k && (M = k);
|
|
2249
2264
|
break;
|
|
2250
2265
|
}
|
|
2251
2266
|
case "initialPlacement":
|
|
2252
|
-
|
|
2267
|
+
M = a;
|
|
2253
2268
|
break;
|
|
2254
2269
|
}
|
|
2255
|
-
if (o !==
|
|
2270
|
+
if (o !== M)
|
|
2256
2271
|
return {
|
|
2257
2272
|
reset: {
|
|
2258
|
-
placement:
|
|
2273
|
+
placement: M
|
|
2259
2274
|
}
|
|
2260
2275
|
};
|
|
2261
2276
|
}
|
|
@@ -2554,12 +2569,12 @@ function Tt(e) {
|
|
|
2554
2569
|
}
|
|
2555
2570
|
});
|
|
2556
2571
|
}
|
|
2557
|
-
const Os = ["transform", "translate", "scale", "rotate", "perspective"], As = ["transform", "translate", "scale", "rotate", "perspective", "filter"],
|
|
2572
|
+
const Os = ["transform", "translate", "scale", "rotate", "perspective"], As = ["transform", "translate", "scale", "rotate", "perspective", "filter"], ks = ["paint", "layout", "strict", "content"];
|
|
2558
2573
|
function un(e) {
|
|
2559
2574
|
const t = dn(), n = de(e) ? fe(e) : e;
|
|
2560
|
-
return Os.some((r) => n[r] ? n[r] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || As.some((r) => (n.willChange || "").includes(r)) ||
|
|
2575
|
+
return Os.some((r) => n[r] ? n[r] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || As.some((r) => (n.willChange || "").includes(r)) || ks.some((r) => (n.contain || "").includes(r));
|
|
2561
2576
|
}
|
|
2562
|
-
function
|
|
2577
|
+
function Ms(e) {
|
|
2563
2578
|
let t = Ce(e);
|
|
2564
2579
|
for (; ve(t) && !$e(t); ) {
|
|
2565
2580
|
if (un(t))
|
|
@@ -2657,7 +2672,7 @@ function pr(e) {
|
|
|
2657
2672
|
function Ds(e, t, n) {
|
|
2658
2673
|
return t === void 0 && (t = !1), !n || t && n !== se(e) ? !1 : t;
|
|
2659
2674
|
}
|
|
2660
|
-
function
|
|
2675
|
+
function ke(e, t, n, r) {
|
|
2661
2676
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
2662
2677
|
const o = e.getBoundingClientRect(), s = fn(e);
|
|
2663
2678
|
let i = me(1);
|
|
@@ -2681,7 +2696,7 @@ function Me(e, t, n, r) {
|
|
|
2681
2696
|
}
|
|
2682
2697
|
function Ot(e, t) {
|
|
2683
2698
|
const n = Pt(e).scrollLeft;
|
|
2684
|
-
return t ? t.left + n :
|
|
2699
|
+
return t ? t.left + n : ke(ge(e)).left + n;
|
|
2685
2700
|
}
|
|
2686
2701
|
function hr(e, t) {
|
|
2687
2702
|
const n = e.getBoundingClientRect(), r = n.left + t.scrollLeft - Ot(e, n), o = n.top + t.scrollTop;
|
|
@@ -2706,7 +2721,7 @@ function js(e) {
|
|
|
2706
2721
|
}, d = me(1);
|
|
2707
2722
|
const v = me(0), p = ve(r);
|
|
2708
2723
|
if ((p || !p && !s) && ((ze(r) !== "body" || rt(i)) && (u = Pt(r)), ve(r))) {
|
|
2709
|
-
const h =
|
|
2724
|
+
const h = ke(r);
|
|
2710
2725
|
d = Ve(r), v.x = h.x + r.clientLeft, v.y = h.y + r.clientTop;
|
|
2711
2726
|
}
|
|
2712
2727
|
const g = i && !p && !s ? hr(i, u) : me(0);
|
|
@@ -2754,7 +2769,7 @@ function Bs(e, t) {
|
|
|
2754
2769
|
}
|
|
2755
2770
|
const Vs = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
2756
2771
|
function Ws(e, t) {
|
|
2757
|
-
const n =
|
|
2772
|
+
const n = ke(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, s = ve(e) ? Ve(e) : me(1), i = e.clientWidth * s.x, a = e.clientHeight * s.y, u = o * s.x, d = r * s.y;
|
|
2758
2773
|
return {
|
|
2759
2774
|
width: i,
|
|
2760
2775
|
height: a,
|
|
@@ -2827,7 +2842,7 @@ function Us(e) {
|
|
|
2827
2842
|
};
|
|
2828
2843
|
}
|
|
2829
2844
|
function zs(e, t, n) {
|
|
2830
|
-
const r = ve(t), o = ge(t), s = n === "fixed", i =
|
|
2845
|
+
const r = ve(t), o = ge(t), s = n === "fixed", i = ke(e, !0, s, t);
|
|
2831
2846
|
let a = {
|
|
2832
2847
|
scrollLeft: 0,
|
|
2833
2848
|
scrollTop: 0
|
|
@@ -2838,7 +2853,7 @@ function zs(e, t, n) {
|
|
|
2838
2853
|
}
|
|
2839
2854
|
if (r || !r && !s)
|
|
2840
2855
|
if ((ze(t) !== "body" || rt(o)) && (a = Pt(t)), r) {
|
|
2841
|
-
const h =
|
|
2856
|
+
const h = ke(t, !0, s, t);
|
|
2842
2857
|
u.x = h.x + t.clientLeft, u.y = h.y + t.clientTop;
|
|
2843
2858
|
} else o && d();
|
|
2844
2859
|
s && !r && o && d();
|
|
@@ -2877,7 +2892,7 @@ function vr(e, t) {
|
|
|
2877
2892
|
let r = qn(e, t);
|
|
2878
2893
|
for (; r && Ts(r) && Vt(r); )
|
|
2879
2894
|
r = qn(r, t);
|
|
2880
|
-
return r && $e(r) && Vt(r) && !un(r) ? n : r ||
|
|
2895
|
+
return r && $e(r) && Vt(r) && !un(r) ? n : r || Ms(e) || n;
|
|
2881
2896
|
}
|
|
2882
2897
|
const Ys = async function(e) {
|
|
2883
2898
|
const t = this.getOffsetParent || vr, n = this.getDimensions, r = await n(e.floating);
|
|
@@ -2978,10 +2993,10 @@ function Zs(e, t, n, r) {
|
|
|
2978
2993
|
(x = h) == null || x.observe(t);
|
|
2979
2994
|
})), n();
|
|
2980
2995
|
}), d && !u && h.observe(d), h.observe(t));
|
|
2981
|
-
let l, c = u ?
|
|
2996
|
+
let l, c = u ? ke(e) : null;
|
|
2982
2997
|
u && m();
|
|
2983
2998
|
function m() {
|
|
2984
|
-
const w =
|
|
2999
|
+
const w = ke(e);
|
|
2985
3000
|
c && !gr(c, w) && n(), c = w, l = requestAnimationFrame(m);
|
|
2986
3001
|
}
|
|
2987
3002
|
return n(), () => {
|
|
@@ -3119,22 +3134,22 @@ function sa(e) {
|
|
|
3119
3134
|
floating: T,
|
|
3120
3135
|
setReference: b,
|
|
3121
3136
|
setFloating: x
|
|
3122
|
-
}), [b, x]),
|
|
3137
|
+
}), [b, x]), M = f.useMemo(() => ({
|
|
3123
3138
|
reference: _,
|
|
3124
3139
|
floating: E
|
|
3125
|
-
}), [_, E]),
|
|
3140
|
+
}), [_, E]), k = f.useMemo(() => {
|
|
3126
3141
|
const A = {
|
|
3127
3142
|
position: n,
|
|
3128
3143
|
left: 0,
|
|
3129
3144
|
top: 0
|
|
3130
3145
|
};
|
|
3131
|
-
if (!
|
|
3146
|
+
if (!M.floating)
|
|
3132
3147
|
return A;
|
|
3133
|
-
const L = Xn(
|
|
3148
|
+
const L = Xn(M.floating, v.x), H = Xn(M.floating, v.y);
|
|
3134
3149
|
return a ? {
|
|
3135
3150
|
...A,
|
|
3136
3151
|
transform: "translate(" + L + "px, " + H + "px)",
|
|
3137
|
-
...br(
|
|
3152
|
+
...br(M.floating) >= 1.5 && {
|
|
3138
3153
|
willChange: "transform"
|
|
3139
3154
|
}
|
|
3140
3155
|
} : {
|
|
@@ -3142,14 +3157,14 @@ function sa(e) {
|
|
|
3142
3157
|
left: L,
|
|
3143
3158
|
top: H
|
|
3144
3159
|
};
|
|
3145
|
-
}, [n, a,
|
|
3160
|
+
}, [n, a, M.floating, v.x, v.y]);
|
|
3146
3161
|
return f.useMemo(() => ({
|
|
3147
3162
|
...v,
|
|
3148
3163
|
update: R,
|
|
3149
3164
|
refs: I,
|
|
3150
|
-
elements:
|
|
3151
|
-
floatingStyles:
|
|
3152
|
-
}), [v, R, I,
|
|
3165
|
+
elements: M,
|
|
3166
|
+
floatingStyles: k
|
|
3167
|
+
}), [v, R, I, M, k]);
|
|
3153
3168
|
}
|
|
3154
3169
|
const aa = (e) => {
|
|
3155
3170
|
function t(n) {
|
|
@@ -3271,7 +3286,7 @@ var hn = "PopperContent", [ya, wa] = wr(hn), Cr = f.forwardRef(
|
|
|
3271
3286
|
boundary: V.filter(Sa),
|
|
3272
3287
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
3273
3288
|
altBoundary: C
|
|
3274
|
-
}, { refs: P, floatingStyles: I, placement:
|
|
3289
|
+
}, { refs: P, floatingStyles: I, placement: M, isPositioned: k, middlewareData: A } = sa({
|
|
3275
3290
|
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
3276
3291
|
strategy: "fixed",
|
|
3277
3292
|
placement: N,
|
|
@@ -3301,10 +3316,10 @@ var hn = "PopperContent", [ya, wa] = wr(hn), Cr = f.forwardRef(
|
|
|
3301
3316
|
_a({ arrowWidth: T, arrowHeight: j }),
|
|
3302
3317
|
g && pa({ strategy: "referenceHidden", ...R })
|
|
3303
3318
|
]
|
|
3304
|
-
}), [L, H] = Pr(
|
|
3319
|
+
}), [L, H] = Pr(M), S = Ae(l);
|
|
3305
3320
|
re(() => {
|
|
3306
|
-
|
|
3307
|
-
}, [
|
|
3321
|
+
k && (S == null || S());
|
|
3322
|
+
}, [k, S]);
|
|
3308
3323
|
const B = (D = A.arrow) == null ? void 0 : D.x, W = (U = A.arrow) == null ? void 0 : U.y, $ = ((G = A.arrow) == null ? void 0 : G.centerOffset) !== 0, [q, Z] = f.useState();
|
|
3309
3324
|
return re(() => {
|
|
3310
3325
|
w && Z(window.getComputedStyle(w).zIndex);
|
|
@@ -3315,7 +3330,7 @@ var hn = "PopperContent", [ya, wa] = wr(hn), Cr = f.forwardRef(
|
|
|
3315
3330
|
"data-radix-popper-content-wrapper": "",
|
|
3316
3331
|
style: {
|
|
3317
3332
|
...I,
|
|
3318
|
-
transform:
|
|
3333
|
+
transform: k ? I.transform : "translate(0, -200%)",
|
|
3319
3334
|
// keep off the page when measuring
|
|
3320
3335
|
minWidth: "max-content",
|
|
3321
3336
|
zIndex: q,
|
|
@@ -3352,7 +3367,7 @@ var hn = "PopperContent", [ya, wa] = wr(hn), Cr = f.forwardRef(
|
|
|
3352
3367
|
...c.style,
|
|
3353
3368
|
// if the PopperContent hasn't been placed yet (not all measurements done)
|
|
3354
3369
|
// we prevent animations so that users's animation don't kick in too early referring wrong sides
|
|
3355
|
-
animation:
|
|
3370
|
+
animation: k ? void 0 : "none"
|
|
3356
3371
|
}
|
|
3357
3372
|
}
|
|
3358
3373
|
)
|
|
@@ -3431,7 +3446,7 @@ function Pr(e) {
|
|
|
3431
3446
|
const [t, n = "center"] = e.split("-");
|
|
3432
3447
|
return [t, n];
|
|
3433
3448
|
}
|
|
3434
|
-
var Or = Sr, mn = Er, Ar = Cr,
|
|
3449
|
+
var Or = Sr, mn = Er, Ar = Cr, kr = Tr, Ea = "Portal", vn = f.forwardRef((e, t) => {
|
|
3435
3450
|
var a;
|
|
3436
3451
|
const { container: n, ...r } = e, [o, s] = f.useState(!1);
|
|
3437
3452
|
re(() => s(!0), []);
|
|
@@ -3492,7 +3507,7 @@ function Pa(e) {
|
|
|
3492
3507
|
const t = f.useRef({ value: e, previous: e });
|
|
3493
3508
|
return f.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
|
|
3494
3509
|
}
|
|
3495
|
-
var
|
|
3510
|
+
var Mr = Object.freeze({
|
|
3496
3511
|
// See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
|
|
3497
3512
|
position: "absolute",
|
|
3498
3513
|
border: 0,
|
|
@@ -3510,19 +3525,19 @@ var kr = Object.freeze({
|
|
|
3510
3525
|
{
|
|
3511
3526
|
...e,
|
|
3512
3527
|
ref: t,
|
|
3513
|
-
style: { ...
|
|
3528
|
+
style: { ...Mr, ...e.style }
|
|
3514
3529
|
}
|
|
3515
3530
|
)
|
|
3516
3531
|
);
|
|
3517
3532
|
Aa.displayName = Oa;
|
|
3518
|
-
var
|
|
3533
|
+
var ka = function(e) {
|
|
3519
3534
|
if (typeof document > "u")
|
|
3520
3535
|
return null;
|
|
3521
3536
|
var t = Array.isArray(e) ? e[0] : e;
|
|
3522
3537
|
return t.ownerDocument.body;
|
|
3523
3538
|
}, Le = /* @__PURE__ */ new WeakMap(), ut = /* @__PURE__ */ new WeakMap(), dt = {}, $t = 0, Nr = function(e) {
|
|
3524
3539
|
return e && (e.host || Nr(e.parentNode));
|
|
3525
|
-
},
|
|
3540
|
+
}, Ma = function(e, t) {
|
|
3526
3541
|
return t.map(function(n) {
|
|
3527
3542
|
if (e.contains(n))
|
|
3528
3543
|
return n;
|
|
@@ -3532,7 +3547,7 @@ var Ma = function(e) {
|
|
|
3532
3547
|
return !!n;
|
|
3533
3548
|
});
|
|
3534
3549
|
}, Na = function(e, t, n, r) {
|
|
3535
|
-
var o =
|
|
3550
|
+
var o = Ma(t, Array.isArray(e) ? e : [e]);
|
|
3536
3551
|
dt[n] || (dt[n] = /* @__PURE__ */ new WeakMap());
|
|
3537
3552
|
var s = dt[n], i = [], a = /* @__PURE__ */ new Set(), u = new Set(o), d = function(p) {
|
|
3538
3553
|
!p || a.has(p) || (a.add(p), d(p.parentNode));
|
|
@@ -3559,7 +3574,7 @@ var Ma = function(e) {
|
|
|
3559
3574
|
};
|
|
3560
3575
|
}, Ir = function(e, t, n) {
|
|
3561
3576
|
n === void 0 && (n = "data-aria-hidden");
|
|
3562
|
-
var r = Array.from(Array.isArray(e) ? e : [e]), o =
|
|
3577
|
+
var r = Array.from(Array.isArray(e) ? e : [e]), o = ka(e);
|
|
3563
3578
|
return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))), Na(r, o, n, "aria-hidden")) : function() {
|
|
3564
3579
|
return null;
|
|
3565
3580
|
};
|
|
@@ -3707,7 +3722,7 @@ function Ha(e, t) {
|
|
|
3707
3722
|
return e.useMedium(t), jr;
|
|
3708
3723
|
}
|
|
3709
3724
|
var Lr = $a(), Ut = function() {
|
|
3710
|
-
},
|
|
3725
|
+
}, kt = f.forwardRef(function(e, t) {
|
|
3711
3726
|
var n = f.useRef(null), r = f.useState({
|
|
3712
3727
|
onScrollCapture: Ut,
|
|
3713
3728
|
onWheelCapture: Ut,
|
|
@@ -3720,12 +3735,12 @@ var Lr = $a(), Ut = function() {
|
|
|
3720
3735
|
i ? f.cloneElement(f.Children.only(a), pe(pe({}, T), { ref: O })) : f.createElement(b, pe({}, T, { className: u, ref: O }), a)
|
|
3721
3736
|
);
|
|
3722
3737
|
});
|
|
3723
|
-
|
|
3738
|
+
kt.defaultProps = {
|
|
3724
3739
|
enabled: !0,
|
|
3725
3740
|
removeScrollBar: !0,
|
|
3726
3741
|
inert: !1
|
|
3727
3742
|
};
|
|
3728
|
-
|
|
3743
|
+
kt.classNames = {
|
|
3729
3744
|
fullWidth: gt,
|
|
3730
3745
|
zeroRight: vt
|
|
3731
3746
|
};
|
|
@@ -4035,13 +4050,13 @@ function hc(e) {
|
|
|
4035
4050
|
}
|
|
4036
4051
|
const mc = Ha(Lr, pc);
|
|
4037
4052
|
var gn = f.forwardRef(function(e, t) {
|
|
4038
|
-
return f.createElement(
|
|
4053
|
+
return f.createElement(kt, pe({}, e, { ref: t, sideCar: mc }));
|
|
4039
4054
|
});
|
|
4040
|
-
gn.classNames =
|
|
4041
|
-
var vc = [" ", "Enter", "ArrowUp", "ArrowDown"], gc = [" ", "Enter"],
|
|
4055
|
+
gn.classNames = kt.classNames;
|
|
4056
|
+
var vc = [" ", "Enter", "ArrowUp", "ArrowDown"], gc = [" ", "Enter"], Me = "Select", [Mt, Nt, bc] = Li(Me), [Ye] = Et(Me, [
|
|
4042
4057
|
bc,
|
|
4043
4058
|
At
|
|
4044
|
-
]), It = At(), [yc, Re] = Ye(
|
|
4059
|
+
]), It = At(), [yc, Re] = Ye(Me), [wc, xc] = Ye(Me), $r = (e) => {
|
|
4045
4060
|
const {
|
|
4046
4061
|
__scopeSelect: t,
|
|
4047
4062
|
children: n,
|
|
@@ -4061,13 +4076,13 @@ var vc = [" ", "Enter", "ArrowUp", "ArrowDown"], gc = [" ", "Enter"], ke = "Sele
|
|
|
4061
4076
|
prop: r,
|
|
4062
4077
|
defaultProp: o ?? !1,
|
|
4063
4078
|
onChange: s,
|
|
4064
|
-
caller:
|
|
4079
|
+
caller: Me
|
|
4065
4080
|
}), [N, F] = Zt({
|
|
4066
4081
|
prop: i,
|
|
4067
4082
|
defaultProp: a,
|
|
4068
4083
|
onChange: u,
|
|
4069
|
-
caller:
|
|
4070
|
-
}), V = f.useRef(null), C = m ? l || !!m.closest("form") : !0, [R, P] = f.useState(/* @__PURE__ */ new Set()), I = Array.from(R).map((
|
|
4084
|
+
caller: Me
|
|
4085
|
+
}), V = f.useRef(null), C = m ? l || !!m.closest("form") : !0, [R, P] = f.useState(/* @__PURE__ */ new Set()), I = Array.from(R).map((M) => M.props.value).join(";");
|
|
4071
4086
|
return /* @__PURE__ */ y.jsx(Or, { ...c, children: /* @__PURE__ */ y.jsxs(
|
|
4072
4087
|
yc,
|
|
4073
4088
|
{
|
|
@@ -4088,17 +4103,17 @@ var vc = [" ", "Enter", "ArrowUp", "ArrowDown"], gc = [" ", "Enter"], ke = "Sele
|
|
|
4088
4103
|
triggerPointerDownPosRef: V,
|
|
4089
4104
|
disabled: g,
|
|
4090
4105
|
children: [
|
|
4091
|
-
/* @__PURE__ */ y.jsx(
|
|
4106
|
+
/* @__PURE__ */ y.jsx(Mt.Provider, { scope: t, children: /* @__PURE__ */ y.jsx(
|
|
4092
4107
|
wc,
|
|
4093
4108
|
{
|
|
4094
4109
|
scope: e.__scopeSelect,
|
|
4095
|
-
onNativeOptionAdd: f.useCallback((
|
|
4096
|
-
P((
|
|
4110
|
+
onNativeOptionAdd: f.useCallback((M) => {
|
|
4111
|
+
P((k) => new Set(k).add(M));
|
|
4097
4112
|
}, []),
|
|
4098
|
-
onNativeOptionRemove: f.useCallback((
|
|
4099
|
-
P((
|
|
4100
|
-
const A = new Set(
|
|
4101
|
-
return A.delete(
|
|
4113
|
+
onNativeOptionRemove: f.useCallback((M) => {
|
|
4114
|
+
P((k) => {
|
|
4115
|
+
const A = new Set(k);
|
|
4116
|
+
return A.delete(M), A;
|
|
4102
4117
|
});
|
|
4103
4118
|
}, []),
|
|
4104
4119
|
children: n
|
|
@@ -4113,7 +4128,7 @@ var vc = [" ", "Enter", "ArrowUp", "ArrowDown"], gc = [" ", "Enter"], ke = "Sele
|
|
|
4113
4128
|
name: v,
|
|
4114
4129
|
autoComplete: p,
|
|
4115
4130
|
value: N,
|
|
4116
|
-
onChange: (
|
|
4131
|
+
onChange: (M) => F(M.target.value),
|
|
4117
4132
|
disabled: g,
|
|
4118
4133
|
form: l,
|
|
4119
4134
|
children: [
|
|
@@ -4127,7 +4142,7 @@ var vc = [" ", "Enter", "ArrowUp", "ArrowDown"], gc = [" ", "Enter"], ke = "Sele
|
|
|
4127
4142
|
}
|
|
4128
4143
|
) });
|
|
4129
4144
|
};
|
|
4130
|
-
$r.displayName =
|
|
4145
|
+
$r.displayName = Me;
|
|
4131
4146
|
var Hr = "SelectTrigger", Ur = f.forwardRef(
|
|
4132
4147
|
(e, t) => {
|
|
4133
4148
|
const { __scopeSelect: n, disabled: r = !1, ...o } = e, s = It(n), i = Re(Hr, n), a = i.disabled || r, u = ee(t, i.onTriggerChange), d = Nt(n), v = f.useRef("touch"), [p, g, h] = lo((c) => {
|
|
@@ -4206,7 +4221,7 @@ var Ne = "SelectContent", Xr = f.forwardRef(
|
|
|
4206
4221
|
}, []), !n.open) {
|
|
4207
4222
|
const s = r;
|
|
4208
4223
|
return s ? _t.createPortal(
|
|
4209
|
-
/* @__PURE__ */ y.jsx(Zr, { scope: e.__scopeSelect, children: /* @__PURE__ */ y.jsx(
|
|
4224
|
+
/* @__PURE__ */ y.jsx(Zr, { scope: e.__scopeSelect, children: /* @__PURE__ */ y.jsx(Mt.Slot, { scope: e.__scopeSelect, children: /* @__PURE__ */ y.jsx("div", { children: e.children }) }) }),
|
|
4210
4225
|
s
|
|
4211
4226
|
) : null;
|
|
4212
4227
|
}
|
|
@@ -4242,20 +4257,20 @@ var ue = 10, [Zr, Te] = Ye(Ne), Ec = "SelectContentImpl", Cc = /* @__PURE__ */ e
|
|
|
4242
4257
|
f.useEffect(() => {
|
|
4243
4258
|
if (x) return Ir(x);
|
|
4244
4259
|
}, [x]), sr();
|
|
4245
|
-
const
|
|
4260
|
+
const M = f.useCallback(
|
|
4246
4261
|
(D) => {
|
|
4247
4262
|
const [U, ...G] = C().map((K) => K.ref.current), [z] = G.slice(-1), Y = document.activeElement;
|
|
4248
4263
|
for (const K of D)
|
|
4249
4264
|
if (K === Y || (K == null || K.scrollIntoView({ block: "nearest" }), K === U && E && (E.scrollTop = 0), K === z && E && (E.scrollTop = E.scrollHeight), K == null || K.focus(), document.activeElement !== Y)) return;
|
|
4250
4265
|
},
|
|
4251
4266
|
[C, E]
|
|
4252
|
-
),
|
|
4253
|
-
() =>
|
|
4254
|
-
[
|
|
4267
|
+
), k = f.useCallback(
|
|
4268
|
+
() => M([j, x]),
|
|
4269
|
+
[M, j, x]
|
|
4255
4270
|
);
|
|
4256
4271
|
f.useEffect(() => {
|
|
4257
|
-
R &&
|
|
4258
|
-
}, [R,
|
|
4272
|
+
R && k();
|
|
4273
|
+
}, [R, k]);
|
|
4259
4274
|
const { onOpenChange: A, triggerPointerDownPosRef: L } = b;
|
|
4260
4275
|
f.useEffect(() => {
|
|
4261
4276
|
if (x) {
|
|
@@ -4317,7 +4332,7 @@ var ue = 10, [Zr, Te] = Ye(Ne), Ec = "SelectContentImpl", Cc = /* @__PURE__ */ e
|
|
|
4317
4332
|
selectedItem: j,
|
|
4318
4333
|
onItemLeave: W,
|
|
4319
4334
|
itemTextRefCallback: $,
|
|
4320
|
-
focusSelectedItem:
|
|
4335
|
+
focusSelectedItem: k,
|
|
4321
4336
|
selectedItemText: F,
|
|
4322
4337
|
position: r,
|
|
4323
4338
|
isPositioned: R,
|
|
@@ -4371,7 +4386,7 @@ var ue = 10, [Zr, Te] = Ye(Ne), Ec = "SelectContentImpl", Cc = /* @__PURE__ */ e
|
|
|
4371
4386
|
const Y = D.target, K = z.indexOf(Y);
|
|
4372
4387
|
z = z.slice(K + 1);
|
|
4373
4388
|
}
|
|
4374
|
-
setTimeout(() =>
|
|
4389
|
+
setTimeout(() => M(z)), D.preventDefault();
|
|
4375
4390
|
}
|
|
4376
4391
|
})
|
|
4377
4392
|
}
|
|
@@ -4407,14 +4422,14 @@ var Rc = "SelectItemAlignedPosition", Jr = f.forwardRef((e, t) => {
|
|
|
4407
4422
|
]);
|
|
4408
4423
|
a.style.minWidth = ae + "px", a.style.right = Se + "px";
|
|
4409
4424
|
}
|
|
4410
|
-
const V = g(), C = window.innerHeight - ue * 2, R = c.scrollHeight, P = window.getComputedStyle(d), I = parseInt(P.borderTopWidth, 10),
|
|
4425
|
+
const V = g(), C = window.innerHeight - ue * 2, R = c.scrollHeight, P = window.getComputedStyle(d), I = parseInt(P.borderTopWidth, 10), M = parseInt(P.paddingTop, 10), k = parseInt(P.borderBottomWidth, 10), A = parseInt(P.paddingBottom, 10), L = I + M + R + A + k, H = Math.min(m.offsetHeight * 5, L), S = window.getComputedStyle(c), B = parseInt(S.paddingTop, 10), W = parseInt(S.paddingBottom, 10), $ = T.top + T.height / 2 - ue, q = C - $, Z = m.offsetHeight / 2, D = m.offsetTop + Z, U = I + M + D, G = L - U;
|
|
4411
4426
|
if (U <= $) {
|
|
4412
4427
|
const Y = V.length > 0 && m === V[V.length - 1].ref.current;
|
|
4413
4428
|
a.style.bottom = "0px";
|
|
4414
4429
|
const K = d.clientHeight - c.offsetTop - c.offsetHeight, te = Math.max(
|
|
4415
4430
|
q,
|
|
4416
4431
|
Z + // viewport might have padding bottom, include it to avoid a scrollable viewport
|
|
4417
|
-
(Y ? W : 0) + K +
|
|
4432
|
+
(Y ? W : 0) + K + k
|
|
4418
4433
|
), ae = U + te;
|
|
4419
4434
|
a.style.height = ae + "px";
|
|
4420
4435
|
} else {
|
|
@@ -4532,7 +4547,7 @@ var [Pc, bn] = Ye(Ne, {}), Qt = "SelectViewport", Qr = f.forwardRef(
|
|
|
4532
4547
|
nonce: r
|
|
4533
4548
|
}
|
|
4534
4549
|
),
|
|
4535
|
-
/* @__PURE__ */ y.jsx(
|
|
4550
|
+
/* @__PURE__ */ y.jsx(Mt.Slot, { scope: n, children: /* @__PURE__ */ y.jsx(
|
|
4536
4551
|
Q.div,
|
|
4537
4552
|
{
|
|
4538
4553
|
"data-radix-select-viewport": "",
|
|
@@ -4572,20 +4587,20 @@ var [Pc, bn] = Ye(Ne, {}), Qt = "SelectViewport", Qr = f.forwardRef(
|
|
|
4572
4587
|
}
|
|
4573
4588
|
);
|
|
4574
4589
|
Qr.displayName = Qt;
|
|
4575
|
-
var eo = "SelectGroup", [Oc, Ac] = Ye(eo),
|
|
4590
|
+
var eo = "SelectGroup", [Oc, Ac] = Ye(eo), kc = f.forwardRef(
|
|
4576
4591
|
(e, t) => {
|
|
4577
4592
|
const { __scopeSelect: n, ...r } = e, o = Ct();
|
|
4578
4593
|
return /* @__PURE__ */ y.jsx(Oc, { scope: n, id: o, children: /* @__PURE__ */ y.jsx(Q.div, { role: "group", "aria-labelledby": o, ...r, ref: t }) });
|
|
4579
4594
|
}
|
|
4580
4595
|
);
|
|
4581
|
-
|
|
4582
|
-
var to = "SelectLabel",
|
|
4596
|
+
kc.displayName = eo;
|
|
4597
|
+
var to = "SelectLabel", Mc = f.forwardRef(
|
|
4583
4598
|
(e, t) => {
|
|
4584
4599
|
const { __scopeSelect: n, ...r } = e, o = Ac(to, n);
|
|
4585
4600
|
return /* @__PURE__ */ y.jsx(Q.div, { id: o.id, ...r, ref: t });
|
|
4586
4601
|
}
|
|
4587
4602
|
);
|
|
4588
|
-
|
|
4603
|
+
Mc.displayName = to;
|
|
4589
4604
|
var St = "SelectItem", [Nc, no] = Ye(St), ro = f.forwardRef(
|
|
4590
4605
|
(e, t) => {
|
|
4591
4606
|
const {
|
|
@@ -4619,7 +4634,7 @@ var St = "SelectItem", [Nc, no] = Ye(St), ro = f.forwardRef(
|
|
|
4619
4634
|
p((x) => x || ((b == null ? void 0 : b.textContent) ?? "").trim());
|
|
4620
4635
|
}, []),
|
|
4621
4636
|
children: /* @__PURE__ */ y.jsx(
|
|
4622
|
-
|
|
4637
|
+
Mt.ItemSlot,
|
|
4623
4638
|
{
|
|
4624
4639
|
scope: n,
|
|
4625
4640
|
value: r,
|
|
@@ -4783,7 +4798,7 @@ Fc.displayName = Lc;
|
|
|
4783
4798
|
var nn = "SelectArrow", Bc = f.forwardRef(
|
|
4784
4799
|
(e, t) => {
|
|
4785
4800
|
const { __scopeSelect: n, ...r } = e, o = It(n), s = Re(nn, n), i = Te(nn, n);
|
|
4786
|
-
return s.open && i.position === "popper" ? /* @__PURE__ */ y.jsx(
|
|
4801
|
+
return s.open && i.position === "popper" ? /* @__PURE__ */ y.jsx(kr, { ...o, ...r, ref: t }) : null;
|
|
4787
4802
|
}
|
|
4788
4803
|
);
|
|
4789
4804
|
Bc.displayName = nn;
|
|
@@ -4805,7 +4820,7 @@ var Vc = "SelectBubbleInput", ao = f.forwardRef(
|
|
|
4805
4820
|
Q.select,
|
|
4806
4821
|
{
|
|
4807
4822
|
...n,
|
|
4808
|
-
style: { ...
|
|
4823
|
+
style: { ...Mr, ...n.style },
|
|
4809
4824
|
ref: s,
|
|
4810
4825
|
defaultValue: t
|
|
4811
4826
|
}
|
|
@@ -5169,7 +5184,7 @@ hl.displayName = wo;
|
|
|
5169
5184
|
var ml = "PopoverArrow", vl = f.forwardRef(
|
|
5170
5185
|
(e, t) => {
|
|
5171
5186
|
const { __scopePopover: n, ...r } = e, o = ot(n);
|
|
5172
|
-
return /* @__PURE__ */ y.jsx(
|
|
5187
|
+
return /* @__PURE__ */ y.jsx(kr, { ...o, ...r, ref: t });
|
|
5173
5188
|
}
|
|
5174
5189
|
);
|
|
5175
5190
|
vl.displayName = ml;
|
|
@@ -5204,7 +5219,7 @@ const xl = "_content_1qahr_1", Sl = {
|
|
|
5204
5219
|
children: t
|
|
5205
5220
|
}
|
|
5206
5221
|
) })
|
|
5207
|
-
] }), _l = "_table_1b0iq_1", El = "_caption_1b0iq_8", Cl = "_headerRow_1b0iq_25", Rl = "_dataRow_1b0iq_33", Tl = "_cellInner_1b0iq_41", Pl = "_cellLabel_1b0iq_47", Ol = "_cellContent_1b0iq_52", Al = "_value_1b0iq_58",
|
|
5222
|
+
] }), _l = "_table_1b0iq_1", El = "_caption_1b0iq_8", Cl = "_headerRow_1b0iq_25", Rl = "_dataRow_1b0iq_33", Tl = "_cellInner_1b0iq_41", Pl = "_cellLabel_1b0iq_47", Ol = "_cellContent_1b0iq_52", Al = "_value_1b0iq_58", kl = "_icon_1b0iq_64", be = {
|
|
5208
5223
|
table: _l,
|
|
5209
5224
|
caption: El,
|
|
5210
5225
|
headerRow: Cl,
|
|
@@ -5213,7 +5228,7 @@ const xl = "_content_1qahr_1", Sl = {
|
|
|
5213
5228
|
cellLabel: Pl,
|
|
5214
5229
|
cellContent: Ol,
|
|
5215
5230
|
value: Al,
|
|
5216
|
-
icon:
|
|
5231
|
+
icon: kl
|
|
5217
5232
|
};
|
|
5218
5233
|
function zl({ children: e, caption: t, "aria-label": n }) {
|
|
5219
5234
|
return process.env.NODE_ENV !== "production" && !t && !n && console.warn("Table: Component should have either a caption or aria-label for accessibility."), /* @__PURE__ */ y.jsxs("table", { className: be.table, "aria-label": n, children: [
|