@formatjs/intl-locale 4.2.10 → 4.2.11

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 +16 -21
  2. package/polyfill.iife.js +69 -45
package/package.json CHANGED
@@ -1,32 +1,27 @@
1
1
  {
2
2
  "name": "@formatjs/intl-locale",
3
- "version": "4.2.10",
4
3
  "description": "Intl.Locale polyfill",
4
+ "version": "4.2.11",
5
+ "license": "MIT",
6
+ "author": "Long Ho <holevietlong@gmail.com>",
7
+ "types": "index.d.ts",
8
+ "dependencies": {
9
+ "tslib": "^2.8.0",
10
+ "@formatjs/ecma402-abstract": "2.3.4",
11
+ "@formatjs/intl-enumerator": "1.8.10",
12
+ "@formatjs/intl-getcanonicallocales": "2.5.5"
13
+ },
14
+ "bugs": "https://github.com/formatjs/formatjs/issues",
15
+ "homepage": "https://github.com/formatjs/formatjs#readme",
5
16
  "keywords": [
17
+ "ecma402",
18
+ "formatjs",
19
+ "i18n",
6
20
  "intl",
7
21
  "locale",
8
- "formatjs",
9
22
  "react-intl",
10
- "i18n",
11
- "ecma402",
12
23
  "tc39"
13
24
  ],
14
- "author": "Long Ho <holevietlong@gmail.com>",
15
- "homepage": "https://github.com/formatjs/formatjs#readme",
16
- "license": "MIT",
17
25
  "main": "index.js",
18
- "types": "index.d.ts",
19
- "repository": {
20
- "type": "git",
21
- "url": "git+https://github.com/formatjs/formatjs.git"
22
- },
23
- "bugs": {
24
- "url": "https://github.com/formatjs/formatjs/issues"
25
- },
26
- "dependencies": {
27
- "tslib": "2",
28
- "@formatjs/ecma402-abstract": "2.3.3",
29
- "@formatjs/intl-enumerator": "1.8.9",
30
- "@formatjs/intl-getcanonicallocales": "2.5.4"
31
- }
26
+ "repository": "formatjs/formatjs.git"
32
27
  }
package/polyfill.iife.js CHANGED
@@ -695,9 +695,9 @@
695
695
  }
696
696
  });
697
697
 
