@alfadocs/ui-kit 0.25.1 → 0.25.2

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