universal-parcel-scraper 0.47.0-main.449 → 0.47.0-main.451
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/browser/scraper.js +1203 -1200
- package/dist/core/detection/detect.d.ts +8 -0
- package/dist/core/detection/detect.js +19 -1
- package/dist/providers/parcelsapp/adapter.js +5 -1
- package/dist/providers/shared/hints.d.ts +2 -2
- package/dist/providers/shared/hints.js +5 -4
- package/package.json +1 -1
package/dist/browser/scraper.js
CHANGED
|
@@ -121,10 +121,10 @@ function ie(e) {
|
|
|
121
121
|
function ae(e) {
|
|
122
122
|
return e.length === 10 && /^\d{10}$/.test(e) && Number(e.slice(0, 9)) % 7 === Number(e[9]);
|
|
123
123
|
}
|
|
124
|
-
function
|
|
124
|
+
function oe(e) {
|
|
125
125
|
return /^\d{2,15}$/.test(e) && Number(e.slice(0, -1)) % 7 === Number(e.at(-1));
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function se(e) {
|
|
128
128
|
if (e.length !== 9 || !/^\d{9}$/.test(e)) return !1;
|
|
129
129
|
let t = Number(e[8]);
|
|
130
130
|
if (Number(e.slice(0, 8)) % 7 === t) return !0;
|
|
@@ -140,23 +140,23 @@ function oe(e) {
|
|
|
140
140
|
].reduce((t, n, r) => t + Number(e[r]) * n, 0) % 11;
|
|
141
141
|
return (n === 11 ? 5 : n === 10 ? 0 : n) === t;
|
|
142
142
|
}
|
|
143
|
-
function
|
|
143
|
+
function ce(e) {
|
|
144
144
|
let t = 11 - [...e].reverse().reduce((e, t, n) => e + Number(t) * (2 + n % 6), 0) % 11;
|
|
145
145
|
return t >= 10 ? 0 : t;
|
|
146
146
|
}
|
|
147
|
-
function ce(e) {
|
|
148
|
-
return /^\d{13}$/.test(e) && se(e.slice(0, 12)) === Number(e[12]);
|
|
149
|
-
}
|
|
150
147
|
function le(e) {
|
|
151
|
-
return /^\d{
|
|
148
|
+
return /^\d{13}$/.test(e) && ce(e.slice(0, 12)) === Number(e[12]);
|
|
152
149
|
}
|
|
153
150
|
function ue(e) {
|
|
151
|
+
return /^\d{2,}$/.test(e) ? (10 - [...e.slice(0, -1)].reverse().reduce((e, t, n) => e + Number(t) * (n % 2 ? 1 : 3), 0) % 10) % 10 === Number(e.at(-1)) : !1;
|
|
152
|
+
}
|
|
153
|
+
function de(e) {
|
|
154
154
|
return /^\d{2,}$/.test(e) ? [...e].reverse().reduce((e, t, n) => {
|
|
155
155
|
let r = Number(t) * (n % 2 ? 2 : 1);
|
|
156
156
|
return e + (r > 9 ? r - 9 : r);
|
|
157
157
|
}, 0) % 10 == 0 : !1;
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function fe(e) {
|
|
160
160
|
if (!/^\d{12}$/.test(e)) return !1;
|
|
161
161
|
let t = [
|
|
162
162
|
3,
|
|
@@ -165,35 +165,35 @@ function de(e) {
|
|
|
165
165
|
];
|
|
166
166
|
return [...e.slice(0, 11)].reduce((e, n, r) => e + Number(n) * t[r % 3], 0) % 11 % 10 === Number(e[11]);
|
|
167
167
|
}
|
|
168
|
-
function fe(e) {
|
|
169
|
-
return e.length === 20 && /^\d{20}$/.test(e) && le(e);
|
|
170
|
-
}
|
|
171
168
|
function pe(e) {
|
|
172
|
-
return e.length === 20 &&
|
|
169
|
+
return e.length === 20 && /^\d{20}$/.test(e) && ue(e);
|
|
170
|
+
}
|
|
171
|
+
function me(e) {
|
|
172
|
+
return e.length === 20 && /^00\d{18}$/.test(e) && ue(e);
|
|
173
173
|
}
|
|
174
174
|
//#endregion
|
|
175
175
|
//#region core/detection/mondialRelay.ts
|
|
176
|
-
function
|
|
176
|
+
function he(e) {
|
|
177
177
|
if (!/^\d{26}$/.test(e)) return !1;
|
|
178
|
-
let t = (e) => String(
|
|
178
|
+
let t = (e) => String(ce(e)), n = Number(e.slice(10, 12)), r = Number(e.slice(12, 14));
|
|
179
179
|
return n > 0 && n <= r && t(e.slice(0, 14)) === e[14] && t(e.slice(15, 25)) === e[25];
|
|
180
180
|
}
|
|
181
181
|
//#endregion
|
|
182
182
|
//#region core/detection/normalize.ts
|
|
183
|
-
function
|
|
183
|
+
function _(e) {
|
|
184
184
|
return e.toUpperCase().replace(/[\s.-]/g, "");
|
|
185
185
|
}
|
|
186
|
-
function
|
|
187
|
-
return /^99990\d{8}$/.test(
|
|
186
|
+
function ge(e) {
|
|
187
|
+
return /^99990\d{8}$/.test(_(e));
|
|
188
188
|
}
|
|
189
|
-
function
|
|
189
|
+
function _e(e, t) {
|
|
190
190
|
if (t === "postlogistics") return ie(e);
|
|
191
|
-
let n =
|
|
192
|
-
return
|
|
191
|
+
let n = _(e);
|
|
192
|
+
return ge(n) ? `${n.slice(0, 3)}.${n.slice(3, 5)}.${n.slice(5)}` : /^\d{18}$/.test(n) ? `${n.slice(0, 2)}.${n.slice(2, 4)}.${n.slice(4, 10)}.${n.slice(10)}` : n;
|
|
193
193
|
}
|
|
194
194
|
//#endregion
|
|
195
195
|
//#region generated/catalog.ts
|
|
196
|
-
var
|
|
196
|
+
var ve = {
|
|
197
197
|
"swiss-post": {
|
|
198
198
|
displayName: "Swiss Post",
|
|
199
199
|
color: "#ffcc00",
|
|
@@ -3945,7 +3945,7 @@ var _e = {
|
|
|
3945
3945
|
confidence: "low"
|
|
3946
3946
|
}]
|
|
3947
3947
|
}
|
|
3948
|
-
},
|
|
3948
|
+
}, ye = /* @__PURE__ */ "swiss-post.swiss-post-cargo.quickpac.planzer.aliexpress.sunyou.hermes.spring-gds.postlogistics.dachser.dhl.dhl-ecommerce.ups.amazon-logistics.amazon-shipping.fedex.gls-ch.dpd.dpd-fr.mondial-relay.relais-colis.la-poste.chronopost.gls-fr.colis-prive.geodis.colisweb.c-chez-vous.heppner.ciblex.paack.asendia.shipup.india-post.hermes-de.gls-de.delivengo.intl-post.unknown.royal-mail.parcelforce.evri.inpost.an-post.bpost.austrian-post.postnord.posti.correos-express.seur.mrw.nacex.ctt.ctt-express.poste-italiane.brt.ecoscooting.tipsa.ukrposhta.usps.canada-post.purolator.canpar.ontrac.speedx.uniuni.landmark-global.old-dominion.spee-dee.gofo.estafeta.correios-br.correos-chile.yunexpress.four-px.blue-dart.delhivery.nz-post.singapore-post.japan-post.sf-express.sto.yunda.yto.zto.jd-logistics.yamato.korea-post.thailand-post.dtdc.australia-post.hongkong-post.pos-malaysia.ninja-van.china-post.packeta.poczta-polska.bring-posten.aramex.tnt.correos-spain.yanwen.the-courier-guy.j-and-t.ems.cne.dhl-ecommerce-es.dhl-ecommerce-nl.dhl-ecommerce-pl.dhl-ecommerce-uk.dhl-express.dpd-de.dpd-uk.ekart.evri-uk.intelcom.j-and-t-cargo.lbc-express.nova-poshta.omgo.sagawa.speedpak.spx-ph.xpressbees".split("."), be = {
|
|
3949
3949
|
"swiss-post": ["swiss-post-1", "swiss-post-2"],
|
|
3950
3950
|
"swiss-post-cargo": ["swiss-post-cargo-sscc", "swiss-post-cargo-pl-reference"],
|
|
3951
3951
|
quickpac: ["quickpac-1"],
|
|
@@ -4234,7 +4234,7 @@ var _e = {
|
|
|
4234
4234
|
speedpak: ["speedpak-1"],
|
|
4235
4235
|
"spx-ph": ["spx-ph-prefixed", "spx-ph-domestic"],
|
|
4236
4236
|
xpressbees: ["xpressbees-awb"]
|
|
4237
|
-
},
|
|
4237
|
+
}, xe = [
|
|
4238
4238
|
"pending",
|
|
4239
4239
|
"registered",
|
|
4240
4240
|
"accepted",
|
|
@@ -4246,16 +4246,16 @@ var _e = {
|
|
|
4246
4246
|
"ready_for_pickup",
|
|
4247
4247
|
"returned",
|
|
4248
4248
|
"exception"
|
|
4249
|
-
],
|
|
4250
|
-
function
|
|
4251
|
-
return new RegExp(
|
|
4249
|
+
], Se = ve["amazon-logistics"].detectionRules[0].pattern;
|
|
4250
|
+
function Ce(e) {
|
|
4251
|
+
return new RegExp(Se).test(e.replace(/[\s.-]/g, "").toUpperCase());
|
|
4252
4252
|
}
|
|
4253
4253
|
//#endregion
|
|
4254
4254
|
//#region core/catalog/amazon.ts
|
|
4255
|
-
function
|
|
4256
|
-
return e !== "amazon-shipping" && (e === "amazon-logistics" ||
|
|
4255
|
+
function we(e, t = "") {
|
|
4256
|
+
return e !== "amazon-shipping" && (e === "amazon-logistics" || Ce(t));
|
|
4257
4257
|
}
|
|
4258
|
-
function
|
|
4258
|
+
function Te(e) {
|
|
4259
4259
|
let t = e.replace(/[\s.-]/g, "").toUpperCase();
|
|
4260
4260
|
return t.startsWith("TBC") ? "ca" : t.startsWith("TBM") ? "com.mx" : {
|
|
4261
4261
|
FR: "fr",
|
|
@@ -4274,10 +4274,10 @@ function we(e) {
|
|
|
4274
4274
|
TR: "com.tr"
|
|
4275
4275
|
}[t.slice(0, 2)] ?? "com";
|
|
4276
4276
|
}
|
|
4277
|
-
function Te(e) {
|
|
4278
|
-
return `https://www.amazon.${we(e)}/gp/your-account/order-history`;
|
|
4279
|
-
}
|
|
4280
4277
|
function Ee(e) {
|
|
4278
|
+
return `https://www.amazon.${Te(e)}/gp/your-account/order-history`;
|
|
4279
|
+
}
|
|
4280
|
+
function De(e) {
|
|
4281
4281
|
return `https://track.amazon.${{
|
|
4282
4282
|
IT: "it",
|
|
4283
4283
|
ES: "es",
|
|
@@ -4286,30 +4286,30 @@ function Ee(e) {
|
|
|
4286
4286
|
TB: "com"
|
|
4287
4287
|
}[e.replace(/[\s.-]/g, "").toUpperCase().slice(0, 2)] ?? "fr"}`;
|
|
4288
4288
|
}
|
|
4289
|
-
function
|
|
4290
|
-
return `${
|
|
4289
|
+
function Oe(e) {
|
|
4290
|
+
return `${De(e)}/tracking/${encodeURIComponent(e.replace(/[\s.-]/g, "").toUpperCase())}`;
|
|
4291
4291
|
}
|
|
4292
4292
|
//#endregion
|
|
4293
4293
|
//#region core/catalog/definitions.ts
|
|
4294
|
-
var
|
|
4295
|
-
function
|
|
4296
|
-
let t =
|
|
4294
|
+
var v = ve;
|
|
4295
|
+
function y(e) {
|
|
4296
|
+
let t = v[e];
|
|
4297
4297
|
if (!t) throw RangeError(`Unknown carrier ${e}`);
|
|
4298
4298
|
return t;
|
|
4299
4299
|
}
|
|
4300
|
-
function Oe(e) {
|
|
4301
|
-
return b(e).timezone ?? "UTC";
|
|
4302
|
-
}
|
|
4303
4300
|
function ke(e) {
|
|
4304
|
-
return
|
|
4301
|
+
return y(e).timezone ?? "UTC";
|
|
4305
4302
|
}
|
|
4306
|
-
function Ae(e
|
|
4307
|
-
return (
|
|
4303
|
+
function Ae(e) {
|
|
4304
|
+
return y(e).tracking.adapter;
|
|
4308
4305
|
}
|
|
4309
4306
|
function je(e, t) {
|
|
4310
|
-
return
|
|
4307
|
+
return (y(e).tracking.requirements ?? []).filter((e) => !e.whenTrackingNumber || RegExp(`^(?:${e.whenTrackingNumber})$`).test(t));
|
|
4308
|
+
}
|
|
4309
|
+
function Me(e, t) {
|
|
4310
|
+
return je(e, t).filter((e) => e.optional !== !0);
|
|
4311
4311
|
}
|
|
4312
|
-
var
|
|
4312
|
+
var Ne = new Set(Object.entries(v).filter(([, e]) => e.tracking.mode === "automatic").map(([e]) => e)), Pe = new Map(Object.entries(v).filter(([e]) => Ne.has(e)).map(([e, t]) => [e, t.tracking.upstreamName ?? t.displayName])), Fe = Object.entries(v).flatMap(([e, t]) => t.linkRules.map((t) => ({
|
|
4313
4313
|
carrier: e,
|
|
4314
4314
|
domains: [...t.domains],
|
|
4315
4315
|
params: t.params ? [...t.params] : void 0,
|
|
@@ -4320,29 +4320,29 @@ var Me = new Set(Object.entries(y).filter(([, e]) => e.tracking.mode === "automa
|
|
|
4320
4320
|
detectFromNumber: t.detectFromNumber,
|
|
4321
4321
|
keepsCapabilityUrl: t.keepsCapabilityUrl
|
|
4322
4322
|
})));
|
|
4323
|
-
function
|
|
4324
|
-
return
|
|
4323
|
+
function Ie(e) {
|
|
4324
|
+
return Fe.filter((t) => t.carrier === e);
|
|
4325
4325
|
}
|
|
4326
|
-
function
|
|
4326
|
+
function Le(e, t) {
|
|
4327
4327
|
return e === t || e.endsWith(`.${t}`);
|
|
4328
4328
|
}
|
|
4329
4329
|
//#endregion
|
|
4330
4330
|
//#region core/catalog/index.ts
|
|
4331
|
-
function
|
|
4332
|
-
let n =
|
|
4333
|
-
if (e === "mondial-relay" &&
|
|
4331
|
+
function Re(e, t) {
|
|
4332
|
+
let n = _(t);
|
|
4333
|
+
if (e === "mondial-relay" && he(n)) return n.slice(0, 12);
|
|
4334
4334
|
if (e === "c-chez-vous") {
|
|
4335
4335
|
let e = /^([A-Z0-9]{11})(\d{5})$/.exec(n);
|
|
4336
4336
|
if (e) return `${e[1]}--${e[2]}`;
|
|
4337
4337
|
}
|
|
4338
4338
|
return e === "the-courier-guy" && /^(DD|LD)([A-Z0-9]{6})$/.exec(n) ? re(n) : e === "postlogistics" ? ie(t) : t;
|
|
4339
4339
|
}
|
|
4340
|
-
function Re(e, t) {
|
|
4341
|
-
if (e === "amazon-logistics") return Te;
|
|
4342
|
-
if (e === "amazon-shipping") return De;
|
|
4343
|
-
if (t) return (n) => t.replace("{trackingNumber}", encodeURIComponent(Le(e, n)));
|
|
4344
|
-
}
|
|
4345
4340
|
function ze(e, t) {
|
|
4341
|
+
if (e === "amazon-logistics") return Ee;
|
|
4342
|
+
if (e === "amazon-shipping") return Oe;
|
|
4343
|
+
if (t) return (n) => t.replace("{trackingNumber}", encodeURIComponent(Re(e, n)));
|
|
4344
|
+
}
|
|
4345
|
+
function Be(e, t) {
|
|
4346
4346
|
return {
|
|
4347
4347
|
id: e,
|
|
4348
4348
|
name: t.displayName,
|
|
@@ -4350,7 +4350,7 @@ function ze(e, t) {
|
|
|
4350
4350
|
countries: t.countries ?? [],
|
|
4351
4351
|
trackingSiteName: t.trackingSiteName,
|
|
4352
4352
|
color: t.color,
|
|
4353
|
-
trackingUrl:
|
|
4353
|
+
trackingUrl: ze(e, t.trackingUrlTemplate),
|
|
4354
4354
|
capabilities: {
|
|
4355
4355
|
tracking: {
|
|
4356
4356
|
mode: t.tracking.mode,
|
|
@@ -4362,27 +4362,27 @@ function ze(e, t) {
|
|
|
4362
4362
|
}
|
|
4363
4363
|
};
|
|
4364
4364
|
}
|
|
4365
|
-
var
|
|
4366
|
-
function
|
|
4367
|
-
let n =
|
|
4365
|
+
var Ve = Object.fromEntries(Object.entries(v).map(([e, t]) => [e, Be(e, t)]));
|
|
4366
|
+
function He(e, t) {
|
|
4367
|
+
let n = Ve[e] ?? Ve.unknown, r = t ? v[n.id].displayNames?.[t] : void 0;
|
|
4368
4368
|
return r ? {
|
|
4369
4369
|
...n,
|
|
4370
4370
|
name: r
|
|
4371
4371
|
} : n;
|
|
4372
4372
|
}
|
|
4373
|
-
var
|
|
4374
|
-
function Ue(e, t) {
|
|
4375
|
-
let n = v(t);
|
|
4376
|
-
return Be[e].capabilities.tracking.requirements.filter((e) => !e.whenTrackingNumber || new RegExp(e.whenTrackingNumber).test(n));
|
|
4377
|
-
}
|
|
4373
|
+
var Ue = Object.values(Ve).filter((e) => e.capabilities.selectable);
|
|
4378
4374
|
function We(e, t) {
|
|
4375
|
+
let n = _(t);
|
|
4376
|
+
return Ve[e].capabilities.tracking.requirements.filter((e) => !e.whenTrackingNumber || new RegExp(e.whenTrackingNumber).test(n));
|
|
4377
|
+
}
|
|
4378
|
+
function Ge(e, t) {
|
|
4379
4379
|
let n = t.trim();
|
|
4380
4380
|
return n ? !e.pattern || new RegExp(e.pattern).test(n) : e.optional === !0;
|
|
4381
4381
|
}
|
|
4382
|
-
function
|
|
4383
|
-
return
|
|
4382
|
+
function Ke(e) {
|
|
4383
|
+
return Ve[e].capabilities.tracking.mode === "automatic";
|
|
4384
4384
|
}
|
|
4385
|
-
function
|
|
4385
|
+
function qe(e, t, n) {
|
|
4386
4386
|
if (!n || ![
|
|
4387
4387
|
"en",
|
|
4388
4388
|
"de",
|
|
@@ -4411,69 +4411,69 @@ function Ke(e, t, n) {
|
|
|
4411
4411
|
}
|
|
4412
4412
|
//#endregion
|
|
4413
4413
|
//#region core/detection/colissimo.ts
|
|
4414
|
-
function
|
|
4415
|
-
return /^[0-9A-Z]{2}\d{11}$/.test(e) &&
|
|
4414
|
+
function Je(e) {
|
|
4415
|
+
return /^[0-9A-Z]{2}\d{11}$/.test(e) && ue(e.slice(2));
|
|
4416
4416
|
}
|
|
4417
4417
|
//#endregion
|
|
4418
4418
|
//#region core/detection/correosSpain.ts
|
|
4419
|
-
var
|
|
4420
|
-
function
|
|
4419
|
+
var Ye = "TRWAGMYFPDXBNJZSQVHLCKE";
|
|
4420
|
+
function Xe(e) {
|
|
4421
4421
|
let t = 0;
|
|
4422
4422
|
for (let n = 0; n < e.length - 1; n++) t += e.charCodeAt(n);
|
|
4423
|
-
return e.length > 1 &&
|
|
4423
|
+
return e.length > 1 && Ye[t % 23] === e.at(-1);
|
|
4424
4424
|
}
|
|
4425
4425
|
//#endregion
|
|
4426
4426
|
//#region core/detection/dpd.ts
|
|
4427
|
-
var
|
|
4428
|
-
function
|
|
4427
|
+
var Ze = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
4428
|
+
function Qe(e) {
|
|
4429
4429
|
let t = 36;
|
|
4430
4430
|
for (let n of e) t += Number(n), t > 36 && (t -= 36), t *= 2, t > 36 && (t -= 37);
|
|
4431
|
-
return
|
|
4431
|
+
return Ze[(37 - t) % 36];
|
|
4432
4432
|
}
|
|
4433
|
-
function
|
|
4434
|
-
return /^\d{14}[0-9A-Z]$/.test(e) && e[14] ===
|
|
4433
|
+
function $e(e) {
|
|
4434
|
+
return /^\d{14}[0-9A-Z]$/.test(e) && e[14] === Qe(e.slice(0, 14));
|
|
4435
4435
|
}
|
|
4436
4436
|
//#endregion
|
|
4437
4437
|
//#region core/detection/ups.ts
|
|
4438
|
-
function $e(e) {
|
|
4439
|
-
return /\d/.test(e) ? Number(e) : (e.charCodeAt(0) - 63) % 10;
|
|
4440
|
-
}
|
|
4441
4438
|
function et(e) {
|
|
4442
|
-
return (
|
|
4439
|
+
return /\d/.test(e) ? Number(e) : (e.charCodeAt(0) - 63) % 10;
|
|
4443
4440
|
}
|
|
4444
4441
|
function tt(e) {
|
|
4445
|
-
return
|
|
4442
|
+
return (10 - [...e].reduce((e, t, n) => e + et(t) * (n % 2 ? 2 : 1), 0) % 10) % 10;
|
|
4446
4443
|
}
|
|
4447
4444
|
function nt(e) {
|
|
4448
|
-
return /^[
|
|
4445
|
+
return /^1Z[0-9A-Z]{15}\d$/.test(e) && tt(e.slice(2, 17)) === Number(e[17]);
|
|
4449
4446
|
}
|
|
4450
|
-
//#endregion
|
|
4451
|
-
//#region core/detection/evri.ts
|
|
4452
4447
|
function rt(e) {
|
|
4453
|
-
return /^[
|
|
4448
|
+
return /^[CD]\d{14}$/.test(e) && tt(e.slice(0, 14)) === Number(e[14]);
|
|
4454
4449
|
}
|
|
4455
4450
|
//#endregion
|
|
4456
|
-
//#region core/detection/
|
|
4451
|
+
//#region core/detection/evri.ts
|
|
4457
4452
|
function it(e) {
|
|
4458
|
-
return /^
|
|
4453
|
+
return /^[HT][0-9A-Z]{5}\d{10}$/.test(e) ? [...e.slice(0, 15)].reduce((e, t, n) => e + et(t) * (n % 2 ? 1 : 2), 0) % 10 === Number(e[15]) : !1;
|
|
4459
4454
|
}
|
|
4455
|
+
//#endregion
|
|
4456
|
+
//#region core/detection/fedex.ts
|
|
4460
4457
|
function at(e) {
|
|
4461
|
-
return
|
|
4458
|
+
return /^96\d{20}$/.test(e) && ue(e.slice(7));
|
|
4459
|
+
}
|
|
4460
|
+
function ot(e) {
|
|
4461
|
+
return /^\d{20}00\d{12}$/.test(e) && fe(e.slice(22));
|
|
4462
4462
|
}
|
|
4463
4463
|
//#endregion
|
|
4464
4464
|
//#region core/detection/gls.ts
|
|
4465
|
-
function
|
|
4465
|
+
function st(e) {
|
|
4466
4466
|
return /^\d{12}$/.test(e) ? (10 - [...e.slice(0, 11)].reverse().reduce((e, t, n) => e + Number(t) * (n % 2 == 0 ? 3 : 1), 1) % 10) % 10 === Number(e[11]) : !1;
|
|
4467
4467
|
}
|
|
4468
4468
|
//#endregion
|
|
4469
4469
|
//#region core/detection/hermes.ts
|
|
4470
|
-
function
|
|
4470
|
+
function ct(e) {
|
|
4471
4471
|
return /^\d{14}$/.test(e) ? (10 - [...e.slice(0, 13)].reduce((e, t, n) => e + Number(t) * (n % 2 == 0 ? 3 : 1), 0) % 10) % 10 === Number(e[13]) : !1;
|
|
4472
4472
|
}
|
|
4473
4473
|
//#endregion
|
|
4474
4474
|
//#region core/detection/s10.ts
|
|
4475
|
-
function
|
|
4476
|
-
let t =
|
|
4475
|
+
function lt(e) {
|
|
4476
|
+
let t = _(e);
|
|
4477
4477
|
if (!/^[A-Z]{2}\d{9}[A-Z]{2}$/.test(t)) return !1;
|
|
4478
4478
|
let n = 11 - [
|
|
4479
4479
|
8,
|
|
@@ -4487,13 +4487,13 @@ function ct(e) {
|
|
|
4487
4487
|
].reduce((e, n, r) => e + Number(t[r + 2]) * n, 0) % 11, r = n === 10 ? 0 : n === 11 ? 5 : n;
|
|
4488
4488
|
return Number(t[10]) === r;
|
|
4489
4489
|
}
|
|
4490
|
-
function
|
|
4491
|
-
let t =
|
|
4492
|
-
return /^L[A-Z]\d{9}CH$/.test(t) &&
|
|
4490
|
+
function ut(e) {
|
|
4491
|
+
let t = _(e);
|
|
4492
|
+
return /^L[A-Z]\d{9}CH$/.test(t) && lt(t);
|
|
4493
4493
|
}
|
|
4494
4494
|
//#endregion
|
|
4495
4495
|
//#region core/detection/sfExpress.ts
|
|
4496
|
-
function
|
|
4496
|
+
function dt(e) {
|
|
4497
4497
|
let t = /^(?:\d{12}|SF\d{13})$/.test(e) ? e.replace(/^SF/, "") : null;
|
|
4498
4498
|
return t ? (10 - [...t.slice(3, -1)].reverse().reduce((e, t, n) => {
|
|
4499
4499
|
let r = Number(t) * (2 * n + 1);
|
|
@@ -4502,71 +4502,74 @@ function ut(e) {
|
|
|
4502
4502
|
}
|
|
4503
4503
|
//#endregion
|
|
4504
4504
|
//#region core/detection/usps.ts
|
|
4505
|
-
function
|
|
4505
|
+
function ft(e) {
|
|
4506
4506
|
if (!/^(?:9[1-5]\d{20}|9[2-4]\d{24})$/.test(e)) return !1;
|
|
4507
4507
|
let t = 0;
|
|
4508
4508
|
for (let n = e.length - 1; n >= 0; n--) t += Number(e[n]) * ((e.length - 1 - n) % 2 == 0 ? 1 : 3);
|
|
4509
4509
|
return t % 10 == 0;
|
|
4510
4510
|
}
|
|
4511
|
-
function
|
|
4512
|
-
let t =
|
|
4513
|
-
if (
|
|
4511
|
+
function pt(e) {
|
|
4512
|
+
let t = _(e);
|
|
4513
|
+
if (ft(t)) return t;
|
|
4514
4514
|
if (!/^420\d{27}(?:\d{4})?$/.test(t)) return null;
|
|
4515
|
-
let n = [t.slice(8), t.slice(12)].filter(
|
|
4515
|
+
let n = [t.slice(8), t.slice(12)].filter(ft);
|
|
4516
4516
|
return n.length === 1 ? n[0] : null;
|
|
4517
4517
|
}
|
|
4518
|
-
function
|
|
4519
|
-
return
|
|
4518
|
+
function mt(e) {
|
|
4519
|
+
return pt(e) !== null;
|
|
4520
4520
|
}
|
|
4521
4521
|
//#endregion
|
|
4522
4522
|
//#region core/detection/checksums.ts
|
|
4523
|
-
var
|
|
4524
|
-
"mondial-relay":
|
|
4525
|
-
s10:
|
|
4526
|
-
hermes:
|
|
4527
|
-
gls:
|
|
4523
|
+
var ht = {
|
|
4524
|
+
"mondial-relay": he,
|
|
4525
|
+
s10: lt,
|
|
4526
|
+
hermes: ct,
|
|
4527
|
+
gls: st,
|
|
4528
4528
|
"dhl-express": ae,
|
|
4529
|
-
tnt:
|
|
4530
|
-
"poczta-polska":
|
|
4531
|
-
"correos-spain":
|
|
4532
|
-
dpd:
|
|
4533
|
-
usps:
|
|
4534
|
-
sscc:
|
|
4535
|
-
ups:
|
|
4536
|
-
colissimo:
|
|
4537
|
-
ukrposhta:
|
|
4538
|
-
evri:
|
|
4539
|
-
mod7:
|
|
4540
|
-
gs1:
|
|
4541
|
-
ontrac:
|
|
4542
|
-
luhn:
|
|
4543
|
-
fedex:
|
|
4544
|
-
"sf-express":
|
|
4545
|
-
"fedex-ground-96":
|
|
4546
|
-
"fedex-1d":
|
|
4529
|
+
tnt: se,
|
|
4530
|
+
"poczta-polska": pe,
|
|
4531
|
+
"correos-spain": Xe,
|
|
4532
|
+
dpd: $e,
|
|
4533
|
+
usps: mt,
|
|
4534
|
+
sscc: me,
|
|
4535
|
+
ups: nt,
|
|
4536
|
+
colissimo: Je,
|
|
4537
|
+
ukrposhta: le,
|
|
4538
|
+
evri: it,
|
|
4539
|
+
mod7: oe,
|
|
4540
|
+
gs1: ue,
|
|
4541
|
+
ontrac: rt,
|
|
4542
|
+
luhn: de,
|
|
4543
|
+
fedex: fe,
|
|
4544
|
+
"sf-express": dt,
|
|
4545
|
+
"fedex-ground-96": at,
|
|
4546
|
+
"fedex-1d": ot
|
|
4547
4547
|
};
|
|
4548
4548
|
//#endregion
|
|
4549
4549
|
//#region core/detection/cttExpress.ts
|
|
4550
|
-
function
|
|
4550
|
+
function gt(e) {
|
|
4551
4551
|
return /^00\d{20}(?:001)?$/.test(e);
|
|
4552
4552
|
}
|
|
4553
4553
|
//#endregion
|
|
4554
4554
|
//#region core/detection/detect.ts
|
|
4555
|
-
function
|
|
4556
|
-
return e.checksum === void 0 ||
|
|
4555
|
+
function _t(e, t) {
|
|
4556
|
+
return e.checksum === void 0 || ht[e.checksum](t);
|
|
4557
|
+
}
|
|
4558
|
+
function vt(e, t, n) {
|
|
4559
|
+
return new RegExp(e.pattern).test(t) && (!e.rawPattern || new RegExp(e.rawPattern).test(n));
|
|
4557
4560
|
}
|
|
4558
|
-
function
|
|
4559
|
-
for (let [i, a] of
|
|
4560
|
-
if (
|
|
4561
|
+
function yt(e, t, n, r) {
|
|
4562
|
+
for (let [i, a] of v[e].detectionRules.entries()) if (vt(a, t, n)) {
|
|
4563
|
+
if (_t(a, t)) return a;
|
|
4561
4564
|
r.push({
|
|
4562
4565
|
carrier: e,
|
|
4563
|
-
id:
|
|
4566
|
+
id: be[e][i],
|
|
4564
4567
|
rule: a
|
|
4565
4568
|
});
|
|
4566
4569
|
}
|
|
4567
4570
|
}
|
|
4568
|
-
function
|
|
4569
|
-
let t = e.trim().toUpperCase(), n =
|
|
4571
|
+
function bt(e) {
|
|
4572
|
+
let t = e.trim().toUpperCase(), n = _(e);
|
|
4570
4573
|
if (!n) return {
|
|
4571
4574
|
detection: {
|
|
4572
4575
|
carrier: "unknown",
|
|
@@ -4577,9 +4580,9 @@ function vt(e) {
|
|
|
4577
4580
|
rejections: []
|
|
4578
4581
|
};
|
|
4579
4582
|
let r = [], i = [];
|
|
4580
|
-
for (let e of Object.keys(
|
|
4581
|
-
if (e === "ctt-express" && !
|
|
4582
|
-
let a =
|
|
4583
|
+
for (let e of Object.keys(v)) {
|
|
4584
|
+
if (e === "ctt-express" && !gt(n)) continue;
|
|
4585
|
+
let a = yt(e, n, t, i);
|
|
4583
4586
|
a && r.push({
|
|
4584
4587
|
carrier: e,
|
|
4585
4588
|
confidence: a.confidence,
|
|
@@ -4609,32 +4612,32 @@ function vt(e) {
|
|
|
4609
4612
|
rejections: l
|
|
4610
4613
|
};
|
|
4611
4614
|
}
|
|
4612
|
-
function
|
|
4613
|
-
return
|
|
4615
|
+
function b(e) {
|
|
4616
|
+
return bt(e).detection;
|
|
4614
4617
|
}
|
|
4615
|
-
function
|
|
4616
|
-
return
|
|
4618
|
+
function xt(e) {
|
|
4619
|
+
return bt(e).rejections;
|
|
4617
4620
|
}
|
|
4618
|
-
function
|
|
4619
|
-
return
|
|
4621
|
+
function St(e) {
|
|
4622
|
+
return b(e).carrier;
|
|
4620
4623
|
}
|
|
4621
4624
|
//#endregion
|
|
4622
4625
|
//#region core/detection/valid.ts
|
|
4623
|
-
function
|
|
4626
|
+
function Ct(e) {
|
|
4624
4627
|
return e.length >= 4 && e.length <= 40 && (/^[A-Z0-9]+$/.test(e) || /^\d{4}\/\d{8}$/.test(e));
|
|
4625
4628
|
}
|
|
4626
|
-
function
|
|
4627
|
-
let t =
|
|
4628
|
-
return
|
|
4629
|
+
function wt(e) {
|
|
4630
|
+
let t = _(e);
|
|
4631
|
+
return Ct(t) ? /\d/.test(t) || /^[A-Za-z]{6,10}$/.test(e.trim()) && b(t).confidence !== "none" : !1;
|
|
4629
4632
|
}
|
|
4630
|
-
function
|
|
4631
|
-
let t =
|
|
4632
|
-
return
|
|
4633
|
+
function Tt(e) {
|
|
4634
|
+
let t = _(e);
|
|
4635
|
+
return Ct(t) && /\d/.test(t);
|
|
4633
4636
|
}
|
|
4634
4637
|
//#endregion
|
|
4635
4638
|
//#region core/detection/candidates.ts
|
|
4636
|
-
var
|
|
4637
|
-
RegExp(`\\b${
|
|
4639
|
+
var Et = [
|
|
4640
|
+
RegExp(`\\b${Se.slice(1, -1).replaceAll("[0-9]", "(?:[\\s.-]*[0-9])")}\\b`, "gi"),
|
|
4638
4641
|
/\b\d{4}\/\d{8}\b/g,
|
|
4639
4642
|
/\b\d{26}\b/g,
|
|
4640
4643
|
/\bH\d{15,19}\b/gi,
|
|
@@ -4645,44 +4648,44 @@ var wt = [
|
|
|
4645
4648
|
/\b\d(?:[\s.-]?\d){9,19}\b/g,
|
|
4646
4649
|
/\b[A-Z0-9]{4,40}\b/gi
|
|
4647
4650
|
];
|
|
4648
|
-
function
|
|
4649
|
-
for (let t of
|
|
4651
|
+
function Dt(e) {
|
|
4652
|
+
for (let t of Et) {
|
|
4650
4653
|
t.lastIndex = 0;
|
|
4651
4654
|
for (let n of e.matchAll(t)) {
|
|
4652
4655
|
let e = n[0].trim();
|
|
4653
|
-
if (
|
|
4656
|
+
if (b(e).confidence === "high") return e;
|
|
4654
4657
|
}
|
|
4655
4658
|
}
|
|
4656
4659
|
}
|
|
4657
|
-
var
|
|
4658
|
-
function
|
|
4659
|
-
let t =
|
|
4660
|
-
return t &&
|
|
4660
|
+
var Ot = String.raw`(?:numbers?(?![A-Z])|no\.|(?:no|id)(?![A-Z0-9.]))`, kt = new RegExp(String.raw`(?:track(?:ing)?(?:\s*${Ot}|(?![A-Z]))` + String.raw`|(?:parcel|shipment)(?:\s+(?:tracking(?![A-Z])|${Ot})|(?![A-Z])))` + String.raw`(?:\s+is(?![A-Z0-9]))?\s*[:#-]?\s*` + String.raw`((?=[A-Z0-9.-]{0,39}\d)[A-Z0-9][A-Z0-9.-]{3,39})`, "i");
|
|
4661
|
+
function At(e) {
|
|
4662
|
+
let t = kt.exec(e)?.[1]?.replace(/[.-]+$/, "");
|
|
4663
|
+
return t && Tt(t) ? t : void 0;
|
|
4661
4664
|
}
|
|
4662
4665
|
//#endregion
|
|
4663
4666
|
//#region core/detection/parse.ts
|
|
4664
|
-
function
|
|
4667
|
+
function jt(e) {
|
|
4665
4668
|
return e.replace(/^[\s<'"(\x5b]+/, "").replace(/[\s>'")\],;.!?]+$/, "");
|
|
4666
4669
|
}
|
|
4667
|
-
function
|
|
4670
|
+
function Mt(e) {
|
|
4668
4671
|
return e.split(/[,|]/, 1)[0].trim();
|
|
4669
4672
|
}
|
|
4670
|
-
function
|
|
4673
|
+
function Nt(e, t) {
|
|
4671
4674
|
let n = new Set(t.map((e) => e.toLowerCase()));
|
|
4672
4675
|
for (let [t, r] of e.searchParams) if (n.has(t.toLowerCase()) && r.trim()) return r;
|
|
4673
4676
|
}
|
|
4674
|
-
function
|
|
4675
|
-
let n = t.params ?
|
|
4676
|
-
return
|
|
4677
|
+
function Pt(e, t) {
|
|
4678
|
+
let n = t.params ? Nt(e, t.params) : void 0, r = t.query?.exec(decodeURIComponent(e.search.slice(1)))?.[1], i = t.path?.exec(e.pathname)?.[1], a = t.fragment?.exec(decodeURIComponent(e.hash.slice(1)))?.[1], o = Mt(n ?? r ?? i ?? a ?? "");
|
|
4679
|
+
return wt(o) ? o : void 0;
|
|
4677
4680
|
}
|
|
4678
|
-
function
|
|
4681
|
+
function Ft(e, t) {
|
|
4679
4682
|
return {
|
|
4680
4683
|
trackingNumber: e,
|
|
4681
4684
|
source: t,
|
|
4682
|
-
...
|
|
4685
|
+
...b(e)
|
|
4683
4686
|
};
|
|
4684
4687
|
}
|
|
4685
|
-
function
|
|
4688
|
+
function It(e) {
|
|
4686
4689
|
let t = e.trim();
|
|
4687
4690
|
if (!t) return {
|
|
4688
4691
|
trackingNumber: "",
|
|
@@ -4694,14 +4697,14 @@ function Pt(e) {
|
|
|
4694
4697
|
};
|
|
4695
4698
|
let n = t.match(/https?:\/\/[^\s<>"']+/gi) ?? [];
|
|
4696
4699
|
for (let e of n) {
|
|
4697
|
-
let t =
|
|
4700
|
+
let t = jt(e);
|
|
4698
4701
|
try {
|
|
4699
|
-
let e = new URL(t), n =
|
|
4702
|
+
let e = new URL(t), n = Fe.filter((t) => t.domains.some((t) => Le(e.hostname.toLowerCase(), t)) && (!t.pathPattern || t.pathPattern.test(e.pathname))), r = (t) => Math.max(...t.domains.filter((t) => Le(e.hostname.toLowerCase(), t)).map((e) => e.length));
|
|
4700
4703
|
n.sort((e, t) => r(t) - r(e));
|
|
4701
4704
|
for (let r of n) {
|
|
4702
|
-
let i =
|
|
4705
|
+
let i = Pt(e, r);
|
|
4703
4706
|
if (i) {
|
|
4704
|
-
let e =
|
|
4707
|
+
let e = b(i), a = n.filter((t) => e.candidates.includes(t.carrier)), o = new Set(a.map((e) => e.carrier));
|
|
4705
4708
|
if (r.detectFromNumber && (e.confidence === "high" || e.confidence === "low" && o.size > 1)) return {
|
|
4706
4709
|
trackingNumber: i,
|
|
4707
4710
|
...e,
|
|
@@ -4719,14 +4722,14 @@ function Pt(e) {
|
|
|
4719
4722
|
};
|
|
4720
4723
|
}
|
|
4721
4724
|
}
|
|
4722
|
-
let i =
|
|
4723
|
-
if (i) return
|
|
4725
|
+
let i = Dt(decodeURIComponent(e.href));
|
|
4726
|
+
if (i) return Ft(i, "link");
|
|
4724
4727
|
} catch {}
|
|
4725
4728
|
}
|
|
4726
|
-
let r =
|
|
4727
|
-
if (r) return
|
|
4728
|
-
let i =
|
|
4729
|
-
return i ?
|
|
4729
|
+
let r = Dt(t);
|
|
4730
|
+
if (r) return Ft(r, t === r ? "number" : "text");
|
|
4731
|
+
let i = At(t);
|
|
4732
|
+
return i ? Ft(i, "text") : !t.includes("://") && wt(t) ? Ft(t, "number") : {
|
|
4730
4733
|
trackingNumber: "",
|
|
4731
4734
|
carrier: "unknown",
|
|
4732
4735
|
confidence: "none",
|
|
@@ -4737,19 +4740,19 @@ function Pt(e) {
|
|
|
4737
4740
|
}
|
|
4738
4741
|
//#endregion
|
|
4739
4742
|
//#region core/types.ts
|
|
4740
|
-
function
|
|
4743
|
+
function Lt(e) {
|
|
4741
4744
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
4742
4745
|
}
|
|
4743
4746
|
//#endregion
|
|
4744
4747
|
//#region core/result/index.ts
|
|
4745
|
-
var
|
|
4748
|
+
var Rt = /* @__PURE__ */ new Set([
|
|
4746
4749
|
"pending",
|
|
4747
4750
|
"in_transit",
|
|
4748
4751
|
"out_for_delivery",
|
|
4749
4752
|
"delivered",
|
|
4750
4753
|
"exception",
|
|
4751
4754
|
"unknown"
|
|
4752
|
-
]),
|
|
4755
|
+
]), zt = new Set(xe), Bt = [
|
|
4753
4756
|
"current_stage_source",
|
|
4754
4757
|
"last_status_text",
|
|
4755
4758
|
"last_update",
|
|
@@ -4763,45 +4766,45 @@ var It = /* @__PURE__ */ new Set([
|
|
|
4763
4766
|
"canonical_tracking_number",
|
|
4764
4767
|
"international_tracking_number",
|
|
4765
4768
|
"timezone"
|
|
4766
|
-
],
|
|
4769
|
+
], Vt = [
|
|
4767
4770
|
"time",
|
|
4768
4771
|
"location",
|
|
4769
4772
|
"description",
|
|
4770
4773
|
"stage",
|
|
4771
4774
|
"stage_source"
|
|
4772
4775
|
];
|
|
4773
|
-
function
|
|
4776
|
+
function Ht(e, t) {
|
|
4774
4777
|
let n = (e) => typeof e == "string" && e.trim() ? Number(e) : e, r = n(e), i = n(t);
|
|
4775
4778
|
return typeof r != "number" || typeof i != "number" || !Number.isFinite(r) || !Number.isFinite(i) || Math.abs(r) > 90 || Math.abs(i) > 180 || r === 0 && i === 0 ? null : {
|
|
4776
4779
|
latitude: Math.round(r * 1e4) / 1e4,
|
|
4777
4780
|
longitude: Math.round(i * 1e4) / 1e4
|
|
4778
4781
|
};
|
|
4779
4782
|
}
|
|
4780
|
-
function
|
|
4781
|
-
if (!
|
|
4783
|
+
function Ut(e) {
|
|
4784
|
+
if (!Lt(e)) throw TypeError("The carrier adapter returned an invalid response");
|
|
4782
4785
|
let t = { ...e };
|
|
4783
|
-
if (t.status = typeof e.status == "string" &&
|
|
4784
|
-
if (typeof e.current_stage != "string" || !
|
|
4786
|
+
if (t.status = typeof e.status == "string" && Rt.has(e.status) ? e.status : "unknown", e.current_stage !== void 0) {
|
|
4787
|
+
if (typeof e.current_stage != "string" || !zt.has(e.current_stage)) throw TypeError("The carrier adapter returned an invalid current stage");
|
|
4785
4788
|
t.current_stage = e.current_stage;
|
|
4786
4789
|
}
|
|
4787
|
-
for (let e of
|
|
4790
|
+
for (let e of Bt) {
|
|
4788
4791
|
let n = t[e];
|
|
4789
4792
|
if (n != null && typeof n != "string") throw TypeError(`The carrier adapter returned an invalid ${e.replaceAll("_", " ")}`);
|
|
4790
4793
|
}
|
|
4791
4794
|
let n = t.weight_kg;
|
|
4792
4795
|
if (n != null && (typeof n != "number" || !Number.isFinite(n) || n < 0)) throw TypeError("The carrier adapter returned an invalid parcel weight");
|
|
4793
|
-
(t.delivery_carrier != null && (typeof t.delivery_carrier != "string" || !Object.hasOwn(
|
|
4796
|
+
(t.delivery_carrier != null && (typeof t.delivery_carrier != "string" || !Object.hasOwn(ve, t.delivery_carrier)) || t.delivery_tracking_number != null && (typeof t.delivery_tracking_number != "string" || !/^[A-Z0-9]{4,40}$/.test(t.delivery_tracking_number))) && (delete t.delivery_carrier, delete t.delivery_tracking_number), (typeof t.destination_country != "string" || !/^[A-Z]{2}$/.test(t.destination_country)) && delete t.destination_country, (typeof t.destination_country_name != "string" || t.destination_country_name.length > 80) && delete t.destination_country_name;
|
|
4794
4797
|
let r = t.events ?? [];
|
|
4795
4798
|
if (!Array.isArray(r)) throw TypeError("The carrier adapter returned invalid tracking events");
|
|
4796
4799
|
return t.events = r.map((e) => {
|
|
4797
|
-
if (!
|
|
4798
|
-
for (let t of
|
|
4800
|
+
if (!Lt(e)) throw TypeError("The carrier adapter returned an invalid tracking event");
|
|
4801
|
+
for (let t of Vt) {
|
|
4799
4802
|
let n = e[t];
|
|
4800
4803
|
if (n != null && typeof n != "string") throw TypeError("The carrier adapter returned an invalid tracking event");
|
|
4801
4804
|
}
|
|
4802
4805
|
let t = { ...e };
|
|
4803
4806
|
if (t.point !== void 0) {
|
|
4804
|
-
let e =
|
|
4807
|
+
let e = Lt(t.point) ? Ht(t.point.latitude, t.point.longitude) : null;
|
|
4805
4808
|
e ? t.point = e : delete t.point;
|
|
4806
4809
|
}
|
|
4807
4810
|
return t;
|
|
@@ -4809,31 +4812,31 @@ function Vt(e) {
|
|
|
4809
4812
|
}
|
|
4810
4813
|
//#endregion
|
|
4811
4814
|
//#region core/status/language.ts
|
|
4812
|
-
function
|
|
4815
|
+
function Wt(e) {
|
|
4813
4816
|
let t = e.toLowerCase().replace(/[’‘]/g, "'").replace(/\s+/g, " ").replace(/\bwon't\b/g, "will not").replace(/\bshan't\b/g, "shall not").replace(/\bcan't\b|\bcannot\b/g, "can not").replace(/\b([a-z]+)n't\b/g, "$1 not");
|
|
4814
4817
|
return /\b(?:will|would|should|shall|must|may|might|can|could|ought to|needs? to|to) (?:(?:not|never|yet|still|already|soon|shortly|eventually|possibly|probably) )*(?:be|have been) delivered (?:back )?to (?:the )?(?:sender|shipper)\b|\b(?:not|never)(?: yet| already| still)? (?:(?:have|has|be|been|being) )*delivered (?:back )?to (?:the )?(?:sender|shipper)\b|\bbeing delivered (?:back )?to (?:the )?(?:sender|shipper)\b/.test(t) ? !0 : /\breturn(?:ing)? to (?:the )?sender\b|\b(?:will|would|should|shall|must|may|might|can|could|ought to|needs? to|to) (?:(?:not|never|yet|still|already|soon|shortly|eventually|possibly|probably) )*(?:be|have been) returned to (?:the )?sender\b|\b(?:not|never)(?: yet| already| still)? (?:(?:have|has|be|been|being) )*returned to (?:the )?sender\b|\bbeing returned to (?:the )?sender\b|\breturn (?:has been )?(?:initiated|requested|started)\b/.test(t);
|
|
4815
4818
|
}
|
|
4816
|
-
function
|
|
4819
|
+
function Gt(e) {
|
|
4817
4820
|
return e.toLowerCase().normalize("NFD").replace(/\p{Diacritic}/gu, "").replace(/[’‘]/g, "'").replace(/ł/g, "l").replace(/[_–—-]/g, " ").replace(/\s+/g, " ").trim().replace(/[.!]+$/, "");
|
|
4818
4821
|
}
|
|
4819
|
-
var
|
|
4822
|
+
var Kt = String.raw`(?:[^.;!?]|\.(?=\S))`, qt = RegExp(`(?:${[
|
|
4820
4823
|
String.raw`\b(?:will|would|shall|should|may|might|must|won't|can(?! ?not\b)|could(?! not\b))(?: (?:not|now|then|still|also|likely|probably|possibly|hopefully|soon|shortly|only|normally|usually|again|today|tomorrow))* be delivered\b(?! (?:back )?to (?:the )?(?:sender|shipper)\b)`,
|
|
4821
4824
|
String.raw`\b(?:sera|seront|serait|seraient|va etre|vont etre|doit etre|doivent etre|devrait etre|devraient etre|pourra etre|pourront etre|pourrait etre)(?: \w+){0,2}? livree?s?\b(?! a l'expediteur)`,
|
|
4822
|
-
String.raw`\b(?:wird|werden|soll|sollte|sollen|sollten)\b${
|
|
4823
|
-
String.raw`\bvoraussichtlich\w*\b${
|
|
4825
|
+
String.raw`\b(?:wird|werden|soll|sollte|sollen|sollten)\b${Kt}*?(?<!\bnicht )\bzugestellt\b`,
|
|
4826
|
+
String.raw`\bvoraussichtlich\w*\b${Kt}*?\b(?:zugestellt|zustellung)\b|\b(?:zustellung|zustelltermin) (?:(?:ist|erfolgt) )?(?:voraussichtlich|geplant)\b`,
|
|
4824
4827
|
String.raw`\b(?:sara|saranno|verra|verranno|potra essere|potrebbe essere|dovrebbe essere|dovra essere)(?: \w+){0,2}? consegnat[oaie]\b(?! al mittente)`,
|
|
4825
4828
|
String.raw`(?<!\bnao )\b(?:sera|seran|serao|va a ser|van a ser|vai ser|vao ser)(?: (?:hoy|manana|hoje|amanha|pronto|proximamente|brevemente|en breve|em breve))? (?:entregad[oa]s?|repartid[oa]s?|entregues?)\b(?! (?:al|ao|a la|a) (?:remitente|remetente|origen|origem)\b)|\bse (?:le |te |lo |la |les )?entregaran?\b`
|
|
4826
|
-
].join("|")})${
|
|
4827
|
-
function
|
|
4828
|
-
let t =
|
|
4829
|
-
return n === t ? void 0 :
|
|
4829
|
+
].join("|")})${Kt}*`, "g");
|
|
4830
|
+
function Jt(e) {
|
|
4831
|
+
let t = Gt(e), n = t.replace(qt, " ");
|
|
4832
|
+
return n === t ? void 0 : Gt(n.replace(/^[\s,;:.!?]+|[\s,;:]+$/g, ""));
|
|
4830
4833
|
}
|
|
4831
|
-
function
|
|
4832
|
-
let t =
|
|
4834
|
+
function Yt(e) {
|
|
4835
|
+
let t = Gt(e);
|
|
4833
4836
|
if (/^wird zugestellt$/.test(t)) return "out_for_delivery";
|
|
4834
|
-
let n =
|
|
4835
|
-
if (n !== void 0) return n ?
|
|
4836
|
-
if (
|
|
4837
|
+
let n = Jt(t);
|
|
4838
|
+
if (n !== void 0) return n ? Yt(n) : void 0;
|
|
4839
|
+
if (Wt(t) || /\b(?:en|em) (?:proceso de |processo de )?devolu(?:cion|cao)\b|^devolu(?:cion|cao)$|\bdevolu(?:cion|cao) (?:en curso|em curso|iniciada|solicitada|en transito|em transito)\b|\bdevolu(?:cion|cao) (?:al|ao|a la|a) (?:remitente|remetente|origen|origem)\b(?! (?:completad|finalizad|concluid|entregad|entregue|realizad|efectuad|efetuad))|\ben camino (?:de vuelta |de regreso )?(?:al|hacia el) remitente\b|\b(?:a caminho (?:de volta )?(?:do|ao)|em transito para o) remetente\b|\b(?:siendo|sendo|a ser) (?:(?:devuelt|devolvid)[oa]s?|entregad[oa]s? al remitente|entregues? ao remetente)\b|\b(?:no|nao) (?:(?:ha|han|se|fue|foi|foram|sido|ser|sera|puede|pode|pudo|podido|todavia|aun|ainda|ya|ja) )*(?:(?:devuelt|devolvid)[oa]s?|entregad[oa]s? al remitente|entregues? ao remetente)\b|\b(?:sera|seran|serao|va a ser|vai ser|puede ser|pode ser|debe ser|deve ser|devera ser) (?:(?:pronto|proximamente|en breve|em breve|brevemente) )?(?:(?:devuelt|devolvid)[oa]s?|entregad[oa]s? al remitente|entregues? ao remetente)\b|\bse (?:le )?devolvera\b/.test(t)) return "exception";
|
|
4837
4840
|
if (/returned to (?:the )?sender|retour(?:ne)? a l'expediteur|zuruck an (?:den )?absender|an (?:den )?absender zuruck|retour a l'expediteur|reso al mittente|restituit[oa] al mittente|delivered (?:back )?to (?:the )?(?:sender|shipper)/.test(t) || /^(?:(?:envio|paquete|pedido|objeto|encomenda|pacote|remessa) )?(?:devuelt|devolvid)[oa]$|\b(?:devuelt|devolvid|retornad)[oa]s? (?:al|ao|a la|a) (?:remitente|remetente|origen|origem)\b|\bentregad[oa]s? al remitente\b|\bentregues? ao remetente\b|\bdevolu(?:cion|cao) (?:(?:al|ao|a la|a) (?:remitente|remetente|origen|origem) )?(?:completad|finalizad|concluid|entregad|entregue|realizad|efectuad|efetuad)/.test(t)) return "returned";
|
|
4838
4841
|
if (/not (?:yet )?delivered|\bundelivered\b|could not.*deliver|\bcan(?: ?not|'t) be delivered\b|unable to deliver|delivery (?:attempt|failed)|non livre|n'(?:a|avons) (?:pas )?pu.*(?:remis|remettre)|n'a pas pu etre (?:distribue|livre)|livraison (?:impossible|echouee)|tentative de livraison|nicht zugestellt|nicht zugestellt werden|zustellung.*(?:fehlgeschlagen|nicht moglich)|zustellversuch|non consegnat[oa]|non e stato possibile consegnare|consegna (?:fallita|non riuscita)|tentativo di consegna/.test(t) || /\bno (?:(?:ha|han|hemos|se|le|lo|la|fue|sido|ser|es|era|pudo|puede|podido|posible|todavia|aun) )*(?:entregad[oa]s?|entregar(?:lo|la|le|se)?|repartid[oa]s?|realizar la entrega|efectuar la entrega)\b|\bsin entregar\b|\b(?:entrega|reparto) (?:fallid[oa]|imposible|no (?:(?:ha|han|se|fue|sido|ser|pudo|puede|podido) )*(?:realizad[oa]|efectuad[oa]|completad[oa]|posible|conseguid[oa]))\b|\bimposible (?:entregar|realizar la entrega|efectuar la entrega)\b|\bfallo (?:en la|de) entrega\b|\bintento fallido\b|\bintento de (?:entrega|reparto)\b(?! (?:programad|previst|para (?:hoy|manana|el)|manana|hoy))|\bnao (?:(?:foi|foram|ser|sera|pode|podemos|conseguimos|conseguiu|se|possivel|e|ainda|tem sido|esta|estava) )*(?:entregues?|entregar|efetuar a entrega|efectuar a entrega|realizar a entrega)\b|\bentrega (?:falhada|sem sucesso|impossivel|nao (?:(?:foi|pode|ser|sera|tem sido) )*(?:efetuada|efectuada|realizada|conseguida|concretizada|possivel))\b|\bfalha (?:na|de) entrega\b|\btentativa (?:de entrega|sem sucesso)\b(?! (?:agendada|prevista|programada|para (?:hoje|amanha)|amanha|hoje))|\bcarteiro nao atendido\b/.test(t) || !/\bpick ?up (?:attempt|was attempted|unsuccessful|failed)|attempted (?:to )?pick ?up/.test(t) && /(?:attempted|tried) to deliver|\battempted delivery\b(?! (?:is )?(?:scheduled|planned|expected|tomorrow|will)\b)|unsuccessful delivery|delivery (?:was )?unsuccessful|unable to complete (?:the |your |this )?delivery|(?<!\bif (?:the |your )?)\b(?:recipient|addressee|consignee|customer|receiver|user)(?: was| is)? (?:not (?:at home|home|available|present)|unavailable|absent)\b|absence of (?:the )?(?:recipient|addressee|consignee)|\bbusiness (?:was |is )?closed\b|destinataire absent|(?:entreprise|societe) (?:etait |est )?fermee?\b|nicht angetroffen|(?:firma|betrieb|geschaft) (?:war |ist )?geschlossen|destinatario assente|(?:attivita|azienda|ditta) (?:era |e )?chiusa/.test(t) || !/\bintento de recogida\b|\brecogida (?:fallida|no realizada|no efectuada)\b|\btentativa de (?:recolha|coleta)\b|\b(?:recolha|coleta) (?:falhada|sem sucesso|nao (?:realizada|efetuada|efectuada))\b/.test(t) && !/\b(?:si|caso)\b[^.;:]*\b(?:ausen|nadie|ninguem|cerrad|fechad|no (?:esta|se encuentra)|nao (?:esta|se encontra))|\bse (?:o |a )?(?:destinatari[oa] |cliente )?(?:estiver|for|nao estiver)\b/.test(t) && /\bausen(?:te|tes|cia)\b|\b(?:destinatari[oa]|cliente|consignatari[oa]) (?:no (?:esta|estaba|se encuentra|se encontraba|disponible|presente)|nao (?:esta|estava|se encontra|se encontrava|disponivel|presente))\b|\bnadie en (?:casa|el domicilio)\b|\bninguem em casa\b|\b(?:establecimiento|negocio|empresa|comercio|tienda) (?:esta |estaba |se encontraba )?cerrad[oa]\b|\b(?:estabelecimento|empresa|loja|comercio|negocio) (?:esta |estava |se encontrava )?fechad[oa]\b/.test(t)) return "failed_attempt";
|
|
4839
4842
|
if (/\b(?:damaged|broken in transit)\b|endommag|avarie|deterior|beschadigt|danneggiat|danad[oa]|danificad|uszkodzon/.test(t) || /\blost (?:in transit|package|parcel|shipment)?\b|colis perdu|envoi perdu|egare|verloren|verlust der sendung|smarrit|(?:paquete|envio) perdid|extraviad|zagubion|zaginion/.test(t) || /refused by (?:the )?(?:recipient|consignee)|\brefused\b|rejected by (?:the )?recipient|refus(?:e|ee)? par le destinataire|refus du destinataire|(?:colis|envoi|pli) refuse|annahme verweigert|verweigert|rifiutat|rechazad|recusad|odmowa przyjecia|odmowiono przyjecia/.test(t) || /address (?:incomplete|incorrect|invalid|insufficient|unknown)|(?:incorrect|incomplete|insufficient|wrong|invalid) address|(?:updated|correct(?:ed)?|complete) (?:delivery )?address (?:is )?(?:required|needed)|address(?:ee)? (?:unknown|cannot be located)|recipient unknown|adresse (?:incorrecte|incomplete|erronee|invalide|inconnue)|destinataire inconnu|(?:adresse|anschrift) (?:unvollstandig|falsch|unbekannt)|empfanger unbekannt|indirizzo (?:errato|incompleto|insufficiente|sconosciuto)|destinatario sconosciuto|direccion (?:incorrecta|incompleta|erronea|desconocida)|destinatario desconocido|endereco (?:incorreto|incompleto|errado|desconhecido)|destinatario desconhecido|adres (?:niepelny|nieprawidlowy|bledny)|nieznany adresat/.test(t) || /customs (?:issue|problem|hold)|held (?:by|in|at) customs|detained by customs|probleme de douane|retenu en douane|zollproblem|vom zoll zuruckgehalten|problema doganale|fermo in dogana|problema de aduana|retenido en aduana|problema (?:alfandegario|na alfandega)|retido na alfandega|problem celny|zatrzyman[ay] przez (?:urzad celny|cel)/.test(t) || /(?:shipment|parcel|package) (?:is )?(?:held|blocked|on hold)|held pending|awaiting (?:your )?instructions|action required|(?:colis|envoi|pli) (?:bloque|retenu)|en attente d'instructions|action requise|sendung (?:blockiert|zuruckgehalten|angehalten)|wartet auf anweisungen|handlung erforderlich|spedizione (?:bloccata|trattenuta)|in attesa di istruzioni|envio (?:bloqueado|retenido)|en espera de instrucciones|accion requerida|encomenda (?:bloqueada|retida)|aguarda instrucoes|acao necessaria|przesylka (?:zatrzymana|wstrzymana)|oczekuje na instrukcje/.test(t) || /\bincident\b|\banomal(?:y|ie|ia)\b|delivery exception|shipment exception|irregularit|unregelmassigkeit|storung|vorfall|inconveniente|incidencia|nieprawidlowosc/.test(t)) return "exception";
|
|
@@ -4854,18 +4857,18 @@ function qt(e) {
|
|
|
4854
4857
|
if (/^(?:posting\/collection|posted|origin scan)$|received at (?:our |the )?(?:[a-z]+ )?origin (?:office|facility|hub)|dropped off (?:after|before) (?:the )?latest drop ?off time/.test(t) || /accepted|picked up|pick up was successful|^drop off$|pick ?up scan|prepared the package for return to ups or pickup by ups|handed (?:over )?to (?:dpd|gls)|package received at dhl|item booked|consignment was mailed|posted at a postal point|pris en charge|prise en charge|collecte.*(?:reussi|effectue)|recupere.*boite aux lettres|depose.*point postal|remis a (?:dpd|gls)|envoi.*depose|abholung.*erfolgreich|eingeliefert|an (?:dpd|gls) ubergeben|paket.*(?:angenommen|ubernommen)|ritiro.*(?:riuscito|effettuato)|pres[oa] in carico|affidat[oa] a (?:dpd|gls)|depositat.*punto postale|spedizione.*impostata/.test(t)) return "accepted";
|
|
4855
4858
|
if (/transit|\bline ?haul\b|en route|on (?:its|the) way|\bfacility\b|airport|\bleaving\b|\bdispatched\b|^delay(?:ed)?$|received by (?:the )?(?:local )?(?:delivery|logistics) company|received by postnl|notification.*sent to the recipient|delivery option requested|instruction de livraison recue|expedie (?:depuis|du|de)\b|acheminement|unterwegs|transport|trasport|arriv|depart|processed|processing completed|sorted|sorting|\btri\b|trie|traitement|traite|sortier|bearbeitet|bearbeitung|elaborat|elaborazion|smistat|parcel cent(?:er|re)|delivery cent(?:er|re)|centre.*(?:colis|distribution)|paketzentrum|verteilzentrum|centro.*(?:pacchi|distribuzione)|depot|import scan|scan.*import|importscan|scansione.*import|delivery.*delayed|livraison.*retard|zustellung.*verzogert|consegna.*ritard|transferred|transfere|weitergeleitet|inoltrato|left.*(?:point|center)|quitte|verlassen|raggiunto|close bag|fermeture du sac|sack.*geschlossen|chiusura.*sacco|scanned into|scanne dans|eingescannt|scansionat|\bloaded\b|^(?:item|parcel|shipment) distributed$|charg.*vehicule de transport|transportfahrzeug.*geladen|caric.*veicolo.*trasporto/.test(t) || /^enviad[oa]$|\bclasificad[oa]s?\b|\bclasificacion\b|\ben ruta\b|\ben camino\b|\bllegad[oa]s? (?:a|al|en)\b|\bllegada (?:a|al|en|de)\b|\bha llegado\b|\bllego (?:a|al)\b|\bsalida (?:de|del|desde)\b|\b(?:ha )?salido (?:de|del)\b|\bsalio (?:de|del)\b|\ben destino\b|\b(?:agencia|delegacion|plataforma|oficina|franquicia) (?:de )?destino\b|\b(?:unidad|centro|oficina|delegacion|base|agencia|plataforma) de reparto\b|\bcentro (?:de )?(?:clasificacion|distribucion|tratamiento|logistico|operaciones|operativo)\b|\blectura\b|\bleid[oa]s?\b|\brecepcionad[oa]s?\b|\bprocesad[oa]s?\b|\bexpedid[oa]s?\b|\btriagem\b|\btriad[oa]s?\b|\bem tratamento\b|\btratad[oa]s?\b|\bcentro (?:de )?(?:distribuicao|tratamento|triagem|operacional)\b|\bchegad[ao] (?:a|ao|no|na|em)\b|\bchegou (?:a|ao|no|na|em)\b|\bsaida (?:do|da|de|dos|das)\b|\bsaiu (?:do|da|de|dos|das)\b|\bem rota\b|\ba caminho\b|\bencaminhad[oa]s?\b|\b(?:em )?transferencia\b|\btransferid[oa]s?\b|\bprocessad[oa]s?\b|\brecebid[oa] (?:no|na|em) (?:centro|armazem|unidade|plataforma)\b|\brecibid[oa] en (?:el |la |nuestr[oa] )?(?:almacen|centro|delegacion|plataforma|hub|agencia)\b/.test(t)) return "in_transit";
|
|
4856
4859
|
}
|
|
4857
|
-
function
|
|
4860
|
+
function Xt(e) {
|
|
4858
4861
|
return e === "registered" || e === "pending" ? "pending" : e === "delivered" ? "delivered" : e === "out_for_delivery" || e === "ready_for_pickup" ? "out_for_delivery" : e === "returned" || e === "failed_attempt" || e === "exception" ? "exception" : "in_transit";
|
|
4859
4862
|
}
|
|
4860
4863
|
//#endregion
|
|
4861
4864
|
//#region core/status/wording.ts
|
|
4862
|
-
function
|
|
4865
|
+
function Zt(e, t = "in_transit") {
|
|
4863
4866
|
let n = (e, t) => ({
|
|
4864
4867
|
stage: e,
|
|
4865
4868
|
source: `wording:${t}`
|
|
4866
|
-
}), r =
|
|
4869
|
+
}), r = Yt(e);
|
|
4867
4870
|
if (r) return n(r, "language");
|
|
4868
|
-
let i = (
|
|
4871
|
+
let i = (Jt(e) ?? e).toLocaleLowerCase("en-US").replaceAll("_", " ").trim().split(/\s+/).join(" ");
|
|
4869
4872
|
return i.includes("to be delivered") ? n("in_transit", "to_be_delivered") : i === "reported" ? n("registered", "reported") : [
|
|
4870
4873
|
"will shortly be handed over",
|
|
4871
4874
|
"shipment information received",
|
|
@@ -5015,187 +5018,187 @@ function Yt(e, t = "in_transit") {
|
|
|
5015
5018
|
source: "none"
|
|
5016
5019
|
};
|
|
5017
5020
|
}
|
|
5018
|
-
function
|
|
5019
|
-
return
|
|
5021
|
+
function Qt(e, t = "in_transit") {
|
|
5022
|
+
return Zt(e, t).stage;
|
|
5020
5023
|
}
|
|
5021
5024
|
//#endregion
|
|
5022
5025
|
//#region node_modules/luxon/build/es6/luxon.mjs
|
|
5023
|
-
var
|
|
5026
|
+
var x = class extends Error {}, $t = class extends x {
|
|
5024
5027
|
constructor(e) {
|
|
5025
5028
|
super(`Invalid DateTime: ${e.toMessage()}`);
|
|
5026
5029
|
}
|
|
5027
|
-
},
|
|
5030
|
+
}, en = class extends x {
|
|
5028
5031
|
constructor(e) {
|
|
5029
5032
|
super(`Invalid Interval: ${e.toMessage()}`);
|
|
5030
5033
|
}
|
|
5031
|
-
},
|
|
5034
|
+
}, tn = class extends x {
|
|
5032
5035
|
constructor(e) {
|
|
5033
5036
|
super(`Invalid Duration: ${e.toMessage()}`);
|
|
5034
5037
|
}
|
|
5035
|
-
},
|
|
5038
|
+
}, nn = class extends x {}, rn = class extends x {
|
|
5036
5039
|
constructor(e) {
|
|
5037
5040
|
super(`Invalid unit ${e}`);
|
|
5038
5041
|
}
|
|
5039
|
-
},
|
|
5042
|
+
}, S = class extends x {}, C = class extends x {
|
|
5040
5043
|
constructor() {
|
|
5041
5044
|
super("Zone is an abstract class");
|
|
5042
5045
|
}
|
|
5043
|
-
},
|
|
5044
|
-
year:
|
|
5045
|
-
month:
|
|
5046
|
-
day:
|
|
5047
|
-
}, nn = {
|
|
5048
|
-
year: E,
|
|
5049
|
-
month: D,
|
|
5050
|
-
day: E
|
|
5051
|
-
}, rn = {
|
|
5052
|
-
year: E,
|
|
5053
|
-
month: D,
|
|
5054
|
-
day: E,
|
|
5055
|
-
weekday: D
|
|
5056
|
-
}, an = {
|
|
5057
|
-
year: E,
|
|
5058
|
-
month: O,
|
|
5059
|
-
day: E
|
|
5046
|
+
}, w = "numeric", T = "short", E = "long", an = {
|
|
5047
|
+
year: w,
|
|
5048
|
+
month: w,
|
|
5049
|
+
day: w
|
|
5060
5050
|
}, on = {
|
|
5061
|
-
year:
|
|
5062
|
-
month:
|
|
5063
|
-
day:
|
|
5064
|
-
weekday: O
|
|
5051
|
+
year: w,
|
|
5052
|
+
month: T,
|
|
5053
|
+
day: w
|
|
5065
5054
|
}, sn = {
|
|
5066
|
-
|
|
5067
|
-
|
|
5055
|
+
year: w,
|
|
5056
|
+
month: T,
|
|
5057
|
+
day: w,
|
|
5058
|
+
weekday: T
|
|
5068
5059
|
}, cn = {
|
|
5069
|
-
|
|
5070
|
-
|
|
5071
|
-
|
|
5060
|
+
year: w,
|
|
5061
|
+
month: E,
|
|
5062
|
+
day: w
|
|
5072
5063
|
}, ln = {
|
|
5073
|
-
|
|
5074
|
-
|
|
5075
|
-
|
|
5076
|
-
|
|
5064
|
+
year: w,
|
|
5065
|
+
month: E,
|
|
5066
|
+
day: w,
|
|
5067
|
+
weekday: E
|
|
5077
5068
|
}, un = {
|
|
5078
|
-
hour:
|
|
5079
|
-
minute:
|
|
5080
|
-
second: E,
|
|
5081
|
-
timeZoneName: O
|
|
5069
|
+
hour: w,
|
|
5070
|
+
minute: w
|
|
5082
5071
|
}, dn = {
|
|
5083
|
-
hour:
|
|
5084
|
-
minute:
|
|
5085
|
-
|
|
5072
|
+
hour: w,
|
|
5073
|
+
minute: w,
|
|
5074
|
+
second: w
|
|
5086
5075
|
}, fn = {
|
|
5087
|
-
hour:
|
|
5088
|
-
minute:
|
|
5089
|
-
second:
|
|
5090
|
-
|
|
5076
|
+
hour: w,
|
|
5077
|
+
minute: w,
|
|
5078
|
+
second: w,
|
|
5079
|
+
timeZoneName: T
|
|
5091
5080
|
}, pn = {
|
|
5092
|
-
hour:
|
|
5093
|
-
minute:
|
|
5094
|
-
second:
|
|
5095
|
-
|
|
5096
|
-
timeZoneName: D
|
|
5081
|
+
hour: w,
|
|
5082
|
+
minute: w,
|
|
5083
|
+
second: w,
|
|
5084
|
+
timeZoneName: E
|
|
5097
5085
|
}, mn = {
|
|
5098
|
-
hour:
|
|
5099
|
-
minute:
|
|
5100
|
-
|
|
5101
|
-
hourCycle: "h23",
|
|
5102
|
-
timeZoneName: O
|
|
5086
|
+
hour: w,
|
|
5087
|
+
minute: w,
|
|
5088
|
+
hourCycle: "h23"
|
|
5103
5089
|
}, hn = {
|
|
5104
|
-
|
|
5105
|
-
|
|
5106
|
-
|
|
5107
|
-
|
|
5108
|
-
minute: E
|
|
5090
|
+
hour: w,
|
|
5091
|
+
minute: w,
|
|
5092
|
+
second: w,
|
|
5093
|
+
hourCycle: "h23"
|
|
5109
5094
|
}, gn = {
|
|
5110
|
-
|
|
5111
|
-
|
|
5112
|
-
|
|
5113
|
-
|
|
5114
|
-
|
|
5115
|
-
second: E
|
|
5095
|
+
hour: w,
|
|
5096
|
+
minute: w,
|
|
5097
|
+
second: w,
|
|
5098
|
+
hourCycle: "h23",
|
|
5099
|
+
timeZoneName: T
|
|
5116
5100
|
}, _n = {
|
|
5117
|
-
|
|
5118
|
-
|
|
5119
|
-
|
|
5120
|
-
|
|
5121
|
-
|
|
5101
|
+
hour: w,
|
|
5102
|
+
minute: w,
|
|
5103
|
+
second: w,
|
|
5104
|
+
hourCycle: "h23",
|
|
5105
|
+
timeZoneName: E
|
|
5122
5106
|
}, vn = {
|
|
5123
|
-
year:
|
|
5124
|
-
month:
|
|
5125
|
-
day:
|
|
5126
|
-
hour:
|
|
5127
|
-
minute:
|
|
5128
|
-
second: E
|
|
5107
|
+
year: w,
|
|
5108
|
+
month: w,
|
|
5109
|
+
day: w,
|
|
5110
|
+
hour: w,
|
|
5111
|
+
minute: w
|
|
5129
5112
|
}, yn = {
|
|
5130
|
-
year:
|
|
5131
|
-
month:
|
|
5132
|
-
day:
|
|
5133
|
-
|
|
5134
|
-
|
|
5135
|
-
|
|
5113
|
+
year: w,
|
|
5114
|
+
month: w,
|
|
5115
|
+
day: w,
|
|
5116
|
+
hour: w,
|
|
5117
|
+
minute: w,
|
|
5118
|
+
second: w
|
|
5136
5119
|
}, bn = {
|
|
5137
|
-
year:
|
|
5138
|
-
month:
|
|
5139
|
-
day:
|
|
5140
|
-
hour:
|
|
5141
|
-
minute:
|
|
5142
|
-
timeZoneName: D
|
|
5120
|
+
year: w,
|
|
5121
|
+
month: T,
|
|
5122
|
+
day: w,
|
|
5123
|
+
hour: w,
|
|
5124
|
+
minute: w
|
|
5143
5125
|
}, xn = {
|
|
5144
|
-
year:
|
|
5145
|
-
month:
|
|
5146
|
-
day:
|
|
5147
|
-
hour:
|
|
5148
|
-
minute:
|
|
5149
|
-
second:
|
|
5150
|
-
timeZoneName: D
|
|
5126
|
+
year: w,
|
|
5127
|
+
month: T,
|
|
5128
|
+
day: w,
|
|
5129
|
+
hour: w,
|
|
5130
|
+
minute: w,
|
|
5131
|
+
second: w
|
|
5151
5132
|
}, Sn = {
|
|
5152
|
-
year:
|
|
5153
|
-
month:
|
|
5154
|
-
day:
|
|
5155
|
-
weekday:
|
|
5156
|
-
hour:
|
|
5157
|
-
minute:
|
|
5158
|
-
timeZoneName: O
|
|
5133
|
+
year: w,
|
|
5134
|
+
month: T,
|
|
5135
|
+
day: w,
|
|
5136
|
+
weekday: T,
|
|
5137
|
+
hour: w,
|
|
5138
|
+
minute: w
|
|
5159
5139
|
}, Cn = {
|
|
5160
|
-
year:
|
|
5161
|
-
month:
|
|
5162
|
-
day:
|
|
5163
|
-
|
|
5164
|
-
|
|
5165
|
-
|
|
5166
|
-
|
|
5167
|
-
|
|
5168
|
-
|
|
5140
|
+
year: w,
|
|
5141
|
+
month: E,
|
|
5142
|
+
day: w,
|
|
5143
|
+
hour: w,
|
|
5144
|
+
minute: w,
|
|
5145
|
+
timeZoneName: T
|
|
5146
|
+
}, wn = {
|
|
5147
|
+
year: w,
|
|
5148
|
+
month: E,
|
|
5149
|
+
day: w,
|
|
5150
|
+
hour: w,
|
|
5151
|
+
minute: w,
|
|
5152
|
+
second: w,
|
|
5153
|
+
timeZoneName: T
|
|
5154
|
+
}, Tn = {
|
|
5155
|
+
year: w,
|
|
5156
|
+
month: E,
|
|
5157
|
+
day: w,
|
|
5158
|
+
weekday: E,
|
|
5159
|
+
hour: w,
|
|
5160
|
+
minute: w,
|
|
5161
|
+
timeZoneName: E
|
|
5162
|
+
}, En = {
|
|
5163
|
+
year: w,
|
|
5164
|
+
month: E,
|
|
5165
|
+
day: w,
|
|
5166
|
+
weekday: E,
|
|
5167
|
+
hour: w,
|
|
5168
|
+
minute: w,
|
|
5169
|
+
second: w,
|
|
5170
|
+
timeZoneName: E
|
|
5171
|
+
}, Dn = class {
|
|
5169
5172
|
get type() {
|
|
5170
|
-
throw new
|
|
5173
|
+
throw new C();
|
|
5171
5174
|
}
|
|
5172
5175
|
get name() {
|
|
5173
|
-
throw new
|
|
5176
|
+
throw new C();
|
|
5174
5177
|
}
|
|
5175
5178
|
get ianaName() {
|
|
5176
5179
|
return this.name;
|
|
5177
5180
|
}
|
|
5178
5181
|
get isUniversal() {
|
|
5179
|
-
throw new
|
|
5182
|
+
throw new C();
|
|
5180
5183
|
}
|
|
5181
5184
|
offsetName(e, t) {
|
|
5182
|
-
throw new
|
|
5185
|
+
throw new C();
|
|
5183
5186
|
}
|
|
5184
5187
|
formatOffset(e, t) {
|
|
5185
|
-
throw new
|
|
5188
|
+
throw new C();
|
|
5186
5189
|
}
|
|
5187
5190
|
offset(e) {
|
|
5188
|
-
throw new
|
|
5191
|
+
throw new C();
|
|
5189
5192
|
}
|
|
5190
5193
|
equals(e) {
|
|
5191
|
-
throw new
|
|
5194
|
+
throw new C();
|
|
5192
5195
|
}
|
|
5193
5196
|
get isValid() {
|
|
5194
|
-
throw new
|
|
5197
|
+
throw new C();
|
|
5195
5198
|
}
|
|
5196
|
-
},
|
|
5199
|
+
}, On = null, kn = class e extends Dn {
|
|
5197
5200
|
static get instance() {
|
|
5198
|
-
return
|
|
5201
|
+
return On === null && (On = new e()), On;
|
|
5199
5202
|
}
|
|
5200
5203
|
get type() {
|
|
5201
5204
|
return "system";
|
|
@@ -5207,10 +5210,10 @@ var S = class extends Error {}, Zt = class extends S {
|
|
|
5207
5210
|
return !1;
|
|
5208
5211
|
}
|
|
5209
5212
|
offsetName(e, { format: t, locale: n }) {
|
|
5210
|
-
return
|
|
5213
|
+
return ri(e, t, n);
|
|
5211
5214
|
}
|
|
5212
5215
|
formatOffset(e, t) {
|
|
5213
|
-
return
|
|
5216
|
+
return si(this.offset(e), t);
|
|
5214
5217
|
}
|
|
5215
5218
|
offset(e) {
|
|
5216
5219
|
return -new Date(e).getTimezoneOffset();
|
|
@@ -5221,9 +5224,9 @@ var S = class extends Error {}, Zt = class extends S {
|
|
|
5221
5224
|
get isValid() {
|
|
5222
5225
|
return !0;
|
|
5223
5226
|
}
|
|
5224
|
-
},
|
|
5225
|
-
function
|
|
5226
|
-
let t =
|
|
5227
|
+
}, An = /* @__PURE__ */ new Map();
|
|
5228
|
+
function jn(e) {
|
|
5229
|
+
let t = An.get(e);
|
|
5227
5230
|
return t === void 0 && (t = new Intl.DateTimeFormat("en-US", {
|
|
5228
5231
|
hour12: !1,
|
|
5229
5232
|
timeZone: e,
|
|
@@ -5234,9 +5237,9 @@ function On(e) {
|
|
|
5234
5237
|
minute: "2-digit",
|
|
5235
5238
|
second: "2-digit",
|
|
5236
5239
|
era: "short"
|
|
5237
|
-
}),
|
|
5240
|
+
}), An.set(e, t)), t;
|
|
5238
5241
|
}
|
|
5239
|
-
var
|
|
5242
|
+
var Mn = {
|
|
5240
5243
|
year: 0,
|
|
5241
5244
|
month: 1,
|
|
5242
5245
|
day: 2,
|
|
@@ -5245,7 +5248,7 @@ var kn = {
|
|
|
5245
5248
|
minute: 5,
|
|
5246
5249
|
second: 6
|
|
5247
5250
|
};
|
|
5248
|
-
function
|
|
5251
|
+
function Nn(e, t) {
|
|
5249
5252
|
let n = e.format(t).replace(/\u200E/g, ""), [, r, i, a, o, s, c, l] = /(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n);
|
|
5250
5253
|
return [
|
|
5251
5254
|
a,
|
|
@@ -5257,21 +5260,21 @@ function An(e, t) {
|
|
|
5257
5260
|
l
|
|
5258
5261
|
];
|
|
5259
5262
|
}
|
|
5260
|
-
function
|
|
5263
|
+
function Pn(e, t) {
|
|
5261
5264
|
let n = e.formatToParts(t), r = [];
|
|
5262
5265
|
for (let e = 0; e < n.length; e++) {
|
|
5263
|
-
let { type: t, value: i } = n[e], a =
|
|
5264
|
-
t === "era" ? r[a] = i :
|
|
5266
|
+
let { type: t, value: i } = n[e], a = Mn[t];
|
|
5267
|
+
t === "era" ? r[a] = i : P(a) || (r[a] = parseInt(i, 10));
|
|
5265
5268
|
}
|
|
5266
5269
|
return r;
|
|
5267
5270
|
}
|
|
5268
|
-
var
|
|
5271
|
+
var Fn = /* @__PURE__ */ new Map(), In = class e extends Dn {
|
|
5269
5272
|
static create(t) {
|
|
5270
|
-
let n =
|
|
5271
|
-
return n === void 0 &&
|
|
5273
|
+
let n = Fn.get(t);
|
|
5274
|
+
return n === void 0 && Fn.set(t, n = new e(t)), n;
|
|
5272
5275
|
}
|
|
5273
5276
|
static resetCache() {
|
|
5274
|
-
|
|
5277
|
+
Fn.clear(), An.clear();
|
|
5275
5278
|
}
|
|
5276
5279
|
static isValidSpecifier(e) {
|
|
5277
5280
|
return this.isValidZone(e);
|
|
@@ -5297,18 +5300,18 @@ var Mn = /* @__PURE__ */ new Map(), Nn = class e extends wn {
|
|
|
5297
5300
|
return !1;
|
|
5298
5301
|
}
|
|
5299
5302
|
offsetName(e, { format: t, locale: n }) {
|
|
5300
|
-
return
|
|
5303
|
+
return ri(e, t, n, this.name);
|
|
5301
5304
|
}
|
|
5302
5305
|
formatOffset(e, t) {
|
|
5303
|
-
return
|
|
5306
|
+
return si(this.offset(e), t);
|
|
5304
5307
|
}
|
|
5305
5308
|
offset(e) {
|
|
5306
5309
|
if (!this.valid) return NaN;
|
|
5307
5310
|
let t = new Date(e);
|
|
5308
5311
|
if (isNaN(t)) return NaN;
|
|
5309
|
-
let n =
|
|
5312
|
+
let n = jn(this.name), [r, i, a, o, s, c, l] = n.formatToParts ? Pn(n, t) : Nn(n, t);
|
|
5310
5313
|
o === "BC" && (r = -Math.abs(r) + 1);
|
|
5311
|
-
let u =
|
|
5314
|
+
let u = $r({
|
|
5312
5315
|
year: r,
|
|
5313
5316
|
month: i,
|
|
5314
5317
|
day: a,
|
|
@@ -5325,48 +5328,48 @@ var Mn = /* @__PURE__ */ new Map(), Nn = class e extends wn {
|
|
|
5325
5328
|
get isValid() {
|
|
5326
5329
|
return this.valid;
|
|
5327
5330
|
}
|
|
5328
|
-
},
|
|
5329
|
-
function
|
|
5330
|
-
let n = JSON.stringify([e, t]), r =
|
|
5331
|
-
return r || (r = new Intl.ListFormat(e, t),
|
|
5332
|
-
}
|
|
5333
|
-
var
|
|
5334
|
-
function
|
|
5335
|
-
let n = JSON.stringify([e, t]), r =
|
|
5336
|
-
return r === void 0 && (r = new Intl.DateTimeFormat(e, t),
|
|
5337
|
-
}
|
|
5338
|
-
var
|
|
5339
|
-
function
|
|
5340
|
-
let n = JSON.stringify([e, t]), r =
|
|
5341
|
-
return r === void 0 && (r = new Intl.NumberFormat(e, t),
|
|
5342
|
-
}
|
|
5343
|
-
var
|
|
5344
|
-
function
|
|
5345
|
-
let { base: n, ...r } = t, i = JSON.stringify([e, r]), a =
|
|
5346
|
-
return a === void 0 && (a = new Intl.RelativeTimeFormat(e, t),
|
|
5347
|
-
}
|
|
5348
|
-
var
|
|
5349
|
-
function
|
|
5350
|
-
return
|
|
5351
|
-
}
|
|
5352
|
-
var
|
|
5353
|
-
function
|
|
5354
|
-
let t =
|
|
5355
|
-
return t === void 0 && (t = new Intl.DateTimeFormat(e).resolvedOptions(),
|
|
5356
|
-
}
|
|
5357
|
-
var
|
|
5358
|
-
function
|
|
5359
|
-
let t =
|
|
5331
|
+
}, Ln = {};
|
|
5332
|
+
function Rn(e, t = {}) {
|
|
5333
|
+
let n = JSON.stringify([e, t]), r = Ln[n];
|
|
5334
|
+
return r || (r = new Intl.ListFormat(e, t), Ln[n] = r), r;
|
|
5335
|
+
}
|
|
5336
|
+
var zn = /* @__PURE__ */ new Map();
|
|
5337
|
+
function Bn(e, t = {}) {
|
|
5338
|
+
let n = JSON.stringify([e, t]), r = zn.get(n);
|
|
5339
|
+
return r === void 0 && (r = new Intl.DateTimeFormat(e, t), zn.set(n, r)), r;
|
|
5340
|
+
}
|
|
5341
|
+
var Vn = /* @__PURE__ */ new Map();
|
|
5342
|
+
function Hn(e, t = {}) {
|
|
5343
|
+
let n = JSON.stringify([e, t]), r = Vn.get(n);
|
|
5344
|
+
return r === void 0 && (r = new Intl.NumberFormat(e, t), Vn.set(n, r)), r;
|
|
5345
|
+
}
|
|
5346
|
+
var Un = /* @__PURE__ */ new Map();
|
|
5347
|
+
function Wn(e, t = {}) {
|
|
5348
|
+
let { base: n, ...r } = t, i = JSON.stringify([e, r]), a = Un.get(i);
|
|
5349
|
+
return a === void 0 && (a = new Intl.RelativeTimeFormat(e, t), Un.set(i, a)), a;
|
|
5350
|
+
}
|
|
5351
|
+
var Gn = null;
|
|
5352
|
+
function Kn() {
|
|
5353
|
+
return Gn || (Gn = new Intl.DateTimeFormat().resolvedOptions().locale, Gn);
|
|
5354
|
+
}
|
|
5355
|
+
var qn = /* @__PURE__ */ new Map();
|
|
5356
|
+
function Jn(e) {
|
|
5357
|
+
let t = qn.get(e);
|
|
5358
|
+
return t === void 0 && (t = new Intl.DateTimeFormat(e).resolvedOptions(), qn.set(e, t)), t;
|
|
5359
|
+
}
|
|
5360
|
+
var Yn = /* @__PURE__ */ new Map();
|
|
5361
|
+
function Xn(e) {
|
|
5362
|
+
let t = Yn.get(e);
|
|
5360
5363
|
if (!t) {
|
|
5361
5364
|
let n = new Intl.Locale(e);
|
|
5362
5365
|
t = "getWeekInfo" in n ? n.getWeekInfo() : n.weekInfo, "minimalDays" in t || (t = {
|
|
5363
|
-
...
|
|
5366
|
+
...or,
|
|
5364
5367
|
...t
|
|
5365
|
-
}),
|
|
5368
|
+
}), Yn.set(e, t);
|
|
5366
5369
|
}
|
|
5367
5370
|
return t;
|
|
5368
5371
|
}
|
|
5369
|
-
function
|
|
5372
|
+
function Zn(e) {
|
|
5370
5373
|
let t = e.indexOf("-x-");
|
|
5371
5374
|
t !== -1 && (e = e.substring(0, t));
|
|
5372
5375
|
let n = e.indexOf("-u-");
|
|
@@ -5374,10 +5377,10 @@ function Jn(e) {
|
|
|
5374
5377
|
{
|
|
5375
5378
|
let t, r;
|
|
5376
5379
|
try {
|
|
5377
|
-
t =
|
|
5380
|
+
t = Bn(e).resolvedOptions(), r = e;
|
|
5378
5381
|
} catch {
|
|
5379
5382
|
let i = e.substring(0, n);
|
|
5380
|
-
t =
|
|
5383
|
+
t = Bn(i).resolvedOptions(), r = i;
|
|
5381
5384
|
}
|
|
5382
5385
|
let { numberingSystem: i, calendar: a } = t;
|
|
5383
5386
|
return [
|
|
@@ -5387,10 +5390,10 @@ function Jn(e) {
|
|
|
5387
5390
|
];
|
|
5388
5391
|
}
|
|
5389
5392
|
}
|
|
5390
|
-
function
|
|
5393
|
+
function Qn(e, t, n) {
|
|
5391
5394
|
return n || t ? (e.includes("-u-") || (e += "-u"), n && (e += `-ca-${n}`), t && (e += `-nu-${t}`), e) : e;
|
|
5392
5395
|
}
|
|
5393
|
-
function
|
|
5396
|
+
function $n(e) {
|
|
5394
5397
|
let t = [];
|
|
5395
5398
|
for (let n = 1; n <= 12; n++) {
|
|
5396
5399
|
let r = $.utc(2009, n, 1);
|
|
@@ -5398,7 +5401,7 @@ function Xn(e) {
|
|
|
5398
5401
|
}
|
|
5399
5402
|
return t;
|
|
5400
5403
|
}
|
|
5401
|
-
function
|
|
5404
|
+
function er(e) {
|
|
5402
5405
|
let t = [];
|
|
5403
5406
|
for (let n = 1; n <= 7; n++) {
|
|
5404
5407
|
let r = $.utc(2016, 11, 13 + n);
|
|
@@ -5406,14 +5409,14 @@ function Zn(e) {
|
|
|
5406
5409
|
}
|
|
5407
5410
|
return t;
|
|
5408
5411
|
}
|
|
5409
|
-
function
|
|
5412
|
+
function tr(e, t, n, r) {
|
|
5410
5413
|
let i = e.listingMode();
|
|
5411
5414
|
return i === "error" ? null : i === "en" ? n(t) : r(t);
|
|
5412
5415
|
}
|
|
5413
|
-
function
|
|
5414
|
-
return e.numberingSystem && e.numberingSystem !== "latn" ? !1 : e.numberingSystem === "latn" || !e.locale || e.locale.startsWith("en") ||
|
|
5416
|
+
function nr(e) {
|
|
5417
|
+
return e.numberingSystem && e.numberingSystem !== "latn" ? !1 : e.numberingSystem === "latn" || !e.locale || e.locale.startsWith("en") || Jn(e.locale).numberingSystem === "latn";
|
|
5415
5418
|
}
|
|
5416
|
-
var
|
|
5419
|
+
var rr = class {
|
|
5417
5420
|
constructor(e, t, n) {
|
|
5418
5421
|
this.padTo = n.padTo || 0, this.floor = n.floor || !1;
|
|
5419
5422
|
let { padTo: r, floor: i, ...a } = n;
|
|
@@ -5422,7 +5425,7 @@ var er = class {
|
|
|
5422
5425
|
useGrouping: !1,
|
|
5423
5426
|
...n
|
|
5424
5427
|
};
|
|
5425
|
-
n.padTo > 0 && (t.minimumIntegerDigits = n.padTo), this.inf =
|
|
5428
|
+
n.padTo > 0 && (t.minimumIntegerDigits = n.padTo), this.inf = Hn(e, t);
|
|
5426
5429
|
}
|
|
5427
5430
|
}
|
|
5428
5431
|
format(e) {
|
|
@@ -5430,19 +5433,19 @@ var er = class {
|
|
|
5430
5433
|
let t = this.floor ? Math.floor(e) : e;
|
|
5431
5434
|
return this.inf.format(t);
|
|
5432
5435
|
}
|
|
5433
|
-
return
|
|
5436
|
+
return L(this.floor ? Math.floor(e) : Xr(e, 3), this.padTo);
|
|
5434
5437
|
}
|
|
5435
|
-
},
|
|
5438
|
+
}, ir = class {
|
|
5436
5439
|
constructor(e, t, n) {
|
|
5437
5440
|
this.opts = n, this.originalZone = void 0;
|
|
5438
5441
|
let r;
|
|
5439
5442
|
if (this.opts.timeZone) this.dt = e;
|
|
5440
5443
|
else if (e.zone.type === "fixed") {
|
|
5441
5444
|
let t = -1 * (e.offset / 60), n = t >= 0 ? `Etc/GMT+${t}` : `Etc/GMT${t}`;
|
|
5442
|
-
e.offset !== 0 &&
|
|
5445
|
+
e.offset !== 0 && In.create(n).valid ? (r = n, this.dt = e) : (r = "UTC", this.dt = e.offset === 0 ? e : e.setZone("UTC").plus({ minutes: e.offset }), this.originalZone = e.zone);
|
|
5443
5446
|
} else e.zone.type === "system" ? this.dt = e : e.zone.type === "iana" ? (this.dt = e, r = e.zone.name) : (r = "UTC", this.dt = e.setZone("UTC").plus({ minutes: e.offset }), this.originalZone = e.zone);
|
|
5444
5447
|
let i = { ...this.opts };
|
|
5445
|
-
i.timeZone = i.timeZone || r, this.dtf =
|
|
5448
|
+
i.timeZone = i.timeZone || r, this.dtf = Bn(t, i);
|
|
5446
5449
|
}
|
|
5447
5450
|
format() {
|
|
5448
5451
|
return this.originalZone ? this.formatToParts().map(({ value: e }) => e).join("") : this.dtf.format(this.dt.toJSDate());
|
|
@@ -5466,40 +5469,40 @@ var er = class {
|
|
|
5466
5469
|
resolvedOptions() {
|
|
5467
5470
|
return this.dtf.resolvedOptions();
|
|
5468
5471
|
}
|
|
5469
|
-
},
|
|
5472
|
+
}, ar = class {
|
|
5470
5473
|
constructor(e, t, n) {
|
|
5471
5474
|
this.opts = {
|
|
5472
5475
|
style: "long",
|
|
5473
5476
|
...n
|
|
5474
|
-
}, !t &&
|
|
5477
|
+
}, !t && Vr() && (this.rtf = Wn(e, n));
|
|
5475
5478
|
}
|
|
5476
5479
|
format(e, t) {
|
|
5477
|
-
return this.rtf ? this.rtf.format(e, t) :
|
|
5480
|
+
return this.rtf ? this.rtf.format(e, t) : Ei(t, e, this.opts.numeric, this.opts.style !== "long");
|
|
5478
5481
|
}
|
|
5479
5482
|
formatToParts(e, t) {
|
|
5480
5483
|
return this.rtf ? this.rtf.formatToParts(e, t) : [];
|
|
5481
5484
|
}
|
|
5482
|
-
},
|
|
5485
|
+
}, or = {
|
|
5483
5486
|
firstDay: 1,
|
|
5484
5487
|
minimalDays: 4,
|
|
5485
5488
|
weekend: [6, 7]
|
|
5486
|
-
},
|
|
5489
|
+
}, D = class e {
|
|
5487
5490
|
static fromOpts(t) {
|
|
5488
5491
|
return e.create(t.locale, t.numberingSystem, t.outputCalendar, t.weekSettings, t.defaultToEN);
|
|
5489
5492
|
}
|
|
5490
5493
|
static create(t, n, r, i, a = !1) {
|
|
5491
|
-
let o = t ||
|
|
5494
|
+
let o = t || j.defaultLocale, s = o || (a ? "en-US" : Kn()), c = n || j.defaultNumberingSystem, l = r || j.defaultOutputCalendar, u = qr(i) || j.defaultWeekSettings;
|
|
5492
5495
|
return new e(s, c, l, u, o);
|
|
5493
5496
|
}
|
|
5494
5497
|
static resetCache() {
|
|
5495
|
-
|
|
5498
|
+
Gn = null, zn.clear(), Vn.clear(), Un.clear(), qn.clear(), Yn.clear();
|
|
5496
5499
|
}
|
|
5497
5500
|
static fromObject({ locale: t, numberingSystem: n, outputCalendar: r, weekSettings: i } = {}) {
|
|
5498
5501
|
return e.create(t, n, r, i);
|
|
5499
5502
|
}
|
|
5500
5503
|
constructor(e, t, n, r, i) {
|
|
5501
|
-
let [a, o, s] =
|
|
5502
|
-
this.locale = a, this.numberingSystem = t || o || null, this.outputCalendar = n || s || null, this.weekSettings = r, this.intl =
|
|
5504
|
+
let [a, o, s] = Zn(e);
|
|
5505
|
+
this.locale = a, this.numberingSystem = t || o || null, this.outputCalendar = n || s || null, this.weekSettings = r, this.intl = Qn(this.locale, this.numberingSystem, this.outputCalendar), this.weekdaysCache = {
|
|
5503
5506
|
format: {},
|
|
5504
5507
|
standalone: {}
|
|
5505
5508
|
}, this.monthsCache = {
|
|
@@ -5508,14 +5511,14 @@ var er = class {
|
|
|
5508
5511
|
}, this.meridiemCache = null, this.eraCache = {}, this.specifiedLocale = i, this.fastNumbersCached = null;
|
|
5509
5512
|
}
|
|
5510
5513
|
get fastNumbers() {
|
|
5511
|
-
return this.fastNumbersCached ??=
|
|
5514
|
+
return this.fastNumbersCached ??= nr(this), this.fastNumbersCached;
|
|
5512
5515
|
}
|
|
5513
5516
|
listingMode() {
|
|
5514
5517
|
let e = this.isEnglish(), t = (this.numberingSystem === null || this.numberingSystem === "latn") && (this.outputCalendar === null || this.outputCalendar === "gregory");
|
|
5515
5518
|
return e && t ? "en" : "intl";
|
|
5516
5519
|
}
|
|
5517
5520
|
clone(t) {
|
|
5518
|
-
return !t || Object.getOwnPropertyNames(t).length === 0 ? this : e.create(t.locale || this.specifiedLocale, t.numberingSystem || this.numberingSystem, t.outputCalendar || this.outputCalendar,
|
|
5521
|
+
return !t || Object.getOwnPropertyNames(t).length === 0 ? this : e.create(t.locale || this.specifiedLocale, t.numberingSystem || this.numberingSystem, t.outputCalendar || this.outputCalendar, qr(t.weekSettings) || this.weekSettings, t.defaultToEN || !1);
|
|
5519
5522
|
}
|
|
5520
5523
|
redefaultToEN(e = {}) {
|
|
5521
5524
|
return this.clone({
|
|
@@ -5530,7 +5533,7 @@ var er = class {
|
|
|
5530
5533
|
});
|
|
5531
5534
|
}
|
|
5532
5535
|
months(e, t = !1) {
|
|
5533
|
-
return
|
|
5536
|
+
return tr(this, e, fi, () => {
|
|
5534
5537
|
let n = this.intl === "ja" || this.intl.startsWith("ja-");
|
|
5535
5538
|
t &= !n;
|
|
5536
5539
|
let r = t ? {
|
|
@@ -5539,24 +5542,24 @@ var er = class {
|
|
|
5539
5542
|
} : { month: e }, i = t ? "format" : "standalone";
|
|
5540
5543
|
if (!this.monthsCache[i][e]) {
|
|
5541
5544
|
let t = n ? (e) => this.dtFormatter(e, r).format() : (e) => this.extract(e, r, "month");
|
|
5542
|
-
this.monthsCache[i][e] =
|
|
5545
|
+
this.monthsCache[i][e] = $n(t);
|
|
5543
5546
|
}
|
|
5544
5547
|
return this.monthsCache[i][e];
|
|
5545
5548
|
});
|
|
5546
5549
|
}
|
|
5547
5550
|
weekdays(e, t = !1) {
|
|
5548
|
-
return
|
|
5551
|
+
return tr(this, e, gi, () => {
|
|
5549
5552
|
let n = t ? {
|
|
5550
5553
|
weekday: e,
|
|
5551
5554
|
year: "numeric",
|
|
5552
5555
|
month: "long",
|
|
5553
5556
|
day: "numeric"
|
|
5554
5557
|
} : { weekday: e }, r = t ? "format" : "standalone";
|
|
5555
|
-
return this.weekdaysCache[r][e] || (this.weekdaysCache[r][e] =
|
|
5558
|
+
return this.weekdaysCache[r][e] || (this.weekdaysCache[r][e] = er((e) => this.extract(e, n, "weekday"))), this.weekdaysCache[r][e];
|
|
5556
5559
|
});
|
|
5557
5560
|
}
|
|
5558
5561
|
meridiems() {
|
|
5559
|
-
return
|
|
5562
|
+
return tr(this, void 0, () => _i, () => {
|
|
5560
5563
|
if (!this.meridiemCache) {
|
|
5561
5564
|
let e = {
|
|
5562
5565
|
hour: "numeric",
|
|
@@ -5568,7 +5571,7 @@ var er = class {
|
|
|
5568
5571
|
});
|
|
5569
5572
|
}
|
|
5570
5573
|
eras(e) {
|
|
5571
|
-
return
|
|
5574
|
+
return tr(this, e, xi, () => {
|
|
5572
5575
|
let t = { era: e };
|
|
5573
5576
|
return this.eraCache[e] || (this.eraCache[e] = [$.utc(-40, 1, 1), $.utc(2017, 1, 1)].map((e) => this.extract(e, t, "era"))), this.eraCache[e];
|
|
5574
5577
|
});
|
|
@@ -5578,22 +5581,22 @@ var er = class {
|
|
|
5578
5581
|
return r ? r.value : null;
|
|
5579
5582
|
}
|
|
5580
5583
|
numberFormatter(e = {}) {
|
|
5581
|
-
return new
|
|
5584
|
+
return new rr(this.intl, e.forceSimple || this.fastNumbers, e);
|
|
5582
5585
|
}
|
|
5583
5586
|
dtFormatter(e, t = {}) {
|
|
5584
|
-
return new
|
|
5587
|
+
return new ir(e, this.intl, t);
|
|
5585
5588
|
}
|
|
5586
5589
|
relFormatter(e = {}) {
|
|
5587
|
-
return new
|
|
5590
|
+
return new ar(this.intl, this.isEnglish(), e);
|
|
5588
5591
|
}
|
|
5589
5592
|
listFormatter(e = {}) {
|
|
5590
|
-
return
|
|
5593
|
+
return Rn(this.intl, e);
|
|
5591
5594
|
}
|
|
5592
5595
|
isEnglish() {
|
|
5593
|
-
return this.locale === "en" || this.locale.toLowerCase() === "en-us" ||
|
|
5596
|
+
return this.locale === "en" || this.locale.toLowerCase() === "en-us" || Jn(this.intl).locale.startsWith("en-us");
|
|
5594
5597
|
}
|
|
5595
5598
|
getWeekSettings() {
|
|
5596
|
-
return this.weekSettings ? this.weekSettings :
|
|
5599
|
+
return this.weekSettings ? this.weekSettings : Hr() ? Xn(this.locale) : or;
|
|
5597
5600
|
}
|
|
5598
5601
|
getStartOfWeek() {
|
|
5599
5602
|
return this.getWeekSettings().firstDay;
|
|
@@ -5610,9 +5613,9 @@ var er = class {
|
|
|
5610
5613
|
toString() {
|
|
5611
5614
|
return `Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`;
|
|
5612
5615
|
}
|
|
5613
|
-
},
|
|
5616
|
+
}, sr = null, O = class e extends Dn {
|
|
5614
5617
|
static get utcInstance() {
|
|
5615
|
-
return
|
|
5618
|
+
return sr === null && (sr = new e(0)), sr;
|
|
5616
5619
|
}
|
|
5617
5620
|
static instance(t) {
|
|
5618
5621
|
return t === 0 ? e.utcInstance : new e(t);
|
|
@@ -5620,7 +5623,7 @@ var er = class {
|
|
|
5620
5623
|
static parseSpecifier(t) {
|
|
5621
5624
|
if (t) {
|
|
5622
5625
|
let n = t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);
|
|
5623
|
-
if (n) return new e(
|
|
5626
|
+
if (n) return new e(ii(n[1], n[2]));
|
|
5624
5627
|
}
|
|
5625
5628
|
return null;
|
|
5626
5629
|
}
|
|
@@ -5631,16 +5634,16 @@ var er = class {
|
|
|
5631
5634
|
return "fixed";
|
|
5632
5635
|
}
|
|
5633
5636
|
get name() {
|
|
5634
|
-
return this.fixed === 0 ? "UTC" : `UTC${
|
|
5637
|
+
return this.fixed === 0 ? "UTC" : `UTC${si(this.fixed, "narrow")}`;
|
|
5635
5638
|
}
|
|
5636
5639
|
get ianaName() {
|
|
5637
|
-
return this.fixed === 0 ? "Etc/UTC" : `Etc/GMT${
|
|
5640
|
+
return this.fixed === 0 ? "Etc/UTC" : `Etc/GMT${si(-this.fixed, "narrow")}`;
|
|
5638
5641
|
}
|
|
5639
5642
|
offsetName() {
|
|
5640
5643
|
return this.name;
|
|
5641
5644
|
}
|
|
5642
5645
|
formatOffset(e, t) {
|
|
5643
|
-
return
|
|
5646
|
+
return si(this.fixed, t);
|
|
5644
5647
|
}
|
|
5645
5648
|
get isUniversal() {
|
|
5646
5649
|
return !0;
|
|
@@ -5654,7 +5657,7 @@ var er = class {
|
|
|
5654
5657
|
get isValid() {
|
|
5655
5658
|
return !0;
|
|
5656
5659
|
}
|
|
5657
|
-
},
|
|
5660
|
+
}, cr = class extends Dn {
|
|
5658
5661
|
constructor(e) {
|
|
5659
5662
|
super(), this.zoneName = e;
|
|
5660
5663
|
}
|
|
@@ -5683,16 +5686,16 @@ var er = class {
|
|
|
5683
5686
|
return !1;
|
|
5684
5687
|
}
|
|
5685
5688
|
};
|
|
5686
|
-
function
|
|
5687
|
-
if (
|
|
5688
|
-
if (e instanceof
|
|
5689
|
-
if (
|
|
5689
|
+
function k(e, t) {
|
|
5690
|
+
if (P(e) || e === null) return t;
|
|
5691
|
+
if (e instanceof Dn) return e;
|
|
5692
|
+
if (zr(e)) {
|
|
5690
5693
|
let n = e.toLowerCase();
|
|
5691
|
-
return n === "default" ? t : n === "local" || n === "system" ?
|
|
5694
|
+
return n === "default" ? t : n === "local" || n === "system" ? kn.instance : n === "utc" || n === "gmt" ? O.utcInstance : O.parseSpecifier(n) || In.create(e);
|
|
5692
5695
|
}
|
|
5693
|
-
return
|
|
5696
|
+
return F(e) ? O.instance(e) : typeof e == "object" && "offset" in e && typeof e.offset == "function" ? e : new cr(e);
|
|
5694
5697
|
}
|
|
5695
|
-
var
|
|
5698
|
+
var lr = {
|
|
5696
5699
|
arab: "[٠-٩]",
|
|
5697
5700
|
arabext: "[۰-۹]",
|
|
5698
5701
|
bali: "[᭐-᭙]",
|
|
@@ -5714,7 +5717,7 @@ var or = {
|
|
|
5714
5717
|
thai: "[๐-๙]",
|
|
5715
5718
|
tibt: "[༠-༩]",
|
|
5716
5719
|
latn: "\\d"
|
|
5717
|
-
},
|
|
5720
|
+
}, ur = {
|
|
5718
5721
|
arab: [1632, 1641],
|
|
5719
5722
|
arabext: [1776, 1785],
|
|
5720
5723
|
bali: [6992, 7001],
|
|
@@ -5734,16 +5737,16 @@ var or = {
|
|
|
5734
5737
|
telu: [3174, 3183],
|
|
5735
5738
|
thai: [3664, 3673],
|
|
5736
5739
|
tibt: [3872, 3881]
|
|
5737
|
-
},
|
|
5738
|
-
function
|
|
5740
|
+
}, dr = lr.hanidec.replace(/[\[|\]]/g, "").split("");
|
|
5741
|
+
function fr(e) {
|
|
5739
5742
|
let t = parseInt(e, 10);
|
|
5740
5743
|
if (isNaN(t)) {
|
|
5741
5744
|
t = "";
|
|
5742
5745
|
for (let n = 0; n < e.length; n++) {
|
|
5743
5746
|
let r = e.charCodeAt(n);
|
|
5744
|
-
if (e[n].search(
|
|
5745
|
-
else for (let e in
|
|
5746
|
-
let [n, i] =
|
|
5747
|
+
if (e[n].search(lr.hanidec) !== -1) t += dr.indexOf(e[n]);
|
|
5748
|
+
else for (let e in ur) {
|
|
5749
|
+
let [n, i] = ur[e];
|
|
5747
5750
|
r >= n && r <= i && (t += r - n);
|
|
5748
5751
|
}
|
|
5749
5752
|
}
|
|
@@ -5751,76 +5754,76 @@ function lr(e) {
|
|
|
5751
5754
|
}
|
|
5752
5755
|
return t;
|
|
5753
5756
|
}
|
|
5754
|
-
var
|
|
5755
|
-
function
|
|
5756
|
-
|
|
5757
|
+
var pr = /* @__PURE__ */ new Map();
|
|
5758
|
+
function mr() {
|
|
5759
|
+
pr.clear();
|
|
5757
5760
|
}
|
|
5758
|
-
function
|
|
5759
|
-
let n = e || "latn", r =
|
|
5760
|
-
r === void 0 && (r = /* @__PURE__ */ new Map(),
|
|
5761
|
+
function A({ numberingSystem: e }, t = "") {
|
|
5762
|
+
let n = e || "latn", r = pr.get(n);
|
|
5763
|
+
r === void 0 && (r = /* @__PURE__ */ new Map(), pr.set(n, r));
|
|
5761
5764
|
let i = r.get(t);
|
|
5762
|
-
return i === void 0 && (i = RegExp(`${
|
|
5765
|
+
return i === void 0 && (i = RegExp(`${lr[n]}${t}`), r.set(t, i)), i;
|
|
5763
5766
|
}
|
|
5764
|
-
var
|
|
5767
|
+
var hr = () => Date.now(), gr = "system", _r = null, vr = null, yr = null, br = 60, xr, Sr = null, j = class {
|
|
5765
5768
|
static get now() {
|
|
5766
|
-
return
|
|
5769
|
+
return hr;
|
|
5767
5770
|
}
|
|
5768
5771
|
static set now(e) {
|
|
5769
|
-
|
|
5772
|
+
hr = e;
|
|
5770
5773
|
}
|
|
5771
5774
|
static set defaultZone(e) {
|
|
5772
|
-
|
|
5775
|
+
gr = e;
|
|
5773
5776
|
}
|
|
5774
5777
|
static get defaultZone() {
|
|
5775
|
-
return
|
|
5778
|
+
return k(gr, kn.instance);
|
|
5776
5779
|
}
|
|
5777
5780
|
static get defaultLocale() {
|
|
5778
|
-
return
|
|
5781
|
+
return _r;
|
|
5779
5782
|
}
|
|
5780
5783
|
static set defaultLocale(e) {
|
|
5781
|
-
|
|
5784
|
+
_r = e;
|
|
5782
5785
|
}
|
|
5783
5786
|
static get defaultNumberingSystem() {
|
|
5784
|
-
return
|
|
5787
|
+
return vr;
|
|
5785
5788
|
}
|
|
5786
5789
|
static set defaultNumberingSystem(e) {
|
|
5787
|
-
|
|
5790
|
+
vr = e;
|
|
5788
5791
|
}
|
|
5789
5792
|
static get defaultOutputCalendar() {
|
|
5790
|
-
return
|
|
5793
|
+
return yr;
|
|
5791
5794
|
}
|
|
5792
5795
|
static set defaultOutputCalendar(e) {
|
|
5793
|
-
|
|
5796
|
+
yr = e;
|
|
5794
5797
|
}
|
|
5795
5798
|
static get defaultWeekSettings() {
|
|
5796
|
-
return
|
|
5799
|
+
return Sr;
|
|
5797
5800
|
}
|
|
5798
5801
|
static set defaultWeekSettings(e) {
|
|
5799
|
-
|
|
5802
|
+
Sr = qr(e);
|
|
5800
5803
|
}
|
|
5801
5804
|
static get twoDigitCutoffYear() {
|
|
5802
|
-
return
|
|
5805
|
+
return br;
|
|
5803
5806
|
}
|
|
5804
5807
|
static set twoDigitCutoffYear(e) {
|
|
5805
|
-
|
|
5808
|
+
br = e % 100;
|
|
5806
5809
|
}
|
|
5807
5810
|
static get throwOnInvalid() {
|
|
5808
|
-
return
|
|
5811
|
+
return xr;
|
|
5809
5812
|
}
|
|
5810
5813
|
static set throwOnInvalid(e) {
|
|
5811
|
-
|
|
5814
|
+
xr = e;
|
|
5812
5815
|
}
|
|
5813
5816
|
static resetCaches() {
|
|
5814
|
-
|
|
5817
|
+
D.resetCache(), In.resetCache(), $.resetCache(), mr();
|
|
5815
5818
|
}
|
|
5816
|
-
},
|
|
5819
|
+
}, M = class {
|
|
5817
5820
|
constructor(e, t) {
|
|
5818
5821
|
this.reason = e, this.explanation = t;
|
|
5819
5822
|
}
|
|
5820
5823
|
toMessage() {
|
|
5821
5824
|
return this.explanation ? `${this.reason}: ${this.explanation}` : this.reason;
|
|
5822
5825
|
}
|
|
5823
|
-
},
|
|
5826
|
+
}, Cr = [
|
|
5824
5827
|
0,
|
|
5825
5828
|
31,
|
|
5826
5829
|
59,
|
|
@@ -5833,7 +5836,7 @@ var fr = () => Date.now(), pr = "system", mr = null, hr = null, gr = null, _r =
|
|
|
5833
5836
|
273,
|
|
5834
5837
|
304,
|
|
5835
5838
|
334
|
|
5836
|
-
],
|
|
5839
|
+
], wr = [
|
|
5837
5840
|
0,
|
|
5838
5841
|
31,
|
|
5839
5842
|
60,
|
|
@@ -5847,69 +5850,69 @@ var fr = () => Date.now(), pr = "system", mr = null, hr = null, gr = null, _r =
|
|
|
5847
5850
|
305,
|
|
5848
5851
|
335
|
|
5849
5852
|
];
|
|
5850
|
-
function
|
|
5851
|
-
return new
|
|
5853
|
+
function N(e, t) {
|
|
5854
|
+
return new M("unit out of range", `you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`);
|
|
5852
5855
|
}
|
|
5853
|
-
function
|
|
5856
|
+
function Tr(e, t, n) {
|
|
5854
5857
|
let r = new Date(Date.UTC(e, t - 1, n));
|
|
5855
5858
|
e < 100 && e >= 0 && r.setUTCFullYear(r.getUTCFullYear() - 1900);
|
|
5856
5859
|
let i = r.getUTCDay();
|
|
5857
5860
|
return i === 0 ? 7 : i;
|
|
5858
5861
|
}
|
|
5859
|
-
function
|
|
5860
|
-
return n + (
|
|
5862
|
+
function Er(e, t, n) {
|
|
5863
|
+
return n + (Zr(e) ? wr : Cr)[t - 1];
|
|
5861
5864
|
}
|
|
5862
|
-
function
|
|
5863
|
-
let n =
|
|
5865
|
+
function Dr(e, t) {
|
|
5866
|
+
let n = Zr(e) ? wr : Cr, r = n.findIndex((e) => e < t), i = t - n[r];
|
|
5864
5867
|
return {
|
|
5865
5868
|
month: r + 1,
|
|
5866
5869
|
day: i
|
|
5867
5870
|
};
|
|
5868
5871
|
}
|
|
5869
|
-
function
|
|
5872
|
+
function Or(e, t) {
|
|
5870
5873
|
return (e - t + 7) % 7 + 1;
|
|
5871
5874
|
}
|
|
5872
|
-
function
|
|
5873
|
-
let { year: r, month: i, day: a } = e, o =
|
|
5874
|
-
return c < 1 ? (l = r - 1, c =
|
|
5875
|
+
function kr(e, t = 4, n = 1) {
|
|
5876
|
+
let { year: r, month: i, day: a } = e, o = Er(r, i, a), s = Or(Tr(r, i, a), n), c = Math.floor((o - s + 14 - t) / 7), l;
|
|
5877
|
+
return c < 1 ? (l = r - 1, c = ti(l, t, n)) : c > ti(r, t, n) ? (l = r + 1, c = 1) : l = r, {
|
|
5875
5878
|
weekYear: l,
|
|
5876
5879
|
weekNumber: c,
|
|
5877
5880
|
weekday: s,
|
|
5878
|
-
...
|
|
5881
|
+
...ci(e)
|
|
5879
5882
|
};
|
|
5880
5883
|
}
|
|
5881
|
-
function
|
|
5882
|
-
let { weekYear: r, weekNumber: i, weekday: a } = e, o = Tr(
|
|
5883
|
-
c < 1 ? (l = r - 1, c +=
|
|
5884
|
-
let { month: u, day: d } =
|
|
5884
|
+
function Ar(e, t = 4, n = 1) {
|
|
5885
|
+
let { weekYear: r, weekNumber: i, weekday: a } = e, o = Or(Tr(r, 1, t), n), s = B(r), c = i * 7 + a - o - 7 + t, l;
|
|
5886
|
+
c < 1 ? (l = r - 1, c += B(l)) : c > s ? (l = r + 1, c -= B(r)) : l = r;
|
|
5887
|
+
let { month: u, day: d } = Dr(l, c);
|
|
5885
5888
|
return {
|
|
5886
5889
|
year: l,
|
|
5887
5890
|
month: u,
|
|
5888
5891
|
day: d,
|
|
5889
|
-
...
|
|
5892
|
+
...ci(e)
|
|
5890
5893
|
};
|
|
5891
5894
|
}
|
|
5892
|
-
function
|
|
5895
|
+
function jr(e) {
|
|
5893
5896
|
let { year: t, month: n, day: r } = e;
|
|
5894
5897
|
return {
|
|
5895
5898
|
year: t,
|
|
5896
|
-
ordinal:
|
|
5897
|
-
...
|
|
5899
|
+
ordinal: Er(t, n, r),
|
|
5900
|
+
...ci(e)
|
|
5898
5901
|
};
|
|
5899
5902
|
}
|
|
5900
|
-
function
|
|
5901
|
-
let { year: t, ordinal: n } = e, { month: r, day: i } =
|
|
5903
|
+
function Mr(e) {
|
|
5904
|
+
let { year: t, ordinal: n } = e, { month: r, day: i } = Dr(t, n);
|
|
5902
5905
|
return {
|
|
5903
5906
|
year: t,
|
|
5904
5907
|
month: r,
|
|
5905
5908
|
day: i,
|
|
5906
|
-
...
|
|
5909
|
+
...ci(e)
|
|
5907
5910
|
};
|
|
5908
5911
|
}
|
|
5909
|
-
function
|
|
5910
|
-
if (!
|
|
5911
|
-
if (!
|
|
5912
|
-
return
|
|
5912
|
+
function Nr(e, t) {
|
|
5913
|
+
if (!P(e.localWeekday) || !P(e.localWeekNumber) || !P(e.localWeekYear)) {
|
|
5914
|
+
if (!P(e.weekday) || !P(e.weekNumber) || !P(e.weekYear)) throw new nn("Cannot mix locale-based week fields with ISO-based week fields");
|
|
5915
|
+
return P(e.localWeekday) || (e.weekday = e.localWeekday), P(e.localWeekNumber) || (e.weekNumber = e.localWeekNumber), P(e.localWeekYear) || (e.weekYear = e.localWeekYear), delete e.localWeekday, delete e.localWeekNumber, delete e.localWeekYear, {
|
|
5913
5916
|
minDaysInFirstWeek: t.getMinDaysInFirstWeek(),
|
|
5914
5917
|
startOfWeek: t.getStartOfWeek()
|
|
5915
5918
|
};
|
|
@@ -5919,99 +5922,99 @@ function Ar(e, t) {
|
|
|
5919
5922
|
startOfWeek: 1
|
|
5920
5923
|
};
|
|
5921
5924
|
}
|
|
5922
|
-
function
|
|
5923
|
-
let r =
|
|
5924
|
-
return r ? i ? !a &&
|
|
5925
|
+
function Pr(e, t = 4, n = 1) {
|
|
5926
|
+
let r = Rr(e.weekYear), i = I(e.weekNumber, 1, ti(e.weekYear, t, n)), a = I(e.weekday, 1, 7);
|
|
5927
|
+
return r ? i ? !a && N("weekday", e.weekday) : N("week", e.weekNumber) : N("weekYear", e.weekYear);
|
|
5925
5928
|
}
|
|
5926
|
-
function
|
|
5927
|
-
let t =
|
|
5928
|
-
return t ? !n &&
|
|
5929
|
+
function Fr(e) {
|
|
5930
|
+
let t = Rr(e.year), n = I(e.ordinal, 1, B(e.year));
|
|
5931
|
+
return t ? !n && N("ordinal", e.ordinal) : N("year", e.year);
|
|
5929
5932
|
}
|
|
5930
|
-
function
|
|
5931
|
-
let t =
|
|
5932
|
-
return t ? n ? !r &&
|
|
5933
|
+
function Ir(e) {
|
|
5934
|
+
let t = Rr(e.year), n = I(e.month, 1, 12), r = I(e.day, 1, Qr(e.year, e.month));
|
|
5935
|
+
return t ? n ? !r && N("day", e.day) : N("month", e.month) : N("year", e.year);
|
|
5933
5936
|
}
|
|
5934
|
-
function
|
|
5935
|
-
let { hour: t, minute: n, second: r, millisecond: i } = e, a =
|
|
5936
|
-
return a ? o ? s ? !c &&
|
|
5937
|
+
function Lr(e) {
|
|
5938
|
+
let { hour: t, minute: n, second: r, millisecond: i } = e, a = I(t, 0, 23) || t === 24 && n === 0 && r === 0 && i === 0, o = I(n, 0, 59), s = I(r, 0, 59), c = I(i, 0, 999);
|
|
5939
|
+
return a ? o ? s ? !c && N("millisecond", i) : N("second", r) : N("minute", n) : N("hour", t);
|
|
5937
5940
|
}
|
|
5938
|
-
function
|
|
5941
|
+
function P(e) {
|
|
5939
5942
|
return e === void 0;
|
|
5940
5943
|
}
|
|
5941
|
-
function
|
|
5944
|
+
function F(e) {
|
|
5942
5945
|
return typeof e == "number";
|
|
5943
5946
|
}
|
|
5944
|
-
function
|
|
5947
|
+
function Rr(e) {
|
|
5945
5948
|
return typeof e == "number" && e % 1 == 0;
|
|
5946
5949
|
}
|
|
5947
|
-
function
|
|
5950
|
+
function zr(e) {
|
|
5948
5951
|
return typeof e == "string";
|
|
5949
5952
|
}
|
|
5950
|
-
function
|
|
5953
|
+
function Br(e) {
|
|
5951
5954
|
return Object.prototype.toString.call(e) === "[object Date]";
|
|
5952
5955
|
}
|
|
5953
|
-
function
|
|
5956
|
+
function Vr() {
|
|
5954
5957
|
try {
|
|
5955
5958
|
return typeof Intl < "u" && !!Intl.RelativeTimeFormat;
|
|
5956
5959
|
} catch {
|
|
5957
5960
|
return !1;
|
|
5958
5961
|
}
|
|
5959
5962
|
}
|
|
5960
|
-
function
|
|
5963
|
+
function Hr() {
|
|
5961
5964
|
try {
|
|
5962
5965
|
return typeof Intl < "u" && !!Intl.Locale && ("weekInfo" in Intl.Locale.prototype || "getWeekInfo" in Intl.Locale.prototype);
|
|
5963
5966
|
} catch {
|
|
5964
5967
|
return !1;
|
|
5965
5968
|
}
|
|
5966
5969
|
}
|
|
5967
|
-
function
|
|
5970
|
+
function Ur(e) {
|
|
5968
5971
|
return Array.isArray(e) ? e : [e];
|
|
5969
5972
|
}
|
|
5970
|
-
function
|
|
5973
|
+
function Wr(e, t, n) {
|
|
5971
5974
|
if (e.length !== 0) return e.reduce((e, r) => {
|
|
5972
5975
|
let i = [t(r), r];
|
|
5973
5976
|
return e && n(e[0], i[0]) === e[0] ? e : i;
|
|
5974
5977
|
}, null)[1];
|
|
5975
5978
|
}
|
|
5976
|
-
function
|
|
5979
|
+
function Gr(e, t) {
|
|
5977
5980
|
return t.reduce((t, n) => (t[n] = e[n], t), {});
|
|
5978
5981
|
}
|
|
5979
|
-
function
|
|
5982
|
+
function Kr(e, t) {
|
|
5980
5983
|
return Object.prototype.hasOwnProperty.call(e, t);
|
|
5981
5984
|
}
|
|
5982
|
-
function
|
|
5985
|
+
function qr(e) {
|
|
5983
5986
|
if (e == null) return null;
|
|
5984
|
-
if (typeof e != "object") throw new
|
|
5985
|
-
if (!
|
|
5987
|
+
if (typeof e != "object") throw new S("Week settings must be an object");
|
|
5988
|
+
if (!I(e.firstDay, 1, 7) || !I(e.minimalDays, 1, 7) || !Array.isArray(e.weekend) || e.weekend.some((e) => !I(e, 1, 7))) throw new S("Invalid week settings");
|
|
5986
5989
|
return {
|
|
5987
5990
|
firstDay: e.firstDay,
|
|
5988
5991
|
minimalDays: e.minimalDays,
|
|
5989
5992
|
weekend: Array.from(e.weekend)
|
|
5990
5993
|
};
|
|
5991
5994
|
}
|
|
5992
|
-
function
|
|
5993
|
-
return
|
|
5995
|
+
function I(e, t, n) {
|
|
5996
|
+
return Rr(e) && e >= t && e <= n;
|
|
5994
5997
|
}
|
|
5995
|
-
function
|
|
5998
|
+
function Jr(e, t) {
|
|
5996
5999
|
return e - t * Math.floor(e / t);
|
|
5997
6000
|
}
|
|
5998
|
-
function
|
|
6001
|
+
function L(e, t = 2) {
|
|
5999
6002
|
let n = e < 0, r;
|
|
6000
6003
|
return r = n ? "-" + ("" + -e).padStart(t, "0") : ("" + e).padStart(t, "0"), r;
|
|
6001
6004
|
}
|
|
6002
|
-
function
|
|
6003
|
-
if (!(
|
|
6005
|
+
function R(e) {
|
|
6006
|
+
if (!(P(e) || e === null || e === "")) return parseInt(e, 10);
|
|
6004
6007
|
}
|
|
6005
|
-
function
|
|
6006
|
-
if (!(
|
|
6008
|
+
function z(e) {
|
|
6009
|
+
if (!(P(e) || e === null || e === "")) return parseFloat(e);
|
|
6007
6010
|
}
|
|
6008
|
-
function
|
|
6009
|
-
if (!(
|
|
6011
|
+
function Yr(e) {
|
|
6012
|
+
if (!(P(e) || e === null || e === "")) {
|
|
6010
6013
|
let t = parseFloat("0." + e) * 1e3;
|
|
6011
6014
|
return Math.floor(t);
|
|
6012
6015
|
}
|
|
6013
6016
|
}
|
|
6014
|
-
function
|
|
6017
|
+
function Xr(e, t, n = "round") {
|
|
6015
6018
|
let r = 10 ** t;
|
|
6016
6019
|
switch (n) {
|
|
6017
6020
|
case "expand": return e > 0 ? Math.ceil(e * r) / r : Math.floor(e * r) / r;
|
|
@@ -6022,15 +6025,15 @@ function Kr(e, t, n = "round") {
|
|
|
6022
6025
|
default: throw RangeError(`Value rounding ${n} is out of range`);
|
|
6023
6026
|
}
|
|
6024
6027
|
}
|
|
6025
|
-
function
|
|
6028
|
+
function Zr(e) {
|
|
6026
6029
|
return e % 4 == 0 && (e % 100 != 0 || e % 400 == 0);
|
|
6027
6030
|
}
|
|
6028
|
-
function
|
|
6029
|
-
return
|
|
6031
|
+
function B(e) {
|
|
6032
|
+
return Zr(e) ? 366 : 365;
|
|
6030
6033
|
}
|
|
6031
|
-
function
|
|
6032
|
-
let n =
|
|
6033
|
-
return n === 2 ?
|
|
6034
|
+
function Qr(e, t) {
|
|
6035
|
+
let n = Jr(t - 1, 12) + 1, r = e + (t - n) / 12;
|
|
6036
|
+
return n === 2 ? Zr(r) ? 29 : 28 : [
|
|
6034
6037
|
31,
|
|
6035
6038
|
null,
|
|
6036
6039
|
31,
|
|
@@ -6045,21 +6048,21 @@ function Jr(e, t) {
|
|
|
6045
6048
|
31
|
|
6046
6049
|
][n - 1];
|
|
6047
6050
|
}
|
|
6048
|
-
function
|
|
6051
|
+
function $r(e) {
|
|
6049
6052
|
let t = Date.UTC(e.year, e.month - 1, e.day, e.hour, e.minute, e.second, e.millisecond);
|
|
6050
6053
|
return e.year < 100 && e.year >= 0 && (t = new Date(t), t.setUTCFullYear(e.year, e.month - 1, e.day)), +t;
|
|
6051
6054
|
}
|
|
6052
|
-
function
|
|
6053
|
-
return -Tr(
|
|
6055
|
+
function ei(e, t, n) {
|
|
6056
|
+
return -Or(Tr(e, 1, t), n) + t - 1;
|
|
6054
6057
|
}
|
|
6055
|
-
function
|
|
6056
|
-
let r =
|
|
6057
|
-
return (
|
|
6058
|
+
function ti(e, t = 4, n = 1) {
|
|
6059
|
+
let r = ei(e, t, n), i = ei(e + 1, t, n);
|
|
6060
|
+
return (B(e) - r + i) / 7;
|
|
6058
6061
|
}
|
|
6059
|
-
function
|
|
6060
|
-
return e > 99 ? e : e >
|
|
6062
|
+
function ni(e) {
|
|
6063
|
+
return e > 99 ? e : e > j.twoDigitCutoffYear ? 1900 + e : 2e3 + e;
|
|
6061
6064
|
}
|
|
6062
|
-
function
|
|
6065
|
+
function ri(e, t, n, r = null) {
|
|
6063
6066
|
let i = new Date(e), a = {
|
|
6064
6067
|
hourCycle: "h23",
|
|
6065
6068
|
year: "numeric",
|
|
@@ -6075,44 +6078,44 @@ function $r(e, t, n, r = null) {
|
|
|
6075
6078
|
}, s = new Intl.DateTimeFormat(n, o).formatToParts(i).find((e) => e.type.toLowerCase() === "timezonename");
|
|
6076
6079
|
return s ? s.value : null;
|
|
6077
6080
|
}
|
|
6078
|
-
function
|
|
6081
|
+
function ii(e, t) {
|
|
6079
6082
|
let n = parseInt(e, 10);
|
|
6080
6083
|
Number.isNaN(n) && (n = 0);
|
|
6081
6084
|
let r = parseInt(t, 10) || 0, i = n < 0 || Object.is(n, -0) ? -r : r;
|
|
6082
6085
|
return n * 60 + i;
|
|
6083
6086
|
}
|
|
6084
|
-
function
|
|
6087
|
+
function ai(e) {
|
|
6085
6088
|
let t = Number(e);
|
|
6086
|
-
if (typeof e == "boolean" || e === "" || !Number.isFinite(t)) throw new
|
|
6089
|
+
if (typeof e == "boolean" || e === "" || !Number.isFinite(t)) throw new S(`Invalid unit value ${e}`);
|
|
6087
6090
|
return t;
|
|
6088
6091
|
}
|
|
6089
|
-
function
|
|
6092
|
+
function oi(e, t) {
|
|
6090
6093
|
let n = {};
|
|
6091
|
-
for (let r in e) if (
|
|
6094
|
+
for (let r in e) if (Kr(e, r)) {
|
|
6092
6095
|
let i = e[r];
|
|
6093
6096
|
if (i == null) continue;
|
|
6094
|
-
n[t(r)] =
|
|
6097
|
+
n[t(r)] = ai(i);
|
|
6095
6098
|
}
|
|
6096
6099
|
return n;
|
|
6097
6100
|
}
|
|
6098
|
-
function
|
|
6101
|
+
function si(e, t) {
|
|
6099
6102
|
let n = Math.trunc(Math.abs(e / 60)), r = Math.trunc(Math.abs(e % 60)), i = e >= 0 ? "+" : "-";
|
|
6100
6103
|
switch (t) {
|
|
6101
|
-
case "short": return `${i}${
|
|
6104
|
+
case "short": return `${i}${L(n, 2)}:${L(r, 2)}`;
|
|
6102
6105
|
case "narrow": return `${i}${n}${r > 0 ? `:${r}` : ""}`;
|
|
6103
|
-
case "techie": return `${i}${
|
|
6106
|
+
case "techie": return `${i}${L(n, 2)}${L(r, 2)}`;
|
|
6104
6107
|
default: throw RangeError(`Value format ${t} is out of range for property format`);
|
|
6105
6108
|
}
|
|
6106
6109
|
}
|
|
6107
|
-
function
|
|
6108
|
-
return
|
|
6110
|
+
function ci(e) {
|
|
6111
|
+
return Gr(e, [
|
|
6109
6112
|
"hour",
|
|
6110
6113
|
"minute",
|
|
6111
6114
|
"second",
|
|
6112
6115
|
"millisecond"
|
|
6113
6116
|
]);
|
|
6114
6117
|
}
|
|
6115
|
-
var
|
|
6118
|
+
var li = [
|
|
6116
6119
|
"January",
|
|
6117
6120
|
"February",
|
|
6118
6121
|
"March",
|
|
@@ -6125,7 +6128,7 @@ var ai = [
|
|
|
6125
6128
|
"October",
|
|
6126
6129
|
"November",
|
|
6127
6130
|
"December"
|
|
6128
|
-
],
|
|
6131
|
+
], ui = [
|
|
6129
6132
|
"Jan",
|
|
6130
6133
|
"Feb",
|
|
6131
6134
|
"Mar",
|
|
@@ -6138,7 +6141,7 @@ var ai = [
|
|
|
6138
6141
|
"Oct",
|
|
6139
6142
|
"Nov",
|
|
6140
6143
|
"Dec"
|
|
6141
|
-
],
|
|
6144
|
+
], di = [
|
|
6142
6145
|
"J",
|
|
6143
6146
|
"F",
|
|
6144
6147
|
"M",
|
|
@@ -6152,11 +6155,11 @@ var ai = [
|
|
|
6152
6155
|
"N",
|
|
6153
6156
|
"D"
|
|
6154
6157
|
];
|
|
6155
|
-
function
|
|
6158
|
+
function fi(e) {
|
|
6156
6159
|
switch (e) {
|
|
6157
|
-
case "narrow": return [...
|
|
6158
|
-
case "short": return [...
|
|
6159
|
-
case "long": return [...
|
|
6160
|
+
case "narrow": return [...di];
|
|
6161
|
+
case "short": return [...ui];
|
|
6162
|
+
case "long": return [...li];
|
|
6160
6163
|
case "numeric": return [
|
|
6161
6164
|
"1",
|
|
6162
6165
|
"2",
|
|
@@ -6188,7 +6191,7 @@ function ci(e) {
|
|
|
6188
6191
|
default: return null;
|
|
6189
6192
|
}
|
|
6190
6193
|
}
|
|
6191
|
-
var
|
|
6194
|
+
var pi = [
|
|
6192
6195
|
"Monday",
|
|
6193
6196
|
"Tuesday",
|
|
6194
6197
|
"Wednesday",
|
|
@@ -6196,7 +6199,7 @@ var li = [
|
|
|
6196
6199
|
"Friday",
|
|
6197
6200
|
"Saturday",
|
|
6198
6201
|
"Sunday"
|
|
6199
|
-
],
|
|
6202
|
+
], mi = [
|
|
6200
6203
|
"Mon",
|
|
6201
6204
|
"Tue",
|
|
6202
6205
|
"Wed",
|
|
@@ -6204,7 +6207,7 @@ var li = [
|
|
|
6204
6207
|
"Fri",
|
|
6205
6208
|
"Sat",
|
|
6206
6209
|
"Sun"
|
|
6207
|
-
],
|
|
6210
|
+
], hi = [
|
|
6208
6211
|
"M",
|
|
6209
6212
|
"T",
|
|
6210
6213
|
"W",
|
|
@@ -6213,11 +6216,11 @@ var li = [
|
|
|
6213
6216
|
"S",
|
|
6214
6217
|
"S"
|
|
6215
6218
|
];
|
|
6216
|
-
function
|
|
6219
|
+
function gi(e) {
|
|
6217
6220
|
switch (e) {
|
|
6218
|
-
case "narrow": return [...
|
|
6219
|
-
case "short": return [...
|
|
6220
|
-
case "long": return [...
|
|
6221
|
+
case "narrow": return [...hi];
|
|
6222
|
+
case "short": return [...mi];
|
|
6223
|
+
case "long": return [...pi];
|
|
6221
6224
|
case "numeric": return [
|
|
6222
6225
|
"1",
|
|
6223
6226
|
"2",
|
|
@@ -6230,28 +6233,28 @@ function fi(e) {
|
|
|
6230
6233
|
default: return null;
|
|
6231
6234
|
}
|
|
6232
6235
|
}
|
|
6233
|
-
var
|
|
6234
|
-
function
|
|
6236
|
+
var _i = ["AM", "PM"], vi = ["Before Christ", "Anno Domini"], yi = ["BC", "AD"], bi = ["B", "A"];
|
|
6237
|
+
function xi(e) {
|
|
6235
6238
|
switch (e) {
|
|
6236
|
-
case "narrow": return [...
|
|
6237
|
-
case "short": return [...
|
|
6238
|
-
case "long": return [...
|
|
6239
|
+
case "narrow": return [...bi];
|
|
6240
|
+
case "short": return [...yi];
|
|
6241
|
+
case "long": return [...vi];
|
|
6239
6242
|
default: return null;
|
|
6240
6243
|
}
|
|
6241
6244
|
}
|
|
6242
|
-
function
|
|
6243
|
-
return
|
|
6245
|
+
function Si(e) {
|
|
6246
|
+
return _i[e.hour < 12 ? 0 : 1];
|
|
6244
6247
|
}
|
|
6245
|
-
function
|
|
6246
|
-
return
|
|
6248
|
+
function Ci(e, t) {
|
|
6249
|
+
return gi(t)[e.weekday - 1];
|
|
6247
6250
|
}
|
|
6248
|
-
function
|
|
6249
|
-
return
|
|
6251
|
+
function wi(e, t) {
|
|
6252
|
+
return fi(t)[e.month - 1];
|
|
6250
6253
|
}
|
|
6251
|
-
function
|
|
6252
|
-
return
|
|
6254
|
+
function Ti(e, t) {
|
|
6255
|
+
return xi(t)[e.year < 0 ? 0 : 1];
|
|
6253
6256
|
}
|
|
6254
|
-
function
|
|
6257
|
+
function Ei(e, t, n = "always", r = !1) {
|
|
6255
6258
|
let i = {
|
|
6256
6259
|
years: ["year", "yr."],
|
|
6257
6260
|
quarters: ["quarter", "qtr."],
|
|
@@ -6281,33 +6284,33 @@ function Si(e, t, n = "always", r = !1) {
|
|
|
6281
6284
|
let o = Object.is(t, -0) || t < 0, s = Math.abs(t), c = s === 1, l = i[e], u = r ? c ? l[1] : l[2] || l[1] : c ? i[e][0] : e;
|
|
6282
6285
|
return o ? `${s} ${u} ago` : `in ${s} ${u}`;
|
|
6283
6286
|
}
|
|
6284
|
-
function
|
|
6287
|
+
function Di(e, t) {
|
|
6285
6288
|
let n = "";
|
|
6286
6289
|
for (let r of e) r.literal ? n += r.val : n += t(r.val);
|
|
6287
6290
|
return n;
|
|
6288
6291
|
}
|
|
6289
|
-
var
|
|
6290
|
-
D:
|
|
6291
|
-
DD:
|
|
6292
|
-
DDD:
|
|
6293
|
-
DDDD:
|
|
6294
|
-
t:
|
|
6295
|
-
tt:
|
|
6296
|
-
ttt:
|
|
6297
|
-
tttt:
|
|
6298
|
-
T:
|
|
6299
|
-
TT:
|
|
6300
|
-
TTT:
|
|
6301
|
-
TTTT:
|
|
6302
|
-
f:
|
|
6303
|
-
ff:
|
|
6304
|
-
fff:
|
|
6305
|
-
ffff:
|
|
6306
|
-
F:
|
|
6307
|
-
FF:
|
|
6308
|
-
FFF:
|
|
6309
|
-
FFFF:
|
|
6310
|
-
},
|
|
6292
|
+
var Oi = {
|
|
6293
|
+
D: an,
|
|
6294
|
+
DD: on,
|
|
6295
|
+
DDD: cn,
|
|
6296
|
+
DDDD: ln,
|
|
6297
|
+
t: un,
|
|
6298
|
+
tt: dn,
|
|
6299
|
+
ttt: fn,
|
|
6300
|
+
tttt: pn,
|
|
6301
|
+
T: mn,
|
|
6302
|
+
TT: hn,
|
|
6303
|
+
TTT: gn,
|
|
6304
|
+
TTTT: _n,
|
|
6305
|
+
f: vn,
|
|
6306
|
+
ff: bn,
|
|
6307
|
+
fff: Cn,
|
|
6308
|
+
ffff: Tn,
|
|
6309
|
+
F: yn,
|
|
6310
|
+
FF: xn,
|
|
6311
|
+
FFF: wn,
|
|
6312
|
+
FFFF: En
|
|
6313
|
+
}, V = class e {
|
|
6311
6314
|
static create(t, n = {}) {
|
|
6312
6315
|
return new e(t, n);
|
|
6313
6316
|
}
|
|
@@ -6329,7 +6332,7 @@ var wi = {
|
|
|
6329
6332
|
}), i;
|
|
6330
6333
|
}
|
|
6331
6334
|
static macroTokenToFormatOpts(e) {
|
|
6332
|
-
return
|
|
6335
|
+
return Oi[e];
|
|
6333
6336
|
}
|
|
6334
6337
|
constructor(e, t) {
|
|
6335
6338
|
this.opts = t, this.loc = e, this.systemLoc = null;
|
|
@@ -6359,26 +6362,26 @@ var wi = {
|
|
|
6359
6362
|
return this.dtFormatter(e, t).resolvedOptions();
|
|
6360
6363
|
}
|
|
6361
6364
|
num(e, t = 0, n = void 0) {
|
|
6362
|
-
if (this.opts.forceSimple) return
|
|
6365
|
+
if (this.opts.forceSimple) return L(e, t);
|
|
6363
6366
|
let r = { ...this.opts };
|
|
6364
6367
|
return t > 0 && (r.padTo = t), n && (r.signDisplay = n), this.loc.numberFormatter(r).format(e);
|
|
6365
6368
|
}
|
|
6366
6369
|
formatDateTimeFromString(t, n) {
|
|
6367
|
-
let r = this.loc.listingMode() === "en", i = this.loc.outputCalendar && this.loc.outputCalendar !== "gregory", a = (e, n) => this.loc.extract(t, e, n), o = (e) => t.isOffsetFixed && t.offset === 0 && e.allowZ ? "Z" : t.isValid ? t.zone.formatOffset(t.ts, e.format) : "", s = () => r ?
|
|
6370
|
+
let r = this.loc.listingMode() === "en", i = this.loc.outputCalendar && this.loc.outputCalendar !== "gregory", a = (e, n) => this.loc.extract(t, e, n), o = (e) => t.isOffsetFixed && t.offset === 0 && e.allowZ ? "Z" : t.isValid ? t.zone.formatOffset(t.ts, e.format) : "", s = () => r ? Si(t) : a({
|
|
6368
6371
|
hour: "numeric",
|
|
6369
6372
|
hourCycle: "h12"
|
|
6370
|
-
}, "dayperiod"), c = (e, n) => r ?
|
|
6373
|
+
}, "dayperiod"), c = (e, n) => r ? wi(t, e) : a(n ? { month: e } : {
|
|
6371
6374
|
month: e,
|
|
6372
6375
|
day: "numeric"
|
|
6373
|
-
}, "month"), l = (e, n) => r ?
|
|
6376
|
+
}, "month"), l = (e, n) => r ? Ci(t, e) : a(n ? { weekday: e } : {
|
|
6374
6377
|
weekday: e,
|
|
6375
6378
|
month: "long",
|
|
6376
6379
|
day: "numeric"
|
|
6377
6380
|
}, "weekday"), u = (n) => {
|
|
6378
6381
|
let r = e.macroTokenToFormatOpts(n);
|
|
6379
6382
|
return r ? this.formatWithSystemDefault(t, r) : n;
|
|
6380
|
-
}, d = (e) => r ?
|
|
6381
|
-
return
|
|
6383
|
+
}, d = (e) => r ? Ti(t, e) : a({ era: e }, "era");
|
|
6384
|
+
return Di(e.parseFormat(n), (e) => {
|
|
6382
6385
|
switch (e) {
|
|
6383
6386
|
case "S": return this.num(t.millisecond);
|
|
6384
6387
|
case "u":
|
|
@@ -6487,17 +6490,17 @@ var wi = {
|
|
|
6487
6490
|
}
|
|
6488
6491
|
return n;
|
|
6489
6492
|
}, o = e.parseFormat(n), s = o.reduce((e, { literal: t, val: n }) => t ? e : e.concat(n), []), c = t.shiftTo(...s.map(i).filter((e) => e));
|
|
6490
|
-
return
|
|
6493
|
+
return Di(o, a(c, {
|
|
6491
6494
|
isNegativeDuration: c < 0,
|
|
6492
6495
|
largestUnit: Object.keys(c.values)[0]
|
|
6493
6496
|
}));
|
|
6494
6497
|
}
|
|
6495
|
-
},
|
|
6496
|
-
function
|
|
6498
|
+
}, ki = /[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;
|
|
6499
|
+
function H(...e) {
|
|
6497
6500
|
let t = e.reduce((e, t) => e + t.source, "");
|
|
6498
6501
|
return RegExp(`^${t}$`);
|
|
6499
6502
|
}
|
|
6500
|
-
function
|
|
6503
|
+
function U(...e) {
|
|
6501
6504
|
return (t) => e.reduce(([e, n, r], i) => {
|
|
6502
6505
|
let [a, o, s] = i(t, r);
|
|
6503
6506
|
return [
|
|
@@ -6514,7 +6517,7 @@ function Ei(...e) {
|
|
|
6514
6517
|
1
|
|
6515
6518
|
]).slice(0, 2);
|
|
6516
6519
|
}
|
|
6517
|
-
function
|
|
6520
|
+
function W(e, ...t) {
|
|
6518
6521
|
if (e == null) return [null, null];
|
|
6519
6522
|
for (let [n, r] of t) {
|
|
6520
6523
|
let t = n.exec(e);
|
|
@@ -6522,10 +6525,10 @@ function Di(e, ...t) {
|
|
|
6522
6525
|
}
|
|
6523
6526
|
return [null, null];
|
|
6524
6527
|
}
|
|
6525
|
-
function
|
|
6528
|
+
function Ai(...e) {
|
|
6526
6529
|
return (t, n) => {
|
|
6527
6530
|
let r = {}, i = 0;
|
|
6528
|
-
for (; i < e.length; i++) r[e[i]] =
|
|
6531
|
+
for (; i < e.length; i++) r[e[i]] = R(t[n + i]);
|
|
6529
6532
|
return [
|
|
6530
6533
|
r,
|
|
6531
6534
|
null,
|
|
@@ -6533,64 +6536,64 @@ function Oi(...e) {
|
|
|
6533
6536
|
];
|
|
6534
6537
|
};
|
|
6535
6538
|
}
|
|
6536
|
-
var
|
|
6537
|
-
function
|
|
6539
|
+
var ji = /(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/, Mi = `(?:${ji.source}?(?:\\[(${ki.source})\\])?)?`, Ni = /(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/, Pi = RegExp(`${Ni.source}${Mi}`), Fi = RegExp(`(?:[Tt]${Pi.source})?`), Ii = /([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/, Li = /(\d{4})-?W(\d\d)(?:-?(\d))?/, Ri = /(\d{4})-?(\d{3})/, zi = Ai("weekYear", "weekNumber", "weekDay"), Bi = Ai("year", "ordinal"), Vi = /(\d{4})-(\d\d)-(\d\d)/, Hi = RegExp(`${Ni.source} ?(?:${ji.source}|(${ki.source}))?`), Ui = RegExp(`(?: ${Hi.source})?`);
|
|
6540
|
+
function Wi(e, t, n) {
|
|
6538
6541
|
let r = e[t];
|
|
6539
|
-
return
|
|
6542
|
+
return P(r) ? n : R(r);
|
|
6540
6543
|
}
|
|
6541
|
-
function
|
|
6544
|
+
function Gi(e, t) {
|
|
6542
6545
|
return [
|
|
6543
6546
|
{
|
|
6544
|
-
year:
|
|
6545
|
-
month:
|
|
6546
|
-
day:
|
|
6547
|
+
year: Wi(e, t),
|
|
6548
|
+
month: Wi(e, t + 1, 1),
|
|
6549
|
+
day: Wi(e, t + 2, 1)
|
|
6547
6550
|
},
|
|
6548
6551
|
null,
|
|
6549
6552
|
t + 3
|
|
6550
6553
|
];
|
|
6551
6554
|
}
|
|
6552
|
-
function
|
|
6555
|
+
function G(e, t) {
|
|
6553
6556
|
return [
|
|
6554
6557
|
{
|
|
6555
|
-
hours:
|
|
6556
|
-
minutes:
|
|
6557
|
-
seconds:
|
|
6558
|
-
milliseconds:
|
|
6558
|
+
hours: Wi(e, t, 0),
|
|
6559
|
+
minutes: Wi(e, t + 1, 0),
|
|
6560
|
+
seconds: Wi(e, t + 2, 0),
|
|
6561
|
+
milliseconds: Yr(e[t + 3])
|
|
6559
6562
|
},
|
|
6560
6563
|
null,
|
|
6561
6564
|
t + 4
|
|
6562
6565
|
];
|
|
6563
6566
|
}
|
|
6564
|
-
function
|
|
6565
|
-
let n = !e[t] && !e[t + 1], r =
|
|
6567
|
+
function Ki(e, t) {
|
|
6568
|
+
let n = !e[t] && !e[t + 1], r = ii(e[t + 1], e[t + 2]);
|
|
6566
6569
|
return [
|
|
6567
6570
|
{},
|
|
6568
|
-
n ? null :
|
|
6571
|
+
n ? null : O.instance(r),
|
|
6569
6572
|
t + 3
|
|
6570
6573
|
];
|
|
6571
6574
|
}
|
|
6572
|
-
function
|
|
6575
|
+
function qi(e, t) {
|
|
6573
6576
|
return [
|
|
6574
6577
|
{},
|
|
6575
|
-
e[t] ?
|
|
6578
|
+
e[t] ? In.create(e[t]) : null,
|
|
6576
6579
|
t + 1
|
|
6577
6580
|
];
|
|
6578
6581
|
}
|
|
6579
|
-
var
|
|
6580
|
-
function
|
|
6582
|
+
var Ji = RegExp(`^T?${Ni.source}$`), Yi = /^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;
|
|
6583
|
+
function Xi(e) {
|
|
6581
6584
|
let [t, n, r, i, a, o, s, c, l] = e, u = t[0] === "-", d = c && c[0] === "-", f = (e, t = !1) => e !== void 0 && (t || e && u) ? -e : e;
|
|
6582
6585
|
return [{
|
|
6583
|
-
years: f(
|
|
6584
|
-
months: f(
|
|
6585
|
-
weeks: f(
|
|
6586
|
-
days: f(
|
|
6587
|
-
hours: f(
|
|
6588
|
-
minutes: f(
|
|
6589
|
-
seconds: f(
|
|
6590
|
-
milliseconds: f(
|
|
6586
|
+
years: f(z(n)),
|
|
6587
|
+
months: f(z(r)),
|
|
6588
|
+
weeks: f(z(i)),
|
|
6589
|
+
days: f(z(a)),
|
|
6590
|
+
hours: f(z(o)),
|
|
6591
|
+
minutes: f(z(s)),
|
|
6592
|
+
seconds: f(z(c), c === "-0"),
|
|
6593
|
+
milliseconds: f(Yr(l), d)
|
|
6591
6594
|
}];
|
|
6592
6595
|
}
|
|
6593
|
-
var
|
|
6596
|
+
var Zi = {
|
|
6594
6597
|
GMT: 0,
|
|
6595
6598
|
EDT: -240,
|
|
6596
6599
|
EST: -300,
|
|
@@ -6601,55 +6604,55 @@ var Xi = {
|
|
|
6601
6604
|
PDT: -420,
|
|
6602
6605
|
PST: -480
|
|
6603
6606
|
};
|
|
6604
|
-
function
|
|
6607
|
+
function Qi(e, t, n, r, i, a, o) {
|
|
6605
6608
|
let s = {
|
|
6606
|
-
year: t.length === 2 ?
|
|
6607
|
-
month:
|
|
6608
|
-
day:
|
|
6609
|
-
hour:
|
|
6610
|
-
minute:
|
|
6609
|
+
year: t.length === 2 ? ni(R(t)) : R(t),
|
|
6610
|
+
month: ui.indexOf(n) + 1,
|
|
6611
|
+
day: R(r),
|
|
6612
|
+
hour: R(i),
|
|
6613
|
+
minute: R(a)
|
|
6611
6614
|
};
|
|
6612
|
-
return o && (s.second =
|
|
6613
|
-
}
|
|
6614
|
-
var Qi = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;
|
|
6615
|
-
function $i(e) {
|
|
6616
|
-
let [, t, n, r, i, a, o, s, c, l, u, d] = e, f = Zi(t, i, r, n, a, o, s), p;
|
|
6617
|
-
return p = c ? Xi[c] : l ? 0 : ei(u, d), [f, new A(p)];
|
|
6615
|
+
return o && (s.second = R(o)), e && (s.weekday = e.length > 3 ? pi.indexOf(e) + 1 : mi.indexOf(e) + 1), s;
|
|
6618
6616
|
}
|
|
6617
|
+
var $i = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;
|
|
6619
6618
|
function ea(e) {
|
|
6620
|
-
|
|
6619
|
+
let [, t, n, r, i, a, o, s, c, l, u, d] = e, f = Qi(t, i, r, n, a, o, s), p;
|
|
6620
|
+
return p = c ? Zi[c] : l ? 0 : ii(u, d), [f, new O(p)];
|
|
6621
6621
|
}
|
|
6622
|
-
|
|
6623
|
-
|
|
6624
|
-
let [, t, n, r, i, a, o, s] = e;
|
|
6625
|
-
return [Zi(t, i, r, n, a, o, s), A.utcInstance];
|
|
6622
|
+
function ta(e) {
|
|
6623
|
+
return e.replace(/\([^()]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").trim();
|
|
6626
6624
|
}
|
|
6625
|
+
var na = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/, ra = /^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/, ia = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;
|
|
6627
6626
|
function aa(e) {
|
|
6628
6627
|
let [, t, n, r, i, a, o, s] = e;
|
|
6629
|
-
return [
|
|
6628
|
+
return [Qi(t, i, r, n, a, o, s), O.utcInstance];
|
|
6630
6629
|
}
|
|
6631
|
-
|
|
6632
|
-
|
|
6633
|
-
return
|
|
6630
|
+
function oa(e) {
|
|
6631
|
+
let [, t, n, r, i, a, o, s] = e;
|
|
6632
|
+
return [Qi(t, s, n, r, i, a, o), O.utcInstance];
|
|
6634
6633
|
}
|
|
6634
|
+
var sa = H(Ii, Fi), ca = H(Li, Fi), la = H(Ri, Fi), ua = H(Pi), da = U(Gi, G, Ki, qi), fa = U(zi, G, Ki, qi), pa = U(Bi, G, Ki, qi), ma = U(G, Ki, qi);
|
|
6635
6635
|
function ha(e) {
|
|
6636
|
-
return
|
|
6636
|
+
return W(e, [sa, da], [ca, fa], [la, pa], [ua, ma]);
|
|
6637
6637
|
}
|
|
6638
6638
|
function ga(e) {
|
|
6639
|
-
return
|
|
6639
|
+
return W(ta(e), [$i, ea]);
|
|
6640
6640
|
}
|
|
6641
6641
|
function _a(e) {
|
|
6642
|
-
return
|
|
6642
|
+
return W(e, [na, aa], [ra, aa], [ia, oa]);
|
|
6643
6643
|
}
|
|
6644
|
-
|
|
6645
|
-
|
|
6646
|
-
return Di(e, [qi, va]);
|
|
6644
|
+
function va(e) {
|
|
6645
|
+
return W(e, [Yi, Xi]);
|
|
6647
6646
|
}
|
|
6648
|
-
var
|
|
6649
|
-
function
|
|
6650
|
-
return
|
|
6647
|
+
var ya = U(G);
|
|
6648
|
+
function ba(e) {
|
|
6649
|
+
return W(e, [Ji, ya]);
|
|
6651
6650
|
}
|
|
6652
|
-
var
|
|
6651
|
+
var xa = H(Vi, Ui), Sa = H(Hi), Ca = U(G, Ki, qi);
|
|
6652
|
+
function wa(e) {
|
|
6653
|
+
return W(e, [xa, da], [Sa, Ca]);
|
|
6654
|
+
}
|
|
6655
|
+
var Ta = "Invalid Duration", Ea = {
|
|
6653
6656
|
weeks: {
|
|
6654
6657
|
days: 7,
|
|
6655
6658
|
hours: 168,
|
|
@@ -6673,7 +6676,7 @@ var wa = "Invalid Duration", Ta = {
|
|
|
6673
6676
|
milliseconds: 6e4
|
|
6674
6677
|
},
|
|
6675
6678
|
seconds: { milliseconds: 1e3 }
|
|
6676
|
-
},
|
|
6679
|
+
}, Da = {
|
|
6677
6680
|
years: {
|
|
6678
6681
|
quarters: 4,
|
|
6679
6682
|
months: 12,
|
|
@@ -6701,8 +6704,8 @@ var wa = "Invalid Duration", Ta = {
|
|
|
6701
6704
|
seconds: 2592e3,
|
|
6702
6705
|
milliseconds: 2592e6
|
|
6703
6706
|
},
|
|
6704
|
-
...
|
|
6705
|
-
}, K = 146097 / 400,
|
|
6707
|
+
...Ea
|
|
6708
|
+
}, K = 146097 / 400, Oa = 146097 / 4800, ka = {
|
|
6706
6709
|
years: {
|
|
6707
6710
|
quarters: 4,
|
|
6708
6711
|
months: 12,
|
|
@@ -6723,14 +6726,14 @@ var wa = "Invalid Duration", Ta = {
|
|
|
6723
6726
|
milliseconds: K * 24 * 60 * 60 * 1e3 / 4
|
|
6724
6727
|
},
|
|
6725
6728
|
months: {
|
|
6726
|
-
weeks:
|
|
6727
|
-
days:
|
|
6728
|
-
hours:
|
|
6729
|
-
minutes:
|
|
6730
|
-
seconds:
|
|
6731
|
-
milliseconds:
|
|
6732
|
-
},
|
|
6733
|
-
...
|
|
6729
|
+
weeks: Oa / 7,
|
|
6730
|
+
days: Oa,
|
|
6731
|
+
hours: Oa * 24,
|
|
6732
|
+
minutes: Oa * 24 * 60,
|
|
6733
|
+
seconds: Oa * 24 * 60 * 60,
|
|
6734
|
+
milliseconds: Oa * 24 * 60 * 60 * 1e3
|
|
6735
|
+
},
|
|
6736
|
+
...Ea
|
|
6734
6737
|
}, q = [
|
|
6735
6738
|
"years",
|
|
6736
6739
|
"quarters",
|
|
@@ -6741,7 +6744,7 @@ var wa = "Invalid Duration", Ta = {
|
|
|
6741
6744
|
"minutes",
|
|
6742
6745
|
"seconds",
|
|
6743
6746
|
"milliseconds"
|
|
6744
|
-
],
|
|
6747
|
+
], Aa = q.slice(0).reverse();
|
|
6745
6748
|
function J(e, t, n = !1) {
|
|
6746
6749
|
return new Y({
|
|
6747
6750
|
values: n ? t.values : {
|
|
@@ -6753,22 +6756,22 @@ function J(e, t, n = !1) {
|
|
|
6753
6756
|
matrix: t.matrix || e.matrix
|
|
6754
6757
|
});
|
|
6755
6758
|
}
|
|
6756
|
-
function
|
|
6759
|
+
function ja(e, t) {
|
|
6757
6760
|
let n = t.milliseconds ?? 0;
|
|
6758
|
-
for (let r of
|
|
6761
|
+
for (let r of Aa.slice(1)) t[r] && (n += t[r] * e[r].milliseconds);
|
|
6759
6762
|
return n;
|
|
6760
6763
|
}
|
|
6761
|
-
function
|
|
6762
|
-
let n =
|
|
6764
|
+
function Ma(e, t) {
|
|
6765
|
+
let n = ja(e, t) < 0 ? -1 : 1;
|
|
6763
6766
|
q.reduceRight((r, i) => {
|
|
6764
|
-
if (
|
|
6767
|
+
if (P(t[i])) return r;
|
|
6765
6768
|
if (r) {
|
|
6766
6769
|
let a = t[r] * n, o = e[i][r], s = Math.floor(a / o);
|
|
6767
6770
|
t[i] += s * n, t[r] -= s * o * n;
|
|
6768
6771
|
}
|
|
6769
6772
|
return i;
|
|
6770
6773
|
}, null), q.reduce((n, r) => {
|
|
6771
|
-
if (
|
|
6774
|
+
if (P(t[r])) return n;
|
|
6772
6775
|
if (n) {
|
|
6773
6776
|
let i = t[n] % 1;
|
|
6774
6777
|
t[n] -= i, t[r] += i * e[n][r];
|
|
@@ -6776,46 +6779,46 @@ function ja(e, t) {
|
|
|
6776
6779
|
return r;
|
|
6777
6780
|
}, null);
|
|
6778
6781
|
}
|
|
6779
|
-
function
|
|
6782
|
+
function Na(e) {
|
|
6780
6783
|
let t = {};
|
|
6781
6784
|
for (let [n, r] of Object.entries(e)) r !== 0 && (t[n] = r);
|
|
6782
6785
|
return t;
|
|
6783
6786
|
}
|
|
6784
6787
|
var Y = class e {
|
|
6785
6788
|
constructor(e) {
|
|
6786
|
-
let t = e.conversionAccuracy === "longterm" || !1, n = t ?
|
|
6787
|
-
e.matrix && (n = e.matrix), this.values = e.values, this.loc = e.loc ||
|
|
6789
|
+
let t = e.conversionAccuracy === "longterm" || !1, n = t ? ka : Da;
|
|
6790
|
+
e.matrix && (n = e.matrix), this.values = e.values, this.loc = e.loc || D.create(), this.conversionAccuracy = t ? "longterm" : "casual", this.invalid = e.invalid || null, this.matrix = n, this.isLuxonDuration = !0;
|
|
6788
6791
|
}
|
|
6789
6792
|
static fromMillis(t, n) {
|
|
6790
6793
|
return e.fromObject({ milliseconds: t }, n);
|
|
6791
6794
|
}
|
|
6792
6795
|
static fromObject(t, n = {}) {
|
|
6793
|
-
if (typeof t != "object" || !t) throw new
|
|
6796
|
+
if (typeof t != "object" || !t) throw new S(`Duration.fromObject: argument expected to be an object, got ${t === null ? "null" : typeof t}`);
|
|
6794
6797
|
return new e({
|
|
6795
|
-
values:
|
|
6796
|
-
loc:
|
|
6798
|
+
values: oi(t, e.normalizeUnit),
|
|
6799
|
+
loc: D.fromObject(n),
|
|
6797
6800
|
conversionAccuracy: n.conversionAccuracy,
|
|
6798
6801
|
matrix: n.matrix
|
|
6799
6802
|
});
|
|
6800
6803
|
}
|
|
6801
6804
|
static fromDurationLike(t) {
|
|
6802
|
-
if (
|
|
6805
|
+
if (F(t)) return e.fromMillis(t);
|
|
6803
6806
|
if (e.isDuration(t)) return t;
|
|
6804
6807
|
if (typeof t == "object") return e.fromObject(t);
|
|
6805
|
-
throw new
|
|
6808
|
+
throw new S(`Unknown duration argument ${t} of type ${typeof t}`);
|
|
6806
6809
|
}
|
|
6807
6810
|
static fromISO(t, n) {
|
|
6808
|
-
let [r] =
|
|
6811
|
+
let [r] = va(t);
|
|
6809
6812
|
return r ? e.fromObject(r, n) : e.invalid("unparsable", `the input "${t}" can't be parsed as ISO 8601`);
|
|
6810
6813
|
}
|
|
6811
6814
|
static fromISOTime(t, n) {
|
|
6812
|
-
let [r] =
|
|
6815
|
+
let [r] = ba(t);
|
|
6813
6816
|
return r ? e.fromObject(r, n) : e.invalid("unparsable", `the input "${t}" can't be parsed as ISO 8601`);
|
|
6814
6817
|
}
|
|
6815
6818
|
static invalid(t, n = null) {
|
|
6816
|
-
if (!t) throw new
|
|
6817
|
-
let r = t instanceof
|
|
6818
|
-
if (
|
|
6819
|
+
if (!t) throw new S("need to specify a reason the Duration is invalid");
|
|
6820
|
+
let r = t instanceof M ? t : new M(t, n);
|
|
6821
|
+
if (j.throwOnInvalid) throw new tn(r);
|
|
6819
6822
|
return new e({ invalid: r });
|
|
6820
6823
|
}
|
|
6821
6824
|
static normalizeUnit(e) {
|
|
@@ -6839,7 +6842,7 @@ var Y = class e {
|
|
|
6839
6842
|
millisecond: "milliseconds",
|
|
6840
6843
|
milliseconds: "milliseconds"
|
|
6841
6844
|
}[e && e.toLowerCase()];
|
|
6842
|
-
if (!t) throw new
|
|
6845
|
+
if (!t) throw new rn(e);
|
|
6843
6846
|
return t;
|
|
6844
6847
|
}
|
|
6845
6848
|
static isDuration(e) {
|
|
@@ -6856,13 +6859,13 @@ var Y = class e {
|
|
|
6856
6859
|
...t,
|
|
6857
6860
|
floor: t.round !== !1 && t.floor !== !1
|
|
6858
6861
|
};
|
|
6859
|
-
return this.isValid ?
|
|
6862
|
+
return this.isValid ? V.create(this.loc, n).formatDurationFromString(this, e) : Ta;
|
|
6860
6863
|
}
|
|
6861
6864
|
toHuman(e = {}) {
|
|
6862
|
-
if (!this.isValid) return
|
|
6865
|
+
if (!this.isValid) return Ta;
|
|
6863
6866
|
let t = e.showZeros !== !1, n = q.map((n) => {
|
|
6864
6867
|
let r = this.values[n];
|
|
6865
|
-
return
|
|
6868
|
+
return P(r) || r === 0 && !t ? null : this.loc.numberFormatter({
|
|
6866
6869
|
style: "unit",
|
|
6867
6870
|
unitDisplay: "long",
|
|
6868
6871
|
...e,
|
|
@@ -6881,7 +6884,7 @@ var Y = class e {
|
|
|
6881
6884
|
toISO() {
|
|
6882
6885
|
if (!this.isValid) return null;
|
|
6883
6886
|
let e = "P";
|
|
6884
|
-
return this.years !== 0 && (e += this.years + "Y"), (this.months !== 0 || this.quarters !== 0) && (e += this.months + this.quarters * 3 + "M"), this.weeks !== 0 && (e += this.weeks + "W"), this.days !== 0 && (e += this.days + "D"), (this.hours !== 0 || this.minutes !== 0 || this.seconds !== 0 || this.milliseconds !== 0) && (e += "T"), this.hours !== 0 && (e += this.hours + "H"), this.minutes !== 0 && (e += this.minutes + "M"), (this.seconds !== 0 || this.milliseconds !== 0) && (e +=
|
|
6887
|
+
return this.years !== 0 && (e += this.years + "Y"), (this.months !== 0 || this.quarters !== 0) && (e += this.months + this.quarters * 3 + "M"), this.weeks !== 0 && (e += this.weeks + "W"), this.days !== 0 && (e += this.days + "D"), (this.hours !== 0 || this.minutes !== 0 || this.seconds !== 0 || this.milliseconds !== 0) && (e += "T"), this.hours !== 0 && (e += this.hours + "H"), this.minutes !== 0 && (e += this.minutes + "M"), (this.seconds !== 0 || this.milliseconds !== 0) && (e += Xr(this.seconds + this.milliseconds / 1e3, 3) + "S"), e === "P" && (e += "T0S"), e;
|
|
6885
6888
|
}
|
|
6886
6889
|
toISOTime(e = {}) {
|
|
6887
6890
|
if (!this.isValid) return null;
|
|
@@ -6905,7 +6908,7 @@ var Y = class e {
|
|
|
6905
6908
|
return this.isValid ? `Duration { values: ${JSON.stringify(this.values)} }` : `Duration { Invalid, reason: ${this.invalidReason} }`;
|
|
6906
6909
|
}
|
|
6907
6910
|
toMillis() {
|
|
6908
|
-
return this.isValid ?
|
|
6911
|
+
return this.isValid ? ja(this.matrix, this.values) : NaN;
|
|
6909
6912
|
}
|
|
6910
6913
|
valueOf() {
|
|
6911
6914
|
return this.toMillis();
|
|
@@ -6913,7 +6916,7 @@ var Y = class e {
|
|
|
6913
6916
|
plus(t) {
|
|
6914
6917
|
if (!this.isValid) return this;
|
|
6915
6918
|
let n = e.fromDurationLike(t), r = {};
|
|
6916
|
-
for (let e of q) (
|
|
6919
|
+
for (let e of q) (Kr(n.values, e) || Kr(this.values, e)) && (r[e] = n.get(e) + this.get(e));
|
|
6917
6920
|
return J(this, { values: r }, !0);
|
|
6918
6921
|
}
|
|
6919
6922
|
minus(t) {
|
|
@@ -6924,7 +6927,7 @@ var Y = class e {
|
|
|
6924
6927
|
mapUnits(e) {
|
|
6925
6928
|
if (!this.isValid) return this;
|
|
6926
6929
|
let t = {};
|
|
6927
|
-
for (let n of Object.keys(this.values)) t[n] =
|
|
6930
|
+
for (let n of Object.keys(this.values)) t[n] = ai(e(this.values[n], n));
|
|
6928
6931
|
return J(this, { values: t }, !0);
|
|
6929
6932
|
}
|
|
6930
6933
|
get(t) {
|
|
@@ -6934,7 +6937,7 @@ var Y = class e {
|
|
|
6934
6937
|
if (!this.isValid) return this;
|
|
6935
6938
|
let n = {
|
|
6936
6939
|
...this.values,
|
|
6937
|
-
...
|
|
6940
|
+
...oi(t, e.normalizeUnit)
|
|
6938
6941
|
};
|
|
6939
6942
|
return J(this, { values: n });
|
|
6940
6943
|
}
|
|
@@ -6955,11 +6958,11 @@ var Y = class e {
|
|
|
6955
6958
|
normalize() {
|
|
6956
6959
|
if (!this.isValid) return this;
|
|
6957
6960
|
let e = this.toObject();
|
|
6958
|
-
return
|
|
6961
|
+
return Ma(this.matrix, e), J(this, { values: e }, !0);
|
|
6959
6962
|
}
|
|
6960
6963
|
rescale() {
|
|
6961
6964
|
if (!this.isValid) return this;
|
|
6962
|
-
let e =
|
|
6965
|
+
let e = Na(this.normalize().shiftToAll().toObject());
|
|
6963
6966
|
return J(this, { values: e }, !0);
|
|
6964
6967
|
}
|
|
6965
6968
|
shiftTo(...t) {
|
|
@@ -6970,12 +6973,12 @@ var Y = class e {
|
|
|
6970
6973
|
a = e;
|
|
6971
6974
|
let t = 0;
|
|
6972
6975
|
for (let n in r) t += this.matrix[n][e] * r[n], r[n] = 0;
|
|
6973
|
-
|
|
6976
|
+
F(i[e]) && (t += i[e]);
|
|
6974
6977
|
let o = Math.trunc(t);
|
|
6975
6978
|
n[e] = o, r[e] = (t * 1e3 - o * 1e3) / 1e3;
|
|
6976
|
-
} else
|
|
6979
|
+
} else F(i[e]) && (r[e] = i[e]);
|
|
6977
6980
|
for (let e in r) r[e] !== 0 && (n[a] += e === a ? r[e] : r[e] / this.matrix[a][e]);
|
|
6978
|
-
return
|
|
6981
|
+
return Ma(this.matrix, n), J(this, { values: n }, !0);
|
|
6979
6982
|
}
|
|
6980
6983
|
shiftToAll() {
|
|
6981
6984
|
return this.isValid ? this.shiftTo("years", "months", "weeks", "days", "hours", "minutes", "seconds", "milliseconds") : this;
|
|
@@ -6988,7 +6991,7 @@ var Y = class e {
|
|
|
6988
6991
|
}
|
|
6989
6992
|
removeZeros() {
|
|
6990
6993
|
if (!this.isValid) return this;
|
|
6991
|
-
let e =
|
|
6994
|
+
let e = Na(this.values);
|
|
6992
6995
|
return J(this, { values: e }, !0);
|
|
6993
6996
|
}
|
|
6994
6997
|
get years() {
|
|
@@ -7035,33 +7038,33 @@ var Y = class e {
|
|
|
7035
7038
|
for (let n of q) if (!t(this.values[n], e.values[n])) return !1;
|
|
7036
7039
|
return !0;
|
|
7037
7040
|
}
|
|
7038
|
-
},
|
|
7039
|
-
function
|
|
7040
|
-
return !e || !e.isValid ?
|
|
7041
|
+
}, Pa = "Invalid Interval";
|
|
7042
|
+
function Fa(e, t) {
|
|
7043
|
+
return !e || !e.isValid ? Ia.invalid("missing or invalid start") : !t || !t.isValid ? Ia.invalid("missing or invalid end") : t < e ? Ia.invalid("end before start", `The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`) : null;
|
|
7041
7044
|
}
|
|
7042
|
-
var
|
|
7045
|
+
var Ia = class e {
|
|
7043
7046
|
constructor(e) {
|
|
7044
7047
|
this.s = e.start, this.e = e.end, this.invalid = e.invalid || null, this.isLuxonInterval = !0;
|
|
7045
7048
|
}
|
|
7046
7049
|
static invalid(t, n = null) {
|
|
7047
|
-
if (!t) throw new
|
|
7048
|
-
let r = t instanceof
|
|
7049
|
-
if (
|
|
7050
|
+
if (!t) throw new S("need to specify a reason the Interval is invalid");
|
|
7051
|
+
let r = t instanceof M ? t : new M(t, n);
|
|
7052
|
+
if (j.throwOnInvalid) throw new en(r);
|
|
7050
7053
|
return new e({ invalid: r });
|
|
7051
7054
|
}
|
|
7052
7055
|
static fromDateTimes(t, n) {
|
|
7053
|
-
let r =
|
|
7054
|
-
return
|
|
7056
|
+
let r = Lo(t), i = Lo(n);
|
|
7057
|
+
return Fa(r, i) ?? new e({
|
|
7055
7058
|
start: r,
|
|
7056
7059
|
end: i
|
|
7057
7060
|
});
|
|
7058
7061
|
}
|
|
7059
7062
|
static after(t, n) {
|
|
7060
|
-
let r = Y.fromDurationLike(n), i =
|
|
7063
|
+
let r = Y.fromDurationLike(n), i = Lo(t);
|
|
7061
7064
|
return e.fromDateTimes(i, i.plus(r));
|
|
7062
7065
|
}
|
|
7063
7066
|
static before(t, n) {
|
|
7064
|
-
let r = Y.fromDurationLike(n), i =
|
|
7067
|
+
let r = Y.fromDurationLike(n), i = Lo(t);
|
|
7065
7068
|
return e.fromDateTimes(i.minus(r), i);
|
|
7066
7069
|
}
|
|
7067
7070
|
static fromISO(t, n) {
|
|
@@ -7139,7 +7142,7 @@ var Fa = class e {
|
|
|
7139
7142
|
}
|
|
7140
7143
|
splitAt(...t) {
|
|
7141
7144
|
if (!this.isValid) return [];
|
|
7142
|
-
let n = t.map(
|
|
7145
|
+
let n = t.map(Lo).filter((e) => this.contains(e)).sort((e, t) => e.toMillis() - t.toMillis()), r = [], { s: i } = this, a = 0;
|
|
7143
7146
|
for (; i < this.e;) {
|
|
7144
7147
|
let t = n[a] || this.e, o = +t > +this.e ? this.e : t;
|
|
7145
7148
|
r.push(e.fromDateTimes(i, o)), i = o, a += 1;
|
|
@@ -7203,25 +7206,25 @@ var Fa = class e {
|
|
|
7203
7206
|
return e.xor([this].concat(t)).map((e) => this.intersection(e)).filter((e) => e && !e.isEmpty());
|
|
7204
7207
|
}
|
|
7205
7208
|
toString() {
|
|
7206
|
-
return this.isValid ? `[${this.s.toISO()} – ${this.e.toISO()})` :
|
|
7209
|
+
return this.isValid ? `[${this.s.toISO()} – ${this.e.toISO()})` : Pa;
|
|
7207
7210
|
}
|
|
7208
7211
|
[Symbol.for("nodejs.util.inspect.custom")]() {
|
|
7209
7212
|
return this.isValid ? `Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }` : `Interval { Invalid, reason: ${this.invalidReason} }`;
|
|
7210
7213
|
}
|
|
7211
|
-
toLocaleString(e =
|
|
7212
|
-
return this.isValid ?
|
|
7214
|
+
toLocaleString(e = an, t = {}) {
|
|
7215
|
+
return this.isValid ? V.create(this.s.loc.clone(t), e).formatInterval(this) : Pa;
|
|
7213
7216
|
}
|
|
7214
7217
|
toISO(e) {
|
|
7215
|
-
return this.isValid ? `${this.s.toISO(e)}/${this.e.toISO(e)}` :
|
|
7218
|
+
return this.isValid ? `${this.s.toISO(e)}/${this.e.toISO(e)}` : Pa;
|
|
7216
7219
|
}
|
|
7217
7220
|
toISODate() {
|
|
7218
|
-
return this.isValid ? `${this.s.toISODate()}/${this.e.toISODate()}` :
|
|
7221
|
+
return this.isValid ? `${this.s.toISODate()}/${this.e.toISODate()}` : Pa;
|
|
7219
7222
|
}
|
|
7220
7223
|
toISOTime(e) {
|
|
7221
|
-
return this.isValid ? `${this.s.toISOTime(e)}/${this.e.toISOTime(e)}` :
|
|
7224
|
+
return this.isValid ? `${this.s.toISOTime(e)}/${this.e.toISOTime(e)}` : Pa;
|
|
7222
7225
|
}
|
|
7223
7226
|
toFormat(e, { separator: t = " – " } = {}) {
|
|
7224
|
-
return this.isValid ? `${this.s.toFormat(e)}${t}${this.e.toFormat(e)}` :
|
|
7227
|
+
return this.isValid ? `${this.s.toFormat(e)}${t}${this.e.toFormat(e)}` : Pa;
|
|
7225
7228
|
}
|
|
7226
7229
|
toDuration(e, t) {
|
|
7227
7230
|
return this.isValid ? this.e.diff(this.s, e, t) : Y.invalid(this.invalidReason);
|
|
@@ -7229,65 +7232,65 @@ var Fa = class e {
|
|
|
7229
7232
|
mapEndpoints(t) {
|
|
7230
7233
|
return e.fromDateTimes(t(this.s), t(this.e));
|
|
7231
7234
|
}
|
|
7232
|
-
},
|
|
7233
|
-
static hasDST(e =
|
|
7235
|
+
}, La = class {
|
|
7236
|
+
static hasDST(e = j.defaultZone) {
|
|
7234
7237
|
let t = $.now().setZone(e).set({ month: 12 });
|
|
7235
7238
|
return !e.isUniversal && t.offset !== t.set({ month: 6 }).offset;
|
|
7236
7239
|
}
|
|
7237
7240
|
static isValidIANAZone(e) {
|
|
7238
|
-
return
|
|
7241
|
+
return In.isValidZone(e);
|
|
7239
7242
|
}
|
|
7240
7243
|
static normalizeZone(e) {
|
|
7241
|
-
return
|
|
7244
|
+
return k(e, j.defaultZone);
|
|
7242
7245
|
}
|
|
7243
7246
|
static getStartOfWeek({ locale: e = null, locObj: t = null } = {}) {
|
|
7244
|
-
return (t ||
|
|
7247
|
+
return (t || D.create(e)).getStartOfWeek();
|
|
7245
7248
|
}
|
|
7246
7249
|
static getMinimumDaysInFirstWeek({ locale: e = null, locObj: t = null } = {}) {
|
|
7247
|
-
return (t ||
|
|
7250
|
+
return (t || D.create(e)).getMinDaysInFirstWeek();
|
|
7248
7251
|
}
|
|
7249
7252
|
static getWeekendWeekdays({ locale: e = null, locObj: t = null } = {}) {
|
|
7250
|
-
return (t ||
|
|
7253
|
+
return (t || D.create(e)).getWeekendDays().slice();
|
|
7251
7254
|
}
|
|
7252
7255
|
static months(e = "long", { locale: t = null, numberingSystem: n = null, locObj: r = null, outputCalendar: i = "gregory" } = {}) {
|
|
7253
|
-
return (r ||
|
|
7256
|
+
return (r || D.create(t, n, i)).months(e);
|
|
7254
7257
|
}
|
|
7255
7258
|
static monthsFormat(e = "long", { locale: t = null, numberingSystem: n = null, locObj: r = null, outputCalendar: i = "gregory" } = {}) {
|
|
7256
|
-
return (r ||
|
|
7259
|
+
return (r || D.create(t, n, i)).months(e, !0);
|
|
7257
7260
|
}
|
|
7258
7261
|
static weekdays(e = "long", { locale: t = null, numberingSystem: n = null, locObj: r = null } = {}) {
|
|
7259
|
-
return (r ||
|
|
7262
|
+
return (r || D.create(t, n, null)).weekdays(e);
|
|
7260
7263
|
}
|
|
7261
7264
|
static weekdaysFormat(e = "long", { locale: t = null, numberingSystem: n = null, locObj: r = null } = {}) {
|
|
7262
|
-
return (r ||
|
|
7265
|
+
return (r || D.create(t, n, null)).weekdays(e, !0);
|
|
7263
7266
|
}
|
|
7264
7267
|
static meridiems({ locale: e = null } = {}) {
|
|
7265
|
-
return
|
|
7268
|
+
return D.create(e).meridiems();
|
|
7266
7269
|
}
|
|
7267
7270
|
static eras(e = "short", { locale: t = null } = {}) {
|
|
7268
|
-
return
|
|
7271
|
+
return D.create(t, null, "gregory").eras(e);
|
|
7269
7272
|
}
|
|
7270
7273
|
static features() {
|
|
7271
7274
|
return {
|
|
7272
|
-
relative:
|
|
7273
|
-
localeWeek:
|
|
7275
|
+
relative: Vr(),
|
|
7276
|
+
localeWeek: Hr()
|
|
7274
7277
|
};
|
|
7275
7278
|
}
|
|
7276
7279
|
};
|
|
7277
|
-
function
|
|
7280
|
+
function Ra(e, t) {
|
|
7278
7281
|
let n = (e) => e.toUTC(0, { keepLocalTime: !0 }).startOf("day").valueOf(), r = n(t) - n(e);
|
|
7279
7282
|
return Math.floor(Y.fromMillis(r).as("days"));
|
|
7280
7283
|
}
|
|
7281
|
-
function
|
|
7284
|
+
function za(e, t, n) {
|
|
7282
7285
|
let r = [
|
|
7283
7286
|
["years", (e, t) => t.year - e.year],
|
|
7284
7287
|
["quarters", (e, t) => t.quarter - e.quarter + (t.year - e.year) * 4],
|
|
7285
7288
|
["months", (e, t) => t.month - e.month + (t.year - e.year) * 12],
|
|
7286
7289
|
["weeks", (e, t) => {
|
|
7287
|
-
let n =
|
|
7290
|
+
let n = Ra(e, t);
|
|
7288
7291
|
return (n - n % 7) / 7;
|
|
7289
7292
|
}],
|
|
7290
|
-
["days",
|
|
7293
|
+
["days", Ra]
|
|
7291
7294
|
], i = {}, a = e, o, s;
|
|
7292
7295
|
for (let [c, l] of r) n.indexOf(c) >= 0 && (o = c, i[c] = l(e, t), s = a.plus(i), s > t ? (i[c]--, e = a.plus(i), e > t && (s = e, i[c]--, e = a.plus(i))) : e = s);
|
|
7293
7296
|
return [
|
|
@@ -7297,8 +7300,8 @@ function Ra(e, t, n) {
|
|
|
7297
7300
|
o
|
|
7298
7301
|
];
|
|
7299
7302
|
}
|
|
7300
|
-
function
|
|
7301
|
-
let [i, a, o, s] =
|
|
7303
|
+
function Ba(e, t, n, r) {
|
|
7304
|
+
let [i, a, o, s] = za(e, t, n), c = t - i, l = n.filter((e) => [
|
|
7302
7305
|
"hours",
|
|
7303
7306
|
"minutes",
|
|
7304
7307
|
"seconds",
|
|
@@ -7308,45 +7311,45 @@ function za(e, t, n, r) {
|
|
|
7308
7311
|
let u = Y.fromObject(a, r);
|
|
7309
7312
|
return l.length > 0 ? Y.fromMillis(c, r).shiftTo(...l).plus(u) : u;
|
|
7310
7313
|
}
|
|
7311
|
-
var
|
|
7314
|
+
var Va = "missing Intl.DateTimeFormat.formatToParts support";
|
|
7312
7315
|
function X(e, t = (e) => e) {
|
|
7313
7316
|
return {
|
|
7314
7317
|
regex: e,
|
|
7315
|
-
deser: ([e]) => t(
|
|
7318
|
+
deser: ([e]) => t(fr(e))
|
|
7316
7319
|
};
|
|
7317
7320
|
}
|
|
7318
|
-
var
|
|
7319
|
-
function Ua(e) {
|
|
7320
|
-
return e.replace(/\./g, "\\.?").replace(Ha, Va);
|
|
7321
|
-
}
|
|
7321
|
+
var Ha = "[ \xA0]", Ua = new RegExp(Ha, "g");
|
|
7322
7322
|
function Wa(e) {
|
|
7323
|
-
return e.replace(/\./g, "").replace(
|
|
7323
|
+
return e.replace(/\./g, "\\.?").replace(Ua, Ha);
|
|
7324
|
+
}
|
|
7325
|
+
function Ga(e) {
|
|
7326
|
+
return e.replace(/\./g, "").replace(Ua, " ").toLowerCase();
|
|
7324
7327
|
}
|
|
7325
7328
|
function Z(e, t) {
|
|
7326
7329
|
return e === null ? null : {
|
|
7327
|
-
regex: RegExp(e.map(
|
|
7328
|
-
deser: ([n]) => e.findIndex((e) =>
|
|
7330
|
+
regex: RegExp(e.map(Wa).join("|")),
|
|
7331
|
+
deser: ([n]) => e.findIndex((e) => Ga(n) === Ga(e)) + t
|
|
7329
7332
|
};
|
|
7330
7333
|
}
|
|
7331
|
-
function
|
|
7334
|
+
function Ka(e, t) {
|
|
7332
7335
|
return {
|
|
7333
7336
|
regex: e,
|
|
7334
|
-
deser: ([, e, t]) =>
|
|
7337
|
+
deser: ([, e, t]) => ii(e, t),
|
|
7335
7338
|
groups: t
|
|
7336
7339
|
};
|
|
7337
7340
|
}
|
|
7338
|
-
function
|
|
7341
|
+
function qa(e) {
|
|
7339
7342
|
return {
|
|
7340
7343
|
regex: e,
|
|
7341
7344
|
deser: ([e]) => e
|
|
7342
7345
|
};
|
|
7343
7346
|
}
|
|
7344
|
-
function
|
|
7347
|
+
function Ja(e) {
|
|
7345
7348
|
return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&");
|
|
7346
7349
|
}
|
|
7347
|
-
function
|
|
7348
|
-
let n =
|
|
7349
|
-
regex: RegExp(
|
|
7350
|
+
function Ya(e, t) {
|
|
7351
|
+
let n = A(t), r = A(t, "{2}"), i = A(t, "{3}"), a = A(t, "{4}"), o = A(t, "{6}"), s = A(t, "{1,2}"), c = A(t, "{1,3}"), l = A(t, "{1,6}"), u = A(t, "{1,9}"), d = A(t, "{2,4}"), f = A(t, "{4,6}"), p = (e) => ({
|
|
7352
|
+
regex: RegExp(Ja(e.val)),
|
|
7350
7353
|
deser: ([e]) => e,
|
|
7351
7354
|
literal: !0
|
|
7352
7355
|
}), m = ((m) => {
|
|
@@ -7355,7 +7358,7 @@ function Ja(e, t) {
|
|
|
7355
7358
|
case "G": return Z(t.eras("short"), 0);
|
|
7356
7359
|
case "GG": return Z(t.eras("long"), 0);
|
|
7357
7360
|
case "y": return X(l);
|
|
7358
|
-
case "yy": return X(d,
|
|
7361
|
+
case "yy": return X(d, ni);
|
|
7359
7362
|
case "yyyy": return X(a);
|
|
7360
7363
|
case "yyyyy": return X(f);
|
|
7361
7364
|
case "yyyyyy": return X(o);
|
|
@@ -7383,12 +7386,12 @@ function Ja(e, t) {
|
|
|
7383
7386
|
case "ss": return X(r);
|
|
7384
7387
|
case "S": return X(c);
|
|
7385
7388
|
case "SSS": return X(i);
|
|
7386
|
-
case "u": return
|
|
7387
|
-
case "uu": return
|
|
7389
|
+
case "u": return qa(u);
|
|
7390
|
+
case "uu": return qa(s);
|
|
7388
7391
|
case "uuu": return X(n);
|
|
7389
7392
|
case "a": return Z(t.meridiems(), 0);
|
|
7390
7393
|
case "kkkk": return X(a);
|
|
7391
|
-
case "kk": return X(d,
|
|
7394
|
+
case "kk": return X(d, ni);
|
|
7392
7395
|
case "W": return X(s);
|
|
7393
7396
|
case "WW": return X(r);
|
|
7394
7397
|
case "E":
|
|
@@ -7398,16 +7401,16 @@ function Ja(e, t) {
|
|
|
7398
7401
|
case "ccc": return Z(t.weekdays("short", !0), 1);
|
|
7399
7402
|
case "cccc": return Z(t.weekdays("long", !0), 1);
|
|
7400
7403
|
case "Z":
|
|
7401
|
-
case "ZZ": return
|
|
7402
|
-
case "ZZZ": return
|
|
7403
|
-
case "z": return
|
|
7404
|
-
case " ": return
|
|
7404
|
+
case "ZZ": return Ka(RegExp(`([+-]${s.source})(?::(${r.source}))?`), 2);
|
|
7405
|
+
case "ZZZ": return Ka(RegExp(`([+-]${s.source})(${r.source})?`), 2);
|
|
7406
|
+
case "z": return qa(/[a-z_+-/]{1,256}?/i);
|
|
7407
|
+
case " ": return qa(/[^\S\n\r]/);
|
|
7405
7408
|
default: return p(m);
|
|
7406
7409
|
}
|
|
7407
|
-
})(e) || { invalidReason:
|
|
7410
|
+
})(e) || { invalidReason: Va };
|
|
7408
7411
|
return m.token = e, m;
|
|
7409
7412
|
}
|
|
7410
|
-
var
|
|
7413
|
+
var Xa = {
|
|
7411
7414
|
year: {
|
|
7412
7415
|
"2-digit": "yy",
|
|
7413
7416
|
numeric: "yyyyy"
|
|
@@ -7449,7 +7452,7 @@ var Ya = {
|
|
|
7449
7452
|
short: "ZZZ"
|
|
7450
7453
|
}
|
|
7451
7454
|
};
|
|
7452
|
-
function
|
|
7455
|
+
function Za(e, t, n) {
|
|
7453
7456
|
let { type: r, value: i } = e;
|
|
7454
7457
|
if (r === "literal") {
|
|
7455
7458
|
let e = /^\s+$/.test(i);
|
|
@@ -7460,20 +7463,20 @@ function Xa(e, t, n) {
|
|
|
7460
7463
|
}
|
|
7461
7464
|
let a = t[r], o = r;
|
|
7462
7465
|
r === "hour" && (o = t.hour12 == null ? t.hourCycle == null ? n.hour12 ? "hour12" : "hour24" : t.hourCycle === "h11" || t.hourCycle === "h12" ? "hour12" : "hour24" : t.hour12 ? "hour12" : "hour24");
|
|
7463
|
-
let s =
|
|
7466
|
+
let s = Xa[o];
|
|
7464
7467
|
if (typeof s == "object" && (s = s[a]), s) return {
|
|
7465
7468
|
literal: !1,
|
|
7466
7469
|
val: s
|
|
7467
7470
|
};
|
|
7468
7471
|
}
|
|
7469
|
-
function
|
|
7472
|
+
function Qa(e) {
|
|
7470
7473
|
return [`^${e.map((e) => e.regex).reduce((e, t) => `${e}(${t.source})`, "")}$`, e];
|
|
7471
7474
|
}
|
|
7472
|
-
function
|
|
7475
|
+
function $a(e, t, n) {
|
|
7473
7476
|
let r = e.match(t);
|
|
7474
7477
|
if (r) {
|
|
7475
7478
|
let e = {}, t = 1;
|
|
7476
|
-
for (let i in n) if (
|
|
7479
|
+
for (let i in n) if (Kr(n, i)) {
|
|
7477
7480
|
let a = n[i], o = a.groups ? a.groups + 1 : 1;
|
|
7478
7481
|
!a.literal && a.token && (e[a.token.val[0]] = a.deser(r.slice(t, t + o))), t += o;
|
|
7479
7482
|
}
|
|
@@ -7481,7 +7484,7 @@ function Qa(e, t, n) {
|
|
|
7481
7484
|
}
|
|
7482
7485
|
return [r, {}];
|
|
7483
7486
|
}
|
|
7484
|
-
function
|
|
7487
|
+
function eo(e) {
|
|
7485
7488
|
let t = (e) => {
|
|
7486
7489
|
switch (e) {
|
|
7487
7490
|
case "S": return "millisecond";
|
|
@@ -7502,7 +7505,7 @@ function $a(e) {
|
|
|
7502
7505
|
default: return null;
|
|
7503
7506
|
}
|
|
7504
7507
|
}, n = null, r;
|
|
7505
|
-
return
|
|
7508
|
+
return P(e.z) || (n = In.create(e.z)), P(e.Z) || (n ||= new O(e.Z), r = e.Z), P(e.q) || (e.M = (e.q - 1) * 3 + 1), P(e.h) || (e.h < 12 && e.a === 1 ? e.h += 12 : e.h === 12 && e.a === 0 && (e.h = 0)), e.G === 0 && e.y && (e.y = -e.y), P(e.u) || (e.S = Yr(e.u)), [
|
|
7506
7509
|
Object.keys(e).reduce((n, r) => {
|
|
7507
7510
|
let i = t(r);
|
|
7508
7511
|
return i && (n[i] = e[r]), n;
|
|
@@ -7511,33 +7514,33 @@ function $a(e) {
|
|
|
7511
7514
|
r
|
|
7512
7515
|
];
|
|
7513
7516
|
}
|
|
7514
|
-
var
|
|
7515
|
-
function
|
|
7516
|
-
return
|
|
7517
|
+
var to = null;
|
|
7518
|
+
function no() {
|
|
7519
|
+
return to ||= $.fromMillis(1555555555555), to;
|
|
7517
7520
|
}
|
|
7518
|
-
function
|
|
7521
|
+
function ro(e, t) {
|
|
7519
7522
|
if (e.literal) return e;
|
|
7520
|
-
let n =
|
|
7523
|
+
let n = co(V.macroTokenToFormatOpts(e.val), t);
|
|
7521
7524
|
return n == null || n.includes(void 0) ? e : n;
|
|
7522
7525
|
}
|
|
7523
|
-
function
|
|
7524
|
-
return Array.prototype.concat(...e.map((e) =>
|
|
7526
|
+
function io(e, t) {
|
|
7527
|
+
return Array.prototype.concat(...e.map((e) => ro(e, t)));
|
|
7525
7528
|
}
|
|
7526
|
-
var
|
|
7529
|
+
var ao = class {
|
|
7527
7530
|
constructor(e, t) {
|
|
7528
|
-
if (this.locale = e, this.format = t, this.tokens =
|
|
7529
|
-
let [e, t] =
|
|
7531
|
+
if (this.locale = e, this.format = t, this.tokens = io(V.parseFormat(t), e), this.units = this.tokens.map((t) => Ya(t, e)), this.disqualifyingUnit = this.units.find((e) => e.invalidReason), !this.disqualifyingUnit) {
|
|
7532
|
+
let [e, t] = Qa(this.units);
|
|
7530
7533
|
this.regex = RegExp(e, "i"), this.handlers = t;
|
|
7531
7534
|
}
|
|
7532
7535
|
}
|
|
7533
7536
|
explainFromTokens(e) {
|
|
7534
7537
|
if (this.isValid) {
|
|
7535
|
-
let [t, n] =
|
|
7538
|
+
let [t, n] = $a(e, this.regex, this.handlers), [r, i, a] = n ? eo(n) : [
|
|
7536
7539
|
null,
|
|
7537
7540
|
null,
|
|
7538
7541
|
void 0
|
|
7539
7542
|
];
|
|
7540
|
-
if (
|
|
7543
|
+
if (Kr(n, "a") && Kr(n, "H")) throw new nn("Can't include meridiem when specifying 24-hour format");
|
|
7541
7544
|
return {
|
|
7542
7545
|
input: e,
|
|
7543
7546
|
tokens: this.tokens,
|
|
@@ -7562,11 +7565,11 @@ var io = class {
|
|
|
7562
7565
|
return this.disqualifyingUnit ? this.disqualifyingUnit.invalidReason : null;
|
|
7563
7566
|
}
|
|
7564
7567
|
};
|
|
7565
|
-
function ao(e, t, n) {
|
|
7566
|
-
return new io(e, n).explainFromTokens(t);
|
|
7567
|
-
}
|
|
7568
7568
|
function oo(e, t, n) {
|
|
7569
|
-
|
|
7569
|
+
return new ao(e, n).explainFromTokens(t);
|
|
7570
|
+
}
|
|
7571
|
+
function so(e, t, n) {
|
|
7572
|
+
let { result: r, zone: i, specificOffset: a, invalidReason: o } = oo(e, t, n);
|
|
7570
7573
|
return [
|
|
7571
7574
|
r,
|
|
7572
7575
|
i,
|
|
@@ -7574,20 +7577,20 @@ function oo(e, t, n) {
|
|
|
7574
7577
|
o
|
|
7575
7578
|
];
|
|
7576
7579
|
}
|
|
7577
|
-
function
|
|
7580
|
+
function co(e, t) {
|
|
7578
7581
|
if (!e) return null;
|
|
7579
|
-
let n =
|
|
7580
|
-
return r.map((t) =>
|
|
7581
|
-
}
|
|
7582
|
-
var co = "Invalid DateTime", lo = 864e13;
|
|
7583
|
-
function uo(e) {
|
|
7584
|
-
return new P("unsupported zone", `the zone "${e.name}" is not supported`);
|
|
7582
|
+
let n = V.create(t, e).dtFormatter(no()), r = n.formatToParts(), i = n.resolvedOptions();
|
|
7583
|
+
return r.map((t) => Za(t, e, i));
|
|
7585
7584
|
}
|
|
7585
|
+
var lo = "Invalid DateTime", uo = 864e13;
|
|
7586
7586
|
function fo(e) {
|
|
7587
|
-
return
|
|
7587
|
+
return new M("unsupported zone", `the zone "${e.name}" is not supported`);
|
|
7588
7588
|
}
|
|
7589
7589
|
function po(e) {
|
|
7590
|
-
return e.
|
|
7590
|
+
return e.weekData === null && (e.weekData = kr(e.c)), e.weekData;
|
|
7591
|
+
}
|
|
7592
|
+
function mo(e) {
|
|
7593
|
+
return e.localWeekData === null && (e.localWeekData = kr(e.c, e.loc.getMinDaysInFirstWeek(), e.loc.getStartOfWeek())), e.localWeekData;
|
|
7591
7594
|
}
|
|
7592
7595
|
function Q(e, t) {
|
|
7593
7596
|
let n = {
|
|
@@ -7604,14 +7607,14 @@ function Q(e, t) {
|
|
|
7604
7607
|
old: n
|
|
7605
7608
|
});
|
|
7606
7609
|
}
|
|
7607
|
-
function
|
|
7610
|
+
function ho(e, t, n) {
|
|
7608
7611
|
let r = e - t * 60 * 1e3, i = n.offset(r);
|
|
7609
7612
|
if (t === i) return [r, t];
|
|
7610
7613
|
r -= (i - t) * 60 * 1e3;
|
|
7611
7614
|
let a = n.offset(r);
|
|
7612
7615
|
return i === a ? [r, i] : [e - Math.min(i, a) * 60 * 1e3, Math.max(i, a)];
|
|
7613
7616
|
}
|
|
7614
|
-
function
|
|
7617
|
+
function go(e, t) {
|
|
7615
7618
|
e += t * 60 * 1e3;
|
|
7616
7619
|
let n = new Date(e);
|
|
7617
7620
|
return {
|
|
@@ -7624,15 +7627,15 @@ function ho(e, t) {
|
|
|
7624
7627
|
millisecond: n.getUTCMilliseconds()
|
|
7625
7628
|
};
|
|
7626
7629
|
}
|
|
7627
|
-
function
|
|
7628
|
-
return
|
|
7630
|
+
function _o(e, t, n) {
|
|
7631
|
+
return ho($r(e), t, n);
|
|
7629
7632
|
}
|
|
7630
|
-
function
|
|
7633
|
+
function vo(e, t) {
|
|
7631
7634
|
let n = e.o, r = e.c.year + Math.trunc(t.years), i = e.c.month + Math.trunc(t.months) + Math.trunc(t.quarters) * 3, a = {
|
|
7632
7635
|
...e.c,
|
|
7633
7636
|
year: r,
|
|
7634
7637
|
month: i,
|
|
7635
|
-
day: Math.min(e.c.day,
|
|
7638
|
+
day: Math.min(e.c.day, Qr(r, i)) + Math.trunc(t.days) + Math.trunc(t.weeks) * 7
|
|
7636
7639
|
}, o = Y.fromObject({
|
|
7637
7640
|
years: t.years - Math.trunc(t.years),
|
|
7638
7641
|
quarters: t.quarters - Math.trunc(t.quarters),
|
|
@@ -7643,13 +7646,13 @@ function _o(e, t) {
|
|
|
7643
7646
|
minutes: t.minutes,
|
|
7644
7647
|
seconds: t.seconds,
|
|
7645
7648
|
milliseconds: t.milliseconds
|
|
7646
|
-
}).as("milliseconds"), [s, c] =
|
|
7649
|
+
}).as("milliseconds"), [s, c] = ho($r(a), n, e.zone);
|
|
7647
7650
|
return o !== 0 && (s += o, c = e.zone.offset(s)), {
|
|
7648
7651
|
ts: s,
|
|
7649
7652
|
o: c
|
|
7650
7653
|
};
|
|
7651
7654
|
}
|
|
7652
|
-
function
|
|
7655
|
+
function yo(e, t, n, r, i, a) {
|
|
7653
7656
|
let { setZone: o, zone: s } = n;
|
|
7654
7657
|
if (e && Object.keys(e).length !== 0 || t) {
|
|
7655
7658
|
let r = t || s, i = $.fromObject(e, {
|
|
@@ -7659,64 +7662,64 @@ function vo(e, t, n, r, i, a) {
|
|
|
7659
7662
|
});
|
|
7660
7663
|
return o ? i : i.setZone(s);
|
|
7661
7664
|
}
|
|
7662
|
-
return $.invalid(new
|
|
7665
|
+
return $.invalid(new M("unparsable", `the input "${i}" can't be parsed as ${r}`));
|
|
7663
7666
|
}
|
|
7664
|
-
function
|
|
7665
|
-
return e.isValid ?
|
|
7667
|
+
function bo(e, t, n = !0) {
|
|
7668
|
+
return e.isValid ? V.create(D.create("en-US"), {
|
|
7666
7669
|
allowZ: n,
|
|
7667
7670
|
forceSimple: !0
|
|
7668
7671
|
}).formatDateTimeFromString(e, t) : null;
|
|
7669
7672
|
}
|
|
7670
|
-
function
|
|
7673
|
+
function xo(e, t, n) {
|
|
7671
7674
|
let r = e.c.year > 9999 || e.c.year < 0, i = "";
|
|
7672
|
-
if (r && e.c.year >= 0 && (i += "+"), i +=
|
|
7675
|
+
if (r && e.c.year >= 0 && (i += "+"), i += L(e.c.year, r ? 6 : 4), n === "year") return i;
|
|
7673
7676
|
if (t) {
|
|
7674
|
-
if (i += "-", i +=
|
|
7677
|
+
if (i += "-", i += L(e.c.month), n === "month") return i;
|
|
7675
7678
|
i += "-";
|
|
7676
|
-
} else if (i +=
|
|
7677
|
-
return i +=
|
|
7679
|
+
} else if (i += L(e.c.month), n === "month") return i;
|
|
7680
|
+
return i += L(e.c.day), i;
|
|
7678
7681
|
}
|
|
7679
|
-
function
|
|
7682
|
+
function So(e, t, n, r, i, a, o) {
|
|
7680
7683
|
let s = !n || e.c.millisecond !== 0 || e.c.second !== 0, c = "";
|
|
7681
7684
|
switch (o) {
|
|
7682
7685
|
case "day":
|
|
7683
7686
|
case "month":
|
|
7684
7687
|
case "year": break;
|
|
7685
7688
|
default:
|
|
7686
|
-
if (c +=
|
|
7689
|
+
if (c += L(e.c.hour), o === "hour") break;
|
|
7687
7690
|
if (t) {
|
|
7688
|
-
if (c += ":", c +=
|
|
7689
|
-
s && (c += ":", c +=
|
|
7691
|
+
if (c += ":", c += L(e.c.minute), o === "minute") break;
|
|
7692
|
+
s && (c += ":", c += L(e.c.second));
|
|
7690
7693
|
} else {
|
|
7691
|
-
if (c +=
|
|
7692
|
-
s && (c +=
|
|
7694
|
+
if (c += L(e.c.minute), o === "minute") break;
|
|
7695
|
+
s && (c += L(e.c.second));
|
|
7693
7696
|
}
|
|
7694
7697
|
if (o === "second") break;
|
|
7695
|
-
s && (!r || e.c.millisecond !== 0) && (c += ".", c +=
|
|
7698
|
+
s && (!r || e.c.millisecond !== 0) && (c += ".", c += L(e.c.millisecond, 3));
|
|
7696
7699
|
}
|
|
7697
|
-
return i && (e.isOffsetFixed && e.offset === 0 && !a ? c += "Z" : e.o < 0 ? (c += "-", c +=
|
|
7700
|
+
return i && (e.isOffsetFixed && e.offset === 0 && !a ? c += "Z" : e.o < 0 ? (c += "-", c += L(Math.trunc(-e.o / 60)), c += ":", c += L(Math.trunc(-e.o % 60))) : (c += "+", c += L(Math.trunc(e.o / 60)), c += ":", c += L(Math.trunc(e.o % 60)))), a && (c += "[" + e.zone.ianaName + "]"), c;
|
|
7698
7701
|
}
|
|
7699
|
-
var
|
|
7702
|
+
var Co = {
|
|
7700
7703
|
month: 1,
|
|
7701
7704
|
day: 1,
|
|
7702
7705
|
hour: 0,
|
|
7703
7706
|
minute: 0,
|
|
7704
7707
|
second: 0,
|
|
7705
7708
|
millisecond: 0
|
|
7706
|
-
},
|
|
7709
|
+
}, wo = {
|
|
7707
7710
|
weekNumber: 1,
|
|
7708
7711
|
weekday: 1,
|
|
7709
7712
|
hour: 0,
|
|
7710
7713
|
minute: 0,
|
|
7711
7714
|
second: 0,
|
|
7712
7715
|
millisecond: 0
|
|
7713
|
-
},
|
|
7716
|
+
}, To = {
|
|
7714
7717
|
ordinal: 1,
|
|
7715
7718
|
hour: 0,
|
|
7716
7719
|
minute: 0,
|
|
7717
7720
|
second: 0,
|
|
7718
7721
|
millisecond: 0
|
|
7719
|
-
},
|
|
7722
|
+
}, Eo = [
|
|
7720
7723
|
"year",
|
|
7721
7724
|
"month",
|
|
7722
7725
|
"day",
|
|
@@ -7724,7 +7727,7 @@ var So = {
|
|
|
7724
7727
|
"minute",
|
|
7725
7728
|
"second",
|
|
7726
7729
|
"millisecond"
|
|
7727
|
-
],
|
|
7730
|
+
], Do = [
|
|
7728
7731
|
"weekYear",
|
|
7729
7732
|
"weekNumber",
|
|
7730
7733
|
"weekday",
|
|
@@ -7732,7 +7735,7 @@ var So = {
|
|
|
7732
7735
|
"minute",
|
|
7733
7736
|
"second",
|
|
7734
7737
|
"millisecond"
|
|
7735
|
-
],
|
|
7738
|
+
], Oo = [
|
|
7736
7739
|
"year",
|
|
7737
7740
|
"ordinal",
|
|
7738
7741
|
"hour",
|
|
@@ -7740,7 +7743,7 @@ var So = {
|
|
|
7740
7743
|
"second",
|
|
7741
7744
|
"millisecond"
|
|
7742
7745
|
];
|
|
7743
|
-
function
|
|
7746
|
+
function ko(e) {
|
|
7744
7747
|
let t = {
|
|
7745
7748
|
year: "year",
|
|
7746
7749
|
years: "year",
|
|
@@ -7767,10 +7770,10 @@ function Oo(e) {
|
|
|
7767
7770
|
weekyears: "weekYear",
|
|
7768
7771
|
ordinal: "ordinal"
|
|
7769
7772
|
}[e.toLowerCase()];
|
|
7770
|
-
if (!t) throw new
|
|
7773
|
+
if (!t) throw new rn(e);
|
|
7771
7774
|
return t;
|
|
7772
7775
|
}
|
|
7773
|
-
function
|
|
7776
|
+
function Ao(e) {
|
|
7774
7777
|
switch (e.toLowerCase()) {
|
|
7775
7778
|
case "localweekday":
|
|
7776
7779
|
case "localweekdays": return "localWeekday";
|
|
@@ -7778,25 +7781,25 @@ function ko(e) {
|
|
|
7778
7781
|
case "localweeknumbers": return "localWeekNumber";
|
|
7779
7782
|
case "localweekyear":
|
|
7780
7783
|
case "localweekyears": return "localWeekYear";
|
|
7781
|
-
default: return
|
|
7784
|
+
default: return ko(e);
|
|
7782
7785
|
}
|
|
7783
7786
|
}
|
|
7784
|
-
function
|
|
7785
|
-
if (
|
|
7786
|
-
let t = e.name, n =
|
|
7787
|
-
return n === void 0 && (n = e.offset(
|
|
7788
|
-
}
|
|
7789
|
-
function
|
|
7790
|
-
let n =
|
|
7791
|
-
if (!n.isValid) return $.invalid(
|
|
7792
|
-
let r =
|
|
7793
|
-
if (
|
|
7787
|
+
function jo(e) {
|
|
7788
|
+
if (Fo === void 0 && (Fo = j.now()), e.type !== "iana") return e.offset(Fo);
|
|
7789
|
+
let t = e.name, n = Io.get(t);
|
|
7790
|
+
return n === void 0 && (n = e.offset(Fo), Io.set(t, n)), n;
|
|
7791
|
+
}
|
|
7792
|
+
function Mo(e, t) {
|
|
7793
|
+
let n = k(t.zone, j.defaultZone);
|
|
7794
|
+
if (!n.isValid) return $.invalid(fo(n));
|
|
7795
|
+
let r = D.fromObject(t), i, a;
|
|
7796
|
+
if (P(e.year)) i = j.now();
|
|
7794
7797
|
else {
|
|
7795
|
-
for (let t of
|
|
7796
|
-
let t =
|
|
7798
|
+
for (let t of Eo) P(e[t]) && (e[t] = Co[t]);
|
|
7799
|
+
let t = Ir(e) || Lr(e);
|
|
7797
7800
|
if (t) return $.invalid(t);
|
|
7798
|
-
let r =
|
|
7799
|
-
[i, a] =
|
|
7801
|
+
let r = jo(n);
|
|
7802
|
+
[i, a] = _o(e, r, n);
|
|
7800
7803
|
}
|
|
7801
7804
|
return new $({
|
|
7802
7805
|
ts: i,
|
|
@@ -7805,8 +7808,8 @@ function jo(e, t) {
|
|
|
7805
7808
|
o: a
|
|
7806
7809
|
});
|
|
7807
7810
|
}
|
|
7808
|
-
function
|
|
7809
|
-
let r =
|
|
7811
|
+
function No(e, t, n) {
|
|
7812
|
+
let r = P(n.round) ? !0 : n.round, i = P(n.rounding) ? "trunc" : n.rounding, a = (e, a) => (e = Xr(e, r || n.calendary ? 0 : 2, n.calendary ? "round" : i), t.loc.clone(n).relFormatter(n).format(e, a)), o = (r) => n.calendary ? t.hasSame(e, r) ? 0 : t.startOf(r).diff(e.startOf(r), r).get(r) : t.diff(e, r).get(r);
|
|
7810
7813
|
if (n.unit) return a(o(n.unit), n.unit);
|
|
7811
7814
|
for (let e of n.units) {
|
|
7812
7815
|
let t = o(e);
|
|
@@ -7814,30 +7817,30 @@ function Mo(e, t, n) {
|
|
|
7814
7817
|
}
|
|
7815
7818
|
return a(e > t ? -0 : 0, n.units[n.units.length - 1]);
|
|
7816
7819
|
}
|
|
7817
|
-
function
|
|
7820
|
+
function Po(e) {
|
|
7818
7821
|
let t = {}, n;
|
|
7819
7822
|
return e.length > 0 && typeof e[e.length - 1] == "object" ? (t = e[e.length - 1], n = Array.from(e).slice(0, e.length - 1)) : n = Array.from(e), [t, n];
|
|
7820
7823
|
}
|
|
7821
|
-
var
|
|
7824
|
+
var Fo, Io = /* @__PURE__ */ new Map(), $ = class e {
|
|
7822
7825
|
constructor(e) {
|
|
7823
|
-
let t = e.zone ||
|
|
7824
|
-
this.ts =
|
|
7826
|
+
let t = e.zone || j.defaultZone, n = e.invalid || (Number.isNaN(e.ts) ? new M("invalid input") : null) || (t.isValid ? null : fo(t));
|
|
7827
|
+
this.ts = P(e.ts) ? j.now() : e.ts;
|
|
7825
7828
|
let r = null, i = null;
|
|
7826
7829
|
if (!n) {
|
|
7827
7830
|
if (e.old && e.old.ts === this.ts && e.old.zone.equals(t)) [r, i] = [e.old.c, e.old.o];
|
|
7828
7831
|
else {
|
|
7829
|
-
let a =
|
|
7830
|
-
r =
|
|
7832
|
+
let a = F(e.o) && !e.old ? e.o : t.offset(this.ts);
|
|
7833
|
+
r = go(this.ts, a), n = Number.isNaN(r.year) ? new M("invalid input") : null, r = n ? null : r, i = n ? null : a;
|
|
7831
7834
|
}
|
|
7832
7835
|
}
|
|
7833
|
-
this._zone = t, this.loc = e.loc ||
|
|
7836
|
+
this._zone = t, this.loc = e.loc || D.create(), this.invalid = n, this.weekData = null, this.localWeekData = null, this.c = r, this.o = i, this.isLuxonDateTime = !0;
|
|
7834
7837
|
}
|
|
7835
7838
|
static now() {
|
|
7836
7839
|
return new e({});
|
|
7837
7840
|
}
|
|
7838
7841
|
static local() {
|
|
7839
|
-
let [e, t] =
|
|
7840
|
-
return
|
|
7842
|
+
let [e, t] = Po(arguments), [n, r, i, a, o, s, c] = t;
|
|
7843
|
+
return Mo({
|
|
7841
7844
|
year: n,
|
|
7842
7845
|
month: r,
|
|
7843
7846
|
day: i,
|
|
@@ -7848,8 +7851,8 @@ var Po, Fo = /* @__PURE__ */ new Map(), $ = class e {
|
|
|
7848
7851
|
}, e);
|
|
7849
7852
|
}
|
|
7850
7853
|
static utc() {
|
|
7851
|
-
let [e, t] =
|
|
7852
|
-
return e.zone =
|
|
7854
|
+
let [e, t] = Po(arguments), [n, r, i, a, o, s, c] = t;
|
|
7855
|
+
return e.zone = O.utcInstance, Mo({
|
|
7853
7856
|
year: n,
|
|
7854
7857
|
month: r,
|
|
7855
7858
|
day: i,
|
|
@@ -7860,101 +7863,101 @@ var Po, Fo = /* @__PURE__ */ new Map(), $ = class e {
|
|
|
7860
7863
|
}, e);
|
|
7861
7864
|
}
|
|
7862
7865
|
static fromJSDate(t, n = {}) {
|
|
7863
|
-
let r =
|
|
7866
|
+
let r = Br(t) ? t.valueOf() : NaN;
|
|
7864
7867
|
if (Number.isNaN(r)) return e.invalid("invalid input");
|
|
7865
|
-
let i =
|
|
7868
|
+
let i = k(n.zone, j.defaultZone);
|
|
7866
7869
|
return i.isValid ? new e({
|
|
7867
7870
|
ts: r,
|
|
7868
7871
|
zone: i,
|
|
7869
|
-
loc:
|
|
7870
|
-
}) : e.invalid(
|
|
7872
|
+
loc: D.fromObject(n)
|
|
7873
|
+
}) : e.invalid(fo(i));
|
|
7871
7874
|
}
|
|
7872
7875
|
static fromMillis(t, n = {}) {
|
|
7873
|
-
if (!
|
|
7874
|
-
return t < -864e13 || t >
|
|
7876
|
+
if (!F(t)) throw new S(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`);
|
|
7877
|
+
return t < -864e13 || t > uo ? e.invalid("Timestamp out of range") : new e({
|
|
7875
7878
|
ts: t,
|
|
7876
|
-
zone:
|
|
7877
|
-
loc:
|
|
7879
|
+
zone: k(n.zone, j.defaultZone),
|
|
7880
|
+
loc: D.fromObject(n)
|
|
7878
7881
|
});
|
|
7879
7882
|
}
|
|
7880
7883
|
static fromSeconds(t, n = {}) {
|
|
7881
|
-
if (
|
|
7884
|
+
if (F(t)) return new e({
|
|
7882
7885
|
ts: t * 1e3,
|
|
7883
|
-
zone:
|
|
7884
|
-
loc:
|
|
7886
|
+
zone: k(n.zone, j.defaultZone),
|
|
7887
|
+
loc: D.fromObject(n)
|
|
7885
7888
|
});
|
|
7886
|
-
throw new
|
|
7889
|
+
throw new S("fromSeconds requires a numerical input");
|
|
7887
7890
|
}
|
|
7888
7891
|
static fromObject(t, n = {}) {
|
|
7889
7892
|
t ||= {};
|
|
7890
|
-
let r =
|
|
7891
|
-
if (!r.isValid) return e.invalid(
|
|
7892
|
-
let i =
|
|
7893
|
-
if ((p || u) && m) throw new
|
|
7894
|
-
if (f && u) throw new
|
|
7895
|
-
let ee = m || a.weekday && !p, h, te, g =
|
|
7896
|
-
ee ? (h =
|
|
7893
|
+
let r = k(n.zone, j.defaultZone);
|
|
7894
|
+
if (!r.isValid) return e.invalid(fo(r));
|
|
7895
|
+
let i = D.fromObject(n), a = oi(t, Ao), { minDaysInFirstWeek: o, startOfWeek: s } = Nr(a, i), c = j.now(), l = P(n.specificOffset) ? r.offset(c) : n.specificOffset, u = !P(a.ordinal), d = !P(a.year), f = !P(a.month) || !P(a.day), p = d || f, m = a.weekYear || a.weekNumber;
|
|
7896
|
+
if ((p || u) && m) throw new nn("Can't mix weekYear/weekNumber units with year/month/day or ordinals");
|
|
7897
|
+
if (f && u) throw new nn("Can't mix ordinal dates with month/day");
|
|
7898
|
+
let ee = m || a.weekday && !p, h, te, g = go(c, l);
|
|
7899
|
+
ee ? (h = Do, te = wo, g = kr(g, o, s)) : u ? (h = Oo, te = To, g = jr(g)) : (h = Eo, te = Co);
|
|
7897
7900
|
let ne = !1;
|
|
7898
7901
|
for (let e of h) {
|
|
7899
7902
|
let t = a[e];
|
|
7900
|
-
|
|
7903
|
+
P(t) ? a[e] = ne ? te[e] : g[e] : ne = !0;
|
|
7901
7904
|
}
|
|
7902
|
-
let re = (ee ?
|
|
7905
|
+
let re = (ee ? Pr(a, o, s) : u ? Fr(a) : Ir(a)) || Lr(a);
|
|
7903
7906
|
if (re) return e.invalid(re);
|
|
7904
|
-
let [ie, ae] =
|
|
7907
|
+
let [ie, ae] = _o(ee ? Ar(a, o, s) : u ? Mr(a) : a, l, r), oe = new e({
|
|
7905
7908
|
ts: ie,
|
|
7906
7909
|
zone: r,
|
|
7907
7910
|
o: ae,
|
|
7908
7911
|
loc: i
|
|
7909
7912
|
});
|
|
7910
|
-
return a.weekday && p && t.weekday !==
|
|
7913
|
+
return a.weekday && p && t.weekday !== oe.weekday ? e.invalid("mismatched weekday", `you can't specify both a weekday of ${a.weekday} and a date of ${oe.toISO()}`) : oe.isValid ? oe : e.invalid(oe.invalid);
|
|
7911
7914
|
}
|
|
7912
7915
|
static fromISO(e, t = {}) {
|
|
7913
|
-
let [n, r] =
|
|
7914
|
-
return
|
|
7916
|
+
let [n, r] = ha(e);
|
|
7917
|
+
return yo(n, r, t, "ISO 8601", e);
|
|
7915
7918
|
}
|
|
7916
7919
|
static fromRFC2822(e, t = {}) {
|
|
7917
|
-
let [n, r] =
|
|
7918
|
-
return
|
|
7920
|
+
let [n, r] = ga(e);
|
|
7921
|
+
return yo(n, r, t, "RFC 2822", e);
|
|
7919
7922
|
}
|
|
7920
7923
|
static fromHTTP(e, t = {}) {
|
|
7921
|
-
let [n, r] =
|
|
7922
|
-
return
|
|
7924
|
+
let [n, r] = _a(e);
|
|
7925
|
+
return yo(n, r, t, "HTTP", t);
|
|
7923
7926
|
}
|
|
7924
7927
|
static fromFormat(t, n, r = {}) {
|
|
7925
|
-
if (
|
|
7926
|
-
let { locale: i = null, numberingSystem: a = null } = r, [o, s, c, l] =
|
|
7928
|
+
if (P(t) || P(n)) throw new S("fromFormat requires an input string and a format");
|
|
7929
|
+
let { locale: i = null, numberingSystem: a = null } = r, [o, s, c, l] = so(D.fromOpts({
|
|
7927
7930
|
locale: i,
|
|
7928
7931
|
numberingSystem: a,
|
|
7929
7932
|
defaultToEN: !0
|
|
7930
7933
|
}), t, n);
|
|
7931
|
-
return l ? e.invalid(l) :
|
|
7934
|
+
return l ? e.invalid(l) : yo(o, s, r, `format ${n}`, t, c);
|
|
7932
7935
|
}
|
|
7933
7936
|
static fromString(t, n, r = {}) {
|
|
7934
7937
|
return e.fromFormat(t, n, r);
|
|
7935
7938
|
}
|
|
7936
7939
|
static fromSQL(e, t = {}) {
|
|
7937
|
-
let [n, r] =
|
|
7938
|
-
return
|
|
7940
|
+
let [n, r] = wa(e);
|
|
7941
|
+
return yo(n, r, t, "SQL", e);
|
|
7939
7942
|
}
|
|
7940
7943
|
static invalid(t, n = null) {
|
|
7941
|
-
if (!t) throw new
|
|
7942
|
-
let r = t instanceof
|
|
7943
|
-
if (
|
|
7944
|
+
if (!t) throw new S("need to specify a reason the DateTime is invalid");
|
|
7945
|
+
let r = t instanceof M ? t : new M(t, n);
|
|
7946
|
+
if (j.throwOnInvalid) throw new $t(r);
|
|
7944
7947
|
return new e({ invalid: r });
|
|
7945
7948
|
}
|
|
7946
7949
|
static isDateTime(e) {
|
|
7947
7950
|
return e && e.isLuxonDateTime || !1;
|
|
7948
7951
|
}
|
|
7949
7952
|
static parseFormatForOpts(e, t = {}) {
|
|
7950
|
-
let n =
|
|
7953
|
+
let n = co(e, D.fromObject(t));
|
|
7951
7954
|
return n ? n.map((e) => e ? e.val : null).join("") : null;
|
|
7952
7955
|
}
|
|
7953
7956
|
static expandFormat(e, t = {}) {
|
|
7954
|
-
return
|
|
7957
|
+
return io(V.parseFormat(e), D.fromObject(t)).map((e) => e.val).join("");
|
|
7955
7958
|
}
|
|
7956
7959
|
static resetCache() {
|
|
7957
|
-
|
|
7960
|
+
Fo = void 0, Io.clear();
|
|
7958
7961
|
}
|
|
7959
7962
|
get(e) {
|
|
7960
7963
|
return this[e];
|
|
@@ -8008,40 +8011,40 @@ var Po, Fo = /* @__PURE__ */ new Map(), $ = class e {
|
|
|
8008
8011
|
return this.isValid ? this.c.millisecond : NaN;
|
|
8009
8012
|
}
|
|
8010
8013
|
get weekYear() {
|
|
8011
|
-
return this.isValid ?
|
|
8014
|
+
return this.isValid ? po(this).weekYear : NaN;
|
|
8012
8015
|
}
|
|
8013
8016
|
get weekNumber() {
|
|
8014
|
-
return this.isValid ?
|
|
8017
|
+
return this.isValid ? po(this).weekNumber : NaN;
|
|
8015
8018
|
}
|
|
8016
8019
|
get weekday() {
|
|
8017
|
-
return this.isValid ?
|
|
8020
|
+
return this.isValid ? po(this).weekday : NaN;
|
|
8018
8021
|
}
|
|
8019
8022
|
get isWeekend() {
|
|
8020
8023
|
return this.isValid && this.loc.getWeekendDays().includes(this.weekday);
|
|
8021
8024
|
}
|
|
8022
8025
|
get localWeekday() {
|
|
8023
|
-
return this.isValid ?
|
|
8026
|
+
return this.isValid ? mo(this).weekday : NaN;
|
|
8024
8027
|
}
|
|
8025
8028
|
get localWeekNumber() {
|
|
8026
|
-
return this.isValid ?
|
|
8029
|
+
return this.isValid ? mo(this).weekNumber : NaN;
|
|
8027
8030
|
}
|
|
8028
8031
|
get localWeekYear() {
|
|
8029
|
-
return this.isValid ?
|
|
8032
|
+
return this.isValid ? mo(this).weekYear : NaN;
|
|
8030
8033
|
}
|
|
8031
8034
|
get ordinal() {
|
|
8032
|
-
return this.isValid ?
|
|
8035
|
+
return this.isValid ? jr(this.c).ordinal : NaN;
|
|
8033
8036
|
}
|
|
8034
8037
|
get monthShort() {
|
|
8035
|
-
return this.isValid ?
|
|
8038
|
+
return this.isValid ? La.months("short", { locObj: this.loc })[this.month - 1] : null;
|
|
8036
8039
|
}
|
|
8037
8040
|
get monthLong() {
|
|
8038
|
-
return this.isValid ?
|
|
8041
|
+
return this.isValid ? La.months("long", { locObj: this.loc })[this.month - 1] : null;
|
|
8039
8042
|
}
|
|
8040
8043
|
get weekdayShort() {
|
|
8041
|
-
return this.isValid ?
|
|
8044
|
+
return this.isValid ? La.weekdays("short", { locObj: this.loc })[this.weekday - 1] : null;
|
|
8042
8045
|
}
|
|
8043
8046
|
get weekdayLong() {
|
|
8044
|
-
return this.isValid ?
|
|
8047
|
+
return this.isValid ? La.weekdays("long", { locObj: this.loc })[this.weekday - 1] : null;
|
|
8045
8048
|
}
|
|
8046
8049
|
get offset() {
|
|
8047
8050
|
return this.isValid ? +this.o : NaN;
|
|
@@ -8069,28 +8072,28 @@ var Po, Fo = /* @__PURE__ */ new Map(), $ = class e {
|
|
|
8069
8072
|
}
|
|
8070
8073
|
getPossibleOffsets() {
|
|
8071
8074
|
if (!this.isValid || this.isOffsetFixed) return [this];
|
|
8072
|
-
let e = 864e5, t = 6e4, n =
|
|
8075
|
+
let e = 864e5, t = 6e4, n = $r(this.c), r = this.zone.offset(n - e), i = this.zone.offset(n + e), a = this.zone.offset(n - r * t), o = this.zone.offset(n - i * t);
|
|
8073
8076
|
if (a === o) return [this];
|
|
8074
|
-
let s = n - a * t, c = n - o * t, l =
|
|
8077
|
+
let s = n - a * t, c = n - o * t, l = go(s, a), u = go(c, o);
|
|
8075
8078
|
return l.hour === u.hour && l.minute === u.minute && l.second === u.second && l.millisecond === u.millisecond ? [Q(this, { ts: s }), Q(this, { ts: c })] : [this];
|
|
8076
8079
|
}
|
|
8077
8080
|
get isInLeapYear() {
|
|
8078
|
-
return
|
|
8081
|
+
return Zr(this.year);
|
|
8079
8082
|
}
|
|
8080
8083
|
get daysInMonth() {
|
|
8081
|
-
return
|
|
8084
|
+
return Qr(this.year, this.month);
|
|
8082
8085
|
}
|
|
8083
8086
|
get daysInYear() {
|
|
8084
|
-
return this.isValid ?
|
|
8087
|
+
return this.isValid ? B(this.year) : NaN;
|
|
8085
8088
|
}
|
|
8086
8089
|
get weeksInWeekYear() {
|
|
8087
|
-
return this.isValid ?
|
|
8090
|
+
return this.isValid ? ti(this.weekYear) : NaN;
|
|
8088
8091
|
}
|
|
8089
8092
|
get weeksInLocalWeekYear() {
|
|
8090
|
-
return this.isValid ?
|
|
8093
|
+
return this.isValid ? ti(this.localWeekYear, this.loc.getMinDaysInFirstWeek(), this.loc.getStartOfWeek()) : NaN;
|
|
8091
8094
|
}
|
|
8092
8095
|
resolvedLocaleOptions(e = {}) {
|
|
8093
|
-
let { locale: t, numberingSystem: n, calendar: r } =
|
|
8096
|
+
let { locale: t, numberingSystem: n, calendar: r } = V.create(this.loc.clone(e), e).resolvedOptions(this);
|
|
8094
8097
|
return {
|
|
8095
8098
|
locale: t,
|
|
8096
8099
|
numberingSystem: n,
|
|
@@ -8098,25 +8101,25 @@ var Po, Fo = /* @__PURE__ */ new Map(), $ = class e {
|
|
|
8098
8101
|
};
|
|
8099
8102
|
}
|
|
8100
8103
|
toUTC(e = 0, t = {}) {
|
|
8101
|
-
return this.setZone(
|
|
8104
|
+
return this.setZone(O.instance(e), t);
|
|
8102
8105
|
}
|
|
8103
8106
|
toLocal() {
|
|
8104
|
-
return this.setZone(
|
|
8107
|
+
return this.setZone(j.defaultZone);
|
|
8105
8108
|
}
|
|
8106
8109
|
setZone(t, { keepLocalTime: n = !1, keepCalendarTime: r = !1 } = {}) {
|
|
8107
|
-
if (t =
|
|
8110
|
+
if (t = k(t, j.defaultZone), t.equals(this.zone)) return this;
|
|
8108
8111
|
if (t.isValid) {
|
|
8109
8112
|
let e = this.ts;
|
|
8110
8113
|
if (n || r) {
|
|
8111
8114
|
let n = t.offset(this.ts), r = this.toObject();
|
|
8112
|
-
[e] =
|
|
8115
|
+
[e] = _o(r, n, t);
|
|
8113
8116
|
}
|
|
8114
8117
|
return Q(this, {
|
|
8115
8118
|
ts: e,
|
|
8116
8119
|
zone: t
|
|
8117
8120
|
});
|
|
8118
8121
|
}
|
|
8119
|
-
return e.invalid(
|
|
8122
|
+
return e.invalid(fo(t));
|
|
8120
8123
|
}
|
|
8121
8124
|
reconfigure({ locale: e, numberingSystem: t, outputCalendar: n } = {}) {
|
|
8122
8125
|
let r = this.loc.clone({
|
|
@@ -8131,21 +8134,21 @@ var Po, Fo = /* @__PURE__ */ new Map(), $ = class e {
|
|
|
8131
8134
|
}
|
|
8132
8135
|
set(e) {
|
|
8133
8136
|
if (!this.isValid) return this;
|
|
8134
|
-
let t =
|
|
8135
|
-
if ((c || a) && l) throw new
|
|
8136
|
-
if (s && a) throw new
|
|
8137
|
+
let t = oi(e, Ao), { minDaysInFirstWeek: n, startOfWeek: r } = Nr(t, this.loc), i = !P(t.weekYear) || !P(t.weekNumber) || !P(t.weekday), a = !P(t.ordinal), o = !P(t.year), s = !P(t.month) || !P(t.day), c = o || s, l = t.weekYear || t.weekNumber;
|
|
8138
|
+
if ((c || a) && l) throw new nn("Can't mix weekYear/weekNumber units with year/month/day or ordinals");
|
|
8139
|
+
if (s && a) throw new nn("Can't mix ordinal dates with month/day");
|
|
8137
8140
|
let u;
|
|
8138
|
-
i ? u =
|
|
8139
|
-
...
|
|
8141
|
+
i ? u = Ar({
|
|
8142
|
+
...kr(this.c, n, r),
|
|
8140
8143
|
...t
|
|
8141
|
-
}, n, r) :
|
|
8144
|
+
}, n, r) : P(t.ordinal) ? (u = {
|
|
8142
8145
|
...this.toObject(),
|
|
8143
8146
|
...t
|
|
8144
|
-
},
|
|
8145
|
-
...
|
|
8147
|
+
}, P(t.day) && (u.day = Math.min(Qr(u.year, u.month), u.day))) : u = Mr({
|
|
8148
|
+
...jr(this.c),
|
|
8146
8149
|
...t
|
|
8147
8150
|
});
|
|
8148
|
-
let [d, f] =
|
|
8151
|
+
let [d, f] = _o(u, this.o, this.zone);
|
|
8149
8152
|
return Q(this, {
|
|
8150
8153
|
ts: d,
|
|
8151
8154
|
o: f
|
|
@@ -8154,12 +8157,12 @@ var Po, Fo = /* @__PURE__ */ new Map(), $ = class e {
|
|
|
8154
8157
|
plus(e) {
|
|
8155
8158
|
if (!this.isValid) return this;
|
|
8156
8159
|
let t = Y.fromDurationLike(e);
|
|
8157
|
-
return Q(this,
|
|
8160
|
+
return Q(this, vo(this, t));
|
|
8158
8161
|
}
|
|
8159
8162
|
minus(e) {
|
|
8160
8163
|
if (!this.isValid) return this;
|
|
8161
8164
|
let t = Y.fromDurationLike(e).negate();
|
|
8162
|
-
return Q(this,
|
|
8165
|
+
return Q(this, vo(this, t));
|
|
8163
8166
|
}
|
|
8164
8167
|
startOf(e, { useLocaleWeeks: t = !1 } = {}) {
|
|
8165
8168
|
if (!this.isValid) return this;
|
|
@@ -8186,47 +8189,47 @@ var Po, Fo = /* @__PURE__ */ new Map(), $ = class e {
|
|
|
8186
8189
|
return this.isValid ? this.plus({ [e]: 1 }).startOf(e, t).minus(1) : this;
|
|
8187
8190
|
}
|
|
8188
8191
|
toFormat(e, t = {}) {
|
|
8189
|
-
return this.isValid ?
|
|
8192
|
+
return this.isValid ? V.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this, e) : lo;
|
|
8190
8193
|
}
|
|
8191
|
-
toLocaleString(e =
|
|
8192
|
-
return this.isValid ?
|
|
8194
|
+
toLocaleString(e = an, t = {}) {
|
|
8195
|
+
return this.isValid ? V.create(this.loc.clone(t), e).formatDateTime(this) : lo;
|
|
8193
8196
|
}
|
|
8194
8197
|
toLocaleParts(e = {}) {
|
|
8195
|
-
return this.isValid ?
|
|
8198
|
+
return this.isValid ? V.create(this.loc.clone(e), e).formatDateTimeParts(this) : [];
|
|
8196
8199
|
}
|
|
8197
8200
|
toISO({ format: e = "extended", suppressSeconds: t = !1, suppressMilliseconds: n = !1, includeOffset: r = !0, extendedZone: i = !1, precision: a = "milliseconds" } = {}) {
|
|
8198
8201
|
if (!this.isValid) return null;
|
|
8199
|
-
a =
|
|
8200
|
-
let o = e === "extended", s =
|
|
8201
|
-
return
|
|
8202
|
+
a = ko(a);
|
|
8203
|
+
let o = e === "extended", s = xo(this, o, a);
|
|
8204
|
+
return Eo.indexOf(a) >= 3 && (s += "T"), s += So(this, o, t, n, r, i, a), s;
|
|
8202
8205
|
}
|
|
8203
8206
|
toISODate({ format: e = "extended", precision: t = "day" } = {}) {
|
|
8204
|
-
return this.isValid ?
|
|
8207
|
+
return this.isValid ? xo(this, e === "extended", ko(t)) : null;
|
|
8205
8208
|
}
|
|
8206
8209
|
toISOWeekDate() {
|
|
8207
|
-
return
|
|
8210
|
+
return bo(this, "kkkk-'W'WW-c");
|
|
8208
8211
|
}
|
|
8209
8212
|
toISOTime({ suppressMilliseconds: e = !1, suppressSeconds: t = !1, includeOffset: n = !0, includePrefix: r = !1, extendedZone: i = !1, format: a = "extended", precision: o = "milliseconds" } = {}) {
|
|
8210
|
-
return this.isValid ? (o =
|
|
8213
|
+
return this.isValid ? (o = ko(o), (r && Eo.indexOf(o) >= 3 ? "T" : "") + So(this, a === "extended", t, e, n, i, o)) : null;
|
|
8211
8214
|
}
|
|
8212
8215
|
toRFC2822() {
|
|
8213
|
-
return
|
|
8216
|
+
return bo(this, "EEE, dd LLL yyyy HH:mm:ss ZZZ", !1);
|
|
8214
8217
|
}
|
|
8215
8218
|
toHTTP() {
|
|
8216
|
-
return
|
|
8219
|
+
return bo(this.toUTC(), "EEE, dd LLL yyyy HH:mm:ss 'GMT'");
|
|
8217
8220
|
}
|
|
8218
8221
|
toSQLDate() {
|
|
8219
|
-
return this.isValid ?
|
|
8222
|
+
return this.isValid ? xo(this, !0) : null;
|
|
8220
8223
|
}
|
|
8221
8224
|
toSQLTime({ includeOffset: e = !0, includeZone: t = !1, includeOffsetSpace: n = !0 } = {}) {
|
|
8222
8225
|
let r = "HH:mm:ss.SSS";
|
|
8223
|
-
return (t || e) && (n && (r += " "), t ? r += "z" : e && (r += "ZZ")),
|
|
8226
|
+
return (t || e) && (n && (r += " "), t ? r += "z" : e && (r += "ZZ")), bo(this, r, !0);
|
|
8224
8227
|
}
|
|
8225
8228
|
toSQL(e = {}) {
|
|
8226
8229
|
return this.isValid ? `${this.toSQLDate()} ${this.toSQLTime(e)}` : null;
|
|
8227
8230
|
}
|
|
8228
8231
|
toString() {
|
|
8229
|
-
return this.isValid ? this.toISO() :
|
|
8232
|
+
return this.isValid ? this.toISO() : lo;
|
|
8230
8233
|
}
|
|
8231
8234
|
[Symbol.for("nodejs.util.inspect.custom")]() {
|
|
8232
8235
|
return this.isValid ? `DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }` : `DateTime { Invalid, reason: ${this.invalidReason} }`;
|
|
@@ -8263,14 +8266,14 @@ var Po, Fo = /* @__PURE__ */ new Map(), $ = class e {
|
|
|
8263
8266
|
locale: this.locale,
|
|
8264
8267
|
numberingSystem: this.numberingSystem,
|
|
8265
8268
|
...n
|
|
8266
|
-
}, i =
|
|
8269
|
+
}, i = Ur(t).map(Y.normalizeUnit), a = e.valueOf() > this.valueOf(), o = Ba(a ? this : e, a ? e : this, i, r);
|
|
8267
8270
|
return a ? o.negate() : o;
|
|
8268
8271
|
}
|
|
8269
8272
|
diffNow(t = "milliseconds", n = {}) {
|
|
8270
8273
|
return this.diff(e.now(), t, n);
|
|
8271
8274
|
}
|
|
8272
8275
|
until(e) {
|
|
8273
|
-
return this.isValid ?
|
|
8276
|
+
return this.isValid ? Ia.fromDateTimes(this, e) : this;
|
|
8274
8277
|
}
|
|
8275
8278
|
hasSame(e, t, n) {
|
|
8276
8279
|
if (!this.isValid) return !1;
|
|
@@ -8290,7 +8293,7 @@ var Po, Fo = /* @__PURE__ */ new Map(), $ = class e {
|
|
|
8290
8293
|
"minutes",
|
|
8291
8294
|
"seconds"
|
|
8292
8295
|
], a = t.unit;
|
|
8293
|
-
return Array.isArray(t.unit) && (i = t.unit, a = void 0),
|
|
8296
|
+
return Array.isArray(t.unit) && (i = t.unit, a = void 0), No(n, this.plus(r), {
|
|
8294
8297
|
...t,
|
|
8295
8298
|
numeric: "always",
|
|
8296
8299
|
units: i,
|
|
@@ -8298,7 +8301,7 @@ var Po, Fo = /* @__PURE__ */ new Map(), $ = class e {
|
|
|
8298
8301
|
});
|
|
8299
8302
|
}
|
|
8300
8303
|
toRelativeCalendar(t = {}) {
|
|
8301
|
-
return this.isValid ?
|
|
8304
|
+
return this.isValid ? No(t.base || e.fromObject({}, { zone: this.zone }), this, {
|
|
8302
8305
|
...t,
|
|
8303
8306
|
numeric: "auto",
|
|
8304
8307
|
units: [
|
|
@@ -8310,16 +8313,16 @@ var Po, Fo = /* @__PURE__ */ new Map(), $ = class e {
|
|
|
8310
8313
|
}) : null;
|
|
8311
8314
|
}
|
|
8312
8315
|
static min(...t) {
|
|
8313
|
-
if (!t.every(e.isDateTime)) throw new
|
|
8314
|
-
return
|
|
8316
|
+
if (!t.every(e.isDateTime)) throw new S("min requires all arguments be DateTimes");
|
|
8317
|
+
return Wr(t, (e) => e.valueOf(), Math.min);
|
|
8315
8318
|
}
|
|
8316
8319
|
static max(...t) {
|
|
8317
|
-
if (!t.every(e.isDateTime)) throw new
|
|
8318
|
-
return
|
|
8320
|
+
if (!t.every(e.isDateTime)) throw new S("max requires all arguments be DateTimes");
|
|
8321
|
+
return Wr(t, (e) => e.valueOf(), Math.max);
|
|
8319
8322
|
}
|
|
8320
8323
|
static fromFormatExplain(e, t, n = {}) {
|
|
8321
8324
|
let { locale: r = null, numberingSystem: i = null } = n;
|
|
8322
|
-
return
|
|
8325
|
+
return oo(D.fromOpts({
|
|
8323
8326
|
locale: r,
|
|
8324
8327
|
numberingSystem: i,
|
|
8325
8328
|
defaultToEN: !0
|
|
@@ -8330,99 +8333,99 @@ var Po, Fo = /* @__PURE__ */ new Map(), $ = class e {
|
|
|
8330
8333
|
}
|
|
8331
8334
|
static buildFormatParser(e, t = {}) {
|
|
8332
8335
|
let { locale: n = null, numberingSystem: r = null } = t;
|
|
8333
|
-
return new
|
|
8336
|
+
return new ao(D.fromOpts({
|
|
8334
8337
|
locale: n,
|
|
8335
8338
|
numberingSystem: r,
|
|
8336
8339
|
defaultToEN: !0
|
|
8337
8340
|
}), e);
|
|
8338
8341
|
}
|
|
8339
8342
|
static fromFormatParser(t, n, r = {}) {
|
|
8340
|
-
if (
|
|
8341
|
-
let { locale: i = null, numberingSystem: a = null } = r, o =
|
|
8343
|
+
if (P(t) || P(n)) throw new S("fromFormatParser requires an input string and a format parser");
|
|
8344
|
+
let { locale: i = null, numberingSystem: a = null } = r, o = D.fromOpts({
|
|
8342
8345
|
locale: i,
|
|
8343
8346
|
numberingSystem: a,
|
|
8344
8347
|
defaultToEN: !0
|
|
8345
8348
|
});
|
|
8346
|
-
if (!o.equals(n.locale)) throw new
|
|
8349
|
+
if (!o.equals(n.locale)) throw new S(`fromFormatParser called with a locale of ${o}, but the format parser was created for ${n.locale}`);
|
|
8347
8350
|
let { result: s, zone: c, specificOffset: l, invalidReason: u } = n.explainFromTokens(t);
|
|
8348
|
-
return u ? e.invalid(u) :
|
|
8351
|
+
return u ? e.invalid(u) : yo(s, c, r, `format ${n.format}`, t, l);
|
|
8349
8352
|
}
|
|
8350
8353
|
static get DATE_SHORT() {
|
|
8351
|
-
return
|
|
8354
|
+
return an;
|
|
8352
8355
|
}
|
|
8353
8356
|
static get DATE_MED() {
|
|
8354
|
-
return
|
|
8357
|
+
return on;
|
|
8355
8358
|
}
|
|
8356
8359
|
static get DATE_MED_WITH_WEEKDAY() {
|
|
8357
|
-
return
|
|
8360
|
+
return sn;
|
|
8358
8361
|
}
|
|
8359
8362
|
static get DATE_FULL() {
|
|
8360
|
-
return
|
|
8363
|
+
return cn;
|
|
8361
8364
|
}
|
|
8362
8365
|
static get DATE_HUGE() {
|
|
8363
|
-
return
|
|
8366
|
+
return ln;
|
|
8364
8367
|
}
|
|
8365
8368
|
static get TIME_SIMPLE() {
|
|
8366
|
-
return
|
|
8369
|
+
return un;
|
|
8367
8370
|
}
|
|
8368
8371
|
static get TIME_WITH_SECONDS() {
|
|
8369
|
-
return
|
|
8372
|
+
return dn;
|
|
8370
8373
|
}
|
|
8371
8374
|
static get TIME_WITH_SHORT_OFFSET() {
|
|
8372
|
-
return
|
|
8375
|
+
return fn;
|
|
8373
8376
|
}
|
|
8374
8377
|
static get TIME_WITH_LONG_OFFSET() {
|
|
8375
|
-
return
|
|
8378
|
+
return pn;
|
|
8376
8379
|
}
|
|
8377
8380
|
static get TIME_24_SIMPLE() {
|
|
8378
|
-
return
|
|
8381
|
+
return mn;
|
|
8379
8382
|
}
|
|
8380
8383
|
static get TIME_24_WITH_SECONDS() {
|
|
8381
|
-
return
|
|
8384
|
+
return hn;
|
|
8382
8385
|
}
|
|
8383
8386
|
static get TIME_24_WITH_SHORT_OFFSET() {
|
|
8384
|
-
return
|
|
8387
|
+
return gn;
|
|
8385
8388
|
}
|
|
8386
8389
|
static get TIME_24_WITH_LONG_OFFSET() {
|
|
8387
|
-
return
|
|
8390
|
+
return _n;
|
|
8388
8391
|
}
|
|
8389
8392
|
static get DATETIME_SHORT() {
|
|
8390
|
-
return
|
|
8393
|
+
return vn;
|
|
8391
8394
|
}
|
|
8392
8395
|
static get DATETIME_SHORT_WITH_SECONDS() {
|
|
8393
|
-
return
|
|
8396
|
+
return yn;
|
|
8394
8397
|
}
|
|
8395
8398
|
static get DATETIME_MED() {
|
|
8396
|
-
return
|
|
8399
|
+
return bn;
|
|
8397
8400
|
}
|
|
8398
8401
|
static get DATETIME_MED_WITH_SECONDS() {
|
|
8399
|
-
return
|
|
8402
|
+
return xn;
|
|
8400
8403
|
}
|
|
8401
8404
|
static get DATETIME_MED_WITH_WEEKDAY() {
|
|
8402
|
-
return
|
|
8405
|
+
return Sn;
|
|
8403
8406
|
}
|
|
8404
8407
|
static get DATETIME_FULL() {
|
|
8405
|
-
return
|
|
8408
|
+
return Cn;
|
|
8406
8409
|
}
|
|
8407
8410
|
static get DATETIME_FULL_WITH_SECONDS() {
|
|
8408
|
-
return
|
|
8411
|
+
return wn;
|
|
8409
8412
|
}
|
|
8410
8413
|
static get DATETIME_HUGE() {
|
|
8411
|
-
return
|
|
8414
|
+
return Tn;
|
|
8412
8415
|
}
|
|
8413
8416
|
static get DATETIME_HUGE_WITH_SECONDS() {
|
|
8414
|
-
return
|
|
8417
|
+
return En;
|
|
8415
8418
|
}
|
|
8416
8419
|
};
|
|
8417
|
-
function
|
|
8420
|
+
function Lo(e) {
|
|
8418
8421
|
if ($.isDateTime(e)) return e;
|
|
8419
|
-
if (e && e.valueOf &&
|
|
8422
|
+
if (e && e.valueOf && F(e.valueOf())) return $.fromJSDate(e);
|
|
8420
8423
|
if (e && typeof e == "object") return $.fromObject(e);
|
|
8421
|
-
throw new
|
|
8424
|
+
throw new S(`Unknown datetime argument: ${e}, of type ${typeof e}`);
|
|
8422
8425
|
}
|
|
8423
8426
|
//#endregion
|
|
8424
8427
|
//#region generated/regionTowns.ts
|
|
8425
|
-
var
|
|
8428
|
+
var Ro = {
|
|
8426
8429
|
DE: "bear|bellefonte|bethanybeach|blades|bridgeville|brookside|camden|cheswold|claymont|clayton|delawarecity|delmar|dover|doverbasehousing|edgemoor|elsmere|felton|georgetown|glasgow|greenville|greenwood|harrington|highlandacres|hockessin|kentacres|laurel|lewes|longneck|middletown|milford|millsboro|milton|newark|newcastle|newport|northstar|oceanview|pikecreek|pikecreekvalley|rehobothbeach|risingsunlebanon|riverview|rodneyvillage|seaford|selbyville|smyrna|townsend|wilmington|wilmingtonmanor|woodsideeast|wyoming",
|
|
8427
8430
|
IL: "abingdon|addison|albanypark|albers|albion|aledo|algonquin|alorton|alsip|altamont|alton|amboy|andalusia|anna|antioch|arcola|arlingtonheights|arthur|ashburn|ashland|assumption|astoria|athens|atlanta|atwood|auburn|auburngresham|aurora|aviston|avondale|bannockburn|barrington|barringtonhills|barry|bartlett|bartonville|batavia|beachpark|beardstown|beckemeyer|beecher|belleville|bellevue|bellwood|belmontcragin|belvidere|bement|benld|bensenville|benton|berkeley|berwyn|bethalto|bethany|bigrock|bloomingdale|bloomington|blueisland|bluemound|bolingbrook|boulderhill|bourbonnais|bradley|braidwood|breese|bridgeport|bridgeview|brighton|brightonpark|broadview|brookfield|buffalogrove|bullvalley|bunkerhill|burbank|burnham|burrridge|bushnell|byron|cahokia|cairo|calumetcity|calumetpark|cambria|cambridge|camppoint|canton|capron|carboncliff|carbondale|carlinville|carlyle|carmi|carolstream|carpentersville|carriermills|carrollton|carterville|carthage|cary|casey|caseyville|catlin|centralcity|centralia|centreville|cerrogordo|champaign|channahon|channellake|charleston|chatham|chatsworth|chebanse|chenoa|cherryvalley|chester|chicago|chicagoheights|chicagolawn|chicagoloop|chicagoridge|chillicothe|chrisman|christopher|cicero|clarendonhills|clifton|clinton|coalcity|coalvalley|cobden|colchester|colfax|collinsville|colona|columbia|cortland|countryclubhills|countryside|crainville|cresthill|crestwood|crete|crevecoeur|crystallake|crystallawns|cuba|danvers|danville|darien|davisjunction|decatur|deerfield|deerpark|dekalb|delavan|depue|desoto|desplaines|diamond|divernon|dixmoor|dixon|dolton|douglas|downersgrove|dunlap|dupo|duquoin|durand|dwight|earlville|eastalton|eastdubuque|eastdundee|eastgarfieldpark|easthazelcrest|eastmoline|eastpeoria|eaststlouis|edgewater|edinburg|edwardsville|effingham|elburn|eldorado|elgin|elizabethtown|elkgrovevillage|elmhurst|elmwood|elmwoodpark|elpaso|elwood|energy|englewood|erie|eureka|evanston|evergreenpark|fairbury|fairfield|fairmont|fairmontcity|fairviewheights|farmercity|farmington|fisher|flanagan|flora|flossmoor|fordheights|forestlake|forestpark|forrest|forreston|forsyth|foxlake|foxlakehills|foxrivergrove|frankfort|frankfortsquare|franklinpark|freeburg|freeport|fulton|gagepark|gageslake|galena|galesburg|galva|gardner|geneseo|geneva|genoa|georgetown|germantown|germantownhills|gibsoncity|gifford|gilberts|gillespie|gilman|girard|glasford|glencarbon|glencoe|glendaleheights|glenellyn|glenview|glenwood|godfrey|golconda|goodingsgrove|goreville|grandboulevard|grandview|grandwoodpark|granitecity|grantpark|granville|grayslake|grayville|greatergrandcrossing|greenfield|greenoaks|greenrock|greenup|greenville|gridley|griggsville|gurnee|hainesville|hamilton|hampshire|hampton|hannacity|hanoverpark|hardin|harrisburg|harristown|hartford|harvard|harvey|harwoodheights|havana|hawthornwoods|hazelcrest|hebron|hennepin|henry|heritagelake|herrin|herscher|heyworth|hickoryhills|highland|highlandpark|highwood|hillcrest|hillsboro|hillside|hinckley|hinsdale|hodgkins|hoffmanestates|holidayshores|homer|homerglen|hometown|homewood|hoopeston|hudson|huntley|hydepark|ina|indianheadpark|ingallspark|inverness|irvingpark|islandlake|itasca|jacksonville|jerome|jerseyville|johnsburg|johnstoncity|joliet|jonesboro|justice|kankakee|kenilworth|kenwood|kewanee|kildeer|kincaid|kingston|kirkland|knollwood|knoxville|lacon|ladd|lagrange|lagrangepark|laharpe|lakebarrington|lakebluff|lakecamelot|lakecatherine|lakeforest|lakeholiday|lakeinthehills|lakemoor|lakeofthewoods|lakesummerset|lakevilla|lakewood|lakewoodshores|lakezurich|lanark|lansing|lasalle|lawrenceville|lebanon|lelandgrove|lemont|lena|leroy|lewistown|lexington|libertyville|lilylake|limestone|lincoln|lincolnpark|lincolnshire|lincolnsquare|lincolnwood|lindenhurst|lisle|litchfield|lockport|logansquare|lombard|longcreek|longgrove|longlake|louisville|lovespark|lovington|lowerwestside|lynwood|lyons|machesneypark|mackinaw|macomb|macon|madison|mahomet|malta|manhattan|manito|manteno|maplepark|marengo|marion|marissa|markham|maroa|marquetteheights|marseilles|marshall|martinsville|maryville|mascoutah|masoncity|matteson|mattoon|maywood|mccullomlake|mchenry|mckinleypark|mcleansboro|medinah|melrosepark|mendota|meredosia|merrionettepark|metamora|metropolis|midlothian|milan|milford|millstadt|minier|minonk|minooka|mitchell|mokena|moline|momence|monee|monmouth|montgomery|monticello|morganpark|morris|morrison|morrisonville|morton|mortongrove|moundcity|moweaqua|mtcarmel|mtcarroll|mtgreenwood|mtmorris|mtolive|mtprospect|mtpulaski|mtsterling|mtvernon|mtzion|mundelein|murphysboro|naperville|nashville|nauvoo|nearnorthside|nearsouthside|neoga|newark|newathens|newbaden|newberlin|newcity|newlenox|newton|niles|nokomis|normal|norridge|norriscity|northaurora|northbarrington|northbrook|northcenter|northchicago|northfield|northlake|northlawndale|northpekin|northpeoria|northriverside|oakbrook|oakbrookterrace|oakforest|oaklawn|oakpark|oakwood|oakwoodhills|oblong|odin|ofallon|oglesby|okawville|olney|olympiafields|onarga|oquawka|oregon|orion|orlandhills|orlandpark|oswego|ottawa|palatine|palestine|palosheights|paloshills|palospark|pana|paris|parkcity|parkforest|parkridge|parkwaygardenhomes|pawnee|paxton|payson|pecatonica|pekin|peoria|peoriaheights|peotone|peru|petersburg|philo|phoenix|pinckneyville|pingreegrove|pistakeehighlands|pittsfield|plainfield|plano|polo|pontiac|pontoonbeach|poplargrove|portagepark|portbarrington|portbyron|posen|prairiegrove|prestbury|prestonheights|princeton|princeville|prophetstown|prospectheights|quincy|ramsey|rantoul|redbud|richmond|richtonpark|riverdale|riverforest|rivergrove|riverside|riverton|riverwoods|roanoke|robbins|robinson|rochelle|rochester|rockdale|rockfalls|rockford|rockisland|rockton|rogerspark|rollingmeadows|rome|romeoville|roodhouse|roscoe|roselle|rosemont|rosewoodheights|rosiclare|rossville|roundlake|roundlakebeach|roundlakeheights|roundlakepark|roxana|royalton|rushville|salem|sandoval|sandwich|saukvillage|savanna|savoy|schaumburg|schillerpark|scottairforcebase|seneca|sesser|shawneetown|shelbyville|sheldon|sheridan|sherman|shiloh|shorewood|sidney|silvis|skokie|sleepyhollow|smithton|somonauk|southbarrington|southbeloit|southchicago|southchicagoheights|southelgin|southernview|southholland|southjacksonville|southlawndale|southpekin|southroxana|southshore|sparta|springfield|springgrove|springvalley|stanne|staunton|stcharles|steeleville|steger|stelmo|sterling|stickney|stillmanvalley|stjacob|stjoseph|stockton|stonepark|streamwood|streator|sugargrove|sullivan|summit|sumner|swansea|sycamore|taylorville|teutopolis|thegalenaterritory|thirdlake|thomasboro|thornton|tilton|tinleypark|toledo|tolono|toluca|toulon|towerlake|tremont|trenton|troy|tuscola|twingrove|ukrainianvillage|universitypark|upperalton|uptown|urbana|valmeyer|vandalia|venetianvillage|venice|vernonhills|vienna|villageofcamptonhills|villagrove|villapark|virden|virginia|volo|wadsworth|walnut|wamac|warren|warrensburg|warrenville|warsaw|wasco|washburn|washington|washingtonpark|waterloo|waterman|watseka|wauconda|waukegan|waverly|wayne|waynecity|westchester|westchicago|westdundee|westelsdon|westenglewood|westernsprings|westfrankfort|westgarfieldpark|westlawn|westmont|westpeoria|westridge|westtown|westville|wheaton|wheeling|whitehall|williamsville|willowbrook|willowsprings|wilmette|wilmington|winchester|windsor|winfield|winnebago|winnetka|winthropharbor|wonderlake|wooddale|woodlawn|woodridge|woodriver|woodstock|worden|worth|wyoming|yorkville|zeigler|zion",
|
|
8428
8431
|
IN: "aberdeen|akron|albany|albion|alexandria|anderson|andrews|angola|arcadia|argos|attica|auburn|aurora|austin|avilla|avon|bargersville|basslake|batesville|battleground|bedford|beechgrove|berne|bicknell|bloomfield|bloomington|bluffton|boonville|bourbon|brazil|bremen|bright|bristol|broadripple|brooklyn|brookston|brookville|brownsburg|brownstown|burnsharbor|butler|cambridgecity|cannelton|carmel|cayuga|cedarlake|centerville|chandler|charlestown|chesterfield|chesterton|churubusco|cicero|clarksville|clermont|clinton|cloverdale|columbiacity|columbus|connersville|converse|cordrysweetwaterlakes|corydon|countrysquirelakes|covington|crawfordsville|crothersville|crownpoint|culver|cumberland|dale|daleville|danville|darmstadt|dayton|decatur|delphi|demotte|dillsboro|dunkirk|dunlap|dyer|eastchicago|eaton|edgewood|edinburgh|elkhart|ellettsville|elwood|english|evansville|fairfieldheights|fairmount|fairviewpark|farmersburg|farmland|ferdinand|fishers|fishlake|flora|fortville|fowler|frankfort|franklin|frankton|fremont|frenchlick|ftbranch|ftwayne|galena|galveston|garrett|gary|gascity|geneva|georgetown|goodland|goshen|grabill|granger|greencastle|greendale|greenfield|greensburg|greentown|greenwood|griffith|grissomairforcebase|gulivoirepark|hagerstown|hamilton|hammond|hanover|harlan|hartfordcity|haubstadt|hebron|henryville|heritagelake|hiddenvalley|highland|hobart|hope|hudsonlake|huntertown|huntingburg|huntington|indianapolis|indianheights|ingalls|jasonville|jasper|jeffersonville|jonesboro|kendallville|kentland|kingsfordheights|knightstown|knox|kokomo|koontzlake|kouts|lafayette|lagrange|lakedalecarlia|lakesofthefourseasons|lakestation|lapel|laporte|lawrence|lawrenceburg|lebanon|leocedarville|liberty|ligonier|linton|logansport|longbeach|loogootee|lowell|lynn|madison|marion|markle|martinsville|mccordsville|melodyhill|meridianhills|merrillville|michigancity|middlebury|middletown|milan|milford|mishawaka|mitchell|monon|monroeville|monrovia|monticello|montpelier|mooresville|morocco|morristown|mtvernon|mulberry|muncie|munster|nappanee|nashville|newalbany|newburgh|newcarlisle|newcastle|newchicago|newhaven|newpalestine|newparis|newpekin|newport|newwhiteland|noblesville|northjudson|northliberty|northmadison|northmanchester|northterrehaute|northvernon|northwebster|notredame|oaklandcity|oakpark|odon|ogdendunes|oolitic|orleans|osceola|osgood|ossian|otis|otterbein|owensville|oxford|paoli|parkercity|pendleton|peru|petersburg|pierceton|pittsboro|plainfield|plymouth|portage|porter|portland|poseyville|princeslakes|princeton|redkey|remington|rensselaer|richmond|risingsun|roanoke|rochester|rockport|rockville|romecity|roselawn|rossville|rushville|russiaville|santaclaus|schererville|scottsburg|seelyville|sellersburg|seymour|shadeland|shelburn|shelbyville|sheridan|shoals|shorewoodforest|simontonlake|smithvillesanders|southbend|southhaven|southport|southwhitley|speedway|spencer|stjohn|stpaul|sullivan|sunman|sweetser|syracuse|tellcity|terrehaute|thorntown|tipton|topeka|trafalgar|trailcreek|trilakes|unioncity|upland|valparaiso|veedersburg|versailles|vevay|vincennes|wabash|wakarusa|walkerton|walton|wanatah|warren|warrenpark|warsaw|washington|waterloo|westfield|westlafayette|westport|westterrehaute|westville|whiteland|whitestown|whiting|williamsport|winamac|winchester|winfield|winonalake|wolcottville|woodburn|worthington|yorktown|zionsville",
|
|
@@ -8434,45 +8437,45 @@ var Lo = {
|
|
|
8434
8437
|
};
|
|
8435
8438
|
//#endregion
|
|
8436
8439
|
//#region core/transport/text.ts
|
|
8437
|
-
function
|
|
8440
|
+
function zo(e, t = 500) {
|
|
8438
8441
|
return typeof e == "string" ? e.replace(/\s+/g, " ").trim().slice(0, t) : "";
|
|
8439
8442
|
}
|
|
8440
8443
|
//#endregion
|
|
8441
8444
|
//#region core/time/index.ts
|
|
8442
|
-
var
|
|
8443
|
-
function
|
|
8445
|
+
var Bo = /(?:Z|[+-]\d{2}:?\d{2})$/i;
|
|
8446
|
+
function Vo(e) {
|
|
8444
8447
|
let t = e.isValid ? e.toISO({ suppressMilliseconds: !0 }) : null;
|
|
8445
8448
|
return t ? {
|
|
8446
8449
|
iso: t,
|
|
8447
8450
|
timestamp: e.toMillis()
|
|
8448
8451
|
} : null;
|
|
8449
8452
|
}
|
|
8450
|
-
function
|
|
8451
|
-
let n =
|
|
8452
|
-
return !n || !
|
|
8453
|
+
function Ho(e, t = 64) {
|
|
8454
|
+
let n = zo(e, t);
|
|
8455
|
+
return !n || !Bo.test(n) ? null : Vo($.fromISO(n, { setZone: !0 }));
|
|
8453
8456
|
}
|
|
8454
|
-
function
|
|
8455
|
-
let i =
|
|
8456
|
-
return i ?
|
|
8457
|
+
function Uo(e, t, n, r = {}) {
|
|
8458
|
+
let i = zo(e, r.maxLength ?? 64);
|
|
8459
|
+
return i ? Vo($.fromFormat(i, t, {
|
|
8457
8460
|
zone: n,
|
|
8458
8461
|
locale: r.locale
|
|
8459
8462
|
})) : null;
|
|
8460
8463
|
}
|
|
8461
|
-
function
|
|
8462
|
-
let r =
|
|
8463
|
-
return r ? Bo
|
|
8464
|
+
function Wo(e, t, n = 64) {
|
|
8465
|
+
let r = zo(e, n);
|
|
8466
|
+
return r ? Vo(Bo.test(r) ? $.fromISO(r, { setZone: !0 }) : $.fromISO(r, { zone: t })) : null;
|
|
8464
8467
|
}
|
|
8465
|
-
function
|
|
8466
|
-
let n =
|
|
8468
|
+
function Go(e, t) {
|
|
8469
|
+
let n = zo(e, t);
|
|
8467
8470
|
if (!n) return null;
|
|
8468
|
-
let r =
|
|
8471
|
+
let r = Bo.test(n) ? $.fromISO(n, { setZone: !0 }).toUTC() : $.fromISO(n, { zone: "utc" });
|
|
8469
8472
|
return r.isValid ? r : null;
|
|
8470
8473
|
}
|
|
8471
|
-
function
|
|
8472
|
-
let r =
|
|
8474
|
+
function Ko(e, t, n = 64) {
|
|
8475
|
+
let r = Go(e, n);
|
|
8473
8476
|
if (!r) return null;
|
|
8474
8477
|
let { year: i, month: a, day: o, hour: s, minute: c, second: l, millisecond: u } = r;
|
|
8475
|
-
return
|
|
8478
|
+
return Vo($.fromObject({
|
|
8476
8479
|
year: i,
|
|
8477
8480
|
month: a,
|
|
8478
8481
|
day: o,
|
|
@@ -8482,26 +8485,26 @@ function Go(e, t, n = 64) {
|
|
|
8482
8485
|
millisecond: u
|
|
8483
8486
|
}, { zone: t }));
|
|
8484
8487
|
}
|
|
8485
|
-
function
|
|
8486
|
-
return
|
|
8488
|
+
function qo(e, t = 64) {
|
|
8489
|
+
return Go(e, t)?.toISO({ includeOffset: !1 }) ?? null;
|
|
8487
8490
|
}
|
|
8488
|
-
function
|
|
8489
|
-
if (!e.length ||
|
|
8491
|
+
function Jo(e, t) {
|
|
8492
|
+
if (!e.length || Bo.test(t)) return null;
|
|
8490
8493
|
let n = e.map((e) => $.fromISO(t, { zone: e })), r = n[0].toMillis();
|
|
8491
8494
|
return n.every((e) => e.isValid && e.toMillis() === r) ? e[0] : null;
|
|
8492
8495
|
}
|
|
8493
|
-
var
|
|
8494
|
-
function
|
|
8496
|
+
var Yo = 36e5;
|
|
8497
|
+
function Xo(e, t) {
|
|
8495
8498
|
let n = e.map((e) => e.known ?? null), r = (e, t) => {
|
|
8496
8499
|
for (let r = e; r >= 0 && r < n.length; r += t) if (n[r]) return n[r].timestamp;
|
|
8497
8500
|
};
|
|
8498
8501
|
return e.map((e, n) => {
|
|
8499
8502
|
if (e.known) return e.known;
|
|
8500
8503
|
let i = r(n - 1, -1), a = r(n + 1, 1);
|
|
8501
|
-
return e.guesses?.find((e) => !!e && e.timestamp <= t +
|
|
8504
|
+
return e.guesses?.find((e) => !!e && e.timestamp <= t + Yo && (i === void 0 || e.timestamp <= i) && (a === void 0 || e.timestamp >= a)) ?? null;
|
|
8502
8505
|
});
|
|
8503
8506
|
}
|
|
8504
|
-
var
|
|
8507
|
+
var Zo = {
|
|
8505
8508
|
AT: "Europe/Vienna",
|
|
8506
8509
|
BE: "Europe/Brussels",
|
|
8507
8510
|
BG: "Europe/Sofia",
|
|
@@ -8548,21 +8551,21 @@ var Xo = {
|
|
|
8548
8551
|
TH: "Asia/Bangkok",
|
|
8549
8552
|
TW: "Asia/Taipei",
|
|
8550
8553
|
VN: "Asia/Ho_Chi_Minh"
|
|
8551
|
-
},
|
|
8552
|
-
function
|
|
8554
|
+
}, Qo = new Intl.DisplayNames(["en"], { type: "region" }), $o = new Map(Array.from({ length: 676 }, (e, t) => String.fromCharCode(65 + Math.floor(t / 26), 65 + t % 26)).filter((e) => Qo.of(e) !== e && new Intl.Locale(`und-${e}`).region === e).map((e) => [Qo.of(e).toUpperCase(), e])), es = new Set($o.values());
|
|
8555
|
+
function ts(e) {
|
|
8553
8556
|
if (typeof e != "string") return null;
|
|
8554
8557
|
let t = e.trim().toUpperCase();
|
|
8555
|
-
return
|
|
8556
|
-
}
|
|
8557
|
-
function ts(e) {
|
|
8558
|
-
let t = es(e);
|
|
8559
|
-
return t && Object.hasOwn(Xo, t) ? Xo[t] : null;
|
|
8558
|
+
return es.has(t) ? t : $o.get(t) ?? null;
|
|
8560
8559
|
}
|
|
8561
8560
|
function ns(e) {
|
|
8562
|
-
let t =
|
|
8561
|
+
let t = ts(e);
|
|
8562
|
+
return t && Object.hasOwn(Zo, t) ? Zo[t] : null;
|
|
8563
|
+
}
|
|
8564
|
+
function rs(e) {
|
|
8565
|
+
let t = Object.keys(Zo).filter((t) => Zo[t] === e);
|
|
8563
8566
|
return t.length === 1 ? t[0] : null;
|
|
8564
8567
|
}
|
|
8565
|
-
var
|
|
8568
|
+
var is = {
|
|
8566
8569
|
AL: "America/Chicago",
|
|
8567
8570
|
AK: "America/Anchorage",
|
|
8568
8571
|
AZ: "America/Phoenix",
|
|
@@ -8620,12 +8623,12 @@ var rs = {
|
|
|
8620
8623
|
AS: "Pacific/Pago_Pago",
|
|
8621
8624
|
MP: "Pacific/Saipan"
|
|
8622
8625
|
};
|
|
8623
|
-
function
|
|
8626
|
+
function as(e) {
|
|
8624
8627
|
if (typeof e != "string") return null;
|
|
8625
8628
|
let t = e.trim().toUpperCase();
|
|
8626
|
-
return Object.hasOwn(
|
|
8629
|
+
return Object.hasOwn(is, t) ? is[t] : null;
|
|
8627
8630
|
}
|
|
8628
|
-
var
|
|
8631
|
+
var os = {
|
|
8629
8632
|
AB: "America/Edmonton",
|
|
8630
8633
|
BC: "America/Vancouver",
|
|
8631
8634
|
MB: "America/Winnipeg",
|
|
@@ -8640,27 +8643,27 @@ var as = {
|
|
|
8640
8643
|
SK: "America/Regina",
|
|
8641
8644
|
YT: "America/Whitehorse"
|
|
8642
8645
|
};
|
|
8643
|
-
function
|
|
8646
|
+
function ss(e) {
|
|
8644
8647
|
if (typeof e != "string") return null;
|
|
8645
8648
|
let t = e.trim().toUpperCase();
|
|
8646
|
-
return Object.hasOwn(
|
|
8649
|
+
return Object.hasOwn(os, t) ? os[t] : null;
|
|
8647
8650
|
}
|
|
8648
|
-
function
|
|
8651
|
+
function cs(e) {
|
|
8649
8652
|
return e.normalize("NFD").replace(/\p{Mn}/gu, "").toLowerCase().replace(/\bsaint\b/g, "st").replace(/\bsainte\b/g, "ste").replace(/\bmount\b/g, "mt").replace(/\bfort\b/g, "ft").replace(/[^a-z0-9]/g, "");
|
|
8650
8653
|
}
|
|
8651
|
-
var
|
|
8652
|
-
function
|
|
8653
|
-
return
|
|
8654
|
+
var ls = new Map(Object.entries(Ro).map(([e, t]) => [e, new Set(t.split("|"))]));
|
|
8655
|
+
function us(e, t) {
|
|
8656
|
+
return ls.get(e.trim().toUpperCase())?.has(cs(t)) ?? !1;
|
|
8654
8657
|
}
|
|
8655
|
-
function
|
|
8658
|
+
function ds(e) {
|
|
8656
8659
|
let t = typeof e == "number" ? e : typeof e == "string" && e.trim() !== "" ? Number(e) : NaN;
|
|
8657
|
-
return !Number.isFinite(t) || t <= 0 ? null :
|
|
8660
|
+
return !Number.isFinite(t) || t <= 0 ? null : Vo($.fromMillis(t, { zone: "utc" }));
|
|
8658
8661
|
}
|
|
8659
|
-
function
|
|
8662
|
+
function fs(e) {
|
|
8660
8663
|
let t = typeof e == "number" ? e : typeof e == "string" && e.trim() !== "" ? Number(e) : NaN;
|
|
8661
|
-
return !Number.isFinite(t) || t <= 0 ? null :
|
|
8664
|
+
return !Number.isFinite(t) || t <= 0 ? null : ds(t * 1e3);
|
|
8662
8665
|
}
|
|
8663
|
-
function
|
|
8666
|
+
function ps(e, t, n) {
|
|
8664
8667
|
if (![
|
|
8665
8668
|
e,
|
|
8666
8669
|
t,
|
|
@@ -8675,9 +8678,9 @@ function fs(e, t, n) {
|
|
|
8675
8678
|
}
|
|
8676
8679
|
//#endregion
|
|
8677
8680
|
//#region core/result/resolve.ts
|
|
8678
|
-
var
|
|
8679
|
-
function
|
|
8680
|
-
if (
|
|
8681
|
+
var ms = new Set(xe);
|
|
8682
|
+
function hs(e) {
|
|
8683
|
+
if (ms.has(e.current_stage ?? "")) return e.current_stage;
|
|
8681
8684
|
let t = {
|
|
8682
8685
|
pending: "pending",
|
|
8683
8686
|
in_transit: "in_transit",
|
|
@@ -8686,33 +8689,33 @@ function ms(e) {
|
|
|
8686
8689
|
exception: "failed_attempt"
|
|
8687
8690
|
}[e.status ?? "unknown"];
|
|
8688
8691
|
if (!t) return null;
|
|
8689
|
-
let n =
|
|
8690
|
-
return n === "pending" &&
|
|
8692
|
+
let n = Zt(e.last_status_text ?? "", t).stage, r = e.events?.[0]?.stage;
|
|
8693
|
+
return n === "pending" && ms.has(r ?? "") ? r : n;
|
|
8691
8694
|
}
|
|
8692
|
-
function
|
|
8693
|
-
let t =
|
|
8695
|
+
function gs(e) {
|
|
8696
|
+
let t = hs(e);
|
|
8694
8697
|
return !!(t && t !== "pending") || (e.events ?? []).some((e) => {
|
|
8695
|
-
let t =
|
|
8696
|
-
return !!(t && t !== "pending") || !!(e.description &&
|
|
8698
|
+
let t = ms.has(e.stage ?? "") ? e.stage : void 0;
|
|
8699
|
+
return !!(t && t !== "pending") || !!(e.description && Zt(e.description, "pending").stage !== "pending");
|
|
8697
8700
|
});
|
|
8698
8701
|
}
|
|
8699
|
-
function gs(e, t = "in_transit") {
|
|
8700
|
-
return Yt(e, t);
|
|
8701
|
-
}
|
|
8702
8702
|
function _s(e, t = "in_transit") {
|
|
8703
|
-
return
|
|
8703
|
+
return Zt(e, t);
|
|
8704
|
+
}
|
|
8705
|
+
function vs(e, t = "in_transit") {
|
|
8706
|
+
return _s(e, t).stage;
|
|
8704
8707
|
}
|
|
8705
|
-
function
|
|
8706
|
-
return
|
|
8708
|
+
function ys(e, t, n) {
|
|
8709
|
+
return ms.has(e) ? typeof n == "string" && n.length <= 100 && (n === "none" || n === "carrier_map" || /^wording:[a-z0-9_]+$/.test(n)) ? n : "carrier_map" : _s(t).source;
|
|
8707
8710
|
}
|
|
8708
|
-
function
|
|
8709
|
-
let t =
|
|
8710
|
-
let t =
|
|
8711
|
+
function bs(e) {
|
|
8712
|
+
let t = Ut(e), n = hs(t), r = (t.events ?? []).map((e) => {
|
|
8713
|
+
let t = ms.has(e.stage ?? "") ? e.stage : void 0, n = Zt(e.description ?? "", "in_transit");
|
|
8711
8714
|
return {
|
|
8712
8715
|
...e,
|
|
8713
8716
|
stage: t ?? n.stage,
|
|
8714
|
-
stage_source: t ?
|
|
8715
|
-
instant:
|
|
8717
|
+
stage_source: t ? ys(t, e.description ?? "", e.stage_source) : n.source,
|
|
8718
|
+
instant: Ho(e.time)?.iso ?? null
|
|
8716
8719
|
};
|
|
8717
8720
|
});
|
|
8718
8721
|
return {
|
|
@@ -8723,11 +8726,11 @@ function ys(e) {
|
|
|
8723
8726
|
}
|
|
8724
8727
|
//#endregion
|
|
8725
8728
|
//#region core/errors/hint.ts
|
|
8726
|
-
function
|
|
8729
|
+
function xs(e) {
|
|
8727
8730
|
return te(e) ?? (e instanceof TypeError || e instanceof RangeError || e instanceof SyntaxError ? "schema" : "transport");
|
|
8728
8731
|
}
|
|
8729
|
-
function
|
|
8730
|
-
let t =
|
|
8732
|
+
function Ss(e) {
|
|
8733
|
+
let t = xs(e), n = g(e);
|
|
8731
8734
|
return {
|
|
8732
8735
|
kind: t,
|
|
8733
8736
|
...n === void 0 ? {} : { retryAfterMs: n }
|
|
@@ -8735,19 +8738,19 @@ function xs(e) {
|
|
|
8735
8738
|
}
|
|
8736
8739
|
//#endregion
|
|
8737
8740
|
//#region core/catalog/networks.ts
|
|
8738
|
-
var
|
|
8741
|
+
var Cs = [
|
|
8739
8742
|
"dhl",
|
|
8740
8743
|
"dpd",
|
|
8741
8744
|
"gls",
|
|
8742
8745
|
"hermes",
|
|
8743
8746
|
"evri"
|
|
8744
8747
|
];
|
|
8745
|
-
function
|
|
8746
|
-
return
|
|
8748
|
+
function ws(e) {
|
|
8749
|
+
return Cs.find((t) => e === t || e.startsWith(`${t}-`));
|
|
8747
8750
|
}
|
|
8748
8751
|
//#endregion
|
|
8749
8752
|
//#region generated/recognition.ts
|
|
8750
|
-
var
|
|
8753
|
+
var Ts = {
|
|
8751
8754
|
aliexpress: 14,
|
|
8752
8755
|
"austrian-post": 39,
|
|
8753
8756
|
bpost: 37,
|
|
@@ -8791,23 +8794,23 @@ var ws = {
|
|
|
8791
8794
|
tipsa: 24,
|
|
8792
8795
|
tnt: 44,
|
|
8793
8796
|
uniuni: 33
|
|
8794
|
-
},
|
|
8795
|
-
function
|
|
8796
|
-
let t =
|
|
8797
|
+
}, Es = 5;
|
|
8798
|
+
function Ds(e) {
|
|
8799
|
+
let t = _(e);
|
|
8797
8800
|
if (/^[A-Z0-9]{4,40}$/.test(t)) return t.match(/[A-Z]+|[0-9]+/g).map((e) => `${/^[0-9]/.test(e) ? "D" : "A"}${e.length}`).join("");
|
|
8798
8801
|
}
|
|
8799
|
-
function
|
|
8800
|
-
let n =
|
|
8802
|
+
function Os(e, t = {}) {
|
|
8803
|
+
let n = b(e), r = n.carrier === "intl-post";
|
|
8801
8804
|
if (n.confidence !== "low" && !r) return [];
|
|
8802
|
-
let i =
|
|
8805
|
+
let i = _(e), a = r ? Object.entries(v).flatMap(([t, n]) => {
|
|
8803
8806
|
let r = n.detectionRules.find((t) => t.confidence === "low" && (!t.checksum || t.checksum === "s10") && new RegExp(t.pattern).test(i) && (!t.rawPattern || new RegExp(t.rawPattern).test(e.trim().toUpperCase())));
|
|
8804
8807
|
return r ? [{
|
|
8805
8808
|
carrier: t,
|
|
8806
8809
|
preferred: r.preferred === !0
|
|
8807
8810
|
}] : [];
|
|
8808
|
-
}) : [], o = r ? a.map(({ carrier: e }) => e) : n.candidates, s = r ? a.filter((e) => e.preferred).map(({ carrier: e }) => e) : n.preferred, c = t.phase === "browser" ? Object.fromEntries(Object.entries(
|
|
8811
|
+
}) : [], o = r ? a.map(({ carrier: e }) => e) : n.candidates, s = r ? a.filter((e) => e.preferred).map(({ carrier: e }) => e) : n.preferred, c = t.phase === "browser" ? Object.fromEntries(Object.entries(v).map(([e, t]) => [e, t.tracking.browserRecognitionRank])) : Ts, l = new Set(s.filter((e) => c[e] === void 0).map((e) => ws(e)).filter(Boolean)), u = t.countryHint?.trim().toUpperCase(), d = (e) => {
|
|
8809
8812
|
if (!u || !/^[A-Z]{2}$/.test(u)) return 0;
|
|
8810
|
-
let t =
|
|
8813
|
+
let t = v[e]?.countries ?? [];
|
|
8811
8814
|
return t[0] === u ? 2 : +!!t.includes(u);
|
|
8812
8815
|
}, f = (e) => {
|
|
8813
8816
|
let n = t.priorities?.[e];
|
|
@@ -8819,7 +8822,7 @@ function Ds(e, t = {}) {
|
|
|
8819
8822
|
f(e),
|
|
8820
8823
|
c[e] ?? 0
|
|
8821
8824
|
];
|
|
8822
|
-
return o.filter((e) => c[e] !== void 0 &&
|
|
8825
|
+
return o.filter((e) => c[e] !== void 0 && Ne.has(e) && Ae(e) !== "universal" && !l.has(ws(e)) && !t.skip?.(e)).map((e) => ({
|
|
8823
8826
|
carrier: e,
|
|
8824
8827
|
score: p(e)
|
|
8825
8828
|
})).sort((e, t) => {
|
|
@@ -8830,14 +8833,14 @@ function Ds(e, t = {}) {
|
|
|
8830
8833
|
return 0;
|
|
8831
8834
|
}).map(({ carrier: t }) => ({
|
|
8832
8835
|
carrier: t,
|
|
8833
|
-
needsInput:
|
|
8836
|
+
needsInput: Me(t, e)[0]?.field ?? null,
|
|
8834
8837
|
preferred: s.includes(t)
|
|
8835
8838
|
})).filter((e) => t.phase !== "browser" || !e.needsInput);
|
|
8836
8839
|
}
|
|
8837
8840
|
//#endregion
|
|
8838
8841
|
//#region core/recognition/index.ts
|
|
8839
|
-
var
|
|
8840
|
-
async function
|
|
8842
|
+
var ks = 5184e6;
|
|
8843
|
+
async function As(e, t, n, r) {
|
|
8841
8844
|
let i = e.map((e) => ({
|
|
8842
8845
|
...e,
|
|
8843
8846
|
status: "failed",
|
|
@@ -8869,12 +8872,12 @@ async function ks(e, t, n, r) {
|
|
|
8869
8872
|
}
|
|
8870
8873
|
return r?.throwIfAborted(), i.map((e) => ({ ...e }));
|
|
8871
8874
|
}
|
|
8872
|
-
function
|
|
8875
|
+
function js(e, t) {
|
|
8873
8876
|
let n = Date.parse(e.lastActivityAt ?? "");
|
|
8874
|
-
return !Number.isFinite(n) || t.getTime() - n <
|
|
8877
|
+
return !Number.isFinite(n) || t.getTime() - n < ks;
|
|
8875
8878
|
}
|
|
8876
|
-
function
|
|
8877
|
-
let n = e.filter((e) => e.status === "known" &&
|
|
8879
|
+
function Ms(e, t = /* @__PURE__ */ new Date()) {
|
|
8880
|
+
let n = e.filter((e) => e.status === "known" && js(e, t));
|
|
8878
8881
|
if (n.length === 0) return { choices: [] };
|
|
8879
8882
|
if (n.length === 1) return {
|
|
8880
8883
|
carrier: n[0].carrier,
|
|
@@ -8885,8 +8888,8 @@ function js(e, t = /* @__PURE__ */ new Date()) {
|
|
|
8885
8888
|
carrier: r[0].carrier,
|
|
8886
8889
|
choices: []
|
|
8887
8890
|
};
|
|
8888
|
-
if (new Set(n.map((e) =>
|
|
8889
|
-
let [e] = [...n].sort((e, t) => (
|
|
8891
|
+
if (new Set(n.map((e) => ws(e.carrier) ?? e.carrier)).size === 1) {
|
|
8892
|
+
let [e] = [...n].sort((e, t) => (Ts[t.carrier] ?? 0) - (Ts[e.carrier] ?? 0));
|
|
8890
8893
|
return {
|
|
8891
8894
|
carrier: e.carrier,
|
|
8892
8895
|
choices: []
|
|
@@ -8896,14 +8899,14 @@ function js(e, t = /* @__PURE__ */ new Date()) {
|
|
|
8896
8899
|
}
|
|
8897
8900
|
//#endregion
|
|
8898
8901
|
//#region core/catalog/hints.ts
|
|
8899
|
-
var
|
|
8902
|
+
var Ns = (e) => e.toLowerCase().replace(/[^a-z0-9]/g, ""), Ps = [
|
|
8900
8903
|
"dhl",
|
|
8901
8904
|
"dpd",
|
|
8902
8905
|
"gls",
|
|
8903
8906
|
"hermes",
|
|
8904
8907
|
"evri",
|
|
8905
8908
|
"post"
|
|
8906
|
-
],
|
|
8909
|
+
], Fs = {
|
|
8907
8910
|
ups: "ups",
|
|
8908
8911
|
swisspost: "swiss-post",
|
|
8909
8912
|
laposte: "la-poste",
|
|
@@ -8916,11 +8919,11 @@ var Ms = (e) => e.toLowerCase().replace(/[^a-z0-9]/g, ""), Ns = [
|
|
|
8916
8919
|
spainpost: "correos-spain"
|
|
8917
8920
|
};
|
|
8918
8921
|
[
|
|
8919
|
-
...Object.entries(
|
|
8920
|
-
...Object.keys(
|
|
8921
|
-
...
|
|
8922
|
+
...Object.entries(v).filter(([e]) => e !== "unknown").flatMap(([, e]) => [e.displayName, ...e.aliases ?? []].map(Ns)),
|
|
8923
|
+
...Object.keys(Fs),
|
|
8924
|
+
...Ps
|
|
8922
8925
|
];
|
|
8923
|
-
var
|
|
8926
|
+
var Is = /* @__PURE__ */ new Map([
|
|
8924
8927
|
["CA", "canada-post"],
|
|
8925
8928
|
["CH", "swiss-post"],
|
|
8926
8929
|
["DE", "dhl"],
|
|
@@ -8936,44 +8939,44 @@ var Fs = /* @__PURE__ */ new Map([
|
|
|
8936
8939
|
["PT", "ctt"],
|
|
8937
8940
|
["SE", "postnord"],
|
|
8938
8941
|
["US", "usps"]
|
|
8939
|
-
]),
|
|
8942
|
+
]), Ls = new Intl.DisplayNames(["en"], { type: "region" }), Rs = (e) => new Intl.Locale(`und-${e}`).region ?? e;
|
|
8940
8943
|
new Map([
|
|
8941
|
-
...Array.from({ length: 676 }, (e, t) => String.fromCharCode(65 + Math.floor(t / 26), 65 + t % 26)).map((e) => [
|
|
8944
|
+
...Array.from({ length: 676 }, (e, t) => String.fromCharCode(65 + Math.floor(t / 26), 65 + t % 26)).map((e) => [Ns(Ls.of(e) ?? ""), Rs(e)]).filter(([e, t]) => e !== "" && e !== t.toLowerCase()),
|
|
8942
8945
|
["uk", "GB"],
|
|
8943
8946
|
["usa", "US"]
|
|
8944
8947
|
]);
|
|
8945
|
-
function
|
|
8948
|
+
function zs(e) {
|
|
8946
8949
|
if (typeof e != "string") return;
|
|
8947
8950
|
let t = e.trim().toUpperCase();
|
|
8948
|
-
return
|
|
8951
|
+
return Is.get(t) || [...Is].find(([e]) => Ls.of(e)?.toUpperCase() === t)?.[1];
|
|
8949
8952
|
}
|
|
8950
|
-
function
|
|
8953
|
+
function Bs(e) {
|
|
8951
8954
|
let t;
|
|
8952
8955
|
try {
|
|
8953
8956
|
t = new URL(e);
|
|
8954
8957
|
} catch {
|
|
8955
8958
|
return [];
|
|
8956
8959
|
}
|
|
8957
|
-
return !["https:", "http:"].includes(t.protocol) || t.username || t.password ? [] : ["post.ch", "www.post.ch"].includes(t.hostname) ? ["swiss-post"] : Object.entries(
|
|
8960
|
+
return !["https:", "http:"].includes(t.protocol) || t.username || t.password ? [] : ["post.ch", "www.post.ch"].includes(t.hostname) ? ["swiss-post"] : Object.entries(v).filter(([, e]) => e.linkRules.some((e) => e.domains.some((e) => Le(t.hostname, e)))).map(([e]) => e);
|
|
8958
8961
|
}
|
|
8959
|
-
function
|
|
8960
|
-
return [...new Set(e.flatMap((e) => [...String(e ?? "").matchAll(/https?:\/\/[^\s<>"')]+/gi)].flatMap(([e]) =>
|
|
8962
|
+
function Vs(e, t) {
|
|
8963
|
+
return [...new Set(e.flatMap((e) => [...String(e ?? "").matchAll(/https?:\/\/[^\s<>"')]+/gi)].flatMap(([e]) => Bs(e)).filter((e) => e !== t)))];
|
|
8961
8964
|
}
|
|
8962
8965
|
//#endregion
|
|
8963
8966
|
//#region core/catalog/handoff.ts
|
|
8964
|
-
function
|
|
8965
|
-
return !
|
|
8967
|
+
function Hs(e, t) {
|
|
8968
|
+
return !Ne.has(e) || Ae(e) === "universal" || Me(e, t).length > 0 ? !1 : je(e, t).length === 0 || b(t).candidates.includes(e);
|
|
8966
8969
|
}
|
|
8967
|
-
function
|
|
8970
|
+
function Us(e, t, n) {
|
|
8968
8971
|
if (n.delivery_tracking_number != null && (typeof n.delivery_tracking_number != "string" || !/^[A-Z0-9]{4,40}$/.test(n.delivery_tracking_number))) return null;
|
|
8969
|
-
let r =
|
|
8972
|
+
let r = Vs([n.last_status_text, ...(n.events ?? []).map((e) => e.description)], e);
|
|
8970
8973
|
if (!n.delivery_carrier && r.length > 1) return null;
|
|
8971
8974
|
let i = n.delivery_carrier ?? r[0], a = "partner", o = n.delivery_tracking_number || t, s = typeof n.destination_country == "string" ? n.destination_country : typeof n.destination_country_name == "string" ? n.destination_country_name : void 0;
|
|
8972
|
-
if (!i &&
|
|
8973
|
-
let e =
|
|
8975
|
+
if (!i && lt(o) && (i = zs(s), i && (a = "destination")), !i && n.delivery_tracking_number) {
|
|
8976
|
+
let e = b(o);
|
|
8974
8977
|
e.confidence === "high" && (i = e.carrier, a = "reference");
|
|
8975
8978
|
}
|
|
8976
|
-
return !i && !n.delivery_tracking_number && ["aliexpress", "intl-post"].includes(e) &&
|
|
8979
|
+
return !i && !n.delivery_tracking_number && ["aliexpress", "intl-post"].includes(e) && ut(t) && (!s || ["ch", "switzerland"].includes(s.trim().toLowerCase())) && (i = "swiss-post", a = "reference"), !i || i === e || !/^[A-Z0-9]{4,40}$/.test(o) || !Hs(i, o) ? null : {
|
|
8977
8980
|
carrier: i,
|
|
8978
8981
|
number: o,
|
|
8979
8982
|
basis: a
|
|
@@ -8981,7 +8984,7 @@ function Hs(e, t, n) {
|
|
|
8981
8984
|
}
|
|
8982
8985
|
//#endregion
|
|
8983
8986
|
//#region core/catalog/urls.ts
|
|
8984
|
-
var
|
|
8987
|
+
var Ws = "trackandtrace.planzergroup.com", Gs = /^\/shared\/sendungen\/([^/]+)\/?$/, Ks = /^[A-Za-z0-9_-]{32,256}$/, qs = "customeriberia.dachser.com", Js = "/customerarea/utilidades/seguimiento-publico/detalle", Ys = /^[A-Za-z0-9_-]{4,256}$/, Xs = /[\x00-\x1f\x7f]/, Zs = /* @__PURE__ */ new Set([
|
|
8985
8988
|
"hash",
|
|
8986
8989
|
"cliente",
|
|
8987
8990
|
"numeroUnico",
|
|
@@ -8996,7 +8999,7 @@ var Us = "trackandtrace.planzergroup.com", Ws = /^\/shared\/sendungen\/([^/]+)\/
|
|
|
8996
8999
|
"origen",
|
|
8997
9000
|
"usuario"
|
|
8998
9001
|
]);
|
|
8999
|
-
function
|
|
9002
|
+
function Qs(e, t) {
|
|
9000
9003
|
let n = e.trim();
|
|
9001
9004
|
if (n.length < 1 || n.length > 4096) throw TypeError("Paste the complete Planzer tracking URL");
|
|
9002
9005
|
let r;
|
|
@@ -9005,21 +9008,21 @@ function Zs(e, t) {
|
|
|
9005
9008
|
} catch (e) {
|
|
9006
9009
|
throw TypeError("Paste a valid Planzer tracking URL", { cause: e });
|
|
9007
9010
|
}
|
|
9008
|
-
if (r.protocol !== "https:" || r.hostname.toLowerCase() !==
|
|
9011
|
+
if (r.protocol !== "https:" || r.hostname.toLowerCase() !== Ws || r.username || r.password || r.port && r.port !== "443" || r.hash) throw TypeError(`Planzer shared links must use https://${Ws}`);
|
|
9009
9012
|
let i;
|
|
9010
9013
|
try {
|
|
9011
9014
|
i = decodeURIComponent(r.pathname);
|
|
9012
9015
|
} catch (e) {
|
|
9013
9016
|
throw TypeError("Paste a valid Planzer tracking URL", { cause: e });
|
|
9014
9017
|
}
|
|
9015
|
-
let a =
|
|
9018
|
+
let a = Gs.exec(i);
|
|
9016
9019
|
if (!a) throw TypeError("Paste a Planzer shared shipment URL");
|
|
9017
|
-
if (
|
|
9020
|
+
if (_(a[1]) !== _(t)) throw TypeError("The Planzer URL belongs to a different tracking number");
|
|
9018
9021
|
let o = r.searchParams.getAll("accessKey");
|
|
9019
|
-
if (o.length !== 1 || !
|
|
9022
|
+
if (o.length !== 1 || !Ks.test(o[0])) throw TypeError("The Planzer URL must include its accessKey");
|
|
9020
9023
|
return r.toString();
|
|
9021
9024
|
}
|
|
9022
|
-
function
|
|
9025
|
+
function $s(e, t) {
|
|
9023
9026
|
let n = e.trim();
|
|
9024
9027
|
if (n.length < 1 || n.length > 4096) throw TypeError("Paste the complete Dachser tracking URL");
|
|
9025
9028
|
let r;
|
|
@@ -9028,43 +9031,43 @@ function Qs(e, t) {
|
|
|
9028
9031
|
} catch (e) {
|
|
9029
9032
|
throw TypeError("Paste a valid Dachser tracking URL", { cause: e });
|
|
9030
9033
|
}
|
|
9031
|
-
if (r.protocol !== "https:" || r.hostname.toLowerCase() !==
|
|
9034
|
+
if (r.protocol !== "https:" || r.hostname.toLowerCase() !== qs || r.username || r.password || r.port && r.port !== "443" || r.hash) throw TypeError(`Dachser links must use https://${qs}`);
|
|
9032
9035
|
let i;
|
|
9033
9036
|
try {
|
|
9034
9037
|
i = decodeURIComponent(r.pathname);
|
|
9035
9038
|
} catch (e) {
|
|
9036
9039
|
throw TypeError("Paste a valid Dachser tracking URL", { cause: e });
|
|
9037
9040
|
}
|
|
9038
|
-
if (i !==
|
|
9041
|
+
if (i !== Js && i !== `${Js}/`) throw TypeError("Paste a Dachser public shipment detail URL");
|
|
9039
9042
|
let a = /* @__PURE__ */ new Map();
|
|
9040
9043
|
for (let [e, t] of r.searchParams) {
|
|
9041
|
-
if (!
|
|
9044
|
+
if (!Zs.has(e)) throw TypeError("The Dachser URL contains an unsupported parameter");
|
|
9042
9045
|
if (a.has(e)) throw TypeError("The Dachser URL contains a duplicate parameter");
|
|
9043
|
-
if (!t || t.length > 256 ||
|
|
9046
|
+
if (!t || t.length > 256 || Xs.test(t)) throw TypeError("The Dachser URL contains an invalid parameter");
|
|
9044
9047
|
a.set(e, t);
|
|
9045
9048
|
}
|
|
9046
9049
|
let o = a.get("numeroUnico");
|
|
9047
9050
|
if (!o) throw TypeError("The Dachser URL must include its shipment number");
|
|
9048
|
-
if (
|
|
9049
|
-
let s = a.get("hash"), c = a.get("clave"), l = a.get("fecha"), u = !!(s &&
|
|
9051
|
+
if (_(o) !== _(t)) throw TypeError("The Dachser URL belongs to a different tracking number");
|
|
9052
|
+
let s = a.get("hash"), c = a.get("clave"), l = a.get("fecha"), u = !!(s && Ys.test(s)), d = !!(c && l && Ys.test(c) && /^\d{8}$/.test(l));
|
|
9050
9053
|
if (!u && !d) throw TypeError("The Dachser URL must include its access parameters");
|
|
9051
|
-
return r.protocol = "https:", r.hostname =
|
|
9054
|
+
return r.protocol = "https:", r.hostname = qs, r.port = "", r.toString();
|
|
9052
9055
|
}
|
|
9053
9056
|
//#endregion
|
|
9054
9057
|
//#region core/catalog/postcode.ts
|
|
9055
|
-
var
|
|
9056
|
-
function
|
|
9058
|
+
var ec = /^(?=.{3,12}$)(?=.*\d)[A-Z0-9]+(?:[ -][A-Z0-9]+)*$/;
|
|
9059
|
+
function tc(e) {
|
|
9057
9060
|
return e.trim().toUpperCase().replace(/\s+/g, " ");
|
|
9058
9061
|
}
|
|
9059
9062
|
//#endregion
|
|
9060
9063
|
//#region core/catalog/inputs.ts
|
|
9061
|
-
function
|
|
9064
|
+
function nc(e, t, n, r) {
|
|
9062
9065
|
let i = {
|
|
9063
9066
|
trackingUrl: n.trim() || null,
|
|
9064
9067
|
postcode: r.trim() || null
|
|
9065
9068
|
}, a = e === "mondial-relay" && /^\d{26}$/.test(t);
|
|
9066
|
-
if (a && !
|
|
9067
|
-
let o = new Map(
|
|
9069
|
+
if (a && !he(t)) throw TypeError("Invalid Mondial Relay barcode");
|
|
9070
|
+
let o = new Map(je(e, t).map((e) => [e.field, e]));
|
|
9068
9071
|
(a || e === "mondial-relay" && /^(?:\d{10}|\d{12})$/.test(t)) && i.postcode && o.set("postcode", {
|
|
9069
9072
|
field: "postcode",
|
|
9070
9073
|
validator: "internationalPostcode"
|
|
@@ -9074,28 +9077,28 @@ function tc(e, t, n, r) {
|
|
|
9074
9077
|
let a = i[n];
|
|
9075
9078
|
if (!a) {
|
|
9076
9079
|
if (r.optional) continue;
|
|
9077
|
-
throw n === "trackingUrl" ? TypeError(`${
|
|
9080
|
+
throw n === "trackingUrl" ? TypeError(`${y(e).displayName} requires its complete tracking URL`) : r.validator === "swissPostcode" ? TypeError(`${y(e).displayName} requires the four-digit delivery postcode`) : r.validator === "francePostcode" || r.validator === "germanyPostcode" ? TypeError(`${y(e).displayName} requires the five-digit delivery postcode`) : r.validator === "swissOrFrancePostcode" ? TypeError(`${y(e).displayName} requires a four- or five-digit delivery postcode`) : r.validator === "paackPostcode" ? TypeError("Paack requires the delivery postcode") : TypeError(`${y(e).displayName} requires the delivery postcode`);
|
|
9078
9081
|
}
|
|
9079
9082
|
switch (r.validator) {
|
|
9080
9083
|
case "planzerSharedUrl":
|
|
9081
|
-
i[n] =
|
|
9084
|
+
i[n] = Qs(a, t);
|
|
9082
9085
|
break;
|
|
9083
9086
|
case "dachserCapabilityUrl":
|
|
9084
|
-
i[n] =
|
|
9087
|
+
i[n] = $s(a, t);
|
|
9085
9088
|
break;
|
|
9086
9089
|
case "swissPostcode":
|
|
9087
|
-
if (!/^\d{4}$/.test(a)) throw TypeError(`${
|
|
9090
|
+
if (!/^\d{4}$/.test(a)) throw TypeError(`${y(e).displayName} requires the four-digit delivery postcode`);
|
|
9088
9091
|
break;
|
|
9089
9092
|
case "francePostcode":
|
|
9090
9093
|
case "germanyPostcode":
|
|
9091
|
-
if (!/^\d{5}$/.test(a)) throw TypeError(`${
|
|
9094
|
+
if (!/^\d{5}$/.test(a)) throw TypeError(`${y(e).displayName} requires the five-digit delivery postcode`);
|
|
9092
9095
|
break;
|
|
9093
9096
|
case "swissOrFrancePostcode":
|
|
9094
|
-
if (!/^\d{4,5}$/.test(a)) throw TypeError(`${
|
|
9097
|
+
if (!/^\d{4,5}$/.test(a)) throw TypeError(`${y(e).displayName} requires a four- or five-digit delivery postcode`);
|
|
9095
9098
|
break;
|
|
9096
9099
|
case "internationalPostcode":
|
|
9097
|
-
if (
|
|
9098
|
-
i[n] =
|
|
9100
|
+
if (!ec.test(tc(a))) throw TypeError(`${y(e).displayName} requires a valid delivery postcode`);
|
|
9101
|
+
i[n] = tc(a);
|
|
9099
9102
|
break;
|
|
9100
9103
|
case "paackPostcode": {
|
|
9101
9104
|
let e = a.toLocaleUpperCase("en-US");
|
|
@@ -9108,12 +9111,12 @@ function tc(e, t, n, r) {
|
|
|
9108
9111
|
}
|
|
9109
9112
|
return i;
|
|
9110
9113
|
}
|
|
9111
|
-
function
|
|
9112
|
-
let t =
|
|
9113
|
-
if (
|
|
9114
|
+
function rc(e) {
|
|
9115
|
+
let t = tc(e);
|
|
9116
|
+
if (!ec.test(t)) throw TypeError("A valid delivery postcode is required");
|
|
9114
9117
|
return t;
|
|
9115
9118
|
}
|
|
9116
|
-
var
|
|
9119
|
+
var ic = { carriers: [
|
|
9117
9120
|
{
|
|
9118
9121
|
carrier: "dhl",
|
|
9119
9122
|
direct: "Yes",
|
|
@@ -10822,79 +10825,79 @@ var rc = { carriers: [
|
|
|
10822
10825
|
}
|
|
10823
10826
|
}]
|
|
10824
10827
|
}
|
|
10825
|
-
] },
|
|
10828
|
+
] }, ac = [
|
|
10826
10829
|
"Ship24",
|
|
10827
10830
|
"ParcelsApp",
|
|
10828
10831
|
"17TRACK",
|
|
10829
10832
|
"Postal Ninja",
|
|
10830
10833
|
"UPU"
|
|
10831
|
-
],
|
|
10834
|
+
], oc = /* @__PURE__ */ new Set([
|
|
10832
10835
|
"no_history",
|
|
10833
10836
|
"summary_only",
|
|
10834
10837
|
"sign_in",
|
|
10835
10838
|
"postcode_prompt"
|
|
10836
|
-
]),
|
|
10837
|
-
function
|
|
10839
|
+
]), sc = ic.carriers, cc = new Map(sc.map((e) => [e.carrier, e]));
|
|
10840
|
+
function lc(e) {
|
|
10838
10841
|
return typeof e == "number" || e === "history" || typeof e == "object" && !!e;
|
|
10839
10842
|
}
|
|
10840
|
-
function
|
|
10841
|
-
let n = t.filter((t) => t.results[e] !== void 0), r = n.some((t) => !t.stale && (
|
|
10842
|
-
return n.some((t) =>
|
|
10843
|
+
function uc(e, t) {
|
|
10844
|
+
let n = t.filter((t) => t.results[e] !== void 0), r = n.some((t) => !t.stale && (oc.has(t.results[e]) || t.results[e] === "wrong_carrier") && Object.entries(t.results).some(([t, n]) => t !== e && t !== "UPU" && lc(n)));
|
|
10845
|
+
return n.some((t) => lc(t.results[e])) ? n.some((t) => typeof t.results[e] == "object") || r ? "partial" : "full" : n.some((t) => ["wrong_carrier", "refused"].includes(t.results[e])) ? "excluded" : n.some((t) => !t.stale && oc.has(t.results[e])) ? "empty" : "unknown";
|
|
10843
10846
|
}
|
|
10844
|
-
function
|
|
10845
|
-
let t = e ?
|
|
10846
|
-
return t ? Object.fromEntries(
|
|
10847
|
+
function dc(e) {
|
|
10848
|
+
let t = e ? cc.get(e) : void 0;
|
|
10849
|
+
return t ? Object.fromEntries(ac.map((e) => [e, uc(e, t.references)])) : null;
|
|
10847
10850
|
}
|
|
10848
10851
|
//#endregion
|
|
10849
10852
|
//#region providers/plan.ts
|
|
10850
|
-
var
|
|
10853
|
+
var fc = [
|
|
10851
10854
|
"ParcelsApp",
|
|
10852
10855
|
"Ship24",
|
|
10853
10856
|
"17TRACK",
|
|
10854
10857
|
"UPU"
|
|
10855
|
-
],
|
|
10856
|
-
function
|
|
10858
|
+
], pc = /* @__PURE__ */ new Set(["17TRACK", "Postal Ninja"]);
|
|
10859
|
+
function mc(e) {
|
|
10857
10860
|
return e === "ParcelsApp" ? 45e3 : e === "UPU" ? 8e3 : 3e4;
|
|
10858
10861
|
}
|
|
10859
|
-
function
|
|
10860
|
-
return e && /^\d{10}$/.test(
|
|
10862
|
+
function hc(e) {
|
|
10863
|
+
return e && /^\d{10}$/.test(_(e)) ? "Ship24" : e && /^[CL][A-Z]\d{9}CN$/.test(_(e)) && lt(e) ? "17TRACK" : void 0;
|
|
10861
10864
|
}
|
|
10862
|
-
var
|
|
10865
|
+
var gc = {
|
|
10863
10866
|
full: 0,
|
|
10864
10867
|
partial: 1,
|
|
10865
10868
|
unknown: 2,
|
|
10866
10869
|
empty: 3,
|
|
10867
10870
|
excluded: 4
|
|
10868
10871
|
};
|
|
10869
|
-
function
|
|
10870
|
-
let n =
|
|
10871
|
-
return t === "UPU" ?
|
|
10872
|
+
function _c(e, t) {
|
|
10873
|
+
let n = gc[e?.[t] ?? "unknown"];
|
|
10874
|
+
return t === "UPU" ? gc.unknown : t === "Postal Ninja" ? Math.max(n, gc.empty) : n;
|
|
10872
10875
|
}
|
|
10873
|
-
var
|
|
10874
|
-
function
|
|
10876
|
+
var vc = (e) => e === "UPU" ? 2 : +(e === "Postal Ninja");
|
|
10877
|
+
function yc(e, t) {
|
|
10875
10878
|
let n = (e) => e !== "UPU" && t?.[e] === "excluded";
|
|
10876
|
-
return (e.some((e) => e !== "UPU" && !n(e)) ? e.filter((e) => !n(e)) : [...e]).sort((n, r) =>
|
|
10879
|
+
return (e.some((e) => e !== "UPU" && !n(e)) ? e.filter((e) => !n(e)) : [...e]).sort((n, r) => vc(n) - vc(r) || _c(t, n) - _c(t, r) || Number(pc.has(n)) - Number(pc.has(r)) || e.indexOf(n) - e.indexOf(r));
|
|
10877
10880
|
}
|
|
10878
|
-
function
|
|
10881
|
+
function bc(e = {}) {
|
|
10879
10882
|
let { trackingNumber: t, enablePostalNinja: n = !1 } = e, r = (n ? [
|
|
10880
10883
|
"ParcelsApp",
|
|
10881
10884
|
"Ship24",
|
|
10882
10885
|
"17TRACK",
|
|
10883
10886
|
"Postal Ninja",
|
|
10884
10887
|
"UPU"
|
|
10885
|
-
] : [...
|
|
10888
|
+
] : [...fc]).filter((e) => e !== "UPU" || t === void 0 || lt(t)), i = (e.carriers ?? []).find((e) => dc(e)) ?? null, a = dc(i), o = yc(r, a), s = hc(t);
|
|
10886
10889
|
return {
|
|
10887
10890
|
sources: s ? [s, ...o.filter((e) => e !== s)] : o,
|
|
10888
10891
|
carrier: i,
|
|
10889
10892
|
tier: (e) => a?.[e] ?? "unknown",
|
|
10890
|
-
rank: (e) =>
|
|
10893
|
+
rank: (e) => _c(a, e)
|
|
10891
10894
|
};
|
|
10892
10895
|
}
|
|
10893
|
-
function
|
|
10894
|
-
return
|
|
10896
|
+
function xc(e = !1, t) {
|
|
10897
|
+
return bc({
|
|
10895
10898
|
trackingNumber: t,
|
|
10896
10899
|
enablePostalNinja: e
|
|
10897
10900
|
}).sources;
|
|
10898
10901
|
}
|
|
10899
10902
|
//#endregion
|
|
10900
|
-
export {
|
|
10903
|
+
export { Se as AMAZON_NUMBER_PATTERN, Ne as AUTOMATIC_CARRIER_IDS, pc as BROWSER_SOURCES, f as BudgetExceededError, Ve as CARRIERS, ve as CARRIER_CATALOG, v as CARRIER_DEFINITIONS, ye as CARRIER_IDS, Pe as CARRIER_NAMES, t as CarrierError, a as ChallengeError, Bo as EXPLICIT_OFFSET_PATTERN, r as IndeterminateError, l as InputRequiredError, u as InvalidInputError, Es as MAX_RECOGNITIONS, s as MaintenanceError, i as NoHistoryError, n as NotFoundError, o as RateLimitedError, Ue as SELECTABLE_CARRIERS, xe as STAGES, c as SchemaError, Et as TRACKING_CANDIDATE_PATTERNS, Fe as TRACKING_LINK_RULES, d as TransportError, fc as UNIVERSAL_SOURCES, m as UpstreamHttpError, ee as UpstreamNetworkError, je as activeRequirements, Te as amazonMarketplace, Ee as amazonOrdersUrl, De as amazonShippingOrigin, Oe as amazonShippingUrl, ps as calendarDay, ss as canadaProvinceTimeZone, Ae as carrierAdapter, y as carrierDefinition, te as carrierErrorKind, He as carrierInfo, Ie as carrierLinkRules, We as carrierRequirements, ke as carrierTimezone, xt as checksumRejections, _s as classifyStage, Zt as classifyWording, ts as countryCode, ns as countryTimeZone, Us as deliveryHandoff, St as detectCarrier, b as detectCarrierMatch, ds as epochMillisTime, fs as epochSecondsTime, ne as errorTypeOf, Ht as eventPoint, Ho as explicitOffsetTime, Ss as failureHint, xs as failureKind, _e as formatTrackingNumber, Hs as hasDirectHandoffAdapter, vs as inferStage, Ce as isAmazonTrackingNumber, ge as isPlanzerSharedTrackingNumber, Xe as isValidCorreosSpainCheckLetter, ae as isValidDhlExpressWaybill, $e as isValidDpdParcelNumber, st as isValidGlsParcelNumber, ct as isValidHermesParcelNumber, he as isValidMondialRelayBarcode, pe as isValidPocztaPolskaBarcode, lt as isValidS10TrackingNumber, me as isValidSscc, se as isValidTntConsignmentNumber, mt as isValidUspsPackageBarcode, Wo as isoTime, At as keywordNumberInText, Xt as languageStageStatus, qe as localizedCarrierUrl, Le as matchesDomain, Ko as mislabeledLocalTime, qo as mislabeledWallTime, nc as normalizeCarrierInputs, Ut as normalizeCarrierResult, rc as normalizeDeliveryPostcode, _ as normalizeTrackingNumber, yc as orderUniversalSources, It as parseTrackingInput, hc as priorityUniversalSource, Os as recognitionCandidates, Ds as recognitionNumberShape, As as recognizeAll, Dt as recognizedNumberInText, us as regionHasTown, Me as requiredRequirements, Ge as requirementSatisfied, we as requiresAmazonAccount, bs as resolveResult, gs as resultHasUpdate, hs as resultStage, g as retryAfterMsOf, Xo as settleGuessedClocks, Ms as settleRecognition, Jo as sharedClockZone, ys as stageSource, ut as supportsSwissPostHandoff, rs as timeZoneCountry, cs as townKey, Yt as trackingLanguageStage, ze as trackingLink, Re as trackingNumberForLink, Ke as tracksAutomatically, bc as universalPlan, mc as universalSourceBudget, xc as universalSources, as as usStateTimeZone, wt as validTrackingNumber, $s as validateDachserTrackingUrl, Qs as validatePlanzerSharedUrl, Qt as wordingStage, Uo as zonedTime };
|