@formatjs/intl-pluralrules 6.3.16 → 7.0.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.
Files changed (192) hide show
  1. package/index.d.ts +12 -9
  2. package/index.js +39 -143
  3. package/index.js.map +1 -1
  4. package/locale-data/af.js +26 -4
  5. package/locale-data/ak.js +2 -2
  6. package/locale-data/am.js +2 -2
  7. package/locale-data/an.js +2 -2
  8. package/locale-data/ar.js +32 -16
  9. package/locale-data/ars.js +32 -16
  10. package/locale-data/as.js +14 -14
  11. package/locale-data/asa.js +2 -2
  12. package/locale-data/az.js +26 -10
  13. package/locale-data/bal.js +4 -4
  14. package/locale-data/be.js +26 -10
  15. package/locale-data/bem.js +2 -2
  16. package/locale-data/bez.js +2 -2
  17. package/locale-data/bg.js +34 -4
  18. package/locale-data/bho.js +2 -2
  19. package/locale-data/blo.js +14 -14
  20. package/locale-data/bn.js +14 -14
  21. package/locale-data/br.js +28 -12
  22. package/locale-data/brx.js +2 -2
  23. package/locale-data/bs.js +22 -6
  24. package/locale-data/ca.js +28 -12
  25. package/locale-data/ce.js +2 -2
  26. package/locale-data/ceb.js +18 -2
  27. package/locale-data/cgg.js +2 -2
  28. package/locale-data/chr.js +2 -2
  29. package/locale-data/ckb.js +2 -2
  30. package/locale-data/cs.js +4 -4
  31. package/locale-data/csw.js +2 -2
  32. package/locale-data/cv.js +6 -6
  33. package/locale-data/cy.js +32 -32
  34. package/locale-data/da.js +2 -2
  35. package/locale-data/doi.js +2 -2
  36. package/locale-data/dsb.js +24 -8
  37. package/locale-data/dv.js +2 -2
  38. package/locale-data/ee.js +2 -2
  39. package/locale-data/el.js +2 -2
  40. package/locale-data/en.js +24 -8
  41. package/locale-data/eo.js +2 -2
  42. package/locale-data/es.js +28 -8
  43. package/locale-data/eu.js +2 -2
  44. package/locale-data/fa.js +2 -2
  45. package/locale-data/fil.js +20 -4
  46. package/locale-data/fo.js +2 -2
  47. package/locale-data/fr.js +24 -8
  48. package/locale-data/fur.js +2 -2
  49. package/locale-data/ga.js +14 -14
  50. package/locale-data/gd.js +16 -16
  51. package/locale-data/gl.js +24 -2
  52. package/locale-data/gsw.js +2 -2
  53. package/locale-data/gu.js +14 -14
  54. package/locale-data/guw.js +2 -2
  55. package/locale-data/gv.js +26 -10
  56. package/locale-data/ha.js +2 -2
  57. package/locale-data/haw.js +2 -2
  58. package/locale-data/hi.js +14 -14
  59. package/locale-data/hr.js +22 -6
  60. package/locale-data/hsb.js +24 -8
  61. package/locale-data/hu.js +4 -4
  62. package/locale-data/hy.js +2 -2
  63. package/locale-data/is.js +18 -2
  64. package/locale-data/it.js +22 -6
  65. package/locale-data/iu.js +4 -4
  66. package/locale-data/jgo.js +2 -2
  67. package/locale-data/jmc.js +2 -2
  68. package/locale-data/ka.js +22 -6
  69. package/locale-data/kaj.js +2 -2
  70. package/locale-data/kcg.js +2 -2
  71. package/locale-data/kk.js +20 -4
  72. package/locale-data/kkj.js +2 -2
  73. package/locale-data/kl.js +2 -2
  74. package/locale-data/kn.js +2 -2
  75. package/locale-data/kok-Latn.js +10 -10
  76. package/locale-data/kok.js +10 -10
  77. package/locale-data/ks.js +2 -2
  78. package/locale-data/ksb.js +2 -2
  79. package/locale-data/ksh.js +6 -6
  80. package/locale-data/ku.js +2 -2
  81. package/locale-data/kw.js +38 -22
  82. package/locale-data/ky.js +2 -2
  83. package/locale-data/lag.js +6 -6
  84. package/locale-data/lb.js +2 -2
  85. package/locale-data/lg.js +2 -2
  86. package/locale-data/lij.js +2 -2
  87. package/locale-data/lld.js +22 -6
  88. package/locale-data/ln.js +2 -2
  89. package/locale-data/lo.js +2 -2
  90. package/locale-data/lt.js +22 -6
  91. package/locale-data/lv.js +22 -6
  92. package/locale-data/mas.js +2 -2
  93. package/locale-data/mg.js +2 -2
  94. package/locale-data/mgo.js +2 -2
  95. package/locale-data/mk.js +26 -10
  96. package/locale-data/ml.js +2 -2
  97. package/locale-data/mn.js +2 -2
  98. package/locale-data/mo.js +22 -6
  99. package/locale-data/mr.js +10 -10
  100. package/locale-data/ms.js +2 -2
  101. package/locale-data/mt.js +28 -12
  102. package/locale-data/nah.js +2 -2
  103. package/locale-data/naq.js +4 -4
  104. package/locale-data/nb.js +2 -2
  105. package/locale-data/nd.js +2 -2
  106. package/locale-data/ne.js +4 -4
  107. package/locale-data/nn.js +2 -2
  108. package/locale-data/nnh.js +2 -2
  109. package/locale-data/no.js +2 -2
  110. package/locale-data/nr.js +2 -2
  111. package/locale-data/nso.js +2 -2
  112. package/locale-data/ny.js +2 -2
  113. package/locale-data/nyn.js +2 -2
  114. package/locale-data/om.js +2 -2
  115. package/locale-data/or.js +14 -14
  116. package/locale-data/os.js +2 -2
  117. package/locale-data/pa.js +2 -2
  118. package/locale-data/pap.js +2 -2
  119. package/locale-data/pcm.js +2 -2
  120. package/locale-data/pl.js +24 -8
  121. package/locale-data/prg.js +22 -6
  122. package/locale-data/ps.js +2 -2
  123. package/locale-data/pt-PT.js +20 -4
  124. package/locale-data/pt.js +20 -4
  125. package/locale-data/rm.js +2 -2
  126. package/locale-data/ro.js +22 -6
  127. package/locale-data/rof.js +2 -2
  128. package/locale-data/ru.js +24 -8
  129. package/locale-data/rwk.js +2 -2
  130. package/locale-data/saq.js +2 -2
  131. package/locale-data/sat.js +4 -4
  132. package/locale-data/sc.js +2 -2
  133. package/locale-data/scn.js +22 -6
  134. package/locale-data/sd.js +2 -2
  135. package/locale-data/sdh.js +2 -2
  136. package/locale-data/se.js +4 -4
  137. package/locale-data/seh.js +2 -2
  138. package/locale-data/sgs.js +26 -10
  139. package/locale-data/sh.js +22 -6
  140. package/locale-data/shi.js +6 -6
  141. package/locale-data/si.js +2 -2
  142. package/locale-data/sk.js +4 -4
  143. package/locale-data/sl.js +24 -8
  144. package/locale-data/sma.js +4 -4
  145. package/locale-data/smi.js +4 -4
  146. package/locale-data/smj.js +4 -4
  147. package/locale-data/smn.js +4 -4
  148. package/locale-data/sms.js +4 -4
  149. package/locale-data/sn.js +2 -2
  150. package/locale-data/so.js +2 -2
  151. package/locale-data/sq.js +24 -8
  152. package/locale-data/sr.js +22 -6
  153. package/locale-data/ss.js +2 -2
  154. package/locale-data/ssy.js +2 -2
  155. package/locale-data/st.js +2 -2
  156. package/locale-data/sv.js +18 -2
  157. package/locale-data/syr.js +2 -2
  158. package/locale-data/ta.js +2 -2
  159. package/locale-data/te.js +2 -2
  160. package/locale-data/teo.js +2 -2
  161. package/locale-data/tg.d.ts +1 -0
  162. package/locale-data/tg.js +35 -0
  163. package/locale-data/ti.js +2 -2
  164. package/locale-data/tig.js +2 -2
  165. package/locale-data/tk.js +20 -4
  166. package/locale-data/tl.js +20 -4
  167. package/locale-data/tn.js +2 -2
  168. package/locale-data/tr.js +2 -2
  169. package/locale-data/ts.js +2 -2
  170. package/locale-data/tzm.js +2 -2
  171. package/locale-data/ug.js +2 -2
  172. package/locale-data/uk.js +26 -10
  173. package/locale-data/uz.js +2 -2
  174. package/locale-data/ve.js +2 -2
  175. package/locale-data/vec.js +22 -6
  176. package/locale-data/vi.js +12 -6
  177. package/locale-data/vo.js +2 -2
  178. package/locale-data/vun.js +2 -2
  179. package/locale-data/wa.js +2 -2
  180. package/locale-data/wae.js +2 -2
  181. package/locale-data/xh.js +2 -2
  182. package/locale-data/xog.js +2 -2
  183. package/locale-data/zu.js +2 -2
  184. package/package.json +3 -3
  185. package/polyfill-force.js +39 -143
  186. package/polyfill-force.js.map +1 -1
  187. package/polyfill.iife.js +2137 -3591
  188. package/polyfill.js +43 -149
  189. package/polyfill.js.map +1 -1
  190. package/should-polyfill.d.ts +0 -2
  191. package/should-polyfill.js +3 -4
  192. package/should-polyfill.js.map +1 -1
