react-working-days-calendar 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +317 -0
- package/dist/favicon.svg +1 -0
- package/dist/icons.svg +24 -0
- package/dist/index.cjs.js +2 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +2549 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/react-working-days-calendar.css +2 -0
- package/package.json +84 -0
|
@@ -0,0 +1,2549 @@
|
|
|
1
|
+
import { useCallback as e, useEffect as t, useMemo as n, useRef as r, useState as i } from "react";
|
|
2
|
+
import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
3
|
+
//#region node_modules/date-fns/constants.js
|
|
4
|
+
var c = 365.2425, l = 6048e5, u = 864e5, d = 6e4, f = 36e5, p = 3600 * 24;
|
|
5
|
+
p * 7, p * c / 12 * 3;
|
|
6
|
+
var m = Symbol.for("constructDateFrom");
|
|
7
|
+
//#endregion
|
|
8
|
+
//#region node_modules/date-fns/constructFrom.js
|
|
9
|
+
function h(e, t) {
|
|
10
|
+
return typeof e == "function" ? e(t) : e && typeof e == "object" && m in e ? e[m](t) : e instanceof Date ? new e.constructor(t) : new Date(t);
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
//#region node_modules/date-fns/toDate.js
|
|
14
|
+
function g(e, t) {
|
|
15
|
+
return h(t || e, e);
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region node_modules/date-fns/addMonths.js
|
|
19
|
+
function _(e, t, n) {
|
|
20
|
+
let r = g(e, n?.in);
|
|
21
|
+
if (isNaN(t)) return h(n?.in || e, NaN);
|
|
22
|
+
if (!t) return r;
|
|
23
|
+
let i = r.getDate(), a = h(n?.in || e, r.getTime());
|
|
24
|
+
return a.setMonth(r.getMonth() + t + 1, 0), i >= a.getDate() ? a : (r.setFullYear(a.getFullYear(), a.getMonth(), i), r);
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region node_modules/date-fns/isWeekend.js
|
|
28
|
+
function v(e, t) {
|
|
29
|
+
let n = g(e, t?.in).getDay();
|
|
30
|
+
return n === 0 || n === 6;
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region node_modules/date-fns/_lib/defaultOptions.js
|
|
34
|
+
var y = {};
|
|
35
|
+
function b() {
|
|
36
|
+
return y;
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region node_modules/date-fns/startOfWeek.js
|
|
40
|
+
function x(e, t) {
|
|
41
|
+
let n = b(), r = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, i = g(e, t?.in), a = i.getDay(), o = (a < r ? 7 : 0) + a - r;
|
|
42
|
+
return i.setDate(i.getDate() - o), i.setHours(0, 0, 0, 0), i;
|
|
43
|
+
}
|
|
44
|
+
//#endregion
|
|
45
|
+
//#region node_modules/date-fns/startOfISOWeek.js
|
|
46
|
+
function S(e, t) {
|
|
47
|
+
return x(e, {
|
|
48
|
+
...t,
|
|
49
|
+
weekStartsOn: 1
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
//#endregion
|
|
53
|
+
//#region node_modules/date-fns/getISOWeekYear.js
|
|
54
|
+
function C(e, t) {
|
|
55
|
+
let n = g(e, t?.in), r = n.getFullYear(), i = h(n, 0);
|
|
56
|
+
i.setFullYear(r + 1, 0, 4), i.setHours(0, 0, 0, 0);
|
|
57
|
+
let a = S(i), o = h(n, 0);
|
|
58
|
+
o.setFullYear(r, 0, 4), o.setHours(0, 0, 0, 0);
|
|
59
|
+
let s = S(o);
|
|
60
|
+
return n.getTime() >= a.getTime() ? r + 1 : n.getTime() >= s.getTime() ? r : r - 1;
|
|
61
|
+
}
|
|
62
|
+
//#endregion
|
|
63
|
+
//#region node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js
|
|
64
|
+
function w(e) {
|
|
65
|
+
let t = g(e), n = new Date(Date.UTC(t.getFullYear(), t.getMonth(), t.getDate(), t.getHours(), t.getMinutes(), t.getSeconds(), t.getMilliseconds()));
|
|
66
|
+
return n.setUTCFullYear(t.getFullYear()), e - +n;
|
|
67
|
+
}
|
|
68
|
+
//#endregion
|
|
69
|
+
//#region node_modules/date-fns/_lib/normalizeDates.js
|
|
70
|
+
function T(e, ...t) {
|
|
71
|
+
let n = h.bind(null, e || t.find((e) => typeof e == "object"));
|
|
72
|
+
return t.map(n);
|
|
73
|
+
}
|
|
74
|
+
//#endregion
|
|
75
|
+
//#region node_modules/date-fns/startOfDay.js
|
|
76
|
+
function E(e, t) {
|
|
77
|
+
let n = g(e, t?.in);
|
|
78
|
+
return n.setHours(0, 0, 0, 0), n;
|
|
79
|
+
}
|
|
80
|
+
//#endregion
|
|
81
|
+
//#region node_modules/date-fns/differenceInCalendarDays.js
|
|
82
|
+
function D(e, t, n) {
|
|
83
|
+
let [r, i] = T(n?.in, e, t), a = E(r), o = E(i), s = +a - w(a), c = +o - w(o);
|
|
84
|
+
return Math.round((s - c) / u);
|
|
85
|
+
}
|
|
86
|
+
//#endregion
|
|
87
|
+
//#region node_modules/date-fns/startOfISOWeekYear.js
|
|
88
|
+
function O(e, t) {
|
|
89
|
+
let n = C(e, t), r = h(t?.in || e, 0);
|
|
90
|
+
return r.setFullYear(n, 0, 4), r.setHours(0, 0, 0, 0), S(r);
|
|
91
|
+
}
|
|
92
|
+
//#endregion
|
|
93
|
+
//#region node_modules/date-fns/constructNow.js
|
|
94
|
+
function k(e) {
|
|
95
|
+
return h(e, Date.now());
|
|
96
|
+
}
|
|
97
|
+
//#endregion
|
|
98
|
+
//#region node_modules/date-fns/isSameDay.js
|
|
99
|
+
function ee(e, t, n) {
|
|
100
|
+
let [r, i] = T(n?.in, e, t);
|
|
101
|
+
return +E(r) == +E(i);
|
|
102
|
+
}
|
|
103
|
+
//#endregion
|
|
104
|
+
//#region node_modules/date-fns/isDate.js
|
|
105
|
+
function A(e) {
|
|
106
|
+
return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]";
|
|
107
|
+
}
|
|
108
|
+
//#endregion
|
|
109
|
+
//#region node_modules/date-fns/isValid.js
|
|
110
|
+
function j(e) {
|
|
111
|
+
return !(!A(e) && typeof e != "number" || isNaN(+g(e)));
|
|
112
|
+
}
|
|
113
|
+
//#endregion
|
|
114
|
+
//#region node_modules/date-fns/endOfMonth.js
|
|
115
|
+
function te(e, t) {
|
|
116
|
+
let n = g(e, t?.in), r = n.getMonth();
|
|
117
|
+
return n.setFullYear(n.getFullYear(), r + 1, 0), n.setHours(23, 59, 59, 999), n;
|
|
118
|
+
}
|
|
119
|
+
//#endregion
|
|
120
|
+
//#region node_modules/date-fns/_lib/normalizeInterval.js
|
|
121
|
+
function M(e, t) {
|
|
122
|
+
let [n, r] = T(e, t.start, t.end);
|
|
123
|
+
return {
|
|
124
|
+
start: n,
|
|
125
|
+
end: r
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
//#endregion
|
|
129
|
+
//#region node_modules/date-fns/eachDayOfInterval.js
|
|
130
|
+
function ne(e, t) {
|
|
131
|
+
let { start: n, end: r } = M(t?.in, e), i = +n > +r, a = i ? +n : +r, o = i ? r : n;
|
|
132
|
+
o.setHours(0, 0, 0, 0);
|
|
133
|
+
let s = t?.step ?? 1;
|
|
134
|
+
if (!s) return [];
|
|
135
|
+
s < 0 && (s = -s, i = !i);
|
|
136
|
+
let c = [];
|
|
137
|
+
for (; +o <= a;) c.push(h(n, o)), o.setDate(o.getDate() + s), o.setHours(0, 0, 0, 0);
|
|
138
|
+
return i ? c.reverse() : c;
|
|
139
|
+
}
|
|
140
|
+
//#endregion
|
|
141
|
+
//#region node_modules/date-fns/startOfMonth.js
|
|
142
|
+
function re(e, t) {
|
|
143
|
+
let n = g(e, t?.in);
|
|
144
|
+
return n.setDate(1), n.setHours(0, 0, 0, 0), n;
|
|
145
|
+
}
|
|
146
|
+
//#endregion
|
|
147
|
+
//#region node_modules/date-fns/startOfYear.js
|
|
148
|
+
function ie(e, t) {
|
|
149
|
+
let n = g(e, t?.in);
|
|
150
|
+
return n.setFullYear(n.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
|
|
151
|
+
}
|
|
152
|
+
//#endregion
|
|
153
|
+
//#region node_modules/date-fns/endOfWeek.js
|
|
154
|
+
function ae(e, t) {
|
|
155
|
+
let n = b(), r = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, i = g(e, t?.in), a = i.getDay(), o = (a < r ? -7 : 0) + 6 - (a - r);
|
|
156
|
+
return i.setDate(i.getDate() + o), i.setHours(23, 59, 59, 999), i;
|
|
157
|
+
}
|
|
158
|
+
//#endregion
|
|
159
|
+
//#region node_modules/date-fns/locale/en-US/_lib/formatDistance.js
|
|
160
|
+
var N = {
|
|
161
|
+
lessThanXSeconds: {
|
|
162
|
+
one: "less than a second",
|
|
163
|
+
other: "less than {{count}} seconds"
|
|
164
|
+
},
|
|
165
|
+
xSeconds: {
|
|
166
|
+
one: "1 second",
|
|
167
|
+
other: "{{count}} seconds"
|
|
168
|
+
},
|
|
169
|
+
halfAMinute: "half a minute",
|
|
170
|
+
lessThanXMinutes: {
|
|
171
|
+
one: "less than a minute",
|
|
172
|
+
other: "less than {{count}} minutes"
|
|
173
|
+
},
|
|
174
|
+
xMinutes: {
|
|
175
|
+
one: "1 minute",
|
|
176
|
+
other: "{{count}} minutes"
|
|
177
|
+
},
|
|
178
|
+
aboutXHours: {
|
|
179
|
+
one: "about 1 hour",
|
|
180
|
+
other: "about {{count}} hours"
|
|
181
|
+
},
|
|
182
|
+
xHours: {
|
|
183
|
+
one: "1 hour",
|
|
184
|
+
other: "{{count}} hours"
|
|
185
|
+
},
|
|
186
|
+
xDays: {
|
|
187
|
+
one: "1 day",
|
|
188
|
+
other: "{{count}} days"
|
|
189
|
+
},
|
|
190
|
+
aboutXWeeks: {
|
|
191
|
+
one: "about 1 week",
|
|
192
|
+
other: "about {{count}} weeks"
|
|
193
|
+
},
|
|
194
|
+
xWeeks: {
|
|
195
|
+
one: "1 week",
|
|
196
|
+
other: "{{count}} weeks"
|
|
197
|
+
},
|
|
198
|
+
aboutXMonths: {
|
|
199
|
+
one: "about 1 month",
|
|
200
|
+
other: "about {{count}} months"
|
|
201
|
+
},
|
|
202
|
+
xMonths: {
|
|
203
|
+
one: "1 month",
|
|
204
|
+
other: "{{count}} months"
|
|
205
|
+
},
|
|
206
|
+
aboutXYears: {
|
|
207
|
+
one: "about 1 year",
|
|
208
|
+
other: "about {{count}} years"
|
|
209
|
+
},
|
|
210
|
+
xYears: {
|
|
211
|
+
one: "1 year",
|
|
212
|
+
other: "{{count}} years"
|
|
213
|
+
},
|
|
214
|
+
overXYears: {
|
|
215
|
+
one: "over 1 year",
|
|
216
|
+
other: "over {{count}} years"
|
|
217
|
+
},
|
|
218
|
+
almostXYears: {
|
|
219
|
+
one: "almost 1 year",
|
|
220
|
+
other: "almost {{count}} years"
|
|
221
|
+
}
|
|
222
|
+
}, P = (e, t, n) => {
|
|
223
|
+
let r, i = N[e];
|
|
224
|
+
return r = typeof i == "string" ? i : t === 1 ? i.one : i.other.replace("{{count}}", t.toString()), n?.addSuffix ? n.comparison && n.comparison > 0 ? "in " + r : r + " ago" : r;
|
|
225
|
+
};
|
|
226
|
+
//#endregion
|
|
227
|
+
//#region node_modules/date-fns/locale/_lib/buildFormatLongFn.js
|
|
228
|
+
function F(e) {
|
|
229
|
+
return (t = {}) => {
|
|
230
|
+
let n = t.width ? String(t.width) : e.defaultWidth;
|
|
231
|
+
return e.formats[n] || e.formats[e.defaultWidth];
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
var oe = {
|
|
235
|
+
date: F({
|
|
236
|
+
formats: {
|
|
237
|
+
full: "EEEE, MMMM do, y",
|
|
238
|
+
long: "MMMM do, y",
|
|
239
|
+
medium: "MMM d, y",
|
|
240
|
+
short: "MM/dd/yyyy"
|
|
241
|
+
},
|
|
242
|
+
defaultWidth: "full"
|
|
243
|
+
}),
|
|
244
|
+
time: F({
|
|
245
|
+
formats: {
|
|
246
|
+
full: "h:mm:ss a zzzz",
|
|
247
|
+
long: "h:mm:ss a z",
|
|
248
|
+
medium: "h:mm:ss a",
|
|
249
|
+
short: "h:mm a"
|
|
250
|
+
},
|
|
251
|
+
defaultWidth: "full"
|
|
252
|
+
}),
|
|
253
|
+
dateTime: F({
|
|
254
|
+
formats: {
|
|
255
|
+
full: "{{date}} 'at' {{time}}",
|
|
256
|
+
long: "{{date}} 'at' {{time}}",
|
|
257
|
+
medium: "{{date}}, {{time}}",
|
|
258
|
+
short: "{{date}}, {{time}}"
|
|
259
|
+
},
|
|
260
|
+
defaultWidth: "full"
|
|
261
|
+
})
|
|
262
|
+
}, I = {
|
|
263
|
+
lastWeek: "'last' eeee 'at' p",
|
|
264
|
+
yesterday: "'yesterday at' p",
|
|
265
|
+
today: "'today at' p",
|
|
266
|
+
tomorrow: "'tomorrow at' p",
|
|
267
|
+
nextWeek: "eeee 'at' p",
|
|
268
|
+
other: "P"
|
|
269
|
+
}, se = (e, t, n, r) => I[e];
|
|
270
|
+
//#endregion
|
|
271
|
+
//#region node_modules/date-fns/locale/_lib/buildLocalizeFn.js
|
|
272
|
+
function L(e) {
|
|
273
|
+
return (t, n) => {
|
|
274
|
+
let r = n?.context ? String(n.context) : "standalone", i;
|
|
275
|
+
if (r === "formatting" && e.formattingValues) {
|
|
276
|
+
let t = e.defaultFormattingWidth || e.defaultWidth, r = n?.width ? String(n.width) : t;
|
|
277
|
+
i = e.formattingValues[r] || e.formattingValues[t];
|
|
278
|
+
} else {
|
|
279
|
+
let t = e.defaultWidth, r = n?.width ? String(n.width) : e.defaultWidth;
|
|
280
|
+
i = e.values[r] || e.values[t];
|
|
281
|
+
}
|
|
282
|
+
let a = e.argumentCallback ? e.argumentCallback(t) : t;
|
|
283
|
+
return i[a];
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
var ce = {
|
|
287
|
+
ordinalNumber: (e, t) => {
|
|
288
|
+
let n = Number(e), r = n % 100;
|
|
289
|
+
if (r > 20 || r < 10) switch (r % 10) {
|
|
290
|
+
case 1: return n + "st";
|
|
291
|
+
case 2: return n + "nd";
|
|
292
|
+
case 3: return n + "rd";
|
|
293
|
+
}
|
|
294
|
+
return n + "th";
|
|
295
|
+
},
|
|
296
|
+
era: L({
|
|
297
|
+
values: {
|
|
298
|
+
narrow: ["B", "A"],
|
|
299
|
+
abbreviated: ["BC", "AD"],
|
|
300
|
+
wide: ["Before Christ", "Anno Domini"]
|
|
301
|
+
},
|
|
302
|
+
defaultWidth: "wide"
|
|
303
|
+
}),
|
|
304
|
+
quarter: L({
|
|
305
|
+
values: {
|
|
306
|
+
narrow: [
|
|
307
|
+
"1",
|
|
308
|
+
"2",
|
|
309
|
+
"3",
|
|
310
|
+
"4"
|
|
311
|
+
],
|
|
312
|
+
abbreviated: [
|
|
313
|
+
"Q1",
|
|
314
|
+
"Q2",
|
|
315
|
+
"Q3",
|
|
316
|
+
"Q4"
|
|
317
|
+
],
|
|
318
|
+
wide: [
|
|
319
|
+
"1st quarter",
|
|
320
|
+
"2nd quarter",
|
|
321
|
+
"3rd quarter",
|
|
322
|
+
"4th quarter"
|
|
323
|
+
]
|
|
324
|
+
},
|
|
325
|
+
defaultWidth: "wide",
|
|
326
|
+
argumentCallback: (e) => e - 1
|
|
327
|
+
}),
|
|
328
|
+
month: L({
|
|
329
|
+
values: {
|
|
330
|
+
narrow: [
|
|
331
|
+
"J",
|
|
332
|
+
"F",
|
|
333
|
+
"M",
|
|
334
|
+
"A",
|
|
335
|
+
"M",
|
|
336
|
+
"J",
|
|
337
|
+
"J",
|
|
338
|
+
"A",
|
|
339
|
+
"S",
|
|
340
|
+
"O",
|
|
341
|
+
"N",
|
|
342
|
+
"D"
|
|
343
|
+
],
|
|
344
|
+
abbreviated: [
|
|
345
|
+
"Jan",
|
|
346
|
+
"Feb",
|
|
347
|
+
"Mar",
|
|
348
|
+
"Apr",
|
|
349
|
+
"May",
|
|
350
|
+
"Jun",
|
|
351
|
+
"Jul",
|
|
352
|
+
"Aug",
|
|
353
|
+
"Sep",
|
|
354
|
+
"Oct",
|
|
355
|
+
"Nov",
|
|
356
|
+
"Dec"
|
|
357
|
+
],
|
|
358
|
+
wide: [
|
|
359
|
+
"January",
|
|
360
|
+
"February",
|
|
361
|
+
"March",
|
|
362
|
+
"April",
|
|
363
|
+
"May",
|
|
364
|
+
"June",
|
|
365
|
+
"July",
|
|
366
|
+
"August",
|
|
367
|
+
"September",
|
|
368
|
+
"October",
|
|
369
|
+
"November",
|
|
370
|
+
"December"
|
|
371
|
+
]
|
|
372
|
+
},
|
|
373
|
+
defaultWidth: "wide"
|
|
374
|
+
}),
|
|
375
|
+
day: L({
|
|
376
|
+
values: {
|
|
377
|
+
narrow: [
|
|
378
|
+
"S",
|
|
379
|
+
"M",
|
|
380
|
+
"T",
|
|
381
|
+
"W",
|
|
382
|
+
"T",
|
|
383
|
+
"F",
|
|
384
|
+
"S"
|
|
385
|
+
],
|
|
386
|
+
short: [
|
|
387
|
+
"Su",
|
|
388
|
+
"Mo",
|
|
389
|
+
"Tu",
|
|
390
|
+
"We",
|
|
391
|
+
"Th",
|
|
392
|
+
"Fr",
|
|
393
|
+
"Sa"
|
|
394
|
+
],
|
|
395
|
+
abbreviated: [
|
|
396
|
+
"Sun",
|
|
397
|
+
"Mon",
|
|
398
|
+
"Tue",
|
|
399
|
+
"Wed",
|
|
400
|
+
"Thu",
|
|
401
|
+
"Fri",
|
|
402
|
+
"Sat"
|
|
403
|
+
],
|
|
404
|
+
wide: [
|
|
405
|
+
"Sunday",
|
|
406
|
+
"Monday",
|
|
407
|
+
"Tuesday",
|
|
408
|
+
"Wednesday",
|
|
409
|
+
"Thursday",
|
|
410
|
+
"Friday",
|
|
411
|
+
"Saturday"
|
|
412
|
+
]
|
|
413
|
+
},
|
|
414
|
+
defaultWidth: "wide"
|
|
415
|
+
}),
|
|
416
|
+
dayPeriod: L({
|
|
417
|
+
values: {
|
|
418
|
+
narrow: {
|
|
419
|
+
am: "a",
|
|
420
|
+
pm: "p",
|
|
421
|
+
midnight: "mi",
|
|
422
|
+
noon: "n",
|
|
423
|
+
morning: "morning",
|
|
424
|
+
afternoon: "afternoon",
|
|
425
|
+
evening: "evening",
|
|
426
|
+
night: "night"
|
|
427
|
+
},
|
|
428
|
+
abbreviated: {
|
|
429
|
+
am: "AM",
|
|
430
|
+
pm: "PM",
|
|
431
|
+
midnight: "midnight",
|
|
432
|
+
noon: "noon",
|
|
433
|
+
morning: "morning",
|
|
434
|
+
afternoon: "afternoon",
|
|
435
|
+
evening: "evening",
|
|
436
|
+
night: "night"
|
|
437
|
+
},
|
|
438
|
+
wide: {
|
|
439
|
+
am: "a.m.",
|
|
440
|
+
pm: "p.m.",
|
|
441
|
+
midnight: "midnight",
|
|
442
|
+
noon: "noon",
|
|
443
|
+
morning: "morning",
|
|
444
|
+
afternoon: "afternoon",
|
|
445
|
+
evening: "evening",
|
|
446
|
+
night: "night"
|
|
447
|
+
}
|
|
448
|
+
},
|
|
449
|
+
defaultWidth: "wide",
|
|
450
|
+
formattingValues: {
|
|
451
|
+
narrow: {
|
|
452
|
+
am: "a",
|
|
453
|
+
pm: "p",
|
|
454
|
+
midnight: "mi",
|
|
455
|
+
noon: "n",
|
|
456
|
+
morning: "in the morning",
|
|
457
|
+
afternoon: "in the afternoon",
|
|
458
|
+
evening: "in the evening",
|
|
459
|
+
night: "at night"
|
|
460
|
+
},
|
|
461
|
+
abbreviated: {
|
|
462
|
+
am: "AM",
|
|
463
|
+
pm: "PM",
|
|
464
|
+
midnight: "midnight",
|
|
465
|
+
noon: "noon",
|
|
466
|
+
morning: "in the morning",
|
|
467
|
+
afternoon: "in the afternoon",
|
|
468
|
+
evening: "in the evening",
|
|
469
|
+
night: "at night"
|
|
470
|
+
},
|
|
471
|
+
wide: {
|
|
472
|
+
am: "a.m.",
|
|
473
|
+
pm: "p.m.",
|
|
474
|
+
midnight: "midnight",
|
|
475
|
+
noon: "noon",
|
|
476
|
+
morning: "in the morning",
|
|
477
|
+
afternoon: "in the afternoon",
|
|
478
|
+
evening: "in the evening",
|
|
479
|
+
night: "at night"
|
|
480
|
+
}
|
|
481
|
+
},
|
|
482
|
+
defaultFormattingWidth: "wide"
|
|
483
|
+
})
|
|
484
|
+
};
|
|
485
|
+
//#endregion
|
|
486
|
+
//#region node_modules/date-fns/locale/_lib/buildMatchFn.js
|
|
487
|
+
function R(e) {
|
|
488
|
+
return (t, n = {}) => {
|
|
489
|
+
let r = n.width, i = r && e.matchPatterns[r] || e.matchPatterns[e.defaultMatchWidth], a = t.match(i);
|
|
490
|
+
if (!a) return null;
|
|
491
|
+
let o = a[0], s = r && e.parsePatterns[r] || e.parsePatterns[e.defaultParseWidth], c = Array.isArray(s) ? ue(s, (e) => e.test(o)) : le(s, (e) => e.test(o)), l;
|
|
492
|
+
l = e.valueCallback ? e.valueCallback(c) : c, l = n.valueCallback ? n.valueCallback(l) : l;
|
|
493
|
+
let u = t.slice(o.length);
|
|
494
|
+
return {
|
|
495
|
+
value: l,
|
|
496
|
+
rest: u
|
|
497
|
+
};
|
|
498
|
+
};
|
|
499
|
+
}
|
|
500
|
+
function le(e, t) {
|
|
501
|
+
for (let n in e) if (Object.prototype.hasOwnProperty.call(e, n) && t(e[n])) return n;
|
|
502
|
+
}
|
|
503
|
+
function ue(e, t) {
|
|
504
|
+
for (let n = 0; n < e.length; n++) if (t(e[n])) return n;
|
|
505
|
+
}
|
|
506
|
+
//#endregion
|
|
507
|
+
//#region node_modules/date-fns/locale/_lib/buildMatchPatternFn.js
|
|
508
|
+
function de(e) {
|
|
509
|
+
return (t, n = {}) => {
|
|
510
|
+
let r = t.match(e.matchPattern);
|
|
511
|
+
if (!r) return null;
|
|
512
|
+
let i = r[0], a = t.match(e.parsePattern);
|
|
513
|
+
if (!a) return null;
|
|
514
|
+
let o = e.valueCallback ? e.valueCallback(a[0]) : a[0];
|
|
515
|
+
o = n.valueCallback ? n.valueCallback(o) : o;
|
|
516
|
+
let s = t.slice(i.length);
|
|
517
|
+
return {
|
|
518
|
+
value: o,
|
|
519
|
+
rest: s
|
|
520
|
+
};
|
|
521
|
+
};
|
|
522
|
+
}
|
|
523
|
+
//#endregion
|
|
524
|
+
//#region node_modules/date-fns/locale/en-US.js
|
|
525
|
+
var fe = {
|
|
526
|
+
code: "en-US",
|
|
527
|
+
formatDistance: P,
|
|
528
|
+
formatLong: oe,
|
|
529
|
+
formatRelative: se,
|
|
530
|
+
localize: ce,
|
|
531
|
+
match: {
|
|
532
|
+
ordinalNumber: de({
|
|
533
|
+
matchPattern: /^(\d+)(th|st|nd|rd)?/i,
|
|
534
|
+
parsePattern: /\d+/i,
|
|
535
|
+
valueCallback: (e) => parseInt(e, 10)
|
|
536
|
+
}),
|
|
537
|
+
era: R({
|
|
538
|
+
matchPatterns: {
|
|
539
|
+
narrow: /^(b|a)/i,
|
|
540
|
+
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
541
|
+
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
542
|
+
},
|
|
543
|
+
defaultMatchWidth: "wide",
|
|
544
|
+
parsePatterns: { any: [/^b/i, /^(a|c)/i] },
|
|
545
|
+
defaultParseWidth: "any"
|
|
546
|
+
}),
|
|
547
|
+
quarter: R({
|
|
548
|
+
matchPatterns: {
|
|
549
|
+
narrow: /^[1234]/i,
|
|
550
|
+
abbreviated: /^q[1234]/i,
|
|
551
|
+
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
552
|
+
},
|
|
553
|
+
defaultMatchWidth: "wide",
|
|
554
|
+
parsePatterns: { any: [
|
|
555
|
+
/1/i,
|
|
556
|
+
/2/i,
|
|
557
|
+
/3/i,
|
|
558
|
+
/4/i
|
|
559
|
+
] },
|
|
560
|
+
defaultParseWidth: "any",
|
|
561
|
+
valueCallback: (e) => e + 1
|
|
562
|
+
}),
|
|
563
|
+
month: R({
|
|
564
|
+
matchPatterns: {
|
|
565
|
+
narrow: /^[jfmasond]/i,
|
|
566
|
+
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
567
|
+
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
568
|
+
},
|
|
569
|
+
defaultMatchWidth: "wide",
|
|
570
|
+
parsePatterns: {
|
|
571
|
+
narrow: [
|
|
572
|
+
/^j/i,
|
|
573
|
+
/^f/i,
|
|
574
|
+
/^m/i,
|
|
575
|
+
/^a/i,
|
|
576
|
+
/^m/i,
|
|
577
|
+
/^j/i,
|
|
578
|
+
/^j/i,
|
|
579
|
+
/^a/i,
|
|
580
|
+
/^s/i,
|
|
581
|
+
/^o/i,
|
|
582
|
+
/^n/i,
|
|
583
|
+
/^d/i
|
|
584
|
+
],
|
|
585
|
+
any: [
|
|
586
|
+
/^ja/i,
|
|
587
|
+
/^f/i,
|
|
588
|
+
/^mar/i,
|
|
589
|
+
/^ap/i,
|
|
590
|
+
/^may/i,
|
|
591
|
+
/^jun/i,
|
|
592
|
+
/^jul/i,
|
|
593
|
+
/^au/i,
|
|
594
|
+
/^s/i,
|
|
595
|
+
/^o/i,
|
|
596
|
+
/^n/i,
|
|
597
|
+
/^d/i
|
|
598
|
+
]
|
|
599
|
+
},
|
|
600
|
+
defaultParseWidth: "any"
|
|
601
|
+
}),
|
|
602
|
+
day: R({
|
|
603
|
+
matchPatterns: {
|
|
604
|
+
narrow: /^[smtwf]/i,
|
|
605
|
+
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
606
|
+
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
607
|
+
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
608
|
+
},
|
|
609
|
+
defaultMatchWidth: "wide",
|
|
610
|
+
parsePatterns: {
|
|
611
|
+
narrow: [
|
|
612
|
+
/^s/i,
|
|
613
|
+
/^m/i,
|
|
614
|
+
/^t/i,
|
|
615
|
+
/^w/i,
|
|
616
|
+
/^t/i,
|
|
617
|
+
/^f/i,
|
|
618
|
+
/^s/i
|
|
619
|
+
],
|
|
620
|
+
any: [
|
|
621
|
+
/^su/i,
|
|
622
|
+
/^m/i,
|
|
623
|
+
/^tu/i,
|
|
624
|
+
/^w/i,
|
|
625
|
+
/^th/i,
|
|
626
|
+
/^f/i,
|
|
627
|
+
/^sa/i
|
|
628
|
+
]
|
|
629
|
+
},
|
|
630
|
+
defaultParseWidth: "any"
|
|
631
|
+
}),
|
|
632
|
+
dayPeriod: R({
|
|
633
|
+
matchPatterns: {
|
|
634
|
+
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
635
|
+
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
636
|
+
},
|
|
637
|
+
defaultMatchWidth: "any",
|
|
638
|
+
parsePatterns: { any: {
|
|
639
|
+
am: /^a/i,
|
|
640
|
+
pm: /^p/i,
|
|
641
|
+
midnight: /^mi/i,
|
|
642
|
+
noon: /^no/i,
|
|
643
|
+
morning: /morning/i,
|
|
644
|
+
afternoon: /afternoon/i,
|
|
645
|
+
evening: /evening/i,
|
|
646
|
+
night: /night/i
|
|
647
|
+
} },
|
|
648
|
+
defaultParseWidth: "any"
|
|
649
|
+
})
|
|
650
|
+
},
|
|
651
|
+
options: {
|
|
652
|
+
weekStartsOn: 0,
|
|
653
|
+
firstWeekContainsDate: 1
|
|
654
|
+
}
|
|
655
|
+
};
|
|
656
|
+
//#endregion
|
|
657
|
+
//#region node_modules/date-fns/getDayOfYear.js
|
|
658
|
+
function z(e, t) {
|
|
659
|
+
let n = g(e, t?.in);
|
|
660
|
+
return D(n, ie(n)) + 1;
|
|
661
|
+
}
|
|
662
|
+
//#endregion
|
|
663
|
+
//#region node_modules/date-fns/getISOWeek.js
|
|
664
|
+
function B(e, t) {
|
|
665
|
+
let n = g(e, t?.in), r = S(n) - +O(n);
|
|
666
|
+
return Math.round(r / l) + 1;
|
|
667
|
+
}
|
|
668
|
+
//#endregion
|
|
669
|
+
//#region node_modules/date-fns/getWeekYear.js
|
|
670
|
+
function V(e, t) {
|
|
671
|
+
let n = g(e, t?.in), r = n.getFullYear(), i = b(), a = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? i.firstWeekContainsDate ?? i.locale?.options?.firstWeekContainsDate ?? 1, o = h(t?.in || e, 0);
|
|
672
|
+
o.setFullYear(r + 1, 0, a), o.setHours(0, 0, 0, 0);
|
|
673
|
+
let s = x(o, t), c = h(t?.in || e, 0);
|
|
674
|
+
c.setFullYear(r, 0, a), c.setHours(0, 0, 0, 0);
|
|
675
|
+
let l = x(c, t);
|
|
676
|
+
return +n >= +s ? r + 1 : +n >= +l ? r : r - 1;
|
|
677
|
+
}
|
|
678
|
+
//#endregion
|
|
679
|
+
//#region node_modules/date-fns/startOfWeekYear.js
|
|
680
|
+
function pe(e, t) {
|
|
681
|
+
let n = b(), r = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, i = V(e, t), a = h(t?.in || e, 0);
|
|
682
|
+
return a.setFullYear(i, 0, r), a.setHours(0, 0, 0, 0), x(a, t);
|
|
683
|
+
}
|
|
684
|
+
//#endregion
|
|
685
|
+
//#region node_modules/date-fns/getWeek.js
|
|
686
|
+
function me(e, t) {
|
|
687
|
+
let n = g(e, t?.in), r = x(n, t) - +pe(n, t);
|
|
688
|
+
return Math.round(r / l) + 1;
|
|
689
|
+
}
|
|
690
|
+
//#endregion
|
|
691
|
+
//#region node_modules/date-fns/_lib/addLeadingZeros.js
|
|
692
|
+
function H(e, t) {
|
|
693
|
+
return (e < 0 ? "-" : "") + Math.abs(e).toString().padStart(t, "0");
|
|
694
|
+
}
|
|
695
|
+
//#endregion
|
|
696
|
+
//#region node_modules/date-fns/_lib/format/lightFormatters.js
|
|
697
|
+
var U = {
|
|
698
|
+
y(e, t) {
|
|
699
|
+
let n = e.getFullYear(), r = n > 0 ? n : 1 - n;
|
|
700
|
+
return H(t === "yy" ? r % 100 : r, t.length);
|
|
701
|
+
},
|
|
702
|
+
M(e, t) {
|
|
703
|
+
let n = e.getMonth();
|
|
704
|
+
return t === "M" ? String(n + 1) : H(n + 1, 2);
|
|
705
|
+
},
|
|
706
|
+
d(e, t) {
|
|
707
|
+
return H(e.getDate(), t.length);
|
|
708
|
+
},
|
|
709
|
+
a(e, t) {
|
|
710
|
+
let n = e.getHours() / 12 >= 1 ? "pm" : "am";
|
|
711
|
+
switch (t) {
|
|
712
|
+
case "a":
|
|
713
|
+
case "aa": return n.toUpperCase();
|
|
714
|
+
case "aaa": return n;
|
|
715
|
+
case "aaaaa": return n[0];
|
|
716
|
+
default: return n === "am" ? "a.m." : "p.m.";
|
|
717
|
+
}
|
|
718
|
+
},
|
|
719
|
+
h(e, t) {
|
|
720
|
+
return H(e.getHours() % 12 || 12, t.length);
|
|
721
|
+
},
|
|
722
|
+
H(e, t) {
|
|
723
|
+
return H(e.getHours(), t.length);
|
|
724
|
+
},
|
|
725
|
+
m(e, t) {
|
|
726
|
+
return H(e.getMinutes(), t.length);
|
|
727
|
+
},
|
|
728
|
+
s(e, t) {
|
|
729
|
+
return H(e.getSeconds(), t.length);
|
|
730
|
+
},
|
|
731
|
+
S(e, t) {
|
|
732
|
+
let n = t.length, r = e.getMilliseconds();
|
|
733
|
+
return H(Math.trunc(r * 10 ** (n - 3)), t.length);
|
|
734
|
+
}
|
|
735
|
+
}, W = {
|
|
736
|
+
am: "am",
|
|
737
|
+
pm: "pm",
|
|
738
|
+
midnight: "midnight",
|
|
739
|
+
noon: "noon",
|
|
740
|
+
morning: "morning",
|
|
741
|
+
afternoon: "afternoon",
|
|
742
|
+
evening: "evening",
|
|
743
|
+
night: "night"
|
|
744
|
+
}, he = {
|
|
745
|
+
G: function(e, t, n) {
|
|
746
|
+
let r = e.getFullYear() > 0 ? 1 : 0;
|
|
747
|
+
switch (t) {
|
|
748
|
+
case "G":
|
|
749
|
+
case "GG":
|
|
750
|
+
case "GGG": return n.era(r, { width: "abbreviated" });
|
|
751
|
+
case "GGGGG": return n.era(r, { width: "narrow" });
|
|
752
|
+
default: return n.era(r, { width: "wide" });
|
|
753
|
+
}
|
|
754
|
+
},
|
|
755
|
+
y: function(e, t, n) {
|
|
756
|
+
if (t === "yo") {
|
|
757
|
+
let t = e.getFullYear(), r = t > 0 ? t : 1 - t;
|
|
758
|
+
return n.ordinalNumber(r, { unit: "year" });
|
|
759
|
+
}
|
|
760
|
+
return U.y(e, t);
|
|
761
|
+
},
|
|
762
|
+
Y: function(e, t, n, r) {
|
|
763
|
+
let i = V(e, r), a = i > 0 ? i : 1 - i;
|
|
764
|
+
return t === "YY" ? H(a % 100, 2) : t === "Yo" ? n.ordinalNumber(a, { unit: "year" }) : H(a, t.length);
|
|
765
|
+
},
|
|
766
|
+
R: function(e, t) {
|
|
767
|
+
return H(C(e), t.length);
|
|
768
|
+
},
|
|
769
|
+
u: function(e, t) {
|
|
770
|
+
return H(e.getFullYear(), t.length);
|
|
771
|
+
},
|
|
772
|
+
Q: function(e, t, n) {
|
|
773
|
+
let r = Math.ceil((e.getMonth() + 1) / 3);
|
|
774
|
+
switch (t) {
|
|
775
|
+
case "Q": return String(r);
|
|
776
|
+
case "QQ": return H(r, 2);
|
|
777
|
+
case "Qo": return n.ordinalNumber(r, { unit: "quarter" });
|
|
778
|
+
case "QQQ": return n.quarter(r, {
|
|
779
|
+
width: "abbreviated",
|
|
780
|
+
context: "formatting"
|
|
781
|
+
});
|
|
782
|
+
case "QQQQQ": return n.quarter(r, {
|
|
783
|
+
width: "narrow",
|
|
784
|
+
context: "formatting"
|
|
785
|
+
});
|
|
786
|
+
default: return n.quarter(r, {
|
|
787
|
+
width: "wide",
|
|
788
|
+
context: "formatting"
|
|
789
|
+
});
|
|
790
|
+
}
|
|
791
|
+
},
|
|
792
|
+
q: function(e, t, n) {
|
|
793
|
+
let r = Math.ceil((e.getMonth() + 1) / 3);
|
|
794
|
+
switch (t) {
|
|
795
|
+
case "q": return String(r);
|
|
796
|
+
case "qq": return H(r, 2);
|
|
797
|
+
case "qo": return n.ordinalNumber(r, { unit: "quarter" });
|
|
798
|
+
case "qqq": return n.quarter(r, {
|
|
799
|
+
width: "abbreviated",
|
|
800
|
+
context: "standalone"
|
|
801
|
+
});
|
|
802
|
+
case "qqqqq": return n.quarter(r, {
|
|
803
|
+
width: "narrow",
|
|
804
|
+
context: "standalone"
|
|
805
|
+
});
|
|
806
|
+
default: return n.quarter(r, {
|
|
807
|
+
width: "wide",
|
|
808
|
+
context: "standalone"
|
|
809
|
+
});
|
|
810
|
+
}
|
|
811
|
+
},
|
|
812
|
+
M: function(e, t, n) {
|
|
813
|
+
let r = e.getMonth();
|
|
814
|
+
switch (t) {
|
|
815
|
+
case "M":
|
|
816
|
+
case "MM": return U.M(e, t);
|
|
817
|
+
case "Mo": return n.ordinalNumber(r + 1, { unit: "month" });
|
|
818
|
+
case "MMM": return n.month(r, {
|
|
819
|
+
width: "abbreviated",
|
|
820
|
+
context: "formatting"
|
|
821
|
+
});
|
|
822
|
+
case "MMMMM": return n.month(r, {
|
|
823
|
+
width: "narrow",
|
|
824
|
+
context: "formatting"
|
|
825
|
+
});
|
|
826
|
+
default: return n.month(r, {
|
|
827
|
+
width: "wide",
|
|
828
|
+
context: "formatting"
|
|
829
|
+
});
|
|
830
|
+
}
|
|
831
|
+
},
|
|
832
|
+
L: function(e, t, n) {
|
|
833
|
+
let r = e.getMonth();
|
|
834
|
+
switch (t) {
|
|
835
|
+
case "L": return String(r + 1);
|
|
836
|
+
case "LL": return H(r + 1, 2);
|
|
837
|
+
case "Lo": return n.ordinalNumber(r + 1, { unit: "month" });
|
|
838
|
+
case "LLL": return n.month(r, {
|
|
839
|
+
width: "abbreviated",
|
|
840
|
+
context: "standalone"
|
|
841
|
+
});
|
|
842
|
+
case "LLLLL": return n.month(r, {
|
|
843
|
+
width: "narrow",
|
|
844
|
+
context: "standalone"
|
|
845
|
+
});
|
|
846
|
+
default: return n.month(r, {
|
|
847
|
+
width: "wide",
|
|
848
|
+
context: "standalone"
|
|
849
|
+
});
|
|
850
|
+
}
|
|
851
|
+
},
|
|
852
|
+
w: function(e, t, n, r) {
|
|
853
|
+
let i = me(e, r);
|
|
854
|
+
return t === "wo" ? n.ordinalNumber(i, { unit: "week" }) : H(i, t.length);
|
|
855
|
+
},
|
|
856
|
+
I: function(e, t, n) {
|
|
857
|
+
let r = B(e);
|
|
858
|
+
return t === "Io" ? n.ordinalNumber(r, { unit: "week" }) : H(r, t.length);
|
|
859
|
+
},
|
|
860
|
+
d: function(e, t, n) {
|
|
861
|
+
return t === "do" ? n.ordinalNumber(e.getDate(), { unit: "date" }) : U.d(e, t);
|
|
862
|
+
},
|
|
863
|
+
D: function(e, t, n) {
|
|
864
|
+
let r = z(e);
|
|
865
|
+
return t === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) : H(r, t.length);
|
|
866
|
+
},
|
|
867
|
+
E: function(e, t, n) {
|
|
868
|
+
let r = e.getDay();
|
|
869
|
+
switch (t) {
|
|
870
|
+
case "E":
|
|
871
|
+
case "EE":
|
|
872
|
+
case "EEE": return n.day(r, {
|
|
873
|
+
width: "abbreviated",
|
|
874
|
+
context: "formatting"
|
|
875
|
+
});
|
|
876
|
+
case "EEEEE": return n.day(r, {
|
|
877
|
+
width: "narrow",
|
|
878
|
+
context: "formatting"
|
|
879
|
+
});
|
|
880
|
+
case "EEEEEE": return n.day(r, {
|
|
881
|
+
width: "short",
|
|
882
|
+
context: "formatting"
|
|
883
|
+
});
|
|
884
|
+
default: return n.day(r, {
|
|
885
|
+
width: "wide",
|
|
886
|
+
context: "formatting"
|
|
887
|
+
});
|
|
888
|
+
}
|
|
889
|
+
},
|
|
890
|
+
e: function(e, t, n, r) {
|
|
891
|
+
let i = e.getDay(), a = (i - r.weekStartsOn + 8) % 7 || 7;
|
|
892
|
+
switch (t) {
|
|
893
|
+
case "e": return String(a);
|
|
894
|
+
case "ee": return H(a, 2);
|
|
895
|
+
case "eo": return n.ordinalNumber(a, { unit: "day" });
|
|
896
|
+
case "eee": return n.day(i, {
|
|
897
|
+
width: "abbreviated",
|
|
898
|
+
context: "formatting"
|
|
899
|
+
});
|
|
900
|
+
case "eeeee": return n.day(i, {
|
|
901
|
+
width: "narrow",
|
|
902
|
+
context: "formatting"
|
|
903
|
+
});
|
|
904
|
+
case "eeeeee": return n.day(i, {
|
|
905
|
+
width: "short",
|
|
906
|
+
context: "formatting"
|
|
907
|
+
});
|
|
908
|
+
default: return n.day(i, {
|
|
909
|
+
width: "wide",
|
|
910
|
+
context: "formatting"
|
|
911
|
+
});
|
|
912
|
+
}
|
|
913
|
+
},
|
|
914
|
+
c: function(e, t, n, r) {
|
|
915
|
+
let i = e.getDay(), a = (i - r.weekStartsOn + 8) % 7 || 7;
|
|
916
|
+
switch (t) {
|
|
917
|
+
case "c": return String(a);
|
|
918
|
+
case "cc": return H(a, t.length);
|
|
919
|
+
case "co": return n.ordinalNumber(a, { unit: "day" });
|
|
920
|
+
case "ccc": return n.day(i, {
|
|
921
|
+
width: "abbreviated",
|
|
922
|
+
context: "standalone"
|
|
923
|
+
});
|
|
924
|
+
case "ccccc": return n.day(i, {
|
|
925
|
+
width: "narrow",
|
|
926
|
+
context: "standalone"
|
|
927
|
+
});
|
|
928
|
+
case "cccccc": return n.day(i, {
|
|
929
|
+
width: "short",
|
|
930
|
+
context: "standalone"
|
|
931
|
+
});
|
|
932
|
+
default: return n.day(i, {
|
|
933
|
+
width: "wide",
|
|
934
|
+
context: "standalone"
|
|
935
|
+
});
|
|
936
|
+
}
|
|
937
|
+
},
|
|
938
|
+
i: function(e, t, n) {
|
|
939
|
+
let r = e.getDay(), i = r === 0 ? 7 : r;
|
|
940
|
+
switch (t) {
|
|
941
|
+
case "i": return String(i);
|
|
942
|
+
case "ii": return H(i, t.length);
|
|
943
|
+
case "io": return n.ordinalNumber(i, { unit: "day" });
|
|
944
|
+
case "iii": return n.day(r, {
|
|
945
|
+
width: "abbreviated",
|
|
946
|
+
context: "formatting"
|
|
947
|
+
});
|
|
948
|
+
case "iiiii": return n.day(r, {
|
|
949
|
+
width: "narrow",
|
|
950
|
+
context: "formatting"
|
|
951
|
+
});
|
|
952
|
+
case "iiiiii": return n.day(r, {
|
|
953
|
+
width: "short",
|
|
954
|
+
context: "formatting"
|
|
955
|
+
});
|
|
956
|
+
default: return n.day(r, {
|
|
957
|
+
width: "wide",
|
|
958
|
+
context: "formatting"
|
|
959
|
+
});
|
|
960
|
+
}
|
|
961
|
+
},
|
|
962
|
+
a: function(e, t, n) {
|
|
963
|
+
let r = e.getHours() / 12 >= 1 ? "pm" : "am";
|
|
964
|
+
switch (t) {
|
|
965
|
+
case "a":
|
|
966
|
+
case "aa": return n.dayPeriod(r, {
|
|
967
|
+
width: "abbreviated",
|
|
968
|
+
context: "formatting"
|
|
969
|
+
});
|
|
970
|
+
case "aaa": return n.dayPeriod(r, {
|
|
971
|
+
width: "abbreviated",
|
|
972
|
+
context: "formatting"
|
|
973
|
+
}).toLowerCase();
|
|
974
|
+
case "aaaaa": return n.dayPeriod(r, {
|
|
975
|
+
width: "narrow",
|
|
976
|
+
context: "formatting"
|
|
977
|
+
});
|
|
978
|
+
default: return n.dayPeriod(r, {
|
|
979
|
+
width: "wide",
|
|
980
|
+
context: "formatting"
|
|
981
|
+
});
|
|
982
|
+
}
|
|
983
|
+
},
|
|
984
|
+
b: function(e, t, n) {
|
|
985
|
+
let r = e.getHours(), i;
|
|
986
|
+
switch (i = r === 12 ? W.noon : r === 0 ? W.midnight : r / 12 >= 1 ? "pm" : "am", t) {
|
|
987
|
+
case "b":
|
|
988
|
+
case "bb": return n.dayPeriod(i, {
|
|
989
|
+
width: "abbreviated",
|
|
990
|
+
context: "formatting"
|
|
991
|
+
});
|
|
992
|
+
case "bbb": return n.dayPeriod(i, {
|
|
993
|
+
width: "abbreviated",
|
|
994
|
+
context: "formatting"
|
|
995
|
+
}).toLowerCase();
|
|
996
|
+
case "bbbbb": return n.dayPeriod(i, {
|
|
997
|
+
width: "narrow",
|
|
998
|
+
context: "formatting"
|
|
999
|
+
});
|
|
1000
|
+
default: return n.dayPeriod(i, {
|
|
1001
|
+
width: "wide",
|
|
1002
|
+
context: "formatting"
|
|
1003
|
+
});
|
|
1004
|
+
}
|
|
1005
|
+
},
|
|
1006
|
+
B: function(e, t, n) {
|
|
1007
|
+
let r = e.getHours(), i;
|
|
1008
|
+
switch (i = r >= 17 ? W.evening : r >= 12 ? W.afternoon : r >= 4 ? W.morning : W.night, t) {
|
|
1009
|
+
case "B":
|
|
1010
|
+
case "BB":
|
|
1011
|
+
case "BBB": return n.dayPeriod(i, {
|
|
1012
|
+
width: "abbreviated",
|
|
1013
|
+
context: "formatting"
|
|
1014
|
+
});
|
|
1015
|
+
case "BBBBB": return n.dayPeriod(i, {
|
|
1016
|
+
width: "narrow",
|
|
1017
|
+
context: "formatting"
|
|
1018
|
+
});
|
|
1019
|
+
default: return n.dayPeriod(i, {
|
|
1020
|
+
width: "wide",
|
|
1021
|
+
context: "formatting"
|
|
1022
|
+
});
|
|
1023
|
+
}
|
|
1024
|
+
},
|
|
1025
|
+
h: function(e, t, n) {
|
|
1026
|
+
if (t === "ho") {
|
|
1027
|
+
let t = e.getHours() % 12;
|
|
1028
|
+
return t === 0 && (t = 12), n.ordinalNumber(t, { unit: "hour" });
|
|
1029
|
+
}
|
|
1030
|
+
return U.h(e, t);
|
|
1031
|
+
},
|
|
1032
|
+
H: function(e, t, n) {
|
|
1033
|
+
return t === "Ho" ? n.ordinalNumber(e.getHours(), { unit: "hour" }) : U.H(e, t);
|
|
1034
|
+
},
|
|
1035
|
+
K: function(e, t, n) {
|
|
1036
|
+
let r = e.getHours() % 12;
|
|
1037
|
+
return t === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) : H(r, t.length);
|
|
1038
|
+
},
|
|
1039
|
+
k: function(e, t, n) {
|
|
1040
|
+
let r = e.getHours();
|
|
1041
|
+
return r === 0 && (r = 24), t === "ko" ? n.ordinalNumber(r, { unit: "hour" }) : H(r, t.length);
|
|
1042
|
+
},
|
|
1043
|
+
m: function(e, t, n) {
|
|
1044
|
+
return t === "mo" ? n.ordinalNumber(e.getMinutes(), { unit: "minute" }) : U.m(e, t);
|
|
1045
|
+
},
|
|
1046
|
+
s: function(e, t, n) {
|
|
1047
|
+
return t === "so" ? n.ordinalNumber(e.getSeconds(), { unit: "second" }) : U.s(e, t);
|
|
1048
|
+
},
|
|
1049
|
+
S: function(e, t) {
|
|
1050
|
+
return U.S(e, t);
|
|
1051
|
+
},
|
|
1052
|
+
X: function(e, t, n) {
|
|
1053
|
+
let r = e.getTimezoneOffset();
|
|
1054
|
+
if (r === 0) return "Z";
|
|
1055
|
+
switch (t) {
|
|
1056
|
+
case "X": return _e(r);
|
|
1057
|
+
case "XXXX":
|
|
1058
|
+
case "XX": return G(r);
|
|
1059
|
+
default: return G(r, ":");
|
|
1060
|
+
}
|
|
1061
|
+
},
|
|
1062
|
+
x: function(e, t, n) {
|
|
1063
|
+
let r = e.getTimezoneOffset();
|
|
1064
|
+
switch (t) {
|
|
1065
|
+
case "x": return _e(r);
|
|
1066
|
+
case "xxxx":
|
|
1067
|
+
case "xx": return G(r);
|
|
1068
|
+
default: return G(r, ":");
|
|
1069
|
+
}
|
|
1070
|
+
},
|
|
1071
|
+
O: function(e, t, n) {
|
|
1072
|
+
let r = e.getTimezoneOffset();
|
|
1073
|
+
switch (t) {
|
|
1074
|
+
case "O":
|
|
1075
|
+
case "OO":
|
|
1076
|
+
case "OOO": return "GMT" + ge(r, ":");
|
|
1077
|
+
default: return "GMT" + G(r, ":");
|
|
1078
|
+
}
|
|
1079
|
+
},
|
|
1080
|
+
z: function(e, t, n) {
|
|
1081
|
+
let r = e.getTimezoneOffset();
|
|
1082
|
+
switch (t) {
|
|
1083
|
+
case "z":
|
|
1084
|
+
case "zz":
|
|
1085
|
+
case "zzz": return "GMT" + ge(r, ":");
|
|
1086
|
+
default: return "GMT" + G(r, ":");
|
|
1087
|
+
}
|
|
1088
|
+
},
|
|
1089
|
+
t: function(e, t, n) {
|
|
1090
|
+
return H(Math.trunc(e / 1e3), t.length);
|
|
1091
|
+
},
|
|
1092
|
+
T: function(e, t, n) {
|
|
1093
|
+
return H(+e, t.length);
|
|
1094
|
+
}
|
|
1095
|
+
};
|
|
1096
|
+
function ge(e, t = "") {
|
|
1097
|
+
let n = e > 0 ? "-" : "+", r = Math.abs(e), i = Math.trunc(r / 60), a = r % 60;
|
|
1098
|
+
return a === 0 ? n + String(i) : n + String(i) + t + H(a, 2);
|
|
1099
|
+
}
|
|
1100
|
+
function _e(e, t) {
|
|
1101
|
+
return e % 60 == 0 ? (e > 0 ? "-" : "+") + H(Math.abs(e) / 60, 2) : G(e, t);
|
|
1102
|
+
}
|
|
1103
|
+
function G(e, t = "") {
|
|
1104
|
+
let n = e > 0 ? "-" : "+", r = Math.abs(e), i = H(Math.trunc(r / 60), 2), a = H(r % 60, 2);
|
|
1105
|
+
return n + i + t + a;
|
|
1106
|
+
}
|
|
1107
|
+
//#endregion
|
|
1108
|
+
//#region node_modules/date-fns/_lib/format/longFormatters.js
|
|
1109
|
+
var ve = (e, t) => {
|
|
1110
|
+
switch (e) {
|
|
1111
|
+
case "P": return t.date({ width: "short" });
|
|
1112
|
+
case "PP": return t.date({ width: "medium" });
|
|
1113
|
+
case "PPP": return t.date({ width: "long" });
|
|
1114
|
+
default: return t.date({ width: "full" });
|
|
1115
|
+
}
|
|
1116
|
+
}, ye = (e, t) => {
|
|
1117
|
+
switch (e) {
|
|
1118
|
+
case "p": return t.time({ width: "short" });
|
|
1119
|
+
case "pp": return t.time({ width: "medium" });
|
|
1120
|
+
case "ppp": return t.time({ width: "long" });
|
|
1121
|
+
default: return t.time({ width: "full" });
|
|
1122
|
+
}
|
|
1123
|
+
}, be = {
|
|
1124
|
+
p: ye,
|
|
1125
|
+
P: (e, t) => {
|
|
1126
|
+
let n = e.match(/(P+)(p+)?/) || [], r = n[1], i = n[2];
|
|
1127
|
+
if (!i) return ve(e, t);
|
|
1128
|
+
let a;
|
|
1129
|
+
switch (r) {
|
|
1130
|
+
case "P":
|
|
1131
|
+
a = t.dateTime({ width: "short" });
|
|
1132
|
+
break;
|
|
1133
|
+
case "PP":
|
|
1134
|
+
a = t.dateTime({ width: "medium" });
|
|
1135
|
+
break;
|
|
1136
|
+
case "PPP":
|
|
1137
|
+
a = t.dateTime({ width: "long" });
|
|
1138
|
+
break;
|
|
1139
|
+
default:
|
|
1140
|
+
a = t.dateTime({ width: "full" });
|
|
1141
|
+
break;
|
|
1142
|
+
}
|
|
1143
|
+
return a.replace("{{date}}", ve(r, t)).replace("{{time}}", ye(i, t));
|
|
1144
|
+
}
|
|
1145
|
+
}, xe = /^D+$/, Se = /^Y+$/, Ce = [
|
|
1146
|
+
"D",
|
|
1147
|
+
"DD",
|
|
1148
|
+
"YY",
|
|
1149
|
+
"YYYY"
|
|
1150
|
+
];
|
|
1151
|
+
function we(e) {
|
|
1152
|
+
return xe.test(e);
|
|
1153
|
+
}
|
|
1154
|
+
function Te(e) {
|
|
1155
|
+
return Se.test(e);
|
|
1156
|
+
}
|
|
1157
|
+
function Ee(e, t, n) {
|
|
1158
|
+
let r = De(e, t, n);
|
|
1159
|
+
if (console.warn(r), Ce.includes(e)) throw RangeError(r);
|
|
1160
|
+
}
|
|
1161
|
+
function De(e, t, n) {
|
|
1162
|
+
let r = e[0] === "Y" ? "years" : "days of the month";
|
|
1163
|
+
return `Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
|
|
1164
|
+
}
|
|
1165
|
+
//#endregion
|
|
1166
|
+
//#region node_modules/date-fns/format.js
|
|
1167
|
+
var Oe = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, ke = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Ae = /^'([^]*?)'?$/, je = /''/g, Me = /[a-zA-Z]/;
|
|
1168
|
+
function K(e, t, n) {
|
|
1169
|
+
let r = b(), i = n?.locale ?? r.locale ?? fe, a = n?.firstWeekContainsDate ?? n?.locale?.options?.firstWeekContainsDate ?? r.firstWeekContainsDate ?? r.locale?.options?.firstWeekContainsDate ?? 1, o = n?.weekStartsOn ?? n?.locale?.options?.weekStartsOn ?? r.weekStartsOn ?? r.locale?.options?.weekStartsOn ?? 0, s = g(e, n?.in);
|
|
1170
|
+
if (!j(s)) throw RangeError("Invalid time value");
|
|
1171
|
+
let c = t.match(ke).map((e) => {
|
|
1172
|
+
let t = e[0];
|
|
1173
|
+
if (t === "p" || t === "P") {
|
|
1174
|
+
let n = be[t];
|
|
1175
|
+
return n(e, i.formatLong);
|
|
1176
|
+
}
|
|
1177
|
+
return e;
|
|
1178
|
+
}).join("").match(Oe).map((e) => {
|
|
1179
|
+
if (e === "''") return {
|
|
1180
|
+
isToken: !1,
|
|
1181
|
+
value: "'"
|
|
1182
|
+
};
|
|
1183
|
+
let t = e[0];
|
|
1184
|
+
if (t === "'") return {
|
|
1185
|
+
isToken: !1,
|
|
1186
|
+
value: Ne(e)
|
|
1187
|
+
};
|
|
1188
|
+
if (he[t]) return {
|
|
1189
|
+
isToken: !0,
|
|
1190
|
+
value: e
|
|
1191
|
+
};
|
|
1192
|
+
if (t.match(Me)) throw RangeError("Format string contains an unescaped latin alphabet character `" + t + "`");
|
|
1193
|
+
return {
|
|
1194
|
+
isToken: !1,
|
|
1195
|
+
value: e
|
|
1196
|
+
};
|
|
1197
|
+
});
|
|
1198
|
+
i.localize.preprocessor && (c = i.localize.preprocessor(s, c));
|
|
1199
|
+
let l = {
|
|
1200
|
+
firstWeekContainsDate: a,
|
|
1201
|
+
weekStartsOn: o,
|
|
1202
|
+
locale: i
|
|
1203
|
+
};
|
|
1204
|
+
return c.map((r) => {
|
|
1205
|
+
if (!r.isToken) return r.value;
|
|
1206
|
+
let a = r.value;
|
|
1207
|
+
(!n?.useAdditionalWeekYearTokens && Te(a) || !n?.useAdditionalDayOfYearTokens && we(a)) && Ee(a, t, String(e));
|
|
1208
|
+
let o = he[a[0]];
|
|
1209
|
+
return o(s, a, i.localize, l);
|
|
1210
|
+
}).join("");
|
|
1211
|
+
}
|
|
1212
|
+
function Ne(e) {
|
|
1213
|
+
let t = e.match(Ae);
|
|
1214
|
+
return t ? t[1].replace(je, "'") : e;
|
|
1215
|
+
}
|
|
1216
|
+
//#endregion
|
|
1217
|
+
//#region node_modules/date-fns/getDay.js
|
|
1218
|
+
function Pe(e, t) {
|
|
1219
|
+
return g(e, t?.in).getDay();
|
|
1220
|
+
}
|
|
1221
|
+
//#endregion
|
|
1222
|
+
//#region node_modules/date-fns/getDefaultOptions.js
|
|
1223
|
+
function Fe() {
|
|
1224
|
+
return Object.assign({}, b());
|
|
1225
|
+
}
|
|
1226
|
+
//#endregion
|
|
1227
|
+
//#region node_modules/date-fns/isToday.js
|
|
1228
|
+
function Ie(e, t) {
|
|
1229
|
+
return ee(h(t?.in || e, e), k(t?.in || e));
|
|
1230
|
+
}
|
|
1231
|
+
//#endregion
|
|
1232
|
+
//#region node_modules/date-fns/parseISO.js
|
|
1233
|
+
function Le(e, t) {
|
|
1234
|
+
let n = () => h(t?.in, NaN), r = t?.additionalDigits ?? 2, i = Ve(e), a;
|
|
1235
|
+
if (i.date) {
|
|
1236
|
+
let e = He(i.date, r);
|
|
1237
|
+
a = Ue(e.restDateString, e.year);
|
|
1238
|
+
}
|
|
1239
|
+
if (!a || isNaN(+a)) return n();
|
|
1240
|
+
let o = +a, s = 0, c;
|
|
1241
|
+
if (i.time && (s = We(i.time), isNaN(s))) return n();
|
|
1242
|
+
if (i.timezone) {
|
|
1243
|
+
if (c = Ke(i.timezone), isNaN(c)) return n();
|
|
1244
|
+
} else {
|
|
1245
|
+
let e = new Date(o + s), n = g(0, t?.in);
|
|
1246
|
+
return n.setFullYear(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate()), n.setHours(e.getUTCHours(), e.getUTCMinutes(), e.getUTCSeconds(), e.getUTCMilliseconds()), n;
|
|
1247
|
+
}
|
|
1248
|
+
return g(o + s + c, t?.in);
|
|
1249
|
+
}
|
|
1250
|
+
var q = {
|
|
1251
|
+
dateTimeDelimiter: /[T ]/,
|
|
1252
|
+
timeZoneDelimiter: /[Z ]/i,
|
|
1253
|
+
timezone: /([Z+-].*)$/
|
|
1254
|
+
}, Re = /^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/, ze = /^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/, Be = /^([+-])(\d{2})(?::?(\d{2}))?$/;
|
|
1255
|
+
function Ve(e) {
|
|
1256
|
+
let t = {}, n = e.split(q.dateTimeDelimiter), r;
|
|
1257
|
+
if (n.length > 2) return t;
|
|
1258
|
+
if (/:/.test(n[0]) ? r = n[0] : (t.date = n[0], r = n[1], q.timeZoneDelimiter.test(t.date) && (t.date = e.split(q.timeZoneDelimiter)[0], r = e.substr(t.date.length, e.length))), r) {
|
|
1259
|
+
let e = q.timezone.exec(r);
|
|
1260
|
+
e ? (t.time = r.replace(e[1], ""), t.timezone = e[1]) : t.time = r;
|
|
1261
|
+
}
|
|
1262
|
+
return t;
|
|
1263
|
+
}
|
|
1264
|
+
function He(e, t) {
|
|
1265
|
+
let n = RegExp("^(?:(\\d{4}|[+-]\\d{" + (4 + t) + "})|(\\d{2}|[+-]\\d{" + (2 + t) + "})$)"), r = e.match(n);
|
|
1266
|
+
if (!r) return {
|
|
1267
|
+
year: NaN,
|
|
1268
|
+
restDateString: ""
|
|
1269
|
+
};
|
|
1270
|
+
let i = r[1] ? parseInt(r[1]) : null, a = r[2] ? parseInt(r[2]) : null;
|
|
1271
|
+
return {
|
|
1272
|
+
year: a === null ? i : a * 100,
|
|
1273
|
+
restDateString: e.slice((r[1] || r[2]).length)
|
|
1274
|
+
};
|
|
1275
|
+
}
|
|
1276
|
+
function Ue(e, t) {
|
|
1277
|
+
if (t === null) return /* @__PURE__ */ new Date(NaN);
|
|
1278
|
+
let n = e.match(Re);
|
|
1279
|
+
if (!n) return /* @__PURE__ */ new Date(NaN);
|
|
1280
|
+
let r = !!n[4], i = J(n[1]), a = J(n[2]) - 1, o = J(n[3]), s = J(n[4]), c = J(n[5]) - 1;
|
|
1281
|
+
if (r) return Qe(t, s, c) ? qe(t, s, c) : /* @__PURE__ */ new Date(NaN);
|
|
1282
|
+
{
|
|
1283
|
+
let e = /* @__PURE__ */ new Date(0);
|
|
1284
|
+
return !Xe(t, a, o) || !Ze(t, i) ? /* @__PURE__ */ new Date(NaN) : (e.setUTCFullYear(t, a, Math.max(i, o)), e);
|
|
1285
|
+
}
|
|
1286
|
+
}
|
|
1287
|
+
function J(e) {
|
|
1288
|
+
return e ? parseInt(e) : 1;
|
|
1289
|
+
}
|
|
1290
|
+
function We(e) {
|
|
1291
|
+
let t = e.match(ze);
|
|
1292
|
+
if (!t) return NaN;
|
|
1293
|
+
let n = Ge(t[1]), r = Ge(t[2]), i = Ge(t[3]);
|
|
1294
|
+
return $e(n, r, i) ? n * f + r * d + i * 1e3 : NaN;
|
|
1295
|
+
}
|
|
1296
|
+
function Ge(e) {
|
|
1297
|
+
return e && parseFloat(e.replace(",", ".")) || 0;
|
|
1298
|
+
}
|
|
1299
|
+
function Ke(e) {
|
|
1300
|
+
if (e === "Z") return 0;
|
|
1301
|
+
let t = e.match(Be);
|
|
1302
|
+
if (!t) return 0;
|
|
1303
|
+
let n = t[1] === "+" ? -1 : 1, r = parseInt(t[2]), i = t[3] && parseInt(t[3]) || 0;
|
|
1304
|
+
return et(r, i) ? n * (r * f + i * d) : NaN;
|
|
1305
|
+
}
|
|
1306
|
+
function qe(e, t, n) {
|
|
1307
|
+
let r = /* @__PURE__ */ new Date(0);
|
|
1308
|
+
r.setUTCFullYear(e, 0, 4);
|
|
1309
|
+
let i = r.getUTCDay() || 7, a = (t - 1) * 7 + n + 1 - i;
|
|
1310
|
+
return r.setUTCDate(r.getUTCDate() + a), r;
|
|
1311
|
+
}
|
|
1312
|
+
var Je = [
|
|
1313
|
+
31,
|
|
1314
|
+
null,
|
|
1315
|
+
31,
|
|
1316
|
+
30,
|
|
1317
|
+
31,
|
|
1318
|
+
30,
|
|
1319
|
+
31,
|
|
1320
|
+
31,
|
|
1321
|
+
30,
|
|
1322
|
+
31,
|
|
1323
|
+
30,
|
|
1324
|
+
31
|
|
1325
|
+
];
|
|
1326
|
+
function Ye(e) {
|
|
1327
|
+
return e % 400 == 0 || e % 4 == 0 && e % 100 != 0;
|
|
1328
|
+
}
|
|
1329
|
+
function Xe(e, t, n) {
|
|
1330
|
+
return t >= 0 && t <= 11 && n >= 1 && n <= (Je[t] || (Ye(e) ? 29 : 28));
|
|
1331
|
+
}
|
|
1332
|
+
function Ze(e, t) {
|
|
1333
|
+
return t >= 1 && t <= (Ye(e) ? 366 : 365);
|
|
1334
|
+
}
|
|
1335
|
+
function Qe(e, t, n) {
|
|
1336
|
+
return t >= 1 && t <= 53 && n >= 0 && n <= 6;
|
|
1337
|
+
}
|
|
1338
|
+
function $e(e, t, n) {
|
|
1339
|
+
return e === 24 ? t === 0 && n === 0 : n >= 0 && n < 60 && t >= 0 && t < 60 && e >= 0 && e < 25;
|
|
1340
|
+
}
|
|
1341
|
+
function et(e, t) {
|
|
1342
|
+
return t >= 0 && t <= 59;
|
|
1343
|
+
}
|
|
1344
|
+
//#endregion
|
|
1345
|
+
//#region node_modules/date-fns-tz/dist/esm/_lib/tzIntlTimeZoneName/index.js
|
|
1346
|
+
function tt(e, t, n) {
|
|
1347
|
+
let r = Fe(), i = it(e, n.timeZone, n.locale ?? r.locale);
|
|
1348
|
+
return "formatToParts" in i ? nt(i, t) : rt(i, t);
|
|
1349
|
+
}
|
|
1350
|
+
function nt(e, t) {
|
|
1351
|
+
let n = e.formatToParts(t);
|
|
1352
|
+
for (let e = n.length - 1; e >= 0; --e) if (n[e].type === "timeZoneName") return n[e].value;
|
|
1353
|
+
}
|
|
1354
|
+
function rt(e, t) {
|
|
1355
|
+
let n = e.format(t).replace(/\u200E/g, ""), r = / [\w-+ ]+$/.exec(n);
|
|
1356
|
+
return r ? r[0].substr(1) : "";
|
|
1357
|
+
}
|
|
1358
|
+
function it(e, t, n) {
|
|
1359
|
+
return new Intl.DateTimeFormat(n ? [n.code, "en-US"] : void 0, {
|
|
1360
|
+
timeZone: t,
|
|
1361
|
+
timeZoneName: e
|
|
1362
|
+
});
|
|
1363
|
+
}
|
|
1364
|
+
//#endregion
|
|
1365
|
+
//#region node_modules/date-fns-tz/dist/esm/_lib/tzTokenizeDate/index.js
|
|
1366
|
+
function at(e, t) {
|
|
1367
|
+
let n = ft(t);
|
|
1368
|
+
return "formatToParts" in n ? st(n, e) : ct(n, e);
|
|
1369
|
+
}
|
|
1370
|
+
var ot = {
|
|
1371
|
+
year: 0,
|
|
1372
|
+
month: 1,
|
|
1373
|
+
day: 2,
|
|
1374
|
+
hour: 3,
|
|
1375
|
+
minute: 4,
|
|
1376
|
+
second: 5
|
|
1377
|
+
};
|
|
1378
|
+
function st(e, t) {
|
|
1379
|
+
try {
|
|
1380
|
+
let n = e.formatToParts(t), r = [];
|
|
1381
|
+
for (let e = 0; e < n.length; e++) {
|
|
1382
|
+
let t = ot[n[e].type];
|
|
1383
|
+
t !== void 0 && (r[t] = parseInt(n[e].value, 10));
|
|
1384
|
+
}
|
|
1385
|
+
return r;
|
|
1386
|
+
} catch (e) {
|
|
1387
|
+
if (e instanceof RangeError) return [NaN];
|
|
1388
|
+
throw e;
|
|
1389
|
+
}
|
|
1390
|
+
}
|
|
1391
|
+
function ct(e, t) {
|
|
1392
|
+
let n = e.format(t), r = /(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);
|
|
1393
|
+
return [
|
|
1394
|
+
parseInt(r[3], 10),
|
|
1395
|
+
parseInt(r[1], 10),
|
|
1396
|
+
parseInt(r[2], 10),
|
|
1397
|
+
parseInt(r[4], 10),
|
|
1398
|
+
parseInt(r[5], 10),
|
|
1399
|
+
parseInt(r[6], 10)
|
|
1400
|
+
];
|
|
1401
|
+
}
|
|
1402
|
+
var lt = {}, ut = new Intl.DateTimeFormat("en-US", {
|
|
1403
|
+
hourCycle: "h23",
|
|
1404
|
+
timeZone: "America/New_York",
|
|
1405
|
+
year: "numeric",
|
|
1406
|
+
month: "2-digit",
|
|
1407
|
+
day: "2-digit",
|
|
1408
|
+
hour: "2-digit",
|
|
1409
|
+
minute: "2-digit",
|
|
1410
|
+
second: "2-digit"
|
|
1411
|
+
}).format(/* @__PURE__ */ new Date("2014-06-25T04:00:00.123Z")), dt = ut === "06/25/2014, 00:00:00" || ut === "06/25/2014 00:00:00";
|
|
1412
|
+
function ft(e) {
|
|
1413
|
+
return lt[e] || (lt[e] = dt ? new Intl.DateTimeFormat("en-US", {
|
|
1414
|
+
hourCycle: "h23",
|
|
1415
|
+
timeZone: e,
|
|
1416
|
+
year: "numeric",
|
|
1417
|
+
month: "numeric",
|
|
1418
|
+
day: "2-digit",
|
|
1419
|
+
hour: "2-digit",
|
|
1420
|
+
minute: "2-digit",
|
|
1421
|
+
second: "2-digit"
|
|
1422
|
+
}) : new Intl.DateTimeFormat("en-US", {
|
|
1423
|
+
hour12: !1,
|
|
1424
|
+
timeZone: e,
|
|
1425
|
+
year: "numeric",
|
|
1426
|
+
month: "numeric",
|
|
1427
|
+
day: "2-digit",
|
|
1428
|
+
hour: "2-digit",
|
|
1429
|
+
minute: "2-digit",
|
|
1430
|
+
second: "2-digit"
|
|
1431
|
+
})), lt[e];
|
|
1432
|
+
}
|
|
1433
|
+
//#endregion
|
|
1434
|
+
//#region node_modules/date-fns-tz/dist/esm/_lib/newDateUTC/index.js
|
|
1435
|
+
function pt(e, t, n, r, i, a, o) {
|
|
1436
|
+
let s = /* @__PURE__ */ new Date(0);
|
|
1437
|
+
return s.setUTCFullYear(e, t, n), s.setUTCHours(r, i, a, o), s;
|
|
1438
|
+
}
|
|
1439
|
+
//#endregion
|
|
1440
|
+
//#region node_modules/date-fns-tz/dist/esm/_lib/tzParseTimezone/index.js
|
|
1441
|
+
var mt = 36e5, ht = 6e4, gt = {
|
|
1442
|
+
timezone: /([Z+-].*)$/,
|
|
1443
|
+
timezoneZ: /^(Z)$/,
|
|
1444
|
+
timezoneHH: /^([+-]\d{2})$/,
|
|
1445
|
+
timezoneHHMM: /^([+-])(\d{2}):?(\d{2})$/
|
|
1446
|
+
};
|
|
1447
|
+
function _t(e, t, n) {
|
|
1448
|
+
if (!e) return 0;
|
|
1449
|
+
let r = gt.timezoneZ.exec(e);
|
|
1450
|
+
if (r) return 0;
|
|
1451
|
+
let i, a;
|
|
1452
|
+
if (r = gt.timezoneHH.exec(e), r) return i = parseInt(r[1], 10), xt(i) ? -(i * mt) : NaN;
|
|
1453
|
+
if (r = gt.timezoneHHMM.exec(e), r) {
|
|
1454
|
+
i = parseInt(r[2], 10);
|
|
1455
|
+
let e = parseInt(r[3], 10);
|
|
1456
|
+
return xt(i, e) ? (a = Math.abs(i) * mt + e * ht, r[1] === "+" ? -a : a) : NaN;
|
|
1457
|
+
}
|
|
1458
|
+
if (Ct(e)) {
|
|
1459
|
+
t = new Date(t || Date.now());
|
|
1460
|
+
let r = yt(n ? t : vt(t), e);
|
|
1461
|
+
return -(n ? r : bt(t, r, e));
|
|
1462
|
+
}
|
|
1463
|
+
return NaN;
|
|
1464
|
+
}
|
|
1465
|
+
function vt(e) {
|
|
1466
|
+
return pt(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds());
|
|
1467
|
+
}
|
|
1468
|
+
function yt(e, t) {
|
|
1469
|
+
let n = at(e, t), r = pt(n[0], n[1] - 1, n[2], n[3] % 24, n[4], n[5], 0).getTime(), i = e.getTime(), a = i % 1e3;
|
|
1470
|
+
return i -= a >= 0 ? a : 1e3 + a, r - i;
|
|
1471
|
+
}
|
|
1472
|
+
function bt(e, t, n) {
|
|
1473
|
+
let r = e.getTime() - t, i = yt(new Date(r), n);
|
|
1474
|
+
if (t === i) return t;
|
|
1475
|
+
r -= i - t;
|
|
1476
|
+
let a = yt(new Date(r), n);
|
|
1477
|
+
return i === a ? i : Math.max(i, a);
|
|
1478
|
+
}
|
|
1479
|
+
function xt(e, t) {
|
|
1480
|
+
return -23 <= e && e <= 23 && (t == null || 0 <= t && t <= 59);
|
|
1481
|
+
}
|
|
1482
|
+
var St = {};
|
|
1483
|
+
function Ct(e) {
|
|
1484
|
+
if (St[e]) return !0;
|
|
1485
|
+
try {
|
|
1486
|
+
return new Intl.DateTimeFormat(void 0, { timeZone: e }), St[e] = !0, !0;
|
|
1487
|
+
} catch {
|
|
1488
|
+
return !1;
|
|
1489
|
+
}
|
|
1490
|
+
}
|
|
1491
|
+
//#endregion
|
|
1492
|
+
//#region node_modules/date-fns-tz/dist/esm/format/formatters/index.js
|
|
1493
|
+
var wt = 60 * 1e3, Tt = {
|
|
1494
|
+
X: function(e, t, n) {
|
|
1495
|
+
let r = Et(n.timeZone, e);
|
|
1496
|
+
if (r === 0) return "Z";
|
|
1497
|
+
switch (t) {
|
|
1498
|
+
case "X": return Dt(r);
|
|
1499
|
+
case "XXXX":
|
|
1500
|
+
case "XX": return X(r);
|
|
1501
|
+
default: return X(r, ":");
|
|
1502
|
+
}
|
|
1503
|
+
},
|
|
1504
|
+
x: function(e, t, n) {
|
|
1505
|
+
let r = Et(n.timeZone, e);
|
|
1506
|
+
switch (t) {
|
|
1507
|
+
case "x": return Dt(r);
|
|
1508
|
+
case "xxxx":
|
|
1509
|
+
case "xx": return X(r);
|
|
1510
|
+
default: return X(r, ":");
|
|
1511
|
+
}
|
|
1512
|
+
},
|
|
1513
|
+
O: function(e, t, n) {
|
|
1514
|
+
let r = Et(n.timeZone, e);
|
|
1515
|
+
switch (t) {
|
|
1516
|
+
case "O":
|
|
1517
|
+
case "OO":
|
|
1518
|
+
case "OOO": return "GMT" + Ot(r, ":");
|
|
1519
|
+
default: return "GMT" + X(r, ":");
|
|
1520
|
+
}
|
|
1521
|
+
},
|
|
1522
|
+
z: function(e, t, n) {
|
|
1523
|
+
switch (t) {
|
|
1524
|
+
case "z":
|
|
1525
|
+
case "zz":
|
|
1526
|
+
case "zzz": return tt("short", e, n);
|
|
1527
|
+
default: return tt("long", e, n);
|
|
1528
|
+
}
|
|
1529
|
+
}
|
|
1530
|
+
};
|
|
1531
|
+
function Et(e, t) {
|
|
1532
|
+
let n = e ? _t(e, t, !0) / wt : t?.getTimezoneOffset() ?? 0;
|
|
1533
|
+
if (Number.isNaN(n)) throw RangeError("Invalid time zone specified: " + e);
|
|
1534
|
+
return n;
|
|
1535
|
+
}
|
|
1536
|
+
function Y(e, t) {
|
|
1537
|
+
let n = e < 0 ? "-" : "", r = Math.abs(e).toString();
|
|
1538
|
+
for (; r.length < t;) r = "0" + r;
|
|
1539
|
+
return n + r;
|
|
1540
|
+
}
|
|
1541
|
+
function X(e, t = "") {
|
|
1542
|
+
let n = e > 0 ? "-" : "+", r = Math.abs(e), i = Y(Math.floor(r / 60), 2), a = Y(Math.floor(r % 60), 2);
|
|
1543
|
+
return n + i + t + a;
|
|
1544
|
+
}
|
|
1545
|
+
function Dt(e, t) {
|
|
1546
|
+
return e % 60 == 0 ? (e > 0 ? "-" : "+") + Y(Math.abs(e) / 60, 2) : X(e, t);
|
|
1547
|
+
}
|
|
1548
|
+
function Ot(e, t = "") {
|
|
1549
|
+
let n = e > 0 ? "-" : "+", r = Math.abs(e), i = Math.floor(r / 60), a = r % 60;
|
|
1550
|
+
return a === 0 ? n + String(i) : n + String(i) + t + Y(a, 2);
|
|
1551
|
+
}
|
|
1552
|
+
//#endregion
|
|
1553
|
+
//#region node_modules/date-fns-tz/dist/esm/_lib/getTimezoneOffsetInMilliseconds/index.js
|
|
1554
|
+
function kt(e) {
|
|
1555
|
+
let t = new Date(Date.UTC(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds()));
|
|
1556
|
+
return t.setUTCFullYear(e.getFullYear()), e - +t;
|
|
1557
|
+
}
|
|
1558
|
+
//#endregion
|
|
1559
|
+
//#region node_modules/date-fns-tz/dist/esm/_lib/tzPattern/index.js
|
|
1560
|
+
var At = /(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/, jt = 36e5, Mt = 6e4, Nt = 2, Z = {
|
|
1561
|
+
dateTimePattern: /^([0-9W+-]+)(T| )(.*)/,
|
|
1562
|
+
datePattern: /^([0-9W+-]+)(.*)/,
|
|
1563
|
+
plainTime: /:/,
|
|
1564
|
+
YY: /^(\d{2})$/,
|
|
1565
|
+
YYY: [
|
|
1566
|
+
/^([+-]\d{2})$/,
|
|
1567
|
+
/^([+-]\d{3})$/,
|
|
1568
|
+
/^([+-]\d{4})$/
|
|
1569
|
+
],
|
|
1570
|
+
YYYY: /^(\d{4})/,
|
|
1571
|
+
YYYYY: [
|
|
1572
|
+
/^([+-]\d{4})/,
|
|
1573
|
+
/^([+-]\d{5})/,
|
|
1574
|
+
/^([+-]\d{6})/
|
|
1575
|
+
],
|
|
1576
|
+
MM: /^-(\d{2})$/,
|
|
1577
|
+
DDD: /^-?(\d{3})$/,
|
|
1578
|
+
MMDD: /^-?(\d{2})-?(\d{2})$/,
|
|
1579
|
+
Www: /^-?W(\d{2})$/,
|
|
1580
|
+
WwwD: /^-?W(\d{2})-?(\d{1})$/,
|
|
1581
|
+
HH: /^(\d{2}([.,]\d*)?)$/,
|
|
1582
|
+
HHMM: /^(\d{2}):?(\d{2}([.,]\d*)?)$/,
|
|
1583
|
+
HHMMSS: /^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,
|
|
1584
|
+
timeZone: At
|
|
1585
|
+
};
|
|
1586
|
+
function Pt(e, t = {}) {
|
|
1587
|
+
if (arguments.length < 1) throw TypeError("1 argument required, but only " + arguments.length + " present");
|
|
1588
|
+
if (e === null) return /* @__PURE__ */ new Date(NaN);
|
|
1589
|
+
let n = t.additionalDigits == null ? Nt : Number(t.additionalDigits);
|
|
1590
|
+
if (n !== 2 && n !== 1 && n !== 0) throw RangeError("additionalDigits must be 0, 1 or 2");
|
|
1591
|
+
if (e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]") return new Date(e.getTime());
|
|
1592
|
+
if (typeof e == "number" || Object.prototype.toString.call(e) === "[object Number]") return new Date(e);
|
|
1593
|
+
if (Object.prototype.toString.call(e) !== "[object String]") return /* @__PURE__ */ new Date(NaN);
|
|
1594
|
+
let r = Ft(e), { year: i, restDateString: a } = It(r.date, n), o = Lt(a, i);
|
|
1595
|
+
if (o === null || isNaN(o.getTime())) return /* @__PURE__ */ new Date(NaN);
|
|
1596
|
+
if (o) {
|
|
1597
|
+
let e = o.getTime(), n = 0, i;
|
|
1598
|
+
if (r.time && (n = Rt(r.time), n === null || isNaN(n))) return /* @__PURE__ */ new Date(NaN);
|
|
1599
|
+
if (r.timeZone || t.timeZone) {
|
|
1600
|
+
if (i = _t(r.timeZone || t.timeZone, new Date(e + n)), isNaN(i)) return /* @__PURE__ */ new Date(NaN);
|
|
1601
|
+
} else i = kt(new Date(e + n)), i = kt(new Date(e + n + i));
|
|
1602
|
+
return new Date(e + n + i);
|
|
1603
|
+
} else return /* @__PURE__ */ new Date(NaN);
|
|
1604
|
+
}
|
|
1605
|
+
function Ft(e) {
|
|
1606
|
+
let t = {}, n = Z.dateTimePattern.exec(e), r;
|
|
1607
|
+
if (n ? (t.date = n[1], r = n[3]) : (n = Z.datePattern.exec(e), n ? (t.date = n[1], r = n[2]) : (t.date = null, r = e)), r) {
|
|
1608
|
+
let e = Z.timeZone.exec(r);
|
|
1609
|
+
e ? (t.time = r.replace(e[1], ""), t.timeZone = e[1].trim()) : t.time = r;
|
|
1610
|
+
}
|
|
1611
|
+
return t;
|
|
1612
|
+
}
|
|
1613
|
+
function It(e, t) {
|
|
1614
|
+
if (e) {
|
|
1615
|
+
let n = Z.YYY[t], r = Z.YYYYY[t], i = Z.YYYY.exec(e) || r.exec(e);
|
|
1616
|
+
if (i) {
|
|
1617
|
+
let t = i[1];
|
|
1618
|
+
return {
|
|
1619
|
+
year: parseInt(t, 10),
|
|
1620
|
+
restDateString: e.slice(t.length)
|
|
1621
|
+
};
|
|
1622
|
+
}
|
|
1623
|
+
if (i = Z.YY.exec(e) || n.exec(e), i) {
|
|
1624
|
+
let t = i[1];
|
|
1625
|
+
return {
|
|
1626
|
+
year: parseInt(t, 10) * 100,
|
|
1627
|
+
restDateString: e.slice(t.length)
|
|
1628
|
+
};
|
|
1629
|
+
}
|
|
1630
|
+
}
|
|
1631
|
+
return { year: null };
|
|
1632
|
+
}
|
|
1633
|
+
function Lt(e, t) {
|
|
1634
|
+
if (t === null) return null;
|
|
1635
|
+
let n, r, i;
|
|
1636
|
+
if (!e || !e.length) return n = /* @__PURE__ */ new Date(0), n.setUTCFullYear(t), n;
|
|
1637
|
+
let a = Z.MM.exec(e);
|
|
1638
|
+
if (a) return n = /* @__PURE__ */ new Date(0), r = parseInt(a[1], 10) - 1, Ut(t, r) ? (n.setUTCFullYear(t, r), n) : /* @__PURE__ */ new Date(NaN);
|
|
1639
|
+
if (a = Z.DDD.exec(e), a) {
|
|
1640
|
+
n = /* @__PURE__ */ new Date(0);
|
|
1641
|
+
let e = parseInt(a[1], 10);
|
|
1642
|
+
return Wt(t, e) ? (n.setUTCFullYear(t, 0, e), n) : /* @__PURE__ */ new Date(NaN);
|
|
1643
|
+
}
|
|
1644
|
+
if (a = Z.MMDD.exec(e), a) {
|
|
1645
|
+
n = /* @__PURE__ */ new Date(0), r = parseInt(a[1], 10) - 1;
|
|
1646
|
+
let e = parseInt(a[2], 10);
|
|
1647
|
+
return Ut(t, r, e) ? (n.setUTCFullYear(t, r, e), n) : /* @__PURE__ */ new Date(NaN);
|
|
1648
|
+
}
|
|
1649
|
+
if (a = Z.Www.exec(e), a) return i = parseInt(a[1], 10) - 1, Gt(i) ? zt(t, i) : /* @__PURE__ */ new Date(NaN);
|
|
1650
|
+
if (a = Z.WwwD.exec(e), a) {
|
|
1651
|
+
i = parseInt(a[1], 10) - 1;
|
|
1652
|
+
let e = parseInt(a[2], 10) - 1;
|
|
1653
|
+
return Gt(i, e) ? zt(t, i, e) : /* @__PURE__ */ new Date(NaN);
|
|
1654
|
+
}
|
|
1655
|
+
return null;
|
|
1656
|
+
}
|
|
1657
|
+
function Rt(e) {
|
|
1658
|
+
let t, n, r = Z.HH.exec(e);
|
|
1659
|
+
if (r) return t = parseFloat(r[1].replace(",", ".")), Kt(t) ? t % 24 * jt : NaN;
|
|
1660
|
+
if (r = Z.HHMM.exec(e), r) return t = parseInt(r[1], 10), n = parseFloat(r[2].replace(",", ".")), Kt(t, n) ? t % 24 * jt + n * Mt : NaN;
|
|
1661
|
+
if (r = Z.HHMMSS.exec(e), r) {
|
|
1662
|
+
t = parseInt(r[1], 10), n = parseInt(r[2], 10);
|
|
1663
|
+
let e = parseFloat(r[3].replace(",", "."));
|
|
1664
|
+
return Kt(t, n, e) ? t % 24 * jt + n * Mt + e * 1e3 : NaN;
|
|
1665
|
+
}
|
|
1666
|
+
return null;
|
|
1667
|
+
}
|
|
1668
|
+
function zt(e, t, n) {
|
|
1669
|
+
t ||= 0, n ||= 0;
|
|
1670
|
+
let r = /* @__PURE__ */ new Date(0);
|
|
1671
|
+
r.setUTCFullYear(e, 0, 4);
|
|
1672
|
+
let i = r.getUTCDay() || 7, a = t * 7 + n + 1 - i;
|
|
1673
|
+
return r.setUTCDate(r.getUTCDate() + a), r;
|
|
1674
|
+
}
|
|
1675
|
+
var Bt = [
|
|
1676
|
+
31,
|
|
1677
|
+
28,
|
|
1678
|
+
31,
|
|
1679
|
+
30,
|
|
1680
|
+
31,
|
|
1681
|
+
30,
|
|
1682
|
+
31,
|
|
1683
|
+
31,
|
|
1684
|
+
30,
|
|
1685
|
+
31,
|
|
1686
|
+
30,
|
|
1687
|
+
31
|
|
1688
|
+
], Vt = [
|
|
1689
|
+
31,
|
|
1690
|
+
29,
|
|
1691
|
+
31,
|
|
1692
|
+
30,
|
|
1693
|
+
31,
|
|
1694
|
+
30,
|
|
1695
|
+
31,
|
|
1696
|
+
31,
|
|
1697
|
+
30,
|
|
1698
|
+
31,
|
|
1699
|
+
30,
|
|
1700
|
+
31
|
|
1701
|
+
];
|
|
1702
|
+
function Ht(e) {
|
|
1703
|
+
return e % 400 == 0 || e % 4 == 0 && e % 100 != 0;
|
|
1704
|
+
}
|
|
1705
|
+
function Ut(e, t, n) {
|
|
1706
|
+
if (t < 0 || t > 11) return !1;
|
|
1707
|
+
if (n != null) {
|
|
1708
|
+
if (n < 1) return !1;
|
|
1709
|
+
let r = Ht(e);
|
|
1710
|
+
if (r && n > Vt[t] || !r && n > Bt[t]) return !1;
|
|
1711
|
+
}
|
|
1712
|
+
return !0;
|
|
1713
|
+
}
|
|
1714
|
+
function Wt(e, t) {
|
|
1715
|
+
if (t < 1) return !1;
|
|
1716
|
+
let n = Ht(e);
|
|
1717
|
+
return !(n && t > 366 || !n && t > 365);
|
|
1718
|
+
}
|
|
1719
|
+
function Gt(e, t) {
|
|
1720
|
+
return !(e < 0 || e > 52 || t != null && (t < 0 || t > 6));
|
|
1721
|
+
}
|
|
1722
|
+
function Kt(e, t, n) {
|
|
1723
|
+
return !(e < 0 || e >= 25 || t != null && (t < 0 || t >= 60) || n != null && (n < 0 || n >= 60));
|
|
1724
|
+
}
|
|
1725
|
+
//#endregion
|
|
1726
|
+
//#region node_modules/date-fns-tz/dist/esm/format/index.js
|
|
1727
|
+
var qt = /([xXOz]+)|''|'(''|[^'])+('|$)/g;
|
|
1728
|
+
function Jt(e, t, n = {}) {
|
|
1729
|
+
t = String(t);
|
|
1730
|
+
let r = t.match(qt);
|
|
1731
|
+
if (r) {
|
|
1732
|
+
let i = Pt(n.originalDate || e, n);
|
|
1733
|
+
t = r.reduce(function(e, t) {
|
|
1734
|
+
if (t[0] === "'") return e;
|
|
1735
|
+
let r = e.indexOf(t), a = e[r - 1] === "'", o = e.replace(t, "'" + Tt[t[0]](i, t, n) + "'");
|
|
1736
|
+
return a ? o.substring(0, r - 1) + o.substring(r + 1) : o;
|
|
1737
|
+
}, t);
|
|
1738
|
+
}
|
|
1739
|
+
return K(e, t, n);
|
|
1740
|
+
}
|
|
1741
|
+
//#endregion
|
|
1742
|
+
//#region node_modules/date-fns-tz/dist/esm/toZonedTime/index.js
|
|
1743
|
+
function Yt(e, t, n) {
|
|
1744
|
+
e = Pt(e, n);
|
|
1745
|
+
let r = _t(t, e, !0), i = new Date(e.getTime() - r), a = /* @__PURE__ */ new Date(0);
|
|
1746
|
+
return a.setFullYear(i.getUTCFullYear(), i.getUTCMonth(), i.getUTCDate()), a.setHours(i.getUTCHours(), i.getUTCMinutes(), i.getUTCSeconds(), i.getUTCMilliseconds()), a;
|
|
1747
|
+
}
|
|
1748
|
+
//#endregion
|
|
1749
|
+
//#region node_modules/date-fns-tz/dist/esm/formatInTimeZone/index.js
|
|
1750
|
+
function Xt(e, t, n, r) {
|
|
1751
|
+
return r = {
|
|
1752
|
+
...r,
|
|
1753
|
+
timeZone: t,
|
|
1754
|
+
originalDate: e
|
|
1755
|
+
}, Jt(Yt(e, t, { timeZone: r.timeZone }), n, r);
|
|
1756
|
+
}
|
|
1757
|
+
//#endregion
|
|
1758
|
+
//#region src/utils/tz.ts
|
|
1759
|
+
var Q = (() => {
|
|
1760
|
+
try {
|
|
1761
|
+
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
1762
|
+
} catch {
|
|
1763
|
+
return "UTC";
|
|
1764
|
+
}
|
|
1765
|
+
})();
|
|
1766
|
+
function Zt(e) {
|
|
1767
|
+
try {
|
|
1768
|
+
if (e instanceof Date) return j(e) ? e : null;
|
|
1769
|
+
if (typeof e == "number") {
|
|
1770
|
+
let t = new Date(e);
|
|
1771
|
+
return j(t) ? t : null;
|
|
1772
|
+
}
|
|
1773
|
+
if (/^\d{4}-\d{2}-\d{2}$/.test(e)) {
|
|
1774
|
+
let t = Le(e);
|
|
1775
|
+
return j(t) ? t : null;
|
|
1776
|
+
}
|
|
1777
|
+
if (/^\d{4}-\d{2}-\d{2}T/.test(e)) {
|
|
1778
|
+
let t = Le(e);
|
|
1779
|
+
return j(t) ? t : null;
|
|
1780
|
+
}
|
|
1781
|
+
if (/^\d{2}\/\d{2}\/\d{4}$/.test(e)) {
|
|
1782
|
+
let [t, n, r] = e.split("/"), i = /* @__PURE__ */ new Date(`${r}-${t}-${n}`);
|
|
1783
|
+
return j(i) ? i : null;
|
|
1784
|
+
}
|
|
1785
|
+
if (/^\d{2}-\d{2}-\d{4}$/.test(e)) {
|
|
1786
|
+
let [t, n, r] = e.split("-"), i = /* @__PURE__ */ new Date(`${r}-${n}-${t}`);
|
|
1787
|
+
return j(i) ? i : null;
|
|
1788
|
+
}
|
|
1789
|
+
let t = new Date(e);
|
|
1790
|
+
return j(t) ? t : null;
|
|
1791
|
+
} catch {
|
|
1792
|
+
return null;
|
|
1793
|
+
}
|
|
1794
|
+
}
|
|
1795
|
+
function Qt(e, t = Q) {
|
|
1796
|
+
let n = Zt(e);
|
|
1797
|
+
if (!n) return null;
|
|
1798
|
+
try {
|
|
1799
|
+
return K(Yt(n, t), "yyyy-MM-dd");
|
|
1800
|
+
} catch {
|
|
1801
|
+
return j(n) ? K(n, "yyyy-MM-dd") : null;
|
|
1802
|
+
}
|
|
1803
|
+
}
|
|
1804
|
+
function $t(e, t, n) {
|
|
1805
|
+
let r = Zt(e);
|
|
1806
|
+
if (!r) return null;
|
|
1807
|
+
try {
|
|
1808
|
+
return Xt(r, t, n);
|
|
1809
|
+
} catch {
|
|
1810
|
+
return null;
|
|
1811
|
+
}
|
|
1812
|
+
}
|
|
1813
|
+
function en(e, t = /* @__PURE__ */ new Date()) {
|
|
1814
|
+
try {
|
|
1815
|
+
let n = Xt(t, e, "xxx"), r = n[0] === "-" ? "−" : "+", [i, a] = n.slice(1).split(":"), o = parseInt(i, 10), s = parseInt(a, 10), c = s === 0 ? `UTC${r}${o}` : `UTC${r}${o}:${a}`;
|
|
1816
|
+
return e === "UTC" || e.startsWith("UTC+") || e.startsWith("UTC-") || o === 0 && s === 0 ? "" : c;
|
|
1817
|
+
} catch {
|
|
1818
|
+
return "";
|
|
1819
|
+
}
|
|
1820
|
+
}
|
|
1821
|
+
function $(e, t) {
|
|
1822
|
+
return e ?? t ?? Q;
|
|
1823
|
+
}
|
|
1824
|
+
//#endregion
|
|
1825
|
+
//#region src/utils/index.ts
|
|
1826
|
+
function tn(e) {
|
|
1827
|
+
if (!e || typeof e != "object") return !1;
|
|
1828
|
+
let t = e;
|
|
1829
|
+
return !(typeof t.id != "string" || t.id.trim() === "" || !(typeof t.date == "string" || t.date instanceof Date || typeof t.date == "number") || typeof t.label != "string" || t.color !== void 0 && typeof t.color != "string" || t.data !== void 0 && (typeof t.data != "object" || Array.isArray(t.data)) || t.priority !== void 0 && typeof t.priority != "number" || t.onClick !== void 0 && typeof t.onClick != "function");
|
|
1830
|
+
}
|
|
1831
|
+
function nn(e) {
|
|
1832
|
+
let t = [], n = [];
|
|
1833
|
+
for (let r of e) tn(r) ? t.push(r) : n.push(r);
|
|
1834
|
+
return {
|
|
1835
|
+
valid: t,
|
|
1836
|
+
invalid: n
|
|
1837
|
+
};
|
|
1838
|
+
}
|
|
1839
|
+
var rn = [
|
|
1840
|
+
"Sun",
|
|
1841
|
+
"Mon",
|
|
1842
|
+
"Tue",
|
|
1843
|
+
"Wed",
|
|
1844
|
+
"Thu",
|
|
1845
|
+
"Fri",
|
|
1846
|
+
"Sat"
|
|
1847
|
+
], an = [
|
|
1848
|
+
"January",
|
|
1849
|
+
"February",
|
|
1850
|
+
"March",
|
|
1851
|
+
"April",
|
|
1852
|
+
"May",
|
|
1853
|
+
"June",
|
|
1854
|
+
"July",
|
|
1855
|
+
"August",
|
|
1856
|
+
"September",
|
|
1857
|
+
"October",
|
|
1858
|
+
"November",
|
|
1859
|
+
"December"
|
|
1860
|
+
];
|
|
1861
|
+
function on(e) {
|
|
1862
|
+
try {
|
|
1863
|
+
let t = document.createElement("canvas");
|
|
1864
|
+
t.width = t.height = 1;
|
|
1865
|
+
let n = t.getContext("2d");
|
|
1866
|
+
if (!n) return "#ffffff";
|
|
1867
|
+
n.fillStyle = e, n.fillRect(0, 0, 1, 1);
|
|
1868
|
+
let [r, i, a] = n.getImageData(0, 0, 1, 1).data;
|
|
1869
|
+
return (.299 * r + .587 * i + .114 * a) / 255 > .55 ? "#1a1a1a" : "#ffffff";
|
|
1870
|
+
} catch {
|
|
1871
|
+
return "#ffffff";
|
|
1872
|
+
}
|
|
1873
|
+
}
|
|
1874
|
+
function sn(e) {
|
|
1875
|
+
try {
|
|
1876
|
+
return (/* @__PURE__ */ new Date(e + "T00:00:00")).toLocaleDateString(void 0, {
|
|
1877
|
+
weekday: "short",
|
|
1878
|
+
month: "short",
|
|
1879
|
+
day: "numeric"
|
|
1880
|
+
});
|
|
1881
|
+
} catch {
|
|
1882
|
+
return e;
|
|
1883
|
+
}
|
|
1884
|
+
}
|
|
1885
|
+
//#endregion
|
|
1886
|
+
//#region src/components/MiniCalendar.tsx
|
|
1887
|
+
function cn({ currentMonth: e, currentYear: n, onSelect: c, onClose: l, anchorRef: u }) {
|
|
1888
|
+
let [d, f] = i(String(e + 1).padStart(2, "0")), [p, m] = i(String(n)), [h, g] = i(e), [_, v] = i(n), y = r(null), b = r(null), x = r(null), S = Array.from({ length: 101 }, (e, t) => n - 50 + t);
|
|
1889
|
+
t(() => {
|
|
1890
|
+
y.current && y.current.querySelector(".selected")?.scrollIntoView({ block: "center" }), b.current && b.current.querySelector(".selected")?.scrollIntoView({ block: "center" });
|
|
1891
|
+
}, []), t(() => {
|
|
1892
|
+
let e = (e) => {
|
|
1893
|
+
x.current && !x.current.contains(e.target) && u.current && !u.current.contains(e.target) && l();
|
|
1894
|
+
};
|
|
1895
|
+
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
1896
|
+
}, [l, u]);
|
|
1897
|
+
let C = (e) => {
|
|
1898
|
+
f(e);
|
|
1899
|
+
let t = parseInt(e, 10);
|
|
1900
|
+
!isNaN(t) && t >= 1 && t <= 12 && g(t - 1);
|
|
1901
|
+
}, w = (e) => {
|
|
1902
|
+
m(e);
|
|
1903
|
+
let t = parseInt(e, 10);
|
|
1904
|
+
!isNaN(t) && e.length >= 4 && (v(S.includes(t) ? t : n), v(t));
|
|
1905
|
+
}, T = (e) => {
|
|
1906
|
+
g(e), f(String(e + 1).padStart(2, "0"));
|
|
1907
|
+
}, E = (e) => {
|
|
1908
|
+
v(e), m(String(e));
|
|
1909
|
+
};
|
|
1910
|
+
return /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ o("div", { className: "mini-cal-overlay" }), /* @__PURE__ */ s("div", {
|
|
1911
|
+
className: "mini-cal-popup",
|
|
1912
|
+
ref: x,
|
|
1913
|
+
children: [
|
|
1914
|
+
/* @__PURE__ */ s("div", {
|
|
1915
|
+
className: "mini-cal-inputs",
|
|
1916
|
+
children: [/* @__PURE__ */ s("div", {
|
|
1917
|
+
className: "mini-cal-input-group",
|
|
1918
|
+
children: [/* @__PURE__ */ o("label", { children: "Month (1–12)" }), /* @__PURE__ */ o("input", {
|
|
1919
|
+
type: "number",
|
|
1920
|
+
min: 1,
|
|
1921
|
+
max: 12,
|
|
1922
|
+
value: d,
|
|
1923
|
+
onChange: (e) => C(e.target.value)
|
|
1924
|
+
})]
|
|
1925
|
+
}), /* @__PURE__ */ s("div", {
|
|
1926
|
+
className: "mini-cal-input-group",
|
|
1927
|
+
children: [/* @__PURE__ */ o("label", { children: "Year (any)" }), /* @__PURE__ */ o("input", {
|
|
1928
|
+
type: "number",
|
|
1929
|
+
value: p,
|
|
1930
|
+
onChange: (e) => w(e.target.value)
|
|
1931
|
+
})]
|
|
1932
|
+
})]
|
|
1933
|
+
}),
|
|
1934
|
+
/* @__PURE__ */ o("div", {
|
|
1935
|
+
className: "mini-cal-divider",
|
|
1936
|
+
children: "Scroll"
|
|
1937
|
+
}),
|
|
1938
|
+
/* @__PURE__ */ s("div", {
|
|
1939
|
+
className: "mini-cal-scrollers",
|
|
1940
|
+
children: [/* @__PURE__ */ s("div", {
|
|
1941
|
+
className: "mini-cal-scroll-col",
|
|
1942
|
+
children: [/* @__PURE__ */ o("h4", { children: "Month" }), /* @__PURE__ */ o("div", {
|
|
1943
|
+
className: "mini-cal-scroll-list",
|
|
1944
|
+
ref: y,
|
|
1945
|
+
children: an.map((e, t) => /* @__PURE__ */ o("div", {
|
|
1946
|
+
className: `mini-cal-scroll-item${h === t ? " selected" : ""}`,
|
|
1947
|
+
onClick: () => T(t),
|
|
1948
|
+
children: e
|
|
1949
|
+
}, e))
|
|
1950
|
+
})]
|
|
1951
|
+
}), /* @__PURE__ */ s("div", {
|
|
1952
|
+
className: "mini-cal-scroll-col",
|
|
1953
|
+
children: [/* @__PURE__ */ o("h4", { children: "Year" }), /* @__PURE__ */ o("div", {
|
|
1954
|
+
className: "mini-cal-scroll-list",
|
|
1955
|
+
ref: b,
|
|
1956
|
+
children: S.map((e) => /* @__PURE__ */ o("div", {
|
|
1957
|
+
className: `mini-cal-scroll-item${_ === e ? " selected" : ""}`,
|
|
1958
|
+
onClick: () => E(e),
|
|
1959
|
+
children: e
|
|
1960
|
+
}, e))
|
|
1961
|
+
})]
|
|
1962
|
+
})]
|
|
1963
|
+
}),
|
|
1964
|
+
/* @__PURE__ */ s("button", {
|
|
1965
|
+
className: "mini-cal-go",
|
|
1966
|
+
onClick: () => {
|
|
1967
|
+
let e = parseInt(p, 10);
|
|
1968
|
+
c(h, isNaN(e) ? _ : e), l();
|
|
1969
|
+
},
|
|
1970
|
+
children: [
|
|
1971
|
+
"Go to ",
|
|
1972
|
+
an[h].slice(0, 3),
|
|
1973
|
+
" ",
|
|
1974
|
+
parseInt(p, 10) || _
|
|
1975
|
+
]
|
|
1976
|
+
})
|
|
1977
|
+
]
|
|
1978
|
+
})] });
|
|
1979
|
+
}
|
|
1980
|
+
//#endregion
|
|
1981
|
+
//#region src/components/DefaultDetail.tsx
|
|
1982
|
+
function ln({ event: e, onEventClick: t, calendarTimezone: n, eventActionLabel: r = "Open event" }) {
|
|
1983
|
+
let i = e.color ?? "#6366f1", a = $(e.timezone, n), c = a !== Q || e.timezone, l = c ? en(a) : null, u = typeof e.date == "string" && e.date.includes("T") ? $t(e.date, a, "MMM d, yyyy · h:mm a") : null;
|
|
1984
|
+
return /* @__PURE__ */ s("div", {
|
|
1985
|
+
className: "wc-od-detail",
|
|
1986
|
+
children: [/* @__PURE__ */ o("div", {
|
|
1987
|
+
className: "wc-od-detail-accent",
|
|
1988
|
+
style: { background: i }
|
|
1989
|
+
}), /* @__PURE__ */ s("div", {
|
|
1990
|
+
className: "wc-od-detail-body",
|
|
1991
|
+
children: [
|
|
1992
|
+
/* @__PURE__ */ s("div", {
|
|
1993
|
+
className: "wc-od-detail-title-row",
|
|
1994
|
+
children: [/* @__PURE__ */ o("span", {
|
|
1995
|
+
className: "wc-od-detail-dot",
|
|
1996
|
+
style: { background: i }
|
|
1997
|
+
}), /* @__PURE__ */ o("h3", {
|
|
1998
|
+
className: "wc-od-detail-title",
|
|
1999
|
+
children: e.label
|
|
2000
|
+
})]
|
|
2001
|
+
}),
|
|
2002
|
+
c && /* @__PURE__ */ s("div", {
|
|
2003
|
+
className: "wc-od-tz-badge",
|
|
2004
|
+
children: [/* @__PURE__ */ o("span", {
|
|
2005
|
+
className: "wc-od-tz-name",
|
|
2006
|
+
children: a
|
|
2007
|
+
}), l && /* @__PURE__ */ o("span", {
|
|
2008
|
+
className: "wc-od-tz-offset",
|
|
2009
|
+
children: l
|
|
2010
|
+
})]
|
|
2011
|
+
}),
|
|
2012
|
+
u && /* @__PURE__ */ o("div", {
|
|
2013
|
+
className: "wc-od-time",
|
|
2014
|
+
children: u
|
|
2015
|
+
}),
|
|
2016
|
+
e.data && Object.keys(e.data).length > 0 ? /* @__PURE__ */ o("dl", {
|
|
2017
|
+
className: "wc-od-detail-data",
|
|
2018
|
+
children: Object.entries(e.data).map(([e, t]) => /* @__PURE__ */ s("div", {
|
|
2019
|
+
className: "wc-od-detail-row",
|
|
2020
|
+
children: [/* @__PURE__ */ o("dt", {
|
|
2021
|
+
className: "wc-od-detail-key",
|
|
2022
|
+
children: e
|
|
2023
|
+
}), /* @__PURE__ */ o("dd", {
|
|
2024
|
+
className: "wc-od-detail-val",
|
|
2025
|
+
children: typeof t == "object" ? JSON.stringify(t) : String(t)
|
|
2026
|
+
})]
|
|
2027
|
+
}, e))
|
|
2028
|
+
}) : /* @__PURE__ */ o("p", {
|
|
2029
|
+
className: "wc-od-detail-empty",
|
|
2030
|
+
children: "No additional details"
|
|
2031
|
+
}),
|
|
2032
|
+
t && /* @__PURE__ */ o("button", {
|
|
2033
|
+
className: "wc-od-detail-action",
|
|
2034
|
+
style: {
|
|
2035
|
+
borderColor: i,
|
|
2036
|
+
color: i
|
|
2037
|
+
},
|
|
2038
|
+
onClick: () => t(e),
|
|
2039
|
+
children: r
|
|
2040
|
+
})
|
|
2041
|
+
]
|
|
2042
|
+
})]
|
|
2043
|
+
});
|
|
2044
|
+
}
|
|
2045
|
+
//#endregion
|
|
2046
|
+
//#region src/components/OverflowDialog.tsx
|
|
2047
|
+
function un({ dateKey: e, events: n, anchorRef: c, onClose: l, onEventClick: u, renderTooltip: d, calendarTimezone: f, eventActionLabel: p }) {
|
|
2048
|
+
let [m, h] = i(n[0]?.id ?? ""), [g, _] = i({}), v = r(null), y = n.find((e) => e.id === m) ?? n[0];
|
|
2049
|
+
t(() => {
|
|
2050
|
+
if (!c.current || !v.current) return;
|
|
2051
|
+
let e = c.current.getBoundingClientRect(), t = v.current.getBoundingClientRect(), n = window.innerWidth, r = window.innerHeight, i = e.bottom + 8, a = e.left;
|
|
2052
|
+
i + t.height > r - 16 && (i = e.top - t.height - 8), a + t.width > n - 16 && (a = n - t.width - 16), a < 8 && (a = 8), _({
|
|
2053
|
+
top: i,
|
|
2054
|
+
left: a
|
|
2055
|
+
});
|
|
2056
|
+
}, [c]), t(() => {
|
|
2057
|
+
let e = (e) => {
|
|
2058
|
+
e.key === "Escape" && l();
|
|
2059
|
+
}, t = (e) => {
|
|
2060
|
+
v.current && !v.current.contains(e.target) && l();
|
|
2061
|
+
};
|
|
2062
|
+
return document.addEventListener("keydown", e), document.addEventListener("mousedown", t), () => {
|
|
2063
|
+
document.removeEventListener("keydown", e), document.removeEventListener("mousedown", t);
|
|
2064
|
+
};
|
|
2065
|
+
}, [l]);
|
|
2066
|
+
let b = (e) => {
|
|
2067
|
+
h(e.id);
|
|
2068
|
+
};
|
|
2069
|
+
return /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ o("div", {
|
|
2070
|
+
className: "wc-od-backdrop",
|
|
2071
|
+
onClick: l
|
|
2072
|
+
}), /* @__PURE__ */ s("div", {
|
|
2073
|
+
ref: v,
|
|
2074
|
+
className: "wc-od-book",
|
|
2075
|
+
style: g,
|
|
2076
|
+
role: "dialog",
|
|
2077
|
+
"aria-modal": "true",
|
|
2078
|
+
"aria-label": `Events for ${e}`,
|
|
2079
|
+
children: [
|
|
2080
|
+
/* @__PURE__ */ s("div", {
|
|
2081
|
+
className: "wc-od-spine",
|
|
2082
|
+
children: [/* @__PURE__ */ s("div", {
|
|
2083
|
+
className: "wc-od-spine-header",
|
|
2084
|
+
children: [/* @__PURE__ */ o("span", {
|
|
2085
|
+
className: "wc-od-date-label",
|
|
2086
|
+
children: sn(e)
|
|
2087
|
+
}), /* @__PURE__ */ s("span", {
|
|
2088
|
+
className: "wc-od-count",
|
|
2089
|
+
children: [n.length, " events"]
|
|
2090
|
+
})]
|
|
2091
|
+
}), /* @__PURE__ */ o("ul", {
|
|
2092
|
+
className: "wc-od-list",
|
|
2093
|
+
role: "listbox",
|
|
2094
|
+
"aria-label": "Event list",
|
|
2095
|
+
children: n.map((e) => {
|
|
2096
|
+
let t = e.color ?? "#6366f1", n = e.id === m;
|
|
2097
|
+
return /* @__PURE__ */ s("li", {
|
|
2098
|
+
role: "option",
|
|
2099
|
+
"aria-selected": n,
|
|
2100
|
+
className: `wc-od-list-item${n ? " active" : ""}`,
|
|
2101
|
+
onMouseEnter: () => b(e),
|
|
2102
|
+
children: [
|
|
2103
|
+
/* @__PURE__ */ o("span", {
|
|
2104
|
+
className: "wc-od-bullet",
|
|
2105
|
+
style: { background: t }
|
|
2106
|
+
}),
|
|
2107
|
+
/* @__PURE__ */ o("span", {
|
|
2108
|
+
className: "wc-od-item-label",
|
|
2109
|
+
children: e.label
|
|
2110
|
+
}),
|
|
2111
|
+
n && /* @__PURE__ */ o("span", {
|
|
2112
|
+
className: "wc-od-item-arrow",
|
|
2113
|
+
"aria-hidden": "true",
|
|
2114
|
+
children: "›"
|
|
2115
|
+
})
|
|
2116
|
+
]
|
|
2117
|
+
}, e.id);
|
|
2118
|
+
})
|
|
2119
|
+
})]
|
|
2120
|
+
}),
|
|
2121
|
+
/* @__PURE__ */ o("div", {
|
|
2122
|
+
className: "wc-od-crease",
|
|
2123
|
+
"aria-hidden": "true"
|
|
2124
|
+
}),
|
|
2125
|
+
/* @__PURE__ */ o("div", {
|
|
2126
|
+
className: "wc-od-page",
|
|
2127
|
+
children: y ? d ? /* @__PURE__ */ o("div", {
|
|
2128
|
+
className: "wc-od-custom-detail",
|
|
2129
|
+
children: d(y)
|
|
2130
|
+
}) : /* @__PURE__ */ o(ln, {
|
|
2131
|
+
event: y,
|
|
2132
|
+
onEventClick: u,
|
|
2133
|
+
calendarTimezone: f,
|
|
2134
|
+
eventActionLabel: p
|
|
2135
|
+
}) : /* @__PURE__ */ o("div", {
|
|
2136
|
+
className: "wc-od-empty",
|
|
2137
|
+
children: "No event selected"
|
|
2138
|
+
})
|
|
2139
|
+
}, y?.id),
|
|
2140
|
+
/* @__PURE__ */ o("button", {
|
|
2141
|
+
className: "wc-od-close",
|
|
2142
|
+
onClick: l,
|
|
2143
|
+
"aria-label": "Close dialog",
|
|
2144
|
+
children: "×"
|
|
2145
|
+
})
|
|
2146
|
+
]
|
|
2147
|
+
})] });
|
|
2148
|
+
}
|
|
2149
|
+
//#endregion
|
|
2150
|
+
//#region src/components/EventPill.tsx
|
|
2151
|
+
function dn({ event: a, trackIndex: c, dateKey: l, renderEvent: u, renderTooltip: d, onEventClick: f, calendarTimezone: p }) {
|
|
2152
|
+
let [m, h] = i(!1), [g, _] = i({}), v = r(null), y = r(null), b = a.color ?? "#6366f1", x = n(() => on(b), [b]), S = e(() => h(!0), []), C = e(() => h(!1), []);
|
|
2153
|
+
t(() => {
|
|
2154
|
+
if (!m || !v.current || !y.current) return;
|
|
2155
|
+
let e = v.current.getBoundingClientRect(), t = y.current.offsetHeight, n = y.current.offsetWidth, r = window.innerWidth, i = window.innerHeight - e.bottom < t + 12 ? e.top - t - 6 : e.bottom + 6, a = e.left;
|
|
2156
|
+
a + n > r - 12 && (a = r - n - 12), a < 8 && (a = 8), _({
|
|
2157
|
+
position: "fixed",
|
|
2158
|
+
top: i,
|
|
2159
|
+
left: a,
|
|
2160
|
+
zIndex: 9999
|
|
2161
|
+
});
|
|
2162
|
+
}, [m]);
|
|
2163
|
+
let w = u ? u(a, {
|
|
2164
|
+
dateKey: l,
|
|
2165
|
+
trackIndex: c,
|
|
2166
|
+
tooltipOpen: m
|
|
2167
|
+
}) : /* @__PURE__ */ o("div", {
|
|
2168
|
+
className: "wc-event-pill",
|
|
2169
|
+
style: {
|
|
2170
|
+
background: b,
|
|
2171
|
+
color: x
|
|
2172
|
+
},
|
|
2173
|
+
children: /* @__PURE__ */ o("span", {
|
|
2174
|
+
className: "wc-event-label",
|
|
2175
|
+
children: a.label
|
|
2176
|
+
})
|
|
2177
|
+
}), T = d ? d(a) : /* @__PURE__ */ o(fn, {
|
|
2178
|
+
event: a,
|
|
2179
|
+
calendarTimezone: p
|
|
2180
|
+
});
|
|
2181
|
+
return /* @__PURE__ */ s("div", {
|
|
2182
|
+
ref: v,
|
|
2183
|
+
className: "wc-event-track",
|
|
2184
|
+
onMouseEnter: S,
|
|
2185
|
+
onMouseLeave: C,
|
|
2186
|
+
onClick: e((e) => {
|
|
2187
|
+
e.stopPropagation(), f?.(a), a.onClick?.(a);
|
|
2188
|
+
}, [a, f]),
|
|
2189
|
+
children: [w, m && /* @__PURE__ */ o("div", {
|
|
2190
|
+
ref: y,
|
|
2191
|
+
className: "wc-tooltip",
|
|
2192
|
+
style: g,
|
|
2193
|
+
role: "tooltip",
|
|
2194
|
+
children: T
|
|
2195
|
+
})]
|
|
2196
|
+
});
|
|
2197
|
+
}
|
|
2198
|
+
function fn({ event: e, calendarTimezone: t }) {
|
|
2199
|
+
let n = e.color ?? "#6366f1", r = $(e.timezone, t), i = r !== Q || e.timezone, a = i ? en(r) : null, c = typeof e.date == "string" && e.date.includes("T") ? $t(e.date, r, "MMM d, yyyy · h:mm a") : null;
|
|
2200
|
+
return /* @__PURE__ */ s("div", {
|
|
2201
|
+
className: "wc-tooltip-inner",
|
|
2202
|
+
children: [
|
|
2203
|
+
/* @__PURE__ */ s("div", {
|
|
2204
|
+
className: "wc-tooltip-header",
|
|
2205
|
+
children: [/* @__PURE__ */ o("span", {
|
|
2206
|
+
className: "wc-tooltip-dot",
|
|
2207
|
+
style: { background: n }
|
|
2208
|
+
}), /* @__PURE__ */ o("span", {
|
|
2209
|
+
className: "wc-tooltip-title",
|
|
2210
|
+
children: e.label
|
|
2211
|
+
})]
|
|
2212
|
+
}),
|
|
2213
|
+
i && /* @__PURE__ */ s("div", {
|
|
2214
|
+
className: "wc-tooltip-tz",
|
|
2215
|
+
children: [/* @__PURE__ */ o("span", {
|
|
2216
|
+
className: "wc-tooltip-tz-name",
|
|
2217
|
+
title: r,
|
|
2218
|
+
children: r
|
|
2219
|
+
}), a && /* @__PURE__ */ o("span", {
|
|
2220
|
+
className: "wc-tooltip-tz-offset",
|
|
2221
|
+
children: a
|
|
2222
|
+
})]
|
|
2223
|
+
}),
|
|
2224
|
+
c && /* @__PURE__ */ o("div", {
|
|
2225
|
+
className: "wc-tooltip-time",
|
|
2226
|
+
children: c
|
|
2227
|
+
}),
|
|
2228
|
+
e.data && Object.keys(e.data).length > 0 && /* @__PURE__ */ o("dl", {
|
|
2229
|
+
className: "wc-tooltip-data",
|
|
2230
|
+
children: Object.entries(e.data).map(([e, t]) => /* @__PURE__ */ s("div", {
|
|
2231
|
+
className: "wc-tooltip-row",
|
|
2232
|
+
children: [/* @__PURE__ */ o("dt", {
|
|
2233
|
+
className: "wc-tooltip-key",
|
|
2234
|
+
children: e
|
|
2235
|
+
}), /* @__PURE__ */ o("dd", {
|
|
2236
|
+
className: "wc-tooltip-val",
|
|
2237
|
+
children: typeof t == "object" ? JSON.stringify(t) : String(t)
|
|
2238
|
+
})]
|
|
2239
|
+
}, e))
|
|
2240
|
+
})
|
|
2241
|
+
]
|
|
2242
|
+
});
|
|
2243
|
+
}
|
|
2244
|
+
//#endregion
|
|
2245
|
+
//#region src/components/LegendStrip.tsx
|
|
2246
|
+
function pn({ events: e }) {
|
|
2247
|
+
let t = n(() => {
|
|
2248
|
+
let t = /* @__PURE__ */ new Set(), n = [];
|
|
2249
|
+
for (let r of e) {
|
|
2250
|
+
let e = r.color ?? "#6366f1", i = `${e}::${r.label}`;
|
|
2251
|
+
t.has(i) || (t.add(i), n.push({
|
|
2252
|
+
color: e,
|
|
2253
|
+
label: r.label
|
|
2254
|
+
}));
|
|
2255
|
+
}
|
|
2256
|
+
return n;
|
|
2257
|
+
}, [e]);
|
|
2258
|
+
return t.length === 0 ? null : /* @__PURE__ */ o("div", {
|
|
2259
|
+
className: "wc-legend",
|
|
2260
|
+
children: t.map(({ color: e, label: t }) => /* @__PURE__ */ s("div", {
|
|
2261
|
+
className: "wc-legend-item",
|
|
2262
|
+
children: [/* @__PURE__ */ o("span", {
|
|
2263
|
+
className: "wc-legend-dot",
|
|
2264
|
+
style: { background: e }
|
|
2265
|
+
}), /* @__PURE__ */ o("span", {
|
|
2266
|
+
className: "wc-legend-label",
|
|
2267
|
+
children: t
|
|
2268
|
+
})]
|
|
2269
|
+
}, `${e}::${t}`))
|
|
2270
|
+
});
|
|
2271
|
+
}
|
|
2272
|
+
//#endregion
|
|
2273
|
+
//#region src/components/OverflowChip.tsx
|
|
2274
|
+
function mn({ dayKey: e, hiddenCount: t, allCellEvents: n, onOpen: i }) {
|
|
2275
|
+
let a = r(null);
|
|
2276
|
+
return /* @__PURE__ */ s("button", {
|
|
2277
|
+
ref: a,
|
|
2278
|
+
className: "wc-overflow-chip",
|
|
2279
|
+
onClick: (e) => {
|
|
2280
|
+
e.stopPropagation(), i(a);
|
|
2281
|
+
},
|
|
2282
|
+
"aria-label": `${t} more events`,
|
|
2283
|
+
children: [
|
|
2284
|
+
"+",
|
|
2285
|
+
t,
|
|
2286
|
+
" more"
|
|
2287
|
+
]
|
|
2288
|
+
});
|
|
2289
|
+
}
|
|
2290
|
+
//#endregion
|
|
2291
|
+
//#region src/components/WorkingCalendar.tsx
|
|
2292
|
+
function hn({ legend: t, disableDate: c, disabledDates: l = [], multiSelect: u = !1, onMultiSelectDates: d, onDateClick: f, events: p = [], renderEvent: m, renderTooltip: h, onEventClick: g, hideLegend: y = !1, calendarTimezone: b, multiSelectAddLabel: S = "Add", onMonthYearChange: C }) {
|
|
2293
|
+
let w = /* @__PURE__ */ new Date(), [T, E] = i(new Date(w.getFullYear(), w.getMonth(), 1)), [D, O] = i(!1), [k, ee] = i(/* @__PURE__ */ new Set()), A = r(null), j = e((e) => {
|
|
2294
|
+
E(e), C?.(e.getMonth() + 1, e.getFullYear());
|
|
2295
|
+
}, [C]), M = n(() => {
|
|
2296
|
+
let { valid: e, invalid: t } = nn(p);
|
|
2297
|
+
return t.length, e;
|
|
2298
|
+
}, [p]), ie = n(() => {
|
|
2299
|
+
let e = /* @__PURE__ */ new Map();
|
|
2300
|
+
for (let t of M) {
|
|
2301
|
+
let n = $(t.timezone, b), r = Qt(t.date, n);
|
|
2302
|
+
r && (e.has(r) || e.set(r, []), e.get(r).push(t));
|
|
2303
|
+
}
|
|
2304
|
+
for (let [t, n] of e) e.set(t, [...n].sort((e, t) => (t.priority ?? 0) - (e.priority ?? 0)));
|
|
2305
|
+
return e;
|
|
2306
|
+
}, [M]), N = n(() => {
|
|
2307
|
+
let e = [...l];
|
|
2308
|
+
c !== void 0 && e.push(c);
|
|
2309
|
+
let t = b ?? Q;
|
|
2310
|
+
return new Set(e.map((e) => Qt(e, t)).filter((e) => e !== null));
|
|
2311
|
+
}, [
|
|
2312
|
+
c,
|
|
2313
|
+
l,
|
|
2314
|
+
b
|
|
2315
|
+
]), P = re(T), F = te(T), oe = ne({
|
|
2316
|
+
start: x(P, { weekStartsOn: 0 }),
|
|
2317
|
+
end: ae(F, { weekStartsOn: 0 })
|
|
2318
|
+
}), I = [];
|
|
2319
|
+
for (let e = 0; e < oe.length; e += 7) I.push(oe.slice(e, e + 7));
|
|
2320
|
+
let se = () => j(_(T, -1)), L = () => j(_(T, 1)), ce = () => j(new Date(w.getFullYear(), w.getMonth(), 1)), R = (e, t) => j(new Date(t, e, 1)), le = (e) => e < P || e > F, ue = (e) => {
|
|
2321
|
+
let t = K(e, "yyyy-MM-dd");
|
|
2322
|
+
N.has(t) || ee((e) => {
|
|
2323
|
+
let n = new Set(e);
|
|
2324
|
+
return n.has(t) ? n.delete(t) : n.add(t), n;
|
|
2325
|
+
});
|
|
2326
|
+
}, de = () => {
|
|
2327
|
+
let e = Array.from(k).filter((e) => !N.has(e)).sort();
|
|
2328
|
+
d?.(e);
|
|
2329
|
+
}, fe = () => ee(/* @__PURE__ */ new Set()), [z, B] = i(null), V = n(() => {
|
|
2330
|
+
let e = K(P, "yyyy-MM-dd"), t = K(F, "yyyy-MM-dd");
|
|
2331
|
+
return M.filter((n) => {
|
|
2332
|
+
let r = $(n.timezone, b), i = Qt(n.date, r);
|
|
2333
|
+
return i ? i >= e && i <= t : !1;
|
|
2334
|
+
});
|
|
2335
|
+
}, [
|
|
2336
|
+
M,
|
|
2337
|
+
P,
|
|
2338
|
+
F,
|
|
2339
|
+
b
|
|
2340
|
+
]), pe = !y && V.length > 0;
|
|
2341
|
+
return /* @__PURE__ */ s("div", {
|
|
2342
|
+
className: "wc-wrapper",
|
|
2343
|
+
children: [
|
|
2344
|
+
/* @__PURE__ */ s("div", {
|
|
2345
|
+
className: "wc-header-bar",
|
|
2346
|
+
children: [
|
|
2347
|
+
/* @__PURE__ */ o("span", {
|
|
2348
|
+
className: "wc-title",
|
|
2349
|
+
children: t ?? ""
|
|
2350
|
+
}),
|
|
2351
|
+
/* @__PURE__ */ s("div", {
|
|
2352
|
+
className: "wc-nav",
|
|
2353
|
+
children: [
|
|
2354
|
+
/* @__PURE__ */ o("button", {
|
|
2355
|
+
className: "wc-nav-btn",
|
|
2356
|
+
onClick: se,
|
|
2357
|
+
"aria-label": "Previous month",
|
|
2358
|
+
children: "‹"
|
|
2359
|
+
}),
|
|
2360
|
+
/* @__PURE__ */ s("div", {
|
|
2361
|
+
style: { position: "relative" },
|
|
2362
|
+
children: [/* @__PURE__ */ s("button", {
|
|
2363
|
+
ref: A,
|
|
2364
|
+
className: `wc-month-btn${D ? " active" : ""}`,
|
|
2365
|
+
onClick: () => O((e) => !e),
|
|
2366
|
+
"aria-expanded": D,
|
|
2367
|
+
children: [K(T, "MMMM yyyy"), /* @__PURE__ */ o("svg", {
|
|
2368
|
+
width: "10",
|
|
2369
|
+
height: "6",
|
|
2370
|
+
viewBox: "0 0 10 6",
|
|
2371
|
+
fill: "none",
|
|
2372
|
+
children: /* @__PURE__ */ o("path", {
|
|
2373
|
+
d: "M1 1l4 4 4-4",
|
|
2374
|
+
stroke: "currentColor",
|
|
2375
|
+
strokeWidth: "1.5",
|
|
2376
|
+
strokeLinecap: "round",
|
|
2377
|
+
strokeLinejoin: "round"
|
|
2378
|
+
})
|
|
2379
|
+
})]
|
|
2380
|
+
}), D && /* @__PURE__ */ o(cn, {
|
|
2381
|
+
currentMonth: T.getMonth(),
|
|
2382
|
+
currentYear: T.getFullYear(),
|
|
2383
|
+
onSelect: R,
|
|
2384
|
+
onClose: () => O(!1),
|
|
2385
|
+
anchorRef: A
|
|
2386
|
+
})]
|
|
2387
|
+
}),
|
|
2388
|
+
/* @__PURE__ */ o("button", {
|
|
2389
|
+
className: "wc-nav-btn",
|
|
2390
|
+
onClick: L,
|
|
2391
|
+
"aria-label": "Next month",
|
|
2392
|
+
children: "›"
|
|
2393
|
+
})
|
|
2394
|
+
]
|
|
2395
|
+
}),
|
|
2396
|
+
/* @__PURE__ */ s("div", {
|
|
2397
|
+
className: "wc-header-actions",
|
|
2398
|
+
children: [/* @__PURE__ */ o("button", {
|
|
2399
|
+
className: "wc-today-btn",
|
|
2400
|
+
onClick: ce,
|
|
2401
|
+
children: "Today"
|
|
2402
|
+
}), u && /* @__PURE__ */ s(a, { children: [k.size > 0 && /* @__PURE__ */ s("button", {
|
|
2403
|
+
className: "wc-clear-btn",
|
|
2404
|
+
onClick: fe,
|
|
2405
|
+
children: [
|
|
2406
|
+
"Clear (",
|
|
2407
|
+
k.size,
|
|
2408
|
+
")"
|
|
2409
|
+
]
|
|
2410
|
+
}), /* @__PURE__ */ s("button", {
|
|
2411
|
+
className: "wc-header-add-btn",
|
|
2412
|
+
disabled: k.size === 0,
|
|
2413
|
+
onClick: de,
|
|
2414
|
+
children: [
|
|
2415
|
+
/* @__PURE__ */ o("span", {
|
|
2416
|
+
className: "wc-header-add-icon",
|
|
2417
|
+
children: "+"
|
|
2418
|
+
}),
|
|
2419
|
+
S,
|
|
2420
|
+
k.size > 0 && /* @__PURE__ */ o("span", {
|
|
2421
|
+
className: "wc-add-badge",
|
|
2422
|
+
children: k.size
|
|
2423
|
+
})
|
|
2424
|
+
]
|
|
2425
|
+
})] })]
|
|
2426
|
+
})
|
|
2427
|
+
]
|
|
2428
|
+
}),
|
|
2429
|
+
/* @__PURE__ */ s("div", {
|
|
2430
|
+
className: "wc-calendar",
|
|
2431
|
+
children: [/* @__PURE__ */ o("div", {
|
|
2432
|
+
className: "wc-day-headers",
|
|
2433
|
+
children: rn.map((e, t) => /* @__PURE__ */ s("div", {
|
|
2434
|
+
className: `wc-day-header${t === 0 || t === 6 ? " weekend" : ""}`,
|
|
2435
|
+
children: [/* @__PURE__ */ o("span", {
|
|
2436
|
+
className: "wc-day-full",
|
|
2437
|
+
children: e
|
|
2438
|
+
}), /* @__PURE__ */ o("span", {
|
|
2439
|
+
className: "wc-day-short",
|
|
2440
|
+
children: e.charAt(0)
|
|
2441
|
+
})]
|
|
2442
|
+
}, e))
|
|
2443
|
+
}), /* @__PURE__ */ o("div", {
|
|
2444
|
+
className: "wc-grid",
|
|
2445
|
+
children: I.map((e, t) => e.map((e) => {
|
|
2446
|
+
let n = le(e), r = v(e), i = Ie(e), a = t === I.length - 1, c = me(e), l = Pe(e) === 0, d = K(e, "yyyy-MM-dd"), p = !n && N.has(d), _ = u && k.has(d), y = n ? [] : ie.get(d) ?? [], x = y.length > 0, S = y.slice(0, 2), C = y.slice(2);
|
|
2447
|
+
return /* @__PURE__ */ s("div", {
|
|
2448
|
+
className: [
|
|
2449
|
+
"wc-cell",
|
|
2450
|
+
n ? "outside" : "",
|
|
2451
|
+
r && !n ? "weekend-cell" : "",
|
|
2452
|
+
i ? "today" : "",
|
|
2453
|
+
a ? "last-row" : "",
|
|
2454
|
+
p ? "disabled" : "",
|
|
2455
|
+
u && !n && !p ? "selectable" : "",
|
|
2456
|
+
_ ? "selected" : "",
|
|
2457
|
+
x ? "has-events" : ""
|
|
2458
|
+
].filter(Boolean).join(" "),
|
|
2459
|
+
onClick: () => {
|
|
2460
|
+
u && !n && !p && ue(e);
|
|
2461
|
+
},
|
|
2462
|
+
children: [
|
|
2463
|
+
/* @__PURE__ */ s("div", {
|
|
2464
|
+
className: "wc-cell-top",
|
|
2465
|
+
children: [
|
|
2466
|
+
/* @__PURE__ */ o("span", {
|
|
2467
|
+
className: "wc-day-num",
|
|
2468
|
+
children: K(e, "d")
|
|
2469
|
+
}),
|
|
2470
|
+
!u && !n && !p && f && /* @__PURE__ */ o("button", {
|
|
2471
|
+
className: `wc-add-btn${x ? " wc-edit-btn" : ""}`,
|
|
2472
|
+
"aria-label": x ? `Edit events on ${K(e, "PPP")}` : `Add event on ${K(e, "PPP")}`,
|
|
2473
|
+
onClick: (e) => {
|
|
2474
|
+
e.stopPropagation(), f(d);
|
|
2475
|
+
},
|
|
2476
|
+
children: x ? /* @__PURE__ */ o("svg", {
|
|
2477
|
+
width: "11",
|
|
2478
|
+
height: "11",
|
|
2479
|
+
viewBox: "0 0 12 12",
|
|
2480
|
+
fill: "none",
|
|
2481
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2482
|
+
children: /* @__PURE__ */ o("path", {
|
|
2483
|
+
d: "M8.5 1.5a1.414 1.414 0 0 1 2 2L3.5 10.5l-3 .5.5-3L8.5 1.5z",
|
|
2484
|
+
stroke: "currentColor",
|
|
2485
|
+
strokeWidth: "1.4",
|
|
2486
|
+
strokeLinecap: "round",
|
|
2487
|
+
strokeLinejoin: "round"
|
|
2488
|
+
})
|
|
2489
|
+
}) : "+"
|
|
2490
|
+
}),
|
|
2491
|
+
_ && /* @__PURE__ */ o("span", {
|
|
2492
|
+
className: "wc-check-tick",
|
|
2493
|
+
"aria-hidden": "true",
|
|
2494
|
+
children: "✓"
|
|
2495
|
+
})
|
|
2496
|
+
]
|
|
2497
|
+
}),
|
|
2498
|
+
S.length > 0 && /* @__PURE__ */ o("div", {
|
|
2499
|
+
className: "wc-events",
|
|
2500
|
+
children: S.map((e, t) => /* @__PURE__ */ o(dn, {
|
|
2501
|
+
event: e,
|
|
2502
|
+
trackIndex: t,
|
|
2503
|
+
dateKey: d,
|
|
2504
|
+
renderEvent: m,
|
|
2505
|
+
renderTooltip: h,
|
|
2506
|
+
onEventClick: g,
|
|
2507
|
+
calendarTimezone: b
|
|
2508
|
+
}, e.id))
|
|
2509
|
+
}),
|
|
2510
|
+
C.length > 0 && /* @__PURE__ */ o(mn, {
|
|
2511
|
+
dayKey: d,
|
|
2512
|
+
hiddenCount: C.length,
|
|
2513
|
+
allCellEvents: y,
|
|
2514
|
+
onOpen: (e) => B({
|
|
2515
|
+
dateKey: d,
|
|
2516
|
+
events: y,
|
|
2517
|
+
anchorRef: e
|
|
2518
|
+
})
|
|
2519
|
+
}),
|
|
2520
|
+
p && /* @__PURE__ */ o("span", {
|
|
2521
|
+
className: "wc-disabled-line",
|
|
2522
|
+
"aria-hidden": "true"
|
|
2523
|
+
}),
|
|
2524
|
+
l && !n && /* @__PURE__ */ s("span", {
|
|
2525
|
+
className: "wc-week-badge",
|
|
2526
|
+
children: ["W", c]
|
|
2527
|
+
})
|
|
2528
|
+
]
|
|
2529
|
+
}, e.toISOString());
|
|
2530
|
+
}))
|
|
2531
|
+
})]
|
|
2532
|
+
}),
|
|
2533
|
+
pe && /* @__PURE__ */ o(pn, { events: V }),
|
|
2534
|
+
z && /* @__PURE__ */ o(un, {
|
|
2535
|
+
dateKey: z.dateKey,
|
|
2536
|
+
events: z.events,
|
|
2537
|
+
anchorRef: z.anchorRef,
|
|
2538
|
+
onClose: () => B(null),
|
|
2539
|
+
onEventClick: g,
|
|
2540
|
+
renderTooltip: h,
|
|
2541
|
+
calendarTimezone: b
|
|
2542
|
+
})
|
|
2543
|
+
]
|
|
2544
|
+
});
|
|
2545
|
+
}
|
|
2546
|
+
//#endregion
|
|
2547
|
+
export { hn as WorkingCalendar, hn as default };
|
|
2548
|
+
|
|
2549
|
+
//# sourceMappingURL=index.esm.js.map
|