@purpur/library 9.4.1 → 9.4.3

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.
Files changed (89) hide show
  1. package/CHANGELOG.json +33 -0
  2. package/CHANGELOG.md +18 -1
  3. package/dist/LICENSE.txt +8 -1
  4. package/dist/calendar-BXQ3v62X.js +2 -0
  5. package/dist/{calendar-CBBV8n3x.js.map → calendar-BXQ3v62X.js.map} +1 -1
  6. package/dist/{calendar-DEXw83mu.mjs → calendar-d53vgYqR.mjs} +481 -465
  7. package/dist/{calendar-DEXw83mu.mjs.map → calendar-d53vgYqR.mjs.map} +1 -1
  8. package/dist/calendar.cjs.js +1 -1
  9. package/dist/calendar.es.js +3 -3
  10. package/dist/comparison-table-C74IAVqz.js +2 -0
  11. package/dist/comparison-table-C74IAVqz.js.map +1 -0
  12. package/dist/comparison-table-DctKxmX9.mjs +267 -0
  13. package/dist/comparison-table-DctKxmX9.mjs.map +1 -0
  14. package/dist/comparison-table.cjs.js +1 -1
  15. package/dist/comparison-table.es.js +1 -1
  16. package/dist/components/calendar/src/calendar.d.ts +4 -11
  17. package/dist/components/calendar/src/calendar.d.ts.map +1 -1
  18. package/dist/components/comparison-table/src/comparison-table.d.ts.map +1 -1
  19. package/dist/components/comparison-table/src/components/OptionCard/option-card.d.ts +2 -1
  20. package/dist/components/comparison-table/src/components/OptionCard/option-card.d.ts.map +1 -1
  21. package/dist/components/comparison-table/src/components/ScrollProgress/scroll-progress.d.ts +1 -2
  22. package/dist/components/comparison-table/src/components/ScrollProgress/scroll-progress.d.ts.map +1 -1
  23. package/dist/components/date-field/src/date-field.d.ts.map +1 -1
  24. package/dist/components/date-picker/src/date-picker.d.ts +11 -2
  25. package/dist/components/date-picker/src/date-picker.d.ts.map +1 -1
  26. package/dist/components/date-range-field/src/date-range-field.d.ts +27 -0
  27. package/dist/components/date-range-field/src/date-range-field.d.ts.map +1 -0
  28. package/dist/components-metadata.js +10 -0
  29. package/dist/date-field-BKKty89_.js +2 -0
  30. package/dist/{date-field-BJaomFjs.js.map → date-field-BKKty89_.js.map} +1 -1
  31. package/dist/{date-field-D3rTtf9Y.mjs → date-field-Cv5CKR1y.mjs} +276 -268
  32. package/dist/{date-field-D3rTtf9Y.mjs.map → date-field-Cv5CKR1y.mjs.map} +1 -1
  33. package/dist/date-field.cjs.js +1 -1
  34. package/dist/date-field.es.js +1 -1
  35. package/dist/date-picker-CzxhZxsw.mjs +1611 -0
  36. package/dist/date-picker-CzxhZxsw.mjs.map +1 -0
  37. package/dist/date-picker-uyPKJulK.js +2 -0
  38. package/dist/date-picker-uyPKJulK.js.map +1 -0
  39. package/dist/date-picker.cjs.js +1 -1
  40. package/dist/date-picker.es.js +1 -1
  41. package/dist/date-range-field-CFcjprIl.mjs +142 -0
  42. package/dist/date-range-field-CFcjprIl.mjs.map +1 -0
  43. package/dist/date-range-field-D8vLeSwp.js +2 -0
  44. package/dist/date-range-field-D8vLeSwp.js.map +1 -0
  45. package/dist/date-range-field.cjs.js +2 -0
  46. package/dist/date-range-field.cjs.js.map +1 -0
  47. package/dist/date-range-field.es.js +5 -0
  48. package/dist/date-range-field.es.js.map +1 -0
  49. package/dist/{floating-ui.react-dom-gsHLgcoR.mjs → floating-ui.react-dom-EredA301.mjs} +3 -3
  50. package/dist/{floating-ui.react-dom-gsHLgcoR.mjs.map → floating-ui.react-dom-EredA301.mjs.map} +1 -1
  51. package/dist/{format-DpkYPs7O.mjs → format-CWOXI-dC.mjs} +8 -8
  52. package/dist/{format-DpkYPs7O.mjs.map → format-CWOXI-dC.mjs.map} +1 -1
  53. package/dist/libraries/library/src/date-range-field.d.ts +6 -0
  54. package/dist/libraries/library/src/date-range-field.d.ts.map +1 -0
  55. package/dist/libraries/library/src/library.d.ts +1 -0
  56. package/dist/libraries/library/src/library.d.ts.map +1 -1
  57. package/dist/library.cjs.js +1 -1
  58. package/dist/library.es.js +636 -633
  59. package/dist/library.es.js.map +1 -1
  60. package/dist/{popover-_xJATlhN.mjs → popover-I26xNbTz.mjs} +2 -2
  61. package/dist/{popover-_xJATlhN.mjs.map → popover-I26xNbTz.mjs.map} +1 -1
  62. package/dist/popover.es.js +1 -1
  63. package/dist/purpur.css +1 -1
  64. package/dist/{stepper-CNnx_NiR.mjs → stepper-CWR2vGPj.mjs} +2 -2
  65. package/dist/{stepper-CNnx_NiR.mjs.map → stepper-CWR2vGPj.mjs.map} +1 -1
  66. package/dist/stepper.es.js +1 -1
  67. package/dist/{table-D_sdSJyr.mjs → table-g_n68i4s.mjs} +2 -2
  68. package/dist/{table-D_sdSJyr.mjs.map → table-g_n68i4s.mjs.map} +1 -1
  69. package/dist/table.es.js +1 -1
  70. package/dist/{tooltip-VlURN8H3.mjs → tooltip-LU2Cy-QC.mjs} +2 -2
  71. package/dist/{tooltip-VlURN8H3.mjs.map → tooltip-LU2Cy-QC.mjs.map} +1 -1
  72. package/dist/tooltip.es.js +1 -1
  73. package/dist/{zh-TW-oiRD71xW.mjs → zh-TW-DrQ6h7hA.mjs} +2 -2
  74. package/dist/{zh-TW-oiRD71xW.mjs.map → zh-TW-DrQ6h7hA.mjs.map} +1 -1
  75. package/package.json +29 -28
  76. package/src/aliases.ts +7 -0
  77. package/src/date-range-field.ts +6 -0
  78. package/src/entries.js +1 -0
  79. package/src/library.ts +2 -0
  80. package/dist/calendar-CBBV8n3x.js +0 -2
  81. package/dist/comparison-table-8bOJmz-L.mjs +0 -275
  82. package/dist/comparison-table-8bOJmz-L.mjs.map +0 -1
  83. package/dist/comparison-table-mKL2IHXW.js +0 -2
  84. package/dist/comparison-table-mKL2IHXW.js.map +0 -1
  85. package/dist/date-field-BJaomFjs.js +0 -2
  86. package/dist/date-picker-CbUNbOhn.mjs +0 -1415
  87. package/dist/date-picker-CbUNbOhn.mjs.map +0 -1
  88. package/dist/date-picker-DYXNB5aU.js +0 -2
  89. package/dist/date-picker-DYXNB5aU.js.map +0 -1
@@ -1,43 +1,44 @@
1
1
  import { jsx as ae } from "react/jsx-runtime";
2
- import d, { createContext as At, useContext as Ht, useCallback as H, useRef as ye, useLayoutEffect as Zt, useState as pe, useEffect as Ue, useMemo as Ce } from "react";
2
+ import d, { createContext as At, useContext as Ht, useCallback as H, useRef as ce, useLayoutEffect as Zt, useState as pe, useEffect as Ue, useMemo as Ce } from "react";
3
3
  import { b as Ae } from "./button-4-yWOgtD.mjs";
4
4
  import { l as jt } from "./chevron-left.es-UFhf3v35.mjs";
5
5
  import { n as zt } from "./chevron-right.es-D7aVK4ER.mjs";
