@commercelayer/app-elements 7.11.1 → 7.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,10 @@
1
1
  "use client";
2
- import { c as z, t as S, m as pr, a as fr, b as me, d as ve, n as vt, e as Be, g as hr, f as Ur, h as Vr, s as ot, i as vr, k as qr, l as mr, o as Dr, p as jr, q as $r, r as Yt, v as Gr, w as zr, x as Xr, y as Lt, z as Ae, A as Zr, j as ae, B as G, C as pe, D as _e, E as _t, F as xt, G as gr, H as Et, J as yr, K as Jr, L as Ft, M as Te, N as en, O as tn, P as rn, Q as st, R as nn, S as an, I as on, T as sn, U as ln, V as cn, W as un } from "./main-DXTR8pxH.js";
2
+ import { c as z, t as S, m as pr, a as fr, b as me, d as ve, n as vt, e as Be, g as hr, f as Ur, h as Vr, s as ot, i as vr, k as qr, l as mr, o as Dr, p as jr, q as $r, r as Yt, v as Gr, w as zr, x as Xr, y as Lt, z as Ae, A as Zr, j as ae, B as G, C as pe, D as _e, E as _t, F as xt, G as gr, H as Et, J as yr, K as Jr, L as Ft, M as Te, N as en, O as tn, P as rn, Q as st, R as nn, S as an, I as on, T as sn, U as ln, V as cn, W as un } from "./main-DIL89neT.js";
3
3
  import * as M from "react";
4
4
  import v, { useLayoutEffect as wr, cloneElement as br, createRef as Ce, Component as X, useRef as kt, useEffect as At, useCallback as dn, createElement as pn, forwardRef as fn, useMemo as hn } from "react";
5
5
  import * as vn from "react-dom";
6
6
  import mn from "react-dom";
7
- import { p as Dn } from "./parseISO-D3w6A-Zg.js";
7
+ import { p as Dn } from "./parseISO-CeYGLBle.js";
8
8
  function _r(o, n, t) {
9
9
  return z(o, +S(o) + n);
10
10
  }
@@ -173,7 +173,7 @@ class Tn extends Cr {
173
173
  return t.timestampIsSet ? n : z(n, Sn(n, this.context));
174
174
  }
175
175
  }
