@formatjs/intl-locale 4.2.3 → 4.2.5

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/polyfill.iife.js CHANGED
@@ -7379,6 +7379,74 @@
7379
7379
  }
7380
7380
  });
7381
7381
 
7382
+ // node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/abstract/CanonicalizeUValue.js
7383
+ var require_CanonicalizeUValue = __commonJS({
7384
+ "node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/abstract/CanonicalizeUValue.js"(exports) {
7385
+ "use strict";
7386
+ Object.defineProperty(exports, "__esModule", { value: true });
7387
+ exports.CanonicalizeUValue = CanonicalizeUValue2;
7388
+ var utils_1 = require_utils2();
7389
+ function CanonicalizeUValue2(ukey, uvalue) {
7390
+ var lowerValue = uvalue.toLowerCase();
7391
+ (0, utils_1.invariant)(ukey !== void 0, "ukey must be defined");
7392
+ var canonicalized = lowerValue;
7393
+ return canonicalized;
7394
+ }
7395
+ }
7396
+ });
7397
+
7398
+ // node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/abstract/CanonicalizeUnicodeLocaleId.js
7399
+ var require_CanonicalizeUnicodeLocaleId = __commonJS({
7400
+ "node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/abstract/CanonicalizeUnicodeLocaleId.js"(exports) {
7401
+ "use strict";
7402
+ Object.defineProperty(exports, "__esModule", { value: true });
7403
+ exports.CanonicalizeUnicodeLocaleId = CanonicalizeUnicodeLocaleId2;
7404
+ function CanonicalizeUnicodeLocaleId2(locale) {
7405
+ return Intl.getCanonicalLocales(locale)[0];
7406
+ }
7407
+ }
7408
+ });
7409
+
7410
+ // node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/abstract/InsertUnicodeExtensionAndCanonicalize.js
7411
+ var require_InsertUnicodeExtensionAndCanonicalize = __commonJS({
7412
+ "node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/abstract/InsertUnicodeExtensionAndCanonicalize.js"(exports) {
7413
+ "use strict";
7414
+ Object.defineProperty(exports, "__esModule", { value: true });
7415
+ exports.InsertUnicodeExtensionAndCanonicalize = InsertUnicodeExtensionAndCanonicalize2;
7416
+ var CanonicalizeUnicodeLocaleId_1 = require_CanonicalizeUnicodeLocaleId();
7417
+ var utils_1 = require_utils2();
7418
+ function InsertUnicodeExtensionAndCanonicalize2(locale, attributes, keywords) {
7419
+ (0, utils_1.invariant)(locale.indexOf("-u-") === -1, "Expected locale to not have a Unicode locale extension");
7420
+ var extension = "-u";
7421
+ for (var _i = 0, attributes_1 = attributes; _i < attributes_1.length; _i++) {
7422
+ var attr = attributes_1[_i];
7423
+ extension += "-".concat(attr);
7424
+ }
7425
+ for (var _a = 0, keywords_1 = keywords; _a < keywords_1.length; _a++) {
7426
+ var kw = keywords_1[_a];
7427
+ var key = kw.key, value = kw.value;
7428
+ extension += "-".concat(key);
7429
+ if (value !== "") {
7430
+ extension += "-".concat(value);
7431
+ }
7432
+ }
7433
+ if (extension === "-u") {
7434
+ return (0, CanonicalizeUnicodeLocaleId_1.CanonicalizeUnicodeLocaleId)(locale);
7435
+ }
7436
+ var privateIndex = locale.indexOf("-x-");
7437
+ var newLocale;
7438
+ if (privateIndex === -1) {
7439
+ newLocale = locale + extension;
7440
+ } else {
7441
+ var preExtension = locale.slice(0, privateIndex);
7442
+ var postExtension = locale.slice(privateIndex);
7443
+ newLocale = preExtension + extension + postExtension;
7444
+ }
7445
+ return (0, CanonicalizeUnicodeLocaleId_1.CanonicalizeUnicodeLocaleId)(newLocale);
7446
+ }
7447
+ }
7448
+ });
7449
+
7382
7450
  // node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/abstract/BestAvailableLocale.js
7383
7451
  var require_BestAvailableLocale = __commonJS({
7384
7452
  "node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/abstract/BestAvailableLocale.js"(exports) {
@@ -7432,49 +7500,51 @@
7432
7500
  }
7433
7501
  });
7434
7502
 
