@konstructio/ui 0.1.0-alpha.2 → 0.1.0-alpha.20

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