@enya-learning/nova 0.4.3 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. package/README.md +8 -19
  2. package/dist/chunks/dist-fahbq1psobj0ox6s.js +1327 -0
  3. package/dist/chunks/dist-fahbq1psobj0ox6s.js.map +1 -0
  4. package/dist/chunks/dist-o8x0ip0z71xkr2oh.js +37 -0
  5. package/dist/chunks/dist-o8x0ip0z71xkr2oh.js.map +1 -0
  6. package/dist/components/accordion.js +62 -0
  7. package/dist/components/accordion.js.map +1 -0
  8. package/dist/components/alert-dialog.js +108 -0
  9. package/dist/components/alert-dialog.js.map +1 -0
  10. package/dist/components/alert.js +49 -0
  11. package/dist/components/alert.js.map +1 -0
  12. package/dist/components/aspect-ratio.js +16 -0
  13. package/dist/components/aspect-ratio.js.map +1 -0
  14. package/dist/components/avatar.js +58 -0
  15. package/dist/components/avatar.js.map +1 -0
  16. package/dist/components/badge.js +33 -0
  17. package/dist/components/badge.js.map +1 -0
  18. package/dist/components/box.js +16 -0
  19. package/dist/components/box.js.map +1 -0
  20. package/dist/components/breadcrumb.js +85 -0
  21. package/dist/components/breadcrumb.js.map +1 -0
  22. package/dist/components/button-group.js +47 -0
  23. package/dist/components/button-group.js.map +1 -0
  24. package/dist/components/button.js +48 -3
  25. package/dist/components/button.js.map +1 -0
  26. package/dist/components/calendar.js +3004 -0
  27. package/dist/components/calendar.js.map +1 -0
  28. package/dist/components/card.js +65 -0
  29. package/dist/components/card.js.map +1 -0
  30. package/dist/components/carousel.js +1198 -0
  31. package/dist/components/carousel.js.map +1 -0
  32. package/dist/components/chart.js +10596 -0
  33. package/dist/components/chart.js.map +1 -0
  34. package/dist/components/checkbox.js +23 -0
  35. package/dist/components/checkbox.js.map +1 -0
  36. package/dist/components/collapsible.js +28 -0
  37. package/dist/components/collapsible.js.map +1 -0
  38. package/dist/components/combobox.js +192 -0
  39. package/dist/components/combobox.js.map +1 -0
  40. package/dist/components/command.js +663 -0
  41. package/dist/components/command.js.map +1 -0
  42. package/dist/components/context-menu.js +153 -0
  43. package/dist/components/context-menu.js.map +1 -0
  44. package/dist/components/dialog.js +104 -0
  45. package/dist/components/dialog.js.map +1 -0
  46. package/dist/components/direction.js +6 -0
  47. package/dist/components/drawer.js +1042 -0
  48. package/dist/components/drawer.js.map +1 -0
  49. package/dist/components/dropdown-menu.js +157 -0
  50. package/dist/components/dropdown-menu.js.map +1 -0
  51. package/dist/components/empty.js +67 -0
  52. package/dist/components/empty.js.map +1 -0
  53. package/dist/components/enya-logo.js +42 -42
  54. package/dist/components/enya-logo.js.map +1 -1
  55. package/dist/components/field.js +119 -0
  56. package/dist/components/field.js.map +1 -0
  57. package/dist/components/heading.js +39 -0
  58. package/dist/components/heading.js.map +1 -0
  59. package/dist/components/hover-card.js +40 -0
  60. package/dist/components/hover-card.js.map +1 -0
  61. package/dist/components/input-group.js +85 -0
  62. package/dist/components/input-group.js.map +1 -0
  63. package/dist/components/input-otp.js +417 -0
  64. package/dist/components/input-otp.js.map +1 -0
  65. package/dist/components/input.js +18 -0
  66. package/dist/components/input.js.map +1 -0
  67. package/dist/components/item.js +133 -0
  68. package/dist/components/item.js.map +1 -0
  69. package/dist/components/kbd.js +23 -0
  70. package/dist/components/kbd.js.map +1 -0
  71. package/dist/components/label.js +16 -0
  72. package/dist/components/label.js.map +1 -0
  73. package/dist/components/menubar.js +154 -0
  74. package/dist/components/menubar.js.map +1 -0
  75. package/dist/components/native-select.js +45 -0
  76. package/dist/components/native-select.js.map +1 -0
  77. package/dist/components/navigation-menu.js +95 -0
  78. package/dist/components/navigation-menu.js.map +1 -0
  79. package/dist/components/pagination.js +98 -0
  80. package/dist/components/pagination.js.map +1 -0
  81. package/dist/components/popover.js +62 -0
  82. package/dist/components/popover.js.map +1 -0
  83. package/dist/components/progress.js +50 -0
  84. package/dist/components/progress.js.map +1 -0
  85. package/dist/components/radio-group.js +30 -0
  86. package/dist/components/radio-group.js.map +1 -0
  87. package/dist/components/resizable.js +1562 -0
  88. package/dist/components/resizable.js.map +1 -0
  89. package/dist/components/scroll-area.js +40 -0
  90. package/dist/components/scroll-area.js.map +1 -0
  91. package/dist/components/select.js +116 -0
  92. package/dist/components/select.js.map +1 -0
  93. package/dist/components/separator.js +17 -0
  94. package/dist/components/separator.js.map +1 -0
  95. package/dist/components/sheet.js +99 -0
  96. package/dist/components/sheet.js.map +1 -0
  97. package/dist/components/sidebar.js +399 -0
  98. package/dist/components/sidebar.js.map +1 -0
  99. package/dist/components/skeleton.js +15 -0
  100. package/dist/components/skeleton.js.map +1 -0
  101. package/dist/components/slider.js +36 -0
  102. package/dist/components/slider.js.map +1 -0
  103. package/dist/components/sonner.js +738 -0
  104. package/dist/components/sonner.js.map +1 -0
  105. package/dist/components/spinner.js +19 -0
  106. package/dist/components/spinner.js.map +1 -0
  107. package/dist/components/switch.js +21 -0
  108. package/dist/components/switch.js.map +1 -0
  109. package/dist/components/table.js +76 -0
  110. package/dist/components/table.js.map +1 -0
  111. package/dist/components/tabs.js +51 -0
  112. package/dist/components/tabs.js.map +1 -0
  113. package/dist/components/text.js +47 -0
  114. package/dist/components/text.js.map +1 -0
  115. package/dist/components/textarea.js +16 -0
  116. package/dist/components/textarea.js.map +1 -0
  117. package/dist/components/toggle-group.js +55 -0
  118. package/dist/components/toggle-group.js.map +1 -0
  119. package/dist/components/toggle.js +39 -0
  120. package/dist/components/toggle.js.map +1 -0
  121. package/dist/components/tooltip.js +46 -0
  122. package/dist/components/tooltip.js.map +1 -0
  123. package/dist/index.js +25 -23241
  124. package/dist/src/components/badge/badge.d.ts +1 -1
  125. package/dist/src/components/box/box.d.ts +7 -0
  126. package/dist/src/components/box/index.d.ts +1 -0
  127. package/dist/src/components/button/button.d.ts +1 -1
  128. package/dist/src/components/heading/heading.d.ts +15 -0
  129. package/dist/src/components/heading/index.d.ts +1 -0
  130. package/dist/src/components/item/item.d.ts +1 -1
  131. package/dist/src/components/spinner/spinner.d.ts +2 -1
  132. package/dist/src/components/tabs/tabs.d.ts +1 -1
  133. package/dist/src/components/text/index.d.ts +1 -0
  134. package/dist/src/components/text/text.d.ts +13 -0
  135. package/dist/src/index.d.ts +4 -53
  136. package/dist/styles/nova-binding.css +355 -255
  137. package/dist/styles/nova.css +205 -38
  138. package/dist/styles/typography.css +22 -130
  139. package/package.json +31 -10
  140. package/src/eslint/no-primitive-colors.js +2 -2
  141. package/src/eslint/no-primitive-colors.test.ts +97 -0
  142. package/dist/chunks/button-kvgr8g13fe959ju0.js +0 -81
  143. package/dist/chunks/button-kvgr8g13fe959ju0.js.map +0 -1
  144. package/dist/index.js.map +0 -1
  145. package/dist/styles/globals.css +0 -77
  146. package/dist/styles/theme-nova.css +0 -201