package/index.d.ts CHANGED
@@ -1,12 +1,9 @@
1
1
  import { Decimal } from "@formatjs/bigdecimal";
2
- //#region packages/ecma402-abstract/types/core.d.ts
3
2
  type Locale = string;
4
3
  interface LocaleData<T> {
5
4
  data: T;
6
5
  locale: Locale;
7
6
  }
8
- //#endregion
9
- //#region packages/ecma402-abstract/types/plural-rules.d.ts
10
7
  type LDMLPluralRule = "zero" | "one" | "two" | "few" | "many" | "other";
11
8
  interface PluralRangesData {
12
9
  cardinal?: Record<string, LDMLPluralRule>;
@@ -23,12 +20,21 @@ interface PluralRulesData {
23
20
  pluralRanges?: PluralRangesData;
24
21
  }
25
22
  type PluralRulesLocaleData = LocaleData<PluralRulesData>;
26
- //#endregion
27
- //#region packages/ecma402-abstract/types/number.d.ts
28
23
  type NumberFormatNotation = "standard" | "scientific" | "engineering" | "compact";
29
24
  type RoundingPriorityType = "auto" | "morePrecision" | "lessPrecision";
30
25
  type NumberFormatRoundingType = "morePrecision" | "lessPrecision" | "significantDigits" | "fractionDigits";
31
26
  type RoundingModeType = "ceil" | "floor" | "expand" | "trunc" | "halfCeil" | "halfFloor" | "halfExpand" | "halfTrunc" | "halfEven";
27
+ interface NumberFormatDigitOptions {
28
+ minimumIntegerDigits?: number;
29
+ minimumSignificantDigits?: number;
30
+ maximumSignificantDigits?: number;
31
+ minimumFractionDigits?: number;
32
+ maximumFractionDigits?: number;
33
+ roundingPriority?: RoundingPriorityType;
34
+ roundingIncrement?: number;
35
+ roundingMode?: RoundingModeType;
36
+ trailingZeroDisplay?: TrailingZeroDisplay;
37
+ }
32
38
  interface NumberFormatDigitInternalSlots {
33
39
  minimumIntegerDigits: number;
34
40
  minimumSignificantDigits: number;
@@ -43,8 +49,6 @@ interface NumberFormatDigitInternalSlots {
43
49
  roundingPriority: RoundingPriorityType;
44
50
  }
45
51
  type TrailingZeroDisplay = "auto" | "stripIfInteger";
46
- //#endregion
47
- //#region packages/intl-pluralrules/index.d.ts
48
52
  /**
49
53
  * Type augmentation for Intl.PluralRules
50
54
  *
@@ -59,7 +63,7 @@ declare global {
59
63
  interface PluralRules {
60
64
  selectRange(start: number | bigint, end: number | bigint): LDMLPluralRule;
61
65
  }
62
- interface PluralRulesOptions {
66
+ interface PluralRulesOptions extends NumberFormatDigitOptions {
63
67
  notation?: "standard" | "scientific" | "engineering" | "compact";
64
68
  compactDisplay?: "short" | "long";
65
69
  }
@@ -122,6 +126,5 @@ export declare class PluralRules {
122
126
  static relevantExtensionKeys: never[];
123
127
  static polyfilled: boolean;
124
128
  }
125
- //#endregion
126
129
  export {};
127
130
  //# sourceMappingURL=index.d.ts.map
package/index.js CHANGED
@@ -1,66 +1,46 @@
1
1
  import { LookupSupportedLocales, ResolveLocale } from "@formatjs/intl-localematcher";
2
2
  import { Decimal } from "@formatjs/bigdecimal";
3
- //#region node_modules/.aspect_rules_js/@formatjs_generated+cldr.supported-locales@0.0.0/node_modules/@formatjs_generated/cldr.supported-locales/default-content.js
3
+ // node_modules/.aspect_rules_js/@formatjs_generated+cldr.supported-locales@0.0.0/node_modules/@formatjs_generated/cldr.supported-locales/default-content.js
4
4
  const defaultContent = {
5
- "aa": ["aa-ET"],
6
- "ab": ["ab-GE"],
5
+ "ady": ["ady-RU"],
7
6
  "af": ["af-ZA"],
8
7
  "agq": ["agq-CM"],
9
8
  "ak": ["ak-GH"],
10
9
  "am": ["am-ET"],
11
- "an": ["an-ES"],
12
- "ann": ["ann-NG"],
13
- "apc": ["apc-SY"],
14
10
  "ar": ["ar-001"],
15
- "arn": ["arn-CL"],
16
11
  "as": ["as-IN"],
17
12
  "asa": ["asa-TZ"],
18
13
  "ast": ["ast-ES"],
19
- "az-Arab": ["az-Arab-IR"],
20
14
  "az-Cyrl": ["az-Cyrl-AZ"],
21
15
  "az-Latn": ["az-Latn-AZ"],
22
16
  "ba": ["ba-RU"],
23
- "bal-Arab": ["bal-Arab-PK"],
24
17
  "bal-Latn": ["bal-Latn-PK"],
25
18
  "bas": ["bas-CM"],
26
19
  "be": ["be-BY"],
27
20
  "bem": ["bem-ZM"],
28
- "bew": ["bew-ID"],
29
21
  "bez": ["bez-TZ"],
30
22
  "bg": ["bg-BG"],
31
23
  "bgc": ["bgc-IN"],
32
- "bgn": ["bgn-PK"],
33
24
  "bho": ["bho-IN"],
34
25
  "blo": ["blo-BJ"],
35
- "blt": ["blt-VN"],
36
26
  "bm": ["bm-ML"],
37
- "bm-Nkoo": ["bm-Nkoo-ML"],
38
27
  "bn": ["bn-BD"],
39
28
  "bo": ["bo-CN"],
40
- "bqi": ["bqi-IR"],
41
29
  "br": ["br-FR"],
42
30
  "brx": ["brx-IN"],
43
31
  "bs-Cyrl": ["bs-Cyrl-BA"],
44
32
  "bs-Latn": ["bs-Latn-BA"],
45
- "bss": ["bss-CM"],
46
33
  "bua": ["bua-RU"],
47
- "byn": ["byn-ER"],
48
34
  "ca": ["ca-ES"],
49
- "cad": ["cad-US"],
50
- "cch": ["cch-NG"],
51
35
  "ccp": ["ccp-BD"],
52
36
  "ce": ["ce-RU"],
53
37
  "ceb": ["ceb-PH"],
54
38
  "cgg": ["cgg-UG"],
55
- "cho": ["cho-US"],
56
39
  "chr": ["chr-US"],
57
- "cic": ["cic-US"],
58
40
  "ckb": ["ckb-IQ"],
59
- "co": ["co-FR"],
60
41
  "cop": ["cop-EG"],
61
42
  "cs": ["cs-CZ"],
62
43
  "csw": ["csw-CA"],
63
- "cu": ["cu-RU"],
64
44
  "cv": ["cv-RU"],
65
45
  "cy": ["cy-GB"],
66
46
  "da": ["da-DK"],
@@ -70,14 +50,11 @@ const defaultContent = {
70
50
  "doi": ["doi-IN"],
71
51
  "dsb": ["dsb-DE"],
72
52
  "dua": ["dua-CM"],
73
- "dv": ["dv-MV"],
74
53
  "dyo": ["dyo-SN"],
75
54
  "dz": ["dz-BT"],
76
55
  "ebu": ["ebu-KE"],
77
56
  "ee": ["ee-GH"],
78
57
  "el": ["el-GR"],
79
- "en-Dsrt": ["en-Dsrt-US"],
80
- "en-Shaw": ["en-Shaw-GB"],
81
58
  "en": ["en-US"],
82
59
  "eo": ["eo-001"],
83
60
  "es": ["es-ES"],
@@ -91,29 +68,23 @@ const defaultContent = {
91
68
  "fil": ["fil-PH"],
92
69
  "fo": ["fo-FO"],
93
70
  "fr": ["fr-FR"],
94
- "frr": ["frr-DE"],
95
71
  "fur": ["fur-IT"],
96
72
  "fy": ["fy-NL"],
97
73
  "ga": ["ga-IE"],
98
74
  "gaa": ["gaa-GH"],
99
75
  "gd": ["gd-GB"],
100
- "gez": ["gez-ET"],
101
76
  "gl": ["gl-ES"],
102
- "gn": ["gn-PY"],
103
77
  "gsw": ["gsw-CH"],
104
78
  "gu": ["gu-IN"],
105
79
  "guz": ["guz-KE"],
106
80
  "gv": ["gv-IM"],
107
- "ha-Arab": ["ha-Arab-NG"],
108
81
  "ha": ["ha-NG"],
109
82
  "haw": ["haw-US"],
110
83
  "he": ["he-IL"],
111
84
  "hi": ["hi-IN"],
112
85
  "hi-Latn": ["hi-Latn-IN"],
113
- "hnj-Hmnp": ["hnj-Hmnp-US"],
114
86
  "hr": ["hr-HR"],
115
87
  "hsb": ["hsb-DE"],
116
- "ht": ["ht-HT"],
117
88
  "hu": ["hu-HU"],
118
89
  "hy": ["hy-AM"],
119
90
  "ia": ["ia-001"],
@@ -121,27 +92,19 @@ const defaultContent = {
121
92
  "ie": ["ie-EE"],
122
93
  "ig": ["ig-NG"],
123
94
  "ii": ["ii-CN"],
124
- "io": ["io-001"],
125
95
  "is": ["is-IS"],
126
96
  "it": ["it-IT"],
127
- "iu": ["iu-CA"],
128
- "iu-Latn": ["iu-Latn-CA"],
129
97
  "ja": ["ja-JP"],
130
- "jbo": ["jbo-001"],
131
98
  "jgo": ["jgo-CM"],
132
99
  "jmc": ["jmc-TZ"],
133
100
  "jv": ["jv-ID"],
134
101
  "ka": ["ka-GE"],
135
- "kaa-Cyrl": ["kaa-Cyrl-UZ"],
136
- "kaa-Latn": ["kaa-Latn-UZ"],
137
102
  "kab": ["kab-DZ"],
138
- "kaj": ["kaj-NG"],
139
103
  "kam": ["kam-KE"],
140
- "kcg": ["kcg-NG"],
104
+ "kbd": ["kbd-RU"],
141
105
  "kde": ["kde-TZ"],
142
106
  "kea": ["kea-CV"],
143
107
  "kek": ["kek-GT"],
144
- "ken": ["ken-CM"],
145
108
  "kgp": ["kgp-BR"],
146
109
  "khq": ["khq-ML"],
147
110
  "ki": ["ki-KE"],
@@ -155,13 +118,11 @@ const defaultContent = {
155
118
  "ko": ["ko-KR"],
156
119
  "kok-Deva": ["kok-Deva-IN"],
157
120
  "kok-Latn": ["kok-Latn-IN"],
158
- "kpe": ["kpe-LR"],
159
121
  "ks-Arab": ["ks-Arab-IN"],
160
122
  "ks-Deva": ["ks-Deva-IN"],
161
123
  "ksb": ["ksb-TZ"],
162
124
  "ksf": ["ksf-CM"],
163
125
  "ksh": ["ksh-DE"],
164
- "ku-Arab": ["ku-Arab-IQ"],
165
126
  "ku-Latn": ["ku-Latn-TR"],
166
127
  "kw": ["kw-GB"],
167
128
  "kxv-Deva": ["kxv-Deva-IN"],
@@ -169,7 +130,6 @@ const defaultContent = {
169
130
  "kxv-Orya": ["kxv-Orya-IN"],
170
131
  "kxv-Telu": ["kxv-Telu-IN"],
171
132
  "ky": ["ky-KG"],
172
- "la": ["la-VA"],
173
133
  "lag": ["lag-TZ"],
174
134
  "lb": ["lb-LU"],
175
135
  "lg": ["lg-UG"],
@@ -181,39 +141,27 @@ const defaultContent = {
181
141
  "lo": ["lo-LA"],
182
142
  "lrc": ["lrc-IR"],
183
143
  "lt": ["lt-LT"],
184
- "ltg": ["ltg-LV"],
185
144
  "lu": ["lu-CD"],
186
145
  "luo": ["luo-KE"],
187
146
  "luy": ["luy-KE"],
188
147
  "lv": ["lv-LV"],
189
- "lzz": ["lzz-TR"],
190
148
  "mai": ["mai-IN"],
191
149
  "mas": ["mas-KE"],
192
- "mdf": ["mdf-RU"],
193
150
  "mer": ["mer-KE"],
194
151
  "mfe": ["mfe-MU"],
195
152
  "mg": ["mg-MG"],
196
153
  "mgh": ["mgh-MZ"],
197
154
  "mgo": ["mgo-CM"],
198
- "mhn": ["mhn-IT"],
199
155
  "mi": ["mi-NZ"],
200
- "mic": ["mic-CA"],
201
156
  "mk": ["mk-MK"],
202
157
  "ml": ["ml-IN"],
203
158
  "mn": ["mn-MN"],
204
- "mn-Mong": ["mn-Mong-CN"],
205
159
  "mni-Beng": ["mni-Beng-IN"],
206
- "mni-Mtei": ["mni-Mtei-IN"],
207
- "moh": ["moh-CA"],
208
160
  "mr": ["mr-IN"],
209
- "ms-Arab": ["ms-Arab-MY"],
210
161
  "ms": ["ms-MY"],
211
162
  "mt": ["mt-MT"],
212
163
  "mua": ["mua-CM"],
213
- "mus": ["mus-US"],
214
- "mww-Hmnp": ["mww-Hmnp-US"],
215
164
  "my": ["my-MM"],
216
- "myv": ["myv-RU"],
217
165
  "mzn": ["mzn-IR"],
218
166
  "naq": ["naq-NA"],
219
167
  "nb": ["nb-NO"],
@@ -225,24 +173,16 @@ const defaultContent = {
225
173
  "nn": ["nn-NO"],
226
174
  "nnh": ["nnh-CM"],
227
175
  "nqo": ["nqo-GN"],
228
- "nr": ["nr-ZA"],
229
176
  "nso": ["nso-ZA"],
230
177
  "nus": ["nus-SS"],
231
- "nv": ["nv-US"],
232
- "ny": ["ny-MW"],
233
178
  "nyn": ["nyn-UG"],
234
179
  "oc": ["oc-FR"],
235
- "oka": ["oka-CA"],
236
180
  "om": ["om-ET"],
237
181
  "or": ["or-IN"],
238
182
  "os": ["os-GE"],
239
- "osa": ["osa-US"],
240
183
  "pa-Arab": ["pa-Arab-PK"],
241
184
  "pa-Guru": ["pa-Guru-IN"],
242
- "pap": ["pap-CW"],
243
185
  "pcm": ["pcm-NG"],
244
- "pi-Latn": ["pi-Latn-GB"],
245
- "pis": ["pis-SB"],
246
186
  "pl": ["pl-PL"],
247
187
  "pms": ["pms-IT"],
248
188
  "prg": ["prg-PL"],
@@ -251,8 +191,6 @@ const defaultContent = {
251
191
  "qu": ["qu-PE"],
252
192
  "quc": ["quc-GT"],
253
193
  "raj": ["raj-IN"],
254
- "rhg-Rohg": ["rhg-Rohg-MM"],
255
- "rif": ["rif-MA"],
256
194
  "rm": ["rm-CH"],
257
195
  "rn": ["rn-BI"],
258
196
  "ro": ["ro-RO"],
@@ -263,41 +201,30 @@ const defaultContent = {
263
201
  "sa": ["sa-IN"],
264
202
  "sah": ["sah-RU"],
265
203
  "saq": ["saq-KE"],
266
- "sat-Deva": ["sat-Deva-IN"],
267
204
  "sat-Olck": ["sat-Olck-IN"],
268
205
  "sbp": ["sbp-TZ"],
269
206
  "sc": ["sc-IT"],
270
207
  "scn": ["scn-IT"],
271
208
  "sd-Arab": ["sd-Arab-PK"],
272
209
  "sd-Deva": ["sd-Deva-IN"],
273
- "sdh": ["sdh-IR"],
274
210
  "se": ["se-NO"],
275
211
  "seh": ["seh-MZ"],
276
212
  "ses": ["ses-ML"],
277
213
  "sg": ["sg-CF"],
278
- "sgs": ["sgs-LT"],
279
214
  "shi-Latn": ["shi-Latn-MA"],
280
215
  "shi-Tfng": ["shi-Tfng-MA"],
281
216
  "shn": ["shn-MM"],
282
217
  "si": ["si-LK"],
283
- "sid": ["sid-ET"],
284
218
  "sk": ["sk-SK"],
285
- "skr": ["skr-PK"],
286
219
  "sl": ["sl-SI"],
287
- "sma": ["sma-SE"],
288
- "smj": ["smj-SE"],
289
220
  "smn": ["smn-FI"],
290
- "sms": ["sms-FI"],
291
221
  "sn": ["sn-ZW"],
292
222
  "so": ["so-SO"],
293
223
  "sq": ["sq-AL"],
294
224
  "sr-Cyrl": ["sr-Cyrl-RS"],
295
225
  "sr-Latn": ["sr-Latn-RS"],
296
- "ss": ["ss-ZA"],
297
- "ssy": ["ssy-ER"],
298
226
  "st": ["st-ZA"],
299
227
  "su-Latn": ["su-Latn-ID"],
300
- "suz-Deva": ["suz-Deva-NP"],
301
228
  "suz-Sunu": ["suz-Sunu-NP"],
302
229
  "sv": ["sv-SE"],
303
230
  "sw": ["sw-TZ"],
@@ -309,16 +236,11 @@ const defaultContent = {
309
236
  "tg": ["tg-TJ"],
310
237
  "th": ["th-TH"],
311
238
  "ti": ["ti-ET"],
312
- "tig": ["tig-ER"],
313
239
  "tk": ["tk-TM"],
314
240
  "tn": ["tn-ZA"],
315
241
  "to": ["to-TO"],
316
242
  "tok": ["tok-001"],
317
- "tpi": ["tpi-PG"],
318
243
  "tr": ["tr-TR"],
319
- "trv": ["trv-TW"],
320
- "trw": ["trw-PK"],
321
- "ts": ["ts-ZA"],
322
244
  "tt": ["tt-RU"],
323
245
  "twq": ["twq-NE"],
324
246
  "tyv": ["tyv-RU"],
@@ -331,16 +253,11 @@ const defaultContent = {
331
253
  "uz-Latn": ["uz-Latn-UZ"],
332
254
  "vai-Latn": ["vai-Latn-LR"],
333
255
  "vai-Vaii": ["vai-Vaii-LR"],
334
- "ve": ["ve-ZA"],
335
256
  "vec": ["vec-IT"],
336
257
  "vi": ["vi-VN"],
337
258
  "vmw": ["vmw-MZ"],
338
- "vo": ["vo-001"],
339
259
  "vun": ["vun-TZ"],
340
- "wa": ["wa-BE"],
341
260
  "wae": ["wae-CH"],
342
- "wal": ["wal-ET"],
343
- "wbp": ["wbp-AU"],
344
261
  "wo": ["wo-SN"],
345
262
  "xh": ["xh-ZA"],
346
263
  "xnr": ["xnr-IN"],
@@ -355,11 +272,9 @@ const defaultContent = {
355
272
  "zgh": ["zgh-MA"],
356
273
  "zh-Hans": ["zh-Hans-CN"],
357
274
  "zh-Hant": ["zh-Hant-TW"],
358
- "zh-Latn": ["zh-Latn-CN"],
359
275
  "zu": ["zu-ZA"]
360
276
  };
361
- //#endregion
362
- //#region packages/ecma402-abstract/registerLocaleData.js
277
+ // packages/ecma402-abstract/registerLocaleData.js
363
278
  const explicitLocales = /* @__PURE__ */ new WeakMap();
364
279
  function registerLocaleData(locale, data, localeData, availableLocales) {
365
280
  let loaded = explicitLocales.get(localeData);
@@ -387,8 +302,7 @@ function registerLocaleData(locale, data, localeData, availableLocales) {
387
302
  }
388
303
  }
389
304
  }
390
- //#endregion
391
- //#region packages/ecma402-abstract/CanonicalizeLocaleList.js
305
+ // packages/ecma402-abstract/CanonicalizeLocaleList.js
392
306
  /**
393
307
  * http://ecma-international.org/ecma-402/7.0/index.html#sec-canonicalizelocalelist
394
308
  * @param locales
@@ -396,8 +310,7 @@ function registerLocaleData(locale, data, localeData, availableLocales) {
396
310
  function CanonicalizeLocaleList(locales) {
397
311
  return Intl.getCanonicalLocales(locales);
398
312
  }
399
- //#endregion
400
- //#region packages/ecma262-abstract/ToObject.js
313
+ // packages/ecma262-abstract/ToObject.js
401
314
  /**
402
315
  * https://tc39.es/ecma262/#sec-toobject
403
316
  */
@@ -405,8 +318,7 @@ function ToObject(arg) {
405
318
  if (arg == null) throw new TypeError("undefined/null cannot be converted to object");
406
319
  return Object(arg);
407
320
  }
408
- //#endregion
409
- //#region packages/ecma262-abstract/ToString.js
321
+ // packages/ecma262-abstract/ToString.js
410
322
  /**
411
323
  * https://tc39.es/ecma262/#sec-tostring
412
324
  */
@@ -414,8 +326,7 @@ function ToString(o) {
414
326
  if (typeof o === "symbol") throw TypeError("Cannot convert a Symbol value to a string");
415
327
  return String(o);
416
328
  }
417
- //#endregion
418
- //#region packages/ecma402-abstract/GetOption.js
329
+ // packages/ecma402-abstract/GetOption.js
419
330
  /**
420
331
  * https://tc39.es/ecma402/#sec-getoption
421
332
  * @param opts
@@ -436,8 +347,7 @@ function GetOption(opts, prop, type, values, fallback) {
436
347
  }
437
348
  return fallback;
438
349
  }
439
- //#endregion
440
- //#region packages/ecma402-abstract/SupportedLocales.js
350
+ // packages/ecma402-abstract/SupportedLocales.js
441
351
  /**
442
352
  * https://tc39.es/ecma402/#sec-supportedlocales
443
353
  * @param availableLocales
@@ -453,8 +363,7 @@ function SupportedLocales(availableLocales, requestedLocales, options) {
453
363
  if (matcher === "best fit") return LookupSupportedLocales(Array.from(availableLocales), requestedLocales);
454
364
  return LookupSupportedLocales(Array.from(availableLocales), requestedLocales);
455
365
  }
456
- //#endregion
457
- //#region packages/ecma262-abstract/ToPrimitive.js
366
+ // packages/ecma262-abstract/ToPrimitive.js
458
367
  function invariant$1(condition, message, Err = Error) {
459
368
  if (!condition) throw new Err(message);
460
369
  }
@@ -497,8 +406,7 @@ function ToPrimitive(input, preferredType) {
497
406
  }
498
407
  return input;
499
408
  }
500
- //#endregion
501
- //#region packages/ecma402-abstract/ToIntlMathematicalValue.js
409
+ // packages/ecma402-abstract/ToIntlMathematicalValue.js
502
410
  /**
503
411
  * https://tc39.es/ecma402/#sec-tointlmathematicalvalue
504
412
  * Converts input to a mathematical value, supporting BigInt
@@ -507,6 +415,13 @@ function ToIntlMathematicalValue(input) {
507
415
  if (typeof input === "bigint") return new Decimal(input.toString());
508
416
  let primValue = ToPrimitive(input, "number");
509
417
  if (typeof primValue === "symbol") throw new TypeError("Cannot convert a Symbol value to a number");
418
+ if (typeof primValue === "string") {
419
+ const rounded = +primValue;
420
+ if (rounded !== rounded || rounded === Infinity || rounded === -Infinity || rounded === 0) return new Decimal(rounded);
421
+ const text = primValue.trim();
422
+ if (/^0[xob]/i.test(text)) return new Decimal(BigInt(text));
423
+ primValue = text;
424
+ }
510
425
  if (primValue === void 0) return new Decimal(NaN);
511
426
  if (primValue === true) return new Decimal(1);
512
427
  if (primValue === false) return new Decimal(0);
@@ -517,8 +432,7 @@ function ToIntlMathematicalValue(input) {
517
432
  return new Decimal(NaN);
518
433
  }
519
434
  }
520
- //#endregion
521
- //#region packages/ecma402-abstract/CoerceOptionsToObject.js
435
+ // packages/ecma402-abstract/CoerceOptionsToObject.js
522
436
  /**
523
437
  * https://tc39.es/ecma402/#sec-coerceoptionstoobject
524
438
  * @param options
@@ -528,8 +442,7 @@ function CoerceOptionsToObject(options) {
528
442
  if (typeof options === "undefined") return Object.create(null);
529
443
  return ToObject(options);
530
444
  }
531
- //#endregion
532
- //#region packages/ecma402-abstract/DefaultNumberOption.js
445
+ // packages/ecma402-abstract/DefaultNumberOption.js
533
446
  /**
534
447
  * ECMA-402 §9.2.13 DefaultNumberOption, step 2.
535
448
  * https://tc39.es/ecma402/#sec-defaultnumberoption
@@ -545,8 +458,7 @@ function DefaultNumberOption(inputVal, min, max, fallback) {
545
458
  if (isNaN(val) || val < min || val > max) throw new RangeError(`${val} is outside of range [${min}, ${max}]`);
546
459
  return Math.floor(val);
547
460
  }
548
- //#endregion
549
- //#region packages/ecma402-abstract/GetNumberOption.js
461
+ // packages/ecma402-abstract/GetNumberOption.js
550
462
  /**
551
463
  * https://tc39.es/ecma402/#sec-getnumberoption
552
464
  * @param options
@@ -559,8 +471,7 @@ function GetNumberOption(options, property, minimum, maximum, fallback) {
559
471
  const val = options[property];
560
472
  return DefaultNumberOption(val, minimum, maximum, fallback);
561
473
  }
562
- //#endregion
563
- //#region node_modules/.aspect_rules_js/@formatjs+fast-memoize@0.0.0/node_modules/@formatjs/fast-memoize/index.js
474
+ // node_modules/.aspect_rules_js/@formatjs+fast-memoize@0.0.0/node_modules/@formatjs/fast-memoize/index.js
564
475
  function memoize(fn, options) {
565
476
  const cache = options && options.cache ? options.cache : cacheDefault;
566
477
  const serializer = options && options.serializer ? options.serializer : serializerDefault;
@@ -625,8 +536,7 @@ const strategies = {
625
536
  variadic: strategyVariadic,
626
537
  monadic: strategyMonadic
627
538
  };
628
- //#endregion
629
- //#region packages/ecma402-abstract/utils.js
539
+ // packages/ecma402-abstract/utils.js
630
540
  function repeat(s, times) {
631
541
  if (typeof s.repeat === "function") return s.repeat(times);
632
542
  const arr = Array.from({ length: times });
@@ -639,8 +549,7 @@ function invariant(condition, message, Err = Error) {
639
549
  memoize((...args) => new Intl.NumberFormat(...args), { strategy: strategies.variadic });
640
550
  memoize((...args) => new Intl.PluralRules(...args), { strategy: strategies.variadic });
641
551
  memoize((...args) => new Intl.ListFormat(...args), { strategy: strategies.variadic });
642
- //#endregion
643
- //#region packages/ecma402-abstract/NumberFormat/SetNumberFormatDigitOptions.js
552
+ // packages/ecma402-abstract/NumberFormat/SetNumberFormatDigitOptions.js
644
553
  const VALID_ROUNDING_INCREMENTS = /* @__PURE__ */ new Set([
645
554
  1,
646
555
  2,
@@ -750,8 +659,7 @@ Valid values are ${Array.from(VALID_ROUNDING_INCREMENTS).join(", ")}.`, RangeErr
750
659
  invariant(internalSlots.maximumFractionDigits === internalSlots.minimumFractionDigits, "With roundingIncrement > 1, maximumFractionDigits and minimumFractionDigits must be equal.", RangeError);
751
660
  }
752
661
  }
753
- //#endregion
754
- //#region packages/ecma402-abstract/PluralRules/InitializePluralRules.js
662
+ // packages/ecma402-abstract/PluralRules/InitializePluralRules.js
755
663
  function InitializePluralRules(pl, locales, options, { availableLocales, relevantExtensionKeys, localeData, getDefaultLocale, getInternalSlots }) {
756
664
  const requestedLocales = CanonicalizeLocaleList(locales);
757
665
  const opt = Object.create(null);
@@ -777,8 +685,7 @@ function InitializePluralRules(pl, locales, options, { availableLocales, relevan
777
685
  SetNumberFormatDigitOptions(internalSlots, opts, 0, 3, notation);
778
686
  return pl;
779
687
  }
780
- //#endregion
781
- //#region packages/ecma262-abstract/Type.js
688
+ // packages/ecma262-abstract/Type.js
782
689
  /**
783
690
  * https://www.ecma-international.org/ecma-262/11.0/index.html#sec-type
784
691
  */
@@ -792,12 +699,10 @@ function Type(x) {
792
699
  if (typeof x === "symbol") return "Symbol";
793
700
  if (typeof x === "bigint") return "BigInt";
794
701
  }
795
- //#endregion
796
- //#region packages/ecma402-abstract/constants.js
702
+ // packages/ecma402-abstract/constants.js
797
703
  const ZERO = new Decimal(0);
798
704
  const NEGATIVE_ZERO = new Decimal(-0);
799
- //#endregion
800
- //#region packages/ecma402-abstract/NumberFormat/GetUnsignedRoundingMode.js
705
+ // packages/ecma402-abstract/NumberFormat/GetUnsignedRoundingMode.js
801
706
  const negativeMapping = {
802
707
  ceil: "zero",
803
708
  floor: "infinity",
@@ -824,8 +729,7 @@ function GetUnsignedRoundingMode(roundingMode, isNegative) {
824
729
  if (isNegative) return negativeMapping[roundingMode];
825
730
  return positiveMapping[roundingMode];
826
731
  }
827
- //#endregion
828
- //#region packages/ecma402-abstract/NumberFormat/ApplyUnsignedRoundingMode.js
732
+ // packages/ecma402-abstract/NumberFormat/ApplyUnsignedRoundingMode.js
829
733
  function ApplyUnsignedRoundingMode(x, r1, r2, unsignedRoundingMode) {
830
734
  if (x.eq(r1) || r1.eq(r2)) return r1;
831
735
  if (x.eq(r2)) return r2;
@@ -843,8 +747,7 @@ function ApplyUnsignedRoundingMode(x, r1, r2, unsignedRoundingMode) {
843
747
  if (r1.div(r2.minus(r1)).mod(2).isZero()) return r1;
844
748
  return r2;
845
749
  }
846
- //#endregion
847
- //#region packages/ecma402-abstract/NumberFormat/decimal-cache.js
750
+ // packages/ecma402-abstract/NumberFormat/decimal-cache.js
848
751
  /**
849
752
  * Cached function to compute powers of 10 for Decimal.js operations.
850
753
  * This cache significantly reduces overhead in ComputeExponent and ToRawFixed
@@ -858,8 +761,7 @@ function ApplyUnsignedRoundingMode(x, r1, r2, unsignedRoundingMode) {
858
761
  const getPowerOf10 = memoize((exponent) => {
859
762
  return Decimal.pow(10, exponent);
860
763
  });
861
- //#endregion
862
- //#region packages/ecma402-abstract/NumberFormat/ToRawFixed.js
764
+ // packages/ecma402-abstract/NumberFormat/ToRawFixed.js
863
765
  function ToRawFixedFn(n, f) {
864
766
  return n.times(getPowerOf10(-f));
865
767
  }
@@ -924,8 +826,7 @@ function ToRawFixed(x, minFraction, maxFraction, roundingIncrement, unsignedRoun
924
826
  roundingMagnitude: -f
925
827
  };
926
828
  }
927
- //#endregion
928
- //#region packages/ecma402-abstract/NumberFormat/ToRawPrecision.js
829
+ // packages/ecma402-abstract/NumberFormat/ToRawPrecision.js
929
830
  function findN1E1R1(x, p) {
930
831
  const maxN1 = getPowerOf10(p);
931
832
  const minN1 = getPowerOf10(p - 1);
@@ -1060,8 +961,7 @@ function ToRawPrecision(x, minPrecision, maxPrecision, unsignedRoundingMode) {
1060
961
  roundingMagnitude: e - p + 1
1061
962
  };
1062
963
  }
1063
- //#endregion
1064
- //#region packages/ecma402-abstract/NumberFormat/FormatNumericToString.js
964
+ // packages/ecma402-abstract/NumberFormat/FormatNumericToString.js
1065
965
  /**
1066
966
  * https://tc39.es/ecma402/#sec-formatnumberstring
1067
967
  */
@@ -1117,8 +1017,7 @@ function FormatNumericToString(intlObject, _x) {
1117
1017
  formattedString: string
1118
1018
  };
1119
1019
  }
1120
- //#endregion
1121
- //#region packages/ecma402-abstract/PluralRules/ResolvePlural.js
1020
+ // packages/ecma402-abstract/PluralRules/ResolvePlural.js
1122
1021
  /**
1123
1022
  * ResolvePluralInternal ( pluralRules, n )
1124
1023
  *
@@ -1177,8 +1076,7 @@ function ResolvePlural(pl, n, { getInternalSlots, PluralRuleSelect }) {
1177
1076
  PluralRuleSelect
1178
1077
  }).pluralCategory;
1179
1078
  }
1180
- //#endregion
1181
- //#region packages/ecma402-abstract/PluralRules/ResolvePluralRange.js
1079
+ // packages/ecma402-abstract/PluralRules/ResolvePluralRange.js
1182
1080
  /**
1183
1081
  * ResolvePluralRange ( pluralRules, x, y )
1184
1082
  *
@@ -1213,8 +1111,7 @@ function ResolvePluralRange(pluralRules, x, y, { getInternalSlots, PluralRuleSel
1213
1111
  const { locale, type } = internalSlots;
1214
1112
  return PluralRuleSelectRange(locale, type, xp.pluralCategory, yp.pluralCategory);
1215
1113
  }
1216
- //#endregion
1217
- //#region packages/intl-pluralrules/get_internal_slots.ts
1114
+ // packages/intl-pluralrules/get_internal_slots.ts
1218
1115
  const internalSlotMap = /* @__PURE__ */ new WeakMap();
1219
1116
  function getInternalSlots(x) {
1220
1117
  let internalSlots = internalSlotMap.get(x);
@@ -1224,8 +1121,7 @@ function getInternalSlots(x) {
1224
1121
  }
1225
1122
  return internalSlots;
1226
1123
  }
1227
- //#endregion
1228
- //#region packages/intl-pluralrules/index.ts
1124
+ // packages/intl-pluralrules/index.ts
1229
1125
  function validateInstance(instance, method) {
1230
1126
  if (!(instance instanceof PluralRules)) throw new TypeError(`Method Intl.PluralRules.prototype.${method} called on incompatible receiver ${String(instance)}`);
1231
1127
  }
@@ -1368,7 +1264,8 @@ var PluralRules = class PluralRules {
1368
1264
  return SupportedLocales(PluralRules.availableLocales, CanonicalizeLocaleList(locales), options);
1369
1265
  }
1370
1266
  static __addLocaleData(...data) {
1371
- for (const { data: d, locale } of data) {
1267
+ for (const { data: d, locale: tag } of data) {
1268
+ const [locale] = CanonicalizeLocaleList(tag);
1372
1269
  registerLocaleData(locale, d, PluralRules.localeData, PluralRules.availableLocales);
1373
1270
  if (!PluralRules.__defaultLocale) PluralRules.__defaultLocale = locale;
1374
1271
  }
@@ -1426,7 +1323,6 @@ try {
1426
1323
  configurable: true
1427
1324
  });
1428
1325
  } catch {}
1429
- //#endregion
1430
1326
  export { PluralRules };
1431
1327
 
1432
1328
  //# sourceMappingURL=index.js.map