@formatjs/intl-displaynames 6.8.8 → 6.8.10

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.
Files changed (2) hide show
  1. package/package.json +5 -5
  2. package/polyfill.iife.js +127 -132
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formatjs/intl-displaynames",
3
- "version": "6.8.8",
3
+ "version": "6.8.10",
4
4
  "description": "Polyfill for: https://tc39.es/proposal-intl-displaynames",
5
5
  "keywords": [
6
6
  "i18n",
@@ -22,12 +22,12 @@
22
22
  },
23
23
  "dependencies": {
24
24
  "tslib": "2",
25
- "@formatjs/intl-localematcher": "0.5.9",
26
- "@formatjs/ecma402-abstract": "2.3.1"
25
+ "@formatjs/ecma402-abstract": "2.3.3",
26
+ "@formatjs/intl-localematcher": "0.6.0"
27
27
  },
28
28
  "devDependencies": {
29
- "@formatjs/intl-getcanonicallocales": "2.5.4",
30
- "@formatjs/intl-locale": "4.2.8"
29
+ "@formatjs/intl-locale": "4.2.10",
30
+ "@formatjs/intl-getcanonicallocales": "2.5.4"
31
31
  },
32
32
  "bugs": {
33
33
  "url": "https://github.com/formatjs/formatjs/issues"
package/polyfill.iife.js CHANGED
@@ -2380,131 +2380,6 @@
2380
2380
  var ZERO = new decimal_default(0);
2381
2381
  var NEGATIVE_ZERO = new decimal_default(-0);
2382
2382
 
2383
- // node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/262.js
2384
- function ToString(o) {
2385
- if (typeof o === "symbol") {
2386
- throw TypeError("Cannot convert a Symbol value to a string");
2387
- }
2388
- return String(o);
2389
- }
2390
- function ToObject(arg) {
2391
- if (arg == null) {
2392
- throw new TypeError("undefined/null cannot be converted to object");
2393
- }
2394
- return Object(arg);
2395
- }
2396
- var MINUTES_PER_HOUR = 60;
2397
- var SECONDS_PER_MINUTE = 60;
2398
- var MS_PER_SECOND = 1e3;
2399
- var MS_PER_MINUTE = MS_PER_SECOND * SECONDS_PER_MINUTE;
2400
- var MS_PER_HOUR = MS_PER_MINUTE * MINUTES_PER_HOUR;
2401
-
2402
- // node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/GetOption.js
2403
- function GetOption(opts, prop, type, values, fallback) {
2404
- if (typeof opts !== "object") {
2405
- throw new TypeError("Options must be an object");
2406
- }
2407
- var value = opts[prop];
2408
- if (value !== void 0) {
2409
- if (type !== "boolean" && type !== "string") {
2410
- throw new TypeError("invalid type");
2411
- }
2412
- if (type === "boolean") {
2413
- value = Boolean(value);
2414
- }
2415
- if (type === "string") {
2416
- value = ToString(value);
2417
- }
2418
- if (values !== void 0 && !values.filter(function(val) {
2419
- return val == value;
2420
- }).length) {
2421
- throw new RangeError("".concat(value, " is not within ").concat(values.join(", ")));
2422
- }
2423
- return value;
2424
- }
2425
- return fallback;
2426
- }
2427
-
2428
- // node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/GetOptionsObject.js
2429
- function GetOptionsObject(options) {
2430
- if (typeof options === "undefined") {
2431
- return /* @__PURE__ */ Object.create(null);
2432
- }
2433
- if (typeof options === "object") {
2434
- return options;
2435
- }
2436
- throw new TypeError("Options must be an object");
2437
- }
2438
-
2439
- // node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/IsSanctionedSimpleUnitIdentifier.js
2440
- var SANCTIONED_UNITS = [
2441
- "angle-degree",
2442
- "area-acre",
2443
- "area-hectare",
2444
- "concentr-percent",
2445
- "digital-bit",
2446
- "digital-byte",
2447
- "digital-gigabit",
2448
- "digital-gigabyte",
2449
- "digital-kilobit",
2450
- "digital-kilobyte",
2451
- "digital-megabit",
2452
- "digital-megabyte",
2453
- "digital-petabyte",
2454
- "digital-terabit",
2455
- "digital-terabyte",
2456
- "duration-day",
2457
- "duration-hour",
2458
- "duration-millisecond",
2459
- "duration-minute",
2460
- "duration-month",
2461
- "duration-second",
2462
- "duration-week",
2463
- "duration-year",
2464
- "length-centimeter",
2465
- "length-foot",
2466
- "length-inch",
2467
- "length-kilometer",
2468
- "length-meter",
2469
- "length-mile-scandinavian",
2470
- "length-mile",
2471
- "length-millimeter",
2472
- "length-yard",
2473
- "mass-gram",
2474
- "mass-kilogram",
2475
- "mass-ounce",
2476
- "mass-pound",
2477
- "mass-stone",
2478
- "temperature-celsius",
2479
- "temperature-fahrenheit",
2480
- "volume-fluid-ounce",
2481
- "volume-gallon",
2482
- "volume-liter",
2483
- "volume-milliliter"
2484
- ];
2485
- function removeUnitNamespace(unit) {
2486
- return unit.slice(unit.indexOf("-") + 1);
2487
- }
2488
- var SIMPLE_UNITS = SANCTIONED_UNITS.map(removeUnitNamespace);
2489
-
2490
- // node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/IsWellFormedCurrencyCode.js
2491
- function toUpperCase(str) {
2492
- return str.replace(/([a-z])/g, function(_, c) {
2493
- return c.toUpperCase();
2494
- });
2495
- }
2496
- var NOT_A_Z_REGEX = /[^A-Z]/;
2497
- function IsWellFormedCurrencyCode(currency) {
2498
- currency = toUpperCase(currency);
2499
- if (currency.length !== 3) {
2500
- return false;
2501
- }
2502
- if (NOT_A_Z_REGEX.test(currency)) {
2503
- return false;
2504
- }
2505
- return true;
2506
- }
2507
-
2508
2383
  // node_modules/.aspect_rules_js/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs
2509
2384
  var extendStatics = function(d, b) {
2510
2385
  extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
@@ -2694,6 +2569,131 @@
2694
2569
  strategy: strategies.variadic
2695
2570
  });
