@purpurds/date-picker 8.20.1 → 8.21.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.
@@ -1,6 +1,6 @@
1
1
  import { jsxs as Q, jsx as v, Fragment as Tt } from "react/jsx-runtime";
2
2
  import * as f from "react";
3
- import C, { useLayoutEffect as Cn, createContext as is, forwardRef as De, useState as Be, useEffect as Dn, useMemo as Mr, useCallback as Ne, useRef as st, useContext as as, useId as ss } from "react";
3
+ import E, { useLayoutEffect as Cn, createContext as is, forwardRef as De, useState as Be, useEffect as Dn, useMemo as Mr, useCallback as Ne, useRef as st, useContext as as, useId as ss } from "react";
4
4
  import * as $o from "react-dom";
5
5
  import Kc from "react-dom";
6
6
  function dr() {
@@ -655,12 +655,12 @@ async function Xl(e, t) {
655
655
  elementContext: d = "floating",
656
656
  altBoundary: p = !1,
657
657
  padding: m = 0
658
- } = ko(t, e), y = yl(m), g = s[p ? d === "floating" ? "reference" : "floating" : d], w = Jn(await o.getClippingRect({
658
+ } = ko(t, e), y = yl(m), g = s[p ? d === "floating" ? "reference" : "floating" : d], b = Jn(await o.getClippingRect({
659
659
  element: (n = await (o.isElement == null ? void 0 : o.isElement(g))) == null || n ? g : g.contextElement || await (o.getDocumentElement == null ? void 0 : o.getDocumentElement(s.floating)),
660
660
  boundary: u,
661
661
  rootBoundary: l,
662
662
  strategy: c
663
- })), b = d === "floating" ? {
663
+ })), w = d === "floating" ? {
664
664
  x: r,
665
665
  y: i,
666
666
  width: a.floating.width,
@@ -673,15 +673,15 @@ async function Xl(e, t) {
673
673
  y: 1
674
674
  }, x = Jn(o.convertOffsetParentRelativeRectToViewportRelativeRect ? await o.convertOffsetParentRelativeRectToViewportRelativeRect({
675
675
  elements: s,
676
- rect: b,
676
+ rect: w,
677
677
  offsetParent: _,
678
678
  strategy: c
679
- }) : b);
679
+ }) : w);
680
680
  return {
681
- top: (w.top - x.top + y.top) / $.y,
682
- bottom: (x.bottom - w.bottom + y.bottom) / $.y,
683
- left: (w.left - x.left + y.left) / $.x,
684
- right: (x.right - w.right + y.right) / $.x
681
+ top: (b.top - x.top + y.top) / $.y,
682
+ bottom: (x.bottom - b.bottom + y.bottom) / $.y,
683
+ left: (b.left - x.left + y.left) / $.x,
684
+ right: (x.right - b.right + y.right) / $.x
685
685
  };
686
686
  }
