@purpurds/date-picker 7.10.1 → 7.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/LICENSE.txt +4 -4
- package/dist/date-picker.cjs.js +12 -12
- package/dist/date-picker.cjs.js.map +1 -1
- package/dist/date-picker.d.ts +12 -0
- package/dist/date-picker.d.ts.map +1 -1
- package/dist/date-picker.es.js +761 -757
- package/dist/date-picker.es.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +8 -8
- package/src/date-picker.test.tsx +13 -0
- package/src/date-picker.tsx +26 -5
package/dist/date-picker.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as te, jsx as w, Fragment as Qe } from "react/jsx-runtime";
|
|
2
2
|
import * as c from "react";
|
|
3
|
-
import
|
|
3
|
+
import C, { useLayoutEffect as Dn, createContext as is, forwardRef as De, useState as Fe, useEffect as Cn, useMemo as Mr, useCallback as Oe, useRef as vt, useContext as ss, useId as us } from "react";
|
|
4
4
|
import * as ko from "react-dom";
|
|
5
5
|
import Zl from "react-dom";
|
|
6
6
|
function cr() {
|
|
@@ -417,7 +417,7 @@ function na(e) {
|
|
|
417
417
|
delete n.dataset.tabindex, r ? n.setAttribute("tabindex", r) : n.removeAttribute("tabindex");
|
|
418
418
|
});
|
|
419
419
|
}
|
|
420
|
-
const ao = Math.min, jt = Math.max, tr = Math.round, In = Math.floor,
|
|
420
|
+
const ao = Math.min, jt = Math.max, tr = Math.round, In = Math.floor, bt = (e) => ({
|
|
421
421
|
x: e,
|
|
422
422
|
y: e
|
|
423
423
|
}), Oc = {
|
|
@@ -581,17 +581,17 @@ const qc = async (e, t, n) => {
|
|
|
581
581
|
}), {
|
|
582
582
|
x: d,
|
|
583
583
|
y: f
|
|
584
|
-
} = ra(l, r, u), h = r, m = {},
|
|
584
|
+
} = ra(l, r, u), h = r, m = {}, g = 0;
|
|
585
585
|
for (let p = 0; p < s.length; p++) {
|
|
586
586
|
const {
|
|
587
|
-
name:
|
|
588
|
-
fn:
|
|
587
|
+
name: v,
|
|
588
|
+
fn: $
|
|
589
589
|
} = s[p], {
|
|
590
590
|
x: y,
|
|
591
591
|
y: b,
|
|
592
592
|
data: _,
|
|
593
|
-
reset:
|
|
594
|
-
} = await
|
|
593
|
+
reset: x
|
|
594
|
+
} = await $({
|
|
595
595
|
x: d,
|
|
596
596
|
y: f,
|
|
597
597
|
initialPlacement: r,
|
|
@@ -607,15 +607,15 @@ const qc = async (e, t, n) => {
|
|
|
607
607
|
});
|
|
608
608
|
d = y ?? d, f = b ?? f, m = {
|
|
609
609
|
...m,
|
|
610
|
-
[
|
|
611
|
-
...m[
|
|
610
|
+
[v]: {
|
|
611
|
+
...m[v],
|
|
612
612
|
..._
|
|
613
613
|
}
|
|
614
|
-
},
|
|
614
|
+
}, x && g <= 50 && (g++, typeof x == "object" && (x.placement && (h = x.placement), x.rects && (l = x.rects === !0 ? await i.getElementRects({
|
|
615
615
|
reference: e,
|
|
616
616
|
floating: t,
|
|
617
617
|
strategy: a
|
|
618
|
-
}) :
|
|
618
|
+
}) : x.rects), {
|
|
619
619
|
x: d,
|
|
620
620
|
y: f
|
|
621
621
|
} = ra(l, h, u)), p = -1);
|
|
@@ -644,8 +644,8 @@ async function Bc(e, t) {
|
|
|
644
644
|
elementContext: f = "floating",
|
|
645
645
|
altBoundary: h = !1,
|
|
646
646
|
padding: m = 0
|
|
647
|
-
} = Eo(t, e),
|
|
648
|
-
element: (n = await (o.isElement == null ? void 0 : o.isElement(
|
|
647
|
+
} = Eo(t, e), g = Fc(m), v = s[h ? f === "floating" ? "reference" : "floating" : f], $ = rr(await o.getClippingRect({
|
|
648
|
+
element: (n = await (o.isElement == null ? void 0 : o.isElement(v))) == null || n ? v : v.contextElement || await (o.getDocumentElement == null ? void 0 : o.getDocumentElement(s.floating)),
|
|
649
649
|
boundary: l,
|
|
650
650
|
rootBoundary: d,
|
|
651
651
|
strategy: u
|
|
@@ -660,17 +660,17 @@ async function Bc(e, t) {
|
|
|
660
660
|
} : {
|
|
661
661
|
x: 1,
|
|
662
662
|
y: 1
|
|
663
|
-
},
|
|
663
|
+
}, x = rr(o.convertOffsetParentRelativeRectToViewportRelativeRect ? await o.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
664
664
|
elements: s,
|
|
665
665
|
rect: y,
|
|
666
666
|
offsetParent: b,
|
|
667
667
|
strategy: u
|
|
668
668
|
}) : y);
|
|
669
669
|
return {
|
|
670
|
-
top: (
|
|
671
|
-
bottom: (
|
|
672
|
-
left: (
|
|
673
|
-
right: (
|
|
670
|
+
top: ($.top - x.top + g.top) / _.y,
|
|
671
|
+
bottom: (x.bottom - $.bottom + g.bottom) / _.y,
|
|
672
|
+
left: ($.left - x.left + g.left) / _.x,
|
|
673
|
+
right: (x.right - $.right + g.right) / _.x
|
|
674
674
|
};
|
|
675
675
|
}
|
|
676
676
|
const Yc = function(e) {
|
|
@@ -691,50 +691,50 @@ const Yc = function(e) {
|
|
|
691
691
|
crossAxis: f = !0,
|
|
692
692
|
fallbackPlacements: h,
|
|
693
693
|
fallbackStrategy: m = "bestFit",
|
|
694
|
-
fallbackAxisSideDirection:
|
|
694
|
+
fallbackAxisSideDirection: g = "none",
|
|
695
695
|
flipAlignment: p = !0,
|
|
696
|
-
...
|
|
696
|
+
...v
|
|
697
697
|
} = Eo(e, t);
|
|
698
698
|
if ((n = o.arrow) != null && n.alignmentOffset)
|
|
699
699
|
return {};
|
|
700
|
-
const
|
|
701
|
-
!h && S &&
|
|
702
|
-
const M = [s,
|
|
703
|
-
let
|
|
704
|
-
if (d &&
|
|
700
|
+
const $ = Zt(a), y = $n(s), b = Zt(s) === s, _ = await (u.isRTL == null ? void 0 : u.isRTL(l.floating)), x = h || (b || !p ? [nr(s)] : Lc(s)), S = g !== "none";
|
|
701
|
+
!h && S && x.push(...Wc(s, p, g, _));
|
|
702
|
+
const M = [s, ...x], N = await Bc(t, v), E = [];
|
|
703
|
+
let k = ((r = o.flip) == null ? void 0 : r.overflows) || [];
|
|
704
|
+
if (d && E.push(N[$]), f) {
|
|
705
705
|
const H = Rc(a, i, _);
|
|
706
|
-
|
|
706
|
+
E.push(N[H[0]], N[H[1]]);
|
|
707
707
|
}
|
|
708
|
-
if (
|
|
708
|
+
if (k = [...k, {
|
|
709
709
|
placement: a,
|
|
710
|
-
overflows:
|
|
711
|
-
}], !
|
|
710
|
+
overflows: E
|
|
711
|
+
}], !E.every((H) => H <= 0)) {
|
|
712
712
|
var L, J;
|
|
713
|
-
const H = (((L = o.flip) == null ? void 0 : L.index) || 0) + 1,
|
|
714
|
-
if (
|
|
713
|
+
const H = (((L = o.flip) == null ? void 0 : L.index) || 0) + 1, D = M[H];
|
|
714
|
+
if (D)
|
|
715
715
|
return {
|
|
716
716
|
data: {
|
|
717
717
|
index: H,
|
|
718
|
-
overflows:
|
|
718
|
+
overflows: k
|
|
719
719
|
},
|
|
720
720
|
reset: {
|
|
721
|
-
placement:
|
|
721
|
+
placement: D
|
|
722
722
|
}
|
|
723
723
|
};
|
|
724
|
-
let j = (J =
|
|
724
|
+
let j = (J = k.filter((G) => G.overflows[0] <= 0).sort((G, R) => G.overflows[1] - R.overflows[1])[0]) == null ? void 0 : J.placement;
|
|
725
725
|
if (!j)
|
|
726
726
|
switch (m) {
|
|
727
727
|
case "bestFit": {
|
|
728
728
|
var Y;
|
|
729
|
-
const G = (Y =
|
|
729
|
+
const G = (Y = k.filter((R) => {
|
|
730
730
|
if (S) {
|
|
731
|
-
const
|
|
732
|
-
return
|
|
731
|
+
const T = $n(R.placement);
|
|
732
|
+
return T === y || // Create a bias to the `y` side axis due to horizontal
|
|
733
733
|
// reading directions favoring greater width.
|
|
734
|
-
|
|
734
|
+
T === "y";
|
|
735
735
|
}
|
|
736
736
|
return !0;
|
|
737
|
-
}).map((R) => [R.placement, R.overflows.filter((
|
|
737
|
+
}).map((R) => [R.placement, R.overflows.filter((T) => T > 0).reduce((T, W) => T + W, 0)]).sort((R, T) => R[1] - T[1])[0]) == null ? void 0 : Y[0];
|
|
738
738
|
G && (j = G);
|
|
739
739
|
break;
|
|
740
740
|
}
|
|
@@ -762,7 +762,7 @@ async function Hc(e, t) {
|
|
|
762
762
|
let {
|
|
763
763
|
mainAxis: h,
|
|
764
764
|
crossAxis: m,
|
|
765
|
-
alignmentAxis:
|
|
765
|
+
alignmentAxis: g
|
|
766
766
|
} = typeof f == "number" ? {
|
|
767
767
|
mainAxis: f,
|
|
768
768
|
crossAxis: 0,
|
|
@@ -773,7 +773,7 @@ async function Hc(e, t) {
|
|
|
773
773
|
alignmentAxis: null,
|
|
774
774
|
...f
|
|
775
775
|
};
|
|
776
|
-
return s && typeof
|
|
776
|
+
return s && typeof g == "number" && (m = s === "end" ? g * -1 : g), u ? {
|
|
777
777
|
x: m * d,
|
|
778
778
|
y: h * l
|
|
779
779
|
} : {
|
|
@@ -853,13 +853,13 @@ function Do(e) {
|
|
|
853
853
|
return n.transform !== "none" || n.perspective !== "none" || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((r) => (n.willChange || "").includes(r)) || ["paint", "layout", "strict", "content"].some((r) => (n.contain || "").includes(r));
|
|
854
854
|
}
|
|
855
855
|
function Xc(e) {
|
|
856
|
-
let t =
|
|
856
|
+
let t = yt(e);
|
|
857
857
|
for (; Je(t) && !Kt(t); ) {
|
|
858
858
|
if (Do(t))
|
|
859
859
|
return t;
|
|
860
860
|
if (hr(t))
|
|
861
861
|
return null;
|
|
862
|
-
t =
|
|
862
|
+
t = yt(t);
|
|
863
863
|
}
|
|
864
864
|
return null;
|
|
865
865
|
}
|
|
@@ -881,7 +881,7 @@ function mr(e) {
|
|
|
881
881
|
scrollTop: e.scrollY
|
|
882
882
|
};
|
|
883
883
|
}
|
|
884
|
-
function
|
|
884
|
+
function yt(e) {
|
|
885
885
|
if (tn(e) === "html")
|
|
886
886
|
return e;
|
|
887
887
|
const t = (
|
|
@@ -894,18 +894,18 @@ function bt(e) {
|
|
|
894
894
|
return oa(t) ? t.host : t;
|
|
895
895
|
}
|
|
896
896
|
function Ms(e) {
|
|
897
|
-
const t =
|
|
897
|
+
const t = yt(e);
|
|
898
898
|
return Kt(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Je(t) && Tn(t) ? t : Ms(t);
|
|
899
899
|
}
|
|
900
|
-
function
|
|
900
|
+
function wt(e, t, n) {
|
|
901
901
|
var r;
|
|
902
902
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
903
903
|
const a = Ms(e), o = a === ((r = e.ownerDocument) == null ? void 0 : r.body), i = Ee(a);
|
|
904
904
|
if (o) {
|
|
905
905
|
const s = so(i);
|
|
906
|
-
return t.concat(i, i.visualViewport || [], Tn(a) ? a : [], s && n ?
|
|
906
|
+
return t.concat(i, i.visualViewport || [], Tn(a) ? a : [], s && n ? wt(s) : []);
|
|
907
907
|
}
|
|
908
|
-
return t.concat(a,
|
|
908
|
+
return t.concat(a, wt(a, [], n));
|
|
909
909
|
}
|
|
910
910
|
function so(e) {
|
|
911
911
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
@@ -926,7 +926,7 @@ function No(e) {
|
|
|
926
926
|
function zt(e) {
|
|
927
927
|
const t = No(e);
|
|
928
928
|
if (!Je(t))
|
|
929
|
-
return
|
|
929
|
+
return bt(1);
|
|
930
930
|
const n = t.getBoundingClientRect(), {
|
|
931
931
|
width: r,
|
|
932
932
|
height: a,
|
|
@@ -938,7 +938,7 @@ function zt(e) {
|
|
|
938
938
|
y: s
|
|
939
939
|
};
|
|
940
940
|
}
|
|
941
|
-
const Vc = /* @__PURE__ */
|
|
941
|
+
const Vc = /* @__PURE__ */ bt(0);
|
|
942
942
|
function Es(e) {
|
|
943
943
|
const t = Ee(e);
|
|
944
944
|
return !Co() || !t.visualViewport ? Vc : {
|
|
@@ -952,16 +952,16 @@ function Gc(e, t, n) {
|
|
|
952
952
|
function Nt(e, t, n, r) {
|
|
953
953
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
954
954
|
const a = e.getBoundingClientRect(), o = No(e);
|
|
955
|
-
let i =
|
|
955
|
+
let i = bt(1);
|
|
956
956
|
t && (r ? Be(r) && (i = zt(r)) : i = zt(e));
|
|
957
|
-
const s = Gc(o, n, r) ? Es(o) :
|
|
957
|
+
const s = Gc(o, n, r) ? Es(o) : bt(0);
|
|
958
958
|
let u = (a.left + s.x) / i.x, l = (a.top + s.y) / i.y, d = a.width / i.x, f = a.height / i.y;
|
|
959
959
|
if (o) {
|
|
960
960
|
const h = Ee(o), m = r && Be(r) ? Ee(r) : r;
|
|
961
|
-
let
|
|
962
|
-
for (; p && r && m !==
|
|
963
|
-
const
|
|
964
|
-
u *=
|
|
961
|
+
let g = h, p = so(g);
|
|
962
|
+
for (; p && r && m !== g; ) {
|
|
963
|
+
const v = zt(p), $ = p.getBoundingClientRect(), y = Ye(p), b = $.left + (p.clientLeft + parseFloat(y.paddingLeft)) * v.x, _ = $.top + (p.clientTop + parseFloat(y.paddingTop)) * v.y;
|
|
964
|
+
u *= v.x, l *= v.y, d *= v.x, f *= v.y, u += b, l += _, g = Ee(p), p = so(g);
|
|
965
965
|
}
|
|
966
966
|
}
|
|
967
967
|
return rr({
|
|
@@ -984,8 +984,8 @@ function Uc(e) {
|
|
|
984
984
|
let u = {
|
|
985
985
|
scrollLeft: 0,
|
|
986
986
|
scrollTop: 0
|
|
987
|
-
}, l =
|
|
988
|
-
const d =
|
|
987
|
+
}, l = bt(1);
|
|
988
|
+
const d = bt(0), f = Je(r);
|
|
989
989
|
if ((f || !f && !o) && ((tn(r) !== "body" || Tn(i)) && (u = mr(r)), Je(r))) {
|
|
990
990
|
const h = Nt(r);
|
|
991
991
|
l = zt(r), d.x = h.x + r.clientLeft, d.y = h.y + r.clientTop;
|
|
@@ -1030,7 +1030,7 @@ function Qc(e, t) {
|
|
|
1030
1030
|
};
|
|
1031
1031
|
}
|
|
1032
1032
|
function Jc(e, t) {
|
|
1033
|
-
const n = Nt(e, !0, t === "fixed"), r = n.top + e.clientTop, a = n.left + e.clientLeft, o = Je(e) ? zt(e) :
|
|
1033
|
+
const n = Nt(e, !0, t === "fixed"), r = n.top + e.clientTop, a = n.left + e.clientLeft, o = Je(e) ? zt(e) : bt(1), i = e.clientWidth * o.x, s = e.clientHeight * o.y, u = a * o.x, l = r * o.y;
|
|
1034
1034
|
return {
|
|
1035
1035
|
width: i,
|
|
1036
1036
|
height: s,
|
|
@@ -1057,19 +1057,19 @@ function aa(e, t, n) {
|
|
|
1057
1057
|
return rr(r);
|
|
1058
1058
|
}
|
|
1059
1059
|
function Cs(e, t) {
|
|
1060
|
-
const n =
|
|
1060
|
+
const n = yt(e);
|
|
1061
1061
|
return n === t || !Be(n) || Kt(n) ? !1 : Ye(n).position === "fixed" || Cs(n, t);
|
|
1062
1062
|
}
|
|
1063
1063
|
function ed(e, t) {
|
|
1064
1064
|
const n = t.get(e);
|
|
1065
1065
|
if (n)
|
|
1066
1066
|
return n;
|
|
1067
|
-
let r =
|
|
1067
|
+
let r = wt(e, [], !1).filter((s) => Be(s) && tn(s) !== "body"), a = null;
|
|
1068
1068
|
const o = Ye(e).position === "fixed";
|
|
1069
|
-
let i = o ?
|
|
1069
|
+
let i = o ? yt(e) : e;
|
|
1070
1070
|
for (; Be(i) && !Kt(i); ) {
|
|
1071
1071
|
const s = Ye(i), u = Do(i);
|
|
1072
|
-
!u && s.position === "fixed" && (a = null), (o ? !u && !a : !u && s.position === "static" && !!a && ["absolute", "fixed"].includes(a.position) || Tn(i) && !u && Cs(e, i)) ? r = r.filter((d) => d !== i) : a = s, i =
|
|
1072
|
+
!u && s.position === "fixed" && (a = null), (o ? !u && !a : !u && s.position === "static" && !!a && ["absolute", "fixed"].includes(a.position) || Tn(i) && !u && Cs(e, i)) ? r = r.filter((d) => d !== i) : a = s, i = yt(i);
|
|
1073
1073
|
}
|
|
1074
1074
|
return t.set(e, r), r;
|
|
1075
1075
|
}
|
|
@@ -1107,7 +1107,7 @@ function rd(e, t, n) {
|
|
|
1107
1107
|
scrollLeft: 0,
|
|
1108
1108
|
scrollTop: 0
|
|
1109
1109
|
};
|
|
1110
|
-
const u =
|
|
1110
|
+
const u = bt(0);
|
|
1111
1111
|
if (r || !r && !o)
|
|
1112
1112
|
if ((tn(t) !== "body" || Tn(a)) && (s = mr(t)), r) {
|
|
1113
1113
|
const f = Nt(t, !0, o, t);
|
|
@@ -1132,11 +1132,11 @@ function Ns(e, t) {
|
|
|
1132
1132
|
if (hr(e))
|
|
1133
1133
|
return n;
|
|
1134
1134
|
if (!Je(e)) {
|
|
1135
|
-
let a =
|
|
1135
|
+
let a = yt(e);
|
|
1136
1136
|
for (; a && !Kt(a); ) {
|
|
1137
1137
|
if (Be(a) && !Nr(a))
|
|
1138
1138
|
return a;
|
|
1139
|
-
a =
|
|
1139
|
+
a = yt(a);
|
|
1140
1140
|
}
|
|
1141
1141
|
return n;
|
|
1142
1142
|
}
|
|
@@ -1189,13 +1189,13 @@ function sd(e, t) {
|
|
|
1189
1189
|
} = e.getBoundingClientRect();
|
|
1190
1190
|
if (s || t(), !f || !h)
|
|
1191
1191
|
return;
|
|
1192
|
-
const m = In(d),
|
|
1193
|
-
rootMargin: -m + "px " + -
|
|
1192
|
+
const m = In(d), g = In(a.clientWidth - (l + f)), p = In(a.clientHeight - (d + h)), v = In(l), y = {
|
|
1193
|
+
rootMargin: -m + "px " + -g + "px " + -p + "px " + -v + "px",
|
|
1194
1194
|
threshold: jt(0, ao(1, u)) || 1
|
|
1195
1195
|
};
|
|
1196
1196
|
let b = !0;
|
|
1197
|
-
function _(
|
|
1198
|
-
const S =
|
|
1197
|
+
function _(x) {
|
|
1198
|
+
const S = x[0].intersectionRatio;
|
|
1199
1199
|
if (S !== u) {
|
|
1200
1200
|
if (!b)
|
|
1201
1201
|
return i();
|
|
@@ -1226,32 +1226,32 @@ function ud(e, t, n, r) {
|
|
|
1226
1226
|
elementResize: i = typeof ResizeObserver == "function",
|
|
1227
1227
|
layoutShift: s = typeof IntersectionObserver == "function",
|
|
1228
1228
|
animationFrame: u = !1
|
|
1229
|
-
} = r, l = No(e), d = a || o ? [...l ?
|
|
1230
|
-
d.forEach((
|
|
1231
|
-
a &&
|
|
1229
|
+
} = r, l = No(e), d = a || o ? [...l ? wt(l) : [], ...wt(t)] : [];
|
|
1230
|
+
d.forEach(($) => {
|
|
1231
|
+
a && $.addEventListener("scroll", n, {
|
|
1232
1232
|
passive: !0
|
|
1233
|
-
}), o &&
|
|
1233
|
+
}), o && $.addEventListener("resize", n);
|
|
1234
1234
|
});
|
|
1235
1235
|
const f = l && s ? sd(l, n) : null;
|
|
1236
1236
|
let h = -1, m = null;
|
|
1237
|
-
i && (m = new ResizeObserver((
|
|
1238
|
-
let [y] =
|
|
1237
|
+
i && (m = new ResizeObserver(($) => {
|
|
1238
|
+
let [y] = $;
|
|
1239
1239
|
y && y.target === l && m && (m.unobserve(t), cancelAnimationFrame(h), h = requestAnimationFrame(() => {
|
|
1240
1240
|
var b;
|
|
1241
1241
|
(b = m) == null || b.observe(t);
|
|
1242
1242
|
})), n();
|
|
1243
1243
|
}), l && !u && m.observe(l), m.observe(t));
|
|
1244
|
-
let
|
|
1245
|
-
u &&
|
|
1246
|
-
function
|
|
1247
|
-
const
|
|
1248
|
-
p && (x
|
|
1244
|
+
let g, p = u ? Nt(e) : null;
|
|
1245
|
+
u && v();
|
|
1246
|
+
function v() {
|
|
1247
|
+
const $ = Nt(e);
|
|
1248
|
+
p && ($.x !== p.x || $.y !== p.y || $.width !== p.width || $.height !== p.height) && n(), p = $, g = requestAnimationFrame(v);
|
|
1249
1249
|
}
|
|
1250
1250
|
return n(), () => {
|
|
1251
|
-
var
|
|
1251
|
+
var $;
|
|
1252
1252
|
d.forEach((y) => {
|
|
1253
1253
|
a && y.removeEventListener("scroll", n), o && y.removeEventListener("resize", n);
|
|
1254
|
-
}), f == null || f(), (
|
|
1254
|
+
}), f == null || f(), ($ = m) == null || $.disconnect(), m = null, u && cancelAnimationFrame(g);
|
|
1255
1255
|
};
|
|
1256
1256
|
}
|
|
1257
1257
|
const ld = jc, cd = Yc, dd = (e, t, n) => {
|
|
@@ -1335,11 +1335,11 @@ function hd(e) {
|
|
|
1335
1335
|
isPositioned: !1
|
|
1336
1336
|
}), [h, m] = c.useState(r);
|
|
1337
1337
|
or(h, r) || m(r);
|
|
1338
|
-
const [
|
|
1338
|
+
const [g, p] = c.useState(null), [v, $] = c.useState(null), y = c.useCallback((R) => {
|
|
1339
1339
|
R !== S.current && (S.current = R, p(R));
|
|
1340
1340
|
}, []), b = c.useCallback((R) => {
|
|
1341
|
-
R !== M.current && (M.current = R,
|
|
1342
|
-
}, []), _ = o ||
|
|
1341
|
+
R !== M.current && (M.current = R, $(R));
|
|
1342
|
+
}, []), _ = o || g, x = i || v, S = c.useRef(null), M = c.useRef(null), N = c.useRef(d), E = u != null, k = Or(u), L = Or(a), J = Or(l), Y = c.useCallback(() => {
|
|
1343
1343
|
if (!S.current || !M.current)
|
|
1344
1344
|
return;
|
|
1345
1345
|
const R = {
|
|
@@ -1347,22 +1347,22 @@ function hd(e) {
|
|
|
1347
1347
|
strategy: n,
|
|
1348
1348
|
middleware: h
|
|
1349
1349
|
};
|
|
1350
|
-
L.current && (R.platform = L.current), dd(S.current, M.current, R).then((
|
|
1350
|
+
L.current && (R.platform = L.current), dd(S.current, M.current, R).then((T) => {
|
|
1351
1351
|
const W = {
|
|
1352
|
-
...
|
|
1352
|
+
...T,
|
|
1353
1353
|
// The floating element's position may be recomputed while it's closed
|
|
1354
1354
|
// but still mounted (such as when transitioning out). To ensure
|
|
1355
1355
|
// `isPositioned` will be `false` initially on the next open, avoid
|
|
1356
1356
|
// setting it to `true` when `open === false` (must be specified).
|
|
1357
1357
|
isPositioned: J.current !== !1
|
|
1358
1358
|
};
|
|
1359
|
-
H.current && !or(
|
|
1359
|
+
H.current && !or(N.current, W) && (N.current = W, ko.flushSync(() => {
|
|
1360
1360
|
f(W);
|
|
1361
1361
|
}));
|
|
1362
1362
|
});
|
|
1363
1363
|
}, [h, t, n, L, J]);
|
|
1364
1364
|
Un(() => {
|
|
1365
|
-
l === !1 &&
|
|
1365
|
+
l === !1 && N.current.isPositioned && (N.current.isPositioned = !1, f((R) => ({
|
|
1366
1366
|
...R,
|
|
1367
1367
|
isPositioned: !1
|
|
1368
1368
|
})));
|
|
@@ -1371,21 +1371,21 @@ function hd(e) {
|
|
|
1371
1371
|
Un(() => (H.current = !0, () => {
|
|
1372
1372
|
H.current = !1;
|
|
1373
1373
|
}), []), Un(() => {
|
|
1374
|
-
if (_ && (S.current = _),
|
|
1375
|
-
if (
|
|
1376
|
-
return
|
|
1374
|
+
if (_ && (S.current = _), x && (M.current = x), _ && x) {
|
|
1375
|
+
if (k.current)
|
|
1376
|
+
return k.current(_, x, Y);
|
|
1377
1377
|
Y();
|
|
1378
1378
|
}
|
|
1379
|
-
}, [_,
|
|
1380
|
-
const
|
|
1379
|
+
}, [_, x, Y, k, E]);
|
|
1380
|
+
const D = c.useMemo(() => ({
|
|
1381
1381
|
reference: S,
|
|
1382
1382
|
floating: M,
|
|
1383
1383
|
setReference: y,
|
|
1384
1384
|
setFloating: b
|
|
1385
1385
|
}), [y, b]), j = c.useMemo(() => ({
|
|
1386
1386
|
reference: _,
|
|
1387
|
-
floating:
|
|
1388
|
-
}), [_,
|
|
1387
|
+
floating: x
|
|
1388
|
+
}), [_, x]), G = c.useMemo(() => {
|
|
1389
1389
|
const R = {
|
|
1390
1390
|
position: n,
|
|
1391
1391
|
left: 0,
|
|
@@ -1393,26 +1393,26 @@ function hd(e) {
|
|
|
1393
1393
|
};
|
|
1394
1394
|
if (!j.floating)
|
|
1395
1395
|
return R;
|
|
1396
|
-
const
|
|
1396
|
+
const T = sa(j.floating, d.x), W = sa(j.floating, d.y);
|
|
1397
1397
|
return s ? {
|
|
1398
1398
|
...R,
|
|
1399
|
-
transform: "translate(" +
|
|
1399
|
+
transform: "translate(" + T + "px, " + W + "px)",
|
|
1400
1400
|
...Os(j.floating) >= 1.5 && {
|
|
1401
1401
|
willChange: "transform"
|
|
1402
1402
|
}
|
|
1403
1403
|
} : {
|
|
1404
1404
|
position: n,
|
|
1405
|
-
left:
|
|
1405
|
+
left: T,
|
|
1406
1406
|
top: W
|
|
1407
1407
|
};
|
|
1408
1408
|
}, [n, s, j.floating, d.x, d.y]);
|
|
1409
1409
|
return c.useMemo(() => ({
|
|
1410
1410
|
...d,
|
|
1411
1411
|
update: Y,
|
|
1412
|
-
refs:
|
|
1412
|
+
refs: D,
|
|
1413
1413
|
elements: j,
|
|
1414
1414
|
floatingStyles: G
|
|
1415
|
-
}), [d, Y,
|
|
1415
|
+
}), [d, Y, D, j, G]);
|
|
1416
1416
|
}
|
|
1417
1417
|
const md = (e, t) => ({
|
|
1418
1418
|
...ld(e),
|
|
@@ -1516,20 +1516,20 @@ function Od(e, t, n, r) {
|
|
|
1516
1516
|
!m || s.has(m) || (s.add(m), m.parentNode && f(m.parentNode));
|
|
1517
1517
|
}
|
|
1518
1518
|
function h(m) {
|
|
1519
|
-
!m || u.has(m) || [].forEach.call(m.children, (
|
|
1520
|
-
if (dr(
|
|
1521
|
-
if (s.has(
|
|
1522
|
-
h(
|
|
1519
|
+
!m || u.has(m) || [].forEach.call(m.children, (g) => {
|
|
1520
|
+
if (dr(g) !== "script")
|
|
1521
|
+
if (s.has(g))
|
|
1522
|
+
h(g);
|
|
1523
1523
|
else {
|
|
1524
|
-
const p = o ?
|
|
1525
|
-
|
|
1524
|
+
const p = o ? g.getAttribute(o) : null, v = p !== null && p !== "false", $ = pa(o), y = ($.get(g) || 0) + 1, b = (d.get(g) || 0) + 1;
|
|
1525
|
+
$.set(g, y), d.set(g, b), l.push(g), y === 1 && v && Fn.add(g), b === 1 && g.setAttribute(a, ""), !v && o && g.setAttribute(o, o === "inert" ? "" : "true");
|
|
1526
1526
|
}
|
|
1527
1527
|
});
|
|
1528
1528
|
}
|
|
1529
1529
|
return Tr++, () => {
|
|
1530
1530
|
l.forEach((m) => {
|
|
1531
|
-
const
|
|
1532
|
-
|
|
1531
|
+
const g = pa(o), v = (g.get(m) || 0) - 1, $ = (d.get(m) || 0) - 1;
|
|
1532
|
+
g.set(m, v), d.set(m, $), v || (!Fn.has(m) && o && m.removeAttribute(o), Fn.delete(m)), $ || m.removeAttribute(a);
|
|
1533
1533
|
}), Tr--, Tr || (Xt.inert = /* @__PURE__ */ new WeakMap(), Xt["aria-hidden"] = /* @__PURE__ */ new WeakMap(), Xt.none = /* @__PURE__ */ new WeakMap(), Fn = /* @__PURE__ */ new WeakSet(), qn = {});
|
|
1534
1534
|
};
|
|
1535
1535
|
}
|
|
@@ -1604,7 +1604,7 @@ function Pd(e) {
|
|
|
1604
1604
|
} = e, o = Td({
|
|
1605
1605
|
id: n,
|
|
1606
1606
|
root: r
|
|
1607
|
-
}), [i, s] = c.useState(null), u = c.useRef(null), l = c.useRef(null), d = c.useRef(null), f = c.useRef(null), h = i == null ? void 0 : i.modal, m = i == null ? void 0 : i.open,
|
|
1607
|
+
}), [i, s] = c.useState(null), u = c.useRef(null), l = c.useRef(null), d = c.useRef(null), f = c.useRef(null), h = i == null ? void 0 : i.modal, m = i == null ? void 0 : i.open, g = (
|
|
1608
1608
|
// The FocusManager and therefore floating element are currently open/
|
|
1609
1609
|
// rendered.
|
|
1610
1610
|
!!i && // Guards are only for non-modal focus management.
|
|
@@ -1614,8 +1614,8 @@ function Pd(e) {
|
|
|
1614
1614
|
return c.useEffect(() => {
|
|
1615
1615
|
if (!o || !a || h)
|
|
1616
1616
|
return;
|
|
1617
|
-
function p(
|
|
1618
|
-
o && _n(
|
|
1617
|
+
function p(v) {
|
|
1618
|
+
o && _n(v) && (v.type === "focusin" ? na : Nc)(o);
|
|
1619
1619
|
}
|
|
1620
1620
|
return o.addEventListener("focusin", p, !0), o.addEventListener("focusout", p, !0), () => {
|
|
1621
1621
|
o.removeEventListener("focusin", p, !0), o.removeEventListener("focusout", p, !0);
|
|
@@ -1632,30 +1632,30 @@ function Pd(e) {
|
|
|
1632
1632
|
portalNode: o,
|
|
1633
1633
|
setFocusManagerState: s
|
|
1634
1634
|
}), [a, o]),
|
|
1635
|
-
children: [
|
|
1635
|
+
children: [g && o && /* @__PURE__ */ w(ar, {
|
|
1636
1636
|
"data-type": "outside",
|
|
1637
1637
|
ref: u,
|
|
1638
1638
|
onFocus: (p) => {
|
|
1639
1639
|
if (_n(p, o)) {
|
|
1640
|
-
var
|
|
1641
|
-
(
|
|
1640
|
+
var v;
|
|
1641
|
+
(v = d.current) == null || v.focus();
|
|
1642
1642
|
} else {
|
|
1643
|
-
const
|
|
1643
|
+
const $ = i ? i.domReference : null, y = _s($);
|
|
1644
1644
|
y == null || y.focus();
|
|
1645
1645
|
}
|
|
1646
1646
|
}
|
|
1647
|
-
}),
|
|
1647
|
+
}), g && o && /* @__PURE__ */ w("span", {
|
|
1648
1648
|
"aria-owns": o.id,
|
|
1649
1649
|
style: gr
|
|
1650
|
-
}), o && /* @__PURE__ */ ko.createPortal(t, o),
|
|
1650
|
+
}), o && /* @__PURE__ */ ko.createPortal(t, o), g && o && /* @__PURE__ */ w(ar, {
|
|
1651
1651
|
"data-type": "outside",
|
|
1652
1652
|
ref: l,
|
|
1653
1653
|
onFocus: (p) => {
|
|
1654
1654
|
if (_n(p, o)) {
|
|
1655
|
-
var
|
|
1656
|
-
(
|
|
1655
|
+
var v;
|
|
1656
|
+
(v = f.current) == null || v.focus();
|
|
1657
1657
|
} else {
|
|
1658
|
-
const
|
|
1658
|
+
const $ = i ? i.domReference : null, y = ys($);
|
|
1659
1659
|
y == null || y.focus(), i != null && i.closeOnFocusOut && (i == null || i.onOpenChange(!1, p.nativeEvent, "focus-out"));
|
|
1660
1660
|
}
|
|
1661
1661
|
}
|
|
@@ -1671,12 +1671,12 @@ function ga(e) {
|
|
|
1671
1671
|
}, e);
|
|
1672
1672
|
}
|
|
1673
1673
|
const Rd = 20;
|
|
1674
|
-
let
|
|
1674
|
+
let Et = [];
|
|
1675
1675
|
function Ld(e) {
|
|
1676
|
-
|
|
1676
|
+
Et = Et.filter((t) => t.isConnected), e && dr(e) !== "body" && (Et.push(e), Et.length > Rd && (Et = Et.slice(-20)));
|
|
1677
1677
|
}
|
|
1678
1678
|
function va() {
|
|
1679
|
-
return
|
|
1679
|
+
return Et.slice().reverse().find((e) => e.isConnected);
|
|
1680
1680
|
}
|
|
1681
1681
|
function Ad(e) {
|
|
1682
1682
|
const t = On();
|
|
@@ -1717,18 +1717,18 @@ function Id(e) {
|
|
|
1717
1717
|
outsideElementsInert: h = !1,
|
|
1718
1718
|
getInsideElements: m = () => []
|
|
1719
1719
|
} = e, {
|
|
1720
|
-
open:
|
|
1720
|
+
open: g,
|
|
1721
1721
|
onOpenChange: p,
|
|
1722
|
-
events:
|
|
1723
|
-
dataRef:
|
|
1722
|
+
events: v,
|
|
1723
|
+
dataRef: $,
|
|
1724
1724
|
elements: {
|
|
1725
1725
|
domReference: y,
|
|
1726
1726
|
floating: b
|
|
1727
1727
|
}
|
|
1728
1728
|
} = t, _ = Ge(() => {
|
|
1729
1729
|
var I;
|
|
1730
|
-
return (I =
|
|
1731
|
-
}),
|
|
1730
|
+
return (I = $.current.floatingContext) == null ? void 0 : I.nodeId;
|
|
1731
|
+
}), x = Ge(m), S = typeof i == "number" && i < 0, M = Qo(y) && S, N = Cd(), E = N ? o : !0, k = !E || N && h, L = Cr(a), J = Cr(i), Y = Cr(s), H = Oo(), D = Ls(), j = c.useRef(null), G = c.useRef(null), R = c.useRef(!1), T = c.useRef(!1), W = c.useRef(-1), ee = D != null, A = Jo(b), be = Ge(function(I) {
|
|
1732
1732
|
return I === void 0 && (I = A), I ? fr(I, On()) : [];
|
|
1733
1733
|
}), Se = Ge((I) => {
|
|
1734
1734
|
const z = be(I);
|
|
@@ -1759,14 +1759,14 @@ function Id(e) {
|
|
|
1759
1759
|
}, [r, b, be]), c.useEffect(() => {
|
|
1760
1760
|
if (r || !f) return;
|
|
1761
1761
|
function I() {
|
|
1762
|
-
|
|
1763
|
-
|
|
1762
|
+
T.current = !0, setTimeout(() => {
|
|
1763
|
+
T.current = !1;
|
|
1764
1764
|
});
|
|
1765
1765
|
}
|
|
1766
1766
|
function z(F) {
|
|
1767
1767
|
const q = F.relatedTarget, ce = F.currentTarget, fe = gt(F);
|
|
1768
1768
|
queueMicrotask(() => {
|
|
1769
|
-
const Ne = _(), Le = !(Me(y, q) || Me(b, q) || Me(q, b) || Me(
|
|
1769
|
+
const Ne = _(), Le = !(Me(y, q) || Me(b, q) || Me(q, b) || Me(D == null ? void 0 : D.portalNode, q) || q != null && q.hasAttribute(Sn("focus-guard")) || H && (yn(H.nodesRef.current, Ne).find((ne) => {
|
|
1770
1770
|
var re, ze;
|
|
1771
1771
|
return Me((re = ne.context) == null ? void 0 : re.elements.floating, q) || Me((ze = ne.context) == null ? void 0 : ze.elements.domReference, q);
|
|
1772
1772
|
}) || ea(H.nodesRef.current, Ne).find((ne) => {
|
|
@@ -1778,11 +1778,11 @@ function Id(e) {
|
|
|
1778
1778
|
const ne = W.current, re = be(), ze = re[ne] || re[re.length - 1] || A;
|
|
1779
1779
|
it(ze) && ze.focus();
|
|
1780
1780
|
}
|
|
1781
|
-
if (
|
|
1782
|
-
|
|
1781
|
+
if ($.current.insideReactTree) {
|
|
1782
|
+
$.current.insideReactTree = !1;
|
|
1783
1783
|
return;
|
|
1784
1784
|
}
|
|
1785
|
-
(M || !l) && q && Le && !
|
|
1785
|
+
(M || !l) && q && Le && !T.current && // Fix React 18 Strict Mode returnFocus due to double rendering.
|
|
1786
1786
|
q !== va() && (R.current = !0, p(!1, F, "focus-out"));
|
|
1787
1787
|
});
|
|
1788
1788
|
}
|
|
@@ -1790,31 +1790,31 @@ function Id(e) {
|
|
|
1790
1790
|
return y.addEventListener("focusout", z), y.addEventListener("pointerdown", I), b.addEventListener("focusout", z), () => {
|
|
1791
1791
|
y.removeEventListener("focusout", z), y.removeEventListener("pointerdown", I), b.removeEventListener("focusout", z);
|
|
1792
1792
|
};
|
|
1793
|
-
}, [r, y, b, A, l, H,
|
|
1794
|
-
const je = c.useRef(null), de = c.useRef(null), ye = ga([je,
|
|
1793
|
+
}, [r, y, b, A, l, H, D, p, f, u, be, M, _, L, $]);
|
|
1794
|
+
const je = c.useRef(null), de = c.useRef(null), ye = ga([je, D == null ? void 0 : D.beforeInsideRef]), nt = ga([de, D == null ? void 0 : D.afterInsideRef]);
|
|
1795
1795
|
c.useEffect(() => {
|
|
1796
1796
|
var I, z;
|
|
1797
1797
|
if (r || !b) return;
|
|
1798
|
-
const F = Array.from((
|
|
1798
|
+
const F = Array.from((D == null || (I = D.portalNode) == null ? void 0 : I.querySelectorAll("[" + Sn("portal") + "]")) || []), q = H ? ea(H.nodesRef.current, _()) : [], ce = H && !l ? q.map((ne) => {
|
|
1799
1799
|
var re;
|
|
1800
1800
|
return (re = ne.context) == null ? void 0 : re.elements.floating;
|
|
1801
1801
|
}) : [], fe = (z = q.find((ne) => {
|
|
1802
1802
|
var re;
|
|
1803
1803
|
return Qo(((re = ne.context) == null ? void 0 : re.elements.domReference) || null);
|
|
1804
|
-
})) == null || (z = z.context) == null ? void 0 : z.elements.domReference, Ne = [b, fe, ...F, ...ce,
|
|
1804
|
+
})) == null || (z = z.context) == null ? void 0 : z.elements.domReference, Ne = [b, fe, ...F, ...ce, ...x(), j.current, G.current, je.current, de.current, D == null ? void 0 : D.beforeOutsideRef.current, D == null ? void 0 : D.afterOutsideRef.current, L.current.includes("reference") || M ? y : null].filter((ne) => ne != null), Le = l || M ? ha(Ne, !k, k) : ha(Ne);
|
|
1805
1805
|
return () => {
|
|
1806
1806
|
Le();
|
|
1807
1807
|
};
|
|
1808
|
-
}, [r, y, b, l, L,
|
|
1808
|
+
}, [r, y, b, l, L, D, M, E, k, H, _, x]), Pe(() => {
|
|
1809
1809
|
if (r || !it(A)) return;
|
|
1810
1810
|
const I = Ie(A), z = Yt(I);
|
|
1811
1811
|
queueMicrotask(() => {
|
|
1812
1812
|
const F = Se(A), q = J.current, ce = (typeof q == "number" ? F[q] : q.current) || A, fe = Me(A, z);
|
|
1813
|
-
!S && !fe &&
|
|
1813
|
+
!S && !fe && g && Pt(ce, {
|
|
1814
1814
|
preventScroll: ce === A
|
|
1815
1815
|
});
|
|
1816
1816
|
});
|
|
1817
|
-
}, [r,
|
|
1817
|
+
}, [r, g, A, S, Se, J]), Pe(() => {
|
|
1818
1818
|
if (r || !A) return;
|
|
1819
1819
|
const I = Ie(A), z = Yt(I);
|
|
1820
1820
|
Ld(z);
|
|
@@ -1838,7 +1838,7 @@ function Id(e) {
|
|
|
1838
1838
|
}), re ? R.current = !1 : R.current = !0;
|
|
1839
1839
|
}
|
|
1840
1840
|
}
|
|
1841
|
-
|
|
1841
|
+
v.on("openchange", F);
|
|
1842
1842
|
const q = I.createElement("span");
|
|
1843
1843
|
q.setAttribute("tabindex", "-1"), q.setAttribute("aria-hidden", "true"), Object.assign(q.style, gr), ee && y && y.insertAdjacentElement("afterend", q);
|
|
1844
1844
|
function ce() {
|
|
@@ -1849,7 +1849,7 @@ function Id(e) {
|
|
|
1849
1849
|
return Y.current.current || q;
|
|
1850
1850
|
}
|
|
1851
1851
|
return () => {
|
|
1852
|
-
|
|
1852
|
+
v.off("openchange", F);
|
|
1853
1853
|
const fe = Yt(I), Ne = Me(b, fe) || H && yn(H.nodesRef.current, _()).some((ne) => {
|
|
1854
1854
|
var re;
|
|
1855
1855
|
return Me((re = ne.context) == null ? void 0 : re.elements.floating, fe);
|
|
@@ -1865,32 +1865,32 @@ function Id(e) {
|
|
|
1865
1865
|
}), q.remove();
|
|
1866
1866
|
});
|
|
1867
1867
|
};
|
|
1868
|
-
}, [r, b, A, Y,
|
|
1868
|
+
}, [r, b, A, Y, $, v, H, ee, y, _]), c.useEffect(() => {
|
|
1869
1869
|
queueMicrotask(() => {
|
|
1870
1870
|
R.current = !1;
|
|
1871
1871
|
});
|
|
1872
1872
|
}, [r]), Pe(() => {
|
|
1873
|
-
if (!r &&
|
|
1874
|
-
return
|
|
1873
|
+
if (!r && D)
|
|
1874
|
+
return D.setFocusManagerState({
|
|
1875
1875
|
modal: l,
|
|
1876
1876
|
closeOnFocusOut: f,
|
|
1877
|
-
open:
|
|
1877
|
+
open: g,
|
|
1878
1878
|
onOpenChange: p,
|
|
1879
1879
|
domReference: y
|
|
1880
1880
|
}), () => {
|
|
1881
|
-
|
|
1881
|
+
D.setFocusManagerState(null);
|
|
1882
1882
|
};
|
|
1883
|
-
}, [r,
|
|
1883
|
+
}, [r, D, l, g, p, f, y]), Pe(() => {
|
|
1884
1884
|
r || A && wa(A, L);
|
|
1885
1885
|
}, [r, A, L]);
|
|
1886
|
-
function
|
|
1886
|
+
function $t(I) {
|
|
1887
1887
|
return r || !d || !l ? null : /* @__PURE__ */ w(Wd, {
|
|
1888
1888
|
ref: I === "start" ? j : G,
|
|
1889
1889
|
onClick: (z) => p(!1, z.nativeEvent),
|
|
1890
1890
|
children: typeof d == "string" ? d : "Dismiss"
|
|
1891
1891
|
});
|
|
1892
1892
|
}
|
|
1893
|
-
const rt = !r &&
|
|
1893
|
+
const rt = !r && E && (l ? !M : !0) && (ee || l);
|
|
1894
1894
|
return /* @__PURE__ */ te(Qe, {
|
|
1895
1895
|
children: [rt && /* @__PURE__ */ w(ar, {
|
|
1896
1896
|
"data-type": "inside",
|
|
@@ -1899,28 +1899,28 @@ function Id(e) {
|
|
|
1899
1899
|
if (l) {
|
|
1900
1900
|
const F = Se();
|
|
1901
1901
|
Pt(a[0] === "reference" ? F[0] : F[F.length - 1]);
|
|
1902
|
-
} else if (
|
|
1903
|
-
if (R.current = !1, _n(I,
|
|
1902
|
+
} else if (D != null && D.preserveTabOrder && D.portalNode)
|
|
1903
|
+
if (R.current = !1, _n(I, D.portalNode)) {
|
|
1904
1904
|
const F = ys(y);
|
|
1905
1905
|
F == null || F.focus();
|
|
1906
1906
|
} else {
|
|
1907
1907
|
var z;
|
|
1908
|
-
(z =
|
|
1908
|
+
(z = D.beforeOutsideRef.current) == null || z.focus();
|
|
1909
1909
|
}
|
|
1910
1910
|
}
|
|
1911
|
-
}), !M &&
|
|
1911
|
+
}), !M && $t("start"), n, $t("end"), rt && /* @__PURE__ */ w(ar, {
|
|
1912
1912
|
"data-type": "inside",
|
|
1913
1913
|
ref: nt,
|
|
1914
1914
|
onFocus: (I) => {
|
|
1915
1915
|
if (l)
|
|
1916
1916
|
Pt(Se()[0]);
|
|
1917
|
-
else if (
|
|
1918
|
-
if (f && (R.current = !0), _n(I,
|
|
1917
|
+
else if (D != null && D.preserveTabOrder && D.portalNode)
|
|
1918
|
+
if (f && (R.current = !0), _n(I, D.portalNode)) {
|
|
1919
1919
|
const F = _s(y);
|
|
1920
1920
|
F == null || F.focus();
|
|
1921
1921
|
} else {
|
|
1922
1922
|
var z;
|
|
1923
|
-
(z =
|
|
1923
|
+
(z = D.afterOutsideRef.current) == null || z.focus();
|
|
1924
1924
|
}
|
|
1925
1925
|
}
|
|
1926
1926
|
})]
|
|
@@ -1951,21 +1951,21 @@ function qd(e, t) {
|
|
|
1951
1951
|
ignoreMouse: l = !1,
|
|
1952
1952
|
keyboardHandlers: d = !0,
|
|
1953
1953
|
stickIfOpen: f = !0
|
|
1954
|
-
} = t, h = c.useRef(), m = c.useRef(!1),
|
|
1954
|
+
} = t, h = c.useRef(), m = c.useRef(!1), g = c.useMemo(() => ({
|
|
1955
1955
|
onPointerDown(p) {
|
|
1956
1956
|
h.current = p.pointerType;
|
|
1957
1957
|
},
|
|
1958
1958
|
onMouseDown(p) {
|
|
1959
|
-
const
|
|
1960
|
-
p.button === 0 && s !== "click" && (ta(
|
|
1959
|
+
const v = h.current;
|
|
1960
|
+
p.button === 0 && s !== "click" && (ta(v) && l || (n && u && (!(a.current.openEvent && f) || a.current.openEvent.type === "mousedown") ? r(!1, p.nativeEvent, "click") : (p.preventDefault(), r(!0, p.nativeEvent, "click"))));
|
|
1961
1961
|
},
|
|
1962
1962
|
onClick(p) {
|
|
1963
|
-
const
|
|
1963
|
+
const v = h.current;
|
|
1964
1964
|
if (s === "mousedown" && h.current) {
|
|
1965
1965
|
h.current = void 0;
|
|
1966
1966
|
return;
|
|
1967
1967
|
}
|
|
1968
|
-
ta(
|
|
1968
|
+
ta(v) && l || (n && u && (!(a.current.openEvent && f) || a.current.openEvent.type === "click") ? r(!1, p.nativeEvent, "click") : r(!0, p.nativeEvent, "click"));
|
|
1969
1969
|
},
|
|
1970
1970
|
onKeyDown(p) {
|
|
1971
1971
|
h.current = void 0, !(p.defaultPrevented || !d || ba(p)) && (p.key === " " && !ya(o) && (p.preventDefault(), m.current = !0), !Fd(p) && p.key === "Enter" && r(!(n && u), p.nativeEvent, "click"));
|
|
@@ -1975,8 +1975,8 @@ function qd(e, t) {
|
|
|
1975
1975
|
}
|
|
1976
1976
|
}), [a, o, s, l, d, r, n, f, u]);
|
|
1977
1977
|
return c.useMemo(() => i ? {
|
|
1978
|
-
reference:
|
|
1979
|
-
} : {}, [i,
|
|
1978
|
+
reference: g
|
|
1979
|
+
} : {}, [i, g]);
|
|
1980
1980
|
}
|
|
1981
1981
|
const Bd = {
|
|
1982
1982
|
pointerdown: "onPointerDown",
|
|
@@ -2009,67 +2009,67 @@ function Hd(e, t) {
|
|
|
2009
2009
|
referencePressEvent: f = "pointerdown",
|
|
2010
2010
|
ancestorScroll: h = !1,
|
|
2011
2011
|
bubbles: m,
|
|
2012
|
-
capture:
|
|
2013
|
-
} = t, p = Oo(),
|
|
2012
|
+
capture: g
|
|
2013
|
+
} = t, p = Oo(), v = Ge(typeof u == "function" ? u : () => !1), $ = typeof u == "function" ? v : u, y = c.useRef(!1), {
|
|
2014
2014
|
escapeKey: b,
|
|
2015
2015
|
outsidePress: _
|
|
2016
2016
|
} = _a(m), {
|
|
2017
|
-
escapeKey:
|
|
2017
|
+
escapeKey: x,
|
|
2018
2018
|
outsidePress: S
|
|
2019
|
-
} = _a(
|
|
2019
|
+
} = _a(g), M = c.useRef(!1), N = c.useRef(-1), E = Ge((D) => {
|
|
2020
2020
|
var j;
|
|
2021
|
-
if (!n || !i || !s ||
|
|
2021
|
+
if (!n || !i || !s || D.key !== "Escape" || M.current)
|
|
2022
2022
|
return;
|
|
2023
2023
|
const G = (j = o.current.floatingContext) == null ? void 0 : j.nodeId, R = p ? yn(p.nodesRef.current, G) : [];
|
|
2024
|
-
if (!b && (
|
|
2025
|
-
let
|
|
2024
|
+
if (!b && (D.stopPropagation(), R.length > 0)) {
|
|
2025
|
+
let T = !0;
|
|
2026
2026
|
if (R.forEach((W) => {
|
|
2027
2027
|
var ee;
|
|
2028
2028
|
if ((ee = W.context) != null && ee.open && !W.context.dataRef.current.__escapeKeyBubbles) {
|
|
2029
|
-
|
|
2029
|
+
T = !1;
|
|
2030
2030
|
return;
|
|
2031
2031
|
}
|
|
2032
|
-
}), !
|
|
2032
|
+
}), !T)
|
|
2033
2033
|
return;
|
|
2034
2034
|
}
|
|
2035
|
-
r(!1, xc(
|
|
2036
|
-
}),
|
|
2035
|
+
r(!1, xc(D) ? D.nativeEvent : D, "escape-key");
|
|
2036
|
+
}), k = Ge((D) => {
|
|
2037
2037
|
var j;
|
|
2038
2038
|
const G = () => {
|
|
2039
2039
|
var R;
|
|
2040
|
-
|
|
2040
|
+
E(D), (R = gt(D)) == null || R.removeEventListener("keydown", G);
|
|
2041
2041
|
};
|
|
2042
|
-
(j = gt(
|
|
2043
|
-
}), L = Ge((
|
|
2042
|
+
(j = gt(D)) == null || j.addEventListener("keydown", G);
|
|
2043
|
+
}), L = Ge((D) => {
|
|
2044
2044
|
var j;
|
|
2045
2045
|
const G = o.current.insideReactTree;
|
|
2046
2046
|
o.current.insideReactTree = !1;
|
|
2047
2047
|
const R = y.current;
|
|
2048
|
-
if (y.current = !1, l === "click" && R || G || typeof
|
|
2048
|
+
if (y.current = !1, l === "click" && R || G || typeof $ == "function" && !$(D))
|
|
2049
2049
|
return;
|
|
2050
|
-
const
|
|
2051
|
-
let A = Te(
|
|
2050
|
+
const T = gt(D), W = "[" + Sn("inert") + "]", ee = Ie(a.floating).querySelectorAll(W);
|
|
2051
|
+
let A = Te(T) ? T : null;
|
|
2052
2052
|
for (; A && !kr(A); ) {
|
|
2053
2053
|
const de = ec(A);
|
|
2054
2054
|
if (kr(de) || !Te(de))
|
|
2055
2055
|
break;
|
|
2056
2056
|
A = de;
|
|
2057
2057
|
}
|
|
2058
|
-
if (ee.length && Te(
|
|
2059
|
-
!Me(
|
|
2058
|
+
if (ee.length && Te(T) && !_c(T) && // Clicked on a direct ancestor (e.g. FloatingOverlay).
|
|
2059
|
+
!Me(T, a.floating) && // If the target root element contains none of the markers, then the
|
|
2060
2060
|
// element was injected after the floating element rendered.
|
|
2061
2061
|
Array.from(ee).every((de) => !Me(A, de)))
|
|
2062
2062
|
return;
|
|
2063
|
-
if (it(
|
|
2064
|
-
const de = kr(
|
|
2063
|
+
if (it(T) && H) {
|
|
2064
|
+
const de = kr(T), ye = Jl(T), nt = /auto|scroll/, $t = de || nt.test(ye.overflowX), rt = de || nt.test(ye.overflowY), I = $t && T.clientWidth > 0 && T.scrollWidth > T.clientWidth, z = rt && T.clientHeight > 0 && T.scrollHeight > T.clientHeight, F = ye.direction === "rtl", q = z && (F ? D.offsetX <= T.offsetWidth - T.clientWidth : D.offsetX > T.clientWidth), ce = I && D.offsetY > T.clientHeight;
|
|
2065
2065
|
if (q || ce)
|
|
2066
2066
|
return;
|
|
2067
2067
|
}
|
|
2068
2068
|
const be = (j = o.current.floatingContext) == null ? void 0 : j.nodeId, Se = p && yn(p.nodesRef.current, be).some((de) => {
|
|
2069
2069
|
var ye;
|
|
2070
|
-
return Er(
|
|
2070
|
+
return Er(D, (ye = de.context) == null ? void 0 : ye.elements.floating);
|
|
2071
2071
|
});
|
|
2072
|
-
if (Er(
|
|
2072
|
+
if (Er(D, a.floating) || Er(D, a.domReference) || Se)
|
|
2073
2073
|
return;
|
|
2074
2074
|
const je = p ? yn(p.nodesRef.current, be) : [];
|
|
2075
2075
|
if (je.length > 0) {
|
|
@@ -2083,28 +2083,28 @@ function Hd(e, t) {
|
|
|
2083
2083
|
}), !de)
|
|
2084
2084
|
return;
|
|
2085
2085
|
}
|
|
2086
|
-
r(!1,
|
|
2087
|
-
}), J = Ge((
|
|
2086
|
+
r(!1, D, "outside-press");
|
|
2087
|
+
}), J = Ge((D) => {
|
|
2088
2088
|
var j;
|
|
2089
2089
|
const G = () => {
|
|
2090
2090
|
var R;
|
|
2091
|
-
L(
|
|
2091
|
+
L(D), (R = gt(D)) == null || R.removeEventListener(l, G);
|
|
2092
2092
|
};
|
|
2093
|
-
(j = gt(
|
|
2093
|
+
(j = gt(D)) == null || j.addEventListener(l, G);
|
|
2094
2094
|
});
|
|
2095
2095
|
c.useEffect(() => {
|
|
2096
2096
|
if (!n || !i)
|
|
2097
2097
|
return;
|
|
2098
2098
|
o.current.__escapeKeyBubbles = b, o.current.__outsidePressBubbles = _;
|
|
2099
|
-
let
|
|
2099
|
+
let D = -1;
|
|
2100
2100
|
function j(ee) {
|
|
2101
2101
|
r(!1, ee, "ancestor-scroll");
|
|
2102
2102
|
}
|
|
2103
2103
|
function G() {
|
|
2104
|
-
window.clearTimeout(
|
|
2104
|
+
window.clearTimeout(D), M.current = !0;
|
|
2105
2105
|
}
|
|
2106
2106
|
function R() {
|
|
2107
|
-
|
|
2107
|
+
D = window.setTimeout(
|
|
2108
2108
|
() => {
|
|
2109
2109
|
M.current = !1;
|
|
2110
2110
|
},
|
|
@@ -2113,38 +2113,38 @@ function Hd(e, t) {
|
|
|
2113
2113
|
Ql() ? 5 : 0
|
|
2114
2114
|
);
|
|
2115
2115
|
}
|
|
2116
|
-
const
|
|
2117
|
-
s && (
|
|
2116
|
+
const T = Ie(a.floating);
|
|
2117
|
+
s && (T.addEventListener("keydown", x ? k : E, x), T.addEventListener("compositionstart", G), T.addEventListener("compositionend", R)), $ && T.addEventListener(l, S ? J : L, S);
|
|
2118
2118
|
let W = [];
|
|
2119
|
-
return h && (Te(a.domReference) && (W =
|
|
2119
|
+
return h && (Te(a.domReference) && (W = wt(a.domReference)), Te(a.floating) && (W = W.concat(wt(a.floating))), !Te(a.reference) && a.reference && a.reference.contextElement && (W = W.concat(wt(a.reference.contextElement)))), W = W.filter((ee) => {
|
|
2120
2120
|
var A;
|
|
2121
|
-
return ee !== ((A =
|
|
2121
|
+
return ee !== ((A = T.defaultView) == null ? void 0 : A.visualViewport);
|
|
2122
2122
|
}), W.forEach((ee) => {
|
|
2123
2123
|
ee.addEventListener("scroll", j, {
|
|
2124
2124
|
passive: !0
|
|
2125
2125
|
});
|
|
2126
2126
|
}), () => {
|
|
2127
|
-
s && (
|
|
2127
|
+
s && (T.removeEventListener("keydown", x ? k : E, x), T.removeEventListener("compositionstart", G), T.removeEventListener("compositionend", R)), $ && T.removeEventListener(l, S ? J : L, S), W.forEach((ee) => {
|
|
2128
2128
|
ee.removeEventListener("scroll", j);
|
|
2129
|
-
}), window.clearTimeout(
|
|
2129
|
+
}), window.clearTimeout(D);
|
|
2130
2130
|
};
|
|
2131
|
-
}, [o, a, s,
|
|
2131
|
+
}, [o, a, s, $, l, n, r, h, i, b, _, E, x, k, L, S, J]), c.useEffect(() => {
|
|
2132
2132
|
o.current.insideReactTree = !1;
|
|
2133
|
-
}, [o,
|
|
2133
|
+
}, [o, $, l]);
|
|
2134
2134
|
const Y = c.useMemo(() => ({
|
|
2135
|
-
onKeyDown:
|
|
2135
|
+
onKeyDown: E,
|
|
2136
2136
|
...d && {
|
|
2137
|
-
[Bd[f]]: (
|
|
2138
|
-
r(!1,
|
|
2137
|
+
[Bd[f]]: (D) => {
|
|
2138
|
+
r(!1, D.nativeEvent, "reference-press");
|
|
2139
2139
|
},
|
|
2140
2140
|
...f !== "click" && {
|
|
2141
|
-
onClick(
|
|
2142
|
-
r(!1,
|
|
2141
|
+
onClick(D) {
|
|
2142
|
+
r(!1, D.nativeEvent, "reference-press");
|
|
2143
2143
|
}
|
|
2144
2144
|
}
|
|
2145
2145
|
}
|
|
2146
|
-
}), [
|
|
2147
|
-
onKeyDown:
|
|
2146
|
+
}), [E, r, d, f]), H = c.useMemo(() => ({
|
|
2147
|
+
onKeyDown: E,
|
|
2148
2148
|
onMouseDown() {
|
|
2149
2149
|
y.current = !0;
|
|
2150
2150
|
},
|
|
@@ -2155,11 +2155,11 @@ function Hd(e, t) {
|
|
|
2155
2155
|
o.current.insideReactTree = !0;
|
|
2156
2156
|
},
|
|
2157
2157
|
onBlurCapture() {
|
|
2158
|
-
p || (Ed(
|
|
2158
|
+
p || (Ed(N), o.current.insideReactTree = !0, N.current = window.setTimeout(() => {
|
|
2159
2159
|
o.current.insideReactTree = !1;
|
|
2160
2160
|
}));
|
|
2161
2161
|
}
|
|
2162
|
-
}), [
|
|
2162
|
+
}), [E, l, o, p]);
|
|
2163
2163
|
return c.useMemo(() => i ? {
|
|
2164
2164
|
reference: Y,
|
|
2165
2165
|
floating: H
|
|
@@ -2175,13 +2175,13 @@ function jd(e) {
|
|
|
2175
2175
|
const m = r.reference;
|
|
2176
2176
|
m && !Te(m) && xd("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `refs.setPositionReference()`", "instead.");
|
|
2177
2177
|
}
|
|
2178
|
-
const [u, l] = c.useState(r.reference), d = Ge((m,
|
|
2179
|
-
o.current.openEvent = m ?
|
|
2178
|
+
const [u, l] = c.useState(r.reference), d = Ge((m, g, p) => {
|
|
2179
|
+
o.current.openEvent = m ? g : void 0, i.emit("openchange", {
|
|
2180
2180
|
open: m,
|
|
2181
|
-
event:
|
|
2181
|
+
event: g,
|
|
2182
2182
|
reason: p,
|
|
2183
2183
|
nested: s
|
|
2184
|
-
}), n == null || n(m,
|
|
2184
|
+
}), n == null || n(m, g, p);
|
|
2185
2185
|
}), f = c.useMemo(() => ({
|
|
2186
2186
|
setPositionReference: l
|
|
2187
2187
|
}), []), h = c.useMemo(() => ({
|
|
@@ -2222,7 +2222,7 @@ function zd(e) {
|
|
|
2222
2222
|
reference: s
|
|
2223
2223
|
}
|
|
2224
2224
|
}
|
|
2225
|
-
}),
|
|
2225
|
+
}), g = c.useCallback((b) => {
|
|
2226
2226
|
const _ = Te(b) ? {
|
|
2227
2227
|
getBoundingClientRect: () => b.getBoundingClientRect(),
|
|
2228
2228
|
getClientRects: () => b.getClientRects(),
|
|
@@ -2234,21 +2234,21 @@ function zd(e) {
|
|
|
2234
2234
|
// `null` to support `positionReference` + an unstable `reference`
|
|
2235
2235
|
// callback ref.
|
|
2236
2236
|
b !== null && !Te(b)) && m.refs.setReference(b);
|
|
2237
|
-
}, [m.refs]),
|
|
2237
|
+
}, [m.refs]), v = c.useMemo(() => ({
|
|
2238
2238
|
...m.refs,
|
|
2239
2239
|
setReference: p,
|
|
2240
|
-
setPositionReference:
|
|
2240
|
+
setPositionReference: g,
|
|
2241
2241
|
domReference: f
|
|
2242
|
-
}), [m.refs, p,
|
|
2242
|
+
}), [m.refs, p, g]), $ = c.useMemo(() => ({
|
|
2243
2243
|
...m.elements,
|
|
2244
2244
|
domReference: d
|
|
2245
2245
|
}), [m.elements, d]), y = c.useMemo(() => ({
|
|
2246
2246
|
...m,
|
|
2247
2247
|
...r,
|
|
2248
|
-
refs:
|
|
2249
|
-
elements:
|
|
2248
|
+
refs: v,
|
|
2249
|
+
elements: $,
|
|
2250
2250
|
nodeId: t
|
|
2251
|
-
}), [m,
|
|
2251
|
+
}), [m, v, $, t, r]);
|
|
2252
2252
|
return Pe(() => {
|
|
2253
2253
|
r.dataRef.current.floatingContext = y;
|
|
2254
2254
|
const b = h == null ? void 0 : h.nodesRef.current.find((_) => _.id === t);
|
|
@@ -2256,9 +2256,9 @@ function zd(e) {
|
|
|
2256
2256
|
}), c.useMemo(() => ({
|
|
2257
2257
|
...m,
|
|
2258
2258
|
context: y,
|
|
2259
|
-
refs:
|
|
2260
|
-
elements:
|
|
2261
|
-
}), [m,
|
|
2259
|
+
refs: v,
|
|
2260
|
+
elements: $
|
|
2261
|
+
}), [m, v, $, y]);
|
|
2262
2262
|
}
|
|
2263
2263
|
function Pr(e, t, n) {
|
|
2264
2264
|
const r = /* @__PURE__ */ new Map(), a = n === "item";
|
|
@@ -2287,9 +2287,9 @@ function Pr(e, t, n) {
|
|
|
2287
2287
|
if (r.has(l) || r.set(l, []), typeof d == "function") {
|
|
2288
2288
|
var f;
|
|
2289
2289
|
(f = r.get(l)) == null || f.push(d), i[l] = function() {
|
|
2290
|
-
for (var h, m = arguments.length,
|
|
2291
|
-
|
|
2292
|
-
return (h = r.get(l)) == null ? void 0 : h.map((
|
|
2290
|
+
for (var h, m = arguments.length, g = new Array(m), p = 0; p < m; p++)
|
|
2291
|
+
g[p] = arguments[p];
|
|
2292
|
+
return (h = r.get(l)) == null ? void 0 : h.map((v) => v(...g)).find((v) => v !== void 0);
|
|
2293
2293
|
};
|
|
2294
2294
|
}
|
|
2295
2295
|
} else
|
|
@@ -3644,7 +3644,7 @@ const ft = {
|
|
|
3644
3644
|
// so this token always has the same output as `XX`
|
|
3645
3645
|
case "XXXX":
|
|
3646
3646
|
case "XX":
|
|
3647
|
-
return
|
|
3647
|
+
return Dt(r);
|
|
3648
3648
|
// Hours, minutes and optional seconds with `:` delimiter
|
|
3649
3649
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
3650
3650
|
// so this token always has the same output as `XXX`
|
|
@@ -3652,7 +3652,7 @@ const ft = {
|
|
|
3652
3652
|
case "XXX":
|
|
3653
3653
|
// Hours and minutes with `:` delimiter
|
|
3654
3654
|
default:
|
|
3655
|
-
return
|
|
3655
|
+
return Dt(r, ":");
|
|
3656
3656
|
}
|
|
3657
3657
|
},
|
|
3658
3658
|
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
@@ -3667,7 +3667,7 @@ const ft = {
|
|
|
3667
3667
|
// so this token always has the same output as `xx`
|
|
3668
3668
|
case "xxxx":
|
|
3669
3669
|
case "xx":
|
|
3670
|
-
return
|
|
3670
|
+
return Dt(r);
|
|
3671
3671
|
// Hours, minutes and optional seconds with `:` delimiter
|
|
3672
3672
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
3673
3673
|
// so this token always has the same output as `xxx`
|
|
@@ -3675,7 +3675,7 @@ const ft = {
|
|
|
3675
3675
|
case "xxx":
|
|
3676
3676
|
// Hours and minutes with `:` delimiter
|
|
3677
3677
|
default:
|
|
3678
|
-
return
|
|
3678
|
+
return Dt(r, ":");
|
|
3679
3679
|
}
|
|
3680
3680
|
},
|
|
3681
3681
|
// Timezone (GMT)
|
|
@@ -3690,7 +3690,7 @@ const ft = {
|
|
|
3690
3690
|
// Long
|
|
3691
3691
|
case "OOOO":
|
|
3692
3692
|
default:
|
|
3693
|
-
return "GMT" +
|
|
3693
|
+
return "GMT" + Dt(r, ":");
|
|
3694
3694
|
}
|
|
3695
3695
|
},
|
|
3696
3696
|
// Timezone (specific non-location)
|
|
@@ -3705,7 +3705,7 @@ const ft = {
|
|
|
3705
3705
|
// Long
|
|
3706
3706
|
case "zzzz":
|
|
3707
3707
|
default:
|
|
3708
|
-
return "GMT" +
|
|
3708
|
+
return "GMT" + Dt(r, ":");
|
|
3709
3709
|
}
|
|
3710
3710
|
},
|
|
3711
3711
|
// Seconds timestamp
|
|
@@ -3723,9 +3723,9 @@ function Da(e, t = "") {
|
|
|
3723
3723
|
return o === 0 ? n + String(a) : n + String(a) + t + Z(o, 2);
|
|
3724
3724
|
}
|
|
3725
3725
|
function Ca(e, t) {
|
|
3726
|
-
return e % 60 === 0 ? (e > 0 ? "-" : "+") + Z(Math.abs(e) / 60, 2) :
|
|
3726
|
+
return e % 60 === 0 ? (e > 0 ? "-" : "+") + Z(Math.abs(e) / 60, 2) : Dt(e, t);
|
|
3727
3727
|
}
|
|
3728
|
-
function
|
|
3728
|
+
function Dt(e, t = "") {
|
|
3729
3729
|
const n = e > 0 ? "-" : "+", r = Math.abs(e), a = Z(Math.trunc(r / 60), 2), o = Z(r % 60, 2);
|
|
3730
3730
|
return n + a + t + o;
|
|
3731
3731
|
}
|
|
@@ -3795,10 +3795,10 @@ function tp(e, t, n) {
|
|
|
3795
3795
|
const np = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, rp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, op = /^'([^]*?)'?$/, ap = /''/g, ip = /[a-zA-Z]/;
|
|
3796
3796
|
function sp(e, t, n) {
|
|
3797
3797
|
var r, a, o, i, s, u, l, d;
|
|
3798
|
-
const f = Pn(), h = (n == null ? void 0 : n.locale) ?? f.locale ?? To, m = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((a = (r = n == null ? void 0 : n.locale) == null ? void 0 : r.options) == null ? void 0 : a.firstWeekContainsDate) ?? f.firstWeekContainsDate ?? ((i = (o = f.locale) == null ? void 0 : o.options) == null ? void 0 : i.firstWeekContainsDate) ?? 1,
|
|
3798
|
+
const f = Pn(), h = (n == null ? void 0 : n.locale) ?? f.locale ?? To, m = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((a = (r = n == null ? void 0 : n.locale) == null ? void 0 : r.options) == null ? void 0 : a.firstWeekContainsDate) ?? f.firstWeekContainsDate ?? ((i = (o = f.locale) == null ? void 0 : o.options) == null ? void 0 : i.firstWeekContainsDate) ?? 1, g = (n == null ? void 0 : n.weekStartsOn) ?? ((u = (s = n == null ? void 0 : n.locale) == null ? void 0 : s.options) == null ? void 0 : u.weekStartsOn) ?? f.weekStartsOn ?? ((d = (l = f.locale) == null ? void 0 : l.options) == null ? void 0 : d.weekStartsOn) ?? 0, p = Q(e, n == null ? void 0 : n.in);
|
|
3799
3799
|
if (!of(p))
|
|
3800
3800
|
throw new RangeError("Invalid time value");
|
|
3801
|
-
let
|
|
3801
|
+
let v = t.match(rp).map((y) => {
|
|
3802
3802
|
const b = y[0];
|
|
3803
3803
|
if (b === "p" || b === "P") {
|
|
3804
3804
|
const _ = Gf[b];
|
|
@@ -3819,18 +3819,18 @@ function sp(e, t, n) {
|
|
|
3819
3819
|
);
|
|
3820
3820
|
return { isToken: !1, value: y };
|
|
3821
3821
|
});
|
|
3822
|
-
h.localize.preprocessor && (
|
|
3823
|
-
const
|
|
3822
|
+
h.localize.preprocessor && (v = h.localize.preprocessor(p, v));
|
|
3823
|
+
const $ = {
|
|
3824
3824
|
firstWeekContainsDate: m,
|
|
3825
|
-
weekStartsOn:
|
|
3825
|
+
weekStartsOn: g,
|
|
3826
3826
|
locale: h
|
|
3827
3827
|
};
|
|
3828
|
-
return
|
|
3828
|
+
return v.map((y) => {
|
|
3829
3829
|
if (!y.isToken) return y.value;
|
|
3830
3830
|
const b = y.value;
|
|
3831
3831
|
(!(n != null && n.useAdditionalWeekYearTokens) && Jf(b) || !(n != null && n.useAdditionalDayOfYearTokens) && Qf(b)) && ep(b, t, String(e));
|
|
3832
3832
|
const _ = Ea[b[0]];
|
|
3833
|
-
return _(p, b, h.localize,
|
|
3833
|
+
return _(p, b, h.localize, $);
|
|
3834
3834
|
}).join("");
|
|
3835
3835
|
}
|
|
3836
3836
|
function up(e) {
|
|
@@ -4115,22 +4115,22 @@ function ut(e, t, n = et) {
|
|
|
4115
4115
|
});
|
|
4116
4116
|
}
|
|
4117
4117
|
function $p(e, t, n, r, a) {
|
|
4118
|
-
const { disabled: o, hidden: i, modifiers: s, showOutsideDays: u, broadcastCalendar: l, today: d } = t, { isSameDay: f, isSameMonth: h, startOfMonth: m, isBefore:
|
|
4118
|
+
const { disabled: o, hidden: i, modifiers: s, showOutsideDays: u, broadcastCalendar: l, today: d } = t, { isSameDay: f, isSameMonth: h, startOfMonth: m, isBefore: g, endOfMonth: p, isAfter: v } = a, $ = n && m(n), y = r && p(r), b = {
|
|
4119
4119
|
[ae.focused]: [],
|
|
4120
4120
|
[ae.outside]: [],
|
|
4121
4121
|
[ae.disabled]: [],
|
|
4122
4122
|
[ae.hidden]: [],
|
|
4123
4123
|
[ae.today]: []
|
|
4124
4124
|
}, _ = {};
|
|
4125
|
-
for (const
|
|
4126
|
-
const { date: S, displayMonth: M } =
|
|
4127
|
-
!l && !u &&
|
|
4128
|
-
|
|
4129
|
-
const
|
|
4130
|
-
|
|
4125
|
+
for (const x of e) {
|
|
4126
|
+
const { date: S, displayMonth: M } = x, N = !!(M && !h(S, M)), E = !!($ && g(S, $)), k = !!(y && v(S, y)), L = !!(o && ut(S, o, a)), J = !!(i && ut(S, i, a)) || E || k || // Broadcast calendar will show outside days as default
|
|
4127
|
+
!l && !u && N || l && u === !1 && N, Y = f(S, d ?? a.today());
|
|
4128
|
+
N && b.outside.push(x), L && b.disabled.push(x), J && b.hidden.push(x), Y && b.today.push(x), s && Object.keys(s).forEach((H) => {
|
|
4129
|
+
const D = s == null ? void 0 : s[H];
|
|
4130
|
+
D && ut(S, D, a) && (_[H] ? _[H].push(x) : _[H] = [x]);
|
|
4131
4131
|
});
|
|
4132
4132
|
}
|
|
4133
|
-
return (
|
|
4133
|
+
return (x) => {
|
|
4134
4134
|
const S = {
|
|
4135
4135
|
[ae.focused]: !1,
|
|
4136
4136
|
[ae.disabled]: !1,
|
|
@@ -4138,12 +4138,12 @@ function $p(e, t, n, r, a) {
|
|
|
4138
4138
|
[ae.outside]: !1,
|
|
4139
4139
|
[ae.today]: !1
|
|
4140
4140
|
}, M = {};
|
|
4141
|
-
for (const
|
|
4142
|
-
const
|
|
4143
|
-
S[
|
|
4141
|
+
for (const N in b) {
|
|
4142
|
+
const E = b[N];
|
|
4143
|
+
S[N] = E.some((k) => k === x);
|
|
4144
4144
|
}
|
|
4145
|
-
for (const
|
|
4146
|
-
M[
|
|
4145
|
+
for (const N in _)
|
|
4146
|
+
M[N] = _[N].some((E) => E === x);
|
|
4147
4147
|
return {
|
|
4148
4148
|
...S,
|
|
4149
4149
|
// custom modifiers should override all the previous ones
|
|
@@ -4155,66 +4155,66 @@ function Sp(e, t, n = {}) {
|
|
|
4155
4155
|
return Object.entries(e).filter(([, r]) => r === !0).reduce((r, [a]) => (n[a] ? r.push(n[a]) : t[ae[a]] ? r.push(t[ae[a]]) : t[qe[a]] && r.push(t[qe[a]]), r), [t[P.Day]]);
|
|
4156
4156
|
}
|
|
4157
4157
|
function Mp(e) {
|
|
4158
|
-
return
|
|
4158
|
+
return C.createElement("button", { ...e });
|
|
4159
4159
|
}
|
|
4160
4160
|
function kp(e) {
|
|
4161
|
-
return
|
|
4161
|
+
return C.createElement("span", { ...e });
|
|
4162
4162
|
}
|
|
4163
4163
|
function Ep(e) {
|
|
4164
4164
|
const { size: t = 24, orientation: n = "left", className: r } = e;
|
|
4165
|
-
return
|
|
4165
|
+
return C.createElement(
|
|
4166
4166
|
"svg",
|
|
4167
4167
|
{ className: r, width: t, height: t, viewBox: "0 0 24 24" },
|
|
4168
|
-
n === "up" &&
|
|
4169
|
-
n === "down" &&
|
|
4170
|
-
n === "left" &&
|
|
4171
|
-
n === "right" &&
|
|
4168
|
+
n === "up" && C.createElement("polygon", { points: "6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28" }),
|
|
4169
|
+
n === "down" && C.createElement("polygon", { points: "6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72" }),
|
|
4170
|
+
n === "left" && C.createElement("polygon", { points: "16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20" }),
|
|
4171
|
+
n === "right" && C.createElement("polygon", { points: "8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20" })
|
|
4172
4172
|
);
|
|
4173
4173
|
}
|
|
4174
4174
|
function Dp(e) {
|
|
4175
4175
|
const { day: t, modifiers: n, ...r } = e;
|
|
4176
|
-
return
|
|
4176
|
+
return C.createElement("td", { ...r });
|
|
4177
4177
|
}
|
|
4178
4178
|
function Cp(e) {
|
|
4179
|
-
const { day: t, modifiers: n, ...r } = e, a =
|
|
4180
|
-
return
|
|
4179
|
+
const { day: t, modifiers: n, ...r } = e, a = C.useRef(null);
|
|
4180
|
+
return C.useEffect(() => {
|
|
4181
4181
|
var o;
|
|
4182
4182
|
n.focused && ((o = a.current) == null || o.focus());
|
|
4183
|
-
}, [n.focused]),
|
|
4183
|
+
}, [n.focused]), C.createElement("button", { ref: a, ...r });
|
|
4184
4184
|
}
|
|
4185
4185
|
function Np(e) {
|
|
4186
4186
|
const { options: t, className: n, components: r, classNames: a, ...o } = e, i = [a[P.Dropdown], n].join(" "), s = t == null ? void 0 : t.find(({ value: u }) => u === o.value);
|
|
4187
|
-
return
|
|
4187
|
+
return C.createElement(
|
|
4188
4188
|
"span",
|
|
4189
4189
|
{ "data-disabled": o.disabled, className: a[P.DropdownRoot] },
|
|
4190
|
-
|
|
4191
|
-
|
|
4190
|
+
C.createElement(r.Select, { className: i, ...o }, t == null ? void 0 : t.map(({ value: u, label: l, disabled: d }) => C.createElement(r.Option, { key: u, value: u, disabled: d }, l))),
|
|
4191
|
+
C.createElement(
|
|
4192
4192
|
"span",
|
|
4193
4193
|
{ className: a[P.CaptionLabel], "aria-hidden": !0 },
|
|
4194
4194
|
s == null ? void 0 : s.label,
|
|
4195
|
-
|
|
4195
|
+
C.createElement(r.Chevron, { orientation: "down", size: 18, className: a[P.Chevron] })
|
|
4196
4196
|
)
|
|
4197
4197
|
);
|
|
4198
4198
|
}
|
|
4199
4199
|
function Op(e) {
|
|
4200
|
-
return
|
|
4200
|
+
return C.createElement("div", { ...e });
|
|
4201
4201
|
}
|
|
4202
4202
|
function Tp(e) {
|
|
4203
|
-
return
|
|
4203
|
+
return C.createElement("div", { ...e });
|
|
4204
4204
|
}
|
|
4205
4205
|
function Pp(e) {
|
|
4206
4206
|
const { calendarMonth: t, displayIndex: n, ...r } = e;
|
|
4207
|
-
return
|
|
4207
|
+
return C.createElement("div", { ...r }, e.children);
|
|
4208
4208
|
}
|
|
4209
4209
|
function Rp(e) {
|
|
4210
4210
|
const { calendarMonth: t, displayIndex: n, ...r } = e;
|
|
4211
|
-
return
|
|
4211
|
+
return C.createElement("div", { ...r });
|
|
4212
4212
|
}
|
|
4213
4213
|
function Lp(e) {
|
|
4214
|
-
return
|
|
4214
|
+
return C.createElement("table", { ...e });
|
|
4215
4215
|
}
|
|
4216
4216
|
function Ap(e) {
|
|
4217
|
-
return
|
|
4217
|
+
return C.createElement("div", { ...e });
|
|
4218
4218
|
}
|
|
4219
4219
|
const nu = is(void 0);
|
|
4220
4220
|
function Rn() {
|
|
@@ -4225,7 +4225,7 @@ function Rn() {
|
|
|
4225
4225
|
}
|
|
4226
4226
|
function Wp(e) {
|
|
4227
4227
|
const { components: t } = Rn();
|
|
4228
|
-
return
|
|
4228
|
+
return C.createElement(t.Dropdown, { ...e });
|
|
4229
4229
|
}
|
|
4230
4230
|
function Ip(e) {
|
|
4231
4231
|
const { onPreviousClick: t, onNextClick: n, previousMonth: r, nextMonth: a, ...o } = e, { components: i, classNames: s, labels: { labelPrevious: u, labelNext: l } } = Rn(), d = Oe((h) => {
|
|
@@ -4233,66 +4233,66 @@ function Ip(e) {
|
|
|
4233
4233
|
}, [a, n]), f = Oe((h) => {
|
|
4234
4234
|
r && (t == null || t(h));
|
|
4235
4235
|
}, [r, t]);
|
|
4236
|
-
return
|
|
4236
|
+
return C.createElement(
|
|
4237
4237
|
"nav",
|
|
4238
4238
|
{ ...o },
|
|
4239
|
-
|
|
4239
|
+
C.createElement(
|
|
4240
4240
|
i.PreviousMonthButton,
|
|
4241
4241
|
{ type: "button", className: s[P.PreviousMonthButton], tabIndex: r ? void 0 : -1, "aria-disabled": r ? void 0 : !0, "aria-label": u(r), onClick: f },
|
|
4242
|
-
|
|
4242
|
+
C.createElement(i.Chevron, { disabled: r ? void 0 : !0, className: s[P.Chevron], orientation: "left" })
|
|
4243
4243
|
),
|
|
4244
|
-
|
|
4244
|
+
C.createElement(
|
|
4245
4245
|
i.NextMonthButton,
|
|
4246
4246
|
{ type: "button", className: s[P.NextMonthButton], tabIndex: a ? void 0 : -1, "aria-disabled": a ? void 0 : !0, "aria-label": l(a), onClick: d },
|
|
4247
|
-
|
|
4247
|
+
C.createElement(i.Chevron, { disabled: a ? void 0 : !0, orientation: "right", className: s[P.Chevron] })
|
|
4248
4248
|
)
|
|
4249
4249
|
);
|
|
4250
4250
|
}
|
|
4251
4251
|
function Fp(e) {
|
|
4252
4252
|
const { components: t } = Rn();
|
|
4253
|
-
return
|
|
4253
|
+
return C.createElement(t.Button, { ...e });
|
|
4254
4254
|
}
|
|
4255
4255
|
function qp(e) {
|
|
4256
|
-
return
|
|
4256
|
+
return C.createElement("option", { ...e });
|
|
4257
4257
|
}
|
|
4258
4258
|
function Bp(e) {
|
|
4259
4259
|
const { components: t } = Rn();
|
|
4260
|
-
return
|
|
4260
|
+
return C.createElement(t.Button, { ...e });
|
|
4261
4261
|
}
|
|
4262
4262
|
function Yp(e) {
|
|
4263
4263
|
const { rootRef: t, ...n } = e;
|
|
4264
|
-
return
|
|
4264
|
+
return C.createElement("div", { ...n, ref: t });
|
|
4265
4265
|
}
|
|
4266
4266
|
function Hp(e) {
|
|
4267
|
-
return
|
|
4267
|
+
return C.createElement("select", { ...e });
|
|
4268
4268
|
}
|
|
4269
4269
|
function jp(e) {
|
|
4270
4270
|
const { week: t, ...n } = e;
|
|
4271
|
-
return
|
|
4271
|
+
return C.createElement("tr", { ...n });
|
|
4272
4272
|
}
|
|
4273
4273
|
function zp(e) {
|
|
4274
|
-
return
|
|
4274
|
+
return C.createElement("th", { ...e });
|
|
4275
4275
|
}
|
|
4276
4276
|
function Xp(e) {
|
|
4277
|
-
return
|
|
4277
|
+
return C.createElement(
|
|
4278
4278
|
"thead",
|
|
4279
4279
|
{ "aria-hidden": !0 },
|
|
4280
|
-
|
|
4280
|
+
C.createElement("tr", { ...e })
|
|
4281
4281
|
);
|
|
4282
4282
|
}
|
|
4283
4283
|
function Vp(e) {
|
|
4284
4284
|
const { week: t, ...n } = e;
|
|
4285
|
-
return
|
|
4285
|
+
return C.createElement("th", { ...n });
|
|
4286
4286
|
}
|
|
4287
4287
|
function Gp(e) {
|
|
4288
|
-
return
|
|
4288
|
+
return C.createElement("th", { ...e });
|
|
4289
4289
|
}
|
|
4290
4290
|
function Up(e) {
|
|
4291
|
-
return
|
|
4291
|
+
return C.createElement("tbody", { ...e });
|
|
4292
4292
|
}
|
|
4293
4293
|
function Zp(e) {
|
|
4294
4294
|
const { components: t } = Rn();
|
|
4295
|
-
return
|
|
4295
|
+
return C.createElement(t.Dropdown, { ...e });
|
|
4296
4296
|
}
|
|
4297
4297
|
const Kp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4298
4298
|
__proto__: null,
|
|
@@ -4428,10 +4428,10 @@ function fh(e, t, n, r) {
|
|
|
4428
4428
|
let m = d;
|
|
4429
4429
|
for (; u(m, f) || l(m, f); )
|
|
4430
4430
|
h.push(m), m = i(m, 1);
|
|
4431
|
-
return h.map((
|
|
4432
|
-
const p = n.formatYearDropdown(
|
|
4431
|
+
return h.map((g) => {
|
|
4432
|
+
const p = n.formatYearDropdown(g, r);
|
|
4433
4433
|
return {
|
|
4434
|
-
value: s(
|
|
4434
|
+
value: s(g),
|
|
4435
4435
|
label: p,
|
|
4436
4436
|
disabled: !1
|
|
4437
4437
|
};
|
|
@@ -4493,14 +4493,14 @@ const Sh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4493
4493
|
...e.querySelectorAll("[data-animated-month]") ?? []
|
|
4494
4494
|
], Mh = (e) => Ln(e.querySelector("[data-animated-month]")), Ar = (e) => Ln(e.querySelector("[data-animated-caption]")), Wr = (e) => Ln(e.querySelector("[data-animated-weeks]")), kh = (e) => Ln(e.querySelector("[data-animated-nav]")), Eh = (e) => Ln(e.querySelector("[data-animated-weekdays]"));
|
|
4495
4495
|
function Dh(e, t, { classNames: n, months: r, focused: a, dateLib: o }) {
|
|
4496
|
-
const i =
|
|
4496
|
+
const i = vt(null), s = vt(r), u = vt(!1);
|
|
4497
4497
|
Dn(() => {
|
|
4498
4498
|
const l = s.current;
|
|
4499
4499
|
if (s.current = r, !t || !e.current || // safety check because the ref can be set to anything by consumers
|
|
4500
4500
|
!(e.current instanceof HTMLElement) || // validation required for the animation to work as expected
|
|
4501
4501
|
r.length === 0 || l.length === 0 || r.length !== l.length)
|
|
4502
4502
|
return;
|
|
4503
|
-
const d = o.isSameMonth(r[0].date, l[0].date), f = o.isAfter(r[0].date, l[0].date), h = f ? n[ke.caption_after_enter] : n[ke.caption_before_enter], m = f ? n[ke.weeks_after_enter] : n[ke.weeks_before_enter],
|
|
4503
|
+
const d = o.isSameMonth(r[0].date, l[0].date), f = o.isAfter(r[0].date, l[0].date), h = f ? n[ke.caption_after_enter] : n[ke.caption_before_enter], m = f ? n[ke.weeks_after_enter] : n[ke.weeks_before_enter], g = i.current, p = e.current.cloneNode(!0);
|
|
4504
4504
|
if (p instanceof HTMLElement ? (Lr(p).forEach((y) => {
|
|
4505
4505
|
if (!(y instanceof HTMLElement))
|
|
4506
4506
|
return;
|
|
@@ -4508,55 +4508,55 @@ function Dh(e, t, { classNames: n, months: r, focused: a, dateLib: o }) {
|
|
|
4508
4508
|
b && y.contains(b) && y.removeChild(b);
|
|
4509
4509
|
const _ = Ar(y);
|
|
4510
4510
|
_ && _.classList.remove(h);
|
|
4511
|
-
const
|
|
4512
|
-
|
|
4511
|
+
const x = Wr(y);
|
|
4512
|
+
x && x.classList.remove(m);
|
|
4513
4513
|
}), i.current = p) : i.current = null, u.current || d || // skip animation if a day is focused because it can cause issues to the animation and is better for a11y
|
|
4514
4514
|
a)
|
|
4515
4515
|
return;
|
|
4516
|
-
const
|
|
4517
|
-
if (
|
|
4516
|
+
const v = g instanceof HTMLElement ? Lr(g) : [], $ = Lr(e.current);
|
|
4517
|
+
if ($ && $.every((y) => y instanceof HTMLElement) && v && v.every((y) => y instanceof HTMLElement)) {
|
|
4518
4518
|
u.current = !0, e.current.style.isolation = "isolate";
|
|
4519
4519
|
const y = kh(e.current);
|
|
4520
|
-
y && (y.style.zIndex = "1"),
|
|
4521
|
-
const
|
|
4522
|
-
if (
|
|
4520
|
+
y && (y.style.zIndex = "1"), $.forEach((b, _) => {
|
|
4521
|
+
const x = v[_];
|
|
4522
|
+
if (!x)
|
|
4523
4523
|
return;
|
|
4524
4524
|
b.style.position = "relative", b.style.overflow = "hidden";
|
|
4525
4525
|
const S = Ar(b);
|
|
4526
4526
|
S && S.classList.add(h);
|
|
4527
4527
|
const M = Wr(b);
|
|
4528
4528
|
M && M.classList.add(m);
|
|
4529
|
-
const
|
|
4530
|
-
u.current = !1, e.current && (e.current.style.isolation = ""), y && (y.style.zIndex = ""), S && S.classList.remove(h), M && M.classList.remove(m), b.style.position = "", b.style.overflow = "", b.contains(
|
|
4529
|
+
const N = () => {
|
|
4530
|
+
u.current = !1, e.current && (e.current.style.isolation = ""), y && (y.style.zIndex = ""), S && S.classList.remove(h), M && M.classList.remove(m), b.style.position = "", b.style.overflow = "", b.contains(x) && b.removeChild(x);
|
|
4531
4531
|
};
|
|
4532
|
-
|
|
4533
|
-
const
|
|
4534
|
-
|
|
4535
|
-
const
|
|
4536
|
-
|
|
4537
|
-
const L = Wr(
|
|
4538
|
-
L && L.classList.add(f ? n[ke.weeks_before_exit] : n[ke.weeks_after_exit]), b.insertBefore(
|
|
4532
|
+
x.style.pointerEvents = "none", x.style.position = "absolute", x.style.overflow = "hidden", x.setAttribute("aria-hidden", "true");
|
|
4533
|
+
const E = Eh(x);
|
|
4534
|
+
E && (E.style.opacity = "0");
|
|
4535
|
+
const k = Ar(x);
|
|
4536
|
+
k && (k.classList.add(f ? n[ke.caption_before_exit] : n[ke.caption_after_exit]), k.addEventListener("animationend", N));
|
|
4537
|
+
const L = Wr(x);
|
|
4538
|
+
L && L.classList.add(f ? n[ke.weeks_before_exit] : n[ke.weeks_after_exit]), b.insertBefore(x, b.firstChild);
|
|
4539
4539
|
});
|
|
4540
4540
|
}
|
|
4541
4541
|
});
|
|
4542
4542
|
}
|
|
4543
4543
|
function Ch(e, t, n, r) {
|
|
4544
|
-
const a = e[0], o = e[e.length - 1], { ISOWeek: i, fixedWeeks: s, broadcastCalendar: u } = n ?? {}, { addDays: l, differenceInCalendarDays: d, differenceInCalendarMonths: f, endOfBroadcastWeek: h, endOfISOWeek: m, endOfMonth:
|
|
4545
|
-
for (let
|
|
4546
|
-
const L = l(_,
|
|
4547
|
-
if (t &&
|
|
4544
|
+
const a = e[0], o = e[e.length - 1], { ISOWeek: i, fixedWeeks: s, broadcastCalendar: u } = n ?? {}, { addDays: l, differenceInCalendarDays: d, differenceInCalendarMonths: f, endOfBroadcastWeek: h, endOfISOWeek: m, endOfMonth: g, endOfWeek: p, isAfter: v, startOfBroadcastWeek: $, startOfISOWeek: y, startOfWeek: b } = r, _ = u ? $(a, r) : i ? y(a) : b(a), x = u ? h(o) : i ? m(g(o)) : p(g(o)), S = d(x, _), M = f(o, a) + 1, N = [];
|
|
4545
|
+
for (let k = 0; k <= S; k++) {
|
|
4546
|
+
const L = l(_, k);
|
|
4547
|
+
if (t && v(L, t))
|
|
4548
4548
|
break;
|
|
4549
|
-
|
|
4549
|
+
N.push(L);
|
|
4550
4550
|
}
|
|
4551
|
-
const
|
|
4552
|
-
if (s &&
|
|
4553
|
-
const
|
|
4554
|
-
for (let L = 0; L <
|
|
4555
|
-
const J = l(
|
|
4556
|
-
|
|
4551
|
+
const E = (u ? 35 : 42) * M;
|
|
4552
|
+
if (s && N.length < E) {
|
|
4553
|
+
const k = E - N.length;
|
|
4554
|
+
for (let L = 0; L < k; L++) {
|
|
4555
|
+
const J = l(N[N.length - 1], 1);
|
|
4556
|
+
N.push(J);
|
|
4557
4557
|
}
|
|
4558
4558
|
}
|
|
4559
|
-
return
|
|
4559
|
+
return N;
|
|
4560
4560
|
}
|
|
4561
4561
|
function Nh(e) {
|
|
4562
4562
|
const t = [];
|
|
@@ -4586,29 +4586,29 @@ function Ta(e, t, n, r) {
|
|
|
4586
4586
|
return t && l(u, t) < 0 && (u = t), f(u);
|
|
4587
4587
|
}
|
|
4588
4588
|
function Th(e, t, n, r) {
|
|
4589
|
-
const { addDays: a, endOfBroadcastWeek: o, endOfISOWeek: i, endOfMonth: s, endOfWeek: u, getISOWeek: l, getWeek: d, startOfBroadcastWeek: f, startOfISOWeek: h, startOfWeek: m } = r,
|
|
4590
|
-
const
|
|
4589
|
+
const { addDays: a, endOfBroadcastWeek: o, endOfISOWeek: i, endOfMonth: s, endOfWeek: u, getISOWeek: l, getWeek: d, startOfBroadcastWeek: f, startOfISOWeek: h, startOfWeek: m } = r, g = e.reduce((p, v) => {
|
|
4590
|
+
const $ = n.broadcastCalendar ? f(v, r) : n.ISOWeek ? h(v) : m(v), y = n.broadcastCalendar ? o(v) : n.ISOWeek ? i(s(v)) : u(s(v)), b = t.filter((M) => M >= $ && M <= y), _ = n.broadcastCalendar ? 35 : 42;
|
|
4591
4591
|
if (n.fixedWeeks && b.length < _) {
|
|
4592
|
-
const M = t.filter((
|
|
4593
|
-
const
|
|
4594
|
-
return
|
|
4592
|
+
const M = t.filter((N) => {
|
|
4593
|
+
const E = _ - b.length;
|
|
4594
|
+
return N > y && N <= a(y, E);
|
|
4595
4595
|
});
|
|
4596
4596
|
b.push(...M);
|
|
4597
4597
|
}
|
|
4598
|
-
const
|
|
4599
|
-
const
|
|
4600
|
-
return
|
|
4601
|
-
}, []), S = new _p(
|
|
4598
|
+
const x = b.reduce((M, N) => {
|
|
4599
|
+
const E = n.ISOWeek ? l(N) : d(N), k = M.find((J) => J.weekNumber === E), L = new Zs(N, v, r);
|
|
4600
|
+
return k ? k.days.push(L) : M.push(new xp(E, [L])), M;
|
|
4601
|
+
}, []), S = new _p(v, x);
|
|
4602
4602
|
return p.push(S), p;
|
|
4603
4603
|
}, []);
|
|
4604
|
-
return n.reverseMonths ?
|
|
4604
|
+
return n.reverseMonths ? g.reverse() : g;
|
|
4605
4605
|
}
|
|
4606
4606
|
function Ph(e, t) {
|
|
4607
4607
|
let { startMonth: n, endMonth: r } = e;
|
|
4608
|
-
const { startOfYear: a, startOfDay: o, startOfMonth: i, endOfMonth: s, addYears: u, endOfYear: l, newDate: d, today: f } = t, { fromYear: h, toYear: m, fromMonth:
|
|
4609
|
-
!n &&
|
|
4610
|
-
const
|
|
4611
|
-
return n ? n = i(n) : h ? n = d(h, 0, 1) : !n &&
|
|
4608
|
+
const { startOfYear: a, startOfDay: o, startOfMonth: i, endOfMonth: s, addYears: u, endOfYear: l, newDate: d, today: f } = t, { fromYear: h, toYear: m, fromMonth: g, toMonth: p } = e;
|
|
4609
|
+
!n && g && (n = g), !n && h && (n = t.newDate(h, 0, 1)), !r && p && (r = p), !r && m && (r = d(m, 11, 31));
|
|
4610
|
+
const v = e.captionLayout === "dropdown" || e.captionLayout === "dropdown-years";
|
|
4611
|
+
return n ? n = i(n) : h ? n = d(h, 0, 1) : !n && v && (n = a(u(e.today ?? f(), -100))), r ? r = s(r) : m ? r = d(m, 11, 31) : !r && v && (r = l(e.today ?? f())), [
|
|
4612
4612
|
n && o(n),
|
|
4613
4613
|
r && o(r)
|
|
4614
4614
|
];
|
|
@@ -4645,11 +4645,11 @@ function Wh(e, t) {
|
|
|
4645
4645
|
const _ = Ta(e, n, r, t);
|
|
4646
4646
|
u(_);
|
|
4647
4647
|
}, [e.timeZone]);
|
|
4648
|
-
const l = Oh(s, r, e, t), d = Ch(l, e.endMonth ? o(e.endMonth) : void 0, e, t), f = Th(l, d, e, t), h = Ah(f), m = Nh(f),
|
|
4649
|
-
if (
|
|
4648
|
+
const l = Oh(s, r, e, t), d = Ch(l, e.endMonth ? o(e.endMonth) : void 0, e, t), f = Th(l, d, e, t), h = Ah(f), m = Nh(f), g = Lh(s, n, e, t), p = Rh(s, r, e, t), { disableNavigation: v, onMonthChange: $ } = e, y = (_) => h.some((x) => x.days.some((S) => S.isEqualTo(_))), b = (_) => {
|
|
4649
|
+
if (v)
|
|
4650
4650
|
return;
|
|
4651
|
-
let
|
|
4652
|
-
n &&
|
|
4651
|
+
let x = a(_);
|
|
4652
|
+
n && x < a(n) && (x = a(n)), r && x > a(r) && (x = a(r)), u(x), $ == null || $(x);
|
|
4653
4653
|
};
|
|
4654
4654
|
return {
|
|
4655
4655
|
months: f,
|
|
@@ -4657,7 +4657,7 @@ function Wh(e, t) {
|
|
|
4657
4657
|
days: m,
|
|
4658
4658
|
navStart: n,
|
|
4659
4659
|
navEnd: r,
|
|
4660
|
-
previousMonth:
|
|
4660
|
+
previousMonth: g,
|
|
4661
4661
|
nextMonth: p,
|
|
4662
4662
|
goToMonth: b,
|
|
4663
4663
|
goToDay: (_) => {
|
|
@@ -4681,16 +4681,16 @@ function Ih(e, t, n, r) {
|
|
|
4681
4681
|
return a || (a = e.find((i) => Pa(t(i)))), a;
|
|
4682
4682
|
}
|
|
4683
4683
|
function Fh(e, t, n, r, a, o, i) {
|
|
4684
|
-
const { ISOWeek: s, broadcastCalendar: u } = o, { addDays: l, addMonths: d, addWeeks: f, addYears: h, endOfBroadcastWeek: m, endOfISOWeek:
|
|
4685
|
-
let
|
|
4684
|
+
const { ISOWeek: s, broadcastCalendar: u } = o, { addDays: l, addMonths: d, addWeeks: f, addYears: h, endOfBroadcastWeek: m, endOfISOWeek: g, endOfWeek: p, max: v, min: $, startOfBroadcastWeek: y, startOfISOWeek: b, startOfWeek: _ } = i;
|
|
4685
|
+
let x = {
|
|
4686
4686
|
day: l,
|
|
4687
4687
|
week: f,
|
|
4688
4688
|
month: d,
|
|
4689
4689
|
year: h,
|
|
4690
4690
|
startOfWeek: (S) => u ? y(S, i) : s ? b(S) : _(S),
|
|
4691
|
-
endOfWeek: (S) => u ? m(S) : s ?
|
|
4691
|
+
endOfWeek: (S) => u ? m(S) : s ? g(S) : p(S)
|
|
4692
4692
|
}[e](n, t === "after" ? 1 : -1);
|
|
4693
|
-
return t === "before" && r ?
|
|
4693
|
+
return t === "before" && r ? x = v([r, x]) : t === "after" && a && (x = $([a, x])), x;
|
|
4694
4694
|
}
|
|
4695
4695
|
function uu(e, t, n, r, a, o, i, s = 0) {
|
|
4696
4696
|
if (s > 365)
|
|
@@ -4719,15 +4719,15 @@ function Bh(e, t) {
|
|
|
4719
4719
|
const { selected: n, required: r, onSelect: a } = e, [o, i] = vr(n, a ? n : void 0), s = a ? n : o, { isSameDay: u } = t, l = (h) => (s == null ? void 0 : s.some((m) => u(m, h))) ?? !1, { min: d, max: f } = e;
|
|
4720
4720
|
return {
|
|
4721
4721
|
selected: s,
|
|
4722
|
-
select: (h, m,
|
|
4722
|
+
select: (h, m, g) => {
|
|
4723
4723
|
let p = [...s ?? []];
|
|
4724
4724
|
if (l(h)) {
|
|
4725
4725
|
if ((s == null ? void 0 : s.length) === d || r && (s == null ? void 0 : s.length) === 1)
|
|
4726
4726
|
return;
|
|
4727
|
-
p = s == null ? void 0 : s.filter((
|
|
4727
|
+
p = s == null ? void 0 : s.filter((v) => !u(v, h));
|
|
4728
4728
|
} else
|
|
4729
4729
|
(s == null ? void 0 : s.length) === f ? p = [h] : p = [...p, h];
|
|
4730
|
-
return a || i(p), a == null || a(p, h, m,
|
|
4730
|
+
return a || i(p), a == null || a(p, h, m, g), p;
|
|
4731
4731
|
},
|
|
4732
4732
|
isSelected: l
|
|
4733
4733
|
};
|
|
@@ -4798,7 +4798,7 @@ function zh(e, t) {
|
|
|
4798
4798
|
return {
|
|
4799
4799
|
selected: l,
|
|
4800
4800
|
select: (d, f, h) => {
|
|
4801
|
-
const { min: m, max:
|
|
4801
|
+
const { min: m, max: g } = e, p = d ? Yh(d, l, m, g, o, t) : void 0;
|
|
4802
4802
|
return r && n && p != null && p.from && p.to && jh({ from: p.from, to: p.to }, n, t) && (p.from = d, p.to = void 0), i || u(p), i == null || i(p, d, f, h), p;
|
|
4803
4803
|
},
|
|
4804
4804
|
isSelected: (d) => l && st(l, d, !1, t)
|
|
@@ -4869,13 +4869,13 @@ function Gh(e) {
|
|
|
4869
4869
|
n.formatters,
|
|
4870
4870
|
n.labels,
|
|
4871
4871
|
n.classNames
|
|
4872
|
-
]), { captionLayout: l, mode: d, navLayout: f, numberOfMonths: h = 1, onDayBlur: m, onDayClick:
|
|
4873
|
-
|
|
4874
|
-
}, [
|
|
4872
|
+
]), { captionLayout: l, mode: d, navLayout: f, numberOfMonths: h = 1, onDayBlur: m, onDayClick: g, onDayFocus: p, onDayKeyDown: v, onDayMouseEnter: $, onDayMouseLeave: y, onNextClick: b, onPrevClick: _, showWeekNumber: x, styles: S } = n, { formatCaption: M, formatDay: N, formatMonthDropdown: E, formatWeekNumber: k, formatWeekNumberHeader: L, formatWeekdayName: J, formatYearDropdown: Y } = a, H = Wh(n, i), { days: D, months: j, navStart: G, navEnd: R, previousMonth: T, nextMonth: W, goToMonth: ee } = H, A = $p(D, n, G, R, i), { isSelected: be, select: Se, selected: je } = Vh(n, i) ?? {}, { blur: de, focused: ye, isFocusTarget: nt, moveFocus: $t, setFocused: rt } = qh(n, H, A, be ?? (() => !1), i), { labelDayButton: I, labelGridcell: z, labelGrid: F, labelMonthDropdown: q, labelNav: ce, labelPrevious: fe, labelNext: Ne, labelWeekday: Le, labelWeekNumber: ne, labelWeekNumberHeader: re, labelYearDropdown: ze } = o, An = Mr(() => dh(i, n.ISOWeek), [i, n.ISOWeek]), Go = d !== void 0 || g !== void 0, _r = Oe(() => {
|
|
4873
|
+
T && (ee(T), _ == null || _(T));
|
|
4874
|
+
}, [T, ee, _]), xr = Oe(() => {
|
|
4875
4875
|
W && (ee(W), b == null || b(W));
|
|
4876
4876
|
}, [ee, W, b]), Ll = Oe((B, oe) => (V) => {
|
|
4877
|
-
V.preventDefault(), V.stopPropagation(), rt(B), Se == null || Se(B.date, oe, V),
|
|
4878
|
-
}, [Se,
|
|
4877
|
+
V.preventDefault(), V.stopPropagation(), rt(B), Se == null || Se(B.date, oe, V), g == null || g(B.date, oe, V);
|
|
4878
|
+
}, [Se, g, rt]), Al = Oe((B, oe) => (V) => {
|
|
4879
4879
|
rt(B), p == null || p(B.date, oe, V);
|
|
4880
4880
|
}, [p, rt]), Wl = Oe((B, oe) => (V) => {
|
|
4881
4881
|
de(), m == null || m(B.date, oe, V);
|
|
@@ -4899,12 +4899,12 @@ function Gh(e) {
|
|
|
4899
4899
|
if (dt[V.key]) {
|
|
4900
4900
|
V.preventDefault(), V.stopPropagation();
|
|
4901
4901
|
const [Ae, Wn] = dt[V.key];
|
|
4902
|
-
|
|
4902
|
+
$t(Ae, Wn);
|
|
4903
4903
|
}
|
|
4904
|
-
|
|
4905
|
-
}, [
|
|
4906
|
-
|
|
4907
|
-
}, [
|
|
4904
|
+
v == null || v(B.date, oe, V);
|
|
4905
|
+
}, [$t, v, n.dir]), Fl = Oe((B, oe) => (V) => {
|
|
4906
|
+
$ == null || $(B.date, oe, V);
|
|
4907
|
+
}, [$]), ql = Oe((B, oe) => (V) => {
|
|
4908
4908
|
y == null || y(B.date, oe, V);
|
|
4909
4909
|
}, [y]), Bl = Oe((B) => (oe) => {
|
|
4910
4910
|
const V = Number(oe.target.value), dt = i.setMonth(i.startOfMonth(B), V);
|
|
@@ -4915,7 +4915,7 @@ function Gh(e) {
|
|
|
4915
4915
|
}, [i, ee]), { className: Hl, style: jl } = Mr(() => ({
|
|
4916
4916
|
className: [u[P.Root], n.className].filter(Boolean).join(" "),
|
|
4917
4917
|
style: { ...S == null ? void 0 : S[P.Root], ...n.style }
|
|
4918
|
-
}), [u, n.className, n.style, S]), zl = Jp(n), Uo =
|
|
4918
|
+
}), [u, n.className, n.style, S]), zl = Jp(n), Uo = vt(null);
|
|
4919
4919
|
Dh(Uo, !!n.animate, {
|
|
4920
4920
|
classNames: u,
|
|
4921
4921
|
months: j,
|
|
@@ -4929,7 +4929,7 @@ function Gh(e) {
|
|
|
4929
4929
|
isSelected: be,
|
|
4930
4930
|
months: j,
|
|
4931
4931
|
nextMonth: W,
|
|
4932
|
-
previousMonth:
|
|
4932
|
+
previousMonth: T,
|
|
4933
4933
|
goToMonth: ee,
|
|
4934
4934
|
getModifiers: A,
|
|
4935
4935
|
components: r,
|
|
@@ -4938,32 +4938,32 @@ function Gh(e) {
|
|
|
4938
4938
|
labels: o,
|
|
4939
4939
|
formatters: a
|
|
4940
4940
|
};
|
|
4941
|
-
return
|
|
4941
|
+
return C.createElement(
|
|
4942
4942
|
nu.Provider,
|
|
4943
4943
|
{ value: Xl },
|
|
4944
|
-
|
|
4944
|
+
C.createElement(
|
|
4945
4945
|
r.Root,
|
|
4946
4946
|
{ rootRef: n.animate ? Uo : void 0, className: Hl, style: jl, dir: n.dir, id: n.id, lang: n.lang, nonce: n.nonce, title: n.title, role: n.role, "aria-label": n["aria-label"], ...zl },
|
|
4947
|
-
|
|
4947
|
+
C.createElement(
|
|
4948
4948
|
r.Months,
|
|
4949
4949
|
{ className: u[P.Months], style: S == null ? void 0 : S[P.Months] },
|
|
4950
|
-
!n.hideNavigation && !f &&
|
|
4950
|
+
!n.hideNavigation && !f && C.createElement(r.Nav, { "data-animated-nav": n.animate ? "true" : void 0, className: u[P.Nav], style: S == null ? void 0 : S[P.Nav], "aria-label": ce(), onPreviousClick: _r, onNextClick: xr, previousMonth: T, nextMonth: W }),
|
|
4951
4951
|
j.map((B, oe) => {
|
|
4952
4952
|
const V = lh(B.date, G, R, a, i), dt = fh(G, R, a, i);
|
|
4953
|
-
return
|
|
4953
|
+
return C.createElement(
|
|
4954
4954
|
r.Month,
|
|
4955
4955
|
{ "data-animated-month": n.animate ? "true" : void 0, className: u[P.Month], style: S == null ? void 0 : S[P.Month], key: oe, displayIndex: oe, calendarMonth: B },
|
|
4956
|
-
f === "around" && !n.hideNavigation && oe === 0 &&
|
|
4956
|
+
f === "around" && !n.hideNavigation && oe === 0 && C.createElement(
|
|
4957
4957
|
r.PreviousMonthButton,
|
|
4958
|
-
{ type: "button", className: u[P.PreviousMonthButton], tabIndex:
|
|
4959
|
-
|
|
4958
|
+
{ type: "button", className: u[P.PreviousMonthButton], tabIndex: T ? void 0 : -1, "aria-disabled": T ? void 0 : !0, "aria-label": fe(T), onClick: _r, "data-animated-button": n.animate ? "true" : void 0 },
|
|
4959
|
+
C.createElement(r.Chevron, { disabled: T ? void 0 : !0, className: u[P.Chevron], orientation: n.dir === "rtl" ? "right" : "left" })
|
|
4960
4960
|
),
|
|
4961
|
-
|
|
4961
|
+
C.createElement(r.MonthCaption, { "data-animated-caption": n.animate ? "true" : void 0, className: u[P.MonthCaption], style: S == null ? void 0 : S[P.MonthCaption], calendarMonth: B, displayIndex: oe }, l != null && l.startsWith("dropdown") ? C.createElement(
|
|
4962
4962
|
r.DropdownNav,
|
|
4963
4963
|
{ className: u[P.Dropdowns], style: S == null ? void 0 : S[P.Dropdowns] },
|
|
4964
|
-
l === "dropdown" || l === "dropdown-months" ?
|
|
4965
|
-
l === "dropdown" || l === "dropdown-years" ?
|
|
4966
|
-
|
|
4964
|
+
l === "dropdown" || l === "dropdown-months" ? C.createElement(r.MonthsDropdown, { className: u[P.MonthsDropdown], "aria-label": q(), classNames: u, components: r, disabled: !!n.disableNavigation, onChange: Bl(B.date), options: V, style: S == null ? void 0 : S[P.Dropdown], value: i.getMonth(B.date) }) : C.createElement("span", null, E(B.date, i)),
|
|
4965
|
+
l === "dropdown" || l === "dropdown-years" ? C.createElement(r.YearsDropdown, { className: u[P.YearsDropdown], "aria-label": ze(i.options), classNames: u, components: r, disabled: !!n.disableNavigation, onChange: Yl(B.date), options: dt, style: S == null ? void 0 : S[P.Dropdown], value: i.getYear(B.date) }) : C.createElement("span", null, Y(B.date, i)),
|
|
4966
|
+
C.createElement("span", { role: "status", "aria-live": "polite", style: {
|
|
4967
4967
|
border: 0,
|
|
4968
4968
|
clip: "rect(0 0 0 0)",
|
|
4969
4969
|
height: "1px",
|
|
@@ -4975,28 +4975,28 @@ function Gh(e) {
|
|
|
4975
4975
|
whiteSpace: "nowrap",
|
|
4976
4976
|
wordWrap: "normal"
|
|
4977
4977
|
} }, M(B.date, i.options, i))
|
|
4978
|
-
) :
|
|
4979
|
-
f === "around" && !n.hideNavigation && oe === h - 1 &&
|
|
4978
|
+
) : C.createElement(r.CaptionLabel, { className: u[P.CaptionLabel], role: "status", "aria-live": "polite" }, M(B.date, i.options, i))),
|
|
4979
|
+
f === "around" && !n.hideNavigation && oe === h - 1 && C.createElement(
|
|
4980
4980
|
r.NextMonthButton,
|
|
4981
4981
|
{ type: "button", className: u[P.NextMonthButton], tabIndex: W ? void 0 : -1, "aria-disabled": W ? void 0 : !0, "aria-label": Ne(W), onClick: xr, "data-animated-button": n.animate ? "true" : void 0 },
|
|
4982
|
-
|
|
4982
|
+
C.createElement(r.Chevron, { disabled: W ? void 0 : !0, className: u[P.Chevron], orientation: n.dir === "rtl" ? "left" : "right" })
|
|
4983
4983
|
),
|
|
4984
|
-
oe === h - 1 && f === "after" && !n.hideNavigation &&
|
|
4985
|
-
|
|
4984
|
+
oe === h - 1 && f === "after" && !n.hideNavigation && C.createElement(r.Nav, { "data-animated-nav": n.animate ? "true" : void 0, className: u[P.Nav], style: S == null ? void 0 : S[P.Nav], "aria-label": ce(), onPreviousClick: _r, onNextClick: xr, previousMonth: T, nextMonth: W }),
|
|
4985
|
+
C.createElement(
|
|
4986
4986
|
r.MonthGrid,
|
|
4987
4987
|
{ role: "grid", "aria-multiselectable": d === "multiple" || d === "range", "aria-label": F(B.date, i.options, i) || void 0, className: u[P.MonthGrid], style: S == null ? void 0 : S[P.MonthGrid] },
|
|
4988
|
-
!n.hideWeekdays &&
|
|
4988
|
+
!n.hideWeekdays && C.createElement(
|
|
4989
4989
|
r.Weekdays,
|
|
4990
4990
|
{ "data-animated-weekdays": n.animate ? "true" : void 0, className: u[P.Weekdays], style: S == null ? void 0 : S[P.Weekdays] },
|
|
4991
|
-
|
|
4992
|
-
An.map((Ae, Wn) =>
|
|
4991
|
+
x && C.createElement(r.WeekNumberHeader, { "aria-label": re(i.options), className: u[P.WeekNumberHeader], style: S == null ? void 0 : S[P.WeekNumberHeader], scope: "col" }, L()),
|
|
4992
|
+
An.map((Ae, Wn) => C.createElement(r.Weekday, { "aria-label": Le(Ae, i.options, i), className: u[P.Weekday], key: Wn, style: S == null ? void 0 : S[P.Weekday], scope: "col" }, J(Ae, i.options, i)))
|
|
4993
4993
|
),
|
|
4994
|
-
|
|
4994
|
+
C.createElement(r.Weeks, { "data-animated-weeks": n.animate ? "true" : void 0, className: u[P.Weeks], style: S == null ? void 0 : S[P.Weeks] }, B.weeks.map((Ae, Wn) => C.createElement(
|
|
4995
4995
|
r.Week,
|
|
4996
4996
|
{ className: u[P.Week], key: Ae.weekNumber, style: S == null ? void 0 : S[P.Week], week: Ae },
|
|
4997
|
-
|
|
4997
|
+
x && C.createElement(r.WeekNumber, { week: Ae, style: S == null ? void 0 : S[P.WeekNumber], "aria-label": ne(Ae.weekNumber, {
|
|
4998
4998
|
locale: s
|
|
4999
|
-
}), className: u[P.WeekNumber], scope: "row", role: "rowheader" },
|
|
4999
|
+
}), className: u[P.WeekNumber], scope: "row", role: "rowheader" }, k(Ae.weekNumber, i)),
|
|
5000
5000
|
Ae.days.map((ge) => {
|
|
5001
5001
|
const { date: Xe } = ge, U = A(ge);
|
|
5002
5002
|
if (U[ae.focused] = !U.hidden && !!(ye != null && ye.isEqualTo(ge)), U[qe.selected] = (be == null ? void 0 : be(Xe)) || U.selected, Po(je)) {
|
|
@@ -5004,14 +5004,14 @@ function Gh(e) {
|
|
|
5004
5004
|
U[qe.range_start] = !!($r && Sr && i.isSameDay(Xe, $r)), U[qe.range_end] = !!($r && Sr && i.isSameDay(Xe, Sr)), U[qe.range_middle] = st(je, Xe, !0, i);
|
|
5005
5005
|
}
|
|
5006
5006
|
const Vl = ch(U, S, n.modifiersStyles), Gl = Sp(U, u, n.modifiersClassNames), Ul = !Go && !U.hidden ? z(Xe, U, i.options, i) : void 0;
|
|
5007
|
-
return
|
|
5007
|
+
return C.createElement(r.Day, { key: `${i.format(Xe, "yyyy-MM-dd")}_${i.format(ge.displayMonth, "yyyy-MM")}`, day: ge, modifiers: U, className: Gl.join(" "), style: Vl, role: "gridcell", "aria-selected": U.selected || void 0, "aria-label": Ul, "data-day": i.format(Xe, "yyyy-MM-dd"), "data-month": ge.outside ? i.format(Xe, "yyyy-MM") : void 0, "data-selected": U.selected || void 0, "data-disabled": U.disabled || void 0, "data-hidden": U.hidden || void 0, "data-outside": ge.outside || void 0, "data-focused": U.focused || void 0, "data-today": U.today || void 0 }, !U.hidden && Go ? C.createElement(r.DayButton, { className: u[P.DayButton], style: S == null ? void 0 : S[P.DayButton], type: "button", day: ge, modifiers: U, disabled: U.disabled || void 0, tabIndex: nt(ge) ? 0 : -1, "aria-label": I(Xe, U, i.options, i), onClick: Ll(ge, U), onBlur: Wl(ge, U), onFocus: Al(ge, U), onKeyDown: Il(ge, U), onMouseEnter: Fl(ge, U), onMouseLeave: ql(ge, U) }, N(Xe, i.options, i)) : !U.hidden && N(ge.date, i.options, i));
|
|
5008
5008
|
})
|
|
5009
5009
|
)))
|
|
5010
5010
|
)
|
|
5011
5011
|
);
|
|
5012
5012
|
})
|
|
5013
5013
|
),
|
|
5014
|
-
n.footer &&
|
|
5014
|
+
n.footer && C.createElement(r.Footer, { className: u[P.Footer], style: S == null ? void 0 : S[P.Footer], role: "status", "aria-live": "polite" }, n.footer)
|
|
5015
5015
|
)
|
|
5016
5016
|
);
|
|
5017
5017
|
}
|
|
@@ -5157,7 +5157,7 @@ const um = /* @__PURE__ */ am(sm), lm = {
|
|
|
5157
5157
|
"purpur-button--tertiary-purple-negative": "_purpur-button--tertiary-purple-negative_w455q_166",
|
|
5158
5158
|
"purpur-button--text-negative": "_purpur-button--text-negative_w455q_181",
|
|
5159
5159
|
"purpur-button--text": "_purpur-button--text_w455q_181"
|
|
5160
|
-
}, cm = um.bind(lm),
|
|
5160
|
+
}, cm = um.bind(lm), St = "purpur-button", co = De(
|
|
5161
5161
|
({
|
|
5162
5162
|
children: e,
|
|
5163
5163
|
className: t,
|
|
@@ -5176,19 +5176,19 @@ const um = /* @__PURE__ */ am(sm), lm = {
|
|
|
5176
5176
|
return null;
|
|
5177
5177
|
const m = cm(
|
|
5178
5178
|
[
|
|
5179
|
-
|
|
5180
|
-
`${
|
|
5181
|
-
`${
|
|
5179
|
+
St,
|
|
5180
|
+
`${St}--${i ? `${l}-negative` : l}`,
|
|
5181
|
+
`${St}--${u}`
|
|
5182
5182
|
],
|
|
5183
5183
|
{
|
|
5184
|
-
[`${
|
|
5185
|
-
[`${
|
|
5186
|
-
[`${
|
|
5187
|
-
[`${
|
|
5184
|
+
[`${St}--icon-only`]: a,
|
|
5185
|
+
[`${St}--negative`]: i,
|
|
5186
|
+
[`${St}--full-width`]: r,
|
|
5187
|
+
[`${St}--disabled`]: n || o
|
|
5188
5188
|
},
|
|
5189
5189
|
t
|
|
5190
|
-
),
|
|
5191
|
-
n || o ?
|
|
5190
|
+
), g = (v) => {
|
|
5191
|
+
n || o ? v.preventDefault() : s && s(v);
|
|
5192
5192
|
}, p = !!f["aria-disabled"] || n || o;
|
|
5193
5193
|
return /* @__PURE__ */ te(
|
|
5194
5194
|
"button",
|
|
@@ -5197,7 +5197,7 @@ const um = /* @__PURE__ */ am(sm), lm = {
|
|
|
5197
5197
|
type: d,
|
|
5198
5198
|
ref: h,
|
|
5199
5199
|
"aria-disabled": p,
|
|
5200
|
-
onClick:
|
|
5200
|
+
onClick: g,
|
|
5201
5201
|
...f,
|
|
5202
5202
|
children: [
|
|
5203
5203
|
o && /* @__PURE__ */ w(
|
|
@@ -5357,7 +5357,7 @@ const Ir = {
|
|
|
5357
5357
|
abbreviated: ["sunn.", "maan.", "tiis.", "kesk.", "torst.", "perj.", "la"]
|
|
5358
5358
|
};
|
|
5359
5359
|
Ir.narrow, Ir.short, Ir.abbreviated;
|
|
5360
|
-
const $m = "
|
|
5360
|
+
const $m = "_root_bdmmk_3", Sm = "_months_bdmmk_88", Mm = "_month_bdmmk_88", km = "_day_button_bdmmk_96", Em = "_day_bdmmk_96", Dm = "_selected_bdmmk_105", Cm = "_month_caption_bdmmk_111", Nm = "_dropdown_root_bdmmk_120", Om = "_weekday_bdmmk_124", Tm = "_week_number_bdmmk_125", Pm = "_range_middle_bdmmk_135", Rm = "_disabled_bdmmk_144", Lm = "_outside_bdmmk_153", Am = "_button_next_bdmmk_161", Wm = "_button_previous_bdmmk_162", ve = {
|
|
5361
5361
|
root: $m,
|
|
5362
5362
|
months: Sm,
|
|
5363
5363
|
month: Mm,
|
|
@@ -5374,47 +5374,47 @@ const $m = "_root_o5ep3_3", Sm = "_months_o5ep3_88", Mm = "_month_o5ep3_88", km
|
|
|
5374
5374
|
button_next: Am,
|
|
5375
5375
|
button_previous: Wm
|
|
5376
5376
|
}, fo = (e) => {
|
|
5377
|
-
const t = ru(),
|
|
5377
|
+
const { firstElementRef: t, ...n } = e, r = ru(), a = {
|
|
5378
5378
|
...ve,
|
|
5379
|
-
root: `${
|
|
5380
|
-
day_button: `${
|
|
5381
|
-
day: `${
|
|
5382
|
-
weekday: `${
|
|
5383
|
-
week_number: `${
|
|
5384
|
-
month_caption: `${
|
|
5385
|
-
disabled: `${
|
|
5386
|
-
dropdown: `${
|
|
5387
|
-
years_dropdown: `${
|
|
5388
|
-
outside: `${
|
|
5389
|
-
dropdown_root: `${
|
|
5390
|
-
months: `${
|
|
5391
|
-
month: `${
|
|
5392
|
-
button_next: `${
|
|
5393
|
-
button_previous: `${
|
|
5394
|
-
},
|
|
5379
|
+
root: `${r.root} ${ve.root}`,
|
|
5380
|
+
day_button: `${r.day_button} ${ve.day_button}`,
|
|
5381
|
+
day: `${r.day} ${ve.day}`,
|
|
5382
|
+
weekday: `${r.weekday} ${ve.weekday}`,
|
|
5383
|
+
week_number: `${r.week_number} ${ve.week_number}`,
|
|
5384
|
+
month_caption: `${r.month_caption} ${ve.month_caption}`,
|
|
5385
|
+
disabled: `${r.disabled} ${ve.disabled}`,
|
|
5386
|
+
dropdown: `${r.dropdown} ${ve.dropdown}`,
|
|
5387
|
+
years_dropdown: `${r.years_dropdown} ${ve.years_dropdown}`,
|
|
5388
|
+
outside: `${r.outside} ${ve.outside}`,
|
|
5389
|
+
dropdown_root: `${r.dropdown_root} ${ve.dropdown_root}`,
|
|
5390
|
+
months: `${r.months} ${ve.months}`,
|
|
5391
|
+
month: `${r.month} ${ve.month}`,
|
|
5392
|
+
button_next: `${r.button_next} ${ve.button_next}`,
|
|
5393
|
+
button_previous: `${r.button_previous} ${ve.button_previous}`
|
|
5394
|
+
}, o = (/* @__PURE__ */ new Date()).getFullYear() - 10, i = (/* @__PURE__ */ new Date()).getFullYear() + 10, [s, u] = Fe();
|
|
5395
5395
|
return Cn(() => {
|
|
5396
|
-
|
|
5397
|
-
}, [
|
|
5396
|
+
n.mode === "single" && n.selected instanceof Date ? u(n.selected) : n.mode === "range" && n.selected && typeof n.selected == "object" && "from" in n.selected && n.selected.from instanceof Date && u(n.selected.from);
|
|
5397
|
+
}, [n.selected, n.mode]), /* @__PURE__ */ w(
|
|
5398
5398
|
Gh,
|
|
5399
5399
|
{
|
|
5400
5400
|
weekStartsOn: 1,
|
|
5401
5401
|
captionLayout: "dropdown-years",
|
|
5402
|
-
startMonth: new Date(
|
|
5403
|
-
endMonth: new Date(
|
|
5404
|
-
...
|
|
5405
|
-
month:
|
|
5406
|
-
onMonthChange:
|
|
5407
|
-
classNames:
|
|
5402
|
+
startMonth: new Date(o, 0),
|
|
5403
|
+
endMonth: new Date(i, 11),
|
|
5404
|
+
...n,
|
|
5405
|
+
month: s,
|
|
5406
|
+
onMonthChange: u,
|
|
5407
|
+
classNames: a,
|
|
5408
5408
|
navLayout: "around",
|
|
5409
5409
|
components: {
|
|
5410
|
-
PreviousMonthButton: (
|
|
5411
|
-
NextMonthButton: (
|
|
5410
|
+
PreviousMonthButton: (l) => /* @__PURE__ */ w(co, { ref: t, variant: "text", size: "sm", iconOnly: !0, ...l, children: /* @__PURE__ */ w(lu, { size: "sm" }) }),
|
|
5411
|
+
NextMonthButton: (l) => /* @__PURE__ */ w(co, { variant: "text", size: "sm", iconOnly: !0, ...l, children: /* @__PURE__ */ w(cu, { size: "sm" }) })
|
|
5412
5412
|
}
|
|
5413
5413
|
}
|
|
5414
5414
|
);
|
|
5415
5415
|
};
|
|
5416
5416
|
fo.displayName = "Calendar";
|
|
5417
|
-
var Im = Object.defineProperty, Fm = (e, t, n) => t in e ? Im(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n,
|
|
5417
|
+
var Im = Object.defineProperty, Fm = (e, t, n) => t in e ? Im(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, O = (e, t, n) => Fm(e, typeof t != "symbol" ? t + "" : t, n);
|
|
5418
5418
|
const qm = {
|
|
5419
5419
|
LG: "lg"
|
|
5420
5420
|
};
|
|
@@ -5557,7 +5557,7 @@ const Jm = /* @__PURE__ */ Zm(Qm), eg = {
|
|
|
5557
5557
|
"purpur-button--tertiary-purple-negative": "_purpur-button--tertiary-purple-negative_w455q_166",
|
|
5558
5558
|
"purpur-button--text-negative": "_purpur-button--text-negative_w455q_181",
|
|
5559
5559
|
"purpur-button--text": "_purpur-button--text_w455q_181"
|
|
5560
|
-
}, tg = Jm.bind(eg),
|
|
5560
|
+
}, tg = Jm.bind(eg), Mt = "purpur-button", du = De(
|
|
5561
5561
|
({
|
|
5562
5562
|
children: e,
|
|
5563
5563
|
className: t,
|
|
@@ -5576,19 +5576,19 @@ const Jm = /* @__PURE__ */ Zm(Qm), eg = {
|
|
|
5576
5576
|
return null;
|
|
5577
5577
|
const m = tg(
|
|
5578
5578
|
[
|
|
5579
|
-
|
|
5580
|
-
`${
|
|
5581
|
-
`${
|
|
5579
|
+
Mt,
|
|
5580
|
+
`${Mt}--${i ? `${l}-negative` : l}`,
|
|
5581
|
+
`${Mt}--${u}`
|
|
5582
5582
|
],
|
|
5583
5583
|
{
|
|
5584
|
-
[`${
|
|
5585
|
-
[`${
|
|
5586
|
-
[`${
|
|
5587
|
-
[`${
|
|
5584
|
+
[`${Mt}--icon-only`]: a,
|
|
5585
|
+
[`${Mt}--negative`]: i,
|
|
5586
|
+
[`${Mt}--full-width`]: r,
|
|
5587
|
+
[`${Mt}--disabled`]: n || o
|
|
5588
5588
|
},
|
|
5589
5589
|
t
|
|
5590
|
-
),
|
|
5591
|
-
n || o ?
|
|
5590
|
+
), g = (v) => {
|
|
5591
|
+
n || o ? v.preventDefault() : s && s(v);
|
|
5592
5592
|
}, p = !!f["aria-disabled"] || n || o;
|
|
5593
5593
|
return /* @__PURE__ */ te(
|
|
5594
5594
|
"button",
|
|
@@ -5597,7 +5597,7 @@ const Jm = /* @__PURE__ */ Zm(Qm), eg = {
|
|
|
5597
5597
|
type: d,
|
|
5598
5598
|
ref: h,
|
|
5599
5599
|
"aria-disabled": p,
|
|
5600
|
-
onClick:
|
|
5600
|
+
onClick: g,
|
|
5601
5601
|
...f,
|
|
5602
5602
|
children: [
|
|
5603
5603
|
o && /* @__PURE__ */ w(
|
|
@@ -6180,7 +6180,7 @@ const fv = /* @__PURE__ */ lv(dv), pv = {
|
|
|
6180
6180
|
"purpur-text-field__input--error": "_purpur-text-field__input--error_3gl1k_94",
|
|
6181
6181
|
"purpur-text-field__adornment-container": "_purpur-text-field__adornment-container_3gl1k_106",
|
|
6182
6182
|
"purpur-text-field__valid-icon": "_purpur-text-field__valid-icon_3gl1k_111"
|
|
6183
|
-
}, hv = (e) =>
|
|
6183
|
+
}, hv = (e) => vt(e), ot = fv.bind(pv), we = "purpur-text-field", vu = De(
|
|
6184
6184
|
({
|
|
6185
6185
|
["data-testid"]: e,
|
|
6186
6186
|
className: t,
|
|
@@ -6196,19 +6196,19 @@ const fv = /* @__PURE__ */ lv(dv), pv = {
|
|
|
6196
6196
|
onClear: f,
|
|
6197
6197
|
startAdornment: h,
|
|
6198
6198
|
valid: m = !1,
|
|
6199
|
-
...
|
|
6199
|
+
...g
|
|
6200
6200
|
}, p) => {
|
|
6201
|
-
var
|
|
6202
|
-
const
|
|
6203
|
-
|
|
6204
|
-
},
|
|
6201
|
+
var v;
|
|
6202
|
+
const $ = us(), y = g.id ?? $, b = (Y) => e ? `${e}-${Y}` : void 0, _ = m && !i, x = s ? `${y}-helper-text` : void 0, S = [h].filter((Y) => !!Y), M = (typeof g.value == "number" ? g.value !== void 0 : (v = g.value) == null ? void 0 : v.length) && !g.disabled && !g.readOnly && !d && f && n, N = hv(null), E = (Y) => {
|
|
6203
|
+
N.current = Y, typeof p == "function" ? p(Y) : p && (p.current = Y);
|
|
6204
|
+
}, k = () => {
|
|
6205
6205
|
var Y;
|
|
6206
|
-
f == null || f(), (Y =
|
|
6206
|
+
f == null || f(), (Y = N.current) == null || Y.focus();
|
|
6207
6207
|
}, L = [
|
|
6208
6208
|
d && /* @__PURE__ */ w(
|
|
6209
6209
|
uv,
|
|
6210
6210
|
{
|
|
6211
|
-
disabled:
|
|
6211
|
+
disabled: g.disabled,
|
|
6212
6212
|
size: "xs",
|
|
6213
6213
|
"data-testid": b("spinner")
|
|
6214
6214
|
},
|
|
@@ -6218,7 +6218,7 @@ const fv = /* @__PURE__ */ lv(dv), pv = {
|
|
|
6218
6218
|
du,
|
|
6219
6219
|
{
|
|
6220
6220
|
variant: "tertiary-purple",
|
|
6221
|
-
onClick:
|
|
6221
|
+
onClick: k,
|
|
6222
6222
|
iconOnly: !0,
|
|
6223
6223
|
"aria-label": n ?? "",
|
|
6224
6224
|
"data-testid": b("clear-button"),
|
|
@@ -6238,9 +6238,9 @@ const fv = /* @__PURE__ */ lv(dv), pv = {
|
|
|
6238
6238
|
].filter((Y) => !!Y), J = ot(`${we}__input-container`, {
|
|
6239
6239
|
[`${we}__input-container--start-adornment`]: S.length,
|
|
6240
6240
|
[`${we}__input-container--end-adornment`]: L.length || o,
|
|
6241
|
-
[`${we}__input-container--disabled`]:
|
|
6241
|
+
[`${we}__input-container--disabled`]: g.disabled,
|
|
6242
6242
|
[`${we}__input-container--has-clear-button`]: M,
|
|
6243
|
-
[`${we}__input-container--readonly`]:
|
|
6243
|
+
[`${we}__input-container--readonly`]: g.readOnly && !g.disabled
|
|
6244
6244
|
});
|
|
6245
6245
|
return /* @__PURE__ */ te("div", { className: ot(t, we), children: [
|
|
6246
6246
|
l && /* @__PURE__ */ te(
|
|
@@ -6249,9 +6249,9 @@ const fv = /* @__PURE__ */ lv(dv), pv = {
|
|
|
6249
6249
|
htmlFor: y,
|
|
6250
6250
|
className: ot(`${we}__label`),
|
|
6251
6251
|
"data-testid": b("label"),
|
|
6252
|
-
disabled:
|
|
6252
|
+
disabled: g.disabled,
|
|
6253
6253
|
children: [
|
|
6254
|
-
|
|
6254
|
+
g.required && !u && /* @__PURE__ */ w("span", { "aria-hidden": !0, children: "*" }),
|
|
6255
6255
|
l
|
|
6256
6256
|
]
|
|
6257
6257
|
}
|
|
@@ -6270,12 +6270,12 @@ const fv = /* @__PURE__ */ lv(dv), pv = {
|
|
|
6270
6270
|
/* @__PURE__ */ w(
|
|
6271
6271
|
"input",
|
|
6272
6272
|
{
|
|
6273
|
-
...
|
|
6273
|
+
...g,
|
|
6274
6274
|
id: y,
|
|
6275
|
-
ref:
|
|
6275
|
+
ref: E,
|
|
6276
6276
|
"data-testid": b("input"),
|
|
6277
|
-
"aria-describedby":
|
|
6278
|
-
"aria-invalid":
|
|
6277
|
+
"aria-describedby": g["aria-describedby"] || x,
|
|
6278
|
+
"aria-invalid": g["aria-invalid"] || !!i,
|
|
6279
6279
|
className: ot([
|
|
6280
6280
|
`${we}__input`,
|
|
6281
6281
|
{
|
|
@@ -6300,7 +6300,7 @@ const fv = /* @__PURE__ */ lv(dv), pv = {
|
|
|
6300
6300
|
] }),
|
|
6301
6301
|
!!a && a
|
|
6302
6302
|
] }),
|
|
6303
|
-
|
|
6303
|
+
x && /* @__PURE__ */ w(Mg, { "data-testid": b("helper-text"), id: x, children: s }),
|
|
6304
6304
|
i && /* @__PURE__ */ w(wg, { "data-testid": b("error-text"), children: i })
|
|
6305
6305
|
] });
|
|
6306
6306
|
}
|
|
@@ -6364,13 +6364,13 @@ let $v = {};
|
|
|
6364
6364
|
function rn() {
|
|
6365
6365
|
return $v;
|
|
6366
6366
|
}
|
|
6367
|
-
function
|
|
6367
|
+
function _t(e, t) {
|
|
6368
6368
|
var n, r, a, o;
|
|
6369
6369
|
const i = rn(), s = (t == null ? void 0 : t.weekStartsOn) ?? ((r = (n = t == null ? void 0 : t.locale) == null ? void 0 : n.options) == null ? void 0 : r.weekStartsOn) ?? i.weekStartsOn ?? ((o = (a = i.locale) == null ? void 0 : a.options) == null ? void 0 : o.weekStartsOn) ?? 0, u = he(e, t == null ? void 0 : t.in), l = u.getDay(), d = (l < s ? 7 : 0) + l - s;
|
|
6370
6370
|
return u.setDate(u.getDate() - d), u.setHours(0, 0, 0, 0), u;
|
|
6371
6371
|
}
|
|
6372
6372
|
function Jt(e, t) {
|
|
6373
|
-
return
|
|
6373
|
+
return _t(e, { ...t, weekStartsOn: 1 });
|
|
6374
6374
|
}
|
|
6375
6375
|
function yu(e, t) {
|
|
6376
6376
|
const n = he(e, void 0), r = n.getFullYear(), a = me(n, 0);
|
|
@@ -6870,18 +6870,18 @@ function Ao(e, t) {
|
|
|
6870
6870
|
var n, r, a, o;
|
|
6871
6871
|
const i = he(e, t == null ? void 0 : t.in), s = i.getFullYear(), u = rn(), l = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((r = (n = t == null ? void 0 : t.locale) == null ? void 0 : n.options) == null ? void 0 : r.firstWeekContainsDate) ?? u.firstWeekContainsDate ?? ((o = (a = u.locale) == null ? void 0 : a.options) == null ? void 0 : o.firstWeekContainsDate) ?? 1, d = me((t == null ? void 0 : t.in) || e, 0);
|
|
6872
6872
|
d.setFullYear(s + 1, 0, l), d.setHours(0, 0, 0, 0);
|
|
6873
|
-
const f =
|
|
6873
|
+
const f = _t(d, t), h = me((t == null ? void 0 : t.in) || e, 0);
|
|
6874
6874
|
h.setFullYear(s, 0, l), h.setHours(0, 0, 0, 0);
|
|
6875
|
-
const m =
|
|
6875
|
+
const m = _t(h, t);
|
|
6876
6876
|
return +i >= +f ? s + 1 : +i >= +m ? s : s - 1;
|
|
6877
6877
|
}
|
|
6878
6878
|
function uw(e, t) {
|
|
6879
6879
|
var n, r, a, o;
|
|
6880
6880
|
const i = rn(), s = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((r = (n = t == null ? void 0 : t.locale) == null ? void 0 : n.options) == null ? void 0 : r.firstWeekContainsDate) ?? i.firstWeekContainsDate ?? ((o = (a = i.locale) == null ? void 0 : a.options) == null ? void 0 : o.firstWeekContainsDate) ?? 1, u = Ao(e, t), l = me((t == null ? void 0 : t.in) || e, 0);
|
|
6881
|
-
return l.setFullYear(u, 0, s), l.setHours(0, 0, 0, 0),
|
|
6881
|
+
return l.setFullYear(u, 0, s), l.setHours(0, 0, 0, 0), _t(l, t);
|
|
6882
6882
|
}
|
|
6883
6883
|
function Su(e, t) {
|
|
6884
|
-
const n = he(e, t == null ? void 0 : t.in), r = +
|
|
6884
|
+
const n = he(e, t == null ? void 0 : t.in), r = +_t(n, t) - +uw(n, t);
|
|
6885
6885
|
return Math.round(r / wu) + 1;
|
|
6886
6886
|
}
|
|
6887
6887
|
function K(e, t) {
|
|
@@ -7430,7 +7430,7 @@ const pt = {
|
|
|
7430
7430
|
// so this token always has the same output as `XX`
|
|
7431
7431
|
case "XXXX":
|
|
7432
7432
|
case "XX":
|
|
7433
|
-
return
|
|
7433
|
+
return Ct(r);
|
|
7434
7434
|
// Hours, minutes and optional seconds with `:` delimiter
|
|
7435
7435
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
7436
7436
|
// so this token always has the same output as `XXX`
|
|
@@ -7438,7 +7438,7 @@ const pt = {
|
|
|
7438
7438
|
case "XXX":
|
|
7439
7439
|
// Hours and minutes with `:` delimiter
|
|
7440
7440
|
default:
|
|
7441
|
-
return
|
|
7441
|
+
return Ct(r, ":");
|
|
7442
7442
|
}
|
|
7443
7443
|
},
|
|
7444
7444
|
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
@@ -7453,7 +7453,7 @@ const pt = {
|
|
|
7453
7453
|
// so this token always has the same output as `xx`
|
|
7454
7454
|
case "xxxx":
|
|
7455
7455
|
case "xx":
|
|
7456
|
-
return
|
|
7456
|
+
return Ct(r);
|
|
7457
7457
|
// Hours, minutes and optional seconds with `:` delimiter
|
|
7458
7458
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
7459
7459
|
// so this token always has the same output as `xxx`
|
|
@@ -7461,7 +7461,7 @@ const pt = {
|
|
|
7461
7461
|
case "xxx":
|
|
7462
7462
|
// Hours and minutes with `:` delimiter
|
|
7463
7463
|
default:
|
|
7464
|
-
return
|
|
7464
|
+
return Ct(r, ":");
|
|
7465
7465
|
}
|
|
7466
7466
|
},
|
|
7467
7467
|
// Timezone (GMT)
|
|
@@ -7476,7 +7476,7 @@ const pt = {
|
|
|
7476
7476
|
// Long
|
|
7477
7477
|
case "OOOO":
|
|
7478
7478
|
default:
|
|
7479
|
-
return "GMT" +
|
|
7479
|
+
return "GMT" + Ct(r, ":");
|
|
7480
7480
|
}
|
|
7481
7481
|
},
|
|
7482
7482
|
// Timezone (specific non-location)
|
|
@@ -7491,7 +7491,7 @@ const pt = {
|
|
|
7491
7491
|
// Long
|
|
7492
7492
|
case "zzzz":
|
|
7493
7493
|
default:
|
|
7494
|
-
return "GMT" +
|
|
7494
|
+
return "GMT" + Ct(r, ":");
|
|
7495
7495
|
}
|
|
7496
7496
|
},
|
|
7497
7497
|
// Seconds timestamp
|
|
@@ -7509,9 +7509,9 @@ function $i(e, t = "") {
|
|
|
7509
7509
|
return o === 0 ? n + String(a) : n + String(a) + t + K(o, 2);
|
|
7510
7510
|
}
|
|
7511
7511
|
function Si(e, t) {
|
|
7512
|
-
return e % 60 === 0 ? (e > 0 ? "-" : "+") + K(Math.abs(e) / 60, 2) :
|
|
7512
|
+
return e % 60 === 0 ? (e > 0 ? "-" : "+") + K(Math.abs(e) / 60, 2) : Ct(e, t);
|
|
7513
7513
|
}
|
|
7514
|
-
function
|
|
7514
|
+
function Ct(e, t = "") {
|
|
7515
7515
|
const n = e > 0 ? "-" : "+", r = Math.abs(e), a = K(Math.trunc(r / 60), 2), o = K(r % 60, 2);
|
|
7516
7516
|
return n + a + t + o;
|
|
7517
7517
|
}
|
|
@@ -7584,26 +7584,26 @@ function bw(e, t, n) {
|
|
|
7584
7584
|
const s = rn(), u = s.locale ?? xu, l = s.firstWeekContainsDate ?? ((a = (r = s.locale) == null ? void 0 : r.options) == null ? void 0 : a.firstWeekContainsDate) ?? 1, d = s.weekStartsOn ?? ((i = (o = s.locale) == null ? void 0 : o.options) == null ? void 0 : i.weekStartsOn) ?? 0, f = he(e, void 0);
|
|
7585
7585
|
if (!_u(f))
|
|
7586
7586
|
throw new RangeError("Invalid time value");
|
|
7587
|
-
let h = t.match(mw).map((
|
|
7588
|
-
const p =
|
|
7587
|
+
let h = t.match(mw).map((g) => {
|
|
7588
|
+
const p = g[0];
|
|
7589
7589
|
if (p === "p" || p === "P") {
|
|
7590
|
-
const
|
|
7591
|
-
return g
|
|
7590
|
+
const v = ho[p];
|
|
7591
|
+
return v(g, u.formatLong);
|
|
7592
7592
|
}
|
|
7593
|
-
return
|
|
7594
|
-
}).join("").match(hw).map((
|
|
7595
|
-
if (
|
|
7593
|
+
return g;
|
|
7594
|
+
}).join("").match(hw).map((g) => {
|
|
7595
|
+
if (g === "''")
|
|
7596
7596
|
return { isToken: !1, value: "'" };
|
|
7597
|
-
const p =
|
|
7597
|
+
const p = g[0];
|
|
7598
7598
|
if (p === "'")
|
|
7599
|
-
return { isToken: !1, value: yw(
|
|
7599
|
+
return { isToken: !1, value: yw(g) };
|
|
7600
7600
|
if (xi[p])
|
|
7601
|
-
return { isToken: !0, value:
|
|
7601
|
+
return { isToken: !0, value: g };
|
|
7602
7602
|
if (p.match(ww))
|
|
7603
7603
|
throw new RangeError(
|
|
7604
7604
|
"Format string contains an unescaped latin alphabet character `" + p + "`"
|
|
7605
7605
|
);
|
|
7606
|
-
return { isToken: !1, value:
|
|
7606
|
+
return { isToken: !1, value: g };
|
|
7607
7607
|
});
|
|
7608
7608
|
u.localize.preprocessor && (h = u.localize.preprocessor(f, h));
|
|
7609
7609
|
const m = {
|
|
@@ -7611,12 +7611,12 @@ function bw(e, t, n) {
|
|
|
7611
7611
|
weekStartsOn: d,
|
|
7612
7612
|
locale: u
|
|
7613
7613
|
};
|
|
7614
|
-
return h.map((
|
|
7615
|
-
if (!
|
|
7616
|
-
const p =
|
|
7614
|
+
return h.map((g) => {
|
|
7615
|
+
if (!g.isToken) return g.value;
|
|
7616
|
+
const p = g.value;
|
|
7617
7617
|
(Eu(p) || ku(p)) && mo(p, t, String(e));
|
|
7618
|
-
const
|
|
7619
|
-
return
|
|
7618
|
+
const v = xi[p[0]];
|
|
7619
|
+
return v(f, p, u.localize, m);
|
|
7620
7620
|
}).join("");
|
|
7621
7621
|
}
|
|
7622
7622
|
function yw(e) {
|
|
@@ -7646,7 +7646,7 @@ function Sw(e) {
|
|
|
7646
7646
|
const Mw = 10;
|
|
7647
7647
|
let Du = class {
|
|
7648
7648
|
constructor() {
|
|
7649
|
-
|
|
7649
|
+
O(this, "subPriority", 0);
|
|
7650
7650
|
}
|
|
7651
7651
|
validate(t, n) {
|
|
7652
7652
|
return !0;
|
|
@@ -7663,7 +7663,7 @@ let Du = class {
|
|
|
7663
7663
|
}
|
|
7664
7664
|
}, Ew = class extends Du {
|
|
7665
7665
|
constructor(t, n) {
|
|
7666
|
-
super(),
|
|
7666
|
+
super(), O(this, "priority", Mw), O(this, "subPriority", -1), this.context = t || ((r) => me(n, r));
|
|
7667
7667
|
}
|
|
7668
7668
|
set(t, n) {
|
|
7669
7669
|
return n.timestampIsSet ? t : me(t, $w(t, this.context));
|
|
@@ -7687,7 +7687,7 @@ let Du = class {
|
|
|
7687
7687
|
}
|
|
7688
7688
|
}, Dw = class extends X {
|
|
7689
7689
|
constructor() {
|
|
7690
|
-
super(...arguments),
|
|
7690
|
+
super(...arguments), O(this, "priority", 140), O(this, "incompatibleTokens", ["R", "u", "t", "T"]);
|
|
7691
7691
|
}
|
|
7692
7692
|
parse(t, n, r) {
|
|
7693
7693
|
switch (n) {
|
|
@@ -7846,7 +7846,7 @@ function Tu(e) {
|
|
|
7846
7846
|
}
|
|
7847
7847
|
let Cw = class extends X {
|
|
7848
7848
|
constructor() {
|
|
7849
|
-
super(...arguments),
|
|
7849
|
+
super(...arguments), O(this, "priority", 130), O(this, "incompatibleTokens", ["Y", "R", "u", "w", "I", "i", "e", "c", "t", "T"]);
|
|
7850
7850
|
}
|
|
7851
7851
|
parse(t, n, r) {
|
|
7852
7852
|
const a = (o) => ({
|
|
@@ -7884,7 +7884,7 @@ let Cw = class extends X {
|
|
|
7884
7884
|
}
|
|
7885
7885
|
}, Nw = class extends X {
|
|
7886
7886
|
constructor() {
|
|
7887
|
-
super(...arguments),
|
|
7887
|
+
super(...arguments), O(this, "priority", 130), O(this, "incompatibleTokens", [
|
|
7888
7888
|
"y",
|
|
7889
7889
|
"R",
|
|
7890
7890
|
"u",
|
|
@@ -7933,14 +7933,14 @@ let Cw = class extends X {
|
|
|
7933
7933
|
s,
|
|
7934
7934
|
0,
|
|
7935
7935
|
a.firstWeekContainsDate
|
|
7936
|
-
), t.setHours(0, 0, 0, 0),
|
|
7936
|
+
), t.setHours(0, 0, 0, 0), _t(t, a);
|
|
7937
7937
|
}
|
|
7938
7938
|
const i = !("era" in n) || n.era === 1 ? r.year : 1 - r.year;
|
|
7939
|
-
return t.setFullYear(i, 0, a.firstWeekContainsDate), t.setHours(0, 0, 0, 0),
|
|
7939
|
+
return t.setFullYear(i, 0, a.firstWeekContainsDate), t.setHours(0, 0, 0, 0), _t(t, a);
|
|
7940
7940
|
}
|
|
7941
7941
|
}, Ow = class extends X {
|
|
7942
7942
|
constructor() {
|
|
7943
|
-
super(...arguments),
|
|
7943
|
+
super(...arguments), O(this, "priority", 130), O(this, "incompatibleTokens", [
|
|
7944
7944
|
"G",
|
|
7945
7945
|
"y",
|
|
7946
7946
|
"Y",
|
|
@@ -7967,7 +7967,7 @@ let Cw = class extends X {
|
|
|
7967
7967
|
}
|
|
7968
7968
|
}, Tw = class extends X {
|
|
7969
7969
|
constructor() {
|
|
7970
|
-
super(...arguments),
|
|
7970
|
+
super(...arguments), O(this, "priority", 130), O(this, "incompatibleTokens", ["G", "y", "Y", "R", "w", "I", "i", "e", "c", "t", "T"]);
|
|
7971
7971
|
}
|
|
7972
7972
|
parse(t, n) {
|
|
7973
7973
|
return Nu(n === "u" ? 4 : n.length, t);
|
|
@@ -7977,7 +7977,7 @@ let Cw = class extends X {
|
|
|
7977
7977
|
}
|
|
7978
7978
|
}, Pw = class extends X {
|
|
7979
7979
|
constructor() {
|
|
7980
|
-
super(...arguments),
|
|
7980
|
+
super(...arguments), O(this, "priority", 120), O(this, "incompatibleTokens", [
|
|
7981
7981
|
"Y",
|
|
7982
7982
|
"R",
|
|
7983
7983
|
"q",
|
|
@@ -8041,7 +8041,7 @@ let Cw = class extends X {
|
|
|
8041
8041
|
}
|
|
8042
8042
|
}, Rw = class extends X {
|
|
8043
8043
|
constructor() {
|
|
8044
|
-
super(...arguments),
|
|
8044
|
+
super(...arguments), O(this, "priority", 120), O(this, "incompatibleTokens", [
|
|
8045
8045
|
"Y",
|
|
8046
8046
|
"R",
|
|
8047
8047
|
"Q",
|
|
@@ -8105,7 +8105,7 @@ let Cw = class extends X {
|
|
|
8105
8105
|
}
|
|
8106
8106
|
}, Lw = class extends X {
|
|
8107
8107
|
constructor() {
|
|
8108
|
-
super(...arguments),
|
|
8108
|
+
super(...arguments), O(this, "incompatibleTokens", [
|
|
8109
8109
|
"Y",
|
|
8110
8110
|
"R",
|
|
8111
8111
|
"q",
|
|
@@ -8119,7 +8119,7 @@ let Cw = class extends X {
|
|
|
8119
8119
|
"c",
|
|
8120
8120
|
"t",
|
|
8121
8121
|
"T"
|
|
8122
|
-
]),
|
|
8122
|
+
]), O(this, "priority", 110);
|
|
8123
8123
|
}
|
|
8124
8124
|
parse(t, n, r) {
|
|
8125
8125
|
const a = (o) => o - 1;
|
|
@@ -8170,7 +8170,7 @@ let Cw = class extends X {
|
|
|
8170
8170
|
}
|
|
8171
8171
|
}, Aw = class extends X {
|
|
8172
8172
|
constructor() {
|
|
8173
|
-
super(...arguments),
|
|
8173
|
+
super(...arguments), O(this, "priority", 110), O(this, "incompatibleTokens", [
|
|
8174
8174
|
"Y",
|
|
8175
8175
|
"R",
|
|
8176
8176
|
"q",
|
|
@@ -8240,7 +8240,7 @@ function Ww(e, t, n) {
|
|
|
8240
8240
|
}
|
|
8241
8241
|
let Iw = class extends X {
|
|
8242
8242
|
constructor() {
|
|
8243
|
-
super(...arguments),
|
|
8243
|
+
super(...arguments), O(this, "priority", 100), O(this, "incompatibleTokens", [
|
|
8244
8244
|
"y",
|
|
8245
8245
|
"R",
|
|
8246
8246
|
"u",
|
|
@@ -8270,16 +8270,16 @@ let Iw = class extends X {
|
|
|
8270
8270
|
return n >= 1 && n <= 53;
|
|
8271
8271
|
}
|
|
8272
8272
|
set(t, n, r, a) {
|
|
8273
|
-
return
|
|
8273
|
+
return _t(Ww(t, r, a), a);
|
|
8274
8274
|
}
|
|
8275
8275
|
};
|
|
8276
8276
|
function Fw(e, t, n) {
|
|
8277
8277
|
const r = he(e, void 0), a = $u(r) - t;
|
|
8278
8278
|
return r.setDate(r.getDate() - a * 7), r;
|
|
8279
8279
|
}
|
|
8280
|
-
|
|
8280
|
+
class qw extends X {
|
|
8281
8281
|
constructor() {
|
|
8282
|
-
super(...arguments),
|
|
8282
|
+
super(...arguments), O(this, "priority", 100), O(this, "incompatibleTokens", [
|
|
8283
8283
|
"y",
|
|
8284
8284
|
"Y",
|
|
8285
8285
|
"u",
|
|
@@ -8312,7 +8312,7 @@ let qw = class extends X {
|
|
|
8312
8312
|
set(t, n, r) {
|
|
8313
8313
|
return Jt(Fw(t, r));
|
|
8314
8314
|
}
|
|
8315
|
-
}
|
|
8315
|
+
}
|
|
8316
8316
|
const Bw = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Yw = [
|
|
8317
8317
|
31,
|
|
8318
8318
|
29,
|
|
@@ -8329,7 +8329,7 @@ const Bw = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Yw = [
|
|
|
8329
8329
|
];
|
|
8330
8330
|
let Hw = class extends X {
|
|
8331
8331
|
constructor() {
|
|
8332
|
-
super(...arguments),
|
|
8332
|
+
super(...arguments), O(this, "priority", 90), O(this, "subPriority", 1), O(this, "incompatibleTokens", [
|
|
8333
8333
|
"Y",
|
|
8334
8334
|
"R",
|
|
8335
8335
|
"q",
|
|
@@ -8363,7 +8363,7 @@ let Hw = class extends X {
|
|
|
8363
8363
|
}
|
|
8364
8364
|
}, jw = class extends X {
|
|
8365
8365
|
constructor() {
|
|
8366
|
-
super(...arguments),
|
|
8366
|
+
super(...arguments), O(this, "priority", 90), O(this, "subpriority", 1), O(this, "incompatibleTokens", [
|
|
8367
8367
|
"Y",
|
|
8368
8368
|
"R",
|
|
8369
8369
|
"q",
|
|
@@ -8407,7 +8407,7 @@ function Io(e, t, n) {
|
|
|
8407
8407
|
}
|
|
8408
8408
|
let zw = class extends X {
|
|
8409
8409
|
constructor() {
|
|
8410
|
-
super(...arguments),
|
|
8410
|
+
super(...arguments), O(this, "priority", 90), O(this, "incompatibleTokens", ["D", "i", "e", "c", "t", "T"]);
|
|
8411
8411
|
}
|
|
8412
8412
|
parse(t, n, r) {
|
|
8413
8413
|
switch (n) {
|
|
@@ -8445,7 +8445,7 @@ let zw = class extends X {
|
|
|
8445
8445
|
}
|
|
8446
8446
|
}, Xw = class extends X {
|
|
8447
8447
|
constructor() {
|
|
8448
|
-
super(...arguments),
|
|
8448
|
+
super(...arguments), O(this, "priority", 90), O(this, "incompatibleTokens", [
|
|
8449
8449
|
"y",
|
|
8450
8450
|
"R",
|
|
8451
8451
|
"u",
|
|
@@ -8513,7 +8513,7 @@ let zw = class extends X {
|
|
|
8513
8513
|
}
|
|
8514
8514
|
}, Vw = class extends X {
|
|
8515
8515
|
constructor() {
|
|
8516
|
-
super(...arguments),
|
|
8516
|
+
super(...arguments), O(this, "priority", 90), O(this, "incompatibleTokens", [
|
|
8517
8517
|
"y",
|
|
8518
8518
|
"R",
|
|
8519
8519
|
"u",
|
|
@@ -8586,7 +8586,7 @@ function Gw(e, t, n) {
|
|
|
8586
8586
|
}
|
|
8587
8587
|
let Uw = class extends X {
|
|
8588
8588
|
constructor() {
|
|
8589
|
-
super(...arguments),
|
|
8589
|
+
super(...arguments), O(this, "priority", 90), O(this, "incompatibleTokens", [
|
|
8590
8590
|
"y",
|
|
8591
8591
|
"Y",
|
|
8592
8592
|
"u",
|
|
@@ -8679,7 +8679,7 @@ let Uw = class extends X {
|
|
|
8679
8679
|
}
|
|
8680
8680
|
}, Zw = class extends X {
|
|
8681
8681
|
constructor() {
|
|
8682
|
-
super(...arguments),
|
|
8682
|
+
super(...arguments), O(this, "priority", 80), O(this, "incompatibleTokens", ["b", "B", "H", "k", "t", "T"]);
|
|
8683
8683
|
}
|
|
8684
8684
|
parse(t, n, r) {
|
|
8685
8685
|
switch (n) {
|
|
@@ -8717,7 +8717,7 @@ let Uw = class extends X {
|
|
|
8717
8717
|
}
|
|
8718
8718
|
}, Kw = class extends X {
|
|
8719
8719
|
constructor() {
|
|
8720
|
-
super(...arguments),
|
|
8720
|
+
super(...arguments), O(this, "priority", 80), O(this, "incompatibleTokens", ["a", "B", "H", "k", "t", "T"]);
|
|
8721
8721
|
}
|
|
8722
8722
|
parse(t, n, r) {
|
|
8723
8723
|
switch (n) {
|
|
@@ -8755,7 +8755,7 @@ let Uw = class extends X {
|
|
|
8755
8755
|
}
|
|
8756
8756
|
}, Qw = class extends X {
|
|
8757
8757
|
constructor() {
|
|
8758
|
-
super(...arguments),
|
|
8758
|
+
super(...arguments), O(this, "priority", 80), O(this, "incompatibleTokens", ["a", "b", "t", "T"]);
|
|
8759
8759
|
}
|
|
8760
8760
|
parse(t, n, r) {
|
|
8761
8761
|
switch (n) {
|
|
@@ -8793,7 +8793,7 @@ let Uw = class extends X {
|
|
|
8793
8793
|
}
|
|
8794
8794
|
}, Jw = class extends X {
|
|
8795
8795
|
constructor() {
|
|
8796
|
-
super(...arguments),
|
|
8796
|
+
super(...arguments), O(this, "priority", 70), O(this, "incompatibleTokens", ["H", "K", "k", "t", "T"]);
|
|
8797
8797
|
}
|
|
8798
8798
|
parse(t, n, r) {
|
|
8799
8799
|
switch (n) {
|
|
@@ -8815,7 +8815,7 @@ let Uw = class extends X {
|
|
|
8815
8815
|
};
|
|
8816
8816
|
class eb extends X {
|
|
8817
8817
|
constructor() {
|
|
8818
|
-
super(...arguments),
|
|
8818
|
+
super(...arguments), O(this, "priority", 70), O(this, "incompatibleTokens", ["a", "b", "h", "K", "k", "t", "T"]);
|
|
8819
8819
|
}
|
|
8820
8820
|
parse(t, n, r) {
|
|
8821
8821
|
switch (n) {
|
|
@@ -8836,7 +8836,7 @@ class eb extends X {
|
|
|
8836
8836
|
}
|
|
8837
8837
|
let tb = class extends X {
|
|
8838
8838
|
constructor() {
|
|
8839
|
-
super(...arguments),
|
|
8839
|
+
super(...arguments), O(this, "priority", 70), O(this, "incompatibleTokens", ["h", "H", "k", "t", "T"]);
|
|
8840
8840
|
}
|
|
8841
8841
|
parse(t, n, r) {
|
|
8842
8842
|
switch (n) {
|
|
@@ -8856,7 +8856,7 @@ let tb = class extends X {
|
|
|
8856
8856
|
}
|
|
8857
8857
|
}, nb = class extends X {
|
|
8858
8858
|
constructor() {
|
|
8859
|
-
super(...arguments),
|
|
8859
|
+
super(...arguments), O(this, "priority", 70), O(this, "incompatibleTokens", ["a", "b", "h", "H", "K", "t", "T"]);
|
|
8860
8860
|
}
|
|
8861
8861
|
parse(t, n, r) {
|
|
8862
8862
|
switch (n) {
|
|
@@ -8878,7 +8878,7 @@ let tb = class extends X {
|
|
|
8878
8878
|
};
|
|
8879
8879
|
class rb extends X {
|
|
8880
8880
|
constructor() {
|
|
8881
|
-
super(...arguments),
|
|
8881
|
+
super(...arguments), O(this, "priority", 60), O(this, "incompatibleTokens", ["t", "T"]);
|
|
8882
8882
|
}
|
|
8883
8883
|
parse(t, n, r) {
|
|
8884
8884
|
switch (n) {
|
|
@@ -8899,7 +8899,7 @@ class rb extends X {
|
|
|
8899
8899
|
}
|
|
8900
8900
|
let ob = class extends X {
|
|
8901
8901
|
constructor() {
|
|
8902
|
-
super(...arguments),
|
|
8902
|
+
super(...arguments), O(this, "priority", 50), O(this, "incompatibleTokens", ["t", "T"]);
|
|
8903
8903
|
}
|
|
8904
8904
|
parse(t, n, r) {
|
|
8905
8905
|
switch (n) {
|
|
@@ -8917,10 +8917,9 @@ let ob = class extends X {
|
|
|
8917
8917
|
set(t, n, r) {
|
|
8918
8918
|
return t.setSeconds(r, 0), t;
|
|
8919
8919
|
}
|
|
8920
|
-
}
|
|
8921
|
-
class ab extends X {
|
|
8920
|
+
}, ab = class extends X {
|
|
8922
8921
|
constructor() {
|
|
8923
|
-
super(...arguments),
|
|
8922
|
+
super(...arguments), O(this, "priority", 30), O(this, "incompatibleTokens", ["t", "T"]);
|
|
8924
8923
|
}
|
|
8925
8924
|
parse(t, n) {
|
|
8926
8925
|
const r = (a) => Math.trunc(a * Math.pow(10, -n.length + 3));
|
|
@@ -8929,10 +8928,9 @@ class ab extends X {
|
|
|
8929
8928
|
set(t, n, r) {
|
|
8930
8929
|
return t.setMilliseconds(r), t;
|
|
8931
8930
|
}
|
|
8932
|
-
}
|
|
8933
|
-
let ib = class extends X {
|
|
8931
|
+
}, ib = class extends X {
|
|
8934
8932
|
constructor() {
|
|
8935
|
-
super(...arguments),
|
|
8933
|
+
super(...arguments), O(this, "priority", 10), O(this, "incompatibleTokens", ["t", "T", "x"]);
|
|
8936
8934
|
}
|
|
8937
8935
|
parse(t, n) {
|
|
8938
8936
|
switch (n) {
|
|
@@ -8966,7 +8964,7 @@ let ib = class extends X {
|
|
|
8966
8964
|
}
|
|
8967
8965
|
}, sb = class extends X {
|
|
8968
8966
|
constructor() {
|
|
8969
|
-
super(...arguments),
|
|
8967
|
+
super(...arguments), O(this, "priority", 10), O(this, "incompatibleTokens", ["t", "T", "X"]);
|
|
8970
8968
|
}
|
|
8971
8969
|
parse(t, n) {
|
|
8972
8970
|
switch (n) {
|
|
@@ -9001,7 +8999,7 @@ let ib = class extends X {
|
|
|
9001
8999
|
};
|
|
9002
9000
|
class ub extends X {
|
|
9003
9001
|
constructor() {
|
|
9004
|
-
super(...arguments),
|
|
9002
|
+
super(...arguments), O(this, "priority", 40), O(this, "incompatibleTokens", "*");
|
|
9005
9003
|
}
|
|
9006
9004
|
parse(t) {
|
|
9007
9005
|
return Cu(t);
|
|
@@ -9012,7 +9010,7 @@ class ub extends X {
|
|
|
9012
9010
|
}
|
|
9013
9011
|
let lb = class extends X {
|
|
9014
9012
|
constructor() {
|
|
9015
|
-
super(...arguments),
|
|
9013
|
+
super(...arguments), O(this, "priority", 20), O(this, "incompatibleTokens", "*");
|
|
9016
9014
|
}
|
|
9017
9015
|
parse(t) {
|
|
9018
9016
|
return Cu(t);
|
|
@@ -9060,47 +9058,47 @@ function vb(e, t, n, r) {
|
|
|
9060
9058
|
firstWeekContainsDate: f,
|
|
9061
9059
|
weekStartsOn: h,
|
|
9062
9060
|
locale: d
|
|
9063
|
-
},
|
|
9064
|
-
const
|
|
9065
|
-
if (
|
|
9066
|
-
const S = ho[
|
|
9061
|
+
}, g = [new Ew(void 0, n)], p = t.match(fb).map((_) => {
|
|
9062
|
+
const x = _[0];
|
|
9063
|
+
if (x in ho) {
|
|
9064
|
+
const S = ho[x];
|
|
9067
9065
|
return S(_, d.formatLong);
|
|
9068
9066
|
}
|
|
9069
9067
|
return _;
|
|
9070
|
-
}).join("").match(db),
|
|
9068
|
+
}).join("").match(db), v = [];
|
|
9071
9069
|
for (let _ of p) {
|
|
9072
9070
|
Eu(_) && mo(_, t, e), ku(_) && mo(_, t, e);
|
|
9073
|
-
const
|
|
9071
|
+
const x = _[0], S = cb[x];
|
|
9074
9072
|
if (S) {
|
|
9075
9073
|
const { incompatibleTokens: M } = S;
|
|
9076
9074
|
if (Array.isArray(M)) {
|
|
9077
|
-
const
|
|
9078
|
-
(
|
|
9075
|
+
const E = v.find(
|
|
9076
|
+
(k) => M.includes(k.token) || k.token === x
|
|
9079
9077
|
);
|
|
9080
|
-
if (
|
|
9078
|
+
if (E)
|
|
9081
9079
|
throw new RangeError(
|
|
9082
|
-
`The format string mustn't contain \`${
|
|
9080
|
+
`The format string mustn't contain \`${E.fullToken}\` and \`${_}\` at the same time`
|
|
9083
9081
|
);
|
|
9084
|
-
} else if (S.incompatibleTokens === "*" &&
|
|
9082
|
+
} else if (S.incompatibleTokens === "*" && v.length > 0)
|
|
9085
9083
|
throw new RangeError(
|
|
9086
9084
|
`The format string mustn't contain \`${_}\` and any other token at the same time`
|
|
9087
9085
|
);
|
|
9088
|
-
|
|
9089
|
-
const
|
|
9086
|
+
v.push({ token: x, fullToken: _ });
|
|
9087
|
+
const N = S.run(
|
|
9090
9088
|
e,
|
|
9091
9089
|
_,
|
|
9092
9090
|
d.match,
|
|
9093
9091
|
m
|
|
9094
9092
|
);
|
|
9095
|
-
if (!
|
|
9093
|
+
if (!N)
|
|
9096
9094
|
return u();
|
|
9097
|
-
|
|
9095
|
+
g.push(N.setter), e = N.rest;
|
|
9098
9096
|
} else {
|
|
9099
|
-
if (
|
|
9097
|
+
if (x.match(gb))
|
|
9100
9098
|
throw new RangeError(
|
|
9101
|
-
"Format string contains an unescaped latin alphabet character `" +
|
|
9099
|
+
"Format string contains an unescaped latin alphabet character `" + x + "`"
|
|
9102
9100
|
);
|
|
9103
|
-
if (_ === "''" ? _ = "'" :
|
|
9101
|
+
if (_ === "''" ? _ = "'" : x === "'" && (_ = wb(_)), e.indexOf(_) === 0)
|
|
9104
9102
|
e = e.slice(_.length);
|
|
9105
9103
|
else
|
|
9106
9104
|
return u();
|
|
@@ -9108,17 +9106,17 @@ function vb(e, t, n, r) {
|
|
|
9108
9106
|
}
|
|
9109
9107
|
if (e.length > 0 && mb.test(e))
|
|
9110
9108
|
return u();
|
|
9111
|
-
const
|
|
9112
|
-
(_) =>
|
|
9109
|
+
const $ = g.map((_) => _.priority).sort((_, x) => x - _).filter((_, x, S) => S.indexOf(_) === x).map(
|
|
9110
|
+
(_) => g.filter((x) => x.priority === _).sort((x, S) => S.subPriority - x.subPriority)
|
|
9113
9111
|
).map((_) => _[0]);
|
|
9114
9112
|
let y = he(n, void 0);
|
|
9115
9113
|
if (isNaN(+y)) return u();
|
|
9116
9114
|
const b = {};
|
|
9117
|
-
for (const _ of
|
|
9115
|
+
for (const _ of $) {
|
|
9118
9116
|
if (!_.validate(y, m))
|
|
9119
9117
|
return u();
|
|
9120
|
-
const
|
|
9121
|
-
Array.isArray(
|
|
9118
|
+
const x = _.set(y, b, m);
|
|
9119
|
+
Array.isArray(x) ? (y = x[0], Object.assign(b, x[1])) : y = x;
|
|
9122
9120
|
}
|
|
9123
9121
|
return y;
|
|
9124
9122
|
}
|
|
@@ -9141,17 +9139,17 @@ const bb = {
|
|
|
9141
9139
|
Cn(() => {
|
|
9142
9140
|
s(e ? ki(e) : "");
|
|
9143
9141
|
}, [e]);
|
|
9144
|
-
const u =
|
|
9142
|
+
const u = vt(null), l = _b(o, u), [d, f] = Fe({});
|
|
9145
9143
|
Dn(() => {
|
|
9146
9144
|
if (u.current) {
|
|
9147
9145
|
const p = window.document.querySelector(
|
|
9148
9146
|
`label[for="${u.current.id}"]`
|
|
9149
|
-
),
|
|
9147
|
+
), v = p ? p.offsetHeight + 4 : 0, $ = window.getComputedStyle(u.current);
|
|
9150
9148
|
f({
|
|
9151
9149
|
position: "absolute",
|
|
9152
|
-
top: u.current.offsetTop +
|
|
9150
|
+
top: u.current.offsetTop + v,
|
|
9153
9151
|
left: u.current.offsetLeft,
|
|
9154
|
-
padding:
|
|
9152
|
+
padding: $.padding,
|
|
9155
9153
|
width: u.current.offsetWidth,
|
|
9156
9154
|
height: u.current.offsetHeight
|
|
9157
9155
|
});
|
|
@@ -9160,23 +9158,23 @@ const bb = {
|
|
|
9160
9158
|
const h = (p) => {
|
|
9161
9159
|
if (p.length === 0 && (n == null || n(void 0)), p.length !== Hr.length)
|
|
9162
9160
|
return;
|
|
9163
|
-
const
|
|
9164
|
-
_u(
|
|
9161
|
+
const v = yb(p);
|
|
9162
|
+
_u(v) && (n == null || n(v));
|
|
9165
9163
|
}, m = (p) => {
|
|
9166
|
-
const
|
|
9167
|
-
let
|
|
9168
|
-
|
|
9169
|
-
},
|
|
9170
|
-
const
|
|
9164
|
+
const v = p.target.value.replace(/\D/g, "");
|
|
9165
|
+
let $ = "";
|
|
9166
|
+
v.length > 0 && ($ += v.slice(0, 4)), v.length > 4 && ($ += "-" + v.slice(4, 6)), v.length > 6 && ($ += "-" + v.slice(6, 8)), s($), h(p.target.value);
|
|
9167
|
+
}, g = () => Hr.split("").map((p, v) => {
|
|
9168
|
+
const $ = i[v];
|
|
9171
9169
|
return /* @__PURE__ */ w(
|
|
9172
9170
|
"span",
|
|
9173
9171
|
{
|
|
9174
9172
|
style: {
|
|
9175
|
-
color:
|
|
9173
|
+
color: $ ? "transparent" : "var(--purpur-color-text-weak)"
|
|
9176
9174
|
},
|
|
9177
|
-
children:
|
|
9175
|
+
children: $ || p
|
|
9178
9176
|
},
|
|
9179
|
-
|
|
9177
|
+
v
|
|
9180
9178
|
);
|
|
9181
9179
|
});
|
|
9182
9180
|
return /* @__PURE__ */ te("div", { className: Br(`${Yr}__container`), children: [
|
|
@@ -9194,7 +9192,7 @@ const bb = {
|
|
|
9194
9192
|
label: t
|
|
9195
9193
|
}
|
|
9196
9194
|
),
|
|
9197
|
-
/* @__PURE__ */ w("div", { role: "presentation", style: d, className: Br(`${Yr}__overlay`), children:
|
|
9195
|
+
/* @__PURE__ */ w("div", { role: "presentation", style: d, className: Br(`${Yr}__overlay`), children: g() })
|
|
9198
9196
|
] });
|
|
9199
9197
|
}
|
|
9200
9198
|
);
|
|
@@ -9250,13 +9248,13 @@ function Ru(e, t = []) {
|
|
|
9250
9248
|
n = [...n, i];
|
|
9251
9249
|
const l = (f) => {
|
|
9252
9250
|
var h;
|
|
9253
|
-
const { scope: m, children:
|
|
9254
|
-
return /* @__PURE__ */ w(
|
|
9251
|
+
const { scope: m, children: g, ...p } = f, v = ((h = m == null ? void 0 : m[e]) == null ? void 0 : h[u]) || s, $ = c.useMemo(() => p, Object.values(p));
|
|
9252
|
+
return /* @__PURE__ */ w(v.Provider, { value: $, children: g });
|
|
9255
9253
|
};
|
|
9256
9254
|
l.displayName = o + "Provider";
|
|
9257
9255
|
function d(f, h) {
|
|
9258
9256
|
var m;
|
|
9259
|
-
const
|
|
9257
|
+
const g = ((m = h == null ? void 0 : h[e]) == null ? void 0 : m[u]) || s, p = c.useContext(g);
|
|
9260
9258
|
if (p) return p;
|
|
9261
9259
|
if (i !== void 0) return i;
|
|
9262
9260
|
throw new Error(`\`${f}\` must be used within \`${o}\``);
|
|
@@ -9425,12 +9423,12 @@ var Lb = "DismissableLayer", wo = "dismissableLayer.update", Ab = "dismissableLa
|
|
|
9425
9423
|
onInteractOutside: i,
|
|
9426
9424
|
onDismiss: s,
|
|
9427
9425
|
...u
|
|
9428
|
-
} = e, l = c.useContext(Lu), [d, f] = c.useState(null), h = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, m] = c.useState({}),
|
|
9429
|
-
const
|
|
9430
|
-
!_ ||
|
|
9426
|
+
} = e, l = c.useContext(Lu), [d, f] = c.useState(null), h = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, m] = c.useState({}), g = Ce(t, (M) => f(M)), p = Array.from(l.layers), [v] = [...l.layersWithOutsidePointerEventsDisabled].slice(-1), $ = p.indexOf(v), y = d ? p.indexOf(d) : -1, b = l.layersWithOutsidePointerEventsDisabled.size > 0, _ = y >= $, x = qb((M) => {
|
|
9427
|
+
const N = M.target, E = [...l.branches].some((k) => k.contains(N));
|
|
9428
|
+
!_ || E || (a == null || a(M), i == null || i(M), M.defaultPrevented || s == null || s());
|
|
9431
9429
|
}, h), S = Bb((M) => {
|
|
9432
|
-
const
|
|
9433
|
-
[...l.branches].some((
|
|
9430
|
+
const N = M.target;
|
|
9431
|
+
[...l.branches].some((E) => E.contains(N)) || (o == null || o(M), i == null || i(M), M.defaultPrevented || s == null || s());
|
|
9434
9432
|
}, h);
|
|
9435
9433
|
return Rb((M) => {
|
|
9436
9434
|
y === l.layers.size - 1 && (r == null || r(M), !M.defaultPrevented && s && (M.preventDefault(), s()));
|
|
@@ -9448,7 +9446,7 @@ var Lb = "DismissableLayer", wo = "dismissableLayer.update", Ab = "dismissableLa
|
|
|
9448
9446
|
$e.div,
|
|
9449
9447
|
{
|
|
9450
9448
|
...u,
|
|
9451
|
-
ref:
|
|
9449
|
+
ref: g,
|
|
9452
9450
|
style: {
|
|
9453
9451
|
pointerEvents: b ? _ ? "auto" : "none" : void 0,
|
|
9454
9452
|
...e.style
|
|
@@ -9457,7 +9455,7 @@ var Lb = "DismissableLayer", wo = "dismissableLayer.update", Ab = "dismissableLa
|
|
|
9457
9455
|
onBlurCapture: _e(e.onBlurCapture, S.onBlurCapture),
|
|
9458
9456
|
onPointerDownCapture: _e(
|
|
9459
9457
|
e.onPointerDownCapture,
|
|
9460
|
-
|
|
9458
|
+
x.onPointerDownCapture
|
|
9461
9459
|
)
|
|
9462
9460
|
}
|
|
9463
9461
|
);
|
|
@@ -9549,19 +9547,19 @@ var zr = "focusScope.autoFocusOnMount", Xr = "focusScope.autoFocusOnUnmount", Ni
|
|
|
9549
9547
|
if (m.paused || !s) return;
|
|
9550
9548
|
const _ = b.target;
|
|
9551
9549
|
s.contains(_) ? f.current = _ : mt(f.current, { select: !0 });
|
|
9552
|
-
},
|
|
9550
|
+
}, v = function(b) {
|
|
9553
9551
|
if (m.paused || !s) return;
|
|
9554
9552
|
const _ = b.relatedTarget;
|
|
9555
9553
|
_ !== null && (s.contains(_) || mt(f.current, { select: !0 }));
|
|
9556
|
-
},
|
|
9554
|
+
}, $ = function(b) {
|
|
9557
9555
|
if (document.activeElement === document.body)
|
|
9558
9556
|
for (const _ of b)
|
|
9559
9557
|
_.removedNodes.length > 0 && mt(s);
|
|
9560
9558
|
};
|
|
9561
|
-
document.addEventListener("focusin", p), document.addEventListener("focusout",
|
|
9562
|
-
const y = new MutationObserver(
|
|
9559
|
+
document.addEventListener("focusin", p), document.addEventListener("focusout", v);
|
|
9560
|
+
const y = new MutationObserver($);
|
|
9563
9561
|
return s && y.observe(s, { childList: !0, subtree: !0 }), () => {
|
|
9564
|
-
document.removeEventListener("focusin", p), document.removeEventListener("focusout",
|
|
9562
|
+
document.removeEventListener("focusin", p), document.removeEventListener("focusout", v), y.disconnect();
|
|
9565
9563
|
};
|
|
9566
9564
|
}
|
|
9567
9565
|
}, [r, s, m.paused]), c.useEffect(() => {
|
|
@@ -9569,29 +9567,29 @@ var zr = "focusScope.autoFocusOnMount", Xr = "focusScope.autoFocusOnUnmount", Ni
|
|
|
9569
9567
|
Ti.add(m);
|
|
9570
9568
|
const p = document.activeElement;
|
|
9571
9569
|
if (!s.contains(p)) {
|
|
9572
|
-
const
|
|
9573
|
-
s.addEventListener(zr, l), s.dispatchEvent(
|
|
9570
|
+
const v = new CustomEvent(zr, Ni);
|
|
9571
|
+
s.addEventListener(zr, l), s.dispatchEvent(v), v.defaultPrevented || (Hb(Gb(Fu(s)), { select: !0 }), document.activeElement === p && mt(s));
|
|
9574
9572
|
}
|
|
9575
9573
|
return () => {
|
|
9576
9574
|
s.removeEventListener(zr, l), setTimeout(() => {
|
|
9577
|
-
const
|
|
9578
|
-
s.addEventListener(Xr, d), s.dispatchEvent(
|
|
9575
|
+
const v = new CustomEvent(Xr, Ni);
|
|
9576
|
+
s.addEventListener(Xr, d), s.dispatchEvent(v), v.defaultPrevented || mt(p ?? document.body, { select: !0 }), s.removeEventListener(Xr, d), Ti.remove(m);
|
|
9579
9577
|
}, 0);
|
|
9580
9578
|
};
|
|
9581
9579
|
}
|
|
9582
9580
|
}, [s, l, d, m]);
|
|
9583
|
-
const
|
|
9581
|
+
const g = c.useCallback(
|
|
9584
9582
|
(p) => {
|
|
9585
9583
|
if (!n && !r || m.paused) return;
|
|
9586
|
-
const
|
|
9587
|
-
if (
|
|
9584
|
+
const v = p.key === "Tab" && !p.altKey && !p.ctrlKey && !p.metaKey, $ = document.activeElement;
|
|
9585
|
+
if (v && $) {
|
|
9588
9586
|
const y = p.currentTarget, [b, _] = jb(y);
|
|
9589
|
-
b && _ ? !p.shiftKey &&
|
|
9587
|
+
b && _ ? !p.shiftKey && $ === _ ? (p.preventDefault(), n && mt(b, { select: !0 })) : p.shiftKey && $ === b && (p.preventDefault(), n && mt(_, { select: !0 })) : $ === y && p.preventDefault();
|
|
9590
9588
|
}
|
|
9591
9589
|
},
|
|
9592
9590
|
[n, r, m.paused]
|
|
9593
9591
|
);
|
|
9594
|
-
return /* @__PURE__ */ w($e.div, { tabIndex: -1, ...i, ref: h, onKeyDown:
|
|
9592
|
+
return /* @__PURE__ */ w($e.div, { tabIndex: -1, ...i, ref: h, onKeyDown: g });
|
|
9595
9593
|
});
|
|
9596
9594
|
Iu.displayName = Yb;
|
|
9597
9595
|
function Hb(e, { select: t = !1 } = {}) {
|
|
@@ -9667,11 +9665,11 @@ qu.displayName = Ub;
|
|
|
9667
9665
|
function Zb(e, t) {
|
|
9668
9666
|
return c.useReducer((n, r) => t[n][r] ?? n, e);
|
|
9669
9667
|
}
|
|
9670
|
-
var
|
|
9668
|
+
var xt = (e) => {
|
|
9671
9669
|
const { present: t, children: n } = e, r = Kb(t), a = typeof n == "function" ? n({ present: r.isPresent }) : c.Children.only(n), o = Ce(r.ref, Qb(a));
|
|
9672
9670
|
return typeof n == "function" || r.isPresent ? c.cloneElement(a, { ref: o }) : null;
|
|
9673
9671
|
};
|
|
9674
|
-
|
|
9672
|
+
xt.displayName = "Presence";
|
|
9675
9673
|
function Kb(e) {
|
|
9676
9674
|
const [t, n] = c.useState(), r = c.useRef({}), a = c.useRef(e), o = c.useRef("none"), i = e ? "mounted" : "unmounted", [s, u] = Zb(i, {
|
|
9677
9675
|
mounted: {
|
|
@@ -9699,8 +9697,8 @@ function Kb(e) {
|
|
|
9699
9697
|
if (t) {
|
|
9700
9698
|
let l;
|
|
9701
9699
|
const d = t.ownerDocument.defaultView ?? window, f = (m) => {
|
|
9702
|
-
const
|
|
9703
|
-
if (m.target === t &&
|
|
9700
|
+
const g = Bn(r.current).includes(m.animationName);
|
|
9701
|
+
if (m.target === t && g && (u("ANIMATION_END"), !a.current)) {
|
|
9704
9702
|
const p = t.style.animationFillMode;
|
|
9705
9703
|
t.style.animationFillMode = "forwards", l = d.setTimeout(() => {
|
|
9706
9704
|
t.style.animationFillMode === "forwards" && (t.style.animationFillMode = p);
|
|
@@ -9891,12 +9889,12 @@ var Hu = uy(), Ur = function() {
|
|
|
9891
9889
|
onScrollCapture: Ur,
|
|
9892
9890
|
onWheelCapture: Ur,
|
|
9893
9891
|
onTouchMoveCapture: Ur
|
|
9894
|
-
}), a = r[0], o = r[1], i = e.forwardProps, s = e.children, u = e.className, l = e.removeScrollBar, d = e.enabled, f = e.shards, h = e.sideCar, m = e.noIsolation,
|
|
9892
|
+
}), a = r[0], o = r[1], i = e.forwardProps, s = e.children, u = e.className, l = e.removeScrollBar, d = e.enabled, f = e.shards, h = e.sideCar, m = e.noIsolation, g = e.inert, p = e.allowPinchZoom, v = e.as, $ = v === void 0 ? "div" : v, y = e.gapMode, b = Bu(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), _ = h, x = ay([n, t]), S = Ke(Ke({}, b), a);
|
|
9895
9893
|
return c.createElement(
|
|
9896
9894
|
c.Fragment,
|
|
9897
9895
|
null,
|
|
9898
|
-
d && c.createElement(_, { sideCar: Hu, removeScrollBar: l, shards: f, noIsolation: m, inert:
|
|
9899
|
-
i ? c.cloneElement(c.Children.only(s), Ke(Ke({}, S), { ref:
|
|
9896
|
+
d && c.createElement(_, { sideCar: Hu, removeScrollBar: l, shards: f, noIsolation: m, inert: g, setCallbacks: o, allowPinchZoom: !!p, lockRef: n, gapMode: y }),
|
|
9897
|
+
i ? c.cloneElement(c.Children.only(s), Ke(Ke({}, S), { ref: x })) : c.createElement($, Ke({}, S, { className: u, ref: x }), s)
|
|
9900
9898
|
);
|
|
9901
9899
|
});
|
|
9902
9900
|
wr.defaultProps = {
|
|
@@ -10096,8 +10094,8 @@ var At = bo ? { passive: !1 } : !1, $y = function(e) {
|
|
|
10096
10094
|
}, Cy = function(e, t, n, r, a) {
|
|
10097
10095
|
var o = Dy(e, window.getComputedStyle(t).direction), i = o * r, s = n.target, u = t.contains(s), l = !1, d = i > 0, f = 0, h = 0;
|
|
10098
10096
|
do {
|
|
10099
|
-
var m = Vu(e, s),
|
|
10100
|
-
(
|
|
10097
|
+
var m = Vu(e, s), g = m[0], p = m[1], v = m[2], $ = p - v - o * g;
|
|
10098
|
+
(g || $) && Xu(e, s) && (f += $, h += g), s instanceof ShadowRoot ? s = s.host : s = s.parentNode;
|
|
10101
10099
|
} while (
|
|
10102
10100
|
// portaled content
|
|
10103
10101
|
!u && s !== document.body || // self content
|
|
@@ -10126,49 +10124,49 @@ function Py(e) {
|
|
|
10126
10124
|
if (e.inert) {
|
|
10127
10125
|
document.body.classList.add("block-interactivity-".concat(a));
|
|
10128
10126
|
var p = ey([e.lockRef.current], (e.shards || []).map(Fi)).filter(Boolean);
|
|
10129
|
-
return p.forEach(function(
|
|
10130
|
-
return
|
|
10127
|
+
return p.forEach(function(v) {
|
|
10128
|
+
return v.classList.add("allow-interactivity-".concat(a));
|
|
10131
10129
|
}), function() {
|
|
10132
|
-
document.body.classList.remove("block-interactivity-".concat(a)), p.forEach(function(
|
|
10133
|
-
return
|
|
10130
|
+
document.body.classList.remove("block-interactivity-".concat(a)), p.forEach(function(v) {
|
|
10131
|
+
return v.classList.remove("allow-interactivity-".concat(a));
|
|
10134
10132
|
});
|
|
10135
10133
|
};
|
|
10136
10134
|
}
|
|
10137
10135
|
}, [e.inert, e.lockRef.current, e.shards]);
|
|
10138
|
-
var s = c.useCallback(function(p,
|
|
10136
|
+
var s = c.useCallback(function(p, v) {
|
|
10139
10137
|
if ("touches" in p && p.touches.length === 2 || p.type === "wheel" && p.ctrlKey)
|
|
10140
10138
|
return !i.current.allowPinchZoom;
|
|
10141
|
-
var
|
|
10139
|
+
var $ = Hn(p), y = n.current, b = "deltaX" in p ? p.deltaX : y[0] - $[0], _ = "deltaY" in p ? p.deltaY : y[1] - $[1], x, S = p.target, M = Math.abs(b) > Math.abs(_) ? "h" : "v";
|
|
10142
10140
|
if ("touches" in p && M === "h" && S.type === "range")
|
|
10143
10141
|
return !1;
|
|
10144
|
-
var
|
|
10145
|
-
if (!
|
|
10142
|
+
var N = Wi(M, S);
|
|
10143
|
+
if (!N)
|
|
10146
10144
|
return !0;
|
|
10147
|
-
if (
|
|
10145
|
+
if (N ? x = M : (x = M === "v" ? "h" : "v", N = Wi(M, S)), !N)
|
|
10148
10146
|
return !1;
|
|
10149
|
-
if (!r.current && "changedTouches" in p && (b || _) && (r.current =
|
|
10147
|
+
if (!r.current && "changedTouches" in p && (b || _) && (r.current = x), !x)
|
|
10150
10148
|
return !0;
|
|
10151
|
-
var
|
|
10152
|
-
return Cy(
|
|
10149
|
+
var E = r.current || x;
|
|
10150
|
+
return Cy(E, v, p, E === "h" ? b : _);
|
|
10153
10151
|
}, []), u = c.useCallback(function(p) {
|
|
10154
|
-
var
|
|
10152
|
+
var v = p;
|
|
10155
10153
|
if (!(!Wt.length || Wt[Wt.length - 1] !== o)) {
|
|
10156
|
-
var
|
|
10157
|
-
return
|
|
10154
|
+
var $ = "deltaY" in v ? Ii(v) : Hn(v), y = t.current.filter(function(x) {
|
|
10155
|
+
return x.name === v.type && (x.target === v.target || v.target === x.shadowParent) && Ny(x.delta, $);
|
|
10158
10156
|
})[0];
|
|
10159
10157
|
if (y && y.should) {
|
|
10160
|
-
|
|
10158
|
+
v.cancelable && v.preventDefault();
|
|
10161
10159
|
return;
|
|
10162
10160
|
}
|
|
10163
10161
|
if (!y) {
|
|
10164
|
-
var b = (i.current.shards || []).map(Fi).filter(Boolean).filter(function(
|
|
10165
|
-
return
|
|
10166
|
-
}), _ = b.length > 0 ? s(
|
|
10167
|
-
_ &&
|
|
10162
|
+
var b = (i.current.shards || []).map(Fi).filter(Boolean).filter(function(x) {
|
|
10163
|
+
return x.contains(v.target);
|
|
10164
|
+
}), _ = b.length > 0 ? s(v, b[0]) : !i.current.noIsolation;
|
|
10165
|
+
_ && v.cancelable && v.preventDefault();
|
|
10168
10166
|
}
|
|
10169
10167
|
}
|
|
10170
|
-
}, []), l = c.useCallback(function(p,
|
|
10171
|
-
var b = { name: p, delta:
|
|
10168
|
+
}, []), l = c.useCallback(function(p, v, $, y) {
|
|
10169
|
+
var b = { name: p, delta: v, target: $, should: y, shadowParent: Ry($) };
|
|
10172
10170
|
t.current.push(b), setTimeout(function() {
|
|
10173
10171
|
t.current = t.current.filter(function(_) {
|
|
10174
10172
|
return _ !== b;
|
|
@@ -10192,11 +10190,11 @@ function Py(e) {
|
|
|
10192
10190
|
}), document.removeEventListener("wheel", u, At), document.removeEventListener("touchmove", u, At), document.removeEventListener("touchstart", d, At);
|
|
10193
10191
|
};
|
|
10194
10192
|
}, []);
|
|
10195
|
-
var m = e.removeScrollBar,
|
|
10193
|
+
var m = e.removeScrollBar, g = e.inert;
|
|
10196
10194
|
return c.createElement(
|
|
10197
10195
|
c.Fragment,
|
|
10198
10196
|
null,
|
|
10199
|
-
|
|
10197
|
+
g ? c.createElement(o, { styles: Oy(a) }) : null,
|
|
10200
10198
|
m ? c.createElement(xy, { gapMode: e.gapMode }) : null
|
|
10201
10199
|
);
|
|
10202
10200
|
}
|
|
@@ -10239,10 +10237,10 @@ var Ay = function(e) {
|
|
|
10239
10237
|
d(h);
|
|
10240
10238
|
else
|
|
10241
10239
|
try {
|
|
10242
|
-
var m = h.getAttribute(r),
|
|
10243
|
-
It.set(h, p), o.set(h,
|
|
10244
|
-
} catch (
|
|
10245
|
-
console.error("aria-hidden: cannot operate on ", h,
|
|
10240
|
+
var m = h.getAttribute(r), g = m !== null && m !== "false", p = (It.get(h) || 0) + 1, v = (o.get(h) || 0) + 1;
|
|
10241
|
+
It.set(h, p), o.set(h, v), i.push(h), p === 1 && g && jn.set(h, !0), v === 1 && h.setAttribute(n, "true"), g || h.setAttribute(r, "true");
|
|
10242
|
+
} catch ($) {
|
|
10243
|
+
console.error("aria-hidden: cannot operate on ", h, $);
|
|
10246
10244
|
}
|
|
10247
10245
|
});
|
|
10248
10246
|
};
|
|
@@ -10312,13 +10310,13 @@ var Bo = "DialogPortal", [By, el] = Zu(Bo, {
|
|
|
10312
10310
|
forceMount: void 0
|
|
10313
10311
|
}), tl = (e) => {
|
|
10314
10312
|
const { __scopeDialog: t, forceMount: n, children: r, container: a } = e, o = He(Bo, t);
|
|
10315
|
-
return /* @__PURE__ */ w(By, { scope: t, forceMount: n, children: c.Children.map(r, (i) => /* @__PURE__ */ w(
|
|
10313
|
+
return /* @__PURE__ */ w(By, { scope: t, forceMount: n, children: c.Children.map(r, (i) => /* @__PURE__ */ w(xt, { present: n || o.open, children: /* @__PURE__ */ w(qu, { asChild: !0, container: a, children: i }) })) });
|
|
10316
10314
|
};
|
|
10317
10315
|
tl.displayName = Bo;
|
|
10318
10316
|
var sr = "DialogOverlay", nl = c.forwardRef(
|
|
10319
10317
|
(e, t) => {
|
|
10320
10318
|
const n = el(sr, e.__scopeDialog), { forceMount: r = n.forceMount, ...a } = e, o = He(sr, e.__scopeDialog);
|
|
10321
|
-
return o.modal ? /* @__PURE__ */ w(
|
|
10319
|
+
return o.modal ? /* @__PURE__ */ w(xt, { present: r || o.open, children: /* @__PURE__ */ w(Yy, { ...a, ref: t }) }) : null;
|
|
10322
10320
|
}
|
|
10323
10321
|
);
|
|
10324
10322
|
nl.displayName = sr;
|
|
@@ -10342,7 +10340,7 @@ var Yy = c.forwardRef(
|
|
|
10342
10340
|
), Ot = "DialogContent", rl = c.forwardRef(
|
|
10343
10341
|
(e, t) => {
|
|
10344
10342
|
const n = el(Ot, e.__scopeDialog), { forceMount: r = n.forceMount, ...a } = e, o = He(Ot, e.__scopeDialog);
|
|
10345
|
-
return /* @__PURE__ */ w(
|
|
10343
|
+
return /* @__PURE__ */ w(xt, { present: r || o.open, children: o.modal ? /* @__PURE__ */ w(Hy, { ...a, ref: t }) : /* @__PURE__ */ w(jy, { ...a, ref: t }) });
|
|
10346
10344
|
}
|
|
10347
10345
|
);
|
|
10348
10346
|
rl.displayName = Ot;
|
|
@@ -10605,7 +10603,7 @@ const f0 = {
|
|
|
10605
10603
|
onSwipeEnd: o,
|
|
10606
10604
|
...i
|
|
10607
10605
|
}, s) => {
|
|
10608
|
-
const u = m0([t, g0]), l =
|
|
10606
|
+
const u = m0([t, g0]), l = C.useRef(null), d = C.useRef(null), { onPointerDown: f, onPointerMove: h, onPointerUp: m } = h0(
|
|
10609
10607
|
d,
|
|
10610
10608
|
l,
|
|
10611
10609
|
n,
|
|
@@ -10773,7 +10771,7 @@ const N0 = /* @__PURE__ */ E0(C0), O0 = {
|
|
|
10773
10771
|
}, Jr = {
|
|
10774
10772
|
TERTIARY_PURPLE: "tertiary-purple",
|
|
10775
10773
|
TEXT: "text"
|
|
10776
|
-
}, T0 = N0.bind(O0),
|
|
10774
|
+
}, T0 = N0.bind(O0), kt = "purpur-button", yo = De(
|
|
10777
10775
|
({
|
|
10778
10776
|
children: e,
|
|
10779
10777
|
className: t,
|
|
@@ -10792,19 +10790,19 @@ const N0 = /* @__PURE__ */ E0(C0), O0 = {
|
|
|
10792
10790
|
return null;
|
|
10793
10791
|
const m = T0(
|
|
10794
10792
|
[
|
|
10795
|
-
|
|
10796
|
-
`${
|
|
10797
|
-
`${
|
|
10793
|
+
kt,
|
|
10794
|
+
`${kt}--${i ? `${l}-negative` : l}`,
|
|
10795
|
+
`${kt}--${u}`
|
|
10798
10796
|
],
|
|
10799
10797
|
{
|
|
10800
|
-
[`${
|
|
10801
|
-
[`${
|
|
10802
|
-
[`${
|
|
10803
|
-
[`${
|
|
10798
|
+
[`${kt}--icon-only`]: a,
|
|
10799
|
+
[`${kt}--negative`]: i,
|
|
10800
|
+
[`${kt}--full-width`]: r,
|
|
10801
|
+
[`${kt}--disabled`]: n || o
|
|
10804
10802
|
},
|
|
10805
10803
|
t
|
|
10806
|
-
),
|
|
10807
|
-
n || o ?
|
|
10804
|
+
), g = (v) => {
|
|
10805
|
+
n || o ? v.preventDefault() : s && s(v);
|
|
10808
10806
|
}, p = !!f["aria-disabled"] || n || o;
|
|
10809
10807
|
return /* @__PURE__ */ te(
|
|
10810
10808
|
"button",
|
|
@@ -10813,7 +10811,7 @@ const N0 = /* @__PURE__ */ E0(C0), O0 = {
|
|
|
10813
10811
|
type: d,
|
|
10814
10812
|
ref: h,
|
|
10815
10813
|
"aria-disabled": p,
|
|
10816
|
-
onClick:
|
|
10814
|
+
onClick: g,
|
|
10817
10815
|
...f,
|
|
10818
10816
|
children: [
|
|
10819
10817
|
o && /* @__PURE__ */ w(
|
|
@@ -10876,21 +10874,25 @@ function R0() {
|
|
|
10876
10874
|
}
|
|
10877
10875
|
var L0 = R0();
|
|
10878
10876
|
const A0 = /* @__PURE__ */ P0(L0), Vn = {
|
|
10879
|
-
"purpur-heading": "_purpur-
|
|
10880
|
-
"purpur-heading--hyphens": "_purpur-heading--
|
|
10881
|
-
"purpur-heading--negative": "_purpur-heading--
|
|
10882
|
-
"purpur-heading--subsection-100": "_purpur-heading--subsection-
|
|
10883
|
-
"purpur-heading--title-100": "_purpur-heading--title-
|
|
10884
|
-
"purpur-heading--title-200": "_purpur-heading--title-
|
|
10885
|
-
"purpur-heading--title-300": "_purpur-heading--title-
|
|
10886
|
-
"purpur-heading--title-400": "_purpur-heading--title-
|
|
10887
|
-
"purpur-heading--title-500": "_purpur-heading--title-
|
|
10888
|
-
"purpur-heading--title-600": "_purpur-heading--title-
|
|
10889
|
-
"purpur-heading--title-700": "_purpur-heading--title-
|
|
10890
|
-
"purpur-heading--display-
|
|
10891
|
-
"purpur-heading--display-
|
|
10892
|
-
"purpur-heading--display-
|
|
10893
|
-
"purpur-heading--display-
|
|
10877
|
+
"purpur-heading": "_purpur-heading_vo751_1",
|
|
10878
|
+
"purpur-heading--hyphens": "_purpur-heading--hyphens_vo751_8",
|
|
10879
|
+
"purpur-heading--negative": "_purpur-heading--negative_vo751_11",
|
|
10880
|
+
"purpur-heading--subsection-100": "_purpur-heading--subsection-100_vo751_14",
|
|
10881
|
+
"purpur-heading--title-100": "_purpur-heading--title-100_vo751_20",
|
|
10882
|
+
"purpur-heading--title-200": "_purpur-heading--title-200_vo751_26",
|
|
10883
|
+
"purpur-heading--title-300": "_purpur-heading--title-300_vo751_32",
|
|
10884
|
+
"purpur-heading--title-400": "_purpur-heading--title-400_vo751_38",
|
|
10885
|
+
"purpur-heading--title-500": "_purpur-heading--title-500_vo751_44",
|
|
10886
|
+
"purpur-heading--title-600": "_purpur-heading--title-600_vo751_50",
|
|
10887
|
+
"purpur-heading--title-700": "_purpur-heading--title-700_vo751_56",
|
|
10888
|
+
"purpur-heading--display-5": "_purpur-heading--display-5_vo751_62",
|
|
10889
|
+
"purpur-heading--display-10": "_purpur-heading--display-10_vo751_68",
|
|
10890
|
+
"purpur-heading--display-15": "_purpur-heading--display-15_vo751_74",
|
|
10891
|
+
"purpur-heading--display-20": "_purpur-heading--display-20_vo751_80",
|
|
10892
|
+
"purpur-heading--display-25": "_purpur-heading--display-25_vo751_86",
|
|
10893
|
+
"purpur-heading--display-50": "_purpur-heading--display-50_vo751_92",
|
|
10894
|
+
"purpur-heading--display-100": "_purpur-heading--display-100_vo751_98",
|
|
10895
|
+
"purpur-heading--display-200": "_purpur-heading--display-200_vo751_104"
|
|
10894
10896
|
}, _o = {
|
|
10895
10897
|
TITLE100: "title-100",
|
|
10896
10898
|
TITLE200: "title-200"
|
|
@@ -11218,13 +11220,13 @@ var zo = "ScrollArea", [bl, N_] = Ru(zo), [l1, Re] = bl(zo), yl = c.forwardRef(
|
|
|
11218
11220
|
dir: a,
|
|
11219
11221
|
scrollHideDelay: o = 600,
|
|
11220
11222
|
...i
|
|
11221
|
-
} = e, [s, u] = c.useState(null), [l, d] = c.useState(null), [f, h] = c.useState(null), [m,
|
|
11223
|
+
} = e, [s, u] = c.useState(null), [l, d] = c.useState(null), [f, h] = c.useState(null), [m, g] = c.useState(null), [p, v] = c.useState(null), [$, y] = c.useState(0), [b, _] = c.useState(0), [x, S] = c.useState(!1), [M, N] = c.useState(!1), E = Ce(t, (L) => u(L)), k = i1(a);
|
|
11222
11224
|
return /* @__PURE__ */ w(
|
|
11223
11225
|
l1,
|
|
11224
11226
|
{
|
|
11225
11227
|
scope: n,
|
|
11226
11228
|
type: r,
|
|
11227
|
-
dir:
|
|
11229
|
+
dir: k,
|
|
11228
11230
|
scrollHideDelay: o,
|
|
11229
11231
|
scrollArea: s,
|
|
11230
11232
|
viewport: l,
|
|
@@ -11232,25 +11234,25 @@ var zo = "ScrollArea", [bl, N_] = Ru(zo), [l1, Re] = bl(zo), yl = c.forwardRef(
|
|
|
11232
11234
|
content: f,
|
|
11233
11235
|
onContentChange: h,
|
|
11234
11236
|
scrollbarX: m,
|
|
11235
|
-
onScrollbarXChange:
|
|
11236
|
-
scrollbarXEnabled:
|
|
11237
|
+
onScrollbarXChange: g,
|
|
11238
|
+
scrollbarXEnabled: x,
|
|
11237
11239
|
onScrollbarXEnabledChange: S,
|
|
11238
11240
|
scrollbarY: p,
|
|
11239
|
-
onScrollbarYChange:
|
|
11241
|
+
onScrollbarYChange: v,
|
|
11240
11242
|
scrollbarYEnabled: M,
|
|
11241
|
-
onScrollbarYEnabledChange:
|
|
11243
|
+
onScrollbarYEnabledChange: N,
|
|
11242
11244
|
onCornerWidthChange: y,
|
|
11243
11245
|
onCornerHeightChange: _,
|
|
11244
11246
|
children: /* @__PURE__ */ w(
|
|
11245
11247
|
$e.div,
|
|
11246
11248
|
{
|
|
11247
|
-
dir:
|
|
11249
|
+
dir: k,
|
|
11248
11250
|
...i,
|
|
11249
|
-
ref:
|
|
11251
|
+
ref: E,
|
|
11250
11252
|
style: {
|
|
11251
11253
|
position: "relative",
|
|
11252
11254
|
// Pass corner sizes as CSS vars to reduce re-renders of context consumers
|
|
11253
|
-
"--radix-scroll-area-corner-width":
|
|
11255
|
+
"--radix-scroll-area-corner-width": $ + "px",
|
|
11254
11256
|
"--radix-scroll-area-corner-height": b + "px",
|
|
11255
11257
|
...e.style
|
|
11256
11258
|
}
|
|
@@ -11327,7 +11329,7 @@ var c1 = c.forwardRef((e, t) => {
|
|
|
11327
11329
|
window.clearTimeout(u), s.removeEventListener("pointerenter", l), s.removeEventListener("pointerleave", d);
|
|
11328
11330
|
};
|
|
11329
11331
|
}
|
|
11330
|
-
}, [a.scrollArea, a.scrollHideDelay]), /* @__PURE__ */ w(
|
|
11332
|
+
}, [a.scrollArea, a.scrollHideDelay]), /* @__PURE__ */ w(xt, { present: n || o, children: /* @__PURE__ */ w(
|
|
11331
11333
|
Sl,
|
|
11332
11334
|
{
|
|
11333
11335
|
"data-state": o ? "visible" : "hidden",
|
|
@@ -11369,7 +11371,7 @@ var c1 = c.forwardRef((e, t) => {
|
|
|
11369
11371
|
};
|
|
11370
11372
|
return l.addEventListener("scroll", h), () => l.removeEventListener("scroll", h);
|
|
11371
11373
|
}
|
|
11372
|
-
}, [a.viewport, o, u, i]), /* @__PURE__ */ w(
|
|
11374
|
+
}, [a.viewport, o, u, i]), /* @__PURE__ */ w(xt, { present: n || s !== "hidden", children: /* @__PURE__ */ w(
|
|
11373
11375
|
Xo,
|
|
11374
11376
|
{
|
|
11375
11377
|
"data-state": s === "hidden" ? "hidden" : "visible",
|
|
@@ -11386,7 +11388,7 @@ var c1 = c.forwardRef((e, t) => {
|
|
|
11386
11388
|
i(s ? l : d);
|
|
11387
11389
|
}
|
|
11388
11390
|
}, 10);
|
|
11389
|
-
return en(n.viewport, u), en(n.content, u), /* @__PURE__ */ w(
|
|
11391
|
+
return en(n.viewport, u), en(n.content, u), /* @__PURE__ */ w(xt, { present: r || o, children: /* @__PURE__ */ w(
|
|
11390
11392
|
Xo,
|
|
11391
11393
|
{
|
|
11392
11394
|
"data-state": o ? "visible" : "hidden",
|
|
@@ -11540,24 +11542,24 @@ var c1 = c.forwardRef((e, t) => {
|
|
|
11540
11542
|
onWheelScroll: d,
|
|
11541
11543
|
onResize: f,
|
|
11542
11544
|
...h
|
|
11543
|
-
} = e, m = Re(tt, n), [
|
|
11544
|
-
function
|
|
11545
|
-
if (
|
|
11546
|
-
const
|
|
11547
|
-
l({ x:
|
|
11545
|
+
} = e, m = Re(tt, n), [g, p] = c.useState(null), v = Ce(t, (E) => p(E)), $ = c.useRef(null), y = c.useRef(""), b = m.viewport, _ = r.content - r.viewport, x = xe(d), S = xe(u), M = yr(f, 10);
|
|
11546
|
+
function N(E) {
|
|
11547
|
+
if ($.current) {
|
|
11548
|
+
const k = E.clientX - $.current.left, L = E.clientY - $.current.top;
|
|
11549
|
+
l({ x: k, y: L });
|
|
11548
11550
|
}
|
|
11549
11551
|
}
|
|
11550
11552
|
return c.useEffect(() => {
|
|
11551
|
-
const
|
|
11552
|
-
const L =
|
|
11553
|
-
|
|
11553
|
+
const E = (k) => {
|
|
11554
|
+
const L = k.target;
|
|
11555
|
+
g != null && g.contains(L) && x(k, _);
|
|
11554
11556
|
};
|
|
11555
|
-
return document.addEventListener("wheel",
|
|
11556
|
-
}, [b,
|
|
11557
|
+
return document.addEventListener("wheel", E, { passive: !1 }), () => document.removeEventListener("wheel", E, { passive: !1 });
|
|
11558
|
+
}, [b, g, _, x]), c.useEffect(S, [r, S]), en(g, M), en(m.content, M), /* @__PURE__ */ w(
|
|
11557
11559
|
h1,
|
|
11558
11560
|
{
|
|
11559
11561
|
scope: n,
|
|
11560
|
-
scrollbar:
|
|
11562
|
+
scrollbar: g,
|
|
11561
11563
|
hasThumb: a,
|
|
11562
11564
|
onThumbChange: xe(o),
|
|
11563
11565
|
onThumbPointerUp: xe(i),
|
|
@@ -11567,15 +11569,15 @@ var c1 = c.forwardRef((e, t) => {
|
|
|
11567
11569
|
$e.div,
|
|
11568
11570
|
{
|
|
11569
11571
|
...h,
|
|
11570
|
-
ref:
|
|
11572
|
+
ref: v,
|
|
11571
11573
|
style: { position: "absolute", ...h.style },
|
|
11572
|
-
onPointerDown: _e(e.onPointerDown, (
|
|
11573
|
-
|
|
11574
|
+
onPointerDown: _e(e.onPointerDown, (E) => {
|
|
11575
|
+
E.button === 0 && (E.target.setPointerCapture(E.pointerId), $.current = g.getBoundingClientRect(), y.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", m.viewport && (m.viewport.style.scrollBehavior = "auto"), N(E));
|
|
11574
11576
|
}),
|
|
11575
|
-
onPointerMove: _e(e.onPointerMove,
|
|
11576
|
-
onPointerUp: _e(e.onPointerUp, (
|
|
11577
|
-
const
|
|
11578
|
-
|
|
11577
|
+
onPointerMove: _e(e.onPointerMove, N),
|
|
11578
|
+
onPointerUp: _e(e.onPointerUp, (E) => {
|
|
11579
|
+
const k = E.target;
|
|
11580
|
+
k.hasPointerCapture(E.pointerId) && k.releasePointerCapture(E.pointerId), document.body.style.webkitUserSelect = y.current, m.viewport && (m.viewport.style.scrollBehavior = ""), $.current = null;
|
|
11579
11581
|
})
|
|
11580
11582
|
}
|
|
11581
11583
|
)
|
|
@@ -11584,7 +11586,7 @@ var c1 = c.forwardRef((e, t) => {
|
|
|
11584
11586
|
}), ur = "ScrollAreaThumb", El = c.forwardRef(
|
|
11585
11587
|
(e, t) => {
|
|
11586
11588
|
const { forceMount: n, ...r } = e, a = Ml(ur, e.__scopeScrollArea);
|
|
11587
|
-
return /* @__PURE__ */ w(
|
|
11589
|
+
return /* @__PURE__ */ w(xt, { present: n || a.hasThumb, children: /* @__PURE__ */ w(m1, { ref: t, ...r }) });
|
|
11588
11590
|
}
|
|
11589
11591
|
), m1 = c.forwardRef(
|
|
11590
11592
|
(e, t) => {
|
|
@@ -11617,8 +11619,8 @@ var c1 = c.forwardRef((e, t) => {
|
|
|
11617
11619
|
...r
|
|
11618
11620
|
},
|
|
11619
11621
|
onPointerDownCapture: _e(e.onPointerDownCapture, (f) => {
|
|
11620
|
-
const h = f.target.getBoundingClientRect(), m = f.clientX - h.left,
|
|
11621
|
-
i.onThumbPointerDown({ x: m, y:
|
|
11622
|
+
const h = f.target.getBoundingClientRect(), m = f.clientX - h.left, g = f.clientY - h.top;
|
|
11623
|
+
i.onThumbPointerDown({ x: m, y: g });
|
|
11622
11624
|
}),
|
|
11623
11625
|
onPointerUp: _e(e.onPointerUp, i.onThumbPointerUp)
|
|
11624
11626
|
}
|
|
@@ -11771,10 +11773,10 @@ const Bt = Tt.bind(f0), at = "purpur-drawer-frame", Ol = De(
|
|
|
11771
11773
|
onBackButtonClick: f,
|
|
11772
11774
|
onSwipeStart: h,
|
|
11773
11775
|
onSwipeMove: m,
|
|
11774
|
-
onSwipeCancel:
|
|
11776
|
+
onSwipeCancel: g,
|
|
11775
11777
|
onSwipeEnd: p,
|
|
11776
|
-
title:
|
|
11777
|
-
stickyFooter:
|
|
11778
|
+
title: v,
|
|
11779
|
+
stickyFooter: $,
|
|
11778
11780
|
...y
|
|
11779
11781
|
}, b) => {
|
|
11780
11782
|
const _ = Bt([
|
|
@@ -11782,7 +11784,7 @@ const Bt = Tt.bind(f0), at = "purpur-drawer-frame", Ol = De(
|
|
|
11782
11784
|
at,
|
|
11783
11785
|
{
|
|
11784
11786
|
[`${at}--fit-to-content`]: s,
|
|
11785
|
-
[`${at}--sticky-footer`]:
|
|
11787
|
+
[`${at}--sticky-footer`]: $
|
|
11786
11788
|
}
|
|
11787
11789
|
]);
|
|
11788
11790
|
return /* @__PURE__ */ te(
|
|
@@ -11799,7 +11801,7 @@ const Bt = Tt.bind(f0), at = "purpur-drawer-frame", Ol = De(
|
|
|
11799
11801
|
{
|
|
11800
11802
|
onSwipeStart: h,
|
|
11801
11803
|
onSwipeMove: m,
|
|
11802
|
-
onSwipeCancel:
|
|
11804
|
+
onSwipeCancel: g,
|
|
11803
11805
|
onSwipeEnd: p
|
|
11804
11806
|
}
|
|
11805
11807
|
),
|
|
@@ -11808,11 +11810,11 @@ const Bt = Tt.bind(f0), at = "purpur-drawer-frame", Ol = De(
|
|
|
11808
11810
|
{
|
|
11809
11811
|
className: Bt(`${at}__header`),
|
|
11810
11812
|
variant: "header",
|
|
11811
|
-
stickyFooter:
|
|
11813
|
+
stickyFooter: $,
|
|
11812
11814
|
children: /* @__PURE__ */ w(
|
|
11813
11815
|
wl,
|
|
11814
11816
|
{
|
|
11815
|
-
title:
|
|
11817
|
+
title: v,
|
|
11816
11818
|
headerContent: l,
|
|
11817
11819
|
backButtonOnlyIcon: r,
|
|
11818
11820
|
backButton: t,
|
|
@@ -11823,7 +11825,7 @@ const Bt = Tt.bind(f0), at = "purpur-drawer-frame", Ol = De(
|
|
|
11823
11825
|
)
|
|
11824
11826
|
}
|
|
11825
11827
|
),
|
|
11826
|
-
|
|
11828
|
+
$ ? /* @__PURE__ */ te(Qe, { children: [
|
|
11827
11829
|
/* @__PURE__ */ w(
|
|
11828
11830
|
So,
|
|
11829
11831
|
{
|
|
@@ -11839,7 +11841,7 @@ const Bt = Tt.bind(f0), at = "purpur-drawer-frame", Ol = De(
|
|
|
11839
11841
|
className: Bt(`${at}__footer`),
|
|
11840
11842
|
"data-testid": `${e}-sticky-footer`,
|
|
11841
11843
|
variant: "footer",
|
|
11842
|
-
stickyFooter:
|
|
11844
|
+
stickyFooter: $,
|
|
11843
11845
|
children: u
|
|
11844
11846
|
}
|
|
11845
11847
|
)
|
|
@@ -11857,12 +11859,12 @@ const Bt = Tt.bind(f0), at = "purpur-drawer-frame", Ol = De(
|
|
|
11857
11859
|
{ [`${at}__content-container--no-footer`]: !u }
|
|
11858
11860
|
]),
|
|
11859
11861
|
children: [
|
|
11860
|
-
/* @__PURE__ */ w(Ht, { stickyFooter:
|
|
11862
|
+
/* @__PURE__ */ w(Ht, { stickyFooter: $, children: a }),
|
|
11861
11863
|
u && /* @__PURE__ */ w(
|
|
11862
11864
|
Ht,
|
|
11863
11865
|
{
|
|
11864
11866
|
"data-testid": `${e}-footer`,
|
|
11865
|
-
stickyFooter:
|
|
11867
|
+
stickyFooter: $,
|
|
11866
11868
|
variant: "footer",
|
|
11867
11869
|
children: u
|
|
11868
11870
|
}
|
|
@@ -11916,15 +11918,15 @@ const M1 = (e, t) => ({
|
|
|
11916
11918
|
headerContent: f,
|
|
11917
11919
|
onBackButtonClick: h,
|
|
11918
11920
|
stickyFooter: m = !1,
|
|
11919
|
-
title:
|
|
11921
|
+
title: g,
|
|
11920
11922
|
zIndex: p,
|
|
11921
|
-
...
|
|
11922
|
-
},
|
|
11923
|
+
...v
|
|
11924
|
+
}, $) => {
|
|
11923
11925
|
const y = hn([
|
|
11924
11926
|
i,
|
|
11925
11927
|
mn,
|
|
11926
11928
|
{ [`${mn}--fit-to-content`]: l }
|
|
11927
|
-
]), b =
|
|
11929
|
+
]), b = vt(null), _ = ss(fl), { onAnimationEnd: x, onSwipeStart: S, onSwipeMove: M, onSwipeCancel: N, onSwipeEnd: E } = M1(b, _), k = (J) => {
|
|
11928
11930
|
u && J.preventDefault();
|
|
11929
11931
|
}, L = () => {
|
|
11930
11932
|
const J = b.current;
|
|
@@ -11944,13 +11946,13 @@ const M1 = (e, t) => ({
|
|
|
11944
11946
|
children: /* @__PURE__ */ w(
|
|
11945
11947
|
Qy,
|
|
11946
11948
|
{
|
|
11947
|
-
onPointerDownOutside:
|
|
11949
|
+
onPointerDownOutside: k,
|
|
11948
11950
|
onOpenAutoFocus: L,
|
|
11949
11951
|
className: y,
|
|
11950
11952
|
"data-testid": e,
|
|
11951
|
-
ref:
|
|
11953
|
+
ref: $,
|
|
11952
11954
|
...!a && { "aria-describedby": void 0 },
|
|
11953
|
-
...
|
|
11955
|
+
...v,
|
|
11954
11956
|
children: /* @__PURE__ */ w(
|
|
11955
11957
|
Ol,
|
|
11956
11958
|
{
|
|
@@ -11963,14 +11965,14 @@ const M1 = (e, t) => ({
|
|
|
11963
11965
|
footerContent: d,
|
|
11964
11966
|
headerContent: f,
|
|
11965
11967
|
ref: b,
|
|
11966
|
-
onAnimationEnd:
|
|
11968
|
+
onAnimationEnd: x,
|
|
11967
11969
|
onBackButtonClick: h,
|
|
11968
11970
|
onSwipeStart: S,
|
|
11969
11971
|
onSwipeMove: M,
|
|
11970
|
-
onSwipeCancel:
|
|
11971
|
-
onSwipeEnd:
|
|
11972
|
+
onSwipeCancel: N,
|
|
11973
|
+
onSwipeEnd: E,
|
|
11972
11974
|
stickyFooter: m,
|
|
11973
|
-
title:
|
|
11975
|
+
title: g,
|
|
11974
11976
|
children: a ? /* @__PURE__ */ te("div", { className: hn(`${mn}__content-container`), children: [
|
|
11975
11977
|
/* @__PURE__ */ w(
|
|
11976
11978
|
Jy,
|
|
@@ -12003,7 +12005,7 @@ const k1 = Tt.bind(o0), E1 = "purpur-drawer", Gt = ({
|
|
|
12003
12005
|
open: a = !1,
|
|
12004
12006
|
...o
|
|
12005
12007
|
}) => {
|
|
12006
|
-
const [i, s] =
|
|
12008
|
+
const [i, s] = C.useState(a), u = k1([n, E1]), l = (d) => {
|
|
12007
12009
|
s(d), r == null || r(d);
|
|
12008
12010
|
};
|
|
12009
12011
|
return Cn(() => {
|
|
@@ -12133,11 +12135,11 @@ var B1 = q1();
|
|
|
12133
12135
|
const Y1 = /* @__PURE__ */ F1(B1), H1 = {
|
|
12134
12136
|
"date-picker-calendar-container": "_date-picker-calendar-container_17f84_1"
|
|
12135
12137
|
}, j1 = Y1.bind(H1), z1 = De(
|
|
12136
|
-
({ calendarProps: e,
|
|
12137
|
-
const [
|
|
12138
|
-
open:
|
|
12138
|
+
({ calendarProps: e, drawerContentProps: t, value: n, onChange: r, ...a }, o) => {
|
|
12139
|
+
const [i, s] = Fe(!1), [u, l] = Fe(!1), [d, f] = Fe(!1), h = vt(null), { context: m, refs: g, floatingStyles: p } = zd({
|
|
12140
|
+
open: i,
|
|
12139
12141
|
onOpenChange: (k) => {
|
|
12140
|
-
|
|
12142
|
+
a.readOnly || s(k);
|
|
12141
12143
|
},
|
|
12142
12144
|
placement: "bottom-start",
|
|
12143
12145
|
middleware: [
|
|
@@ -12149,30 +12151,30 @@ const Y1 = /* @__PURE__ */ F1(B1), H1 = {
|
|
|
12149
12151
|
gd()
|
|
12150
12152
|
],
|
|
12151
12153
|
whileElementsMounted: ud
|
|
12152
|
-
}), v = qd(
|
|
12154
|
+
}), v = qd(m), $ = Hd(m), { getFloatingProps: y, getReferenceProps: b } = Xd([v, $]), [_, x] = Fe(n);
|
|
12153
12155
|
Cn(() => {
|
|
12154
|
-
|
|
12155
|
-
}, [
|
|
12156
|
-
const
|
|
12157
|
-
k ? (
|
|
12158
|
-
},
|
|
12156
|
+
x(n);
|
|
12157
|
+
}, [n]);
|
|
12158
|
+
const S = (k) => {
|
|
12159
|
+
k ? (x(k), r == null || r(k), (i || u) && (s(!1), l(!1))) : (x(void 0), r == null || r(void 0));
|
|
12160
|
+
}, M = us();
|
|
12159
12161
|
return Dn(() => {
|
|
12160
12162
|
const k = () => {
|
|
12161
|
-
|
|
12163
|
+
f(window.innerWidth < 600);
|
|
12162
12164
|
};
|
|
12163
12165
|
return k(), window.addEventListener("resize", k), () => {
|
|
12164
12166
|
window.removeEventListener("resize", k);
|
|
12165
12167
|
};
|
|
12166
|
-
}, []),
|
|
12168
|
+
}, []), d ? /* @__PURE__ */ te(Gt, { open: u, onOpenChange: l, children: [
|
|
12167
12169
|
/* @__PURE__ */ w(Gt.Trigger, { children: /* @__PURE__ */ w(
|
|
12168
12170
|
go,
|
|
12169
12171
|
{
|
|
12170
|
-
...
|
|
12172
|
+
...a,
|
|
12171
12173
|
startAdornment: /* @__PURE__ */ w(Mo, { size: "sm" }),
|
|
12172
|
-
id:
|
|
12173
|
-
value:
|
|
12174
|
-
onChange:
|
|
12175
|
-
"data-testid":
|
|
12174
|
+
id: M,
|
|
12175
|
+
value: _,
|
|
12176
|
+
onChange: (k) => S(k),
|
|
12177
|
+
"data-testid": a["data-testid"]
|
|
12176
12178
|
}
|
|
12177
12179
|
) }),
|
|
12178
12180
|
/* @__PURE__ */ w(
|
|
@@ -12180,49 +12182,51 @@ const Y1 = /* @__PURE__ */ F1(B1), H1 = {
|
|
|
12180
12182
|
{
|
|
12181
12183
|
closeButtonAriaLabel: "Close calendar",
|
|
12182
12184
|
title: "Select date",
|
|
12185
|
+
"data-testid": a["data-testid"] && `${a["data-testid"]}-calendar`,
|
|
12186
|
+
...t,
|
|
12183
12187
|
fitToContent: !0,
|
|
12184
|
-
"data-testid": r["data-testid"] && `${r["data-testid"]}-calendar`,
|
|
12185
12188
|
children: /* @__PURE__ */ w(
|
|
12186
12189
|
fo,
|
|
12187
12190
|
{
|
|
12188
12191
|
showOutsideDays: !0,
|
|
12189
12192
|
...e,
|
|
12190
12193
|
mode: "single",
|
|
12191
|
-
selected:
|
|
12192
|
-
onSelect: (k) =>
|
|
12194
|
+
selected: _,
|
|
12195
|
+
onSelect: (k) => S(k)
|
|
12193
12196
|
}
|
|
12194
12197
|
)
|
|
12195
12198
|
}
|
|
12196
12199
|
)
|
|
12197
|
-
] }) : /* @__PURE__ */ te("div", { ref:
|
|
12200
|
+
] }) : /* @__PURE__ */ te("div", { ref: o, children: [
|
|
12198
12201
|
/* @__PURE__ */ w(
|
|
12199
12202
|
go,
|
|
12200
12203
|
{
|
|
12201
|
-
...
|
|
12202
|
-
ref:
|
|
12204
|
+
...b(a),
|
|
12205
|
+
ref: g.setReference,
|
|
12203
12206
|
startAdornment: /* @__PURE__ */ w(Mo, { size: "sm" }),
|
|
12204
|
-
id:
|
|
12205
|
-
value:
|
|
12206
|
-
onChange:
|
|
12207
|
-
"data-testid":
|
|
12207
|
+
id: M,
|
|
12208
|
+
value: _,
|
|
12209
|
+
onChange: (k) => S(k),
|
|
12210
|
+
"data-testid": a["data-testid"]
|
|
12208
12211
|
}
|
|
12209
12212
|
),
|
|
12210
|
-
|
|
12213
|
+
i && !a.readOnly && /* @__PURE__ */ w(Pd, { children: /* @__PURE__ */ w(Id, { context: m, initialFocus: h, children: /* @__PURE__ */ w(
|
|
12211
12214
|
"div",
|
|
12212
12215
|
{
|
|
12213
|
-
"data-testid":
|
|
12216
|
+
"data-testid": a["data-testid"] && `${a["data-testid"]}-calendar`,
|
|
12214
12217
|
className: j1("date-picker-calendar-container"),
|
|
12215
|
-
ref:
|
|
12216
|
-
style:
|
|
12217
|
-
...
|
|
12218
|
+
ref: g.setFloating,
|
|
12219
|
+
style: p,
|
|
12220
|
+
...y(),
|
|
12218
12221
|
children: /* @__PURE__ */ w(
|
|
12219
12222
|
fo,
|
|
12220
12223
|
{
|
|
12221
12224
|
showOutsideDays: !0,
|
|
12222
12225
|
...e,
|
|
12223
12226
|
mode: "single",
|
|
12224
|
-
selected:
|
|
12225
|
-
onSelect: (k) =>
|
|
12227
|
+
selected: _,
|
|
12228
|
+
onSelect: (k) => S(k),
|
|
12229
|
+
firstElementRef: h
|
|
12226
12230
|
}
|
|
12227
12231
|
)
|
|
12228
12232
|
}
|