@sigtes/ui 0.3.3 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Button-CjoUyDk1.js → Button-4bFnDFTG.js} +3 -3
- package/dist/{Button-Blvd-lqJ.cjs → Button-BZQNLEhf.cjs} +2 -2
- package/dist/components/default-layout/DefaultLayoutBase.d.ts +8 -0
- package/dist/components/default-layout/index.d.ts +1 -0
- package/dist/components/details-list/DetailsLine.d.ts +6 -0
- package/dist/components/details-list/DetailsList.d.ts +12 -0
- package/dist/components/details-list/index.d.ts +2 -0
- package/dist/components/header/HeaderBase.d.ts +6 -0
- package/dist/components/header/index.d.ts +1 -0
- package/dist/components/sidebar/Sidebar.d.ts +4 -0
- package/dist/components/sidebar/index.d.ts +1 -0
- package/dist/components/table/DataTable.d.ts +2 -1
- package/dist/components/table/ProductsTable.d.ts +1 -1
- package/dist/components.cjs.js +109 -4
- package/dist/components.es.js +8359 -1813
- package/dist/globals.css +1 -1
- package/dist/index.d.ts +9 -5
- package/dist/pages.cjs.js +2 -2
- package/dist/pages.es.js +1199 -804
- package/package.json +4 -4
package/dist/pages.es.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { j as w, B as
|
|
3
|
-
import
|
|
2
|
+
import { j as w, B as ae } from "./Button-4bFnDFTG.js";
|
|
3
|
+
import Qe, { useEffect as ke, createContext as De, useContext as Je } from "react";
|
|
4
4
|
import "next-themes";
|
|
5
|
-
function
|
|
5
|
+
function hr({
|
|
6
6
|
error: n,
|
|
7
|
-
reset:
|
|
7
|
+
reset: t,
|
|
8
8
|
router: r
|
|
9
9
|
}) {
|
|
10
|
-
return
|
|
10
|
+
return ke(() => {
|
|
11
11
|
console.error(n);
|
|
12
12
|
}, [n]), /* @__PURE__ */ w.jsx("div", { className: "h-screen w-screen flex", children: /* @__PURE__ */ w.jsxs("div", { className: "m-auto flex flex-col gap-3", children: [
|
|
13
13
|
/* @__PURE__ */ w.jsxs("div", { className: "inline-flex gap-5 items-center", children: [
|
|
@@ -15,58 +15,58 @@ function $n({
|
|
|
15
15
|
/* @__PURE__ */ w.jsx("h1", { children: "Um erro ocorreu!" })
|
|
16
16
|
] }),
|
|
17
17
|
/* @__PURE__ */ w.jsx(
|
|
18
|
-
|
|
18
|
+
ae,
|
|
19
19
|
{
|
|
20
20
|
onClick: () => {
|
|
21
|
-
|
|
21
|
+
t(), r.replace("/");
|
|
22
22
|
},
|
|
23
23
|
children: "Voltar ao Início"
|
|
24
24
|
}
|
|
25
25
|
)
|
|
26
26
|
] }) });
|
|
27
27
|
}
|
|
28
|
-
var
|
|
29
|
-
function
|
|
30
|
-
if (
|
|
31
|
-
|
|
32
|
-
var n = /* @__PURE__ */ Symbol.for("react.transitional.element"),
|
|
33
|
-
function r(
|
|
28
|
+
var ne = { exports: {} }, q = {}, le;
|
|
29
|
+
function Ve() {
|
|
30
|
+
if (le) return q;
|
|
31
|
+
le = 1;
|
|
32
|
+
var n = /* @__PURE__ */ Symbol.for("react.transitional.element"), t = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
33
|
+
function r(e, a, o) {
|
|
34
34
|
var s = null;
|
|
35
|
-
if (
|
|
36
|
-
|
|
37
|
-
for (var u in
|
|
38
|
-
u !== "key" && (
|
|
39
|
-
} else
|
|
40
|
-
return
|
|
35
|
+
if (o !== void 0 && (s = "" + o), a.key !== void 0 && (s = "" + a.key), "key" in a) {
|
|
36
|
+
o = {};
|
|
37
|
+
for (var u in a)
|
|
38
|
+
u !== "key" && (o[u] = a[u]);
|
|
39
|
+
} else o = a;
|
|
40
|
+
return a = o.ref, {
|
|
41
41
|
$$typeof: n,
|
|
42
|
-
type:
|
|
42
|
+
type: e,
|
|
43
43
|
key: s,
|
|
44
|
-
ref:
|
|
45
|
-
props:
|
|
44
|
+
ref: a !== void 0 ? a : null,
|
|
45
|
+
props: o
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
|
-
return
|
|
48
|
+
return q.Fragment = t, q.jsx = r, q.jsxs = r, q;
|
|
49
49
|
}
|
|
50
|
-
var
|
|
51
|
-
function
|
|
52
|
-
return
|
|
50
|
+
var X = {}, he;
|
|
51
|
+
function Ke() {
|
|
52
|
+
return he || (he = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
53
53
|
function n(i) {
|
|
54
54
|
if (i == null) return null;
|
|
55
55
|
if (typeof i == "function")
|
|
56
|
-
return i.$$typeof ===
|
|
56
|
+
return i.$$typeof === Xe ? null : i.displayName || i.name || null;
|
|
57
57
|
if (typeof i == "string") return i;
|
|
58
58
|
switch (i) {
|
|
59
|
-
case
|
|
59
|
+
case j:
|
|
60
60
|
return "Fragment";
|
|
61
61
|
case G:
|
|
62
62
|
return "Profiler";
|
|
63
|
-
case
|
|
63
|
+
case E:
|
|
64
64
|
return "StrictMode";
|
|
65
|
-
case
|
|
65
|
+
case _e:
|
|
66
66
|
return "Suspense";
|
|
67
|
-
case
|
|
67
|
+
case Ae:
|
|
68
68
|
return "SuspenseList";
|
|
69
|
-
case
|
|
69
|
+
case Be:
|
|
70
70
|
return "Activity";
|
|
71
71
|
}
|
|
72
72
|
if (typeof i == "object")
|
|
@@ -75,16 +75,16 @@ function Vt() {
|
|
|
75
75
|
), i.$$typeof) {
|
|
76
76
|
case R:
|
|
77
77
|
return "Portal";
|
|
78
|
-
case
|
|
78
|
+
case Ue:
|
|
79
79
|
return i.displayName || "Context";
|
|
80
|
-
case
|
|
80
|
+
case L:
|
|
81
81
|
return (i._context.displayName || "Context") + ".Consumer";
|
|
82
|
-
case
|
|
82
|
+
case Ie:
|
|
83
83
|
var c = i.render;
|
|
84
84
|
return i = i.displayName, i || (i = c.displayName || c.name || "", i = i !== "" ? "ForwardRef(" + i + ")" : "ForwardRef"), i;
|
|
85
|
-
case
|
|
85
|
+
case Ze:
|
|
86
86
|
return c = i.displayName || null, c !== null ? c : n(i.type) || "Memo";
|
|
87
|
-
case
|
|
87
|
+
case Q:
|
|
88
88
|
c = i._payload, i = i._init;
|
|
89
89
|
try {
|
|
90
90
|
return n(i(c));
|
|
@@ -93,12 +93,12 @@ function Vt() {
|
|
|
93
93
|
}
|
|
94
94
|
return null;
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function t(i) {
|
|
97
97
|
return "" + i;
|
|
98
98
|
}
|
|
99
99
|
function r(i) {
|
|
100
100
|
try {
|
|
101
|
-
|
|
101
|
+
t(i);
|
|
102
102
|
var c = !1;
|
|
103
103
|
} catch {
|
|
104
104
|
c = !0;
|
|
@@ -110,12 +110,12 @@ function Vt() {
|
|
|
110
110
|
c,
|
|
111
111
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
112
112
|
y
|
|
113
|
-
),
|
|
113
|
+
), t(i);
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
|
-
function
|
|
117
|
-
if (i ===
|
|
118
|
-
if (typeof i == "object" && i !== null && i.$$typeof ===
|
|
116
|
+
function e(i) {
|
|
117
|
+
if (i === j) return "<>";
|
|
118
|
+
if (typeof i == "object" && i !== null && i.$$typeof === Q)
|
|
119
119
|
return "<...>";
|
|
120
120
|
try {
|
|
121
121
|
var c = n(i);
|
|
@@ -124,15 +124,15 @@ function Vt() {
|
|
|
124
124
|
return "<...>";
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
|
-
function
|
|
128
|
-
var i =
|
|
127
|
+
function a() {
|
|
128
|
+
var i = J.A;
|
|
129
129
|
return i === null ? null : i.getOwner();
|
|
130
130
|
}
|
|
131
|
-
function
|
|
131
|
+
function o() {
|
|
132
132
|
return Error("react-stack-top-frame");
|
|
133
133
|
}
|
|
134
134
|
function s(i) {
|
|
135
|
-
if (
|
|
135
|
+
if (oe.call(i, "key")) {
|
|
136
136
|
var c = Object.getOwnPropertyDescriptor(i, "key").get;
|
|
137
137
|
if (c && c.isReactWarning) return !1;
|
|
138
138
|
}
|
|
@@ -140,7 +140,7 @@ function Vt() {
|
|
|
140
140
|
}
|
|
141
141
|
function u(i, c) {
|
|
142
142
|
function g() {
|
|
143
|
-
|
|
143
|
+
ie || (ie = !0, console.error(
|
|
144
144
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
145
145
|
c
|
|
146
146
|
));
|
|
@@ -152,14 +152,14 @@ function Vt() {
|
|
|
152
152
|
}
|
|
153
153
|
function h() {
|
|
154
154
|
var i = n(this.type);
|
|
155
|
-
return
|
|
155
|
+
return se[i] || (se[i] = !0, console.error(
|
|
156
156
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
157
157
|
)), i = this.props.ref, i !== void 0 ? i : null;
|
|
158
158
|
}
|
|
159
|
-
function v(i, c, g, y,
|
|
159
|
+
function v(i, c, g, y, K, ee) {
|
|
160
160
|
var b = g.ref;
|
|
161
161
|
return i = {
|
|
162
|
-
$$typeof:
|
|
162
|
+
$$typeof: B,
|
|
163
163
|
type: i,
|
|
164
164
|
key: c,
|
|
165
165
|
props: g,
|
|
@@ -181,33 +181,33 @@ function Vt() {
|
|
|
181
181
|
configurable: !1,
|
|
182
182
|
enumerable: !1,
|
|
183
183
|
writable: !0,
|
|
184
|
-
value:
|
|
184
|
+
value: K
|
|
185
185
|
}), Object.defineProperty(i, "_debugTask", {
|
|
186
186
|
configurable: !1,
|
|
187
187
|
enumerable: !1,
|
|
188
188
|
writable: !0,
|
|
189
|
-
value:
|
|
189
|
+
value: ee
|
|
190
190
|
}), Object.freeze && (Object.freeze(i.props), Object.freeze(i)), i;
|
|
191
191
|
}
|
|
192
|
-
function
|
|
192
|
+
function f(i, c, g, y, K, ee) {
|
|
193
193
|
var b = c.children;
|
|
194
194
|
if (b !== void 0)
|
|
195
195
|
if (y)
|
|
196
|
-
if (
|
|
196
|
+
if (Re(b)) {
|
|
197
197
|
for (y = 0; y < b.length; y++)
|
|
198
|
-
|
|
198
|
+
m(b[y]);
|
|
199
199
|
Object.freeze && Object.freeze(b);
|
|
200
200
|
} else
|
|
201
201
|
console.error(
|
|
202
202
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
203
203
|
);
|
|
204
|
-
else
|
|
205
|
-
if (
|
|
204
|
+
else m(b);
|
|
205
|
+
if (oe.call(c, "key")) {
|
|
206
206
|
b = n(i);
|
|
207
|
-
var C = Object.keys(c).filter(function(
|
|
208
|
-
return
|
|
207
|
+
var C = Object.keys(c).filter(function(Ge) {
|
|
208
|
+
return Ge !== "key";
|
|
209
209
|
});
|
|
210
|
-
y = 0 < C.length ? "{key: someKey, " + C.join(": ..., ") + ": ...}" : "{key: someKey}",
|
|
210
|
+
y = 0 < C.length ? "{key: someKey, " + C.join(": ..., ") + ": ...}" : "{key: someKey}", de[b + y] || (C = 0 < C.length ? "{" + C.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
211
211
|
`A props object containing a "key" prop is being spread into JSX:
|
|
212
212
|
let props = %s;
|
|
213
213
|
<%s {...props} />
|
|
@@ -218,12 +218,12 @@ React keys must be passed directly to JSX without using spread:
|
|
|
218
218
|
b,
|
|
219
219
|
C,
|
|
220
220
|
b
|
|
221
|
-
),
|
|
221
|
+
), de[b + y] = !0);
|
|
222
222
|
}
|
|
223
223
|
if (b = null, g !== void 0 && (r(g), b = "" + g), s(c) && (r(c.key), b = "" + c.key), "key" in c) {
|
|
224
224
|
g = {};
|
|
225
|
-
for (var
|
|
226
|
-
|
|
225
|
+
for (var te in c)
|
|
226
|
+
te !== "key" && (g[te] = c[te]);
|
|
227
227
|
} else g = c;
|
|
228
228
|
return b && u(
|
|
229
229
|
g,
|
|
@@ -232,66 +232,66 @@ React keys must be passed directly to JSX without using spread:
|
|
|
232
232
|
i,
|
|
233
233
|
b,
|
|
234
234
|
g,
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
235
|
+
a(),
|
|
236
|
+
K,
|
|
237
|
+
ee
|
|
238
238
|
);
|
|
239
239
|
}
|
|
240
|
-
function
|
|
241
|
-
M(i) ? i._store && (i._store.validated = 1) : typeof i == "object" && i !== null && i.$$typeof ===
|
|
240
|
+
function m(i) {
|
|
241
|
+
M(i) ? i._store && (i._store.validated = 1) : typeof i == "object" && i !== null && i.$$typeof === Q && (i._payload.status === "fulfilled" ? M(i._payload.value) && i._payload.value._store && (i._payload.value._store.validated = 1) : i._store && (i._store.validated = 1));
|
|
242
242
|
}
|
|
243
243
|
function M(i) {
|
|
244
|
-
return typeof i == "object" && i !== null && i.$$typeof ===
|
|
244
|
+
return typeof i == "object" && i !== null && i.$$typeof === B;
|
|
245
245
|
}
|
|
246
|
-
var
|
|
246
|
+
var O = Qe, B = /* @__PURE__ */ Symbol.for("react.transitional.element"), R = /* @__PURE__ */ Symbol.for("react.portal"), j = /* @__PURE__ */ Symbol.for("react.fragment"), E = /* @__PURE__ */ Symbol.for("react.strict_mode"), G = /* @__PURE__ */ Symbol.for("react.profiler"), L = /* @__PURE__ */ Symbol.for("react.consumer"), Ue = /* @__PURE__ */ Symbol.for("react.context"), Ie = /* @__PURE__ */ Symbol.for("react.forward_ref"), _e = /* @__PURE__ */ Symbol.for("react.suspense"), Ae = /* @__PURE__ */ Symbol.for("react.suspense_list"), Ze = /* @__PURE__ */ Symbol.for("react.memo"), Q = /* @__PURE__ */ Symbol.for("react.lazy"), Be = /* @__PURE__ */ Symbol.for("react.activity"), Xe = /* @__PURE__ */ Symbol.for("react.client.reference"), J = O.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, oe = Object.prototype.hasOwnProperty, Re = Array.isArray, V = console.createTask ? console.createTask : function() {
|
|
247
247
|
return null;
|
|
248
248
|
};
|
|
249
|
-
|
|
249
|
+
O = {
|
|
250
250
|
react_stack_bottom_frame: function(i) {
|
|
251
251
|
return i();
|
|
252
252
|
}
|
|
253
253
|
};
|
|
254
|
-
var
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
)(),
|
|
258
|
-
|
|
259
|
-
var y = 1e4 >
|
|
260
|
-
return
|
|
254
|
+
var ie, se = {}, ue = O.react_stack_bottom_frame.bind(
|
|
255
|
+
O,
|
|
256
|
+
o
|
|
257
|
+
)(), ce = V(e(o)), de = {};
|
|
258
|
+
X.Fragment = j, X.jsx = function(i, c, g) {
|
|
259
|
+
var y = 1e4 > J.recentlyCreatedOwnerStacks++;
|
|
260
|
+
return f(
|
|
261
261
|
i,
|
|
262
262
|
c,
|
|
263
263
|
g,
|
|
264
264
|
!1,
|
|
265
|
-
y ? Error("react-stack-top-frame") :
|
|
266
|
-
y ?
|
|
265
|
+
y ? Error("react-stack-top-frame") : ue,
|
|
266
|
+
y ? V(e(i)) : ce
|
|
267
267
|
);
|
|
268
|
-
},
|
|
269
|
-
var y = 1e4 >
|
|
270
|
-
return
|
|
268
|
+
}, X.jsxs = function(i, c, g) {
|
|
269
|
+
var y = 1e4 > J.recentlyCreatedOwnerStacks++;
|
|
270
|
+
return f(
|
|
271
271
|
i,
|
|
272
272
|
c,
|
|
273
273
|
g,
|
|
274
274
|
!0,
|
|
275
|
-
y ? Error("react-stack-top-frame") :
|
|
276
|
-
y ?
|
|
275
|
+
y ? Error("react-stack-top-frame") : ue,
|
|
276
|
+
y ? V(e(i)) : ce
|
|
277
277
|
);
|
|
278
278
|
};
|
|
279
|
-
})()),
|
|
279
|
+
})()), X;
|
|
280
280
|
}
|
|
281
|
-
var
|
|
282
|
-
function
|
|
283
|
-
return
|
|
281
|
+
var me;
|
|
282
|
+
function et() {
|
|
283
|
+
return me || (me = 1, process.env.NODE_ENV === "production" ? ne.exports = Ve() : ne.exports = Ke()), ne.exports;
|
|
284
284
|
}
|
|
285
|
-
|
|
286
|
-
const
|
|
285
|
+
et();
|
|
286
|
+
const tt = {
|
|
287
287
|
id: "",
|
|
288
288
|
username: "",
|
|
289
289
|
email: "",
|
|
290
290
|
created_at: null,
|
|
291
291
|
updated_at: null,
|
|
292
292
|
features: []
|
|
293
|
-
},
|
|
294
|
-
user:
|
|
293
|
+
}, nt = De({
|
|
294
|
+
user: tt,
|
|
295
295
|
isLoading: !0,
|
|
296
296
|
fetchUser: async () => {
|
|
297
297
|
},
|
|
@@ -299,93 +299,93 @@ const te = {
|
|
|
299
299
|
},
|
|
300
300
|
login: async () => !1
|
|
301
301
|
});
|
|
302
|
-
function
|
|
303
|
-
return
|
|
302
|
+
function rt() {
|
|
303
|
+
return Je(nt);
|
|
304
304
|
}
|
|
305
|
-
function
|
|
306
|
-
return (
|
|
307
|
-
const r =
|
|
305
|
+
function H(n) {
|
|
306
|
+
return (t = {}) => {
|
|
307
|
+
const r = t.width ? String(t.width) : n.defaultWidth;
|
|
308
308
|
return n.formats[r] || n.formats[n.defaultWidth];
|
|
309
309
|
};
|
|
310
310
|
}
|
|
311
|
-
function
|
|
312
|
-
return (
|
|
313
|
-
const
|
|
314
|
-
let
|
|
315
|
-
if (
|
|
311
|
+
function S(n) {
|
|
312
|
+
return (t, r) => {
|
|
313
|
+
const e = r?.context ? String(r.context) : "standalone";
|
|
314
|
+
let a;
|
|
315
|
+
if (e === "formatting" && n.formattingValues) {
|
|
316
316
|
const s = n.defaultFormattingWidth || n.defaultWidth, u = r?.width ? String(r.width) : s;
|
|
317
|
-
|
|
317
|
+
a = n.formattingValues[u] || n.formattingValues[s];
|
|
318
318
|
} else {
|
|
319
319
|
const s = n.defaultWidth, u = r?.width ? String(r.width) : n.defaultWidth;
|
|
320
|
-
|
|
320
|
+
a = n.values[u] || n.values[s];
|
|
321
321
|
}
|
|
322
|
-
const
|
|
323
|
-
return o
|
|
322
|
+
const o = n.argumentCallback ? n.argumentCallback(t) : t;
|
|
323
|
+
return a[o];
|
|
324
324
|
};
|
|
325
325
|
}
|
|
326
|
-
function
|
|
327
|
-
return (
|
|
328
|
-
const
|
|
329
|
-
if (!
|
|
326
|
+
function k(n) {
|
|
327
|
+
return (t, r = {}) => {
|
|
328
|
+
const e = r.width, a = e && n.matchPatterns[e] || n.matchPatterns[n.defaultMatchWidth], o = t.match(a);
|
|
329
|
+
if (!o)
|
|
330
330
|
return null;
|
|
331
|
-
const s =
|
|
331
|
+
const s = o[0], u = e && n.parsePatterns[e] || n.parsePatterns[n.defaultParseWidth], h = Array.isArray(u) ? ot(u, (m) => m.test(s)) : (
|
|
332
332
|
// [TODO] -- I challenge you to fix the type
|
|
333
|
-
|
|
333
|
+
at(u, (m) => m.test(s))
|
|
334
334
|
);
|
|
335
335
|
let v;
|
|
336
336
|
v = n.valueCallback ? n.valueCallback(h) : h, v = r.valueCallback ? (
|
|
337
337
|
// [TODO] -- I challenge you to fix the type
|
|
338
338
|
r.valueCallback(v)
|
|
339
339
|
) : v;
|
|
340
|
-
const
|
|
341
|
-
return { value: v, rest:
|
|
340
|
+
const f = t.slice(s.length);
|
|
341
|
+
return { value: v, rest: f };
|
|
342
342
|
};
|
|
343
343
|
}
|
|
344
|
-
function
|
|
344
|
+
function at(n, t) {
|
|
345
345
|
for (const r in n)
|
|
346
|
-
if (Object.prototype.hasOwnProperty.call(n, r) &&
|
|
346
|
+
if (Object.prototype.hasOwnProperty.call(n, r) && t(n[r]))
|
|
347
347
|
return r;
|
|
348
348
|
}
|
|
349
|
-
function
|
|
349
|
+
function ot(n, t) {
|
|
350
350
|
for (let r = 0; r < n.length; r++)
|
|
351
|
-
if (
|
|
351
|
+
if (t(n[r]))
|
|
352
352
|
return r;
|
|
353
353
|
}
|
|
354
|
-
function
|
|
355
|
-
return (
|
|
356
|
-
const
|
|
357
|
-
if (!
|
|
358
|
-
const
|
|
359
|
-
if (!
|
|
360
|
-
let s = n.valueCallback ? n.valueCallback(
|
|
354
|
+
function xe(n) {
|
|
355
|
+
return (t, r = {}) => {
|
|
356
|
+
const e = t.match(n.matchPattern);
|
|
357
|
+
if (!e) return null;
|
|
358
|
+
const a = e[0], o = t.match(n.parsePattern);
|
|
359
|
+
if (!o) return null;
|
|
360
|
+
let s = n.valueCallback ? n.valueCallback(o[0]) : o[0];
|
|
361
361
|
s = r.valueCallback ? r.valueCallback(s) : s;
|
|
362
|
-
const u =
|
|
362
|
+
const u = t.slice(a.length);
|
|
363
363
|
return { value: s, rest: u };
|
|
364
364
|
};
|
|
365
365
|
}
|
|
366
|
-
const
|
|
367
|
-
function p(n,
|
|
368
|
-
return typeof n == "function" ? n(
|
|
366
|
+
const Oe = 6048e5, it = 864e5, fe = /* @__PURE__ */ Symbol.for("constructDateFrom");
|
|
367
|
+
function p(n, t) {
|
|
368
|
+
return typeof n == "function" ? n(t) : n && typeof n == "object" && fe in n ? n[fe](t) : n instanceof Date ? new n.constructor(t) : new Date(t);
|
|
369
369
|
}
|
|
370
|
-
function
|
|
370
|
+
function z(n, ...t) {
|
|
371
371
|
const r = p.bind(
|
|
372
372
|
null,
|
|
373
|
-
|
|
373
|
+
t.find((e) => typeof e == "object")
|
|
374
374
|
);
|
|
375
|
-
return
|
|
375
|
+
return t.map(r);
|
|
376
376
|
}
|
|
377
|
-
let
|
|
378
|
-
function
|
|
379
|
-
return
|
|
377
|
+
let st = {};
|
|
378
|
+
function Z() {
|
|
379
|
+
return st;
|
|
380
380
|
}
|
|
381
|
-
function
|
|
382
|
-
return p(
|
|
381
|
+
function l(n, t) {
|
|
382
|
+
return p(t || n, n);
|
|
383
383
|
}
|
|
384
|
-
function
|
|
385
|
-
const r =
|
|
386
|
-
return
|
|
384
|
+
function $(n, t) {
|
|
385
|
+
const r = Z(), e = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? r.weekStartsOn ?? r.locale?.options?.weekStartsOn ?? 0, a = l(n, t?.in), o = a.getDay(), s = (o < e ? 7 : 0) + o - e;
|
|
386
|
+
return a.setDate(a.getDate() - s), a.setHours(0, 0, 0, 0), a;
|
|
387
387
|
}
|
|
388
|
-
const
|
|
388
|
+
const ut = {
|
|
389
389
|
lessThanXSeconds: {
|
|
390
390
|
one: "less than a second",
|
|
391
391
|
other: "less than {{count}} seconds"
|
|
@@ -447,26 +447,26 @@ const ue = {
|
|
|
447
447
|
one: "almost 1 year",
|
|
448
448
|
other: "almost {{count}} years"
|
|
449
449
|
}
|
|
450
|
-
},
|
|
451
|
-
let
|
|
452
|
-
const
|
|
453
|
-
return typeof
|
|
454
|
-
},
|
|
450
|
+
}, ct = (n, t, r) => {
|
|
451
|
+
let e;
|
|
452
|
+
const a = ut[n];
|
|
453
|
+
return typeof a == "string" ? e = a : t === 1 ? e = a.one : e = a.other.replace("{{count}}", t.toString()), r?.addSuffix ? r.comparison && r.comparison > 0 ? "in " + e : e + " ago" : e;
|
|
454
|
+
}, dt = {
|
|
455
455
|
lastWeek: "'last' eeee 'at' p",
|
|
456
456
|
yesterday: "'yesterday at' p",
|
|
457
457
|
today: "'today at' p",
|
|
458
458
|
tomorrow: "'tomorrow at' p",
|
|
459
459
|
nextWeek: "eeee 'at' p",
|
|
460
460
|
other: "P"
|
|
461
|
-
},
|
|
461
|
+
}, lt = (n, t, r, e) => dt[n], ht = {
|
|
462
462
|
narrow: ["B", "A"],
|
|
463
463
|
abbreviated: ["BC", "AD"],
|
|
464
464
|
wide: ["Before Christ", "Anno Domini"]
|
|
465
|
-
},
|
|
465
|
+
}, mt = {
|
|
466
466
|
narrow: ["1", "2", "3", "4"],
|
|
467
467
|
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
468
468
|
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
469
|
-
},
|
|
469
|
+
}, ft = {
|
|
470
470
|
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
471
471
|
abbreviated: [
|
|
472
472
|
"Jan",
|
|
@@ -496,7 +496,7 @@ const ue = {
|
|
|
496
496
|
"November",
|
|
497
497
|
"December"
|
|
498
498
|
]
|
|
499
|
-
},
|
|
499
|
+
}, gt = {
|
|
500
500
|
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
501
501
|
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
502
502
|
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
@@ -509,7 +509,7 @@ const ue = {
|
|
|
509
509
|
"Friday",
|
|
510
510
|
"Saturday"
|
|
511
511
|
]
|
|
512
|
-
},
|
|
512
|
+
}, pt = {
|
|
513
513
|
narrow: {
|
|
514
514
|
am: "a",
|
|
515
515
|
pm: "p",
|
|
@@ -540,7 +540,7 @@ const ue = {
|
|
|
540
540
|
evening: "evening",
|
|
541
541
|
night: "night"
|
|
542
542
|
}
|
|
543
|
-
},
|
|
543
|
+
}, yt = {
|
|
544
544
|
narrow: {
|
|
545
545
|
am: "a",
|
|
546
546
|
pm: "p",
|
|
@@ -571,10 +571,10 @@ const ue = {
|
|
|
571
571
|
evening: "in the evening",
|
|
572
572
|
night: "at night"
|
|
573
573
|
}
|
|
574
|
-
},
|
|
575
|
-
const r = Number(n),
|
|
576
|
-
if (
|
|
577
|
-
switch (
|
|
574
|
+
}, bt = (n, t) => {
|
|
575
|
+
const r = Number(n), e = r % 100;
|
|
576
|
+
if (e > 20 || e < 10)
|
|
577
|
+
switch (e % 10) {
|
|
578
578
|
case 1:
|
|
579
579
|
return r + "st";
|
|
580
580
|
case 2:
|
|
@@ -583,48 +583,48 @@ const ue = {
|
|
|
583
583
|
return r + "rd";
|
|
584
584
|
}
|
|
585
585
|
return r + "th";
|
|
586
|
-
},
|
|
587
|
-
ordinalNumber:
|
|
588
|
-
era:
|
|
589
|
-
values:
|
|
586
|
+
}, wt = {
|
|
587
|
+
ordinalNumber: bt,
|
|
588
|
+
era: S({
|
|
589
|
+
values: ht,
|
|
590
590
|
defaultWidth: "wide"
|
|
591
591
|
}),
|
|
592
|
-
quarter:
|
|
593
|
-
values:
|
|
592
|
+
quarter: S({
|
|
593
|
+
values: mt,
|
|
594
594
|
defaultWidth: "wide",
|
|
595
595
|
argumentCallback: (n) => n - 1
|
|
596
596
|
}),
|
|
597
|
-
month:
|
|
598
|
-
values:
|
|
597
|
+
month: S({
|
|
598
|
+
values: ft,
|
|
599
599
|
defaultWidth: "wide"
|
|
600
600
|
}),
|
|
601
|
-
day:
|
|
602
|
-
values:
|
|
601
|
+
day: S({
|
|
602
|
+
values: gt,
|
|
603
603
|
defaultWidth: "wide"
|
|
604
604
|
}),
|
|
605
|
-
dayPeriod:
|
|
606
|
-
values:
|
|
605
|
+
dayPeriod: S({
|
|
606
|
+
values: pt,
|
|
607
607
|
defaultWidth: "wide",
|
|
608
|
-
formattingValues:
|
|
608
|
+
formattingValues: yt,
|
|
609
609
|
defaultFormattingWidth: "wide"
|
|
610
610
|
})
|
|
611
|
-
},
|
|
611
|
+
}, vt = /^(\d+)(th|st|nd|rd)?/i, Mt = /\d+/i, St = {
|
|
612
612
|
narrow: /^(b|a)/i,
|
|
613
613
|
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
614
614
|
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
615
|
-
},
|
|
615
|
+
}, kt = {
|
|
616
616
|
any: [/^b/i, /^(a|c)/i]
|
|
617
|
-
},
|
|
617
|
+
}, Dt = {
|
|
618
618
|
narrow: /^[1234]/i,
|
|
619
619
|
abbreviated: /^q[1234]/i,
|
|
620
620
|
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
621
|
-
},
|
|
621
|
+
}, xt = {
|
|
622
622
|
any: [/1/i, /2/i, /3/i, /4/i]
|
|
623
|
-
},
|
|
623
|
+
}, Ot = {
|
|
624
624
|
narrow: /^[jfmasond]/i,
|
|
625
625
|
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
626
626
|
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
627
|
-
},
|
|
627
|
+
}, Tt = {
|
|
628
628
|
narrow: [
|
|
629
629
|
/^j/i,
|
|
630
630
|
/^f/i,
|
|
@@ -653,18 +653,18 @@ const ue = {
|
|
|
653
653
|
/^n/i,
|
|
654
654
|
/^d/i
|
|
655
655
|
]
|
|
656
|
-
},
|
|
656
|
+
}, Pt = {
|
|
657
657
|
narrow: /^[smtwf]/i,
|
|
658
658
|
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
659
659
|
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
660
660
|
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
661
|
-
},
|
|
661
|
+
}, Wt = {
|
|
662
662
|
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
663
663
|
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
664
|
-
},
|
|
664
|
+
}, Nt = {
|
|
665
665
|
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
666
666
|
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
667
|
-
},
|
|
667
|
+
}, jt = {
|
|
668
668
|
any: {
|
|
669
669
|
am: /^a/i,
|
|
670
670
|
pm: /^p/i,
|
|
@@ -675,211 +675,584 @@ const ue = {
|
|
|
675
675
|
evening: /evening/i,
|
|
676
676
|
night: /night/i
|
|
677
677
|
}
|
|
678
|
-
},
|
|
679
|
-
ordinalNumber:
|
|
680
|
-
matchPattern:
|
|
681
|
-
parsePattern:
|
|
678
|
+
}, Ct = {
|
|
679
|
+
ordinalNumber: xe({
|
|
680
|
+
matchPattern: vt,
|
|
681
|
+
parsePattern: Mt,
|
|
682
682
|
valueCallback: (n) => parseInt(n, 10)
|
|
683
683
|
}),
|
|
684
|
-
era:
|
|
685
|
-
matchPatterns:
|
|
684
|
+
era: k({
|
|
685
|
+
matchPatterns: St,
|
|
686
686
|
defaultMatchWidth: "wide",
|
|
687
|
-
parsePatterns:
|
|
687
|
+
parsePatterns: kt,
|
|
688
688
|
defaultParseWidth: "any"
|
|
689
689
|
}),
|
|
690
|
-
quarter:
|
|
691
|
-
matchPatterns:
|
|
690
|
+
quarter: k({
|
|
691
|
+
matchPatterns: Dt,
|
|
692
692
|
defaultMatchWidth: "wide",
|
|
693
|
-
parsePatterns:
|
|
693
|
+
parsePatterns: xt,
|
|
694
694
|
defaultParseWidth: "any",
|
|
695
695
|
valueCallback: (n) => n + 1
|
|
696
696
|
}),
|
|
697
|
-
month:
|
|
698
|
-
matchPatterns:
|
|
697
|
+
month: k({
|
|
698
|
+
matchPatterns: Ot,
|
|
699
699
|
defaultMatchWidth: "wide",
|
|
700
|
-
parsePatterns:
|
|
700
|
+
parsePatterns: Tt,
|
|
701
701
|
defaultParseWidth: "any"
|
|
702
702
|
}),
|
|
703
|
-
day:
|
|
704
|
-
matchPatterns:
|
|
703
|
+
day: k({
|
|
704
|
+
matchPatterns: Pt,
|
|
705
705
|
defaultMatchWidth: "wide",
|
|
706
|
-
parsePatterns:
|
|
706
|
+
parsePatterns: Wt,
|
|
707
707
|
defaultParseWidth: "any"
|
|
708
708
|
}),
|
|
709
|
-
dayPeriod:
|
|
710
|
-
matchPatterns:
|
|
709
|
+
dayPeriod: k({
|
|
710
|
+
matchPatterns: Nt,
|
|
711
711
|
defaultMatchWidth: "any",
|
|
712
|
-
parsePatterns:
|
|
712
|
+
parsePatterns: jt,
|
|
713
713
|
defaultParseWidth: "any"
|
|
714
714
|
})
|
|
715
|
-
},
|
|
715
|
+
}, Yt = {
|
|
716
716
|
full: "EEEE, MMMM do, y",
|
|
717
717
|
long: "MMMM do, y",
|
|
718
718
|
medium: "MMM d, y",
|
|
719
719
|
short: "MM/dd/yyyy"
|
|
720
|
-
},
|
|
720
|
+
}, Ft = {
|
|
721
721
|
full: "h:mm:ss a zzzz",
|
|
722
722
|
long: "h:mm:ss a z",
|
|
723
723
|
medium: "h:mm:ss a",
|
|
724
724
|
short: "h:mm a"
|
|
725
|
-
},
|
|
725
|
+
}, Ht = {
|
|
726
726
|
full: "{{date}} 'at' {{time}}",
|
|
727
727
|
long: "{{date}} 'at' {{time}}",
|
|
728
728
|
medium: "{{date}}, {{time}}",
|
|
729
729
|
short: "{{date}}, {{time}}"
|
|
730
|
-
},
|
|
731
|
-
date:
|
|
732
|
-
formats:
|
|
730
|
+
}, $t = {
|
|
731
|
+
date: H({
|
|
732
|
+
formats: Yt,
|
|
733
733
|
defaultWidth: "full"
|
|
734
734
|
}),
|
|
735
|
-
time:
|
|
736
|
-
formats:
|
|
735
|
+
time: H({
|
|
736
|
+
formats: Ft,
|
|
737
737
|
defaultWidth: "full"
|
|
738
738
|
}),
|
|
739
|
-
dateTime:
|
|
740
|
-
formats:
|
|
739
|
+
dateTime: H({
|
|
740
|
+
formats: Ht,
|
|
741
741
|
defaultWidth: "full"
|
|
742
742
|
})
|
|
743
|
-
},
|
|
743
|
+
}, F = {
|
|
744
744
|
code: "en-US",
|
|
745
|
-
formatDistance:
|
|
746
|
-
formatLong:
|
|
747
|
-
formatRelative:
|
|
748
|
-
localize:
|
|
749
|
-
match:
|
|
745
|
+
formatDistance: ct,
|
|
746
|
+
formatLong: $t,
|
|
747
|
+
formatRelative: lt,
|
|
748
|
+
localize: wt,
|
|
749
|
+
match: Ct,
|
|
750
|
+
options: {
|
|
751
|
+
weekStartsOn: 0,
|
|
752
|
+
firstWeekContainsDate: 1
|
|
753
|
+
}
|
|
754
|
+
}, zt = {
|
|
755
|
+
lessThanXSeconds: {
|
|
756
|
+
one: "menos de um segundo",
|
|
757
|
+
other: "menos de {{count}} segundos"
|
|
758
|
+
},
|
|
759
|
+
xSeconds: {
|
|
760
|
+
one: "1 segundo",
|
|
761
|
+
other: "{{count}} segundos"
|
|
762
|
+
},
|
|
763
|
+
halfAMinute: "meio minuto",
|
|
764
|
+
lessThanXMinutes: {
|
|
765
|
+
one: "menos de um minuto",
|
|
766
|
+
other: "menos de {{count}} minutos"
|
|
767
|
+
},
|
|
768
|
+
xMinutes: {
|
|
769
|
+
one: "1 minuto",
|
|
770
|
+
other: "{{count}} minutos"
|
|
771
|
+
},
|
|
772
|
+
aboutXHours: {
|
|
773
|
+
one: "cerca de 1 hora",
|
|
774
|
+
other: "cerca de {{count}} horas"
|
|
775
|
+
},
|
|
776
|
+
xHours: {
|
|
777
|
+
one: "1 hora",
|
|
778
|
+
other: "{{count}} horas"
|
|
779
|
+
},
|
|
780
|
+
xDays: {
|
|
781
|
+
one: "1 dia",
|
|
782
|
+
other: "{{count}} dias"
|
|
783
|
+
},
|
|
784
|
+
aboutXWeeks: {
|
|
785
|
+
one: "cerca de 1 semana",
|
|
786
|
+
other: "cerca de {{count}} semanas"
|
|
787
|
+
},
|
|
788
|
+
xWeeks: {
|
|
789
|
+
one: "1 semana",
|
|
790
|
+
other: "{{count}} semanas"
|
|
791
|
+
},
|
|
792
|
+
aboutXMonths: {
|
|
793
|
+
one: "cerca de 1 mês",
|
|
794
|
+
other: "cerca de {{count}} meses"
|
|
795
|
+
},
|
|
796
|
+
xMonths: {
|
|
797
|
+
one: "1 mês",
|
|
798
|
+
other: "{{count}} meses"
|
|
799
|
+
},
|
|
800
|
+
aboutXYears: {
|
|
801
|
+
one: "cerca de 1 ano",
|
|
802
|
+
other: "cerca de {{count}} anos"
|
|
803
|
+
},
|
|
804
|
+
xYears: {
|
|
805
|
+
one: "1 ano",
|
|
806
|
+
other: "{{count}} anos"
|
|
807
|
+
},
|
|
808
|
+
overXYears: {
|
|
809
|
+
one: "mais de 1 ano",
|
|
810
|
+
other: "mais de {{count}} anos"
|
|
811
|
+
},
|
|
812
|
+
almostXYears: {
|
|
813
|
+
one: "quase 1 ano",
|
|
814
|
+
other: "quase {{count}} anos"
|
|
815
|
+
}
|
|
816
|
+
}, Et = (n, t, r) => {
|
|
817
|
+
let e;
|
|
818
|
+
const a = zt[n];
|
|
819
|
+
return typeof a == "string" ? e = a : t === 1 ? e = a.one : e = a.other.replace("{{count}}", String(t)), r?.addSuffix ? r.comparison && r.comparison > 0 ? "em " + e : "há " + e : e;
|
|
820
|
+
}, Lt = {
|
|
821
|
+
full: "EEEE, d 'de' MMMM 'de' y",
|
|
822
|
+
long: "d 'de' MMMM 'de' y",
|
|
823
|
+
medium: "d MMM y",
|
|
824
|
+
short: "dd/MM/yyyy"
|
|
825
|
+
}, qt = {
|
|
826
|
+
full: "HH:mm:ss zzzz",
|
|
827
|
+
long: "HH:mm:ss z",
|
|
828
|
+
medium: "HH:mm:ss",
|
|
829
|
+
short: "HH:mm"
|
|
830
|
+
}, Ut = {
|
|
831
|
+
full: "{{date}} 'às' {{time}}",
|
|
832
|
+
long: "{{date}} 'às' {{time}}",
|
|
833
|
+
medium: "{{date}}, {{time}}",
|
|
834
|
+
short: "{{date}}, {{time}}"
|
|
835
|
+
}, It = {
|
|
836
|
+
date: H({
|
|
837
|
+
formats: Lt,
|
|
838
|
+
defaultWidth: "full"
|
|
839
|
+
}),
|
|
840
|
+
time: H({
|
|
841
|
+
formats: qt,
|
|
842
|
+
defaultWidth: "full"
|
|
843
|
+
}),
|
|
844
|
+
dateTime: H({
|
|
845
|
+
formats: Ut,
|
|
846
|
+
defaultWidth: "full"
|
|
847
|
+
})
|
|
848
|
+
}, _t = {
|
|
849
|
+
lastWeek: (n) => {
|
|
850
|
+
const t = n.getDay();
|
|
851
|
+
return "'" + (t === 0 || t === 6 ? "último" : "última") + "' eeee 'às' p";
|
|
852
|
+
},
|
|
853
|
+
yesterday: "'ontem às' p",
|
|
854
|
+
today: "'hoje às' p",
|
|
855
|
+
tomorrow: "'amanhã às' p",
|
|
856
|
+
nextWeek: "eeee 'às' p",
|
|
857
|
+
other: "P"
|
|
858
|
+
}, At = (n, t, r, e) => {
|
|
859
|
+
const a = _t[n];
|
|
860
|
+
return typeof a == "function" ? a(t) : a;
|
|
861
|
+
}, Zt = {
|
|
862
|
+
narrow: ["AC", "DC"],
|
|
863
|
+
abbreviated: ["AC", "DC"],
|
|
864
|
+
wide: ["antes de cristo", "depois de cristo"]
|
|
865
|
+
}, Bt = {
|
|
866
|
+
narrow: ["1", "2", "3", "4"],
|
|
867
|
+
abbreviated: ["T1", "T2", "T3", "T4"],
|
|
868
|
+
wide: ["1º trimestre", "2º trimestre", "3º trimestre", "4º trimestre"]
|
|
869
|
+
}, Xt = {
|
|
870
|
+
narrow: ["j", "f", "m", "a", "m", "j", "j", "a", "s", "o", "n", "d"],
|
|
871
|
+
abbreviated: [
|
|
872
|
+
"jan",
|
|
873
|
+
"fev",
|
|
874
|
+
"mar",
|
|
875
|
+
"abr",
|
|
876
|
+
"mai",
|
|
877
|
+
"jun",
|
|
878
|
+
"jul",
|
|
879
|
+
"ago",
|
|
880
|
+
"set",
|
|
881
|
+
"out",
|
|
882
|
+
"nov",
|
|
883
|
+
"dez"
|
|
884
|
+
],
|
|
885
|
+
wide: [
|
|
886
|
+
"janeiro",
|
|
887
|
+
"fevereiro",
|
|
888
|
+
"março",
|
|
889
|
+
"abril",
|
|
890
|
+
"maio",
|
|
891
|
+
"junho",
|
|
892
|
+
"julho",
|
|
893
|
+
"agosto",
|
|
894
|
+
"setembro",
|
|
895
|
+
"outubro",
|
|
896
|
+
"novembro",
|
|
897
|
+
"dezembro"
|
|
898
|
+
]
|
|
899
|
+
}, Rt = {
|
|
900
|
+
narrow: ["D", "S", "T", "Q", "Q", "S", "S"],
|
|
901
|
+
short: ["dom", "seg", "ter", "qua", "qui", "sex", "sab"],
|
|
902
|
+
abbreviated: [
|
|
903
|
+
"domingo",
|
|
904
|
+
"segunda",
|
|
905
|
+
"terça",
|
|
906
|
+
"quarta",
|
|
907
|
+
"quinta",
|
|
908
|
+
"sexta",
|
|
909
|
+
"sábado"
|
|
910
|
+
],
|
|
911
|
+
wide: [
|
|
912
|
+
"domingo",
|
|
913
|
+
"segunda-feira",
|
|
914
|
+
"terça-feira",
|
|
915
|
+
"quarta-feira",
|
|
916
|
+
"quinta-feira",
|
|
917
|
+
"sexta-feira",
|
|
918
|
+
"sábado"
|
|
919
|
+
]
|
|
920
|
+
}, Gt = {
|
|
921
|
+
narrow: {
|
|
922
|
+
am: "a",
|
|
923
|
+
pm: "p",
|
|
924
|
+
midnight: "mn",
|
|
925
|
+
noon: "md",
|
|
926
|
+
morning: "manhã",
|
|
927
|
+
afternoon: "tarde",
|
|
928
|
+
evening: "tarde",
|
|
929
|
+
night: "noite"
|
|
930
|
+
},
|
|
931
|
+
abbreviated: {
|
|
932
|
+
am: "AM",
|
|
933
|
+
pm: "PM",
|
|
934
|
+
midnight: "meia-noite",
|
|
935
|
+
noon: "meio-dia",
|
|
936
|
+
morning: "manhã",
|
|
937
|
+
afternoon: "tarde",
|
|
938
|
+
evening: "tarde",
|
|
939
|
+
night: "noite"
|
|
940
|
+
},
|
|
941
|
+
wide: {
|
|
942
|
+
am: "a.m.",
|
|
943
|
+
pm: "p.m.",
|
|
944
|
+
midnight: "meia-noite",
|
|
945
|
+
noon: "meio-dia",
|
|
946
|
+
morning: "manhã",
|
|
947
|
+
afternoon: "tarde",
|
|
948
|
+
evening: "tarde",
|
|
949
|
+
night: "noite"
|
|
950
|
+
}
|
|
951
|
+
}, Qt = {
|
|
952
|
+
narrow: {
|
|
953
|
+
am: "a",
|
|
954
|
+
pm: "p",
|
|
955
|
+
midnight: "mn",
|
|
956
|
+
noon: "md",
|
|
957
|
+
morning: "da manhã",
|
|
958
|
+
afternoon: "da tarde",
|
|
959
|
+
evening: "da tarde",
|
|
960
|
+
night: "da noite"
|
|
961
|
+
},
|
|
962
|
+
abbreviated: {
|
|
963
|
+
am: "AM",
|
|
964
|
+
pm: "PM",
|
|
965
|
+
midnight: "meia-noite",
|
|
966
|
+
noon: "meio-dia",
|
|
967
|
+
morning: "da manhã",
|
|
968
|
+
afternoon: "da tarde",
|
|
969
|
+
evening: "da tarde",
|
|
970
|
+
night: "da noite"
|
|
971
|
+
},
|
|
972
|
+
wide: {
|
|
973
|
+
am: "a.m.",
|
|
974
|
+
pm: "p.m.",
|
|
975
|
+
midnight: "meia-noite",
|
|
976
|
+
noon: "meio-dia",
|
|
977
|
+
morning: "da manhã",
|
|
978
|
+
afternoon: "da tarde",
|
|
979
|
+
evening: "da tarde",
|
|
980
|
+
night: "da noite"
|
|
981
|
+
}
|
|
982
|
+
}, Jt = (n, t) => {
|
|
983
|
+
const r = Number(n);
|
|
984
|
+
return t?.unit === "week" ? r + "ª" : r + "º";
|
|
985
|
+
}, Vt = {
|
|
986
|
+
ordinalNumber: Jt,
|
|
987
|
+
era: S({
|
|
988
|
+
values: Zt,
|
|
989
|
+
defaultWidth: "wide"
|
|
990
|
+
}),
|
|
991
|
+
quarter: S({
|
|
992
|
+
values: Bt,
|
|
993
|
+
defaultWidth: "wide",
|
|
994
|
+
argumentCallback: (n) => n - 1
|
|
995
|
+
}),
|
|
996
|
+
month: S({
|
|
997
|
+
values: Xt,
|
|
998
|
+
defaultWidth: "wide"
|
|
999
|
+
}),
|
|
1000
|
+
day: S({
|
|
1001
|
+
values: Rt,
|
|
1002
|
+
defaultWidth: "wide"
|
|
1003
|
+
}),
|
|
1004
|
+
dayPeriod: S({
|
|
1005
|
+
values: Gt,
|
|
1006
|
+
defaultWidth: "wide",
|
|
1007
|
+
formattingValues: Qt,
|
|
1008
|
+
defaultFormattingWidth: "wide"
|
|
1009
|
+
})
|
|
1010
|
+
}, Kt = /^(\d+)[ºªo]?/i, en = /\d+/i, tn = {
|
|
1011
|
+
narrow: /^(ac|dc|a|d)/i,
|
|
1012
|
+
abbreviated: /^(a\.?\s?c\.?|d\.?\s?c\.?)/i,
|
|
1013
|
+
wide: /^(antes de cristo|depois de cristo)/i
|
|
1014
|
+
}, nn = {
|
|
1015
|
+
any: [/^ac/i, /^dc/i],
|
|
1016
|
+
wide: [/^antes de cristo/i, /^depois de cristo/i]
|
|
1017
|
+
}, rn = {
|
|
1018
|
+
narrow: /^[1234]/i,
|
|
1019
|
+
abbreviated: /^T[1234]/i,
|
|
1020
|
+
wide: /^[1234](º)? trimestre/i
|
|
1021
|
+
}, an = {
|
|
1022
|
+
any: [/1/i, /2/i, /3/i, /4/i]
|
|
1023
|
+
}, on = {
|
|
1024
|
+
narrow: /^[jfmajsond]/i,
|
|
1025
|
+
abbreviated: /^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,
|
|
1026
|
+
wide: /^(janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i
|
|
1027
|
+
}, sn = {
|
|
1028
|
+
narrow: [
|
|
1029
|
+
/^j/i,
|
|
1030
|
+
/^f/i,
|
|
1031
|
+
/^m/i,
|
|
1032
|
+
/^a/i,
|
|
1033
|
+
/^m/i,
|
|
1034
|
+
/^j/i,
|
|
1035
|
+
/^j/i,
|
|
1036
|
+
/^a/i,
|
|
1037
|
+
/^s/i,
|
|
1038
|
+
/^o/i,
|
|
1039
|
+
/^n/i,
|
|
1040
|
+
/^d/i
|
|
1041
|
+
],
|
|
1042
|
+
any: [
|
|
1043
|
+
/^ja/i,
|
|
1044
|
+
/^fev/i,
|
|
1045
|
+
/^mar/i,
|
|
1046
|
+
/^abr/i,
|
|
1047
|
+
/^mai/i,
|
|
1048
|
+
/^jun/i,
|
|
1049
|
+
/^jul/i,
|
|
1050
|
+
/^ago/i,
|
|
1051
|
+
/^set/i,
|
|
1052
|
+
/^out/i,
|
|
1053
|
+
/^nov/i,
|
|
1054
|
+
/^dez/i
|
|
1055
|
+
]
|
|
1056
|
+
}, un = {
|
|
1057
|
+
narrow: /^(dom|[23456]ª?|s[aá]b)/i,
|
|
1058
|
+
short: /^(dom|[23456]ª?|s[aá]b)/i,
|
|
1059
|
+
abbreviated: /^(dom|seg|ter|qua|qui|sex|s[aá]b)/i,
|
|
1060
|
+
wide: /^(domingo|(segunda|ter[cç]a|quarta|quinta|sexta)([- ]feira)?|s[aá]bado)/i
|
|
1061
|
+
}, cn = {
|
|
1062
|
+
short: [/^d/i, /^2/i, /^3/i, /^4/i, /^5/i, /^6/i, /^s[aá]/i],
|
|
1063
|
+
narrow: [/^d/i, /^2/i, /^3/i, /^4/i, /^5/i, /^6/i, /^s[aá]/i],
|
|
1064
|
+
any: [/^d/i, /^seg/i, /^t/i, /^qua/i, /^qui/i, /^sex/i, /^s[aá]b/i]
|
|
1065
|
+
}, dn = {
|
|
1066
|
+
narrow: /^(a|p|mn|md|(da) (manhã|tarde|noite))/i,
|
|
1067
|
+
any: /^([ap]\.?\s?m\.?|meia[-\s]noite|meio[-\s]dia|(da) (manhã|tarde|noite))/i
|
|
1068
|
+
}, ln = {
|
|
1069
|
+
any: {
|
|
1070
|
+
am: /^a/i,
|
|
1071
|
+
pm: /^p/i,
|
|
1072
|
+
midnight: /^mn|^meia[-\s]noite/i,
|
|
1073
|
+
noon: /^md|^meio[-\s]dia/i,
|
|
1074
|
+
morning: /manhã/i,
|
|
1075
|
+
afternoon: /tarde/i,
|
|
1076
|
+
evening: /tarde/i,
|
|
1077
|
+
night: /noite/i
|
|
1078
|
+
}
|
|
1079
|
+
}, hn = {
|
|
1080
|
+
ordinalNumber: xe({
|
|
1081
|
+
matchPattern: Kt,
|
|
1082
|
+
parsePattern: en,
|
|
1083
|
+
valueCallback: (n) => parseInt(n, 10)
|
|
1084
|
+
}),
|
|
1085
|
+
era: k({
|
|
1086
|
+
matchPatterns: tn,
|
|
1087
|
+
defaultMatchWidth: "wide",
|
|
1088
|
+
parsePatterns: nn,
|
|
1089
|
+
defaultParseWidth: "any"
|
|
1090
|
+
}),
|
|
1091
|
+
quarter: k({
|
|
1092
|
+
matchPatterns: rn,
|
|
1093
|
+
defaultMatchWidth: "wide",
|
|
1094
|
+
parsePatterns: an,
|
|
1095
|
+
defaultParseWidth: "any",
|
|
1096
|
+
valueCallback: (n) => n + 1
|
|
1097
|
+
}),
|
|
1098
|
+
month: k({
|
|
1099
|
+
matchPatterns: on,
|
|
1100
|
+
defaultMatchWidth: "wide",
|
|
1101
|
+
parsePatterns: sn,
|
|
1102
|
+
defaultParseWidth: "any"
|
|
1103
|
+
}),
|
|
1104
|
+
day: k({
|
|
1105
|
+
matchPatterns: un,
|
|
1106
|
+
defaultMatchWidth: "wide",
|
|
1107
|
+
parsePatterns: cn,
|
|
1108
|
+
defaultParseWidth: "any"
|
|
1109
|
+
}),
|
|
1110
|
+
dayPeriod: k({
|
|
1111
|
+
matchPatterns: dn,
|
|
1112
|
+
defaultMatchWidth: "any",
|
|
1113
|
+
parsePatterns: ln,
|
|
1114
|
+
defaultParseWidth: "any"
|
|
1115
|
+
})
|
|
1116
|
+
}, mn = {
|
|
1117
|
+
code: "pt-BR",
|
|
1118
|
+
formatDistance: Et,
|
|
1119
|
+
formatLong: It,
|
|
1120
|
+
formatRelative: At,
|
|
1121
|
+
localize: Vt,
|
|
1122
|
+
match: hn,
|
|
750
1123
|
options: {
|
|
751
1124
|
weekStartsOn: 0,
|
|
752
1125
|
firstWeekContainsDate: 1
|
|
753
1126
|
}
|
|
754
1127
|
};
|
|
755
|
-
function
|
|
1128
|
+
function fn(n, t, r = "long") {
|
|
756
1129
|
return new Intl.DateTimeFormat("en-US", {
|
|
757
1130
|
// Enforces engine to render the time. Without the option JavaScriptCore omits it.
|
|
758
1131
|
hour: "numeric",
|
|
759
1132
|
timeZone: n,
|
|
760
1133
|
timeZoneName: r
|
|
761
|
-
}).format(
|
|
1134
|
+
}).format(t).split(/\s/g).slice(2).join(" ");
|
|
762
1135
|
}
|
|
763
|
-
const
|
|
764
|
-
function
|
|
1136
|
+
const gn = {}, U = {};
|
|
1137
|
+
function W(n, t) {
|
|
765
1138
|
try {
|
|
766
|
-
const r = (
|
|
1139
|
+
const r = (gn[n] ||= new Intl.DateTimeFormat("en-US", {
|
|
767
1140
|
timeZone: n,
|
|
768
1141
|
timeZoneName: "longOffset"
|
|
769
|
-
}).format)(
|
|
770
|
-
return r in
|
|
1142
|
+
}).format)(t).split("GMT")[1];
|
|
1143
|
+
return r in U ? U[r] : ge(r, r.split(":"));
|
|
771
1144
|
} catch {
|
|
772
|
-
if (n in
|
|
773
|
-
const r = n?.match(
|
|
774
|
-
return r ?
|
|
1145
|
+
if (n in U) return U[n];
|
|
1146
|
+
const r = n?.match(pn);
|
|
1147
|
+
return r ? ge(n, r.slice(1)) : NaN;
|
|
775
1148
|
}
|
|
776
1149
|
}
|
|
777
|
-
const
|
|
778
|
-
function
|
|
779
|
-
const r = +(
|
|
780
|
-
return
|
|
1150
|
+
const pn = /([+-]\d\d):?(\d\d)?/;
|
|
1151
|
+
function ge(n, t) {
|
|
1152
|
+
const r = +(t[0] || 0), e = +(t[1] || 0), a = +(t[2] || 0) / 60;
|
|
1153
|
+
return U[n] = r * 60 + e > 0 ? r * 60 + e + a : r * 60 - e - a;
|
|
781
1154
|
}
|
|
782
|
-
class
|
|
1155
|
+
class D extends Date {
|
|
783
1156
|
//#region static
|
|
784
|
-
constructor(...
|
|
785
|
-
super(),
|
|
1157
|
+
constructor(...t) {
|
|
1158
|
+
super(), t.length > 1 && typeof t[t.length - 1] == "string" && (this.timeZone = t.pop()), this.internal = /* @__PURE__ */ new Date(), isNaN(W(this.timeZone, this)) ? this.setTime(NaN) : t.length ? typeof t[0] == "number" && (t.length === 1 || t.length === 2 && typeof t[1] != "number") ? this.setTime(t[0]) : typeof t[0] == "string" ? this.setTime(+new Date(t[0])) : t[0] instanceof Date ? this.setTime(+t[0]) : (this.setTime(+new Date(...t)), Te(this), re(this)) : this.setTime(Date.now());
|
|
786
1159
|
}
|
|
787
|
-
static tz(
|
|
788
|
-
return r.length ? new
|
|
1160
|
+
static tz(t, ...r) {
|
|
1161
|
+
return r.length ? new D(...r, t) : new D(Date.now(), t);
|
|
789
1162
|
}
|
|
790
1163
|
//#endregion
|
|
791
1164
|
//#region time zone
|
|
792
|
-
withTimeZone(
|
|
793
|
-
return new
|
|
1165
|
+
withTimeZone(t) {
|
|
1166
|
+
return new D(+this, t);
|
|
794
1167
|
}
|
|
795
1168
|
getTimezoneOffset() {
|
|
796
|
-
const
|
|
797
|
-
return
|
|
1169
|
+
const t = -W(this.timeZone, this);
|
|
1170
|
+
return t > 0 ? Math.floor(t) : Math.ceil(t);
|
|
798
1171
|
}
|
|
799
1172
|
//#endregion
|
|
800
1173
|
//#region time
|
|
801
|
-
setTime(
|
|
802
|
-
return Date.prototype.setTime.apply(this, arguments),
|
|
1174
|
+
setTime(t) {
|
|
1175
|
+
return Date.prototype.setTime.apply(this, arguments), re(this), +this;
|
|
803
1176
|
}
|
|
804
1177
|
//#endregion
|
|
805
1178
|
//#region date-fns integration
|
|
806
|
-
[/* @__PURE__ */ Symbol.for("constructDateFrom")](
|
|
807
|
-
return new
|
|
1179
|
+
[/* @__PURE__ */ Symbol.for("constructDateFrom")](t) {
|
|
1180
|
+
return new D(+new Date(t), this.timeZone);
|
|
808
1181
|
}
|
|
809
1182
|
//#endregion
|
|
810
1183
|
}
|
|
811
|
-
const
|
|
1184
|
+
const pe = /^(get|set)(?!UTC)/;
|
|
812
1185
|
Object.getOwnPropertyNames(Date.prototype).forEach((n) => {
|
|
813
|
-
if (!
|
|
814
|
-
const
|
|
815
|
-
|
|
816
|
-
return this.internal[
|
|
817
|
-
} : (
|
|
818
|
-
return Date.prototype[
|
|
819
|
-
},
|
|
820
|
-
return Date.prototype[
|
|
1186
|
+
if (!pe.test(n)) return;
|
|
1187
|
+
const t = n.replace(pe, "$1UTC");
|
|
1188
|
+
D.prototype[t] && (n.startsWith("get") ? D.prototype[n] = function() {
|
|
1189
|
+
return this.internal[t]();
|
|
1190
|
+
} : (D.prototype[n] = function() {
|
|
1191
|
+
return Date.prototype[t].apply(this.internal, arguments), yn(this), +this;
|
|
1192
|
+
}, D.prototype[t] = function() {
|
|
1193
|
+
return Date.prototype[t].apply(this, arguments), re(this), +this;
|
|
821
1194
|
}));
|
|
822
1195
|
});
|
|
823
|
-
function
|
|
824
|
-
n.internal.setTime(+n), n.internal.setUTCSeconds(n.internal.getUTCSeconds() - Math.round(-
|
|
1196
|
+
function re(n) {
|
|
1197
|
+
n.internal.setTime(+n), n.internal.setUTCSeconds(n.internal.getUTCSeconds() - Math.round(-W(n.timeZone, n) * 60));
|
|
825
1198
|
}
|
|
826
|
-
function
|
|
827
|
-
Date.prototype.setFullYear.call(n, n.internal.getUTCFullYear(), n.internal.getUTCMonth(), n.internal.getUTCDate()), Date.prototype.setHours.call(n, n.internal.getUTCHours(), n.internal.getUTCMinutes(), n.internal.getUTCSeconds(), n.internal.getUTCMilliseconds()),
|
|
1199
|
+
function yn(n) {
|
|
1200
|
+
Date.prototype.setFullYear.call(n, n.internal.getUTCFullYear(), n.internal.getUTCMonth(), n.internal.getUTCDate()), Date.prototype.setHours.call(n, n.internal.getUTCHours(), n.internal.getUTCMinutes(), n.internal.getUTCSeconds(), n.internal.getUTCMilliseconds()), Te(n);
|
|
828
1201
|
}
|
|
829
|
-
function
|
|
830
|
-
const
|
|
831
|
-
|
|
832
|
-
const
|
|
1202
|
+
function Te(n) {
|
|
1203
|
+
const t = W(n.timeZone, n), r = t > 0 ? Math.floor(t) : Math.ceil(t), e = /* @__PURE__ */ new Date(+n);
|
|
1204
|
+
e.setUTCHours(e.getUTCHours() - 1);
|
|
1205
|
+
const a = -(/* @__PURE__ */ new Date(+n)).getTimezoneOffset(), o = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset(), s = a - o, u = Date.prototype.getHours.apply(n) !== n.internal.getUTCHours();
|
|
833
1206
|
s && u && n.internal.setUTCMinutes(n.internal.getUTCMinutes() + s);
|
|
834
|
-
const h =
|
|
1207
|
+
const h = a - r;
|
|
835
1208
|
h && Date.prototype.setUTCMinutes.call(n, Date.prototype.getUTCMinutes.call(n) + h);
|
|
836
1209
|
const v = /* @__PURE__ */ new Date(+n);
|
|
837
1210
|
v.setUTCSeconds(0);
|
|
838
|
-
const
|
|
839
|
-
(
|
|
840
|
-
const M =
|
|
841
|
-
if (R &&
|
|
842
|
-
Date.prototype.setUTCMinutes.call(n, Date.prototype.getUTCMinutes.call(n) +
|
|
843
|
-
const
|
|
844
|
-
|
|
1211
|
+
const f = a > 0 ? v.getSeconds() : (v.getSeconds() - 60) % 60, m = Math.round(-(W(n.timeZone, n) * 60)) % 60;
|
|
1212
|
+
(m || f) && (n.internal.setUTCSeconds(n.internal.getUTCSeconds() + m), Date.prototype.setUTCSeconds.call(n, Date.prototype.getUTCSeconds.call(n) + m + f));
|
|
1213
|
+
const M = W(n.timeZone, n), O = M > 0 ? Math.floor(M) : Math.ceil(M), B = -(/* @__PURE__ */ new Date(+n)).getTimezoneOffset() - O, R = O !== r, j = B - h;
|
|
1214
|
+
if (R && j) {
|
|
1215
|
+
Date.prototype.setUTCMinutes.call(n, Date.prototype.getUTCMinutes.call(n) + j);
|
|
1216
|
+
const E = W(n.timeZone, n), G = E > 0 ? Math.floor(E) : Math.ceil(E), L = O - G;
|
|
1217
|
+
L && (n.internal.setUTCMinutes(n.internal.getUTCMinutes() + L), Date.prototype.setUTCMinutes.call(n, Date.prototype.getUTCMinutes.call(n) + L));
|
|
845
1218
|
}
|
|
846
1219
|
}
|
|
847
|
-
class
|
|
1220
|
+
class N extends D {
|
|
848
1221
|
//#region static
|
|
849
|
-
static tz(
|
|
850
|
-
return r.length ? new
|
|
1222
|
+
static tz(t, ...r) {
|
|
1223
|
+
return r.length ? new N(...r, t) : new N(Date.now(), t);
|
|
851
1224
|
}
|
|
852
1225
|
//#endregion
|
|
853
1226
|
//#region representation
|
|
854
1227
|
toISOString() {
|
|
855
|
-
const [
|
|
856
|
-
return this.internal.toISOString().slice(0, -1) +
|
|
1228
|
+
const [t, r, e] = this.tzComponents(), a = `${t}${r}:${e}`;
|
|
1229
|
+
return this.internal.toISOString().slice(0, -1) + a;
|
|
857
1230
|
}
|
|
858
1231
|
toString() {
|
|
859
1232
|
return `${this.toDateString()} ${this.toTimeString()}`;
|
|
860
1233
|
}
|
|
861
1234
|
toDateString() {
|
|
862
|
-
const [
|
|
863
|
-
return `${
|
|
1235
|
+
const [t, r, e, a] = this.internal.toUTCString().split(" ");
|
|
1236
|
+
return `${t?.slice(0, -1)} ${e} ${r} ${a}`;
|
|
864
1237
|
}
|
|
865
1238
|
toTimeString() {
|
|
866
|
-
const
|
|
867
|
-
return `${
|
|
1239
|
+
const t = this.internal.toUTCString().split(" ")[4], [r, e, a] = this.tzComponents();
|
|
1240
|
+
return `${t} GMT${r}${e}${a} (${fn(this.timeZone, this)})`;
|
|
868
1241
|
}
|
|
869
|
-
toLocaleString(
|
|
870
|
-
return Date.prototype.toLocaleString.call(this,
|
|
1242
|
+
toLocaleString(t, r) {
|
|
1243
|
+
return Date.prototype.toLocaleString.call(this, t, {
|
|
871
1244
|
...r,
|
|
872
1245
|
timeZone: r?.timeZone || this.timeZone
|
|
873
1246
|
});
|
|
874
1247
|
}
|
|
875
|
-
toLocaleDateString(
|
|
876
|
-
return Date.prototype.toLocaleDateString.call(this,
|
|
1248
|
+
toLocaleDateString(t, r) {
|
|
1249
|
+
return Date.prototype.toLocaleDateString.call(this, t, {
|
|
877
1250
|
...r,
|
|
878
1251
|
timeZone: r?.timeZone || this.timeZone
|
|
879
1252
|
});
|
|
880
1253
|
}
|
|
881
|
-
toLocaleTimeString(
|
|
882
|
-
return Date.prototype.toLocaleTimeString.call(this,
|
|
1254
|
+
toLocaleTimeString(t, r) {
|
|
1255
|
+
return Date.prototype.toLocaleTimeString.call(this, t, {
|
|
883
1256
|
...r,
|
|
884
1257
|
timeZone: r?.timeZone || this.timeZone
|
|
885
1258
|
});
|
|
@@ -887,218 +1260,218 @@ class T extends S {
|
|
|
887
1260
|
//#endregion
|
|
888
1261
|
//#region private
|
|
889
1262
|
tzComponents() {
|
|
890
|
-
const
|
|
891
|
-
return [r,
|
|
1263
|
+
const t = this.getTimezoneOffset(), r = t > 0 ? "-" : "+", e = String(Math.floor(Math.abs(t) / 60)).padStart(2, "0"), a = String(Math.abs(t) % 60).padStart(2, "0");
|
|
1264
|
+
return [r, e, a];
|
|
892
1265
|
}
|
|
893
1266
|
//#endregion
|
|
894
|
-
withTimeZone(
|
|
895
|
-
return new
|
|
1267
|
+
withTimeZone(t) {
|
|
1268
|
+
return new N(+this, t);
|
|
896
1269
|
}
|
|
897
1270
|
//#region date-fns integration
|
|
898
|
-
[/* @__PURE__ */ Symbol.for("constructDateFrom")](
|
|
899
|
-
return new
|
|
1271
|
+
[/* @__PURE__ */ Symbol.for("constructDateFrom")](t) {
|
|
1272
|
+
return new N(+new Date(t), this.timeZone);
|
|
900
1273
|
}
|
|
901
1274
|
//#endregion
|
|
902
1275
|
}
|
|
903
|
-
function
|
|
904
|
-
const
|
|
905
|
-
return isNaN(
|
|
906
|
-
}
|
|
907
|
-
function
|
|
908
|
-
const
|
|
909
|
-
if (isNaN(
|
|
910
|
-
if (!
|
|
911
|
-
return
|
|
912
|
-
const
|
|
913
|
-
|
|
914
|
-
const s =
|
|
915
|
-
return
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
),
|
|
920
|
-
}
|
|
921
|
-
function
|
|
922
|
-
return
|
|
923
|
-
}
|
|
924
|
-
function
|
|
925
|
-
const r =
|
|
926
|
-
|
|
927
|
-
const
|
|
928
|
-
s.setFullYear(
|
|
929
|
-
const u =
|
|
930
|
-
return r.getTime() >=
|
|
931
|
-
}
|
|
932
|
-
function
|
|
933
|
-
const
|
|
1276
|
+
function Pe(n, t, r) {
|
|
1277
|
+
const e = l(n, r?.in);
|
|
1278
|
+
return isNaN(t) ? p(n, NaN) : (t && e.setDate(e.getDate() + t), e);
|
|
1279
|
+
}
|
|
1280
|
+
function We(n, t, r) {
|
|
1281
|
+
const e = l(n, r?.in);
|
|
1282
|
+
if (isNaN(t)) return p(n, NaN);
|
|
1283
|
+
if (!t)
|
|
1284
|
+
return e;
|
|
1285
|
+
const a = e.getDate(), o = p(n, e.getTime());
|
|
1286
|
+
o.setMonth(e.getMonth() + t + 1, 0);
|
|
1287
|
+
const s = o.getDate();
|
|
1288
|
+
return a >= s ? o : (e.setFullYear(
|
|
1289
|
+
o.getFullYear(),
|
|
1290
|
+
o.getMonth(),
|
|
1291
|
+
a
|
|
1292
|
+
), e);
|
|
1293
|
+
}
|
|
1294
|
+
function _(n, t) {
|
|
1295
|
+
return $(n, { ...t, weekStartsOn: 1 });
|
|
1296
|
+
}
|
|
1297
|
+
function Ne(n, t) {
|
|
1298
|
+
const r = l(n, t?.in), e = r.getFullYear(), a = p(r, 0);
|
|
1299
|
+
a.setFullYear(e + 1, 0, 4), a.setHours(0, 0, 0, 0);
|
|
1300
|
+
const o = _(a), s = p(r, 0);
|
|
1301
|
+
s.setFullYear(e, 0, 4), s.setHours(0, 0, 0, 0);
|
|
1302
|
+
const u = _(s);
|
|
1303
|
+
return r.getTime() >= o.getTime() ? e + 1 : r.getTime() >= u.getTime() ? e : e - 1;
|
|
1304
|
+
}
|
|
1305
|
+
function ye(n) {
|
|
1306
|
+
const t = l(n), r = new Date(
|
|
934
1307
|
Date.UTC(
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
1308
|
+
t.getFullYear(),
|
|
1309
|
+
t.getMonth(),
|
|
1310
|
+
t.getDate(),
|
|
1311
|
+
t.getHours(),
|
|
1312
|
+
t.getMinutes(),
|
|
1313
|
+
t.getSeconds(),
|
|
1314
|
+
t.getMilliseconds()
|
|
942
1315
|
)
|
|
943
1316
|
);
|
|
944
|
-
return r.setUTCFullYear(
|
|
1317
|
+
return r.setUTCFullYear(t.getFullYear()), +n - +r;
|
|
945
1318
|
}
|
|
946
|
-
function
|
|
947
|
-
const r =
|
|
1319
|
+
function A(n, t) {
|
|
1320
|
+
const r = l(n, t?.in);
|
|
948
1321
|
return r.setHours(0, 0, 0, 0), r;
|
|
949
1322
|
}
|
|
950
|
-
function
|
|
951
|
-
const [
|
|
1323
|
+
function je(n, t, r) {
|
|
1324
|
+
const [e, a] = z(
|
|
952
1325
|
r?.in,
|
|
953
1326
|
n,
|
|
954
|
-
|
|
955
|
-
),
|
|
956
|
-
return Math.round((u - h) /
|
|
957
|
-
}
|
|
958
|
-
function
|
|
959
|
-
const r =
|
|
960
|
-
return
|
|
961
|
-
}
|
|
962
|
-
function
|
|
963
|
-
return
|
|
964
|
-
}
|
|
965
|
-
function
|
|
966
|
-
return
|
|
967
|
-
}
|
|
968
|
-
function
|
|
969
|
-
let r,
|
|
970
|
-
return n.forEach((
|
|
971
|
-
!
|
|
972
|
-
const
|
|
973
|
-
(!r || r <
|
|
974
|
-
}), p(
|
|
975
|
-
}
|
|
976
|
-
function
|
|
977
|
-
let r,
|
|
978
|
-
return n.forEach((
|
|
979
|
-
!
|
|
980
|
-
const
|
|
981
|
-
(!r || r >
|
|
982
|
-
}), p(
|
|
983
|
-
}
|
|
984
|
-
function
|
|
985
|
-
const [
|
|
1327
|
+
t
|
|
1328
|
+
), o = A(e), s = A(a), u = +o - ye(o), h = +s - ye(s);
|
|
1329
|
+
return Math.round((u - h) / it);
|
|
1330
|
+
}
|
|
1331
|
+
function bn(n, t) {
|
|
1332
|
+
const r = Ne(n, t), e = p(n, 0);
|
|
1333
|
+
return e.setFullYear(r, 0, 4), e.setHours(0, 0, 0, 0), _(e);
|
|
1334
|
+
}
|
|
1335
|
+
function wn(n, t, r) {
|
|
1336
|
+
return Pe(n, t * 7, r);
|
|
1337
|
+
}
|
|
1338
|
+
function vn(n, t, r) {
|
|
1339
|
+
return We(n, t * 12, r);
|
|
1340
|
+
}
|
|
1341
|
+
function Mn(n, t) {
|
|
1342
|
+
let r, e = t?.in;
|
|
1343
|
+
return n.forEach((a) => {
|
|
1344
|
+
!e && typeof a == "object" && (e = p.bind(null, a));
|
|
1345
|
+
const o = l(a, e);
|
|
1346
|
+
(!r || r < o || isNaN(+o)) && (r = o);
|
|
1347
|
+
}), p(e, r || NaN);
|
|
1348
|
+
}
|
|
1349
|
+
function Sn(n, t) {
|
|
1350
|
+
let r, e = t?.in;
|
|
1351
|
+
return n.forEach((a) => {
|
|
1352
|
+
!e && typeof a == "object" && (e = p.bind(null, a));
|
|
1353
|
+
const o = l(a, e);
|
|
1354
|
+
(!r || r > o || isNaN(+o)) && (r = o);
|
|
1355
|
+
}), p(e, r || NaN);
|
|
1356
|
+
}
|
|
1357
|
+
function kn(n, t, r) {
|
|
1358
|
+
const [e, a] = z(
|
|
986
1359
|
r?.in,
|
|
987
1360
|
n,
|
|
988
|
-
|
|
1361
|
+
t
|
|
989
1362
|
);
|
|
990
|
-
return +
|
|
1363
|
+
return +A(e) == +A(a);
|
|
991
1364
|
}
|
|
992
|
-
function
|
|
1365
|
+
function Ce(n) {
|
|
993
1366
|
return n instanceof Date || typeof n == "object" && Object.prototype.toString.call(n) === "[object Date]";
|
|
994
1367
|
}
|
|
995
|
-
function
|
|
996
|
-
return !(!
|
|
1368
|
+
function Dn(n) {
|
|
1369
|
+
return !(!Ce(n) && typeof n != "number" || isNaN(+l(n)));
|
|
997
1370
|
}
|
|
998
|
-
function
|
|
999
|
-
const [
|
|
1371
|
+
function xn(n, t, r) {
|
|
1372
|
+
const [e, a] = z(
|
|
1000
1373
|
r?.in,
|
|
1001
1374
|
n,
|
|
1002
|
-
|
|
1003
|
-
),
|
|
1004
|
-
return
|
|
1005
|
-
}
|
|
1006
|
-
function
|
|
1007
|
-
const r =
|
|
1008
|
-
return r.setFullYear(r.getFullYear(),
|
|
1009
|
-
}
|
|
1010
|
-
function
|
|
1011
|
-
const [r,
|
|
1012
|
-
return { start: r, end:
|
|
1013
|
-
}
|
|
1014
|
-
function
|
|
1015
|
-
const { start: r, end:
|
|
1016
|
-
let
|
|
1017
|
-
const
|
|
1375
|
+
t
|
|
1376
|
+
), o = e.getFullYear() - a.getFullYear(), s = e.getMonth() - a.getMonth();
|
|
1377
|
+
return o * 12 + s;
|
|
1378
|
+
}
|
|
1379
|
+
function On(n, t) {
|
|
1380
|
+
const r = l(n, t?.in), e = r.getMonth();
|
|
1381
|
+
return r.setFullYear(r.getFullYear(), e + 1, 0), r.setHours(23, 59, 59, 999), r;
|
|
1382
|
+
}
|
|
1383
|
+
function Ye(n, t) {
|
|
1384
|
+
const [r, e] = z(n, t.start, t.end);
|
|
1385
|
+
return { start: r, end: e };
|
|
1386
|
+
}
|
|
1387
|
+
function Tn(n, t) {
|
|
1388
|
+
const { start: r, end: e } = Ye(t?.in, n);
|
|
1389
|
+
let a = +r > +e;
|
|
1390
|
+
const o = a ? +r : +e, s = a ? e : r;
|
|
1018
1391
|
s.setHours(0, 0, 0, 0), s.setDate(1);
|
|
1019
1392
|
let u = 1;
|
|
1020
1393
|
const h = [];
|
|
1021
|
-
for (; +s <=
|
|
1394
|
+
for (; +s <= o; )
|
|
1022
1395
|
h.push(p(r, s)), s.setMonth(s.getMonth() + u);
|
|
1023
|
-
return
|
|
1396
|
+
return a ? h.reverse() : h;
|
|
1024
1397
|
}
|
|
1025
|
-
function
|
|
1026
|
-
const r =
|
|
1398
|
+
function Pn(n, t) {
|
|
1399
|
+
const r = l(n, t?.in);
|
|
1027
1400
|
return r.setDate(1), r.setHours(0, 0, 0, 0), r;
|
|
1028
1401
|
}
|
|
1029
|
-
function
|
|
1030
|
-
const r =
|
|
1031
|
-
return r.setFullYear(
|
|
1402
|
+
function Wn(n, t) {
|
|
1403
|
+
const r = l(n, t?.in), e = r.getFullYear();
|
|
1404
|
+
return r.setFullYear(e + 1, 0, 0), r.setHours(23, 59, 59, 999), r;
|
|
1032
1405
|
}
|
|
1033
|
-
function
|
|
1034
|
-
const r =
|
|
1406
|
+
function Fe(n, t) {
|
|
1407
|
+
const r = l(n, t?.in);
|
|
1035
1408
|
return r.setFullYear(r.getFullYear(), 0, 1), r.setHours(0, 0, 0, 0), r;
|
|
1036
1409
|
}
|
|
1037
|
-
function
|
|
1038
|
-
const { start: r, end:
|
|
1039
|
-
let
|
|
1040
|
-
const
|
|
1410
|
+
function Nn(n, t) {
|
|
1411
|
+
const { start: r, end: e } = Ye(t?.in, n);
|
|
1412
|
+
let a = +r > +e;
|
|
1413
|
+
const o = a ? +r : +e, s = a ? e : r;
|
|
1041
1414
|
s.setHours(0, 0, 0, 0), s.setMonth(0, 1);
|
|
1042
1415
|
let u = 1;
|
|
1043
1416
|
const h = [];
|
|
1044
|
-
for (; +s <=
|
|
1417
|
+
for (; +s <= o; )
|
|
1045
1418
|
h.push(p(r, s)), s.setFullYear(s.getFullYear() + u);
|
|
1046
|
-
return
|
|
1419
|
+
return a ? h.reverse() : h;
|
|
1047
1420
|
}
|
|
1048
|
-
function
|
|
1049
|
-
const r =
|
|
1050
|
-
return
|
|
1421
|
+
function He(n, t) {
|
|
1422
|
+
const r = Z(), e = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? r.weekStartsOn ?? r.locale?.options?.weekStartsOn ?? 0, a = l(n, t?.in), o = a.getDay(), s = (o < e ? -7 : 0) + 6 - (o - e);
|
|
1423
|
+
return a.setDate(a.getDate() + s), a.setHours(23, 59, 59, 999), a;
|
|
1051
1424
|
}
|
|
1052
|
-
function
|
|
1053
|
-
return
|
|
1425
|
+
function jn(n, t) {
|
|
1426
|
+
return He(n, { ...t, weekStartsOn: 1 });
|
|
1054
1427
|
}
|
|
1055
|
-
function
|
|
1056
|
-
const r =
|
|
1057
|
-
return
|
|
1428
|
+
function Cn(n, t) {
|
|
1429
|
+
const r = l(n, t?.in);
|
|
1430
|
+
return je(r, Fe(r)) + 1;
|
|
1058
1431
|
}
|
|
1059
|
-
function $
|
|
1060
|
-
const r =
|
|
1061
|
-
return Math.round(
|
|
1432
|
+
function $e(n, t) {
|
|
1433
|
+
const r = l(n, t?.in), e = +_(r) - +bn(r);
|
|
1434
|
+
return Math.round(e / Oe) + 1;
|
|
1062
1435
|
}
|
|
1063
|
-
function
|
|
1064
|
-
const r =
|
|
1065
|
-
s.setFullYear(
|
|
1066
|
-
const u =
|
|
1067
|
-
h.setFullYear(
|
|
1068
|
-
const v =
|
|
1069
|
-
return +r >= +u ?
|
|
1436
|
+
function ze(n, t) {
|
|
1437
|
+
const r = l(n, t?.in), e = r.getFullYear(), a = Z(), o = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? a.firstWeekContainsDate ?? a.locale?.options?.firstWeekContainsDate ?? 1, s = p(t?.in || n, 0);
|
|
1438
|
+
s.setFullYear(e + 1, 0, o), s.setHours(0, 0, 0, 0);
|
|
1439
|
+
const u = $(s, t), h = p(t?.in || n, 0);
|
|
1440
|
+
h.setFullYear(e, 0, o), h.setHours(0, 0, 0, 0);
|
|
1441
|
+
const v = $(h, t);
|
|
1442
|
+
return +r >= +u ? e + 1 : +r >= +v ? e : e - 1;
|
|
1070
1443
|
}
|
|
1071
|
-
function
|
|
1072
|
-
const r =
|
|
1073
|
-
return
|
|
1444
|
+
function Yn(n, t) {
|
|
1445
|
+
const r = Z(), e = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? r.firstWeekContainsDate ?? r.locale?.options?.firstWeekContainsDate ?? 1, a = ze(n, t), o = p(t?.in || n, 0);
|
|
1446
|
+
return o.setFullYear(a, 0, e), o.setHours(0, 0, 0, 0), $(o, t);
|
|
1074
1447
|
}
|
|
1075
|
-
function
|
|
1076
|
-
const r =
|
|
1077
|
-
return Math.round(
|
|
1448
|
+
function Ee(n, t) {
|
|
1449
|
+
const r = l(n, t?.in), e = +$(r, t) - +Yn(r, t);
|
|
1450
|
+
return Math.round(e / Oe) + 1;
|
|
1078
1451
|
}
|
|
1079
|
-
function
|
|
1080
|
-
const r = n < 0 ? "-" : "",
|
|
1081
|
-
return r +
|
|
1452
|
+
function d(n, t) {
|
|
1453
|
+
const r = n < 0 ? "-" : "", e = Math.abs(n).toString().padStart(t, "0");
|
|
1454
|
+
return r + e;
|
|
1082
1455
|
}
|
|
1083
|
-
const
|
|
1456
|
+
const T = {
|
|
1084
1457
|
// Year
|
|
1085
|
-
y(n,
|
|
1086
|
-
const r = n.getFullYear(),
|
|
1087
|
-
return
|
|
1458
|
+
y(n, t) {
|
|
1459
|
+
const r = n.getFullYear(), e = r > 0 ? r : 1 - r;
|
|
1460
|
+
return d(t === "yy" ? e % 100 : e, t.length);
|
|
1088
1461
|
},
|
|
1089
1462
|
// Month
|
|
1090
|
-
M(n,
|
|
1463
|
+
M(n, t) {
|
|
1091
1464
|
const r = n.getMonth();
|
|
1092
|
-
return
|
|
1465
|
+
return t === "M" ? String(r + 1) : d(r + 1, 2);
|
|
1093
1466
|
},
|
|
1094
1467
|
// Day of the month
|
|
1095
|
-
d(n,
|
|
1096
|
-
return
|
|
1468
|
+
d(n, t) {
|
|
1469
|
+
return d(n.getDate(), t.length);
|
|
1097
1470
|
},
|
|
1098
1471
|
// AM or PM
|
|
1099
|
-
a(n,
|
|
1472
|
+
a(n, t) {
|
|
1100
1473
|
const r = n.getHours() / 12 >= 1 ? "pm" : "am";
|
|
1101
|
-
switch (
|
|
1474
|
+
switch (t) {
|
|
1102
1475
|
case "a":
|
|
1103
1476
|
case "aa":
|
|
1104
1477
|
return r.toUpperCase();
|
|
@@ -1111,27 +1484,27 @@ const D = {
|
|
|
1111
1484
|
}
|
|
1112
1485
|
},
|
|
1113
1486
|
// Hour [1-12]
|
|
1114
|
-
h(n,
|
|
1115
|
-
return
|
|
1487
|
+
h(n, t) {
|
|
1488
|
+
return d(n.getHours() % 12 || 12, t.length);
|
|
1116
1489
|
},
|
|
1117
1490
|
// Hour [0-23]
|
|
1118
|
-
H(n,
|
|
1119
|
-
return
|
|
1491
|
+
H(n, t) {
|
|
1492
|
+
return d(n.getHours(), t.length);
|
|
1120
1493
|
},
|
|
1121
1494
|
// Minute
|
|
1122
|
-
m(n,
|
|
1123
|
-
return
|
|
1495
|
+
m(n, t) {
|
|
1496
|
+
return d(n.getMinutes(), t.length);
|
|
1124
1497
|
},
|
|
1125
1498
|
// Second
|
|
1126
|
-
s(n,
|
|
1127
|
-
return
|
|
1499
|
+
s(n, t) {
|
|
1500
|
+
return d(n.getSeconds(), t.length);
|
|
1128
1501
|
},
|
|
1129
1502
|
// Fraction of second
|
|
1130
|
-
S(n,
|
|
1131
|
-
const r =
|
|
1132
|
-
|
|
1503
|
+
S(n, t) {
|
|
1504
|
+
const r = t.length, e = n.getMilliseconds(), a = Math.trunc(
|
|
1505
|
+
e * Math.pow(10, r - 3)
|
|
1133
1506
|
);
|
|
1134
|
-
return
|
|
1507
|
+
return d(a, t.length);
|
|
1135
1508
|
}
|
|
1136
1509
|
}, Y = {
|
|
1137
1510
|
midnight: "midnight",
|
|
@@ -1140,44 +1513,44 @@ const D = {
|
|
|
1140
1513
|
afternoon: "afternoon",
|
|
1141
1514
|
evening: "evening",
|
|
1142
1515
|
night: "night"
|
|
1143
|
-
},
|
|
1516
|
+
}, be = {
|
|
1144
1517
|
// Era
|
|
1145
|
-
G: function(n,
|
|
1146
|
-
const
|
|
1147
|
-
switch (
|
|
1518
|
+
G: function(n, t, r) {
|
|
1519
|
+
const e = n.getFullYear() > 0 ? 1 : 0;
|
|
1520
|
+
switch (t) {
|
|
1148
1521
|
// AD, BC
|
|
1149
1522
|
case "G":
|
|
1150
1523
|
case "GG":
|
|
1151
1524
|
case "GGG":
|
|
1152
|
-
return r.era(
|
|
1525
|
+
return r.era(e, { width: "abbreviated" });
|
|
1153
1526
|
// A, B
|
|
1154
1527
|
case "GGGGG":
|
|
1155
|
-
return r.era(
|
|
1528
|
+
return r.era(e, { width: "narrow" });
|
|
1156
1529
|
default:
|
|
1157
|
-
return r.era(
|
|
1530
|
+
return r.era(e, { width: "wide" });
|
|
1158
1531
|
}
|
|
1159
1532
|
},
|
|
1160
1533
|
// Year
|
|
1161
|
-
y: function(n,
|
|
1162
|
-
if (
|
|
1163
|
-
const
|
|
1164
|
-
return r.ordinalNumber(
|
|
1534
|
+
y: function(n, t, r) {
|
|
1535
|
+
if (t === "yo") {
|
|
1536
|
+
const e = n.getFullYear(), a = e > 0 ? e : 1 - e;
|
|
1537
|
+
return r.ordinalNumber(a, { unit: "year" });
|
|
1165
1538
|
}
|
|
1166
|
-
return
|
|
1539
|
+
return T.y(n, t);
|
|
1167
1540
|
},
|
|
1168
1541
|
// Local week-numbering year
|
|
1169
|
-
Y: function(n,
|
|
1170
|
-
const
|
|
1171
|
-
if (
|
|
1172
|
-
const s =
|
|
1173
|
-
return
|
|
1542
|
+
Y: function(n, t, r, e) {
|
|
1543
|
+
const a = ze(n, e), o = a > 0 ? a : 1 - a;
|
|
1544
|
+
if (t === "YY") {
|
|
1545
|
+
const s = o % 100;
|
|
1546
|
+
return d(s, 2);
|
|
1174
1547
|
}
|
|
1175
|
-
return
|
|
1548
|
+
return t === "Yo" ? r.ordinalNumber(o, { unit: "year" }) : d(o, t.length);
|
|
1176
1549
|
},
|
|
1177
1550
|
// ISO week-numbering year
|
|
1178
|
-
R: function(n,
|
|
1179
|
-
const r =
|
|
1180
|
-
return
|
|
1551
|
+
R: function(n, t) {
|
|
1552
|
+
const r = Ne(n);
|
|
1553
|
+
return d(r, t.length);
|
|
1181
1554
|
},
|
|
1182
1555
|
// Extended year. This is a single number designating the year of this calendar system.
|
|
1183
1556
|
// The main difference between `y` and `u` localizers are B.C. years:
|
|
@@ -1188,700 +1561,700 @@ const D = {
|
|
|
1188
1561
|
// | BC 2 | 2 | -1 |
|
|
1189
1562
|
// Also `yy` always returns the last two digits of a year,
|
|
1190
1563
|
// while `uu` pads single digit years to 2 characters and returns other years unchanged.
|
|
1191
|
-
u: function(n,
|
|
1564
|
+
u: function(n, t) {
|
|
1192
1565
|
const r = n.getFullYear();
|
|
1193
|
-
return
|
|
1566
|
+
return d(r, t.length);
|
|
1194
1567
|
},
|
|
1195
1568
|
// Quarter
|
|
1196
|
-
Q: function(n,
|
|
1197
|
-
const
|
|
1198
|
-
switch (
|
|
1569
|
+
Q: function(n, t, r) {
|
|
1570
|
+
const e = Math.ceil((n.getMonth() + 1) / 3);
|
|
1571
|
+
switch (t) {
|
|
1199
1572
|
// 1, 2, 3, 4
|
|
1200
1573
|
case "Q":
|
|
1201
|
-
return String(
|
|
1574
|
+
return String(e);
|
|
1202
1575
|
// 01, 02, 03, 04
|
|
1203
1576
|
case "QQ":
|
|
1204
|
-
return
|
|
1577
|
+
return d(e, 2);
|
|
1205
1578
|
// 1st, 2nd, 3rd, 4th
|
|
1206
1579
|
case "Qo":
|
|
1207
|
-
return r.ordinalNumber(
|
|
1580
|
+
return r.ordinalNumber(e, { unit: "quarter" });
|
|
1208
1581
|
// Q1, Q2, Q3, Q4
|
|
1209
1582
|
case "QQQ":
|
|
1210
|
-
return r.quarter(
|
|
1583
|
+
return r.quarter(e, {
|
|
1211
1584
|
width: "abbreviated",
|
|
1212
1585
|
context: "formatting"
|
|
1213
1586
|
});
|
|
1214
1587
|
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
|
|
1215
1588
|
case "QQQQQ":
|
|
1216
|
-
return r.quarter(
|
|
1589
|
+
return r.quarter(e, {
|
|
1217
1590
|
width: "narrow",
|
|
1218
1591
|
context: "formatting"
|
|
1219
1592
|
});
|
|
1220
1593
|
default:
|
|
1221
|
-
return r.quarter(
|
|
1594
|
+
return r.quarter(e, {
|
|
1222
1595
|
width: "wide",
|
|
1223
1596
|
context: "formatting"
|
|
1224
1597
|
});
|
|
1225
1598
|
}
|
|
1226
1599
|
},
|
|
1227
1600
|
// Stand-alone quarter
|
|
1228
|
-
q: function(n,
|
|
1229
|
-
const
|
|
1230
|
-
switch (
|
|
1601
|
+
q: function(n, t, r) {
|
|
1602
|
+
const e = Math.ceil((n.getMonth() + 1) / 3);
|
|
1603
|
+
switch (t) {
|
|
1231
1604
|
// 1, 2, 3, 4
|
|
1232
1605
|
case "q":
|
|
1233
|
-
return String(
|
|
1606
|
+
return String(e);
|
|
1234
1607
|
// 01, 02, 03, 04
|
|
1235
1608
|
case "qq":
|
|
1236
|
-
return
|
|
1609
|
+
return d(e, 2);
|
|
1237
1610
|
// 1st, 2nd, 3rd, 4th
|
|
1238
1611
|
case "qo":
|
|
1239
|
-
return r.ordinalNumber(
|
|
1612
|
+
return r.ordinalNumber(e, { unit: "quarter" });
|
|
1240
1613
|
// Q1, Q2, Q3, Q4
|
|
1241
1614
|
case "qqq":
|
|
1242
|
-
return r.quarter(
|
|
1615
|
+
return r.quarter(e, {
|
|
1243
1616
|
width: "abbreviated",
|
|
1244
1617
|
context: "standalone"
|
|
1245
1618
|
});
|
|
1246
1619
|
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
|
|
1247
1620
|
case "qqqqq":
|
|
1248
|
-
return r.quarter(
|
|
1621
|
+
return r.quarter(e, {
|
|
1249
1622
|
width: "narrow",
|
|
1250
1623
|
context: "standalone"
|
|
1251
1624
|
});
|
|
1252
1625
|
default:
|
|
1253
|
-
return r.quarter(
|
|
1626
|
+
return r.quarter(e, {
|
|
1254
1627
|
width: "wide",
|
|
1255
1628
|
context: "standalone"
|
|
1256
1629
|
});
|
|
1257
1630
|
}
|
|
1258
1631
|
},
|
|
1259
1632
|
// Month
|
|
1260
|
-
M: function(n,
|
|
1261
|
-
const
|
|
1262
|
-
switch (
|
|
1633
|
+
M: function(n, t, r) {
|
|
1634
|
+
const e = n.getMonth();
|
|
1635
|
+
switch (t) {
|
|
1263
1636
|
case "M":
|
|
1264
1637
|
case "MM":
|
|
1265
|
-
return
|
|
1638
|
+
return T.M(n, t);
|
|
1266
1639
|
// 1st, 2nd, ..., 12th
|
|
1267
1640
|
case "Mo":
|
|
1268
|
-
return r.ordinalNumber(
|
|
1641
|
+
return r.ordinalNumber(e + 1, { unit: "month" });
|
|
1269
1642
|
// Jan, Feb, ..., Dec
|
|
1270
1643
|
case "MMM":
|
|
1271
|
-
return r.month(
|
|
1644
|
+
return r.month(e, {
|
|
1272
1645
|
width: "abbreviated",
|
|
1273
1646
|
context: "formatting"
|
|
1274
1647
|
});
|
|
1275
1648
|
// J, F, ..., D
|
|
1276
1649
|
case "MMMMM":
|
|
1277
|
-
return r.month(
|
|
1650
|
+
return r.month(e, {
|
|
1278
1651
|
width: "narrow",
|
|
1279
1652
|
context: "formatting"
|
|
1280
1653
|
});
|
|
1281
1654
|
default:
|
|
1282
|
-
return r.month(
|
|
1655
|
+
return r.month(e, { width: "wide", context: "formatting" });
|
|
1283
1656
|
}
|
|
1284
1657
|
},
|
|
1285
1658
|
// Stand-alone month
|
|
1286
|
-
L: function(n,
|
|
1287
|
-
const
|
|
1288
|
-
switch (
|
|
1659
|
+
L: function(n, t, r) {
|
|
1660
|
+
const e = n.getMonth();
|
|
1661
|
+
switch (t) {
|
|
1289
1662
|
// 1, 2, ..., 12
|
|
1290
1663
|
case "L":
|
|
1291
|
-
return String(
|
|
1664
|
+
return String(e + 1);
|
|
1292
1665
|
// 01, 02, ..., 12
|
|
1293
1666
|
case "LL":
|
|
1294
|
-
return
|
|
1667
|
+
return d(e + 1, 2);
|
|
1295
1668
|
// 1st, 2nd, ..., 12th
|
|
1296
1669
|
case "Lo":
|
|
1297
|
-
return r.ordinalNumber(
|
|
1670
|
+
return r.ordinalNumber(e + 1, { unit: "month" });
|
|
1298
1671
|
// Jan, Feb, ..., Dec
|
|
1299
1672
|
case "LLL":
|
|
1300
|
-
return r.month(
|
|
1673
|
+
return r.month(e, {
|
|
1301
1674
|
width: "abbreviated",
|
|
1302
1675
|
context: "standalone"
|
|
1303
1676
|
});
|
|
1304
1677
|
// J, F, ..., D
|
|
1305
1678
|
case "LLLLL":
|
|
1306
|
-
return r.month(
|
|
1679
|
+
return r.month(e, {
|
|
1307
1680
|
width: "narrow",
|
|
1308
1681
|
context: "standalone"
|
|
1309
1682
|
});
|
|
1310
1683
|
default:
|
|
1311
|
-
return r.month(
|
|
1684
|
+
return r.month(e, { width: "wide", context: "standalone" });
|
|
1312
1685
|
}
|
|
1313
1686
|
},
|
|
1314
1687
|
// Local week of year
|
|
1315
|
-
w: function(n,
|
|
1316
|
-
const
|
|
1317
|
-
return
|
|
1688
|
+
w: function(n, t, r, e) {
|
|
1689
|
+
const a = Ee(n, e);
|
|
1690
|
+
return t === "wo" ? r.ordinalNumber(a, { unit: "week" }) : d(a, t.length);
|
|
1318
1691
|
},
|
|
1319
1692
|
// ISO week of year
|
|
1320
|
-
I: function(n,
|
|
1321
|
-
const
|
|
1322
|
-
return
|
|
1693
|
+
I: function(n, t, r) {
|
|
1694
|
+
const e = $e(n);
|
|
1695
|
+
return t === "Io" ? r.ordinalNumber(e, { unit: "week" }) : d(e, t.length);
|
|
1323
1696
|
},
|
|
1324
1697
|
// Day of the month
|
|
1325
|
-
d: function(n,
|
|
1326
|
-
return
|
|
1698
|
+
d: function(n, t, r) {
|
|
1699
|
+
return t === "do" ? r.ordinalNumber(n.getDate(), { unit: "date" }) : T.d(n, t);
|
|
1327
1700
|
},
|
|
1328
1701
|
// Day of year
|
|
1329
|
-
D: function(n,
|
|
1330
|
-
const
|
|
1331
|
-
return
|
|
1702
|
+
D: function(n, t, r) {
|
|
1703
|
+
const e = Cn(n);
|
|
1704
|
+
return t === "Do" ? r.ordinalNumber(e, { unit: "dayOfYear" }) : d(e, t.length);
|
|
1332
1705
|
},
|
|
1333
1706
|
// Day of week
|
|
1334
|
-
E: function(n,
|
|
1335
|
-
const
|
|
1336
|
-
switch (
|
|
1707
|
+
E: function(n, t, r) {
|
|
1708
|
+
const e = n.getDay();
|
|
1709
|
+
switch (t) {
|
|
1337
1710
|
// Tue
|
|
1338
1711
|
case "E":
|
|
1339
1712
|
case "EE":
|
|
1340
1713
|
case "EEE":
|
|
1341
|
-
return r.day(
|
|
1714
|
+
return r.day(e, {
|
|
1342
1715
|
width: "abbreviated",
|
|
1343
1716
|
context: "formatting"
|
|
1344
1717
|
});
|
|
1345
1718
|
// T
|
|
1346
1719
|
case "EEEEE":
|
|
1347
|
-
return r.day(
|
|
1720
|
+
return r.day(e, {
|
|
1348
1721
|
width: "narrow",
|
|
1349
1722
|
context: "formatting"
|
|
1350
1723
|
});
|
|
1351
1724
|
// Tu
|
|
1352
1725
|
case "EEEEEE":
|
|
1353
|
-
return r.day(
|
|
1726
|
+
return r.day(e, {
|
|
1354
1727
|
width: "short",
|
|
1355
1728
|
context: "formatting"
|
|
1356
1729
|
});
|
|
1357
1730
|
default:
|
|
1358
|
-
return r.day(
|
|
1731
|
+
return r.day(e, {
|
|
1359
1732
|
width: "wide",
|
|
1360
1733
|
context: "formatting"
|
|
1361
1734
|
});
|
|
1362
1735
|
}
|
|
1363
1736
|
},
|
|
1364
1737
|
// Local day of week
|
|
1365
|
-
e: function(n,
|
|
1366
|
-
const
|
|
1367
|
-
switch (
|
|
1738
|
+
e: function(n, t, r, e) {
|
|
1739
|
+
const a = n.getDay(), o = (a - e.weekStartsOn + 8) % 7 || 7;
|
|
1740
|
+
switch (t) {
|
|
1368
1741
|
// Numerical value (Nth day of week with current locale or weekStartsOn)
|
|
1369
1742
|
case "e":
|
|
1370
|
-
return String(
|
|
1743
|
+
return String(o);
|
|
1371
1744
|
// Padded numerical value
|
|
1372
1745
|
case "ee":
|
|
1373
|
-
return
|
|
1746
|
+
return d(o, 2);
|
|
1374
1747
|
// 1st, 2nd, ..., 7th
|
|
1375
1748
|
case "eo":
|
|
1376
|
-
return r.ordinalNumber(
|
|
1749
|
+
return r.ordinalNumber(o, { unit: "day" });
|
|
1377
1750
|
case "eee":
|
|
1378
|
-
return r.day(
|
|
1751
|
+
return r.day(a, {
|
|
1379
1752
|
width: "abbreviated",
|
|
1380
1753
|
context: "formatting"
|
|
1381
1754
|
});
|
|
1382
1755
|
// T
|
|
1383
1756
|
case "eeeee":
|
|
1384
|
-
return r.day(
|
|
1757
|
+
return r.day(a, {
|
|
1385
1758
|
width: "narrow",
|
|
1386
1759
|
context: "formatting"
|
|
1387
1760
|
});
|
|
1388
1761
|
// Tu
|
|
1389
1762
|
case "eeeeee":
|
|
1390
|
-
return r.day(
|
|
1763
|
+
return r.day(a, {
|
|
1391
1764
|
width: "short",
|
|
1392
1765
|
context: "formatting"
|
|
1393
1766
|
});
|
|
1394
1767
|
default:
|
|
1395
|
-
return r.day(
|
|
1768
|
+
return r.day(a, {
|
|
1396
1769
|
width: "wide",
|
|
1397
1770
|
context: "formatting"
|
|
1398
1771
|
});
|
|
1399
1772
|
}
|
|
1400
1773
|
},
|
|
1401
1774
|
// Stand-alone local day of week
|
|
1402
|
-
c: function(n,
|
|
1403
|
-
const
|
|
1404
|
-
switch (
|
|
1775
|
+
c: function(n, t, r, e) {
|
|
1776
|
+
const a = n.getDay(), o = (a - e.weekStartsOn + 8) % 7 || 7;
|
|
1777
|
+
switch (t) {
|
|
1405
1778
|
// Numerical value (same as in `e`)
|
|
1406
1779
|
case "c":
|
|
1407
|
-
return String(
|
|
1780
|
+
return String(o);
|
|
1408
1781
|
// Padded numerical value
|
|
1409
1782
|
case "cc":
|
|
1410
|
-
return
|
|
1783
|
+
return d(o, t.length);
|
|
1411
1784
|
// 1st, 2nd, ..., 7th
|
|
1412
1785
|
case "co":
|
|
1413
|
-
return r.ordinalNumber(
|
|
1786
|
+
return r.ordinalNumber(o, { unit: "day" });
|
|
1414
1787
|
case "ccc":
|
|
1415
|
-
return r.day(
|
|
1788
|
+
return r.day(a, {
|
|
1416
1789
|
width: "abbreviated",
|
|
1417
1790
|
context: "standalone"
|
|
1418
1791
|
});
|
|
1419
1792
|
// T
|
|
1420
1793
|
case "ccccc":
|
|
1421
|
-
return r.day(
|
|
1794
|
+
return r.day(a, {
|
|
1422
1795
|
width: "narrow",
|
|
1423
1796
|
context: "standalone"
|
|
1424
1797
|
});
|
|
1425
1798
|
// Tu
|
|
1426
1799
|
case "cccccc":
|
|
1427
|
-
return r.day(
|
|
1800
|
+
return r.day(a, {
|
|
1428
1801
|
width: "short",
|
|
1429
1802
|
context: "standalone"
|
|
1430
1803
|
});
|
|
1431
1804
|
default:
|
|
1432
|
-
return r.day(
|
|
1805
|
+
return r.day(a, {
|
|
1433
1806
|
width: "wide",
|
|
1434
1807
|
context: "standalone"
|
|
1435
1808
|
});
|
|
1436
1809
|
}
|
|
1437
1810
|
},
|
|
1438
1811
|
// ISO day of week
|
|
1439
|
-
i: function(n,
|
|
1440
|
-
const
|
|
1441
|
-
switch (
|
|
1812
|
+
i: function(n, t, r) {
|
|
1813
|
+
const e = n.getDay(), a = e === 0 ? 7 : e;
|
|
1814
|
+
switch (t) {
|
|
1442
1815
|
// 2
|
|
1443
1816
|
case "i":
|
|
1444
|
-
return String(
|
|
1817
|
+
return String(a);
|
|
1445
1818
|
// 02
|
|
1446
1819
|
case "ii":
|
|
1447
|
-
return
|
|
1820
|
+
return d(a, t.length);
|
|
1448
1821
|
// 2nd
|
|
1449
1822
|
case "io":
|
|
1450
|
-
return r.ordinalNumber(
|
|
1823
|
+
return r.ordinalNumber(a, { unit: "day" });
|
|
1451
1824
|
// Tue
|
|
1452
1825
|
case "iii":
|
|
1453
|
-
return r.day(
|
|
1826
|
+
return r.day(e, {
|
|
1454
1827
|
width: "abbreviated",
|
|
1455
1828
|
context: "formatting"
|
|
1456
1829
|
});
|
|
1457
1830
|
// T
|
|
1458
1831
|
case "iiiii":
|
|
1459
|
-
return r.day(
|
|
1832
|
+
return r.day(e, {
|
|
1460
1833
|
width: "narrow",
|
|
1461
1834
|
context: "formatting"
|
|
1462
1835
|
});
|
|
1463
1836
|
// Tu
|
|
1464
1837
|
case "iiiiii":
|
|
1465
|
-
return r.day(
|
|
1838
|
+
return r.day(e, {
|
|
1466
1839
|
width: "short",
|
|
1467
1840
|
context: "formatting"
|
|
1468
1841
|
});
|
|
1469
1842
|
default:
|
|
1470
|
-
return r.day(
|
|
1843
|
+
return r.day(e, {
|
|
1471
1844
|
width: "wide",
|
|
1472
1845
|
context: "formatting"
|
|
1473
1846
|
});
|
|
1474
1847
|
}
|
|
1475
1848
|
},
|
|
1476
1849
|
// AM or PM
|
|
1477
|
-
a: function(n,
|
|
1478
|
-
const
|
|
1479
|
-
switch (
|
|
1850
|
+
a: function(n, t, r) {
|
|
1851
|
+
const e = n.getHours() / 12 >= 1 ? "pm" : "am";
|
|
1852
|
+
switch (t) {
|
|
1480
1853
|
case "a":
|
|
1481
1854
|
case "aa":
|
|
1482
|
-
return r.dayPeriod(
|
|
1855
|
+
return r.dayPeriod(e, {
|
|
1483
1856
|
width: "abbreviated",
|
|
1484
1857
|
context: "formatting"
|
|
1485
1858
|
});
|
|
1486
1859
|
case "aaa":
|
|
1487
|
-
return r.dayPeriod(
|
|
1860
|
+
return r.dayPeriod(e, {
|
|
1488
1861
|
width: "abbreviated",
|
|
1489
1862
|
context: "formatting"
|
|
1490
1863
|
}).toLowerCase();
|
|
1491
1864
|
case "aaaaa":
|
|
1492
|
-
return r.dayPeriod(
|
|
1865
|
+
return r.dayPeriod(e, {
|
|
1493
1866
|
width: "narrow",
|
|
1494
1867
|
context: "formatting"
|
|
1495
1868
|
});
|
|
1496
1869
|
default:
|
|
1497
|
-
return r.dayPeriod(
|
|
1870
|
+
return r.dayPeriod(e, {
|
|
1498
1871
|
width: "wide",
|
|
1499
1872
|
context: "formatting"
|
|
1500
1873
|
});
|
|
1501
1874
|
}
|
|
1502
1875
|
},
|
|
1503
1876
|
// AM, PM, midnight, noon
|
|
1504
|
-
b: function(n,
|
|
1505
|
-
const
|
|
1506
|
-
let
|
|
1507
|
-
switch (
|
|
1877
|
+
b: function(n, t, r) {
|
|
1878
|
+
const e = n.getHours();
|
|
1879
|
+
let a;
|
|
1880
|
+
switch (e === 12 ? a = Y.noon : e === 0 ? a = Y.midnight : a = e / 12 >= 1 ? "pm" : "am", t) {
|
|
1508
1881
|
case "b":
|
|
1509
1882
|
case "bb":
|
|
1510
|
-
return r.dayPeriod(
|
|
1883
|
+
return r.dayPeriod(a, {
|
|
1511
1884
|
width: "abbreviated",
|
|
1512
1885
|
context: "formatting"
|
|
1513
1886
|
});
|
|
1514
1887
|
case "bbb":
|
|
1515
|
-
return r.dayPeriod(
|
|
1888
|
+
return r.dayPeriod(a, {
|
|
1516
1889
|
width: "abbreviated",
|
|
1517
1890
|
context: "formatting"
|
|
1518
1891
|
}).toLowerCase();
|
|
1519
1892
|
case "bbbbb":
|
|
1520
|
-
return r.dayPeriod(
|
|
1893
|
+
return r.dayPeriod(a, {
|
|
1521
1894
|
width: "narrow",
|
|
1522
1895
|
context: "formatting"
|
|
1523
1896
|
});
|
|
1524
1897
|
default:
|
|
1525
|
-
return r.dayPeriod(
|
|
1898
|
+
return r.dayPeriod(a, {
|
|
1526
1899
|
width: "wide",
|
|
1527
1900
|
context: "formatting"
|
|
1528
1901
|
});
|
|
1529
1902
|
}
|
|
1530
1903
|
},
|
|
1531
1904
|
// in the morning, in the afternoon, in the evening, at night
|
|
1532
|
-
B: function(n,
|
|
1533
|
-
const
|
|
1534
|
-
let
|
|
1535
|
-
switch (
|
|
1905
|
+
B: function(n, t, r) {
|
|
1906
|
+
const e = n.getHours();
|
|
1907
|
+
let a;
|
|
1908
|
+
switch (e >= 17 ? a = Y.evening : e >= 12 ? a = Y.afternoon : e >= 4 ? a = Y.morning : a = Y.night, t) {
|
|
1536
1909
|
case "B":
|
|
1537
1910
|
case "BB":
|
|
1538
1911
|
case "BBB":
|
|
1539
|
-
return r.dayPeriod(
|
|
1912
|
+
return r.dayPeriod(a, {
|
|
1540
1913
|
width: "abbreviated",
|
|
1541
1914
|
context: "formatting"
|
|
1542
1915
|
});
|
|
1543
1916
|
case "BBBBB":
|
|
1544
|
-
return r.dayPeriod(
|
|
1917
|
+
return r.dayPeriod(a, {
|
|
1545
1918
|
width: "narrow",
|
|
1546
1919
|
context: "formatting"
|
|
1547
1920
|
});
|
|
1548
1921
|
default:
|
|
1549
|
-
return r.dayPeriod(
|
|
1922
|
+
return r.dayPeriod(a, {
|
|
1550
1923
|
width: "wide",
|
|
1551
1924
|
context: "formatting"
|
|
1552
1925
|
});
|
|
1553
1926
|
}
|
|
1554
1927
|
},
|
|
1555
1928
|
// Hour [1-12]
|
|
1556
|
-
h: function(n,
|
|
1557
|
-
if (
|
|
1558
|
-
let
|
|
1559
|
-
return
|
|
1929
|
+
h: function(n, t, r) {
|
|
1930
|
+
if (t === "ho") {
|
|
1931
|
+
let e = n.getHours() % 12;
|
|
1932
|
+
return e === 0 && (e = 12), r.ordinalNumber(e, { unit: "hour" });
|
|
1560
1933
|
}
|
|
1561
|
-
return
|
|
1934
|
+
return T.h(n, t);
|
|
1562
1935
|
},
|
|
1563
1936
|
// Hour [0-23]
|
|
1564
|
-
H: function(n,
|
|
1565
|
-
return
|
|
1937
|
+
H: function(n, t, r) {
|
|
1938
|
+
return t === "Ho" ? r.ordinalNumber(n.getHours(), { unit: "hour" }) : T.H(n, t);
|
|
1566
1939
|
},
|
|
1567
1940
|
// Hour [0-11]
|
|
1568
|
-
K: function(n,
|
|
1569
|
-
const
|
|
1570
|
-
return
|
|
1941
|
+
K: function(n, t, r) {
|
|
1942
|
+
const e = n.getHours() % 12;
|
|
1943
|
+
return t === "Ko" ? r.ordinalNumber(e, { unit: "hour" }) : d(e, t.length);
|
|
1571
1944
|
},
|
|
1572
1945
|
// Hour [1-24]
|
|
1573
|
-
k: function(n,
|
|
1574
|
-
let
|
|
1575
|
-
return
|
|
1946
|
+
k: function(n, t, r) {
|
|
1947
|
+
let e = n.getHours();
|
|
1948
|
+
return e === 0 && (e = 24), t === "ko" ? r.ordinalNumber(e, { unit: "hour" }) : d(e, t.length);
|
|
1576
1949
|
},
|
|
1577
1950
|
// Minute
|
|
1578
|
-
m: function(n,
|
|
1579
|
-
return
|
|
1951
|
+
m: function(n, t, r) {
|
|
1952
|
+
return t === "mo" ? r.ordinalNumber(n.getMinutes(), { unit: "minute" }) : T.m(n, t);
|
|
1580
1953
|
},
|
|
1581
1954
|
// Second
|
|
1582
|
-
s: function(n,
|
|
1583
|
-
return
|
|
1955
|
+
s: function(n, t, r) {
|
|
1956
|
+
return t === "so" ? r.ordinalNumber(n.getSeconds(), { unit: "second" }) : T.s(n, t);
|
|
1584
1957
|
},
|
|
1585
1958
|
// Fraction of second
|
|
1586
|
-
S: function(n,
|
|
1587
|
-
return
|
|
1959
|
+
S: function(n, t) {
|
|
1960
|
+
return T.S(n, t);
|
|
1588
1961
|
},
|
|
1589
1962
|
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
1590
|
-
X: function(n,
|
|
1591
|
-
const
|
|
1592
|
-
if (
|
|
1963
|
+
X: function(n, t, r) {
|
|
1964
|
+
const e = n.getTimezoneOffset();
|
|
1965
|
+
if (e === 0)
|
|
1593
1966
|
return "Z";
|
|
1594
|
-
switch (
|
|
1967
|
+
switch (t) {
|
|
1595
1968
|
// Hours and optional minutes
|
|
1596
1969
|
case "X":
|
|
1597
|
-
return
|
|
1970
|
+
return ve(e);
|
|
1598
1971
|
// Hours, minutes and optional seconds without `:` delimiter
|
|
1599
1972
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
1600
1973
|
// so this token always has the same output as `XX`
|
|
1601
1974
|
case "XXXX":
|
|
1602
1975
|
case "XX":
|
|
1603
|
-
return
|
|
1976
|
+
return P(e);
|
|
1604
1977
|
// Hours and minutes with `:` delimiter
|
|
1605
1978
|
default:
|
|
1606
|
-
return
|
|
1979
|
+
return P(e, ":");
|
|
1607
1980
|
}
|
|
1608
1981
|
},
|
|
1609
1982
|
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
1610
|
-
x: function(n,
|
|
1611
|
-
const
|
|
1612
|
-
switch (
|
|
1983
|
+
x: function(n, t, r) {
|
|
1984
|
+
const e = n.getTimezoneOffset();
|
|
1985
|
+
switch (t) {
|
|
1613
1986
|
// Hours and optional minutes
|
|
1614
1987
|
case "x":
|
|
1615
|
-
return
|
|
1988
|
+
return ve(e);
|
|
1616
1989
|
// Hours, minutes and optional seconds without `:` delimiter
|
|
1617
1990
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
1618
1991
|
// so this token always has the same output as `xx`
|
|
1619
1992
|
case "xxxx":
|
|
1620
1993
|
case "xx":
|
|
1621
|
-
return
|
|
1994
|
+
return P(e);
|
|
1622
1995
|
// Hours and minutes with `:` delimiter
|
|
1623
1996
|
default:
|
|
1624
|
-
return
|
|
1997
|
+
return P(e, ":");
|
|
1625
1998
|
}
|
|
1626
1999
|
},
|
|
1627
2000
|
// Timezone (GMT)
|
|
1628
|
-
O: function(n,
|
|
1629
|
-
const
|
|
1630
|
-
switch (
|
|
2001
|
+
O: function(n, t, r) {
|
|
2002
|
+
const e = n.getTimezoneOffset();
|
|
2003
|
+
switch (t) {
|
|
1631
2004
|
// Short
|
|
1632
2005
|
case "O":
|
|
1633
2006
|
case "OO":
|
|
1634
2007
|
case "OOO":
|
|
1635
|
-
return "GMT" +
|
|
2008
|
+
return "GMT" + we(e, ":");
|
|
1636
2009
|
default:
|
|
1637
|
-
return "GMT" +
|
|
2010
|
+
return "GMT" + P(e, ":");
|
|
1638
2011
|
}
|
|
1639
2012
|
},
|
|
1640
2013
|
// Timezone (specific non-location)
|
|
1641
|
-
z: function(n,
|
|
1642
|
-
const
|
|
1643
|
-
switch (
|
|
2014
|
+
z: function(n, t, r) {
|
|
2015
|
+
const e = n.getTimezoneOffset();
|
|
2016
|
+
switch (t) {
|
|
1644
2017
|
// Short
|
|
1645
2018
|
case "z":
|
|
1646
2019
|
case "zz":
|
|
1647
2020
|
case "zzz":
|
|
1648
|
-
return "GMT" +
|
|
2021
|
+
return "GMT" + we(e, ":");
|
|
1649
2022
|
default:
|
|
1650
|
-
return "GMT" +
|
|
2023
|
+
return "GMT" + P(e, ":");
|
|
1651
2024
|
}
|
|
1652
2025
|
},
|
|
1653
2026
|
// Seconds timestamp
|
|
1654
|
-
t: function(n,
|
|
1655
|
-
const
|
|
1656
|
-
return
|
|
2027
|
+
t: function(n, t, r) {
|
|
2028
|
+
const e = Math.trunc(+n / 1e3);
|
|
2029
|
+
return d(e, t.length);
|
|
1657
2030
|
},
|
|
1658
2031
|
// Milliseconds timestamp
|
|
1659
|
-
T: function(n,
|
|
1660
|
-
return
|
|
2032
|
+
T: function(n, t, r) {
|
|
2033
|
+
return d(+n, t.length);
|
|
1661
2034
|
}
|
|
1662
2035
|
};
|
|
1663
|
-
function
|
|
1664
|
-
const r = n > 0 ? "-" : "+",
|
|
1665
|
-
return
|
|
2036
|
+
function we(n, t = "") {
|
|
2037
|
+
const r = n > 0 ? "-" : "+", e = Math.abs(n), a = Math.trunc(e / 60), o = e % 60;
|
|
2038
|
+
return o === 0 ? r + String(a) : r + String(a) + t + d(o, 2);
|
|
1666
2039
|
}
|
|
1667
|
-
function
|
|
1668
|
-
return n % 60 === 0 ? (n > 0 ? "-" : "+") +
|
|
2040
|
+
function ve(n, t) {
|
|
2041
|
+
return n % 60 === 0 ? (n > 0 ? "-" : "+") + d(Math.abs(n) / 60, 2) : P(n, t);
|
|
1669
2042
|
}
|
|
1670
|
-
function
|
|
1671
|
-
const r = n > 0 ? "-" : "+",
|
|
1672
|
-
return r +
|
|
2043
|
+
function P(n, t = "") {
|
|
2044
|
+
const r = n > 0 ? "-" : "+", e = Math.abs(n), a = d(Math.trunc(e / 60), 2), o = d(e % 60, 2);
|
|
2045
|
+
return r + a + t + o;
|
|
1673
2046
|
}
|
|
1674
|
-
const
|
|
2047
|
+
const Me = (n, t) => {
|
|
1675
2048
|
switch (n) {
|
|
1676
2049
|
case "P":
|
|
1677
|
-
return
|
|
2050
|
+
return t.date({ width: "short" });
|
|
1678
2051
|
case "PP":
|
|
1679
|
-
return
|
|
2052
|
+
return t.date({ width: "medium" });
|
|
1680
2053
|
case "PPP":
|
|
1681
|
-
return
|
|
2054
|
+
return t.date({ width: "long" });
|
|
1682
2055
|
default:
|
|
1683
|
-
return
|
|
2056
|
+
return t.date({ width: "full" });
|
|
1684
2057
|
}
|
|
1685
|
-
},
|
|
2058
|
+
}, Le = (n, t) => {
|
|
1686
2059
|
switch (n) {
|
|
1687
2060
|
case "p":
|
|
1688
|
-
return
|
|
2061
|
+
return t.time({ width: "short" });
|
|
1689
2062
|
case "pp":
|
|
1690
|
-
return
|
|
2063
|
+
return t.time({ width: "medium" });
|
|
1691
2064
|
case "ppp":
|
|
1692
|
-
return
|
|
2065
|
+
return t.time({ width: "long" });
|
|
1693
2066
|
default:
|
|
1694
|
-
return
|
|
2067
|
+
return t.time({ width: "full" });
|
|
1695
2068
|
}
|
|
1696
|
-
},
|
|
1697
|
-
const r = n.match(/(P+)(p+)?/) || [],
|
|
1698
|
-
if (!
|
|
1699
|
-
return
|
|
1700
|
-
let
|
|
1701
|
-
switch (
|
|
2069
|
+
}, Fn = (n, t) => {
|
|
2070
|
+
const r = n.match(/(P+)(p+)?/) || [], e = r[1], a = r[2];
|
|
2071
|
+
if (!a)
|
|
2072
|
+
return Me(n, t);
|
|
2073
|
+
let o;
|
|
2074
|
+
switch (e) {
|
|
1702
2075
|
case "P":
|
|
1703
|
-
|
|
2076
|
+
o = t.dateTime({ width: "short" });
|
|
1704
2077
|
break;
|
|
1705
2078
|
case "PP":
|
|
1706
|
-
|
|
2079
|
+
o = t.dateTime({ width: "medium" });
|
|
1707
2080
|
break;
|
|
1708
2081
|
case "PPP":
|
|
1709
|
-
|
|
2082
|
+
o = t.dateTime({ width: "long" });
|
|
1710
2083
|
break;
|
|
1711
2084
|
default:
|
|
1712
|
-
|
|
2085
|
+
o = t.dateTime({ width: "full" });
|
|
1713
2086
|
break;
|
|
1714
2087
|
}
|
|
1715
|
-
return
|
|
1716
|
-
},
|
|
1717
|
-
p:
|
|
1718
|
-
P:
|
|
1719
|
-
},
|
|
1720
|
-
function
|
|
1721
|
-
return
|
|
1722
|
-
}
|
|
1723
|
-
function
|
|
1724
|
-
return
|
|
1725
|
-
}
|
|
1726
|
-
function
|
|
1727
|
-
const
|
|
1728
|
-
if (console.warn(
|
|
1729
|
-
}
|
|
1730
|
-
function
|
|
1731
|
-
const
|
|
1732
|
-
return `Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${
|
|
1733
|
-
}
|
|
1734
|
-
const
|
|
1735
|
-
function
|
|
1736
|
-
const
|
|
1737
|
-
if (!
|
|
2088
|
+
return o.replace("{{date}}", Me(e, t)).replace("{{time}}", Le(a, t));
|
|
2089
|
+
}, Hn = {
|
|
2090
|
+
p: Le,
|
|
2091
|
+
P: Fn
|
|
2092
|
+
}, $n = /^D+$/, zn = /^Y+$/, En = ["D", "DD", "YY", "YYYY"];
|
|
2093
|
+
function Ln(n) {
|
|
2094
|
+
return $n.test(n);
|
|
2095
|
+
}
|
|
2096
|
+
function qn(n) {
|
|
2097
|
+
return zn.test(n);
|
|
2098
|
+
}
|
|
2099
|
+
function Un(n, t, r) {
|
|
2100
|
+
const e = In(n, t, r);
|
|
2101
|
+
if (console.warn(e), En.includes(n)) throw new RangeError(e);
|
|
2102
|
+
}
|
|
2103
|
+
function In(n, t, r) {
|
|
2104
|
+
const e = n[0] === "Y" ? "years" : "days of the month";
|
|
2105
|
+
return `Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${t}\`) for formatting ${e} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
|
|
2106
|
+
}
|
|
2107
|
+
const _n = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, An = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Zn = /^'([^]*?)'?$/, Bn = /''/g, Xn = /[a-zA-Z]/;
|
|
2108
|
+
function I(n, t, r) {
|
|
2109
|
+
const e = Z(), a = r?.locale ?? e.locale ?? F, o = r?.firstWeekContainsDate ?? r?.locale?.options?.firstWeekContainsDate ?? e.firstWeekContainsDate ?? e.locale?.options?.firstWeekContainsDate ?? 1, s = r?.weekStartsOn ?? r?.locale?.options?.weekStartsOn ?? e.weekStartsOn ?? e.locale?.options?.weekStartsOn ?? 0, u = l(n, r?.in);
|
|
2110
|
+
if (!Dn(u))
|
|
1738
2111
|
throw new RangeError("Invalid time value");
|
|
1739
|
-
let h =
|
|
1740
|
-
const
|
|
1741
|
-
if (
|
|
1742
|
-
const M =
|
|
1743
|
-
return M(
|
|
2112
|
+
let h = t.match(An).map((f) => {
|
|
2113
|
+
const m = f[0];
|
|
2114
|
+
if (m === "p" || m === "P") {
|
|
2115
|
+
const M = Hn[m];
|
|
2116
|
+
return M(f, a.formatLong);
|
|
1744
2117
|
}
|
|
1745
|
-
return
|
|
1746
|
-
}).join("").match(
|
|
1747
|
-
if (
|
|
2118
|
+
return f;
|
|
2119
|
+
}).join("").match(_n).map((f) => {
|
|
2120
|
+
if (f === "''")
|
|
1748
2121
|
return { isToken: !1, value: "'" };
|
|
1749
|
-
const
|
|
1750
|
-
if (
|
|
1751
|
-
return { isToken: !1, value:
|
|
1752
|
-
if (
|
|
1753
|
-
return { isToken: !0, value:
|
|
1754
|
-
if (
|
|
2122
|
+
const m = f[0];
|
|
2123
|
+
if (m === "'")
|
|
2124
|
+
return { isToken: !1, value: Rn(f) };
|
|
2125
|
+
if (be[m])
|
|
2126
|
+
return { isToken: !0, value: f };
|
|
2127
|
+
if (m.match(Xn))
|
|
1755
2128
|
throw new RangeError(
|
|
1756
|
-
"Format string contains an unescaped latin alphabet character `" +
|
|
2129
|
+
"Format string contains an unescaped latin alphabet character `" + m + "`"
|
|
1757
2130
|
);
|
|
1758
|
-
return { isToken: !1, value:
|
|
2131
|
+
return { isToken: !1, value: f };
|
|
1759
2132
|
});
|
|
1760
|
-
|
|
2133
|
+
a.localize.preprocessor && (h = a.localize.preprocessor(u, h));
|
|
1761
2134
|
const v = {
|
|
1762
|
-
firstWeekContainsDate:
|
|
2135
|
+
firstWeekContainsDate: o,
|
|
1763
2136
|
weekStartsOn: s,
|
|
1764
|
-
locale:
|
|
2137
|
+
locale: a
|
|
1765
2138
|
};
|
|
1766
|
-
return h.map((
|
|
1767
|
-
if (!
|
|
1768
|
-
const
|
|
1769
|
-
(!r?.useAdditionalWeekYearTokens &&
|
|
1770
|
-
const M =
|
|
1771
|
-
return M(u,
|
|
2139
|
+
return h.map((f) => {
|
|
2140
|
+
if (!f.isToken) return f.value;
|
|
2141
|
+
const m = f.value;
|
|
2142
|
+
(!r?.useAdditionalWeekYearTokens && qn(m) || !r?.useAdditionalDayOfYearTokens && Ln(m)) && Un(m, t, String(n));
|
|
2143
|
+
const M = be[m[0]];
|
|
2144
|
+
return M(u, m, a.localize, v);
|
|
1772
2145
|
}).join("");
|
|
1773
2146
|
}
|
|
1774
|
-
function
|
|
1775
|
-
const
|
|
1776
|
-
return
|
|
2147
|
+
function Rn(n) {
|
|
2148
|
+
const t = n.match(Zn);
|
|
2149
|
+
return t ? t[1].replace(Bn, "'") : n;
|
|
1777
2150
|
}
|
|
1778
|
-
function
|
|
1779
|
-
const r =
|
|
1780
|
-
return
|
|
2151
|
+
function Gn(n, t) {
|
|
2152
|
+
const r = l(n, t?.in), e = r.getFullYear(), a = r.getMonth(), o = p(r, 0);
|
|
2153
|
+
return o.setFullYear(e, a + 1, 0), o.setHours(0, 0, 0, 0), o.getDate();
|
|
1781
2154
|
}
|
|
1782
|
-
function
|
|
1783
|
-
return
|
|
2155
|
+
function Qn(n, t) {
|
|
2156
|
+
return l(n, t?.in).getMonth();
|
|
1784
2157
|
}
|
|
1785
|
-
function
|
|
1786
|
-
return
|
|
2158
|
+
function Jn(n, t) {
|
|
2159
|
+
return l(n, t?.in).getFullYear();
|
|
1787
2160
|
}
|
|
1788
|
-
function
|
|
1789
|
-
return +
|
|
2161
|
+
function Vn(n, t) {
|
|
2162
|
+
return +l(n) > +l(t);
|
|
1790
2163
|
}
|
|
1791
|
-
function
|
|
1792
|
-
return +
|
|
2164
|
+
function Kn(n, t) {
|
|
2165
|
+
return +l(n) < +l(t);
|
|
1793
2166
|
}
|
|
1794
|
-
function
|
|
1795
|
-
const [
|
|
2167
|
+
function er(n, t, r) {
|
|
2168
|
+
const [e, a] = z(
|
|
1796
2169
|
r?.in,
|
|
1797
2170
|
n,
|
|
1798
|
-
|
|
2171
|
+
t
|
|
1799
2172
|
);
|
|
1800
|
-
return
|
|
2173
|
+
return e.getFullYear() === a.getFullYear() && e.getMonth() === a.getMonth();
|
|
1801
2174
|
}
|
|
1802
|
-
function
|
|
1803
|
-
const [
|
|
2175
|
+
function tr(n, t, r) {
|
|
2176
|
+
const [e, a] = z(
|
|
1804
2177
|
r?.in,
|
|
1805
2178
|
n,
|
|
1806
|
-
|
|
2179
|
+
t
|
|
1807
2180
|
);
|
|
1808
|
-
return
|
|
2181
|
+
return e.getFullYear() === a.getFullYear();
|
|
1809
2182
|
}
|
|
1810
|
-
function
|
|
1811
|
-
const
|
|
1812
|
-
s.setFullYear(
|
|
1813
|
-
const u =
|
|
1814
|
-
return
|
|
2183
|
+
function nr(n, t, r) {
|
|
2184
|
+
const e = l(n, r?.in), a = e.getFullYear(), o = e.getDate(), s = p(n, 0);
|
|
2185
|
+
s.setFullYear(a, t, 15), s.setHours(0, 0, 0, 0);
|
|
2186
|
+
const u = Gn(s);
|
|
2187
|
+
return e.setMonth(t, Math.min(o, u)), e;
|
|
1815
2188
|
}
|
|
1816
|
-
function
|
|
1817
|
-
const
|
|
1818
|
-
return isNaN(+
|
|
2189
|
+
function rr(n, t, r) {
|
|
2190
|
+
const e = l(n, r?.in);
|
|
2191
|
+
return isNaN(+e) ? p(n, NaN) : (e.setFullYear(t), e);
|
|
1819
2192
|
}
|
|
1820
|
-
const
|
|
1821
|
-
function
|
|
1822
|
-
const r =
|
|
1823
|
-
return
|
|
2193
|
+
const Se = 5, ar = 4;
|
|
2194
|
+
function or(n, t) {
|
|
2195
|
+
const r = t.startOfMonth(n), e = r.getDay() > 0 ? r.getDay() : 7, a = t.addDays(n, -e + 1), o = t.addDays(a, Se * 7 - 1);
|
|
2196
|
+
return t.getMonth(n) === t.getMonth(o) ? Se : ar;
|
|
1824
2197
|
}
|
|
1825
|
-
function
|
|
1826
|
-
const r =
|
|
1827
|
-
return
|
|
2198
|
+
function qe(n, t) {
|
|
2199
|
+
const r = t.startOfMonth(n), e = r.getDay();
|
|
2200
|
+
return e === 1 ? r : e === 0 ? t.addDays(r, -6) : t.addDays(r, -1 * (e - 1));
|
|
1828
2201
|
}
|
|
1829
|
-
function
|
|
1830
|
-
const r =
|
|
1831
|
-
return
|
|
2202
|
+
function ir(n, t) {
|
|
2203
|
+
const r = qe(n, t), e = or(n, t);
|
|
2204
|
+
return t.addDays(r, e * 7 - 1);
|
|
1832
2205
|
}
|
|
1833
|
-
const
|
|
1834
|
-
...
|
|
2206
|
+
const sr = {
|
|
2207
|
+
...F,
|
|
1835
2208
|
labels: {
|
|
1836
|
-
labelDayButton: (n,
|
|
1837
|
-
let
|
|
1838
|
-
|
|
1839
|
-
let
|
|
1840
|
-
return
|
|
2209
|
+
labelDayButton: (n, t, r, e) => {
|
|
2210
|
+
let a;
|
|
2211
|
+
e && typeof e.format == "function" ? a = e.format.bind(e) : a = (s, u) => I(s, u, { locale: F, ...r });
|
|
2212
|
+
let o = a(n, "PPPP");
|
|
2213
|
+
return t.today && (o = `Today, ${o}`), t.selected && (o = `${o}, selected`), o;
|
|
1841
2214
|
},
|
|
1842
2215
|
labelMonthDropdown: "Choose the Month",
|
|
1843
2216
|
labelNext: "Go to the Next Month",
|
|
1844
2217
|
labelPrevious: "Go to the Previous Month",
|
|
1845
2218
|
labelWeekNumber: (n) => `Week ${n}`,
|
|
1846
2219
|
labelYearDropdown: "Choose the Year",
|
|
1847
|
-
labelGrid: (n,
|
|
1848
|
-
let
|
|
1849
|
-
return r && typeof r.format == "function" ?
|
|
2220
|
+
labelGrid: (n, t, r) => {
|
|
2221
|
+
let e;
|
|
2222
|
+
return r && typeof r.format == "function" ? e = r.format.bind(r) : e = (a, o) => I(a, o, { locale: F, ...t }), e(n, "LLLL yyyy");
|
|
1850
2223
|
},
|
|
1851
|
-
labelGridcell: (n,
|
|
1852
|
-
let
|
|
1853
|
-
|
|
1854
|
-
let
|
|
1855
|
-
return
|
|
2224
|
+
labelGridcell: (n, t, r, e) => {
|
|
2225
|
+
let a;
|
|
2226
|
+
e && typeof e.format == "function" ? a = e.format.bind(e) : a = (s, u) => I(s, u, { locale: F, ...r });
|
|
2227
|
+
let o = a(n, "PPPP");
|
|
2228
|
+
return t?.today && (o = `Today, ${o}`), o;
|
|
1856
2229
|
},
|
|
1857
2230
|
labelNav: "Navigation bar",
|
|
1858
2231
|
labelWeekNumberHeader: "Week Number",
|
|
1859
|
-
labelWeekday: (n,
|
|
1860
|
-
let
|
|
1861
|
-
return r && typeof r.format == "function" ?
|
|
2232
|
+
labelWeekday: (n, t, r) => {
|
|
2233
|
+
let e;
|
|
2234
|
+
return r && typeof r.format == "function" ? e = r.format.bind(r) : e = (a, o) => I(a, o, { locale: F, ...t }), e(n, "cccc");
|
|
1862
2235
|
}
|
|
1863
2236
|
}
|
|
1864
2237
|
};
|
|
1865
|
-
class
|
|
2238
|
+
class x {
|
|
1866
2239
|
/**
|
|
1867
2240
|
* Creates an instance of `DateLib`.
|
|
1868
2241
|
*
|
|
1869
2242
|
* @param options Configuration options for the date library.
|
|
1870
2243
|
* @param overrides Custom overrides for the date library functions.
|
|
1871
2244
|
*/
|
|
1872
|
-
constructor(
|
|
1873
|
-
this.Date = Date, this.today = () => this.overrides?.today ? this.overrides.today() : this.options.timeZone ?
|
|
1874
|
-
const
|
|
1875
|
-
if (
|
|
1876
|
-
return
|
|
2245
|
+
constructor(t, r) {
|
|
2246
|
+
this.Date = Date, this.today = () => this.overrides?.today ? this.overrides.today() : this.options.timeZone ? N.tz(this.options.timeZone) : new this.Date(), this.newDate = (e, a, o) => this.overrides?.newDate ? this.overrides.newDate(e, a, o) : this.options.timeZone ? new N(e, a, o, this.options.timeZone) : new Date(e, a, o), this.addDays = (e, a) => this.overrides?.addDays ? this.overrides.addDays(e, a) : Pe(e, a), this.addMonths = (e, a) => this.overrides?.addMonths ? this.overrides.addMonths(e, a) : We(e, a), this.addWeeks = (e, a) => this.overrides?.addWeeks ? this.overrides.addWeeks(e, a) : wn(e, a), this.addYears = (e, a) => this.overrides?.addYears ? this.overrides.addYears(e, a) : vn(e, a), this.differenceInCalendarDays = (e, a) => this.overrides?.differenceInCalendarDays ? this.overrides.differenceInCalendarDays(e, a) : je(e, a), this.differenceInCalendarMonths = (e, a) => this.overrides?.differenceInCalendarMonths ? this.overrides.differenceInCalendarMonths(e, a) : xn(e, a), this.eachMonthOfInterval = (e) => this.overrides?.eachMonthOfInterval ? this.overrides.eachMonthOfInterval(e) : Tn(e), this.eachYearOfInterval = (e) => {
|
|
2247
|
+
const a = this.overrides?.eachYearOfInterval ? this.overrides.eachYearOfInterval(e) : Nn(e), o = new Set(a.map((u) => this.getYear(u)));
|
|
2248
|
+
if (o.size === a.length)
|
|
2249
|
+
return a;
|
|
1877
2250
|
const s = [];
|
|
1878
|
-
return
|
|
2251
|
+
return o.forEach((u) => {
|
|
1879
2252
|
s.push(new Date(u, 0, 1));
|
|
1880
2253
|
}), s;
|
|
1881
|
-
}, this.endOfBroadcastWeek = (
|
|
1882
|
-
const s = this.overrides?.format ? this.overrides.format(
|
|
2254
|
+
}, this.endOfBroadcastWeek = (e) => this.overrides?.endOfBroadcastWeek ? this.overrides.endOfBroadcastWeek(e) : ir(e, this), this.endOfISOWeek = (e) => this.overrides?.endOfISOWeek ? this.overrides.endOfISOWeek(e) : jn(e), this.endOfMonth = (e) => this.overrides?.endOfMonth ? this.overrides.endOfMonth(e) : On(e), this.endOfWeek = (e, a) => this.overrides?.endOfWeek ? this.overrides.endOfWeek(e, a) : He(e, this.options), this.endOfYear = (e) => this.overrides?.endOfYear ? this.overrides.endOfYear(e) : Wn(e), this.format = (e, a, o) => {
|
|
2255
|
+
const s = this.overrides?.format ? this.overrides.format(e, a, this.options) : I(e, a, this.options);
|
|
1883
2256
|
return this.options.numerals && this.options.numerals !== "latn" ? this.replaceDigits(s) : s;
|
|
1884
|
-
}, this.getISOWeek = (
|
|
2257
|
+
}, this.getISOWeek = (e) => this.overrides?.getISOWeek ? this.overrides.getISOWeek(e) : $e(e), this.getMonth = (e, a) => this.overrides?.getMonth ? this.overrides.getMonth(e, this.options) : Qn(e, this.options), this.getYear = (e, a) => this.overrides?.getYear ? this.overrides.getYear(e, this.options) : Jn(e, this.options), this.getWeek = (e, a) => this.overrides?.getWeek ? this.overrides.getWeek(e, this.options) : Ee(e, this.options), this.isAfter = (e, a) => this.overrides?.isAfter ? this.overrides.isAfter(e, a) : Vn(e, a), this.isBefore = (e, a) => this.overrides?.isBefore ? this.overrides.isBefore(e, a) : Kn(e, a), this.isDate = (e) => this.overrides?.isDate ? this.overrides.isDate(e) : Ce(e), this.isSameDay = (e, a) => this.overrides?.isSameDay ? this.overrides.isSameDay(e, a) : kn(e, a), this.isSameMonth = (e, a) => this.overrides?.isSameMonth ? this.overrides.isSameMonth(e, a) : er(e, a), this.isSameYear = (e, a) => this.overrides?.isSameYear ? this.overrides.isSameYear(e, a) : tr(e, a), this.max = (e) => this.overrides?.max ? this.overrides.max(e) : Mn(e), this.min = (e) => this.overrides?.min ? this.overrides.min(e) : Sn(e), this.setMonth = (e, a) => this.overrides?.setMonth ? this.overrides.setMonth(e, a) : nr(e, a), this.setYear = (e, a) => this.overrides?.setYear ? this.overrides.setYear(e, a) : rr(e, a), this.startOfBroadcastWeek = (e, a) => this.overrides?.startOfBroadcastWeek ? this.overrides.startOfBroadcastWeek(e, this) : qe(e, this), this.startOfDay = (e) => this.overrides?.startOfDay ? this.overrides.startOfDay(e) : A(e), this.startOfISOWeek = (e) => this.overrides?.startOfISOWeek ? this.overrides.startOfISOWeek(e) : _(e), this.startOfMonth = (e) => this.overrides?.startOfMonth ? this.overrides.startOfMonth(e) : Pn(e), this.startOfWeek = (e, a) => this.overrides?.startOfWeek ? this.overrides.startOfWeek(e, this.options) : $(e, this.options), this.startOfYear = (e) => this.overrides?.startOfYear ? this.overrides.startOfYear(e) : Fe(e), this.options = { locale: sr, ...t }, this.overrides = r;
|
|
1885
2258
|
}
|
|
1886
2259
|
/**
|
|
1887
2260
|
* Generates a mapping of Arabic digits (0-9) to the target numbering system
|
|
@@ -1891,12 +2264,12 @@ class Z {
|
|
|
1891
2264
|
* @returns A record mapping Arabic digits to the target numerals.
|
|
1892
2265
|
*/
|
|
1893
2266
|
getDigitMap() {
|
|
1894
|
-
const { numerals:
|
|
1895
|
-
numberingSystem:
|
|
1896
|
-
}),
|
|
1897
|
-
for (let
|
|
1898
|
-
|
|
1899
|
-
return
|
|
2267
|
+
const { numerals: t = "latn" } = this.options, r = new Intl.NumberFormat("en-US", {
|
|
2268
|
+
numberingSystem: t
|
|
2269
|
+
}), e = {};
|
|
2270
|
+
for (let a = 0; a < 10; a++)
|
|
2271
|
+
e[a.toString()] = r.format(a);
|
|
2272
|
+
return e;
|
|
1900
2273
|
}
|
|
1901
2274
|
/**
|
|
1902
2275
|
* Replaces Arabic digits in a string with the target numbering system digits.
|
|
@@ -1905,9 +2278,9 @@ class Z {
|
|
|
1905
2278
|
* @param input The string containing Arabic digits.
|
|
1906
2279
|
* @returns The string with digits replaced.
|
|
1907
2280
|
*/
|
|
1908
|
-
replaceDigits(
|
|
2281
|
+
replaceDigits(t) {
|
|
1909
2282
|
const r = this.getDigitMap();
|
|
1910
|
-
return
|
|
2283
|
+
return t.replace(/\d/g, (e) => r[e] || e);
|
|
1911
2284
|
}
|
|
1912
2285
|
/**
|
|
1913
2286
|
* Formats a number using the configured numbering system.
|
|
@@ -1916,39 +2289,39 @@ class Z {
|
|
|
1916
2289
|
* @param value The number to format.
|
|
1917
2290
|
* @returns The formatted number as a string.
|
|
1918
2291
|
*/
|
|
1919
|
-
formatNumber(
|
|
1920
|
-
return this.replaceDigits(
|
|
2292
|
+
formatNumber(t) {
|
|
2293
|
+
return this.replaceDigits(t.toString());
|
|
1921
2294
|
}
|
|
1922
2295
|
/**
|
|
1923
2296
|
* Returns the preferred ordering for month and year labels for the current
|
|
1924
2297
|
* locale.
|
|
1925
2298
|
*/
|
|
1926
2299
|
getMonthYearOrder() {
|
|
1927
|
-
const
|
|
1928
|
-
return
|
|
2300
|
+
const t = this.options.locale?.code;
|
|
2301
|
+
return t && x.yearFirstLocales.has(t) ? "year-first" : "month-first";
|
|
1929
2302
|
}
|
|
1930
2303
|
/**
|
|
1931
2304
|
* Formats the month/year pair respecting locale conventions.
|
|
1932
2305
|
*
|
|
1933
2306
|
* @since 9.11.0
|
|
1934
2307
|
*/
|
|
1935
|
-
formatMonthYear(
|
|
1936
|
-
const { locale: r, timeZone:
|
|
1937
|
-
if (
|
|
2308
|
+
formatMonthYear(t) {
|
|
2309
|
+
const { locale: r, timeZone: e, numerals: a } = this.options, o = r?.code;
|
|
2310
|
+
if (o && x.yearFirstLocales.has(o))
|
|
1938
2311
|
try {
|
|
1939
|
-
return new Intl.DateTimeFormat(
|
|
2312
|
+
return new Intl.DateTimeFormat(o, {
|
|
1940
2313
|
month: "long",
|
|
1941
2314
|
year: "numeric",
|
|
1942
|
-
timeZone:
|
|
1943
|
-
numberingSystem:
|
|
1944
|
-
}).format(
|
|
2315
|
+
timeZone: e,
|
|
2316
|
+
numberingSystem: a
|
|
2317
|
+
}).format(t);
|
|
1945
2318
|
} catch {
|
|
1946
2319
|
}
|
|
1947
2320
|
const s = this.getMonthYearOrder() === "year-first" ? "y LLLL" : "LLLL y";
|
|
1948
|
-
return this.format(
|
|
2321
|
+
return this.format(t, s);
|
|
1949
2322
|
}
|
|
1950
2323
|
}
|
|
1951
|
-
|
|
2324
|
+
x.yearFirstLocales = /* @__PURE__ */ new Set([
|
|
1952
2325
|
"eu",
|
|
1953
2326
|
"hu",
|
|
1954
2327
|
"ja",
|
|
@@ -1967,21 +2340,43 @@ Z.yearFirstLocales = /* @__PURE__ */ new Set([
|
|
|
1967
2340
|
"zh-HK",
|
|
1968
2341
|
"zh-TW"
|
|
1969
2342
|
]);
|
|
1970
|
-
new
|
|
1971
|
-
|
|
1972
|
-
|
|
2343
|
+
new x();
|
|
2344
|
+
const ur = {
|
|
2345
|
+
...mn,
|
|
2346
|
+
labels: {
|
|
2347
|
+
labelDayButton: (n, t, r, e) => {
|
|
2348
|
+
let a = (e ?? new x(r)).format(n, "PPPP");
|
|
2349
|
+
return t.today && (a = `Hoje, ${a}`), t.selected && (a = `${a}, selecionado`), a;
|
|
2350
|
+
},
|
|
2351
|
+
labelMonthDropdown: "Escolha o mês",
|
|
2352
|
+
labelNext: "Ir para o próximo mês",
|
|
2353
|
+
labelPrevious: "Ir para o mês anterior",
|
|
2354
|
+
labelWeekNumber: (n) => `Semana ${n}`,
|
|
2355
|
+
labelYearDropdown: "Escolha o ano",
|
|
2356
|
+
labelGrid: (n, t, r) => (r ?? new x(t)).formatMonthYear(n),
|
|
2357
|
+
labelGridcell: (n, t, r, e) => {
|
|
2358
|
+
let a = (e ?? new x(r)).format(n, "PPPP");
|
|
2359
|
+
return t?.today && (a = `Hoje, ${a}`), a;
|
|
2360
|
+
},
|
|
2361
|
+
labelNav: "Barra de navegação",
|
|
2362
|
+
labelWeekNumberHeader: "Número da semana",
|
|
2363
|
+
labelWeekday: (n, t, r) => (r ?? new x(t)).format(n, "cccc")
|
|
2364
|
+
}
|
|
2365
|
+
};
|
|
2366
|
+
De({
|
|
2367
|
+
locale: ur
|
|
1973
2368
|
});
|
|
1974
|
-
function
|
|
1975
|
-
const { user:
|
|
1976
|
-
return
|
|
1977
|
-
|
|
2369
|
+
function mr({ router: n }) {
|
|
2370
|
+
const { user: t, logout: r } = rt();
|
|
2371
|
+
return ke(() => {
|
|
2372
|
+
t.id === "" && n.push("/login");
|
|
1978
2373
|
}), /* @__PURE__ */ w.jsx("div", { className: "h-screen w-screen flex", children: /* @__PURE__ */ w.jsxs("div", { className: "m-auto flex flex-col gap-3", children: [
|
|
1979
2374
|
/* @__PURE__ */ w.jsxs("div", { className: "inline-flex gap-5 items-center", children: [
|
|
1980
2375
|
/* @__PURE__ */ w.jsx("h1", { className: "text-2xl border-r-1 p-4", children: "403" }),
|
|
1981
2376
|
/* @__PURE__ */ w.jsx("h1", { children: "Acesso Negado" })
|
|
1982
2377
|
] }),
|
|
1983
2378
|
/* @__PURE__ */ w.jsx(
|
|
1984
|
-
|
|
2379
|
+
ae,
|
|
1985
2380
|
{
|
|
1986
2381
|
variant: "destructive",
|
|
1987
2382
|
onClick: () => {
|
|
@@ -1992,17 +2387,17 @@ function En({ router: n }) {
|
|
|
1992
2387
|
)
|
|
1993
2388
|
] }) });
|
|
1994
2389
|
}
|
|
1995
|
-
function
|
|
2390
|
+
function fr({ router: n }) {
|
|
1996
2391
|
return /* @__PURE__ */ w.jsx("div", { className: "h-screen w-screen flex", children: /* @__PURE__ */ w.jsxs("div", { className: "m-auto flex flex-col gap-3", children: [
|
|
1997
2392
|
/* @__PURE__ */ w.jsxs("div", { className: "inline-flex gap-5 items-center", children: [
|
|
1998
2393
|
/* @__PURE__ */ w.jsx("h1", { className: "text-2xl border-r-1 p-4", children: "404" }),
|
|
1999
2394
|
/* @__PURE__ */ w.jsx("h1", { children: "Página não encontrada" })
|
|
2000
2395
|
] }),
|
|
2001
|
-
/* @__PURE__ */ w.jsx(
|
|
2396
|
+
/* @__PURE__ */ w.jsx(ae, { onClick: () => n.replace("/"), children: "Voltar ao Início" })
|
|
2002
2397
|
] }) });
|
|
2003
2398
|
}
|
|
2004
2399
|
export {
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2400
|
+
hr as Error,
|
|
2401
|
+
mr as Forbidden,
|
|
2402
|
+
fr as NotFoundPage
|
|
2008
2403
|
};
|