@formatjs/cli 6.9.0 → 6.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/formatjs +719 -901
- package/package.json +5 -5
package/bin/formatjs
CHANGED
|
@@ -7599,9 +7599,9 @@ var require_out2 = __commonJS({
|
|
|
7599
7599
|
}
|
|
7600
7600
|
});
|
|
7601
7601
|
|
|
7602
|
-
// node_modules/.aspect_rules_js/reusify@1.0
|
|
7602
|
+
// node_modules/.aspect_rules_js/reusify@1.1.0/node_modules/reusify/reusify.js
|
|
7603
7603
|
var require_reusify = __commonJS({
|
|
7604
|
-
"node_modules/.aspect_rules_js/reusify@1.0
|
|
7604
|
+
"node_modules/.aspect_rules_js/reusify@1.1.0/node_modules/reusify/reusify.js"(exports, module2) {
|
|
7605
7605
|
"use strict";
|
|
7606
7606
|
function reusify(Constructor) {
|
|
7607
7607
|
var head = new Constructor();
|
|
@@ -7630,9 +7630,9 @@ var require_reusify = __commonJS({
|
|
|
7630
7630
|
}
|
|
7631
7631
|
});
|
|
7632
7632
|
|
|
7633
|
-
// node_modules/.aspect_rules_js/fastq@1.
|
|
7633
|
+
// node_modules/.aspect_rules_js/fastq@1.20.1/node_modules/fastq/queue.js
|
|
7634
7634
|
var require_queue = __commonJS({
|
|
7635
|
-
"node_modules/.aspect_rules_js/fastq@1.
|
|
7635
|
+
"node_modules/.aspect_rules_js/fastq@1.20.1/node_modules/fastq/queue.js"(exports, module2) {
|
|
7636
7636
|
"use strict";
|
|
7637
7637
|
var reusify = require_reusify();
|
|
7638
7638
|
function fastqueue(context, worker, _concurrency) {
|
|
@@ -7679,7 +7679,8 @@ var require_queue = __commonJS({
|
|
|
7679
7679
|
empty: noop,
|
|
7680
7680
|
kill,
|
|
7681
7681
|
killAndDrain,
|
|
7682
|
-
error: error2
|
|
7682
|
+
error: error2,
|
|
7683
|
+
abort
|
|
7683
7684
|
};
|
|
7684
7685
|
return self;
|
|
7685
7686
|
function running() {
|
|
@@ -7799,6 +7800,28 @@ var require_queue = __commonJS({
|
|
|
7799
7800
|
self.drain();
|
|
7800
7801
|
self.drain = noop;
|
|
7801
7802
|
}
|
|
7803
|
+
function abort() {
|
|
7804
|
+
var current = queueHead;
|
|
7805
|
+
queueHead = null;
|
|
7806
|
+
queueTail = null;
|
|
7807
|
+
while (current) {
|
|
7808
|
+
var next = current.next;
|
|
7809
|
+
var callback = current.callback;
|
|
7810
|
+
var errorHandler2 = current.errorHandler;
|
|
7811
|
+
var val = current.value;
|
|
7812
|
+
var context2 = current.context;
|
|
7813
|
+
current.value = null;
|
|
7814
|
+
current.callback = noop;
|
|
7815
|
+
current.errorHandler = null;
|
|
7816
|
+
if (errorHandler2) {
|
|
7817
|
+
errorHandler2(new Error("abort"), val);
|
|
7818
|
+
}
|
|
7819
|
+
callback.call(context2, new Error("abort"));
|
|
7820
|
+
current.release(current);
|
|
7821
|
+
current = next;
|
|
7822
|
+
}
|
|
7823
|
+
self.drain = noop;
|
|
7824
|
+
}
|
|
7802
7825
|
function error2(handler) {
|
|
7803
7826
|
errorHandler = handler;
|
|
7804
7827
|
}
|
|
@@ -9368,139 +9391,11 @@ var require_loud_rejection = __commonJS({
|
|
|
9368
9391
|
}
|
|
9369
9392
|
});
|
|
9370
9393
|
|
|
9371
|
-
// node_modules/.aspect_rules_js/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs
|
|
9372
|
-
function __spreadArray(to, from, pack) {
|
|
9373
|
-
if (pack || arguments.length === 2)
|
|
9374
|
-
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
9375
|
-
if (ar || !(i in from)) {
|
|
9376
|
-
if (!ar)
|
|
9377
|
-
ar = Array.prototype.slice.call(from, 0, i);
|
|
9378
|
-
ar[i] = from[i];
|
|
9379
|
-
}
|
|
9380
|
-
}
|
|
9381
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
9382
|
-
}
|
|
9383
|
-
var __assign;
|
|
9384
|
-
var init_tslib_es6 = __esm({
|
|
9385
|
-
"node_modules/.aspect_rules_js/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs"() {
|
|
9386
|
-
__assign = function() {
|
|
9387
|
-
__assign = Object.assign || function __assign2(t) {
|
|
9388
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9389
|
-
s = arguments[i];
|
|
9390
|
-
for (var p2 in s)
|
|
9391
|
-
if (Object.prototype.hasOwnProperty.call(s, p2))
|
|
9392
|
-
t[p2] = s[p2];
|
|
9393
|
-
}
|
|
9394
|
-
return t;
|
|
9395
|
-
};
|
|
9396
|
-
return __assign.apply(this, arguments);
|
|
9397
|
-
};
|
|
9398
|
-
}
|
|
9399
|
-
});
|
|
9400
|
-
|
|
9401
|
-
// node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/error.js
|
|
9402
|
-
var ErrorKind;
|
|
9403
|
-
var init_error = __esm({
|
|
9404
|
-
"node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/error.js"() {
|
|
9405
|
-
(function(ErrorKind2) {
|
|
9406
|
-
ErrorKind2[ErrorKind2["EXPECT_ARGUMENT_CLOSING_BRACE"] = 1] = "EXPECT_ARGUMENT_CLOSING_BRACE";
|
|
9407
|
-
ErrorKind2[ErrorKind2["EMPTY_ARGUMENT"] = 2] = "EMPTY_ARGUMENT";
|
|
9408
|
-
ErrorKind2[ErrorKind2["MALFORMED_ARGUMENT"] = 3] = "MALFORMED_ARGUMENT";
|
|
9409
|
-
ErrorKind2[ErrorKind2["EXPECT_ARGUMENT_TYPE"] = 4] = "EXPECT_ARGUMENT_TYPE";
|
|
9410
|
-
ErrorKind2[ErrorKind2["INVALID_ARGUMENT_TYPE"] = 5] = "INVALID_ARGUMENT_TYPE";
|
|
9411
|
-
ErrorKind2[ErrorKind2["EXPECT_ARGUMENT_STYLE"] = 6] = "EXPECT_ARGUMENT_STYLE";
|
|
9412
|
-
ErrorKind2[ErrorKind2["INVALID_NUMBER_SKELETON"] = 7] = "INVALID_NUMBER_SKELETON";
|
|
9413
|
-
ErrorKind2[ErrorKind2["INVALID_DATE_TIME_SKELETON"] = 8] = "INVALID_DATE_TIME_SKELETON";
|
|
9414
|
-
ErrorKind2[ErrorKind2["EXPECT_NUMBER_SKELETON"] = 9] = "EXPECT_NUMBER_SKELETON";
|
|
9415
|
-
ErrorKind2[ErrorKind2["EXPECT_DATE_TIME_SKELETON"] = 10] = "EXPECT_DATE_TIME_SKELETON";
|
|
9416
|
-
ErrorKind2[ErrorKind2["UNCLOSED_QUOTE_IN_ARGUMENT_STYLE"] = 11] = "UNCLOSED_QUOTE_IN_ARGUMENT_STYLE";
|
|
9417
|
-
ErrorKind2[ErrorKind2["EXPECT_SELECT_ARGUMENT_OPTIONS"] = 12] = "EXPECT_SELECT_ARGUMENT_OPTIONS";
|
|
9418
|
-
ErrorKind2[ErrorKind2["EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE"] = 13] = "EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE";
|
|
9419
|
-
ErrorKind2[ErrorKind2["INVALID_PLURAL_ARGUMENT_OFFSET_VALUE"] = 14] = "INVALID_PLURAL_ARGUMENT_OFFSET_VALUE";
|
|
9420
|
-
ErrorKind2[ErrorKind2["EXPECT_SELECT_ARGUMENT_SELECTOR"] = 15] = "EXPECT_SELECT_ARGUMENT_SELECTOR";
|
|
9421
|
-
ErrorKind2[ErrorKind2["EXPECT_PLURAL_ARGUMENT_SELECTOR"] = 16] = "EXPECT_PLURAL_ARGUMENT_SELECTOR";
|
|
9422
|
-
ErrorKind2[ErrorKind2["EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT"] = 17] = "EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT";
|
|
9423
|
-
ErrorKind2[ErrorKind2["EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT"] = 18] = "EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT";
|
|
9424
|
-
ErrorKind2[ErrorKind2["INVALID_PLURAL_ARGUMENT_SELECTOR"] = 19] = "INVALID_PLURAL_ARGUMENT_SELECTOR";
|
|
9425
|
-
ErrorKind2[ErrorKind2["DUPLICATE_PLURAL_ARGUMENT_SELECTOR"] = 20] = "DUPLICATE_PLURAL_ARGUMENT_SELECTOR";
|
|
9426
|
-
ErrorKind2[ErrorKind2["DUPLICATE_SELECT_ARGUMENT_SELECTOR"] = 21] = "DUPLICATE_SELECT_ARGUMENT_SELECTOR";
|
|
9427
|
-
ErrorKind2[ErrorKind2["MISSING_OTHER_CLAUSE"] = 22] = "MISSING_OTHER_CLAUSE";
|
|
9428
|
-
ErrorKind2[ErrorKind2["INVALID_TAG"] = 23] = "INVALID_TAG";
|
|
9429
|
-
ErrorKind2[ErrorKind2["INVALID_TAG_NAME"] = 25] = "INVALID_TAG_NAME";
|
|
9430
|
-
ErrorKind2[ErrorKind2["UNMATCHED_CLOSING_TAG"] = 26] = "UNMATCHED_CLOSING_TAG";
|
|
9431
|
-
ErrorKind2[ErrorKind2["UNCLOSED_TAG"] = 27] = "UNCLOSED_TAG";
|
|
9432
|
-
})(ErrorKind || (ErrorKind = {}));
|
|
9433
|
-
}
|
|
9434
|
-
});
|
|
9435
|
-
|
|
9436
|
-
// node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/types.js
|
|
9437
|
-
function isLiteralElement(el) {
|
|
9438
|
-
return el.type === TYPE.literal;
|
|
9439
|
-
}
|
|
9440
|
-
function isArgumentElement(el) {
|
|
9441
|
-
return el.type === TYPE.argument;
|
|
9442
|
-
}
|
|
9443
|
-
function isNumberElement(el) {
|
|
9444
|
-
return el.type === TYPE.number;
|
|
9445
|
-
}
|
|
9446
|
-
function isDateElement(el) {
|
|
9447
|
-
return el.type === TYPE.date;
|
|
9448
|
-
}
|
|
9449
|
-
function isTimeElement(el) {
|
|
9450
|
-
return el.type === TYPE.time;
|
|
9451
|
-
}
|
|
9452
|
-
function isSelectElement(el) {
|
|
9453
|
-
return el.type === TYPE.select;
|
|
9454
|
-
}
|
|
9455
|
-
function isPluralElement(el) {
|
|
9456
|
-
return el.type === TYPE.plural;
|
|
9457
|
-
}
|
|
9458
|
-
function isPoundElement(el) {
|
|
9459
|
-
return el.type === TYPE.pound;
|
|
9460
|
-
}
|
|
9461
|
-
function isTagElement(el) {
|
|
9462
|
-
return el.type === TYPE.tag;
|
|
9463
|
-
}
|
|
9464
|
-
function isNumberSkeleton(el) {
|
|
9465
|
-
return !!(el && typeof el === "object" && el.type === SKELETON_TYPE.number);
|
|
9466
|
-
}
|
|
9467
|
-
function isDateTimeSkeleton(el) {
|
|
9468
|
-
return !!(el && typeof el === "object" && el.type === SKELETON_TYPE.dateTime);
|
|
9469
|
-
}
|
|
9470
|
-
var TYPE, SKELETON_TYPE;
|
|
9471
|
-
var init_types = __esm({
|
|
9472
|
-
"node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/types.js"() {
|
|
9473
|
-
(function(TYPE2) {
|
|
9474
|
-
TYPE2[TYPE2["literal"] = 0] = "literal";
|
|
9475
|
-
TYPE2[TYPE2["argument"] = 1] = "argument";
|
|
9476
|
-
TYPE2[TYPE2["number"] = 2] = "number";
|
|
9477
|
-
TYPE2[TYPE2["date"] = 3] = "date";
|
|
9478
|
-
TYPE2[TYPE2["time"] = 4] = "time";
|
|
9479
|
-
TYPE2[TYPE2["select"] = 5] = "select";
|
|
9480
|
-
TYPE2[TYPE2["plural"] = 6] = "plural";
|
|
9481
|
-
TYPE2[TYPE2["pound"] = 7] = "pound";
|
|
9482
|
-
TYPE2[TYPE2["tag"] = 8] = "tag";
|
|
9483
|
-
})(TYPE || (TYPE = {}));
|
|
9484
|
-
(function(SKELETON_TYPE2) {
|
|
9485
|
-
SKELETON_TYPE2[SKELETON_TYPE2["number"] = 0] = "number";
|
|
9486
|
-
SKELETON_TYPE2[SKELETON_TYPE2["dateTime"] = 1] = "dateTime";
|
|
9487
|
-
})(SKELETON_TYPE || (SKELETON_TYPE = {}));
|
|
9488
|
-
}
|
|
9489
|
-
});
|
|
9490
|
-
|
|
9491
|
-
// node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/regex.generated.js
|
|
9492
|
-
var SPACE_SEPARATOR_REGEX;
|
|
9493
|
-
var init_regex_generated = __esm({
|
|
9494
|
-
"node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/regex.generated.js"() {
|
|
9495
|
-
SPACE_SEPARATOR_REGEX = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/;
|
|
9496
|
-
}
|
|
9497
|
-
});
|
|
9498
|
-
|
|
9499
9394
|
// node_modules/.aspect_rules_js/@formatjs+icu-skeleton-parser@0.0.0/node_modules/@formatjs/icu-skeleton-parser/date-time.js
|
|
9500
9395
|
function parseDateTimeSkeleton(skeleton) {
|
|
9501
|
-
|
|
9502
|
-
skeleton.replace(DATE_TIME_REGEX,
|
|
9503
|
-
|
|
9396
|
+
const result = {};
|
|
9397
|
+
skeleton.replace(DATE_TIME_REGEX, (match) => {
|
|
9398
|
+
const len = match.length;
|
|
9504
9399
|
switch (match[0]) {
|
|
9505
9400
|
case "G":
|
|
9506
9401
|
result.era = len === 4 ? "long" : len === 5 ? "narrow" : "short";
|
|
@@ -9518,7 +9413,13 @@ function parseDateTimeSkeleton(skeleton) {
|
|
|
9518
9413
|
throw new RangeError("`q/Q` (quarter) patterns are not supported");
|
|
9519
9414
|
case "M":
|
|
9520
9415
|
case "L":
|
|
9521
|
-
result.month = [
|
|
9416
|
+
result.month = [
|
|
9417
|
+
"numeric",
|
|
9418
|
+
"2-digit",
|
|
9419
|
+
"short",
|
|
9420
|
+
"long",
|
|
9421
|
+
"narrow"
|
|
9422
|
+
][len - 1];
|
|
9522
9423
|
break;
|
|
9523
9424
|
case "w":
|
|
9524
9425
|
case "W":
|
|
@@ -9537,13 +9438,23 @@ function parseDateTimeSkeleton(skeleton) {
|
|
|
9537
9438
|
if (len < 4) {
|
|
9538
9439
|
throw new RangeError("`e..eee` (weekday) patterns are not supported");
|
|
9539
9440
|
}
|
|
9540
|
-
result.weekday = [
|
|
9441
|
+
result.weekday = [
|
|
9442
|
+
"short",
|
|
9443
|
+
"long",
|
|
9444
|
+
"narrow",
|
|
9445
|
+
"short"
|
|
9446
|
+
][len - 4];
|
|
9541
9447
|
break;
|
|
9542
9448
|
case "c":
|
|
9543
9449
|
if (len < 4) {
|
|
9544
9450
|
throw new RangeError("`c..ccc` (weekday) patterns are not supported");
|
|
9545
9451
|
}
|
|
9546
|
-
result.weekday = [
|
|
9452
|
+
result.weekday = [
|
|
9453
|
+
"short",
|
|
9454
|
+
"long",
|
|
9455
|
+
"narrow",
|
|
9456
|
+
"short"
|
|
9457
|
+
][len - 4];
|
|
9547
9458
|
break;
|
|
9548
9459
|
case "a":
|
|
9549
9460
|
result.hour12 = true;
|
|
@@ -9604,7 +9515,7 @@ var init_date_time = __esm({
|
|
|
9604
9515
|
|
|
9605
9516
|
// node_modules/.aspect_rules_js/@formatjs+icu-skeleton-parser@0.0.0/node_modules/@formatjs/icu-skeleton-parser/regex.generated.js
|
|
9606
9517
|
var WHITE_SPACE_REGEX;
|
|
9607
|
-
var
|
|
9518
|
+
var init_regex_generated = __esm({
|
|
9608
9519
|
"node_modules/.aspect_rules_js/@formatjs+icu-skeleton-parser@0.0.0/node_modules/@formatjs/icu-skeleton-parser/regex.generated.js"() {
|
|
9609
9520
|
WHITE_SPACE_REGEX = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
|
|
9610
9521
|
}
|
|
@@ -9615,24 +9526,23 @@ function parseNumberSkeletonFromString(skeleton) {
|
|
|
9615
9526
|
if (skeleton.length === 0) {
|
|
9616
9527
|
throw new Error("Number skeleton cannot be empty");
|
|
9617
9528
|
}
|
|
9618
|
-
|
|
9619
|
-
|
|
9620
|
-
|
|
9621
|
-
|
|
9622
|
-
for (var _i = 0, stringTokens_1 = stringTokens; _i < stringTokens_1.length; _i++) {
|
|
9623
|
-
var stringToken = stringTokens_1[_i];
|
|
9624
|
-
var stemAndOptions = stringToken.split("/");
|
|
9529
|
+
const stringTokens = skeleton.split(WHITE_SPACE_REGEX).filter((x) => x.length > 0);
|
|
9530
|
+
const tokens = [];
|
|
9531
|
+
for (const stringToken of stringTokens) {
|
|
9532
|
+
let stemAndOptions = stringToken.split("/");
|
|
9625
9533
|
if (stemAndOptions.length === 0) {
|
|
9626
9534
|
throw new Error("Invalid number skeleton");
|
|
9627
9535
|
}
|
|
9628
|
-
|
|
9629
|
-
for (
|
|
9630
|
-
var option = options_1[_a];
|
|
9536
|
+
const [stem, ...options] = stemAndOptions;
|
|
9537
|
+
for (const option of options) {
|
|
9631
9538
|
if (option.length === 0) {
|
|
9632
9539
|
throw new Error("Invalid number skeleton");
|
|
9633
9540
|
}
|
|
9634
9541
|
}
|
|
9635
|
-
tokens.push({
|
|
9542
|
+
tokens.push({
|
|
9543
|
+
stem,
|
|
9544
|
+
options
|
|
9545
|
+
});
|
|
9636
9546
|
}
|
|
9637
9547
|
return tokens;
|
|
9638
9548
|
}
|
|
@@ -9640,7 +9550,7 @@ function icuUnitToEcma(unit) {
|
|
|
9640
9550
|
return unit.replace(/^(.*?)-/, "");
|
|
9641
9551
|
}
|
|
9642
9552
|
function parseSignificantPrecision(str) {
|
|
9643
|
-
|
|
9553
|
+
const result = {};
|
|
9644
9554
|
if (str[str.length - 1] === "r") {
|
|
9645
9555
|
result.roundingPriority = "morePrecision";
|
|
9646
9556
|
} else if (str[str.length - 1] === "s") {
|
|
@@ -9665,19 +9575,13 @@ function parseSignificantPrecision(str) {
|
|
|
9665
9575
|
function parseSign(str) {
|
|
9666
9576
|
switch (str) {
|
|
9667
9577
|
case "sign-auto":
|
|
9668
|
-
return {
|
|
9669
|
-
signDisplay: "auto"
|
|
9670
|
-
};
|
|
9578
|
+
return { signDisplay: "auto" };
|
|
9671
9579
|
case "sign-accounting":
|
|
9672
9580
|
case "()":
|
|
9673
|
-
return {
|
|
9674
|
-
currencySign: "accounting"
|
|
9675
|
-
};
|
|
9581
|
+
return { currencySign: "accounting" };
|
|
9676
9582
|
case "sign-always":
|
|
9677
9583
|
case "+!":
|
|
9678
|
-
return {
|
|
9679
|
-
signDisplay: "always"
|
|
9680
|
-
};
|
|
9584
|
+
return { signDisplay: "always" };
|
|
9681
9585
|
case "sign-accounting-always":
|
|
9682
9586
|
case "()!":
|
|
9683
9587
|
return {
|
|
@@ -9686,9 +9590,7 @@ function parseSign(str) {
|
|
|
9686
9590
|
};
|
|
9687
9591
|
case "sign-except-zero":
|
|
9688
9592
|
case "+?":
|
|
9689
|
-
return {
|
|
9690
|
-
signDisplay: "exceptZero"
|
|
9691
|
-
};
|
|
9593
|
+
return { signDisplay: "exceptZero" };
|
|
9692
9594
|
case "sign-accounting-except-zero":
|
|
9693
9595
|
case "()?":
|
|
9694
9596
|
return {
|
|
@@ -9697,26 +9599,20 @@ function parseSign(str) {
|
|
|
9697
9599
|
};
|
|
9698
9600
|
case "sign-never":
|
|
9699
9601
|
case "+_":
|
|
9700
|
-
return {
|
|
9701
|
-
signDisplay: "never"
|
|
9702
|
-
};
|
|
9602
|
+
return { signDisplay: "never" };
|
|
9703
9603
|
}
|
|
9704
9604
|
}
|
|
9705
9605
|
function parseConciseScientificAndEngineeringStem(stem) {
|
|
9706
|
-
|
|
9606
|
+
let result;
|
|
9707
9607
|
if (stem[0] === "E" && stem[1] === "E") {
|
|
9708
|
-
result = {
|
|
9709
|
-
notation: "engineering"
|
|
9710
|
-
};
|
|
9608
|
+
result = { notation: "engineering" };
|
|
9711
9609
|
stem = stem.slice(2);
|
|
9712
9610
|
} else if (stem[0] === "E") {
|
|
9713
|
-
result = {
|
|
9714
|
-
notation: "scientific"
|
|
9715
|
-
};
|
|
9611
|
+
result = { notation: "scientific" };
|
|
9716
9612
|
stem = stem.slice(1);
|
|
9717
9613
|
}
|
|
9718
9614
|
if (result) {
|
|
9719
|
-
|
|
9615
|
+
const signDisplay = stem.slice(0, 2);
|
|
9720
9616
|
if (signDisplay === "+!") {
|
|
9721
9617
|
result.signDisplay = "always";
|
|
9722
9618
|
stem = stem.slice(2);
|
|
@@ -9732,17 +9628,16 @@ function parseConciseScientificAndEngineeringStem(stem) {
|
|
|
9732
9628
|
return result;
|
|
9733
9629
|
}
|
|
9734
9630
|
function parseNotationOptions(opt) {
|
|
9735
|
-
|
|
9736
|
-
|
|
9631
|
+
const result = {};
|
|
9632
|
+
const signOpts = parseSign(opt);
|
|
9737
9633
|
if (signOpts) {
|
|
9738
9634
|
return signOpts;
|
|
9739
9635
|
}
|
|
9740
9636
|
return result;
|
|
9741
9637
|
}
|
|
9742
9638
|
function parseNumberSkeleton(tokens) {
|
|
9743
|
-
|
|
9744
|
-
for (
|
|
9745
|
-
var token = tokens_1[_i];
|
|
9639
|
+
let result = {};
|
|
9640
|
+
for (const token of tokens) {
|
|
9746
9641
|
switch (token.stem) {
|
|
9747
9642
|
case "percent":
|
|
9748
9643
|
case "%":
|
|
@@ -9780,14 +9675,24 @@ function parseNumberSkeleton(tokens) {
|
|
|
9780
9675
|
result.compactDisplay = "long";
|
|
9781
9676
|
continue;
|
|
9782
9677
|
case "scientific":
|
|
9783
|
-
result =
|
|
9784
|
-
|
|
9785
|
-
|
|
9678
|
+
result = {
|
|
9679
|
+
...result,
|
|
9680
|
+
notation: "scientific",
|
|
9681
|
+
...token.options.reduce((all, opt) => ({
|
|
9682
|
+
...all,
|
|
9683
|
+
...parseNotationOptions(opt)
|
|
9684
|
+
}), {})
|
|
9685
|
+
};
|
|
9786
9686
|
continue;
|
|
9787
9687
|
case "engineering":
|
|
9788
|
-
result =
|
|
9789
|
-
|
|
9790
|
-
|
|
9688
|
+
result = {
|
|
9689
|
+
...result,
|
|
9690
|
+
notation: "engineering",
|
|
9691
|
+
...token.options.reduce((all, opt) => ({
|
|
9692
|
+
...all,
|
|
9693
|
+
...parseNotationOptions(opt)
|
|
9694
|
+
}), {})
|
|
9695
|
+
};
|
|
9791
9696
|
continue;
|
|
9792
9697
|
case "notation-simple":
|
|
9793
9698
|
result.notation = "standard";
|
|
@@ -9869,25 +9774,40 @@ function parseNumberSkeleton(tokens) {
|
|
|
9869
9774
|
}
|
|
9870
9775
|
return "";
|
|
9871
9776
|
});
|
|
9872
|
-
|
|
9777
|
+
const opt = token.options[0];
|
|
9873
9778
|
if (opt === "w") {
|
|
9874
|
-
result =
|
|
9779
|
+
result = {
|
|
9780
|
+
...result,
|
|
9781
|
+
trailingZeroDisplay: "stripIfInteger"
|
|
9782
|
+
};
|
|
9875
9783
|
} else if (opt) {
|
|
9876
|
-
result =
|
|
9784
|
+
result = {
|
|
9785
|
+
...result,
|
|
9786
|
+
...parseSignificantPrecision(opt)
|
|
9787
|
+
};
|
|
9877
9788
|
}
|
|
9878
9789
|
continue;
|
|
9879
9790
|
}
|
|
9880
9791
|
if (SIGNIFICANT_PRECISION_REGEX.test(token.stem)) {
|
|
9881
|
-
result =
|
|
9792
|
+
result = {
|
|
9793
|
+
...result,
|
|
9794
|
+
...parseSignificantPrecision(token.stem)
|
|
9795
|
+
};
|
|
9882
9796
|
continue;
|
|
9883
9797
|
}
|
|
9884
|
-
|
|
9798
|
+
const signOpts = parseSign(token.stem);
|
|
9885
9799
|
if (signOpts) {
|
|
9886
|
-
result =
|
|
9800
|
+
result = {
|
|
9801
|
+
...result,
|
|
9802
|
+
...signOpts
|
|
9803
|
+
};
|
|
9887
9804
|
}
|
|
9888
|
-
|
|
9805
|
+
const conciseScientificAndEngineeringOpts = parseConciseScientificAndEngineeringStem(token.stem);
|
|
9889
9806
|
if (conciseScientificAndEngineeringOpts) {
|
|
9890
|
-
result =
|
|
9807
|
+
result = {
|
|
9808
|
+
...result,
|
|
9809
|
+
...conciseScientificAndEngineeringOpts
|
|
9810
|
+
};
|
|
9891
9811
|
}
|
|
9892
9812
|
}
|
|
9893
9813
|
return result;
|
|
@@ -9895,8 +9815,7 @@ function parseNumberSkeleton(tokens) {
|
|
|
9895
9815
|
var FRACTION_PRECISION_REGEX, SIGNIFICANT_PRECISION_REGEX, INTEGER_WIDTH_REGEX, CONCISE_INTEGER_WIDTH_REGEX;
|
|
9896
9816
|
var init_number = __esm({
|
|
9897
9817
|
"node_modules/.aspect_rules_js/@formatjs+icu-skeleton-parser@0.0.0/node_modules/@formatjs/icu-skeleton-parser/number.js"() {
|
|
9898
|
-
|
|
9899
|
-
init_regex_generated2();
|
|
9818
|
+
init_regex_generated();
|
|
9900
9819
|
FRACTION_PRECISION_REGEX = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g;
|
|
9901
9820
|
SIGNIFICANT_PRECISION_REGEX = /^(@+)?(\+|#+)?[rs]?$/g;
|
|
9902
9821
|
INTEGER_WIDTH_REGEX = /(\*)(0+)|(#+)(0+)|(0+)/g;
|
|
@@ -9912,15 +9831,115 @@ var init_icu_skeleton_parser = __esm({
|
|
|
9912
9831
|
}
|
|
9913
9832
|
});
|
|
9914
9833
|
|
|
9834
|
+
// node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/types.js
|
|
9835
|
+
function isLiteralElement(el) {
|
|
9836
|
+
return el.type === TYPE.literal;
|
|
9837
|
+
}
|
|
9838
|
+
function isArgumentElement(el) {
|
|
9839
|
+
return el.type === TYPE.argument;
|
|
9840
|
+
}
|
|
9841
|
+
function isNumberElement(el) {
|
|
9842
|
+
return el.type === TYPE.number;
|
|
9843
|
+
}
|
|
9844
|
+
function isDateElement(el) {
|
|
9845
|
+
return el.type === TYPE.date;
|
|
9846
|
+
}
|
|
9847
|
+
function isTimeElement(el) {
|
|
9848
|
+
return el.type === TYPE.time;
|
|
9849
|
+
}
|
|
9850
|
+
function isSelectElement(el) {
|
|
9851
|
+
return el.type === TYPE.select;
|
|
9852
|
+
}
|
|
9853
|
+
function isPluralElement(el) {
|
|
9854
|
+
return el.type === TYPE.plural;
|
|
9855
|
+
}
|
|
9856
|
+
function isPoundElement(el) {
|
|
9857
|
+
return el.type === TYPE.pound;
|
|
9858
|
+
}
|
|
9859
|
+
function isTagElement(el) {
|
|
9860
|
+
return el.type === TYPE.tag;
|
|
9861
|
+
}
|
|
9862
|
+
function isNumberSkeleton(el) {
|
|
9863
|
+
return !!(el && typeof el === "object" && el.type === SKELETON_TYPE.number);
|
|
9864
|
+
}
|
|
9865
|
+
function isDateTimeSkeleton(el) {
|
|
9866
|
+
return !!(el && typeof el === "object" && el.type === SKELETON_TYPE.dateTime);
|
|
9867
|
+
}
|
|
9868
|
+
var TYPE, SKELETON_TYPE;
|
|
9869
|
+
var init_types = __esm({
|
|
9870
|
+
"node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/types.js"() {
|
|
9871
|
+
init_icu_skeleton_parser();
|
|
9872
|
+
TYPE = function(TYPE2) {
|
|
9873
|
+
TYPE2[TYPE2["literal"] = 0] = "literal";
|
|
9874
|
+
TYPE2[TYPE2["argument"] = 1] = "argument";
|
|
9875
|
+
TYPE2[TYPE2["number"] = 2] = "number";
|
|
9876
|
+
TYPE2[TYPE2["date"] = 3] = "date";
|
|
9877
|
+
TYPE2[TYPE2["time"] = 4] = "time";
|
|
9878
|
+
TYPE2[TYPE2["select"] = 5] = "select";
|
|
9879
|
+
TYPE2[TYPE2["plural"] = 6] = "plural";
|
|
9880
|
+
TYPE2[TYPE2["pound"] = 7] = "pound";
|
|
9881
|
+
TYPE2[TYPE2["tag"] = 8] = "tag";
|
|
9882
|
+
return TYPE2;
|
|
9883
|
+
}({});
|
|
9884
|
+
SKELETON_TYPE = function(SKELETON_TYPE2) {
|
|
9885
|
+
SKELETON_TYPE2[SKELETON_TYPE2["number"] = 0] = "number";
|
|
9886
|
+
SKELETON_TYPE2[SKELETON_TYPE2["dateTime"] = 1] = "dateTime";
|
|
9887
|
+
return SKELETON_TYPE2;
|
|
9888
|
+
}({});
|
|
9889
|
+
}
|
|
9890
|
+
});
|
|
9891
|
+
|
|
9892
|
+
// node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/error.js
|
|
9893
|
+
var ErrorKind;
|
|
9894
|
+
var init_error = __esm({
|
|
9895
|
+
"node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/error.js"() {
|
|
9896
|
+
init_types();
|
|
9897
|
+
ErrorKind = function(ErrorKind2) {
|
|
9898
|
+
ErrorKind2[ErrorKind2["EXPECT_ARGUMENT_CLOSING_BRACE"] = 1] = "EXPECT_ARGUMENT_CLOSING_BRACE";
|
|
9899
|
+
ErrorKind2[ErrorKind2["EMPTY_ARGUMENT"] = 2] = "EMPTY_ARGUMENT";
|
|
9900
|
+
ErrorKind2[ErrorKind2["MALFORMED_ARGUMENT"] = 3] = "MALFORMED_ARGUMENT";
|
|
9901
|
+
ErrorKind2[ErrorKind2["EXPECT_ARGUMENT_TYPE"] = 4] = "EXPECT_ARGUMENT_TYPE";
|
|
9902
|
+
ErrorKind2[ErrorKind2["INVALID_ARGUMENT_TYPE"] = 5] = "INVALID_ARGUMENT_TYPE";
|
|
9903
|
+
ErrorKind2[ErrorKind2["EXPECT_ARGUMENT_STYLE"] = 6] = "EXPECT_ARGUMENT_STYLE";
|
|
9904
|
+
ErrorKind2[ErrorKind2["INVALID_NUMBER_SKELETON"] = 7] = "INVALID_NUMBER_SKELETON";
|
|
9905
|
+
ErrorKind2[ErrorKind2["INVALID_DATE_TIME_SKELETON"] = 8] = "INVALID_DATE_TIME_SKELETON";
|
|
9906
|
+
ErrorKind2[ErrorKind2["EXPECT_NUMBER_SKELETON"] = 9] = "EXPECT_NUMBER_SKELETON";
|
|
9907
|
+
ErrorKind2[ErrorKind2["EXPECT_DATE_TIME_SKELETON"] = 10] = "EXPECT_DATE_TIME_SKELETON";
|
|
9908
|
+
ErrorKind2[ErrorKind2["UNCLOSED_QUOTE_IN_ARGUMENT_STYLE"] = 11] = "UNCLOSED_QUOTE_IN_ARGUMENT_STYLE";
|
|
9909
|
+
ErrorKind2[ErrorKind2["EXPECT_SELECT_ARGUMENT_OPTIONS"] = 12] = "EXPECT_SELECT_ARGUMENT_OPTIONS";
|
|
9910
|
+
ErrorKind2[ErrorKind2["EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE"] = 13] = "EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE";
|
|
9911
|
+
ErrorKind2[ErrorKind2["INVALID_PLURAL_ARGUMENT_OFFSET_VALUE"] = 14] = "INVALID_PLURAL_ARGUMENT_OFFSET_VALUE";
|
|
9912
|
+
ErrorKind2[ErrorKind2["EXPECT_SELECT_ARGUMENT_SELECTOR"] = 15] = "EXPECT_SELECT_ARGUMENT_SELECTOR";
|
|
9913
|
+
ErrorKind2[ErrorKind2["EXPECT_PLURAL_ARGUMENT_SELECTOR"] = 16] = "EXPECT_PLURAL_ARGUMENT_SELECTOR";
|
|
9914
|
+
ErrorKind2[ErrorKind2["EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT"] = 17] = "EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT";
|
|
9915
|
+
ErrorKind2[ErrorKind2["EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT"] = 18] = "EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT";
|
|
9916
|
+
ErrorKind2[ErrorKind2["INVALID_PLURAL_ARGUMENT_SELECTOR"] = 19] = "INVALID_PLURAL_ARGUMENT_SELECTOR";
|
|
9917
|
+
ErrorKind2[ErrorKind2["DUPLICATE_PLURAL_ARGUMENT_SELECTOR"] = 20] = "DUPLICATE_PLURAL_ARGUMENT_SELECTOR";
|
|
9918
|
+
ErrorKind2[ErrorKind2["DUPLICATE_SELECT_ARGUMENT_SELECTOR"] = 21] = "DUPLICATE_SELECT_ARGUMENT_SELECTOR";
|
|
9919
|
+
ErrorKind2[ErrorKind2["MISSING_OTHER_CLAUSE"] = 22] = "MISSING_OTHER_CLAUSE";
|
|
9920
|
+
ErrorKind2[ErrorKind2["INVALID_TAG"] = 23] = "INVALID_TAG";
|
|
9921
|
+
ErrorKind2[ErrorKind2["INVALID_TAG_NAME"] = 25] = "INVALID_TAG_NAME";
|
|
9922
|
+
ErrorKind2[ErrorKind2["UNMATCHED_CLOSING_TAG"] = 26] = "UNMATCHED_CLOSING_TAG";
|
|
9923
|
+
ErrorKind2[ErrorKind2["UNCLOSED_TAG"] = 27] = "UNCLOSED_TAG";
|
|
9924
|
+
return ErrorKind2;
|
|
9925
|
+
}({});
|
|
9926
|
+
}
|
|
9927
|
+
});
|
|
9928
|
+
|
|
9929
|
+
// node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/regex.generated.js
|
|
9930
|
+
var SPACE_SEPARATOR_REGEX;
|
|
9931
|
+
var init_regex_generated2 = __esm({
|
|
9932
|
+
"node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/regex.generated.js"() {
|
|
9933
|
+
SPACE_SEPARATOR_REGEX = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/;
|
|
9934
|
+
}
|
|
9935
|
+
});
|
|
9936
|
+
|
|
9915
9937
|
// node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/time-data.generated.js
|
|
9916
9938
|
var timeData;
|
|
9917
9939
|
var init_time_data_generated = __esm({
|
|
9918
9940
|
"node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/time-data.generated.js"() {
|
|
9919
9941
|
timeData = {
|
|
9920
|
-
"001": [
|
|
9921
|
-
"H",
|
|
9922
|
-
"h"
|
|
9923
|
-
],
|
|
9942
|
+
"001": ["H", "h"],
|
|
9924
9943
|
"419": [
|
|
9925
9944
|
"h",
|
|
9926
9945
|
"H",
|
|
@@ -9933,10 +9952,7 @@ var init_time_data_generated = __esm({
|
|
|
9933
9952
|
"hb",
|
|
9934
9953
|
"hB"
|
|
9935
9954
|
],
|
|
9936
|
-
"AD": [
|
|
9937
|
-
"H",
|
|
9938
|
-
"hB"
|
|
9939
|
-
],
|
|
9955
|
+
"AD": ["H", "hB"],
|
|
9940
9956
|
"AE": [
|
|
9941
9957
|
"h",
|
|
9942
9958
|
"hB",
|
|
@@ -9966,41 +9982,24 @@ var init_time_data_generated = __esm({
|
|
|
9966
9982
|
"H",
|
|
9967
9983
|
"hB"
|
|
9968
9984
|
],
|
|
9969
|
-
"AM": [
|
|
9970
|
-
|
|
9971
|
-
"hB"
|
|
9972
|
-
],
|
|
9973
|
-
"AO": [
|
|
9974
|
-
"H",
|
|
9975
|
-
"hB"
|
|
9976
|
-
],
|
|
9985
|
+
"AM": ["H", "hB"],
|
|
9986
|
+
"AO": ["H", "hB"],
|
|
9977
9987
|
"AR": [
|
|
9978
9988
|
"h",
|
|
9979
9989
|
"H",
|
|
9980
9990
|
"hB",
|
|
9981
9991
|
"hb"
|
|
9982
9992
|
],
|
|
9983
|
-
"AS": [
|
|
9984
|
-
|
|
9985
|
-
"H"
|
|
9986
|
-
],
|
|
9987
|
-
"AT": [
|
|
9988
|
-
"H",
|
|
9989
|
-
"hB"
|
|
9990
|
-
],
|
|
9993
|
+
"AS": ["h", "H"],
|
|
9994
|
+
"AT": ["H", "hB"],
|
|
9991
9995
|
"AU": [
|
|
9992
9996
|
"h",
|
|
9993
9997
|
"hb",
|
|
9994
9998
|
"H",
|
|
9995
9999
|
"hB"
|
|
9996
10000
|
],
|
|
9997
|
-
"AW": [
|
|
9998
|
-
|
|
9999
|
-
"hB"
|
|
10000
|
-
],
|
|
10001
|
-
"AX": [
|
|
10002
|
-
"H"
|
|
10003
|
-
],
|
|
10001
|
+
"AW": ["H", "hB"],
|
|
10002
|
+
"AX": ["H"],
|
|
10004
10003
|
"AZ": [
|
|
10005
10004
|
"H",
|
|
10006
10005
|
"hB",
|
|
@@ -10022,14 +10021,8 @@ var init_time_data_generated = __esm({
|
|
|
10022
10021
|
"hB",
|
|
10023
10022
|
"H"
|
|
10024
10023
|
],
|
|
10025
|
-
"BE": [
|
|
10026
|
-
|
|
10027
|
-
"hB"
|
|
10028
|
-
],
|
|
10029
|
-
"BF": [
|
|
10030
|
-
"H",
|
|
10031
|
-
"hB"
|
|
10032
|
-
],
|
|
10024
|
+
"BE": ["H", "hB"],
|
|
10025
|
+
"BF": ["H", "hB"],
|
|
10033
10026
|
"BG": [
|
|
10034
10027
|
"H",
|
|
10035
10028
|
"hB",
|
|
@@ -10041,18 +10034,9 @@ var init_time_data_generated = __esm({
|
|
|
10041
10034
|
"hb",
|
|
10042
10035
|
"H"
|
|
10043
10036
|
],
|
|
10044
|
-
"BI": [
|
|
10045
|
-
|
|
10046
|
-
|
|
10047
|
-
],
|
|
10048
|
-
"BJ": [
|
|
10049
|
-
"H",
|
|
10050
|
-
"hB"
|
|
10051
|
-
],
|
|
10052
|
-
"BL": [
|
|
10053
|
-
"H",
|
|
10054
|
-
"hB"
|
|
10055
|
-
],
|
|
10037
|
+
"BI": ["H", "h"],
|
|
10038
|
+
"BJ": ["H", "hB"],
|
|
10039
|
+
"BL": ["H", "hB"],
|
|
10056
10040
|
"BM": [
|
|
10057
10041
|
"h",
|
|
10058
10042
|
"hb",
|
|
@@ -10071,33 +10055,22 @@ var init_time_data_generated = __esm({
|
|
|
10071
10055
|
"hB",
|
|
10072
10056
|
"hb"
|
|
10073
10057
|
],
|
|
10074
|
-
"BQ": [
|
|
10075
|
-
|
|
10076
|
-
],
|
|
10077
|
-
"BR": [
|
|
10078
|
-
"H",
|
|
10079
|
-
"hB"
|
|
10080
|
-
],
|
|
10058
|
+
"BQ": ["H"],
|
|
10059
|
+
"BR": ["H", "hB"],
|
|
10081
10060
|
"BS": [
|
|
10082
10061
|
"h",
|
|
10083
10062
|
"hb",
|
|
10084
10063
|
"H",
|
|
10085
10064
|
"hB"
|
|
10086
10065
|
],
|
|
10087
|
-
"BT": [
|
|
10088
|
-
"h",
|
|
10089
|
-
"H"
|
|
10090
|
-
],
|
|
10066
|
+
"BT": ["h", "H"],
|
|
10091
10067
|
"BW": [
|
|
10092
10068
|
"H",
|
|
10093
10069
|
"h",
|
|
10094
10070
|
"hb",
|
|
10095
10071
|
"hB"
|
|
10096
10072
|
],
|
|
10097
|
-
"BY": [
|
|
10098
|
-
"H",
|
|
10099
|
-
"h"
|
|
10100
|
-
],
|
|
10073
|
+
"BY": ["H", "h"],
|
|
10101
10074
|
"BZ": [
|
|
10102
10075
|
"H",
|
|
10103
10076
|
"h",
|
|
@@ -10116,28 +10089,19 @@ var init_time_data_generated = __esm({
|
|
|
10116
10089
|
"hb",
|
|
10117
10090
|
"hB"
|
|
10118
10091
|
],
|
|
10119
|
-
"CD": [
|
|
10120
|
-
"hB",
|
|
10121
|
-
"H"
|
|
10122
|
-
],
|
|
10092
|
+
"CD": ["hB", "H"],
|
|
10123
10093
|
"CF": [
|
|
10124
10094
|
"H",
|
|
10125
10095
|
"h",
|
|
10126
10096
|
"hB"
|
|
10127
10097
|
],
|
|
10128
|
-
"CG": [
|
|
10129
|
-
"H",
|
|
10130
|
-
"hB"
|
|
10131
|
-
],
|
|
10098
|
+
"CG": ["H", "hB"],
|
|
10132
10099
|
"CH": [
|
|
10133
10100
|
"H",
|
|
10134
10101
|
"hB",
|
|
10135
10102
|
"h"
|
|
10136
10103
|
],
|
|
10137
|
-
"CI": [
|
|
10138
|
-
"H",
|
|
10139
|
-
"hB"
|
|
10140
|
-
],
|
|
10104
|
+
"CI": ["H", "hB"],
|
|
10141
10105
|
"CK": [
|
|
10142
10106
|
"H",
|
|
10143
10107
|
"h",
|
|
@@ -10167,9 +10131,7 @@ var init_time_data_generated = __esm({
|
|
|
10167
10131
|
"hB",
|
|
10168
10132
|
"hb"
|
|
10169
10133
|
],
|
|
10170
|
-
"CP": [
|
|
10171
|
-
"H"
|
|
10172
|
-
],
|
|
10134
|
+
"CP": ["H"],
|
|
10173
10135
|
"CR": [
|
|
10174
10136
|
"h",
|
|
10175
10137
|
"H",
|
|
@@ -10182,14 +10144,8 @@ var init_time_data_generated = __esm({
|
|
|
10182
10144
|
"hB",
|
|
10183
10145
|
"hb"
|
|
10184
10146
|
],
|
|
10185
|
-
"CV": [
|
|
10186
|
-
|
|
10187
|
-
"hB"
|
|
10188
|
-
],
|
|
10189
|
-
"CW": [
|
|
10190
|
-
"H",
|
|
10191
|
-
"hB"
|
|
10192
|
-
],
|
|
10147
|
+
"CV": ["H", "hB"],
|
|
10148
|
+
"CW": ["H", "hB"],
|
|
10193
10149
|
"CX": [
|
|
10194
10150
|
"H",
|
|
10195
10151
|
"h",
|
|
@@ -10202,26 +10158,16 @@ var init_time_data_generated = __esm({
|
|
|
10202
10158
|
"hb",
|
|
10203
10159
|
"hB"
|
|
10204
10160
|
],
|
|
10205
|
-
"CZ": [
|
|
10206
|
-
|
|
10207
|
-
],
|
|
10208
|
-
"DE": [
|
|
10209
|
-
"H",
|
|
10210
|
-
"hB"
|
|
10211
|
-
],
|
|
10161
|
+
"CZ": ["H"],
|
|
10162
|
+
"DE": ["H", "hB"],
|
|
10212
10163
|
"DG": [
|
|
10213
10164
|
"H",
|
|
10214
10165
|
"h",
|
|
10215
10166
|
"hb",
|
|
10216
10167
|
"hB"
|
|
10217
10168
|
],
|
|
10218
|
-
"DJ": [
|
|
10219
|
-
|
|
10220
|
-
"H"
|
|
10221
|
-
],
|
|
10222
|
-
"DK": [
|
|
10223
|
-
"H"
|
|
10224
|
-
],
|
|
10169
|
+
"DJ": ["h", "H"],
|
|
10170
|
+
"DK": ["H"],
|
|
10225
10171
|
"DM": [
|
|
10226
10172
|
"h",
|
|
10227
10173
|
"hb",
|
|
@@ -10252,10 +10198,7 @@ var init_time_data_generated = __esm({
|
|
|
10252
10198
|
"hB",
|
|
10253
10199
|
"hb"
|
|
10254
10200
|
],
|
|
10255
|
-
"EE": [
|
|
10256
|
-
"H",
|
|
10257
|
-
"hB"
|
|
10258
|
-
],
|
|
10201
|
+
"EE": ["H", "hB"],
|
|
10259
10202
|
"EG": [
|
|
10260
10203
|
"h",
|
|
10261
10204
|
"hB",
|
|
@@ -10268,10 +10211,7 @@ var init_time_data_generated = __esm({
|
|
|
10268
10211
|
"hb",
|
|
10269
10212
|
"H"
|
|
10270
10213
|
],
|
|
10271
|
-
"ER": [
|
|
10272
|
-
"h",
|
|
10273
|
-
"H"
|
|
10274
|
-
],
|
|
10214
|
+
"ER": ["h", "H"],
|
|
10275
10215
|
"ES": [
|
|
10276
10216
|
"H",
|
|
10277
10217
|
"hB",
|
|
@@ -10284,9 +10224,7 @@ var init_time_data_generated = __esm({
|
|
|
10284
10224
|
"h",
|
|
10285
10225
|
"H"
|
|
10286
10226
|
],
|
|
10287
|
-
"FI": [
|
|
10288
|
-
"H"
|
|
10289
|
-
],
|
|
10227
|
+
"FI": ["H"],
|
|
10290
10228
|
"FJ": [
|
|
10291
10229
|
"h",
|
|
10292
10230
|
"hb",
|
|
@@ -10305,18 +10243,9 @@ var init_time_data_generated = __esm({
|
|
|
10305
10243
|
"H",
|
|
10306
10244
|
"hB"
|
|
10307
10245
|
],
|
|
10308
|
-
"FO": [
|
|
10309
|
-
|
|
10310
|
-
|
|
10311
|
-
],
|
|
10312
|
-
"FR": [
|
|
10313
|
-
"H",
|
|
10314
|
-
"hB"
|
|
10315
|
-
],
|
|
10316
|
-
"GA": [
|
|
10317
|
-
"H",
|
|
10318
|
-
"hB"
|
|
10319
|
-
],
|
|
10246
|
+
"FO": ["H", "h"],
|
|
10247
|
+
"FR": ["H", "hB"],
|
|
10248
|
+
"GA": ["H", "hB"],
|
|
10320
10249
|
"GB": [
|
|
10321
10250
|
"H",
|
|
10322
10251
|
"h",
|
|
@@ -10334,44 +10263,29 @@ var init_time_data_generated = __esm({
|
|
|
10334
10263
|
"hB",
|
|
10335
10264
|
"h"
|
|
10336
10265
|
],
|
|
10337
|
-
"GF": [
|
|
10338
|
-
"H",
|
|
10339
|
-
"hB"
|
|
10340
|
-
],
|
|
10266
|
+
"GF": ["H", "hB"],
|
|
10341
10267
|
"GG": [
|
|
10342
10268
|
"H",
|
|
10343
10269
|
"h",
|
|
10344
10270
|
"hb",
|
|
10345
10271
|
"hB"
|
|
10346
10272
|
],
|
|
10347
|
-
"GH": [
|
|
10348
|
-
"h",
|
|
10349
|
-
"H"
|
|
10350
|
-
],
|
|
10273
|
+
"GH": ["h", "H"],
|
|
10351
10274
|
"GI": [
|
|
10352
10275
|
"H",
|
|
10353
10276
|
"h",
|
|
10354
10277
|
"hb",
|
|
10355
10278
|
"hB"
|
|
10356
10279
|
],
|
|
10357
|
-
"GL": [
|
|
10358
|
-
"H",
|
|
10359
|
-
"h"
|
|
10360
|
-
],
|
|
10280
|
+
"GL": ["H", "h"],
|
|
10361
10281
|
"GM": [
|
|
10362
10282
|
"h",
|
|
10363
10283
|
"hb",
|
|
10364
10284
|
"H",
|
|
10365
10285
|
"hB"
|
|
10366
10286
|
],
|
|
10367
|
-
"GN": [
|
|
10368
|
-
|
|
10369
|
-
"hB"
|
|
10370
|
-
],
|
|
10371
|
-
"GP": [
|
|
10372
|
-
"H",
|
|
10373
|
-
"hB"
|
|
10374
|
-
],
|
|
10287
|
+
"GN": ["H", "hB"],
|
|
10288
|
+
"GP": ["H", "hB"],
|
|
10375
10289
|
"GQ": [
|
|
10376
10290
|
"H",
|
|
10377
10291
|
"hB",
|
|
@@ -10402,10 +10316,7 @@ var init_time_data_generated = __esm({
|
|
|
10402
10316
|
"H",
|
|
10403
10317
|
"hB"
|
|
10404
10318
|
],
|
|
10405
|
-
"GW": [
|
|
10406
|
-
"H",
|
|
10407
|
-
"hB"
|
|
10408
|
-
],
|
|
10319
|
+
"GW": ["H", "hB"],
|
|
10409
10320
|
"GY": [
|
|
10410
10321
|
"h",
|
|
10411
10322
|
"hb",
|
|
@@ -10424,43 +10335,29 @@ var init_time_data_generated = __esm({
|
|
|
10424
10335
|
"hB",
|
|
10425
10336
|
"hb"
|
|
10426
10337
|
],
|
|
10427
|
-
"HR": [
|
|
10428
|
-
|
|
10429
|
-
"hB"
|
|
10430
|
-
],
|
|
10431
|
-
"HU": [
|
|
10432
|
-
"H",
|
|
10433
|
-
"h"
|
|
10434
|
-
],
|
|
10338
|
+
"HR": ["H", "hB"],
|
|
10339
|
+
"HU": ["H", "h"],
|
|
10435
10340
|
"IC": [
|
|
10436
10341
|
"H",
|
|
10437
10342
|
"h",
|
|
10438
10343
|
"hB",
|
|
10439
10344
|
"hb"
|
|
10440
10345
|
],
|
|
10441
|
-
"ID": [
|
|
10442
|
-
"H"
|
|
10443
|
-
],
|
|
10346
|
+
"ID": ["H"],
|
|
10444
10347
|
"IE": [
|
|
10445
10348
|
"H",
|
|
10446
10349
|
"h",
|
|
10447
10350
|
"hb",
|
|
10448
10351
|
"hB"
|
|
10449
10352
|
],
|
|
10450
|
-
"IL": [
|
|
10451
|
-
"H",
|
|
10452
|
-
"hB"
|
|
10453
|
-
],
|
|
10353
|
+
"IL": ["H", "hB"],
|
|
10454
10354
|
"IM": [
|
|
10455
10355
|
"H",
|
|
10456
10356
|
"h",
|
|
10457
10357
|
"hb",
|
|
10458
10358
|
"hB"
|
|
10459
10359
|
],
|
|
10460
|
-
"IN": [
|
|
10461
|
-
"h",
|
|
10462
|
-
"H"
|
|
10463
|
-
],
|
|
10360
|
+
"IN": ["h", "H"],
|
|
10464
10361
|
"IO": [
|
|
10465
10362
|
"H",
|
|
10466
10363
|
"h",
|
|
@@ -10473,17 +10370,9 @@ var init_time_data_generated = __esm({
|
|
|
10473
10370
|
"hb",
|
|
10474
10371
|
"H"
|
|
10475
10372
|
],
|
|
10476
|
-
"IR": [
|
|
10477
|
-
|
|
10478
|
-
|
|
10479
|
-
],
|
|
10480
|
-
"IS": [
|
|
10481
|
-
"H"
|
|
10482
|
-
],
|
|
10483
|
-
"IT": [
|
|
10484
|
-
"H",
|
|
10485
|
-
"hB"
|
|
10486
|
-
],
|
|
10373
|
+
"IR": ["hB", "H"],
|
|
10374
|
+
"IS": ["H"],
|
|
10375
|
+
"IT": ["H", "hB"],
|
|
10487
10376
|
"JE": [
|
|
10488
10377
|
"H",
|
|
10489
10378
|
"h",
|
|
@@ -10567,10 +10456,7 @@ var init_time_data_generated = __esm({
|
|
|
10567
10456
|
"H",
|
|
10568
10457
|
"hB"
|
|
10569
10458
|
],
|
|
10570
|
-
"KZ": [
|
|
10571
|
-
"H",
|
|
10572
|
-
"hB"
|
|
10573
|
-
],
|
|
10459
|
+
"KZ": ["H", "hB"],
|
|
10574
10460
|
"LA": [
|
|
10575
10461
|
"H",
|
|
10576
10462
|
"hb",
|
|
@@ -10606,10 +10492,7 @@ var init_time_data_generated = __esm({
|
|
|
10606
10492
|
"H",
|
|
10607
10493
|
"hB"
|
|
10608
10494
|
],
|
|
10609
|
-
"LS": [
|
|
10610
|
-
"h",
|
|
10611
|
-
"H"
|
|
10612
|
-
],
|
|
10495
|
+
"LS": ["h", "H"],
|
|
10613
10496
|
"LT": [
|
|
10614
10497
|
"H",
|
|
10615
10498
|
"h",
|
|
@@ -10639,27 +10522,15 @@ var init_time_data_generated = __esm({
|
|
|
10639
10522
|
"hB",
|
|
10640
10523
|
"hb"
|
|
10641
10524
|
],
|
|
10642
|
-
"MC": [
|
|
10643
|
-
|
|
10644
|
-
"hB"
|
|
10645
|
-
],
|
|
10646
|
-
"MD": [
|
|
10647
|
-
"H",
|
|
10648
|
-
"hB"
|
|
10649
|
-
],
|
|
10525
|
+
"MC": ["H", "hB"],
|
|
10526
|
+
"MD": ["H", "hB"],
|
|
10650
10527
|
"ME": [
|
|
10651
10528
|
"H",
|
|
10652
10529
|
"hB",
|
|
10653
10530
|
"h"
|
|
10654
10531
|
],
|
|
10655
|
-
"MF": [
|
|
10656
|
-
|
|
10657
|
-
"hB"
|
|
10658
|
-
],
|
|
10659
|
-
"MG": [
|
|
10660
|
-
"H",
|
|
10661
|
-
"h"
|
|
10662
|
-
],
|
|
10532
|
+
"MF": ["H", "hB"],
|
|
10533
|
+
"MG": ["H", "h"],
|
|
10663
10534
|
"MH": [
|
|
10664
10535
|
"h",
|
|
10665
10536
|
"hb",
|
|
@@ -10672,9 +10543,7 @@ var init_time_data_generated = __esm({
|
|
|
10672
10543
|
"hb",
|
|
10673
10544
|
"hB"
|
|
10674
10545
|
],
|
|
10675
|
-
"ML": [
|
|
10676
|
-
"H"
|
|
10677
|
-
],
|
|
10546
|
+
"ML": ["H"],
|
|
10678
10547
|
"MM": [
|
|
10679
10548
|
"hB",
|
|
10680
10549
|
"hb",
|
|
@@ -10699,10 +10568,7 @@ var init_time_data_generated = __esm({
|
|
|
10699
10568
|
"H",
|
|
10700
10569
|
"hB"
|
|
10701
10570
|
],
|
|
10702
|
-
"MQ": [
|
|
10703
|
-
"H",
|
|
10704
|
-
"hB"
|
|
10705
|
-
],
|
|
10571
|
+
"MQ": ["H", "hB"],
|
|
10706
10572
|
"MR": [
|
|
10707
10573
|
"h",
|
|
10708
10574
|
"hB",
|
|
@@ -10715,18 +10581,9 @@ var init_time_data_generated = __esm({
|
|
|
10715
10581
|
"hb",
|
|
10716
10582
|
"hB"
|
|
10717
10583
|
],
|
|
10718
|
-
"MT": [
|
|
10719
|
-
|
|
10720
|
-
|
|
10721
|
-
],
|
|
10722
|
-
"MU": [
|
|
10723
|
-
"H",
|
|
10724
|
-
"h"
|
|
10725
|
-
],
|
|
10726
|
-
"MV": [
|
|
10727
|
-
"H",
|
|
10728
|
-
"h"
|
|
10729
|
-
],
|
|
10584
|
+
"MT": ["H", "h"],
|
|
10585
|
+
"MU": ["H", "h"],
|
|
10586
|
+
"MV": ["H", "h"],
|
|
10730
10587
|
"MW": [
|
|
10731
10588
|
"h",
|
|
10732
10589
|
"hb",
|
|
@@ -10745,23 +10602,15 @@ var init_time_data_generated = __esm({
|
|
|
10745
10602
|
"h",
|
|
10746
10603
|
"H"
|
|
10747
10604
|
],
|
|
10748
|
-
"MZ": [
|
|
10749
|
-
"H",
|
|
10750
|
-
"hB"
|
|
10751
|
-
],
|
|
10605
|
+
"MZ": ["H", "hB"],
|
|
10752
10606
|
"NA": [
|
|
10753
10607
|
"h",
|
|
10754
10608
|
"H",
|
|
10755
10609
|
"hB",
|
|
10756
10610
|
"hb"
|
|
10757
10611
|
],
|
|
10758
|
-
"NC": [
|
|
10759
|
-
|
|
10760
|
-
"hB"
|
|
10761
|
-
],
|
|
10762
|
-
"NE": [
|
|
10763
|
-
"H"
|
|
10764
|
-
],
|
|
10612
|
+
"NC": ["H", "hB"],
|
|
10613
|
+
"NE": ["H"],
|
|
10765
10614
|
"NF": [
|
|
10766
10615
|
"H",
|
|
10767
10616
|
"h",
|
|
@@ -10780,14 +10629,8 @@ var init_time_data_generated = __esm({
|
|
|
10780
10629
|
"hB",
|
|
10781
10630
|
"hb"
|
|
10782
10631
|
],
|
|
10783
|
-
"NL": [
|
|
10784
|
-
|
|
10785
|
-
"hB"
|
|
10786
|
-
],
|
|
10787
|
-
"NO": [
|
|
10788
|
-
"H",
|
|
10789
|
-
"h"
|
|
10790
|
-
],
|
|
10632
|
+
"NL": ["H", "hB"],
|
|
10633
|
+
"NO": ["H", "h"],
|
|
10791
10634
|
"NP": [
|
|
10792
10635
|
"H",
|
|
10793
10636
|
"h",
|
|
@@ -10834,10 +10677,7 @@ var init_time_data_generated = __esm({
|
|
|
10834
10677
|
"h",
|
|
10835
10678
|
"hB"
|
|
10836
10679
|
],
|
|
10837
|
-
"PG": [
|
|
10838
|
-
"h",
|
|
10839
|
-
"H"
|
|
10840
|
-
],
|
|
10680
|
+
"PG": ["h", "H"],
|
|
10841
10681
|
"PH": [
|
|
10842
10682
|
"h",
|
|
10843
10683
|
"hB",
|
|
@@ -10849,14 +10689,8 @@ var init_time_data_generated = __esm({
|
|
|
10849
10689
|
"hB",
|
|
10850
10690
|
"H"
|
|
10851
10691
|
],
|
|
10852
|
-
"PL": [
|
|
10853
|
-
|
|
10854
|
-
"h"
|
|
10855
|
-
],
|
|
10856
|
-
"PM": [
|
|
10857
|
-
"H",
|
|
10858
|
-
"hB"
|
|
10859
|
-
],
|
|
10692
|
+
"PL": ["H", "h"],
|
|
10693
|
+
"PM": ["H", "hB"],
|
|
10860
10694
|
"PN": [
|
|
10861
10695
|
"H",
|
|
10862
10696
|
"h",
|
|
@@ -10875,14 +10709,8 @@ var init_time_data_generated = __esm({
|
|
|
10875
10709
|
"hb",
|
|
10876
10710
|
"H"
|
|
10877
10711
|
],
|
|
10878
|
-
"PT": [
|
|
10879
|
-
|
|
10880
|
-
"hB"
|
|
10881
|
-
],
|
|
10882
|
-
"PW": [
|
|
10883
|
-
"h",
|
|
10884
|
-
"H"
|
|
10885
|
-
],
|
|
10712
|
+
"PT": ["H", "hB"],
|
|
10713
|
+
"PW": ["h", "H"],
|
|
10886
10714
|
"PY": [
|
|
10887
10715
|
"h",
|
|
10888
10716
|
"H",
|
|
@@ -10895,26 +10723,15 @@ var init_time_data_generated = __esm({
|
|
|
10895
10723
|
"hb",
|
|
10896
10724
|
"H"
|
|
10897
10725
|
],
|
|
10898
|
-
"RE": [
|
|
10899
|
-
|
|
10900
|
-
"hB"
|
|
10901
|
-
],
|
|
10902
|
-
"RO": [
|
|
10903
|
-
"H",
|
|
10904
|
-
"hB"
|
|
10905
|
-
],
|
|
10726
|
+
"RE": ["H", "hB"],
|
|
10727
|
+
"RO": ["H", "hB"],
|
|
10906
10728
|
"RS": [
|
|
10907
10729
|
"H",
|
|
10908
10730
|
"hB",
|
|
10909
10731
|
"h"
|
|
10910
10732
|
],
|
|
10911
|
-
"RU": [
|
|
10912
|
-
|
|
10913
|
-
],
|
|
10914
|
-
"RW": [
|
|
10915
|
-
"H",
|
|
10916
|
-
"h"
|
|
10917
|
-
],
|
|
10733
|
+
"RU": ["H"],
|
|
10734
|
+
"RW": ["H", "h"],
|
|
10918
10735
|
"SA": [
|
|
10919
10736
|
"h",
|
|
10920
10737
|
"hB",
|
|
@@ -10938,9 +10755,7 @@ var init_time_data_generated = __esm({
|
|
|
10938
10755
|
"hb",
|
|
10939
10756
|
"H"
|
|
10940
10757
|
],
|
|
10941
|
-
"SE": [
|
|
10942
|
-
"H"
|
|
10943
|
-
],
|
|
10758
|
+
"SE": ["H"],
|
|
10944
10759
|
"SG": [
|
|
10945
10760
|
"h",
|
|
10946
10761
|
"hb",
|
|
@@ -10953,16 +10768,9 @@ var init_time_data_generated = __esm({
|
|
|
10953
10768
|
"hb",
|
|
10954
10769
|
"hB"
|
|
10955
10770
|
],
|
|
10956
|
-
"SI": [
|
|
10957
|
-
|
|
10958
|
-
|
|
10959
|
-
],
|
|
10960
|
-
"SJ": [
|
|
10961
|
-
"H"
|
|
10962
|
-
],
|
|
10963
|
-
"SK": [
|
|
10964
|
-
"H"
|
|
10965
|
-
],
|
|
10771
|
+
"SI": ["H", "hB"],
|
|
10772
|
+
"SJ": ["H"],
|
|
10773
|
+
"SK": ["H"],
|
|
10966
10774
|
"SL": [
|
|
10967
10775
|
"h",
|
|
10968
10776
|
"hb",
|
|
@@ -10979,24 +10787,15 @@ var init_time_data_generated = __esm({
|
|
|
10979
10787
|
"h",
|
|
10980
10788
|
"hB"
|
|
10981
10789
|
],
|
|
10982
|
-
"SO": [
|
|
10983
|
-
|
|
10984
|
-
"H"
|
|
10985
|
-
],
|
|
10986
|
-
"SR": [
|
|
10987
|
-
"H",
|
|
10988
|
-
"hB"
|
|
10989
|
-
],
|
|
10790
|
+
"SO": ["h", "H"],
|
|
10791
|
+
"SR": ["H", "hB"],
|
|
10990
10792
|
"SS": [
|
|
10991
10793
|
"h",
|
|
10992
10794
|
"hb",
|
|
10993
10795
|
"H",
|
|
10994
10796
|
"hB"
|
|
10995
10797
|
],
|
|
10996
|
-
"ST": [
|
|
10997
|
-
"H",
|
|
10998
|
-
"hB"
|
|
10999
|
-
],
|
|
10798
|
+
"ST": ["H", "hB"],
|
|
11000
10799
|
"SV": [
|
|
11001
10800
|
"h",
|
|
11002
10801
|
"H",
|
|
@@ -11043,42 +10842,24 @@ var init_time_data_generated = __esm({
|
|
|
11043
10842
|
"h",
|
|
11044
10843
|
"hB"
|
|
11045
10844
|
],
|
|
11046
|
-
"TG": [
|
|
11047
|
-
|
|
11048
|
-
|
|
11049
|
-
],
|
|
11050
|
-
"TH": [
|
|
11051
|
-
"H",
|
|
11052
|
-
"h"
|
|
11053
|
-
],
|
|
11054
|
-
"TJ": [
|
|
11055
|
-
"H",
|
|
11056
|
-
"h"
|
|
11057
|
-
],
|
|
10845
|
+
"TG": ["H", "hB"],
|
|
10846
|
+
"TH": ["H", "h"],
|
|
10847
|
+
"TJ": ["H", "h"],
|
|
11058
10848
|
"TL": [
|
|
11059
10849
|
"H",
|
|
11060
10850
|
"hB",
|
|
11061
10851
|
"hb",
|
|
11062
10852
|
"h"
|
|
11063
10853
|
],
|
|
11064
|
-
"TM": [
|
|
11065
|
-
"H",
|
|
11066
|
-
"h"
|
|
11067
|
-
],
|
|
10854
|
+
"TM": ["H", "h"],
|
|
11068
10855
|
"TN": [
|
|
11069
10856
|
"h",
|
|
11070
10857
|
"hB",
|
|
11071
10858
|
"hb",
|
|
11072
10859
|
"H"
|
|
11073
10860
|
],
|
|
11074
|
-
"TO": [
|
|
11075
|
-
|
|
11076
|
-
"H"
|
|
11077
|
-
],
|
|
11078
|
-
"TR": [
|
|
11079
|
-
"H",
|
|
11080
|
-
"hB"
|
|
11081
|
-
],
|
|
10861
|
+
"TO": ["h", "H"],
|
|
10862
|
+
"TR": ["H", "hB"],
|
|
11082
10863
|
"TT": [
|
|
11083
10864
|
"h",
|
|
11084
10865
|
"hb",
|
|
@@ -11160,22 +10941,10 @@ var init_time_data_generated = __esm({
|
|
|
11160
10941
|
"H",
|
|
11161
10942
|
"hB"
|
|
11162
10943
|
],
|
|
11163
|
-
"VN": [
|
|
11164
|
-
|
|
11165
|
-
|
|
11166
|
-
],
|
|
11167
|
-
"VU": [
|
|
11168
|
-
"h",
|
|
11169
|
-
"H"
|
|
11170
|
-
],
|
|
11171
|
-
"WF": [
|
|
11172
|
-
"H",
|
|
11173
|
-
"hB"
|
|
11174
|
-
],
|
|
11175
|
-
"WS": [
|
|
11176
|
-
"h",
|
|
11177
|
-
"H"
|
|
11178
|
-
],
|
|
10944
|
+
"VN": ["H", "h"],
|
|
10945
|
+
"VU": ["h", "H"],
|
|
10946
|
+
"WF": ["H", "hB"],
|
|
10947
|
+
"WS": ["h", "H"],
|
|
11179
10948
|
"XK": [
|
|
11180
10949
|
"H",
|
|
11181
10950
|
"hB",
|
|
@@ -11187,10 +10956,7 @@ var init_time_data_generated = __esm({
|
|
|
11187
10956
|
"hb",
|
|
11188
10957
|
"H"
|
|
11189
10958
|
],
|
|
11190
|
-
"YT": [
|
|
11191
|
-
"H",
|
|
11192
|
-
"hB"
|
|
11193
|
-
],
|
|
10959
|
+
"YT": ["H", "hB"],
|
|
11194
10960
|
"ZA": [
|
|
11195
10961
|
"H",
|
|
11196
10962
|
"h",
|
|
@@ -11203,10 +10969,7 @@ var init_time_data_generated = __esm({
|
|
|
11203
10969
|
"H",
|
|
11204
10970
|
"hB"
|
|
11205
10971
|
],
|
|
11206
|
-
"ZW": [
|
|
11207
|
-
"H",
|
|
11208
|
-
"h"
|
|
11209
|
-
],
|
|
10972
|
+
"ZW": ["H", "h"],
|
|
11210
10973
|
"af-ZA": [
|
|
11211
10974
|
"H",
|
|
11212
10975
|
"h",
|
|
@@ -11302,10 +11065,7 @@ var init_time_data_generated = __esm({
|
|
|
11302
11065
|
"h",
|
|
11303
11066
|
"H"
|
|
11304
11067
|
],
|
|
11305
|
-
"ku-SY": [
|
|
11306
|
-
"H",
|
|
11307
|
-
"hB"
|
|
11308
|
-
],
|
|
11068
|
+
"ku-SY": ["H", "hB"],
|
|
11309
11069
|
"ml-IN": [
|
|
11310
11070
|
"hB",
|
|
11311
11071
|
"h",
|
|
@@ -11346,19 +11106,19 @@ var init_time_data_generated = __esm({
|
|
|
11346
11106
|
|
|
11347
11107
|
// node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/date-time-pattern-generator.js
|
|
11348
11108
|
function getBestPattern(skeleton, locale) {
|
|
11349
|
-
|
|
11350
|
-
for (
|
|
11351
|
-
|
|
11109
|
+
let skeletonCopy = "";
|
|
11110
|
+
for (let patternPos = 0; patternPos < skeleton.length; patternPos++) {
|
|
11111
|
+
const patternChar = skeleton.charAt(patternPos);
|
|
11352
11112
|
if (patternChar === "j") {
|
|
11353
|
-
|
|
11113
|
+
let extraLength = 0;
|
|
11354
11114
|
while (patternPos + 1 < skeleton.length && skeleton.charAt(patternPos + 1) === patternChar) {
|
|
11355
11115
|
extraLength++;
|
|
11356
11116
|
patternPos++;
|
|
11357
11117
|
}
|
|
11358
|
-
|
|
11359
|
-
|
|
11360
|
-
|
|
11361
|
-
|
|
11118
|
+
let hourLen = 1 + (extraLength & 1);
|
|
11119
|
+
let dayPeriodLen = extraLength < 2 ? 1 : 3 + (extraLength >> 1);
|
|
11120
|
+
let dayPeriodChar = "a";
|
|
11121
|
+
let hourChar = getDefaultHourSymbolFromLocale(locale);
|
|
11362
11122
|
if (hourChar == "H" || hourChar == "k") {
|
|
11363
11123
|
dayPeriodLen = 0;
|
|
11364
11124
|
}
|
|
@@ -11377,10 +11137,8 @@ function getBestPattern(skeleton, locale) {
|
|
|
11377
11137
|
return skeletonCopy;
|
|
11378
11138
|
}
|
|
11379
11139
|
function getDefaultHourSymbolFromLocale(locale) {
|
|
11380
|
-
|
|
11381
|
-
if (hourCycle === void 0 &&
|
|
11382
|
-
locale.hourCycles && // @ts-ignore
|
|
11383
|
-
locale.hourCycles.length) {
|
|
11140
|
+
let hourCycle = locale.hourCycle;
|
|
11141
|
+
if (hourCycle === void 0 && locale.hourCycles && locale.hourCycles.length) {
|
|
11384
11142
|
hourCycle = locale.hourCycles[0];
|
|
11385
11143
|
}
|
|
11386
11144
|
if (hourCycle) {
|
|
@@ -11397,12 +11155,12 @@ function getDefaultHourSymbolFromLocale(locale) {
|
|
|
11397
11155
|
throw new Error("Invalid hourCycle");
|
|
11398
11156
|
}
|
|
11399
11157
|
}
|
|
11400
|
-
|
|
11401
|
-
|
|
11158
|
+
const languageTag = locale.language;
|
|
11159
|
+
let regionTag;
|
|
11402
11160
|
if (languageTag !== "root") {
|
|
11403
11161
|
regionTag = locale.maximize().region;
|
|
11404
11162
|
}
|
|
11405
|
-
|
|
11163
|
+
const hourCycles = timeData[regionTag || ""] || timeData[languageTag || ""] || timeData[`${languageTag}-001`] || timeData["001"];
|
|
11406
11164
|
return hourCycles[0];
|
|
11407
11165
|
}
|
|
11408
11166
|
var init_date_time_pattern_generator = __esm({
|
|
@@ -11413,13 +11171,15 @@ var init_date_time_pattern_generator = __esm({
|
|
|
11413
11171
|
|
|
11414
11172
|
// node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/parser.js
|
|
11415
11173
|
function createLocation(start, end) {
|
|
11416
|
-
return {
|
|
11174
|
+
return {
|
|
11175
|
+
start,
|
|
11176
|
+
end
|
|
11177
|
+
};
|
|
11417
11178
|
}
|
|
11418
11179
|
function matchIdentifierAtIndex(s, index) {
|
|
11419
|
-
var _a;
|
|
11420
11180
|
IDENTIFIER_PREFIX_RE.lastIndex = index;
|
|
11421
|
-
|
|
11422
|
-
return
|
|
11181
|
+
const match = IDENTIFIER_PREFIX_RE.exec(s);
|
|
11182
|
+
return match[1] ?? "";
|
|
11423
11183
|
}
|
|
11424
11184
|
function _isAlpha(codepoint) {
|
|
11425
11185
|
return codepoint >= 97 && codepoint <= 122 || codepoint >= 65 && codepoint <= 90;
|
|
@@ -11436,77 +11196,65 @@ function _isWhiteSpace(c) {
|
|
|
11436
11196
|
var SPACE_SEPARATOR_START_REGEX, SPACE_SEPARATOR_END_REGEX, hasNativeFromEntries, hasTrimStart, hasTrimEnd, fromEntries, trimStart, trimEnd, IDENTIFIER_PREFIX_RE, Parser;
|
|
11437
11197
|
var init_parser = __esm({
|
|
11438
11198
|
"node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/parser.js"() {
|
|
11439
|
-
init_tslib_es6();
|
|
11440
11199
|
init_error();
|
|
11441
11200
|
init_types();
|
|
11442
|
-
|
|
11201
|
+
init_regex_generated2();
|
|
11443
11202
|
init_icu_skeleton_parser();
|
|
11444
11203
|
init_date_time_pattern_generator();
|
|
11445
|
-
SPACE_SEPARATOR_START_REGEX = new RegExp(
|
|
11446
|
-
SPACE_SEPARATOR_END_REGEX = new RegExp(
|
|
11204
|
+
SPACE_SEPARATOR_START_REGEX = new RegExp(`^${SPACE_SEPARATOR_REGEX.source}*`);
|
|
11205
|
+
SPACE_SEPARATOR_END_REGEX = new RegExp(`${SPACE_SEPARATOR_REGEX.source}*$`);
|
|
11447
11206
|
hasNativeFromEntries = !!Object.fromEntries;
|
|
11448
11207
|
hasTrimStart = !!String.prototype.trimStart;
|
|
11449
11208
|
hasTrimEnd = !!String.prototype.trimEnd;
|
|
11450
|
-
fromEntries =
|
|
11451
|
-
|
|
11452
|
-
|
|
11453
|
-
|
|
11454
|
-
var obj = {};
|
|
11455
|
-
for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {
|
|
11456
|
-
var _a = entries_1[_i], k = _a[0], v = _a[1];
|
|
11457
|
-
obj[k] = v;
|
|
11458
|
-
}
|
|
11459
|
-
return obj;
|
|
11209
|
+
fromEntries = hasNativeFromEntries ? Object.fromEntries : function fromEntries2(entries) {
|
|
11210
|
+
const obj = {};
|
|
11211
|
+
for (const [k, v] of entries) {
|
|
11212
|
+
obj[k] = v;
|
|
11460
11213
|
}
|
|
11461
|
-
|
|
11462
|
-
|
|
11463
|
-
|
|
11464
|
-
|
|
11465
|
-
|
|
11466
|
-
|
|
11467
|
-
|
|
11468
|
-
|
|
11469
|
-
|
|
11470
|
-
|
|
11471
|
-
|
|
11472
|
-
|
|
11473
|
-
trimEnd = hasTrimEnd ? (
|
|
11474
|
-
// Native
|
|
11475
|
-
function trimEnd2(s) {
|
|
11476
|
-
return s.trimEnd();
|
|
11477
|
-
}
|
|
11478
|
-
) : (
|
|
11479
|
-
// Ponyfill
|
|
11480
|
-
function trimEnd3(s) {
|
|
11481
|
-
return s.replace(SPACE_SEPARATOR_END_REGEX, "");
|
|
11482
|
-
}
|
|
11483
|
-
);
|
|
11214
|
+
return obj;
|
|
11215
|
+
};
|
|
11216
|
+
trimStart = hasTrimStart ? function trimStart2(s) {
|
|
11217
|
+
return s.trimStart();
|
|
11218
|
+
} : function trimStart3(s) {
|
|
11219
|
+
return s.replace(SPACE_SEPARATOR_START_REGEX, "");
|
|
11220
|
+
};
|
|
11221
|
+
trimEnd = hasTrimEnd ? function trimEnd2(s) {
|
|
11222
|
+
return s.trimEnd();
|
|
11223
|
+
} : function trimEnd3(s) {
|
|
11224
|
+
return s.replace(SPACE_SEPARATOR_END_REGEX, "");
|
|
11225
|
+
};
|
|
11484
11226
|
IDENTIFIER_PREFIX_RE = new RegExp("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
|
|
11485
|
-
Parser =
|
|
11486
|
-
|
|
11487
|
-
|
|
11488
|
-
|
|
11489
|
-
|
|
11490
|
-
|
|
11227
|
+
Parser = class {
|
|
11228
|
+
message;
|
|
11229
|
+
position;
|
|
11230
|
+
locale;
|
|
11231
|
+
ignoreTag;
|
|
11232
|
+
requiresOtherClause;
|
|
11233
|
+
shouldParseSkeletons;
|
|
11234
|
+
constructor(message, options = {}) {
|
|
11491
11235
|
this.message = message;
|
|
11492
|
-
this.position = {
|
|
11236
|
+
this.position = {
|
|
11237
|
+
offset: 0,
|
|
11238
|
+
line: 1,
|
|
11239
|
+
column: 1
|
|
11240
|
+
};
|
|
11493
11241
|
this.ignoreTag = !!options.ignoreTag;
|
|
11494
11242
|
this.locale = options.locale;
|
|
11495
11243
|
this.requiresOtherClause = !!options.requiresOtherClause;
|
|
11496
11244
|
this.shouldParseSkeletons = !!options.shouldParseSkeletons;
|
|
11497
11245
|
}
|
|
11498
|
-
|
|
11246
|
+
parse() {
|
|
11499
11247
|
if (this.offset() !== 0) {
|
|
11500
11248
|
throw Error("parser can only be used once");
|
|
11501
11249
|
}
|
|
11502
11250
|
return this.parseMessage(0, "", false);
|
|
11503
|
-
}
|
|
11504
|
-
|
|
11505
|
-
|
|
11251
|
+
}
|
|
11252
|
+
parseMessage(nestingLevel, parentArgType, expectingCloseTag) {
|
|
11253
|
+
let elements = [];
|
|
11506
11254
|
while (!this.isEOF()) {
|
|
11507
|
-
|
|
11255
|
+
const char = this.char();
|
|
11508
11256
|
if (char === 123) {
|
|
11509
|
-
|
|
11257
|
+
const result = this.parseArgument(nestingLevel, expectingCloseTag);
|
|
11510
11258
|
if (result.err) {
|
|
11511
11259
|
return result;
|
|
11512
11260
|
}
|
|
@@ -11514,7 +11262,7 @@ var init_parser = __esm({
|
|
|
11514
11262
|
} else if (char === 125 && nestingLevel > 0) {
|
|
11515
11263
|
break;
|
|
11516
11264
|
} else if (char === 35 && (parentArgType === "plural" || parentArgType === "selectordinal")) {
|
|
11517
|
-
|
|
11265
|
+
const position = this.clonePosition();
|
|
11518
11266
|
this.bump();
|
|
11519
11267
|
elements.push({
|
|
11520
11268
|
type: TYPE.pound,
|
|
@@ -11527,48 +11275,69 @@ var init_parser = __esm({
|
|
|
11527
11275
|
return this.error(ErrorKind.UNMATCHED_CLOSING_TAG, createLocation(this.clonePosition(), this.clonePosition()));
|
|
11528
11276
|
}
|
|
11529
11277
|
} else if (char === 60 && !this.ignoreTag && _isAlpha(this.peek() || 0)) {
|
|
11530
|
-
|
|
11278
|
+
const result = this.parseTag(nestingLevel, parentArgType);
|
|
11531
11279
|
if (result.err) {
|
|
11532
11280
|
return result;
|
|
11533
11281
|
}
|
|
11534
11282
|
elements.push(result.val);
|
|
11535
11283
|
} else {
|
|
11536
|
-
|
|
11284
|
+
const result = this.parseLiteral(nestingLevel, parentArgType);
|
|
11537
11285
|
if (result.err) {
|
|
11538
11286
|
return result;
|
|
11539
11287
|
}
|
|
11540
11288
|
elements.push(result.val);
|
|
11541
11289
|
}
|
|
11542
11290
|
}
|
|
11543
|
-
return {
|
|
11544
|
-
|
|
11545
|
-
|
|
11546
|
-
|
|
11291
|
+
return {
|
|
11292
|
+
val: elements,
|
|
11293
|
+
err: null
|
|
11294
|
+
};
|
|
11295
|
+
}
|
|
11296
|
+
/**
|
|
11297
|
+
* A tag name must start with an ASCII lower/upper case letter. The grammar is based on the
|
|
11298
|
+
* [custom element name][] except that a dash is NOT always mandatory and uppercase letters
|
|
11299
|
+
* are accepted:
|
|
11300
|
+
*
|
|
11301
|
+
* ```
|
|
11302
|
+
* tag ::= "<" tagName (whitespace)* "/>" | "<" tagName (whitespace)* ">" message "</" tagName (whitespace)* ">"
|
|
11303
|
+
* tagName ::= [a-z] (PENChar)*
|
|
11304
|
+
* PENChar ::=
|
|
11305
|
+
* "-" | "." | [0-9] | "_" | [a-z] | [A-Z] | #xB7 | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x37D] |
|
|
11306
|
+
* [#x37F-#x1FFF] | [#x200C-#x200D] | [#x203F-#x2040] | [#x2070-#x218F] | [#x2C00-#x2FEF] |
|
|
11307
|
+
* [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]
|
|
11308
|
+
* ```
|
|
11309
|
+
*
|
|
11310
|
+
* [custom element name]: https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name
|
|
11311
|
+
* NOTE: We're a bit more lax here since HTML technically does not allow uppercase HTML element but we do
|
|
11312
|
+
* since other tag-based engines like React allow it
|
|
11313
|
+
*/
|
|
11314
|
+
parseTag(nestingLevel, parentArgType) {
|
|
11315
|
+
const startPosition = this.clonePosition();
|
|
11547
11316
|
this.bump();
|
|
11548
|
-
|
|
11317
|
+
const tagName = this.parseTagName();
|
|
11549
11318
|
this.bumpSpace();
|
|
11550
11319
|
if (this.bumpIf("/>")) {
|
|
11551
11320
|
return {
|
|
11552
11321
|
val: {
|
|
11553
11322
|
type: TYPE.literal,
|
|
11554
|
-
value:
|
|
11323
|
+
value: `<${tagName}/>`,
|
|
11555
11324
|
location: createLocation(startPosition, this.clonePosition())
|
|
11556
11325
|
},
|
|
11557
11326
|
err: null
|
|
11558
11327
|
};
|
|
11559
11328
|
} else if (this.bumpIf(">")) {
|
|
11560
|
-
|
|
11329
|
+
const childrenResult = this.parseMessage(nestingLevel + 1, parentArgType, true);
|
|
11561
11330
|
if (childrenResult.err) {
|
|
11562
11331
|
return childrenResult;
|
|
11563
11332
|
}
|
|
11564
|
-
|
|
11565
|
-
|
|
11333
|
+
const children = childrenResult.val;
|
|
11334
|
+
const endTagStartPosition = this.clonePosition();
|
|
11566
11335
|
if (this.bumpIf("</")) {
|
|
11567
11336
|
if (this.isEOF() || !_isAlpha(this.char())) {
|
|
11568
11337
|
return this.error(ErrorKind.INVALID_TAG, createLocation(endTagStartPosition, this.clonePosition()));
|
|
11569
11338
|
}
|
|
11570
|
-
|
|
11571
|
-
|
|
11339
|
+
const closingTagNameStartPosition = this.clonePosition();
|
|
11340
|
+
const closingTagName = this.parseTagName();
|
|
11572
11341
|
if (tagName !== closingTagName) {
|
|
11573
11342
|
return this.error(ErrorKind.UNMATCHED_CLOSING_TAG, createLocation(closingTagNameStartPosition, this.clonePosition()));
|
|
11574
11343
|
}
|
|
@@ -11591,51 +11360,62 @@ var init_parser = __esm({
|
|
|
11591
11360
|
} else {
|
|
11592
11361
|
return this.error(ErrorKind.INVALID_TAG, createLocation(startPosition, this.clonePosition()));
|
|
11593
11362
|
}
|
|
11594
|
-
}
|
|
11595
|
-
|
|
11596
|
-
|
|
11363
|
+
}
|
|
11364
|
+
/**
|
|
11365
|
+
* This method assumes that the caller has peeked ahead for the first tag character.
|
|
11366
|
+
*/
|
|
11367
|
+
parseTagName() {
|
|
11368
|
+
const startOffset = this.offset();
|
|
11597
11369
|
this.bump();
|
|
11598
11370
|
while (!this.isEOF() && _isPotentialElementNameChar(this.char())) {
|
|
11599
11371
|
this.bump();
|
|
11600
11372
|
}
|
|
11601
11373
|
return this.message.slice(startOffset, this.offset());
|
|
11602
|
-
}
|
|
11603
|
-
|
|
11604
|
-
|
|
11605
|
-
|
|
11374
|
+
}
|
|
11375
|
+
parseLiteral(nestingLevel, parentArgType) {
|
|
11376
|
+
const start = this.clonePosition();
|
|
11377
|
+
let value = "";
|
|
11606
11378
|
while (true) {
|
|
11607
|
-
|
|
11379
|
+
const parseQuoteResult = this.tryParseQuote(parentArgType);
|
|
11608
11380
|
if (parseQuoteResult) {
|
|
11609
11381
|
value += parseQuoteResult;
|
|
11610
11382
|
continue;
|
|
11611
11383
|
}
|
|
11612
|
-
|
|
11384
|
+
const parseUnquotedResult = this.tryParseUnquoted(nestingLevel, parentArgType);
|
|
11613
11385
|
if (parseUnquotedResult) {
|
|
11614
11386
|
value += parseUnquotedResult;
|
|
11615
11387
|
continue;
|
|
11616
11388
|
}
|
|
11617
|
-
|
|
11389
|
+
const parseLeftAngleResult = this.tryParseLeftAngleBracket();
|
|
11618
11390
|
if (parseLeftAngleResult) {
|
|
11619
11391
|
value += parseLeftAngleResult;
|
|
11620
11392
|
continue;
|
|
11621
11393
|
}
|
|
11622
11394
|
break;
|
|
11623
11395
|
}
|
|
11624
|
-
|
|
11396
|
+
const location = createLocation(start, this.clonePosition());
|
|
11625
11397
|
return {
|
|
11626
|
-
val: {
|
|
11398
|
+
val: {
|
|
11399
|
+
type: TYPE.literal,
|
|
11400
|
+
value,
|
|
11401
|
+
location
|
|
11402
|
+
},
|
|
11627
11403
|
err: null
|
|
11628
11404
|
};
|
|
11629
|
-
}
|
|
11630
|
-
|
|
11631
|
-
if (!this.isEOF() && this.char() === 60 && (this.ignoreTag ||
|
|
11632
|
-
!_isAlphaOrSlash(this.peek() || 0))) {
|
|
11405
|
+
}
|
|
11406
|
+
tryParseLeftAngleBracket() {
|
|
11407
|
+
if (!this.isEOF() && this.char() === 60 && (this.ignoreTag || !_isAlphaOrSlash(this.peek() || 0))) {
|
|
11633
11408
|
this.bump();
|
|
11634
11409
|
return "<";
|
|
11635
11410
|
}
|
|
11636
11411
|
return null;
|
|
11637
|
-
}
|
|
11638
|
-
|
|
11412
|
+
}
|
|
11413
|
+
/**
|
|
11414
|
+
* Starting with ICU 4.8, an ASCII apostrophe only starts quoted text if it immediately precedes
|
|
11415
|
+
* a character that requires quoting (that is, "only where needed"), and works the same in
|
|
11416
|
+
* nested messages as on the top level of the pattern. The new behavior is otherwise compatible.
|
|
11417
|
+
*/
|
|
11418
|
+
tryParseQuote(parentArgType) {
|
|
11639
11419
|
if (this.isEOF() || this.char() !== 39) {
|
|
11640
11420
|
return null;
|
|
11641
11421
|
}
|
|
@@ -11658,10 +11438,10 @@ var init_parser = __esm({
|
|
|
11658
11438
|
return null;
|
|
11659
11439
|
}
|
|
11660
11440
|
this.bump();
|
|
11661
|
-
|
|
11441
|
+
const codePoints = [this.char()];
|
|
11662
11442
|
this.bump();
|
|
11663
11443
|
while (!this.isEOF()) {
|
|
11664
|
-
|
|
11444
|
+
const ch = this.char();
|
|
11665
11445
|
if (ch === 39) {
|
|
11666
11446
|
if (this.peek() === 39) {
|
|
11667
11447
|
codePoints.push(39);
|
|
@@ -11675,22 +11455,22 @@ var init_parser = __esm({
|
|
|
11675
11455
|
}
|
|
11676
11456
|
this.bump();
|
|
11677
11457
|
}
|
|
11678
|
-
return String.fromCodePoint
|
|
11679
|
-
}
|
|
11680
|
-
|
|
11458
|
+
return String.fromCodePoint(...codePoints);
|
|
11459
|
+
}
|
|
11460
|
+
tryParseUnquoted(nestingLevel, parentArgType) {
|
|
11681
11461
|
if (this.isEOF()) {
|
|
11682
11462
|
return null;
|
|
11683
11463
|
}
|
|
11684
|
-
|
|
11464
|
+
const ch = this.char();
|
|
11685
11465
|
if (ch === 60 || ch === 123 || ch === 35 && (parentArgType === "plural" || parentArgType === "selectordinal") || ch === 125 && nestingLevel > 0) {
|
|
11686
11466
|
return null;
|
|
11687
11467
|
} else {
|
|
11688
11468
|
this.bump();
|
|
11689
11469
|
return String.fromCodePoint(ch);
|
|
11690
11470
|
}
|
|
11691
|
-
}
|
|
11692
|
-
|
|
11693
|
-
|
|
11471
|
+
}
|
|
11472
|
+
parseArgument(nestingLevel, expectingCloseTag) {
|
|
11473
|
+
const openingBracePosition = this.clonePosition();
|
|
11694
11474
|
this.bump();
|
|
11695
11475
|
this.bumpSpace();
|
|
11696
11476
|
if (this.isEOF()) {
|
|
@@ -11700,7 +11480,7 @@ var init_parser = __esm({
|
|
|
11700
11480
|
this.bump();
|
|
11701
11481
|
return this.error(ErrorKind.EMPTY_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));
|
|
11702
11482
|
}
|
|
11703
|
-
|
|
11483
|
+
let value = this.parseIdentifierIfPossible().value;
|
|
11704
11484
|
if (!value) {
|
|
11705
11485
|
return this.error(ErrorKind.MALFORMED_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));
|
|
11706
11486
|
}
|
|
@@ -11714,7 +11494,6 @@ var init_parser = __esm({
|
|
|
11714
11494
|
return {
|
|
11715
11495
|
val: {
|
|
11716
11496
|
type: TYPE.argument,
|
|
11717
|
-
// value does not include the opening and closing braces.
|
|
11718
11497
|
value,
|
|
11719
11498
|
location: createLocation(openingBracePosition, this.clonePosition())
|
|
11720
11499
|
},
|
|
@@ -11732,22 +11511,28 @@ var init_parser = __esm({
|
|
|
11732
11511
|
default:
|
|
11733
11512
|
return this.error(ErrorKind.MALFORMED_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));
|
|
11734
11513
|
}
|
|
11735
|
-
}
|
|
11736
|
-
|
|
11737
|
-
|
|
11738
|
-
|
|
11739
|
-
|
|
11740
|
-
|
|
11514
|
+
}
|
|
11515
|
+
/**
|
|
11516
|
+
* Advance the parser until the end of the identifier, if it is currently on
|
|
11517
|
+
* an identifier character. Return an empty string otherwise.
|
|
11518
|
+
*/
|
|
11519
|
+
parseIdentifierIfPossible() {
|
|
11520
|
+
const startingPosition = this.clonePosition();
|
|
11521
|
+
const startOffset = this.offset();
|
|
11522
|
+
const value = matchIdentifierAtIndex(this.message, startOffset);
|
|
11523
|
+
const endOffset = startOffset + value.length;
|
|
11741
11524
|
this.bumpTo(endOffset);
|
|
11742
|
-
|
|
11743
|
-
|
|
11744
|
-
return {
|
|
11745
|
-
|
|
11746
|
-
|
|
11747
|
-
|
|
11748
|
-
|
|
11749
|
-
|
|
11750
|
-
|
|
11525
|
+
const endPosition = this.clonePosition();
|
|
11526
|
+
const location = createLocation(startingPosition, endPosition);
|
|
11527
|
+
return {
|
|
11528
|
+
value,
|
|
11529
|
+
location
|
|
11530
|
+
};
|
|
11531
|
+
}
|
|
11532
|
+
parseArgumentOptions(nestingLevel, expectingCloseTag, value, openingBracePosition) {
|
|
11533
|
+
let typeStartPosition = this.clonePosition();
|
|
11534
|
+
let argType = this.parseIdentifierIfPossible().value;
|
|
11535
|
+
let typeEndPosition = this.clonePosition();
|
|
11751
11536
|
switch (argType) {
|
|
11752
11537
|
case "":
|
|
11753
11538
|
return this.error(ErrorKind.EXPECT_ARGUMENT_TYPE, createLocation(typeStartPosition, typeEndPosition));
|
|
@@ -11755,54 +11540,67 @@ var init_parser = __esm({
|
|
|
11755
11540
|
case "date":
|
|
11756
11541
|
case "time": {
|
|
11757
11542
|
this.bumpSpace();
|
|
11758
|
-
|
|
11543
|
+
let styleAndLocation = null;
|
|
11759
11544
|
if (this.bumpIf(",")) {
|
|
11760
11545
|
this.bumpSpace();
|
|
11761
|
-
|
|
11762
|
-
|
|
11546
|
+
const styleStartPosition = this.clonePosition();
|
|
11547
|
+
const result = this.parseSimpleArgStyleIfPossible();
|
|
11763
11548
|
if (result.err) {
|
|
11764
11549
|
return result;
|
|
11765
11550
|
}
|
|
11766
|
-
|
|
11551
|
+
const style = trimEnd(result.val);
|
|
11767
11552
|
if (style.length === 0) {
|
|
11768
11553
|
return this.error(ErrorKind.EXPECT_ARGUMENT_STYLE, createLocation(this.clonePosition(), this.clonePosition()));
|
|
11769
11554
|
}
|
|
11770
|
-
|
|
11771
|
-
styleAndLocation = {
|
|
11555
|
+
const styleLocation = createLocation(styleStartPosition, this.clonePosition());
|
|
11556
|
+
styleAndLocation = {
|
|
11557
|
+
style,
|
|
11558
|
+
styleLocation
|
|
11559
|
+
};
|
|
11772
11560
|
}
|
|
11773
|
-
|
|
11561
|
+
const argCloseResult = this.tryParseArgumentClose(openingBracePosition);
|
|
11774
11562
|
if (argCloseResult.err) {
|
|
11775
11563
|
return argCloseResult;
|
|
11776
11564
|
}
|
|
11777
|
-
|
|
11565
|
+
const location = createLocation(openingBracePosition, this.clonePosition());
|
|
11778
11566
|
if (styleAndLocation && styleAndLocation.style.startsWith("::")) {
|
|
11779
|
-
|
|
11567
|
+
let skeleton = trimStart(styleAndLocation.style.slice(2));
|
|
11780
11568
|
if (argType === "number") {
|
|
11781
|
-
|
|
11569
|
+
const result = this.parseNumberSkeletonFromString(skeleton, styleAndLocation.styleLocation);
|
|
11782
11570
|
if (result.err) {
|
|
11783
11571
|
return result;
|
|
11784
11572
|
}
|
|
11785
11573
|
return {
|
|
11786
|
-
val: {
|
|
11574
|
+
val: {
|
|
11575
|
+
type: TYPE.number,
|
|
11576
|
+
value,
|
|
11577
|
+
location,
|
|
11578
|
+
style: result.val
|
|
11579
|
+
},
|
|
11787
11580
|
err: null
|
|
11788
11581
|
};
|
|
11789
11582
|
} else {
|
|
11790
11583
|
if (skeleton.length === 0) {
|
|
11791
|
-
return this.error(ErrorKind.EXPECT_DATE_TIME_SKELETON,
|
|
11584
|
+
return this.error(ErrorKind.EXPECT_DATE_TIME_SKELETON, location);
|
|
11792
11585
|
}
|
|
11793
|
-
|
|
11586
|
+
let dateTimePattern = skeleton;
|
|
11794
11587
|
if (this.locale) {
|
|
11795
11588
|
dateTimePattern = getBestPattern(skeleton, this.locale);
|
|
11796
11589
|
}
|
|
11797
|
-
|
|
11590
|
+
const style = {
|
|
11798
11591
|
type: SKELETON_TYPE.dateTime,
|
|
11799
11592
|
pattern: dateTimePattern,
|
|
11800
11593
|
location: styleAndLocation.styleLocation,
|
|
11801
11594
|
parsedOptions: this.shouldParseSkeletons ? parseDateTimeSkeleton(dateTimePattern) : {}
|
|
11802
11595
|
};
|
|
11803
|
-
|
|
11596
|
+
const type = argType === "date" ? TYPE.date : TYPE.time;
|
|
11804
11597
|
return {
|
|
11805
|
-
val: {
|
|
11598
|
+
val: {
|
|
11599
|
+
type,
|
|
11600
|
+
value,
|
|
11601
|
+
location,
|
|
11602
|
+
style
|
|
11603
|
+
},
|
|
11806
11604
|
err: null
|
|
11807
11605
|
};
|
|
11808
11606
|
}
|
|
@@ -11811,8 +11609,8 @@ var init_parser = __esm({
|
|
|
11811
11609
|
val: {
|
|
11812
11610
|
type: argType === "number" ? TYPE.number : argType === "date" ? TYPE.date : TYPE.time,
|
|
11813
11611
|
value,
|
|
11814
|
-
location
|
|
11815
|
-
style: (
|
|
11612
|
+
location,
|
|
11613
|
+
style: (styleAndLocation == null ? void 0 : styleAndLocation.style) ?? null
|
|
11816
11614
|
},
|
|
11817
11615
|
err: null
|
|
11818
11616
|
};
|
|
@@ -11820,20 +11618,20 @@ var init_parser = __esm({
|
|
|
11820
11618
|
case "plural":
|
|
11821
11619
|
case "selectordinal":
|
|
11822
11620
|
case "select": {
|
|
11823
|
-
|
|
11621
|
+
const typeEndPosition2 = this.clonePosition();
|
|
11824
11622
|
this.bumpSpace();
|
|
11825
11623
|
if (!this.bumpIf(",")) {
|
|
11826
|
-
return this.error(ErrorKind.EXPECT_SELECT_ARGUMENT_OPTIONS, createLocation(
|
|
11624
|
+
return this.error(ErrorKind.EXPECT_SELECT_ARGUMENT_OPTIONS, createLocation(typeEndPosition2, { ...typeEndPosition2 }));
|
|
11827
11625
|
}
|
|
11828
11626
|
this.bumpSpace();
|
|
11829
|
-
|
|
11830
|
-
|
|
11627
|
+
let identifierAndLocation = this.parseIdentifierIfPossible();
|
|
11628
|
+
let pluralOffset = 0;
|
|
11831
11629
|
if (argType !== "select" && identifierAndLocation.value === "offset") {
|
|
11832
11630
|
if (!this.bumpIf(":")) {
|
|
11833
11631
|
return this.error(ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, createLocation(this.clonePosition(), this.clonePosition()));
|
|
11834
11632
|
}
|
|
11835
11633
|
this.bumpSpace();
|
|
11836
|
-
|
|
11634
|
+
const result = this.tryParseDecimalInteger(ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, ErrorKind.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);
|
|
11837
11635
|
if (result.err) {
|
|
11838
11636
|
return result;
|
|
11839
11637
|
}
|
|
@@ -11841,22 +11639,22 @@ var init_parser = __esm({
|
|
|
11841
11639
|
identifierAndLocation = this.parseIdentifierIfPossible();
|
|
11842
11640
|
pluralOffset = result.val;
|
|
11843
11641
|
}
|
|
11844
|
-
|
|
11642
|
+
const optionsResult = this.tryParsePluralOrSelectOptions(nestingLevel, argType, expectingCloseTag, identifierAndLocation);
|
|
11845
11643
|
if (optionsResult.err) {
|
|
11846
11644
|
return optionsResult;
|
|
11847
11645
|
}
|
|
11848
|
-
|
|
11646
|
+
const argCloseResult = this.tryParseArgumentClose(openingBracePosition);
|
|
11849
11647
|
if (argCloseResult.err) {
|
|
11850
11648
|
return argCloseResult;
|
|
11851
11649
|
}
|
|
11852
|
-
|
|
11650
|
+
const location = createLocation(openingBracePosition, this.clonePosition());
|
|
11853
11651
|
if (argType === "select") {
|
|
11854
11652
|
return {
|
|
11855
11653
|
val: {
|
|
11856
11654
|
type: TYPE.select,
|
|
11857
11655
|
value,
|
|
11858
11656
|
options: fromEntries(optionsResult.val),
|
|
11859
|
-
location
|
|
11657
|
+
location
|
|
11860
11658
|
},
|
|
11861
11659
|
err: null
|
|
11862
11660
|
};
|
|
@@ -11868,7 +11666,7 @@ var init_parser = __esm({
|
|
|
11868
11666
|
options: fromEntries(optionsResult.val),
|
|
11869
11667
|
offset: pluralOffset,
|
|
11870
11668
|
pluralType: argType === "plural" ? "cardinal" : "ordinal",
|
|
11871
|
-
location
|
|
11669
|
+
location
|
|
11872
11670
|
},
|
|
11873
11671
|
err: null
|
|
11874
11672
|
};
|
|
@@ -11877,23 +11675,29 @@ var init_parser = __esm({
|
|
|
11877
11675
|
default:
|
|
11878
11676
|
return this.error(ErrorKind.INVALID_ARGUMENT_TYPE, createLocation(typeStartPosition, typeEndPosition));
|
|
11879
11677
|
}
|
|
11880
|
-
}
|
|
11881
|
-
|
|
11678
|
+
}
|
|
11679
|
+
tryParseArgumentClose(openingBracePosition) {
|
|
11882
11680
|
if (this.isEOF() || this.char() !== 125) {
|
|
11883
11681
|
return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));
|
|
11884
11682
|
}
|
|
11885
11683
|
this.bump();
|
|
11886
|
-
return {
|
|
11887
|
-
|
|
11888
|
-
|
|
11889
|
-
|
|
11890
|
-
|
|
11684
|
+
return {
|
|
11685
|
+
val: true,
|
|
11686
|
+
err: null
|
|
11687
|
+
};
|
|
11688
|
+
}
|
|
11689
|
+
/**
|
|
11690
|
+
* See: https://github.com/unicode-org/icu/blob/af7ed1f6d2298013dc303628438ec4abe1f16479/icu4c/source/common/messagepattern.cpp#L659
|
|
11691
|
+
*/
|
|
11692
|
+
parseSimpleArgStyleIfPossible() {
|
|
11693
|
+
let nestedBraces = 0;
|
|
11694
|
+
const startPosition = this.clonePosition();
|
|
11891
11695
|
while (!this.isEOF()) {
|
|
11892
|
-
|
|
11696
|
+
const ch = this.char();
|
|
11893
11697
|
switch (ch) {
|
|
11894
11698
|
case 39: {
|
|
11895
11699
|
this.bump();
|
|
11896
|
-
|
|
11700
|
+
let apostrophePosition = this.clonePosition();
|
|
11897
11701
|
if (!this.bumpUntil("'")) {
|
|
11898
11702
|
return this.error(ErrorKind.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE, createLocation(apostrophePosition, this.clonePosition()));
|
|
11899
11703
|
}
|
|
@@ -11925,12 +11729,12 @@ var init_parser = __esm({
|
|
|
11925
11729
|
val: this.message.slice(startPosition.offset, this.offset()),
|
|
11926
11730
|
err: null
|
|
11927
11731
|
};
|
|
11928
|
-
}
|
|
11929
|
-
|
|
11930
|
-
|
|
11732
|
+
}
|
|
11733
|
+
parseNumberSkeletonFromString(skeleton, location) {
|
|
11734
|
+
let tokens = [];
|
|
11931
11735
|
try {
|
|
11932
11736
|
tokens = parseNumberSkeletonFromString(skeleton);
|
|
11933
|
-
} catch
|
|
11737
|
+
} catch {
|
|
11934
11738
|
return this.error(ErrorKind.INVALID_NUMBER_SKELETON, location);
|
|
11935
11739
|
}
|
|
11936
11740
|
return {
|
|
@@ -11942,18 +11746,27 @@ var init_parser = __esm({
|
|
|
11942
11746
|
},
|
|
11943
11747
|
err: null
|
|
11944
11748
|
};
|
|
11945
|
-
}
|
|
11946
|
-
|
|
11947
|
-
|
|
11948
|
-
|
|
11949
|
-
|
|
11950
|
-
|
|
11951
|
-
|
|
11749
|
+
}
|
|
11750
|
+
/**
|
|
11751
|
+
* @param nesting_level The current nesting level of messages.
|
|
11752
|
+
* This can be positive when parsing message fragment in select or plural argument options.
|
|
11753
|
+
* @param parent_arg_type The parent argument's type.
|
|
11754
|
+
* @param parsed_first_identifier If provided, this is the first identifier-like selector of
|
|
11755
|
+
* the argument. It is a by-product of a previous parsing attempt.
|
|
11756
|
+
* @param expecting_close_tag If true, this message is directly or indirectly nested inside
|
|
11757
|
+
* between a pair of opening and closing tags. The nested message will not parse beyond
|
|
11758
|
+
* the closing tag boundary.
|
|
11759
|
+
*/
|
|
11760
|
+
tryParsePluralOrSelectOptions(nestingLevel, parentArgType, expectCloseTag, parsedFirstIdentifier) {
|
|
11761
|
+
let hasOtherClause = false;
|
|
11762
|
+
const options = [];
|
|
11763
|
+
const parsedSelectors = /* @__PURE__ */ new Set();
|
|
11764
|
+
let { value: selector, location: selectorLocation } = parsedFirstIdentifier;
|
|
11952
11765
|
while (true) {
|
|
11953
11766
|
if (selector.length === 0) {
|
|
11954
|
-
|
|
11767
|
+
const startPosition = this.clonePosition();
|
|
11955
11768
|
if (parentArgType !== "select" && this.bumpIf("=")) {
|
|
11956
|
-
|
|
11769
|
+
const result = this.tryParseDecimalInteger(ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, ErrorKind.INVALID_PLURAL_ARGUMENT_SELECTOR);
|
|
11957
11770
|
if (result.err) {
|
|
11958
11771
|
return result;
|
|
11959
11772
|
}
|
|
@@ -11970,28 +11783,25 @@ var init_parser = __esm({
|
|
|
11970
11783
|
hasOtherClause = true;
|
|
11971
11784
|
}
|
|
11972
11785
|
this.bumpSpace();
|
|
11973
|
-
|
|
11786
|
+
const openingBracePosition = this.clonePosition();
|
|
11974
11787
|
if (!this.bumpIf("{")) {
|
|
11975
11788
|
return this.error(parentArgType === "select" ? ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT : ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, createLocation(this.clonePosition(), this.clonePosition()));
|
|
11976
11789
|
}
|
|
11977
|
-
|
|
11790
|
+
const fragmentResult = this.parseMessage(nestingLevel + 1, parentArgType, expectCloseTag);
|
|
11978
11791
|
if (fragmentResult.err) {
|
|
11979
11792
|
return fragmentResult;
|
|
11980
11793
|
}
|
|
11981
|
-
|
|
11794
|
+
const argCloseResult = this.tryParseArgumentClose(openingBracePosition);
|
|
11982
11795
|
if (argCloseResult.err) {
|
|
11983
11796
|
return argCloseResult;
|
|
11984
11797
|
}
|
|
11985
|
-
options.push([
|
|
11986
|
-
|
|
11987
|
-
|
|
11988
|
-
|
|
11989
|
-
location: createLocation(openingBracePosition, this.clonePosition())
|
|
11990
|
-
}
|
|
11991
|
-
]);
|
|
11798
|
+
options.push([selector, {
|
|
11799
|
+
value: fragmentResult.val,
|
|
11800
|
+
location: createLocation(openingBracePosition, this.clonePosition())
|
|
11801
|
+
}]);
|
|
11992
11802
|
parsedSelectors.add(selector);
|
|
11993
11803
|
this.bumpSpace();
|
|
11994
|
-
|
|
11804
|
+
({ value: selector, location: selectorLocation } = this.parseIdentifierIfPossible());
|
|
11995
11805
|
}
|
|
11996
11806
|
if (options.length === 0) {
|
|
11997
11807
|
return this.error(parentArgType === "select" ? ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR : ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, createLocation(this.clonePosition(), this.clonePosition()));
|
|
@@ -11999,19 +11809,22 @@ var init_parser = __esm({
|
|
|
11999
11809
|
if (this.requiresOtherClause && !hasOtherClause) {
|
|
12000
11810
|
return this.error(ErrorKind.MISSING_OTHER_CLAUSE, createLocation(this.clonePosition(), this.clonePosition()));
|
|
12001
11811
|
}
|
|
12002
|
-
return {
|
|
12003
|
-
|
|
12004
|
-
|
|
12005
|
-
|
|
12006
|
-
|
|
11812
|
+
return {
|
|
11813
|
+
val: options,
|
|
11814
|
+
err: null
|
|
11815
|
+
};
|
|
11816
|
+
}
|
|
11817
|
+
tryParseDecimalInteger(expectNumberError, invalidNumberError) {
|
|
11818
|
+
let sign = 1;
|
|
11819
|
+
const startingPosition = this.clonePosition();
|
|
12007
11820
|
if (this.bumpIf("+")) {
|
|
12008
11821
|
} else if (this.bumpIf("-")) {
|
|
12009
11822
|
sign = -1;
|
|
12010
11823
|
}
|
|
12011
|
-
|
|
12012
|
-
|
|
11824
|
+
let hasDigits = false;
|
|
11825
|
+
let decimal = 0;
|
|
12013
11826
|
while (!this.isEOF()) {
|
|
12014
|
-
|
|
11827
|
+
const ch = this.char();
|
|
12015
11828
|
if (ch >= 48 && ch <= 57) {
|
|
12016
11829
|
hasDigits = true;
|
|
12017
11830
|
decimal = decimal * 10 + (ch - 48);
|
|
@@ -12020,7 +11833,7 @@ var init_parser = __esm({
|
|
|
12020
11833
|
break;
|
|
12021
11834
|
}
|
|
12022
11835
|
}
|
|
12023
|
-
|
|
11836
|
+
const location = createLocation(startingPosition, this.clonePosition());
|
|
12024
11837
|
if (!hasDigits) {
|
|
12025
11838
|
return this.error(expectNumberError, location);
|
|
12026
11839
|
}
|
|
@@ -12028,33 +11841,40 @@ var init_parser = __esm({
|
|
|
12028
11841
|
if (!Number.isSafeInteger(decimal)) {
|
|
12029
11842
|
return this.error(invalidNumberError, location);
|
|
12030
11843
|
}
|
|
12031
|
-
return {
|
|
12032
|
-
|
|
12033
|
-
|
|
11844
|
+
return {
|
|
11845
|
+
val: decimal,
|
|
11846
|
+
err: null
|
|
11847
|
+
};
|
|
11848
|
+
}
|
|
11849
|
+
offset() {
|
|
12034
11850
|
return this.position.offset;
|
|
12035
|
-
}
|
|
12036
|
-
|
|
11851
|
+
}
|
|
11852
|
+
isEOF() {
|
|
12037
11853
|
return this.offset() === this.message.length;
|
|
12038
|
-
}
|
|
12039
|
-
|
|
11854
|
+
}
|
|
11855
|
+
clonePosition() {
|
|
12040
11856
|
return {
|
|
12041
11857
|
offset: this.position.offset,
|
|
12042
11858
|
line: this.position.line,
|
|
12043
11859
|
column: this.position.column
|
|
12044
11860
|
};
|
|
12045
|
-
}
|
|
12046
|
-
|
|
12047
|
-
|
|
11861
|
+
}
|
|
11862
|
+
/**
|
|
11863
|
+
* Return the code point at the current position of the parser.
|
|
11864
|
+
* Throws if the index is out of bound.
|
|
11865
|
+
*/
|
|
11866
|
+
char() {
|
|
11867
|
+
const offset = this.position.offset;
|
|
12048
11868
|
if (offset >= this.message.length) {
|
|
12049
11869
|
throw Error("out of bound");
|
|
12050
11870
|
}
|
|
12051
|
-
|
|
11871
|
+
const code = this.message.codePointAt(offset);
|
|
12052
11872
|
if (code === void 0) {
|
|
12053
|
-
throw Error(
|
|
11873
|
+
throw Error(`Offset ${offset} is at invalid UTF-16 code unit boundary`);
|
|
12054
11874
|
}
|
|
12055
11875
|
return code;
|
|
12056
|
-
}
|
|
12057
|
-
|
|
11876
|
+
}
|
|
11877
|
+
error(kind, location) {
|
|
12058
11878
|
return {
|
|
12059
11879
|
val: null,
|
|
12060
11880
|
err: {
|
|
@@ -12063,12 +11883,13 @@ var init_parser = __esm({
|
|
|
12063
11883
|
location
|
|
12064
11884
|
}
|
|
12065
11885
|
};
|
|
12066
|
-
}
|
|
12067
|
-
|
|
11886
|
+
}
|
|
11887
|
+
/** Bump the parser to the next UTF-16 code unit. */
|
|
11888
|
+
bump() {
|
|
12068
11889
|
if (this.isEOF()) {
|
|
12069
11890
|
return;
|
|
12070
11891
|
}
|
|
12071
|
-
|
|
11892
|
+
const code = this.char();
|
|
12072
11893
|
if (code === 10) {
|
|
12073
11894
|
this.position.line += 1;
|
|
12074
11895
|
this.position.column = 1;
|
|
@@ -12077,19 +11898,29 @@ var init_parser = __esm({
|
|
|
12077
11898
|
this.position.column += 1;
|
|
12078
11899
|
this.position.offset += code < 65536 ? 1 : 2;
|
|
12079
11900
|
}
|
|
12080
|
-
}
|
|
12081
|
-
|
|
11901
|
+
}
|
|
11902
|
+
/**
|
|
11903
|
+
* If the substring starting at the current position of the parser has
|
|
11904
|
+
* the given prefix, then bump the parser to the character immediately
|
|
11905
|
+
* following the prefix and return true. Otherwise, don't bump the parser
|
|
11906
|
+
* and return false.
|
|
11907
|
+
*/
|
|
11908
|
+
bumpIf(prefix) {
|
|
12082
11909
|
if (this.message.startsWith(prefix, this.offset())) {
|
|
12083
|
-
for (
|
|
11910
|
+
for (let i = 0; i < prefix.length; i++) {
|
|
12084
11911
|
this.bump();
|
|
12085
11912
|
}
|
|
12086
11913
|
return true;
|
|
12087
11914
|
}
|
|
12088
11915
|
return false;
|
|
12089
|
-
}
|
|
12090
|
-
|
|
12091
|
-
|
|
12092
|
-
|
|
11916
|
+
}
|
|
11917
|
+
/**
|
|
11918
|
+
* Bump the parser until the pattern character is found and return `true`.
|
|
11919
|
+
* Otherwise bump to the end of the file and return `false`.
|
|
11920
|
+
*/
|
|
11921
|
+
bumpUntil(pattern) {
|
|
11922
|
+
const currentOffset = this.offset();
|
|
11923
|
+
const index = this.message.indexOf(pattern, currentOffset);
|
|
12093
11924
|
if (index >= 0) {
|
|
12094
11925
|
this.bumpTo(index);
|
|
12095
11926
|
return true;
|
|
@@ -12097,42 +11928,50 @@ var init_parser = __esm({
|
|
|
12097
11928
|
this.bumpTo(this.message.length);
|
|
12098
11929
|
return false;
|
|
12099
11930
|
}
|
|
12100
|
-
}
|
|
12101
|
-
|
|
11931
|
+
}
|
|
11932
|
+
/**
|
|
11933
|
+
* Bump the parser to the target offset.
|
|
11934
|
+
* If target offset is beyond the end of the input, bump the parser to the end of the input.
|
|
11935
|
+
*/
|
|
11936
|
+
bumpTo(targetOffset) {
|
|
12102
11937
|
if (this.offset() > targetOffset) {
|
|
12103
|
-
throw Error(
|
|
11938
|
+
throw Error(`targetOffset ${targetOffset} must be greater than or equal to the current offset ${this.offset()}`);
|
|
12104
11939
|
}
|
|
12105
11940
|
targetOffset = Math.min(targetOffset, this.message.length);
|
|
12106
11941
|
while (true) {
|
|
12107
|
-
|
|
11942
|
+
const offset = this.offset();
|
|
12108
11943
|
if (offset === targetOffset) {
|
|
12109
11944
|
break;
|
|
12110
11945
|
}
|
|
12111
11946
|
if (offset > targetOffset) {
|
|
12112
|
-
throw Error(
|
|
11947
|
+
throw Error(`targetOffset ${targetOffset} is at invalid UTF-16 code unit boundary`);
|
|
12113
11948
|
}
|
|
12114
11949
|
this.bump();
|
|
12115
11950
|
if (this.isEOF()) {
|
|
12116
11951
|
break;
|
|
12117
11952
|
}
|
|
12118
11953
|
}
|
|
12119
|
-
}
|
|
12120
|
-
|
|
11954
|
+
}
|
|
11955
|
+
/** advance the parser through all whitespace to the next non-whitespace code unit. */
|
|
11956
|
+
bumpSpace() {
|
|
12121
11957
|
while (!this.isEOF() && _isWhiteSpace(this.char())) {
|
|
12122
11958
|
this.bump();
|
|
12123
11959
|
}
|
|
12124
|
-
}
|
|
12125
|
-
|
|
11960
|
+
}
|
|
11961
|
+
/**
|
|
11962
|
+
* Peek at the *next* Unicode codepoint in the input without advancing the parser.
|
|
11963
|
+
* If the input has been exhausted, then this returns null.
|
|
11964
|
+
*/
|
|
11965
|
+
peek() {
|
|
12126
11966
|
if (this.isEOF()) {
|
|
12127
11967
|
return null;
|
|
12128
11968
|
}
|
|
12129
|
-
|
|
12130
|
-
|
|
12131
|
-
|
|
12132
|
-
return nextCode
|
|
12133
|
-
}
|
|
12134
|
-
|
|
12135
|
-
}();
|
|
11969
|
+
const code = this.char();
|
|
11970
|
+
const offset = this.offset();
|
|
11971
|
+
const nextCode = this.message.charCodeAt(offset + (code >= 65536 ? 2 : 1));
|
|
11972
|
+
return nextCode ?? null;
|
|
11973
|
+
}
|
|
11974
|
+
};
|
|
12136
11975
|
}
|
|
12137
11976
|
});
|
|
12138
11977
|
|
|
@@ -12142,7 +11981,7 @@ function cloneDeep(obj) {
|
|
|
12142
11981
|
return obj.map(cloneDeep);
|
|
12143
11982
|
}
|
|
12144
11983
|
if (obj !== null && typeof obj === "object") {
|
|
12145
|
-
return Object.keys(obj).reduce(
|
|
11984
|
+
return Object.keys(obj).reduce((cloned, k) => {
|
|
12146
11985
|
cloned[k] = cloneDeep(obj[k]);
|
|
12147
11986
|
return cloned;
|
|
12148
11987
|
}, {});
|
|
@@ -12150,7 +11989,7 @@ function cloneDeep(obj) {
|
|
|
12150
11989
|
return obj;
|
|
12151
11990
|
}
|
|
12152
11991
|
function replacePoundWithArgument(ast, variableName) {
|
|
12153
|
-
return ast.map(
|
|
11992
|
+
return ast.map((el) => {
|
|
12154
11993
|
if (isPoundElement(el)) {
|
|
12155
11994
|
return {
|
|
12156
11995
|
type: TYPE.number,
|
|
@@ -12160,35 +11999,40 @@ function replacePoundWithArgument(ast, variableName) {
|
|
|
12160
11999
|
};
|
|
12161
12000
|
}
|
|
12162
12001
|
if (isPluralElement(el) || isSelectElement(el)) {
|
|
12163
|
-
|
|
12164
|
-
for (
|
|
12165
|
-
|
|
12166
|
-
newOptions[key] = {
|
|
12167
|
-
value: replacePoundWithArgument(el.options[key].value, variableName)
|
|
12168
|
-
};
|
|
12002
|
+
const newOptions = {};
|
|
12003
|
+
for (const key of Object.keys(el.options)) {
|
|
12004
|
+
newOptions[key] = { value: replacePoundWithArgument(el.options[key].value, variableName) };
|
|
12169
12005
|
}
|
|
12170
|
-
return
|
|
12006
|
+
return {
|
|
12007
|
+
...el,
|
|
12008
|
+
options: newOptions
|
|
12009
|
+
};
|
|
12171
12010
|
}
|
|
12172
12011
|
if (isTagElement(el)) {
|
|
12173
|
-
return
|
|
12012
|
+
return {
|
|
12013
|
+
...el,
|
|
12014
|
+
children: replacePoundWithArgument(el.children, variableName)
|
|
12015
|
+
};
|
|
12174
12016
|
}
|
|
12175
12017
|
return el;
|
|
12176
12018
|
});
|
|
12177
12019
|
}
|
|
12178
12020
|
function hoistPluralOrSelectElement(ast, el, positionToInject) {
|
|
12179
|
-
|
|
12180
|
-
|
|
12181
|
-
|
|
12182
|
-
|
|
12183
|
-
cloned.options = Object.keys(options).reduce(
|
|
12184
|
-
|
|
12021
|
+
const cloned = cloneDeep(el);
|
|
12022
|
+
const { options } = cloned;
|
|
12023
|
+
const afterElements = ast.slice(positionToInject + 1);
|
|
12024
|
+
const hasSubsequentPluralOrSelect = afterElements.some(isPluralOrSelectElement);
|
|
12025
|
+
cloned.options = Object.keys(options).reduce((all, k) => {
|
|
12026
|
+
let optionValue = options[k].value;
|
|
12185
12027
|
if (hasSubsequentPluralOrSelect && isPluralElement(el)) {
|
|
12186
12028
|
optionValue = replacePoundWithArgument(optionValue, el.value);
|
|
12187
12029
|
}
|
|
12188
|
-
|
|
12189
|
-
|
|
12190
|
-
|
|
12191
|
-
|
|
12030
|
+
const newValue = hoistSelectors([
|
|
12031
|
+
...ast.slice(0, positionToInject),
|
|
12032
|
+
...optionValue,
|
|
12033
|
+
...afterElements
|
|
12034
|
+
]);
|
|
12035
|
+
all[k] = { value: newValue };
|
|
12192
12036
|
return all;
|
|
12193
12037
|
}, {});
|
|
12194
12038
|
return cloned;
|
|
@@ -12197,7 +12041,7 @@ function isPluralOrSelectElement(el) {
|
|
|
12197
12041
|
return isPluralElement(el) || isSelectElement(el);
|
|
12198
12042
|
}
|
|
12199
12043
|
function findPluralOrSelectElement(ast) {
|
|
12200
|
-
return !!ast.find(
|
|
12044
|
+
return !!ast.find((el) => {
|
|
12201
12045
|
if (isPluralOrSelectElement(el)) {
|
|
12202
12046
|
return true;
|
|
12203
12047
|
}
|
|
@@ -12208,8 +12052,8 @@ function findPluralOrSelectElement(ast) {
|
|
|
12208
12052
|
});
|
|
12209
12053
|
}
|
|
12210
12054
|
function hoistSelectors(ast) {
|
|
12211
|
-
for (
|
|
12212
|
-
|
|
12055
|
+
for (let i = 0; i < ast.length; i++) {
|
|
12056
|
+
const el = ast[i];
|
|
12213
12057
|
if (isPluralOrSelectElement(el)) {
|
|
12214
12058
|
return [hoistPluralOrSelectElement(ast, el, i)];
|
|
12215
12059
|
}
|
|
@@ -12219,20 +12063,17 @@ function hoistSelectors(ast) {
|
|
|
12219
12063
|
}
|
|
12220
12064
|
return ast;
|
|
12221
12065
|
}
|
|
12222
|
-
function collectVariables(ast, vars) {
|
|
12223
|
-
|
|
12224
|
-
vars = /* @__PURE__ */ new Map();
|
|
12225
|
-
}
|
|
12226
|
-
ast.forEach(function(el) {
|
|
12066
|
+
function collectVariables(ast, vars = /* @__PURE__ */ new Map()) {
|
|
12067
|
+
ast.forEach((el) => {
|
|
12227
12068
|
if (isArgumentElement(el) || isDateElement(el) || isTimeElement(el) || isNumberElement(el)) {
|
|
12228
12069
|
if (el.value in vars && vars.get(el.value) !== el.type) {
|
|
12229
|
-
throw new Error(
|
|
12070
|
+
throw new Error(`Variable ${el.value} has conflicting types`);
|
|
12230
12071
|
}
|
|
12231
12072
|
vars.set(el.value, el.type);
|
|
12232
12073
|
}
|
|
12233
12074
|
if (isPluralElement(el) || isSelectElement(el)) {
|
|
12234
12075
|
vars.set(el.value, el.type);
|
|
12235
|
-
Object.keys(el.options).forEach(
|
|
12076
|
+
Object.keys(el.options).forEach((k) => {
|
|
12236
12077
|
collectVariables(el.options[k].value, vars);
|
|
12237
12078
|
});
|
|
12238
12079
|
}
|
|
@@ -12243,32 +12084,31 @@ function collectVariables(ast, vars) {
|
|
|
12243
12084
|
});
|
|
12244
12085
|
}
|
|
12245
12086
|
function isStructurallySame(a, b) {
|
|
12246
|
-
|
|
12247
|
-
|
|
12087
|
+
const aVars = /* @__PURE__ */ new Map();
|
|
12088
|
+
const bVars = /* @__PURE__ */ new Map();
|
|
12248
12089
|
collectVariables(a, aVars);
|
|
12249
12090
|
collectVariables(b, bVars);
|
|
12250
12091
|
if (aVars.size !== bVars.size) {
|
|
12251
12092
|
return {
|
|
12252
12093
|
success: false,
|
|
12253
|
-
error: new Error(
|
|
12094
|
+
error: new Error(`Different number of variables: [${Array.from(aVars.keys()).join(", ")}] vs [${Array.from(bVars.keys()).join(", ")}]`)
|
|
12254
12095
|
};
|
|
12255
12096
|
}
|
|
12256
|
-
return Array.from(aVars.entries()).reduce(
|
|
12257
|
-
var key = _a[0], type = _a[1];
|
|
12097
|
+
return Array.from(aVars.entries()).reduce((result, [key, type]) => {
|
|
12258
12098
|
if (!result.success) {
|
|
12259
12099
|
return result;
|
|
12260
12100
|
}
|
|
12261
|
-
|
|
12101
|
+
const bType = bVars.get(key);
|
|
12262
12102
|
if (bType == null) {
|
|
12263
12103
|
return {
|
|
12264
12104
|
success: false,
|
|
12265
|
-
error: new Error(
|
|
12105
|
+
error: new Error(`Missing variable ${key} in message`)
|
|
12266
12106
|
};
|
|
12267
12107
|
}
|
|
12268
12108
|
if (bType !== type) {
|
|
12269
12109
|
return {
|
|
12270
12110
|
success: false,
|
|
12271
|
-
error: new Error(
|
|
12111
|
+
error: new Error(`Variable ${key} has conflicting types: ${TYPE[type]} vs ${TYPE[bType]}`)
|
|
12272
12112
|
};
|
|
12273
12113
|
}
|
|
12274
12114
|
return result;
|
|
@@ -12276,17 +12116,16 @@ function isStructurallySame(a, b) {
|
|
|
12276
12116
|
}
|
|
12277
12117
|
var init_manipulator = __esm({
|
|
12278
12118
|
"node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/manipulator.js"() {
|
|
12279
|
-
init_tslib_es6();
|
|
12280
12119
|
init_types();
|
|
12281
12120
|
}
|
|
12282
12121
|
});
|
|
12283
12122
|
|
|
12284
12123
|
// node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/index.js
|
|
12285
12124
|
function pruneLocation(els) {
|
|
12286
|
-
els.forEach(
|
|
12125
|
+
els.forEach((el) => {
|
|
12287
12126
|
delete el.location;
|
|
12288
12127
|
if (isSelectElement(el) || isPluralElement(el)) {
|
|
12289
|
-
for (
|
|
12128
|
+
for (const k in el.options) {
|
|
12290
12129
|
delete el.options[k].location;
|
|
12291
12130
|
pruneLocation(el.options[k].value);
|
|
12292
12131
|
}
|
|
@@ -12299,26 +12138,26 @@ function pruneLocation(els) {
|
|
|
12299
12138
|
}
|
|
12300
12139
|
});
|
|
12301
12140
|
}
|
|
12302
|
-
function parse(message, opts) {
|
|
12303
|
-
|
|
12304
|
-
|
|
12305
|
-
|
|
12306
|
-
|
|
12307
|
-
|
|
12141
|
+
function parse(message, opts = {}) {
|
|
12142
|
+
opts = {
|
|
12143
|
+
shouldParseSkeletons: true,
|
|
12144
|
+
requiresOtherClause: true,
|
|
12145
|
+
...opts
|
|
12146
|
+
};
|
|
12147
|
+
const result = new Parser(message, opts).parse();
|
|
12308
12148
|
if (result.err) {
|
|
12309
|
-
|
|
12149
|
+
const error2 = SyntaxError(ErrorKind[result.err.kind]);
|
|
12310
12150
|
error2.location = result.err.location;
|
|
12311
12151
|
error2.originalMessage = result.err.message;
|
|
12312
12152
|
throw error2;
|
|
12313
12153
|
}
|
|
12314
|
-
if (!(opts
|
|
12154
|
+
if (!(opts == null ? void 0 : opts.captureLocation)) {
|
|
12315
12155
|
pruneLocation(result.val);
|
|
12316
12156
|
}
|
|
12317
12157
|
return result.val;
|
|
12318
12158
|
}
|
|
12319
12159
|
var init_icu_messageformat_parser = __esm({
|
|
12320
12160
|
"node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/index.js"() {
|
|
12321
|
-
init_tslib_es6();
|
|
12322
12161
|
init_error();
|
|
12323
12162
|
init_parser();
|
|
12324
12163
|
init_types();
|
|
@@ -17820,7 +17659,7 @@ function printAST(ast) {
|
|
|
17820
17659
|
return doPrintAST(ast, false);
|
|
17821
17660
|
}
|
|
17822
17661
|
function doPrintAST(ast, isInPlural) {
|
|
17823
|
-
|
|
17662
|
+
const printedNodes = ast.map((el, i) => {
|
|
17824
17663
|
if (isLiteralElement(el)) {
|
|
17825
17664
|
return printLiteralElement(el, isInPlural, i === 0, i === ast.length - 1);
|
|
17826
17665
|
}
|
|
@@ -17846,74 +17685,64 @@ function doPrintAST(ast, isInPlural) {
|
|
|
17846
17685
|
return printedNodes.join("");
|
|
17847
17686
|
}
|
|
17848
17687
|
function printTagElement(el) {
|
|
17849
|
-
return
|
|
17688
|
+
return `<${el.value}>${printAST(el.children)}</${el.value}>`;
|
|
17850
17689
|
}
|
|
17851
17690
|
function printEscapedMessage(message) {
|
|
17852
|
-
return message.replace(/([{}](?:[\s\S]*[{}])?)/,
|
|
17691
|
+
return message.replace(/([{}](?:[\s\S]*[{}])?)/, `'$1'`);
|
|
17853
17692
|
}
|
|
17854
|
-
function printLiteralElement(
|
|
17855
|
-
|
|
17856
|
-
|
|
17857
|
-
|
|
17858
|
-
escaped = "''".concat(escaped.slice(1));
|
|
17693
|
+
function printLiteralElement({ value }, isInPlural, isFirstEl, isLastEl) {
|
|
17694
|
+
let escaped = value;
|
|
17695
|
+
if (!isFirstEl && escaped[0] === `'`) {
|
|
17696
|
+
escaped = `''${escaped.slice(1)}`;
|
|
17859
17697
|
}
|
|
17860
|
-
if (!isLastEl && escaped[escaped.length - 1] ===
|
|
17861
|
-
escaped =
|
|
17698
|
+
if (!isLastEl && escaped[escaped.length - 1] === `'`) {
|
|
17699
|
+
escaped = `${escaped.slice(0, escaped.length - 1)}''`;
|
|
17862
17700
|
}
|
|
17863
17701
|
escaped = printEscapedMessage(escaped);
|
|
17864
17702
|
return isInPlural ? escaped.replace("#", "'#'") : escaped;
|
|
17865
17703
|
}
|
|
17866
|
-
function printArgumentElement(
|
|
17867
|
-
|
|
17868
|
-
return "{".concat(value, "}");
|
|
17704
|
+
function printArgumentElement({ value }) {
|
|
17705
|
+
return `{${value}}`;
|
|
17869
17706
|
}
|
|
17870
17707
|
function printSimpleFormatElement(el) {
|
|
17871
|
-
return
|
|
17708
|
+
return `{${el.value}, ${TYPE[el.type]}${el.style ? `, ${printArgumentStyle(el.style)}` : ""}}`;
|
|
17872
17709
|
}
|
|
17873
17710
|
function printNumberSkeletonToken(token) {
|
|
17874
|
-
|
|
17875
|
-
return options.length === 0 ? stem :
|
|
17876
|
-
return "/".concat(o);
|
|
17877
|
-
}).join(""));
|
|
17711
|
+
const { stem, options } = token;
|
|
17712
|
+
return options.length === 0 ? stem : `${stem}${options.map((o) => `/${o}`).join("")}`;
|
|
17878
17713
|
}
|
|
17879
17714
|
function printArgumentStyle(style) {
|
|
17880
17715
|
if (typeof style === "string") {
|
|
17881
17716
|
return printEscapedMessage(style);
|
|
17882
17717
|
} else if (style.type === SKELETON_TYPE.dateTime) {
|
|
17883
|
-
return
|
|
17718
|
+
return `::${printDateTimeSkeleton(style)}`;
|
|
17884
17719
|
} else {
|
|
17885
|
-
return
|
|
17720
|
+
return `::${style.tokens.map(printNumberSkeletonToken).join(" ")}`;
|
|
17886
17721
|
}
|
|
17887
17722
|
}
|
|
17888
17723
|
function printDateTimeSkeleton(style) {
|
|
17889
17724
|
return style.pattern;
|
|
17890
17725
|
}
|
|
17891
17726
|
function printSelectElement(el) {
|
|
17892
|
-
|
|
17727
|
+
const msg = [
|
|
17893
17728
|
el.value,
|
|
17894
17729
|
"select",
|
|
17895
|
-
Object.keys(el.options).map(
|
|
17896
|
-
return "".concat(id, "{").concat(doPrintAST(el.options[id].value, false), "}");
|
|
17897
|
-
}).join(" ")
|
|
17730
|
+
Object.keys(el.options).map((id) => `${id}{${doPrintAST(el.options[id].value, false)}}`).join(" ")
|
|
17898
17731
|
].join(",");
|
|
17899
|
-
return
|
|
17732
|
+
return `{${msg}}`;
|
|
17900
17733
|
}
|
|
17901
17734
|
function printPluralElement(el) {
|
|
17902
|
-
|
|
17903
|
-
|
|
17735
|
+
const type = el.pluralType === "cardinal" ? "plural" : "selectordinal";
|
|
17736
|
+
const msg = [
|
|
17904
17737
|
el.value,
|
|
17905
17738
|
type,
|
|
17906
|
-
|
|
17907
|
-
el.offset ? "offset:".concat(el.offset) : ""
|
|
17908
|
-
], Object.keys(el.options).map(function(id) {
|
|
17909
|
-
return "".concat(id, "{").concat(doPrintAST(el.options[id].value, true), "}");
|
|
17910
|
-
}), true).filter(Boolean).join(" ")
|
|
17739
|
+
[el.offset ? `offset:${el.offset}` : "", ...Object.keys(el.options).map((id) => `${id}{${doPrintAST(el.options[id].value, true)}}`)].filter(Boolean).join(" ")
|
|
17911
17740
|
].join(",");
|
|
17912
|
-
return
|
|
17741
|
+
return `{${msg}}`;
|
|
17913
17742
|
}
|
|
17914
17743
|
var init_printer = __esm({
|
|
17915
17744
|
"node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/printer.js"() {
|
|
17916
|
-
|
|
17745
|
+
init_icu_skeleton_parser();
|
|
17917
17746
|
init_types();
|
|
17918
17747
|
}
|
|
17919
17748
|
});
|
|
@@ -229399,6 +229228,12 @@ var init_interpolate_name = __esm({
|
|
|
229399
229228
|
}
|
|
229400
229229
|
});
|
|
229401
229230
|
|
|
229231
|
+
// node_modules/.aspect_rules_js/@formatjs+ts-transformer@0.0.0/node_modules/@formatjs/ts-transformer/src/types.js
|
|
229232
|
+
var init_types2 = __esm({
|
|
229233
|
+
"node_modules/.aspect_rules_js/@formatjs+ts-transformer@0.0.0/node_modules/@formatjs/ts-transformer/src/types.js"() {
|
|
229234
|
+
}
|
|
229235
|
+
});
|
|
229236
|
+
|
|
229402
229237
|
// node_modules/.aspect_rules_js/@formatjs+ts-transformer@0.0.0/node_modules/@formatjs/ts-transformer/src/transform.js
|
|
229403
229238
|
function primitiveToTSNode(factory, v) {
|
|
229404
229239
|
return typeof v === "string" ? factory.createStringLiteral(v) : typeof v === "number" ? factory.createNumericLiteral(v + "") : typeof v === "boolean" ? v ? factory.createTrue() : factory.createFalse() : void 0;
|
|
@@ -229644,16 +229479,14 @@ function extractMessageDescriptor(ts2, node, { overrideIdFn, extractSourceLocati
|
|
|
229644
229479
|
if (flatten2 && msg.defaultMessage) {
|
|
229645
229480
|
try {
|
|
229646
229481
|
msg.defaultMessage = printAST(hoistSelectors(parse(msg.defaultMessage)));
|
|
229647
|
-
} catch
|
|
229482
|
+
} catch {
|
|
229648
229483
|
}
|
|
229649
229484
|
}
|
|
229650
229485
|
if (msg.defaultMessage && overrideIdFn) {
|
|
229651
229486
|
switch (typeof overrideIdFn) {
|
|
229652
229487
|
case "string":
|
|
229653
229488
|
if (!msg.id) {
|
|
229654
|
-
msg.id = interpolateName({ resourcePath: sf.fileName }, overrideIdFn, {
|
|
229655
|
-
content: msg.description ? `${msg.defaultMessage}#${typeof msg.description === "string" ? msg.description : stringify2(msg.description)}` : msg.defaultMessage
|
|
229656
|
-
});
|
|
229489
|
+
msg.id = interpolateName({ resourcePath: sf.fileName }, overrideIdFn, { content: msg.description ? `${msg.defaultMessage}#${typeof msg.description === "string" ? msg.description : stringify2(msg.description)}` : msg.defaultMessage });
|
|
229657
229490
|
}
|
|
229658
229491
|
break;
|
|
229659
229492
|
case "function":
|
|
@@ -229711,12 +229544,7 @@ function extractMessageFromJsxComponent(ts2, factory, node, opts, sf) {
|
|
|
229711
229544
|
return factory.updateJsxSelfClosingElement(node, node.tagName, node.typeArguments, factory.createJsxAttributes(newProps));
|
|
229712
229545
|
}
|
|
229713
229546
|
function setAttributesInObject(ts2, factory, node, msg, ast) {
|
|
229714
|
-
const newProps = [
|
|
229715
|
-
factory.createPropertyAssignment("id", factory.createStringLiteral(msg.id)),
|
|
229716
|
-
...msg.defaultMessage ? [
|
|
229717
|
-
factory.createPropertyAssignment("defaultMessage", ast ? messageASTToTSNode(factory, parse(msg.defaultMessage)) : factory.createStringLiteral(msg.defaultMessage))
|
|
229718
|
-
] : []
|
|
229719
|
-
];
|
|
229547
|
+
const newProps = [factory.createPropertyAssignment("id", factory.createStringLiteral(msg.id)), ...msg.defaultMessage ? [factory.createPropertyAssignment("defaultMessage", ast ? messageASTToTSNode(factory, parse(msg.defaultMessage)) : factory.createStringLiteral(msg.defaultMessage))] : []];
|
|
229720
229548
|
for (const prop of node.properties) {
|
|
229721
229549
|
if (ts2.isPropertyAssignment(prop) && ts2.isIdentifier(prop.name) && MESSAGE_DESC_KEYS.includes(prop.name.text)) {
|
|
229722
229550
|
continue;
|
|
@@ -229728,12 +229556,7 @@ function setAttributesInObject(ts2, factory, node, msg, ast) {
|
|
|
229728
229556
|
return factory.createObjectLiteralExpression(factory.createNodeArray(newProps));
|
|
229729
229557
|
}
|
|
229730
229558
|
function generateNewProperties(ts2, factory, node, msg, ast) {
|
|
229731
|
-
const newProps = [
|
|
229732
|
-
factory.createJsxAttribute(factory.createIdentifier("id"), factory.createStringLiteral(msg.id)),
|
|
229733
|
-
...msg.defaultMessage ? [
|
|
229734
|
-
factory.createJsxAttribute(factory.createIdentifier("defaultMessage"), ast ? factory.createJsxExpression(void 0, messageASTToTSNode(factory, parse(msg.defaultMessage))) : factory.createStringLiteral(msg.defaultMessage))
|
|
229735
|
-
] : []
|
|
229736
|
-
];
|
|
229559
|
+
const newProps = [factory.createJsxAttribute(factory.createIdentifier("id"), factory.createStringLiteral(msg.id)), ...msg.defaultMessage ? [factory.createJsxAttribute(factory.createIdentifier("defaultMessage"), ast ? factory.createJsxExpression(void 0, messageASTToTSNode(factory, parse(msg.defaultMessage))) : factory.createStringLiteral(msg.defaultMessage))] : []];
|
|
229737
229560
|
for (const prop of node.properties) {
|
|
229738
229561
|
if (ts2.isJsxAttribute(prop) && ts2.isIdentifier(prop.name) && MESSAGE_DESC_KEYS.includes(prop.name.text)) {
|
|
229739
229562
|
continue;
|
|
@@ -229787,13 +229610,10 @@ function extractMessagesFromCallExpression(ts2, factory, node, opts, sf) {
|
|
|
229787
229610
|
if (typeof onMsgExtracted === "function") {
|
|
229788
229611
|
onMsgExtracted(sf.fileName, [msg]);
|
|
229789
229612
|
}
|
|
229790
|
-
return factory.updateCallExpression(node, node.expression, node.typeArguments, [
|
|
229791
|
-
|
|
229792
|
-
|
|
229793
|
-
|
|
229794
|
-
}, opts.ast),
|
|
229795
|
-
...restArgs
|
|
229796
|
-
]);
|
|
229613
|
+
return factory.updateCallExpression(node, node.expression, node.typeArguments, [setAttributesInObject(ts2, factory, descriptorsObj, {
|
|
229614
|
+
defaultMessage: opts.removeDefaultMessage ? void 0 : msg.defaultMessage,
|
|
229615
|
+
id: msg.id
|
|
229616
|
+
}, opts.ast), ...restArgs]);
|
|
229797
229617
|
}
|
|
229798
229618
|
}
|
|
229799
229619
|
return node;
|
|
@@ -229806,7 +229626,10 @@ function getVisitor(ts2, ctx, sf, opts) {
|
|
|
229806
229626
|
return visitor;
|
|
229807
229627
|
}
|
|
229808
229628
|
function transformWithTs(ts2, opts) {
|
|
229809
|
-
opts = {
|
|
229629
|
+
opts = {
|
|
229630
|
+
...DEFAULT_OPTS,
|
|
229631
|
+
...opts
|
|
229632
|
+
};
|
|
229810
229633
|
debug2("Transforming options", opts);
|
|
229811
229634
|
const transformFn = (ctx) => {
|
|
229812
229635
|
return (sf) => {
|
|
@@ -229842,6 +229665,7 @@ var init_transform = __esm({
|
|
|
229842
229665
|
typescript = __toESM(require_typescript());
|
|
229843
229666
|
init_console_utils2();
|
|
229844
229667
|
init_interpolate_name();
|
|
229668
|
+
init_types2();
|
|
229845
229669
|
stringify2 = stringifyNs2.default || stringifyNs2;
|
|
229846
229670
|
MESSAGE_DESC_KEYS = [
|
|
229847
229671
|
"id",
|
|
@@ -229856,12 +229680,6 @@ var init_transform = __esm({
|
|
|
229856
229680
|
}
|
|
229857
229681
|
});
|
|
229858
229682
|
|
|
229859
|
-
// node_modules/.aspect_rules_js/@formatjs+ts-transformer@0.0.0/node_modules/@formatjs/ts-transformer/src/types.js
|
|
229860
|
-
var init_types2 = __esm({
|
|
229861
|
-
"node_modules/.aspect_rules_js/@formatjs+ts-transformer@0.0.0/node_modules/@formatjs/ts-transformer/src/types.js"() {
|
|
229862
|
-
}
|
|
229863
|
-
});
|
|
229864
|
-
|
|
229865
229683
|
// node_modules/.aspect_rules_js/@formatjs+ts-transformer@0.0.0/node_modules/@formatjs/ts-transformer/index.js
|
|
229866
229684
|
var init_ts_transformer = __esm({
|
|
229867
229685
|
"node_modules/.aspect_rules_js/@formatjs+ts-transformer@0.0.0/node_modules/@formatjs/ts-transformer/index.js"() {
|