@@ -0,0 +1,3004 @@
1
+ "use client";
2
+ import { n as Je } from "../chunks/rolldown-runtime-fifbipqm1abz4ydz.js";
3
+ import { t as Y } from "../chunks/utils-kyb5nny4y41y7hd8.js";
4
+ import { Button as En, buttonVariants as ht } from "./button.js";
5
+ import { jsx as te } from "react/jsx-runtime";
6
+ import { HugeiconsIcon as $e } from "@hugeicons/react";
7
+ import { ChevronDownIcon as Fn, ChevronLeftIcon as Bn, ChevronRightIcon as In } from "@hugeicons/core-free-icons";
8
+ import * as mt from "react";
9
+ import m, { createContext as Hn, useCallback as G, useContext as An, useEffect as qn, useLayoutEffect as zn, useMemo as xe, useRef as Te, useState as Ke } from "react";
10
+ function jn(e, t, n = "long") {
11
+ return new Intl.DateTimeFormat("en-US", {
12
+ hour: "numeric",
13
+ timeZone: e,
14
+ timeZoneName: n
15
+ }).format(t).split(/\s/g).slice(2).join(" ");
16
+ }
17
+ var Gn = {}, ge = {};
18
+ function ne(e, t) {
19
+ try {
20
+ const n = (Gn[e] ||= new Intl.DateTimeFormat("en-US", {
21
+ timeZone: e,
22
+ timeZoneName: "longOffset"
23
+ }).format)(t).split("GMT")[1];
24
+ return n in ge ? ge[n] : yt(n, n.split(":"));
25
+ } catch {
26
+ if (e in ge) return ge[e];
27
+ const n = e?.match($n);
28
+ return n ? yt(e, n.slice(1)) : NaN;
29
+ }
30
+ }
31
+ var $n = /([+-]\d\d):?(\d\d)?/;
32
+ function yt(e, t) {
33
+ const n = +(t[0] || 0), r = +(t[1] || 0), o = +(t[2] || 0) / 60;
34
+ return ge[e] = n * 60 + r > 0 ? n * 60 + r + o : n * 60 - r - o;
35
+ }
36
+ var ve = class be extends Date {
37
+ constructor(...t) {
38
+ super(), t.length > 1 && typeof t[t.length - 1] == "string" && (this.timeZone = t.pop()), this.internal = /* @__PURE__ */ new Date(), isNaN(ne(this.timeZone, this)) ? this.setTime(NaN) : t.length ? typeof t[0] == "number" && (t.length === 1 || t.length === 2 && typeof t[1] != "number") ? this.setTime(t[0]) : typeof t[0] == "string" ? this.setTime(+new Date(t[0])) : t[0] instanceof Date ? this.setTime(+t[0]) : (this.setTime(+new Date(...t)), xt(this, t)) : this.setTime(Date.now());
39
+ }
40
+ static tz(t, ...n) {
41
+ return n.length ? new be(...n, t) : new be(Date.now(), t);
42
+ }
43
+ withTimeZone(t) {
44
+ return new be(+this, t);
45
+ }
46
+ getTimezoneOffset() {
47
+ const t = -ne(this.timeZone, this);
48
+ return t > 0 ? Math.floor(t) : Math.ceil(t);
49
+ }
50
+ setTime(t) {
51
+ return Date.prototype.setTime.apply(this, arguments), Ye(this), +this;
52
+ }
53
+ [/* @__PURE__ */ Symbol.for("constructDateFrom")](t) {
54
+ return new be(+new Date(t), this.timeZone);
55
+ }
56
+ }, gt = /^(get|set)(?!UTC)/;
57
+ Object.getOwnPropertyNames(Date.prototype).forEach((e) => {
58
+ if (!gt.test(e)) return;
59
+ const t = e.replace(gt, "$1UTC");
60
+ ve.prototype[t] && (e.startsWith("get") ? ve.prototype[e] = function() {
61
+ return this.internal[t]();
62
+ } : (ve.prototype[e] = function() {
63
+ return Date.prototype[t].apply(this.internal, arguments), Rn(this), +this;
64
+ }, ve.prototype[t] = function() {
65
+ return Date.prototype[t].apply(this, arguments), Ye(this), +this;
66
+ }));
67
+ });
68
+ function Ye(e) {
69
+ e.internal.setTime(+e), e.internal.setUTCSeconds(e.internal.getUTCSeconds() - Math.round(-ne(e.timeZone, e) * 60));
70
+ }
71
+ function Rn(e) {
72
+ Date.prototype.setFullYear.call(e, e.internal.getUTCFullYear(), e.internal.getUTCMonth(), e.internal.getUTCDate()), Date.prototype.setHours.call(e, e.internal.getUTCHours(), e.internal.getUTCMinutes(), e.internal.getUTCSeconds(), e.internal.getUTCMilliseconds()), xt(e);
73
+ }
74
+ function xt(e, t) {
75
+ const n = Array.isArray(t) ? Zn(t) : +e.internal, r = ne(e.timeZone, e), o = r > 0 ? Math.floor(r) : Math.ceil(r), a = /* @__PURE__ */ new Date(+e);
76
+ a.setUTCHours(a.getUTCHours() - 1);
77
+ const s = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset(), i = -(/* @__PURE__ */ new Date(+a)).getTimezoneOffset(), u = s - i;
78
+ let l = s;
79
+ if (u && s !== o && Date.prototype.getHours.apply(e) !== (Array.isArray(t) ? t[3] || 0 : e.internal.getUTCHours())) {
80
+ const x = /* @__PURE__ */ new Date(+e), T = s - o;
81
+ T && x.setUTCMinutes(x.getUTCMinutes() + T);
82
+ const F = ne(e.timeZone, x);
83
+ (F > 0 ? Math.floor(F) : Math.ceil(F)) === o && (l = i);
84
+ }
85
+ const d = l - o;
86
+ d && Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + d);
87
+ const c = /* @__PURE__ */ new Date(+e);
88
+ c.setUTCSeconds(0);
89
+ const w = s > 0 ? c.getSeconds() : (c.getSeconds() - 60) % 60, g = Math.round(-(ne(e.timeZone, e) * 60)) % 60;
90
+ (g || w) && Date.prototype.setUTCSeconds.call(e, Date.prototype.getUTCSeconds.call(e) + g + w);
91
+ const M = ne(e.timeZone, e), C = M > 0 ? Math.floor(M) : Math.ceil(M), D = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset() - C, E = C !== o, b = D - d, v = C - o, y = n - C * 60 * 1e3, O = v > 0 && vt(e) - n === v * 60 * 1e3 && vt(e, y) !== n;
92
+ if (E && b && !O) {
93
+ Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + b);
94
+ const x = ne(e.timeZone, e), T = C - (x > 0 ? Math.floor(x) : Math.ceil(x));
95
+ T && b < 0 && Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + T);
96
+ }
97
+ Ye(e);
98
+ const f = (t ? n : n + g * 1e3) - +e.internal;
99
+ f && Math.abs(f) < 1800 * 1e3 && (Date.prototype.setTime.call(e, +e + f), Ye(e));
100
+ }
101
+ function Zn(e) {
102
+ return Date.UTC(e[0], e.length > 1 ? e[1] : 0, e.length > 2 ? e[2] : 1, ...e.slice(3));
103
+ }
104
+ function vt(e, t) {
105
+ const n = new Date(t ?? +e);
106
+ return n.setUTCSeconds(n.getUTCSeconds() - Math.round(-ne(e.timeZone, n) * 60)), +n;
107
+ }
108
+ var $ = class we extends ve {
109
+ static tz(t, ...n) {
110
+ return n.length ? new we(...n, t) : new we(Date.now(), t);
111
+ }
112
+ toISOString() {
113
+ const [t, n, r] = this.tzComponents(), o = `${t}${n}:${r}`;
114
+ return this.internal.toISOString().slice(0, -1) + o;
115
+ }
116
+ toString() {
117
+ return `${this.toDateString()} ${this.toTimeString()}`;
118
+ }
119
+ toDateString() {
120
+ const [t, n, r, o] = this.internal.toUTCString().split(" ");
121
+ return `${t?.slice(0, -1)} ${r} ${n} ${o}`;
122
+ }
123
+ toTimeString() {
124
+ const t = this.internal.toUTCString().split(" ")[4], [n, r, o] = this.tzComponents();
125
+ return `${t} GMT${n}${r}${o} (${jn(this.timeZone, this)})`;
126
+ }
127
+ toLocaleString(t, n) {
128
+ return Date.prototype.toLocaleString.call(this, t, {
129
+ ...n,
130
+ timeZone: n?.timeZone || this.timeZone
131
+ });
132
+ }
133
+ toLocaleDateString(t, n) {
134
+ return Date.prototype.toLocaleDateString.call(this, t, {
135
+ ...n,
136
+ timeZone: n?.timeZone || this.timeZone
137
+ });
138
+ }
139
+ toLocaleTimeString(t, n) {
140
+ return Date.prototype.toLocaleTimeString.call(this, t, {
141
+ ...n,
142
+ timeZone: n?.timeZone || this.timeZone
143
+ });
144
+ }
145
+ tzComponents() {
146
+ const t = this.getTimezoneOffset();
147
+ return [
148
+ t > 0 ? "-" : "+",
149
+ String(Math.floor(Math.abs(t) / 60)).padStart(2, "0"),
150
+ String(Math.abs(t) % 60).padStart(2, "0")
151
+ ];
152
+ }
153
+ withTimeZone(t) {
154
+ return new we(+this, t);
155
+ }
156
+ [/* @__PURE__ */ Symbol.for("constructDateFrom")](t) {
157
+ return new we(+new Date(t), this.timeZone);
158
+ }
159
+ }, Un = 365.2425, Qn = Math.pow(10, 8) * 24 * 60 * 60 * 1e3, Qa = -Qn, Tt = 6048e5, Vn = 864e5, Kn = 3600, Yt = Kn * 24, Va = Yt * 7, Xn = Yt * Un, Jn = Xn / 12, Ka = Jn * 3, bt = /* @__PURE__ */ Symbol.for("constructDateFrom");
160
+ function H(e, t) {
161
+ return typeof e == "function" ? e(t) : e && typeof e == "object" && bt in e ? e[bt](t) : e instanceof Date ? new e.constructor(t) : new Date(t);
162
+ }
163
+ function P(e, t) {
164
+ return H(t || e, e);
165
+ }
166
+ function _t(e, t, n) {
167
+ const r = P(e, n?.in);
168
+ return isNaN(t) ? H(n?.in || e, NaN) : (t && r.setDate(r.getDate() + t), r);
169
+ }
170
+ function Pt(e, t, n) {
171
+ const r = P(e, n?.in);
172
+ if (isNaN(t)) return H(n?.in || e, NaN);
173
+ if (!t) return r;
174
+ const o = r.getDate(), a = H(n?.in || e, r.getTime());
175
+ return a.setMonth(r.getMonth() + t + 1, 0), o >= a.getDate() ? a : (r.setFullYear(a.getFullYear(), a.getMonth(), o), r);
176
+ }
177
+ var Ln = {};
178
+ function ke() {
179
+ return Ln;
180
+ }
181
+ function de(e, t) {
182
+ const n = ke(), r = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, o = P(e, t?.in), a = o.getDay(), s = (a < r ? 7 : 0) + a - r;
183
+ return o.setDate(o.getDate() - s), o.setHours(0, 0, 0, 0), o;
184
+ }
185
+ function De(e, t) {
186
+ return de(e, {
187
+ ...t,
188
+ weekStartsOn: 1
189
+ });
190
+ }
191
+ function Et(e, t) {
192
+ const n = P(e, t?.in), r = n.getFullYear(), o = H(n, 0);
193
+ o.setFullYear(r + 1, 0, 4), o.setHours(0, 0, 0, 0);
194
+ const a = De(o), s = H(n, 0);
195
+ s.setFullYear(r, 0, 4), s.setHours(0, 0, 0, 0);
196
+ const i = De(s);
197
+ return n.getTime() >= a.getTime() ? r + 1 : n.getTime() >= i.getTime() ? r : r - 1;
198
+ }
199
+ function wt(e) {
200
+ const t = P(e), n = new Date(Date.UTC(t.getFullYear(), t.getMonth(), t.getDate(), t.getHours(), t.getMinutes(), t.getSeconds(), t.getMilliseconds()));
201
+ return n.setUTCFullYear(t.getFullYear()), +e - +n;
202
+ }
203
+ function fe(e, ...t) {
204
+ const n = H.bind(null, e || t.find((r) => typeof r == "object"));
205
+ return t.map(n);
206
+ }
207
+ function Me(e, t) {
208
+ const n = P(e, t?.in);
209
+ return n.setHours(0, 0, 0, 0), n;
210
+ }
211
+ function Le(e, t, n) {
212
+ const [r, o] = fe(n?.in, e, t), a = Me(r), s = Me(o), i = +a - wt(a), u = +s - wt(s);
213
+ return Math.round((i - u) / Vn);
214
+ }
215
+ function er(e, t) {
216
+ const n = Et(e, t), r = H(t?.in || e, 0);
217
+ return r.setFullYear(n, 0, 4), r.setHours(0, 0, 0, 0), De(r);
218
+ }
219
+ function tr(e, t, n) {
220
+ return _t(e, t * 7, n);
221
+ }
222
+ function nr(e, t, n) {
223
+ return Pt(e, t * 12, n);
224
+ }
225
+ function rr(e, t) {
226
+ let n, r = t?.in;
227
+ return e.forEach((o) => {
228
+ !r && typeof o == "object" && (r = H.bind(null, o));
229
+ const a = P(o, r);
230
+ (!n || n < a || isNaN(+a)) && (n = a);
231
+ }), H(r, n || NaN);
232
+ }
233
+ function or(e, t) {
234
+ let n, r = t?.in;
235
+ return e.forEach((o) => {
236
+ !r && typeof o == "object" && (r = H.bind(null, o));
237
+ const a = P(o, r);
238
+ (!n || n > a || isNaN(+a)) && (n = a);
239
+ }), H(r, n || NaN);
240
+ }
241
+ function ar(e, t, n) {
242
+ const [r, o] = fe(n?.in, e, t);
243
+ return +Me(r) == +Me(o);
244
+ }
245
+ function Ft(e) {
246
+ return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]";
247
+ }
248
+ function sr(e) {
249
+ return !(!Ft(e) && typeof e != "number" || isNaN(+P(e)));
250
+ }
251
+ function Bt(e, t, n) {
252
+ const [r, o] = fe(n?.in, e, t), a = r.getFullYear() - o.getFullYear(), s = r.getMonth() - o.getMonth();
253
+ return a * 12 + s;
254
+ }
255
+ function ir(e, t) {
256
+ const n = P(e, t?.in), r = n.getMonth();
257
+ return n.setFullYear(n.getFullYear(), r + 1, 0), n.setHours(23, 59, 59, 999), n;
258
+ }
259
+ function It(e, t) {
260
+ const [n, r] = fe(e, t.start, t.end);
261
+ return {
262
+ start: n,
263
+ end: r
264
+ };
265
+ }
266
+ function ur(e, t) {
267
+ const { start: n, end: r } = It(t?.in, e);
268
+ let o = +n > +r;
269
+ const a = o ? +n : +r, s = o ? r : n;
270
+ s.setHours(0, 0, 0, 0), s.setDate(1);
271
+ let i = t?.step ?? 1;
272
+ if (!i) return [];
273
+ i < 0 && (i = -i, o = !o);
274
+ const u = [];
275
+ for (; +s <= a; )
276
+ u.push(H(n, s)), s.setMonth(s.getMonth() + i);
277
+ return o ? u.reverse() : u;
278
+ }
279
+ function lr(e, t) {
280
+ const n = P(e, t?.in);
281
+ return n.setDate(1), n.setHours(0, 0, 0, 0), n;
282
+ }
283
+ function cr(e, t) {
284
+ const n = P(e, t?.in), r = n.getFullYear();
285
+ return n.setFullYear(r + 1, 0, 0), n.setHours(23, 59, 59, 999), n;
286
+ }
287
+ function Ht(e, t) {
288
+ const n = P(e, t?.in);
289
+ return n.setFullYear(n.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
290
+ }
291
+ function dr(e, t) {
292
+ const { start: n, end: r } = It(t?.in, e);
293
+ let o = +n > +r;
294
+ const a = o ? +n : +r, s = o ? r : n;
295
+ s.setHours(0, 0, 0, 0), s.setMonth(0, 1);
296
+ let i = t?.step ?? 1;
297
+ if (!i) return [];
298
+ i < 0 && (i = -i, o = !o);
299
+ const u = [];
300
+ for (; +s <= a; )
301
+ u.push(H(n, s)), s.setFullYear(s.getFullYear() + i);
302
+ return o ? u.reverse() : u;
303
+ }
304
+ function At(e, t) {
305
+ const n = ke(), r = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, o = P(e, t?.in), a = o.getDay(), s = (a < r ? -7 : 0) + 6 - (a - r);
306
+ return o.setDate(o.getDate() + s), o.setHours(23, 59, 59, 999), o;
307
+ }
308
+ function fr(e, t) {
309
+ return At(e, {
310
+ ...t,
311
+ weekStartsOn: 1
312
+ });
313
+ }
314
+ var hr = {
315
+ lessThanXSeconds: {
316
+ one: "less than a second",
317
+ other: "less than {{count}} seconds"
318
+ },
319
+ xSeconds: {
320
+ one: "1 second",
321
+ other: "{{count}} seconds"
322
+ },
323
+ halfAMinute: "half a minute",
324
+ lessThanXMinutes: {
325
+ one: "less than a minute",
326
+ other: "less than {{count}} minutes"
327
+ },
328
+ xMinutes: {
329
+ one: "1 minute",
330
+ other: "{{count}} minutes"
331
+ },
332
+ aboutXHours: {
333
+ one: "about 1 hour",
334
+ other: "about {{count}} hours"
335
+ },
336
+ xHours: {
337
+ one: "1 hour",
338
+ other: "{{count}} hours"
339
+ },
340
+ xDays: {
341
+ one: "1 day",
342
+ other: "{{count}} days"
343
+ },
344
+ aboutXWeeks: {
345
+ one: "about 1 week",
346
+ other: "about {{count}} weeks"
347
+ },
348
+ xWeeks: {
349
+ one: "1 week",
350
+ other: "{{count}} weeks"
351
+ },
352
+ aboutXMonths: {
353
+ one: "about 1 month",
354
+ other: "about {{count}} months"
355
+ },
356
+ xMonths: {
357
+ one: "1 month",
358
+ other: "{{count}} months"
359
+ },
360
+ aboutXYears: {
361
+ one: "about 1 year",
362
+ other: "about {{count}} years"
363
+ },
364
+ xYears: {
365
+ one: "1 year",
366
+ other: "{{count}} years"
367
+ },
368
+ overXYears: {
369
+ one: "over 1 year",
370
+ other: "over {{count}} years"
371
+ },
372
+ almostXYears: {
373
+ one: "almost 1 year",
374
+ other: "almost {{count}} years"
375
+ }
376
+ }, mr = (e, t, n) => {
377
+ let r;
378
+ const o = hr[e];
379
+ return typeof o == "string" ? r = o : t === 1 ? r = o.one : r = o.other.replace("{{count}}", t.toString()), n?.addSuffix ? n.comparison && n.comparison > 0 ? "in " + r : r + " ago" : r;
380
+ };
381
+ function Re(e) {
382
+ return (t = {}) => {
383
+ const n = t.width ? String(t.width) : e.defaultWidth;
384
+ return e.formats[n] || e.formats[e.defaultWidth];
385
+ };
386
+ }
387
+ var yr = {
388
+ full: "EEEE, MMMM do, y",
389
+ long: "MMMM do, y",
390
+ medium: "MMM d, y",
391
+ short: "MM/dd/yyyy"
392
+ }, gr = {
393
+ full: "h:mm:ss a zzzz",
394
+ long: "h:mm:ss a z",
395
+ medium: "h:mm:ss a",
396
+ short: "h:mm a"
397
+ }, vr = {
398
+ full: "{{date}} 'at' {{time}}",
399
+ long: "{{date}} 'at' {{time}}",
400
+ medium: "{{date}}, {{time}}",
401
+ short: "{{date}}, {{time}}"
402
+ }, br = {
403
+ date: Re({
404
+ formats: yr,
405
+ defaultWidth: "full"
406
+ }),
407
+ time: Re({
408
+ formats: gr,
409
+ defaultWidth: "full"
410
+ }),
411
+ dateTime: Re({
412
+ formats: vr,
413
+ defaultWidth: "full"
414
+ })
415
+ }, wr = {
416
+ lastWeek: "'last' eeee 'at' p",
417
+ yesterday: "'yesterday at' p",
418
+ today: "'today at' p",
419
+ tomorrow: "'tomorrow at' p",
420
+ nextWeek: "eeee 'at' p",
421
+ other: "P"
422
+ }, pr = (e, t, n, r) => wr[e];
423
+ function me(e) {
424
+ return (t, n) => {
425
+ const r = n?.context ? String(n.context) : "standalone";
426
+ let o;
427
+ if (r === "formatting" && e.formattingValues) {
428
+ const s = e.defaultFormattingWidth || e.defaultWidth, i = n?.width ? String(n.width) : s;
429
+ o = e.formattingValues[i] || e.formattingValues[s];
430
+ } else {
431
+ const s = e.defaultWidth, i = n?.width ? String(n.width) : e.defaultWidth;
432
+ o = e.values[i] || e.values[s];
433
+ }
434
+ const a = e.argumentCallback ? e.argumentCallback(t) : t;
435
+ return o[a];
436
+ };
437
+ }
438
+ var Dr = {
439
+ narrow: ["B", "A"],
440
+ abbreviated: ["BC", "AD"],
441
+ wide: ["Before Christ", "Anno Domini"]
442
+ }, Mr = {
443
+ narrow: [
444
+ "1",
445
+ "2",
446
+ "3",
447
+ "4"
448
+ ],
449
+ abbreviated: [
450
+ "Q1",
451
+ "Q2",
452
+ "Q3",
453
+ "Q4"
454
+ ],
455
+ wide: [
456
+ "1st quarter",
457
+ "2nd quarter",
458
+ "3rd quarter",
459
+ "4th quarter"
460
+ ]
461
+ }, kr = {
462
+ narrow: [
463
+ "J",
464
+ "F",
465
+ "M",
466
+ "A",
467
+ "M",
468
+ "J",
469
+ "J",
470
+ "A",
471
+ "S",
472
+ "O",
473
+ "N",
474
+ "D"
475
+ ],
476
+ abbreviated: [
477
+ "Jan",
478
+ "Feb",
479
+ "Mar",
480
+ "Apr",
481
+ "May",
482
+ "Jun",
483
+ "Jul",
484
+ "Aug",
485
+ "Sep",
486
+ "Oct",
487
+ "Nov",
488
+ "Dec"
489
+ ],
490
+ wide: [
491
+ "January",
492
+ "February",
493
+ "March",
494
+ "April",
495
+ "May",
496
+ "June",
497
+ "July",
498
+ "August",
499
+ "September",
500
+ "October",
501
+ "November",
502
+ "December"
503
+ ]
504
+ }, Or = {
505
+ narrow: [
506
+ "S",
507
+ "M",
508
+ "T",
509
+ "W",
510
+ "T",
511
+ "F",
512
+ "S"
513
+ ],
514
+ short: [
515
+ "Su",
516
+ "Mo",
517
+ "Tu",
518
+ "We",
519
+ "Th",
520
+ "Fr",
521
+ "Sa"
522
+ ],
523
+ abbreviated: [
524
+ "Sun",
525
+ "Mon",
526
+ "Tue",
527
+ "Wed",
528
+ "Thu",
529
+ "Fri",
530
+ "Sat"
531
+ ],
532
+ wide: [
533
+ "Sunday",
534
+ "Monday",
535
+ "Tuesday",
536
+ "Wednesday",
537
+ "Thursday",
538
+ "Friday",
539
+ "Saturday"
540
+ ]
541
+ }, Wr = {
542
+ narrow: {
543
+ am: "a",
544
+ pm: "p",
545
+ midnight: "mi",
546
+ noon: "n",
547
+ morning: "morning",
548
+ afternoon: "afternoon",
549
+ evening: "evening",
550
+ night: "night"
551
+ },
552
+ abbreviated: {
553
+ am: "AM",
554
+ pm: "PM",
555
+ midnight: "midnight",
556
+ noon: "noon",
557
+ morning: "morning",
558
+ afternoon: "afternoon",
559
+ evening: "evening",
560
+ night: "night"
561
+ },
562
+ wide: {
563
+ am: "a.m.",
564
+ pm: "p.m.",
565
+ midnight: "midnight",
566
+ noon: "noon",
567
+ morning: "morning",
568
+ afternoon: "afternoon",
569
+ evening: "evening",
570
+ night: "night"
571
+ }
572
+ }, Sr = {
573
+ narrow: {
574
+ am: "a",
575
+ pm: "p",
576
+ midnight: "mi",
577
+ noon: "n",
578
+ morning: "in the morning",
579
+ afternoon: "in the afternoon",
580
+ evening: "in the evening",
581
+ night: "at night"
582
+ },
583
+ abbreviated: {
584
+ am: "AM",
585
+ pm: "PM",
586
+ midnight: "midnight",
587
+ noon: "noon",
588
+ morning: "in the morning",
589
+ afternoon: "in the afternoon",
590
+ evening: "in the evening",
591
+ night: "at night"
592
+ },
593
+ wide: {
594
+ am: "a.m.",
595
+ pm: "p.m.",
596
+ midnight: "midnight",
597
+ noon: "noon",
598
+ morning: "in the morning",
599
+ afternoon: "in the afternoon",
600
+ evening: "in the evening",
601
+ night: "at night"
602
+ }
603
+ }, Nr = (e, t) => {
604
+ const n = Number(e), r = n % 100;
605
+ if (r > 20 || r < 10) switch (r % 10) {
606
+ case 1:
607
+ return n + "st";
608
+ case 2:
609
+ return n + "nd";
610
+ case 3:
611
+ return n + "rd";
612
+ }
613
+ return n + "th";
614
+ }, Cr = {
615
+ ordinalNumber: Nr,
616
+ era: me({
617
+ values: Dr,
618
+ defaultWidth: "wide"
619
+ }),
620
+ quarter: me({
621
+ values: Mr,
622
+ defaultWidth: "wide",
623
+ argumentCallback: (e) => e - 1
624
+ }),
625
+ month: me({
626
+ values: kr,
627
+ defaultWidth: "wide"
628
+ }),
629
+ day: me({
630
+ values: Or,
631
+ defaultWidth: "wide"
632
+ }),
633
+ dayPeriod: me({
634
+ values: Wr,
635
+ defaultWidth: "wide",
636
+ formattingValues: Sr,
637
+ defaultFormattingWidth: "wide"
638
+ })
639
+ };
640
+ function ye(e) {
641
+ return (t, n = {}) => {
642
+ const r = n.width, o = r && e.matchPatterns[r] || e.matchPatterns[e.defaultMatchWidth], a = t.match(o);
643
+ if (!a) return null;
644
+ const s = a[0], i = r && e.parsePatterns[r] || e.parsePatterns[e.defaultParseWidth], u = Array.isArray(i) ? Tr(i, (c) => c.test(s)) : xr(i, (c) => c.test(s));
645
+ let l;
646
+ l = e.valueCallback ? e.valueCallback(u) : u, l = n.valueCallback ? n.valueCallback(l) : l;
647
+ const d = t.slice(s.length);
648
+ return {
649
+ value: l,
650
+ rest: d
651
+ };
652
+ };
653
+ }
654
+ function xr(e, t) {
655
+ for (const n in e) if (Object.prototype.hasOwnProperty.call(e, n) && t(e[n])) return n;
656
+ }
657
+ function Tr(e, t) {
658
+ for (let n = 0; n < e.length; n++) if (t(e[n])) return n;
659
+ }
660
+ function Yr(e) {
661
+ return (t, n = {}) => {
662
+ const r = t.match(e.matchPattern);
663
+ if (!r) return null;
664
+ const o = r[0], a = t.match(e.parsePattern);
665
+ if (!a) return null;
666
+ let s = e.valueCallback ? e.valueCallback(a[0]) : a[0];
667
+ s = n.valueCallback ? n.valueCallback(s) : s;
668
+ const i = t.slice(o.length);
669
+ return {
670
+ value: s,
671
+ rest: i
672
+ };
673
+ };
674
+ }
675
+ var _r = /^(\d+)(th|st|nd|rd)?/i, Pr = /\d+/i, Er = {
676
+ narrow: /^(b|a)/i,
677
+ abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
678
+ wide: /^(before christ|before common era|anno domini|common era)/i
679
+ }, Fr = { any: [/^b/i, /^(a|c)/i] }, Br = {
680
+ narrow: /^[1234]/i,
681
+ abbreviated: /^q[1234]/i,
682
+ wide: /^[1234](th|st|nd|rd)? quarter/i
683
+ }, Ir = { any: [
684
+ /1/i,
685
+ /2/i,
686
+ /3/i,
687
+ /4/i
688
+ ] }, Hr = {
689
+ narrow: /^[jfmasond]/i,
690
+ abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
691
+ wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
692
+ }, Ar = {
693
+ narrow: [
694
+ /^j/i,
695
+ /^f/i,
696
+ /^m/i,
697
+ /^a/i,
698
+ /^m/i,
699
+ /^j/i,
700
+ /^j/i,
701
+ /^a/i,
702
+ /^s/i,
703
+ /^o/i,
704
+ /^n/i,
705
+ /^d/i
706
+ ],
707
+ any: [
708
+ /^ja/i,
709
+ /^f/i,
710
+ /^mar/i,
711
+ /^ap/i,
712
+ /^may/i,
713
+ /^jun/i,
714
+ /^jul/i,
715
+ /^au/i,
716
+ /^s/i,
717
+ /^o/i,
718
+ /^n/i,
719
+ /^d/i
720
+ ]
721
+ }, qr = {
722
+ narrow: /^[smtwf]/i,
723
+ short: /^(su|mo|tu|we|th|fr|sa)/i,
724
+ abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
725
+ wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
726
+ }, zr = {
727
+ narrow: [
728
+ /^s/i,
729
+ /^m/i,
730
+ /^t/i,
731
+ /^w/i,
732
+ /^t/i,
733
+ /^f/i,
734
+ /^s/i
735
+ ],
736
+ any: [
737
+ /^su/i,
738
+ /^m/i,
739
+ /^tu/i,
740
+ /^w/i,
741
+ /^th/i,
742
+ /^f/i,
743
+ /^sa/i
744
+ ]
745
+ }, jr = {
746
+ narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
747
+ any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
748
+ }, Gr = { any: {
749
+ am: /^a/i,
750
+ pm: /^p/i,
751
+ midnight: /^mi/i,
752
+ noon: /^no/i,
753
+ morning: /morning/i,
754
+ afternoon: /afternoon/i,
755
+ evening: /evening/i,
756
+ night: /night/i
757
+ } }, $r = {
758
+ ordinalNumber: Yr({
759
+ matchPattern: _r,
760
+ parsePattern: Pr,
761
+ valueCallback: (e) => parseInt(e, 10)
762
+ }),
763
+ era: ye({
764
+ matchPatterns: Er,
765
+ defaultMatchWidth: "wide",
766
+ parsePatterns: Fr,
767
+ defaultParseWidth: "any"
768
+ }),
769
+ quarter: ye({
770
+ matchPatterns: Br,
771
+ defaultMatchWidth: "wide",
772
+ parsePatterns: Ir,
773
+ defaultParseWidth: "any",
774
+ valueCallback: (e) => e + 1
775
+ }),
776
+ month: ye({
777
+ matchPatterns: Hr,
778
+ defaultMatchWidth: "wide",
779
+ parsePatterns: Ar,
780
+ defaultParseWidth: "any"
781
+ }),
782
+ day: ye({
783
+ matchPatterns: qr,
784
+ defaultMatchWidth: "wide",
785
+ parsePatterns: zr,
786
+ defaultParseWidth: "any"
787
+ }),
788
+ dayPeriod: ye({
789
+ matchPatterns: jr,
790
+ defaultMatchWidth: "any",
791
+ parsePatterns: Gr,
792
+ defaultParseWidth: "any"
793
+ })
794
+ }, ce = {
795
+ code: "en-US",
796
+ formatDistance: mr,
797
+ formatLong: br,
798
+ formatRelative: pr,
799
+ localize: Cr,
800
+ match: $r,
801
+ options: {
802
+ weekStartsOn: 0,
803
+ firstWeekContainsDate: 1
804
+ }
805
+ };
806
+ function Rr(e, t) {
807
+ const n = P(e, t?.in);
808
+ return Le(n, Ht(n)) + 1;
809
+ }
810
+ function et(e, t) {
811
+ const n = P(e, t?.in), r = +De(n) - +er(n);
812
+ return Math.round(r / Tt) + 1;
813
+ }
814
+ function qt(e, t) {
815
+ const n = P(e, t?.in), r = n.getFullYear(), o = ke(), a = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? o.firstWeekContainsDate ?? o.locale?.options?.firstWeekContainsDate ?? 1, s = H(t?.in || e, 0);
816
+ s.setFullYear(r + 1, 0, a), s.setHours(0, 0, 0, 0);
817
+ const i = de(s, t), u = H(t?.in || e, 0);
818
+ u.setFullYear(r, 0, a), u.setHours(0, 0, 0, 0);
819
+ const l = de(u, t);
820
+ return +n >= +i ? r + 1 : +n >= +l ? r : r - 1;
821
+ }
822
+ function Zr(e, t) {
823
+ const n = ke(), r = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, o = qt(e, t), a = H(t?.in || e, 0);
824
+ return a.setFullYear(o, 0, r), a.setHours(0, 0, 0, 0), de(a, t);
825
+ }
826
+ function tt(e, t) {
827
+ const n = P(e, t?.in), r = +de(n, t) - +Zr(n, t);
828
+ return Math.round(r / Tt) + 1;
829
+ }
830
+ function _(e, t) {
831
+ return (e < 0 ? "-" : "") + Math.abs(e).toString().padStart(t, "0");
832
+ }
833
+ var ae = {
834
+ y(e, t) {
835
+ const n = e.getFullYear(), r = n > 0 ? n : 1 - n;
836
+ return _(t === "yy" ? r % 100 : r, t.length);
837
+ },
838
+ M(e, t) {
839
+ const n = e.getMonth();
840
+ return t === "M" ? String(n + 1) : _(n + 1, 2);
841
+ },
842
+ d(e, t) {
843
+ return _(e.getDate(), t.length);
844
+ },
845
+ a(e, t) {
846
+ const n = e.getHours() / 12 >= 1 ? "pm" : "am";
847
+ switch (t) {
848
+ case "a":
849
+ case "aa":
850
+ return n.toUpperCase();
851
+ case "aaa":
852
+ return n;
853
+ case "aaaaa":
854
+ return n[0];
855
+ default:
856
+ return n === "am" ? "a.m." : "p.m.";
857
+ }
858
+ },
859
+ h(e, t) {
860
+ return _(e.getHours() % 12 || 12, t.length);
861
+ },
862
+ H(e, t) {
863
+ return _(e.getHours(), t.length);
864
+ },
865
+ m(e, t) {
866
+ return _(e.getMinutes(), t.length);
867
+ },
868
+ s(e, t) {
869
+ return _(e.getSeconds(), t.length);
870
+ },
871
+ S(e, t) {
872
+ const n = t.length, r = e.getMilliseconds();
873
+ return _(Math.trunc(r * Math.pow(10, n - 3)), t.length);
874
+ }
875
+ }, ue = {
876
+ am: "am",
877
+ pm: "pm",
878
+ midnight: "midnight",
879
+ noon: "noon",
880
+ morning: "morning",
881
+ afternoon: "afternoon",
882
+ evening: "evening",
883
+ night: "night"
884
+ }, pt = {
885
+ G: function(e, t, n) {
886
+ const r = e.getFullYear() > 0 ? 1 : 0;
887
+ switch (t) {
888
+ case "G":
889
+ case "GG":
890
+ case "GGG":
891
+ return n.era(r, { width: "abbreviated" });
892
+ case "GGGGG":
893
+ return n.era(r, { width: "narrow" });
894
+ default:
895
+ return n.era(r, { width: "wide" });
896
+ }
897
+ },
898
+ y: function(e, t, n) {
899
+ if (t === "yo") {
900
+ const r = e.getFullYear(), o = r > 0 ? r : 1 - r;
901
+ return n.ordinalNumber(o, { unit: "year" });
902
+ }
903
+ return ae.y(e, t);
904
+ },
905
+ Y: function(e, t, n, r) {
906
+ const o = qt(e, r), a = o > 0 ? o : 1 - o;
907
+ return t === "YY" ? _(a % 100, 2) : t === "Yo" ? n.ordinalNumber(a, { unit: "year" }) : _(a, t.length);
908
+ },
909
+ R: function(e, t) {
910
+ return _(Et(e), t.length);
911
+ },
912
+ u: function(e, t) {
913
+ return _(e.getFullYear(), t.length);
914
+ },
915
+ Q: function(e, t, n) {
916
+ const r = Math.ceil((e.getMonth() + 1) / 3);
917
+ switch (t) {
918
+ case "Q":
919
+ return String(r);
920
+ case "QQ":
921
+ return _(r, 2);
922
+ case "Qo":
923
+ return n.ordinalNumber(r, { unit: "quarter" });
924
+ case "QQQ":
925
+ return n.quarter(r, {
926
+ width: "abbreviated",
927
+ context: "formatting"
928
+ });
929
+ case "QQQQQ":
930
+ return n.quarter(r, {
931
+ width: "narrow",
932
+ context: "formatting"
933
+ });
934
+ default:
935
+ return n.quarter(r, {
936
+ width: "wide",
937
+ context: "formatting"
938
+ });
939
+ }
940
+ },
941
+ q: function(e, t, n) {
942
+ const r = Math.ceil((e.getMonth() + 1) / 3);
943
+ switch (t) {
944
+ case "q":
945
+ return String(r);
946
+ case "qq":
947
+ return _(r, 2);
948
+ case "qo":
949
+ return n.ordinalNumber(r, { unit: "quarter" });
950
+ case "qqq":
951
+ return n.quarter(r, {
952
+ width: "abbreviated",
953
+ context: "standalone"
954
+ });
955
+ case "qqqqq":
956
+ return n.quarter(r, {
957
+ width: "narrow",
958
+ context: "standalone"
959
+ });
960
+ default:
961
+ return n.quarter(r, {
962
+ width: "wide",
963
+ context: "standalone"
964
+ });
965
+ }
966
+ },
967
+ M: function(e, t, n) {
968
+ const r = e.getMonth();
969
+ switch (t) {
970
+ case "M":
971
+ case "MM":
972
+ return ae.M(e, t);
973
+ case "Mo":
974
+ return n.ordinalNumber(r + 1, { unit: "month" });
975
+ case "MMM":
976
+ return n.month(r, {
977
+ width: "abbreviated",
978
+ context: "formatting"
979
+ });
980
+ case "MMMMM":
981
+ return n.month(r, {
982
+ width: "narrow",
983
+ context: "formatting"
984
+ });
985
+ default:
986
+ return n.month(r, {
987
+ width: "wide",
988
+ context: "formatting"
989
+ });
990
+ }
991
+ },
992
+ L: function(e, t, n) {
993
+ const r = e.getMonth();
994
+ switch (t) {
995
+ case "L":
996
+ return String(r + 1);
997
+ case "LL":
998
+ return _(r + 1, 2);
999
+ case "Lo":
1000
+ return n.ordinalNumber(r + 1, { unit: "month" });
1001
+ case "LLL":
1002
+ return n.month(r, {
1003
+ width: "abbreviated",
1004
+ context: "standalone"
1005
+ });
1006
+ case "LLLLL":
1007
+ return n.month(r, {
1008
+ width: "narrow",
1009
+ context: "standalone"
1010
+ });
1011
+ default:
1012
+ return n.month(r, {
1013
+ width: "wide",
1014
+ context: "standalone"
1015
+ });
1016
+ }
1017
+ },
1018
+ w: function(e, t, n, r) {
1019
+ const o = tt(e, r);
1020
+ return t === "wo" ? n.ordinalNumber(o, { unit: "week" }) : _(o, t.length);
1021
+ },
1022
+ I: function(e, t, n) {
1023
+ const r = et(e);
1024
+ return t === "Io" ? n.ordinalNumber(r, { unit: "week" }) : _(r, t.length);
1025
+ },
1026
+ d: function(e, t, n) {
1027
+ return t === "do" ? n.ordinalNumber(e.getDate(), { unit: "date" }) : ae.d(e, t);
1028
+ },
1029
+ D: function(e, t, n) {
1030
+ const r = Rr(e);
1031
+ return t === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) : _(r, t.length);
1032
+ },
1033
+ E: function(e, t, n) {
1034
+ const r = e.getDay();
1035
+ switch (t) {
1036
+ case "E":
1037
+ case "EE":
1038
+ case "EEE":
1039
+ return n.day(r, {
1040
+ width: "abbreviated",
1041
+ context: "formatting"
1042
+ });
1043
+ case "EEEEE":
1044
+ return n.day(r, {
1045
+ width: "narrow",
1046
+ context: "formatting"
1047
+ });
1048
+ case "EEEEEE":
1049
+ return n.day(r, {
1050
+ width: "short",
1051
+ context: "formatting"
1052
+ });
1053
+ default:
1054
+ return n.day(r, {
1055
+ width: "wide",
1056
+ context: "formatting"
1057
+ });
1058
+ }
1059
+ },
1060
+ e: function(e, t, n, r) {
1061
+ const o = e.getDay(), a = (o - r.weekStartsOn + 8) % 7 || 7;
1062
+ switch (t) {
1063
+ case "e":
1064
+ return String(a);
1065
+ case "ee":
1066
+ return _(a, 2);
1067
+ case "eo":
1068
+ return n.ordinalNumber(a, { unit: "day" });
1069
+ case "eee":
1070
+ return n.day(o, {
1071
+ width: "abbreviated",
1072
+ context: "formatting"
1073
+ });
1074
+ case "eeeee":
1075
+ return n.day(o, {
1076
+ width: "narrow",
1077
+ context: "formatting"
1078
+ });
1079
+ case "eeeeee":
1080
+ return n.day(o, {
1081
+ width: "short",
1082
+ context: "formatting"
1083
+ });
1084
+ default:
1085
+ return n.day(o, {
1086
+ width: "wide",
1087
+ context: "formatting"
1088
+ });
1089
+ }
1090
+ },
1091
+ c: function(e, t, n, r) {
1092
+ const o = e.getDay(), a = (o - r.weekStartsOn + 8) % 7 || 7;
1093
+ switch (t) {
1094
+ case "c":
1095
+ return String(a);
1096
+ case "cc":
1097
+ return _(a, t.length);
1098
+ case "co":
1099
+ return n.ordinalNumber(a, { unit: "day" });
1100
+ case "ccc":
1101
+ return n.day(o, {
1102
+ width: "abbreviated",
1103
+ context: "standalone"
1104
+ });
1105
+ case "ccccc":
1106
+ return n.day(o, {
1107
+ width: "narrow",
1108
+ context: "standalone"
1109
+ });
1110
+ case "cccccc":
1111
+ return n.day(o, {
1112
+ width: "short",
1113
+ context: "standalone"
1114
+ });
1115
+ default:
1116
+ return n.day(o, {
1117
+ width: "wide",
1118
+ context: "standalone"
1119
+ });
1120
+ }
1121
+ },
1122
+ i: function(e, t, n) {
1123
+ const r = e.getDay(), o = r === 0 ? 7 : r;
1124
+ switch (t) {
1125
+ case "i":
1126
+ return String(o);
1127
+ case "ii":
1128
+ return _(o, t.length);
1129
+ case "io":
1130
+ return n.ordinalNumber(o, { unit: "day" });
1131
+ case "iii":
1132
+ return n.day(r, {
1133
+ width: "abbreviated",
1134
+ context: "formatting"
1135
+ });
1136
+ case "iiiii":
1137
+ return n.day(r, {
1138
+ width: "narrow",
1139
+ context: "formatting"
1140
+ });
1141
+ case "iiiiii":
1142
+ return n.day(r, {
1143
+ width: "short",
1144
+ context: "formatting"
1145
+ });
1146
+ default:
1147
+ return n.day(r, {
1148
+ width: "wide",
1149
+ context: "formatting"
1150
+ });
1151
+ }
1152
+ },
1153
+ a: function(e, t, n) {
1154
+ const r = e.getHours() / 12 >= 1 ? "pm" : "am";
1155
+ switch (t) {
1156
+ case "a":
1157
+ case "aa":
1158
+ return n.dayPeriod(r, {
1159
+ width: "abbreviated",
1160
+ context: "formatting"
1161
+ });
1162
+ case "aaa":
1163
+ return n.dayPeriod(r, {
1164
+ width: "abbreviated",
1165
+ context: "formatting"
1166
+ }).toLowerCase();
1167
+ case "aaaaa":
1168
+ return n.dayPeriod(r, {
1169
+ width: "narrow",
1170
+ context: "formatting"
1171
+ });
1172
+ default:
1173
+ return n.dayPeriod(r, {
1174
+ width: "wide",
1175
+ context: "formatting"
1176
+ });
1177
+ }
1178
+ },
1179
+ b: function(e, t, n) {
1180
+ const r = e.getHours();
1181
+ let o;
1182
+ switch (r === 12 ? o = ue.noon : r === 0 ? o = ue.midnight : o = r / 12 >= 1 ? "pm" : "am", t) {
1183
+ case "b":
1184
+ case "bb":
1185
+ return n.dayPeriod(o, {
1186
+ width: "abbreviated",
1187
+ context: "formatting"
1188
+ });
1189
+ case "bbb":
1190
+ return n.dayPeriod(o, {
1191
+ width: "abbreviated",
1192
+ context: "formatting"
1193
+ }).toLowerCase();
1194
+ case "bbbbb":
1195
+ return n.dayPeriod(o, {
1196
+ width: "narrow",
1197
+ context: "formatting"
1198
+ });
1199
+ default:
1200
+ return n.dayPeriod(o, {
1201
+ width: "wide",
1202
+ context: "formatting"
1203
+ });
1204
+ }
1205
+ },
1206
+ B: function(e, t, n) {
1207
+ const r = e.getHours();
1208
+ let o;
1209
+ switch (r >= 17 ? o = ue.evening : r >= 12 ? o = ue.afternoon : r >= 4 ? o = ue.morning : o = ue.night, t) {
1210
+ case "B":
1211
+ case "BB":
1212
+ case "BBB":
1213
+ return n.dayPeriod(o, {
1214
+ width: "abbreviated",
1215
+ context: "formatting"
1216
+ });
1217
+ case "BBBBB":
1218
+ return n.dayPeriod(o, {
1219
+ width: "narrow",
1220
+ context: "formatting"
1221
+ });
1222
+ default:
1223
+ return n.dayPeriod(o, {
1224
+ width: "wide",
1225
+ context: "formatting"
1226
+ });
1227
+ }
1228
+ },
1229
+ h: function(e, t, n) {
1230
+ if (t === "ho") {
1231
+ let r = e.getHours() % 12;
1232
+ return r === 0 && (r = 12), n.ordinalNumber(r, { unit: "hour" });
1233
+ }
1234
+ return ae.h(e, t);
1235
+ },
1236
+ H: function(e, t, n) {
1237
+ return t === "Ho" ? n.ordinalNumber(e.getHours(), { unit: "hour" }) : ae.H(e, t);
1238
+ },
1239
+ K: function(e, t, n) {
1240
+ const r = e.getHours() % 12;
1241
+ return t === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) : _(r, t.length);
1242
+ },
1243
+ k: function(e, t, n) {
1244
+ let r = e.getHours();
1245
+ return r === 0 && (r = 24), t === "ko" ? n.ordinalNumber(r, { unit: "hour" }) : _(r, t.length);
1246
+ },
1247
+ m: function(e, t, n) {
1248
+ return t === "mo" ? n.ordinalNumber(e.getMinutes(), { unit: "minute" }) : ae.m(e, t);
1249
+ },
1250
+ s: function(e, t, n) {
1251
+ return t === "so" ? n.ordinalNumber(e.getSeconds(), { unit: "second" }) : ae.s(e, t);
1252
+ },
1253
+ S: function(e, t) {
1254
+ return ae.S(e, t);
1255
+ },
1256
+ X: function(e, t, n) {
1257
+ const r = e.getTimezoneOffset();
1258
+ if (r === 0) return "Z";
1259
+ switch (t) {
1260
+ case "X":
1261
+ return Mt(r);
1262
+ case "XXXX":
1263
+ case "XX":
1264
+ return ie(r);
1265
+ default:
1266
+ return ie(r, ":");
1267
+ }
1268
+ },
1269
+ x: function(e, t, n) {
1270
+ const r = e.getTimezoneOffset();
1271
+ switch (t) {
1272
+ case "x":
1273
+ return Mt(r);
1274
+ case "xxxx":
1275
+ case "xx":
1276
+ return ie(r);
1277
+ default:
1278
+ return ie(r, ":");
1279
+ }
1280
+ },
1281
+ O: function(e, t, n) {
1282
+ const r = e.getTimezoneOffset();
1283
+ switch (t) {
1284
+ case "O":
1285
+ case "OO":
1286
+ case "OOO":
1287
+ return "GMT" + Dt(r, ":");
1288
+ default:
1289
+ return "GMT" + ie(r, ":");
1290
+ }
1291
+ },
1292
+ z: function(e, t, n) {
1293
+ const r = e.getTimezoneOffset();
1294
+ switch (t) {
1295
+ case "z":
1296
+ case "zz":
1297
+ case "zzz":
1298
+ return "GMT" + Dt(r, ":");
1299
+ default:
1300
+ return "GMT" + ie(r, ":");
1301
+ }
1302
+ },
1303
+ t: function(e, t, n) {
1304
+ return _(Math.trunc(+e / 1e3), t.length);
1305
+ },
1306
+ T: function(e, t, n) {
1307
+ return _(+e, t.length);
1308
+ }
1309
+ };
1310
+ function Dt(e, t = "") {
1311
+ const n = e > 0 ? "-" : "+", r = Math.abs(e), o = Math.trunc(r / 60), a = r % 60;
1312
+ return a === 0 ? n + String(o) : n + String(o) + t + _(a, 2);
1313
+ }
1314
+ function Mt(e, t) {
1315
+ return e % 60 === 0 ? (e > 0 ? "-" : "+") + _(Math.abs(e) / 60, 2) : ie(e, t);
1316
+ }
1317
+ function ie(e, t = "") {
1318
+ const n = e > 0 ? "-" : "+", r = Math.abs(e), o = _(Math.trunc(r / 60), 2), a = _(r % 60, 2);
1319
+ return n + o + t + a;
1320
+ }
1321
+ var kt = (e, t) => {
1322
+ switch (e) {
1323
+ case "P":
1324
+ return t.date({ width: "short" });
1325
+ case "PP":
1326
+ return t.date({ width: "medium" });
1327
+ case "PPP":
1328
+ return t.date({ width: "long" });
1329
+ default:
1330
+ return t.date({ width: "full" });
1331
+ }
1332
+ }, zt = (e, t) => {
1333
+ switch (e) {
1334
+ case "p":
1335
+ return t.time({ width: "short" });
1336
+ case "pp":
1337
+ return t.time({ width: "medium" });
1338
+ case "ppp":
1339
+ return t.time({ width: "long" });
1340
+ default:
1341
+ return t.time({ width: "full" });
1342
+ }
1343
+ }, Ur = (e, t) => {
1344
+ const n = e.match(/(P+)(p+)?/) || [], r = n[1], o = n[2];
1345
+ if (!o) return kt(e, t);
1346
+ let a;
1347
+ switch (r) {
1348
+ case "P":
1349
+ a = t.dateTime({ width: "short" });
1350
+ break;
1351
+ case "PP":
1352
+ a = t.dateTime({ width: "medium" });
1353
+ break;
1354
+ case "PPP":
1355
+ a = t.dateTime({ width: "long" });
1356
+ break;
1357
+ default:
1358
+ a = t.dateTime({ width: "full" });
1359
+ break;
1360
+ }
1361
+ return a.replace("{{date}}", kt(r, t)).replace("{{time}}", zt(o, t));
1362
+ }, Qr = {
1363
+ p: zt,
1364
+ P: Ur
1365
+ }, Vr = /^D+$/, Kr = /^Y+$/, Xr = [
1366
+ "D",
1367
+ "DD",
1368
+ "YY",
1369
+ "YYYY"
1370
+ ];
1371
+ function Jr(e) {
1372
+ return Vr.test(e);
1373
+ }
1374
+ function Lr(e) {
1375
+ return Kr.test(e);
1376
+ }
1377
+ function eo(e, t, n) {
1378
+ const r = to(e, t, n);
1379
+ if (console.warn(r), Xr.includes(e)) throw new RangeError(r);
1380
+ }
1381
+ function to(e, t, n) {
1382
+ const r = e[0] === "Y" ? "years" : "days of the month";
1383
+ return `Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
1384
+ }
1385
+ var no = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, ro = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, oo = /^'([^]*?)'?$/, ao = /''/g, so = /[a-zA-Z]/;
1386
+ function pe(e, t, n) {
1387
+ const r = ke(), o = n?.locale ?? r.locale ?? ce, a = n?.firstWeekContainsDate ?? n?.locale?.options?.firstWeekContainsDate ?? r.firstWeekContainsDate ?? r.locale?.options?.firstWeekContainsDate ?? 1, s = n?.weekStartsOn ?? n?.locale?.options?.weekStartsOn ?? r.weekStartsOn ?? r.locale?.options?.weekStartsOn ?? 0, i = P(e, n?.in);
1388
+ if (!sr(i)) throw new RangeError("Invalid time value");
1389
+ let u = t.match(ro).map((d) => {
1390
+ const c = d[0];
1391
+ if (c === "p" || c === "P") {
1392
+ const w = Qr[c];
1393
+ return w(d, o.formatLong);
1394
+ }
1395
+ return d;
1396
+ }).join("").match(no).map((d) => {
1397
+ if (d === "''") return {
1398
+ isToken: !1,
1399
+ value: "'"
1400
+ };
1401
+ const c = d[0];
1402
+ if (c === "'") return {
1403
+ isToken: !1,
1404
+ value: io(d)
1405
+ };
1406
+ if (pt[c]) return {
1407
+ isToken: !0,
1408
+ value: d
1409
+ };
1410
+ if (c.match(so)) throw new RangeError("Format string contains an unescaped latin alphabet character `" + c + "`");
1411
+ return {
1412
+ isToken: !1,
1413
+ value: d
1414
+ };
1415
+ });
1416
+ o.localize.preprocessor && (u = o.localize.preprocessor(i, u));
1417
+ const l = {
1418
+ firstWeekContainsDate: a,
1419
+ weekStartsOn: s,
1420
+ locale: o
1421
+ };
1422
+ return u.map((d) => {
1423
+ if (!d.isToken) return d.value;
1424
+ const c = d.value;
1425
+ (!n?.useAdditionalWeekYearTokens && Lr(c) || !n?.useAdditionalDayOfYearTokens && Jr(c)) && eo(c, t, String(e));
1426
+ const w = pt[c[0]];
1427
+ return w(i, c, o.localize, l);
1428
+ }).join("");
1429
+ }
1430
+ function io(e) {
1431
+ const t = e.match(oo);
1432
+ return t ? t[1].replace(ao, "'") : e;
1433
+ }
1434
+ function uo(e, t) {
1435
+ const n = P(e, t?.in), r = n.getFullYear(), o = n.getMonth(), a = H(n, 0);
1436
+ return a.setFullYear(r, o + 1, 0), a.setHours(0, 0, 0, 0), a.getDate();
1437
+ }
1438
+ function lo(e, t) {
1439
+ return P(e, t?.in).getMonth();
1440
+ }
1441
+ function co(e, t) {
1442
+ return P(e, t?.in).getFullYear();
1443
+ }
1444
+ function fo(e, t) {
1445
+ return +P(e) > +P(t);
1446
+ }
1447
+ function ho(e, t) {
1448
+ return +P(e) < +P(t);
1449
+ }
1450
+ function mo(e, t, n) {
1451
+ const [r, o] = fe(n?.in, e, t);
1452
+ return r.getFullYear() === o.getFullYear() && r.getMonth() === o.getMonth();
1453
+ }
1454
+ function yo(e, t, n) {
1455
+ const [r, o] = fe(n?.in, e, t);
1456
+ return r.getFullYear() === o.getFullYear();
1457
+ }
1458
+ function go(e, t, n) {
1459
+ const r = P(e, n?.in), o = r.getFullYear(), a = r.getDate(), s = H(n?.in || e, 0);
1460
+ s.setFullYear(o, t, 15), s.setHours(0, 0, 0, 0);
1461
+ const i = uo(s);
1462
+ return r.setMonth(t, Math.min(a, i)), r;
1463
+ }
1464
+ function vo(e, t, n) {
1465
+ const r = P(e, n?.in);
1466
+ return isNaN(+r) ? H(n?.in || e, NaN) : (r.setFullYear(t), r);
1467
+ }
1468
+ var Ot = 5, bo = 4;
1469
+ function wo(e, t) {
1470
+ const n = t.startOfMonth(e), r = n.getDay() > 0 ? n.getDay() : 7, o = t.addDays(e, -r + 1), a = t.addDays(o, Ot * 7 - 1);
1471
+ return t.getMonth(e) === t.getMonth(a) ? Ot : bo;
1472
+ }
1473
+ function jt(e, t) {
1474
+ const n = t.startOfMonth(e), r = n.getDay();
1475
+ return r === 1 ? n : r === 0 ? t.addDays(n, -6) : t.addDays(n, -1 * (r - 1));
1476
+ }
1477
+ function po(e, t) {
1478
+ const n = jt(e, t), r = wo(e, t);
1479
+ return t.addDays(n, r * 7 - 1);
1480
+ }
1481
+ var Gt = {
1482
+ ...ce,
1483
+ labels: {
1484
+ labelDayButton: (e, t, n, r) => {
1485
+ let o;
1486
+ r && typeof r.format == "function" ? o = r.format.bind(r) : o = (s, i) => pe(s, i, {
1487
+ locale: ce,
1488
+ ...n
1489
+ });
1490
+ let a = o(e, "PPPP");
1491
+ return t.today && (a = `Today, ${a}`), t.selected && (a = `${a}, selected`), a;
1492
+ },
1493
+ labelMonthDropdown: "Choose the Month",
1494
+ labelNext: "Go to the Next Month",
1495
+ labelPrevious: "Go to the Previous Month",
1496
+ labelWeekNumber: (e) => `Week ${e}`,
1497
+ labelYearDropdown: "Choose the Year",
1498
+ labelGrid: (e, t, n) => {
1499
+ let r;
1500
+ return n && typeof n.format == "function" ? r = n.format.bind(n) : r = (o, a) => pe(o, a, {
1501
+ locale: ce,
1502
+ ...t
1503
+ }), r(e, "LLLL yyyy");
1504
+ },
1505
+ labelGridcell: (e, t, n, r) => {
1506
+ let o;
1507
+ r && typeof r.format == "function" ? o = r.format.bind(r) : o = (s, i) => pe(s, i, {
1508
+ locale: ce,
1509
+ ...n
1510
+ });
1511
+ let a = o(e, "PPPP");
1512
+ return t?.today && (a = `Today, ${a}`), a;
1513
+ },
1514
+ labelNav: "Navigation bar",
1515
+ labelWeekNumberHeader: "Week Number",
1516
+ labelWeekday: (e, t, n) => {
1517
+ let r;
1518
+ return n && typeof n.format == "function" ? r = n.format.bind(n) : r = (o, a) => pe(o, a, {
1519
+ locale: ce,
1520
+ ...t
1521
+ }), r(e, "cccc");
1522
+ }
1523
+ }
1524
+ }, X = class Xe {
1525
+ constructor(t, n) {
1526
+ this.today = () => this.overrides?.today ? this.overrides.today() : this.options.timeZone ? $.tz(this.options.timeZone) : new (this.options.Date ?? Date)(), this.newDate = (r, o, a) => this.overrides?.newDate ? this.overrides.newDate(r, o, a) : this.options.timeZone ? new $(r, o, a, this.options.timeZone) : new Date(r, o, a), this.addDays = (r, o) => this.overrides?.addDays ? this.overrides.addDays(r, o) : _t(r, o), this.addMonths = (r, o) => this.overrides?.addMonths ? this.overrides.addMonths(r, o) : Pt(r, o), this.addWeeks = (r, o) => this.overrides?.addWeeks ? this.overrides.addWeeks(r, o) : tr(r, o), this.addYears = (r, o) => this.overrides?.addYears ? this.overrides.addYears(r, o) : nr(r, o), this.differenceInCalendarDays = (r, o) => this.overrides?.differenceInCalendarDays ? this.overrides.differenceInCalendarDays(r, o) : Le(r, o), this.differenceInCalendarMonths = (r, o) => this.overrides?.differenceInCalendarMonths ? this.overrides.differenceInCalendarMonths(r, o) : Bt(r, o), this.eachMonthOfInterval = (r) => this.overrides?.eachMonthOfInterval ? this.overrides.eachMonthOfInterval(r) : ur(r), this.eachYearOfInterval = (r) => {
1527
+ const o = this.overrides?.eachYearOfInterval ? this.overrides.eachYearOfInterval(r) : dr(r), a = new Set(o.map((i) => this.getYear(i)));
1528
+ if (a.size === o.length) return o;
1529
+ const s = [];
1530
+ return a.forEach((i) => {
1531
+ s.push(new Date(i, 0, 1));
1532
+ }), s;
1533
+ }, this.endOfBroadcastWeek = (r) => this.overrides?.endOfBroadcastWeek ? this.overrides.endOfBroadcastWeek(r) : po(r, this), this.endOfISOWeek = (r) => this.overrides?.endOfISOWeek ? this.overrides.endOfISOWeek(r) : fr(r), this.endOfMonth = (r) => this.overrides?.endOfMonth ? this.overrides.endOfMonth(r) : ir(r), this.endOfWeek = (r, o) => this.overrides?.endOfWeek ? this.overrides.endOfWeek(r, o) : At(r, this.options), this.endOfYear = (r) => this.overrides?.endOfYear ? this.overrides.endOfYear(r) : cr(r), this.format = (r, o, a) => {
1534
+ const s = this.overrides?.format ? this.overrides.format(r, o, this.options) : pe(r, o, this.options);
1535
+ return this.options.numerals && this.options.numerals !== "latn" ? this.replaceDigits(s) : s;
1536
+ }, this.getISOWeek = (r) => this.overrides?.getISOWeek ? this.overrides.getISOWeek(r) : et(r), this.getMonth = (r, o) => this.overrides?.getMonth ? this.overrides.getMonth(r, this.options) : lo(r, this.options), this.getYear = (r, o) => this.overrides?.getYear ? this.overrides.getYear(r, this.options) : co(r, this.options), this.getWeek = (r, o) => this.overrides?.getWeek ? this.overrides.getWeek(r, this.options) : tt(r, this.options), this.isAfter = (r, o) => this.overrides?.isAfter ? this.overrides.isAfter(r, o) : fo(r, o), this.isBefore = (r, o) => this.overrides?.isBefore ? this.overrides.isBefore(r, o) : ho(r, o), this.isDate = (r) => this.overrides?.isDate ? this.overrides.isDate(r) : Ft(r), this.isSameDay = (r, o) => this.overrides?.isSameDay ? this.overrides.isSameDay(r, o) : ar(r, o), this.isSameMonth = (r, o) => this.overrides?.isSameMonth ? this.overrides.isSameMonth(r, o) : mo(r, o), this.isSameYear = (r, o) => this.overrides?.isSameYear ? this.overrides.isSameYear(r, o) : yo(r, o), this.max = (r) => this.overrides?.max ? this.overrides.max(r) : rr(r), this.min = (r) => this.overrides?.min ? this.overrides.min(r) : or(r), this.setMonth = (r, o) => this.overrides?.setMonth ? this.overrides.setMonth(r, o) : go(r, o), this.setYear = (r, o) => this.overrides?.setYear ? this.overrides.setYear(r, o) : vo(r, o), this.startOfBroadcastWeek = (r, o) => this.overrides?.startOfBroadcastWeek ? this.overrides.startOfBroadcastWeek(r, this) : jt(r, this), this.startOfDay = (r) => this.overrides?.startOfDay ? this.overrides.startOfDay(r) : Me(r), this.startOfISOWeek = (r) => this.overrides?.startOfISOWeek ? this.overrides.startOfISOWeek(r) : De(r), this.startOfMonth = (r) => this.overrides?.startOfMonth ? this.overrides.startOfMonth(r) : lr(r), this.startOfWeek = (r, o) => this.overrides?.startOfWeek ? this.overrides.startOfWeek(r, this.options) : de(r, this.options), this.startOfYear = (r) => this.overrides?.startOfYear ? this.overrides.startOfYear(r) : Ht(r), this.options = {
1537
+ locale: Gt,
1538
+ ...t
1539
+ }, this.overrides = n;
1540
+ }
1541
+ getDigitMap() {
1542
+ const { numerals: t = "latn" } = this.options, n = new Intl.NumberFormat("en-US", { numberingSystem: t }), r = {};
1543
+ for (let o = 0; o < 10; o++) r[o.toString()] = n.format(o);
1544
+ return r;
1545
+ }
1546
+ replaceDigits(t) {
1547
+ const n = this.getDigitMap();
1548
+ return t.replace(/\d/g, (r) => n[r] || r);
1549
+ }
1550
+ formatNumber(t) {
1551
+ return this.replaceDigits(t.toString());
1552
+ }
1553
+ getMonthYearOrder() {
1554
+ const t = this.options.locale?.code;
1555
+ return t && Xe.yearFirstLocales.has(t) ? "year-first" : "month-first";
1556
+ }
1557
+ formatMonthYear(t) {
1558
+ const { locale: n, timeZone: r, numerals: o } = this.options, a = n?.code;
1559
+ if (a && Xe.yearFirstLocales.has(a)) try {
1560
+ return new Intl.DateTimeFormat(a, {
1561
+ month: "long",
1562
+ year: "numeric",
1563
+ timeZone: r,
1564
+ numberingSystem: o
1565
+ }).format(t);
1566
+ } catch {
1567
+ }
1568
+ const s = this.getMonthYearOrder() === "year-first" ? "y LLLL" : "LLLL y";
1569
+ return this.format(t, s);
1570
+ }
1571
+ };
1572
+ X.yearFirstLocales = /* @__PURE__ */ new Set([
1573
+ "eu",
1574
+ "hu",
1575
+ "ja",
1576
+ "ja-Hira",
1577
+ "ja-JP",
1578
+ "ko",
1579
+ "ko-KR",
1580
+ "lt",
1581
+ "lt-LT",
1582
+ "lv",
1583
+ "lv-LV",
1584
+ "mn",
1585
+ "mn-MN",
1586
+ "zh",
1587
+ "zh-CN",
1588
+ "zh-HK",
1589
+ "zh-TW"
1590
+ ]);
1591
+ var J = new X(), $t = class {
1592
+ constructor(e, t, n = J) {
1593
+ this.date = e, this.displayMonth = t, this.outside = !!(t && !n.isSameMonth(e, t)), this.dateLib = n, this.isoDate = n.format(e, "yyyy-MM-dd"), this.displayMonthId = n.format(t, "yyyy-MM"), this.dateMonthId = n.format(e, "yyyy-MM");
1594
+ }
1595
+ isEqualTo(e) {
1596
+ return this.dateLib.isSameDay(e.date, this.date) && this.dateLib.isSameMonth(e.displayMonth, this.displayMonth);
1597
+ }
1598
+ }, Do = class {
1599
+ constructor(e, t) {
1600
+ this.date = e, this.weeks = t;
1601
+ }
1602
+ }, Mo = class {
1603
+ constructor(e, t) {
1604
+ this.days = t, this.weekNumber = e;
1605
+ }
1606
+ };
1607
+ function ko(e) {
1608
+ return m.createElement("span", { ...e });
1609
+ }
1610
+ function Oo(e) {
1611
+ const { size: t = 24, orientation: n = "left", className: r, style: o } = e;
1612
+ return m.createElement("svg", {
1613
+ className: r,
1614
+ style: o,
1615
+ width: t,
1616
+ height: t,
1617
+ viewBox: "0 0 24 24"
1618
+ }, n === "up" && m.createElement("polygon", { points: "6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28" }), n === "down" && m.createElement("polygon", { points: "6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72" }), n === "left" && m.createElement("polygon", { points: "16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20" }), n === "right" && m.createElement("polygon", { points: "8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20" }));
1619
+ }
1620
+ function Wo(e) {
1621
+ const { day: t, modifiers: n, ...r } = e;
1622
+ return m.createElement("td", { ...r });
1623
+ }
1624
+ function So(e) {
1625
+ const { day: t, modifiers: n, ...r } = e, o = m.useRef(null);
1626
+ return m.useEffect(() => {
1627
+ n.focused && o.current?.focus();
1628
+ }, [n.focused]), m.createElement("button", {
1629
+ ref: o,
1630
+ ...r
1631
+ });
1632
+ }
1633
+ var h;
1634
+ (function(e) {
1635
+ e.Root = "root", e.Chevron = "chevron", e.Day = "day", e.DayButton = "day_button", e.CaptionLabel = "caption_label", e.Dropdowns = "dropdowns", e.Dropdown = "dropdown", e.DropdownRoot = "dropdown_root", e.Footer = "footer", e.MonthGrid = "month_grid", e.MonthCaption = "month_caption", e.MonthsDropdown = "months_dropdown", e.Month = "month", e.Months = "months", e.Nav = "nav", e.NextMonthButton = "button_next", e.PreviousMonthButton = "button_previous", e.Week = "week", e.Weeks = "weeks", e.Weekday = "weekday", e.Weekdays = "weekdays", e.WeekNumber = "week_number", e.WeekNumberHeader = "week_number_header", e.YearsDropdown = "years_dropdown";
1636
+ })(h || (h = {}));
1637
+ var B;
1638
+ (function(e) {
1639
+ e.disabled = "disabled", e.hidden = "hidden", e.outside = "outside", e.focused = "focused", e.today = "today";
1640
+ })(B || (B = {}));
1641
+ var V;
1642
+ (function(e) {
1643
+ e.range_end = "range_end", e.range_middle = "range_middle", e.range_start = "range_start", e.selected = "selected";
1644
+ })(V || (V = {}));
1645
+ var z;
1646
+ (function(e) {
1647
+ e.weeks_before_enter = "weeks_before_enter", e.weeks_before_exit = "weeks_before_exit", e.weeks_after_enter = "weeks_after_enter", e.weeks_after_exit = "weeks_after_exit", e.caption_after_enter = "caption_after_enter", e.caption_after_exit = "caption_after_exit", e.caption_before_enter = "caption_before_enter", e.caption_before_exit = "caption_before_exit";
1648
+ })(z || (z = {}));
1649
+ var Rt = Hn(void 0);
1650
+ function _e() {
1651
+ const e = An(Rt);
1652
+ if (e === void 0) throw new Error("useDayPicker() must be used within a custom component.");
1653
+ return e;
1654
+ }
1655
+ function No(e) {
1656
+ const { options: t, className: n, ...r } = e, { classNames: o, components: a, styles: s } = _e(), i = [o[h.Dropdown], n].join(" "), u = t?.find(({ value: l }) => l === r.value);
1657
+ return m.createElement("span", {
1658
+ "data-disabled": r.disabled,
1659
+ className: o[h.DropdownRoot],
1660
+ style: s?.[h.DropdownRoot]
1661
+ }, m.createElement(a.Select, {
1662
+ className: i,
1663
+ ...r
1664
+ }, t?.map(({ value: l, label: d, disabled: c }) => m.createElement(a.Option, {
1665
+ key: l,
1666
+ value: l,
1667
+ disabled: c
1668
+ }, d))), m.createElement("span", {
1669
+ className: o[h.CaptionLabel],
1670
+ style: s?.[h.CaptionLabel],
1671
+ "aria-hidden": !0
1672
+ }, u?.label, m.createElement(a.Chevron, {
1673
+ orientation: "down",
1674
+ size: 18,
1675
+ className: o[h.Chevron],
1676
+ style: s?.[h.Chevron]
1677
+ })));
1678
+ }
1679
+ function Co(e) {
1680
+ return m.createElement("div", { ...e });
1681
+ }
1682
+ function xo(e) {
1683
+ return m.createElement("div", { ...e });
1684
+ }
1685
+ function To(e) {
1686
+ const { calendarMonth: t, displayIndex: n, ...r } = e;
1687
+ return m.createElement("div", { ...r }, e.children);
1688
+ }
1689
+ function Yo(e) {
1690
+ const { calendarMonth: t, displayIndex: n, ...r } = e;
1691
+ return m.createElement("div", { ...r });
1692
+ }
1693
+ function _o(e) {
1694
+ return m.createElement("table", { ...e });
1695
+ }
1696
+ function Po(e) {
1697
+ return m.createElement("div", { ...e });
1698
+ }
1699
+ function Eo(e) {
1700
+ const { components: t } = _e();
1701
+ return m.createElement(t.Dropdown, { ...e });
1702
+ }
1703
+ function Fo(e) {
1704
+ const { onPreviousClick: t, onNextClick: n, previousMonth: r, nextMonth: o, ...a } = e, { components: s, classNames: i, styles: u, labels: { labelPrevious: l, labelNext: d } } = _e(), c = G((g) => {
1705
+ o && n?.(g);
1706
+ }, [o, n]), w = G((g) => {
1707
+ r && t?.(g);
1708
+ }, [r, t]);
1709
+ return m.createElement("nav", { ...a }, m.createElement(s.PreviousMonthButton, {
1710
+ type: "button",
1711
+ className: i[h.PreviousMonthButton],
1712
+ style: u?.[h.PreviousMonthButton],
1713
+ tabIndex: r ? void 0 : -1,
1714
+ "aria-disabled": r ? void 0 : !0,
1715
+ "aria-label": l(r),
1716
+ onClick: w
1717
+ }, m.createElement(s.Chevron, {
1718
+ disabled: r ? void 0 : !0,
1719
+ className: i[h.Chevron],
1720
+ style: u?.[h.Chevron],
1721
+ orientation: "left"
1722
+ })), m.createElement(s.NextMonthButton, {
1723
+ type: "button",
1724
+ className: i[h.NextMonthButton],
1725
+ style: u?.[h.NextMonthButton],
1726
+ tabIndex: o ? void 0 : -1,
1727
+ "aria-disabled": o ? void 0 : !0,
1728
+ "aria-label": d(o),
1729
+ onClick: c
1730
+ }, m.createElement(s.Chevron, {
1731
+ disabled: o ? void 0 : !0,
1732
+ orientation: "right",
1733
+ className: i[h.Chevron],
1734
+ style: u?.[h.Chevron]
1735
+ })));
1736
+ }
1737
+ function Bo(e) {
1738
+ return m.createElement("button", { ...e });
1739
+ }
1740
+ function Io(e) {
1741
+ return m.createElement("option", { ...e });
1742
+ }
1743
+ function Ho(e) {
1744
+ return m.createElement("button", { ...e });
1745
+ }
1746
+ function Ao(e) {
1747
+ const { rootRef: t, ...n } = e;
1748
+ return m.createElement("div", {
1749
+ ...n,
1750
+ ref: t
1751
+ });
1752
+ }
1753
+ function qo(e) {
1754
+ return m.createElement("select", { ...e });
1755
+ }
1756
+ function zo(e) {
1757
+ const { week: t, ...n } = e;
1758
+ return m.createElement("tr", { ...n });
1759
+ }
1760
+ function jo(e) {
1761
+ return m.createElement("th", { ...e });
1762
+ }
1763
+ function Go(e) {
1764
+ return m.createElement("thead", { "aria-hidden": !0 }, m.createElement("tr", { ...e }));
1765
+ }
1766
+ function $o(e) {
1767
+ const { week: t, ...n } = e;
1768
+ return m.createElement("th", { ...n });
1769
+ }
1770
+ function Ro(e) {
1771
+ return m.createElement("th", { ...e });
1772
+ }
1773
+ function Zo(e) {
1774
+ return m.createElement("tbody", { ...e });
1775
+ }
1776
+ function Uo(e) {
1777
+ const { components: t } = _e();
1778
+ return m.createElement(t.Dropdown, { ...e });
1779
+ }
1780
+ var Qo = /* @__PURE__ */ Je({
1781
+ CaptionLabel: () => ko,
1782
+ Chevron: () => Oo,
1783
+ Day: () => Wo,
1784
+ DayButton: () => So,
1785
+ Dropdown: () => No,
1786
+ DropdownNav: () => Co,
1787
+ Footer: () => xo,
1788
+ Month: () => To,
1789
+ MonthCaption: () => Yo,
1790
+ MonthGrid: () => _o,
1791
+ Months: () => Po,
1792
+ MonthsDropdown: () => Eo,
1793
+ Nav: () => Fo,
1794
+ NextMonthButton: () => Bo,
1795
+ Option: () => Io,
1796
+ PreviousMonthButton: () => Ho,
1797
+ Root: () => Ao,
1798
+ Select: () => qo,
1799
+ Week: () => zo,
1800
+ WeekNumber: () => $o,
1801
+ WeekNumberHeader: () => Ro,
1802
+ Weekday: () => jo,
1803
+ Weekdays: () => Go,
1804
+ Weeks: () => Zo,
1805
+ YearsDropdown: () => Uo
1806
+ });
1807
+ function re(e, t, n = !1, r = J) {
1808
+ let { from: o, to: a } = e;
1809
+ const { differenceInCalendarDays: s, isSameDay: i } = r;
1810
+ return o && a ? (s(a, o) < 0 && ([o, a] = [a, o]), s(t, o) >= (n ? 1 : 0) && s(a, t) >= (n ? 1 : 0)) : !n && a ? i(a, t) : !n && o ? i(o, t) : !1;
1811
+ }
1812
+ function nt(e) {
1813
+ return !!(e && typeof e == "object" && "before" in e && "after" in e);
1814
+ }
1815
+ function Pe(e) {
1816
+ return !!(e && typeof e == "object" && "from" in e);
1817
+ }
1818
+ function rt(e) {
1819
+ return !!(e && typeof e == "object" && "after" in e);
1820
+ }
1821
+ function ot(e) {
1822
+ return !!(e && typeof e == "object" && "before" in e);
1823
+ }
1824
+ function Zt(e) {
1825
+ return !!(e && typeof e == "object" && "dayOfWeek" in e);
1826
+ }
1827
+ function Ut(e, t) {
1828
+ return Array.isArray(e) && e.every(t.isDate);
1829
+ }
1830
+ function oe(e, t, n = J) {
1831
+ const r = Array.isArray(t) ? t : [t], { isSameDay: o, differenceInCalendarDays: a, isAfter: s } = n;
1832
+ return r.some((i) => {
1833
+ if (typeof i == "boolean") return i;
1834
+ if (n.isDate(i)) return o(e, i);
1835
+ if (Ut(i, n)) return i.some((u) => o(e, u));
1836
+ if (Pe(i)) return re(i, e, !1, n);
1837
+ if (Zt(i))
1838
+ return Array.isArray(i.dayOfWeek) ? i.dayOfWeek.includes(e.getDay()) : i.dayOfWeek === e.getDay();
1839
+ if (nt(i)) {
1840
+ const u = a(i.before, e), l = a(i.after, e), d = u > 0, c = l < 0;
1841
+ return s(i.before, i.after) ? c && d : d || c;
1842
+ }
1843
+ return rt(i) ? a(e, i.after) > 0 : ot(i) ? a(i.before, e) > 0 : typeof i == "function" ? i(e) : !1;
1844
+ });
1845
+ }
1846
+ function Vo(e, t, n, r, o) {
1847
+ const { disabled: a, hidden: s, modifiers: i, showOutsideDays: u, broadcastCalendar: l, today: d = o.today() } = t, { isSameDay: c, isSameMonth: w, startOfMonth: g, isBefore: M, endOfMonth: C, isAfter: D } = o, E = n && g(n), b = r && C(r), v = {
1848
+ [B.focused]: [],
1849
+ [B.outside]: [],
1850
+ [B.disabled]: [],
1851
+ [B.hidden]: [],
1852
+ [B.today]: []
1853
+ }, y = {};
1854
+ for (const O of e) {
1855
+ const { date: f, displayMonth: x } = O, T = !!(x && !w(f, x)), F = !!(E && M(f, E)), j = !!(b && D(f, b)), A = !!(a && oe(f, a, o)), R = !!(s && oe(f, s, o)) || F || j || !l && !u && T || l && u === !1 && T, he = c(f, d);
1856
+ T && v.outside.push(O), A && v.disabled.push(O), R && v.hidden.push(O), he && v.today.push(O), i && Object.keys(i).forEach((se) => {
1857
+ const We = i?.[se];
1858
+ We && oe(f, We, o) && (y[se] ? y[se].push(O) : y[se] = [O]);
1859
+ });
1860
+ }
1861
+ return (O) => {
1862
+ const f = {
1863
+ [B.focused]: !1,
1864
+ [B.disabled]: !1,
1865
+ [B.hidden]: !1,
1866
+ [B.outside]: !1,
1867
+ [B.today]: !1
1868
+ }, x = {};
1869
+ for (const T in v) f[T] = v[T].some((F) => F === O);
1870
+ for (const T in y) x[T] = y[T].some((F) => F === O);
1871
+ return {
1872
+ ...f,
1873
+ ...x
1874
+ };
1875
+ };
1876
+ }
1877
+ function Ko(e, t, n = {}) {
1878
+ return Object.entries(e).filter(([, r]) => r === !0).reduce((r, [o]) => (n[o] ? r.push(n[o]) : t[B[o]] ? r.push(t[B[o]]) : t[V[o]] && r.push(t[V[o]]), r), [t[h.Day]]);
1879
+ }
1880
+ function Xo(e) {
1881
+ return {
1882
+ ...Qo,
1883
+ ...e
1884
+ };
1885
+ }
1886
+ function Jo(e) {
1887
+ const t = {
1888
+ "data-mode": e.mode ?? void 0,
1889
+ "data-required": "required" in e ? e.required : void 0,
1890
+ "data-multiple-months": e.numberOfMonths && e.numberOfMonths > 1 || void 0,
1891
+ "data-week-numbers": e.showWeekNumber || void 0,
1892
+ "data-broadcast-calendar": e.broadcastCalendar || void 0,
1893
+ "data-nav-layout": e.navLayout || void 0
1894
+ };
1895
+ return Object.entries(e).forEach(([n, r]) => {
1896
+ n.startsWith("data-") && (t[n] = r);
1897
+ }), t;
1898
+ }
1899
+ function at() {
1900
+ const e = {};
1901
+ for (const t in h) e[h[t]] = `rdp-${h[t]}`;
1902
+ for (const t in B) e[B[t]] = `rdp-${B[t]}`;
1903
+ for (const t in V) e[V[t]] = `rdp-${V[t]}`;
1904
+ for (const t in z) e[z[t]] = `rdp-${z[t]}`;
1905
+ return e;
1906
+ }
1907
+ function Lo(e, t, n) {
1908
+ return (n ?? new X(t)).formatMonthYear(e);
1909
+ }
1910
+ function ea(e, t, n) {
1911
+ return (n ?? new X(t)).format(e, "d");
1912
+ }
1913
+ function ta(e, t = J) {
1914
+ return t.format(e, "LLLL");
1915
+ }
1916
+ function na(e, t, n) {
1917
+ return (n ?? new X(t)).format(e, "cccccc");
1918
+ }
1919
+ function ra(e, t = J) {
1920
+ return e < 10 ? t.formatNumber(`0${e.toLocaleString()}`) : t.formatNumber(`${e.toLocaleString()}`);
1921
+ }
1922
+ function oa() {
1923
+ return "";
1924
+ }
1925
+ function aa(e, t = J) {
1926
+ return t.format(e, "yyyy");
1927
+ }
1928
+ var sa = /* @__PURE__ */ Je({
1929
+ formatCaption: () => Lo,
1930
+ formatDay: () => ea,
1931
+ formatMonthDropdown: () => ta,
1932
+ formatWeekNumber: () => ra,
1933
+ formatWeekNumberHeader: () => oa,
1934
+ formatWeekdayName: () => na,
1935
+ formatYearDropdown: () => aa
1936
+ });
1937
+ function ia(e) {
1938
+ return {
1939
+ ...sa,
1940
+ ...e
1941
+ };
1942
+ }
1943
+ function Qt(e, t, n, r) {
1944
+ let o = (r ?? new X(n)).format(e, "PPPP");
1945
+ return t.today && (o = `Today, ${o}`), t.selected && (o = `${o}, selected`), o;
1946
+ }
1947
+ function Vt(e, t, n) {
1948
+ return (n ?? new X(t)).formatMonthYear(e);
1949
+ }
1950
+ function Kt(e, t, n, r) {
1951
+ let o = (r ?? new X(n)).format(e, "PPPP");
1952
+ return t?.today && (o = `Today, ${o}`), o;
1953
+ }
1954
+ function Xt(e) {
1955
+ return "Choose the Month";
1956
+ }
1957
+ function Jt() {
1958
+ return "";
1959
+ }
1960
+ var ua = "Go to the Next Month";
1961
+ function Lt(e, t) {
1962
+ return ua;
1963
+ }
1964
+ function en(e) {
1965
+ return "Go to the Previous Month";
1966
+ }
1967
+ function tn(e, t, n) {
1968
+ return (n ?? new X(t)).format(e, "cccc");
1969
+ }
1970
+ function nn(e, t) {
1971
+ return `Week ${e}`;
1972
+ }
1973
+ function rn(e) {
1974
+ return "Week Number";
1975
+ }
1976
+ function on(e) {
1977
+ return "Choose the Year";
1978
+ }
1979
+ var la = /* @__PURE__ */ Je({
1980
+ labelDayButton: () => Qt,
1981
+ labelGrid: () => Vt,
1982
+ labelGridcell: () => Kt,
1983
+ labelMonthDropdown: () => Xt,
1984
+ labelNav: () => Jt,
1985
+ labelNext: () => Lt,
1986
+ labelPrevious: () => en,
1987
+ labelWeekNumber: () => nn,
1988
+ labelWeekNumberHeader: () => rn,
1989
+ labelWeekday: () => tn,
1990
+ labelYearDropdown: () => on
1991
+ }), Q = (e, t, n) => t || (n ? typeof n == "function" ? n : (...r) => n : e);
1992
+ function ca(e, t) {
1993
+ const n = t.locale?.labels ?? {};
1994
+ return {
1995
+ ...la,
1996
+ ...e ?? {},
1997
+ labelDayButton: Q(Qt, e?.labelDayButton, n.labelDayButton),
1998
+ labelMonthDropdown: Q(Xt, e?.labelMonthDropdown, n.labelMonthDropdown),
1999
+ labelNext: Q(Lt, e?.labelNext, n.labelNext),
2000
+ labelPrevious: Q(en, e?.labelPrevious, n.labelPrevious),
2001
+ labelWeekNumber: Q(nn, e?.labelWeekNumber, n.labelWeekNumber),
2002
+ labelYearDropdown: Q(on, e?.labelYearDropdown, n.labelYearDropdown),
2003
+ labelGrid: Q(Vt, e?.labelGrid, n.labelGrid),
2004
+ labelGridcell: Q(Kt, e?.labelGridcell, n.labelGridcell),
2005
+ labelNav: Q(Jt, e?.labelNav, n.labelNav),
2006
+ labelWeekNumberHeader: Q(rn, e?.labelWeekNumberHeader, n.labelWeekNumberHeader),
2007
+ labelWeekday: Q(tn, e?.labelWeekday, n.labelWeekday)
2008
+ };
2009
+ }
2010
+ function da(e, t, n, r, o) {
2011
+ const { startOfMonth: a, startOfYear: s, endOfYear: i, eachMonthOfInterval: u, getMonth: l } = o;
2012
+ return u({
2013
+ start: s(e),
2014
+ end: i(e)
2015
+ }).map((d) => {
2016
+ const c = r.formatMonthDropdown(d, o);
2017
+ return {
2018
+ value: l(d),
2019
+ label: c,
2020
+ disabled: t && d < a(t) || n && d > a(n) || !1
2021
+ };
2022
+ });
2023
+ }
2024
+ function fa(e, t = {}, n = {}) {
2025
+ let r = { ...t?.[h.Day] };
2026
+ return Object.entries(e).filter(([, o]) => o === !0).forEach(([o]) => {
2027
+ r = {
2028
+ ...r,
2029
+ ...n?.[o]
2030
+ };
2031
+ }), r;
2032
+ }
2033
+ function ha(e, t, n, r) {
2034
+ const o = r ?? e.today(), a = n ? e.startOfBroadcastWeek(o, e) : t ? e.startOfISOWeek(o) : e.startOfWeek(o), s = [];
2035
+ for (let i = 0; i < 7; i++) {
2036
+ const u = e.addDays(a, i);
2037
+ s.push(u);
2038
+ }
2039
+ return s;
2040
+ }
2041
+ function ma(e, t, n, r, o = !1) {
2042
+ if (!e || !t) return;
2043
+ const { startOfYear: a, endOfYear: s, eachYearOfInterval: i, getYear: u } = r, l = i({
2044
+ start: a(e),
2045
+ end: s(t)
2046
+ });
2047
+ return o && l.reverse(), l.map((d) => {
2048
+ const c = n.formatYearDropdown(d, r);
2049
+ return {
2050
+ value: u(d),
2051
+ label: c,
2052
+ disabled: !1
2053
+ };
2054
+ });
2055
+ }
2056
+ function ya(e, t = {}) {
2057
+ const { weekStartsOn: n, locale: r } = t, o = n ?? r?.options?.weekStartsOn ?? 0, a = (i) => {
2058
+ const u = typeof i == "number" || typeof i == "string" ? new Date(i) : i;
2059
+ return new $(u.getFullYear(), u.getMonth(), u.getDate(), 12, 0, 0, e);
2060
+ }, s = (i) => {
2061
+ const u = a(i);
2062
+ return new Date(u.getFullYear(), u.getMonth(), u.getDate(), 0, 0, 0, 0);
2063
+ };
2064
+ return {
2065
+ today: () => a($.tz(e)),
2066
+ newDate: (i, u, l) => new $(i, u, l, 12, 0, 0, e),
2067
+ startOfDay: (i) => a(i),
2068
+ startOfWeek: (i, u) => {
2069
+ const l = a(i), d = u?.weekStartsOn ?? o, c = (l.getDay() - d + 7) % 7;
2070
+ return l.setDate(l.getDate() - c), l;
2071
+ },
2072
+ startOfISOWeek: (i) => {
2073
+ const u = a(i), l = (u.getDay() - 1 + 7) % 7;
2074
+ return u.setDate(u.getDate() - l), u;
2075
+ },
2076
+ startOfMonth: (i) => {
2077
+ const u = a(i);
2078
+ return u.setDate(1), u;
2079
+ },
2080
+ startOfYear: (i) => {
2081
+ const u = a(i);
2082
+ return u.setMonth(0, 1), u;
2083
+ },
2084
+ endOfWeek: (i, u) => {
2085
+ const l = a(i), d = (((u?.weekStartsOn ?? o) + 6) % 7 - l.getDay() + 7) % 7;
2086
+ return l.setDate(l.getDate() + d), l;
2087
+ },
2088
+ endOfISOWeek: (i) => {
2089
+ const u = a(i), l = (7 - u.getDay()) % 7;
2090
+ return u.setDate(u.getDate() + l), u;
2091
+ },
2092
+ endOfMonth: (i) => {
2093
+ const u = a(i);
2094
+ return u.setMonth(u.getMonth() + 1, 0), u;
2095
+ },
2096
+ endOfYear: (i) => {
2097
+ const u = a(i);
2098
+ return u.setMonth(11, 31), u;
2099
+ },
2100
+ eachMonthOfInterval: (i) => {
2101
+ const u = a(i.start), l = a(i.end), d = [], c = new $(u.getFullYear(), u.getMonth(), 1, 12, 0, 0, e), w = l.getFullYear() * 12 + l.getMonth();
2102
+ for (; c.getFullYear() * 12 + c.getMonth() <= w; )
2103
+ d.push(new $(c, e)), c.setMonth(c.getMonth() + 1, 1);
2104
+ return d;
2105
+ },
2106
+ addDays: (i, u) => {
2107
+ const l = a(i);
2108
+ return l.setDate(l.getDate() + u), l;
2109
+ },
2110
+ addWeeks: (i, u) => {
2111
+ const l = a(i);
2112
+ return l.setDate(l.getDate() + u * 7), l;
2113
+ },
2114
+ addMonths: (i, u) => {
2115
+ const l = a(i);
2116
+ return l.setMonth(l.getMonth() + u), l;
2117
+ },
2118
+ addYears: (i, u) => {
2119
+ const l = a(i);
2120
+ return l.setFullYear(l.getFullYear() + u), l;
2121
+ },
2122
+ eachYearOfInterval: (i) => {
2123
+ const u = a(i.start), l = a(i.end), d = [], c = new $(u.getFullYear(), 0, 1, 12, 0, 0, e);
2124
+ for (; c.getFullYear() <= l.getFullYear(); )
2125
+ d.push(new $(c, e)), c.setFullYear(c.getFullYear() + 1, 0, 1);
2126
+ return d;
2127
+ },
2128
+ getWeek: (i, u) => tt(s(i), {
2129
+ weekStartsOn: u?.weekStartsOn ?? o,
2130
+ firstWeekContainsDate: u?.firstWeekContainsDate ?? r?.options?.firstWeekContainsDate ?? 1
2131
+ }),
2132
+ getISOWeek: (i) => et(s(i)),
2133
+ differenceInCalendarDays: (i, u) => Le(s(i), s(u)),
2134
+ differenceInCalendarMonths: (i, u) => Bt(s(i), s(u))
2135
+ };
2136
+ }
2137
+ var Oe = (e) => e instanceof HTMLElement ? e : null, Ze = (e) => [...e.querySelectorAll("[data-animated-month]") ?? []], ga = (e) => Oe(e.querySelector("[data-animated-month]")), Ue = (e) => Oe(e.querySelector("[data-animated-caption]")), Qe = (e) => Oe(e.querySelector("[data-animated-weeks]")), va = (e) => Oe(e.querySelector("[data-animated-nav]")), ba = (e) => Oe(e.querySelector("[data-animated-weekdays]"));
2138
+ function wa(e, t, { classNames: n, months: r, focused: o, dateLib: a }) {
2139
+ const s = Te(null), i = Te(r), u = Te(!1);
2140
+ zn(() => {
2141
+ const l = i.current;
2142
+ if (i.current = r, !t || !e.current || !(e.current instanceof HTMLElement) || r.length === 0 || l.length === 0 || r.length !== l.length) return;
2143
+ const d = a.isSameMonth(r[0].date, l[0].date), c = a.isAfter(r[0].date, l[0].date), w = c ? n[z.caption_after_enter] : n[z.caption_before_enter], g = c ? n[z.weeks_after_enter] : n[z.weeks_before_enter], M = s.current, C = e.current.cloneNode(!0);
2144
+ if (C instanceof HTMLElement ? (Ze(C).forEach((b) => {
2145
+ if (!(b instanceof HTMLElement)) return;
2146
+ const v = ga(b);
2147
+ v && b.contains(v) && b.removeChild(v);
2148
+ const y = Ue(b);
2149
+ y && y.classList.remove(w);
2150
+ const O = Qe(b);
2151
+ O && O.classList.remove(g);
2152
+ }), s.current = C) : s.current = null, u.current || d || o) return;
2153
+ const D = M instanceof HTMLElement ? Ze(M) : [], E = Ze(e.current);
2154
+ if (E?.every((b) => b instanceof HTMLElement) && D?.every((b) => b instanceof HTMLElement)) {
2155
+ u.current = !0;
2156
+ const b = [];
2157
+ e.current.style.isolation = "isolate";
2158
+ const v = va(e.current);
2159
+ v && (v.style.zIndex = "1"), E.forEach((y, O) => {
2160
+ const f = D[O];
2161
+ if (!f) return;
2162
+ y.style.position = "relative", y.style.overflow = "hidden";
2163
+ const x = Ue(y);
2164
+ x && x.classList.add(w);
2165
+ const T = Qe(y);
2166
+ T && T.classList.add(g);
2167
+ const F = () => {
2168
+ u.current = !1, e.current && (e.current.style.isolation = ""), v && (v.style.zIndex = ""), x && x.classList.remove(w), T && T.classList.remove(g), y.style.position = "", y.style.overflow = "", y.contains(f) && y.removeChild(f);
2169
+ };
2170
+ b.push(F), f.style.pointerEvents = "none", f.style.position = "absolute", f.style.overflow = "hidden", f.setAttribute("aria-hidden", "true");
2171
+ const j = ba(f);
2172
+ j && (j.style.opacity = "0");
2173
+ const A = Ue(f);
2174
+ A && (A.classList.add(c ? n[z.caption_before_exit] : n[z.caption_after_exit]), A.addEventListener("animationend", F));
2175
+ const R = Qe(f);
2176
+ R && R.classList.add(c ? n[z.weeks_before_exit] : n[z.weeks_after_exit]), y.insertBefore(f, y.firstChild);
2177
+ });
2178
+ }
2179
+ });
2180
+ }
2181
+ function pa(e, t, n, r) {
2182
+ const o = e[0], a = e[e.length - 1], { ISOWeek: s, fixedWeeks: i, broadcastCalendar: u } = n ?? {}, { addDays: l, differenceInCalendarDays: d, differenceInCalendarMonths: c, endOfBroadcastWeek: w, endOfISOWeek: g, endOfMonth: M, endOfWeek: C, isAfter: D, startOfBroadcastWeek: E, startOfISOWeek: b, startOfWeek: v } = r, y = u ? E(o, r) : s ? b(o) : v(o), O = u ? w(a) : s ? g(M(a)) : C(M(a)), f = t && (u ? w(t) : s ? g(t) : C(t)), x = d(f && D(O, f) ? f : O, y), T = c(a, o) + 1, F = [];
2183
+ for (let A = 0; A <= x; A++) {
2184
+ const R = l(y, A);
2185
+ F.push(R);
2186
+ }
2187
+ const j = (u ? 35 : 42) * T;
2188
+ if (i && F.length < j) {
2189
+ const A = j - F.length;
2190
+ for (let R = 0; R < A; R++) {
2191
+ const he = l(F[F.length - 1], 1);
2192
+ F.push(he);
2193
+ }
2194
+ }
2195
+ return F;
2196
+ }
2197
+ function Da(e) {
2198
+ const t = [];
2199
+ return e.reduce((n, r) => {
2200
+ const o = r.weeks.reduce((a, s) => a.concat(s.days.slice()), t.slice());
2201
+ return n.concat(o.slice());
2202
+ }, t.slice());
2203
+ }
2204
+ function Ma(e, t, n, r) {
2205
+ const { numberOfMonths: o = 1 } = n, a = [];
2206
+ for (let s = 0; s < o; s++) {
2207
+ const i = r.addMonths(e, s);
2208
+ if (t && i > t) break;
2209
+ a.push(i);
2210
+ }
2211
+ return a;
2212
+ }
2213
+ function Wt(e, t, n, r) {
2214
+ const { month: o, defaultMonth: a, today: s = r.today(), numberOfMonths: i = 1 } = e;
2215
+ let u = o || a || s;
2216
+ const { differenceInCalendarMonths: l, addMonths: d, startOfMonth: c } = r;
2217
+ return n && l(n, u) < i - 1 && (u = d(n, -1 * (i - 1))), t && l(u, t) < 0 && (u = t), c(u);
2218
+ }
2219
+ function ka(e, t, n, r) {
2220
+ const { addDays: o, endOfBroadcastWeek: a, endOfISOWeek: s, endOfMonth: i, endOfWeek: u, getISOWeek: l, getWeek: d, startOfBroadcastWeek: c, startOfISOWeek: w, startOfWeek: g } = r, M = e.reduce((C, D) => {
2221
+ const E = n.broadcastCalendar ? c(D, r) : n.ISOWeek ? w(D) : g(D), b = n.broadcastCalendar ? a(D) : n.ISOWeek ? s(i(D)) : u(i(D)), v = t.filter((f) => f >= E && f <= b), y = n.broadcastCalendar ? 35 : 42;
2222
+ if (n.fixedWeeks && v.length < y) {
2223
+ const f = t.filter((x) => {
2224
+ const T = y - v.length;
2225
+ return x > b && x <= o(b, T);
2226
+ });
2227
+ v.push(...f);
2228
+ }
2229
+ const O = new Do(D, v.reduce((f, x) => {
2230
+ const T = n.ISOWeek ? l(x) : d(x), F = f.find((A) => A.weekNumber === T), j = new $t(x, D, r);
2231
+ return F ? F.days.push(j) : f.push(new Mo(T, [j])), f;
2232
+ }, []));
2233
+ return C.push(O), C;
2234
+ }, []);
2235
+ return n.reverseMonths ? M.reverse() : M;
2236
+ }
2237
+ function Oa(e, t) {
2238
+ let { startMonth: n, endMonth: r } = e;
2239
+ const { startOfYear: o, startOfDay: a, startOfMonth: s, endOfMonth: i, addYears: u, endOfYear: l, today: d } = t, c = e.captionLayout === "dropdown" || e.captionLayout === "dropdown-years";
2240
+ return n ? n = s(n) : !n && c && (n = o(u(e.today ?? d(), -100))), r ? r = i(r) : !r && c && (r = l(e.today ?? d())), [n && a(n), r && a(r)];
2241
+ }
2242
+ function Wa(e, t, n, r) {
2243
+ if (n.disableNavigation) return;
2244
+ const { pagedNavigation: o, numberOfMonths: a = 1 } = n, { startOfMonth: s, addMonths: i, differenceInCalendarMonths: u } = r, l = o ? a : 1, d = s(e);
2245
+ if (!t) return i(d, l);
2246
+ if (!(u(t, e) < a))
2247
+ return i(d, l);
2248
+ }
2249
+ function Sa(e, t, n, r) {
2250
+ if (n.disableNavigation) return;
2251
+ const { pagedNavigation: o, numberOfMonths: a } = n, { startOfMonth: s, addMonths: i, differenceInCalendarMonths: u } = r, l = o ? a ?? 1 : 1, d = s(e);
2252
+ if (!t) return i(d, -l);
2253
+ if (!(u(d, t) <= 0))
2254
+ return i(d, -l);
2255
+ }
2256
+ function Na(e) {
2257
+ return e.reduce((t, n) => t.concat(n.weeks.slice()), [].slice());
2258
+ }
2259
+ function Ee(e, t) {
2260
+ const [n, r] = Ke(e);
2261
+ return [t === void 0 ? n : t, r];
2262
+ }
2263
+ function Ca(e, t) {
2264
+ const [n, r] = Oa(e, t), { startOfMonth: o, endOfMonth: a } = t, s = Wt(e, n, r, t), [i, u] = Ee(s, e.month ? s : void 0);
2265
+ qn(() => {
2266
+ u(Wt(e, n, r, t));
2267
+ }, [e.timeZone]);
2268
+ const { months: l, weeks: d, days: c, previousMonth: w, nextMonth: g } = xe(() => {
2269
+ const v = Ma(i, r, { numberOfMonths: e.numberOfMonths }, t), y = ka(v, pa(v, e.endMonth ? a(e.endMonth) : void 0, {
2270
+ ISOWeek: e.ISOWeek,
2271
+ fixedWeeks: e.fixedWeeks,
2272
+ broadcastCalendar: e.broadcastCalendar
2273
+ }, t), {
2274
+ broadcastCalendar: e.broadcastCalendar,
2275
+ fixedWeeks: e.fixedWeeks,
2276
+ ISOWeek: e.ISOWeek,
2277
+ reverseMonths: e.reverseMonths
2278
+ }, t);
2279
+ return {
2280
+ months: y,
2281
+ weeks: Na(y),
2282
+ days: Da(y),
2283
+ previousMonth: Sa(i, n, e, t),
2284
+ nextMonth: Wa(i, r, e, t)
2285
+ };
2286
+ }, [
2287
+ t,
2288
+ i.getTime(),
2289
+ r?.getTime(),
2290
+ n?.getTime(),
2291
+ e.disableNavigation,
2292
+ e.broadcastCalendar,
2293
+ e.endMonth?.getTime(),
2294
+ e.fixedWeeks,
2295
+ e.ISOWeek,
2296
+ e.numberOfMonths,
2297
+ e.pagedNavigation,
2298
+ e.reverseMonths
2299
+ ]), { disableNavigation: M, onMonthChange: C } = e, D = (v) => d.some((y) => y.days.some((O) => O.isEqualTo(v))), E = (v) => {
2300
+ if (M) return;
2301
+ let y = o(v);
2302
+ n && y < o(n) && (y = o(n)), r && y > o(r) && (y = o(r)), u(y), C?.(y);
2303
+ };
2304
+ return {
2305
+ months: l,
2306
+ weeks: d,
2307
+ days: c,
2308
+ navStart: n,
2309
+ navEnd: r,
2310
+ previousMonth: w,
2311
+ nextMonth: g,
2312
+ goToMonth: E,
2313
+ goToDay: (v) => {
2314
+ D(v) || E(v.date);
2315
+ }
2316
+ };
2317
+ }
2318
+ var K;
2319
+ (function(e) {
2320
+ e[e.Today = 0] = "Today", e[e.Selected = 1] = "Selected", e[e.LastFocused = 2] = "LastFocused", e[e.FocusedModifier = 3] = "FocusedModifier";
2321
+ })(K || (K = {}));
2322
+ function St(e) {
2323
+ return !e[B.disabled] && !e[B.hidden] && !e[B.outside];
2324
+ }
2325
+ function xa(e, t, n, r) {
2326
+ let o, a = -1;
2327
+ for (const s of e) {
2328
+ const i = t(s);
2329
+ St(i) && (i[B.focused] && a < K.FocusedModifier ? (o = s, a = K.FocusedModifier) : r?.isEqualTo(s) && a < K.LastFocused ? (o = s, a = K.LastFocused) : n(s.date) && a < K.Selected ? (o = s, a = K.Selected) : i[B.today] && a < K.Today && (o = s, a = K.Today));
2330
+ }
2331
+ return o || (o = e.find((s) => St(t(s)))), o;
2332
+ }
2333
+ function Ta(e, t, n, r, o, a, s) {
2334
+ const { ISOWeek: i, broadcastCalendar: u } = a, { addDays: l, addMonths: d, addWeeks: c, addYears: w, endOfBroadcastWeek: g, endOfISOWeek: M, endOfWeek: C, max: D, min: E, startOfBroadcastWeek: b, startOfISOWeek: v, startOfWeek: y } = s;
2335
+ let O = {
2336
+ day: l,
2337
+ week: c,
2338
+ month: d,
2339
+ year: w,
2340
+ startOfWeek: (f) => u ? b(f, s) : i ? v(f) : y(f),
2341
+ endOfWeek: (f) => u ? g(f) : i ? M(f) : C(f)
2342
+ }[e](n, t === "after" ? 1 : -1);
2343
+ return t === "before" && r ? O = D([r, O]) : t === "after" && o && (O = E([o, O])), O;
2344
+ }
2345
+ function an(e, t, n, r, o, a, s, i = 0) {
2346
+ if (i > 365) return;
2347
+ const u = Ta(e, t, n.date, r, o, a, s), l = !!(a.disabled && oe(u, a.disabled, s)), d = !!(a.hidden && oe(u, a.hidden, s)), c = new $t(u, u, s);
2348
+ return !l && !d ? c : an(e, t, c, r, o, a, s, i + 1);
2349
+ }
2350
+ function Ya(e, t, n, r, o) {
2351
+ const { autoFocus: a } = e, [s, i] = Ke(), u = xa(t.days, n, r || (() => !1), s), [l, d] = Ke(a ? u : void 0);
2352
+ return {
2353
+ isFocusTarget: (M) => !!u?.isEqualTo(M),
2354
+ setFocused: d,
2355
+ focused: l,
2356
+ blur: () => {
2357
+ i(l), d(void 0);
2358
+ },
2359
+ moveFocus: (M, C) => {
2360
+ if (!l) return;
2361
+ const D = an(M, C, l, t.navStart, t.navEnd, e, o);
2362
+ D && (e.disableNavigation && !t.days.some((E) => E.isEqualTo(D)) || (t.goToDay(D), d(D)));
2363
+ }
2364
+ };
2365
+ }
2366
+ function _a(e, t) {
2367
+ const { selected: n, required: r, onSelect: o } = e, [a, s] = Ee(n, o ? n : void 0), i = o ? n : a, { isSameDay: u } = t, l = (g) => i?.some((M) => u(M, g)) ?? !1, { min: d, max: c } = e;
2368
+ return {
2369
+ selected: i,
2370
+ select: (g, M, C) => {
2371
+ let D = [...i ?? []];
2372
+ if (l(g)) {
2373
+ if (i?.length === d || r && i?.length === 1) return;
2374
+ D = i?.filter((E) => !u(E, g));
2375
+ } else i?.length === c ? D = [g] : D = [...D, g];
2376
+ return o || s(D), o?.(D, g, M, C), D;
2377
+ },
2378
+ isSelected: l
2379
+ };
2380
+ }
2381
+ function Pa(e, t, n = 0, r = 0, o = !1, a = J) {
2382
+ const { from: s, to: i } = t || {}, { isSameDay: u, isAfter: l, isBefore: d } = a;
2383
+ let c;
2384
+ if (!s && !i) c = {
2385
+ from: e,
2386
+ to: n > 0 ? void 0 : e
2387
+ };
2388
+ else if (s && !i) u(s, e) ? n === 0 ? c = {
2389
+ from: s,
2390
+ to: e
2391
+ } : o ? c = {
2392
+ from: s,
2393
+ to: void 0
2394
+ } : c = void 0 : d(e, s) ? c = {
2395
+ from: e,
2396
+ to: s
2397
+ } : c = {
2398
+ from: s,
2399
+ to: e
2400
+ };
2401
+ else if (s && i) if (u(s, e) && u(i, e)) o ? c = {
2402
+ from: s,
2403
+ to: i
2404
+ } : c = void 0;
2405
+ else if (u(s, e)) c = {
2406
+ from: s,
2407
+ to: n > 0 ? void 0 : e
2408
+ };
2409
+ else if (u(i, e)) c = {
2410
+ from: e,
2411
+ to: n > 0 ? void 0 : e
2412
+ };
2413
+ else if (d(e, s)) c = {
2414
+ from: e,
2415
+ to: i
2416
+ };
2417
+ else if (l(e, s)) c = {
2418
+ from: s,
2419
+ to: e
2420
+ };
2421
+ else if (l(e, i)) c = {
2422
+ from: s,
2423
+ to: e
2424
+ };
2425
+ else throw new Error("Invalid range");
2426
+ if (c?.from && c?.to) {
2427
+ const w = a.differenceInCalendarDays(c.to, c.from);
2428
+ r > 0 && w > r ? c = {
2429
+ from: e,
2430
+ to: void 0
2431
+ } : n > 1 && w < n && (c = {
2432
+ from: e,
2433
+ to: void 0
2434
+ });
2435
+ }
2436
+ return c;
2437
+ }
2438
+ function Ea(e, t, n = J) {
2439
+ const r = Array.isArray(t) ? t : [t];
2440
+ let o = e.from;
2441
+ const a = n.differenceInCalendarDays(e.to, e.from), s = Math.min(a, 6);
2442
+ for (let i = 0; i <= s; i++) {
2443
+ if (r.includes(o.getDay())) return !0;
2444
+ o = n.addDays(o, 1);
2445
+ }
2446
+ return !1;
2447
+ }
2448
+ function Nt(e, t, n = J) {
2449
+ return re(e, t.from, !1, n) || re(e, t.to, !1, n) || re(t, e.from, !1, n) || re(t, e.to, !1, n);
2450
+ }
2451
+ function Fa(e, t, n = J) {
2452
+ const r = Array.isArray(t) ? t : [t];
2453
+ if (r.filter((a) => typeof a != "function").some((a) => typeof a == "boolean" ? a : n.isDate(a) ? re(e, a, !1, n) : Ut(a, n) ? a.some((s) => re(e, s, !1, n)) : Pe(a) ? a.from && a.to ? Nt(e, {
2454
+ from: a.from,
2455
+ to: a.to
2456
+ }, n) : !1 : Zt(a) ? Ea(e, a.dayOfWeek, n) : nt(a) ? n.isAfter(a.before, a.after) ? Nt(e, {
2457
+ from: n.addDays(a.after, 1),
2458
+ to: n.addDays(a.before, -1)
2459
+ }, n) : oe(e.from, a, n) || oe(e.to, a, n) : rt(a) || ot(a) ? oe(e.from, a, n) || oe(e.to, a, n) : !1)) return !0;
2460
+ const o = r.filter((a) => typeof a == "function");
2461
+ if (o.length) {
2462
+ let a = e.from;
2463
+ const s = n.differenceInCalendarDays(e.to, e.from);
2464
+ for (let i = 0; i <= s; i++) {
2465
+ if (o.some((u) => u(a))) return !0;
2466
+ a = n.addDays(a, 1);
2467
+ }
2468
+ }
2469
+ return !1;
2470
+ }
2471
+ function Ba(e, t) {
2472
+ const { disabled: n, excludeDisabled: r, resetOnSelect: o, selected: a, required: s, onSelect: i } = e, [u, l] = Ee(a, i ? a : void 0), d = i ? a : u;
2473
+ return {
2474
+ selected: d,
2475
+ select: (g, M, C) => {
2476
+ const { min: D, max: E } = e;
2477
+ let b;
2478
+ if (g) {
2479
+ const v = d?.from, y = d?.to, O = !!v && !!y, f = !!v && !!y && t.isSameDay(v, y) && t.isSameDay(g, v);
2480
+ o && (O || !d?.from) ? !s && f ? b = void 0 : b = {
2481
+ from: g,
2482
+ to: void 0
2483
+ } : b = Pa(g, d, D, E, s, t);
2484
+ }
2485
+ return r && n && b?.from && b.to && Fa({
2486
+ from: b.from,
2487
+ to: b.to
2488
+ }, n, t) && (b.from = g, b.to = void 0), i || l(b), i?.(b, g, M, C), b;
2489
+ },
2490
+ isSelected: (g) => d && re(d, g, !1, t)
2491
+ };
2492
+ }
2493
+ function Ia(e, t) {
2494
+ const { selected: n, required: r, onSelect: o } = e, [a, s] = Ee(n, o ? n : void 0), i = o ? n : a, { isSameDay: u } = t;
2495
+ return {
2496
+ selected: i,
2497
+ select: (c, w, g) => {
2498
+ let M = c;
2499
+ return !r && i && i && u(c, i) && (M = void 0), o || s(M), o?.(M, c, w, g), M;
2500
+ },
2501
+ isSelected: (c) => i ? u(i, c) : !1
2502
+ };
2503
+ }
2504
+ function Ha(e, t) {
2505
+ const n = Ia(e, t), r = _a(e, t), o = Ba(e, t);
2506
+ switch (e.mode) {
2507
+ case "single":
2508
+ return n;
2509
+ case "multiple":
2510
+ return r;
2511
+ case "range":
2512
+ return o;
2513
+ default:
2514
+ return;
2515
+ }
2516
+ }
2517
+ function q(e, t) {
2518
+ return e instanceof $ && e.timeZone === t ? e : new $(e, t);
2519
+ }
2520
+ function le(e, t, n) {
2521
+ if (!n) return q(e, t);
2522
+ const r = q(e, t), o = new $(r.getFullYear(), r.getMonth(), r.getDate(), 12, 0, 0, t);
2523
+ return new Date(o.getTime());
2524
+ }
2525
+ function Ct(e, t, n) {
2526
+ return typeof e == "boolean" || typeof e == "function" ? e : e instanceof Date ? le(e, t, n) : Array.isArray(e) ? e.map((r) => r instanceof Date ? le(r, t, n) : r) : Pe(e) ? {
2527
+ ...e,
2528
+ from: e.from ? q(e.from, t) : e.from,
2529
+ to: e.to ? q(e.to, t) : e.to
2530
+ } : nt(e) ? {
2531
+ before: le(e.before, t, n),
2532
+ after: le(e.after, t, n)
2533
+ } : rt(e) ? { after: le(e.after, t, n) } : ot(e) ? { before: le(e.before, t, n) } : e;
2534
+ }
2535
+ function Ve(e, t, n) {
2536
+ return e && (Array.isArray(e) ? e.map((r) => Ct(r, t, n)) : Ct(e, t, n));
2537
+ }
2538
+ function Aa(e) {
2539
+ let t = e;
2540
+ const n = t.timeZone;
2541
+ if (n && (t = {
2542
+ ...e,
2543
+ timeZone: n
2544
+ }, t.today && (t.today = q(t.today, n)), t.month && (t.month = q(t.month, n)), t.defaultMonth && (t.defaultMonth = q(t.defaultMonth, n)), t.startMonth && (t.startMonth = q(t.startMonth, n)), t.endMonth && (t.endMonth = q(t.endMonth, n)), t.mode === "single" && t.selected ? t.selected = q(t.selected, n) : t.mode === "multiple" && t.selected ? t.selected = t.selected?.map((p) => q(p, n)) : t.mode === "range" && t.selected && (t.selected = {
2545
+ from: t.selected.from ? q(t.selected.from, n) : t.selected.from,
2546
+ to: t.selected.to ? q(t.selected.to, n) : t.selected.to
2547
+ }), t.disabled !== void 0 && (t.disabled = Ve(t.disabled, n)), t.hidden !== void 0 && (t.hidden = Ve(t.hidden, n)), t.modifiers)) {
2548
+ const p = {};
2549
+ Object.keys(t.modifiers).forEach((W) => {
2550
+ p[W] = Ve(t.modifiers?.[W], n);
2551
+ }), t.modifiers = p;
2552
+ }
2553
+ const { components: r, formatters: o, labels: a, dateLib: s, locale: i, classNames: u } = xe(() => {
2554
+ const p = {
2555
+ ...Gt,
2556
+ ...t.locale
2557
+ }, W = t.broadcastCalendar ? 1 : t.weekStartsOn, k = t.noonSafe && t.timeZone ? ya(t.timeZone, {
2558
+ weekStartsOn: W,
2559
+ locale: p
2560
+ }) : void 0, I = t.dateLib && k ? {
2561
+ ...k,
2562
+ ...t.dateLib
2563
+ } : t.dateLib ?? k, N = new X({
2564
+ locale: p,
2565
+ weekStartsOn: W,
2566
+ firstWeekContainsDate: t.firstWeekContainsDate,
2567
+ useAdditionalWeekYearTokens: t.useAdditionalWeekYearTokens,
2568
+ useAdditionalDayOfYearTokens: t.useAdditionalDayOfYearTokens,
2569
+ timeZone: t.timeZone,
2570
+ numerals: t.numerals
2571
+ }, I);
2572
+ return {
2573
+ dateLib: N,
2574
+ components: Xo(t.components),
2575
+ formatters: ia(t.formatters),
2576
+ labels: ca(t.labels, N.options),
2577
+ locale: p,
2578
+ classNames: {
2579
+ ...at(),
2580
+ ...t.classNames
2581
+ }
2582
+ };
2583
+ }, [
2584
+ t.locale,
2585
+ t.broadcastCalendar,
2586
+ t.weekStartsOn,
2587
+ t.firstWeekContainsDate,
2588
+ t.useAdditionalWeekYearTokens,
2589
+ t.useAdditionalDayOfYearTokens,
2590
+ t.timeZone,
2591
+ t.numerals,
2592
+ t.dateLib,
2593
+ t.noonSafe,
2594
+ t.components,
2595
+ t.formatters,
2596
+ t.labels,
2597
+ t.classNames
2598
+ ]);
2599
+ t.today || (t = {
2600
+ ...t,
2601
+ today: s.today()
2602
+ });
2603
+ const { captionLayout: l, mode: d, navLayout: c, numberOfMonths: w = 1, onDayBlur: g, onDayClick: M, onDayFocus: C, onDayKeyDown: D, onDayMouseEnter: E, onDayMouseLeave: b, onNextClick: v, onPrevClick: y, showWeekNumber: O, styles: f } = t, { formatCaption: x, formatDay: T, formatMonthDropdown: F, formatWeekNumber: j, formatWeekNumberHeader: A, formatWeekdayName: R, formatYearDropdown: he } = o, se = Ca(t, s), { days: We, months: Se, navStart: Fe, navEnd: Be, previousMonth: Z, nextMonth: U, goToMonth: L } = se, Ie = Vo(We, t, Fe, Be, s), { isSelected: He, select: Ae, selected: Ne } = Ha(t, s) ?? {}, { blur: st, focused: it, isFocusTarget: sn, moveFocus: ut, setFocused: Ce } = Ya(t, se, Ie, He ?? (() => !1), s), { labelDayButton: un, labelGridcell: ln, labelGrid: cn, labelMonthDropdown: dn, labelNav: lt, labelPrevious: fn, labelNext: hn, labelWeekday: mn, labelWeekNumber: yn, labelWeekNumberHeader: gn, labelYearDropdown: vn } = a, bn = xe(() => ha(s, t.ISOWeek, t.broadcastCalendar, t.today), [
2604
+ s,
2605
+ t.ISOWeek,
2606
+ t.broadcastCalendar,
2607
+ t.today
2608
+ ]), ct = d !== void 0 || M !== void 0, qe = G(() => {
2609
+ Z && (L(Z), y?.(Z));
2610
+ }, [
2611
+ Z,
2612
+ L,
2613
+ y
2614
+ ]), ze = G(() => {
2615
+ U && (L(U), v?.(U));
2616
+ }, [
2617
+ L,
2618
+ U,
2619
+ v
2620
+ ]), wn = G((p, W) => (k) => {
2621
+ k.preventDefault(), k.stopPropagation(), Ce(p), !W.disabled && (Ae?.(p.date, W, k), M?.(p.date, W, k));
2622
+ }, [
2623
+ Ae,
2624
+ M,
2625
+ Ce
2626
+ ]), pn = G((p, W) => (k) => {
2627
+ Ce(p), C?.(p.date, W, k);
2628
+ }, [C, Ce]), Dn = G((p, W) => (k) => {
2629
+ st(), g?.(p.date, W, k);
2630
+ }, [st, g]), Mn = G((p, W) => (k) => {
2631
+ const I = {
2632
+ ArrowLeft: [k.shiftKey ? "month" : "day", t.dir === "rtl" ? "after" : "before"],
2633
+ ArrowRight: [k.shiftKey ? "month" : "day", t.dir === "rtl" ? "before" : "after"],
2634
+ ArrowDown: [k.shiftKey ? "year" : "week", "after"],
2635
+ ArrowUp: [k.shiftKey ? "year" : "week", "before"],
2636
+ PageUp: [k.shiftKey ? "year" : "month", "before"],
2637
+ PageDown: [k.shiftKey ? "year" : "month", "after"],
2638
+ Home: ["startOfWeek", "before"],
2639
+ End: ["endOfWeek", "after"]
2640
+ };
2641
+ if (I[k.key]) {
2642
+ k.preventDefault(), k.stopPropagation();
2643
+ const [N, ee] = I[k.key];
2644
+ ut(N, ee);
2645
+ }
2646
+ D?.(p.date, W, k);
2647
+ }, [
2648
+ ut,
2649
+ D,
2650
+ t.dir
2651
+ ]), kn = G((p, W) => (k) => {
2652
+ E?.(p.date, W, k);
2653
+ }, [E]), On = G((p, W) => (k) => {
2654
+ b?.(p.date, W, k);
2655
+ }, [b]), Wn = G((p, W) => (k) => {
2656
+ const I = Number(k.target.value), N = s.setMonth(s.startOfMonth(p), I);
2657
+ L(s.addMonths(N, -W));
2658
+ }, [s, L]), Sn = G((p, W) => (k) => {
2659
+ const I = Number(k.target.value), N = s.setYear(s.startOfMonth(p), I);
2660
+ L(s.addMonths(N, -W));
2661
+ }, [s, L]), { className: Nn, style: Cn } = xe(() => ({
2662
+ className: [u[h.Root], t.className].filter(Boolean).join(" "),
2663
+ style: {
2664
+ ...f?.[h.Root],
2665
+ ...t.style
2666
+ }
2667
+ }), [
2668
+ u,
2669
+ t.className,
2670
+ t.style,
2671
+ f
2672
+ ]), xn = Jo(t), dt = (p) => {
2673
+ const W = f?.[h.Dropdown], k = f?.[p];
2674
+ if (!(!W && !k))
2675
+ return {
2676
+ ...W,
2677
+ ...k
2678
+ };
2679
+ }, ft = Te(null);
2680
+ wa(ft, !!t.animate, {
2681
+ classNames: u,
2682
+ months: Se,
2683
+ focused: it,
2684
+ dateLib: s
2685
+ });
2686
+ const Tn = {
2687
+ dayPickerProps: t,
2688
+ selected: Ne,
2689
+ select: Ae,
2690
+ isSelected: He,
2691
+ months: Se,
2692
+ nextMonth: U,
2693
+ previousMonth: Z,
2694
+ goToMonth: L,
2695
+ getModifiers: Ie,
2696
+ components: r,
2697
+ classNames: u,
2698
+ styles: f,
2699
+ labels: a,
2700
+ formatters: o
2701
+ };
2702
+ return m.createElement(Rt.Provider, { value: Tn }, m.createElement(r.Root, {
2703
+ rootRef: t.animate ? ft : void 0,
2704
+ className: Nn,
2705
+ style: Cn,
2706
+ dir: t.dir,
2707
+ id: t.id,
2708
+ lang: t.lang ?? i.code,
2709
+ nonce: t.nonce,
2710
+ title: t.title,
2711
+ role: t.role,
2712
+ "aria-label": t["aria-label"],
2713
+ "aria-labelledby": t["aria-labelledby"],
2714
+ ...xn
2715
+ }, m.createElement(r.Months, {
2716
+ className: u[h.Months],
2717
+ style: f?.[h.Months]
2718
+ }, !t.hideNavigation && !c && m.createElement(r.Nav, {
2719
+ "data-animated-nav": t.animate ? "true" : void 0,
2720
+ className: u[h.Nav],
2721
+ style: f?.[h.Nav],
2722
+ "aria-label": lt(),
2723
+ onPreviousClick: qe,
2724
+ onNextClick: ze,
2725
+ previousMonth: Z,
2726
+ nextMonth: U
2727
+ }), Se.map((p, W) => {
2728
+ const k = t.reverseMonths ? Se.length - 1 - W : W;
2729
+ return m.createElement(r.Month, {
2730
+ "data-animated-month": t.animate ? "true" : void 0,
2731
+ className: u[h.Month],
2732
+ style: f?.[h.Month],
2733
+ key: W,
2734
+ displayIndex: W,
2735
+ calendarMonth: p
2736
+ }, c === "around" && !t.hideNavigation && W === 0 && m.createElement(r.PreviousMonthButton, {
2737
+ type: "button",
2738
+ className: u[h.PreviousMonthButton],
2739
+ style: f?.[h.PreviousMonthButton],
2740
+ tabIndex: Z ? void 0 : -1,
2741
+ "aria-disabled": Z ? void 0 : !0,
2742
+ "aria-label": fn(Z),
2743
+ onClick: qe,
2744
+ "data-animated-button": t.animate ? "true" : void 0
2745
+ }, m.createElement(r.Chevron, {
2746
+ disabled: Z ? void 0 : !0,
2747
+ className: u[h.Chevron],
2748
+ style: f?.[h.Chevron],
2749
+ orientation: t.dir === "rtl" ? "right" : "left"
2750
+ })), m.createElement(r.MonthCaption, {
2751
+ "data-animated-caption": t.animate ? "true" : void 0,
2752
+ className: u[h.MonthCaption],
2753
+ style: f?.[h.MonthCaption],
2754
+ calendarMonth: p,
2755
+ displayIndex: W
2756
+ }, l?.startsWith("dropdown") ? m.createElement(r.DropdownNav, {
2757
+ className: u[h.Dropdowns],
2758
+ style: f?.[h.Dropdowns]
2759
+ }, (() => {
2760
+ const I = l === "dropdown" || l === "dropdown-months" ? m.createElement(r.MonthsDropdown, {
2761
+ key: "month",
2762
+ className: u[h.MonthsDropdown],
2763
+ "aria-label": dn(),
2764
+ disabled: !!t.disableNavigation,
2765
+ onChange: Wn(p.date, k),
2766
+ options: da(p.date, Fe, Be, o, s),
2767
+ style: dt(h.MonthsDropdown),
2768
+ value: s.getMonth(p.date)
2769
+ }) : m.createElement("span", { key: "month" }, F(p.date, s)), N = l === "dropdown" || l === "dropdown-years" ? m.createElement(r.YearsDropdown, {
2770
+ key: "year",
2771
+ className: u[h.YearsDropdown],
2772
+ "aria-label": vn(s.options),
2773
+ disabled: !!t.disableNavigation,
2774
+ onChange: Sn(p.date, k),
2775
+ options: ma(Fe, Be, o, s, !!t.reverseYears),
2776
+ style: dt(h.YearsDropdown),
2777
+ value: s.getYear(p.date)
2778
+ }) : m.createElement("span", { key: "year" }, he(p.date, s));
2779
+ return s.getMonthYearOrder() === "year-first" ? [N, I] : [I, N];
2780
+ })(), m.createElement("span", {
2781
+ role: "status",
2782
+ "aria-live": "polite",
2783
+ style: {
2784
+ border: 0,
2785
+ clip: "rect(0 0 0 0)",
2786
+ height: "1px",
2787
+ margin: "-1px",
2788
+ overflow: "hidden",
2789
+ padding: 0,
2790
+ position: "absolute",
2791
+ width: "1px",
2792
+ whiteSpace: "nowrap",
2793
+ wordWrap: "normal"
2794
+ }
2795
+ }, x(p.date, s.options, s))) : m.createElement(r.CaptionLabel, {
2796
+ className: u[h.CaptionLabel],
2797
+ style: f?.[h.CaptionLabel],
2798
+ role: "status",
2799
+ "aria-live": "polite"
2800
+ }, x(p.date, s.options, s))), c === "around" && !t.hideNavigation && W === w - 1 && m.createElement(r.NextMonthButton, {
2801
+ type: "button",
2802
+ className: u[h.NextMonthButton],
2803
+ style: f?.[h.NextMonthButton],
2804
+ tabIndex: U ? void 0 : -1,
2805
+ "aria-disabled": U ? void 0 : !0,
2806
+ "aria-label": hn(U),
2807
+ onClick: ze,
2808
+ "data-animated-button": t.animate ? "true" : void 0
2809
+ }, m.createElement(r.Chevron, {
2810
+ disabled: U ? void 0 : !0,
2811
+ className: u[h.Chevron],
2812
+ style: f?.[h.Chevron],
2813
+ orientation: t.dir === "rtl" ? "left" : "right"
2814
+ })), W === w - 1 && c === "after" && !t.hideNavigation && m.createElement(r.Nav, {
2815
+ "data-animated-nav": t.animate ? "true" : void 0,
2816
+ className: u[h.Nav],
2817
+ style: f?.[h.Nav],
2818
+ "aria-label": lt(),
2819
+ onPreviousClick: qe,
2820
+ onNextClick: ze,
2821
+ previousMonth: Z,
2822
+ nextMonth: U
2823
+ }), m.createElement(r.MonthGrid, {
2824
+ role: "grid",
2825
+ "aria-multiselectable": d === "multiple" || d === "range",
2826
+ "aria-label": cn(p.date, s.options, s) || void 0,
2827
+ className: u[h.MonthGrid],
2828
+ style: f?.[h.MonthGrid]
2829
+ }, !t.hideWeekdays && m.createElement(r.Weekdays, {
2830
+ "data-animated-weekdays": t.animate ? "true" : void 0,
2831
+ className: u[h.Weekdays],
2832
+ style: f?.[h.Weekdays]
2833
+ }, O && m.createElement(r.WeekNumberHeader, {
2834
+ "aria-label": gn(s.options),
2835
+ className: u[h.WeekNumberHeader],
2836
+ style: f?.[h.WeekNumberHeader],
2837
+ scope: "col"
2838
+ }, A()), bn.map((I) => m.createElement(r.Weekday, {
2839
+ "aria-label": mn(I, s.options, s),
2840
+ className: u[h.Weekday],
2841
+ key: String(I),
2842
+ style: f?.[h.Weekday],
2843
+ scope: "col"
2844
+ }, R(I, s.options, s)))), m.createElement(r.Weeks, {
2845
+ "data-animated-weeks": t.animate ? "true" : void 0,
2846
+ className: u[h.Weeks],
2847
+ style: f?.[h.Weeks]
2848
+ }, p.weeks.map((I) => m.createElement(r.Week, {
2849
+ className: u[h.Week],
2850
+ key: I.weekNumber,
2851
+ style: f?.[h.Week],
2852
+ week: I
2853
+ }, O && m.createElement(r.WeekNumber, {
2854
+ week: I,
2855
+ style: f?.[h.WeekNumber],
2856
+ "aria-label": yn(I.weekNumber, { locale: i }),
2857
+ className: u[h.WeekNumber],
2858
+ scope: "row",
2859
+ role: "rowheader"
2860
+ }, j(I.weekNumber, s)), I.days.map((N) => {
2861
+ const { date: ee } = N, S = Ie(N);
2862
+ if (S[B.focused] = !S.hidden && !!it?.isEqualTo(N), S[V.selected] = He?.(ee) || S.selected, Pe(Ne)) {
2863
+ const { from: je, to: Ge } = Ne;
2864
+ S[V.range_start] = !!(je && Ge && s.isSameDay(ee, je)), S[V.range_end] = !!(je && Ge && s.isSameDay(ee, Ge)), S[V.range_middle] = re(Ne, ee, !0, s);
2865
+ }
2866
+ const Yn = fa(S, f, t.modifiersStyles), _n = Ko(S, u, t.modifiersClassNames), Pn = !ct && !S.hidden ? ln(ee, S, s.options, s) : void 0;
2867
+ return m.createElement(r.Day, {
2868
+ key: `${N.isoDate}_${N.displayMonthId}`,
2869
+ day: N,
2870
+ modifiers: S,
2871
+ className: _n.join(" "),
2872
+ style: Yn,
2873
+ role: "gridcell",
2874
+ "aria-selected": S.selected || void 0,
2875
+ "aria-label": Pn,
2876
+ "data-day": N.isoDate,
2877
+ "data-month": N.outside ? N.dateMonthId : void 0,
2878
+ "data-selected": S.selected || void 0,
2879
+ "data-disabled": S.disabled || void 0,
2880
+ "data-hidden": S.hidden || void 0,
2881
+ "data-outside": N.outside || void 0,
2882
+ "data-focused": S.focused || void 0,
2883
+ "data-today": S.today || void 0
2884
+ }, !S.hidden && ct ? m.createElement(r.DayButton, {
2885
+ className: u[h.DayButton],
2886
+ style: f?.[h.DayButton],
2887
+ type: "button",
2888
+ day: N,
2889
+ modifiers: S,
2890
+ disabled: !S.focused && S.disabled || void 0,
2891
+ "aria-disabled": S.focused && S.disabled || void 0,
2892
+ tabIndex: sn(N) ? 0 : -1,
2893
+ "aria-label": un(ee, S, s.options, s),
2894
+ onClick: wn(N, S),
2895
+ onBlur: Dn(N, S),
2896
+ onFocus: pn(N, S),
2897
+ onKeyDown: Mn(N, S),
2898
+ onMouseEnter: kn(N, S),
2899
+ onMouseLeave: On(N, S)
2900
+ }, T(ee, s.options, s)) : !S.hidden && T(N.date, s.options, s));
2901
+ }))))));
2902
+ })), t.footer && m.createElement(r.Footer, {
2903
+ className: u[h.Footer],
2904
+ style: f?.[h.Footer],
2905
+ role: "status",
2906
+ "aria-live": "polite"
2907
+ }, t.footer)));
2908
+ }
2909
+ function Xa({ className: e, classNames: t, showOutsideDays: n = !0, captionLayout: r = "label", buttonVariant: o = "ghost", locale: a, formatters: s, components: i, ...u }) {
2910
+ const l = at();
2911
+ return /* @__PURE__ */ te(Aa, {
2912
+ showOutsideDays: n,
2913
+ className: Y("group/calendar bg-surface-1 p-3 [--cell-radius:var(--radius-4xl)] [--cell-size:--spacing(8)] in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent", String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`, String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`, e),
2914
+ captionLayout: r,
2915
+ locale: a,
2916
+ formatters: {
2917
+ formatMonthDropdown: (d) => d.toLocaleString(a?.code, { month: "short" }),
2918
+ ...s
2919
+ },
2920
+ classNames: {
2921
+ root: Y("w-fit", l.root),
2922
+ months: Y("relative flex flex-col gap-4 md:flex-row", l.months),
2923
+ month: Y("flex w-full flex-col gap-4", l.month),
2924
+ nav: Y("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1", l.nav),
2925
+ button_previous: Y(ht({ variant: o }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", l.button_previous),
2926
+ button_next: Y(ht({ variant: o }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", l.button_next),
2927
+ month_caption: Y("flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)", l.month_caption),
2928
+ dropdowns: Y("flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium", l.dropdowns),
2929
+ dropdown_root: Y("relative rounded-(--cell-radius)", l.dropdown_root),
2930
+ dropdown: Y("absolute inset-0 bg-popover opacity-0", l.dropdown),
2931
+ caption_label: Y("font-medium select-none", r === "label" ? "text-sm" : "flex items-center gap-1 rounded-(--cell-radius) text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground", l.caption_label),
2932
+ weekdays: Y("flex", l.weekdays),
2933
+ weekday: Y("flex-1 rounded-(--cell-radius) text-[0.8rem] font-normal text-muted-foreground select-none", l.weekday),
2934
+ week: Y("mt-2 flex w-full", l.week),
2935
+ week_number_header: Y("w-(--cell-size) select-none", l.week_number_header),
2936
+ week_number: Y("text-[0.8rem] text-muted-foreground select-none", l.week_number),
2937
+ day: Y("group/day relative aspect-square h-full w-full rounded-(--cell-radius) p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-e-(--cell-radius)", u.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-s-(--cell-radius)" : "[&:first-child[data-selected=true]_button]:rounded-s-(--cell-radius)", l.day),
2938
+ range_start: Y("relative isolate z-0 rounded-s-(--cell-radius) bg-surface-muted after:absolute after:inset-y-0 after:end-0 after:w-4 after:bg-surface-muted", l.range_start),
2939
+ range_middle: Y("rounded-none", l.range_middle),
2940
+ range_end: Y("relative isolate z-0 rounded-e-(--cell-radius) bg-surface-muted after:absolute after:inset-y-0 after:start-0 after:w-4 after:bg-surface-muted", l.range_end),
2941
+ today: Y("rounded-(--cell-radius) bg-surface-muted text-foreground data-[selected=true]:rounded-none", l.today),
2942
+ outside: Y("text-muted-foreground aria-selected:text-muted-foreground", l.outside),
2943
+ disabled: Y("text-muted-foreground opacity-50", l.disabled),
2944
+ hidden: Y("invisible", l.hidden),
2945
+ ...t
2946
+ },
2947
+ components: {
2948
+ Root: ({ className: d, rootRef: c, ...w }) => /* @__PURE__ */ te("div", {
2949
+ "data-slot": "calendar",
2950
+ ref: c,
2951
+ className: Y(d),
2952
+ ...w
2953
+ }),
2954
+ Chevron: ({ className: d, orientation: c, ...w }) => c === "left" ? /* @__PURE__ */ te($e, {
2955
+ icon: Bn,
2956
+ className: Y("size-4 rtl:rotate-180", d),
2957
+ ...w
2958
+ }) : c === "right" ? /* @__PURE__ */ te($e, {
2959
+ icon: In,
2960
+ className: Y("size-4 rtl:rotate-180", d),
2961
+ ...w
2962
+ }) : /* @__PURE__ */ te($e, {
2963
+ icon: Fn,
2964
+ className: Y("size-4", d),
2965
+ ...w
2966
+ }),
2967
+ DayButton: ({ ...d }) => /* @__PURE__ */ te(qa, {
2968
+ locale: a,
2969
+ ...d
2970
+ }),
2971
+ WeekNumber: ({ children: d, ...c }) => /* @__PURE__ */ te("td", {
2972
+ ...c,
2973
+ children: /* @__PURE__ */ te("div", {
2974
+ className: "flex size-(--cell-size) items-center justify-center text-center",
2975
+ children: d
2976
+ })
2977
+ }),
2978
+ ...i
2979
+ },
2980
+ ...u
2981
+ });
2982
+ }
2983
+ function qa({ className: e, day: t, modifiers: n, locale: r, ...o }) {
2984
+ const a = at(), s = mt.useRef(null);
2985
+ return mt.useEffect(() => {
2986
+ n.focused && s.current?.focus();
2987
+ }, [n.focused]), /* @__PURE__ */ te(En, {
2988
+ variant: "ghost",
2989
+ size: "icon",
2990
+ "data-day": t.date.toLocaleDateString(r?.code),
2991
+ "data-selected-single": n.selected && !n.range_start && !n.range_end && !n.range_middle,
2992
+ "data-range-start": n.range_start,
2993
+ "data-range-end": n.range_end,
2994
+ "data-range-middle": n.range_middle,
2995
+ className: Y("relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-e-(--cell-radius) data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-surface-muted data-[range-middle=true]:text-foreground data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-s-(--cell-radius) data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-foreground [&>span]:text-xs [&>span]:opacity-70", a.day, e),
2996
+ ...o
2997
+ });
2998
+ }
2999
+ export {
3000
+ Xa as Calendar,
3001
+ qa as CalendarDayButton
3002
+ };
3003
+
3004
+ //# sourceMappingURL=calendar.js.map