698
- // node_modules/.aspect_rules_js/decimal.js@10.4.3/node_modules/decimal.js/decimal.js
698
+ // node_modules/.aspect_rules_js/decimal.js@10.5.0/node_modules/decimal.js/decimal.js
699
699
  var require_decimal = __commonJS({
700
- "node_modules/.aspect_rules_js/decimal.js@10.4.3/node_modules/decimal.js/decimal.js"(exports, module) {
700
+ "node_modules/.aspect_rules_js/decimal.js@10.5.0/node_modules/decimal.js/decimal.js"(exports, module) {
701
701
  (function(globalScope) {
702
702
  "use strict";
703
703
  var EXP_LIMIT2 = 9e15, MAX_DIGITS2 = 1e9, NUMERALS2 = "0123456789abcdef", LN102 = "2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058", PI2 = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789", DEFAULTS2 = {
@@ -966,7 +966,7 @@
966
966
  return divide2(x.sinh(), x.cosh(), Ctor.precision = pr, Ctor.rounding = rm);
967
967
  };
968
968
  P2.inverseCosine = P2.acos = function() {
969
- var halfPi, x = this, Ctor = x.constructor, k = x.abs().cmp(1), pr = Ctor.precision, rm = Ctor.rounding;
969
+ var x = this, Ctor = x.constructor, k = x.abs().cmp(1), pr = Ctor.precision, rm = Ctor.rounding;
970
970
  if (k !== -1) {
971
971
  return k === 0 ? x.isNeg() ? getPi2(Ctor, pr, rm) : new Ctor(0) : new Ctor(NaN);
972
972
  }
@@ -974,11 +974,10 @@
974
974
  return getPi2(Ctor, pr + 4, rm).times(0.5);
975
975
  Ctor.precision = pr + 6;
976
976
  Ctor.rounding = 1;
977
- x = x.asin();
978
- halfPi = getPi2(Ctor, pr + 4, rm).times(0.5);
977
+ x = new Ctor(1).minus(x).div(x.plus(1)).sqrt().atan();
979
978
  Ctor.precision = pr;
980
979
  Ctor.rounding = rm;
981
- return halfPi.minus(x);
980
+ return x.times(2);
982
981
  };
983
982
  P2.inverseHyperbolicCosine = P2.acosh = function() {
984
983
  var pr, rm, x = this, Ctor = x.constructor;
@@ -2190,14 +2189,16 @@
2190
2189
  function isOdd2(n) {
2191
2190
  return n.d[n.d.length - 1] & 1;
2192
2191
  }
2193
- function maxOrMin2(Ctor, args, ltgt) {
2194
- var y, x = new Ctor(args[0]), i = 0;
2192
+ function maxOrMin2(Ctor, args, n) {
2193
+ var k, y, x = new Ctor(args[0]), i = 0;
2195
2194
  for (; ++i < args.length; ) {
2196
2195
  y = new Ctor(args[i]);
2197
2196
  if (!y.s) {
2198
2197
  x = y;
2199
2198
  break;
2200
- } else if (x[ltgt](y)) {
2199
+ }
2200
+ k = x.cmp(y);
2201
+ if (k === n || k === 0 && x.s === n) {
2201
2202
  x = y;
2202
2203
  }
2203
2204
  }
@@ -2779,7 +2780,8 @@
2779
2780
  x.d = [v];
2780
2781
  }
2781
2782
  return;
2782
- } else if (v * 0 !== 0) {
2783
+ }
2784
+ if (v * 0 !== 0) {
2783
2785
  if (!v)
2784
2786
  x.s = NaN;
2785
2787
  x.e = NaN;
@@ -2787,18 +2789,28 @@
2787
2789
  return;
2788
2790
  }
2789
2791
  return parseDecimal2(x, v.toString());
2790
- } else if (t !== "string") {
2791
- throw Error(invalidArgument2 + v);
2792
2792
  }
2793
- if ((i2 = v.charCodeAt(0)) === 45) {
2794
- v = v.slice(1);
2795
- x.s = -1;
2796
- } else {
2797
- if (i2 === 43)
2793
+ if (t === "string") {
2794
+ if ((i2 = v.charCodeAt(0)) === 45) {
2798
2795
  v = v.slice(1);
2799
- x.s = 1;
2796
+ x.s = -1;
2797
+ } else {
2798
+ if (i2 === 43)
2799
+ v = v.slice(1);
2800
+ x.s = 1;
2801
+ }
2802
+ return isDecimal2.test(v) ? parseDecimal2(x, v) : parseOther2(x, v);
2803
+ }
2804
+ if (t === "bigint") {
2805
+ if (v < 0) {
2806
+ v = -v;
2807
+ x.s = -1;
2808
+ } else {
2809
+ x.s = 1;
2810
+ }
2811
+ return parseDecimal2(x, v.toString());
2800
2812
  }
2801
- return isDecimal2.test(v) ? parseDecimal2(x, v) : parseOther2(x, v);
2813
+ throw Error(invalidArgument2 + v);
2802
2814
  }
2803
2815
  Decimal3.prototype = P2;
2804
2816
  Decimal3.ROUND_UP = 0;
@@ -2908,10 +2920,10 @@
2908
2920
  return new this(x).log(10);
2909
2921
  }
2910
2922
  function max2() {
2911
- return maxOrMin2(this, arguments, "lt");
2923
+ return maxOrMin2(this, arguments, -1);
2912
2924
  }
2913
2925
  function min2() {
2914
- return maxOrMin2(this, arguments, "gt");
2926
+ return maxOrMin2(this, arguments, 1);
2915
2927
  }
2916
2928
  function mod2(x, y) {
2917
2929
  return new this(x).mod(y);
@@ -20538,7 +20550,7 @@
20538
20550
  }
20539
20551
  });
20540
20552
 
20541
- // node_modules/.aspect_rules_js/decimal.js@10.4.3/node_modules/decimal.js/decimal.mjs
20553
+ // node_modules/.aspect_rules_js/decimal.js@10.5.0/node_modules/decimal.js/decimal.mjs
20542
20554
  var EXP_LIMIT = 9e15;
20543
20555
  var MAX_DIGITS = 1e9;
20544
20556
  var NUMERALS = "0123456789abcdef";
@@ -20830,7 +20842,7 @@
20830
20842
  return divide(x.sinh(), x.cosh(), Ctor.precision = pr, Ctor.rounding = rm);
20831
20843
  };
20832
20844
  P.inverseCosine = P.acos = function() {
20833
- var halfPi, x = this, Ctor = x.constructor, k = x.abs().cmp(1), pr = Ctor.precision, rm = Ctor.rounding;
20845
+ var x = this, Ctor = x.constructor, k = x.abs().cmp(1), pr = Ctor.precision, rm = Ctor.rounding;
20834
20846
  if (k !== -1) {
20835
20847
  return k === 0 ? x.isNeg() ? getPi(Ctor, pr, rm) : new Ctor(0) : new Ctor(NaN);
20836
20848
  }
@@ -20838,11 +20850,10 @@
20838
20850
  return getPi(Ctor, pr + 4, rm).times(0.5);
20839
20851
  Ctor.precision = pr + 6;
20840
20852
  Ctor.rounding = 1;
20841
- x = x.asin();
20842
- halfPi = getPi(Ctor, pr + 4, rm).times(0.5);
20853
+ x = new Ctor(1).minus(x).div(x.plus(1)).sqrt().atan();
20843
20854
  Ctor.precision = pr;
20844
20855
  Ctor.rounding = rm;
20845
- return halfPi.minus(x);
20856
+ return x.times(2);
20846
20857
  };
20847
20858
  P.inverseHyperbolicCosine = P.acosh = function() {
20848
20859
  var pr, rm, x = this, Ctor = x.constructor;
@@ -22054,14 +22065,16 @@
22054
22065
  function isOdd(n) {
22055
22066
  return n.d[n.d.length - 1] & 1;
22056
22067
  }
22057
- function maxOrMin(Ctor, args, ltgt) {
22058
- var y, x = new Ctor(args[0]), i = 0;
22068
+ function maxOrMin(Ctor, args, n) {
22069
+ var k, y, x = new Ctor(args[0]), i = 0;
22059
22070
  for (; ++i < args.length; ) {
22060
22071
  y = new Ctor(args[i]);
22061
22072
  if (!y.s) {
22062
22073
  x = y;
22063
22074
  break;
22064
- } else if (x[ltgt](y)) {
22075
+ }
22076
+ k = x.cmp(y);
22077
+ if (k === n || k === 0 && x.s === n) {
22065
22078
  x = y;
22066
22079
  }
22067
22080
  }
@@ -22643,7 +22656,8 @@
22643
22656
  x.d = [v];
22644
22657
  }
22645
22658
  return;
22646
- } else if (v * 0 !== 0) {
22659
+ }
22660
+ if (v * 0 !== 0) {
22647
22661
  if (!v)
22648
22662
  x.s = NaN;
22649
22663
  x.e = NaN;
@@ -22651,18 +22665,28 @@
22651
22665
  return;
22652
22666
  }
22653
22667
  return parseDecimal(x, v.toString());
22654
- } else if (t !== "string") {
22655
- throw Error(invalidArgument + v);
22656
22668
  }
22657
- if ((i2 = v.charCodeAt(0)) === 45) {
22658
- v = v.slice(1);
22659
- x.s = -1;
22660
- } else {
22661
- if (i2 === 43)
22669
+ if (t === "string") {
22670
+ if ((i2 = v.charCodeAt(0)) === 45) {
22662
22671
  v = v.slice(1);
22663
- x.s = 1;
22672
+ x.s = -1;
22673
+ } else {
22674
+ if (i2 === 43)
22675
+ v = v.slice(1);
22676
+ x.s = 1;
22677
+ }
22678
+ return isDecimal.test(v) ? parseDecimal(x, v) : parseOther(x, v);
22679
+ }
22680
+ if (t === "bigint") {
22681
+ if (v < 0) {
22682
+ v = -v;
22683
+ x.s = -1;
22684
+ } else {
22685
+ x.s = 1;
22686
+ }
22687
+ return parseDecimal(x, v.toString());
22664
22688
  }
22665
- return isDecimal.test(v) ? parseDecimal(x, v) : parseOther(x, v);
22689
+ throw Error(invalidArgument + v);
22666
22690
  }
22667
22691
  Decimal2.prototype = P;
22668
22692
  Decimal2.ROUND_UP = 0;
@@ -22772,10 +22796,10 @@
22772
22796
  return new this(x).log(10);
22773
22797
  }
