@formatjs/intl-supportedvaluesof 3.1.1 → 3.1.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/README.md +11 -3
- package/index.d.ts +5 -12
- package/index.js +943 -194
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/polyfill-force.js +1027 -210
- package/polyfill-force.js.map +1 -1
- package/polyfill.iife.js +1033 -216
- package/polyfill.js +1028 -211
- package/polyfill.js.map +1 -1
- package/should-polyfill.js +1 -1
- package/should-polyfill.js.map +1 -1
package/polyfill-force.js
CHANGED
|
@@ -9,16 +9,145 @@ function ToString(o) {
|
|
|
9
9
|
if (typeof o === "symbol") throw TypeErrorConstructor("Cannot convert a Symbol value to a string");
|
|
10
10
|
return StringConstructor(o);
|
|
11
11
|
}
|
|
12
|
+
Number.isInteger;
|
|
13
|
+
Number.isFinite;
|
|
14
|
+
Number.isSafeInteger;
|
|
15
|
+
const RangeErrorConstructor = RangeError;
|
|
16
|
+
const arrayApply = Reflect.apply;
|
|
17
|
+
Array.prototype.every;
|
|
18
|
+
const some = Array.prototype.some;
|
|
19
|
+
function arraySome(values, predicate) {
|
|
20
|
+
return arrayApply(some, values, [predicate]);
|
|
21
|
+
}
|
|
22
|
+
Array.prototype.includes;
|
|
23
|
+
const indexOf = Array.prototype.indexOf;
|
|
24
|
+
function arrayIndexOf(values, search) {
|
|
25
|
+
return arrayApply(indexOf, values, [search]);
|
|
26
|
+
}
|
|
27
|
+
const defineProperty$1 = Object.defineProperty;
|
|
28
|
+
function setDataProperty(target, key, value) {
|
|
29
|
+
defineProperty$1(target, key, {
|
|
30
|
+
__proto__: null,
|
|
31
|
+
value,
|
|
32
|
+
writable: true,
|
|
33
|
+
enumerable: true,
|
|
34
|
+
configurable: true
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
// packages/intl-supportedvaluesof/supported-entries.ts
|
|
38
|
+
const apply$2 = Reflect.apply;
|
|
39
|
+
const sort = Array.prototype.sort;
|
|
40
|
+
function supportedEntries(candidates, supported) {
|
|
41
|
+
const result = [];
|
|
42
|
+
for (let index = 0; index < candidates.length; index++) {
|
|
43
|
+
const entry = candidates[index];
|
|
44
|
+
if (supported(entry)) setDataProperty(result, `${result.length}`, entry);
|
|
45
|
+
}
|
|
46
|
+
apply$2(sort, result, []);
|
|
47
|
+
return result;
|
|
48
|
+
}
|
|
12
49
|
// packages/intl-supportedvaluesof/memoize.ts
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const
|
|
50
|
+
const descriptor = Object.getOwnPropertyDescriptor;
|
|
51
|
+
const getPrototypeOf = Object.getPrototypeOf;
|
|
52
|
+
const objectPrototype = Object.prototype;
|
|
53
|
+
const apply$1 = Reflect.apply;
|
|
54
|
+
const memoizeOptions = {
|
|
55
|
+
__proto__: null,
|
|
56
|
+
strategy: strategies.variadic
|
|
57
|
+
};
|
|
58
|
+
const availableCalendarsKey = Symbol.for("@formatjs/intl-datetimeformat/availableCalendars");
|
|
59
|
+
const hasTimeZoneKey = Symbol.for("@formatjs/intl-datetimeformat/hasTimeZone");
|
|
60
|
+
function ownValue(object, key) {
|
|
61
|
+
const property = descriptor(object, key);
|
|
62
|
+
return property && descriptor(property, "value")?.value;
|
|
63
|
+
}
|
|
64
|
+
function findProperty(owner, key) {
|
|
65
|
+
while (owner !== null && (typeof owner === "object" || typeof owner === "function") && owner !== objectPrototype) {
|
|
66
|
+
const property = descriptor(owner, key);
|
|
67
|
+
if (property) return property;
|
|
68
|
+
owner = getPrototypeOf(owner);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
function resolvedOptions(Constructor) {
|
|
72
|
+
const property = findProperty(ownValue(Constructor, "prototype"), "resolvedOptions");
|
|
73
|
+
const method = property && ownValue(property, "value");
|
|
74
|
+
if (typeof method === "function") return (formatter) => apply$1(method, formatter, []);
|
|
75
|
+
}
|
|
76
|
+
let intl$1 = ownValue(globalThis, "Intl");
|
|
77
|
+
function retainProbe(name, createProbe) {
|
|
78
|
+
const probes = /* @__PURE__ */ new WeakMap();
|
|
79
|
+
const readProbe = probes.get.bind(probes);
|
|
80
|
+
const writeProbe = probes.set.bind(probes);
|
|
81
|
+
let currentProbe;
|
|
82
|
+
const getProbe = () => {
|
|
83
|
+
intl$1 ??= ownValue(globalThis, "Intl");
|
|
84
|
+
const property = intl$1 && descriptor(intl$1, name);
|
|
85
|
+
const data = property && descriptor(property, "value");
|
|
86
|
+
if (!data) return currentProbe;
|
|
87
|
+
const candidate = data.value;
|
|
88
|
+
if (typeof candidate !== "function") return void 0;
|
|
89
|
+
const Constructor = candidate;
|
|
90
|
+
let probe = readProbe(Constructor);
|
|
91
|
+
if (probe === void 0) {
|
|
92
|
+
probe = createProbe(Constructor);
|
|
93
|
+
writeProbe(Constructor, probe);
|
|
94
|
+
}
|
|
95
|
+
currentProbe = probe;
|
|
96
|
+
return probe;
|
|
97
|
+
};
|
|
98
|
+
getProbe();
|
|
99
|
+
return getProbe;
|
|
100
|
+
}
|
|
101
|
+
function memoizeHost(Constructor, construct) {
|
|
102
|
+
const marker = findProperty(Constructor, "polyfilled");
|
|
103
|
+
return marker && ownValue(marker, "value") ? construct : memoize(construct, memoizeOptions);
|
|
104
|
+
}
|
|
105
|
+
const getDateTimeFormatProbe = retainProbe("DateTimeFormat", (Constructor) => {
|
|
106
|
+
const availableCalendars = ownValue(Constructor, availableCalendarsKey);
|
|
107
|
+
const hasTimeZone = ownValue(Constructor, hasTimeZoneKey);
|
|
108
|
+
return {
|
|
109
|
+
create: memoizeHost(Constructor, (locales, options) => new Constructor(locales, options)),
|
|
110
|
+
resolve: resolvedOptions(Constructor),
|
|
111
|
+
availableCalendars: typeof availableCalendars === "function" ? () => apply$1(availableCalendars, Constructor, []) : void 0,
|
|
112
|
+
hasTimeZone: typeof hasTimeZone === "function" ? (name) => apply$1(hasTimeZone, Constructor, [name]) : void 0
|
|
113
|
+
};
|
|
114
|
+
});
|
|
115
|
+
const getNumberFormatProbe = retainProbe("NumberFormat", (Constructor) => {
|
|
116
|
+
const property = findProperty(ownValue(Constructor, "prototype"), "format");
|
|
117
|
+
const getter = property && ownValue(property, "get");
|
|
118
|
+
const method = property && ownValue(property, "value");
|
|
119
|
+
const partsProperty = findProperty(ownValue(Constructor, "prototype"), "formatToParts");
|
|
120
|
+
const parts = partsProperty && ownValue(partsProperty, "value");
|
|
121
|
+
let format;
|
|
122
|
+
if (typeof getter === "function") format = (formatter, value) => apply$1(apply$1(getter, formatter, []), void 0, [value]);
|
|
123
|
+
else if (typeof method === "function") format = (formatter, value) => apply$1(method, formatter, [value]);
|
|
124
|
+
return {
|
|
125
|
+
create: memoizeHost(Constructor, (locales, options) => new Constructor(locales, options)),
|
|
126
|
+
resolve: resolvedOptions(Constructor),
|
|
127
|
+
format,
|
|
128
|
+
formatToParts: typeof parts === "function" ? (formatter, value) => apply$1(parts, formatter, [value]) : void 0
|
|
129
|
+
};
|
|
130
|
+
});
|
|
131
|
+
const getCollatorProbe = retainProbe("Collator", (Constructor) => ({
|
|
132
|
+
create: (locale) => new Constructor(locale),
|
|
133
|
+
resolve: resolvedOptions(Constructor)
|
|
134
|
+
}));
|
|
135
|
+
const getRelativeTimeFormatProbe = retainProbe("RelativeTimeFormat", (Constructor) => ({
|
|
136
|
+
create: (locale) => new Constructor(locale),
|
|
137
|
+
resolve: resolvedOptions(Constructor)
|
|
138
|
+
}));
|
|
139
|
+
const getCurrencyDisplayNamesProbe = retainProbe("DisplayNames", (Constructor) => {
|
|
140
|
+
const property = findProperty(ownValue(Constructor, "prototype"), "of");
|
|
141
|
+
const of = property && ownValue(property, "value");
|
|
142
|
+
return {
|
|
143
|
+
create: (locale) => new Constructor(locale, {
|
|
144
|
+
__proto__: null,
|
|
145
|
+
type: "currency",
|
|
146
|
+
fallback: "none"
|
|
147
|
+
}),
|
|
148
|
+
hasName: typeof of === "function" ? (formatter, code) => apply$1(of, formatter, [code]) !== void 0 : void 0
|
|
149
|
+
};
|
|
150
|
+
});
|
|
22
151
|
// node_modules/.aspect_rules_js/@formatjs_generated+cldr.supported-values@0.0.0/node_modules/@formatjs_generated/cldr.supported-values/calendars.js
|
|
23
152
|
const calendars = [
|
|
24
153
|
"buddhist",
|
|
@@ -35,33 +164,548 @@ const calendars = [
|
|
|
35
164
|
"islamic-rgsa",
|
|
36
165
|
"islamic-tbla",
|
|
37
166
|
"islamic-umalqura",
|
|
38
|
-
"islamicc",
|
|
39
167
|
"iso8601",
|
|
40
168
|
"japanese",
|
|
41
169
|
"persian",
|
|
42
170
|
"roc"
|
|
43
171
|
];
|
|
172
|
+
const calendarCandidateLocales = {
|
|
173
|
+
"buddhist": [
|
|
174
|
+
"en",
|
|
175
|
+
"th",
|
|
176
|
+
"th-TH",
|
|
177
|
+
"th-Thai-TH"
|
|
178
|
+
],
|
|
179
|
+
"chinese": [
|
|
180
|
+
"en",
|
|
181
|
+
"zh",
|
|
182
|
+
"zh-CN",
|
|
183
|
+
"zh-Hans-CN",
|
|
184
|
+
"zh-HK",
|
|
185
|
+
"zh-Hant-HK",
|
|
186
|
+
"zh-MO",
|
|
187
|
+
"zh-Hant-MO",
|
|
188
|
+
"zh-TW",
|
|
189
|
+
"zh-Hant-TW"
|
|
190
|
+
],
|
|
191
|
+
"coptic": [
|
|
192
|
+
"en",
|
|
193
|
+
"ar",
|
|
194
|
+
"ar-EG",
|
|
195
|
+
"ar-Arab-EG"
|
|
196
|
+
],
|
|
197
|
+
"dangi": [
|
|
198
|
+
"en",
|
|
199
|
+
"ko",
|
|
200
|
+
"ko-KR",
|
|
201
|
+
"ko-Kore-KR"
|
|
202
|
+
],
|
|
203
|
+
"ethioaa": [
|
|
204
|
+
"en",
|
|
205
|
+
"ar",
|
|
206
|
+
"fa",
|
|
207
|
+
"sq",
|
|
208
|
+
"az",
|
|
209
|
+
"bn",
|
|
210
|
+
"zh",
|
|
211
|
+
"fr",
|
|
212
|
+
"ti",
|
|
213
|
+
"am",
|
|
214
|
+
"id",
|
|
215
|
+
"he",
|
|
216
|
+
"hi",
|
|
217
|
+
"ja",
|
|
218
|
+
"ko",
|
|
219
|
+
"dv",
|
|
220
|
+
"ms",
|
|
221
|
+
"ha",
|
|
222
|
+
"ur",
|
|
223
|
+
"th",
|
|
224
|
+
"tg",
|
|
225
|
+
"tk",
|
|
226
|
+
"tr",
|
|
227
|
+
"uz"
|
|
228
|
+
],
|
|
229
|
+
"ethiopic": [
|
|
230
|
+
"en",
|
|
231
|
+
"am",
|
|
232
|
+
"am-ET",
|
|
233
|
+
"am-Ethi-ET"
|
|
234
|
+
],
|
|
235
|
+
"gregory": [
|
|
236
|
+
"en",
|
|
237
|
+
"ar",
|
|
238
|
+
"ar-AE",
|
|
239
|
+
"ar-Arab-AE",
|
|
240
|
+
"fa",
|
|
241
|
+
"fa-AF",
|
|
242
|
+
"fa-Arab-AF",
|
|
243
|
+
"sq",
|
|
244
|
+
"sq-AL",
|
|
245
|
+
"sq-Latn-AL",
|
|
246
|
+
"az",
|
|
247
|
+
"az-AZ",
|
|
248
|
+
"az-Latn-AZ",
|
|
249
|
+
"bn",
|
|
250
|
+
"bn-BD",
|
|
251
|
+
"bn-Beng-BD",
|
|
252
|
+
"ar-BH",
|
|
253
|
+
"ar-Arab-BH",
|
|
254
|
+
"zh",
|
|
255
|
+
"zh-CN",
|
|
256
|
+
"zh-Hans-CN",
|
|
257
|
+
"fr",
|
|
258
|
+
"fr-DJ",
|
|
259
|
+
"fr-Latn-DJ",
|
|
260
|
+
"ar-DZ",
|
|
261
|
+
"ar-Arab-DZ",
|
|
262
|
+
"ar-EG",
|
|
263
|
+
"ar-Arab-EG",
|
|
264
|
+
"ar-EH",
|
|
265
|
+
"ar-Arab-EH",
|
|
266
|
+
"ti",
|
|
267
|
+
"ti-ER",
|
|
268
|
+
"ti-Ethi-ER",
|
|
269
|
+
"am",
|
|
270
|
+
"am-ET",
|
|
271
|
+
"am-Ethi-ET",
|
|
272
|
+
"zh-HK",
|
|
273
|
+
"zh-Hant-HK",
|
|
274
|
+
"id",
|
|
275
|
+
"id-ID",
|
|
276
|
+
"id-Latn-ID",
|
|
277
|
+
"he",
|
|
278
|
+
"he-IL",
|
|
279
|
+
"he-Hebr-IL",
|
|
280
|
+
"hi",
|
|
281
|
+
"hi-IN",
|
|
282
|
+
"hi-Deva-IN",
|
|
283
|
+
"ar-IQ",
|
|
284
|
+
"ar-Arab-IQ",
|
|
285
|
+
"fa-IR",
|
|
286
|
+
"fa-Arab-IR",
|
|
287
|
+
"ar-JO",
|
|
288
|
+
"ar-Arab-JO",
|
|
289
|
+
"ja",
|
|
290
|
+
"ja-JP",
|
|
291
|
+
"ja-Jpan-JP",
|
|
292
|
+
"ar-KM",
|
|
293
|
+
"ar-Arab-KM",
|
|
294
|
+
"ko",
|
|
295
|
+
"ko-KR",
|
|
296
|
+
"ko-Kore-KR",
|
|
297
|
+
"ar-KW",
|
|
298
|
+
"ar-Arab-KW",
|
|
299
|
+
"ar-LB",
|
|
300
|
+
"ar-Arab-LB",
|
|
301
|
+
"ar-LY",
|
|
302
|
+
"ar-Arab-LY",
|
|
303
|
+
"ar-MA",
|
|
304
|
+
"ar-Arab-MA",
|
|
305
|
+
"zh-MO",
|
|
306
|
+
"zh-Hant-MO",
|
|
307
|
+
"ar-MR",
|
|
308
|
+
"ar-Arab-MR",
|
|
309
|
+
"dv",
|
|
310
|
+
"dv-MV",
|
|
311
|
+
"dv-Thaa-MV",
|
|
312
|
+
"ms",
|
|
313
|
+
"ms-MY",
|
|
314
|
+
"ms-Latn-MY",
|
|
315
|
+
"ha",
|
|
316
|
+
"ha-NE",
|
|
317
|
+
"ha-Latn-NE",
|
|
318
|
+
"ar-OM",
|
|
319
|
+
"ar-Arab-OM",
|
|
320
|
+
"ur",
|
|
321
|
+
"ur-PK",
|
|
322
|
+
"ur-Arab-PK",
|
|
323
|
+
"ar-PS",
|
|
324
|
+
"ar-Arab-PS",
|
|
325
|
+
"ar-QA",
|
|
326
|
+
"ar-Arab-QA",
|
|
327
|
+
"ar-SA",
|
|
328
|
+
"ar-Arab-SA",
|
|
329
|
+
"ar-SD",
|
|
330
|
+
"ar-Arab-SD",
|
|
331
|
+
"ar-SY",
|
|
332
|
+
"ar-Arab-SY",
|
|
333
|
+
"ar-TD",
|
|
334
|
+
"ar-Arab-TD",
|
|
335
|
+
"th",
|
|
336
|
+
"th-TH",
|
|
337
|
+
"th-Thai-TH",
|
|
338
|
+
"tg",
|
|
339
|
+
"tg-TJ",
|
|
340
|
+
"tg-Cyrl-TJ",
|
|
341
|
+
"tk",
|
|
342
|
+
"tk-TM",
|
|
343
|
+
"tk-Latn-TM",
|
|
344
|
+
"ar-TN",
|
|
345
|
+
"ar-Arab-TN",
|
|
346
|
+
"tr",
|
|
347
|
+
"tr-TR",
|
|
348
|
+
"tr-Latn-TR",
|
|
349
|
+
"zh-TW",
|
|
350
|
+
"zh-Hant-TW",
|
|
351
|
+
"uz",
|
|
352
|
+
"uz-UZ",
|
|
353
|
+
"uz-Latn-UZ",
|
|
354
|
+
"sq-XK",
|
|
355
|
+
"sq-Latn-XK",
|
|
356
|
+
"ar-YE",
|
|
357
|
+
"ar-Arab-YE"
|
|
358
|
+
],
|
|
359
|
+
"hebrew": [
|
|
360
|
+
"en",
|
|
361
|
+
"he",
|
|
362
|
+
"he-IL",
|
|
363
|
+
"he-Hebr-IL"
|
|
364
|
+
],
|
|
365
|
+
"indian": [
|
|
366
|
+
"en",
|
|
367
|
+
"hi",
|
|
368
|
+
"hi-IN",
|
|
369
|
+
"hi-Deva-IN"
|
|
370
|
+
],
|
|
371
|
+
"islamic": [
|
|
372
|
+
"en",
|
|
373
|
+
"ar",
|
|
374
|
+
"ar-AE",
|
|
375
|
+
"ar-Arab-AE",
|
|
376
|
+
"fa",
|
|
377
|
+
"fa-AF",
|
|
378
|
+
"fa-Arab-AF",
|
|
379
|
+
"bn",
|
|
380
|
+
"bn-BD",
|
|
381
|
+
"bn-Beng-BD",
|
|
382
|
+
"ar-BH",
|
|
383
|
+
"ar-Arab-BH",
|
|
384
|
+
"fr",
|
|
385
|
+
"fr-DJ",
|
|
386
|
+
"fr-Latn-DJ",
|
|
387
|
+
"ar-DZ",
|
|
388
|
+
"ar-Arab-DZ",
|
|
389
|
+
"ar-EG",
|
|
390
|
+
"ar-Arab-EG",
|
|
391
|
+
"ar-EH",
|
|
392
|
+
"ar-Arab-EH",
|
|
393
|
+
"ti",
|
|
394
|
+
"ti-ER",
|
|
395
|
+
"ti-Ethi-ER",
|
|
396
|
+
"id",
|
|
397
|
+
"id-ID",
|
|
398
|
+
"id-Latn-ID",
|
|
399
|
+
"he",
|
|
400
|
+
"he-IL",
|
|
401
|
+
"he-Hebr-IL",
|
|
402
|
+
"ar-IQ",
|
|
403
|
+
"ar-Arab-IQ",
|
|
404
|
+
"fa-IR",
|
|
405
|
+
"fa-Arab-IR",
|
|
406
|
+
"ar-JO",
|
|
407
|
+
"ar-Arab-JO",
|
|
408
|
+
"ar-KM",
|
|
409
|
+
"ar-Arab-KM",
|
|
410
|
+
"ar-KW",
|
|
411
|
+
"ar-Arab-KW",
|
|
412
|
+
"ar-LB",
|
|
413
|
+
"ar-Arab-LB",
|
|
414
|
+
"ar-LY",
|
|
415
|
+
"ar-Arab-LY",
|
|
416
|
+
"ar-MA",
|
|
417
|
+
"ar-Arab-MA",
|
|
418
|
+
"ar-MR",
|
|
419
|
+
"ar-Arab-MR",
|
|
420
|
+
"ms",
|
|
421
|
+
"ms-MY",
|
|
422
|
+
"ms-Latn-MY",
|
|
423
|
+
"ha",
|
|
424
|
+
"ha-NE",
|
|
425
|
+
"ha-Latn-NE",
|
|
426
|
+
"ar-OM",
|
|
427
|
+
"ar-Arab-OM",
|
|
428
|
+
"ur",
|
|
429
|
+
"ur-PK",
|
|
430
|
+
"ur-Arab-PK",
|
|
431
|
+
"ar-PS",
|
|
432
|
+
"ar-Arab-PS",
|
|
433
|
+
"ar-QA",
|
|
434
|
+
"ar-Arab-QA",
|
|
435
|
+
"ar-SA",
|
|
436
|
+
"ar-Arab-SA",
|
|
437
|
+
"ar-SD",
|
|
438
|
+
"ar-Arab-SD",
|
|
439
|
+
"ar-SY",
|
|
440
|
+
"ar-Arab-SY",
|
|
441
|
+
"ar-TD",
|
|
442
|
+
"ar-Arab-TD",
|
|
443
|
+
"ar-TN",
|
|
444
|
+
"ar-Arab-TN",
|
|
445
|
+
"ar-YE",
|
|
446
|
+
"ar-Arab-YE"
|
|
447
|
+
],
|
|
448
|
+
"islamic-civil": [
|
|
449
|
+
"en",
|
|
450
|
+
"ar",
|
|
451
|
+
"ar-AE",
|
|
452
|
+
"ar-Arab-AE",
|
|
453
|
+
"fa",
|
|
454
|
+
"fa-AF",
|
|
455
|
+
"fa-Arab-AF",
|
|
456
|
+
"sq",
|
|
457
|
+
"sq-AL",
|
|
458
|
+
"sq-Latn-AL",
|
|
459
|
+
"az",
|
|
460
|
+
"az-AZ",
|
|
461
|
+
"az-Latn-AZ",
|
|
462
|
+
"bn",
|
|
463
|
+
"bn-BD",
|
|
464
|
+
"bn-Beng-BD",
|
|
465
|
+
"ar-BH",
|
|
466
|
+
"ar-Arab-BH",
|
|
467
|
+
"fr",
|
|
468
|
+
"fr-DJ",
|
|
469
|
+
"fr-Latn-DJ",
|
|
470
|
+
"ar-DZ",
|
|
471
|
+
"ar-Arab-DZ",
|
|
472
|
+
"ar-EG",
|
|
473
|
+
"ar-Arab-EG",
|
|
474
|
+
"ar-EH",
|
|
475
|
+
"ar-Arab-EH",
|
|
476
|
+
"ti",
|
|
477
|
+
"ti-ER",
|
|
478
|
+
"ti-Ethi-ER",
|
|
479
|
+
"id",
|
|
480
|
+
"id-ID",
|
|
481
|
+
"id-Latn-ID",
|
|
482
|
+
"he",
|
|
483
|
+
"he-IL",
|
|
484
|
+
"he-Hebr-IL",
|
|
485
|
+
"ar-IQ",
|
|
486
|
+
"ar-Arab-IQ",
|
|
487
|
+
"fa-IR",
|
|
488
|
+
"fa-Arab-IR",
|
|
489
|
+
"ar-JO",
|
|
490
|
+
"ar-Arab-JO",
|
|
491
|
+
"ar-KM",
|
|
492
|
+
"ar-Arab-KM",
|
|
493
|
+
"ar-KW",
|
|
494
|
+
"ar-Arab-KW",
|
|
495
|
+
"ar-LB",
|
|
496
|
+
"ar-Arab-LB",
|
|
497
|
+
"ar-LY",
|
|
498
|
+
"ar-Arab-LY",
|
|
499
|
+
"ar-MA",
|
|
500
|
+
"ar-Arab-MA",
|
|
501
|
+
"ar-MR",
|
|
502
|
+
"ar-Arab-MR",
|
|
503
|
+
"dv",
|
|
504
|
+
"dv-MV",
|
|
505
|
+
"dv-Thaa-MV",
|
|
506
|
+
"ms",
|
|
507
|
+
"ms-MY",
|
|
508
|
+
"ms-Latn-MY",
|
|
509
|
+
"ha",
|
|
510
|
+
"ha-NE",
|
|
511
|
+
"ha-Latn-NE",
|
|
512
|
+
"ar-OM",
|
|
513
|
+
"ar-Arab-OM",
|
|
514
|
+
"ur",
|
|
515
|
+
"ur-PK",
|
|
516
|
+
"ur-Arab-PK",
|
|
517
|
+
"ar-PS",
|
|
518
|
+
"ar-Arab-PS",
|
|
519
|
+
"ar-QA",
|
|
520
|
+
"ar-Arab-QA",
|
|
521
|
+
"ar-SD",
|
|
522
|
+
"ar-Arab-SD",
|
|
523
|
+
"ar-SY",
|
|
524
|
+
"ar-Arab-SY",
|
|
525
|
+
"ar-TD",
|
|
526
|
+
"ar-Arab-TD",
|
|
527
|
+
"tg",
|
|
528
|
+
"tg-TJ",
|
|
529
|
+
"tg-Cyrl-TJ",
|
|
530
|
+
"tk",
|
|
531
|
+
"tk-TM",
|
|
532
|
+
"tk-Latn-TM",
|
|
533
|
+
"ar-TN",
|
|
534
|
+
"ar-Arab-TN",
|
|
535
|
+
"tr",
|
|
536
|
+
"tr-TR",
|
|
537
|
+
"tr-Latn-TR",
|
|
538
|
+
"uz",
|
|
539
|
+
"uz-UZ",
|
|
540
|
+
"uz-Latn-UZ",
|
|
541
|
+
"sq-XK",
|
|
542
|
+
"sq-Latn-XK",
|
|
543
|
+
"ar-YE",
|
|
544
|
+
"ar-Arab-YE"
|
|
545
|
+
],
|
|
546
|
+
"islamic-rgsa": [
|
|
547
|
+
"en",
|
|
548
|
+
"ar",
|
|
549
|
+
"ar-SA",
|
|
550
|
+
"ar-Arab-SA"
|
|
551
|
+
],
|
|
552
|
+
"islamic-tbla": [
|
|
553
|
+
"en",
|
|
554
|
+
"ar",
|
|
555
|
+
"ar-AE",
|
|
556
|
+
"ar-Arab-AE",
|
|
557
|
+
"fa",
|
|
558
|
+
"fa-AF",
|
|
559
|
+
"fa-Arab-AF",
|
|
560
|
+
"sq",
|
|
561
|
+
"sq-AL",
|
|
562
|
+
"sq-Latn-AL",
|
|
563
|
+
"az",
|
|
564
|
+
"az-AZ",
|
|
565
|
+
"az-Latn-AZ",
|
|
566
|
+
"bn",
|
|
567
|
+
"bn-BD",
|
|
568
|
+
"bn-Beng-BD",
|
|
569
|
+
"ar-BH",
|
|
570
|
+
"ar-Arab-BH",
|
|
571
|
+
"fr",
|
|
572
|
+
"fr-DJ",
|
|
573
|
+
"fr-Latn-DJ",
|
|
574
|
+
"ar-DZ",
|
|
575
|
+
"ar-Arab-DZ",
|
|
576
|
+
"ar-EG",
|
|
577
|
+
"ar-Arab-EG",
|
|
578
|
+
"ar-EH",
|
|
579
|
+
"ar-Arab-EH",
|
|
580
|
+
"ti",
|
|
581
|
+
"ti-ER",
|
|
582
|
+
"ti-Ethi-ER",
|
|
583
|
+
"id",
|
|
584
|
+
"id-ID",
|
|
585
|
+
"id-Latn-ID",
|
|
586
|
+
"he",
|
|
587
|
+
"he-IL",
|
|
588
|
+
"he-Hebr-IL",
|
|
589
|
+
"ar-IQ",
|
|
590
|
+
"ar-Arab-IQ",
|
|
591
|
+
"fa-IR",
|
|
592
|
+
"fa-Arab-IR",
|
|
593
|
+
"ar-JO",
|
|
594
|
+
"ar-Arab-JO",
|
|
595
|
+
"ar-KM",
|
|
596
|
+
"ar-Arab-KM",
|
|
597
|
+
"ar-KW",
|
|
598
|
+
"ar-Arab-KW",
|
|
599
|
+
"ar-LB",
|
|
600
|
+
"ar-Arab-LB",
|
|
601
|
+
"ar-LY",
|
|
602
|
+
"ar-Arab-LY",
|
|
603
|
+
"ar-MA",
|
|
604
|
+
"ar-Arab-MA",
|
|
605
|
+
"ar-MR",
|
|
606
|
+
"ar-Arab-MR",
|
|
607
|
+
"dv",
|
|
608
|
+
"dv-MV",
|
|
609
|
+
"dv-Thaa-MV",
|
|
610
|
+
"ms",
|
|
611
|
+
"ms-MY",
|
|
612
|
+
"ms-Latn-MY",
|
|
613
|
+
"ha",
|
|
614
|
+
"ha-NE",
|
|
615
|
+
"ha-Latn-NE",
|
|
616
|
+
"ar-OM",
|
|
617
|
+
"ar-Arab-OM",
|
|
618
|
+
"ur",
|
|
619
|
+
"ur-PK",
|
|
620
|
+
"ur-Arab-PK",
|
|
621
|
+
"ar-PS",
|
|
622
|
+
"ar-Arab-PS",
|
|
623
|
+
"ar-QA",
|
|
624
|
+
"ar-Arab-QA",
|
|
625
|
+
"ar-SD",
|
|
626
|
+
"ar-Arab-SD",
|
|
627
|
+
"ar-SY",
|
|
628
|
+
"ar-Arab-SY",
|
|
629
|
+
"ar-TD",
|
|
630
|
+
"ar-Arab-TD",
|
|
631
|
+
"tg",
|
|
632
|
+
"tg-TJ",
|
|
633
|
+
"tg-Cyrl-TJ",
|
|
634
|
+
"tk",
|
|
635
|
+
"tk-TM",
|
|
636
|
+
"tk-Latn-TM",
|
|
637
|
+
"ar-TN",
|
|
638
|
+
"ar-Arab-TN",
|
|
639
|
+
"tr",
|
|
640
|
+
"tr-TR",
|
|
641
|
+
"tr-Latn-TR",
|
|
642
|
+
"uz",
|
|
643
|
+
"uz-UZ",
|
|
644
|
+
"uz-Latn-UZ",
|
|
645
|
+
"sq-XK",
|
|
646
|
+
"sq-Latn-XK",
|
|
647
|
+
"ar-YE",
|
|
648
|
+
"ar-Arab-YE"
|
|
649
|
+
],
|
|
650
|
+
"islamic-umalqura": [
|
|
651
|
+
"en",
|
|
652
|
+
"ar",
|
|
653
|
+
"ar-AE",
|
|
654
|
+
"ar-Arab-AE",
|
|
655
|
+
"ar-BH",
|
|
656
|
+
"ar-Arab-BH",
|
|
657
|
+
"ar-KW",
|
|
658
|
+
"ar-Arab-KW",
|
|
659
|
+
"ar-QA",
|
|
660
|
+
"ar-Arab-QA",
|
|
661
|
+
"ar-SA",
|
|
662
|
+
"ar-Arab-SA"
|
|
663
|
+
],
|
|
664
|
+
"iso8601": ["en"],
|
|
665
|
+
"japanese": [
|
|
666
|
+
"en",
|
|
667
|
+
"ja",
|
|
668
|
+
"ja-JP",
|
|
669
|
+
"ja-Jpan-JP"
|
|
670
|
+
],
|
|
671
|
+
"persian": [
|
|
672
|
+
"en",
|
|
673
|
+
"fa",
|
|
674
|
+
"fa-AF",
|
|
675
|
+
"fa-Arab-AF",
|
|
676
|
+
"fa-IR",
|
|
677
|
+
"fa-Arab-IR"
|
|
678
|
+
],
|
|
679
|
+
"roc": [
|
|
680
|
+
"en",
|
|
681
|
+
"zh",
|
|
682
|
+
"zh-TW",
|
|
683
|
+
"zh-Hant-TW"
|
|
684
|
+
]
|
|
685
|
+
};
|
|
44
686
|
// packages/intl-supportedvaluesof/get-supported-calendars.ts
|
|
45
|
-
/**
|
|
46
|
-
* Implementation: Tests if a calendar is supported by attempting to create
|
|
47
|
-
* a DateTimeFormat with that calendar and verifying it was accepted.
|
|
48
|
-
*
|
|
49
|
-
* CLDR Data: Candidate values come from CLDR calendar types
|
|
50
|
-
*/
|
|
51
|
-
function isSupportedCalendar(item) {
|
|
52
|
-
try {
|
|
53
|
-
return createMemoizedDateTimeFormat(`en-u-ca-${item}`).resolvedOptions().calendar === item;
|
|
54
|
-
} catch {}
|
|
55
|
-
return false;
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* ECMA-402 Spec: Returns supported calendar identifiers
|
|
59
|
-
* ECMA-402 Spec: Results must be sorted lexicographically
|
|
60
|
-
*
|
|
61
|
-
* Implementation: Filters CLDR list against actual runtime support
|
|
62
|
-
*/
|
|
63
687
|
function getSupportedCalendars() {
|
|
64
|
-
|
|
688
|
+
const probe = getDateTimeFormatProbe();
|
|
689
|
+
if (probe?.availableCalendars) try {
|
|
690
|
+
const available = probe.availableCalendars();
|
|
691
|
+
return supportedEntries(calendars, (calendar) => calendar === "iso8601" || arrayIndexOf(available, calendar) >= 0);
|
|
692
|
+
} catch {}
|
|
693
|
+
if (!probe?.resolve) return ["iso8601"];
|
|
694
|
+
const { create, resolve } = probe;
|
|
695
|
+
return supportedEntries(calendars, (calendar) => {
|
|
696
|
+
if (calendar === "iso8601") return true;
|
|
697
|
+
const options = {
|
|
698
|
+
__proto__: null,
|
|
699
|
+
calendar
|
|
700
|
+
};
|
|
701
|
+
return arraySome(calendarCandidateLocales[calendar], (locale) => {
|
|
702
|
+
try {
|
|
703
|
+
return resolve(create(`${locale}-u-ca-${calendar}`, options)).calendar === calendar;
|
|
704
|
+
} catch {
|
|
705
|
+
return false;
|
|
706
|
+
}
|
|
707
|
+
});
|
|
708
|
+
});
|
|
65
709
|
}
|
|
66
710
|
// node_modules/.aspect_rules_js/@formatjs_generated+cldr.supported-values@0.0.0/node_modules/@formatjs_generated/cldr.supported-values/collations.js
|
|
67
711
|
const collations = [
|
|
@@ -385,89 +1029,26 @@ const collationCandidateLocales = {
|
|
|
385
1029
|
"zhuyin": ["zh", "zh-Hant"]
|
|
386
1030
|
};
|
|
387
1031
|
// packages/intl-supportedvaluesof/get-supported-collations.ts
|
|
388
|
-
function isSupportedCollation(collation) {
|
|
389
|
-
const candidates = collationCandidateLocales[collation] || ["en"];
|
|
390
|
-
for (const locale of candidates) try {
|
|
391
|
-
if (new Intl.Collator(`${locale}-u-co-${collation}`).resolvedOptions().collation === collation) return true;
|
|
392
|
-
} catch {}
|
|
393
|
-
return false;
|
|
394
|
-
}
|
|
395
1032
|
function getSupportedCollations() {
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
configurable: true,
|
|
409
|
-
enumerable: false,
|
|
410
|
-
writable: true,
|
|
411
|
-
value
|
|
412
|
-
});
|
|
413
|
-
}
|
|
414
|
-
function ensureIntl() {
|
|
415
|
-
if (typeof Intl === "undefined") Object.defineProperty(globalThis, "Intl", {
|
|
416
|
-
configurable: true,
|
|
417
|
-
enumerable: false,
|
|
418
|
-
writable: true,
|
|
419
|
-
value: {}
|
|
1033
|
+
const probe = getCollatorProbe();
|
|
1034
|
+
if (!probe?.resolve) return [];
|
|
1035
|
+
const { create, resolve } = probe;
|
|
1036
|
+
return supportedEntries(collations, (collation) => {
|
|
1037
|
+
const candidates = collationCandidateLocales[collation] || ["en"];
|
|
1038
|
+
for (let index = 0; index < candidates.length; index++) {
|
|
1039
|
+
const locale = candidates[index];
|
|
1040
|
+
try {
|
|
1041
|
+
if (resolve(create(`${locale}-u-co-${collation}`)).collation === collation) return true;
|
|
1042
|
+
} catch {}
|
|
1043
|
+
}
|
|
1044
|
+
return false;
|
|
420
1045
|
});
|
|
421
|
-
if (providerIntl === void 0) providerIntl = Intl;
|
|
422
|
-
return Intl;
|
|
423
|
-
}
|
|
424
|
-
const createMemoizedNumberFormat = memoize((...args) => new Intl.NumberFormat(...args), { strategy: strategies.variadic });
|
|
425
|
-
memoize((...args) => new Intl.PluralRules(...args), { strategy: strategies.variadic });
|
|
426
|
-
memoize((...args) => new Intl.ListFormat(...args), { strategy: strategies.variadic });
|
|
427
|
-
const getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
428
|
-
strategies.variadic;
|
|
429
|
-
let providerIntl = globalThis.Intl;
|
|
430
|
-
function ownIntlProvider(name) {
|
|
431
|
-
const descriptor = providerIntl && getOwnPropertyDescriptor(providerIntl, name);
|
|
432
|
-
return (descriptor && getOwnPropertyDescriptor(descriptor, "value"))?.value;
|
|
433
1046
|
}
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
const formatterPartsOwners = /* @__PURE__ */ new WeakMap();
|
|
439
|
-
const getPartsMethod = formatterPartsMethods.get.bind(formatterPartsMethods);
|
|
440
|
-
const setPartsMethod = formatterPartsMethods.set.bind(formatterPartsMethods);
|
|
441
|
-
const getPartsOwner = formatterPartsOwners.get.bind(formatterPartsOwners);
|
|
442
|
-
const setPartsOwner = formatterPartsOwners.set.bind(formatterPartsOwners);
|
|
443
|
-
function findFormatterPartsMethod(Constructor) {
|
|
444
|
-
const cached = getPartsMethod(Constructor);
|
|
445
|
-
if (cached) return cached;
|
|
446
|
-
let prototype = getOwnPropertyDescriptor(Constructor, "prototype")?.value;
|
|
447
|
-
while (prototype != null) {
|
|
448
|
-
const inherited = getPartsOwner(prototype);
|
|
449
|
-
if (inherited) {
|
|
450
|
-
setPartsMethod(Constructor, inherited);
|
|
451
|
-
return inherited;
|
|
452
|
-
}
|
|
453
|
-
const descriptor = getOwnPropertyDescriptor(prototype, "formatToParts");
|
|
454
|
-
const value = descriptor && getOwnPropertyDescriptor(descriptor, "value");
|
|
455
|
-
if (value && typeof value.value === "function") {
|
|
456
|
-
setPartsMethod(Constructor, value.value);
|
|
457
|
-
setPartsOwner(prototype, value.value);
|
|
458
|
-
return value.value;
|
|
459
|
-
}
|
|
460
|
-
prototype = getFormatterPrototype(prototype);
|
|
461
|
-
}
|
|
1047
|
+
// packages/ecma262-abstract/HasOwnProperty.js
|
|
1048
|
+
const hasOwn = Function.prototype.call.bind(Object.prototype.hasOwnProperty);
|
|
1049
|
+
function HasOwnProperty(o, prop) {
|
|
1050
|
+
return hasOwn(o, prop);
|
|
462
1051
|
}
|
|
463
|
-
if (typeof numberFormatProvider === "function") findFormatterPartsMethod(numberFormatProvider);
|
|
464
|
-
if (typeof listFormatProvider === "function") findFormatterPartsMethod(listFormatProvider);
|
|
465
|
-
const numberFormatMemoizers = /* @__PURE__ */ new WeakMap();
|
|
466
|
-
numberFormatMemoizers.get.bind(numberFormatMemoizers);
|
|
467
|
-
numberFormatMemoizers.set.bind(numberFormatMemoizers);
|
|
468
|
-
const listFormatMemoizers = /* @__PURE__ */ new WeakMap();
|
|
469
|
-
listFormatMemoizers.get.bind(listFormatMemoizers);
|
|
470
|
-
listFormatMemoizers.set.bind(listFormatMemoizers);
|
|
471
1052
|
// node_modules/.aspect_rules_js/@formatjs_generated+cldr.supported-values@0.0.0/node_modules/@formatjs_generated/cldr.supported-values/currencies.js
|
|
472
1053
|
const currencies = [
|
|
473
1054
|
"ADP",
|
|
@@ -536,6 +1117,7 @@ const currencies = [
|
|
|
536
1117
|
"CLF",
|
|
537
1118
|
"CLP",
|
|
538
1119
|
"CNH",
|
|
1120
|
+
"CNX",
|
|
539
1121
|
"CNY",
|
|
540
1122
|
"COP",
|
|
541
1123
|
"COU",
|
|
@@ -738,6 +1320,7 @@ const currencies = [
|
|
|
738
1320
|
"VNN",
|
|
739
1321
|
"VUV",
|
|
740
1322
|
"WST",
|
|
1323
|
+
"XAD",
|
|
741
1324
|
"XAF",
|
|
742
1325
|
"XAG",
|
|
743
1326
|
"XAU",
|
|
@@ -777,44 +1360,64 @@ const currencies = [
|
|
|
777
1360
|
"ZWL",
|
|
778
1361
|
"ZWR"
|
|
779
1362
|
];
|
|
1363
|
+
const currencyCandidateLocales = { "XAD": ["en", "cv"] };
|
|
780
1364
|
// packages/intl-supportedvaluesof/get-supported-currencies.ts
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
*/
|
|
787
|
-
function isSupportedCurrency(currency) {
|
|
788
|
-
try {
|
|
789
|
-
const format = createMemoizedNumberFormat("en", {
|
|
790
|
-
style: "currency",
|
|
791
|
-
currencyDisplay: "name",
|
|
792
|
-
currency
|
|
793
|
-
}).format(123);
|
|
794
|
-
if (format.substring(0, 3) !== currency && format.substring(format.length - 3) !== currency) return true;
|
|
795
|
-
} catch {}
|
|
796
|
-
return false;
|
|
797
|
-
}
|
|
798
|
-
/**
|
|
799
|
-
* ECMA-402 Spec: Returns supported currency identifiers
|
|
800
|
-
* ECMA-402 Spec: Results must be sorted lexicographically
|
|
801
|
-
*
|
|
802
|
-
* Implementation: Filters CLDR list against actual runtime support
|
|
803
|
-
*/
|
|
1365
|
+
const apply = Reflect.apply;
|
|
1366
|
+
const createObject = Object.create;
|
|
1367
|
+
const stringIndexOf = String.prototype.indexOf;
|
|
1368
|
+
const stringSlice = String.prototype.slice;
|
|
1369
|
+
const english = ["en"];
|
|
804
1370
|
function getSupportedCurrencies() {
|
|
1371
|
+
const probe = getNumberFormatProbe();
|
|
1372
|
+
if (!probe || !probe.formatToParts && !probe.format) return [];
|
|
1373
|
+
const { create, format, formatToParts } = probe;
|
|
1374
|
+
const namesProbe = getCurrencyDisplayNamesProbe();
|
|
1375
|
+
if (namesProbe && !namesProbe.hasName) return [];
|
|
1376
|
+
const namesByLocale = createObject(null);
|
|
805
1377
|
const ATOZ = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
806
|
-
const
|
|
807
|
-
for (
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
const
|
|
814
|
-
|
|
1378
|
+
const candidates = [];
|
|
1379
|
+
for (let index = 0; index < currencies.length; index++) {
|
|
1380
|
+
const currency = currencies[index];
|
|
1381
|
+
if (currency.length === 3) setDataProperty(candidates, `${candidates.length}`, currency);
|
|
1382
|
+
else if (currency.length === 5 && currency[3] === "~") {
|
|
1383
|
+
const start = apply(stringIndexOf, ATOZ, [currency[2]]);
|
|
1384
|
+
const end = apply(stringIndexOf, ATOZ, [currency[4]]);
|
|
1385
|
+
const prefix = currency[0] + currency[1];
|
|
1386
|
+
for (let i = start; i <= end; i++) setDataProperty(candidates, `${candidates.length}`, prefix + ATOZ[i]);
|
|
815
1387
|
}
|
|
816
1388
|
}
|
|
817
|
-
return
|
|
1389
|
+
return supportedEntries(candidates, (currency) => {
|
|
1390
|
+
return arraySome(HasOwnProperty(currencyCandidateLocales, currency) ? currencyCandidateLocales[currency] : english, (locale) => {
|
|
1391
|
+
try {
|
|
1392
|
+
if (namesProbe) {
|
|
1393
|
+
let names = namesByLocale[locale];
|
|
1394
|
+
if (names === void 0) {
|
|
1395
|
+
namesByLocale[locale] = null;
|
|
1396
|
+
names = namesByLocale[locale] = namesProbe.create(locale);
|
|
1397
|
+
}
|
|
1398
|
+
if (!names || !namesProbe.hasName?.(names, currency)) return false;
|
|
1399
|
+
}
|
|
1400
|
+
const formatter = create(locale, {
|
|
1401
|
+
__proto__: null,
|
|
1402
|
+
style: "currency",
|
|
1403
|
+
currencyDisplay: "name",
|
|
1404
|
+
currency
|
|
1405
|
+
});
|
|
1406
|
+
if (formatToParts) {
|
|
1407
|
+
const parts = formatToParts(formatter, 123);
|
|
1408
|
+
for (let i = 0; i < parts.length; i++) {
|
|
1409
|
+
const part = parts[i];
|
|
1410
|
+
if (part.type === "currency" && part.value !== currency) return true;
|
|
1411
|
+
}
|
|
1412
|
+
return false;
|
|
1413
|
+
}
|
|
1414
|
+
const text = format(formatter, 123);
|
|
1415
|
+
return apply(stringSlice, text, [0, 3]) !== currency && apply(stringSlice, text, [-3]) !== currency;
|
|
1416
|
+
} catch {
|
|
1417
|
+
return false;
|
|
1418
|
+
}
|
|
1419
|
+
});
|
|
1420
|
+
});
|
|
818
1421
|
}
|
|
819
1422
|
// node_modules/.aspect_rules_js/@formatjs_generated+cldr.number@0.0.0/node_modules/@formatjs_generated/cldr.number/numbering-systems.js
|
|
820
1423
|
const numberingSystemNames = [
|
|
@@ -916,28 +1519,183 @@ const numberingSystemNames = [
|
|
|
916
1519
|
"wara",
|
|
917
1520
|
"wcho"
|
|
918
1521
|
];
|
|
1522
|
+
const numericNumberingSystemNames = [
|
|
1523
|
+
"adlm",
|
|
1524
|
+
"ahom",
|
|
1525
|
+
"arab",
|
|
1526
|
+
"arabext",
|
|
1527
|
+
"bali",
|
|
1528
|
+
"beng",
|
|
1529
|
+
"bhks",
|
|
1530
|
+
"brah",
|
|
1531
|
+
"cakm",
|
|
1532
|
+
"cham",
|
|
1533
|
+
"deva",
|
|
1534
|
+
"diak",
|
|
1535
|
+
"fullwide",
|
|
1536
|
+
"gara",
|
|
1537
|
+
"gong",
|
|
1538
|
+
"gonm",
|
|
1539
|
+
"gujr",
|
|
1540
|
+
"gukh",
|
|
1541
|
+
"guru",
|
|
1542
|
+
"hanidec",
|
|
1543
|
+
"hmng",
|
|
1544
|
+
"hmnp",
|
|
1545
|
+
"java",
|
|
1546
|
+
"kali",
|
|
1547
|
+
"kawi",
|
|
1548
|
+
"khmr",
|
|
1549
|
+
"knda",
|
|
1550
|
+
"krai",
|
|
1551
|
+
"lana",
|
|
1552
|
+
"lanatham",
|
|
1553
|
+
"laoo",
|
|
1554
|
+
"latn",
|
|
1555
|
+
"lepc",
|
|
1556
|
+
"limb",
|
|
1557
|
+
"mathbold",
|
|
1558
|
+
"mathdbl",
|
|
1559
|
+
"mathmono",
|
|
1560
|
+
"mathsanb",
|
|
1561
|
+
"mathsans",
|
|
1562
|
+
"mlym",
|
|
1563
|
+
"modi",
|
|
1564
|
+
"mong",
|
|
1565
|
+
"mroo",
|
|
1566
|
+
"mtei",
|
|
1567
|
+
"mymr",
|
|
1568
|
+
"mymrepka",
|
|
1569
|
+
"mymrpao",
|
|
1570
|
+
"mymrshan",
|
|
1571
|
+
"mymrtlng",
|
|
1572
|
+
"nagm",
|
|
1573
|
+
"newa",
|
|
1574
|
+
"nkoo",
|
|
1575
|
+
"olck",
|
|
1576
|
+
"onao",
|
|
1577
|
+
"orya",
|
|
1578
|
+
"osma",
|
|
1579
|
+
"outlined",
|
|
1580
|
+
"rohg",
|
|
1581
|
+
"saur",
|
|
1582
|
+
"segment",
|
|
1583
|
+
"shrd",
|
|
1584
|
+
"sind",
|
|
1585
|
+
"sinh",
|
|
1586
|
+
"sora",
|
|
1587
|
+
"sund",
|
|
1588
|
+
"sunu",
|
|
1589
|
+
"takr",
|
|
1590
|
+
"talu",
|
|
1591
|
+
"tamldec",
|
|
1592
|
+
"telu",
|
|
1593
|
+
"thai",
|
|
1594
|
+
"tibt",
|
|
1595
|
+
"tirh",
|
|
1596
|
+
"tnsa",
|
|
1597
|
+
"tols",
|
|
1598
|
+
"vaii",
|
|
1599
|
+
"wara",
|
|
1600
|
+
"wcho"
|
|
1601
|
+
];
|
|
1602
|
+
const numberingSystemCandidateLocales = {
|
|
1603
|
+
"armn": ["en", "hy"],
|
|
1604
|
+
"armnlow": ["en"],
|
|
1605
|
+
"cyrl": ["en"],
|
|
1606
|
+
"ethi": [
|
|
1607
|
+
"en",
|
|
1608
|
+
"am",
|
|
1609
|
+
"om",
|
|
1610
|
+
"om-KE",
|
|
1611
|
+
"ti",
|
|
1612
|
+
"ti-ER"
|
|
1613
|
+
],
|
|
1614
|
+
"geor": ["en", "ka"],
|
|
1615
|
+
"grek": [
|
|
1616
|
+
"en",
|
|
1617
|
+
"el",
|
|
1618
|
+
"el-CY",
|
|
1619
|
+
"el-polyton"
|
|
1620
|
+
],
|
|
1621
|
+
"greklow": ["en"],
|
|
1622
|
+
"hanidays": ["en", "zh"],
|
|
1623
|
+
"hans": [
|
|
1624
|
+
"en",
|
|
1625
|
+
"zh",
|
|
1626
|
+
"zh-Hans",
|
|
1627
|
+
"zh-Hans-HK",
|
|
1628
|
+
"zh-Hans-MO",
|
|
1629
|
+
"zh-Hans-MY",
|
|
1630
|
+
"zh-Hans-SG"
|
|
1631
|
+
],
|
|
1632
|
+
"hansfin": [
|
|
1633
|
+
"en",
|
|
1634
|
+
"zh",
|
|
1635
|
+
"zh-Hans",
|
|
1636
|
+
"zh-Hans-HK",
|
|
1637
|
+
"zh-Hans-MO",
|
|
1638
|
+
"zh-Hans-MY",
|
|
1639
|
+
"zh-Hans-SG"
|
|
1640
|
+
],
|
|
1641
|
+
"hant": [
|
|
1642
|
+
"en",
|
|
1643
|
+
"zh-Hant",
|
|
1644
|
+
"yue",
|
|
1645
|
+
"yue-Hans",
|
|
1646
|
+
"yue-Hant",
|
|
1647
|
+
"yue-Hant-CN",
|
|
1648
|
+
"yue-Hant-MO",
|
|
1649
|
+
"zh-Hant-HK",
|
|
1650
|
+
"zh-Hant-MO",
|
|
1651
|
+
"zh-Hant-MY"
|
|
1652
|
+
],
|
|
1653
|
+
"hantfin": [
|
|
1654
|
+
"en",
|
|
1655
|
+
"zh-Hant",
|
|
1656
|
+
"yue",
|
|
1657
|
+
"yue-Hans",
|
|
1658
|
+
"yue-Hant",
|
|
1659
|
+
"yue-Hant-CN",
|
|
1660
|
+
"yue-Hant-MO",
|
|
1661
|
+
"zh-Hant-HK",
|
|
1662
|
+
"zh-Hant-MO",
|
|
1663
|
+
"zh-Hant-MY"
|
|
1664
|
+
],
|
|
1665
|
+
"hebr": [
|
|
1666
|
+
"en",
|
|
1667
|
+
"he",
|
|
1668
|
+
"yi"
|
|
1669
|
+
],
|
|
1670
|
+
"jpan": ["en", "ja"],
|
|
1671
|
+
"jpanfin": ["en", "ja"],
|
|
1672
|
+
"jpanyear": ["en", "ja"],
|
|
1673
|
+
"roman": ["en"],
|
|
1674
|
+
"romanlow": ["en"],
|
|
1675
|
+
"taml": [
|
|
1676
|
+
"en",
|
|
1677
|
+
"ta",
|
|
1678
|
+
"ta-LK",
|
|
1679
|
+
"ta-MY",
|
|
1680
|
+
"ta-SG"
|
|
1681
|
+
]
|
|
1682
|
+
};
|
|
919
1683
|
// packages/intl-supportedvaluesof/get-supported-numbering-systems.ts
|
|
920
|
-
/**
|
|
921
|
-
* Implementation: Tests if a numbering system is supported by attempting to create
|
|
922
|
-
* a NumberFormat with that numbering system and verifying it was accepted.
|
|
923
|
-
*
|
|
924
|
-
* CLDR Data: Candidate values come from CLDR numbering system types
|
|
925
|
-
*/
|
|
926
|
-
function isSupportedNumberingSystem(system) {
|
|
927
|
-
try {
|
|
928
|
-
const numberFormat = createMemoizedNumberFormat(`en-u-nu-${system}`);
|
|
929
|
-
if (numberFormat.resolvedOptions().numberingSystem === system && system === "latn" || numberFormat.format(123) !== "123") return true;
|
|
930
|
-
} catch {}
|
|
931
|
-
return false;
|
|
932
|
-
}
|
|
933
|
-
/**
|
|
934
|
-
* ECMA-402 Spec: Returns supported numbering system identifiers
|
|
935
|
-
* ECMA-402 Spec: Results must be sorted lexicographically
|
|
936
|
-
*
|
|
937
|
-
* Implementation: Filters CLDR list against actual runtime support
|
|
938
|
-
*/
|
|
939
1684
|
function getSupportedNumberingSystems() {
|
|
940
|
-
|
|
1685
|
+
const number = getNumberFormatProbe();
|
|
1686
|
+
const date = getDateTimeFormatProbe();
|
|
1687
|
+
const relative = getRelativeTimeFormatProbe();
|
|
1688
|
+
return supportedEntries(numberingSystemNames, (system) => {
|
|
1689
|
+
if (arrayIndexOf(numericNumberingSystemNames, system) >= 0) return true;
|
|
1690
|
+
return arraySome(numberingSystemCandidateLocales[system], (candidate) => {
|
|
1691
|
+
const locale = `${candidate}-u-nu-${system}`;
|
|
1692
|
+
try {
|
|
1693
|
+
return number?.resolve?.(number.create(locale)).numberingSystem === system && date?.resolve?.(date.create(locale)).numberingSystem === system && relative?.resolve?.(relative.create(locale)).numberingSystem === system;
|
|
1694
|
+
} catch {
|
|
1695
|
+
return false;
|
|
1696
|
+
}
|
|
1697
|
+
});
|
|
1698
|
+
});
|
|
941
1699
|
}
|
|
942
1700
|
// node_modules/.aspect_rules_js/@formatjs_generated+cldr.supported-values@0.0.0/node_modules/@formatjs_generated/cldr.supported-values/timezones.js
|
|
943
1701
|
const timezones = [
|
|
@@ -1392,27 +2150,25 @@ const timezones = [
|
|
|
1392
2150
|
"UTC"
|
|
1393
2151
|
];
|
|
1394
2152
|
// packages/intl-supportedvaluesof/get-supported-timezones.ts
|
|
1395
|
-
/**
|
|
1396
|
-
* Implementation: Tests if a timezone is supported by attempting to create
|
|
1397
|
-
* a DateTimeFormat with that timezone and verifying it was accepted.
|
|
1398
|
-
*
|
|
1399
|
-
* CLDR Data: Candidate values come from IANA Time Zone Database
|
|
1400
|
-
*/
|
|
1401
|
-
function isSupportedTimeZone(timeZone) {
|
|
1402
|
-
try {
|
|
1403
|
-
createMemoizedDateTimeFormat("en", { timeZone });
|
|
1404
|
-
return true;
|
|
1405
|
-
} catch {}
|
|
1406
|
-
return false;
|
|
1407
|
-
}
|
|
1408
|
-
/**
|
|
1409
|
-
* ECMA-402 Spec: Returns supported timezone identifiers
|
|
1410
|
-
* ECMA-402 Spec: Results must be sorted lexicographically
|
|
1411
|
-
*
|
|
1412
|
-
* Implementation: Filters CLDR list against actual runtime support
|
|
1413
|
-
*/
|
|
1414
2153
|
function getSupportedTimeZones() {
|
|
1415
|
-
|
|
2154
|
+
const probe = getDateTimeFormatProbe();
|
|
2155
|
+
if (!probe) return ["UTC"];
|
|
2156
|
+
return supportedEntries(timezones, (timeZone) => {
|
|
2157
|
+
if (timeZone === "UTC") return true;
|
|
2158
|
+
if (probe.hasTimeZone) try {
|
|
2159
|
+
return probe.hasTimeZone(timeZone);
|
|
2160
|
+
} catch {}
|
|
2161
|
+
try {
|
|
2162
|
+
const options = {
|
|
2163
|
+
__proto__: null,
|
|
2164
|
+
timeZone
|
|
2165
|
+
};
|
|
2166
|
+
probe.create("en", options);
|
|
2167
|
+
return true;
|
|
2168
|
+
} catch {
|
|
2169
|
+
return false;
|
|
2170
|
+
}
|
|
2171
|
+
});
|
|
1416
2172
|
}
|
|
1417
2173
|
// node_modules/.aspect_rules_js/@formatjs_generated+cldr.supported-values@0.0.0/node_modules/@formatjs_generated/cldr.supported-values/units.js
|
|
1418
2174
|
const units = [
|
|
@@ -1463,43 +2219,18 @@ const units = [
|
|
|
1463
2219
|
"milliliter"
|
|
1464
2220
|
];
|
|
1465
2221
|
// packages/intl-supportedvaluesof/get-supported-units.ts
|
|
1466
|
-
/**
|
|
1467
|
-
* Implementation: Tests if a unit is supported by attempting to create
|
|
1468
|
-
* a NumberFormat with that unit and verifying it was accepted.
|
|
1469
|
-
*
|
|
1470
|
-
* CLDR Data: Candidate values come from CLDR unit types
|
|
1471
|
-
*/
|
|
1472
|
-
function isSupportedUnit(unit) {
|
|
1473
|
-
try {
|
|
1474
|
-
return createMemoizedNumberFormat("en", {
|
|
1475
|
-
style: "unit",
|
|
1476
|
-
unit
|
|
1477
|
-
}).resolvedOptions().unit === unit;
|
|
1478
|
-
} catch {}
|
|
1479
|
-
return false;
|
|
1480
|
-
}
|
|
1481
|
-
/**
|
|
1482
|
-
* ECMA-402 Spec: Returns supported unit identifiers
|
|
1483
|
-
* ECMA-402 Spec: Results must be sorted lexicographically
|
|
1484
|
-
*
|
|
1485
|
-
* Implementation: Filters CLDR list against actual runtime support
|
|
1486
|
-
*/
|
|
1487
2222
|
function getSupportedUnits() {
|
|
1488
|
-
return units
|
|
2223
|
+
return supportedEntries(units, () => true);
|
|
1489
2224
|
}
|
|
1490
2225
|
// packages/intl-supportedvaluesof/index.ts
|
|
1491
2226
|
/**
|
|
1492
|
-
* ECMA-402
|
|
1493
|
-
* ECMA-402 §8.3.2 Intl.supportedValuesOf, step 1.
|
|
2227
|
+
* ECMA-402 §8.3.2 Intl.supportedValuesOf.
|
|
1494
2228
|
* https://tc39.es/ecma402/#sec-intl.supportedvaluesof
|
|
1495
|
-
* https://github.com/tc39/ecma402/blob/b1c961988b9a07894b1dc3dc2b5626ea48387d61/spec/intl.html#L103
|
|
1496
2229
|
*
|
|
1497
2230
|
* Returns an array containing the supported calendar, collation, currency,
|
|
1498
2231
|
* numbering systems, time zone, or unit values supported by the implementation.
|
|
1499
2232
|
*
|
|
1500
|
-
*
|
|
1501
|
-
* Intl formatters to determine runtime support rather than using static lists.
|
|
1502
|
-
* This ensures accuracy across different JavaScript engines and runtimes.
|
|
2233
|
+
* Units come from the spec. Other categories probe the installed formatters.
|
|
1503
2234
|
*
|
|
1504
2235
|
* @param key - The category of values to return
|
|
1505
2236
|
* @returns A sorted array of unique string values
|
|
@@ -1513,9 +2244,95 @@ const supportedValuesOf = { supportedValuesOf(key) {
|
|
|
1513
2244
|
case "numberingSystem": return getSupportedNumberingSystems();
|
|
1514
2245
|
case "timeZone": return getSupportedTimeZones();
|
|
1515
2246
|
case "unit": return getSupportedUnits();
|
|
1516
|
-
default: throw
|
|
2247
|
+
default: throw new RangeErrorConstructor("Invalid key: " + key);
|
|
1517
2248
|
}
|
|
1518
2249
|
} }.supportedValuesOf;
|
|
2250
|
+
String.prototype.repeat;
|
|
2251
|
+
Array.from;
|
|
2252
|
+
Array.prototype.join;
|
|
2253
|
+
function defineProperty(target, name, { value }) {
|
|
2254
|
+
Object.defineProperty(target, name, {
|
|
2255
|
+
configurable: true,
|
|
2256
|
+
enumerable: false,
|
|
2257
|
+
writable: true,
|
|
2258
|
+
value
|
|
2259
|
+
});
|
|
2260
|
+
}
|
|
2261
|
+
function ensureIntl() {
|
|
2262
|
+
if (typeof Intl === "undefined") {
|
|
2263
|
+
const intl = {};
|
|
2264
|
+
if (typeof Symbol !== "undefined") Object.defineProperty(intl, Symbol.toStringTag, {
|
|
2265
|
+
value: "Intl",
|
|
2266
|
+
writable: false,
|
|
2267
|
+
enumerable: false,
|
|
2268
|
+
configurable: true
|
|
2269
|
+
});
|
|
2270
|
+
Object.defineProperty(globalThis, "Intl", {
|
|
2271
|
+
configurable: true,
|
|
2272
|
+
enumerable: false,
|
|
2273
|
+
writable: true,
|
|
2274
|
+
value: intl
|
|
2275
|
+
});
|
|
2276
|
+
}
|
|
2277
|
+
if (providerIntl === void 0) providerIntl = Intl;
|
|
2278
|
+
return Intl;
|
|
2279
|
+
}
|
|
2280
|
+
memoize((...args) => new Intl.NumberFormat(...args), { strategy: strategies.variadic });
|
|
2281
|
+
memoize((...args) => new Intl.ListFormat(...args), { strategy: strategies.variadic });
|
|
2282
|
+
const getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
2283
|
+
strategies.variadic;
|
|
2284
|
+
let providerIntl = globalThis.Intl;
|
|
2285
|
+
function ownIntlProvider(name) {
|
|
2286
|
+
const descriptor = providerIntl && getOwnPropertyDescriptor(providerIntl, name);
|
|
2287
|
+
return (descriptor && getOwnPropertyDescriptor(descriptor, "value"))?.value;
|
|
2288
|
+
}
|
|
2289
|
+
let numberFormatIntrinsic = ownIntlProvider("NumberFormat");
|
|
2290
|
+
let listFormatIntrinsic = ownIntlProvider("ListFormat");
|
|
2291
|
+
let pluralRulesProvider = ownIntlProvider("PluralRules");
|
|
2292
|
+
const getFormatterPrototype = Object.getPrototypeOf;
|
|
2293
|
+
function formatterMethodLookup(name) {
|
|
2294
|
+
const methods = /* @__PURE__ */ new WeakMap();
|
|
2295
|
+
const owners = /* @__PURE__ */ new WeakMap();
|
|
2296
|
+
const getMethod = methods.get.bind(methods);
|
|
2297
|
+
const setMethod = methods.set.bind(methods);
|
|
2298
|
+
const getOwner = owners.get.bind(owners);
|
|
2299
|
+
const setOwner = owners.set.bind(owners);
|
|
2300
|
+
return (Constructor) => {
|
|
2301
|
+
const cached = getMethod(Constructor);
|
|
2302
|
+
if (cached) return cached;
|
|
2303
|
+
let prototype = getOwnPropertyDescriptor(Constructor, "prototype")?.value;
|
|
2304
|
+
while (prototype != null) {
|
|
2305
|
+
const inherited = getOwner(prototype);
|
|
2306
|
+
if (inherited) {
|
|
2307
|
+
setMethod(Constructor, inherited);
|
|
2308
|
+
return inherited;
|
|
2309
|
+
}
|
|
2310
|
+
const descriptor = getOwnPropertyDescriptor(prototype, name);
|
|
2311
|
+
const value = descriptor && getOwnPropertyDescriptor(descriptor, "value");
|
|
2312
|
+
if (value && typeof value.value === "function") {
|
|
2313
|
+
const method = value.value;
|
|
2314
|
+
setMethod(Constructor, method);
|
|
2315
|
+
setOwner(prototype, method);
|
|
2316
|
+
return method;
|
|
2317
|
+
}
|
|
2318
|
+
prototype = getFormatterPrototype(prototype);
|
|
2319
|
+
}
|
|
2320
|
+
};
|
|
2321
|
+
}
|
|
2322
|
+
const findFormatterPartsMethod = formatterMethodLookup("formatToParts");
|
|
2323
|
+
const findPluralRulesSelectMethod = formatterMethodLookup("select");
|
|
2324
|
+
if (typeof numberFormatIntrinsic === "function") findFormatterPartsMethod(numberFormatIntrinsic);
|
|
2325
|
+
if (typeof listFormatIntrinsic === "function") findFormatterPartsMethod(listFormatIntrinsic);
|
|
2326
|
+
if (typeof pluralRulesProvider === "function") findPluralRulesSelectMethod(pluralRulesProvider);
|
|
2327
|
+
const numberFormatMemoizers = /* @__PURE__ */ new WeakMap();
|
|
2328
|
+
numberFormatMemoizers.get.bind(numberFormatMemoizers);
|
|
2329
|
+
numberFormatMemoizers.set.bind(numberFormatMemoizers);
|
|
2330
|
+
const listFormatMemoizers = /* @__PURE__ */ new WeakMap();
|
|
2331
|
+
listFormatMemoizers.get.bind(listFormatMemoizers);
|
|
2332
|
+
listFormatMemoizers.set.bind(listFormatMemoizers);
|
|
2333
|
+
const pluralRulesMemoizers = /* @__PURE__ */ new WeakMap();
|
|
2334
|
+
pluralRulesMemoizers.get.bind(pluralRulesMemoizers);
|
|
2335
|
+
pluralRulesMemoizers.set.bind(pluralRulesMemoizers);
|
|
1519
2336
|
defineProperty(ensureIntl(), "supportedValuesOf", { value: supportedValuesOf });
|
|
1520
2337
|
|
|
1521
2338
|
//# sourceMappingURL=polyfill-force.js.map
|