2696
2571
 
2572
+ // node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/262.js
2573
+ function ToString(o) {
2574
+ if (typeof o === "symbol") {
2575
+ throw TypeError("Cannot convert a Symbol value to a string");
2576
+ }
2577
+ return String(o);
2578
+ }
2579
+ function ToObject(arg) {
2580
+ if (arg == null) {
2581
+ throw new TypeError("undefined/null cannot be converted to object");
2582
+ }
2583
+ return Object(arg);
2584
+ }
2585
+ var MINUTES_PER_HOUR = 60;
2586
+ var SECONDS_PER_MINUTE = 60;
2587
+ var MS_PER_SECOND = 1e3;
2588
+ var MS_PER_MINUTE = MS_PER_SECOND * SECONDS_PER_MINUTE;
2589
+ var MS_PER_HOUR = MS_PER_MINUTE * MINUTES_PER_HOUR;
2590
+
2591
+ // node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/GetOption.js
2592
+ function GetOption(opts, prop, type, values, fallback) {
2593
+ if (typeof opts !== "object") {
2594
+ throw new TypeError("Options must be an object");
2595
+ }
2596
+ var value = opts[prop];
2597
+ if (value !== void 0) {
2598
+ if (type !== "boolean" && type !== "string") {
2599
+ throw new TypeError("invalid type");
2600
+ }
2601
+ if (type === "boolean") {
2602
+ value = Boolean(value);
2603
+ }
2604
+ if (type === "string") {
2605
+ value = ToString(value);
2606
+ }
2607
+ if (values !== void 0 && !values.filter(function(val) {
2608
+ return val == value;
2609
+ }).length) {
2610
+ throw new RangeError("".concat(value, " is not within ").concat(values.join(", ")));
2611
+ }
2612
+ return value;
2613
+ }
2614
+ return fallback;
2615
+ }
2616
+
2617
+ // node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/GetOptionsObject.js
2618
+ function GetOptionsObject(options) {
2619
+ if (typeof options === "undefined") {
2620
+ return /* @__PURE__ */ Object.create(null);
2621
+ }
2622
+ if (typeof options === "object") {
2623
+ return options;
2624
+ }
2625
+ throw new TypeError("Options must be an object");
2626
+ }
2627
+
2628
+ // node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/IsSanctionedSimpleUnitIdentifier.js
2629
+ var SANCTIONED_UNITS = [
2630
+ "angle-degree",
2631
+ "area-acre",
2632
+ "area-hectare",
2633
+ "concentr-percent",
2634
+ "digital-bit",
2635
+ "digital-byte",
2636
+ "digital-gigabit",
2637
+ "digital-gigabyte",
2638
+ "digital-kilobit",
2639
+ "digital-kilobyte",
2640
+ "digital-megabit",
2641
+ "digital-megabyte",
2642
+ "digital-petabyte",
2643
+ "digital-terabit",
2644
+ "digital-terabyte",
2645
+ "duration-day",
2646
+ "duration-hour",
2647
+ "duration-millisecond",
2648
+ "duration-minute",
2649
+ "duration-month",
2650
+ "duration-second",
2651
+ "duration-week",
2652
+ "duration-year",
2653
+ "length-centimeter",
2654
+ "length-foot",
2655
+ "length-inch",
2656
+ "length-kilometer",
2657
+ "length-meter",
2658
+ "length-mile-scandinavian",
2659
+ "length-mile",
2660
+ "length-millimeter",
2661
+ "length-yard",
2662
+ "mass-gram",
2663
+ "mass-kilogram",
2664
+ "mass-ounce",
2665
+ "mass-pound",
2666
+ "mass-stone",
2667
+ "temperature-celsius",
2668
+ "temperature-fahrenheit",
2669
+ "volume-fluid-ounce",
2670
+ "volume-gallon",
2671
+ "volume-liter",
2672
+ "volume-milliliter"
2673
+ ];
2674
+ function removeUnitNamespace(unit) {
2675
+ return unit.slice(unit.indexOf("-") + 1);
2676
+ }
2677
+ var SIMPLE_UNITS = SANCTIONED_UNITS.map(removeUnitNamespace);
2678
+
2679
+ // node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/IsWellFormedCurrencyCode.js
2680
+ function toUpperCase(str) {
2681
+ return str.replace(/([a-z])/g, function(_, c) {
2682
+ return c.toUpperCase();
2683
+ });
2684
+ }
2685
+ var NOT_A_Z_REGEX = /[^A-Z]/;
2686
+ function IsWellFormedCurrencyCode(currency) {
2687
+ currency = toUpperCase(currency);
2688
+ if (currency.length !== 3) {
2689
+ return false;
2690
+ }
2691
+ if (NOT_A_Z_REGEX.test(currency)) {
2692
+ return false;
2693
+ }
2694
+ return true;
2695
+ }
2696
+
2697
2697
  // node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/ComputeExponentForMagnitude.js