176
- class Y {
176
+ class F {
177
177
  run(n, t, e, r) {
178
178
  const a = this.parse(n, t, e, r);
179
179
  return a ? {
@@ -191,7 +191,7 @@ class Y {
191
191
  return !0;
192
192
  }
193
193
  }
194
- class On extends Y {
194
+ class On extends F {
195
195
  priority = 140;
196
196
  parse(n, t, e) {
197
197
  switch (t) {
@@ -344,7 +344,7 @@ function xr(o, n) {
344
344
  function Er(o) {
345
345
  return o % 400 === 0 || o % 4 === 0 && o % 100 !== 0;
346
346
  }
347
- class Nn extends Y {
347
+ class Nn extends F {
348
348
  priority = 130;
349
349
  incompatibleTokens = ["Y", "R", "u", "w", "I", "i", "e", "c", "t", "T"];
350
350
  parse(n, t, e) {
@@ -382,7 +382,7 @@ class Nn extends Y {
382
382
  return n.setFullYear(a, 0, 1), n.setHours(0, 0, 0, 0), n;
383
383
  }
384
384
  }
385
- class Rn extends Y {
385
+ class Rn extends F {
386
386
  priority = 130;
387
387
  parse(n, t, e) {
388
388
  const r = (a) => ({
@@ -438,7 +438,7 @@ class Rn extends Y {
438
438
  "T"
439
439
  ];
440
440
  }
441
- class In extends Y {
441
+ class In extends F {
442
442
  priority = 130;
443
443
  parse(n, t) {
444
444
  return ut(t === "R" ? 4 : t.length, n);
@@ -465,7 +465,7 @@ class In extends Y {
465
465
  "T"
466
466
  ];
467
467
  }
468
- class Yn extends Y {
468
+ class Yn extends F {
469
469
  priority = 130;
470
470
  parse(n, t) {
471
471
  return ut(t === "u" ? 4 : t.length, n);
@@ -475,7 +475,7 @@ class Yn extends Y {
475
475
  }
476
476
  incompatibleTokens = ["G", "y", "Y", "R", "w", "I", "i", "e", "c", "t", "T"];
477
477
  }
478
- class Ln extends Y {
478
+ class Ln extends F {
479
479
  priority = 120;
480
480
  parse(n, t, e) {
481
481
  switch (t) {
@@ -537,7 +537,7 @@ class Ln extends Y {
537
537
  "T"
538
538
  ];
539
539
  }
540
- class Fn extends Y {
540
+ class Fn extends F {
541
541
  priority = 120;
542
542
  parse(n, t, e) {
543
543
  switch (t) {
@@ -599,7 +599,7 @@ class Fn extends Y {
599
599
  "T"
600
600
  ];
601
601
  }
602
- class An extends Y {
602
+ class An extends F {
603
603
  incompatibleTokens = [
604
604
  "Y",
605
605
  "R",
@@ -662,7 +662,7 @@ class An extends Y {
662
662
  return n.setMonth(e, 1), n.setHours(0, 0, 0, 0), n;
663
663
  }
664
664
  }
665
- class Hn extends Y {
665
+ class Hn extends F {
666
666
  priority = 110;
667
667
  parse(n, t, e) {
668
668
  const r = (a) => a - 1;
@@ -729,7 +729,7 @@ function Wn(o, n, t) {
729
729
  const e = S(o, t?.in), r = qr(e, t) - n;
730
730
  return e.setDate(e.getDate() - r * 7), S(e, t?.in);
731
731
  }
732
- class Qn extends Y {
732
+ class Qn extends F {
733
733
  priority = 100;
734
734
  parse(n, t, e) {
735
735
  switch (t) {
@@ -767,7 +767,7 @@ function Bn(o, n, t) {
767
767
  const e = S(o, t?.in), r = mr(e, t) - n;
768
768
  return e.setDate(e.getDate() - r * 7), e;
769
769
  }
770
- class Kn extends Y {
770
+ class Kn extends F {
771
771
  priority = 100;
772
772
  parse(n, t, e) {
773
773
  switch (t) {
@@ -816,7 +816,7 @@ const Un = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Vn = [
816
816
  30,
817
817
  31
818
818
  ];
819
- class qn extends Y {
819
+ class qn extends F {
820
820
  priority = 90;
821
821
  subPriority = 1;
822
822
  parse(n, t, e) {
@@ -851,7 +851,7 @@ class qn extends Y {
851
851
  "T"
852
852
  ];
853
853
  }
854
- class jn extends Y {
854
+ class jn extends F {
855
855
  priority = 90;
856
856
  subpriority = 1;
857
857
  parse(n, t, e) {
@@ -894,7 +894,7 @@ function Ot(o, n, t) {
894
894
  const e = hr(), r = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? e.weekStartsOn ?? e.locale?.options?.weekStartsOn ?? 0, a = S(o, t?.in), s = a.getDay(), l = (n % 7 + 7) % 7, u = 7 - r, c = n < 0 || n > 6 ? n - (s + u) % 7 : (l + u) % 7 - (s + u) % 7;
895
895
  return ve(a, c, t);
896
896
  }
897
- class $n extends Y {
897
+ class $n extends F {
898
898
  priority = 90;
899
899
  parse(n, t, e) {
900
900
  switch (t) {
@@ -930,7 +930,7 @@ class $n extends Y {
930
930
  }
931
931
  incompatibleTokens = ["D", "i", "e", "c", "t", "T"];
932
932
  }
933
- class Gn extends Y {
933
+ class Gn extends F {
934
934
  priority = 90;
935
935
  parse(n, t, e, r) {
936
936
  const a = (s) => {
@@ -996,7 +996,7 @@ class Gn extends Y {
996
996
  "T"
997
997
  ];
998
998
  }
999
- class zn extends Y {
999
+ class zn extends F {
1000
1000
  priority = 90;
1001
1001
  parse(n, t, e, r) {
1002
1002
  const a = (s) => {
@@ -1066,7 +1066,7 @@ function Xn(o, n, t) {
1066
1066
  const e = S(o, t?.in), r = Mn(e, t), a = n - r;
1067
1067
  return ve(e, a, t);
1068
1068
  }
1069
- class Zn extends Y {
1069
+ class Zn extends F {
1070
1070
  priority = 90;
1071
1071
  parse(n, t, e) {
1072
1072
  const r = (a) => a === 0 ? 7 : a;
@@ -1157,7 +1157,7 @@ class Zn extends Y {
1157
1157
  "T"
1158
1158
  ];
1159
1159
  }
1160
- class Jn extends Y {
1160
+ class Jn extends F {
1161
1161
  priority = 80;
1162
1162
  parse(n, t, e) {
1163
1163
  switch (t) {
@@ -1194,7 +1194,7 @@ class Jn extends Y {
1194
1194
  }
1195
1195
  incompatibleTokens = ["b", "B", "H", "k", "t", "T"];
1196
1196
  }
1197
- class ea extends Y {
1197
+ class ea extends F {
1198
1198
  priority = 80;
1199
1199
  parse(n, t, e) {
1200
1200
  switch (t) {
@@ -1231,7 +1231,7 @@ class ea extends Y {
1231
1231
  }
1232
1232
  incompatibleTokens = ["a", "B", "H", "k", "t", "T"];
1233
1233
  }
1234
- class ta extends Y {
1234
+ class ta extends F {
1235
1235
  priority = 80;
1236
1236
  parse(n, t, e) {
1237
1237
  switch (t) {
@@ -1268,7 +1268,7 @@ class ta extends Y {
1268
1268
  }
1269
1269
  incompatibleTokens = ["a", "b", "t", "T"];
1270
1270
  }
1271
- class ra extends Y {
1271
+ class ra extends F {
1272
1272
  priority = 70;
1273
1273
  parse(n, t, e) {
1274
1274
  switch (t) {
@@ -1289,7 +1289,7 @@ class ra extends Y {
1289
1289
  }
1290
1290
  incompatibleTokens = ["H", "K", "k", "t", "T"];
1291
1291
  }
1292
- class na extends Y {
1292
+ class na extends F {
1293
1293
  priority = 70;
1294
1294
  parse(n, t, e) {
1295
1295
  switch (t) {
@@ -1309,7 +1309,7 @@ class na extends Y {
1309
1309
  }
1310
1310
  incompatibleTokens = ["a", "b", "h", "K", "k", "t", "T"];
1311
1311
  }
1312
- class aa extends Y {
1312
+ class aa extends F {
1313
1313
  priority = 70;
1314
1314
  parse(n, t, e) {
1315
1315
  switch (t) {
@@ -1329,7 +1329,7 @@ class aa extends Y {
1329
1329
  }
1330
1330
  incompatibleTokens = ["h", "H", "k", "t", "T"];
1331
1331
  }
1332
- class oa extends Y {
1332
+ class oa extends F {
1333
1333
  priority = 70;
1334
1334
  parse(n, t, e) {
1335
1335
  switch (t) {
@@ -1350,7 +1350,7 @@ class oa extends Y {
1350
1350
  }
1351
1351
  incompatibleTokens = ["a", "b", "h", "H", "K", "t", "T"];
1352
1352
  }
1353
- class sa extends Y {
1353
+ class sa extends F {
1354
1354
  priority = 60;
1355
1355
  parse(n, t, e) {
1356
1356
  switch (t) {
@@ -1370,7 +1370,7 @@ class sa extends Y {
1370
1370
  }
1371
1371
  incompatibleTokens = ["t", "T"];
1372
1372
  }
1373
- class ia extends Y {
1373
+ class ia extends F {
1374
1374
  priority = 50;
1375
1375
  parse(n, t, e) {
1376
1376
  switch (t) {
@@ -1390,7 +1390,7 @@ class ia extends Y {
1390
1390
  }
1391
1391
  incompatibleTokens = ["t", "T"];
1392
1392
  }
1393
- class la extends Y {
1393
+ class la extends F {
1394
1394
  priority = 30;
1395
1395
  parse(n, t) {
1396
1396
  const e = (r) => Math.trunc(r * Math.pow(10, -t.length + 3));
@@ -1401,7 +1401,7 @@ class la extends Y {
1401
1401
  }
1402
1402
  incompatibleTokens = ["t", "T"];
1403
1403
  }
1404
- class ca extends Y {
1404
+ class ca extends F {
1405
1405
  priority = 10;
1406
1406
  parse(n, t) {
1407
1407
  switch (t) {
@@ -1434,7 +1434,7 @@ class ca extends Y {
1434
1434
  }
1435
1435
  incompatibleTokens = ["t", "T", "x"];
1436
1436
  }
1437
- class ua extends Y {
1437
+ class ua extends F {
1438
1438
  priority = 10;
1439
1439
  parse(n, t) {
1440
1440
  switch (t) {
@@ -1467,7 +1467,7 @@ class ua extends Y {
1467
1467
  }
1468
1468
  incompatibleTokens = ["t", "T", "X"];
1469
1469
  }
1470
- class da extends Y {
1470
+ class da extends F {
1471
1471
  priority = 40;
1472
1472
  parse(n) {
1473
1473
  return Sr(n);
@@ -1477,7 +1477,7 @@ class da extends Y {
1477
1477
  }
1478
1478
  incompatibleTokens = "*";
1479
1479
  }
1480
- class pa extends Y {
1480
+ class pa extends F {
1481
1481
  priority = 20;
1482
1482
  parse(n) {
1483
1483
  return Sr(n);
@@ -1529,45 +1529,45 @@ function wa(o, n, t, e) {
1529
1529
  weekStartsOn: l,
1530
1530
  locale: s
1531
1531
  }, c = [new Tn(e?.in, t)], d = n.match(va).map((h) => {
1532
- const g = h[0];
1533
- if (g in Yt) {
1534
- const w = Yt[g];
1532
+ const D = h[0];
1533
+ if (D in Yt) {
1534
+ const w = Yt[D];
1535
1535
  return w(h, s.formatLong);
1536
1536
  }
1537
1537
  return h;
1538
1538
  }).join("").match(ha), p = [];
1539
1539
  for (let h of d) {
1540
- const g = h[0], w = fa[g];
1540
+ const D = h[0], w = fa[D];
1541
1541
  if (w) {
1542
- const { incompatibleTokens: b } = w;
1543
- if (Array.isArray(b)) {
1544
- const R = p.find(
1545
- (F) => b.includes(F.token) || F.token === g
1542
+ const { incompatibleTokens: N } = w;
1543
+ if (Array.isArray(N)) {
1544
+ const T = p.find(
1545
+ (R) => N.includes(R.token) || R.token === D
1546
1546
  );
1547
- if (R)
1547
+ if (T)
1548
1548
  throw new RangeError(
1549
- `The format string mustn't contain \`${R.fullToken}\` and \`${h}\` at the same time`
1549
+ `The format string mustn't contain \`${T.fullToken}\` and \`${h}\` at the same time`
1550
1550
  );
1551
1551
  } else if (w.incompatibleTokens === "*" && p.length > 0)
1552
1552
  throw new RangeError(
1553
1553
  `The format string mustn't contain \`${h}\` and any other token at the same time`
1554
1554
  );
1555
- p.push({ token: g, fullToken: h });
1556
- const _ = w.run(
1555
+ p.push({ token: D, fullToken: h });
1556
+ const k = w.run(
1557
1557
  o,
1558
1558
  h,
1559
1559
  s.match,
1560
1560
  u
1561
1561
  );
1562
- if (!_)
1562
+ if (!k)
1563
1563
  return r();
1564
- c.push(_.setter), o = _.rest;
1564
+ c.push(k.setter), o = k.rest;
1565
1565
  } else {
1566
- if (g.match(ya))
1566
+ if (D.match(ya))
1567
1567
  throw new RangeError(
1568
- "Format string contains an unescaped latin alphabet character `" + g + "`"
1568
+ "Format string contains an unescaped latin alphabet character `" + D + "`"
1569
1569
  );
1570
- if (h === "''" ? h = "'" : g === "'" && (h = ba(h)), o.indexOf(h) === 0)
1570
+ if (h === "''" ? h = "'" : D === "'" && (h = ba(h)), o.indexOf(h) === 0)
1571
1571
  o = o.slice(h.length);
1572
1572
  else
1573
1573
  return r();
@@ -1575,17 +1575,17 @@ function wa(o, n, t, e) {
1575
1575
  }
1576
1576
  if (o.length > 0 && ga.test(o))
1577
1577
  return r();
1578
- const f = c.map((h) => h.priority).sort((h, g) => g - h).filter((h, g, w) => w.indexOf(h) === g).map(
1579
- (h) => c.filter((g) => g.priority === h).sort((g, w) => w.subPriority - g.subPriority)
1578
+ const f = c.map((h) => h.priority).sort((h, D) => D - h).filter((h, D, w) => w.indexOf(h) === D).map(
1579
+ (h) => c.filter((D) => D.priority === h).sort((D, w) => w.subPriority - D.subPriority)
1580
1580
  ).map((h) => h[0]);
1581
1581
  let m = S(t, e?.in);
1582
1582
  if (isNaN(+m)) return r();
1583
- const D = {};
1583
+ const g = {};
1584
1584
  for (const h of f) {
1585
1585
  if (!h.validate(m, u))
1586
1586
  return r();
1587
- const g = h.set(m, D, u);
1588
- Array.isArray(g) ? (m = g[0], Object.assign(D, g[1])) : m = g;
1587
+ const D = h.set(m, g, u);
1588
+ Array.isArray(D) ? (m = D[0], Object.assign(g, D[1])) : m = D;
1589
1589
  }
1590
1590
  return m;
1591
1591
  }
@@ -1718,10 +1718,10 @@ function Tr(o, n) {
1718
1718
  if (l && s !== r) {
1719
1719
  const x = Date.prototype.getHours.apply(o), A = Array.isArray(n) ? n[3] || 0 : o.internal.getUTCHours();
1720
1720
  if (x !== A) {
1721
- const I = /* @__PURE__ */ new Date(+o), C = s - r;
1722
- C && I.setUTCMinutes(I.getUTCMinutes() + C);
1723
- const O = De(o.timeZone, I);
1724
- (O > 0 ? Math.floor(O) : Math.ceil(O)) === r && (u = i);
1721
+ const L = /* @__PURE__ */ new Date(+o), C = s - r;
1722
+ C && L.setUTCMinutes(L.getUTCMinutes() + C);
1723
+ const I = De(o.timeZone, L);
1724
+ (I > 0 ? Math.floor(I) : Math.ceil(I)) === r && (u = i);
1725
1725
  }
1726
1726
  }
1727
1727
  const c = u - r;
@@ -1730,15 +1730,15 @@ function Tr(o, n) {
1730
1730
  d.setUTCSeconds(0);
1731
1731
  const p = s > 0 ? d.getSeconds() : (d.getSeconds() - 60) % 60, f = Math.round(-(De(o.timeZone, o) * 60)) % 60;
1732
1732
  (f || p) && Date.prototype.setUTCSeconds.call(o, Date.prototype.getUTCSeconds.call(o) + f + p);
1733
- const m = De(o.timeZone, o), D = m > 0 ? Math.floor(m) : Math.ceil(m), g = -(/* @__PURE__ */ new Date(+o)).getTimezoneOffset() - D, w = D !== r, b = g - c, _ = D - r, R = t - D * 60 * 1e3, F = _ > 0 && qt(o) - t === _ * 60 * 1e3 && qt(o, R) !== t;
1734
- if (w && b && !F) {
1735
- Date.prototype.setUTCMinutes.call(o, Date.prototype.getUTCMinutes.call(o) + b);
1736
- const x = De(o.timeZone, o), A = x > 0 ? Math.floor(x) : Math.ceil(x), I = D - A;
1737
- I && b < 0 && Date.prototype.setUTCMinutes.call(o, Date.prototype.getUTCMinutes.call(o) + I);
1733
+ const m = De(o.timeZone, o), g = m > 0 ? Math.floor(m) : Math.ceil(m), D = -(/* @__PURE__ */ new Date(+o)).getTimezoneOffset() - g, w = g !== r, N = D - c, k = g - r, T = t - g * 60 * 1e3, R = k > 0 && qt(o) - t === k * 60 * 1e3 && qt(o, T) !== t;
1734
+ if (w && N && !R) {
1735
+ Date.prototype.setUTCMinutes.call(o, Date.prototype.getUTCMinutes.call(o) + N);
1736
+ const x = De(o.timeZone, o), A = x > 0 ? Math.floor(x) : Math.ceil(x), L = g - A;
1737
+ L && N < 0 && Date.prototype.setUTCMinutes.call(o, Date.prototype.getUTCMinutes.call(o) + L);
1738
1738
  }
1739
1739
  dt(o);
1740
- const k = (n ? t : t + f * 1e3) - +o.internal;
1741
- k && Math.abs(k) < 1800 * 1e3 && (Date.prototype.setTime.call(o, +o + k), dt(o));
1740
+ const b = (n ? t : t + f * 1e3) - +o.internal;
1741
+ b && Math.abs(b) < 1800 * 1e3 && (Date.prototype.setTime.call(o, +o + b), dt(o));
1742
1742
  }
1743
1743
  function Sa(o) {
1744
1744
  return Date.UTC(o[0], o.length > 1 ? o[1] : 0, o.length > 2 ? o[2] : 1, ...o.slice(3));
@@ -1833,19 +1833,19 @@ function Ya(o) {
1833
1833
  isPositioned: !1
1834
1834
  }), [p, f] = M.useState(e);
1835
1835
  ft(p, e) || f(e);
1836
- const [m, D] = M.useState(null), [h, g] = M.useState(null), w = M.useCallback(($) => {
1837
- $ !== F.current && (F.current = $, D($));
1838
- }, []), b = M.useCallback(($) => {
1839
- $ !== L.current && (L.current = $, g($));
1840
- }, []), _ = a || m, R = s || h, F = M.useRef(null), L = M.useRef(null), k = M.useRef(c), x = l != null, A = Dt(l), I = Dt(r), C = Dt(u), O = M.useCallback(() => {
1841
- if (!F.current || !L.current)
1836
+ const [m, g] = M.useState(null), [h, D] = M.useState(null), w = M.useCallback(($) => {
1837
+ $ !== R.current && (R.current = $, g($));
1838
+ }, []), N = M.useCallback(($) => {
1839
+ $ !== _.current && (_.current = $, D($));
1840
+ }, []), k = a || m, T = s || h, R = M.useRef(null), _ = M.useRef(null), b = M.useRef(c), x = l != null, A = Dt(l), L = Dt(r), C = Dt(u), I = M.useCallback(() => {
1841
+ if (!R.current || !_.current)
1842
1842
  return;
1843
1843
  const $ = {
1844
1844
  placement: n,
1845
1845
  strategy: t,
1846
1846
  middleware: p
1847
1847
  };
1848
- I.current && ($.platform = I.current), Xr(F.current, L.current, $).then((xe) => {
1848
+ L.current && ($.platform = L.current), Xr(R.current, _.current, $).then((xe) => {
1849
1849
  const Oe = {
1850
1850
  ...xe,
1851
1851
  // The floating element's position may be recomputed while it's closed
@@ -1854,13 +1854,13 @@ function Ya(o) {
1854
1854
  // setting it to `true` when `open === false` (must be specified).
1855
1855
  isPositioned: C.current !== !1
1856
1856
  };
1857
- B.current && !ft(k.current, Oe) && (k.current = Oe, vn.flushSync(() => {
1857
+ B.current && !ft(b.current, Oe) && (b.current = Oe, vn.flushSync(() => {
1858
1858
  d(Oe);
1859
1859
  }));
1860
1860
  });
1861
- }, [p, n, t, I, C]);
1861
+ }, [p, n, t, L, C]);
1862
1862
  nt(() => {
1863
- u === !1 && k.current.isPositioned && (k.current.isPositioned = !1, d(($) => ({
1863
+ u === !1 && b.current.isPositioned && (b.current.isPositioned = !1, d(($) => ({
1864
1864
  ...$,
1865
1865
  isPositioned: !1
1866
1866
  })));
@@ -1869,21 +1869,21 @@ function Ya(o) {
1869
1869
  nt(() => (B.current = !0, () => {
1870
1870
  B.current = !1;
1871
1871
  }), []), nt(() => {
1872
- if (_ && (F.current = _), R && (L.current = R), _ && R) {
1872
+ if (k && (R.current = k), T && (_.current = T), k && T) {
1873
1873
  if (A.current)
1874
- return A.current(_, R, O);
1875
- O();
1874
+ return A.current(k, T, I);
1875
+ I();
1876
1876
  }
1877
- }, [_, R, O, A, x]);
1877
+ }, [k, T, I, A, x]);
1878
1878
  const j = M.useMemo(() => ({
1879
- reference: F,
1880
- floating: L,
1879
+ reference: R,
1880
+ floating: _,
1881
1881
  setReference: w,
1882
- setFloating: b
1883
- }), [w, b]), U = M.useMemo(() => ({
1884
- reference: _,
1885
- floating: R
1886
- }), [_, R]), H = M.useMemo(() => {
1882
+ setFloating: N
1883
+ }), [w, N]), U = M.useMemo(() => ({
1884
+ reference: k,
1885
+ floating: T
1886
+ }), [k, T]), H = M.useMemo(() => {
1887
1887
  const $ = {
1888
1888
  position: t,
1889
1889
  left: 0,
@@ -1906,11 +1906,11 @@ function Ya(o) {
1906
1906
  }, [t, i, U.floating, c.x, c.y]);
1907
1907
  return M.useMemo(() => ({
1908
1908
  ...c,
1909
- update: O,
1909
+ update: I,
1910
1910
  refs: j,
1911
1911
  elements: U,
1912
1912
  floatingStyles: H
1913
- }), [c, O, j, U, H]);
1913
+ }), [c, I, j, U, H]);
1914
1914
  }
1915
1915
  const La = (o) => {
1916
1916
  function n(t) {
@@ -2013,60 +2013,60 @@ const qa = /* @__PURE__ */ M.forwardRef(function(n, t) {
2013
2013
  d: f,
2014
2014
  style: {
2015
2015
  transform: m,
2016
- ...D
2016
+ ...g
2017
2017
  } = {},
2018
2018
  ...h
2019
2019
  } = n;
2020
2020
  process.env.NODE_ENV !== "production" && (t || Ua("The `ref` prop is required for `FloatingArrow`."));
2021
- const g = Nr(), [w, b] = M.useState(!1);
2021
+ const D = Nr(), [w, N] = M.useState(!1);
2022
2022
  if (pt(() => {
2023
2023
  if (!r) return;
2024
- Zr(r).direction === "rtl" && b(!0);
2024
+ Zr(r).direction === "rtl" && N(!0);
2025
2025
  }, [r]), !r)
2026
2026
  return null;
2027
- const [_, R] = e.split("-"), F = _ === "top" || _ === "bottom";
2028
- let L = d;
2029
- (F && s != null && s.x || !F && s != null && s.y) && (L = null);
2030
- const k = c * 2, x = k / 2, A = i / 2 * (u / -8 + 1), I = l / 2 * u / 4, C = !!f, O = L && R === "end" ? "bottom" : "top";
2031
- let B = L && R === "end" ? "right" : "left";
2032
- L && w && (B = R === "end" ? "left" : "right");
2033
- const j = a?.x != null ? L || a.x : "", U = a?.y != null ? L || a.y : "", H = f || "M0,0" + (" H" + i) + (" L" + (i - A) + "," + (l - I)) + (" Q" + i / 2 + "," + l + " " + A + "," + (l - I)) + " Z", $ = {
2027
+ const [k, T] = e.split("-"), R = k === "top" || k === "bottom";
2028
+ let _ = d;
2029
+ (R && s != null && s.x || !R && s != null && s.y) && (_ = null);
2030
+ const b = c * 2, x = b / 2, A = i / 2 * (u / -8 + 1), L = l / 2 * u / 4, C = !!f, I = _ && T === "end" ? "bottom" : "top";
2031
+ let B = _ && T === "end" ? "right" : "left";
2032
+ _ && w && (B = T === "end" ? "left" : "right");
2033
+ const j = a?.x != null ? _ || a.x : "", U = a?.y != null ? _ || a.y : "", H = f || "M0,0" + (" H" + i) + (" L" + (i - A) + "," + (l - L)) + (" Q" + i / 2 + "," + l + " " + A + "," + (l - L)) + " Z", $ = {
2034
2034
  top: C ? "rotate(180deg)" : "",
2035
2035
  left: C ? "rotate(90deg)" : "rotate(-90deg)",
2036
2036
  bottom: C ? "" : "rotate(180deg)",
2037
2037
  right: C ? "rotate(-90deg)" : "rotate(90deg)"
2038
- }[_];
2038
+ }[k];
2039
2039
  return /* @__PURE__ */ ae.jsxs("svg", {
2040
2040
  ...h,
2041
2041
  "aria-hidden": !0,
2042
2042
  ref: t,
2043
- width: C ? i : i + k,
2043
+ width: C ? i : i + b,
2044
2044
  height: i,
2045
2045
  viewBox: "0 0 " + i + " " + (l > i ? l : i),
2046
2046
  style: {
2047
2047
  position: "absolute",
2048
2048
  pointerEvents: "none",
2049
2049
  [B]: j,
2050
- [O]: U,
2051
- [_]: F || C ? "100%" : "calc(100% - " + k / 2 + "px)",
2050
+ [I]: U,
2051
+ [k]: R || C ? "100%" : "calc(100% - " + b / 2 + "px)",
2052
2052
  transform: [$, m].filter((xe) => !!xe).join(" "),
2053
- ...D
2053
+ ...g
2054
2054
  },
2055
- children: [k > 0 && /* @__PURE__ */ ae.jsx("path", {
2056
- clipPath: "url(#" + g + ")",
2055
+ children: [b > 0 && /* @__PURE__ */ ae.jsx("path", {
2056
+ clipPath: "url(#" + D + ")",
2057
2057
  fill: "none",
2058
2058
  stroke: p,
2059
- strokeWidth: k + (f ? 0 : 1),
2059
+ strokeWidth: b + (f ? 0 : 1),
2060
2060
  d: H
2061
2061
  }), /* @__PURE__ */ ae.jsx("path", {
2062
- stroke: k && !f ? h.fill : "none",
2062
+ stroke: b && !f ? h.fill : "none",
2063
2063
  d: H
2064
2064
  }), /* @__PURE__ */ ae.jsx("clipPath", {
2065
- id: g,
2065
+ id: D,
2066
2066
  children: /* @__PURE__ */ ae.jsx("rect", {
2067
2067
  x: -x,
2068
2068
  y: x * (C ? -1 : 1),
2069
- width: i + k,
2069
+ width: i + b,
2070
2070
  height: i
2071
2071
  })
2072
2072
  })]
@@ -2102,13 +2102,13 @@ function Za(o) {
2102
2102
  const f = e.reference;
2103
2103
  f && !Ae(f) && Va("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `refs.setPositionReference()`", "instead.");
2104
2104
  }
2105
- const [l, u] = M.useState(e.reference), c = Na((f, m, D) => {
2105
+ const [l, u] = M.useState(e.reference), c = Na((f, m, g) => {
2106
2106
  a.current.openEvent = f ? m : void 0, s.emit("openchange", {
2107
2107
  open: f,
2108
2108
  event: m,
2109
- reason: D,
2109
+ reason: g,
2110
2110
  nested: i
2111
- }), t?.(f, m, D);
2111
+ }), t?.(f, m, g);
2112
2112
  }), d = M.useMemo(() => ({
2113
2113
  setPositionReference: u
2114
2114
  }), []), p = M.useMemo(() => ({
@@ -2127,65 +2127,68 @@ function Za(o) {
2127
2127
  }), [n, c, p, s, r, d]);
2128
2128
  }
2129
2129
  function Ja(o) {
2130
- o === void 0 && (o = {});
2130
+ var n, t;
2131
+ let {
2132
+ elements: e,
2133
+ ...r
2134
+ } = o === void 0 ? {} : o;
2131
2135
  const {
2132
- nodeId: n
2133
- } = o, t = Za({
2134
- ...o,
2136
+ nodeId: a
2137
+ } = r, s = Za({
2138
+ ...r,
2135
2139
  elements: {
2136
- reference: null,
2137
- floating: null,
2138
- ...o.elements
2140
+ reference: (n = e?.reference) != null ? n : null,
2141
+ floating: (t = e?.floating) != null ? t : null
2139
2142
  }
2140
- }), e = o.rootContext || t, r = e.elements, [a, s] = M.useState(null), [i, l] = M.useState(null), c = r?.domReference || a, d = M.useRef(null), p = Xa();
2143
+ }), i = r.rootContext || s, l = i.elements, [u, c] = M.useState(null), [d, p] = M.useState(null), m = l?.domReference || u, g = M.useRef(null), h = Xa();
2141
2144
  pt(() => {
2142
- c && (d.current = c);
2143
- }, [c]);
2144
- const f = Ya({
2145
- ...o,
2145
+ m && (g.current = m);
2146
+ }, [m]);
2147
+ const D = Ya({
2148
+ ...r,
2146
2149
  elements: {
2147
- ...r,
2148
- ...i && {
2149
- reference: i
2150
+ ...l,
2151
+ ...d && {
2152
+ reference: d
2150
2153
  }
2151
2154
  }
2152
- }), m = M.useCallback((b) => {
2153
- const _ = Ae(b) ? {
2154
- getBoundingClientRect: () => b.getBoundingClientRect(),
2155
- getClientRects: () => b.getClientRects(),
2156
- contextElement: b
2157
- } : b;
2158
- l(_), f.refs.setReference(_);
2159
- }, [f.refs]), D = M.useCallback((b) => {
2160
- (Ae(b) || b === null) && (d.current = b, s(b)), (Ae(f.refs.reference.current) || f.refs.reference.current === null || // Don't allow setting virtual elements using the old technique back to
2155
+ }), w = M.useCallback((_) => {
2156
+ const b = Ae(_) ? {
2157
+ getBoundingClientRect: () => _.getBoundingClientRect(),
2158
+ getClientRects: () => _.getClientRects(),
2159
+ contextElement: _
2160
+ } : _;
2161
+ p(b), D.refs.setReference(b);
2162
+ }, [D.refs]), N = M.useCallback((_) => {
2163
+ (Ae(_) || _ === null) && (g.current = _, c(_)), (Ae(D.refs.reference.current) || D.refs.reference.current === null || // Don't allow setting virtual elements using the old technique back to
2161
2164
  // `null` to support `positionReference` + an unstable `reference`
2162
2165
  // callback ref.
2163
- b !== null && !Ae(b)) && f.refs.setReference(b);
2164
- }, [f.refs]), h = M.useMemo(() => ({
2165
- ...f.refs,
2166
- setReference: D,
2167
- setPositionReference: m,
2168
- domReference: d
2169
- }), [f.refs, D, m]), g = M.useMemo(() => ({
2170
- ...f.elements,
2171
- domReference: c
2172
- }), [f.elements, c]), w = M.useMemo(() => ({
2173
- ...f,
2174
- ...e,
2175
- refs: h,
2176
- elements: g,
2177
- nodeId: n
2178
- }), [f, h, g, n, e]);
2166
+ _ !== null && !Ae(_)) && D.refs.setReference(_);
2167
+ }, [D.refs]), k = M.useMemo(() => ({
2168
+ ...D.refs,
2169
+ setReference: N,
2170
+ setPositionReference: w,
2171
+ domReference: g
2172
+ }), [D.refs, N, w]), T = M.useMemo(() => ({
2173
+ ...D.elements,
2174
+ domReference: m
2175
+ }), [D.elements, m]), R = M.useMemo(() => ({
2176
+ ...D,
2177
+ ...i,
2178
+ refs: k,
2179
+ elements: T,
2180
+ nodeId: a
2181
+ }), [D, k, T, a, i]);
2179
2182
  return pt(() => {
2180
- e.dataRef.current.floatingContext = w;
2181
- const b = p?.nodesRef.current.find((_) => _.id === n);
2182
- b && (b.context = w);
2183
+ i.dataRef.current.floatingContext = R;
2184
+ const _ = h?.nodesRef.current.find((b) => b.id === a);
2185
+ _ && (_.context = R);
2183
2186
  }), M.useMemo(() => ({
2184
- ...f,
2185
- context: w,
2186
- refs: h,
2187
- elements: g
2188
- }), [f, h, g, w]);
2187
+ ...D,
2188
+ context: R,
2189
+ refs: k,
2190
+ elements: T
2191
+ }), [D, k, T, R]);
2189
2192
  }
2190
2193
  var St = function(n, t) {
2191
2194
  return St = Object.setPrototypeOf || {
@@ -2251,14 +2254,14 @@ function Rr() {
2251
2254
  return o;
2252
2255
  }
2253
2256
  var qe = 12;
2254
- function N(o) {
2257
+ function Y(o) {
2255
2258
  if (o == null)
2256
2259
  return /* @__PURE__ */ new Date();
2257
2260
  var n = typeof o == "string" ? Dn(o) : S(o);
2258
2261
  return ne(n) ? n : /* @__PURE__ */ new Date();
2259
2262
  }
2260
2263
  function Ne(o, n, t, e, r) {
2261
- r === void 0 && (r = N());
2264
+ r === void 0 && (r = Y());
2262
2265
  for (var a = Le(t) || Le(Nt()), s = Array.isArray(n) ? n : [n], i = 0, l = s; i < l.length; i++) {
2263
2266
  var u = l[i], c = wa(o, u, r, {
2264
2267
  locale: a
@@ -2338,7 +2341,7 @@ function zt(o) {
2338
2341
  return Mt(o);
2339
2342
  }
2340
2343
  function Xt() {
2341
- return xt(N());
2344
+ return xt(Y());
2342
2345
  }
2343
2346
  function Zt(o) {
2344
2347
  return gr(o);
@@ -2358,7 +2361,7 @@ function J(o, n) {
2358
2361
  function ht(o, n) {
2359
2362
  return o && n ? _a(o, n) : !o && !n;
2360
2363
  }
2361
- function T(o, n) {
2364
+ function O(o, n) {
2362
2365
  return o && n ? Jr(o, n) : !o && !n;
2363
2366
  }
2364
2367
  function Pe(o, n) {
@@ -2394,27 +2397,27 @@ function uo(o, n) {
2394
2397
  return W(o, "EEE", n);
2395
2398
  }
2396
2399
  function Rt(o, n) {
2397
- return W(re(N(), o), "LLLL", n);
2400
+ return W(re(Y(), o), "LLLL", n);
2398
2401
  }
2399
2402
  function Yr(o, n) {
2400
- return W(re(N(), o), "LLL", n);
2403
+ return W(re(Y(), o), "LLL", n);
2401
2404
  }
2402
2405
  function po(o, n) {
2403
- return W(Re(N(), o), "QQQ", n);
2406
+ return W(Re(Y(), o), "QQQ", n);
2404
2407
  }
2405
2408
  function oe(o, n) {
2406
2409
  var t = n === void 0 ? {} : n, e = t.minDate, r = t.maxDate, a = t.excludeDates, s = t.excludeDateIntervals, i = t.includeDates, l = t.includeDateIntervals, u = t.filterDate, c = t.disabled;
2407
2410
  return c ? !0 : je(o, { minDate: e, maxDate: r }) || a && a.some(function(d) {
2408
- return d instanceof Date ? T(o, d) : T(o, d.date);
2411
+ return d instanceof Date ? O(o, d) : O(o, d.date);
2409
2412
  }) || s && s.some(function(d) {
2410
2413
  var p = d.start, f = d.end;
2411
2414
  return Ue(o, { start: p, end: f });
2412
2415
  }) || i && !i.some(function(d) {
2413
- return T(o, d);
2416
+ return O(o, d);
2414
2417
  }) || l && !l.some(function(d) {
2415
2418
  var p = d.start, f = d.end;
2416
2419
  return Ue(o, { start: p, end: f });
2417
- }) || u && !u(N(o)) || !1;
2420
+ }) || u && !u(Y(o)) || !1;
2418
2421
  }
2419
2422
  function It(o, n) {
2420
2423
  var t = n === void 0 ? {} : n, e = t.excludeDates, r = t.excludeDateIntervals;
@@ -2423,7 +2426,7 @@ function It(o, n) {
2423
2426
  return Ue(o, { start: s, end: i });
2424
2427
  }) : e && e.some(function(a) {
2425
2428
  var s;
2426
- return a instanceof Date ? T(o, a) : T(o, (s = a.date) !== null && s !== void 0 ? s : /* @__PURE__ */ new Date());
2429
+ return a instanceof Date ? O(o, a) : O(o, (s = a.date) !== null && s !== void 0 ? s : /* @__PURE__ */ new Date());
2427
2430
  }) || !1;
2428
2431
  }
2429
2432
  function Lr(o, n) {
@@ -2435,7 +2438,7 @@ function Lr(o, n) {
2435
2438
  return J(o, l instanceof Date ? l : l.date);
2436
2439
  }) || s && !s.some(function(l) {
2437
2440
  return J(o, l);
2438
- }) || i && !i(N(o)) || !1;
2441
+ }) || i && !i(Y(o)) || !1;
2439
2442
  }
2440
2443
  function Ge(o, n, t, e) {
2441
2444
  var r = P(o), a = ee(o), s = P(n), i = ee(n), l = P(e);
@@ -2455,7 +2458,7 @@ function ze(o, n) {
2455
2458
  return ht(o, u instanceof Date ? u : u.date);
2456
2459
  }) || s && !s.some(function(u) {
2457
2460
  return ht(o, u);
2458
- }) || i && !i(N(o)) || !1;
2461
+ }) || i && !i(Y(o)) || !1;
2459
2462
  }
2460
2463
  function Xe(o, n, t) {
2461
2464
  if (!n || !t || !_t(n) || !_t(t))
@@ -2475,7 +2478,7 @@ function at(o, n) {
2475
2478
  return ce(u, c instanceof Date ? c : c.date);
2476
2479
  }) || s && !s.some(function(c) {
2477
2480
  return ce(u, c);
2478
- }) || i && !i(N(u)) || !1;
2481
+ }) || i && !i(Y(u)) || !1;
2479
2482
  }
2480
2483
  function Ze(o, n, t, e) {
2481
2484
  var r = P(o), a = be(o), s = P(n), i = be(n), l = P(e);
@@ -2498,11 +2501,11 @@ function tr(o, n) {
2498
2501
  var t = n.minTime, e = n.maxTime;
2499
2502
  if (!t || !e)
2500
2503
  throw new Error("Both minTime and maxTime props required");
2501
- var r = N();
2504
+ var r = Y();
2502
2505
  r = et(r, se(o)), r = tt(r, ie(o)), r = rt(r, ke(o));
2503
- var a = N();
2506
+ var a = Y();
2504
2507
  a = et(a, se(t)), a = tt(a, ie(t)), a = rt(a, ke(t));
2505
- var s = N();
2508
+ var s = Y();
2506
2509
  s = et(s, se(e)), s = tt(s, ie(e)), s = rt(s, ke(e));
2507
2510
  var i;
2508
2511
  try {
@@ -2724,7 +2727,7 @@ var _o = (
2724
2727
  var r, a, s = e.key;
2725
2728
  s === y.Space && (e.preventDefault(), e.key = y.Enter), (a = (r = t.props).handleOnKeyDown) === null || a === void 0 || a.call(r, e);
2726
2729
  }, t.isSameDay = function(e) {
2727
- return T(t.props.day, e);
2730
+ return O(t.props.day, e);
2728
2731
  }, t.isKeyboardSelected = function() {
2729
2732
  var e;
2730
2733
  if (t.props.disabledKeyboardNavigation)
@@ -2750,9 +2753,9 @@ var _o = (
2750
2753
  excludeDateIntervals: t.props.excludeDateIntervals
2751
2754
  });
2752
2755
  }, t.isStartOfWeek = function() {
2753
- return T(t.props.day, Me(t.props.day, t.props.locale, t.props.calendarStartDay));
2756
+ return O(t.props.day, Me(t.props.day, t.props.locale, t.props.calendarStartDay));
2754
2757
  }, t.isSameWeek = function(e) {
2755
- return t.props.showWeekPicker && T(e, Me(t.props.day, t.props.locale, t.props.calendarStartDay));
2758
+ return t.props.showWeekPicker && O(e, Me(t.props.day, t.props.locale, t.props.calendarStartDay));
2756
2759
  }, t.isSameDayOrWeek = function(e) {
2757
2760
  return t.isSameDay(e) || t.isSameWeek(e);
2758
2761
  }, t.getHighLightedClass = function() {
@@ -2790,19 +2793,19 @@ var _o = (
2790
2793
  if (!t.isInSelectingRange())
2791
2794
  return !1;
2792
2795
  var r = t.props, a = r.day, s = r.startDate, i = r.selectsStart, l = r.swapRange, u = r.selectsRange, c = (e = t.props.selectingDate) !== null && e !== void 0 ? e : t.props.preSelection;
2793
- return i ? T(a, c) : u && l && s && c ? T(a, pe(c, s) ? c : s) : T(a, s);
2796
+ return i ? O(a, c) : u && l && s && c ? O(a, pe(c, s) ? c : s) : O(a, s);
2794
2797
  }, t.isSelectingRangeEnd = function() {
2795
2798
  var e;
2796
2799
  if (!t.isInSelectingRange())
2797
2800
  return !1;
2798
2801
  var r = t.props, a = r.day, s = r.endDate, i = r.selectsEnd, l = r.selectsRange, u = r.swapRange, c = r.startDate, d = (e = t.props.selectingDate) !== null && e !== void 0 ? e : t.props.preSelection;
2799
- return i ? T(a, d) : l && u && c && d ? T(a, pe(d, c) ? c : d) : l ? T(a, d) : T(a, s);
2802
+ return i ? O(a, d) : l && u && c && d ? O(a, pe(d, c) ? c : d) : l ? O(a, d) : O(a, s);
2800
2803
  }, t.isRangeStart = function() {
2801
2804
  var e = t.props, r = e.day, a = e.startDate, s = e.endDate;
2802
- return !a || !s ? !1 : T(a, r);
2805
+ return !a || !s ? !1 : O(a, r);
2803
2806
  }, t.isRangeEnd = function() {
2804
2807
  var e = t.props, r = e.day, a = e.startDate, s = e.endDate;
2805
- return !a || !s ? !1 : T(s, r);
2808
+ return !a || !s ? !1 : O(s, r);
2806
2809
  }, t.isWeekend = function() {
2807
2810
  var e = _n(t.props.day);
2808
2811
  return e === 0 || e === 6;
@@ -2811,7 +2814,7 @@ var _o = (
2811
2814
  }, t.isBeforeMonth = function() {
2812
2815
  return t.props.month !== void 0 && (ee(t.props.day) + 1) % 12 === t.props.month;
2813
2816
  }, t.isCurrentDay = function() {
2814
- return t.isSameDay(N());
2817
+ return t.isSameDay(Y());
2815
2818
  }, t.isSelected = function() {
2816
2819
  var e;
2817
2820
  return t.props.selectsMultiple ? (e = t.props.selectedDates) === null || e === void 0 ? void 0 : e.some(function(r) {
@@ -2840,13 +2843,13 @@ var _o = (
2840
2843
  }, t.getTitle = function() {
2841
2844
  var e = t.props, r = e.day, a = e.holidays, s = a === void 0 ? /* @__PURE__ */ new Map() : a, i = e.excludeDates, l = W(r, "MM.dd.yyyy"), u = [];
2842
2845
  return s.has(l) && u.push.apply(u, s.get(l).holidayNames), t.isExcluded() && u.push(i?.filter(function(c) {
2843
- return c instanceof Date ? T(c, r) : T(c?.date, r);
2846
+ return c instanceof Date ? O(c, r) : O(c?.date, r);
2844
2847
  }).map(function(c) {
2845
2848
  if (!(c instanceof Date))
2846
2849
  return c?.message;
2847
2850
  })), u.join(", ");
2848
2851
  }, t.getTabIndex = function() {
2849
- var e = t.props.selected, r = t.props.preSelection, a = !(t.props.showWeekPicker && (t.props.showWeekNumber || !t.isStartOfWeek())) && (t.isKeyboardSelected() || t.isSameDay(e) && T(r, e)) ? 0 : -1;
2852
+ var e = t.props.selected, r = t.props.preSelection, a = !(t.props.showWeekPicker && (t.props.showWeekNumber || !t.isStartOfWeek())) && (t.isKeyboardSelected() || t.isSameDay(e) && O(r, e)) ? 0 : -1;
2850
2853
  return a;
2851
2854
  }, t.handleFocusDay = function() {
2852
2855
  var e;
@@ -2894,12 +2897,12 @@ var _o = (
2894
2897
  var r, a, s = e.key;
2895
2898
  s === y.Space && (e.preventDefault(), e.key = y.Enter), (a = (r = t.props).handleOnKeyDown) === null || a === void 0 || a.call(r, e);
2896
2899
  }, t.isKeyboardSelected = function() {
2897
- return !t.props.disabledKeyboardNavigation && !T(t.props.date, t.props.selected) && T(t.props.date, t.props.preSelection);
2900
+ return !t.props.disabledKeyboardNavigation && !O(t.props.date, t.props.selected) && O(t.props.date, t.props.preSelection);
2898
2901
  }, t.getTabIndex = function() {
2899
- return t.props.showWeekPicker && t.props.showWeekNumber && (t.isKeyboardSelected() || T(t.props.date, t.props.selected) && T(t.props.preSelection, t.props.selected)) ? 0 : -1;
2902
+ return t.props.showWeekPicker && t.props.showWeekNumber && (t.isKeyboardSelected() || O(t.props.date, t.props.selected) && O(t.props.preSelection, t.props.selected)) ? 0 : -1;
2900
2903
  }, t.handleFocusWeekNumber = function(e) {
2901
2904
  var r = !1;
2902
- t.getTabIndex() === 0 && !e?.isInputFocused && T(t.props.date, t.props.preSelection) && ((!document.activeElement || document.activeElement === document.body) && (r = !0), t.props.inline && !t.props.shouldFocusDayInline && (r = !1), t.props.containerRef && t.props.containerRef.current && t.props.containerRef.current.contains(document.activeElement) && document.activeElement && document.activeElement.classList.contains("react-datepicker__week-number") && (r = !0)), r && t.weekNumberEl.current && t.weekNumberEl.current.focus({ preventScroll: !0 });
2905
+ t.getTabIndex() === 0 && !e?.isInputFocused && O(t.props.date, t.props.preSelection) && ((!document.activeElement || document.activeElement === document.body) && (r = !0), t.props.inline && !t.props.shouldFocusDayInline && (r = !1), t.props.containerRef && t.props.containerRef.current && t.props.containerRef.current.contains(document.activeElement) && document.activeElement && document.activeElement.classList.contains("react-datepicker__week-number") && (r = !0)), r && t.weekNumberEl.current && t.weekNumberEl.current.focus({ preventScroll: !0 });
2903
2906
  }, t;
2904
2907
  }
2905
2908
  return Object.defineProperty(n, "defaultProps", {
@@ -2918,7 +2921,7 @@ var _o = (
2918
2921
  var t = this.props, e = t.weekNumber, r = t.isWeekDisabled, a = t.ariaLabelPrefix, s = a === void 0 ? n.defaultProps.ariaLabelPrefix : a, i = t.onClick, l = {
2919
2922
  "react-datepicker__week-number": !0,
2920
2923
  "react-datepicker__week-number--clickable": !!i && !r,
2921
- "react-datepicker__week-number--selected": !!i && T(this.props.date, this.props.selected)
2924
+ "react-datepicker__week-number--selected": !!i && O(this.props.date, this.props.selected)
2922
2925
  };
2923
2926
  return v.createElement("div", { ref: this.weekNumberEl, className: G(l), "aria-label": "".concat(s, " ").concat(this.props.weekNumber), onClick: this.handleClick, onKeyDown: this.handleOnKeyDown, tabIndex: this.getTabIndex(), role: "gridcell" }, e);
2924
2927
  }, n;
@@ -2976,7 +2979,7 @@ var _o = (
2976
2979
  }, t.startOfWeek = function() {
2977
2980
  return Me(t.props.day, t.props.locale, t.props.calendarStartDay);
2978
2981
  }, t.isKeyboardSelected = function() {
2979
- return !t.props.disabledKeyboardNavigation && !T(t.startOfWeek(), t.props.selected) && T(t.startOfWeek(), t.props.preSelection);
2982
+ return !t.props.disabledKeyboardNavigation && !O(t.startOfWeek(), t.props.selected) && O(t.startOfWeek(), t.props.preSelection);
2980
2983
  }, t;
2981
2984
  }
2982
2985
  return Object.defineProperty(n, "defaultProps", {
@@ -2990,7 +2993,7 @@ var _o = (
2990
2993
  }), n.prototype.render = function() {
2991
2994
  var t = {
2992
2995
  "react-datepicker__week": !0,
2993
- "react-datepicker__week--selected": T(this.startOfWeek(), this.props.selected),
2996
+ "react-datepicker__week--selected": O(this.startOfWeek(), this.props.selected),
2994
2997
  "react-datepicker__week--keyboard-selected": this.isKeyboardSelected()
2995
2998
  }, e = this.props.weekClassName ? this.props.weekClassName(this.startOfWeek()) : void 0;
2996
2999
  return v.createElement("div", { className: G(t, e), role: "row" }, this.renderDays());
@@ -3098,9 +3101,9 @@ var xo = (
3098
3101
  var r = t.props.day, a = ve(e, 6);
3099
3102
  return J(e, r) || J(a, r);
3100
3103
  }, t.isCurrentMonth = function(e, r) {
3101
- return P(e) === P(N()) && r === ee(N());
3104
+ return P(e) === P(Y()) && r === ee(Y());
3102
3105
  }, t.isCurrentQuarter = function(e, r) {
3103
- return P(e) === P(N()) && r === be(N());
3106
+ return P(e) === P(Y()) && r === be(Y());
3104
3107
  }, t.isSelectedMonth = function(e, r, a) {
3105
3108
  return ee(a) === r && P(e) === P(a);
3106
3109
  }, t.isSelectMonthInList = function(e, r, a) {
@@ -3152,45 +3155,45 @@ var xo = (
3152
3155
  }, t.handleKeyboardNavigation = function(e, r, a) {
3153
3156
  var s, i = t.props, l = i.selected, u = i.preSelection, c = i.setPreSelection, d = i.minDate, p = i.maxDate, f = i.showFourColumnMonthYearPicker, m = i.showTwoColumnMonthYearPicker;
3154
3157
  if (u) {
3155
- var D = ur(f, m), h = t.getVerticalOffset(D), g = (s = yt[D]) === null || s === void 0 ? void 0 : s.grid, w = function(L, k, x) {
3156
- var A, I, C = k, O = x;
3157
- switch (L) {
3158
+ var g = ur(f, m), h = t.getVerticalOffset(g), D = (s = yt[g]) === null || s === void 0 ? void 0 : s.grid, w = function(_, b, x) {
3159
+ var A, L, C = b, I = x;
3160
+ switch (_) {
3158
3161
  case y.ArrowRight:
3159
- C = me(k, Je), O = x === 11 ? 0 : x + Je;
3162
+ C = me(b, Je), I = x === 11 ? 0 : x + Je;
3160
3163
  break;
3161
3164
  case y.ArrowLeft:
3162
- C = Te(k, Je), O = x === 0 ? 11 : x - Je;
3165
+ C = Te(b, Je), I = x === 0 ? 11 : x - Je;
3163
3166
  break;
3164
3167
  case y.ArrowUp:
3165
- C = Te(k, h), O = !((A = g?.[0]) === null || A === void 0) && A.includes(x) ? x + 12 - h : x - h;
3168
+ C = Te(b, h), I = !((A = D?.[0]) === null || A === void 0) && A.includes(x) ? x + 12 - h : x - h;
3166
3169
  break;
3167
3170
  case y.ArrowDown:
3168
- C = me(k, h), O = !((I = g?.[g.length - 1]) === null || I === void 0) && I.includes(x) ? x - 12 + h : x + h;
3171
+ C = me(b, h), I = !((L = D?.[D.length - 1]) === null || L === void 0) && L.includes(x) ? x - 12 + h : x + h;
3169
3172
  break;
3170
3173
  }
3171
- return { newCalculatedDate: C, newCalculatedMonth: O };
3172
- }, b = function(L, k, x) {
3173
- for (var A = 40, I = L, C = !1, O = 0, B = w(I, k, x), j = B.newCalculatedDate, U = B.newCalculatedMonth; !C; ) {
3174
- if (O >= A) {
3175
- j = k, U = x;
3174
+ return { newCalculatedDate: C, newCalculatedMonth: I };
3175
+ }, N = function(_, b, x) {
3176
+ for (var A = 40, L = _, C = !1, I = 0, B = w(L, b, x), j = B.newCalculatedDate, U = B.newCalculatedMonth; !C; ) {
3177
+ if (I >= A) {
3178
+ j = b, U = x;
3176
3179
  break;
3177
3180
  }
3178
3181
  if (d && j < d) {
3179
- I = y.ArrowRight;
3180
- var H = w(I, j, U);
3182
+ L = y.ArrowRight;
3183
+ var H = w(L, j, U);
3181
3184
  j = H.newCalculatedDate, U = H.newCalculatedMonth;
3182
3185
  }
3183
3186
  if (p && j > p) {
3184
- I = y.ArrowLeft;
3185
- var H = w(I, j, U);
3187
+ L = y.ArrowLeft;
3188
+ var H = w(L, j, U);
3186
3189
  j = H.newCalculatedDate, U = H.newCalculatedMonth;
3187
3190
  }
3188
3191
  if (fo(j, t.props)) {
3189
- var H = w(I, j, U);
3192
+ var H = w(L, j, U);
3190
3193
  j = H.newCalculatedDate, U = H.newCalculatedMonth;
3191
3194
  } else
3192
3195
  C = !0;
3193
- O++;
3196
+ I++;
3194
3197
  }
3195
3198
  return { newCalculatedDate: j, newCalculatedMonth: U };
3196
3199
  };
@@ -3198,13 +3201,13 @@ var xo = (
3198
3201
  t.isMonthDisabled(a) || (t.onMonthClick(e, a), c?.(l));
3199
3202
  return;
3200
3203
  }
3201
- var _ = b(r, u, a), R = _.newCalculatedDate, F = _.newCalculatedMonth;
3204
+ var k = N(r, u, a), T = k.newCalculatedDate, R = k.newCalculatedMonth;
3202
3205
  switch (r) {
3203
3206
  case y.ArrowRight:
3204
3207
  case y.ArrowLeft:
3205
3208
  case y.ArrowUp:
3206
3209
  case y.ArrowDown:
3207
- t.handleMonthNavigation(F, R);
3210
+ t.handleMonthNavigation(R, T);
3208
3211
  break;
3209
3212
  }
3210
3213
  }
@@ -3281,10 +3284,10 @@ var xo = (
3281
3284
  var r = t.props, a = r.chooseDayAriaLabelPrefix, s = a === void 0 ? "Choose" : a, i = r.disabledDayAriaLabelPrefix, l = i === void 0 ? "Not available" : i, u = r.day, c = r.locale, d = re(u, e), p = t.isDisabled(d) || t.isExcluded(d) ? l : s;
3282
3285
  return "".concat(p, " ").concat(W(d, "MMMM yyyy", c));
3283
3286
  }, t.getQuarterClassNames = function(e) {
3284
- var r = t.props, a = r.day, s = r.startDate, i = r.endDate, l = r.minDate, u = r.maxDate, c = r.excludeDates, d = r.includeDates, p = r.filterDate, f = r.preSelection, m = r.disabledKeyboardNavigation, D = r.disabled, h = (l || u || c || d || p || D) && ze(Re(a, e), t.props), g = t.getSelection();
3287
+ var r = t.props, a = r.day, s = r.startDate, i = r.endDate, l = r.minDate, u = r.maxDate, c = r.excludeDates, d = r.includeDates, p = r.filterDate, f = r.preSelection, m = r.disabledKeyboardNavigation, g = r.disabled, h = (l || u || c || d || p || g) && ze(Re(a, e), t.props), D = t.getSelection();
3285
3288
  return G("react-datepicker__quarter-text", "react-datepicker__quarter-".concat(e), {
3286
3289
  "react-datepicker__quarter-text--disabled": h,
3287
- "react-datepicker__quarter-text--selected": g ? t.isSelectQuarterInList(a, e, g) : void 0,
3290
+ "react-datepicker__quarter-text--selected": D ? t.isSelectQuarterInList(a, e, D) : void 0,
3288
3291
  "react-datepicker__quarter-text--keyboard-selected": !m && f && t.isSelectedQuarter(a, e, f) && !t.isQuarterSelected() && !h,
3289
3292
  "react-datepicker__quarter-text--in-selecting-range": t.isInSelectingRangeQuarter(e),
3290
3293
  "react-datepicker__quarter-text--in-range": s && i ? Ze(s, i, e, a) : void 0,
@@ -3451,7 +3454,7 @@ var xo = (
3451
3454
  );
3452
3455
  function To(o, n) {
3453
3456
  for (var t = [], e = we(o), r = we(n); !Se(e, r); )
3454
- t.push(N(e)), e = me(e, 1);
3457
+ t.push(Y(e)), e = me(e, 1);
3455
3458
  return t;
3456
3459
  }
3457
3460
  var Oo = (
@@ -3519,7 +3522,7 @@ var Oo = (
3519
3522
  return e && r.unshift(t.renderDropdown()), r;
3520
3523
  }, t.onChange = function(e) {
3521
3524
  t.toggleDropdown();
3522
- var r = N(e);
3525
+ var r = Y(e);
3523
3526
  ce(t.props.date, r) && J(t.props.date, r) || t.props.onChange(r);
3524
3527
  }, t.toggleDropdown = function() {
3525
3528
  return t.setState({
@@ -3570,8 +3573,8 @@ var Oo = (
3570
3573
  var a, s;
3571
3574
  e.key === y.Space && (e.preventDefault(), e.key = y.Enter), (e.key === y.ArrowUp || e.key === y.ArrowLeft) && e.target instanceof HTMLElement && e.target.previousSibling && (e.preventDefault(), e.target.previousSibling instanceof HTMLElement && e.target.previousSibling.focus()), (e.key === y.ArrowDown || e.key === y.ArrowRight) && e.target instanceof HTMLElement && e.target.nextSibling && (e.preventDefault(), e.target.nextSibling instanceof HTMLElement && e.target.nextSibling.focus()), e.key === y.Enter && t.handleClick(r), (s = (a = t.props).handleOnKeyDown) === null || s === void 0 || s.call(a, e);
3572
3575
  }, t.renderTimes = function() {
3573
- for (var e, r = [], a = typeof t.props.format == "string" ? t.props.format : "p", s = (e = t.props.intervals) !== null && e !== void 0 ? e : n.defaultProps.intervals, i = t.props.selected || t.props.openToDate || N(), l = We(i), u = t.props.injectTimes && t.props.injectTimes.sort(function(h, g) {
3574
- return h.getTime() - g.getTime();
3576
+ for (var e, r = [], a = typeof t.props.format == "string" ? t.props.format : "p", s = (e = t.props.intervals) !== null && e !== void 0 ? e : n.defaultProps.intervals, i = t.props.selected || t.props.openToDate || Y(), l = We(i), u = t.props.injectTimes && t.props.injectTimes.sort(function(h, D) {
3577
+ return h.getTime() - D.getTime();
3575
3578
  }), c = 60 * bo(i), d = c / s, p = 0; p < d; p++) {
3576
3579
  var f = Ke(l, p * s);
3577
3580
  if (r.push(f), u) {
@@ -3579,15 +3582,15 @@ var Oo = (
3579
3582
  r = r.concat(m);
3580
3583
  }
3581
3584
  }
3582
- var D = r.reduce(function(h, g) {
3583
- return g.getTime() <= i.getTime() ? g : h;
3585
+ var g = r.reduce(function(h, D) {
3586
+ return D.getTime() <= i.getTime() ? D : h;
3584
3587
  }, r[0]);
3585
3588
  return r.map(function(h) {
3586
- return v.createElement("li", { key: h.valueOf(), onClick: t.handleClick.bind(t, h), className: t.liClasses(h), ref: function(g) {
3587
- h === D && (t.centerLi = g);
3588
- }, onKeyDown: function(g) {
3589
- t.handleOnKeyDown(g, h);
3590
- }, tabIndex: h === D ? 0 : -1, role: "option", "aria-selected": t.isSelectedTime(h) ? "true" : void 0, "aria-disabled": t.isDisabledTime(h) ? "true" : void 0 }, W(h, a, t.props.locale));
3589
+ return v.createElement("li", { key: h.valueOf(), onClick: t.handleClick.bind(t, h), className: t.liClasses(h), ref: function(D) {
3590
+ h === g && (t.centerLi = D);
3591
+ }, onKeyDown: function(D) {
3592
+ t.handleOnKeyDown(D, h);
3593
+ }, tabIndex: h === g ? 0 : -1, role: "option", "aria-selected": t.isSelectedTime(h) ? "true" : void 0, "aria-disabled": t.isDisabledTime(h) ? "true" : void 0 }, W(h, a, t.props.locale));
3591
3594
  });
3592
3595
  }, t.renderTimeCaption = function() {
3593
3596
  return t.props.showTimeCaption === !1 ? v.createElement(v.Fragment, null) : v.createElement(
@@ -3684,13 +3687,13 @@ var Oo = (
3684
3687
  e.isDisabled(a) || e.isExcluded(a) || ((i = (s = e.props).setPreSelection) === null || i === void 0 || i.call(s, a), r - f < 0 ? e.updateFocusOnPaginate(p - (f - r)) : r - f >= p ? e.updateFocusOnPaginate(Math.abs(p - (r - f))) : (u = (l = e.YEAR_REFS[r - f]) === null || l === void 0 ? void 0 : l.current) === null || u === void 0 || u.focus());
3685
3688
  }
3686
3689
  }, e.isSameDay = function(r, a) {
3687
- return T(r, a);
3690
+ return O(r, a);
3688
3691
  }, e.isCurrentYear = function(r) {
3689
- return r === P(N());
3692
+ return r === P(Y());
3690
3693
  }, e.isRangeStart = function(r) {
3691
- return e.props.startDate && e.props.endDate && ce(le(N(), r), e.props.startDate);
3694
+ return e.props.startDate && e.props.endDate && ce(le(Y(), r), e.props.startDate);
3692
3695
  }, e.isRangeEnd = function(r) {
3693
- return e.props.startDate && e.props.endDate && ce(le(N(), r), e.props.endDate);
3696
+ return e.props.startDate && e.props.endDate && ce(le(Y(), r), e.props.endDate);
3694
3697
  }, e.isInRange = function(r) {
3695
3698
  return Xe(r, e.props.startDate, e.props.endDate);
3696
3699
  }, e.isInSelectingRange = function(r) {
@@ -3700,18 +3703,18 @@ var Oo = (
3700
3703
  var a;
3701
3704
  if (!e.isInSelectingRange(r))
3702
3705
  return !1;
3703
- var s = e.props, i = s.startDate, l = s.selectsStart, u = le(N(), r);
3706
+ var s = e.props, i = s.startDate, l = s.selectsStart, u = le(Y(), r);
3704
3707
  return l ? ce(u, (a = e.selectingDate()) !== null && a !== void 0 ? a : null) : ce(u, i ?? null);
3705
3708
  }, e.isSelectingRangeEnd = function(r) {
3706
3709
  var a;
3707
3710
  if (!e.isInSelectingRange(r))
3708
3711
  return !1;
3709
- var s = e.props, i = s.endDate, l = s.selectsEnd, u = s.selectsRange, c = le(N(), r);
3712
+ var s = e.props, i = s.endDate, l = s.selectsEnd, u = s.selectsRange, c = le(Y(), r);
3710
3713
  return l || u ? ce(c, (a = e.selectingDate()) !== null && a !== void 0 ? a : null) : ce(c, i ?? null);
3711
3714
  }, e.isKeyboardSelected = function(r) {
3712
3715
  if (!(e.props.disabledKeyboardNavigation || e.props.date === void 0 || e.props.preSelection == null)) {
3713
- var a = e.props, s = a.minDate, i = a.maxDate, l = a.excludeDates, u = a.includeDates, c = a.filterDate, d = a.selected, p = Qe(le(e.props.date, r)), f = (s || i || l || u || c) && at(r, e.props), m = !!d && T(p, Qe(d)), D = T(p, Qe(e.props.preSelection));
3714
- return !e.props.inline && !m && D && !f;
3716
+ var a = e.props, s = a.minDate, i = a.maxDate, l = a.excludeDates, u = a.includeDates, c = a.filterDate, d = a.selected, p = Qe(le(e.props.date, r)), f = (s || i || l || u || c) && at(r, e.props), m = !!d && O(p, Qe(d)), g = O(p, Qe(e.props.preSelection));
3717
+ return !e.props.inline && !m && g && !f;
3715
3718
  }
3716
3719
  }, e.isSelectedYear = function(r) {
3717
3720
  var a = e.props, s = a.selectsMultiple, i = a.selected, l = a.selectedDates;
@@ -3743,23 +3746,23 @@ var Oo = (
3743
3746
  case y.ArrowUp: {
3744
3747
  if (c === void 0 || d === void 0 || e.props.preSelection == null)
3745
3748
  break;
3746
- var f = ge(c, d).startPeriod, m = dr, D = a - m;
3747
- if (D < f) {
3749
+ var f = ge(c, d).startPeriod, m = dr, g = a - m;
3750
+ if (g < f) {
3748
3751
  var h = d % m;
3749
- a >= f && a < f + h ? m = h : m += h, D = a - m;
3752
+ a >= f && a < f + h ? m = h : m += h, g = a - m;
3750
3753
  }
3751
- e.handleYearNavigation(D, Ye(e.props.preSelection, m));
3754
+ e.handleYearNavigation(g, Ye(e.props.preSelection, m));
3752
3755
  break;
3753
3756
  }
3754
3757
  case y.ArrowDown: {
3755
3758
  if (c === void 0 || d === void 0 || e.props.preSelection == null)
3756
3759
  break;
3757
- var g = ge(c, d).endPeriod, m = dr, D = a + m;
3758
- if (D > g) {
3760
+ var D = ge(c, d).endPeriod, m = dr, g = a + m;
3761
+ if (g > D) {
3759
3762
  var h = d % m;
3760
- a <= g && a > g - h ? m = h : m += h, D = a + m;
3763
+ a <= D && a > D - h ? m = h : m += h, g = a + m;
3761
3764
  }
3762
- e.handleYearNavigation(D, ye(e.props.preSelection, m));
3765
+ e.handleYearNavigation(g, ye(e.props.preSelection, m));
3763
3766
  break;
3764
3767
  }
3765
3768
  }
@@ -3791,20 +3794,20 @@ var Oo = (
3791
3794
  var t = this, e = [], r = this.props, a = r.date, s = r.yearItemNumber, i = r.onYearMouseEnter, l = r.onYearMouseLeave;
3792
3795
  if (a === void 0)
3793
3796
  return null;
3794
- for (var u = ge(a, s), c = u.startPeriod, d = u.endPeriod, p = function(D) {
3795
- e.push(v.createElement("div", { ref: f.YEAR_REFS[D - c], onClick: function(h) {
3796
- t.onYearClick(h, D);
3797
+ for (var u = ge(a, s), c = u.startPeriod, d = u.endPeriod, p = function(g) {
3798
+ e.push(v.createElement("div", { ref: f.YEAR_REFS[g - c], onClick: function(h) {
3799
+ t.onYearClick(h, g);
3797
3800
  }, onKeyDown: function(h) {
3798
- Wr(h) && (h.preventDefault(), h.key = y.Enter), t.onYearKeyDown(h, D);
3799
- }, tabIndex: Number(f.getYearTabIndex(D)), className: f.getYearClassNames(D), onMouseEnter: f.props.usePointerEvent ? void 0 : function(h) {
3800
- return i(h, D);
3801
+ Wr(h) && (h.preventDefault(), h.key = y.Enter), t.onYearKeyDown(h, g);
3802
+ }, tabIndex: Number(f.getYearTabIndex(g)), className: f.getYearClassNames(g), onMouseEnter: f.props.usePointerEvent ? void 0 : function(h) {
3803
+ return i(h, g);
3801
3804
  }, onPointerEnter: f.props.usePointerEvent ? function(h) {
3802
- return i(h, D);
3805
+ return i(h, g);
3803
3806
  } : void 0, onMouseLeave: f.props.usePointerEvent ? void 0 : function(h) {
3804
- return l(h, D);
3807
+ return l(h, g);
3805
3808
  }, onPointerLeave: f.props.usePointerEvent ? function(h) {
3806
- return l(h, D);
3807
- } : void 0, key: D, "aria-current": f.isCurrentYear(D) ? "date" : void 0 }, f.getYearContent(D)));
3809
+ return l(h, g);
3810
+ } : void 0, key: g, "aria-current": f.isCurrentYear(g) ? "date" : void 0 }, f.getYearContent(g)));
3808
3811
  }, f = this, m = c; m <= d; m++)
3809
3812
  p(m);
3810
3813
  return v.createElement(
@@ -3990,7 +3993,7 @@ var Lo = (
3990
3993
  var a, s;
3991
3994
  Ho(r.target) && ((s = (a = e.props).onDropdownFocus) === null || s === void 0 || s.call(a, r));
3992
3995
  }, e.getDateInView = function() {
3993
- var r = e.props, a = r.preSelection, s = r.selected, i = r.openToDate, l = Fr(e.props), u = Ar(e.props), c = N(), d = i || s || a;
3996
+ var r = e.props, a = r.preSelection, s = r.selected, i = r.openToDate, l = Fr(e.props), u = Ar(e.props), c = Y(), d = i || s || a;
3994
3997
  return d || (l && pe(c, l) ? l : u && Se(c, u) ? u : c);
3995
3998
  }, e.increaseMonth = function() {
3996
3999
  e.setState(function(r) {
@@ -4017,7 +4020,7 @@ var Lo = (
4017
4020
  }, e.handleMonthMouseLeave = function() {
4018
4021
  e.setState({ selectingDate: void 0 }), e.props.onMonthMouseLeave && e.props.onMonthMouseLeave();
4019
4022
  }, e.handleYearMouseEnter = function(r, a) {
4020
- e.setState({ selectingDate: le(N(), a) }), e.props.onYearMouseEnter && e.props.onYearMouseEnter(r, a);
4023
+ e.setState({ selectingDate: le(Y(), a) }), e.props.onYearMouseEnter && e.props.onYearMouseEnter(r, a);
4021
4024
  }, e.handleYearMouseLeave = function(r, a) {
4022
4025
  e.props.onYearMouseLeave && e.props.onYearMouseLeave(r, a);
4023
4026
  }, e.handleYearChange = function(r) {
@@ -4130,11 +4133,11 @@ var Lo = (
4130
4133
  "react-datepicker__navigation--previous"
4131
4134
  ], m = e.decreaseMonth;
4132
4135
  (e.props.showMonthYearPicker || e.props.showQuarterYearPicker || e.props.showYearPicker) && (m = e.decreaseYear), d && e.props.showDisabledMonthNavigation && (f.push("react-datepicker__navigation--previous--disabled"), m = void 0);
4133
- var D = e.props.showMonthYearPicker || e.props.showQuarterYearPicker || e.props.showYearPicker, h = e.props, g = h.previousMonthButtonLabel, w = g === void 0 ? n.defaultProps.previousMonthButtonLabel : g, b = h.previousYearButtonLabel, _ = b === void 0 ? n.defaultProps.previousYearButtonLabel : b, R = e.props, F = R.previousMonthAriaLabel, L = F === void 0 ? typeof w == "string" ? w : "Previous Month" : F, k = R.previousYearAriaLabel, x = k === void 0 ? typeof _ == "string" ? _ : "Previous Year" : k;
4136
+ var g = e.props.showMonthYearPicker || e.props.showQuarterYearPicker || e.props.showYearPicker, h = e.props, D = h.previousMonthButtonLabel, w = D === void 0 ? n.defaultProps.previousMonthButtonLabel : D, N = h.previousYearButtonLabel, k = N === void 0 ? n.defaultProps.previousYearButtonLabel : N, T = e.props, R = T.previousMonthAriaLabel, _ = R === void 0 ? typeof w == "string" ? w : "Previous Month" : R, b = T.previousYearAriaLabel, x = b === void 0 ? typeof k == "string" ? k : "Previous Year" : b;
4134
4137
  return v.createElement(
4135
4138
  "button",
4136
- { type: "button", className: f.join(" "), onClick: m, onKeyDown: e.props.handleOnKeyDown, "aria-label": D ? x : L },
4137
- v.createElement("span", { className: p.join(" ") }, D ? _ : w)
4139
+ { type: "button", className: f.join(" "), onClick: m, onKeyDown: e.props.handleOnKeyDown, "aria-label": g ? x : _ },
4140
+ v.createElement("span", { className: p.join(" ") }, g ? k : w)
4138
4141
  );
4139
4142
  }
4140
4143
  }
@@ -4179,10 +4182,10 @@ var Lo = (
4179
4182
  e.props.showTimeSelect && s.push("react-datepicker__navigation--next--with-time"), e.props.todayButton && s.push("react-datepicker__navigation--next--with-today-button");
4180
4183
  var l = e.increaseMonth;
4181
4184
  (e.props.showMonthYearPicker || e.props.showQuarterYearPicker || e.props.showYearPicker) && (l = e.increaseYear), a && e.props.showDisabledMonthNavigation && (s.push("react-datepicker__navigation--next--disabled"), l = void 0);
4182
- var u = e.props.showMonthYearPicker || e.props.showQuarterYearPicker || e.props.showYearPicker, c = e.props, d = c.nextMonthButtonLabel, p = d === void 0 ? n.defaultProps.nextMonthButtonLabel : d, f = c.nextYearButtonLabel, m = f === void 0 ? n.defaultProps.nextYearButtonLabel : f, D = e.props, h = D.nextMonthAriaLabel, g = h === void 0 ? typeof p == "string" ? p : "Next Month" : h, w = D.nextYearAriaLabel, b = w === void 0 ? typeof m == "string" ? m : "Next Year" : w;
4185
+ var u = e.props.showMonthYearPicker || e.props.showQuarterYearPicker || e.props.showYearPicker, c = e.props, d = c.nextMonthButtonLabel, p = d === void 0 ? n.defaultProps.nextMonthButtonLabel : d, f = c.nextYearButtonLabel, m = f === void 0 ? n.defaultProps.nextYearButtonLabel : f, g = e.props, h = g.nextMonthAriaLabel, D = h === void 0 ? typeof p == "string" ? p : "Next Month" : h, w = g.nextYearAriaLabel, N = w === void 0 ? typeof m == "string" ? m : "Next Year" : w;
4183
4186
  return v.createElement(
4184
4187
  "button",
4185
- { type: "button", className: s.join(" "), onClick: l, onKeyDown: e.props.handleOnKeyDown, "aria-label": u ? b : g },
4188
+ { type: "button", className: s.join(" "), onClick: l, onKeyDown: e.props.handleOnKeyDown, "aria-label": u ? N : D },
4186
4189
  v.createElement("span", { className: i.join(" ") }, u ? m : p)
4187
4190
  );
4188
4191
  }
@@ -4227,14 +4230,14 @@ var Lo = (
4227
4230
  return null;
4228
4231
  var u = e.props, c = u.showYearPicker, d = u.yearItemNumber, p;
4229
4232
  if (c) {
4230
- var f = ge(i, d), m = f.startPeriod, D = f.endPeriod;
4233
+ var f = ge(i, d), m = f.startPeriod, g = f.endPeriod;
4231
4234
  p = {
4232
4235
  startYear: m,
4233
- endYear: D
4236
+ endYear: g
4234
4237
  };
4235
4238
  }
4236
- var h = rr(e.state.date, e.props), g = nr(e.state.date, e.props), w = ar(e.state.date, e.props), b = or(e.state.date, e.props);
4237
- return v.createElement("div", { className: "react-datepicker__header react-datepicker__header--custom", onFocus: e.props.onDropdownFocus }, (s = (a = e.props).renderCustomHeader) === null || s === void 0 ? void 0 : s.call(a, E(E(E({}, e.state), c && { visibleYearsRange: p }), { customHeaderCount: l, monthDate: i, changeMonth: e.changeMonth, changeYear: e.changeYear, decreaseMonth: e.decreaseMonth, increaseMonth: e.increaseMonth, decreaseYear: e.decreaseYear, increaseYear: e.increaseYear, prevMonthButtonDisabled: h, nextMonthButtonDisabled: g, prevYearButtonDisabled: w, nextYearButtonDisabled: b })));
4239
+ var h = rr(e.state.date, e.props), D = nr(e.state.date, e.props), w = ar(e.state.date, e.props), N = or(e.state.date, e.props);
4240
+ return v.createElement("div", { className: "react-datepicker__header react-datepicker__header--custom", onFocus: e.props.onDropdownFocus }, (s = (a = e.props).renderCustomHeader) === null || s === void 0 ? void 0 : s.call(a, E(E(E({}, e.state), c && { visibleYearsRange: p }), { customHeaderCount: l, monthDate: i, changeMonth: e.changeMonth, changeYear: e.changeYear, decreaseMonth: e.decreaseMonth, increaseMonth: e.increaseMonth, decreaseYear: e.decreaseYear, increaseYear: e.increaseYear, prevMonthButtonDisabled: h, nextMonthButtonDisabled: D, prevYearButtonDisabled: w, nextYearButtonDisabled: N })));
4238
4241
  }, e.renderYearHeader = function(r) {
4239
4242
  var a = r.monthDate, s = e.props, i = s.showYearPicker, l = s.yearItemNumber, u = l === void 0 ? n.defaultProps.yearItemNumber : l, c = ge(a, u), d = c.startPeriod, p = c.endPeriod;
4240
4243
  return v.createElement("div", { className: "react-datepicker__header react-datepicker-year-header" }, i ? "".concat(d, " - ").concat(p) : P(a));
@@ -4252,14 +4255,14 @@ var Lo = (
4252
4255
  var r, a;
4253
4256
  if (!(e.props.showTimeSelectOnly || e.props.showYearPicker)) {
4254
4257
  for (var s = [], i = (r = e.props.monthsShown) !== null && r !== void 0 ? r : n.defaultProps.monthsShown, l = e.props.showPreviousMonths ? i - 1 : 0, u = e.props.showMonthYearPicker || e.props.showQuarterYearPicker ? ye(e.state.date, l) : Te(e.state.date, l), c = (a = e.props.monthSelectedIn) !== null && a !== void 0 ? a : l, d = 0; d < i; ++d) {
4255
- var p = d - c + l, f = e.props.showMonthYearPicker || e.props.showQuarterYearPicker ? ye(u, p) : me(u, p), m = "month-".concat(d), D = d < i - 1, h = d > 0;
4258
+ var p = d - c + l, f = e.props.showMonthYearPicker || e.props.showQuarterYearPicker ? ye(u, p) : me(u, p), m = "month-".concat(d), g = d < i - 1, h = d > 0;
4256
4259
  s.push(v.createElement(
4257
4260
  "div",
4258
- { key: m, ref: function(g) {
4259
- e.monthContainer = g ?? void 0;
4261
+ { key: m, ref: function(D) {
4262
+ e.monthContainer = D ?? void 0;
4260
4263
  }, className: "react-datepicker__month-container" },
4261
4264
  e.renderHeader({ monthDate: f, i: d }),
4262
- v.createElement(xo, E({}, n.defaultProps, e.props, { containerRef: e.containerRef, ariaLabelPrefix: e.props.monthAriaLabelPrefix, day: f, onDayClick: e.handleDayClick, handleOnKeyDown: e.props.handleOnDayKeyDown, handleOnMonthKeyDown: e.props.handleOnKeyDown, onDayMouseEnter: e.handleDayMouseEnter, onMouseLeave: e.handleMonthMouseLeave, orderInDisplay: d, selectingDate: e.state.selectingDate, monthShowsDuplicateDaysEnd: D, monthShowsDuplicateDaysStart: h, dayNamesHeader: e.renderDayNamesHeader(f) }))
4265
+ v.createElement(xo, E({}, n.defaultProps, e.props, { containerRef: e.containerRef, ariaLabelPrefix: e.props.monthAriaLabelPrefix, day: f, onDayClick: e.handleDayClick, handleOnKeyDown: e.props.handleOnDayKeyDown, handleOnMonthKeyDown: e.props.handleOnKeyDown, onDayMouseEnter: e.handleDayMouseEnter, onMouseLeave: e.handleMonthMouseLeave, orderInDisplay: d, selectingDate: e.state.selectingDate, monthShowsDuplicateDaysEnd: g, monthShowsDuplicateDaysStart: h, dayNamesHeader: e.renderDayNamesHeader(f) }))
4263
4266
  ));
4264
4267
  }
4265
4268
  return s;
@@ -4318,14 +4321,14 @@ var Lo = (
4318
4321
  })());
4319
4322
  }, n.prototype.componentDidUpdate = function(t) {
4320
4323
  var e = this;
4321
- if (this.props.preSelection && ne(this.props.preSelection) && (!T(this.props.preSelection, t.preSelection) || this.props.monthSelectedIn !== t.monthSelectedIn)) {
4324
+ if (this.props.preSelection && ne(this.props.preSelection) && (!O(this.props.preSelection, t.preSelection) || this.props.monthSelectedIn !== t.monthSelectedIn)) {
4322
4325
  var r = !J(this.state.date, this.props.preSelection);
4323
4326
  this.setState({
4324
4327
  date: this.props.preSelection
4325
4328
  }, function() {
4326
4329
  return r && e.handleCustomMonthChange(e.state.date);
4327
4330
  });
4328
- } else this.props.openToDate && !T(this.props.openToDate, t.openToDate) && this.setState({
4331
+ } else this.props.openToDate && !O(this.props.openToDate, t.openToDate) && this.setState({
4329
4332
  date: this.props.openToDate
4330
4333
  });
4331
4334
  }, n.prototype.render = function() {
@@ -4450,11 +4453,11 @@ var Vo = function(o) {
4450
4453
  );
4451
4454
  }
4452
4455
  o.popperContainer && (f = pn(o.popperContainer, {}, f)), u && !r && (f = v.createElement(Br, { portalId: u, portalHost: c }, f));
4453
- var D = G("react-datepicker-wrapper", t);
4456
+ var g = G("react-datepicker-wrapper", t);
4454
4457
  return v.createElement(
4455
4458
  v.Fragment,
4456
4459
  null,
4457
- v.createElement("div", { ref: d.refs.setReference, className: D }, s),
4460
+ v.createElement("div", { ref: d.refs.setReference, className: g }, s),
4458
4461
  f
4459
4462
  );
4460
4463
  }, qo = Uo(Vo);
@@ -4468,7 +4471,7 @@ var wt = "Date input not valid.", $o = (
4468
4471
  function n(t) {
4469
4472
  var e = o.call(this, t) || this;
4470
4473
  return e.calendar = null, e.input = null, e.getPreSelection = function() {
4471
- return e.props.openToDate ? e.props.openToDate : e.props.selectsEnd && e.props.startDate ? e.props.startDate : e.props.selectsStart && e.props.endDate ? e.props.endDate : N();
4474
+ return e.props.openToDate ? e.props.openToDate : e.props.selectsEnd && e.props.startDate ? e.props.startDate : e.props.selectsStart && e.props.endDate ? e.props.endDate : Y();
4472
4475
  }, e.modifyHolidays = function() {
4473
4476
  var r;
4474
4477
  return (r = e.props.holidays) === null || r === void 0 ? void 0 : r.reduce(function(a, s) {
@@ -4493,16 +4496,16 @@ var wt = "Date input not valid.", $o = (
4493
4496
  wasHidden: !1
4494
4497
  };
4495
4498
  }, e.getInputValue = function() {
4496
- var r, a = e.props, s = a.locale, i = a.startDate, l = a.endDate, u = a.rangeSeparator, c = a.selected, d = a.selectedDates, p = a.selectsMultiple, f = a.selectsRange, m = a.value, D = (r = e.props.dateFormat) !== null && r !== void 0 ? r : n.defaultProps.dateFormat, h = e.state.inputValue;
4499
+ var r, a = e.props, s = a.locale, i = a.startDate, l = a.endDate, u = a.rangeSeparator, c = a.selected, d = a.selectedDates, p = a.selectsMultiple, f = a.selectsRange, m = a.value, g = (r = e.props.dateFormat) !== null && r !== void 0 ? r : n.defaultProps.dateFormat, h = e.state.inputValue;
4497
4500
  return typeof m == "string" ? m : typeof h == "string" ? h : f ? ro(i, l, {
4498
- dateFormat: D,
4501
+ dateFormat: g,
4499
4502
  locale: s,
4500
4503
  rangeSeparator: u
4501
4504
  }) : p ? no(d ?? [], {
4502
- dateFormat: D,
4505
+ dateFormat: g,
4503
4506
  locale: s
4504
4507
  }) : te(c, {
4505
- dateFormat: D,
4508
+ dateFormat: g,
4506
4509
  locale: s
4507
4510
  });
4508
4511
  }, e.resetHiddenStatus = function() {
@@ -4575,31 +4578,31 @@ var wt = "Date input not valid.", $o = (
4575
4578
  inputValue: d?.target instanceof HTMLInputElement ? d.target.value : null,
4576
4579
  lastPreSelectChange: Go
4577
4580
  });
4578
- var p = e.props, f = p.selectsRange, m = p.startDate, D = p.endDate, h = (r = e.props.dateFormat) !== null && r !== void 0 ? r : n.defaultProps.dateFormat, g = (a = e.props.strictParsing) !== null && a !== void 0 ? a : n.defaultProps.strictParsing, w = d?.target instanceof HTMLInputElement ? d.target.value : "";
4581
+ var p = e.props, f = p.selectsRange, m = p.startDate, g = p.endDate, h = (r = e.props.dateFormat) !== null && r !== void 0 ? r : n.defaultProps.dateFormat, D = (a = e.props.strictParsing) !== null && a !== void 0 ? a : n.defaultProps.strictParsing, w = d?.target instanceof HTMLInputElement ? d.target.value : "";
4579
4582
  if (f) {
4580
- var b = e.props.rangeSeparator, _ = b.trim(), R = w.split(h.includes(_) ? b : _, 2).map(function(O) {
4581
- return O.trim();
4582
- }), F = R[0], L = R[1], k = Ne(F ?? "", h, e.props.locale, g), x = k ? Ne(L ?? "", h, e.props.locale, g) : null, A = m?.getTime() !== k?.getTime(), I = D?.getTime() !== x?.getTime();
4583
- if (!A && !I || k && oe(k, e.props) || x && oe(x, e.props))
4583
+ var N = e.props.rangeSeparator, k = N.trim(), T = w.split(h.includes(k) ? N : k, 2).map(function(I) {
4584
+ return I.trim();
4585
+ }), R = T[0], _ = T[1], b = Ne(R ?? "", h, e.props.locale, D), x = b ? Ne(_ ?? "", h, e.props.locale, D) : null, A = m?.getTime() !== b?.getTime(), L = g?.getTime() !== x?.getTime();
4586
+ if (!A && !L || b && oe(b, e.props) || x && oe(x, e.props))
4584
4587
  return;
4585
- (i = (s = e.props).onChange) === null || i === void 0 || i.call(s, [k, x], d);
4588
+ (i = (s = e.props).onChange) === null || i === void 0 || i.call(s, [b, x], d);
4586
4589
  } else {
4587
- var C = Ne(w, h, e.props.locale, g, (l = e.props.selected) !== null && l !== void 0 ? l : void 0);
4590
+ var C = Ne(w, h, e.props.locale, D, (l = e.props.selected) !== null && l !== void 0 ? l : void 0);
4588
4591
  (C || !w) && e.setSelected(C, d, !0);
4589
4592
  }
4590
4593
  }
4591
4594
  }, e.handleSelect = function(r, a, s) {
4592
4595
  var i;
4593
4596
  if (!e.props.readOnly) {
4594
- var l = e.props, u = l.selectsRange, c = l.startDate, d = l.endDate, p = l.locale, f = l.swapRange, m = (i = e.props.dateFormat) !== null && i !== void 0 ? i : n.defaultProps.dateFormat, D = !u || c && !d && (f || !gt(r, c));
4595
- if (e.props.shouldCloseOnSelect && !e.props.showTimeSelect && D && e.sendFocusBackToInput(), e.props.onChangeRaw) {
4597
+ var l = e.props, u = l.selectsRange, c = l.startDate, d = l.endDate, p = l.locale, f = l.swapRange, m = (i = e.props.dateFormat) !== null && i !== void 0 ? i : n.defaultProps.dateFormat, g = !u || c && !d && (f || !gt(r, c));
4598
+ if (e.props.shouldCloseOnSelect && !e.props.showTimeSelect && g && e.sendFocusBackToInput(), e.props.onChangeRaw) {
4596
4599
  var h = te(r, {
4597
4600
  dateFormat: m,
4598
4601
  locale: p
4599
4602
  });
4600
4603
  e.props.onChangeRaw(a, { date: r, formattedDate: h });
4601
4604
  }
4602
- e.setSelected(r, a, !1, s), e.props.showDateSelect && e.setState({ isRenderAriaLiveMessage: !0 }), !e.props.shouldCloseOnSelect || e.props.showTimeSelect ? e.setPreSelection(r) : D && e.setOpen(!1);
4605
+ e.setSelected(r, a, !1, s), e.props.showDateSelect && e.setState({ isRenderAriaLiveMessage: !0 }), !e.props.shouldCloseOnSelect || e.props.showTimeSelect ? e.setPreSelection(r) : g && e.setOpen(!1);
4603
4606
  }
4604
4607
  }, e.setSelected = function(r, a, s, i) {
4605
4608
  var l, u, c = r;
@@ -4611,7 +4614,7 @@ var wt = "Date input not valid.", $o = (
4611
4614
  return;
4612
4615
  } else if (c !== null && oe(c, e.props))
4613
4616
  return;
4614
- var d = e.props, p = d.onChange, f = d.selectsRange, m = d.startDate, D = d.endDate, h = d.selectsMultiple, g = d.selectedDates, w = d.minTime, b = d.swapRange;
4617
+ var d = e.props, p = d.onChange, f = d.selectsRange, m = d.startDate, g = d.endDate, h = d.selectsMultiple, D = d.selectedDates, w = d.minTime, N = d.swapRange;
4615
4618
  if (!Pe(e.props.selected, c) || e.props.allowSameDay || f || h)
4616
4619
  if (c !== null && (e.props.selected && (!s || !e.props.showTimeSelect && !e.props.showTimeSelectOnly && !e.props.showTimeInput) && (c = $e(c, {
4617
4620
  hour: se(e.props.selected),
@@ -4624,23 +4627,23 @@ var wt = "Date input not valid.", $o = (
4624
4627
  })), e.props.inline || e.setState({
4625
4628
  preSelection: c
4626
4629
  }), e.props.focusSelectedMonth || e.setState({ monthSelectedIn: i })), f) {
4627
- var _ = !m && !D, R = m && !D, F = !m && !!D, L = m && D;
4628
- _ ? p?.([c, null], a) : R ? c === null ? p?.([null, null], a) : gt(c, m) ? p?.(b ? [c, m] : [c, null], a) : p?.([m, c], a) : F && (c && gt(c, D) ? p?.([c, D], a) : p?.([c, null], a)), L && p?.([c, null], a);
4630
+ var k = !m && !g, T = m && !g, R = !m && !!g, _ = m && g;
4631
+ k ? p?.([c, null], a) : T ? c === null ? p?.([null, null], a) : gt(c, m) ? p?.(N ? [c, m] : [c, null], a) : p?.([m, c], a) : R && (c && gt(c, g) ? p?.([c, g], a) : p?.([c, null], a)), _ && p?.([c, null], a);
4629
4632
  } else if (h) {
4630
4633
  if (c !== null)
4631
- if (!g?.length)
4634
+ if (!D?.length)
4632
4635
  p?.([c], a);
4633
4636
  else {
4634
- var k = g.some(function(A) {
4635
- return T(A, c);
4637
+ var b = D.some(function(A) {
4638
+ return O(A, c);
4636
4639
  });
4637
- if (k) {
4638
- var x = g.filter(function(A) {
4639
- return !T(A, c);
4640
+ if (b) {
4641
+ var x = D.filter(function(A) {
4642
+ return !O(A, c);
4640
4643
  });
4641
4644
  p?.(x, a);
4642
4645
  } else
4643
- p?.(he(he([], g, !0), [c], !1), a);
4646
+ p?.(he(he([], D, !0), [c], !1), a);
4644
4647
  }
4645
4648
  } else
4646
4649
  p?.(c, a);
@@ -4681,56 +4684,56 @@ var wt = "Date input not valid.", $o = (
4681
4684
  var r, a;
4682
4685
  !e.props.disabled && !e.props.readOnly && e.setOpen(!0), (a = (r = e.props).onInputClick) === null || a === void 0 || a.call(r);
4683
4686
  }, e.handleTimeOnlyArrowKey = function(r) {
4684
- var a, s, i, l, u = e.props.selected || e.state.preSelection || N(), c = (a = e.props.timeIntervals) !== null && a !== void 0 ? a : 30, d = (s = e.props.dateFormat) !== null && s !== void 0 ? s : n.defaultProps.dateFormat, p = Array.isArray(d) ? d[0] : d, f = We(u), m = se(u) * 60 + ie(u), D = 1440 - c, h;
4687
+ var a, s, i, l, u = e.props.selected || e.state.preSelection || Y(), c = (a = e.props.timeIntervals) !== null && a !== void 0 ? a : 30, d = (s = e.props.dateFormat) !== null && s !== void 0 ? s : n.defaultProps.dateFormat, p = Array.isArray(d) ? d[0] : d, f = We(u), m = se(u) * 60 + ie(u), g = 1440 - c, h;
4685
4688
  if (r === y.ArrowUp) {
4686
- var g = Math.max(0, m - c);
4687
- h = Ke(f, g);
4689
+ var D = Math.max(0, m - c);
4690
+ h = Ke(f, D);
4688
4691
  } else {
4689
- var g = Math.min(D, m + c);
4690
- h = Ke(f, g);
4692
+ var D = Math.min(g, m + c);
4693
+ h = Ke(f, D);
4691
4694
  }
4692
4695
  var w = W(h, p || n.defaultProps.dateFormat, e.props.locale);
4693
4696
  if (e.setState({
4694
4697
  preSelection: h,
4695
4698
  inputValue: w
4696
4699
  }), !(e.props.selectsRange || e.props.selectsMultiple)) {
4697
- var b = e.props.selected ? e.props.selected : e.getPreSelection(), _ = e.props.selected ? h : $e(b, {
4700
+ var N = e.props.selected ? e.props.selected : e.getPreSelection(), k = e.props.selected ? h : $e(N, {
4698
4701
  hour: se(h),
4699
4702
  minute: ie(h)
4700
4703
  });
4701
- (l = (i = e.props).onChange) === null || l === void 0 || l.call(i, _), (e.props.showTimeSelectOnly || e.props.showTimeSelect) && e.setState({ isRenderAriaLiveMessage: !0 }), requestAnimationFrame(function() {
4704
+ (l = (i = e.props).onChange) === null || l === void 0 || l.call(i, k), (e.props.showTimeSelectOnly || e.props.showTimeSelect) && e.setState({ isRenderAriaLiveMessage: !0 }), requestAnimationFrame(function() {
4702
4705
  e.scrollToTimeOption(h);
4703
4706
  });
4704
4707
  }
4705
4708
  }, e.handleTimeOnlyEnterKey = function(r) {
4706
- var a, s, i, l, u = r.target, c = u.value, d = (a = e.props.dateFormat) !== null && a !== void 0 ? a : n.defaultProps.dateFormat, p = e.props.timeFormat || "p", f = e.state.preSelection || e.props.selected || N(), m = Ne(c, d, e.props.locale, (s = e.props.strictParsing) !== null && s !== void 0 ? s : !1, f), D = f;
4709
+ var a, s, i, l, u = r.target, c = u.value, d = (a = e.props.dateFormat) !== null && a !== void 0 ? a : n.defaultProps.dateFormat, p = e.props.timeFormat || "p", f = e.state.preSelection || e.props.selected || Y(), m = Ne(c, d, e.props.locale, (s = e.props.strictParsing) !== null && s !== void 0 ? s : !1, f), g = f;
4707
4710
  if (m && ne(m))
4708
- D = m;
4711
+ g = m;
4709
4712
  else {
4710
4713
  var h = ((i = e.calendar) === null || i === void 0 ? void 0 : i.containerRef.current) instanceof Element && e.calendar.containerRef.current.querySelector(".react-datepicker__time-list-item[tabindex='0']");
4711
4714
  if (h instanceof HTMLElement) {
4712
- var g = (l = h.textContent) === null || l === void 0 ? void 0 : l.trim();
4713
- if (g) {
4714
- var w = Ne(g, p, e.props.locale, !1, f);
4715
- w && ne(w) && (D = w);
4715
+ var D = (l = h.textContent) === null || l === void 0 ? void 0 : l.trim();
4716
+ if (D) {
4717
+ var w = Ne(D, p, e.props.locale, !1, f);
4718
+ w && ne(w) && (g = w);
4716
4719
  }
4717
4720
  }
4718
4721
  }
4719
- e.handleTimeChange(D), e.setOpen(!1), e.sendFocusBackToInput();
4722
+ e.handleTimeChange(g), e.setOpen(!1), e.sendFocusBackToInput();
4720
4723
  }, e.scrollToTimeOption = function(r) {
4721
4724
  var a, s;
4722
4725
  if (!((a = e.calendar) === null || a === void 0) && a.containerRef.current) {
4723
4726
  for (var i = e.calendar.containerRef.current, l = Array.from(i.querySelectorAll(".react-datepicker__time-list-item")), u = null, c = 1 / 0, d = e.props.timeFormat || "p", p = 0, f = l; p < f.length; p++) {
4724
- var m = f[p], D = (s = m.textContent) === null || s === void 0 ? void 0 : s.trim();
4725
- if (D) {
4726
- var h = Ne(D, d, e.props.locale, !1, r);
4727
+ var m = f[p], g = (s = m.textContent) === null || s === void 0 ? void 0 : s.trim();
4728
+ if (g) {
4729
+ var h = Ne(g, d, e.props.locale, !1, r);
4727
4730
  if (h && ne(h)) {
4728
4731
  if (Hr(h, r)) {
4729
4732
  u = m;
4730
4733
  break;
4731
4734
  }
4732
- var g = Math.abs(h.getTime() - r.getTime());
4733
- g < c && (c = g, u = m);
4735
+ var D = Math.abs(h.getTime() - r.getTime());
4736
+ D < c && (c = D, u = m);
4734
4737
  }
4735
4738
  }
4736
4739
  }
@@ -4766,7 +4769,7 @@ var wt = "Date input not valid.", $o = (
4766
4769
  f instanceof HTMLElement && f.focus({ preventScroll: !0 });
4767
4770
  return;
4768
4771
  }
4769
- var m = N(e.state.preSelection);
4772
+ var m = Y(e.state.preSelection);
4770
4773
  d === y.Enter ? (r.preventDefault(), r.target.blur(), e.inputOk() && e.state.lastPreSelectChange === bt ? (e.handleSelect(m, r), !e.props.shouldCloseOnSelect && e.setPreSelection(m)) : e.setOpen(!1)) : d === y.Escape ? (r.preventDefault(), r.target.blur(), e.sendFocusBackToInput(), e.setOpen(!1)) : d === y.Tab && e.setOpen(!1), e.inputOk() || (c = (u = e.props).onInputError) === null || c === void 0 || c.call(u, { code: 1, msg: wt });
4771
4774
  }
4772
4775
  }, e.onPortalKeyDown = function(r) {
@@ -4779,56 +4782,56 @@ var wt = "Date input not valid.", $o = (
4779
4782
  });
4780
4783
  }));
4781
4784
  }, e.onDayKeyDown = function(r) {
4782
- var a, s, i, l, u, c, d = e.props, p = d.minDate, f = d.maxDate, m = d.disabledKeyboardNavigation, D = d.showWeekPicker, h = d.shouldCloseOnSelect, g = d.locale, w = d.calendarStartDay, b = d.adjustDateOnChange, _ = d.inline;
4785
+ var a, s, i, l, u, c, d = e.props, p = d.minDate, f = d.maxDate, m = d.disabledKeyboardNavigation, g = d.showWeekPicker, h = d.shouldCloseOnSelect, D = d.locale, w = d.calendarStartDay, N = d.adjustDateOnChange, k = d.inline;
4783
4786
  if ((s = (a = e.props).onKeyDown) === null || s === void 0 || s.call(a, r), !m) {
4784
- var R = r.key, F = r.shiftKey, L = N(e.state.preSelection), k = function(I, C) {
4785
- var O = C;
4786
- switch (I) {
4787
+ var T = r.key, R = r.shiftKey, _ = Y(e.state.preSelection), b = function(L, C) {
4788
+ var I = C;
4789
+ switch (L) {
4787
4790
  case y.ArrowRight:
4788
- O = D ? it(C, 1) : ve(C, 1);
4791
+ I = g ? it(C, 1) : ve(C, 1);
4789
4792
  break;
4790
4793
  case y.ArrowLeft:
4791
- O = D ? Kt(C) : rn(C, 1);
4794
+ I = g ? Kt(C) : rn(C, 1);
4792
4795
  break;
4793
4796
  case y.ArrowUp:
4794
- O = Kt(C);
4797
+ I = Kt(C);
4795
4798
  break;
4796
4799
  case y.ArrowDown:
4797
- O = it(C, 1);
4800
+ I = it(C, 1);
4798
4801
  break;
4799
4802
  case y.PageUp:
4800
- O = F ? Ye(C, 1) : Te(C, 1);
4803
+ I = R ? Ye(C, 1) : Te(C, 1);
4801
4804
  break;
4802
4805
  case y.PageDown:
4803
- O = F ? ye(C, 1) : me(C, 1);
4806
+ I = R ? ye(C, 1) : me(C, 1);
4804
4807
  break;
4805
4808
  case y.Home:
4806
- O = Me(C, g, w);
4809
+ I = Me(C, D, w);
4807
4810
  break;
4808
4811
  case y.End:
4809
- O = so(C);
4812
+ I = so(C);
4810
4813
  break;
4811
4814
  }
4812
- return O;
4813
- }, x = function(I, C) {
4814
- for (var O = 40, B = I, j = !1, U = 0, H = k(I, C); !j; ) {
4815
- if (U >= O) {
4815
+ return I;
4816
+ }, x = function(L, C) {
4817
+ for (var I = 40, B = L, j = !1, U = 0, H = b(L, C); !j; ) {
4818
+ if (U >= I) {
4816
4819
  H = C;
4817
4820
  break;
4818
4821
  }
4819
- p && H < p && (B = y.ArrowRight, H = oe(p, e.props) ? k(B, H) : p), f && H > f && (B = y.ArrowLeft, H = oe(f, e.props) ? k(B, H) : f), oe(H, e.props) ? ((B === y.PageUp || B === y.Home) && (B = y.ArrowRight), (B === y.PageDown || B === y.End) && (B = y.ArrowLeft), H = k(B, H)) : j = !0, U++;
4822
+ p && H < p && (B = y.ArrowRight, H = oe(p, e.props) ? b(B, H) : p), f && H > f && (B = y.ArrowLeft, H = oe(f, e.props) ? b(B, H) : f), oe(H, e.props) ? ((B === y.PageUp || B === y.Home) && (B = y.ArrowRight), (B === y.PageDown || B === y.End) && (B = y.ArrowLeft), H = b(B, H)) : j = !0, U++;
4820
4823
  }
4821
4824
  return H;
4822
4825
  };
4823
- if (R === y.Enter) {
4824
- r.preventDefault(), e.handleSelect(L, r), !h && e.setPreSelection(L);
4826
+ if (T === y.Enter) {
4827
+ r.preventDefault(), e.handleSelect(_, r), !h && e.setPreSelection(_);
4825
4828
  return;
4826
- } else if (R === y.Escape) {
4829
+ } else if (T === y.Escape) {
4827
4830
  r.preventDefault(), e.setOpen(!1), e.inputOk() || (l = (i = e.props).onInputError) === null || l === void 0 || l.call(i, { code: 1, msg: wt });
4828
4831
  return;
4829
4832
  }
4830
4833
  var A = null;
4831
- switch (R) {
4834
+ switch (T) {
4832
4835
  case y.ArrowLeft:
4833
4836
  case y.ArrowRight:
4834
4837
  case y.ArrowUp:
@@ -4837,14 +4840,14 @@ var wt = "Date input not valid.", $o = (
4837
4840
  case y.PageDown:
4838
4841
  case y.Home:
4839
4842
  case y.End:
4840
- A = x(R, L);
4843
+ A = x(T, _);
4841
4844
  break;
4842
4845
  }
4843
4846
  if (!A) {
4844
4847
  (c = (u = e.props).onInputError) === null || c === void 0 || c.call(u, { code: 1, msg: wt });
4845
4848
  return;
4846
4849
  }
4847
- r.preventDefault(), e.setState({ lastPreSelectChange: bt }), b && e.setSelected(A), e.setPreSelection(A), _ && e.setState({ shouldFocusDayInline: !0 });
4850
+ r.preventDefault(), e.setState({ lastPreSelectChange: bt }), N && e.setSelected(A), e.setPreSelection(A), k && e.setState({ shouldFocusDayInline: !0 });
4848
4851
  }
4849
4852
  }, e.onPopperKeyDown = function(r) {
4850
4853
  var a = r.key;
@@ -4878,13 +4881,13 @@ var wt = "Date input not valid.", $o = (
4878
4881
  locale: a
4879
4882
  })), v.createElement("span", { role: "alert", "aria-live": "polite", className: "react-datepicker__aria-live" }, u);
4880
4883
  }, e.renderDateInput = function() {
4881
- var r, a, s, i, l, u, c = G(e.props.className, (r = {}, r[e.props.outsideClickIgnoreClass || n.defaultProps.outsideClickIgnoreClass] = e.state.open, r)), d = e.props.customInput || v.createElement("input", { type: "text" }), p = e.props.customInputRef || "ref", f = {}, m = (s = e.props["aria-describedby"]) !== null && s !== void 0 ? s : e.props.ariaDescribedBy, D = (i = e.props["aria-invalid"]) !== null && i !== void 0 ? i : e.props.ariaInvalid, h = (l = e.props["aria-labelledby"]) !== null && l !== void 0 ? l : e.props.ariaLabelledBy, g = (u = e.props["aria-required"]) !== null && u !== void 0 ? u : e.props.ariaRequired;
4882
- return m != null && (f["aria-describedby"] = m), D != null && (f["aria-invalid"] = D), h != null && (f["aria-labelledby"] = h), g != null && (f["aria-required"] = g), br(d, E((a = {}, a[p] = function(w) {
4884
+ var r, a, s, i, l, u, c = G(e.props.className, (r = {}, r[e.props.outsideClickIgnoreClass || n.defaultProps.outsideClickIgnoreClass] = e.state.open, r)), d = e.props.customInput || v.createElement("input", { type: "text" }), p = e.props.customInputRef || "ref", f = {}, m = (s = e.props["aria-describedby"]) !== null && s !== void 0 ? s : e.props.ariaDescribedBy, g = (i = e.props["aria-invalid"]) !== null && i !== void 0 ? i : e.props.ariaInvalid, h = (l = e.props["aria-labelledby"]) !== null && l !== void 0 ? l : e.props.ariaLabelledBy, D = (u = e.props["aria-required"]) !== null && u !== void 0 ? u : e.props.ariaRequired;
4885
+ return m != null && (f["aria-describedby"] = m), g != null && (f["aria-invalid"] = g), h != null && (f["aria-labelledby"] = h), D != null && (f["aria-required"] = D), br(d, E((a = {}, a[p] = function(w) {
4883
4886
  e.input = w;
4884
4887
  }, a.value = e.getInputValue(), a.onBlur = e.handleBlur, a.onChange = e.handleChange, a.onClick = e.onInputClick, a.onFocus = e.handleFocus, a.onKeyDown = e.onInputKeyDown, a.id = e.props.id, a.name = e.props.name, a.form = e.props.form, a.autoFocus = e.props.autoFocus, a.placeholder = e.props.placeholderText, a.disabled = e.props.disabled, a.autoComplete = e.props.autoComplete, a.className = G(d.props.className, c), a.title = e.props.title, a.readOnly = e.props.readOnly, a.required = e.props.required, a.tabIndex = e.props.tabIndex, a), f));
4885
4888
  }, e.renderClearButton = function() {
4886
- var r = e.props, a = r.isClearable, s = r.disabled, i = r.selected, l = r.startDate, u = r.endDate, c = r.clearButtonTitle, d = r.clearButtonClassName, p = d === void 0 ? "" : d, f = r.ariaLabelClose, m = f === void 0 ? "Close" : f, D = r.selectedDates, h = r.readOnly;
4887
- return a && !h && (i != null || l != null || u != null || D?.length) ? v.createElement("button", { type: "button", className: G("react-datepicker__close-icon", p, { "react-datepicker__close-icon--disabled": s }), disabled: s, "aria-label": m, onClick: e.onClearClick, title: c, tabIndex: -1 }) : null;
4889
+ var r = e.props, a = r.isClearable, s = r.disabled, i = r.selected, l = r.startDate, u = r.endDate, c = r.clearButtonTitle, d = r.clearButtonClassName, p = d === void 0 ? "" : d, f = r.ariaLabelClose, m = f === void 0 ? "Close" : f, g = r.selectedDates, h = r.readOnly;
4890
+ return a && !h && (i != null || l != null || u != null || g?.length) ? v.createElement("button", { type: "button", className: G("react-datepicker__close-icon", p, { "react-datepicker__close-icon--disabled": s }), disabled: s, "aria-label": m, onClick: e.onClearClick, title: c, tabIndex: -1 }) : null;
4888
4891
  }, e.state = e.calcInitialState(), e.preventFocusTimeout = void 0, e;
4889
4892
  }
4890
4893
  return Object.defineProperty(n, "defaultProps", {
@@ -4999,14 +5002,14 @@ const zo = fn(
4999
5002
  hint: p,
5000
5003
  feedback: f,
5001
5004
  preventOpenOnFocus: m,
5002
- fixedPopper: D = !1,
5005
+ fixedPopper: g = !1,
5003
5006
  ...h
5004
- }, g) => {
5007
+ }, D) => {
5005
5008
  const w = hn(() => {
5006
5009
  if (n == null) return null;
5007
- const _ = new fe(n, s);
5008
- return an(_) ? _ : n;
5009
- }, [n, s]), b = a ?? Xo(r);
5010
+ const k = new fe(n, s);
5011
+ return an(k) ? k : n;
5012
+ }, [n, s]), N = a ?? Xo(r);
5010
5013
  return /* @__PURE__ */ ae.jsx(
5011
5014
  on,
5012
5015
  {
@@ -5019,15 +5022,15 @@ const zo = fn(
5019
5022
  /* @__PURE__ */ ae.jsx(
5020
5023
  $o,
5021
5024
  {
5022
- ref: g,
5023
- popperProps: D ? {
5025
+ ref: D,
5026
+ popperProps: g ? {
5024
5027
  strategy: "fixed"
5025
5028
  } : void 0,
5026
5029
  selected: w,
5027
5030
  onChange: o,
5028
- dateFormat: b,
5031
+ dateFormat: N,
5029
5032
  showTimeSelect: r,
5030
- placeholderText: c === !0 ? b.toLowerCase() : i,
5033
+ placeholderText: c === !0 ? N.toLowerCase() : i,
5031
5034
  minDate: l,
5032
5035
  openToDate: w ?? l,
5033
5036
  className: sn(