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