decord/source/__polyfill/14xxx/module_14371.js
github-actions da5b5e5efe chore: update source for alpha 346.6
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
2026-09-12 13:45:10 +00:00

59 lines
1.8 KiB
JavaScript

// Module ID: 14371
// Function ID: 14372
// Dependencies: [14288, 14372]
// Exports: getSupportedCurrencies
// Module 14371
import _mod14288 from "module_14288" /* 14288 */;
import currencies2 from "currencies" /* 14372 */;
require = arg1;
const dependencyMap = arg6;
function isSupportedCurrency(arr3, locale) {
let str = locale;
if (undefined === locale) {
str = "en";
}
try {
const obj = { style: "currency", currencyDisplay: "name", currency: arr3 };
const memoizedNumberFormat = _mod14288.createMemoizedNumberFormat(str, obj);
const str2 = memoizedNumberFormat.format(123);
if (str2.substring(0, 3) !== arr3) {
if (str3.substring(str3.length - 3) !== arr3) {
return true;
}
}
return false;
} catch (err) {
}
}
export const getSupportedCurrencies = function getSupportedCurrencies(locale) {
const items = [];
const currencies = currencies2.currencies;
for (let num = 0; num < currencies.length; num = num + 1) {
let arr3 = currencies[num];
if (3 === arr3.length) {
if (isSupportedCurrency(arr3, locale)) {
let arr = items.push(arr3);
}
} else if (5 === arr3.length) {
if ("~" === arr3[3]) {
let indexOf = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf;
let index = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(arr3[2]);
let indexOf2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf;
let index1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(arr3[4]);
if (index <= index1) {
do {
let sum = arr3.substring(0, 2) + "ABCDEFGHIJKLMNOPQRSTUVWXYZ"[index];
if (isSupportedCurrency(sum, locale)) {
let arr2 = items.push(sum);
}
index = index + 1;
} while (index <= index1);
}
}
}
}
return items;
};