@konstructio/ui 0.1.0-alpha.25 → 0.1.0-alpha.26

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,102 +1,115 @@
1
- import { jsx as Be } from "react/jsx-runtime";
2
- import m, { createContext as dn, useContext as ln, useCallback as A, useRef as Se, useLayoutEffect as hn, useState as Ce, useEffect as mn, useMemo as Ie } from "react";
3
- import { cn as le } from "../../utils/index.js";
4
- import { datePickerVariants as yn } from "./DatePicker.variants.js";
5
- import { c as ft } from "../../createLucideIcon-B7yPYScZ.js";
1
+ import { jsx as _e } from "react/jsx-runtime";
2
+ import m, { createContext as cn, useContext as un, useCallback as A, useRef as We, useLayoutEffect as fn, useState as Se, useEffect as dn, useMemo as Pe } from "react";
3
+ import { cn as de } from "../../utils/index.js";
4
+ import { datePickerVariants as ln } from "./DatePicker.variants.js";
5
+ import { c as it } from "../../createLucideIcon-Zzp102Nb.js";
6
6
  import '../../DatePicker.css';/**
7
- * @license lucide-react v0.539.0 - ISC
7
+ * @license lucide-react v0.540.0 - ISC
8
8
  *
9
9
  * This source code is licensed under the ISC license.
10
10
  * See the LICENSE file in the root directory of this source tree.
11
11
  */
12
- const gn = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], wn = ft("chevron-left", gn);
12
+ const hn = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], mn = it("chevron-left", hn);
13
13
  /**
14
- * @license lucide-react v0.539.0 - ISC
14
+ * @license lucide-react v0.540.0 - ISC
15
15
  *
16
16
  * This source code is licensed under the ISC license.
17
17
  * See the LICENSE file in the root directory of this source tree.
18
18
  */
19
- const bn = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], Mn = ft("chevron-right", bn), He = {}, ye = {};
20
- function ge(t, e) {
19
+ const yn = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], gn = it("chevron-right", yn);
20
+ function wn(t, e, n = "long") {
21
+ return new Intl.DateTimeFormat("en-US", {
22
+ // Enforces engine to render the time. Without the option JavaScriptCore omits it.
23
+ hour: "numeric",
24
+ timeZone: t,
25
+ timeZoneName: n
26
+ }).format(e).split(/\s/g).slice(2).join(" ");
27
+ }
28
+ const Fe = {}, me = {};
29
+ function ne(t, e) {
21
30
  try {
22
- const r = (He[t] || (He[t] = new Intl.DateTimeFormat("en-GB", {
31
+ const r = (Fe[t] || (Fe[t] = new Intl.DateTimeFormat("en-US", {
23
32
  timeZone: t,
24
- hour: "numeric",
25
33
  timeZoneName: "longOffset"
26
- }).format))(e).split("GMT")[1] || "";
27
- return r in ye ? ye[r] : Ke(r, r.split(":"));
34
+ }).format))(e).split("GMT")[1];
35
+ return r in me ? me[r] : Ue(r, r.split(":"));
28
36
  } catch {
29
- if (t in ye) return ye[t];
30
- const n = t == null ? void 0 : t.match(kn);
31
- return n ? Ke(t, n.slice(1)) : NaN;
37
+ if (t in me) return me[t];
38
+ const n = t == null ? void 0 : t.match(bn);
39
+ return n ? Ue(t, n.slice(1)) : NaN;
32
40
  }
33
41
  }
