@formatjs/intl-supportedvaluesof 2.3.0 → 2.3.2
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/index.d.ts +60 -8
- package/index.js +1148 -2
- package/index.js.map +1 -0
- package/package.json +2 -3
- package/polyfill-force.d.ts +1 -1
- package/polyfill-force.js +1144 -1
- package/polyfill-force.js.map +1 -0
- package/polyfill.d.ts +1 -1
- package/polyfill.iife.js +289 -4361
- package/polyfill.js +1154 -9
- package/polyfill.js.map +1 -0
- package/should-polyfill.d.ts +5 -1
- package/should-polyfill.js +6 -1
- package/should-polyfill.js.map +1 -0
- package/src/calendars.generated.d.ts +0 -2
- package/src/calendars.generated.js +0 -23
- package/src/collations.generated.d.ts +0 -2
- package/src/collations.generated.js +0 -23
- package/src/currencies.generated.d.ts +0 -2
- package/src/currencies.generated.js +0 -311
- package/src/get-supported-calendars.d.ts +0 -8
- package/src/get-supported-calendars.js +0 -27
- package/src/get-supported-collations.d.ts +0 -8
- package/src/get-supported-collations.js +0 -23
- package/src/get-supported-currencies.d.ts +0 -8
- package/src/get-supported-currencies.js +0 -50
- package/src/get-supported-numbering-systems.d.ts +0 -7
- package/src/get-supported-numbering-systems.js +0 -28
- package/src/get-supported-timezones.d.ts +0 -8
- package/src/get-supported-timezones.js +0 -25
- package/src/get-supported-units.d.ts +0 -7
- package/src/get-supported-units.js +0 -28
- package/src/index.d.ts +0 -33
- package/src/index.js +0 -34
- package/src/memoize.d.ts +0 -9
- package/src/memoize.js +0 -10
- package/src/numbering-systems.generated.d.ts +0 -1
- package/src/numbering-systems.generated.js +0 -99
- package/src/timezones.generated.d.ts +0 -2
- package/src/timezones.generated.js +0 -431
- package/src/units.generated.d.ts +0 -2
- package/src/units.generated.js +0 -47
package/polyfill.js
CHANGED
|
@@ -1,10 +1,1155 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
value: supportedValuesOf,
|
|
6
|
-
enumerable: true,
|
|
7
|
-
writable: false,
|
|
8
|
-
configurable: false
|
|
9
|
-
});
|
|
1
|
+
import { memoize, strategies } from "@formatjs/fast-memoize";
|
|
2
|
+
//#region packages/intl-supportedvaluesof/should-polyfill.ts
|
|
3
|
+
function shouldPolyfill() {
|
|
4
|
+
return !("supportedValuesOf" in Intl);
|
|
10
5
|
}
|
|
6
|
+
//#endregion
|
|
7
|
+
//#region packages/intl-supportedvaluesof/memoize.ts
|
|
8
|
+
/**
|
|
9
|
+
* Implementation: Memoized factory for Intl.DateTimeFormat instances
|
|
10
|
+
*
|
|
11
|
+
* Creates and caches DateTimeFormat instances to avoid repeated instantiation overhead.
|
|
12
|
+
* This is critical for performance since we test many candidate values against formatters.
|
|
13
|
+
*
|
|
14
|
+
* Uses variadic memoization strategy to handle varying numbers of constructor arguments.
|
|
15
|
+
*/
|
|
16
|
+
const createMemoizedDateTimeFormat = memoize((...args) => new Intl.DateTimeFormat(...args), { strategy: strategies.variadic });
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region node_modules/.aspect_rules_js/@formatjs_generated+cldr.supported-values@0.0.0/node_modules/@formatjs_generated/cldr.supported-values/calendars.js
|
|
19
|
+
const calendars = [
|
|
20
|
+
"buddhist",
|
|
21
|
+
"chinese",
|
|
22
|
+
"coptic",
|
|
23
|
+
"dangi",
|
|
24
|
+
"ethioaa",
|
|
25
|
+
"ethiopic",
|
|
26
|
+
"gregory",
|
|
27
|
+
"hebrew",
|
|
28
|
+
"indian",
|
|
29
|
+
"islamic",
|
|
30
|
+
"islamic-civil",
|
|
31
|
+
"islamic-rgsa",
|
|
32
|
+
"islamic-tbla",
|
|
33
|
+
"islamic-umalqura",
|
|
34
|
+
"islamicc",
|
|
35
|
+
"iso8601",
|
|
36
|
+
"japanese",
|
|
37
|
+
"persian",
|
|
38
|
+
"roc"
|
|
39
|
+
];
|
|
40
|
+
//#endregion
|
|
41
|
+
//#region packages/intl-supportedvaluesof/get-supported-calendars.ts
|
|
42
|
+
/**
|
|
43
|
+
* Implementation: Tests if a calendar is supported by attempting to create
|
|
44
|
+
* a DateTimeFormat with that calendar and verifying it was accepted.
|
|
45
|
+
*
|
|
46
|
+
* CLDR Data: Candidate values come from CLDR calendar types
|
|
47
|
+
*/
|
|
48
|
+
function isSupportedCalendar(item) {
|
|
49
|
+
try {
|
|
50
|
+
return createMemoizedDateTimeFormat(`en-u-ca-${item}`).resolvedOptions().calendar === item;
|
|
51
|
+
} catch {}
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* ECMA-402 Spec: Returns supported calendar identifiers
|
|
56
|
+
* ECMA-402 Spec: Results must be sorted lexicographically
|
|
57
|
+
*
|
|
58
|
+
* Implementation: Filters CLDR list against actual runtime support
|
|
59
|
+
*/
|
|
60
|
+
function getSupportedCalendars() {
|
|
61
|
+
return calendars.filter(isSupportedCalendar).sort();
|
|
62
|
+
}
|
|
63
|
+
//#endregion
|
|
64
|
+
//#region node_modules/.aspect_rules_js/@formatjs_generated+cldr.supported-values@0.0.0/node_modules/@formatjs_generated/cldr.supported-values/collations.js
|
|
65
|
+
const collations = [
|
|
66
|
+
"big5han",
|
|
67
|
+
"compat",
|
|
68
|
+
"dict",
|
|
69
|
+
"direct",
|
|
70
|
+
"ducet",
|
|
71
|
+
"emoji",
|
|
72
|
+
"eor",
|
|
73
|
+
"gb2312",
|
|
74
|
+
"phonebk",
|
|
75
|
+
"phonetic",
|
|
76
|
+
"pinyin",
|
|
77
|
+
"reformed",
|
|
78
|
+
"search",
|
|
79
|
+
"searchjl",
|
|
80
|
+
"standard",
|
|
81
|
+
"stroke",
|
|
82
|
+
"trad",
|
|
83
|
+
"unihan",
|
|
84
|
+
"zhuyin"
|
|
85
|
+
];
|
|
86
|
+
//#endregion
|
|
87
|
+
//#region packages/intl-supportedvaluesof/get-supported-collations.ts
|
|
88
|
+
/**
|
|
89
|
+
* Implementation: Tests if a collation is supported by attempting to create
|
|
90
|
+
* a Collator with that collation and verifying it was accepted.
|
|
91
|
+
*
|
|
92
|
+
* CLDR Data: Candidate values come from CLDR collation types
|
|
93
|
+
*/
|
|
94
|
+
function isSupportedCollation(collation) {
|
|
95
|
+
try {
|
|
96
|
+
return Intl.Collator(`en-u-co-${collation}`).resolvedOptions().collation === collation;
|
|
97
|
+
} catch {}
|
|
98
|
+
return false;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* ECMA-402 Spec: Returns supported collation identifiers
|
|
102
|
+
* ECMA-402 Spec: Results must be sorted lexicographically
|
|
103
|
+
*
|
|
104
|
+
* Implementation: Filters CLDR list against actual runtime support
|
|
105
|
+
*/
|
|
106
|
+
function getSupportedCollations() {
|
|
107
|
+
return collations.filter(isSupportedCollation).sort();
|
|
108
|
+
}
|
|
109
|
+
//#endregion
|
|
110
|
+
//#region packages/ecma402-abstract/utils.js
|
|
111
|
+
const createMemoizedNumberFormat = memoize((...args) => new Intl.NumberFormat(...args), { strategy: strategies.variadic });
|
|
112
|
+
memoize((...args) => new Intl.PluralRules(...args), { strategy: strategies.variadic });
|
|
113
|
+
memoize((...args) => new Intl.Locale(...args), { strategy: strategies.variadic });
|
|
114
|
+
memoize((...args) => new Intl.ListFormat(...args), { strategy: strategies.variadic });
|
|
115
|
+
//#endregion
|
|
116
|
+
//#region node_modules/.aspect_rules_js/@formatjs_generated+cldr.supported-values@0.0.0/node_modules/@formatjs_generated/cldr.supported-values/currencies.js
|
|
117
|
+
const currencies = [
|
|
118
|
+
"ADP",
|
|
119
|
+
"AED",
|
|
120
|
+
"AFA",
|
|
121
|
+
"AFN",
|
|
122
|
+
"ALK",
|
|
123
|
+
"ALL",
|
|
124
|
+
"AMD",
|
|
125
|
+
"ANG",
|
|
126
|
+
"AOA",
|
|
127
|
+
"AOK",
|
|
128
|
+
"AON",
|
|
129
|
+
"AOR",
|
|
130
|
+
"ARA",
|
|
131
|
+
"ARL",
|
|
132
|
+
"ARM",
|
|
133
|
+
"ARP",
|
|
134
|
+
"ARS",
|
|
135
|
+
"ATS",
|
|
136
|
+
"AUD",
|
|
137
|
+
"AWG",
|
|
138
|
+
"AZM",
|
|
139
|
+
"AZN",
|
|
140
|
+
"BAD",
|
|
141
|
+
"BAM",
|
|
142
|
+
"BAN",
|
|
143
|
+
"BBD",
|
|
144
|
+
"BDT",
|
|
145
|
+
"BEC",
|
|
146
|
+
"BEF",
|
|
147
|
+
"BEL",
|
|
148
|
+
"BGL",
|
|
149
|
+
"BGM",
|
|
150
|
+
"BGN",
|
|
151
|
+
"BGO",
|
|
152
|
+
"BHD",
|
|
153
|
+
"BIF",
|
|
154
|
+
"BMD",
|
|
155
|
+
"BND",
|
|
156
|
+
"BOB",
|
|
157
|
+
"BOL",
|
|
158
|
+
"BOP",
|
|
159
|
+
"BOV",
|
|
160
|
+
"BRB",
|
|
161
|
+
"BRC",
|
|
162
|
+
"BRE",
|
|
163
|
+
"BRL",
|
|
164
|
+
"BRN",
|
|
165
|
+
"BRR",
|
|
166
|
+
"BRZ",
|
|
167
|
+
"BSD",
|
|
168
|
+
"BTN",
|
|
169
|
+
"BUK",
|
|
170
|
+
"BWP",
|
|
171
|
+
"BYB",
|
|
172
|
+
"BYN",
|
|
173
|
+
"BYR",
|
|
174
|
+
"BZD",
|
|
175
|
+
"CAD",
|
|
176
|
+
"CDF",
|
|
177
|
+
"CHE",
|
|
178
|
+
"CHF",
|
|
179
|
+
"CHW",
|
|
180
|
+
"CLE",
|
|
181
|
+
"CLF",
|
|
182
|
+
"CLP",
|
|
183
|
+
"CNH",
|
|
184
|
+
"CNX",
|
|
185
|
+
"CNY",
|
|
186
|
+
"COP",
|
|
187
|
+
"COU",
|
|
188
|
+
"CRC",
|
|
189
|
+
"CSD",
|
|
190
|
+
"CSK",
|
|
191
|
+
"CUC",
|
|
192
|
+
"CUP",
|
|
193
|
+
"CVE",
|
|
194
|
+
"CYP",
|
|
195
|
+
"CZK",
|
|
196
|
+
"DDM",
|
|
197
|
+
"DEM",
|
|
198
|
+
"DJF",
|
|
199
|
+
"DKK",
|
|
200
|
+
"DOP",
|
|
201
|
+
"DZD",
|
|
202
|
+
"ECS",
|
|
203
|
+
"ECV",
|
|
204
|
+
"EEK",
|
|
205
|
+
"EGP",
|
|
206
|
+
"ERN",
|
|
207
|
+
"ESA",
|
|
208
|
+
"ESB",
|
|
209
|
+
"ESP",
|
|
210
|
+
"ETB",
|
|
211
|
+
"EUR",
|
|
212
|
+
"FIM",
|
|
213
|
+
"FJD",
|
|
214
|
+
"FKP",
|
|
215
|
+
"FRF",
|
|
216
|
+
"GBP",
|
|
217
|
+
"GEK",
|
|
218
|
+
"GEL",
|
|
219
|
+
"GHC",
|
|
220
|
+
"GHS",
|
|
221
|
+
"GIP",
|
|
222
|
+
"GMD",
|
|
223
|
+
"GNF",
|
|
224
|
+
"GNS",
|
|
225
|
+
"GQE",
|
|
226
|
+
"GRD",
|
|
227
|
+
"GTQ",
|
|
228
|
+
"GWE",
|
|
229
|
+
"GWP",
|
|
230
|
+
"GYD",
|
|
231
|
+
"HKD",
|
|
232
|
+
"HNL",
|
|
233
|
+
"HRD",
|
|
234
|
+
"HRK",
|
|
235
|
+
"HTG",
|
|
236
|
+
"HUF",
|
|
237
|
+
"IDR",
|
|
238
|
+
"IEP",
|
|
239
|
+
"ILP",
|
|
240
|
+
"ILR",
|
|
241
|
+
"ILS",
|
|
242
|
+
"INR",
|
|
243
|
+
"IQD",
|
|
244
|
+
"IRR",
|
|
245
|
+
"ISJ",
|
|
246
|
+
"ISK",
|
|
247
|
+
"ITL",
|
|
248
|
+
"JMD",
|
|
249
|
+
"JOD",
|
|
250
|
+
"JPY",
|
|
251
|
+
"KES",
|
|
252
|
+
"KGS",
|
|
253
|
+
"KHR",
|
|
254
|
+
"KMF",
|
|
255
|
+
"KPW",
|
|
256
|
+
"KRH",
|
|
257
|
+
"KRO",
|
|
258
|
+
"KRW",
|
|
259
|
+
"KWD",
|
|
260
|
+
"KYD",
|
|
261
|
+
"KZT",
|
|
262
|
+
"LAK",
|
|
263
|
+
"LBP",
|
|
264
|
+
"LKR",
|
|
265
|
+
"LRD",
|
|
266
|
+
"LSL",
|
|
267
|
+
"LTL",
|
|
268
|
+
"LTT",
|
|
269
|
+
"LUC",
|
|
270
|
+
"LUF",
|
|
271
|
+
"LUL",
|
|
272
|
+
"LVL",
|
|
273
|
+
"LVR",
|
|
274
|
+
"LYD",
|
|
275
|
+
"MAD",
|
|
276
|
+
"MAF",
|
|
277
|
+
"MCF",
|
|
278
|
+
"MDC",
|
|
279
|
+
"MDL",
|
|
280
|
+
"MGA",
|
|
281
|
+
"MGF",
|
|
282
|
+
"MKD",
|
|
283
|
+
"MKN",
|
|
284
|
+
"MLF",
|
|
285
|
+
"MMK",
|
|
286
|
+
"MNT",
|
|
287
|
+
"MOP",
|
|
288
|
+
"MRO",
|
|
289
|
+
"MRU",
|
|
290
|
+
"MTL",
|
|
291
|
+
"MTP",
|
|
292
|
+
"MUR",
|
|
293
|
+
"MVP",
|
|
294
|
+
"MVR",
|
|
295
|
+
"MWK",
|
|
296
|
+
"MXN",
|
|
297
|
+
"MXP",
|
|
298
|
+
"MXV",
|
|
299
|
+
"MYR",
|
|
300
|
+
"MZE",
|
|
301
|
+
"MZM",
|
|
302
|
+
"MZN",
|
|
303
|
+
"NAD",
|
|
304
|
+
"NGN",
|
|
305
|
+
"NIC",
|
|
306
|
+
"NIO",
|
|
307
|
+
"NLG",
|
|
308
|
+
"NOK",
|
|
309
|
+
"NPR",
|
|
310
|
+
"NZD",
|
|
311
|
+
"OMR",
|
|
312
|
+
"PAB",
|
|
313
|
+
"PEI",
|
|
314
|
+
"PEN",
|
|
315
|
+
"PES",
|
|
316
|
+
"PGK",
|
|
317
|
+
"PHP",
|
|
318
|
+
"PKR",
|
|
319
|
+
"PLN",
|
|
320
|
+
"PLZ",
|
|
321
|
+
"PTE",
|
|
322
|
+
"PYG",
|
|
323
|
+
"QAR",
|
|
324
|
+
"RHD",
|
|
325
|
+
"ROL",
|
|
326
|
+
"RON",
|
|
327
|
+
"RSD",
|
|
328
|
+
"RUB",
|
|
329
|
+
"RUR",
|
|
330
|
+
"RWF",
|
|
331
|
+
"SAR",
|
|
332
|
+
"SBD",
|
|
333
|
+
"SCR",
|
|
334
|
+
"SDD",
|
|
335
|
+
"SDG",
|
|
336
|
+
"SDP",
|
|
337
|
+
"SEK",
|
|
338
|
+
"SGD",
|
|
339
|
+
"SHP",
|
|
340
|
+
"SIT",
|
|
341
|
+
"SKK",
|
|
342
|
+
"SLE",
|
|
343
|
+
"SLL",
|
|
344
|
+
"SOS",
|
|
345
|
+
"SRD",
|
|
346
|
+
"SRG",
|
|
347
|
+
"SSP",
|
|
348
|
+
"STD",
|
|
349
|
+
"STN",
|
|
350
|
+
"SUR",
|
|
351
|
+
"SVC",
|
|
352
|
+
"SYP",
|
|
353
|
+
"SZL",
|
|
354
|
+
"THB",
|
|
355
|
+
"TJR",
|
|
356
|
+
"TJS",
|
|
357
|
+
"TMM",
|
|
358
|
+
"TMT",
|
|
359
|
+
"TND",
|
|
360
|
+
"TOP",
|
|
361
|
+
"TPE",
|
|
362
|
+
"TRL",
|
|
363
|
+
"TRY",
|
|
364
|
+
"TTD",
|
|
365
|
+
"TWD",
|
|
366
|
+
"TZS",
|
|
367
|
+
"UAH",
|
|
368
|
+
"UAK",
|
|
369
|
+
"UGS",
|
|
370
|
+
"UGX",
|
|
371
|
+
"USD",
|
|
372
|
+
"USN",
|
|
373
|
+
"USS",
|
|
374
|
+
"UYI",
|
|
375
|
+
"UYP",
|
|
376
|
+
"UYU",
|
|
377
|
+
"UYW",
|
|
378
|
+
"UZS",
|
|
379
|
+
"VEB",
|
|
380
|
+
"VED",
|
|
381
|
+
"VEF",
|
|
382
|
+
"VES",
|
|
383
|
+
"VND",
|
|
384
|
+
"VNN",
|
|
385
|
+
"VUV",
|
|
386
|
+
"WST",
|
|
387
|
+
"XAF",
|
|
388
|
+
"XAG",
|
|
389
|
+
"XAU",
|
|
390
|
+
"XBA",
|
|
391
|
+
"XBB",
|
|
392
|
+
"XBC",
|
|
393
|
+
"XBD",
|
|
394
|
+
"XCD",
|
|
395
|
+
"XCG",
|
|
396
|
+
"XDR",
|
|
397
|
+
"XEU",
|
|
398
|
+
"XFO",
|
|
399
|
+
"XFU",
|
|
400
|
+
"XOF",
|
|
401
|
+
"XPD",
|
|
402
|
+
"XPF",
|
|
403
|
+
"XPT",
|
|
404
|
+
"XRE",
|
|
405
|
+
"XSU",
|
|
406
|
+
"XTS",
|
|
407
|
+
"XUA",
|
|
408
|
+
"XXX",
|
|
409
|
+
"YDD",
|
|
410
|
+
"YER",
|
|
411
|
+
"YUD",
|
|
412
|
+
"YUM",
|
|
413
|
+
"YUN",
|
|
414
|
+
"YUR",
|
|
415
|
+
"ZAL",
|
|
416
|
+
"ZAR",
|
|
417
|
+
"ZMK",
|
|
418
|
+
"ZMW",
|
|
419
|
+
"ZRN",
|
|
420
|
+
"ZRZ",
|
|
421
|
+
"ZWD",
|
|
422
|
+
"ZWG",
|
|
423
|
+
"ZWL",
|
|
424
|
+
"ZWR"
|
|
425
|
+
];
|
|
426
|
+
//#endregion
|
|
427
|
+
//#region packages/intl-supportedvaluesof/get-supported-currencies.ts
|
|
428
|
+
/**
|
|
429
|
+
* Implementation: Tests if a currency is supported by attempting to create
|
|
430
|
+
* a NumberFormat with that currency and verifying it was accepted.
|
|
431
|
+
*
|
|
432
|
+
* CLDR Data: Candidate values come from CLDR currency codes (ISO 4217)
|
|
433
|
+
*/
|
|
434
|
+
function isSupportedCurrency(currency) {
|
|
435
|
+
try {
|
|
436
|
+
const format = createMemoizedNumberFormat("en", {
|
|
437
|
+
style: "currency",
|
|
438
|
+
currencyDisplay: "name",
|
|
439
|
+
currency
|
|
440
|
+
}).format(123);
|
|
441
|
+
if (format.substring(0, 3) !== currency && format.substring(format.length - 3) !== currency) return true;
|
|
442
|
+
} catch {}
|
|
443
|
+
return false;
|
|
444
|
+
}
|
|
445
|
+
/**
|
|
446
|
+
* ECMA-402 Spec: Returns supported currency identifiers
|
|
447
|
+
* ECMA-402 Spec: Results must be sorted lexicographically
|
|
448
|
+
*
|
|
449
|
+
* Implementation: Filters CLDR list against actual runtime support
|
|
450
|
+
*/
|
|
451
|
+
function getSupportedCurrencies() {
|
|
452
|
+
const ATOZ = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
453
|
+
const supportedCurrencies = [];
|
|
454
|
+
for (const currency of currencies) if (currency.length === 3) {
|
|
455
|
+
if (isSupportedCurrency(currency)) supportedCurrencies.push(currency);
|
|
456
|
+
} else if (currency.length === 5 && currency[3] === "~") {
|
|
457
|
+
const start = ATOZ.indexOf(currency[2]);
|
|
458
|
+
const end = ATOZ.indexOf(currency[4]);
|
|
459
|
+
for (let i = start; i <= end; i++) {
|
|
460
|
+
const currentCurrency = currency.substring(0, 2) + ATOZ[i];
|
|
461
|
+
if (isSupportedCurrency(currentCurrency)) supportedCurrencies.push(currentCurrency);
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
return supportedCurrencies.sort();
|
|
465
|
+
}
|
|
466
|
+
//#endregion
|
|
467
|
+
//#region node_modules/.aspect_rules_js/@formatjs_generated+cldr.number@0.0.0/node_modules/@formatjs_generated/cldr.number/numbering-systems.js
|
|
468
|
+
const numberingSystemNames = [
|
|
469
|
+
"adlm",
|
|
470
|
+
"ahom",
|
|
471
|
+
"arab",
|
|
472
|
+
"arabext",
|
|
473
|
+
"armn",
|
|
474
|
+
"armnlow",
|
|
475
|
+
"bali",
|
|
476
|
+
"beng",
|
|
477
|
+
"bhks",
|
|
478
|
+
"brah",
|
|
479
|
+
"cakm",
|
|
480
|
+
"cham",
|
|
481
|
+
"cyrl",
|
|
482
|
+
"deva",
|
|
483
|
+
"diak",
|
|
484
|
+
"ethi",
|
|
485
|
+
"fullwide",
|
|
486
|
+
"gara",
|
|
487
|
+
"geor",
|
|
488
|
+
"gong",
|
|
489
|
+
"gonm",
|
|
490
|
+
"grek",
|
|
491
|
+
"greklow",
|
|
492
|
+
"gujr",
|
|
493
|
+
"gukh",
|
|
494
|
+
"guru",
|
|
495
|
+
"hanidays",
|
|
496
|
+
"hanidec",
|
|
497
|
+
"hans",
|
|
498
|
+
"hansfin",
|
|
499
|
+
"hant",
|
|
500
|
+
"hantfin",
|
|
501
|
+
"hebr",
|
|
502
|
+
"hmng",
|
|
503
|
+
"hmnp",
|
|
504
|
+
"java",
|
|
505
|
+
"jpan",
|
|
506
|
+
"jpanfin",
|
|
507
|
+
"jpanyear",
|
|
508
|
+
"kali",
|
|
509
|
+
"kawi",
|
|
510
|
+
"khmr",
|
|
511
|
+
"knda",
|
|
512
|
+
"krai",
|
|
513
|
+
"lana",
|
|
514
|
+
"lanatham",
|
|
515
|
+
"laoo",
|
|
516
|
+
"latn",
|
|
517
|
+
"lepc",
|
|
518
|
+
"limb",
|
|
519
|
+
"mathbold",
|
|
520
|
+
"mathdbl",
|
|
521
|
+
"mathmono",
|
|
522
|
+
"mathsanb",
|
|
523
|
+
"mathsans",
|
|
524
|
+
"mlym",
|
|
525
|
+
"modi",
|
|
526
|
+
"mong",
|
|
527
|
+
"mroo",
|
|
528
|
+
"mtei",
|
|
529
|
+
"mymr",
|
|
530
|
+
"mymrepka",
|
|
531
|
+
"mymrpao",
|
|
532
|
+
"mymrshan",
|
|
533
|
+
"mymrtlng",
|
|
534
|
+
"nagm",
|
|
535
|
+
"newa",
|
|
536
|
+
"nkoo",
|
|
537
|
+
"olck",
|
|
538
|
+
"onao",
|
|
539
|
+
"orya",
|
|
540
|
+
"osma",
|
|
541
|
+
"outlined",
|
|
542
|
+
"rohg",
|
|
543
|
+
"roman",
|
|
544
|
+
"romanlow",
|
|
545
|
+
"saur",
|
|
546
|
+
"segment",
|
|
547
|
+
"shrd",
|
|
548
|
+
"sind",
|
|
549
|
+
"sinh",
|
|
550
|
+
"sora",
|
|
551
|
+
"sund",
|
|
552
|
+
"sunu",
|
|
553
|
+
"takr",
|
|
554
|
+
"talu",
|
|
555
|
+
"taml",
|
|
556
|
+
"tamldec",
|
|
557
|
+
"telu",
|
|
558
|
+
"thai",
|
|
559
|
+
"tibt",
|
|
560
|
+
"tirh",
|
|
561
|
+
"tnsa",
|
|
562
|
+
"tols",
|
|
563
|
+
"vaii",
|
|
564
|
+
"wara",
|
|
565
|
+
"wcho"
|
|
566
|
+
];
|
|
567
|
+
//#endregion
|
|
568
|
+
//#region packages/intl-supportedvaluesof/get-supported-numbering-systems.ts
|
|
569
|
+
/**
|
|
570
|
+
* Implementation: Tests if a numbering system is supported by attempting to create
|
|
571
|
+
* a NumberFormat with that numbering system and verifying it was accepted.
|
|
572
|
+
*
|
|
573
|
+
* CLDR Data: Candidate values come from CLDR numbering system types
|
|
574
|
+
*/
|
|
575
|
+
function isSupportedNumberingSystem(system) {
|
|
576
|
+
try {
|
|
577
|
+
const numberFormat = createMemoizedNumberFormat(`en-u-nu-${system}`);
|
|
578
|
+
if (numberFormat.resolvedOptions().numberingSystem === system && system === "latn" || numberFormat.format(123) !== "123") return true;
|
|
579
|
+
} catch {}
|
|
580
|
+
return false;
|
|
581
|
+
}
|
|
582
|
+
/**
|
|
583
|
+
* ECMA-402 Spec: Returns supported numbering system identifiers
|
|
584
|
+
* ECMA-402 Spec: Results must be sorted lexicographically
|
|
585
|
+
*
|
|
586
|
+
* Implementation: Filters CLDR list against actual runtime support
|
|
587
|
+
*/
|
|
588
|
+
function getSupportedNumberingSystems() {
|
|
589
|
+
return numberingSystemNames.filter(isSupportedNumberingSystem).sort();
|
|
590
|
+
}
|
|
591
|
+
//#endregion
|
|
592
|
+
//#region node_modules/.aspect_rules_js/@formatjs_generated+cldr.supported-values@0.0.0/node_modules/@formatjs_generated/cldr.supported-values/timezones.js
|
|
593
|
+
const timezones = [
|
|
594
|
+
"Africa/Abidjan",
|
|
595
|
+
"Africa/Accra",
|
|
596
|
+
"Africa/Addis_Ababa",
|
|
597
|
+
"Africa/Algiers",
|
|
598
|
+
"Africa/Asmara",
|
|
599
|
+
"Africa/Bamako",
|
|
600
|
+
"Africa/Bangui",
|
|
601
|
+
"Africa/Banjul",
|
|
602
|
+
"Africa/Bissau",
|
|
603
|
+
"Africa/Blantyre",
|
|
604
|
+
"Africa/Brazzaville",
|
|
605
|
+
"Africa/Bujumbura",
|
|
606
|
+
"Africa/Cairo",
|
|
607
|
+
"Africa/Casablanca",
|
|
608
|
+
"Africa/Ceuta",
|
|
609
|
+
"Africa/Conakry",
|
|
610
|
+
"Africa/Dakar",
|
|
611
|
+
"Africa/Dar_es_Salaam",
|
|
612
|
+
"Africa/Djibouti",
|
|
613
|
+
"Africa/Douala",
|
|
614
|
+
"Africa/El_Aaiun",
|
|
615
|
+
"Africa/Freetown",
|
|
616
|
+
"Africa/Gaborone",
|
|
617
|
+
"Africa/Harare",
|
|
618
|
+
"Africa/Johannesburg",
|
|
619
|
+
"Africa/Juba",
|
|
620
|
+
"Africa/Kampala",
|
|
621
|
+
"Africa/Khartoum",
|
|
622
|
+
"Africa/Kigali",
|
|
623
|
+
"Africa/Kinshasa",
|
|
624
|
+
"Africa/Lagos",
|
|
625
|
+
"Africa/Libreville",
|
|
626
|
+
"Africa/Lome",
|
|
627
|
+
"Africa/Luanda",
|
|
628
|
+
"Africa/Lubumbashi",
|
|
629
|
+
"Africa/Lusaka",
|
|
630
|
+
"Africa/Malabo",
|
|
631
|
+
"Africa/Maputo",
|
|
632
|
+
"Africa/Maseru",
|
|
633
|
+
"Africa/Mbabane",
|
|
634
|
+
"Africa/Mogadishu",
|
|
635
|
+
"Africa/Monrovia",
|
|
636
|
+
"Africa/Nairobi",
|
|
637
|
+
"Africa/Ndjamena",
|
|
638
|
+
"Africa/Niamey",
|
|
639
|
+
"Africa/Nouakchott",
|
|
640
|
+
"Africa/Ouagadougou",
|
|
641
|
+
"Africa/Porto-Novo",
|
|
642
|
+
"Africa/Sao_Tome",
|
|
643
|
+
"Africa/Tripoli",
|
|
644
|
+
"Africa/Tunis",
|
|
645
|
+
"Africa/Windhoek",
|
|
646
|
+
"America/Adak",
|
|
647
|
+
"America/Anchorage",
|
|
648
|
+
"America/Anguilla",
|
|
649
|
+
"America/Antigua",
|
|
650
|
+
"America/Araguaina",
|
|
651
|
+
"America/Argentina/Buenos_Aires",
|
|
652
|
+
"America/Argentina/Catamarca",
|
|
653
|
+
"America/Argentina/Cordoba",
|
|
654
|
+
"America/Argentina/Jujuy",
|
|
655
|
+
"America/Argentina/La_Rioja",
|
|
656
|
+
"America/Argentina/Mendoza",
|
|
657
|
+
"America/Argentina/Rio_Gallegos",
|
|
658
|
+
"America/Argentina/Salta",
|
|
659
|
+
"America/Argentina/San_Juan",
|
|
660
|
+
"America/Argentina/San_Luis",
|
|
661
|
+
"America/Argentina/Tucuman",
|
|
662
|
+
"America/Argentina/Ushuaia",
|
|
663
|
+
"America/Aruba",
|
|
664
|
+
"America/Asuncion",
|
|
665
|
+
"America/Atikokan",
|
|
666
|
+
"America/Bahia_Banderas",
|
|
667
|
+
"America/Bahia",
|
|
668
|
+
"America/Barbados",
|
|
669
|
+
"America/Belem",
|
|
670
|
+
"America/Belize",
|
|
671
|
+
"America/Blanc-Sablon",
|
|
672
|
+
"America/Boa_Vista",
|
|
673
|
+
"America/Bogota",
|
|
674
|
+
"America/Boise",
|
|
675
|
+
"America/Cambridge_Bay",
|
|
676
|
+
"America/Campo_Grande",
|
|
677
|
+
"America/Cancun",
|
|
678
|
+
"America/Caracas",
|
|
679
|
+
"America/Cayenne",
|
|
680
|
+
"America/Cayman",
|
|
681
|
+
"America/Chicago",
|
|
682
|
+
"America/Chihuahua",
|
|
683
|
+
"America/Ciudad_Juarez",
|
|
684
|
+
"America/Costa_Rica",
|
|
685
|
+
"America/Coyhaique",
|
|
686
|
+
"America/Creston",
|
|
687
|
+
"America/Cuiaba",
|
|
688
|
+
"America/Curacao",
|
|
689
|
+
"America/Danmarkshavn",
|
|
690
|
+
"America/Dawson_Creek",
|
|
691
|
+
"America/Dawson",
|
|
692
|
+
"America/Denver",
|
|
693
|
+
"America/Detroit",
|
|
694
|
+
"America/Dominica",
|
|
695
|
+
"America/Edmonton",
|
|
696
|
+
"America/Eirunepe",
|
|
697
|
+
"America/El_Salvador",
|
|
698
|
+
"America/Fort_Nelson",
|
|
699
|
+
"America/Fortaleza",
|
|
700
|
+
"America/Glace_Bay",
|
|
701
|
+
"America/Goose_Bay",
|
|
702
|
+
"America/Grand_Turk",
|
|
703
|
+
"America/Grenada",
|
|
704
|
+
"America/Guadeloupe",
|
|
705
|
+
"America/Guatemala",
|
|
706
|
+
"America/Guayaquil",
|
|
707
|
+
"America/Guyana",
|
|
708
|
+
"America/Halifax",
|
|
709
|
+
"America/Havana",
|
|
710
|
+
"America/Hermosillo",
|
|
711
|
+
"America/Indiana/Indianapolis",
|
|
712
|
+
"America/Indiana/Knox",
|
|
713
|
+
"America/Indiana/Marengo",
|
|
714
|
+
"America/Indiana/Petersburg",
|
|
715
|
+
"America/Indiana/Tell_City",
|
|
716
|
+
"America/Indiana/Vevay",
|
|
717
|
+
"America/Indiana/Vincennes",
|
|
718
|
+
"America/Indiana/Winamac",
|
|
719
|
+
"America/Inuvik",
|
|
720
|
+
"America/Iqaluit",
|
|
721
|
+
"America/Jamaica",
|
|
722
|
+
"America/Juneau",
|
|
723
|
+
"America/Kentucky/Louisville",
|
|
724
|
+
"America/Kentucky/Monticello",
|
|
725
|
+
"America/Kralendijk",
|
|
726
|
+
"America/La_Paz",
|
|
727
|
+
"America/Lima",
|
|
728
|
+
"America/Los_Angeles",
|
|
729
|
+
"America/Lower_Princes",
|
|
730
|
+
"America/Maceio",
|
|
731
|
+
"America/Managua",
|
|
732
|
+
"America/Manaus",
|
|
733
|
+
"America/Marigot",
|
|
734
|
+
"America/Martinique",
|
|
735
|
+
"America/Matamoros",
|
|
736
|
+
"America/Mazatlan",
|
|
737
|
+
"America/Menominee",
|
|
738
|
+
"America/Merida",
|
|
739
|
+
"America/Metlakatla",
|
|
740
|
+
"America/Mexico_City",
|
|
741
|
+
"America/Miquelon",
|
|
742
|
+
"America/Moncton",
|
|
743
|
+
"America/Monterrey",
|
|
744
|
+
"America/Montevideo",
|
|
745
|
+
"America/Montserrat",
|
|
746
|
+
"America/Nassau",
|
|
747
|
+
"America/New_York",
|
|
748
|
+
"America/Nipigon",
|
|
749
|
+
"America/Nome",
|
|
750
|
+
"America/Noronha",
|
|
751
|
+
"America/North_Dakota/Beulah",
|
|
752
|
+
"America/North_Dakota/Center",
|
|
753
|
+
"America/North_Dakota/New_Salem",
|
|
754
|
+
"America/Nuuk",
|
|
755
|
+
"America/Ojinaga",
|
|
756
|
+
"America/Panama",
|
|
757
|
+
"America/Pangnirtung",
|
|
758
|
+
"America/Paramaribo",
|
|
759
|
+
"America/Phoenix",
|
|
760
|
+
"America/Port_of_Spain",
|
|
761
|
+
"America/Port-au-Prince",
|
|
762
|
+
"America/Porto_Velho",
|
|
763
|
+
"America/Puerto_Rico",
|
|
764
|
+
"America/Punta_Arenas",
|
|
765
|
+
"America/Rainy_River",
|
|
766
|
+
"America/Rankin_Inlet",
|
|
767
|
+
"America/Recife",
|
|
768
|
+
"America/Regina",
|
|
769
|
+
"America/Resolute",
|
|
770
|
+
"America/Rio_Branco",
|
|
771
|
+
"America/Santarem",
|
|
772
|
+
"America/Santiago",
|
|
773
|
+
"America/Santo_Domingo",
|
|
774
|
+
"America/Sao_Paulo",
|
|
775
|
+
"America/Scoresbysund",
|
|
776
|
+
"America/Sitka",
|
|
777
|
+
"America/St_Barthelemy",
|
|
778
|
+
"America/St_Johns",
|
|
779
|
+
"America/St_Kitts",
|
|
780
|
+
"America/St_Lucia",
|
|
781
|
+
"America/St_Thomas",
|
|
782
|
+
"America/St_Vincent",
|
|
783
|
+
"America/Swift_Current",
|
|
784
|
+
"America/Tegucigalpa",
|
|
785
|
+
"America/Thule",
|
|
786
|
+
"America/Thunder_Bay",
|
|
787
|
+
"America/Tijuana",
|
|
788
|
+
"America/Toronto",
|
|
789
|
+
"America/Tortola",
|
|
790
|
+
"America/Vancouver",
|
|
791
|
+
"America/Whitehorse",
|
|
792
|
+
"America/Winnipeg",
|
|
793
|
+
"America/Yakutat",
|
|
794
|
+
"America/Yellowknife",
|
|
795
|
+
"Antarctica/Casey",
|
|
796
|
+
"Antarctica/Davis",
|
|
797
|
+
"Antarctica/DumontDUrville",
|
|
798
|
+
"Antarctica/Macquarie",
|
|
799
|
+
"Antarctica/Mawson",
|
|
800
|
+
"Antarctica/McMurdo",
|
|
801
|
+
"Antarctica/Palmer",
|
|
802
|
+
"Antarctica/Rothera",
|
|
803
|
+
"Antarctica/Syowa",
|
|
804
|
+
"Antarctica/Troll",
|
|
805
|
+
"Antarctica/Vostok",
|
|
806
|
+
"Arctic/Longyearbyen",
|
|
807
|
+
"Asia/Aden",
|
|
808
|
+
"Asia/Almaty",
|
|
809
|
+
"Asia/Amman",
|
|
810
|
+
"Asia/Anadyr",
|
|
811
|
+
"Asia/Aqtau",
|
|
812
|
+
"Asia/Aqtobe",
|
|
813
|
+
"Asia/Ashgabat",
|
|
814
|
+
"Asia/Atyrau",
|
|
815
|
+
"Asia/Baghdad",
|
|
816
|
+
"Asia/Bahrain",
|
|
817
|
+
"Asia/Baku",
|
|
818
|
+
"Asia/Bangkok",
|
|
819
|
+
"Asia/Barnaul",
|
|
820
|
+
"Asia/Beirut",
|
|
821
|
+
"Asia/Bishkek",
|
|
822
|
+
"Asia/Brunei",
|
|
823
|
+
"Asia/Chita",
|
|
824
|
+
"Asia/Choibalsan",
|
|
825
|
+
"Asia/Colombo",
|
|
826
|
+
"Asia/Damascus",
|
|
827
|
+
"Asia/Dhaka",
|
|
828
|
+
"Asia/Dili",
|
|
829
|
+
"Asia/Dubai",
|
|
830
|
+
"Asia/Dushanbe",
|
|
831
|
+
"Asia/Famagusta",
|
|
832
|
+
"Asia/Gaza",
|
|
833
|
+
"Asia/Hebron",
|
|
834
|
+
"Asia/Ho_Chi_Minh",
|
|
835
|
+
"Asia/Hong_Kong",
|
|
836
|
+
"Asia/Hovd",
|
|
837
|
+
"Asia/Irkutsk",
|
|
838
|
+
"Asia/Jakarta",
|
|
839
|
+
"Asia/Jayapura",
|
|
840
|
+
"Asia/Jerusalem",
|
|
841
|
+
"Asia/Kabul",
|
|
842
|
+
"Asia/Kamchatka",
|
|
843
|
+
"Asia/Karachi",
|
|
844
|
+
"Asia/Kathmandu",
|
|
845
|
+
"Asia/Khandyga",
|
|
846
|
+
"Asia/Kolkata",
|
|
847
|
+
"Asia/Krasnoyarsk",
|
|
848
|
+
"Asia/Kuala_Lumpur",
|
|
849
|
+
"Asia/Kuching",
|
|
850
|
+
"Asia/Kuwait",
|
|
851
|
+
"Asia/Macau",
|
|
852
|
+
"Asia/Magadan",
|
|
853
|
+
"Asia/Makassar",
|
|
854
|
+
"Asia/Manila",
|
|
855
|
+
"Asia/Muscat",
|
|
856
|
+
"Asia/Nicosia",
|
|
857
|
+
"Asia/Novokuznetsk",
|
|
858
|
+
"Asia/Novosibirsk",
|
|
859
|
+
"Asia/Omsk",
|
|
860
|
+
"Asia/Oral",
|
|
861
|
+
"Asia/Phnom_Penh",
|
|
862
|
+
"Asia/Pontianak",
|
|
863
|
+
"Asia/Pyongyang",
|
|
864
|
+
"Asia/Qatar",
|
|
865
|
+
"Asia/Qostanay",
|
|
866
|
+
"Asia/Qyzylorda",
|
|
867
|
+
"Asia/Riyadh",
|
|
868
|
+
"Asia/Sakhalin",
|
|
869
|
+
"Asia/Samarkand",
|
|
870
|
+
"Asia/Seoul",
|
|
871
|
+
"Asia/Shanghai",
|
|
872
|
+
"Asia/Singapore",
|
|
873
|
+
"Asia/Srednekolymsk",
|
|
874
|
+
"Asia/Taipei",
|
|
875
|
+
"Asia/Tashkent",
|
|
876
|
+
"Asia/Tbilisi",
|
|
877
|
+
"Asia/Tehran",
|
|
878
|
+
"Asia/Thimphu",
|
|
879
|
+
"Asia/Tokyo",
|
|
880
|
+
"Asia/Tomsk",
|
|
881
|
+
"Asia/Ulaanbaatar",
|
|
882
|
+
"Asia/Urumqi",
|
|
883
|
+
"Asia/Ust-Nera",
|
|
884
|
+
"Asia/Vientiane",
|
|
885
|
+
"Asia/Vladivostok",
|
|
886
|
+
"Asia/Yakutsk",
|
|
887
|
+
"Asia/Yangon",
|
|
888
|
+
"Asia/Yekaterinburg",
|
|
889
|
+
"Asia/Yerevan",
|
|
890
|
+
"Atlantic/Azores",
|
|
891
|
+
"Atlantic/Bermuda",
|
|
892
|
+
"Atlantic/Canary",
|
|
893
|
+
"Atlantic/Cape_Verde",
|
|
894
|
+
"Atlantic/Faroe",
|
|
895
|
+
"Atlantic/Madeira",
|
|
896
|
+
"Atlantic/Reykjavik",
|
|
897
|
+
"Atlantic/South_Georgia",
|
|
898
|
+
"Atlantic/St_Helena",
|
|
899
|
+
"Atlantic/Stanley",
|
|
900
|
+
"Australia/Adelaide",
|
|
901
|
+
"Australia/Brisbane",
|
|
902
|
+
"Australia/Broken_Hill",
|
|
903
|
+
"Australia/Currie",
|
|
904
|
+
"Australia/Darwin",
|
|
905
|
+
"Australia/Eucla",
|
|
906
|
+
"Australia/Hobart",
|
|
907
|
+
"Australia/Lindeman",
|
|
908
|
+
"Australia/Lord_Howe",
|
|
909
|
+
"Australia/Melbourne",
|
|
910
|
+
"Australia/Perth",
|
|
911
|
+
"Australia/Sydney",
|
|
912
|
+
"Europe/Amsterdam",
|
|
913
|
+
"Europe/Andorra",
|
|
914
|
+
"Europe/Astrakhan",
|
|
915
|
+
"Europe/Athens",
|
|
916
|
+
"Europe/Belgrade",
|
|
917
|
+
"Europe/Berlin",
|
|
918
|
+
"Europe/Bratislava",
|
|
919
|
+
"Europe/Brussels",
|
|
920
|
+
"Europe/Bucharest",
|
|
921
|
+
"Europe/Budapest",
|
|
922
|
+
"Europe/Busingen",
|
|
923
|
+
"Europe/Chisinau",
|
|
924
|
+
"Europe/Copenhagen",
|
|
925
|
+
"Europe/Dublin",
|
|
926
|
+
"Europe/Gibraltar",
|
|
927
|
+
"Europe/Guernsey",
|
|
928
|
+
"Europe/Helsinki",
|
|
929
|
+
"Europe/Isle_of_Man",
|
|
930
|
+
"Europe/Istanbul",
|
|
931
|
+
"Europe/Jersey",
|
|
932
|
+
"Europe/Kaliningrad",
|
|
933
|
+
"Europe/Kyiv",
|
|
934
|
+
"Europe/Kirov",
|
|
935
|
+
"Europe/Lisbon",
|
|
936
|
+
"Europe/Ljubljana",
|
|
937
|
+
"Europe/London",
|
|
938
|
+
"Europe/Luxembourg",
|
|
939
|
+
"Europe/Madrid",
|
|
940
|
+
"Europe/Malta",
|
|
941
|
+
"Europe/Mariehamn",
|
|
942
|
+
"Europe/Minsk",
|
|
943
|
+
"Europe/Monaco",
|
|
944
|
+
"Europe/Moscow",
|
|
945
|
+
"Europe/Oslo",
|
|
946
|
+
"Europe/Paris",
|
|
947
|
+
"Europe/Podgorica",
|
|
948
|
+
"Europe/Prague",
|
|
949
|
+
"Europe/Riga",
|
|
950
|
+
"Europe/Rome",
|
|
951
|
+
"Europe/Samara",
|
|
952
|
+
"Europe/San_Marino",
|
|
953
|
+
"Europe/Sarajevo",
|
|
954
|
+
"Europe/Saratov",
|
|
955
|
+
"Europe/Simferopol",
|
|
956
|
+
"Europe/Skopje",
|
|
957
|
+
"Europe/Sofia",
|
|
958
|
+
"Europe/Stockholm",
|
|
959
|
+
"Europe/Tallinn",
|
|
960
|
+
"Europe/Tirane",
|
|
961
|
+
"Europe/Ulyanovsk",
|
|
962
|
+
"Europe/Uzhgorod",
|
|
963
|
+
"Europe/Vaduz",
|
|
964
|
+
"Europe/Vatican",
|
|
965
|
+
"Europe/Vienna",
|
|
966
|
+
"Europe/Vilnius",
|
|
967
|
+
"Europe/Volgograd",
|
|
968
|
+
"Europe/Warsaw",
|
|
969
|
+
"Europe/Zagreb",
|
|
970
|
+
"Europe/Zaporozhye",
|
|
971
|
+
"Europe/Zurich",
|
|
972
|
+
"Indian/Antananarivo",
|
|
973
|
+
"Indian/Chagos",
|
|
974
|
+
"Indian/Christmas",
|
|
975
|
+
"Indian/Cocos",
|
|
976
|
+
"Indian/Comoro",
|
|
977
|
+
"Indian/Kerguelen",
|
|
978
|
+
"Indian/Mahe",
|
|
979
|
+
"Indian/Maldives",
|
|
980
|
+
"Indian/Mauritius",
|
|
981
|
+
"Indian/Mayotte",
|
|
982
|
+
"Indian/Reunion",
|
|
983
|
+
"Pacific/Apia",
|
|
984
|
+
"Pacific/Auckland",
|
|
985
|
+
"Pacific/Bougainville",
|
|
986
|
+
"Pacific/Chatham",
|
|
987
|
+
"Pacific/Chuuk",
|
|
988
|
+
"Pacific/Easter",
|
|
989
|
+
"Pacific/Efate",
|
|
990
|
+
"Pacific/Kanton",
|
|
991
|
+
"Pacific/Fakaofo",
|
|
992
|
+
"Pacific/Fiji",
|
|
993
|
+
"Pacific/Funafuti",
|
|
994
|
+
"Pacific/Galapagos",
|
|
995
|
+
"Pacific/Gambier",
|
|
996
|
+
"Pacific/Guadalcanal",
|
|
997
|
+
"Pacific/Guam",
|
|
998
|
+
"Pacific/Honolulu",
|
|
999
|
+
"Pacific/Kiritimati",
|
|
1000
|
+
"Pacific/Kosrae",
|
|
1001
|
+
"Pacific/Kwajalein",
|
|
1002
|
+
"Pacific/Majuro",
|
|
1003
|
+
"Pacific/Marquesas",
|
|
1004
|
+
"Pacific/Midway",
|
|
1005
|
+
"Pacific/Nauru",
|
|
1006
|
+
"Pacific/Niue",
|
|
1007
|
+
"Pacific/Norfolk",
|
|
1008
|
+
"Pacific/Noumea",
|
|
1009
|
+
"Pacific/Pago_Pago",
|
|
1010
|
+
"Pacific/Palau",
|
|
1011
|
+
"Pacific/Pitcairn",
|
|
1012
|
+
"Pacific/Pohnpei",
|
|
1013
|
+
"Pacific/Port_Moresby",
|
|
1014
|
+
"Pacific/Rarotonga",
|
|
1015
|
+
"Pacific/Saipan",
|
|
1016
|
+
"Pacific/Tahiti",
|
|
1017
|
+
"Pacific/Tarawa",
|
|
1018
|
+
"Pacific/Tongatapu",
|
|
1019
|
+
"Pacific/Wake",
|
|
1020
|
+
"Pacific/Wallis"
|
|
1021
|
+
];
|
|
1022
|
+
//#endregion
|
|
1023
|
+
//#region packages/intl-supportedvaluesof/get-supported-timezones.ts
|
|
1024
|
+
/**
|
|
1025
|
+
* Implementation: Tests if a timezone is supported by attempting to create
|
|
1026
|
+
* a DateTimeFormat with that timezone and verifying it was accepted.
|
|
1027
|
+
*
|
|
1028
|
+
* CLDR Data: Candidate values come from IANA Time Zone Database
|
|
1029
|
+
*/
|
|
1030
|
+
function isSupportedTimeZone(timeZone) {
|
|
1031
|
+
try {
|
|
1032
|
+
return createMemoizedDateTimeFormat("en", { timeZone }).resolvedOptions().timeZone === timeZone;
|
|
1033
|
+
} catch {}
|
|
1034
|
+
return false;
|
|
1035
|
+
}
|
|
1036
|
+
/**
|
|
1037
|
+
* ECMA-402 Spec: Returns supported timezone identifiers
|
|
1038
|
+
* ECMA-402 Spec: Results must be sorted lexicographically
|
|
1039
|
+
*
|
|
1040
|
+
* Implementation: Filters CLDR list against actual runtime support
|
|
1041
|
+
*/
|
|
1042
|
+
function getSupportedTimeZones() {
|
|
1043
|
+
return timezones.filter(isSupportedTimeZone).sort();
|
|
1044
|
+
}
|
|
1045
|
+
//#endregion
|
|
1046
|
+
//#region node_modules/.aspect_rules_js/@formatjs_generated+cldr.supported-values@0.0.0/node_modules/@formatjs_generated/cldr.supported-values/units.js
|
|
1047
|
+
const units = [
|
|
1048
|
+
"degree",
|
|
1049
|
+
"acre",
|
|
1050
|
+
"hectare",
|
|
1051
|
+
"percent",
|
|
1052
|
+
"bit",
|
|
1053
|
+
"byte",
|
|
1054
|
+
"gigabit",
|
|
1055
|
+
"gigabyte",
|
|
1056
|
+
"kilobit",
|
|
1057
|
+
"kilobyte",
|
|
1058
|
+
"megabit",
|
|
1059
|
+
"megabyte",
|
|
1060
|
+
"petabyte",
|
|
1061
|
+
"terabit",
|
|
1062
|
+
"terabyte",
|
|
1063
|
+
"day",
|
|
1064
|
+
"hour",
|
|
1065
|
+
"millisecond",
|
|
1066
|
+
"minute",
|
|
1067
|
+
"month",
|
|
1068
|
+
"second",
|
|
1069
|
+
"week",
|
|
1070
|
+
"year",
|
|
1071
|
+
"centimeter",
|
|
1072
|
+
"foot",
|
|
1073
|
+
"inch",
|
|
1074
|
+
"kilometer",
|
|
1075
|
+
"meter",
|
|
1076
|
+
"mile-scandinavian",
|
|
1077
|
+
"mile",
|
|
1078
|
+
"millimeter",
|
|
1079
|
+
"yard",
|
|
1080
|
+
"gram",
|
|
1081
|
+
"kilogram",
|
|
1082
|
+
"ounce",
|
|
1083
|
+
"pound",
|
|
1084
|
+
"stone",
|
|
1085
|
+
"celsius",
|
|
1086
|
+
"fahrenheit",
|
|
1087
|
+
"fluid-ounce",
|
|
1088
|
+
"gallon",
|
|
1089
|
+
"liter",
|
|
1090
|
+
"milliliter"
|
|
1091
|
+
];
|
|
1092
|
+
//#endregion
|
|
1093
|
+
//#region packages/intl-supportedvaluesof/get-supported-units.ts
|
|
1094
|
+
/**
|
|
1095
|
+
* Implementation: Tests if a unit is supported by attempting to create
|
|
1096
|
+
* a NumberFormat with that unit and verifying it was accepted.
|
|
1097
|
+
*
|
|
1098
|
+
* CLDR Data: Candidate values come from CLDR unit types
|
|
1099
|
+
*/
|
|
1100
|
+
function isSupportedUnit(unit) {
|
|
1101
|
+
try {
|
|
1102
|
+
return createMemoizedNumberFormat("en", {
|
|
1103
|
+
style: "unit",
|
|
1104
|
+
unit
|
|
1105
|
+
}).resolvedOptions().unit === unit;
|
|
1106
|
+
} catch {}
|
|
1107
|
+
return false;
|
|
1108
|
+
}
|
|
1109
|
+
/**
|
|
1110
|
+
* ECMA-402 Spec: Returns supported unit identifiers
|
|
1111
|
+
* ECMA-402 Spec: Results must be sorted lexicographically
|
|
1112
|
+
*
|
|
1113
|
+
* Implementation: Filters CLDR list against actual runtime support
|
|
1114
|
+
*/
|
|
1115
|
+
function getSupportedUnits() {
|
|
1116
|
+
return units.filter(isSupportedUnit).sort();
|
|
1117
|
+
}
|
|
1118
|
+
//#endregion
|
|
1119
|
+
//#region packages/intl-supportedvaluesof/index.ts
|
|
1120
|
+
/**
|
|
1121
|
+
* ECMA-402 Spec: Intl.supportedValuesOf(key)
|
|
1122
|
+
* https://tc39.es/ecma402/#sec-intl.supportedvaluesof
|
|
1123
|
+
*
|
|
1124
|
+
* Returns an array containing the supported calendar, collation, currency,
|
|
1125
|
+
* numbering systems, time zone, or unit values supported by the implementation.
|
|
1126
|
+
*
|
|
1127
|
+
* Implementation: We validate candidate values from CLDR against the actual
|
|
1128
|
+
* Intl formatters to determine runtime support rather than using static lists.
|
|
1129
|
+
* This ensures accuracy across different JavaScript engines and runtimes.
|
|
1130
|
+
*
|
|
1131
|
+
* @param key - The category of values to return
|
|
1132
|
+
* @returns A sorted array of unique string values
|
|
1133
|
+
*/
|
|
1134
|
+
function supportedValuesOf(key) {
|
|
1135
|
+
switch (key) {
|
|
1136
|
+
case "calendar": return getSupportedCalendars();
|
|
1137
|
+
case "collation": return getSupportedCollations();
|
|
1138
|
+
case "currency": return getSupportedCurrencies();
|
|
1139
|
+
case "numberingSystem": return getSupportedNumberingSystems();
|
|
1140
|
+
case "timeZone": return getSupportedTimeZones();
|
|
1141
|
+
case "unit": return getSupportedUnits();
|
|
1142
|
+
default: throw RangeError("Invalid key: " + key);
|
|
1143
|
+
}
|
|
1144
|
+
}
|
|
1145
|
+
//#endregion
|
|
1146
|
+
//#region packages/intl-supportedvaluesof/polyfill.ts
|
|
1147
|
+
if (shouldPolyfill()) Object.defineProperty(Intl, "supportedValuesOf", {
|
|
1148
|
+
value: supportedValuesOf,
|
|
1149
|
+
enumerable: true,
|
|
1150
|
+
writable: false,
|
|
1151
|
+
configurable: false
|
|
1152
|
+
});
|
|
1153
|
+
//#endregion
|
|
1154
|
+
|
|
1155
|
+
//# sourceMappingURL=polyfill.js.map
|