@ctlyst.id/utils 1.1.0 → 1.1.1
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/index.js +2 -1
- package/dist/index.mjs +3848 -263
- package/dist/types/hooks/index.d.ts +2 -1
- package/dist/types/hooks/use-number-formatter/index.d.ts +2 -0
- package/dist/types/hooks/use-number-formatter/use-number-formatter.d.ts +9 -0
- package/dist/types/hooks/use-voucher-tnc/get-applies-to.d.ts +2 -0
- package/dist/types/hooks/use-voucher-tnc/get-period.d.ts +2 -0
- package/dist/types/hooks/use-voucher-tnc/index.d.ts +2 -0
- package/dist/types/hooks/use-voucher-tnc/use-voucher-method-terms.d.ts +2 -0
- package/dist/types/hooks/use-voucher-tnc/use-voucher-tnc.d.ts +3 -0
- package/dist/types/hooks/use-voucher-tnc/use-voucher-tnc.types.d.ts +42 -0
- package/package.json +4 -3
- package/dist/types/hooks/use-currency-formatter/index.d.ts +0 -2
- package/dist/types/hooks/use-currency-formatter/use-currency-formatter.d.ts +0 -9
package/dist/index.mjs
CHANGED
|
@@ -1,328 +1,3913 @@
|
|
|
1
|
-
import { useRef as
|
|
2
|
-
const
|
|
3
|
-
var
|
|
4
|
-
const
|
|
5
|
-
return
|
|
6
|
-
},
|
|
7
|
-
const
|
|
8
|
-
return
|
|
9
|
-
|
|
10
|
-
}),
|
|
11
|
-
var
|
|
12
|
-
return (
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
var
|
|
16
|
-
var
|
|
17
|
-
if (!
|
|
1
|
+
import { useRef as Ae, useEffect as re, useCallback as we, useState as ie, useLayoutEffect as Tt, useId as Dt } from "react";
|
|
2
|
+
const Pt = (o) => o != null && typeof o == "object" && "nodeType" in o && o.nodeType === Node.ELEMENT_NODE, at = (o) => Pt(o) ? o.ownerDocument ?? document : document, Oe = (o, a) => {
|
|
3
|
+
var r;
|
|
4
|
+
const t = o.target;
|
|
5
|
+
return o.button > 0 || t && !at(t).contains(t) ? !1 : !((r = a.current) != null && r.contains(t));
|
|
6
|
+
}, Mt = () => !!(typeof window < "u" && window.document && window.document.createElement), kt = Mt(), Ct = (o, a = []) => {
|
|
7
|
+
const t = Ae(o);
|
|
8
|
+
return re(() => {
|
|
9
|
+
t.current = o;
|
|
10
|
+
}), we((...r) => {
|
|
11
|
+
var e;
|
|
12
|
+
return (e = t.current) == null ? void 0 : e.call(t, ...r);
|
|
13
|
+
}, a);
|
|
14
|
+
}, $e = Ct;
|
|
15
|
+
var xt = function() {
|
|
16
|
+
var o = document.getSelection();
|
|
17
|
+
if (!o.rangeCount)
|
|
18
18
|
return function() {
|
|
19
19
|
};
|
|
20
|
-
for (var
|
|
21
|
-
|
|
22
|
-
switch (
|
|
20
|
+
for (var a = document.activeElement, t = [], r = 0; r < o.rangeCount; r++)
|
|
21
|
+
t.push(o.getRangeAt(r));
|
|
22
|
+
switch (a.tagName.toUpperCase()) {
|
|
23
23
|
case "INPUT":
|
|
24
24
|
case "TEXTAREA":
|
|
25
|
-
|
|
25
|
+
a.blur();
|
|
26
26
|
break;
|
|
27
27
|
default:
|
|
28
|
-
|
|
28
|
+
a = null;
|
|
29
29
|
break;
|
|
30
30
|
}
|
|
31
|
-
return
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}),
|
|
31
|
+
return o.removeAllRanges(), function() {
|
|
32
|
+
o.type === "Caret" && o.removeAllRanges(), o.rangeCount || t.forEach(function(e) {
|
|
33
|
+
o.addRange(e);
|
|
34
|
+
}), a && a.focus();
|
|
35
35
|
};
|
|
36
|
-
},
|
|
36
|
+
}, Ot = xt, Ve = {
|
|
37
37
|
"text/plain": "Text",
|
|
38
38
|
"text/html": "Url",
|
|
39
39
|
default: "Text"
|
|
40
|
-
},
|
|
41
|
-
function
|
|
42
|
-
var
|
|
43
|
-
return
|
|
44
|
-
}
|
|
45
|
-
function
|
|
46
|
-
var
|
|
47
|
-
|
|
40
|
+
}, Et = "Copy to clipboard: #{key}, Enter";
|
|
41
|
+
function Ut(o) {
|
|
42
|
+
var a = (/mac os x/i.test(navigator.userAgent) ? "⌘" : "Ctrl") + "+C";
|
|
43
|
+
return o.replace(/#{\s*key\s*}/g, a);
|
|
44
|
+
}
|
|
45
|
+
function $t(o, a) {
|
|
46
|
+
var t, r, e, i, n, u, s = !1;
|
|
47
|
+
a || (a = {}), t = a.debug || !1;
|
|
48
48
|
try {
|
|
49
|
-
|
|
50
|
-
if (
|
|
51
|
-
if (
|
|
52
|
-
|
|
53
|
-
var
|
|
54
|
-
window.clipboardData.setData(
|
|
49
|
+
e = Ot(), i = document.createRange(), n = document.getSelection(), u = document.createElement("span"), u.textContent = o, u.ariaHidden = "true", u.style.all = "unset", u.style.position = "fixed", u.style.top = 0, u.style.clip = "rect(0, 0, 0, 0)", u.style.whiteSpace = "pre", u.style.webkitUserSelect = "text", u.style.MozUserSelect = "text", u.style.msUserSelect = "text", u.style.userSelect = "text", u.addEventListener("copy", function(d) {
|
|
50
|
+
if (d.stopPropagation(), a.format)
|
|
51
|
+
if (d.preventDefault(), typeof d.clipboardData > "u") {
|
|
52
|
+
t && console.warn("unable to use e.clipboardData"), t && console.warn("trying IE specific stuff"), window.clipboardData.clearData();
|
|
53
|
+
var m = Ve[a.format] || Ve.default;
|
|
54
|
+
window.clipboardData.setData(m, o);
|
|
55
55
|
} else
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}), document.body.appendChild(
|
|
59
|
-
var
|
|
60
|
-
if (!
|
|
56
|
+
d.clipboardData.clearData(), d.clipboardData.setData(a.format, o);
|
|
57
|
+
a.onCopy && (d.preventDefault(), a.onCopy(d.clipboardData));
|
|
58
|
+
}), document.body.appendChild(u), i.selectNodeContents(u), n.addRange(i);
|
|
59
|
+
var l = document.execCommand("copy");
|
|
60
|
+
if (!l)
|
|
61
61
|
throw new Error("copy command was unsuccessful");
|
|
62
|
-
|
|
63
|
-
} catch (
|
|
64
|
-
|
|
62
|
+
s = !0;
|
|
63
|
+
} catch (d) {
|
|
64
|
+
t && console.error("unable to copy using execCommand: ", d), t && console.warn("trying IE specific stuff");
|
|
65
65
|
try {
|
|
66
|
-
window.clipboardData.setData(
|
|
67
|
-
} catch (
|
|
68
|
-
|
|
66
|
+
window.clipboardData.setData(a.format || "text", o), a.onCopy && a.onCopy(window.clipboardData), s = !0;
|
|
67
|
+
} catch (m) {
|
|
68
|
+
t && console.error("unable to copy using clipboardData: ", m), t && console.error("falling back to prompt"), r = Ut("message" in a ? a.message : Et), window.prompt(r, o);
|
|
69
69
|
}
|
|
70
70
|
} finally {
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
return
|
|
74
|
-
}
|
|
75
|
-
var
|
|
76
|
-
const
|
|
77
|
-
const [
|
|
78
|
-
|
|
79
|
-
const { timeout:
|
|
80
|
-
const
|
|
81
|
-
|
|
82
|
-
}, [
|
|
83
|
-
return
|
|
84
|
-
let
|
|
85
|
-
return
|
|
86
|
-
|
|
87
|
-
},
|
|
88
|
-
|
|
71
|
+
n && (typeof n.removeRange == "function" ? n.removeRange(i) : n.removeAllRanges()), u && document.body.removeChild(u), e();
|
|
72
|
+
}
|
|
73
|
+
return s;
|
|
74
|
+
}
|
|
75
|
+
var Wt = $t;
|
|
76
|
+
const Yt = ({ value: o = "", optionsOrTimeout: a = {} } = {}) => {
|
|
77
|
+
const [t, r] = ie(!1), [e, i] = ie(o);
|
|
78
|
+
re(() => i(o), [o]);
|
|
79
|
+
const { timeout: n = 1500, ...u } = typeof a == "number" ? { timeout: a } : a, s = we(() => {
|
|
80
|
+
const l = Wt(e, u);
|
|
81
|
+
r(l);
|
|
82
|
+
}, [e, u]);
|
|
83
|
+
return re(() => {
|
|
84
|
+
let l = null;
|
|
85
|
+
return t && (l = window.setTimeout(() => {
|
|
86
|
+
r(!1);
|
|
87
|
+
}, n)), () => {
|
|
88
|
+
l && window.clearTimeout(l);
|
|
89
89
|
};
|
|
90
|
-
}, [
|
|
91
|
-
value:
|
|
92
|
-
setValue:
|
|
93
|
-
onCopy:
|
|
94
|
-
hasCopied:
|
|
90
|
+
}, [n, t]), {
|
|
91
|
+
value: e,
|
|
92
|
+
setValue: i,
|
|
93
|
+
onCopy: s,
|
|
94
|
+
hasCopied: t
|
|
95
95
|
};
|
|
96
|
-
},
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
decimalSeparator: o = ",",
|
|
101
|
-
code: a = ""
|
|
102
|
-
}) => {
|
|
103
|
-
const u = ((r) => {
|
|
104
|
-
const i = r.toString().split("."), d = i[0].replace(/\B(?=(\d{3})+(?!\d))/g, t);
|
|
105
|
-
let c = "";
|
|
106
|
-
return e !== void 0 ? i.length > 1 && e > 0 ? c = o + i[1].padEnd(e, "0").slice(0, e) : e > 0 && (c = o + "0".repeat(e)) : i.length > 1 && (c = o + i[1]), d + c;
|
|
107
|
-
})(n);
|
|
108
|
-
return a ? a + u : u;
|
|
109
|
-
}, de = q, K = ({ value: n, delay: t = 500 }) => {
|
|
110
|
-
const [e, o] = v(n);
|
|
111
|
-
return m(() => {
|
|
112
|
-
const a = setTimeout(() => o(n), t || 500);
|
|
96
|
+
}, In = Yt, Nt = ({ value: o, delay: a = 500 }) => {
|
|
97
|
+
const [t, r] = ie(o);
|
|
98
|
+
return re(() => {
|
|
99
|
+
const e = setTimeout(() => r(o), a || 500);
|
|
113
100
|
return () => {
|
|
114
|
-
clearTimeout(
|
|
101
|
+
clearTimeout(e);
|
|
115
102
|
};
|
|
116
|
-
}, [
|
|
117
|
-
},
|
|
118
|
-
var
|
|
119
|
-
function
|
|
120
|
-
if (!
|
|
121
|
-
if (
|
|
122
|
-
throw new Error(
|
|
123
|
-
var
|
|
124
|
-
throw new Error(
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
var
|
|
128
|
-
var
|
|
129
|
-
top:
|
|
130
|
-
right:
|
|
131
|
-
bottom:
|
|
132
|
-
left:
|
|
133
|
-
width:
|
|
134
|
-
height:
|
|
135
|
-
x:
|
|
136
|
-
y:
|
|
103
|
+
}, [o, a]), t;
|
|
104
|
+
}, qn = Nt;
|
|
105
|
+
var _t = process.env.NODE_ENV === "production", Ee = "Invariant failed";
|
|
106
|
+
function Xe(o, a) {
|
|
107
|
+
if (!o) {
|
|
108
|
+
if (_t)
|
|
109
|
+
throw new Error(Ee);
|
|
110
|
+
var t = typeof a == "function" ? a() : a, r = t ? "".concat(Ee, ": ").concat(t) : Ee;
|
|
111
|
+
throw new Error(r);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
var Te = function(a) {
|
|
115
|
+
var t = a.top, r = a.right, e = a.bottom, i = a.left, n = r - i, u = e - t, s = {
|
|
116
|
+
top: t,
|
|
117
|
+
right: r,
|
|
118
|
+
bottom: e,
|
|
119
|
+
left: i,
|
|
120
|
+
width: n,
|
|
121
|
+
height: u,
|
|
122
|
+
x: i,
|
|
123
|
+
y: t,
|
|
137
124
|
center: {
|
|
138
|
-
x: (
|
|
139
|
-
y: (
|
|
125
|
+
x: (r + i) / 2,
|
|
126
|
+
y: (e + t) / 2
|
|
140
127
|
}
|
|
141
128
|
};
|
|
142
|
-
return
|
|
143
|
-
},
|
|
129
|
+
return s;
|
|
130
|
+
}, At = function(a, t) {
|
|
144
131
|
return {
|
|
145
|
-
top:
|
|
146
|
-
left:
|
|
147
|
-
bottom:
|
|
148
|
-
right:
|
|
132
|
+
top: a.top - t.top,
|
|
133
|
+
left: a.left - t.left,
|
|
134
|
+
bottom: a.bottom + t.bottom,
|
|
135
|
+
right: a.right + t.right
|
|
149
136
|
};
|
|
150
|
-
},
|
|
137
|
+
}, Ge = function(a, t) {
|
|
151
138
|
return {
|
|
152
|
-
top:
|
|
153
|
-
left:
|
|
154
|
-
bottom:
|
|
155
|
-
right:
|
|
139
|
+
top: a.top + t.top,
|
|
140
|
+
left: a.left + t.left,
|
|
141
|
+
bottom: a.bottom - t.bottom,
|
|
142
|
+
right: a.right - t.right
|
|
156
143
|
};
|
|
157
|
-
},
|
|
144
|
+
}, Ue = {
|
|
158
145
|
top: 0,
|
|
159
146
|
right: 0,
|
|
160
147
|
bottom: 0,
|
|
161
148
|
left: 0
|
|
162
|
-
},
|
|
163
|
-
var
|
|
149
|
+
}, Lt = function(a) {
|
|
150
|
+
var t = a.borderBox, r = a.margin, e = r === void 0 ? Ue : r, i = a.border, n = i === void 0 ? Ue : i, u = a.padding, s = u === void 0 ? Ue : u, l = Te(At(t, e)), d = Te(Ge(t, n)), m = Te(Ge(d, s));
|
|
164
151
|
return {
|
|
165
|
-
marginBox:
|
|
166
|
-
borderBox:
|
|
167
|
-
paddingBox:
|
|
168
|
-
contentBox:
|
|
169
|
-
margin:
|
|
170
|
-
border:
|
|
171
|
-
padding:
|
|
152
|
+
marginBox: l,
|
|
153
|
+
borderBox: Te(t),
|
|
154
|
+
paddingBox: d,
|
|
155
|
+
contentBox: m,
|
|
156
|
+
margin: e,
|
|
157
|
+
border: n,
|
|
158
|
+
padding: s
|
|
172
159
|
};
|
|
173
|
-
},
|
|
174
|
-
var
|
|
175
|
-
if (
|
|
160
|
+
}, q = function(a) {
|
|
161
|
+
var t = a.slice(0, -2), r = a.slice(-2);
|
|
162
|
+
if (r !== "px")
|
|
176
163
|
return 0;
|
|
177
|
-
var
|
|
178
|
-
return isNaN(
|
|
179
|
-
},
|
|
180
|
-
var
|
|
181
|
-
top:
|
|
182
|
-
right:
|
|
183
|
-
bottom:
|
|
184
|
-
left:
|
|
185
|
-
},
|
|
186
|
-
top:
|
|
187
|
-
right:
|
|
188
|
-
bottom:
|
|
189
|
-
left:
|
|
190
|
-
},
|
|
191
|
-
top:
|
|
192
|
-
right:
|
|
193
|
-
bottom:
|
|
194
|
-
left:
|
|
164
|
+
var e = Number(t);
|
|
165
|
+
return isNaN(e) && (process.env.NODE_ENV !== "production" ? Xe(!1, "Could not parse value [raw: " + a + ", without suffix: " + t + "]") : Xe(!1)), e;
|
|
166
|
+
}, St = function(a, t) {
|
|
167
|
+
var r = {
|
|
168
|
+
top: q(t.marginTop),
|
|
169
|
+
right: q(t.marginRight),
|
|
170
|
+
bottom: q(t.marginBottom),
|
|
171
|
+
left: q(t.marginLeft)
|
|
172
|
+
}, e = {
|
|
173
|
+
top: q(t.paddingTop),
|
|
174
|
+
right: q(t.paddingRight),
|
|
175
|
+
bottom: q(t.paddingBottom),
|
|
176
|
+
left: q(t.paddingLeft)
|
|
177
|
+
}, i = {
|
|
178
|
+
top: q(t.borderTopWidth),
|
|
179
|
+
right: q(t.borderRightWidth),
|
|
180
|
+
bottom: q(t.borderBottomWidth),
|
|
181
|
+
left: q(t.borderLeftWidth)
|
|
195
182
|
};
|
|
196
|
-
return
|
|
197
|
-
borderBox:
|
|
198
|
-
margin:
|
|
199
|
-
padding:
|
|
200
|
-
border:
|
|
183
|
+
return Lt({
|
|
184
|
+
borderBox: a,
|
|
185
|
+
margin: r,
|
|
186
|
+
padding: e,
|
|
187
|
+
border: i
|
|
201
188
|
});
|
|
202
|
-
},
|
|
203
|
-
var
|
|
204
|
-
return
|
|
189
|
+
}, Ht = function(a) {
|
|
190
|
+
var t = a.getBoundingClientRect(), r = window.getComputedStyle(a);
|
|
191
|
+
return St(t, r);
|
|
205
192
|
};
|
|
206
|
-
const
|
|
207
|
-
const [
|
|
208
|
-
return
|
|
209
|
-
const
|
|
210
|
-
const
|
|
211
|
-
|
|
212
|
-
const
|
|
213
|
-
|
|
193
|
+
const Rt = kt ? Tt : re, It = Rt, qt = (o, a) => {
|
|
194
|
+
const [t, r] = ie(null), e = Ae();
|
|
195
|
+
return It(() => {
|
|
196
|
+
const i = () => {
|
|
197
|
+
const n = o.current;
|
|
198
|
+
n && (e.current = requestAnimationFrame(() => {
|
|
199
|
+
const u = Ht(n);
|
|
200
|
+
r(u);
|
|
214
201
|
}));
|
|
215
202
|
};
|
|
216
|
-
return
|
|
217
|
-
|
|
203
|
+
return i(), a && (window.addEventListener("resize", i), window.addEventListener("scroll", i)), () => {
|
|
204
|
+
a && (window.removeEventListener("resize", i), window.removeEventListener("scroll", i)), e.current && cancelAnimationFrame(e.current);
|
|
218
205
|
};
|
|
219
|
-
}, [
|
|
220
|
-
},
|
|
221
|
-
onClose:
|
|
222
|
-
onOpen:
|
|
223
|
-
isOpen:
|
|
224
|
-
defaultIsOpen:
|
|
225
|
-
id:
|
|
206
|
+
}, [a]), t;
|
|
207
|
+
}, Fn = qt, Ft = ({
|
|
208
|
+
onClose: o,
|
|
209
|
+
onOpen: a,
|
|
210
|
+
isOpen: t,
|
|
211
|
+
defaultIsOpen: r,
|
|
212
|
+
id: e
|
|
226
213
|
} = {}) => {
|
|
227
|
-
const [
|
|
228
|
-
|
|
229
|
-
}, [
|
|
230
|
-
|
|
231
|
-
}, [
|
|
232
|
-
|
|
233
|
-
}, [
|
|
214
|
+
const [i, n] = ie(r || !1), u = t !== void 0 ? t : i, s = t !== void 0, l = Dt(), d = e ?? `disclosure-${l}`, m = $e(a), h = $e(o), v = we(() => {
|
|
215
|
+
s || n(!1), h == null || h();
|
|
216
|
+
}, [s, h]), D = we(() => {
|
|
217
|
+
s || n(!0), m == null || m();
|
|
218
|
+
}, [s, m]), U = we(() => {
|
|
219
|
+
u ? v() : D();
|
|
220
|
+
}, [u, D, v]);
|
|
234
221
|
return {
|
|
235
|
-
onClose:
|
|
236
|
-
onOpen:
|
|
237
|
-
onToggle:
|
|
238
|
-
getButtonProps: ({ onClick:
|
|
239
|
-
...
|
|
240
|
-
"aria-expanded":
|
|
241
|
-
"aria-controls":
|
|
242
|
-
onClick(
|
|
243
|
-
|
|
222
|
+
onClose: v,
|
|
223
|
+
onOpen: D,
|
|
224
|
+
onToggle: U,
|
|
225
|
+
getButtonProps: ({ onClick: W, ...H } = {}) => ({
|
|
226
|
+
...H,
|
|
227
|
+
"aria-expanded": u,
|
|
228
|
+
"aria-controls": d,
|
|
229
|
+
onClick(R) {
|
|
230
|
+
W == null || W(R), U();
|
|
244
231
|
}
|
|
245
232
|
}),
|
|
246
|
-
getDisclosureProps: ({ ...
|
|
247
|
-
...
|
|
248
|
-
hidden: !
|
|
249
|
-
id:
|
|
233
|
+
getDisclosureProps: ({ ...W } = {}) => ({
|
|
234
|
+
...W,
|
|
235
|
+
hidden: !u,
|
|
236
|
+
id: d
|
|
250
237
|
}),
|
|
251
|
-
isOpen:
|
|
238
|
+
isOpen: u
|
|
252
239
|
};
|
|
253
|
-
},
|
|
254
|
-
const { ssr:
|
|
255
|
-
let
|
|
256
|
-
|
|
257
|
-
const [
|
|
258
|
-
media:
|
|
259
|
-
matches:
|
|
240
|
+
}, Qn = Ft, Qt = (o, a = {}) => {
|
|
241
|
+
const { ssr: t = !0, fallback: r } = a, e = Array.isArray(o) ? o : [o];
|
|
242
|
+
let i = Array.isArray(r) ? r : [r];
|
|
243
|
+
i = i.filter((s) => s != null);
|
|
244
|
+
const [n, u] = ie(() => e.map((s, l) => ({
|
|
245
|
+
media: s,
|
|
246
|
+
matches: t ? !!i[l] : window.matchMedia(s).matches
|
|
260
247
|
})));
|
|
261
|
-
return
|
|
262
|
-
const
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
media:
|
|
266
|
-
matches:
|
|
248
|
+
return re(() => {
|
|
249
|
+
const s = window;
|
|
250
|
+
u(
|
|
251
|
+
e.map((m) => ({
|
|
252
|
+
media: m,
|
|
253
|
+
matches: s.matchMedia(m).matches
|
|
267
254
|
}))
|
|
268
255
|
);
|
|
269
|
-
const
|
|
270
|
-
|
|
256
|
+
const l = e.map((m) => s.matchMedia(m)), d = (m) => {
|
|
257
|
+
u((h) => h.slice().map((v) => v.media === m.media ? { ...v, matches: m.matches } : v));
|
|
271
258
|
};
|
|
272
|
-
return
|
|
273
|
-
|
|
259
|
+
return l.forEach((m) => {
|
|
260
|
+
m.addEventListener("change", d);
|
|
274
261
|
}), () => {
|
|
275
|
-
|
|
276
|
-
|
|
262
|
+
l.forEach((m) => {
|
|
263
|
+
m.removeEventListener("change", d);
|
|
277
264
|
});
|
|
278
265
|
};
|
|
279
|
-
}, [window]),
|
|
280
|
-
},
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
266
|
+
}, [window]), n.map((s) => s.matches);
|
|
267
|
+
}, Bn = Qt, Bt = ({
|
|
268
|
+
value: o,
|
|
269
|
+
thousandSeparator: a = ".",
|
|
270
|
+
decimalLength: t,
|
|
271
|
+
decimalSeparator: r = ",",
|
|
272
|
+
prefix: e = ""
|
|
273
|
+
}) => {
|
|
274
|
+
const n = ((u) => {
|
|
275
|
+
const s = u.toString().split("."), l = s[0].replace(/\B(?=(\d{3})+(?!\d))/g, a);
|
|
276
|
+
let d = "";
|
|
277
|
+
return t !== void 0 ? s.length > 1 && t > 0 ? d = r + s[1].padEnd(t, "0").slice(0, t) : t > 0 && (d = r + "0".repeat(t)) : s.length > 1 && (d = r + s[1]), l + d;
|
|
278
|
+
})(o);
|
|
279
|
+
return n.charAt(0) === "-" ? n.replace(/^-/g, `-${e}`) : `${e}${n}`;
|
|
280
|
+
}, ge = Bt, jt = () => {
|
|
281
|
+
const [o, a] = ie(navigator.onLine);
|
|
282
|
+
return re(() => {
|
|
283
|
+
const t = () => a(navigator.onLine);
|
|
284
|
+
return window.addEventListener("online", t), window.addEventListener("offline", t), () => {
|
|
285
|
+
window.removeEventListener("online", t), window.removeEventListener("offline", t);
|
|
286
286
|
};
|
|
287
|
-
}, []), { isOnline:
|
|
288
|
-
},
|
|
289
|
-
const
|
|
287
|
+
}, []), { isOnline: o, isOffline: !o };
|
|
288
|
+
}, jn = jt, Vt = ({ enabled: o = !0, ref: a, handler: t }) => {
|
|
289
|
+
const r = $e(t), i = Ae({
|
|
290
290
|
isPointerDown: !1,
|
|
291
291
|
ignoreEmulatedMouseEvents: !1
|
|
292
292
|
}).current;
|
|
293
|
-
|
|
294
|
-
if (!
|
|
293
|
+
re(() => {
|
|
294
|
+
if (!o)
|
|
295
295
|
return;
|
|
296
|
-
const
|
|
297
|
-
|
|
298
|
-
},
|
|
299
|
-
if (
|
|
300
|
-
|
|
296
|
+
const n = (d) => {
|
|
297
|
+
Oe(d, a) && (i.isPointerDown = !0);
|
|
298
|
+
}, u = (d) => {
|
|
299
|
+
if (i.ignoreEmulatedMouseEvents) {
|
|
300
|
+
i.ignoreEmulatedMouseEvents = !1;
|
|
301
301
|
return;
|
|
302
302
|
}
|
|
303
|
-
|
|
304
|
-
},
|
|
305
|
-
|
|
306
|
-
},
|
|
307
|
-
return
|
|
308
|
-
|
|
303
|
+
i.isPointerDown && t && Oe(d, a) && (i.isPointerDown = !1, r(d));
|
|
304
|
+
}, s = (d) => {
|
|
305
|
+
i.ignoreEmulatedMouseEvents = !0, t && i.isPointerDown && Oe(d, a) && (i.isPointerDown = !1, r(d));
|
|
306
|
+
}, l = at(a.current);
|
|
307
|
+
return l.addEventListener("mousedown", n, !0), l.addEventListener("mouseup", u, !0), l.addEventListener("touchstart", n, !0), l.addEventListener("touchend", s, !0), () => {
|
|
308
|
+
l.removeEventListener("mousedown", n, !0), l.removeEventListener("mouseup", u, !0), l.removeEventListener("touchstart", n, !0), l.removeEventListener("touchend", s, !0);
|
|
309
309
|
};
|
|
310
|
-
}, [
|
|
311
|
-
},
|
|
310
|
+
}, [t, a, r, i, o]);
|
|
311
|
+
}, Vn = Vt;
|
|
312
|
+
var G = /* @__PURE__ */ ((o) => (o.product = "Product", o.order = "Order", o.gift = "Gift", o.freeShipping = "Free Shipping", o.freeInsurance = "Free Insurance", o.bundling = "Bundling", o))(G || {}), We = /* @__PURE__ */ ((o) => (o.percentage = "percentage", o.amount = "amount", o))(We || {});
|
|
313
|
+
function Xt(o) {
|
|
314
|
+
let a = "";
|
|
315
|
+
const { type: t, collections: r = [], brands: e = [], eligibilityType: i } = o;
|
|
316
|
+
return t === G.product && (r.length > 0 ? a = `Voucher hanya berlaku untuk collection ${r.map((n) => n.name).join(", ")}.` : e.length > 0 ? a = `Voucher hanya berlaku untuk produk brand ${e.map((n) => n.name).join(", ")}.` : i === "selected_products" && (a = "Voucher hanya berlaku untuk produk tertentu.")), a;
|
|
317
|
+
}
|
|
318
|
+
function K(o) {
|
|
319
|
+
return K = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(a) {
|
|
320
|
+
return typeof a;
|
|
321
|
+
} : function(a) {
|
|
322
|
+
return a && typeof Symbol == "function" && a.constructor === Symbol && a !== Symbol.prototype ? "symbol" : typeof a;
|
|
323
|
+
}, K(o);
|
|
324
|
+
}
|
|
325
|
+
function L(o) {
|
|
326
|
+
if (o === null || o === !0 || o === !1)
|
|
327
|
+
return NaN;
|
|
328
|
+
var a = Number(o);
|
|
329
|
+
return isNaN(a) ? a : a < 0 ? Math.ceil(a) : Math.floor(a);
|
|
330
|
+
}
|
|
331
|
+
function O(o, a) {
|
|
332
|
+
if (a.length < o)
|
|
333
|
+
throw new TypeError(o + " argument" + (o > 1 ? "s" : "") + " required, but only " + a.length + " present");
|
|
334
|
+
}
|
|
335
|
+
function _(o) {
|
|
336
|
+
O(1, arguments);
|
|
337
|
+
var a = Object.prototype.toString.call(o);
|
|
338
|
+
return o instanceof Date || K(o) === "object" && a === "[object Date]" ? new Date(o.getTime()) : typeof o == "number" || a === "[object Number]" ? new Date(o) : ((typeof o == "string" || a === "[object String]") && typeof console < "u" && (console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"), console.warn(new Error().stack)), new Date(NaN));
|
|
339
|
+
}
|
|
340
|
+
function Gt(o, a) {
|
|
341
|
+
O(2, arguments);
|
|
342
|
+
var t = _(o).getTime(), r = L(a);
|
|
343
|
+
return new Date(t + r);
|
|
344
|
+
}
|
|
345
|
+
var Kt = {};
|
|
346
|
+
function ce() {
|
|
347
|
+
return Kt;
|
|
348
|
+
}
|
|
349
|
+
function nt(o) {
|
|
350
|
+
var a = new Date(Date.UTC(o.getFullYear(), o.getMonth(), o.getDate(), o.getHours(), o.getMinutes(), o.getSeconds(), o.getMilliseconds()));
|
|
351
|
+
return a.setUTCFullYear(o.getFullYear()), o.getTime() - a.getTime();
|
|
352
|
+
}
|
|
353
|
+
var Jt = 6e4, zt = 36e5, Zt = 1e3;
|
|
354
|
+
function er(o) {
|
|
355
|
+
return O(1, arguments), o instanceof Date || K(o) === "object" && Object.prototype.toString.call(o) === "[object Date]";
|
|
356
|
+
}
|
|
357
|
+
function Ye(o) {
|
|
358
|
+
if (O(1, arguments), !er(o) && typeof o != "number")
|
|
359
|
+
return !1;
|
|
360
|
+
var a = _(o);
|
|
361
|
+
return !isNaN(Number(a));
|
|
362
|
+
}
|
|
363
|
+
function it(o, a) {
|
|
364
|
+
O(2, arguments);
|
|
365
|
+
var t = L(a);
|
|
366
|
+
return Gt(o, -t);
|
|
367
|
+
}
|
|
368
|
+
var tr = 864e5;
|
|
369
|
+
function rr(o) {
|
|
370
|
+
O(1, arguments);
|
|
371
|
+
var a = _(o), t = a.getTime();
|
|
372
|
+
a.setUTCMonth(0, 1), a.setUTCHours(0, 0, 0, 0);
|
|
373
|
+
var r = a.getTime(), e = t - r;
|
|
374
|
+
return Math.floor(e / tr) + 1;
|
|
375
|
+
}
|
|
376
|
+
function le(o) {
|
|
377
|
+
O(1, arguments);
|
|
378
|
+
var a = 1, t = _(o), r = t.getUTCDay(), e = (r < a ? 7 : 0) + r - a;
|
|
379
|
+
return t.setUTCDate(t.getUTCDate() - e), t.setUTCHours(0, 0, 0, 0), t;
|
|
380
|
+
}
|
|
381
|
+
function ot(o) {
|
|
382
|
+
O(1, arguments);
|
|
383
|
+
var a = _(o), t = a.getUTCFullYear(), r = new Date(0);
|
|
384
|
+
r.setUTCFullYear(t + 1, 0, 4), r.setUTCHours(0, 0, 0, 0);
|
|
385
|
+
var e = le(r), i = new Date(0);
|
|
386
|
+
i.setUTCFullYear(t, 0, 4), i.setUTCHours(0, 0, 0, 0);
|
|
387
|
+
var n = le(i);
|
|
388
|
+
return a.getTime() >= e.getTime() ? t + 1 : a.getTime() >= n.getTime() ? t : t - 1;
|
|
389
|
+
}
|
|
390
|
+
function ar(o) {
|
|
391
|
+
O(1, arguments);
|
|
392
|
+
var a = ot(o), t = new Date(0);
|
|
393
|
+
t.setUTCFullYear(a, 0, 4), t.setUTCHours(0, 0, 0, 0);
|
|
394
|
+
var r = le(t);
|
|
395
|
+
return r;
|
|
396
|
+
}
|
|
397
|
+
var nr = 6048e5;
|
|
398
|
+
function ut(o) {
|
|
399
|
+
O(1, arguments);
|
|
400
|
+
var a = _(o), t = le(a).getTime() - ar(a).getTime();
|
|
401
|
+
return Math.round(t / nr) + 1;
|
|
402
|
+
}
|
|
403
|
+
function oe(o, a) {
|
|
404
|
+
var t, r, e, i, n, u, s, l;
|
|
405
|
+
O(1, arguments);
|
|
406
|
+
var d = ce(), m = L((t = (r = (e = (i = a == null ? void 0 : a.weekStartsOn) !== null && i !== void 0 ? i : a == null || (n = a.locale) === null || n === void 0 || (u = n.options) === null || u === void 0 ? void 0 : u.weekStartsOn) !== null && e !== void 0 ? e : d.weekStartsOn) !== null && r !== void 0 ? r : (s = d.locale) === null || s === void 0 || (l = s.options) === null || l === void 0 ? void 0 : l.weekStartsOn) !== null && t !== void 0 ? t : 0);
|
|
407
|
+
if (!(m >= 0 && m <= 6))
|
|
408
|
+
throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
|
|
409
|
+
var h = _(o), v = h.getUTCDay(), D = (v < m ? 7 : 0) + v - m;
|
|
410
|
+
return h.setUTCDate(h.getUTCDate() - D), h.setUTCHours(0, 0, 0, 0), h;
|
|
411
|
+
}
|
|
412
|
+
function Le(o, a) {
|
|
413
|
+
var t, r, e, i, n, u, s, l;
|
|
414
|
+
O(1, arguments);
|
|
415
|
+
var d = _(o), m = d.getUTCFullYear(), h = ce(), v = L((t = (r = (e = (i = a == null ? void 0 : a.firstWeekContainsDate) !== null && i !== void 0 ? i : a == null || (n = a.locale) === null || n === void 0 || (u = n.options) === null || u === void 0 ? void 0 : u.firstWeekContainsDate) !== null && e !== void 0 ? e : h.firstWeekContainsDate) !== null && r !== void 0 ? r : (s = h.locale) === null || s === void 0 || (l = s.options) === null || l === void 0 ? void 0 : l.firstWeekContainsDate) !== null && t !== void 0 ? t : 1);
|
|
416
|
+
if (!(v >= 1 && v <= 7))
|
|
417
|
+
throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
|
|
418
|
+
var D = new Date(0);
|
|
419
|
+
D.setUTCFullYear(m + 1, 0, v), D.setUTCHours(0, 0, 0, 0);
|
|
420
|
+
var U = oe(D, a), $ = new Date(0);
|
|
421
|
+
$.setUTCFullYear(m, 0, v), $.setUTCHours(0, 0, 0, 0);
|
|
422
|
+
var E = oe($, a);
|
|
423
|
+
return d.getTime() >= U.getTime() ? m + 1 : d.getTime() >= E.getTime() ? m : m - 1;
|
|
424
|
+
}
|
|
425
|
+
function ir(o, a) {
|
|
426
|
+
var t, r, e, i, n, u, s, l;
|
|
427
|
+
O(1, arguments);
|
|
428
|
+
var d = ce(), m = L((t = (r = (e = (i = a == null ? void 0 : a.firstWeekContainsDate) !== null && i !== void 0 ? i : a == null || (n = a.locale) === null || n === void 0 || (u = n.options) === null || u === void 0 ? void 0 : u.firstWeekContainsDate) !== null && e !== void 0 ? e : d.firstWeekContainsDate) !== null && r !== void 0 ? r : (s = d.locale) === null || s === void 0 || (l = s.options) === null || l === void 0 ? void 0 : l.firstWeekContainsDate) !== null && t !== void 0 ? t : 1), h = Le(o, a), v = new Date(0);
|
|
429
|
+
v.setUTCFullYear(h, 0, m), v.setUTCHours(0, 0, 0, 0);
|
|
430
|
+
var D = oe(v, a);
|
|
431
|
+
return D;
|
|
432
|
+
}
|
|
433
|
+
var or = 6048e5;
|
|
434
|
+
function st(o, a) {
|
|
435
|
+
O(1, arguments);
|
|
436
|
+
var t = _(o), r = oe(t, a).getTime() - ir(t, a).getTime();
|
|
437
|
+
return Math.round(r / or) + 1;
|
|
438
|
+
}
|
|
439
|
+
function T(o, a) {
|
|
440
|
+
for (var t = o < 0 ? "-" : "", r = Math.abs(o).toString(); r.length < a; )
|
|
441
|
+
r = "0" + r;
|
|
442
|
+
return t + r;
|
|
443
|
+
}
|
|
444
|
+
var ur = {
|
|
445
|
+
// Year
|
|
446
|
+
y: function(a, t) {
|
|
447
|
+
var r = a.getUTCFullYear(), e = r > 0 ? r : 1 - r;
|
|
448
|
+
return T(t === "yy" ? e % 100 : e, t.length);
|
|
449
|
+
},
|
|
450
|
+
// Month
|
|
451
|
+
M: function(a, t) {
|
|
452
|
+
var r = a.getUTCMonth();
|
|
453
|
+
return t === "M" ? String(r + 1) : T(r + 1, 2);
|
|
454
|
+
},
|
|
455
|
+
// Day of the month
|
|
456
|
+
d: function(a, t) {
|
|
457
|
+
return T(a.getUTCDate(), t.length);
|
|
458
|
+
},
|
|
459
|
+
// AM or PM
|
|
460
|
+
a: function(a, t) {
|
|
461
|
+
var r = a.getUTCHours() / 12 >= 1 ? "pm" : "am";
|
|
462
|
+
switch (t) {
|
|
463
|
+
case "a":
|
|
464
|
+
case "aa":
|
|
465
|
+
return r.toUpperCase();
|
|
466
|
+
case "aaa":
|
|
467
|
+
return r;
|
|
468
|
+
case "aaaaa":
|
|
469
|
+
return r[0];
|
|
470
|
+
case "aaaa":
|
|
471
|
+
default:
|
|
472
|
+
return r === "am" ? "a.m." : "p.m.";
|
|
473
|
+
}
|
|
474
|
+
},
|
|
475
|
+
// Hour [1-12]
|
|
476
|
+
h: function(a, t) {
|
|
477
|
+
return T(a.getUTCHours() % 12 || 12, t.length);
|
|
478
|
+
},
|
|
479
|
+
// Hour [0-23]
|
|
480
|
+
H: function(a, t) {
|
|
481
|
+
return T(a.getUTCHours(), t.length);
|
|
482
|
+
},
|
|
483
|
+
// Minute
|
|
484
|
+
m: function(a, t) {
|
|
485
|
+
return T(a.getUTCMinutes(), t.length);
|
|
486
|
+
},
|
|
487
|
+
// Second
|
|
488
|
+
s: function(a, t) {
|
|
489
|
+
return T(a.getUTCSeconds(), t.length);
|
|
490
|
+
},
|
|
491
|
+
// Fraction of second
|
|
492
|
+
S: function(a, t) {
|
|
493
|
+
var r = t.length, e = a.getUTCMilliseconds(), i = Math.floor(e * Math.pow(10, r - 3));
|
|
494
|
+
return T(i, t.length);
|
|
495
|
+
}
|
|
496
|
+
};
|
|
497
|
+
const Z = ur;
|
|
498
|
+
var ue = {
|
|
499
|
+
am: "am",
|
|
500
|
+
pm: "pm",
|
|
501
|
+
midnight: "midnight",
|
|
502
|
+
noon: "noon",
|
|
503
|
+
morning: "morning",
|
|
504
|
+
afternoon: "afternoon",
|
|
505
|
+
evening: "evening",
|
|
506
|
+
night: "night"
|
|
507
|
+
}, sr = {
|
|
508
|
+
// Era
|
|
509
|
+
G: function(a, t, r) {
|
|
510
|
+
var e = a.getUTCFullYear() > 0 ? 1 : 0;
|
|
511
|
+
switch (t) {
|
|
512
|
+
case "G":
|
|
513
|
+
case "GG":
|
|
514
|
+
case "GGG":
|
|
515
|
+
return r.era(e, {
|
|
516
|
+
width: "abbreviated"
|
|
517
|
+
});
|
|
518
|
+
case "GGGGG":
|
|
519
|
+
return r.era(e, {
|
|
520
|
+
width: "narrow"
|
|
521
|
+
});
|
|
522
|
+
case "GGGG":
|
|
523
|
+
default:
|
|
524
|
+
return r.era(e, {
|
|
525
|
+
width: "wide"
|
|
526
|
+
});
|
|
527
|
+
}
|
|
528
|
+
},
|
|
529
|
+
// Year
|
|
530
|
+
y: function(a, t, r) {
|
|
531
|
+
if (t === "yo") {
|
|
532
|
+
var e = a.getUTCFullYear(), i = e > 0 ? e : 1 - e;
|
|
533
|
+
return r.ordinalNumber(i, {
|
|
534
|
+
unit: "year"
|
|
535
|
+
});
|
|
536
|
+
}
|
|
537
|
+
return Z.y(a, t);
|
|
538
|
+
},
|
|
539
|
+
// Local week-numbering year
|
|
540
|
+
Y: function(a, t, r, e) {
|
|
541
|
+
var i = Le(a, e), n = i > 0 ? i : 1 - i;
|
|
542
|
+
if (t === "YY") {
|
|
543
|
+
var u = n % 100;
|
|
544
|
+
return T(u, 2);
|
|
545
|
+
}
|
|
546
|
+
return t === "Yo" ? r.ordinalNumber(n, {
|
|
547
|
+
unit: "year"
|
|
548
|
+
}) : T(n, t.length);
|
|
549
|
+
},
|
|
550
|
+
// ISO week-numbering year
|
|
551
|
+
R: function(a, t) {
|
|
552
|
+
var r = ot(a);
|
|
553
|
+
return T(r, t.length);
|
|
554
|
+
},
|
|
555
|
+
// Extended year. This is a single number designating the year of this calendar system.
|
|
556
|
+
// The main difference between `y` and `u` localizers are B.C. years:
|
|
557
|
+
// | Year | `y` | `u` |
|
|
558
|
+
// |------|-----|-----|
|
|
559
|
+
// | AC 1 | 1 | 1 |
|
|
560
|
+
// | BC 1 | 1 | 0 |
|
|
561
|
+
// | BC 2 | 2 | -1 |
|
|
562
|
+
// Also `yy` always returns the last two digits of a year,
|
|
563
|
+
// while `uu` pads single digit years to 2 characters and returns other years unchanged.
|
|
564
|
+
u: function(a, t) {
|
|
565
|
+
var r = a.getUTCFullYear();
|
|
566
|
+
return T(r, t.length);
|
|
567
|
+
},
|
|
568
|
+
// Quarter
|
|
569
|
+
Q: function(a, t, r) {
|
|
570
|
+
var e = Math.ceil((a.getUTCMonth() + 1) / 3);
|
|
571
|
+
switch (t) {
|
|
572
|
+
case "Q":
|
|
573
|
+
return String(e);
|
|
574
|
+
case "QQ":
|
|
575
|
+
return T(e, 2);
|
|
576
|
+
case "Qo":
|
|
577
|
+
return r.ordinalNumber(e, {
|
|
578
|
+
unit: "quarter"
|
|
579
|
+
});
|
|
580
|
+
case "QQQ":
|
|
581
|
+
return r.quarter(e, {
|
|
582
|
+
width: "abbreviated",
|
|
583
|
+
context: "formatting"
|
|
584
|
+
});
|
|
585
|
+
case "QQQQQ":
|
|
586
|
+
return r.quarter(e, {
|
|
587
|
+
width: "narrow",
|
|
588
|
+
context: "formatting"
|
|
589
|
+
});
|
|
590
|
+
case "QQQQ":
|
|
591
|
+
default:
|
|
592
|
+
return r.quarter(e, {
|
|
593
|
+
width: "wide",
|
|
594
|
+
context: "formatting"
|
|
595
|
+
});
|
|
596
|
+
}
|
|
597
|
+
},
|
|
598
|
+
// Stand-alone quarter
|
|
599
|
+
q: function(a, t, r) {
|
|
600
|
+
var e = Math.ceil((a.getUTCMonth() + 1) / 3);
|
|
601
|
+
switch (t) {
|
|
602
|
+
case "q":
|
|
603
|
+
return String(e);
|
|
604
|
+
case "qq":
|
|
605
|
+
return T(e, 2);
|
|
606
|
+
case "qo":
|
|
607
|
+
return r.ordinalNumber(e, {
|
|
608
|
+
unit: "quarter"
|
|
609
|
+
});
|
|
610
|
+
case "qqq":
|
|
611
|
+
return r.quarter(e, {
|
|
612
|
+
width: "abbreviated",
|
|
613
|
+
context: "standalone"
|
|
614
|
+
});
|
|
615
|
+
case "qqqqq":
|
|
616
|
+
return r.quarter(e, {
|
|
617
|
+
width: "narrow",
|
|
618
|
+
context: "standalone"
|
|
619
|
+
});
|
|
620
|
+
case "qqqq":
|
|
621
|
+
default:
|
|
622
|
+
return r.quarter(e, {
|
|
623
|
+
width: "wide",
|
|
624
|
+
context: "standalone"
|
|
625
|
+
});
|
|
626
|
+
}
|
|
627
|
+
},
|
|
628
|
+
// Month
|
|
629
|
+
M: function(a, t, r) {
|
|
630
|
+
var e = a.getUTCMonth();
|
|
631
|
+
switch (t) {
|
|
632
|
+
case "M":
|
|
633
|
+
case "MM":
|
|
634
|
+
return Z.M(a, t);
|
|
635
|
+
case "Mo":
|
|
636
|
+
return r.ordinalNumber(e + 1, {
|
|
637
|
+
unit: "month"
|
|
638
|
+
});
|
|
639
|
+
case "MMM":
|
|
640
|
+
return r.month(e, {
|
|
641
|
+
width: "abbreviated",
|
|
642
|
+
context: "formatting"
|
|
643
|
+
});
|
|
644
|
+
case "MMMMM":
|
|
645
|
+
return r.month(e, {
|
|
646
|
+
width: "narrow",
|
|
647
|
+
context: "formatting"
|
|
648
|
+
});
|
|
649
|
+
case "MMMM":
|
|
650
|
+
default:
|
|
651
|
+
return r.month(e, {
|
|
652
|
+
width: "wide",
|
|
653
|
+
context: "formatting"
|
|
654
|
+
});
|
|
655
|
+
}
|
|
656
|
+
},
|
|
657
|
+
// Stand-alone month
|
|
658
|
+
L: function(a, t, r) {
|
|
659
|
+
var e = a.getUTCMonth();
|
|
660
|
+
switch (t) {
|
|
661
|
+
case "L":
|
|
662
|
+
return String(e + 1);
|
|
663
|
+
case "LL":
|
|
664
|
+
return T(e + 1, 2);
|
|
665
|
+
case "Lo":
|
|
666
|
+
return r.ordinalNumber(e + 1, {
|
|
667
|
+
unit: "month"
|
|
668
|
+
});
|
|
669
|
+
case "LLL":
|
|
670
|
+
return r.month(e, {
|
|
671
|
+
width: "abbreviated",
|
|
672
|
+
context: "standalone"
|
|
673
|
+
});
|
|
674
|
+
case "LLLLL":
|
|
675
|
+
return r.month(e, {
|
|
676
|
+
width: "narrow",
|
|
677
|
+
context: "standalone"
|
|
678
|
+
});
|
|
679
|
+
case "LLLL":
|
|
680
|
+
default:
|
|
681
|
+
return r.month(e, {
|
|
682
|
+
width: "wide",
|
|
683
|
+
context: "standalone"
|
|
684
|
+
});
|
|
685
|
+
}
|
|
686
|
+
},
|
|
687
|
+
// Local week of year
|
|
688
|
+
w: function(a, t, r, e) {
|
|
689
|
+
var i = st(a, e);
|
|
690
|
+
return t === "wo" ? r.ordinalNumber(i, {
|
|
691
|
+
unit: "week"
|
|
692
|
+
}) : T(i, t.length);
|
|
693
|
+
},
|
|
694
|
+
// ISO week of year
|
|
695
|
+
I: function(a, t, r) {
|
|
696
|
+
var e = ut(a);
|
|
697
|
+
return t === "Io" ? r.ordinalNumber(e, {
|
|
698
|
+
unit: "week"
|
|
699
|
+
}) : T(e, t.length);
|
|
700
|
+
},
|
|
701
|
+
// Day of the month
|
|
702
|
+
d: function(a, t, r) {
|
|
703
|
+
return t === "do" ? r.ordinalNumber(a.getUTCDate(), {
|
|
704
|
+
unit: "date"
|
|
705
|
+
}) : Z.d(a, t);
|
|
706
|
+
},
|
|
707
|
+
// Day of year
|
|
708
|
+
D: function(a, t, r) {
|
|
709
|
+
var e = rr(a);
|
|
710
|
+
return t === "Do" ? r.ordinalNumber(e, {
|
|
711
|
+
unit: "dayOfYear"
|
|
712
|
+
}) : T(e, t.length);
|
|
713
|
+
},
|
|
714
|
+
// Day of week
|
|
715
|
+
E: function(a, t, r) {
|
|
716
|
+
var e = a.getUTCDay();
|
|
717
|
+
switch (t) {
|
|
718
|
+
case "E":
|
|
719
|
+
case "EE":
|
|
720
|
+
case "EEE":
|
|
721
|
+
return r.day(e, {
|
|
722
|
+
width: "abbreviated",
|
|
723
|
+
context: "formatting"
|
|
724
|
+
});
|
|
725
|
+
case "EEEEE":
|
|
726
|
+
return r.day(e, {
|
|
727
|
+
width: "narrow",
|
|
728
|
+
context: "formatting"
|
|
729
|
+
});
|
|
730
|
+
case "EEEEEE":
|
|
731
|
+
return r.day(e, {
|
|
732
|
+
width: "short",
|
|
733
|
+
context: "formatting"
|
|
734
|
+
});
|
|
735
|
+
case "EEEE":
|
|
736
|
+
default:
|
|
737
|
+
return r.day(e, {
|
|
738
|
+
width: "wide",
|
|
739
|
+
context: "formatting"
|
|
740
|
+
});
|
|
741
|
+
}
|
|
742
|
+
},
|
|
743
|
+
// Local day of week
|
|
744
|
+
e: function(a, t, r, e) {
|
|
745
|
+
var i = a.getUTCDay(), n = (i - e.weekStartsOn + 8) % 7 || 7;
|
|
746
|
+
switch (t) {
|
|
747
|
+
case "e":
|
|
748
|
+
return String(n);
|
|
749
|
+
case "ee":
|
|
750
|
+
return T(n, 2);
|
|
751
|
+
case "eo":
|
|
752
|
+
return r.ordinalNumber(n, {
|
|
753
|
+
unit: "day"
|
|
754
|
+
});
|
|
755
|
+
case "eee":
|
|
756
|
+
return r.day(i, {
|
|
757
|
+
width: "abbreviated",
|
|
758
|
+
context: "formatting"
|
|
759
|
+
});
|
|
760
|
+
case "eeeee":
|
|
761
|
+
return r.day(i, {
|
|
762
|
+
width: "narrow",
|
|
763
|
+
context: "formatting"
|
|
764
|
+
});
|
|
765
|
+
case "eeeeee":
|
|
766
|
+
return r.day(i, {
|
|
767
|
+
width: "short",
|
|
768
|
+
context: "formatting"
|
|
769
|
+
});
|
|
770
|
+
case "eeee":
|
|
771
|
+
default:
|
|
772
|
+
return r.day(i, {
|
|
773
|
+
width: "wide",
|
|
774
|
+
context: "formatting"
|
|
775
|
+
});
|
|
776
|
+
}
|
|
777
|
+
},
|
|
778
|
+
// Stand-alone local day of week
|
|
779
|
+
c: function(a, t, r, e) {
|
|
780
|
+
var i = a.getUTCDay(), n = (i - e.weekStartsOn + 8) % 7 || 7;
|
|
781
|
+
switch (t) {
|
|
782
|
+
case "c":
|
|
783
|
+
return String(n);
|
|
784
|
+
case "cc":
|
|
785
|
+
return T(n, t.length);
|
|
786
|
+
case "co":
|
|
787
|
+
return r.ordinalNumber(n, {
|
|
788
|
+
unit: "day"
|
|
789
|
+
});
|
|
790
|
+
case "ccc":
|
|
791
|
+
return r.day(i, {
|
|
792
|
+
width: "abbreviated",
|
|
793
|
+
context: "standalone"
|
|
794
|
+
});
|
|
795
|
+
case "ccccc":
|
|
796
|
+
return r.day(i, {
|
|
797
|
+
width: "narrow",
|
|
798
|
+
context: "standalone"
|
|
799
|
+
});
|
|
800
|
+
case "cccccc":
|
|
801
|
+
return r.day(i, {
|
|
802
|
+
width: "short",
|
|
803
|
+
context: "standalone"
|
|
804
|
+
});
|
|
805
|
+
case "cccc":
|
|
806
|
+
default:
|
|
807
|
+
return r.day(i, {
|
|
808
|
+
width: "wide",
|
|
809
|
+
context: "standalone"
|
|
810
|
+
});
|
|
811
|
+
}
|
|
812
|
+
},
|
|
813
|
+
// ISO day of week
|
|
814
|
+
i: function(a, t, r) {
|
|
815
|
+
var e = a.getUTCDay(), i = e === 0 ? 7 : e;
|
|
816
|
+
switch (t) {
|
|
817
|
+
case "i":
|
|
818
|
+
return String(i);
|
|
819
|
+
case "ii":
|
|
820
|
+
return T(i, t.length);
|
|
821
|
+
case "io":
|
|
822
|
+
return r.ordinalNumber(i, {
|
|
823
|
+
unit: "day"
|
|
824
|
+
});
|
|
825
|
+
case "iii":
|
|
826
|
+
return r.day(e, {
|
|
827
|
+
width: "abbreviated",
|
|
828
|
+
context: "formatting"
|
|
829
|
+
});
|
|
830
|
+
case "iiiii":
|
|
831
|
+
return r.day(e, {
|
|
832
|
+
width: "narrow",
|
|
833
|
+
context: "formatting"
|
|
834
|
+
});
|
|
835
|
+
case "iiiiii":
|
|
836
|
+
return r.day(e, {
|
|
837
|
+
width: "short",
|
|
838
|
+
context: "formatting"
|
|
839
|
+
});
|
|
840
|
+
case "iiii":
|
|
841
|
+
default:
|
|
842
|
+
return r.day(e, {
|
|
843
|
+
width: "wide",
|
|
844
|
+
context: "formatting"
|
|
845
|
+
});
|
|
846
|
+
}
|
|
847
|
+
},
|
|
848
|
+
// AM or PM
|
|
849
|
+
a: function(a, t, r) {
|
|
850
|
+
var e = a.getUTCHours(), i = e / 12 >= 1 ? "pm" : "am";
|
|
851
|
+
switch (t) {
|
|
852
|
+
case "a":
|
|
853
|
+
case "aa":
|
|
854
|
+
return r.dayPeriod(i, {
|
|
855
|
+
width: "abbreviated",
|
|
856
|
+
context: "formatting"
|
|
857
|
+
});
|
|
858
|
+
case "aaa":
|
|
859
|
+
return r.dayPeriod(i, {
|
|
860
|
+
width: "abbreviated",
|
|
861
|
+
context: "formatting"
|
|
862
|
+
}).toLowerCase();
|
|
863
|
+
case "aaaaa":
|
|
864
|
+
return r.dayPeriod(i, {
|
|
865
|
+
width: "narrow",
|
|
866
|
+
context: "formatting"
|
|
867
|
+
});
|
|
868
|
+
case "aaaa":
|
|
869
|
+
default:
|
|
870
|
+
return r.dayPeriod(i, {
|
|
871
|
+
width: "wide",
|
|
872
|
+
context: "formatting"
|
|
873
|
+
});
|
|
874
|
+
}
|
|
875
|
+
},
|
|
876
|
+
// AM, PM, midnight, noon
|
|
877
|
+
b: function(a, t, r) {
|
|
878
|
+
var e = a.getUTCHours(), i;
|
|
879
|
+
switch (e === 12 ? i = ue.noon : e === 0 ? i = ue.midnight : i = e / 12 >= 1 ? "pm" : "am", t) {
|
|
880
|
+
case "b":
|
|
881
|
+
case "bb":
|
|
882
|
+
return r.dayPeriod(i, {
|
|
883
|
+
width: "abbreviated",
|
|
884
|
+
context: "formatting"
|
|
885
|
+
});
|
|
886
|
+
case "bbb":
|
|
887
|
+
return r.dayPeriod(i, {
|
|
888
|
+
width: "abbreviated",
|
|
889
|
+
context: "formatting"
|
|
890
|
+
}).toLowerCase();
|
|
891
|
+
case "bbbbb":
|
|
892
|
+
return r.dayPeriod(i, {
|
|
893
|
+
width: "narrow",
|
|
894
|
+
context: "formatting"
|
|
895
|
+
});
|
|
896
|
+
case "bbbb":
|
|
897
|
+
default:
|
|
898
|
+
return r.dayPeriod(i, {
|
|
899
|
+
width: "wide",
|
|
900
|
+
context: "formatting"
|
|
901
|
+
});
|
|
902
|
+
}
|
|
903
|
+
},
|
|
904
|
+
// in the morning, in the afternoon, in the evening, at night
|
|
905
|
+
B: function(a, t, r) {
|
|
906
|
+
var e = a.getUTCHours(), i;
|
|
907
|
+
switch (e >= 17 ? i = ue.evening : e >= 12 ? i = ue.afternoon : e >= 4 ? i = ue.morning : i = ue.night, t) {
|
|
908
|
+
case "B":
|
|
909
|
+
case "BB":
|
|
910
|
+
case "BBB":
|
|
911
|
+
return r.dayPeriod(i, {
|
|
912
|
+
width: "abbreviated",
|
|
913
|
+
context: "formatting"
|
|
914
|
+
});
|
|
915
|
+
case "BBBBB":
|
|
916
|
+
return r.dayPeriod(i, {
|
|
917
|
+
width: "narrow",
|
|
918
|
+
context: "formatting"
|
|
919
|
+
});
|
|
920
|
+
case "BBBB":
|
|
921
|
+
default:
|
|
922
|
+
return r.dayPeriod(i, {
|
|
923
|
+
width: "wide",
|
|
924
|
+
context: "formatting"
|
|
925
|
+
});
|
|
926
|
+
}
|
|
927
|
+
},
|
|
928
|
+
// Hour [1-12]
|
|
929
|
+
h: function(a, t, r) {
|
|
930
|
+
if (t === "ho") {
|
|
931
|
+
var e = a.getUTCHours() % 12;
|
|
932
|
+
return e === 0 && (e = 12), r.ordinalNumber(e, {
|
|
933
|
+
unit: "hour"
|
|
934
|
+
});
|
|
935
|
+
}
|
|
936
|
+
return Z.h(a, t);
|
|
937
|
+
},
|
|
938
|
+
// Hour [0-23]
|
|
939
|
+
H: function(a, t, r) {
|
|
940
|
+
return t === "Ho" ? r.ordinalNumber(a.getUTCHours(), {
|
|
941
|
+
unit: "hour"
|
|
942
|
+
}) : Z.H(a, t);
|
|
943
|
+
},
|
|
944
|
+
// Hour [0-11]
|
|
945
|
+
K: function(a, t, r) {
|
|
946
|
+
var e = a.getUTCHours() % 12;
|
|
947
|
+
return t === "Ko" ? r.ordinalNumber(e, {
|
|
948
|
+
unit: "hour"
|
|
949
|
+
}) : T(e, t.length);
|
|
950
|
+
},
|
|
951
|
+
// Hour [1-24]
|
|
952
|
+
k: function(a, t, r) {
|
|
953
|
+
var e = a.getUTCHours();
|
|
954
|
+
return e === 0 && (e = 24), t === "ko" ? r.ordinalNumber(e, {
|
|
955
|
+
unit: "hour"
|
|
956
|
+
}) : T(e, t.length);
|
|
957
|
+
},
|
|
958
|
+
// Minute
|
|
959
|
+
m: function(a, t, r) {
|
|
960
|
+
return t === "mo" ? r.ordinalNumber(a.getUTCMinutes(), {
|
|
961
|
+
unit: "minute"
|
|
962
|
+
}) : Z.m(a, t);
|
|
963
|
+
},
|
|
964
|
+
// Second
|
|
965
|
+
s: function(a, t, r) {
|
|
966
|
+
return t === "so" ? r.ordinalNumber(a.getUTCSeconds(), {
|
|
967
|
+
unit: "second"
|
|
968
|
+
}) : Z.s(a, t);
|
|
969
|
+
},
|
|
970
|
+
// Fraction of second
|
|
971
|
+
S: function(a, t) {
|
|
972
|
+
return Z.S(a, t);
|
|
973
|
+
},
|
|
974
|
+
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
975
|
+
X: function(a, t, r, e) {
|
|
976
|
+
var i = e._originalDate || a, n = i.getTimezoneOffset();
|
|
977
|
+
if (n === 0)
|
|
978
|
+
return "Z";
|
|
979
|
+
switch (t) {
|
|
980
|
+
case "X":
|
|
981
|
+
return Je(n);
|
|
982
|
+
case "XXXX":
|
|
983
|
+
case "XX":
|
|
984
|
+
return ne(n);
|
|
985
|
+
case "XXXXX":
|
|
986
|
+
case "XXX":
|
|
987
|
+
default:
|
|
988
|
+
return ne(n, ":");
|
|
989
|
+
}
|
|
990
|
+
},
|
|
991
|
+
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
992
|
+
x: function(a, t, r, e) {
|
|
993
|
+
var i = e._originalDate || a, n = i.getTimezoneOffset();
|
|
994
|
+
switch (t) {
|
|
995
|
+
case "x":
|
|
996
|
+
return Je(n);
|
|
997
|
+
case "xxxx":
|
|
998
|
+
case "xx":
|
|
999
|
+
return ne(n);
|
|
1000
|
+
case "xxxxx":
|
|
1001
|
+
case "xxx":
|
|
1002
|
+
default:
|
|
1003
|
+
return ne(n, ":");
|
|
1004
|
+
}
|
|
1005
|
+
},
|
|
1006
|
+
// Timezone (GMT)
|
|
1007
|
+
O: function(a, t, r, e) {
|
|
1008
|
+
var i = e._originalDate || a, n = i.getTimezoneOffset();
|
|
1009
|
+
switch (t) {
|
|
1010
|
+
case "O":
|
|
1011
|
+
case "OO":
|
|
1012
|
+
case "OOO":
|
|
1013
|
+
return "GMT" + Ke(n, ":");
|
|
1014
|
+
case "OOOO":
|
|
1015
|
+
default:
|
|
1016
|
+
return "GMT" + ne(n, ":");
|
|
1017
|
+
}
|
|
1018
|
+
},
|
|
1019
|
+
// Timezone (specific non-location)
|
|
1020
|
+
z: function(a, t, r, e) {
|
|
1021
|
+
var i = e._originalDate || a, n = i.getTimezoneOffset();
|
|
1022
|
+
switch (t) {
|
|
1023
|
+
case "z":
|
|
1024
|
+
case "zz":
|
|
1025
|
+
case "zzz":
|
|
1026
|
+
return "GMT" + Ke(n, ":");
|
|
1027
|
+
case "zzzz":
|
|
1028
|
+
default:
|
|
1029
|
+
return "GMT" + ne(n, ":");
|
|
1030
|
+
}
|
|
1031
|
+
},
|
|
1032
|
+
// Seconds timestamp
|
|
1033
|
+
t: function(a, t, r, e) {
|
|
1034
|
+
var i = e._originalDate || a, n = Math.floor(i.getTime() / 1e3);
|
|
1035
|
+
return T(n, t.length);
|
|
1036
|
+
},
|
|
1037
|
+
// Milliseconds timestamp
|
|
1038
|
+
T: function(a, t, r, e) {
|
|
1039
|
+
var i = e._originalDate || a, n = i.getTime();
|
|
1040
|
+
return T(n, t.length);
|
|
1041
|
+
}
|
|
1042
|
+
};
|
|
1043
|
+
function Ke(o, a) {
|
|
1044
|
+
var t = o > 0 ? "-" : "+", r = Math.abs(o), e = Math.floor(r / 60), i = r % 60;
|
|
1045
|
+
if (i === 0)
|
|
1046
|
+
return t + String(e);
|
|
1047
|
+
var n = a || "";
|
|
1048
|
+
return t + String(e) + n + T(i, 2);
|
|
1049
|
+
}
|
|
1050
|
+
function Je(o, a) {
|
|
1051
|
+
if (o % 60 === 0) {
|
|
1052
|
+
var t = o > 0 ? "-" : "+";
|
|
1053
|
+
return t + T(Math.abs(o) / 60, 2);
|
|
1054
|
+
}
|
|
1055
|
+
return ne(o, a);
|
|
1056
|
+
}
|
|
1057
|
+
function ne(o, a) {
|
|
1058
|
+
var t = a || "", r = o > 0 ? "-" : "+", e = Math.abs(o), i = T(Math.floor(e / 60), 2), n = T(e % 60, 2);
|
|
1059
|
+
return r + i + t + n;
|
|
1060
|
+
}
|
|
1061
|
+
const lr = sr;
|
|
1062
|
+
var ze = function(a, t) {
|
|
1063
|
+
switch (a) {
|
|
1064
|
+
case "P":
|
|
1065
|
+
return t.date({
|
|
1066
|
+
width: "short"
|
|
1067
|
+
});
|
|
1068
|
+
case "PP":
|
|
1069
|
+
return t.date({
|
|
1070
|
+
width: "medium"
|
|
1071
|
+
});
|
|
1072
|
+
case "PPP":
|
|
1073
|
+
return t.date({
|
|
1074
|
+
width: "long"
|
|
1075
|
+
});
|
|
1076
|
+
case "PPPP":
|
|
1077
|
+
default:
|
|
1078
|
+
return t.date({
|
|
1079
|
+
width: "full"
|
|
1080
|
+
});
|
|
1081
|
+
}
|
|
1082
|
+
}, lt = function(a, t) {
|
|
1083
|
+
switch (a) {
|
|
1084
|
+
case "p":
|
|
1085
|
+
return t.time({
|
|
1086
|
+
width: "short"
|
|
1087
|
+
});
|
|
1088
|
+
case "pp":
|
|
1089
|
+
return t.time({
|
|
1090
|
+
width: "medium"
|
|
1091
|
+
});
|
|
1092
|
+
case "ppp":
|
|
1093
|
+
return t.time({
|
|
1094
|
+
width: "long"
|
|
1095
|
+
});
|
|
1096
|
+
case "pppp":
|
|
1097
|
+
default:
|
|
1098
|
+
return t.time({
|
|
1099
|
+
width: "full"
|
|
1100
|
+
});
|
|
1101
|
+
}
|
|
1102
|
+
}, cr = function(a, t) {
|
|
1103
|
+
var r = a.match(/(P+)(p+)?/) || [], e = r[1], i = r[2];
|
|
1104
|
+
if (!i)
|
|
1105
|
+
return ze(a, t);
|
|
1106
|
+
var n;
|
|
1107
|
+
switch (e) {
|
|
1108
|
+
case "P":
|
|
1109
|
+
n = t.dateTime({
|
|
1110
|
+
width: "short"
|
|
1111
|
+
});
|
|
1112
|
+
break;
|
|
1113
|
+
case "PP":
|
|
1114
|
+
n = t.dateTime({
|
|
1115
|
+
width: "medium"
|
|
1116
|
+
});
|
|
1117
|
+
break;
|
|
1118
|
+
case "PPP":
|
|
1119
|
+
n = t.dateTime({
|
|
1120
|
+
width: "long"
|
|
1121
|
+
});
|
|
1122
|
+
break;
|
|
1123
|
+
case "PPPP":
|
|
1124
|
+
default:
|
|
1125
|
+
n = t.dateTime({
|
|
1126
|
+
width: "full"
|
|
1127
|
+
});
|
|
1128
|
+
break;
|
|
1129
|
+
}
|
|
1130
|
+
return n.replace("{{date}}", ze(e, t)).replace("{{time}}", lt(i, t));
|
|
1131
|
+
}, dr = {
|
|
1132
|
+
p: lt,
|
|
1133
|
+
P: cr
|
|
1134
|
+
};
|
|
1135
|
+
const Ne = dr;
|
|
1136
|
+
var fr = ["D", "DD"], mr = ["YY", "YYYY"];
|
|
1137
|
+
function ct(o) {
|
|
1138
|
+
return fr.indexOf(o) !== -1;
|
|
1139
|
+
}
|
|
1140
|
+
function dt(o) {
|
|
1141
|
+
return mr.indexOf(o) !== -1;
|
|
1142
|
+
}
|
|
1143
|
+
function De(o, a, t) {
|
|
1144
|
+
if (o === "YYYY")
|
|
1145
|
+
throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(a, "`) for formatting years to the input `").concat(t, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
|
|
1146
|
+
if (o === "YY")
|
|
1147
|
+
throw new RangeError("Use `yy` instead of `YY` (in `".concat(a, "`) for formatting years to the input `").concat(t, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
|
|
1148
|
+
if (o === "D")
|
|
1149
|
+
throw new RangeError("Use `d` instead of `D` (in `".concat(a, "`) for formatting days of the month to the input `").concat(t, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
|
|
1150
|
+
if (o === "DD")
|
|
1151
|
+
throw new RangeError("Use `dd` instead of `DD` (in `".concat(a, "`) for formatting days of the month to the input `").concat(t, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
|
|
1152
|
+
}
|
|
1153
|
+
var vr = {
|
|
1154
|
+
lessThanXSeconds: {
|
|
1155
|
+
one: "less than a second",
|
|
1156
|
+
other: "less than {{count}} seconds"
|
|
1157
|
+
},
|
|
1158
|
+
xSeconds: {
|
|
1159
|
+
one: "1 second",
|
|
1160
|
+
other: "{{count}} seconds"
|
|
1161
|
+
},
|
|
1162
|
+
halfAMinute: "half a minute",
|
|
1163
|
+
lessThanXMinutes: {
|
|
1164
|
+
one: "less than a minute",
|
|
1165
|
+
other: "less than {{count}} minutes"
|
|
1166
|
+
},
|
|
1167
|
+
xMinutes: {
|
|
1168
|
+
one: "1 minute",
|
|
1169
|
+
other: "{{count}} minutes"
|
|
1170
|
+
},
|
|
1171
|
+
aboutXHours: {
|
|
1172
|
+
one: "about 1 hour",
|
|
1173
|
+
other: "about {{count}} hours"
|
|
1174
|
+
},
|
|
1175
|
+
xHours: {
|
|
1176
|
+
one: "1 hour",
|
|
1177
|
+
other: "{{count}} hours"
|
|
1178
|
+
},
|
|
1179
|
+
xDays: {
|
|
1180
|
+
one: "1 day",
|
|
1181
|
+
other: "{{count}} days"
|
|
1182
|
+
},
|
|
1183
|
+
aboutXWeeks: {
|
|
1184
|
+
one: "about 1 week",
|
|
1185
|
+
other: "about {{count}} weeks"
|
|
1186
|
+
},
|
|
1187
|
+
xWeeks: {
|
|
1188
|
+
one: "1 week",
|
|
1189
|
+
other: "{{count}} weeks"
|
|
1190
|
+
},
|
|
1191
|
+
aboutXMonths: {
|
|
1192
|
+
one: "about 1 month",
|
|
1193
|
+
other: "about {{count}} months"
|
|
1194
|
+
},
|
|
1195
|
+
xMonths: {
|
|
1196
|
+
one: "1 month",
|
|
1197
|
+
other: "{{count}} months"
|
|
1198
|
+
},
|
|
1199
|
+
aboutXYears: {
|
|
1200
|
+
one: "about 1 year",
|
|
1201
|
+
other: "about {{count}} years"
|
|
1202
|
+
},
|
|
1203
|
+
xYears: {
|
|
1204
|
+
one: "1 year",
|
|
1205
|
+
other: "{{count}} years"
|
|
1206
|
+
},
|
|
1207
|
+
overXYears: {
|
|
1208
|
+
one: "over 1 year",
|
|
1209
|
+
other: "over {{count}} years"
|
|
1210
|
+
},
|
|
1211
|
+
almostXYears: {
|
|
1212
|
+
one: "almost 1 year",
|
|
1213
|
+
other: "almost {{count}} years"
|
|
1214
|
+
}
|
|
1215
|
+
}, hr = function(a, t, r) {
|
|
1216
|
+
var e, i = vr[a];
|
|
1217
|
+
return typeof i == "string" ? e = i : t === 1 ? e = i.one : e = i.other.replace("{{count}}", t.toString()), r != null && r.addSuffix ? r.comparison && r.comparison > 0 ? "in " + e : e + " ago" : e;
|
|
1218
|
+
};
|
|
1219
|
+
const gr = hr;
|
|
1220
|
+
function se(o) {
|
|
1221
|
+
return function() {
|
|
1222
|
+
var a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = a.width ? String(a.width) : o.defaultWidth, r = o.formats[t] || o.formats[o.defaultWidth];
|
|
1223
|
+
return r;
|
|
1224
|
+
};
|
|
1225
|
+
}
|
|
1226
|
+
var wr = {
|
|
1227
|
+
full: "EEEE, MMMM do, y",
|
|
1228
|
+
long: "MMMM do, y",
|
|
1229
|
+
medium: "MMM d, y",
|
|
1230
|
+
short: "MM/dd/yyyy"
|
|
1231
|
+
}, pr = {
|
|
1232
|
+
full: "h:mm:ss a zzzz",
|
|
1233
|
+
long: "h:mm:ss a z",
|
|
1234
|
+
medium: "h:mm:ss a",
|
|
1235
|
+
short: "h:mm a"
|
|
1236
|
+
}, yr = {
|
|
1237
|
+
full: "{{date}} 'at' {{time}}",
|
|
1238
|
+
long: "{{date}} 'at' {{time}}",
|
|
1239
|
+
medium: "{{date}}, {{time}}",
|
|
1240
|
+
short: "{{date}}, {{time}}"
|
|
1241
|
+
}, br = {
|
|
1242
|
+
date: se({
|
|
1243
|
+
formats: wr,
|
|
1244
|
+
defaultWidth: "full"
|
|
1245
|
+
}),
|
|
1246
|
+
time: se({
|
|
1247
|
+
formats: pr,
|
|
1248
|
+
defaultWidth: "full"
|
|
1249
|
+
}),
|
|
1250
|
+
dateTime: se({
|
|
1251
|
+
formats: yr,
|
|
1252
|
+
defaultWidth: "full"
|
|
1253
|
+
})
|
|
1254
|
+
};
|
|
1255
|
+
const Tr = br;
|
|
1256
|
+
var Dr = {
|
|
1257
|
+
lastWeek: "'last' eeee 'at' p",
|
|
1258
|
+
yesterday: "'yesterday at' p",
|
|
1259
|
+
today: "'today at' p",
|
|
1260
|
+
tomorrow: "'tomorrow at' p",
|
|
1261
|
+
nextWeek: "eeee 'at' p",
|
|
1262
|
+
other: "P"
|
|
1263
|
+
}, Pr = function(a, t, r, e) {
|
|
1264
|
+
return Dr[a];
|
|
1265
|
+
};
|
|
1266
|
+
const Mr = Pr;
|
|
1267
|
+
function Q(o) {
|
|
1268
|
+
return function(a, t) {
|
|
1269
|
+
var r = t != null && t.context ? String(t.context) : "standalone", e;
|
|
1270
|
+
if (r === "formatting" && o.formattingValues) {
|
|
1271
|
+
var i = o.defaultFormattingWidth || o.defaultWidth, n = t != null && t.width ? String(t.width) : i;
|
|
1272
|
+
e = o.formattingValues[n] || o.formattingValues[i];
|
|
1273
|
+
} else {
|
|
1274
|
+
var u = o.defaultWidth, s = t != null && t.width ? String(t.width) : o.defaultWidth;
|
|
1275
|
+
e = o.values[s] || o.values[u];
|
|
1276
|
+
}
|
|
1277
|
+
var l = o.argumentCallback ? o.argumentCallback(a) : a;
|
|
1278
|
+
return e[l];
|
|
1279
|
+
};
|
|
1280
|
+
}
|
|
1281
|
+
var kr = {
|
|
1282
|
+
narrow: ["B", "A"],
|
|
1283
|
+
abbreviated: ["BC", "AD"],
|
|
1284
|
+
wide: ["Before Christ", "Anno Domini"]
|
|
1285
|
+
}, Cr = {
|
|
1286
|
+
narrow: ["1", "2", "3", "4"],
|
|
1287
|
+
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
1288
|
+
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
1289
|
+
}, xr = {
|
|
1290
|
+
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
1291
|
+
abbreviated: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
|
|
1292
|
+
wide: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
|
|
1293
|
+
}, Or = {
|
|
1294
|
+
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
1295
|
+
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
1296
|
+
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
1297
|
+
wide: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
|
|
1298
|
+
}, Er = {
|
|
1299
|
+
narrow: {
|
|
1300
|
+
am: "a",
|
|
1301
|
+
pm: "p",
|
|
1302
|
+
midnight: "mi",
|
|
1303
|
+
noon: "n",
|
|
1304
|
+
morning: "morning",
|
|
1305
|
+
afternoon: "afternoon",
|
|
1306
|
+
evening: "evening",
|
|
1307
|
+
night: "night"
|
|
1308
|
+
},
|
|
1309
|
+
abbreviated: {
|
|
1310
|
+
am: "AM",
|
|
1311
|
+
pm: "PM",
|
|
1312
|
+
midnight: "midnight",
|
|
1313
|
+
noon: "noon",
|
|
1314
|
+
morning: "morning",
|
|
1315
|
+
afternoon: "afternoon",
|
|
1316
|
+
evening: "evening",
|
|
1317
|
+
night: "night"
|
|
1318
|
+
},
|
|
1319
|
+
wide: {
|
|
1320
|
+
am: "a.m.",
|
|
1321
|
+
pm: "p.m.",
|
|
1322
|
+
midnight: "midnight",
|
|
1323
|
+
noon: "noon",
|
|
1324
|
+
morning: "morning",
|
|
1325
|
+
afternoon: "afternoon",
|
|
1326
|
+
evening: "evening",
|
|
1327
|
+
night: "night"
|
|
1328
|
+
}
|
|
1329
|
+
}, Ur = {
|
|
1330
|
+
narrow: {
|
|
1331
|
+
am: "a",
|
|
1332
|
+
pm: "p",
|
|
1333
|
+
midnight: "mi",
|
|
1334
|
+
noon: "n",
|
|
1335
|
+
morning: "in the morning",
|
|
1336
|
+
afternoon: "in the afternoon",
|
|
1337
|
+
evening: "in the evening",
|
|
1338
|
+
night: "at night"
|
|
1339
|
+
},
|
|
1340
|
+
abbreviated: {
|
|
1341
|
+
am: "AM",
|
|
1342
|
+
pm: "PM",
|
|
1343
|
+
midnight: "midnight",
|
|
1344
|
+
noon: "noon",
|
|
1345
|
+
morning: "in the morning",
|
|
1346
|
+
afternoon: "in the afternoon",
|
|
1347
|
+
evening: "in the evening",
|
|
1348
|
+
night: "at night"
|
|
1349
|
+
},
|
|
1350
|
+
wide: {
|
|
1351
|
+
am: "a.m.",
|
|
1352
|
+
pm: "p.m.",
|
|
1353
|
+
midnight: "midnight",
|
|
1354
|
+
noon: "noon",
|
|
1355
|
+
morning: "in the morning",
|
|
1356
|
+
afternoon: "in the afternoon",
|
|
1357
|
+
evening: "in the evening",
|
|
1358
|
+
night: "at night"
|
|
1359
|
+
}
|
|
1360
|
+
}, $r = function(a, t) {
|
|
1361
|
+
var r = Number(a), e = r % 100;
|
|
1362
|
+
if (e > 20 || e < 10)
|
|
1363
|
+
switch (e % 10) {
|
|
1364
|
+
case 1:
|
|
1365
|
+
return r + "st";
|
|
1366
|
+
case 2:
|
|
1367
|
+
return r + "nd";
|
|
1368
|
+
case 3:
|
|
1369
|
+
return r + "rd";
|
|
1370
|
+
}
|
|
1371
|
+
return r + "th";
|
|
1372
|
+
}, Wr = {
|
|
1373
|
+
ordinalNumber: $r,
|
|
1374
|
+
era: Q({
|
|
1375
|
+
values: kr,
|
|
1376
|
+
defaultWidth: "wide"
|
|
1377
|
+
}),
|
|
1378
|
+
quarter: Q({
|
|
1379
|
+
values: Cr,
|
|
1380
|
+
defaultWidth: "wide",
|
|
1381
|
+
argumentCallback: function(a) {
|
|
1382
|
+
return a - 1;
|
|
1383
|
+
}
|
|
1384
|
+
}),
|
|
1385
|
+
month: Q({
|
|
1386
|
+
values: xr,
|
|
1387
|
+
defaultWidth: "wide"
|
|
1388
|
+
}),
|
|
1389
|
+
day: Q({
|
|
1390
|
+
values: Or,
|
|
1391
|
+
defaultWidth: "wide"
|
|
1392
|
+
}),
|
|
1393
|
+
dayPeriod: Q({
|
|
1394
|
+
values: Er,
|
|
1395
|
+
defaultWidth: "wide",
|
|
1396
|
+
formattingValues: Ur,
|
|
1397
|
+
defaultFormattingWidth: "wide"
|
|
1398
|
+
})
|
|
1399
|
+
};
|
|
1400
|
+
const Yr = Wr;
|
|
1401
|
+
function B(o) {
|
|
1402
|
+
return function(a) {
|
|
1403
|
+
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = t.width, e = r && o.matchPatterns[r] || o.matchPatterns[o.defaultMatchWidth], i = a.match(e);
|
|
1404
|
+
if (!i)
|
|
1405
|
+
return null;
|
|
1406
|
+
var n = i[0], u = r && o.parsePatterns[r] || o.parsePatterns[o.defaultParseWidth], s = Array.isArray(u) ? _r(u, function(m) {
|
|
1407
|
+
return m.test(n);
|
|
1408
|
+
}) : Nr(u, function(m) {
|
|
1409
|
+
return m.test(n);
|
|
1410
|
+
}), l;
|
|
1411
|
+
l = o.valueCallback ? o.valueCallback(s) : s, l = t.valueCallback ? t.valueCallback(l) : l;
|
|
1412
|
+
var d = a.slice(n.length);
|
|
1413
|
+
return {
|
|
1414
|
+
value: l,
|
|
1415
|
+
rest: d
|
|
1416
|
+
};
|
|
1417
|
+
};
|
|
1418
|
+
}
|
|
1419
|
+
function Nr(o, a) {
|
|
1420
|
+
for (var t in o)
|
|
1421
|
+
if (o.hasOwnProperty(t) && a(o[t]))
|
|
1422
|
+
return t;
|
|
1423
|
+
}
|
|
1424
|
+
function _r(o, a) {
|
|
1425
|
+
for (var t = 0; t < o.length; t++)
|
|
1426
|
+
if (a(o[t]))
|
|
1427
|
+
return t;
|
|
1428
|
+
}
|
|
1429
|
+
function ft(o) {
|
|
1430
|
+
return function(a) {
|
|
1431
|
+
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = a.match(o.matchPattern);
|
|
1432
|
+
if (!r)
|
|
1433
|
+
return null;
|
|
1434
|
+
var e = r[0], i = a.match(o.parsePattern);
|
|
1435
|
+
if (!i)
|
|
1436
|
+
return null;
|
|
1437
|
+
var n = o.valueCallback ? o.valueCallback(i[0]) : i[0];
|
|
1438
|
+
n = t.valueCallback ? t.valueCallback(n) : n;
|
|
1439
|
+
var u = a.slice(e.length);
|
|
1440
|
+
return {
|
|
1441
|
+
value: n,
|
|
1442
|
+
rest: u
|
|
1443
|
+
};
|
|
1444
|
+
};
|
|
1445
|
+
}
|
|
1446
|
+
var Ar = /^(\d+)(th|st|nd|rd)?/i, Lr = /\d+/i, Sr = {
|
|
1447
|
+
narrow: /^(b|a)/i,
|
|
1448
|
+
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
1449
|
+
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
1450
|
+
}, Hr = {
|
|
1451
|
+
any: [/^b/i, /^(a|c)/i]
|
|
1452
|
+
}, Rr = {
|
|
1453
|
+
narrow: /^[1234]/i,
|
|
1454
|
+
abbreviated: /^q[1234]/i,
|
|
1455
|
+
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
1456
|
+
}, Ir = {
|
|
1457
|
+
any: [/1/i, /2/i, /3/i, /4/i]
|
|
1458
|
+
}, qr = {
|
|
1459
|
+
narrow: /^[jfmasond]/i,
|
|
1460
|
+
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
1461
|
+
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
1462
|
+
}, Fr = {
|
|
1463
|
+
narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],
|
|
1464
|
+
any: [/^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i]
|
|
1465
|
+
}, Qr = {
|
|
1466
|
+
narrow: /^[smtwf]/i,
|
|
1467
|
+
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
1468
|
+
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
1469
|
+
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
1470
|
+
}, Br = {
|
|
1471
|
+
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
1472
|
+
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
1473
|
+
}, jr = {
|
|
1474
|
+
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
1475
|
+
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
1476
|
+
}, Vr = {
|
|
1477
|
+
any: {
|
|
1478
|
+
am: /^a/i,
|
|
1479
|
+
pm: /^p/i,
|
|
1480
|
+
midnight: /^mi/i,
|
|
1481
|
+
noon: /^no/i,
|
|
1482
|
+
morning: /morning/i,
|
|
1483
|
+
afternoon: /afternoon/i,
|
|
1484
|
+
evening: /evening/i,
|
|
1485
|
+
night: /night/i
|
|
1486
|
+
}
|
|
1487
|
+
}, Xr = {
|
|
1488
|
+
ordinalNumber: ft({
|
|
1489
|
+
matchPattern: Ar,
|
|
1490
|
+
parsePattern: Lr,
|
|
1491
|
+
valueCallback: function(a) {
|
|
1492
|
+
return parseInt(a, 10);
|
|
1493
|
+
}
|
|
1494
|
+
}),
|
|
1495
|
+
era: B({
|
|
1496
|
+
matchPatterns: Sr,
|
|
1497
|
+
defaultMatchWidth: "wide",
|
|
1498
|
+
parsePatterns: Hr,
|
|
1499
|
+
defaultParseWidth: "any"
|
|
1500
|
+
}),
|
|
1501
|
+
quarter: B({
|
|
1502
|
+
matchPatterns: Rr,
|
|
1503
|
+
defaultMatchWidth: "wide",
|
|
1504
|
+
parsePatterns: Ir,
|
|
1505
|
+
defaultParseWidth: "any",
|
|
1506
|
+
valueCallback: function(a) {
|
|
1507
|
+
return a + 1;
|
|
1508
|
+
}
|
|
1509
|
+
}),
|
|
1510
|
+
month: B({
|
|
1511
|
+
matchPatterns: qr,
|
|
1512
|
+
defaultMatchWidth: "wide",
|
|
1513
|
+
parsePatterns: Fr,
|
|
1514
|
+
defaultParseWidth: "any"
|
|
1515
|
+
}),
|
|
1516
|
+
day: B({
|
|
1517
|
+
matchPatterns: Qr,
|
|
1518
|
+
defaultMatchWidth: "wide",
|
|
1519
|
+
parsePatterns: Br,
|
|
1520
|
+
defaultParseWidth: "any"
|
|
1521
|
+
}),
|
|
1522
|
+
dayPeriod: B({
|
|
1523
|
+
matchPatterns: jr,
|
|
1524
|
+
defaultMatchWidth: "any",
|
|
1525
|
+
parsePatterns: Vr,
|
|
1526
|
+
defaultParseWidth: "any"
|
|
1527
|
+
})
|
|
1528
|
+
};
|
|
1529
|
+
const Gr = Xr;
|
|
1530
|
+
var Kr = {
|
|
1531
|
+
code: "en-US",
|
|
1532
|
+
formatDistance: gr,
|
|
1533
|
+
formatLong: Tr,
|
|
1534
|
+
formatRelative: Mr,
|
|
1535
|
+
localize: Yr,
|
|
1536
|
+
match: Gr,
|
|
1537
|
+
options: {
|
|
1538
|
+
weekStartsOn: 0,
|
|
1539
|
+
firstWeekContainsDate: 1
|
|
1540
|
+
}
|
|
1541
|
+
};
|
|
1542
|
+
const mt = Kr;
|
|
1543
|
+
var Jr = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, zr = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Zr = /^'([^]*?)'?$/, ea = /''/g, ta = /[a-zA-Z]/;
|
|
1544
|
+
function ee(o, a, t) {
|
|
1545
|
+
var r, e, i, n, u, s, l, d, m, h, v, D, U, $, E, W, H, R;
|
|
1546
|
+
O(2, arguments);
|
|
1547
|
+
var de = String(a), A = ce(), F = (r = (e = t == null ? void 0 : t.locale) !== null && e !== void 0 ? e : A.locale) !== null && r !== void 0 ? r : mt, X = L((i = (n = (u = (s = t == null ? void 0 : t.firstWeekContainsDate) !== null && s !== void 0 ? s : t == null || (l = t.locale) === null || l === void 0 || (d = l.options) === null || d === void 0 ? void 0 : d.firstWeekContainsDate) !== null && u !== void 0 ? u : A.firstWeekContainsDate) !== null && n !== void 0 ? n : (m = A.locale) === null || m === void 0 || (h = m.options) === null || h === void 0 ? void 0 : h.firstWeekContainsDate) !== null && i !== void 0 ? i : 1);
|
|
1548
|
+
if (!(X >= 1 && X <= 7))
|
|
1549
|
+
throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
|
|
1550
|
+
var J = L((v = (D = (U = ($ = t == null ? void 0 : t.weekStartsOn) !== null && $ !== void 0 ? $ : t == null || (E = t.locale) === null || E === void 0 || (W = E.options) === null || W === void 0 ? void 0 : W.weekStartsOn) !== null && U !== void 0 ? U : A.weekStartsOn) !== null && D !== void 0 ? D : (H = A.locale) === null || H === void 0 || (R = H.options) === null || R === void 0 ? void 0 : R.weekStartsOn) !== null && v !== void 0 ? v : 0);
|
|
1551
|
+
if (!(J >= 0 && J <= 6))
|
|
1552
|
+
throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
|
|
1553
|
+
if (!F.localize)
|
|
1554
|
+
throw new RangeError("locale must contain localize property");
|
|
1555
|
+
if (!F.formatLong)
|
|
1556
|
+
throw new RangeError("locale must contain formatLong property");
|
|
1557
|
+
var z = _(o);
|
|
1558
|
+
if (!Ye(z))
|
|
1559
|
+
throw new RangeError("Invalid time value");
|
|
1560
|
+
var fe = nt(z), me = it(z, fe), ve = {
|
|
1561
|
+
firstWeekContainsDate: X,
|
|
1562
|
+
weekStartsOn: J,
|
|
1563
|
+
locale: F,
|
|
1564
|
+
_originalDate: z
|
|
1565
|
+
}, ke = de.match(zr).map(function(N) {
|
|
1566
|
+
var S = N[0];
|
|
1567
|
+
if (S === "p" || S === "P") {
|
|
1568
|
+
var ae = Ne[S];
|
|
1569
|
+
return ae(N, F.formatLong);
|
|
1570
|
+
}
|
|
1571
|
+
return N;
|
|
1572
|
+
}).join("").match(Jr).map(function(N) {
|
|
1573
|
+
if (N === "''")
|
|
1574
|
+
return "'";
|
|
1575
|
+
var S = N[0];
|
|
1576
|
+
if (S === "'")
|
|
1577
|
+
return ra(N);
|
|
1578
|
+
var ae = lr[S];
|
|
1579
|
+
if (ae)
|
|
1580
|
+
return !(t != null && t.useAdditionalWeekYearTokens) && dt(N) && De(N, a, String(o)), !(t != null && t.useAdditionalDayOfYearTokens) && ct(N) && De(N, a, String(o)), ae(me, N, F.localize, ve);
|
|
1581
|
+
if (S.match(ta))
|
|
1582
|
+
throw new RangeError("Format string contains an unescaped latin alphabet character `" + S + "`");
|
|
1583
|
+
return N;
|
|
1584
|
+
}).join("");
|
|
1585
|
+
return ke;
|
|
1586
|
+
}
|
|
1587
|
+
function ra(o) {
|
|
1588
|
+
var a = o.match(Zr);
|
|
1589
|
+
return a ? a[1].replace(ea, "'") : o;
|
|
1590
|
+
}
|
|
1591
|
+
function aa(o, a) {
|
|
1592
|
+
if (o == null)
|
|
1593
|
+
throw new TypeError("assign requires that input parameter not be null or undefined");
|
|
1594
|
+
for (var t in a)
|
|
1595
|
+
Object.prototype.hasOwnProperty.call(a, t) && (o[t] = a[t]);
|
|
1596
|
+
return o;
|
|
1597
|
+
}
|
|
1598
|
+
function Ze(o, a) {
|
|
1599
|
+
(a == null || a > o.length) && (a = o.length);
|
|
1600
|
+
for (var t = 0, r = new Array(a); t < a; t++)
|
|
1601
|
+
r[t] = o[t];
|
|
1602
|
+
return r;
|
|
1603
|
+
}
|
|
1604
|
+
function na(o, a) {
|
|
1605
|
+
if (o) {
|
|
1606
|
+
if (typeof o == "string")
|
|
1607
|
+
return Ze(o, a);
|
|
1608
|
+
var t = Object.prototype.toString.call(o).slice(8, -1);
|
|
1609
|
+
if (t === "Object" && o.constructor && (t = o.constructor.name), t === "Map" || t === "Set")
|
|
1610
|
+
return Array.from(o);
|
|
1611
|
+
if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))
|
|
1612
|
+
return Ze(o, a);
|
|
1613
|
+
}
|
|
1614
|
+
}
|
|
1615
|
+
function et(o, a) {
|
|
1616
|
+
var t = typeof Symbol < "u" && o[Symbol.iterator] || o["@@iterator"];
|
|
1617
|
+
if (!t) {
|
|
1618
|
+
if (Array.isArray(o) || (t = na(o)) || a && o && typeof o.length == "number") {
|
|
1619
|
+
t && (o = t);
|
|
1620
|
+
var r = 0, e = function() {
|
|
1621
|
+
};
|
|
1622
|
+
return {
|
|
1623
|
+
s: e,
|
|
1624
|
+
n: function() {
|
|
1625
|
+
return r >= o.length ? {
|
|
1626
|
+
done: !0
|
|
1627
|
+
} : {
|
|
1628
|
+
done: !1,
|
|
1629
|
+
value: o[r++]
|
|
1630
|
+
};
|
|
1631
|
+
},
|
|
1632
|
+
e: function(l) {
|
|
1633
|
+
throw l;
|
|
1634
|
+
},
|
|
1635
|
+
f: e
|
|
1636
|
+
};
|
|
1637
|
+
}
|
|
1638
|
+
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
1639
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1640
|
+
}
|
|
1641
|
+
var i = !0, n = !1, u;
|
|
1642
|
+
return {
|
|
1643
|
+
s: function() {
|
|
1644
|
+
t = t.call(o);
|
|
1645
|
+
},
|
|
1646
|
+
n: function() {
|
|
1647
|
+
var l = t.next();
|
|
1648
|
+
return i = l.done, l;
|
|
1649
|
+
},
|
|
1650
|
+
e: function(l) {
|
|
1651
|
+
n = !0, u = l;
|
|
1652
|
+
},
|
|
1653
|
+
f: function() {
|
|
1654
|
+
try {
|
|
1655
|
+
!i && t.return != null && t.return();
|
|
1656
|
+
} finally {
|
|
1657
|
+
if (n)
|
|
1658
|
+
throw u;
|
|
1659
|
+
}
|
|
1660
|
+
}
|
|
1661
|
+
};
|
|
1662
|
+
}
|
|
1663
|
+
function f(o) {
|
|
1664
|
+
if (o === void 0)
|
|
1665
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1666
|
+
return o;
|
|
1667
|
+
}
|
|
1668
|
+
function _e(o, a) {
|
|
1669
|
+
return _e = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, e) {
|
|
1670
|
+
return r.__proto__ = e, r;
|
|
1671
|
+
}, _e(o, a);
|
|
1672
|
+
}
|
|
1673
|
+
function p(o, a) {
|
|
1674
|
+
if (typeof a != "function" && a !== null)
|
|
1675
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
1676
|
+
o.prototype = Object.create(a && a.prototype, {
|
|
1677
|
+
constructor: {
|
|
1678
|
+
value: o,
|
|
1679
|
+
writable: !0,
|
|
1680
|
+
configurable: !0
|
|
1681
|
+
}
|
|
1682
|
+
}), Object.defineProperty(o, "prototype", {
|
|
1683
|
+
writable: !1
|
|
1684
|
+
}), a && _e(o, a);
|
|
1685
|
+
}
|
|
1686
|
+
function Pe(o) {
|
|
1687
|
+
return Pe = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
|
|
1688
|
+
return t.__proto__ || Object.getPrototypeOf(t);
|
|
1689
|
+
}, Pe(o);
|
|
1690
|
+
}
|
|
1691
|
+
function ia() {
|
|
1692
|
+
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
|
|
1693
|
+
return !1;
|
|
1694
|
+
if (typeof Proxy == "function")
|
|
1695
|
+
return !0;
|
|
1696
|
+
try {
|
|
1697
|
+
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
1698
|
+
})), !0;
|
|
1699
|
+
} catch {
|
|
1700
|
+
return !1;
|
|
1701
|
+
}
|
|
1702
|
+
}
|
|
1703
|
+
function oa(o, a) {
|
|
1704
|
+
if (a && (K(a) === "object" || typeof a == "function"))
|
|
1705
|
+
return a;
|
|
1706
|
+
if (a !== void 0)
|
|
1707
|
+
throw new TypeError("Derived constructors may only return object or undefined");
|
|
1708
|
+
return f(o);
|
|
1709
|
+
}
|
|
1710
|
+
function y(o) {
|
|
1711
|
+
var a = ia();
|
|
1712
|
+
return function() {
|
|
1713
|
+
var r = Pe(o), e;
|
|
1714
|
+
if (a) {
|
|
1715
|
+
var i = Pe(this).constructor;
|
|
1716
|
+
e = Reflect.construct(r, arguments, i);
|
|
1717
|
+
} else
|
|
1718
|
+
e = r.apply(this, arguments);
|
|
1719
|
+
return oa(this, e);
|
|
1720
|
+
};
|
|
1721
|
+
}
|
|
1722
|
+
function g(o, a) {
|
|
1723
|
+
if (!(o instanceof a))
|
|
1724
|
+
throw new TypeError("Cannot call a class as a function");
|
|
1725
|
+
}
|
|
1726
|
+
function ua(o, a) {
|
|
1727
|
+
if (K(o) !== "object" || o === null)
|
|
1728
|
+
return o;
|
|
1729
|
+
var t = o[Symbol.toPrimitive];
|
|
1730
|
+
if (t !== void 0) {
|
|
1731
|
+
var r = t.call(o, a || "default");
|
|
1732
|
+
if (K(r) !== "object")
|
|
1733
|
+
return r;
|
|
1734
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1735
|
+
}
|
|
1736
|
+
return (a === "string" ? String : Number)(o);
|
|
1737
|
+
}
|
|
1738
|
+
function vt(o) {
|
|
1739
|
+
var a = ua(o, "string");
|
|
1740
|
+
return K(a) === "symbol" ? a : String(a);
|
|
1741
|
+
}
|
|
1742
|
+
function tt(o, a) {
|
|
1743
|
+
for (var t = 0; t < a.length; t++) {
|
|
1744
|
+
var r = a[t];
|
|
1745
|
+
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(o, vt(r.key), r);
|
|
1746
|
+
}
|
|
1747
|
+
}
|
|
1748
|
+
function w(o, a, t) {
|
|
1749
|
+
return a && tt(o.prototype, a), t && tt(o, t), Object.defineProperty(o, "prototype", {
|
|
1750
|
+
writable: !1
|
|
1751
|
+
}), o;
|
|
1752
|
+
}
|
|
1753
|
+
function c(o, a, t) {
|
|
1754
|
+
return a = vt(a), a in o ? Object.defineProperty(o, a, {
|
|
1755
|
+
value: t,
|
|
1756
|
+
enumerable: !0,
|
|
1757
|
+
configurable: !0,
|
|
1758
|
+
writable: !0
|
|
1759
|
+
}) : o[a] = t, o;
|
|
1760
|
+
}
|
|
1761
|
+
var sa = 10, ht = /* @__PURE__ */ function() {
|
|
1762
|
+
function o() {
|
|
1763
|
+
g(this, o), c(this, "priority", void 0), c(this, "subPriority", 0);
|
|
1764
|
+
}
|
|
1765
|
+
return w(o, [{
|
|
1766
|
+
key: "validate",
|
|
1767
|
+
value: function(t, r) {
|
|
1768
|
+
return !0;
|
|
1769
|
+
}
|
|
1770
|
+
}]), o;
|
|
1771
|
+
}(), la = /* @__PURE__ */ function(o) {
|
|
1772
|
+
p(t, o);
|
|
1773
|
+
var a = y(t);
|
|
1774
|
+
function t(r, e, i, n, u) {
|
|
1775
|
+
var s;
|
|
1776
|
+
return g(this, t), s = a.call(this), s.value = r, s.validateValue = e, s.setValue = i, s.priority = n, u && (s.subPriority = u), s;
|
|
1777
|
+
}
|
|
1778
|
+
return w(t, [{
|
|
1779
|
+
key: "validate",
|
|
1780
|
+
value: function(e, i) {
|
|
1781
|
+
return this.validateValue(e, this.value, i);
|
|
1782
|
+
}
|
|
1783
|
+
}, {
|
|
1784
|
+
key: "set",
|
|
1785
|
+
value: function(e, i, n) {
|
|
1786
|
+
return this.setValue(e, i, this.value, n);
|
|
1787
|
+
}
|
|
1788
|
+
}]), t;
|
|
1789
|
+
}(ht), ca = /* @__PURE__ */ function(o) {
|
|
1790
|
+
p(t, o);
|
|
1791
|
+
var a = y(t);
|
|
1792
|
+
function t() {
|
|
1793
|
+
var r;
|
|
1794
|
+
g(this, t);
|
|
1795
|
+
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
1796
|
+
i[n] = arguments[n];
|
|
1797
|
+
return r = a.call.apply(a, [this].concat(i)), c(f(r), "priority", sa), c(f(r), "subPriority", -1), r;
|
|
1798
|
+
}
|
|
1799
|
+
return w(t, [{
|
|
1800
|
+
key: "set",
|
|
1801
|
+
value: function(e, i) {
|
|
1802
|
+
if (i.timestampIsSet)
|
|
1803
|
+
return e;
|
|
1804
|
+
var n = new Date(0);
|
|
1805
|
+
return n.setFullYear(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate()), n.setHours(e.getUTCHours(), e.getUTCMinutes(), e.getUTCSeconds(), e.getUTCMilliseconds()), n;
|
|
1806
|
+
}
|
|
1807
|
+
}]), t;
|
|
1808
|
+
}(ht), b = /* @__PURE__ */ function() {
|
|
1809
|
+
function o() {
|
|
1810
|
+
g(this, o), c(this, "incompatibleTokens", void 0), c(this, "priority", void 0), c(this, "subPriority", void 0);
|
|
1811
|
+
}
|
|
1812
|
+
return w(o, [{
|
|
1813
|
+
key: "run",
|
|
1814
|
+
value: function(t, r, e, i) {
|
|
1815
|
+
var n = this.parse(t, r, e, i);
|
|
1816
|
+
return n ? {
|
|
1817
|
+
setter: new la(n.value, this.validate, this.set, this.priority, this.subPriority),
|
|
1818
|
+
rest: n.rest
|
|
1819
|
+
} : null;
|
|
1820
|
+
}
|
|
1821
|
+
}, {
|
|
1822
|
+
key: "validate",
|
|
1823
|
+
value: function(t, r, e) {
|
|
1824
|
+
return !0;
|
|
1825
|
+
}
|
|
1826
|
+
}]), o;
|
|
1827
|
+
}(), da = /* @__PURE__ */ function(o) {
|
|
1828
|
+
p(t, o);
|
|
1829
|
+
var a = y(t);
|
|
1830
|
+
function t() {
|
|
1831
|
+
var r;
|
|
1832
|
+
g(this, t);
|
|
1833
|
+
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
1834
|
+
i[n] = arguments[n];
|
|
1835
|
+
return r = a.call.apply(a, [this].concat(i)), c(f(r), "priority", 140), c(f(r), "incompatibleTokens", ["R", "u", "t", "T"]), r;
|
|
1836
|
+
}
|
|
1837
|
+
return w(t, [{
|
|
1838
|
+
key: "parse",
|
|
1839
|
+
value: function(e, i, n) {
|
|
1840
|
+
switch (i) {
|
|
1841
|
+
case "G":
|
|
1842
|
+
case "GG":
|
|
1843
|
+
case "GGG":
|
|
1844
|
+
return n.era(e, {
|
|
1845
|
+
width: "abbreviated"
|
|
1846
|
+
}) || n.era(e, {
|
|
1847
|
+
width: "narrow"
|
|
1848
|
+
});
|
|
1849
|
+
case "GGGGG":
|
|
1850
|
+
return n.era(e, {
|
|
1851
|
+
width: "narrow"
|
|
1852
|
+
});
|
|
1853
|
+
case "GGGG":
|
|
1854
|
+
default:
|
|
1855
|
+
return n.era(e, {
|
|
1856
|
+
width: "wide"
|
|
1857
|
+
}) || n.era(e, {
|
|
1858
|
+
width: "abbreviated"
|
|
1859
|
+
}) || n.era(e, {
|
|
1860
|
+
width: "narrow"
|
|
1861
|
+
});
|
|
1862
|
+
}
|
|
1863
|
+
}
|
|
1864
|
+
}, {
|
|
1865
|
+
key: "set",
|
|
1866
|
+
value: function(e, i, n) {
|
|
1867
|
+
return i.era = n, e.setUTCFullYear(n, 0, 1), e.setUTCHours(0, 0, 0, 0), e;
|
|
1868
|
+
}
|
|
1869
|
+
}]), t;
|
|
1870
|
+
}(b), C = {
|
|
1871
|
+
month: /^(1[0-2]|0?\d)/,
|
|
1872
|
+
// 0 to 12
|
|
1873
|
+
date: /^(3[0-1]|[0-2]?\d)/,
|
|
1874
|
+
// 0 to 31
|
|
1875
|
+
dayOfYear: /^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,
|
|
1876
|
+
// 0 to 366
|
|
1877
|
+
week: /^(5[0-3]|[0-4]?\d)/,
|
|
1878
|
+
// 0 to 53
|
|
1879
|
+
hour23h: /^(2[0-3]|[0-1]?\d)/,
|
|
1880
|
+
// 0 to 23
|
|
1881
|
+
hour24h: /^(2[0-4]|[0-1]?\d)/,
|
|
1882
|
+
// 0 to 24
|
|
1883
|
+
hour11h: /^(1[0-1]|0?\d)/,
|
|
1884
|
+
// 0 to 11
|
|
1885
|
+
hour12h: /^(1[0-2]|0?\d)/,
|
|
1886
|
+
// 0 to 12
|
|
1887
|
+
minute: /^[0-5]?\d/,
|
|
1888
|
+
// 0 to 59
|
|
1889
|
+
second: /^[0-5]?\d/,
|
|
1890
|
+
// 0 to 59
|
|
1891
|
+
singleDigit: /^\d/,
|
|
1892
|
+
// 0 to 9
|
|
1893
|
+
twoDigits: /^\d{1,2}/,
|
|
1894
|
+
// 0 to 99
|
|
1895
|
+
threeDigits: /^\d{1,3}/,
|
|
1896
|
+
// 0 to 999
|
|
1897
|
+
fourDigits: /^\d{1,4}/,
|
|
1898
|
+
// 0 to 9999
|
|
1899
|
+
anyDigitsSigned: /^-?\d+/,
|
|
1900
|
+
singleDigitSigned: /^-?\d/,
|
|
1901
|
+
// 0 to 9, -0 to -9
|
|
1902
|
+
twoDigitsSigned: /^-?\d{1,2}/,
|
|
1903
|
+
// 0 to 99, -0 to -99
|
|
1904
|
+
threeDigitsSigned: /^-?\d{1,3}/,
|
|
1905
|
+
// 0 to 999, -0 to -999
|
|
1906
|
+
fourDigitsSigned: /^-?\d{1,4}/
|
|
1907
|
+
// 0 to 9999, -0 to -9999
|
|
1908
|
+
}, j = {
|
|
1909
|
+
basicOptionalMinutes: /^([+-])(\d{2})(\d{2})?|Z/,
|
|
1910
|
+
basic: /^([+-])(\d{2})(\d{2})|Z/,
|
|
1911
|
+
basicOptionalSeconds: /^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,
|
|
1912
|
+
extended: /^([+-])(\d{2}):(\d{2})|Z/,
|
|
1913
|
+
extendedOptionalSeconds: /^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/
|
|
1914
|
+
};
|
|
1915
|
+
function x(o, a) {
|
|
1916
|
+
return o && {
|
|
1917
|
+
value: a(o.value),
|
|
1918
|
+
rest: o.rest
|
|
1919
|
+
};
|
|
1920
|
+
}
|
|
1921
|
+
function M(o, a) {
|
|
1922
|
+
var t = a.match(o);
|
|
1923
|
+
return t ? {
|
|
1924
|
+
value: parseInt(t[0], 10),
|
|
1925
|
+
rest: a.slice(t[0].length)
|
|
1926
|
+
} : null;
|
|
1927
|
+
}
|
|
1928
|
+
function V(o, a) {
|
|
1929
|
+
var t = a.match(o);
|
|
1930
|
+
if (!t)
|
|
1931
|
+
return null;
|
|
1932
|
+
if (t[0] === "Z")
|
|
1933
|
+
return {
|
|
1934
|
+
value: 0,
|
|
1935
|
+
rest: a.slice(1)
|
|
1936
|
+
};
|
|
1937
|
+
var r = t[1] === "+" ? 1 : -1, e = t[2] ? parseInt(t[2], 10) : 0, i = t[3] ? parseInt(t[3], 10) : 0, n = t[5] ? parseInt(t[5], 10) : 0;
|
|
1938
|
+
return {
|
|
1939
|
+
value: r * (e * zt + i * Jt + n * Zt),
|
|
1940
|
+
rest: a.slice(t[0].length)
|
|
1941
|
+
};
|
|
1942
|
+
}
|
|
1943
|
+
function gt(o) {
|
|
1944
|
+
return M(C.anyDigitsSigned, o);
|
|
1945
|
+
}
|
|
1946
|
+
function k(o, a) {
|
|
1947
|
+
switch (o) {
|
|
1948
|
+
case 1:
|
|
1949
|
+
return M(C.singleDigit, a);
|
|
1950
|
+
case 2:
|
|
1951
|
+
return M(C.twoDigits, a);
|
|
1952
|
+
case 3:
|
|
1953
|
+
return M(C.threeDigits, a);
|
|
1954
|
+
case 4:
|
|
1955
|
+
return M(C.fourDigits, a);
|
|
1956
|
+
default:
|
|
1957
|
+
return M(new RegExp("^\\d{1," + o + "}"), a);
|
|
1958
|
+
}
|
|
1959
|
+
}
|
|
1960
|
+
function Me(o, a) {
|
|
1961
|
+
switch (o) {
|
|
1962
|
+
case 1:
|
|
1963
|
+
return M(C.singleDigitSigned, a);
|
|
1964
|
+
case 2:
|
|
1965
|
+
return M(C.twoDigitsSigned, a);
|
|
1966
|
+
case 3:
|
|
1967
|
+
return M(C.threeDigitsSigned, a);
|
|
1968
|
+
case 4:
|
|
1969
|
+
return M(C.fourDigitsSigned, a);
|
|
1970
|
+
default:
|
|
1971
|
+
return M(new RegExp("^-?\\d{1," + o + "}"), a);
|
|
1972
|
+
}
|
|
1973
|
+
}
|
|
1974
|
+
function Se(o) {
|
|
1975
|
+
switch (o) {
|
|
1976
|
+
case "morning":
|
|
1977
|
+
return 4;
|
|
1978
|
+
case "evening":
|
|
1979
|
+
return 17;
|
|
1980
|
+
case "pm":
|
|
1981
|
+
case "noon":
|
|
1982
|
+
case "afternoon":
|
|
1983
|
+
return 12;
|
|
1984
|
+
case "am":
|
|
1985
|
+
case "midnight":
|
|
1986
|
+
case "night":
|
|
1987
|
+
default:
|
|
1988
|
+
return 0;
|
|
1989
|
+
}
|
|
1990
|
+
}
|
|
1991
|
+
function wt(o, a) {
|
|
1992
|
+
var t = a > 0, r = t ? a : 1 - a, e;
|
|
1993
|
+
if (r <= 50)
|
|
1994
|
+
e = o || 100;
|
|
1995
|
+
else {
|
|
1996
|
+
var i = r + 50, n = Math.floor(i / 100) * 100, u = o >= i % 100;
|
|
1997
|
+
e = o + n - (u ? 100 : 0);
|
|
1998
|
+
}
|
|
1999
|
+
return t ? e : 1 - e;
|
|
2000
|
+
}
|
|
2001
|
+
function pt(o) {
|
|
2002
|
+
return o % 400 === 0 || o % 4 === 0 && o % 100 !== 0;
|
|
2003
|
+
}
|
|
2004
|
+
var fa = /* @__PURE__ */ function(o) {
|
|
2005
|
+
p(t, o);
|
|
2006
|
+
var a = y(t);
|
|
2007
|
+
function t() {
|
|
2008
|
+
var r;
|
|
2009
|
+
g(this, t);
|
|
2010
|
+
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
2011
|
+
i[n] = arguments[n];
|
|
2012
|
+
return r = a.call.apply(a, [this].concat(i)), c(f(r), "priority", 130), c(f(r), "incompatibleTokens", ["Y", "R", "u", "w", "I", "i", "e", "c", "t", "T"]), r;
|
|
2013
|
+
}
|
|
2014
|
+
return w(t, [{
|
|
2015
|
+
key: "parse",
|
|
2016
|
+
value: function(e, i, n) {
|
|
2017
|
+
var u = function(l) {
|
|
2018
|
+
return {
|
|
2019
|
+
year: l,
|
|
2020
|
+
isTwoDigitYear: i === "yy"
|
|
2021
|
+
};
|
|
2022
|
+
};
|
|
2023
|
+
switch (i) {
|
|
2024
|
+
case "y":
|
|
2025
|
+
return x(k(4, e), u);
|
|
2026
|
+
case "yo":
|
|
2027
|
+
return x(n.ordinalNumber(e, {
|
|
2028
|
+
unit: "year"
|
|
2029
|
+
}), u);
|
|
2030
|
+
default:
|
|
2031
|
+
return x(k(i.length, e), u);
|
|
2032
|
+
}
|
|
2033
|
+
}
|
|
2034
|
+
}, {
|
|
2035
|
+
key: "validate",
|
|
2036
|
+
value: function(e, i) {
|
|
2037
|
+
return i.isTwoDigitYear || i.year > 0;
|
|
2038
|
+
}
|
|
2039
|
+
}, {
|
|
2040
|
+
key: "set",
|
|
2041
|
+
value: function(e, i, n) {
|
|
2042
|
+
var u = e.getUTCFullYear();
|
|
2043
|
+
if (n.isTwoDigitYear) {
|
|
2044
|
+
var s = wt(n.year, u);
|
|
2045
|
+
return e.setUTCFullYear(s, 0, 1), e.setUTCHours(0, 0, 0, 0), e;
|
|
2046
|
+
}
|
|
2047
|
+
var l = !("era" in i) || i.era === 1 ? n.year : 1 - n.year;
|
|
2048
|
+
return e.setUTCFullYear(l, 0, 1), e.setUTCHours(0, 0, 0, 0), e;
|
|
2049
|
+
}
|
|
2050
|
+
}]), t;
|
|
2051
|
+
}(b), ma = /* @__PURE__ */ function(o) {
|
|
2052
|
+
p(t, o);
|
|
2053
|
+
var a = y(t);
|
|
2054
|
+
function t() {
|
|
2055
|
+
var r;
|
|
2056
|
+
g(this, t);
|
|
2057
|
+
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
2058
|
+
i[n] = arguments[n];
|
|
2059
|
+
return r = a.call.apply(a, [this].concat(i)), c(f(r), "priority", 130), c(f(r), "incompatibleTokens", ["y", "R", "u", "Q", "q", "M", "L", "I", "d", "D", "i", "t", "T"]), r;
|
|
2060
|
+
}
|
|
2061
|
+
return w(t, [{
|
|
2062
|
+
key: "parse",
|
|
2063
|
+
value: function(e, i, n) {
|
|
2064
|
+
var u = function(l) {
|
|
2065
|
+
return {
|
|
2066
|
+
year: l,
|
|
2067
|
+
isTwoDigitYear: i === "YY"
|
|
2068
|
+
};
|
|
2069
|
+
};
|
|
2070
|
+
switch (i) {
|
|
2071
|
+
case "Y":
|
|
2072
|
+
return x(k(4, e), u);
|
|
2073
|
+
case "Yo":
|
|
2074
|
+
return x(n.ordinalNumber(e, {
|
|
2075
|
+
unit: "year"
|
|
2076
|
+
}), u);
|
|
2077
|
+
default:
|
|
2078
|
+
return x(k(i.length, e), u);
|
|
2079
|
+
}
|
|
2080
|
+
}
|
|
2081
|
+
}, {
|
|
2082
|
+
key: "validate",
|
|
2083
|
+
value: function(e, i) {
|
|
2084
|
+
return i.isTwoDigitYear || i.year > 0;
|
|
2085
|
+
}
|
|
2086
|
+
}, {
|
|
2087
|
+
key: "set",
|
|
2088
|
+
value: function(e, i, n, u) {
|
|
2089
|
+
var s = Le(e, u);
|
|
2090
|
+
if (n.isTwoDigitYear) {
|
|
2091
|
+
var l = wt(n.year, s);
|
|
2092
|
+
return e.setUTCFullYear(l, 0, u.firstWeekContainsDate), e.setUTCHours(0, 0, 0, 0), oe(e, u);
|
|
2093
|
+
}
|
|
2094
|
+
var d = !("era" in i) || i.era === 1 ? n.year : 1 - n.year;
|
|
2095
|
+
return e.setUTCFullYear(d, 0, u.firstWeekContainsDate), e.setUTCHours(0, 0, 0, 0), oe(e, u);
|
|
2096
|
+
}
|
|
2097
|
+
}]), t;
|
|
2098
|
+
}(b), va = /* @__PURE__ */ function(o) {
|
|
2099
|
+
p(t, o);
|
|
2100
|
+
var a = y(t);
|
|
2101
|
+
function t() {
|
|
2102
|
+
var r;
|
|
2103
|
+
g(this, t);
|
|
2104
|
+
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
2105
|
+
i[n] = arguments[n];
|
|
2106
|
+
return r = a.call.apply(a, [this].concat(i)), c(f(r), "priority", 130), c(f(r), "incompatibleTokens", ["G", "y", "Y", "u", "Q", "q", "M", "L", "w", "d", "D", "e", "c", "t", "T"]), r;
|
|
2107
|
+
}
|
|
2108
|
+
return w(t, [{
|
|
2109
|
+
key: "parse",
|
|
2110
|
+
value: function(e, i) {
|
|
2111
|
+
return Me(i === "R" ? 4 : i.length, e);
|
|
2112
|
+
}
|
|
2113
|
+
}, {
|
|
2114
|
+
key: "set",
|
|
2115
|
+
value: function(e, i, n) {
|
|
2116
|
+
var u = new Date(0);
|
|
2117
|
+
return u.setUTCFullYear(n, 0, 4), u.setUTCHours(0, 0, 0, 0), le(u);
|
|
2118
|
+
}
|
|
2119
|
+
}]), t;
|
|
2120
|
+
}(b), ha = /* @__PURE__ */ function(o) {
|
|
2121
|
+
p(t, o);
|
|
2122
|
+
var a = y(t);
|
|
2123
|
+
function t() {
|
|
2124
|
+
var r;
|
|
2125
|
+
g(this, t);
|
|
2126
|
+
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
2127
|
+
i[n] = arguments[n];
|
|
2128
|
+
return r = a.call.apply(a, [this].concat(i)), c(f(r), "priority", 130), c(f(r), "incompatibleTokens", ["G", "y", "Y", "R", "w", "I", "i", "e", "c", "t", "T"]), r;
|
|
2129
|
+
}
|
|
2130
|
+
return w(t, [{
|
|
2131
|
+
key: "parse",
|
|
2132
|
+
value: function(e, i) {
|
|
2133
|
+
return Me(i === "u" ? 4 : i.length, e);
|
|
2134
|
+
}
|
|
2135
|
+
}, {
|
|
2136
|
+
key: "set",
|
|
2137
|
+
value: function(e, i, n) {
|
|
2138
|
+
return e.setUTCFullYear(n, 0, 1), e.setUTCHours(0, 0, 0, 0), e;
|
|
2139
|
+
}
|
|
2140
|
+
}]), t;
|
|
2141
|
+
}(b), ga = /* @__PURE__ */ function(o) {
|
|
2142
|
+
p(t, o);
|
|
2143
|
+
var a = y(t);
|
|
2144
|
+
function t() {
|
|
2145
|
+
var r;
|
|
2146
|
+
g(this, t);
|
|
2147
|
+
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
2148
|
+
i[n] = arguments[n];
|
|
2149
|
+
return r = a.call.apply(a, [this].concat(i)), c(f(r), "priority", 120), c(f(r), "incompatibleTokens", ["Y", "R", "q", "M", "L", "w", "I", "d", "D", "i", "e", "c", "t", "T"]), r;
|
|
2150
|
+
}
|
|
2151
|
+
return w(t, [{
|
|
2152
|
+
key: "parse",
|
|
2153
|
+
value: function(e, i, n) {
|
|
2154
|
+
switch (i) {
|
|
2155
|
+
case "Q":
|
|
2156
|
+
case "QQ":
|
|
2157
|
+
return k(i.length, e);
|
|
2158
|
+
case "Qo":
|
|
2159
|
+
return n.ordinalNumber(e, {
|
|
2160
|
+
unit: "quarter"
|
|
2161
|
+
});
|
|
2162
|
+
case "QQQ":
|
|
2163
|
+
return n.quarter(e, {
|
|
2164
|
+
width: "abbreviated",
|
|
2165
|
+
context: "formatting"
|
|
2166
|
+
}) || n.quarter(e, {
|
|
2167
|
+
width: "narrow",
|
|
2168
|
+
context: "formatting"
|
|
2169
|
+
});
|
|
2170
|
+
case "QQQQQ":
|
|
2171
|
+
return n.quarter(e, {
|
|
2172
|
+
width: "narrow",
|
|
2173
|
+
context: "formatting"
|
|
2174
|
+
});
|
|
2175
|
+
case "QQQQ":
|
|
2176
|
+
default:
|
|
2177
|
+
return n.quarter(e, {
|
|
2178
|
+
width: "wide",
|
|
2179
|
+
context: "formatting"
|
|
2180
|
+
}) || n.quarter(e, {
|
|
2181
|
+
width: "abbreviated",
|
|
2182
|
+
context: "formatting"
|
|
2183
|
+
}) || n.quarter(e, {
|
|
2184
|
+
width: "narrow",
|
|
2185
|
+
context: "formatting"
|
|
2186
|
+
});
|
|
2187
|
+
}
|
|
2188
|
+
}
|
|
2189
|
+
}, {
|
|
2190
|
+
key: "validate",
|
|
2191
|
+
value: function(e, i) {
|
|
2192
|
+
return i >= 1 && i <= 4;
|
|
2193
|
+
}
|
|
2194
|
+
}, {
|
|
2195
|
+
key: "set",
|
|
2196
|
+
value: function(e, i, n) {
|
|
2197
|
+
return e.setUTCMonth((n - 1) * 3, 1), e.setUTCHours(0, 0, 0, 0), e;
|
|
2198
|
+
}
|
|
2199
|
+
}]), t;
|
|
2200
|
+
}(b), wa = /* @__PURE__ */ function(o) {
|
|
2201
|
+
p(t, o);
|
|
2202
|
+
var a = y(t);
|
|
2203
|
+
function t() {
|
|
2204
|
+
var r;
|
|
2205
|
+
g(this, t);
|
|
2206
|
+
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
2207
|
+
i[n] = arguments[n];
|
|
2208
|
+
return r = a.call.apply(a, [this].concat(i)), c(f(r), "priority", 120), c(f(r), "incompatibleTokens", ["Y", "R", "Q", "M", "L", "w", "I", "d", "D", "i", "e", "c", "t", "T"]), r;
|
|
2209
|
+
}
|
|
2210
|
+
return w(t, [{
|
|
2211
|
+
key: "parse",
|
|
2212
|
+
value: function(e, i, n) {
|
|
2213
|
+
switch (i) {
|
|
2214
|
+
case "q":
|
|
2215
|
+
case "qq":
|
|
2216
|
+
return k(i.length, e);
|
|
2217
|
+
case "qo":
|
|
2218
|
+
return n.ordinalNumber(e, {
|
|
2219
|
+
unit: "quarter"
|
|
2220
|
+
});
|
|
2221
|
+
case "qqq":
|
|
2222
|
+
return n.quarter(e, {
|
|
2223
|
+
width: "abbreviated",
|
|
2224
|
+
context: "standalone"
|
|
2225
|
+
}) || n.quarter(e, {
|
|
2226
|
+
width: "narrow",
|
|
2227
|
+
context: "standalone"
|
|
2228
|
+
});
|
|
2229
|
+
case "qqqqq":
|
|
2230
|
+
return n.quarter(e, {
|
|
2231
|
+
width: "narrow",
|
|
2232
|
+
context: "standalone"
|
|
2233
|
+
});
|
|
2234
|
+
case "qqqq":
|
|
2235
|
+
default:
|
|
2236
|
+
return n.quarter(e, {
|
|
2237
|
+
width: "wide",
|
|
2238
|
+
context: "standalone"
|
|
2239
|
+
}) || n.quarter(e, {
|
|
2240
|
+
width: "abbreviated",
|
|
2241
|
+
context: "standalone"
|
|
2242
|
+
}) || n.quarter(e, {
|
|
2243
|
+
width: "narrow",
|
|
2244
|
+
context: "standalone"
|
|
2245
|
+
});
|
|
2246
|
+
}
|
|
2247
|
+
}
|
|
2248
|
+
}, {
|
|
2249
|
+
key: "validate",
|
|
2250
|
+
value: function(e, i) {
|
|
2251
|
+
return i >= 1 && i <= 4;
|
|
2252
|
+
}
|
|
2253
|
+
}, {
|
|
2254
|
+
key: "set",
|
|
2255
|
+
value: function(e, i, n) {
|
|
2256
|
+
return e.setUTCMonth((n - 1) * 3, 1), e.setUTCHours(0, 0, 0, 0), e;
|
|
2257
|
+
}
|
|
2258
|
+
}]), t;
|
|
2259
|
+
}(b), pa = /* @__PURE__ */ function(o) {
|
|
2260
|
+
p(t, o);
|
|
2261
|
+
var a = y(t);
|
|
2262
|
+
function t() {
|
|
2263
|
+
var r;
|
|
2264
|
+
g(this, t);
|
|
2265
|
+
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
2266
|
+
i[n] = arguments[n];
|
|
2267
|
+
return r = a.call.apply(a, [this].concat(i)), c(f(r), "incompatibleTokens", ["Y", "R", "q", "Q", "L", "w", "I", "D", "i", "e", "c", "t", "T"]), c(f(r), "priority", 110), r;
|
|
2268
|
+
}
|
|
2269
|
+
return w(t, [{
|
|
2270
|
+
key: "parse",
|
|
2271
|
+
value: function(e, i, n) {
|
|
2272
|
+
var u = function(l) {
|
|
2273
|
+
return l - 1;
|
|
2274
|
+
};
|
|
2275
|
+
switch (i) {
|
|
2276
|
+
case "M":
|
|
2277
|
+
return x(M(C.month, e), u);
|
|
2278
|
+
case "MM":
|
|
2279
|
+
return x(k(2, e), u);
|
|
2280
|
+
case "Mo":
|
|
2281
|
+
return x(n.ordinalNumber(e, {
|
|
2282
|
+
unit: "month"
|
|
2283
|
+
}), u);
|
|
2284
|
+
case "MMM":
|
|
2285
|
+
return n.month(e, {
|
|
2286
|
+
width: "abbreviated",
|
|
2287
|
+
context: "formatting"
|
|
2288
|
+
}) || n.month(e, {
|
|
2289
|
+
width: "narrow",
|
|
2290
|
+
context: "formatting"
|
|
2291
|
+
});
|
|
2292
|
+
case "MMMMM":
|
|
2293
|
+
return n.month(e, {
|
|
2294
|
+
width: "narrow",
|
|
2295
|
+
context: "formatting"
|
|
2296
|
+
});
|
|
2297
|
+
case "MMMM":
|
|
2298
|
+
default:
|
|
2299
|
+
return n.month(e, {
|
|
2300
|
+
width: "wide",
|
|
2301
|
+
context: "formatting"
|
|
2302
|
+
}) || n.month(e, {
|
|
2303
|
+
width: "abbreviated",
|
|
2304
|
+
context: "formatting"
|
|
2305
|
+
}) || n.month(e, {
|
|
2306
|
+
width: "narrow",
|
|
2307
|
+
context: "formatting"
|
|
2308
|
+
});
|
|
2309
|
+
}
|
|
2310
|
+
}
|
|
2311
|
+
}, {
|
|
2312
|
+
key: "validate",
|
|
2313
|
+
value: function(e, i) {
|
|
2314
|
+
return i >= 0 && i <= 11;
|
|
2315
|
+
}
|
|
2316
|
+
}, {
|
|
2317
|
+
key: "set",
|
|
2318
|
+
value: function(e, i, n) {
|
|
2319
|
+
return e.setUTCMonth(n, 1), e.setUTCHours(0, 0, 0, 0), e;
|
|
2320
|
+
}
|
|
2321
|
+
}]), t;
|
|
2322
|
+
}(b), ya = /* @__PURE__ */ function(o) {
|
|
2323
|
+
p(t, o);
|
|
2324
|
+
var a = y(t);
|
|
2325
|
+
function t() {
|
|
2326
|
+
var r;
|
|
2327
|
+
g(this, t);
|
|
2328
|
+
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
2329
|
+
i[n] = arguments[n];
|
|
2330
|
+
return r = a.call.apply(a, [this].concat(i)), c(f(r), "priority", 110), c(f(r), "incompatibleTokens", ["Y", "R", "q", "Q", "M", "w", "I", "D", "i", "e", "c", "t", "T"]), r;
|
|
2331
|
+
}
|
|
2332
|
+
return w(t, [{
|
|
2333
|
+
key: "parse",
|
|
2334
|
+
value: function(e, i, n) {
|
|
2335
|
+
var u = function(l) {
|
|
2336
|
+
return l - 1;
|
|
2337
|
+
};
|
|
2338
|
+
switch (i) {
|
|
2339
|
+
case "L":
|
|
2340
|
+
return x(M(C.month, e), u);
|
|
2341
|
+
case "LL":
|
|
2342
|
+
return x(k(2, e), u);
|
|
2343
|
+
case "Lo":
|
|
2344
|
+
return x(n.ordinalNumber(e, {
|
|
2345
|
+
unit: "month"
|
|
2346
|
+
}), u);
|
|
2347
|
+
case "LLL":
|
|
2348
|
+
return n.month(e, {
|
|
2349
|
+
width: "abbreviated",
|
|
2350
|
+
context: "standalone"
|
|
2351
|
+
}) || n.month(e, {
|
|
2352
|
+
width: "narrow",
|
|
2353
|
+
context: "standalone"
|
|
2354
|
+
});
|
|
2355
|
+
case "LLLLL":
|
|
2356
|
+
return n.month(e, {
|
|
2357
|
+
width: "narrow",
|
|
2358
|
+
context: "standalone"
|
|
2359
|
+
});
|
|
2360
|
+
case "LLLL":
|
|
2361
|
+
default:
|
|
2362
|
+
return n.month(e, {
|
|
2363
|
+
width: "wide",
|
|
2364
|
+
context: "standalone"
|
|
2365
|
+
}) || n.month(e, {
|
|
2366
|
+
width: "abbreviated",
|
|
2367
|
+
context: "standalone"
|
|
2368
|
+
}) || n.month(e, {
|
|
2369
|
+
width: "narrow",
|
|
2370
|
+
context: "standalone"
|
|
2371
|
+
});
|
|
2372
|
+
}
|
|
2373
|
+
}
|
|
2374
|
+
}, {
|
|
2375
|
+
key: "validate",
|
|
2376
|
+
value: function(e, i) {
|
|
2377
|
+
return i >= 0 && i <= 11;
|
|
2378
|
+
}
|
|
2379
|
+
}, {
|
|
2380
|
+
key: "set",
|
|
2381
|
+
value: function(e, i, n) {
|
|
2382
|
+
return e.setUTCMonth(n, 1), e.setUTCHours(0, 0, 0, 0), e;
|
|
2383
|
+
}
|
|
2384
|
+
}]), t;
|
|
2385
|
+
}(b);
|
|
2386
|
+
function ba(o, a, t) {
|
|
2387
|
+
O(2, arguments);
|
|
2388
|
+
var r = _(o), e = L(a), i = st(r, t) - e;
|
|
2389
|
+
return r.setUTCDate(r.getUTCDate() - i * 7), r;
|
|
2390
|
+
}
|
|
2391
|
+
var Ta = /* @__PURE__ */ function(o) {
|
|
2392
|
+
p(t, o);
|
|
2393
|
+
var a = y(t);
|
|
2394
|
+
function t() {
|
|
2395
|
+
var r;
|
|
2396
|
+
g(this, t);
|
|
2397
|
+
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
2398
|
+
i[n] = arguments[n];
|
|
2399
|
+
return r = a.call.apply(a, [this].concat(i)), c(f(r), "priority", 100), c(f(r), "incompatibleTokens", ["y", "R", "u", "q", "Q", "M", "L", "I", "d", "D", "i", "t", "T"]), r;
|
|
2400
|
+
}
|
|
2401
|
+
return w(t, [{
|
|
2402
|
+
key: "parse",
|
|
2403
|
+
value: function(e, i, n) {
|
|
2404
|
+
switch (i) {
|
|
2405
|
+
case "w":
|
|
2406
|
+
return M(C.week, e);
|
|
2407
|
+
case "wo":
|
|
2408
|
+
return n.ordinalNumber(e, {
|
|
2409
|
+
unit: "week"
|
|
2410
|
+
});
|
|
2411
|
+
default:
|
|
2412
|
+
return k(i.length, e);
|
|
2413
|
+
}
|
|
2414
|
+
}
|
|
2415
|
+
}, {
|
|
2416
|
+
key: "validate",
|
|
2417
|
+
value: function(e, i) {
|
|
2418
|
+
return i >= 1 && i <= 53;
|
|
2419
|
+
}
|
|
2420
|
+
}, {
|
|
2421
|
+
key: "set",
|
|
2422
|
+
value: function(e, i, n, u) {
|
|
2423
|
+
return oe(ba(e, n, u), u);
|
|
2424
|
+
}
|
|
2425
|
+
}]), t;
|
|
2426
|
+
}(b);
|
|
2427
|
+
function Da(o, a) {
|
|
2428
|
+
O(2, arguments);
|
|
2429
|
+
var t = _(o), r = L(a), e = ut(t) - r;
|
|
2430
|
+
return t.setUTCDate(t.getUTCDate() - e * 7), t;
|
|
2431
|
+
}
|
|
2432
|
+
var Pa = /* @__PURE__ */ function(o) {
|
|
2433
|
+
p(t, o);
|
|
2434
|
+
var a = y(t);
|
|
2435
|
+
function t() {
|
|
2436
|
+
var r;
|
|
2437
|
+
g(this, t);
|
|
2438
|
+
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
2439
|
+
i[n] = arguments[n];
|
|
2440
|
+
return r = a.call.apply(a, [this].concat(i)), c(f(r), "priority", 100), c(f(r), "incompatibleTokens", ["y", "Y", "u", "q", "Q", "M", "L", "w", "d", "D", "e", "c", "t", "T"]), r;
|
|
2441
|
+
}
|
|
2442
|
+
return w(t, [{
|
|
2443
|
+
key: "parse",
|
|
2444
|
+
value: function(e, i, n) {
|
|
2445
|
+
switch (i) {
|
|
2446
|
+
case "I":
|
|
2447
|
+
return M(C.week, e);
|
|
2448
|
+
case "Io":
|
|
2449
|
+
return n.ordinalNumber(e, {
|
|
2450
|
+
unit: "week"
|
|
2451
|
+
});
|
|
2452
|
+
default:
|
|
2453
|
+
return k(i.length, e);
|
|
2454
|
+
}
|
|
2455
|
+
}
|
|
2456
|
+
}, {
|
|
2457
|
+
key: "validate",
|
|
2458
|
+
value: function(e, i) {
|
|
2459
|
+
return i >= 1 && i <= 53;
|
|
2460
|
+
}
|
|
2461
|
+
}, {
|
|
2462
|
+
key: "set",
|
|
2463
|
+
value: function(e, i, n) {
|
|
2464
|
+
return le(Da(e, n));
|
|
2465
|
+
}
|
|
2466
|
+
}]), t;
|
|
2467
|
+
}(b), Ma = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], ka = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Ca = /* @__PURE__ */ function(o) {
|
|
2468
|
+
p(t, o);
|
|
2469
|
+
var a = y(t);
|
|
2470
|
+
function t() {
|
|
2471
|
+
var r;
|
|
2472
|
+
g(this, t);
|
|
2473
|
+
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
2474
|
+
i[n] = arguments[n];
|
|
2475
|
+
return r = a.call.apply(a, [this].concat(i)), c(f(r), "priority", 90), c(f(r), "subPriority", 1), c(f(r), "incompatibleTokens", ["Y", "R", "q", "Q", "w", "I", "D", "i", "e", "c", "t", "T"]), r;
|
|
2476
|
+
}
|
|
2477
|
+
return w(t, [{
|
|
2478
|
+
key: "parse",
|
|
2479
|
+
value: function(e, i, n) {
|
|
2480
|
+
switch (i) {
|
|
2481
|
+
case "d":
|
|
2482
|
+
return M(C.date, e);
|
|
2483
|
+
case "do":
|
|
2484
|
+
return n.ordinalNumber(e, {
|
|
2485
|
+
unit: "date"
|
|
2486
|
+
});
|
|
2487
|
+
default:
|
|
2488
|
+
return k(i.length, e);
|
|
2489
|
+
}
|
|
2490
|
+
}
|
|
2491
|
+
}, {
|
|
2492
|
+
key: "validate",
|
|
2493
|
+
value: function(e, i) {
|
|
2494
|
+
var n = e.getUTCFullYear(), u = pt(n), s = e.getUTCMonth();
|
|
2495
|
+
return u ? i >= 1 && i <= ka[s] : i >= 1 && i <= Ma[s];
|
|
2496
|
+
}
|
|
2497
|
+
}, {
|
|
2498
|
+
key: "set",
|
|
2499
|
+
value: function(e, i, n) {
|
|
2500
|
+
return e.setUTCDate(n), e.setUTCHours(0, 0, 0, 0), e;
|
|
2501
|
+
}
|
|
2502
|
+
}]), t;
|
|
2503
|
+
}(b), xa = /* @__PURE__ */ function(o) {
|
|
2504
|
+
p(t, o);
|
|
2505
|
+
var a = y(t);
|
|
2506
|
+
function t() {
|
|
2507
|
+
var r;
|
|
2508
|
+
g(this, t);
|
|
2509
|
+
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
2510
|
+
i[n] = arguments[n];
|
|
2511
|
+
return r = a.call.apply(a, [this].concat(i)), c(f(r), "priority", 90), c(f(r), "subpriority", 1), c(f(r), "incompatibleTokens", ["Y", "R", "q", "Q", "M", "L", "w", "I", "d", "E", "i", "e", "c", "t", "T"]), r;
|
|
2512
|
+
}
|
|
2513
|
+
return w(t, [{
|
|
2514
|
+
key: "parse",
|
|
2515
|
+
value: function(e, i, n) {
|
|
2516
|
+
switch (i) {
|
|
2517
|
+
case "D":
|
|
2518
|
+
case "DD":
|
|
2519
|
+
return M(C.dayOfYear, e);
|
|
2520
|
+
case "Do":
|
|
2521
|
+
return n.ordinalNumber(e, {
|
|
2522
|
+
unit: "date"
|
|
2523
|
+
});
|
|
2524
|
+
default:
|
|
2525
|
+
return k(i.length, e);
|
|
2526
|
+
}
|
|
2527
|
+
}
|
|
2528
|
+
}, {
|
|
2529
|
+
key: "validate",
|
|
2530
|
+
value: function(e, i) {
|
|
2531
|
+
var n = e.getUTCFullYear(), u = pt(n);
|
|
2532
|
+
return u ? i >= 1 && i <= 366 : i >= 1 && i <= 365;
|
|
2533
|
+
}
|
|
2534
|
+
}, {
|
|
2535
|
+
key: "set",
|
|
2536
|
+
value: function(e, i, n) {
|
|
2537
|
+
return e.setUTCMonth(0, n), e.setUTCHours(0, 0, 0, 0), e;
|
|
2538
|
+
}
|
|
2539
|
+
}]), t;
|
|
2540
|
+
}(b);
|
|
2541
|
+
function He(o, a, t) {
|
|
2542
|
+
var r, e, i, n, u, s, l, d;
|
|
2543
|
+
O(2, arguments);
|
|
2544
|
+
var m = ce(), h = L((r = (e = (i = (n = t == null ? void 0 : t.weekStartsOn) !== null && n !== void 0 ? n : t == null || (u = t.locale) === null || u === void 0 || (s = u.options) === null || s === void 0 ? void 0 : s.weekStartsOn) !== null && i !== void 0 ? i : m.weekStartsOn) !== null && e !== void 0 ? e : (l = m.locale) === null || l === void 0 || (d = l.options) === null || d === void 0 ? void 0 : d.weekStartsOn) !== null && r !== void 0 ? r : 0);
|
|
2545
|
+
if (!(h >= 0 && h <= 6))
|
|
2546
|
+
throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
|
|
2547
|
+
var v = _(o), D = L(a), U = v.getUTCDay(), $ = D % 7, E = ($ + 7) % 7, W = (E < h ? 7 : 0) + D - U;
|
|
2548
|
+
return v.setUTCDate(v.getUTCDate() + W), v;
|
|
2549
|
+
}
|
|
2550
|
+
var Oa = /* @__PURE__ */ function(o) {
|
|
2551
|
+
p(t, o);
|
|
2552
|
+
var a = y(t);
|
|
2553
|
+
function t() {
|
|
2554
|
+
var r;
|
|
2555
|
+
g(this, t);
|
|
2556
|
+
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
2557
|
+
i[n] = arguments[n];
|
|
2558
|
+
return r = a.call.apply(a, [this].concat(i)), c(f(r), "priority", 90), c(f(r), "incompatibleTokens", ["D", "i", "e", "c", "t", "T"]), r;
|
|
2559
|
+
}
|
|
2560
|
+
return w(t, [{
|
|
2561
|
+
key: "parse",
|
|
2562
|
+
value: function(e, i, n) {
|
|
2563
|
+
switch (i) {
|
|
2564
|
+
case "E":
|
|
2565
|
+
case "EE":
|
|
2566
|
+
case "EEE":
|
|
2567
|
+
return n.day(e, {
|
|
2568
|
+
width: "abbreviated",
|
|
2569
|
+
context: "formatting"
|
|
2570
|
+
}) || n.day(e, {
|
|
2571
|
+
width: "short",
|
|
2572
|
+
context: "formatting"
|
|
2573
|
+
}) || n.day(e, {
|
|
2574
|
+
width: "narrow",
|
|
2575
|
+
context: "formatting"
|
|
2576
|
+
});
|
|
2577
|
+
case "EEEEE":
|
|
2578
|
+
return n.day(e, {
|
|
2579
|
+
width: "narrow",
|
|
2580
|
+
context: "formatting"
|
|
2581
|
+
});
|
|
2582
|
+
case "EEEEEE":
|
|
2583
|
+
return n.day(e, {
|
|
2584
|
+
width: "short",
|
|
2585
|
+
context: "formatting"
|
|
2586
|
+
}) || n.day(e, {
|
|
2587
|
+
width: "narrow",
|
|
2588
|
+
context: "formatting"
|
|
2589
|
+
});
|
|
2590
|
+
case "EEEE":
|
|
2591
|
+
default:
|
|
2592
|
+
return n.day(e, {
|
|
2593
|
+
width: "wide",
|
|
2594
|
+
context: "formatting"
|
|
2595
|
+
}) || n.day(e, {
|
|
2596
|
+
width: "abbreviated",
|
|
2597
|
+
context: "formatting"
|
|
2598
|
+
}) || n.day(e, {
|
|
2599
|
+
width: "short",
|
|
2600
|
+
context: "formatting"
|
|
2601
|
+
}) || n.day(e, {
|
|
2602
|
+
width: "narrow",
|
|
2603
|
+
context: "formatting"
|
|
2604
|
+
});
|
|
2605
|
+
}
|
|
2606
|
+
}
|
|
2607
|
+
}, {
|
|
2608
|
+
key: "validate",
|
|
2609
|
+
value: function(e, i) {
|
|
2610
|
+
return i >= 0 && i <= 6;
|
|
2611
|
+
}
|
|
2612
|
+
}, {
|
|
2613
|
+
key: "set",
|
|
2614
|
+
value: function(e, i, n, u) {
|
|
2615
|
+
return e = He(e, n, u), e.setUTCHours(0, 0, 0, 0), e;
|
|
2616
|
+
}
|
|
2617
|
+
}]), t;
|
|
2618
|
+
}(b), Ea = /* @__PURE__ */ function(o) {
|
|
2619
|
+
p(t, o);
|
|
2620
|
+
var a = y(t);
|
|
2621
|
+
function t() {
|
|
2622
|
+
var r;
|
|
2623
|
+
g(this, t);
|
|
2624
|
+
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
2625
|
+
i[n] = arguments[n];
|
|
2626
|
+
return r = a.call.apply(a, [this].concat(i)), c(f(r), "priority", 90), c(f(r), "incompatibleTokens", ["y", "R", "u", "q", "Q", "M", "L", "I", "d", "D", "E", "i", "c", "t", "T"]), r;
|
|
2627
|
+
}
|
|
2628
|
+
return w(t, [{
|
|
2629
|
+
key: "parse",
|
|
2630
|
+
value: function(e, i, n, u) {
|
|
2631
|
+
var s = function(d) {
|
|
2632
|
+
var m = Math.floor((d - 1) / 7) * 7;
|
|
2633
|
+
return (d + u.weekStartsOn + 6) % 7 + m;
|
|
2634
|
+
};
|
|
2635
|
+
switch (i) {
|
|
2636
|
+
case "e":
|
|
2637
|
+
case "ee":
|
|
2638
|
+
return x(k(i.length, e), s);
|
|
2639
|
+
case "eo":
|
|
2640
|
+
return x(n.ordinalNumber(e, {
|
|
2641
|
+
unit: "day"
|
|
2642
|
+
}), s);
|
|
2643
|
+
case "eee":
|
|
2644
|
+
return n.day(e, {
|
|
2645
|
+
width: "abbreviated",
|
|
2646
|
+
context: "formatting"
|
|
2647
|
+
}) || n.day(e, {
|
|
2648
|
+
width: "short",
|
|
2649
|
+
context: "formatting"
|
|
2650
|
+
}) || n.day(e, {
|
|
2651
|
+
width: "narrow",
|
|
2652
|
+
context: "formatting"
|
|
2653
|
+
});
|
|
2654
|
+
case "eeeee":
|
|
2655
|
+
return n.day(e, {
|
|
2656
|
+
width: "narrow",
|
|
2657
|
+
context: "formatting"
|
|
2658
|
+
});
|
|
2659
|
+
case "eeeeee":
|
|
2660
|
+
return n.day(e, {
|
|
2661
|
+
width: "short",
|
|
2662
|
+
context: "formatting"
|
|
2663
|
+
}) || n.day(e, {
|
|
2664
|
+
width: "narrow",
|
|
2665
|
+
context: "formatting"
|
|
2666
|
+
});
|
|
2667
|
+
case "eeee":
|
|
2668
|
+
default:
|
|
2669
|
+
return n.day(e, {
|
|
2670
|
+
width: "wide",
|
|
2671
|
+
context: "formatting"
|
|
2672
|
+
}) || n.day(e, {
|
|
2673
|
+
width: "abbreviated",
|
|
2674
|
+
context: "formatting"
|
|
2675
|
+
}) || n.day(e, {
|
|
2676
|
+
width: "short",
|
|
2677
|
+
context: "formatting"
|
|
2678
|
+
}) || n.day(e, {
|
|
2679
|
+
width: "narrow",
|
|
2680
|
+
context: "formatting"
|
|
2681
|
+
});
|
|
2682
|
+
}
|
|
2683
|
+
}
|
|
2684
|
+
}, {
|
|
2685
|
+
key: "validate",
|
|
2686
|
+
value: function(e, i) {
|
|
2687
|
+
return i >= 0 && i <= 6;
|
|
2688
|
+
}
|
|
2689
|
+
}, {
|
|
2690
|
+
key: "set",
|
|
2691
|
+
value: function(e, i, n, u) {
|
|
2692
|
+
return e = He(e, n, u), e.setUTCHours(0, 0, 0, 0), e;
|
|
2693
|
+
}
|
|
2694
|
+
}]), t;
|
|
2695
|
+
}(b), Ua = /* @__PURE__ */ function(o) {
|
|
2696
|
+
p(t, o);
|
|
2697
|
+
var a = y(t);
|
|
2698
|
+
function t() {
|
|
2699
|
+
var r;
|
|
2700
|
+
g(this, t);
|
|
2701
|
+
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
2702
|
+
i[n] = arguments[n];
|
|
2703
|
+
return r = a.call.apply(a, [this].concat(i)), c(f(r), "priority", 90), c(f(r), "incompatibleTokens", ["y", "R", "u", "q", "Q", "M", "L", "I", "d", "D", "E", "i", "e", "t", "T"]), r;
|
|
2704
|
+
}
|
|
2705
|
+
return w(t, [{
|
|
2706
|
+
key: "parse",
|
|
2707
|
+
value: function(e, i, n, u) {
|
|
2708
|
+
var s = function(d) {
|
|
2709
|
+
var m = Math.floor((d - 1) / 7) * 7;
|
|
2710
|
+
return (d + u.weekStartsOn + 6) % 7 + m;
|
|
2711
|
+
};
|
|
2712
|
+
switch (i) {
|
|
2713
|
+
case "c":
|
|
2714
|
+
case "cc":
|
|
2715
|
+
return x(k(i.length, e), s);
|
|
2716
|
+
case "co":
|
|
2717
|
+
return x(n.ordinalNumber(e, {
|
|
2718
|
+
unit: "day"
|
|
2719
|
+
}), s);
|
|
2720
|
+
case "ccc":
|
|
2721
|
+
return n.day(e, {
|
|
2722
|
+
width: "abbreviated",
|
|
2723
|
+
context: "standalone"
|
|
2724
|
+
}) || n.day(e, {
|
|
2725
|
+
width: "short",
|
|
2726
|
+
context: "standalone"
|
|
2727
|
+
}) || n.day(e, {
|
|
2728
|
+
width: "narrow",
|
|
2729
|
+
context: "standalone"
|
|
2730
|
+
});
|
|
2731
|
+
case "ccccc":
|
|
2732
|
+
return n.day(e, {
|
|
2733
|
+
width: "narrow",
|
|
2734
|
+
context: "standalone"
|
|
2735
|
+
});
|
|
2736
|
+
case "cccccc":
|
|
2737
|
+
return n.day(e, {
|
|
2738
|
+
width: "short",
|
|
2739
|
+
context: "standalone"
|
|
2740
|
+
}) || n.day(e, {
|
|
2741
|
+
width: "narrow",
|
|
2742
|
+
context: "standalone"
|
|
2743
|
+
});
|
|
2744
|
+
case "cccc":
|
|
2745
|
+
default:
|
|
2746
|
+
return n.day(e, {
|
|
2747
|
+
width: "wide",
|
|
2748
|
+
context: "standalone"
|
|
2749
|
+
}) || n.day(e, {
|
|
2750
|
+
width: "abbreviated",
|
|
2751
|
+
context: "standalone"
|
|
2752
|
+
}) || n.day(e, {
|
|
2753
|
+
width: "short",
|
|
2754
|
+
context: "standalone"
|
|
2755
|
+
}) || n.day(e, {
|
|
2756
|
+
width: "narrow",
|
|
2757
|
+
context: "standalone"
|
|
2758
|
+
});
|
|
2759
|
+
}
|
|
2760
|
+
}
|
|
2761
|
+
}, {
|
|
2762
|
+
key: "validate",
|
|
2763
|
+
value: function(e, i) {
|
|
2764
|
+
return i >= 0 && i <= 6;
|
|
2765
|
+
}
|
|
2766
|
+
}, {
|
|
2767
|
+
key: "set",
|
|
2768
|
+
value: function(e, i, n, u) {
|
|
2769
|
+
return e = He(e, n, u), e.setUTCHours(0, 0, 0, 0), e;
|
|
2770
|
+
}
|
|
2771
|
+
}]), t;
|
|
2772
|
+
}(b);
|
|
2773
|
+
function $a(o, a) {
|
|
2774
|
+
O(2, arguments);
|
|
2775
|
+
var t = L(a);
|
|
2776
|
+
t % 7 === 0 && (t = t - 7);
|
|
2777
|
+
var r = 1, e = _(o), i = e.getUTCDay(), n = t % 7, u = (n + 7) % 7, s = (u < r ? 7 : 0) + t - i;
|
|
2778
|
+
return e.setUTCDate(e.getUTCDate() + s), e;
|
|
2779
|
+
}
|
|
2780
|
+
var Wa = /* @__PURE__ */ function(o) {
|
|
2781
|
+
p(t, o);
|
|
2782
|
+
var a = y(t);
|
|
2783
|
+
function t() {
|
|
2784
|
+
var r;
|
|
2785
|
+
g(this, t);
|
|
2786
|
+
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
2787
|
+
i[n] = arguments[n];
|
|
2788
|
+
return r = a.call.apply(a, [this].concat(i)), c(f(r), "priority", 90), c(f(r), "incompatibleTokens", ["y", "Y", "u", "q", "Q", "M", "L", "w", "d", "D", "E", "e", "c", "t", "T"]), r;
|
|
2789
|
+
}
|
|
2790
|
+
return w(t, [{
|
|
2791
|
+
key: "parse",
|
|
2792
|
+
value: function(e, i, n) {
|
|
2793
|
+
var u = function(l) {
|
|
2794
|
+
return l === 0 ? 7 : l;
|
|
2795
|
+
};
|
|
2796
|
+
switch (i) {
|
|
2797
|
+
case "i":
|
|
2798
|
+
case "ii":
|
|
2799
|
+
return k(i.length, e);
|
|
2800
|
+
case "io":
|
|
2801
|
+
return n.ordinalNumber(e, {
|
|
2802
|
+
unit: "day"
|
|
2803
|
+
});
|
|
2804
|
+
case "iii":
|
|
2805
|
+
return x(n.day(e, {
|
|
2806
|
+
width: "abbreviated",
|
|
2807
|
+
context: "formatting"
|
|
2808
|
+
}) || n.day(e, {
|
|
2809
|
+
width: "short",
|
|
2810
|
+
context: "formatting"
|
|
2811
|
+
}) || n.day(e, {
|
|
2812
|
+
width: "narrow",
|
|
2813
|
+
context: "formatting"
|
|
2814
|
+
}), u);
|
|
2815
|
+
case "iiiii":
|
|
2816
|
+
return x(n.day(e, {
|
|
2817
|
+
width: "narrow",
|
|
2818
|
+
context: "formatting"
|
|
2819
|
+
}), u);
|
|
2820
|
+
case "iiiiii":
|
|
2821
|
+
return x(n.day(e, {
|
|
2822
|
+
width: "short",
|
|
2823
|
+
context: "formatting"
|
|
2824
|
+
}) || n.day(e, {
|
|
2825
|
+
width: "narrow",
|
|
2826
|
+
context: "formatting"
|
|
2827
|
+
}), u);
|
|
2828
|
+
case "iiii":
|
|
2829
|
+
default:
|
|
2830
|
+
return x(n.day(e, {
|
|
2831
|
+
width: "wide",
|
|
2832
|
+
context: "formatting"
|
|
2833
|
+
}) || n.day(e, {
|
|
2834
|
+
width: "abbreviated",
|
|
2835
|
+
context: "formatting"
|
|
2836
|
+
}) || n.day(e, {
|
|
2837
|
+
width: "short",
|
|
2838
|
+
context: "formatting"
|
|
2839
|
+
}) || n.day(e, {
|
|
2840
|
+
width: "narrow",
|
|
2841
|
+
context: "formatting"
|
|
2842
|
+
}), u);
|
|
2843
|
+
}
|
|
2844
|
+
}
|
|
2845
|
+
}, {
|
|
2846
|
+
key: "validate",
|
|
2847
|
+
value: function(e, i) {
|
|
2848
|
+
return i >= 1 && i <= 7;
|
|
2849
|
+
}
|
|
2850
|
+
}, {
|
|
2851
|
+
key: "set",
|
|
2852
|
+
value: function(e, i, n) {
|
|
2853
|
+
return e = $a(e, n), e.setUTCHours(0, 0, 0, 0), e;
|
|
2854
|
+
}
|
|
2855
|
+
}]), t;
|
|
2856
|
+
}(b), Ya = /* @__PURE__ */ function(o) {
|
|
2857
|
+
p(t, o);
|
|
2858
|
+
var a = y(t);
|
|
2859
|
+
function t() {
|
|
2860
|
+
var r;
|
|
2861
|
+
g(this, t);
|
|
2862
|
+
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
2863
|
+
i[n] = arguments[n];
|
|
2864
|
+
return r = a.call.apply(a, [this].concat(i)), c(f(r), "priority", 80), c(f(r), "incompatibleTokens", ["b", "B", "H", "k", "t", "T"]), r;
|
|
2865
|
+
}
|
|
2866
|
+
return w(t, [{
|
|
2867
|
+
key: "parse",
|
|
2868
|
+
value: function(e, i, n) {
|
|
2869
|
+
switch (i) {
|
|
2870
|
+
case "a":
|
|
2871
|
+
case "aa":
|
|
2872
|
+
case "aaa":
|
|
2873
|
+
return n.dayPeriod(e, {
|
|
2874
|
+
width: "abbreviated",
|
|
2875
|
+
context: "formatting"
|
|
2876
|
+
}) || n.dayPeriod(e, {
|
|
2877
|
+
width: "narrow",
|
|
2878
|
+
context: "formatting"
|
|
2879
|
+
});
|
|
2880
|
+
case "aaaaa":
|
|
2881
|
+
return n.dayPeriod(e, {
|
|
2882
|
+
width: "narrow",
|
|
2883
|
+
context: "formatting"
|
|
2884
|
+
});
|
|
2885
|
+
case "aaaa":
|
|
2886
|
+
default:
|
|
2887
|
+
return n.dayPeriod(e, {
|
|
2888
|
+
width: "wide",
|
|
2889
|
+
context: "formatting"
|
|
2890
|
+
}) || n.dayPeriod(e, {
|
|
2891
|
+
width: "abbreviated",
|
|
2892
|
+
context: "formatting"
|
|
2893
|
+
}) || n.dayPeriod(e, {
|
|
2894
|
+
width: "narrow",
|
|
2895
|
+
context: "formatting"
|
|
2896
|
+
});
|
|
2897
|
+
}
|
|
2898
|
+
}
|
|
2899
|
+
}, {
|
|
2900
|
+
key: "set",
|
|
2901
|
+
value: function(e, i, n) {
|
|
2902
|
+
return e.setUTCHours(Se(n), 0, 0, 0), e;
|
|
2903
|
+
}
|
|
2904
|
+
}]), t;
|
|
2905
|
+
}(b), Na = /* @__PURE__ */ function(o) {
|
|
2906
|
+
p(t, o);
|
|
2907
|
+
var a = y(t);
|
|
2908
|
+
function t() {
|
|
2909
|
+
var r;
|
|
2910
|
+
g(this, t);
|
|
2911
|
+
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
2912
|
+
i[n] = arguments[n];
|
|
2913
|
+
return r = a.call.apply(a, [this].concat(i)), c(f(r), "priority", 80), c(f(r), "incompatibleTokens", ["a", "B", "H", "k", "t", "T"]), r;
|
|
2914
|
+
}
|
|
2915
|
+
return w(t, [{
|
|
2916
|
+
key: "parse",
|
|
2917
|
+
value: function(e, i, n) {
|
|
2918
|
+
switch (i) {
|
|
2919
|
+
case "b":
|
|
2920
|
+
case "bb":
|
|
2921
|
+
case "bbb":
|
|
2922
|
+
return n.dayPeriod(e, {
|
|
2923
|
+
width: "abbreviated",
|
|
2924
|
+
context: "formatting"
|
|
2925
|
+
}) || n.dayPeriod(e, {
|
|
2926
|
+
width: "narrow",
|
|
2927
|
+
context: "formatting"
|
|
2928
|
+
});
|
|
2929
|
+
case "bbbbb":
|
|
2930
|
+
return n.dayPeriod(e, {
|
|
2931
|
+
width: "narrow",
|
|
2932
|
+
context: "formatting"
|
|
2933
|
+
});
|
|
2934
|
+
case "bbbb":
|
|
2935
|
+
default:
|
|
2936
|
+
return n.dayPeriod(e, {
|
|
2937
|
+
width: "wide",
|
|
2938
|
+
context: "formatting"
|
|
2939
|
+
}) || n.dayPeriod(e, {
|
|
2940
|
+
width: "abbreviated",
|
|
2941
|
+
context: "formatting"
|
|
2942
|
+
}) || n.dayPeriod(e, {
|
|
2943
|
+
width: "narrow",
|
|
2944
|
+
context: "formatting"
|
|
2945
|
+
});
|
|
2946
|
+
}
|
|
2947
|
+
}
|
|
2948
|
+
}, {
|
|
2949
|
+
key: "set",
|
|
2950
|
+
value: function(e, i, n) {
|
|
2951
|
+
return e.setUTCHours(Se(n), 0, 0, 0), e;
|
|
2952
|
+
}
|
|
2953
|
+
}]), t;
|
|
2954
|
+
}(b), _a = /* @__PURE__ */ function(o) {
|
|
2955
|
+
p(t, o);
|
|
2956
|
+
var a = y(t);
|
|
2957
|
+
function t() {
|
|
2958
|
+
var r;
|
|
2959
|
+
g(this, t);
|
|
2960
|
+
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
2961
|
+
i[n] = arguments[n];
|
|
2962
|
+
return r = a.call.apply(a, [this].concat(i)), c(f(r), "priority", 80), c(f(r), "incompatibleTokens", ["a", "b", "t", "T"]), r;
|
|
2963
|
+
}
|
|
2964
|
+
return w(t, [{
|
|
2965
|
+
key: "parse",
|
|
2966
|
+
value: function(e, i, n) {
|
|
2967
|
+
switch (i) {
|
|
2968
|
+
case "B":
|
|
2969
|
+
case "BB":
|
|
2970
|
+
case "BBB":
|
|
2971
|
+
return n.dayPeriod(e, {
|
|
2972
|
+
width: "abbreviated",
|
|
2973
|
+
context: "formatting"
|
|
2974
|
+
}) || n.dayPeriod(e, {
|
|
2975
|
+
width: "narrow",
|
|
2976
|
+
context: "formatting"
|
|
2977
|
+
});
|
|
2978
|
+
case "BBBBB":
|
|
2979
|
+
return n.dayPeriod(e, {
|
|
2980
|
+
width: "narrow",
|
|
2981
|
+
context: "formatting"
|
|
2982
|
+
});
|
|
2983
|
+
case "BBBB":
|
|
2984
|
+
default:
|
|
2985
|
+
return n.dayPeriod(e, {
|
|
2986
|
+
width: "wide",
|
|
2987
|
+
context: "formatting"
|
|
2988
|
+
}) || n.dayPeriod(e, {
|
|
2989
|
+
width: "abbreviated",
|
|
2990
|
+
context: "formatting"
|
|
2991
|
+
}) || n.dayPeriod(e, {
|
|
2992
|
+
width: "narrow",
|
|
2993
|
+
context: "formatting"
|
|
2994
|
+
});
|
|
2995
|
+
}
|
|
2996
|
+
}
|
|
2997
|
+
}, {
|
|
2998
|
+
key: "set",
|
|
2999
|
+
value: function(e, i, n) {
|
|
3000
|
+
return e.setUTCHours(Se(n), 0, 0, 0), e;
|
|
3001
|
+
}
|
|
3002
|
+
}]), t;
|
|
3003
|
+
}(b), Aa = /* @__PURE__ */ function(o) {
|
|
3004
|
+
p(t, o);
|
|
3005
|
+
var a = y(t);
|
|
3006
|
+
function t() {
|
|
3007
|
+
var r;
|
|
3008
|
+
g(this, t);
|
|
3009
|
+
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
3010
|
+
i[n] = arguments[n];
|
|
3011
|
+
return r = a.call.apply(a, [this].concat(i)), c(f(r), "priority", 70), c(f(r), "incompatibleTokens", ["H", "K", "k", "t", "T"]), r;
|
|
3012
|
+
}
|
|
3013
|
+
return w(t, [{
|
|
3014
|
+
key: "parse",
|
|
3015
|
+
value: function(e, i, n) {
|
|
3016
|
+
switch (i) {
|
|
3017
|
+
case "h":
|
|
3018
|
+
return M(C.hour12h, e);
|
|
3019
|
+
case "ho":
|
|
3020
|
+
return n.ordinalNumber(e, {
|
|
3021
|
+
unit: "hour"
|
|
3022
|
+
});
|
|
3023
|
+
default:
|
|
3024
|
+
return k(i.length, e);
|
|
3025
|
+
}
|
|
3026
|
+
}
|
|
3027
|
+
}, {
|
|
3028
|
+
key: "validate",
|
|
3029
|
+
value: function(e, i) {
|
|
3030
|
+
return i >= 1 && i <= 12;
|
|
3031
|
+
}
|
|
3032
|
+
}, {
|
|
3033
|
+
key: "set",
|
|
3034
|
+
value: function(e, i, n) {
|
|
3035
|
+
var u = e.getUTCHours() >= 12;
|
|
3036
|
+
return u && n < 12 ? e.setUTCHours(n + 12, 0, 0, 0) : !u && n === 12 ? e.setUTCHours(0, 0, 0, 0) : e.setUTCHours(n, 0, 0, 0), e;
|
|
3037
|
+
}
|
|
3038
|
+
}]), t;
|
|
3039
|
+
}(b), La = /* @__PURE__ */ function(o) {
|
|
3040
|
+
p(t, o);
|
|
3041
|
+
var a = y(t);
|
|
3042
|
+
function t() {
|
|
3043
|
+
var r;
|
|
3044
|
+
g(this, t);
|
|
3045
|
+
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
3046
|
+
i[n] = arguments[n];
|
|
3047
|
+
return r = a.call.apply(a, [this].concat(i)), c(f(r), "priority", 70), c(f(r), "incompatibleTokens", ["a", "b", "h", "K", "k", "t", "T"]), r;
|
|
3048
|
+
}
|
|
3049
|
+
return w(t, [{
|
|
3050
|
+
key: "parse",
|
|
3051
|
+
value: function(e, i, n) {
|
|
3052
|
+
switch (i) {
|
|
3053
|
+
case "H":
|
|
3054
|
+
return M(C.hour23h, e);
|
|
3055
|
+
case "Ho":
|
|
3056
|
+
return n.ordinalNumber(e, {
|
|
3057
|
+
unit: "hour"
|
|
3058
|
+
});
|
|
3059
|
+
default:
|
|
3060
|
+
return k(i.length, e);
|
|
3061
|
+
}
|
|
3062
|
+
}
|
|
3063
|
+
}, {
|
|
3064
|
+
key: "validate",
|
|
3065
|
+
value: function(e, i) {
|
|
3066
|
+
return i >= 0 && i <= 23;
|
|
3067
|
+
}
|
|
3068
|
+
}, {
|
|
3069
|
+
key: "set",
|
|
3070
|
+
value: function(e, i, n) {
|
|
3071
|
+
return e.setUTCHours(n, 0, 0, 0), e;
|
|
3072
|
+
}
|
|
3073
|
+
}]), t;
|
|
3074
|
+
}(b), Sa = /* @__PURE__ */ function(o) {
|
|
3075
|
+
p(t, o);
|
|
3076
|
+
var a = y(t);
|
|
3077
|
+
function t() {
|
|
3078
|
+
var r;
|
|
3079
|
+
g(this, t);
|
|
3080
|
+
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
3081
|
+
i[n] = arguments[n];
|
|
3082
|
+
return r = a.call.apply(a, [this].concat(i)), c(f(r), "priority", 70), c(f(r), "incompatibleTokens", ["h", "H", "k", "t", "T"]), r;
|
|
3083
|
+
}
|
|
3084
|
+
return w(t, [{
|
|
3085
|
+
key: "parse",
|
|
3086
|
+
value: function(e, i, n) {
|
|
3087
|
+
switch (i) {
|
|
3088
|
+
case "K":
|
|
3089
|
+
return M(C.hour11h, e);
|
|
3090
|
+
case "Ko":
|
|
3091
|
+
return n.ordinalNumber(e, {
|
|
3092
|
+
unit: "hour"
|
|
3093
|
+
});
|
|
3094
|
+
default:
|
|
3095
|
+
return k(i.length, e);
|
|
3096
|
+
}
|
|
3097
|
+
}
|
|
3098
|
+
}, {
|
|
3099
|
+
key: "validate",
|
|
3100
|
+
value: function(e, i) {
|
|
3101
|
+
return i >= 0 && i <= 11;
|
|
3102
|
+
}
|
|
3103
|
+
}, {
|
|
3104
|
+
key: "set",
|
|
3105
|
+
value: function(e, i, n) {
|
|
3106
|
+
var u = e.getUTCHours() >= 12;
|
|
3107
|
+
return u && n < 12 ? e.setUTCHours(n + 12, 0, 0, 0) : e.setUTCHours(n, 0, 0, 0), e;
|
|
3108
|
+
}
|
|
3109
|
+
}]), t;
|
|
3110
|
+
}(b), Ha = /* @__PURE__ */ function(o) {
|
|
3111
|
+
p(t, o);
|
|
3112
|
+
var a = y(t);
|
|
3113
|
+
function t() {
|
|
3114
|
+
var r;
|
|
3115
|
+
g(this, t);
|
|
3116
|
+
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
3117
|
+
i[n] = arguments[n];
|
|
3118
|
+
return r = a.call.apply(a, [this].concat(i)), c(f(r), "priority", 70), c(f(r), "incompatibleTokens", ["a", "b", "h", "H", "K", "t", "T"]), r;
|
|
3119
|
+
}
|
|
3120
|
+
return w(t, [{
|
|
3121
|
+
key: "parse",
|
|
3122
|
+
value: function(e, i, n) {
|
|
3123
|
+
switch (i) {
|
|
3124
|
+
case "k":
|
|
3125
|
+
return M(C.hour24h, e);
|
|
3126
|
+
case "ko":
|
|
3127
|
+
return n.ordinalNumber(e, {
|
|
3128
|
+
unit: "hour"
|
|
3129
|
+
});
|
|
3130
|
+
default:
|
|
3131
|
+
return k(i.length, e);
|
|
3132
|
+
}
|
|
3133
|
+
}
|
|
3134
|
+
}, {
|
|
3135
|
+
key: "validate",
|
|
3136
|
+
value: function(e, i) {
|
|
3137
|
+
return i >= 1 && i <= 24;
|
|
3138
|
+
}
|
|
3139
|
+
}, {
|
|
3140
|
+
key: "set",
|
|
3141
|
+
value: function(e, i, n) {
|
|
3142
|
+
var u = n <= 24 ? n % 24 : n;
|
|
3143
|
+
return e.setUTCHours(u, 0, 0, 0), e;
|
|
3144
|
+
}
|
|
3145
|
+
}]), t;
|
|
3146
|
+
}(b), Ra = /* @__PURE__ */ function(o) {
|
|
3147
|
+
p(t, o);
|
|
3148
|
+
var a = y(t);
|
|
3149
|
+
function t() {
|
|
3150
|
+
var r;
|
|
3151
|
+
g(this, t);
|
|
3152
|
+
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
3153
|
+
i[n] = arguments[n];
|
|
3154
|
+
return r = a.call.apply(a, [this].concat(i)), c(f(r), "priority", 60), c(f(r), "incompatibleTokens", ["t", "T"]), r;
|
|
3155
|
+
}
|
|
3156
|
+
return w(t, [{
|
|
3157
|
+
key: "parse",
|
|
3158
|
+
value: function(e, i, n) {
|
|
3159
|
+
switch (i) {
|
|
3160
|
+
case "m":
|
|
3161
|
+
return M(C.minute, e);
|
|
3162
|
+
case "mo":
|
|
3163
|
+
return n.ordinalNumber(e, {
|
|
3164
|
+
unit: "minute"
|
|
3165
|
+
});
|
|
3166
|
+
default:
|
|
3167
|
+
return k(i.length, e);
|
|
3168
|
+
}
|
|
3169
|
+
}
|
|
3170
|
+
}, {
|
|
3171
|
+
key: "validate",
|
|
3172
|
+
value: function(e, i) {
|
|
3173
|
+
return i >= 0 && i <= 59;
|
|
3174
|
+
}
|
|
3175
|
+
}, {
|
|
3176
|
+
key: "set",
|
|
3177
|
+
value: function(e, i, n) {
|
|
3178
|
+
return e.setUTCMinutes(n, 0, 0), e;
|
|
3179
|
+
}
|
|
3180
|
+
}]), t;
|
|
3181
|
+
}(b), Ia = /* @__PURE__ */ function(o) {
|
|
3182
|
+
p(t, o);
|
|
3183
|
+
var a = y(t);
|
|
3184
|
+
function t() {
|
|
3185
|
+
var r;
|
|
3186
|
+
g(this, t);
|
|
3187
|
+
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
3188
|
+
i[n] = arguments[n];
|
|
3189
|
+
return r = a.call.apply(a, [this].concat(i)), c(f(r), "priority", 50), c(f(r), "incompatibleTokens", ["t", "T"]), r;
|
|
3190
|
+
}
|
|
3191
|
+
return w(t, [{
|
|
3192
|
+
key: "parse",
|
|
3193
|
+
value: function(e, i, n) {
|
|
3194
|
+
switch (i) {
|
|
3195
|
+
case "s":
|
|
3196
|
+
return M(C.second, e);
|
|
3197
|
+
case "so":
|
|
3198
|
+
return n.ordinalNumber(e, {
|
|
3199
|
+
unit: "second"
|
|
3200
|
+
});
|
|
3201
|
+
default:
|
|
3202
|
+
return k(i.length, e);
|
|
3203
|
+
}
|
|
3204
|
+
}
|
|
3205
|
+
}, {
|
|
3206
|
+
key: "validate",
|
|
3207
|
+
value: function(e, i) {
|
|
3208
|
+
return i >= 0 && i <= 59;
|
|
3209
|
+
}
|
|
3210
|
+
}, {
|
|
3211
|
+
key: "set",
|
|
3212
|
+
value: function(e, i, n) {
|
|
3213
|
+
return e.setUTCSeconds(n, 0), e;
|
|
3214
|
+
}
|
|
3215
|
+
}]), t;
|
|
3216
|
+
}(b), qa = /* @__PURE__ */ function(o) {
|
|
3217
|
+
p(t, o);
|
|
3218
|
+
var a = y(t);
|
|
3219
|
+
function t() {
|
|
3220
|
+
var r;
|
|
3221
|
+
g(this, t);
|
|
3222
|
+
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
3223
|
+
i[n] = arguments[n];
|
|
3224
|
+
return r = a.call.apply(a, [this].concat(i)), c(f(r), "priority", 30), c(f(r), "incompatibleTokens", ["t", "T"]), r;
|
|
3225
|
+
}
|
|
3226
|
+
return w(t, [{
|
|
3227
|
+
key: "parse",
|
|
3228
|
+
value: function(e, i) {
|
|
3229
|
+
var n = function(s) {
|
|
3230
|
+
return Math.floor(s * Math.pow(10, -i.length + 3));
|
|
3231
|
+
};
|
|
3232
|
+
return x(k(i.length, e), n);
|
|
3233
|
+
}
|
|
3234
|
+
}, {
|
|
3235
|
+
key: "set",
|
|
3236
|
+
value: function(e, i, n) {
|
|
3237
|
+
return e.setUTCMilliseconds(n), e;
|
|
3238
|
+
}
|
|
3239
|
+
}]), t;
|
|
3240
|
+
}(b), Fa = /* @__PURE__ */ function(o) {
|
|
3241
|
+
p(t, o);
|
|
3242
|
+
var a = y(t);
|
|
3243
|
+
function t() {
|
|
3244
|
+
var r;
|
|
3245
|
+
g(this, t);
|
|
3246
|
+
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
3247
|
+
i[n] = arguments[n];
|
|
3248
|
+
return r = a.call.apply(a, [this].concat(i)), c(f(r), "priority", 10), c(f(r), "incompatibleTokens", ["t", "T", "x"]), r;
|
|
3249
|
+
}
|
|
3250
|
+
return w(t, [{
|
|
3251
|
+
key: "parse",
|
|
3252
|
+
value: function(e, i) {
|
|
3253
|
+
switch (i) {
|
|
3254
|
+
case "X":
|
|
3255
|
+
return V(j.basicOptionalMinutes, e);
|
|
3256
|
+
case "XX":
|
|
3257
|
+
return V(j.basic, e);
|
|
3258
|
+
case "XXXX":
|
|
3259
|
+
return V(j.basicOptionalSeconds, e);
|
|
3260
|
+
case "XXXXX":
|
|
3261
|
+
return V(j.extendedOptionalSeconds, e);
|
|
3262
|
+
case "XXX":
|
|
3263
|
+
default:
|
|
3264
|
+
return V(j.extended, e);
|
|
3265
|
+
}
|
|
3266
|
+
}
|
|
3267
|
+
}, {
|
|
3268
|
+
key: "set",
|
|
3269
|
+
value: function(e, i, n) {
|
|
3270
|
+
return i.timestampIsSet ? e : new Date(e.getTime() - n);
|
|
3271
|
+
}
|
|
3272
|
+
}]), t;
|
|
3273
|
+
}(b), Qa = /* @__PURE__ */ function(o) {
|
|
3274
|
+
p(t, o);
|
|
3275
|
+
var a = y(t);
|
|
3276
|
+
function t() {
|
|
3277
|
+
var r;
|
|
3278
|
+
g(this, t);
|
|
3279
|
+
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
3280
|
+
i[n] = arguments[n];
|
|
3281
|
+
return r = a.call.apply(a, [this].concat(i)), c(f(r), "priority", 10), c(f(r), "incompatibleTokens", ["t", "T", "X"]), r;
|
|
3282
|
+
}
|
|
3283
|
+
return w(t, [{
|
|
3284
|
+
key: "parse",
|
|
3285
|
+
value: function(e, i) {
|
|
3286
|
+
switch (i) {
|
|
3287
|
+
case "x":
|
|
3288
|
+
return V(j.basicOptionalMinutes, e);
|
|
3289
|
+
case "xx":
|
|
3290
|
+
return V(j.basic, e);
|
|
3291
|
+
case "xxxx":
|
|
3292
|
+
return V(j.basicOptionalSeconds, e);
|
|
3293
|
+
case "xxxxx":
|
|
3294
|
+
return V(j.extendedOptionalSeconds, e);
|
|
3295
|
+
case "xxx":
|
|
3296
|
+
default:
|
|
3297
|
+
return V(j.extended, e);
|
|
3298
|
+
}
|
|
3299
|
+
}
|
|
3300
|
+
}, {
|
|
3301
|
+
key: "set",
|
|
3302
|
+
value: function(e, i, n) {
|
|
3303
|
+
return i.timestampIsSet ? e : new Date(e.getTime() - n);
|
|
3304
|
+
}
|
|
3305
|
+
}]), t;
|
|
3306
|
+
}(b), Ba = /* @__PURE__ */ function(o) {
|
|
3307
|
+
p(t, o);
|
|
3308
|
+
var a = y(t);
|
|
3309
|
+
function t() {
|
|
3310
|
+
var r;
|
|
3311
|
+
g(this, t);
|
|
3312
|
+
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
3313
|
+
i[n] = arguments[n];
|
|
3314
|
+
return r = a.call.apply(a, [this].concat(i)), c(f(r), "priority", 40), c(f(r), "incompatibleTokens", "*"), r;
|
|
3315
|
+
}
|
|
3316
|
+
return w(t, [{
|
|
3317
|
+
key: "parse",
|
|
3318
|
+
value: function(e) {
|
|
3319
|
+
return gt(e);
|
|
3320
|
+
}
|
|
3321
|
+
}, {
|
|
3322
|
+
key: "set",
|
|
3323
|
+
value: function(e, i, n) {
|
|
3324
|
+
return [new Date(n * 1e3), {
|
|
3325
|
+
timestampIsSet: !0
|
|
3326
|
+
}];
|
|
3327
|
+
}
|
|
3328
|
+
}]), t;
|
|
3329
|
+
}(b), ja = /* @__PURE__ */ function(o) {
|
|
3330
|
+
p(t, o);
|
|
3331
|
+
var a = y(t);
|
|
3332
|
+
function t() {
|
|
3333
|
+
var r;
|
|
3334
|
+
g(this, t);
|
|
3335
|
+
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
3336
|
+
i[n] = arguments[n];
|
|
3337
|
+
return r = a.call.apply(a, [this].concat(i)), c(f(r), "priority", 20), c(f(r), "incompatibleTokens", "*"), r;
|
|
3338
|
+
}
|
|
3339
|
+
return w(t, [{
|
|
3340
|
+
key: "parse",
|
|
3341
|
+
value: function(e) {
|
|
3342
|
+
return gt(e);
|
|
3343
|
+
}
|
|
3344
|
+
}, {
|
|
3345
|
+
key: "set",
|
|
3346
|
+
value: function(e, i, n) {
|
|
3347
|
+
return [new Date(n), {
|
|
3348
|
+
timestampIsSet: !0
|
|
3349
|
+
}];
|
|
3350
|
+
}
|
|
3351
|
+
}]), t;
|
|
3352
|
+
}(b), Va = {
|
|
3353
|
+
G: new da(),
|
|
3354
|
+
y: new fa(),
|
|
3355
|
+
Y: new ma(),
|
|
3356
|
+
R: new va(),
|
|
3357
|
+
u: new ha(),
|
|
3358
|
+
Q: new ga(),
|
|
3359
|
+
q: new wa(),
|
|
3360
|
+
M: new pa(),
|
|
3361
|
+
L: new ya(),
|
|
3362
|
+
w: new Ta(),
|
|
3363
|
+
I: new Pa(),
|
|
3364
|
+
d: new Ca(),
|
|
3365
|
+
D: new xa(),
|
|
3366
|
+
E: new Oa(),
|
|
3367
|
+
e: new Ea(),
|
|
3368
|
+
c: new Ua(),
|
|
3369
|
+
i: new Wa(),
|
|
3370
|
+
a: new Ya(),
|
|
3371
|
+
b: new Na(),
|
|
3372
|
+
B: new _a(),
|
|
3373
|
+
h: new Aa(),
|
|
3374
|
+
H: new La(),
|
|
3375
|
+
K: new Sa(),
|
|
3376
|
+
k: new Ha(),
|
|
3377
|
+
m: new Ra(),
|
|
3378
|
+
s: new Ia(),
|
|
3379
|
+
S: new qa(),
|
|
3380
|
+
X: new Fa(),
|
|
3381
|
+
x: new Qa(),
|
|
3382
|
+
t: new Ba(),
|
|
3383
|
+
T: new ja()
|
|
3384
|
+
}, Xa = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Ga = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Ka = /^'([^]*?)'?$/, Ja = /''/g, za = /\S/, Za = /[a-zA-Z]/;
|
|
3385
|
+
function rt(o, a, t, r) {
|
|
3386
|
+
var e, i, n, u, s, l, d, m, h, v, D, U, $, E, W, H, R, de;
|
|
3387
|
+
O(3, arguments);
|
|
3388
|
+
var A = String(o), F = String(a), X = ce(), J = (e = (i = r == null ? void 0 : r.locale) !== null && i !== void 0 ? i : X.locale) !== null && e !== void 0 ? e : mt;
|
|
3389
|
+
if (!J.match)
|
|
3390
|
+
throw new RangeError("locale must contain match property");
|
|
3391
|
+
var z = L((n = (u = (s = (l = r == null ? void 0 : r.firstWeekContainsDate) !== null && l !== void 0 ? l : r == null || (d = r.locale) === null || d === void 0 || (m = d.options) === null || m === void 0 ? void 0 : m.firstWeekContainsDate) !== null && s !== void 0 ? s : X.firstWeekContainsDate) !== null && u !== void 0 ? u : (h = X.locale) === null || h === void 0 || (v = h.options) === null || v === void 0 ? void 0 : v.firstWeekContainsDate) !== null && n !== void 0 ? n : 1);
|
|
3392
|
+
if (!(z >= 1 && z <= 7))
|
|
3393
|
+
throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
|
|
3394
|
+
var fe = L((D = (U = ($ = (E = r == null ? void 0 : r.weekStartsOn) !== null && E !== void 0 ? E : r == null || (W = r.locale) === null || W === void 0 || (H = W.options) === null || H === void 0 ? void 0 : H.weekStartsOn) !== null && $ !== void 0 ? $ : X.weekStartsOn) !== null && U !== void 0 ? U : (R = X.locale) === null || R === void 0 || (de = R.options) === null || de === void 0 ? void 0 : de.weekStartsOn) !== null && D !== void 0 ? D : 0);
|
|
3395
|
+
if (!(fe >= 0 && fe <= 6))
|
|
3396
|
+
throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
|
|
3397
|
+
if (F === "")
|
|
3398
|
+
return A === "" ? _(t) : new Date(NaN);
|
|
3399
|
+
var me = {
|
|
3400
|
+
firstWeekContainsDate: z,
|
|
3401
|
+
weekStartsOn: fe,
|
|
3402
|
+
locale: J
|
|
3403
|
+
}, ve = [new ca()], ke = F.match(Ga).map(function(Y) {
|
|
3404
|
+
var P = Y[0];
|
|
3405
|
+
if (P in Ne) {
|
|
3406
|
+
var I = Ne[P];
|
|
3407
|
+
return I(Y, J.formatLong);
|
|
3408
|
+
}
|
|
3409
|
+
return Y;
|
|
3410
|
+
}).join("").match(Xa), N = [], S = et(ke), ae;
|
|
3411
|
+
try {
|
|
3412
|
+
var yt = function() {
|
|
3413
|
+
var P = ae.value;
|
|
3414
|
+
!(r != null && r.useAdditionalWeekYearTokens) && dt(P) && De(P, F, o), !(r != null && r.useAdditionalDayOfYearTokens) && ct(P) && De(P, F, o);
|
|
3415
|
+
var I = P[0], be = Va[I];
|
|
3416
|
+
if (be) {
|
|
3417
|
+
var Qe = be.incompatibleTokens;
|
|
3418
|
+
if (Array.isArray(Qe)) {
|
|
3419
|
+
var Be = N.find(function(je) {
|
|
3420
|
+
return Qe.includes(je.token) || je.token === I;
|
|
3421
|
+
});
|
|
3422
|
+
if (Be)
|
|
3423
|
+
throw new RangeError("The format string mustn't contain `".concat(Be.fullToken, "` and `").concat(P, "` at the same time"));
|
|
3424
|
+
} else if (be.incompatibleTokens === "*" && N.length > 0)
|
|
3425
|
+
throw new RangeError("The format string mustn't contain `".concat(P, "` and any other token at the same time"));
|
|
3426
|
+
N.push({
|
|
3427
|
+
token: I,
|
|
3428
|
+
fullToken: P
|
|
3429
|
+
});
|
|
3430
|
+
var xe = be.run(A, P, J.match, me);
|
|
3431
|
+
if (!xe)
|
|
3432
|
+
return {
|
|
3433
|
+
v: new Date(NaN)
|
|
3434
|
+
};
|
|
3435
|
+
ve.push(xe.setter), A = xe.rest;
|
|
3436
|
+
} else {
|
|
3437
|
+
if (I.match(Za))
|
|
3438
|
+
throw new RangeError("Format string contains an unescaped latin alphabet character `" + I + "`");
|
|
3439
|
+
if (P === "''" ? P = "'" : I === "'" && (P = en(P)), A.indexOf(P) === 0)
|
|
3440
|
+
A = A.slice(P.length);
|
|
3441
|
+
else
|
|
3442
|
+
return {
|
|
3443
|
+
v: new Date(NaN)
|
|
3444
|
+
};
|
|
3445
|
+
}
|
|
3446
|
+
};
|
|
3447
|
+
for (S.s(); !(ae = S.n()).done; ) {
|
|
3448
|
+
var Re = yt();
|
|
3449
|
+
if (K(Re) === "object")
|
|
3450
|
+
return Re.v;
|
|
3451
|
+
}
|
|
3452
|
+
} catch (Y) {
|
|
3453
|
+
S.e(Y);
|
|
3454
|
+
} finally {
|
|
3455
|
+
S.f();
|
|
3456
|
+
}
|
|
3457
|
+
if (A.length > 0 && za.test(A))
|
|
3458
|
+
return new Date(NaN);
|
|
3459
|
+
var bt = ve.map(function(Y) {
|
|
3460
|
+
return Y.priority;
|
|
3461
|
+
}).sort(function(Y, P) {
|
|
3462
|
+
return P - Y;
|
|
3463
|
+
}).filter(function(Y, P, I) {
|
|
3464
|
+
return I.indexOf(Y) === P;
|
|
3465
|
+
}).map(function(Y) {
|
|
3466
|
+
return ve.filter(function(P) {
|
|
3467
|
+
return P.priority === Y;
|
|
3468
|
+
}).sort(function(P, I) {
|
|
3469
|
+
return I.subPriority - P.subPriority;
|
|
3470
|
+
});
|
|
3471
|
+
}).map(function(Y) {
|
|
3472
|
+
return Y[0];
|
|
3473
|
+
}), Ce = _(t);
|
|
3474
|
+
if (isNaN(Ce.getTime()))
|
|
3475
|
+
return new Date(NaN);
|
|
3476
|
+
var he = it(Ce, nt(Ce)), Ie = {}, pe = et(bt), qe;
|
|
3477
|
+
try {
|
|
3478
|
+
for (pe.s(); !(qe = pe.n()).done; ) {
|
|
3479
|
+
var Fe = qe.value;
|
|
3480
|
+
if (!Fe.validate(he, me))
|
|
3481
|
+
return new Date(NaN);
|
|
3482
|
+
var ye = Fe.set(he, Ie, me);
|
|
3483
|
+
Array.isArray(ye) ? (he = ye[0], aa(Ie, ye[1])) : he = ye;
|
|
3484
|
+
}
|
|
3485
|
+
} catch (Y) {
|
|
3486
|
+
pe.e(Y);
|
|
3487
|
+
} finally {
|
|
3488
|
+
pe.f();
|
|
3489
|
+
}
|
|
3490
|
+
return he;
|
|
3491
|
+
}
|
|
3492
|
+
function en(o) {
|
|
3493
|
+
return o.match(Ka)[1].replace(Ja, "'");
|
|
3494
|
+
}
|
|
3495
|
+
var tn = {
|
|
3496
|
+
lessThanXSeconds: {
|
|
3497
|
+
one: "kurang dari 1 detik",
|
|
3498
|
+
other: "kurang dari {{count}} detik"
|
|
3499
|
+
},
|
|
3500
|
+
xSeconds: {
|
|
3501
|
+
one: "1 detik",
|
|
3502
|
+
other: "{{count}} detik"
|
|
3503
|
+
},
|
|
3504
|
+
halfAMinute: "setengah menit",
|
|
3505
|
+
lessThanXMinutes: {
|
|
3506
|
+
one: "kurang dari 1 menit",
|
|
3507
|
+
other: "kurang dari {{count}} menit"
|
|
3508
|
+
},
|
|
3509
|
+
xMinutes: {
|
|
3510
|
+
one: "1 menit",
|
|
3511
|
+
other: "{{count}} menit"
|
|
3512
|
+
},
|
|
3513
|
+
aboutXHours: {
|
|
3514
|
+
one: "sekitar 1 jam",
|
|
3515
|
+
other: "sekitar {{count}} jam"
|
|
3516
|
+
},
|
|
3517
|
+
xHours: {
|
|
3518
|
+
one: "1 jam",
|
|
3519
|
+
other: "{{count}} jam"
|
|
3520
|
+
},
|
|
3521
|
+
xDays: {
|
|
3522
|
+
one: "1 hari",
|
|
3523
|
+
other: "{{count}} hari"
|
|
3524
|
+
},
|
|
3525
|
+
aboutXWeeks: {
|
|
3526
|
+
one: "sekitar 1 minggu",
|
|
3527
|
+
other: "sekitar {{count}} minggu"
|
|
3528
|
+
},
|
|
3529
|
+
xWeeks: {
|
|
3530
|
+
one: "1 minggu",
|
|
3531
|
+
other: "{{count}} minggu"
|
|
3532
|
+
},
|
|
3533
|
+
aboutXMonths: {
|
|
3534
|
+
one: "sekitar 1 bulan",
|
|
3535
|
+
other: "sekitar {{count}} bulan"
|
|
3536
|
+
},
|
|
3537
|
+
xMonths: {
|
|
3538
|
+
one: "1 bulan",
|
|
3539
|
+
other: "{{count}} bulan"
|
|
3540
|
+
},
|
|
3541
|
+
aboutXYears: {
|
|
3542
|
+
one: "sekitar 1 tahun",
|
|
3543
|
+
other: "sekitar {{count}} tahun"
|
|
3544
|
+
},
|
|
3545
|
+
xYears: {
|
|
3546
|
+
one: "1 tahun",
|
|
3547
|
+
other: "{{count}} tahun"
|
|
3548
|
+
},
|
|
3549
|
+
overXYears: {
|
|
3550
|
+
one: "lebih dari 1 tahun",
|
|
3551
|
+
other: "lebih dari {{count}} tahun"
|
|
3552
|
+
},
|
|
3553
|
+
almostXYears: {
|
|
3554
|
+
one: "hampir 1 tahun",
|
|
3555
|
+
other: "hampir {{count}} tahun"
|
|
3556
|
+
}
|
|
3557
|
+
}, rn = function(a, t, r) {
|
|
3558
|
+
var e, i = tn[a];
|
|
3559
|
+
return typeof i == "string" ? e = i : t === 1 ? e = i.one : e = i.other.replace("{{count}}", t.toString()), r != null && r.addSuffix ? r.comparison && r.comparison > 0 ? "dalam waktu " + e : e + " yang lalu" : e;
|
|
3560
|
+
};
|
|
3561
|
+
const an = rn;
|
|
3562
|
+
var nn = {
|
|
3563
|
+
full: "EEEE, d MMMM yyyy",
|
|
3564
|
+
long: "d MMMM yyyy",
|
|
3565
|
+
medium: "d MMM yyyy",
|
|
3566
|
+
short: "d/M/yyyy"
|
|
3567
|
+
}, on = {
|
|
3568
|
+
full: "HH.mm.ss",
|
|
3569
|
+
long: "HH.mm.ss",
|
|
3570
|
+
medium: "HH.mm",
|
|
3571
|
+
short: "HH.mm"
|
|
3572
|
+
}, un = {
|
|
3573
|
+
full: "{{date}} 'pukul' {{time}}",
|
|
3574
|
+
long: "{{date}} 'pukul' {{time}}",
|
|
3575
|
+
medium: "{{date}}, {{time}}",
|
|
3576
|
+
short: "{{date}}, {{time}}"
|
|
3577
|
+
}, sn = {
|
|
3578
|
+
date: se({
|
|
3579
|
+
formats: nn,
|
|
3580
|
+
defaultWidth: "full"
|
|
3581
|
+
}),
|
|
3582
|
+
time: se({
|
|
3583
|
+
formats: on,
|
|
3584
|
+
defaultWidth: "full"
|
|
3585
|
+
}),
|
|
3586
|
+
dateTime: se({
|
|
3587
|
+
formats: un,
|
|
3588
|
+
defaultWidth: "full"
|
|
3589
|
+
})
|
|
3590
|
+
};
|
|
3591
|
+
const ln = sn;
|
|
3592
|
+
var cn = {
|
|
3593
|
+
lastWeek: "eeee 'lalu pukul' p",
|
|
3594
|
+
yesterday: "'Kemarin pukul' p",
|
|
3595
|
+
today: "'Hari ini pukul' p",
|
|
3596
|
+
tomorrow: "'Besok pukul' p",
|
|
3597
|
+
nextWeek: "eeee 'pukul' p",
|
|
3598
|
+
other: "P"
|
|
3599
|
+
}, dn = function(a, t, r, e) {
|
|
3600
|
+
return cn[a];
|
|
3601
|
+
};
|
|
3602
|
+
const fn = dn;
|
|
3603
|
+
var mn = {
|
|
3604
|
+
narrow: ["SM", "M"],
|
|
3605
|
+
abbreviated: ["SM", "M"],
|
|
3606
|
+
wide: ["Sebelum Masehi", "Masehi"]
|
|
3607
|
+
}, vn = {
|
|
3608
|
+
narrow: ["1", "2", "3", "4"],
|
|
3609
|
+
abbreviated: ["K1", "K2", "K3", "K4"],
|
|
3610
|
+
wide: ["Kuartal ke-1", "Kuartal ke-2", "Kuartal ke-3", "Kuartal ke-4"]
|
|
3611
|
+
}, hn = {
|
|
3612
|
+
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
3613
|
+
abbreviated: ["Jan", "Feb", "Mar", "Apr", "Mei", "Jun", "Jul", "Agt", "Sep", "Okt", "Nov", "Des"],
|
|
3614
|
+
wide: ["Januari", "Februari", "Maret", "April", "Mei", "Juni", "Juli", "Agustus", "September", "Oktober", "November", "Desember"]
|
|
3615
|
+
}, gn = {
|
|
3616
|
+
narrow: ["M", "S", "S", "R", "K", "J", "S"],
|
|
3617
|
+
short: ["Min", "Sen", "Sel", "Rab", "Kam", "Jum", "Sab"],
|
|
3618
|
+
abbreviated: ["Min", "Sen", "Sel", "Rab", "Kam", "Jum", "Sab"],
|
|
3619
|
+
wide: ["Minggu", "Senin", "Selasa", "Rabu", "Kamis", "Jumat", "Sabtu"]
|
|
3620
|
+
}, wn = {
|
|
3621
|
+
narrow: {
|
|
3622
|
+
am: "AM",
|
|
3623
|
+
pm: "PM",
|
|
3624
|
+
midnight: "tengah malam",
|
|
3625
|
+
noon: "tengah hari",
|
|
3626
|
+
morning: "pagi",
|
|
3627
|
+
afternoon: "siang",
|
|
3628
|
+
evening: "sore",
|
|
3629
|
+
night: "malam"
|
|
3630
|
+
},
|
|
3631
|
+
abbreviated: {
|
|
3632
|
+
am: "AM",
|
|
3633
|
+
pm: "PM",
|
|
3634
|
+
midnight: "tengah malam",
|
|
3635
|
+
noon: "tengah hari",
|
|
3636
|
+
morning: "pagi",
|
|
3637
|
+
afternoon: "siang",
|
|
3638
|
+
evening: "sore",
|
|
3639
|
+
night: "malam"
|
|
3640
|
+
},
|
|
3641
|
+
wide: {
|
|
3642
|
+
am: "AM",
|
|
3643
|
+
pm: "PM",
|
|
3644
|
+
midnight: "tengah malam",
|
|
3645
|
+
noon: "tengah hari",
|
|
3646
|
+
morning: "pagi",
|
|
3647
|
+
afternoon: "siang",
|
|
3648
|
+
evening: "sore",
|
|
3649
|
+
night: "malam"
|
|
3650
|
+
}
|
|
3651
|
+
}, pn = {
|
|
3652
|
+
narrow: {
|
|
3653
|
+
am: "AM",
|
|
3654
|
+
pm: "PM",
|
|
3655
|
+
midnight: "tengah malam",
|
|
3656
|
+
noon: "tengah hari",
|
|
3657
|
+
morning: "pagi",
|
|
3658
|
+
afternoon: "siang",
|
|
3659
|
+
evening: "sore",
|
|
3660
|
+
night: "malam"
|
|
3661
|
+
},
|
|
3662
|
+
abbreviated: {
|
|
3663
|
+
am: "AM",
|
|
3664
|
+
pm: "PM",
|
|
3665
|
+
midnight: "tengah malam",
|
|
3666
|
+
noon: "tengah hari",
|
|
3667
|
+
morning: "pagi",
|
|
3668
|
+
afternoon: "siang",
|
|
3669
|
+
evening: "sore",
|
|
3670
|
+
night: "malam"
|
|
3671
|
+
},
|
|
3672
|
+
wide: {
|
|
3673
|
+
am: "AM",
|
|
3674
|
+
pm: "PM",
|
|
3675
|
+
midnight: "tengah malam",
|
|
3676
|
+
noon: "tengah hari",
|
|
3677
|
+
morning: "pagi",
|
|
3678
|
+
afternoon: "siang",
|
|
3679
|
+
evening: "sore",
|
|
3680
|
+
night: "malam"
|
|
3681
|
+
}
|
|
3682
|
+
}, yn = function(a, t) {
|
|
3683
|
+
var r = Number(a);
|
|
3684
|
+
return "ke-" + r;
|
|
3685
|
+
}, bn = {
|
|
3686
|
+
ordinalNumber: yn,
|
|
3687
|
+
era: Q({
|
|
3688
|
+
values: mn,
|
|
3689
|
+
defaultWidth: "wide"
|
|
3690
|
+
}),
|
|
3691
|
+
quarter: Q({
|
|
3692
|
+
values: vn,
|
|
3693
|
+
defaultWidth: "wide",
|
|
3694
|
+
argumentCallback: function(a) {
|
|
3695
|
+
return a - 1;
|
|
3696
|
+
}
|
|
3697
|
+
}),
|
|
3698
|
+
month: Q({
|
|
3699
|
+
values: hn,
|
|
3700
|
+
defaultWidth: "wide"
|
|
3701
|
+
}),
|
|
3702
|
+
day: Q({
|
|
3703
|
+
values: gn,
|
|
3704
|
+
defaultWidth: "wide"
|
|
3705
|
+
}),
|
|
3706
|
+
dayPeriod: Q({
|
|
3707
|
+
values: wn,
|
|
3708
|
+
defaultWidth: "wide",
|
|
3709
|
+
formattingValues: pn,
|
|
3710
|
+
defaultFormattingWidth: "wide"
|
|
3711
|
+
})
|
|
3712
|
+
};
|
|
3713
|
+
const Tn = bn;
|
|
3714
|
+
var Dn = /^ke-(\d+)?/i, Pn = /\d+/i, Mn = {
|
|
3715
|
+
narrow: /^(sm|m)/i,
|
|
3716
|
+
abbreviated: /^(s\.?\s?m\.?|s\.?\s?e\.?\s?u\.?|m\.?|e\.?\s?u\.?)/i,
|
|
3717
|
+
wide: /^(sebelum masehi|sebelum era umum|masehi|era umum)/i
|
|
3718
|
+
}, kn = {
|
|
3719
|
+
any: [/^s/i, /^(m|e)/i]
|
|
3720
|
+
}, Cn = {
|
|
3721
|
+
narrow: /^[1234]/i,
|
|
3722
|
+
abbreviated: /^K-?\s[1234]/i,
|
|
3723
|
+
wide: /^Kuartal ke-?\s?[1234]/i
|
|
3724
|
+
}, xn = {
|
|
3725
|
+
any: [/1/i, /2/i, /3/i, /4/i]
|
|
3726
|
+
}, On = {
|
|
3727
|
+
narrow: /^[jfmasond]/i,
|
|
3728
|
+
abbreviated: /^(jan|feb|mar|apr|mei|jun|jul|agt|sep|okt|nov|des)/i,
|
|
3729
|
+
wide: /^(januari|februari|maret|april|mei|juni|juli|agustus|september|oktober|november|desember)/i
|
|
3730
|
+
}, En = {
|
|
3731
|
+
narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],
|
|
3732
|
+
any: [/^ja/i, /^f/i, /^ma/i, /^ap/i, /^me/i, /^jun/i, /^jul/i, /^ag/i, /^s/i, /^o/i, /^n/i, /^d/i]
|
|
3733
|
+
}, Un = {
|
|
3734
|
+
narrow: /^[srkjm]/i,
|
|
3735
|
+
short: /^(min|sen|sel|rab|kam|jum|sab)/i,
|
|
3736
|
+
abbreviated: /^(min|sen|sel|rab|kam|jum|sab)/i,
|
|
3737
|
+
wide: /^(minggu|senin|selasa|rabu|kamis|jumat|sabtu)/i
|
|
3738
|
+
}, $n = {
|
|
3739
|
+
narrow: [/^m/i, /^s/i, /^s/i, /^r/i, /^k/i, /^j/i, /^s/i],
|
|
3740
|
+
any: [/^m/i, /^sen/i, /^sel/i, /^r/i, /^k/i, /^j/i, /^sa/i]
|
|
3741
|
+
}, Wn = {
|
|
3742
|
+
narrow: /^(a|p|tengah m|tengah h|(di(\swaktu)?) (pagi|siang|sore|malam))/i,
|
|
3743
|
+
any: /^([ap]\.?\s?m\.?|tengah malam|tengah hari|(di(\swaktu)?) (pagi|siang|sore|malam))/i
|
|
3744
|
+
}, Yn = {
|
|
3745
|
+
any: {
|
|
3746
|
+
am: /^a/i,
|
|
3747
|
+
pm: /^pm/i,
|
|
3748
|
+
midnight: /^tengah m/i,
|
|
3749
|
+
noon: /^tengah h/i,
|
|
3750
|
+
morning: /pagi/i,
|
|
3751
|
+
afternoon: /siang/i,
|
|
3752
|
+
evening: /sore/i,
|
|
3753
|
+
night: /malam/i
|
|
3754
|
+
}
|
|
3755
|
+
}, Nn = {
|
|
3756
|
+
ordinalNumber: ft({
|
|
3757
|
+
matchPattern: Dn,
|
|
3758
|
+
parsePattern: Pn,
|
|
3759
|
+
valueCallback: function(a) {
|
|
3760
|
+
return parseInt(a, 10);
|
|
3761
|
+
}
|
|
3762
|
+
}),
|
|
3763
|
+
era: B({
|
|
3764
|
+
matchPatterns: Mn,
|
|
3765
|
+
defaultMatchWidth: "wide",
|
|
3766
|
+
parsePatterns: kn,
|
|
3767
|
+
defaultParseWidth: "any"
|
|
3768
|
+
}),
|
|
3769
|
+
quarter: B({
|
|
3770
|
+
matchPatterns: Cn,
|
|
3771
|
+
defaultMatchWidth: "wide",
|
|
3772
|
+
parsePatterns: xn,
|
|
3773
|
+
defaultParseWidth: "any",
|
|
3774
|
+
valueCallback: function(a) {
|
|
3775
|
+
return a + 1;
|
|
3776
|
+
}
|
|
3777
|
+
}),
|
|
3778
|
+
month: B({
|
|
3779
|
+
matchPatterns: On,
|
|
3780
|
+
defaultMatchWidth: "wide",
|
|
3781
|
+
parsePatterns: En,
|
|
3782
|
+
defaultParseWidth: "any"
|
|
3783
|
+
}),
|
|
3784
|
+
day: B({
|
|
3785
|
+
matchPatterns: Un,
|
|
3786
|
+
defaultMatchWidth: "wide",
|
|
3787
|
+
parsePatterns: $n,
|
|
3788
|
+
defaultParseWidth: "any"
|
|
3789
|
+
}),
|
|
3790
|
+
dayPeriod: B({
|
|
3791
|
+
matchPatterns: Wn,
|
|
3792
|
+
defaultMatchWidth: "any",
|
|
3793
|
+
parsePatterns: Yn,
|
|
3794
|
+
defaultParseWidth: "any"
|
|
3795
|
+
})
|
|
3796
|
+
};
|
|
3797
|
+
const _n = Nn;
|
|
3798
|
+
var An = {
|
|
3799
|
+
code: "id",
|
|
3800
|
+
formatDistance: an,
|
|
3801
|
+
formatLong: ln,
|
|
3802
|
+
formatRelative: fn,
|
|
3803
|
+
localize: Tn,
|
|
3804
|
+
match: _n,
|
|
3805
|
+
options: {
|
|
3806
|
+
weekStartsOn: 1,
|
|
3807
|
+
firstWeekContainsDate: 1
|
|
3808
|
+
}
|
|
3809
|
+
};
|
|
3810
|
+
const te = An;
|
|
3811
|
+
function Ln(o) {
|
|
3812
|
+
let a = "";
|
|
3813
|
+
const { dateStart: t, dateEnd: r } = o, e = Ye(rt(t, "yyyy-MM-dd HH:mm", new Date())), i = Ye(rt(r, "yyyy-MM-dd HH:mm", new Date()));
|
|
3814
|
+
if (e && i) {
|
|
3815
|
+
const n = t.split(" "), u = n[0].split("-"), s = u[0], l = u[1], d = r.split(" "), m = d[0].split("-"), h = m[0], v = m[1];
|
|
3816
|
+
n[0] === d[0] ? a = `Voucher hanya berlaku di tanggal ${ee(new Date(t), "d MMM yyyy", { locale: te })}.` : s !== h ? a = `Voucher berlaku dari ${ee(new Date(t), "d MMM yyyy", { locale: te })} - ${ee(
|
|
3817
|
+
new Date(r),
|
|
3818
|
+
"d MMM yyyy",
|
|
3819
|
+
{ locale: te }
|
|
3820
|
+
)}.` : s === h && (l === v ? a = `Voucher berlaku dari ${ee(new Date(t), "d", { locale: te })} - ${ee(
|
|
3821
|
+
new Date(r),
|
|
3822
|
+
"d MMM yyyy",
|
|
3823
|
+
{
|
|
3824
|
+
locale: te
|
|
3825
|
+
}
|
|
3826
|
+
)}.` : a = `Voucher berlaku dari ${ee(new Date(t), "d MMM", { locale: te })} - ${ee(
|
|
3827
|
+
new Date(r),
|
|
3828
|
+
"d MMM yyyy",
|
|
3829
|
+
{ locale: te }
|
|
3830
|
+
)}.`);
|
|
3831
|
+
} else
|
|
3832
|
+
e && !i && (a = `Voucher berlaku dari ${ee(new Date(t), "d MMM yyyy", { locale: te })}.`);
|
|
3833
|
+
return a;
|
|
3834
|
+
}
|
|
3835
|
+
function Sn(o) {
|
|
3836
|
+
let a = "";
|
|
3837
|
+
const {
|
|
3838
|
+
type: t,
|
|
3839
|
+
discountType: r,
|
|
3840
|
+
discountValue: e,
|
|
3841
|
+
isCheckedMaxFee: i,
|
|
3842
|
+
maxDiscountAmount: n,
|
|
3843
|
+
transactionTerms: u,
|
|
3844
|
+
termsMinTotalAmount: s,
|
|
3845
|
+
termsMinQty: l,
|
|
3846
|
+
limitFee: d
|
|
3847
|
+
} = o, m = (E) => typeof E == "number" ? E : Number.isNaN(Number(E)) ? 0 : Number(E), h = ge({ value: m(n), prefix: "Rp" }), v = ge({ value: m(e), prefix: "Rp" }), D = ge({ value: m(d), prefix: "Rp" }), U = ge({ value: m(s), prefix: "Rp" }), $ = ge({ value: m(l) });
|
|
3848
|
+
switch (t === G.product || t === G.order || t === G.gift ? r === We.percentage && t !== G.gift ? (a = `Diskon ${e || 0}%`, i && (a += ` (hingga ${h})`)) : r === We.amount && t !== G.gift ? a = `Potongan ${v}` : a = `Potongan ${D}` : t === G.freeShipping ? (a = "Shipping fee ditanggung oleh voilà.id", i && (a += ` (hingga ${D})`)) : t === G.freeInsurance && (a = "Insurance fee ditanggung oleh voilà.id", i && (a += ` (hingga ${D})`)), u) {
|
|
3849
|
+
case 0:
|
|
3850
|
+
a += " tanpa minimum pembelian.";
|
|
3851
|
+
break;
|
|
3852
|
+
case 1:
|
|
3853
|
+
a += ` dengan min. pembelian ${U}.`;
|
|
3854
|
+
break;
|
|
3855
|
+
case 2:
|
|
3856
|
+
a += ` dengan min. pembelian ${l ? $ : 0} item.`;
|
|
3857
|
+
break;
|
|
3858
|
+
default:
|
|
3859
|
+
a += "";
|
|
3860
|
+
}
|
|
3861
|
+
return a;
|
|
3862
|
+
}
|
|
3863
|
+
const Hn = (o) => {
|
|
3864
|
+
const a = [], {
|
|
3865
|
+
dateEnd: t,
|
|
3866
|
+
dateStart: r,
|
|
3867
|
+
type: e,
|
|
3868
|
+
discountType: i,
|
|
3869
|
+
discountValue: n,
|
|
3870
|
+
isCheckedMaxFee: u,
|
|
3871
|
+
maxDiscountAmount: s,
|
|
3872
|
+
transactionTerms: l,
|
|
3873
|
+
termsMinTotalAmount: d,
|
|
3874
|
+
termsMinQty: m,
|
|
3875
|
+
limitFee: h,
|
|
3876
|
+
collections: v,
|
|
3877
|
+
brands: D,
|
|
3878
|
+
eligibilityType: U,
|
|
3879
|
+
isOneTimeUsage: $,
|
|
3880
|
+
quota: E
|
|
3881
|
+
} = o, W = Ln({ dateStart: r, dateEnd: t }), H = Xt({ type: e, collections: v, brands: D, eligibilityType: U }), R = Sn({
|
|
3882
|
+
type: e,
|
|
3883
|
+
discountType: i,
|
|
3884
|
+
discountValue: n,
|
|
3885
|
+
isCheckedMaxFee: u,
|
|
3886
|
+
maxDiscountAmount: s,
|
|
3887
|
+
transactionTerms: l,
|
|
3888
|
+
termsMinTotalAmount: d,
|
|
3889
|
+
termsMinQty: m,
|
|
3890
|
+
limitFee: h
|
|
3891
|
+
});
|
|
3892
|
+
return W && a.push(W), R && a.push(R), H && a.push(H), $ && a.push("Voucher hanya dapat digunakan 1x per member selama masa berlaku."), E > 0 && a.push("Kuota voucher terbatas."), a;
|
|
3893
|
+
}, Xn = Hn;
|
|
312
3894
|
export {
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
ge as
|
|
327
|
-
|
|
3895
|
+
We as DiscountType,
|
|
3896
|
+
G as VoucherType,
|
|
3897
|
+
Mt as canUseDOM,
|
|
3898
|
+
at as getOwnerDocument,
|
|
3899
|
+
kt as isBrowser,
|
|
3900
|
+
Pt as isElement,
|
|
3901
|
+
Oe as isValidEvent,
|
|
3902
|
+
$e as useCallbackRef,
|
|
3903
|
+
In as useClipboard,
|
|
3904
|
+
qn as useDebounce,
|
|
3905
|
+
Fn as useDimensions,
|
|
3906
|
+
Qn as useDisclosure,
|
|
3907
|
+
Bn as useMediaQuery,
|
|
3908
|
+
ge as useNumberFormatter,
|
|
3909
|
+
jn as useOnlineStatus,
|
|
3910
|
+
Vn as useOutsideClick,
|
|
3911
|
+
It as useSafeLayoutEffect,
|
|
3912
|
+
Xn as useVoucherTnc
|
|
328
3913
|
};
|