6
- import { t as I, c as L, j as Ge, r as ce, u as Ee, g as qt, v as Rt, p as Ut, i as Gt, h as Kt, x as Lt, f as Vt, s as Jt, y as Qt, e as Ke } from "./format-DpkYPs7O.mjs";
7
- function Xt(e, t, o = "long") {
6
+ /* empty css */
7
+ import { t as I, c as L, a as Ge, r as le, u as Ee, g as qt, v as Rt, p as Ut, j as Gt, i as Kt, x as Lt, h as Vt, s as Jt, y as Qt, e as Ke } from "./format-CWOXI-dC.mjs";
8
+ function Xt(e, t, n = "long") {
8
9
  return new Intl.DateTimeFormat("en-US", {
9
10
  // Enforces engine to render the time. Without the option JavaScriptCore omits it.
10
11
  hour: "numeric",
11
12
  timeZone: e,
12
- timeZoneName: o
13
+ timeZoneName: n
13
14
  }).format(t).split(/\s/g).slice(2).join(" ");
14
15
  }
15
16
  const en = {}, ie = {};
16
17
  function ne(e, t) {
17
18
  try {
18
- const n = (en[e] ||= new Intl.DateTimeFormat("en-US", {
19
+ const o = (en[e] ||= new Intl.DateTimeFormat("en-US", {
19
20
  timeZone: e,
20
21
  timeZoneName: "longOffset"
21
22
  }).format)(t).split("GMT")[1];
22
- return n in ie ? ie[n] : He(n, n.split(":"));
23
+ return o in ie ? ie[o] : He(o, o.split(":"));
23
24
  } catch {
24
25
  if (e in ie) return ie[e];
25
- const o = e?.match(tn);
26
- return o ? He(e, o.slice(1)) : NaN;
26
+ const n = e?.match(tn);
27
+ return n ? He(e, n.slice(1)) : NaN;
27
28
  }
28
29
  }
29
30
  const tn = /([+-]\d\d):?(\d\d)?/;
30
31
  function He(e, t) {
31
- const o = +(t[0] || 0), n = +(t[1] || 0), s = +(t[2] || 0) / 60;
32
- return ie[e] = o * 60 + n > 0 ? o * 60 + n + s : o * 60 - n - s;
32
+ const n = +(t[0] || 0), o = +(t[1] || 0), s = +(t[2] || 0) / 60;
33
+ return ie[e] = n * 60 + o > 0 ? n * 60 + o + s : n * 60 - o - s;
33
34
  }
34
35
  class K extends Date {
35
36
  //#region static
36
37
  constructor(...t) {
37
38
  super(), t.length > 1 && typeof t[t.length - 1] == "string" && (this.timeZone = t.pop()), this.internal = /* @__PURE__ */ new Date(), isNaN(ne(this.timeZone, this)) ? this.setTime(NaN) : t.length ? typeof t[0] == "number" && (t.length === 1 || t.length === 2 && typeof t[1] != "number") ? this.setTime(t[0]) : typeof t[0] == "string" ? this.setTime(+new Date(t[0])) : t[0] instanceof Date ? this.setTime(+t[0]) : (this.setTime(+new Date(...t)), Le(this), Te(this)) : this.setTime(Date.now());
38
39
  }
39
- static tz(t, ...o) {
40
- return o.length ? new K(...o, t) : new K(Date.now(), t);
40
+ static tz(t, ...n) {
41
+ return n.length ? new K(...n, t) : new K(Date.now(), t);
41
42
  }
42
43
  //#endregion
43
44
  //#region time zone
@@ -79,68 +80,68 @@ function nn(e) {
79
80
  Date.prototype.setFullYear.call(e, e.internal.getUTCFullYear(), e.internal.getUTCMonth(), e.internal.getUTCDate()), Date.prototype.setHours.call(e, e.internal.getUTCHours(), e.internal.getUTCMinutes(), e.internal.getUTCSeconds(), e.internal.getUTCMilliseconds()), Le(e);
80
81
  }
81
82
  function Le(e) {
82
- const t = ne(e.timeZone, e), o = t > 0 ? Math.floor(t) : Math.ceil(t), n = /* @__PURE__ */ new Date(+e);
83
- n.setUTCHours(n.getUTCHours() - 1);
84
- const s = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset(), r = -(/* @__PURE__ */ new Date(+n)).getTimezoneOffset(), i = s - r, a = Date.prototype.getHours.apply(e) !== e.internal.getUTCHours();
83
+ const t = ne(e.timeZone, e), n = t > 0 ? Math.floor(t) : Math.ceil(t), o = /* @__PURE__ */ new Date(+e);
84
+ o.setUTCHours(o.getUTCHours() - 1);
85
+ const s = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset(), r = -(/* @__PURE__ */ new Date(+o)).getTimezoneOffset(), i = s - r, a = Date.prototype.getHours.apply(e) !== e.internal.getUTCHours();
85
86
  i && a && e.internal.setUTCMinutes(e.internal.getUTCMinutes() + i);
86
- const c = s - o;
87
+ const c = s - n;
87
88
  c && Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + c);
88
89
  const l = /* @__PURE__ */ new Date(+e);
89
90
  l.setUTCSeconds(0);
90
- const u = s > 0 ? l.getSeconds() : (l.getSeconds() - 60) % 60, f = Math.round(-(ne(e.timeZone, e) * 60)) % 60;
91
- (f || u) && (e.internal.setUTCSeconds(e.internal.getUTCSeconds() + f), Date.prototype.setUTCSeconds.call(e, Date.prototype.getUTCSeconds.call(e) + f + u));
92
- const h = ne(e.timeZone, e), p = h > 0 ? Math.floor(h) : Math.ceil(h), g = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset() - p, D = p !== o, O = g - c;
93
- if (D && O) {
94
- Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + O);
95
- const W = ne(e.timeZone, e), k = W > 0 ? Math.floor(W) : Math.ceil(W), S = p - k;
91
+ const h = s > 0 ? l.getSeconds() : (l.getSeconds() - 60) % 60, f = Math.round(-(ne(e.timeZone, e) * 60)) % 60;
92
+ (f || h) && (e.internal.setUTCSeconds(e.internal.getUTCSeconds() + f), Date.prototype.setUTCSeconds.call(e, Date.prototype.getUTCSeconds.call(e) + f + h));
93
+ const u = ne(e.timeZone, e), p = u > 0 ? Math.floor(u) : Math.ceil(u), O = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset() - p, k = p !== n, g = O - c;
94
+ if (k && g) {
95
+ Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + g);
96
+ const W = ne(e.timeZone, e), M = W > 0 ? Math.floor(W) : Math.ceil(W), S = p - M;
96
97
  S && (e.internal.setUTCMinutes(e.internal.getUTCMinutes() + S), Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + S));
97
98
  }
98
99
  }
99
100
  class F extends K {
100
101
  //#region static
101
- static tz(t, ...o) {
102
- return o.length ? new F(...o, t) : new F(Date.now(), t);
102
+ static tz(t, ...n) {
103
+ return n.length ? new F(...n, t) : new F(Date.now(), t);
103
104
  }
104
105
  //#endregion
105
106
  //#region representation
106
107
  toISOString() {
107
- const [t, o, n] = this.tzComponents(), s = `${t}${o}:${n}`;
108
+ const [t, n, o] = this.tzComponents(), s = `${t}${n}:${o}`;
108
109
  return this.internal.toISOString().slice(0, -1) + s;
109
110
  }
110
111
  toString() {
111
112
  return `${this.toDateString()} ${this.toTimeString()}`;
112
113
  }
113
114
  toDateString() {
114
- const [t, o, n, s] = this.internal.toUTCString().split(" ");
115
- return `${t?.slice(0, -1)} ${n} ${o} ${s}`;
115
+ const [t, n, o, s] = this.internal.toUTCString().split(" ");
116
+ return `${t?.slice(0, -1)} ${o} ${n} ${s}`;
116
117
  }
117
118
  toTimeString() {
118
- const t = this.internal.toUTCString().split(" ")[4], [o, n, s] = this.tzComponents();
119
- return `${t} GMT${o}${n}${s} (${Xt(this.timeZone, this)})`;
119
+ const t = this.internal.toUTCString().split(" ")[4], [n, o, s] = this.tzComponents();
120
+ return `${t} GMT${n}${o}${s} (${Xt(this.timeZone, this)})`;
120
121
  }
121
- toLocaleString(t, o) {
122
+ toLocaleString(t, n) {
122
123
  return Date.prototype.toLocaleString.call(this, t, {
123
- ...o,
124
- timeZone: o?.timeZone || this.timeZone
124
+ ...n,
125
+ timeZone: n?.timeZone || this.timeZone
125
126
  });
126
127
  }
127
- toLocaleDateString(t, o) {
128
+ toLocaleDateString(t, n) {
128
129
  return Date.prototype.toLocaleDateString.call(this, t, {
129
- ...o,
130
- timeZone: o?.timeZone || this.timeZone
130
+ ...n,
131
+ timeZone: n?.timeZone || this.timeZone
131
132
  });
132
133
  }
133
- toLocaleTimeString(t, o) {
134
+ toLocaleTimeString(t, n) {
134
135
  return Date.prototype.toLocaleTimeString.call(this, t, {
135
- ...o,
136
- timeZone: o?.timeZone || this.timeZone
136
+ ...n,
137
+ timeZone: n?.timeZone || this.timeZone
137
138
  });
138
139
  }
139
140
  //#endregion
140
141
  //#region private
141
142
  tzComponents() {
142
- const t = this.getTimezoneOffset(), o = t > 0 ? "-" : "+", n = String(Math.floor(Math.abs(t) / 60)).padStart(2, "0"), s = String(Math.abs(t) % 60).padStart(2, "0");
143
- return [o, n, s];
143
+ const t = this.getTimezoneOffset(), n = t > 0 ? "-" : "+", o = String(Math.floor(Math.abs(t) / 60)).padStart(2, "0"), s = String(Math.abs(t) % 60).padStart(2, "0");
144
+ return [n, o, s];
144
145
  }
145
146
  //#endregion
146
147
  withTimeZone(t) {
@@ -168,146 +169,146 @@ var A;
168
169
  (function(e) {
169
170
  e.weeks_before_enter = "weeks_before_enter", e.weeks_before_exit = "weeks_before_exit", e.weeks_after_enter = "weeks_after_enter", e.weeks_after_exit = "weeks_after_exit", e.caption_after_enter = "caption_after_enter", e.caption_after_exit = "caption_after_exit", e.caption_before_enter = "caption_before_enter", e.caption_before_exit = "caption_before_exit";
170
171
  })(A || (A = {}));
171
- function Ve(e, t, o) {
172
- const n = I(e, o?.in);
172
+ function Ve(e, t, n) {
173
+ const o = I(e, n?.in);
173
174
  if (isNaN(t)) return L(e, NaN);
174
175
  if (!t)
175
- return n;
176
- const s = n.getDate(), r = L(e, n.getTime());
177
- r.setMonth(n.getMonth() + t + 1, 0);
176
+ return o;
177
+ const s = o.getDate(), r = L(e, o.getTime());
178
+ r.setMonth(o.getMonth() + t + 1, 0);
178
179
  const i = r.getDate();
179
- return s >= i ? r : (n.setFullYear(
180
+ return s >= i ? r : (o.setFullYear(
180
181
  r.getFullYear(),
181
182
  r.getMonth(),
182
183
  s
183
- ), n);
184
+ ), o);
184
185
  }
185
- function on(e, t, o) {
186
- return Ge(e, t * 7, o);
186
+ function on(e, t, n) {
187
+ return Ge(e, t * 7, n);
187
188
  }
188
- function sn(e, t, o) {
189
- return Ve(e, t * 12, o);
189
+ function sn(e, t, n) {
190
+ return Ve(e, t * 12, n);
190
191
  }
191
192
  function rn(e, t) {
192
- let o, n = t?.in;
193
+ let n, o = t?.in;
193
194
  return e.forEach((s) => {
194
- !n && typeof s == "object" && (n = L.bind(null, s));
195
- const r = I(s, n);
196
- (!o || o < r || isNaN(+r)) && (o = r);
197
- }), L(n, o || NaN);
195
+ !o && typeof s == "object" && (o = L.bind(null, s));
196
+ const r = I(s, o);
197
+ (!n || n < r || isNaN(+r)) && (n = r);
198
+ }), L(o, n || NaN);
198
199
  }
199
200
  function an(e, t) {
200
- let o, n = t?.in;
201
+ let n, o = t?.in;
201
202
  return e.forEach((s) => {
202
- !n && typeof s == "object" && (n = L.bind(null, s));
203
- const r = I(s, n);
204
- (!o || o > r || isNaN(+r)) && (o = r);
205
- }), L(n, o || NaN);
206
- }
207
- function cn(e, t, o) {
208
- const [n, s] = ce(
209
- o?.in,
203
+ !o && typeof s == "object" && (o = L.bind(null, s));
204
+ const r = I(s, o);
205
+ (!n || n > r || isNaN(+r)) && (n = r);
206
+ }), L(o, n || NaN);
207
+ }
208
+ function cn(e, t, n) {
209
+ const [o, s] = le(
210
+ n?.in,
210
211
  e,
211
212
  t
212
213
  );
213
- return +Ee(n) == +Ee(s);
214
+ return +Ee(o) == +Ee(s);
214
215
  }
215
- function ln(e, t, o) {
216
- const [n, s] = ce(
217
- o?.in,
216
+ function ln(e, t, n) {
217
+ const [o, s] = le(
218
+ n?.in,
218
219
  e,
219
220
  t
220
- ), r = n.getFullYear() - s.getFullYear(), i = n.getMonth() - s.getMonth();
221
+ ), r = o.getFullYear() - s.getFullYear(), i = o.getMonth() - s.getMonth();
221
222
  return r * 12 + i;
222
223
  }
223
224
  function fn(e, t) {
224
- const o = I(e, t?.in), n = o.getMonth();
225
- return o.setFullYear(o.getFullYear(), n + 1, 0), o.setHours(23, 59, 59, 999), o;
225
+ const n = I(e, t?.in), o = n.getMonth();
226
+ return n.setFullYear(n.getFullYear(), o + 1, 0), n.setHours(23, 59, 59, 999), n;
226
227
  }
227
228
  function dn(e, t) {
228
- const [o, n] = ce(e, t.start, t.end);
229
- return { start: o, end: n };
229
+ const [n, o] = le(e, t.start, t.end);
230
+ return { start: n, end: o };
230
231
  }
231
232
  function un(e, t) {
232
- const { start: o, end: n } = dn(t?.in, e);
233
- let s = +o > +n;
234
- const r = s ? +o : +n, i = s ? n : o;
233
+ const { start: n, end: o } = dn(t?.in, e);
234
+ let s = +n > +o;
235
+ const r = s ? +n : +o, i = s ? o : n;
235
236
  i.setHours(0, 0, 0, 0), i.setDate(1);
236
237
  let a = 1;
237
238
  const c = [];
238
239
  for (; +i <= r; )
239
- c.push(L(o, i)), i.setMonth(i.getMonth() + a);
240
+ c.push(L(n, i)), i.setMonth(i.getMonth() + a);
240
241
  return s ? c.reverse() : c;
241
242
  }
242
243
  function hn(e, t) {
243
- const o = I(e, t?.in);
244
- return o.setDate(1), o.setHours(0, 0, 0, 0), o;
244
+ const n = I(e, t?.in);
245
+ return n.setDate(1), n.setHours(0, 0, 0, 0), n;
245
246
  }
246
247
  function mn(e, t) {
247
- const o = I(e, t?.in), n = o.getFullYear();
248
- return o.setFullYear(n + 1, 0, 0), o.setHours(23, 59, 59, 999), o;
248
+ const n = I(e, t?.in), o = n.getFullYear();
249
+ return n.setFullYear(o + 1, 0, 0), n.setHours(23, 59, 59, 999), n;
249
250
  }
250
251
  function Je(e, t) {
251
- const o = qt(), n = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? o.weekStartsOn ?? o.locale?.options?.weekStartsOn ?? 0, s = I(e, t?.in), r = s.getDay(), i = (r < n ? -7 : 0) + 6 - (r - n);
252
+ const n = qt(), o = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, s = I(e, t?.in), r = s.getDay(), i = (r < o ? -7 : 0) + 6 - (r - o);
252
253
  return s.setDate(s.getDate() + i), s.setHours(23, 59, 59, 999), s;
253
254
  }
254
255
  function yn(e, t) {
255
256
  return Je(e, { ...t, weekStartsOn: 1 });
256
257
  }
257
258
  function pn(e, t) {
258
- const o = I(e, t?.in), n = o.getFullYear(), s = o.getMonth(), r = L(o, 0);
259
- return r.setFullYear(n, s + 1, 0), r.setHours(0, 0, 0, 0), r.getDate();
259
+ const n = I(e, t?.in), o = n.getFullYear(), s = n.getMonth(), r = L(n, 0);
260
+ return r.setFullYear(o, s + 1, 0), r.setHours(0, 0, 0, 0), r.getDate();
260
261
  }
261
- function kn(e, t) {
262
+ function Mn(e, t) {
262
263
  return I(e, t?.in).getMonth();
263
264
  }
264
- function Mn(e, t) {
265
+ function Dn(e, t) {
265
266
  return I(e, t?.in).getFullYear();
266
267
  }
267
- function Dn(e, t) {
268
+ function kn(e, t) {
268
269
  return +I(e) > +I(t);
269
270
  }
270
271
  function bn(e, t) {
271
272
  return +I(e) < +I(t);
272
273
  }
273
- function wn(e, t, o) {
274
- const [n, s] = ce(
275
- o?.in,
274
+ function wn(e, t, n) {
275
+ const [o, s] = le(
276
+ n?.in,
276
277
  e,
277
278
  t
278
279
  );
279
- return n.getFullYear() === s.getFullYear() && n.getMonth() === s.getMonth();
280
+ return o.getFullYear() === s.getFullYear() && o.getMonth() === s.getMonth();
280
281
  }
281
- function vn(e, t, o) {
282
- const [n, s] = ce(
283
- o?.in,
282
+ function vn(e, t, n) {
283
+ const [o, s] = le(
284
+ n?.in,
284
285
  e,
285
286
  t
286
287
  );
287
- return n.getFullYear() === s.getFullYear();
288
+ return o.getFullYear() === s.getFullYear();
288
289
  }
289
- function On(e, t, o) {
290
- const n = I(e, o?.in), s = n.getFullYear(), r = n.getDate(), i = L(e, 0);
290
+ function gn(e, t, n) {
291
+ const o = I(e, n?.in), s = o.getFullYear(), r = o.getDate(), i = L(e, 0);
291
292
  i.setFullYear(s, t, 15), i.setHours(0, 0, 0, 0);
292
293
  const a = pn(i);
293
- return n.setMonth(t, Math.min(r, a)), n;
294
+ return o.setMonth(t, Math.min(r, a)), o;
294
295
  }
295
- function gn(e, t, o) {
296
- const n = I(e, o?.in);
297
- return isNaN(+n) ? L(e, NaN) : (n.setFullYear(t), n);
296
+ function On(e, t, n) {
297
+ const o = I(e, n?.in);
298
+ return isNaN(+o) ? L(e, NaN) : (o.setFullYear(t), o);
298
299
  }
299
300
  const je = 5, _n = 4;
300
301
  function Cn(e, t) {
301
- const o = t.startOfMonth(e), n = o.getDay() > 0 ? o.getDay() : 7, s = t.addDays(e, -n + 1), r = t.addDays(s, je * 7 - 1);
302
+ const n = t.startOfMonth(e), o = n.getDay() > 0 ? n.getDay() : 7, s = t.addDays(e, -o + 1), r = t.addDays(s, je * 7 - 1);
302
303
  return t.getMonth(e) === t.getMonth(r) ? je : _n;
303
304
  }
304
305
  function Qe(e, t) {
305
- const o = t.startOfMonth(e), n = o.getDay();
306
- return n === 1 ? o : n === 0 ? t.addDays(o, -6) : t.addDays(o, -1 * (n - 1));
306
+ const n = t.startOfMonth(e), o = n.getDay();
307
+ return o === 1 ? n : o === 0 ? t.addDays(n, -6) : t.addDays(n, -1 * (o - 1));
307
308
  }
308
309
  function Wn(e, t) {
309
- const o = Qe(e, t), n = Cn(e, t);
310
- return t.addDays(o, n * 7 - 1);
310
+ const n = Qe(e, t), o = Cn(e, t);
311
+ return t.addDays(n, o * 7 - 1);
311
312
  }
312
313
  class ee {
313
314
  /**
@@ -316,11 +317,11 @@ class ee {
316
317
  * @param options Configuration options for the date library.
317
318
  * @param overrides Custom overrides for the date library functions.
318
319
  */
319
- constructor(t, o) {
320
- this.Date = Date, this.today = () => this.overrides?.today ? this.overrides.today() : this.options.timeZone ? F.tz(this.options.timeZone) : new this.Date(), this.newDate = (n, s, r) => this.overrides?.newDate ? this.overrides.newDate(n, s, r) : this.options.timeZone ? new F(n, s, r, this.options.timeZone) : new Date(n, s, r), this.addDays = (n, s) => this.overrides?.addDays ? this.overrides.addDays(n, s) : Ge(n, s), this.addMonths = (n, s) => this.overrides?.addMonths ? this.overrides.addMonths(n, s) : Ve(n, s), this.addWeeks = (n, s) => this.overrides?.addWeeks ? this.overrides.addWeeks(n, s) : on(n, s), this.addYears = (n, s) => this.overrides?.addYears ? this.overrides.addYears(n, s) : sn(n, s), this.differenceInCalendarDays = (n, s) => this.overrides?.differenceInCalendarDays ? this.overrides.differenceInCalendarDays(n, s) : Rt(n, s), this.differenceInCalendarMonths = (n, s) => this.overrides?.differenceInCalendarMonths ? this.overrides.differenceInCalendarMonths(n, s) : ln(n, s), this.eachMonthOfInterval = (n) => this.overrides?.eachMonthOfInterval ? this.overrides.eachMonthOfInterval(n) : un(n), this.endOfBroadcastWeek = (n) => this.overrides?.endOfBroadcastWeek ? this.overrides.endOfBroadcastWeek(n) : Wn(n, this), this.endOfISOWeek = (n) => this.overrides?.endOfISOWeek ? this.overrides.endOfISOWeek(n) : yn(n), this.endOfMonth = (n) => this.overrides?.endOfMonth ? this.overrides.endOfMonth(n) : fn(n), this.endOfWeek = (n, s) => this.overrides?.endOfWeek ? this.overrides.endOfWeek(n, s) : Je(n, this.options), this.endOfYear = (n) => this.overrides?.endOfYear ? this.overrides.endOfYear(n) : mn(n), this.format = (n, s, r) => {
321
- const i = this.overrides?.format ? this.overrides.format(n, s, this.options) : Ut(n, s, this.options);
320
+ constructor(t, n) {
321
+ this.Date = Date, this.today = () => this.overrides?.today ? this.overrides.today() : this.options.timeZone ? F.tz(this.options.timeZone) : new this.Date(), this.newDate = (o, s, r) => this.overrides?.newDate ? this.overrides.newDate(o, s, r) : this.options.timeZone ? new F(o, s, r, this.options.timeZone) : new Date(o, s, r), this.addDays = (o, s) => this.overrides?.addDays ? this.overrides.addDays(o, s) : Ge(o, s), this.addMonths = (o, s) => this.overrides?.addMonths ? this.overrides.addMonths(o, s) : Ve(o, s), this.addWeeks = (o, s) => this.overrides?.addWeeks ? this.overrides.addWeeks(o, s) : on(o, s), this.addYears = (o, s) => this.overrides?.addYears ? this.overrides.addYears(o, s) : sn(o, s), this.differenceInCalendarDays = (o, s) => this.overrides?.differenceInCalendarDays ? this.overrides.differenceInCalendarDays(o, s) : Rt(o, s), this.differenceInCalendarMonths = (o, s) => this.overrides?.differenceInCalendarMonths ? this.overrides.differenceInCalendarMonths(o, s) : ln(o, s), this.eachMonthOfInterval = (o) => this.overrides?.eachMonthOfInterval ? this.overrides.eachMonthOfInterval(o) : un(o), this.endOfBroadcastWeek = (o) => this.overrides?.endOfBroadcastWeek ? this.overrides.endOfBroadcastWeek(o) : Wn(o, this), this.endOfISOWeek = (o) => this.overrides?.endOfISOWeek ? this.overrides.endOfISOWeek(o) : yn(o), this.endOfMonth = (o) => this.overrides?.endOfMonth ? this.overrides.endOfMonth(o) : fn(o), this.endOfWeek = (o, s) => this.overrides?.endOfWeek ? this.overrides.endOfWeek(o, s) : Je(o, this.options), this.endOfYear = (o) => this.overrides?.endOfYear ? this.overrides.endOfYear(o) : mn(o), this.format = (o, s, r) => {
322
+ const i = this.overrides?.format ? this.overrides.format(o, s, this.options) : Ut(o, s, this.options);
322
323
  return this.options.numerals && this.options.numerals !== "latn" ? this.replaceDigits(i) : i;
323
- }, this.getISOWeek = (n) => this.overrides?.getISOWeek ? this.overrides.getISOWeek(n) : Gt(n), this.getMonth = (n, s) => this.overrides?.getMonth ? this.overrides.getMonth(n, this.options) : kn(n, this.options), this.getYear = (n, s) => this.overrides?.getYear ? this.overrides.getYear(n, this.options) : Mn(n, this.options), this.getWeek = (n, s) => this.overrides?.getWeek ? this.overrides.getWeek(n, this.options) : Kt(n, this.options), this.isAfter = (n, s) => this.overrides?.isAfter ? this.overrides.isAfter(n, s) : Dn(n, s), this.isBefore = (n, s) => this.overrides?.isBefore ? this.overrides.isBefore(n, s) : bn(n, s), this.isDate = (n) => this.overrides?.isDate ? this.overrides.isDate(n) : Lt(n), this.isSameDay = (n, s) => this.overrides?.isSameDay ? this.overrides.isSameDay(n, s) : cn(n, s), this.isSameMonth = (n, s) => this.overrides?.isSameMonth ? this.overrides.isSameMonth(n, s) : wn(n, s), this.isSameYear = (n, s) => this.overrides?.isSameYear ? this.overrides.isSameYear(n, s) : vn(n, s), this.max = (n) => this.overrides?.max ? this.overrides.max(n) : rn(n), this.min = (n) => this.overrides?.min ? this.overrides.min(n) : an(n), this.setMonth = (n, s) => this.overrides?.setMonth ? this.overrides.setMonth(n, s) : On(n, s), this.setYear = (n, s) => this.overrides?.setYear ? this.overrides.setYear(n, s) : gn(n, s), this.startOfBroadcastWeek = (n, s) => this.overrides?.startOfBroadcastWeek ? this.overrides.startOfBroadcastWeek(n, this) : Qe(n, this), this.startOfDay = (n) => this.overrides?.startOfDay ? this.overrides.startOfDay(n) : Ee(n), this.startOfISOWeek = (n) => this.overrides?.startOfISOWeek ? this.overrides.startOfISOWeek(n) : Vt(n), this.startOfMonth = (n) => this.overrides?.startOfMonth ? this.overrides.startOfMonth(n) : hn(n), this.startOfWeek = (n, s) => this.overrides?.startOfWeek ? this.overrides.startOfWeek(n, this.options) : Jt(n, this.options), this.startOfYear = (n) => this.overrides?.startOfYear ? this.overrides.startOfYear(n) : Qt(n), this.options = { locale: Ke, ...t }, this.overrides = o;
324
+ }, this.getISOWeek = (o) => this.overrides?.getISOWeek ? this.overrides.getISOWeek(o) : Gt(o), this.getMonth = (o, s) => this.overrides?.getMonth ? this.overrides.getMonth(o, this.options) : Mn(o, this.options), this.getYear = (o, s) => this.overrides?.getYear ? this.overrides.getYear(o, this.options) : Dn(o, this.options), this.getWeek = (o, s) => this.overrides?.getWeek ? this.overrides.getWeek(o, this.options) : Kt(o, this.options), this.isAfter = (o, s) => this.overrides?.isAfter ? this.overrides.isAfter(o, s) : kn(o, s), this.isBefore = (o, s) => this.overrides?.isBefore ? this.overrides.isBefore(o, s) : bn(o, s), this.isDate = (o) => this.overrides?.isDate ? this.overrides.isDate(o) : Lt(o), this.isSameDay = (o, s) => this.overrides?.isSameDay ? this.overrides.isSameDay(o, s) : cn(o, s), this.isSameMonth = (o, s) => this.overrides?.isSameMonth ? this.overrides.isSameMonth(o, s) : wn(o, s), this.isSameYear = (o, s) => this.overrides?.isSameYear ? this.overrides.isSameYear(o, s) : vn(o, s), this.max = (o) => this.overrides?.max ? this.overrides.max(o) : rn(o), this.min = (o) => this.overrides?.min ? this.overrides.min(o) : an(o), this.setMonth = (o, s) => this.overrides?.setMonth ? this.overrides.setMonth(o, s) : gn(o, s), this.setYear = (o, s) => this.overrides?.setYear ? this.overrides.setYear(o, s) : On(o, s), this.startOfBroadcastWeek = (o, s) => this.overrides?.startOfBroadcastWeek ? this.overrides.startOfBroadcastWeek(o, this) : Qe(o, this), this.startOfDay = (o) => this.overrides?.startOfDay ? this.overrides.startOfDay(o) : Ee(o), this.startOfISOWeek = (o) => this.overrides?.startOfISOWeek ? this.overrides.startOfISOWeek(o) : Vt(o), this.startOfMonth = (o) => this.overrides?.startOfMonth ? this.overrides.startOfMonth(o) : hn(o), this.startOfWeek = (o, s) => this.overrides?.startOfWeek ? this.overrides.startOfWeek(o, this.options) : Jt(o, this.options), this.startOfYear = (o) => this.overrides?.startOfYear ? this.overrides.startOfYear(o) : Qt(o), this.options = { locale: Ke, ...t }, this.overrides = n;
324
325
  }
325
326
  /**
326
327
  * Generates a mapping of Arabic digits (0-9) to the target numbering system
@@ -330,12 +331,12 @@ class ee {
330
331
  * @returns A record mapping Arabic digits to the target numerals.
331
332
  */
332
333
  getDigitMap() {
333
- const { numerals: t = "latn" } = this.options, o = new Intl.NumberFormat("en-US", {
334
+ const { numerals: t = "latn" } = this.options, n = new Intl.NumberFormat("en-US", {
334
335
  numberingSystem: t
335
- }), n = {};
336
+ }), o = {};
336
337
  for (let s = 0; s < 10; s++)
337
- n[s.toString()] = o.format(s);
338
- return n;
338
+ o[s.toString()] = n.format(s);
339
+ return o;
339
340
  }
340
341
  /**
341
342
  * Replaces Arabic digits in a string with the target numbering system digits.
@@ -345,8 +346,8 @@ class ee {
345
346
  * @returns The string with digits replaced.
346
347
  */
347
348
  replaceDigits(t) {
348
- const o = this.getDigitMap();
349
- return t.replace(/\d/g, (n) => o[n] || n);
349
+ const n = this.getDigitMap();
350
+ return t.replace(/\d/g, (o) => n[o] || o);
350
351
  }
351
352
  /**
352
353
  * Formats a number using the configured numbering system.
@@ -361,8 +362,8 @@ class ee {
361
362
  }
362
363
  const V = new ee();
363
364
  class Xe {
364
- constructor(t, o, n = V) {
365
- this.date = t, this.displayMonth = o, this.outside = !!(o && !n.isSameMonth(t, o)), this.dateLib = n;
365
+ constructor(t, n, o = V) {
366
+ this.date = t, this.displayMonth = n, this.outside = !!(n && !o.isSameMonth(t, n)), this.dateLib = o;
366
367
  }
367
368
  /**
368
369
  * Checks if this day is equal to another `CalendarDay`, considering both the
@@ -376,19 +377,19 @@ class Xe {
376
377
  }
377
378
  }
378
379
  class Nn {
379
- constructor(t, o) {
380
- this.date = t, this.weeks = o;
380
+ constructor(t, n) {
381
+ this.date = t, this.weeks = n;
381
382
  }
382
383
  }
383
384
  class Sn {
384
- constructor(t, o) {
385
- this.days = o, this.weekNumber = t;
385
+ constructor(t, n) {
386
+ this.days = n, this.weekNumber = t;
386
387
  }
387
388
  }
388
- function Q(e, t, o = !1, n = V) {
389
+ function Q(e, t, n = !1, o = V) {
389
390
  let { from: s, to: r } = e;
390
- const { differenceInCalendarDays: i, isSameDay: a } = n;
391
- return s && r ? (i(r, s) < 0 && ([s, r] = [r, s]), i(t, s) >= (o ? 1 : 0) && i(r, t) >= (o ? 1 : 0)) : !o && r ? a(r, t) : !o && s ? a(s, t) : !1;
391
+ const { differenceInCalendarDays: i, isSameDay: a } = o;
392
+ return s && r ? (i(r, s) < 0 && ([s, r] = [r, s]), i(t, s) >= (n ? 1 : 0) && i(r, t) >= (n ? 1 : 0)) : !n && r ? a(r, t) : !n && s ? a(s, t) : !1;
392
393
  }
393
394
  function et(e) {
394
395
  return !!(e && typeof e == "object" && "before" in e && "after" in e);
@@ -408,28 +409,28 @@ function ot(e) {
408
409
  function st(e, t) {
409
410
  return Array.isArray(e) && e.every(t.isDate);
410
411
  }
411
- function X(e, t, o = V) {
412
- const n = Array.isArray(t) ? t : [t], { isSameDay: s, differenceInCalendarDays: r, isAfter: i } = o;
413
- return n.some((a) => {
412
+ function X(e, t, n = V) {
413
+ const o = Array.isArray(t) ? t : [t], { isSameDay: s, differenceInCalendarDays: r, isAfter: i } = n;
414
+ return o.some((a) => {
414
415
  if (typeof a == "boolean")
415
416
  return a;
416
- if (o.isDate(a))
417
+ if (n.isDate(a))
417
418
  return s(e, a);
418
- if (st(a, o))
419
+ if (st(a, n))
419
420
  return a.includes(e);
420
421
  if (Ye(a))
421
- return Q(a, e, !1, o);
422
+ return Q(a, e, !1, n);
422
423
  if (ot(a))
423
424
  return Array.isArray(a.dayOfWeek) ? a.dayOfWeek.includes(e.getDay()) : a.dayOfWeek === e.getDay();
424
425
  if (et(a)) {
425
- const c = r(a.before, e), l = r(a.after, e), u = c > 0, f = l < 0;
426
- return i(a.before, a.after) ? f && u : u || f;
426
+ const c = r(a.before, e), l = r(a.after, e), h = c > 0, f = l < 0;
427
+ return i(a.before, a.after) ? f && h : h || f;
427
428
  }
428
429
  return tt(a) ? r(e, a.after) > 0 : nt(a) ? r(a.before, e) > 0 : typeof a == "function" ? a(e) : !1;
429
430
  });
430
431
  }
431
- function En(e, t, o, n, s) {
432
- const { disabled: r, hidden: i, modifiers: a, showOutsideDays: c, broadcastCalendar: l, today: u } = t, { isSameDay: f, isSameMonth: h, startOfMonth: p, isBefore: w, endOfMonth: g, isAfter: D } = s, O = o && p(o), W = n && g(n), k = {
432
+ function En(e, t, n, o, s) {
433
+ const { disabled: r, hidden: i, modifiers: a, showOutsideDays: c, broadcastCalendar: l, today: h } = t, { isSameDay: f, isSameMonth: u, startOfMonth: p, isBefore: w, endOfMonth: O, isAfter: k } = s, g = n && p(n), W = o && O(o), M = {
433
434
  [T.focused]: [],
434
435
  [T.outside]: [],
435
436
  [T.disabled]: [],
@@ -437,9 +438,9 @@ function En(e, t, o, n, s) {
437
438
  [T.today]: []
438
439
  }, S = {};
439
440
  for (const y of e) {
440
- const { date: b, displayMonth: M } = y, _ = !!(M && !h(b, M)), Y = !!(O && w(b, O)), $ = !!(W && D(b, W)), P = !!(r && X(b, r, s)), Z = !!(i && X(b, i, s)) || Y || $ || // Broadcast calendar will show outside days as default
441
- !l && !c && _ || l && c === !1 && _, oe = f(b, u ?? s.today());
442
- _ && k.outside.push(y), P && k.disabled.push(y), Z && k.hidden.push(y), oe && k.today.push(y), a && Object.keys(a).forEach((se) => {
441
+ const { date: b, displayMonth: D } = y, _ = !!(D && !u(b, D)), Y = !!(g && w(b, g)), $ = !!(W && k(b, W)), P = !!(r && X(b, r, s)), Z = !!(i && X(b, i, s)) || Y || $ || // Broadcast calendar will show outside days as default
442
+ !l && !c && _ || l && c === !1 && _, oe = f(b, h ?? s.today());
443
+ _ && M.outside.push(y), P && M.disabled.push(y), Z && M.hidden.push(y), oe && M.today.push(y), a && Object.keys(a).forEach((se) => {
443
444
  const re = a?.[se];
444
445
  re && X(b, re, s) && (S[se] ? S[se].push(y) : S[se] = [y]);
445
446
  });
@@ -451,22 +452,22 @@ function En(e, t, o, n, s) {
451
452
  [T.hidden]: !1,
452
453
  [T.outside]: !1,
453
454
  [T.today]: !1
454
- }, M = {};
455
- for (const _ in k) {
456
- const Y = k[_];
455
+ }, D = {};
456
+ for (const _ in M) {
457
+ const Y = M[_];
457
458
  b[_] = Y.some(($) => $ === y);
458
459
  }
459
460
  for (const _ in S)
460
- M[_] = S[_].some((Y) => Y === y);
461
+ D[_] = S[_].some((Y) => Y === y);
461
462
  return {
462
463
  ...b,
463
464
  // custom modifiers should override all the previous ones
464
- ...M
465
+ ...D
465
466
  };
466
467
  };
467
468
  }
468
- function Tn(e, t, o = {}) {
469
- return Object.entries(e).filter(([, s]) => s === !0).reduce((s, [r]) => (o[r] ? s.push(o[r]) : t[T[r]] ? s.push(t[T[r]]) : t[R[r]] && s.push(t[R[r]]), s), [t[m.Day]]);
469
+ function Tn(e, t, n = {}) {
470
+ return Object.entries(e).filter(([, s]) => s === !0).reduce((s, [r]) => (n[r] ? s.push(n[r]) : t[T[r]] ? s.push(t[T[r]]) : t[R[r]] && s.push(t[R[r]]), s), [t[m.Day]]);
470
471
  }
471
472
  function Yn(e) {
472
473
  return d.createElement("button", { ...e });
@@ -475,37 +476,37 @@ function Bn(e) {
475
476
  return d.createElement("span", { ...e });
476
477
  }
477
478
  function xn(e) {
478
- const { size: t = 24, orientation: o = "left", className: n } = e;
479
+ const { size: t = 24, orientation: n = "left", className: o } = e;
479
480
  return d.createElement(
480
481
  "svg",
481
- { className: n, width: t, height: t, viewBox: "0 0 24 24" },
482
- o === "up" && d.createElement("polygon", { points: "6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28" }),
483
- o === "down" && d.createElement("polygon", { points: "6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72" }),
484
- o === "left" && d.createElement("polygon", { points: "16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20" }),
485
- o === "right" && d.createElement("polygon", { points: "8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20" })
482
+ { className: o, width: t, height: t, viewBox: "0 0 24 24" },
483
+ n === "up" && d.createElement("polygon", { points: "6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28" }),
484
+ n === "down" && d.createElement("polygon", { points: "6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72" }),
485
+ n === "left" && d.createElement("polygon", { points: "16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20" }),
486
+ n === "right" && d.createElement("polygon", { points: "8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20" })
486
487
  );
487
488
  }
488
489
  function Fn(e) {
489
- const { day: t, modifiers: o, ...n } = e;
490
- return d.createElement("td", { ...n });
490
+ const { day: t, modifiers: n, ...o } = e;
491
+ return d.createElement("td", { ...o });
491
492
  }
492
493
  function In(e) {
493
- const { day: t, modifiers: o, ...n } = e, s = d.useRef(null);
494
+ const { day: t, modifiers: n, ...o } = e, s = d.useRef(null);
494
495
  return d.useEffect(() => {
495
- o.focused && s.current?.focus();
496
- }, [o.focused]), d.createElement("button", { ref: s, ...n });
496
+ n.focused && s.current?.focus();
497
+ }, [n.focused]), d.createElement("button", { ref: s, ...o });
497
498
  }
498
499
  function $n(e) {
499
- const { options: t, className: o, components: n, classNames: s, ...r } = e, i = [s[m.Dropdown], o].join(" "), a = t?.find(({ value: c }) => c === r.value);
500
+ const { options: t, className: n, components: o, classNames: s, ...r } = e, i = [s[m.Dropdown], n].join(" "), a = t?.find(({ value: c }) => c === r.value);
500
501
  return d.createElement(
501
502
  "span",
502
503
  { "data-disabled": r.disabled, className: s[m.DropdownRoot] },
503
- d.createElement(n.Select, { className: i, ...r }, t?.map(({ value: c, label: l, disabled: u }) => d.createElement(n.Option, { key: c, value: c, disabled: u }, l))),
504
+ d.createElement(o.Select, { className: i, ...r }, t?.map(({ value: c, label: l, disabled: h }) => d.createElement(o.Option, { key: c, value: c, disabled: h }, l))),
504
505
  d.createElement(
505
506
  "span",
506
507
  { className: s[m.CaptionLabel], "aria-hidden": !0 },
507
508
  a?.label,
508
- d.createElement(n.Chevron, { orientation: "down", size: 18, className: s[m.Chevron] })
509
+ d.createElement(o.Chevron, { orientation: "down", size: 18, className: s[m.Chevron] })
509
510
  )
510
511
  );
511
512
  }
@@ -516,12 +517,12 @@ function An(e) {
516
517
  return d.createElement("div", { ...e });
517
518
  }
518
519
  function Hn(e) {
519
- const { calendarMonth: t, displayIndex: o, ...n } = e;
520
- return d.createElement("div", { ...n }, e.children);
520
+ const { calendarMonth: t, displayIndex: n, ...o } = e;
521
+ return d.createElement("div", { ...o }, e.children);
521
522
  }
522
523
  function Zn(e) {
523
- const { calendarMonth: t, displayIndex: o, ...n } = e;
524
- return d.createElement("div", { ...n });
524
+ const { calendarMonth: t, displayIndex: n, ...o } = e;
525
+ return d.createElement("div", { ...o });
525
526
  }
526
527
  function jn(e) {
527
528
  return d.createElement("table", { ...e });
@@ -530,58 +531,58 @@ function zn(e) {
530
531
  return d.createElement("div", { ...e });
531
532
  }
532
533
  const rt = At(void 0);
533
- function le() {
534
+ function fe() {
534
535
  const e = Ht(rt);
535
536
  if (e === void 0)
536
537
  throw new Error("useDayPicker() must be used within a custom component.");
537
538
  return e;
538
539
  }
539
540
  function qn(e) {
540
- const { components: t } = le();
541
+ const { components: t } = fe();
541
542
  return d.createElement(t.Dropdown, { ...e });
542
543
  }
543
544
  function Rn(e) {
544
- const { onPreviousClick: t, onNextClick: o, previousMonth: n, nextMonth: s, ...r } = e, { components: i, classNames: a, labels: { labelPrevious: c, labelNext: l } } = le(), u = H((h) => {
545
- s && o?.(h);
546
- }, [s, o]), f = H((h) => {
547
- n && t?.(h);
548
- }, [n, t]);
545
+ const { onPreviousClick: t, onNextClick: n, previousMonth: o, nextMonth: s, ...r } = e, { components: i, classNames: a, labels: { labelPrevious: c, labelNext: l } } = fe(), h = H((u) => {
546
+ s && n?.(u);
547
+ }, [s, n]), f = H((u) => {
548
+ o && t?.(u);
549
+ }, [o, t]);
549
550
  return d.createElement(
550
551
  "nav",
551
552
  { ...r },
552
553
  d.createElement(
553
554
  i.PreviousMonthButton,
554
- { type: "button", className: a[m.PreviousMonthButton], tabIndex: n ? void 0 : -1, "aria-disabled": n ? void 0 : !0, "aria-label": c(n), onClick: f },
555
- d.createElement(i.Chevron, { disabled: n ? void 0 : !0, className: a[m.Chevron], orientation: "left" })
555
+ { type: "button", className: a[m.PreviousMonthButton], tabIndex: o ? void 0 : -1, "aria-disabled": o ? void 0 : !0, "aria-label": c(o), onClick: f },
556
+ d.createElement(i.Chevron, { disabled: o ? void 0 : !0, className: a[m.Chevron], orientation: "left" })
556
557
  ),
557
558
  d.createElement(
558
559
  i.NextMonthButton,
559
- { type: "button", className: a[m.NextMonthButton], tabIndex: s ? void 0 : -1, "aria-disabled": s ? void 0 : !0, "aria-label": l(s), onClick: u },
560
+ { type: "button", className: a[m.NextMonthButton], tabIndex: s ? void 0 : -1, "aria-disabled": s ? void 0 : !0, "aria-label": l(s), onClick: h },
560
561
  d.createElement(i.Chevron, { disabled: s ? void 0 : !0, orientation: "right", className: a[m.Chevron] })
561
562
  )
562
563
  );
563
564
  }
564
565
  function Un(e) {
565
- const { components: t } = le();
566
+ const { components: t } = fe();
566
567
  return d.createElement(t.Button, { ...e });
567
568
  }
568
569
  function Gn(e) {
569
570
  return d.createElement("option", { ...e });
570
571
  }
571
572
  function Kn(e) {
572
- const { components: t } = le();
573
+ const { components: t } = fe();
573
574
  return d.createElement(t.Button, { ...e });
574
575
  }
575
576
  function Ln(e) {
576
- const { rootRef: t, ...o } = e;
577
- return d.createElement("div", { ...o, ref: t });
577
+ const { rootRef: t, ...n } = e;
578
+ return d.createElement("div", { ...n, ref: t });
578
579
  }
579
580
  function Vn(e) {
580
581
  return d.createElement("select", { ...e });
581
582
  }
582
583
  function Jn(e) {
583
- const { week: t, ...o } = e;
584
- return d.createElement("tr", { ...o });
584
+ const { week: t, ...n } = e;
585
+ return d.createElement("tr", { ...n });
585
586
  }
586
587
  function Qn(e) {
587
588
  return d.createElement("th", { ...e });
@@ -594,8 +595,8 @@ function Xn(e) {
594
595
  );
595
596
  }
596
597
  function eo(e) {
597
- const { week: t, ...o } = e;
598
- return d.createElement("th", { ...o });
598
+ const { week: t, ...n } = e;
599
+ return d.createElement("th", { ...n });
599
600
  }
600
601
  function to(e) {
601
602
  return d.createElement("th", { ...e });
@@ -604,7 +605,7 @@ function no(e) {
604
605
  return d.createElement("tbody", { ...e });
605
606
  }
606
607
  function oo(e) {
607
- const { components: t } = le();
608
+ const { components: t } = fe();
608
609
  return d.createElement(t.Dropdown, { ...e });
609
610
  }
610
611
  const so = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
@@ -651,8 +652,8 @@ function ao(e) {
651
652
  "data-broadcast-calendar": e.broadcastCalendar || void 0,
652
653
  "data-nav-layout": e.navLayout || void 0
653
654
  };
654
- return Object.entries(e).forEach(([o, n]) => {
655
- o.startsWith("data-") && (t[o] = n);
655
+ return Object.entries(e).forEach(([n, o]) => {
656
+ n.startsWith("data-") && (t[n] = o);
656
657
  }), t;
657
658
  }
658
659
  function at() {
@@ -667,12 +668,12 @@ function at() {
667
668
  e[A[t]] = `rdp-${A[t]}`;
668
669
  return e;
669
670
  }
670
- function it(e, t, o) {
671
- return (o ?? new ee(t)).format(e, "LLLL y");
671
+ function it(e, t, n) {
672
+ return (n ?? new ee(t)).format(e, "LLLL y");
672
673
  }
673
674
  const io = it;
674
- function co(e, t, o) {
675
- return (o ?? new ee(t)).format(e, "d");
675
+ function co(e, t, n) {
676
+ return (n ?? new ee(t)).format(e, "d");
676
677
  }
677
678
  function lo(e, t = V) {
678
679
  return t.format(e, "LLLL");
@@ -683,8 +684,8 @@ function fo(e, t = V) {
683
684
  function uo() {
684
685
  return "";
685
686
  }
686
- function ho(e, t, o) {
687
- return (o ?? new ee(t)).format(e, "cccccc");
687
+ function ho(e, t, n) {
688
+ return (n ?? new ee(t)).format(e, "cccccc");
688
689
  }
689
690
  function ct(e, t = V) {
690
691
  return t.format(e, "yyyy");
@@ -707,63 +708,63 @@ function po(e) {
707
708
  ...e
708
709
  };
709
710
  }
710
- function ko(e, t, o, n, s) {
711
+ function Mo(e, t, n, o, s) {
711
712
  const { startOfMonth: r, startOfYear: i, endOfYear: a, eachMonthOfInterval: c, getMonth: l } = s;
712
713
  return c({
713
714
  start: i(e),
714
715
  end: a(e)
715
- }).map((h) => {
716
- const p = n.formatMonthDropdown(h, s), w = l(h), g = t && h < r(t) || o && h > r(o) || !1;
717
- return { value: w, label: p, disabled: g };
716
+ }).map((u) => {
717
+ const p = o.formatMonthDropdown(u, s), w = l(u), O = t && u < r(t) || n && u > r(n) || !1;
718
+ return { value: w, label: p, disabled: O };
718
719
  });
719
720
  }
720
- function Mo(e, t = {}, o = {}) {
721
- let n = { ...t?.[m.Day] };
721
+ function Do(e, t = {}, n = {}) {
722
+ let o = { ...t?.[m.Day] };
722
723
  return Object.entries(e).filter(([, s]) => s === !0).forEach(([s]) => {
723
- n = {
724
- ...n,
725
- ...o?.[s]
724
+ o = {
725
+ ...o,
726
+ ...n?.[s]
726
727
  };
727
- }), n;
728
+ }), o;
728
729
  }
729
- function Do(e, t, o) {
730
- const n = e.today(), s = t ? e.startOfISOWeek(n) : e.startOfWeek(n), r = [];
730
+ function ko(e, t, n) {
731
+ const o = e.today(), s = t ? e.startOfISOWeek(o) : e.startOfWeek(o), r = [];
731
732
  for (let i = 0; i < 7; i++) {
732
733
  const a = e.addDays(s, i);
733
734
  r.push(a);
734
735
  }
735
736
  return r;
736
737
  }
737
- function bo(e, t, o, n) {
738
+ function bo(e, t, n, o) {
738
739
  if (!e || !t)
739
740
  return;
740
- const { startOfYear: s, endOfYear: r, addYears: i, getYear: a, isBefore: c, isSameYear: l } = n, u = s(e), f = r(t), h = [];
741
- let p = u;
741
+ const { startOfYear: s, endOfYear: r, addYears: i, getYear: a, isBefore: c, isSameYear: l } = o, h = s(e), f = r(t), u = [];
742
+ let p = h;
742
743
  for (; c(p, f) || l(p, f); )
743
- h.push(p), p = i(p, 1);
744
- return h.map((w) => {
745
- const g = o.formatYearDropdown(w, n);
744
+ u.push(p), p = i(p, 1);
745
+ return u.map((w) => {
746
+ const O = n.formatYearDropdown(w, o);
746
747
  return {
747
748
  value: a(w),
748
- label: g,
749
+ label: O,
749
750
  disabled: !1
750
751
  };
751
752
  });
752
753
  }
753
- function lt(e, t, o) {
754
- return (o ?? new ee(t)).format(e, "LLLL y");
754
+ function lt(e, t, n) {
755
+ return (n ?? new ee(t)).format(e, "LLLL y");
755
756
  }
756
757
  const wo = lt;
757
- function vo(e, t, o, n) {
758
- let s = (n ?? new ee(o)).format(e, "PPPP");
758
+ function vo(e, t, n, o) {
759
+ let s = (o ?? new ee(n)).format(e, "PPPP");
759
760
  return t?.today && (s = `Today, ${s}`), s;
760
761
  }
761
- function ft(e, t, o, n) {
762
- let s = (n ?? new ee(o)).format(e, "PPPP");
762
+ function ft(e, t, n, o) {
763
+ let s = (o ?? new ee(n)).format(e, "PPPP");
763
764
  return t.today && (s = `Today, ${s}`), t.selected && (s = `${s}, selected`), s;
764
765
  }
765
- const Oo = ft;
766
- function go() {
766
+ const go = ft;
767
+ function Oo() {
767
768
  return "";
768
769
  }
769
770
  function _o(e) {
@@ -775,8 +776,8 @@ function Co(e) {
775
776
  function Wo(e) {
776
777
  return "Go to the Previous Month";
777
778
  }
778
- function No(e, t, o) {
779
- return (o ?? new ee(t)).format(e, "cccc");
779
+ function No(e, t, n) {
780
+ return (n ?? new ee(t)).format(e, "cccc");
780
781
  }
781
782
  function So(e, t) {
782
783
  return `Week ${e}`;
@@ -790,78 +791,78 @@ function To(e) {
790
791
  const Yo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
791
792
  __proto__: null,
792
793
  labelCaption: wo,
793
- labelDay: Oo,
794
+ labelDay: go,
794
795
  labelDayButton: ft,
795
796
  labelGrid: lt,
796
797
  labelGridcell: vo,
797
798
  labelMonthDropdown: _o,
798
- labelNav: go,
799
+ labelNav: Oo,
799
800
  labelNext: Co,
800
801
  labelPrevious: Wo,
801
802
  labelWeekNumber: So,
802
803
  labelWeekNumberHeader: Eo,
803
804
  labelWeekday: No,
804
805
  labelYearDropdown: To
805
- }, Symbol.toStringTag, { value: "Module" })), fe = (e) => e instanceof HTMLElement ? e : null, We = (e) => [
806
+ }, Symbol.toStringTag, { value: "Module" })), de = (e) => e instanceof HTMLElement ? e : null, We = (e) => [
806
807
  ...e.querySelectorAll("[data-animated-month]") ?? []
807
- ], Bo = (e) => fe(e.querySelector("[data-animated-month]")), Ne = (e) => fe(e.querySelector("[data-animated-caption]")), Se = (e) => fe(e.querySelector("[data-animated-weeks]")), xo = (e) => fe(e.querySelector("[data-animated-nav]")), Fo = (e) => fe(e.querySelector("[data-animated-weekdays]"));
808
- function Io(e, t, { classNames: o, months: n, focused: s, dateLib: r }) {
809
- const i = ye(null), a = ye(n), c = ye(!1);
808
+ ], Bo = (e) => de(e.querySelector("[data-animated-month]")), Ne = (e) => de(e.querySelector("[data-animated-caption]")), Se = (e) => de(e.querySelector("[data-animated-weeks]")), xo = (e) => de(e.querySelector("[data-animated-nav]")), Fo = (e) => de(e.querySelector("[data-animated-weekdays]"));
809
+ function Io(e, t, { classNames: n, months: o, focused: s, dateLib: r }) {
810
+ const i = ce(null), a = ce(o), c = ce(!1);
810
811
  Zt(() => {
811
812
  const l = a.current;
812
- if (a.current = n, !t || !e.current || // safety check because the ref can be set to anything by consumers
813
+ if (a.current = o, !t || !e.current || // safety check because the ref can be set to anything by consumers
813
814
  !(e.current instanceof HTMLElement) || // validation required for the animation to work as expected
814
- n.length === 0 || l.length === 0 || n.length !== l.length)
815
+ o.length === 0 || l.length === 0 || o.length !== l.length)
815
816
  return;
816
- const u = r.isSameMonth(n[0].date, l[0].date), f = r.isAfter(n[0].date, l[0].date), h = f ? o[A.caption_after_enter] : o[A.caption_before_enter], p = f ? o[A.weeks_after_enter] : o[A.weeks_before_enter], w = i.current, g = e.current.cloneNode(!0);
817
- if (g instanceof HTMLElement ? (We(g).forEach((k) => {
818
- if (!(k instanceof HTMLElement))
817
+ const h = r.isSameMonth(o[0].date, l[0].date), f = r.isAfter(o[0].date, l[0].date), u = f ? n[A.caption_after_enter] : n[A.caption_before_enter], p = f ? n[A.weeks_after_enter] : n[A.weeks_before_enter], w = i.current, O = e.current.cloneNode(!0);
818
+ if (O instanceof HTMLElement ? (We(O).forEach((M) => {
819
+ if (!(M instanceof HTMLElement))
819
820
  return;
820
- const S = Bo(k);
821
- S && k.contains(S) && k.removeChild(S);
822
- const y = Ne(k);
823
- y && y.classList.remove(h);
824
- const b = Se(k);
821
+ const S = Bo(M);
822
+ S && M.contains(S) && M.removeChild(S);
823
+ const y = Ne(M);
824
+ y && y.classList.remove(u);
825
+ const b = Se(M);
825
826
  b && b.classList.remove(p);
826
- }), i.current = g) : i.current = null, c.current || u || // skip animation if a day is focused because it can cause issues to the animation and is better for a11y
827
+ }), i.current = O) : i.current = null, c.current || h || // skip animation if a day is focused because it can cause issues to the animation and is better for a11y
827
828
  s)
828
829
  return;
829
- const D = w instanceof HTMLElement ? We(w) : [], O = We(e.current);
830
- if (O && O.every((W) => W instanceof HTMLElement) && D && D.every((W) => W instanceof HTMLElement)) {
830
+ const k = w instanceof HTMLElement ? We(w) : [], g = We(e.current);
831
+ if (g && g.every((W) => W instanceof HTMLElement) && k && k.every((W) => W instanceof HTMLElement)) {
831
832
  c.current = !0, e.current.style.isolation = "isolate";
832
833
  const W = xo(e.current);
833
- W && (W.style.zIndex = "1"), O.forEach((k, S) => {
834
- const y = D[S];
834
+ W && (W.style.zIndex = "1"), g.forEach((M, S) => {
835
+ const y = k[S];
835
836
  if (!y)
836
837
  return;
837
- k.style.position = "relative", k.style.overflow = "hidden";
838
- const b = Ne(k);
839
- b && b.classList.add(h);
840
- const M = Se(k);
841
- M && M.classList.add(p);
838
+ M.style.position = "relative", M.style.overflow = "hidden";
839
+ const b = Ne(M);
840
+ b && b.classList.add(u);
841
+ const D = Se(M);
842
+ D && D.classList.add(p);
842
843
  const _ = () => {
843
- c.current = !1, e.current && (e.current.style.isolation = ""), W && (W.style.zIndex = ""), b && b.classList.remove(h), M && M.classList.remove(p), k.style.position = "", k.style.overflow = "", k.contains(y) && k.removeChild(y);
844
+ c.current = !1, e.current && (e.current.style.isolation = ""), W && (W.style.zIndex = ""), b && b.classList.remove(u), D && D.classList.remove(p), M.style.position = "", M.style.overflow = "", M.contains(y) && M.removeChild(y);
844
845
  };
845
846
  y.style.pointerEvents = "none", y.style.position = "absolute", y.style.overflow = "hidden", y.setAttribute("aria-hidden", "true");
846
847
  const Y = Fo(y);
847
848
  Y && (Y.style.opacity = "0");
848
849
  const $ = Ne(y);
849
- $ && ($.classList.add(f ? o[A.caption_before_exit] : o[A.caption_after_exit]), $.addEventListener("animationend", _));
850
+ $ && ($.classList.add(f ? n[A.caption_before_exit] : n[A.caption_after_exit]), $.addEventListener("animationend", _));
850
851
  const P = Se(y);
851
- P && P.classList.add(f ? o[A.weeks_before_exit] : o[A.weeks_after_exit]), k.insertBefore(y, k.firstChild);
852
+ P && P.classList.add(f ? n[A.weeks_before_exit] : n[A.weeks_after_exit]), M.insertBefore(y, M.firstChild);
852
853
  });
853
854
  }
854
855
  });
855
856
  }
856
- function $o(e, t, o, n) {
857
- const s = e[0], r = e[e.length - 1], { ISOWeek: i, fixedWeeks: a, broadcastCalendar: c } = o ?? {}, { addDays: l, differenceInCalendarDays: u, differenceInCalendarMonths: f, endOfBroadcastWeek: h, endOfISOWeek: p, endOfMonth: w, endOfWeek: g, isAfter: D, startOfBroadcastWeek: O, startOfISOWeek: W, startOfWeek: k } = n, S = c ? O(s, n) : i ? W(s) : k(s), y = c ? h(r) : i ? p(w(r)) : g(w(r)), b = u(y, S), M = f(r, s) + 1, _ = [];
857
+ function $o(e, t, n, o) {
858
+ const s = e[0], r = e[e.length - 1], { ISOWeek: i, fixedWeeks: a, broadcastCalendar: c } = n ?? {}, { addDays: l, differenceInCalendarDays: h, differenceInCalendarMonths: f, endOfBroadcastWeek: u, endOfISOWeek: p, endOfMonth: w, endOfWeek: O, isAfter: k, startOfBroadcastWeek: g, startOfISOWeek: W, startOfWeek: M } = o, S = c ? g(s, o) : i ? W(s) : M(s), y = c ? u(r) : i ? p(w(r)) : O(w(r)), b = h(y, S), D = f(r, s) + 1, _ = [];
858
859
  for (let P = 0; P <= b; P++) {
859
860
  const Z = l(S, P);
860
- if (t && D(Z, t))
861
+ if (t && k(Z, t))
861
862
  break;
862
863
  _.push(Z);
863
864
  }
864
- const $ = (c ? 35 : 42) * M;
865
+ const $ = (c ? 35 : 42) * D;
865
866
  if (a && _.length < $) {
866
867
  const P = $ - _.length;
867
868
  for (let Z = 0; Z < P; Z++) {
@@ -873,112 +874,112 @@ function $o(e, t, o, n) {
873
874
  }
874
875
  function Po(e) {
875
876
  const t = [];
876
- return e.reduce((o, n) => {
877
- const s = n.weeks.reduce((r, i) => [...r, ...i.days], t);
878
- return [...o, ...s];
877
+ return e.reduce((n, o) => {
878
+ const s = o.weeks.reduce((r, i) => [...r, ...i.days], t);
879
+ return [...n, ...s];
879
880
  }, t);
880
881
  }
881
- function Ao(e, t, o, n) {
882
- const { numberOfMonths: s = 1 } = o, r = [];
882
+ function Ao(e, t, n, o) {
883
+ const { numberOfMonths: s = 1 } = n, r = [];
883
884
  for (let i = 0; i < s; i++) {
884
- const a = n.addMonths(e, i);
885
+ const a = o.addMonths(e, i);
885
886
  if (t && a > t)
886
887
  break;
887
888
  r.push(a);
888
889
  }
889
890
  return r;
890
891
  }
891
- function ze(e, t, o, n) {
892
- const { month: s, defaultMonth: r, today: i = n.today(), numberOfMonths: a = 1 } = e;
892
+ function ze(e, t, n, o) {
893
+ const { month: s, defaultMonth: r, today: i = o.today(), numberOfMonths: a = 1 } = e;
893
894
  let c = s || r || i;
894
- const { differenceInCalendarMonths: l, addMonths: u, startOfMonth: f } = n;
895
- if (o && l(o, c) < a - 1) {
896
- const h = -1 * (a - 1);
897
- c = u(o, h);
895
+ const { differenceInCalendarMonths: l, addMonths: h, startOfMonth: f } = o;
896
+ if (n && l(n, c) < a - 1) {
897
+ const u = -1 * (a - 1);
898
+ c = h(n, u);
898
899
  }
899
900
  return t && l(c, t) < 0 && (c = t), f(c);
900
901
  }
901
- function Ho(e, t, o, n) {
902
- const { addDays: s, endOfBroadcastWeek: r, endOfISOWeek: i, endOfMonth: a, endOfWeek: c, getISOWeek: l, getWeek: u, startOfBroadcastWeek: f, startOfISOWeek: h, startOfWeek: p } = n, w = e.reduce((g, D) => {
903
- const O = o.broadcastCalendar ? f(D, n) : o.ISOWeek ? h(D) : p(D), W = o.broadcastCalendar ? r(D) : o.ISOWeek ? i(a(D)) : c(a(D)), k = t.filter((M) => M >= O && M <= W), S = o.broadcastCalendar ? 35 : 42;
904
- if (o.fixedWeeks && k.length < S) {
905
- const M = t.filter((_) => {
906
- const Y = S - k.length;
902
+ function Ho(e, t, n, o) {
903
+ const { addDays: s, endOfBroadcastWeek: r, endOfISOWeek: i, endOfMonth: a, endOfWeek: c, getISOWeek: l, getWeek: h, startOfBroadcastWeek: f, startOfISOWeek: u, startOfWeek: p } = o, w = e.reduce((O, k) => {
904
+ const g = n.broadcastCalendar ? f(k, o) : n.ISOWeek ? u(k) : p(k), W = n.broadcastCalendar ? r(k) : n.ISOWeek ? i(a(k)) : c(a(k)), M = t.filter((D) => D >= g && D <= W), S = n.broadcastCalendar ? 35 : 42;
905
+ if (n.fixedWeeks && M.length < S) {
906
+ const D = t.filter((_) => {
907
+ const Y = S - M.length;
907
908
  return _ > W && _ <= s(W, Y);
908
909
  });
909
- k.push(...M);
910
+ M.push(...D);
910
911
  }
911
- const y = k.reduce((M, _) => {
912
- const Y = o.ISOWeek ? l(_) : u(_), $ = M.find((Z) => Z.weekNumber === Y), P = new Xe(_, D, n);
913
- return $ ? $.days.push(P) : M.push(new Sn(Y, [P])), M;
914
- }, []), b = new Nn(D, y);
915
- return g.push(b), g;
912
+ const y = M.reduce((D, _) => {
913
+ const Y = n.ISOWeek ? l(_) : h(_), $ = D.find((Z) => Z.weekNumber === Y), P = new Xe(_, k, o);
914
+ return $ ? $.days.push(P) : D.push(new Sn(Y, [P])), D;
915
+ }, []), b = new Nn(k, y);
916
+ return O.push(b), O;
916
917
  }, []);
917
- return o.reverseMonths ? w.reverse() : w;
918
+ return n.reverseMonths ? w.reverse() : w;
918
919
  }
919
920
  function Zo(e, t) {
920
- let { startMonth: o, endMonth: n } = e;
921
- const { startOfYear: s, startOfDay: r, startOfMonth: i, endOfMonth: a, addYears: c, endOfYear: l, newDate: u, today: f } = t, { fromYear: h, toYear: p, fromMonth: w, toMonth: g } = e;
922
- !o && w && (o = w), !o && h && (o = t.newDate(h, 0, 1)), !n && g && (n = g), !n && p && (n = u(p, 11, 31));
923
- const D = e.captionLayout === "dropdown" || e.captionLayout === "dropdown-years";
924
- return o ? o = i(o) : h ? o = u(h, 0, 1) : !o && D && (o = s(c(e.today ?? f(), -100))), n ? n = a(n) : p ? n = u(p, 11, 31) : !n && D && (n = l(e.today ?? f())), [
925
- o && r(o),
926
- n && r(n)
921
+ let { startMonth: n, endMonth: o } = e;
922
+ const { startOfYear: s, startOfDay: r, startOfMonth: i, endOfMonth: a, addYears: c, endOfYear: l, newDate: h, today: f } = t, { fromYear: u, toYear: p, fromMonth: w, toMonth: O } = e;
923
+ !n && w && (n = w), !n && u && (n = t.newDate(u, 0, 1)), !o && O && (o = O), !o && p && (o = h(p, 11, 31));
924
+ const k = e.captionLayout === "dropdown" || e.captionLayout === "dropdown-years";
925
+ return n ? n = i(n) : u ? n = h(u, 0, 1) : !n && k && (n = s(c(e.today ?? f(), -100))), o ? o = a(o) : p ? o = h(p, 11, 31) : !o && k && (o = l(e.today ?? f())), [
926
+ n && r(n),
927
+ o && r(o)
927
928
  ];
928
929
  }
929
- function jo(e, t, o, n) {
930
- if (o.disableNavigation)
930
+ function jo(e, t, n, o) {
931
+ if (n.disableNavigation)
931
932
  return;
932
- const { pagedNavigation: s, numberOfMonths: r = 1 } = o, { startOfMonth: i, addMonths: a, differenceInCalendarMonths: c } = n, l = s ? r : 1, u = i(e);
933
+ const { pagedNavigation: s, numberOfMonths: r = 1 } = n, { startOfMonth: i, addMonths: a, differenceInCalendarMonths: c } = o, l = s ? r : 1, h = i(e);
933
934
  if (!t)
934
- return a(u, l);
935
+ return a(h, l);
935
936
  if (!(c(t, e) < r))
936
- return a(u, l);
937
+ return a(h, l);
937
938
  }
938
- function zo(e, t, o, n) {
939
- if (o.disableNavigation)
939
+ function zo(e, t, n, o) {
940
+ if (n.disableNavigation)
940
941
  return;
941
- const { pagedNavigation: s, numberOfMonths: r } = o, { startOfMonth: i, addMonths: a, differenceInCalendarMonths: c } = n, l = s ? r ?? 1 : 1, u = i(e);
942
+ const { pagedNavigation: s, numberOfMonths: r } = n, { startOfMonth: i, addMonths: a, differenceInCalendarMonths: c } = o, l = s ? r ?? 1 : 1, h = i(e);
942
943
  if (!t)
943
- return a(u, -l);
944
- if (!(c(u, t) <= 0))
945
- return a(u, -l);
944
+ return a(h, -l);
945
+ if (!(c(h, t) <= 0))
946
+ return a(h, -l);
946
947
  }
947
948
  function qo(e) {
948
949
  const t = [];
949
- return e.reduce((o, n) => [...o, ...n.weeks], t);
950
+ return e.reduce((n, o) => [...n, ...o.weeks], t);
950
951
  }
951
- function ke(e, t) {
952
- const [o, n] = pe(e);
953
- return [t === void 0 ? o : t, n];
952
+ function Me(e, t) {
953
+ const [n, o] = pe(e);
954
+ return [t === void 0 ? n : t, o];
954
955
  }
955
956
  function Ro(e, t) {
956
- const [o, n] = Zo(e, t), { startOfMonth: s, endOfMonth: r } = t, i = ze(e, o, n, t), [a, c] = ke(
957
+ const [n, o] = Zo(e, t), { startOfMonth: s, endOfMonth: r } = t, i = ze(e, n, o, t), [a, c] = Me(
957
958
  i,
958
959
  // initialMonth is always computed from props.month if provided
959
960
  e.month ? i : void 0
960
961
  );
961
962
  Ue(() => {
962
- const b = ze(e, o, n, t);
963
+ const b = ze(e, n, o, t);
963
964
  c(b);
964
965
  }, [e.timeZone]);
965
- const l = Ao(a, n, e, t), u = $o(l, e.endMonth ? r(e.endMonth) : void 0, e, t), f = Ho(l, u, e, t), h = qo(f), p = Po(f), w = zo(a, o, e, t), g = jo(a, n, e, t), { disableNavigation: D, onMonthChange: O } = e, W = (b) => h.some((M) => M.days.some((_) => _.isEqualTo(b))), k = (b) => {
966
- if (D)
966
+ const l = Ao(a, o, e, t), h = $o(l, e.endMonth ? r(e.endMonth) : void 0, e, t), f = Ho(l, h, e, t), u = qo(f), p = Po(f), w = zo(a, n, e, t), O = jo(a, o, e, t), { disableNavigation: k, onMonthChange: g } = e, W = (b) => u.some((D) => D.days.some((_) => _.isEqualTo(b))), M = (b) => {
967
+ if (k)
967
968
  return;
968
- let M = s(b);
969
- o && M < s(o) && (M = s(o)), n && M > s(n) && (M = s(n)), c(M), O?.(M);
969
+ let D = s(b);
970
+ n && D < s(n) && (D = s(n)), o && D > s(o) && (D = s(o)), c(D), g?.(D);
970
971
  };
971
972
  return {
972
973
  months: f,
973
- weeks: h,
974
+ weeks: u,
974
975
  days: p,
975
- navStart: o,
976
- navEnd: n,
976
+ navStart: n,
977
+ navEnd: o,
977
978
  previousMonth: w,
978
- nextMonth: g,
979
- goToMonth: k,
979
+ nextMonth: O,
980
+ goToMonth: M,
980
981
  goToDay: (b) => {
981
- W(b) || k(b.date);
982
+ W(b) || M(b.date);
982
983
  }
983
984
  };
984
985
  }
@@ -989,81 +990,81 @@ var G;
989
990
  function qe(e) {
990
991
  return !e[T.disabled] && !e[T.hidden] && !e[T.outside];
991
992
  }
992
- function Uo(e, t, o, n) {
993
+ function Uo(e, t, n, o) {
993
994
  let s, r = -1;
994
995
  for (const i of e) {
995
996
  const a = t(i);
996
- qe(a) && (a[T.focused] && r < G.FocusedModifier ? (s = i, r = G.FocusedModifier) : n?.isEqualTo(i) && r < G.LastFocused ? (s = i, r = G.LastFocused) : o(i.date) && r < G.Selected ? (s = i, r = G.Selected) : a[T.today] && r < G.Today && (s = i, r = G.Today));
997
+ qe(a) && (a[T.focused] && r < G.FocusedModifier ? (s = i, r = G.FocusedModifier) : o?.isEqualTo(i) && r < G.LastFocused ? (s = i, r = G.LastFocused) : n(i.date) && r < G.Selected ? (s = i, r = G.Selected) : a[T.today] && r < G.Today && (s = i, r = G.Today));
997
998
  }
998
999
  return s || (s = e.find((i) => qe(t(i)))), s;
999
1000
  }
1000
- function Go(e, t, o, n, s, r, i) {
1001
- const { ISOWeek: a, broadcastCalendar: c } = r, { addDays: l, addMonths: u, addWeeks: f, addYears: h, endOfBroadcastWeek: p, endOfISOWeek: w, endOfWeek: g, max: D, min: O, startOfBroadcastWeek: W, startOfISOWeek: k, startOfWeek: S } = i;
1001
+ function Go(e, t, n, o, s, r, i) {
1002
+ const { ISOWeek: a, broadcastCalendar: c } = r, { addDays: l, addMonths: h, addWeeks: f, addYears: u, endOfBroadcastWeek: p, endOfISOWeek: w, endOfWeek: O, max: k, min: g, startOfBroadcastWeek: W, startOfISOWeek: M, startOfWeek: S } = i;
1002
1003
  let b = {
1003
1004
  day: l,
1004
1005
  week: f,
1005
- month: u,
1006
- year: h,
1007
- startOfWeek: (M) => c ? W(M, i) : a ? k(M) : S(M),
1008
- endOfWeek: (M) => c ? p(M) : a ? w(M) : g(M)
1009
- }[e](o, t === "after" ? 1 : -1);
1010
- return t === "before" && n ? b = D([n, b]) : t === "after" && s && (b = O([s, b])), b;
1011
- }
1012
- function dt(e, t, o, n, s, r, i, a = 0) {
1006
+ month: h,
1007
+ year: u,
1008
+ startOfWeek: (D) => c ? W(D, i) : a ? M(D) : S(D),
1009
+ endOfWeek: (D) => c ? p(D) : a ? w(D) : O(D)
1010
+ }[e](n, t === "after" ? 1 : -1);
1011
+ return t === "before" && o ? b = k([o, b]) : t === "after" && s && (b = g([s, b])), b;
1012
+ }
1013
+ function dt(e, t, n, o, s, r, i, a = 0) {
1013
1014
  if (a > 365)
1014
1015
  return;
1015
- const c = Go(e, t, o.date, n, s, r, i), l = !!(r.disabled && X(c, r.disabled, i)), u = !!(r.hidden && X(c, r.hidden, i)), f = c, h = new Xe(c, f, i);
1016
- return !l && !u ? h : dt(e, t, h, n, s, r, i, a + 1);
1016
+ const c = Go(e, t, n.date, o, s, r, i), l = !!(r.disabled && X(c, r.disabled, i)), h = !!(r.hidden && X(c, r.hidden, i)), f = c, u = new Xe(c, f, i);
1017
+ return !l && !h ? u : dt(e, t, u, o, s, r, i, a + 1);
1017
1018
  }
1018
- function Ko(e, t, o, n, s) {
1019
- const { autoFocus: r } = e, [i, a] = pe(), c = Uo(t.days, o, n || (() => !1), i), [l, u] = pe(r ? c : void 0);
1019
+ function Ko(e, t, n, o, s) {
1020
+ const { autoFocus: r } = e, [i, a] = pe(), c = Uo(t.days, n, o || (() => !1), i), [l, h] = pe(r ? c : void 0);
1020
1021
  return {
1021
- isFocusTarget: (g) => !!c?.isEqualTo(g),
1022
- setFocused: u,
1022
+ isFocusTarget: (O) => !!c?.isEqualTo(O),
1023
+ setFocused: h,
1023
1024
  focused: l,
1024
1025
  blur: () => {
1025
- a(l), u(void 0);
1026
+ a(l), h(void 0);
1026
1027
  },
1027
- moveFocus: (g, D) => {
1028
+ moveFocus: (O, k) => {
1028
1029
  if (!l)
1029
1030
  return;
1030
- const O = dt(g, D, l, t.navStart, t.navEnd, e, s);
1031
- O && (t.goToDay(O), u(O));
1031
+ const g = dt(O, k, l, t.navStart, t.navEnd, e, s);
1032
+ g && (t.goToDay(g), h(g));
1032
1033
  }
1033
1034
  };
1034
1035
  }
1035
1036
  function Lo(e, t) {
1036
- const { selected: o, required: n, onSelect: s } = e, [r, i] = ke(o, s ? o : void 0), a = s ? o : r, { isSameDay: c } = t, l = (p) => a?.some((w) => c(w, p)) ?? !1, { min: u, max: f } = e;
1037
+ const { selected: n, required: o, onSelect: s } = e, [r, i] = Me(n, s ? n : void 0), a = s ? n : r, { isSameDay: c } = t, l = (p) => a?.some((w) => c(w, p)) ?? !1, { min: h, max: f } = e;
1037
1038
  return {
1038
1039
  selected: a,
1039
- select: (p, w, g) => {
1040
- let D = [...a ?? []];
1040
+ select: (p, w, O) => {
1041
+ let k = [...a ?? []];
1041
1042
  if (l(p)) {
1042
- if (a?.length === u || n && a?.length === 1)
1043
+ if (a?.length === h || o && a?.length === 1)
1043
1044
  return;
1044
- D = a?.filter((O) => !c(O, p));
1045
+ k = a?.filter((g) => !c(g, p));
1045
1046
  } else
1046
- a?.length === f ? D = [p] : D = [...D, p];
1047
- return s || i(D), s?.(D, p, w, g), D;
1047
+ a?.length === f ? k = [p] : k = [...k, p];
1048
+ return s || i(k), s?.(k, p, w, O), k;
1048
1049
  },
1049
1050
  isSelected: l
1050
1051
  };
1051
1052
  }
1052
- function Vo(e, t, o = 0, n = 0, s = !1, r = V) {
1053
- const { from: i, to: a } = t || {}, { isSameDay: c, isAfter: l, isBefore: u } = r;
1053
+ function Vo(e, t, n = 0, o = 0, s = !1, r = V) {
1054
+ const { from: i, to: a } = t || {}, { isSameDay: c, isAfter: l, isBefore: h } = r;
1054
1055
  let f;
1055
1056
  if (!i && !a)
1056
- f = { from: e, to: o > 0 ? void 0 : e };
1057
+ f = { from: e, to: n > 0 ? void 0 : e };
1057
1058
  else if (i && !a)
1058
- c(i, e) ? s ? f = { from: i, to: void 0 } : f = void 0 : u(e, i) ? f = { from: e, to: i } : f = { from: i, to: e };
1059
+ c(i, e) ? s ? f = { from: i, to: void 0 } : f = void 0 : h(e, i) ? f = { from: e, to: i } : f = { from: i, to: e };
1059
1060
  else if (i && a)
1060
1061
  if (c(i, e) && c(a, e))
1061
1062
  s ? f = { from: i, to: a } : f = void 0;
1062
1063
  else if (c(i, e))
1063
- f = { from: i, to: o > 0 ? void 0 : e };
1064
+ f = { from: i, to: n > 0 ? void 0 : e };
1064
1065
  else if (c(a, e))
1065
- f = { from: e, to: o > 0 ? void 0 : e };
1066
- else if (u(e, i))
1066
+ f = { from: e, to: n > 0 ? void 0 : e };
1067
+ else if (h(e, i))
1067
1068
  f = { from: e, to: a };
1068
1069
  else if (l(e, i))
1069
1070
  f = { from: i, to: e };
@@ -1072,73 +1073,73 @@ function Vo(e, t, o = 0, n = 0, s = !1, r = V) {
1072
1073
  else
1073
1074
  throw new Error("Invalid range");
1074
1075
  if (f?.from && f?.to) {
1075
- const h = r.differenceInCalendarDays(f.to, f.from);
1076
- n > 0 && h > n ? f = { from: e, to: void 0 } : o > 1 && h < o && (f = { from: e, to: void 0 });
1076
+ const u = r.differenceInCalendarDays(f.to, f.from);
1077
+ o > 0 && u > o ? f = { from: e, to: void 0 } : n > 1 && u < n && (f = { from: e, to: void 0 });
1077
1078
  }
1078
1079
  return f;
1079
1080
  }
1080
- function Jo(e, t, o = V) {
1081
- const n = Array.isArray(t) ? t : [t];
1081
+ function Jo(e, t, n = V) {
1082
+ const o = Array.isArray(t) ? t : [t];
1082
1083
  let s = e.from;
1083
- const r = o.differenceInCalendarDays(e.to, e.from), i = Math.min(r, 6);
1084
+ const r = n.differenceInCalendarDays(e.to, e.from), i = Math.min(r, 6);
1084
1085
  for (let a = 0; a <= i; a++) {
1085
- if (n.includes(s.getDay()))
1086
+ if (o.includes(s.getDay()))
1086
1087
  return !0;
1087
- s = o.addDays(s, 1);
1088
+ s = n.addDays(s, 1);
1088
1089
  }
1089
1090
  return !1;
1090
1091
  }
1091
- function Re(e, t, o = V) {
1092
- return Q(e, t.from, !1, o) || Q(e, t.to, !1, o) || Q(t, e.from, !1, o) || Q(t, e.to, !1, o);
1092
+ function Re(e, t, n = V) {
1093
+ return Q(e, t.from, !1, n) || Q(e, t.to, !1, n) || Q(t, e.from, !1, n) || Q(t, e.to, !1, n);
1093
1094
  }
1094
- function Qo(e, t, o = V) {
1095
- const n = Array.isArray(t) ? t : [t];
1096
- if (n.filter((a) => typeof a != "function").some((a) => typeof a == "boolean" ? a : o.isDate(a) ? Q(e, a, !1, o) : st(a, o) ? a.some((c) => Q(e, c, !1, o)) : Ye(a) ? a.from && a.to ? Re(e, { from: a.from, to: a.to }, o) : !1 : ot(a) ? Jo(e, a.dayOfWeek, o) : et(a) ? o.isAfter(a.before, a.after) ? Re(e, {
1097
- from: o.addDays(a.after, 1),
1098
- to: o.addDays(a.before, -1)
1099
- }, o) : X(e.from, a, o) || X(e.to, a, o) : tt(a) || nt(a) ? X(e.from, a, o) || X(e.to, a, o) : !1))
1095
+ function Qo(e, t, n = V) {
1096
+ const o = Array.isArray(t) ? t : [t];
1097
+ if (o.filter((a) => typeof a != "function").some((a) => typeof a == "boolean" ? a : n.isDate(a) ? Q(e, a, !1, n) : st(a, n) ? a.some((c) => Q(e, c, !1, n)) : Ye(a) ? a.from && a.to ? Re(e, { from: a.from, to: a.to }, n) : !1 : ot(a) ? Jo(e, a.dayOfWeek, n) : et(a) ? n.isAfter(a.before, a.after) ? Re(e, {
1098
+ from: n.addDays(a.after, 1),
1099
+ to: n.addDays(a.before, -1)
1100
+ }, n) : X(e.from, a, n) || X(e.to, a, n) : tt(a) || nt(a) ? X(e.from, a, n) || X(e.to, a, n) : !1))
1100
1101
  return !0;
1101
- const i = n.filter((a) => typeof a == "function");
1102
+ const i = o.filter((a) => typeof a == "function");
1102
1103
  if (i.length) {
1103
1104
  let a = e.from;
1104
- const c = o.differenceInCalendarDays(e.to, e.from);
1105
+ const c = n.differenceInCalendarDays(e.to, e.from);
1105
1106
  for (let l = 0; l <= c; l++) {
1106
- if (i.some((u) => u(a)))
1107
+ if (i.some((h) => h(a)))
1107
1108
  return !0;
1108
- a = o.addDays(a, 1);
1109
+ a = n.addDays(a, 1);
1109
1110
  }
1110
1111
  }
1111
1112
  return !1;
1112
1113
  }
1113
1114
  function Xo(e, t) {
1114
- const { disabled: o, excludeDisabled: n, selected: s, required: r, onSelect: i } = e, [a, c] = ke(s, i ? s : void 0), l = i ? s : a;
1115
+ const { disabled: n, excludeDisabled: o, selected: s, required: r, onSelect: i } = e, [a, c] = Me(s, i ? s : void 0), l = i ? s : a;
1115
1116
  return {
1116
1117
  selected: l,
1117
- select: (h, p, w) => {
1118
- const { min: g, max: D } = e, O = h ? Vo(h, l, g, D, r, t) : void 0;
1119
- return n && o && O?.from && O.to && Qo({ from: O.from, to: O.to }, o, t) && (O.from = h, O.to = void 0), i || c(O), i?.(O, h, p, w), O;
1118
+ select: (u, p, w) => {
1119
+ const { min: O, max: k } = e, g = u ? Vo(u, l, O, k, r, t) : void 0;
1120
+ return o && n && g?.from && g.to && Qo({ from: g.from, to: g.to }, n, t) && (g.from = u, g.to = void 0), i || c(g), i?.(g, u, p, w), g;
1120
1121
  },
1121
- isSelected: (h) => l && Q(l, h, !1, t)
1122
+ isSelected: (u) => l && Q(l, u, !1, t)
1122
1123
  };
1123
1124
  }
1124
1125
  function es(e, t) {
1125
- const { selected: o, required: n, onSelect: s } = e, [r, i] = ke(o, s ? o : void 0), a = s ? o : r, { isSameDay: c } = t;
1126
+ const { selected: n, required: o, onSelect: s } = e, [r, i] = Me(n, s ? n : void 0), a = s ? n : r, { isSameDay: c } = t;
1126
1127
  return {
1127
1128
  selected: a,
1128
- select: (f, h, p) => {
1129
+ select: (f, u, p) => {
1129
1130
  let w = f;
1130
- return !n && a && a && c(f, a) && (w = void 0), s || i(w), s?.(w, f, h, p), w;
1131
+ return !o && a && a && c(f, a) && (w = void 0), s || i(w), s?.(w, f, u, p), w;
1131
1132
  },
1132
1133
  isSelected: (f) => a ? c(a, f) : !1
1133
1134
  };
1134
1135
  }
1135
1136
  function ts(e, t) {
1136
- const o = es(e, t), n = Lo(e, t), s = Xo(e, t);
1137
+ const n = es(e, t), o = Lo(e, t), s = Xo(e, t);
1137
1138
  switch (e.mode) {
1138
1139
  case "single":
1139
- return o;
1140
- case "multiple":
1141
1140
  return n;
1141
+ case "multiple":
1142
+ return o;
1142
1143
  case "range":
1143
1144
  return s;
1144
1145
  default:
@@ -1153,7 +1154,7 @@ function ns(e) {
1153
1154
  from: t.selected.from ? new F(t.selected.from, t.timeZone) : void 0,
1154
1155
  to: t.selected.to ? new F(t.selected.to, t.timeZone) : void 0
1155
1156
  }));
1156
- const { components: o, formatters: n, labels: s, dateLib: r, locale: i, classNames: a } = Ce(() => {
1157
+ const { components: n, formatters: o, labels: s, dateLib: r, locale: i, classNames: a } = Ce(() => {
1157
1158
  const v = { ...Ke, ...t.locale };
1158
1159
  return {
1159
1160
  dateLib: new ee({
@@ -1185,17 +1186,17 @@ function ns(e) {
1185
1186
  t.formatters,
1186
1187
  t.labels,
1187
1188
  t.classNames
1188
- ]), { captionLayout: c, mode: l, navLayout: u, numberOfMonths: f = 1, onDayBlur: h, onDayClick: p, onDayFocus: w, onDayKeyDown: g, onDayMouseEnter: D, onDayMouseLeave: O, onNextClick: W, onPrevClick: k, showWeekNumber: S, styles: y } = t, { formatCaption: b, formatDay: M, formatMonthDropdown: _, formatWeekNumber: Y, formatWeekNumberHeader: $, formatWeekdayName: P, formatYearDropdown: Z } = n, oe = Ro(t, r), { days: se, months: re, navStart: de, navEnd: Me, previousMonth: j, nextMonth: z, goToMonth: J } = oe, De = En(se, t, de, Me, r), { isSelected: be, select: we, selected: ue } = ts(t, r) ?? {}, { blur: Be, focused: xe, isFocusTarget: ut, moveFocus: Fe, setFocused: he } = Ko(t, oe, De, be ?? (() => !1), r), { labelDayButton: ht, labelGridcell: mt, labelGrid: yt, labelMonthDropdown: pt, labelNav: Ie, labelPrevious: kt, labelNext: Mt, labelWeekday: Dt, labelWeekNumber: bt, labelWeekNumberHeader: wt, labelYearDropdown: vt } = s, Ot = Ce(() => Do(r, t.ISOWeek), [r, t.ISOWeek]), $e = l !== void 0 || p !== void 0, ve = H(() => {
1189
- j && (J(j), k?.(j));
1190
- }, [j, J, k]), Oe = H(() => {
1189
+ ]), { captionLayout: c, mode: l, navLayout: h, numberOfMonths: f = 1, onDayBlur: u, onDayClick: p, onDayFocus: w, onDayKeyDown: O, onDayMouseEnter: k, onDayMouseLeave: g, onNextClick: W, onPrevClick: M, showWeekNumber: S, styles: y } = t, { formatCaption: b, formatDay: D, formatMonthDropdown: _, formatWeekNumber: Y, formatWeekNumberHeader: $, formatWeekdayName: P, formatYearDropdown: Z } = o, oe = Ro(t, r), { days: se, months: re, navStart: ue, navEnd: De, previousMonth: j, nextMonth: z, goToMonth: J } = oe, ke = En(se, t, ue, De, r), { isSelected: be, select: we, selected: he } = ts(t, r) ?? {}, { blur: Be, focused: xe, isFocusTarget: ut, moveFocus: Fe, setFocused: me } = Ko(t, oe, ke, be ?? (() => !1), r), { labelDayButton: ht, labelGridcell: mt, labelGrid: yt, labelMonthDropdown: pt, labelNav: Ie, labelPrevious: Mt, labelNext: Dt, labelWeekday: kt, labelWeekNumber: bt, labelWeekNumberHeader: wt, labelYearDropdown: vt } = s, gt = Ce(() => ko(r, t.ISOWeek), [r, t.ISOWeek]), $e = l !== void 0 || p !== void 0, ve = H(() => {
1190
+ j && (J(j), M?.(j));
1191
+ }, [j, J, M]), ge = H(() => {
1191
1192
  z && (J(z), W?.(z));
1192
- }, [J, z, W]), gt = H((v, E) => (C) => {
1193
- C.preventDefault(), C.stopPropagation(), he(v), we?.(v.date, E, C), p?.(v.date, E, C);
1194
- }, [we, p, he]), _t = H((v, E) => (C) => {
1195
- he(v), w?.(v.date, E, C);
1196
- }, [w, he]), Ct = H((v, E) => (C) => {
1197
- Be(), h?.(v.date, E, C);
1198
- }, [Be, h]), Wt = H((v, E) => (C) => {
1193
+ }, [J, z, W]), Ot = H((v, E) => (C) => {
1194
+ C.preventDefault(), C.stopPropagation(), me(v), we?.(v.date, E, C), p?.(v.date, E, C);
1195
+ }, [we, p, me]), _t = H((v, E) => (C) => {
1196
+ me(v), w?.(v.date, E, C);
1197
+ }, [w, me]), Ct = H((v, E) => (C) => {
1198
+ Be(), u?.(v.date, E, C);
1199
+ }, [Be, u]), Wt = H((v, E) => (C) => {
1199
1200
  const te = {
1200
1201
  ArrowLeft: [
1201
1202
  C.shiftKey ? "month" : "day",
@@ -1214,15 +1215,15 @@ function ns(e) {
1214
1215
  };
1215
1216
  if (te[C.key]) {
1216
1217
  C.preventDefault(), C.stopPropagation();
1217
- const [q, me] = te[C.key];
1218
- Fe(q, me);
1218
+ const [q, ye] = te[C.key];
1219
+ Fe(q, ye);
1219
1220
  }
1220
- g?.(v.date, E, C);
1221
- }, [Fe, g, t.dir]), Nt = H((v, E) => (C) => {
1222
- D?.(v.date, E, C);
1223
- }, [D]), St = H((v, E) => (C) => {
1224
1221
  O?.(v.date, E, C);
1225
- }, [O]), Et = H((v) => (E) => {
1222
+ }, [Fe, O, t.dir]), Nt = H((v, E) => (C) => {
1223
+ k?.(v.date, E, C);
1224
+ }, [k]), St = H((v, E) => (C) => {
1225
+ g?.(v.date, E, C);
1226
+ }, [g]), Et = H((v) => (E) => {
1226
1227
  const C = Number(E.target.value), te = r.setMonth(r.startOfMonth(v), C);
1227
1228
  J(te);
1228
1229
  }, [r, J]), Tt = H((v) => (E) => {
@@ -1231,7 +1232,7 @@ function ns(e) {
1231
1232
  }, [r, J]), { className: Yt, style: Bt } = Ce(() => ({
1232
1233
  className: [a[m.Root], t.className].filter(Boolean).join(" "),
1233
1234
  style: { ...y?.[m.Root], ...t.style }
1234
- }), [a, t.className, t.style, y]), xt = ao(t), Pe = ye(null);
1235
+ }), [a, t.className, t.style, y]), xt = ao(t), Pe = ce(null);
1235
1236
  Io(Pe, !!t.animate, {
1236
1237
  classNames: a,
1237
1238
  months: re,
@@ -1240,45 +1241,45 @@ function ns(e) {
1240
1241
  });
1241
1242
  const Ft = {
1242
1243
  dayPickerProps: t,
1243
- selected: ue,
1244
+ selected: he,
1244
1245
  select: we,
1245
1246
  isSelected: be,
1246
1247
  months: re,
1247
1248
  nextMonth: z,
1248
1249
  previousMonth: j,
1249
1250
  goToMonth: J,
1250
- getModifiers: De,
1251
- components: o,
1251
+ getModifiers: ke,
1252
+ components: n,
1252
1253
  classNames: a,
1253
1254
  styles: y,
1254
1255
  labels: s,
1255
- formatters: n
1256
+ formatters: o
1256
1257
  };
1257
1258
  return d.createElement(
1258
1259
  rt.Provider,
1259
1260
  { value: Ft },
1260
1261
  d.createElement(
1261
- o.Root,
1262
+ n.Root,
1262
1263
  { rootRef: t.animate ? Pe : void 0, className: Yt, style: Bt, dir: t.dir, id: t.id, lang: t.lang, nonce: t.nonce, title: t.title, role: t.role, "aria-label": t["aria-label"], ...xt },
1263
1264
  d.createElement(
1264
- o.Months,
1265
+ n.Months,
1265
1266
  { className: a[m.Months], style: y?.[m.Months] },
1266
- !t.hideNavigation && !u && d.createElement(o.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: a[m.Nav], style: y?.[m.Nav], "aria-label": Ie(), onPreviousClick: ve, onNextClick: Oe, previousMonth: j, nextMonth: z }),
1267
+ !t.hideNavigation && !h && d.createElement(n.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: a[m.Nav], style: y?.[m.Nav], "aria-label": Ie(), onPreviousClick: ve, onNextClick: ge, previousMonth: j, nextMonth: z }),
1267
1268
  re.map((v, E) => {
1268
- const C = ko(v.date, de, Me, n, r), te = bo(de, Me, n, r);
1269
+ const C = Mo(v.date, ue, De, o, r), te = bo(ue, De, o, r);
1269
1270
  return d.createElement(
1270
- o.Month,
1271
+ n.Month,
1271
1272
  { "data-animated-month": t.animate ? "true" : void 0, className: a[m.Month], style: y?.[m.Month], key: E, displayIndex: E, calendarMonth: v },
1272
- u === "around" && !t.hideNavigation && E === 0 && d.createElement(
1273
- o.PreviousMonthButton,
1274
- { type: "button", className: a[m.PreviousMonthButton], tabIndex: j ? void 0 : -1, "aria-disabled": j ? void 0 : !0, "aria-label": kt(j), onClick: ve, "data-animated-button": t.animate ? "true" : void 0 },
1275
- d.createElement(o.Chevron, { disabled: j ? void 0 : !0, className: a[m.Chevron], orientation: t.dir === "rtl" ? "right" : "left" })
1273
+ h === "around" && !t.hideNavigation && E === 0 && d.createElement(
1274
+ n.PreviousMonthButton,
1275
+ { type: "button", className: a[m.PreviousMonthButton], tabIndex: j ? void 0 : -1, "aria-disabled": j ? void 0 : !0, "aria-label": Mt(j), onClick: ve, "data-animated-button": t.animate ? "true" : void 0 },
1276
+ d.createElement(n.Chevron, { disabled: j ? void 0 : !0, className: a[m.Chevron], orientation: t.dir === "rtl" ? "right" : "left" })
1276
1277
  ),
1277
- d.createElement(o.MonthCaption, { "data-animated-caption": t.animate ? "true" : void 0, className: a[m.MonthCaption], style: y?.[m.MonthCaption], calendarMonth: v, displayIndex: E }, c?.startsWith("dropdown") ? d.createElement(
1278
- o.DropdownNav,
1278
+ d.createElement(n.MonthCaption, { "data-animated-caption": t.animate ? "true" : void 0, className: a[m.MonthCaption], style: y?.[m.MonthCaption], calendarMonth: v, displayIndex: E }, c?.startsWith("dropdown") ? d.createElement(
1279
+ n.DropdownNav,
1279
1280
  { className: a[m.Dropdowns], style: y?.[m.Dropdowns] },
1280
- c === "dropdown" || c === "dropdown-months" ? d.createElement(o.MonthsDropdown, { className: a[m.MonthsDropdown], "aria-label": pt(), classNames: a, components: o, disabled: !!t.disableNavigation, onChange: Et(v.date), options: C, style: y?.[m.Dropdown], value: r.getMonth(v.date) }) : d.createElement("span", null, _(v.date, r)),
1281
- c === "dropdown" || c === "dropdown-years" ? d.createElement(o.YearsDropdown, { className: a[m.YearsDropdown], "aria-label": vt(r.options), classNames: a, components: o, disabled: !!t.disableNavigation, onChange: Tt(v.date), options: te, style: y?.[m.Dropdown], value: r.getYear(v.date) }) : d.createElement("span", null, Z(v.date, r)),
1281
+ c === "dropdown" || c === "dropdown-months" ? d.createElement(n.MonthsDropdown, { className: a[m.MonthsDropdown], "aria-label": pt(), classNames: a, components: n, disabled: !!t.disableNavigation, onChange: Et(v.date), options: C, style: y?.[m.Dropdown], value: r.getMonth(v.date) }) : d.createElement("span", null, _(v.date, r)),
1282
+ c === "dropdown" || c === "dropdown-years" ? d.createElement(n.YearsDropdown, { className: a[m.YearsDropdown], "aria-label": vt(r.options), classNames: a, components: n, disabled: !!t.disableNavigation, onChange: Tt(v.date), options: te, style: y?.[m.Dropdown], value: r.getYear(v.date) }) : d.createElement("span", null, Z(v.date, r)),
1282
1283
  d.createElement("span", { role: "status", "aria-live": "polite", style: {
1283
1284
  border: 0,
1284
1285
  clip: "rect(0 0 0 0)",
@@ -1291,47 +1292,47 @@ function ns(e) {
1291
1292
  whiteSpace: "nowrap",
1292
1293
  wordWrap: "normal"
1293
1294
  } }, b(v.date, r.options, r))
1294
- ) : d.createElement(o.CaptionLabel, { className: a[m.CaptionLabel], role: "status", "aria-live": "polite" }, b(v.date, r.options, r))),
1295
- u === "around" && !t.hideNavigation && E === f - 1 && d.createElement(
1296
- o.NextMonthButton,
1297
- { type: "button", className: a[m.NextMonthButton], tabIndex: z ? void 0 : -1, "aria-disabled": z ? void 0 : !0, "aria-label": Mt(z), onClick: Oe, "data-animated-button": t.animate ? "true" : void 0 },
1298
- d.createElement(o.Chevron, { disabled: z ? void 0 : !0, className: a[m.Chevron], orientation: t.dir === "rtl" ? "left" : "right" })
1295
+ ) : d.createElement(n.CaptionLabel, { className: a[m.CaptionLabel], role: "status", "aria-live": "polite" }, b(v.date, r.options, r))),
1296
+ h === "around" && !t.hideNavigation && E === f - 1 && d.createElement(
1297
+ n.NextMonthButton,
1298
+ { type: "button", className: a[m.NextMonthButton], tabIndex: z ? void 0 : -1, "aria-disabled": z ? void 0 : !0, "aria-label": Dt(z), onClick: ge, "data-animated-button": t.animate ? "true" : void 0 },
1299
+ d.createElement(n.Chevron, { disabled: z ? void 0 : !0, className: a[m.Chevron], orientation: t.dir === "rtl" ? "left" : "right" })
1299
1300
  ),
1300
- E === f - 1 && u === "after" && !t.hideNavigation && d.createElement(o.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: a[m.Nav], style: y?.[m.Nav], "aria-label": Ie(), onPreviousClick: ve, onNextClick: Oe, previousMonth: j, nextMonth: z }),
1301
+ E === f - 1 && h === "after" && !t.hideNavigation && d.createElement(n.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: a[m.Nav], style: y?.[m.Nav], "aria-label": Ie(), onPreviousClick: ve, onNextClick: ge, previousMonth: j, nextMonth: z }),
1301
1302
  d.createElement(
1302
- o.MonthGrid,
1303
+ n.MonthGrid,
1303
1304
  { role: "grid", "aria-multiselectable": l === "multiple" || l === "range", "aria-label": yt(v.date, r.options, r) || void 0, className: a[m.MonthGrid], style: y?.[m.MonthGrid] },
1304
1305
  !t.hideWeekdays && d.createElement(
1305
- o.Weekdays,
1306
+ n.Weekdays,
1306
1307
  { "data-animated-weekdays": t.animate ? "true" : void 0, className: a[m.Weekdays], style: y?.[m.Weekdays] },
1307
- S && d.createElement(o.WeekNumberHeader, { "aria-label": wt(r.options), className: a[m.WeekNumberHeader], style: y?.[m.WeekNumberHeader], scope: "col" }, $()),
1308
- Ot.map((q, me) => d.createElement(o.Weekday, { "aria-label": Dt(q, r.options, r), className: a[m.Weekday], key: me, style: y?.[m.Weekday], scope: "col" }, P(q, r.options, r)))
1308
+ S && d.createElement(n.WeekNumberHeader, { "aria-label": wt(r.options), className: a[m.WeekNumberHeader], style: y?.[m.WeekNumberHeader], scope: "col" }, $()),
1309
+ gt.map((q, ye) => d.createElement(n.Weekday, { "aria-label": kt(q, r.options, r), className: a[m.Weekday], key: ye, style: y?.[m.Weekday], scope: "col" }, P(q, r.options, r)))
1309
1310
  ),
1310
- d.createElement(o.Weeks, { "data-animated-weeks": t.animate ? "true" : void 0, className: a[m.Weeks], style: y?.[m.Weeks] }, v.weeks.map((q, me) => d.createElement(
1311
- o.Week,
1311
+ d.createElement(n.Weeks, { "data-animated-weeks": t.animate ? "true" : void 0, className: a[m.Weeks], style: y?.[m.Weeks] }, v.weeks.map((q, ye) => d.createElement(
1312
+ n.Week,
1312
1313
  { className: a[m.Week], key: q.weekNumber, style: y?.[m.Week], week: q },
1313
- S && d.createElement(o.WeekNumber, { week: q, style: y?.[m.WeekNumber], "aria-label": bt(q.weekNumber, {
1314
+ S && d.createElement(n.WeekNumber, { week: q, style: y?.[m.WeekNumber], "aria-label": bt(q.weekNumber, {
1314
1315
  locale: i
1315
1316
  }), className: a[m.WeekNumber], scope: "row", role: "rowheader" }, Y(q.weekNumber, r)),
1316
1317
  q.days.map((B) => {
1317
- const { date: U } = B, N = De(B);
1318
- if (N[T.focused] = !N.hidden && !!xe?.isEqualTo(B), N[R.selected] = be?.(U) || N.selected, Ye(ue)) {
1319
- const { from: ge, to: _e } = ue;
1320
- N[R.range_start] = !!(ge && _e && r.isSameDay(U, ge)), N[R.range_end] = !!(ge && _e && r.isSameDay(U, _e)), N[R.range_middle] = Q(ue, U, !0, r);
1318
+ const { date: U } = B, N = ke(B);
1319
+ if (N[T.focused] = !N.hidden && !!xe?.isEqualTo(B), N[R.selected] = be?.(U) || N.selected, Ye(he)) {
1320
+ const { from: Oe, to: _e } = he;
1321
+ N[R.range_start] = !!(Oe && _e && r.isSameDay(U, Oe)), N[R.range_end] = !!(Oe && _e && r.isSameDay(U, _e)), N[R.range_middle] = Q(he, U, !0, r);
1321
1322
  }
1322
- const It = Mo(N, y, t.modifiersStyles), $t = Tn(N, a, t.modifiersClassNames), Pt = !$e && !N.hidden ? mt(U, N, r.options, r) : void 0;
1323
- return d.createElement(o.Day, { key: `${r.format(U, "yyyy-MM-dd")}_${r.format(B.displayMonth, "yyyy-MM")}`, day: B, modifiers: N, className: $t.join(" "), style: It, role: "gridcell", "aria-selected": N.selected || void 0, "aria-label": Pt, "data-day": r.format(U, "yyyy-MM-dd"), "data-month": B.outside ? r.format(U, "yyyy-MM") : void 0, "data-selected": N.selected || void 0, "data-disabled": N.disabled || void 0, "data-hidden": N.hidden || void 0, "data-outside": B.outside || void 0, "data-focused": N.focused || void 0, "data-today": N.today || void 0 }, !N.hidden && $e ? d.createElement(o.DayButton, { className: a[m.DayButton], style: y?.[m.DayButton], type: "button", day: B, modifiers: N, disabled: N.disabled || void 0, tabIndex: ut(B) ? 0 : -1, "aria-label": ht(U, N, r.options, r), onClick: gt(B, N), onBlur: Ct(B, N), onFocus: _t(B, N), onKeyDown: Wt(B, N), onMouseEnter: Nt(B, N), onMouseLeave: St(B, N) }, M(U, r.options, r)) : !N.hidden && M(B.date, r.options, r));
1323
+ const It = Do(N, y, t.modifiersStyles), $t = Tn(N, a, t.modifiersClassNames), Pt = !$e && !N.hidden ? mt(U, N, r.options, r) : void 0;
1324
+ return d.createElement(n.Day, { key: `${r.format(U, "yyyy-MM-dd")}_${r.format(B.displayMonth, "yyyy-MM")}`, day: B, modifiers: N, className: $t.join(" "), style: It, role: "gridcell", "aria-selected": N.selected || void 0, "aria-label": Pt, "data-day": r.format(U, "yyyy-MM-dd"), "data-month": B.outside ? r.format(U, "yyyy-MM") : void 0, "data-selected": N.selected || void 0, "data-disabled": N.disabled || void 0, "data-hidden": N.hidden || void 0, "data-outside": B.outside || void 0, "data-focused": N.focused || void 0, "data-today": N.today || void 0 }, !N.hidden && $e ? d.createElement(n.DayButton, { className: a[m.DayButton], style: y?.[m.DayButton], type: "button", day: B, modifiers: N, disabled: N.disabled || void 0, tabIndex: ut(B) ? 0 : -1, "aria-label": ht(U, N, r.options, r), onClick: Ot(B, N), onBlur: Ct(B, N), onFocus: _t(B, N), onKeyDown: Wt(B, N), onMouseEnter: Nt(B, N), onMouseLeave: St(B, N) }, D(U, r.options, r)) : !N.hidden && D(B.date, r.options, r));
1324
1325
  })
1325
1326
  )))
1326
1327
  )
1327
1328
  );
1328
1329
  })
1329
1330
  ),
1330
- t.footer && d.createElement(o.Footer, { className: a[m.Footer], style: y?.[m.Footer], role: "status", "aria-live": "polite" }, t.footer)
1331
+ t.footer && d.createElement(n.Footer, { className: a[m.Footer], style: y?.[m.Footer], role: "status", "aria-live": "polite" }, t.footer)
1331
1332
  )
1332
1333
  );
1333
1334
  }
1334
- const os = "_root_bdmmk_3", ss = "_months_bdmmk_88", rs = "_month_bdmmk_88", as = "_day_button_bdmmk_96", is = "_day_bdmmk_96", cs = "_selected_bdmmk_105", ls = "_month_caption_bdmmk_111", fs = "_dropdown_root_bdmmk_120", ds = "_weekday_bdmmk_124", us = "_week_number_bdmmk_125", hs = "_range_middle_bdmmk_135", ms = "_disabled_bdmmk_144", ys = "_outside_bdmmk_153", ps = "_button_next_bdmmk_161", ks = "_button_previous_bdmmk_162", x = {
1335
+ const os = "_root_8dbco_3", ss = "_months_8dbco_102", rs = "_month_8dbco_102", as = "_day_button_8dbco_108", is = "_day_8dbco_108", cs = "_selected_8dbco_116", ls = "_month_caption_8dbco_123", fs = "_dropdown_root_8dbco_131", ds = "_weekday_8dbco_134", us = "_week_number_8dbco_135", hs = "_range_middle_8dbco_144", ms = "_disabled_8dbco_152", ys = "_outside_8dbco_160", ps = "_button_next_8dbco_167", Ms = "_button_previous_8dbco_168", x = {
1335
1336
  root: os,
1336
1337
  months: ss,
1337
1338
  month: rs,
@@ -1346,60 +1347,75 @@ const os = "_root_bdmmk_3", ss = "_months_bdmmk_88", rs = "_month_bdmmk_88", as
1346
1347
  disabled: ms,
1347
1348
  outside: ys,
1348
1349
  button_next: ps,
1349
- button_previous: ks
1350
- }, Ms = (e) => {
1351
- const { firstElementRef: t, ...o } = e, n = at(), s = {
1350
+ button_previous: Ms
1351
+ }, Ds = (e) => {
1352
+ const { firstElementRef: t, ...n } = e, o = at(), s = {
1352
1353
  ...x,
1353
- root: `${n.root} ${x.root}`,
1354
- day_button: `${n.day_button} ${x.day_button}`,
1355
- day: `${n.day} ${x.day}`,
1356
- weekday: `${n.weekday} ${x.weekday}`,
1357
- week_number: `${n.week_number} ${x.week_number}`,
1358
- month_caption: `${n.month_caption} ${x.month_caption}`,
1359
- disabled: `${n.disabled} ${x.disabled}`,
1360
- dropdown: `${n.dropdown} ${x.dropdown}`,
1361
- years_dropdown: `${n.years_dropdown} ${x.years_dropdown}`,
1362
- outside: `${n.outside} ${x.outside}`,
1363
- dropdown_root: `${n.dropdown_root} ${x.dropdown_root}`,
1364
- months: `${n.months} ${x.months}`,
1365
- month: `${n.month} ${x.month}`,
1366
- button_next: `${n.button_next} ${x.button_next}`,
1367
- button_previous: `${n.button_previous} ${x.button_previous}`
1368
- }, r = (/* @__PURE__ */ new Date()).getFullYear() - 10, i = (/* @__PURE__ */ new Date()).getFullYear() + 10, [a, c] = pe();
1354
+ root: `${o.root} ${x.root}`,
1355
+ day_button: `${o.day_button} ${x.day_button}`,
1356
+ day: `${o.day} ${x.day}`,
1357
+ weekday: `${o.weekday} ${x.weekday}`,
1358
+ week_number: `${o.week_number} ${x.week_number}`,
1359
+ month_caption: `${o.month_caption} ${x.month_caption}`,
1360
+ disabled: `${o.disabled} ${x.disabled}`,
1361
+ dropdown: `${o.dropdown} ${x.dropdown}`,
1362
+ years_dropdown: `${o.years_dropdown} ${x.years_dropdown}`,
1363
+ outside: `${o.outside} ${x.outside}`,
1364
+ dropdown_root: `${o.dropdown_root} ${x.dropdown_root}`,
1365
+ months: `${o.months} ${x.months}`,
1366
+ month: `${o.month} ${x.month}`,
1367
+ button_next: `${o.button_next} ${x.button_next}`,
1368
+ button_previous: `${o.button_previous} ${x.button_previous}`
1369
+ }, r = (/* @__PURE__ */ new Date()).getFullYear() - 10, i = (/* @__PURE__ */ new Date()).getFullYear() + 10, [a, c] = pe(() => n.defaultMonth ? n.defaultMonth : n.mode === "single" && n.selected instanceof Date ? n.selected : n.mode === "range" && n.selected && typeof n.selected == "object" && "from" in n.selected && n.selected.from instanceof Date ? n.selected.from : /* @__PURE__ */ new Date()), l = n.mode === "single" && n.selected instanceof Date ? n.selected : n.mode === "range" && n.selected && typeof n.selected == "object" && "from" in n.selected && n.selected.from instanceof Date ? n.selected.from : void 0, h = l?.getTime(), f = ce(!0);
1369
1370
  return Ue(() => {
1370
- o.mode === "single" && o.selected instanceof Date ? c(o.selected) : o.mode === "range" && o.selected && typeof o.selected == "object" && "from" in o.selected && o.selected.from instanceof Date && c(o.selected.from);
1371
- }, [o.selected, o.mode]), /* @__PURE__ */ ae(
1371
+ if (f.current) {
1372
+ f.current = !1;
1373
+ return;
1374
+ }
1375
+ l && c((u) => u.getFullYear() === l.getFullYear() && u.getMonth() === l.getMonth() ? u : l);
1376
+ }, [h]), /* @__PURE__ */ ae(
1372
1377
  ns,
1373
1378
  {
1374
1379
  weekStartsOn: 1,
1375
1380
  captionLayout: "dropdown-years",
1376
1381
  startMonth: new Date(r, 0),
1377
1382
  endMonth: new Date(i, 11),
1378
- ...o,
1383
+ ...n,
1379
1384
  month: a,
1380
1385
  onMonthChange: c,
1381
1386
  classNames: s,
1382
1387
  navLayout: "around",
1383
1388
  components: {
1384
- PreviousMonthButton: ({ ["aria-label"]: l, ...u }) => /* @__PURE__ */ ae(
1389
+ PreviousMonthButton: ({ ["aria-label"]: u, ...p }) => /* @__PURE__ */ ae(
1385
1390
  Ae,
1386
1391
  {
1387
1392
  ref: t,
1388
- variant: "text",
1393
+ variant: "tertiary-purple",
1389
1394
  size: "sm",
1390
1395
  iconOnly: !0,
1391
- "aria-label": l ?? "",
1392
- ...u,
1396
+ "aria-label": u ?? "",
1397
+ ...p,
1393
1398
  children: /* @__PURE__ */ ae(jt, { size: "sm" })
1394
1399
  }
1395
1400
  ),
1396
- NextMonthButton: ({ ["aria-label"]: l, ...u }) => /* @__PURE__ */ ae(Ae, { variant: "text", size: "sm", iconOnly: !0, "aria-label": l ?? "", ...u, children: /* @__PURE__ */ ae(zt, { size: "sm" }) })
1401
+ NextMonthButton: ({ ["aria-label"]: u, ...p }) => /* @__PURE__ */ ae(
1402
+ Ae,
1403
+ {
1404
+ variant: "tertiary-purple",
1405
+ size: "sm",
1406
+ iconOnly: !0,
1407
+ "aria-label": u ?? "",
1408
+ ...p,
1409
+ children: /* @__PURE__ */ ae(zt, { size: "sm" })
1410
+ }
1411
+ )
1397
1412
  }
1398
1413
  }
1399
1414
  );
1400
1415
  };
1401
- Ms.displayName = "Calendar";
1416
+ Ds.displayName = "Calendar";
1402
1417
  export {
1403
- Ms as C
1418
+ Ds as C,
1419
+ cn as i
1404
1420
  };
1405
- //# sourceMappingURL=calendar-DEXw83mu.mjs.map
1421
+ //# sourceMappingURL=calendar-d53vgYqR.mjs.map