@baasix/lexical 0.0.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.
- package/README.md +281 -0
- package/dist/DateTimeComponent-4MX2IKXK.css +45 -0
- package/dist/DateTimeComponent-4MX2IKXK.css.map +1 -0
- package/dist/DateTimeComponent-7V5RW3AE.js +2928 -0
- package/dist/DateTimeComponent-7V5RW3AE.js.map +1 -0
- package/dist/EquationComponent-3IW3ONJD.js +159 -0
- package/dist/EquationComponent-3IW3ONJD.js.map +1 -0
- package/dist/EquationComponent-C2C6477P.css +28 -0
- package/dist/EquationComponent-C2C6477P.css.map +1 -0
- package/dist/ExcalidrawComponent-GZYLHNOY.js +267 -0
- package/dist/ExcalidrawComponent-GZYLHNOY.js.map +1 -0
- package/dist/ExcalidrawComponent-U6BD7DUB.css +152 -0
- package/dist/ExcalidrawComponent-U6BD7DUB.css.map +1 -0
- package/dist/ImageComponent-IYUGOT6O.css +73 -0
- package/dist/ImageComponent-IYUGOT6O.css.map +1 -0
- package/dist/ImageComponent-TTUYUG3M.js +429 -0
- package/dist/ImageComponent-TTUYUG3M.js.map +1 -0
- package/dist/PollComponent-CWI5UJF5.css +187 -0
- package/dist/PollComponent-CWI5UJF5.css.map +1 -0
- package/dist/PollComponent-KLJZSW5O.js +199 -0
- package/dist/PollComponent-KLJZSW5O.js.map +1 -0
- package/dist/StickyComponent-MZSTQF47.css +774 -0
- package/dist/StickyComponent-MZSTQF47.css.map +1 -0
- package/dist/StickyComponent-ZED6LNTX.js +233 -0
- package/dist/StickyComponent-ZED6LNTX.js.map +1 -0
- package/dist/chunk-35UCX4ZT.js +168 -0
- package/dist/chunk-35UCX4ZT.js.map +1 -0
- package/dist/chunk-44LUNGL3.js +16608 -0
- package/dist/chunk-44LUNGL3.js.map +1 -0
- package/dist/chunk-BHROZTZU.js +42 -0
- package/dist/chunk-BHROZTZU.js.map +1 -0
- package/dist/chunk-FJ6COZ4H.js +275 -0
- package/dist/chunk-FJ6COZ4H.js.map +1 -0
- package/dist/chunk-GSFNU3JE.js +211 -0
- package/dist/chunk-GSFNU3JE.js.map +1 -0
- package/dist/chunk-I43VQAHW.js +918 -0
- package/dist/chunk-I43VQAHW.js.map +1 -0
- package/dist/chunk-N22RKA5D.js +402 -0
- package/dist/chunk-N22RKA5D.js.map +1 -0
- package/dist/chunk-OIMMC5C3.js +134 -0
- package/dist/chunk-OIMMC5C3.js.map +1 -0
- package/dist/chunk-PZ5AY32C.js +10 -0
- package/dist/chunk-PZ5AY32C.js.map +1 -0
- package/dist/chunk-TVF6V3BJ.js +41 -0
- package/dist/chunk-TVF6V3BJ.js.map +1 -0
- package/dist/chunk-XTKVR2JI.js +225 -0
- package/dist/chunk-XTKVR2JI.js.map +1 -0
- package/dist/emoji-list-MUV74SND.js +8 -0
- package/dist/emoji-list-MUV74SND.js.map +1 -0
- package/dist/index.css +4234 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +16050 -0
- package/dist/index.js.map +1 -0
- package/dist/landscape-RJWVK6ET.jpg +0 -0
- package/dist/yellow-flower-R72KOP74.jpg +0 -0
- package/package.json +76 -0
|
@@ -0,0 +1,2928 @@
|
|
|
1
|
+
import {
|
|
2
|
+
$isDateTimeNode
|
|
3
|
+
} from "./chunk-OIMMC5C3.js";
|
|
4
|
+
import {
|
|
5
|
+
__export
|
|
6
|
+
} from "./chunk-PZ5AY32C.js";
|
|
7
|
+
|
|
8
|
+
// src/nodes/DateTimeNode/DateTimeComponent.tsx
|
|
9
|
+
import {
|
|
10
|
+
autoUpdate,
|
|
11
|
+
flip,
|
|
12
|
+
FloatingFocusManager,
|
|
13
|
+
FloatingOverlay,
|
|
14
|
+
FloatingPortal,
|
|
15
|
+
offset,
|
|
16
|
+
shift,
|
|
17
|
+
useDismiss,
|
|
18
|
+
useFloating,
|
|
19
|
+
useInteractions,
|
|
20
|
+
useRole
|
|
21
|
+
} from "@floating-ui/react";
|
|
22
|
+
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
|
|
23
|
+
import { useLexicalNodeSelection } from "@lexical/react/useLexicalNodeSelection";
|
|
24
|
+
import { setHours, setMinutes } from "date-fns";
|
|
25
|
+
import {
|
|
26
|
+
$getNodeByKey,
|
|
27
|
+
IS_BOLD,
|
|
28
|
+
IS_HIGHLIGHT,
|
|
29
|
+
IS_ITALIC,
|
|
30
|
+
IS_STRIKETHROUGH,
|
|
31
|
+
IS_UNDERLINE
|
|
32
|
+
} from "lexical";
|
|
33
|
+
import { useEffect as useEffect2, useRef as useRef3, useState as useState3 } from "react";
|
|
34
|
+
|
|
35
|
+
// node_modules/@date-fns/tz/tzName/index.js
|
|
36
|
+
function tzName(timeZone, date, format3 = "long") {
|
|
37
|
+
return new Intl.DateTimeFormat("en-US", {
|
|
38
|
+
// Enforces engine to render the time. Without the option JavaScriptCore omits it.
|
|
39
|
+
hour: "numeric",
|
|
40
|
+
timeZone,
|
|
41
|
+
timeZoneName: format3
|
|
42
|
+
}).format(date).split(/\s/g).slice(2).join(" ");
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// node_modules/@date-fns/tz/tzOffset/index.js
|
|
46
|
+
var offsetFormatCache = {};
|
|
47
|
+
var offsetCache = {};
|
|
48
|
+
function tzOffset(timeZone, date) {
|
|
49
|
+
try {
|
|
50
|
+
const format3 = offsetFormatCache[timeZone] ||= new Intl.DateTimeFormat("en-US", {
|
|
51
|
+
timeZone,
|
|
52
|
+
timeZoneName: "longOffset"
|
|
53
|
+
}).format;
|
|
54
|
+
const offsetStr = format3(date).split("GMT")[1];
|
|
55
|
+
if (offsetStr in offsetCache) return offsetCache[offsetStr];
|
|
56
|
+
return calcOffset(offsetStr, offsetStr.split(":"));
|
|
57
|
+
} catch {
|
|
58
|
+
if (timeZone in offsetCache) return offsetCache[timeZone];
|
|
59
|
+
const captures = timeZone?.match(offsetRe);
|
|
60
|
+
if (captures) return calcOffset(timeZone, captures.slice(1));
|
|
61
|
+
return NaN;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
var offsetRe = /([+-]\d\d):?(\d\d)?/;
|
|
65
|
+
function calcOffset(cacheStr, values) {
|
|
66
|
+
const hours = +(values[0] || 0);
|
|
67
|
+
const minutes = +(values[1] || 0);
|
|
68
|
+
const seconds = +(values[2] || 0) / 60;
|
|
69
|
+
return offsetCache[cacheStr] = hours * 60 + minutes > 0 ? hours * 60 + minutes + seconds : hours * 60 - minutes - seconds;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// node_modules/@date-fns/tz/date/mini.js
|
|
73
|
+
var TZDateMini = class _TZDateMini extends Date {
|
|
74
|
+
//#region static
|
|
75
|
+
constructor(...args) {
|
|
76
|
+
super();
|
|
77
|
+
if (args.length > 1 && typeof args[args.length - 1] === "string") {
|
|
78
|
+
this.timeZone = args.pop();
|
|
79
|
+
}
|
|
80
|
+
this.internal = /* @__PURE__ */ new Date();
|
|
81
|
+
if (isNaN(tzOffset(this.timeZone, this))) {
|
|
82
|
+
this.setTime(NaN);
|
|
83
|
+
} else {
|
|
84
|
+
if (!args.length) {
|
|
85
|
+
this.setTime(Date.now());
|
|
86
|
+
} else if (typeof args[0] === "number" && (args.length === 1 || args.length === 2 && typeof args[1] !== "number")) {
|
|
87
|
+
this.setTime(args[0]);
|
|
88
|
+
} else if (typeof args[0] === "string") {
|
|
89
|
+
this.setTime(+new Date(args[0]));
|
|
90
|
+
} else if (args[0] instanceof Date) {
|
|
91
|
+
this.setTime(+args[0]);
|
|
92
|
+
} else {
|
|
93
|
+
this.setTime(+new Date(...args));
|
|
94
|
+
adjustToSystemTZ(this, NaN);
|
|
95
|
+
syncToInternal(this);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
static tz(tz, ...args) {
|
|
100
|
+
return args.length ? new _TZDateMini(...args, tz) : new _TZDateMini(Date.now(), tz);
|
|
101
|
+
}
|
|
102
|
+
//#endregion
|
|
103
|
+
//#region time zone
|
|
104
|
+
withTimeZone(timeZone) {
|
|
105
|
+
return new _TZDateMini(+this, timeZone);
|
|
106
|
+
}
|
|
107
|
+
getTimezoneOffset() {
|
|
108
|
+
const offset2 = -tzOffset(this.timeZone, this);
|
|
109
|
+
return offset2 > 0 ? Math.floor(offset2) : Math.ceil(offset2);
|
|
110
|
+
}
|
|
111
|
+
//#endregion
|
|
112
|
+
//#region time
|
|
113
|
+
setTime(time) {
|
|
114
|
+
Date.prototype.setTime.apply(this, arguments);
|
|
115
|
+
syncToInternal(this);
|
|
116
|
+
return +this;
|
|
117
|
+
}
|
|
118
|
+
//#endregion
|
|
119
|
+
//#region date-fns integration
|
|
120
|
+
[/* @__PURE__ */ Symbol.for("constructDateFrom")](date) {
|
|
121
|
+
return new _TZDateMini(+new Date(date), this.timeZone);
|
|
122
|
+
}
|
|
123
|
+
//#endregion
|
|
124
|
+
};
|
|
125
|
+
var re = /^(get|set)(?!UTC)/;
|
|
126
|
+
Object.getOwnPropertyNames(Date.prototype).forEach((method) => {
|
|
127
|
+
if (!re.test(method)) return;
|
|
128
|
+
const utcMethod = method.replace(re, "$1UTC");
|
|
129
|
+
if (!TZDateMini.prototype[utcMethod]) return;
|
|
130
|
+
if (method.startsWith("get")) {
|
|
131
|
+
TZDateMini.prototype[method] = function() {
|
|
132
|
+
return this.internal[utcMethod]();
|
|
133
|
+
};
|
|
134
|
+
} else {
|
|
135
|
+
TZDateMini.prototype[method] = function() {
|
|
136
|
+
Date.prototype[utcMethod].apply(this.internal, arguments);
|
|
137
|
+
syncFromInternal(this);
|
|
138
|
+
return +this;
|
|
139
|
+
};
|
|
140
|
+
TZDateMini.prototype[utcMethod] = function() {
|
|
141
|
+
Date.prototype[utcMethod].apply(this, arguments);
|
|
142
|
+
syncToInternal(this);
|
|
143
|
+
return +this;
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
function syncToInternal(date) {
|
|
148
|
+
date.internal.setTime(+date);
|
|
149
|
+
date.internal.setUTCSeconds(date.internal.getUTCSeconds() - Math.round(-tzOffset(date.timeZone, date) * 60));
|
|
150
|
+
}
|
|
151
|
+
function syncFromInternal(date) {
|
|
152
|
+
Date.prototype.setFullYear.call(date, date.internal.getUTCFullYear(), date.internal.getUTCMonth(), date.internal.getUTCDate());
|
|
153
|
+
Date.prototype.setHours.call(date, date.internal.getUTCHours(), date.internal.getUTCMinutes(), date.internal.getUTCSeconds(), date.internal.getUTCMilliseconds());
|
|
154
|
+
adjustToSystemTZ(date);
|
|
155
|
+
}
|
|
156
|
+
function adjustToSystemTZ(date) {
|
|
157
|
+
const baseOffset = tzOffset(date.timeZone, date);
|
|
158
|
+
const offset2 = baseOffset > 0 ? Math.floor(baseOffset) : Math.ceil(baseOffset);
|
|
159
|
+
const prevHour = /* @__PURE__ */ new Date(+date);
|
|
160
|
+
prevHour.setUTCHours(prevHour.getUTCHours() - 1);
|
|
161
|
+
const systemOffset = -(/* @__PURE__ */ new Date(+date)).getTimezoneOffset();
|
|
162
|
+
const prevHourSystemOffset = -(/* @__PURE__ */ new Date(+prevHour)).getTimezoneOffset();
|
|
163
|
+
const systemDSTChange = systemOffset - prevHourSystemOffset;
|
|
164
|
+
const dstShift = Date.prototype.getHours.apply(date) !== date.internal.getUTCHours();
|
|
165
|
+
if (systemDSTChange && dstShift) date.internal.setUTCMinutes(date.internal.getUTCMinutes() + systemDSTChange);
|
|
166
|
+
const offsetDiff = systemOffset - offset2;
|
|
167
|
+
if (offsetDiff) Date.prototype.setUTCMinutes.call(date, Date.prototype.getUTCMinutes.call(date) + offsetDiff);
|
|
168
|
+
const systemDate = /* @__PURE__ */ new Date(+date);
|
|
169
|
+
systemDate.setUTCSeconds(0);
|
|
170
|
+
const systemSecondsOffset = systemOffset > 0 ? systemDate.getSeconds() : (systemDate.getSeconds() - 60) % 60;
|
|
171
|
+
const secondsOffset = Math.round(-(tzOffset(date.timeZone, date) * 60)) % 60;
|
|
172
|
+
if (secondsOffset || systemSecondsOffset) {
|
|
173
|
+
date.internal.setUTCSeconds(date.internal.getUTCSeconds() + secondsOffset);
|
|
174
|
+
Date.prototype.setUTCSeconds.call(date, Date.prototype.getUTCSeconds.call(date) + secondsOffset + systemSecondsOffset);
|
|
175
|
+
}
|
|
176
|
+
const postBaseOffset = tzOffset(date.timeZone, date);
|
|
177
|
+
const postOffset = postBaseOffset > 0 ? Math.floor(postBaseOffset) : Math.ceil(postBaseOffset);
|
|
178
|
+
const postSystemOffset = -(/* @__PURE__ */ new Date(+date)).getTimezoneOffset();
|
|
179
|
+
const postOffsetDiff = postSystemOffset - postOffset;
|
|
180
|
+
const offsetChanged = postOffset !== offset2;
|
|
181
|
+
const postDiff = postOffsetDiff - offsetDiff;
|
|
182
|
+
if (offsetChanged && postDiff) {
|
|
183
|
+
Date.prototype.setUTCMinutes.call(date, Date.prototype.getUTCMinutes.call(date) + postDiff);
|
|
184
|
+
const newBaseOffset = tzOffset(date.timeZone, date);
|
|
185
|
+
const newOffset = newBaseOffset > 0 ? Math.floor(newBaseOffset) : Math.ceil(newBaseOffset);
|
|
186
|
+
const offsetChange = postOffset - newOffset;
|
|
187
|
+
if (offsetChange) {
|
|
188
|
+
date.internal.setUTCMinutes(date.internal.getUTCMinutes() + offsetChange);
|
|
189
|
+
Date.prototype.setUTCMinutes.call(date, Date.prototype.getUTCMinutes.call(date) + offsetChange);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
// node_modules/@date-fns/tz/date/index.js
|
|
195
|
+
var TZDate = class _TZDate extends TZDateMini {
|
|
196
|
+
//#region static
|
|
197
|
+
static tz(tz, ...args) {
|
|
198
|
+
return args.length ? new _TZDate(...args, tz) : new _TZDate(Date.now(), tz);
|
|
199
|
+
}
|
|
200
|
+
//#endregion
|
|
201
|
+
//#region representation
|
|
202
|
+
toISOString() {
|
|
203
|
+
const [sign, hours, minutes] = this.tzComponents();
|
|
204
|
+
const tz = `${sign}${hours}:${minutes}`;
|
|
205
|
+
return this.internal.toISOString().slice(0, -1) + tz;
|
|
206
|
+
}
|
|
207
|
+
toString() {
|
|
208
|
+
return `${this.toDateString()} ${this.toTimeString()}`;
|
|
209
|
+
}
|
|
210
|
+
toDateString() {
|
|
211
|
+
const [day, date, month, year] = this.internal.toUTCString().split(" ");
|
|
212
|
+
return `${day?.slice(0, -1)} ${month} ${date} ${year}`;
|
|
213
|
+
}
|
|
214
|
+
toTimeString() {
|
|
215
|
+
const time = this.internal.toUTCString().split(" ")[4];
|
|
216
|
+
const [sign, hours, minutes] = this.tzComponents();
|
|
217
|
+
return `${time} GMT${sign}${hours}${minutes} (${tzName(this.timeZone, this)})`;
|
|
218
|
+
}
|
|
219
|
+
toLocaleString(locales, options) {
|
|
220
|
+
return Date.prototype.toLocaleString.call(this, locales, {
|
|
221
|
+
...options,
|
|
222
|
+
timeZone: options?.timeZone || this.timeZone
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
toLocaleDateString(locales, options) {
|
|
226
|
+
return Date.prototype.toLocaleDateString.call(this, locales, {
|
|
227
|
+
...options,
|
|
228
|
+
timeZone: options?.timeZone || this.timeZone
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
toLocaleTimeString(locales, options) {
|
|
232
|
+
return Date.prototype.toLocaleTimeString.call(this, locales, {
|
|
233
|
+
...options,
|
|
234
|
+
timeZone: options?.timeZone || this.timeZone
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
//#endregion
|
|
238
|
+
//#region private
|
|
239
|
+
tzComponents() {
|
|
240
|
+
const offset2 = this.getTimezoneOffset();
|
|
241
|
+
const sign = offset2 > 0 ? "-" : "+";
|
|
242
|
+
const hours = String(Math.floor(Math.abs(offset2) / 60)).padStart(2, "0");
|
|
243
|
+
const minutes = String(Math.abs(offset2) % 60).padStart(2, "0");
|
|
244
|
+
return [sign, hours, minutes];
|
|
245
|
+
}
|
|
246
|
+
//#endregion
|
|
247
|
+
withTimeZone(timeZone) {
|
|
248
|
+
return new _TZDate(+this, timeZone);
|
|
249
|
+
}
|
|
250
|
+
//#region date-fns integration
|
|
251
|
+
[/* @__PURE__ */ Symbol.for("constructDateFrom")](date) {
|
|
252
|
+
return new _TZDate(+new Date(date), this.timeZone);
|
|
253
|
+
}
|
|
254
|
+
//#endregion
|
|
255
|
+
};
|
|
256
|
+
|
|
257
|
+
// node_modules/react-day-picker/dist/esm/classes/DateLib.js
|
|
258
|
+
import { addDays, addMonths, addWeeks, addYears, differenceInCalendarDays, differenceInCalendarMonths, eachMonthOfInterval, eachYearOfInterval, endOfISOWeek, endOfMonth, endOfWeek, endOfYear, format as format2, getISOWeek, getMonth, getWeek, getYear, isAfter, isBefore, isDate, isSameDay, isSameMonth, isSameYear, max, min, setMonth, setYear, startOfDay, startOfISOWeek, startOfMonth, startOfWeek, startOfYear } from "date-fns";
|
|
259
|
+
|
|
260
|
+
// node_modules/react-day-picker/dist/esm/helpers/getBroadcastWeeksInMonth.js
|
|
261
|
+
var FIVE_WEEKS = 5;
|
|
262
|
+
var FOUR_WEEKS = 4;
|
|
263
|
+
function getBroadcastWeeksInMonth(month, dateLib) {
|
|
264
|
+
const firstDayOfMonth = dateLib.startOfMonth(month);
|
|
265
|
+
const firstDayOfWeek = firstDayOfMonth.getDay() > 0 ? firstDayOfMonth.getDay() : 7;
|
|
266
|
+
const broadcastStartDate = dateLib.addDays(month, -firstDayOfWeek + 1);
|
|
267
|
+
const lastDateOfLastWeek = dateLib.addDays(broadcastStartDate, FIVE_WEEKS * 7 - 1);
|
|
268
|
+
const numberOfWeeks = dateLib.getMonth(month) === dateLib.getMonth(lastDateOfLastWeek) ? FIVE_WEEKS : FOUR_WEEKS;
|
|
269
|
+
return numberOfWeeks;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
// node_modules/react-day-picker/dist/esm/helpers/startOfBroadcastWeek.js
|
|
273
|
+
function startOfBroadcastWeek(date, dateLib) {
|
|
274
|
+
const firstOfMonth = dateLib.startOfMonth(date);
|
|
275
|
+
const dayOfWeek = firstOfMonth.getDay();
|
|
276
|
+
if (dayOfWeek === 1) {
|
|
277
|
+
return firstOfMonth;
|
|
278
|
+
} else if (dayOfWeek === 0) {
|
|
279
|
+
return dateLib.addDays(firstOfMonth, -1 * 6);
|
|
280
|
+
} else {
|
|
281
|
+
return dateLib.addDays(firstOfMonth, -1 * (dayOfWeek - 1));
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
// node_modules/react-day-picker/dist/esm/helpers/endOfBroadcastWeek.js
|
|
286
|
+
function endOfBroadcastWeek(date, dateLib) {
|
|
287
|
+
const startDate = startOfBroadcastWeek(date, dateLib);
|
|
288
|
+
const numberOfWeeks = getBroadcastWeeksInMonth(date, dateLib);
|
|
289
|
+
const endDate = dateLib.addDays(startDate, numberOfWeeks * 7 - 1);
|
|
290
|
+
return endDate;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
// node_modules/react-day-picker/dist/esm/locale/en-US.js
|
|
294
|
+
import { format } from "date-fns";
|
|
295
|
+
import { enUS as dateFnsEnUS } from "date-fns/locale";
|
|
296
|
+
var enUS = {
|
|
297
|
+
...dateFnsEnUS,
|
|
298
|
+
labels: {
|
|
299
|
+
labelDayButton: (date, modifiers, options, dateLib) => {
|
|
300
|
+
let formatDate;
|
|
301
|
+
if (dateLib && typeof dateLib.format === "function") {
|
|
302
|
+
formatDate = dateLib.format.bind(dateLib);
|
|
303
|
+
} else {
|
|
304
|
+
formatDate = (d, pattern) => format(d, pattern, { locale: dateFnsEnUS, ...options });
|
|
305
|
+
}
|
|
306
|
+
let label = formatDate(date, "PPPP");
|
|
307
|
+
if (modifiers.today)
|
|
308
|
+
label = `Today, ${label}`;
|
|
309
|
+
if (modifiers.selected)
|
|
310
|
+
label = `${label}, selected`;
|
|
311
|
+
return label;
|
|
312
|
+
},
|
|
313
|
+
labelMonthDropdown: "Choose the Month",
|
|
314
|
+
labelNext: "Go to the Next Month",
|
|
315
|
+
labelPrevious: "Go to the Previous Month",
|
|
316
|
+
labelWeekNumber: (weekNumber) => `Week ${weekNumber}`,
|
|
317
|
+
labelYearDropdown: "Choose the Year",
|
|
318
|
+
labelGrid: (date, options, dateLib) => {
|
|
319
|
+
let formatDate;
|
|
320
|
+
if (dateLib && typeof dateLib.format === "function") {
|
|
321
|
+
formatDate = dateLib.format.bind(dateLib);
|
|
322
|
+
} else {
|
|
323
|
+
formatDate = (d, pattern) => format(d, pattern, { locale: dateFnsEnUS, ...options });
|
|
324
|
+
}
|
|
325
|
+
return formatDate(date, "LLLL yyyy");
|
|
326
|
+
},
|
|
327
|
+
labelGridcell: (date, modifiers, options, dateLib) => {
|
|
328
|
+
let formatDate;
|
|
329
|
+
if (dateLib && typeof dateLib.format === "function") {
|
|
330
|
+
formatDate = dateLib.format.bind(dateLib);
|
|
331
|
+
} else {
|
|
332
|
+
formatDate = (d, pattern) => format(d, pattern, { locale: dateFnsEnUS, ...options });
|
|
333
|
+
}
|
|
334
|
+
let label = formatDate(date, "PPPP");
|
|
335
|
+
if (modifiers?.today) {
|
|
336
|
+
label = `Today, ${label}`;
|
|
337
|
+
}
|
|
338
|
+
return label;
|
|
339
|
+
},
|
|
340
|
+
labelNav: "Navigation bar",
|
|
341
|
+
labelWeekNumberHeader: "Week Number",
|
|
342
|
+
labelWeekday: (date, options, dateLib) => {
|
|
343
|
+
let formatDate;
|
|
344
|
+
if (dateLib && typeof dateLib.format === "function") {
|
|
345
|
+
formatDate = dateLib.format.bind(dateLib);
|
|
346
|
+
} else {
|
|
347
|
+
formatDate = (d, pattern) => format(d, pattern, { locale: dateFnsEnUS, ...options });
|
|
348
|
+
}
|
|
349
|
+
return formatDate(date, "cccc");
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
};
|
|
353
|
+
|
|
354
|
+
// node_modules/react-day-picker/dist/esm/classes/DateLib.js
|
|
355
|
+
var DateLib = class _DateLib {
|
|
356
|
+
/**
|
|
357
|
+
* Creates an instance of `DateLib`.
|
|
358
|
+
*
|
|
359
|
+
* @param options Configuration options for the date library.
|
|
360
|
+
* @param overrides Custom overrides for the date library functions.
|
|
361
|
+
*/
|
|
362
|
+
constructor(options, overrides) {
|
|
363
|
+
this.Date = Date;
|
|
364
|
+
this.today = () => {
|
|
365
|
+
if (this.overrides?.today) {
|
|
366
|
+
return this.overrides.today();
|
|
367
|
+
}
|
|
368
|
+
if (this.options.timeZone) {
|
|
369
|
+
return TZDate.tz(this.options.timeZone);
|
|
370
|
+
}
|
|
371
|
+
return new this.Date();
|
|
372
|
+
};
|
|
373
|
+
this.newDate = (year, monthIndex, date) => {
|
|
374
|
+
if (this.overrides?.newDate) {
|
|
375
|
+
return this.overrides.newDate(year, monthIndex, date);
|
|
376
|
+
}
|
|
377
|
+
if (this.options.timeZone) {
|
|
378
|
+
return new TZDate(year, monthIndex, date, this.options.timeZone);
|
|
379
|
+
}
|
|
380
|
+
return new Date(year, monthIndex, date);
|
|
381
|
+
};
|
|
382
|
+
this.addDays = (date, amount) => {
|
|
383
|
+
return this.overrides?.addDays ? this.overrides.addDays(date, amount) : addDays(date, amount);
|
|
384
|
+
};
|
|
385
|
+
this.addMonths = (date, amount) => {
|
|
386
|
+
return this.overrides?.addMonths ? this.overrides.addMonths(date, amount) : addMonths(date, amount);
|
|
387
|
+
};
|
|
388
|
+
this.addWeeks = (date, amount) => {
|
|
389
|
+
return this.overrides?.addWeeks ? this.overrides.addWeeks(date, amount) : addWeeks(date, amount);
|
|
390
|
+
};
|
|
391
|
+
this.addYears = (date, amount) => {
|
|
392
|
+
return this.overrides?.addYears ? this.overrides.addYears(date, amount) : addYears(date, amount);
|
|
393
|
+
};
|
|
394
|
+
this.differenceInCalendarDays = (dateLeft, dateRight) => {
|
|
395
|
+
return this.overrides?.differenceInCalendarDays ? this.overrides.differenceInCalendarDays(dateLeft, dateRight) : differenceInCalendarDays(dateLeft, dateRight);
|
|
396
|
+
};
|
|
397
|
+
this.differenceInCalendarMonths = (dateLeft, dateRight) => {
|
|
398
|
+
return this.overrides?.differenceInCalendarMonths ? this.overrides.differenceInCalendarMonths(dateLeft, dateRight) : differenceInCalendarMonths(dateLeft, dateRight);
|
|
399
|
+
};
|
|
400
|
+
this.eachMonthOfInterval = (interval) => {
|
|
401
|
+
return this.overrides?.eachMonthOfInterval ? this.overrides.eachMonthOfInterval(interval) : eachMonthOfInterval(interval);
|
|
402
|
+
};
|
|
403
|
+
this.eachYearOfInterval = (interval) => {
|
|
404
|
+
const years = this.overrides?.eachYearOfInterval ? this.overrides.eachYearOfInterval(interval) : eachYearOfInterval(interval);
|
|
405
|
+
const uniqueYears = new Set(years.map((d) => this.getYear(d)));
|
|
406
|
+
if (uniqueYears.size === years.length) {
|
|
407
|
+
return years;
|
|
408
|
+
}
|
|
409
|
+
const yearsArray = [];
|
|
410
|
+
uniqueYears.forEach((y) => {
|
|
411
|
+
yearsArray.push(new Date(y, 0, 1));
|
|
412
|
+
});
|
|
413
|
+
return yearsArray;
|
|
414
|
+
};
|
|
415
|
+
this.endOfBroadcastWeek = (date) => {
|
|
416
|
+
return this.overrides?.endOfBroadcastWeek ? this.overrides.endOfBroadcastWeek(date) : endOfBroadcastWeek(date, this);
|
|
417
|
+
};
|
|
418
|
+
this.endOfISOWeek = (date) => {
|
|
419
|
+
return this.overrides?.endOfISOWeek ? this.overrides.endOfISOWeek(date) : endOfISOWeek(date);
|
|
420
|
+
};
|
|
421
|
+
this.endOfMonth = (date) => {
|
|
422
|
+
return this.overrides?.endOfMonth ? this.overrides.endOfMonth(date) : endOfMonth(date);
|
|
423
|
+
};
|
|
424
|
+
this.endOfWeek = (date, options2) => {
|
|
425
|
+
return this.overrides?.endOfWeek ? this.overrides.endOfWeek(date, options2) : endOfWeek(date, this.options);
|
|
426
|
+
};
|
|
427
|
+
this.endOfYear = (date) => {
|
|
428
|
+
return this.overrides?.endOfYear ? this.overrides.endOfYear(date) : endOfYear(date);
|
|
429
|
+
};
|
|
430
|
+
this.format = (date, formatStr, _options) => {
|
|
431
|
+
const formatted = this.overrides?.format ? this.overrides.format(date, formatStr, this.options) : format2(date, formatStr, this.options);
|
|
432
|
+
if (this.options.numerals && this.options.numerals !== "latn") {
|
|
433
|
+
return this.replaceDigits(formatted);
|
|
434
|
+
}
|
|
435
|
+
return formatted;
|
|
436
|
+
};
|
|
437
|
+
this.getISOWeek = (date) => {
|
|
438
|
+
return this.overrides?.getISOWeek ? this.overrides.getISOWeek(date) : getISOWeek(date);
|
|
439
|
+
};
|
|
440
|
+
this.getMonth = (date, _options) => {
|
|
441
|
+
return this.overrides?.getMonth ? this.overrides.getMonth(date, this.options) : getMonth(date, this.options);
|
|
442
|
+
};
|
|
443
|
+
this.getYear = (date, _options) => {
|
|
444
|
+
return this.overrides?.getYear ? this.overrides.getYear(date, this.options) : getYear(date, this.options);
|
|
445
|
+
};
|
|
446
|
+
this.getWeek = (date, _options) => {
|
|
447
|
+
return this.overrides?.getWeek ? this.overrides.getWeek(date, this.options) : getWeek(date, this.options);
|
|
448
|
+
};
|
|
449
|
+
this.isAfter = (date, dateToCompare) => {
|
|
450
|
+
return this.overrides?.isAfter ? this.overrides.isAfter(date, dateToCompare) : isAfter(date, dateToCompare);
|
|
451
|
+
};
|
|
452
|
+
this.isBefore = (date, dateToCompare) => {
|
|
453
|
+
return this.overrides?.isBefore ? this.overrides.isBefore(date, dateToCompare) : isBefore(date, dateToCompare);
|
|
454
|
+
};
|
|
455
|
+
this.isDate = (value) => {
|
|
456
|
+
return this.overrides?.isDate ? this.overrides.isDate(value) : isDate(value);
|
|
457
|
+
};
|
|
458
|
+
this.isSameDay = (dateLeft, dateRight) => {
|
|
459
|
+
return this.overrides?.isSameDay ? this.overrides.isSameDay(dateLeft, dateRight) : isSameDay(dateLeft, dateRight);
|
|
460
|
+
};
|
|
461
|
+
this.isSameMonth = (dateLeft, dateRight) => {
|
|
462
|
+
return this.overrides?.isSameMonth ? this.overrides.isSameMonth(dateLeft, dateRight) : isSameMonth(dateLeft, dateRight);
|
|
463
|
+
};
|
|
464
|
+
this.isSameYear = (dateLeft, dateRight) => {
|
|
465
|
+
return this.overrides?.isSameYear ? this.overrides.isSameYear(dateLeft, dateRight) : isSameYear(dateLeft, dateRight);
|
|
466
|
+
};
|
|
467
|
+
this.max = (dates) => {
|
|
468
|
+
return this.overrides?.max ? this.overrides.max(dates) : max(dates);
|
|
469
|
+
};
|
|
470
|
+
this.min = (dates) => {
|
|
471
|
+
return this.overrides?.min ? this.overrides.min(dates) : min(dates);
|
|
472
|
+
};
|
|
473
|
+
this.setMonth = (date, month) => {
|
|
474
|
+
return this.overrides?.setMonth ? this.overrides.setMonth(date, month) : setMonth(date, month);
|
|
475
|
+
};
|
|
476
|
+
this.setYear = (date, year) => {
|
|
477
|
+
return this.overrides?.setYear ? this.overrides.setYear(date, year) : setYear(date, year);
|
|
478
|
+
};
|
|
479
|
+
this.startOfBroadcastWeek = (date, _dateLib) => {
|
|
480
|
+
return this.overrides?.startOfBroadcastWeek ? this.overrides.startOfBroadcastWeek(date, this) : startOfBroadcastWeek(date, this);
|
|
481
|
+
};
|
|
482
|
+
this.startOfDay = (date) => {
|
|
483
|
+
return this.overrides?.startOfDay ? this.overrides.startOfDay(date) : startOfDay(date);
|
|
484
|
+
};
|
|
485
|
+
this.startOfISOWeek = (date) => {
|
|
486
|
+
return this.overrides?.startOfISOWeek ? this.overrides.startOfISOWeek(date) : startOfISOWeek(date);
|
|
487
|
+
};
|
|
488
|
+
this.startOfMonth = (date) => {
|
|
489
|
+
return this.overrides?.startOfMonth ? this.overrides.startOfMonth(date) : startOfMonth(date);
|
|
490
|
+
};
|
|
491
|
+
this.startOfWeek = (date, _options) => {
|
|
492
|
+
return this.overrides?.startOfWeek ? this.overrides.startOfWeek(date, this.options) : startOfWeek(date, this.options);
|
|
493
|
+
};
|
|
494
|
+
this.startOfYear = (date) => {
|
|
495
|
+
return this.overrides?.startOfYear ? this.overrides.startOfYear(date) : startOfYear(date);
|
|
496
|
+
};
|
|
497
|
+
this.options = { locale: enUS, ...options };
|
|
498
|
+
this.overrides = overrides;
|
|
499
|
+
}
|
|
500
|
+
/**
|
|
501
|
+
* Generates a mapping of Arabic digits (0-9) to the target numbering system
|
|
502
|
+
* digits.
|
|
503
|
+
*
|
|
504
|
+
* @since 9.5.0
|
|
505
|
+
* @returns A record mapping Arabic digits to the target numerals.
|
|
506
|
+
*/
|
|
507
|
+
getDigitMap() {
|
|
508
|
+
const { numerals = "latn" } = this.options;
|
|
509
|
+
const formatter = new Intl.NumberFormat("en-US", {
|
|
510
|
+
numberingSystem: numerals
|
|
511
|
+
});
|
|
512
|
+
const digitMap = {};
|
|
513
|
+
for (let i = 0; i < 10; i++) {
|
|
514
|
+
digitMap[i.toString()] = formatter.format(i);
|
|
515
|
+
}
|
|
516
|
+
return digitMap;
|
|
517
|
+
}
|
|
518
|
+
/**
|
|
519
|
+
* Replaces Arabic digits in a string with the target numbering system digits.
|
|
520
|
+
*
|
|
521
|
+
* @since 9.5.0
|
|
522
|
+
* @param input The string containing Arabic digits.
|
|
523
|
+
* @returns The string with digits replaced.
|
|
524
|
+
*/
|
|
525
|
+
replaceDigits(input) {
|
|
526
|
+
const digitMap = this.getDigitMap();
|
|
527
|
+
return input.replace(/\d/g, (digit) => digitMap[digit] || digit);
|
|
528
|
+
}
|
|
529
|
+
/**
|
|
530
|
+
* Formats a number using the configured numbering system.
|
|
531
|
+
*
|
|
532
|
+
* @since 9.5.0
|
|
533
|
+
* @param value The number to format.
|
|
534
|
+
* @returns The formatted number as a string.
|
|
535
|
+
*/
|
|
536
|
+
formatNumber(value) {
|
|
537
|
+
return this.replaceDigits(value.toString());
|
|
538
|
+
}
|
|
539
|
+
/**
|
|
540
|
+
* Returns the preferred ordering for month and year labels for the current
|
|
541
|
+
* locale.
|
|
542
|
+
*/
|
|
543
|
+
getMonthYearOrder() {
|
|
544
|
+
const code = this.options.locale?.code;
|
|
545
|
+
if (!code) {
|
|
546
|
+
return "month-first";
|
|
547
|
+
}
|
|
548
|
+
return _DateLib.yearFirstLocales.has(code) ? "year-first" : "month-first";
|
|
549
|
+
}
|
|
550
|
+
/**
|
|
551
|
+
* Formats the month/year pair respecting locale conventions.
|
|
552
|
+
*
|
|
553
|
+
* @since 9.11.0
|
|
554
|
+
*/
|
|
555
|
+
formatMonthYear(date) {
|
|
556
|
+
const { locale, timeZone, numerals } = this.options;
|
|
557
|
+
const localeCode = locale?.code;
|
|
558
|
+
if (localeCode && _DateLib.yearFirstLocales.has(localeCode)) {
|
|
559
|
+
try {
|
|
560
|
+
const intl = new Intl.DateTimeFormat(localeCode, {
|
|
561
|
+
month: "long",
|
|
562
|
+
year: "numeric",
|
|
563
|
+
timeZone,
|
|
564
|
+
numberingSystem: numerals
|
|
565
|
+
});
|
|
566
|
+
const formatted = intl.format(date);
|
|
567
|
+
return formatted;
|
|
568
|
+
} catch {
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
const pattern = this.getMonthYearOrder() === "year-first" ? "y LLLL" : "LLLL y";
|
|
572
|
+
return this.format(date, pattern);
|
|
573
|
+
}
|
|
574
|
+
};
|
|
575
|
+
DateLib.yearFirstLocales = /* @__PURE__ */ new Set([
|
|
576
|
+
"eu",
|
|
577
|
+
"hu",
|
|
578
|
+
"ja",
|
|
579
|
+
"ja-Hira",
|
|
580
|
+
"ja-JP",
|
|
581
|
+
"ko",
|
|
582
|
+
"ko-KR",
|
|
583
|
+
"lt",
|
|
584
|
+
"lt-LT",
|
|
585
|
+
"lv",
|
|
586
|
+
"lv-LV",
|
|
587
|
+
"mn",
|
|
588
|
+
"mn-MN",
|
|
589
|
+
"zh",
|
|
590
|
+
"zh-CN",
|
|
591
|
+
"zh-HK",
|
|
592
|
+
"zh-TW"
|
|
593
|
+
]);
|
|
594
|
+
var defaultDateLib = new DateLib();
|
|
595
|
+
|
|
596
|
+
// node_modules/react-day-picker/dist/esm/classes/CalendarDay.js
|
|
597
|
+
var CalendarDay = class {
|
|
598
|
+
constructor(date, displayMonth, dateLib = defaultDateLib) {
|
|
599
|
+
this.date = date;
|
|
600
|
+
this.displayMonth = displayMonth;
|
|
601
|
+
this.outside = Boolean(displayMonth && !dateLib.isSameMonth(date, displayMonth));
|
|
602
|
+
this.dateLib = dateLib;
|
|
603
|
+
this.isoDate = dateLib.format(date, "yyyy-MM-dd");
|
|
604
|
+
this.displayMonthId = dateLib.format(displayMonth, "yyyy-MM");
|
|
605
|
+
this.dateMonthId = dateLib.format(date, "yyyy-MM");
|
|
606
|
+
}
|
|
607
|
+
/**
|
|
608
|
+
* Checks if this day is equal to another `CalendarDay`, considering both the
|
|
609
|
+
* date and the displayed month.
|
|
610
|
+
*
|
|
611
|
+
* @param day The `CalendarDay` to compare with.
|
|
612
|
+
* @returns `true` if the days are equal, otherwise `false`.
|
|
613
|
+
*/
|
|
614
|
+
isEqualTo(day) {
|
|
615
|
+
return this.dateLib.isSameDay(day.date, this.date) && this.dateLib.isSameMonth(day.displayMonth, this.displayMonth);
|
|
616
|
+
}
|
|
617
|
+
};
|
|
618
|
+
|
|
619
|
+
// node_modules/react-day-picker/dist/esm/classes/CalendarMonth.js
|
|
620
|
+
var CalendarMonth = class {
|
|
621
|
+
constructor(month, weeks) {
|
|
622
|
+
this.date = month;
|
|
623
|
+
this.weeks = weeks;
|
|
624
|
+
}
|
|
625
|
+
};
|
|
626
|
+
|
|
627
|
+
// node_modules/react-day-picker/dist/esm/classes/CalendarWeek.js
|
|
628
|
+
var CalendarWeek = class {
|
|
629
|
+
constructor(weekNumber, days) {
|
|
630
|
+
this.days = days;
|
|
631
|
+
this.weekNumber = weekNumber;
|
|
632
|
+
}
|
|
633
|
+
};
|
|
634
|
+
|
|
635
|
+
// node_modules/react-day-picker/dist/esm/components/custom-components.js
|
|
636
|
+
var custom_components_exports = {};
|
|
637
|
+
__export(custom_components_exports, {
|
|
638
|
+
Button: () => Button,
|
|
639
|
+
CaptionLabel: () => CaptionLabel,
|
|
640
|
+
Chevron: () => Chevron,
|
|
641
|
+
Day: () => Day,
|
|
642
|
+
DayButton: () => DayButton,
|
|
643
|
+
Dropdown: () => Dropdown,
|
|
644
|
+
DropdownNav: () => DropdownNav,
|
|
645
|
+
Footer: () => Footer,
|
|
646
|
+
Month: () => Month,
|
|
647
|
+
MonthCaption: () => MonthCaption,
|
|
648
|
+
MonthGrid: () => MonthGrid,
|
|
649
|
+
Months: () => Months,
|
|
650
|
+
MonthsDropdown: () => MonthsDropdown,
|
|
651
|
+
Nav: () => Nav,
|
|
652
|
+
NextMonthButton: () => NextMonthButton,
|
|
653
|
+
Option: () => Option,
|
|
654
|
+
PreviousMonthButton: () => PreviousMonthButton,
|
|
655
|
+
Root: () => Root,
|
|
656
|
+
Select: () => Select,
|
|
657
|
+
Week: () => Week,
|
|
658
|
+
WeekNumber: () => WeekNumber,
|
|
659
|
+
WeekNumberHeader: () => WeekNumberHeader,
|
|
660
|
+
Weekday: () => Weekday,
|
|
661
|
+
Weekdays: () => Weekdays,
|
|
662
|
+
Weeks: () => Weeks,
|
|
663
|
+
YearsDropdown: () => YearsDropdown
|
|
664
|
+
});
|
|
665
|
+
|
|
666
|
+
// node_modules/react-day-picker/dist/esm/components/Button.js
|
|
667
|
+
import React from "react";
|
|
668
|
+
function Button(props) {
|
|
669
|
+
return React.createElement("button", { ...props });
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
// node_modules/react-day-picker/dist/esm/components/CaptionLabel.js
|
|
673
|
+
import React2 from "react";
|
|
674
|
+
function CaptionLabel(props) {
|
|
675
|
+
return React2.createElement("span", { ...props });
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
// node_modules/react-day-picker/dist/esm/components/Chevron.js
|
|
679
|
+
import React3 from "react";
|
|
680
|
+
function Chevron(props) {
|
|
681
|
+
const { size = 24, orientation = "left", className } = props;
|
|
682
|
+
return (
|
|
683
|
+
// biome-ignore lint/a11y/noSvgWithoutTitle: handled by the parent component
|
|
684
|
+
React3.createElement(
|
|
685
|
+
"svg",
|
|
686
|
+
{ className, width: size, height: size, viewBox: "0 0 24 24" },
|
|
687
|
+
orientation === "up" && React3.createElement("polygon", { points: "6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28" }),
|
|
688
|
+
orientation === "down" && React3.createElement("polygon", { points: "6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72" }),
|
|
689
|
+
orientation === "left" && React3.createElement("polygon", { points: "16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20" }),
|
|
690
|
+
orientation === "right" && React3.createElement("polygon", { points: "8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20" })
|
|
691
|
+
)
|
|
692
|
+
);
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
// node_modules/react-day-picker/dist/esm/components/Day.js
|
|
696
|
+
import React4 from "react";
|
|
697
|
+
function Day(props) {
|
|
698
|
+
const { day, modifiers, ...tdProps } = props;
|
|
699
|
+
return React4.createElement("td", { ...tdProps });
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
// node_modules/react-day-picker/dist/esm/components/DayButton.js
|
|
703
|
+
import React5 from "react";
|
|
704
|
+
function DayButton(props) {
|
|
705
|
+
const { day, modifiers, ...buttonProps } = props;
|
|
706
|
+
const ref = React5.useRef(null);
|
|
707
|
+
React5.useEffect(() => {
|
|
708
|
+
if (modifiers.focused)
|
|
709
|
+
ref.current?.focus();
|
|
710
|
+
}, [modifiers.focused]);
|
|
711
|
+
return React5.createElement("button", { ref, ...buttonProps });
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
// node_modules/react-day-picker/dist/esm/components/Dropdown.js
|
|
715
|
+
import React6 from "react";
|
|
716
|
+
|
|
717
|
+
// node_modules/react-day-picker/dist/esm/UI.js
|
|
718
|
+
var UI;
|
|
719
|
+
(function(UI2) {
|
|
720
|
+
UI2["Root"] = "root";
|
|
721
|
+
UI2["Chevron"] = "chevron";
|
|
722
|
+
UI2["Day"] = "day";
|
|
723
|
+
UI2["DayButton"] = "day_button";
|
|
724
|
+
UI2["CaptionLabel"] = "caption_label";
|
|
725
|
+
UI2["Dropdowns"] = "dropdowns";
|
|
726
|
+
UI2["Dropdown"] = "dropdown";
|
|
727
|
+
UI2["DropdownRoot"] = "dropdown_root";
|
|
728
|
+
UI2["Footer"] = "footer";
|
|
729
|
+
UI2["MonthGrid"] = "month_grid";
|
|
730
|
+
UI2["MonthCaption"] = "month_caption";
|
|
731
|
+
UI2["MonthsDropdown"] = "months_dropdown";
|
|
732
|
+
UI2["Month"] = "month";
|
|
733
|
+
UI2["Months"] = "months";
|
|
734
|
+
UI2["Nav"] = "nav";
|
|
735
|
+
UI2["NextMonthButton"] = "button_next";
|
|
736
|
+
UI2["PreviousMonthButton"] = "button_previous";
|
|
737
|
+
UI2["Week"] = "week";
|
|
738
|
+
UI2["Weeks"] = "weeks";
|
|
739
|
+
UI2["Weekday"] = "weekday";
|
|
740
|
+
UI2["Weekdays"] = "weekdays";
|
|
741
|
+
UI2["WeekNumber"] = "week_number";
|
|
742
|
+
UI2["WeekNumberHeader"] = "week_number_header";
|
|
743
|
+
UI2["YearsDropdown"] = "years_dropdown";
|
|
744
|
+
})(UI || (UI = {}));
|
|
745
|
+
var DayFlag;
|
|
746
|
+
(function(DayFlag2) {
|
|
747
|
+
DayFlag2["disabled"] = "disabled";
|
|
748
|
+
DayFlag2["hidden"] = "hidden";
|
|
749
|
+
DayFlag2["outside"] = "outside";
|
|
750
|
+
DayFlag2["focused"] = "focused";
|
|
751
|
+
DayFlag2["today"] = "today";
|
|
752
|
+
})(DayFlag || (DayFlag = {}));
|
|
753
|
+
var SelectionState;
|
|
754
|
+
(function(SelectionState2) {
|
|
755
|
+
SelectionState2["range_end"] = "range_end";
|
|
756
|
+
SelectionState2["range_middle"] = "range_middle";
|
|
757
|
+
SelectionState2["range_start"] = "range_start";
|
|
758
|
+
SelectionState2["selected"] = "selected";
|
|
759
|
+
})(SelectionState || (SelectionState = {}));
|
|
760
|
+
var Animation;
|
|
761
|
+
(function(Animation2) {
|
|
762
|
+
Animation2["weeks_before_enter"] = "weeks_before_enter";
|
|
763
|
+
Animation2["weeks_before_exit"] = "weeks_before_exit";
|
|
764
|
+
Animation2["weeks_after_enter"] = "weeks_after_enter";
|
|
765
|
+
Animation2["weeks_after_exit"] = "weeks_after_exit";
|
|
766
|
+
Animation2["caption_after_enter"] = "caption_after_enter";
|
|
767
|
+
Animation2["caption_after_exit"] = "caption_after_exit";
|
|
768
|
+
Animation2["caption_before_enter"] = "caption_before_enter";
|
|
769
|
+
Animation2["caption_before_exit"] = "caption_before_exit";
|
|
770
|
+
})(Animation || (Animation = {}));
|
|
771
|
+
|
|
772
|
+
// node_modules/react-day-picker/dist/esm/components/Dropdown.js
|
|
773
|
+
function Dropdown(props) {
|
|
774
|
+
const { options, className, components, classNames, ...selectProps } = props;
|
|
775
|
+
const cssClassSelect = [classNames[UI.Dropdown], className].join(" ");
|
|
776
|
+
const selectedOption = options?.find(({ value }) => value === selectProps.value);
|
|
777
|
+
return React6.createElement(
|
|
778
|
+
"span",
|
|
779
|
+
{ "data-disabled": selectProps.disabled, className: classNames[UI.DropdownRoot] },
|
|
780
|
+
React6.createElement(components.Select, { className: cssClassSelect, ...selectProps }, options?.map(({ value, label, disabled }) => React6.createElement(components.Option, { key: value, value, disabled }, label))),
|
|
781
|
+
React6.createElement(
|
|
782
|
+
"span",
|
|
783
|
+
{ className: classNames[UI.CaptionLabel], "aria-hidden": true },
|
|
784
|
+
selectedOption?.label,
|
|
785
|
+
React6.createElement(components.Chevron, { orientation: "down", size: 18, className: classNames[UI.Chevron] })
|
|
786
|
+
)
|
|
787
|
+
);
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
// node_modules/react-day-picker/dist/esm/components/DropdownNav.js
|
|
791
|
+
import React7 from "react";
|
|
792
|
+
function DropdownNav(props) {
|
|
793
|
+
return React7.createElement("div", { ...props });
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
// node_modules/react-day-picker/dist/esm/components/Footer.js
|
|
797
|
+
import React8 from "react";
|
|
798
|
+
function Footer(props) {
|
|
799
|
+
return React8.createElement("div", { ...props });
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
// node_modules/react-day-picker/dist/esm/components/Month.js
|
|
803
|
+
import React9 from "react";
|
|
804
|
+
function Month(props) {
|
|
805
|
+
const { calendarMonth, displayIndex, ...divProps } = props;
|
|
806
|
+
return React9.createElement("div", { ...divProps }, props.children);
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
// node_modules/react-day-picker/dist/esm/components/MonthCaption.js
|
|
810
|
+
import React10 from "react";
|
|
811
|
+
function MonthCaption(props) {
|
|
812
|
+
const { calendarMonth, displayIndex, ...divProps } = props;
|
|
813
|
+
return React10.createElement("div", { ...divProps });
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
// node_modules/react-day-picker/dist/esm/components/MonthGrid.js
|
|
817
|
+
import React11 from "react";
|
|
818
|
+
function MonthGrid(props) {
|
|
819
|
+
return React11.createElement("table", { ...props });
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
// node_modules/react-day-picker/dist/esm/components/Months.js
|
|
823
|
+
import React12 from "react";
|
|
824
|
+
function Months(props) {
|
|
825
|
+
return React12.createElement("div", { ...props });
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
// node_modules/react-day-picker/dist/esm/components/MonthsDropdown.js
|
|
829
|
+
import React13 from "react";
|
|
830
|
+
|
|
831
|
+
// node_modules/react-day-picker/dist/esm/useDayPicker.js
|
|
832
|
+
import { createContext, useContext } from "react";
|
|
833
|
+
var dayPickerContext = createContext(void 0);
|
|
834
|
+
function useDayPicker() {
|
|
835
|
+
const context = useContext(dayPickerContext);
|
|
836
|
+
if (context === void 0) {
|
|
837
|
+
throw new Error("useDayPicker() must be used within a custom component.");
|
|
838
|
+
}
|
|
839
|
+
return context;
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
// node_modules/react-day-picker/dist/esm/components/MonthsDropdown.js
|
|
843
|
+
function MonthsDropdown(props) {
|
|
844
|
+
const { components } = useDayPicker();
|
|
845
|
+
return React13.createElement(components.Dropdown, { ...props });
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
// node_modules/react-day-picker/dist/esm/components/Nav.js
|
|
849
|
+
import React14, { useCallback } from "react";
|
|
850
|
+
function Nav(props) {
|
|
851
|
+
const { onPreviousClick, onNextClick, previousMonth, nextMonth, ...navProps } = props;
|
|
852
|
+
const { components, classNames, labels: { labelPrevious: labelPrevious2, labelNext: labelNext2 } } = useDayPicker();
|
|
853
|
+
const handleNextClick = useCallback((e) => {
|
|
854
|
+
if (nextMonth) {
|
|
855
|
+
onNextClick?.(e);
|
|
856
|
+
}
|
|
857
|
+
}, [nextMonth, onNextClick]);
|
|
858
|
+
const handlePreviousClick = useCallback((e) => {
|
|
859
|
+
if (previousMonth) {
|
|
860
|
+
onPreviousClick?.(e);
|
|
861
|
+
}
|
|
862
|
+
}, [previousMonth, onPreviousClick]);
|
|
863
|
+
return React14.createElement(
|
|
864
|
+
"nav",
|
|
865
|
+
{ ...navProps },
|
|
866
|
+
React14.createElement(
|
|
867
|
+
components.PreviousMonthButton,
|
|
868
|
+
{ type: "button", className: classNames[UI.PreviousMonthButton], tabIndex: previousMonth ? void 0 : -1, "aria-disabled": previousMonth ? void 0 : true, "aria-label": labelPrevious2(previousMonth), onClick: handlePreviousClick },
|
|
869
|
+
React14.createElement(components.Chevron, { disabled: previousMonth ? void 0 : true, className: classNames[UI.Chevron], orientation: "left" })
|
|
870
|
+
),
|
|
871
|
+
React14.createElement(
|
|
872
|
+
components.NextMonthButton,
|
|
873
|
+
{ type: "button", className: classNames[UI.NextMonthButton], tabIndex: nextMonth ? void 0 : -1, "aria-disabled": nextMonth ? void 0 : true, "aria-label": labelNext2(nextMonth), onClick: handleNextClick },
|
|
874
|
+
React14.createElement(components.Chevron, { disabled: nextMonth ? void 0 : true, orientation: "right", className: classNames[UI.Chevron] })
|
|
875
|
+
)
|
|
876
|
+
);
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
// node_modules/react-day-picker/dist/esm/components/NextMonthButton.js
|
|
880
|
+
import React15 from "react";
|
|
881
|
+
function NextMonthButton(props) {
|
|
882
|
+
const { components } = useDayPicker();
|
|
883
|
+
return React15.createElement(components.Button, { ...props });
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
// node_modules/react-day-picker/dist/esm/components/Option.js
|
|
887
|
+
import React16 from "react";
|
|
888
|
+
function Option(props) {
|
|
889
|
+
return React16.createElement("option", { ...props });
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
// node_modules/react-day-picker/dist/esm/components/PreviousMonthButton.js
|
|
893
|
+
import React17 from "react";
|
|
894
|
+
function PreviousMonthButton(props) {
|
|
895
|
+
const { components } = useDayPicker();
|
|
896
|
+
return React17.createElement(components.Button, { ...props });
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
// node_modules/react-day-picker/dist/esm/components/Root.js
|
|
900
|
+
import React18 from "react";
|
|
901
|
+
function Root(props) {
|
|
902
|
+
const { rootRef, ...rest } = props;
|
|
903
|
+
return React18.createElement("div", { ...rest, ref: rootRef });
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
// node_modules/react-day-picker/dist/esm/components/Select.js
|
|
907
|
+
import React19 from "react";
|
|
908
|
+
function Select(props) {
|
|
909
|
+
return React19.createElement("select", { ...props });
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
// node_modules/react-day-picker/dist/esm/components/Week.js
|
|
913
|
+
import React20 from "react";
|
|
914
|
+
function Week(props) {
|
|
915
|
+
const { week, ...trProps } = props;
|
|
916
|
+
return React20.createElement("tr", { ...trProps });
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
// node_modules/react-day-picker/dist/esm/components/Weekday.js
|
|
920
|
+
import React21 from "react";
|
|
921
|
+
function Weekday(props) {
|
|
922
|
+
return React21.createElement("th", { ...props });
|
|
923
|
+
}
|
|
924
|
+
|
|
925
|
+
// node_modules/react-day-picker/dist/esm/components/Weekdays.js
|
|
926
|
+
import React22 from "react";
|
|
927
|
+
function Weekdays(props) {
|
|
928
|
+
return React22.createElement(
|
|
929
|
+
"thead",
|
|
930
|
+
{ "aria-hidden": true },
|
|
931
|
+
React22.createElement("tr", { ...props })
|
|
932
|
+
);
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
// node_modules/react-day-picker/dist/esm/components/WeekNumber.js
|
|
936
|
+
import React23 from "react";
|
|
937
|
+
function WeekNumber(props) {
|
|
938
|
+
const { week, ...thProps } = props;
|
|
939
|
+
return React23.createElement("th", { ...thProps });
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
// node_modules/react-day-picker/dist/esm/components/WeekNumberHeader.js
|
|
943
|
+
import React24 from "react";
|
|
944
|
+
function WeekNumberHeader(props) {
|
|
945
|
+
return React24.createElement("th", { ...props });
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
// node_modules/react-day-picker/dist/esm/components/Weeks.js
|
|
949
|
+
import React25 from "react";
|
|
950
|
+
function Weeks(props) {
|
|
951
|
+
return React25.createElement("tbody", { ...props });
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
// node_modules/react-day-picker/dist/esm/components/YearsDropdown.js
|
|
955
|
+
import React26 from "react";
|
|
956
|
+
function YearsDropdown(props) {
|
|
957
|
+
const { components } = useDayPicker();
|
|
958
|
+
return React26.createElement(components.Dropdown, { ...props });
|
|
959
|
+
}
|
|
960
|
+
|
|
961
|
+
// node_modules/react-day-picker/dist/esm/DayPicker.js
|
|
962
|
+
import React27, { useCallback as useCallback2, useMemo as useMemo2, useRef as useRef2 } from "react";
|
|
963
|
+
|
|
964
|
+
// node_modules/react-day-picker/dist/esm/utils/rangeIncludesDate.js
|
|
965
|
+
function rangeIncludesDate(range, date, excludeEnds = false, dateLib = defaultDateLib) {
|
|
966
|
+
let { from, to } = range;
|
|
967
|
+
const { differenceInCalendarDays: differenceInCalendarDays2, isSameDay: isSameDay2 } = dateLib;
|
|
968
|
+
if (from && to) {
|
|
969
|
+
const isRangeInverted = differenceInCalendarDays2(to, from) < 0;
|
|
970
|
+
if (isRangeInverted) {
|
|
971
|
+
[from, to] = [to, from];
|
|
972
|
+
}
|
|
973
|
+
const isInRange = differenceInCalendarDays2(date, from) >= (excludeEnds ? 1 : 0) && differenceInCalendarDays2(to, date) >= (excludeEnds ? 1 : 0);
|
|
974
|
+
return isInRange;
|
|
975
|
+
}
|
|
976
|
+
if (!excludeEnds && to) {
|
|
977
|
+
return isSameDay2(to, date);
|
|
978
|
+
}
|
|
979
|
+
if (!excludeEnds && from) {
|
|
980
|
+
return isSameDay2(from, date);
|
|
981
|
+
}
|
|
982
|
+
return false;
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
// node_modules/react-day-picker/dist/esm/utils/typeguards.js
|
|
986
|
+
function isDateInterval(matcher) {
|
|
987
|
+
return Boolean(matcher && typeof matcher === "object" && "before" in matcher && "after" in matcher);
|
|
988
|
+
}
|
|
989
|
+
function isDateRange(value) {
|
|
990
|
+
return Boolean(value && typeof value === "object" && "from" in value);
|
|
991
|
+
}
|
|
992
|
+
function isDateAfterType(value) {
|
|
993
|
+
return Boolean(value && typeof value === "object" && "after" in value);
|
|
994
|
+
}
|
|
995
|
+
function isDateBeforeType(value) {
|
|
996
|
+
return Boolean(value && typeof value === "object" && "before" in value);
|
|
997
|
+
}
|
|
998
|
+
function isDayOfWeekType(value) {
|
|
999
|
+
return Boolean(value && typeof value === "object" && "dayOfWeek" in value);
|
|
1000
|
+
}
|
|
1001
|
+
function isDatesArray(value, dateLib) {
|
|
1002
|
+
return Array.isArray(value) && value.every(dateLib.isDate);
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
// node_modules/react-day-picker/dist/esm/utils/dateMatchModifiers.js
|
|
1006
|
+
function dateMatchModifiers(date, matchers, dateLib = defaultDateLib) {
|
|
1007
|
+
const matchersArr = !Array.isArray(matchers) ? [matchers] : matchers;
|
|
1008
|
+
const { isSameDay: isSameDay2, differenceInCalendarDays: differenceInCalendarDays2, isAfter: isAfter2 } = dateLib;
|
|
1009
|
+
return matchersArr.some((matcher) => {
|
|
1010
|
+
if (typeof matcher === "boolean") {
|
|
1011
|
+
return matcher;
|
|
1012
|
+
}
|
|
1013
|
+
if (dateLib.isDate(matcher)) {
|
|
1014
|
+
return isSameDay2(date, matcher);
|
|
1015
|
+
}
|
|
1016
|
+
if (isDatesArray(matcher, dateLib)) {
|
|
1017
|
+
return matcher.some((matcherDate) => isSameDay2(date, matcherDate));
|
|
1018
|
+
}
|
|
1019
|
+
if (isDateRange(matcher)) {
|
|
1020
|
+
return rangeIncludesDate(matcher, date, false, dateLib);
|
|
1021
|
+
}
|
|
1022
|
+
if (isDayOfWeekType(matcher)) {
|
|
1023
|
+
if (!Array.isArray(matcher.dayOfWeek)) {
|
|
1024
|
+
return matcher.dayOfWeek === date.getDay();
|
|
1025
|
+
}
|
|
1026
|
+
return matcher.dayOfWeek.includes(date.getDay());
|
|
1027
|
+
}
|
|
1028
|
+
if (isDateInterval(matcher)) {
|
|
1029
|
+
const diffBefore = differenceInCalendarDays2(matcher.before, date);
|
|
1030
|
+
const diffAfter = differenceInCalendarDays2(matcher.after, date);
|
|
1031
|
+
const isDayBefore = diffBefore > 0;
|
|
1032
|
+
const isDayAfter = diffAfter < 0;
|
|
1033
|
+
const isClosedInterval = isAfter2(matcher.before, matcher.after);
|
|
1034
|
+
if (isClosedInterval) {
|
|
1035
|
+
return isDayAfter && isDayBefore;
|
|
1036
|
+
} else {
|
|
1037
|
+
return isDayBefore || isDayAfter;
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
if (isDateAfterType(matcher)) {
|
|
1041
|
+
return differenceInCalendarDays2(date, matcher.after) > 0;
|
|
1042
|
+
}
|
|
1043
|
+
if (isDateBeforeType(matcher)) {
|
|
1044
|
+
return differenceInCalendarDays2(matcher.before, date) > 0;
|
|
1045
|
+
}
|
|
1046
|
+
if (typeof matcher === "function") {
|
|
1047
|
+
return matcher(date);
|
|
1048
|
+
}
|
|
1049
|
+
return false;
|
|
1050
|
+
});
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
// node_modules/react-day-picker/dist/esm/helpers/createGetModifiers.js
|
|
1054
|
+
function createGetModifiers(days, props, navStart, navEnd, dateLib) {
|
|
1055
|
+
const { disabled, hidden, modifiers, showOutsideDays, broadcastCalendar, today = dateLib.today() } = props;
|
|
1056
|
+
const { isSameDay: isSameDay2, isSameMonth: isSameMonth2, startOfMonth: startOfMonth2, isBefore: isBefore2, endOfMonth: endOfMonth2, isAfter: isAfter2 } = dateLib;
|
|
1057
|
+
const computedNavStart = navStart && startOfMonth2(navStart);
|
|
1058
|
+
const computedNavEnd = navEnd && endOfMonth2(navEnd);
|
|
1059
|
+
const internalModifiersMap = {
|
|
1060
|
+
[DayFlag.focused]: [],
|
|
1061
|
+
[DayFlag.outside]: [],
|
|
1062
|
+
[DayFlag.disabled]: [],
|
|
1063
|
+
[DayFlag.hidden]: [],
|
|
1064
|
+
[DayFlag.today]: []
|
|
1065
|
+
};
|
|
1066
|
+
const customModifiersMap = {};
|
|
1067
|
+
for (const day of days) {
|
|
1068
|
+
const { date, displayMonth } = day;
|
|
1069
|
+
const isOutside = Boolean(displayMonth && !isSameMonth2(date, displayMonth));
|
|
1070
|
+
const isBeforeNavStart = Boolean(computedNavStart && isBefore2(date, computedNavStart));
|
|
1071
|
+
const isAfterNavEnd = Boolean(computedNavEnd && isAfter2(date, computedNavEnd));
|
|
1072
|
+
const isDisabled = Boolean(disabled && dateMatchModifiers(date, disabled, dateLib));
|
|
1073
|
+
const isHidden = Boolean(hidden && dateMatchModifiers(date, hidden, dateLib)) || isBeforeNavStart || isAfterNavEnd || // Broadcast calendar will show outside days as default
|
|
1074
|
+
!broadcastCalendar && !showOutsideDays && isOutside || broadcastCalendar && showOutsideDays === false && isOutside;
|
|
1075
|
+
const isToday = isSameDay2(date, today);
|
|
1076
|
+
if (isOutside)
|
|
1077
|
+
internalModifiersMap.outside.push(day);
|
|
1078
|
+
if (isDisabled)
|
|
1079
|
+
internalModifiersMap.disabled.push(day);
|
|
1080
|
+
if (isHidden)
|
|
1081
|
+
internalModifiersMap.hidden.push(day);
|
|
1082
|
+
if (isToday)
|
|
1083
|
+
internalModifiersMap.today.push(day);
|
|
1084
|
+
if (modifiers) {
|
|
1085
|
+
Object.keys(modifiers).forEach((name) => {
|
|
1086
|
+
const modifierValue = modifiers?.[name];
|
|
1087
|
+
const isMatch = modifierValue ? dateMatchModifiers(date, modifierValue, dateLib) : false;
|
|
1088
|
+
if (!isMatch)
|
|
1089
|
+
return;
|
|
1090
|
+
if (customModifiersMap[name]) {
|
|
1091
|
+
customModifiersMap[name].push(day);
|
|
1092
|
+
} else {
|
|
1093
|
+
customModifiersMap[name] = [day];
|
|
1094
|
+
}
|
|
1095
|
+
});
|
|
1096
|
+
}
|
|
1097
|
+
}
|
|
1098
|
+
return (day) => {
|
|
1099
|
+
const dayFlags = {
|
|
1100
|
+
[DayFlag.focused]: false,
|
|
1101
|
+
[DayFlag.disabled]: false,
|
|
1102
|
+
[DayFlag.hidden]: false,
|
|
1103
|
+
[DayFlag.outside]: false,
|
|
1104
|
+
[DayFlag.today]: false
|
|
1105
|
+
};
|
|
1106
|
+
const customModifiers = {};
|
|
1107
|
+
for (const name in internalModifiersMap) {
|
|
1108
|
+
const days2 = internalModifiersMap[name];
|
|
1109
|
+
dayFlags[name] = days2.some((d) => d === day);
|
|
1110
|
+
}
|
|
1111
|
+
for (const name in customModifiersMap) {
|
|
1112
|
+
customModifiers[name] = customModifiersMap[name].some((d) => d === day);
|
|
1113
|
+
}
|
|
1114
|
+
return {
|
|
1115
|
+
...dayFlags,
|
|
1116
|
+
// custom modifiers should override all the previous ones
|
|
1117
|
+
...customModifiers
|
|
1118
|
+
};
|
|
1119
|
+
};
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
// node_modules/react-day-picker/dist/esm/helpers/getClassNamesForModifiers.js
|
|
1123
|
+
function getClassNamesForModifiers(modifiers, classNames, modifiersClassNames = {}) {
|
|
1124
|
+
const modifierClassNames = Object.entries(modifiers).filter(([, active]) => active === true).reduce((previousValue, [key]) => {
|
|
1125
|
+
if (modifiersClassNames[key]) {
|
|
1126
|
+
previousValue.push(modifiersClassNames[key]);
|
|
1127
|
+
} else if (classNames[DayFlag[key]]) {
|
|
1128
|
+
previousValue.push(classNames[DayFlag[key]]);
|
|
1129
|
+
} else if (classNames[SelectionState[key]]) {
|
|
1130
|
+
previousValue.push(classNames[SelectionState[key]]);
|
|
1131
|
+
}
|
|
1132
|
+
return previousValue;
|
|
1133
|
+
}, [classNames[UI.Day]]);
|
|
1134
|
+
return modifierClassNames;
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1137
|
+
// node_modules/react-day-picker/dist/esm/helpers/getComponents.js
|
|
1138
|
+
function getComponents(customComponents) {
|
|
1139
|
+
return {
|
|
1140
|
+
...custom_components_exports,
|
|
1141
|
+
...customComponents
|
|
1142
|
+
};
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1145
|
+
// node_modules/react-day-picker/dist/esm/helpers/getDataAttributes.js
|
|
1146
|
+
function getDataAttributes(props) {
|
|
1147
|
+
const dataAttributes = {
|
|
1148
|
+
"data-mode": props.mode ?? void 0,
|
|
1149
|
+
"data-required": "required" in props ? props.required : void 0,
|
|
1150
|
+
"data-multiple-months": props.numberOfMonths && props.numberOfMonths > 1 || void 0,
|
|
1151
|
+
"data-week-numbers": props.showWeekNumber || void 0,
|
|
1152
|
+
"data-broadcast-calendar": props.broadcastCalendar || void 0,
|
|
1153
|
+
"data-nav-layout": props.navLayout || void 0
|
|
1154
|
+
};
|
|
1155
|
+
Object.entries(props).forEach(([key, val]) => {
|
|
1156
|
+
if (key.startsWith("data-")) {
|
|
1157
|
+
dataAttributes[key] = val;
|
|
1158
|
+
}
|
|
1159
|
+
});
|
|
1160
|
+
return dataAttributes;
|
|
1161
|
+
}
|
|
1162
|
+
|
|
1163
|
+
// node_modules/react-day-picker/dist/esm/helpers/getDefaultClassNames.js
|
|
1164
|
+
function getDefaultClassNames() {
|
|
1165
|
+
const classNames = {};
|
|
1166
|
+
for (const key in UI) {
|
|
1167
|
+
classNames[UI[key]] = `rdp-${UI[key]}`;
|
|
1168
|
+
}
|
|
1169
|
+
for (const key in DayFlag) {
|
|
1170
|
+
classNames[DayFlag[key]] = `rdp-${DayFlag[key]}`;
|
|
1171
|
+
}
|
|
1172
|
+
for (const key in SelectionState) {
|
|
1173
|
+
classNames[SelectionState[key]] = `rdp-${SelectionState[key]}`;
|
|
1174
|
+
}
|
|
1175
|
+
for (const key in Animation) {
|
|
1176
|
+
classNames[Animation[key]] = `rdp-${Animation[key]}`;
|
|
1177
|
+
}
|
|
1178
|
+
return classNames;
|
|
1179
|
+
}
|
|
1180
|
+
|
|
1181
|
+
// node_modules/react-day-picker/dist/esm/formatters/index.js
|
|
1182
|
+
var formatters_exports = {};
|
|
1183
|
+
__export(formatters_exports, {
|
|
1184
|
+
formatCaption: () => formatCaption,
|
|
1185
|
+
formatDay: () => formatDay,
|
|
1186
|
+
formatMonthCaption: () => formatMonthCaption,
|
|
1187
|
+
formatMonthDropdown: () => formatMonthDropdown,
|
|
1188
|
+
formatWeekNumber: () => formatWeekNumber,
|
|
1189
|
+
formatWeekNumberHeader: () => formatWeekNumberHeader,
|
|
1190
|
+
formatWeekdayName: () => formatWeekdayName,
|
|
1191
|
+
formatYearCaption: () => formatYearCaption,
|
|
1192
|
+
formatYearDropdown: () => formatYearDropdown
|
|
1193
|
+
});
|
|
1194
|
+
|
|
1195
|
+
// node_modules/react-day-picker/dist/esm/formatters/formatCaption.js
|
|
1196
|
+
function formatCaption(month, options, dateLib) {
|
|
1197
|
+
const lib = dateLib ?? new DateLib(options);
|
|
1198
|
+
return lib.formatMonthYear(month);
|
|
1199
|
+
}
|
|
1200
|
+
var formatMonthCaption = formatCaption;
|
|
1201
|
+
|
|
1202
|
+
// node_modules/react-day-picker/dist/esm/formatters/formatDay.js
|
|
1203
|
+
function formatDay(date, options, dateLib) {
|
|
1204
|
+
return (dateLib ?? new DateLib(options)).format(date, "d");
|
|
1205
|
+
}
|
|
1206
|
+
|
|
1207
|
+
// node_modules/react-day-picker/dist/esm/formatters/formatMonthDropdown.js
|
|
1208
|
+
function formatMonthDropdown(month, dateLib = defaultDateLib) {
|
|
1209
|
+
return dateLib.format(month, "LLLL");
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
// node_modules/react-day-picker/dist/esm/formatters/formatWeekdayName.js
|
|
1213
|
+
function formatWeekdayName(weekday, options, dateLib) {
|
|
1214
|
+
return (dateLib ?? new DateLib(options)).format(weekday, "cccccc");
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
// node_modules/react-day-picker/dist/esm/formatters/formatWeekNumber.js
|
|
1218
|
+
function formatWeekNumber(weekNumber, dateLib = defaultDateLib) {
|
|
1219
|
+
if (weekNumber < 10) {
|
|
1220
|
+
return dateLib.formatNumber(`0${weekNumber.toLocaleString()}`);
|
|
1221
|
+
}
|
|
1222
|
+
return dateLib.formatNumber(`${weekNumber.toLocaleString()}`);
|
|
1223
|
+
}
|
|
1224
|
+
|
|
1225
|
+
// node_modules/react-day-picker/dist/esm/formatters/formatWeekNumberHeader.js
|
|
1226
|
+
function formatWeekNumberHeader() {
|
|
1227
|
+
return ``;
|
|
1228
|
+
}
|
|
1229
|
+
|
|
1230
|
+
// node_modules/react-day-picker/dist/esm/formatters/formatYearDropdown.js
|
|
1231
|
+
function formatYearDropdown(year, dateLib = defaultDateLib) {
|
|
1232
|
+
return dateLib.format(year, "yyyy");
|
|
1233
|
+
}
|
|
1234
|
+
var formatYearCaption = formatYearDropdown;
|
|
1235
|
+
|
|
1236
|
+
// node_modules/react-day-picker/dist/esm/helpers/getFormatters.js
|
|
1237
|
+
function getFormatters(customFormatters) {
|
|
1238
|
+
if (customFormatters?.formatMonthCaption && !customFormatters.formatCaption) {
|
|
1239
|
+
customFormatters.formatCaption = customFormatters.formatMonthCaption;
|
|
1240
|
+
}
|
|
1241
|
+
if (customFormatters?.formatYearCaption && !customFormatters.formatYearDropdown) {
|
|
1242
|
+
customFormatters.formatYearDropdown = customFormatters.formatYearCaption;
|
|
1243
|
+
}
|
|
1244
|
+
return {
|
|
1245
|
+
...formatters_exports,
|
|
1246
|
+
...customFormatters
|
|
1247
|
+
};
|
|
1248
|
+
}
|
|
1249
|
+
|
|
1250
|
+
// node_modules/react-day-picker/dist/esm/labels/index.js
|
|
1251
|
+
var labels_exports = {};
|
|
1252
|
+
__export(labels_exports, {
|
|
1253
|
+
labelCaption: () => labelCaption,
|
|
1254
|
+
labelDay: () => labelDay,
|
|
1255
|
+
labelDayButton: () => labelDayButton,
|
|
1256
|
+
labelGrid: () => labelGrid,
|
|
1257
|
+
labelGridcell: () => labelGridcell,
|
|
1258
|
+
labelMonthDropdown: () => labelMonthDropdown,
|
|
1259
|
+
labelNav: () => labelNav,
|
|
1260
|
+
labelNext: () => labelNext,
|
|
1261
|
+
labelPrevious: () => labelPrevious,
|
|
1262
|
+
labelWeekNumber: () => labelWeekNumber,
|
|
1263
|
+
labelWeekNumberHeader: () => labelWeekNumberHeader,
|
|
1264
|
+
labelWeekday: () => labelWeekday,
|
|
1265
|
+
labelYearDropdown: () => labelYearDropdown
|
|
1266
|
+
});
|
|
1267
|
+
|
|
1268
|
+
// node_modules/react-day-picker/dist/esm/labels/labelDayButton.js
|
|
1269
|
+
function labelDayButton(date, modifiers, options, dateLib) {
|
|
1270
|
+
let label = (dateLib ?? new DateLib(options)).format(date, "PPPP");
|
|
1271
|
+
if (modifiers.today)
|
|
1272
|
+
label = `Today, ${label}`;
|
|
1273
|
+
if (modifiers.selected)
|
|
1274
|
+
label = `${label}, selected`;
|
|
1275
|
+
return label;
|
|
1276
|
+
}
|
|
1277
|
+
var labelDay = labelDayButton;
|
|
1278
|
+
|
|
1279
|
+
// node_modules/react-day-picker/dist/esm/labels/labelGrid.js
|
|
1280
|
+
function labelGrid(date, options, dateLib) {
|
|
1281
|
+
const lib = dateLib ?? new DateLib(options);
|
|
1282
|
+
return lib.formatMonthYear(date);
|
|
1283
|
+
}
|
|
1284
|
+
var labelCaption = labelGrid;
|
|
1285
|
+
|
|
1286
|
+
// node_modules/react-day-picker/dist/esm/labels/labelGridcell.js
|
|
1287
|
+
function labelGridcell(date, modifiers, options, dateLib) {
|
|
1288
|
+
let label = (dateLib ?? new DateLib(options)).format(date, "PPPP");
|
|
1289
|
+
if (modifiers?.today) {
|
|
1290
|
+
label = `Today, ${label}`;
|
|
1291
|
+
}
|
|
1292
|
+
return label;
|
|
1293
|
+
}
|
|
1294
|
+
|
|
1295
|
+
// node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown.js
|
|
1296
|
+
function labelMonthDropdown(_options) {
|
|
1297
|
+
return "Choose the Month";
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1300
|
+
// node_modules/react-day-picker/dist/esm/labels/labelNav.js
|
|
1301
|
+
function labelNav() {
|
|
1302
|
+
return "";
|
|
1303
|
+
}
|
|
1304
|
+
|
|
1305
|
+
// node_modules/react-day-picker/dist/esm/labels/labelNext.js
|
|
1306
|
+
var defaultLabel = "Go to the Next Month";
|
|
1307
|
+
function labelNext(_month, _options) {
|
|
1308
|
+
return defaultLabel;
|
|
1309
|
+
}
|
|
1310
|
+
|
|
1311
|
+
// node_modules/react-day-picker/dist/esm/labels/labelPrevious.js
|
|
1312
|
+
function labelPrevious(_month) {
|
|
1313
|
+
return "Go to the Previous Month";
|
|
1314
|
+
}
|
|
1315
|
+
|
|
1316
|
+
// node_modules/react-day-picker/dist/esm/labels/labelWeekday.js
|
|
1317
|
+
function labelWeekday(date, options, dateLib) {
|
|
1318
|
+
return (dateLib ?? new DateLib(options)).format(date, "cccc");
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1321
|
+
// node_modules/react-day-picker/dist/esm/labels/labelWeekNumber.js
|
|
1322
|
+
function labelWeekNumber(weekNumber, _options) {
|
|
1323
|
+
return `Week ${weekNumber}`;
|
|
1324
|
+
}
|
|
1325
|
+
|
|
1326
|
+
// node_modules/react-day-picker/dist/esm/labels/labelWeekNumberHeader.js
|
|
1327
|
+
function labelWeekNumberHeader(_options) {
|
|
1328
|
+
return "Week Number";
|
|
1329
|
+
}
|
|
1330
|
+
|
|
1331
|
+
// node_modules/react-day-picker/dist/esm/labels/labelYearDropdown.js
|
|
1332
|
+
function labelYearDropdown(_options) {
|
|
1333
|
+
return "Choose the Year";
|
|
1334
|
+
}
|
|
1335
|
+
|
|
1336
|
+
// node_modules/react-day-picker/dist/esm/helpers/getLabels.js
|
|
1337
|
+
var resolveLabel = (defaultLabel2, customLabel, localeLabel) => {
|
|
1338
|
+
if (customLabel)
|
|
1339
|
+
return customLabel;
|
|
1340
|
+
if (localeLabel) {
|
|
1341
|
+
return typeof localeLabel === "function" ? localeLabel : (..._args) => localeLabel;
|
|
1342
|
+
}
|
|
1343
|
+
return defaultLabel2;
|
|
1344
|
+
};
|
|
1345
|
+
function getLabels(customLabels, options) {
|
|
1346
|
+
const localeLabels = options.locale?.labels ?? {};
|
|
1347
|
+
return {
|
|
1348
|
+
...labels_exports,
|
|
1349
|
+
...customLabels ?? {},
|
|
1350
|
+
labelDayButton: resolveLabel(labelDayButton, customLabels?.labelDayButton, localeLabels.labelDayButton),
|
|
1351
|
+
labelMonthDropdown: resolveLabel(labelMonthDropdown, customLabels?.labelMonthDropdown, localeLabels.labelMonthDropdown),
|
|
1352
|
+
labelNext: resolveLabel(labelNext, customLabels?.labelNext, localeLabels.labelNext),
|
|
1353
|
+
labelPrevious: resolveLabel(labelPrevious, customLabels?.labelPrevious, localeLabels.labelPrevious),
|
|
1354
|
+
labelWeekNumber: resolveLabel(labelWeekNumber, customLabels?.labelWeekNumber, localeLabels.labelWeekNumber),
|
|
1355
|
+
labelYearDropdown: resolveLabel(labelYearDropdown, customLabels?.labelYearDropdown, localeLabels.labelYearDropdown),
|
|
1356
|
+
labelGrid: resolveLabel(labelGrid, customLabels?.labelGrid, localeLabels.labelGrid),
|
|
1357
|
+
labelGridcell: resolveLabel(labelGridcell, customLabels?.labelGridcell, localeLabels.labelGridcell),
|
|
1358
|
+
labelNav: resolveLabel(labelNav, customLabels?.labelNav, localeLabels.labelNav),
|
|
1359
|
+
labelWeekNumberHeader: resolveLabel(labelWeekNumberHeader, customLabels?.labelWeekNumberHeader, localeLabels.labelWeekNumberHeader),
|
|
1360
|
+
labelWeekday: resolveLabel(labelWeekday, customLabels?.labelWeekday, localeLabels.labelWeekday)
|
|
1361
|
+
};
|
|
1362
|
+
}
|
|
1363
|
+
|
|
1364
|
+
// node_modules/react-day-picker/dist/esm/helpers/getMonthOptions.js
|
|
1365
|
+
function getMonthOptions(displayMonth, navStart, navEnd, formatters, dateLib) {
|
|
1366
|
+
const { startOfMonth: startOfMonth2, startOfYear: startOfYear2, endOfYear: endOfYear2, eachMonthOfInterval: eachMonthOfInterval2, getMonth: getMonth2 } = dateLib;
|
|
1367
|
+
const months = eachMonthOfInterval2({
|
|
1368
|
+
start: startOfYear2(displayMonth),
|
|
1369
|
+
end: endOfYear2(displayMonth)
|
|
1370
|
+
});
|
|
1371
|
+
const options = months.map((month) => {
|
|
1372
|
+
const label = formatters.formatMonthDropdown(month, dateLib);
|
|
1373
|
+
const value = getMonth2(month);
|
|
1374
|
+
const disabled = navStart && month < startOfMonth2(navStart) || navEnd && month > startOfMonth2(navEnd) || false;
|
|
1375
|
+
return { value, label, disabled };
|
|
1376
|
+
});
|
|
1377
|
+
return options;
|
|
1378
|
+
}
|
|
1379
|
+
|
|
1380
|
+
// node_modules/react-day-picker/dist/esm/helpers/getStyleForModifiers.js
|
|
1381
|
+
function getStyleForModifiers(dayModifiers, styles = {}, modifiersStyles = {}) {
|
|
1382
|
+
let style = { ...styles?.[UI.Day] };
|
|
1383
|
+
Object.entries(dayModifiers).filter(([, active]) => active === true).forEach(([modifier]) => {
|
|
1384
|
+
style = {
|
|
1385
|
+
...style,
|
|
1386
|
+
...modifiersStyles?.[modifier]
|
|
1387
|
+
};
|
|
1388
|
+
});
|
|
1389
|
+
return style;
|
|
1390
|
+
}
|
|
1391
|
+
|
|
1392
|
+
// node_modules/react-day-picker/dist/esm/helpers/getWeekdays.js
|
|
1393
|
+
function getWeekdays(dateLib, ISOWeek, broadcastCalendar, today) {
|
|
1394
|
+
const referenceToday = today ?? dateLib.today();
|
|
1395
|
+
const start = broadcastCalendar ? dateLib.startOfBroadcastWeek(referenceToday, dateLib) : ISOWeek ? dateLib.startOfISOWeek(referenceToday) : dateLib.startOfWeek(referenceToday);
|
|
1396
|
+
const days = [];
|
|
1397
|
+
for (let i = 0; i < 7; i++) {
|
|
1398
|
+
const day = dateLib.addDays(start, i);
|
|
1399
|
+
days.push(day);
|
|
1400
|
+
}
|
|
1401
|
+
return days;
|
|
1402
|
+
}
|
|
1403
|
+
|
|
1404
|
+
// node_modules/react-day-picker/dist/esm/helpers/getYearOptions.js
|
|
1405
|
+
function getYearOptions(navStart, navEnd, formatters, dateLib, reverse = false) {
|
|
1406
|
+
if (!navStart)
|
|
1407
|
+
return void 0;
|
|
1408
|
+
if (!navEnd)
|
|
1409
|
+
return void 0;
|
|
1410
|
+
const { startOfYear: startOfYear2, endOfYear: endOfYear2, eachYearOfInterval: eachYearOfInterval2, getYear: getYear2 } = dateLib;
|
|
1411
|
+
const firstNavYear = startOfYear2(navStart);
|
|
1412
|
+
const lastNavYear = endOfYear2(navEnd);
|
|
1413
|
+
const years = eachYearOfInterval2({ start: firstNavYear, end: lastNavYear });
|
|
1414
|
+
if (reverse)
|
|
1415
|
+
years.reverse();
|
|
1416
|
+
return years.map((year) => {
|
|
1417
|
+
const label = formatters.formatYearDropdown(year, dateLib);
|
|
1418
|
+
return {
|
|
1419
|
+
value: getYear2(year),
|
|
1420
|
+
label,
|
|
1421
|
+
disabled: false
|
|
1422
|
+
};
|
|
1423
|
+
});
|
|
1424
|
+
}
|
|
1425
|
+
|
|
1426
|
+
// node_modules/react-day-picker/dist/esm/noonDateLib.js
|
|
1427
|
+
import { differenceInCalendarDays as differenceInCalendarDaysFn, differenceInCalendarMonths as differenceInCalendarMonthsFn, getISOWeek as getISOWeekFn, getWeek as getWeekFn } from "date-fns";
|
|
1428
|
+
function createNoonOverrides(timeZone, options = {}) {
|
|
1429
|
+
const { weekStartsOn, locale } = options;
|
|
1430
|
+
const fallbackWeekStartsOn = weekStartsOn ?? locale?.options?.weekStartsOn ?? 0;
|
|
1431
|
+
const toNoonTZDate = (date) => {
|
|
1432
|
+
const normalizedDate = typeof date === "number" || typeof date === "string" ? new Date(date) : date;
|
|
1433
|
+
return new TZDate(normalizedDate.getFullYear(), normalizedDate.getMonth(), normalizedDate.getDate(), 12, 0, 0, timeZone);
|
|
1434
|
+
};
|
|
1435
|
+
const toCalendarDate = (date) => {
|
|
1436
|
+
const zoned = toNoonTZDate(date);
|
|
1437
|
+
return new Date(zoned.getFullYear(), zoned.getMonth(), zoned.getDate(), 0, 0, 0, 0);
|
|
1438
|
+
};
|
|
1439
|
+
return {
|
|
1440
|
+
today: () => {
|
|
1441
|
+
return toNoonTZDate(TZDate.tz(timeZone));
|
|
1442
|
+
},
|
|
1443
|
+
newDate: (year, monthIndex, date) => {
|
|
1444
|
+
return new TZDate(year, monthIndex, date, 12, 0, 0, timeZone);
|
|
1445
|
+
},
|
|
1446
|
+
startOfDay: (date) => {
|
|
1447
|
+
return toNoonTZDate(date);
|
|
1448
|
+
},
|
|
1449
|
+
startOfWeek: (date, options2) => {
|
|
1450
|
+
const base = toNoonTZDate(date);
|
|
1451
|
+
const weekStartsOnValue = options2?.weekStartsOn ?? fallbackWeekStartsOn;
|
|
1452
|
+
const diff = (base.getDay() - weekStartsOnValue + 7) % 7;
|
|
1453
|
+
base.setDate(base.getDate() - diff);
|
|
1454
|
+
return base;
|
|
1455
|
+
},
|
|
1456
|
+
startOfISOWeek: (date) => {
|
|
1457
|
+
const base = toNoonTZDate(date);
|
|
1458
|
+
const diff = (base.getDay() - 1 + 7) % 7;
|
|
1459
|
+
base.setDate(base.getDate() - diff);
|
|
1460
|
+
return base;
|
|
1461
|
+
},
|
|
1462
|
+
startOfMonth: (date) => {
|
|
1463
|
+
const base = toNoonTZDate(date);
|
|
1464
|
+
base.setDate(1);
|
|
1465
|
+
return base;
|
|
1466
|
+
},
|
|
1467
|
+
startOfYear: (date) => {
|
|
1468
|
+
const base = toNoonTZDate(date);
|
|
1469
|
+
base.setMonth(0, 1);
|
|
1470
|
+
return base;
|
|
1471
|
+
},
|
|
1472
|
+
endOfWeek: (date, options2) => {
|
|
1473
|
+
const base = toNoonTZDate(date);
|
|
1474
|
+
const weekStartsOnValue = options2?.weekStartsOn ?? fallbackWeekStartsOn;
|
|
1475
|
+
const endDow = (weekStartsOnValue + 6) % 7;
|
|
1476
|
+
const diff = (endDow - base.getDay() + 7) % 7;
|
|
1477
|
+
base.setDate(base.getDate() + diff);
|
|
1478
|
+
return base;
|
|
1479
|
+
},
|
|
1480
|
+
endOfISOWeek: (date) => {
|
|
1481
|
+
const base = toNoonTZDate(date);
|
|
1482
|
+
const diff = (7 - base.getDay()) % 7;
|
|
1483
|
+
base.setDate(base.getDate() + diff);
|
|
1484
|
+
return base;
|
|
1485
|
+
},
|
|
1486
|
+
endOfMonth: (date) => {
|
|
1487
|
+
const base = toNoonTZDate(date);
|
|
1488
|
+
base.setMonth(base.getMonth() + 1, 0);
|
|
1489
|
+
return base;
|
|
1490
|
+
},
|
|
1491
|
+
endOfYear: (date) => {
|
|
1492
|
+
const base = toNoonTZDate(date);
|
|
1493
|
+
base.setMonth(11, 31);
|
|
1494
|
+
return base;
|
|
1495
|
+
},
|
|
1496
|
+
eachMonthOfInterval: (interval) => {
|
|
1497
|
+
const start = toNoonTZDate(interval.start);
|
|
1498
|
+
const end = toNoonTZDate(interval.end);
|
|
1499
|
+
const result = [];
|
|
1500
|
+
const cursor = new TZDate(start.getFullYear(), start.getMonth(), 1, 12, 0, 0, timeZone);
|
|
1501
|
+
const endKey = end.getFullYear() * 12 + end.getMonth();
|
|
1502
|
+
while (cursor.getFullYear() * 12 + cursor.getMonth() <= endKey) {
|
|
1503
|
+
result.push(new TZDate(cursor, timeZone));
|
|
1504
|
+
cursor.setMonth(cursor.getMonth() + 1, 1);
|
|
1505
|
+
}
|
|
1506
|
+
return result;
|
|
1507
|
+
},
|
|
1508
|
+
// Normalize to noon once before arithmetic (avoid DST/midnight edge cases),
|
|
1509
|
+
// mutate the same TZDate, and return it.
|
|
1510
|
+
addDays: (date, amount) => {
|
|
1511
|
+
const base = toNoonTZDate(date);
|
|
1512
|
+
base.setDate(base.getDate() + amount);
|
|
1513
|
+
return base;
|
|
1514
|
+
},
|
|
1515
|
+
addWeeks: (date, amount) => {
|
|
1516
|
+
const base = toNoonTZDate(date);
|
|
1517
|
+
base.setDate(base.getDate() + amount * 7);
|
|
1518
|
+
return base;
|
|
1519
|
+
},
|
|
1520
|
+
addMonths: (date, amount) => {
|
|
1521
|
+
const base = toNoonTZDate(date);
|
|
1522
|
+
base.setMonth(base.getMonth() + amount);
|
|
1523
|
+
return base;
|
|
1524
|
+
},
|
|
1525
|
+
addYears: (date, amount) => {
|
|
1526
|
+
const base = toNoonTZDate(date);
|
|
1527
|
+
base.setFullYear(base.getFullYear() + amount);
|
|
1528
|
+
return base;
|
|
1529
|
+
},
|
|
1530
|
+
eachYearOfInterval: (interval) => {
|
|
1531
|
+
const start = toNoonTZDate(interval.start);
|
|
1532
|
+
const end = toNoonTZDate(interval.end);
|
|
1533
|
+
const years = [];
|
|
1534
|
+
const cursor = new TZDate(start.getFullYear(), 0, 1, 12, 0, 0, timeZone);
|
|
1535
|
+
while (cursor.getFullYear() <= end.getFullYear()) {
|
|
1536
|
+
years.push(new TZDate(cursor, timeZone));
|
|
1537
|
+
cursor.setFullYear(cursor.getFullYear() + 1, 0, 1);
|
|
1538
|
+
}
|
|
1539
|
+
return years;
|
|
1540
|
+
},
|
|
1541
|
+
getWeek: (date, options2) => {
|
|
1542
|
+
const base = toCalendarDate(date);
|
|
1543
|
+
return getWeekFn(base, {
|
|
1544
|
+
weekStartsOn: options2?.weekStartsOn ?? fallbackWeekStartsOn,
|
|
1545
|
+
firstWeekContainsDate: options2?.firstWeekContainsDate ?? locale?.options?.firstWeekContainsDate ?? 1
|
|
1546
|
+
});
|
|
1547
|
+
},
|
|
1548
|
+
getISOWeek: (date) => {
|
|
1549
|
+
const base = toCalendarDate(date);
|
|
1550
|
+
return getISOWeekFn(base);
|
|
1551
|
+
},
|
|
1552
|
+
differenceInCalendarDays: (dateLeft, dateRight) => {
|
|
1553
|
+
const left = toCalendarDate(dateLeft);
|
|
1554
|
+
const right = toCalendarDate(dateRight);
|
|
1555
|
+
return differenceInCalendarDaysFn(left, right);
|
|
1556
|
+
},
|
|
1557
|
+
differenceInCalendarMonths: (dateLeft, dateRight) => {
|
|
1558
|
+
const left = toCalendarDate(dateLeft);
|
|
1559
|
+
const right = toCalendarDate(dateRight);
|
|
1560
|
+
return differenceInCalendarMonthsFn(left, right);
|
|
1561
|
+
}
|
|
1562
|
+
};
|
|
1563
|
+
}
|
|
1564
|
+
|
|
1565
|
+
// node_modules/react-day-picker/dist/esm/useAnimation.js
|
|
1566
|
+
import { useLayoutEffect, useRef } from "react";
|
|
1567
|
+
var asHtmlElement = (element) => {
|
|
1568
|
+
if (element instanceof HTMLElement)
|
|
1569
|
+
return element;
|
|
1570
|
+
return null;
|
|
1571
|
+
};
|
|
1572
|
+
var queryMonthEls = (element) => [
|
|
1573
|
+
...element.querySelectorAll("[data-animated-month]") ?? []
|
|
1574
|
+
];
|
|
1575
|
+
var queryMonthEl = (element) => asHtmlElement(element.querySelector("[data-animated-month]"));
|
|
1576
|
+
var queryCaptionEl = (element) => asHtmlElement(element.querySelector("[data-animated-caption]"));
|
|
1577
|
+
var queryWeeksEl = (element) => asHtmlElement(element.querySelector("[data-animated-weeks]"));
|
|
1578
|
+
var queryNavEl = (element) => asHtmlElement(element.querySelector("[data-animated-nav]"));
|
|
1579
|
+
var queryWeekdaysEl = (element) => asHtmlElement(element.querySelector("[data-animated-weekdays]"));
|
|
1580
|
+
function useAnimation(rootElRef, enabled, { classNames, months, focused, dateLib }) {
|
|
1581
|
+
const previousRootElSnapshotRef = useRef(null);
|
|
1582
|
+
const previousMonthsRef = useRef(months);
|
|
1583
|
+
const animatingRef = useRef(false);
|
|
1584
|
+
useLayoutEffect(() => {
|
|
1585
|
+
const previousMonths = previousMonthsRef.current;
|
|
1586
|
+
previousMonthsRef.current = months;
|
|
1587
|
+
if (!enabled || !rootElRef.current || // safety check because the ref can be set to anything by consumers
|
|
1588
|
+
!(rootElRef.current instanceof HTMLElement) || // validation required for the animation to work as expected
|
|
1589
|
+
months.length === 0 || previousMonths.length === 0 || months.length !== previousMonths.length) {
|
|
1590
|
+
return;
|
|
1591
|
+
}
|
|
1592
|
+
const isSameMonth2 = dateLib.isSameMonth(months[0].date, previousMonths[0].date);
|
|
1593
|
+
const isAfterPreviousMonth = dateLib.isAfter(months[0].date, previousMonths[0].date);
|
|
1594
|
+
const captionAnimationClass = isAfterPreviousMonth ? classNames[Animation.caption_after_enter] : classNames[Animation.caption_before_enter];
|
|
1595
|
+
const weeksAnimationClass = isAfterPreviousMonth ? classNames[Animation.weeks_after_enter] : classNames[Animation.weeks_before_enter];
|
|
1596
|
+
const previousRootElSnapshot = previousRootElSnapshotRef.current;
|
|
1597
|
+
const rootElSnapshot = rootElRef.current.cloneNode(true);
|
|
1598
|
+
if (rootElSnapshot instanceof HTMLElement) {
|
|
1599
|
+
const currentMonthElsSnapshot = queryMonthEls(rootElSnapshot);
|
|
1600
|
+
currentMonthElsSnapshot.forEach((currentMonthElSnapshot) => {
|
|
1601
|
+
if (!(currentMonthElSnapshot instanceof HTMLElement))
|
|
1602
|
+
return;
|
|
1603
|
+
const previousMonthElSnapshot = queryMonthEl(currentMonthElSnapshot);
|
|
1604
|
+
if (previousMonthElSnapshot && currentMonthElSnapshot.contains(previousMonthElSnapshot)) {
|
|
1605
|
+
currentMonthElSnapshot.removeChild(previousMonthElSnapshot);
|
|
1606
|
+
}
|
|
1607
|
+
const captionEl = queryCaptionEl(currentMonthElSnapshot);
|
|
1608
|
+
if (captionEl) {
|
|
1609
|
+
captionEl.classList.remove(captionAnimationClass);
|
|
1610
|
+
}
|
|
1611
|
+
const weeksEl = queryWeeksEl(currentMonthElSnapshot);
|
|
1612
|
+
if (weeksEl) {
|
|
1613
|
+
weeksEl.classList.remove(weeksAnimationClass);
|
|
1614
|
+
}
|
|
1615
|
+
});
|
|
1616
|
+
previousRootElSnapshotRef.current = rootElSnapshot;
|
|
1617
|
+
} else {
|
|
1618
|
+
previousRootElSnapshotRef.current = null;
|
|
1619
|
+
}
|
|
1620
|
+
if (animatingRef.current || isSameMonth2 || // skip animation if a day is focused because it can cause issues to the animation and is better for a11y
|
|
1621
|
+
focused) {
|
|
1622
|
+
return;
|
|
1623
|
+
}
|
|
1624
|
+
const previousMonthEls = previousRootElSnapshot instanceof HTMLElement ? queryMonthEls(previousRootElSnapshot) : [];
|
|
1625
|
+
const currentMonthEls = queryMonthEls(rootElRef.current);
|
|
1626
|
+
if (currentMonthEls?.every((el) => el instanceof HTMLElement) && previousMonthEls && previousMonthEls.every((el) => el instanceof HTMLElement)) {
|
|
1627
|
+
animatingRef.current = true;
|
|
1628
|
+
const cleanUpFunctions = [];
|
|
1629
|
+
rootElRef.current.style.isolation = "isolate";
|
|
1630
|
+
const navEl = queryNavEl(rootElRef.current);
|
|
1631
|
+
if (navEl) {
|
|
1632
|
+
navEl.style.zIndex = "1";
|
|
1633
|
+
}
|
|
1634
|
+
currentMonthEls.forEach((currentMonthEl, index) => {
|
|
1635
|
+
const previousMonthEl = previousMonthEls[index];
|
|
1636
|
+
if (!previousMonthEl) {
|
|
1637
|
+
return;
|
|
1638
|
+
}
|
|
1639
|
+
currentMonthEl.style.position = "relative";
|
|
1640
|
+
currentMonthEl.style.overflow = "hidden";
|
|
1641
|
+
const captionEl = queryCaptionEl(currentMonthEl);
|
|
1642
|
+
if (captionEl) {
|
|
1643
|
+
captionEl.classList.add(captionAnimationClass);
|
|
1644
|
+
}
|
|
1645
|
+
const weeksEl = queryWeeksEl(currentMonthEl);
|
|
1646
|
+
if (weeksEl) {
|
|
1647
|
+
weeksEl.classList.add(weeksAnimationClass);
|
|
1648
|
+
}
|
|
1649
|
+
const cleanUp = () => {
|
|
1650
|
+
animatingRef.current = false;
|
|
1651
|
+
if (rootElRef.current) {
|
|
1652
|
+
rootElRef.current.style.isolation = "";
|
|
1653
|
+
}
|
|
1654
|
+
if (navEl) {
|
|
1655
|
+
navEl.style.zIndex = "";
|
|
1656
|
+
}
|
|
1657
|
+
if (captionEl) {
|
|
1658
|
+
captionEl.classList.remove(captionAnimationClass);
|
|
1659
|
+
}
|
|
1660
|
+
if (weeksEl) {
|
|
1661
|
+
weeksEl.classList.remove(weeksAnimationClass);
|
|
1662
|
+
}
|
|
1663
|
+
currentMonthEl.style.position = "";
|
|
1664
|
+
currentMonthEl.style.overflow = "";
|
|
1665
|
+
if (currentMonthEl.contains(previousMonthEl)) {
|
|
1666
|
+
currentMonthEl.removeChild(previousMonthEl);
|
|
1667
|
+
}
|
|
1668
|
+
};
|
|
1669
|
+
cleanUpFunctions.push(cleanUp);
|
|
1670
|
+
previousMonthEl.style.pointerEvents = "none";
|
|
1671
|
+
previousMonthEl.style.position = "absolute";
|
|
1672
|
+
previousMonthEl.style.overflow = "hidden";
|
|
1673
|
+
previousMonthEl.setAttribute("aria-hidden", "true");
|
|
1674
|
+
const previousWeekdaysEl = queryWeekdaysEl(previousMonthEl);
|
|
1675
|
+
if (previousWeekdaysEl) {
|
|
1676
|
+
previousWeekdaysEl.style.opacity = "0";
|
|
1677
|
+
}
|
|
1678
|
+
const previousCaptionEl = queryCaptionEl(previousMonthEl);
|
|
1679
|
+
if (previousCaptionEl) {
|
|
1680
|
+
previousCaptionEl.classList.add(isAfterPreviousMonth ? classNames[Animation.caption_before_exit] : classNames[Animation.caption_after_exit]);
|
|
1681
|
+
previousCaptionEl.addEventListener("animationend", cleanUp);
|
|
1682
|
+
}
|
|
1683
|
+
const previousWeeksEl = queryWeeksEl(previousMonthEl);
|
|
1684
|
+
if (previousWeeksEl) {
|
|
1685
|
+
previousWeeksEl.classList.add(isAfterPreviousMonth ? classNames[Animation.weeks_before_exit] : classNames[Animation.weeks_after_exit]);
|
|
1686
|
+
}
|
|
1687
|
+
currentMonthEl.insertBefore(previousMonthEl, currentMonthEl.firstChild);
|
|
1688
|
+
});
|
|
1689
|
+
}
|
|
1690
|
+
});
|
|
1691
|
+
}
|
|
1692
|
+
|
|
1693
|
+
// node_modules/react-day-picker/dist/esm/useCalendar.js
|
|
1694
|
+
import { useEffect, useMemo } from "react";
|
|
1695
|
+
|
|
1696
|
+
// node_modules/react-day-picker/dist/esm/helpers/getDates.js
|
|
1697
|
+
function getDates(displayMonths, maxDate, props, dateLib) {
|
|
1698
|
+
const firstMonth = displayMonths[0];
|
|
1699
|
+
const lastMonth = displayMonths[displayMonths.length - 1];
|
|
1700
|
+
const { ISOWeek, fixedWeeks, broadcastCalendar } = props ?? {};
|
|
1701
|
+
const { addDays: addDays2, differenceInCalendarDays: differenceInCalendarDays2, differenceInCalendarMonths: differenceInCalendarMonths2, endOfBroadcastWeek: endOfBroadcastWeek2, endOfISOWeek: endOfISOWeek2, endOfMonth: endOfMonth2, endOfWeek: endOfWeek2, isAfter: isAfter2, startOfBroadcastWeek: startOfBroadcastWeek2, startOfISOWeek: startOfISOWeek2, startOfWeek: startOfWeek2 } = dateLib;
|
|
1702
|
+
const startWeekFirstDate = broadcastCalendar ? startOfBroadcastWeek2(firstMonth, dateLib) : ISOWeek ? startOfISOWeek2(firstMonth) : startOfWeek2(firstMonth);
|
|
1703
|
+
const displayMonthsWeekEnd = broadcastCalendar ? endOfBroadcastWeek2(lastMonth) : ISOWeek ? endOfISOWeek2(endOfMonth2(lastMonth)) : endOfWeek2(endOfMonth2(lastMonth));
|
|
1704
|
+
const constraintWeekEnd = maxDate && (broadcastCalendar ? endOfBroadcastWeek2(maxDate) : ISOWeek ? endOfISOWeek2(maxDate) : endOfWeek2(maxDate));
|
|
1705
|
+
const gridEndDate = constraintWeekEnd && isAfter2(displayMonthsWeekEnd, constraintWeekEnd) ? constraintWeekEnd : displayMonthsWeekEnd;
|
|
1706
|
+
const nOfDays = differenceInCalendarDays2(gridEndDate, startWeekFirstDate);
|
|
1707
|
+
const nOfMonths = differenceInCalendarMonths2(lastMonth, firstMonth) + 1;
|
|
1708
|
+
const dates = [];
|
|
1709
|
+
for (let i = 0; i <= nOfDays; i++) {
|
|
1710
|
+
const date = addDays2(startWeekFirstDate, i);
|
|
1711
|
+
dates.push(date);
|
|
1712
|
+
}
|
|
1713
|
+
const nrOfDaysWithFixedWeeks = broadcastCalendar ? 35 : 42;
|
|
1714
|
+
const extraDates = nrOfDaysWithFixedWeeks * nOfMonths;
|
|
1715
|
+
if (fixedWeeks && dates.length < extraDates) {
|
|
1716
|
+
const daysToAdd = extraDates - dates.length;
|
|
1717
|
+
for (let i = 0; i < daysToAdd; i++) {
|
|
1718
|
+
const date = addDays2(dates[dates.length - 1], 1);
|
|
1719
|
+
dates.push(date);
|
|
1720
|
+
}
|
|
1721
|
+
}
|
|
1722
|
+
return dates;
|
|
1723
|
+
}
|
|
1724
|
+
|
|
1725
|
+
// node_modules/react-day-picker/dist/esm/helpers/getDays.js
|
|
1726
|
+
function getDays(calendarMonths) {
|
|
1727
|
+
const initialDays = [];
|
|
1728
|
+
return calendarMonths.reduce((days, month) => {
|
|
1729
|
+
const weekDays = month.weeks.reduce((weekDays2, week) => {
|
|
1730
|
+
return weekDays2.concat(week.days.slice());
|
|
1731
|
+
}, initialDays.slice());
|
|
1732
|
+
return days.concat(weekDays.slice());
|
|
1733
|
+
}, initialDays.slice());
|
|
1734
|
+
}
|
|
1735
|
+
|
|
1736
|
+
// node_modules/react-day-picker/dist/esm/helpers/getDisplayMonths.js
|
|
1737
|
+
function getDisplayMonths(firstDisplayedMonth, calendarEndMonth, props, dateLib) {
|
|
1738
|
+
const { numberOfMonths = 1 } = props;
|
|
1739
|
+
const months = [];
|
|
1740
|
+
for (let i = 0; i < numberOfMonths; i++) {
|
|
1741
|
+
const month = dateLib.addMonths(firstDisplayedMonth, i);
|
|
1742
|
+
if (calendarEndMonth && month > calendarEndMonth) {
|
|
1743
|
+
break;
|
|
1744
|
+
}
|
|
1745
|
+
months.push(month);
|
|
1746
|
+
}
|
|
1747
|
+
return months;
|
|
1748
|
+
}
|
|
1749
|
+
|
|
1750
|
+
// node_modules/react-day-picker/dist/esm/helpers/getInitialMonth.js
|
|
1751
|
+
function getInitialMonth(props, navStart, navEnd, dateLib) {
|
|
1752
|
+
const { month, defaultMonth, today = dateLib.today(), numberOfMonths = 1 } = props;
|
|
1753
|
+
let initialMonth = month || defaultMonth || today;
|
|
1754
|
+
const { differenceInCalendarMonths: differenceInCalendarMonths2, addMonths: addMonths2, startOfMonth: startOfMonth2 } = dateLib;
|
|
1755
|
+
if (navEnd && differenceInCalendarMonths2(navEnd, initialMonth) < numberOfMonths - 1) {
|
|
1756
|
+
const offset2 = -1 * (numberOfMonths - 1);
|
|
1757
|
+
initialMonth = addMonths2(navEnd, offset2);
|
|
1758
|
+
}
|
|
1759
|
+
if (navStart && differenceInCalendarMonths2(initialMonth, navStart) < 0) {
|
|
1760
|
+
initialMonth = navStart;
|
|
1761
|
+
}
|
|
1762
|
+
return startOfMonth2(initialMonth);
|
|
1763
|
+
}
|
|
1764
|
+
|
|
1765
|
+
// node_modules/react-day-picker/dist/esm/helpers/getMonths.js
|
|
1766
|
+
function getMonths(displayMonths, dates, props, dateLib) {
|
|
1767
|
+
const { addDays: addDays2, endOfBroadcastWeek: endOfBroadcastWeek2, endOfISOWeek: endOfISOWeek2, endOfMonth: endOfMonth2, endOfWeek: endOfWeek2, getISOWeek: getISOWeek2, getWeek: getWeek2, startOfBroadcastWeek: startOfBroadcastWeek2, startOfISOWeek: startOfISOWeek2, startOfWeek: startOfWeek2 } = dateLib;
|
|
1768
|
+
const dayPickerMonths = displayMonths.reduce((months, month) => {
|
|
1769
|
+
const firstDateOfFirstWeek = props.broadcastCalendar ? startOfBroadcastWeek2(month, dateLib) : props.ISOWeek ? startOfISOWeek2(month) : startOfWeek2(month);
|
|
1770
|
+
const lastDateOfLastWeek = props.broadcastCalendar ? endOfBroadcastWeek2(month) : props.ISOWeek ? endOfISOWeek2(endOfMonth2(month)) : endOfWeek2(endOfMonth2(month));
|
|
1771
|
+
const monthDates = dates.filter((date) => {
|
|
1772
|
+
return date >= firstDateOfFirstWeek && date <= lastDateOfLastWeek;
|
|
1773
|
+
});
|
|
1774
|
+
const nrOfDaysWithFixedWeeks = props.broadcastCalendar ? 35 : 42;
|
|
1775
|
+
if (props.fixedWeeks && monthDates.length < nrOfDaysWithFixedWeeks) {
|
|
1776
|
+
const extraDates = dates.filter((date) => {
|
|
1777
|
+
const daysToAdd = nrOfDaysWithFixedWeeks - monthDates.length;
|
|
1778
|
+
return date > lastDateOfLastWeek && date <= addDays2(lastDateOfLastWeek, daysToAdd);
|
|
1779
|
+
});
|
|
1780
|
+
monthDates.push(...extraDates);
|
|
1781
|
+
}
|
|
1782
|
+
const weeks = monthDates.reduce((weeks2, date) => {
|
|
1783
|
+
const weekNumber = props.ISOWeek ? getISOWeek2(date) : getWeek2(date);
|
|
1784
|
+
const week = weeks2.find((week2) => week2.weekNumber === weekNumber);
|
|
1785
|
+
const day = new CalendarDay(date, month, dateLib);
|
|
1786
|
+
if (!week) {
|
|
1787
|
+
weeks2.push(new CalendarWeek(weekNumber, [day]));
|
|
1788
|
+
} else {
|
|
1789
|
+
week.days.push(day);
|
|
1790
|
+
}
|
|
1791
|
+
return weeks2;
|
|
1792
|
+
}, []);
|
|
1793
|
+
const dayPickerMonth = new CalendarMonth(month, weeks);
|
|
1794
|
+
months.push(dayPickerMonth);
|
|
1795
|
+
return months;
|
|
1796
|
+
}, []);
|
|
1797
|
+
if (!props.reverseMonths) {
|
|
1798
|
+
return dayPickerMonths;
|
|
1799
|
+
} else {
|
|
1800
|
+
return dayPickerMonths.reverse();
|
|
1801
|
+
}
|
|
1802
|
+
}
|
|
1803
|
+
|
|
1804
|
+
// node_modules/react-day-picker/dist/esm/helpers/getNavMonth.js
|
|
1805
|
+
function getNavMonths(props, dateLib) {
|
|
1806
|
+
let { startMonth, endMonth } = props;
|
|
1807
|
+
const { startOfYear: startOfYear2, startOfDay: startOfDay2, startOfMonth: startOfMonth2, endOfMonth: endOfMonth2, addYears: addYears2, endOfYear: endOfYear2, newDate, today } = dateLib;
|
|
1808
|
+
const { fromYear, toYear, fromMonth, toMonth } = props;
|
|
1809
|
+
if (!startMonth && fromMonth) {
|
|
1810
|
+
startMonth = fromMonth;
|
|
1811
|
+
}
|
|
1812
|
+
if (!startMonth && fromYear) {
|
|
1813
|
+
startMonth = dateLib.newDate(fromYear, 0, 1);
|
|
1814
|
+
}
|
|
1815
|
+
if (!endMonth && toMonth) {
|
|
1816
|
+
endMonth = toMonth;
|
|
1817
|
+
}
|
|
1818
|
+
if (!endMonth && toYear) {
|
|
1819
|
+
endMonth = newDate(toYear, 11, 31);
|
|
1820
|
+
}
|
|
1821
|
+
const hasYearDropdown = props.captionLayout === "dropdown" || props.captionLayout === "dropdown-years";
|
|
1822
|
+
if (startMonth) {
|
|
1823
|
+
startMonth = startOfMonth2(startMonth);
|
|
1824
|
+
} else if (fromYear) {
|
|
1825
|
+
startMonth = newDate(fromYear, 0, 1);
|
|
1826
|
+
} else if (!startMonth && hasYearDropdown) {
|
|
1827
|
+
startMonth = startOfYear2(addYears2(props.today ?? today(), -100));
|
|
1828
|
+
}
|
|
1829
|
+
if (endMonth) {
|
|
1830
|
+
endMonth = endOfMonth2(endMonth);
|
|
1831
|
+
} else if (toYear) {
|
|
1832
|
+
endMonth = newDate(toYear, 11, 31);
|
|
1833
|
+
} else if (!endMonth && hasYearDropdown) {
|
|
1834
|
+
endMonth = endOfYear2(props.today ?? today());
|
|
1835
|
+
}
|
|
1836
|
+
return [
|
|
1837
|
+
startMonth ? startOfDay2(startMonth) : startMonth,
|
|
1838
|
+
endMonth ? startOfDay2(endMonth) : endMonth
|
|
1839
|
+
];
|
|
1840
|
+
}
|
|
1841
|
+
|
|
1842
|
+
// node_modules/react-day-picker/dist/esm/helpers/getNextMonth.js
|
|
1843
|
+
function getNextMonth(firstDisplayedMonth, calendarEndMonth, options, dateLib) {
|
|
1844
|
+
if (options.disableNavigation) {
|
|
1845
|
+
return void 0;
|
|
1846
|
+
}
|
|
1847
|
+
const { pagedNavigation, numberOfMonths = 1 } = options;
|
|
1848
|
+
const { startOfMonth: startOfMonth2, addMonths: addMonths2, differenceInCalendarMonths: differenceInCalendarMonths2 } = dateLib;
|
|
1849
|
+
const offset2 = pagedNavigation ? numberOfMonths : 1;
|
|
1850
|
+
const month = startOfMonth2(firstDisplayedMonth);
|
|
1851
|
+
if (!calendarEndMonth) {
|
|
1852
|
+
return addMonths2(month, offset2);
|
|
1853
|
+
}
|
|
1854
|
+
const monthsDiff = differenceInCalendarMonths2(calendarEndMonth, firstDisplayedMonth);
|
|
1855
|
+
if (monthsDiff < numberOfMonths) {
|
|
1856
|
+
return void 0;
|
|
1857
|
+
}
|
|
1858
|
+
return addMonths2(month, offset2);
|
|
1859
|
+
}
|
|
1860
|
+
|
|
1861
|
+
// node_modules/react-day-picker/dist/esm/helpers/getPreviousMonth.js
|
|
1862
|
+
function getPreviousMonth(firstDisplayedMonth, calendarStartMonth, options, dateLib) {
|
|
1863
|
+
if (options.disableNavigation) {
|
|
1864
|
+
return void 0;
|
|
1865
|
+
}
|
|
1866
|
+
const { pagedNavigation, numberOfMonths } = options;
|
|
1867
|
+
const { startOfMonth: startOfMonth2, addMonths: addMonths2, differenceInCalendarMonths: differenceInCalendarMonths2 } = dateLib;
|
|
1868
|
+
const offset2 = pagedNavigation ? numberOfMonths ?? 1 : 1;
|
|
1869
|
+
const month = startOfMonth2(firstDisplayedMonth);
|
|
1870
|
+
if (!calendarStartMonth) {
|
|
1871
|
+
return addMonths2(month, -offset2);
|
|
1872
|
+
}
|
|
1873
|
+
const monthsDiff = differenceInCalendarMonths2(month, calendarStartMonth);
|
|
1874
|
+
if (monthsDiff <= 0) {
|
|
1875
|
+
return void 0;
|
|
1876
|
+
}
|
|
1877
|
+
return addMonths2(month, -offset2);
|
|
1878
|
+
}
|
|
1879
|
+
|
|
1880
|
+
// node_modules/react-day-picker/dist/esm/helpers/getWeeks.js
|
|
1881
|
+
function getWeeks(months) {
|
|
1882
|
+
const initialWeeks = [];
|
|
1883
|
+
return months.reduce((weeks, month) => {
|
|
1884
|
+
return weeks.concat(month.weeks.slice());
|
|
1885
|
+
}, initialWeeks.slice());
|
|
1886
|
+
}
|
|
1887
|
+
|
|
1888
|
+
// node_modules/react-day-picker/dist/esm/helpers/useControlledValue.js
|
|
1889
|
+
import { useState } from "react";
|
|
1890
|
+
function useControlledValue(defaultValue, controlledValue) {
|
|
1891
|
+
const [uncontrolledValue, setValue] = useState(defaultValue);
|
|
1892
|
+
const value = controlledValue === void 0 ? uncontrolledValue : controlledValue;
|
|
1893
|
+
return [value, setValue];
|
|
1894
|
+
}
|
|
1895
|
+
|
|
1896
|
+
// node_modules/react-day-picker/dist/esm/useCalendar.js
|
|
1897
|
+
function useCalendar(props, dateLib) {
|
|
1898
|
+
const [navStart, navEnd] = getNavMonths(props, dateLib);
|
|
1899
|
+
const { startOfMonth: startOfMonth2, endOfMonth: endOfMonth2 } = dateLib;
|
|
1900
|
+
const initialMonth = getInitialMonth(props, navStart, navEnd, dateLib);
|
|
1901
|
+
const [firstMonth, setFirstMonth] = useControlledValue(
|
|
1902
|
+
initialMonth,
|
|
1903
|
+
// initialMonth is always computed from props.month if provided
|
|
1904
|
+
props.month ? initialMonth : void 0
|
|
1905
|
+
);
|
|
1906
|
+
useEffect(() => {
|
|
1907
|
+
const newInitialMonth = getInitialMonth(props, navStart, navEnd, dateLib);
|
|
1908
|
+
setFirstMonth(newInitialMonth);
|
|
1909
|
+
}, [props.timeZone]);
|
|
1910
|
+
const { months, weeks, days, previousMonth, nextMonth } = useMemo(() => {
|
|
1911
|
+
const displayMonths = getDisplayMonths(firstMonth, navEnd, { numberOfMonths: props.numberOfMonths }, dateLib);
|
|
1912
|
+
const dates = getDates(displayMonths, props.endMonth ? endOfMonth2(props.endMonth) : void 0, {
|
|
1913
|
+
ISOWeek: props.ISOWeek,
|
|
1914
|
+
fixedWeeks: props.fixedWeeks,
|
|
1915
|
+
broadcastCalendar: props.broadcastCalendar
|
|
1916
|
+
}, dateLib);
|
|
1917
|
+
const months2 = getMonths(displayMonths, dates, {
|
|
1918
|
+
broadcastCalendar: props.broadcastCalendar,
|
|
1919
|
+
fixedWeeks: props.fixedWeeks,
|
|
1920
|
+
ISOWeek: props.ISOWeek,
|
|
1921
|
+
reverseMonths: props.reverseMonths
|
|
1922
|
+
}, dateLib);
|
|
1923
|
+
const weeks2 = getWeeks(months2);
|
|
1924
|
+
const days2 = getDays(months2);
|
|
1925
|
+
const previousMonth2 = getPreviousMonth(firstMonth, navStart, props, dateLib);
|
|
1926
|
+
const nextMonth2 = getNextMonth(firstMonth, navEnd, props, dateLib);
|
|
1927
|
+
return {
|
|
1928
|
+
months: months2,
|
|
1929
|
+
weeks: weeks2,
|
|
1930
|
+
days: days2,
|
|
1931
|
+
previousMonth: previousMonth2,
|
|
1932
|
+
nextMonth: nextMonth2
|
|
1933
|
+
};
|
|
1934
|
+
}, [
|
|
1935
|
+
dateLib,
|
|
1936
|
+
firstMonth.getTime(),
|
|
1937
|
+
navEnd?.getTime(),
|
|
1938
|
+
navStart?.getTime(),
|
|
1939
|
+
props.disableNavigation,
|
|
1940
|
+
props.broadcastCalendar,
|
|
1941
|
+
props.endMonth?.getTime(),
|
|
1942
|
+
props.fixedWeeks,
|
|
1943
|
+
props.ISOWeek,
|
|
1944
|
+
props.numberOfMonths,
|
|
1945
|
+
props.pagedNavigation,
|
|
1946
|
+
props.reverseMonths
|
|
1947
|
+
]);
|
|
1948
|
+
const { disableNavigation, onMonthChange } = props;
|
|
1949
|
+
const isDayInCalendar = (day) => weeks.some((week) => week.days.some((d) => d.isEqualTo(day)));
|
|
1950
|
+
const goToMonth = (date) => {
|
|
1951
|
+
if (disableNavigation) {
|
|
1952
|
+
return;
|
|
1953
|
+
}
|
|
1954
|
+
let newMonth = startOfMonth2(date);
|
|
1955
|
+
if (navStart && newMonth < startOfMonth2(navStart)) {
|
|
1956
|
+
newMonth = startOfMonth2(navStart);
|
|
1957
|
+
}
|
|
1958
|
+
if (navEnd && newMonth > startOfMonth2(navEnd)) {
|
|
1959
|
+
newMonth = startOfMonth2(navEnd);
|
|
1960
|
+
}
|
|
1961
|
+
setFirstMonth(newMonth);
|
|
1962
|
+
onMonthChange?.(newMonth);
|
|
1963
|
+
};
|
|
1964
|
+
const goToDay = (day) => {
|
|
1965
|
+
if (isDayInCalendar(day)) {
|
|
1966
|
+
return;
|
|
1967
|
+
}
|
|
1968
|
+
goToMonth(day.date);
|
|
1969
|
+
};
|
|
1970
|
+
const calendar = {
|
|
1971
|
+
months,
|
|
1972
|
+
weeks,
|
|
1973
|
+
days,
|
|
1974
|
+
navStart,
|
|
1975
|
+
navEnd,
|
|
1976
|
+
previousMonth,
|
|
1977
|
+
nextMonth,
|
|
1978
|
+
goToMonth,
|
|
1979
|
+
goToDay
|
|
1980
|
+
};
|
|
1981
|
+
return calendar;
|
|
1982
|
+
}
|
|
1983
|
+
|
|
1984
|
+
// node_modules/react-day-picker/dist/esm/useFocus.js
|
|
1985
|
+
import { useState as useState2 } from "react";
|
|
1986
|
+
|
|
1987
|
+
// node_modules/react-day-picker/dist/esm/helpers/calculateFocusTarget.js
|
|
1988
|
+
var FocusTargetPriority;
|
|
1989
|
+
(function(FocusTargetPriority2) {
|
|
1990
|
+
FocusTargetPriority2[FocusTargetPriority2["Today"] = 0] = "Today";
|
|
1991
|
+
FocusTargetPriority2[FocusTargetPriority2["Selected"] = 1] = "Selected";
|
|
1992
|
+
FocusTargetPriority2[FocusTargetPriority2["LastFocused"] = 2] = "LastFocused";
|
|
1993
|
+
FocusTargetPriority2[FocusTargetPriority2["FocusedModifier"] = 3] = "FocusedModifier";
|
|
1994
|
+
})(FocusTargetPriority || (FocusTargetPriority = {}));
|
|
1995
|
+
function isFocusableDay(modifiers) {
|
|
1996
|
+
return !modifiers[DayFlag.disabled] && !modifiers[DayFlag.hidden] && !modifiers[DayFlag.outside];
|
|
1997
|
+
}
|
|
1998
|
+
function calculateFocusTarget(days, getModifiers, isSelected, lastFocused) {
|
|
1999
|
+
let focusTarget;
|
|
2000
|
+
let foundFocusTargetPriority = -1;
|
|
2001
|
+
for (const day of days) {
|
|
2002
|
+
const modifiers = getModifiers(day);
|
|
2003
|
+
if (isFocusableDay(modifiers)) {
|
|
2004
|
+
if (modifiers[DayFlag.focused] && foundFocusTargetPriority < FocusTargetPriority.FocusedModifier) {
|
|
2005
|
+
focusTarget = day;
|
|
2006
|
+
foundFocusTargetPriority = FocusTargetPriority.FocusedModifier;
|
|
2007
|
+
} else if (lastFocused?.isEqualTo(day) && foundFocusTargetPriority < FocusTargetPriority.LastFocused) {
|
|
2008
|
+
focusTarget = day;
|
|
2009
|
+
foundFocusTargetPriority = FocusTargetPriority.LastFocused;
|
|
2010
|
+
} else if (isSelected(day.date) && foundFocusTargetPriority < FocusTargetPriority.Selected) {
|
|
2011
|
+
focusTarget = day;
|
|
2012
|
+
foundFocusTargetPriority = FocusTargetPriority.Selected;
|
|
2013
|
+
} else if (modifiers[DayFlag.today] && foundFocusTargetPriority < FocusTargetPriority.Today) {
|
|
2014
|
+
focusTarget = day;
|
|
2015
|
+
foundFocusTargetPriority = FocusTargetPriority.Today;
|
|
2016
|
+
}
|
|
2017
|
+
}
|
|
2018
|
+
}
|
|
2019
|
+
if (!focusTarget) {
|
|
2020
|
+
focusTarget = days.find((day) => isFocusableDay(getModifiers(day)));
|
|
2021
|
+
}
|
|
2022
|
+
return focusTarget;
|
|
2023
|
+
}
|
|
2024
|
+
|
|
2025
|
+
// node_modules/react-day-picker/dist/esm/helpers/getFocusableDate.js
|
|
2026
|
+
function getFocusableDate(moveBy, moveDir, refDate, navStart, navEnd, props, dateLib) {
|
|
2027
|
+
const { ISOWeek, broadcastCalendar } = props;
|
|
2028
|
+
const { addDays: addDays2, addMonths: addMonths2, addWeeks: addWeeks2, addYears: addYears2, endOfBroadcastWeek: endOfBroadcastWeek2, endOfISOWeek: endOfISOWeek2, endOfWeek: endOfWeek2, max: max2, min: min2, startOfBroadcastWeek: startOfBroadcastWeek2, startOfISOWeek: startOfISOWeek2, startOfWeek: startOfWeek2 } = dateLib;
|
|
2029
|
+
const moveFns = {
|
|
2030
|
+
day: addDays2,
|
|
2031
|
+
week: addWeeks2,
|
|
2032
|
+
month: addMonths2,
|
|
2033
|
+
year: addYears2,
|
|
2034
|
+
startOfWeek: (date) => broadcastCalendar ? startOfBroadcastWeek2(date, dateLib) : ISOWeek ? startOfISOWeek2(date) : startOfWeek2(date),
|
|
2035
|
+
endOfWeek: (date) => broadcastCalendar ? endOfBroadcastWeek2(date) : ISOWeek ? endOfISOWeek2(date) : endOfWeek2(date)
|
|
2036
|
+
};
|
|
2037
|
+
let focusableDate = moveFns[moveBy](refDate, moveDir === "after" ? 1 : -1);
|
|
2038
|
+
if (moveDir === "before" && navStart) {
|
|
2039
|
+
focusableDate = max2([navStart, focusableDate]);
|
|
2040
|
+
} else if (moveDir === "after" && navEnd) {
|
|
2041
|
+
focusableDate = min2([navEnd, focusableDate]);
|
|
2042
|
+
}
|
|
2043
|
+
return focusableDate;
|
|
2044
|
+
}
|
|
2045
|
+
|
|
2046
|
+
// node_modules/react-day-picker/dist/esm/helpers/getNextFocus.js
|
|
2047
|
+
function getNextFocus(moveBy, moveDir, refDay, calendarStartMonth, calendarEndMonth, props, dateLib, attempt = 0) {
|
|
2048
|
+
if (attempt > 365) {
|
|
2049
|
+
return void 0;
|
|
2050
|
+
}
|
|
2051
|
+
const focusableDate = getFocusableDate(moveBy, moveDir, refDay.date, calendarStartMonth, calendarEndMonth, props, dateLib);
|
|
2052
|
+
const isDisabled = Boolean(props.disabled && dateMatchModifiers(focusableDate, props.disabled, dateLib));
|
|
2053
|
+
const isHidden = Boolean(props.hidden && dateMatchModifiers(focusableDate, props.hidden, dateLib));
|
|
2054
|
+
const targetMonth = focusableDate;
|
|
2055
|
+
const focusDay = new CalendarDay(focusableDate, targetMonth, dateLib);
|
|
2056
|
+
if (!isDisabled && !isHidden) {
|
|
2057
|
+
return focusDay;
|
|
2058
|
+
}
|
|
2059
|
+
return getNextFocus(moveBy, moveDir, focusDay, calendarStartMonth, calendarEndMonth, props, dateLib, attempt + 1);
|
|
2060
|
+
}
|
|
2061
|
+
|
|
2062
|
+
// node_modules/react-day-picker/dist/esm/useFocus.js
|
|
2063
|
+
function useFocus(props, calendar, getModifiers, isSelected, dateLib) {
|
|
2064
|
+
const { autoFocus } = props;
|
|
2065
|
+
const [lastFocused, setLastFocused] = useState2();
|
|
2066
|
+
const focusTarget = calculateFocusTarget(calendar.days, getModifiers, isSelected || (() => false), lastFocused);
|
|
2067
|
+
const [focusedDay, setFocused] = useState2(autoFocus ? focusTarget : void 0);
|
|
2068
|
+
const blur = () => {
|
|
2069
|
+
setLastFocused(focusedDay);
|
|
2070
|
+
setFocused(void 0);
|
|
2071
|
+
};
|
|
2072
|
+
const moveFocus = (moveBy, moveDir) => {
|
|
2073
|
+
if (!focusedDay)
|
|
2074
|
+
return;
|
|
2075
|
+
const nextFocus = getNextFocus(moveBy, moveDir, focusedDay, calendar.navStart, calendar.navEnd, props, dateLib);
|
|
2076
|
+
if (!nextFocus)
|
|
2077
|
+
return;
|
|
2078
|
+
if (props.disableNavigation) {
|
|
2079
|
+
const isNextInCalendar = calendar.days.some((day) => day.isEqualTo(nextFocus));
|
|
2080
|
+
if (!isNextInCalendar) {
|
|
2081
|
+
return;
|
|
2082
|
+
}
|
|
2083
|
+
}
|
|
2084
|
+
calendar.goToDay(nextFocus);
|
|
2085
|
+
setFocused(nextFocus);
|
|
2086
|
+
};
|
|
2087
|
+
const isFocusTarget = (day) => {
|
|
2088
|
+
return Boolean(focusTarget?.isEqualTo(day));
|
|
2089
|
+
};
|
|
2090
|
+
const useFocus2 = {
|
|
2091
|
+
isFocusTarget,
|
|
2092
|
+
setFocused,
|
|
2093
|
+
focused: focusedDay,
|
|
2094
|
+
blur,
|
|
2095
|
+
moveFocus
|
|
2096
|
+
};
|
|
2097
|
+
return useFocus2;
|
|
2098
|
+
}
|
|
2099
|
+
|
|
2100
|
+
// node_modules/react-day-picker/dist/esm/selection/useMulti.js
|
|
2101
|
+
function useMulti(props, dateLib) {
|
|
2102
|
+
const { selected: initiallySelected, required, onSelect } = props;
|
|
2103
|
+
const [internallySelected, setSelected] = useControlledValue(initiallySelected, onSelect ? initiallySelected : void 0);
|
|
2104
|
+
const selected = !onSelect ? internallySelected : initiallySelected;
|
|
2105
|
+
const { isSameDay: isSameDay2 } = dateLib;
|
|
2106
|
+
const isSelected = (date) => {
|
|
2107
|
+
return selected?.some((d) => isSameDay2(d, date)) ?? false;
|
|
2108
|
+
};
|
|
2109
|
+
const { min: min2, max: max2 } = props;
|
|
2110
|
+
const select = (triggerDate, modifiers, e) => {
|
|
2111
|
+
let newDates = [...selected ?? []];
|
|
2112
|
+
if (isSelected(triggerDate)) {
|
|
2113
|
+
if (selected?.length === min2) {
|
|
2114
|
+
return;
|
|
2115
|
+
}
|
|
2116
|
+
if (required && selected?.length === 1) {
|
|
2117
|
+
return;
|
|
2118
|
+
}
|
|
2119
|
+
newDates = selected?.filter((d) => !isSameDay2(d, triggerDate));
|
|
2120
|
+
} else {
|
|
2121
|
+
if (selected?.length === max2) {
|
|
2122
|
+
newDates = [triggerDate];
|
|
2123
|
+
} else {
|
|
2124
|
+
newDates = [...newDates, triggerDate];
|
|
2125
|
+
}
|
|
2126
|
+
}
|
|
2127
|
+
if (!onSelect) {
|
|
2128
|
+
setSelected(newDates);
|
|
2129
|
+
}
|
|
2130
|
+
onSelect?.(newDates, triggerDate, modifiers, e);
|
|
2131
|
+
return newDates;
|
|
2132
|
+
};
|
|
2133
|
+
return {
|
|
2134
|
+
selected,
|
|
2135
|
+
select,
|
|
2136
|
+
isSelected
|
|
2137
|
+
};
|
|
2138
|
+
}
|
|
2139
|
+
|
|
2140
|
+
// node_modules/react-day-picker/dist/esm/utils/addToRange.js
|
|
2141
|
+
function addToRange(date, initialRange, min2 = 0, max2 = 0, required = false, dateLib = defaultDateLib) {
|
|
2142
|
+
const { from, to } = initialRange || {};
|
|
2143
|
+
const { isSameDay: isSameDay2, isAfter: isAfter2, isBefore: isBefore2 } = dateLib;
|
|
2144
|
+
let range;
|
|
2145
|
+
if (!from && !to) {
|
|
2146
|
+
range = { from: date, to: min2 > 0 ? void 0 : date };
|
|
2147
|
+
} else if (from && !to) {
|
|
2148
|
+
if (isSameDay2(from, date)) {
|
|
2149
|
+
if (min2 === 0) {
|
|
2150
|
+
range = { from, to: date };
|
|
2151
|
+
} else if (required) {
|
|
2152
|
+
range = { from, to: void 0 };
|
|
2153
|
+
} else {
|
|
2154
|
+
range = void 0;
|
|
2155
|
+
}
|
|
2156
|
+
} else if (isBefore2(date, from)) {
|
|
2157
|
+
range = { from: date, to: from };
|
|
2158
|
+
} else {
|
|
2159
|
+
range = { from, to: date };
|
|
2160
|
+
}
|
|
2161
|
+
} else if (from && to) {
|
|
2162
|
+
if (isSameDay2(from, date) && isSameDay2(to, date)) {
|
|
2163
|
+
if (required) {
|
|
2164
|
+
range = { from, to };
|
|
2165
|
+
} else {
|
|
2166
|
+
range = void 0;
|
|
2167
|
+
}
|
|
2168
|
+
} else if (isSameDay2(from, date)) {
|
|
2169
|
+
range = { from, to: min2 > 0 ? void 0 : date };
|
|
2170
|
+
} else if (isSameDay2(to, date)) {
|
|
2171
|
+
range = { from: date, to: min2 > 0 ? void 0 : date };
|
|
2172
|
+
} else if (isBefore2(date, from)) {
|
|
2173
|
+
range = { from: date, to };
|
|
2174
|
+
} else if (isAfter2(date, from)) {
|
|
2175
|
+
range = { from, to: date };
|
|
2176
|
+
} else if (isAfter2(date, to)) {
|
|
2177
|
+
range = { from, to: date };
|
|
2178
|
+
} else {
|
|
2179
|
+
throw new Error("Invalid range");
|
|
2180
|
+
}
|
|
2181
|
+
}
|
|
2182
|
+
if (range?.from && range?.to) {
|
|
2183
|
+
const diff = dateLib.differenceInCalendarDays(range.to, range.from);
|
|
2184
|
+
if (max2 > 0 && diff > max2) {
|
|
2185
|
+
range = { from: date, to: void 0 };
|
|
2186
|
+
} else if (min2 > 1 && diff < min2) {
|
|
2187
|
+
range = { from: date, to: void 0 };
|
|
2188
|
+
}
|
|
2189
|
+
}
|
|
2190
|
+
return range;
|
|
2191
|
+
}
|
|
2192
|
+
|
|
2193
|
+
// node_modules/react-day-picker/dist/esm/utils/rangeContainsDayOfWeek.js
|
|
2194
|
+
function rangeContainsDayOfWeek(range, dayOfWeek, dateLib = defaultDateLib) {
|
|
2195
|
+
const dayOfWeekArr = !Array.isArray(dayOfWeek) ? [dayOfWeek] : dayOfWeek;
|
|
2196
|
+
let date = range.from;
|
|
2197
|
+
const totalDays = dateLib.differenceInCalendarDays(range.to, range.from);
|
|
2198
|
+
const totalDaysLimit = Math.min(totalDays, 6);
|
|
2199
|
+
for (let i = 0; i <= totalDaysLimit; i++) {
|
|
2200
|
+
if (dayOfWeekArr.includes(date.getDay())) {
|
|
2201
|
+
return true;
|
|
2202
|
+
}
|
|
2203
|
+
date = dateLib.addDays(date, 1);
|
|
2204
|
+
}
|
|
2205
|
+
return false;
|
|
2206
|
+
}
|
|
2207
|
+
|
|
2208
|
+
// node_modules/react-day-picker/dist/esm/utils/rangeOverlaps.js
|
|
2209
|
+
function rangeOverlaps(rangeLeft, rangeRight, dateLib = defaultDateLib) {
|
|
2210
|
+
return rangeIncludesDate(rangeLeft, rangeRight.from, false, dateLib) || rangeIncludesDate(rangeLeft, rangeRight.to, false, dateLib) || rangeIncludesDate(rangeRight, rangeLeft.from, false, dateLib) || rangeIncludesDate(rangeRight, rangeLeft.to, false, dateLib);
|
|
2211
|
+
}
|
|
2212
|
+
|
|
2213
|
+
// node_modules/react-day-picker/dist/esm/utils/rangeContainsModifiers.js
|
|
2214
|
+
function rangeContainsModifiers(range, modifiers, dateLib = defaultDateLib) {
|
|
2215
|
+
const matchers = Array.isArray(modifiers) ? modifiers : [modifiers];
|
|
2216
|
+
const nonFunctionMatchers = matchers.filter((matcher) => typeof matcher !== "function");
|
|
2217
|
+
const nonFunctionMatchersResult = nonFunctionMatchers.some((matcher) => {
|
|
2218
|
+
if (typeof matcher === "boolean")
|
|
2219
|
+
return matcher;
|
|
2220
|
+
if (dateLib.isDate(matcher)) {
|
|
2221
|
+
return rangeIncludesDate(range, matcher, false, dateLib);
|
|
2222
|
+
}
|
|
2223
|
+
if (isDatesArray(matcher, dateLib)) {
|
|
2224
|
+
return matcher.some((date) => rangeIncludesDate(range, date, false, dateLib));
|
|
2225
|
+
}
|
|
2226
|
+
if (isDateRange(matcher)) {
|
|
2227
|
+
if (matcher.from && matcher.to) {
|
|
2228
|
+
return rangeOverlaps(range, { from: matcher.from, to: matcher.to }, dateLib);
|
|
2229
|
+
}
|
|
2230
|
+
return false;
|
|
2231
|
+
}
|
|
2232
|
+
if (isDayOfWeekType(matcher)) {
|
|
2233
|
+
return rangeContainsDayOfWeek(range, matcher.dayOfWeek, dateLib);
|
|
2234
|
+
}
|
|
2235
|
+
if (isDateInterval(matcher)) {
|
|
2236
|
+
const isClosedInterval = dateLib.isAfter(matcher.before, matcher.after);
|
|
2237
|
+
if (isClosedInterval) {
|
|
2238
|
+
return rangeOverlaps(range, {
|
|
2239
|
+
from: dateLib.addDays(matcher.after, 1),
|
|
2240
|
+
to: dateLib.addDays(matcher.before, -1)
|
|
2241
|
+
}, dateLib);
|
|
2242
|
+
}
|
|
2243
|
+
return dateMatchModifiers(range.from, matcher, dateLib) || dateMatchModifiers(range.to, matcher, dateLib);
|
|
2244
|
+
}
|
|
2245
|
+
if (isDateAfterType(matcher) || isDateBeforeType(matcher)) {
|
|
2246
|
+
return dateMatchModifiers(range.from, matcher, dateLib) || dateMatchModifiers(range.to, matcher, dateLib);
|
|
2247
|
+
}
|
|
2248
|
+
return false;
|
|
2249
|
+
});
|
|
2250
|
+
if (nonFunctionMatchersResult) {
|
|
2251
|
+
return true;
|
|
2252
|
+
}
|
|
2253
|
+
const functionMatchers = matchers.filter((matcher) => typeof matcher === "function");
|
|
2254
|
+
if (functionMatchers.length) {
|
|
2255
|
+
let date = range.from;
|
|
2256
|
+
const totalDays = dateLib.differenceInCalendarDays(range.to, range.from);
|
|
2257
|
+
for (let i = 0; i <= totalDays; i++) {
|
|
2258
|
+
if (functionMatchers.some((matcher) => matcher(date))) {
|
|
2259
|
+
return true;
|
|
2260
|
+
}
|
|
2261
|
+
date = dateLib.addDays(date, 1);
|
|
2262
|
+
}
|
|
2263
|
+
}
|
|
2264
|
+
return false;
|
|
2265
|
+
}
|
|
2266
|
+
|
|
2267
|
+
// node_modules/react-day-picker/dist/esm/selection/useRange.js
|
|
2268
|
+
function useRange(props, dateLib) {
|
|
2269
|
+
const { disabled, excludeDisabled, resetOnSelect, selected: initiallySelected, required, onSelect } = props;
|
|
2270
|
+
const [internallySelected, setSelected] = useControlledValue(initiallySelected, onSelect ? initiallySelected : void 0);
|
|
2271
|
+
const selected = !onSelect ? internallySelected : initiallySelected;
|
|
2272
|
+
const isSelected = (date) => selected && rangeIncludesDate(selected, date, false, dateLib);
|
|
2273
|
+
const select = (triggerDate, modifiers, e) => {
|
|
2274
|
+
const { min: min2, max: max2 } = props;
|
|
2275
|
+
let newRange;
|
|
2276
|
+
if (triggerDate) {
|
|
2277
|
+
const selectedFrom = selected?.from;
|
|
2278
|
+
const selectedTo = selected?.to;
|
|
2279
|
+
const hasFullRange = !!selectedFrom && !!selectedTo;
|
|
2280
|
+
const isClickingSingleDayRange = !!selectedFrom && !!selectedTo && dateLib.isSameDay(selectedFrom, selectedTo) && dateLib.isSameDay(triggerDate, selectedFrom);
|
|
2281
|
+
if (resetOnSelect && (hasFullRange || !selected?.from)) {
|
|
2282
|
+
if (!required && isClickingSingleDayRange) {
|
|
2283
|
+
newRange = void 0;
|
|
2284
|
+
} else {
|
|
2285
|
+
newRange = { from: triggerDate, to: void 0 };
|
|
2286
|
+
}
|
|
2287
|
+
} else {
|
|
2288
|
+
newRange = addToRange(triggerDate, selected, min2, max2, required, dateLib);
|
|
2289
|
+
}
|
|
2290
|
+
}
|
|
2291
|
+
if (excludeDisabled && disabled && newRange?.from && newRange.to) {
|
|
2292
|
+
if (rangeContainsModifiers({ from: newRange.from, to: newRange.to }, disabled, dateLib)) {
|
|
2293
|
+
newRange.from = triggerDate;
|
|
2294
|
+
newRange.to = void 0;
|
|
2295
|
+
}
|
|
2296
|
+
}
|
|
2297
|
+
if (!onSelect) {
|
|
2298
|
+
setSelected(newRange);
|
|
2299
|
+
}
|
|
2300
|
+
onSelect?.(newRange, triggerDate, modifiers, e);
|
|
2301
|
+
return newRange;
|
|
2302
|
+
};
|
|
2303
|
+
return {
|
|
2304
|
+
selected,
|
|
2305
|
+
select,
|
|
2306
|
+
isSelected
|
|
2307
|
+
};
|
|
2308
|
+
}
|
|
2309
|
+
|
|
2310
|
+
// node_modules/react-day-picker/dist/esm/selection/useSingle.js
|
|
2311
|
+
function useSingle(props, dateLib) {
|
|
2312
|
+
const { selected: initiallySelected, required, onSelect } = props;
|
|
2313
|
+
const [internallySelected, setSelected] = useControlledValue(initiallySelected, onSelect ? initiallySelected : void 0);
|
|
2314
|
+
const selected = !onSelect ? internallySelected : initiallySelected;
|
|
2315
|
+
const { isSameDay: isSameDay2 } = dateLib;
|
|
2316
|
+
const isSelected = (compareDate) => {
|
|
2317
|
+
return selected ? isSameDay2(selected, compareDate) : false;
|
|
2318
|
+
};
|
|
2319
|
+
const select = (triggerDate, modifiers, e) => {
|
|
2320
|
+
let newDate = triggerDate;
|
|
2321
|
+
if (!required && selected && selected && isSameDay2(triggerDate, selected)) {
|
|
2322
|
+
newDate = void 0;
|
|
2323
|
+
}
|
|
2324
|
+
if (!onSelect) {
|
|
2325
|
+
setSelected(newDate);
|
|
2326
|
+
}
|
|
2327
|
+
if (required) {
|
|
2328
|
+
onSelect?.(newDate, triggerDate, modifiers, e);
|
|
2329
|
+
} else {
|
|
2330
|
+
onSelect?.(newDate, triggerDate, modifiers, e);
|
|
2331
|
+
}
|
|
2332
|
+
return newDate;
|
|
2333
|
+
};
|
|
2334
|
+
return {
|
|
2335
|
+
selected,
|
|
2336
|
+
select,
|
|
2337
|
+
isSelected
|
|
2338
|
+
};
|
|
2339
|
+
}
|
|
2340
|
+
|
|
2341
|
+
// node_modules/react-day-picker/dist/esm/useSelection.js
|
|
2342
|
+
function useSelection(props, dateLib) {
|
|
2343
|
+
const single = useSingle(props, dateLib);
|
|
2344
|
+
const multi = useMulti(props, dateLib);
|
|
2345
|
+
const range = useRange(props, dateLib);
|
|
2346
|
+
switch (props.mode) {
|
|
2347
|
+
case "single":
|
|
2348
|
+
return single;
|
|
2349
|
+
case "multiple":
|
|
2350
|
+
return multi;
|
|
2351
|
+
case "range":
|
|
2352
|
+
return range;
|
|
2353
|
+
default:
|
|
2354
|
+
return void 0;
|
|
2355
|
+
}
|
|
2356
|
+
}
|
|
2357
|
+
|
|
2358
|
+
// node_modules/react-day-picker/dist/esm/utils/toTimeZone.js
|
|
2359
|
+
function toTimeZone(date, timeZone) {
|
|
2360
|
+
if (date instanceof TZDate && date.timeZone === timeZone) {
|
|
2361
|
+
return date;
|
|
2362
|
+
}
|
|
2363
|
+
return new TZDate(date, timeZone);
|
|
2364
|
+
}
|
|
2365
|
+
|
|
2366
|
+
// node_modules/react-day-picker/dist/esm/utils/convertMatchersToTimeZone.js
|
|
2367
|
+
function toZoneNoon(date, timeZone, noonSafe) {
|
|
2368
|
+
if (!noonSafe)
|
|
2369
|
+
return toTimeZone(date, timeZone);
|
|
2370
|
+
const zoned = toTimeZone(date, timeZone);
|
|
2371
|
+
const noonZoned = new TZDate(zoned.getFullYear(), zoned.getMonth(), zoned.getDate(), 12, 0, 0, timeZone);
|
|
2372
|
+
return new Date(noonZoned.getTime());
|
|
2373
|
+
}
|
|
2374
|
+
function convertMatcher(matcher, timeZone, noonSafe) {
|
|
2375
|
+
if (typeof matcher === "boolean" || typeof matcher === "function") {
|
|
2376
|
+
return matcher;
|
|
2377
|
+
}
|
|
2378
|
+
if (matcher instanceof Date) {
|
|
2379
|
+
return toZoneNoon(matcher, timeZone, noonSafe);
|
|
2380
|
+
}
|
|
2381
|
+
if (Array.isArray(matcher)) {
|
|
2382
|
+
return matcher.map((value) => value instanceof Date ? toZoneNoon(value, timeZone, noonSafe) : value);
|
|
2383
|
+
}
|
|
2384
|
+
if (isDateRange(matcher)) {
|
|
2385
|
+
return {
|
|
2386
|
+
...matcher,
|
|
2387
|
+
from: matcher.from ? toTimeZone(matcher.from, timeZone) : matcher.from,
|
|
2388
|
+
to: matcher.to ? toTimeZone(matcher.to, timeZone) : matcher.to
|
|
2389
|
+
};
|
|
2390
|
+
}
|
|
2391
|
+
if (isDateInterval(matcher)) {
|
|
2392
|
+
return {
|
|
2393
|
+
before: toZoneNoon(matcher.before, timeZone, noonSafe),
|
|
2394
|
+
after: toZoneNoon(matcher.after, timeZone, noonSafe)
|
|
2395
|
+
};
|
|
2396
|
+
}
|
|
2397
|
+
if (isDateAfterType(matcher)) {
|
|
2398
|
+
return {
|
|
2399
|
+
after: toZoneNoon(matcher.after, timeZone, noonSafe)
|
|
2400
|
+
};
|
|
2401
|
+
}
|
|
2402
|
+
if (isDateBeforeType(matcher)) {
|
|
2403
|
+
return {
|
|
2404
|
+
before: toZoneNoon(matcher.before, timeZone, noonSafe)
|
|
2405
|
+
};
|
|
2406
|
+
}
|
|
2407
|
+
return matcher;
|
|
2408
|
+
}
|
|
2409
|
+
function convertMatchersToTimeZone(matchers, timeZone, noonSafe) {
|
|
2410
|
+
if (!matchers) {
|
|
2411
|
+
return matchers;
|
|
2412
|
+
}
|
|
2413
|
+
if (Array.isArray(matchers)) {
|
|
2414
|
+
return matchers.map((matcher) => convertMatcher(matcher, timeZone, noonSafe));
|
|
2415
|
+
}
|
|
2416
|
+
return convertMatcher(matchers, timeZone, noonSafe);
|
|
2417
|
+
}
|
|
2418
|
+
|
|
2419
|
+
// node_modules/react-day-picker/dist/esm/DayPicker.js
|
|
2420
|
+
function DayPicker(initialProps) {
|
|
2421
|
+
let props = initialProps;
|
|
2422
|
+
const timeZone = props.timeZone;
|
|
2423
|
+
if (timeZone) {
|
|
2424
|
+
props = {
|
|
2425
|
+
...initialProps,
|
|
2426
|
+
timeZone
|
|
2427
|
+
};
|
|
2428
|
+
if (props.today) {
|
|
2429
|
+
props.today = toTimeZone(props.today, timeZone);
|
|
2430
|
+
}
|
|
2431
|
+
if (props.month) {
|
|
2432
|
+
props.month = toTimeZone(props.month, timeZone);
|
|
2433
|
+
}
|
|
2434
|
+
if (props.defaultMonth) {
|
|
2435
|
+
props.defaultMonth = toTimeZone(props.defaultMonth, timeZone);
|
|
2436
|
+
}
|
|
2437
|
+
if (props.startMonth) {
|
|
2438
|
+
props.startMonth = toTimeZone(props.startMonth, timeZone);
|
|
2439
|
+
}
|
|
2440
|
+
if (props.endMonth) {
|
|
2441
|
+
props.endMonth = toTimeZone(props.endMonth, timeZone);
|
|
2442
|
+
}
|
|
2443
|
+
if (props.mode === "single" && props.selected) {
|
|
2444
|
+
props.selected = toTimeZone(props.selected, timeZone);
|
|
2445
|
+
} else if (props.mode === "multiple" && props.selected) {
|
|
2446
|
+
props.selected = props.selected?.map((date) => toTimeZone(date, timeZone));
|
|
2447
|
+
} else if (props.mode === "range" && props.selected) {
|
|
2448
|
+
props.selected = {
|
|
2449
|
+
from: props.selected.from ? toTimeZone(props.selected.from, timeZone) : props.selected.from,
|
|
2450
|
+
to: props.selected.to ? toTimeZone(props.selected.to, timeZone) : props.selected.to
|
|
2451
|
+
};
|
|
2452
|
+
}
|
|
2453
|
+
if (props.disabled !== void 0) {
|
|
2454
|
+
props.disabled = convertMatchersToTimeZone(props.disabled, timeZone);
|
|
2455
|
+
}
|
|
2456
|
+
if (props.hidden !== void 0) {
|
|
2457
|
+
props.hidden = convertMatchersToTimeZone(props.hidden, timeZone);
|
|
2458
|
+
}
|
|
2459
|
+
if (props.modifiers) {
|
|
2460
|
+
const nextModifiers = {};
|
|
2461
|
+
Object.keys(props.modifiers).forEach((key) => {
|
|
2462
|
+
nextModifiers[key] = convertMatchersToTimeZone(props.modifiers?.[key], timeZone);
|
|
2463
|
+
});
|
|
2464
|
+
props.modifiers = nextModifiers;
|
|
2465
|
+
}
|
|
2466
|
+
}
|
|
2467
|
+
const { components, formatters, labels, dateLib, locale, classNames } = useMemo2(() => {
|
|
2468
|
+
const locale2 = { ...enUS, ...props.locale };
|
|
2469
|
+
const weekStartsOn = props.broadcastCalendar ? 1 : props.weekStartsOn;
|
|
2470
|
+
const noonOverrides = props.noonSafe && props.timeZone ? createNoonOverrides(props.timeZone, {
|
|
2471
|
+
weekStartsOn,
|
|
2472
|
+
locale: locale2
|
|
2473
|
+
}) : void 0;
|
|
2474
|
+
const overrides = props.dateLib && noonOverrides ? { ...noonOverrides, ...props.dateLib } : props.dateLib ?? noonOverrides;
|
|
2475
|
+
const dateLib2 = new DateLib({
|
|
2476
|
+
locale: locale2,
|
|
2477
|
+
weekStartsOn,
|
|
2478
|
+
firstWeekContainsDate: props.firstWeekContainsDate,
|
|
2479
|
+
useAdditionalWeekYearTokens: props.useAdditionalWeekYearTokens,
|
|
2480
|
+
useAdditionalDayOfYearTokens: props.useAdditionalDayOfYearTokens,
|
|
2481
|
+
timeZone: props.timeZone,
|
|
2482
|
+
numerals: props.numerals
|
|
2483
|
+
}, overrides);
|
|
2484
|
+
return {
|
|
2485
|
+
dateLib: dateLib2,
|
|
2486
|
+
components: getComponents(props.components),
|
|
2487
|
+
formatters: getFormatters(props.formatters),
|
|
2488
|
+
labels: getLabels(props.labels, dateLib2.options),
|
|
2489
|
+
locale: locale2,
|
|
2490
|
+
classNames: { ...getDefaultClassNames(), ...props.classNames }
|
|
2491
|
+
};
|
|
2492
|
+
}, [
|
|
2493
|
+
props.locale,
|
|
2494
|
+
props.broadcastCalendar,
|
|
2495
|
+
props.weekStartsOn,
|
|
2496
|
+
props.firstWeekContainsDate,
|
|
2497
|
+
props.useAdditionalWeekYearTokens,
|
|
2498
|
+
props.useAdditionalDayOfYearTokens,
|
|
2499
|
+
props.timeZone,
|
|
2500
|
+
props.numerals,
|
|
2501
|
+
props.dateLib,
|
|
2502
|
+
props.noonSafe,
|
|
2503
|
+
props.components,
|
|
2504
|
+
props.formatters,
|
|
2505
|
+
props.labels,
|
|
2506
|
+
props.classNames
|
|
2507
|
+
]);
|
|
2508
|
+
if (!props.today) {
|
|
2509
|
+
props = { ...props, today: dateLib.today() };
|
|
2510
|
+
}
|
|
2511
|
+
const { captionLayout, mode, navLayout, numberOfMonths = 1, onDayBlur, onDayClick, onDayFocus, onDayKeyDown, onDayMouseEnter, onDayMouseLeave, onNextClick, onPrevClick, showWeekNumber, styles } = props;
|
|
2512
|
+
const { formatCaption: formatCaption2, formatDay: formatDay2, formatMonthDropdown: formatMonthDropdown2, formatWeekNumber: formatWeekNumber2, formatWeekNumberHeader: formatWeekNumberHeader2, formatWeekdayName: formatWeekdayName2, formatYearDropdown: formatYearDropdown2 } = formatters;
|
|
2513
|
+
const calendar = useCalendar(props, dateLib);
|
|
2514
|
+
const { days, months, navStart, navEnd, previousMonth, nextMonth, goToMonth } = calendar;
|
|
2515
|
+
const getModifiers = createGetModifiers(days, props, navStart, navEnd, dateLib);
|
|
2516
|
+
const { isSelected, select, selected: selectedValue } = useSelection(props, dateLib) ?? {};
|
|
2517
|
+
const { blur, focused, isFocusTarget, moveFocus, setFocused } = useFocus(props, calendar, getModifiers, isSelected ?? (() => false), dateLib);
|
|
2518
|
+
const { labelDayButton: labelDayButton2, labelGridcell: labelGridcell2, labelGrid: labelGrid2, labelMonthDropdown: labelMonthDropdown2, labelNav: labelNav2, labelPrevious: labelPrevious2, labelNext: labelNext2, labelWeekday: labelWeekday2, labelWeekNumber: labelWeekNumber2, labelWeekNumberHeader: labelWeekNumberHeader2, labelYearDropdown: labelYearDropdown2 } = labels;
|
|
2519
|
+
const weekdays = useMemo2(() => getWeekdays(dateLib, props.ISOWeek, props.broadcastCalendar, props.today), [dateLib, props.ISOWeek, props.broadcastCalendar, props.today]);
|
|
2520
|
+
const isInteractive = mode !== void 0 || onDayClick !== void 0;
|
|
2521
|
+
const handlePreviousClick = useCallback2(() => {
|
|
2522
|
+
if (!previousMonth)
|
|
2523
|
+
return;
|
|
2524
|
+
goToMonth(previousMonth);
|
|
2525
|
+
onPrevClick?.(previousMonth);
|
|
2526
|
+
}, [previousMonth, goToMonth, onPrevClick]);
|
|
2527
|
+
const handleNextClick = useCallback2(() => {
|
|
2528
|
+
if (!nextMonth)
|
|
2529
|
+
return;
|
|
2530
|
+
goToMonth(nextMonth);
|
|
2531
|
+
onNextClick?.(nextMonth);
|
|
2532
|
+
}, [goToMonth, nextMonth, onNextClick]);
|
|
2533
|
+
const handleDayClick = useCallback2((day, m) => (e) => {
|
|
2534
|
+
e.preventDefault();
|
|
2535
|
+
e.stopPropagation();
|
|
2536
|
+
setFocused(day);
|
|
2537
|
+
if (m.disabled) {
|
|
2538
|
+
return;
|
|
2539
|
+
}
|
|
2540
|
+
select?.(day.date, m, e);
|
|
2541
|
+
onDayClick?.(day.date, m, e);
|
|
2542
|
+
}, [select, onDayClick, setFocused]);
|
|
2543
|
+
const handleDayFocus = useCallback2((day, m) => (e) => {
|
|
2544
|
+
setFocused(day);
|
|
2545
|
+
onDayFocus?.(day.date, m, e);
|
|
2546
|
+
}, [onDayFocus, setFocused]);
|
|
2547
|
+
const handleDayBlur = useCallback2((day, m) => (e) => {
|
|
2548
|
+
blur();
|
|
2549
|
+
onDayBlur?.(day.date, m, e);
|
|
2550
|
+
}, [blur, onDayBlur]);
|
|
2551
|
+
const handleDayKeyDown = useCallback2((day, modifiers) => (e) => {
|
|
2552
|
+
const keyMap = {
|
|
2553
|
+
ArrowLeft: [
|
|
2554
|
+
e.shiftKey ? "month" : "day",
|
|
2555
|
+
props.dir === "rtl" ? "after" : "before"
|
|
2556
|
+
],
|
|
2557
|
+
ArrowRight: [
|
|
2558
|
+
e.shiftKey ? "month" : "day",
|
|
2559
|
+
props.dir === "rtl" ? "before" : "after"
|
|
2560
|
+
],
|
|
2561
|
+
ArrowDown: [e.shiftKey ? "year" : "week", "after"],
|
|
2562
|
+
ArrowUp: [e.shiftKey ? "year" : "week", "before"],
|
|
2563
|
+
PageUp: [e.shiftKey ? "year" : "month", "before"],
|
|
2564
|
+
PageDown: [e.shiftKey ? "year" : "month", "after"],
|
|
2565
|
+
Home: ["startOfWeek", "before"],
|
|
2566
|
+
End: ["endOfWeek", "after"]
|
|
2567
|
+
};
|
|
2568
|
+
if (keyMap[e.key]) {
|
|
2569
|
+
e.preventDefault();
|
|
2570
|
+
e.stopPropagation();
|
|
2571
|
+
const [moveBy, moveDir] = keyMap[e.key];
|
|
2572
|
+
moveFocus(moveBy, moveDir);
|
|
2573
|
+
}
|
|
2574
|
+
onDayKeyDown?.(day.date, modifiers, e);
|
|
2575
|
+
}, [moveFocus, onDayKeyDown, props.dir]);
|
|
2576
|
+
const handleDayMouseEnter = useCallback2((day, modifiers) => (e) => {
|
|
2577
|
+
onDayMouseEnter?.(day.date, modifiers, e);
|
|
2578
|
+
}, [onDayMouseEnter]);
|
|
2579
|
+
const handleDayMouseLeave = useCallback2((day, modifiers) => (e) => {
|
|
2580
|
+
onDayMouseLeave?.(day.date, modifiers, e);
|
|
2581
|
+
}, [onDayMouseLeave]);
|
|
2582
|
+
const handleMonthChange = useCallback2((date) => (e) => {
|
|
2583
|
+
const selectedMonth = Number(e.target.value);
|
|
2584
|
+
const month = dateLib.setMonth(dateLib.startOfMonth(date), selectedMonth);
|
|
2585
|
+
goToMonth(month);
|
|
2586
|
+
}, [dateLib, goToMonth]);
|
|
2587
|
+
const handleYearChange = useCallback2((date) => (e) => {
|
|
2588
|
+
const selectedYear = Number(e.target.value);
|
|
2589
|
+
const month = dateLib.setYear(dateLib.startOfMonth(date), selectedYear);
|
|
2590
|
+
goToMonth(month);
|
|
2591
|
+
}, [dateLib, goToMonth]);
|
|
2592
|
+
const { className, style } = useMemo2(() => ({
|
|
2593
|
+
className: [classNames[UI.Root], props.className].filter(Boolean).join(" "),
|
|
2594
|
+
style: { ...styles?.[UI.Root], ...props.style }
|
|
2595
|
+
}), [classNames, props.className, props.style, styles]);
|
|
2596
|
+
const dataAttributes = getDataAttributes(props);
|
|
2597
|
+
const rootElRef = useRef2(null);
|
|
2598
|
+
useAnimation(rootElRef, Boolean(props.animate), {
|
|
2599
|
+
classNames,
|
|
2600
|
+
months,
|
|
2601
|
+
focused,
|
|
2602
|
+
dateLib
|
|
2603
|
+
});
|
|
2604
|
+
const contextValue = {
|
|
2605
|
+
dayPickerProps: props,
|
|
2606
|
+
selected: selectedValue,
|
|
2607
|
+
select,
|
|
2608
|
+
isSelected,
|
|
2609
|
+
months,
|
|
2610
|
+
nextMonth,
|
|
2611
|
+
previousMonth,
|
|
2612
|
+
goToMonth,
|
|
2613
|
+
getModifiers,
|
|
2614
|
+
components,
|
|
2615
|
+
classNames,
|
|
2616
|
+
styles,
|
|
2617
|
+
labels,
|
|
2618
|
+
formatters
|
|
2619
|
+
};
|
|
2620
|
+
return React27.createElement(
|
|
2621
|
+
dayPickerContext.Provider,
|
|
2622
|
+
{ value: contextValue },
|
|
2623
|
+
React27.createElement(
|
|
2624
|
+
components.Root,
|
|
2625
|
+
{ rootRef: props.animate ? rootElRef : void 0, className, style, dir: props.dir, id: props.id, lang: props.lang ?? locale.code, nonce: props.nonce, title: props.title, role: props.role, "aria-label": props["aria-label"], "aria-labelledby": props["aria-labelledby"], ...dataAttributes },
|
|
2626
|
+
React27.createElement(
|
|
2627
|
+
components.Months,
|
|
2628
|
+
{ className: classNames[UI.Months], style: styles?.[UI.Months] },
|
|
2629
|
+
!props.hideNavigation && !navLayout && React27.createElement(components.Nav, { "data-animated-nav": props.animate ? "true" : void 0, className: classNames[UI.Nav], style: styles?.[UI.Nav], "aria-label": labelNav2(), onPreviousClick: handlePreviousClick, onNextClick: handleNextClick, previousMonth, nextMonth }),
|
|
2630
|
+
months.map((calendarMonth, displayIndex) => {
|
|
2631
|
+
return React27.createElement(
|
|
2632
|
+
components.Month,
|
|
2633
|
+
{
|
|
2634
|
+
"data-animated-month": props.animate ? "true" : void 0,
|
|
2635
|
+
className: classNames[UI.Month],
|
|
2636
|
+
style: styles?.[UI.Month],
|
|
2637
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: breaks animation
|
|
2638
|
+
key: displayIndex,
|
|
2639
|
+
displayIndex,
|
|
2640
|
+
calendarMonth
|
|
2641
|
+
},
|
|
2642
|
+
navLayout === "around" && !props.hideNavigation && displayIndex === 0 && React27.createElement(
|
|
2643
|
+
components.PreviousMonthButton,
|
|
2644
|
+
{ type: "button", className: classNames[UI.PreviousMonthButton], tabIndex: previousMonth ? void 0 : -1, "aria-disabled": previousMonth ? void 0 : true, "aria-label": labelPrevious2(previousMonth), onClick: handlePreviousClick, "data-animated-button": props.animate ? "true" : void 0 },
|
|
2645
|
+
React27.createElement(components.Chevron, { disabled: previousMonth ? void 0 : true, className: classNames[UI.Chevron], orientation: props.dir === "rtl" ? "right" : "left" })
|
|
2646
|
+
),
|
|
2647
|
+
React27.createElement(components.MonthCaption, { "data-animated-caption": props.animate ? "true" : void 0, className: classNames[UI.MonthCaption], style: styles?.[UI.MonthCaption], calendarMonth, displayIndex }, captionLayout?.startsWith("dropdown") ? React27.createElement(
|
|
2648
|
+
components.DropdownNav,
|
|
2649
|
+
{ className: classNames[UI.Dropdowns], style: styles?.[UI.Dropdowns] },
|
|
2650
|
+
(() => {
|
|
2651
|
+
const monthControl = captionLayout === "dropdown" || captionLayout === "dropdown-months" ? React27.createElement(components.MonthsDropdown, { key: "month", className: classNames[UI.MonthsDropdown], "aria-label": labelMonthDropdown2(), classNames, components, disabled: Boolean(props.disableNavigation), onChange: handleMonthChange(calendarMonth.date), options: getMonthOptions(calendarMonth.date, navStart, navEnd, formatters, dateLib), style: styles?.[UI.Dropdown], value: dateLib.getMonth(calendarMonth.date) }) : React27.createElement("span", { key: "month" }, formatMonthDropdown2(calendarMonth.date, dateLib));
|
|
2652
|
+
const yearControl = captionLayout === "dropdown" || captionLayout === "dropdown-years" ? React27.createElement(components.YearsDropdown, { key: "year", className: classNames[UI.YearsDropdown], "aria-label": labelYearDropdown2(dateLib.options), classNames, components, disabled: Boolean(props.disableNavigation), onChange: handleYearChange(calendarMonth.date), options: getYearOptions(navStart, navEnd, formatters, dateLib, Boolean(props.reverseYears)), style: styles?.[UI.Dropdown], value: dateLib.getYear(calendarMonth.date) }) : React27.createElement("span", { key: "year" }, formatYearDropdown2(calendarMonth.date, dateLib));
|
|
2653
|
+
const controls = dateLib.getMonthYearOrder() === "year-first" ? [yearControl, monthControl] : [monthControl, yearControl];
|
|
2654
|
+
return controls;
|
|
2655
|
+
})(),
|
|
2656
|
+
React27.createElement("span", { role: "status", "aria-live": "polite", style: {
|
|
2657
|
+
border: 0,
|
|
2658
|
+
clip: "rect(0 0 0 0)",
|
|
2659
|
+
height: "1px",
|
|
2660
|
+
margin: "-1px",
|
|
2661
|
+
overflow: "hidden",
|
|
2662
|
+
padding: 0,
|
|
2663
|
+
position: "absolute",
|
|
2664
|
+
width: "1px",
|
|
2665
|
+
whiteSpace: "nowrap",
|
|
2666
|
+
wordWrap: "normal"
|
|
2667
|
+
} }, formatCaption2(calendarMonth.date, dateLib.options, dateLib))
|
|
2668
|
+
) : React27.createElement(components.CaptionLabel, { className: classNames[UI.CaptionLabel], role: "status", "aria-live": "polite" }, formatCaption2(calendarMonth.date, dateLib.options, dateLib))),
|
|
2669
|
+
navLayout === "around" && !props.hideNavigation && displayIndex === numberOfMonths - 1 && React27.createElement(
|
|
2670
|
+
components.NextMonthButton,
|
|
2671
|
+
{ type: "button", className: classNames[UI.NextMonthButton], tabIndex: nextMonth ? void 0 : -1, "aria-disabled": nextMonth ? void 0 : true, "aria-label": labelNext2(nextMonth), onClick: handleNextClick, "data-animated-button": props.animate ? "true" : void 0 },
|
|
2672
|
+
React27.createElement(components.Chevron, { disabled: nextMonth ? void 0 : true, className: classNames[UI.Chevron], orientation: props.dir === "rtl" ? "left" : "right" })
|
|
2673
|
+
),
|
|
2674
|
+
displayIndex === numberOfMonths - 1 && navLayout === "after" && !props.hideNavigation && React27.createElement(components.Nav, { "data-animated-nav": props.animate ? "true" : void 0, className: classNames[UI.Nav], style: styles?.[UI.Nav], "aria-label": labelNav2(), onPreviousClick: handlePreviousClick, onNextClick: handleNextClick, previousMonth, nextMonth }),
|
|
2675
|
+
React27.createElement(
|
|
2676
|
+
components.MonthGrid,
|
|
2677
|
+
{ role: "grid", "aria-multiselectable": mode === "multiple" || mode === "range", "aria-label": labelGrid2(calendarMonth.date, dateLib.options, dateLib) || void 0, className: classNames[UI.MonthGrid], style: styles?.[UI.MonthGrid] },
|
|
2678
|
+
!props.hideWeekdays && React27.createElement(
|
|
2679
|
+
components.Weekdays,
|
|
2680
|
+
{ "data-animated-weekdays": props.animate ? "true" : void 0, className: classNames[UI.Weekdays], style: styles?.[UI.Weekdays] },
|
|
2681
|
+
showWeekNumber && React27.createElement(components.WeekNumberHeader, { "aria-label": labelWeekNumberHeader2(dateLib.options), className: classNames[UI.WeekNumberHeader], style: styles?.[UI.WeekNumberHeader], scope: "col" }, formatWeekNumberHeader2()),
|
|
2682
|
+
weekdays.map((weekday) => React27.createElement(components.Weekday, { "aria-label": labelWeekday2(weekday, dateLib.options, dateLib), className: classNames[UI.Weekday], key: String(weekday), style: styles?.[UI.Weekday], scope: "col" }, formatWeekdayName2(weekday, dateLib.options, dateLib)))
|
|
2683
|
+
),
|
|
2684
|
+
React27.createElement(components.Weeks, { "data-animated-weeks": props.animate ? "true" : void 0, className: classNames[UI.Weeks], style: styles?.[UI.Weeks] }, calendarMonth.weeks.map((week) => {
|
|
2685
|
+
return React27.createElement(
|
|
2686
|
+
components.Week,
|
|
2687
|
+
{ className: classNames[UI.Week], key: week.weekNumber, style: styles?.[UI.Week], week },
|
|
2688
|
+
showWeekNumber && React27.createElement(components.WeekNumber, { week, style: styles?.[UI.WeekNumber], "aria-label": labelWeekNumber2(week.weekNumber, {
|
|
2689
|
+
locale
|
|
2690
|
+
}), className: classNames[UI.WeekNumber], scope: "row", role: "rowheader" }, formatWeekNumber2(week.weekNumber, dateLib)),
|
|
2691
|
+
week.days.map((day) => {
|
|
2692
|
+
const { date } = day;
|
|
2693
|
+
const modifiers = getModifiers(day);
|
|
2694
|
+
modifiers[DayFlag.focused] = !modifiers.hidden && Boolean(focused?.isEqualTo(day));
|
|
2695
|
+
modifiers[SelectionState.selected] = isSelected?.(date) || modifiers.selected;
|
|
2696
|
+
if (isDateRange(selectedValue)) {
|
|
2697
|
+
const { from, to } = selectedValue;
|
|
2698
|
+
modifiers[SelectionState.range_start] = Boolean(from && to && dateLib.isSameDay(date, from));
|
|
2699
|
+
modifiers[SelectionState.range_end] = Boolean(from && to && dateLib.isSameDay(date, to));
|
|
2700
|
+
modifiers[SelectionState.range_middle] = rangeIncludesDate(selectedValue, date, true, dateLib);
|
|
2701
|
+
}
|
|
2702
|
+
const style2 = getStyleForModifiers(modifiers, styles, props.modifiersStyles);
|
|
2703
|
+
const className2 = getClassNamesForModifiers(modifiers, classNames, props.modifiersClassNames);
|
|
2704
|
+
const ariaLabel = !isInteractive && !modifiers.hidden ? labelGridcell2(date, modifiers, dateLib.options, dateLib) : void 0;
|
|
2705
|
+
return React27.createElement(components.Day, { key: `${day.isoDate}_${day.displayMonthId}`, day, modifiers, className: className2.join(" "), style: style2, role: "gridcell", "aria-selected": modifiers.selected || void 0, "aria-label": ariaLabel, "data-day": day.isoDate, "data-month": day.outside ? day.dateMonthId : void 0, "data-selected": modifiers.selected || void 0, "data-disabled": modifiers.disabled || void 0, "data-hidden": modifiers.hidden || void 0, "data-outside": day.outside || void 0, "data-focused": modifiers.focused || void 0, "data-today": modifiers.today || void 0 }, !modifiers.hidden && isInteractive ? React27.createElement(components.DayButton, { className: classNames[UI.DayButton], style: styles?.[UI.DayButton], type: "button", day, modifiers, disabled: !modifiers.focused && modifiers.disabled || void 0, "aria-disabled": modifiers.focused && modifiers.disabled || void 0, tabIndex: isFocusTarget(day) ? 0 : -1, "aria-label": labelDayButton2(date, modifiers, dateLib.options, dateLib), onClick: handleDayClick(day, modifiers), onBlur: handleDayBlur(day, modifiers), onFocus: handleDayFocus(day, modifiers), onKeyDown: handleDayKeyDown(day, modifiers), onMouseEnter: handleDayMouseEnter(day, modifiers), onMouseLeave: handleDayMouseLeave(day, modifiers) }, formatDay2(date, dateLib.options, dateLib)) : !modifiers.hidden && formatDay2(day.date, dateLib.options, dateLib));
|
|
2706
|
+
})
|
|
2707
|
+
);
|
|
2708
|
+
}))
|
|
2709
|
+
)
|
|
2710
|
+
);
|
|
2711
|
+
})
|
|
2712
|
+
),
|
|
2713
|
+
props.footer && React27.createElement(components.Footer, { className: classNames[UI.Footer], style: styles?.[UI.Footer], role: "status", "aria-live": "polite" }, props.footer)
|
|
2714
|
+
)
|
|
2715
|
+
);
|
|
2716
|
+
}
|
|
2717
|
+
|
|
2718
|
+
// src/nodes/DateTimeNode/DateTimeComponent.tsx
|
|
2719
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2720
|
+
var FORMAT_CLASSES = [
|
|
2721
|
+
[IS_BOLD, "bold"],
|
|
2722
|
+
[IS_HIGHLIGHT, "highlight"],
|
|
2723
|
+
[IS_ITALIC, "italic"],
|
|
2724
|
+
[IS_STRIKETHROUGH, "strikethrough"],
|
|
2725
|
+
[IS_UNDERLINE, "underline"]
|
|
2726
|
+
];
|
|
2727
|
+
var userTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
2728
|
+
function DateTimeComponent({
|
|
2729
|
+
dateTime,
|
|
2730
|
+
format: format3,
|
|
2731
|
+
nodeKey
|
|
2732
|
+
}) {
|
|
2733
|
+
const [editor] = useLexicalComposerContext();
|
|
2734
|
+
const [isOpen, setIsOpen] = useState3(false);
|
|
2735
|
+
const ref = useRef3(null);
|
|
2736
|
+
const [selected, setSelected] = useState3(dateTime);
|
|
2737
|
+
const [includeTime, setIncludeTime] = useState3(() => {
|
|
2738
|
+
if (dateTime === void 0) {
|
|
2739
|
+
return false;
|
|
2740
|
+
}
|
|
2741
|
+
const hours = dateTime?.getHours();
|
|
2742
|
+
const minutes = dateTime?.getMinutes();
|
|
2743
|
+
return hours !== 0 || minutes !== 0;
|
|
2744
|
+
});
|
|
2745
|
+
const [timeValue, setTimeValue] = useState3(() => {
|
|
2746
|
+
if (dateTime === void 0) {
|
|
2747
|
+
return "00:00";
|
|
2748
|
+
}
|
|
2749
|
+
const hours = dateTime?.getHours();
|
|
2750
|
+
const minutes = dateTime?.getMinutes();
|
|
2751
|
+
if (hours !== 0 || minutes !== 0) {
|
|
2752
|
+
return `${hours?.toString().padStart(2, "0")}:${minutes?.toString().padStart(2, "0")}`;
|
|
2753
|
+
}
|
|
2754
|
+
return "00:00";
|
|
2755
|
+
});
|
|
2756
|
+
const [isNodeSelected, setNodeSelected, clearNodeSelection] = useLexicalNodeSelection(nodeKey);
|
|
2757
|
+
const { refs, floatingStyles, context } = useFloating({
|
|
2758
|
+
elements: {
|
|
2759
|
+
reference: ref.current
|
|
2760
|
+
},
|
|
2761
|
+
middleware: [
|
|
2762
|
+
offset(5),
|
|
2763
|
+
flip({
|
|
2764
|
+
fallbackPlacements: ["top-start"]
|
|
2765
|
+
}),
|
|
2766
|
+
shift({ padding: 10 })
|
|
2767
|
+
],
|
|
2768
|
+
onOpenChange: setIsOpen,
|
|
2769
|
+
open: isOpen,
|
|
2770
|
+
placement: "bottom-start",
|
|
2771
|
+
strategy: "fixed",
|
|
2772
|
+
whileElementsMounted: autoUpdate
|
|
2773
|
+
});
|
|
2774
|
+
const role = useRole(context, { role: "dialog" });
|
|
2775
|
+
const dismiss = useDismiss(context);
|
|
2776
|
+
const { getFloatingProps } = useInteractions([role, dismiss]);
|
|
2777
|
+
useEffect2(() => {
|
|
2778
|
+
const dateTimePillRef = ref.current;
|
|
2779
|
+
function onClick(e) {
|
|
2780
|
+
e.preventDefault();
|
|
2781
|
+
setIsOpen(true);
|
|
2782
|
+
}
|
|
2783
|
+
if (dateTimePillRef) {
|
|
2784
|
+
dateTimePillRef.addEventListener("click", onClick);
|
|
2785
|
+
}
|
|
2786
|
+
return () => {
|
|
2787
|
+
if (dateTimePillRef) {
|
|
2788
|
+
dateTimePillRef.removeEventListener("click", onClick);
|
|
2789
|
+
}
|
|
2790
|
+
};
|
|
2791
|
+
}, [refs, editor]);
|
|
2792
|
+
const withDateTimeNode = (cb, onUpdate) => {
|
|
2793
|
+
editor.update(
|
|
2794
|
+
() => {
|
|
2795
|
+
const node = $getNodeByKey(nodeKey);
|
|
2796
|
+
if ($isDateTimeNode(node)) {
|
|
2797
|
+
cb(node);
|
|
2798
|
+
}
|
|
2799
|
+
},
|
|
2800
|
+
{ onUpdate }
|
|
2801
|
+
);
|
|
2802
|
+
};
|
|
2803
|
+
const handleCheckboxChange = (e) => {
|
|
2804
|
+
withDateTimeNode((node) => {
|
|
2805
|
+
if (e.target.checked) {
|
|
2806
|
+
setIncludeTime(true);
|
|
2807
|
+
} else {
|
|
2808
|
+
if (selected) {
|
|
2809
|
+
const newSelectedDate = setHours(setMinutes(selected, 0), 0);
|
|
2810
|
+
node.setDateTime(newSelectedDate);
|
|
2811
|
+
}
|
|
2812
|
+
setIncludeTime(false);
|
|
2813
|
+
setTimeValue("00:00");
|
|
2814
|
+
}
|
|
2815
|
+
});
|
|
2816
|
+
};
|
|
2817
|
+
const handleTimeChange = (e) => {
|
|
2818
|
+
withDateTimeNode((node) => {
|
|
2819
|
+
const time = e.target.value;
|
|
2820
|
+
if (!selected) {
|
|
2821
|
+
setTimeValue(time);
|
|
2822
|
+
return;
|
|
2823
|
+
}
|
|
2824
|
+
const [hours, minutes] = time.split(":").map((str) => parseInt(str, 10));
|
|
2825
|
+
const newSelectedDate = setHours(setMinutes(selected, minutes), hours);
|
|
2826
|
+
setSelected(newSelectedDate);
|
|
2827
|
+
node.setDateTime(newSelectedDate);
|
|
2828
|
+
setTimeValue(time);
|
|
2829
|
+
});
|
|
2830
|
+
};
|
|
2831
|
+
const handleDaySelect = (date) => {
|
|
2832
|
+
withDateTimeNode((node) => {
|
|
2833
|
+
if (!timeValue || !date) {
|
|
2834
|
+
setSelected(date);
|
|
2835
|
+
return;
|
|
2836
|
+
}
|
|
2837
|
+
const [hours, minutes] = timeValue.split(":").map((str) => parseInt(str, 10));
|
|
2838
|
+
const newDate = new Date(
|
|
2839
|
+
date.getFullYear(),
|
|
2840
|
+
date.getMonth(),
|
|
2841
|
+
date.getDate(),
|
|
2842
|
+
hours,
|
|
2843
|
+
minutes
|
|
2844
|
+
);
|
|
2845
|
+
node.setDateTime(newDate);
|
|
2846
|
+
setSelected(newDate);
|
|
2847
|
+
});
|
|
2848
|
+
};
|
|
2849
|
+
const classNames = ["dateTimePill"];
|
|
2850
|
+
for (const [flag, className] of FORMAT_CLASSES) {
|
|
2851
|
+
if (format3 & flag) {
|
|
2852
|
+
classNames.push(className);
|
|
2853
|
+
}
|
|
2854
|
+
}
|
|
2855
|
+
if (isNodeSelected) {
|
|
2856
|
+
classNames.push("selected");
|
|
2857
|
+
}
|
|
2858
|
+
return /* @__PURE__ */ jsxs("div", { className: classNames.join(" "), ref, children: [
|
|
2859
|
+
dateTime?.toDateString() + (includeTime ? " " + timeValue : "") || "Invalid Date",
|
|
2860
|
+
isOpen && /* @__PURE__ */ jsx(FloatingPortal, { children: /* @__PURE__ */ jsx(FloatingOverlay, { lockScroll: true, children: /* @__PURE__ */ jsx(FloatingFocusManager, { context, initialFocus: -1, children: /* @__PURE__ */ jsxs(
|
|
2861
|
+
"div",
|
|
2862
|
+
{
|
|
2863
|
+
className: "dateTimePicker",
|
|
2864
|
+
ref: refs.setFloating,
|
|
2865
|
+
style: floatingStyles,
|
|
2866
|
+
...getFloatingProps(),
|
|
2867
|
+
children: [
|
|
2868
|
+
/* @__PURE__ */ jsx(
|
|
2869
|
+
DayPicker,
|
|
2870
|
+
{
|
|
2871
|
+
captionLayout: "dropdown",
|
|
2872
|
+
navLayout: "after",
|
|
2873
|
+
fixedWeeks: false,
|
|
2874
|
+
showOutsideDays: false,
|
|
2875
|
+
mode: "single",
|
|
2876
|
+
selected,
|
|
2877
|
+
required: true,
|
|
2878
|
+
onSelect: handleDaySelect,
|
|
2879
|
+
startMonth: new Date(1925, 0),
|
|
2880
|
+
endMonth: new Date(2042, 7)
|
|
2881
|
+
}
|
|
2882
|
+
),
|
|
2883
|
+
/* @__PURE__ */ jsx("form", { style: { marginBlockEnd: "1em" }, children: /* @__PURE__ */ jsxs(
|
|
2884
|
+
"div",
|
|
2885
|
+
{
|
|
2886
|
+
style: {
|
|
2887
|
+
overflow: "hidden",
|
|
2888
|
+
textOverflow: "ellipsis",
|
|
2889
|
+
whiteSpace: "nowrap",
|
|
2890
|
+
width: "300px"
|
|
2891
|
+
},
|
|
2892
|
+
children: [
|
|
2893
|
+
/* @__PURE__ */ jsx(
|
|
2894
|
+
"input",
|
|
2895
|
+
{
|
|
2896
|
+
type: "checkbox",
|
|
2897
|
+
id: "option1",
|
|
2898
|
+
name: "option1",
|
|
2899
|
+
value: "value1",
|
|
2900
|
+
checked: includeTime,
|
|
2901
|
+
onChange: handleCheckboxChange
|
|
2902
|
+
}
|
|
2903
|
+
),
|
|
2904
|
+
/* @__PURE__ */ jsx("label", { children: /* @__PURE__ */ jsx(
|
|
2905
|
+
"input",
|
|
2906
|
+
{
|
|
2907
|
+
type: "time",
|
|
2908
|
+
value: timeValue,
|
|
2909
|
+
onChange: handleTimeChange,
|
|
2910
|
+
disabled: !includeTime
|
|
2911
|
+
}
|
|
2912
|
+
) }),
|
|
2913
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
2914
|
+
" ",
|
|
2915
|
+
userTimeZone
|
|
2916
|
+
] })
|
|
2917
|
+
]
|
|
2918
|
+
}
|
|
2919
|
+
) })
|
|
2920
|
+
]
|
|
2921
|
+
}
|
|
2922
|
+
) }) }) })
|
|
2923
|
+
] });
|
|
2924
|
+
}
|
|
2925
|
+
export {
|
|
2926
|
+
DateTimeComponent as default
|
|
2927
|
+
};
|
|
2928
|
+
//# sourceMappingURL=DateTimeComponent-7V5RW3AE.js.map
|