22774
22798
  function max() {
22775
- return maxOrMin(this, arguments, "lt");
22799
+ return maxOrMin(this, arguments, -1);
22776
22800
  }
22777
22801
  function min() {
22778
- return maxOrMin(this, arguments, "gt");
22802
+ return maxOrMin(this, arguments, 1);
22779
22803
  }
22780
22804
  function mod(x, y) {
22781
22805
  return new this(x).mod(y);
@@ -31297,19 +31321,19 @@
31297
31321
 
31298
31322
  decimal.js/decimal.js:
31299
31323
  (*!
31300
- * decimal.js v10.4.3
31324
+ * decimal.js v10.5.0
31301
31325
  * An arbitrary-precision Decimal type for JavaScript.
31302
31326
  * https://github.com/MikeMcl/decimal.js
31303
- * Copyright (c) 2022 Michael Mclaughlin <M8ch88l@gmail.com>
31327
+ * Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
31304
31328
  * MIT Licence
31305
31329
  *)
31306
31330
 
31307
31331
  decimal.js/decimal.mjs:
31308
31332
  (*!
31309
- * decimal.js v10.4.3
31333
+ * decimal.js v10.5.0
31310
31334
  * An arbitrary-precision Decimal type for JavaScript.
31311
31335
  * https://github.com/MikeMcl/decimal.js
31312
- * Copyright (c) 2022 Michael Mclaughlin <M8ch88l@gmail.com>
31336
+ * Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
31313
31337
  * MIT Licence
31314
31338
  *)
31315
31339
  */