lizaui 8.0.3 → 8.0.5

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,48 +1,1154 @@
1
- import { j as a } from "../chunks/jsx-runtime-Dk9ExdSX.js";
2
- import { Popover as rr } from "react-tiny-popover";
3
- import { G as ke } from "../chunks/iconBase-DSKTHwal.js";
4
- import He from "react-calendar";
5
- import ar from "react-date-picker";
6
- import tr, { useLayoutEffect as nr, useEffect as le, useState as re, useRef as U, useCallback as ye, useMemo as or, createElement as Ge } from "react";
7
- import { createPortal as cr } from "react-dom";
8
- import se from "clsx";
9
- import { u as we, g as ir, a as lr, b as $e, c as te, d as ae, e as sr, f as dr, h as ur, i as _r, j as pr, k as hr, l as fr, m as gr, n as mr, o as vr, p as yr, q as br, F as wr, r as q, s as xr } from "../chunks/styled-components.browser.esm-C7xt3djl.js";
10
- import { twMerge as Se } from "tailwind-merge";
11
- import { v4 as kr } from "uuid";
12
- import { L as Er } from "../chunks/label-error-Dg6_L7YY.js";
13
- import { c as jr } from "../chunks/utils-B6yFEsav.js";
14
- import { B as Ye } from "../chunks/button-COC4E-Qv.js";
15
- function Ir(e) {
16
- return ke({ attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.2 288 416 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-306.7 0L214.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z" }, child: [] }] })(e);
17
- }
18
- function Nr(e) {
19
- return ke({ attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M438.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L338.8 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l306.7 0L233.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160z" }, child: [] }] })(e);
20
- }
21
- const Pe = typeof window < "u", Ar = Pe ? nr : le, Cr = Pe && /(MSIE|Trident\/|Edge\/)/.test(navigator.userAgent), Sr = Pe && /Firefox/.test(navigator.userAgent);
22
- function Fr(e) {
1
+ import { j as o } from "../chunks/jsx-runtime-Dk9ExdSX.js";
2
+ import { Popover as Dt } from "react-tiny-popover";
3
+ import { G as nr } from "../chunks/iconBase-DSKTHwal.js";
4
+ import kt, { Children as Ot, cloneElement as jt, useMemo as Je, forwardRef as Nt, useState as we, useCallback as he, useImperativeHandle as St, useLayoutEffect as Ct, useEffect as Pe, useRef as Se, createElement as Xe } from "react";
5
+ import xe from "clsx";
6
+ import { g as Hr, j as or, k as Be, l as ir, n as Ve, o as Ur, p as zr, q as Kr, r as Zr, s as qr, t as At, v as Ia, w as Ta, x as $a, y as Lt, z as Ma, A as Fa, B as Wa, C as Pt, D as Va, E as Ya, G as Ra, H as Et, I as ce, J as cr, K as Ga, L as Ba, M as It, N as Tt, O as $t, P as Qr, Q as er, u as rr, e as Mt, R as Te, S as Ft, T as Wt, m as Ha, F as Ua, U as Le, i as Vt } from "../chunks/styled-components.browser.esm-CxZkQVdi.js";
7
+ import { createPortal as za } from "react-dom";
8
+ import { twMerge as xr } from "tailwind-merge";
9
+ import { v4 as Yt } from "uuid";
10
+ import { L as Rt } from "../chunks/label-error-Dg6_L7YY.js";
11
+ import { c as Gt } from "../chunks/utils-B6yFEsav.js";
12
+ import { B as ma } from "../chunks/button-COC4E-Qv.js";
13
+ function Bt(e) {
14
+ return nr({ attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.2 288 416 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-306.7 0L214.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z" }, child: [] }] })(e);
15
+ }
16
+ function Ht(e) {
17
+ return nr({ attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M438.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L338.8 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l306.7 0L233.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160z" }, child: [] }] })(e);
18
+ }
19
+ var X = {
20
+ GREGORY: "gregory",
21
+ HEBREW: "hebrew",
22
+ ISLAMIC: "islamic",
23
+ ISO_8601: "iso8601"
24
+ }, Ut = {
25
+ gregory: [
26
+ "en-CA",
27
+ "en-US",
28
+ "es-AR",
29
+ "es-BO",
30
+ "es-CL",
31
+ "es-CO",
32
+ "es-CR",
33
+ "es-DO",
34
+ "es-EC",
35
+ "es-GT",
36
+ "es-HN",
37
+ "es-MX",
38
+ "es-NI",
39
+ "es-PA",
40
+ "es-PE",
41
+ "es-PR",
42
+ "es-SV",
43
+ "es-VE",
44
+ "pt-BR"
45
+ ],
46
+ hebrew: ["he", "he-IL"],
47
+ islamic: [
48
+ // ar-LB, ar-MA intentionally missing
49
+ "ar",
50
+ "ar-AE",
51
+ "ar-BH",
52
+ "ar-DZ",
53
+ "ar-EG",
54
+ "ar-IQ",
55
+ "ar-JO",
56
+ "ar-KW",
57
+ "ar-LY",
58
+ "ar-OM",
59
+ "ar-QA",
60
+ "ar-SA",
61
+ "ar-SD",
62
+ "ar-SY",
63
+ "ar-YE",
64
+ "dv",
65
+ "dv-MV",
66
+ "ps",
67
+ "ps-AR"
68
+ ]
69
+ }, Jr = [0, 1, 2, 3, 4, 5, 6], Dr = /* @__PURE__ */ new Map();
70
+ function zt(e) {
71
+ return function(n, a) {
72
+ var t = n || Hr();
73
+ Dr.has(t) || Dr.set(t, /* @__PURE__ */ new Map());
74
+ var i = Dr.get(t);
75
+ return i.has(e) || i.set(e, new Intl.DateTimeFormat(t || void 0, e).format), i.get(e)(a);
76
+ };
77
+ }
78
+ function Kt(e) {
79
+ var r = new Date(e);
80
+ return new Date(r.setHours(12));
81
+ }
82
+ function Me(e) {
83
+ return function(r, n) {
84
+ return zt(e)(r, Kt(n));
85
+ };
86
+ }
87
+ var Zt = { day: "numeric" }, qt = {
88
+ day: "numeric",
89
+ month: "long",
90
+ year: "numeric"
91
+ }, Qt = { month: "long" }, Jt = {
92
+ month: "long",
93
+ year: "numeric"
94
+ }, Xt = { weekday: "short" }, en = { weekday: "long" }, rn = { year: "numeric" }, an = Me(Zt), tn = Me(qt), nn = Me(Qt), Ka = Me(Jt), on = Me(Xt), cn = Me(en), lr = Me(rn), ln = Jr[0], sn = Jr[5], _a = Jr[6];
95
+ function Re(e, r) {
96
+ r === void 0 && (r = X.ISO_8601);
97
+ var n = e.getDay();
98
+ switch (r) {
99
+ case X.ISO_8601:
100
+ return (n + 6) % 7;
101
+ case X.ISLAMIC:
102
+ return (n + 1) % 7;
103
+ case X.HEBREW:
104
+ case X.GREGORY:
105
+ return n;
106
+ default:
107
+ throw new Error("Unsupported calendar type.");
108
+ }
109
+ }
110
+ function un(e) {
111
+ var r = Ur(e);
112
+ return ce(r);
113
+ }
114
+ function dn(e) {
115
+ var r = Ve(e);
116
+ return ce(r);
117
+ }
118
+ function Cr(e, r) {
119
+ r === void 0 && (r = X.ISO_8601);
120
+ var n = ce(e), a = cr(e), t = e.getDate() - Re(e, r);
121
+ return new Date(n, a, t);
122
+ }
123
+ function fn(e, r) {
124
+ r === void 0 && (r = X.ISO_8601);
125
+ var n = r === X.GREGORY ? X.GREGORY : X.ISO_8601, a = Cr(e, r), t = ce(e) + 1, i, c;
126
+ do
127
+ i = new Date(t, 0, n === X.ISO_8601 ? 4 : 1), c = Cr(i, r), t -= 1;
128
+ while (e < c);
129
+ return Math.round((a.getTime() - c.getTime()) / (864e5 * 7)) + 1;
130
+ }
131
+ function $e(e, r) {
132
+ switch (e) {
133
+ case "century":
134
+ return Ur(r);
135
+ case "decade":
136
+ return Ve(r);
137
+ case "year":
138
+ return ir(r);
139
+ case "month":
140
+ return Be(r);
141
+ case "day":
142
+ return or(r);
143
+ default:
144
+ throw new Error("Invalid rangeType: ".concat(e));
145
+ }
146
+ }
147
+ function vn(e, r) {
148
+ switch (e) {
149
+ case "century":
150
+ return Lt(r);
151
+ case "decade":
152
+ return $a(r);
153
+ case "year":
154
+ return Ta(r);
155
+ case "month":
156
+ return Ia(r);
157
+ default:
158
+ throw new Error("Invalid rangeType: ".concat(e));
159
+ }
160
+ }
161
+ function Za(e, r) {
162
+ switch (e) {
163
+ case "century":
164
+ return Pt(r);
165
+ case "decade":
166
+ return Wa(r);
167
+ case "year":
168
+ return Fa(r);
169
+ case "month":
170
+ return Ma(r);
171
+ default:
172
+ throw new Error("Invalid rangeType: ".concat(e));
173
+ }
174
+ }
175
+ function hn(e, r) {
176
+ switch (e) {
177
+ case "decade":
178
+ return $a(r, -100);
179
+ case "year":
180
+ return Ta(r, -10);
181
+ case "month":
182
+ return Ia(r, -12);
183
+ default:
184
+ throw new Error("Invalid rangeType: ".concat(e));
185
+ }
186
+ }
187
+ function mn(e, r) {
188
+ switch (e) {
189
+ case "decade":
190
+ return Wa(r, 100);
191
+ case "year":
192
+ return Fa(r, 10);
193
+ case "month":
194
+ return Ma(r, 12);
195
+ default:
196
+ throw new Error("Invalid rangeType: ".concat(e));
197
+ }
198
+ }
199
+ function qa(e, r) {
200
+ switch (e) {
201
+ case "century":
202
+ return At(r);
203
+ case "decade":
204
+ return qr(r);
205
+ case "year":
206
+ return Zr(r);
207
+ case "month":
208
+ return Kr(r);
209
+ case "day":
210
+ return zr(r);
211
+ default:
212
+ throw new Error("Invalid rangeType: ".concat(e));
213
+ }
214
+ }
215
+ function _n(e, r) {
216
+ switch (e) {
217
+ case "century":
218
+ return Et(r);
219
+ case "decade":
220
+ return Ra(r);
221
+ case "year":
222
+ return Ya(r);
223
+ case "month":
224
+ return Va(r);
225
+ default:
226
+ throw new Error("Invalid rangeType: ".concat(e));
227
+ }
228
+ }
229
+ function gn(e, r) {
230
+ switch (e) {
231
+ case "decade":
232
+ return Ra(r, -100);
233
+ case "year":
234
+ return Ya(r, -10);
235
+ case "month":
236
+ return Va(r, -12);
237
+ default:
238
+ throw new Error("Invalid rangeType: ".concat(e));
239
+ }
240
+ }
241
+ function ga(e, r) {
242
+ switch (e) {
243
+ case "century":
244
+ return Ba(r);
245
+ case "decade":
246
+ return Ga(r);
247
+ case "year":
248
+ return $t(r);
249
+ case "month":
250
+ return Tt(r);
251
+ case "day":
252
+ return It(r);
253
+ default:
254
+ throw new Error("Invalid rangeType: ".concat(e));
255
+ }
256
+ }
257
+ function yn(e, r, n) {
258
+ var a = [r, n].sort(function(t, i) {
259
+ return t.getTime() - i.getTime();
260
+ });
261
+ return [$e(e, a[0]), qa(e, a[1])];
262
+ }
263
+ function Qa(e, r, n) {
264
+ return n.map(function(a) {
265
+ return (r || lr)(e, a);
266
+ }).join(" – ");
267
+ }
268
+ function pn(e, r, n) {
269
+ return Qa(e, r, Ba(n));
270
+ }
271
+ function Ja(e, r, n) {
272
+ return Qa(e, r, Ga(n));
273
+ }
274
+ function bn(e) {
275
+ return e.getDay() === (/* @__PURE__ */ new Date()).getDay();
276
+ }
277
+ function Xa(e, r) {
278
+ r === void 0 && (r = X.ISO_8601);
279
+ var n = e.getDay();
280
+ switch (r) {
281
+ case X.ISLAMIC:
282
+ case X.HEBREW:
283
+ return n === sn || n === _a;
284
+ case X.ISO_8601:
285
+ case X.GREGORY:
286
+ return n === _a || n === ln;
287
+ default:
288
+ throw new Error("Unsupported calendar type.");
289
+ }
290
+ }
291
+ var Ne = "react-calendar__navigation";
292
+ function wn(e) {
293
+ var r = e.activeStartDate, n = e.drillUp, a = e.formatMonthYear, t = a === void 0 ? Ka : a, i = e.formatYear, c = i === void 0 ? lr : i, l = e.locale, u = e.maxDate, s = e.minDate, d = e.navigationAriaLabel, f = d === void 0 ? "" : d, v = e.navigationAriaLive, _ = e.navigationLabel, w = e.next2AriaLabel, b = w === void 0 ? "" : w, y = e.next2Label, x = y === void 0 ? "»" : y, C = e.nextAriaLabel, E = C === void 0 ? "" : C, $ = e.nextLabel, B = $ === void 0 ? "›" : $, L = e.prev2AriaLabel, z = L === void 0 ? "" : L, P = e.prev2Label, K = P === void 0 ? "«" : P, Y = e.prevAriaLabel, ee = Y === void 0 ? "" : Y, Z = e.prevLabel, _e = Z === void 0 ? "‹" : Z, q = e.setActiveStartDate, ne = e.showDoubleView, N = e.view, re = e.views, ge = re.indexOf(N) > 0, S = N !== "century", M = vn(N, r), Q = S ? hn(N, r) : void 0, J = Za(N, r), j = S ? mn(N, r) : void 0, ae = (function() {
294
+ if (M.getFullYear() < 0)
295
+ return !0;
296
+ var A = _n(N, r);
297
+ return s && s >= A;
298
+ })(), oe = S && (function() {
299
+ if (Q.getFullYear() < 0)
300
+ return !0;
301
+ var A = gn(N, r);
302
+ return s && s >= A;
303
+ })(), le = u && u < J, I = S && u && u < j;
304
+ function F() {
305
+ q(M, "prev");
306
+ }
307
+ function se() {
308
+ q(Q, "prev2");
309
+ }
310
+ function ue() {
311
+ q(J, "next");
312
+ }
313
+ function Ce() {
314
+ q(j, "next2");
315
+ }
316
+ function ye(A) {
317
+ var me = (function() {
318
+ switch (N) {
319
+ case "century":
320
+ return pn(l, c, A);
321
+ case "decade":
322
+ return Ja(l, c, A);
323
+ case "year":
324
+ return c(l, A);
325
+ case "month":
326
+ return t(l, A);
327
+ default:
328
+ throw new Error("Invalid view: ".concat(N, "."));
329
+ }
330
+ })();
331
+ return _ ? _({
332
+ date: A,
333
+ label: me,
334
+ locale: l || Hr() || void 0,
335
+ view: N
336
+ }) : me;
337
+ }
338
+ function pe() {
339
+ var A = "".concat(Ne, "__label");
340
+ return o.jsxs("button", { "aria-label": f, "aria-live": v, className: A, disabled: !ge, onClick: n, style: { flexGrow: 1 }, type: "button", children: [o.jsx("span", { className: "".concat(A, "__labelText ").concat(A, "__labelText--from"), children: ye(r) }), ne ? o.jsxs(o.Fragment, { children: [o.jsx("span", { className: "".concat(A, "__divider"), children: " – " }), o.jsx("span", { className: "".concat(A, "__labelText ").concat(A, "__labelText--to"), children: ye(J) })] }) : null] });
341
+ }
342
+ return o.jsxs("div", { className: Ne, children: [K !== null && S ? o.jsx("button", { "aria-label": z, className: "".concat(Ne, "__arrow ").concat(Ne, "__prev2-button"), disabled: oe, onClick: se, type: "button", children: K }) : null, _e !== null && o.jsx("button", { "aria-label": ee, className: "".concat(Ne, "__arrow ").concat(Ne, "__prev-button"), disabled: ae, onClick: F, type: "button", children: _e }), pe(), B !== null && o.jsx("button", { "aria-label": E, className: "".concat(Ne, "__arrow ").concat(Ne, "__next-button"), disabled: le, onClick: ue, type: "button", children: B }), x !== null && S ? o.jsx("button", { "aria-label": b, className: "".concat(Ne, "__arrow ").concat(Ne, "__next2-button"), disabled: I, onClick: Ce, type: "button", children: x }) : null] });
343
+ }
344
+ var Fe = function() {
345
+ return Fe = Object.assign || function(e) {
346
+ for (var r, n = 1, a = arguments.length; n < a; n++) {
347
+ r = arguments[n];
348
+ for (var t in r) Object.prototype.hasOwnProperty.call(r, t) && (e[t] = r[t]);
349
+ }
350
+ return e;
351
+ }, Fe.apply(this, arguments);
352
+ }, xn = function(e, r) {
353
+ var n = {};
354
+ for (var a in e) Object.prototype.hasOwnProperty.call(e, a) && r.indexOf(a) < 0 && (n[a] = e[a]);
355
+ if (e != null && typeof Object.getOwnPropertySymbols == "function")
356
+ for (var t = 0, a = Object.getOwnPropertySymbols(e); t < a.length; t++)
357
+ r.indexOf(a[t]) < 0 && Object.prototype.propertyIsEnumerable.call(e, a[t]) && (n[a[t]] = e[a[t]]);
358
+ return n;
359
+ };
360
+ function ya(e) {
361
+ return "".concat(e, "%");
362
+ }
363
+ function Xr(e) {
364
+ var r = e.children, n = e.className, a = e.count, t = e.direction, i = e.offset, c = e.style, l = e.wrap, u = xn(e, ["children", "className", "count", "direction", "offset", "style", "wrap"]);
365
+ return o.jsx("div", Fe({ className: n, style: Fe({ display: "flex", flexDirection: t, flexWrap: l ? "wrap" : "nowrap" }, c) }, u, { children: Ot.map(r, function(s, d) {
366
+ var f = i && d === 0 ? ya(100 * i / a) : null;
367
+ return jt(s, Fe(Fe({}, s.props), { style: {
368
+ flexBasis: ya(100 / a),
369
+ flexShrink: 0,
370
+ flexGrow: 0,
371
+ overflow: "hidden",
372
+ marginLeft: f,
373
+ marginInlineStart: f,
374
+ marginInlineEnd: 0
375
+ } }));
376
+ }) }));
377
+ }
378
+ function Dn(e, r, n) {
379
+ return r && r > e ? r : n && n < e ? n : e;
380
+ }
381
+ function Ge(e, r) {
382
+ return r[0] <= e && r[1] >= e;
383
+ }
384
+ function kn(e, r) {
385
+ return e[0] <= r[0] && e[1] >= r[1];
386
+ }
387
+ function et(e, r) {
388
+ return Ge(e[0], r) || Ge(e[1], r);
389
+ }
390
+ function pa(e, r, n) {
391
+ var a = et(r, e), t = [];
392
+ if (a) {
393
+ t.push(n);
394
+ var i = Ge(e[0], r), c = Ge(e[1], r);
395
+ i && t.push("".concat(n, "Start")), c && t.push("".concat(n, "End")), i && c && t.push("".concat(n, "BothEnds"));
396
+ }
397
+ return t;
398
+ }
399
+ function On(e) {
400
+ return Array.isArray(e) ? e[0] !== null && e[1] !== null : e !== null;
401
+ }
402
+ function jn(e) {
403
+ if (!e)
404
+ throw new Error("args is required");
405
+ var r = e.value, n = e.date, a = e.hover, t = "react-calendar__tile", i = [t];
406
+ if (!n)
407
+ return i;
408
+ var c = /* @__PURE__ */ new Date(), l = (function() {
409
+ if (Array.isArray(n))
410
+ return n;
411
+ var _ = e.dateType;
412
+ if (!_)
413
+ throw new Error("dateType is required when date is not an array of two dates");
414
+ return ga(_, n);
415
+ })();
416
+ if (Ge(c, l) && i.push("".concat(t, "--now")), !r || !On(r))
417
+ return i;
418
+ var u = (function() {
419
+ if (Array.isArray(r))
420
+ return r;
421
+ var _ = e.valueType;
422
+ if (!_)
423
+ throw new Error("valueType is required when value is not an array of two dates");
424
+ return ga(_, r);
425
+ })();
426
+ kn(u, l) ? i.push("".concat(t, "--active")) : et(u, l) && i.push("".concat(t, "--hasActive"));
427
+ var s = pa(u, l, "".concat(t, "--range"));
428
+ i.push.apply(i, s);
429
+ var d = Array.isArray(r) ? r : [r];
430
+ if (a && d.length === 1) {
431
+ var f = a > u[0] ? [u[0], a] : [a, u[0]], v = pa(f, l, "".concat(t, "--hover"));
432
+ i.push.apply(i, v);
433
+ }
434
+ return i;
435
+ }
436
+ function sr(e) {
437
+ for (var r = e.className, n = e.count, a = n === void 0 ? 3 : n, t = e.dateTransform, i = e.dateType, c = e.end, l = e.hover, u = e.offset, s = e.renderTile, d = e.start, f = e.step, v = f === void 0 ? 1 : f, _ = e.value, w = e.valueType, b = [], y = d; y <= c; y += v) {
438
+ var x = t(y);
439
+ b.push(s({
440
+ classes: jn({
441
+ date: x,
442
+ dateType: i,
443
+ hover: l,
444
+ value: _,
445
+ valueType: w
446
+ }),
447
+ date: x
448
+ }));
449
+ }
450
+ return o.jsx(Xr, { className: r, count: a, offset: u, wrap: !0, children: b });
451
+ }
452
+ function ur(e) {
453
+ var r = e.activeStartDate, n = e.children, a = e.classes, t = e.date, i = e.formatAbbr, c = e.locale, l = e.maxDate, u = e.maxDateTransform, s = e.minDate, d = e.minDateTransform, f = e.onClick, v = e.onMouseOver, _ = e.style, w = e.tileClassName, b = e.tileContent, y = e.tileDisabled, x = e.view, C = Je(function() {
454
+ var $ = { activeStartDate: r, date: t, view: x };
455
+ return typeof w == "function" ? w($) : w;
456
+ }, [r, t, w, x]), E = Je(function() {
457
+ var $ = { activeStartDate: r, date: t, view: x };
458
+ return typeof b == "function" ? b($) : b;
459
+ }, [r, t, b, x]);
460
+ return o.jsxs("button", { className: xe(a, C), disabled: s && d(s) > t || l && u(l) < t || y?.({ activeStartDate: r, date: t, view: x }), onClick: f ? function($) {
461
+ return f(t, $);
462
+ } : void 0, onFocus: v ? function() {
463
+ return v(t);
464
+ } : void 0, onMouseOver: v ? function() {
465
+ return v(t);
466
+ } : void 0, style: _, type: "button", children: [i ? o.jsx("abbr", { "aria-label": i(c, t), children: n }) : n, E] });
467
+ }
468
+ var Ar = function() {
469
+ return Ar = Object.assign || function(e) {
470
+ for (var r, n = 1, a = arguments.length; n < a; n++) {
471
+ r = arguments[n];
472
+ for (var t in r) Object.prototype.hasOwnProperty.call(r, t) && (e[t] = r[t]);
473
+ }
474
+ return e;
475
+ }, Ar.apply(this, arguments);
476
+ }, Nn = function(e, r) {
477
+ var n = {};
478
+ for (var a in e) Object.prototype.hasOwnProperty.call(e, a) && r.indexOf(a) < 0 && (n[a] = e[a]);
479
+ if (e != null && typeof Object.getOwnPropertySymbols == "function")
480
+ for (var t = 0, a = Object.getOwnPropertySymbols(e); t < a.length; t++)
481
+ r.indexOf(a[t]) < 0 && Object.prototype.propertyIsEnumerable.call(e, a[t]) && (n[a[t]] = e[a[t]]);
482
+ return n;
483
+ }, ba = "react-calendar__century-view__decades__decade";
484
+ function Sn(e) {
485
+ var r = e.classes, n = r === void 0 ? [] : r, a = e.currentCentury, t = e.formatYear, i = t === void 0 ? lr : t, c = Nn(e, ["classes", "currentCentury", "formatYear"]), l = c.date, u = c.locale, s = [];
486
+ return n && s.push.apply(s, n), s.push(ba), Ur(l).getFullYear() !== a && s.push("".concat(ba, "--neighboringCentury")), o.jsx(ur, Ar({}, c, { classes: s, maxDateTransform: qr, minDateTransform: Ve, view: "century", children: Ja(u, i, l) }));
487
+ }
488
+ var Lr = function() {
489
+ return Lr = Object.assign || function(e) {
490
+ for (var r, n = 1, a = arguments.length; n < a; n++) {
491
+ r = arguments[n];
492
+ for (var t in r) Object.prototype.hasOwnProperty.call(r, t) && (e[t] = r[t]);
493
+ }
494
+ return e;
495
+ }, Lr.apply(this, arguments);
496
+ }, wa = function(e, r) {
497
+ var n = {};
498
+ for (var a in e) Object.prototype.hasOwnProperty.call(e, a) && r.indexOf(a) < 0 && (n[a] = e[a]);
499
+ if (e != null && typeof Object.getOwnPropertySymbols == "function")
500
+ for (var t = 0, a = Object.getOwnPropertySymbols(e); t < a.length; t++)
501
+ r.indexOf(a[t]) < 0 && Object.prototype.propertyIsEnumerable.call(e, a[t]) && (n[a[t]] = e[a[t]]);
502
+ return n;
503
+ };
504
+ function Cn(e) {
505
+ var r = e.activeStartDate, n = e.hover, a = e.showNeighboringCentury, t = e.value, i = e.valueType, c = wa(e, ["activeStartDate", "hover", "showNeighboringCentury", "value", "valueType"]), l = un(r), u = l + (a ? 119 : 99);
506
+ return o.jsx(sr, { className: "react-calendar__century-view__decades", dateTransform: Ve, dateType: "decade", end: u, hover: n, renderTile: function(s) {
507
+ var d = s.date, f = wa(s, ["date"]);
508
+ return o.jsx(Sn, Lr({}, c, f, { activeStartDate: r, currentCentury: l, date: d }), d.getTime());
509
+ }, start: l, step: 10, value: t, valueType: i });
510
+ }
511
+ var Pr = function() {
512
+ return Pr = Object.assign || function(e) {
513
+ for (var r, n = 1, a = arguments.length; n < a; n++) {
514
+ r = arguments[n];
515
+ for (var t in r) Object.prototype.hasOwnProperty.call(r, t) && (e[t] = r[t]);
516
+ }
517
+ return e;
518
+ }, Pr.apply(this, arguments);
519
+ };
520
+ function An(e) {
521
+ function r() {
522
+ return o.jsx(Cn, Pr({}, e));
523
+ }
524
+ return o.jsx("div", { className: "react-calendar__century-view", children: r() });
525
+ }
526
+ var Er = function() {
527
+ return Er = Object.assign || function(e) {
528
+ for (var r, n = 1, a = arguments.length; n < a; n++) {
529
+ r = arguments[n];
530
+ for (var t in r) Object.prototype.hasOwnProperty.call(r, t) && (e[t] = r[t]);
531
+ }
532
+ return e;
533
+ }, Er.apply(this, arguments);
534
+ }, Ln = function(e, r) {
535
+ var n = {};
536
+ for (var a in e) Object.prototype.hasOwnProperty.call(e, a) && r.indexOf(a) < 0 && (n[a] = e[a]);
537
+ if (e != null && typeof Object.getOwnPropertySymbols == "function")
538
+ for (var t = 0, a = Object.getOwnPropertySymbols(e); t < a.length; t++)
539
+ r.indexOf(a[t]) < 0 && Object.prototype.propertyIsEnumerable.call(e, a[t]) && (n[a[t]] = e[a[t]]);
540
+ return n;
541
+ }, xa = "react-calendar__decade-view__years__year";
542
+ function Pn(e) {
543
+ var r = e.classes, n = r === void 0 ? [] : r, a = e.currentDecade, t = e.formatYear, i = t === void 0 ? lr : t, c = Ln(e, ["classes", "currentDecade", "formatYear"]), l = c.date, u = c.locale, s = [];
544
+ return n && s.push.apply(s, n), s.push(xa), Ve(l).getFullYear() !== a && s.push("".concat(xa, "--neighboringDecade")), o.jsx(ur, Er({}, c, { classes: s, maxDateTransform: Zr, minDateTransform: ir, view: "decade", children: i(u, l) }));
545
+ }
546
+ var Ir = function() {
547
+ return Ir = Object.assign || function(e) {
548
+ for (var r, n = 1, a = arguments.length; n < a; n++) {
549
+ r = arguments[n];
550
+ for (var t in r) Object.prototype.hasOwnProperty.call(r, t) && (e[t] = r[t]);
551
+ }
552
+ return e;
553
+ }, Ir.apply(this, arguments);
554
+ }, Da = function(e, r) {
555
+ var n = {};
556
+ for (var a in e) Object.prototype.hasOwnProperty.call(e, a) && r.indexOf(a) < 0 && (n[a] = e[a]);
557
+ if (e != null && typeof Object.getOwnPropertySymbols == "function")
558
+ for (var t = 0, a = Object.getOwnPropertySymbols(e); t < a.length; t++)
559
+ r.indexOf(a[t]) < 0 && Object.prototype.propertyIsEnumerable.call(e, a[t]) && (n[a[t]] = e[a[t]]);
560
+ return n;
561
+ };
562
+ function En(e) {
563
+ var r = e.activeStartDate, n = e.hover, a = e.showNeighboringDecade, t = e.value, i = e.valueType, c = Da(e, ["activeStartDate", "hover", "showNeighboringDecade", "value", "valueType"]), l = dn(r), u = l + (a ? 11 : 9);
564
+ return o.jsx(sr, { className: "react-calendar__decade-view__years", dateTransform: ir, dateType: "year", end: u, hover: n, renderTile: function(s) {
565
+ var d = s.date, f = Da(s, ["date"]);
566
+ return o.jsx(Pn, Ir({}, c, f, { activeStartDate: r, currentDecade: l, date: d }), d.getTime());
567
+ }, start: l, value: t, valueType: i });
568
+ }
569
+ var Tr = function() {
570
+ return Tr = Object.assign || function(e) {
571
+ for (var r, n = 1, a = arguments.length; n < a; n++) {
572
+ r = arguments[n];
573
+ for (var t in r) Object.prototype.hasOwnProperty.call(r, t) && (e[t] = r[t]);
574
+ }
575
+ return e;
576
+ }, Tr.apply(this, arguments);
577
+ };
578
+ function In(e) {
579
+ function r() {
580
+ return o.jsx(En, Tr({}, e));
581
+ }
582
+ return o.jsx("div", { className: "react-calendar__decade-view", children: r() });
583
+ }
584
+ var $r = function() {
585
+ return $r = Object.assign || function(e) {
586
+ for (var r, n = 1, a = arguments.length; n < a; n++) {
587
+ r = arguments[n];
588
+ for (var t in r) Object.prototype.hasOwnProperty.call(r, t) && (e[t] = r[t]);
589
+ }
590
+ return e;
591
+ }, $r.apply(this, arguments);
592
+ }, Tn = function(e, r) {
593
+ var n = {};
594
+ for (var a in e) Object.prototype.hasOwnProperty.call(e, a) && r.indexOf(a) < 0 && (n[a] = e[a]);
595
+ if (e != null && typeof Object.getOwnPropertySymbols == "function")
596
+ for (var t = 0, a = Object.getOwnPropertySymbols(e); t < a.length; t++)
597
+ r.indexOf(a[t]) < 0 && Object.prototype.propertyIsEnumerable.call(e, a[t]) && (n[a[t]] = e[a[t]]);
598
+ return n;
599
+ }, ka = function(e, r, n) {
600
+ if (n || arguments.length === 2) for (var a = 0, t = r.length, i; a < t; a++)
601
+ (i || !(a in r)) && (i || (i = Array.prototype.slice.call(r, 0, a)), i[a] = r[a]);
602
+ return e.concat(i || Array.prototype.slice.call(r));
603
+ }, $n = "react-calendar__year-view__months__month";
604
+ function Mn(e) {
605
+ var r = e.classes, n = r === void 0 ? [] : r, a = e.formatMonth, t = a === void 0 ? nn : a, i = e.formatMonthYear, c = i === void 0 ? Ka : i, l = Tn(e, ["classes", "formatMonth", "formatMonthYear"]), u = l.date, s = l.locale;
606
+ return o.jsx(ur, $r({}, l, { classes: ka(ka([], n, !0), [$n], !1), formatAbbr: c, maxDateTransform: Kr, minDateTransform: Be, view: "year", children: t(s, u) }));
607
+ }
608
+ var Mr = function() {
609
+ return Mr = Object.assign || function(e) {
610
+ for (var r, n = 1, a = arguments.length; n < a; n++) {
611
+ r = arguments[n];
612
+ for (var t in r) Object.prototype.hasOwnProperty.call(r, t) && (e[t] = r[t]);
613
+ }
614
+ return e;
615
+ }, Mr.apply(this, arguments);
616
+ }, Oa = function(e, r) {
617
+ var n = {};
618
+ for (var a in e) Object.prototype.hasOwnProperty.call(e, a) && r.indexOf(a) < 0 && (n[a] = e[a]);
619
+ if (e != null && typeof Object.getOwnPropertySymbols == "function")
620
+ for (var t = 0, a = Object.getOwnPropertySymbols(e); t < a.length; t++)
621
+ r.indexOf(a[t]) < 0 && Object.prototype.propertyIsEnumerable.call(e, a[t]) && (n[a[t]] = e[a[t]]);
622
+ return n;
623
+ };
624
+ function Fn(e) {
625
+ var r = e.activeStartDate, n = e.hover, a = e.value, t = e.valueType, i = Oa(e, ["activeStartDate", "hover", "value", "valueType"]), c = 0, l = 11, u = ce(r);
626
+ return o.jsx(sr, { className: "react-calendar__year-view__months", dateTransform: function(s) {
627
+ var d = /* @__PURE__ */ new Date();
628
+ return d.setFullYear(u, s, 1), Be(d);
629
+ }, dateType: "month", end: l, hover: n, renderTile: function(s) {
630
+ var d = s.date, f = Oa(s, ["date"]);
631
+ return o.jsx(Mn, Mr({}, i, f, { activeStartDate: r, date: d }), d.getTime());
632
+ }, start: c, value: a, valueType: t });
633
+ }
634
+ var Fr = function() {
635
+ return Fr = Object.assign || function(e) {
636
+ for (var r, n = 1, a = arguments.length; n < a; n++) {
637
+ r = arguments[n];
638
+ for (var t in r) Object.prototype.hasOwnProperty.call(r, t) && (e[t] = r[t]);
639
+ }
640
+ return e;
641
+ }, Fr.apply(this, arguments);
642
+ };
643
+ function Wn(e) {
644
+ function r() {
645
+ return o.jsx(Fn, Fr({}, e));
646
+ }
647
+ return o.jsx("div", { className: "react-calendar__year-view", children: r() });
648
+ }
649
+ var Wr = function() {
650
+ return Wr = Object.assign || function(e) {
651
+ for (var r, n = 1, a = arguments.length; n < a; n++) {
652
+ r = arguments[n];
653
+ for (var t in r) Object.prototype.hasOwnProperty.call(r, t) && (e[t] = r[t]);
654
+ }
655
+ return e;
656
+ }, Wr.apply(this, arguments);
657
+ }, Vn = function(e, r) {
658
+ var n = {};
659
+ for (var a in e) Object.prototype.hasOwnProperty.call(e, a) && r.indexOf(a) < 0 && (n[a] = e[a]);
660
+ if (e != null && typeof Object.getOwnPropertySymbols == "function")
661
+ for (var t = 0, a = Object.getOwnPropertySymbols(e); t < a.length; t++)
662
+ r.indexOf(a[t]) < 0 && Object.prototype.propertyIsEnumerable.call(e, a[t]) && (n[a[t]] = e[a[t]]);
663
+ return n;
664
+ }, kr = "react-calendar__month-view__days__day";
665
+ function Yn(e) {
666
+ var r = e.calendarType, n = e.classes, a = n === void 0 ? [] : n, t = e.currentMonthIndex, i = e.formatDay, c = i === void 0 ? an : i, l = e.formatLongDate, u = l === void 0 ? tn : l, s = Vn(e, ["calendarType", "classes", "currentMonthIndex", "formatDay", "formatLongDate"]), d = s.date, f = s.locale, v = [];
667
+ return a && v.push.apply(v, a), v.push(kr), Xa(d, r) && v.push("".concat(kr, "--weekend")), d.getMonth() !== t && v.push("".concat(kr, "--neighboringMonth")), o.jsx(ur, Wr({}, s, { classes: v, formatAbbr: u, maxDateTransform: zr, minDateTransform: or, view: "month", children: c(f, d) }));
668
+ }
669
+ var Vr = function() {
670
+ return Vr = Object.assign || function(e) {
671
+ for (var r, n = 1, a = arguments.length; n < a; n++) {
672
+ r = arguments[n];
673
+ for (var t in r) Object.prototype.hasOwnProperty.call(r, t) && (e[t] = r[t]);
674
+ }
675
+ return e;
676
+ }, Vr.apply(this, arguments);
677
+ }, ja = function(e, r) {
678
+ var n = {};
679
+ for (var a in e) Object.prototype.hasOwnProperty.call(e, a) && r.indexOf(a) < 0 && (n[a] = e[a]);
680
+ if (e != null && typeof Object.getOwnPropertySymbols == "function")
681
+ for (var t = 0, a = Object.getOwnPropertySymbols(e); t < a.length; t++)
682
+ r.indexOf(a[t]) < 0 && Object.prototype.propertyIsEnumerable.call(e, a[t]) && (n[a[t]] = e[a[t]]);
683
+ return n;
684
+ };
685
+ function Rn(e) {
686
+ var r = e.activeStartDate, n = e.calendarType, a = e.hover, t = e.showFixedNumberOfWeeks, i = e.showNeighboringMonth, c = e.value, l = e.valueType, u = ja(e, ["activeStartDate", "calendarType", "hover", "showFixedNumberOfWeeks", "showNeighboringMonth", "value", "valueType"]), s = ce(r), d = cr(r), f = t || i, v = Re(r, n), _ = f ? 0 : v, w = (f ? -v : 0) + 1, b = (function() {
687
+ if (t)
688
+ return w + 42 - 1;
689
+ var y = Qr(r);
690
+ if (i) {
691
+ var x = /* @__PURE__ */ new Date();
692
+ x.setFullYear(s, d, y), x.setHours(0, 0, 0, 0);
693
+ var C = 7 - Re(x, n) - 1;
694
+ return y + C;
695
+ }
696
+ return y;
697
+ })();
698
+ return o.jsx(sr, { className: "react-calendar__month-view__days", count: 7, dateTransform: function(y) {
699
+ var x = /* @__PURE__ */ new Date();
700
+ return x.setFullYear(s, d, y), or(x);
701
+ }, dateType: "day", hover: a, end: b, renderTile: function(y) {
702
+ var x = y.date, C = ja(y, ["date"]);
703
+ return o.jsx(Yn, Vr({}, u, C, { activeStartDate: r, calendarType: n, currentMonthIndex: d, date: x }), x.getTime());
704
+ }, offset: _, start: w, value: c, valueType: l });
705
+ }
706
+ var rt = "react-calendar__month-view__weekdays", Or = "".concat(rt, "__weekday");
707
+ function Gn(e) {
708
+ for (var r = e.calendarType, n = e.formatShortWeekday, a = n === void 0 ? on : n, t = e.formatWeekday, i = t === void 0 ? cn : t, c = e.locale, l = e.onMouseLeave, u = /* @__PURE__ */ new Date(), s = Be(u), d = ce(s), f = cr(s), v = [], _ = 1; _ <= 7; _ += 1) {
709
+ var w = new Date(d, f, _ - Re(s, r)), b = i(c, w);
710
+ v.push(o.jsx("div", { className: xe(Or, bn(w) && "".concat(Or, "--current"), Xa(w, r) && "".concat(Or, "--weekend")), children: o.jsx("abbr", { "aria-label": b, title: b, children: a(c, w).replace(".", "") }) }, _));
711
+ }
712
+ return o.jsx(Xr, { className: rt, count: 7, onFocus: l, onMouseOver: l, children: v });
713
+ }
714
+ var ar = function() {
715
+ return ar = Object.assign || function(e) {
716
+ for (var r, n = 1, a = arguments.length; n < a; n++) {
717
+ r = arguments[n];
718
+ for (var t in r) Object.prototype.hasOwnProperty.call(r, t) && (e[t] = r[t]);
719
+ }
720
+ return e;
721
+ }, ar.apply(this, arguments);
722
+ }, Na = function(e, r) {
723
+ var n = {};
724
+ for (var a in e) Object.prototype.hasOwnProperty.call(e, a) && r.indexOf(a) < 0 && (n[a] = e[a]);
725
+ if (e != null && typeof Object.getOwnPropertySymbols == "function")
726
+ for (var t = 0, a = Object.getOwnPropertySymbols(e); t < a.length; t++)
727
+ r.indexOf(a[t]) < 0 && Object.prototype.propertyIsEnumerable.call(e, a[t]) && (n[a[t]] = e[a[t]]);
728
+ return n;
729
+ }, Sa = "react-calendar__tile";
730
+ function Bn(e) {
731
+ var r = e.onClickWeekNumber, n = e.weekNumber, a = o.jsx("span", { children: n });
732
+ if (r) {
733
+ var t = e.date, i = e.onClickWeekNumber, c = e.weekNumber, l = Na(e, ["date", "onClickWeekNumber", "weekNumber"]);
734
+ return o.jsx("button", ar({}, l, { className: Sa, onClick: function(u) {
735
+ return i(c, t, u);
736
+ }, type: "button", children: a }));
737
+ } else {
738
+ e.date, e.onClickWeekNumber, e.weekNumber;
739
+ var l = Na(e, ["date", "onClickWeekNumber", "weekNumber"]);
740
+ return o.jsx("div", ar({}, l, { className: Sa, children: a }));
741
+ }
742
+ }
743
+ function Hn(e) {
744
+ var r = e.activeStartDate, n = e.calendarType, a = e.onClickWeekNumber, t = e.onMouseLeave, i = e.showFixedNumberOfWeeks, c = (function() {
745
+ if (i)
746
+ return 6;
747
+ var s = Qr(r), d = Re(r, n), f = s - (7 - d);
748
+ return 1 + Math.ceil(f / 7);
749
+ })(), l = (function() {
750
+ for (var s = ce(r), d = cr(r), f = er(r), v = [], _ = 0; _ < c; _ += 1)
751
+ v.push(Cr(new Date(s, d, f + _ * 7), n));
752
+ return v;
753
+ })(), u = l.map(function(s) {
754
+ return fn(s, n);
755
+ });
756
+ return o.jsx(Xr, { className: "react-calendar__month-view__weekNumbers", count: c, direction: "column", onFocus: t, onMouseOver: t, style: { flexBasis: "calc(100% * (1 / 8)", flexShrink: 0 }, children: u.map(function(s, d) {
757
+ var f = l[d];
758
+ if (!f)
759
+ throw new Error("date is not defined");
760
+ return o.jsx(Bn, { date: f, onClickWeekNumber: a, weekNumber: s }, s);
761
+ }) });
762
+ }
763
+ var Yr = function() {
764
+ return Yr = Object.assign || function(e) {
765
+ for (var r, n = 1, a = arguments.length; n < a; n++) {
766
+ r = arguments[n];
767
+ for (var t in r) Object.prototype.hasOwnProperty.call(r, t) && (e[t] = r[t]);
768
+ }
769
+ return e;
770
+ }, Yr.apply(this, arguments);
771
+ }, Un = function(e, r) {
772
+ var n = {};
773
+ for (var a in e) Object.prototype.hasOwnProperty.call(e, a) && r.indexOf(a) < 0 && (n[a] = e[a]);
774
+ if (e != null && typeof Object.getOwnPropertySymbols == "function")
775
+ for (var t = 0, a = Object.getOwnPropertySymbols(e); t < a.length; t++)
776
+ r.indexOf(a[t]) < 0 && Object.prototype.propertyIsEnumerable.call(e, a[t]) && (n[a[t]] = e[a[t]]);
777
+ return n;
778
+ };
779
+ function zn(e) {
780
+ if (e)
781
+ for (var r = 0, n = Object.entries(Ut); r < n.length; r++) {
782
+ var a = n[r], t = a[0], i = a[1];
783
+ if (i.includes(e))
784
+ return t;
785
+ }
786
+ return X.ISO_8601;
787
+ }
788
+ function Kn(e) {
789
+ var r = e.activeStartDate, n = e.locale, a = e.onMouseLeave, t = e.showFixedNumberOfWeeks, i = e.calendarType, c = i === void 0 ? zn(n) : i, l = e.formatShortWeekday, u = e.formatWeekday, s = e.onClickWeekNumber, d = e.showWeekNumbers, f = Un(e, ["calendarType", "formatShortWeekday", "formatWeekday", "onClickWeekNumber", "showWeekNumbers"]);
790
+ function v() {
791
+ return o.jsx(Gn, { calendarType: c, formatShortWeekday: l, formatWeekday: u, locale: n, onMouseLeave: a });
792
+ }
793
+ function _() {
794
+ return d ? o.jsx(Hn, { activeStartDate: r, calendarType: c, onClickWeekNumber: s, onMouseLeave: a, showFixedNumberOfWeeks: t }) : null;
795
+ }
796
+ function w() {
797
+ return o.jsx(Rn, Yr({ calendarType: c }, f));
798
+ }
799
+ var b = "react-calendar__month-view";
800
+ return o.jsx("div", { className: xe(b, d ? "".concat(b, "--weekNumbers") : ""), children: o.jsxs("div", { style: {
801
+ display: "flex",
802
+ alignItems: "flex-end"
803
+ }, children: [_(), o.jsxs("div", { style: {
804
+ flexGrow: 1,
805
+ width: "100%"
806
+ }, children: [v(), w()] })] }) });
807
+ }
808
+ var We = function() {
809
+ return We = Object.assign || function(e) {
810
+ for (var r, n = 1, a = arguments.length; n < a; n++) {
811
+ r = arguments[n];
812
+ for (var t in r) Object.prototype.hasOwnProperty.call(r, t) && (e[t] = r[t]);
813
+ }
814
+ return e;
815
+ }, We.apply(this, arguments);
816
+ }, Ke = "react-calendar", Qe = ["century", "decade", "year", "month"], Zn = ["decade", "year", "month", "day"], ea = /* @__PURE__ */ new Date();
817
+ ea.setFullYear(1, 0, 1);
818
+ ea.setHours(0, 0, 0, 0);
819
+ var qn = /* @__PURE__ */ new Date(864e13);
820
+ function Ye(e) {
821
+ return e instanceof Date ? e : new Date(e);
822
+ }
823
+ function at(e, r) {
824
+ return Qe.slice(Qe.indexOf(e), Qe.indexOf(r) + 1);
825
+ }
826
+ function Qn(e, r, n) {
827
+ var a = at(r, n);
828
+ return a.indexOf(e) !== -1;
829
+ }
830
+ function ra(e, r, n) {
831
+ return e && Qn(e, r, n) ? e : n;
832
+ }
833
+ function tt(e) {
834
+ var r = Qe.indexOf(e);
835
+ return Zn[r];
836
+ }
837
+ function Jn(e, r) {
838
+ var n = Array.isArray(e) ? e[r] : e;
839
+ if (!n)
840
+ return null;
841
+ var a = Ye(n);
842
+ if (Number.isNaN(a.getTime()))
843
+ throw new Error("Invalid date: ".concat(e));
844
+ return a;
845
+ }
846
+ function nt(e, r) {
847
+ var n = e.value, a = e.minDate, t = e.maxDate, i = e.maxDetail, c = Jn(n, r);
848
+ if (!c)
849
+ return null;
850
+ var l = tt(i), u = (function() {
851
+ switch (r) {
852
+ case 0:
853
+ return $e(l, c);
854
+ case 1:
855
+ return qa(l, c);
856
+ default:
857
+ throw new Error("Invalid index value: ".concat(r));
858
+ }
859
+ })();
860
+ return Dn(u, a, t);
861
+ }
862
+ var aa = function(e) {
863
+ return nt(e, 0);
864
+ }, ot = function(e) {
865
+ return nt(e, 1);
866
+ }, Xn = function(e) {
867
+ return [aa, ot].map(function(r) {
868
+ return r(e);
869
+ });
870
+ };
871
+ function it(e) {
872
+ var r = e.maxDate, n = e.maxDetail, a = e.minDate, t = e.minDetail, i = e.value, c = e.view, l = ra(c, t, n), u = aa({
873
+ value: i,
874
+ minDate: a,
875
+ maxDate: r,
876
+ maxDetail: n
877
+ }) || /* @__PURE__ */ new Date();
878
+ return $e(l, u);
879
+ }
880
+ function eo(e) {
881
+ var r = e.activeStartDate, n = e.defaultActiveStartDate, a = e.defaultValue, t = e.defaultView, i = e.maxDate, c = e.maxDetail, l = e.minDate, u = e.minDetail, s = e.value, d = e.view, f = ra(d, u, c), v = r || n;
882
+ return v ? $e(f, v) : it({
883
+ maxDate: i,
884
+ maxDetail: c,
885
+ minDate: l,
886
+ minDetail: u,
887
+ value: s || a,
888
+ view: d || t
889
+ });
890
+ }
891
+ function jr(e) {
892
+ return e && (!Array.isArray(e) || e.length === 1);
893
+ }
894
+ function Ze(e, r) {
895
+ return e instanceof Date && r instanceof Date && e.getTime() === r.getTime();
896
+ }
897
+ var ta = Nt(function(r, n) {
898
+ var a = r.activeStartDate, t = r.allowPartialRange, i = r.calendarType, c = r.className, l = r.defaultActiveStartDate, u = r.defaultValue, s = r.defaultView, d = r.formatDay, f = r.formatLongDate, v = r.formatMonth, _ = r.formatMonthYear, w = r.formatShortWeekday, b = r.formatWeekday, y = r.formatYear, x = r.goToRangeStartOnSelect, C = x === void 0 ? !0 : x, E = r.inputRef, $ = r.locale, B = r.maxDate, L = B === void 0 ? qn : B, z = r.maxDetail, P = z === void 0 ? "month" : z, K = r.minDate, Y = K === void 0 ? ea : K, ee = r.minDetail, Z = ee === void 0 ? "century" : ee, _e = r.navigationAriaLabel, q = r.navigationAriaLive, ne = r.navigationLabel, N = r.next2AriaLabel, re = r.next2Label, ge = r.nextAriaLabel, S = r.nextLabel, M = r.onActiveStartDateChange, Q = r.onChange, J = r.onClickDay, j = r.onClickDecade, ae = r.onClickMonth, oe = r.onClickWeekNumber, le = r.onClickYear, I = r.onDrillDown, F = r.onDrillUp, se = r.onViewChange, ue = r.prev2AriaLabel, Ce = r.prev2Label, ye = r.prevAriaLabel, pe = r.prevLabel, A = r.returnValue, me = A === void 0 ? "start" : A, G = r.selectRange, be = r.showDoubleView, Oe = r.showFixedNumberOfWeeks, h = r.showNavigation, m = h === void 0 ? !0 : h, p = r.showNeighboringCentury, g = r.showNeighboringDecade, O = r.showNeighboringMonth, T = O === void 0 ? !0 : O, D = r.showWeekNumbers, W = r.tileClassName, te = r.tileContent, H = r.tileDisabled, Ae = r.value, Ee = r.view, Ie = we(l), vr = Ie[0], He = Ie[1], ca = we(null), ht = ca[0], la = ca[1], sa = we(Array.isArray(u) ? u.map(function(k) {
899
+ return k !== null ? Ye(k) : null;
900
+ }) : u != null ? Ye(u) : null), hr = sa[0], mt = sa[1], ua = we(s), _t = ua[0], da = ua[1], de = a || vr || eo({
901
+ activeStartDate: a,
902
+ defaultActiveStartDate: l,
903
+ defaultValue: u,
904
+ defaultView: s,
905
+ maxDate: L,
906
+ maxDetail: P,
907
+ minDate: Y,
908
+ minDetail: Z,
909
+ value: Ae,
910
+ view: Ee
911
+ }), fe = (function() {
912
+ var k = (function() {
913
+ return G && jr(hr) ? hr : Ae !== void 0 ? Ae : hr;
914
+ })();
915
+ return k ? Array.isArray(k) ? k.map(function(R) {
916
+ return R !== null ? Ye(R) : null;
917
+ }) : k !== null ? Ye(k) : null : null;
918
+ })(), Ue = tt(P), V = ra(Ee || _t, Z, P), je = at(Z, P), gt = G ? ht : null, mr = je.indexOf(V) < je.length - 1, fa = je.indexOf(V) > 0, va = he(function(k) {
919
+ var R = (function() {
920
+ switch (me) {
921
+ case "start":
922
+ return aa;
923
+ case "end":
924
+ return ot;
925
+ case "range":
926
+ return Xn;
927
+ default:
928
+ throw new Error("Invalid returnValue.");
929
+ }
930
+ })();
931
+ return R({
932
+ maxDate: L,
933
+ maxDetail: P,
934
+ minDate: Y,
935
+ value: k
936
+ });
937
+ }, [L, P, Y, me]), _r = he(function(k, R) {
938
+ He(k);
939
+ var U = {
940
+ action: R,
941
+ activeStartDate: k,
942
+ value: fe,
943
+ view: V
944
+ };
945
+ M && !Ze(de, k) && M(U);
946
+ }, [de, M, fe, V]), ze = he(function(k, R) {
947
+ var U = (function() {
948
+ switch (V) {
949
+ case "century":
950
+ return j;
951
+ case "decade":
952
+ return le;
953
+ case "year":
954
+ return ae;
955
+ case "month":
956
+ return J;
957
+ default:
958
+ throw new Error("Invalid view: ".concat(V, "."));
959
+ }
960
+ })();
961
+ U && U(k, R);
962
+ }, [J, j, ae, le, V]), gr = he(function(k, R) {
963
+ if (mr) {
964
+ ze(k, R);
965
+ var U = je[je.indexOf(V) + 1];
966
+ if (!U)
967
+ throw new Error("Attempted to drill down from the lowest view.");
968
+ He(k), da(U);
969
+ var De = {
970
+ action: "drillDown",
971
+ activeStartDate: k,
972
+ value: fe,
973
+ view: U
974
+ };
975
+ M && !Ze(de, k) && M(De), se && V !== U && se(De), I && I(De);
976
+ }
977
+ }, [
978
+ de,
979
+ mr,
980
+ M,
981
+ ze,
982
+ I,
983
+ se,
984
+ fe,
985
+ V,
986
+ je
987
+ ]), yr = he(function() {
988
+ if (fa) {
989
+ var k = je[je.indexOf(V) - 1];
990
+ if (!k)
991
+ throw new Error("Attempted to drill up from the highest view.");
992
+ var R = $e(k, de);
993
+ He(R), da(k);
994
+ var U = {
995
+ action: "drillUp",
996
+ activeStartDate: R,
997
+ value: fe,
998
+ view: k
999
+ };
1000
+ M && !Ze(de, R) && M(U), se && V !== k && se(U), F && F(U);
1001
+ }
1002
+ }, [
1003
+ de,
1004
+ fa,
1005
+ M,
1006
+ F,
1007
+ se,
1008
+ fe,
1009
+ V,
1010
+ je
1011
+ ]), pr = he(function(k, R) {
1012
+ var U = fe;
1013
+ ze(k, R);
1014
+ var De = G && !jr(U), ke;
1015
+ if (G)
1016
+ if (De)
1017
+ ke = $e(Ue, k);
1018
+ else {
1019
+ if (!U)
1020
+ throw new Error("previousValue is required");
1021
+ if (Array.isArray(U))
1022
+ throw new Error("previousValue must not be an array");
1023
+ ke = yn(Ue, U, k);
1024
+ }
1025
+ else
1026
+ ke = va(k);
1027
+ var wr = (
1028
+ // Range selection turned off
1029
+ !G || // Range selection turned on, first value
1030
+ De || // Range selection turned on, second value, goToRangeStartOnSelect toggled on
1031
+ C ? it({
1032
+ maxDate: L,
1033
+ maxDetail: P,
1034
+ minDate: Y,
1035
+ minDetail: Z,
1036
+ value: ke,
1037
+ view: V
1038
+ }) : null
1039
+ );
1040
+ R.persist(), He(wr), mt(ke);
1041
+ var wt = {
1042
+ action: "onChange",
1043
+ activeStartDate: wr,
1044
+ value: ke,
1045
+ view: V
1046
+ };
1047
+ if (M && !Ze(de, wr) && M(wt), Q)
1048
+ if (G) {
1049
+ var xt = jr(ke);
1050
+ if (!xt)
1051
+ Q(ke || null, R);
1052
+ else if (t) {
1053
+ if (Array.isArray(ke))
1054
+ throw new Error("value must not be an array");
1055
+ Q([ke || null, null], R);
1056
+ }
1057
+ } else
1058
+ Q(ke || null, R);
1059
+ }, [
1060
+ de,
1061
+ t,
1062
+ va,
1063
+ C,
1064
+ L,
1065
+ P,
1066
+ Y,
1067
+ Z,
1068
+ M,
1069
+ Q,
1070
+ ze,
1071
+ G,
1072
+ fe,
1073
+ Ue,
1074
+ V
1075
+ ]);
1076
+ function yt(k) {
1077
+ la(k);
1078
+ }
1079
+ function br() {
1080
+ la(null);
1081
+ }
1082
+ St(n, function() {
1083
+ return {
1084
+ activeStartDate: de,
1085
+ drillDown: gr,
1086
+ drillUp: yr,
1087
+ onChange: pr,
1088
+ setActiveStartDate: _r,
1089
+ value: fe,
1090
+ view: V
1091
+ };
1092
+ }, [de, gr, yr, pr, _r, fe, V]);
1093
+ function ha(k) {
1094
+ var R = k ? Za(V, de) : $e(V, de), U = mr ? gr : pr, De = {
1095
+ activeStartDate: R,
1096
+ hover: gt,
1097
+ locale: $,
1098
+ maxDate: L,
1099
+ minDate: Y,
1100
+ onClick: U,
1101
+ onMouseOver: G ? yt : void 0,
1102
+ tileClassName: W,
1103
+ tileContent: te,
1104
+ tileDisabled: H,
1105
+ value: fe,
1106
+ valueType: Ue
1107
+ };
1108
+ switch (V) {
1109
+ case "century":
1110
+ return o.jsx(An, We({ formatYear: y, showNeighboringCentury: p }, De));
1111
+ case "decade":
1112
+ return o.jsx(In, We({ formatYear: y, showNeighboringDecade: g }, De));
1113
+ case "year":
1114
+ return o.jsx(Wn, We({ formatMonth: v, formatMonthYear: _ }, De));
1115
+ case "month":
1116
+ return o.jsx(Kn, We({ calendarType: i, formatDay: d, formatLongDate: f, formatShortWeekday: w, formatWeekday: b, onClickWeekNumber: oe, onMouseLeave: G ? br : void 0, showFixedNumberOfWeeks: typeof Oe < "u" ? Oe : be, showNeighboringMonth: T, showWeekNumbers: D }, De));
1117
+ default:
1118
+ throw new Error("Invalid view: ".concat(V, "."));
1119
+ }
1120
+ }
1121
+ function pt() {
1122
+ return m ? o.jsx(wn, { activeStartDate: de, drillUp: yr, formatMonthYear: _, formatYear: y, locale: $, maxDate: L, minDate: Y, navigationAriaLabel: _e, navigationAriaLive: q, navigationLabel: ne, next2AriaLabel: N, next2Label: re, nextAriaLabel: ge, nextLabel: S, prev2AriaLabel: ue, prev2Label: Ce, prevAriaLabel: ye, prevLabel: pe, setActiveStartDate: _r, showDoubleView: be, view: V, views: je }) : null;
1123
+ }
1124
+ var bt = Array.isArray(fe) ? fe : [fe];
1125
+ return o.jsxs("div", { className: xe(Ke, G && bt.length === 1 && "".concat(Ke, "--selectRange"), be && "".concat(Ke, "--doubleView"), c), ref: E, children: [pt(), o.jsxs("div", { className: "".concat(Ke, "__viewContainer"), onBlur: G ? br : void 0, onMouseLeave: G ? br : void 0, children: [ha(), be ? ha(!0) : null] })] });
1126
+ });
1127
+ const na = typeof window < "u", ro = na ? Ct : Pe, ao = na && /(MSIE|Trident\/|Edge\/)/.test(navigator.userAgent), to = na && /Firefox/.test(navigator.userAgent);
1128
+ function no(e) {
23
1129
  const { target: r } = e;
24
- Cr ? requestAnimationFrame(() => r.select()) : r.select();
1130
+ ao ? requestAnimationFrame(() => r.select()) : r.select();
25
1131
  }
26
- function Lr(e) {
1132
+ function oo(e) {
27
1133
  if (document.readyState === "complete")
28
1134
  return;
29
1135
  function r() {
30
- we(e);
1136
+ rr(e);
31
1137
  }
32
1138
  window.addEventListener("load", r);
33
1139
  }
34
- function $r(e) {
1140
+ function io(e) {
35
1141
  if (!document.fonts)
36
1142
  return;
37
- const r = ir(e);
1143
+ const r = Mt(e);
38
1144
  if (!r || document.fonts.check(r))
39
1145
  return;
40
- function l() {
41
- we(e);
1146
+ function a() {
1147
+ rr(e);
42
1148
  }
43
- document.fonts.addEventListener("loadingdone", l);
1149
+ document.fonts.addEventListener("loadingdone", a);
44
1150
  }
45
- function Mr(e) {
1151
+ function co(e) {
46
1152
  if (e && "selectionStart" in e && e.selectionStart !== null && "selectionEnd" in e && e.selectionEnd !== null)
47
1153
  return e.value.slice(e.selectionStart, e.selectionEnd);
48
1154
  if ("getSelection" in window) {
@@ -51,121 +1157,121 @@ function Mr(e) {
51
1157
  }
52
1158
  return null;
53
1159
  }
54
- function Dr(e) {
1160
+ function lo(e) {
55
1161
  if (e !== null)
56
- return function(t) {
57
- if (Sr)
1162
+ return function(n) {
1163
+ if (to)
58
1164
  return;
59
- const { key: l, target: o } = t, { value: s } = o, c = l.length === 1 && /\d/.test(l), u = Mr(o);
60
- (!c || !(u || s.length < e)) && t.preventDefault();
1165
+ const { key: a, target: t } = n, { value: i } = t, c = a.length === 1 && /\d/.test(a), l = co(t);
1166
+ (!c || !(l || i.length < e)) && n.preventDefault();
61
1167
  };
62
1168
  }
63
- function Oe({ ariaLabel: e, autoFocus: r, className: t, disabled: l, inputRef: o, max: s, min: c, name: u, nameForClass: g, onChange: y, onKeyDown: h, onKeyUp: m, placeholder: b = "--", required: v, showLeadingZeros: j, step: k, value: E }) {
64
- Ar(() => {
65
- !o || !o.current || (we(o.current), Lr(o.current), $r(o.current));
66
- }, [o, E]);
67
- const D = j && E && Number(E) < 10 && (E === "0" || !E.toString().startsWith("0")), M = s ? s.toString().length : null;
68
- return a.jsxs(a.Fragment, { children: [D ? a.jsx("span", { className: `${t}__leadingZero`, children: "0" }) : null, a.jsx("input", {
1169
+ function oa({ ariaLabel: e, autoFocus: r, className: n, disabled: a, inputRef: t, max: i, min: c, name: l, nameForClass: u, onChange: s, onKeyDown: d, onKeyUp: f, placeholder: v = "--", required: _, showLeadingZeros: w, step: b, value: y }) {
1170
+ ro(() => {
1171
+ !t || !t.current || (rr(t.current), oo(t.current), io(t.current));
1172
+ }, [t, y]);
1173
+ const x = w && y && Number(y) < 10 && (y === "0" || !y.toString().startsWith("0")), C = i ? i.toString().length : null;
1174
+ return o.jsxs(o.Fragment, { children: [x ? o.jsx("span", { className: `${n}__leadingZero`, children: "0" }) : null, o.jsx("input", {
69
1175
  "aria-label": e,
70
1176
  autoComplete: "off",
71
1177
  // biome-ignore lint/a11y/noAutofocus: This is up to developers' decision
72
1178
  autoFocus: r,
73
- className: se(`${t}__input`, `${t}__${g || u}`, D && `${t}__input--hasLeadingZero`),
1179
+ className: xe(`${n}__input`, `${n}__${u || l}`, x && `${n}__input--hasLeadingZero`),
74
1180
  "data-input": "true",
75
- disabled: l,
1181
+ disabled: a,
76
1182
  inputMode: "numeric",
77
- max: s,
1183
+ max: i,
78
1184
  min: c,
79
- name: u,
80
- onChange: y,
81
- onFocus: Fr,
82
- onKeyDown: h,
83
- onKeyPress: Dr(M),
84
- onKeyUp: (I) => {
85
- we(I.target), m && m(I);
1185
+ name: l,
1186
+ onChange: s,
1187
+ onFocus: no,
1188
+ onKeyDown: d,
1189
+ onKeyPress: lo(C),
1190
+ onKeyUp: (E) => {
1191
+ rr(E.target), f && f(E);
86
1192
  },
87
- placeholder: b,
1193
+ placeholder: v,
88
1194
  // Assertion is needed for React 18 compatibility
89
- ref: o,
90
- required: v,
91
- step: k,
1195
+ ref: t,
1196
+ required: _,
1197
+ step: b,
92
1198
  type: "number",
93
- value: E !== null ? E : ""
1199
+ value: y !== null ? y : ""
94
1200
  })] });
95
1201
  }
96
- function Pr(e, r, t) {
97
- return r && r > e ? r : t && t < e ? t : e;
1202
+ function so(e, r, n) {
1203
+ return r && r > e ? r : n && n < e ? n : e;
98
1204
  }
99
- function We(e) {
1205
+ function ct(e) {
100
1206
  return e !== null && e !== !1 && !Number.isNaN(Number(e));
101
1207
  }
102
- function Ee(...e) {
103
- return Math.min(...e.filter(We));
1208
+ function dr(...e) {
1209
+ return Math.min(...e.filter(ct));
104
1210
  }
105
- function je(...e) {
106
- return Math.max(...e.filter(We));
1211
+ function fr(...e) {
1212
+ return Math.max(...e.filter(ct));
107
1213
  }
108
- function Or({ maxDate: e, minDate: r, month: t, year: l, ...o }) {
109
- const s = t ? lr(new Date(Number(l), Number(t) - 1, 1)) : 31;
110
- function c(y) {
111
- return l === te(y).toString() && t === ae(y).toString();
1214
+ function uo({ maxDate: e, minDate: r, month: n, year: a, ...t }) {
1215
+ const i = n ? Qr(new Date(Number(a), Number(n) - 1, 1)) : 31;
1216
+ function c(s) {
1217
+ return a === ce(s).toString() && n === Te(s).toString();
112
1218
  }
113
- const u = Ee(s, e && c(e) && $e(e)), g = je(1, r && c(r) && $e(r));
114
- return a.jsx(Oe, { max: u, min: g, name: "day", ...o });
1219
+ const l = dr(i, e && c(e) && er(e)), u = fr(1, r && c(r) && er(r));
1220
+ return o.jsx(oa, { max: l, min: u, name: "day", ...t });
115
1221
  }
116
- function Vr({ maxDate: e, minDate: r, year: t, ...l }) {
117
- function o(u) {
118
- return u && t === te(u).toString();
1222
+ function fo({ maxDate: e, minDate: r, year: n, ...a }) {
1223
+ function t(l) {
1224
+ return l && n === ce(l).toString();
119
1225
  }
120
- const s = Ee(12, e && o(e) && ae(e)), c = je(1, r && o(r) && ae(r));
121
- return a.jsx(Oe, { max: s, min: c, name: "month", ...l });
1226
+ const i = dr(12, e && t(e) && Te(e)), c = fr(1, r && t(r) && Te(r));
1227
+ return o.jsx(oa, { max: i, min: c, name: "month", ...a });
122
1228
  }
123
- const Fe = /* @__PURE__ */ new Map();
124
- function Me(e) {
125
- return function(t, l) {
126
- const o = t || sr();
127
- Fe.has(o) || Fe.set(o, /* @__PURE__ */ new Map());
128
- const s = Fe.get(o);
129
- return s.has(e) || s.set(e, new Intl.DateTimeFormat(o || void 0, e).format), s.get(e)(l);
1229
+ const Nr = /* @__PURE__ */ new Map();
1230
+ function Rr(e) {
1231
+ return function(n, a) {
1232
+ const t = n || Hr();
1233
+ Nr.has(t) || Nr.set(t, /* @__PURE__ */ new Map());
1234
+ const i = Nr.get(t);
1235
+ return i.has(e) || i.set(e, new Intl.DateTimeFormat(t || void 0, e).format), i.get(e)(a);
130
1236
  };
131
1237
  }
132
- function Gr(e) {
1238
+ function vo(e) {
133
1239
  const r = new Date(e);
134
1240
  return new Date(r.setHours(12));
135
1241
  }
136
- function qe(e) {
137
- return (r, t) => Me(e)(r, Gr(t));
1242
+ function lt(e) {
1243
+ return (r, n) => Rr(e)(r, vo(n));
138
1244
  }
139
- const Yr = { month: "long" }, Tr = { month: "short" }, zr = qe(Yr), Br = qe(Tr);
140
- function Rr({ ariaLabel: e, autoFocus: r, className: t, disabled: l, inputRef: o, locale: s, maxDate: c, minDate: u, onChange: g, onKeyDown: y, placeholder: h = "--", required: m, short: b, value: v, year: j }) {
141
- function k(P) {
142
- return P && j === te(P).toString();
1245
+ const ho = { month: "long" }, mo = { month: "short" }, _o = lt(ho), go = lt(mo);
1246
+ function yo({ ariaLabel: e, autoFocus: r, className: n, disabled: a, inputRef: t, locale: i, maxDate: c, minDate: l, onChange: u, onKeyDown: s, placeholder: d = "--", required: f, short: v, value: _, year: w }) {
1247
+ function b(B) {
1248
+ return B && w === ce(B).toString();
143
1249
  }
144
- const E = Ee(12, c && k(c) && ae(c)), D = je(1, u && k(u) && ae(u)), M = [...Array(12)].map((P, L) => new Date(2019, L, 1)), I = "month", T = b ? Br : zr;
145
- return a.jsxs("select", {
1250
+ const y = dr(12, c && b(c) && Te(c)), x = fr(1, l && b(l) && Te(l)), C = [...Array(12)].map((B, L) => new Date(2019, L, 1)), E = "month", $ = v ? go : _o;
1251
+ return o.jsxs("select", {
146
1252
  "aria-label": e,
147
1253
  // biome-ignore lint/a11y/noAutofocus: This is up to developers' decision
148
1254
  autoFocus: r,
149
- className: se(`${t}__input`, `${t}__${I}`),
1255
+ className: xe(`${n}__input`, `${n}__${E}`),
150
1256
  "data-input": "true",
151
1257
  "data-select": "true",
152
- disabled: l,
153
- name: I,
154
- onChange: g,
155
- onKeyDown: y,
1258
+ disabled: a,
1259
+ name: E,
1260
+ onChange: u,
1261
+ onKeyDown: s,
156
1262
  // Assertion is needed for React 18 compatibility
157
- ref: o,
158
- required: m,
159
- value: v !== null ? v : "",
160
- children: [!v && a.jsx("option", { value: "", children: h }), M.map((P) => {
161
- const L = ae(P), O = L < D || L > E;
162
- return a.jsx("option", { disabled: O, value: L, children: T(s, P) }, L);
1263
+ ref: t,
1264
+ required: f,
1265
+ value: _ !== null ? _ : "",
1266
+ children: [!_ && o.jsx("option", { value: "", children: d }), C.map((B) => {
1267
+ const L = Te(B), z = L < x || L > y;
1268
+ return o.jsx("option", { disabled: z, value: L, children: $(i, B) }, L);
163
1269
  })]
164
1270
  });
165
1271
  }
166
- function Zr({ ariaLabel: e, disabled: r, maxDate: t, minDate: l, name: o, onChange: s, required: c, value: u, valueType: g }) {
167
- const y = (() => {
168
- switch (g) {
1272
+ function po({ ariaLabel: e, disabled: r, maxDate: n, minDate: a, name: t, onChange: i, required: c, value: l, valueType: u }) {
1273
+ const s = (() => {
1274
+ switch (u) {
169
1275
  case "decade":
170
1276
  case "year":
171
1277
  return "number";
@@ -176,456 +1282,536 @@ function Zr({ ariaLabel: e, disabled: r, maxDate: t, minDate: l, name: o, onChan
176
1282
  default:
177
1283
  throw new Error("Invalid valueType");
178
1284
  }
179
- })(), h = (() => {
180
- switch (g) {
1285
+ })(), d = (() => {
1286
+ switch (u) {
181
1287
  case "decade":
182
1288
  case "year":
183
- return te;
1289
+ return ce;
184
1290
  case "month":
185
- return ur;
1291
+ return Wt;
186
1292
  case "day":
187
- return dr;
1293
+ return Ft;
188
1294
  default:
189
1295
  throw new Error("Invalid valueType");
190
1296
  }
191
1297
  })();
192
- function m(b) {
193
- b.stopPropagation();
1298
+ function f(v) {
1299
+ v.stopPropagation();
194
1300
  }
195
- return a.jsx("input", { "aria-label": e, disabled: r, hidden: !0, max: t ? h(t) : void 0, min: l ? h(l) : void 0, name: o, onChange: s, onFocus: m, required: c, style: {
1301
+ return o.jsx("input", { "aria-label": e, disabled: r, hidden: !0, max: n ? d(n) : void 0, min: a ? d(a) : void 0, name: t, onChange: i, onFocus: f, required: c, style: {
196
1302
  visibility: "hidden",
197
1303
  position: "absolute",
198
1304
  zIndex: "-999"
199
- }, type: y, value: u ? h(u) : "" });
1305
+ }, type: s, value: l ? d(l) : "" });
200
1306
  }
201
- function Kr({ maxDate: e, minDate: r, placeholder: t = "----", valueType: l, ...o }) {
202
- const s = Ee(275760, e && te(e)), c = je(1, r && te(r)), u = l === "century" ? 10 : 1;
203
- return a.jsx(Oe, { max: s, min: c, name: "year", placeholder: t, step: u, ...o });
1307
+ function bo({ maxDate: e, minDate: r, placeholder: n = "----", valueType: a, ...t }) {
1308
+ const i = dr(275760, e && ce(e)), c = fr(1, r && ce(r)), l = a === "century" ? 10 : 1;
1309
+ return o.jsx(oa, { max: i, min: c, name: "year", placeholder: n, step: l, ...t });
204
1310
  }
205
- function Hr({ children: e }) {
206
- return a.jsx("span", { className: "react-date-picker__inputGroup__divider", children: e });
1311
+ function wo({ children: e }) {
1312
+ return o.jsx("span", { className: "react-date-picker__inputGroup__divider", children: e });
207
1313
  }
208
- function Wr(e, r) {
1314
+ function xo(e, r) {
209
1315
  switch (e) {
210
1316
  case "decade":
211
- return yr(r);
1317
+ return Ve(r);
212
1318
  case "year":
213
- return vr(r);
1319
+ return ir(r);
214
1320
  case "month":
215
- return mr(r);
1321
+ return Be(r);
216
1322
  case "day":
217
- return gr(r);
1323
+ return or(r);
218
1324
  default:
219
1325
  throw new Error(`Invalid rangeType: ${e}`);
220
1326
  }
221
1327
  }
222
- function qr(e, r) {
1328
+ function Do(e, r) {
223
1329
  switch (e) {
224
1330
  case "decade":
225
- return fr(r);
1331
+ return qr(r);
226
1332
  case "year":
227
- return hr(r);
1333
+ return Zr(r);
228
1334
  case "month":
229
- return pr(r);
1335
+ return Kr(r);
230
1336
  case "day":
231
- return _r(r);
1337
+ return zr(r);
232
1338
  default:
233
1339
  throw new Error(`Invalid rangeType: ${e}`);
234
1340
  }
235
1341
  }
236
- const be = {}, xe = /* @__PURE__ */ new Date();
237
- xe.setFullYear(1, 0, 1);
238
- xe.setHours(0, 0, 0, 0);
239
- const Te = /* @__PURE__ */ new Date(864e13), Ve = ["century", "decade", "year", "month"], Ur = [...Ve.slice(1), "day"];
240
- function Jr(e) {
1342
+ const qe = {}, tr = /* @__PURE__ */ new Date();
1343
+ tr.setFullYear(1, 0, 1);
1344
+ tr.setHours(0, 0, 0, 0);
1345
+ const Ca = /* @__PURE__ */ new Date(864e13), ia = ["century", "decade", "year", "month"], ko = [...ia.slice(1), "day"];
1346
+ function Oo(e) {
241
1347
  return e instanceof Date ? e : new Date(e);
242
1348
  }
243
- function Ue(e) {
244
- const r = Ve.indexOf(e);
245
- return Ur[r];
1349
+ function st(e) {
1350
+ const r = ia.indexOf(e);
1351
+ return ko[r];
246
1352
  }
247
- function Qr(e, r) {
248
- const t = Array.isArray(e) ? e[r] : e;
249
- if (!t)
1353
+ function jo(e, r) {
1354
+ const n = Array.isArray(e) ? e[r] : e;
1355
+ if (!n)
250
1356
  return null;
251
- const l = Jr(t);
252
- if (Number.isNaN(l.getTime()))
1357
+ const a = Oo(n);
1358
+ if (Number.isNaN(a.getTime()))
253
1359
  throw new Error(`Invalid date: ${e}`);
254
- return l;
1360
+ return a;
255
1361
  }
256
- function Je({ value: e, minDate: r, maxDate: t, maxDetail: l }, o) {
257
- const s = Qr(e, o);
258
- if (!s)
1362
+ function ut({ value: e, minDate: r, maxDate: n, maxDetail: a }, t) {
1363
+ const i = jo(e, t);
1364
+ if (!i)
259
1365
  return null;
260
- const c = Ue(l), u = (() => {
261
- switch (o) {
1366
+ const c = st(a), l = (() => {
1367
+ switch (t) {
262
1368
  case 0:
263
- return Wr(c, s);
1369
+ return xo(c, i);
264
1370
  case 1:
265
- return qr(c, s);
1371
+ return Do(c, i);
266
1372
  default:
267
- throw new Error(`Invalid index value: ${o}`);
1373
+ throw new Error(`Invalid index value: ${t}`);
268
1374
  }
269
1375
  })();
270
- return Pr(u, r, t);
1376
+ return so(l, r, n);
271
1377
  }
272
- const De = (e) => Je(e, 0), Qe = (e) => Je(e, 1), Xr = (e) => [De, Qe].map((r) => r(e));
273
- function ea(e) {
1378
+ const Gr = (e) => ut(e, 0), dt = (e) => ut(e, 1), No = (e) => [Gr, dt].map((r) => r(e));
1379
+ function So(e) {
274
1380
  return e.dataset.input === "true";
275
1381
  }
276
- function ze(e, r) {
277
- let t = e;
1382
+ function Aa(e, r) {
1383
+ let n = e;
278
1384
  do
279
- t = t[r];
280
- while (t && !ea(t));
281
- return t;
1385
+ n = n[r];
1386
+ while (n && !So(n));
1387
+ return n;
282
1388
  }
283
- function Le(e) {
1389
+ function Sr(e) {
284
1390
  e && e.focus();
285
1391
  }
286
- function ra(e, r, t) {
287
- const l = [], o = new RegExp(Object.keys(r).map((c) => `${c}+`).join("|"), "g"), s = e.match(o);
288
- return e.split(o).reduce((c, u, g) => {
289
- const y = u && // biome-ignore lint/suspicious/noArrayIndexKey: index is stable here
290
- a.jsx(Hr, { children: u }, `separator_${g}`);
291
- c.push(y);
292
- const h = s?.[g];
293
- if (h) {
294
- const m = r[h] || r[Object.keys(r).find((b) => h.match(b))];
295
- if (!m)
1392
+ function Co(e, r, n) {
1393
+ const a = [], t = new RegExp(Object.keys(r).map((c) => `${c}+`).join("|"), "g"), i = e.match(t);
1394
+ return e.split(t).reduce((c, l, u) => {
1395
+ const s = l && // biome-ignore lint/suspicious/noArrayIndexKey: index is stable here
1396
+ o.jsx(wo, { children: l }, `separator_${u}`);
1397
+ c.push(s);
1398
+ const d = i?.[u];
1399
+ if (d) {
1400
+ const f = r[d] || r[Object.keys(r).find((v) => d.match(v))];
1401
+ if (!f)
296
1402
  return c;
297
- !t && l.includes(m) ? c.push(h) : (c.push(m(h, g)), l.push(m));
1403
+ !n && a.includes(f) ? c.push(d) : (c.push(f(d, u)), a.push(f));
298
1404
  }
299
1405
  return c;
300
1406
  }, []);
301
1407
  }
302
- function Be({ autoFocus: e, className: r, dayAriaLabel: t, dayPlaceholder: l, disabled: o, format: s, isCalendarOpen: c = null, locale: u, maxDate: g, maxDetail: y = "month", minDate: h, monthAriaLabel: m, monthPlaceholder: b, name: v = "date", nativeInputAriaLabel: j, onChange: k, onInvalidChange: E, required: D, returnValue: M = "start", showLeadingZeros: I, value: T, yearAriaLabel: P, yearPlaceholder: L }) {
303
- const [O, G] = re(null), [z, K] = re(null), [H, J] = re(null), [de, B] = re(null), R = U(null), V = U(null), Z = U(null), ne = U(null), [N, ue] = re(c), Q = U(void 0);
304
- le(() => {
305
- ue(c);
306
- }, [c]), le(() => {
307
- const n = De({
308
- value: T,
309
- minDate: h,
310
- maxDate: g,
311
- maxDetail: y
1408
+ function Br({ autoFocus: e, className: r, dayAriaLabel: n, dayPlaceholder: a, disabled: t, format: i, isCalendarOpen: c = null, locale: l, maxDate: u, maxDetail: s = "month", minDate: d, monthAriaLabel: f, monthPlaceholder: v, name: _ = "date", nativeInputAriaLabel: w, onChange: b, onInvalidChange: y, required: x, returnValue: C = "start", showLeadingZeros: E, value: $, yearAriaLabel: B, yearPlaceholder: L }) {
1409
+ const [z, P] = we(null), [K, Y] = we(null), [ee, Z] = we(null), [_e, q] = we(null), ne = Se(null), N = Se(null), re = Se(null), ge = Se(null), [S, M] = we(c), Q = Se(void 0);
1410
+ Pe(() => {
1411
+ M(c);
1412
+ }, [c]), Pe(() => {
1413
+ const h = Gr({
1414
+ value: $,
1415
+ minDate: d,
1416
+ maxDate: u,
1417
+ maxDetail: s
312
1418
  });
313
- n ? (G(te(n).toString()), K(ae(n).toString()), J($e(n).toString()), B(n)) : (G(null), K(null), J(null), B(null));
1419
+ h ? (P(ce(h).toString()), Y(Te(h).toString()), Z(er(h).toString()), q(h)) : (P(null), Y(null), Z(null), q(null));
314
1420
  }, [
315
- T,
316
- h,
317
- g,
318
- y,
1421
+ $,
1422
+ d,
1423
+ u,
1424
+ s,
319
1425
  // Toggling calendar visibility resets values
320
- N
1426
+ S
321
1427
  ]);
322
- const X = Ue(y), S = (() => {
323
- const n = Ve.indexOf(y), _ = be[n] || (() => {
1428
+ const J = st(s), j = (() => {
1429
+ const h = ia.indexOf(s), m = qe[h] || (() => {
324
1430
  const p = { year: "numeric" };
325
- return n >= 2 && (p.month = "numeric"), n >= 3 && (p.day = "numeric"), be[n] = p, p;
1431
+ return h >= 2 && (p.month = "numeric"), h >= 3 && (p.day = "numeric"), qe[h] = p, p;
326
1432
  })();
327
- return Me(_);
1433
+ return Rr(m);
328
1434
  })();
329
- function ee(n) {
1435
+ function ae(h) {
330
1436
  return (() => {
331
- switch (M) {
1437
+ switch (C) {
332
1438
  case "start":
333
- return De;
1439
+ return Gr;
334
1440
  case "end":
335
- return Qe;
1441
+ return dt;
336
1442
  case "range":
337
- return Xr;
1443
+ return No;
338
1444
  default:
339
1445
  throw new Error("Invalid returnValue.");
340
1446
  }
341
1447
  })()({
342
- value: n,
343
- minDate: h,
344
- maxDate: g,
345
- maxDetail: y
1448
+ value: h,
1449
+ minDate: d,
1450
+ maxDate: u,
1451
+ maxDetail: s
346
1452
  });
347
1453
  }
348
- const W = s || (() => {
349
- const i = new Date(2017, 11, 11), f = S(u, i), w = ["year", "month", "day"], d = ["y", "M", "d"];
350
- function C(x, fe) {
351
- const me = be[x] || (() => {
352
- const ve = { [x]: "numeric" };
353
- return be[x] = ve, ve;
1454
+ const oe = i || (() => {
1455
+ const g = new Date(2017, 11, 11), O = j(l, g), T = ["year", "month", "day"], D = ["y", "M", "d"];
1456
+ function W(H, Ae) {
1457
+ const Ee = qe[H] || (() => {
1458
+ const Ie = { [H]: "numeric" };
1459
+ return qe[H] = Ie, Ie;
354
1460
  })();
355
- return Me(me)(u, fe).match(/\d{1,}/);
1461
+ return Rr(Ee)(l, Ae).match(/\d{1,}/);
356
1462
  }
357
- let $ = f;
358
- return w.forEach((x, fe) => {
359
- const me = C(x, i);
360
- if (me) {
361
- const ve = me[0], er = d[fe];
362
- $ = $.replace(ve, er);
1463
+ let te = O;
1464
+ return T.forEach((H, Ae) => {
1465
+ const Ee = W(H, g);
1466
+ if (Ee) {
1467
+ const Ie = Ee[0], vr = D[Ae];
1468
+ te = te.replace(Ie, vr);
363
1469
  }
364
- }), $ = $.replace("17", "y"), $;
365
- })(), oe = (() => {
366
- const n = W.match(/[^0-9a-z]/i);
367
- return n ? n[0] : null;
1470
+ }), te = te.replace("17", "y"), te;
1471
+ })(), le = (() => {
1472
+ const h = oe.match(/[^0-9a-z]/i);
1473
+ return h ? h[0] : null;
368
1474
  })();
369
- function A(n) {
370
- if (n.target === n.currentTarget) {
371
- const _ = n.target.children[1];
372
- Le(_);
1475
+ function I(h) {
1476
+ if (h.target === h.currentTarget) {
1477
+ const m = h.target.children[1];
1478
+ Sr(m);
373
1479
  }
374
1480
  }
375
- function Y(n) {
376
- switch (Q.current = n.key, n.key) {
1481
+ function F(h) {
1482
+ switch (Q.current = h.key, h.key) {
377
1483
  case "ArrowLeft":
378
1484
  case "ArrowRight":
379
- case oe: {
380
- n.preventDefault();
381
- const { target: _ } = n, p = n.key === "ArrowLeft" ? "previousElementSibling" : "nextElementSibling", i = ze(_, p);
382
- Le(i);
1485
+ case le: {
1486
+ h.preventDefault();
1487
+ const { target: m } = h, p = h.key === "ArrowLeft" ? "previousElementSibling" : "nextElementSibling", g = Aa(m, p);
1488
+ Sr(g);
383
1489
  break;
384
1490
  }
385
1491
  }
386
1492
  }
387
- function Ie(n) {
388
- const { key: _, target: p } = n;
389
- if (!(Q.current === _) || !!Number.isNaN(Number(_)))
1493
+ function se(h) {
1494
+ const { key: m, target: p } = h;
1495
+ if (!(Q.current === m) || !!Number.isNaN(Number(m)))
390
1496
  return;
391
- const w = p.getAttribute("max");
392
- if (!w)
1497
+ const T = p.getAttribute("max");
1498
+ if (!T)
393
1499
  return;
394
- const { value: d } = p;
395
- if (Number(d) * 10 > Number(w) || d.length >= w.length) {
396
- const $ = ze(p, "nextElementSibling");
397
- Le($);
1500
+ const { value: D } = p;
1501
+ if (Number(D) * 10 > Number(T) || D.length >= T.length) {
1502
+ const te = Aa(p, "nextElementSibling");
1503
+ Sr(te);
398
1504
  }
399
1505
  }
400
- function ce() {
401
- if (!k)
1506
+ function ue() {
1507
+ if (!b)
402
1508
  return;
403
- function n(d) {
404
- return !!d;
1509
+ function h(D) {
1510
+ return !!D;
405
1511
  }
406
- const _ = [
407
- ne.current,
408
- V.current,
409
- Z.current,
410
- R.current
411
- ].filter(n), p = {};
412
- for (const d of _)
413
- p[d.name] = "valueAsNumber" in d ? d.valueAsNumber : Number(d.value);
414
- if (_.every((d) => !d.value)) {
415
- k(null, !1);
1512
+ const m = [
1513
+ ge.current,
1514
+ N.current,
1515
+ re.current,
1516
+ ne.current
1517
+ ].filter(h), p = {};
1518
+ for (const D of m)
1519
+ p[D.name] = "valueAsNumber" in D ? D.valueAsNumber : Number(D.value);
1520
+ if (m.every((D) => !D.value)) {
1521
+ b(null, !1);
416
1522
  return;
417
1523
  }
418
- const f = _.every((d) => d.value), w = _.every((d) => d.validity.valid);
419
- if (f && w) {
420
- const d = Number(p.year || (/* @__PURE__ */ new Date()).getFullYear()), C = Number(p.month || 1) - 1, $ = Number(p.day || 1), x = /* @__PURE__ */ new Date();
421
- x.setFullYear(d, C, $), x.setHours(0, 0, 0, 0);
422
- const fe = ee(x);
423
- k(fe, !1);
1524
+ const O = m.every((D) => D.value), T = m.every((D) => D.validity.valid);
1525
+ if (O && T) {
1526
+ const D = Number(p.year || (/* @__PURE__ */ new Date()).getFullYear()), W = Number(p.month || 1) - 1, te = Number(p.day || 1), H = /* @__PURE__ */ new Date();
1527
+ H.setFullYear(D, W, te), H.setHours(0, 0, 0, 0);
1528
+ const Ae = ae(H);
1529
+ b(Ae, !1);
424
1530
  return;
425
1531
  }
426
- E && E();
1532
+ y && y();
427
1533
  }
428
- function Ne(n) {
429
- const { name: _, value: p } = n.target;
430
- switch (_) {
1534
+ function Ce(h) {
1535
+ const { name: m, value: p } = h.target;
1536
+ switch (m) {
431
1537
  case "year":
432
- G(p);
1538
+ P(p);
433
1539
  break;
434
1540
  case "month":
435
- K(p);
1541
+ Y(p);
436
1542
  break;
437
1543
  case "day":
438
- J(p);
1544
+ Z(p);
439
1545
  break;
440
1546
  }
441
- ce();
1547
+ ue();
442
1548
  }
443
- function Ae(n) {
444
- const { value: _ } = n.target;
445
- if (!k)
1549
+ function ye(h) {
1550
+ const { value: m } = h.target;
1551
+ if (!b)
446
1552
  return;
447
1553
  const p = (() => {
448
- if (!_)
1554
+ if (!m)
449
1555
  return null;
450
- const [i, f, w] = _.split("-"), d = Number(i), C = Number(f) - 1 || 0, $ = Number(w) || 1, x = /* @__PURE__ */ new Date();
451
- return x.setFullYear(d, C, $), x.setHours(0, 0, 0, 0), x;
1556
+ const [g, O, T] = m.split("-"), D = Number(g), W = Number(O) - 1 || 0, te = Number(T) || 1, H = /* @__PURE__ */ new Date();
1557
+ return H.setFullYear(D, W, te), H.setHours(0, 0, 0, 0), H;
452
1558
  })();
453
- k(p, !1);
1559
+ b(p, !1);
454
1560
  }
455
- const ie = {
1561
+ const pe = {
456
1562
  className: r,
457
- disabled: o,
458
- maxDate: g || Te,
459
- minDate: h || xe,
460
- onChange: Ne,
461
- onKeyDown: Y,
462
- onKeyUp: Ie,
1563
+ disabled: t,
1564
+ maxDate: u || Ca,
1565
+ minDate: d || tr,
1566
+ onChange: Ce,
1567
+ onKeyDown: F,
1568
+ onKeyUp: se,
463
1569
  // This is only for showing validity when editing
464
- required: !!(D || N)
1570
+ required: !!(x || S)
465
1571
  };
466
- function _e(n, _) {
467
- if (n && n.length > 2)
468
- throw new Error(`Unsupported token: ${n}`);
469
- const p = n && n.length === 2;
470
- return a.jsx(Or, { ...ie, ariaLabel: t, autoFocus: _ === 0 && e, inputRef: ne, month: z, placeholder: l, showLeadingZeros: p || I, value: H, year: O }, "day");
471
- }
472
- function Ce(n, _) {
473
- if (n && n.length > 4)
474
- throw new Error(`Unsupported token: ${n}`);
475
- if (n.length > 2)
476
- return a.jsx(Rr, { ...ie, ariaLabel: m, autoFocus: _ === 0 && e, inputRef: Z, locale: u, placeholder: b, short: n.length === 3, value: z, year: O }, "month");
477
- const p = n && n.length === 2;
478
- return a.jsx(Vr, { ...ie, ariaLabel: m, autoFocus: _ === 0 && e, inputRef: V, placeholder: b, showLeadingZeros: p || I, value: z, year: O }, "month");
479
- }
480
- function ge(n, _) {
481
- return a.jsx(Kr, { ...ie, ariaLabel: P, autoFocus: _ === 0 && e, inputRef: R, placeholder: L, value: O, valueType: X }, "year");
1572
+ function A(h, m) {
1573
+ if (h && h.length > 2)
1574
+ throw new Error(`Unsupported token: ${h}`);
1575
+ const p = h && h.length === 2;
1576
+ return o.jsx(uo, { ...pe, ariaLabel: n, autoFocus: m === 0 && e, inputRef: ge, month: K, placeholder: a, showLeadingZeros: p || E, value: ee, year: z }, "day");
482
1577
  }
483
- function pe() {
484
- return ra(W, {
485
- d: _e,
486
- M: Ce,
487
- y: ge
488
- }, typeof s < "u");
1578
+ function me(h, m) {
1579
+ if (h && h.length > 4)
1580
+ throw new Error(`Unsupported token: ${h}`);
1581
+ if (h.length > 2)
1582
+ return o.jsx(yo, { ...pe, ariaLabel: f, autoFocus: m === 0 && e, inputRef: re, locale: l, placeholder: v, short: h.length === 3, value: K, year: z }, "month");
1583
+ const p = h && h.length === 2;
1584
+ return o.jsx(fo, { ...pe, ariaLabel: f, autoFocus: m === 0 && e, inputRef: N, placeholder: v, showLeadingZeros: p || E, value: K, year: z }, "month");
1585
+ }
1586
+ function G(h, m) {
1587
+ return o.jsx(bo, { ...pe, ariaLabel: B, autoFocus: m === 0 && e, inputRef: ne, placeholder: L, value: z, valueType: J }, "year");
489
1588
  }
490
- function he() {
491
- return a.jsx(Zr, { ariaLabel: j, disabled: o, maxDate: g || Te, minDate: h || xe, name: v, onChange: Ae, required: D, value: de, valueType: X }, "date");
1589
+ function be() {
1590
+ return Co(oe, {
1591
+ d: A,
1592
+ M: me,
1593
+ y: G
1594
+ }, typeof i < "u");
1595
+ }
1596
+ function Oe() {
1597
+ return o.jsx(po, { ariaLabel: w, disabled: t, maxDate: u || Ca, minDate: d || tr, name: _, onChange: ye, required: x, value: _e, valueType: J }, "date");
492
1598
  }
493
1599
  return (
494
1600
  // biome-ignore lint/a11y/useKeyWithClickEvents: This interaction is designed for mouse users only
495
1601
  // biome-ignore lint/a11y/noStaticElementInteractions: This interaction is designed for mouse users only
496
- a.jsxs("div", { className: r, onClick: A, children: [he(), pe()] })
1602
+ o.jsxs("div", { className: r, onClick: I, children: [Oe(), be()] })
497
1603
  );
498
1604
  }
499
- const F = "react-daterange-picker", aa = ["mousedown", "focusin", "touchstart"], Xe = {
1605
+ const ve = "react-date-picker", Ao = ["mousedown", "focusin", "touchstart"], ft = {
500
1606
  xmlns: "http://www.w3.org/2000/svg",
501
1607
  width: 19,
502
1608
  height: 19,
503
1609
  viewBox: "0 0 19 19",
504
1610
  stroke: "black",
505
1611
  strokeWidth: 2
506
- }, ta = a.jsxs("svg", { ...Xe, "aria-hidden": "true", className: `${F}__calendar-button__icon ${F}__button__icon`, children: [a.jsx("rect", { fill: "none", height: "15", width: "15", x: "2", y: "2" }), a.jsx("line", { x1: "6", x2: "6", y1: "0", y2: "4" }), a.jsx("line", { x1: "13", x2: "13", y1: "0", y2: "4" })] }), na = a.jsxs("svg", { ...Xe, "aria-hidden": "true", className: `${F}__clear-button__icon ${F}__button__icon`, children: [a.jsx("line", { x1: "4", x2: "15", y1: "4", y2: "15" }), a.jsx("line", { x1: "15", x2: "4", y1: "4", y2: "15" })] });
507
- function oa(e) {
508
- const { autoFocus: r, calendarAriaLabel: t, calendarIcon: l = ta, className: o, clearAriaLabel: s, clearIcon: c = na, closeCalendar: u = !0, "data-testid": g, dayAriaLabel: y, dayPlaceholder: h, disableCalendar: m, disabled: b, format: v, id: j, isOpen: k = null, locale: E, maxDate: D, maxDetail: M = "month", minDate: I, monthAriaLabel: T, monthPlaceholder: P, name: L = "daterange", nativeInputAriaLabel: O, onCalendarClose: G, onCalendarOpen: z, onChange: K, onFocus: H, onInvalidChange: J, openCalendarOnFocus: de = !0, rangeDivider: B = "", required: R, shouldCloseCalendar: V, shouldOpenCalendar: Z, showLeadingZeros: ne, value: N, yearAriaLabel: ue, yearPlaceholder: Q, ...X } = e, [S, ee] = re(k), W = U(null), oe = U(null);
509
- le(() => {
510
- ee(k);
511
- }, [k]);
512
- function A({ reason: i }) {
513
- Z && !Z({ reason: i }) || (ee(!0), z && z());
514
- }
515
- const Y = ye(({ reason: i }) => {
516
- V && !V({ reason: i }) || (ee(!1), G && G());
517
- }, [G, V]);
518
- function Ie() {
519
- S ? Y({ reason: "buttonClick" }) : A({ reason: "buttonClick" });
520
- }
521
- function ce(i, f = u) {
522
- f && Y({ reason: "select" }), K && K(i);
523
- }
524
- function Ne(i, f) {
525
- const [w] = Array.isArray(i) ? i : [i], [, d] = Array.isArray(N) ? N : [N], C = d ? new Date(d) : null;
526
- ce([w, C], f);
527
- }
528
- function Ae(i, f) {
529
- const [, w] = Array.isArray(i) ? i : [null, i], [d] = Array.isArray(N) ? N : [N], C = d ? new Date(d) : null;
530
- ce([C, w], f);
531
- }
532
- function ie(i) {
533
- H && H(i), // Internet Explorer still fires onFocus on disabled elements
534
- !(b || S || !de || i.target.dataset.select === "true") && A({ reason: "focus" });
535
- }
536
- const _e = ye((i) => {
537
- i.key === "Escape" && Y({ reason: "escape" });
538
- }, [Y]);
539
- function Ce() {
540
- ce(null);
541
- }
542
- function ge(i) {
543
- i.stopPropagation();
544
- }
545
- const pe = ye((i) => {
546
- const { current: f } = W, { current: w } = oe, d = "composedPath" in i ? i.composedPath()[0] : i.target;
547
- d && f && !f.contains(d) && (!w || !w.contains(d)) && Y({ reason: "outsideAction" });
548
- }, [Y]), he = ye((i = S) => {
549
- for (const f of aa)
550
- i ? document.addEventListener(f, pe) : document.removeEventListener(f, pe);
551
- i ? document.addEventListener("keydown", _e) : document.removeEventListener("keydown", _e);
552
- }, [S, pe, _e]);
553
- le(() => (he(), () => {
554
- he(!1);
555
- }), [he, S]);
556
- function n() {
557
- const [i, f] = Array.isArray(N) ? N : [N], C = {
1612
+ }, Lo = o.jsxs("svg", { ...ft, "aria-hidden": "true", className: `${ve}__calendar-button__icon ${ve}__button__icon`, children: [o.jsx("rect", { fill: "none", height: "15", width: "15", x: "2", y: "2" }), o.jsx("line", { x1: "6", x2: "6", y1: "0", y2: "4" }), o.jsx("line", { x1: "13", x2: "13", y1: "0", y2: "4" })] }), Po = o.jsxs("svg", { ...ft, "aria-hidden": "true", className: `${ve}__clear-button__icon ${ve}__button__icon`, children: [o.jsx("line", { x1: "4", x2: "15", y1: "4", y2: "15" }), o.jsx("line", { x1: "15", x2: "4", y1: "4", y2: "15" })] });
1613
+ function Eo(e) {
1614
+ const { autoFocus: r, calendarAriaLabel: n, calendarIcon: a = Lo, className: t, clearAriaLabel: i, clearIcon: c = Po, closeCalendar: l = !0, "data-testid": u, dayAriaLabel: s, dayPlaceholder: d, disableCalendar: f, disabled: v, format: _, id: w, isOpen: b = null, locale: y, maxDate: x, maxDetail: C = "month", minDate: E, monthAriaLabel: $, monthPlaceholder: B, name: L = "date", nativeInputAriaLabel: z, onCalendarClose: P, onCalendarOpen: K, onChange: Y, onFocus: ee, onInvalidChange: Z, openCalendarOnFocus: _e = !0, required: q, returnValue: ne = "start", shouldCloseCalendar: N, shouldOpenCalendar: re, showLeadingZeros: ge, value: S, yearAriaLabel: M, yearPlaceholder: Q, ...J } = e, [j, ae] = we(b), oe = Se(null), le = Se(null);
1615
+ Pe(() => {
1616
+ ae(b);
1617
+ }, [b]);
1618
+ function I({ reason: m }) {
1619
+ re && !re({ reason: m }) || (ae(!0), K && K());
1620
+ }
1621
+ const F = he(({ reason: m }) => {
1622
+ N && !N({ reason: m }) || (ae(!1), P && P());
1623
+ }, [P, N]);
1624
+ function se() {
1625
+ j ? F({ reason: "buttonClick" }) : I({ reason: "buttonClick" });
1626
+ }
1627
+ function ue(m, p = l) {
1628
+ p && F({ reason: "select" }), Y && Y(m);
1629
+ }
1630
+ function Ce(m) {
1631
+ ee && ee(m), // Internet Explorer still fires onFocus on disabled elements
1632
+ !(v || j || !_e || m.target.dataset.select === "true") && I({ reason: "focus" });
1633
+ }
1634
+ const ye = he((m) => {
1635
+ m.key === "Escape" && F({ reason: "escape" });
1636
+ }, [F]);
1637
+ function pe() {
1638
+ ue(null);
1639
+ }
1640
+ function A(m) {
1641
+ m.stopPropagation();
1642
+ }
1643
+ const me = he((m) => {
1644
+ const { current: p } = oe, { current: g } = le, O = "composedPath" in m ? m.composedPath()[0] : m.target;
1645
+ O && p && !p.contains(O) && (!g || !g.contains(O)) && F({ reason: "outsideAction" });
1646
+ }, [F]), G = he((m = j) => {
1647
+ for (const p of Ao)
1648
+ m ? document.addEventListener(p, me) : document.removeEventListener(p, me);
1649
+ m ? document.addEventListener("keydown", ye) : document.removeEventListener("keydown", ye);
1650
+ }, [j, me, ye]);
1651
+ Pe(() => (G(), () => {
1652
+ G(!1);
1653
+ }), [G]);
1654
+ function be() {
1655
+ const [m] = Array.isArray(S) ? S : [S], p = {
1656
+ dayAriaLabel: s,
1657
+ monthAriaLabel: $,
1658
+ nativeInputAriaLabel: z,
1659
+ yearAriaLabel: M
1660
+ }, g = {
1661
+ dayPlaceholder: d,
1662
+ monthPlaceholder: B,
1663
+ yearPlaceholder: Q
1664
+ };
1665
+ return o.jsxs("div", { className: `${ve}__wrapper`, children: [o.jsx(Br, { ...p, ...g, autoFocus: r, className: `${ve}__inputGroup`, disabled: v, format: _, isCalendarOpen: j, locale: y, maxDate: x, maxDetail: C, minDate: E, name: L, onChange: ue, onInvalidChange: Z, required: q, returnValue: ne, showLeadingZeros: ge, value: m }), c !== null && o.jsx("button", { "aria-label": i, className: `${ve}__clear-button ${ve}__button`, disabled: v, onClick: pe, onFocus: A, type: "button", children: typeof c == "function" ? Xe(c) : c }), a !== null && !f && o.jsx("button", { "aria-expanded": j || !1, "aria-label": n, className: `${ve}__calendar-button ${ve}__button`, disabled: v, onClick: se, onFocus: A, type: "button", children: typeof a == "function" ? Xe(a) : a })] });
1666
+ }
1667
+ function Oe() {
1668
+ if (j === null || f)
1669
+ return null;
1670
+ const { calendarProps: m, portalContainer: p, value: g } = e, O = `${ve}__calendar`, T = xe(O, `${O}--${j ? "open" : "closed"}`), D = o.jsx(ta, { locale: y, maxDate: x, maxDetail: C, minDate: E, onChange: (W) => ue(W), value: g, ...m });
1671
+ return p ? za(o.jsx("div", { ref: le, className: T, children: D }), p) : o.jsx(Ua, { children: o.jsx("div", { ref: (W) => {
1672
+ W && !j && W.removeAttribute("style");
1673
+ }, className: T, children: D }) });
1674
+ }
1675
+ const h = Je(
1676
+ () => Ha(J),
1677
+ // biome-ignore lint/correctness/useExhaustiveDependencies: FIXME
1678
+ [J]
1679
+ );
1680
+ return (
1681
+ // biome-ignore lint/a11y/noStaticElementInteractions: False positive caused by non interactive wrapper listening for bubbling events
1682
+ o.jsxs("div", { className: xe(ve, `${ve}--${j ? "open" : "closed"}`, `${ve}--${v ? "disabled" : "enabled"}`, t), "data-testid": u, id: w, ...h, onFocus: Ce, ref: oe, children: [be(), Oe()] })
1683
+ );
1684
+ }
1685
+ const ie = "react-daterange-picker", Io = ["mousedown", "focusin", "touchstart"], vt = {
1686
+ xmlns: "http://www.w3.org/2000/svg",
1687
+ width: 19,
1688
+ height: 19,
1689
+ viewBox: "0 0 19 19",
1690
+ stroke: "black",
1691
+ strokeWidth: 2
1692
+ }, To = o.jsxs("svg", { ...vt, "aria-hidden": "true", className: `${ie}__calendar-button__icon ${ie}__button__icon`, children: [o.jsx("rect", { fill: "none", height: "15", width: "15", x: "2", y: "2" }), o.jsx("line", { x1: "6", x2: "6", y1: "0", y2: "4" }), o.jsx("line", { x1: "13", x2: "13", y1: "0", y2: "4" })] }), $o = o.jsxs("svg", { ...vt, "aria-hidden": "true", className: `${ie}__clear-button__icon ${ie}__button__icon`, children: [o.jsx("line", { x1: "4", x2: "15", y1: "4", y2: "15" }), o.jsx("line", { x1: "15", x2: "4", y1: "4", y2: "15" })] });
1693
+ function Mo(e) {
1694
+ const { autoFocus: r, calendarAriaLabel: n, calendarIcon: a = To, className: t, clearAriaLabel: i, clearIcon: c = $o, closeCalendar: l = !0, "data-testid": u, dayAriaLabel: s, dayPlaceholder: d, disableCalendar: f, disabled: v, format: _, id: w, isOpen: b = null, locale: y, maxDate: x, maxDetail: C = "month", minDate: E, monthAriaLabel: $, monthPlaceholder: B, name: L = "daterange", nativeInputAriaLabel: z, onCalendarClose: P, onCalendarOpen: K, onChange: Y, onFocus: ee, onInvalidChange: Z, openCalendarOnFocus: _e = !0, rangeDivider: q = "–", required: ne, shouldCloseCalendar: N, shouldOpenCalendar: re, showLeadingZeros: ge, value: S, yearAriaLabel: M, yearPlaceholder: Q, ...J } = e, [j, ae] = we(b), oe = Se(null), le = Se(null);
1695
+ Pe(() => {
1696
+ ae(b);
1697
+ }, [b]);
1698
+ function I({ reason: g }) {
1699
+ re && !re({ reason: g }) || (ae(!0), K && K());
1700
+ }
1701
+ const F = he(({ reason: g }) => {
1702
+ N && !N({ reason: g }) || (ae(!1), P && P());
1703
+ }, [P, N]);
1704
+ function se() {
1705
+ j ? F({ reason: "buttonClick" }) : I({ reason: "buttonClick" });
1706
+ }
1707
+ function ue(g, O = l) {
1708
+ O && F({ reason: "select" }), Y && Y(g);
1709
+ }
1710
+ function Ce(g, O) {
1711
+ const [T] = Array.isArray(g) ? g : [g], [, D] = Array.isArray(S) ? S : [S], W = D ? new Date(D) : null;
1712
+ ue([T, W], O);
1713
+ }
1714
+ function ye(g, O) {
1715
+ const [, T] = Array.isArray(g) ? g : [null, g], [D] = Array.isArray(S) ? S : [S], W = D ? new Date(D) : null;
1716
+ ue([W, T], O);
1717
+ }
1718
+ function pe(g) {
1719
+ ee && ee(g), // Internet Explorer still fires onFocus on disabled elements
1720
+ !(v || j || !_e || g.target.dataset.select === "true") && I({ reason: "focus" });
1721
+ }
1722
+ const A = he((g) => {
1723
+ g.key === "Escape" && F({ reason: "escape" });
1724
+ }, [F]);
1725
+ function me() {
1726
+ ue(null);
1727
+ }
1728
+ function G(g) {
1729
+ g.stopPropagation();
1730
+ }
1731
+ const be = he((g) => {
1732
+ const { current: O } = oe, { current: T } = le, D = "composedPath" in g ? g.composedPath()[0] : g.target;
1733
+ D && O && !O.contains(D) && (!T || !T.contains(D)) && F({ reason: "outsideAction" });
1734
+ }, [F]), Oe = he((g = j) => {
1735
+ for (const O of Io)
1736
+ g ? document.addEventListener(O, be) : document.removeEventListener(O, be);
1737
+ g ? document.addEventListener("keydown", A) : document.removeEventListener("keydown", A);
1738
+ }, [j, be, A]);
1739
+ Pe(() => (Oe(), () => {
1740
+ Oe(!1);
1741
+ }), [Oe, j]);
1742
+ function h() {
1743
+ const [g, O] = Array.isArray(S) ? S : [S], W = {
558
1744
  ...{
559
- dayAriaLabel: y,
560
- monthAriaLabel: T,
561
- nativeInputAriaLabel: O,
562
- yearAriaLabel: ue
1745
+ dayAriaLabel: s,
1746
+ monthAriaLabel: $,
1747
+ nativeInputAriaLabel: z,
1748
+ yearAriaLabel: M
563
1749
  },
564
1750
  ...{
565
- dayPlaceholder: h,
566
- monthPlaceholder: P,
1751
+ dayPlaceholder: d,
1752
+ monthPlaceholder: B,
567
1753
  yearPlaceholder: Q
568
1754
  },
569
- className: `${F}__inputGroup`,
570
- disabled: b,
571
- format: v,
572
- isCalendarOpen: S,
573
- locale: E,
574
- maxDate: D,
575
- maxDetail: M,
576
- minDate: I,
577
- onInvalidChange: J,
578
- required: R,
579
- showLeadingZeros: ne
1755
+ className: `${ie}__inputGroup`,
1756
+ disabled: v,
1757
+ format: _,
1758
+ isCalendarOpen: j,
1759
+ locale: y,
1760
+ maxDate: x,
1761
+ maxDetail: C,
1762
+ minDate: E,
1763
+ onInvalidChange: Z,
1764
+ required: ne,
1765
+ showLeadingZeros: ge
580
1766
  };
581
- return a.jsxs("div", { className: `${F}__wrapper`, children: [a.jsx(Be, { ...C, autoFocus: r, name: `${L}_from`, onChange: Ne, returnValue: "start", value: i }), a.jsx("span", { className: `${F}__range-divider`, children: B }), a.jsx(Be, { ...C, name: `${L}_to`, onChange: Ae, returnValue: "end", value: f }), c !== null && a.jsx("button", { "aria-label": s, className: `${F}__clear-button ${F}__button`, disabled: b, onClick: Ce, onFocus: ge, type: "button", children: typeof c == "function" ? Ge(c) : c }), l !== null && !m && a.jsx("button", { "aria-expanded": S || !1, "aria-label": t, className: `${F}__calendar-button ${F}__button`, disabled: b, onClick: Ie, onFocus: ge, type: "button", children: typeof l == "function" ? Ge(l) : l })] });
1767
+ return o.jsxs("div", { className: `${ie}__wrapper`, children: [o.jsx(Br, { ...W, autoFocus: r, name: `${L}_from`, onChange: Ce, returnValue: "start", value: g }), o.jsx("span", { className: `${ie}__range-divider`, children: q }), o.jsx(Br, { ...W, name: `${L}_to`, onChange: ye, returnValue: "end", value: O }), c !== null && o.jsx("button", { "aria-label": i, className: `${ie}__clear-button ${ie}__button`, disabled: v, onClick: me, onFocus: G, type: "button", children: typeof c == "function" ? Xe(c) : c }), a !== null && !f && o.jsx("button", { "aria-expanded": j || !1, "aria-label": n, className: `${ie}__calendar-button ${ie}__button`, disabled: v, onClick: se, onFocus: G, type: "button", children: typeof a == "function" ? Xe(a) : a })] });
582
1768
  }
583
- function _() {
584
- if (S === null || m)
1769
+ function m() {
1770
+ if (j === null || f)
585
1771
  return null;
586
- const { calendarProps: i, portalContainer: f, value: w } = e, d = `${F}__calendar`, C = se(d, `${d}--${S ? "open" : "closed"}`), $ = a.jsx(He, { locale: E, maxDate: D, maxDetail: M, minDate: I, onChange: (x) => ce(x), selectRange: !0, value: w, ...i });
587
- return f ? cr(a.jsx("div", { ref: oe, className: C, children: $ }), f) : a.jsx(wr, { children: a.jsx("div", { ref: (x) => {
588
- x && !S && x.removeAttribute("style");
589
- }, className: C, children: $ }) });
1772
+ const { calendarProps: g, portalContainer: O, value: T } = e, D = `${ie}__calendar`, W = xe(D, `${D}--${j ? "open" : "closed"}`), te = o.jsx(ta, { locale: y, maxDate: x, maxDetail: C, minDate: E, onChange: (H) => ue(H), selectRange: !0, value: T, ...g });
1773
+ return O ? za(o.jsx("div", { ref: le, className: W, children: te }), O) : o.jsx(Ua, { children: o.jsx("div", { ref: (H) => {
1774
+ H && !j && H.removeAttribute("style");
1775
+ }, className: W, children: te }) });
590
1776
  }
591
- const p = or(
592
- () => br(X),
1777
+ const p = Je(
1778
+ () => Ha(J),
593
1779
  // biome-ignore lint/correctness/useExhaustiveDependencies: FIXME
594
- [X]
1780
+ [J]
595
1781
  );
596
1782
  return (
597
1783
  // biome-ignore lint/a11y/noStaticElementInteractions: False positive caused by non interactive wrapper listening for bubbling events
598
- a.jsxs("div", { className: se(F, `${F}--${S ? "open" : "closed"}`, `${F}--${b ? "disabled" : "enabled"}`, o), "data-testid": g, id: j, ...p, onFocus: ie, ref: W, children: [n(), _()] })
1784
+ o.jsxs("div", { className: xe(ie, `${ie}--${j ? "open" : "closed"}`, `${ie}--${v ? "disabled" : "enabled"}`, t), "data-testid": u, id: w, ...p, onFocus: pe, ref: oe, children: [h(), m()] })
599
1785
  );
600
1786
  }
601
- function ca(e) {
602
- return ke({ attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M12 192h424c6.6 0 12 5.4 12 12v260c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V204c0-6.6 5.4-12 12-12zm436-44v-36c0-26.5-21.5-48-48-48h-48V12c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v52H160V12c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v52H48C21.5 64 0 85.5 0 112v36c0 6.6 5.4 12 12 12h424c6.6 0 12-5.4 12-12z" }, child: [] }] })(e);
1787
+ function Fo(e) {
1788
+ return nr({ attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M12 192h424c6.6 0 12 5.4 12 12v260c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V204c0-6.6 5.4-12 12-12zm436-44v-36c0-26.5-21.5-48-48-48h-48V12c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v52H160V12c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v52H48C21.5 64 0 85.5 0 112v36c0 6.6 5.4 12 12 12h424c6.6 0 12-5.4 12-12z" }, child: [] }] })(e);
603
1789
  }
604
- function ia(e) {
605
- return ke({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0V0z" }, child: [] }, { tag: "path", attr: { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z" }, child: [] }] })(e);
1790
+ function Wo(e) {
1791
+ return nr({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0V0z" }, child: [] }, { tag: "path", attr: { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z" }, child: [] }] })(e);
606
1792
  }
607
- const Re = ({ disabled: e, error: r }) => /* @__PURE__ */ a.jsx(
608
- ca,
1793
+ const La = ({ disabled: e, error: r }) => /* @__PURE__ */ o.jsx(
1794
+ Fo,
609
1795
  {
610
- className: se({
1796
+ className: xe({
611
1797
  "fill-gray-400": e,
612
1798
  "fill-gray-500": !e && !r,
613
1799
  "fill-red-500": r && !e
614
1800
  })
615
1801
  }
616
- ), Ze = ({ disabled: e, error: r, onClick: t }) => /* @__PURE__ */ a.jsx(
617
- ia,
1802
+ ), Pa = ({ disabled: e, error: r, onClick: n }) => /* @__PURE__ */ o.jsx(
1803
+ Wo,
618
1804
  {
619
- className: se("w-5 h-5", {
1805
+ className: xe("w-5 h-5", {
620
1806
  "fill-gray-400": e,
621
1807
  "fill-gray-500": !e && !r,
622
1808
  "fill-red-500": r && !e
623
1809
  }),
624
- onClick: (l) => {
625
- l.stopPropagation(), t();
1810
+ onClick: (a) => {
1811
+ a.stopPropagation(), n();
626
1812
  }
627
1813
  }
628
- ), Ke = xr.div`
1814
+ ), Ea = Vt.div`
629
1815
  position: relative;
630
1816
 
631
1817
  input[type="number"]::-webkit-inner-spin-button,
@@ -682,29 +1868,29 @@ const Re = ({ disabled: e, error: r }) => /* @__PURE__ */ a.jsx(
682
1868
 
683
1869
  ${({ showcalendar: e, error: r }) => {
684
1870
  if (r)
685
- return q`
1871
+ return Le`
686
1872
  /* box-shadow: var(--shadow-inputError); */
687
1873
  border-color: var(--color-danger);
688
1874
  `;
689
1875
  if (e === "true")
690
- return q`
1876
+ return Le`
691
1877
  /* box-shadow: var(--shadow-inputBase); */
692
1878
  /* border-color: var(--color-primary-700); */
693
1879
  `;
694
1880
  }}
695
1881
  ${({ size: e }) => {
696
1882
  if (e === "sm")
697
- return q`
1883
+ return Le`
698
1884
  padding-top: 2px;
699
1885
  padding-bottom: 2px;
700
1886
  `;
701
1887
  if (e === "md")
702
- return q`
1888
+ return Le`
703
1889
  padding-top: 4px;
704
1890
  padding-bottom: 4px;
705
1891
  `;
706
1892
  if (e === "lg")
707
- return q`
1893
+ return Le`
708
1894
  padding-top: 6px;
709
1895
  padding-bottom: 6px;
710
1896
  `;
@@ -890,7 +2076,7 @@ const Re = ({ disabled: e, error: r }) => /* @__PURE__ */ a.jsx(
890
2076
  ${({ color: e }) => {
891
2077
  switch (e) {
892
2078
  case "primary":
893
- return q`
2079
+ return Le`
894
2080
  .react-calendar__tile:enabled:hover,
895
2081
  .react-calendar__tile:enabled:focus {
896
2082
  background-color: var(--color-primary-100);
@@ -947,7 +2133,7 @@ const Re = ({ disabled: e, error: r }) => /* @__PURE__ */ a.jsx(
947
2133
  }
948
2134
  `;
949
2135
  case "success":
950
- return q`
2136
+ return Le`
951
2137
  .react-calendar__tile:enabled:hover,
952
2138
  .react-calendar__tile:enabled:focus {
953
2139
  background-color: var(--color-success-100);
@@ -1004,7 +2190,7 @@ const Re = ({ disabled: e, error: r }) => /* @__PURE__ */ a.jsx(
1004
2190
  }
1005
2191
  `;
1006
2192
  default:
1007
- return q``;
2193
+ return Le``;
1008
2194
  }
1009
2195
  }}
1010
2196
 
@@ -1024,103 +2210,103 @@ const Re = ({ disabled: e, error: r }) => /* @__PURE__ */ a.jsx(
1024
2210
  }
1025
2211
 
1026
2212
  /* RANGE */
1027
- `, xa = ({
2213
+ `, Jo = ({
1028
2214
  id: e,
1029
2215
  value: r,
1030
- showDoubleView: t,
1031
- classNameContainer: l,
1032
- className: o,
1033
- color: s = "primary",
2216
+ showDoubleView: n,
2217
+ classNameContainer: a,
2218
+ className: t,
2219
+ color: i = "primary",
1034
2220
  minDate: c,
1035
- maxDate: u,
1036
- showCalendar: g = !1,
1037
- loading: y,
1038
- widthCalendar: h,
1039
- locale: m = "es",
1040
- format: b = "MM/dd/yyyy",
1041
- disabled: v,
1042
- error: j,
1043
- label: k,
1044
- touched: E,
1045
- required: D,
1046
- onChange: M,
1047
- onCloseCalendar: I,
1048
- onOpenCalendar: T,
1049
- tileDisabled: P,
2221
+ maxDate: l,
2222
+ showCalendar: u = !1,
2223
+ loading: s,
2224
+ widthCalendar: d,
2225
+ locale: f = "es",
2226
+ format: v = "MM/dd/yyyy",
2227
+ disabled: _,
2228
+ error: w,
2229
+ label: b,
2230
+ touched: y,
2231
+ required: x,
2232
+ onChange: C,
2233
+ onCloseCalendar: E,
2234
+ onOpenCalendar: $,
2235
+ tileDisabled: B,
1050
2236
  onClearCalendar: L,
1051
- onInvalidChange: O,
1052
- onKeyDown: G,
1053
- onKeyUp: z,
1054
- onBlur: K,
1055
- type: H = "date-picker",
1056
- size: J = "md",
1057
- tileContent: de = null
2237
+ onInvalidChange: z,
2238
+ onKeyDown: P,
2239
+ onKeyUp: K,
2240
+ onBlur: Y,
2241
+ type: ee = "date-picker",
2242
+ size: Z = "md",
2243
+ tileContent: _e = null
1058
2244
  }) => {
1059
- const [B, R] = re(g), V = U(0), Z = kr(), ne = tr.useId(), N = e || ne, ue = !v && !!j && E;
1060
- le(() => {
1061
- const A = document.getElementById(Z);
1062
- A && (h ? V.current = h : V.current = A.clientWidth);
1063
- }, [t, Z, h]);
1064
- const Q = (A) => {
1065
- M(A), R(!1);
1066
- }, X = () => {
1067
- const A = /* @__PURE__ */ new Date(), Y = new Date(A.getFullYear(), A.getMonth(), A.getDate(), 0, 0, 0);
1068
- Q(Y);
1069
- }, S = () => {
1070
- v || (R(!1), I && I());
1071
- }, ee = () => {
1072
- if (v) return;
1073
- const A = !B;
1074
- R(A), A && T ? T() : I && I();
1075
- }, W = () => {
1076
- if (!v) {
2245
+ const [q, ne] = we(u), N = Se(0), re = Yt(), ge = kt.useId(), S = e || ge, M = !_ && !!w && y;
2246
+ Pe(() => {
2247
+ const I = document.getElementById(re);
2248
+ I && (d ? N.current = d : N.current = I.clientWidth);
2249
+ }, [n, re, d]);
2250
+ const Q = (I) => {
2251
+ C(I), ne(!1);
2252
+ }, J = () => {
2253
+ const I = /* @__PURE__ */ new Date(), F = new Date(I.getFullYear(), I.getMonth(), I.getDate(), 0, 0, 0);
2254
+ Q(F);
2255
+ }, j = () => {
2256
+ _ || (ne(!1), E && E());
2257
+ }, ae = () => {
2258
+ if (_) return;
2259
+ const I = !q;
2260
+ ne(I), I && $ ? $() : E && E();
2261
+ }, oe = () => {
2262
+ if (!_) {
1077
2263
  if (L) return L();
1078
- M(null);
2264
+ C(null);
1079
2265
  }
1080
- }, oe = jr("form-control-label block font-normal text-sm text-foreground mb-1", {
1081
- "text-danger": ue
2266
+ }, le = Gt("form-control-label block font-normal text-sm text-foreground mb-1", {
2267
+ "text-danger": M
1082
2268
  });
1083
- return /* @__PURE__ */ a.jsx(
1084
- rr,
2269
+ return /* @__PURE__ */ o.jsx(
2270
+ Dt,
1085
2271
  {
1086
- isOpen: B,
2272
+ isOpen: q,
1087
2273
  containerStyle: {
1088
2274
  zIndex: "100"
1089
2275
  },
1090
- content: /* @__PURE__ */ a.jsxs(
1091
- Ke,
2276
+ content: /* @__PURE__ */ o.jsxs(
2277
+ Ea,
1092
2278
  {
1093
- color: s,
1094
- showcalendar: B.toString(),
1095
- widthcalendar: V.current,
2279
+ color: i,
2280
+ showcalendar: q.toString(),
2281
+ widthcalendar: N.current,
1096
2282
  className: "shadow-medium bg-content1 rounded-md",
1097
2283
  children: [
1098
- y ? (
2284
+ s ? (
1099
2285
  /* <Loading size="sm" color="secondary" /> */
1100
- /* @__PURE__ */ a.jsx("p", { children: "loading" })
2286
+ /* @__PURE__ */ o.jsx("p", { children: "loading" })
1101
2287
  ) : null,
1102
- /* @__PURE__ */ a.jsxs("div", { className: "w-full relative flex flex-col gap-2", children: [
1103
- /* @__PURE__ */ a.jsx(
1104
- He,
2288
+ /* @__PURE__ */ o.jsxs("div", { className: "w-full relative flex flex-col gap-2", children: [
2289
+ /* @__PURE__ */ o.jsx(
2290
+ ta,
1105
2291
  {
1106
2292
  value: r,
1107
2293
  onChange: Q,
1108
- locale: m,
1109
- showDoubleView: t,
2294
+ locale: f,
2295
+ showDoubleView: n,
1110
2296
  calendarType: "gregory",
1111
2297
  minDate: c,
1112
- maxDate: u,
1113
- tileDisabled: P,
1114
- selectRange: H === "date-range-picker",
1115
- returnValue: H === "date-range-picker" ? "range" : "start",
1116
- prevLabel: /* @__PURE__ */ a.jsx(Ir, { className: "w-4 h-5" }),
1117
- nextLabel: /* @__PURE__ */ a.jsx(Nr, { className: "w-4 h-5" }),
1118
- tileContent: de
2298
+ maxDate: l,
2299
+ tileDisabled: B,
2300
+ selectRange: ee === "date-range-picker",
2301
+ returnValue: ee === "date-range-picker" ? "range" : "start",
2302
+ prevLabel: /* @__PURE__ */ o.jsx(Bt, { className: "w-4 h-5" }),
2303
+ nextLabel: /* @__PURE__ */ o.jsx(Ht, { className: "w-4 h-5" }),
2304
+ tileContent: _e
1119
2305
  }
1120
2306
  ),
1121
- /* @__PURE__ */ a.jsxs("div", { className: "flex items-center justify-center gap-x-4 p-3 w-full", children: [
1122
- /* @__PURE__ */ a.jsx(Ye, { onClick: X, color: s, className: "flex-1", children: "Hoy" }),
1123
- /* @__PURE__ */ a.jsx(Ye, { color: "default", variant: "bordered", className: "flex-1", onClick: () => R(!1), children: "Cerrar" })
2307
+ /* @__PURE__ */ o.jsxs("div", { className: "flex items-center justify-center gap-x-4 p-3 w-full", children: [
2308
+ /* @__PURE__ */ o.jsx(ma, { onClick: J, color: i, className: "flex-1", children: "Hoy" }),
2309
+ /* @__PURE__ */ o.jsx(ma, { color: "default", variant: "bordered", className: "flex-1", onClick: () => ne(!1), children: "Cerrar" })
1124
2310
  ] })
1125
2311
  ] })
1126
2312
  ]
@@ -1128,76 +2314,76 @@ const Re = ({ disabled: e, error: r }) => /* @__PURE__ */ a.jsx(
1128
2314
  ),
1129
2315
  positions: ["bottom", "top"],
1130
2316
  reposition: !0,
1131
- onClickOutside: S,
2317
+ onClickOutside: j,
1132
2318
  clickOutsideCapture: !0,
1133
- children: /* @__PURE__ */ a.jsxs(
1134
- Ke,
2319
+ children: /* @__PURE__ */ o.jsxs(
2320
+ Ea,
1135
2321
  {
1136
- color: s,
1137
- className: Se(l, "relative"),
1138
- onClick: ee,
1139
- showcalendar: B.toString(),
1140
- id: Z,
1141
- widthcalendar: V.current,
1142
- error: j,
1143
- size: J,
2322
+ color: i,
2323
+ className: xr(a, "relative"),
2324
+ onClick: ae,
2325
+ showcalendar: q.toString(),
2326
+ id: re,
2327
+ widthcalendar: N.current,
2328
+ error: w,
2329
+ size: Z,
1144
2330
  children: [
1145
- k && /* @__PURE__ */ a.jsxs("label", { htmlFor: N, className: oe, children: [
1146
- k,
2331
+ b && /* @__PURE__ */ o.jsxs("label", { htmlFor: S, className: le, children: [
2332
+ b,
1147
2333
  " ",
1148
- D && /* @__PURE__ */ a.jsx("span", { className: "text-danger", children: "*" })
2334
+ x && /* @__PURE__ */ o.jsx("span", { className: "text-danger", children: "*" })
1149
2335
  ] }),
1150
- H === "date-picker" ? /* @__PURE__ */ a.jsx(
1151
- ar,
2336
+ ee === "date-picker" ? /* @__PURE__ */ o.jsx(
2337
+ Eo,
1152
2338
  {
1153
- id: N,
2339
+ id: S,
1154
2340
  value: r,
1155
- onChange: M,
1156
- calendarIcon: /* @__PURE__ */ a.jsx(Re, { disabled: v, error: j }),
2341
+ onChange: C,
2342
+ calendarIcon: /* @__PURE__ */ o.jsx(La, { disabled: _, error: w }),
1157
2343
  shouldOpenCalendar: () => !1,
1158
- className: Se("w-full h-input-default", o),
1159
- format: b,
1160
- locale: m,
2344
+ className: xr("w-full h-input-default", t),
2345
+ format: v,
2346
+ locale: f,
1161
2347
  showLeadingZeros: !0,
1162
- clearIcon: /* @__PURE__ */ a.jsx(Ze, { disabled: v, error: j, onClick: W }),
2348
+ clearIcon: /* @__PURE__ */ o.jsx(Pa, { disabled: _, error: w, onClick: oe }),
1163
2349
  minDate: c,
1164
- maxDate: u,
1165
- disabled: v,
1166
- onInvalidChange: O,
2350
+ maxDate: l,
2351
+ disabled: _,
2352
+ onInvalidChange: z,
1167
2353
  isOpen: !1,
1168
- onKeyDown: G,
1169
- onKeyUp: z,
1170
- onBlur: K,
2354
+ onKeyDown: P,
2355
+ onKeyUp: K,
2356
+ onBlur: Y,
1171
2357
  dayPlaceholder: "DD",
1172
2358
  monthPlaceholder: "MM",
1173
2359
  yearPlaceholder: "YYYY"
1174
2360
  }
1175
- ) : /* @__PURE__ */ a.jsx(
1176
- oa,
2361
+ ) : /* @__PURE__ */ o.jsx(
2362
+ Mo,
1177
2363
  {
1178
- id: N,
2364
+ id: S,
1179
2365
  value: r,
1180
- onChange: M,
1181
- calendarIcon: /* @__PURE__ */ a.jsx(Re, { disabled: v, error: j }),
2366
+ onChange: C,
2367
+ calendarIcon: /* @__PURE__ */ o.jsx(La, { disabled: _, error: w }),
1182
2368
  shouldOpenCalendar: () => !1,
1183
- className: Se("w-full", o),
1184
- format: b,
1185
- locale: m,
2369
+ className: xr("w-full", t),
2370
+ format: v,
2371
+ locale: f,
1186
2372
  showLeadingZeros: !0,
1187
- clearIcon: /* @__PURE__ */ a.jsx(Ze, { disabled: v, error: j, onClick: W }),
2373
+ clearIcon: /* @__PURE__ */ o.jsx(Pa, { disabled: _, error: w, onClick: oe }),
1188
2374
  minDate: c,
1189
- maxDate: u,
1190
- disabled: v,
1191
- onInvalidChange: O,
2375
+ maxDate: l,
2376
+ disabled: _,
2377
+ onInvalidChange: z,
1192
2378
  isOpen: !1,
1193
- onKeyDown: G,
1194
- onKeyUp: z,
2379
+ onKeyDown: P,
2380
+ onKeyUp: K,
1195
2381
  dayPlaceholder: "DD",
1196
2382
  monthPlaceholder: "MM",
1197
2383
  yearPlaceholder: "YYYY"
1198
2384
  }
1199
2385
  ),
1200
- !v && j ? /* @__PURE__ */ a.jsx(Er, { text: j }) : null
2386
+ !_ && w ? /* @__PURE__ */ o.jsx(Rt, { text: w }) : null
1201
2387
  ]
1202
2388
  }
1203
2389
  )
@@ -1205,6 +2391,6 @@ const Re = ({ disabled: e, error: r }) => /* @__PURE__ */ a.jsx(
1205
2391
  );
1206
2392
  };
1207
2393
  export {
1208
- xa as CalendarPicker
2394
+ Jo as CalendarPicker
1209
2395
  };
1210
2396
  //# sourceMappingURL=index.es.js.map