@oneclick.dev/cms-core-modules 0.0.82 → 0.0.84
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/{ContentEditor-Dk-iDEjl.mjs → ContentEditor-DPhhOkx3.mjs} +7085 -5936
- package/dist/{ContentEditor-4e80zFyn.js → ContentEditor-DrxtH_Hq.js} +42 -42
- package/dist/{Create-DtFzwxn_.mjs → Create-6uT9HWar.mjs} +35 -35
- package/dist/{Create-CRn2sMHp.js → Create-DuZ5nZrX.js} +1 -1
- package/dist/{DateFormatter-DfIwyrnF.mjs → DateFormatter-2B0R-DY4.mjs} +213 -406
- package/dist/DateFormatter-DbtOLV0L.js +1 -0
- package/dist/{Detail-Bxi7lG9x.js → Detail-BZ-iE9vf.js} +1 -1
- package/dist/{Detail-B4b_FLDa.mjs → Detail-C1Blq61w.mjs} +90 -90
- package/dist/{Detail-BayNaAg9.js → Detail-C8wQiDcv.js} +1 -1
- package/dist/{Detail-BwDnY42G.mjs → Detail-CJVMJDP7.mjs} +17 -17
- package/dist/{Detail-CnK-qbhE.js → Detail-CPqug27l.js} +1 -1
- package/dist/Detail-CjuhjPby.js +1 -0
- package/dist/{Detail-U0mgLKt6.mjs → Detail-CtItxMX4.mjs} +62 -63
- package/dist/{Detail-CVgWHbMC.mjs → Detail-Dnpnmy4-.mjs} +158 -158
- package/dist/{Entries-D7MHylQE.mjs → Entries-BkOPae4R.mjs} +49 -49
- package/dist/Entries-CcEW98F5.js +1 -0
- package/dist/{NewReservationDialog.vue_vue_type_script_setup_true_lang-Ds7z0qeH.mjs → NewReservationDialog.vue_vue_type_script_setup_true_lang-Bc946oSc.mjs} +1 -1
- package/dist/{NewReservationDialog.vue_vue_type_script_setup_true_lang-C5YczjNb.js → NewReservationDialog.vue_vue_type_script_setup_true_lang-CqERfyYb.js} +1 -1
- package/dist/{Overview-CwCAeBnX.js → Overview-CA8wh_BI.js} +1 -1
- package/dist/{Overview-CgViRnNc.mjs → Overview-D4MFwRI_.mjs} +67 -68
- package/dist/{Overview-pCO_47Zt.js → Overview-Da0XexiT.js} +1 -1
- package/dist/Overview-DeQQ0FY3.js +1 -0
- package/dist/{Overview--XpvBbqz.mjs → Overview-DoOASlNz.mjs} +1 -3
- package/dist/{Overview-CuCQgqVp.mjs → Overview-gJSvftdE.mjs} +34 -34
- package/dist/{ReservationDetailDialog.vue_vue_type_script_setup_true_lang-B7ks5mbf.mjs → ReservationDetailDialog.vue_vue_type_script_setup_true_lang-Cohhnd5x.mjs} +0 -1
- package/dist/{ReservationDetailDialog.vue_vue_type_script_setup_true_lang-Vxubki_v.js → ReservationDetailDialog.vue_vue_type_script_setup_true_lang-VWVIxIr6.js} +1 -1
- package/dist/{SeoHealth-CC0rW1AG.mjs → SeoHealth-Bc5chnaa.mjs} +14 -14
- package/dist/{SeoHealth-EZzDmPDM.js → SeoHealth-BkpJ1F2Y.js} +1 -1
- package/dist/TableView-BPWAx--G.mjs +5743 -0
- package/dist/TableView-D63QrVlK.js +4 -0
- package/dist/View-BL70u98U.js +1 -0
- package/dist/{View-DDXN0tKD.mjs → View-BO5N911y.mjs} +5 -5
- package/dist/{agenda-XqvbrU72.mjs → agenda-C5grvzSa.mjs} +166 -169
- package/dist/agenda-DXMwVWpN.js +1 -0
- package/dist/{availability-B-tRp8hB.mjs → availability-C1NqOFsQ.mjs} +81 -81
- package/dist/{availability-BiBbzEIM.js → availability-D_wnfLsH.js} +1 -1
- package/dist/cms-core-modules.css +1 -1
- package/dist/{exceptions-CLgeeUSy.mjs → exceptions-BIwMhYa4.mjs} +1 -1
- package/dist/{exceptions-wEQEVzIs.js → exceptions-Cn7zooEu.js} +1 -1
- package/dist/{index-DTzdHh6g.js → index-C9pSS15N.js} +2 -2
- package/dist/{index-N0NoDEsI.mjs → index-MwjeLHPP.mjs} +3 -3
- package/dist/index.cjs.js +1 -1
- package/dist/index.mjs +50 -36
- package/dist/orders-CG1QUCN8.js +1 -0
- package/dist/orders-CeixEBcU.mjs +396 -0
- package/dist/server-handlers.cjs.js +1 -1
- package/dist/server-handlers.mjs +292 -256
- package/dist/src/contentManager/config.d.ts +28 -0
- package/dist/src/contentManager/index.d.ts +28 -0
- package/dist/src/contentManager/server.d.ts +7 -0
- package/dist/src/server-handlers.d.ts +1 -0
- package/package.json +2 -2
- package/dist/DateFormatter-C9qfmQnP.js +0 -1
- package/dist/Detail-BcboL7NF.js +0 -1
- package/dist/Entries-BPkZ7Jg5.js +0 -1
- package/dist/Overview-B-8TLLjh.js +0 -1
- package/dist/TableView-Ce8H65pL.js +0 -586
- package/dist/TableView-DRQvOW85.mjs +0 -89190
- package/dist/View-DfzaVOzS.js +0 -1
- package/dist/agenda-wNFDKn0G.js +0 -1
- package/dist/floating-ui.dom-BO2Hr6mz.mjs +0 -1292
- package/dist/floating-ui.dom-CAr9LGoC.js +0 -1
- package/dist/index-DYpruS-A-CA2jEOA3.js +0 -88
- package/dist/index-DYpruS-A-D38FBcI3.mjs +0 -4211
- package/dist/index-YMaY4uuk-BgpTtr73.js +0 -1
- package/dist/index-YMaY4uuk-C_xV5K9Z.mjs +0 -1300
- package/dist/orders-Bqa3Z3tH.mjs +0 -356
- package/dist/orders-D5GJOZXN.js +0 -1
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
function
|
|
1
|
+
function R(e, t) {
|
|
2
2
|
return e - t * Math.floor(e / t);
|
|
3
3
|
}
|
|
4
|
-
const
|
|
5
|
-
function
|
|
6
|
-
t =
|
|
4
|
+
const G = 1721426;
|
|
5
|
+
function E(e, t, r, n) {
|
|
6
|
+
t = j(e, t);
|
|
7
7
|
let a = t - 1, o = -2;
|
|
8
|
-
return r <= 2 ? o = 0 :
|
|
8
|
+
return r <= 2 ? o = 0 : T(t) && (o = -1), G - 1 + 365 * a + Math.floor(a / 4) - Math.floor(a / 100) + Math.floor(a / 400) + Math.floor((367 * r - 362) / 12 + o + n);
|
|
9
9
|
}
|
|
10
|
-
function
|
|
10
|
+
function T(e) {
|
|
11
11
|
return e % 4 === 0 && (e % 100 !== 0 || e % 400 === 0);
|
|
12
12
|
}
|
|
13
|
-
function
|
|
13
|
+
function j(e, t) {
|
|
14
14
|
return e === "BC" ? 1 - t : t;
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function $e(e) {
|
|
17
17
|
let t = "AD";
|
|
18
18
|
return e <= 0 && (t = "BC", e = 1 - e), [
|
|
19
19
|
t,
|
|
20
20
|
e
|
|
21
21
|
];
|
|
22
22
|
}
|
|
23
|
-
const
|
|
23
|
+
const ye = {
|
|
24
24
|
standard: [
|
|
25
25
|
31,
|
|
26
26
|
28,
|
|
@@ -50,25 +50,25 @@ const pe = {
|
|
|
50
50
|
31
|
|
51
51
|
]
|
|
52
52
|
};
|
|
53
|
-
class
|
|
53
|
+
class p {
|
|
54
54
|
fromJulianDay(t) {
|
|
55
|
-
let r = t, n = r -
|
|
56
|
-
r <
|
|
57
|
-
let
|
|
58
|
-
return new
|
|
55
|
+
let r = t, n = r - G, a = Math.floor(n / 146097), o = R(n, 146097), i = Math.floor(o / 36524), c = R(o, 36524), l = Math.floor(c / 1461), f = R(c, 1461), M = Math.floor(f / 365), w = a * 400 + i * 100 + l * 4 + M + (i !== 4 && M !== 4 ? 1 : 0), [g, m] = $e(w), y = r - E(g, m, 1, 1), O = 2;
|
|
56
|
+
r < E(g, m, 3, 1) ? O = 0 : T(m) && (O = 1);
|
|
57
|
+
let W = Math.floor(((y + O) * 12 + 373) / 367), de = r - E(g, m, W, 1) + 1;
|
|
58
|
+
return new x(g, m, W, de);
|
|
59
59
|
}
|
|
60
60
|
toJulianDay(t) {
|
|
61
|
-
return
|
|
61
|
+
return E(t.era, t.year, t.month, t.day);
|
|
62
62
|
}
|
|
63
63
|
getDaysInMonth(t) {
|
|
64
|
-
return
|
|
64
|
+
return ye[T(t.year) ? "leapyear" : "standard"][t.month - 1];
|
|
65
65
|
}
|
|
66
66
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
67
67
|
getMonthsInYear(t) {
|
|
68
68
|
return 12;
|
|
69
69
|
}
|
|
70
70
|
getDaysInYear(t) {
|
|
71
|
-
return
|
|
71
|
+
return T(t.year) ? 366 : 365;
|
|
72
72
|
}
|
|
73
73
|
getMaximumMonthsInYear() {
|
|
74
74
|
return 12;
|
|
@@ -96,226 +96,50 @@ class w {
|
|
|
96
96
|
this.identifier = "gregory";
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
|
-
|
|
100
|
-
"001": 1,
|
|
101
|
-
AD: 1,
|
|
102
|
-
AE: 6,
|
|
103
|
-
AF: 6,
|
|
104
|
-
AI: 1,
|
|
105
|
-
AL: 1,
|
|
106
|
-
AM: 1,
|
|
107
|
-
AN: 1,
|
|
108
|
-
AR: 1,
|
|
109
|
-
AT: 1,
|
|
110
|
-
AU: 1,
|
|
111
|
-
AX: 1,
|
|
112
|
-
AZ: 1,
|
|
113
|
-
BA: 1,
|
|
114
|
-
BE: 1,
|
|
115
|
-
BG: 1,
|
|
116
|
-
BH: 6,
|
|
117
|
-
BM: 1,
|
|
118
|
-
BN: 1,
|
|
119
|
-
BY: 1,
|
|
120
|
-
CH: 1,
|
|
121
|
-
CL: 1,
|
|
122
|
-
CM: 1,
|
|
123
|
-
CN: 1,
|
|
124
|
-
CR: 1,
|
|
125
|
-
CY: 1,
|
|
126
|
-
CZ: 1,
|
|
127
|
-
DE: 1,
|
|
128
|
-
DJ: 6,
|
|
129
|
-
DK: 1,
|
|
130
|
-
DZ: 6,
|
|
131
|
-
EC: 1,
|
|
132
|
-
EE: 1,
|
|
133
|
-
EG: 6,
|
|
134
|
-
ES: 1,
|
|
135
|
-
FI: 1,
|
|
136
|
-
FJ: 1,
|
|
137
|
-
FO: 1,
|
|
138
|
-
FR: 1,
|
|
139
|
-
GB: 1,
|
|
140
|
-
GE: 1,
|
|
141
|
-
GF: 1,
|
|
142
|
-
GP: 1,
|
|
143
|
-
GR: 1,
|
|
144
|
-
HR: 1,
|
|
145
|
-
HU: 1,
|
|
146
|
-
IE: 1,
|
|
147
|
-
IQ: 6,
|
|
148
|
-
IR: 6,
|
|
149
|
-
IS: 1,
|
|
150
|
-
IT: 1,
|
|
151
|
-
JO: 6,
|
|
152
|
-
KG: 1,
|
|
153
|
-
KW: 6,
|
|
154
|
-
KZ: 1,
|
|
155
|
-
LB: 1,
|
|
156
|
-
LI: 1,
|
|
157
|
-
LK: 1,
|
|
158
|
-
LT: 1,
|
|
159
|
-
LU: 1,
|
|
160
|
-
LV: 1,
|
|
161
|
-
LY: 6,
|
|
162
|
-
MC: 1,
|
|
163
|
-
MD: 1,
|
|
164
|
-
ME: 1,
|
|
165
|
-
MK: 1,
|
|
166
|
-
MN: 1,
|
|
167
|
-
MQ: 1,
|
|
168
|
-
MV: 5,
|
|
169
|
-
MY: 1,
|
|
170
|
-
NL: 1,
|
|
171
|
-
NO: 1,
|
|
172
|
-
NZ: 1,
|
|
173
|
-
OM: 6,
|
|
174
|
-
PL: 1,
|
|
175
|
-
QA: 6,
|
|
176
|
-
RE: 1,
|
|
177
|
-
RO: 1,
|
|
178
|
-
RS: 1,
|
|
179
|
-
RU: 1,
|
|
180
|
-
SD: 6,
|
|
181
|
-
SE: 1,
|
|
182
|
-
SI: 1,
|
|
183
|
-
SK: 1,
|
|
184
|
-
SM: 1,
|
|
185
|
-
SY: 6,
|
|
186
|
-
TJ: 1,
|
|
187
|
-
TM: 1,
|
|
188
|
-
TR: 1,
|
|
189
|
-
UA: 1,
|
|
190
|
-
UY: 1,
|
|
191
|
-
UZ: 1,
|
|
192
|
-
VA: 1,
|
|
193
|
-
VN: 1,
|
|
194
|
-
XK: 1
|
|
195
|
-
};
|
|
196
|
-
function re(e, t) {
|
|
197
|
-
return t = l(t, e.calendar), e.era === t.era && e.year === t.year && e.month === t.month && e.day === t.day;
|
|
198
|
-
}
|
|
199
|
-
function we(e, t) {
|
|
200
|
-
return t = l(t, e.calendar), e = z(e), t = z(t), e.era === t.era && e.year === t.year && e.month === t.month;
|
|
201
|
-
}
|
|
202
|
-
function et(e, t) {
|
|
203
|
-
return j(e.calendar, t.calendar) && re(e, t);
|
|
204
|
-
}
|
|
205
|
-
function tt(e, t) {
|
|
206
|
-
return j(e.calendar, t.calendar) && we(e, t);
|
|
207
|
-
}
|
|
208
|
-
function j(e, t) {
|
|
99
|
+
function me(e, t) {
|
|
209
100
|
var r, n, a, o;
|
|
210
101
|
return (o = (a = (r = e.isEqual) === null || r === void 0 ? void 0 : r.call(e, t)) !== null && a !== void 0 ? a : (n = t.isEqual) === null || n === void 0 ? void 0 : n.call(t, e)) !== null && o !== void 0 ? o : e.identifier === t.identifier;
|
|
211
102
|
}
|
|
212
|
-
function
|
|
213
|
-
return re(e, Ie(t));
|
|
214
|
-
}
|
|
215
|
-
const De = {
|
|
216
|
-
sun: 0,
|
|
217
|
-
mon: 1,
|
|
218
|
-
tue: 2,
|
|
219
|
-
wed: 3,
|
|
220
|
-
thu: 4,
|
|
221
|
-
fri: 5,
|
|
222
|
-
sat: 6
|
|
223
|
-
};
|
|
224
|
-
function nt(e, t, r) {
|
|
225
|
-
let n = e.calendar.toJulianDay(e), a = r ? De[r] : Se(t), o = Math.ceil(n + 1 - a) % 7;
|
|
226
|
-
return o < 0 && (o += 7), o;
|
|
227
|
-
}
|
|
228
|
-
function ve(e) {
|
|
103
|
+
function be(e) {
|
|
229
104
|
return d(Date.now(), e);
|
|
230
105
|
}
|
|
231
|
-
function
|
|
232
|
-
return
|
|
106
|
+
function Ve(e) {
|
|
107
|
+
return ve(be(e));
|
|
233
108
|
}
|
|
234
|
-
function
|
|
109
|
+
function Q(e, t) {
|
|
235
110
|
return e.calendar.toJulianDay(e) - t.calendar.toJulianDay(t);
|
|
236
111
|
}
|
|
237
|
-
function
|
|
238
|
-
return
|
|
239
|
-
}
|
|
240
|
-
function _(e) {
|
|
241
|
-
return e.hour * 36e5 + e.minute * 6e4 + e.second * 1e3 + e.millisecond;
|
|
242
|
-
}
|
|
243
|
-
let k = null;
|
|
244
|
-
function ae() {
|
|
245
|
-
return k == null && (k = new Intl.DateTimeFormat().resolvedOptions().timeZone), k;
|
|
112
|
+
function Me(e, t) {
|
|
113
|
+
return z(e) - z(t);
|
|
246
114
|
}
|
|
247
115
|
function z(e) {
|
|
248
|
-
return e.
|
|
249
|
-
days: e.day - 1
|
|
250
|
-
});
|
|
116
|
+
return e.hour * 36e5 + e.minute * 6e4 + e.second * 1e3 + e.millisecond;
|
|
251
117
|
}
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
});
|
|
118
|
+
let P = null, we = !1;
|
|
119
|
+
function X() {
|
|
120
|
+
return P == null && (P = new Intl.DateTimeFormat().resolvedOptions().timeZone), P;
|
|
256
121
|
}
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
if (Intl.Locale) {
|
|
260
|
-
let r = Q.get(e);
|
|
261
|
-
return r || (r = new Intl.Locale(e).maximize().region, r && Q.set(e, r)), r;
|
|
262
|
-
}
|
|
263
|
-
let t = e.split("-")[1];
|
|
264
|
-
return t === "u" ? void 0 : t;
|
|
265
|
-
}
|
|
266
|
-
function Se(e) {
|
|
267
|
-
let t = O.get(e);
|
|
268
|
-
if (!t) {
|
|
269
|
-
if (Intl.Locale) {
|
|
270
|
-
let n = new Intl.Locale(e);
|
|
271
|
-
if ("getWeekInfo" in n && (t = n.getWeekInfo(), t))
|
|
272
|
-
return O.set(e, t), t.firstDay;
|
|
273
|
-
}
|
|
274
|
-
let r = Ee(e);
|
|
275
|
-
if (e.includes("-fw-")) {
|
|
276
|
-
let n = e.split("-fw-")[1].split("-")[0];
|
|
277
|
-
n === "mon" ? t = {
|
|
278
|
-
firstDay: 1
|
|
279
|
-
} : n === "tue" ? t = {
|
|
280
|
-
firstDay: 2
|
|
281
|
-
} : n === "wed" ? t = {
|
|
282
|
-
firstDay: 3
|
|
283
|
-
} : n === "thu" ? t = {
|
|
284
|
-
firstDay: 4
|
|
285
|
-
} : n === "fri" ? t = {
|
|
286
|
-
firstDay: 5
|
|
287
|
-
} : n === "sat" ? t = {
|
|
288
|
-
firstDay: 6
|
|
289
|
-
} : t = {
|
|
290
|
-
firstDay: 0
|
|
291
|
-
};
|
|
292
|
-
} else e.includes("-ca-iso8601") ? t = {
|
|
293
|
-
firstDay: 1
|
|
294
|
-
} : t = {
|
|
295
|
-
firstDay: r && ge[r] || 0
|
|
296
|
-
};
|
|
297
|
-
O.set(e, t);
|
|
298
|
-
}
|
|
299
|
-
return t.firstDay;
|
|
122
|
+
function ee() {
|
|
123
|
+
return we;
|
|
300
124
|
}
|
|
301
|
-
function
|
|
302
|
-
e =
|
|
303
|
-
let t =
|
|
304
|
-
return
|
|
125
|
+
function v(e) {
|
|
126
|
+
e = h(e, new p());
|
|
127
|
+
let t = j(e.era, e.year);
|
|
128
|
+
return te(t, e.month, e.day, e.hour, e.minute, e.second, e.millisecond);
|
|
305
129
|
}
|
|
306
|
-
function
|
|
130
|
+
function te(e, t, r, n, a, o, i) {
|
|
307
131
|
let c = /* @__PURE__ */ new Date();
|
|
308
132
|
return c.setUTCHours(n, a, o, i), c.setUTCFullYear(e, t - 1, r), c.getTime();
|
|
309
133
|
}
|
|
310
|
-
function
|
|
134
|
+
function H(e, t) {
|
|
311
135
|
if (t === "UTC") return 0;
|
|
312
|
-
if (e > 0 && t ===
|
|
313
|
-
let { year: r, month: n, day: a, hour: o, minute: i, second: c } =
|
|
314
|
-
return
|
|
136
|
+
if (e > 0 && t === X() && !ee()) return new Date(e).getTimezoneOffset() * -6e4;
|
|
137
|
+
let { year: r, month: n, day: a, hour: o, minute: i, second: c } = re(e, t);
|
|
138
|
+
return te(r, n, a, o, i, c, 0) - Math.floor(e / 1e3) * 1e3;
|
|
315
139
|
}
|
|
316
|
-
const
|
|
317
|
-
function
|
|
318
|
-
let r =
|
|
140
|
+
const L = /* @__PURE__ */ new Map();
|
|
141
|
+
function re(e, t) {
|
|
142
|
+
let r = L.get(t);
|
|
319
143
|
r || (r = new Intl.DateTimeFormat("en-US", {
|
|
320
144
|
timeZone: t,
|
|
321
145
|
hour12: !1,
|
|
@@ -326,7 +150,7 @@ function ie(e, t) {
|
|
|
326
150
|
hour: "numeric",
|
|
327
151
|
minute: "numeric",
|
|
328
152
|
second: "numeric"
|
|
329
|
-
}),
|
|
153
|
+
}), L.set(t, r));
|
|
330
154
|
let n = r.formatToParts(new Date(e)), a = {};
|
|
331
155
|
for (let o of n) o.type !== "literal" && (a[o.type] = o.value);
|
|
332
156
|
return {
|
|
@@ -339,28 +163,28 @@ function ie(e, t) {
|
|
|
339
163
|
second: +a.second
|
|
340
164
|
};
|
|
341
165
|
}
|
|
342
|
-
const
|
|
343
|
-
function
|
|
166
|
+
const K = 864e5;
|
|
167
|
+
function ge(e, t, r, n) {
|
|
344
168
|
return (r === n ? [
|
|
345
169
|
r
|
|
346
170
|
] : [
|
|
347
171
|
r,
|
|
348
172
|
n
|
|
349
|
-
]).filter((o) =>
|
|
173
|
+
]).filter((o) => pe(e, t, o));
|
|
350
174
|
}
|
|
351
|
-
function
|
|
352
|
-
let n =
|
|
175
|
+
function pe(e, t, r) {
|
|
176
|
+
let n = re(r, t);
|
|
353
177
|
return e.year === n.year && e.month === n.month && e.day === n.day && e.hour === n.hour && e.minute === n.minute && e.second === n.second;
|
|
354
178
|
}
|
|
355
179
|
function u(e, t, r = "compatible") {
|
|
356
|
-
let n =
|
|
357
|
-
if (t === "UTC") return
|
|
358
|
-
if (t ===
|
|
359
|
-
n =
|
|
360
|
-
let
|
|
361
|
-
return
|
|
362
|
-
}
|
|
363
|
-
let a =
|
|
180
|
+
let n = D(e);
|
|
181
|
+
if (t === "UTC") return v(n);
|
|
182
|
+
if (t === X() && r === "compatible" && !ee()) {
|
|
183
|
+
n = h(n, new p());
|
|
184
|
+
let l = /* @__PURE__ */ new Date(), f = j(n.era, n.year);
|
|
185
|
+
return l.setFullYear(f, n.month - 1, n.day), l.setHours(n.hour, n.minute, n.second, n.millisecond), l.getTime();
|
|
186
|
+
}
|
|
187
|
+
let a = v(n), o = H(a - K, t), i = H(a + K, t), c = ge(n, t, a - o, a - i);
|
|
364
188
|
if (c.length === 1) return c[0];
|
|
365
189
|
if (c.length > 1) switch (r) {
|
|
366
190
|
// 'compatible' means 'earlier' for "fall back" transitions
|
|
@@ -383,116 +207,116 @@ function u(e, t, r = "compatible") {
|
|
|
383
207
|
throw new RangeError("No such absolute time found");
|
|
384
208
|
}
|
|
385
209
|
}
|
|
386
|
-
function
|
|
210
|
+
function ne(e, t, r = "compatible") {
|
|
387
211
|
return new Date(u(e, t, r));
|
|
388
212
|
}
|
|
389
213
|
function d(e, t) {
|
|
390
|
-
let r =
|
|
391
|
-
return new
|
|
214
|
+
let r = H(e, t), n = new Date(e + r), a = n.getUTCFullYear(), o = n.getUTCMonth() + 1, i = n.getUTCDate(), c = n.getUTCHours(), l = n.getUTCMinutes(), f = n.getUTCSeconds(), M = n.getUTCMilliseconds();
|
|
215
|
+
return new C(a < 1 ? "BC" : "AD", a < 1 ? -a + 1 : a, o, i, t, r, c, l, f, M);
|
|
392
216
|
}
|
|
393
|
-
function
|
|
394
|
-
return new
|
|
217
|
+
function ve(e) {
|
|
218
|
+
return new x(e.calendar, e.era, e.year, e.month, e.day);
|
|
395
219
|
}
|
|
396
|
-
function
|
|
220
|
+
function D(e, t) {
|
|
397
221
|
let r = 0, n = 0, a = 0, o = 0;
|
|
398
222
|
if ("timeZone" in e) ({ hour: r, minute: n, second: a, millisecond: o } = e);
|
|
399
223
|
else if ("hour" in e && !t) return e;
|
|
400
|
-
return t && ({ hour: r, minute: n, second: a, millisecond: o } = t), new
|
|
224
|
+
return t && ({ hour: r, minute: n, second: a, millisecond: o } = t), new S(e.calendar, e.era, e.year, e.month, e.day, r, n, a, o);
|
|
401
225
|
}
|
|
402
|
-
function
|
|
403
|
-
if (
|
|
226
|
+
function h(e, t) {
|
|
227
|
+
if (me(e.calendar, t)) return e;
|
|
404
228
|
let r = t.fromJulianDay(e.calendar.toJulianDay(e)), n = e.copy();
|
|
405
229
|
return n.calendar = t, n.era = r.era, n.year = r.year, n.month = r.month, n.day = r.day, b(n), n;
|
|
406
230
|
}
|
|
407
|
-
function
|
|
408
|
-
if (e instanceof
|
|
409
|
-
return e.timeZone === t ? e :
|
|
231
|
+
function De(e, t, r) {
|
|
232
|
+
if (e instanceof C)
|
|
233
|
+
return e.timeZone === t ? e : Ie(e, t);
|
|
410
234
|
let n = u(e, t, r);
|
|
411
235
|
return d(n, t);
|
|
412
236
|
}
|
|
413
|
-
function
|
|
414
|
-
let t =
|
|
237
|
+
function xe(e) {
|
|
238
|
+
let t = v(e) - e.offset;
|
|
415
239
|
return new Date(t);
|
|
416
240
|
}
|
|
417
|
-
function
|
|
418
|
-
let r =
|
|
419
|
-
return
|
|
241
|
+
function Ie(e, t) {
|
|
242
|
+
let r = v(e) - e.offset;
|
|
243
|
+
return h(d(r, t), e.calendar);
|
|
420
244
|
}
|
|
421
|
-
const
|
|
245
|
+
const I = 36e5;
|
|
422
246
|
function B(e, t) {
|
|
423
|
-
let r = e.copy(), n = "hour" in r ?
|
|
424
|
-
|
|
247
|
+
let r = e.copy(), n = "hour" in r ? Ye(r, t) : 0;
|
|
248
|
+
F(r, t.years || 0), r.calendar.balanceYearMonth && r.calendar.balanceYearMonth(r, e), r.month += t.months || 0, q(r), ae(r), r.day += (t.weeks || 0) * 7, r.day += t.days || 0, r.day += n, Se(r), r.calendar.balanceDate && r.calendar.balanceDate(r), r.year < 1 && (r.year = 1, r.month = 1, r.day = 1);
|
|
425
249
|
let a = r.calendar.getYearsInEra(r);
|
|
426
250
|
if (r.year > a) {
|
|
427
251
|
var o, i;
|
|
428
|
-
let
|
|
429
|
-
r.year = a, r.month =
|
|
252
|
+
let l = (o = (i = r.calendar).isInverseEra) === null || o === void 0 ? void 0 : o.call(i, r);
|
|
253
|
+
r.year = a, r.month = l ? 1 : r.calendar.getMonthsInYear(r), r.day = l ? 1 : r.calendar.getDaysInMonth(r);
|
|
430
254
|
}
|
|
431
255
|
r.month < 1 && (r.month = 1, r.day = 1);
|
|
432
256
|
let c = r.calendar.getMonthsInYear(r);
|
|
433
257
|
return r.month > c && (r.month = c, r.day = r.calendar.getDaysInMonth(r)), r.day = Math.max(1, Math.min(r.calendar.getDaysInMonth(r), r.day)), r;
|
|
434
258
|
}
|
|
435
|
-
function
|
|
259
|
+
function F(e, t) {
|
|
436
260
|
var r, n;
|
|
437
261
|
!((r = (n = e.calendar).isInverseEra) === null || r === void 0) && r.call(n, e) && (t = -t), e.year += t;
|
|
438
262
|
}
|
|
439
|
-
function
|
|
263
|
+
function q(e) {
|
|
440
264
|
for (; e.month < 1; )
|
|
441
|
-
|
|
265
|
+
F(e, -1), e.month += e.calendar.getMonthsInYear(e);
|
|
442
266
|
let t = 0;
|
|
443
267
|
for (; e.month > (t = e.calendar.getMonthsInYear(e)); )
|
|
444
|
-
e.month -= t,
|
|
268
|
+
e.month -= t, F(e, 1);
|
|
445
269
|
}
|
|
446
|
-
function
|
|
270
|
+
function Se(e) {
|
|
447
271
|
for (; e.day < 1; )
|
|
448
|
-
e.month--,
|
|
272
|
+
e.month--, q(e), e.day += e.calendar.getDaysInMonth(e);
|
|
449
273
|
for (; e.day > e.calendar.getDaysInMonth(e); )
|
|
450
|
-
e.day -= e.calendar.getDaysInMonth(e), e.month++,
|
|
274
|
+
e.day -= e.calendar.getDaysInMonth(e), e.month++, q(e);
|
|
451
275
|
}
|
|
452
|
-
function
|
|
276
|
+
function ae(e) {
|
|
453
277
|
e.month = Math.max(1, Math.min(e.calendar.getMonthsInYear(e), e.month)), e.day = Math.max(1, Math.min(e.calendar.getDaysInMonth(e), e.day));
|
|
454
278
|
}
|
|
455
279
|
function b(e) {
|
|
456
|
-
e.calendar.constrainDate && e.calendar.constrainDate(e), e.year = Math.max(1, Math.min(e.calendar.getYearsInEra(e), e.year)),
|
|
280
|
+
e.calendar.constrainDate && e.calendar.constrainDate(e), e.year = Math.max(1, Math.min(e.calendar.getYearsInEra(e), e.year)), ae(e);
|
|
457
281
|
}
|
|
458
|
-
function
|
|
282
|
+
function oe(e) {
|
|
459
283
|
let t = {};
|
|
460
284
|
for (let r in e) typeof e[r] == "number" && (t[r] = -e[r]);
|
|
461
285
|
return t;
|
|
462
286
|
}
|
|
463
|
-
function
|
|
464
|
-
return B(e,
|
|
287
|
+
function ie(e, t) {
|
|
288
|
+
return B(e, oe(t));
|
|
465
289
|
}
|
|
466
|
-
function
|
|
290
|
+
function _(e, t) {
|
|
467
291
|
let r = e.copy();
|
|
468
292
|
return t.era != null && (r.era = t.era), t.year != null && (r.year = t.year), t.month != null && (r.month = t.month), t.day != null && (r.day = t.day), b(r), r;
|
|
469
293
|
}
|
|
470
|
-
function
|
|
294
|
+
function U(e, t) {
|
|
471
295
|
let r = e.copy();
|
|
472
|
-
return t.hour != null && (r.hour = t.hour), t.minute != null && (r.minute = t.minute), t.second != null && (r.second = t.second), t.millisecond != null && (r.millisecond = t.millisecond),
|
|
296
|
+
return t.hour != null && (r.hour = t.hour), t.minute != null && (r.minute = t.minute), t.second != null && (r.second = t.second), t.millisecond != null && (r.millisecond = t.millisecond), Ee(r), r;
|
|
473
297
|
}
|
|
474
|
-
function
|
|
475
|
-
e.second += Math.floor(e.millisecond / 1e3), e.millisecond =
|
|
298
|
+
function Ce(e) {
|
|
299
|
+
e.second += Math.floor(e.millisecond / 1e3), e.millisecond = Y(e.millisecond, 1e3), e.minute += Math.floor(e.second / 60), e.second = Y(e.second, 60), e.hour += Math.floor(e.minute / 60), e.minute = Y(e.minute, 60);
|
|
476
300
|
let t = Math.floor(e.hour / 24);
|
|
477
|
-
return e.hour =
|
|
301
|
+
return e.hour = Y(e.hour, 24), t;
|
|
478
302
|
}
|
|
479
|
-
function
|
|
303
|
+
function Ee(e) {
|
|
480
304
|
e.millisecond = Math.max(0, Math.min(e.millisecond, 1e3)), e.second = Math.max(0, Math.min(e.second, 59)), e.minute = Math.max(0, Math.min(e.minute, 59)), e.hour = Math.max(0, Math.min(e.hour, 23));
|
|
481
305
|
}
|
|
482
|
-
function
|
|
306
|
+
function Y(e, t) {
|
|
483
307
|
let r = e % t;
|
|
484
308
|
return r < 0 && (r += t), r;
|
|
485
309
|
}
|
|
486
|
-
function
|
|
487
|
-
return e.hour += t.hours || 0, e.minute += t.minutes || 0, e.second += t.seconds || 0, e.millisecond += t.milliseconds || 0,
|
|
310
|
+
function Ye(e, t) {
|
|
311
|
+
return e.hour += t.hours || 0, e.minute += t.minutes || 0, e.second += t.seconds || 0, e.millisecond += t.milliseconds || 0, Ce(e);
|
|
488
312
|
}
|
|
489
|
-
function
|
|
313
|
+
function J(e, t, r, n) {
|
|
490
314
|
let a = e.copy();
|
|
491
315
|
switch (t) {
|
|
492
316
|
case "era": {
|
|
493
|
-
let c = e.calendar.getEras(),
|
|
494
|
-
if (
|
|
495
|
-
|
|
317
|
+
let c = e.calendar.getEras(), l = c.indexOf(e.era);
|
|
318
|
+
if (l < 0) throw new Error("Invalid era: " + e.era);
|
|
319
|
+
l = $(l, r, 0, c.length - 1, n?.round), a.era = c[l], b(a);
|
|
496
320
|
break;
|
|
497
321
|
}
|
|
498
322
|
case "year":
|
|
@@ -510,14 +334,14 @@ function W(e, t, r, n) {
|
|
|
510
334
|
}
|
|
511
335
|
return e.calendar.balanceDate && e.calendar.balanceDate(a), b(a), a;
|
|
512
336
|
}
|
|
513
|
-
function
|
|
337
|
+
function ce(e, t, r, n) {
|
|
514
338
|
let a = e.copy();
|
|
515
339
|
switch (t) {
|
|
516
340
|
case "hour": {
|
|
517
341
|
let o = e.hour, i = 0, c = 23;
|
|
518
342
|
if (n?.hourCycle === 12) {
|
|
519
|
-
let
|
|
520
|
-
i =
|
|
343
|
+
let l = o >= 12;
|
|
344
|
+
i = l ? 12 : 0, c = l ? 23 : 11;
|
|
521
345
|
}
|
|
522
346
|
a.hour = $(o, r, i, c, n?.round);
|
|
523
347
|
break;
|
|
@@ -545,10 +369,10 @@ function $(e, t, r, n, a = !1) {
|
|
|
545
369
|
e += t, e < r ? e = n - (r - e - 1) : e > n && (e = r + (e - n - 1));
|
|
546
370
|
return e;
|
|
547
371
|
}
|
|
548
|
-
function
|
|
372
|
+
function le(e, t) {
|
|
549
373
|
let r;
|
|
550
374
|
if (t.years != null && t.years !== 0 || t.months != null && t.months !== 0 || t.weeks != null && t.weeks !== 0 || t.days != null && t.days !== 0) {
|
|
551
|
-
let a = B(
|
|
375
|
+
let a = B(D(e), {
|
|
552
376
|
years: t.years,
|
|
553
377
|
months: t.months,
|
|
554
378
|
weeks: t.weeks,
|
|
@@ -556,15 +380,15 @@ function ue(e, t) {
|
|
|
556
380
|
});
|
|
557
381
|
r = u(a, e.timeZone);
|
|
558
382
|
} else
|
|
559
|
-
r =
|
|
383
|
+
r = v(e) - e.offset;
|
|
560
384
|
r += t.milliseconds || 0, r += (t.seconds || 0) * 1e3, r += (t.minutes || 0) * 6e4, r += (t.hours || 0) * 36e5;
|
|
561
385
|
let n = d(r, e.timeZone);
|
|
562
|
-
return
|
|
386
|
+
return h(n, e.calendar);
|
|
563
387
|
}
|
|
564
|
-
function
|
|
565
|
-
return
|
|
388
|
+
function Te(e, t) {
|
|
389
|
+
return le(e, oe(t));
|
|
566
390
|
}
|
|
567
|
-
function
|
|
391
|
+
function Ue(e, t, r, n) {
|
|
568
392
|
switch (t) {
|
|
569
393
|
case "hour": {
|
|
570
394
|
let a = 0, o = 23;
|
|
@@ -572,88 +396,88 @@ function He(e, t, r, n) {
|
|
|
572
396
|
let y = e.hour >= 12;
|
|
573
397
|
a = y ? 12 : 0, o = y ? 23 : 11;
|
|
574
398
|
}
|
|
575
|
-
let i =
|
|
399
|
+
let i = D(e), c = h(U(i, {
|
|
576
400
|
hour: a
|
|
577
|
-
}), new
|
|
401
|
+
}), new p()), l = [
|
|
578
402
|
u(c, e.timeZone, "earlier"),
|
|
579
403
|
u(c, e.timeZone, "later")
|
|
580
|
-
].filter((y) => d(y, e.timeZone).day === c.day)[0],
|
|
404
|
+
].filter((y) => d(y, e.timeZone).day === c.day)[0], f = h(U(i, {
|
|
581
405
|
hour: o
|
|
582
|
-
}), new
|
|
583
|
-
u(
|
|
584
|
-
u(
|
|
585
|
-
].filter((y) => d(y, e.timeZone).day ===
|
|
586
|
-
return
|
|
406
|
+
}), new p()), M = [
|
|
407
|
+
u(f, e.timeZone, "earlier"),
|
|
408
|
+
u(f, e.timeZone, "later")
|
|
409
|
+
].filter((y) => d(y, e.timeZone).day === f.day).pop(), w = v(e) - e.offset, g = Math.floor(w / I), m = w % I;
|
|
410
|
+
return w = $(g, r, Math.floor(l / I), Math.floor(M / I), n?.round) * I + m, h(d(w, e.timeZone), e.calendar);
|
|
587
411
|
}
|
|
588
412
|
case "minute":
|
|
589
413
|
case "second":
|
|
590
414
|
case "millisecond":
|
|
591
|
-
return
|
|
415
|
+
return ce(e, t, r, n);
|
|
592
416
|
case "era":
|
|
593
417
|
case "year":
|
|
594
418
|
case "month":
|
|
595
419
|
case "day": {
|
|
596
|
-
let a =
|
|
597
|
-
return
|
|
420
|
+
let a = J(D(e), t, r, n), o = u(a, e.timeZone);
|
|
421
|
+
return h(d(o, e.timeZone), e.calendar);
|
|
598
422
|
}
|
|
599
423
|
default:
|
|
600
424
|
throw new Error("Unsupported field " + t);
|
|
601
425
|
}
|
|
602
426
|
}
|
|
603
|
-
function
|
|
604
|
-
let n =
|
|
427
|
+
function Be(e, t, r) {
|
|
428
|
+
let n = D(e), a = U(_(n, t), t);
|
|
605
429
|
if (a.compare(n) === 0) return e;
|
|
606
430
|
let o = u(a, e.timeZone, r);
|
|
607
|
-
return
|
|
431
|
+
return h(d(o, e.timeZone), e.calendar);
|
|
608
432
|
}
|
|
609
|
-
const
|
|
610
|
-
function
|
|
611
|
-
let t = e.match(
|
|
433
|
+
const Oe = /^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/, Re = /^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/, se = /^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/;
|
|
434
|
+
function We(e) {
|
|
435
|
+
let t = e.match(Oe);
|
|
612
436
|
if (!t)
|
|
613
|
-
throw
|
|
614
|
-
let r = new
|
|
615
|
-
return r.day =
|
|
437
|
+
throw se.test(e) ? new Error(`Invalid ISO 8601 date string: ${e}. Use parseAbsolute() instead.`) : new Error("Invalid ISO 8601 date string: " + e);
|
|
438
|
+
let r = new x(s(t[1], 0, 9999), s(t[2], 1, 12), 1);
|
|
439
|
+
return r.day = s(t[3], 1, r.calendar.getDaysInMonth(r)), r;
|
|
616
440
|
}
|
|
617
|
-
function
|
|
618
|
-
let t = e.match(
|
|
441
|
+
function ze(e) {
|
|
442
|
+
let t = e.match(Re);
|
|
619
443
|
if (!t)
|
|
620
|
-
throw
|
|
621
|
-
let r =
|
|
622
|
-
return a.day =
|
|
444
|
+
throw se.test(e) ? new Error(`Invalid ISO 8601 date time string: ${e}. Use parseAbsolute() instead.`) : new Error("Invalid ISO 8601 date time string: " + e);
|
|
445
|
+
let r = s(t[1], -9999, 9999), n = r < 1 ? "BC" : "AD", a = new S(n, r < 1 ? -r + 1 : r, s(t[2], 1, 12), 1, t[4] ? s(t[4], 0, 23) : 0, t[5] ? s(t[5], 0, 59) : 0, t[6] ? s(t[6], 0, 59) : 0, t[7] ? s(t[7], 0, 1 / 0) * 1e3 : 0);
|
|
446
|
+
return a.day = s(t[3], 0, a.calendar.getDaysInMonth(a)), a;
|
|
623
447
|
}
|
|
624
|
-
function
|
|
448
|
+
function s(e, t, r) {
|
|
625
449
|
let n = Number(e);
|
|
626
450
|
if (n < t || n > r) throw new RangeError(`Value out of range: ${t} <= ${n} <= ${r}`);
|
|
627
451
|
return n;
|
|
628
452
|
}
|
|
629
|
-
function
|
|
453
|
+
function Pe(e) {
|
|
630
454
|
return `${String(e.hour).padStart(2, "0")}:${String(e.minute).padStart(2, "0")}:${String(e.second).padStart(2, "0")}${e.millisecond ? String(e.millisecond / 1e3).slice(1) : ""}`;
|
|
631
455
|
}
|
|
632
|
-
function
|
|
633
|
-
let t =
|
|
456
|
+
function he(e) {
|
|
457
|
+
let t = h(e, new p()), r;
|
|
634
458
|
return t.era === "BC" ? r = t.year === 1 ? "0000" : "-" + String(Math.abs(1 - t.year)).padStart(6, "00") : r = String(t.year).padStart(4, "0"), `${r}-${String(t.month).padStart(2, "0")}-${String(t.day).padStart(2, "0")}`;
|
|
635
459
|
}
|
|
636
|
-
function
|
|
637
|
-
return `${
|
|
460
|
+
function fe(e) {
|
|
461
|
+
return `${he(e)}T${Pe(e)}`;
|
|
638
462
|
}
|
|
639
|
-
function
|
|
463
|
+
function ke(e) {
|
|
640
464
|
let t = Math.sign(e) < 0 ? "-" : "+";
|
|
641
465
|
e = Math.abs(e);
|
|
642
466
|
let r = Math.floor(e / 36e5), n = Math.floor(e % 36e5 / 6e4), a = Math.floor(e % 36e5 % 6e4 / 1e3), o = `${t}${String(r).padStart(2, "0")}:${String(n).padStart(2, "0")}`;
|
|
643
467
|
return a !== 0 && (o += `:${String(a).padStart(2, "0")}`), o;
|
|
644
468
|
}
|
|
645
|
-
function
|
|
646
|
-
return `${
|
|
469
|
+
function Ae(e) {
|
|
470
|
+
return `${fe(e)}${ke(e.offset)}[${e.timeZone}]`;
|
|
647
471
|
}
|
|
648
|
-
function
|
|
472
|
+
function Ze(e, t) {
|
|
649
473
|
if (t.has(e))
|
|
650
474
|
throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
651
475
|
}
|
|
652
|
-
function
|
|
653
|
-
|
|
476
|
+
function N(e, t, r) {
|
|
477
|
+
Ze(e, t), t.set(e, r);
|
|
654
478
|
}
|
|
655
479
|
function V(e) {
|
|
656
|
-
let t = typeof e[0] == "object" ? e.shift() : new
|
|
480
|
+
let t = typeof e[0] == "object" ? e.shift() : new p(), r;
|
|
657
481
|
if (typeof e[0] == "string") r = e.shift();
|
|
658
482
|
else {
|
|
659
483
|
let i = t.getEras();
|
|
@@ -668,11 +492,11 @@ function V(e) {
|
|
|
668
492
|
o
|
|
669
493
|
];
|
|
670
494
|
}
|
|
671
|
-
var
|
|
672
|
-
class
|
|
495
|
+
var He = /* @__PURE__ */ new WeakMap();
|
|
496
|
+
class x {
|
|
673
497
|
/** Returns a copy of this date. */
|
|
674
498
|
copy() {
|
|
675
|
-
return this.era ? new
|
|
499
|
+
return this.era ? new x(this.calendar, this.era, this.year, this.month, this.day) : new x(this.calendar, this.year, this.month, this.day);
|
|
676
500
|
}
|
|
677
501
|
/** Returns a new `CalendarDate` with the given duration added to it. */
|
|
678
502
|
add(t) {
|
|
@@ -680,33 +504,33 @@ class I {
|
|
|
680
504
|
}
|
|
681
505
|
/** Returns a new `CalendarDate` with the given duration subtracted from it. */
|
|
682
506
|
subtract(t) {
|
|
683
|
-
return
|
|
507
|
+
return ie(this, t);
|
|
684
508
|
}
|
|
685
509
|
/** Returns a new `CalendarDate` with the given fields set to the provided values. Other fields will be constrained accordingly. */
|
|
686
510
|
set(t) {
|
|
687
|
-
return
|
|
511
|
+
return _(this, t);
|
|
688
512
|
}
|
|
689
513
|
/**
|
|
690
514
|
* Returns a new `CalendarDate` with the given field adjusted by a specified amount.
|
|
691
515
|
* When the resulting value reaches the limits of the field, it wraps around.
|
|
692
516
|
*/
|
|
693
517
|
cycle(t, r, n) {
|
|
694
|
-
return
|
|
518
|
+
return J(this, t, r, n);
|
|
695
519
|
}
|
|
696
520
|
/** Converts the date to a native JavaScript Date object, with the time set to midnight in the given time zone. */
|
|
697
521
|
toDate(t) {
|
|
698
|
-
return
|
|
522
|
+
return ne(this, t);
|
|
699
523
|
}
|
|
700
524
|
/** Converts the date to an ISO 8601 formatted string. */
|
|
701
525
|
toString() {
|
|
702
|
-
return
|
|
526
|
+
return he(this);
|
|
703
527
|
}
|
|
704
528
|
/** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */
|
|
705
529
|
compare(t) {
|
|
706
|
-
return
|
|
530
|
+
return Q(this, t);
|
|
707
531
|
}
|
|
708
532
|
constructor(...t) {
|
|
709
|
-
|
|
533
|
+
N(this, He, {
|
|
710
534
|
writable: !0,
|
|
711
535
|
value: void 0
|
|
712
536
|
});
|
|
@@ -714,11 +538,11 @@ class I {
|
|
|
714
538
|
this.calendar = r, this.era = n, this.year = a, this.month = o, this.day = i, b(this);
|
|
715
539
|
}
|
|
716
540
|
}
|
|
717
|
-
var
|
|
718
|
-
class
|
|
541
|
+
var Fe = /* @__PURE__ */ new WeakMap();
|
|
542
|
+
class S {
|
|
719
543
|
/** Returns a copy of this date. */
|
|
720
544
|
copy() {
|
|
721
|
-
return this.era ? new
|
|
545
|
+
return this.era ? new S(this.calendar, this.era, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond) : new S(this.calendar, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond);
|
|
722
546
|
}
|
|
723
547
|
/** Returns a new `CalendarDateTime` with the given duration added to it. */
|
|
724
548
|
add(t) {
|
|
@@ -726,11 +550,11 @@ class E {
|
|
|
726
550
|
}
|
|
727
551
|
/** Returns a new `CalendarDateTime` with the given duration subtracted from it. */
|
|
728
552
|
subtract(t) {
|
|
729
|
-
return
|
|
553
|
+
return ie(this, t);
|
|
730
554
|
}
|
|
731
555
|
/** Returns a new `CalendarDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */
|
|
732
556
|
set(t) {
|
|
733
|
-
return
|
|
557
|
+
return _(U(this, t), t);
|
|
734
558
|
}
|
|
735
559
|
/**
|
|
736
560
|
* Returns a new `CalendarDateTime` with the given field adjusted by a specified amount.
|
|
@@ -742,26 +566,26 @@ class E {
|
|
|
742
566
|
case "year":
|
|
743
567
|
case "month":
|
|
744
568
|
case "day":
|
|
745
|
-
return
|
|
569
|
+
return J(this, t, r, n);
|
|
746
570
|
default:
|
|
747
|
-
return
|
|
571
|
+
return ce(this, t, r, n);
|
|
748
572
|
}
|
|
749
573
|
}
|
|
750
574
|
/** Converts the date to a native JavaScript Date object in the given time zone. */
|
|
751
575
|
toDate(t, r) {
|
|
752
|
-
return
|
|
576
|
+
return ne(this, t, r);
|
|
753
577
|
}
|
|
754
578
|
/** Converts the date to an ISO 8601 formatted string. */
|
|
755
579
|
toString() {
|
|
756
|
-
return
|
|
580
|
+
return fe(this);
|
|
757
581
|
}
|
|
758
582
|
/** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */
|
|
759
583
|
compare(t) {
|
|
760
|
-
let r =
|
|
761
|
-
return r === 0 ?
|
|
584
|
+
let r = Q(this, t);
|
|
585
|
+
return r === 0 ? Me(this, D(t)) : r;
|
|
762
586
|
}
|
|
763
587
|
constructor(...t) {
|
|
764
|
-
|
|
588
|
+
N(this, Fe, {
|
|
765
589
|
writable: !0,
|
|
766
590
|
value: void 0
|
|
767
591
|
});
|
|
@@ -769,38 +593,38 @@ class E {
|
|
|
769
593
|
this.calendar = r, this.era = n, this.year = a, this.month = o, this.day = i, this.hour = t.shift() || 0, this.minute = t.shift() || 0, this.second = t.shift() || 0, this.millisecond = t.shift() || 0, b(this);
|
|
770
594
|
}
|
|
771
595
|
}
|
|
772
|
-
var
|
|
773
|
-
class
|
|
596
|
+
var qe = /* @__PURE__ */ new WeakMap();
|
|
597
|
+
class C {
|
|
774
598
|
/** Returns a copy of this date. */
|
|
775
599
|
copy() {
|
|
776
|
-
return this.era ? new
|
|
600
|
+
return this.era ? new C(this.calendar, this.era, this.year, this.month, this.day, this.timeZone, this.offset, this.hour, this.minute, this.second, this.millisecond) : new C(this.calendar, this.year, this.month, this.day, this.timeZone, this.offset, this.hour, this.minute, this.second, this.millisecond);
|
|
777
601
|
}
|
|
778
602
|
/** Returns a new `ZonedDateTime` with the given duration added to it. */
|
|
779
603
|
add(t) {
|
|
780
|
-
return
|
|
604
|
+
return le(this, t);
|
|
781
605
|
}
|
|
782
606
|
/** Returns a new `ZonedDateTime` with the given duration subtracted from it. */
|
|
783
607
|
subtract(t) {
|
|
784
|
-
return
|
|
608
|
+
return Te(this, t);
|
|
785
609
|
}
|
|
786
610
|
/** Returns a new `ZonedDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */
|
|
787
611
|
set(t, r) {
|
|
788
|
-
return
|
|
612
|
+
return Be(this, t, r);
|
|
789
613
|
}
|
|
790
614
|
/**
|
|
791
615
|
* Returns a new `ZonedDateTime` with the given field adjusted by a specified amount.
|
|
792
616
|
* When the resulting value reaches the limits of the field, it wraps around.
|
|
793
617
|
*/
|
|
794
618
|
cycle(t, r, n) {
|
|
795
|
-
return
|
|
619
|
+
return Ue(this, t, r, n);
|
|
796
620
|
}
|
|
797
621
|
/** Converts the date to a native JavaScript Date object. */
|
|
798
622
|
toDate() {
|
|
799
|
-
return
|
|
623
|
+
return xe(this);
|
|
800
624
|
}
|
|
801
625
|
/** Converts the date to an ISO 8601 formatted string, including the UTC offset and time zone identifier. */
|
|
802
626
|
toString() {
|
|
803
|
-
return
|
|
627
|
+
return Ae(this);
|
|
804
628
|
}
|
|
805
629
|
/** Converts the date to an ISO 8601 formatted string in UTC. */
|
|
806
630
|
toAbsoluteString() {
|
|
@@ -808,19 +632,19 @@ class S {
|
|
|
808
632
|
}
|
|
809
633
|
/** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */
|
|
810
634
|
compare(t) {
|
|
811
|
-
return this.toDate().getTime() -
|
|
635
|
+
return this.toDate().getTime() - De(t, this.timeZone).toDate().getTime();
|
|
812
636
|
}
|
|
813
637
|
constructor(...t) {
|
|
814
|
-
|
|
638
|
+
N(this, qe, {
|
|
815
639
|
writable: !0,
|
|
816
640
|
value: void 0
|
|
817
641
|
});
|
|
818
|
-
let [r, n, a, o, i] = V(t), c = t.shift(),
|
|
819
|
-
this.calendar = r, this.era = n, this.year = a, this.month = o, this.day = i, this.timeZone = c, this.offset =
|
|
642
|
+
let [r, n, a, o, i] = V(t), c = t.shift(), l = t.shift();
|
|
643
|
+
this.calendar = r, this.era = n, this.year = a, this.month = o, this.day = i, this.timeZone = c, this.offset = l, this.hour = t.shift() || 0, this.minute = t.shift() || 0, this.second = t.shift() || 0, this.millisecond = t.shift() || 0, b(this);
|
|
820
644
|
}
|
|
821
645
|
}
|
|
822
|
-
let
|
|
823
|
-
class
|
|
646
|
+
let k = /* @__PURE__ */ new Map();
|
|
647
|
+
class Le {
|
|
824
648
|
/** Formats a date as a string according to the locale and format options passed to the constructor. */
|
|
825
649
|
format(t) {
|
|
826
650
|
return this.formatter.format(t);
|
|
@@ -861,50 +685,50 @@ class ct {
|
|
|
861
685
|
/** Returns the resolved formatting options based on the values passed to the constructor. */
|
|
862
686
|
resolvedOptions() {
|
|
863
687
|
let t = this.formatter.resolvedOptions();
|
|
864
|
-
return
|
|
688
|
+
return Je() && (this.resolvedHourCycle || (this.resolvedHourCycle = Ne(t.locale, this.options)), t.hourCycle = this.resolvedHourCycle, t.hour12 = this.resolvedHourCycle === "h11" || this.resolvedHourCycle === "h12"), t.calendar === "ethiopic-amete-alem" && (t.calendar = "ethioaa"), t;
|
|
865
689
|
}
|
|
866
690
|
constructor(t, r = {}) {
|
|
867
|
-
this.formatter =
|
|
691
|
+
this.formatter = ue(t, r), this.options = r;
|
|
868
692
|
}
|
|
869
693
|
}
|
|
870
|
-
const
|
|
694
|
+
const je = {
|
|
871
695
|
true: {
|
|
872
696
|
// Only Japanese uses the h11 style for 12 hour time. All others use h12.
|
|
873
697
|
ja: "h11"
|
|
874
698
|
},
|
|
875
699
|
false: {}
|
|
876
700
|
};
|
|
877
|
-
function
|
|
878
|
-
if (typeof t.hour12 == "boolean" &&
|
|
701
|
+
function ue(e, t = {}) {
|
|
702
|
+
if (typeof t.hour12 == "boolean" && _e()) {
|
|
879
703
|
t = {
|
|
880
704
|
...t
|
|
881
705
|
};
|
|
882
|
-
let a =
|
|
706
|
+
let a = je[String(t.hour12)][e.split("-")[0]], o = t.hour12 ? "h12" : "h23";
|
|
883
707
|
t.hourCycle = a ?? o, delete t.hour12;
|
|
884
708
|
}
|
|
885
709
|
let r = e + (t ? Object.entries(t).sort((a, o) => a[0] < o[0] ? -1 : 1).join() : "");
|
|
886
|
-
if (
|
|
710
|
+
if (k.has(r)) return k.get(r);
|
|
887
711
|
let n = new Intl.DateTimeFormat(e, t);
|
|
888
|
-
return
|
|
712
|
+
return k.set(r, n), n;
|
|
889
713
|
}
|
|
890
|
-
let
|
|
891
|
-
function
|
|
892
|
-
return
|
|
714
|
+
let A = null;
|
|
715
|
+
function _e() {
|
|
716
|
+
return A == null && (A = new Intl.DateTimeFormat("en-US", {
|
|
893
717
|
hour: "numeric",
|
|
894
718
|
hour12: !1
|
|
895
|
-
}).format(new Date(2020, 2, 3, 0)) === "24"),
|
|
719
|
+
}).format(new Date(2020, 2, 3, 0)) === "24"), A;
|
|
896
720
|
}
|
|
897
|
-
let
|
|
898
|
-
function
|
|
899
|
-
return
|
|
721
|
+
let Z = null;
|
|
722
|
+
function Je() {
|
|
723
|
+
return Z == null && (Z = new Intl.DateTimeFormat("fr", {
|
|
900
724
|
hour: "numeric",
|
|
901
725
|
hour12: !1
|
|
902
|
-
}).resolvedOptions().hourCycle === "h12"),
|
|
726
|
+
}).resolvedOptions().hourCycle === "h12"), Z;
|
|
903
727
|
}
|
|
904
|
-
function
|
|
728
|
+
function Ne(e, t) {
|
|
905
729
|
if (!t.timeStyle && !t.hour) return;
|
|
906
730
|
e = e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/, ""), e += (e.includes("-u-") ? "" : "-u") + "-nu-latn";
|
|
907
|
-
let r =
|
|
731
|
+
let r = ue(e, {
|
|
908
732
|
...t,
|
|
909
733
|
timeZone: void 0
|
|
910
734
|
// use local timezone
|
|
@@ -916,27 +740,10 @@ function Xe(e, t) {
|
|
|
916
740
|
throw new Error("Unexpected hour cycle result");
|
|
917
741
|
}
|
|
918
742
|
export {
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
R as f,
|
|
926
|
-
ae as g,
|
|
927
|
-
ct as h,
|
|
928
|
-
l as i,
|
|
929
|
-
E as j,
|
|
930
|
-
S as k,
|
|
931
|
-
nt as l,
|
|
932
|
-
z as m,
|
|
933
|
-
at as n,
|
|
934
|
-
Ie as o,
|
|
935
|
-
tt as p,
|
|
936
|
-
we as q,
|
|
937
|
-
re as r,
|
|
938
|
-
et as s,
|
|
939
|
-
rt as t,
|
|
940
|
-
it as u,
|
|
941
|
-
ot as v
|
|
743
|
+
Le as $,
|
|
744
|
+
x as a,
|
|
745
|
+
X as b,
|
|
746
|
+
Ve as c,
|
|
747
|
+
ze as d,
|
|
748
|
+
We as e
|
|
942
749
|
};
|