prometeo-design-system 2.0.1 → 2.0.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.
@@ -1,11 +1,11 @@
1
1
  import { j as $ } from "./jsx-runtime-ByW6EXIE.js";
2
- import m, { createContext as mn, useContext as hn, useCallback as q, useRef as Ce, useLayoutEffect as yn, useState as Me, useEffect as Ge, useMemo as fe, memo as pn } from "react";
2
+ import m, { createContext as mn, useContext as hn, useCallback as q, useRef as Se, useLayoutEffect as yn, useState as he, useEffect as _e, useMemo as fe, memo as pn } from "react";
3
3
  import { InputMultiple as gn } from "./InputMultiple.es.js";
4
4
  import wn from "./Input.es.js";
5
5
  import { createPortal as bn } from "react-dom";
6
- import { Icons as yt } from "./Icons.es.js";
7
- import { c as Ve } from "./cn-B6yFEsav.js";
8
- import pt from "./Button.es.js";
6
+ import { Icons as Mt } from "./Icons.es.js";
7
+ import { c as Be } from "./cn-B6yFEsav.js";
8
+ import vt from "./Button.es.js";
9
9
  function Mn(e, t, n = "long") {
10
10
  return new Intl.DateTimeFormat("en-US", {
11
11
  // Enforces engine to render the time. Without the option JavaScriptCore omits it.
@@ -14,29 +14,29 @@ function Mn(e, t, n = "long") {
14
14
  timeZoneName: n
15
15
  }).format(t).split(/\s/g).slice(2).join(" ");
16
16
  }
17
- const vn = {}, _e = {};
18
- function ve(e, t) {
17
+ const vn = {}, Fe = {};
18
+ function ke(e, t) {
19
19
  try {
20
20
  const o = (vn[e] ||= new Intl.DateTimeFormat("en-US", {
21
21
  timeZone: e,
22
22
  timeZoneName: "longOffset"
23
23
  }).format)(t).split("GMT")[1];
24
- return o in _e ? _e[o] : gt(o, o.split(":"));
24
+ return o in Fe ? Fe[o] : Dt(o, o.split(":"));
25
25
  } catch {
26
- if (e in _e) return _e[e];
26
+ if (e in Fe) return Fe[e];
27
27
  const n = e?.match(Dn);
28
- return n ? gt(e, n.slice(1)) : NaN;
28
+ return n ? Dt(e, n.slice(1)) : NaN;
29
29
  }
30
30
  }
31
31
  const Dn = /([+-]\d\d):?(\d\d)?/;
32
- function gt(e, t) {
32
+ function Dt(e, t) {
33
33
  const n = +(t[0] || 0), o = +(t[1] || 0), r = +(t[2] || 0) / 60;
34
- return _e[e] = n * 60 + o > 0 ? n * 60 + o + r : n * 60 - o - r;
34
+ return Fe[e] = n * 60 + o > 0 ? n * 60 + o + r : n * 60 - o - r;
35
35
  }
36
36
  class re extends Date {
37
37
  //#region static
38
38
  constructor(...t) {
39
- super(), t.length > 1 && typeof t[t.length - 1] == "string" && (this.timeZone = t.pop()), this.internal = /* @__PURE__ */ new Date(), isNaN(ve(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)), Nt(this), ut(this)) : this.setTime(Date.now());
39
+ super(), t.length > 1 && typeof t[t.length - 1] == "string" && (this.timeZone = t.pop()), this.internal = /* @__PURE__ */ new Date(), isNaN(ke(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)), _t(this), pt(this)) : this.setTime(Date.now());
40
40
  }
41
41
  static tz(t, ...n) {
42
42
  return n.length ? new re(...n, t) : new re(Date.now(), t);
@@ -47,13 +47,13 @@ class re extends Date {
47
47
  return new re(+this, t);
48
48
  }
49
49
  getTimezoneOffset() {
50
- const t = -ve(this.timeZone, this);
50
+ const t = -ke(this.timeZone, this);
51
51
  return t > 0 ? Math.floor(t) : Math.ceil(t);
52
52
  }
53
53
  //#endregion
54
54
  //#region time
55
55
  setTime(t) {
56
- return Date.prototype.setTime.apply(this, arguments), ut(this), +this;
56
+ return Date.prototype.setTime.apply(this, arguments), pt(this), +this;
57
57
  }
58
58
  //#endregion
59
59
  //#region date-fns integration
@@ -62,26 +62,26 @@ class re extends Date {
62
62
  }
63
63
  //#endregion
64
64
  }
65
- const wt = /^(get|set)(?!UTC)/;
65
+ const kt = /^(get|set)(?!UTC)/;
66
66
  Object.getOwnPropertyNames(Date.prototype).forEach((e) => {
67
- if (!wt.test(e)) return;
68
- const t = e.replace(wt, "$1UTC");
67
+ if (!kt.test(e)) return;
68
+ const t = e.replace(kt, "$1UTC");
69
69
  re.prototype[t] && (e.startsWith("get") ? re.prototype[e] = function() {
70
70
  return this.internal[t]();
71
71
  } : (re.prototype[e] = function() {
72
72
  return Date.prototype[t].apply(this.internal, arguments), kn(this), +this;
73
73
  }, re.prototype[t] = function() {
74
- return Date.prototype[t].apply(this, arguments), ut(this), +this;
74
+ return Date.prototype[t].apply(this, arguments), pt(this), +this;
75
75
  }));
76
76
  });
77
- function ut(e) {
78
- e.internal.setTime(+e), e.internal.setUTCSeconds(e.internal.getUTCSeconds() - Math.round(-ve(e.timeZone, e) * 60));
77
+ function pt(e) {
78
+ e.internal.setTime(+e), e.internal.setUTCSeconds(e.internal.getUTCSeconds() - Math.round(-ke(e.timeZone, e) * 60));
79
79
  }
80
80
  function kn(e) {
81
- 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()), Nt(e);
81
+ 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()), _t(e);
82
82
  }
83
- function Nt(e) {
84
- const t = ve(e.timeZone, e), n = t > 0 ? Math.floor(t) : Math.ceil(t), o = /* @__PURE__ */ new Date(+e);
83
+ function _t(e) {
84
+ const t = ke(e.timeZone, e), n = t > 0 ? Math.floor(t) : Math.ceil(t), o = /* @__PURE__ */ new Date(+e);
85
85
  o.setUTCHours(o.getUTCHours() - 1);
86
86
  const r = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset(), a = -(/* @__PURE__ */ new Date(+o)).getTimezoneOffset(), i = r - a, s = Date.prototype.getHours.apply(e) !== e.internal.getUTCHours();
87
87
  i && s && e.internal.setUTCMinutes(e.internal.getUTCMinutes() + i);
@@ -89,19 +89,19 @@ function Nt(e) {
89
89
  c && Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + c);
90
90
  const d = /* @__PURE__ */ new Date(+e);
91
91
  d.setUTCSeconds(0);
92
- const l = r > 0 ? d.getSeconds() : (d.getSeconds() - 60) % 60, u = Math.round(-(ve(e.timeZone, e) * 60)) % 60;
92
+ const l = r > 0 ? d.getSeconds() : (d.getSeconds() - 60) % 60, u = Math.round(-(ke(e.timeZone, e) * 60)) % 60;
93
93
  (u || l) && (e.internal.setUTCSeconds(e.internal.getUTCSeconds() + u), Date.prototype.setUTCSeconds.call(e, Date.prototype.getUTCSeconds.call(e) + u + l));
94
- const f = ve(e.timeZone, e), w = f > 0 ? Math.floor(f) : Math.ceil(f), W = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset() - w, b = w !== n, O = W - c;
94
+ const f = ke(e.timeZone, e), w = f > 0 ? Math.floor(f) : Math.ceil(f), W = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset() - w, b = w !== n, O = W - c;
95
95
  if (b && O) {
96
96
  Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + O);
97
- const y = ve(e.timeZone, e), g = y > 0 ? Math.floor(y) : Math.ceil(y), x = w - g;
97
+ const y = ke(e.timeZone, e), g = y > 0 ? Math.floor(y) : Math.ceil(y), x = w - g;
98
98
  x && (e.internal.setUTCMinutes(e.internal.getUTCMinutes() + x), Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + x));
99
99
  }
100
100
  }
