@spear-ai/spectral 1.8.0 → 1.8.1

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.
@@ -146,19 +146,19 @@ function Pn(e) {
146
146
  function Mt(e) {
147
147
  const t = ie(e.timeZone, e), r = t > 0 ? Math.floor(t) : Math.ceil(t), n = /* @__PURE__ */ new Date(+e);
148
148
  n.setUTCHours(n.getUTCHours() - 1);
149
- const o = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset(), i = -(/* @__PURE__ */ new Date(+n)).getTimezoneOffset(), a = o - i, s = Date.prototype.getHours.apply(e) !== e.internal.getUTCHours();
150
- a && s && e.internal.setUTCMinutes(e.internal.getUTCMinutes() + a);
149
+ const o = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset(), a = -(/* @__PURE__ */ new Date(+n)).getTimezoneOffset(), i = o - a, s = Date.prototype.getHours.apply(e) !== e.internal.getUTCHours();
150
+ i && s && e.internal.setUTCMinutes(e.internal.getUTCMinutes() + i);
151
151
  const c = o - r;
152
152
  c && Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + c);
153
153
  const u = /* @__PURE__ */ new Date(+e);
154
154
  u.setUTCSeconds(0);
155
155
  const f = o > 0 ? u.getSeconds() : (u.getSeconds() - 60) % 60, l = Math.round(-(ie(e.timeZone, e) * 60)) % 60;
156
156
  (l || f) && (e.internal.setUTCSeconds(e.internal.getUTCSeconds() + l), Date.prototype.setUTCSeconds.call(e, Date.prototype.getUTCSeconds.call(e) + l + f));
157
- const h = ie(e.timeZone, e), b = h > 0 ? Math.floor(h) : Math.ceil(h), C = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset() - b, D = b !== r, v = C - c;
158
- if (D && v) {
159
- Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + v);
160
- const T = ie(e.timeZone, e), w = T > 0 ? Math.floor(T) : Math.ceil(T), k = b - w;
161
- k && (e.internal.setUTCMinutes(e.internal.getUTCMinutes() + k), Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + k));
157
+ const h = ie(e.timeZone, e), g = h > 0 ? Math.floor(h) : Math.ceil(h), C = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset() - g, O = g !== r, T = C - c;
158
+ if (O && T) {
159
+ Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + T);
160
+ const M = ie(e.timeZone, e), b = M > 0 ? Math.floor(M) : Math.ceil(M), D = g - b;
161
+ D && (e.internal.setUTCMinutes(e.internal.getUTCMinutes() + D), Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + D));
162
162
  }
163
163
  }
