@learncard/core 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core.cjs.development.js +1711 -138
- package/dist/core.cjs.development.js.map +3 -3
- package/dist/core.cjs.production.min.js +177 -177
- package/dist/core.cjs.production.min.js.map +3 -3
- package/dist/core.esm.js +1711 -138
- package/dist/core.esm.js.map +3 -3
- package/package.json +2 -1
@@ -26464,17 +26464,17 @@ var require_decode_uri_component = __commonJS({
|
|
26464
26464
|
"%FE%FF": "\uFFFD\uFFFD",
|
26465
26465
|
"%FF%FE": "\uFFFD\uFFFD"
|
26466
26466
|
};
|
26467
|
-
var
|
26468
|
-
while (
|
26467
|
+
var match2 = multiMatcher.exec(input);
|
26468
|
+
while (match2) {
|
26469
26469
|
try {
|
26470
|
-
replaceMap[
|
26470
|
+
replaceMap[match2[0]] = decodeURIComponent(match2[0]);
|
26471
26471
|
} catch (err) {
|
26472
|
-
var result = decode9(
|
26473
|
-
if (result !==
|
26474
|
-
replaceMap[
|
26472
|
+
var result = decode9(match2[0]);
|
26473
|
+
if (result !== match2[0]) {
|
26474
|
+
replaceMap[match2[0]] = result;
|
26475
26475
|
}
|
26476
26476
|
}
|
26477
|
-
|
26477
|
+
match2 = multiMatcher.exec(input);
|
26478
26478
|
}
|
26479
26479
|
replaceMap["%C2"] = "\uFFFD";
|
26480
26480
|
var entries = Object.keys(replaceMap);
|
@@ -32097,14 +32097,14 @@ var ProviderCrypto = class {
|
|
32097
32097
|
return this.onExportKey.apply(this, args);
|
32098
32098
|
});
|
32099
32099
|
}
|
32100
|
-
checkExportKey(
|
32101
|
-
this.checkKeyFormat(
|
32100
|
+
checkExportKey(format2, key2, ...args) {
|
32101
|
+
this.checkKeyFormat(format2);
|
32102
32102
|
this.checkCryptoKey(key2);
|
32103
32103
|
if (!key2.extractable) {
|
32104
32104
|
throw new CryptoError("key: Is not extractable");
|
32105
32105
|
}
|
32106
32106
|
}
|
32107
|
-
onExportKey(
|
32107
|
+
onExportKey(format2, key2, ...args) {
|
32108
32108
|
return __async(this, null, function* () {
|
32109
32109
|
throw new UnsupportedOperationError("exportKey");
|
32110
32110
|
});
|
@@ -32115,16 +32115,16 @@ var ProviderCrypto = class {
|
|
32115
32115
|
return this.onImportKey.apply(this, args);
|
32116
32116
|
});
|
32117
32117
|
}
|
32118
|
-
checkImportKey(
|
32119
|
-
this.checkKeyFormat(
|
32120
|
-
this.checkKeyData(
|
32118
|
+
checkImportKey(format2, keyData, algorithm, extractable, keyUsages, ...args) {
|
32119
|
+
this.checkKeyFormat(format2);
|
32120
|
+
this.checkKeyData(format2, keyData);
|
32121
32121
|
this.checkAlgorithmName(algorithm);
|
32122
32122
|
this.checkImportParams(algorithm);
|
32123
32123
|
if (Array.isArray(this.usages)) {
|
32124
32124
|
this.checkKeyUsages(keyUsages, this.usages);
|
32125
32125
|
}
|
32126
32126
|
}
|
32127
|
-
onImportKey(
|
32127
|
+
onImportKey(format2, keyData, algorithm, extractable, keyUsages, ...args) {
|
32128
32128
|
return __async(this, null, function* () {
|
32129
32129
|
throw new UnsupportedOperationError("importKey");
|
32130
32130
|
});
|
@@ -32166,8 +32166,8 @@ var ProviderCrypto = class {
|
|
32166
32166
|
}
|
32167
32167
|
checkImportParams(algorithm) {
|
32168
32168
|
}
|
32169
|
-
checkKeyFormat(
|
32170
|
-
switch (
|
32169
|
+
checkKeyFormat(format2) {
|
32170
|
+
switch (format2) {
|
32171
32171
|
case "raw":
|
32172
32172
|
case "pkcs8":
|
32173
32173
|
case "spki":
|
@@ -32177,11 +32177,11 @@ var ProviderCrypto = class {
|
|
32177
32177
|
throw new TypeError("format: Is invalid value. Must be 'jwk', 'raw', 'spki', or 'pkcs8'");
|
32178
32178
|
}
|
32179
32179
|
}
|
32180
|
-
checkKeyData(
|
32180
|
+
checkKeyData(format2, keyData) {
|
32181
32181
|
if (!keyData) {
|
32182
32182
|
throw new TypeError("keyData: Cannot be empty on empty on key importing");
|
32183
32183
|
}
|
32184
|
-
if (
|
32184
|
+
if (format2 === "jwk") {
|
32185
32185
|
if (!isJWK(keyData)) {
|
32186
32186
|
throw new TypeError("keyData: Is not JsonWebToken");
|
32187
32187
|
}
|
@@ -33108,8 +33108,8 @@ var Pbkdf2Provider = class extends ProviderCrypto {
|
|
33108
33108
|
throw new TypeError("iterations: Is less than 1");
|
33109
33109
|
}
|
33110
33110
|
}
|
33111
|
-
checkImportKey(
|
33112
|
-
super.checkImportKey(
|
33111
|
+
checkImportKey(format2, keyData, algorithm, extractable, keyUsages, ...args) {
|
33112
|
+
super.checkImportKey(format2, keyData, algorithm, extractable, keyUsages);
|
33113
33113
|
if (extractable) {
|
33114
33114
|
throw new SyntaxError("extractable: Must be 'false'");
|
33115
33115
|
}
|
@@ -33135,8 +33135,8 @@ var HkdfProvider = class extends ProviderCrypto {
|
|
33135
33135
|
throw new TypeError("salt: Is not of type '(ArrayBuffer or ArrayBufferView)'");
|
33136
33136
|
}
|
33137
33137
|
}
|
33138
|
-
checkImportKey(
|
33139
|
-
super.checkImportKey(
|
33138
|
+
checkImportKey(format2, keyData, algorithm, extractable, keyUsages, ...args) {
|
33139
|
+
super.checkImportKey(format2, keyData, algorithm, extractable, keyUsages);
|
33140
33140
|
if (extractable) {
|
33141
33141
|
throw new SyntaxError("extractable: Must be 'false'");
|
33142
33142
|
}
|
@@ -33335,34 +33335,34 @@ var SubtleCrypto = class {
|
|
33335
33335
|
exportKey(...args) {
|
33336
33336
|
return __async(this, null, function* () {
|
33337
33337
|
this.checkRequiredArguments(args, 2, "exportKey");
|
33338
|
-
const [
|
33338
|
+
const [format2, key2, ...params] = args;
|
33339
33339
|
this.checkCryptoKey(key2);
|
33340
33340
|
const provider = this.getProvider(key2.algorithm.name);
|
33341
|
-
const result = yield provider.exportKey(
|
33341
|
+
const result = yield provider.exportKey(format2, key2, ...params);
|
33342
33342
|
return result;
|
33343
33343
|
});
|
33344
33344
|
}
|
33345
33345
|
importKey(...args) {
|
33346
33346
|
return __async(this, null, function* () {
|
33347
33347
|
this.checkRequiredArguments(args, 5, "importKey");
|
33348
|
-
const [
|
33348
|
+
const [format2, keyData, algorithm, extractable, keyUsages, ...params] = args;
|
33349
33349
|
const preparedAlgorithm = this.prepareAlgorithm(algorithm);
|
33350
33350
|
const provider = this.getProvider(preparedAlgorithm.name);
|
33351
|
-
if (["pkcs8", "spki", "raw"].indexOf(
|
33351
|
+
if (["pkcs8", "spki", "raw"].indexOf(format2) !== -1) {
|
33352
33352
|
const preparedData = import_pvtsutils4.BufferSourceConverter.toArrayBuffer(keyData);
|
33353
|
-
return provider.importKey(
|
33353
|
+
return provider.importKey(format2, preparedData, __spreadProps(__spreadValues({}, preparedAlgorithm), { name: provider.name }), extractable, keyUsages, ...params);
|
33354
33354
|
} else {
|
33355
33355
|
if (!keyData.kty) {
|
33356
33356
|
throw new TypeError("keyData: Is not JSON");
|
33357
33357
|
}
|
33358
33358
|
}
|
33359
|
-
return provider.importKey(
|
33359
|
+
return provider.importKey(format2, keyData, __spreadProps(__spreadValues({}, preparedAlgorithm), { name: provider.name }), extractable, keyUsages, ...params);
|
33360
33360
|
});
|
33361
33361
|
}
|
33362
|
-
wrapKey(
|
33362
|
+
wrapKey(format2, key2, wrappingKey, wrapAlgorithm, ...args) {
|
33363
33363
|
return __async(this, null, function* () {
|
33364
|
-
let keyData = yield this.exportKey(
|
33365
|
-
if (
|
33364
|
+
let keyData = yield this.exportKey(format2, key2, ...args);
|
33365
|
+
if (format2 === "jwk") {
|
33366
33366
|
const json = JSON.stringify(keyData);
|
33367
33367
|
keyData = import_pvtsutils4.Convert.FromUtf8String(json);
|
33368
33368
|
}
|
@@ -33372,13 +33372,13 @@ var SubtleCrypto = class {
|
|
33372
33372
|
return provider.encrypt(__spreadProps(__spreadValues({}, preparedAlgorithm), { name: provider.name }), wrappingKey, preparedData, { keyUsage: false }, ...args);
|
33373
33373
|
});
|
33374
33374
|
}
|
33375
|
-
unwrapKey(
|
33375
|
+
unwrapKey(format2, wrappedKey, unwrappingKey, unwrapAlgorithm, unwrappedKeyAlgorithm, extractable, keyUsages, ...args) {
|
33376
33376
|
return __async(this, null, function* () {
|
33377
33377
|
const preparedAlgorithm = this.prepareAlgorithm(unwrapAlgorithm);
|
33378
33378
|
const preparedData = import_pvtsutils4.BufferSourceConverter.toArrayBuffer(wrappedKey);
|
33379
33379
|
const provider = this.getProvider(preparedAlgorithm.name);
|
33380
33380
|
let keyData = yield provider.decrypt(__spreadProps(__spreadValues({}, preparedAlgorithm), { name: provider.name }), unwrappingKey, preparedData, { keyUsage: false }, ...args);
|
33381
|
-
if (
|
33381
|
+
if (format2 === "jwk") {
|
33382
33382
|
try {
|
33383
33383
|
keyData = JSON.parse(import_pvtsutils4.Convert.ToUtf8String(keyData));
|
33384
33384
|
} catch (e) {
|
@@ -33387,7 +33387,7 @@ var SubtleCrypto = class {
|
|
33387
33387
|
throw error;
|
33388
33388
|
}
|
33389
33389
|
}
|
33390
|
-
return this.importKey(
|
33390
|
+
return this.importKey(format2, keyData, unwrappedKeyAlgorithm, extractable, keyUsages, ...args);
|
33391
33391
|
});
|
33392
33392
|
}
|
33393
33393
|
checkRequiredArguments(args, size, methodName) {
|
@@ -33521,12 +33521,12 @@ var AesCrypto = class {
|
|
33521
33521
|
return key2;
|
33522
33522
|
});
|
33523
33523
|
}
|
33524
|
-
static exportKey(
|
33524
|
+
static exportKey(format2, key2) {
|
33525
33525
|
return __async(this, null, function* () {
|
33526
33526
|
if (!(key2 instanceof AesCryptoKey)) {
|
33527
33527
|
throw new Error("key: Is not AesCryptoKey");
|
33528
33528
|
}
|
33529
|
-
switch (
|
33529
|
+
switch (format2.toLowerCase()) {
|
33530
33530
|
case "jwk":
|
33531
33531
|
return JsonSerializer.toJSON(key2);
|
33532
33532
|
case "raw":
|
@@ -33536,10 +33536,10 @@ var AesCrypto = class {
|
|
33536
33536
|
}
|
33537
33537
|
});
|
33538
33538
|
}
|
33539
|
-
static importKey(
|
33539
|
+
static importKey(format2, keyData, algorithm, extractable, keyUsages) {
|
33540
33540
|
return __async(this, null, function* () {
|
33541
33541
|
let key2;
|
33542
|
-
switch (
|
33542
|
+
switch (format2.toLowerCase()) {
|
33543
33543
|
case "jwk":
|
33544
33544
|
key2 = JsonParser.fromJSON(keyData, { targetSchema: AesCryptoKey });
|
33545
33545
|
break;
|
@@ -33723,14 +33723,14 @@ var AesCbcProvider2 = class extends AesCbcProvider {
|
|
33723
33723
|
return AesCrypto.decrypt(algorithm, getCryptoKey(key2), new Uint8Array(data));
|
33724
33724
|
});
|
33725
33725
|
}
|
33726
|
-
onExportKey(
|
33726
|
+
onExportKey(format2, key2) {
|
33727
33727
|
return __async(this, null, function* () {
|
33728
|
-
return AesCrypto.exportKey(
|
33728
|
+
return AesCrypto.exportKey(format2, getCryptoKey(key2));
|
33729
33729
|
});
|
33730
33730
|
}
|
33731
|
-
onImportKey(
|
33731
|
+
onImportKey(format2, keyData, algorithm, extractable, keyUsages) {
|
33732
33732
|
return __async(this, null, function* () {
|
33733
|
-
const key2 = yield AesCrypto.importKey(
|
33733
|
+
const key2 = yield AesCrypto.importKey(format2, keyData, { name: algorithm.name }, extractable, keyUsages);
|
33734
33734
|
return setCryptoKey(key2);
|
33735
33735
|
});
|
33736
33736
|
}
|
@@ -33854,14 +33854,14 @@ var AesCmacProvider2 = class extends AesCmacProvider {
|
|
33854
33854
|
return Buffer.from(signature2).compare(Buffer.from(signature22)) === 0;
|
33855
33855
|
});
|
33856
33856
|
}
|
33857
|
-
onExportKey(
|
33857
|
+
onExportKey(format2, key2) {
|
33858
33858
|
return __async(this, null, function* () {
|
33859
|
-
return AesCrypto.exportKey(
|
33859
|
+
return AesCrypto.exportKey(format2, getCryptoKey(key2));
|
33860
33860
|
});
|
33861
33861
|
}
|
33862
|
-
onImportKey(
|
33862
|
+
onImportKey(format2, keyData, algorithm, extractable, keyUsages) {
|
33863
33863
|
return __async(this, null, function* () {
|
33864
|
-
const res = yield AesCrypto.importKey(
|
33864
|
+
const res = yield AesCrypto.importKey(format2, keyData, { name: algorithm.name }, extractable, keyUsages);
|
33865
33865
|
return setCryptoKey(res);
|
33866
33866
|
});
|
33867
33867
|
}
|
@@ -33893,14 +33893,14 @@ var AesCtrProvider2 = class extends AesCtrProvider {
|
|
33893
33893
|
return AesCrypto.decrypt(algorithm, getCryptoKey(key2), new Uint8Array(data));
|
33894
33894
|
});
|
33895
33895
|
}
|
33896
|
-
onExportKey(
|
33896
|
+
onExportKey(format2, key2) {
|
33897
33897
|
return __async(this, null, function* () {
|
33898
|
-
return AesCrypto.exportKey(
|
33898
|
+
return AesCrypto.exportKey(format2, getCryptoKey(key2));
|
33899
33899
|
});
|
33900
33900
|
}
|
33901
|
-
onImportKey(
|
33901
|
+
onImportKey(format2, keyData, algorithm, extractable, keyUsages) {
|
33902
33902
|
return __async(this, null, function* () {
|
33903
|
-
const res = yield AesCrypto.importKey(
|
33903
|
+
const res = yield AesCrypto.importKey(format2, keyData, { name: algorithm.name }, extractable, keyUsages);
|
33904
33904
|
return setCryptoKey(res);
|
33905
33905
|
});
|
33906
33906
|
}
|
@@ -33932,14 +33932,14 @@ var AesGcmProvider2 = class extends AesGcmProvider {
|
|
33932
33932
|
return AesCrypto.decrypt(algorithm, getCryptoKey(key2), new Uint8Array(data));
|
33933
33933
|
});
|
33934
33934
|
}
|
33935
|
-
onExportKey(
|
33935
|
+
onExportKey(format2, key2) {
|
33936
33936
|
return __async(this, null, function* () {
|
33937
|
-
return AesCrypto.exportKey(
|
33937
|
+
return AesCrypto.exportKey(format2, getCryptoKey(key2));
|
33938
33938
|
});
|
33939
33939
|
}
|
33940
|
-
onImportKey(
|
33940
|
+
onImportKey(format2, keyData, algorithm, extractable, keyUsages) {
|
33941
33941
|
return __async(this, null, function* () {
|
33942
|
-
const res = yield AesCrypto.importKey(
|
33942
|
+
const res = yield AesCrypto.importKey(format2, keyData, { name: algorithm.name }, extractable, keyUsages);
|
33943
33943
|
return setCryptoKey(res);
|
33944
33944
|
});
|
33945
33945
|
}
|
@@ -33961,14 +33961,14 @@ var AesKwProvider2 = class extends AesKwProvider {
|
|
33961
33961
|
return setCryptoKey(res);
|
33962
33962
|
});
|
33963
33963
|
}
|
33964
|
-
onExportKey(
|
33964
|
+
onExportKey(format2, key2) {
|
33965
33965
|
return __async(this, null, function* () {
|
33966
|
-
return AesCrypto.exportKey(
|
33966
|
+
return AesCrypto.exportKey(format2, getCryptoKey(key2));
|
33967
33967
|
});
|
33968
33968
|
}
|
33969
|
-
onImportKey(
|
33969
|
+
onImportKey(format2, keyData, algorithm, extractable, keyUsages) {
|
33970
33970
|
return __async(this, null, function* () {
|
33971
|
-
const res = yield AesCrypto.importKey(
|
33971
|
+
const res = yield AesCrypto.importKey(format2, keyData, { name: algorithm.name }, extractable, keyUsages);
|
33972
33972
|
return setCryptoKey(res);
|
33973
33973
|
});
|
33974
33974
|
}
|
@@ -34010,14 +34010,14 @@ var AesEcbProvider2 = class extends AesEcbProvider {
|
|
34010
34010
|
return AesCrypto.decrypt(algorithm, getCryptoKey(key2), new Uint8Array(data));
|
34011
34011
|
});
|
34012
34012
|
}
|
34013
|
-
onExportKey(
|
34013
|
+
onExportKey(format2, key2) {
|
34014
34014
|
return __async(this, null, function* () {
|
34015
|
-
return AesCrypto.exportKey(
|
34015
|
+
return AesCrypto.exportKey(format2, getCryptoKey(key2));
|
34016
34016
|
});
|
34017
34017
|
}
|
34018
|
-
onImportKey(
|
34018
|
+
onImportKey(format2, keyData, algorithm, extractable, keyUsages) {
|
34019
34019
|
return __async(this, null, function* () {
|
34020
|
-
const res = yield AesCrypto.importKey(
|
34020
|
+
const res = yield AesCrypto.importKey(format2, keyData, { name: algorithm.name }, extractable, keyUsages);
|
34021
34021
|
return setCryptoKey(res);
|
34022
34022
|
});
|
34023
34023
|
}
|
@@ -34058,9 +34058,9 @@ var DesCrypto = class {
|
|
34058
34058
|
return key2;
|
34059
34059
|
});
|
34060
34060
|
}
|
34061
|
-
static exportKey(
|
34061
|
+
static exportKey(format2, key2) {
|
34062
34062
|
return __async(this, null, function* () {
|
34063
|
-
switch (
|
34063
|
+
switch (format2.toLowerCase()) {
|
34064
34064
|
case "jwk":
|
34065
34065
|
return JsonSerializer.toJSON(key2);
|
34066
34066
|
case "raw":
|
@@ -34070,10 +34070,10 @@ var DesCrypto = class {
|
|
34070
34070
|
}
|
34071
34071
|
});
|
34072
34072
|
}
|
34073
|
-
static importKey(
|
34073
|
+
static importKey(format2, keyData, algorithm, extractable, keyUsages) {
|
34074
34074
|
return __async(this, null, function* () {
|
34075
34075
|
let key2;
|
34076
|
-
switch (
|
34076
|
+
switch (format2.toLowerCase()) {
|
34077
34077
|
case "jwk":
|
34078
34078
|
key2 = JsonParser.fromJSON(keyData, { targetSchema: DesCryptoKey });
|
34079
34079
|
break;
|
@@ -34179,14 +34179,14 @@ var DesCbcProvider = class extends DesProvider {
|
|
34179
34179
|
return DesCrypto.decrypt(algorithm, getCryptoKey(key2), new Uint8Array(data));
|
34180
34180
|
});
|
34181
34181
|
}
|
34182
|
-
onExportKey(
|
34182
|
+
onExportKey(format2, key2) {
|
34183
34183
|
return __async(this, null, function* () {
|
34184
|
-
return DesCrypto.exportKey(
|
34184
|
+
return DesCrypto.exportKey(format2, getCryptoKey(key2));
|
34185
34185
|
});
|
34186
34186
|
}
|
34187
|
-
onImportKey(
|
34187
|
+
onImportKey(format2, keyData, algorithm, extractable, keyUsages) {
|
34188
34188
|
return __async(this, null, function* () {
|
34189
|
-
const key2 = yield DesCrypto.importKey(
|
34189
|
+
const key2 = yield DesCrypto.importKey(format2, keyData, { name: this.name, length: this.keySizeBits }, extractable, keyUsages);
|
34190
34190
|
if (key2.data.length !== this.keySizeBits >> 3) {
|
34191
34191
|
throw new OperationError("keyData: Wrong key size");
|
34192
34192
|
}
|
@@ -34227,14 +34227,14 @@ var DesEde3CbcProvider = class extends DesProvider {
|
|
34227
34227
|
return DesCrypto.decrypt(algorithm, getCryptoKey(key2), new Uint8Array(data));
|
34228
34228
|
});
|
34229
34229
|
}
|
34230
|
-
onExportKey(
|
34230
|
+
onExportKey(format2, key2) {
|
34231
34231
|
return __async(this, null, function* () {
|
34232
|
-
return DesCrypto.exportKey(
|
34232
|
+
return DesCrypto.exportKey(format2, getCryptoKey(key2));
|
34233
34233
|
});
|
34234
34234
|
}
|
34235
|
-
onImportKey(
|
34235
|
+
onImportKey(format2, keyData, algorithm, extractable, keyUsages) {
|
34236
34236
|
return __async(this, null, function* () {
|
34237
|
-
const key2 = yield DesCrypto.importKey(
|
34237
|
+
const key2 = yield DesCrypto.importKey(format2, keyData, { name: this.name, length: this.keySizeBits }, extractable, keyUsages);
|
34238
34238
|
if (key2.data.length !== this.keySizeBits >> 3) {
|
34239
34239
|
throw new OperationError("keyData: Wrong key size");
|
34240
34240
|
}
|
@@ -34360,9 +34360,9 @@ var RsaCrypto = class {
|
|
34360
34360
|
return res;
|
34361
34361
|
});
|
34362
34362
|
}
|
34363
|
-
static exportKey(
|
34363
|
+
static exportKey(format2, key2) {
|
34364
34364
|
return __async(this, null, function* () {
|
34365
|
-
switch (
|
34365
|
+
switch (format2.toLowerCase()) {
|
34366
34366
|
case "jwk":
|
34367
34367
|
return JsonSerializer.toJSON(key2);
|
34368
34368
|
case "pkcs8":
|
@@ -34373,9 +34373,9 @@ var RsaCrypto = class {
|
|
34373
34373
|
}
|
34374
34374
|
});
|
34375
34375
|
}
|
34376
|
-
static importKey(
|
34376
|
+
static importKey(format2, keyData, algorithm, extractable, keyUsages) {
|
34377
34377
|
return __async(this, null, function* () {
|
34378
|
-
switch (
|
34378
|
+
switch (format2.toLowerCase()) {
|
34379
34379
|
case "jwk": {
|
34380
34380
|
const jwk = keyData;
|
34381
34381
|
if (jwk.d) {
|
@@ -34591,14 +34591,14 @@ var RsaSsaProvider2 = class extends RsaSsaProvider {
|
|
34591
34591
|
return RsaCrypto.verify(algorithm, getCryptoKey(key2), new Uint8Array(signature2), new Uint8Array(data));
|
34592
34592
|
});
|
34593
34593
|
}
|
34594
|
-
onExportKey(
|
34594
|
+
onExportKey(format2, key2) {
|
34595
34595
|
return __async(this, null, function* () {
|
34596
|
-
return RsaCrypto.exportKey(
|
34596
|
+
return RsaCrypto.exportKey(format2, getCryptoKey(key2));
|
34597
34597
|
});
|
34598
34598
|
}
|
34599
|
-
onImportKey(
|
34599
|
+
onImportKey(format2, keyData, algorithm, extractable, keyUsages) {
|
34600
34600
|
return __async(this, null, function* () {
|
34601
|
-
const key2 = yield RsaCrypto.importKey(
|
34601
|
+
const key2 = yield RsaCrypto.importKey(format2, keyData, __spreadProps(__spreadValues({}, algorithm), { name: this.name }), extractable, keyUsages);
|
34602
34602
|
return setCryptoKey(key2);
|
34603
34603
|
});
|
34604
34604
|
}
|
@@ -34647,14 +34647,14 @@ var RsaPssProvider2 = class extends RsaPssProvider {
|
|
34647
34647
|
return RsaCrypto.verify(algorithm, getCryptoKey(key2), new Uint8Array(signature2), new Uint8Array(data));
|
34648
34648
|
});
|
34649
34649
|
}
|
34650
|
-
onExportKey(
|
34650
|
+
onExportKey(format2, key2) {
|
34651
34651
|
return __async(this, null, function* () {
|
34652
|
-
return RsaCrypto.exportKey(
|
34652
|
+
return RsaCrypto.exportKey(format2, getCryptoKey(key2));
|
34653
34653
|
});
|
34654
34654
|
}
|
34655
|
-
onImportKey(
|
34655
|
+
onImportKey(format2, keyData, algorithm, extractable, keyUsages) {
|
34656
34656
|
return __async(this, null, function* () {
|
34657
|
-
const key2 = yield RsaCrypto.importKey(
|
34657
|
+
const key2 = yield RsaCrypto.importKey(format2, keyData, __spreadProps(__spreadValues({}, algorithm), { name: this.name }), extractable, keyUsages);
|
34658
34658
|
return setCryptoKey(key2);
|
34659
34659
|
});
|
34660
34660
|
}
|
@@ -34818,14 +34818,14 @@ ${internalKey.data.toString("base64")}
|
|
34818
34818
|
return new Uint8Array(pkcs0).buffer;
|
34819
34819
|
});
|
34820
34820
|
}
|
34821
|
-
onExportKey(
|
34821
|
+
onExportKey(format2, key2) {
|
34822
34822
|
return __async(this, null, function* () {
|
34823
|
-
return RsaCrypto.exportKey(
|
34823
|
+
return RsaCrypto.exportKey(format2, getCryptoKey(key2));
|
34824
34824
|
});
|
34825
34825
|
}
|
34826
|
-
onImportKey(
|
34826
|
+
onImportKey(format2, keyData, algorithm, extractable, keyUsages) {
|
34827
34827
|
return __async(this, null, function* () {
|
34828
|
-
const key2 = yield RsaCrypto.importKey(
|
34828
|
+
const key2 = yield RsaCrypto.importKey(format2, keyData, __spreadProps(__spreadValues({}, algorithm), { name: this.name }), extractable, keyUsages);
|
34829
34829
|
return setCryptoKey(key2);
|
34830
34830
|
});
|
34831
34831
|
}
|
@@ -34910,14 +34910,14 @@ var RsaEsProvider = class extends ProviderCrypto {
|
|
34910
34910
|
return new Uint8Array(dec).buffer;
|
34911
34911
|
});
|
34912
34912
|
}
|
34913
|
-
onExportKey(
|
34913
|
+
onExportKey(format2, key2) {
|
34914
34914
|
return __async(this, null, function* () {
|
34915
|
-
return RsaCrypto.exportKey(
|
34915
|
+
return RsaCrypto.exportKey(format2, getCryptoKey(key2));
|
34916
34916
|
});
|
34917
34917
|
}
|
34918
|
-
onImportKey(
|
34918
|
+
onImportKey(format2, keyData, algorithm, extractable, keyUsages) {
|
34919
34919
|
return __async(this, null, function* () {
|
34920
|
-
const key2 = yield RsaCrypto.importKey(
|
34920
|
+
const key2 = yield RsaCrypto.importKey(format2, keyData, __spreadProps(__spreadValues({}, algorithm), { name: this.name }), extractable, keyUsages);
|
34921
34921
|
return setCryptoKey(key2);
|
34922
34922
|
});
|
34923
34923
|
}
|
@@ -35227,9 +35227,9 @@ ${key2.data.toString("base64")}
|
|
35227
35227
|
return new Uint8Array(bits).buffer.slice(0, length2 >> 3);
|
35228
35228
|
});
|
35229
35229
|
}
|
35230
|
-
static exportKey(
|
35230
|
+
static exportKey(format2, key2) {
|
35231
35231
|
return __async(this, null, function* () {
|
35232
|
-
switch (
|
35232
|
+
switch (format2.toLowerCase()) {
|
35233
35233
|
case "jwk":
|
35234
35234
|
return JsonSerializer.toJSON(key2);
|
35235
35235
|
case "pkcs8":
|
@@ -35244,9 +35244,9 @@ ${key2.data.toString("base64")}
|
|
35244
35244
|
}
|
35245
35245
|
});
|
35246
35246
|
}
|
35247
|
-
static importKey(
|
35247
|
+
static importKey(format2, keyData, algorithm, extractable, keyUsages) {
|
35248
35248
|
return __async(this, null, function* () {
|
35249
|
-
switch (
|
35249
|
+
switch (format2.toLowerCase()) {
|
35250
35250
|
case "jwk": {
|
35251
35251
|
const jwk = keyData;
|
35252
35252
|
if (jwk.d) {
|
@@ -35376,14 +35376,14 @@ var EcdsaProvider2 = class extends EcdsaProvider {
|
|
35376
35376
|
return EcCrypto.verify(algorithm, getCryptoKey(key2), new Uint8Array(signature2), new Uint8Array(data));
|
35377
35377
|
});
|
35378
35378
|
}
|
35379
|
-
onExportKey(
|
35379
|
+
onExportKey(format2, key2) {
|
35380
35380
|
return __async(this, null, function* () {
|
35381
|
-
return EcCrypto.exportKey(
|
35381
|
+
return EcCrypto.exportKey(format2, getCryptoKey(key2));
|
35382
35382
|
});
|
35383
35383
|
}
|
35384
|
-
onImportKey(
|
35384
|
+
onImportKey(format2, keyData, algorithm, extractable, keyUsages) {
|
35385
35385
|
return __async(this, null, function* () {
|
35386
|
-
const key2 = yield EcCrypto.importKey(
|
35386
|
+
const key2 = yield EcCrypto.importKey(format2, keyData, __spreadProps(__spreadValues({}, algorithm), { name: this.name }), extractable, keyUsages);
|
35387
35387
|
return setCryptoKey(key2);
|
35388
35388
|
});
|
35389
35389
|
}
|
@@ -35412,14 +35412,14 @@ var EcdhProvider2 = class extends EcdhProvider {
|
|
35412
35412
|
};
|
35413
35413
|
});
|
35414
35414
|
}
|
35415
|
-
onExportKey(
|
35415
|
+
onExportKey(format2, key2) {
|
35416
35416
|
return __async(this, null, function* () {
|
35417
|
-
return EcCrypto.exportKey(
|
35417
|
+
return EcCrypto.exportKey(format2, getCryptoKey(key2));
|
35418
35418
|
});
|
35419
35419
|
}
|
35420
|
-
onImportKey(
|
35420
|
+
onImportKey(format2, keyData, algorithm, extractable, keyUsages) {
|
35421
35421
|
return __async(this, null, function* () {
|
35422
|
-
const key2 = yield EcCrypto.importKey(
|
35422
|
+
const key2 = yield EcCrypto.importKey(format2, keyData, __spreadProps(__spreadValues({}, algorithm), { name: this.name }), extractable, keyUsages);
|
35423
35423
|
return setCryptoKey(key2);
|
35424
35424
|
});
|
35425
35425
|
}
|
@@ -35602,9 +35602,9 @@ ${key2.data.toString("base64")}
|
|
35602
35602
|
return new Uint8Array(bits).buffer.slice(0, length2 >> 3);
|
35603
35603
|
});
|
35604
35604
|
}
|
35605
|
-
static exportKey(
|
35605
|
+
static exportKey(format2, key2) {
|
35606
35606
|
return __async(this, null, function* () {
|
35607
|
-
switch (
|
35607
|
+
switch (format2.toLowerCase()) {
|
35608
35608
|
case "jwk":
|
35609
35609
|
return JsonSerializer.toJSON(key2);
|
35610
35610
|
case "pkcs8":
|
@@ -35619,9 +35619,9 @@ ${key2.data.toString("base64")}
|
|
35619
35619
|
}
|
35620
35620
|
});
|
35621
35621
|
}
|
35622
|
-
static importKey(
|
35622
|
+
static importKey(format2, keyData, algorithm, extractable, keyUsages) {
|
35623
35623
|
return __async(this, null, function* () {
|
35624
|
-
switch (
|
35624
|
+
switch (format2.toLowerCase()) {
|
35625
35625
|
case "jwk": {
|
35626
35626
|
const jwk = keyData;
|
35627
35627
|
if (jwk.d) {
|
@@ -35702,14 +35702,14 @@ var EdDsaProvider2 = class extends EdDsaProvider {
|
|
35702
35702
|
return EdCrypto.verify(algorithm, getCryptoKey(key2), new Uint8Array(signature2), new Uint8Array(data));
|
35703
35703
|
});
|
35704
35704
|
}
|
35705
|
-
onExportKey(
|
35705
|
+
onExportKey(format2, key2) {
|
35706
35706
|
return __async(this, null, function* () {
|
35707
|
-
return EdCrypto.exportKey(
|
35707
|
+
return EdCrypto.exportKey(format2, getCryptoKey(key2));
|
35708
35708
|
});
|
35709
35709
|
}
|
35710
|
-
onImportKey(
|
35710
|
+
onImportKey(format2, keyData, algorithm, extractable, keyUsages) {
|
35711
35711
|
return __async(this, null, function* () {
|
35712
|
-
const key2 = yield EdCrypto.importKey(
|
35712
|
+
const key2 = yield EdCrypto.importKey(format2, keyData, __spreadProps(__spreadValues({}, algorithm), { name: this.name }), extractable, keyUsages);
|
35713
35713
|
return setCryptoKey(key2);
|
35714
35714
|
});
|
35715
35715
|
}
|
@@ -35734,14 +35734,14 @@ var EcdhEsProvider2 = class extends EcdhEsProvider {
|
|
35734
35734
|
return bits;
|
35735
35735
|
});
|
35736
35736
|
}
|
35737
|
-
onExportKey(
|
35737
|
+
onExportKey(format2, key2) {
|
35738
35738
|
return __async(this, null, function* () {
|
35739
|
-
return EdCrypto.exportKey(
|
35739
|
+
return EdCrypto.exportKey(format2, getCryptoKey(key2));
|
35740
35740
|
});
|
35741
35741
|
}
|
35742
|
-
onImportKey(
|
35742
|
+
onImportKey(format2, keyData, algorithm, extractable, keyUsages) {
|
35743
35743
|
return __async(this, null, function* () {
|
35744
|
-
const key2 = yield EdCrypto.importKey(
|
35744
|
+
const key2 = yield EdCrypto.importKey(format2, keyData, __spreadProps(__spreadValues({}, algorithm), { name: this.name }), extractable, keyUsages);
|
35745
35745
|
return setCryptoKey(key2);
|
35746
35746
|
});
|
35747
35747
|
}
|
@@ -35766,9 +35766,9 @@ var Pbkdf2Provider2 = class extends Pbkdf2Provider {
|
|
35766
35766
|
});
|
35767
35767
|
});
|
35768
35768
|
}
|
35769
|
-
onImportKey(
|
35769
|
+
onImportKey(format2, keyData, algorithm, extractable, keyUsages) {
|
35770
35770
|
return __async(this, null, function* () {
|
35771
|
-
if (
|
35771
|
+
if (format2 === "raw") {
|
35772
35772
|
const key2 = new PbkdfCryptoKey();
|
35773
35773
|
key2.data = Buffer.from(keyData);
|
35774
35774
|
key2.algorithm = { name: this.name };
|
@@ -35828,10 +35828,10 @@ var HmacProvider2 = class extends HmacProvider {
|
|
35828
35828
|
return hmac2.compare(Buffer.from(signature2)) === 0;
|
35829
35829
|
});
|
35830
35830
|
}
|
35831
|
-
onImportKey(
|
35831
|
+
onImportKey(format2, keyData, algorithm, extractable, keyUsages) {
|
35832
35832
|
return __async(this, null, function* () {
|
35833
35833
|
let key2;
|
35834
|
-
switch (
|
35834
|
+
switch (format2.toLowerCase()) {
|
35835
35835
|
case "jwk":
|
35836
35836
|
key2 = JsonParser.fromJSON(keyData, { targetSchema: HmacCryptoKey });
|
35837
35837
|
break;
|
@@ -35852,9 +35852,9 @@ var HmacProvider2 = class extends HmacProvider {
|
|
35852
35852
|
return setCryptoKey(key2);
|
35853
35853
|
});
|
35854
35854
|
}
|
35855
|
-
onExportKey(
|
35855
|
+
onExportKey(format2, key2) {
|
35856
35856
|
return __async(this, null, function* () {
|
35857
|
-
switch (
|
35857
|
+
switch (format2.toLowerCase()) {
|
35858
35858
|
case "jwk":
|
35859
35859
|
return JsonSerializer.toJSON(getCryptoKey(key2));
|
35860
35860
|
case "raw":
|
@@ -35876,9 +35876,9 @@ var HkdfCryptoKey = class extends CryptoKey2 {
|
|
35876
35876
|
};
|
35877
35877
|
__name(HkdfCryptoKey, "HkdfCryptoKey");
|
35878
35878
|
var HkdfProvider2 = class extends HkdfProvider {
|
35879
|
-
onImportKey(
|
35879
|
+
onImportKey(format2, keyData, algorithm, extractable, keyUsages) {
|
35880
35880
|
return __async(this, null, function* () {
|
35881
|
-
if (
|
35881
|
+
if (format2.toLowerCase() !== "raw") {
|
35882
35882
|
throw new OperationError("Operation not supported");
|
35883
35883
|
}
|
35884
35884
|
const key2 = new HkdfCryptoKey();
|
@@ -39534,7 +39534,7 @@ var ChainId = /* @__PURE__ */ function() {
|
|
39534
39534
|
}
|
39535
39535
|
return new ChainId2(getParams(id, this.spec)).toJSON();
|
39536
39536
|
}, "parse");
|
39537
|
-
ChainId2.format = /* @__PURE__ */ __name(function
|
39537
|
+
ChainId2.format = /* @__PURE__ */ __name(function format2(params) {
|
39538
39538
|
return joinParams(params, this.spec);
|
39539
39539
|
}, "format");
|
39540
39540
|
var _proto = ChainId2.prototype;
|
@@ -39573,7 +39573,7 @@ var AccountId = /* @__PURE__ */ function() {
|
|
39573
39573
|
address
|
39574
39574
|
}).toJSON();
|
39575
39575
|
}, "parse");
|
39576
|
-
AccountId2.format = /* @__PURE__ */ __name(function
|
39576
|
+
AccountId2.format = /* @__PURE__ */ __name(function format2(params) {
|
39577
39577
|
var chainId = new ChainId(params.chainId);
|
39578
39578
|
var splitParams2 = _extends({}, chainId.toJSON(), {
|
39579
39579
|
address: params.address
|
@@ -39608,7 +39608,7 @@ var AssetName = /* @__PURE__ */ function() {
|
|
39608
39608
|
}
|
39609
39609
|
return new AssetName2(getParams(id, this.spec)).toJSON();
|
39610
39610
|
}, "parse");
|
39611
|
-
AssetName2.format = /* @__PURE__ */ __name(function
|
39611
|
+
AssetName2.format = /* @__PURE__ */ __name(function format2(params) {
|
39612
39612
|
return joinParams(params, this.spec);
|
39613
39613
|
}, "format");
|
39614
39614
|
var _proto = AssetName2.prototype;
|
@@ -39639,7 +39639,7 @@ var AssetType = /* @__PURE__ */ function() {
|
|
39639
39639
|
}
|
39640
39640
|
return new AssetType2(getParams(id, this.spec)).toJSON();
|
39641
39641
|
}, "parse");
|
39642
|
-
AssetType2.format = /* @__PURE__ */ __name(function
|
39642
|
+
AssetType2.format = /* @__PURE__ */ __name(function format2(params) {
|
39643
39643
|
return joinParams(params, this.spec);
|
39644
39644
|
}, "format");
|
39645
39645
|
var _proto = AssetType2.prototype;
|
@@ -39671,7 +39671,7 @@ var AssetId = /* @__PURE__ */ function() {
|
|
39671
39671
|
}
|
39672
39672
|
return new AssetId2(getParams(id, this.spec)).toJSON();
|
39673
39673
|
}, "parse");
|
39674
|
-
AssetId2.format = /* @__PURE__ */ __name(function
|
39674
|
+
AssetId2.format = /* @__PURE__ */ __name(function format2(params) {
|
39675
39675
|
return joinParams(params, this.spec);
|
39676
39676
|
}, "format");
|
39677
39677
|
var _proto = AssetId2.prototype;
|
@@ -48439,7 +48439,7 @@ var getDidKeyPlugin = /* @__PURE__ */ __name((key2) => __async(void 0, null, fun
|
|
48439
48439
|
pluginMethods: {
|
48440
48440
|
getSubjectDid: () => did,
|
48441
48441
|
getSubjectKeypair: () => keypair,
|
48442
|
-
getKey: () => key2
|
48442
|
+
getKey: () => key2.padStart(64, "0")
|
48443
48443
|
}
|
48444
48444
|
};
|
48445
48445
|
}), "getDidKeyPlugin");
|
@@ -48449,11 +48449,10 @@ var ExpirationPlugin = /* @__PURE__ */ __name((wallet) => ({
|
|
48449
48449
|
pluginMethods: {
|
48450
48450
|
verifyCredential: (_wallet, credential) => __async(void 0, null, function* () {
|
48451
48451
|
const verificationCheck = yield wallet.pluginMethods.verifyCredential(credential);
|
48452
|
-
if (credential.expirationDate) {
|
48452
|
+
if (credential.expirationDate && new Date() > new Date(credential.expirationDate)) {
|
48453
|
+
verificationCheck.errors.push("expiration error: Credential is expired");
|
48454
|
+
} else {
|
48453
48455
|
verificationCheck.checks.push("expiration");
|
48454
|
-
if (new Date() > new Date(credential.expirationDate)) {
|
48455
|
-
verificationCheck.errors.push("expiration error: Credential is expired");
|
48456
|
-
}
|
48457
48456
|
}
|
48458
48457
|
return verificationCheck;
|
48459
48458
|
})
|
@@ -48541,7 +48540,1581 @@ var VerificationStatus = /* @__PURE__ */ ((VerificationStatus2) => {
|
|
48541
48540
|
return VerificationStatus2;
|
48542
48541
|
})(VerificationStatus || {});
|
48543
48542
|
|
48543
|
+
// ../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/toInteger/index.js
|
48544
|
+
function toInteger(dirtyNumber) {
|
48545
|
+
if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {
|
48546
|
+
return NaN;
|
48547
|
+
}
|
48548
|
+
var number = Number(dirtyNumber);
|
48549
|
+
if (isNaN(number)) {
|
48550
|
+
return number;
|
48551
|
+
}
|
48552
|
+
return number < 0 ? Math.ceil(number) : Math.floor(number);
|
48553
|
+
}
|
48554
|
+
__name(toInteger, "toInteger");
|
48555
|
+
|
48556
|
+
// ../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/requiredArgs/index.js
|
48557
|
+
function requiredArgs(required, args) {
|
48558
|
+
if (args.length < required) {
|
48559
|
+
throw new TypeError(required + " argument" + (required > 1 ? "s" : "") + " required, but only " + args.length + " present");
|
48560
|
+
}
|
48561
|
+
}
|
48562
|
+
__name(requiredArgs, "requiredArgs");
|
48563
|
+
|
48564
|
+
// ../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/toDate/index.js
|
48565
|
+
function toDate(argument) {
|
48566
|
+
requiredArgs(1, arguments);
|
48567
|
+
var argStr = Object.prototype.toString.call(argument);
|
48568
|
+
if (argument instanceof Date || typeof argument === "object" && argStr === "[object Date]") {
|
48569
|
+
return new Date(argument.getTime());
|
48570
|
+
} else if (typeof argument === "number" || argStr === "[object Number]") {
|
48571
|
+
return new Date(argument);
|
48572
|
+
} else {
|
48573
|
+
if ((typeof argument === "string" || argStr === "[object String]") && typeof console !== "undefined") {
|
48574
|
+
console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule");
|
48575
|
+
console.warn(new Error().stack);
|
48576
|
+
}
|
48577
|
+
return new Date(NaN);
|
48578
|
+
}
|
48579
|
+
}
|
48580
|
+
__name(toDate, "toDate");
|
48581
|
+
|
48582
|
+
// ../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/addMilliseconds/index.js
|
48583
|
+
function addMilliseconds(dirtyDate, dirtyAmount) {
|
48584
|
+
requiredArgs(2, arguments);
|
48585
|
+
var timestamp = toDate(dirtyDate).getTime();
|
48586
|
+
var amount = toInteger(dirtyAmount);
|
48587
|
+
return new Date(timestamp + amount);
|
48588
|
+
}
|
48589
|
+
__name(addMilliseconds, "addMilliseconds");
|
48590
|
+
|
48591
|
+
// ../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/getTimezoneOffsetInMilliseconds/index.js
|
48592
|
+
function getTimezoneOffsetInMilliseconds(date) {
|
48593
|
+
var utcDate = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));
|
48594
|
+
utcDate.setUTCFullYear(date.getFullYear());
|
48595
|
+
return date.getTime() - utcDate.getTime();
|
48596
|
+
}
|
48597
|
+
__name(getTimezoneOffsetInMilliseconds, "getTimezoneOffsetInMilliseconds");
|
48598
|
+
|
48599
|
+
// ../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/isDate/index.js
|
48600
|
+
function isDate(value) {
|
48601
|
+
requiredArgs(1, arguments);
|
48602
|
+
return value instanceof Date || typeof value === "object" && Object.prototype.toString.call(value) === "[object Date]";
|
48603
|
+
}
|
48604
|
+
__name(isDate, "isDate");
|
48605
|
+
|
48606
|
+
// ../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/isValid/index.js
|
48607
|
+
function isValid(dirtyDate) {
|
48608
|
+
requiredArgs(1, arguments);
|
48609
|
+
if (!isDate(dirtyDate) && typeof dirtyDate !== "number") {
|
48610
|
+
return false;
|
48611
|
+
}
|
48612
|
+
var date = toDate(dirtyDate);
|
48613
|
+
return !isNaN(Number(date));
|
48614
|
+
}
|
48615
|
+
__name(isValid, "isValid");
|
48616
|
+
|
48617
|
+
// ../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/en-US/_lib/formatDistance/index.js
|
48618
|
+
var formatDistanceLocale = {
|
48619
|
+
lessThanXSeconds: {
|
48620
|
+
one: "less than a second",
|
48621
|
+
other: "less than {{count}} seconds"
|
48622
|
+
},
|
48623
|
+
xSeconds: {
|
48624
|
+
one: "1 second",
|
48625
|
+
other: "{{count}} seconds"
|
48626
|
+
},
|
48627
|
+
halfAMinute: "half a minute",
|
48628
|
+
lessThanXMinutes: {
|
48629
|
+
one: "less than a minute",
|
48630
|
+
other: "less than {{count}} minutes"
|
48631
|
+
},
|
48632
|
+
xMinutes: {
|
48633
|
+
one: "1 minute",
|
48634
|
+
other: "{{count}} minutes"
|
48635
|
+
},
|
48636
|
+
aboutXHours: {
|
48637
|
+
one: "about 1 hour",
|
48638
|
+
other: "about {{count}} hours"
|
48639
|
+
},
|
48640
|
+
xHours: {
|
48641
|
+
one: "1 hour",
|
48642
|
+
other: "{{count}} hours"
|
48643
|
+
},
|
48644
|
+
xDays: {
|
48645
|
+
one: "1 day",
|
48646
|
+
other: "{{count}} days"
|
48647
|
+
},
|
48648
|
+
aboutXWeeks: {
|
48649
|
+
one: "about 1 week",
|
48650
|
+
other: "about {{count}} weeks"
|
48651
|
+
},
|
48652
|
+
xWeeks: {
|
48653
|
+
one: "1 week",
|
48654
|
+
other: "{{count}} weeks"
|
48655
|
+
},
|
48656
|
+
aboutXMonths: {
|
48657
|
+
one: "about 1 month",
|
48658
|
+
other: "about {{count}} months"
|
48659
|
+
},
|
48660
|
+
xMonths: {
|
48661
|
+
one: "1 month",
|
48662
|
+
other: "{{count}} months"
|
48663
|
+
},
|
48664
|
+
aboutXYears: {
|
48665
|
+
one: "about 1 year",
|
48666
|
+
other: "about {{count}} years"
|
48667
|
+
},
|
48668
|
+
xYears: {
|
48669
|
+
one: "1 year",
|
48670
|
+
other: "{{count}} years"
|
48671
|
+
},
|
48672
|
+
overXYears: {
|
48673
|
+
one: "over 1 year",
|
48674
|
+
other: "over {{count}} years"
|
48675
|
+
},
|
48676
|
+
almostXYears: {
|
48677
|
+
one: "almost 1 year",
|
48678
|
+
other: "almost {{count}} years"
|
48679
|
+
}
|
48680
|
+
};
|
48681
|
+
var formatDistance = /* @__PURE__ */ __name(function(token, count, options) {
|
48682
|
+
var result;
|
48683
|
+
var tokenValue = formatDistanceLocale[token];
|
48684
|
+
if (typeof tokenValue === "string") {
|
48685
|
+
result = tokenValue;
|
48686
|
+
} else if (count === 1) {
|
48687
|
+
result = tokenValue.one;
|
48688
|
+
} else {
|
48689
|
+
result = tokenValue.other.replace("{{count}}", count.toString());
|
48690
|
+
}
|
48691
|
+
if (options !== null && options !== void 0 && options.addSuffix) {
|
48692
|
+
if (options.comparison && options.comparison > 0) {
|
48693
|
+
return "in " + result;
|
48694
|
+
} else {
|
48695
|
+
return result + " ago";
|
48696
|
+
}
|
48697
|
+
}
|
48698
|
+
return result;
|
48699
|
+
}, "formatDistance");
|
48700
|
+
var formatDistance_default = formatDistance;
|
48701
|
+
|
48702
|
+
// ../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/_lib/buildFormatLongFn/index.js
|
48703
|
+
function buildFormatLongFn(args) {
|
48704
|
+
return function() {
|
48705
|
+
var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
48706
|
+
var width = options.width ? String(options.width) : args.defaultWidth;
|
48707
|
+
var format2 = args.formats[width] || args.formats[args.defaultWidth];
|
48708
|
+
return format2;
|
48709
|
+
};
|
48710
|
+
}
|
48711
|
+
__name(buildFormatLongFn, "buildFormatLongFn");
|
48712
|
+
|
48713
|
+
// ../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/en-US/_lib/formatLong/index.js
|
48714
|
+
var dateFormats = {
|
48715
|
+
full: "EEEE, MMMM do, y",
|
48716
|
+
long: "MMMM do, y",
|
48717
|
+
medium: "MMM d, y",
|
48718
|
+
short: "MM/dd/yyyy"
|
48719
|
+
};
|
48720
|
+
var timeFormats = {
|
48721
|
+
full: "h:mm:ss a zzzz",
|
48722
|
+
long: "h:mm:ss a z",
|
48723
|
+
medium: "h:mm:ss a",
|
48724
|
+
short: "h:mm a"
|
48725
|
+
};
|
48726
|
+
var dateTimeFormats = {
|
48727
|
+
full: "{{date}} 'at' {{time}}",
|
48728
|
+
long: "{{date}} 'at' {{time}}",
|
48729
|
+
medium: "{{date}}, {{time}}",
|
48730
|
+
short: "{{date}}, {{time}}"
|
48731
|
+
};
|
48732
|
+
var formatLong = {
|
48733
|
+
date: buildFormatLongFn({
|
48734
|
+
formats: dateFormats,
|
48735
|
+
defaultWidth: "full"
|
48736
|
+
}),
|
48737
|
+
time: buildFormatLongFn({
|
48738
|
+
formats: timeFormats,
|
48739
|
+
defaultWidth: "full"
|
48740
|
+
}),
|
48741
|
+
dateTime: buildFormatLongFn({
|
48742
|
+
formats: dateTimeFormats,
|
48743
|
+
defaultWidth: "full"
|
48744
|
+
})
|
48745
|
+
};
|
48746
|
+
var formatLong_default = formatLong;
|
48747
|
+
|
48748
|
+
// ../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/en-US/_lib/formatRelative/index.js
|
48749
|
+
var formatRelativeLocale = {
|
48750
|
+
lastWeek: "'last' eeee 'at' p",
|
48751
|
+
yesterday: "'yesterday at' p",
|
48752
|
+
today: "'today at' p",
|
48753
|
+
tomorrow: "'tomorrow at' p",
|
48754
|
+
nextWeek: "eeee 'at' p",
|
48755
|
+
other: "P"
|
48756
|
+
};
|
48757
|
+
var formatRelative = /* @__PURE__ */ __name(function(token, _date, _baseDate, _options) {
|
48758
|
+
return formatRelativeLocale[token];
|
48759
|
+
}, "formatRelative");
|
48760
|
+
var formatRelative_default = formatRelative;
|
48761
|
+
|
48762
|
+
// ../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/_lib/buildLocalizeFn/index.js
|
48763
|
+
function buildLocalizeFn(args) {
|
48764
|
+
return function(dirtyIndex, dirtyOptions) {
|
48765
|
+
var options = dirtyOptions || {};
|
48766
|
+
var context2 = options.context ? String(options.context) : "standalone";
|
48767
|
+
var valuesArray;
|
48768
|
+
if (context2 === "formatting" && args.formattingValues) {
|
48769
|
+
var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
|
48770
|
+
var width = options.width ? String(options.width) : defaultWidth;
|
48771
|
+
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
|
48772
|
+
} else {
|
48773
|
+
var _defaultWidth = args.defaultWidth;
|
48774
|
+
var _width = options.width ? String(options.width) : args.defaultWidth;
|
48775
|
+
valuesArray = args.values[_width] || args.values[_defaultWidth];
|
48776
|
+
}
|
48777
|
+
var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex;
|
48778
|
+
return valuesArray[index];
|
48779
|
+
};
|
48780
|
+
}
|
48781
|
+
__name(buildLocalizeFn, "buildLocalizeFn");
|
48782
|
+
|
48783
|
+
// ../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/en-US/_lib/localize/index.js
|
48784
|
+
var eraValues = {
|
48785
|
+
narrow: ["B", "A"],
|
48786
|
+
abbreviated: ["BC", "AD"],
|
48787
|
+
wide: ["Before Christ", "Anno Domini"]
|
48788
|
+
};
|
48789
|
+
var quarterValues = {
|
48790
|
+
narrow: ["1", "2", "3", "4"],
|
48791
|
+
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
48792
|
+
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
48793
|
+
};
|
48794
|
+
var monthValues = {
|
48795
|
+
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
48796
|
+
abbreviated: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
|
48797
|
+
wide: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
|
48798
|
+
};
|
48799
|
+
var dayValues = {
|
48800
|
+
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
48801
|
+
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
48802
|
+
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
48803
|
+
wide: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
|
48804
|
+
};
|
48805
|
+
var dayPeriodValues = {
|
48806
|
+
narrow: {
|
48807
|
+
am: "a",
|
48808
|
+
pm: "p",
|
48809
|
+
midnight: "mi",
|
48810
|
+
noon: "n",
|
48811
|
+
morning: "morning",
|
48812
|
+
afternoon: "afternoon",
|
48813
|
+
evening: "evening",
|
48814
|
+
night: "night"
|
48815
|
+
},
|
48816
|
+
abbreviated: {
|
48817
|
+
am: "AM",
|
48818
|
+
pm: "PM",
|
48819
|
+
midnight: "midnight",
|
48820
|
+
noon: "noon",
|
48821
|
+
morning: "morning",
|
48822
|
+
afternoon: "afternoon",
|
48823
|
+
evening: "evening",
|
48824
|
+
night: "night"
|
48825
|
+
},
|
48826
|
+
wide: {
|
48827
|
+
am: "a.m.",
|
48828
|
+
pm: "p.m.",
|
48829
|
+
midnight: "midnight",
|
48830
|
+
noon: "noon",
|
48831
|
+
morning: "morning",
|
48832
|
+
afternoon: "afternoon",
|
48833
|
+
evening: "evening",
|
48834
|
+
night: "night"
|
48835
|
+
}
|
48836
|
+
};
|
48837
|
+
var formattingDayPeriodValues = {
|
48838
|
+
narrow: {
|
48839
|
+
am: "a",
|
48840
|
+
pm: "p",
|
48841
|
+
midnight: "mi",
|
48842
|
+
noon: "n",
|
48843
|
+
morning: "in the morning",
|
48844
|
+
afternoon: "in the afternoon",
|
48845
|
+
evening: "in the evening",
|
48846
|
+
night: "at night"
|
48847
|
+
},
|
48848
|
+
abbreviated: {
|
48849
|
+
am: "AM",
|
48850
|
+
pm: "PM",
|
48851
|
+
midnight: "midnight",
|
48852
|
+
noon: "noon",
|
48853
|
+
morning: "in the morning",
|
48854
|
+
afternoon: "in the afternoon",
|
48855
|
+
evening: "in the evening",
|
48856
|
+
night: "at night"
|
48857
|
+
},
|
48858
|
+
wide: {
|
48859
|
+
am: "a.m.",
|
48860
|
+
pm: "p.m.",
|
48861
|
+
midnight: "midnight",
|
48862
|
+
noon: "noon",
|
48863
|
+
morning: "in the morning",
|
48864
|
+
afternoon: "in the afternoon",
|
48865
|
+
evening: "in the evening",
|
48866
|
+
night: "at night"
|
48867
|
+
}
|
48868
|
+
};
|
48869
|
+
var ordinalNumber = /* @__PURE__ */ __name(function(dirtyNumber, _options) {
|
48870
|
+
var number = Number(dirtyNumber);
|
48871
|
+
var rem100 = number % 100;
|
48872
|
+
if (rem100 > 20 || rem100 < 10) {
|
48873
|
+
switch (rem100 % 10) {
|
48874
|
+
case 1:
|
48875
|
+
return number + "st";
|
48876
|
+
case 2:
|
48877
|
+
return number + "nd";
|
48878
|
+
case 3:
|
48879
|
+
return number + "rd";
|
48880
|
+
}
|
48881
|
+
}
|
48882
|
+
return number + "th";
|
48883
|
+
}, "ordinalNumber");
|
48884
|
+
var localize = {
|
48885
|
+
ordinalNumber,
|
48886
|
+
era: buildLocalizeFn({
|
48887
|
+
values: eraValues,
|
48888
|
+
defaultWidth: "wide"
|
48889
|
+
}),
|
48890
|
+
quarter: buildLocalizeFn({
|
48891
|
+
values: quarterValues,
|
48892
|
+
defaultWidth: "wide",
|
48893
|
+
argumentCallback: function(quarter) {
|
48894
|
+
return quarter - 1;
|
48895
|
+
}
|
48896
|
+
}),
|
48897
|
+
month: buildLocalizeFn({
|
48898
|
+
values: monthValues,
|
48899
|
+
defaultWidth: "wide"
|
48900
|
+
}),
|
48901
|
+
day: buildLocalizeFn({
|
48902
|
+
values: dayValues,
|
48903
|
+
defaultWidth: "wide"
|
48904
|
+
}),
|
48905
|
+
dayPeriod: buildLocalizeFn({
|
48906
|
+
values: dayPeriodValues,
|
48907
|
+
defaultWidth: "wide",
|
48908
|
+
formattingValues: formattingDayPeriodValues,
|
48909
|
+
defaultFormattingWidth: "wide"
|
48910
|
+
})
|
48911
|
+
};
|
48912
|
+
var localize_default = localize;
|
48913
|
+
|
48914
|
+
// ../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/_lib/buildMatchFn/index.js
|
48915
|
+
function buildMatchFn(args) {
|
48916
|
+
return function(string2) {
|
48917
|
+
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
48918
|
+
var width = options.width;
|
48919
|
+
var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
|
48920
|
+
var matchResult = string2.match(matchPattern);
|
48921
|
+
if (!matchResult) {
|
48922
|
+
return null;
|
48923
|
+
}
|
48924
|
+
var matchedString = matchResult[0];
|
48925
|
+
var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
|
48926
|
+
var key2 = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function(pattern) {
|
48927
|
+
return pattern.test(matchedString);
|
48928
|
+
}) : findKey(parsePatterns, function(pattern) {
|
48929
|
+
return pattern.test(matchedString);
|
48930
|
+
});
|
48931
|
+
var value;
|
48932
|
+
value = args.valueCallback ? args.valueCallback(key2) : key2;
|
48933
|
+
value = options.valueCallback ? options.valueCallback(value) : value;
|
48934
|
+
var rest = string2.slice(matchedString.length);
|
48935
|
+
return {
|
48936
|
+
value,
|
48937
|
+
rest
|
48938
|
+
};
|
48939
|
+
};
|
48940
|
+
}
|
48941
|
+
__name(buildMatchFn, "buildMatchFn");
|
48942
|
+
function findKey(object, predicate) {
|
48943
|
+
for (var key2 in object) {
|
48944
|
+
if (object.hasOwnProperty(key2) && predicate(object[key2])) {
|
48945
|
+
return key2;
|
48946
|
+
}
|
48947
|
+
}
|
48948
|
+
return void 0;
|
48949
|
+
}
|
48950
|
+
__name(findKey, "findKey");
|
48951
|
+
function findIndex(array, predicate) {
|
48952
|
+
for (var key2 = 0; key2 < array.length; key2++) {
|
48953
|
+
if (predicate(array[key2])) {
|
48954
|
+
return key2;
|
48955
|
+
}
|
48956
|
+
}
|
48957
|
+
return void 0;
|
48958
|
+
}
|
48959
|
+
__name(findIndex, "findIndex");
|
48960
|
+
|
48961
|
+
// ../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/_lib/buildMatchPatternFn/index.js
|
48962
|
+
function buildMatchPatternFn(args) {
|
48963
|
+
return function(string2) {
|
48964
|
+
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
48965
|
+
var matchResult = string2.match(args.matchPattern);
|
48966
|
+
if (!matchResult)
|
48967
|
+
return null;
|
48968
|
+
var matchedString = matchResult[0];
|
48969
|
+
var parseResult = string2.match(args.parsePattern);
|
48970
|
+
if (!parseResult)
|
48971
|
+
return null;
|
48972
|
+
var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
|
48973
|
+
value = options.valueCallback ? options.valueCallback(value) : value;
|
48974
|
+
var rest = string2.slice(matchedString.length);
|
48975
|
+
return {
|
48976
|
+
value,
|
48977
|
+
rest
|
48978
|
+
};
|
48979
|
+
};
|
48980
|
+
}
|
48981
|
+
__name(buildMatchPatternFn, "buildMatchPatternFn");
|
48982
|
+
|
48983
|
+
// ../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/en-US/_lib/match/index.js
|
48984
|
+
var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
|
48985
|
+
var parseOrdinalNumberPattern = /\d+/i;
|
48986
|
+
var matchEraPatterns = {
|
48987
|
+
narrow: /^(b|a)/i,
|
48988
|
+
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
48989
|
+
wide: /^(before christ|before common era|anno domini|common era)/i
|
48990
|
+
};
|
48991
|
+
var parseEraPatterns = {
|
48992
|
+
any: [/^b/i, /^(a|c)/i]
|
48993
|
+
};
|
48994
|
+
var matchQuarterPatterns = {
|
48995
|
+
narrow: /^[1234]/i,
|
48996
|
+
abbreviated: /^q[1234]/i,
|
48997
|
+
wide: /^[1234](th|st|nd|rd)? quarter/i
|
48998
|
+
};
|
48999
|
+
var parseQuarterPatterns = {
|
49000
|
+
any: [/1/i, /2/i, /3/i, /4/i]
|
49001
|
+
};
|
49002
|
+
var matchMonthPatterns = {
|
49003
|
+
narrow: /^[jfmasond]/i,
|
49004
|
+
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
49005
|
+
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
49006
|
+
};
|
49007
|
+
var parseMonthPatterns = {
|
49008
|
+
narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],
|
49009
|
+
any: [/^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i]
|
49010
|
+
};
|
49011
|
+
var matchDayPatterns = {
|
49012
|
+
narrow: /^[smtwf]/i,
|
49013
|
+
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
49014
|
+
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
49015
|
+
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
49016
|
+
};
|
49017
|
+
var parseDayPatterns = {
|
49018
|
+
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
49019
|
+
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
49020
|
+
};
|
49021
|
+
var matchDayPeriodPatterns = {
|
49022
|
+
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
49023
|
+
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
49024
|
+
};
|
49025
|
+
var parseDayPeriodPatterns = {
|
49026
|
+
any: {
|
49027
|
+
am: /^a/i,
|
49028
|
+
pm: /^p/i,
|
49029
|
+
midnight: /^mi/i,
|
49030
|
+
noon: /^no/i,
|
49031
|
+
morning: /morning/i,
|
49032
|
+
afternoon: /afternoon/i,
|
49033
|
+
evening: /evening/i,
|
49034
|
+
night: /night/i
|
49035
|
+
}
|
49036
|
+
};
|
49037
|
+
var match = {
|
49038
|
+
ordinalNumber: buildMatchPatternFn({
|
49039
|
+
matchPattern: matchOrdinalNumberPattern,
|
49040
|
+
parsePattern: parseOrdinalNumberPattern,
|
49041
|
+
valueCallback: function(value) {
|
49042
|
+
return parseInt(value, 10);
|
49043
|
+
}
|
49044
|
+
}),
|
49045
|
+
era: buildMatchFn({
|
49046
|
+
matchPatterns: matchEraPatterns,
|
49047
|
+
defaultMatchWidth: "wide",
|
49048
|
+
parsePatterns: parseEraPatterns,
|
49049
|
+
defaultParseWidth: "any"
|
49050
|
+
}),
|
49051
|
+
quarter: buildMatchFn({
|
49052
|
+
matchPatterns: matchQuarterPatterns,
|
49053
|
+
defaultMatchWidth: "wide",
|
49054
|
+
parsePatterns: parseQuarterPatterns,
|
49055
|
+
defaultParseWidth: "any",
|
49056
|
+
valueCallback: function(index) {
|
49057
|
+
return index + 1;
|
49058
|
+
}
|
49059
|
+
}),
|
49060
|
+
month: buildMatchFn({
|
49061
|
+
matchPatterns: matchMonthPatterns,
|
49062
|
+
defaultMatchWidth: "wide",
|
49063
|
+
parsePatterns: parseMonthPatterns,
|
49064
|
+
defaultParseWidth: "any"
|
49065
|
+
}),
|
49066
|
+
day: buildMatchFn({
|
49067
|
+
matchPatterns: matchDayPatterns,
|
49068
|
+
defaultMatchWidth: "wide",
|
49069
|
+
parsePatterns: parseDayPatterns,
|
49070
|
+
defaultParseWidth: "any"
|
49071
|
+
}),
|
49072
|
+
dayPeriod: buildMatchFn({
|
49073
|
+
matchPatterns: matchDayPeriodPatterns,
|
49074
|
+
defaultMatchWidth: "any",
|
49075
|
+
parsePatterns: parseDayPeriodPatterns,
|
49076
|
+
defaultParseWidth: "any"
|
49077
|
+
})
|
49078
|
+
};
|
49079
|
+
var match_default = match;
|
49080
|
+
|
49081
|
+
// ../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/en-US/index.js
|
49082
|
+
var locale = {
|
49083
|
+
code: "en-US",
|
49084
|
+
formatDistance: formatDistance_default,
|
49085
|
+
formatLong: formatLong_default,
|
49086
|
+
formatRelative: formatRelative_default,
|
49087
|
+
localize: localize_default,
|
49088
|
+
match: match_default,
|
49089
|
+
options: {
|
49090
|
+
weekStartsOn: 0,
|
49091
|
+
firstWeekContainsDate: 1
|
49092
|
+
}
|
49093
|
+
};
|
49094
|
+
var en_US_default = locale;
|
49095
|
+
|
49096
|
+
// ../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/subMilliseconds/index.js
|
49097
|
+
function subMilliseconds(dirtyDate, dirtyAmount) {
|
49098
|
+
requiredArgs(2, arguments);
|
49099
|
+
var amount = toInteger(dirtyAmount);
|
49100
|
+
return addMilliseconds(dirtyDate, -amount);
|
49101
|
+
}
|
49102
|
+
__name(subMilliseconds, "subMilliseconds");
|
49103
|
+
|
49104
|
+
// ../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/getUTCDayOfYear/index.js
|
49105
|
+
var MILLISECONDS_IN_DAY = 864e5;
|
49106
|
+
function getUTCDayOfYear(dirtyDate) {
|
49107
|
+
requiredArgs(1, arguments);
|
49108
|
+
var date = toDate(dirtyDate);
|
49109
|
+
var timestamp = date.getTime();
|
49110
|
+
date.setUTCMonth(0, 1);
|
49111
|
+
date.setUTCHours(0, 0, 0, 0);
|
49112
|
+
var startOfYearTimestamp = date.getTime();
|
49113
|
+
var difference = timestamp - startOfYearTimestamp;
|
49114
|
+
return Math.floor(difference / MILLISECONDS_IN_DAY) + 1;
|
49115
|
+
}
|
49116
|
+
__name(getUTCDayOfYear, "getUTCDayOfYear");
|
49117
|
+
|
49118
|
+
// ../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.js
|
49119
|
+
function startOfUTCISOWeek(dirtyDate) {
|
49120
|
+
requiredArgs(1, arguments);
|
49121
|
+
var weekStartsOn = 1;
|
49122
|
+
var date = toDate(dirtyDate);
|
49123
|
+
var day = date.getUTCDay();
|
49124
|
+
var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
|
49125
|
+
date.setUTCDate(date.getUTCDate() - diff);
|
49126
|
+
date.setUTCHours(0, 0, 0, 0);
|
49127
|
+
return date;
|
49128
|
+
}
|
49129
|
+
__name(startOfUTCISOWeek, "startOfUTCISOWeek");
|
49130
|
+
|
49131
|
+
// ../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/getUTCISOWeekYear/index.js
|
49132
|
+
function getUTCISOWeekYear(dirtyDate) {
|
49133
|
+
requiredArgs(1, arguments);
|
49134
|
+
var date = toDate(dirtyDate);
|
49135
|
+
var year = date.getUTCFullYear();
|
49136
|
+
var fourthOfJanuaryOfNextYear = new Date(0);
|
49137
|
+
fourthOfJanuaryOfNextYear.setUTCFullYear(year + 1, 0, 4);
|
49138
|
+
fourthOfJanuaryOfNextYear.setUTCHours(0, 0, 0, 0);
|
49139
|
+
var startOfNextYear = startOfUTCISOWeek(fourthOfJanuaryOfNextYear);
|
49140
|
+
var fourthOfJanuaryOfThisYear = new Date(0);
|
49141
|
+
fourthOfJanuaryOfThisYear.setUTCFullYear(year, 0, 4);
|
49142
|
+
fourthOfJanuaryOfThisYear.setUTCHours(0, 0, 0, 0);
|
49143
|
+
var startOfThisYear = startOfUTCISOWeek(fourthOfJanuaryOfThisYear);
|
49144
|
+
if (date.getTime() >= startOfNextYear.getTime()) {
|
49145
|
+
return year + 1;
|
49146
|
+
} else if (date.getTime() >= startOfThisYear.getTime()) {
|
49147
|
+
return year;
|
49148
|
+
} else {
|
49149
|
+
return year - 1;
|
49150
|
+
}
|
49151
|
+
}
|
49152
|
+
__name(getUTCISOWeekYear, "getUTCISOWeekYear");
|
49153
|
+
|
49154
|
+
// ../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/startOfUTCISOWeekYear/index.js
|
49155
|
+
function startOfUTCISOWeekYear(dirtyDate) {
|
49156
|
+
requiredArgs(1, arguments);
|
49157
|
+
var year = getUTCISOWeekYear(dirtyDate);
|
49158
|
+
var fourthOfJanuary = new Date(0);
|
49159
|
+
fourthOfJanuary.setUTCFullYear(year, 0, 4);
|
49160
|
+
fourthOfJanuary.setUTCHours(0, 0, 0, 0);
|
49161
|
+
var date = startOfUTCISOWeek(fourthOfJanuary);
|
49162
|
+
return date;
|
49163
|
+
}
|
49164
|
+
__name(startOfUTCISOWeekYear, "startOfUTCISOWeekYear");
|
49165
|
+
|
49166
|
+
// ../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/getUTCISOWeek/index.js
|
49167
|
+
var MILLISECONDS_IN_WEEK = 6048e5;
|
49168
|
+
function getUTCISOWeek(dirtyDate) {
|
49169
|
+
requiredArgs(1, arguments);
|
49170
|
+
var date = toDate(dirtyDate);
|
49171
|
+
var diff = startOfUTCISOWeek(date).getTime() - startOfUTCISOWeekYear(date).getTime();
|
49172
|
+
return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;
|
49173
|
+
}
|
49174
|
+
__name(getUTCISOWeek, "getUTCISOWeek");
|
49175
|
+
|
49176
|
+
// ../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js
|
49177
|
+
function startOfUTCWeek(dirtyDate, dirtyOptions) {
|
49178
|
+
requiredArgs(1, arguments);
|
49179
|
+
var options = dirtyOptions || {};
|
49180
|
+
var locale2 = options.locale;
|
49181
|
+
var localeWeekStartsOn = locale2 && locale2.options && locale2.options.weekStartsOn;
|
49182
|
+
var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : toInteger(localeWeekStartsOn);
|
49183
|
+
var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : toInteger(options.weekStartsOn);
|
49184
|
+
if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
|
49185
|
+
throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
|
49186
|
+
}
|
49187
|
+
var date = toDate(dirtyDate);
|
49188
|
+
var day = date.getUTCDay();
|
49189
|
+
var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
|
49190
|
+
date.setUTCDate(date.getUTCDate() - diff);
|
49191
|
+
date.setUTCHours(0, 0, 0, 0);
|
49192
|
+
return date;
|
49193
|
+
}
|
49194
|
+
__name(startOfUTCWeek, "startOfUTCWeek");
|
49195
|
+
|
49196
|
+
// ../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/getUTCWeekYear/index.js
|
49197
|
+
function getUTCWeekYear(dirtyDate, dirtyOptions) {
|
49198
|
+
requiredArgs(1, arguments);
|
49199
|
+
var date = toDate(dirtyDate);
|
49200
|
+
var year = date.getUTCFullYear();
|
49201
|
+
var options = dirtyOptions || {};
|
49202
|
+
var locale2 = options.locale;
|
49203
|
+
var localeFirstWeekContainsDate = locale2 && locale2.options && locale2.options.firstWeekContainsDate;
|
49204
|
+
var defaultFirstWeekContainsDate = localeFirstWeekContainsDate == null ? 1 : toInteger(localeFirstWeekContainsDate);
|
49205
|
+
var firstWeekContainsDate = options.firstWeekContainsDate == null ? defaultFirstWeekContainsDate : toInteger(options.firstWeekContainsDate);
|
49206
|
+
if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
|
49207
|
+
throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
|
49208
|
+
}
|
49209
|
+
var firstWeekOfNextYear = new Date(0);
|
49210
|
+
firstWeekOfNextYear.setUTCFullYear(year + 1, 0, firstWeekContainsDate);
|
49211
|
+
firstWeekOfNextYear.setUTCHours(0, 0, 0, 0);
|
49212
|
+
var startOfNextYear = startOfUTCWeek(firstWeekOfNextYear, dirtyOptions);
|
49213
|
+
var firstWeekOfThisYear = new Date(0);
|
49214
|
+
firstWeekOfThisYear.setUTCFullYear(year, 0, firstWeekContainsDate);
|
49215
|
+
firstWeekOfThisYear.setUTCHours(0, 0, 0, 0);
|
49216
|
+
var startOfThisYear = startOfUTCWeek(firstWeekOfThisYear, dirtyOptions);
|
49217
|
+
if (date.getTime() >= startOfNextYear.getTime()) {
|
49218
|
+
return year + 1;
|
49219
|
+
} else if (date.getTime() >= startOfThisYear.getTime()) {
|
49220
|
+
return year;
|
49221
|
+
} else {
|
49222
|
+
return year - 1;
|
49223
|
+
}
|
49224
|
+
}
|
49225
|
+
__name(getUTCWeekYear, "getUTCWeekYear");
|
49226
|
+
|
49227
|
+
// ../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/startOfUTCWeekYear/index.js
|
49228
|
+
function startOfUTCWeekYear(dirtyDate, dirtyOptions) {
|
49229
|
+
requiredArgs(1, arguments);
|
49230
|
+
var options = dirtyOptions || {};
|
49231
|
+
var locale2 = options.locale;
|
49232
|
+
var localeFirstWeekContainsDate = locale2 && locale2.options && locale2.options.firstWeekContainsDate;
|
49233
|
+
var defaultFirstWeekContainsDate = localeFirstWeekContainsDate == null ? 1 : toInteger(localeFirstWeekContainsDate);
|
49234
|
+
var firstWeekContainsDate = options.firstWeekContainsDate == null ? defaultFirstWeekContainsDate : toInteger(options.firstWeekContainsDate);
|
49235
|
+
var year = getUTCWeekYear(dirtyDate, dirtyOptions);
|
49236
|
+
var firstWeek = new Date(0);
|
49237
|
+
firstWeek.setUTCFullYear(year, 0, firstWeekContainsDate);
|
49238
|
+
firstWeek.setUTCHours(0, 0, 0, 0);
|
49239
|
+
var date = startOfUTCWeek(firstWeek, dirtyOptions);
|
49240
|
+
return date;
|
49241
|
+
}
|
49242
|
+
__name(startOfUTCWeekYear, "startOfUTCWeekYear");
|
49243
|
+
|
49244
|
+
// ../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/getUTCWeek/index.js
|
49245
|
+
var MILLISECONDS_IN_WEEK2 = 6048e5;
|
49246
|
+
function getUTCWeek(dirtyDate, options) {
|
49247
|
+
requiredArgs(1, arguments);
|
49248
|
+
var date = toDate(dirtyDate);
|
49249
|
+
var diff = startOfUTCWeek(date, options).getTime() - startOfUTCWeekYear(date, options).getTime();
|
49250
|
+
return Math.round(diff / MILLISECONDS_IN_WEEK2) + 1;
|
49251
|
+
}
|
49252
|
+
__name(getUTCWeek, "getUTCWeek");
|
49253
|
+
|
49254
|
+
// ../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/addLeadingZeros/index.js
|
49255
|
+
function addLeadingZeros(number, targetLength) {
|
49256
|
+
var sign5 = number < 0 ? "-" : "";
|
49257
|
+
var output = Math.abs(number).toString();
|
49258
|
+
while (output.length < targetLength) {
|
49259
|
+
output = "0" + output;
|
49260
|
+
}
|
49261
|
+
return sign5 + output;
|
49262
|
+
}
|
49263
|
+
__name(addLeadingZeros, "addLeadingZeros");
|
49264
|
+
|
49265
|
+
// ../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/format/lightFormatters/index.js
|
49266
|
+
var formatters = {
|
49267
|
+
y: function(date, token) {
|
49268
|
+
var signedYear = date.getUTCFullYear();
|
49269
|
+
var year = signedYear > 0 ? signedYear : 1 - signedYear;
|
49270
|
+
return addLeadingZeros(token === "yy" ? year % 100 : year, token.length);
|
49271
|
+
},
|
49272
|
+
M: function(date, token) {
|
49273
|
+
var month = date.getUTCMonth();
|
49274
|
+
return token === "M" ? String(month + 1) : addLeadingZeros(month + 1, 2);
|
49275
|
+
},
|
49276
|
+
d: function(date, token) {
|
49277
|
+
return addLeadingZeros(date.getUTCDate(), token.length);
|
49278
|
+
},
|
49279
|
+
a: function(date, token) {
|
49280
|
+
var dayPeriodEnumValue = date.getUTCHours() / 12 >= 1 ? "pm" : "am";
|
49281
|
+
switch (token) {
|
49282
|
+
case "a":
|
49283
|
+
case "aa":
|
49284
|
+
return dayPeriodEnumValue.toUpperCase();
|
49285
|
+
case "aaa":
|
49286
|
+
return dayPeriodEnumValue;
|
49287
|
+
case "aaaaa":
|
49288
|
+
return dayPeriodEnumValue[0];
|
49289
|
+
case "aaaa":
|
49290
|
+
default:
|
49291
|
+
return dayPeriodEnumValue === "am" ? "a.m." : "p.m.";
|
49292
|
+
}
|
49293
|
+
},
|
49294
|
+
h: function(date, token) {
|
49295
|
+
return addLeadingZeros(date.getUTCHours() % 12 || 12, token.length);
|
49296
|
+
},
|
49297
|
+
H: function(date, token) {
|
49298
|
+
return addLeadingZeros(date.getUTCHours(), token.length);
|
49299
|
+
},
|
49300
|
+
m: function(date, token) {
|
49301
|
+
return addLeadingZeros(date.getUTCMinutes(), token.length);
|
49302
|
+
},
|
49303
|
+
s: function(date, token) {
|
49304
|
+
return addLeadingZeros(date.getUTCSeconds(), token.length);
|
49305
|
+
},
|
49306
|
+
S: function(date, token) {
|
49307
|
+
var numberOfDigits = token.length;
|
49308
|
+
var milliseconds = date.getUTCMilliseconds();
|
49309
|
+
var fractionalSeconds = Math.floor(milliseconds * Math.pow(10, numberOfDigits - 3));
|
49310
|
+
return addLeadingZeros(fractionalSeconds, token.length);
|
49311
|
+
}
|
49312
|
+
};
|
49313
|
+
var lightFormatters_default = formatters;
|
49314
|
+
|
49315
|
+
// ../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/format/formatters/index.js
|
49316
|
+
var dayPeriodEnum = {
|
49317
|
+
am: "am",
|
49318
|
+
pm: "pm",
|
49319
|
+
midnight: "midnight",
|
49320
|
+
noon: "noon",
|
49321
|
+
morning: "morning",
|
49322
|
+
afternoon: "afternoon",
|
49323
|
+
evening: "evening",
|
49324
|
+
night: "night"
|
49325
|
+
};
|
49326
|
+
var formatters2 = {
|
49327
|
+
G: function(date, token, localize2) {
|
49328
|
+
var era = date.getUTCFullYear() > 0 ? 1 : 0;
|
49329
|
+
switch (token) {
|
49330
|
+
case "G":
|
49331
|
+
case "GG":
|
49332
|
+
case "GGG":
|
49333
|
+
return localize2.era(era, {
|
49334
|
+
width: "abbreviated"
|
49335
|
+
});
|
49336
|
+
case "GGGGG":
|
49337
|
+
return localize2.era(era, {
|
49338
|
+
width: "narrow"
|
49339
|
+
});
|
49340
|
+
case "GGGG":
|
49341
|
+
default:
|
49342
|
+
return localize2.era(era, {
|
49343
|
+
width: "wide"
|
49344
|
+
});
|
49345
|
+
}
|
49346
|
+
},
|
49347
|
+
y: function(date, token, localize2) {
|
49348
|
+
if (token === "yo") {
|
49349
|
+
var signedYear = date.getUTCFullYear();
|
49350
|
+
var year = signedYear > 0 ? signedYear : 1 - signedYear;
|
49351
|
+
return localize2.ordinalNumber(year, {
|
49352
|
+
unit: "year"
|
49353
|
+
});
|
49354
|
+
}
|
49355
|
+
return lightFormatters_default.y(date, token);
|
49356
|
+
},
|
49357
|
+
Y: function(date, token, localize2, options) {
|
49358
|
+
var signedWeekYear = getUTCWeekYear(date, options);
|
49359
|
+
var weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;
|
49360
|
+
if (token === "YY") {
|
49361
|
+
var twoDigitYear = weekYear % 100;
|
49362
|
+
return addLeadingZeros(twoDigitYear, 2);
|
49363
|
+
}
|
49364
|
+
if (token === "Yo") {
|
49365
|
+
return localize2.ordinalNumber(weekYear, {
|
49366
|
+
unit: "year"
|
49367
|
+
});
|
49368
|
+
}
|
49369
|
+
return addLeadingZeros(weekYear, token.length);
|
49370
|
+
},
|
49371
|
+
R: function(date, token) {
|
49372
|
+
var isoWeekYear = getUTCISOWeekYear(date);
|
49373
|
+
return addLeadingZeros(isoWeekYear, token.length);
|
49374
|
+
},
|
49375
|
+
u: function(date, token) {
|
49376
|
+
var year = date.getUTCFullYear();
|
49377
|
+
return addLeadingZeros(year, token.length);
|
49378
|
+
},
|
49379
|
+
Q: function(date, token, localize2) {
|
49380
|
+
var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);
|
49381
|
+
switch (token) {
|
49382
|
+
case "Q":
|
49383
|
+
return String(quarter);
|
49384
|
+
case "QQ":
|
49385
|
+
return addLeadingZeros(quarter, 2);
|
49386
|
+
case "Qo":
|
49387
|
+
return localize2.ordinalNumber(quarter, {
|
49388
|
+
unit: "quarter"
|
49389
|
+
});
|
49390
|
+
case "QQQ":
|
49391
|
+
return localize2.quarter(quarter, {
|
49392
|
+
width: "abbreviated",
|
49393
|
+
context: "formatting"
|
49394
|
+
});
|
49395
|
+
case "QQQQQ":
|
49396
|
+
return localize2.quarter(quarter, {
|
49397
|
+
width: "narrow",
|
49398
|
+
context: "formatting"
|
49399
|
+
});
|
49400
|
+
case "QQQQ":
|
49401
|
+
default:
|
49402
|
+
return localize2.quarter(quarter, {
|
49403
|
+
width: "wide",
|
49404
|
+
context: "formatting"
|
49405
|
+
});
|
49406
|
+
}
|
49407
|
+
},
|
49408
|
+
q: function(date, token, localize2) {
|
49409
|
+
var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);
|
49410
|
+
switch (token) {
|
49411
|
+
case "q":
|
49412
|
+
return String(quarter);
|
49413
|
+
case "qq":
|
49414
|
+
return addLeadingZeros(quarter, 2);
|
49415
|
+
case "qo":
|
49416
|
+
return localize2.ordinalNumber(quarter, {
|
49417
|
+
unit: "quarter"
|
49418
|
+
});
|
49419
|
+
case "qqq":
|
49420
|
+
return localize2.quarter(quarter, {
|
49421
|
+
width: "abbreviated",
|
49422
|
+
context: "standalone"
|
49423
|
+
});
|
49424
|
+
case "qqqqq":
|
49425
|
+
return localize2.quarter(quarter, {
|
49426
|
+
width: "narrow",
|
49427
|
+
context: "standalone"
|
49428
|
+
});
|
49429
|
+
case "qqqq":
|
49430
|
+
default:
|
49431
|
+
return localize2.quarter(quarter, {
|
49432
|
+
width: "wide",
|
49433
|
+
context: "standalone"
|
49434
|
+
});
|
49435
|
+
}
|
49436
|
+
},
|
49437
|
+
M: function(date, token, localize2) {
|
49438
|
+
var month = date.getUTCMonth();
|
49439
|
+
switch (token) {
|
49440
|
+
case "M":
|
49441
|
+
case "MM":
|
49442
|
+
return lightFormatters_default.M(date, token);
|
49443
|
+
case "Mo":
|
49444
|
+
return localize2.ordinalNumber(month + 1, {
|
49445
|
+
unit: "month"
|
49446
|
+
});
|
49447
|
+
case "MMM":
|
49448
|
+
return localize2.month(month, {
|
49449
|
+
width: "abbreviated",
|
49450
|
+
context: "formatting"
|
49451
|
+
});
|
49452
|
+
case "MMMMM":
|
49453
|
+
return localize2.month(month, {
|
49454
|
+
width: "narrow",
|
49455
|
+
context: "formatting"
|
49456
|
+
});
|
49457
|
+
case "MMMM":
|
49458
|
+
default:
|
49459
|
+
return localize2.month(month, {
|
49460
|
+
width: "wide",
|
49461
|
+
context: "formatting"
|
49462
|
+
});
|
49463
|
+
}
|
49464
|
+
},
|
49465
|
+
L: function(date, token, localize2) {
|
49466
|
+
var month = date.getUTCMonth();
|
49467
|
+
switch (token) {
|
49468
|
+
case "L":
|
49469
|
+
return String(month + 1);
|
49470
|
+
case "LL":
|
49471
|
+
return addLeadingZeros(month + 1, 2);
|
49472
|
+
case "Lo":
|
49473
|
+
return localize2.ordinalNumber(month + 1, {
|
49474
|
+
unit: "month"
|
49475
|
+
});
|
49476
|
+
case "LLL":
|
49477
|
+
return localize2.month(month, {
|
49478
|
+
width: "abbreviated",
|
49479
|
+
context: "standalone"
|
49480
|
+
});
|
49481
|
+
case "LLLLL":
|
49482
|
+
return localize2.month(month, {
|
49483
|
+
width: "narrow",
|
49484
|
+
context: "standalone"
|
49485
|
+
});
|
49486
|
+
case "LLLL":
|
49487
|
+
default:
|
49488
|
+
return localize2.month(month, {
|
49489
|
+
width: "wide",
|
49490
|
+
context: "standalone"
|
49491
|
+
});
|
49492
|
+
}
|
49493
|
+
},
|
49494
|
+
w: function(date, token, localize2, options) {
|
49495
|
+
var week = getUTCWeek(date, options);
|
49496
|
+
if (token === "wo") {
|
49497
|
+
return localize2.ordinalNumber(week, {
|
49498
|
+
unit: "week"
|
49499
|
+
});
|
49500
|
+
}
|
49501
|
+
return addLeadingZeros(week, token.length);
|
49502
|
+
},
|
49503
|
+
I: function(date, token, localize2) {
|
49504
|
+
var isoWeek = getUTCISOWeek(date);
|
49505
|
+
if (token === "Io") {
|
49506
|
+
return localize2.ordinalNumber(isoWeek, {
|
49507
|
+
unit: "week"
|
49508
|
+
});
|
49509
|
+
}
|
49510
|
+
return addLeadingZeros(isoWeek, token.length);
|
49511
|
+
},
|
49512
|
+
d: function(date, token, localize2) {
|
49513
|
+
if (token === "do") {
|
49514
|
+
return localize2.ordinalNumber(date.getUTCDate(), {
|
49515
|
+
unit: "date"
|
49516
|
+
});
|
49517
|
+
}
|
49518
|
+
return lightFormatters_default.d(date, token);
|
49519
|
+
},
|
49520
|
+
D: function(date, token, localize2) {
|
49521
|
+
var dayOfYear = getUTCDayOfYear(date);
|
49522
|
+
if (token === "Do") {
|
49523
|
+
return localize2.ordinalNumber(dayOfYear, {
|
49524
|
+
unit: "dayOfYear"
|
49525
|
+
});
|
49526
|
+
}
|
49527
|
+
return addLeadingZeros(dayOfYear, token.length);
|
49528
|
+
},
|
49529
|
+
E: function(date, token, localize2) {
|
49530
|
+
var dayOfWeek = date.getUTCDay();
|
49531
|
+
switch (token) {
|
49532
|
+
case "E":
|
49533
|
+
case "EE":
|
49534
|
+
case "EEE":
|
49535
|
+
return localize2.day(dayOfWeek, {
|
49536
|
+
width: "abbreviated",
|
49537
|
+
context: "formatting"
|
49538
|
+
});
|
49539
|
+
case "EEEEE":
|
49540
|
+
return localize2.day(dayOfWeek, {
|
49541
|
+
width: "narrow",
|
49542
|
+
context: "formatting"
|
49543
|
+
});
|
49544
|
+
case "EEEEEE":
|
49545
|
+
return localize2.day(dayOfWeek, {
|
49546
|
+
width: "short",
|
49547
|
+
context: "formatting"
|
49548
|
+
});
|
49549
|
+
case "EEEE":
|
49550
|
+
default:
|
49551
|
+
return localize2.day(dayOfWeek, {
|
49552
|
+
width: "wide",
|
49553
|
+
context: "formatting"
|
49554
|
+
});
|
49555
|
+
}
|
49556
|
+
},
|
49557
|
+
e: function(date, token, localize2, options) {
|
49558
|
+
var dayOfWeek = date.getUTCDay();
|
49559
|
+
var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
|
49560
|
+
switch (token) {
|
49561
|
+
case "e":
|
49562
|
+
return String(localDayOfWeek);
|
49563
|
+
case "ee":
|
49564
|
+
return addLeadingZeros(localDayOfWeek, 2);
|
49565
|
+
case "eo":
|
49566
|
+
return localize2.ordinalNumber(localDayOfWeek, {
|
49567
|
+
unit: "day"
|
49568
|
+
});
|
49569
|
+
case "eee":
|
49570
|
+
return localize2.day(dayOfWeek, {
|
49571
|
+
width: "abbreviated",
|
49572
|
+
context: "formatting"
|
49573
|
+
});
|
49574
|
+
case "eeeee":
|
49575
|
+
return localize2.day(dayOfWeek, {
|
49576
|
+
width: "narrow",
|
49577
|
+
context: "formatting"
|
49578
|
+
});
|
49579
|
+
case "eeeeee":
|
49580
|
+
return localize2.day(dayOfWeek, {
|
49581
|
+
width: "short",
|
49582
|
+
context: "formatting"
|
49583
|
+
});
|
49584
|
+
case "eeee":
|
49585
|
+
default:
|
49586
|
+
return localize2.day(dayOfWeek, {
|
49587
|
+
width: "wide",
|
49588
|
+
context: "formatting"
|
49589
|
+
});
|
49590
|
+
}
|
49591
|
+
},
|
49592
|
+
c: function(date, token, localize2, options) {
|
49593
|
+
var dayOfWeek = date.getUTCDay();
|
49594
|
+
var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
|
49595
|
+
switch (token) {
|
49596
|
+
case "c":
|
49597
|
+
return String(localDayOfWeek);
|
49598
|
+
case "cc":
|
49599
|
+
return addLeadingZeros(localDayOfWeek, token.length);
|
49600
|
+
case "co":
|
49601
|
+
return localize2.ordinalNumber(localDayOfWeek, {
|
49602
|
+
unit: "day"
|
49603
|
+
});
|
49604
|
+
case "ccc":
|
49605
|
+
return localize2.day(dayOfWeek, {
|
49606
|
+
width: "abbreviated",
|
49607
|
+
context: "standalone"
|
49608
|
+
});
|
49609
|
+
case "ccccc":
|
49610
|
+
return localize2.day(dayOfWeek, {
|
49611
|
+
width: "narrow",
|
49612
|
+
context: "standalone"
|
49613
|
+
});
|
49614
|
+
case "cccccc":
|
49615
|
+
return localize2.day(dayOfWeek, {
|
49616
|
+
width: "short",
|
49617
|
+
context: "standalone"
|
49618
|
+
});
|
49619
|
+
case "cccc":
|
49620
|
+
default:
|
49621
|
+
return localize2.day(dayOfWeek, {
|
49622
|
+
width: "wide",
|
49623
|
+
context: "standalone"
|
49624
|
+
});
|
49625
|
+
}
|
49626
|
+
},
|
49627
|
+
i: function(date, token, localize2) {
|
49628
|
+
var dayOfWeek = date.getUTCDay();
|
49629
|
+
var isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;
|
49630
|
+
switch (token) {
|
49631
|
+
case "i":
|
49632
|
+
return String(isoDayOfWeek);
|
49633
|
+
case "ii":
|
49634
|
+
return addLeadingZeros(isoDayOfWeek, token.length);
|
49635
|
+
case "io":
|
49636
|
+
return localize2.ordinalNumber(isoDayOfWeek, {
|
49637
|
+
unit: "day"
|
49638
|
+
});
|
49639
|
+
case "iii":
|
49640
|
+
return localize2.day(dayOfWeek, {
|
49641
|
+
width: "abbreviated",
|
49642
|
+
context: "formatting"
|
49643
|
+
});
|
49644
|
+
case "iiiii":
|
49645
|
+
return localize2.day(dayOfWeek, {
|
49646
|
+
width: "narrow",
|
49647
|
+
context: "formatting"
|
49648
|
+
});
|
49649
|
+
case "iiiiii":
|
49650
|
+
return localize2.day(dayOfWeek, {
|
49651
|
+
width: "short",
|
49652
|
+
context: "formatting"
|
49653
|
+
});
|
49654
|
+
case "iiii":
|
49655
|
+
default:
|
49656
|
+
return localize2.day(dayOfWeek, {
|
49657
|
+
width: "wide",
|
49658
|
+
context: "formatting"
|
49659
|
+
});
|
49660
|
+
}
|
49661
|
+
},
|
49662
|
+
a: function(date, token, localize2) {
|
49663
|
+
var hours = date.getUTCHours();
|
49664
|
+
var dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
|
49665
|
+
switch (token) {
|
49666
|
+
case "a":
|
49667
|
+
case "aa":
|
49668
|
+
return localize2.dayPeriod(dayPeriodEnumValue, {
|
49669
|
+
width: "abbreviated",
|
49670
|
+
context: "formatting"
|
49671
|
+
});
|
49672
|
+
case "aaa":
|
49673
|
+
return localize2.dayPeriod(dayPeriodEnumValue, {
|
49674
|
+
width: "abbreviated",
|
49675
|
+
context: "formatting"
|
49676
|
+
}).toLowerCase();
|
49677
|
+
case "aaaaa":
|
49678
|
+
return localize2.dayPeriod(dayPeriodEnumValue, {
|
49679
|
+
width: "narrow",
|
49680
|
+
context: "formatting"
|
49681
|
+
});
|
49682
|
+
case "aaaa":
|
49683
|
+
default:
|
49684
|
+
return localize2.dayPeriod(dayPeriodEnumValue, {
|
49685
|
+
width: "wide",
|
49686
|
+
context: "formatting"
|
49687
|
+
});
|
49688
|
+
}
|
49689
|
+
},
|
49690
|
+
b: function(date, token, localize2) {
|
49691
|
+
var hours = date.getUTCHours();
|
49692
|
+
var dayPeriodEnumValue;
|
49693
|
+
if (hours === 12) {
|
49694
|
+
dayPeriodEnumValue = dayPeriodEnum.noon;
|
49695
|
+
} else if (hours === 0) {
|
49696
|
+
dayPeriodEnumValue = dayPeriodEnum.midnight;
|
49697
|
+
} else {
|
49698
|
+
dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
|
49699
|
+
}
|
49700
|
+
switch (token) {
|
49701
|
+
case "b":
|
49702
|
+
case "bb":
|
49703
|
+
return localize2.dayPeriod(dayPeriodEnumValue, {
|
49704
|
+
width: "abbreviated",
|
49705
|
+
context: "formatting"
|
49706
|
+
});
|
49707
|
+
case "bbb":
|
49708
|
+
return localize2.dayPeriod(dayPeriodEnumValue, {
|
49709
|
+
width: "abbreviated",
|
49710
|
+
context: "formatting"
|
49711
|
+
}).toLowerCase();
|
49712
|
+
case "bbbbb":
|
49713
|
+
return localize2.dayPeriod(dayPeriodEnumValue, {
|
49714
|
+
width: "narrow",
|
49715
|
+
context: "formatting"
|
49716
|
+
});
|
49717
|
+
case "bbbb":
|
49718
|
+
default:
|
49719
|
+
return localize2.dayPeriod(dayPeriodEnumValue, {
|
49720
|
+
width: "wide",
|
49721
|
+
context: "formatting"
|
49722
|
+
});
|
49723
|
+
}
|
49724
|
+
},
|
49725
|
+
B: function(date, token, localize2) {
|
49726
|
+
var hours = date.getUTCHours();
|
49727
|
+
var dayPeriodEnumValue;
|
49728
|
+
if (hours >= 17) {
|
49729
|
+
dayPeriodEnumValue = dayPeriodEnum.evening;
|
49730
|
+
} else if (hours >= 12) {
|
49731
|
+
dayPeriodEnumValue = dayPeriodEnum.afternoon;
|
49732
|
+
} else if (hours >= 4) {
|
49733
|
+
dayPeriodEnumValue = dayPeriodEnum.morning;
|
49734
|
+
} else {
|
49735
|
+
dayPeriodEnumValue = dayPeriodEnum.night;
|
49736
|
+
}
|
49737
|
+
switch (token) {
|
49738
|
+
case "B":
|
49739
|
+
case "BB":
|
49740
|
+
case "BBB":
|
49741
|
+
return localize2.dayPeriod(dayPeriodEnumValue, {
|
49742
|
+
width: "abbreviated",
|
49743
|
+
context: "formatting"
|
49744
|
+
});
|
49745
|
+
case "BBBBB":
|
49746
|
+
return localize2.dayPeriod(dayPeriodEnumValue, {
|
49747
|
+
width: "narrow",
|
49748
|
+
context: "formatting"
|
49749
|
+
});
|
49750
|
+
case "BBBB":
|
49751
|
+
default:
|
49752
|
+
return localize2.dayPeriod(dayPeriodEnumValue, {
|
49753
|
+
width: "wide",
|
49754
|
+
context: "formatting"
|
49755
|
+
});
|
49756
|
+
}
|
49757
|
+
},
|
49758
|
+
h: function(date, token, localize2) {
|
49759
|
+
if (token === "ho") {
|
49760
|
+
var hours = date.getUTCHours() % 12;
|
49761
|
+
if (hours === 0)
|
49762
|
+
hours = 12;
|
49763
|
+
return localize2.ordinalNumber(hours, {
|
49764
|
+
unit: "hour"
|
49765
|
+
});
|
49766
|
+
}
|
49767
|
+
return lightFormatters_default.h(date, token);
|
49768
|
+
},
|
49769
|
+
H: function(date, token, localize2) {
|
49770
|
+
if (token === "Ho") {
|
49771
|
+
return localize2.ordinalNumber(date.getUTCHours(), {
|
49772
|
+
unit: "hour"
|
49773
|
+
});
|
49774
|
+
}
|
49775
|
+
return lightFormatters_default.H(date, token);
|
49776
|
+
},
|
49777
|
+
K: function(date, token, localize2) {
|
49778
|
+
var hours = date.getUTCHours() % 12;
|
49779
|
+
if (token === "Ko") {
|
49780
|
+
return localize2.ordinalNumber(hours, {
|
49781
|
+
unit: "hour"
|
49782
|
+
});
|
49783
|
+
}
|
49784
|
+
return addLeadingZeros(hours, token.length);
|
49785
|
+
},
|
49786
|
+
k: function(date, token, localize2) {
|
49787
|
+
var hours = date.getUTCHours();
|
49788
|
+
if (hours === 0)
|
49789
|
+
hours = 24;
|
49790
|
+
if (token === "ko") {
|
49791
|
+
return localize2.ordinalNumber(hours, {
|
49792
|
+
unit: "hour"
|
49793
|
+
});
|
49794
|
+
}
|
49795
|
+
return addLeadingZeros(hours, token.length);
|
49796
|
+
},
|
49797
|
+
m: function(date, token, localize2) {
|
49798
|
+
if (token === "mo") {
|
49799
|
+
return localize2.ordinalNumber(date.getUTCMinutes(), {
|
49800
|
+
unit: "minute"
|
49801
|
+
});
|
49802
|
+
}
|
49803
|
+
return lightFormatters_default.m(date, token);
|
49804
|
+
},
|
49805
|
+
s: function(date, token, localize2) {
|
49806
|
+
if (token === "so") {
|
49807
|
+
return localize2.ordinalNumber(date.getUTCSeconds(), {
|
49808
|
+
unit: "second"
|
49809
|
+
});
|
49810
|
+
}
|
49811
|
+
return lightFormatters_default.s(date, token);
|
49812
|
+
},
|
49813
|
+
S: function(date, token) {
|
49814
|
+
return lightFormatters_default.S(date, token);
|
49815
|
+
},
|
49816
|
+
X: function(date, token, _localize, options) {
|
49817
|
+
var originalDate = options._originalDate || date;
|
49818
|
+
var timezoneOffset = originalDate.getTimezoneOffset();
|
49819
|
+
if (timezoneOffset === 0) {
|
49820
|
+
return "Z";
|
49821
|
+
}
|
49822
|
+
switch (token) {
|
49823
|
+
case "X":
|
49824
|
+
return formatTimezoneWithOptionalMinutes(timezoneOffset);
|
49825
|
+
case "XXXX":
|
49826
|
+
case "XX":
|
49827
|
+
return formatTimezone(timezoneOffset);
|
49828
|
+
case "XXXXX":
|
49829
|
+
case "XXX":
|
49830
|
+
default:
|
49831
|
+
return formatTimezone(timezoneOffset, ":");
|
49832
|
+
}
|
49833
|
+
},
|
49834
|
+
x: function(date, token, _localize, options) {
|
49835
|
+
var originalDate = options._originalDate || date;
|
49836
|
+
var timezoneOffset = originalDate.getTimezoneOffset();
|
49837
|
+
switch (token) {
|
49838
|
+
case "x":
|
49839
|
+
return formatTimezoneWithOptionalMinutes(timezoneOffset);
|
49840
|
+
case "xxxx":
|
49841
|
+
case "xx":
|
49842
|
+
return formatTimezone(timezoneOffset);
|
49843
|
+
case "xxxxx":
|
49844
|
+
case "xxx":
|
49845
|
+
default:
|
49846
|
+
return formatTimezone(timezoneOffset, ":");
|
49847
|
+
}
|
49848
|
+
},
|
49849
|
+
O: function(date, token, _localize, options) {
|
49850
|
+
var originalDate = options._originalDate || date;
|
49851
|
+
var timezoneOffset = originalDate.getTimezoneOffset();
|
49852
|
+
switch (token) {
|
49853
|
+
case "O":
|
49854
|
+
case "OO":
|
49855
|
+
case "OOO":
|
49856
|
+
return "GMT" + formatTimezoneShort(timezoneOffset, ":");
|
49857
|
+
case "OOOO":
|
49858
|
+
default:
|
49859
|
+
return "GMT" + formatTimezone(timezoneOffset, ":");
|
49860
|
+
}
|
49861
|
+
},
|
49862
|
+
z: function(date, token, _localize, options) {
|
49863
|
+
var originalDate = options._originalDate || date;
|
49864
|
+
var timezoneOffset = originalDate.getTimezoneOffset();
|
49865
|
+
switch (token) {
|
49866
|
+
case "z":
|
49867
|
+
case "zz":
|
49868
|
+
case "zzz":
|
49869
|
+
return "GMT" + formatTimezoneShort(timezoneOffset, ":");
|
49870
|
+
case "zzzz":
|
49871
|
+
default:
|
49872
|
+
return "GMT" + formatTimezone(timezoneOffset, ":");
|
49873
|
+
}
|
49874
|
+
},
|
49875
|
+
t: function(date, token, _localize, options) {
|
49876
|
+
var originalDate = options._originalDate || date;
|
49877
|
+
var timestamp = Math.floor(originalDate.getTime() / 1e3);
|
49878
|
+
return addLeadingZeros(timestamp, token.length);
|
49879
|
+
},
|
49880
|
+
T: function(date, token, _localize, options) {
|
49881
|
+
var originalDate = options._originalDate || date;
|
49882
|
+
var timestamp = originalDate.getTime();
|
49883
|
+
return addLeadingZeros(timestamp, token.length);
|
49884
|
+
}
|
49885
|
+
};
|
49886
|
+
function formatTimezoneShort(offset, dirtyDelimiter) {
|
49887
|
+
var sign5 = offset > 0 ? "-" : "+";
|
49888
|
+
var absOffset = Math.abs(offset);
|
49889
|
+
var hours = Math.floor(absOffset / 60);
|
49890
|
+
var minutes = absOffset % 60;
|
49891
|
+
if (minutes === 0) {
|
49892
|
+
return sign5 + String(hours);
|
49893
|
+
}
|
49894
|
+
var delimiter = dirtyDelimiter || "";
|
49895
|
+
return sign5 + String(hours) + delimiter + addLeadingZeros(minutes, 2);
|
49896
|
+
}
|
49897
|
+
__name(formatTimezoneShort, "formatTimezoneShort");
|
49898
|
+
function formatTimezoneWithOptionalMinutes(offset, dirtyDelimiter) {
|
49899
|
+
if (offset % 60 === 0) {
|
49900
|
+
var sign5 = offset > 0 ? "-" : "+";
|
49901
|
+
return sign5 + addLeadingZeros(Math.abs(offset) / 60, 2);
|
49902
|
+
}
|
49903
|
+
return formatTimezone(offset, dirtyDelimiter);
|
49904
|
+
}
|
49905
|
+
__name(formatTimezoneWithOptionalMinutes, "formatTimezoneWithOptionalMinutes");
|
49906
|
+
function formatTimezone(offset, dirtyDelimiter) {
|
49907
|
+
var delimiter = dirtyDelimiter || "";
|
49908
|
+
var sign5 = offset > 0 ? "-" : "+";
|
49909
|
+
var absOffset = Math.abs(offset);
|
49910
|
+
var hours = addLeadingZeros(Math.floor(absOffset / 60), 2);
|
49911
|
+
var minutes = addLeadingZeros(absOffset % 60, 2);
|
49912
|
+
return sign5 + hours + delimiter + minutes;
|
49913
|
+
}
|
49914
|
+
__name(formatTimezone, "formatTimezone");
|
49915
|
+
var formatters_default = formatters2;
|
49916
|
+
|
49917
|
+
// ../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/format/longFormatters/index.js
|
49918
|
+
function dateLongFormatter(pattern, formatLong2) {
|
49919
|
+
switch (pattern) {
|
49920
|
+
case "P":
|
49921
|
+
return formatLong2.date({
|
49922
|
+
width: "short"
|
49923
|
+
});
|
49924
|
+
case "PP":
|
49925
|
+
return formatLong2.date({
|
49926
|
+
width: "medium"
|
49927
|
+
});
|
49928
|
+
case "PPP":
|
49929
|
+
return formatLong2.date({
|
49930
|
+
width: "long"
|
49931
|
+
});
|
49932
|
+
case "PPPP":
|
49933
|
+
default:
|
49934
|
+
return formatLong2.date({
|
49935
|
+
width: "full"
|
49936
|
+
});
|
49937
|
+
}
|
49938
|
+
}
|
49939
|
+
__name(dateLongFormatter, "dateLongFormatter");
|
49940
|
+
function timeLongFormatter(pattern, formatLong2) {
|
49941
|
+
switch (pattern) {
|
49942
|
+
case "p":
|
49943
|
+
return formatLong2.time({
|
49944
|
+
width: "short"
|
49945
|
+
});
|
49946
|
+
case "pp":
|
49947
|
+
return formatLong2.time({
|
49948
|
+
width: "medium"
|
49949
|
+
});
|
49950
|
+
case "ppp":
|
49951
|
+
return formatLong2.time({
|
49952
|
+
width: "long"
|
49953
|
+
});
|
49954
|
+
case "pppp":
|
49955
|
+
default:
|
49956
|
+
return formatLong2.time({
|
49957
|
+
width: "full"
|
49958
|
+
});
|
49959
|
+
}
|
49960
|
+
}
|
49961
|
+
__name(timeLongFormatter, "timeLongFormatter");
|
49962
|
+
function dateTimeLongFormatter(pattern, formatLong2) {
|
49963
|
+
var matchResult = pattern.match(/(P+)(p+)?/) || [];
|
49964
|
+
var datePattern = matchResult[1];
|
49965
|
+
var timePattern = matchResult[2];
|
49966
|
+
if (!timePattern) {
|
49967
|
+
return dateLongFormatter(pattern, formatLong2);
|
49968
|
+
}
|
49969
|
+
var dateTimeFormat;
|
49970
|
+
switch (datePattern) {
|
49971
|
+
case "P":
|
49972
|
+
dateTimeFormat = formatLong2.dateTime({
|
49973
|
+
width: "short"
|
49974
|
+
});
|
49975
|
+
break;
|
49976
|
+
case "PP":
|
49977
|
+
dateTimeFormat = formatLong2.dateTime({
|
49978
|
+
width: "medium"
|
49979
|
+
});
|
49980
|
+
break;
|
49981
|
+
case "PPP":
|
49982
|
+
dateTimeFormat = formatLong2.dateTime({
|
49983
|
+
width: "long"
|
49984
|
+
});
|
49985
|
+
break;
|
49986
|
+
case "PPPP":
|
49987
|
+
default:
|
49988
|
+
dateTimeFormat = formatLong2.dateTime({
|
49989
|
+
width: "full"
|
49990
|
+
});
|
49991
|
+
break;
|
49992
|
+
}
|
49993
|
+
return dateTimeFormat.replace("{{date}}", dateLongFormatter(datePattern, formatLong2)).replace("{{time}}", timeLongFormatter(timePattern, formatLong2));
|
49994
|
+
}
|
49995
|
+
__name(dateTimeLongFormatter, "dateTimeLongFormatter");
|
49996
|
+
var longFormatters = {
|
49997
|
+
p: timeLongFormatter,
|
49998
|
+
P: dateTimeLongFormatter
|
49999
|
+
};
|
50000
|
+
var longFormatters_default = longFormatters;
|
50001
|
+
|
50002
|
+
// ../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/protectedTokens/index.js
|
50003
|
+
var protectedDayOfYearTokens = ["D", "DD"];
|
50004
|
+
var protectedWeekYearTokens = ["YY", "YYYY"];
|
50005
|
+
function isProtectedDayOfYearToken(token) {
|
50006
|
+
return protectedDayOfYearTokens.indexOf(token) !== -1;
|
50007
|
+
}
|
50008
|
+
__name(isProtectedDayOfYearToken, "isProtectedDayOfYearToken");
|
50009
|
+
function isProtectedWeekYearToken(token) {
|
50010
|
+
return protectedWeekYearTokens.indexOf(token) !== -1;
|
50011
|
+
}
|
50012
|
+
__name(isProtectedWeekYearToken, "isProtectedWeekYearToken");
|
50013
|
+
function throwProtectedError(token, format2, input) {
|
50014
|
+
if (token === "YYYY") {
|
50015
|
+
throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(format2, "`) for formatting years to the input `").concat(input, "`; see: https://git.io/fxCyr"));
|
50016
|
+
} else if (token === "YY") {
|
50017
|
+
throw new RangeError("Use `yy` instead of `YY` (in `".concat(format2, "`) for formatting years to the input `").concat(input, "`; see: https://git.io/fxCyr"));
|
50018
|
+
} else if (token === "D") {
|
50019
|
+
throw new RangeError("Use `d` instead of `D` (in `".concat(format2, "`) for formatting days of the month to the input `").concat(input, "`; see: https://git.io/fxCyr"));
|
50020
|
+
} else if (token === "DD") {
|
50021
|
+
throw new RangeError("Use `dd` instead of `DD` (in `".concat(format2, "`) for formatting days of the month to the input `").concat(input, "`; see: https://git.io/fxCyr"));
|
50022
|
+
}
|
50023
|
+
}
|
50024
|
+
__name(throwProtectedError, "throwProtectedError");
|
50025
|
+
|
50026
|
+
// ../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/format/index.js
|
50027
|
+
var formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;
|
50028
|
+
var longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
|
50029
|
+
var escapedStringRegExp = /^'([^]*?)'?$/;
|
50030
|
+
var doubleQuoteRegExp = /''/g;
|
50031
|
+
var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
|
50032
|
+
function format(dirtyDate, dirtyFormatStr, dirtyOptions) {
|
50033
|
+
requiredArgs(2, arguments);
|
50034
|
+
var formatStr = String(dirtyFormatStr);
|
50035
|
+
var options = dirtyOptions || {};
|
50036
|
+
var locale2 = options.locale || en_US_default;
|
50037
|
+
var localeFirstWeekContainsDate = locale2.options && locale2.options.firstWeekContainsDate;
|
50038
|
+
var defaultFirstWeekContainsDate = localeFirstWeekContainsDate == null ? 1 : toInteger(localeFirstWeekContainsDate);
|
50039
|
+
var firstWeekContainsDate = options.firstWeekContainsDate == null ? defaultFirstWeekContainsDate : toInteger(options.firstWeekContainsDate);
|
50040
|
+
if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
|
50041
|
+
throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
|
50042
|
+
}
|
50043
|
+
var localeWeekStartsOn = locale2.options && locale2.options.weekStartsOn;
|
50044
|
+
var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : toInteger(localeWeekStartsOn);
|
50045
|
+
var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : toInteger(options.weekStartsOn);
|
50046
|
+
if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
|
50047
|
+
throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
|
50048
|
+
}
|
50049
|
+
if (!locale2.localize) {
|
50050
|
+
throw new RangeError("locale must contain localize property");
|
50051
|
+
}
|
50052
|
+
if (!locale2.formatLong) {
|
50053
|
+
throw new RangeError("locale must contain formatLong property");
|
50054
|
+
}
|
50055
|
+
var originalDate = toDate(dirtyDate);
|
50056
|
+
if (!isValid(originalDate)) {
|
50057
|
+
throw new RangeError("Invalid time value");
|
50058
|
+
}
|
50059
|
+
var timezoneOffset = getTimezoneOffsetInMilliseconds(originalDate);
|
50060
|
+
var utcDate = subMilliseconds(originalDate, timezoneOffset);
|
50061
|
+
var formatterOptions = {
|
50062
|
+
firstWeekContainsDate,
|
50063
|
+
weekStartsOn,
|
50064
|
+
locale: locale2,
|
50065
|
+
_originalDate: originalDate
|
50066
|
+
};
|
50067
|
+
var result = formatStr.match(longFormattingTokensRegExp).map(function(substring) {
|
50068
|
+
var firstCharacter = substring[0];
|
50069
|
+
if (firstCharacter === "p" || firstCharacter === "P") {
|
50070
|
+
var longFormatter = longFormatters_default[firstCharacter];
|
50071
|
+
return longFormatter(substring, locale2.formatLong, formatterOptions);
|
50072
|
+
}
|
50073
|
+
return substring;
|
50074
|
+
}).join("").match(formattingTokensRegExp).map(function(substring) {
|
50075
|
+
if (substring === "''") {
|
50076
|
+
return "'";
|
50077
|
+
}
|
50078
|
+
var firstCharacter = substring[0];
|
50079
|
+
if (firstCharacter === "'") {
|
50080
|
+
return cleanEscapedString(substring);
|
50081
|
+
}
|
50082
|
+
var formatter = formatters_default[firstCharacter];
|
50083
|
+
if (formatter) {
|
50084
|
+
if (!options.useAdditionalWeekYearTokens && isProtectedWeekYearToken(substring)) {
|
50085
|
+
throwProtectedError(substring, dirtyFormatStr, dirtyDate);
|
50086
|
+
}
|
50087
|
+
if (!options.useAdditionalDayOfYearTokens && isProtectedDayOfYearToken(substring)) {
|
50088
|
+
throwProtectedError(substring, dirtyFormatStr, dirtyDate);
|
50089
|
+
}
|
50090
|
+
return formatter(utcDate, substring, locale2.localize, formatterOptions);
|
50091
|
+
}
|
50092
|
+
if (firstCharacter.match(unescapedLatinCharacterRegExp)) {
|
50093
|
+
throw new RangeError("Format string contains an unescaped latin alphabet character `" + firstCharacter + "`");
|
50094
|
+
}
|
50095
|
+
return substring;
|
50096
|
+
}).join("");
|
50097
|
+
return result;
|
50098
|
+
}
|
50099
|
+
__name(format, "format");
|
50100
|
+
function cleanEscapedString(input) {
|
50101
|
+
return input.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp, "'");
|
50102
|
+
}
|
50103
|
+
__name(cleanEscapedString, "cleanEscapedString");
|
50104
|
+
|
48544
50105
|
// src/wallet/verify.ts
|
50106
|
+
var transformErrorMessage = /* @__PURE__ */ __name((error, credential) => {
|
50107
|
+
if (error.startsWith("expiration")) {
|
50108
|
+
return credential.expirationDate ? `Invalid \u2022 Expired ${format(new Date(credential.expirationDate), "dd MMM yyyy").toUpperCase()}` : "Invalid \u2022 Expired";
|
50109
|
+
}
|
50110
|
+
return error;
|
50111
|
+
}, "transformErrorMessage");
|
50112
|
+
var transformCheckMessage = /* @__PURE__ */ __name((check, credential) => {
|
50113
|
+
return {
|
50114
|
+
proof: "Valid",
|
50115
|
+
expiration: credential.expirationDate ? `Valid \u2022 Expires ${format(new Date(credential.expirationDate), "dd MMM yyyy").toUpperCase()}` : "Valid \u2022 Does Not Expire"
|
50116
|
+
}[check] || check;
|
50117
|
+
}, "transformCheckMessage");
|
48545
50118
|
var verifyCredential3 = /* @__PURE__ */ __name((wallet) => {
|
48546
50119
|
return (credential) => __async(void 0, null, function* () {
|
48547
50120
|
const rawVerificationCheck = yield wallet.pluginMethods.verifyCredential(credential);
|
@@ -48550,7 +50123,7 @@ var verifyCredential3 = /* @__PURE__ */ __name((wallet) => {
|
|
48550
50123
|
verificationItems.push({
|
48551
50124
|
status: VerificationStatus.Failed,
|
48552
50125
|
check: "hmm",
|
48553
|
-
details: error
|
50126
|
+
details: transformErrorMessage(error, credential)
|
48554
50127
|
});
|
48555
50128
|
});
|
48556
50129
|
rawVerificationCheck.warnings.forEach((warning) => {
|
@@ -48564,7 +50137,7 @@ var verifyCredential3 = /* @__PURE__ */ __name((wallet) => {
|
|
48564
50137
|
verificationItems.push({
|
48565
50138
|
status: VerificationStatus.Success,
|
48566
50139
|
check,
|
48567
|
-
message: check
|
50140
|
+
message: transformCheckMessage(check, credential)
|
48568
50141
|
});
|
48569
50142
|
});
|
48570
50143
|
return verificationItems;
|