101
- class z extends re {
101
+ class R extends re {
102
102
  //#region static
103
103
  static tz(t, ...n) {
104
- return n.length ? new z(...n, t) : new z(Date.now(), t);
104
+ return n.length ? new R(...n, t) : new R(Date.now(), t);
105
105
  }
106
106
  //#endregion
107
107
  //#region representation
@@ -146,27 +146,27 @@ class z extends re {
146
146
  }
147
147
  //#endregion
148
148
  withTimeZone(t) {
149
- return new z(+this, t);
149
+ return new R(+this, t);
150
150
  }
151
151
  //#region date-fns integration
152
152
  [Symbol.for("constructDateFrom")](t) {
153
- return new z(+new Date(t), this.timeZone);
153
+ return new R(+new Date(t), this.timeZone);
154
154
  }
155
155
  //#endregion
156
156
  }
157
- const Pt = 6048e5, On = 864e5, bt = Symbol.for("constructDateFrom");
157
+ const Ft = 6048e5, On = 864e5, Ot = Symbol.for("constructDateFrom");
158
158
  function A(e, t) {
159
- return typeof e == "function" ? e(t) : e && typeof e == "object" && bt in e ? e[bt](t) : e instanceof Date ? new e.constructor(t) : new Date(t);
159
+ return typeof e == "function" ? e(t) : e && typeof e == "object" && Ot in e ? e[Ot](t) : e instanceof Date ? new e.constructor(t) : new Date(t);
160
160
  }
161
- function E(e, t) {
161
+ function Y(e, t) {
162
162
  return A(t || e, e);
163
163
  }
164
- function Tt(e, t, n) {
165
- const o = E(e, n?.in);
164
+ function Bt(e, t, n) {
165
+ const o = Y(e, n?.in);
166
166
  return isNaN(t) ? A(e, NaN) : (t && o.setDate(o.getDate() + t), o);
167
167
  }
168
- function Et(e, t, n) {
169
- const o = E(e, n?.in);
168
+ function It(e, t, n) {
169
+ const o = Y(e, n?.in);
170
170
  if (isNaN(t)) return A(e, NaN);
171
171
  if (!t)
172
172
  return o;
@@ -180,26 +180,26 @@ function Et(e, t, n) {
180
180
  ), o);
181
181
  }
182
182
  let Wn = {};
183
- function je() {
183
+ function He() {
184
184
  return Wn;
185
185
  }
186
- function Ne(e, t) {
187
- const n = je(), o = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, r = E(e, t?.in), a = r.getDay(), i = (a < o ? 7 : 0) + a - o;
186
+ function xe(e, t) {
187
+ const n = He(), o = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, r = Y(e, t?.in), a = r.getDay(), i = (a < o ? 7 : 0) + a - o;
188
188
  return r.setDate(r.getDate() - i), r.setHours(0, 0, 0, 0), r;
189
189
  }
190
- function Fe(e, t) {
191
- return Ne(e, { ...t, weekStartsOn: 1 });
190
+ function Ie(e, t) {
191
+ return xe(e, { ...t, weekStartsOn: 1 });
192
192
  }
193
- function Yt(e, t) {
194
- const n = E(e, t?.in), o = n.getFullYear(), r = A(n, 0);
193
+ function jt(e, t) {
194
+ const n = Y(e, t?.in), o = n.getFullYear(), r = A(n, 0);
195
195
  r.setFullYear(o + 1, 0, 4), r.setHours(0, 0, 0, 0);
196
- const a = Fe(r), i = A(n, 0);
196
+ const a = Ie(r), i = A(n, 0);
197
197
  i.setFullYear(o, 0, 4), i.setHours(0, 0, 0, 0);
198
- const s = Fe(i);
198
+ const s = Ie(i);
199
199
  return n.getTime() >= a.getTime() ? o + 1 : n.getTime() >= s.getTime() ? o : o - 1;
200
200
  }
201
- function Mt(e) {
202
- const t = E(e), n = new Date(
201
+ function Wt(e) {
202
+ const t = Y(e), n = new Date(
203
203
  Date.UTC(
204
204
  t.getFullYear(),
205
205
  t.getMonth(),
@@ -212,40 +212,40 @@ function Mt(e) {
212
212
  );
213
213
  return n.setUTCFullYear(t.getFullYear()), +e - +n;
214
214
  }
215
- function Pe(e, ...t) {
215
+ function Ne(e, ...t) {
216
216
  const n = A.bind(
217
217
  null,
218
218
  t.find((o) => typeof o == "object")
219
219
  );
220
220
  return t.map(n);
221
221
  }
222
- function Be(e, t) {
223
- const n = E(e, t?.in);
222
+ function je(e, t) {
223
+ const n = Y(e, t?.in);
224
224
  return n.setHours(0, 0, 0, 0), n;
225
225
  }
226
- function _t(e, t, n) {
227
- const [o, r] = Pe(
226
+ function Ht(e, t, n) {
227
+ const [o, r] = Ne(
228
228
  n?.in,
229
229
  e,
230
230
  t
231
- ), a = Be(o), i = Be(r), s = +a - Mt(a), c = +i - Mt(i);
231
+ ), a = je(o), i = je(r), s = +a - Wt(a), c = +i - Wt(i);
232
232
  return Math.round((s - c) / On);
233
233
  }
234
234
  function Sn(e, t) {
235
- const n = Yt(e, t), o = A(e, 0);
236
- return o.setFullYear(n, 0, 4), o.setHours(0, 0, 0, 0), Fe(o);
235
+ const n = jt(e, t), o = A(e, 0);
236
+ return o.setFullYear(n, 0, 4), o.setHours(0, 0, 0, 0), Ie(o);
237
237
  }
238
238
  function Cn(e, t, n) {
239
- return Tt(e, t * 7, n);
239
+ return Bt(e, t * 7, n);
240
240
  }
241
241
  function xn(e, t, n) {
242
- return Et(e, t * 12, n);
242
+ return It(e, t * 12, n);
243
243
  }
244
244
  function Nn(e, t) {
245
245
  let n, o = t?.in;
246
246
  return e.forEach((r) => {
247
247
  !o && typeof r == "object" && (o = A.bind(null, r));
248
- const a = E(r, o);
248
+ const a = Y(r, o);
249
249
  (!n || n < a || isNaN(+a)) && (n = a);
250
250
  }), A(o, n || NaN);
251
251
  }
@@ -253,26 +253,26 @@ function Pn(e, t) {
253
253
  let n, o = t?.in;
254
254
  return e.forEach((r) => {
255
255
  !o && typeof r == "object" && (o = A.bind(null, r));
256
- const a = E(r, o);
256
+ const a = Y(r, o);
257
257
  (!n || n > a || isNaN(+a)) && (n = a);
258
258
  }), A(o, n || NaN);
259
259
  }
260
260
  function Tn(e, t, n) {
261
- const [o, r] = Pe(
261
+ const [o, r] = Ne(
262
262
  n?.in,
263
263
  e,
264
264
  t
265
265
  );
266
- return +Be(o) == +Be(r);
266
+ return +je(o) == +je(r);
267
267
  }
268
- function Ft(e) {
268
+ function At(e) {
269
269
  return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]";
270
270
  }
271
- function En(e) {
272
- return !(!Ft(e) && typeof e != "number" || isNaN(+E(e)));
271
+ function Yn(e) {
272
+ return !(!At(e) && typeof e != "number" || isNaN(+Y(e)));
273
273
  }
274
- function Yn(e, t, n) {
275
- const [o, r] = Pe(
274
+ function En(e, t, n) {
275
+ const [o, r] = Ne(
276
276
  n?.in,
277
277
  e,
278
278
  t
@@ -280,15 +280,15 @@ function Yn(e, t, n) {
280
280
  return a * 12 + i;
281
281
  }
282
282
  function _n(e, t) {
283
- const n = E(e, t?.in), o = n.getMonth();
283
+ const n = Y(e, t?.in), o = n.getMonth();
284
284
  return n.setFullYear(n.getFullYear(), o + 1, 0), n.setHours(23, 59, 59, 999), n;
285
285
  }
286
- function Bt(e, t) {
287
- const [n, o] = Pe(e, t.start, t.end);
286
+ function $t(e, t) {
287
+ const [n, o] = Ne(e, t.start, t.end);
288
288
  return { start: n, end: o };
289
289
  }
290
290
  function Fn(e, t) {
291
- const { start: n, end: o } = Bt(t?.in, e);
291
+ const { start: n, end: o } = $t(t?.in, e);
292
292
  let r = +n > +o;
293
293
  const a = r ? +n : +o, i = r ? o : n;
294
294
  i.setHours(0, 0, 0, 0), i.setDate(1);
@@ -299,19 +299,19 @@ function Fn(e, t) {
299
299
  return r ? c.reverse() : c;
300
300
  }
301
301
  function Bn(e, t) {
302
- const n = E(e, t?.in);
302
+ const n = Y(e, t?.in);
303
303
  return n.setDate(1), n.setHours(0, 0, 0, 0), n;
304
304
  }
305
- function jn(e, t) {
306
- const n = E(e, t?.in), o = n.getFullYear();
305
+ function In(e, t) {
306
+ const n = Y(e, t?.in), o = n.getFullYear();
307
307
  return n.setFullYear(o + 1, 0, 0), n.setHours(23, 59, 59, 999), n;
308
308
  }
309
- function jt(e, t) {
310
- const n = E(e, t?.in);
309
+ function qt(e, t) {
310
+ const n = Y(e, t?.in);
311
311
  return n.setFullYear(n.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
312
312
  }
313
- function In(e, t) {
314
- const { start: n, end: o } = Bt(t?.in, e);
313
+ function jn(e, t) {
314
+ const { start: n, end: o } = $t(t?.in, e);
315
315
  let r = +n > +o;
316
316
  const a = r ? +n : +o, i = r ? o : n;
317
317
  i.setHours(0, 0, 0, 0), i.setMonth(0, 1);
@@ -321,12 +321,12 @@ function In(e, t) {
321
321
  c.push(A(n, i)), i.setFullYear(i.getFullYear() + s);
322
322
  return r ? c.reverse() : c;
323
323
  }
324
- function It(e, t) {
325
- const n = je(), o = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, r = E(e, t?.in), a = r.getDay(), i = (a < o ? -7 : 0) + 6 - (a - o);
324
+ function Rt(e, t) {
325
+ const n = He(), o = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, r = Y(e, t?.in), a = r.getDay(), i = (a < o ? -7 : 0) + 6 - (a - o);
326
326
  return r.setDate(r.getDate() + i), r.setHours(23, 59, 59, 999), r;
327
327
  }
328
328
  function Hn(e, t) {
329
- return It(e, { ...t, weekStartsOn: 1 });
329
+ return Rt(e, { ...t, weekStartsOn: 1 });
330
330
  }
331
331
  const An = {
332
332
  lessThanXSeconds: {
@@ -395,7 +395,7 @@ const An = {
395
395
  const r = An[e];
396
396
  return typeof r == "string" ? o = r : t === 1 ? o = r.one : o = r.other.replace("{{count}}", t.toString()), n?.addSuffix ? n.comparison && n.comparison > 0 ? "in " + o : o + " ago" : o;
397
397
  };
398
- function xe(e) {
398
+ function Ce(e) {
399
399
  return (t = {}) => {
400
400
  const n = t.width ? String(t.width) : e.defaultWidth;
401
401
  return e.formats[n] || e.formats[e.defaultWidth];
@@ -417,15 +417,15 @@ const qn = {
417
417
  medium: "{{date}}, {{time}}",
418
418
  short: "{{date}}, {{time}}"
419
419
  }, zn = {
420
- date: xe({
420
+ date: Ce({
421
421
  formats: qn,
422
422
  defaultWidth: "full"
423
423
  }),
424
- time: xe({
424
+ time: Ce({
425
425
  formats: Rn,
426
426
  defaultWidth: "full"
427
427
  }),
428
- dateTime: xe({
428
+ dateTime: Ce({
429
429
  formats: Ln,
430
430
  defaultWidth: "full"
431
431
  })
@@ -631,7 +631,7 @@ function oo(e, t) {
631
631
  if (t(e[n]))
632
632
  return n;
633
633
  }
634
- function Ht(e) {
634
+ function Lt(e) {
635
635
  return (t, n = {}) => {
636
636
  const o = t.match(e.matchPattern);
637
637
  if (!o) return null;
@@ -711,7 +711,7 @@ const ro = /^(\d+)(th|st|nd|rd)?/i, ao = /\d+/i, so = {
711
711
  night: /night/i
712
712
  }
713
713
  }, go = {
714
- ordinalNumber: Ht({
714
+ ordinalNumber: Lt({
715
715
  matchPattern: ro,
716
716
  parsePattern: ao,
717
717
  valueCallback: (e) => parseInt(e, 10)
@@ -747,7 +747,7 @@ const ro = /^(\d+)(th|st|nd|rd)?/i, ao = /\d+/i, so = {
747
747
  parsePatterns: po,
748
748
  defaultParseWidth: "any"
749
749
  })
750
- }, lt = {
750
+ }, wt = {
751
751
  code: "en-US",
752
752
  formatDistance: $n,
753
753
  formatLong: zn,
@@ -760,34 +760,34 @@ const ro = /^(\d+)(th|st|nd|rd)?/i, ao = /\d+/i, so = {
760
760
  }
761
761
  };
762
762
  function wo(e, t) {
763
- const n = E(e, t?.in);
764
- return _t(n, jt(n)) + 1;
763
+ const n = Y(e, t?.in);
764
+ return Ht(n, qt(n)) + 1;
765
765
  }
766
- function At(e, t) {
767
- const n = E(e, t?.in), o = +Fe(n) - +Sn(n);
768
- return Math.round(o / Pt) + 1;
766
+ function zt(e, t) {
767
+ const n = Y(e, t?.in), o = +Ie(n) - +Sn(n);
768
+ return Math.round(o / Ft) + 1;
769
769
  }
770
- function $t(e, t) {
771
- const n = E(e, t?.in), o = n.getFullYear(), r = je(), a = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? r.firstWeekContainsDate ?? r.locale?.options?.firstWeekContainsDate ?? 1, i = A(t?.in || e, 0);
770
+ function Zt(e, t) {
771
+ const n = Y(e, t?.in), o = n.getFullYear(), r = He(), a = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? r.firstWeekContainsDate ?? r.locale?.options?.firstWeekContainsDate ?? 1, i = A(t?.in || e, 0);
772
772
  i.setFullYear(o + 1, 0, a), i.setHours(0, 0, 0, 0);
773
- const s = Ne(i, t), c = A(t?.in || e, 0);
773
+ const s = xe(i, t), c = A(t?.in || e, 0);
774
774
  c.setFullYear(o, 0, a), c.setHours(0, 0, 0, 0);
775
- const d = Ne(c, t);
775
+ const d = xe(c, t);
776
776
  return +n >= +s ? o + 1 : +n >= +d ? o : o - 1;
777
777
  }
778
778
  function bo(e, t) {
779
- const n = je(), o = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, r = $t(e, t), a = A(t?.in || e, 0);
780
- return a.setFullYear(r, 0, o), a.setHours(0, 0, 0, 0), Ne(a, t);
779
+ const n = He(), o = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, r = Zt(e, t), a = A(t?.in || e, 0);
780
+ return a.setFullYear(r, 0, o), a.setHours(0, 0, 0, 0), xe(a, t);
781
781
  }
782
- function qt(e, t) {
783
- const n = E(e, t?.in), o = +Ne(n, t) - +bo(n, t);
784
- return Math.round(o / Pt) + 1;
782
+ function Gt(e, t) {
783
+ const n = Y(e, t?.in), o = +xe(n, t) - +bo(n, t);
784
+ return Math.round(o / Ft) + 1;
785
785
  }
786
786
  function T(e, t) {
787
787
  const n = e < 0 ? "-" : "", o = Math.abs(e).toString().padStart(t, "0");
788
788
  return n + o;
789
789
  }
790
- const he = {
790
+ const me = {
791
791
  // Year
792
792
  y(e, t) {
793
793
  const n = e.getFullYear(), o = n > 0 ? n : 1 - n;
@@ -841,14 +841,14 @@ const he = {
841
841
  );
842
842
  return T(r, t.length);
843
843
  }
844
- }, Se = {
844
+ }, We = {
845
845
  midnight: "midnight",
846
846
  noon: "noon",
847
847
  morning: "morning",
848
848
  afternoon: "afternoon",
849
849
  evening: "evening",
850
850
  night: "night"
851
- }, vt = {
851
+ }, St = {
852
852
  // Era
853
853
  G: function(e, t, n) {
854
854
  const o = e.getFullYear() > 0 ? 1 : 0;
@@ -873,11 +873,11 @@ const he = {
873
873
  const o = e.getFullYear(), r = o > 0 ? o : 1 - o;
874
874
  return n.ordinalNumber(r, { unit: "year" });
875
875
  }
876
- return he.y(e, t);
876
+ return me.y(e, t);
877
877
  },
878
878
  // Local week-numbering year
879
879
  Y: function(e, t, n, o) {
880
- const r = $t(e, o), a = r > 0 ? r : 1 - r;
880
+ const r = Zt(e, o), a = r > 0 ? r : 1 - r;
881
881
  if (t === "YY") {
882
882
  const i = a % 100;
883
883
  return T(i, 2);
@@ -886,7 +886,7 @@ const he = {
886
886
  },
887
887
  // ISO week-numbering year
888
888
  R: function(e, t) {
889
- const n = Yt(e);
889
+ const n = jt(e);
890
890
  return T(n, t.length);
891
891
  },
892
892
  // Extended year. This is a single number designating the year of this calendar system.
@@ -976,7 +976,7 @@ const he = {
976
976
  switch (t) {
977
977
  case "M":
978
978
  case "MM":
979
- return he.M(e, t);
979
+ return me.M(e, t);
980
980
  // 1st, 2nd, ..., 12th
981
981
  case "Mo":
982
982
  return n.ordinalNumber(o + 1, { unit: "month" });
@@ -1031,17 +1031,17 @@ const he = {
1031
1031
  },
1032
1032
  // Local week of year
1033
1033
  w: function(e, t, n, o) {
1034
- const r = qt(e, o);
1034
+ const r = Gt(e, o);
1035
1035
  return t === "wo" ? n.ordinalNumber(r, { unit: "week" }) : T(r, t.length);
1036
1036
  },
1037
1037
  // ISO week of year
1038
1038
  I: function(e, t, n) {
1039
- const o = At(e);
1039
+ const o = zt(e);
1040
1040
  return t === "Io" ? n.ordinalNumber(o, { unit: "week" }) : T(o, t.length);
1041
1041
  },
1042
1042
  // Day of the month
1043
1043
  d: function(e, t, n) {
1044
- return t === "do" ? n.ordinalNumber(e.getDate(), { unit: "date" }) : he.d(e, t);
1044
+ return t === "do" ? n.ordinalNumber(e.getDate(), { unit: "date" }) : me.d(e, t);
1045
1045
  },
1046
1046
  // Day of year
1047
1047
  D: function(e, t, n) {
@@ -1231,7 +1231,7 @@ const he = {
1231
1231
  b: function(e, t, n) {
1232
1232
  const o = e.getHours();
1233
1233
  let r;
1234
- switch (o === 12 ? r = Se.noon : o === 0 ? r = Se.midnight : r = o / 12 >= 1 ? "pm" : "am", t) {
1234
+ switch (o === 12 ? r = We.noon : o === 0 ? r = We.midnight : r = o / 12 >= 1 ? "pm" : "am", t) {
1235
1235
  case "b":
1236
1236
  case "bb":
1237
1237
  return n.dayPeriod(r, {
@@ -1260,7 +1260,7 @@ const he = {
1260
1260
  B: function(e, t, n) {
1261
1261
  const o = e.getHours();
1262
1262
  let r;
1263
- switch (o >= 17 ? r = Se.evening : o >= 12 ? r = Se.afternoon : o >= 4 ? r = Se.morning : r = Se.night, t) {
1263
+ switch (o >= 17 ? r = We.evening : o >= 12 ? r = We.afternoon : o >= 4 ? r = We.morning : r = We.night, t) {
1264
1264
  case "B":
1265
1265
  case "BB":
1266
1266
  case "BBB":
@@ -1287,11 +1287,11 @@ const he = {
1287
1287
  let o = e.getHours() % 12;
1288
1288
  return o === 0 && (o = 12), n.ordinalNumber(o, { unit: "hour" });
1289
1289
  }
1290
- return he.h(e, t);
1290
+ return me.h(e, t);
1291
1291
  },
1292
1292
  // Hour [0-23]
1293
1293
  H: function(e, t, n) {
1294
- return t === "Ho" ? n.ordinalNumber(e.getHours(), { unit: "hour" }) : he.H(e, t);
1294
+ return t === "Ho" ? n.ordinalNumber(e.getHours(), { unit: "hour" }) : me.H(e, t);
1295
1295
  },
1296
1296
  // Hour [0-11]
1297
1297
  K: function(e, t, n) {
@@ -1305,15 +1305,15 @@ const he = {
1305
1305
  },
1306
1306
  // Minute
1307
1307
  m: function(e, t, n) {
1308
- return t === "mo" ? n.ordinalNumber(e.getMinutes(), { unit: "minute" }) : he.m(e, t);
1308
+ return t === "mo" ? n.ordinalNumber(e.getMinutes(), { unit: "minute" }) : me.m(e, t);
1309
1309
  },
1310
1310
  // Second
1311
1311
  s: function(e, t, n) {
1312
- return t === "so" ? n.ordinalNumber(e.getSeconds(), { unit: "second" }) : he.s(e, t);
1312
+ return t === "so" ? n.ordinalNumber(e.getSeconds(), { unit: "second" }) : me.s(e, t);
1313
1313
  },
1314
1314
  // Fraction of second
1315
1315
  S: function(e, t) {
1316
- return he.S(e, t);
1316
+ return me.S(e, t);
1317
1317
  },
1318
1318
  // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
1319
1319
  X: function(e, t, n) {
@@ -1323,13 +1323,13 @@ const he = {
1323
1323
  switch (t) {
1324
1324
  // Hours and optional minutes
1325
1325
  case "X":
1326
- return kt(o);
1326
+ return xt(o);
1327
1327
  // Hours, minutes and optional seconds without `:` delimiter
1328
1328
  // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1329
1329
  // so this token always has the same output as `XX`
1330
1330
  case "XXXX":
1331
1331
  case "XX":
1332
- return be(o);
1332
+ return De(o);
1333
1333
  // Hours, minutes and optional seconds with `:` delimiter
1334
1334
  // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1335
1335
  // so this token always has the same output as `XXX`
@@ -1337,7 +1337,7 @@ const he = {
1337
1337
  case "XXX":
1338
1338
  // Hours and minutes with `:` delimiter
1339
1339
  default:
1340
- return be(o, ":");
1340
+ return De(o, ":");
1341
1341
  }
1342
1342
  },
1343
1343
  // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
@@ -1346,13 +1346,13 @@ const he = {
1346
1346
  switch (t) {
1347
1347
  // Hours and optional minutes
1348
1348
  case "x":
1349
- return kt(o);
1349
+ return xt(o);
1350
1350
  // Hours, minutes and optional seconds without `:` delimiter
1351
1351
  // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1352
1352
  // so this token always has the same output as `xx`
1353
1353
  case "xxxx":
1354
1354
  case "xx":
1355
- return be(o);
1355
+ return De(o);
1356
1356
  // Hours, minutes and optional seconds with `:` delimiter
1357
1357
  // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1358
1358
  // so this token always has the same output as `xxx`
@@ -1360,7 +1360,7 @@ const he = {
1360
1360
  case "xxx":
1361
1361
  // Hours and minutes with `:` delimiter
1362
1362
  default:
1363
- return be(o, ":");
1363
+ return De(o, ":");
1364
1364
  }
1365
1365
  },
1366
1366
  // Timezone (GMT)
@@ -1371,11 +1371,11 @@ const he = {
1371
1371
  case "O":
1372
1372
  case "OO":
1373
1373
  case "OOO":
1374
- return "GMT" + Dt(o, ":");
1374
+ return "GMT" + Ct(o, ":");
1375
1375
  // Long
1376
1376
  case "OOOO":
1377
1377
  default:
1378
- return "GMT" + be(o, ":");
1378
+ return "GMT" + De(o, ":");
1379
1379
  }
1380
1380
  },
1381
1381
  // Timezone (specific non-location)
@@ -1386,11 +1386,11 @@ const he = {
1386
1386
  case "z":
1387
1387
  case "zz":
1388
1388
  case "zzz":
1389
- return "GMT" + Dt(o, ":");
1389
+ return "GMT" + Ct(o, ":");
1390
1390
  // Long
1391
1391
  case "zzzz":
1392
1392
  default:
1393
- return "GMT" + be(o, ":");
1393
+ return "GMT" + De(o, ":");
1394
1394
  }
1395
1395
  },
1396
1396
  // Seconds timestamp
@@ -1403,18 +1403,18 @@ const he = {
1403
1403
  return T(+e, t.length);
1404
1404
  }
1405
1405
  };
1406
- function Dt(e, t = "") {
1406
+ function Ct(e, t = "") {
1407
1407
  const n = e > 0 ? "-" : "+", o = Math.abs(e), r = Math.trunc(o / 60), a = o % 60;
1408
1408
  return a === 0 ? n + String(r) : n + String(r) + t + T(a, 2);
1409
1409
  }
1410
- function kt(e, t) {
1411
- return e % 60 === 0 ? (e > 0 ? "-" : "+") + T(Math.abs(e) / 60, 2) : be(e, t);
1410
+ function xt(e, t) {
1411
+ return e % 60 === 0 ? (e > 0 ? "-" : "+") + T(Math.abs(e) / 60, 2) : De(e, t);
1412
1412
  }
1413
- function be(e, t = "") {
1413
+ function De(e, t = "") {
1414
1414
  const n = e > 0 ? "-" : "+", o = Math.abs(e), r = T(Math.trunc(o / 60), 2), a = T(o % 60, 2);
1415
1415
  return n + r + t + a;
1416
1416
  }
1417
- const Ot = (e, t) => {
1417
+ const Nt = (e, t) => {
1418
1418
  switch (e) {
1419
1419
  case "P":
1420
1420
  return t.date({ width: "short" });
@@ -1426,7 +1426,7 @@ const Ot = (e, t) => {
1426
1426
  default:
1427
1427
  return t.date({ width: "full" });
1428
1428
  }
1429
- }, Rt = (e, t) => {
1429
+ }, Vt = (e, t) => {
1430
1430
  switch (e) {
1431
1431
  case "p":
1432
1432
  return t.time({ width: "short" });
@@ -1441,7 +1441,7 @@ const Ot = (e, t) => {
1441
1441
  }, Mo = (e, t) => {
1442
1442
  const n = e.match(/(P+)(p+)?/) || [], o = n[1], r = n[2];
1443
1443
  if (!r)
1444
- return Ot(e, t);
1444
+ return Nt(e, t);
1445
1445
  let a;
1446
1446
  switch (o) {
1447
1447
  case "P":
@@ -1458,9 +1458,9 @@ const Ot = (e, t) => {
1458
1458
  a = t.dateTime({ width: "full" });
1459
1459
  break;
1460
1460
  }
1461
- return a.replace("{{date}}", Ot(o, t)).replace("{{time}}", Rt(r, t));
1461
+ return a.replace("{{date}}", Nt(o, t)).replace("{{time}}", Vt(r, t));
1462
1462
  }, vo = {
1463
- p: Rt,
1463
+ p: Vt,
1464
1464
  P: Mo
1465
1465
  }, Do = /^D+$/, ko = /^Y+$/, Oo = ["D", "DD", "YY", "YYYY"];
1466
1466
  function Wo(e) {
@@ -1477,10 +1477,10 @@ function xo(e, t, n) {
1477
1477
  const o = e[0] === "Y" ? "years" : "days of the month";
1478
1478
  return `Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${o} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
1479
1479
  }
1480
- const No = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Po = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, To = /^'([^]*?)'?$/, Eo = /''/g, Yo = /[a-zA-Z]/;
1480
+ const No = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Po = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, To = /^'([^]*?)'?$/, Yo = /''/g, Eo = /[a-zA-Z]/;
1481
1481
  function _o(e, t, n) {
1482
- const o = je(), r = n?.locale ?? o.locale ?? lt, a = n?.firstWeekContainsDate ?? n?.locale?.options?.firstWeekContainsDate ?? o.firstWeekContainsDate ?? o.locale?.options?.firstWeekContainsDate ?? 1, i = n?.weekStartsOn ?? n?.locale?.options?.weekStartsOn ?? o.weekStartsOn ?? o.locale?.options?.weekStartsOn ?? 0, s = E(e, n?.in);
1483
- if (!En(s))
1482
+ const o = He(), r = n?.locale ?? o.locale ?? wt, a = n?.firstWeekContainsDate ?? n?.locale?.options?.firstWeekContainsDate ?? o.firstWeekContainsDate ?? o.locale?.options?.firstWeekContainsDate ?? 1, i = n?.weekStartsOn ?? n?.locale?.options?.weekStartsOn ?? o.weekStartsOn ?? o.locale?.options?.weekStartsOn ?? 0, s = Y(e, n?.in);
1483
+ if (!Yn(s))
1484
1484
  throw new RangeError("Invalid time value");
1485
1485
  let c = t.match(Po).map((l) => {
1486
1486
  const u = l[0];
@@ -1495,9 +1495,9 @@ function _o(e, t, n) {
1495
1495
  const u = l[0];
1496
1496
  if (u === "'")
1497
1497
  return { isToken: !1, value: Fo(l) };
1498
- if (vt[u])
1498
+ if (St[u])
1499
1499
  return { isToken: !0, value: l };
1500
- if (u.match(Yo))
1500
+ if (u.match(Eo))
1501
1501
  throw new RangeError(
1502
1502
  "Format string contains an unescaped latin alphabet character `" + u + "`"
1503
1503
  );
@@ -1513,32 +1513,32 @@ function _o(e, t, n) {
1513
1513
  if (!l.isToken) return l.value;
1514
1514
  const u = l.value;
1515
1515
  (!n?.useAdditionalWeekYearTokens && So(u) || !n?.useAdditionalDayOfYearTokens && Wo(u)) && Co(u, t, String(e));
1516
- const f = vt[u[0]];
1516
+ const f = St[u[0]];
1517
1517
  return f(s, u, r.localize, d);
1518
1518
  }).join("");
1519
1519
  }
1520
1520
  function Fo(e) {
1521
1521
  const t = e.match(To);
1522
- return t ? t[1].replace(Eo, "'") : e;
1522
+ return t ? t[1].replace(Yo, "'") : e;
1523
1523
  }
1524
1524
  function Bo(e, t) {
1525
- const n = E(e, t?.in), o = n.getFullYear(), r = n.getMonth(), a = A(n, 0);
1525
+ const n = Y(e, t?.in), o = n.getFullYear(), r = n.getMonth(), a = A(n, 0);
1526
1526
  return a.setFullYear(o, r + 1, 0), a.setHours(0, 0, 0, 0), a.getDate();
1527
1527
  }
1528
- function jo(e, t) {
1529
- return E(e, t?.in).getMonth();
1530
- }
1531
1528
  function Io(e, t) {
1532
- return E(e, t?.in).getFullYear();
1529
+ return Y(e, t?.in).getMonth();
1530
+ }
1531
+ function jo(e, t) {
1532
+ return Y(e, t?.in).getFullYear();
1533
1533
  }
1534
1534
  function Ho(e, t) {
1535
- return +E(e) > +E(t);
1535
+ return +Y(e) > +Y(t);
1536
1536
  }
1537
1537
  function Ao(e, t) {
1538
- return +E(e) < +E(t);
1538
+ return +Y(e) < +Y(t);
1539
1539
  }
1540
1540
  function $o(e, t, n) {
1541
- const [o, r] = Pe(
1541
+ const [o, r] = Ne(
1542
1542
  n?.in,
1543
1543
  e,
1544
1544
  t
@@ -1546,7 +1546,7 @@ function $o(e, t, n) {
1546
1546
  return o.getFullYear() === r.getFullYear() && o.getMonth() === r.getMonth();
1547
1547
  }
1548
1548
  function qo(e, t, n) {
1549
- const [o, r] = Pe(
1549
+ const [o, r] = Ne(
1550
1550
  n?.in,
1551
1551
  e,
1552
1552
  t
@@ -1554,26 +1554,26 @@ function qo(e, t, n) {
1554
1554
  return o.getFullYear() === r.getFullYear();
1555
1555
  }
1556
1556
  function Ro(e, t, n) {
1557
- const o = E(e, n?.in), r = o.getFullYear(), a = o.getDate(), i = A(e, 0);
1557
+ const o = Y(e, n?.in), r = o.getFullYear(), a = o.getDate(), i = A(e, 0);
1558
1558
  i.setFullYear(r, t, 15), i.setHours(0, 0, 0, 0);
1559
1559
  const s = Bo(i);
1560
1560
  return o.setMonth(t, Math.min(a, s)), o;
1561
1561
  }
1562
1562
  function Lo(e, t, n) {
1563
- const o = E(e, n?.in);
1563
+ const o = Y(e, n?.in);
1564
1564
  return isNaN(+o) ? A(e, NaN) : (o.setFullYear(t), o);
1565
1565
  }
1566
- const Wt = 5, zo = 4;
1566
+ const Pt = 5, zo = 4;
1567
1567
  function Zo(e, t) {
1568
- const n = t.startOfMonth(e), o = n.getDay() > 0 ? n.getDay() : 7, r = t.addDays(e, -o + 1), a = t.addDays(r, Wt * 7 - 1);
1569
- return t.getMonth(e) === t.getMonth(a) ? Wt : zo;
1568
+ const n = t.startOfMonth(e), o = n.getDay() > 0 ? n.getDay() : 7, r = t.addDays(e, -o + 1), a = t.addDays(r, Pt * 7 - 1);
1569
+ return t.getMonth(e) === t.getMonth(a) ? Pt : zo;
1570
1570
  }
1571
- function Lt(e, t) {
1571
+ function Xt(e, t) {
1572
1572
  const n = t.startOfMonth(e), o = n.getDay();
1573
1573
  return o === 1 ? n : o === 0 ? t.addDays(n, -6) : t.addDays(n, -1 * (o - 1));
1574
1574
  }
1575
1575
  function Go(e, t) {
1576
- const n = Lt(e, t), o = Zo(e, t);
1576
+ const n = Xt(e, t), o = Zo(e, t);
1577
1577
  return t.addDays(n, o * 7 - 1);
1578
1578
  }
1579
1579
  class K {
@@ -1584,18 +1584,18 @@ class K {
1584
1584
  * @param overrides Custom overrides for the date library functions.
1585
1585
  */
1586
1586
  constructor(t, n) {
1587
- this.Date = Date, this.today = () => this.overrides?.today ? this.overrides.today() : this.options.timeZone ? z.tz(this.options.timeZone) : new this.Date(), this.newDate = (o, r, a) => this.overrides?.newDate ? this.overrides.newDate(o, r, a) : this.options.timeZone ? new z(o, r, a, this.options.timeZone) : new Date(o, r, a), this.addDays = (o, r) => this.overrides?.addDays ? this.overrides.addDays(o, r) : Tt(o, r), this.addMonths = (o, r) => this.overrides?.addMonths ? this.overrides.addMonths(o, r) : Et(o, r), this.addWeeks = (o, r) => this.overrides?.addWeeks ? this.overrides.addWeeks(o, r) : Cn(o, r), this.addYears = (o, r) => this.overrides?.addYears ? this.overrides.addYears(o, r) : xn(o, r), this.differenceInCalendarDays = (o, r) => this.overrides?.differenceInCalendarDays ? this.overrides.differenceInCalendarDays(o, r) : _t(o, r), this.differenceInCalendarMonths = (o, r) => this.overrides?.differenceInCalendarMonths ? this.overrides.differenceInCalendarMonths(o, r) : Yn(o, r), this.eachMonthOfInterval = (o) => this.overrides?.eachMonthOfInterval ? this.overrides.eachMonthOfInterval(o) : Fn(o), this.eachYearOfInterval = (o) => {
1588
- const r = this.overrides?.eachYearOfInterval ? this.overrides.eachYearOfInterval(o) : In(o), a = new Set(r.map((s) => this.getYear(s)));
1587
+ this.Date = Date, this.today = () => this.overrides?.today ? this.overrides.today() : this.options.timeZone ? R.tz(this.options.timeZone) : new this.Date(), this.newDate = (o, r, a) => this.overrides?.newDate ? this.overrides.newDate(o, r, a) : this.options.timeZone ? new R(o, r, a, this.options.timeZone) : new Date(o, r, a), this.addDays = (o, r) => this.overrides?.addDays ? this.overrides.addDays(o, r) : Bt(o, r), this.addMonths = (o, r) => this.overrides?.addMonths ? this.overrides.addMonths(o, r) : It(o, r), this.addWeeks = (o, r) => this.overrides?.addWeeks ? this.overrides.addWeeks(o, r) : Cn(o, r), this.addYears = (o, r) => this.overrides?.addYears ? this.overrides.addYears(o, r) : xn(o, r), this.differenceInCalendarDays = (o, r) => this.overrides?.differenceInCalendarDays ? this.overrides.differenceInCalendarDays(o, r) : Ht(o, r), this.differenceInCalendarMonths = (o, r) => this.overrides?.differenceInCalendarMonths ? this.overrides.differenceInCalendarMonths(o, r) : En(o, r), this.eachMonthOfInterval = (o) => this.overrides?.eachMonthOfInterval ? this.overrides.eachMonthOfInterval(o) : Fn(o), this.eachYearOfInterval = (o) => {
1588
+ const r = this.overrides?.eachYearOfInterval ? this.overrides.eachYearOfInterval(o) : jn(o), a = new Set(r.map((s) => this.getYear(s)));
1589
1589
  if (a.size === r.length)
1590
1590
  return r;
1591
1591
  const i = [];
1592
1592
  return a.forEach((s) => {
1593
1593
  i.push(new Date(s, 0, 1));
1594
1594
  }), i;
1595
- }, this.endOfBroadcastWeek = (o) => this.overrides?.endOfBroadcastWeek ? this.overrides.endOfBroadcastWeek(o) : Go(o, this), this.endOfISOWeek = (o) => this.overrides?.endOfISOWeek ? this.overrides.endOfISOWeek(o) : Hn(o), this.endOfMonth = (o) => this.overrides?.endOfMonth ? this.overrides.endOfMonth(o) : _n(o), this.endOfWeek = (o, r) => this.overrides?.endOfWeek ? this.overrides.endOfWeek(o, r) : It(o, this.options), this.endOfYear = (o) => this.overrides?.endOfYear ? this.overrides.endOfYear(o) : jn(o), this.format = (o, r, a) => {
1595
+ }, this.endOfBroadcastWeek = (o) => this.overrides?.endOfBroadcastWeek ? this.overrides.endOfBroadcastWeek(o) : Go(o, this), this.endOfISOWeek = (o) => this.overrides?.endOfISOWeek ? this.overrides.endOfISOWeek(o) : Hn(o), this.endOfMonth = (o) => this.overrides?.endOfMonth ? this.overrides.endOfMonth(o) : _n(o), this.endOfWeek = (o, r) => this.overrides?.endOfWeek ? this.overrides.endOfWeek(o, r) : Rt(o, this.options), this.endOfYear = (o) => this.overrides?.endOfYear ? this.overrides.endOfYear(o) : In(o), this.format = (o, r, a) => {
1596
1596
  const i = this.overrides?.format ? this.overrides.format(o, r, this.options) : _o(o, r, this.options);
1597
1597
  return this.options.numerals && this.options.numerals !== "latn" ? this.replaceDigits(i) : i;
1598
- }, this.getISOWeek = (o) => this.overrides?.getISOWeek ? this.overrides.getISOWeek(o) : At(o), this.getMonth = (o, r) => this.overrides?.getMonth ? this.overrides.getMonth(o, this.options) : jo(o, this.options), this.getYear = (o, r) => this.overrides?.getYear ? this.overrides.getYear(o, this.options) : Io(o, this.options), this.getWeek = (o, r) => this.overrides?.getWeek ? this.overrides.getWeek(o, this.options) : qt(o, this.options), this.isAfter = (o, r) => this.overrides?.isAfter ? this.overrides.isAfter(o, r) : Ho(o, r), this.isBefore = (o, r) => this.overrides?.isBefore ? this.overrides.isBefore(o, r) : Ao(o, r), this.isDate = (o) => this.overrides?.isDate ? this.overrides.isDate(o) : Ft(o), this.isSameDay = (o, r) => this.overrides?.isSameDay ? this.overrides.isSameDay(o, r) : Tn(o, r), this.isSameMonth = (o, r) => this.overrides?.isSameMonth ? this.overrides.isSameMonth(o, r) : $o(o, r), this.isSameYear = (o, r) => this.overrides?.isSameYear ? this.overrides.isSameYear(o, r) : qo(o, r), this.max = (o) => this.overrides?.max ? this.overrides.max(o) : Nn(o), this.min = (o) => this.overrides?.min ? this.overrides.min(o) : Pn(o), this.setMonth = (o, r) => this.overrides?.setMonth ? this.overrides.setMonth(o, r) : Ro(o, r), this.setYear = (o, r) => this.overrides?.setYear ? this.overrides.setYear(o, r) : Lo(o, r), this.startOfBroadcastWeek = (o, r) => this.overrides?.startOfBroadcastWeek ? this.overrides.startOfBroadcastWeek(o, this) : Lt(o, this), this.startOfDay = (o) => this.overrides?.startOfDay ? this.overrides.startOfDay(o) : Be(o), this.startOfISOWeek = (o) => this.overrides?.startOfISOWeek ? this.overrides.startOfISOWeek(o) : Fe(o), this.startOfMonth = (o) => this.overrides?.startOfMonth ? this.overrides.startOfMonth(o) : Bn(o), this.startOfWeek = (o, r) => this.overrides?.startOfWeek ? this.overrides.startOfWeek(o, this.options) : Ne(o, this.options), this.startOfYear = (o) => this.overrides?.startOfYear ? this.overrides.startOfYear(o) : jt(o), this.options = { locale: lt, ...t }, this.overrides = n;
1598
+ }, this.getISOWeek = (o) => this.overrides?.getISOWeek ? this.overrides.getISOWeek(o) : zt(o), this.getMonth = (o, r) => this.overrides?.getMonth ? this.overrides.getMonth(o, this.options) : Io(o, this.options), this.getYear = (o, r) => this.overrides?.getYear ? this.overrides.getYear(o, this.options) : jo(o, this.options), this.getWeek = (o, r) => this.overrides?.getWeek ? this.overrides.getWeek(o, this.options) : Gt(o, this.options), this.isAfter = (o, r) => this.overrides?.isAfter ? this.overrides.isAfter(o, r) : Ho(o, r), this.isBefore = (o, r) => this.overrides?.isBefore ? this.overrides.isBefore(o, r) : Ao(o, r), this.isDate = (o) => this.overrides?.isDate ? this.overrides.isDate(o) : At(o), this.isSameDay = (o, r) => this.overrides?.isSameDay ? this.overrides.isSameDay(o, r) : Tn(o, r), this.isSameMonth = (o, r) => this.overrides?.isSameMonth ? this.overrides.isSameMonth(o, r) : $o(o, r), this.isSameYear = (o, r) => this.overrides?.isSameYear ? this.overrides.isSameYear(o, r) : qo(o, r), this.max = (o) => this.overrides?.max ? this.overrides.max(o) : Nn(o), this.min = (o) => this.overrides?.min ? this.overrides.min(o) : Pn(o), this.setMonth = (o, r) => this.overrides?.setMonth ? this.overrides.setMonth(o, r) : Ro(o, r), this.setYear = (o, r) => this.overrides?.setYear ? this.overrides.setYear(o, r) : Lo(o, r), this.startOfBroadcastWeek = (o, r) => this.overrides?.startOfBroadcastWeek ? this.overrides.startOfBroadcastWeek(o, this) : Xt(o, this), this.startOfDay = (o) => this.overrides?.startOfDay ? this.overrides.startOfDay(o) : je(o), this.startOfISOWeek = (o) => this.overrides?.startOfISOWeek ? this.overrides.startOfISOWeek(o) : Ie(o), this.startOfMonth = (o) => this.overrides?.startOfMonth ? this.overrides.startOfMonth(o) : Bn(o), this.startOfWeek = (o, r) => this.overrides?.startOfWeek ? this.overrides.startOfWeek(o, this.options) : xe(o, this.options), this.startOfYear = (o) => this.overrides?.startOfYear ? this.overrides.startOfYear(o) : qt(o), this.options = { locale: wt, ...t }, this.overrides = n;
1599
1599
  }
1600
1600
  /**
1601
1601
  * Generates a mapping of Arabic digits (0-9) to the target numbering system
@@ -1682,7 +1682,7 @@ K.yearFirstLocales = /* @__PURE__ */ new Set([
1682
1682
  "zh-TW"
1683
1683
  ]);
1684
1684
  const ae = new K();
1685
- class zt {
1685
+ class Qt {
1686
1686
  constructor(t, n, o = ae) {
1687
1687
  this.date = t, this.displayMonth = n, this.outside = !!(n && !o.isSameMonth(t, n)), this.dateLib = o;
1688
1688
  }
@@ -1741,10 +1741,10 @@ var p;
1741
1741
  (function(e) {
1742
1742
  e.Root = "root", e.Chevron = "chevron", e.Day = "day", e.DayButton = "day_button", e.CaptionLabel = "caption_label", e.Dropdowns = "dropdowns", e.Dropdown = "dropdown", e.DropdownRoot = "dropdown_root", e.Footer = "footer", e.MonthGrid = "month_grid", e.MonthCaption = "month_caption", e.MonthsDropdown = "months_dropdown", e.Month = "month", e.Months = "months", e.Nav = "nav", e.NextMonthButton = "button_next", e.PreviousMonthButton = "button_previous", e.Week = "week", e.Weeks = "weeks", e.Weekday = "weekday", e.Weekdays = "weekdays", e.WeekNumber = "week_number", e.WeekNumberHeader = "week_number_header", e.YearsDropdown = "years_dropdown";
1743
1743
  })(p || (p = {}));
1744
- var I;
1744
+ var j;
1745
1745
  (function(e) {
1746
1746
  e.disabled = "disabled", e.hidden = "hidden", e.outside = "outside", e.focused = "focused", e.today = "today";
1747
- })(I || (I = {}));
1747
+ })(j || (j = {}));
1748
1748
  var J;
1749
1749
  (function(e) {
1750
1750
  e.range_end = "range_end", e.range_middle = "range_middle", e.range_start = "range_start", e.selected = "selected";
@@ -1787,19 +1787,19 @@ function sr(e) {
1787
1787
  function ir(e) {
1788
1788
  return m.createElement("div", { ...e });
1789
1789
  }
1790
- const Zt = mn(void 0);
1791
- function Ie() {
1792
- const e = hn(Zt);
1790
+ const Ut = mn(void 0);
1791
+ function Ae() {
1792
+ const e = hn(Ut);
1793
1793
  if (e === void 0)
1794
1794
  throw new Error("useDayPicker() must be used within a custom component.");
1795
1795
  return e;
1796
1796
  }
1797
1797
  function cr(e) {
1798
- const { components: t } = Ie();
1798
+ const { components: t } = Ae();
1799
1799
  return m.createElement(t.Dropdown, { ...e });
1800
1800
  }
1801
1801
  function ur(e) {
1802
- const { onPreviousClick: t, onNextClick: n, previousMonth: o, nextMonth: r, ...a } = e, { components: i, classNames: s, labels: { labelPrevious: c, labelNext: d } } = Ie(), l = q((f) => {
1802
+ const { onPreviousClick: t, onNextClick: n, previousMonth: o, nextMonth: r, ...a } = e, { components: i, classNames: s, labels: { labelPrevious: c, labelNext: d } } = Ae(), l = q((f) => {
1803
1803
  r && n?.(f);
1804
1804
  }, [r, n]), u = q((f) => {
1805
1805
  o && t?.(f);
@@ -1820,14 +1820,14 @@ function ur(e) {
1820
1820
  );
1821
1821
  }
1822
1822
  function dr(e) {
1823
- const { components: t } = Ie();
1823
+ const { components: t } = Ae();
1824
1824
  return m.createElement(t.Button, { ...e });
1825
1825
  }
1826
1826
  function lr(e) {
1827
1827
  return m.createElement("option", { ...e });
1828
1828
  }
1829
1829
  function fr(e) {
1830
- const { components: t } = Ie();
1830
+ const { components: t } = Ae();
1831
1831
  return m.createElement(t.Button, { ...e });
1832
1832
  }
1833
1833
  function mr(e) {
@@ -1862,7 +1862,7 @@ function Mr(e) {
1862
1862
  return m.createElement("tbody", { ...e });
1863
1863
  }
1864
1864
  function vr(e) {
1865
- const { components: t } = Ie();
1865
+ const { components: t } = Ae();
1866
1866
  return m.createElement(t.Dropdown, { ...e });
1867
1867
  }
1868
1868
  const Dr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
@@ -1899,22 +1899,22 @@ function de(e, t, n = !1, o = ae) {
1899
1899
  const { differenceInCalendarDays: i, isSameDay: s } = o;
1900
1900
  return r && a ? (i(a, r) < 0 && ([r, a] = [a, r]), i(t, r) >= (n ? 1 : 0) && i(a, t) >= (n ? 1 : 0)) : !n && a ? s(a, t) : !n && r ? s(r, t) : !1;
1901
1901
  }
1902
- function Gt(e) {
1902
+ function Kt(e) {
1903
1903
  return !!(e && typeof e == "object" && "before" in e && "after" in e);
1904
1904
  }
1905
- function ft(e) {
1905
+ function bt(e) {
1906
1906
  return !!(e && typeof e == "object" && "from" in e);
1907
1907
  }
1908
- function Vt(e) {
1908
+ function Jt(e) {
1909
1909
  return !!(e && typeof e == "object" && "after" in e);
1910
1910
  }
1911
- function Xt(e) {
1911
+ function en(e) {
1912
1912
  return !!(e && typeof e == "object" && "before" in e);
1913
1913
  }
1914
- function Qt(e) {
1914
+ function tn(e) {
1915
1915
  return !!(e && typeof e == "object" && "dayOfWeek" in e);
1916
1916
  }
1917
- function Ut(e, t) {
1917
+ function nn(e, t) {
1918
1918
  return Array.isArray(e) && e.every(t.isDate);
1919
1919
  }
1920
1920
  function le(e, t, n = ae) {
@@ -1924,29 +1924,29 @@ function le(e, t, n = ae) {
1924
1924
  return s;
1925
1925
  if (n.isDate(s))
1926
1926
  return r(e, s);
1927
- if (Ut(s, n))
1927
+ if (nn(s, n))
1928
1928
  return s.includes(e);
1929
- if (ft(s))
1929
+ if (bt(s))
1930
1930
  return de(s, e, !1, n);
1931
- if (Qt(s))
1931
+ if (tn(s))
1932
1932
  return Array.isArray(s.dayOfWeek) ? s.dayOfWeek.includes(e.getDay()) : s.dayOfWeek === e.getDay();
1933
- if (Gt(s)) {
1933
+ if (Kt(s)) {
1934
1934
  const c = a(s.before, e), d = a(s.after, e), l = c > 0, u = d < 0;
1935
1935
  return i(s.before, s.after) ? u && l : l || u;
1936
1936
  }
1937
- return Vt(s) ? a(e, s.after) > 0 : Xt(s) ? a(s.before, e) > 0 : typeof s == "function" ? s(e) : !1;
1937
+ return Jt(s) ? a(e, s.after) > 0 : en(s) ? a(s.before, e) > 0 : typeof s == "function" ? s(e) : !1;
1938
1938
  });
1939
1939
  }
1940
1940
  function kr(e, t, n, o, r) {
1941
1941
  const { disabled: a, hidden: i, modifiers: s, showOutsideDays: c, broadcastCalendar: d, today: l } = t, { isSameDay: u, isSameMonth: f, startOfMonth: w, isBefore: D, endOfMonth: W, isAfter: b } = r, O = n && w(n), y = o && W(o), g = {
1942
- [I.focused]: [],
1943
- [I.outside]: [],
1944
- [I.disabled]: [],
1945
- [I.hidden]: [],
1946
- [I.today]: []
1942
+ [j.focused]: [],
1943
+ [j.outside]: [],
1944
+ [j.disabled]: [],
1945
+ [j.hidden]: [],
1946
+ [j.today]: []
1947
1947
  }, x = {};
1948
1948
  for (const h of e) {
1949
- const { date: v, displayMonth: M } = h, C = !!(M && !f(v, M)), j = !!(O && D(v, O)), _ = !!(y && b(v, y)), H = !!(a && le(v, a, r)), F = !!(i && le(v, i, r)) || j || _ || // Broadcast calendar will show outside days as default
1949
+ const { date: v, displayMonth: M } = h, C = !!(M && !f(v, M)), I = !!(O && D(v, O)), _ = !!(y && b(v, y)), H = !!(a && le(v, a, r)), F = !!(i && le(v, i, r)) || I || _ || // Broadcast calendar will show outside days as default
1950
1950
  !d && !c && C || d && c === !1 && C, Z = u(v, l ?? r.today());
1951
1951
  C && g.outside.push(h), H && g.disabled.push(h), F && g.hidden.push(h), Z && g.today.push(h), s && Object.keys(s).forEach((se) => {
1952
1952
  const ee = s?.[se];
@@ -1955,18 +1955,18 @@ function kr(e, t, n, o, r) {
1955
1955
  }
1956
1956
  return (h) => {
1957
1957
  const v = {
1958
- [I.focused]: !1,
1959
- [I.disabled]: !1,
1960
- [I.hidden]: !1,
1961
- [I.outside]: !1,
1962
- [I.today]: !1
1958
+ [j.focused]: !1,
1959
+ [j.disabled]: !1,
1960
+ [j.hidden]: !1,
1961
+ [j.outside]: !1,
1962
+ [j.today]: !1
1963
1963
  }, M = {};
1964
1964
  for (const C in g) {
1965
- const j = g[C];
1966
- v[C] = j.some((_) => _ === h);
1965
+ const I = g[C];
1966
+ v[C] = I.some((_) => _ === h);
1967
1967
  }
1968
1968
  for (const C in x)
1969
- M[C] = x[C].some((j) => j === h);
1969
+ M[C] = x[C].some((I) => I === h);
1970
1970
  return {
1971
1971
  ...v,
1972
1972
  // custom modifiers should override all the previous ones
@@ -1975,7 +1975,7 @@ function kr(e, t, n, o, r) {
1975
1975
  };
1976
1976
  }
1977
1977
  function Or(e, t, n = {}) {
1978
- return Object.entries(e).filter(([, r]) => r === !0).reduce((r, [a]) => (n[a] ? r.push(n[a]) : t[I[a]] ? r.push(t[I[a]]) : t[J[a]] && r.push(t[J[a]]), r), [t[p.Day]]);
1978
+ return Object.entries(e).filter(([, r]) => r === !0).reduce((r, [a]) => (n[a] ? r.push(n[a]) : t[j[a]] ? r.push(t[j[a]]) : t[J[a]] && r.push(t[J[a]]), r), [t[p.Day]]);
1979
1979
  }
1980
1980
  function Wr(e) {
1981
1981
  return {
@@ -2000,18 +2000,18 @@ function Cr() {
2000
2000
  const e = {};
2001
2001
  for (const t in p)
2002
2002
  e[p[t]] = `rdp-${p[t]}`;
2003
- for (const t in I)
2004
- e[I[t]] = `rdp-${I[t]}`;
2003
+ for (const t in j)
2004
+ e[j[t]] = `rdp-${j[t]}`;
2005
2005
  for (const t in J)
2006
2006
  e[J[t]] = `rdp-${J[t]}`;
2007
2007
  for (const t in U)
2008
2008
  e[U[t]] = `rdp-${U[t]}`;
2009
2009
  return e;
2010
2010
  }
2011
- function Kt(e, t, n) {
2011
+ function on(e, t, n) {
2012
2012
  return (n ?? new K(t)).formatMonthYear(e);
2013
2013
  }
2014
- const xr = Kt;
2014
+ const xr = on;
2015
2015
  function Nr(e, t, n) {
2016
2016
  return (n ?? new K(t)).format(e, "d");
2017
2017
  }
@@ -2021,26 +2021,26 @@ function Pr(e, t = ae) {
2021
2021
  function Tr(e, t, n) {
2022
2022
  return (n ?? new K(t)).format(e, "cccccc");
2023
2023
  }
2024
- function Er(e, t = ae) {
2024
+ function Yr(e, t = ae) {
2025
2025
  return e < 10 ? t.formatNumber(`0${e.toLocaleString()}`) : t.formatNumber(`${e.toLocaleString()}`);
2026
2026
  }
2027
- function Yr() {
2027
+ function Er() {
2028
2028
  return "";
2029
2029
  }
2030
- function Jt(e, t = ae) {
2030
+ function rn(e, t = ae) {
2031
2031
  return t.format(e, "yyyy");
2032
2032
  }
2033
- const _r = Jt, Fr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2033
+ const _r = rn, Fr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2034
2034
  __proto__: null,
2035
- formatCaption: Kt,
2035
+ formatCaption: on,
2036
2036
  formatDay: Nr,
2037
2037
  formatMonthCaption: xr,
2038
2038
  formatMonthDropdown: Pr,
2039
- formatWeekNumber: Er,
2040
- formatWeekNumberHeader: Yr,
2039
+ formatWeekNumber: Yr,
2040
+ formatWeekNumberHeader: Er,
2041
2041
  formatWeekdayName: Tr,
2042
2042
  formatYearCaption: _r,
2043
- formatYearDropdown: Jt
2043
+ formatYearDropdown: rn
2044
2044
  }, Symbol.toStringTag, { value: "Module" }));
2045
2045
  function Br(e) {
2046
2046
  return e?.formatMonthCaption && !e.formatCaption && (e.formatCaption = e.formatMonthCaption), e?.formatYearCaption && !e.formatYearDropdown && (e.formatYearDropdown = e.formatYearCaption), {
@@ -2048,7 +2048,7 @@ function Br(e) {
2048
2048
  ...e
2049
2049
  };
2050
2050
  }
2051
- function jr(e, t, n, o, r) {
2051
+ function Ir(e, t, n, o, r) {
2052
2052
  const { startOfMonth: a, startOfYear: i, endOfYear: s, eachMonthOfInterval: c, getMonth: d } = r;
2053
2053
  return c({
2054
2054
  start: i(e),
@@ -2058,7 +2058,7 @@ function jr(e, t, n, o, r) {
2058
2058
  return { value: D, label: w, disabled: W };
2059
2059
  });
2060
2060
  }
2061
- function Ir(e, t = {}, n = {}) {
2061
+ function jr(e, t = {}, n = {}) {
2062
2062
  let o = { ...t?.[p.Day] };
2063
2063
  return Object.entries(e).filter(([, r]) => r === !0).forEach(([r]) => {
2064
2064
  o = {
@@ -2088,15 +2088,15 @@ function Ar(e, t, n, o, r = !1) {
2088
2088
  };
2089
2089
  });
2090
2090
  }
2091
- function en(e, t, n, o) {
2091
+ function an(e, t, n, o) {
2092
2092
  let r = (o ?? new K(n)).format(e, "PPPP");
2093
2093
  return t.today && (r = `Today, ${r}`), t.selected && (r = `${r}, selected`), r;
2094
2094
  }
2095
- const $r = en;
2096
- function tn(e, t, n) {
2095
+ const $r = an;
2096
+ function sn(e, t, n) {
2097
2097
  return (n ?? new K(t)).formatMonthYear(e);
2098
2098
  }
2099
- const qr = tn;
2099
+ const qr = sn;
2100
2100
  function Rr(e, t, n, o) {
2101
2101
  let r = (o ?? new K(n)).format(e, "PPPP");
2102
2102
  return t?.today && (r = `Today, ${r}`), r;
@@ -2129,8 +2129,8 @@ const Kr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2129
2129
  __proto__: null,
2130
2130
  labelCaption: qr,
2131
2131
  labelDay: $r,
2132
- labelDayButton: en,
2133
- labelGrid: tn,
2132
+ labelDayButton: an,
2133
+ labelGrid: sn,
2134
2134
  labelGridcell: Rr,
2135
2135
  labelMonthDropdown: Lr,
2136
2136
  labelNav: zr,
@@ -2140,11 +2140,11 @@ const Kr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2140
2140
  labelWeekNumberHeader: Qr,
2141
2141
  labelWeekday: Vr,
2142
2142
  labelYearDropdown: Ur
2143
- }, Symbol.toStringTag, { value: "Module" })), He = (e) => e instanceof HTMLElement ? e : null, rt = (e) => [
2143
+ }, Symbol.toStringTag, { value: "Module" })), $e = (e) => e instanceof HTMLElement ? e : null, lt = (e) => [
2144
2144
  ...e.querySelectorAll("[data-animated-month]") ?? []
2145
- ], Jr = (e) => He(e.querySelector("[data-animated-month]")), at = (e) => He(e.querySelector("[data-animated-caption]")), st = (e) => He(e.querySelector("[data-animated-weeks]")), ea = (e) => He(e.querySelector("[data-animated-nav]")), ta = (e) => He(e.querySelector("[data-animated-weekdays]"));
2145
+ ], Jr = (e) => $e(e.querySelector("[data-animated-month]")), ft = (e) => $e(e.querySelector("[data-animated-caption]")), mt = (e) => $e(e.querySelector("[data-animated-weeks]")), ea = (e) => $e(e.querySelector("[data-animated-nav]")), ta = (e) => $e(e.querySelector("[data-animated-weekdays]"));
2146
2146
  function na(e, t, { classNames: n, months: o, focused: r, dateLib: a }) {
2147
- const i = Ce(null), s = Ce(o), c = Ce(!1);
2147
+ const i = Se(null), s = Se(o), c = Se(!1);
2148
2148
  yn(() => {
2149
2149
  const d = s.current;
2150
2150
  if (s.current = o, !t || !e.current || // safety check because the ref can be set to anything by consumers
@@ -2152,19 +2152,19 @@ function na(e, t, { classNames: n, months: o, focused: r, dateLib: a }) {
2152
2152
  o.length === 0 || d.length === 0 || o.length !== d.length)
2153
2153
  return;
2154
2154
  const l = a.isSameMonth(o[0].date, d[0].date), u = a.isAfter(o[0].date, d[0].date), f = u ? n[U.caption_after_enter] : n[U.caption_before_enter], w = u ? n[U.weeks_after_enter] : n[U.weeks_before_enter], D = i.current, W = e.current.cloneNode(!0);
2155
- if (W instanceof HTMLElement ? (rt(W).forEach((g) => {
2155
+ if (W instanceof HTMLElement ? (lt(W).forEach((g) => {
2156
2156
  if (!(g instanceof HTMLElement))
2157
2157
  return;
2158
2158
  const x = Jr(g);
2159
2159
  x && g.contains(x) && g.removeChild(x);
2160
- const h = at(g);
2160
+ const h = ft(g);
2161
2161
  h && h.classList.remove(f);
2162
- const v = st(g);
2162
+ const v = mt(g);
2163
2163
  v && v.classList.remove(w);
2164
2164
  }), i.current = W) : i.current = null, c.current || l || // skip animation if a day is focused because it can cause issues to the animation and is better for a11y
2165
2165
  r)
2166
2166
  return;
2167
- const b = D instanceof HTMLElement ? rt(D) : [], O = rt(e.current);
2167
+ const b = D instanceof HTMLElement ? lt(D) : [], O = lt(e.current);
2168
2168
  if (O?.every((y) => y instanceof HTMLElement) && b && b.every((y) => y instanceof HTMLElement)) {
2169
2169
  c.current = !0, e.current.style.isolation = "isolate";
2170
2170
  const y = ea(e.current);
@@ -2173,19 +2173,19 @@ function na(e, t, { classNames: n, months: o, focused: r, dateLib: a }) {
2173
2173
  if (!h)
2174
2174
  return;
2175
2175
  g.style.position = "relative", g.style.overflow = "hidden";
2176
- const v = at(g);
2176
+ const v = ft(g);
2177
2177
  v && v.classList.add(f);
2178
- const M = st(g);
2178
+ const M = mt(g);
2179
2179
  M && M.classList.add(w);
2180
2180
  const C = () => {
2181
2181
  c.current = !1, e.current && (e.current.style.isolation = ""), y && (y.style.zIndex = ""), v && v.classList.remove(f), M && M.classList.remove(w), g.style.position = "", g.style.overflow = "", g.contains(h) && g.removeChild(h);
2182
2182
  };
2183
2183
  h.style.pointerEvents = "none", h.style.position = "absolute", h.style.overflow = "hidden", h.setAttribute("aria-hidden", "true");
2184
- const j = ta(h);
2185
- j && (j.style.opacity = "0");
2186
- const _ = at(h);
2184
+ const I = ta(h);
2185
+ I && (I.style.opacity = "0");
2186
+ const _ = ft(h);
2187
2187
  _ && (_.classList.add(u ? n[U.caption_before_exit] : n[U.caption_after_exit]), _.addEventListener("animationend", C));
2188
- const H = st(h);
2188
+ const H = mt(h);
2189
2189
  H && H.classList.add(u ? n[U.weeks_before_exit] : n[U.weeks_after_exit]), g.insertBefore(h, g.firstChild);
2190
2190
  });
2191
2191
  }
@@ -2226,7 +2226,7 @@ function aa(e, t, n, o) {
2226
2226
  }
2227
2227
  return a;
2228
2228
  }
2229
- function St(e, t, n, o) {
2229
+ function Tt(e, t, n, o) {
2230
2230
  const { month: r, defaultMonth: a, today: i = o.today(), numberOfMonths: s = 1 } = e;
2231
2231
  let c = r || a || i;
2232
2232
  const { differenceInCalendarMonths: d, addMonths: l, startOfMonth: u } = o;
@@ -2241,14 +2241,14 @@ function sa(e, t, n, o) {
2241
2241
  const O = n.broadcastCalendar ? u(b, o) : n.ISOWeek ? f(b) : w(b), y = n.broadcastCalendar ? a(b) : n.ISOWeek ? i(s(b)) : c(s(b)), g = t.filter((M) => M >= O && M <= y), x = n.broadcastCalendar ? 35 : 42;
2242
2242
  if (n.fixedWeeks && g.length < x) {
2243
2243
  const M = t.filter((C) => {
2244
- const j = x - g.length;
2245
- return C > y && C <= r(y, j);
2244
+ const I = x - g.length;
2245
+ return C > y && C <= r(y, I);
2246
2246
  });
2247
2247
  g.push(...M);
2248
2248
  }
2249
2249
  const h = g.reduce((M, C) => {
2250
- const j = n.ISOWeek ? d(C) : l(C), _ = M.find((F) => F.weekNumber === j), H = new zt(C, b, o);
2251
- return _ ? _.days.push(H) : M.push(new Xo(j, [H])), M;
2250
+ const I = n.ISOWeek ? d(C) : l(C), _ = M.find((F) => F.weekNumber === I), H = new Qt(C, b, o);
2251
+ return _ ? _.days.push(H) : M.push(new Xo(I, [H])), M;
2252
2252
  }, []), v = new Vo(b, h);
2253
2253
  return W.push(v), W;
2254
2254
  }, []);
@@ -2286,18 +2286,18 @@ function da(e) {
2286
2286
  const t = [];
2287
2287
  return e.reduce((n, o) => n.concat(o.weeks.slice()), t.slice());
2288
2288
  }
2289
- function Xe(e, t) {
2290
- const [n, o] = Me(e);
2289
+ function nt(e, t) {
2290
+ const [n, o] = he(e);
2291
2291
  return [t === void 0 ? n : t, o];
2292
2292
  }
2293
2293
  function la(e, t) {
2294
- const [n, o] = ia(e, t), { startOfMonth: r, endOfMonth: a } = t, i = St(e, n, o, t), [s, c] = Xe(
2294
+ const [n, o] = ia(e, t), { startOfMonth: r, endOfMonth: a } = t, i = Tt(e, n, o, t), [s, c] = nt(
2295
2295
  i,
2296
2296
  // initialMonth is always computed from props.month if provided
2297
2297
  e.month ? i : void 0
2298
2298
  );
2299
- Ge(() => {
2300
- const v = St(e, n, o, t);
2299
+ _e(() => {
2300
+ const v = Tt(e, n, o, t);
2301
2301
  c(v);
2302
2302
  }, [e.timeZone]);
2303
2303
  const d = aa(s, o, e, t), l = oa(d, e.endMonth ? a(e.endMonth) : void 0, e, t), u = sa(d, l, e, t), f = da(u), w = ra(u), D = ua(s, n, e, t), W = ca(s, o, e, t), { disableNavigation: b, onMonthChange: O } = e, y = (v) => f.some((M) => M.days.some((C) => C.isEqualTo(v))), g = (v) => {
@@ -2324,16 +2324,16 @@ var te;
2324
2324
  (function(e) {
2325
2325
  e[e.Today = 0] = "Today", e[e.Selected = 1] = "Selected", e[e.LastFocused = 2] = "LastFocused", e[e.FocusedModifier = 3] = "FocusedModifier";
2326
2326
  })(te || (te = {}));
2327
- function Ct(e) {
2328
- return !e[I.disabled] && !e[I.hidden] && !e[I.outside];
2327
+ function Yt(e) {
2328
+ return !e[j.disabled] && !e[j.hidden] && !e[j.outside];
2329
2329
  }
2330
2330
  function fa(e, t, n, o) {
2331
2331
  let r, a = -1;
2332
2332
  for (const i of e) {
2333
2333
  const s = t(i);
2334
- Ct(s) && (s[I.focused] && a < te.FocusedModifier ? (r = i, a = te.FocusedModifier) : o?.isEqualTo(i) && a < te.LastFocused ? (r = i, a = te.LastFocused) : n(i.date) && a < te.Selected ? (r = i, a = te.Selected) : s[I.today] && a < te.Today && (r = i, a = te.Today));
2334
+ Yt(s) && (s[j.focused] && a < te.FocusedModifier ? (r = i, a = te.FocusedModifier) : o?.isEqualTo(i) && a < te.LastFocused ? (r = i, a = te.LastFocused) : n(i.date) && a < te.Selected ? (r = i, a = te.Selected) : s[j.today] && a < te.Today && (r = i, a = te.Today));
2335
2335
  }
2336
- return r || (r = e.find((i) => Ct(t(i)))), r;
2336
+ return r || (r = e.find((i) => Yt(t(i)))), r;
2337
2337
  }
2338
2338
  function ma(e, t, n, o, r, a, i) {
2339
2339
  const { ISOWeek: s, broadcastCalendar: c } = a, { addDays: d, addMonths: l, addWeeks: u, addYears: f, endOfBroadcastWeek: w, endOfISOWeek: D, endOfWeek: W, max: b, min: O, startOfBroadcastWeek: y, startOfISOWeek: g, startOfWeek: x } = i;
@@ -2347,14 +2347,14 @@ function ma(e, t, n, o, r, a, i) {
2347
2347
  }[e](n, t === "after" ? 1 : -1);
2348
2348
  return t === "before" && o ? v = b([o, v]) : t === "after" && r && (v = O([r, v])), v;
2349
2349
  }
2350
- function nn(e, t, n, o, r, a, i, s = 0) {
2350
+ function cn(e, t, n, o, r, a, i, s = 0) {
2351
2351
  if (s > 365)
2352
2352
  return;
2353
- const c = ma(e, t, n.date, o, r, a, i), d = !!(a.disabled && le(c, a.disabled, i)), l = !!(a.hidden && le(c, a.hidden, i)), u = c, f = new zt(c, u, i);
2354
- return !d && !l ? f : nn(e, t, f, o, r, a, i, s + 1);
2353
+ const c = ma(e, t, n.date, o, r, a, i), d = !!(a.disabled && le(c, a.disabled, i)), l = !!(a.hidden && le(c, a.hidden, i)), u = c, f = new Qt(c, u, i);
2354
+ return !d && !l ? f : cn(e, t, f, o, r, a, i, s + 1);
2355
2355
  }
2356
2356
  function ha(e, t, n, o, r) {
2357
- const { autoFocus: a } = e, [i, s] = Me(), c = fa(t.days, n, o || (() => !1), i), [d, l] = Me(a ? c : void 0);
2357
+ const { autoFocus: a } = e, [i, s] = he(), c = fa(t.days, n, o || (() => !1), i), [d, l] = he(a ? c : void 0);
2358
2358
  return {
2359
2359
  isFocusTarget: (W) => !!c?.isEqualTo(W),
2360
2360
  setFocused: l,
@@ -2365,13 +2365,13 @@ function ha(e, t, n, o, r) {
2365
2365
  moveFocus: (W, b) => {
2366
2366
  if (!d)
2367
2367
  return;
2368
- const O = nn(W, b, d, t.navStart, t.navEnd, e, r);
2368
+ const O = cn(W, b, d, t.navStart, t.navEnd, e, r);
2369
2369
  O && (e.disableNavigation && !t.days.some((g) => g.isEqualTo(O)) || (t.goToDay(O), l(O)));
2370
2370
  }
2371
2371
  };
2372
2372
  }
2373
2373
  function ya(e, t) {
2374
- const { selected: n, required: o, onSelect: r } = e, [a, i] = Xe(n, r ? n : void 0), s = r ? n : a, { isSameDay: c } = t, d = (w) => s?.some((D) => c(D, w)) ?? !1, { min: l, max: u } = e;
2374
+ const { selected: n, required: o, onSelect: r } = e, [a, i] = nt(n, r ? n : void 0), s = r ? n : a, { isSameDay: c } = t, d = (w) => s?.some((D) => c(D, w)) ?? !1, { min: l, max: u } = e;
2375
2375
  return {
2376
2376
  selected: s,
2377
2377
  select: (w, D, W) => {
@@ -2426,15 +2426,15 @@ function ga(e, t, n = ae) {
2426
2426
  }
2427
2427
  return !1;
2428
2428
  }
2429
- function xt(e, t, n = ae) {
2429
+ function Et(e, t, n = ae) {
2430
2430
  return de(e, t.from, !1, n) || de(e, t.to, !1, n) || de(t, e.from, !1, n) || de(t, e.to, !1, n);
2431
2431
  }
2432
2432
  function wa(e, t, n = ae) {
2433
2433
  const o = Array.isArray(t) ? t : [t];
2434
- if (o.filter((s) => typeof s != "function").some((s) => typeof s == "boolean" ? s : n.isDate(s) ? de(e, s, !1, n) : Ut(s, n) ? s.some((c) => de(e, c, !1, n)) : ft(s) ? s.from && s.to ? xt(e, { from: s.from, to: s.to }, n) : !1 : Qt(s) ? ga(e, s.dayOfWeek, n) : Gt(s) ? n.isAfter(s.before, s.after) ? xt(e, {
2434
+ if (o.filter((s) => typeof s != "function").some((s) => typeof s == "boolean" ? s : n.isDate(s) ? de(e, s, !1, n) : nn(s, n) ? s.some((c) => de(e, c, !1, n)) : bt(s) ? s.from && s.to ? Et(e, { from: s.from, to: s.to }, n) : !1 : tn(s) ? ga(e, s.dayOfWeek, n) : Kt(s) ? n.isAfter(s.before, s.after) ? Et(e, {
2435
2435
  from: n.addDays(s.after, 1),
2436
2436
  to: n.addDays(s.before, -1)
2437
- }, n) : le(e.from, s, n) || le(e.to, s, n) : Vt(s) || Xt(s) ? le(e.from, s, n) || le(e.to, s, n) : !1))
2437
+ }, n) : le(e.from, s, n) || le(e.to, s, n) : Jt(s) || en(s) ? le(e.from, s, n) || le(e.to, s, n) : !1))
2438
2438
  return !0;
2439
2439
  const i = o.filter((s) => typeof s == "function");
2440
2440
  if (i.length) {
@@ -2449,7 +2449,7 @@ function wa(e, t, n = ae) {
2449
2449
  return !1;
2450
2450
  }
2451
2451
  function ba(e, t) {
2452
- const { disabled: n, excludeDisabled: o, selected: r, required: a, onSelect: i } = e, [s, c] = Xe(r, i ? r : void 0), d = i ? r : s;
2452
+ const { disabled: n, excludeDisabled: o, selected: r, required: a, onSelect: i } = e, [s, c] = nt(r, i ? r : void 0), d = i ? r : s;
2453
2453
  return {
2454
2454
  selected: d,
2455
2455
  select: (f, w, D) => {
@@ -2460,7 +2460,7 @@ function ba(e, t) {
2460
2460
  };
2461
2461
  }
2462
2462
  function Ma(e, t) {
2463
- const { selected: n, required: o, onSelect: r } = e, [a, i] = Xe(n, r ? n : void 0), s = r ? n : a, { isSameDay: c } = t;
2463
+ const { selected: n, required: o, onSelect: r } = e, [a, i] = nt(n, r ? n : void 0), s = r ? n : a, { isSameDay: c } = t;
2464
2464
  return {
2465
2465
  selected: s,
2466
2466
  select: (u, f, w) => {
@@ -2483,16 +2483,16 @@ function va(e, t) {
2483
2483
  return;
2484
2484
  }
2485
2485
  }
2486
- function it(e) {
2486
+ function ht(e) {
2487
2487
  let t = e;
2488
2488
  t.timeZone && (t = {
2489
2489
  ...e
2490
- }, t.today && (t.today = new z(t.today, t.timeZone)), t.month && (t.month = new z(t.month, t.timeZone)), t.defaultMonth && (t.defaultMonth = new z(t.defaultMonth, t.timeZone)), t.startMonth && (t.startMonth = new z(t.startMonth, t.timeZone)), t.endMonth && (t.endMonth = new z(t.endMonth, t.timeZone)), t.mode === "single" && t.selected ? t.selected = new z(t.selected, t.timeZone) : t.mode === "multiple" && t.selected ? t.selected = t.selected?.map((S) => new z(S, t.timeZone)) : t.mode === "range" && t.selected && (t.selected = {
2491
- from: t.selected.from ? new z(t.selected.from, t.timeZone) : void 0,
2492
- to: t.selected.to ? new z(t.selected.to, t.timeZone) : void 0
2490
+ }, t.today && (t.today = new R(t.today, t.timeZone)), t.month && (t.month = new R(t.month, t.timeZone)), t.defaultMonth && (t.defaultMonth = new R(t.defaultMonth, t.timeZone)), t.startMonth && (t.startMonth = new R(t.startMonth, t.timeZone)), t.endMonth && (t.endMonth = new R(t.endMonth, t.timeZone)), t.mode === "single" && t.selected ? t.selected = new R(t.selected, t.timeZone) : t.mode === "multiple" && t.selected ? t.selected = t.selected?.map((S) => new R(S, t.timeZone)) : t.mode === "range" && t.selected && (t.selected = {
2491
+ from: t.selected.from ? new R(t.selected.from, t.timeZone) : void 0,
2492
+ to: t.selected.to ? new R(t.selected.to, t.timeZone) : void 0
2493
2493
  }));
2494
2494
  const { components: n, formatters: o, labels: r, dateLib: a, locale: i, classNames: s } = fe(() => {
2495
- const S = { ...lt, ...t.locale };
2495
+ const S = { ...wt, ...t.locale };
2496
2496
  return {
2497
2497
  dateLib: new K({
2498
2498
  locale: S,
@@ -2523,18 +2523,18 @@ function it(e) {
2523
2523
  t.formatters,
2524
2524
  t.labels,
2525
2525
  t.classNames
2526
- ]), { captionLayout: c, mode: d, navLayout: l, numberOfMonths: u = 1, onDayBlur: f, onDayClick: w, onDayFocus: D, onDayKeyDown: W, onDayMouseEnter: b, onDayMouseLeave: O, onNextClick: y, onPrevClick: g, showWeekNumber: x, styles: h } = t, { formatCaption: v, formatDay: M, formatMonthDropdown: C, formatWeekNumber: j, formatWeekNumberHeader: _, formatWeekdayName: H, formatYearDropdown: F } = o, Z = la(t, a), { days: se, months: ee, navStart: ie, navEnd: ce, previousMonth: R, nextMonth: L, goToMonth: V } = Z, X = kr(se, t, ie, ce, a), { isSelected: De, select: ke, selected: Oe } = va(t, a) ?? {}, { blur: Ae, focused: $e, isFocusTarget: qe, moveFocus: Te, setFocused: ye } = ha(t, Z, X, De ?? (() => !1), a), { labelDayButton: Qe, labelGridcell: N, labelGrid: G, labelMonthDropdown: ue, labelNav: me, labelPrevious: pe, labelNext: ge, labelWeekday: Ue, labelWeekNumber: Ke, labelWeekNumberHeader: Re, labelYearDropdown: Le } = r, Je = fe(() => Hr(a, t.ISOWeek), [a, t.ISOWeek]), Ee = d !== void 0 || w !== void 0, we = q(() => {
2527
- R && (V(R), g?.(R));
2528
- }, [R, V, g]), We = q(() => {
2529
- L && (V(L), y?.(L));
2530
- }, [V, L, y]), Ye = q((S, B) => (k) => {
2531
- k.preventDefault(), k.stopPropagation(), ye(S), ke?.(S.date, B, k), w?.(S.date, B, k);
2532
- }, [ke, w, ye]), ze = q((S, B) => (k) => {
2533
- ye(S), D?.(S.date, B, k);
2534
- }, [D, ye]), et = q((S, B) => (k) => {
2535
- Ae(), f?.(S.date, B, k);
2536
- }, [Ae, f]), mt = q((S, B) => (k) => {
2537
- const Y = {
2526
+ ]), { captionLayout: c, mode: d, navLayout: l, numberOfMonths: u = 1, onDayBlur: f, onDayClick: w, onDayFocus: D, onDayKeyDown: W, onDayMouseEnter: b, onDayMouseLeave: O, onNextClick: y, onPrevClick: g, showWeekNumber: x, styles: h } = t, { formatCaption: v, formatDay: M, formatMonthDropdown: C, formatWeekNumber: I, formatWeekNumberHeader: _, formatWeekdayName: H, formatYearDropdown: F } = o, Z = la(t, a), { days: se, months: ee, navStart: ie, navEnd: ce, previousMonth: G, nextMonth: V, goToMonth: L } = Z, Oe = kr(se, t, ie, ce, a), { isSelected: ye, select: X, selected: pe } = va(t, a) ?? {}, { blur: Pe, focused: qe, isFocusTarget: ot, moveFocus: Re, setFocused: ge } = ha(t, Z, Oe, ye ?? (() => !1), a), { labelDayButton: Le, labelGridcell: ze, labelGrid: rt, labelMonthDropdown: N, labelNav: z, labelPrevious: ue, labelNext: we, labelWeekday: be, labelWeekNumber: Me, labelWeekNumberHeader: at, labelYearDropdown: st } = r, Ze = fe(() => Hr(a, t.ISOWeek), [a, t.ISOWeek]), Te = d !== void 0 || w !== void 0, Ye = q(() => {
2527
+ G && (L(G), g?.(G));
2528
+ }, [G, L, g]), ve = q(() => {
2529
+ V && (L(V), y?.(V));
2530
+ }, [L, V, y]), it = q((S, B) => (k) => {
2531
+ k.preventDefault(), k.stopPropagation(), ge(S), X?.(S.date, B, k), w?.(S.date, B, k);
2532
+ }, [X, w, ge]), Ge = q((S, B) => (k) => {
2533
+ ge(S), D?.(S.date, B, k);
2534
+ }, [D, ge]), Ve = q((S, B) => (k) => {
2535
+ Pe(), f?.(S.date, B, k);
2536
+ }, [Pe, f]), Ee = q((S, B) => (k) => {
2537
+ const E = {
2538
2538
  ArrowLeft: [
2539
2539
  k.shiftKey ? "month" : "day",
2540
2540
  t.dir === "rtl" ? "after" : "before"
@@ -2550,42 +2550,42 @@ function it(e) {
2550
2550
  Home: ["startOfWeek", "before"],
2551
2551
  End: ["endOfWeek", "after"]
2552
2552
  };
2553
- if (Y[k.key]) {
2553
+ if (E[k.key]) {
2554
2554
  k.preventDefault(), k.stopPropagation();
2555
- const [Q, P] = Y[k.key];
2556
- Te(Q, P);
2555
+ const [Q, P] = E[k.key];
2556
+ Re(Q, P);
2557
2557
  }
2558
2558
  W?.(S.date, B, k);
2559
- }, [Te, W, t.dir]), Ze = q((S, B) => (k) => {
2559
+ }, [Re, W, t.dir]), Xe = q((S, B) => (k) => {
2560
2560
  b?.(S.date, B, k);
2561
- }, [b]), tt = q((S, B) => (k) => {
2561
+ }, [b]), Qe = q((S, B) => (k) => {
2562
2562
  O?.(S.date, B, k);
2563
- }, [O]), on = q((S) => (B) => {
2564
- const k = Number(B.target.value), Y = a.setMonth(a.startOfMonth(S), k);
2565
- V(Y);
2566
- }, [a, V]), rn = q((S) => (B) => {
2567
- const k = Number(B.target.value), Y = a.setYear(a.startOfMonth(S), k);
2568
- V(Y);
2569
- }, [a, V]), { className: an, style: sn } = fe(() => ({
2563
+ }, [O]), Ue = q((S) => (B) => {
2564
+ const k = Number(B.target.value), E = a.setMonth(a.startOfMonth(S), k);
2565
+ L(E);
2566
+ }, [a, L]), Ke = q((S) => (B) => {
2567
+ const k = Number(B.target.value), E = a.setYear(a.startOfMonth(S), k);
2568
+ L(E);
2569
+ }, [a, L]), { className: ct, style: Je } = fe(() => ({
2570
2570
  className: [s[p.Root], t.className].filter(Boolean).join(" "),
2571
2571
  style: { ...h?.[p.Root], ...t.style }
2572
- }), [s, t.className, t.style, h]), cn = Sr(t), ht = Ce(null);
2573
- na(ht, !!t.animate, {
2572
+ }), [s, t.className, t.style, h]), et = Sr(t), tt = Se(null);
2573
+ na(tt, !!t.animate, {
2574
2574
  classNames: s,
2575
2575
  months: ee,
2576
- focused: $e,
2576
+ focused: qe,
2577
2577
  dateLib: a
2578
2578
  });
2579
2579
  const un = {
2580
2580
  dayPickerProps: t,
2581
- selected: Oe,
2582
- select: ke,
2583
- isSelected: De,
2581
+ selected: pe,
2582
+ select: X,
2583
+ isSelected: ye,
2584
2584
  months: ee,
2585
- nextMonth: L,
2586
- previousMonth: R,
2587
- goToMonth: V,
2588
- getModifiers: X,
2585
+ nextMonth: V,
2586
+ previousMonth: G,
2587
+ goToMonth: L,
2588
+ getModifiers: Oe,
2589
2589
  components: n,
2590
2590
  classNames: s,
2591
2591
  styles: h,
@@ -2593,15 +2593,15 @@ function it(e) {
2593
2593
  formatters: o
2594
2594
  };
2595
2595
  return m.createElement(
2596
- Zt.Provider,
2596
+ Ut.Provider,
2597
2597
  { value: un },
2598
2598
  m.createElement(
2599
2599
  n.Root,
2600
- { rootRef: t.animate ? ht : void 0, className: an, style: sn, dir: t.dir, id: t.id, lang: t.lang, nonce: t.nonce, title: t.title, role: t.role, "aria-label": t["aria-label"], "aria-labelledby": t["aria-labelledby"], ...cn },
2600
+ { rootRef: t.animate ? tt : void 0, className: ct, style: Je, dir: t.dir, id: t.id, lang: t.lang, nonce: t.nonce, title: t.title, role: t.role, "aria-label": t["aria-label"], "aria-labelledby": t["aria-labelledby"], ...et },
2601
2601
  m.createElement(
2602
2602
  n.Months,
2603
2603
  { className: s[p.Months], style: h?.[p.Months] },
2604
- !t.hideNavigation && !l && m.createElement(n.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: s[p.Nav], style: h?.[p.Nav], "aria-label": me(), onPreviousClick: we, onNextClick: We, previousMonth: R, nextMonth: L }),
2604
+ !t.hideNavigation && !l && m.createElement(n.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: s[p.Nav], style: h?.[p.Nav], "aria-label": z(), onPreviousClick: Ye, onNextClick: ve, previousMonth: G, nextMonth: V }),
2605
2605
  ee.map((S, B) => m.createElement(
2606
2606
  n.Month,
2607
2607
  {
@@ -2615,15 +2615,15 @@ function it(e) {
2615
2615
  },
2616
2616
  l === "around" && !t.hideNavigation && B === 0 && m.createElement(
2617
2617
  n.PreviousMonthButton,
2618
- { type: "button", className: s[p.PreviousMonthButton], tabIndex: R ? void 0 : -1, "aria-disabled": R ? void 0 : !0, "aria-label": pe(R), onClick: we, "data-animated-button": t.animate ? "true" : void 0 },
2619
- m.createElement(n.Chevron, { disabled: R ? void 0 : !0, className: s[p.Chevron], orientation: t.dir === "rtl" ? "right" : "left" })
2618
+ { type: "button", className: s[p.PreviousMonthButton], tabIndex: G ? void 0 : -1, "aria-disabled": G ? void 0 : !0, "aria-label": ue(G), onClick: Ye, "data-animated-button": t.animate ? "true" : void 0 },
2619
+ m.createElement(n.Chevron, { disabled: G ? void 0 : !0, className: s[p.Chevron], orientation: t.dir === "rtl" ? "right" : "left" })
2620
2620
  ),
2621
2621
  m.createElement(n.MonthCaption, { "data-animated-caption": t.animate ? "true" : void 0, className: s[p.MonthCaption], style: h?.[p.MonthCaption], calendarMonth: S, displayIndex: B }, c?.startsWith("dropdown") ? m.createElement(
2622
2622
  n.DropdownNav,
2623
2623
  { className: s[p.Dropdowns], style: h?.[p.Dropdowns] },
2624
2624
  (() => {
2625
- const k = c === "dropdown" || c === "dropdown-months" ? m.createElement(n.MonthsDropdown, { key: "month", className: s[p.MonthsDropdown], "aria-label": ue(), classNames: s, components: n, disabled: !!t.disableNavigation, onChange: on(S.date), options: jr(S.date, ie, ce, o, a), style: h?.[p.Dropdown], value: a.getMonth(S.date) }) : m.createElement("span", { key: "month" }, C(S.date, a)), Y = c === "dropdown" || c === "dropdown-years" ? m.createElement(n.YearsDropdown, { key: "year", className: s[p.YearsDropdown], "aria-label": Le(a.options), classNames: s, components: n, disabled: !!t.disableNavigation, onChange: rn(S.date), options: Ar(ie, ce, o, a, !!t.reverseYears), style: h?.[p.Dropdown], value: a.getYear(S.date) }) : m.createElement("span", { key: "year" }, F(S.date, a));
2626
- return a.getMonthYearOrder() === "year-first" ? [Y, k] : [k, Y];
2625
+ const k = c === "dropdown" || c === "dropdown-months" ? m.createElement(n.MonthsDropdown, { key: "month", className: s[p.MonthsDropdown], "aria-label": N(), classNames: s, components: n, disabled: !!t.disableNavigation, onChange: Ue(S.date), options: Ir(S.date, ie, ce, o, a), style: h?.[p.Dropdown], value: a.getMonth(S.date) }) : m.createElement("span", { key: "month" }, C(S.date, a)), E = c === "dropdown" || c === "dropdown-years" ? m.createElement(n.YearsDropdown, { key: "year", className: s[p.YearsDropdown], "aria-label": st(a.options), classNames: s, components: n, disabled: !!t.disableNavigation, onChange: Ke(S.date), options: Ar(ie, ce, o, a, !!t.reverseYears), style: h?.[p.Dropdown], value: a.getYear(S.date) }) : m.createElement("span", { key: "year" }, F(S.date, a));
2626
+ return a.getMonthYearOrder() === "year-first" ? [E, k] : [k, E];
2627
2627
  })(),
2628
2628
  m.createElement("span", { role: "status", "aria-live": "polite", style: {
2629
2629
  border: 0,
@@ -2643,36 +2643,36 @@ function it(e) {
2643
2643
  )),
2644
2644
  l === "around" && !t.hideNavigation && B === u - 1 && m.createElement(
2645
2645
  n.NextMonthButton,
2646
- { type: "button", className: s[p.NextMonthButton], tabIndex: L ? void 0 : -1, "aria-disabled": L ? void 0 : !0, "aria-label": ge(L), onClick: We, "data-animated-button": t.animate ? "true" : void 0 },
2647
- m.createElement(n.Chevron, { disabled: L ? void 0 : !0, className: s[p.Chevron], orientation: t.dir === "rtl" ? "left" : "right" })
2646
+ { type: "button", className: s[p.NextMonthButton], tabIndex: V ? void 0 : -1, "aria-disabled": V ? void 0 : !0, "aria-label": we(V), onClick: ve, "data-animated-button": t.animate ? "true" : void 0 },
2647
+ m.createElement(n.Chevron, { disabled: V ? void 0 : !0, className: s[p.Chevron], orientation: t.dir === "rtl" ? "left" : "right" })
2648
2648
  ),
2649
- B === u - 1 && l === "after" && !t.hideNavigation && m.createElement(n.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: s[p.Nav], style: h?.[p.Nav], "aria-label": me(), onPreviousClick: we, onNextClick: We, previousMonth: R, nextMonth: L }),
2649
+ B === u - 1 && l === "after" && !t.hideNavigation && m.createElement(n.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: s[p.Nav], style: h?.[p.Nav], "aria-label": z(), onPreviousClick: Ye, onNextClick: ve, previousMonth: G, nextMonth: V }),
2650
2650
  m.createElement(
2651
2651
  n.MonthGrid,
2652
- { role: "grid", "aria-multiselectable": d === "multiple" || d === "range", "aria-label": G(S.date, a.options, a) || void 0, className: s[p.MonthGrid], style: h?.[p.MonthGrid] },
2652
+ { role: "grid", "aria-multiselectable": d === "multiple" || d === "range", "aria-label": rt(S.date, a.options, a) || void 0, className: s[p.MonthGrid], style: h?.[p.MonthGrid] },
2653
2653
  !t.hideWeekdays && m.createElement(
2654
2654
  n.Weekdays,
2655
2655
  { "data-animated-weekdays": t.animate ? "true" : void 0, className: s[p.Weekdays], style: h?.[p.Weekdays] },
2656
- x && m.createElement(n.WeekNumberHeader, { "aria-label": Re(a.options), className: s[p.WeekNumberHeader], style: h?.[p.WeekNumberHeader], scope: "col" }, _()),
2657
- Je.map((k) => m.createElement(n.Weekday, { "aria-label": Ue(k, a.options, a), className: s[p.Weekday], key: String(k), style: h?.[p.Weekday], scope: "col" }, H(k, a.options, a)))
2656
+ x && m.createElement(n.WeekNumberHeader, { "aria-label": at(a.options), className: s[p.WeekNumberHeader], style: h?.[p.WeekNumberHeader], scope: "col" }, _()),
2657
+ Ze.map((k) => m.createElement(n.Weekday, { "aria-label": be(k, a.options, a), className: s[p.Weekday], key: String(k), style: h?.[p.Weekday], scope: "col" }, H(k, a.options, a)))
2658
2658
  ),
2659
2659
  m.createElement(n.Weeks, { "data-animated-weeks": t.animate ? "true" : void 0, className: s[p.Weeks], style: h?.[p.Weeks] }, S.weeks.map((k) => m.createElement(
2660
2660
  n.Week,
2661
2661
  { className: s[p.Week], key: k.weekNumber, style: h?.[p.Week], week: k },
2662
2662
  x && // biome-ignore lint/a11y/useSemanticElements: react component
2663
- m.createElement(n.WeekNumber, { week: k, style: h?.[p.WeekNumber], "aria-label": Ke(k.weekNumber, {
2663
+ m.createElement(n.WeekNumber, { week: k, style: h?.[p.WeekNumber], "aria-label": Me(k.weekNumber, {
2664
2664
  locale: i
2665
- }), className: s[p.WeekNumber], scope: "row", role: "rowheader" }, j(k.weekNumber, a)),
2666
- k.days.map((Y) => {
2667
- const { date: Q } = Y, P = X(Y);
2668
- if (P[I.focused] = !P.hidden && !!$e?.isEqualTo(Y), P[J.selected] = De?.(Q) || P.selected, ft(Oe)) {
2669
- const { from: nt, to: ot } = Oe;
2670
- P[J.range_start] = !!(nt && ot && a.isSameDay(Q, nt)), P[J.range_end] = !!(nt && ot && a.isSameDay(Q, ot)), P[J.range_middle] = de(Oe, Q, !0, a);
2665
+ }), className: s[p.WeekNumber], scope: "row", role: "rowheader" }, I(k.weekNumber, a)),
2666
+ k.days.map((E) => {
2667
+ const { date: Q } = E, P = Oe(E);
2668
+ if (P[j.focused] = !P.hidden && !!qe?.isEqualTo(E), P[J.selected] = ye?.(Q) || P.selected, bt(pe)) {
2669
+ const { from: ut, to: dt } = pe;
2670
+ P[J.range_start] = !!(ut && dt && a.isSameDay(Q, ut)), P[J.range_end] = !!(ut && dt && a.isSameDay(Q, dt)), P[J.range_middle] = de(pe, Q, !0, a);
2671
2671
  }
2672
- const dn = Ir(P, h, t.modifiersStyles), ln = Or(P, s, t.modifiersClassNames), fn = !Ee && !P.hidden ? N(Q, P, a.options, a) : void 0;
2672
+ const dn = jr(P, h, t.modifiersStyles), ln = Or(P, s, t.modifiersClassNames), fn = !Te && !P.hidden ? ze(Q, P, a.options, a) : void 0;
2673
2673
  return (
2674
2674
  // biome-ignore lint/a11y/useSemanticElements: react component
2675
- m.createElement(n.Day, { key: `${a.format(Q, "yyyy-MM-dd")}_${a.format(Y.displayMonth, "yyyy-MM")}`, day: Y, modifiers: P, className: ln.join(" "), style: dn, role: "gridcell", "aria-selected": P.selected || void 0, "aria-label": fn, "data-day": a.format(Q, "yyyy-MM-dd"), "data-month": Y.outside ? a.format(Q, "yyyy-MM") : void 0, "data-selected": P.selected || void 0, "data-disabled": P.disabled || void 0, "data-hidden": P.hidden || void 0, "data-outside": Y.outside || void 0, "data-focused": P.focused || void 0, "data-today": P.today || void 0 }, !P.hidden && Ee ? m.createElement(n.DayButton, { className: s[p.DayButton], style: h?.[p.DayButton], type: "button", day: Y, modifiers: P, disabled: P.disabled || void 0, tabIndex: qe(Y) ? 0 : -1, "aria-label": Qe(Q, P, a.options, a), onClick: Ye(Y, P), onBlur: et(Y, P), onFocus: ze(Y, P), onKeyDown: mt(Y, P), onMouseEnter: Ze(Y, P), onMouseLeave: tt(Y, P) }, M(Q, a.options, a)) : !P.hidden && M(Y.date, a.options, a))
2675
+ m.createElement(n.Day, { key: `${a.format(Q, "yyyy-MM-dd")}_${a.format(E.displayMonth, "yyyy-MM")}`, day: E, modifiers: P, className: ln.join(" "), style: dn, role: "gridcell", "aria-selected": P.selected || void 0, "aria-label": fn, "data-day": a.format(Q, "yyyy-MM-dd"), "data-month": E.outside ? a.format(Q, "yyyy-MM") : void 0, "data-selected": P.selected || void 0, "data-disabled": P.disabled || void 0, "data-hidden": P.hidden || void 0, "data-outside": E.outside || void 0, "data-focused": P.focused || void 0, "data-today": P.today || void 0 }, !P.hidden && Te ? m.createElement(n.DayButton, { className: s[p.DayButton], style: h?.[p.DayButton], type: "button", day: E, modifiers: P, disabled: P.disabled || void 0, tabIndex: ot(E) ? 0 : -1, "aria-label": Le(Q, P, a.options, a), onClick: it(E, P), onBlur: Ve(E, P), onFocus: Ge(E, P), onKeyDown: Ee(E, P), onMouseEnter: Xe(E, P), onMouseLeave: Qe(E, P) }, M(Q, a.options, a)) : !P.hidden && M(E.date, a.options, a))
2676
2676
  );
2677
2677
  })
2678
2678
  )))
@@ -2766,15 +2766,15 @@ const Da = {
2766
2766
  medium: "{{date}}, {{time}}",
2767
2767
  short: "{{date}}, {{time}}"
2768
2768
  }, Ca = {
2769
- date: xe({
2769
+ date: Ce({
2770
2770
  formats: Oa,
2771
2771
  defaultWidth: "full"
2772
2772
  }),
2773
- time: xe({
2773
+ time: Ce({
2774
2774
  formats: Wa,
2775
2775
  defaultWidth: "full"
2776
2776
  }),
2777
- dateTime: xe({
2777
+ dateTime: Ce({
2778
2778
  formats: Sa,
2779
2779
  defaultWidth: "full"
2780
2780
  })
@@ -2796,11 +2796,11 @@ const Da = {
2796
2796
  narrow: ["AC", "DC"],
2797
2797
  abbreviated: ["AC", "DC"],
2798
2798
  wide: ["antes de cristo", "después de cristo"]
2799
- }, Ea = {
2799
+ }, Ya = {
2800
2800
  narrow: ["1", "2", "3", "4"],
2801
2801
  abbreviated: ["T1", "T2", "T3", "T4"],
2802
2802
  wide: ["1º trimestre", "2º trimestre", "3º trimestre", "4º trimestre"]
2803
- }, Ya = {
2803
+ }, Ea = {
2804
2804
  narrow: ["e", "f", "m", "a", "m", "j", "j", "a", "s", "o", "n", "d"],
2805
2805
  abbreviated: [
2806
2806
  "ene",
@@ -2905,19 +2905,19 @@ const Da = {
2905
2905
  evening: "de la tarde",
2906
2906
  night: "de la noche"
2907
2907
  }
2908
- }, ja = (e, t) => Number(e) + "º", Ia = {
2909
- ordinalNumber: ja,
2908
+ }, Ia = (e, t) => Number(e) + "º", ja = {
2909
+ ordinalNumber: Ia,
2910
2910
  era: ne({
2911
2911
  values: Ta,
2912
2912
  defaultWidth: "wide"
2913
2913
  }),
2914
2914
  quarter: ne({
2915
- values: Ea,
2915
+ values: Ya,
2916
2916
  defaultWidth: "wide",
2917
2917
  argumentCallback: (e) => Number(e) - 1
2918
2918
  }),
2919
2919
  month: ne({
2920
- values: Ya,
2920
+ values: Ea,
2921
2921
  defaultWidth: "wide"
2922
2922
  }),
2923
2923
  day: ne({
@@ -3002,7 +3002,7 @@ const Da = {
3002
3002
  night: /noche/i
3003
3003
  }
3004
3004
  }, Ua = {
3005
- ordinalNumber: Ht({
3005
+ ordinalNumber: Lt({
3006
3006
  matchPattern: Ha,
3007
3007
  parsePattern: Aa,
3008
3008
  valueCallback: function(e) {
@@ -3040,91 +3040,119 @@ const Da = {
3040
3040
  parsePatterns: Qa,
3041
3041
  defaultParseWidth: "any"
3042
3042
  })
3043
- }, ct = {
3043
+ }, yt = {
3044
3044
  code: "es",
3045
3045
  formatDistance: ka,
3046
3046
  formatLong: Ca,
3047
3047
  formatRelative: Pa,
3048
- localize: Ia,
3048
+ localize: ja,
3049
3049
  match: Ua,
3050
3050
  options: {
3051
3051
  weekStartsOn: 1,
3052
3052
  firstWeekContainsDate: 1
3053
3053
  }
3054
3054
  }, ss = (e) => {
3055
- const { mode: t = "single", required: n = !1, selected: o, onSelect: r, disabledDates: a, header: i, footer: s, hideOutsideDays: c = !1, numberOfMonths: d = 1, startMonth: l, endMonth: u, showActionButtons: f = !1, applyLabel: w = "Aplicar", cancelLabel: D = "Cancelar", onApply: W, onCancel: b, hideFooter: O = !1, variant: y = "input", inputProps: g, label: x = "", name: h = "datepicker", className: v } = e, M = t === "range" || t === "multiple" ? e.min : void 0, C = t === "range" || t === "multiple" ? e.max : void 0, j = t === "range" ? e.excludeDisabled : void 0, [_, H] = Me({}), [F, Z] = Me(!1), [se, ee] = Me(!1), [ie, ce] = Me(o), R = Ce(null), L = Ce(null), V = f ? ie : o, X = f ? o : V;
3056
- Ge(() => {
3055
+ const {
3056
+ mode: t = "single",
3057
+ required: n = !1,
3058
+ selected: o,
3059
+ onSelect: r,
3060
+ disabledDates: a,
3061
+ header: i,
3062
+ footer: s,
3063
+ hideOutsideDays: c = !1,
3064
+ numberOfMonths: d = 1,
3065
+ startMonth: l,
3066
+ endMonth: u,
3067
+ showActionButtons: f = !1,
3068
+ applyLabel: w = "Aplicar",
3069
+ cancelLabel: D = "Cancelar",
3070
+ onApply: W,
3071
+ onCancel: b,
3072
+ hideFooter: O = !1,
3073
+ variant: y = "input",
3074
+ inputProps: g,
3075
+ label: x = "",
3076
+ name: h = "datepicker",
3077
+ className: v
3078
+ } = e, M = t === "range" || t === "multiple" ? e.min : void 0, C = t === "range" || t === "multiple" ? e.max : void 0, I = t === "range" ? e.excludeDisabled : void 0, [_, H] = he({}), [F, Z] = he(!1), [se, ee] = he(!1), [ie, ce] = he(o), [G, V] = he(!1), L = Se(null), Oe = Se(null), ye = f ? ie : o, X = f ? o : ye;
3079
+ _e(() => {
3080
+ window.innerWidth < 768 ? V(!0) : V(!1);
3081
+ }, []), _e(() => {
3057
3082
  f && ce(o);
3058
- }, [o, f]), Ge(() => {
3083
+ }, [o, f]), _e(() => {
3059
3084
  if (y !== "input" || !F) return;
3060
- const N = (G) => {
3061
- R.current && !R.current.contains(G.target) && (Z(!1), f && ce(o));
3085
+ const N = (z) => {
3086
+ L.current && !L.current.contains(z.target) && (Z(!1), f && ce(o));
3062
3087
  };
3063
3088
  return document.addEventListener("mousedown", N), () => {
3064
3089
  document.removeEventListener("mousedown", N);
3065
3090
  };
3066
- }, [y, F, o, f]), Ge(() => {
3067
- if (!F || y !== "input" || !R.current) {
3091
+ }, [y, F, o, f]), _e(() => {
3092
+ if (!F || y !== "input" || !L.current) {
3068
3093
  ee(!1);
3069
3094
  return;
3070
3095
  }
3071
- const N = -30, G = () => {
3072
- const pe = R?.current?.getBoundingClientRect(), ge = L?.current?.getBoundingClientRect();
3073
- if (!pe || !ge) return;
3074
- const Ue = window.innerHeight, Ke = window.innerWidth, Re = pe.height, Le = pe.width, Je = ge.left, Ee = ge.bottom, we = Ue - Ee, We = Ke - ge.left, Ye = Le - We, ze = Ye > 0 && We >= Le + N, et = we >= Re + N, Ze = !(we >= Re + N) && et, tt = Ye > 0 ? Ye : 0;
3096
+ const N = 16, z = () => {
3097
+ const be = L?.current?.getBoundingClientRect(), Me = Oe?.current?.getBoundingClientRect();
3098
+ if (!be || !Me) return;
3099
+ const at = window.innerHeight, st = window.innerWidth, Ze = be.height, Te = be.width, Ye = Me.left, ve = Me.bottom, it = ve, Ge = at - ve, Ve = st - Me.left, Ee = Te - Ve, Xe = Ee > 0 && Ve >= Te + N, Qe = it >= Ze + N, Ue = Ge >= Ze + N, Ke = !Ue && Qe, ct = !Ue && !Qe;
3100
+ let Je = Ke ? void 0 : `${ve + 8}px`, et = Ke ? `${Ge + Me.height + 8}px` : void 0;
3101
+ ct && (Je = void 0, et = `${N}px`);
3102
+ const tt = Ee > 0 ? Ee : 0;
3075
3103
  H(
3076
3104
  {
3077
- top: Ze ? void 0 : `${Ee + 8}px`,
3078
- bottom: Ze ? `${we + ge.height + 8}px` : void 0,
3079
- right: ze ? "0" : void 0,
3080
- left: ze ? void 0 : `${Je - tt}px`
3105
+ top: Je,
3106
+ bottom: et,
3107
+ right: Xe ? "0" : void 0,
3108
+ left: Xe ? void 0 : `${Ye - tt}px`
3081
3109
  }
3082
3110
  ), ee(!0);
3083
3111
  }, ue = () => {
3084
3112
  Z(!1), ee(!1);
3085
3113
  };
3086
3114
  window.addEventListener("scroll", ue, !0);
3087
- const me = setTimeout(G, 0);
3115
+ const we = setTimeout(z, 0);
3088
3116
  return () => {
3089
- clearTimeout(me), window.removeEventListener("scroll", ue, !0);
3117
+ clearTimeout(we), window.removeEventListener("scroll", ue, !0);
3090
3118
  };
3091
3119
  }, [F, y]);
3092
- const De = q(() => {
3120
+ const pe = q(() => {
3093
3121
  W?.(ie), r?.(ie), y === "input" && Z(!1);
3094
- }, [W, r, ie, y]), ke = q(() => {
3122
+ }, [W, r, ie, y]), Pe = q(() => {
3095
3123
  ce(o), b?.(), y === "input" && Z(!1);
3096
- }, [b, o, y]), Oe = fe(() => {
3124
+ }, [b, o, y]), qe = fe(() => {
3097
3125
  if (!X) return "";
3098
3126
  if (t === "single")
3099
3127
  return X.toLocaleDateString("es-ES", { day: "2-digit", month: "2-digit", year: "numeric" });
3100
3128
  if (t === "range") {
3101
3129
  const N = X;
3102
3130
  if (!N.from) return "";
3103
- const G = N.from.toLocaleDateString("es-ES", { day: "2-digit", month: "2-digit", year: "numeric" });
3104
- if (!N.to) return G;
3131
+ const z = N.from.toLocaleDateString("es-ES", { day: "2-digit", month: "2-digit", year: "numeric" });
3132
+ if (!N.to) return z;
3105
3133
  const ue = N.to.toLocaleDateString("es-ES", { day: "2-digit", month: "2-digit", year: "numeric" });
3106
- return `${G} - ${ue}`;
3134
+ return `${z} - ${ue}`;
3107
3135
  }
3108
3136
  if (t === "multiple") {
3109
3137
  const N = X;
3110
3138
  return N.length === 0 ? "" : N.length === 1 ? N[0].toLocaleDateString("es-ES", { day: "2-digit", month: "2-digit", year: "numeric" }) : `${N.length} fechas seleccionadas`;
3111
3139
  }
3112
3140
  return "";
3113
- }, [X, t]), Ae = fe(() => y === "input" || y === "input-and-calendar", [y]), $e = fe(() => y === "only-calendar" || y === "input-and-calendar" || y === "input", [y]), qe = q((N) => {
3141
+ }, [X, t]), ot = fe(() => y === "input" || y === "input-and-calendar", [y]), Re = fe(() => y === "only-calendar" || y === "input-and-calendar" || y === "input", [y]), ge = q((N) => {
3114
3142
  r?.(N);
3115
- }, [r]), Te = q((N) => {
3116
- const G = new Date(parseInt(N.slice(6, 10)), parseInt(N.slice(3, 5)) - 1, parseInt(N.slice(0, 2)));
3143
+ }, [r]), Le = q((N) => {
3144
+ const z = new Date(parseInt(N.slice(6, 10)), parseInt(N.slice(3, 5)) - 1, parseInt(N.slice(0, 2)));
3117
3145
  if (t === "multiple") {
3118
- const me = (X || []).filter((pe) => pe.getTime() !== G.getTime());
3119
- f ? (r?.(me), ce(me)) : qe(me);
3146
+ const we = (X || []).filter((be) => be.getTime() !== z.getTime());
3147
+ f ? (r?.(we), ce(we)) : ge(we);
3120
3148
  }
3121
- }, [t, X, f, r, qe]), ye = q((N) => {
3149
+ }, [t, X, f, r, ge]), ze = q((N) => {
3122
3150
  if (f) {
3123
3151
  ce(N);
3124
3152
  return;
3125
3153
  }
3126
3154
  y === "input" && t === "single" && Z(!1), r?.(N);
3127
- }, [f, y, t, r]), Qe = q(() => {
3155
+ }, [f, y, t, r]), rt = q(() => {
3128
3156
  const N = X || [];
3129
3157
  return /* @__PURE__ */ $.jsx(
3130
3158
  gn,
@@ -3132,32 +3160,32 @@ const Da = {
3132
3160
  label: x,
3133
3161
  placeholder: "Seleccione una o más fechas",
3134
3162
  name: h,
3135
- value: N.sort((G, ue) => G.getTime() - ue.getTime()).map((G) => G.toLocaleDateString("es-ES", { day: "2-digit", month: "2-digit", year: "numeric" })),
3163
+ value: N.sort((z, ue) => z.getTime() - ue.getTime()).map((z) => z.toLocaleDateString("es-ES", { day: "2-digit", month: "2-digit", year: "numeric" })),
3136
3164
  onChange: () => {
3137
3165
  },
3138
3166
  onClick: () => Z(!0),
3139
- className: Ve("w-[360px]", g?.className),
3167
+ className: Be("w-[360px]", g?.className),
3140
3168
  readonly: !0,
3141
- onValueDelete: Te,
3142
- icon: /* @__PURE__ */ $.jsx(yt.Calendar, {})
3169
+ onValueDelete: Le,
3170
+ icon: /* @__PURE__ */ $.jsx(Mt.Calendar, {})
3143
3171
  }
3144
3172
  );
3145
- }, [X, x, h, Te, g]);
3146
- return /* @__PURE__ */ $.jsxs("div", { className: "relative w-max flex flex-col gap-2", children: [
3147
- Ae && /* @__PURE__ */ $.jsx(
3173
+ }, [X, x, h, Le, g]);
3174
+ return /* @__PURE__ */ $.jsxs("div", { className: Be("relative w-max flex flex-col gap-2 lg:min-w-[360px] min-w-auto", g?.className), children: [
3175
+ ot && /* @__PURE__ */ $.jsx(
3148
3176
  "div",
3149
3177
  {
3150
- ref: L,
3151
- className: "relative w-max",
3152
- children: t === "multiple" ? Qe() : /* @__PURE__ */ $.jsx(
3178
+ ref: Oe,
3179
+ className: "relative w-full",
3180
+ children: t === "multiple" ? rt() : /* @__PURE__ */ $.jsx(
3153
3181
  wn,
3154
3182
  {
3155
- className: " w-[360px]",
3183
+ readOnly: !0,
3156
3184
  ...g,
3157
- icon: /* @__PURE__ */ $.jsx(yt.Calendar, {}),
3185
+ icon: /* @__PURE__ */ $.jsx(Mt.Calendar, {}),
3158
3186
  iconPosition: "right",
3159
3187
  type: "text",
3160
- value: Oe,
3188
+ value: qe,
3161
3189
  onChange: () => {
3162
3190
  },
3163
3191
  name: h,
@@ -3169,33 +3197,33 @@ const Da = {
3169
3197
  )
3170
3198
  }
3171
3199
  ),
3172
- $e && (y === "input" ? L.current?.parentElement && bn(
3200
+ Re && (y === "input" ? document?.body && bn(
3173
3201
  /* @__PURE__ */ $.jsx(
3174
- dt,
3202
+ gt,
3175
3203
  {
3176
3204
  mode: t,
3177
3205
  footer: s,
3178
3206
  header: i,
3179
3207
  selected: o,
3180
- ref: R,
3208
+ ref: L,
3181
3209
  endMonth: u,
3182
3210
  required: n,
3183
- onApply: De,
3184
- onCancel: ke,
3211
+ onApply: pe,
3212
+ onCancel: Pe,
3185
3213
  hideFooter: O,
3186
3214
  startMonth: l,
3187
3215
  applyLabel: w,
3188
3216
  cancelLabel: D,
3189
- displayValue: V,
3217
+ displayValue: ye,
3190
3218
  disabledDates: a,
3191
- numberOfMonths: d,
3192
- onSelect: ye,
3219
+ numberOfMonths: G ? 1 : d,
3220
+ onSelect: ze,
3193
3221
  hideOutsideDays: c,
3194
3222
  showActionButtons: f,
3195
3223
  min: M,
3196
3224
  max: C,
3197
- excludeDisabled: j,
3198
- className: Ve("bg-neutral-strong-default text-neutral-default-default shadow", v),
3225
+ excludeDisabled: I,
3226
+ className: Be("bg-neutral-strong-default text-neutral-default-default shadow", v),
3199
3227
  style: {
3200
3228
  top: _?.top,
3201
3229
  left: _?.left,
@@ -3209,9 +3237,9 @@ const Da = {
3209
3237
  }
3210
3238
  }
3211
3239
  ),
3212
- L.current?.parentElement
3240
+ document.body
3213
3241
  ) : /* @__PURE__ */ $.jsx(
3214
- dt,
3242
+ gt,
3215
3243
  {
3216
3244
  min: M,
3217
3245
  max: C,
@@ -3222,23 +3250,23 @@ const Da = {
3222
3250
  endMonth: u,
3223
3251
  selected: o,
3224
3252
  className: v,
3225
- onApply: De,
3253
+ onApply: pe,
3226
3254
  startMonth: l,
3227
3255
  applyLabel: w,
3228
3256
  hideFooter: O,
3229
- onCancel: ke,
3257
+ onCancel: Pe,
3230
3258
  cancelLabel: D,
3231
- displayValue: V,
3259
+ displayValue: ye,
3232
3260
  disabledDates: a,
3233
- numberOfMonths: d,
3234
- onSelect: ye,
3261
+ numberOfMonths: G ? 1 : d,
3262
+ onSelect: ze,
3235
3263
  hideOutsideDays: c,
3236
3264
  showActionButtons: f,
3237
- excludeDisabled: j
3265
+ excludeDisabled: I
3238
3266
  }
3239
3267
  ))
3240
3268
  ] });
3241
- }, dt = pn((e) => {
3269
+ }, gt = pn((e) => {
3242
3270
  const {
3243
3271
  ref: t,
3244
3272
  min: n,
@@ -3264,7 +3292,7 @@ const Da = {
3264
3292
  cancelLabel: v = "Cancelar",
3265
3293
  hideOutsideDays: M = !1,
3266
3294
  showActionButtons: C = !1
3267
- } = e, j = fe(() => {
3295
+ } = e, I = fe(() => {
3268
3296
  if (l) {
3269
3297
  if (y === "single")
3270
3298
  return l;
@@ -3296,25 +3324,28 @@ const Da = {
3296
3324
  // Días fuera del mes actual
3297
3325
  outside: "text-neutral-medium-default",
3298
3326
  //Contenedor
3299
- months: "flex gap-4 justify-center relative ",
3300
- root: "px-2 text-neutral-default-default"
3327
+ months: "flex gap-4 justify-center relative w-full flex-wrap overflow-auto ",
3328
+ root: "px-2 text-neutral-default-default "
3301
3329
  }), []);
3302
3330
  return /* @__PURE__ */ $.jsxs(
3303
3331
  "div",
3304
3332
  {
3305
3333
  ref: t,
3306
- className: Ve(
3334
+ className: Be(
3307
3335
  "border border-neutral-default-default rounded-lg",
3308
- g > 1 ? `w-[${g * 360}px]` : "w-[360px]",
3309
3336
  w
3310
3337
  ),
3311
- style: r,
3338
+ style: {
3339
+ ...r,
3340
+ width: g * 360,
3341
+ overflowX: "auto"
3342
+ },
3312
3343
  children: [
3313
3344
  a && /* @__PURE__ */ $.jsx("div", { className: "pt-6 pl-6 pr-3 pb-2 min-h-[68px]", children: typeof a == "string" ? /* @__PURE__ */ $.jsx("p", { className: "prometeo-fonts-label-large text-neutral-medium-default w-64 ", children: a }) : a }),
3314
3345
  y === "single" && /* @__PURE__ */ $.jsx(
3315
- it,
3346
+ ht,
3316
3347
  {
3317
- locale: ct,
3348
+ locale: yt,
3318
3349
  mode: "single",
3319
3350
  captionLayout: "dropdown-months",
3320
3351
  formatters: _,
@@ -3322,7 +3353,7 @@ const Da = {
3322
3353
  required: u,
3323
3354
  disabled: b,
3324
3355
  selected: W,
3325
- defaultMonth: j,
3356
+ defaultMonth: I,
3326
3357
  className: "px-3",
3327
3358
  showOutsideDays: !M,
3328
3359
  numberOfMonths: g,
@@ -3332,7 +3363,7 @@ const Da = {
3332
3363
  }
3333
3364
  ),
3334
3365
  y === "range" && /* @__PURE__ */ $.jsx(
3335
- it,
3366
+ ht,
3336
3367
  {
3337
3368
  mode: "range",
3338
3369
  captionLayout: "dropdown-months",
@@ -3340,7 +3371,7 @@ const Da = {
3340
3371
  classNames: H,
3341
3372
  numberOfMonths: g,
3342
3373
  selected: W,
3343
- defaultMonth: j,
3374
+ defaultMonth: I,
3344
3375
  onSelect: d,
3345
3376
  required: u,
3346
3377
  disabled: b,
@@ -3349,19 +3380,19 @@ const Da = {
3349
3380
  min: n,
3350
3381
  max: o,
3351
3382
  pagedNavigation: !0,
3352
- locale: ct,
3383
+ locale: yt,
3353
3384
  excludeDisabled: O ?? !0
3354
3385
  }
3355
3386
  ),
3356
3387
  y === "multiple" && /* @__PURE__ */ $.jsx(
3357
- it,
3388
+ ht,
3358
3389
  {
3359
3390
  mode: "multiple",
3360
3391
  captionLayout: "dropdown-months",
3361
3392
  formatters: _,
3362
3393
  classNames: H,
3363
3394
  selected: W,
3364
- defaultMonth: j,
3395
+ defaultMonth: I,
3365
3396
  onSelect: d,
3366
3397
  required: u,
3367
3398
  disabled: b,
@@ -3369,15 +3400,15 @@ const Da = {
3369
3400
  endMonth: f,
3370
3401
  min: n,
3371
3402
  max: o,
3372
- locale: ct
3403
+ locale: yt
3373
3404
  }
3374
3405
  ),
3375
- !x && /* @__PURE__ */ $.jsx("div", { className: Ve(
3406
+ !x && /* @__PURE__ */ $.jsx("div", { className: Be(
3376
3407
  "w-full min-h-[40px] pt-2 px-3 pb-3 flex items-center relative"
3377
3408
  ), children: typeof i == "string" ? /* @__PURE__ */ $.jsx("p", { className: "prometeo-fonts-label-large text-neutral-medium-default w-64 ", children: i }) : i }),
3378
3409
  C && /* @__PURE__ */ $.jsxs("div", { className: "w-full px-3 pb-3 pt-2 flex gap-2 justify-end ", children: [
3379
3410
  /* @__PURE__ */ $.jsx(
3380
- pt,
3411
+ vt,
3381
3412
  {
3382
3413
  variant: "text",
3383
3414
  onClick: c,
@@ -3386,7 +3417,7 @@ const Da = {
3386
3417
  }
3387
3418
  ),
3388
3419
  /* @__PURE__ */ $.jsx(
3389
- pt,
3420
+ vt,
3390
3421
  {
3391
3422
  onClick: s,
3392
3423
  variant: "text",
@@ -3399,7 +3430,7 @@ const Da = {
3399
3430
  }
3400
3431
  );
3401
3432
  });
3402
- dt.displayName = "Calendar";
3433
+ gt.displayName = "Calendar";
3403
3434
  export {
3404
3435
  ss as default
3405
3436
  };