7435
- // node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/abstract/UnicodeExtensionValue.js
7436
- var require_UnicodeExtensionValue = __commonJS({
7437
- "node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/abstract/UnicodeExtensionValue.js"(exports) {
7503
+ // node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/abstract/UnicodeExtensionComponents.js
7504
+ var require_UnicodeExtensionComponents = __commonJS({
7505
+ "node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/abstract/UnicodeExtensionComponents.js"(exports) {
7438
7506
  "use strict";
7439
7507
  Object.defineProperty(exports, "__esModule", { value: true });
7440
- exports.UnicodeExtensionValue = UnicodeExtensionValue2;
7508
+ exports.UnicodeExtensionComponents = UnicodeExtensionComponents2;
7441
7509
  var utils_1 = require_utils2();
7442
- function UnicodeExtensionValue2(extension, key) {
7443
- (0, utils_1.invariant)(key.length === 2, "key must have 2 elements");
7510
+ function UnicodeExtensionComponents2(extension) {
7511
+ (0, utils_1.invariant)(extension === extension.toLowerCase(), "Expected extension to be lowercase");
7512
+ (0, utils_1.invariant)(extension.slice(0, 3) === "-u-", "Expected extension to be a Unicode locale extension");
7513
+ var attributes = [];
7514
+ var keywords = [];
7515
+ var keyword;
7444
7516
  var size = extension.length;
7445
- var searchValue = "-".concat(key, "-");
7446
- var pos = extension.indexOf(searchValue);
7447
- if (pos !== -1) {
7448
- var start = pos + 4;
7449
- var end = start;
7450
- var k = start;
7451
- var done = false;
7452
- while (!done) {
7453
- var e = extension.indexOf("-", k);
7454
- var len = void 0;
7455
- if (e === -1) {
7456
- len = size - k;
7457
- } else {
7458
- len = e - k;
7517
+ var k = 3;
7518
+ while (k < size) {
7519
+ var e = extension.indexOf("-", k);
7520
+ var len = void 0;
7521
+ if (e === -1) {
7522
+ len = size - k;
7523
+ } else {
7524
+ len = e - k;
7525
+ }
7526
+ var subtag = extension.slice(k, k + len);
7527
+ (0, utils_1.invariant)(len >= 2, "Expected a subtag to have at least 2 characters");
7528
+ if (keyword === void 0 && len != 2) {
7529
+ if (attributes.indexOf(subtag) === -1) {
7530
+ attributes.push(subtag);
7459
7531
  }
7460
- if (len === 2) {
7461
- done = true;
7462
- } else if (e === -1) {
7463
- end = size;
7464
- done = true;
7465
- } else {
7466
- end = e;
7467
- k = e + 1;
7532
+ } else if (len === 2) {
7533
+ keyword = { key: subtag, value: "" };
7534
+ if (keywords.find(function(k2) {
7535
+ return k2.key === (keyword === null || keyword === void 0 ? void 0 : keyword.key);
7536
+ }) === void 0) {
7537
+ keywords.push(keyword);
7468
7538
  }
7539
+ } else if ((keyword === null || keyword === void 0 ? void 0 : keyword.value) === "") {
7540
+ keyword.value = subtag;
7541
+ } else {
7542
+ (0, utils_1.invariant)(keyword !== void 0, "Expected keyword to be defined");
7543
+ keyword.value += "-" + subtag;
7469
7544
  }
7470
- return extension.slice(start, end);
7545
+ k += len + 1;
7471
7546
  }
7472
- searchValue = "-".concat(key);
7473
- pos = extension.indexOf(searchValue);
7474
- if (pos !== -1 && pos + 3 === size) {
7475
- return "";
7476
- }
7477
- return void 0;
7547
+ return { attributes, keywords };
7478
7548
  }
7479
7549
  }
7480
7550
  });
@@ -7486,10 +7556,13 @@
7486
7556
  Object.defineProperty(exports, "__esModule", { value: true });
7487
7557
  exports.ResolveLocale = ResolveLocale2;
7488
7558
  var BestFitMatcher_1 = require_BestFitMatcher();
7559
+ var CanonicalizeUValue_1 = require_CanonicalizeUValue();
7560
+ var InsertUnicodeExtensionAndCanonicalize_1 = require_InsertUnicodeExtensionAndCanonicalize();
7489
7561
  var LookupMatcher_1 = require_LookupMatcher();
7490
- var UnicodeExtensionValue_1 = require_UnicodeExtensionValue();
7562
+ var UnicodeExtensionComponents_1 = require_UnicodeExtensionComponents();
7491
7563
  var utils_1 = require_utils2();
7492
7564
  function ResolveLocale2(availableLocales, requestedLocales, options, relevantExtensionKeys, localeData, getDefaultLocale) {
7565
+ var _a;
7493
7566
  var matcher = options.localeMatcher;
7494
7567
  var r;
7495
7568
  if (matcher === "lookup") {
@@ -7497,56 +7570,77 @@
7497
7570
  } else {
7498
7571
  r = (0, BestFitMatcher_1.BestFitMatcher)(Array.from(availableLocales), requestedLocales, getDefaultLocale);
7499
7572
  }
7573
+ if (r == null) {
7574
+ r = {
7575
+ locale: getDefaultLocale(),
7576
+ extension: ""
7577
+ };
7578
+ }
7500
7579
  var foundLocale = r.locale;
7501
- var result = { locale: "", dataLocale: foundLocale };
7502
- var supportedExtension = "-u";
7503
- for (var _i = 0, relevantExtensionKeys_1 = relevantExtensionKeys; _i < relevantExtensionKeys_1.length; _i++) {
7504
- var key = relevantExtensionKeys_1[_i];
7505
- (0, utils_1.invariant)(foundLocale in localeData, "Missing locale data for ".concat(foundLocale));
7506
- var foundLocaleData = localeData[foundLocale];
7507
- (0, utils_1.invariant)(typeof foundLocaleData === "object" && foundLocaleData !== null, "locale data ".concat(key, " must be an object"));
7508
- var keyLocaleData = foundLocaleData[key];
7509
- (0, utils_1.invariant)(Array.isArray(keyLocaleData), "keyLocaleData for ".concat(key, " must be an array"));
7580
+ var foundLocaleData = localeData[foundLocale];
7581
+ var result = { locale: "en", dataLocale: foundLocale };
7582
+ var components;
7583
+ var keywords;
7584
+ if (r.extension) {
7585
+ components = (0, UnicodeExtensionComponents_1.UnicodeExtensionComponents)(r.extension);
7586
+ keywords = components.keywords;
7587
+ } else {
7588
+ keywords = [];
7589
+ }
7590
+ var supportedKeywords = [];
7591
+ var _loop_1 = function(key2) {
7592
+ var keyLocaleData = (_a = foundLocaleData === null || foundLocaleData === void 0 ? void 0 : foundLocaleData[key2]) !== null && _a !== void 0 ? _a : [];
7593
+ (0, utils_1.invariant)(Array.isArray(keyLocaleData), "keyLocaleData for ".concat(key2, " must be an array"));
7510
7594
  var value = keyLocaleData[0];
7511
- (0, utils_1.invariant)(typeof value === "string" || value === null, "value must be string or null but got ".concat(typeof value, " in key ").concat(key));
7512
- var supportedExtensionAddition = "";
7513
- if (r.extension) {
7514
- var requestedValue = (0, UnicodeExtensionValue_1.UnicodeExtensionValue)(r.extension, key);
7515
- if (requestedValue !== void 0) {
7516
- if (requestedValue !== "") {
7517
- if (~keyLocaleData.indexOf(requestedValue)) {
7518
- value = requestedValue;
7519
- supportedExtensionAddition = "-".concat(key, "-").concat(value);
7520
- }
7521
- } else if (~requestedValue.indexOf("true")) {
7522
- value = "true";
7523
- supportedExtensionAddition = "-".concat(key);
7595
+ (0, utils_1.invariant)(value === void 0 || typeof value === "string", "value must be a string or undefined");
7596
+ var supportedKeyword = void 0;
7597
+ var entry = keywords.find(function(k) {
7598
+ return k.key === key2;
7599
+ });
7600
+ if (entry) {
7601
+ var requestedValue = entry.value;
7602
+ if (requestedValue !== "") {
7603
+ if (keyLocaleData.indexOf(requestedValue) > -1) {
7604
+ value = requestedValue;
7605
+ supportedKeyword = {
7606
+ key: key2,
7607
+ value
7608
+ };
7524
7609
  }
7610
+ } else if (keyLocaleData.indexOf("true") > -1) {
7611
+ value = "true";
7612
+ supportedKeyword = {
7613
+ key: key2,
7614
+ value
7615
+ };
7525
7616
  }
7526
7617
  }
7527
- if (key in options) {
7528
- var optionsValue = options[key];
7529
- (0, utils_1.invariant)(typeof optionsValue === "string" || typeof optionsValue === "undefined" || optionsValue === null, "optionsValue must be String, Undefined or Null");
7530
- if (~keyLocaleData.indexOf(optionsValue)) {
7531
- if (optionsValue !== value) {
7532
- value = optionsValue;
7533
- supportedExtensionAddition = "";
7534
- }
7618
+ var optionsValue = options[key2];
7619
+ (0, utils_1.invariant)(optionsValue == null || typeof optionsValue === "string", "optionsValue must be a string or undefined");
7620
+ if (typeof optionsValue === "string") {
7621
+ var ukey = key2.toLowerCase();
7622
+ optionsValue = (0, CanonicalizeUValue_1.CanonicalizeUValue)(ukey, optionsValue);
7623
+ if (optionsValue === "") {
7624
+ optionsValue = "true";
7535
7625
  }
7536
7626
  }
7537
- result[key] = value;
7538
- supportedExtension += supportedExtensionAddition;
7539
- }
7540
- if (supportedExtension.length > 2) {
7541
- var privateIndex = foundLocale.indexOf("-x-");
7542
- if (privateIndex === -1) {
7543
- foundLocale = foundLocale + supportedExtension;
7544
- } else {
7545
- var preExtension = foundLocale.slice(0, privateIndex);
7546
- var postExtension = foundLocale.slice(privateIndex, foundLocale.length);
7547
- foundLocale = preExtension + supportedExtension + postExtension;
7627
+ if (optionsValue !== value && keyLocaleData.indexOf(optionsValue) > -1) {
7628
+ value = optionsValue;
7629
+ supportedKeyword = void 0;
7630
+ }
7631
+ if (supportedKeyword) {
7632
+ supportedKeywords.push(supportedKeyword);
7548
7633
  }
7549
- foundLocale = Intl.getCanonicalLocales(foundLocale)[0];
7634
+ result[key2] = value;
7635
+ };
7636
+ for (var _i = 0, relevantExtensionKeys_1 = relevantExtensionKeys; _i < relevantExtensionKeys_1.length; _i++) {
7637
+ var key = relevantExtensionKeys_1[_i];
7638
+ _loop_1(key);
7639
+ }
7640
+ var supportedAttributes = [];
7641
+ if (supportedKeywords.length > 0) {
7642
+ supportedAttributes = [];
7643
+ foundLocale = (0, InsertUnicodeExtensionAndCanonicalize_1.InsertUnicodeExtensionAndCanonicalize)(foundLocale, supportedAttributes, supportedKeywords);
7550
7644
  }
7551
7645
  result.locale = foundLocale;
7552
7646
  return result;
@@ -8382,287 +8476,6 @@
8382
8476
  }
8383
8477
  });
8384
8478
 
8385
- // node_modules/.aspect_rules_js/@formatjs+intl-getcanonicallocales@0.0.0/node_modules/@formatjs/intl-getcanonicallocales/src/parser.js
8386
- var require_parser = __commonJS({
8387
- "node_modules/.aspect_rules_js/@formatjs+intl-getcanonicallocales@0.0.0/node_modules/@formatjs/intl-getcanonicallocales/src/parser.js"(exports) {
8388
- "use strict";
8389
- Object.defineProperty(exports, "__esModule", { value: true });
8390
- exports.SEPARATOR = void 0;
8391
- exports.isUnicodeLanguageSubtag = isUnicodeLanguageSubtag2;
8392
- exports.isStructurallyValidLanguageTag = isStructurallyValidLanguageTag2;
8393
- exports.isUnicodeRegionSubtag = isUnicodeRegionSubtag2;
8394
- exports.isUnicodeScriptSubtag = isUnicodeScriptSubtag2;
8395
- exports.isUnicodeVariantSubtag = isUnicodeVariantSubtag;
8396
- exports.parseUnicodeLanguageId = parseUnicodeLanguageId2;
8397
- exports.parseUnicodeLocaleId = parseUnicodeLocaleId2;
8398
- var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
8399
- var ALPHANUM_1_8 = /^[a-z0-9]{1,8}$/i;
8400
- var ALPHANUM_2_8 = /^[a-z0-9]{2,8}$/i;
8401
- var ALPHANUM_3_82 = /^[a-z0-9]{3,8}$/i;
8402
- var KEY_REGEX = /^[a-z0-9][a-z]$/i;
8403
- var TYPE_REGEX = /^[a-z0-9]{3,8}$/i;
8404
- var ALPHA_4 = /^[a-z]{4}$/i;
8405
- var OTHER_EXTENSION_TYPE = /^[0-9a-svwyz]$/i;
8406
- var UNICODE_REGION_SUBTAG_REGEX = /^([a-z]{2}|[0-9]{3})$/i;
8407
- var UNICODE_VARIANT_SUBTAG_REGEX = /^([a-z0-9]{5,8}|[0-9][a-z0-9]{3})$/i;
8408
- var UNICODE_LANGUAGE_SUBTAG_REGEX = /^([a-z]{2,3}|[a-z]{5,8})$/i;
8409
- var TKEY_REGEX = /^[a-z][0-9]$/i;
8410
- exports.SEPARATOR = "-";
8411
- function isUnicodeLanguageSubtag2(lang) {
8412
- return UNICODE_LANGUAGE_SUBTAG_REGEX.test(lang);
8413
- }
8414
- function isStructurallyValidLanguageTag2(tag) {
8415
- try {
8416
- parseUnicodeLanguageId2(tag.split(exports.SEPARATOR));
8417
- } catch (e) {
8418
- return false;
8419
- }
8420
- return true;
8421
- }
8422
- function isUnicodeRegionSubtag2(region) {
8423
- return UNICODE_REGION_SUBTAG_REGEX.test(region);
8424
- }
8425
- function isUnicodeScriptSubtag2(script) {
8426
- return ALPHA_4.test(script);
8427
- }
8428
- function isUnicodeVariantSubtag(variant) {
8429
- return UNICODE_VARIANT_SUBTAG_REGEX.test(variant);
8430
- }
8431
- function parseUnicodeLanguageId2(chunks) {
8432
- if (typeof chunks === "string") {
8433
- chunks = chunks.split(exports.SEPARATOR);
8434
- }
8435
- var lang = chunks.shift();
8436
- if (!lang) {
8437
- throw new RangeError("Missing unicode_language_subtag");
8438
- }
8439
- if (lang === "root") {
8440
- return { lang: "root", variants: [] };
8441
- }
8442
- if (!isUnicodeLanguageSubtag2(lang)) {
8443
- throw new RangeError("Malformed unicode_language_subtag");
8444
- }
8445
- var script;
8446
- if (chunks.length && isUnicodeScriptSubtag2(chunks[0])) {
8447
- script = chunks.shift();
8448
- }
8449
- var region;
8450
- if (chunks.length && isUnicodeRegionSubtag2(chunks[0])) {
8451
- region = chunks.shift();
8452
- }
8453
- var variants = {};
8454
- while (chunks.length && isUnicodeVariantSubtag(chunks[0])) {
8455
- var variant = chunks.shift();
8456
- if (variant in variants) {
8457
- throw new RangeError('Duplicate variant "'.concat(variant, '"'));
8458
- }
8459
- variants[variant] = 1;
8460
- }
8461
- return {
8462
- lang,
8463
- script,
8464
- region,
8465
- variants: Object.keys(variants)
8466
- };
8467
- }
8468
- function parseUnicodeExtension(chunks) {
8469
- var keywords = [];
8470
- var keyword;
8471
- while (chunks.length && (keyword = parseKeyword(chunks))) {
8472
- keywords.push(keyword);
8473
- }
8474
- if (keywords.length) {
8475
- return {
8476
- type: "u",
8477
- keywords,
8478
- attributes: []
8479
- };
8480
- }
8481
- var attributes = [];
8482
- while (chunks.length && ALPHANUM_3_82.test(chunks[0])) {
8483
- attributes.push(chunks.shift());
8484
- }
8485
- while (chunks.length && (keyword = parseKeyword(chunks))) {
8486
- keywords.push(keyword);
8487
- }
8488
- if (keywords.length || attributes.length) {
8489
- return {
8490
- type: "u",
8491
- attributes,
8492
- keywords
8493
- };
8494
- }
8495
- throw new RangeError("Malformed unicode_extension");
8496
- }
8497
- function parseKeyword(chunks) {
8498
- var key;
8499
- if (!KEY_REGEX.test(chunks[0])) {
8500
- return;
8501
- }
8502
- key = chunks.shift();
8503
- var type = [];
8504
- while (chunks.length && TYPE_REGEX.test(chunks[0])) {
8505
- type.push(chunks.shift());
8506
- }
8507
- var value = "";
8508
- if (type.length) {
8509
- value = type.join(exports.SEPARATOR);
8510
- }
8511
- return [key, value];
8512
- }
8513
- function parseTransformedExtension(chunks) {
8514
- var lang;
8515
- try {
8516
- lang = parseUnicodeLanguageId2(chunks);
8517
- } catch (e) {
8518
- }
8519
- var fields = [];
8520
- while (chunks.length && TKEY_REGEX.test(chunks[0])) {
8521
- var key = chunks.shift();
8522
- var value = [];
8523
- while (chunks.length && ALPHANUM_3_82.test(chunks[0])) {
8524
- value.push(chunks.shift());
8525
- }
8526
- if (!value.length) {
8527
- throw new RangeError('Missing tvalue for tkey "'.concat(key, '"'));
8528
- }
8529
- fields.push([key, value.join(exports.SEPARATOR)]);
8530
- }
8531
- if (fields.length) {
8532
- return {
8533
- type: "t",
8534
- fields,
8535
- lang
8536
- };
8537
- }
8538
- throw new RangeError("Malformed transformed_extension");
8539
- }
8540
- function parsePuExtension(chunks) {
8541
- var exts = [];
8542
- while (chunks.length && ALPHANUM_1_8.test(chunks[0])) {
8543
- exts.push(chunks.shift());
8544
- }
8545
- if (exts.length) {
8546
- return {
8547
- type: "x",
8548
- value: exts.join(exports.SEPARATOR)
8549
- };
8550
- }
8551
- throw new RangeError("Malformed private_use_extension");
8552
- }
8553
- function parseOtherExtensionValue(chunks) {
8554
- var exts = [];
8555
- while (chunks.length && ALPHANUM_2_8.test(chunks[0])) {
8556
- exts.push(chunks.shift());
8557
- }
8558
- if (exts.length) {
8559
- return exts.join(exports.SEPARATOR);
8560
- }
8561
- return "";
8562
- }
8563
- function parseExtensions(chunks) {
8564
- if (!chunks.length) {
8565
- return { extensions: [] };
8566
- }
8567
- var extensions = [];
8568
- var unicodeExtension;
8569
- var transformedExtension;
8570
- var puExtension;
8571
- var otherExtensionMap = {};
8572
- do {
8573
- var type = chunks.shift();
8574
- switch (type) {
8575
- case "u":
8576
- case "U":
8577
- if (unicodeExtension) {
8578
- throw new RangeError("There can only be 1 -u- extension");
8579
- }
8580
- unicodeExtension = parseUnicodeExtension(chunks);
8581
- extensions.push(unicodeExtension);
8582
- break;
8583
- case "t":
8584
- case "T":
8585
- if (transformedExtension) {
8586
- throw new RangeError("There can only be 1 -t- extension");
8587
- }
8588
- transformedExtension = parseTransformedExtension(chunks);
8589
- extensions.push(transformedExtension);
8590
- break;
8591
- case "x":
8592
- case "X":
8593
- if (puExtension) {
8594
- throw new RangeError("There can only be 1 -x- extension");
8595
- }
8596
- puExtension = parsePuExtension(chunks);
8597
- extensions.push(puExtension);
8598
- break;
8599
- default:
8600
- if (!OTHER_EXTENSION_TYPE.test(type)) {
8601
- throw new RangeError("Malformed extension type");
8602
- }
8603
- if (type in otherExtensionMap) {
8604
- throw new RangeError("There can only be 1 -".concat(type, "- extension"));
8605
- }
8606
- var extension = {
8607
- type,
8608
- value: parseOtherExtensionValue(chunks)
8609
- };
8610
- otherExtensionMap[extension.type] = extension;
8611
- extensions.push(extension);
8612
- break;
8613
- }
8614
- } while (chunks.length);
8615
- return { extensions };
8616
- }
8617
- function parseUnicodeLocaleId2(locale) {
8618
- var chunks = locale.split(exports.SEPARATOR);
8619
- var lang = parseUnicodeLanguageId2(chunks);
8620
- return tslib_1.__assign({ lang }, parseExtensions(chunks));
8621
- }
8622
- }
8623
- });
8624
-
8625
- // node_modules/.aspect_rules_js/@formatjs+intl-getcanonicallocales@0.0.0/node_modules/@formatjs/intl-getcanonicallocales/src/emitter.js
8626
- var require_emitter = __commonJS({
8627
- "node_modules/.aspect_rules_js/@formatjs+intl-getcanonicallocales@0.0.0/node_modules/@formatjs/intl-getcanonicallocales/src/emitter.js"(exports) {
8628
- "use strict";
8629
- Object.defineProperty(exports, "__esModule", { value: true });
8630
- exports.emitUnicodeLanguageId = emitUnicodeLanguageId2;
8631
- exports.emitUnicodeLocaleId = emitUnicodeLocaleId2;
8632
- var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
8633
- function emitUnicodeLanguageId2(lang) {
8634
- if (!lang) {
8635
- return "";
8636
- }
8637
- return tslib_1.__spreadArray([lang.lang, lang.script, lang.region], lang.variants || [], true).filter(Boolean).join("-");
8638
- }
8639
- function emitUnicodeLocaleId2(_a) {
8640
- var lang = _a.lang, extensions = _a.extensions;
8641
- var chunks = [emitUnicodeLanguageId2(lang)];
8642
- for (var _i = 0, extensions_1 = extensions; _i < extensions_1.length; _i++) {
8643
- var ext = extensions_1[_i];
8644
- chunks.push(ext.type);
8645
- switch (ext.type) {
8646
- case "u":
8647
- chunks.push.apply(chunks, tslib_1.__spreadArray(tslib_1.__spreadArray([], ext.attributes, false), ext.keywords.reduce(function(all, kv) {
8648
- return all.concat(kv);
8649
- }, []), false));
8650
- break;
8651
- case "t":
8652
- chunks.push.apply(chunks, tslib_1.__spreadArray([emitUnicodeLanguageId2(ext.lang)], ext.fields.reduce(function(all, kv) {
8653
- return all.concat(kv);
8654
- }, []), false));
8655
- break;
8656
- default:
8657
- chunks.push(ext.value);
8658
- break;
8659
- }
8660
- }
8661
- return chunks.filter(Boolean).join("-");
8662
- }
8663
- }
8664
- });
8665
-
8666
8479
  // node_modules/.aspect_rules_js/@formatjs+intl-getcanonicallocales@0.0.0/node_modules/@formatjs/intl-getcanonicallocales/src/aliases.generated.js
8667
8480
  var require_aliases_generated = __commonJS({
8668
8481
  "node_modules/.aspect_rules_js/@formatjs+intl-getcanonicallocales@0.0.0/node_modules/@formatjs/intl-getcanonicallocales/src/aliases.generated.js"(exports) {
@@ -9821,6 +9634,47 @@
9821
9634
  }
9822
9635
  });
9823
9636
 
9637
+ // node_modules/.aspect_rules_js/@formatjs+intl-getcanonicallocales@0.0.0/node_modules/@formatjs/intl-getcanonicallocales/src/emitter.js
9638
+ var require_emitter = __commonJS({
9639
+ "node_modules/.aspect_rules_js/@formatjs+intl-getcanonicallocales@0.0.0/node_modules/@formatjs/intl-getcanonicallocales/src/emitter.js"(exports) {
9640
+ "use strict";
9641
+ Object.defineProperty(exports, "__esModule", { value: true });
9642
+ exports.emitUnicodeLanguageId = emitUnicodeLanguageId2;
9643
+ exports.emitUnicodeLocaleId = emitUnicodeLocaleId2;
9644
+ var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
9645
+ function emitUnicodeLanguageId2(lang) {
9646
+ if (!lang) {
9647
+ return "";
9648
+ }
9649
+ return tslib_1.__spreadArray([lang.lang, lang.script, lang.region], lang.variants || [], true).filter(Boolean).join("-");
9650
+ }
9651
+ function emitUnicodeLocaleId2(_a) {
9652
+ var lang = _a.lang, extensions = _a.extensions;
9653
+ var chunks = [emitUnicodeLanguageId2(lang)];
9654
+ for (var _i = 0, extensions_1 = extensions; _i < extensions_1.length; _i++) {
9655
+ var ext = extensions_1[_i];
9656
+ chunks.push(ext.type);
9657
+ switch (ext.type) {
9658
+ case "u":
9659
+ chunks.push.apply(chunks, tslib_1.__spreadArray(tslib_1.__spreadArray([], ext.attributes, false), ext.keywords.reduce(function(all, kv) {
9660
+ return all.concat(kv);
9661
+ }, []), false));
9662
+ break;
9663
+ case "t":
9664
+ chunks.push.apply(chunks, tslib_1.__spreadArray([emitUnicodeLanguageId2(ext.lang)], ext.fields.reduce(function(all, kv) {
9665
+ return all.concat(kv);
9666
+ }, []), false));
9667
+ break;
9668
+ default:
9669
+ chunks.push(ext.value);
9670
+ break;
9671
+ }
9672
+ }
9673
+ return chunks.filter(Boolean).join("-");
9674
+ }
9675
+ }
9676
+ });
9677
+
9824
9678
  // node_modules/.aspect_rules_js/@formatjs+intl-getcanonicallocales@0.0.0/node_modules/@formatjs/intl-getcanonicallocales/src/likelySubtags.generated.js
9825
9679
  var require_likelySubtags_generated = __commonJS({
9826
9680
  "node_modules/.aspect_rules_js/@formatjs+intl-getcanonicallocales@0.0.0/node_modules/@formatjs/intl-getcanonicallocales/src/likelySubtags.generated.js"(exports) {
@@ -17570,18 +17424,258 @@
17570
17424
  }
17571
17425
  });
17572
17426
 
17427
+ // node_modules/.aspect_rules_js/@formatjs+intl-getcanonicallocales@0.0.0/node_modules/@formatjs/intl-getcanonicallocales/src/parser.js
17428
+ var require_parser = __commonJS({
17429
+ "node_modules/.aspect_rules_js/@formatjs+intl-getcanonicallocales@0.0.0/node_modules/@formatjs/intl-getcanonicallocales/src/parser.js"(exports) {
17430
+ "use strict";
17431
+ Object.defineProperty(exports, "__esModule", { value: true });
17432
+ exports.SEPARATOR = void 0;
17433
+ exports.isUnicodeLanguageSubtag = isUnicodeLanguageSubtag2;
17434
+ exports.isStructurallyValidLanguageTag = isStructurallyValidLanguageTag2;
17435
+ exports.isUnicodeRegionSubtag = isUnicodeRegionSubtag2;
17436
+ exports.isUnicodeScriptSubtag = isUnicodeScriptSubtag2;
17437
+ exports.isUnicodeVariantSubtag = isUnicodeVariantSubtag;
17438
+ exports.parseUnicodeLanguageId = parseUnicodeLanguageId2;
17439
+ exports.parseUnicodeLocaleId = parseUnicodeLocaleId2;
17440
+ var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
17441
+ var ALPHANUM_1_8 = /^[a-z0-9]{1,8}$/i;
17442
+ var ALPHANUM_2_8 = /^[a-z0-9]{2,8}$/i;
17443
+ var ALPHANUM_3_82 = /^[a-z0-9]{3,8}$/i;
17444
+ var KEY_REGEX = /^[a-z0-9][a-z]$/i;
17445
+ var TYPE_REGEX = /^[a-z0-9]{3,8}$/i;
17446
+ var ALPHA_4 = /^[a-z]{4}$/i;
17447
+ var OTHER_EXTENSION_TYPE = /^[0-9a-svwyz]$/i;
17448
+ var UNICODE_REGION_SUBTAG_REGEX = /^([a-z]{2}|[0-9]{3})$/i;
17449
+ var UNICODE_VARIANT_SUBTAG_REGEX = /^([a-z0-9]{5,8}|[0-9][a-z0-9]{3})$/i;
17450
+ var UNICODE_LANGUAGE_SUBTAG_REGEX = /^([a-z]{2,3}|[a-z]{5,8})$/i;
17451
+ var TKEY_REGEX = /^[a-z][0-9]$/i;
17452
+ exports.SEPARATOR = "-";
17453
+ function isUnicodeLanguageSubtag2(lang) {
17454
+ return UNICODE_LANGUAGE_SUBTAG_REGEX.test(lang);
17455
+ }
17456
+ function isStructurallyValidLanguageTag2(tag) {
17457
+ try {
17458
+ parseUnicodeLanguageId2(tag.split(exports.SEPARATOR));
17459
+ } catch (e) {
17460
+ return false;
17461
+ }
17462
+ return true;
17463
+ }
17464
+ function isUnicodeRegionSubtag2(region) {
17465
+ return UNICODE_REGION_SUBTAG_REGEX.test(region);
17466
+ }
17467
+ function isUnicodeScriptSubtag2(script) {
17468
+ return ALPHA_4.test(script);
17469
+ }
17470
+ function isUnicodeVariantSubtag(variant) {
17471
+ return UNICODE_VARIANT_SUBTAG_REGEX.test(variant);
17472
+ }
17473
+ function parseUnicodeLanguageId2(chunks) {
17474
+ if (typeof chunks === "string") {
17475
+ chunks = chunks.split(exports.SEPARATOR);
17476
+ }
17477
+ var lang = chunks.shift();
17478
+ if (!lang) {
17479
+ throw new RangeError("Missing unicode_language_subtag");
17480
+ }
17481
+ if (lang === "root") {
17482
+ return { lang: "root", variants: [] };
17483
+ }
17484
+ if (!isUnicodeLanguageSubtag2(lang)) {
17485
+ throw new RangeError("Malformed unicode_language_subtag");
17486
+ }
17487
+ var script;
17488
+ if (chunks.length && isUnicodeScriptSubtag2(chunks[0])) {
17489
+ script = chunks.shift();
17490
+ }
17491
+ var region;
17492
+ if (chunks.length && isUnicodeRegionSubtag2(chunks[0])) {
17493
+ region = chunks.shift();
17494
+ }
17495
+ var variants = {};
17496
+ while (chunks.length && isUnicodeVariantSubtag(chunks[0])) {
17497
+ var variant = chunks.shift();
17498
+ if (variant in variants) {
17499
+ throw new RangeError('Duplicate variant "'.concat(variant, '"'));
17500
+ }
17501
+ variants[variant] = 1;
17502
+ }
17503
+ return {
17504
+ lang,
17505
+ script,
17506
+ region,
17507
+ variants: Object.keys(variants)
17508
+ };
17509
+ }
17510
+ function parseUnicodeExtension(chunks) {
17511
+ var keywords = [];
17512
+ var keyword;
17513
+ while (chunks.length && (keyword = parseKeyword(chunks))) {
17514
+ keywords.push(keyword);
17515
+ }
17516
+ if (keywords.length) {
17517
+ return {
17518
+ type: "u",
17519
+ keywords,
17520
+ attributes: []
17521
+ };
17522
+ }
17523
+ var attributes = [];
17524
+ while (chunks.length && ALPHANUM_3_82.test(chunks[0])) {
17525
+ attributes.push(chunks.shift());
17526
+ }
17527
+ while (chunks.length && (keyword = parseKeyword(chunks))) {
17528
+ keywords.push(keyword);
17529
+ }
17530
+ if (keywords.length || attributes.length) {
17531
+ return {
17532
+ type: "u",
17533
+ attributes,
17534
+ keywords
17535
+ };
17536
+ }
17537
+ throw new RangeError("Malformed unicode_extension");
17538
+ }
17539
+ function parseKeyword(chunks) {
17540
+ var key;
17541
+ if (!KEY_REGEX.test(chunks[0])) {
17542
+ return;
17543
+ }
17544
+ key = chunks.shift();
17545
+ var type = [];
17546
+ while (chunks.length && TYPE_REGEX.test(chunks[0])) {
17547
+ type.push(chunks.shift());
17548
+ }
17549
+ var value = "";
17550
+ if (type.length) {
17551
+ value = type.join(exports.SEPARATOR);
17552
+ }
17553
+ return [key, value];
17554
+ }
17555
+ function parseTransformedExtension(chunks) {
17556
+ var lang;
17557
+ try {
17558
+ lang = parseUnicodeLanguageId2(chunks);
17559
+ } catch (e) {
17560
+ }
17561
+ var fields = [];
17562
+ while (chunks.length && TKEY_REGEX.test(chunks[0])) {
17563
+ var key = chunks.shift();
17564
+ var value = [];
17565
+ while (chunks.length && ALPHANUM_3_82.test(chunks[0])) {
17566
+ value.push(chunks.shift());
17567
+ }
17568
+ if (!value.length) {
17569
+ throw new RangeError('Missing tvalue for tkey "'.concat(key, '"'));
17570
+ }
17571
+ fields.push([key, value.join(exports.SEPARATOR)]);
17572
+ }
17573
+ if (fields.length) {
17574
+ return {
17575
+ type: "t",
17576
+ fields,
17577
+ lang
17578
+ };
17579
+ }
17580
+ throw new RangeError("Malformed transformed_extension");
17581
+ }
17582
+ function parsePuExtension(chunks) {
17583
+ var exts = [];
17584
+ while (chunks.length && ALPHANUM_1_8.test(chunks[0])) {
17585
+ exts.push(chunks.shift());
17586
+ }
17587
+ if (exts.length) {
17588
+ return {
17589
+ type: "x",
17590
+ value: exts.join(exports.SEPARATOR)
17591
+ };
17592
+ }
17593
+ throw new RangeError("Malformed private_use_extension");
17594
+ }
17595
+ function parseOtherExtensionValue(chunks) {
17596
+ var exts = [];
17597
+ while (chunks.length && ALPHANUM_2_8.test(chunks[0])) {
17598
+ exts.push(chunks.shift());
17599
+ }
17600
+ if (exts.length) {
17601
+ return exts.join(exports.SEPARATOR);
17602
+ }
17603
+ return "";
17604
+ }
17605
+ function parseExtensions(chunks) {
17606
+ if (!chunks.length) {
17607
+ return { extensions: [] };
17608
+ }
17609
+ var extensions = [];
17610
+ var unicodeExtension;
17611
+ var transformedExtension;
17612
+ var puExtension;
17613
+ var otherExtensionMap = {};
17614
+ do {
17615
+ var type = chunks.shift();
17616
+ switch (type) {
17617
+ case "u":
17618
+ case "U":
17619
+ if (unicodeExtension) {
17620
+ throw new RangeError("There can only be 1 -u- extension");
17621
+ }
17622
+ unicodeExtension = parseUnicodeExtension(chunks);
17623
+ extensions.push(unicodeExtension);
17624
+ break;
17625
+ case "t":
17626
+ case "T":
17627
+ if (transformedExtension) {
17628
+ throw new RangeError("There can only be 1 -t- extension");
17629
+ }
17630
+ transformedExtension = parseTransformedExtension(chunks);
17631
+ extensions.push(transformedExtension);
17632
+ break;
17633
+ case "x":
17634
+ case "X":
17635
+ if (puExtension) {
17636
+ throw new RangeError("There can only be 1 -x- extension");
17637
+ }
17638
+ puExtension = parsePuExtension(chunks);
17639
+ extensions.push(puExtension);
17640
+ break;
17641
+ default:
17642
+ if (!OTHER_EXTENSION_TYPE.test(type)) {
17643
+ throw new RangeError("Malformed extension type");
17644
+ }
17645
+ if (type in otherExtensionMap) {
17646
+ throw new RangeError("There can only be 1 -".concat(type, "- extension"));
17647
+ }
17648
+ var extension = {
17649
+ type,
17650
+ value: parseOtherExtensionValue(chunks)
17651
+ };
17652
+ otherExtensionMap[extension.type] = extension;
17653
+ extensions.push(extension);
17654
+ break;
17655
+ }
17656
+ } while (chunks.length);
17657
+ return { extensions };
17658
+ }
17659
+ function parseUnicodeLocaleId2(locale) {
17660
+ var chunks = locale.split(exports.SEPARATOR);
17661
+ var lang = parseUnicodeLanguageId2(chunks);
17662
+ return tslib_1.__assign({ lang }, parseExtensions(chunks));
17663
+ }
17664
+ }
17665
+ });
17666
+
17573
17667
  // node_modules/.aspect_rules_js/@formatjs+intl-getcanonicallocales@0.0.0/node_modules/@formatjs/intl-getcanonicallocales/src/canonicalizer.js
17574
17668
  var require_canonicalizer = __commonJS({
17575
17669
  "node_modules/.aspect_rules_js/@formatjs+intl-getcanonicallocales@0.0.0/node_modules/@formatjs/intl-getcanonicallocales/src/canonicalizer.js"(exports) {
17576
17670
  "use strict";
17577
17671
  Object.defineProperty(exports, "__esModule", { value: true });
17578
17672
  exports.canonicalizeUnicodeLanguageId = canonicalizeUnicodeLanguageId;
17579
- exports.canonicalizeUnicodeLocaleId = canonicalizeUnicodeLocaleId;
17673
+ exports.CanonicalizeUnicodeLocaleId = CanonicalizeUnicodeLocaleId2;
17580
17674
  var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
17581
17675
  var aliases_generated_1 = require_aliases_generated();
17582
- var parser_1 = require_parser();
17583
- var likelySubtags_generated_1 = require_likelySubtags_generated();
17584
17676
  var emitter_1 = require_emitter();
17677
+ var likelySubtags_generated_1 = require_likelySubtags_generated();
17678
+ var parser_1 = require_parser();
17585
17679
  function canonicalizeAttrs(strs) {
17586
17680
  return Object.keys(strs.reduce(function(all, str) {
17587
17681
  all[str.toLowerCase()] = 1;
@@ -17734,7 +17828,7 @@
17734
17828
  }
17735
17829
  return finalLangAst;
17736
17830
  }
17737
- function canonicalizeUnicodeLocaleId(locale) {
17831
+ function CanonicalizeUnicodeLocaleId2(locale) {
17738
17832
  locale.lang = canonicalizeUnicodeLanguageId(locale.lang);
17739
17833
  if (locale.extensions) {
17740
17834
  for (var _i = 0, _a = locale.extensions; _i < _a.length; _i++) {
@@ -17777,12 +17871,12 @@
17777
17871
  "node_modules/.aspect_rules_js/@formatjs+intl-getcanonicallocales@0.0.0/node_modules/@formatjs/intl-getcanonicallocales/index.js"(exports) {
17778
17872
  "use strict";
17779
17873
  Object.defineProperty(exports, "__esModule", { value: true });
17780
- exports.isUnicodeLanguageSubtag = exports.isUnicodeScriptSubtag = exports.isUnicodeRegionSubtag = exports.isStructurallyValidLanguageTag = exports.parseUnicodeLanguageId = exports.parseUnicodeLocaleId = void 0;
17874
+ exports.parseUnicodeLocaleId = exports.parseUnicodeLanguageId = exports.isUnicodeScriptSubtag = exports.isUnicodeRegionSubtag = exports.isUnicodeLanguageSubtag = exports.isStructurallyValidLanguageTag = void 0;
17781
17875
  exports.getCanonicalLocales = getCanonicalLocales2;
17782
17876
  var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
17783
- var parser_1 = require_parser();
17784
- var emitter_1 = require_emitter();
17785
17877
  var canonicalizer_1 = require_canonicalizer();
17878
+ var emitter_1 = require_emitter();
17879
+ var parser_1 = require_parser();
17786
17880
  function CanonicalizeLocaleList3(locales) {
17787
17881
  if (locales === void 0) {
17788
17882
  return [];
@@ -17793,7 +17887,7 @@
17793
17887
  }
17794
17888
  for (var _i = 0, locales_1 = locales; _i < locales_1.length; _i++) {
17795
17889
  var locale = locales_1[_i];
17796
- var canonicalizedTag = (0, emitter_1.emitUnicodeLocaleId)((0, canonicalizer_1.canonicalizeUnicodeLocaleId)((0, parser_1.parseUnicodeLocaleId)(locale)));
17890
+ var canonicalizedTag = (0, emitter_1.emitUnicodeLocaleId)((0, canonicalizer_1.CanonicalizeUnicodeLocaleId)((0, parser_1.parseUnicodeLocaleId)(locale)));
17797
17891
  if (seen.indexOf(canonicalizedTag) < 0) {
17798
17892
  seen.push(canonicalizedTag);
17799
17893
  }
@@ -17803,27 +17897,27 @@
17803
17897
  function getCanonicalLocales2(locales) {
17804
17898
  return CanonicalizeLocaleList3(locales);
17805
17899
  }
17900
+ tslib_1.__exportStar(require_emitter(), exports);
17806
17901
  var parser_2 = require_parser();
17807
- Object.defineProperty(exports, "parseUnicodeLocaleId", { enumerable: true, get: function() {
17808
- return parser_2.parseUnicodeLocaleId;
17809
- } });
17810
- Object.defineProperty(exports, "parseUnicodeLanguageId", { enumerable: true, get: function() {
17811
- return parser_2.parseUnicodeLanguageId;
17812
- } });
17813
17902
  Object.defineProperty(exports, "isStructurallyValidLanguageTag", { enumerable: true, get: function() {
17814
17903
  return parser_2.isStructurallyValidLanguageTag;
17815
17904
  } });
17905
+ Object.defineProperty(exports, "isUnicodeLanguageSubtag", { enumerable: true, get: function() {
17906
+ return parser_2.isUnicodeLanguageSubtag;
17907
+ } });
17816
17908
  Object.defineProperty(exports, "isUnicodeRegionSubtag", { enumerable: true, get: function() {
17817
17909
  return parser_2.isUnicodeRegionSubtag;
17818
17910
  } });
17819
17911
  Object.defineProperty(exports, "isUnicodeScriptSubtag", { enumerable: true, get: function() {
17820
17912
  return parser_2.isUnicodeScriptSubtag;
17821
17913
  } });
17822
- Object.defineProperty(exports, "isUnicodeLanguageSubtag", { enumerable: true, get: function() {
17823
- return parser_2.isUnicodeLanguageSubtag;
17914
+ Object.defineProperty(exports, "parseUnicodeLanguageId", { enumerable: true, get: function() {
17915
+ return parser_2.parseUnicodeLanguageId;
17916
+ } });
17917
+ Object.defineProperty(exports, "parseUnicodeLocaleId", { enumerable: true, get: function() {
17918
+ return parser_2.parseUnicodeLocaleId;
17824
17919
  } });
17825
17920
  tslib_1.__exportStar(require_types(), exports);
17826
- tslib_1.__exportStar(require_emitter(), exports);
17827
17921
  tslib_1.__exportStar(require_likelySubtags_generated(), exports);
17828
17922
  }
17829
17923
  });
@@ -25873,8 +25967,7 @@
25873
25967
  return "ltr";
25874
25968
  }
25875
25969
  function characterDirectionOfLocale(loc) {
25876
- const locInternalSlots = getInternalSlots(loc);
25877
- const locale = locInternalSlots.locale;
25970
+ const locale = loc.minimize().toString();
25878
25971
  return translateCharacterOrder(characterOrders[locale]);
25879
25972
  }
25880
25973
  function weekInfoOfLocale(loc) {