34
- const kn = /([+-]\d\d):?(\d\d)?/;
35
- function Ke(t, e) {
36
- const n = +e[0], r = +(e[1] || 0);
37
- return ye[t] = n > 0 ? n * 60 + r : n * 60 - r;
42
+ const bn = /([+-]\d\d):?(\d\d)?/;
43
+ function Ue(t, e) {
44
+ const n = +(e[0] || 0), r = +(e[1] || 0), a = +(e[2] || 0) / 60;
45
+ return me[t] = n * 60 + r > 0 ? n * 60 + r + a : n * 60 - r - a;
38
46
  }
39
- class L extends Date {
47
+ class X extends Date {
40
48
  //#region static
41
49
  constructor(...e) {
42
- super(), e.length > 1 && typeof e[e.length - 1] == "string" && (this.timeZone = e.pop()), this.internal = /* @__PURE__ */ new Date(), isNaN(ge(this.timeZone, this)) ? this.setTime(NaN) : e.length ? typeof e[0] == "number" && (e.length === 1 || e.length === 2 && typeof e[1] != "number") ? this.setTime(e[0]) : typeof e[0] == "string" ? this.setTime(+new Date(e[0])) : e[0] instanceof Date ? this.setTime(+e[0]) : (this.setTime(+new Date(...e)), dt(this), Ge(this)) : this.setTime(Date.now());
50
+ super(), e.length > 1 && typeof e[e.length - 1] == "string" && (this.timeZone = e.pop()), this.internal = /* @__PURE__ */ new Date(), isNaN(ne(this.timeZone, this)) ? this.setTime(NaN) : e.length ? typeof e[0] == "number" && (e.length === 1 || e.length === 2 && typeof e[1] != "number") ? this.setTime(e[0]) : typeof e[0] == "string" ? this.setTime(+new Date(e[0])) : e[0] instanceof Date ? this.setTime(+e[0]) : (this.setTime(+new Date(...e)), ct(this), Ae(this)) : this.setTime(Date.now());
43
51
  }
44
52
  static tz(e, ...n) {
45
- return n.length ? new L(...n, e) : new L(Date.now(), e);
53
+ return n.length ? new X(...n, e) : new X(Date.now(), e);
46
54
  }
47
55
  //#endregion
48
56
  //#region time zone
49
57
  withTimeZone(e) {
50
- return new L(+this, e);
58
+ return new X(+this, e);
51
59
  }
52
60
  getTimezoneOffset() {
53
- return -ge(this.timeZone, this);
61
+ const e = -ne(this.timeZone, this);
62
+ return e > 0 ? Math.floor(e) : Math.ceil(e);
54
63
  }
55
64
  //#endregion
56
65
  //#region time
57
66
  setTime(e) {
58
- return Date.prototype.setTime.apply(this, arguments), Ge(this), +this;
67
+ return Date.prototype.setTime.apply(this, arguments), Ae(this), +this;
59
68
  }
60
69
  //#endregion
61
70
  //#region date-fns integration
62
71
  [Symbol.for("constructDateFrom")](e) {
63
- return new L(+new Date(e), this.timeZone);
72
+ return new X(+new Date(e), this.timeZone);
64
73
  }
65
74
  //#endregion
66
75
  }
67
- const Je = /^(get|set)(?!UTC)/;
76
+ const Le = /^(get|set)(?!UTC)/;
68
77
  Object.getOwnPropertyNames(Date.prototype).forEach((t) => {
69
- if (!Je.test(t)) return;
70
- const e = t.replace(Je, "$1UTC");
71
- L.prototype[e] && (t.startsWith("get") ? L.prototype[t] = function() {
78
+ if (!Le.test(t)) return;
79
+ const e = t.replace(Le, "$1UTC");
80
+ X.prototype[e] && (t.startsWith("get") ? X.prototype[t] = function() {
72
81
  return this.internal[e]();
73
- } : (L.prototype[t] = function() {
74
- return Date.prototype[e].apply(this.internal, arguments), Dn(this), +this;
75
- }, L.prototype[e] = function() {
76
- return Date.prototype[e].apply(this, arguments), Ge(this), +this;
82
+ } : (X.prototype[t] = function() {
83
+ return Date.prototype[e].apply(this.internal, arguments), Mn(this), +this;
84
+ }, X.prototype[e] = function() {
85
+ return Date.prototype[e].apply(this, arguments), Ae(this), +this;
77
86
  }));
78
87
  });
79
- function Ge(t) {
80
- t.internal.setTime(+t), t.internal.setUTCMinutes(t.internal.getUTCMinutes() - t.getTimezoneOffset());
81
- }
82
- function Dn(t) {
83
- Date.prototype.setFullYear.call(t, t.internal.getUTCFullYear(), t.internal.getUTCMonth(), t.internal.getUTCDate()), Date.prototype.setHours.call(t, t.internal.getUTCHours(), t.internal.getUTCMinutes(), t.internal.getUTCSeconds(), t.internal.getUTCMilliseconds()), dt(t);
84
- }
85
- function dt(t) {
86
- const e = ge(t.timeZone, t), n = /* @__PURE__ */ new Date(+t);
87
- n.setUTCHours(n.getUTCHours() - 1);
88
- const r = -(/* @__PURE__ */ new Date(+t)).getTimezoneOffset(), a = -(/* @__PURE__ */ new Date(+n)).getTimezoneOffset(), o = r - a, i = Date.prototype.getHours.apply(t) !== t.internal.getUTCHours();
89
- o && i && t.internal.setUTCMinutes(t.internal.getUTCMinutes() + o);
90
- const s = r - e;
91
- s && Date.prototype.setUTCMinutes.call(t, Date.prototype.getUTCMinutes.call(t) + s);
92
- const c = ge(t.timeZone, t), l = -(/* @__PURE__ */ new Date(+t)).getTimezoneOffset() - c, u = c !== e, h = l - s;
93
- if (u && h) {
94
- Date.prototype.setUTCMinutes.call(t, Date.prototype.getUTCMinutes.call(t) + h);
95
- const w = ge(t.timeZone, t), b = c - w;
96
- b && (t.internal.setUTCMinutes(t.internal.getUTCMinutes() + b), Date.prototype.setUTCMinutes.call(t, Date.prototype.getUTCMinutes.call(t) + b));
88
+ function Ae(t) {
89
+ t.internal.setTime(+t), t.internal.setUTCSeconds(t.internal.getUTCSeconds() - Math.round(-ne(t.timeZone, t) * 60));
90
+ }
91
+ function Mn(t) {
92
+ Date.prototype.setFullYear.call(t, t.internal.getUTCFullYear(), t.internal.getUTCMonth(), t.internal.getUTCDate()), Date.prototype.setHours.call(t, t.internal.getUTCHours(), t.internal.getUTCMinutes(), t.internal.getUTCSeconds(), t.internal.getUTCMilliseconds()), ct(t);
93
+ }
94
+ function ct(t) {
95
+ const e = ne(t.timeZone, t), n = e > 0 ? Math.floor(e) : Math.ceil(e), r = /* @__PURE__ */ new Date(+t);
96
+ r.setUTCHours(r.getUTCHours() - 1);
97
+ const a = -(/* @__PURE__ */ new Date(+t)).getTimezoneOffset(), o = -(/* @__PURE__ */ new Date(+r)).getTimezoneOffset(), i = a - o, s = Date.prototype.getHours.apply(t) !== t.internal.getUTCHours();
98
+ i && s && t.internal.setUTCMinutes(t.internal.getUTCMinutes() + i);
99
+ const c = a - n;
100
+ c && Date.prototype.setUTCMinutes.call(t, Date.prototype.getUTCMinutes.call(t) + c);
101
+ const f = /* @__PURE__ */ new Date(+t);
102
+ f.setUTCSeconds(0);
103
+ const l = a > 0 ? f.getSeconds() : (f.getSeconds() - 60) % 60, u = Math.round(-(ne(t.timeZone, t) * 60)) % 60;
104
+ (u || l) && (t.internal.setUTCSeconds(t.internal.getUTCSeconds() + u), Date.prototype.setUTCSeconds.call(t, Date.prototype.getUTCSeconds.call(t) + u + l));
105
+ const h = ne(t.timeZone, t), w = h > 0 ? Math.floor(h) : Math.ceil(h), O = -(/* @__PURE__ */ new Date(+t)).getTimezoneOffset() - w, M = w !== n, k = O - c;
106
+ if (M && k) {
107
+ Date.prototype.setUTCMinutes.call(t, Date.prototype.getUTCMinutes.call(t) + k);
108
+ const D = ne(t.timeZone, t), y = D > 0 ? Math.floor(D) : Math.ceil(D), N = w - y;
109
+ N && (t.internal.setUTCMinutes(t.internal.getUTCMinutes() + N), Date.prototype.setUTCMinutes.call(t, Date.prototype.getUTCMinutes.call(t) + N));
97
110
  }
98
111
  }
99
- class I extends L {
112
+ class I extends X {
100
113
  //#region static
101
114
  static tz(e, ...n) {
102
115
  return n.length ? new I(...n, e) : new I(Date.now(), e);
@@ -116,7 +129,7 @@ class I extends L {
116
129
  }
117
130
  toTimeString() {
118
131
  const e = this.internal.toUTCString().split(" ")[4], [n, r, a] = this.tzComponents();
119
- return `${e} GMT${n}${r}${a} (${vn(this.timeZone, this)})`;
132
+ return `${e} GMT${n}${r}${a} (${wn(this.timeZone, this)})`;
120
133
  }
121
134
  toLocaleString(e, n) {
122
135
  return Date.prototype.toLocaleString.call(this, e, {
@@ -152,45 +165,23 @@ class I extends L {
152
165
  }
153
166
  //#endregion
154
167
  }
155
- function vn(t, e) {
156
- return new Intl.DateTimeFormat("en-GB", {
157
- timeZone: t,
158
- timeZoneName: "long"
159
- }).format(e).slice(12);
160
- }
161
- var g;
162
- (function(t) {
163
- t.Root = "root", t.Chevron = "chevron", t.Day = "day", t.DayButton = "day_button", t.CaptionLabel = "caption_label", t.Dropdowns = "dropdowns", t.Dropdown = "dropdown", t.DropdownRoot = "dropdown_root", t.Footer = "footer", t.MonthGrid = "month_grid", t.MonthCaption = "month_caption", t.MonthsDropdown = "months_dropdown", t.Month = "month", t.Months = "months", t.Nav = "nav", t.NextMonthButton = "button_next", t.PreviousMonthButton = "button_previous", t.Week = "week", t.Weeks = "weeks", t.Weekday = "weekday", t.Weekdays = "weekdays", t.WeekNumber = "week_number", t.WeekNumberHeader = "week_number_header", t.YearsDropdown = "years_dropdown";
164
- })(g || (g = {}));
165
- var P;
166
- (function(t) {
167
- t.disabled = "disabled", t.hidden = "hidden", t.outside = "outside", t.focused = "focused", t.today = "today";
168
- })(P || (P = {}));
169
- var Z;
170
- (function(t) {
171
- t.range_end = "range_end", t.range_middle = "range_middle", t.range_start = "range_start", t.selected = "selected";
172
- })(Z || (Z = {}));
173
- var j;
174
- (function(t) {
175
- t.weeks_before_enter = "weeks_before_enter", t.weeks_before_exit = "weeks_before_exit", t.weeks_after_enter = "weeks_after_enter", t.weeks_after_exit = "weeks_after_exit", t.caption_after_enter = "caption_after_enter", t.caption_after_exit = "caption_after_exit", t.caption_before_enter = "caption_before_enter", t.caption_before_exit = "caption_before_exit";
176
- })(j || (j = {}));
177
- const lt = 6048e5, On = 864e5, et = Symbol.for("constructDateFrom");
178
- function _(t, e) {
179
- return typeof t == "function" ? t(e) : t && typeof t == "object" && et in t ? t[et](e) : t instanceof Date ? new t.constructor(e) : new Date(e);
168
+ const ut = 6048e5, kn = 864e5, Ve = Symbol.for("constructDateFrom");
169
+ function F(t, e) {
170
+ return typeof t == "function" ? t(e) : t && typeof t == "object" && Ve in t ? t[Ve](e) : t instanceof Date ? new t.constructor(e) : new Date(e);
180
171
  }
181
172
  function Y(t, e) {
182
- return _(e || t, t);
173
+ return F(e || t, t);
183
174
  }
184
- function ht(t, e, n) {
175
+ function ft(t, e, n) {
185
176
  const r = Y(t, n == null ? void 0 : n.in);
186
- return isNaN(e) ? _(t, NaN) : (e && r.setDate(r.getDate() + e), r);
177
+ return isNaN(e) ? F(t, NaN) : (e && r.setDate(r.getDate() + e), r);
187
178
  }
188
- function mt(t, e, n) {
179
+ function dt(t, e, n) {
189
180
  const r = Y(t, n == null ? void 0 : n.in);
190
- if (isNaN(e)) return _(t, NaN);
181
+ if (isNaN(e)) return F(t, NaN);
191
182
  if (!e)
192
183
  return r;
193
- const a = r.getDate(), o = _(t, r.getTime());
184
+ const a = r.getDate(), o = F(t, r.getTime());
194
185
  o.setMonth(r.getMonth() + e + 1, 0);
195
186
  const i = o.getDate();
196
187
  return a >= i ? o : (r.setFullYear(
@@ -199,27 +190,27 @@ function mt(t, e, n) {
199
190
  a
200
191
  ), r);
201
192
  }
202
- let Wn = {};
203
- function Me() {
204
- return Wn;
193
+ let Dn = {};
194
+ function we() {
195
+ return Dn;
205
196
  }
206
- function ce(t, e) {
207
- var s, c, d, l;
208
- const n = Me(), r = (e == null ? void 0 : e.weekStartsOn) ?? ((c = (s = e == null ? void 0 : e.locale) == null ? void 0 : s.options) == null ? void 0 : c.weekStartsOn) ?? n.weekStartsOn ?? ((l = (d = n.locale) == null ? void 0 : d.options) == null ? void 0 : l.weekStartsOn) ?? 0, a = Y(t, e == null ? void 0 : e.in), o = a.getDay(), i = (o < r ? 7 : 0) + o - r;
197
+ function ie(t, e) {
198
+ var s, c, f, l;
199
+ const n = we(), r = (e == null ? void 0 : e.weekStartsOn) ?? ((c = (s = e == null ? void 0 : e.locale) == null ? void 0 : s.options) == null ? void 0 : c.weekStartsOn) ?? n.weekStartsOn ?? ((l = (f = n.locale) == null ? void 0 : f.options) == null ? void 0 : l.weekStartsOn) ?? 0, a = Y(t, e == null ? void 0 : e.in), o = a.getDay(), i = (o < r ? 7 : 0) + o - r;
209
200
  return a.setDate(a.getDate() - i), a.setHours(0, 0, 0, 0), a;
210
201
  }
211
- function we(t, e) {
212
- return ce(t, { ...e, weekStartsOn: 1 });
202
+ function ye(t, e) {
203
+ return ie(t, { ...e, weekStartsOn: 1 });
213
204
  }
214
- function yt(t, e) {
215
- const n = Y(t, e == null ? void 0 : e.in), r = n.getFullYear(), a = _(n, 0);
205
+ function lt(t, e) {
206
+ const n = Y(t, e == null ? void 0 : e.in), r = n.getFullYear(), a = F(n, 0);
216
207
  a.setFullYear(r + 1, 0, 4), a.setHours(0, 0, 0, 0);
217
- const o = we(a), i = _(n, 0);
208
+ const o = ye(a), i = F(n, 0);
218
209
  i.setFullYear(r, 0, 4), i.setHours(0, 0, 0, 0);
219
- const s = we(i);
210
+ const s = ye(i);
220
211
  return n.getTime() >= o.getTime() ? r + 1 : n.getTime() >= s.getTime() ? r : r - 1;
221
212
  }
222
- function tt(t) {
213
+ function Ke(t) {
223
214
  const e = Y(t), n = new Date(
224
215
  Date.UTC(
225
216
  e.getFullYear(),
@@ -233,113 +224,113 @@ function tt(t) {
233
224
  );
234
225
  return n.setUTCFullYear(e.getFullYear()), +t - +n;
235
226
  }
236
- function ue(t, ...e) {
237
- const n = _.bind(
227
+ function ce(t, ...e) {
228
+ const n = F.bind(
238
229
  null,
239
230
  e.find((r) => typeof r == "object")
240
231
  );
241
232
  return e.map(n);
242
233
  }
243
- function be(t, e) {
234
+ function ge(t, e) {
244
235
  const n = Y(t, e == null ? void 0 : e.in);
245
236
  return n.setHours(0, 0, 0, 0), n;
246
237
  }
247
- function gt(t, e, n) {
248
- const [r, a] = ue(
238
+ function ht(t, e, n) {
239
+ const [r, a] = ce(
249
240
  n == null ? void 0 : n.in,
250
241
  t,
251
242
  e
252
- ), o = be(r), i = be(a), s = +o - tt(o), c = +i - tt(i);
253
- return Math.round((s - c) / On);
243
+ ), o = ge(r), i = ge(a), s = +o - Ke(o), c = +i - Ke(i);
244
+ return Math.round((s - c) / kn);
254
245
  }
255
- function pn(t, e) {
256
- const n = yt(t, e), r = _(t, 0);
257
- return r.setFullYear(n, 0, 4), r.setHours(0, 0, 0, 0), we(r);
246
+ function vn(t, e) {
247
+ const n = lt(t, e), r = F(t, 0);
248
+ return r.setFullYear(n, 0, 4), r.setHours(0, 0, 0, 0), ye(r);
258
249
  }
259
- function Nn(t, e, n) {
260
- return ht(t, e * 7, n);
250
+ function On(t, e, n) {
251
+ return ft(t, e * 7, n);
261
252
  }
262
- function Sn(t, e, n) {
263
- return mt(t, e * 12, n);
253
+ function Wn(t, e, n) {
254
+ return dt(t, e * 12, n);
264
255
  }
265
- function Cn(t, e) {
256
+ function Sn(t, e) {
266
257
  let n, r = e == null ? void 0 : e.in;
267
258
  return t.forEach((a) => {
268
- !r && typeof a == "object" && (r = _.bind(null, a));
259
+ !r && typeof a == "object" && (r = F.bind(null, a));
269
260
  const o = Y(a, r);
270
261
  (!n || n < o || isNaN(+o)) && (n = o);
271
- }), _(r, n || NaN);
262
+ }), F(r, n || NaN);
272
263
  }
273
- function xn(t, e) {
264
+ function pn(t, e) {
274
265
  let n, r = e == null ? void 0 : e.in;
275
266
  return t.forEach((a) => {
276
- !r && typeof a == "object" && (r = _.bind(null, a));
267
+ !r && typeof a == "object" && (r = F.bind(null, a));
277
268
  const o = Y(a, r);
278
269
  (!n || n > o || isNaN(+o)) && (n = o);
279
- }), _(r, n || NaN);
270
+ }), F(r, n || NaN);
280
271
  }
281
- function Yn(t, e, n) {
282
- const [r, a] = ue(
272
+ function Nn(t, e, n) {
273
+ const [r, a] = ce(
283
274
  n == null ? void 0 : n.in,
284
275
  t,
285
276
  e
286
277
  );
287
- return +be(r) == +be(a);
278
+ return +ge(r) == +ge(a);
288
279
  }
289
- function wt(t) {
280
+ function mt(t) {
290
281
  return t instanceof Date || typeof t == "object" && Object.prototype.toString.call(t) === "[object Date]";
291
282
  }
292
- function Tn(t) {
293
- return !(!wt(t) && typeof t != "number" || isNaN(+Y(t)));
283
+ function Cn(t) {
284
+ return !(!mt(t) && typeof t != "number" || isNaN(+Y(t)));
294
285
  }
295
- function En(t, e, n) {
296
- const [r, a] = ue(
286
+ function xn(t, e, n) {
287
+ const [r, a] = ce(
297
288
  n == null ? void 0 : n.in,
298
289
  t,
299
290
  e
300
291
  ), o = r.getFullYear() - a.getFullYear(), i = r.getMonth() - a.getMonth();
301
292
  return o * 12 + i;
302
293
  }
303
- function Pn(t, e) {
294
+ function Tn(t, e) {
304
295
  const n = Y(t, e == null ? void 0 : e.in), r = n.getMonth();
305
296
  return n.setFullYear(n.getFullYear(), r + 1, 0), n.setHours(23, 59, 59, 999), n;
306
297
  }
307
- function _n(t, e) {
308
- const [n, r] = ue(t, e.start, e.end);
298
+ function Yn(t, e) {
299
+ const [n, r] = ce(t, e.start, e.end);
309
300
  return { start: n, end: r };
310
301
  }
311
- function Fn(t, e) {
312
- const { start: n, end: r } = _n(e == null ? void 0 : e.in, t);
302
+ function En(t, e) {
303
+ const { start: n, end: r } = Yn(e == null ? void 0 : e.in, t);
313
304
  let a = +n > +r;
314
305
  const o = a ? +n : +r, i = a ? r : n;
315
306
  i.setHours(0, 0, 0, 0), i.setDate(1);
316
307
  let s = 1;
317
308
  const c = [];
318
309
  for (; +i <= o; )
319
- c.push(_(n, i)), i.setMonth(i.getMonth() + s);
310
+ c.push(F(n, i)), i.setMonth(i.getMonth() + s);
320
311
  return a ? c.reverse() : c;
321
312
  }
322
- function Bn(t, e) {
313
+ function _n(t, e) {
323
314
  const n = Y(t, e == null ? void 0 : e.in);
324
315
  return n.setDate(1), n.setHours(0, 0, 0, 0), n;
325
316
  }
326
- function In(t, e) {
317
+ function Pn(t, e) {
327
318
  const n = Y(t, e == null ? void 0 : e.in), r = n.getFullYear();
328
319
  return n.setFullYear(r + 1, 0, 0), n.setHours(23, 59, 59, 999), n;
329
320
  }
330
- function bt(t, e) {
321
+ function yt(t, e) {
331
322
  const n = Y(t, e == null ? void 0 : e.in);
332
323
  return n.setFullYear(n.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
333
324
  }
334
- function Mt(t, e) {
335
- var s, c, d, l;
336
- const n = Me(), r = (e == null ? void 0 : e.weekStartsOn) ?? ((c = (s = e == null ? void 0 : e.locale) == null ? void 0 : s.options) == null ? void 0 : c.weekStartsOn) ?? n.weekStartsOn ?? ((l = (d = n.locale) == null ? void 0 : d.options) == null ? void 0 : l.weekStartsOn) ?? 0, a = Y(t, e == null ? void 0 : e.in), o = a.getDay(), i = (o < r ? -7 : 0) + 6 - (o - r);
325
+ function gt(t, e) {
326
+ var s, c, f, l;
327
+ const n = we(), r = (e == null ? void 0 : e.weekStartsOn) ?? ((c = (s = e == null ? void 0 : e.locale) == null ? void 0 : s.options) == null ? void 0 : c.weekStartsOn) ?? n.weekStartsOn ?? ((l = (f = n.locale) == null ? void 0 : f.options) == null ? void 0 : l.weekStartsOn) ?? 0, a = Y(t, e == null ? void 0 : e.in), o = a.getDay(), i = (o < r ? -7 : 0) + 6 - (o - r);
337
328
  return a.setDate(a.getDate() + i), a.setHours(23, 59, 59, 999), a;
338
329
  }
339
- function Hn(t, e) {
340
- return Mt(t, { ...e, weekStartsOn: 1 });
330
+ function Fn(t, e) {
331
+ return gt(t, { ...e, weekStartsOn: 1 });
341
332
  }
342
- const qn = {
333
+ const Bn = {
343
334
  lessThanXSeconds: {
344
335
  one: "less than a second",
345
336
  other: "less than {{count}} seconds"
@@ -401,54 +392,54 @@ const qn = {
401
392
  one: "almost 1 year",
402
393
  other: "almost {{count}} years"
403
394
  }
404
- }, An = (t, e, n) => {
395
+ }, In = (t, e, n) => {
405
396
  let r;
406
- const a = qn[t];
397
+ const a = Bn[t];
407
398
  return typeof a == "string" ? r = a : e === 1 ? r = a.one : r = a.other.replace("{{count}}", e.toString()), n != null && n.addSuffix ? n.comparison && n.comparison > 0 ? "in " + r : r + " ago" : r;
408
399
  };
409
- function qe(t) {
400
+ function Be(t) {
410
401
  return (e = {}) => {
411
402
  const n = e.width ? String(e.width) : t.defaultWidth;
412
403
  return t.formats[n] || t.formats[t.defaultWidth];
413
404
  };
414
405
  }
415
- const jn = {
406
+ const Hn = {
416
407
  full: "EEEE, MMMM do, y",
417
408
  long: "MMMM do, y",
418
409
  medium: "MMM d, y",
419
410
  short: "MM/dd/yyyy"
420
- }, $n = {
411
+ }, qn = {
421
412
  full: "h:mm:ss a zzzz",
422
413
  long: "h:mm:ss a z",
423
414
  medium: "h:mm:ss a",
424
415
  short: "h:mm a"
425
- }, Gn = {
416
+ }, An = {
426
417
  full: "{{date}} 'at' {{time}}",
427
418
  long: "{{date}} 'at' {{time}}",
428
419
  medium: "{{date}}, {{time}}",
429
420
  short: "{{date}}, {{time}}"
430
- }, Rn = {
431
- date: qe({
432
- formats: jn,
421
+ }, jn = {
422
+ date: Be({
423
+ formats: Hn,
433
424
  defaultWidth: "full"
434
425
  }),
435
- time: qe({
436
- formats: $n,
426
+ time: Be({
427
+ formats: qn,
437
428
  defaultWidth: "full"
438
429
  }),
439
- dateTime: qe({
440
- formats: Gn,
430
+ dateTime: Be({
431
+ formats: An,
441
432
  defaultWidth: "full"
442
433
  })
443
- }, zn = {
434
+ }, $n = {
444
435
  lastWeek: "'last' eeee 'at' p",
445
436
  yesterday: "'yesterday at' p",
446
437
  today: "'today at' p",
447
438
  tomorrow: "'tomorrow at' p",
448
439
  nextWeek: "eeee 'at' p",
449
440
  other: "P"
450
- }, Zn = (t, e, n, r) => zn[t];
451
- function he(t) {
441
+ }, Gn = (t, e, n, r) => $n[t];
442
+ function le(t) {
452
443
  return (e, n) => {
453
444
  const r = n != null && n.context ? String(n.context) : "standalone";
454
445
  let a;
@@ -463,15 +454,15 @@ function he(t) {
463
454
  return a[o];
464
455
  };
465
456
  }
466
- const Qn = {
457
+ const Rn = {
467
458
  narrow: ["B", "A"],
468
459
  abbreviated: ["BC", "AD"],
469
460
  wide: ["Before Christ", "Anno Domini"]
470
- }, Xn = {
461
+ }, Zn = {
471
462
  narrow: ["1", "2", "3", "4"],
472
463
  abbreviated: ["Q1", "Q2", "Q3", "Q4"],
473
464
  wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
474
- }, Ln = {
465
+ }, zn = {
475
466
  narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
476
467
  abbreviated: [
477
468
  "Jan",
@@ -501,7 +492,7 @@ const Qn = {
501
492
  "November",
502
493
  "December"
503
494
  ]
504
- }, Vn = {
495
+ }, Qn = {
505
496
  narrow: ["S", "M", "T", "W", "T", "F", "S"],
506
497
  short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
507
498
  abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
@@ -514,7 +505,7 @@ const Qn = {
514
505
  "Friday",
515
506
  "Saturday"
516
507
  ]
517
- }, Un = {
508
+ }, Xn = {
518
509
  narrow: {
519
510
  am: "a",
520
511
  pm: "p",
@@ -545,7 +536,7 @@ const Qn = {
545
536
  evening: "evening",
546
537
  night: "night"
547
538
  }
548
- }, Kn = {
539
+ }, Un = {
549
540
  narrow: {
550
541
  am: "a",
551
542
  pm: "p",
@@ -576,7 +567,7 @@ const Qn = {
576
567
  evening: "in the evening",
577
568
  night: "at night"
578
569
  }
579
- }, Jn = (t, e) => {
570
+ }, Ln = (t, e) => {
580
571
  const n = Number(t), r = n % 100;
581
572
  if (r > 20 || r < 10)
582
573
  switch (r % 10) {
@@ -588,61 +579,61 @@ const Qn = {
588
579
  return n + "rd";
589
580
  }
590
581
  return n + "th";
591
- }, er = {
592
- ordinalNumber: Jn,
593
- era: he({
594
- values: Qn,
582
+ }, Vn = {
583
+ ordinalNumber: Ln,
584
+ era: le({
585
+ values: Rn,
595
586
  defaultWidth: "wide"
596
587
  }),
597
- quarter: he({
598
- values: Xn,
588
+ quarter: le({
589
+ values: Zn,
599
590
  defaultWidth: "wide",
600
591
  argumentCallback: (t) => t - 1
601
592
  }),
602
- month: he({
603
- values: Ln,
593
+ month: le({
594
+ values: zn,
604
595
  defaultWidth: "wide"
605
596
  }),
606
- day: he({
607
- values: Vn,
597
+ day: le({
598
+ values: Qn,
608
599
  defaultWidth: "wide"
609
600
  }),
610
- dayPeriod: he({
611
- values: Un,
601
+ dayPeriod: le({
602
+ values: Xn,
612
603
  defaultWidth: "wide",
613
- formattingValues: Kn,
604
+ formattingValues: Un,
614
605
  defaultFormattingWidth: "wide"
615
606
  })
616
607
  };
617
- function me(t) {
608
+ function he(t) {
618
609
  return (e, n = {}) => {
619
610
  const r = n.width, a = r && t.matchPatterns[r] || t.matchPatterns[t.defaultMatchWidth], o = e.match(a);
620
611
  if (!o)
621
612
  return null;
622
- const i = o[0], s = r && t.parsePatterns[r] || t.parsePatterns[t.defaultParseWidth], c = Array.isArray(s) ? nr(s, (u) => u.test(i)) : (
613
+ const i = o[0], s = r && t.parsePatterns[r] || t.parsePatterns[t.defaultParseWidth], c = Array.isArray(s) ? Jn(s, (u) => u.test(i)) : (
623
614
  // [TODO] -- I challenge you to fix the type
624
- tr(s, (u) => u.test(i))
615
+ Kn(s, (u) => u.test(i))
625
616
  );
626
- let d;
627
- d = t.valueCallback ? t.valueCallback(c) : c, d = n.valueCallback ? (
617
+ let f;
618
+ f = t.valueCallback ? t.valueCallback(c) : c, f = n.valueCallback ? (
628
619
  // [TODO] -- I challenge you to fix the type
629
- n.valueCallback(d)
630
- ) : d;
620
+ n.valueCallback(f)
621
+ ) : f;
631
622
  const l = e.slice(i.length);
632
- return { value: d, rest: l };
623
+ return { value: f, rest: l };
633
624
  };
634
625
  }
635
- function tr(t, e) {
626
+ function Kn(t, e) {
636
627
  for (const n in t)
637
628
  if (Object.prototype.hasOwnProperty.call(t, n) && e(t[n]))
638
629
  return n;
639
630
  }
640
- function nr(t, e) {
631
+ function Jn(t, e) {
641
632
  for (let n = 0; n < t.length; n++)
642
633
  if (e(t[n]))
643
634
  return n;
644
635
  }
645
- function rr(t) {
636
+ function er(t) {
646
637
  return (e, n = {}) => {
647
638
  const r = e.match(t.matchPattern);
648
639
  if (!r) return null;
@@ -654,23 +645,23 @@ function rr(t) {
654
645
  return { value: i, rest: s };
655
646
  };
656
647
  }
657
- const ar = /^(\d+)(th|st|nd|rd)?/i, or = /\d+/i, sr = {
648
+ const tr = /^(\d+)(th|st|nd|rd)?/i, nr = /\d+/i, rr = {
658
649
  narrow: /^(b|a)/i,
659
650
  abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
660
651
  wide: /^(before christ|before common era|anno domini|common era)/i
661
- }, ir = {
652
+ }, ar = {
662
653
  any: [/^b/i, /^(a|c)/i]
663
- }, cr = {
654
+ }, or = {
664
655
  narrow: /^[1234]/i,
665
656
  abbreviated: /^q[1234]/i,
666
657
  wide: /^[1234](th|st|nd|rd)? quarter/i
667
- }, ur = {
658
+ }, sr = {
668
659
  any: [/1/i, /2/i, /3/i, /4/i]
669
- }, fr = {
660
+ }, ir = {
670
661
  narrow: /^[jfmasond]/i,
671
662
  abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
672
663
  wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
673
- }, dr = {
664
+ }, cr = {
674
665
  narrow: [
675
666
  /^j/i,
676
667
  /^f/i,
@@ -699,18 +690,18 @@ const ar = /^(\d+)(th|st|nd|rd)?/i, or = /\d+/i, sr = {
699
690
  /^n/i,
700
691
  /^d/i
701
692
  ]
702
- }, lr = {
693
+ }, ur = {
703
694
  narrow: /^[smtwf]/i,
704
695
  short: /^(su|mo|tu|we|th|fr|sa)/i,
705
696
  abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
706
697
  wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
707
- }, hr = {
698
+ }, fr = {
708
699
  narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
709
700
  any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
710
- }, mr = {
701
+ }, dr = {
711
702
  narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
712
703
  any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
713
- }, yr = {
704
+ }, lr = {
714
705
  any: {
715
706
  am: /^a/i,
716
707
  pm: /^p/i,
@@ -721,99 +712,99 @@ const ar = /^(\d+)(th|st|nd|rd)?/i, or = /\d+/i, sr = {
721
712
  evening: /evening/i,
722
713
  night: /night/i
723
714
  }
724
- }, gr = {
725
- ordinalNumber: rr({
726
- matchPattern: ar,
727
- parsePattern: or,
715
+ }, hr = {
716
+ ordinalNumber: er({
717
+ matchPattern: tr,
718
+ parsePattern: nr,
728
719
  valueCallback: (t) => parseInt(t, 10)
729
720
  }),
730
- era: me({
731
- matchPatterns: sr,
721
+ era: he({
722
+ matchPatterns: rr,
732
723
  defaultMatchWidth: "wide",
733
- parsePatterns: ir,
724
+ parsePatterns: ar,
734
725
  defaultParseWidth: "any"
735
726
  }),
736
- quarter: me({
737
- matchPatterns: cr,
727
+ quarter: he({
728
+ matchPatterns: or,
738
729
  defaultMatchWidth: "wide",
739
- parsePatterns: ur,
730
+ parsePatterns: sr,
740
731
  defaultParseWidth: "any",
741
732
  valueCallback: (t) => t + 1
742
733
  }),
743
- month: me({
744
- matchPatterns: fr,
734
+ month: he({
735
+ matchPatterns: ir,
745
736
  defaultMatchWidth: "wide",
746
- parsePatterns: dr,
737
+ parsePatterns: cr,
747
738
  defaultParseWidth: "any"
748
739
  }),
749
- day: me({
750
- matchPatterns: lr,
740
+ day: he({
741
+ matchPatterns: ur,
751
742
  defaultMatchWidth: "wide",
752
- parsePatterns: hr,
743
+ parsePatterns: fr,
753
744
  defaultParseWidth: "any"
754
745
  }),
755
- dayPeriod: me({
756
- matchPatterns: mr,
746
+ dayPeriod: he({
747
+ matchPatterns: dr,
757
748
  defaultMatchWidth: "any",
758
- parsePatterns: yr,
749
+ parsePatterns: lr,
759
750
  defaultParseWidth: "any"
760
751
  })
761
- }, Re = {
752
+ }, je = {
762
753
  code: "en-US",
763
- formatDistance: An,
764
- formatLong: Rn,
765
- formatRelative: Zn,
766
- localize: er,
767
- match: gr,
754
+ formatDistance: In,
755
+ formatLong: jn,
756
+ formatRelative: Gn,
757
+ localize: Vn,
758
+ match: hr,
768
759
  options: {
769
760
  weekStartsOn: 0,
770
761
  firstWeekContainsDate: 1
771
762
  }
772
763
  };
773
- function wr(t, e) {
764
+ function mr(t, e) {
774
765
  const n = Y(t, e == null ? void 0 : e.in);
775
- return gt(n, bt(n)) + 1;
766
+ return ht(n, yt(n)) + 1;
776
767
  }
777
- function kt(t, e) {
778
- const n = Y(t, e == null ? void 0 : e.in), r = +we(n) - +pn(n);
779
- return Math.round(r / lt) + 1;
768
+ function wt(t, e) {
769
+ const n = Y(t, e == null ? void 0 : e.in), r = +ye(n) - +vn(n);
770
+ return Math.round(r / ut) + 1;
780
771
  }
781
- function Dt(t, e) {
772
+ function bt(t, e) {
782
773
  var l, u, h, w;
783
- const n = Y(t, e == null ? void 0 : e.in), r = n.getFullYear(), a = Me(), o = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((u = (l = e == null ? void 0 : e.locale) == null ? void 0 : l.options) == null ? void 0 : u.firstWeekContainsDate) ?? a.firstWeekContainsDate ?? ((w = (h = a.locale) == null ? void 0 : h.options) == null ? void 0 : w.firstWeekContainsDate) ?? 1, i = _((e == null ? void 0 : e.in) || t, 0);
774
+ const n = Y(t, e == null ? void 0 : e.in), r = n.getFullYear(), a = we(), o = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((u = (l = e == null ? void 0 : e.locale) == null ? void 0 : l.options) == null ? void 0 : u.firstWeekContainsDate) ?? a.firstWeekContainsDate ?? ((w = (h = a.locale) == null ? void 0 : h.options) == null ? void 0 : w.firstWeekContainsDate) ?? 1, i = F((e == null ? void 0 : e.in) || t, 0);
784
775
  i.setFullYear(r + 1, 0, o), i.setHours(0, 0, 0, 0);
785
- const s = ce(i, e), c = _((e == null ? void 0 : e.in) || t, 0);
776
+ const s = ie(i, e), c = F((e == null ? void 0 : e.in) || t, 0);
786
777
  c.setFullYear(r, 0, o), c.setHours(0, 0, 0, 0);
787
- const d = ce(c, e);
788
- return +n >= +s ? r + 1 : +n >= +d ? r : r - 1;
778
+ const f = ie(c, e);
779
+ return +n >= +s ? r + 1 : +n >= +f ? r : r - 1;
789
780
  }
790
- function br(t, e) {
791
- var s, c, d, l;
792
- const n = Me(), r = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((c = (s = e == null ? void 0 : e.locale) == null ? void 0 : s.options) == null ? void 0 : c.firstWeekContainsDate) ?? n.firstWeekContainsDate ?? ((l = (d = n.locale) == null ? void 0 : d.options) == null ? void 0 : l.firstWeekContainsDate) ?? 1, a = Dt(t, e), o = _((e == null ? void 0 : e.in) || t, 0);
793
- return o.setFullYear(a, 0, r), o.setHours(0, 0, 0, 0), ce(o, e);
781
+ function yr(t, e) {
782
+ var s, c, f, l;
783
+ const n = we(), r = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((c = (s = e == null ? void 0 : e.locale) == null ? void 0 : s.options) == null ? void 0 : c.firstWeekContainsDate) ?? n.firstWeekContainsDate ?? ((l = (f = n.locale) == null ? void 0 : f.options) == null ? void 0 : l.firstWeekContainsDate) ?? 1, a = bt(t, e), o = F((e == null ? void 0 : e.in) || t, 0);
784
+ return o.setFullYear(a, 0, r), o.setHours(0, 0, 0, 0), ie(o, e);
794
785
  }
795
- function vt(t, e) {
796
- const n = Y(t, e == null ? void 0 : e.in), r = +ce(n, e) - +br(n, e);
797
- return Math.round(r / lt) + 1;
786
+ function Mt(t, e) {
787
+ const n = Y(t, e == null ? void 0 : e.in), r = +ie(n, e) - +yr(n, e);
788
+ return Math.round(r / ut) + 1;
798
789
  }
799
- function x(t, e) {
790
+ function T(t, e) {
800
791
  const n = t < 0 ? "-" : "", r = Math.abs(t).toString().padStart(e, "0");
801
792
  return n + r;
802
793
  }
803
- const ne = {
794
+ const ee = {
804
795
  // Year
805
796
  y(t, e) {
806
797
  const n = t.getFullYear(), r = n > 0 ? n : 1 - n;
807
- return x(e === "yy" ? r % 100 : r, e.length);
798
+ return T(e === "yy" ? r % 100 : r, e.length);
808
799
  },
809
800
  // Month
810
801
  M(t, e) {
811
802
  const n = t.getMonth();
812
- return e === "M" ? String(n + 1) : x(n + 1, 2);
803
+ return e === "M" ? String(n + 1) : T(n + 1, 2);
813
804
  },
814
805
  // Day of the month
815
806
  d(t, e) {
816
- return x(t.getDate(), e.length);
807
+ return T(t.getDate(), e.length);
817
808
  },
818
809
  // AM or PM
819
810
  a(t, e) {
@@ -833,35 +824,35 @@ const ne = {
833
824
  },
834
825
  // Hour [1-12]
835
826
  h(t, e) {
836
- return x(t.getHours() % 12 || 12, e.length);
827
+ return T(t.getHours() % 12 || 12, e.length);
837
828
  },
838
829
  // Hour [0-23]
839
830
  H(t, e) {
840
- return x(t.getHours(), e.length);
831
+ return T(t.getHours(), e.length);
841
832
  },
842
833
  // Minute
843
834
  m(t, e) {
844
- return x(t.getMinutes(), e.length);
835
+ return T(t.getMinutes(), e.length);
845
836
  },
846
837
  // Second
847
838
  s(t, e) {
848
- return x(t.getSeconds(), e.length);
839
+ return T(t.getSeconds(), e.length);
849
840
  },
850
841
  // Fraction of second
851
842
  S(t, e) {
852
843
  const n = e.length, r = t.getMilliseconds(), a = Math.trunc(
853
844
  r * Math.pow(10, n - 3)
854
845
  );
855
- return x(a, e.length);
846
+ return T(a, e.length);
856
847
  }
857
- }, ie = {
848
+ }, se = {
858
849
  midnight: "midnight",
859
850
  noon: "noon",
860
851
  morning: "morning",
861
852
  afternoon: "afternoon",
862
853
  evening: "evening",
863
854
  night: "night"
864
- }, nt = {
855
+ }, Je = {
865
856
  // Era
866
857
  G: function(t, e, n) {
867
858
  const r = t.getFullYear() > 0 ? 1 : 0;
@@ -886,21 +877,21 @@ const ne = {
886
877
  const r = t.getFullYear(), a = r > 0 ? r : 1 - r;
887
878
  return n.ordinalNumber(a, { unit: "year" });
888
879
  }
889
- return ne.y(t, e);
880
+ return ee.y(t, e);
890
881
  },
891
882
  // Local week-numbering year
892
883
  Y: function(t, e, n, r) {
893
- const a = Dt(t, r), o = a > 0 ? a : 1 - a;
884
+ const a = bt(t, r), o = a > 0 ? a : 1 - a;
894
885
  if (e === "YY") {
895
886
  const i = o % 100;
896
- return x(i, 2);
887
+ return T(i, 2);
897
888
  }
898
- return e === "Yo" ? n.ordinalNumber(o, { unit: "year" }) : x(o, e.length);
889
+ return e === "Yo" ? n.ordinalNumber(o, { unit: "year" }) : T(o, e.length);
899
890
  },
900
891
  // ISO week-numbering year
901
892
  R: function(t, e) {
902
- const n = yt(t);
903
- return x(n, e.length);
893
+ const n = lt(t);
894
+ return T(n, e.length);
904
895
  },
905
896
  // Extended year. This is a single number designating the year of this calendar system.
906
897
  // The main difference between `y` and `u` localizers are B.C. years:
@@ -913,7 +904,7 @@ const ne = {
913
904
  // while `uu` pads single digit years to 2 characters and returns other years unchanged.
914
905
  u: function(t, e) {
915
906
  const n = t.getFullYear();
916
- return x(n, e.length);
907
+ return T(n, e.length);
917
908
  },
918
909
  // Quarter
919
910
  Q: function(t, e, n) {
@@ -924,7 +915,7 @@ const ne = {
924
915
  return String(r);
925
916
  // 01, 02, 03, 04
926
917
  case "QQ":
927
- return x(r, 2);
918
+ return T(r, 2);
928
919
  // 1st, 2nd, 3rd, 4th
929
920
  case "Qo":
930
921
  return n.ordinalNumber(r, { unit: "quarter" });
@@ -958,7 +949,7 @@ const ne = {
958
949
  return String(r);
959
950
  // 01, 02, 03, 04
960
951
  case "qq":
961
- return x(r, 2);
952
+ return T(r, 2);
962
953
  // 1st, 2nd, 3rd, 4th
963
954
  case "qo":
964
955
  return n.ordinalNumber(r, { unit: "quarter" });
@@ -989,7 +980,7 @@ const ne = {
989
980
  switch (e) {
990
981
  case "M":
991
982
  case "MM":
992
- return ne.M(t, e);
983
+ return ee.M(t, e);
993
984
  // 1st, 2nd, ..., 12th
994
985
  case "Mo":
995
986
  return n.ordinalNumber(r + 1, { unit: "month" });
@@ -1020,7 +1011,7 @@ const ne = {
1020
1011
  return String(r + 1);
1021
1012
  // 01, 02, ..., 12
1022
1013
  case "LL":
1023
- return x(r + 1, 2);
1014
+ return T(r + 1, 2);
1024
1015
  // 1st, 2nd, ..., 12th
1025
1016
  case "Lo":
1026
1017
  return n.ordinalNumber(r + 1, { unit: "month" });
@@ -1044,22 +1035,22 @@ const ne = {
1044
1035
  },
1045
1036
  // Local week of year
1046
1037
  w: function(t, e, n, r) {
1047
- const a = vt(t, r);
1048
- return e === "wo" ? n.ordinalNumber(a, { unit: "week" }) : x(a, e.length);
1038
+ const a = Mt(t, r);
1039
+ return e === "wo" ? n.ordinalNumber(a, { unit: "week" }) : T(a, e.length);
1049
1040
  },
1050
1041
  // ISO week of year
1051
1042
  I: function(t, e, n) {
1052
- const r = kt(t);
1053
- return e === "Io" ? n.ordinalNumber(r, { unit: "week" }) : x(r, e.length);
1043
+ const r = wt(t);
1044
+ return e === "Io" ? n.ordinalNumber(r, { unit: "week" }) : T(r, e.length);
1054
1045
  },
1055
1046
  // Day of the month
1056
1047
  d: function(t, e, n) {
1057
- return e === "do" ? n.ordinalNumber(t.getDate(), { unit: "date" }) : ne.d(t, e);
1048
+ return e === "do" ? n.ordinalNumber(t.getDate(), { unit: "date" }) : ee.d(t, e);
1058
1049
  },
1059
1050
  // Day of year
1060
1051
  D: function(t, e, n) {
1061
- const r = wr(t);
1062
- return e === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) : x(r, e.length);
1052
+ const r = mr(t);
1053
+ return e === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) : T(r, e.length);
1063
1054
  },
1064
1055
  // Day of week
1065
1056
  E: function(t, e, n) {
@@ -1103,7 +1094,7 @@ const ne = {
1103
1094
  return String(o);
1104
1095
  // Padded numerical value
1105
1096
  case "ee":
1106
- return x(o, 2);
1097
+ return T(o, 2);
1107
1098
  // 1st, 2nd, ..., 7th
1108
1099
  case "eo":
1109
1100
  return n.ordinalNumber(o, { unit: "day" });
@@ -1142,7 +1133,7 @@ const ne = {
1142
1133
  return String(o);
1143
1134
  // Padded numerical value
1144
1135
  case "cc":
1145
- return x(o, e.length);
1136
+ return T(o, e.length);
1146
1137
  // 1st, 2nd, ..., 7th
1147
1138
  case "co":
1148
1139
  return n.ordinalNumber(o, { unit: "day" });
@@ -1181,7 +1172,7 @@ const ne = {
1181
1172
  return String(a);
1182
1173
  // 02
1183
1174
  case "ii":
1184
- return x(a, e.length);
1175
+ return T(a, e.length);
1185
1176
  // 2nd
1186
1177
  case "io":
1187
1178
  return n.ordinalNumber(a, { unit: "day" });
@@ -1244,7 +1235,7 @@ const ne = {
1244
1235
  b: function(t, e, n) {
1245
1236
  const r = t.getHours();
1246
1237
  let a;
1247
- switch (r === 12 ? a = ie.noon : r === 0 ? a = ie.midnight : a = r / 12 >= 1 ? "pm" : "am", e) {
1238
+ switch (r === 12 ? a = se.noon : r === 0 ? a = se.midnight : a = r / 12 >= 1 ? "pm" : "am", e) {
1248
1239
  case "b":
1249
1240
  case "bb":
1250
1241
  return n.dayPeriod(a, {
@@ -1273,7 +1264,7 @@ const ne = {
1273
1264
  B: function(t, e, n) {
1274
1265
  const r = t.getHours();
1275
1266
  let a;
1276
- switch (r >= 17 ? a = ie.evening : r >= 12 ? a = ie.afternoon : r >= 4 ? a = ie.morning : a = ie.night, e) {
1267
+ switch (r >= 17 ? a = se.evening : r >= 12 ? a = se.afternoon : r >= 4 ? a = se.morning : a = se.night, e) {
1277
1268
  case "B":
1278
1269
  case "BB":
1279
1270
  case "BBB":
@@ -1300,33 +1291,33 @@ const ne = {
1300
1291
  let r = t.getHours() % 12;
1301
1292
  return r === 0 && (r = 12), n.ordinalNumber(r, { unit: "hour" });
1302
1293
  }
1303
- return ne.h(t, e);
1294
+ return ee.h(t, e);
1304
1295
  },
1305
1296
  // Hour [0-23]
1306
1297
  H: function(t, e, n) {
1307
- return e === "Ho" ? n.ordinalNumber(t.getHours(), { unit: "hour" }) : ne.H(t, e);
1298
+ return e === "Ho" ? n.ordinalNumber(t.getHours(), { unit: "hour" }) : ee.H(t, e);
1308
1299
  },
1309
1300
  // Hour [0-11]
1310
1301
  K: function(t, e, n) {
1311
1302
  const r = t.getHours() % 12;
1312
- return e === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) : x(r, e.length);
1303
+ return e === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) : T(r, e.length);
1313
1304
  },
1314
1305
  // Hour [1-24]
1315
1306
  k: function(t, e, n) {
1316
1307
  let r = t.getHours();
1317
- return r === 0 && (r = 24), e === "ko" ? n.ordinalNumber(r, { unit: "hour" }) : x(r, e.length);
1308
+ return r === 0 && (r = 24), e === "ko" ? n.ordinalNumber(r, { unit: "hour" }) : T(r, e.length);
1318
1309
  },
1319
1310
  // Minute
1320
1311
  m: function(t, e, n) {
1321
- return e === "mo" ? n.ordinalNumber(t.getMinutes(), { unit: "minute" }) : ne.m(t, e);
1312
+ return e === "mo" ? n.ordinalNumber(t.getMinutes(), { unit: "minute" }) : ee.m(t, e);
1322
1313
  },
1323
1314
  // Second
1324
1315
  s: function(t, e, n) {
1325
- return e === "so" ? n.ordinalNumber(t.getSeconds(), { unit: "second" }) : ne.s(t, e);
1316
+ return e === "so" ? n.ordinalNumber(t.getSeconds(), { unit: "second" }) : ee.s(t, e);
1326
1317
  },
1327
1318
  // Fraction of second
1328
1319
  S: function(t, e) {
1329
- return ne.S(t, e);
1320
+ return ee.S(t, e);
1330
1321
  },
1331
1322
  // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
1332
1323
  X: function(t, e, n) {
@@ -1336,13 +1327,13 @@ const ne = {
1336
1327
  switch (e) {
1337
1328
  // Hours and optional minutes
1338
1329
  case "X":
1339
- return at(r);
1330
+ return tt(r);
1340
1331
  // Hours, minutes and optional seconds without `:` delimiter
1341
1332
  // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1342
1333
  // so this token always has the same output as `XX`
1343
1334
  case "XXXX":
1344
1335
  case "XX":
1345
- return re(r);
1336
+ return te(r);
1346
1337
  // Hours, minutes and optional seconds with `:` delimiter
1347
1338
  // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1348
1339
  // so this token always has the same output as `XXX`
@@ -1350,7 +1341,7 @@ const ne = {
1350
1341
  case "XXX":
1351
1342
  // Hours and minutes with `:` delimiter
1352
1343
  default:
1353
- return re(r, ":");
1344
+ return te(r, ":");
1354
1345
  }
1355
1346
  },
1356
1347
  // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
@@ -1359,13 +1350,13 @@ const ne = {
1359
1350
  switch (e) {
1360
1351
  // Hours and optional minutes
1361
1352
  case "x":
1362
- return at(r);
1353
+ return tt(r);
1363
1354
  // Hours, minutes and optional seconds without `:` delimiter
1364
1355
  // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1365
1356
  // so this token always has the same output as `xx`
1366
1357
  case "xxxx":
1367
1358
  case "xx":
1368
- return re(r);
1359
+ return te(r);
1369
1360
  // Hours, minutes and optional seconds with `:` delimiter
1370
1361
  // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1371
1362
  // so this token always has the same output as `xxx`
@@ -1373,7 +1364,7 @@ const ne = {
1373
1364
  case "xxx":
1374
1365
  // Hours and minutes with `:` delimiter
1375
1366
  default:
1376
- return re(r, ":");
1367
+ return te(r, ":");
1377
1368
  }
1378
1369
  },
1379
1370
  // Timezone (GMT)
@@ -1384,11 +1375,11 @@ const ne = {
1384
1375
  case "O":
1385
1376
  case "OO":
1386
1377
  case "OOO":
1387
- return "GMT" + rt(r, ":");
1378
+ return "GMT" + et(r, ":");
1388
1379
  // Long
1389
1380
  case "OOOO":
1390
1381
  default:
1391
- return "GMT" + re(r, ":");
1382
+ return "GMT" + te(r, ":");
1392
1383
  }
1393
1384
  },
1394
1385
  // Timezone (specific non-location)
@@ -1399,35 +1390,35 @@ const ne = {
1399
1390
  case "z":
1400
1391
  case "zz":
1401
1392
  case "zzz":
1402
- return "GMT" + rt(r, ":");
1393
+ return "GMT" + et(r, ":");
1403
1394
  // Long
1404
1395
  case "zzzz":
1405
1396
  default:
1406
- return "GMT" + re(r, ":");
1397
+ return "GMT" + te(r, ":");
1407
1398
  }
1408
1399
  },
1409
1400
  // Seconds timestamp
1410
1401
  t: function(t, e, n) {
1411
1402
  const r = Math.trunc(+t / 1e3);
1412
- return x(r, e.length);
1403
+ return T(r, e.length);
1413
1404
  },
1414
1405
  // Milliseconds timestamp
1415
1406
  T: function(t, e, n) {
1416
- return x(+t, e.length);
1407
+ return T(+t, e.length);
1417
1408
  }
1418
1409
  };
1419
- function rt(t, e = "") {
1410
+ function et(t, e = "") {
1420
1411
  const n = t > 0 ? "-" : "+", r = Math.abs(t), a = Math.trunc(r / 60), o = r % 60;
1421
- return o === 0 ? n + String(a) : n + String(a) + e + x(o, 2);
1412
+ return o === 0 ? n + String(a) : n + String(a) + e + T(o, 2);
1422
1413
  }
1423
- function at(t, e) {
1424
- return t % 60 === 0 ? (t > 0 ? "-" : "+") + x(Math.abs(t) / 60, 2) : re(t, e);
1414
+ function tt(t, e) {
1415
+ return t % 60 === 0 ? (t > 0 ? "-" : "+") + T(Math.abs(t) / 60, 2) : te(t, e);
1425
1416
  }
1426
- function re(t, e = "") {
1427
- const n = t > 0 ? "-" : "+", r = Math.abs(t), a = x(Math.trunc(r / 60), 2), o = x(r % 60, 2);
1417
+ function te(t, e = "") {
1418
+ const n = t > 0 ? "-" : "+", r = Math.abs(t), a = T(Math.trunc(r / 60), 2), o = T(r % 60, 2);
1428
1419
  return n + a + e + o;
1429
1420
  }
1430
- const ot = (t, e) => {
1421
+ const nt = (t, e) => {
1431
1422
  switch (t) {
1432
1423
  case "P":
1433
1424
  return e.date({ width: "short" });
@@ -1439,7 +1430,7 @@ const ot = (t, e) => {
1439
1430
  default:
1440
1431
  return e.date({ width: "full" });
1441
1432
  }
1442
- }, Ot = (t, e) => {
1433
+ }, kt = (t, e) => {
1443
1434
  switch (t) {
1444
1435
  case "p":
1445
1436
  return e.time({ width: "short" });
@@ -1451,10 +1442,10 @@ const ot = (t, e) => {
1451
1442
  default:
1452
1443
  return e.time({ width: "full" });
1453
1444
  }
1454
- }, Mr = (t, e) => {
1445
+ }, gr = (t, e) => {
1455
1446
  const n = t.match(/(P+)(p+)?/) || [], r = n[1], a = n[2];
1456
1447
  if (!a)
1457
- return ot(t, e);
1448
+ return nt(t, e);
1458
1449
  let o;
1459
1450
  switch (r) {
1460
1451
  case "P":
@@ -1471,54 +1462,54 @@ const ot = (t, e) => {
1471
1462
  o = e.dateTime({ width: "full" });
1472
1463
  break;
1473
1464
  }
1474
- return o.replace("{{date}}", ot(r, e)).replace("{{time}}", Ot(a, e));
1475
- }, kr = {
1476
- p: Ot,
1477
- P: Mr
1478
- }, Dr = /^D+$/, vr = /^Y+$/, Or = ["D", "DD", "YY", "YYYY"];
1479
- function Wr(t) {
1480
- return Dr.test(t);
1481
- }
1482
- function pr(t) {
1483
- return vr.test(t);
1484
- }
1485
- function Nr(t, e, n) {
1486
- const r = Sr(t, e, n);
1487
- if (console.warn(r), Or.includes(t)) throw new RangeError(r);
1488
- }
1489
- function Sr(t, e, n) {
1465
+ return o.replace("{{date}}", nt(r, e)).replace("{{time}}", kt(a, e));
1466
+ }, wr = {
1467
+ p: kt,
1468
+ P: gr
1469
+ }, br = /^D+$/, Mr = /^Y+$/, kr = ["D", "DD", "YY", "YYYY"];
1470
+ function Dr(t) {
1471
+ return br.test(t);
1472
+ }
1473
+ function vr(t) {
1474
+ return Mr.test(t);
1475
+ }
1476
+ function Or(t, e, n) {
1477
+ const r = Wr(t, e, n);
1478
+ if (console.warn(r), kr.includes(t)) throw new RangeError(r);
1479
+ }
1480
+ function Wr(t, e, n) {
1490
1481
  const r = t[0] === "Y" ? "years" : "days of the month";
1491
1482
  return `Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
1492
1483
  }
1493
- const Cr = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, xr = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Yr = /^'([^]*?)'?$/, Tr = /''/g, Er = /[a-zA-Z]/;
1494
- function Pr(t, e, n) {
1495
- var l, u, h, w, b, W, M, k;
1496
- const r = Me(), a = (n == null ? void 0 : n.locale) ?? r.locale ?? Re, o = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((u = (l = n == null ? void 0 : n.locale) == null ? void 0 : l.options) == null ? void 0 : u.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((w = (h = r.locale) == null ? void 0 : h.options) == null ? void 0 : w.firstWeekContainsDate) ?? 1, i = (n == null ? void 0 : n.weekStartsOn) ?? ((W = (b = n == null ? void 0 : n.locale) == null ? void 0 : b.options) == null ? void 0 : W.weekStartsOn) ?? r.weekStartsOn ?? ((k = (M = r.locale) == null ? void 0 : M.options) == null ? void 0 : k.weekStartsOn) ?? 0, s = Y(t, n == null ? void 0 : n.in);
1497
- if (!Tn(s))
1484
+ const Sr = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, pr = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Nr = /^'([^]*?)'?$/, Cr = /''/g, xr = /[a-zA-Z]/;
1485
+ function Tr(t, e, n) {
1486
+ var l, u, h, w, b, O, M, k;
1487
+ const r = we(), a = (n == null ? void 0 : n.locale) ?? r.locale ?? je, o = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((u = (l = n == null ? void 0 : n.locale) == null ? void 0 : l.options) == null ? void 0 : u.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((w = (h = r.locale) == null ? void 0 : h.options) == null ? void 0 : w.firstWeekContainsDate) ?? 1, i = (n == null ? void 0 : n.weekStartsOn) ?? ((O = (b = n == null ? void 0 : n.locale) == null ? void 0 : b.options) == null ? void 0 : O.weekStartsOn) ?? r.weekStartsOn ?? ((k = (M = r.locale) == null ? void 0 : M.options) == null ? void 0 : k.weekStartsOn) ?? 0, s = Y(t, n == null ? void 0 : n.in);
1488
+ if (!Cn(s))
1498
1489
  throw new RangeError("Invalid time value");
1499
- let c = e.match(xr).map((D) => {
1490
+ let c = e.match(pr).map((D) => {
1500
1491
  const y = D[0];
1501
1492
  if (y === "p" || y === "P") {
1502
- const T = kr[y];
1503
- return T(D, a.formatLong);
1493
+ const N = wr[y];
1494
+ return N(D, a.formatLong);
1504
1495
  }
1505
1496
  return D;
1506
- }).join("").match(Cr).map((D) => {
1497
+ }).join("").match(Sr).map((D) => {
1507
1498
  if (D === "''")
1508
1499
  return { isToken: !1, value: "'" };
1509
1500
  const y = D[0];
1510
1501
  if (y === "'")
1511
- return { isToken: !1, value: _r(D) };
1512
- if (nt[y])
1502
+ return { isToken: !1, value: Yr(D) };
1503
+ if (Je[y])
1513
1504
  return { isToken: !0, value: D };
1514
- if (y.match(Er))
1505
+ if (y.match(xr))
1515
1506
  throw new RangeError(
1516
1507
  "Format string contains an unescaped latin alphabet character `" + y + "`"
1517
1508
  );
1518
1509
  return { isToken: !1, value: D };
1519
1510
  });
1520
1511
  a.localize.preprocessor && (c = a.localize.preprocessor(s, c));
1521
- const d = {
1512
+ const f = {
1522
1513
  firstWeekContainsDate: o,
1523
1514
  weekStartsOn: i,
1524
1515
  locale: a
@@ -1526,71 +1517,71 @@ function Pr(t, e, n) {
1526
1517
  return c.map((D) => {
1527
1518
  if (!D.isToken) return D.value;
1528
1519
  const y = D.value;
1529
- (!(n != null && n.useAdditionalWeekYearTokens) && pr(y) || !(n != null && n.useAdditionalDayOfYearTokens) && Wr(y)) && Nr(y, e, String(t));
1530
- const T = nt[y[0]];
1531
- return T(s, y, a.localize, d);
1520
+ (!(n != null && n.useAdditionalWeekYearTokens) && vr(y) || !(n != null && n.useAdditionalDayOfYearTokens) && Dr(y)) && Or(y, e, String(t));
1521
+ const N = Je[y[0]];
1522
+ return N(s, y, a.localize, f);
1532
1523
  }).join("");
1533
1524
  }
1534
- function _r(t) {
1535
- const e = t.match(Yr);
1536
- return e ? e[1].replace(Tr, "'") : t;
1525
+ function Yr(t) {
1526
+ const e = t.match(Nr);
1527
+ return e ? e[1].replace(Cr, "'") : t;
1537
1528
  }
1538
- function Fr(t, e) {
1539
- const n = Y(t, e == null ? void 0 : e.in), r = n.getFullYear(), a = n.getMonth(), o = _(n, 0);
1529
+ function Er(t, e) {
1530
+ const n = Y(t, e == null ? void 0 : e.in), r = n.getFullYear(), a = n.getMonth(), o = F(n, 0);
1540
1531
  return o.setFullYear(r, a + 1, 0), o.setHours(0, 0, 0, 0), o.getDate();
1541
1532
  }
1542
- function Br(t, e) {
1533
+ function _r(t, e) {
1543
1534
  return Y(t, e == null ? void 0 : e.in).getMonth();
1544
1535
  }
1545
- function Ir(t, e) {
1536
+ function Pr(t, e) {
1546
1537
  return Y(t, e == null ? void 0 : e.in).getFullYear();
1547
1538
  }
1548
- function Hr(t, e) {
1539
+ function Fr(t, e) {
1549
1540
  return +Y(t) > +Y(e);
1550
1541
  }
1551
- function qr(t, e) {
1542
+ function Br(t, e) {
1552
1543
  return +Y(t) < +Y(e);
1553
1544
  }
1554
- function Ar(t, e, n) {
1555
- const [r, a] = ue(
1545
+ function Ir(t, e, n) {
1546
+ const [r, a] = ce(
1556
1547
  n == null ? void 0 : n.in,
1557
1548
  t,
1558
1549
  e
1559
1550
  );
1560
1551
  return r.getFullYear() === a.getFullYear() && r.getMonth() === a.getMonth();
1561
1552
  }
1562
- function jr(t, e, n) {
1563
- const [r, a] = ue(
1553
+ function Hr(t, e, n) {
1554
+ const [r, a] = ce(
1564
1555
  n == null ? void 0 : n.in,
1565
1556
  t,
1566
1557
  e
1567
1558
  );
1568
1559
  return r.getFullYear() === a.getFullYear();
1569
1560
  }
1570
- function $r(t, e, n) {
1571
- const r = Y(t, n == null ? void 0 : n.in), a = r.getFullYear(), o = r.getDate(), i = _(t, 0);
1561
+ function qr(t, e, n) {
1562
+ const r = Y(t, n == null ? void 0 : n.in), a = r.getFullYear(), o = r.getDate(), i = F(t, 0);
1572
1563
  i.setFullYear(a, e, 15), i.setHours(0, 0, 0, 0);
1573
- const s = Fr(i);
1564
+ const s = Er(i);
1574
1565
  return r.setMonth(e, Math.min(o, s)), r;
1575
1566
  }
1576
- function Gr(t, e, n) {
1567
+ function Ar(t, e, n) {
1577
1568
  const r = Y(t, n == null ? void 0 : n.in);
1578
- return isNaN(+r) ? _(t, NaN) : (r.setFullYear(e), r);
1569
+ return isNaN(+r) ? F(t, NaN) : (r.setFullYear(e), r);
1579
1570
  }
1580
- const st = 5, Rr = 4;
1581
- function zr(t, e) {
1582
- const n = e.startOfMonth(t), r = n.getDay() > 0 ? n.getDay() : 7, a = e.addDays(t, -r + 1), o = e.addDays(a, st * 7 - 1);
1583
- return e.getMonth(t) === e.getMonth(o) ? st : Rr;
1571
+ const rt = 5, jr = 4;
1572
+ function $r(t, e) {
1573
+ const n = e.startOfMonth(t), r = n.getDay() > 0 ? n.getDay() : 7, a = e.addDays(t, -r + 1), o = e.addDays(a, rt * 7 - 1);
1574
+ return e.getMonth(t) === e.getMonth(o) ? rt : jr;
1584
1575
  }
1585
- function Wt(t, e) {
1576
+ function Dt(t, e) {
1586
1577
  const n = e.startOfMonth(t), r = n.getDay();
1587
1578
  return r === 1 ? n : r === 0 ? e.addDays(n, -1 * 6) : e.addDays(n, -1 * (r - 1));
1588
1579
  }
1589
- function Zr(t, e) {
1590
- const n = Wt(t, e), r = zr(t, e);
1580
+ function Gr(t, e) {
1581
+ const n = Dt(t, e), r = $r(t, e);
1591
1582
  return e.addDays(n, r * 7 - 1);
1592
1583
  }
1593
- class ee {
1584
+ class J {
1594
1585
  /**
1595
1586
  * Creates an instance of `DateLib`.
1596
1587
  *
@@ -1606,105 +1597,105 @@ class ee {
1606
1597
  return (i = this.overrides) != null && i.newDate ? this.overrides.newDate(r, a, o) : this.options.timeZone ? new I(r, a, o, this.options.timeZone) : new Date(r, a, o);
1607
1598
  }, this.addDays = (r, a) => {
1608
1599
  var o;
1609
- return (o = this.overrides) != null && o.addDays ? this.overrides.addDays(r, a) : ht(r, a);
1600
+ return (o = this.overrides) != null && o.addDays ? this.overrides.addDays(r, a) : ft(r, a);
1610
1601
  }, this.addMonths = (r, a) => {
1611
1602
  var o;
1612
- return (o = this.overrides) != null && o.addMonths ? this.overrides.addMonths(r, a) : mt(r, a);
1603
+ return (o = this.overrides) != null && o.addMonths ? this.overrides.addMonths(r, a) : dt(r, a);
1613
1604
  }, this.addWeeks = (r, a) => {
1614
1605
  var o;
1615
- return (o = this.overrides) != null && o.addWeeks ? this.overrides.addWeeks(r, a) : Nn(r, a);
1606
+ return (o = this.overrides) != null && o.addWeeks ? this.overrides.addWeeks(r, a) : On(r, a);
1616
1607
  }, this.addYears = (r, a) => {
1617
1608
  var o;
1618
- return (o = this.overrides) != null && o.addYears ? this.overrides.addYears(r, a) : Sn(r, a);
1609
+ return (o = this.overrides) != null && o.addYears ? this.overrides.addYears(r, a) : Wn(r, a);
1619
1610
  }, this.differenceInCalendarDays = (r, a) => {
1620
1611
  var o;
1621
- return (o = this.overrides) != null && o.differenceInCalendarDays ? this.overrides.differenceInCalendarDays(r, a) : gt(r, a);
1612
+ return (o = this.overrides) != null && o.differenceInCalendarDays ? this.overrides.differenceInCalendarDays(r, a) : ht(r, a);
1622
1613
  }, this.differenceInCalendarMonths = (r, a) => {
1623
1614
  var o;
1624
- return (o = this.overrides) != null && o.differenceInCalendarMonths ? this.overrides.differenceInCalendarMonths(r, a) : En(r, a);
1615
+ return (o = this.overrides) != null && o.differenceInCalendarMonths ? this.overrides.differenceInCalendarMonths(r, a) : xn(r, a);
1625
1616
  }, this.eachMonthOfInterval = (r) => {
1626
1617
  var a;
1627
- return (a = this.overrides) != null && a.eachMonthOfInterval ? this.overrides.eachMonthOfInterval(r) : Fn(r);
1618
+ return (a = this.overrides) != null && a.eachMonthOfInterval ? this.overrides.eachMonthOfInterval(r) : En(r);
1628
1619
  }, this.endOfBroadcastWeek = (r) => {
1629
1620
  var a;
1630
- return (a = this.overrides) != null && a.endOfBroadcastWeek ? this.overrides.endOfBroadcastWeek(r) : Zr(r, this);
1621
+ return (a = this.overrides) != null && a.endOfBroadcastWeek ? this.overrides.endOfBroadcastWeek(r) : Gr(r, this);
1631
1622
  }, this.endOfISOWeek = (r) => {
1632
1623
  var a;
1633
- return (a = this.overrides) != null && a.endOfISOWeek ? this.overrides.endOfISOWeek(r) : Hn(r);
1624
+ return (a = this.overrides) != null && a.endOfISOWeek ? this.overrides.endOfISOWeek(r) : Fn(r);
1634
1625
  }, this.endOfMonth = (r) => {
1635
1626
  var a;
1636
- return (a = this.overrides) != null && a.endOfMonth ? this.overrides.endOfMonth(r) : Pn(r);
1627
+ return (a = this.overrides) != null && a.endOfMonth ? this.overrides.endOfMonth(r) : Tn(r);
1637
1628
  }, this.endOfWeek = (r, a) => {
1638
1629
  var o;
1639
- return (o = this.overrides) != null && o.endOfWeek ? this.overrides.endOfWeek(r, a) : Mt(r, this.options);
1630
+ return (o = this.overrides) != null && o.endOfWeek ? this.overrides.endOfWeek(r, a) : gt(r, this.options);
1640
1631
  }, this.endOfYear = (r) => {
1641
1632
  var a;
1642
- return (a = this.overrides) != null && a.endOfYear ? this.overrides.endOfYear(r) : In(r);
1633
+ return (a = this.overrides) != null && a.endOfYear ? this.overrides.endOfYear(r) : Pn(r);
1643
1634
  }, this.format = (r, a, o) => {
1644
1635
  var s;
1645
- const i = (s = this.overrides) != null && s.format ? this.overrides.format(r, a, this.options) : Pr(r, a, this.options);
1636
+ const i = (s = this.overrides) != null && s.format ? this.overrides.format(r, a, this.options) : Tr(r, a, this.options);
1646
1637
  return this.options.numerals && this.options.numerals !== "latn" ? this.replaceDigits(i) : i;
1647
1638
  }, this.getISOWeek = (r) => {
1648
1639
  var a;
1649
- return (a = this.overrides) != null && a.getISOWeek ? this.overrides.getISOWeek(r) : kt(r);
1640
+ return (a = this.overrides) != null && a.getISOWeek ? this.overrides.getISOWeek(r) : wt(r);
1650
1641
  }, this.getMonth = (r, a) => {
1651
1642
  var o;
1652
- return (o = this.overrides) != null && o.getMonth ? this.overrides.getMonth(r, this.options) : Br(r, this.options);
1643
+ return (o = this.overrides) != null && o.getMonth ? this.overrides.getMonth(r, this.options) : _r(r, this.options);
1653
1644
  }, this.getYear = (r, a) => {
1654
1645
  var o;
1655
- return (o = this.overrides) != null && o.getYear ? this.overrides.getYear(r, this.options) : Ir(r, this.options);
1646
+ return (o = this.overrides) != null && o.getYear ? this.overrides.getYear(r, this.options) : Pr(r, this.options);
1656
1647
  }, this.getWeek = (r, a) => {
1657
1648
  var o;
1658
- return (o = this.overrides) != null && o.getWeek ? this.overrides.getWeek(r, this.options) : vt(r, this.options);
1649
+ return (o = this.overrides) != null && o.getWeek ? this.overrides.getWeek(r, this.options) : Mt(r, this.options);
1659
1650
  }, this.isAfter = (r, a) => {
1660
1651
  var o;
1661
- return (o = this.overrides) != null && o.isAfter ? this.overrides.isAfter(r, a) : Hr(r, a);
1652
+ return (o = this.overrides) != null && o.isAfter ? this.overrides.isAfter(r, a) : Fr(r, a);
1662
1653
  }, this.isBefore = (r, a) => {
1663
1654
  var o;
1664
- return (o = this.overrides) != null && o.isBefore ? this.overrides.isBefore(r, a) : qr(r, a);
1655
+ return (o = this.overrides) != null && o.isBefore ? this.overrides.isBefore(r, a) : Br(r, a);
1665
1656
  }, this.isDate = (r) => {
1666
1657
  var a;
1667
- return (a = this.overrides) != null && a.isDate ? this.overrides.isDate(r) : wt(r);
1658
+ return (a = this.overrides) != null && a.isDate ? this.overrides.isDate(r) : mt(r);
1668
1659
  }, this.isSameDay = (r, a) => {
1669
1660
  var o;
1670
- return (o = this.overrides) != null && o.isSameDay ? this.overrides.isSameDay(r, a) : Yn(r, a);
1661
+ return (o = this.overrides) != null && o.isSameDay ? this.overrides.isSameDay(r, a) : Nn(r, a);
1671
1662
  }, this.isSameMonth = (r, a) => {
1672
1663
  var o;
1673
- return (o = this.overrides) != null && o.isSameMonth ? this.overrides.isSameMonth(r, a) : Ar(r, a);
1664
+ return (o = this.overrides) != null && o.isSameMonth ? this.overrides.isSameMonth(r, a) : Ir(r, a);
1674
1665
  }, this.isSameYear = (r, a) => {
1675
1666
  var o;
1676
- return (o = this.overrides) != null && o.isSameYear ? this.overrides.isSameYear(r, a) : jr(r, a);
1667
+ return (o = this.overrides) != null && o.isSameYear ? this.overrides.isSameYear(r, a) : Hr(r, a);
1677
1668
  }, this.max = (r) => {
1678
1669
  var a;
1679
- return (a = this.overrides) != null && a.max ? this.overrides.max(r) : Cn(r);
1670
+ return (a = this.overrides) != null && a.max ? this.overrides.max(r) : Sn(r);
1680
1671
  }, this.min = (r) => {
1681
1672
  var a;
1682
- return (a = this.overrides) != null && a.min ? this.overrides.min(r) : xn(r);
1673
+ return (a = this.overrides) != null && a.min ? this.overrides.min(r) : pn(r);
1683
1674
  }, this.setMonth = (r, a) => {
1684
1675
  var o;
1685
- return (o = this.overrides) != null && o.setMonth ? this.overrides.setMonth(r, a) : $r(r, a);
1676
+ return (o = this.overrides) != null && o.setMonth ? this.overrides.setMonth(r, a) : qr(r, a);
1686
1677
  }, this.setYear = (r, a) => {
1687
1678
  var o;
1688
- return (o = this.overrides) != null && o.setYear ? this.overrides.setYear(r, a) : Gr(r, a);
1679
+ return (o = this.overrides) != null && o.setYear ? this.overrides.setYear(r, a) : Ar(r, a);
1689
1680
  }, this.startOfBroadcastWeek = (r, a) => {
1690
1681
  var o;
1691
- return (o = this.overrides) != null && o.startOfBroadcastWeek ? this.overrides.startOfBroadcastWeek(r, this) : Wt(r, this);
1682
+ return (o = this.overrides) != null && o.startOfBroadcastWeek ? this.overrides.startOfBroadcastWeek(r, this) : Dt(r, this);
1692
1683
  }, this.startOfDay = (r) => {
1693
1684
  var a;
1694
- return (a = this.overrides) != null && a.startOfDay ? this.overrides.startOfDay(r) : be(r);
1685
+ return (a = this.overrides) != null && a.startOfDay ? this.overrides.startOfDay(r) : ge(r);
1695
1686
  }, this.startOfISOWeek = (r) => {
1696
1687
  var a;
1697
- return (a = this.overrides) != null && a.startOfISOWeek ? this.overrides.startOfISOWeek(r) : we(r);
1688
+ return (a = this.overrides) != null && a.startOfISOWeek ? this.overrides.startOfISOWeek(r) : ye(r);
1698
1689
  }, this.startOfMonth = (r) => {
1699
1690
  var a;
1700
- return (a = this.overrides) != null && a.startOfMonth ? this.overrides.startOfMonth(r) : Bn(r);
1691
+ return (a = this.overrides) != null && a.startOfMonth ? this.overrides.startOfMonth(r) : _n(r);
1701
1692
  }, this.startOfWeek = (r, a) => {
1702
1693
  var o;
1703
- return (o = this.overrides) != null && o.startOfWeek ? this.overrides.startOfWeek(r, this.options) : ce(r, this.options);
1694
+ return (o = this.overrides) != null && o.startOfWeek ? this.overrides.startOfWeek(r, this.options) : ie(r, this.options);
1704
1695
  }, this.startOfYear = (r) => {
1705
1696
  var a;
1706
- return (a = this.overrides) != null && a.startOfYear ? this.overrides.startOfYear(r) : bt(r);
1707
- }, this.options = { locale: Re, ...e }, this.overrides = n;
1697
+ return (a = this.overrides) != null && a.startOfYear ? this.overrides.startOfYear(r) : yt(r);
1698
+ }, this.options = { locale: je, ...e }, this.overrides = n;
1708
1699
  }
1709
1700
  /**
1710
1701
  * Generates a mapping of Arabic digits (0-9) to the target numbering system
@@ -1743,9 +1734,9 @@ class ee {
1743
1734
  return this.replaceDigits(e.toString());
1744
1735
  }
1745
1736
  }
1746
- const V = new ee();
1747
- class pt {
1748
- constructor(e, n, r = V) {
1737
+ const U = new J();
1738
+ class vt {
1739
+ constructor(e, n, r = U) {
1749
1740
  this.date = e, this.displayMonth = n, this.outside = !!(n && !r.isSameMonth(e, n)), this.dateLib = r;
1750
1741
  }
1751
1742
  /**
@@ -1759,133 +1750,69 @@ class pt {
1759
1750
  return this.dateLib.isSameDay(e.date, this.date) && this.dateLib.isSameMonth(e.displayMonth, this.displayMonth);
1760
1751
  }
1761
1752
  }
1762
- class Qr {
1753
+ class Rr {
1763
1754
  constructor(e, n) {
1764
1755
  this.date = e, this.weeks = n;
1765
1756
  }
1766
1757
  }
1767
- class Xr {
1758
+ class Zr {
1768
1759
  constructor(e, n) {
1769
1760
  this.days = n, this.weekNumber = e;
1770
1761
  }
1771
1762
  }
1772
- function K(t, e, n = !1, r = V) {
1773
- let { from: a, to: o } = t;
1774
- const { differenceInCalendarDays: i, isSameDay: s } = r;
1775
- return a && o ? (i(o, a) < 0 && ([a, o] = [o, a]), i(e, a) >= (n ? 1 : 0) && i(o, e) >= (n ? 1 : 0)) : !n && o ? s(o, e) : !n && a ? s(a, e) : !1;
1776
- }
1777
- function Nt(t) {
1778
- return !!(t && typeof t == "object" && "before" in t && "after" in t);
1779
- }
1780
- function ze(t) {
1781
- return !!(t && typeof t == "object" && "from" in t);
1782
- }
1783
- function St(t) {
1784
- return !!(t && typeof t == "object" && "after" in t);
1785
- }
1786
- function Ct(t) {
1787
- return !!(t && typeof t == "object" && "before" in t);
1788
- }
1789
- function xt(t) {
1790
- return !!(t && typeof t == "object" && "dayOfWeek" in t);
1791
- }
1792
- function Yt(t, e) {
1793
- return Array.isArray(t) && t.every(e.isDate);
1794
- }
1795
- function J(t, e, n = V) {
1796
- const r = Array.isArray(e) ? e : [e], { isSameDay: a, differenceInCalendarDays: o, isAfter: i } = n;
1797
- return r.some((s) => {
1798
- if (typeof s == "boolean")
1799
- return s;
1800
- if (n.isDate(s))
1801
- return a(t, s);
1802
- if (Yt(s, n))
1803
- return s.includes(t);
1804
- if (ze(s))
1805
- return K(s, t, !1, n);
1806
- if (xt(s))
1807
- return Array.isArray(s.dayOfWeek) ? s.dayOfWeek.includes(t.getDay()) : s.dayOfWeek === t.getDay();
1808
- if (Nt(s)) {
1809
- const c = o(s.before, t), d = o(s.after, t), l = c > 0, u = d < 0;
1810
- return i(s.before, s.after) ? u && l : l || u;
1811
- }
1812
- return St(s) ? o(t, s.after) > 0 : Ct(s) ? o(s.before, t) > 0 : typeof s == "function" ? s(t) : !1;
1813
- });
1814
- }
1815
- function Lr(t, e, n, r, a) {
1816
- const { disabled: o, hidden: i, modifiers: s, showOutsideDays: c, broadcastCalendar: d, today: l } = e, { isSameDay: u, isSameMonth: h, startOfMonth: w, isBefore: b, endOfMonth: W, isAfter: M } = a, k = n && w(n), D = r && W(r), y = {
1817
- [P.focused]: [],
1818
- [P.outside]: [],
1819
- [P.disabled]: [],
1820
- [P.hidden]: [],
1821
- [P.today]: []
1822
- }, T = {};
1823
- for (const f of t) {
1824
- const { date: O, displayMonth: v } = f, N = !!(v && !h(O, v)), F = !!(k && b(O, k)), H = !!(D && M(O, D)), q = !!(o && J(O, o, a)), $ = !!(i && J(O, i, a)) || F || H || // Broadcast calendar will show outside days as default
1825
- !d && !c && N || d && c === !1 && N, ae = u(O, l ?? a.today());
1826
- N && y.outside.push(f), q && y.disabled.push(f), $ && y.hidden.push(f), ae && y.today.push(f), s && Object.keys(s).forEach((oe) => {
1827
- const se = s == null ? void 0 : s[oe];
1828
- se && J(O, se, a) && (T[oe] ? T[oe].push(f) : T[oe] = [f]);
1829
- });
1830
- }
1831
- return (f) => {
1832
- const O = {
1833
- [P.focused]: !1,
1834
- [P.disabled]: !1,
1835
- [P.hidden]: !1,
1836
- [P.outside]: !1,
1837
- [P.today]: !1
1838
- }, v = {};
1839
- for (const N in y) {
1840
- const F = y[N];
1841
- O[N] = F.some((H) => H === f);
1842
- }
1843
- for (const N in T)
1844
- v[N] = T[N].some((F) => F === f);
1845
- return {
1846
- ...O,
1847
- // custom modifiers should override all the previous ones
1848
- ...v
1849
- };
1850
- };
1851
- }
1852
- function Vr(t, e, n = {}) {
1853
- return Object.entries(t).filter(([, a]) => a === !0).reduce((a, [o]) => (n[o] ? a.push(n[o]) : e[P[o]] ? a.push(e[P[o]]) : e[Z[o]] && a.push(e[Z[o]]), a), [e[g.Day]]);
1854
- }
1855
- function Ur(t) {
1763
+ function zr(t) {
1856
1764
  return m.createElement("button", { ...t });
1857
1765
  }
1858
- function Kr(t) {
1766
+ function Qr(t) {
1859
1767
  return m.createElement("span", { ...t });
1860
1768
  }
1861
- function Jr(t) {
1769
+ function Xr(t) {
1862
1770
  const { size: e = 24, orientation: n = "left", className: r } = t;
1863
- return m.createElement(
1864
- "svg",
1865
- { className: r, width: e, height: e, viewBox: "0 0 24 24" },
1866
- n === "up" && m.createElement("polygon", { points: "6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28" }),
1867
- n === "down" && m.createElement("polygon", { points: "6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72" }),
1868
- n === "left" && m.createElement("polygon", { points: "16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20" }),
1869
- n === "right" && m.createElement("polygon", { points: "8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20" })
1771
+ return (
1772
+ // biome-ignore lint/a11y/noSvgWithoutTitle: handled by the parent component
1773
+ m.createElement(
1774
+ "svg",
1775
+ { className: r, width: e, height: e, viewBox: "0 0 24 24" },
1776
+ n === "up" && m.createElement("polygon", { points: "6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28" }),
1777
+ n === "down" && m.createElement("polygon", { points: "6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72" }),
1778
+ n === "left" && m.createElement("polygon", { points: "16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20" }),
1779
+ n === "right" && m.createElement("polygon", { points: "8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20" })
1780
+ )
1870
1781
  );
1871
1782
  }
1872
- function ea(t) {
1783
+ function Ur(t) {
1873
1784
  const { day: e, modifiers: n, ...r } = t;
1874
1785
  return m.createElement("td", { ...r });
1875
1786
  }
1876
- function ta(t) {
1787
+ function Lr(t) {
1877
1788
  const { day: e, modifiers: n, ...r } = t, a = m.useRef(null);
1878
1789
  return m.useEffect(() => {
1879
1790
  var o;
1880
1791
  n.focused && ((o = a.current) == null || o.focus());
1881
1792
  }, [n.focused]), m.createElement("button", { ref: a, ...r });
1882
1793
  }
1883
- function na(t) {
1794
+ var g;
1795
+ (function(t) {
1796
+ t.Root = "root", t.Chevron = "chevron", t.Day = "day", t.DayButton = "day_button", t.CaptionLabel = "caption_label", t.Dropdowns = "dropdowns", t.Dropdown = "dropdown", t.DropdownRoot = "dropdown_root", t.Footer = "footer", t.MonthGrid = "month_grid", t.MonthCaption = "month_caption", t.MonthsDropdown = "months_dropdown", t.Month = "month", t.Months = "months", t.Nav = "nav", t.NextMonthButton = "button_next", t.PreviousMonthButton = "button_previous", t.Week = "week", t.Weeks = "weeks", t.Weekday = "weekday", t.Weekdays = "weekdays", t.WeekNumber = "week_number", t.WeekNumberHeader = "week_number_header", t.YearsDropdown = "years_dropdown";
1797
+ })(g || (g = {}));
1798
+ var P;
1799
+ (function(t) {
1800
+ t.disabled = "disabled", t.hidden = "hidden", t.outside = "outside", t.focused = "focused", t.today = "today";
1801
+ })(P || (P = {}));
1802
+ var z;
1803
+ (function(t) {
1804
+ t.range_end = "range_end", t.range_middle = "range_middle", t.range_start = "range_start", t.selected = "selected";
1805
+ })(z || (z = {}));
1806
+ var j;
1807
+ (function(t) {
1808
+ t.weeks_before_enter = "weeks_before_enter", t.weeks_before_exit = "weeks_before_exit", t.weeks_after_enter = "weeks_after_enter", t.weeks_after_exit = "weeks_after_exit", t.caption_after_enter = "caption_after_enter", t.caption_after_exit = "caption_after_exit", t.caption_before_enter = "caption_before_enter", t.caption_before_exit = "caption_before_exit";
1809
+ })(j || (j = {}));
1810
+ function Vr(t) {
1884
1811
  const { options: e, className: n, components: r, classNames: a, ...o } = t, i = [a[g.Dropdown], n].join(" "), s = e == null ? void 0 : e.find(({ value: c }) => c === o.value);
1885
1812
  return m.createElement(
1886
1813
  "span",
1887
1814
  { "data-disabled": o.disabled, className: a[g.DropdownRoot] },
1888
- m.createElement(r.Select, { className: i, ...o }, e == null ? void 0 : e.map(({ value: c, label: d, disabled: l }) => m.createElement(r.Option, { key: c, value: c, disabled: l }, d))),
1815
+ m.createElement(r.Select, { className: i, ...o }, e == null ? void 0 : e.map(({ value: c, label: f, disabled: l }) => m.createElement(r.Option, { key: c, value: c, disabled: l }, f))),
1889
1816
  m.createElement(
1890
1817
  "span",
1891
1818
  { className: a[g.CaptionLabel], "aria-hidden": !0 },
@@ -1894,39 +1821,39 @@ function na(t) {
1894
1821
  )
1895
1822
  );
1896
1823
  }
1897
- function ra(t) {
1824
+ function Kr(t) {
1898
1825
  return m.createElement("div", { ...t });
1899
1826
  }
1900
- function aa(t) {
1827
+ function Jr(t) {
1901
1828
  return m.createElement("div", { ...t });
1902
1829
  }
1903
- function oa(t) {
1830
+ function ea(t) {
1904
1831
  const { calendarMonth: e, displayIndex: n, ...r } = t;
1905
1832
  return m.createElement("div", { ...r }, t.children);
1906
1833
  }
1907
- function sa(t) {
1834
+ function ta(t) {
1908
1835
  const { calendarMonth: e, displayIndex: n, ...r } = t;
1909
1836
  return m.createElement("div", { ...r });
1910
1837
  }
1911
- function ia(t) {
1838
+ function na(t) {
1912
1839
  return m.createElement("table", { ...t });
1913
1840
  }
1914
- function ca(t) {
1841
+ function ra(t) {
1915
1842
  return m.createElement("div", { ...t });
1916
1843
  }
1917
- const Tt = dn(void 0);
1918
- function ke() {
1919
- const t = ln(Tt);
1844
+ const Ot = cn(void 0);
1845
+ function be() {
1846
+ const t = un(Ot);
1920
1847
  if (t === void 0)
1921
1848
  throw new Error("useDayPicker() must be used within a custom component.");
1922
1849
  return t;
1923
1850
  }
1924
- function ua(t) {
1925
- const { components: e } = ke();
1851
+ function aa(t) {
1852
+ const { components: e } = be();
1926
1853
  return m.createElement(e.Dropdown, { ...t });
1927
1854
  }
1928
- function fa(t) {
1929
- const { onPreviousClick: e, onNextClick: n, previousMonth: r, nextMonth: a, ...o } = t, { components: i, classNames: s, labels: { labelPrevious: c, labelNext: d } } = ke(), l = A((h) => {
1855
+ function oa(t) {
1856
+ const { onPreviousClick: e, onNextClick: n, previousMonth: r, nextMonth: a, ...o } = t, { components: i, classNames: s, labels: { labelPrevious: c, labelNext: f } } = be(), l = A((h) => {
1930
1857
  a && (n == null || n(h));
1931
1858
  }, [a, n]), u = A((h) => {
1932
1859
  r && (e == null || e(h));
@@ -1941,65 +1868,148 @@ function fa(t) {
1941
1868
  ),
1942
1869
  m.createElement(
1943
1870
  i.NextMonthButton,
1944
- { type: "button", className: s[g.NextMonthButton], tabIndex: a ? void 0 : -1, "aria-disabled": a ? void 0 : !0, "aria-label": d(a), onClick: l },
1871
+ { type: "button", className: s[g.NextMonthButton], tabIndex: a ? void 0 : -1, "aria-disabled": a ? void 0 : !0, "aria-label": f(a), onClick: l },
1945
1872
  m.createElement(i.Chevron, { disabled: a ? void 0 : !0, orientation: "right", className: s[g.Chevron] })
1946
1873
  )
1947
1874
  );
1948
1875
  }
1949
- function da(t) {
1950
- const { components: e } = ke();
1876
+ function sa(t) {
1877
+ const { components: e } = be();
1951
1878
  return m.createElement(e.Button, { ...t });
1952
1879
  }
1953
- function la(t) {
1880
+ function ia(t) {
1954
1881
  return m.createElement("option", { ...t });
1955
1882
  }
1956
- function ha(t) {
1957
- const { components: e } = ke();
1883
+ function ca(t) {
1884
+ const { components: e } = be();
1958
1885
  return m.createElement(e.Button, { ...t });
1959
1886
  }
1960
- function ma(t) {
1887
+ function ua(t) {
1961
1888
  const { rootRef: e, ...n } = t;
1962
1889
  return m.createElement("div", { ...n, ref: e });
1963
1890
  }
1964
- function ya(t) {
1891
+ function fa(t) {
1965
1892
  return m.createElement("select", { ...t });
1966
1893
  }
1967
- function ga(t) {
1894
+ function da(t) {
1968
1895
  const { week: e, ...n } = t;
1969
1896
  return m.createElement("tr", { ...n });
1970
1897
  }
1971
- function wa(t) {
1898
+ function la(t) {
1972
1899
  return m.createElement("th", { ...t });
1973
1900
  }
1974
- function ba(t) {
1901
+ function ha(t) {
1975
1902
  return m.createElement(
1976
1903
  "thead",
1977
1904
  { "aria-hidden": !0 },
1978
1905
  m.createElement("tr", { ...t })
1979
1906
  );
1980
1907
  }
1981
- function Ma(t) {
1908
+ function ma(t) {
1982
1909
  const { week: e, ...n } = t;
1983
1910
  return m.createElement("th", { ...n });
1984
1911
  }
1985
- function ka(t) {
1912
+ function ya(t) {
1986
1913
  return m.createElement("th", { ...t });
1987
1914
  }
1988
- function Da(t) {
1915
+ function ga(t) {
1989
1916
  return m.createElement("tbody", { ...t });
1990
1917
  }
1991
- function va(t) {
1992
- const { components: e } = ke();
1918
+ function wa(t) {
1919
+ const { components: e } = be();
1993
1920
  return m.createElement(e.Dropdown, { ...t });
1994
1921
  }
1995
- const Oa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, Button: Ur, CaptionLabel: Kr, Chevron: Jr, Day: ea, DayButton: ta, Dropdown: na, DropdownNav: ra, Footer: aa, Month: oa, MonthCaption: sa, MonthGrid: ia, Months: ca, MonthsDropdown: ua, Nav: fa, NextMonthButton: da, Option: la, PreviousMonthButton: ha, Root: ma, Select: ya, Week: ga, WeekNumber: Ma, WeekNumberHeader: ka, Weekday: wa, Weekdays: ba, Weeks: Da, YearsDropdown: va }, Symbol.toStringTag, { value: "Module" }));
1996
- function Wa(t) {
1922
+ const ba = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, Button: zr, CaptionLabel: Qr, Chevron: Xr, Day: Ur, DayButton: Lr, Dropdown: Vr, DropdownNav: Kr, Footer: Jr, Month: ea, MonthCaption: ta, MonthGrid: na, Months: ra, MonthsDropdown: aa, Nav: oa, NextMonthButton: sa, Option: ia, PreviousMonthButton: ca, Root: ua, Select: fa, Week: da, WeekNumber: ma, WeekNumberHeader: ya, Weekday: la, Weekdays: ha, Weeks: ga, YearsDropdown: wa }, Symbol.toStringTag, { value: "Module" }));
1923
+ function V(t, e, n = !1, r = U) {
1924
+ let { from: a, to: o } = t;
1925
+ const { differenceInCalendarDays: i, isSameDay: s } = r;
1926
+ return a && o ? (i(o, a) < 0 && ([a, o] = [o, a]), i(e, a) >= (n ? 1 : 0) && i(o, e) >= (n ? 1 : 0)) : !n && o ? s(o, e) : !n && a ? s(a, e) : !1;
1927
+ }
1928
+ function Wt(t) {
1929
+ return !!(t && typeof t == "object" && "before" in t && "after" in t);
1930
+ }
1931
+ function $e(t) {
1932
+ return !!(t && typeof t == "object" && "from" in t);
1933
+ }
1934
+ function St(t) {
1935
+ return !!(t && typeof t == "object" && "after" in t);
1936
+ }
1937
+ function pt(t) {
1938
+ return !!(t && typeof t == "object" && "before" in t);
1939
+ }
1940
+ function Nt(t) {
1941
+ return !!(t && typeof t == "object" && "dayOfWeek" in t);
1942
+ }
1943
+ function Ct(t, e) {
1944
+ return Array.isArray(t) && t.every(e.isDate);
1945
+ }
1946
+ function K(t, e, n = U) {
1947
+ const r = Array.isArray(e) ? e : [e], { isSameDay: a, differenceInCalendarDays: o, isAfter: i } = n;
1948
+ return r.some((s) => {
1949
+ if (typeof s == "boolean")
1950
+ return s;
1951
+ if (n.isDate(s))
1952
+ return a(t, s);
1953
+ if (Ct(s, n))
1954
+ return s.includes(t);
1955
+ if ($e(s))
1956
+ return V(s, t, !1, n);
1957
+ if (Nt(s))
1958
+ return Array.isArray(s.dayOfWeek) ? s.dayOfWeek.includes(t.getDay()) : s.dayOfWeek === t.getDay();
1959
+ if (Wt(s)) {
1960
+ const c = o(s.before, t), f = o(s.after, t), l = c > 0, u = f < 0;
1961
+ return i(s.before, s.after) ? u && l : l || u;
1962
+ }
1963
+ return St(s) ? o(t, s.after) > 0 : pt(s) ? o(s.before, t) > 0 : typeof s == "function" ? s(t) : !1;
1964
+ });
1965
+ }
1966
+ function Ma(t, e, n, r, a) {
1967
+ const { disabled: o, hidden: i, modifiers: s, showOutsideDays: c, broadcastCalendar: f, today: l } = e, { isSameDay: u, isSameMonth: h, startOfMonth: w, isBefore: b, endOfMonth: O, isAfter: M } = a, k = n && w(n), D = r && O(r), y = {
1968
+ [P.focused]: [],
1969
+ [P.outside]: [],
1970
+ [P.disabled]: [],
1971
+ [P.hidden]: [],
1972
+ [P.today]: []
1973
+ }, N = {};
1974
+ for (const d of t) {
1975
+ const { date: W, displayMonth: v } = d, x = !!(v && !h(W, v)), B = !!(k && b(W, k)), H = !!(D && M(W, D)), q = !!(o && K(W, o, a)), G = !!(i && K(W, i, a)) || B || H || // Broadcast calendar will show outside days as default
1976
+ !f && !c && x || f && c === !1 && x, re = u(W, l ?? a.today());
1977
+ x && y.outside.push(d), q && y.disabled.push(d), G && y.hidden.push(d), re && y.today.push(d), s && Object.keys(s).forEach((ae) => {
1978
+ const oe = s == null ? void 0 : s[ae];
1979
+ oe && K(W, oe, a) && (N[ae] ? N[ae].push(d) : N[ae] = [d]);
1980
+ });
1981
+ }
1982
+ return (d) => {
1983
+ const W = {
1984
+ [P.focused]: !1,
1985
+ [P.disabled]: !1,
1986
+ [P.hidden]: !1,
1987
+ [P.outside]: !1,
1988
+ [P.today]: !1
1989
+ }, v = {};
1990
+ for (const x in y) {
1991
+ const B = y[x];
1992
+ W[x] = B.some((H) => H === d);
1993
+ }
1994
+ for (const x in N)
1995
+ v[x] = N[x].some((B) => B === d);
1996
+ return {
1997
+ ...W,
1998
+ // custom modifiers should override all the previous ones
1999
+ ...v
2000
+ };
2001
+ };
2002
+ }
2003
+ function ka(t, e, n = {}) {
2004
+ return Object.entries(t).filter(([, a]) => a === !0).reduce((a, [o]) => (n[o] ? a.push(n[o]) : e[P[o]] ? a.push(e[P[o]]) : e[z[o]] && a.push(e[z[o]]), a), [e[g.Day]]);
2005
+ }
2006
+ function Da(t) {
1997
2007
  return {
1998
- ...Oa,
2008
+ ...ba,
1999
2009
  ...t
2000
2010
  };
2001
2011
  }
2002
- function pa(t) {
2012
+ function va(t) {
2003
2013
  const e = {
2004
2014
  "data-mode": t.mode ?? void 0,
2005
2015
  "data-required": "required" in t ? t.required : void 0,
@@ -2012,58 +2022,58 @@ function pa(t) {
2012
2022
  n.startsWith("data-") && (e[n] = r);
2013
2023
  }), e;
2014
2024
  }
2015
- function Na() {
2025
+ function Oa() {
2016
2026
  const t = {};
2017
2027
  for (const e in g)
2018
2028
  t[g[e]] = `rdp-${g[e]}`;
2019
2029
  for (const e in P)
2020
2030
  t[P[e]] = `rdp-${P[e]}`;
2021
- for (const e in Z)
2022
- t[Z[e]] = `rdp-${Z[e]}`;
2031
+ for (const e in z)
2032
+ t[z[e]] = `rdp-${z[e]}`;
2023
2033
  for (const e in j)
2024
2034
  t[j[e]] = `rdp-${j[e]}`;
2025
2035
  return t;
2026
2036
  }
2027
- function Et(t, e, n) {
2028
- return (n ?? new ee(e)).format(t, "LLLL y");
2037
+ function xt(t, e, n) {
2038
+ return (n ?? new J(e)).format(t, "LLLL y");
2029
2039
  }
2030
- const Sa = Et;
2031
- function Ca(t, e, n) {
2032
- return (n ?? new ee(e)).format(t, "d");
2040
+ const Wa = xt;
2041
+ function Sa(t, e, n) {
2042
+ return (n ?? new J(e)).format(t, "d");
2033
2043
  }
2034
- function xa(t, e = V) {
2044
+ function pa(t, e = U) {
2035
2045
  return e.format(t, "LLLL");
2036
2046
  }
2037
- function Ya(t, e = V) {
2047
+ function Na(t, e, n) {
2048
+ return (n ?? new J(e)).format(t, "cccccc");
2049
+ }
2050
+ function Ca(t, e = U) {
2038
2051
  return t < 10 ? e.formatNumber(`0${t.toLocaleString()}`) : e.formatNumber(`${t.toLocaleString()}`);
2039
2052
  }
2040
- function Ta() {
2053
+ function xa() {
2041
2054
  return "";
2042
2055
  }
2043
- function Ea(t, e, n) {
2044
- return (n ?? new ee(e)).format(t, "cccccc");
2045
- }
2046
- function Pt(t, e = V) {
2056
+ function Tt(t, e = U) {
2047
2057
  return e.format(t, "yyyy");
2048
2058
  }
2049
- const Pa = Pt, _a = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, formatCaption: Et, formatDay: Ca, formatMonthCaption: Sa, formatMonthDropdown: xa, formatWeekNumber: Ya, formatWeekNumberHeader: Ta, formatWeekdayName: Ea, formatYearCaption: Pa, formatYearDropdown: Pt }, Symbol.toStringTag, { value: "Module" }));
2050
- function Fa(t) {
2059
+ const Ta = Tt, Ya = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, formatCaption: xt, formatDay: Sa, formatMonthCaption: Wa, formatMonthDropdown: pa, formatWeekNumber: Ca, formatWeekNumberHeader: xa, formatWeekdayName: Na, formatYearCaption: Ta, formatYearDropdown: Tt }, Symbol.toStringTag, { value: "Module" }));
2060
+ function Ea(t) {
2051
2061
  return t != null && t.formatMonthCaption && !t.formatCaption && (t.formatCaption = t.formatMonthCaption), t != null && t.formatYearCaption && !t.formatYearDropdown && (t.formatYearDropdown = t.formatYearCaption), {
2052
- ..._a,
2062
+ ...Ya,
2053
2063
  ...t
2054
2064
  };
2055
2065
  }
2056
- function Ba(t, e, n, r, a) {
2057
- const { startOfMonth: o, startOfYear: i, endOfYear: s, eachMonthOfInterval: c, getMonth: d } = a;
2066
+ function _a(t, e, n, r, a) {
2067
+ const { startOfMonth: o, startOfYear: i, endOfYear: s, eachMonthOfInterval: c, getMonth: f } = a;
2058
2068
  return c({
2059
2069
  start: i(t),
2060
2070
  end: s(t)
2061
2071
  }).map((h) => {
2062
- const w = r.formatMonthDropdown(h, a), b = d(h), W = e && h < o(e) || n && h > o(n) || !1;
2063
- return { value: b, label: w, disabled: W };
2072
+ const w = r.formatMonthDropdown(h, a), b = f(h), O = e && h < o(e) || n && h > o(n) || !1;
2073
+ return { value: b, label: w, disabled: O };
2064
2074
  });
2065
2075
  }
2066
- function Ia(t, e = {}, n = {}) {
2076
+ function Pa(t, e = {}, n = {}) {
2067
2077
  let r = { ...e == null ? void 0 : e[g.Day] };
2068
2078
  return Object.entries(t).filter(([, a]) => a === !0).forEach(([a]) => {
2069
2079
  r = {
@@ -2072,7 +2082,7 @@ function Ia(t, e = {}, n = {}) {
2072
2082
  };
2073
2083
  }), r;
2074
2084
  }
2075
- function Ha(t, e, n) {
2085
+ function Fa(t, e, n) {
2076
2086
  const r = t.today(), a = e ? t.startOfISOWeek(r) : t.startOfWeek(r), o = [];
2077
2087
  for (let i = 0; i < 7; i++) {
2078
2088
  const s = t.addDays(a, i);
@@ -2080,136 +2090,136 @@ function Ha(t, e, n) {
2080
2090
  }
2081
2091
  return o;
2082
2092
  }
2083
- function qa(t, e, n, r) {
2093
+ function Ba(t, e, n, r, a = !1) {
2084
2094
  if (!t || !e)
2085
2095
  return;
2086
- const { startOfYear: a, endOfYear: o, addYears: i, getYear: s, isBefore: c, isSameYear: d } = r, l = a(t), u = o(e), h = [];
2087
- let w = l;
2088
- for (; c(w, u) || d(w, u); )
2089
- h.push(w), w = i(w, 1);
2090
- return h.map((b) => {
2091
- const W = n.formatYearDropdown(b, r);
2096
+ const { startOfYear: o, endOfYear: i, addYears: s, getYear: c, isBefore: f, isSameYear: l } = r, u = o(t), h = i(e), w = [];
2097
+ let b = u;
2098
+ for (; f(b, h) || l(b, h); )
2099
+ w.push(b), b = s(b, 1);
2100
+ return a && w.reverse(), w.map((O) => {
2101
+ const M = n.formatYearDropdown(O, r);
2092
2102
  return {
2093
- value: s(b),
2094
- label: W,
2103
+ value: c(O),
2104
+ label: M,
2095
2105
  disabled: !1
2096
2106
  };
2097
2107
  });
2098
2108
  }
2099
- function _t(t, e, n) {
2100
- return (n ?? new ee(e)).format(t, "LLLL y");
2109
+ function Yt(t, e, n, r) {
2110
+ let a = (r ?? new J(n)).format(t, "PPPP");
2111
+ return e.today && (a = `Today, ${a}`), e.selected && (a = `${a}, selected`), a;
2112
+ }
2113
+ const Ia = Yt;
2114
+ function Et(t, e, n) {
2115
+ return (n ?? new J(e)).format(t, "LLLL y");
2101
2116
  }
2102
- const Aa = _t;
2103
- function ja(t, e, n, r) {
2104
- let a = (r ?? new ee(n)).format(t, "PPPP");
2117
+ const Ha = Et;
2118
+ function qa(t, e, n, r) {
2119
+ let a = (r ?? new J(n)).format(t, "PPPP");
2105
2120
  return e != null && e.today && (a = `Today, ${a}`), a;
2106
2121
  }
2107
- function Ft(t, e, n, r) {
2108
- let a = (r ?? new ee(n)).format(t, "PPPP");
2109
- return e.today && (a = `Today, ${a}`), e.selected && (a = `${a}, selected`), a;
2122
+ function Aa(t) {
2123
+ return "Choose the Month";
2110
2124
  }
2111
- const $a = Ft;
2112
- function Ga() {
2125
+ function ja() {
2113
2126
  return "";
2114
2127
  }
2115
- function Ra(t) {
2116
- return "Choose the Month";
2117
- }
2118
- function za(t) {
2128
+ function $a(t) {
2119
2129
  return "Go to the Next Month";
2120
2130
  }
2121
- function Za(t) {
2131
+ function Ga(t) {
2122
2132
  return "Go to the Previous Month";
2123
2133
  }
2124
- function Qa(t, e, n) {
2125
- return (n ?? new ee(e)).format(t, "cccc");
2134
+ function Ra(t, e, n) {
2135
+ return (n ?? new J(e)).format(t, "cccc");
2126
2136
  }
2127
- function Xa(t, e) {
2137
+ function Za(t, e) {
2128
2138
  return `Week ${t}`;
2129
2139
  }
2130
- function La(t) {
2140
+ function za(t) {
2131
2141
  return "Week Number";
2132
2142
  }
2133
- function Va(t) {
2143
+ function Qa(t) {
2134
2144
  return "Choose the Year";
2135
2145
  }
2136
- const Ua = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, labelCaption: Aa, labelDay: $a, labelDayButton: Ft, labelGrid: _t, labelGridcell: ja, labelMonthDropdown: Ra, labelNav: Ga, labelNext: za, labelPrevious: Za, labelWeekNumber: Xa, labelWeekNumberHeader: La, labelWeekday: Qa, labelYearDropdown: Va }, Symbol.toStringTag, { value: "Module" })), De = (t) => t instanceof HTMLElement ? t : null, Ae = (t) => [
2146
+ const Xa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, labelCaption: Ha, labelDay: Ia, labelDayButton: Yt, labelGrid: Et, labelGridcell: qa, labelMonthDropdown: Aa, labelNav: ja, labelNext: $a, labelPrevious: Ga, labelWeekNumber: Za, labelWeekNumberHeader: za, labelWeekday: Ra, labelYearDropdown: Qa }, Symbol.toStringTag, { value: "Module" })), Me = (t) => t instanceof HTMLElement ? t : null, Ie = (t) => [
2137
2147
  ...t.querySelectorAll("[data-animated-month]") ?? []
2138
- ], Ka = (t) => De(t.querySelector("[data-animated-month]")), je = (t) => De(t.querySelector("[data-animated-caption]")), $e = (t) => De(t.querySelector("[data-animated-weeks]")), Ja = (t) => De(t.querySelector("[data-animated-nav]")), eo = (t) => De(t.querySelector("[data-animated-weekdays]"));
2139
- function to(t, e, { classNames: n, months: r, focused: a, dateLib: o }) {
2140
- const i = Se(null), s = Se(r), c = Se(!1);
2141
- hn(() => {
2142
- const d = s.current;
2148
+ ], Ua = (t) => Me(t.querySelector("[data-animated-month]")), He = (t) => Me(t.querySelector("[data-animated-caption]")), qe = (t) => Me(t.querySelector("[data-animated-weeks]")), La = (t) => Me(t.querySelector("[data-animated-nav]")), Va = (t) => Me(t.querySelector("[data-animated-weekdays]"));
2149
+ function Ka(t, e, { classNames: n, months: r, focused: a, dateLib: o }) {
2150
+ const i = We(null), s = We(r), c = We(!1);
2151
+ fn(() => {
2152
+ const f = s.current;
2143
2153
  if (s.current = r, !e || !t.current || // safety check because the ref can be set to anything by consumers
2144
2154
  !(t.current instanceof HTMLElement) || // validation required for the animation to work as expected
2145
- r.length === 0 || d.length === 0 || r.length !== d.length)
2155
+ r.length === 0 || f.length === 0 || r.length !== f.length)
2146
2156
  return;
2147
- const l = o.isSameMonth(r[0].date, d[0].date), u = o.isAfter(r[0].date, d[0].date), h = u ? n[j.caption_after_enter] : n[j.caption_before_enter], w = u ? n[j.weeks_after_enter] : n[j.weeks_before_enter], b = i.current, W = t.current.cloneNode(!0);
2148
- if (W instanceof HTMLElement ? (Ae(W).forEach((y) => {
2157
+ const l = o.isSameMonth(r[0].date, f[0].date), u = o.isAfter(r[0].date, f[0].date), h = u ? n[j.caption_after_enter] : n[j.caption_before_enter], w = u ? n[j.weeks_after_enter] : n[j.weeks_before_enter], b = i.current, O = t.current.cloneNode(!0);
2158
+ if (O instanceof HTMLElement ? (Ie(O).forEach((y) => {
2149
2159
  if (!(y instanceof HTMLElement))
2150
2160
  return;
2151
- const T = Ka(y);
2152
- T && y.contains(T) && y.removeChild(T);
2153
- const f = je(y);
2154
- f && f.classList.remove(h);
2155
- const O = $e(y);
2156
- O && O.classList.remove(w);
2157
- }), i.current = W) : i.current = null, c.current || l || // skip animation if a day is focused because it can cause issues to the animation and is better for a11y
2161
+ const N = Ua(y);
2162
+ N && y.contains(N) && y.removeChild(N);
2163
+ const d = He(y);
2164
+ d && d.classList.remove(h);
2165
+ const W = qe(y);
2166
+ W && W.classList.remove(w);
2167
+ }), i.current = O) : i.current = null, c.current || l || // skip animation if a day is focused because it can cause issues to the animation and is better for a11y
2158
2168
  a)
2159
2169
  return;
2160
- const M = b instanceof HTMLElement ? Ae(b) : [], k = Ae(t.current);
2161
- if (k && k.every((D) => D instanceof HTMLElement) && M && M.every((D) => D instanceof HTMLElement)) {
2170
+ const M = b instanceof HTMLElement ? Ie(b) : [], k = Ie(t.current);
2171
+ if (k != null && k.every((D) => D instanceof HTMLElement) && M && M.every((D) => D instanceof HTMLElement)) {
2162
2172
  c.current = !0, t.current.style.isolation = "isolate";
2163
- const D = Ja(t.current);
2164
- D && (D.style.zIndex = "1"), k.forEach((y, T) => {
2165
- const f = M[T];
2166
- if (!f)
2173
+ const D = La(t.current);
2174
+ D && (D.style.zIndex = "1"), k.forEach((y, N) => {
2175
+ const d = M[N];
2176
+ if (!d)
2167
2177
  return;
2168
2178
  y.style.position = "relative", y.style.overflow = "hidden";
2169
- const O = je(y);
2170
- O && O.classList.add(h);
2171
- const v = $e(y);
2179
+ const W = He(y);
2180
+ W && W.classList.add(h);
2181
+ const v = qe(y);
2172
2182
  v && v.classList.add(w);
2173
- const N = () => {
2174
- c.current = !1, t.current && (t.current.style.isolation = ""), D && (D.style.zIndex = ""), O && O.classList.remove(h), v && v.classList.remove(w), y.style.position = "", y.style.overflow = "", y.contains(f) && y.removeChild(f);
2183
+ const x = () => {
2184
+ c.current = !1, t.current && (t.current.style.isolation = ""), D && (D.style.zIndex = ""), W && W.classList.remove(h), v && v.classList.remove(w), y.style.position = "", y.style.overflow = "", y.contains(d) && y.removeChild(d);
2175
2185
  };
2176
- f.style.pointerEvents = "none", f.style.position = "absolute", f.style.overflow = "hidden", f.setAttribute("aria-hidden", "true");
2177
- const F = eo(f);
2178
- F && (F.style.opacity = "0");
2179
- const H = je(f);
2180
- H && (H.classList.add(u ? n[j.caption_before_exit] : n[j.caption_after_exit]), H.addEventListener("animationend", N));
2181
- const q = $e(f);
2182
- q && q.classList.add(u ? n[j.weeks_before_exit] : n[j.weeks_after_exit]), y.insertBefore(f, y.firstChild);
2186
+ d.style.pointerEvents = "none", d.style.position = "absolute", d.style.overflow = "hidden", d.setAttribute("aria-hidden", "true");
2187
+ const B = Va(d);
2188
+ B && (B.style.opacity = "0");
2189
+ const H = He(d);
2190
+ H && (H.classList.add(u ? n[j.caption_before_exit] : n[j.caption_after_exit]), H.addEventListener("animationend", x));
2191
+ const q = qe(d);
2192
+ q && q.classList.add(u ? n[j.weeks_before_exit] : n[j.weeks_after_exit]), y.insertBefore(d, y.firstChild);
2183
2193
  });
2184
2194
  }
2185
2195
  });
2186
2196
  }
2187
- function no(t, e, n, r) {
2188
- const a = t[0], o = t[t.length - 1], { ISOWeek: i, fixedWeeks: s, broadcastCalendar: c } = n ?? {}, { addDays: d, differenceInCalendarDays: l, differenceInCalendarMonths: u, endOfBroadcastWeek: h, endOfISOWeek: w, endOfMonth: b, endOfWeek: W, isAfter: M, startOfBroadcastWeek: k, startOfISOWeek: D, startOfWeek: y } = r, T = c ? k(a, r) : i ? D(a) : y(a), f = c ? h(o) : i ? w(b(o)) : W(b(o)), O = l(f, T), v = u(o, a) + 1, N = [];
2189
- for (let q = 0; q <= O; q++) {
2190
- const $ = d(T, q);
2191
- if (e && M($, e))
2197
+ function Ja(t, e, n, r) {
2198
+ const a = t[0], o = t[t.length - 1], { ISOWeek: i, fixedWeeks: s, broadcastCalendar: c } = n ?? {}, { addDays: f, differenceInCalendarDays: l, differenceInCalendarMonths: u, endOfBroadcastWeek: h, endOfISOWeek: w, endOfMonth: b, endOfWeek: O, isAfter: M, startOfBroadcastWeek: k, startOfISOWeek: D, startOfWeek: y } = r, N = c ? k(a, r) : i ? D(a) : y(a), d = c ? h(o) : i ? w(b(o)) : O(b(o)), W = l(d, N), v = u(o, a) + 1, x = [];
2199
+ for (let q = 0; q <= W; q++) {
2200
+ const G = f(N, q);
2201
+ if (e && M(G, e))
2192
2202
  break;
2193
- N.push($);
2203
+ x.push(G);
2194
2204
  }
2195
2205
  const H = (c ? 35 : 42) * v;
2196
- if (s && N.length < H) {
2197
- const q = H - N.length;
2198
- for (let $ = 0; $ < q; $++) {
2199
- const ae = d(N[N.length - 1], 1);
2200
- N.push(ae);
2206
+ if (s && x.length < H) {
2207
+ const q = H - x.length;
2208
+ for (let G = 0; G < q; G++) {
2209
+ const re = f(x[x.length - 1], 1);
2210
+ x.push(re);
2201
2211
  }
2202
2212
  }
2203
- return N;
2213
+ return x;
2204
2214
  }
2205
- function ro(t) {
2215
+ function eo(t) {
2206
2216
  const e = [];
2207
2217
  return t.reduce((n, r) => {
2208
- const a = r.weeks.reduce((o, i) => [...o, ...i.days], e);
2209
- return [...n, ...a];
2210
- }, e);
2218
+ const a = r.weeks.reduce((o, i) => o.concat(i.days.slice()), e.slice());
2219
+ return n.concat(a.slice());
2220
+ }, e.slice());
2211
2221
  }
2212
- function ao(t, e, n, r) {
2222
+ function to(t, e, n, r) {
2213
2223
  const { numberOfMonths: a = 1 } = n, o = [];
2214
2224
  for (let i = 0; i < a; i++) {
2215
2225
  const s = r.addMonths(t, i);
@@ -2219,84 +2229,84 @@ function ao(t, e, n, r) {
2219
2229
  }
2220
2230
  return o;
2221
2231
  }
2222
- function it(t, e, n, r) {
2232
+ function at(t, e, n, r) {
2223
2233
  const { month: a, defaultMonth: o, today: i = r.today(), numberOfMonths: s = 1 } = t;
2224
2234
  let c = a || o || i;
2225
- const { differenceInCalendarMonths: d, addMonths: l, startOfMonth: u } = r;
2226
- if (n && d(n, c) < s - 1) {
2235
+ const { differenceInCalendarMonths: f, addMonths: l, startOfMonth: u } = r;
2236
+ if (n && f(n, c) < s - 1) {
2227
2237
  const h = -1 * (s - 1);
2228
2238
  c = l(n, h);
2229
2239
  }
2230
- return e && d(c, e) < 0 && (c = e), u(c);
2240
+ return e && f(c, e) < 0 && (c = e), u(c);
2231
2241
  }
2232
- function oo(t, e, n, r) {
2233
- const { addDays: a, endOfBroadcastWeek: o, endOfISOWeek: i, endOfMonth: s, endOfWeek: c, getISOWeek: d, getWeek: l, startOfBroadcastWeek: u, startOfISOWeek: h, startOfWeek: w } = r, b = t.reduce((W, M) => {
2234
- const k = n.broadcastCalendar ? u(M, r) : n.ISOWeek ? h(M) : w(M), D = n.broadcastCalendar ? o(M) : n.ISOWeek ? i(s(M)) : c(s(M)), y = e.filter((v) => v >= k && v <= D), T = n.broadcastCalendar ? 35 : 42;
2235
- if (n.fixedWeeks && y.length < T) {
2236
- const v = e.filter((N) => {
2237
- const F = T - y.length;
2238
- return N > D && N <= a(D, F);
2242
+ function no(t, e, n, r) {
2243
+ const { addDays: a, endOfBroadcastWeek: o, endOfISOWeek: i, endOfMonth: s, endOfWeek: c, getISOWeek: f, getWeek: l, startOfBroadcastWeek: u, startOfISOWeek: h, startOfWeek: w } = r, b = t.reduce((O, M) => {
2244
+ const k = n.broadcastCalendar ? u(M, r) : n.ISOWeek ? h(M) : w(M), D = n.broadcastCalendar ? o(M) : n.ISOWeek ? i(s(M)) : c(s(M)), y = e.filter((v) => v >= k && v <= D), N = n.broadcastCalendar ? 35 : 42;
2245
+ if (n.fixedWeeks && y.length < N) {
2246
+ const v = e.filter((x) => {
2247
+ const B = N - y.length;
2248
+ return x > D && x <= a(D, B);
2239
2249
  });
2240
2250
  y.push(...v);
2241
2251
  }
2242
- const f = y.reduce((v, N) => {
2243
- const F = n.ISOWeek ? d(N) : l(N), H = v.find(($) => $.weekNumber === F), q = new pt(N, M, r);
2244
- return H ? H.days.push(q) : v.push(new Xr(F, [q])), v;
2245
- }, []), O = new Qr(M, f);
2246
- return W.push(O), W;
2252
+ const d = y.reduce((v, x) => {
2253
+ const B = n.ISOWeek ? f(x) : l(x), H = v.find((G) => G.weekNumber === B), q = new vt(x, M, r);
2254
+ return H ? H.days.push(q) : v.push(new Zr(B, [q])), v;
2255
+ }, []), W = new Rr(M, d);
2256
+ return O.push(W), O;
2247
2257
  }, []);
2248
2258
  return n.reverseMonths ? b.reverse() : b;
2249
2259
  }
2250
- function so(t, e) {
2260
+ function ro(t, e) {
2251
2261
  let { startMonth: n, endMonth: r } = t;
2252
- const { startOfYear: a, startOfDay: o, startOfMonth: i, endOfMonth: s, addYears: c, endOfYear: d, newDate: l, today: u } = e, { fromYear: h, toYear: w, fromMonth: b, toMonth: W } = t;
2253
- !n && b && (n = b), !n && h && (n = e.newDate(h, 0, 1)), !r && W && (r = W), !r && w && (r = l(w, 11, 31));
2262
+ const { startOfYear: a, startOfDay: o, startOfMonth: i, endOfMonth: s, addYears: c, endOfYear: f, newDate: l, today: u } = e, { fromYear: h, toYear: w, fromMonth: b, toMonth: O } = t;
2263
+ !n && b && (n = b), !n && h && (n = e.newDate(h, 0, 1)), !r && O && (r = O), !r && w && (r = l(w, 11, 31));
2254
2264
  const M = t.captionLayout === "dropdown" || t.captionLayout === "dropdown-years";
2255
- return n ? n = i(n) : h ? n = l(h, 0, 1) : !n && M && (n = a(c(t.today ?? u(), -100))), r ? r = s(r) : w ? r = l(w, 11, 31) : !r && M && (r = d(t.today ?? u())), [
2265
+ return n ? n = i(n) : h ? n = l(h, 0, 1) : !n && M && (n = a(c(t.today ?? u(), -100))), r ? r = s(r) : w ? r = l(w, 11, 31) : !r && M && (r = f(t.today ?? u())), [
2256
2266
  n && o(n),
2257
2267
  r && o(r)
2258
2268
  ];
2259
2269
  }
2260
- function io(t, e, n, r) {
2270
+ function ao(t, e, n, r) {
2261
2271
  if (n.disableNavigation)
2262
2272
  return;
2263
- const { pagedNavigation: a, numberOfMonths: o = 1 } = n, { startOfMonth: i, addMonths: s, differenceInCalendarMonths: c } = r, d = a ? o : 1, l = i(t);
2273
+ const { pagedNavigation: a, numberOfMonths: o = 1 } = n, { startOfMonth: i, addMonths: s, differenceInCalendarMonths: c } = r, f = a ? o : 1, l = i(t);
2264
2274
  if (!e)
2265
- return s(l, d);
2275
+ return s(l, f);
2266
2276
  if (!(c(e, t) < o))
2267
- return s(l, d);
2277
+ return s(l, f);
2268
2278
  }
2269
- function co(t, e, n, r) {
2279
+ function oo(t, e, n, r) {
2270
2280
  if (n.disableNavigation)
2271
2281
  return;
2272
- const { pagedNavigation: a, numberOfMonths: o } = n, { startOfMonth: i, addMonths: s, differenceInCalendarMonths: c } = r, d = a ? o ?? 1 : 1, l = i(t);
2282
+ const { pagedNavigation: a, numberOfMonths: o } = n, { startOfMonth: i, addMonths: s, differenceInCalendarMonths: c } = r, f = a ? o ?? 1 : 1, l = i(t);
2273
2283
  if (!e)
2274
- return s(l, -d);
2284
+ return s(l, -f);
2275
2285
  if (!(c(l, e) <= 0))
2276
- return s(l, -d);
2286
+ return s(l, -f);
2277
2287
  }
2278
- function uo(t) {
2288
+ function so(t) {
2279
2289
  const e = [];
2280
- return t.reduce((n, r) => [...n, ...r.weeks], e);
2290
+ return t.reduce((n, r) => n.concat(r.weeks.slice()), e.slice());
2281
2291
  }
2282
- function xe(t, e) {
2283
- const [n, r] = Ce(t);
2292
+ function pe(t, e) {
2293
+ const [n, r] = Se(t);
2284
2294
  return [e === void 0 ? n : e, r];
2285
2295
  }
2286
- function fo(t, e) {
2287
- const [n, r] = so(t, e), { startOfMonth: a, endOfMonth: o } = e, i = it(t, n, r, e), [s, c] = xe(
2296
+ function io(t, e) {
2297
+ const [n, r] = ro(t, e), { startOfMonth: a, endOfMonth: o } = e, i = at(t, n, r, e), [s, c] = pe(
2288
2298
  i,
2289
2299
  // initialMonth is always computed from props.month if provided
2290
2300
  t.month ? i : void 0
2291
2301
  );
2292
- mn(() => {
2293
- const O = it(t, n, r, e);
2294
- c(O);
2302
+ dn(() => {
2303
+ const W = at(t, n, r, e);
2304
+ c(W);
2295
2305
  }, [t.timeZone]);
2296
- const d = ao(s, r, t, e), l = no(d, t.endMonth ? o(t.endMonth) : void 0, t, e), u = oo(d, l, t, e), h = uo(u), w = ro(u), b = co(s, n, t, e), W = io(s, r, t, e), { disableNavigation: M, onMonthChange: k } = t, D = (O) => h.some((v) => v.days.some((N) => N.isEqualTo(O))), y = (O) => {
2306
+ const f = to(s, r, t, e), l = Ja(f, t.endMonth ? o(t.endMonth) : void 0, t, e), u = no(f, l, t, e), h = so(u), w = eo(u), b = oo(s, n, t, e), O = ao(s, r, t, e), { disableNavigation: M, onMonthChange: k } = t, D = (W) => h.some((v) => v.days.some((x) => x.isEqualTo(W))), y = (W) => {
2297
2307
  if (M)
2298
2308
  return;
2299
- let v = a(O);
2309
+ let v = a(W);
2300
2310
  n && v < a(n) && (v = a(n)), r && v > a(r) && (v = a(r)), c(v), k == null || k(v);
2301
2311
  };
2302
2312
  return {
@@ -2306,87 +2316,87 @@ function fo(t, e) {
2306
2316
  navStart: n,
2307
2317
  navEnd: r,
2308
2318
  previousMonth: b,
2309
- nextMonth: W,
2319
+ nextMonth: O,
2310
2320
  goToMonth: y,
2311
- goToDay: (O) => {
2312
- D(O) || y(O.date);
2321
+ goToDay: (W) => {
2322
+ D(W) || y(W.date);
2313
2323
  }
2314
2324
  };
2315
2325
  }
2316
- var X;
2326
+ var Q;
2317
2327
  (function(t) {
2318
2328
  t[t.Today = 0] = "Today", t[t.Selected = 1] = "Selected", t[t.LastFocused = 2] = "LastFocused", t[t.FocusedModifier = 3] = "FocusedModifier";
2319
- })(X || (X = {}));
2320
- function ct(t) {
2329
+ })(Q || (Q = {}));
2330
+ function ot(t) {
2321
2331
  return !t[P.disabled] && !t[P.hidden] && !t[P.outside];
2322
2332
  }
2323
- function lo(t, e, n, r) {
2333
+ function co(t, e, n, r) {
2324
2334
  let a, o = -1;
2325
2335
  for (const i of t) {
2326
2336
  const s = e(i);
2327
- ct(s) && (s[P.focused] && o < X.FocusedModifier ? (a = i, o = X.FocusedModifier) : r != null && r.isEqualTo(i) && o < X.LastFocused ? (a = i, o = X.LastFocused) : n(i.date) && o < X.Selected ? (a = i, o = X.Selected) : s[P.today] && o < X.Today && (a = i, o = X.Today));
2337
+ ot(s) && (s[P.focused] && o < Q.FocusedModifier ? (a = i, o = Q.FocusedModifier) : r != null && r.isEqualTo(i) && o < Q.LastFocused ? (a = i, o = Q.LastFocused) : n(i.date) && o < Q.Selected ? (a = i, o = Q.Selected) : s[P.today] && o < Q.Today && (a = i, o = Q.Today));
2328
2338
  }
2329
- return a || (a = t.find((i) => ct(e(i)))), a;
2339
+ return a || (a = t.find((i) => ot(e(i)))), a;
2330
2340
  }
2331
- function ho(t, e, n, r, a, o, i) {
2332
- const { ISOWeek: s, broadcastCalendar: c } = o, { addDays: d, addMonths: l, addWeeks: u, addYears: h, endOfBroadcastWeek: w, endOfISOWeek: b, endOfWeek: W, max: M, min: k, startOfBroadcastWeek: D, startOfISOWeek: y, startOfWeek: T } = i;
2333
- let O = {
2334
- day: d,
2341
+ function uo(t, e, n, r, a, o, i) {
2342
+ const { ISOWeek: s, broadcastCalendar: c } = o, { addDays: f, addMonths: l, addWeeks: u, addYears: h, endOfBroadcastWeek: w, endOfISOWeek: b, endOfWeek: O, max: M, min: k, startOfBroadcastWeek: D, startOfISOWeek: y, startOfWeek: N } = i;
2343
+ let W = {
2344
+ day: f,
2335
2345
  week: u,
2336
2346
  month: l,
2337
2347
  year: h,
2338
- startOfWeek: (v) => c ? D(v, i) : s ? y(v) : T(v),
2339
- endOfWeek: (v) => c ? w(v) : s ? b(v) : W(v)
2348
+ startOfWeek: (v) => c ? D(v, i) : s ? y(v) : N(v),
2349
+ endOfWeek: (v) => c ? w(v) : s ? b(v) : O(v)
2340
2350
  }[t](n, e === "after" ? 1 : -1);
2341
- return e === "before" && r ? O = M([r, O]) : e === "after" && a && (O = k([a, O])), O;
2351
+ return e === "before" && r ? W = M([r, W]) : e === "after" && a && (W = k([a, W])), W;
2342
2352
  }
2343
- function Bt(t, e, n, r, a, o, i, s = 0) {
2353
+ function _t(t, e, n, r, a, o, i, s = 0) {
2344
2354
  if (s > 365)
2345
2355
  return;
2346
- const c = ho(t, e, n.date, r, a, o, i), d = !!(o.disabled && J(c, o.disabled, i)), l = !!(o.hidden && J(c, o.hidden, i)), u = c, h = new pt(c, u, i);
2347
- return !d && !l ? h : Bt(t, e, h, r, a, o, i, s + 1);
2356
+ const c = uo(t, e, n.date, r, a, o, i), f = !!(o.disabled && K(c, o.disabled, i)), l = !!(o.hidden && K(c, o.hidden, i)), u = c, h = new vt(c, u, i);
2357
+ return !f && !l ? h : _t(t, e, h, r, a, o, i, s + 1);
2348
2358
  }
2349
- function mo(t, e, n, r, a) {
2350
- const { autoFocus: o } = t, [i, s] = Ce(), c = lo(e.days, n, r || (() => !1), i), [d, l] = Ce(o ? c : void 0);
2359
+ function fo(t, e, n, r, a) {
2360
+ const { autoFocus: o } = t, [i, s] = Se(), c = co(e.days, n, r || (() => !1), i), [f, l] = Se(o ? c : void 0);
2351
2361
  return {
2352
- isFocusTarget: (W) => !!(c != null && c.isEqualTo(W)),
2362
+ isFocusTarget: (O) => !!(c != null && c.isEqualTo(O)),
2353
2363
  setFocused: l,
2354
- focused: d,
2364
+ focused: f,
2355
2365
  blur: () => {
2356
- s(d), l(void 0);
2366
+ s(f), l(void 0);
2357
2367
  },
2358
- moveFocus: (W, M) => {
2359
- if (!d)
2368
+ moveFocus: (O, M) => {
2369
+ if (!f)
2360
2370
  return;
2361
- const k = Bt(W, M, d, e.navStart, e.navEnd, t, a);
2371
+ const k = _t(O, M, f, e.navStart, e.navEnd, t, a);
2362
2372
  k && (e.goToDay(k), l(k));
2363
2373
  }
2364
2374
  };
2365
2375
  }
2366
- function yo(t, e) {
2367
- const { selected: n, required: r, onSelect: a } = t, [o, i] = xe(n, a ? n : void 0), s = a ? n : o, { isSameDay: c } = e, d = (w) => (s == null ? void 0 : s.some((b) => c(b, w))) ?? !1, { min: l, max: u } = t;
2376
+ function lo(t, e) {
2377
+ const { selected: n, required: r, onSelect: a } = t, [o, i] = pe(n, a ? n : void 0), s = a ? n : o, { isSameDay: c } = e, f = (w) => (s == null ? void 0 : s.some((b) => c(b, w))) ?? !1, { min: l, max: u } = t;
2368
2378
  return {
2369
2379
  selected: s,
2370
- select: (w, b, W) => {
2380
+ select: (w, b, O) => {
2371
2381
  let M = [...s ?? []];
2372
- if (d(w)) {
2382
+ if (f(w)) {
2373
2383
  if ((s == null ? void 0 : s.length) === l || r && (s == null ? void 0 : s.length) === 1)
2374
2384
  return;
2375
2385
  M = s == null ? void 0 : s.filter((k) => !c(k, w));
2376
2386
  } else
2377
2387
  (s == null ? void 0 : s.length) === u ? M = [w] : M = [...M, w];
2378
- return a || i(M), a == null || a(M, w, b, W), M;
2388
+ return a || i(M), a == null || a(M, w, b, O), M;
2379
2389
  },
2380
- isSelected: d
2390
+ isSelected: f
2381
2391
  };
2382
2392
  }
2383
- function go(t, e, n = 0, r = 0, a = !1, o = V) {
2384
- const { from: i, to: s } = e || {}, { isSameDay: c, isAfter: d, isBefore: l } = o;
2393
+ function ho(t, e, n = 0, r = 0, a = !1, o = U) {
2394
+ const { from: i, to: s } = e || {}, { isSameDay: c, isAfter: f, isBefore: l } = o;
2385
2395
  let u;
2386
2396
  if (!i && !s)
2387
2397
  u = { from: t, to: n > 0 ? void 0 : t };
2388
2398
  else if (i && !s)
2389
- c(i, t) ? a ? u = { from: i, to: void 0 } : u = void 0 : l(t, i) ? u = { from: t, to: i } : u = { from: i, to: t };
2399
+ c(i, t) ? n === 0 ? u = { from: i, to: t } : a ? u = { from: i, to: void 0 } : u = void 0 : l(t, i) ? u = { from: t, to: i } : u = { from: i, to: t };
2390
2400
  else if (i && s)
2391
2401
  if (c(i, t) && c(s, t))
2392
2402
  a ? u = { from: i, to: s } : u = void 0;
@@ -2396,9 +2406,9 @@ function go(t, e, n = 0, r = 0, a = !1, o = V) {
2396
2406
  u = { from: t, to: n > 0 ? void 0 : t };
2397
2407
  else if (l(t, i))
2398
2408
  u = { from: t, to: s };
2399
- else if (d(t, i))
2409
+ else if (f(t, i))
2400
2410
  u = { from: i, to: t };
2401
- else if (d(t, s))
2411
+ else if (f(t, s))
2402
2412
  u = { from: i, to: t };
2403
2413
  else
2404
2414
  throw new Error("Invalid range");
@@ -2408,7 +2418,7 @@ function go(t, e, n = 0, r = 0, a = !1, o = V) {
2408
2418
  }
2409
2419
  return u;
2410
2420
  }
2411
- function wo(t, e, n = V) {
2421
+ function mo(t, e, n = U) {
2412
2422
  const r = Array.isArray(e) ? e : [e];
2413
2423
  let a = t.from;
2414
2424
  const o = n.differenceInCalendarDays(t.to, t.from), i = Math.min(o, 6);
@@ -2419,21 +2429,21 @@ function wo(t, e, n = V) {
2419
2429
  }
2420
2430
  return !1;
2421
2431
  }
2422
- function ut(t, e, n = V) {
2423
- return K(t, e.from, !1, n) || K(t, e.to, !1, n) || K(e, t.from, !1, n) || K(e, t.to, !1, n);
2432
+ function st(t, e, n = U) {
2433
+ return V(t, e.from, !1, n) || V(t, e.to, !1, n) || V(e, t.from, !1, n) || V(e, t.to, !1, n);
2424
2434
  }
2425
- function bo(t, e, n = V) {
2435
+ function yo(t, e, n = U) {
2426
2436
  const r = Array.isArray(e) ? e : [e];
2427
- if (r.filter((s) => typeof s != "function").some((s) => typeof s == "boolean" ? s : n.isDate(s) ? K(t, s, !1, n) : Yt(s, n) ? s.some((c) => K(t, c, !1, n)) : ze(s) ? s.from && s.to ? ut(t, { from: s.from, to: s.to }, n) : !1 : xt(s) ? wo(t, s.dayOfWeek, n) : Nt(s) ? n.isAfter(s.before, s.after) ? ut(t, {
2437
+ if (r.filter((s) => typeof s != "function").some((s) => typeof s == "boolean" ? s : n.isDate(s) ? V(t, s, !1, n) : Ct(s, n) ? s.some((c) => V(t, c, !1, n)) : $e(s) ? s.from && s.to ? st(t, { from: s.from, to: s.to }, n) : !1 : Nt(s) ? mo(t, s.dayOfWeek, n) : Wt(s) ? n.isAfter(s.before, s.after) ? st(t, {
2428
2438
  from: n.addDays(s.after, 1),
2429
2439
  to: n.addDays(s.before, -1)
2430
- }, n) : J(t.from, s, n) || J(t.to, s, n) : St(s) || Ct(s) ? J(t.from, s, n) || J(t.to, s, n) : !1))
2440
+ }, n) : K(t.from, s, n) || K(t.to, s, n) : St(s) || pt(s) ? K(t.from, s, n) || K(t.to, s, n) : !1))
2431
2441
  return !0;
2432
2442
  const i = r.filter((s) => typeof s == "function");
2433
2443
  if (i.length) {
2434
2444
  let s = t.from;
2435
2445
  const c = n.differenceInCalendarDays(t.to, t.from);
2436
- for (let d = 0; d <= c; d++) {
2446
+ for (let f = 0; f <= c; f++) {
2437
2447
  if (i.some((l) => l(s)))
2438
2448
  return !0;
2439
2449
  s = n.addDays(s, 1);
@@ -2441,19 +2451,19 @@ function bo(t, e, n = V) {
2441
2451
  }
2442
2452
  return !1;
2443
2453
  }
2444
- function Mo(t, e) {
2445
- const { disabled: n, excludeDisabled: r, selected: a, required: o, onSelect: i } = t, [s, c] = xe(a, i ? a : void 0), d = i ? a : s;
2454
+ function go(t, e) {
2455
+ const { disabled: n, excludeDisabled: r, selected: a, required: o, onSelect: i } = t, [s, c] = pe(a, i ? a : void 0), f = i ? a : s;
2446
2456
  return {
2447
- selected: d,
2457
+ selected: f,
2448
2458
  select: (h, w, b) => {
2449
- const { min: W, max: M } = t, k = h ? go(h, d, W, M, o, e) : void 0;
2450
- return r && n && (k != null && k.from) && k.to && bo({ from: k.from, to: k.to }, n, e) && (k.from = h, k.to = void 0), i || c(k), i == null || i(k, h, w, b), k;
2459
+ const { min: O, max: M } = t, k = h ? ho(h, f, O, M, o, e) : void 0;
2460
+ return r && n && (k != null && k.from) && k.to && yo({ from: k.from, to: k.to }, n, e) && (k.from = h, k.to = void 0), i || c(k), i == null || i(k, h, w, b), k;
2451
2461
  },
2452
- isSelected: (h) => d && K(d, h, !1, e)
2462
+ isSelected: (h) => f && V(f, h, !1, e)
2453
2463
  };
2454
2464
  }
2455
- function ko(t, e) {
2456
- const { selected: n, required: r, onSelect: a } = t, [o, i] = xe(n, a ? n : void 0), s = a ? n : o, { isSameDay: c } = e;
2465
+ function wo(t, e) {
2466
+ const { selected: n, required: r, onSelect: a } = t, [o, i] = pe(n, a ? n : void 0), s = a ? n : o, { isSameDay: c } = e;
2457
2467
  return {
2458
2468
  selected: s,
2459
2469
  select: (u, h, w) => {
@@ -2463,8 +2473,8 @@ function ko(t, e) {
2463
2473
  isSelected: (u) => s ? c(s, u) : !1
2464
2474
  };
2465
2475
  }
2466
- function Do(t, e) {
2467
- const n = ko(t, e), r = yo(t, e), a = Mo(t, e);
2476
+ function bo(t, e) {
2477
+ const n = wo(t, e), r = lo(t, e), a = go(t, e);
2468
2478
  switch (t.mode) {
2469
2479
  case "single":
2470
2480
  return n;
@@ -2476,19 +2486,19 @@ function Do(t, e) {
2476
2486
  return;
2477
2487
  }
2478
2488
  }
2479
- function vo(t) {
2480
- var Ue;
2489
+ function Mo(t) {
2490
+ var Xe;
2481
2491
  let e = t;
2482
2492
  e.timeZone && (e = {
2483
2493
  ...t
2484
- }, e.today && (e.today = new I(e.today, e.timeZone)), e.month && (e.month = new I(e.month, e.timeZone)), e.defaultMonth && (e.defaultMonth = new I(e.defaultMonth, e.timeZone)), e.startMonth && (e.startMonth = new I(e.startMonth, e.timeZone)), e.endMonth && (e.endMonth = new I(e.endMonth, e.timeZone)), e.mode === "single" && e.selected ? e.selected = new I(e.selected, e.timeZone) : e.mode === "multiple" && e.selected ? e.selected = (Ue = e.selected) == null ? void 0 : Ue.map((p) => new I(p, e.timeZone)) : e.mode === "range" && e.selected && (e.selected = {
2494
+ }, e.today && (e.today = new I(e.today, e.timeZone)), e.month && (e.month = new I(e.month, e.timeZone)), e.defaultMonth && (e.defaultMonth = new I(e.defaultMonth, e.timeZone)), e.startMonth && (e.startMonth = new I(e.startMonth, e.timeZone)), e.endMonth && (e.endMonth = new I(e.endMonth, e.timeZone)), e.mode === "single" && e.selected ? e.selected = new I(e.selected, e.timeZone) : e.mode === "multiple" && e.selected ? e.selected = (Xe = e.selected) == null ? void 0 : Xe.map((p) => new I(p, e.timeZone)) : e.mode === "range" && e.selected && (e.selected = {
2485
2495
  from: e.selected.from ? new I(e.selected.from, e.timeZone) : void 0,
2486
2496
  to: e.selected.to ? new I(e.selected.to, e.timeZone) : void 0
2487
2497
  }));
2488
- const { components: n, formatters: r, labels: a, dateLib: o, locale: i, classNames: s } = Ie(() => {
2489
- const p = { ...Re, ...e.locale };
2498
+ const { components: n, formatters: r, labels: a, dateLib: o, locale: i, classNames: s } = Pe(() => {
2499
+ const p = { ...je, ...e.locale };
2490
2500
  return {
2491
- dateLib: new ee({
2501
+ dateLib: new J({
2492
2502
  locale: p,
2493
2503
  weekStartsOn: e.broadcastCalendar ? 1 : e.weekStartsOn,
2494
2504
  firstWeekContainsDate: e.firstWeekContainsDate,
@@ -2497,11 +2507,11 @@ function vo(t) {
2497
2507
  timeZone: e.timeZone,
2498
2508
  numerals: e.numerals
2499
2509
  }, e.dateLib),
2500
- components: Wa(e.components),
2501
- formatters: Fa(e.formatters),
2502
- labels: { ...Ua, ...e.labels },
2510
+ components: Da(e.components),
2511
+ formatters: Ea(e.formatters),
2512
+ labels: { ...Xa, ...e.labels },
2503
2513
  locale: p,
2504
- classNames: { ...Na(), ...e.classNames }
2514
+ classNames: { ...Oa(), ...e.classNames }
2505
2515
  };
2506
2516
  }, [
2507
2517
  e.locale,
@@ -2517,18 +2527,18 @@ function vo(t) {
2517
2527
  e.formatters,
2518
2528
  e.labels,
2519
2529
  e.classNames
2520
- ]), { captionLayout: c, mode: d, navLayout: l, numberOfMonths: u = 1, onDayBlur: h, onDayClick: w, onDayFocus: b, onDayKeyDown: W, onDayMouseEnter: M, onDayMouseLeave: k, onNextClick: D, onPrevClick: y, showWeekNumber: T, styles: f } = e, { formatCaption: O, formatDay: v, formatMonthDropdown: N, formatWeekNumber: F, formatWeekNumberHeader: H, formatWeekdayName: q, formatYearDropdown: $ } = r, ae = fo(e, o), { days: oe, months: se, navStart: ve, navEnd: Ye, previousMonth: G, nextMonth: R, goToMonth: U } = ae, Te = Lr(oe, e, ve, Ye, o), { isSelected: fe, select: de, selected: Oe } = Do(e, o) ?? {}, { blur: Ze, focused: We, isFocusTarget: It, moveFocus: Qe, setFocused: pe } = mo(e, ae, Te, fe ?? (() => !1), o), { labelDayButton: Ht, labelGridcell: qt, labelGrid: At, labelMonthDropdown: jt, labelNav: Xe, labelPrevious: $t, labelNext: Gt, labelWeekday: Rt, labelWeekNumber: zt, labelWeekNumberHeader: Zt, labelYearDropdown: Qt } = a, Xt = Ie(() => Ha(o, e.ISOWeek), [o, e.ISOWeek]), Le = d !== void 0 || w !== void 0, Ee = A(() => {
2521
- G && (U(G), y == null || y(G));
2522
- }, [G, U, y]), Pe = A(() => {
2523
- R && (U(R), D == null || D(R));
2524
- }, [U, R, D]), Lt = A((p, E) => (S) => {
2525
- S.preventDefault(), S.stopPropagation(), pe(p), de == null || de(p.date, E, S), w == null || w(p.date, E, S);
2526
- }, [de, w, pe]), Vt = A((p, E) => (S) => {
2527
- pe(p), b == null || b(p.date, E, S);
2528
- }, [b, pe]), Ut = A((p, E) => (S) => {
2529
- Ze(), h == null || h(p.date, E, S);
2530
- }, [Ze, h]), Kt = A((p, E) => (S) => {
2531
- const te = {
2530
+ ]), { captionLayout: c, mode: f, navLayout: l, numberOfMonths: u = 1, onDayBlur: h, onDayClick: w, onDayFocus: b, onDayKeyDown: O, onDayMouseEnter: M, onDayMouseLeave: k, onNextClick: D, onPrevClick: y, showWeekNumber: N, styles: d } = e, { formatCaption: W, formatDay: v, formatMonthDropdown: x, formatWeekNumber: B, formatWeekNumberHeader: H, formatWeekdayName: q, formatYearDropdown: G } = r, re = io(e, o), { days: ae, months: oe, navStart: ke, navEnd: Ne, previousMonth: R, nextMonth: Z, goToMonth: L } = re, Ce = Ma(ae, e, ke, Ne, o), { isSelected: ue, select: fe, selected: De } = bo(e, o) ?? {}, { blur: Ge, focused: ve, isFocusTarget: Pt, moveFocus: Re, setFocused: Oe } = fo(e, re, Ce, ue ?? (() => !1), o), { labelDayButton: Ft, labelGridcell: Bt, labelGrid: It, labelMonthDropdown: Ht, labelNav: Ze, labelPrevious: qt, labelNext: At, labelWeekday: jt, labelWeekNumber: $t, labelWeekNumberHeader: Gt, labelYearDropdown: Rt } = a, Zt = Pe(() => Fa(o, e.ISOWeek), [o, e.ISOWeek]), ze = f !== void 0 || w !== void 0, xe = A(() => {
2531
+ R && (L(R), y == null || y(R));
2532
+ }, [R, L, y]), Te = A(() => {
2533
+ Z && (L(Z), D == null || D(Z));
2534
+ }, [L, Z, D]), zt = A((p, E) => (S) => {
2535
+ S.preventDefault(), S.stopPropagation(), Oe(p), fe == null || fe(p.date, E, S), w == null || w(p.date, E, S);
2536
+ }, [fe, w, Oe]), Qt = A((p, E) => (S) => {
2537
+ Oe(p), b == null || b(p.date, E, S);
2538
+ }, [b, Oe]), Xt = A((p, E) => (S) => {
2539
+ Ge(), h == null || h(p.date, E, S);
2540
+ }, [Ge, h]), Ut = A((p, E) => (S) => {
2541
+ const _ = {
2532
2542
  ArrowLeft: [
2533
2543
  S.shiftKey ? "month" : "day",
2534
2544
  e.dir === "rtl" ? "after" : "before"
@@ -2544,126 +2554,139 @@ function vo(t) {
2544
2554
  Home: ["startOfWeek", "before"],
2545
2555
  End: ["endOfWeek", "after"]
2546
2556
  };
2547
- if (te[S.key]) {
2557
+ if (_[S.key]) {
2548
2558
  S.preventDefault(), S.stopPropagation();
2549
- const [z, Ne] = te[S.key];
2550
- Qe(z, Ne);
2559
+ const [$, C] = _[S.key];
2560
+ Re($, C);
2551
2561
  }
2552
- W == null || W(p.date, E, S);
2553
- }, [Qe, W, e.dir]), Jt = A((p, E) => (S) => {
2562
+ O == null || O(p.date, E, S);
2563
+ }, [Re, O, e.dir]), Lt = A((p, E) => (S) => {
2554
2564
  M == null || M(p.date, E, S);
2555
- }, [M]), en = A((p, E) => (S) => {
2565
+ }, [M]), Vt = A((p, E) => (S) => {
2556
2566
  k == null || k(p.date, E, S);
2557
- }, [k]), tn = A((p) => (E) => {
2558
- const S = Number(E.target.value), te = o.setMonth(o.startOfMonth(p), S);
2559
- U(te);
2560
- }, [o, U]), nn = A((p) => (E) => {
2561
- const S = Number(E.target.value), te = o.setYear(o.startOfMonth(p), S);
2562
- U(te);
2563
- }, [o, U]), { className: rn, style: an } = Ie(() => ({
2567
+ }, [k]), Kt = A((p) => (E) => {
2568
+ const S = Number(E.target.value), _ = o.setMonth(o.startOfMonth(p), S);
2569
+ L(_);
2570
+ }, [o, L]), Jt = A((p) => (E) => {
2571
+ const S = Number(E.target.value), _ = o.setYear(o.startOfMonth(p), S);
2572
+ L(_);
2573
+ }, [o, L]), { className: en, style: tn } = Pe(() => ({
2564
2574
  className: [s[g.Root], e.className].filter(Boolean).join(" "),
2565
- style: { ...f == null ? void 0 : f[g.Root], ...e.style }
2566
- }), [s, e.className, e.style, f]), on = pa(e), Ve = Se(null);
2567
- to(Ve, !!e.animate, {
2575
+ style: { ...d == null ? void 0 : d[g.Root], ...e.style }
2576
+ }), [s, e.className, e.style, d]), nn = va(e), Qe = We(null);
2577
+ Ka(Qe, !!e.animate, {
2568
2578
  classNames: s,
2569
- months: se,
2570
- focused: We,
2579
+ months: oe,
2580
+ focused: ve,
2571
2581
  dateLib: o
2572
2582
  });
2573
- const sn = {
2583
+ const rn = {
2574
2584
  dayPickerProps: e,
2575
- selected: Oe,
2576
- select: de,
2577
- isSelected: fe,
2578
- months: se,
2579
- nextMonth: R,
2580
- previousMonth: G,
2581
- goToMonth: U,
2582
- getModifiers: Te,
2585
+ selected: De,
2586
+ select: fe,
2587
+ isSelected: ue,
2588
+ months: oe,
2589
+ nextMonth: Z,
2590
+ previousMonth: R,
2591
+ goToMonth: L,
2592
+ getModifiers: Ce,
2583
2593
  components: n,
2584
2594
  classNames: s,
2585
- styles: f,
2595
+ styles: d,
2586
2596
  labels: a,
2587
2597
  formatters: r
2588
2598
  };
2589
2599
  return m.createElement(
2590
- Tt.Provider,
2591
- { value: sn },
2600
+ Ot.Provider,
2601
+ { value: rn },
2592
2602
  m.createElement(
2593
2603
  n.Root,
2594
- { rootRef: e.animate ? Ve : void 0, className: rn, style: an, dir: e.dir, id: e.id, lang: e.lang, nonce: e.nonce, title: e.title, role: e.role, "aria-label": e["aria-label"], ...on },
2604
+ { rootRef: e.animate ? Qe : void 0, className: en, style: tn, dir: e.dir, id: e.id, lang: e.lang, nonce: e.nonce, title: e.title, role: e.role, "aria-label": e["aria-label"], ...nn },
2595
2605
  m.createElement(
2596
2606
  n.Months,
2597
- { className: s[g.Months], style: f == null ? void 0 : f[g.Months] },
2598
- !e.hideNavigation && !l && m.createElement(n.Nav, { "data-animated-nav": e.animate ? "true" : void 0, className: s[g.Nav], style: f == null ? void 0 : f[g.Nav], "aria-label": Xe(), onPreviousClick: Ee, onNextClick: Pe, previousMonth: G, nextMonth: R }),
2599
- se.map((p, E) => {
2600
- const S = Ba(p.date, ve, Ye, r, o), te = qa(ve, Ye, r, o);
2601
- return m.createElement(
2602
- n.Month,
2603
- { "data-animated-month": e.animate ? "true" : void 0, className: s[g.Month], style: f == null ? void 0 : f[g.Month], key: E, displayIndex: E, calendarMonth: p },
2604
- l === "around" && !e.hideNavigation && E === 0 && m.createElement(
2605
- n.PreviousMonthButton,
2606
- { type: "button", className: s[g.PreviousMonthButton], tabIndex: G ? void 0 : -1, "aria-disabled": G ? void 0 : !0, "aria-label": $t(G), onClick: Ee, "data-animated-button": e.animate ? "true" : void 0 },
2607
- m.createElement(n.Chevron, { disabled: G ? void 0 : !0, className: s[g.Chevron], orientation: e.dir === "rtl" ? "right" : "left" })
2608
- ),
2609
- m.createElement(n.MonthCaption, { "data-animated-caption": e.animate ? "true" : void 0, className: s[g.MonthCaption], style: f == null ? void 0 : f[g.MonthCaption], calendarMonth: p, displayIndex: E }, c != null && c.startsWith("dropdown") ? m.createElement(
2610
- n.DropdownNav,
2611
- { className: s[g.Dropdowns], style: f == null ? void 0 : f[g.Dropdowns] },
2612
- c === "dropdown" || c === "dropdown-months" ? m.createElement(n.MonthsDropdown, { className: s[g.MonthsDropdown], "aria-label": jt(), classNames: s, components: n, disabled: !!e.disableNavigation, onChange: tn(p.date), options: S, style: f == null ? void 0 : f[g.Dropdown], value: o.getMonth(p.date) }) : m.createElement("span", null, N(p.date, o)),
2613
- c === "dropdown" || c === "dropdown-years" ? m.createElement(n.YearsDropdown, { className: s[g.YearsDropdown], "aria-label": Qt(o.options), classNames: s, components: n, disabled: !!e.disableNavigation, onChange: nn(p.date), options: te, style: f == null ? void 0 : f[g.Dropdown], value: o.getYear(p.date) }) : m.createElement("span", null, $(p.date, o)),
2614
- m.createElement("span", { role: "status", "aria-live": "polite", style: {
2615
- border: 0,
2616
- clip: "rect(0 0 0 0)",
2617
- height: "1px",
2618
- margin: "-1px",
2619
- overflow: "hidden",
2620
- padding: 0,
2621
- position: "absolute",
2622
- width: "1px",
2623
- whiteSpace: "nowrap",
2624
- wordWrap: "normal"
2625
- } }, O(p.date, o.options, o))
2626
- ) : m.createElement(n.CaptionLabel, { className: s[g.CaptionLabel], role: "status", "aria-live": "polite" }, O(p.date, o.options, o))),
2627
- l === "around" && !e.hideNavigation && E === u - 1 && m.createElement(
2628
- n.NextMonthButton,
2629
- { type: "button", className: s[g.NextMonthButton], tabIndex: R ? void 0 : -1, "aria-disabled": R ? void 0 : !0, "aria-label": Gt(R), onClick: Pe, "data-animated-button": e.animate ? "true" : void 0 },
2630
- m.createElement(n.Chevron, { disabled: R ? void 0 : !0, className: s[g.Chevron], orientation: e.dir === "rtl" ? "left" : "right" })
2607
+ { className: s[g.Months], style: d == null ? void 0 : d[g.Months] },
2608
+ !e.hideNavigation && !l && m.createElement(n.Nav, { "data-animated-nav": e.animate ? "true" : void 0, className: s[g.Nav], style: d == null ? void 0 : d[g.Nav], "aria-label": Ze(), onPreviousClick: xe, onNextClick: Te, previousMonth: R, nextMonth: Z }),
2609
+ oe.map((p, E) => m.createElement(
2610
+ n.Month,
2611
+ {
2612
+ "data-animated-month": e.animate ? "true" : void 0,
2613
+ className: s[g.Month],
2614
+ style: d == null ? void 0 : d[g.Month],
2615
+ // biome-ignore lint/suspicious/noArrayIndexKey: breaks animation
2616
+ key: E,
2617
+ displayIndex: E,
2618
+ calendarMonth: p
2619
+ },
2620
+ l === "around" && !e.hideNavigation && E === 0 && m.createElement(
2621
+ n.PreviousMonthButton,
2622
+ { type: "button", className: s[g.PreviousMonthButton], tabIndex: R ? void 0 : -1, "aria-disabled": R ? void 0 : !0, "aria-label": qt(R), onClick: xe, "data-animated-button": e.animate ? "true" : void 0 },
2623
+ m.createElement(n.Chevron, { disabled: R ? void 0 : !0, className: s[g.Chevron], orientation: e.dir === "rtl" ? "right" : "left" })
2624
+ ),
2625
+ m.createElement(n.MonthCaption, { "data-animated-caption": e.animate ? "true" : void 0, className: s[g.MonthCaption], style: d == null ? void 0 : d[g.MonthCaption], calendarMonth: p, displayIndex: E }, c != null && c.startsWith("dropdown") ? m.createElement(
2626
+ n.DropdownNav,
2627
+ { className: s[g.Dropdowns], style: d == null ? void 0 : d[g.Dropdowns] },
2628
+ c === "dropdown" || c === "dropdown-months" ? m.createElement(n.MonthsDropdown, { className: s[g.MonthsDropdown], "aria-label": Ht(), classNames: s, components: n, disabled: !!e.disableNavigation, onChange: Kt(p.date), options: _a(p.date, ke, Ne, r, o), style: d == null ? void 0 : d[g.Dropdown], value: o.getMonth(p.date) }) : m.createElement("span", null, x(p.date, o)),
2629
+ c === "dropdown" || c === "dropdown-years" ? m.createElement(n.YearsDropdown, { className: s[g.YearsDropdown], "aria-label": Rt(o.options), classNames: s, components: n, disabled: !!e.disableNavigation, onChange: Jt(p.date), options: Ba(ke, Ne, r, o, !!e.reverseYears), style: d == null ? void 0 : d[g.Dropdown], value: o.getYear(p.date) }) : m.createElement("span", null, G(p.date, o)),
2630
+ m.createElement("span", { role: "status", "aria-live": "polite", style: {
2631
+ border: 0,
2632
+ clip: "rect(0 0 0 0)",
2633
+ height: "1px",
2634
+ margin: "-1px",
2635
+ overflow: "hidden",
2636
+ padding: 0,
2637
+ position: "absolute",
2638
+ width: "1px",
2639
+ whiteSpace: "nowrap",
2640
+ wordWrap: "normal"
2641
+ } }, W(p.date, o.options, o))
2642
+ ) : (
2643
+ // biome-ignore lint/a11y/useSemanticElements: breaking change
2644
+ m.createElement(n.CaptionLabel, { className: s[g.CaptionLabel], role: "status", "aria-live": "polite" }, W(p.date, o.options, o))
2645
+ )),
2646
+ l === "around" && !e.hideNavigation && E === u - 1 && m.createElement(
2647
+ n.NextMonthButton,
2648
+ { type: "button", className: s[g.NextMonthButton], tabIndex: Z ? void 0 : -1, "aria-disabled": Z ? void 0 : !0, "aria-label": At(Z), onClick: Te, "data-animated-button": e.animate ? "true" : void 0 },
2649
+ m.createElement(n.Chevron, { disabled: Z ? void 0 : !0, className: s[g.Chevron], orientation: e.dir === "rtl" ? "left" : "right" })
2650
+ ),
2651
+ E === u - 1 && l === "after" && !e.hideNavigation && m.createElement(n.Nav, { "data-animated-nav": e.animate ? "true" : void 0, className: s[g.Nav], style: d == null ? void 0 : d[g.Nav], "aria-label": Ze(), onPreviousClick: xe, onNextClick: Te, previousMonth: R, nextMonth: Z }),
2652
+ m.createElement(
2653
+ n.MonthGrid,
2654
+ { role: "grid", "aria-multiselectable": f === "multiple" || f === "range", "aria-label": It(p.date, o.options, o) || void 0, className: s[g.MonthGrid], style: d == null ? void 0 : d[g.MonthGrid] },
2655
+ !e.hideWeekdays && m.createElement(
2656
+ n.Weekdays,
2657
+ { "data-animated-weekdays": e.animate ? "true" : void 0, className: s[g.Weekdays], style: d == null ? void 0 : d[g.Weekdays] },
2658
+ N && m.createElement(n.WeekNumberHeader, { "aria-label": Gt(o.options), className: s[g.WeekNumberHeader], style: d == null ? void 0 : d[g.WeekNumberHeader], scope: "col" }, H()),
2659
+ Zt.map((S) => m.createElement(n.Weekday, { "aria-label": jt(S, o.options, o), className: s[g.Weekday], key: String(S), style: d == null ? void 0 : d[g.Weekday], scope: "col" }, q(S, o.options, o)))
2631
2660
  ),
2632
- E === u - 1 && l === "after" && !e.hideNavigation && m.createElement(n.Nav, { "data-animated-nav": e.animate ? "true" : void 0, className: s[g.Nav], style: f == null ? void 0 : f[g.Nav], "aria-label": Xe(), onPreviousClick: Ee, onNextClick: Pe, previousMonth: G, nextMonth: R }),
2633
- m.createElement(
2634
- n.MonthGrid,
2635
- { role: "grid", "aria-multiselectable": d === "multiple" || d === "range", "aria-label": At(p.date, o.options, o) || void 0, className: s[g.MonthGrid], style: f == null ? void 0 : f[g.MonthGrid] },
2636
- !e.hideWeekdays && m.createElement(
2637
- n.Weekdays,
2638
- { "data-animated-weekdays": e.animate ? "true" : void 0, className: s[g.Weekdays], style: f == null ? void 0 : f[g.Weekdays] },
2639
- T && m.createElement(n.WeekNumberHeader, { "aria-label": Zt(o.options), className: s[g.WeekNumberHeader], style: f == null ? void 0 : f[g.WeekNumberHeader], scope: "col" }, H()),
2640
- Xt.map((z, Ne) => m.createElement(n.Weekday, { "aria-label": Rt(z, o.options, o), className: s[g.Weekday], key: Ne, style: f == null ? void 0 : f[g.Weekday], scope: "col" }, q(z, o.options, o)))
2641
- ),
2642
- m.createElement(n.Weeks, { "data-animated-weeks": e.animate ? "true" : void 0, className: s[g.Weeks], style: f == null ? void 0 : f[g.Weeks] }, p.weeks.map((z, Ne) => m.createElement(
2643
- n.Week,
2644
- { className: s[g.Week], key: z.weekNumber, style: f == null ? void 0 : f[g.Week], week: z },
2645
- T && m.createElement(n.WeekNumber, { week: z, style: f == null ? void 0 : f[g.WeekNumber], "aria-label": zt(z.weekNumber, {
2646
- locale: i
2647
- }), className: s[g.WeekNumber], scope: "row", role: "rowheader" }, F(z.weekNumber, o)),
2648
- z.days.map((B) => {
2649
- const { date: Q } = B, C = Te(B);
2650
- if (C[P.focused] = !C.hidden && !!(We != null && We.isEqualTo(B)), C[Z.selected] = (fe == null ? void 0 : fe(Q)) || C.selected, ze(Oe)) {
2651
- const { from: _e, to: Fe } = Oe;
2652
- C[Z.range_start] = !!(_e && Fe && o.isSameDay(Q, _e)), C[Z.range_end] = !!(_e && Fe && o.isSameDay(Q, Fe)), C[Z.range_middle] = K(Oe, Q, !0, o);
2653
- }
2654
- const cn = Ia(C, f, e.modifiersStyles), un = Vr(C, s, e.modifiersClassNames), fn = !Le && !C.hidden ? qt(Q, C, o.options, o) : void 0;
2655
- return m.createElement(n.Day, { key: `${o.format(Q, "yyyy-MM-dd")}_${o.format(B.displayMonth, "yyyy-MM")}`, day: B, modifiers: C, className: un.join(" "), style: cn, role: "gridcell", "aria-selected": C.selected || void 0, "aria-label": fn, "data-day": o.format(Q, "yyyy-MM-dd"), "data-month": B.outside ? o.format(Q, "yyyy-MM") : void 0, "data-selected": C.selected || void 0, "data-disabled": C.disabled || void 0, "data-hidden": C.hidden || void 0, "data-outside": B.outside || void 0, "data-focused": C.focused || void 0, "data-today": C.today || void 0 }, !C.hidden && Le ? m.createElement(n.DayButton, { className: s[g.DayButton], style: f == null ? void 0 : f[g.DayButton], type: "button", day: B, modifiers: C, disabled: C.disabled || void 0, tabIndex: It(B) ? 0 : -1, "aria-label": Ht(Q, C, o.options, o), onClick: Lt(B, C), onBlur: Ut(B, C), onFocus: Vt(B, C), onKeyDown: Kt(B, C), onMouseEnter: Jt(B, C), onMouseLeave: en(B, C) }, v(Q, o.options, o)) : !C.hidden && v(B.date, o.options, o));
2656
- })
2657
- )))
2658
- )
2659
- );
2660
- })
2661
+ m.createElement(n.Weeks, { "data-animated-weeks": e.animate ? "true" : void 0, className: s[g.Weeks], style: d == null ? void 0 : d[g.Weeks] }, p.weeks.map((S) => m.createElement(
2662
+ n.Week,
2663
+ { className: s[g.Week], key: S.weekNumber, style: d == null ? void 0 : d[g.Week], week: S },
2664
+ N && // biome-ignore lint/a11y/useSemanticElements: react component
2665
+ m.createElement(n.WeekNumber, { week: S, style: d == null ? void 0 : d[g.WeekNumber], "aria-label": $t(S.weekNumber, {
2666
+ locale: i
2667
+ }), className: s[g.WeekNumber], scope: "row", role: "rowheader" }, B(S.weekNumber, o)),
2668
+ S.days.map((_) => {
2669
+ const { date: $ } = _, C = Ce(_);
2670
+ if (C[P.focused] = !C.hidden && !!(ve != null && ve.isEqualTo(_)), C[z.selected] = (ue == null ? void 0 : ue($)) || C.selected, $e(De)) {
2671
+ const { from: Ye, to: Ee } = De;
2672
+ C[z.range_start] = !!(Ye && Ee && o.isSameDay($, Ye)), C[z.range_end] = !!(Ye && Ee && o.isSameDay($, Ee)), C[z.range_middle] = V(De, $, !0, o);
2673
+ }
2674
+ const an = Pa(C, d, e.modifiersStyles), on = ka(C, s, e.modifiersClassNames), sn = !ze && !C.hidden ? Bt($, C, o.options, o) : void 0;
2675
+ return (
2676
+ // biome-ignore lint/a11y/useSemanticElements: react component
2677
+ m.createElement(n.Day, { key: `${o.format($, "yyyy-MM-dd")}_${o.format(_.displayMonth, "yyyy-MM")}`, day: _, modifiers: C, className: on.join(" "), style: an, role: "gridcell", "aria-selected": C.selected || void 0, "aria-label": sn, "data-day": o.format($, "yyyy-MM-dd"), "data-month": _.outside ? o.format($, "yyyy-MM") : void 0, "data-selected": C.selected || void 0, "data-disabled": C.disabled || void 0, "data-hidden": C.hidden || void 0, "data-outside": _.outside || void 0, "data-focused": C.focused || void 0, "data-today": C.today || void 0 }, !C.hidden && ze ? m.createElement(n.DayButton, { className: s[g.DayButton], style: d == null ? void 0 : d[g.DayButton], type: "button", day: _, modifiers: C, disabled: C.disabled || void 0, tabIndex: Pt(_) ? 0 : -1, "aria-label": Ft($, C, o.options, o), onClick: zt(_, C), onBlur: Xt(_, C), onFocus: Qt(_, C), onKeyDown: Ut(_, C), onMouseEnter: Lt(_, C), onMouseLeave: Vt(_, C) }, v($, o.options, o)) : !C.hidden && v(_.date, o.options, o))
2678
+ );
2679
+ })
2680
+ )))
2681
+ )
2682
+ ))
2661
2683
  ),
2662
- e.footer && m.createElement(n.Footer, { className: s[g.Footer], style: f == null ? void 0 : f[g.Footer], role: "status", "aria-live": "polite" }, e.footer)
2684
+ e.footer && // biome-ignore lint/a11y/useSemanticElements: react component
2685
+ m.createElement(n.Footer, { className: s[g.Footer], style: d == null ? void 0 : d[g.Footer], role: "status", "aria-live": "polite" }, e.footer)
2663
2686
  )
2664
2687
  );
2665
2688
  }
2666
- const Oo = ({
2689
+ const ko = ({
2667
2690
  className: t,
2668
2691
  showOutsideDays: e = !0,
2669
2692
  animate: n = !0,
@@ -2673,18 +2696,18 @@ const Oo = ({
2673
2696
  onSelect: i,
2674
2697
  ...s
2675
2698
  }) => {
2676
- const [c, d] = Ce(
2699
+ const [c, f] = Se(
2677
2700
  () => o
2678
2701
  ), l = A(
2679
2702
  (u) => {
2680
- u && (d(u), i == null || i(u));
2703
+ u && (f(u), i == null || i(u));
2681
2704
  },
2682
2705
  [i]
2683
2706
  );
2684
- return /* @__PURE__ */ Be(
2685
- vo,
2707
+ return /* @__PURE__ */ _e(
2708
+ Mo,
2686
2709
  {
2687
- className: le(yn({ className: t })),
2710
+ className: de(ln({ className: t })),
2688
2711
  animate: n,
2689
2712
  mode: "single",
2690
2713
  selected: c,
@@ -2697,12 +2720,12 @@ const Oo = ({
2697
2720
  day_button: "h-[30px] aria-selected:opacity-100 font-semibold hover:rounded-full cursor-pointer rounded-full w-[30px]",
2698
2721
  day: "text-center text-[14px] leading-[20px]",
2699
2722
  month_caption: "text-slate-700 font-semibold text-sm pl-1 h-[32px] flex items-center",
2700
- months: le(
2723
+ months: de(
2701
2724
  "flex flex-col relative px-5 py-4 rounded-lg shadow-md px-6 py-4 w-[307px] justify-center items-center",
2702
2725
  a
2703
2726
  ),
2704
2727
  month: "flex flex-col gap-4",
2705
- nav: le(
2728
+ nav: de(
2706
2729
  "absolute right-4 top-3.5 flex justify-center items-center gap-[4px]",
2707
2730
  r
2708
2731
  ),
@@ -2716,13 +2739,13 @@ const Oo = ({
2716
2739
  month_grid: '[&>thead]:table-header-group [&>thead]:relative [&>thead]:after:block [&>thead]:after:content-[" "] [&>thead]:after:h-4'
2717
2740
  },
2718
2741
  components: {
2719
- Chevron: ({ className: u, ...h }) => h.orientation === "left" ? /* @__PURE__ */ Be(wn, { className: le(u), ...h }) : /* @__PURE__ */ Be(Mn, { className: le(u), ...h })
2742
+ Chevron: ({ className: u, ...h }) => h.orientation === "left" ? /* @__PURE__ */ _e(mn, { className: de(u), ...h }) : /* @__PURE__ */ _e(gn, { className: de(u), ...h })
2720
2743
  },
2721
2744
  ...s
2722
2745
  }
2723
2746
  );
2724
2747
  };
2725
- Oo.displayName = "DatePicker";
2748
+ ko.displayName = "DatePicker";
2726
2749
  export {
2727
- Oo as DatePicker
2750
+ ko as DatePicker
2728
2751
  };