687
687
  const Zl = async (e, t, n) => {
@@ -702,14 +702,14 @@ const Zl = async (e, t, n) => {
702
702
  for (let g = 0; g < s.length; g++) {
703
703
  var h;
704
704
  const {
705
- name: w,
706
- fn: b
705
+ name: b,
706
+ fn: w
707
707
  } = s[g], {
708
708
  x: _,
709
709
  y: $,
710
710
  data: x,
711
- reset: M
712
- } = await b({
711
+ reset: S
712
+ } = await w({
713
713
  x: l,
714
714
  y: d,
715
715
  initialPlacement: r,
@@ -728,15 +728,15 @@ const Zl = async (e, t, n) => {
728
728
  });
729
729
  l = _ ?? l, d = $ ?? d, m = {
730
730
  ...m,
731
- [w]: {
732
- ...m[w],
731
+ [b]: {
732
+ ...m[b],
733
733
  ...x
734
734
  }
735
- }, M && y <= 50 && (y++, typeof M == "object" && (M.placement && (p = M.placement), M.rects && (u = M.rects === !0 ? await a.getElementRects({
735
+ }, S && y <= 50 && (y++, typeof S == "object" && (S.placement && (p = S.placement), S.rects && (u = S.rects === !0 ? await a.getElementRects({
736
736
  reference: e,
737
737
  floating: t,
738
738
  strategy: i
739
- }) : M.rects), {
739
+ }) : S.rects), {
740
740
  x: l,
741
741
  y: d
742
742
  } = ti(u, p, c)), g = -1);
@@ -772,57 +772,57 @@ const Zl = async (e, t, n) => {
772
772
  } = ko(e, t);
773
773
  if ((n = o.arrow) != null && n.alignmentOffset)
774
774
  return {};
775
- const w = en(i), b = Dt(s), _ = en(s) === s, $ = await (c.isRTL == null ? void 0 : c.isRTL(u.floating)), x = p || (_ || !h ? [Qn(s)] : fl(s)), M = y !== "none";
776
- !p && M && x.push(...gl(s, h, y, $));
777
- const S = [s, ...x], O = await c.detectOverflow(t, g), T = [];
775
+ const b = en(i), w = Dt(s), _ = en(s) === s, $ = await (c.isRTL == null ? void 0 : c.isRTL(u.floating)), x = p || (_ || !h ? [Qn(s)] : fl(s)), S = y !== "none";
776
+ !p && S && x.push(...gl(s, h, y, $));
777
+ const M = [s, ...x], D = await c.detectOverflow(t, g), O = [];
778
778
  let R = ((r = o.flip) == null ? void 0 : r.overflows) || [];
779
- if (l && T.push(O[w]), d) {
780
- const D = dl(i, a, $);
781
- T.push(O[D[0]], O[D[1]]);
779
+ if (l && O.push(D[b]), d) {
780
+ const T = dl(i, a, $);
781
+ O.push(D[T[0]], D[T[1]]);
782
782
  }
783
783
  if (R = [...R, {
784
784
  placement: i,
785
- overflows: T
786
- }], !T.every((D) => D <= 0)) {
787
- var E, J;
788
- const D = (((E = o.flip) == null ? void 0 : E.index) || 0) + 1, N = S[D];
789
- if (N && (!(d === "alignment" ? b !== Dt(N) : !1) || // We leave the current main axis only if every placement on that axis
785
+ overflows: O
786
+ }], !O.every((T) => T <= 0)) {
787
+ var C, J;
788
+ const T = (((C = o.flip) == null ? void 0 : C.index) || 0) + 1, N = M[T];
789
+ if (N && (!(d === "alignment" ? w !== Dt(N) : !1) || // We leave the current main axis only if every placement on that axis
790
790
  // overflows the main axis.
791
- R.every((k) => Dt(k.placement) === b ? k.overflows[0] > 0 : !0)))
791
+ R.every((k) => Dt(k.placement) === w ? k.overflows[0] > 0 : !0)))
792
792
  return {
793
793
  data: {
794
- index: D,
794
+ index: T,
795
795
  overflows: R
796
796
  },
797
797
  reset: {
798
798
  placement: N
799
799
  }
800
800
  };
801
- let B = (J = R.filter((H) => H.overflows[0] <= 0).sort((H, k) => H.overflows[1] - k.overflows[1])[0]) == null ? void 0 : J.placement;
802
- if (!B)
801
+ let L = (J = R.filter((q) => q.overflows[0] <= 0).sort((q, k) => q.overflows[1] - k.overflows[1])[0]) == null ? void 0 : J.placement;
802
+ if (!L)
803
803
  switch (m) {
804
804
  case "bestFit": {
805
- var Y;
806
- const H = (Y = R.filter((k) => {
807
- if (M) {
808
- const L = Dt(k.placement);
809
- return L === b || // Create a bias to the `y` side axis due to horizontal
805
+ var B;
806
+ const q = (B = R.filter((k) => {
807
+ if (S) {
808
+ const A = Dt(k.placement);
809
+ return A === w || // Create a bias to the `y` side axis due to horizontal
810
810
  // reading directions favoring greater width.
811
- L === "y";
811
+ A === "y";
812
812
  }
813
813
  return !0;
814
- }).map((k) => [k.placement, k.overflows.filter((L) => L > 0).reduce((L, F) => L + F, 0)]).sort((k, L) => k[1] - L[1])[0]) == null ? void 0 : Y[0];
815
- H && (B = H);
814
+ }).map((k) => [k.placement, k.overflows.filter((A) => A > 0).reduce((A, j) => A + j, 0)]).sort((k, A) => k[1] - A[1])[0]) == null ? void 0 : B[0];
815
+ q && (L = q);
816
816
  break;
817
817
  }
818
818
  case "initialPlacement":
819
- B = s;
819
+ L = s;
820
820
  break;
821
821
  }
822
- if (i !== B)
822
+ if (i !== L)
823
823
  return {
824
824
  reset: {
825
- placement: B
825
+ placement: L
826
826
  }
827
827
  };
828
828
  }
@@ -930,7 +930,7 @@ function Nt(e, t, n, r) {
930
930
  const p = Ce(o), m = r && ie(r) ? Ce(r) : r;
931
931
  let y = p, h = ro(y);
932
932
  for (; h && r && m !== y; ) {
933
- const g = Gt(h), w = h.getBoundingClientRect(), b = Le(h), _ = w.left + (h.clientLeft + parseFloat(b.paddingLeft)) * g.x, $ = w.top + (h.clientTop + parseFloat(b.paddingTop)) * g.y;
933
+ const g = Gt(h), b = h.getBoundingClientRect(), w = Le(h), _ = b.left + (h.clientLeft + parseFloat(w.paddingLeft)) * g.x, $ = b.top + (h.clientTop + parseFloat(w.paddingTop)) * g.y;
934
934
  c *= g.x, u *= g.y, l *= g.x, d *= g.y, c += _, u += $, y = Ce(h), h = ro(y);
935
935
  }
936
936
  }
@@ -1188,21 +1188,21 @@ function md(e, t) {
1188
1188
  } = u;
1189
1189
  if (s || t(), !p || !m)
1190
1190
  return;
1191
- const y = Wn(d), h = Wn(i.clientWidth - (l + p)), g = Wn(i.clientHeight - (d + m)), w = Wn(l), _ = {
1192
- rootMargin: -y + "px " + -h + "px " + -g + "px " + -w + "px",
1191
+ const y = Wn(d), h = Wn(i.clientWidth - (l + p)), g = Wn(i.clientHeight - (d + m)), b = Wn(l), _ = {
1192
+ rootMargin: -y + "px " + -h + "px " + -g + "px " + -b + "px",
1193
1193
  threshold: Xt(0, oo(1, c)) || 1
1194
1194
  };
1195
1195
  let $ = !0;
1196
- function x(M) {
1197
- const S = M[0].intersectionRatio;
1198
- if (S !== c) {
1196
+ function x(S) {
1197
+ const M = S[0].intersectionRatio;
1198
+ if (M !== c) {
1199
1199
  if (!$)
1200
1200
  return a();
1201
- S ? a(!1, S) : r = setTimeout(() => {
1201
+ M ? a(!1, M) : r = setTimeout(() => {
1202
1202
  a(!1, 1e-7);
1203
1203
  }, 1e3);
1204
1204
  }
1205
- S === 1 && !Cs(u, e.getBoundingClientRect()) && a(), $ = !1;
1205
+ M === 1 && !Cs(u, e.getBoundingClientRect()) && a(), $ = !1;
1206
1206
  }
1207
1207
  try {
1208
1208
  n = new IntersectionObserver(x, {
@@ -1226,16 +1226,16 @@ function gd(e, t, n, r) {
1226
1226
  layoutShift: s = typeof IntersectionObserver == "function",
1227
1227
  animationFrame: c = !1
1228
1228
  } = r, u = Eo(e), l = i || o ? [...u ? xt(u) : [], ...xt(t)] : [];
1229
- l.forEach((w) => {
1230
- i && w.addEventListener("scroll", n, {
1229
+ l.forEach((b) => {
1230
+ i && b.addEventListener("scroll", n, {
1231
1231
  passive: !0
1232
- }), o && w.addEventListener("resize", n);
1232
+ }), o && b.addEventListener("resize", n);
1233
1233
  });
1234
1234
  const d = u && s ? md(u, n) : null;
1235
1235
  let p = -1, m = null;
1236
- a && (m = new ResizeObserver((w) => {
1237
- let [b] = w;
1238
- b && b.target === u && m && (m.unobserve(t), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
1236
+ a && (m = new ResizeObserver((b) => {
1237
+ let [w] = b;
1238
+ w && w.target === u && m && (m.unobserve(t), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
1239
1239
  var _;
1240
1240
  (_ = m) == null || _.observe(t);
1241
1241
  })), n();
@@ -1243,14 +1243,14 @@ function gd(e, t, n, r) {
1243
1243
  let y, h = c ? Nt(e) : null;
1244
1244
  c && g();
1245
1245
  function g() {
1246
- const w = Nt(e);
1247
- h && !Cs(h, w) && n(), h = w, y = requestAnimationFrame(g);
1246
+ const b = Nt(e);
1247
+ h && !Cs(h, b) && n(), h = b, y = requestAnimationFrame(g);
1248
1248
  }
1249
1249
  return n(), () => {
1250
- var w;
1251
- l.forEach((b) => {
1252
- i && b.removeEventListener("scroll", n), o && b.removeEventListener("resize", n);
1253
- }), d?.(), (w = m) == null || w.disconnect(), m = null, c && cancelAnimationFrame(y);
1250
+ var b;
1251
+ l.forEach((w) => {
1252
+ i && w.removeEventListener("scroll", n), o && w.removeEventListener("resize", n);
1253
+ }), d?.(), (b = m) == null || b.disconnect(), m = null, c && cancelAnimationFrame(y);
1254
1254
  };
1255
1255
  }
1256
1256
  const vd = Jl, yd = Gl, bd = (e, t, n) => {
@@ -1334,84 +1334,84 @@ function xd(e) {
1334
1334
  isPositioned: !1
1335
1335
  }), [p, m] = f.useState(r);
1336
1336
  or(p, r) || m(r);
1337
- const [y, h] = f.useState(null), [g, w] = f.useState(null), b = f.useCallback((k) => {
1338
- k !== M.current && (M.current = k, h(k));
1337
+ const [y, h] = f.useState(null), [g, b] = f.useState(null), w = f.useCallback((k) => {
1338
+ k !== S.current && (S.current = k, h(k));
1339
1339
  }, []), _ = f.useCallback((k) => {
1340
- k !== S.current && (S.current = k, w(k));
1341
- }, []), $ = o || y, x = a || g, M = f.useRef(null), S = f.useRef(null), O = f.useRef(l), T = c != null, R = Or(c), E = Or(i), J = Or(u), Y = f.useCallback(() => {
1342
- if (!M.current || !S.current)
1340
+ k !== M.current && (M.current = k, b(k));
1341
+ }, []), $ = o || y, x = a || g, S = f.useRef(null), M = f.useRef(null), D = f.useRef(l), O = c != null, R = Or(c), C = Or(i), J = Or(u), B = f.useCallback(() => {
1342
+ if (!S.current || !M.current)
1343
1343
  return;
1344
1344
  const k = {
1345
1345
  placement: t,
1346
1346
  strategy: n,
1347
1347
  middleware: p
1348
1348
  };
1349
- E.current && (k.platform = E.current), bd(M.current, S.current, k).then((L) => {
1350
- const F = {
1351
- ...L,
1349
+ C.current && (k.platform = C.current), bd(S.current, M.current, k).then((A) => {
1350
+ const j = {
1351
+ ...A,
1352
1352
  // The floating element's position may be recomputed while it's closed
1353
1353
  // but still mounted (such as when transitioning out). To ensure
1354
1354
  // `isPositioned` will be `false` initially on the next open, avoid
1355
1355
  // setting it to `true` when `open === false` (must be specified).
1356
1356
  isPositioned: J.current !== !1
1357
1357
  };
1358
- D.current && !or(O.current, F) && (O.current = F, $o.flushSync(() => {
1359
- d(F);
1358
+ T.current && !or(D.current, j) && (D.current = j, $o.flushSync(() => {
1359
+ d(j);
1360
1360
  }));
1361
1361
  });
1362
- }, [p, t, n, E, J]);
1362
+ }, [p, t, n, C, J]);
1363
1363
  Xn(() => {
1364
- u === !1 && O.current.isPositioned && (O.current.isPositioned = !1, d((k) => ({
1364
+ u === !1 && D.current.isPositioned && (D.current.isPositioned = !1, d((k) => ({
1365
1365
  ...k,
1366
1366
  isPositioned: !1
1367
1367
  })));
1368
1368
  }, [u]);
1369
- const D = f.useRef(!1);
1370
- Xn(() => (D.current = !0, () => {
1371
- D.current = !1;
1369
+ const T = f.useRef(!1);
1370
+ Xn(() => (T.current = !0, () => {
1371
+ T.current = !1;
1372
1372
  }), []), Xn(() => {
1373
- if ($ && (M.current = $), x && (S.current = x), $ && x) {
1373
+ if ($ && (S.current = $), x && (M.current = x), $ && x) {
1374
1374
  if (R.current)
1375
- return R.current($, x, Y);
1376
- Y();
1375
+ return R.current($, x, B);
1376
+ B();
1377
1377
  }
1378
- }, [$, x, Y, R, T]);
1378
+ }, [$, x, B, R, O]);
1379
1379
  const N = f.useMemo(() => ({
1380
- reference: M,
1381
- floating: S,
1382
- setReference: b,
1380
+ reference: S,
1381
+ floating: M,
1382
+ setReference: w,
1383
1383
  setFloating: _
1384
- }), [b, _]), B = f.useMemo(() => ({
1384
+ }), [w, _]), L = f.useMemo(() => ({
1385
1385
  reference: $,
1386
1386
  floating: x
1387
- }), [$, x]), H = f.useMemo(() => {
1387
+ }), [$, x]), q = f.useMemo(() => {
1388
1388
  const k = {
1389
1389
  position: n,
1390
1390
  left: 0,
1391
1391
  top: 0
1392
1392
  };
1393
- if (!B.floating)
1393
+ if (!L.floating)
1394
1394
  return k;
1395
- const L = ii(B.floating, l.x), F = ii(B.floating, l.y);
1395
+ const A = ii(L.floating, l.x), j = ii(L.floating, l.y);
1396
1396
  return s ? {
1397
1397
  ...k,
1398
- transform: "translate(" + L + "px, " + F + "px)",
1399
- ...Ds(B.floating) >= 1.5 && {
1398
+ transform: "translate(" + A + "px, " + j + "px)",
1399
+ ...Ds(L.floating) >= 1.5 && {
1400
1400
  willChange: "transform"
1401
1401
  }
1402
1402
  } : {
1403
1403
  position: n,
1404
- left: L,
1405
- top: F
1404
+ left: A,
1405
+ top: j
1406
1406
  };
1407
- }, [n, s, B.floating, l.x, l.y]);
1407
+ }, [n, s, L.floating, l.x, l.y]);
1408
1408
  return f.useMemo(() => ({
1409
1409
  ...l,
1410
- update: Y,
1410
+ update: B,
1411
1411
  refs: N,
1412
- elements: B,
1413
- floatingStyles: H
1414
- }), [l, Y, N, B, H]);
1412
+ elements: L,
1413
+ floatingStyles: q
1414
+ }), [l, B, N, L, q]);
1415
1415
  }
1416
1416
  const $d = (e, t) => ({
1417
1417
  ...vd(e),
@@ -1520,15 +1520,15 @@ function Fd(e, t, n, r) {
1520
1520
  if (s.has(y))
1521
1521
  p(y);
1522
1522
  else {
1523
- const h = o ? y.getAttribute(o) : null, g = h !== null && h !== "false", w = di(o), b = (w.get(y) || 0) + 1, _ = (l.get(y) || 0) + 1;
1524
- w.set(y, b), l.set(y, _), u.push(y), b === 1 && g && In.add(y), _ === 1 && y.setAttribute(i, ""), !g && o && y.setAttribute(o, o === "inert" ? "" : "true");
1523
+ const h = o ? y.getAttribute(o) : null, g = h !== null && h !== "false", b = di(o), w = (b.get(y) || 0) + 1, _ = (l.get(y) || 0) + 1;
1524
+ b.set(y, w), l.set(y, _), u.push(y), w === 1 && g && In.add(y), _ === 1 && y.setAttribute(i, ""), !g && o && y.setAttribute(o, o === "inert" ? "" : "true");
1525
1525
  }
1526
1526
  });
1527
1527
  }
1528
1528
  return Tr++, () => {
1529
1529
  u.forEach((m) => {
1530
- const y = di(o), g = (y.get(m) || 0) - 1, w = (l.get(m) || 0) - 1;
1531
- y.set(m, g), l.set(m, w), g || (!In.has(m) && o && m.removeAttribute(o), In.delete(m)), w || m.removeAttribute(i);
1530
+ const y = di(o), g = (y.get(m) || 0) - 1, b = (l.get(m) || 0) - 1;
1531
+ y.set(m, g), l.set(m, b), g || (!In.has(m) && o && m.removeAttribute(o), In.delete(m)), b || m.removeAttribute(i);
1532
1532
  }), Tr--, Tr || (Kt.inert = /* @__PURE__ */ new WeakMap(), Kt["aria-hidden"] = /* @__PURE__ */ new WeakMap(), Kt.none = /* @__PURE__ */ new WeakMap(), In = /* @__PURE__ */ new WeakSet(), Fn = {});
1533
1533
  };
1534
1534
  }
@@ -1644,8 +1644,8 @@ function Bd(e) {
1644
1644
  var g;
1645
1645
  (g = l.current) == null || g.focus();
1646
1646
  } else {
1647
- const w = a ? a.domReference : null, b = xs(w);
1648
- b?.focus();
1647
+ const b = a ? a.domReference : null, w = xs(b);
1648
+ w?.focus();
1649
1649
  }
1650
1650
  }
1651
1651
  }), y && o && /* @__PURE__ */ v("span", {
@@ -1659,8 +1659,8 @@ function Bd(e) {
1659
1659
  var g;
1660
1660
  (g = d.current) == null || g.focus();
1661
1661
  } else {
1662
- const w = a ? a.domReference : null, b = _s(w);
1663
- b?.focus(), a?.closeOnFocusOut && a?.onOpenChange(!1, h.nativeEvent, "focus-out");
1662
+ const b = a ? a.domReference : null, w = _s(b);
1663
+ w?.focus(), a?.closeOnFocusOut && a?.onOpenChange(!1, h.nativeEvent, "focus-out");
1664
1664
  }
1665
1665
  }
1666
1666
  })]
@@ -1727,108 +1727,108 @@ function Vd(e) {
1727
1727
  open: y,
1728
1728
  onOpenChange: h,
1729
1729
  events: g,
1730
- dataRef: w,
1730
+ dataRef: b,
1731
1731
  elements: {
1732
- domReference: b,
1732
+ domReference: w,
1733
1733
  floating: _
1734
1734
  }
1735
1735
  } = t, $ = Ze(() => {
1736
- var A;
1737
- return (A = w.current.floatingContext) == null ? void 0 : A.nodeId;
1738
- }), x = Ze(m), M = typeof a == "number" && a < 0, S = Go(b) && M, O = Wd(), T = O ? o : !0, R = !T || O && p, E = Cr(i), J = Cr(a), Y = Cr(s), D = Co(), N = Rs(), B = f.useRef(null), H = f.useRef(null), k = f.useRef(!1), L = f.useRef(!1), F = f.useRef(-1), ve = f.useRef(-1), ze = N != null, j = Ko(_), ye = Ze(function(A) {
1739
- return A === void 0 && (A = j), A ? gr(A, Tn()) : [];
1740
- }), ee = Ze((A) => {
1741
- const q = ye(A);
1742
- return E.current.map((W) => b && W === "reference" ? b : j && W === "floating" ? j : q).filter(Boolean).flat();
1736
+ var W;
1737
+ return (W = b.current.floatingContext) == null ? void 0 : W.nodeId;
1738
+ }), x = Ze(m), S = typeof a == "number" && a < 0, M = Go(w) && S, D = Wd(), O = D ? o : !0, R = !O || D && p, C = Cr(i), J = Cr(a), B = Cr(s), T = Co(), N = Rs(), L = f.useRef(null), q = f.useRef(null), k = f.useRef(!1), A = f.useRef(!1), j = f.useRef(-1), ve = f.useRef(-1), ze = N != null, Y = Ko(_), ye = Ze(function(W) {
1739
+ return W === void 0 && (W = Y), W ? gr(W, Tn()) : [];
1740
+ }), ee = Ze((W) => {
1741
+ const H = ye(W);
1742
+ return C.current.map((I) => w && I === "reference" ? w : Y && I === "floating" ? Y : H).filter(Boolean).flat();
1743
1743
  });
1744
1744
  f.useEffect(() => {
1745
1745
  if (r || !u) return;
1746
- function A(W) {
1747
- if (W.key === "Tab") {
1748
- ke(j, Ut(Ye(j))) && ye().length === 0 && !S && Er(W);
1749
- const te = ee(), le = wt(W);
1750
- E.current[0] === "reference" && le === b && (Er(W), W.shiftKey ? Wt(te[te.length - 1]) : Wt(te[1])), E.current[1] === "floating" && le === j && W.shiftKey && (Er(W), Wt(te[0]));
1746
+ function W(I) {
1747
+ if (I.key === "Tab") {
1748
+ ke(Y, Ut(Ye(Y))) && ye().length === 0 && !M && Er(I);
1749
+ const te = ee(), le = wt(I);
1750
+ C.current[0] === "reference" && le === w && (Er(I), I.shiftKey ? Wt(te[te.length - 1]) : Wt(te[1])), C.current[1] === "floating" && le === Y && I.shiftKey && (Er(I), Wt(te[0]));
1751
1751
  }
1752
1752
  }
1753
- const q = Ye(j);
1754
- return q.addEventListener("keydown", A), () => {
1755
- q.removeEventListener("keydown", A);
1753
+ const H = Ye(Y);
1754
+ return H.addEventListener("keydown", W), () => {
1755
+ H.removeEventListener("keydown", W);
1756
1756
  };
1757
- }, [r, b, j, u, E, S, ye, ee]), f.useEffect(() => {
1757
+ }, [r, w, Y, u, C, M, ye, ee]), f.useEffect(() => {
1758
1758
  if (r || !_) return;
1759
- function A(q) {
1760
- const W = wt(q), le = ye().indexOf(W);
1761
- le !== -1 && (F.current = le);
1759
+ function W(H) {
1760
+ const I = wt(H), le = ye().indexOf(I);
1761
+ le !== -1 && (j.current = le);
1762
1762
  }
1763
- return _.addEventListener("focusin", A), () => {
1764
- _.removeEventListener("focusin", A);
1763
+ return _.addEventListener("focusin", W), () => {
1764
+ _.removeEventListener("focusin", W);
1765
1765
  };
1766
1766
  }, [r, _, ye]), f.useEffect(() => {
1767
1767
  if (r || !d) return;
1768
- function A() {
1769
- L.current = !0, setTimeout(() => {
1770
- L.current = !1;
1768
+ function W() {
1769
+ A.current = !0, setTimeout(() => {
1770
+ A.current = !1;
1771
1771
  });
1772
1772
  }
1773
- function q(le) {
1773
+ function H(le) {
1774
1774
  const U = le.relatedTarget, We = le.currentTarget, xe = wt(le);
1775
1775
  queueMicrotask(() => {
1776
- const we = $(), rt = !(ke(b, U) || ke(_, U) || ke(U, _) || ke(N?.portalNode, U) || U != null && U.hasAttribute(Mn("focus-guard")) || D && (Zt(D.nodesRef.current, we).find((Ie) => {
1776
+ const we = $(), rt = !(ke(w, U) || ke(_, U) || ke(U, _) || ke(N?.portalNode, U) || U != null && U.hasAttribute(Mn("focus-guard")) || T && (Zt(T.nodesRef.current, we).find((Ie) => {
1777
1777
  var Se, Te;
1778
1778
  return ke((Se = Ie.context) == null ? void 0 : Se.elements.floating, U) || ke((Te = Ie.context) == null ? void 0 : Te.elements.domReference, U);
1779
- }) || Qo(D.nodesRef.current, we).find((Ie) => {
1779
+ }) || Qo(T.nodesRef.current, we).find((Ie) => {
1780
1780
  var Se, Te, Ln;
1781
1781
  return [(Se = Ie.context) == null ? void 0 : Se.elements.floating, Ko((Te = Ie.context) == null ? void 0 : Te.elements.floating)].includes(U) || ((Ln = Ie.context) == null ? void 0 : Ln.elements.domReference) === U;
1782
1782
  })));
1783
- if (We === b && j && gi(j, E), c && We !== b && !(xe != null && xe.isConnected) && Ut(Ye(j)) === Ye(j).body) {
1784
- de(j) && j.focus();
1785
- const Ie = F.current, Se = ye(), Te = Se[Ie] || Se[Se.length - 1] || j;
1783
+ if (We === w && Y && gi(Y, C), c && We !== w && !(xe != null && xe.isConnected) && Ut(Ye(Y)) === Ye(Y).body) {
1784
+ de(Y) && Y.focus();
1785
+ const Ie = j.current, Se = ye(), Te = Se[Ie] || Se[Se.length - 1] || Y;
1786
1786
  de(Te) && Te.focus();
1787
1787
  }
1788
- if (w.current.insideReactTree) {
1789
- w.current.insideReactTree = !1;
1788
+ if (b.current.insideReactTree) {
1789
+ b.current.insideReactTree = !1;
1790
1790
  return;
1791
1791
  }
1792
- (S || !u) && U && rt && !L.current && // Fix React 18 Strict Mode returnFocus due to double rendering.
1792
+ (M || !u) && U && rt && !A.current && // Fix React 18 Strict Mode returnFocus due to double rendering.
1793
1793
  U !== mi() && (k.current = !0, h(!1, le, "focus-out"));
1794
1794
  });
1795
1795
  }
1796
- const W = !!(!D && N);
1796
+ const I = !!(!T && N);
1797
1797
  function te() {
1798
- Ld(ve), w.current.insideReactTree = !0, ve.current = window.setTimeout(() => {
1799
- w.current.insideReactTree = !1;
1798
+ Ld(ve), b.current.insideReactTree = !0, ve.current = window.setTimeout(() => {
1799
+ b.current.insideReactTree = !1;
1800
1800
  });
1801
1801
  }
1802
- if (_ && de(b))
1803
- return b.addEventListener("focusout", q), b.addEventListener("pointerdown", A), _.addEventListener("focusout", q), W && _.addEventListener("focusout", te, !0), () => {
1804
- b.removeEventListener("focusout", q), b.removeEventListener("pointerdown", A), _.removeEventListener("focusout", q), W && _.removeEventListener("focusout", te, !0);
1802
+ if (_ && de(w))
1803
+ return w.addEventListener("focusout", H), w.addEventListener("pointerdown", W), _.addEventListener("focusout", H), I && _.addEventListener("focusout", te, !0), () => {
1804
+ w.removeEventListener("focusout", H), w.removeEventListener("pointerdown", W), _.removeEventListener("focusout", H), I && _.removeEventListener("focusout", te, !0);
1805
1805
  };
1806
- }, [r, b, _, j, u, D, N, h, d, c, ye, S, $, E, w]);
1806
+ }, [r, w, _, Y, u, T, N, h, d, c, ye, M, $, C, b]);
1807
1807
  const be = f.useRef(null), Ue = f.useRef(null), Pt = hi([be, N?.beforeInsideRef]), dt = hi([Ue, N?.afterInsideRef]);
1808
1808
  f.useEffect(() => {
1809
- var A, q;
1809
+ var W, H;
1810
1810
  if (r || !_) return;
1811
- const W = Array.from((N == null || (A = N.portalNode) == null ? void 0 : A.querySelectorAll("[" + Mn("portal") + "]")) || []), le = (q = (D ? Qo(D.nodesRef.current, $()) : []).find((xe) => {
1811
+ const I = Array.from((N == null || (W = N.portalNode) == null ? void 0 : W.querySelectorAll("[" + Mn("portal") + "]")) || []), le = (H = (T ? Qo(T.nodesRef.current, $()) : []).find((xe) => {
1812
1812
  var we;
1813
1813
  return Go(((we = xe.context) == null ? void 0 : we.elements.domReference) || null);
1814
- })) == null || (q = q.context) == null ? void 0 : q.elements.domReference, U = [_, le, ...W, ...x(), B.current, H.current, be.current, Ue.current, N?.beforeOutsideRef.current, N?.afterOutsideRef.current, E.current.includes("reference") || S ? b : null].filter((xe) => xe != null), We = u || S ? fi(U, !R, R) : fi(U);
1814
+ })) == null || (H = H.context) == null ? void 0 : H.elements.domReference, U = [_, le, ...I, ...x(), L.current, q.current, be.current, Ue.current, N?.beforeOutsideRef.current, N?.afterOutsideRef.current, C.current.includes("reference") || M ? w : null].filter((xe) => xe != null), We = u || M ? fi(U, !R, R) : fi(U);
1815
1815
  return () => {
1816
1816
  We();
1817
1817
  };
1818
- }, [r, b, _, u, E, N, S, T, R, D, $, x]), Pe(() => {
1819
- if (r || !de(j)) return;
1820
- const A = Ye(j), q = Ut(A);
1818
+ }, [r, w, _, u, C, N, M, O, R, T, $, x]), Pe(() => {
1819
+ if (r || !de(Y)) return;
1820
+ const W = Ye(Y), H = Ut(W);
1821
1821
  queueMicrotask(() => {
1822
- const W = ee(j), te = J.current, le = (typeof te == "number" ? W[te] : te.current) || j, U = ke(j, q);
1823
- !M && !U && y && Wt(le, {
1824
- preventScroll: le === j
1822
+ const I = ee(Y), te = J.current, le = (typeof te == "number" ? I[te] : te.current) || Y, U = ke(Y, H);
1823
+ !S && !U && y && Wt(le, {
1824
+ preventScroll: le === Y
1825
1825
  });
1826
1826
  });
1827
- }, [r, y, j, M, ee, J]), Pe(() => {
1828
- if (r || !j) return;
1829
- const A = Ye(j), q = Ut(A);
1830
- Hd(q);
1831
- function W(U) {
1827
+ }, [r, y, Y, S, ee, J]), Pe(() => {
1828
+ if (r || !Y) return;
1829
+ const W = Ye(Y), H = Ut(W);
1830
+ Hd(H);
1831
+ function I(U) {
1832
1832
  let {
1833
1833
  reason: We,
1834
1834
  event: xe,
@@ -1848,34 +1848,34 @@ function Vd(e) {
1848
1848
  }), rt ? k.current = !1 : k.current = !0;
1849
1849
  }
1850
1850
  }
1851
- g.on("openchange", W);
1852
- const te = A.createElement("span");
1853
- te.setAttribute("tabindex", "-1"), te.setAttribute("aria-hidden", "true"), Object.assign(te.style, Do), ze && b && b.insertAdjacentElement("afterend", te);
1851
+ g.on("openchange", I);
1852
+ const te = W.createElement("span");
1853
+ te.setAttribute("tabindex", "-1"), te.setAttribute("aria-hidden", "true"), Object.assign(te.style, Do), ze && w && w.insertAdjacentElement("afterend", te);
1854
1854
  function le() {
1855
- if (typeof Y.current == "boolean") {
1856
- const U = b || mi();
1855
+ if (typeof B.current == "boolean") {
1856
+ const U = w || mi();
1857
1857
  return U && U.isConnected ? U : te;
1858
1858
  }
1859
- return Y.current.current || te;
1859
+ return B.current.current || te;
1860
1860
  }
1861
1861
  return () => {
1862
- g.off("openchange", W);
1863
- const U = Ut(A), We = ke(_, U) || D && Zt(D.nodesRef.current, $(), !1).some((we) => {
1862
+ g.off("openchange", I);
1863
+ const U = Ut(W), We = ke(_, U) || T && Zt(T.nodesRef.current, $(), !1).some((we) => {
1864
1864
  var rt;
1865
1865
  return ke((rt = we.context) == null ? void 0 : rt.elements.floating, U);
1866
1866
  }), xe = le();
1867
1867
  queueMicrotask(() => {
1868
1868
  const we = zd(xe);
1869
1869
  // eslint-disable-next-line react-hooks/exhaustive-deps
1870
- Y.current && !k.current && de(we) && // If the focus moved somewhere else after mount, avoid returning focus
1870
+ B.current && !k.current && de(we) && // If the focus moved somewhere else after mount, avoid returning focus
1871
1871
  // since it likely entered a different element which should be
1872
1872
  // respected: https://github.com/floating-ui/floating-ui/issues/2607
1873
- (!(we !== U && U !== A.body) || We) && we.focus({
1873
+ (!(we !== U && U !== W.body) || We) && we.focus({
1874
1874
  preventScroll: !0
1875
1875
  }), te.remove();
1876
1876
  });
1877
1877
  };
1878
- }, [r, _, j, Y, w, g, D, ze, b, $]), f.useEffect(() => (queueMicrotask(() => {
1878
+ }, [r, _, Y, B, b, g, T, ze, w, $]), f.useEffect(() => (queueMicrotask(() => {
1879
1879
  k.current = !1;
1880
1880
  }), () => {
1881
1881
  queueMicrotask(Oo);
@@ -1886,51 +1886,51 @@ function Vd(e) {
1886
1886
  closeOnFocusOut: d,
1887
1887
  open: y,
1888
1888
  onOpenChange: h,
1889
- domReference: b
1889
+ domReference: w
1890
1890
  }), () => {
1891
1891
  N.setFocusManagerState(null);
1892
1892
  };
1893
- }, [r, N, u, y, h, d, b]), Pe(() => {
1894
- r || j && gi(j, E);
1895
- }, [r, j, E]);
1896
- function Lt(A) {
1893
+ }, [r, N, u, y, h, d, w]), Pe(() => {
1894
+ r || Y && gi(Y, C);
1895
+ }, [r, Y, C]);
1896
+ function Lt(W) {
1897
1897
  return r || !l || !u ? null : /* @__PURE__ */ v(Ud, {
1898
- ref: A === "start" ? B : H,
1899
- onClick: (q) => h(!1, q.nativeEvent),
1898
+ ref: W === "start" ? L : q,
1899
+ onClick: (H) => h(!1, H.nativeEvent),
1900
1900
  children: typeof l == "string" ? l : "Dismiss"
1901
1901
  });
1902
1902
  }
1903
- const At = !r && T && (u ? !S : !0) && (ze || u);
1903
+ const At = !r && O && (u ? !M : !0) && (ze || u);
1904
1904
  return /* @__PURE__ */ Q(Tt, {
1905
1905
  children: [At && /* @__PURE__ */ v(ir, {
1906
1906
  "data-type": "inside",
1907
1907
  ref: Pt,
1908
- onFocus: (A) => {
1908
+ onFocus: (W) => {
1909
1909
  if (u) {
1910
- const W = ee();
1911
- Wt(i[0] === "reference" ? W[0] : W[W.length - 1]);
1910
+ const I = ee();
1911
+ Wt(i[0] === "reference" ? I[0] : I[I.length - 1]);
1912
1912
  } else if (N != null && N.preserveTabOrder && N.portalNode)
1913
- if (k.current = !1, Sn(A, N.portalNode)) {
1914
- const W = _s(b);
1915
- W?.focus();
1913
+ if (k.current = !1, Sn(W, N.portalNode)) {
1914
+ const I = _s(w);
1915
+ I?.focus();
1916
1916
  } else {
1917
- var q;
1918
- (q = N.beforeOutsideRef.current) == null || q.focus();
1917
+ var H;
1918
+ (H = N.beforeOutsideRef.current) == null || H.focus();
1919
1919
  }
1920
1920
  }
1921
- }), !S && Lt("start"), n, Lt("end"), At && /* @__PURE__ */ v(ir, {
1921
+ }), !M && Lt("start"), n, Lt("end"), At && /* @__PURE__ */ v(ir, {
1922
1922
  "data-type": "inside",
1923
1923
  ref: dt,
1924
- onFocus: (A) => {
1924
+ onFocus: (W) => {
1925
1925
  if (u)
1926
1926
  Wt(ee()[0]);
1927
1927
  else if (N != null && N.preserveTabOrder && N.portalNode)
1928
- if (d && (k.current = !0), Sn(A, N.portalNode)) {
1929
- const W = xs(b);
1930
- W?.focus();
1928
+ if (d && (k.current = !0), Sn(W, N.portalNode)) {
1929
+ const I = xs(w);
1930
+ I?.focus();
1931
1931
  } else {
1932
- var q;
1933
- (q = N.afterOutsideRef.current) == null || q.focus();
1932
+ var H;
1933
+ (H = N.afterOutsideRef.current) == null || H.focus();
1934
1934
  }
1935
1935
  }
1936
1936
  })]
@@ -2020,44 +2020,44 @@ function Qd(e, t) {
2020
2020
  ancestorScroll: p = !1,
2021
2021
  bubbles: m,
2022
2022
  capture: y
2023
- } = t, h = Co(), g = Ze(typeof c == "function" ? c : () => !1), w = typeof c == "function" ? g : c, b = f.useRef(!1), {
2023
+ } = t, h = Co(), g = Ze(typeof c == "function" ? c : () => !1), b = typeof c == "function" ? g : c, w = f.useRef(!1), {
2024
2024
  escapeKey: _,
2025
2025
  outsidePress: $
2026
2026
  } = bi(m), {
2027
2027
  escapeKey: x,
2028
- outsidePress: M
2029
- } = bi(y), S = f.useRef(!1), O = Ze((D) => {
2028
+ outsidePress: S
2029
+ } = bi(y), M = f.useRef(!1), D = Ze((T) => {
2030
2030
  var N;
2031
- if (!n || !a || !s || D.key !== "Escape" || S.current)
2031
+ if (!n || !a || !s || T.key !== "Escape" || M.current)
2032
2032
  return;
2033
- const B = (N = o.current.floatingContext) == null ? void 0 : N.nodeId, H = h ? Zt(h.nodesRef.current, B) : [];
2034
- if (!_ && (D.stopPropagation(), H.length > 0)) {
2033
+ const L = (N = o.current.floatingContext) == null ? void 0 : N.nodeId, q = h ? Zt(h.nodesRef.current, L) : [];
2034
+ if (!_ && (T.stopPropagation(), q.length > 0)) {
2035
2035
  let k = !0;
2036
- if (H.forEach((L) => {
2037
- var F;
2038
- if ((F = L.context) != null && F.open && !L.context.dataRef.current.__escapeKeyBubbles) {
2036
+ if (q.forEach((A) => {
2037
+ var j;
2038
+ if ((j = A.context) != null && j.open && !A.context.dataRef.current.__escapeKeyBubbles) {
2039
2039
  k = !1;
2040
2040
  return;
2041
2041
  }
2042
2042
  }), !k)
2043
2043
  return;
2044
2044
  }
2045
- r(!1, Fl(D) ? D.nativeEvent : D, "escape-key");
2046
- }), T = Ze((D) => {
2045
+ r(!1, Fl(T) ? T.nativeEvent : T, "escape-key");
2046
+ }), O = Ze((T) => {
2047
2047
  var N;
2048
- const B = () => {
2049
- var H;
2050
- O(D), (H = wt(D)) == null || H.removeEventListener("keydown", B);
2048
+ const L = () => {
2049
+ var q;
2050
+ D(T), (q = wt(T)) == null || q.removeEventListener("keydown", L);
2051
2051
  };
2052
- (N = wt(D)) == null || N.addEventListener("keydown", B);
2053
- }), R = Ze((D) => {
2052
+ (N = wt(T)) == null || N.addEventListener("keydown", L);
2053
+ }), R = Ze((T) => {
2054
2054
  var N;
2055
- const B = o.current.insideReactTree;
2055
+ const L = o.current.insideReactTree;
2056
2056
  o.current.insideReactTree = !1;
2057
- const H = b.current;
2058
- if (b.current = !1, u === "click" && H || B || typeof w == "function" && !w(D))
2057
+ const q = w.current;
2058
+ if (w.current = !1, u === "click" && q || L || typeof b == "function" && !b(T))
2059
2059
  return;
2060
- const k = wt(D), L = "[" + Mn("inert") + "]", F = Ye(i.floating).querySelectorAll(L);
2060
+ const k = wt(T), A = "[" + Mn("inert") + "]", j = Ye(i.floating).querySelectorAll(A);
2061
2061
  let ve = ie(k) ? k : null;
2062
2062
  for (; ve && !ut(ve); ) {
2063
2063
  const ee = ct(ve);
@@ -2065,21 +2065,21 @@ function Qd(e, t) {
2065
2065
  break;
2066
2066
  ve = ee;
2067
2067
  }
2068
- if (F.length && ie(k) && !Il(k) && // Clicked on a direct ancestor (e.g. FloatingOverlay).
2068
+ if (j.length && ie(k) && !Il(k) && // Clicked on a direct ancestor (e.g. FloatingOverlay).
2069
2069
  !ke(k, i.floating) && // If the target root element contains none of the markers, then the
2070
2070
  // element was injected after the floating element rendered.
2071
- Array.from(F).every((ee) => !ke(ve, ee)))
2071
+ Array.from(j).every((ee) => !ke(ve, ee)))
2072
2072
  return;
2073
- if (de(k) && Y) {
2074
- const ee = ut(k), be = Le(k), Ue = /auto|scroll/, Pt = ee || Ue.test(be.overflowX), dt = ee || Ue.test(be.overflowY), Lt = Pt && k.clientWidth > 0 && k.scrollWidth > k.clientWidth, At = dt && k.clientHeight > 0 && k.scrollHeight > k.clientHeight, A = be.direction === "rtl", q = At && (A ? D.offsetX <= k.offsetWidth - k.clientWidth : D.offsetX > k.clientWidth), W = Lt && D.offsetY > k.clientHeight;
2075
- if (q || W)
2073
+ if (de(k) && B) {
2074
+ const ee = ut(k), be = Le(k), Ue = /auto|scroll/, Pt = ee || Ue.test(be.overflowX), dt = ee || Ue.test(be.overflowY), Lt = Pt && k.clientWidth > 0 && k.scrollWidth > k.clientWidth, At = dt && k.clientHeight > 0 && k.scrollHeight > k.clientHeight, W = be.direction === "rtl", H = At && (W ? T.offsetX <= k.offsetWidth - k.clientWidth : T.offsetX > k.clientWidth), I = Lt && T.offsetY > k.clientHeight;
2075
+ if (H || I)
2076
2076
  return;
2077
2077
  }
2078
- const ze = (N = o.current.floatingContext) == null ? void 0 : N.nodeId, j = h && Zt(h.nodesRef.current, ze).some((ee) => {
2078
+ const ze = (N = o.current.floatingContext) == null ? void 0 : N.nodeId, Y = h && Zt(h.nodesRef.current, ze).some((ee) => {
2079
2079
  var be;
2080
- return kr(D, (be = ee.context) == null ? void 0 : be.elements.floating);
2080
+ return kr(T, (be = ee.context) == null ? void 0 : be.elements.floating);
2081
2081
  });
2082
- if (kr(D, i.floating) || kr(D, i.domReference) || j)
2082
+ if (kr(T, i.floating) || kr(T, i.domReference) || Y)
2083
2083
  return;
2084
2084
  const ye = h ? Zt(h.nodesRef.current, ze) : [];
2085
2085
  if (ye.length > 0) {
@@ -2093,30 +2093,30 @@ function Qd(e, t) {
2093
2093
  }), !ee)
2094
2094
  return;
2095
2095
  }
2096
- r(!1, D, "outside-press");
2097
- }), E = Ze((D) => {
2096
+ r(!1, T, "outside-press");
2097
+ }), C = Ze((T) => {
2098
2098
  var N;
2099
- const B = () => {
2100
- var H;
2101
- R(D), (H = wt(D)) == null || H.removeEventListener(u, B);
2099
+ const L = () => {
2100
+ var q;
2101
+ R(T), (q = wt(T)) == null || q.removeEventListener(u, L);
2102
2102
  };
2103
- (N = wt(D)) == null || N.addEventListener(u, B);
2103
+ (N = wt(T)) == null || N.addEventListener(u, L);
2104
2104
  });
2105
2105
  f.useEffect(() => {
2106
2106
  if (!n || !a)
2107
2107
  return;
2108
2108
  o.current.__escapeKeyBubbles = _, o.current.__outsidePressBubbles = $;
2109
- let D = -1;
2110
- function N(F) {
2111
- r(!1, F, "ancestor-scroll");
2109
+ let T = -1;
2110
+ function N(j) {
2111
+ r(!1, j, "ancestor-scroll");
2112
2112
  }
2113
- function B() {
2114
- window.clearTimeout(D), S.current = !0;
2113
+ function L() {
2114
+ window.clearTimeout(T), M.current = !0;
2115
2115
  }
2116
- function H() {
2117
- D = window.setTimeout(
2116
+ function q() {
2117
+ T = window.setTimeout(
2118
2118
  () => {
2119
- S.current = !1;
2119
+ M.current = !1;
2120
2120
  },
2121
2121
  // 0ms or 1ms don't work in Safari. 5ms appears to consistently work.
2122
2122
  // Only apply to WebKit for the test to remain 0ms.
@@ -2124,51 +2124,51 @@ function Qd(e, t) {
2124
2124
  );
2125
2125
  }
2126
2126
  const k = Ye(i.floating);
2127
- s && (k.addEventListener("keydown", x ? T : O, x), k.addEventListener("compositionstart", B), k.addEventListener("compositionend", H)), w && k.addEventListener(u, M ? E : R, M);
2128
- let L = [];
2129
- return p && (ie(i.domReference) && (L = xt(i.domReference)), ie(i.floating) && (L = L.concat(xt(i.floating))), !ie(i.reference) && i.reference && i.reference.contextElement && (L = L.concat(xt(i.reference.contextElement)))), L = L.filter((F) => {
2127
+ s && (k.addEventListener("keydown", x ? O : D, x), k.addEventListener("compositionstart", L), k.addEventListener("compositionend", q)), b && k.addEventListener(u, S ? C : R, S);
2128
+ let A = [];
2129
+ return p && (ie(i.domReference) && (A = xt(i.domReference)), ie(i.floating) && (A = A.concat(xt(i.floating))), !ie(i.reference) && i.reference && i.reference.contextElement && (A = A.concat(xt(i.reference.contextElement)))), A = A.filter((j) => {
2130
2130
  var ve;
2131
- return F !== ((ve = k.defaultView) == null ? void 0 : ve.visualViewport);
2132
- }), L.forEach((F) => {
2133
- F.addEventListener("scroll", N, {
2131
+ return j !== ((ve = k.defaultView) == null ? void 0 : ve.visualViewport);
2132
+ }), A.forEach((j) => {
2133
+ j.addEventListener("scroll", N, {
2134
2134
  passive: !0
2135
2135
  });
2136
2136
  }), () => {
2137
- s && (k.removeEventListener("keydown", x ? T : O, x), k.removeEventListener("compositionstart", B), k.removeEventListener("compositionend", H)), w && k.removeEventListener(u, M ? E : R, M), L.forEach((F) => {
2138
- F.removeEventListener("scroll", N);
2139
- }), window.clearTimeout(D);
2137
+ s && (k.removeEventListener("keydown", x ? O : D, x), k.removeEventListener("compositionstart", L), k.removeEventListener("compositionend", q)), b && k.removeEventListener(u, S ? C : R, S), A.forEach((j) => {
2138
+ j.removeEventListener("scroll", N);
2139
+ }), window.clearTimeout(T);
2140
2140
  };
2141
- }, [o, i, s, w, u, n, r, p, a, _, $, O, x, T, R, M, E]), f.useEffect(() => {
2141
+ }, [o, i, s, b, u, n, r, p, a, _, $, D, x, O, R, S, C]), f.useEffect(() => {
2142
2142
  o.current.insideReactTree = !1;
2143
- }, [o, w, u]);
2143
+ }, [o, b, u]);
2144
2144
  const J = f.useMemo(() => ({
2145
- onKeyDown: O,
2145
+ onKeyDown: D,
2146
2146
  ...l && {
2147
- [Gd[d]]: (D) => {
2148
- r(!1, D.nativeEvent, "reference-press");
2147
+ [Gd[d]]: (T) => {
2148
+ r(!1, T.nativeEvent, "reference-press");
2149
2149
  },
2150
2150
  ...d !== "click" && {
2151
- onClick(D) {
2152
- r(!1, D.nativeEvent, "reference-press");
2151
+ onClick(T) {
2152
+ r(!1, T.nativeEvent, "reference-press");
2153
2153
  }
2154
2154
  }
2155
2155
  }
2156
- }), [O, r, l, d]), Y = f.useMemo(() => ({
2157
- onKeyDown: O,
2156
+ }), [D, r, l, d]), B = f.useMemo(() => ({
2157
+ onKeyDown: D,
2158
2158
  onMouseDown() {
2159
- b.current = !0;
2159
+ w.current = !0;
2160
2160
  },
2161
2161
  onMouseUp() {
2162
- b.current = !0;
2162
+ w.current = !0;
2163
2163
  },
2164
2164
  [Kd[u]]: () => {
2165
2165
  o.current.insideReactTree = !0;
2166
2166
  }
2167
- }), [O, u, o]);
2167
+ }), [D, u, o]);
2168
2168
  return f.useMemo(() => a ? {
2169
2169
  reference: J,
2170
- floating: Y
2171
- } : {}, [a, J, Y]);
2170
+ floating: B
2171
+ } : {}, [a, J, B]);
2172
2172
  }
2173
2173
  function Jd(e) {
2174
2174
  const {
@@ -2244,26 +2244,26 @@ function ef(e) {
2244
2244
  setReference: h,
2245
2245
  setPositionReference: y,
2246
2246
  domReference: d
2247
- }), [m.refs, h, y]), w = f.useMemo(() => ({
2247
+ }), [m.refs, h, y]), b = f.useMemo(() => ({
2248
2248
  ...m.elements,
2249
2249
  domReference: l
2250
- }), [m.elements, l]), b = f.useMemo(() => ({
2250
+ }), [m.elements, l]), w = f.useMemo(() => ({
2251
2251
  ...m,
2252
2252
  ...r,
2253
2253
  refs: g,
2254
- elements: w,
2254
+ elements: b,
2255
2255
  nodeId: t
2256
- }), [m, g, w, t, r]);
2256
+ }), [m, g, b, t, r]);
2257
2257
  return Pe(() => {
2258
- r.dataRef.current.floatingContext = b;
2258
+ r.dataRef.current.floatingContext = w;
2259
2259
  const _ = p?.nodesRef.current.find(($) => $.id === t);
2260
- _ && (_.context = b);
2260
+ _ && (_.context = w);
2261
2261
  }), f.useMemo(() => ({
2262
2262
  ...m,
2263
- context: b,
2263
+ context: w,
2264
2264
  refs: g,
2265
- elements: w
2266
- }), [m, g, w, b]);
2265
+ elements: b
2266
+ }), [m, g, b, w]);
2267
2267
  }
2268
2268
  function Nr(e, t, n) {
2269
2269
  const r = /* @__PURE__ */ new Map(), i = n === "item";
@@ -2411,7 +2411,7 @@ function Ps(e) {
2411
2411
  const p = Ot(e.timeZone, e), m = p > 0 ? Math.floor(p) : Math.ceil(p), y = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset() - m, h = m !== n, g = y - c;
2412
2412
  if (h && g) {
2413
2413
  Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + g);
2414
- const w = Ot(e.timeZone, e), b = w > 0 ? Math.floor(w) : Math.ceil(w), _ = m - b;
2414
+ const b = Ot(e.timeZone, e), w = b > 0 ? Math.floor(b) : Math.ceil(b), _ = m - w;
2415
2415
  _ && (e.internal.setUTCMinutes(e.internal.getUTCMinutes() + _), Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + _));
2416
2416
  }
2417
2417
  }
@@ -3977,7 +3977,7 @@ function at(e, t, n = tt) {
3977
3977
  });
3978
3978
  }
3979
3979
  function Rp(e, t, n, r, i) {
3980
- const { disabled: o, hidden: a, modifiers: s, showOutsideDays: c, broadcastCalendar: u, today: l } = t, { isSameDay: d, isSameMonth: p, startOfMonth: m, isBefore: y, endOfMonth: h, isAfter: g } = i, w = n && m(n), b = r && h(r), _ = {
3980
+ const { disabled: o, hidden: a, modifiers: s, showOutsideDays: c, broadcastCalendar: u, today: l } = t, { isSameDay: d, isSameMonth: p, startOfMonth: m, isBefore: y, endOfMonth: h, isAfter: g } = i, b = n && m(n), w = r && h(r), _ = {
3981
3981
  [re.focused]: [],
3982
3982
  [re.outside]: [],
3983
3983
  [re.disabled]: [],
@@ -3985,31 +3985,31 @@ function Rp(e, t, n, r, i) {
3985
3985
  [re.today]: []
3986
3986
  }, $ = {};
3987
3987
  for (const x of e) {
3988
- const { date: M, displayMonth: S } = x, O = !!(S && !p(M, S)), T = !!(w && y(M, w)), R = !!(b && g(M, b)), E = !!(o && at(M, o, i)), J = !!(a && at(M, a, i)) || T || R || // Broadcast calendar will show outside days as default
3989
- !u && !c && O || u && c === !1 && O, Y = d(M, l ?? i.today());
3990
- O && _.outside.push(x), E && _.disabled.push(x), J && _.hidden.push(x), Y && _.today.push(x), s && Object.keys(s).forEach((D) => {
3991
- const N = s?.[D];
3992
- N && at(M, N, i) && ($[D] ? $[D].push(x) : $[D] = [x]);
3988
+ const { date: S, displayMonth: M } = x, D = !!(M && !p(S, M)), O = !!(b && y(S, b)), R = !!(w && g(S, w)), C = !!(o && at(S, o, i)), J = !!(a && at(S, a, i)) || O || R || // Broadcast calendar will show outside days as default
3989
+ !u && !c && D || u && c === !1 && D, B = d(S, l ?? i.today());
3990
+ D && _.outside.push(x), C && _.disabled.push(x), J && _.hidden.push(x), B && _.today.push(x), s && Object.keys(s).forEach((T) => {
3991
+ const N = s?.[T];
3992
+ N && at(S, N, i) && ($[T] ? $[T].push(x) : $[T] = [x]);
3993
3993
  });
3994
3994
  }
3995
3995
  return (x) => {
3996
- const M = {
3996
+ const S = {
3997
3997
  [re.focused]: !1,
3998
3998
  [re.disabled]: !1,
3999
3999
  [re.hidden]: !1,
4000
4000
  [re.outside]: !1,
4001
4001
  [re.today]: !1
4002
- }, S = {};
4003
- for (const O in _) {
4004
- const T = _[O];
4005
- M[O] = T.some((R) => R === x);
4002
+ }, M = {};
4003
+ for (const D in _) {
4004
+ const O = _[D];
4005
+ S[D] = O.some((R) => R === x);
4006
4006
  }
4007
- for (const O in $)
4008
- S[O] = $[O].some((T) => T === x);
4007
+ for (const D in $)
4008
+ M[D] = $[D].some((O) => O === x);
4009
4009
  return {
4010
- ...M,
4010
+ ...S,
4011
4011
  // custom modifiers should override all the previous ones
4012
- ...S
4012
+ ...M
4013
4013
  };
4014
4014
  };
4015
4015
  }
@@ -4017,65 +4017,65 @@ function Pp(e, t, n = {}) {
4017
4017
  return Object.entries(e).filter(([, r]) => r === !0).reduce((r, [i]) => (n[i] ? r.push(n[i]) : t[re[i]] ? r.push(t[re[i]]) : t[qe[i]] && r.push(t[qe[i]]), r), [t[P.Day]]);
4018
4018
  }
4019
4019
  function Lp(e) {
4020
- return C.createElement("button", { ...e });
4020
+ return E.createElement("button", { ...e });
4021
4021
  }
4022
4022
  function Ap(e) {
4023
- return C.createElement("span", { ...e });
4023
+ return E.createElement("span", { ...e });
4024
4024
  }
4025
4025
  function Wp(e) {
4026
4026
  const { size: t = 24, orientation: n = "left", className: r } = e;
4027
- return C.createElement(
4027
+ return E.createElement(
4028
4028
  "svg",
4029
4029
  { className: r, width: t, height: t, viewBox: "0 0 24 24" },
4030
- 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" }),
4031
- 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" }),
4032
- n === "left" && C.createElement("polygon", { points: "16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20" }),
4033
- n === "right" && C.createElement("polygon", { points: "8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20" })
4030
+ n === "up" && E.createElement("polygon", { points: "6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28" }),
4031
+ n === "down" && E.createElement("polygon", { points: "6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72" }),
4032
+ n === "left" && E.createElement("polygon", { points: "16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20" }),
4033
+ n === "right" && E.createElement("polygon", { points: "8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20" })
4034
4034
  );
4035
4035
  }
4036
4036
  function Ip(e) {
4037
4037
  const { day: t, modifiers: n, ...r } = e;
4038
- return C.createElement("td", { ...r });
4038
+ return E.createElement("td", { ...r });
4039
4039
  }
4040
4040
  function Fp(e) {
4041
- const { day: t, modifiers: n, ...r } = e, i = C.useRef(null);
4042
- return C.useEffect(() => {
4041
+ const { day: t, modifiers: n, ...r } = e, i = E.useRef(null);
4042
+ return E.useEffect(() => {
4043
4043
  n.focused && i.current?.focus();
4044
- }, [n.focused]), C.createElement("button", { ref: i, ...r });
4044
+ }, [n.focused]), E.createElement("button", { ref: i, ...r });
4045
4045
  }
4046
4046
  function jp(e) {
4047
4047
  const { options: t, className: n, components: r, classNames: i, ...o } = e, a = [i[P.Dropdown], n].join(" "), s = t?.find(({ value: c }) => c === o.value);
4048
- return C.createElement(
4048
+ return E.createElement(
4049
4049
  "span",
4050
4050
  { "data-disabled": o.disabled, className: i[P.DropdownRoot] },
4051
- C.createElement(r.Select, { className: a, ...o }, t?.map(({ value: c, label: u, disabled: l }) => C.createElement(r.Option, { key: c, value: c, disabled: l }, u))),
4052
- C.createElement(
4051
+ E.createElement(r.Select, { className: a, ...o }, t?.map(({ value: c, label: u, disabled: l }) => E.createElement(r.Option, { key: c, value: c, disabled: l }, u))),
4052
+ E.createElement(
4053
4053
  "span",
4054
4054
  { className: i[P.CaptionLabel], "aria-hidden": !0 },
4055
4055
  s?.label,
4056
- C.createElement(r.Chevron, { orientation: "down", size: 18, className: i[P.Chevron] })
4056
+ E.createElement(r.Chevron, { orientation: "down", size: 18, className: i[P.Chevron] })
4057
4057
  )
4058
4058
  );
4059
4059
  }
4060
4060
  function Yp(e) {
4061
- return C.createElement("div", { ...e });
4061
+ return E.createElement("div", { ...e });
4062
4062
  }
4063
4063
  function Bp(e) {
4064
- return C.createElement("div", { ...e });
4064
+ return E.createElement("div", { ...e });
4065
4065
  }
4066
4066
  function qp(e) {
4067
4067
  const { calendarMonth: t, displayIndex: n, ...r } = e;
4068
- return C.createElement("div", { ...r }, e.children);
4068
+ return E.createElement("div", { ...r }, e.children);
4069
4069
  }
4070
4070
  function Hp(e) {
4071
4071
  const { calendarMonth: t, displayIndex: n, ...r } = e;
4072
- return C.createElement("div", { ...r });
4072
+ return E.createElement("div", { ...r });
4073
4073
  }
4074
4074
  function zp(e) {
4075
- return C.createElement("table", { ...e });
4075
+ return E.createElement("table", { ...e });
4076
4076
  }
4077
4077
  function Up(e) {
4078
- return C.createElement("div", { ...e });
4078
+ return E.createElement("div", { ...e });
4079
4079
  }
4080
4080
  const eu = is(void 0);
4081
4081
  function Rn() {
@@ -4086,7 +4086,7 @@ function Rn() {
4086
4086
  }
4087
4087
  function Vp(e) {
4088
4088
  const { components: t } = Rn();
4089
- return C.createElement(t.Dropdown, { ...e });
4089
+ return E.createElement(t.Dropdown, { ...e });
4090
4090
  }
4091
4091
  function Xp(e) {
4092
4092
  const { onPreviousClick: t, onNextClick: n, previousMonth: r, nextMonth: i, ...o } = e, { components: a, classNames: s, labels: { labelPrevious: c, labelNext: u } } = Rn(), l = Ne((p) => {
@@ -4094,66 +4094,66 @@ function Xp(e) {
4094
4094
  }, [i, n]), d = Ne((p) => {
4095
4095
  r && t?.(p);
4096
4096
  }, [r, t]);
4097
- return C.createElement(
4097
+ return E.createElement(
4098
4098
  "nav",
4099
4099
  { ...o },
4100
- C.createElement(
4100
+ E.createElement(
4101
4101
  a.PreviousMonthButton,
4102
4102
  { type: "button", className: s[P.PreviousMonthButton], tabIndex: r ? void 0 : -1, "aria-disabled": r ? void 0 : !0, "aria-label": c(r), onClick: d },
4103
- C.createElement(a.Chevron, { disabled: r ? void 0 : !0, className: s[P.Chevron], orientation: "left" })
4103
+ E.createElement(a.Chevron, { disabled: r ? void 0 : !0, className: s[P.Chevron], orientation: "left" })
4104
4104
  ),
4105
- C.createElement(
4105
+ E.createElement(
4106
4106
  a.NextMonthButton,
4107
4107
  { type: "button", className: s[P.NextMonthButton], tabIndex: i ? void 0 : -1, "aria-disabled": i ? void 0 : !0, "aria-label": u(i), onClick: l },
4108
- C.createElement(a.Chevron, { disabled: i ? void 0 : !0, orientation: "right", className: s[P.Chevron] })
4108
+ E.createElement(a.Chevron, { disabled: i ? void 0 : !0, orientation: "right", className: s[P.Chevron] })
4109
4109
  )
4110
4110
  );
4111
4111
  }
4112
4112
  function Zp(e) {
4113
4113
  const { components: t } = Rn();
4114
- return C.createElement(t.Button, { ...e });
4114
+ return E.createElement(t.Button, { ...e });
4115
4115
  }
4116
4116
  function Gp(e) {
4117
- return C.createElement("option", { ...e });
4117
+ return E.createElement("option", { ...e });
4118
4118
  }
4119
4119
  function Kp(e) {
4120
4120
  const { components: t } = Rn();
4121
- return C.createElement(t.Button, { ...e });
4121
+ return E.createElement(t.Button, { ...e });
4122
4122
  }
4123
4123
  function Qp(e) {
4124
4124
  const { rootRef: t, ...n } = e;
4125
- return C.createElement("div", { ...n, ref: t });
4125
+ return E.createElement("div", { ...n, ref: t });
4126
4126
  }
4127
4127
  function Jp(e) {
4128
- return C.createElement("select", { ...e });
4128
+ return E.createElement("select", { ...e });
4129
4129
  }
4130
4130
  function eh(e) {
4131
4131
  const { week: t, ...n } = e;
4132
- return C.createElement("tr", { ...n });
4132
+ return E.createElement("tr", { ...n });
4133
4133
  }
4134
4134
  function th(e) {
4135
- return C.createElement("th", { ...e });
4135
+ return E.createElement("th", { ...e });
4136
4136
  }
4137
4137
  function nh(e) {
4138
- return C.createElement(
4138
+ return E.createElement(
4139
4139
  "thead",
4140
4140
  { "aria-hidden": !0 },
4141
- C.createElement("tr", { ...e })
4141
+ E.createElement("tr", { ...e })
4142
4142
  );
4143
4143
  }
4144
4144
  function rh(e) {
4145
4145
  const { week: t, ...n } = e;
4146
- return C.createElement("th", { ...n });
4146
+ return E.createElement("th", { ...n });
4147
4147
  }
4148
4148
  function oh(e) {
4149
- return C.createElement("th", { ...e });
4149
+ return E.createElement("th", { ...e });
4150
4150
  }
4151
4151
  function ih(e) {
4152
- return C.createElement("tbody", { ...e });
4152
+ return E.createElement("tbody", { ...e });
4153
4153
  }
4154
4154
  function ah(e) {
4155
4155
  const { components: t } = Rn();
4156
- return C.createElement(t.Dropdown, { ...e });
4156
+ return E.createElement(t.Dropdown, { ...e });
4157
4157
  }
4158
4158
  const sh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4159
4159
  __proto__: null,
@@ -4362,62 +4362,62 @@ function Ih(e, t, { classNames: n, months: r, focused: i, dateLib: o }) {
4362
4362
  r.length === 0 || u.length === 0 || r.length !== u.length)
4363
4363
  return;
4364
4364
  const l = o.isSameMonth(r[0].date, u[0].date), d = o.isAfter(r[0].date, u[0].date), p = d ? n[Ee.caption_after_enter] : n[Ee.caption_before_enter], m = d ? n[Ee.weeks_after_enter] : n[Ee.weeks_before_enter], y = a.current, h = e.current.cloneNode(!0);
4365
- if (h instanceof HTMLElement ? (Pr(h).forEach((b) => {
4366
- if (!(b instanceof HTMLElement))
4365
+ if (h instanceof HTMLElement ? (Pr(h).forEach((w) => {
4366
+ if (!(w instanceof HTMLElement))
4367
4367
  return;
4368
- const _ = Lh(b);
4369
- _ && b.contains(_) && b.removeChild(_);
4370
- const $ = Lr(b);
4368
+ const _ = Lh(w);
4369
+ _ && w.contains(_) && w.removeChild(_);
4370
+ const $ = Lr(w);
4371
4371
  $ && $.classList.remove(p);
4372
- const x = Ar(b);
4372
+ const x = Ar(w);
4373
4373
  x && x.classList.remove(m);
4374
4374
  }), a.current = h) : a.current = null, c.current || l || // skip animation if a day is focused because it can cause issues to the animation and is better for a11y
4375
4375
  i)
4376
4376
  return;
4377
- const g = y instanceof HTMLElement ? Pr(y) : [], w = Pr(e.current);
4378
- if (w && w.every((b) => b instanceof HTMLElement) && g && g.every((b) => b instanceof HTMLElement)) {
4377
+ const g = y instanceof HTMLElement ? Pr(y) : [], b = Pr(e.current);
4378
+ if (b && b.every((w) => w instanceof HTMLElement) && g && g.every((w) => w instanceof HTMLElement)) {
4379
4379
  c.current = !0, e.current.style.isolation = "isolate";
4380
- const b = Ah(e.current);
4381
- b && (b.style.zIndex = "1"), w.forEach((_, $) => {
4380
+ const w = Ah(e.current);
4381
+ w && (w.style.zIndex = "1"), b.forEach((_, $) => {
4382
4382
  const x = g[$];
4383
4383
  if (!x)
4384
4384
  return;
4385
4385
  _.style.position = "relative", _.style.overflow = "hidden";
4386
- const M = Lr(_);
4387
- M && M.classList.add(p);
4388
- const S = Ar(_);
4389
- S && S.classList.add(m);
4390
- const O = () => {
4391
- c.current = !1, e.current && (e.current.style.isolation = ""), b && (b.style.zIndex = ""), M && M.classList.remove(p), S && S.classList.remove(m), _.style.position = "", _.style.overflow = "", _.contains(x) && _.removeChild(x);
4386
+ const S = Lr(_);
4387
+ S && S.classList.add(p);
4388
+ const M = Ar(_);
4389
+ M && M.classList.add(m);
4390
+ const D = () => {
4391
+ c.current = !1, e.current && (e.current.style.isolation = ""), w && (w.style.zIndex = ""), S && S.classList.remove(p), M && M.classList.remove(m), _.style.position = "", _.style.overflow = "", _.contains(x) && _.removeChild(x);
4392
4392
  };
4393
4393
  x.style.pointerEvents = "none", x.style.position = "absolute", x.style.overflow = "hidden", x.setAttribute("aria-hidden", "true");
4394
- const T = Wh(x);
4395
- T && (T.style.opacity = "0");
4394
+ const O = Wh(x);
4395
+ O && (O.style.opacity = "0");
4396
4396
  const R = Lr(x);
4397
- R && (R.classList.add(d ? n[Ee.caption_before_exit] : n[Ee.caption_after_exit]), R.addEventListener("animationend", O));
4398
- const E = Ar(x);
4399
- E && E.classList.add(d ? n[Ee.weeks_before_exit] : n[Ee.weeks_after_exit]), _.insertBefore(x, _.firstChild);
4397
+ R && (R.classList.add(d ? n[Ee.caption_before_exit] : n[Ee.caption_after_exit]), R.addEventListener("animationend", D));
4398
+ const C = Ar(x);
4399
+ C && C.classList.add(d ? n[Ee.weeks_before_exit] : n[Ee.weeks_after_exit]), _.insertBefore(x, _.firstChild);
4400
4400
  });
4401
4401
  }
4402
4402
  });
4403
4403
  }
4404
4404
  function Fh(e, t, n, r) {
4405
- const i = e[0], o = e[e.length - 1], { ISOWeek: a, fixedWeeks: s, broadcastCalendar: c } = n ?? {}, { addDays: u, differenceInCalendarDays: l, differenceInCalendarMonths: d, endOfBroadcastWeek: p, endOfISOWeek: m, endOfMonth: y, endOfWeek: h, isAfter: g, startOfBroadcastWeek: w, startOfISOWeek: b, startOfWeek: _ } = r, $ = c ? w(i, r) : a ? b(i) : _(i), x = c ? p(o) : a ? m(y(o)) : h(y(o)), M = l(x, $), S = d(o, i) + 1, O = [];
4406
- for (let R = 0; R <= M; R++) {
4407
- const E = u($, R);
4408
- if (t && g(E, t))
4405
+ const i = e[0], o = e[e.length - 1], { ISOWeek: a, fixedWeeks: s, broadcastCalendar: c } = n ?? {}, { addDays: u, differenceInCalendarDays: l, differenceInCalendarMonths: d, endOfBroadcastWeek: p, endOfISOWeek: m, endOfMonth: y, endOfWeek: h, isAfter: g, startOfBroadcastWeek: b, startOfISOWeek: w, startOfWeek: _ } = r, $ = c ? b(i, r) : a ? w(i) : _(i), x = c ? p(o) : a ? m(y(o)) : h(y(o)), S = l(x, $), M = d(o, i) + 1, D = [];
4406
+ for (let R = 0; R <= S; R++) {
4407
+ const C = u($, R);
4408
+ if (t && g(C, t))
4409
4409
  break;
4410
- O.push(E);
4410
+ D.push(C);
4411
4411
  }
4412
- const T = (c ? 35 : 42) * S;
4413
- if (s && O.length < T) {
4414
- const R = T - O.length;
4415
- for (let E = 0; E < R; E++) {
4416
- const J = u(O[O.length - 1], 1);
4417
- O.push(J);
4412
+ const O = (c ? 35 : 42) * M;
4413
+ if (s && D.length < O) {
4414
+ const R = O - D.length;
4415
+ for (let C = 0; C < R; C++) {
4416
+ const J = u(D[D.length - 1], 1);
4417
+ D.push(J);
4418
4418
  }
4419
4419
  }
4420
- return O;
4420
+ return D;
4421
4421
  }
4422
4422
  function jh(e) {
4423
4423
  const t = [];
@@ -4448,19 +4448,19 @@ function Di(e, t, n, r) {
4448
4448
  }
4449
4449
  function Bh(e, t, n, r) {
4450
4450
  const { addDays: i, endOfBroadcastWeek: o, endOfISOWeek: a, endOfMonth: s, endOfWeek: c, getISOWeek: u, getWeek: l, startOfBroadcastWeek: d, startOfISOWeek: p, startOfWeek: m } = r, y = e.reduce((h, g) => {
4451
- const w = n.broadcastCalendar ? d(g, r) : n.ISOWeek ? p(g) : m(g), b = n.broadcastCalendar ? o(g) : n.ISOWeek ? a(s(g)) : c(s(g)), _ = t.filter((S) => S >= w && S <= b), $ = n.broadcastCalendar ? 35 : 42;
4451
+ const b = n.broadcastCalendar ? d(g, r) : n.ISOWeek ? p(g) : m(g), w = n.broadcastCalendar ? o(g) : n.ISOWeek ? a(s(g)) : c(s(g)), _ = t.filter((M) => M >= b && M <= w), $ = n.broadcastCalendar ? 35 : 42;
4452
4452
  if (n.fixedWeeks && _.length < $) {
4453
- const S = t.filter((O) => {
4454
- const T = $ - _.length;
4455
- return O > b && O <= i(b, T);
4453
+ const M = t.filter((D) => {
4454
+ const O = $ - _.length;
4455
+ return D > w && D <= i(w, O);
4456
4456
  });
4457
- _.push(...S);
4457
+ _.push(...M);
4458
4458
  }
4459
- const x = _.reduce((S, O) => {
4460
- const T = n.ISOWeek ? u(O) : l(O), R = S.find((J) => J.weekNumber === T), E = new Xs(O, g, r);
4461
- return R ? R.days.push(E) : S.push(new Np(T, [E])), S;
4462
- }, []), M = new Tp(g, x);
4463
- return h.push(M), h;
4459
+ const x = _.reduce((M, D) => {
4460
+ const O = n.ISOWeek ? u(D) : l(D), R = M.find((J) => J.weekNumber === O), C = new Xs(D, g, r);
4461
+ return R ? R.days.push(C) : M.push(new Np(O, [C])), M;
4462
+ }, []), S = new Tp(g, x);
4463
+ return h.push(S), h;
4464
4464
  }, []);
4465
4465
  return n.reverseMonths ? y.reverse() : y;
4466
4466
  }
@@ -4506,11 +4506,11 @@ function Vh(e, t) {
4506
4506
  const $ = Di(e, n, r, t);
4507
4507
  c($);
4508
4508
  }, [e.timeZone]);
4509
- const u = Yh(s, r, e, t), l = Fh(u, e.endMonth ? o(e.endMonth) : void 0, e, t), d = Bh(u, l, e, t), p = Uh(d), m = jh(d), y = zh(s, n, e, t), h = Hh(s, r, e, t), { disableNavigation: g, onMonthChange: w } = e, b = ($) => p.some((x) => x.days.some((M) => M.isEqualTo($))), _ = ($) => {
4509
+ const u = Yh(s, r, e, t), l = Fh(u, e.endMonth ? o(e.endMonth) : void 0, e, t), d = Bh(u, l, e, t), p = Uh(d), m = jh(d), y = zh(s, n, e, t), h = Hh(s, r, e, t), { disableNavigation: g, onMonthChange: b } = e, w = ($) => p.some((x) => x.days.some((S) => S.isEqualTo($))), _ = ($) => {
4510
4510
  if (g)
4511
4511
  return;
4512
4512
  let x = i($);
4513
- n && x < i(n) && (x = i(n)), r && x > i(r) && (x = i(r)), c(x), w?.(x);
4513
+ n && x < i(n) && (x = i(n)), r && x > i(r) && (x = i(r)), c(x), b?.(x);
4514
4514
  };
4515
4515
  return {
4516
4516
  months: d,
@@ -4522,7 +4522,7 @@ function Vh(e, t) {
4522
4522
  nextMonth: h,
4523
4523
  goToMonth: _,
4524
4524
  goToDay: ($) => {
4525
- b($) || _($.date);
4525
+ w($) || _($.date);
4526
4526
  }
4527
4527
  };
4528
4528
  }
@@ -4542,16 +4542,16 @@ function Xh(e, t, n, r) {
4542
4542
  return i || (i = e.find((a) => Oi(t(a)))), i;
4543
4543
  }
4544
4544
  function Zh(e, t, n, r, i, o, a) {
4545
- const { ISOWeek: s, broadcastCalendar: c } = o, { addDays: u, addMonths: l, addWeeks: d, addYears: p, endOfBroadcastWeek: m, endOfISOWeek: y, endOfWeek: h, max: g, min: w, startOfBroadcastWeek: b, startOfISOWeek: _, startOfWeek: $ } = a;
4545
+ const { ISOWeek: s, broadcastCalendar: c } = o, { addDays: u, addMonths: l, addWeeks: d, addYears: p, endOfBroadcastWeek: m, endOfISOWeek: y, endOfWeek: h, max: g, min: b, startOfBroadcastWeek: w, startOfISOWeek: _, startOfWeek: $ } = a;
4546
4546
  let x = {
4547
4547
  day: u,
4548
4548
  week: d,
4549
4549
  month: l,
4550
4550
  year: p,
4551
- startOfWeek: (M) => c ? b(M, a) : s ? _(M) : $(M),
4552
- endOfWeek: (M) => c ? m(M) : s ? y(M) : h(M)
4551
+ startOfWeek: (S) => c ? w(S, a) : s ? _(S) : $(S),
4552
+ endOfWeek: (S) => c ? m(S) : s ? y(S) : h(S)
4553
4553
  }[e](n, t === "after" ? 1 : -1);
4554
- return t === "before" && r ? x = g([r, x]) : t === "after" && i && (x = w([i, x])), x;
4554
+ return t === "before" && r ? x = g([r, x]) : t === "after" && i && (x = b([i, x])), x;
4555
4555
  }
4556
4556
  function au(e, t, n, r, i, o, a, s = 0) {
4557
4557
  if (s > 365)
@@ -4693,15 +4693,15 @@ function om(e) {
4693
4693
  let t = e;
4694
4694
  t.timeZone && (t = {
4695
4695
  ...e
4696
- }, t.today && (t.today = new je(t.today, t.timeZone)), t.month && (t.month = new je(t.month, t.timeZone)), t.defaultMonth && (t.defaultMonth = new je(t.defaultMonth, t.timeZone)), t.startMonth && (t.startMonth = new je(t.startMonth, t.timeZone)), t.endMonth && (t.endMonth = new je(t.endMonth, t.timeZone)), t.mode === "single" && t.selected ? t.selected = new je(t.selected, t.timeZone) : t.mode === "multiple" && t.selected ? t.selected = t.selected?.map((I) => new je(I, t.timeZone)) : t.mode === "range" && t.selected && (t.selected = {
4696
+ }, t.today && (t.today = new je(t.today, t.timeZone)), t.month && (t.month = new je(t.month, t.timeZone)), t.defaultMonth && (t.defaultMonth = new je(t.defaultMonth, t.timeZone)), t.startMonth && (t.startMonth = new je(t.startMonth, t.timeZone)), t.endMonth && (t.endMonth = new je(t.endMonth, t.timeZone)), t.mode === "single" && t.selected ? t.selected = new je(t.selected, t.timeZone) : t.mode === "multiple" && t.selected ? t.selected = t.selected?.map((F) => new je(F, t.timeZone)) : t.mode === "range" && t.selected && (t.selected = {
4697
4697
  from: t.selected.from ? new je(t.selected.from, t.timeZone) : void 0,
4698
4698
  to: t.selected.to ? new je(t.selected.to, t.timeZone) : void 0
4699
4699
  }));
4700
4700
  const { components: n, formatters: r, labels: i, dateLib: o, locale: a, classNames: s } = Mr(() => {
4701
- const I = { ...To, ...t.locale };
4701
+ const F = { ...To, ...t.locale };
4702
4702
  return {
4703
4703
  dateLib: new lt({
4704
- locale: I,
4704
+ locale: F,
4705
4705
  weekStartsOn: t.broadcastCalendar ? 1 : t.weekStartsOn,
4706
4706
  firstWeekContainsDate: t.firstWeekContainsDate,
4707
4707
  useAdditionalWeekYearTokens: t.useAdditionalWeekYearTokens,
@@ -4712,7 +4712,7 @@ function om(e) {
4712
4712
  components: uh(t.components),
4713
4713
  formatters: yh(t.formatters),
4714
4714
  labels: { ...Ph, ...t.labels },
4715
- locale: I,
4715
+ locale: F,
4716
4716
  classNames: { ...tu(), ...t.classNames }
4717
4717
  };
4718
4718
  }, [
@@ -4729,17 +4729,17 @@ function om(e) {
4729
4729
  t.formatters,
4730
4730
  t.labels,
4731
4731
  t.classNames
4732
- ]), { captionLayout: c, mode: u, navLayout: l, numberOfMonths: d = 1, onDayBlur: p, onDayClick: m, onDayFocus: y, onDayKeyDown: h, onDayMouseEnter: g, onDayMouseLeave: w, onNextClick: b, onPrevClick: _, showWeekNumber: $, styles: x } = t, { formatCaption: M, formatDay: S, formatMonthDropdown: O, formatWeekNumber: T, formatWeekNumberHeader: R, formatWeekdayName: E, formatYearDropdown: J } = r, Y = Vh(t, o), { days: D, months: N, navStart: B, navEnd: H, previousMonth: k, nextMonth: L, goToMonth: F } = Y, ve = Rp(D, t, B, H, o), { isSelected: ze, select: j, selected: ye } = rm(t, o) ?? {}, { blur: ee, focused: be, isFocusTarget: Ue, moveFocus: Pt, setFocused: dt } = Gh(t, Y, ve, ze ?? (() => !1), o), { labelDayButton: Lt, labelGridcell: At, labelGrid: A, labelMonthDropdown: q, labelNav: W, labelPrevious: te, labelNext: le, labelWeekday: U, labelWeekNumber: We, labelWeekNumberHeader: xe, labelYearDropdown: we } = i, rt = Mr(() => _h(o, t.ISOWeek), [o, t.ISOWeek]), Ie = u !== void 0 || m !== void 0, Se = Ne(() => {
4733
- k && (F(k), _?.(k));
4734
- }, [k, F, _]), Te = Ne(() => {
4735
- L && (F(L), b?.(L));
4736
- }, [F, L, b]), Ln = Ne((I, ne) => (V) => {
4737
- V.preventDefault(), V.stopPropagation(), dt(I), j?.(I.date, ne, V), m?.(I.date, ne, V);
4738
- }, [j, m, dt]), Wc = Ne((I, ne) => (V) => {
4739
- dt(I), y?.(I.date, ne, V);
4740
- }, [y, dt]), Ic = Ne((I, ne) => (V) => {
4741
- ee(), p?.(I.date, ne, V);
4742
- }, [ee, p]), Fc = Ne((I, ne) => (V) => {
4732
+ ]), { captionLayout: c, mode: u, navLayout: l, numberOfMonths: d = 1, onDayBlur: p, onDayClick: m, onDayFocus: y, onDayKeyDown: h, onDayMouseEnter: g, onDayMouseLeave: b, onNextClick: w, onPrevClick: _, showWeekNumber: $, styles: x } = t, { formatCaption: S, formatDay: M, formatMonthDropdown: D, formatWeekNumber: O, formatWeekNumberHeader: R, formatWeekdayName: C, formatYearDropdown: J } = r, B = Vh(t, o), { days: T, months: N, navStart: L, navEnd: q, previousMonth: k, nextMonth: A, goToMonth: j } = B, ve = Rp(T, t, L, q, o), { isSelected: ze, select: Y, selected: ye } = rm(t, o) ?? {}, { blur: ee, focused: be, isFocusTarget: Ue, moveFocus: Pt, setFocused: dt } = Gh(t, B, ve, ze ?? (() => !1), o), { labelDayButton: Lt, labelGridcell: At, labelGrid: W, labelMonthDropdown: H, labelNav: I, labelPrevious: te, labelNext: le, labelWeekday: U, labelWeekNumber: We, labelWeekNumberHeader: xe, labelYearDropdown: we } = i, rt = Mr(() => _h(o, t.ISOWeek), [o, t.ISOWeek]), Ie = u !== void 0 || m !== void 0, Se = Ne(() => {
4733
+ k && (j(k), _?.(k));
4734
+ }, [k, j, _]), Te = Ne(() => {
4735
+ A && (j(A), w?.(A));
4736
+ }, [j, A, w]), Ln = Ne((F, ne) => (V) => {
4737
+ V.preventDefault(), V.stopPropagation(), dt(F), Y?.(F.date, ne, V), m?.(F.date, ne, V);
4738
+ }, [Y, m, dt]), Wc = Ne((F, ne) => (V) => {
4739
+ dt(F), y?.(F.date, ne, V);
4740
+ }, [y, dt]), Ic = Ne((F, ne) => (V) => {
4741
+ ee(), p?.(F.date, ne, V);
4742
+ }, [ee, p]), Fc = Ne((F, ne) => (V) => {
4743
4743
  const ft = {
4744
4744
  ArrowLeft: [
4745
4745
  V.shiftKey ? "month" : "day",
@@ -4761,18 +4761,18 @@ function om(e) {
4761
4761
  const [Fe, An] = ft[V.key];
4762
4762
  Pt(Fe, An);
4763
4763
  }
4764
- h?.(I.date, ne, V);
4765
- }, [Pt, h, t.dir]), jc = Ne((I, ne) => (V) => {
4766
- g?.(I.date, ne, V);
4767
- }, [g]), Yc = Ne((I, ne) => (V) => {
4768
- w?.(I.date, ne, V);
4769
- }, [w]), Bc = Ne((I) => (ne) => {
4770
- const V = Number(ne.target.value), ft = o.setMonth(o.startOfMonth(I), V);
4771
- F(ft);
4772
- }, [o, F]), qc = Ne((I) => (ne) => {
4773
- const V = Number(ne.target.value), ft = o.setYear(o.startOfMonth(I), V);
4774
- F(ft);
4775
- }, [o, F]), { className: Hc, style: zc } = Mr(() => ({
4764
+ h?.(F.date, ne, V);
4765
+ }, [Pt, h, t.dir]), jc = Ne((F, ne) => (V) => {
4766
+ g?.(F.date, ne, V);
4767
+ }, [g]), Yc = Ne((F, ne) => (V) => {
4768
+ b?.(F.date, ne, V);
4769
+ }, [b]), Bc = Ne((F) => (ne) => {
4770
+ const V = Number(ne.target.value), ft = o.setMonth(o.startOfMonth(F), V);
4771
+ j(ft);
4772
+ }, [o, j]), qc = Ne((F) => (ne) => {
4773
+ const V = Number(ne.target.value), ft = o.setYear(o.startOfMonth(F), V);
4774
+ j(ft);
4775
+ }, [o, j]), { className: Hc, style: zc } = Mr(() => ({
4776
4776
  className: [s[P.Root], t.className].filter(Boolean).join(" "),
4777
4777
  style: { ...x?.[P.Root], ...t.style }
4778
4778
  }), [s, t.className, t.style, x]), Uc = ch(t), zo = st(null);
@@ -4785,12 +4785,12 @@ function om(e) {
4785
4785
  const Vc = {
4786
4786
  dayPickerProps: t,
4787
4787
  selected: ye,
4788
- select: j,
4788
+ select: Y,
4789
4789
  isSelected: ze,
4790
4790
  months: N,
4791
- nextMonth: L,
4791
+ nextMonth: A,
4792
4792
  previousMonth: k,
4793
- goToMonth: F,
4793
+ goToMonth: j,
4794
4794
  getModifiers: ve,
4795
4795
  components: n,
4796
4796
  classNames: s,
@@ -4798,32 +4798,32 @@ function om(e) {
4798
4798
  labels: i,
4799
4799
  formatters: r
4800
4800
  };
4801
- return C.createElement(
4801
+ return E.createElement(
4802
4802
  eu.Provider,
4803
4803
  { value: Vc },
4804
- C.createElement(
4804
+ E.createElement(
4805
4805
  n.Root,
4806
4806
  { rootRef: t.animate ? zo : void 0, className: Hc, style: zc, dir: t.dir, id: t.id, lang: t.lang, nonce: t.nonce, title: t.title, role: t.role, "aria-label": t["aria-label"], ...Uc },
4807
- C.createElement(
4807
+ E.createElement(
4808
4808
  n.Months,
4809
4809
  { className: s[P.Months], style: x?.[P.Months] },
4810
- !t.hideNavigation && !l && C.createElement(n.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: s[P.Nav], style: x?.[P.Nav], "aria-label": W(), onPreviousClick: Se, onNextClick: Te, previousMonth: k, nextMonth: L }),
4811
- N.map((I, ne) => {
4812
- const V = bh(I.date, B, H, r, o), ft = xh(B, H, r, o);
4813
- return C.createElement(
4810
+ !t.hideNavigation && !l && E.createElement(n.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: s[P.Nav], style: x?.[P.Nav], "aria-label": I(), onPreviousClick: Se, onNextClick: Te, previousMonth: k, nextMonth: A }),
4811
+ N.map((F, ne) => {
4812
+ const V = bh(F.date, L, q, r, o), ft = xh(L, q, r, o);
4813
+ return E.createElement(
4814
4814
  n.Month,
4815
- { "data-animated-month": t.animate ? "true" : void 0, className: s[P.Month], style: x?.[P.Month], key: ne, displayIndex: ne, calendarMonth: I },
4816
- l === "around" && !t.hideNavigation && ne === 0 && C.createElement(
4815
+ { "data-animated-month": t.animate ? "true" : void 0, className: s[P.Month], style: x?.[P.Month], key: ne, displayIndex: ne, calendarMonth: F },
4816
+ l === "around" && !t.hideNavigation && ne === 0 && E.createElement(
4817
4817
  n.PreviousMonthButton,
4818
4818
  { type: "button", className: s[P.PreviousMonthButton], tabIndex: k ? void 0 : -1, "aria-disabled": k ? void 0 : !0, "aria-label": te(k), onClick: Se, "data-animated-button": t.animate ? "true" : void 0 },
4819
- C.createElement(n.Chevron, { disabled: k ? void 0 : !0, className: s[P.Chevron], orientation: t.dir === "rtl" ? "right" : "left" })
4819
+ E.createElement(n.Chevron, { disabled: k ? void 0 : !0, className: s[P.Chevron], orientation: t.dir === "rtl" ? "right" : "left" })
4820
4820
  ),
4821
- C.createElement(n.MonthCaption, { "data-animated-caption": t.animate ? "true" : void 0, className: s[P.MonthCaption], style: x?.[P.MonthCaption], calendarMonth: I, displayIndex: ne }, c?.startsWith("dropdown") ? C.createElement(
4821
+ E.createElement(n.MonthCaption, { "data-animated-caption": t.animate ? "true" : void 0, className: s[P.MonthCaption], style: x?.[P.MonthCaption], calendarMonth: F, displayIndex: ne }, c?.startsWith("dropdown") ? E.createElement(
4822
4822
  n.DropdownNav,
4823
4823
  { className: s[P.Dropdowns], style: x?.[P.Dropdowns] },
4824
- c === "dropdown" || c === "dropdown-months" ? C.createElement(n.MonthsDropdown, { className: s[P.MonthsDropdown], "aria-label": q(), classNames: s, components: n, disabled: !!t.disableNavigation, onChange: Bc(I.date), options: V, style: x?.[P.Dropdown], value: o.getMonth(I.date) }) : C.createElement("span", null, O(I.date, o)),
4825
- c === "dropdown" || c === "dropdown-years" ? C.createElement(n.YearsDropdown, { className: s[P.YearsDropdown], "aria-label": we(o.options), classNames: s, components: n, disabled: !!t.disableNavigation, onChange: qc(I.date), options: ft, style: x?.[P.Dropdown], value: o.getYear(I.date) }) : C.createElement("span", null, J(I.date, o)),
4826
- C.createElement("span", { role: "status", "aria-live": "polite", style: {
4824
+ c === "dropdown" || c === "dropdown-months" ? E.createElement(n.MonthsDropdown, { className: s[P.MonthsDropdown], "aria-label": H(), classNames: s, components: n, disabled: !!t.disableNavigation, onChange: Bc(F.date), options: V, style: x?.[P.Dropdown], value: o.getMonth(F.date) }) : E.createElement("span", null, D(F.date, o)),
4825
+ c === "dropdown" || c === "dropdown-years" ? E.createElement(n.YearsDropdown, { className: s[P.YearsDropdown], "aria-label": we(o.options), classNames: s, components: n, disabled: !!t.disableNavigation, onChange: qc(F.date), options: ft, style: x?.[P.Dropdown], value: o.getYear(F.date) }) : E.createElement("span", null, J(F.date, o)),
4826
+ E.createElement("span", { role: "status", "aria-live": "polite", style: {
4827
4827
  border: 0,
4828
4828
  clip: "rect(0 0 0 0)",
4829
4829
  height: "1px",
@@ -4834,29 +4834,29 @@ function om(e) {
4834
4834
  width: "1px",
4835
4835
  whiteSpace: "nowrap",
4836
4836
  wordWrap: "normal"
4837
- } }, M(I.date, o.options, o))
4838
- ) : C.createElement(n.CaptionLabel, { className: s[P.CaptionLabel], role: "status", "aria-live": "polite" }, M(I.date, o.options, o))),
4839
- l === "around" && !t.hideNavigation && ne === d - 1 && C.createElement(
4837
+ } }, S(F.date, o.options, o))
4838
+ ) : E.createElement(n.CaptionLabel, { className: s[P.CaptionLabel], role: "status", "aria-live": "polite" }, S(F.date, o.options, o))),
4839
+ l === "around" && !t.hideNavigation && ne === d - 1 && E.createElement(
4840
4840
  n.NextMonthButton,
4841
- { type: "button", className: s[P.NextMonthButton], tabIndex: L ? void 0 : -1, "aria-disabled": L ? void 0 : !0, "aria-label": le(L), onClick: Te, "data-animated-button": t.animate ? "true" : void 0 },
4842
- C.createElement(n.Chevron, { disabled: L ? void 0 : !0, className: s[P.Chevron], orientation: t.dir === "rtl" ? "left" : "right" })
4841
+ { type: "button", className: s[P.NextMonthButton], tabIndex: A ? void 0 : -1, "aria-disabled": A ? void 0 : !0, "aria-label": le(A), onClick: Te, "data-animated-button": t.animate ? "true" : void 0 },
4842
+ E.createElement(n.Chevron, { disabled: A ? void 0 : !0, className: s[P.Chevron], orientation: t.dir === "rtl" ? "left" : "right" })
4843
4843
  ),
4844
- ne === d - 1 && l === "after" && !t.hideNavigation && C.createElement(n.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: s[P.Nav], style: x?.[P.Nav], "aria-label": W(), onPreviousClick: Se, onNextClick: Te, previousMonth: k, nextMonth: L }),
4845
- C.createElement(
4844
+ ne === d - 1 && l === "after" && !t.hideNavigation && E.createElement(n.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: s[P.Nav], style: x?.[P.Nav], "aria-label": I(), onPreviousClick: Se, onNextClick: Te, previousMonth: k, nextMonth: A }),
4845
+ E.createElement(
4846
4846
  n.MonthGrid,
4847
- { role: "grid", "aria-multiselectable": u === "multiple" || u === "range", "aria-label": A(I.date, o.options, o) || void 0, className: s[P.MonthGrid], style: x?.[P.MonthGrid] },
4848
- !t.hideWeekdays && C.createElement(
4847
+ { role: "grid", "aria-multiselectable": u === "multiple" || u === "range", "aria-label": W(F.date, o.options, o) || void 0, className: s[P.MonthGrid], style: x?.[P.MonthGrid] },
4848
+ !t.hideWeekdays && E.createElement(
4849
4849
  n.Weekdays,
4850
4850
  { "data-animated-weekdays": t.animate ? "true" : void 0, className: s[P.Weekdays], style: x?.[P.Weekdays] },
4851
- $ && C.createElement(n.WeekNumberHeader, { "aria-label": xe(o.options), className: s[P.WeekNumberHeader], style: x?.[P.WeekNumberHeader], scope: "col" }, R()),
4852
- rt.map((Fe, An) => C.createElement(n.Weekday, { "aria-label": U(Fe, o.options, o), className: s[P.Weekday], key: An, style: x?.[P.Weekday], scope: "col" }, E(Fe, o.options, o)))
4851
+ $ && E.createElement(n.WeekNumberHeader, { "aria-label": xe(o.options), className: s[P.WeekNumberHeader], style: x?.[P.WeekNumberHeader], scope: "col" }, R()),
4852
+ rt.map((Fe, An) => E.createElement(n.Weekday, { "aria-label": U(Fe, o.options, o), className: s[P.Weekday], key: An, style: x?.[P.Weekday], scope: "col" }, C(Fe, o.options, o)))
4853
4853
  ),
4854
- C.createElement(n.Weeks, { "data-animated-weeks": t.animate ? "true" : void 0, className: s[P.Weeks], style: x?.[P.Weeks] }, I.weeks.map((Fe, An) => C.createElement(
4854
+ E.createElement(n.Weeks, { "data-animated-weeks": t.animate ? "true" : void 0, className: s[P.Weeks], style: x?.[P.Weeks] }, F.weeks.map((Fe, An) => E.createElement(
4855
4855
  n.Week,
4856
4856
  { className: s[P.Week], key: Fe.weekNumber, style: x?.[P.Week], week: Fe },
4857
- $ && C.createElement(n.WeekNumber, { week: Fe, style: x?.[P.WeekNumber], "aria-label": We(Fe.weekNumber, {
4857
+ $ && E.createElement(n.WeekNumber, { week: Fe, style: x?.[P.WeekNumber], "aria-label": We(Fe.weekNumber, {
4858
4858
  locale: a
4859
- }), className: s[P.WeekNumber], scope: "row", role: "rowheader" }, T(Fe.weekNumber, o)),
4859
+ }), className: s[P.WeekNumber], scope: "row", role: "rowheader" }, O(Fe.weekNumber, o)),
4860
4860
  Fe.days.map((me) => {
4861
4861
  const { date: Ve } = me, X = ve(me);
4862
4862
  if (X[re.focused] = !X.hidden && !!be?.isEqualTo(me), X[qe.selected] = ze?.(Ve) || X.selected, No(ye)) {
@@ -4864,14 +4864,14 @@ function om(e) {
4864
4864
  X[qe.range_start] = !!($r && Sr && o.isSameDay(Ve, $r)), X[qe.range_end] = !!($r && Sr && o.isSameDay(Ve, Sr)), X[qe.range_middle] = it(ye, Ve, !0, o);
4865
4865
  }
4866
4866
  const Xc = wh(X, x, t.modifiersStyles), Zc = Pp(X, s, t.modifiersClassNames), Gc = !Ie && !X.hidden ? At(Ve, X, o.options, o) : void 0;
4867
- return C.createElement(n.Day, { key: `${o.format(Ve, "yyyy-MM-dd")}_${o.format(me.displayMonth, "yyyy-MM")}`, day: me, modifiers: X, className: Zc.join(" "), style: Xc, role: "gridcell", "aria-selected": X.selected || void 0, "aria-label": Gc, "data-day": o.format(Ve, "yyyy-MM-dd"), "data-month": me.outside ? o.format(Ve, "yyyy-MM") : void 0, "data-selected": X.selected || void 0, "data-disabled": X.disabled || void 0, "data-hidden": X.hidden || void 0, "data-outside": me.outside || void 0, "data-focused": X.focused || void 0, "data-today": X.today || void 0 }, !X.hidden && Ie ? C.createElement(n.DayButton, { className: s[P.DayButton], style: x?.[P.DayButton], type: "button", day: me, modifiers: X, disabled: X.disabled || void 0, tabIndex: Ue(me) ? 0 : -1, "aria-label": Lt(Ve, X, o.options, o), onClick: Ln(me, X), onBlur: Ic(me, X), onFocus: Wc(me, X), onKeyDown: Fc(me, X), onMouseEnter: jc(me, X), onMouseLeave: Yc(me, X) }, S(Ve, o.options, o)) : !X.hidden && S(me.date, o.options, o));
4867
+ return E.createElement(n.Day, { key: `${o.format(Ve, "yyyy-MM-dd")}_${o.format(me.displayMonth, "yyyy-MM")}`, day: me, modifiers: X, className: Zc.join(" "), style: Xc, role: "gridcell", "aria-selected": X.selected || void 0, "aria-label": Gc, "data-day": o.format(Ve, "yyyy-MM-dd"), "data-month": me.outside ? o.format(Ve, "yyyy-MM") : void 0, "data-selected": X.selected || void 0, "data-disabled": X.disabled || void 0, "data-hidden": X.hidden || void 0, "data-outside": me.outside || void 0, "data-focused": X.focused || void 0, "data-today": X.today || void 0 }, !X.hidden && Ie ? E.createElement(n.DayButton, { className: s[P.DayButton], style: x?.[P.DayButton], type: "button", day: me, modifiers: X, disabled: X.disabled || void 0, tabIndex: Ue(me) ? 0 : -1, "aria-label": Lt(Ve, X, o.options, o), onClick: Ln(me, X), onBlur: Ic(me, X), onFocus: Wc(me, X), onKeyDown: Fc(me, X), onMouseEnter: jc(me, X), onMouseLeave: Yc(me, X) }, M(Ve, o.options, o)) : !X.hidden && M(me.date, o.options, o));
4868
4868
  })
4869
4869
  )))
4870
4870
  )
4871
4871
  );
4872
4872
  })
4873
4873
  ),
4874
- t.footer && C.createElement(n.Footer, { className: s[P.Footer], style: x?.[P.Footer], role: "status", "aria-live": "polite" }, t.footer)
4874
+ t.footer && E.createElement(n.Footer, { className: s[P.Footer], style: x?.[P.Footer], role: "status", "aria-live": "polite" }, t.footer)
4875
4875
  )
4876
4876
  );
4877
4877
  }
@@ -6022,11 +6022,11 @@ const bv = /* @__PURE__ */ gv(yv), wv = {
6022
6022
  negative: y = !1,
6023
6023
  ...h
6024
6024
  }, g) => {
6025
- const w = ss(), b = h.id ?? w, _ = (Y) => e ? `${e}-${Y}` : void 0, $ = m && !a, x = s ? `${b}-helper-text` : void 0, M = [p].filter((Y) => !!Y), S = (typeof h.value == "number" ? h.value !== void 0 : h.value?.length) && !h.disabled && !h.readOnly && !l && d && n, O = _v(null), T = (Y) => {
6026
- O.current = Y, typeof g == "function" ? g(Y) : g && (g.current = Y);
6025
+ const b = ss(), w = h.id ?? b, _ = (B) => e ? `${e}-${B}` : void 0, $ = m && !a, x = s ? `${w}-helper-text` : void 0, S = [p].filter((B) => !!B), M = (typeof h.value == "number" ? h.value !== void 0 : h.value?.length) && !h.disabled && !h.readOnly && !l && d && n, D = _v(null), O = (B) => {
6026
+ D.current = B, typeof g == "function" ? g(B) : g && (g.current = B);
6027
6027
  }, R = () => {
6028
- d?.(), O.current?.focus();
6029
- }, E = [
6028
+ d?.(), D.current?.focus();
6029
+ }, C = [
6030
6030
  l && /* @__PURE__ */ v(
6031
6031
  vu,
6032
6032
  {
@@ -6037,7 +6037,7 @@ const bv = /* @__PURE__ */ gv(yv), wv = {
6037
6037
  },
6038
6038
  "spinner"
6039
6039
  ),
6040
- S && /* @__PURE__ */ v(
6040
+ M && /* @__PURE__ */ v(
6041
6041
  du,
6042
6042
  {
6043
6043
  negative: y,
@@ -6061,11 +6061,11 @@ const bv = /* @__PURE__ */ gv(yv), wv = {
6061
6061
  },
6062
6062
  "valid-icon"
6063
6063
  )
6064
- ].filter((Y) => !!Y), J = ot(`${ce}__input-container`, {
6065
- [`${ce}__input-container--start-adornment`]: M.length,
6066
- [`${ce}__input-container--end-adornment`]: E.length || o,
6064
+ ].filter((B) => !!B), J = ot(`${ce}__input-container`, {
6065
+ [`${ce}__input-container--start-adornment`]: S.length,
6066
+ [`${ce}__input-container--end-adornment`]: C.length || o,
6067
6067
  [`${ce}__input-container--disabled`]: h.disabled,
6068
- [`${ce}__input-container--has-clear-button`]: S,
6068
+ [`${ce}__input-container--has-clear-button`]: M,
6069
6069
  [`${ce}__input-container--readonly`]: h.readOnly && !h.disabled,
6070
6070
  [`${ce}__input-container--negative`]: y
6071
6071
  });
@@ -6073,7 +6073,7 @@ const bv = /* @__PURE__ */ gv(yv), wv = {
6073
6073
  u && /* @__PURE__ */ Q(
6074
6074
  sv,
6075
6075
  {
6076
- htmlFor: b,
6076
+ htmlFor: w,
6077
6077
  className: ot(`${ce}__label`),
6078
6078
  "data-testid": _("label"),
6079
6079
  disabled: h.disabled,
@@ -6087,20 +6087,20 @@ const bv = /* @__PURE__ */ gv(yv), wv = {
6087
6087
  /* @__PURE__ */ Q("div", { className: ot(`${ce}__field-row`), children: [
6088
6088
  !!r && r,
6089
6089
  /* @__PURE__ */ Q("div", { className: J, children: [
6090
- !!M.length && /* @__PURE__ */ v(
6090
+ !!S.length && /* @__PURE__ */ v(
6091
6091
  "div",
6092
6092
  {
6093
6093
  "data-testid": _("start-adornments"),
6094
6094
  className: ot(`${ce}__adornment-container`),
6095
- children: M
6095
+ children: S
6096
6096
  }
6097
6097
  ),
6098
6098
  /* @__PURE__ */ v(
6099
6099
  "input",
6100
6100
  {
6101
6101
  ...h,
6102
- id: b,
6103
- ref: T,
6102
+ id: w,
6103
+ ref: O,
6104
6104
  "data-testid": _("input"),
6105
6105
  "aria-describedby": h["aria-describedby"] || x,
6106
6106
  "aria-invalid": h["aria-invalid"] || !!a,
@@ -6122,13 +6122,13 @@ const bv = /* @__PURE__ */ gv(yv), wv = {
6122
6122
  })
6123
6123
  }
6124
6124
  ),
6125
- (!!E.length || o) && /* @__PURE__ */ Q(
6125
+ (!!C.length || o) && /* @__PURE__ */ Q(
6126
6126
  "div",
6127
6127
  {
6128
6128
  "data-testid": _("end-adornments"),
6129
6129
  className: ot(`${ce}__adornment-container`),
6130
6130
  children: [
6131
- E,
6131
+ C,
6132
6132
  o
6133
6133
  ]
6134
6134
  }
@@ -8733,8 +8733,7 @@ let nb = class extends z {
8733
8733
  );
8734
8734
  }
8735
8735
  incompatibleTokens = ["t", "T", "X"];
8736
- };
8737
- class mb extends z {
8736
+ }, mb = class extends z {
8738
8737
  priority = 40;
8739
8738
  parse(t) {
8740
8739
  return Ou(t);
@@ -8743,8 +8742,7 @@ class mb extends z {
8743
8742
  return [he(t, r * 1e3), { timestampIsSet: !0 }];
8744
8743
  }
8745
8744
  incompatibleTokens = "*";
8746
- }
8747
- let gb = class extends z {
8745
+ }, gb = class extends z {
8748
8746
  priority = 20;
8749
8747
  parse(t) {
8750
8748
  return Ou(t);
@@ -8793,32 +8791,32 @@ function Sb(e, t, n, r) {
8793
8791
  weekStartsOn: c,
8794
8792
  locale: a
8795
8793
  }, l = [new Py(r?.in, n)], d = t.match(bb).map((g) => {
8796
- const w = g[0];
8797
- if (w in ho) {
8798
- const b = ho[w];
8799
- return b(g, a.formatLong);
8794
+ const b = g[0];
8795
+ if (b in ho) {
8796
+ const w = ho[b];
8797
+ return w(g, a.formatLong);
8800
8798
  }
8801
8799
  return g;
8802
8800
  }).join("").match(yb), p = [];
8803
8801
  for (let g of d) {
8804
8802
  Cu(g) && mo(g, t, e), Eu(g) && mo(g, t, e);
8805
- const w = g[0], b = vb[w];
8806
- if (b) {
8807
- const { incompatibleTokens: _ } = b;
8803
+ const b = g[0], w = vb[b];
8804
+ if (w) {
8805
+ const { incompatibleTokens: _ } = w;
8808
8806
  if (Array.isArray(_)) {
8809
8807
  const x = p.find(
8810
- (M) => _.includes(M.token) || M.token === w
8808
+ (S) => _.includes(S.token) || S.token === b
8811
8809
  );
8812
8810
  if (x)
8813
8811
  throw new RangeError(
8814
8812
  `The format string mustn't contain \`${x.fullToken}\` and \`${g}\` at the same time`
8815
8813
  );
8816
- } else if (b.incompatibleTokens === "*" && p.length > 0)
8814
+ } else if (w.incompatibleTokens === "*" && p.length > 0)
8817
8815
  throw new RangeError(
8818
8816
  `The format string mustn't contain \`${g}\` and any other token at the same time`
8819
8817
  );
8820
- p.push({ token: w, fullToken: g });
8821
- const $ = b.run(
8818
+ p.push({ token: b, fullToken: g });
8819
+ const $ = w.run(
8822
8820
  e,
8823
8821
  g,
8824
8822
  a.match,
@@ -8828,11 +8826,11 @@ function Sb(e, t, n, r) {
8828
8826
  return i();
8829
8827
  l.push($.setter), e = $.rest;
8830
8828
  } else {
8831
- if (w.match($b))
8829
+ if (b.match($b))
8832
8830
  throw new RangeError(
8833
- "Format string contains an unescaped latin alphabet character `" + w + "`"
8831
+ "Format string contains an unescaped latin alphabet character `" + b + "`"
8834
8832
  );
8835
- if (g === "''" ? g = "'" : w === "'" && (g = Mb(g)), e.indexOf(g) === 0)
8833
+ if (g === "''" ? g = "'" : b === "'" && (g = Mb(g)), e.indexOf(g) === 0)
8836
8834
  e = e.slice(g.length);
8837
8835
  else
8838
8836
  return i();
@@ -8840,8 +8838,8 @@ function Sb(e, t, n, r) {
8840
8838
  }
8841
8839
  if (e.length > 0 && xb.test(e))
8842
8840
  return i();
8843
- const m = l.map((g) => g.priority).sort((g, w) => w - g).filter((g, w, b) => b.indexOf(g) === w).map(
8844
- (g) => l.filter((w) => w.priority === g).sort((w, b) => b.subPriority - w.subPriority)
8841
+ const m = l.map((g) => g.priority).sort((g, b) => b - g).filter((g, b, w) => w.indexOf(g) === b).map(
8842
+ (g) => l.filter((b) => b.priority === g).sort((b, w) => w.subPriority - b.subPriority)
8845
8843
  ).map((g) => g[0]);
8846
8844
  let y = pe(n, r?.in);
8847
8845
  if (isNaN(+y)) return i();
@@ -8849,8 +8847,8 @@ function Sb(e, t, n, r) {
8849
8847
  for (const g of m) {
8850
8848
  if (!g.validate(y, u))
8851
8849
  return i();
8852
- const w = g.set(y, h, u);
8853
- Array.isArray(w) ? (y = w[0], Object.assign(h, w[1])) : y = w;
8850
+ const b = g.set(y, h, u);
8851
+ Array.isArray(b) ? (y = b[0], Object.assign(h, b[1])) : y = b;
8854
8852
  }
8855
8853
  return y;
8856
8854
  }
@@ -8878,12 +8876,12 @@ const kb = {
8878
8876
  if (u.current) {
8879
8877
  const g = window.document.querySelector(
8880
8878
  `label[for="${u.current.id}"]`
8881
- ), w = g ? g.offsetHeight + 4 : 0, b = window.getComputedStyle(u.current);
8879
+ ), b = g ? g.offsetHeight + 4 : 0, w = window.getComputedStyle(u.current);
8882
8880
  p({
8883
8881
  position: "absolute",
8884
- top: u.current.offsetTop + w,
8882
+ top: u.current.offsetTop + b,
8885
8883
  left: u.current.offsetLeft,
8886
- padding: b.padding,
8884
+ padding: w.padding,
8887
8885
  width: u.current.offsetWidth,
8888
8886
  height: u.current.offsetHeight
8889
8887
  });
@@ -8892,23 +8890,23 @@ const kb = {
8892
8890
  const m = (g) => {
8893
8891
  if (g.length === 0 && r?.(void 0), g.length !== Hr.length)
8894
8892
  return;
8895
- const w = Eb(g);
8896
- xu(w) && r?.(w);
8893
+ const b = Eb(g);
8894
+ xu(b) && r?.(b);
8897
8895
  }, y = (g) => {
8898
- const w = g.target.value.replace(/\D/g, "");
8899
- let b = "";
8900
- w.length > 0 && (b += w.slice(0, 4)), w.length > 4 && (b += "-" + w.slice(4, 6)), w.length > 6 && (b += "-" + w.slice(6, 8)), c(b), m(g.target.value);
8901
- }, h = () => Hr.split("").map((g, w) => {
8902
- const b = s[w];
8896
+ const b = g.target.value.replace(/\D/g, "");
8897
+ let w = "";
8898
+ b.length > 0 && (w += b.slice(0, 4)), b.length > 4 && (w += "-" + b.slice(4, 6)), b.length > 6 && (w += "-" + b.slice(6, 8)), c(w), m(g.target.value);
8899
+ }, h = () => Hr.split("").map((g, b) => {
8900
+ const w = s[b];
8903
8901
  return /* @__PURE__ */ v(
8904
8902
  "span",
8905
8903
  {
8906
8904
  style: {
8907
- color: b ? "transparent" : "var(--purpur-color-text-weak)"
8905
+ color: w ? "transparent" : "var(--purpur-color-text-weak)"
8908
8906
  },
8909
- children: b || g
8907
+ children: w || g
8910
8908
  },
8911
- w
8909
+ b
8912
8910
  );
8913
8911
  });
8914
8912
  return /* @__PURE__ */ Q("div", { className: Br(`${qr}__container`), children: [
@@ -9179,15 +9177,15 @@ var zb = "DismissableLayer", vo = "dismissableLayer.update", Ub = "dismissableLa
9179
9177
  onInteractOutside: a,
9180
9178
  onDismiss: s,
9181
9179
  ...c
9182
- } = e, u = f.useContext(Wu), [l, d] = f.useState(null), p = l?.ownerDocument ?? globalThis?.document, [, m] = f.useState({}), y = Oe(t, (S) => d(S)), h = Array.from(u.layers), [g] = [...u.layersWithOutsidePointerEventsDisabled].slice(-1), w = h.indexOf(g), b = l ? h.indexOf(l) : -1, _ = u.layersWithOutsidePointerEventsDisabled.size > 0, $ = b >= w, x = Gb((S) => {
9183
- const O = S.target, T = [...u.branches].some((R) => R.contains(O));
9184
- !$ || T || (i?.(S), a?.(S), S.defaultPrevented || s?.());
9185
- }, p), M = Kb((S) => {
9186
- const O = S.target;
9187
- [...u.branches].some((T) => T.contains(O)) || (o?.(S), a?.(S), S.defaultPrevented || s?.());
9180
+ } = e, u = f.useContext(Wu), [l, d] = f.useState(null), p = l?.ownerDocument ?? globalThis?.document, [, m] = f.useState({}), y = Oe(t, (M) => d(M)), h = Array.from(u.layers), [g] = [...u.layersWithOutsidePointerEventsDisabled].slice(-1), b = h.indexOf(g), w = l ? h.indexOf(l) : -1, _ = u.layersWithOutsidePointerEventsDisabled.size > 0, $ = w >= b, x = Gb((M) => {
9181
+ const D = M.target, O = [...u.branches].some((R) => R.contains(D));
9182
+ !$ || O || (i?.(M), a?.(M), M.defaultPrevented || s?.());
9183
+ }, p), S = Kb((M) => {
9184
+ const D = M.target;
9185
+ [...u.branches].some((O) => O.contains(D)) || (o?.(M), a?.(M), M.defaultPrevented || s?.());
9188
9186
  }, p);
9189
- return Hb((S) => {
9190
- b === u.layers.size - 1 && (r?.(S), !S.defaultPrevented && s && (S.preventDefault(), s()));
9187
+ return Hb((M) => {
9188
+ w === u.layers.size - 1 && (r?.(M), !M.defaultPrevented && s && (M.preventDefault(), s()));
9191
9189
  }, p), f.useEffect(() => {
9192
9190
  if (l)
9193
9191
  return n && (u.layersWithOutsidePointerEventsDisabled.size === 0 && (Ma = p.body.style.pointerEvents, p.body.style.pointerEvents = "none"), u.layersWithOutsidePointerEventsDisabled.add(l)), u.layers.add(l), ka(), () => {
@@ -9196,8 +9194,8 @@ var zb = "DismissableLayer", vo = "dismissableLayer.update", Ub = "dismissableLa
9196
9194
  }, [l, p, n, u]), f.useEffect(() => () => {
9197
9195
  l && (u.layers.delete(l), u.layersWithOutsidePointerEventsDisabled.delete(l), ka());
9198
9196
  }, [l, u]), f.useEffect(() => {
9199
- const S = () => m({});
9200
- return document.addEventListener(vo, S), () => document.removeEventListener(vo, S);
9197
+ const M = () => m({});
9198
+ return document.addEventListener(vo, M), () => document.removeEventListener(vo, M);
9201
9199
  }, []), /* @__PURE__ */ v(
9202
9200
  $e.div,
9203
9201
  {
@@ -9207,8 +9205,8 @@ var zb = "DismissableLayer", vo = "dismissableLayer.update", Ub = "dismissableLa
9207
9205
  pointerEvents: _ ? $ ? "auto" : "none" : void 0,
9208
9206
  ...e.style
9209
9207
  },
9210
- onFocusCapture: _e(e.onFocusCapture, M.onFocusCapture),
9211
- onBlurCapture: _e(e.onBlurCapture, M.onBlurCapture),
9208
+ onFocusCapture: _e(e.onFocusCapture, S.onFocusCapture),
9209
+ onBlurCapture: _e(e.onBlurCapture, S.onBlurCapture),
9212
9210
  onPointerDownCapture: _e(
9213
9211
  e.onPointerDownCapture,
9214
9212
  x.onPointerDownCapture
@@ -9307,15 +9305,15 @@ var Ur = "focusScope.autoFocusOnMount", Vr = "focusScope.autoFocusOnUnmount", Ea
9307
9305
  if (m.paused || !s) return;
9308
9306
  const $ = _.relatedTarget;
9309
9307
  $ !== null && (s.contains($) || bt(d.current, { select: !0 }));
9310
- }, w = function(_) {
9308
+ }, b = function(_) {
9311
9309
  if (document.activeElement === document.body)
9312
9310
  for (const $ of _)
9313
9311
  $.removedNodes.length > 0 && bt(s);
9314
9312
  };
9315
9313
  document.addEventListener("focusin", h), document.addEventListener("focusout", g);
9316
- const b = new MutationObserver(w);
9317
- return s && b.observe(s, { childList: !0, subtree: !0 }), () => {
9318
- document.removeEventListener("focusin", h), document.removeEventListener("focusout", g), b.disconnect();
9314
+ const w = new MutationObserver(b);
9315
+ return s && w.observe(s, { childList: !0, subtree: !0 }), () => {
9316
+ document.removeEventListener("focusin", h), document.removeEventListener("focusout", g), w.disconnect();
9319
9317
  };
9320
9318
  }
9321
9319
  }, [r, s, m.paused]), f.useEffect(() => {
@@ -9337,10 +9335,10 @@ var Ur = "focusScope.autoFocusOnMount", Vr = "focusScope.autoFocusOnUnmount", Ea
9337
9335
  const y = f.useCallback(
9338
9336
  (h) => {
9339
9337
  if (!n && !r || m.paused) return;
9340
- const g = h.key === "Tab" && !h.altKey && !h.ctrlKey && !h.metaKey, w = document.activeElement;
9341
- if (g && w) {
9342
- const b = h.currentTarget, [_, $] = ew(b);
9343
- _ && $ ? !h.shiftKey && w === $ ? (h.preventDefault(), n && bt(_, { select: !0 })) : h.shiftKey && w === _ && (h.preventDefault(), n && bt($, { select: !0 })) : w === b && h.preventDefault();
9338
+ const g = h.key === "Tab" && !h.altKey && !h.ctrlKey && !h.metaKey, b = document.activeElement;
9339
+ if (g && b) {
9340
+ const w = h.currentTarget, [_, $] = ew(w);
9341
+ _ && $ ? !h.shiftKey && b === $ ? (h.preventDefault(), n && bt(_, { select: !0 })) : h.shiftKey && b === _ && (h.preventDefault(), n && bt($, { select: !0 })) : b === w && h.preventDefault();
9344
9342
  }
9345
9343
  },
9346
9344
  [n, r, m.paused]
@@ -9642,12 +9640,12 @@ var zu = yw(), Gr = function() {
9642
9640
  onScrollCapture: Gr,
9643
9641
  onWheelCapture: Gr,
9644
9642
  onTouchMoveCapture: Gr
9645
- }), i = r[0], o = r[1], a = e.forwardProps, s = e.children, c = e.className, u = e.removeScrollBar, l = e.enabled, d = e.shards, p = e.sideCar, m = e.noRelative, y = e.noIsolation, h = e.inert, g = e.allowPinchZoom, w = e.as, b = w === void 0 ? "div" : w, _ = e.gapMode, $ = qu(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), x = p, M = mw([n, t]), S = Qe(Qe({}, $), i);
9643
+ }), i = r[0], o = r[1], a = e.forwardProps, s = e.children, c = e.className, u = e.removeScrollBar, l = e.enabled, d = e.shards, p = e.sideCar, m = e.noRelative, y = e.noIsolation, h = e.inert, g = e.allowPinchZoom, b = e.as, w = b === void 0 ? "div" : b, _ = e.gapMode, $ = qu(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), x = p, S = mw([n, t]), M = Qe(Qe({}, $), i);
9646
9644
  return f.createElement(
9647
9645
  f.Fragment,
9648
9646
  null,
9649
9647
  l && f.createElement(x, { sideCar: zu, removeScrollBar: u, shards: d, noRelative: m, noIsolation: y, inert: h, setCallbacks: o, allowPinchZoom: !!g, lockRef: n, gapMode: _ }),
9650
- a ? f.cloneElement(f.Children.only(s), Qe(Qe({}, S), { ref: M })) : f.createElement(b, Qe({}, S, { className: c, ref: M }), s)
9648
+ a ? f.cloneElement(f.Children.only(s), Qe(Qe({}, M), { ref: S })) : f.createElement(w, Qe({}, M, { className: c, ref: S }), s)
9651
9649
  );
9652
9650
  });
9653
9651
  br.defaultProps = {
@@ -9849,10 +9847,10 @@ var jt = yo ? { passive: !1 } : !1, Rw = function(e) {
9849
9847
  do {
9850
9848
  if (!s)
9851
9849
  break;
9852
- var m = Zu(e, s), y = m[0], h = m[1], g = m[2], w = h - g - o * y;
9853
- (y || w) && Xu(e, s) && (d += w, p += y);
9854
- var b = s.parentNode;
9855
- s = b && b.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? b.host : b;
9850
+ var m = Zu(e, s), y = m[0], h = m[1], g = m[2], b = h - g - o * y;
9851
+ (y || b) && Xu(e, s) && (d += b, p += y);
9852
+ var w = s.parentNode;
9853
+ s = w && w.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? w.host : w;
9856
9854
  } while (
9857
9855
  // portaled content
9858
9856
  !c && s !== document.body || // self content
@@ -9893,16 +9891,16 @@ function qw(e) {
9893
9891
  var s = f.useCallback(function(h, g) {
9894
9892
  if ("touches" in h && h.touches.length === 2 || h.type === "wheel" && h.ctrlKey)
9895
9893
  return !a.current.allowPinchZoom;
9896
- var w = Bn(h), b = n.current, _ = "deltaX" in h ? h.deltaX : b[0] - w[0], $ = "deltaY" in h ? h.deltaY : b[1] - w[1], x, M = h.target, S = Math.abs(_) > Math.abs($) ? "h" : "v";
9897
- if ("touches" in h && S === "h" && M.type === "range")
9894
+ var b = Bn(h), w = n.current, _ = "deltaX" in h ? h.deltaX : w[0] - b[0], $ = "deltaY" in h ? h.deltaY : w[1] - b[1], x, S = h.target, M = Math.abs(_) > Math.abs($) ? "h" : "v";
9895
+ if ("touches" in h && M === "h" && S.type === "range")
9898
9896
  return !1;
9899
- var O = window.getSelection(), T = O && O.anchorNode, R = T ? T === M || T.contains(M) : !1;
9897
+ var D = window.getSelection(), O = D && D.anchorNode, R = O ? O === S || O.contains(S) : !1;
9900
9898
  if (R)
9901
9899
  return !1;
9902
- var E = Pa(S, M);
9903
- if (!E)
9900
+ var C = Pa(M, S);
9901
+ if (!C)
9904
9902
  return !0;
9905
- if (E ? x = S : (x = S === "v" ? "h" : "v", E = Pa(S, M)), !E)
9903
+ if (C ? x = M : (x = M === "v" ? "h" : "v", C = Pa(M, S)), !C)
9906
9904
  return !1;
9907
9905
  if (!r.current && "changedTouches" in h && (_ || $) && (r.current = x), !x)
9908
9906
  return !0;
@@ -9911,22 +9909,22 @@ function qw(e) {
9911
9909
  }, []), c = f.useCallback(function(h) {
9912
9910
  var g = h;
9913
9911
  if (!(!Yt.length || Yt[Yt.length - 1] !== o)) {
9914
- var w = "deltaY" in g ? La(g) : Bn(g), b = t.current.filter(function(x) {
9915
- return x.name === g.type && (x.target === g.target || g.target === x.shadowParent) && jw(x.delta, w);
9912
+ var b = "deltaY" in g ? La(g) : Bn(g), w = t.current.filter(function(x) {
9913
+ return x.name === g.type && (x.target === g.target || g.target === x.shadowParent) && jw(x.delta, b);
9916
9914
  })[0];
9917
- if (b && b.should) {
9915
+ if (w && w.should) {
9918
9916
  g.cancelable && g.preventDefault();
9919
9917
  return;
9920
9918
  }
9921
- if (!b) {
9919
+ if (!w) {
9922
9920
  var _ = (a.current.shards || []).map(Aa).filter(Boolean).filter(function(x) {
9923
9921
  return x.contains(g.target);
9924
9922
  }), $ = _.length > 0 ? s(g, _[0]) : !a.current.noIsolation;
9925
9923
  $ && g.cancelable && g.preventDefault();
9926
9924
  }
9927
9925
  }
9928
- }, []), u = f.useCallback(function(h, g, w, b) {
9929
- var _ = { name: h, delta: g, target: w, should: b, shadowParent: Hw(w) };
9926
+ }, []), u = f.useCallback(function(h, g, b, w) {
9927
+ var _ = { name: h, delta: g, target: b, should: w, shadowParent: Hw(b) };
9930
9928
  t.current.push(_), setTimeout(function() {
9931
9929
  t.current = t.current.filter(function($) {
9932
9930
  return $ !== _;
@@ -9999,8 +9997,8 @@ var Uw = function(e) {
9999
9997
  try {
10000
9998
  var m = p.getAttribute(r), y = m !== null && m !== "false", h = (Bt.get(p) || 0) + 1, g = (o.get(p) || 0) + 1;
10001
9999
  Bt.set(p, h), o.set(p, g), a.push(p), h === 1 && y && qn.set(p, !0), g === 1 && p.setAttribute(n, "true"), y || p.setAttribute(r, "true");
10002
- } catch (w) {
10003
- console.error("aria-hidden: cannot operate on ", p, w);
10000
+ } catch (b) {
10001
+ console.error("aria-hidden: cannot operate on ", p, b);
10004
10002
  }
10005
10003
  });
10006
10004
  };
@@ -10218,7 +10216,7 @@ dc.displayName = lc;
10218
10216
  function jo(e) {
10219
10217
  return e ? "open" : "closed";
10220
10218
  }
10221
- var fc = "DialogTitleWarning", [U_, pc] = Db(fc, {
10219
+ var fc = "DialogTitleWarning", [V_, pc] = Db(fc, {
10222
10220
  contentName: Rt,
10223
10221
  titleName: Fo,
10224
10222
  docsSlug: "dialog"
@@ -10362,7 +10360,7 @@ const k1 = {
10362
10360
  onSwipeEnd: o,
10363
10361
  ...a
10364
10362
  }, s) => {
10365
- const c = D1([O1, t]), u = C.useRef(null), l = C.useRef(null), { onPointerDown: d, onPointerMove: p, onPointerUp: m } = C1(
10363
+ const c = D1([O1, t]), u = E.useRef(null), l = E.useRef(null), { onPointerDown: d, onPointerMove: p, onPointerUp: m } = C1(
10366
10364
  l,
10367
10365
  u,
10368
10366
  n,
@@ -10867,23 +10865,24 @@ const Ja = ({ asChild: e, children: t, ...n }) => /* @__PURE__ */ v(y0, { asChil
10867
10865
  closeButtonAriaLabel: o,
10868
10866
  headerContent: a,
10869
10867
  onBackButtonClick: s,
10870
- title: c,
10871
- ...u
10872
- }, l) => {
10873
- const d = qt([yt, i]), p = !!(t && n && s);
10874
- return /* @__PURE__ */ Q("div", { className: d, "data-testid": e, ref: l, ...u, children: [
10868
+ onCloseClick: c,
10869
+ title: u,
10870
+ ...l
10871
+ }, d) => {
10872
+ const p = qt([yt, i]), m = !!(t && n && s), y = c ? E.Fragment : d1;
10873
+ return /* @__PURE__ */ Q("div", { className: p, "data-testid": e, ref: d, ...l, children: [
10875
10874
  /* @__PURE__ */ Q(
10876
10875
  "div",
10877
10876
  {
10878
10877
  className: qt([
10879
10878
  `${yt}__row`,
10880
10879
  {
10881
- [`${yt}__row--with-back-button`]: p
10880
+ [`${yt}__row--with-back-button`]: m
10882
10881
  }
10883
10882
  ]),
10884
10883
  "data-testid": `${e}-row`,
10885
10884
  children: [
10886
- /* @__PURE__ */ v("div", { className: qt(`${yt}__left`), children: p ? /* @__PURE__ */ Q(
10885
+ /* @__PURE__ */ v("div", { className: qt(`${yt}__left`), children: m ? /* @__PURE__ */ Q(
10887
10886
  bo,
10888
10887
  {
10889
10888
  "aria-label": r ? n : "",
@@ -10905,7 +10904,7 @@ const Ja = ({ asChild: e, children: t, ...n }) => /* @__PURE__ */ v(y0, { asChil
10905
10904
  }
10906
10905
  ) : a ? /* @__PURE__ */ Q(Tt, { children: [
10907
10906
  a,
10908
- /* @__PURE__ */ v(Ja, { asChild: !0, children: /* @__PURE__ */ v(zn, { children: c }) })
10907
+ /* @__PURE__ */ v(Ja, { asChild: !0, children: /* @__PURE__ */ v(zn, { children: u }) })
10909
10908
  ] }) : /* @__PURE__ */ v(zn, { asChild: !0, children: /* @__PURE__ */ v(
10910
10909
  wo,
10911
10910
  {
@@ -10913,15 +10912,16 @@ const Ja = ({ asChild: e, children: t, ...n }) => /* @__PURE__ */ v(y0, { asChil
10913
10912
  tag: "h2",
10914
10913
  variant: Xa.DISPLAY10,
10915
10914
  tabIndex: -1,
10916
- children: c
10915
+ children: u
10917
10916
  }
10918
10917
  ) }) }),
10919
- /* @__PURE__ */ v("div", { className: qt(`${yt}__right`), children: /* @__PURE__ */ v(d1, { asChild: !0, children: /* @__PURE__ */ v(
10918
+ /* @__PURE__ */ v("div", { className: qt(`${yt}__right`), children: /* @__PURE__ */ v(y, { asChild: !c, children: /* @__PURE__ */ v(
10920
10919
  bo,
10921
10920
  {
10922
10921
  "aria-label": o,
10923
10922
  className: qt(`${yt}__close-button`),
10924
10923
  iconOnly: !0,
10924
+ onClick: c,
10925
10925
  size: "sm",
10926
10926
  variant: eo.TERTIARY_PURPLE,
10927
10927
  children: /* @__PURE__ */ v(yc, { size: "sm" })
@@ -10930,9 +10930,9 @@ const Ja = ({ asChild: e, children: t, ...n }) => /* @__PURE__ */ v(y0, { asChil
10930
10930
  ]
10931
10931
  }
10932
10932
  ),
10933
- p && (a ? /* @__PURE__ */ Q(Tt, { children: [
10933
+ m && (a ? /* @__PURE__ */ Q(Tt, { children: [
10934
10934
  a,
10935
- /* @__PURE__ */ v(Ja, { asChild: !0, children: /* @__PURE__ */ v(zn, { children: c }) })
10935
+ /* @__PURE__ */ v(Ja, { asChild: !0, children: /* @__PURE__ */ v(zn, { children: u }) })
10936
10936
  ] }) : /* @__PURE__ */ v(zn, { asChild: !0, children: /* @__PURE__ */ v(
10937
10937
  wo,
10938
10938
  {
@@ -10940,7 +10940,7 @@ const Ja = ({ asChild: e, children: t, ...n }) => /* @__PURE__ */ v(y0, { asChil
10940
10940
  tag: "h2",
10941
10941
  tabIndex: -1,
10942
10942
  variant: Xa.DISPLAY10,
10943
- children: c
10943
+ children: u
10944
10944
  }
10945
10945
  ) }))
10946
10946
  ] });
@@ -10966,7 +10966,7 @@ var Bo = "ScrollArea", [_c] = Lu(Bo), [S0, Ae] = _c(Bo), xc = f.forwardRef(
10966
10966
  dir: i,
10967
10967
  scrollHideDelay: o = 600,
10968
10968
  ...a
10969
- } = e, [s, c] = f.useState(null), [u, l] = f.useState(null), [d, p] = f.useState(null), [m, y] = f.useState(null), [h, g] = f.useState(null), [w, b] = f.useState(0), [_, $] = f.useState(0), [x, M] = f.useState(!1), [S, O] = f.useState(!1), T = Oe(t, (E) => c(E)), R = _0(i);
10969
+ } = e, [s, c] = f.useState(null), [u, l] = f.useState(null), [d, p] = f.useState(null), [m, y] = f.useState(null), [h, g] = f.useState(null), [b, w] = f.useState(0), [_, $] = f.useState(0), [x, S] = f.useState(!1), [M, D] = f.useState(!1), O = Oe(t, (C) => c(C)), R = _0(i);
10970
10970
  return /* @__PURE__ */ v(
10971
10971
  S0,
10972
10972
  {
@@ -10982,23 +10982,23 @@ var Bo = "ScrollArea", [_c] = Lu(Bo), [S0, Ae] = _c(Bo), xc = f.forwardRef(
10982
10982
  scrollbarX: m,
10983
10983
  onScrollbarXChange: y,
10984
10984
  scrollbarXEnabled: x,
10985
- onScrollbarXEnabledChange: M,
10985
+ onScrollbarXEnabledChange: S,
10986
10986
  scrollbarY: h,
10987
10987
  onScrollbarYChange: g,
10988
- scrollbarYEnabled: S,
10989
- onScrollbarYEnabledChange: O,
10990
- onCornerWidthChange: b,
10988
+ scrollbarYEnabled: M,
10989
+ onScrollbarYEnabledChange: D,
10990
+ onCornerWidthChange: w,
10991
10991
  onCornerHeightChange: $,
10992
10992
  children: /* @__PURE__ */ v(
10993
10993
  $e.div,
10994
10994
  {
10995
10995
  dir: R,
10996
10996
  ...a,
10997
- ref: T,
10997
+ ref: O,
10998
10998
  style: {
10999
10999
  position: "relative",
11000
11000
  // Pass corner sizes as CSS vars to reduce re-renders of context consumers
11001
- "--radix-scroll-area-corner-width": w + "px",
11001
+ "--radix-scroll-area-corner-width": b + "px",
11002
11002
  "--radix-scroll-area-corner-height": _ + "px",
11003
11003
  ...e.style
11004
11004
  }
@@ -11288,20 +11288,20 @@ var M0 = f.forwardRef((e, t) => {
11288
11288
  onWheelScroll: l,
11289
11289
  onResize: d,
11290
11290
  ...p
11291
- } = e, m = Ae(nt, n), [y, h] = f.useState(null), g = Oe(t, (T) => h(T)), w = f.useRef(null), b = f.useRef(""), _ = m.viewport, $ = r.content - r.viewport, x = Re(l), M = Re(c), S = xr(d, 10);
11292
- function O(T) {
11293
- if (w.current) {
11294
- const R = T.clientX - w.current.left, E = T.clientY - w.current.top;
11295
- u({ x: R, y: E });
11291
+ } = e, m = Ae(nt, n), [y, h] = f.useState(null), g = Oe(t, (O) => h(O)), b = f.useRef(null), w = f.useRef(""), _ = m.viewport, $ = r.content - r.viewport, x = Re(l), S = Re(c), M = xr(d, 10);
11292
+ function D(O) {
11293
+ if (b.current) {
11294
+ const R = O.clientX - b.current.left, C = O.clientY - b.current.top;
11295
+ u({ x: R, y: C });
11296
11296
  }
11297
11297
  }
11298
11298
  return f.useEffect(() => {
11299
- const T = (R) => {
11300
- const E = R.target;
11301
- y?.contains(E) && x(R, $);
11299
+ const O = (R) => {
11300
+ const C = R.target;
11301
+ y?.contains(C) && x(R, $);
11302
11302
  };
11303
- return document.addEventListener("wheel", T, { passive: !1 }), () => document.removeEventListener("wheel", T, { passive: !1 });
11304
- }, [_, y, $, x]), f.useEffect(M, [r, M]), an(y, S), an(m.content, S), /* @__PURE__ */ v(
11303
+ return document.addEventListener("wheel", O, { passive: !1 }), () => document.removeEventListener("wheel", O, { passive: !1 });
11304
+ }, [_, y, $, x]), f.useEffect(S, [r, S]), an(y, M), an(m.content, M), /* @__PURE__ */ v(
11305
11305
  D0,
11306
11306
  {
11307
11307
  scope: n,
@@ -11309,7 +11309,7 @@ var M0 = f.forwardRef((e, t) => {
11309
11309
  hasThumb: i,
11310
11310
  onThumbChange: Re(o),
11311
11311
  onThumbPointerUp: Re(a),
11312
- onThumbPositionChange: M,
11312
+ onThumbPositionChange: S,
11313
11313
  onThumbPointerDown: Re(s),
11314
11314
  children: /* @__PURE__ */ v(
11315
11315
  $e.div,
@@ -11317,13 +11317,13 @@ var M0 = f.forwardRef((e, t) => {
11317
11317
  ...p,
11318
11318
  ref: g,
11319
11319
  style: { position: "absolute", ...p.style },
11320
- onPointerDown: _e(e.onPointerDown, (T) => {
11321
- T.button === 0 && (T.target.setPointerCapture(T.pointerId), w.current = y.getBoundingClientRect(), b.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", m.viewport && (m.viewport.style.scrollBehavior = "auto"), O(T));
11320
+ onPointerDown: _e(e.onPointerDown, (O) => {
11321
+ O.button === 0 && (O.target.setPointerCapture(O.pointerId), b.current = y.getBoundingClientRect(), w.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", m.viewport && (m.viewport.style.scrollBehavior = "auto"), D(O));
11322
11322
  }),
11323
- onPointerMove: _e(e.onPointerMove, O),
11324
- onPointerUp: _e(e.onPointerUp, (T) => {
11325
- const R = T.target;
11326
- R.hasPointerCapture(T.pointerId) && R.releasePointerCapture(T.pointerId), document.body.style.webkitUserSelect = b.current, m.viewport && (m.viewport.style.scrollBehavior = ""), w.current = null;
11323
+ onPointerMove: _e(e.onPointerMove, D),
11324
+ onPointerUp: _e(e.onPointerUp, (O) => {
11325
+ const R = O.target;
11326
+ R.hasPointerCapture(O.pointerId) && R.releasePointerCapture(O.pointerId), document.body.style.webkitUserSelect = w.current, m.viewport && (m.viewport.style.scrollBehavior = ""), b.current = null;
11327
11327
  })
11328
11328
  }
11329
11329
  )
@@ -11514,35 +11514,36 @@ const zt = cn.bind(k1), Me = "purpur-drawer-frame", Rc = De(
11514
11514
  footerContent: c,
11515
11515
  headerContent: u,
11516
11516
  onBackButtonClick: l,
11517
- onSwipeStart: d,
11518
- onSwipeMove: p,
11519
- onSwipeCancel: m,
11520
- onSwipeEnd: y,
11521
- title: h,
11522
- stickyFooter: g,
11517
+ onCloseClick: d,
11518
+ onSwipeStart: p,
11519
+ onSwipeMove: m,
11520
+ onSwipeCancel: y,
11521
+ onSwipeEnd: h,
11522
+ title: g,
11523
+ stickyFooter: b,
11523
11524
  position: w = "right",
11524
- ...b
11525
- }, _) => {
11526
- const $ = !!(t && n && l), x = zt([
11525
+ ..._
11526
+ }, $) => {
11527
+ const x = !!(t && n && l), S = zt([
11527
11528
  Me,
11528
11529
  {
11529
11530
  [`${Me}--fit-to-content`]: s,
11530
- [`${Me}--sticky-footer`]: g,
11531
+ [`${Me}--sticky-footer`]: b,
11531
11532
  [`${Me}--left`]: w === "left",
11532
11533
  [`${Me}--right`]: w === "right",
11533
- [`${Me}--without-back-button`]: !$,
11534
- [`${Me}--with-back-button`]: $
11534
+ [`${Me}--without-back-button`]: !x,
11535
+ [`${Me}--with-back-button`]: x
11535
11536
  },
11536
11537
  o
11537
11538
  ]);
11538
- return /* @__PURE__ */ Q("div", { className: x, "data-testid": e, ref: _, ...b, children: [
11539
+ return /* @__PURE__ */ Q("div", { className: S, "data-testid": e, ref: $, ..._, children: [
11539
11540
  /* @__PURE__ */ v(
11540
11541
  mc,
11541
11542
  {
11542
- onSwipeStart: d,
11543
- onSwipeMove: p,
11544
- onSwipeCancel: m,
11545
- onSwipeEnd: y
11543
+ onSwipeStart: p,
11544
+ onSwipeMove: m,
11545
+ onSwipeCancel: y,
11546
+ onSwipeEnd: h
11546
11547
  }
11547
11548
  ),
11548
11549
  /* @__PURE__ */ v(
@@ -11550,22 +11551,23 @@ const zt = cn.bind(k1), Me = "purpur-drawer-frame", Rc = De(
11550
11551
  {
11551
11552
  className: zt(`${Me}__header`),
11552
11553
  variant: "header",
11553
- stickyFooter: g,
11554
+ stickyFooter: b,
11554
11555
  children: /* @__PURE__ */ v(
11555
11556
  wc,
11556
11557
  {
11557
- title: h,
11558
+ title: g,
11558
11559
  headerContent: u,
11559
11560
  backButtonOnlyIcon: r,
11560
11561
  backButton: t,
11561
11562
  backButtonText: n,
11562
11563
  closeButtonAriaLabel: a,
11563
- onBackButtonClick: l
11564
+ onBackButtonClick: l,
11565
+ onCloseClick: d
11564
11566
  }
11565
11567
  )
11566
11568
  }
11567
11569
  ),
11568
- g ? /* @__PURE__ */ Q(Tt, { children: [
11570
+ b ? /* @__PURE__ */ Q(Tt, { children: [
11569
11571
  /* @__PURE__ */ v(
11570
11572
  _o,
11571
11573
  {
@@ -11581,7 +11583,7 @@ const zt = cn.bind(k1), Me = "purpur-drawer-frame", Rc = De(
11581
11583
  className: zt(`${Me}__footer`),
11582
11584
  "data-testid": `${e}-sticky-footer`,
11583
11585
  variant: "footer",
11584
- stickyFooter: g,
11586
+ stickyFooter: b,
11585
11587
  children: c
11586
11588
  }
11587
11589
  )
@@ -11599,12 +11601,12 @@ const zt = cn.bind(k1), Me = "purpur-drawer-frame", Rc = De(
11599
11601
  { [`${Me}__content-container--no-footer`]: !c }
11600
11602
  ]),
11601
11603
  children: [
11602
- /* @__PURE__ */ v(Vt, { stickyFooter: g, children: i }),
11604
+ /* @__PURE__ */ v(Vt, { stickyFooter: b, children: i }),
11603
11605
  c && /* @__PURE__ */ v(
11604
11606
  Vt,
11605
11607
  {
11606
11608
  "data-testid": `${e}-footer`,
11607
- stickyFooter: g,
11609
+ stickyFooter: b,
11608
11610
  variant: "footer",
11609
11611
  children: c
11610
11612
  }
@@ -11652,33 +11654,40 @@ const j0 = (e, t) => ({
11652
11654
  footerContent: l,
11653
11655
  headerContent: d,
11654
11656
  onBackButtonClick: p,
11655
- stickyFooter: m = !1,
11656
- title: y,
11657
- zIndex: h,
11658
- position: g = "right",
11657
+ onCloseClick: m,
11658
+ stickyFooter: y = !1,
11659
+ title: h,
11660
+ zIndex: g,
11661
+ position: b = "right",
11659
11662
  ...w
11660
- }, b) => {
11661
- const _ = bn([
11663
+ }, _) => {
11664
+ const $ = bn([
11662
11665
  kt,
11663
11666
  {
11664
11667
  [`${kt}--fit-to-content`]: u,
11665
- [`${kt}--left`]: g === "left",
11666
- [`${kt}--right`]: g === "right"
11668
+ [`${kt}--left`]: b === "left",
11669
+ [`${kt}--right`]: b === "right"
11667
11670
  },
11668
11671
  a
11669
- ]), $ = st(null), x = st(null), M = (D) => {
11670
- x.current = D, typeof b == "function" ? b(D) : b && (b.current = D);
11671
- }, S = as(hc), { onSwipeStart: O, onSwipeMove: T, onSwipeCancel: R, onSwipeEnd: E } = j0(
11672
- x,
11673
- S
11674
- ), J = (D) => {
11675
- c && D.preventDefault();
11676
- }, Y = () => {
11677
- const D = $.current;
11678
- if (D) {
11679
- const N = D.querySelector("h2");
11680
- N && setTimeout(() => {
11681
- N.focus();
11672
+ ]), x = st(null), S = st(null), M = (L) => {
11673
+ S.current = L, typeof _ == "function" ? _(L) : _ && (_.current = L);
11674
+ }, D = as(hc), { onSwipeStart: O, onSwipeMove: R, onSwipeCancel: C, onSwipeEnd: J } = j0(
11675
+ S,
11676
+ D
11677
+ ), B = (L) => {
11678
+ if (c) {
11679
+ L.preventDefault();
11680
+ return;
11681
+ }
11682
+ m && (L.preventDefault(), m());
11683
+ }, T = (L) => {
11684
+ m && (L.preventDefault(), m());
11685
+ }, N = () => {
11686
+ const L = x.current;
11687
+ if (L) {
11688
+ const q = L.querySelector("h2");
11689
+ q && setTimeout(() => {
11690
+ q.focus();
11682
11691
  });
11683
11692
  }
11684
11693
  };
@@ -11686,14 +11695,15 @@ const j0 = (e, t) => ({
11686
11695
  u1,
11687
11696
  {
11688
11697
  className: bn("purpur-drawer-overlay"),
11689
- style: h ? { zIndex: h } : void 0,
11698
+ style: g ? { zIndex: g } : void 0,
11690
11699
  "data-testid": `${e}-overlay`,
11691
11700
  children: /* @__PURE__ */ v(
11692
11701
  c1,
11693
11702
  {
11694
- onPointerDownOutside: J,
11695
- onOpenAutoFocus: Y,
11696
- className: _,
11703
+ onPointerDownOutside: B,
11704
+ onEscapeKeyDown: T,
11705
+ onOpenAutoFocus: N,
11706
+ className: $,
11697
11707
  "data-testid": e,
11698
11708
  ref: M,
11699
11709
  ...!i && { "aria-describedby": void 0 },
@@ -11709,15 +11719,16 @@ const j0 = (e, t) => ({
11709
11719
  fitToContent: u,
11710
11720
  footerContent: l,
11711
11721
  headerContent: d,
11712
- ref: $,
11722
+ ref: x,
11713
11723
  onBackButtonClick: p,
11724
+ onCloseClick: m,
11714
11725
  onSwipeStart: O,
11715
- onSwipeMove: T,
11716
- onSwipeCancel: R,
11717
- onSwipeEnd: E,
11718
- stickyFooter: m,
11719
- title: y,
11720
- position: g,
11726
+ onSwipeMove: R,
11727
+ onSwipeCancel: C,
11728
+ onSwipeEnd: J,
11729
+ stickyFooter: y,
11730
+ title: h,
11731
+ position: b,
11721
11732
  children: i ? /* @__PURE__ */ Q("div", { className: bn(`${kt}__content-container`), children: [
11722
11733
  /* @__PURE__ */ v(
11723
11734
  l1,
@@ -11750,7 +11761,7 @@ const Jt = ({
11750
11761
  open: i = !1,
11751
11762
  ...o
11752
11763
  }) => {
11753
- const [a, s] = C.useState(i), c = (u) => {
11764
+ const [a, s] = E.useState(i), c = (u) => {
11754
11765
  s(u), r?.(u);
11755
11766
  };
11756
11767
  return Dn(() => {
@@ -11879,8 +11890,8 @@ const t_ = /* @__PURE__ */ Q0(e_), n_ = {
11879
11890
  }, a) => {
11880
11891
  const [s, c] = Be(!1), [u, l] = Be(!1), [d, p] = Be(!1), m = st(null), { context: y, refs: h, floatingStyles: g } = ef({
11881
11892
  open: s,
11882
- onOpenChange: (E) => {
11883
- o.readOnly || c(E);
11893
+ onOpenChange: (C) => {
11894
+ o.readOnly || c(C);
11884
11895
  },
11885
11896
  placement: "bottom-start",
11886
11897
  middleware: [
@@ -11892,19 +11903,19 @@ const t_ = /* @__PURE__ */ Q0(e_), n_ = {
11892
11903
  Sd()
11893
11904
  ],
11894
11905
  whileElementsMounted: gd
11895
- }), w = Zd(y), b = Qd(y), { getFloatingProps: _, getReferenceProps: $ } = tf([w, b]), [x, M] = Be(n);
11906
+ }), b = Zd(y), w = Qd(y), { getFloatingProps: _, getReferenceProps: $ } = tf([b, w]), [x, S] = Be(n);
11896
11907
  Dn(() => {
11897
- M(n);
11908
+ S(n);
11898
11909
  }, [n]);
11899
- const S = (E) => {
11900
- E ? (M(E), r?.(E), (s || u) && (c(!1), l(!1))) : (M(void 0), r?.(void 0));
11901
- }, O = ss();
11910
+ const M = (C) => {
11911
+ C ? (S(C), r?.(C), (s || u) && (c(!1), l(!1))) : (S(void 0), r?.(void 0));
11912
+ }, D = ss();
11902
11913
  return Cn(() => {
11903
- const E = () => {
11914
+ const C = () => {
11904
11915
  p(window.innerWidth < 600);
11905
11916
  };
11906
- return E(), window.addEventListener("resize", E), () => {
11907
- window.removeEventListener("resize", E);
11917
+ return C(), window.addEventListener("resize", C), () => {
11918
+ window.removeEventListener("resize", C);
11908
11919
  };
11909
11920
  }, []), d ? /* @__PURE__ */ Q(Jt, { open: u, onOpenChange: l, children: [
11910
11921
  /* @__PURE__ */ v(Jt.Trigger, { children: /* @__PURE__ */ v(
@@ -11912,9 +11923,9 @@ const t_ = /* @__PURE__ */ Q0(e_), n_ = {
11912
11923
  {
11913
11924
  ...o,
11914
11925
  startAdornment: /* @__PURE__ */ v(xo, { size: "sm" }),
11915
- id: O,
11926
+ id: D,
11916
11927
  value: x,
11917
- onChange: (E) => S(E),
11928
+ onChange: (C) => M(C),
11918
11929
  "data-testid": o["data-testid"]
11919
11930
  }
11920
11931
  ) }),
@@ -11932,7 +11943,7 @@ const t_ = /* @__PURE__ */ Q0(e_), n_ = {
11932
11943
  ...e,
11933
11944
  mode: "single",
11934
11945
  selected: x,
11935
- onSelect: (E) => S(E)
11946
+ onSelect: (C) => M(C)
11936
11947
  }
11937
11948
  )
11938
11949
  }
@@ -11944,9 +11955,9 @@ const t_ = /* @__PURE__ */ Q0(e_), n_ = {
11944
11955
  ...$(o),
11945
11956
  ref: h.setReference,
11946
11957
  startAdornment: /* @__PURE__ */ v(xo, { size: "sm" }),
11947
- id: O,
11958
+ id: D,
11948
11959
  value: x,
11949
- onChange: (E) => S(E),
11960
+ onChange: (C) => M(C),
11950
11961
  "data-testid": o["data-testid"]
11951
11962
  }
11952
11963
  ),
@@ -11965,7 +11976,7 @@ const t_ = /* @__PURE__ */ Q0(e_), n_ = {
11965
11976
  ...e,
11966
11977
  mode: "single",
11967
11978
  selected: x,
11968
- onSelect: (E) => S(E),
11979
+ onSelect: (C) => M(C),
11969
11980
  firstElementRef: m
11970
11981
  }
11971
11982
  )