2698
2698
  decimal_default.set({
2699
2699
  toExpPos: 100
@@ -2704,11 +2704,6 @@
2704
2704
  toExpPos: 100
2705
2705
  });
2706
2706
 
2707
- // node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/ToRawPrecision.js
2708
- decimal_default.set({
2709
- toExpPos: 100
2710
- });
2711
-
2712
2707
  // node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/regex.generated.js
2713
2708
  var S_UNICODE_REGEX = /[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20BF\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC1\uFDFC\uFDFD\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDE8\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEE0-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF73\uDF80-\uDFD8\uDFE0-\uDFEB]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDD78\uDD7A-\uDDCB\uDDCD-\uDE53\uDE60-\uDE6D\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6\uDF00-\uDF92\uDF94-\uDFCA]/;
2714
2709
 
@@ -6732,7 +6727,7 @@
6732
6727
  }).reduce(function(all, list) {
6733
6728
  return __spreadArray(__spreadArray([], all, true), list, true);
6734
6729
  }, []);
6735
- matches && (matches = !(expandedMatchedRegions.indexOf(locale.region || "") > 1 != shouldInclude));
6730
+ matches && (matches = !(expandedMatchedRegions.indexOf(locale.region || "") > -1 != shouldInclude));
6736
6731
  } else {
6737
6732
  matches && (matches = locale.region ? region === "*" || region === locale.region : true);
6738
6733
  }
@@ -6793,7 +6788,7 @@
6793
6788
  region: ""
6794
6789
  }, {
6795
6790
  language: supportedLocale.language,
6796
- script: desiredLSR.script,
6791
+ script: supportedLSR.script,
6797
6792
  region: ""
6798
6793
  }, data2);
6799
6794
  }