@situaction/traq-ui-ste 1.2.13 → 1.2.15
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/dist/X.es-BEJ-zMPl.mjs +146 -0
- package/dist/components/button/Button.js +36 -36
- package/dist/components/calendar/Calendar.js +210 -214
- package/dist/components/drag-and-drop/DragAndDrop.d.ts +31 -0
- package/dist/components/drag-and-drop/DragAndDrop.js +143 -0
- package/dist/components/icon/Icon.js +23729 -46405
- package/dist/components/icon-button/IconButton.js +27 -27
- package/dist/components/input/Input.js +49 -49
- package/dist/components/loading/Loading.d.ts +38 -0
- package/dist/components/loading/Loading.js +87 -0
- package/dist/components/menu/Menu.js +60 -63
- package/dist/components/panel/side-panel/SidePanel.js +18 -19
- package/dist/components/select/Select.js +67 -69
- package/dist/components/select-filter-input-tags/SelectFilterInputTags.js +8 -9
- package/dist/components/select-multi-items/SelectMultiItems.js +18 -18
- package/dist/components/tag/Tag.js +25 -25
- package/dist/components/theme/variables_dark.d.ts +11 -0
- package/dist/components/theme/variables_dark.js +12 -1
- package/dist/components/theme/variables_light.d.ts +11 -0
- package/dist/components/theme/variables_light.js +12 -1
- package/dist/components/toast/Toast.js +38 -38
- package/dist/main.d.ts +2 -0
- package/dist/main.js +29 -25
- package/dist/styles/Button.css +1 -1
- package/dist/styles/DragAndDrop.css +1 -0
- package/dist/styles/IconButton.css +1 -1
- package/dist/styles/Input.css +1 -1
- package/dist/styles/Loading.css +1 -0
- package/dist/styles/Tag.css +1 -1
- package/dist/styles/Toast.css +1 -1
- package/package.json +1 -1
- package/dist/X-Bd1VjKAF.mjs +0 -190
|
@@ -1,23 +1,21 @@
|
|
|
1
1
|
import { jsxs as E, jsx as g } from "react/jsx-runtime";
|
|
2
2
|
import { useState as O, useRef as I, useEffect as B } from "react";
|
|
3
3
|
import { IconButton as z } from "../icon-button/IconButton.js";
|
|
4
|
-
import { Button as
|
|
5
|
-
import '../../styles/Calendar.css';const Ne = "_calendar_1i5hy_6", je = "
|
|
4
|
+
import { Button as _e } from "../button/Button.js";
|
|
5
|
+
import '../../styles/Calendar.css';const Ne = "_calendar_1i5hy_6", je = "_dropDownCtn_1i5hy_18", Ee = "_calendarHeader_1i5hy_28", Fe = "_calendarWeekdays_1i5hy_38", Le = "_calendarGrid_1i5hy_39", $e = "_calendarDay_1i5hy_49", He = "_today_1i5hy_64", qe = "_selected_1i5hy_67", Ae = "_disabled_1i5hy_74", Je = "_inRange_1i5hy_81", Xe = "_dropdown_1i5hy_84", Re = "_yearList_1i5hy_96", Be = "_yearItem_1i5hy_103", M = {
|
|
6
6
|
calendar: Ne,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
yearItem: Ve,
|
|
20
|
-
loading: Qe
|
|
7
|
+
dropDownCtn: je,
|
|
8
|
+
calendarHeader: Ee,
|
|
9
|
+
calendarWeekdays: Fe,
|
|
10
|
+
calendarGrid: Le,
|
|
11
|
+
calendarDay: $e,
|
|
12
|
+
today: He,
|
|
13
|
+
selected: qe,
|
|
14
|
+
disabled: Ae,
|
|
15
|
+
inRange: Je,
|
|
16
|
+
dropdown: Xe,
|
|
17
|
+
yearList: Re,
|
|
18
|
+
yearItem: Be
|
|
21
19
|
};
|
|
22
20
|
function m(t) {
|
|
23
21
|
const e = Object.prototype.toString.call(t);
|
|
@@ -26,7 +24,7 @@ function m(t) {
|
|
|
26
24
|
function k(t, e) {
|
|
27
25
|
return t instanceof Date ? new t.constructor(e) : new Date(e);
|
|
28
26
|
}
|
|
29
|
-
function
|
|
27
|
+
function Ve(t, e) {
|
|
30
28
|
const n = m(t);
|
|
31
29
|
return isNaN(e) ? k(t, NaN) : (n.setDate(n.getDate() + e), n);
|
|
32
30
|
}
|
|
@@ -44,10 +42,10 @@ function ie(t, e) {
|
|
|
44
42
|
r
|
|
45
43
|
), n);
|
|
46
44
|
}
|
|
47
|
-
const se = 6048e5,
|
|
48
|
-
let
|
|
45
|
+
const se = 6048e5, Qe = 864e5;
|
|
46
|
+
let Ge = {};
|
|
49
47
|
function A() {
|
|
50
|
-
return
|
|
48
|
+
return Ge;
|
|
51
49
|
}
|
|
52
50
|
function N(t, e) {
|
|
53
51
|
var s, f, h, w;
|
|
@@ -83,44 +81,44 @@ function Z(t) {
|
|
|
83
81
|
);
|
|
84
82
|
return n.setUTCFullYear(e.getFullYear()), +t - +n;
|
|
85
83
|
}
|
|
86
|
-
function
|
|
84
|
+
function Ie(t, e) {
|
|
87
85
|
const n = q(t), r = q(e), a = +n - Z(n), i = +r - Z(r);
|
|
88
|
-
return Math.round((a - i) /
|
|
86
|
+
return Math.round((a - i) / Qe);
|
|
89
87
|
}
|
|
90
|
-
function
|
|
88
|
+
function ze(t) {
|
|
91
89
|
const e = oe(t), n = k(t, 0);
|
|
92
90
|
return n.setFullYear(e, 0, 4), n.setHours(0, 0, 0, 0), H(n);
|
|
93
91
|
}
|
|
94
|
-
function
|
|
92
|
+
function Y(t, e) {
|
|
95
93
|
const n = q(t), r = q(e);
|
|
96
94
|
return +n == +r;
|
|
97
95
|
}
|
|
98
|
-
function
|
|
96
|
+
function Ze(t) {
|
|
99
97
|
return t instanceof Date || typeof t == "object" && Object.prototype.toString.call(t) === "[object Date]";
|
|
100
98
|
}
|
|
101
|
-
function
|
|
102
|
-
if (!
|
|
99
|
+
function Ue(t) {
|
|
100
|
+
if (!Ze(t) && typeof t != "number")
|
|
103
101
|
return !1;
|
|
104
102
|
const e = m(t);
|
|
105
103
|
return !isNaN(Number(e));
|
|
106
104
|
}
|
|
107
|
-
function
|
|
105
|
+
function Ke(t) {
|
|
108
106
|
const e = m(t), n = e.getMonth();
|
|
109
107
|
return e.setFullYear(e.getFullYear(), n + 1, 0), e.setHours(23, 59, 59, 999), e;
|
|
110
108
|
}
|
|
111
|
-
function
|
|
109
|
+
function et(t) {
|
|
112
110
|
const e = m(t);
|
|
113
111
|
return e.setDate(1), e.setHours(0, 0, 0, 0), e;
|
|
114
112
|
}
|
|
115
|
-
function
|
|
113
|
+
function tt(t) {
|
|
116
114
|
const e = m(t), n = k(t, 0);
|
|
117
115
|
return n.setFullYear(e.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
|
|
118
116
|
}
|
|
119
|
-
function
|
|
117
|
+
function nt(t, e) {
|
|
120
118
|
const n = e == null ? void 0 : e.weekStartsOn, r = m(t), a = r.getDay(), i = (a < n ? -7 : 0) + 6 - (a - n);
|
|
121
119
|
return r.setDate(r.getDate() + i), r.setHours(23, 59, 59, 999), r;
|
|
122
120
|
}
|
|
123
|
-
const
|
|
121
|
+
const rt = {
|
|
124
122
|
lessThanXSeconds: {
|
|
125
123
|
one: "less than a second",
|
|
126
124
|
other: "less than {{count}} seconds"
|
|
@@ -182,53 +180,53 @@ const it = {
|
|
|
182
180
|
one: "almost 1 year",
|
|
183
181
|
other: "almost {{count}} years"
|
|
184
182
|
}
|
|
185
|
-
},
|
|
183
|
+
}, at = (t, e, n) => {
|
|
186
184
|
let r;
|
|
187
|
-
const a =
|
|
185
|
+
const a = rt[t];
|
|
188
186
|
return typeof a == "string" ? r = a : e === 1 ? r = a.one : r = a.other.replace("{{count}}", e.toString()), n != null && n.addSuffix ? n.comparison && n.comparison > 0 ? "in " + r : r + " ago" : r;
|
|
189
187
|
};
|
|
190
|
-
function
|
|
188
|
+
function _(t) {
|
|
191
189
|
return (e = {}) => {
|
|
192
190
|
const n = e.width ? String(e.width) : t.defaultWidth;
|
|
193
191
|
return t.formats[n] || t.formats[t.defaultWidth];
|
|
194
192
|
};
|
|
195
193
|
}
|
|
196
|
-
const
|
|
194
|
+
const it = {
|
|
197
195
|
full: "EEEE, MMMM do, y",
|
|
198
196
|
long: "MMMM do, y",
|
|
199
197
|
medium: "MMM d, y",
|
|
200
198
|
short: "MM/dd/yyyy"
|
|
201
|
-
},
|
|
199
|
+
}, st = {
|
|
202
200
|
full: "h:mm:ss a zzzz",
|
|
203
201
|
long: "h:mm:ss a z",
|
|
204
202
|
medium: "h:mm:ss a",
|
|
205
203
|
short: "h:mm a"
|
|
206
|
-
},
|
|
204
|
+
}, ot = {
|
|
207
205
|
full: "{{date}} 'at' {{time}}",
|
|
208
206
|
long: "{{date}} 'at' {{time}}",
|
|
209
207
|
medium: "{{date}}, {{time}}",
|
|
210
208
|
short: "{{date}}, {{time}}"
|
|
211
|
-
},
|
|
212
|
-
date:
|
|
213
|
-
formats:
|
|
209
|
+
}, ct = {
|
|
210
|
+
date: _({
|
|
211
|
+
formats: it,
|
|
214
212
|
defaultWidth: "full"
|
|
215
213
|
}),
|
|
216
|
-
time:
|
|
217
|
-
formats:
|
|
214
|
+
time: _({
|
|
215
|
+
formats: st,
|
|
218
216
|
defaultWidth: "full"
|
|
219
217
|
}),
|
|
220
|
-
dateTime:
|
|
221
|
-
formats:
|
|
218
|
+
dateTime: _({
|
|
219
|
+
formats: ot,
|
|
222
220
|
defaultWidth: "full"
|
|
223
221
|
})
|
|
224
|
-
},
|
|
222
|
+
}, ut = {
|
|
225
223
|
lastWeek: "'last' eeee 'at' p",
|
|
226
224
|
yesterday: "'yesterday at' p",
|
|
227
225
|
today: "'today at' p",
|
|
228
226
|
tomorrow: "'tomorrow at' p",
|
|
229
227
|
nextWeek: "eeee 'at' p",
|
|
230
228
|
other: "P"
|
|
231
|
-
},
|
|
229
|
+
}, dt = (t, e, n, r) => ut[t];
|
|
232
230
|
function p(t) {
|
|
233
231
|
return (e, n) => {
|
|
234
232
|
const r = n != null && n.context ? String(n.context) : "standalone";
|
|
@@ -244,15 +242,15 @@ function p(t) {
|
|
|
244
242
|
return a[i];
|
|
245
243
|
};
|
|
246
244
|
}
|
|
247
|
-
const
|
|
245
|
+
const lt = {
|
|
248
246
|
narrow: ["B", "A"],
|
|
249
247
|
abbreviated: ["BC", "AD"],
|
|
250
248
|
wide: ["Before Christ", "Anno Domini"]
|
|
251
|
-
},
|
|
249
|
+
}, mt = {
|
|
252
250
|
narrow: ["1", "2", "3", "4"],
|
|
253
251
|
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
254
252
|
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
255
|
-
},
|
|
253
|
+
}, ht = {
|
|
256
254
|
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
257
255
|
abbreviated: [
|
|
258
256
|
"Jan",
|
|
@@ -282,7 +280,7 @@ const ht = {
|
|
|
282
280
|
"November",
|
|
283
281
|
"December"
|
|
284
282
|
]
|
|
285
|
-
},
|
|
283
|
+
}, ft = {
|
|
286
284
|
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
287
285
|
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
288
286
|
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
@@ -295,7 +293,7 @@ const ht = {
|
|
|
295
293
|
"Friday",
|
|
296
294
|
"Saturday"
|
|
297
295
|
]
|
|
298
|
-
},
|
|
296
|
+
}, gt = {
|
|
299
297
|
narrow: {
|
|
300
298
|
am: "a",
|
|
301
299
|
pm: "p",
|
|
@@ -326,7 +324,7 @@ const ht = {
|
|
|
326
324
|
evening: "evening",
|
|
327
325
|
night: "night"
|
|
328
326
|
}
|
|
329
|
-
},
|
|
327
|
+
}, wt = {
|
|
330
328
|
narrow: {
|
|
331
329
|
am: "a",
|
|
332
330
|
pm: "p",
|
|
@@ -357,7 +355,7 @@ const ht = {
|
|
|
357
355
|
evening: "in the evening",
|
|
358
356
|
night: "at night"
|
|
359
357
|
}
|
|
360
|
-
},
|
|
358
|
+
}, yt = (t, e) => {
|
|
361
359
|
const n = Number(t), r = n % 100;
|
|
362
360
|
if (r > 20 || r < 10)
|
|
363
361
|
switch (r % 10) {
|
|
@@ -369,29 +367,29 @@ const ht = {
|
|
|
369
367
|
return n + "rd";
|
|
370
368
|
}
|
|
371
369
|
return n + "th";
|
|
372
|
-
},
|
|
373
|
-
ordinalNumber:
|
|
370
|
+
}, bt = {
|
|
371
|
+
ordinalNumber: yt,
|
|
374
372
|
era: p({
|
|
375
|
-
values:
|
|
373
|
+
values: lt,
|
|
376
374
|
defaultWidth: "wide"
|
|
377
375
|
}),
|
|
378
376
|
quarter: p({
|
|
379
|
-
values:
|
|
377
|
+
values: mt,
|
|
380
378
|
defaultWidth: "wide",
|
|
381
379
|
argumentCallback: (t) => t - 1
|
|
382
380
|
}),
|
|
383
381
|
month: p({
|
|
384
|
-
values:
|
|
382
|
+
values: ht,
|
|
385
383
|
defaultWidth: "wide"
|
|
386
384
|
}),
|
|
387
385
|
day: p({
|
|
388
|
-
values:
|
|
386
|
+
values: ft,
|
|
389
387
|
defaultWidth: "wide"
|
|
390
388
|
}),
|
|
391
389
|
dayPeriod: p({
|
|
392
|
-
values:
|
|
390
|
+
values: gt,
|
|
393
391
|
defaultWidth: "wide",
|
|
394
|
-
formattingValues:
|
|
392
|
+
formattingValues: wt,
|
|
395
393
|
defaultFormattingWidth: "wide"
|
|
396
394
|
})
|
|
397
395
|
};
|
|
@@ -400,9 +398,9 @@ function D(t) {
|
|
|
400
398
|
const r = n.width, a = r && t.matchPatterns[r] || t.matchPatterns[t.defaultMatchWidth], i = e.match(a);
|
|
401
399
|
if (!i)
|
|
402
400
|
return null;
|
|
403
|
-
const u = i[0], s = r && t.parsePatterns[r] || t.parsePatterns[t.defaultParseWidth], f = Array.isArray(s) ?
|
|
401
|
+
const u = i[0], s = r && t.parsePatterns[r] || t.parsePatterns[t.defaultParseWidth], f = Array.isArray(s) ? vt(s, (v) => v.test(u)) : (
|
|
404
402
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
|
|
405
|
-
|
|
403
|
+
Mt(s, (v) => v.test(u))
|
|
406
404
|
);
|
|
407
405
|
let h;
|
|
408
406
|
h = t.valueCallback ? t.valueCallback(f) : f, h = n.valueCallback ? (
|
|
@@ -413,12 +411,12 @@ function D(t) {
|
|
|
413
411
|
return { value: h, rest: w };
|
|
414
412
|
};
|
|
415
413
|
}
|
|
416
|
-
function
|
|
414
|
+
function Mt(t, e) {
|
|
417
415
|
for (const n in t)
|
|
418
416
|
if (Object.prototype.hasOwnProperty.call(t, n) && e(t[n]))
|
|
419
417
|
return n;
|
|
420
418
|
}
|
|
421
|
-
function
|
|
419
|
+
function vt(t, e) {
|
|
422
420
|
for (let n = 0; n < t.length; n++)
|
|
423
421
|
if (e(t[n]))
|
|
424
422
|
return n;
|
|
@@ -435,23 +433,23 @@ function ce(t) {
|
|
|
435
433
|
return { value: u, rest: s };
|
|
436
434
|
};
|
|
437
435
|
}
|
|
438
|
-
const
|
|
436
|
+
const Pt = /^(\d+)(th|st|nd|rd)?/i, pt = /\d+/i, Dt = {
|
|
439
437
|
narrow: /^(b|a)/i,
|
|
440
438
|
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
441
439
|
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
442
|
-
},
|
|
440
|
+
}, kt = {
|
|
443
441
|
any: [/^b/i, /^(a|c)/i]
|
|
444
|
-
},
|
|
442
|
+
}, Ot = {
|
|
445
443
|
narrow: /^[1234]/i,
|
|
446
444
|
abbreviated: /^q[1234]/i,
|
|
447
445
|
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
448
|
-
},
|
|
446
|
+
}, Wt = {
|
|
449
447
|
any: [/1/i, /2/i, /3/i, /4/i]
|
|
450
|
-
},
|
|
448
|
+
}, xt = {
|
|
451
449
|
narrow: /^[jfmasond]/i,
|
|
452
450
|
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
453
451
|
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
454
|
-
},
|
|
452
|
+
}, Tt = {
|
|
455
453
|
narrow: [
|
|
456
454
|
/^j/i,
|
|
457
455
|
/^f/i,
|
|
@@ -480,18 +478,18 @@ const Dt = /^(\d+)(th|st|nd|rd)?/i, kt = /\d+/i, Ot = {
|
|
|
480
478
|
/^n/i,
|
|
481
479
|
/^d/i
|
|
482
480
|
]
|
|
483
|
-
},
|
|
481
|
+
}, Yt = {
|
|
484
482
|
narrow: /^[smtwf]/i,
|
|
485
483
|
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
486
484
|
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
487
485
|
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
488
|
-
},
|
|
486
|
+
}, Ct = {
|
|
489
487
|
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
490
488
|
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
491
|
-
},
|
|
489
|
+
}, St = {
|
|
492
490
|
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
493
491
|
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
494
|
-
},
|
|
492
|
+
}, _t = {
|
|
495
493
|
any: {
|
|
496
494
|
am: /^a/i,
|
|
497
495
|
pm: /^p/i,
|
|
@@ -502,61 +500,61 @@ const Dt = /^(\d+)(th|st|nd|rd)?/i, kt = /\d+/i, Ot = {
|
|
|
502
500
|
evening: /evening/i,
|
|
503
501
|
night: /night/i
|
|
504
502
|
}
|
|
505
|
-
},
|
|
503
|
+
}, Nt = {
|
|
506
504
|
ordinalNumber: ce({
|
|
507
|
-
matchPattern:
|
|
508
|
-
parsePattern:
|
|
505
|
+
matchPattern: Pt,
|
|
506
|
+
parsePattern: pt,
|
|
509
507
|
valueCallback: (t) => parseInt(t, 10)
|
|
510
508
|
}),
|
|
511
509
|
era: D({
|
|
512
|
-
matchPatterns:
|
|
510
|
+
matchPatterns: Dt,
|
|
513
511
|
defaultMatchWidth: "wide",
|
|
514
|
-
parsePatterns:
|
|
512
|
+
parsePatterns: kt,
|
|
515
513
|
defaultParseWidth: "any"
|
|
516
514
|
}),
|
|
517
515
|
quarter: D({
|
|
518
|
-
matchPatterns:
|
|
516
|
+
matchPatterns: Ot,
|
|
519
517
|
defaultMatchWidth: "wide",
|
|
520
|
-
parsePatterns:
|
|
518
|
+
parsePatterns: Wt,
|
|
521
519
|
defaultParseWidth: "any",
|
|
522
520
|
valueCallback: (t) => t + 1
|
|
523
521
|
}),
|
|
524
522
|
month: D({
|
|
525
|
-
matchPatterns:
|
|
523
|
+
matchPatterns: xt,
|
|
526
524
|
defaultMatchWidth: "wide",
|
|
527
|
-
parsePatterns:
|
|
525
|
+
parsePatterns: Tt,
|
|
528
526
|
defaultParseWidth: "any"
|
|
529
527
|
}),
|
|
530
528
|
day: D({
|
|
531
|
-
matchPatterns:
|
|
529
|
+
matchPatterns: Yt,
|
|
532
530
|
defaultMatchWidth: "wide",
|
|
533
|
-
parsePatterns:
|
|
531
|
+
parsePatterns: Ct,
|
|
534
532
|
defaultParseWidth: "any"
|
|
535
533
|
}),
|
|
536
534
|
dayPeriod: D({
|
|
537
|
-
matchPatterns:
|
|
535
|
+
matchPatterns: St,
|
|
538
536
|
defaultMatchWidth: "any",
|
|
539
|
-
parsePatterns:
|
|
537
|
+
parsePatterns: _t,
|
|
540
538
|
defaultParseWidth: "any"
|
|
541
539
|
})
|
|
542
|
-
},
|
|
540
|
+
}, jt = {
|
|
543
541
|
code: "en-US",
|
|
544
|
-
formatDistance:
|
|
545
|
-
formatLong:
|
|
546
|
-
formatRelative:
|
|
547
|
-
localize:
|
|
548
|
-
match:
|
|
542
|
+
formatDistance: at,
|
|
543
|
+
formatLong: ct,
|
|
544
|
+
formatRelative: dt,
|
|
545
|
+
localize: bt,
|
|
546
|
+
match: Nt,
|
|
549
547
|
options: {
|
|
550
548
|
weekStartsOn: 0,
|
|
551
549
|
firstWeekContainsDate: 1
|
|
552
550
|
}
|
|
553
551
|
};
|
|
554
|
-
function
|
|
552
|
+
function Et(t) {
|
|
555
553
|
const e = m(t);
|
|
556
|
-
return
|
|
554
|
+
return Ie(e, tt(e)) + 1;
|
|
557
555
|
}
|
|
558
|
-
function
|
|
559
|
-
const e = m(t), n = +H(e) - +
|
|
556
|
+
function Ft(t) {
|
|
557
|
+
const e = m(t), n = +H(e) - +ze(e);
|
|
560
558
|
return Math.round(n / se) + 1;
|
|
561
559
|
}
|
|
562
560
|
function ue(t, e) {
|
|
@@ -568,13 +566,13 @@ function ue(t, e) {
|
|
|
568
566
|
const h = N(f, e);
|
|
569
567
|
return n.getTime() >= s.getTime() ? r + 1 : n.getTime() >= h.getTime() ? r : r - 1;
|
|
570
568
|
}
|
|
571
|
-
function
|
|
569
|
+
function Lt(t, e) {
|
|
572
570
|
var s, f, h, w;
|
|
573
571
|
const n = A(), r = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((f = (s = e == null ? void 0 : e.locale) == null ? void 0 : s.options) == null ? void 0 : f.firstWeekContainsDate) ?? n.firstWeekContainsDate ?? ((w = (h = n.locale) == null ? void 0 : h.options) == null ? void 0 : w.firstWeekContainsDate) ?? 1, a = ue(t, e), i = k(t, 0);
|
|
574
572
|
return i.setFullYear(a, 0, r), i.setHours(0, 0, 0, 0), N(i, e);
|
|
575
573
|
}
|
|
576
|
-
function
|
|
577
|
-
const n = m(t), r = +N(n, e) - +
|
|
574
|
+
function $t(t, e) {
|
|
575
|
+
const n = m(t), r = +N(n, e) - +Lt(n, e);
|
|
578
576
|
return Math.round(r / se) + 1;
|
|
579
577
|
}
|
|
580
578
|
function d(t, e) {
|
|
@@ -635,9 +633,7 @@ const W = {
|
|
|
635
633
|
);
|
|
636
634
|
return d(a, e.length);
|
|
637
635
|
}
|
|
638
|
-
},
|
|
639
|
-
am: "am",
|
|
640
|
-
pm: "pm",
|
|
636
|
+
}, S = {
|
|
641
637
|
midnight: "midnight",
|
|
642
638
|
noon: "noon",
|
|
643
639
|
morning: "morning",
|
|
@@ -802,12 +798,12 @@ const W = {
|
|
|
802
798
|
},
|
|
803
799
|
// Local week of year
|
|
804
800
|
w: function(t, e, n, r) {
|
|
805
|
-
const a =
|
|
801
|
+
const a = $t(t, r);
|
|
806
802
|
return e === "wo" ? n.ordinalNumber(a, { unit: "week" }) : d(a, e.length);
|
|
807
803
|
},
|
|
808
804
|
// ISO week of year
|
|
809
805
|
I: function(t, e, n) {
|
|
810
|
-
const r =
|
|
806
|
+
const r = Ft(t);
|
|
811
807
|
return e === "Io" ? n.ordinalNumber(r, { unit: "week" }) : d(r, e.length);
|
|
812
808
|
},
|
|
813
809
|
// Day of the month
|
|
@@ -816,7 +812,7 @@ const W = {
|
|
|
816
812
|
},
|
|
817
813
|
// Day of year
|
|
818
814
|
D: function(t, e, n) {
|
|
819
|
-
const r =
|
|
815
|
+
const r = Et(t);
|
|
820
816
|
return e === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) : d(r, e.length);
|
|
821
817
|
},
|
|
822
818
|
// Day of week
|
|
@@ -979,7 +975,7 @@ const W = {
|
|
|
979
975
|
b: function(t, e, n) {
|
|
980
976
|
const r = t.getHours();
|
|
981
977
|
let a;
|
|
982
|
-
switch (r === 12 ? a =
|
|
978
|
+
switch (r === 12 ? a = S.noon : r === 0 ? a = S.midnight : a = r / 12 >= 1 ? "pm" : "am", e) {
|
|
983
979
|
case "b":
|
|
984
980
|
case "bb":
|
|
985
981
|
return n.dayPeriod(a, {
|
|
@@ -1008,7 +1004,7 @@ const W = {
|
|
|
1008
1004
|
B: function(t, e, n) {
|
|
1009
1005
|
const r = t.getHours();
|
|
1010
1006
|
let a;
|
|
1011
|
-
switch (r >= 17 ? a =
|
|
1007
|
+
switch (r >= 17 ? a = S.evening : r >= 12 ? a = S.afternoon : r >= 4 ? a = S.morning : a = S.night, e) {
|
|
1012
1008
|
case "B":
|
|
1013
1009
|
case "BB":
|
|
1014
1010
|
case "BBB":
|
|
@@ -1073,11 +1069,11 @@ const W = {
|
|
|
1073
1069
|
return ee(r);
|
|
1074
1070
|
case "XXXX":
|
|
1075
1071
|
case "XX":
|
|
1076
|
-
return
|
|
1072
|
+
return C(r);
|
|
1077
1073
|
case "XXXXX":
|
|
1078
1074
|
case "XXX":
|
|
1079
1075
|
default:
|
|
1080
|
-
return
|
|
1076
|
+
return C(r, ":");
|
|
1081
1077
|
}
|
|
1082
1078
|
},
|
|
1083
1079
|
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
@@ -1088,11 +1084,11 @@ const W = {
|
|
|
1088
1084
|
return ee(r);
|
|
1089
1085
|
case "xxxx":
|
|
1090
1086
|
case "xx":
|
|
1091
|
-
return
|
|
1087
|
+
return C(r);
|
|
1092
1088
|
case "xxxxx":
|
|
1093
1089
|
case "xxx":
|
|
1094
1090
|
default:
|
|
1095
|
-
return
|
|
1091
|
+
return C(r, ":");
|
|
1096
1092
|
}
|
|
1097
1093
|
},
|
|
1098
1094
|
// Timezone (GMT)
|
|
@@ -1105,7 +1101,7 @@ const W = {
|
|
|
1105
1101
|
return "GMT" + K(r, ":");
|
|
1106
1102
|
case "OOOO":
|
|
1107
1103
|
default:
|
|
1108
|
-
return "GMT" +
|
|
1104
|
+
return "GMT" + C(r, ":");
|
|
1109
1105
|
}
|
|
1110
1106
|
},
|
|
1111
1107
|
// Timezone (specific non-location)
|
|
@@ -1118,7 +1114,7 @@ const W = {
|
|
|
1118
1114
|
return "GMT" + K(r, ":");
|
|
1119
1115
|
case "zzzz":
|
|
1120
1116
|
default:
|
|
1121
|
-
return "GMT" +
|
|
1117
|
+
return "GMT" + C(r, ":");
|
|
1122
1118
|
}
|
|
1123
1119
|
},
|
|
1124
1120
|
// Seconds timestamp
|
|
@@ -1137,9 +1133,9 @@ function K(t, e = "") {
|
|
|
1137
1133
|
return i === 0 ? n + String(a) : n + String(a) + e + d(i, 2);
|
|
1138
1134
|
}
|
|
1139
1135
|
function ee(t, e) {
|
|
1140
|
-
return t % 60 === 0 ? (t > 0 ? "-" : "+") + d(Math.abs(t) / 60, 2) :
|
|
1136
|
+
return t % 60 === 0 ? (t > 0 ? "-" : "+") + d(Math.abs(t) / 60, 2) : C(t, e);
|
|
1141
1137
|
}
|
|
1142
|
-
function
|
|
1138
|
+
function C(t, e = "") {
|
|
1143
1139
|
const n = t > 0 ? "-" : "+", r = Math.abs(t), a = d(Math.trunc(r / 60), 2), i = d(r % 60, 2);
|
|
1144
1140
|
return n + a + e + i;
|
|
1145
1141
|
}
|
|
@@ -1167,7 +1163,7 @@ const te = (t, e) => {
|
|
|
1167
1163
|
default:
|
|
1168
1164
|
return e.time({ width: "full" });
|
|
1169
1165
|
}
|
|
1170
|
-
},
|
|
1166
|
+
}, Ht = (t, e) => {
|
|
1171
1167
|
const n = t.match(/(P+)(p+)?/) || [], r = n[1], a = n[2];
|
|
1172
1168
|
if (!a)
|
|
1173
1169
|
return te(t, e);
|
|
@@ -1188,46 +1184,46 @@ const te = (t, e) => {
|
|
|
1188
1184
|
break;
|
|
1189
1185
|
}
|
|
1190
1186
|
return i.replace("{{date}}", te(r, e)).replace("{{time}}", de(a, e));
|
|
1191
|
-
},
|
|
1187
|
+
}, qt = {
|
|
1192
1188
|
p: de,
|
|
1193
|
-
P:
|
|
1194
|
-
},
|
|
1195
|
-
function
|
|
1196
|
-
return
|
|
1189
|
+
P: Ht
|
|
1190
|
+
}, At = /^D+$/, Jt = /^Y+$/, Xt = ["D", "DD", "YY", "YYYY"];
|
|
1191
|
+
function Rt(t) {
|
|
1192
|
+
return At.test(t);
|
|
1197
1193
|
}
|
|
1198
|
-
function
|
|
1199
|
-
return
|
|
1194
|
+
function Bt(t) {
|
|
1195
|
+
return Jt.test(t);
|
|
1200
1196
|
}
|
|
1201
|
-
function
|
|
1202
|
-
const r =
|
|
1203
|
-
if (console.warn(r),
|
|
1197
|
+
function Vt(t, e, n) {
|
|
1198
|
+
const r = Qt(t, e, n);
|
|
1199
|
+
if (console.warn(r), Xt.includes(t)) throw new RangeError(r);
|
|
1204
1200
|
}
|
|
1205
|
-
function
|
|
1201
|
+
function Qt(t, e, n) {
|
|
1206
1202
|
const r = t[0] === "Y" ? "years" : "days of the month";
|
|
1207
1203
|
return `Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
|
|
1208
1204
|
}
|
|
1209
|
-
const
|
|
1205
|
+
const Gt = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, It = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, zt = /^'([^]*?)'?$/, Zt = /''/g, Ut = /[a-zA-Z]/;
|
|
1210
1206
|
function ne(t, e, n) {
|
|
1211
1207
|
var w, v, x, T, F, L, j, $;
|
|
1212
|
-
const r = A(), a = (n == null ? void 0 : n.locale) ?? r.locale ??
|
|
1213
|
-
if (!
|
|
1208
|
+
const r = A(), a = (n == null ? void 0 : n.locale) ?? r.locale ?? jt, i = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((v = (w = n == null ? void 0 : n.locale) == null ? void 0 : w.options) == null ? void 0 : v.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((T = (x = r.locale) == null ? void 0 : x.options) == null ? void 0 : T.firstWeekContainsDate) ?? 1, u = (n == null ? void 0 : n.weekStartsOn) ?? ((L = (F = n == null ? void 0 : n.locale) == null ? void 0 : F.options) == null ? void 0 : L.weekStartsOn) ?? r.weekStartsOn ?? (($ = (j = r.locale) == null ? void 0 : j.options) == null ? void 0 : $.weekStartsOn) ?? 0, s = m(t);
|
|
1209
|
+
if (!Ue(s))
|
|
1214
1210
|
throw new RangeError("Invalid time value");
|
|
1215
|
-
let f = e.match(
|
|
1211
|
+
let f = e.match(It).map((b) => {
|
|
1216
1212
|
const y = b[0];
|
|
1217
1213
|
if (y === "p" || y === "P") {
|
|
1218
|
-
const P =
|
|
1214
|
+
const P = qt[y];
|
|
1219
1215
|
return P(b, a.formatLong);
|
|
1220
1216
|
}
|
|
1221
1217
|
return b;
|
|
1222
|
-
}).join("").match(
|
|
1218
|
+
}).join("").match(Gt).map((b) => {
|
|
1223
1219
|
if (b === "''")
|
|
1224
1220
|
return { isToken: !1, value: "'" };
|
|
1225
1221
|
const y = b[0];
|
|
1226
1222
|
if (y === "'")
|
|
1227
|
-
return { isToken: !1, value:
|
|
1223
|
+
return { isToken: !1, value: Kt(b) };
|
|
1228
1224
|
if (U[y])
|
|
1229
1225
|
return { isToken: !0, value: b };
|
|
1230
|
-
if (y.match(
|
|
1226
|
+
if (y.match(Ut))
|
|
1231
1227
|
throw new RangeError(
|
|
1232
1228
|
"Format string contains an unescaped latin alphabet character `" + y + "`"
|
|
1233
1229
|
);
|
|
@@ -1242,14 +1238,14 @@ function ne(t, e, n) {
|
|
|
1242
1238
|
return f.map((b) => {
|
|
1243
1239
|
if (!b.isToken) return b.value;
|
|
1244
1240
|
const y = b.value;
|
|
1245
|
-
(!(n != null && n.useAdditionalWeekYearTokens) &&
|
|
1241
|
+
(!(n != null && n.useAdditionalWeekYearTokens) && Bt(y) || !(n != null && n.useAdditionalDayOfYearTokens) && Rt(y)) && Vt(y, e, String(t));
|
|
1246
1242
|
const P = U[y[0]];
|
|
1247
1243
|
return P(s, y, a.localize, h);
|
|
1248
1244
|
}).join("");
|
|
1249
1245
|
}
|
|
1250
|
-
function
|
|
1251
|
-
const e = t.match(
|
|
1252
|
-
return e ? e[1].replace(
|
|
1246
|
+
function Kt(t) {
|
|
1247
|
+
const e = t.match(zt);
|
|
1248
|
+
return e ? e[1].replace(Zt, "'") : t;
|
|
1253
1249
|
}
|
|
1254
1250
|
function re(t, e) {
|
|
1255
1251
|
const n = m(t), r = m(e);
|
|
@@ -1259,14 +1255,14 @@ function ae(t, e) {
|
|
|
1259
1255
|
const n = m(t), r = m(e);
|
|
1260
1256
|
return +n < +r;
|
|
1261
1257
|
}
|
|
1262
|
-
function
|
|
1258
|
+
function en(t, e) {
|
|
1263
1259
|
const n = m(t), r = m(e);
|
|
1264
1260
|
return n.getFullYear() === r.getFullYear() && n.getMonth() === r.getMonth();
|
|
1265
1261
|
}
|
|
1266
|
-
function
|
|
1267
|
-
return ie(t, -
|
|
1262
|
+
function tn(t, e) {
|
|
1263
|
+
return ie(t, -1);
|
|
1268
1264
|
}
|
|
1269
|
-
const
|
|
1265
|
+
const nn = {
|
|
1270
1266
|
lessThanXSeconds: {
|
|
1271
1267
|
one: "moins d’une seconde",
|
|
1272
1268
|
other: "moins de {{count}} secondes"
|
|
@@ -1328,54 +1324,54 @@ const an = {
|
|
|
1328
1324
|
one: "presqu’un an",
|
|
1329
1325
|
other: "presque {{count}} ans"
|
|
1330
1326
|
}
|
|
1331
|
-
},
|
|
1327
|
+
}, rn = (t, e, n) => {
|
|
1332
1328
|
let r;
|
|
1333
|
-
const a =
|
|
1329
|
+
const a = nn[t];
|
|
1334
1330
|
return typeof a == "string" ? r = a : e === 1 ? r = a.one : r = a.other.replace("{{count}}", String(e)), n != null && n.addSuffix ? n.comparison && n.comparison > 0 ? "dans " + r : "il y a " + r : r;
|
|
1335
|
-
},
|
|
1331
|
+
}, an = {
|
|
1336
1332
|
full: "EEEE d MMMM y",
|
|
1337
1333
|
long: "d MMMM y",
|
|
1338
1334
|
medium: "d MMM y",
|
|
1339
1335
|
short: "dd/MM/y"
|
|
1340
|
-
},
|
|
1336
|
+
}, sn = {
|
|
1341
1337
|
full: "HH:mm:ss zzzz",
|
|
1342
1338
|
long: "HH:mm:ss z",
|
|
1343
1339
|
medium: "HH:mm:ss",
|
|
1344
1340
|
short: "HH:mm"
|
|
1345
|
-
},
|
|
1341
|
+
}, on = {
|
|
1346
1342
|
full: "{{date}} 'à' {{time}}",
|
|
1347
1343
|
long: "{{date}} 'à' {{time}}",
|
|
1348
1344
|
medium: "{{date}}, {{time}}",
|
|
1349
1345
|
short: "{{date}}, {{time}}"
|
|
1350
|
-
},
|
|
1351
|
-
date:
|
|
1352
|
-
formats:
|
|
1346
|
+
}, cn = {
|
|
1347
|
+
date: _({
|
|
1348
|
+
formats: an,
|
|
1353
1349
|
defaultWidth: "full"
|
|
1354
1350
|
}),
|
|
1355
|
-
time:
|
|
1356
|
-
formats:
|
|
1351
|
+
time: _({
|
|
1352
|
+
formats: sn,
|
|
1357
1353
|
defaultWidth: "full"
|
|
1358
1354
|
}),
|
|
1359
|
-
dateTime:
|
|
1360
|
-
formats:
|
|
1355
|
+
dateTime: _({
|
|
1356
|
+
formats: on,
|
|
1361
1357
|
defaultWidth: "full"
|
|
1362
1358
|
})
|
|
1363
|
-
},
|
|
1359
|
+
}, un = {
|
|
1364
1360
|
lastWeek: "eeee 'dernier à' p",
|
|
1365
1361
|
yesterday: "'hier à' p",
|
|
1366
1362
|
today: "'aujourd’hui à' p",
|
|
1367
1363
|
tomorrow: "'demain à' p'",
|
|
1368
1364
|
nextWeek: "eeee 'prochain à' p",
|
|
1369
1365
|
other: "P"
|
|
1370
|
-
},
|
|
1366
|
+
}, dn = (t, e, n, r) => un[t], ln = {
|
|
1371
1367
|
narrow: ["av. J.-C", "ap. J.-C"],
|
|
1372
1368
|
abbreviated: ["av. J.-C", "ap. J.-C"],
|
|
1373
1369
|
wide: ["avant Jésus-Christ", "après Jésus-Christ"]
|
|
1374
|
-
},
|
|
1370
|
+
}, mn = {
|
|
1375
1371
|
narrow: ["T1", "T2", "T3", "T4"],
|
|
1376
1372
|
abbreviated: ["1er trim.", "2ème trim.", "3ème trim.", "4ème trim."],
|
|
1377
1373
|
wide: ["1er trimestre", "2ème trimestre", "3ème trimestre", "4ème trimestre"]
|
|
1378
|
-
},
|
|
1374
|
+
}, hn = {
|
|
1379
1375
|
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
1380
1376
|
abbreviated: [
|
|
1381
1377
|
"janv.",
|
|
@@ -1405,7 +1401,7 @@ const an = {
|
|
|
1405
1401
|
"novembre",
|
|
1406
1402
|
"décembre"
|
|
1407
1403
|
]
|
|
1408
|
-
},
|
|
1404
|
+
}, fn = {
|
|
1409
1405
|
narrow: ["D", "L", "M", "M", "J", "V", "S"],
|
|
1410
1406
|
short: ["di", "lu", "ma", "me", "je", "ve", "sa"],
|
|
1411
1407
|
abbreviated: ["dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."],
|
|
@@ -1418,7 +1414,7 @@ const an = {
|
|
|
1418
1414
|
"vendredi",
|
|
1419
1415
|
"samedi"
|
|
1420
1416
|
]
|
|
1421
|
-
},
|
|
1417
|
+
}, gn = {
|
|
1422
1418
|
narrow: {
|
|
1423
1419
|
am: "AM",
|
|
1424
1420
|
pm: "PM",
|
|
@@ -1449,57 +1445,57 @@ const an = {
|
|
|
1449
1445
|
evening: "du soir",
|
|
1450
1446
|
night: "du matin"
|
|
1451
1447
|
}
|
|
1452
|
-
},
|
|
1448
|
+
}, wn = (t, e) => {
|
|
1453
1449
|
const n = Number(t), r = e == null ? void 0 : e.unit;
|
|
1454
1450
|
if (n === 0) return "0";
|
|
1455
1451
|
const a = ["year", "week", "hour", "minute", "second"];
|
|
1456
1452
|
let i;
|
|
1457
1453
|
return n === 1 ? i = r && a.includes(r) ? "ère" : "er" : i = "ème", n + i;
|
|
1458
|
-
},
|
|
1454
|
+
}, yn = ["MMM", "MMMM"], bn = {
|
|
1459
1455
|
preprocessor: (t, e) => t.getDate() === 1 || !e.some(
|
|
1460
|
-
(r) => r.isToken &&
|
|
1456
|
+
(r) => r.isToken && yn.includes(r.value)
|
|
1461
1457
|
) ? e : e.map(
|
|
1462
1458
|
(r) => r.isToken && r.value === "do" ? { isToken: !0, value: "d" } : r
|
|
1463
1459
|
),
|
|
1464
|
-
ordinalNumber:
|
|
1460
|
+
ordinalNumber: wn,
|
|
1465
1461
|
era: p({
|
|
1466
|
-
values:
|
|
1462
|
+
values: ln,
|
|
1467
1463
|
defaultWidth: "wide"
|
|
1468
1464
|
}),
|
|
1469
1465
|
quarter: p({
|
|
1470
|
-
values:
|
|
1466
|
+
values: mn,
|
|
1471
1467
|
defaultWidth: "wide",
|
|
1472
1468
|
argumentCallback: (t) => t - 1
|
|
1473
1469
|
}),
|
|
1474
1470
|
month: p({
|
|
1475
|
-
values:
|
|
1471
|
+
values: hn,
|
|
1476
1472
|
defaultWidth: "wide"
|
|
1477
1473
|
}),
|
|
1478
1474
|
day: p({
|
|
1479
|
-
values:
|
|
1475
|
+
values: fn,
|
|
1480
1476
|
defaultWidth: "wide"
|
|
1481
1477
|
}),
|
|
1482
1478
|
dayPeriod: p({
|
|
1483
|
-
values:
|
|
1479
|
+
values: gn,
|
|
1484
1480
|
defaultWidth: "wide"
|
|
1485
1481
|
})
|
|
1486
|
-
},
|
|
1482
|
+
}, Mn = /^(\d+)(ième|ère|ème|er|e)?/i, vn = /\d+/i, Pn = {
|
|
1487
1483
|
narrow: /^(av\.J\.C|ap\.J\.C|ap\.J\.-C)/i,
|
|
1488
1484
|
abbreviated: /^(av\.J\.-C|av\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,
|
|
1489
1485
|
wide: /^(avant Jésus-Christ|après Jésus-Christ)/i
|
|
1490
|
-
},
|
|
1486
|
+
}, pn = {
|
|
1491
1487
|
any: [/^av/i, /^ap/i]
|
|
1492
|
-
},
|
|
1488
|
+
}, Dn = {
|
|
1493
1489
|
narrow: /^T?[1234]/i,
|
|
1494
1490
|
abbreviated: /^[1234](er|ème|e)? trim\.?/i,
|
|
1495
1491
|
wide: /^[1234](er|ème|e)? trimestre/i
|
|
1496
|
-
},
|
|
1492
|
+
}, kn = {
|
|
1497
1493
|
any: [/1/i, /2/i, /3/i, /4/i]
|
|
1498
|
-
},
|
|
1494
|
+
}, On = {
|
|
1499
1495
|
narrow: /^[jfmasond]/i,
|
|
1500
1496
|
abbreviated: /^(janv|févr|mars|avr|mai|juin|juill|juil|août|sept|oct|nov|déc)\.?/i,
|
|
1501
1497
|
wide: /^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i
|
|
1502
|
-
},
|
|
1498
|
+
}, Wn = {
|
|
1503
1499
|
narrow: [
|
|
1504
1500
|
/^j/i,
|
|
1505
1501
|
/^f/i,
|
|
@@ -1528,18 +1524,18 @@ const an = {
|
|
|
1528
1524
|
/^n/i,
|
|
1529
1525
|
/^d/i
|
|
1530
1526
|
]
|
|
1531
|
-
},
|
|
1527
|
+
}, xn = {
|
|
1532
1528
|
narrow: /^[lmjvsd]/i,
|
|
1533
1529
|
short: /^(di|lu|ma|me|je|ve|sa)/i,
|
|
1534
1530
|
abbreviated: /^(dim|lun|mar|mer|jeu|ven|sam)\.?/i,
|
|
1535
1531
|
wide: /^(dimanche|lundi|mardi|mercredi|jeudi|vendredi|samedi)/i
|
|
1536
|
-
},
|
|
1532
|
+
}, Tn = {
|
|
1537
1533
|
narrow: [/^d/i, /^l/i, /^m/i, /^m/i, /^j/i, /^v/i, /^s/i],
|
|
1538
1534
|
any: [/^di/i, /^lu/i, /^ma/i, /^me/i, /^je/i, /^ve/i, /^sa/i]
|
|
1539
|
-
},
|
|
1535
|
+
}, Yn = {
|
|
1540
1536
|
narrow: /^(a|p|minuit|midi|mat\.?|ap\.?m\.?|soir|nuit)/i,
|
|
1541
1537
|
any: /^([ap]\.?\s?m\.?|du matin|de l'après[-\s]midi|du soir|de la nuit)/i
|
|
1542
|
-
},
|
|
1538
|
+
}, Cn = {
|
|
1543
1539
|
any: {
|
|
1544
1540
|
am: /^a/i,
|
|
1545
1541
|
pm: /^p/i,
|
|
@@ -1550,61 +1546,61 @@ const an = {
|
|
|
1550
1546
|
evening: /soir/i,
|
|
1551
1547
|
night: /nuit/i
|
|
1552
1548
|
}
|
|
1553
|
-
},
|
|
1549
|
+
}, Sn = {
|
|
1554
1550
|
ordinalNumber: ce({
|
|
1555
|
-
matchPattern:
|
|
1556
|
-
parsePattern:
|
|
1551
|
+
matchPattern: Mn,
|
|
1552
|
+
parsePattern: vn,
|
|
1557
1553
|
valueCallback: (t) => parseInt(t)
|
|
1558
1554
|
}),
|
|
1559
1555
|
era: D({
|
|
1560
|
-
matchPatterns:
|
|
1556
|
+
matchPatterns: Pn,
|
|
1561
1557
|
defaultMatchWidth: "wide",
|
|
1562
|
-
parsePatterns:
|
|
1558
|
+
parsePatterns: pn,
|
|
1563
1559
|
defaultParseWidth: "any"
|
|
1564
1560
|
}),
|
|
1565
1561
|
quarter: D({
|
|
1566
|
-
matchPatterns:
|
|
1562
|
+
matchPatterns: Dn,
|
|
1567
1563
|
defaultMatchWidth: "wide",
|
|
1568
|
-
parsePatterns:
|
|
1564
|
+
parsePatterns: kn,
|
|
1569
1565
|
defaultParseWidth: "any",
|
|
1570
1566
|
valueCallback: (t) => t + 1
|
|
1571
1567
|
}),
|
|
1572
1568
|
month: D({
|
|
1573
|
-
matchPatterns:
|
|
1569
|
+
matchPatterns: On,
|
|
1574
1570
|
defaultMatchWidth: "wide",
|
|
1575
|
-
parsePatterns:
|
|
1571
|
+
parsePatterns: Wn,
|
|
1576
1572
|
defaultParseWidth: "any"
|
|
1577
1573
|
}),
|
|
1578
1574
|
day: D({
|
|
1579
|
-
matchPatterns:
|
|
1575
|
+
matchPatterns: xn,
|
|
1580
1576
|
defaultMatchWidth: "wide",
|
|
1581
|
-
parsePatterns:
|
|
1577
|
+
parsePatterns: Tn,
|
|
1582
1578
|
defaultParseWidth: "any"
|
|
1583
1579
|
}),
|
|
1584
1580
|
dayPeriod: D({
|
|
1585
|
-
matchPatterns:
|
|
1581
|
+
matchPatterns: Yn,
|
|
1586
1582
|
defaultMatchWidth: "any",
|
|
1587
|
-
parsePatterns:
|
|
1583
|
+
parsePatterns: Cn,
|
|
1588
1584
|
defaultParseWidth: "any"
|
|
1589
1585
|
})
|
|
1590
|
-
},
|
|
1586
|
+
}, _n = {
|
|
1591
1587
|
code: "fr",
|
|
1592
|
-
formatDistance:
|
|
1593
|
-
formatLong:
|
|
1594
|
-
formatRelative:
|
|
1595
|
-
localize:
|
|
1596
|
-
match:
|
|
1588
|
+
formatDistance: rn,
|
|
1589
|
+
formatLong: cn,
|
|
1590
|
+
formatRelative: dn,
|
|
1591
|
+
localize: bn,
|
|
1592
|
+
match: Sn,
|
|
1597
1593
|
options: {
|
|
1598
1594
|
weekStartsOn: 1,
|
|
1599
1595
|
firstWeekContainsDate: 4
|
|
1600
1596
|
}
|
|
1601
|
-
},
|
|
1602
|
-
const [i, u] = O(() => t && e && "start" in e ? e.start : /* @__PURE__ */ new Date()), [s, f] = O(e || null), [h, w] = O(!1), [v, x] = O(null), [T, F] = O([]), [L, j] = O(!1), [$, b] = O((/* @__PURE__ */ new Date()).getFullYear()), y = 1900, P = I(null), J = I(null), le = /* @__PURE__ */ new Date(), V =
|
|
1597
|
+
}, Ln = ({ selectRange: t = !1, selectedDate: e, onDateSelect: n, maxDateSelected: r, minDateSelected: a }) => {
|
|
1598
|
+
const [i, u] = O(() => t && e && "start" in e ? e.start : /* @__PURE__ */ new Date()), [s, f] = O(e || null), [h, w] = O(!1), [v, x] = O(null), [T, F] = O([]), [L, j] = O(!1), [$, b] = O((/* @__PURE__ */ new Date()).getFullYear()), y = 1900, P = I(null), J = I(null), le = /* @__PURE__ */ new Date(), V = et(i), me = Ke(i), he = N(V, { weekStartsOn: 1 }), fe = nt(me, { weekStartsOn: 1 }), [X, ge] = O(null);
|
|
1603
1599
|
B(() => {
|
|
1604
|
-
e && (t && JSON.stringify(e) !== JSON.stringify(s) || !t && e instanceof Date && !
|
|
1600
|
+
e && (t && JSON.stringify(e) !== JSON.stringify(s) || !t && e instanceof Date && !Y(e, s)) && (f(e ?? null), t && "start" in e ? u(e.start) : !t && e instanceof Date && u(e));
|
|
1605
1601
|
}, [e, t]);
|
|
1606
1602
|
const Q = (o) => {
|
|
1607
|
-
u((c) => o > 0 ? ie(c, 1) :
|
|
1603
|
+
u((c) => o > 0 ? ie(c, 1) : tn(c));
|
|
1608
1604
|
}, we = (o) => {
|
|
1609
1605
|
let c;
|
|
1610
1606
|
if (t)
|
|
@@ -1641,19 +1637,19 @@ const an = {
|
|
|
1641
1637
|
const be = () => ["Lu", "Ma", "Me", "Je", "Ve", "Sa", "Di"].map((c, l) => /* @__PURE__ */ g("div", { className: M.calendarWeekdays, children: c }, l)), Me = () => {
|
|
1642
1638
|
let o = [], c = he;
|
|
1643
1639
|
for (; c <= fe; )
|
|
1644
|
-
o.push(c), c =
|
|
1640
|
+
o.push(c), c = Ve(c, 1);
|
|
1645
1641
|
return o.map((l, De) => {
|
|
1646
|
-
const R = s && typeof s == "object" && "start" in s && "end" in s, ke = R &&
|
|
1642
|
+
const R = s && typeof s == "object" && "start" in s && "end" in s, ke = R && Y(l, s.start), Oe = R && Y(l, s.end), We = R && re(l, s.start) && ae(l, s.end), xe = a && (ae(l, a) || Y(l, a)), Te = r && (re(l, r) || Y(l, r)), Ye = a && xe || r && Te, Ce = !en(l, V), Se = Ye || Ce;
|
|
1647
1643
|
return /* @__PURE__ */ g(
|
|
1648
1644
|
"div",
|
|
1649
1645
|
{
|
|
1650
1646
|
className: `
|
|
1651
1647
|
${M.calendarDay}
|
|
1652
|
-
${
|
|
1653
|
-
${s &&
|
|
1648
|
+
${Y(l, le) ? M.today : ""}
|
|
1649
|
+
${s && Y(l, s) ? M.selected : ""}
|
|
1654
1650
|
${ke || Oe ? M.selected : ""} // Applique 'selected' si start ou end
|
|
1655
1651
|
${We ? M.inRange : ""} // Applique 'inRange' si la date est entre start et end
|
|
1656
|
-
${
|
|
1652
|
+
${Se ? M.disabled : ""}
|
|
1657
1653
|
`,
|
|
1658
1654
|
onClick: () => we(l),
|
|
1659
1655
|
children: ne(l, "d")
|
|
@@ -1672,7 +1668,7 @@ const an = {
|
|
|
1672
1668
|
document.removeEventListener("click", o);
|
|
1673
1669
|
};
|
|
1674
1670
|
}, pe = (o) => {
|
|
1675
|
-
const c = ne(o, "MMM yyyy", { locale:
|
|
1671
|
+
const c = ne(o, "MMM yyyy", { locale: _n });
|
|
1676
1672
|
return c.charAt(0).toUpperCase() + c.slice(1);
|
|
1677
1673
|
};
|
|
1678
1674
|
return /* @__PURE__ */ E("div", { className: M.calendar, onClick: Pe, children: [
|
|
@@ -1683,7 +1679,7 @@ const an = {
|
|
|
1683
1679
|
] }) }),
|
|
1684
1680
|
/* @__PURE__ */ E("div", { ref: J, className: M.dropDownCtn, children: [
|
|
1685
1681
|
/* @__PURE__ */ g(
|
|
1686
|
-
|
|
1682
|
+
_e,
|
|
1687
1683
|
{
|
|
1688
1684
|
size: "s",
|
|
1689
1685
|
mode: "tertiary",
|
|
@@ -1723,5 +1719,5 @@ const an = {
|
|
|
1723
1719
|
] });
|
|
1724
1720
|
};
|
|
1725
1721
|
export {
|
|
1726
|
-
|
|
1722
|
+
Ln as Calendar
|
|
1727
1723
|
};
|