164
164
  class A extends J {
@@ -233,12 +233,12 @@ function Ot(e, t, r) {
233
233
  if (isNaN(t)) return I(e, NaN);
234
234
  if (!t)
235
235
  return n;
236
- const o = n.getDate(), i = I(e, n.getTime());
237
- i.setMonth(n.getMonth() + t + 1, 0);
238
- const a = i.getDate();
239
- return o >= a ? i : (n.setFullYear(
240
- i.getFullYear(),
241
- i.getMonth(),
236
+ const o = n.getDate(), a = I(e, n.getTime());
237
+ a.setMonth(n.getMonth() + t + 1, 0);
238
+ const i = a.getDate();
239
+ return o >= i ? a : (n.setFullYear(
240
+ a.getFullYear(),
241
+ a.getMonth(),
242
242
  o
243
243
  ), n);
244
244
  }
@@ -247,8 +247,8 @@ function De() {
247
247
  return _n;
248
248
  }
249
249
  function de(e, t) {
250
- const r = De(), n = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? r.weekStartsOn ?? r.locale?.options?.weekStartsOn ?? 0, o = P(e, t?.in), i = o.getDay(), a = (i < n ? 7 : 0) + i - n;
251
- return o.setDate(o.getDate() - a), o.setHours(0, 0, 0, 0), o;
250
+ const r = De(), n = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? r.weekStartsOn ?? r.locale?.options?.weekStartsOn ?? 0, o = P(e, t?.in), a = o.getDay(), i = (a < n ? 7 : 0) + a - n;
251
+ return o.setDate(o.getDate() - i), o.setHours(0, 0, 0, 0), o;
252
252
  }
253
253
  function we(e, t) {
254
254
  return de(e, { ...t, weekStartsOn: 1 });
@@ -256,10 +256,10 @@ function we(e, t) {
256
256
  function vt(e, t) {
257
257
  const r = P(e, t?.in), n = r.getFullYear(), o = I(r, 0);
258
258
  o.setFullYear(n + 1, 0, 4), o.setHours(0, 0, 0, 0);
259
- const i = we(o), a = I(r, 0);
260
- a.setFullYear(n, 0, 4), a.setHours(0, 0, 0, 0);
261
- const s = we(a);
262
- return r.getTime() >= i.getTime() ? n + 1 : r.getTime() >= s.getTime() ? n : n - 1;
259
+ const a = we(o), i = I(r, 0);
260
+ i.setFullYear(n, 0, 4), i.setHours(0, 0, 0, 0);
261
+ const s = we(i);
262
+ return r.getTime() >= a.getTime() ? n + 1 : r.getTime() >= s.getTime() ? n : n - 1;
263
263
  }
264
264
  function lt(e) {
265
265
  const t = P(e), r = new Date(
@@ -291,7 +291,7 @@ function Qe(e, t, r) {
291
291
  r?.in,
292
292
  e,
293
293
  t
294
- ), i = Me(n), a = Me(o), s = +i - lt(i), c = +a - lt(a);
294
+ ), a = Me(n), i = Me(o), s = +a - lt(a), c = +i - lt(i);
295
295
  return Math.round((s - c) / En);
296
296
  }
297
297
  function Fn(e, t) {
@@ -308,16 +308,16 @@ function Hn(e, t) {
308
308
  let r, n = t?.in;
309
309
  return e.forEach((o) => {
310
310
  !n && typeof o == "object" && (n = I.bind(null, o));
311
- const i = P(o, n);
312
- (!r || r < i || isNaN(+i)) && (r = i);
311
+ const a = P(o, n);
312
+ (!r || r < a || isNaN(+a)) && (r = a);
313
313
  }), I(n, r || NaN);
314
314
  }
315
315
  function An(e, t) {
316
316
  let r, n = t?.in;
317
317
  return e.forEach((o) => {
318
318
  !n && typeof o == "object" && (n = I.bind(null, o));
319
- const i = P(o, n);
320
- (!r || r > i || isNaN(+i)) && (r = i);
319
+ const a = P(o, n);
320
+ (!r || r > a || isNaN(+a)) && (r = a);
321
321
  }), I(n, r || NaN);
322
322
  }
323
323
  function qn(e, t, r) {
@@ -339,8 +339,8 @@ function St(e, t, r) {
339
339
  r?.in,
340
340
  e,
341
341
  t
342
- ), i = n.getFullYear() - o.getFullYear(), a = n.getMonth() - o.getMonth();
343
- return i * 12 + a;
342
+ ), a = n.getFullYear() - o.getFullYear(), i = n.getMonth() - o.getMonth();
343
+ return a * 12 + i;
344
344
  }
345
345
  function Gn(e, t) {
346
346
  const r = P(e, t?.in), n = r.getMonth();
@@ -353,12 +353,12 @@ function Ct(e, t) {
353
353
  function $n(e, t) {
354
354
  const { start: r, end: n } = Ct(t?.in, e);
355
355
  let o = +r > +n;
356
- const i = o ? +r : +n, a = o ? n : r;
357
- a.setHours(0, 0, 0, 0), a.setDate(1);
356
+ const a = o ? +r : +n, i = o ? n : r;
357
+ i.setHours(0, 0, 0, 0), i.setDate(1);
358
358
  let s = 1;
359
359
  const c = [];
360
- for (; +a <= i; )
361
- c.push(I(r, a)), a.setMonth(a.getMonth() + s);
360
+ for (; +i <= a; )
361
+ c.push(I(r, i)), i.setMonth(i.getMonth() + s);
362
362
  return o ? c.reverse() : c;
363
363
  }
364
364
  function Rn(e, t) {
@@ -376,17 +376,17 @@ function Nt(e, t) {
376
376
  function Qn(e, t) {
377
377
  const { start: r, end: n } = Ct(t?.in, e);
378
378
  let o = +r > +n;
379
- const i = o ? +r : +n, a = o ? n : r;
380
- a.setHours(0, 0, 0, 0), a.setMonth(0, 1);
379
+ const a = o ? +r : +n, i = o ? n : r;
380
+ i.setHours(0, 0, 0, 0), i.setMonth(0, 1);
381
381
  let s = 1;
382
382
  const c = [];
383
- for (; +a <= i; )
384
- c.push(I(r, a)), a.setFullYear(a.getFullYear() + s);
383
+ for (; +i <= a; )
384
+ c.push(I(r, i)), i.setFullYear(i.getFullYear() + s);
385
385
  return o ? c.reverse() : c;
386
386
  }
387
387
  function Yt(e, t) {
388
- const r = De(), n = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? r.weekStartsOn ?? r.locale?.options?.weekStartsOn ?? 0, o = P(e, t?.in), i = o.getDay(), a = (i < n ? -7 : 0) + 6 - (i - n);
389
- return o.setDate(o.getDate() + a), o.setHours(23, 59, 59, 999), o;
388
+ const r = De(), n = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? r.weekStartsOn ?? r.locale?.options?.weekStartsOn ?? 0, o = P(e, t?.in), a = o.getDay(), i = (a < n ? -7 : 0) + 6 - (a - n);
389
+ return o.setDate(o.getDate() + i), o.setHours(23, 59, 59, 999), o;
390
390
  }
391
391
  function Xn(e, t) {
392
392
  return Yt(e, { ...t, weekStartsOn: 1 });
@@ -505,14 +505,14 @@ function me(e) {
505
505
  const n = r?.context ? String(r.context) : "standalone";
506
506
  let o;
507
507
  if (n === "formatting" && e.formattingValues) {
508
- const a = e.defaultFormattingWidth || e.defaultWidth, s = r?.width ? String(r.width) : a;
509
- o = e.formattingValues[s] || e.formattingValues[a];
508
+ const i = e.defaultFormattingWidth || e.defaultWidth, s = r?.width ? String(r.width) : i;
509
+ o = e.formattingValues[s] || e.formattingValues[i];
510
510
  } else {
511
- const a = e.defaultWidth, s = r?.width ? String(r.width) : e.defaultWidth;
512
- o = e.values[s] || e.values[a];
511
+ const i = e.defaultWidth, s = r?.width ? String(r.width) : e.defaultWidth;
512
+ o = e.values[s] || e.values[i];
513
513
  }
514
- const i = e.argumentCallback ? e.argumentCallback(t) : t;
515
- return o[i];
514
+ const a = e.argumentCallback ? e.argumentCallback(t) : t;
515
+ return o[a];
516
516
  };
517
517
  }
518
518
  const nr = {
@@ -668,19 +668,19 @@ const nr = {
668
668
  };
669
669
  function ye(e) {
670
670
  return (t, r = {}) => {
671
- const n = r.width, o = n && e.matchPatterns[n] || e.matchPatterns[e.defaultMatchWidth], i = t.match(o);
672
- if (!i)
671
+ const n = r.width, o = n && e.matchPatterns[n] || e.matchPatterns[e.defaultMatchWidth], a = t.match(o);
672
+ if (!a)
673
673
  return null;
674
- const a = i[0], s = n && e.parsePatterns[n] || e.parsePatterns[e.defaultParseWidth], c = Array.isArray(s) ? fr(s, (l) => l.test(a)) : (
674
+ const i = a[0], s = n && e.parsePatterns[n] || e.parsePatterns[e.defaultParseWidth], c = Array.isArray(s) ? fr(s, (l) => l.test(i)) : (
675
675
  // [TODO] -- I challenge you to fix the type
676
- lr(s, (l) => l.test(a))
676
+ lr(s, (l) => l.test(i))
677
677
  );
678
678
  let u;
679
679
  u = e.valueCallback ? e.valueCallback(c) : c, u = r.valueCallback ? (
680
680
  // [TODO] -- I challenge you to fix the type
681
681
  r.valueCallback(u)
682
682
  ) : u;
683
- const f = t.slice(a.length);
683
+ const f = t.slice(i.length);
684
684
  return { value: u, rest: f };
685
685
  };
686
686
  }
@@ -698,12 +698,12 @@ function dr(e) {
698
698
  return (t, r = {}) => {
699
699
  const n = t.match(e.matchPattern);
700
700
  if (!n) return null;
701
- const o = n[0], i = t.match(e.parsePattern);
702
- if (!i) return null;
703
- let a = e.valueCallback ? e.valueCallback(i[0]) : i[0];
704
- a = r.valueCallback ? r.valueCallback(a) : a;
701
+ const o = n[0], a = t.match(e.parsePattern);
702
+ if (!a) return null;
703
+ let i = e.valueCallback ? e.valueCallback(a[0]) : a[0];
704
+ i = r.valueCallback ? r.valueCallback(i) : i;
705
705
  const s = t.slice(o.length);
706
- return { value: a, rest: s };
706
+ return { value: i, rest: s };
707
707
  };
708
708
  }
709
709
  const hr = /^(\d+)(th|st|nd|rd)?/i, mr = /\d+/i, yr = {
@@ -831,16 +831,16 @@ function Xe(e, t) {
831
831
  return Math.round(n / Dt) + 1;
832
832
  }
833
833
  function Tt(e, t) {
834
- const r = P(e, t?.in), n = r.getFullYear(), o = De(), i = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? o.firstWeekContainsDate ?? o.locale?.options?.firstWeekContainsDate ?? 1, a = I(t?.in || e, 0);
835
- a.setFullYear(n + 1, 0, i), a.setHours(0, 0, 0, 0);
836
- const s = de(a, t), c = I(t?.in || e, 0);
837
- c.setFullYear(n, 0, i), c.setHours(0, 0, 0, 0);
834
+ const r = P(e, t?.in), n = r.getFullYear(), o = De(), a = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? o.firstWeekContainsDate ?? o.locale?.options?.firstWeekContainsDate ?? 1, i = I(t?.in || e, 0);
835
+ i.setFullYear(n + 1, 0, a), i.setHours(0, 0, 0, 0);
836
+ const s = de(i, t), c = I(t?.in || e, 0);
837
+ c.setFullYear(n, 0, a), c.setHours(0, 0, 0, 0);
838
838
  const u = de(c, t);
839
839
  return +r >= +s ? n + 1 : +r >= +u ? n : n - 1;
840
840
  }
841
841
  function Cr(e, t) {
842
- const r = De(), n = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? r.firstWeekContainsDate ?? r.locale?.options?.firstWeekContainsDate ?? 1, o = Tt(e, t), i = I(t?.in || e, 0);
843
- return i.setFullYear(o, 0, n), i.setHours(0, 0, 0, 0), de(i, t);
842
+ const r = De(), n = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? r.firstWeekContainsDate ?? r.locale?.options?.firstWeekContainsDate ?? 1, o = Tt(e, t), a = I(t?.in || e, 0);
843
+ return a.setFullYear(o, 0, n), a.setHours(0, 0, 0, 0), de(a, t);
844
844
  }
845
845
  function Ue(e, t) {
846
846
  const r = P(e, t?.in), n = +de(r, t) - +Cr(r, t);
@@ -937,12 +937,12 @@ const se = {
937
937
  },
938
938
  // Local week-numbering year
939
939
  Y: function(e, t, r, n) {
940
- const o = Tt(e, n), i = o > 0 ? o : 1 - o;
940
+ const o = Tt(e, n), a = o > 0 ? o : 1 - o;
941
941
  if (t === "YY") {
942
- const a = i % 100;
943
- return x(a, 2);
942
+ const i = a % 100;
943
+ return x(i, 2);
944
944
  }
945
- return t === "Yo" ? r.ordinalNumber(i, { unit: "year" }) : x(i, t.length);
945
+ return t === "Yo" ? r.ordinalNumber(a, { unit: "year" }) : x(a, t.length);
946
946
  },
947
947
  // ISO week-numbering year
948
948
  R: function(e, t) {
@@ -1133,17 +1133,17 @@ const se = {
1133
1133
  },
1134
1134
  // Local day of week
1135
1135
  e: function(e, t, r, n) {
1136
- const o = e.getDay(), i = (o - n.weekStartsOn + 8) % 7 || 7;
1136
+ const o = e.getDay(), a = (o - n.weekStartsOn + 8) % 7 || 7;
1137
1137
  switch (t) {
1138
1138
  // Numerical value (Nth day of week with current locale or weekStartsOn)
1139
1139
  case "e":
1140
- return String(i);
1140
+ return String(a);
1141
1141
  // Padded numerical value
1142
1142
  case "ee":
1143
- return x(i, 2);
1143
+ return x(a, 2);
1144
1144
  // 1st, 2nd, ..., 7th
1145
1145
  case "eo":
1146
- return r.ordinalNumber(i, { unit: "day" });
1146
+ return r.ordinalNumber(a, { unit: "day" });
1147
1147
  case "eee":
1148
1148
  return r.day(o, {
1149
1149
  width: "abbreviated",
@@ -1170,17 +1170,17 @@ const se = {
1170
1170
  },
1171
1171
  // Stand-alone local day of week
1172
1172
  c: function(e, t, r, n) {
1173
- const o = e.getDay(), i = (o - n.weekStartsOn + 8) % 7 || 7;
1173
+ const o = e.getDay(), a = (o - n.weekStartsOn + 8) % 7 || 7;
1174
1174
  switch (t) {
1175
1175
  // Numerical value (same as in `e`)
1176
1176
  case "c":
1177
- return String(i);
1177
+ return String(a);
1178
1178
  // Padded numerical value
1179
1179
  case "cc":
1180
- return x(i, t.length);
1180
+ return x(a, t.length);
1181
1181
  // 1st, 2nd, ..., 7th
1182
1182
  case "co":
1183
- return r.ordinalNumber(i, { unit: "day" });
1183
+ return r.ordinalNumber(a, { unit: "day" });
1184
1184
  case "ccc":
1185
1185
  return r.day(o, {
1186
1186
  width: "abbreviated",
@@ -1431,15 +1431,15 @@ const se = {
1431
1431
  }
1432
1432
  };
1433
1433
  function dt(e, t = "") {
1434
- const r = e > 0 ? "-" : "+", n = Math.abs(e), o = Math.trunc(n / 60), i = n % 60;
1435
- return i === 0 ? r + String(o) : r + String(o) + t + x(i, 2);
1434
+ const r = e > 0 ? "-" : "+", n = Math.abs(e), o = Math.trunc(n / 60), a = n % 60;
1435
+ return a === 0 ? r + String(o) : r + String(o) + t + x(a, 2);
1436
1436
  }
1437
1437
  function ht(e, t) {
1438
1438
  return e % 60 === 0 ? (e > 0 ? "-" : "+") + x(Math.abs(e) / 60, 2) : ae(e, t);
1439
1439
  }
1440
1440
  function ae(e, t = "") {
1441
- const r = e > 0 ? "-" : "+", n = Math.abs(e), o = x(Math.trunc(n / 60), 2), i = x(n % 60, 2);
1442
- return r + o + t + i;
1441
+ const r = e > 0 ? "-" : "+", n = Math.abs(e), o = x(Math.trunc(n / 60), 2), a = x(n % 60, 2);
1442
+ return r + o + t + a;
1443
1443
  }
1444
1444
  const mt = (e, t) => {
1445
1445
  switch (e) {
@@ -1467,22 +1467,22 @@ const mt = (e, t) => {
1467
1467
  const r = e.match(/(P+)(p+)?/) || [], n = r[1], o = r[2];
1468
1468
  if (!o)
1469
1469
  return mt(e, t);
1470
- let i;
1470
+ let a;
1471
1471
  switch (n) {
1472
1472
  case "P":
1473
- i = t.dateTime({ width: "short" });
1473
+ a = t.dateTime({ width: "short" });
1474
1474
  break;
1475
1475
  case "PP":
1476
- i = t.dateTime({ width: "medium" });
1476
+ a = t.dateTime({ width: "medium" });
1477
1477
  break;
1478
1478
  case "PPP":
1479
- i = t.dateTime({ width: "long" });
1479
+ a = t.dateTime({ width: "long" });
1480
1480
  break;
1481
1481
  default:
1482
- i = t.dateTime({ width: "full" });
1482
+ a = t.dateTime({ width: "full" });
1483
1483
  break;
1484
1484
  }
1485
- return i.replace("{{date}}", mt(n, t)).replace("{{time}}", xt(o, t));
1485
+ return a.replace("{{date}}", mt(n, t)).replace("{{time}}", xt(o, t));
1486
1486
  }, Yr = {
1487
1487
  p: xt,
1488
1488
  P: Nr
@@ -1503,7 +1503,7 @@ function Br(e, t, r) {
1503
1503
  }
1504
1504
  const Ir = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Hr = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Ar = /^'([^]*?)'?$/, qr = /''/g, jr = /[a-zA-Z]/;
1505
1505
  function pe(e, t, r) {
1506
- const n = De(), o = r?.locale ?? n.locale ?? fe, i = r?.firstWeekContainsDate ?? r?.locale?.options?.firstWeekContainsDate ?? n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, a = r?.weekStartsOn ?? r?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, s = P(e, r?.in);
1506
+ const n = De(), o = r?.locale ?? n.locale ?? fe, a = r?.firstWeekContainsDate ?? r?.locale?.options?.firstWeekContainsDate ?? n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, i = r?.weekStartsOn ?? r?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, s = P(e, r?.in);
1507
1507
  if (!jn(s))
1508
1508
  throw new RangeError("Invalid time value");
1509
1509
  let c = t.match(Hr).map((f) => {
@@ -1529,8 +1529,8 @@ function pe(e, t, r) {
1529
1529
  });
1530
1530
  o.localize.preprocessor && (c = o.localize.preprocessor(s, c));
1531
1531
  const u = {
1532
- firstWeekContainsDate: i,
1533
- weekStartsOn: a,
1532
+ firstWeekContainsDate: a,
1533
+ weekStartsOn: i,
1534
1534
  locale: o
1535
1535
  };
1536
1536
  return c.map((f) => {
@@ -1546,8 +1546,8 @@ function Gr(e) {
1546
1546
  return t ? t[1].replace(qr, "'") : e;
1547
1547
  }
1548
1548
  function $r(e, t) {
1549
- const r = P(e, t?.in), n = r.getFullYear(), o = r.getMonth(), i = I(r, 0);
1550
- return i.setFullYear(n, o + 1, 0), i.setHours(0, 0, 0, 0), i.getDate();
1549
+ const r = P(e, t?.in), n = r.getFullYear(), o = r.getMonth(), a = I(r, 0);
1550
+ return a.setFullYear(n, o + 1, 0), a.setHours(0, 0, 0, 0), a.getDate();
1551
1551
  }
1552
1552
  function Rr(e, t) {
1553
1553
  return P(e, t?.in).getMonth();
@@ -1578,10 +1578,10 @@ function Vr(e, t, r) {
1578
1578
  return n.getFullYear() === o.getFullYear();
1579
1579
  }
1580
1580
  function Zr(e, t, r) {
1581
- const n = P(e, r?.in), o = n.getFullYear(), i = n.getDate(), a = I(e, 0);
1582
- a.setFullYear(o, t, 15), a.setHours(0, 0, 0, 0);
1583
- const s = $r(a);
1584
- return n.setMonth(t, Math.min(i, s)), n;
1581
+ const n = P(e, r?.in), o = n.getFullYear(), a = n.getDate(), i = I(e, 0);
1582
+ i.setFullYear(o, t, 15), i.setHours(0, 0, 0, 0);
1583
+ const s = $r(i);
1584
+ return n.setMonth(t, Math.min(a, s)), n;
1585
1585
  }
1586
1586
  function Kr(e, t, r) {
1587
1587
  const n = P(e, r?.in);
@@ -1589,8 +1589,8 @@ function Kr(e, t, r) {
1589
1589
  }
1590
1590
  const yt = 5, Jr = 4;
1591
1591
  function Lr(e, t) {
1592
- const r = t.startOfMonth(e), n = r.getDay() > 0 ? r.getDay() : 7, o = t.addDays(e, -n + 1), i = t.addDays(o, yt * 7 - 1);
1593
- return t.getMonth(e) === t.getMonth(i) ? yt : Jr;
1592
+ const r = t.startOfMonth(e), n = r.getDay() > 0 ? r.getDay() : 7, o = t.addDays(e, -n + 1), a = t.addDays(o, yt * 7 - 1);
1593
+ return t.getMonth(e) === t.getMonth(a) ? yt : Jr;
1594
1594
  }
1595
1595
  function Pt(e, t) {
1596
1596
  const r = t.startOfMonth(e), n = r.getDay();
@@ -1605,9 +1605,9 @@ const Et = {
1605
1605
  labels: {
1606
1606
  labelDayButton: (e, t, r, n) => {
1607
1607
  let o;
1608
- n && typeof n.format == "function" ? o = n.format.bind(n) : o = (a, s) => pe(a, s, { locale: fe, ...r });
1609
- let i = o(e, "PPPP");
1610
- return t.today && (i = `Today, ${i}`), t.selected && (i = `${i}, selected`), i;
1608
+ n && typeof n.format == "function" ? o = n.format.bind(n) : o = (i, s) => pe(i, s, { locale: fe, ...r });
1609
+ let a = o(e, "PPPP");
1610
+ return t.today && (a = `Today, ${a}`), t.selected && (a = `${a}, selected`), a;
1611
1611
  },
1612
1612
  labelMonthDropdown: "Choose the Month",
1613
1613
  labelNext: "Go to the Next Month",
@@ -1616,19 +1616,19 @@ const Et = {
1616
1616
  labelYearDropdown: "Choose the Year",
1617
1617
  labelGrid: (e, t, r) => {
1618
1618
  let n;
1619
- return r && typeof r.format == "function" ? n = r.format.bind(r) : n = (o, i) => pe(o, i, { locale: fe, ...t }), n(e, "LLLL yyyy");
1619
+ return r && typeof r.format == "function" ? n = r.format.bind(r) : n = (o, a) => pe(o, a, { locale: fe, ...t }), n(e, "LLLL yyyy");
1620
1620
  },
1621
1621
  labelGridcell: (e, t, r, n) => {
1622
1622
  let o;
1623
- n && typeof n.format == "function" ? o = n.format.bind(n) : o = (a, s) => pe(a, s, { locale: fe, ...r });
1624
- let i = o(e, "PPPP");
1625
- return t?.today && (i = `Today, ${i}`), i;
1623
+ n && typeof n.format == "function" ? o = n.format.bind(n) : o = (i, s) => pe(i, s, { locale: fe, ...r });
1624
+ let a = o(e, "PPPP");
1625
+ return t?.today && (a = `Today, ${a}`), a;
1626
1626
  },
1627
1627
  labelNav: "Navigation bar",
1628
1628
  labelWeekNumberHeader: "Week Number",
1629
1629
  labelWeekday: (e, t, r) => {
1630
1630
  let n;
1631
- return r && typeof r.format == "function" ? n = r.format.bind(r) : n = (o, i) => pe(o, i, { locale: fe, ...t }), n(e, "cccc");
1631
+ return r && typeof r.format == "function" ? n = r.format.bind(r) : n = (o, a) => pe(o, a, { locale: fe, ...t }), n(e, "cccc");
1632
1632
  }
1633
1633
  }
1634
1634
  };
@@ -1640,17 +1640,17 @@ class G {
1640
1640
  * @param overrides Custom overrides for the date library functions.
1641
1641
  */
1642
1642
  constructor(t, r) {
1643
- this.Date = Date, this.today = () => this.overrides?.today ? this.overrides.today() : this.options.timeZone ? A.tz(this.options.timeZone) : new this.Date(), this.newDate = (n, o, i) => this.overrides?.newDate ? this.overrides.newDate(n, o, i) : this.options.timeZone ? new A(n, o, i, this.options.timeZone) : new Date(n, o, i), this.addDays = (n, o) => this.overrides?.addDays ? this.overrides.addDays(n, o) : kt(n, o), this.addMonths = (n, o) => this.overrides?.addMonths ? this.overrides.addMonths(n, o) : Ot(n, o), this.addWeeks = (n, o) => this.overrides?.addWeeks ? this.overrides.addWeeks(n, o) : Bn(n, o), this.addYears = (n, o) => this.overrides?.addYears ? this.overrides.addYears(n, o) : In(n, o), this.differenceInCalendarDays = (n, o) => this.overrides?.differenceInCalendarDays ? this.overrides.differenceInCalendarDays(n, o) : Qe(n, o), this.differenceInCalendarMonths = (n, o) => this.overrides?.differenceInCalendarMonths ? this.overrides.differenceInCalendarMonths(n, o) : St(n, o), this.eachMonthOfInterval = (n) => this.overrides?.eachMonthOfInterval ? this.overrides.eachMonthOfInterval(n) : $n(n), this.eachYearOfInterval = (n) => {
1644
- const o = this.overrides?.eachYearOfInterval ? this.overrides.eachYearOfInterval(n) : Qn(n), i = new Set(o.map((s) => this.getYear(s)));
1645
- if (i.size === o.length)
1643
+ this.Date = Date, this.today = () => this.overrides?.today ? this.overrides.today() : this.options.timeZone ? A.tz(this.options.timeZone) : new this.Date(), this.newDate = (n, o, a) => this.overrides?.newDate ? this.overrides.newDate(n, o, a) : this.options.timeZone ? new A(n, o, a, this.options.timeZone) : new Date(n, o, a), this.addDays = (n, o) => this.overrides?.addDays ? this.overrides.addDays(n, o) : kt(n, o), this.addMonths = (n, o) => this.overrides?.addMonths ? this.overrides.addMonths(n, o) : Ot(n, o), this.addWeeks = (n, o) => this.overrides?.addWeeks ? this.overrides.addWeeks(n, o) : Bn(n, o), this.addYears = (n, o) => this.overrides?.addYears ? this.overrides.addYears(n, o) : In(n, o), this.differenceInCalendarDays = (n, o) => this.overrides?.differenceInCalendarDays ? this.overrides.differenceInCalendarDays(n, o) : Qe(n, o), this.differenceInCalendarMonths = (n, o) => this.overrides?.differenceInCalendarMonths ? this.overrides.differenceInCalendarMonths(n, o) : St(n, o), this.eachMonthOfInterval = (n) => this.overrides?.eachMonthOfInterval ? this.overrides.eachMonthOfInterval(n) : $n(n), this.eachYearOfInterval = (n) => {
1644
+ const o = this.overrides?.eachYearOfInterval ? this.overrides.eachYearOfInterval(n) : Qn(n), a = new Set(o.map((s) => this.getYear(s)));
1645
+ if (a.size === o.length)
1646
1646
  return o;
1647
- const a = [];
1648
- return i.forEach((s) => {
1649
- a.push(new Date(s, 0, 1));
1650
- }), a;
1651
- }, this.endOfBroadcastWeek = (n) => this.overrides?.endOfBroadcastWeek ? this.overrides.endOfBroadcastWeek(n) : eo(n, this), this.endOfISOWeek = (n) => this.overrides?.endOfISOWeek ? this.overrides.endOfISOWeek(n) : Xn(n), this.endOfMonth = (n) => this.overrides?.endOfMonth ? this.overrides.endOfMonth(n) : Gn(n), this.endOfWeek = (n, o) => this.overrides?.endOfWeek ? this.overrides.endOfWeek(n, o) : Yt(n, this.options), this.endOfYear = (n) => this.overrides?.endOfYear ? this.overrides.endOfYear(n) : zn(n), this.format = (n, o, i) => {
1652
- const a = this.overrides?.format ? this.overrides.format(n, o, this.options) : pe(n, o, this.options);
1653
- return this.options.numerals && this.options.numerals !== "latn" ? this.replaceDigits(a) : a;
1647
+ const i = [];
1648
+ return a.forEach((s) => {
1649
+ i.push(new Date(s, 0, 1));
1650
+ }), i;
1651
+ }, this.endOfBroadcastWeek = (n) => this.overrides?.endOfBroadcastWeek ? this.overrides.endOfBroadcastWeek(n) : eo(n, this), this.endOfISOWeek = (n) => this.overrides?.endOfISOWeek ? this.overrides.endOfISOWeek(n) : Xn(n), this.endOfMonth = (n) => this.overrides?.endOfMonth ? this.overrides.endOfMonth(n) : Gn(n), this.endOfWeek = (n, o) => this.overrides?.endOfWeek ? this.overrides.endOfWeek(n, o) : Yt(n, this.options), this.endOfYear = (n) => this.overrides?.endOfYear ? this.overrides.endOfYear(n) : zn(n), this.format = (n, o, a) => {
1652
+ const i = this.overrides?.format ? this.overrides.format(n, o, this.options) : pe(n, o, this.options);
1653
+ return this.options.numerals && this.options.numerals !== "latn" ? this.replaceDigits(i) : i;
1654
1654
  }, this.getISOWeek = (n) => this.overrides?.getISOWeek ? this.overrides.getISOWeek(n) : Xe(n), this.getMonth = (n, o) => this.overrides?.getMonth ? this.overrides.getMonth(n, this.options) : Rr(n, this.options), this.getYear = (n, o) => this.overrides?.getYear ? this.overrides.getYear(n, this.options) : zr(n, this.options), this.getWeek = (n, o) => this.overrides?.getWeek ? this.overrides.getWeek(n, this.options) : Ue(n, this.options), this.isAfter = (n, o) => this.overrides?.isAfter ? this.overrides.isAfter(n, o) : Qr(n, o), this.isBefore = (n, o) => this.overrides?.isBefore ? this.overrides.isBefore(n, o) : Xr(n, o), this.isDate = (n) => this.overrides?.isDate ? this.overrides.isDate(n) : Wt(n), this.isSameDay = (n, o) => this.overrides?.isSameDay ? this.overrides.isSameDay(n, o) : qn(n, o), this.isSameMonth = (n, o) => this.overrides?.isSameMonth ? this.overrides.isSameMonth(n, o) : Ur(n, o), this.isSameYear = (n, o) => this.overrides?.isSameYear ? this.overrides.isSameYear(n, o) : Vr(n, o), this.max = (n) => this.overrides?.max ? this.overrides.max(n) : Hn(n), this.min = (n) => this.overrides?.min ? this.overrides.min(n) : An(n), this.setMonth = (n, o) => this.overrides?.setMonth ? this.overrides.setMonth(n, o) : Zr(n, o), this.setYear = (n, o) => this.overrides?.setYear ? this.overrides.setYear(n, o) : Kr(n, o), this.startOfBroadcastWeek = (n, o) => this.overrides?.startOfBroadcastWeek ? this.overrides.startOfBroadcastWeek(n, this) : Pt(n, this), this.startOfDay = (n) => this.overrides?.startOfDay ? this.overrides.startOfDay(n) : Me(n), this.startOfISOWeek = (n) => this.overrides?.startOfISOWeek ? this.overrides.startOfISOWeek(n) : we(n), this.startOfMonth = (n) => this.overrides?.startOfMonth ? this.overrides.startOfMonth(n) : Rn(n), this.startOfWeek = (n, o) => this.overrides?.startOfWeek ? this.overrides.startOfWeek(n, this.options) : de(n, this.options), this.startOfYear = (n) => this.overrides?.startOfYear ? this.overrides.startOfYear(n) : Nt(n), this.options = { locale: Et, ...t }, this.overrides = r;
1655
1655
  }
1656
1656
  /**
@@ -1703,10 +1703,10 @@ class G {
1703
1703
  * @since 9.11.0
1704
1704
  */
1705
1705
  formatMonthYear(t) {
1706
- const { locale: r, timeZone: n, numerals: o } = this.options, i = r?.code;
1707
- if (i && G.yearFirstLocales.has(i))
1706
+ const { locale: r, timeZone: n, numerals: o } = this.options, a = r?.code;
1707
+ if (a && G.yearFirstLocales.has(a))
1708
1708
  try {
1709
- return new Intl.DateTimeFormat(i, {
1709
+ return new Intl.DateTimeFormat(a, {
1710
1710
  month: "long",
1711
1711
  year: "numeric",
1712
1712
  timeZone: n,
@@ -1714,8 +1714,8 @@ class G {
1714
1714
  }).format(t);
1715
1715
  } catch {
1716
1716
  }
1717
- const a = this.getMonthYearOrder() === "year-first" ? "y LLLL" : "LLLL y";
1718
- return this.format(t, a);
1717
+ const i = this.getMonthYearOrder() === "year-first" ? "y LLLL" : "LLLL y";
1718
+ return this.format(t, i);
1719
1719
  }
1720
1720
  }
1721
1721
  G.yearFirstLocales = /* @__PURE__ */ new Set([
@@ -1810,11 +1810,11 @@ var j;
1810
1810
  e.weeks_before_enter = "weeks_before_enter", e.weeks_before_exit = "weeks_before_exit", e.weeks_after_enter = "weeks_after_enter", e.weeks_after_exit = "weeks_after_exit", e.caption_after_enter = "caption_after_enter", e.caption_after_exit = "caption_after_exit", e.caption_before_enter = "caption_before_enter", e.caption_before_exit = "caption_before_exit";
1811
1811
  })(j || (j = {}));
1812
1812
  function co(e) {
1813
- const { options: t, className: r, components: n, classNames: o, ...i } = e, a = [o[y.Dropdown], r].join(" "), s = t?.find(({ value: c }) => c === i.value);
1813
+ const { options: t, className: r, components: n, classNames: o, ...a } = e, i = [o[y.Dropdown], r].join(" "), s = t?.find(({ value: c }) => c === a.value);
1814
1814
  return d.createElement(
1815
1815
  "span",
1816
- { "data-disabled": i.disabled, className: o[y.DropdownRoot] },
1817
- d.createElement(n.Select, { className: a, ...i }, t?.map(({ value: c, label: u, disabled: f }) => d.createElement(n.Option, { key: c, value: c, disabled: f }, u))),
1816
+ { "data-disabled": a.disabled, className: o[y.DropdownRoot] },
1817
+ d.createElement(n.Select, { className: i, ...a }, t?.map(({ value: c, label: u, disabled: f }) => d.createElement(n.Option, { key: c, value: c, disabled: f }, u))),
1818
1818
  d.createElement(
1819
1819
  "span",
1820
1820
  { className: o[y.CaptionLabel], "aria-hidden": !0 },
@@ -1855,23 +1855,23 @@ function go(e) {
1855
1855
  return d.createElement(t.Dropdown, { ...e });
1856
1856
  }
1857
1857
  function po(e) {
1858
- const { onPreviousClick: t, onNextClick: r, previousMonth: n, nextMonth: o, ...i } = e, { components: a, classNames: s, labels: { labelPrevious: c, labelNext: u } } = ke(), f = R((h) => {
1858
+ const { onPreviousClick: t, onNextClick: r, previousMonth: n, nextMonth: o, ...a } = e, { components: i, classNames: s, labels: { labelPrevious: c, labelNext: u } } = ke(), f = R((h) => {
1859
1859
  o && r?.(h);
1860
1860
  }, [o, r]), l = R((h) => {
1861
1861
  n && t?.(h);
1862
1862
  }, [n, t]);
1863
1863
  return d.createElement(
1864
1864
  "nav",
1865
- { ...i },
1865
+ { ...a },
1866
1866
  d.createElement(
1867
- a.PreviousMonthButton,
1867
+ i.PreviousMonthButton,
1868
1868
  { type: "button", className: s[y.PreviousMonthButton], tabIndex: n ? void 0 : -1, "aria-disabled": n ? void 0 : !0, "aria-label": c(n), onClick: l },
1869
- d.createElement(a.Chevron, { disabled: n ? void 0 : !0, className: s[y.Chevron], orientation: "left" })
1869
+ d.createElement(i.Chevron, { disabled: n ? void 0 : !0, className: s[y.Chevron], orientation: "left" })
1870
1870
  ),
1871
1871
  d.createElement(
1872
- a.NextMonthButton,
1872
+ i.NextMonthButton,
1873
1873
  { type: "button", className: s[y.NextMonthButton], tabIndex: o ? void 0 : -1, "aria-disabled": o ? void 0 : !0, "aria-label": u(o), onClick: f },
1874
- d.createElement(a.Chevron, { disabled: o ? void 0 : !0, orientation: "right", className: s[y.Chevron] })
1874
+ d.createElement(i.Chevron, { disabled: o ? void 0 : !0, orientation: "right", className: s[y.Chevron] })
1875
1875
  )
1876
1876
  );
1877
1877
  }
@@ -1951,9 +1951,9 @@ const To = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1951
1951
  YearsDropdown: Yo
1952
1952
  }, Symbol.toStringTag, { value: "Module" }));
1953
1953
  function ne(e, t, r = !1, n = L) {
1954
- let { from: o, to: i } = e;
1955
- const { differenceInCalendarDays: a, isSameDay: s } = n;
1956
- return o && i ? (a(i, o) < 0 && ([o, i] = [i, o]), a(t, o) >= (r ? 1 : 0) && a(i, t) >= (r ? 1 : 0)) : !r && i ? s(i, t) : !r && o ? s(o, t) : !1;
1954
+ let { from: o, to: a } = e;
1955
+ const { differenceInCalendarDays: i, isSameDay: s } = n;
1956
+ return o && a ? (i(a, o) < 0 && ([o, a] = [a, o]), i(t, o) >= (r ? 1 : 0) && i(a, t) >= (r ? 1 : 0)) : !r && a ? s(a, t) : !r && o ? s(o, t) : !1;
1957
1957
  }
1958
1958
  function Ve(e) {
1959
1959
  return !!(e && typeof e == "object" && "before" in e && "after" in e);
@@ -1974,7 +1974,7 @@ function It(e, t) {
1974
1974
  return Array.isArray(e) && e.every(t.isDate);
1975
1975
  }
1976
1976
  function re(e, t, r = L) {
1977
- const n = Array.isArray(t) ? t : [t], { isSameDay: o, differenceInCalendarDays: i, isAfter: a } = r;
1977
+ const n = Array.isArray(t) ? t : [t], { isSameDay: o, differenceInCalendarDays: a, isAfter: i } = r;
1978
1978
  return n.some((s) => {
1979
1979
  if (typeof s == "boolean")
1980
1980
  return s;
@@ -1987,26 +1987,26 @@ function re(e, t, r = L) {
1987
1987
  if (Bt(s))
1988
1988
  return Array.isArray(s.dayOfWeek) ? s.dayOfWeek.includes(e.getDay()) : s.dayOfWeek === e.getDay();
1989
1989
  if (Ve(s)) {
1990
- const c = i(s.before, e), u = i(s.after, e), f = c > 0, l = u < 0;
1991
- return a(s.before, s.after) ? l && f : f || l;
1990
+ const c = a(s.before, e), u = a(s.after, e), f = c > 0, l = u < 0;
1991
+ return i(s.before, s.after) ? l && f : f || l;
1992
1992
  }
1993
- return Ze(s) ? i(e, s.after) > 0 : Ke(s) ? i(s.before, e) > 0 : typeof s == "function" ? s(e) : !1;
1993
+ return Ze(s) ? a(e, s.after) > 0 : Ke(s) ? a(s.before, e) > 0 : typeof s == "function" ? s(e) : !1;
1994
1994
  });
1995
1995
  }
1996
1996
  function xo(e, t, r, n, o) {
1997
- const { disabled: i, hidden: a, modifiers: s, showOutsideDays: c, broadcastCalendar: u, today: f = o.today() } = t, { isSameDay: l, isSameMonth: h, startOfMonth: b, isBefore: O, endOfMonth: C, isAfter: D } = o, v = r && b(r), T = n && C(n), w = {
1997
+ const { disabled: a, hidden: i, modifiers: s, showOutsideDays: c, broadcastCalendar: u, today: f = o.today() } = t, { isSameDay: l, isSameMonth: h, startOfMonth: g, isBefore: v, endOfMonth: C, isAfter: O } = o, T = r && g(r), M = n && C(n), b = {
1998
1998
  [_.focused]: [],
1999
1999
  [_.outside]: [],
2000
2000
  [_.disabled]: [],
2001
2001
  [_.hidden]: [],
2002
2002
  [_.today]: []
2003
- }, k = {};
2003
+ }, D = {};
2004
2004
  for (const p of e) {
2005
- const { date: m, displayMonth: W } = p, E = !!(W && !h(m, W)), H = !!(v && O(m, v)), F = !!(T && D(m, T)), Z = !!(i && re(m, i, o)), oe = !!(a && re(m, a, o)) || H || F || // Broadcast calendar will show outside days as default
2005
+ const { date: m, displayMonth: W } = p, E = !!(W && !h(m, W)), H = !!(T && v(m, T)), F = !!(M && O(m, M)), Z = !!(a && re(m, a, o)), oe = !!(i && re(m, i, o)) || H || F || // Broadcast calendar will show outside days as default
2006
2006
  !u && !c && E || u && c === !1 && E, ee = l(m, f);
2007
- E && w.outside.push(p), Z && w.disabled.push(p), oe && w.hidden.push(p), ee && w.today.push(p), s && Object.keys(s).forEach(($) => {
2007
+ E && b.outside.push(p), Z && b.disabled.push(p), oe && b.hidden.push(p), ee && b.today.push(p), s && Object.keys(s).forEach(($) => {
2008
2008
  const ce = s?.[$];
2009
- ce && re(m, ce, o) && (k[$] ? k[$].push(p) : k[$] = [p]);
2009
+ ce && re(m, ce, o) && (D[$] ? D[$].push(p) : D[$] = [p]);
2010
2010
  });
2011
2011
  }
2012
2012
  return (p) => {
@@ -2017,12 +2017,12 @@ function xo(e, t, r, n, o) {
2017
2017
  [_.outside]: !1,
2018
2018
  [_.today]: !1
2019
2019
  }, W = {};
2020
- for (const E in w) {
2021
- const H = w[E];
2020
+ for (const E in b) {
2021
+ const H = b[E];
2022
2022
  m[E] = H.some((F) => F === p);
2023
2023
  }
2024
- for (const E in k)
2025
- W[E] = k[E].some((H) => H === p);
2024
+ for (const E in D)
2025
+ W[E] = D[E].some((H) => H === p);
2026
2026
  return {
2027
2027
  ...m,
2028
2028
  // custom modifiers should override all the previous ones
@@ -2031,7 +2031,7 @@ function xo(e, t, r, n, o) {
2031
2031
  };
2032
2032
  }
2033
2033
  function Po(e, t, r = {}) {
2034
- return Object.entries(e).filter(([, o]) => o === !0).reduce((o, [i]) => (r[i] ? o.push(r[i]) : t[_[i]] ? o.push(t[_[i]]) : t[V[i]] && o.push(t[V[i]]), o), [t[y.Day]]);
2034
+ return Object.entries(e).filter(([, o]) => o === !0).reduce((o, [a]) => (r[a] ? o.push(r[a]) : t[_[a]] ? o.push(t[_[a]]) : t[V[a]] && o.push(t[V[a]]), o), [t[y.Day]]);
2035
2035
  }
2036
2036
  function Eo(e) {
2037
2037
  return {
@@ -2177,13 +2177,13 @@ function Vo(e, t) {
2177
2177
  };
2178
2178
  }
2179
2179
  function Zo(e, t, r, n, o) {
2180
- const { startOfMonth: i, startOfYear: a, endOfYear: s, eachMonthOfInterval: c, getMonth: u } = o;
2180
+ const { startOfMonth: a, startOfYear: i, endOfYear: s, eachMonthOfInterval: c, getMonth: u } = o;
2181
2181
  return c({
2182
- start: a(e),
2182
+ start: i(e),
2183
2183
  end: s(e)
2184
2184
  }).map((h) => {
2185
- const b = n.formatMonthDropdown(h, o), O = u(h), C = t && h < i(t) || r && h > i(r) || !1;
2186
- return { value: O, label: b, disabled: C };
2185
+ const g = n.formatMonthDropdown(h, o), v = u(h), C = t && h < a(t) || r && h > a(r) || !1;
2186
+ return { value: v, label: g, disabled: C };
2187
2187
  });
2188
2188
  }
2189
2189
  function Ko(e, t = {}, r = {}) {
@@ -2196,72 +2196,72 @@ function Ko(e, t = {}, r = {}) {
2196
2196
  }), n;
2197
2197
  }
2198
2198
  function Jo(e, t, r, n) {
2199
- const o = n ?? e.today(), i = r ? e.startOfBroadcastWeek(o, e) : t ? e.startOfISOWeek(o) : e.startOfWeek(o), a = [];
2199
+ const o = n ?? e.today(), a = r ? e.startOfBroadcastWeek(o, e) : t ? e.startOfISOWeek(o) : e.startOfWeek(o), i = [];
2200
2200
  for (let s = 0; s < 7; s++) {
2201
- const c = e.addDays(i, s);
2202
- a.push(c);
2201
+ const c = e.addDays(a, s);
2202
+ i.push(c);
2203
2203
  }
2204
- return a;
2204
+ return i;
2205
2205
  }
2206
2206
  function Lo(e, t, r, n, o = !1) {
2207
2207
  if (!e || !t)
2208
2208
  return;
2209
- const { startOfYear: i, endOfYear: a, eachYearOfInterval: s, getYear: c } = n, u = i(e), f = a(t), l = s({ start: u, end: f });
2209
+ const { startOfYear: a, endOfYear: i, eachYearOfInterval: s, getYear: c } = n, u = a(e), f = i(t), l = s({ start: u, end: f });
2210
2210
  return o && l.reverse(), l.map((h) => {
2211
- const b = r.formatYearDropdown(h, n);
2211
+ const g = r.formatYearDropdown(h, n);
2212
2212
  return {
2213
2213
  value: c(h),
2214
- label: b,
2214
+ label: g,
2215
2215
  disabled: !1
2216
2216
  };
2217
2217
  });
2218
2218
  }
2219
2219
  function es(e, t = {}) {
2220
- const { weekStartsOn: r, locale: n } = t, o = r ?? n?.options?.weekStartsOn ?? 0, i = (s) => {
2220
+ const { weekStartsOn: r, locale: n } = t, o = r ?? n?.options?.weekStartsOn ?? 0, a = (s) => {
2221
2221
  const c = typeof s == "number" || typeof s == "string" ? new Date(s) : s;
2222
2222
  return new A(c.getFullYear(), c.getMonth(), c.getDate(), 12, 0, 0, e);
2223
- }, a = (s) => {
2224
- const c = i(s);
2223
+ }, i = (s) => {
2224
+ const c = a(s);
2225
2225
  return new Date(c.getFullYear(), c.getMonth(), c.getDate(), 0, 0, 0, 0);
2226
2226
  };
2227
2227
  return {
2228
- today: () => i(A.tz(e)),
2228
+ today: () => a(A.tz(e)),
2229
2229
  newDate: (s, c, u) => new A(s, c, u, 12, 0, 0, e),
2230
- startOfDay: (s) => i(s),
2230
+ startOfDay: (s) => a(s),
2231
2231
  startOfWeek: (s, c) => {
2232
- const u = i(s), f = c?.weekStartsOn ?? o, l = (u.getDay() - f + 7) % 7;
2232
+ const u = a(s), f = c?.weekStartsOn ?? o, l = (u.getDay() - f + 7) % 7;
2233
2233
  return u.setDate(u.getDate() - l), u;
2234
2234
  },
2235
2235
  startOfISOWeek: (s) => {
2236
- const c = i(s), u = (c.getDay() - 1 + 7) % 7;
2236
+ const c = a(s), u = (c.getDay() - 1 + 7) % 7;
2237
2237
  return c.setDate(c.getDate() - u), c;
2238
2238
  },
2239
2239
  startOfMonth: (s) => {
2240
- const c = i(s);
2240
+ const c = a(s);
2241
2241
  return c.setDate(1), c;
2242
2242
  },
2243
2243
  startOfYear: (s) => {
2244
- const c = i(s);
2244
+ const c = a(s);
2245
2245
  return c.setMonth(0, 1), c;
2246
2246
  },
2247
2247
  endOfWeek: (s, c) => {
2248
- const u = i(s), h = (((c?.weekStartsOn ?? o) + 6) % 7 - u.getDay() + 7) % 7;
2248
+ const u = a(s), h = (((c?.weekStartsOn ?? o) + 6) % 7 - u.getDay() + 7) % 7;
2249
2249
  return u.setDate(u.getDate() + h), u;
2250
2250
  },
2251
2251
  endOfISOWeek: (s) => {
2252
- const c = i(s), u = (7 - c.getDay()) % 7;
2252
+ const c = a(s), u = (7 - c.getDay()) % 7;
2253
2253
  return c.setDate(c.getDate() + u), c;
2254
2254
  },
2255
2255
  endOfMonth: (s) => {
2256
- const c = i(s);
2256
+ const c = a(s);
2257
2257
  return c.setMonth(c.getMonth() + 1, 0), c;
2258
2258
  },
2259
2259
  endOfYear: (s) => {
2260
- const c = i(s);
2260
+ const c = a(s);
2261
2261
  return c.setMonth(11, 31), c;
2262
2262
  },
2263
2263
  eachMonthOfInterval: (s) => {
2264
- const c = i(s.start), u = i(s.end), f = [], l = new A(c.getFullYear(), c.getMonth(), 1, 12, 0, 0, e), h = u.getFullYear() * 12 + u.getMonth();
2264
+ const c = a(s.start), u = a(s.end), f = [], l = new A(c.getFullYear(), c.getMonth(), 1, 12, 0, 0, e), h = u.getFullYear() * 12 + u.getMonth();
2265
2265
  for (; l.getFullYear() * 12 + l.getMonth() <= h; )
2266
2266
  f.push(new A(l, e)), l.setMonth(l.getMonth() + 1, 1);
2267
2267
  return f;
@@ -2269,44 +2269,44 @@ function es(e, t = {}) {
2269
2269
  // Normalize to noon once before arithmetic (avoid DST/midnight edge cases),
2270
2270
  // mutate the same TZDate, and return it.
2271
2271
  addDays: (s, c) => {
2272
- const u = i(s);
2272
+ const u = a(s);
2273
2273
  return u.setDate(u.getDate() + c), u;
2274
2274
  },
2275
2275
  addWeeks: (s, c) => {
2276
- const u = i(s);
2276
+ const u = a(s);
2277
2277
  return u.setDate(u.getDate() + c * 7), u;
2278
2278
  },
2279
2279
  addMonths: (s, c) => {
2280
- const u = i(s);
2280
+ const u = a(s);
2281
2281
  return u.setMonth(u.getMonth() + c), u;
2282
2282
  },
2283
2283
  addYears: (s, c) => {
2284
- const u = i(s);
2284
+ const u = a(s);
2285
2285
  return u.setFullYear(u.getFullYear() + c), u;
2286
2286
  },
2287
2287
  eachYearOfInterval: (s) => {
2288
- const c = i(s.start), u = i(s.end), f = [], l = new A(c.getFullYear(), 0, 1, 12, 0, 0, e);
2288
+ const c = a(s.start), u = a(s.end), f = [], l = new A(c.getFullYear(), 0, 1, 12, 0, 0, e);
2289
2289
  for (; l.getFullYear() <= u.getFullYear(); )
2290
2290
  f.push(new A(l, e)), l.setFullYear(l.getFullYear() + 1, 0, 1);
2291
2291
  return f;
2292
2292
  },
2293
2293
  getWeek: (s, c) => {
2294
- const u = a(s);
2294
+ const u = i(s);
2295
2295
  return Ue(u, {
2296
2296
  weekStartsOn: c?.weekStartsOn ?? o,
2297
2297
  firstWeekContainsDate: c?.firstWeekContainsDate ?? n?.options?.firstWeekContainsDate ?? 1
2298
2298
  });
2299
2299
  },
2300
2300
  getISOWeek: (s) => {
2301
- const c = a(s);
2301
+ const c = i(s);
2302
2302
  return Xe(c);
2303
2303
  },
2304
2304
  differenceInCalendarDays: (s, c) => {
2305
- const u = a(s), f = a(c);
2305
+ const u = i(s), f = i(c);
2306
2306
  return Qe(u, f);
2307
2307
  },
2308
2308
  differenceInCalendarMonths: (s, c) => {
2309
- const u = a(s), f = a(c);
2309
+ const u = i(s), f = i(c);
2310
2310
  return St(u, f);
2311
2311
  }
2312
2312
  };
@@ -2314,42 +2314,42 @@ function es(e, t = {}) {
2314
2314
  const Oe = (e) => e instanceof HTMLElement ? e : null, qe = (e) => [
2315
2315
  ...e.querySelectorAll("[data-animated-month]") ?? []
2316
2316
  ], ts = (e) => Oe(e.querySelector("[data-animated-month]")), je = (e) => Oe(e.querySelector("[data-animated-caption]")), Ge = (e) => Oe(e.querySelector("[data-animated-weeks]")), ns = (e) => Oe(e.querySelector("[data-animated-nav]")), rs = (e) => Oe(e.querySelector("[data-animated-weekdays]"));
2317
- function os(e, t, { classNames: r, months: n, focused: o, dateLib: i }) {
2318
- const a = Ce(null), s = Ce(n), c = Ce(!1);
2317
+ function os(e, t, { classNames: r, months: n, focused: o, dateLib: a }) {
2318
+ const i = Ce(null), s = Ce(n), c = Ce(!1);
2319
2319
  Cn(() => {
2320
2320
  const u = s.current;
2321
2321
  if (s.current = n, !t || !e.current || // safety check because the ref can be set to anything by consumers
2322
2322
  !(e.current instanceof HTMLElement) || // validation required for the animation to work as expected
2323
2323
  n.length === 0 || u.length === 0 || n.length !== u.length)
2324
2324
  return;
2325
- const f = i.isSameMonth(n[0].date, u[0].date), l = i.isAfter(n[0].date, u[0].date), h = l ? r[j.caption_after_enter] : r[j.caption_before_enter], b = l ? r[j.weeks_after_enter] : r[j.weeks_before_enter], O = a.current, C = e.current.cloneNode(!0);
2326
- if (C instanceof HTMLElement ? (qe(C).forEach((w) => {
2327
- if (!(w instanceof HTMLElement))
2325
+ const f = a.isSameMonth(n[0].date, u[0].date), l = a.isAfter(n[0].date, u[0].date), h = l ? r[j.caption_after_enter] : r[j.caption_before_enter], g = l ? r[j.weeks_after_enter] : r[j.weeks_before_enter], v = i.current, C = e.current.cloneNode(!0);
2326
+ if (C instanceof HTMLElement ? (qe(C).forEach((b) => {
2327
+ if (!(b instanceof HTMLElement))
2328
2328
  return;
2329
- const k = ts(w);
2330
- k && w.contains(k) && w.removeChild(k);
2331
- const p = je(w);
2329
+ const D = ts(b);
2330
+ D && b.contains(D) && b.removeChild(D);
2331
+ const p = je(b);
2332
2332
  p && p.classList.remove(h);
2333
- const m = Ge(w);
2334
- m && m.classList.remove(b);
2335
- }), a.current = C) : a.current = null, c.current || f || // skip animation if a day is focused because it can cause issues to the animation and is better for a11y
2333
+ const m = Ge(b);
2334
+ m && m.classList.remove(g);
2335
+ }), i.current = C) : i.current = null, c.current || f || // skip animation if a day is focused because it can cause issues to the animation and is better for a11y
2336
2336
  o)
2337
2337
  return;
2338
- const D = O instanceof HTMLElement ? qe(O) : [], v = qe(e.current);
2339
- if (v?.every((T) => T instanceof HTMLElement) && D && D.every((T) => T instanceof HTMLElement)) {
2338
+ const O = v instanceof HTMLElement ? qe(v) : [], T = qe(e.current);
2339
+ if (T?.every((M) => M instanceof HTMLElement) && O && O.every((M) => M instanceof HTMLElement)) {
2340
2340
  c.current = !0, e.current.style.isolation = "isolate";
2341
- const T = ns(e.current);
2342
- T && (T.style.zIndex = "1"), v.forEach((w, k) => {
2343
- const p = D[k];
2341
+ const M = ns(e.current);
2342
+ M && (M.style.zIndex = "1"), T.forEach((b, D) => {
2343
+ const p = O[D];
2344
2344
  if (!p)
2345
2345
  return;
2346
- w.style.position = "relative", w.style.overflow = "hidden";
2347
- const m = je(w);
2346
+ b.style.position = "relative", b.style.overflow = "hidden";
2347
+ const m = je(b);
2348
2348
  m && m.classList.add(h);
2349
- const W = Ge(w);
2350
- W && W.classList.add(b);
2349
+ const W = Ge(b);
2350
+ W && W.classList.add(g);
2351
2351
  const E = () => {
2352
- c.current = !1, e.current && (e.current.style.isolation = ""), T && (T.style.zIndex = ""), m && m.classList.remove(h), W && W.classList.remove(b), w.style.position = "", w.style.overflow = "", w.contains(p) && w.removeChild(p);
2352
+ c.current = !1, e.current && (e.current.style.isolation = ""), M && (M.style.zIndex = ""), m && m.classList.remove(h), W && W.classList.remove(g), b.style.position = "", b.style.overflow = "", b.contains(p) && b.removeChild(p);
2353
2353
  };
2354
2354
  p.style.pointerEvents = "none", p.style.position = "absolute", p.style.overflow = "hidden", p.setAttribute("aria-hidden", "true");
2355
2355
  const H = rs(p);
@@ -2357,15 +2357,15 @@ function os(e, t, { classNames: r, months: n, focused: o, dateLib: i }) {
2357
2357
  const F = je(p);
2358
2358
  F && (F.classList.add(l ? r[j.caption_before_exit] : r[j.caption_after_exit]), F.addEventListener("animationend", E));
2359
2359
  const Z = Ge(p);
2360
- Z && Z.classList.add(l ? r[j.weeks_before_exit] : r[j.weeks_after_exit]), w.insertBefore(p, w.firstChild);
2360
+ Z && Z.classList.add(l ? r[j.weeks_before_exit] : r[j.weeks_after_exit]), b.insertBefore(p, b.firstChild);
2361
2361
  });
2362
2362
  }
2363
2363
  });
2364
2364
  }
2365
2365
  function ss(e, t, r, n) {
2366
- const o = e[0], i = e[e.length - 1], { ISOWeek: a, fixedWeeks: s, broadcastCalendar: c } = r ?? {}, { addDays: u, differenceInCalendarDays: f, differenceInCalendarMonths: l, endOfBroadcastWeek: h, endOfISOWeek: b, endOfMonth: O, endOfWeek: C, isAfter: D, startOfBroadcastWeek: v, startOfISOWeek: T, startOfWeek: w } = n, k = c ? v(o, n) : a ? T(o) : w(o), p = c ? h(i) : a ? b(O(i)) : C(O(i)), m = t && (c ? h(t) : a ? b(t) : C(t)), W = m && D(p, m) ? m : p, E = f(W, k), H = l(i, o) + 1, F = [];
2366
+ const o = e[0], a = e[e.length - 1], { ISOWeek: i, fixedWeeks: s, broadcastCalendar: c } = r ?? {}, { addDays: u, differenceInCalendarDays: f, differenceInCalendarMonths: l, endOfBroadcastWeek: h, endOfISOWeek: g, endOfMonth: v, endOfWeek: C, isAfter: O, startOfBroadcastWeek: T, startOfISOWeek: M, startOfWeek: b } = n, D = c ? T(o, n) : i ? M(o) : b(o), p = c ? h(a) : i ? g(v(a)) : C(v(a)), m = t && (c ? h(t) : i ? g(t) : C(t)), W = m && O(p, m) ? m : p, E = f(W, D), H = l(a, o) + 1, F = [];
2367
2367
  for (let ee = 0; ee <= E; ee++) {
2368
- const $ = u(k, ee);
2368
+ const $ = u(D, ee);
2369
2369
  F.push($);
2370
2370
  }
2371
2371
  const oe = (c ? 35 : 42) * H;
@@ -2381,23 +2381,23 @@ function ss(e, t, r, n) {
2381
2381
  function as(e) {
2382
2382
  const t = [];
2383
2383
  return e.reduce((r, n) => {
2384
- const o = n.weeks.reduce((i, a) => i.concat(a.days.slice()), t.slice());
2384
+ const o = n.weeks.reduce((a, i) => a.concat(i.days.slice()), t.slice());
2385
2385
  return r.concat(o.slice());
2386
2386
  }, t.slice());
2387
2387
  }
2388
2388
  function is(e, t, r, n) {
2389
- const { numberOfMonths: o = 1 } = r, i = [];
2390
- for (let a = 0; a < o; a++) {
2391
- const s = n.addMonths(e, a);
2389
+ const { numberOfMonths: o = 1 } = r, a = [];
2390
+ for (let i = 0; i < o; i++) {
2391
+ const s = n.addMonths(e, i);
2392
2392
  if (t && s > t)
2393
2393
  break;
2394
- i.push(s);
2394
+ a.push(s);
2395
2395
  }
2396
- return i;
2396
+ return a;
2397
2397
  }
2398
2398
  function gt(e, t, r, n) {
2399
- const { month: o, defaultMonth: i, today: a = n.today(), numberOfMonths: s = 1 } = e;
2400
- let c = o || i || a;
2399
+ const { month: o, defaultMonth: a, today: i = n.today(), numberOfMonths: s = 1 } = e;
2400
+ let c = o || a || i;
2401
2401
  const { differenceInCalendarMonths: u, addMonths: f, startOfMonth: l } = n;
2402
2402
  if (r && u(r, c) < s - 1) {
2403
2403
  const h = -1 * (s - 1);
@@ -2406,46 +2406,46 @@ function gt(e, t, r, n) {
2406
2406
  return t && u(c, t) < 0 && (c = t), l(c);
2407
2407
  }
2408
2408
  function cs(e, t, r, n) {
2409
- const { addDays: o, endOfBroadcastWeek: i, endOfISOWeek: a, endOfMonth: s, endOfWeek: c, getISOWeek: u, getWeek: f, startOfBroadcastWeek: l, startOfISOWeek: h, startOfWeek: b } = n, O = e.reduce((C, D) => {
2410
- const v = r.broadcastCalendar ? l(D, n) : r.ISOWeek ? h(D) : b(D), T = r.broadcastCalendar ? i(D) : r.ISOWeek ? a(s(D)) : c(s(D)), w = t.filter((W) => W >= v && W <= T), k = r.broadcastCalendar ? 35 : 42;
2411
- if (r.fixedWeeks && w.length < k) {
2409
+ const { addDays: o, endOfBroadcastWeek: a, endOfISOWeek: i, endOfMonth: s, endOfWeek: c, getISOWeek: u, getWeek: f, startOfBroadcastWeek: l, startOfISOWeek: h, startOfWeek: g } = n, v = e.reduce((C, O) => {
2410
+ const T = r.broadcastCalendar ? l(O, n) : r.ISOWeek ? h(O) : g(O), M = r.broadcastCalendar ? a(O) : r.ISOWeek ? i(s(O)) : c(s(O)), b = t.filter((W) => W >= T && W <= M), D = r.broadcastCalendar ? 35 : 42;
2411
+ if (r.fixedWeeks && b.length < D) {
2412
2412
  const W = t.filter((E) => {
2413
- const H = k - w.length;
2414
- return E > T && E <= o(T, H);
2413
+ const H = D - b.length;
2414
+ return E > M && E <= o(M, H);
2415
2415
  });
2416
- w.push(...W);
2416
+ b.push(...W);
2417
2417
  }
2418
- const p = w.reduce((W, E) => {
2419
- const H = r.ISOWeek ? u(E) : f(E), F = W.find((oe) => oe.weekNumber === H), Z = new _t(E, D, n);
2418
+ const p = b.reduce((W, E) => {
2419
+ const H = r.ISOWeek ? u(E) : f(E), F = W.find((oe) => oe.weekNumber === H), Z = new _t(E, O, n);
2420
2420
  return F ? F.days.push(Z) : W.push(new no(H, [Z])), W;
2421
- }, []), m = new to(D, p);
2421
+ }, []), m = new to(O, p);
2422
2422
  return C.push(m), C;
2423
2423
  }, []);
2424
- return r.reverseMonths ? O.reverse() : O;
2424
+ return r.reverseMonths ? v.reverse() : v;
2425
2425
  }
2426
2426
  function us(e, t) {
2427
2427
  let { startMonth: r, endMonth: n } = e;
2428
- const { startOfYear: o, startOfDay: i, startOfMonth: a, endOfMonth: s, addYears: c, endOfYear: u, newDate: f, today: l } = t, { fromYear: h, toYear: b, fromMonth: O, toMonth: C } = e;
2429
- !r && O && (r = O), !r && h && (r = t.newDate(h, 0, 1)), !n && C && (n = C), !n && b && (n = f(b, 11, 31));
2430
- const D = e.captionLayout === "dropdown" || e.captionLayout === "dropdown-years";
2431
- return r ? r = a(r) : h ? r = f(h, 0, 1) : !r && D && (r = o(c(e.today ?? l(), -100))), n ? n = s(n) : b ? n = f(b, 11, 31) : !n && D && (n = u(e.today ?? l())), [
2432
- r && i(r),
2433
- n && i(n)
2428
+ const { startOfYear: o, startOfDay: a, startOfMonth: i, endOfMonth: s, addYears: c, endOfYear: u, newDate: f, today: l } = t, { fromYear: h, toYear: g, fromMonth: v, toMonth: C } = e;
2429
+ !r && v && (r = v), !r && h && (r = t.newDate(h, 0, 1)), !n && C && (n = C), !n && g && (n = f(g, 11, 31));
2430
+ const O = e.captionLayout === "dropdown" || e.captionLayout === "dropdown-years";
2431
+ return r ? r = i(r) : h ? r = f(h, 0, 1) : !r && O && (r = o(c(e.today ?? l(), -100))), n ? n = s(n) : g ? n = f(g, 11, 31) : !n && O && (n = u(e.today ?? l())), [
2432
+ r && a(r),
2433
+ n && a(n)
2434
2434
  ];
2435
2435
  }
2436
2436
  function ls(e, t, r, n) {
2437
2437
  if (r.disableNavigation)
2438
2438
  return;
2439
- const { pagedNavigation: o, numberOfMonths: i = 1 } = r, { startOfMonth: a, addMonths: s, differenceInCalendarMonths: c } = n, u = o ? i : 1, f = a(e);
2439
+ const { pagedNavigation: o, numberOfMonths: a = 1 } = r, { startOfMonth: i, addMonths: s, differenceInCalendarMonths: c } = n, u = o ? a : 1, f = i(e);
2440
2440
  if (!t)
2441
2441
  return s(f, u);
2442
- if (!(c(t, e) < i))
2442
+ if (!(c(t, e) < a))
2443
2443
  return s(f, u);
2444
2444
  }
2445
2445
  function fs(e, t, r, n) {
2446
2446
  if (r.disableNavigation)
2447
2447
  return;
2448
- const { pagedNavigation: o, numberOfMonths: i } = r, { startOfMonth: a, addMonths: s, differenceInCalendarMonths: c } = n, u = o ? i ?? 1 : 1, f = a(e);
2448
+ const { pagedNavigation: o, numberOfMonths: a } = r, { startOfMonth: i, addMonths: s, differenceInCalendarMonths: c } = n, u = o ? a ?? 1 : 1, f = i(e);
2449
2449
  if (!t)
2450
2450
  return s(f, -u);
2451
2451
  if (!(c(f, t) <= 0))
@@ -2460,21 +2460,21 @@ function Ye(e, t) {
2460
2460
  return [t === void 0 ? r : t, n];
2461
2461
  }
2462
2462
  function hs(e, t) {
2463
- const [r, n] = us(e, t), { startOfMonth: o, endOfMonth: i } = t, a = gt(e, r, n, t), [s, c] = Ye(
2464
- a,
2463
+ const [r, n] = us(e, t), { startOfMonth: o, endOfMonth: a } = t, i = gt(e, r, n, t), [s, c] = Ye(
2464
+ i,
2465
2465
  // initialMonth is always computed from props.month if provided
2466
- e.month ? a : void 0
2466
+ e.month ? i : void 0
2467
2467
  );
2468
2468
  Nn(() => {
2469
- const k = gt(e, r, n, t);
2470
- c(k);
2469
+ const D = gt(e, r, n, t);
2470
+ c(D);
2471
2471
  }, [e.timeZone]);
2472
- const { months: u, weeks: f, days: l, previousMonth: h, nextMonth: b } = be(() => {
2473
- const k = is(s, n, { numberOfMonths: e.numberOfMonths }, t), p = ss(k, e.endMonth ? i(e.endMonth) : void 0, {
2472
+ const { months: u, weeks: f, days: l, previousMonth: h, nextMonth: g } = be(() => {
2473
+ const D = is(s, n, { numberOfMonths: e.numberOfMonths }, t), p = ss(D, e.endMonth ? a(e.endMonth) : void 0, {
2474
2474
  ISOWeek: e.ISOWeek,
2475
2475
  fixedWeeks: e.fixedWeeks,
2476
2476
  broadcastCalendar: e.broadcastCalendar
2477
- }, t), m = cs(k, p, {
2477
+ }, t), m = cs(D, p, {
2478
2478
  broadcastCalendar: e.broadcastCalendar,
2479
2479
  fixedWeeks: e.fixedWeeks,
2480
2480
  ISOWeek: e.ISOWeek,
@@ -2500,10 +2500,10 @@ function hs(e, t) {
2500
2500
  e.numberOfMonths,
2501
2501
  e.pagedNavigation,
2502
2502
  e.reverseMonths
2503
- ]), { disableNavigation: O, onMonthChange: C } = e, D = (k) => f.some((p) => p.days.some((m) => m.isEqualTo(k))), v = (k) => {
2504
- if (O)
2503
+ ]), { disableNavigation: v, onMonthChange: C } = e, O = (D) => f.some((p) => p.days.some((m) => m.isEqualTo(D))), T = (D) => {
2504
+ if (v)
2505
2505
  return;
2506
- let p = o(k);
2506
+ let p = o(D);
2507
2507
  r && p < o(r) && (p = o(r)), n && p > o(n) && (p = o(n)), c(p), C?.(p);
2508
2508
  };
2509
2509
  return {
@@ -2513,10 +2513,10 @@ function hs(e, t) {
2513
2513
  navStart: r,
2514
2514
  navEnd: n,
2515
2515
  previousMonth: h,
2516
- nextMonth: b,
2517
- goToMonth: v,
2518
- goToDay: (k) => {
2519
- D(k) || v(k.date);
2516
+ nextMonth: g,
2517
+ goToMonth: T,
2518
+ goToDay: (D) => {
2519
+ O(D) || T(D.date);
2520
2520
  }
2521
2521
  };
2522
2522
  }
@@ -2528,33 +2528,33 @@ function pt(e) {
2528
2528
  return !e[_.disabled] && !e[_.hidden] && !e[_.outside];
2529
2529
  }
2530
2530
  function ms(e, t, r, n) {
2531
- let o, i = -1;
2532
- for (const a of e) {
2533
- const s = t(a);
2534
- pt(s) && (s[_.focused] && i < K.FocusedModifier ? (o = a, i = K.FocusedModifier) : n?.isEqualTo(a) && i < K.LastFocused ? (o = a, i = K.LastFocused) : r(a.date) && i < K.Selected ? (o = a, i = K.Selected) : s[_.today] && i < K.Today && (o = a, i = K.Today));
2531
+ let o, a = -1;
2532
+ for (const i of e) {
2533
+ const s = t(i);
2534
+ pt(s) && (s[_.focused] && a < K.FocusedModifier ? (o = i, a = K.FocusedModifier) : n?.isEqualTo(i) && a < K.LastFocused ? (o = i, a = K.LastFocused) : r(i.date) && a < K.Selected ? (o = i, a = K.Selected) : s[_.today] && a < K.Today && (o = i, a = K.Today));
2535
2535
  }
2536
- return o || (o = e.find((a) => pt(t(a)))), o;
2536
+ return o || (o = e.find((i) => pt(t(i)))), o;
2537
2537
  }
2538
- function ys(e, t, r, n, o, i, a) {
2539
- const { ISOWeek: s, broadcastCalendar: c } = i, { addDays: u, addMonths: f, addWeeks: l, addYears: h, endOfBroadcastWeek: b, endOfISOWeek: O, endOfWeek: C, max: D, min: v, startOfBroadcastWeek: T, startOfISOWeek: w, startOfWeek: k } = a;
2538
+ function ys(e, t, r, n, o, a, i) {
2539
+ const { ISOWeek: s, broadcastCalendar: c } = a, { addDays: u, addMonths: f, addWeeks: l, addYears: h, endOfBroadcastWeek: g, endOfISOWeek: v, endOfWeek: C, max: O, min: T, startOfBroadcastWeek: M, startOfISOWeek: b, startOfWeek: D } = i;
2540
2540
  let m = {
2541
2541
  day: u,
2542
2542
  week: l,
2543
2543
  month: f,
2544
2544
  year: h,
2545
- startOfWeek: (W) => c ? T(W, a) : s ? w(W) : k(W),
2546
- endOfWeek: (W) => c ? b(W) : s ? O(W) : C(W)
2545
+ startOfWeek: (W) => c ? M(W, i) : s ? b(W) : D(W),
2546
+ endOfWeek: (W) => c ? g(W) : s ? v(W) : C(W)
2547
2547
  }[e](r, t === "after" ? 1 : -1);
2548
- return t === "before" && n ? m = D([n, m]) : t === "after" && o && (m = v([o, m])), m;
2548
+ return t === "before" && n ? m = O([n, m]) : t === "after" && o && (m = T([o, m])), m;
2549
2549
  }
2550
- function Vt(e, t, r, n, o, i, a, s = 0) {
2550
+ function Vt(e, t, r, n, o, a, i, s = 0) {
2551
2551
  if (s > 365)
2552
2552
  return;
2553
- const c = ys(e, t, r.date, n, o, i, a), u = !!(i.disabled && re(c, i.disabled, a)), f = !!(i.hidden && re(c, i.hidden, a)), l = c, h = new _t(c, l, a);
2554
- return !u && !f ? h : Vt(e, t, h, n, o, i, a, s + 1);
2553
+ const c = ys(e, t, r.date, n, o, a, i), u = !!(a.disabled && re(c, a.disabled, i)), f = !!(a.hidden && re(c, a.hidden, i)), l = c, h = new _t(c, l, i);
2554
+ return !u && !f ? h : Vt(e, t, h, n, o, a, i, s + 1);
2555
2555
  }
2556
2556
  function gs(e, t, r, n, o) {
2557
- const { autoFocus: i } = e, [a, s] = Re(), c = ms(t.days, r, n || (() => !1), a), [u, f] = Re(i ? c : void 0);
2557
+ const { autoFocus: a } = e, [i, s] = Re(), c = ms(t.days, r, n || (() => !1), i), [u, f] = Re(a ? c : void 0);
2558
2558
  return {
2559
2559
  isFocusTarget: (C) => !!c?.isEqualTo(C),
2560
2560
  setFocused: f,
@@ -2562,55 +2562,55 @@ function gs(e, t, r, n, o) {
2562
2562
  blur: () => {
2563
2563
  s(u), f(void 0);
2564
2564
  },
2565
- moveFocus: (C, D) => {
2565
+ moveFocus: (C, O) => {
2566
2566
  if (!u)
2567
2567
  return;
2568
- const v = Vt(C, D, u, t.navStart, t.navEnd, e, o);
2569
- v && (e.disableNavigation && !t.days.some((w) => w.isEqualTo(v)) || (t.goToDay(v), f(v)));
2568
+ const T = Vt(C, O, u, t.navStart, t.navEnd, e, o);
2569
+ T && (e.disableNavigation && !t.days.some((b) => b.isEqualTo(T)) || (t.goToDay(T), f(T)));
2570
2570
  }
2571
2571
  };
2572
2572
  }
2573
2573
  function ps(e, t) {
2574
- const { selected: r, required: n, onSelect: o } = e, [i, a] = Ye(r, o ? r : void 0), s = o ? r : i, { isSameDay: c } = t, u = (b) => s?.some((O) => c(O, b)) ?? !1, { min: f, max: l } = e;
2574
+ const { selected: r, required: n, onSelect: o } = e, [a, i] = Ye(r, o ? r : void 0), s = o ? r : a, { isSameDay: c } = t, u = (g) => s?.some((v) => c(v, g)) ?? !1, { min: f, max: l } = e;
2575
2575
  return {
2576
2576
  selected: s,
2577
- select: (b, O, C) => {
2578
- let D = [...s ?? []];
2579
- if (u(b)) {
2577
+ select: (g, v, C) => {
2578
+ let O = [...s ?? []];
2579
+ if (u(g)) {
2580
2580
  if (s?.length === f || n && s?.length === 1)
2581
2581
  return;
2582
- D = s?.filter((v) => !c(v, b));
2582
+ O = s?.filter((T) => !c(T, g));
2583
2583
  } else
2584
- s?.length === l ? D = [b] : D = [...D, b];
2585
- return o || a(D), o?.(D, b, O, C), D;
2584
+ s?.length === l ? O = [g] : O = [...O, g];
2585
+ return o || i(O), o?.(O, g, v, C), O;
2586
2586
  },
2587
2587
  isSelected: u
2588
2588
  };
2589
2589
  }
2590
- function bs(e, t, r = 0, n = 0, o = !1, i = L) {
2591
- const { from: a, to: s } = t || {}, { isSameDay: c, isAfter: u, isBefore: f } = i;
2590
+ function bs(e, t, r = 0, n = 0, o = !1, a = L) {
2591
+ const { from: i, to: s } = t || {}, { isSameDay: c, isAfter: u, isBefore: f } = a;
2592
2592
  let l;
2593
- if (!a && !s)
2593
+ if (!i && !s)
2594
2594
  l = { from: e, to: r > 0 ? void 0 : e };
2595
- else if (a && !s)
2596
- c(a, e) ? r === 0 ? l = { from: a, to: e } : o ? l = { from: a, to: void 0 } : l = void 0 : f(e, a) ? l = { from: e, to: a } : l = { from: a, to: e };
2597
- else if (a && s)
2598
- if (c(a, e) && c(s, e))
2599
- o ? l = { from: a, to: s } : l = void 0;
2600
- else if (c(a, e))
2601
- l = { from: a, to: r > 0 ? void 0 : e };
2595
+ else if (i && !s)
2596
+ c(i, e) ? r === 0 ? l = { from: i, to: e } : o ? l = { from: i, to: void 0 } : l = void 0 : f(e, i) ? l = { from: e, to: i } : l = { from: i, to: e };
2597
+ else if (i && s)
2598
+ if (c(i, e) && c(s, e))
2599
+ o ? l = { from: i, to: s } : l = void 0;
2600
+ else if (c(i, e))
2601
+ l = { from: i, to: r > 0 ? void 0 : e };
2602
2602
  else if (c(s, e))
2603
2603
  l = { from: e, to: r > 0 ? void 0 : e };
2604
- else if (f(e, a))
2604
+ else if (f(e, i))
2605
2605
  l = { from: e, to: s };
2606
- else if (u(e, a))
2607
- l = { from: a, to: e };
2606
+ else if (u(e, i))
2607
+ l = { from: i, to: e };
2608
2608
  else if (u(e, s))
2609
- l = { from: a, to: e };
2609
+ l = { from: i, to: e };
2610
2610
  else
2611
2611
  throw new Error("Invalid range");
2612
2612
  if (l?.from && l?.to) {
2613
- const h = i.differenceInCalendarDays(l.to, l.from);
2613
+ const h = a.differenceInCalendarDays(l.to, l.from);
2614
2614
  n > 0 && h > n ? l = { from: e, to: void 0 } : r > 1 && h < r && (l = { from: e, to: void 0 });
2615
2615
  }
2616
2616
  return l;
@@ -2618,8 +2618,8 @@ function bs(e, t, r = 0, n = 0, o = !1, i = L) {
2618
2618
  function ws(e, t, r = L) {
2619
2619
  const n = Array.isArray(t) ? t : [t];
2620
2620
  let o = e.from;
2621
- const i = r.differenceInCalendarDays(e.to, e.from), a = Math.min(i, 6);
2622
- for (let s = 0; s <= a; s++) {
2621
+ const a = r.differenceInCalendarDays(e.to, e.from), i = Math.min(a, 6);
2622
+ for (let s = 0; s <= i; s++) {
2623
2623
  if (n.includes(o.getDay()))
2624
2624
  return !0;
2625
2625
  o = r.addDays(o, 1);
@@ -2636,12 +2636,12 @@ function Ms(e, t, r = L) {
2636
2636
  to: r.addDays(s.before, -1)
2637
2637
  }, r) : re(e.from, s, r) || re(e.to, s, r) : Ze(s) || Ke(s) ? re(e.from, s, r) || re(e.to, s, r) : !1))
2638
2638
  return !0;
2639
- const a = n.filter((s) => typeof s == "function");
2640
- if (a.length) {
2639
+ const i = n.filter((s) => typeof s == "function");
2640
+ if (i.length) {
2641
2641
  let s = e.from;
2642
2642
  const c = r.differenceInCalendarDays(e.to, e.from);
2643
2643
  for (let u = 0; u <= c; u++) {
2644
- if (a.some((f) => f(s)))
2644
+ if (i.some((f) => f(s)))
2645
2645
  return !0;
2646
2646
  s = r.addDays(s, 1);
2647
2647
  }
@@ -2649,23 +2649,28 @@ function Ms(e, t, r = L) {
2649
2649
  return !1;
2650
2650
  }
2651
2651
  function Ds(e, t) {
2652
- const { disabled: r, excludeDisabled: n, selected: o, required: i, onSelect: a } = e, [s, c] = Ye(o, a ? o : void 0), u = a ? o : s;
2652
+ const { disabled: r, excludeDisabled: n, resetOnSelect: o, selected: a, required: i, onSelect: s } = e, [c, u] = Ye(a, s ? a : void 0), f = s ? a : c;
2653
2653
  return {
2654
- selected: u,
2655
- select: (h, b, O) => {
2656
- const { min: C, max: D } = e, v = h ? bs(h, u, C, D, i, t) : void 0;
2657
- return n && r && v?.from && v.to && Ms({ from: v.from, to: v.to }, r, t) && (v.from = h, v.to = void 0), a || c(v), a?.(v, h, b, O), v;
2654
+ selected: f,
2655
+ select: (g, v, C) => {
2656
+ const { min: O, max: T } = e;
2657
+ let M;
2658
+ if (g) {
2659
+ const b = f?.from, D = f?.to, p = !!b && !!D, m = !!b && !!D && t.isSameDay(b, D) && t.isSameDay(g, b);
2660
+ o && (p || !f?.from) ? !i && m ? M = void 0 : M = { from: g, to: void 0 } : M = bs(g, f, O, T, i, t);
2661
+ }
2662
+ return n && r && M?.from && M.to && Ms({ from: M.from, to: M.to }, r, t) && (M.from = g, M.to = void 0), s || u(M), s?.(M, g, v, C), M;
2658
2663
  },
2659
- isSelected: (h) => u && ne(u, h, !1, t)
2664
+ isSelected: (g) => f && ne(f, g, !1, t)
2660
2665
  };
2661
2666
  }
2662
2667
  function ks(e, t) {
2663
- const { selected: r, required: n, onSelect: o } = e, [i, a] = Ye(r, o ? r : void 0), s = o ? r : i, { isSameDay: c } = t;
2668
+ const { selected: r, required: n, onSelect: o } = e, [a, i] = Ye(r, o ? r : void 0), s = o ? r : a, { isSameDay: c } = t;
2664
2669
  return {
2665
2670
  selected: s,
2666
- select: (l, h, b) => {
2667
- let O = l;
2668
- return !n && s && s && c(l, s) && (O = void 0), o || a(O), o?.(O, l, h, b), O;
2671
+ select: (l, h, g) => {
2672
+ let v = l;
2673
+ return !n && s && s && c(l, s) && (v = void 0), o || i(v), o?.(v, l, h, g), v;
2669
2674
  },
2670
2675
  isSelected: (l) => s ? c(s, l) : !1
2671
2676
  };
@@ -2712,21 +2717,21 @@ function vs(e) {
2712
2717
  if (r && (t = {
2713
2718
  ...e,
2714
2719
  timeZone: r
2715
- }, t.today && (t.today = z(t.today, r)), t.month && (t.month = z(t.month, r)), t.defaultMonth && (t.defaultMonth = z(t.defaultMonth, r)), t.startMonth && (t.startMonth = z(t.startMonth, r)), t.endMonth && (t.endMonth = z(t.endMonth, r)), t.mode === "single" && t.selected ? t.selected = z(t.selected, r) : t.mode === "multiple" && t.selected ? t.selected = t.selected?.map((M) => z(M, r)) : t.mode === "range" && t.selected && (t.selected = {
2720
+ }, t.today && (t.today = z(t.today, r)), t.month && (t.month = z(t.month, r)), t.defaultMonth && (t.defaultMonth = z(t.defaultMonth, r)), t.startMonth && (t.startMonth = z(t.startMonth, r)), t.endMonth && (t.endMonth = z(t.endMonth, r)), t.mode === "single" && t.selected ? t.selected = z(t.selected, r) : t.mode === "multiple" && t.selected ? t.selected = t.selected?.map((k) => z(k, r)) : t.mode === "range" && t.selected && (t.selected = {
2716
2721
  from: t.selected.from ? z(t.selected.from, r) : t.selected.from,
2717
2722
  to: t.selected.to ? z(t.selected.to, r) : t.selected.to
2718
2723
  }), t.disabled !== void 0 && (t.disabled = $e(t.disabled, r)), t.hidden !== void 0 && (t.hidden = $e(t.hidden, r)), t.modifiers)) {
2719
- const M = {};
2724
+ const k = {};
2720
2725
  Object.keys(t.modifiers).forEach((Y) => {
2721
- M[Y] = $e(t.modifiers?.[Y], r);
2722
- }), t.modifiers = M;
2726
+ k[Y] = $e(t.modifiers?.[Y], r);
2727
+ }), t.modifiers = k;
2723
2728
  }
2724
- const { components: n, formatters: o, labels: i, dateLib: a, locale: s, classNames: c } = be(() => {
2725
- const M = { ...Et, ...t.locale }, Y = t.broadcastCalendar ? 1 : t.weekStartsOn, g = t.noonSafe && t.timeZone ? es(t.timeZone, {
2729
+ const { components: n, formatters: o, labels: a, dateLib: i, locale: s, classNames: c } = be(() => {
2730
+ const k = { ...Et, ...t.locale }, Y = t.broadcastCalendar ? 1 : t.weekStartsOn, w = t.noonSafe && t.timeZone ? es(t.timeZone, {
2726
2731
  weekStartsOn: Y,
2727
- locale: M
2728
- }) : void 0, N = t.dateLib && g ? { ...g, ...t.dateLib } : t.dateLib ?? g, q = new G({
2729
- locale: M,
2732
+ locale: k
2733
+ }) : void 0, N = t.dateLib && w ? { ...w, ...t.dateLib } : t.dateLib ?? w, q = new G({
2734
+ locale: k,
2730
2735
  weekStartsOn: Y,
2731
2736
  firstWeekContainsDate: t.firstWeekContainsDate,
2732
2737
  useAdditionalWeekYearTokens: t.useAdditionalWeekYearTokens,
@@ -2739,7 +2744,7 @@ function vs(e) {
2739
2744
  components: Eo(t.components),
2740
2745
  formatters: Ro(t.formatters),
2741
2746
  labels: Vo(t.labels, q.options),
2742
- locale: M,
2747
+ locale: k,
2743
2748
  classNames: { ...Fo(), ...t.classNames }
2744
2749
  };
2745
2750
  }, [
@@ -2758,51 +2763,51 @@ function vs(e) {
2758
2763
  t.labels,
2759
2764
  t.classNames
2760
2765
  ]);
2761
- t.today || (t = { ...t, today: a.today() });
2762
- const { captionLayout: u, mode: f, navLayout: l, numberOfMonths: h = 1, onDayBlur: b, onDayClick: O, onDayFocus: C, onDayKeyDown: D, onDayMouseEnter: v, onDayMouseLeave: T, onNextClick: w, onPrevClick: k, showWeekNumber: p, styles: m } = t, { formatCaption: W, formatDay: E, formatMonthDropdown: H, formatWeekNumber: F, formatWeekNumberHeader: Z, formatWeekdayName: oe, formatYearDropdown: ee } = o, $ = hs(t, a), { days: ce, months: ve, navStart: Te, navEnd: xe, previousMonth: Q, nextMonth: X, goToMonth: te } = $, Pe = xo(ce, t, Te, xe, a), { isSelected: Ee, select: _e, selected: We } = Os(t, a) ?? {}, { blur: et, focused: tt, isFocusTarget: Zt, moveFocus: nt, setFocused: Se } = gs(t, $, Pe, Ee ?? (() => !1), a), { labelDayButton: Kt, labelGridcell: Jt, labelGrid: Lt, labelMonthDropdown: en, labelNav: rt, labelPrevious: tn, labelNext: nn, labelWeekday: rn, labelWeekNumber: on, labelWeekNumberHeader: sn, labelYearDropdown: an } = i, cn = be(() => Jo(a, t.ISOWeek, t.broadcastCalendar, t.today), [a, t.ISOWeek, t.broadcastCalendar, t.today]), ot = f !== void 0 || O !== void 0, Fe = R(() => {
2763
- Q && (te(Q), k?.(Q));
2764
- }, [Q, te, k]), Be = R(() => {
2765
- X && (te(X), w?.(X));
2766
- }, [te, X, w]), un = R((M, Y) => (g) => {
2767
- g.preventDefault(), g.stopPropagation(), Se(M), !Y.disabled && (_e?.(M.date, Y, g), O?.(M.date, Y, g));
2768
- }, [_e, O, Se]), ln = R((M, Y) => (g) => {
2769
- Se(M), C?.(M.date, Y, g);
2770
- }, [C, Se]), fn = R((M, Y) => (g) => {
2771
- et(), b?.(M.date, Y, g);
2772
- }, [et, b]), dn = R((M, Y) => (g) => {
2766
+ t.today || (t = { ...t, today: i.today() });
2767
+ const { captionLayout: u, mode: f, navLayout: l, numberOfMonths: h = 1, onDayBlur: g, onDayClick: v, onDayFocus: C, onDayKeyDown: O, onDayMouseEnter: T, onDayMouseLeave: M, onNextClick: b, onPrevClick: D, showWeekNumber: p, styles: m } = t, { formatCaption: W, formatDay: E, formatMonthDropdown: H, formatWeekNumber: F, formatWeekNumberHeader: Z, formatWeekdayName: oe, formatYearDropdown: ee } = o, $ = hs(t, i), { days: ce, months: ve, navStart: Te, navEnd: xe, previousMonth: Q, nextMonth: X, goToMonth: te } = $, Pe = xo(ce, t, Te, xe, i), { isSelected: Ee, select: _e, selected: We } = Os(t, i) ?? {}, { blur: et, focused: tt, isFocusTarget: Zt, moveFocus: nt, setFocused: Se } = gs(t, $, Pe, Ee ?? (() => !1), i), { labelDayButton: Kt, labelGridcell: Jt, labelGrid: Lt, labelMonthDropdown: en, labelNav: rt, labelPrevious: tn, labelNext: nn, labelWeekday: rn, labelWeekNumber: on, labelWeekNumberHeader: sn, labelYearDropdown: an } = a, cn = be(() => Jo(i, t.ISOWeek, t.broadcastCalendar, t.today), [i, t.ISOWeek, t.broadcastCalendar, t.today]), ot = f !== void 0 || v !== void 0, Fe = R(() => {
2768
+ Q && (te(Q), D?.(Q));
2769
+ }, [Q, te, D]), Be = R(() => {
2770
+ X && (te(X), b?.(X));
2771
+ }, [te, X, b]), un = R((k, Y) => (w) => {
2772
+ w.preventDefault(), w.stopPropagation(), Se(k), !Y.disabled && (_e?.(k.date, Y, w), v?.(k.date, Y, w));
2773
+ }, [_e, v, Se]), ln = R((k, Y) => (w) => {
2774
+ Se(k), C?.(k.date, Y, w);
2775
+ }, [C, Se]), fn = R((k, Y) => (w) => {
2776
+ et(), g?.(k.date, Y, w);
2777
+ }, [et, g]), dn = R((k, Y) => (w) => {
2773
2778
  const N = {
2774
2779
  ArrowLeft: [
2775
- g.shiftKey ? "month" : "day",
2780
+ w.shiftKey ? "month" : "day",
2776
2781
  t.dir === "rtl" ? "after" : "before"
2777
2782
  ],
2778
2783
  ArrowRight: [
2779
- g.shiftKey ? "month" : "day",
2784
+ w.shiftKey ? "month" : "day",
2780
2785
  t.dir === "rtl" ? "before" : "after"
2781
2786
  ],
2782
- ArrowDown: [g.shiftKey ? "year" : "week", "after"],
2783
- ArrowUp: [g.shiftKey ? "year" : "week", "before"],
2784
- PageUp: [g.shiftKey ? "year" : "month", "before"],
2785
- PageDown: [g.shiftKey ? "year" : "month", "after"],
2787
+ ArrowDown: [w.shiftKey ? "year" : "week", "after"],
2788
+ ArrowUp: [w.shiftKey ? "year" : "week", "before"],
2789
+ PageUp: [w.shiftKey ? "year" : "month", "before"],
2790
+ PageDown: [w.shiftKey ? "year" : "month", "after"],
2786
2791
  Home: ["startOfWeek", "before"],
2787
2792
  End: ["endOfWeek", "after"]
2788
2793
  };
2789
- if (N[g.key]) {
2790
- g.preventDefault(), g.stopPropagation();
2791
- const [q, S] = N[g.key];
2794
+ if (N[w.key]) {
2795
+ w.preventDefault(), w.stopPropagation();
2796
+ const [q, S] = N[w.key];
2792
2797
  nt(q, S);
2793
2798
  }
2794
- D?.(M.date, Y, g);
2795
- }, [nt, D, t.dir]), hn = R((M, Y) => (g) => {
2796
- v?.(M.date, Y, g);
2797
- }, [v]), mn = R((M, Y) => (g) => {
2798
- T?.(M.date, Y, g);
2799
- }, [T]), yn = R((M) => (Y) => {
2800
- const g = Number(Y.target.value), N = a.setMonth(a.startOfMonth(M), g);
2799
+ O?.(k.date, Y, w);
2800
+ }, [nt, O, t.dir]), hn = R((k, Y) => (w) => {
2801
+ T?.(k.date, Y, w);
2802
+ }, [T]), mn = R((k, Y) => (w) => {
2803
+ M?.(k.date, Y, w);
2804
+ }, [M]), yn = R((k) => (Y) => {
2805
+ const w = Number(Y.target.value), N = i.setMonth(i.startOfMonth(k), w);
2801
2806
  te(N);
2802
- }, [a, te]), gn = R((M) => (Y) => {
2803
- const g = Number(Y.target.value), N = a.setYear(a.startOfMonth(M), g);
2807
+ }, [i, te]), gn = R((k) => (Y) => {
2808
+ const w = Number(Y.target.value), N = i.setYear(i.startOfMonth(k), w);
2804
2809
  te(N);
2805
- }, [a, te]), { className: pn, style: bn } = be(() => ({
2810
+ }, [i, te]), { className: pn, style: bn } = be(() => ({
2806
2811
  className: [c[y.Root], t.className].filter(Boolean).join(" "),
2807
2812
  style: { ...m?.[y.Root], ...t.style }
2808
2813
  }), [c, t.className, t.style, m]), wn = _o(t), st = Ce(null);
@@ -2810,7 +2815,7 @@ function vs(e) {
2810
2815
  classNames: c,
2811
2816
  months: ve,
2812
2817
  focused: tt,
2813
- dateLib: a
2818
+ dateLib: i
2814
2819
  });
2815
2820
  const Mn = {
2816
2821
  dayPickerProps: t,
@@ -2825,7 +2830,7 @@ function vs(e) {
2825
2830
  components: n,
2826
2831
  classNames: c,
2827
2832
  styles: m,
2828
- labels: i,
2833
+ labels: a,
2829
2834
  formatters: o
2830
2835
  };
2831
2836
  return d.createElement(
@@ -2833,12 +2838,12 @@ function vs(e) {
2833
2838
  { value: Mn },
2834
2839
  d.createElement(
2835
2840
  n.Root,
2836
- { rootRef: t.animate ? st : void 0, className: pn, style: bn, dir: t.dir, id: t.id, lang: t.lang, nonce: t.nonce, title: t.title, role: t.role, "aria-label": t["aria-label"], "aria-labelledby": t["aria-labelledby"], ...wn },
2841
+ { rootRef: t.animate ? st : void 0, className: pn, style: bn, dir: t.dir, id: t.id, lang: t.lang ?? s.code, nonce: t.nonce, title: t.title, role: t.role, "aria-label": t["aria-label"], "aria-labelledby": t["aria-labelledby"], ...wn },
2837
2842
  d.createElement(
2838
2843
  n.Months,
2839
2844
  { className: c[y.Months], style: m?.[y.Months] },
2840
2845
  !t.hideNavigation && !l && d.createElement(n.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: c[y.Nav], style: m?.[y.Nav], "aria-label": rt(), onPreviousClick: Fe, onNextClick: Be, previousMonth: Q, nextMonth: X }),
2841
- ve.map((M, Y) => d.createElement(
2846
+ ve.map((k, Y) => d.createElement(
2842
2847
  n.Month,
2843
2848
  {
2844
2849
  "data-animated-month": t.animate ? "true" : void 0,
@@ -2847,19 +2852,19 @@ function vs(e) {
2847
2852
  // biome-ignore lint/suspicious/noArrayIndexKey: breaks animation
2848
2853
  key: Y,
2849
2854
  displayIndex: Y,
2850
- calendarMonth: M
2855
+ calendarMonth: k
2851
2856
  },
2852
2857
  l === "around" && !t.hideNavigation && Y === 0 && d.createElement(
2853
2858
  n.PreviousMonthButton,
2854
2859
  { type: "button", className: c[y.PreviousMonthButton], tabIndex: Q ? void 0 : -1, "aria-disabled": Q ? void 0 : !0, "aria-label": tn(Q), onClick: Fe, "data-animated-button": t.animate ? "true" : void 0 },
2855
2860
  d.createElement(n.Chevron, { disabled: Q ? void 0 : !0, className: c[y.Chevron], orientation: t.dir === "rtl" ? "right" : "left" })
2856
2861
  ),
2857
- d.createElement(n.MonthCaption, { "data-animated-caption": t.animate ? "true" : void 0, className: c[y.MonthCaption], style: m?.[y.MonthCaption], calendarMonth: M, displayIndex: Y }, u?.startsWith("dropdown") ? d.createElement(
2862
+ d.createElement(n.MonthCaption, { "data-animated-caption": t.animate ? "true" : void 0, className: c[y.MonthCaption], style: m?.[y.MonthCaption], calendarMonth: k, displayIndex: Y }, u?.startsWith("dropdown") ? d.createElement(
2858
2863
  n.DropdownNav,
2859
2864
  { className: c[y.Dropdowns], style: m?.[y.Dropdowns] },
2860
2865
  (() => {
2861
- const g = u === "dropdown" || u === "dropdown-months" ? d.createElement(n.MonthsDropdown, { key: "month", className: c[y.MonthsDropdown], "aria-label": en(), classNames: c, components: n, disabled: !!t.disableNavigation, onChange: yn(M.date), options: Zo(M.date, Te, xe, o, a), style: m?.[y.Dropdown], value: a.getMonth(M.date) }) : d.createElement("span", { key: "month" }, H(M.date, a)), N = u === "dropdown" || u === "dropdown-years" ? d.createElement(n.YearsDropdown, { key: "year", className: c[y.YearsDropdown], "aria-label": an(a.options), classNames: c, components: n, disabled: !!t.disableNavigation, onChange: gn(M.date), options: Lo(Te, xe, o, a, !!t.reverseYears), style: m?.[y.Dropdown], value: a.getYear(M.date) }) : d.createElement("span", { key: "year" }, ee(M.date, a));
2862
- return a.getMonthYearOrder() === "year-first" ? [N, g] : [g, N];
2866
+ const w = u === "dropdown" || u === "dropdown-months" ? d.createElement(n.MonthsDropdown, { key: "month", className: c[y.MonthsDropdown], "aria-label": en(), classNames: c, components: n, disabled: !!t.disableNavigation, onChange: yn(k.date), options: Zo(k.date, Te, xe, o, i), style: m?.[y.Dropdown], value: i.getMonth(k.date) }) : d.createElement("span", { key: "month" }, H(k.date, i)), N = u === "dropdown" || u === "dropdown-years" ? d.createElement(n.YearsDropdown, { key: "year", className: c[y.YearsDropdown], "aria-label": an(i.options), classNames: c, components: n, disabled: !!t.disableNavigation, onChange: gn(k.date), options: Lo(Te, xe, o, i, !!t.reverseYears), style: m?.[y.Dropdown], value: i.getYear(k.date) }) : d.createElement("span", { key: "year" }, ee(k.date, i));
2867
+ return i.getMonthYearOrder() === "year-first" ? [N, w] : [w, N];
2863
2868
  })(),
2864
2869
  d.createElement("span", { role: "status", "aria-live": "polite", style: {
2865
2870
  border: 0,
@@ -2872,8 +2877,8 @@ function vs(e) {
2872
2877
  width: "1px",
2873
2878
  whiteSpace: "nowrap",
2874
2879
  wordWrap: "normal"
2875
- } }, W(M.date, a.options, a))
2876
- ) : d.createElement(n.CaptionLabel, { className: c[y.CaptionLabel], role: "status", "aria-live": "polite" }, W(M.date, a.options, a))),
2880
+ } }, W(k.date, i.options, i))
2881
+ ) : d.createElement(n.CaptionLabel, { className: c[y.CaptionLabel], role: "status", "aria-live": "polite" }, W(k.date, i.options, i))),
2877
2882
  l === "around" && !t.hideNavigation && Y === h - 1 && d.createElement(
2878
2883
  n.NextMonthButton,
2879
2884
  { type: "button", className: c[y.NextMonthButton], tabIndex: X ? void 0 : -1, "aria-disabled": X ? void 0 : !0, "aria-label": nn(X), onClick: Be, "data-animated-button": t.animate ? "true" : void 0 },
@@ -2882,27 +2887,27 @@ function vs(e) {
2882
2887
  Y === h - 1 && l === "after" && !t.hideNavigation && d.createElement(n.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: c[y.Nav], style: m?.[y.Nav], "aria-label": rt(), onPreviousClick: Fe, onNextClick: Be, previousMonth: Q, nextMonth: X }),
2883
2888
  d.createElement(
2884
2889
  n.MonthGrid,
2885
- { role: "grid", "aria-multiselectable": f === "multiple" || f === "range", "aria-label": Lt(M.date, a.options, a) || void 0, className: c[y.MonthGrid], style: m?.[y.MonthGrid] },
2890
+ { role: "grid", "aria-multiselectable": f === "multiple" || f === "range", "aria-label": Lt(k.date, i.options, i) || void 0, className: c[y.MonthGrid], style: m?.[y.MonthGrid] },
2886
2891
  !t.hideWeekdays && d.createElement(
2887
2892
  n.Weekdays,
2888
2893
  { "data-animated-weekdays": t.animate ? "true" : void 0, className: c[y.Weekdays], style: m?.[y.Weekdays] },
2889
- p && d.createElement(n.WeekNumberHeader, { "aria-label": sn(a.options), className: c[y.WeekNumberHeader], style: m?.[y.WeekNumberHeader], scope: "col" }, Z()),
2890
- cn.map((g) => d.createElement(n.Weekday, { "aria-label": rn(g, a.options, a), className: c[y.Weekday], key: String(g), style: m?.[y.Weekday], scope: "col" }, oe(g, a.options, a)))
2894
+ p && d.createElement(n.WeekNumberHeader, { "aria-label": sn(i.options), className: c[y.WeekNumberHeader], style: m?.[y.WeekNumberHeader], scope: "col" }, Z()),
2895
+ cn.map((w) => d.createElement(n.Weekday, { "aria-label": rn(w, i.options, i), className: c[y.Weekday], key: String(w), style: m?.[y.Weekday], scope: "col" }, oe(w, i.options, i)))
2891
2896
  ),
2892
- d.createElement(n.Weeks, { "data-animated-weeks": t.animate ? "true" : void 0, className: c[y.Weeks], style: m?.[y.Weeks] }, M.weeks.map((g) => d.createElement(
2897
+ d.createElement(n.Weeks, { "data-animated-weeks": t.animate ? "true" : void 0, className: c[y.Weeks], style: m?.[y.Weeks] }, k.weeks.map((w) => d.createElement(
2893
2898
  n.Week,
2894
- { className: c[y.Week], key: g.weekNumber, style: m?.[y.Week], week: g },
2895
- p && d.createElement(n.WeekNumber, { week: g, style: m?.[y.WeekNumber], "aria-label": on(g.weekNumber, {
2899
+ { className: c[y.Week], key: w.weekNumber, style: m?.[y.Week], week: w },
2900
+ p && d.createElement(n.WeekNumber, { week: w, style: m?.[y.WeekNumber], "aria-label": on(w.weekNumber, {
2896
2901
  locale: s
2897
- }), className: c[y.WeekNumber], scope: "row", role: "rowheader" }, F(g.weekNumber, a)),
2898
- g.days.map((N) => {
2902
+ }), className: c[y.WeekNumber], scope: "row", role: "rowheader" }, F(w.weekNumber, i)),
2903
+ w.days.map((N) => {
2899
2904
  const { date: q } = N, S = Pe(N);
2900
2905
  if (S[_.focused] = !S.hidden && !!tt?.isEqualTo(N), S[V.selected] = Ee?.(q) || S.selected, Ne(We)) {
2901
2906
  const { from: Ie, to: He } = We;
2902
- S[V.range_start] = !!(Ie && He && a.isSameDay(q, Ie)), S[V.range_end] = !!(Ie && He && a.isSameDay(q, He)), S[V.range_middle] = ne(We, q, !0, a);
2907
+ S[V.range_start] = !!(Ie && He && i.isSameDay(q, Ie)), S[V.range_end] = !!(Ie && He && i.isSameDay(q, He)), S[V.range_middle] = ne(We, q, !0, i);
2903
2908
  }
2904
- const Dn = Ko(S, m, t.modifiersStyles), kn = Po(S, c, t.modifiersClassNames), On = !ot && !S.hidden ? Jt(q, S, a.options, a) : void 0;
2905
- return d.createElement(n.Day, { key: `${N.isoDate}_${N.displayMonthId}`, day: N, modifiers: S, className: kn.join(" "), style: Dn, role: "gridcell", "aria-selected": S.selected || void 0, "aria-label": On, "data-day": N.isoDate, "data-month": N.outside ? N.dateMonthId : void 0, "data-selected": S.selected || void 0, "data-disabled": S.disabled || void 0, "data-hidden": S.hidden || void 0, "data-outside": N.outside || void 0, "data-focused": S.focused || void 0, "data-today": S.today || void 0 }, !S.hidden && ot ? d.createElement(n.DayButton, { className: c[y.DayButton], style: m?.[y.DayButton], type: "button", day: N, modifiers: S, disabled: !S.focused && S.disabled || void 0, "aria-disabled": S.focused && S.disabled || void 0, tabIndex: Zt(N) ? 0 : -1, "aria-label": Kt(q, S, a.options, a), onClick: un(N, S), onBlur: fn(N, S), onFocus: ln(N, S), onKeyDown: dn(N, S), onMouseEnter: hn(N, S), onMouseLeave: mn(N, S) }, E(q, a.options, a)) : !S.hidden && E(N.date, a.options, a));
2909
+ const Dn = Ko(S, m, t.modifiersStyles), kn = Po(S, c, t.modifiersClassNames), On = !ot && !S.hidden ? Jt(q, S, i.options, i) : void 0;
2910
+ return d.createElement(n.Day, { key: `${N.isoDate}_${N.displayMonthId}`, day: N, modifiers: S, className: kn.join(" "), style: Dn, role: "gridcell", "aria-selected": S.selected || void 0, "aria-label": On, "data-day": N.isoDate, "data-month": N.outside ? N.dateMonthId : void 0, "data-selected": S.selected || void 0, "data-disabled": S.disabled || void 0, "data-hidden": S.hidden || void 0, "data-outside": N.outside || void 0, "data-focused": S.focused || void 0, "data-today": S.today || void 0 }, !S.hidden && ot ? d.createElement(n.DayButton, { className: c[y.DayButton], style: m?.[y.DayButton], type: "button", day: N, modifiers: S, disabled: !S.focused && S.disabled || void 0, "aria-disabled": S.focused && S.disabled || void 0, tabIndex: Zt(N) ? 0 : -1, "aria-label": Kt(q, S, i.options, i), onClick: un(N, S), onBlur: fn(N, S), onFocus: ln(N, S), onKeyDown: dn(N, S), onMouseEnter: hn(N, S), onMouseLeave: mn(N, S) }, E(q, i.options, i)) : !S.hidden && E(N.date, i.options, i));
2906
2911
  })
2907
2912
  )))
2908
2913
  )
@@ -2912,12 +2917,12 @@ function vs(e) {
2912
2917
  )
2913
2918
  );
2914
2919
  }
2915
- const Ws = ({ classNames: e, disabled: t, disablePastDates: r = !0, fixedWeeks: n, locale: o, showOutsideDays: i = !0, ...a }) => {
2920
+ const Ws = ({ classNames: e, disabled: t, disablePastDates: r = !0, fixedWeeks: n, locale: o, showOutsideDays: a = !0, ...i }) => {
2916
2921
  const s = be(() => /* @__PURE__ */ new Date(), []), c = [...r ? [{ before: s }] : [], ...Array.isArray(t) ? t : t ? [t] : []];
2917
2922
  return /* @__PURE__ */ at(
2918
2923
  vs,
2919
2924
  {
2920
- ...a,
2925
+ ...i,
2921
2926
  classNames: {
2922
2927
  months: B("months relative flex"),
2923
2928
  month: B("month"),
@@ -2950,7 +2955,7 @@ const Ws = ({ classNames: e, disabled: t, disablePastDates: r = !0, fixedWeeks:
2950
2955
  disabled: c.length > 0 ? c : void 0,
2951
2956
  fixedWeeks: n,
2952
2957
  locale: o,
2953
- showOutsideDays: i
2958
+ showOutsideDays: a
2954
2959
  }
2955
2960
  );
2956
2961
  };