@formatjs/intl-relativetimeformat
Version:
Formats JavaScript dates to relative time strings.
4,500 lines • 99.9 kB
JavaScript
// packages/ecma262-abstract/intrinsics.js
const objectFrom = Object;
const objectCreate = Object.create;
function createFromConstructor(newTarget, defaultPrototype) {
const prototype = newTarget.prototype;
return objectCreate(objectFrom(prototype) === prototype ? prototype : defaultPrototype);
}
Number.isInteger;
const numberIsFinite = Number.isFinite;
Number.isSafeInteger;
const ErrorConstructor = Error;
const TypeErrorConstructor$1 = TypeError;
const RangeErrorConstructor = RangeError;
const arrayApply = Reflect.apply;
Array.prototype.every;
const some$1 = Array.prototype.some;
function arraySome(values, predicate) {
return arrayApply(some$1, values, [predicate]);
}
Array.prototype.includes;
Array.prototype.indexOf;
const defineProperty$3 = Object.defineProperty;
function setDataProperty$1(target, key, value) {
defineProperty$3(target, key, {
__proto__: null,
value,
writable: true,
enumerable: true,
configurable: true
});
}
// packages/ecma262-abstract/HasOwnProperty.js
const hasOwn$2 = Function.prototype.call.bind(Object.prototype.hasOwnProperty);
function HasOwnProperty(o, prop) {
return hasOwn$2(o, prop);
}
// packages/ecma402-abstract/CanonicalizeLocaleList.js
let canonicalIntl$1 = globalThis.Intl;
const canonicalDescriptor = Object.getOwnPropertyDescriptor;
const canonicalApply = Reflect.apply;
const providerKey$1 = Symbol.for("@formatjs/intlCanonicalizeLocaleList");
function ownCanonicalProvider() {
const descriptor = canonicalIntl$1 && canonicalDescriptor(canonicalIntl$1, "getCanonicalLocales");
return (descriptor && canonicalDescriptor(descriptor, "value"))?.value;
}
let canonicalProvider = ownCanonicalProvider();
function registeredCanonicalProvider() {
try {
const descriptor = canonicalIntl$1 && canonicalDescriptor(canonicalIntl$1, providerKey$1);
return descriptor && canonicalDescriptor(descriptor, "value")?.value;
} catch {}
}
function CanonicalizeLocaleList$1(locales) {
if (canonicalIntl$1 === void 0) canonicalIntl$1 = globalThis.Intl;
const registered = registeredCanonicalProvider();
if (typeof registered === "function") return canonicalApply(registered, canonicalIntl$1, [locales]);
if (typeof canonicalProvider !== "function") canonicalProvider = ownCanonicalProvider();
return canonicalApply(canonicalProvider, canonicalIntl$1, [locales]);
}
// packages/ecma402-abstract/Locale/splitUnicodeExtension.js
const apply$7 = Reflect.apply;
const split$2 = String.prototype.split;
const hyphen$1 = {
__proto__: null,
toString: () => "-"
};
function splitLocaleSubtags$1(value) {
return apply$7(split$2, value, [hyphen$1]);
}
function splitUnicodeExtension$1(locale) {
const subtags = splitLocaleSubtags$1(locale);
for (let i = 1; i < subtags.length; i++) {
if (subtags[i] === "x") break;
if (subtags[i] !== "u") continue;
let end = i + 1;
while (end < subtags.length && subtags[end].length > 1) end++;
let base = subtags[0];
for (let j = 1; j < i; j++) base += "-" + subtags[j];
for (let j = end; j < subtags.length; j++) base += "-" + subtags[j];
let extension = "";
for (let j = i; j < end; j++) extension += "-" + subtags[j];
return {
locale: base,
extension
};
}
return {
locale,
extension: void 0
};
}
// node_modules/.aspect_rules_js/@formatjs_generated+cldr.supported-locales@0.0.0/node_modules/@formatjs_generated/cldr.supported-locales/default-content.js
const defaultContent = {
"ady": ["ady-RU"],
"af": ["af-ZA"],
"agq": ["agq-CM"],
"ak": ["ak-GH"],
"am": ["am-ET"],
"ar": ["ar-001"],
"as": ["as-IN"],
"asa": ["asa-TZ"],
"ast": ["ast-ES"],
"az-Cyrl": ["az-Cyrl-AZ"],
"az-Latn": ["az-Latn-AZ"],
"ba": ["ba-RU"],
"bal-Latn": ["bal-Latn-PK"],
"bas": ["bas-CM"],
"be": ["be-BY"],
"bem": ["bem-ZM"],
"bez": ["bez-TZ"],
"bg": ["bg-BG"],
"bgc": ["bgc-IN"],
"bho": ["bho-IN"],
"blo": ["blo-BJ"],
"bm": ["bm-ML"],
"bn": ["bn-BD"],
"bo": ["bo-CN"],
"br": ["br-FR"],
"brx": ["brx-IN"],
"bs-Cyrl": ["bs-Cyrl-BA"],
"bs-Latn": ["bs-Latn-BA"],
"bua": ["bua-RU"],
"ca": ["ca-ES"],
"ccp": ["ccp-BD"],
"ce": ["ce-RU"],
"ceb": ["ceb-PH"],
"cgg": ["cgg-UG"],
"chr": ["chr-US"],
"ckb": ["ckb-IQ"],
"cop": ["cop-EG"],
"cs": ["cs-CZ"],
"csw": ["csw-CA"],
"cv": ["cv-RU"],
"cy": ["cy-GB"],
"da": ["da-DK"],
"dav": ["dav-KE"],
"de": ["de-DE"],
"dje": ["dje-NE"],
"doi": ["doi-IN"],
"dsb": ["dsb-DE"],
"dua": ["dua-CM"],
"dyo": ["dyo-SN"],
"dz": ["dz-BT"],
"ebu": ["ebu-KE"],
"ee": ["ee-GH"],
"el": ["el-GR"],
"en": ["en-US"],
"eo": ["eo-001"],
"es": ["es-ES"],
"et": ["et-EE"],
"eu": ["eu-ES"],
"ewo": ["ewo-CM"],
"fa": ["fa-IR"],
"ff-Adlm": ["ff-Adlm-GN"],
"ff-Latn": ["ff-Latn-SN"],
"fi": ["fi-FI"],
"fil": ["fil-PH"],
"fo": ["fo-FO"],
"fr": ["fr-FR"],
"fur": ["fur-IT"],
"fy": ["fy-NL"],
"ga": ["ga-IE"],
"gaa": ["gaa-GH"],
"gd": ["gd-GB"],
"gl": ["gl-ES"],
"gsw": ["gsw-CH"],
"gu": ["gu-IN"],
"guz": ["guz-KE"],
"gv": ["gv-IM"],
"ha": ["ha-NG"],
"haw": ["haw-US"],
"he": ["he-IL"],
"hi": ["hi-IN"],
"hi-Latn": ["hi-Latn-IN"],
"hr": ["hr-HR"],
"hsb": ["hsb-DE"],
"hu": ["hu-HU"],
"hy": ["hy-AM"],
"ia": ["ia-001"],
"id": ["id-ID"],
"ie": ["ie-EE"],
"ig": ["ig-NG"],
"ii": ["ii-CN"],
"is": ["is-IS"],
"it": ["it-IT"],
"ja": ["ja-JP"],
"jgo": ["jgo-CM"],
"jmc": ["jmc-TZ"],
"jv": ["jv-ID"],
"ka": ["ka-GE"],
"kab": ["kab-DZ"],
"kam": ["kam-KE"],
"kbd": ["kbd-RU"],
"kde": ["kde-TZ"],
"kea": ["kea-CV"],
"kek": ["kek-GT"],
"kgp": ["kgp-BR"],
"khq": ["khq-ML"],
"ki": ["ki-KE"],
"kk-Arab": ["kk-Arab-CN"],
"kk-Cyrl": ["kk-Cyrl-KZ"],
"kkj": ["kkj-CM"],
"kl": ["kl-GL"],
"kln": ["kln-KE"],
"km": ["km-KH"],
"kn": ["kn-IN"],
"ko": ["ko-KR"],
"kok-Deva": ["kok-Deva-IN"],
"kok-Latn": ["kok-Latn-IN"],
"ks-Arab": ["ks-Arab-IN"],
"ks-Deva": ["ks-Deva-IN"],
"ksb": ["ksb-TZ"],
"ksf": ["ksf-CM"],
"ksh": ["ksh-DE"],
"ku-Latn": ["ku-Latn-TR"],
"kw": ["kw-GB"],
"kxv-Deva": ["kxv-Deva-IN"],
"kxv-Latn": ["kxv-Latn-IN"],
"kxv-Orya": ["kxv-Orya-IN"],
"kxv-Telu": ["kxv-Telu-IN"],
"ky": ["ky-KG"],
"lag": ["lag-TZ"],
"lb": ["lb-LU"],
"lg": ["lg-UG"],
"lij": ["lij-IT"],
"lkt": ["lkt-US"],
"lld": ["lld-IT"],
"lmo": ["lmo-IT"],
"ln": ["ln-CD"],
"lo": ["lo-LA"],
"lrc": ["lrc-IR"],
"lt": ["lt-LT"],
"lu": ["lu-CD"],
"luo": ["luo-KE"],
"luy": ["luy-KE"],
"lv": ["lv-LV"],
"mai": ["mai-IN"],
"mas": ["mas-KE"],
"mer": ["mer-KE"],
"mfe": ["mfe-MU"],
"mg": ["mg-MG"],
"mgh": ["mgh-MZ"],
"mgo": ["mgo-CM"],
"mi": ["mi-NZ"],
"mk": ["mk-MK"],
"ml": ["ml-IN"],
"mn": ["mn-MN"],
"mni-Beng": ["mni-Beng-IN"],
"mr": ["mr-IN"],
"ms": ["ms-MY"],
"mt": ["mt-MT"],
"mua": ["mua-CM"],
"my": ["my-MM"],
"mzn": ["mzn-IR"],
"naq": ["naq-NA"],
"nb": ["nb-NO"],
"nd": ["nd-ZW"],
"nds": ["nds-DE"],
"ne": ["ne-NP"],
"nl": ["nl-NL"],
"nmg": ["nmg-CM"],
"nn": ["nn-NO"],
"nnh": ["nnh-CM"],
"nqo": ["nqo-GN"],
"nso": ["nso-ZA"],
"nus": ["nus-SS"],
"nyn": ["nyn-UG"],
"oc": ["oc-FR"],
"om": ["om-ET"],
"or": ["or-IN"],
"os": ["os-GE"],
"pa-Arab": ["pa-Arab-PK"],
"pa-Guru": ["pa-Guru-IN"],
"pcm": ["pcm-NG"],
"pl": ["pl-PL"],
"pms": ["pms-IT"],
"prg": ["prg-PL"],
"ps": ["ps-AF"],
"pt": ["pt-BR"],
"qu": ["qu-PE"],
"quc": ["quc-GT"],
"raj": ["raj-IN"],
"rm": ["rm-CH"],
"rn": ["rn-BI"],
"ro": ["ro-RO"],
"rof": ["rof-TZ"],
"ru": ["ru-RU"],
"rw": ["rw-RW"],
"rwk": ["rwk-TZ"],
"sa": ["sa-IN"],
"sah": ["sah-RU"],
"saq": ["saq-KE"],
"sat-Olck": ["sat-Olck-IN"],
"sbp": ["sbp-TZ"],
"sc": ["sc-IT"],
"scn": ["scn-IT"],
"sd-Arab": ["sd-Arab-PK"],
"sd-Deva": ["sd-Deva-IN"],
"se": ["se-NO"],
"seh": ["seh-MZ"],
"ses": ["ses-ML"],
"sg": ["sg-CF"],
"shi-Latn": ["shi-Latn-MA"],
"shi-Tfng": ["shi-Tfng-MA"],
"shn": ["shn-MM"],
"si": ["si-LK"],
"sk": ["sk-SK"],
"sl": ["sl-SI"],
"smn": ["smn-FI"],
"sn": ["sn-ZW"],
"so": ["so-SO"],
"sq": ["sq-AL"],
"sr-Cyrl": ["sr-Cyrl-RS"],
"sr-Latn": ["sr-Latn-RS"],
"st": ["st-ZA"],
"su-Latn": ["su-Latn-ID"],
"suz-Sunu": ["suz-Sunu-NP"],
"sv": ["sv-SE"],
"sw": ["sw-TZ"],
"syr": ["syr-IQ"],
"szl": ["szl-PL"],
"ta": ["ta-IN"],
"te": ["te-IN"],
"teo": ["teo-UG"],
"tg": ["tg-TJ"],
"th": ["th-TH"],
"ti": ["ti-ET"],
"tk": ["tk-TM"],
"tn": ["tn-ZA"],
"to": ["to-TO"],
"tok": ["tok-001"],
"tr": ["tr-TR"],
"tt": ["tt-RU"],
"twq": ["twq-NE"],
"tyv": ["tyv-RU"],
"tzm": ["tzm-MA"],
"ug": ["ug-CN"],
"uk": ["uk-UA"],
"ur": ["ur-PK"],
"uz-Arab": ["uz-Arab-AF"],
"uz-Cyrl": ["uz-Cyrl-UZ"],
"uz-Latn": ["uz-Latn-UZ"],
"vai-Latn": ["vai-Latn-LR"],
"vai-Vaii": ["vai-Vaii-LR"],
"vec": ["vec-IT"],
"vi": ["vi-VN"],
"vmw": ["vmw-MZ"],
"vun": ["vun-TZ"],
"wae": ["wae-CH"],
"wo": ["wo-SN"],
"xh": ["xh-ZA"],
"xnr": ["xnr-IN"],
"xog": ["xog-UG"],
"yav": ["yav-CM"],
"yi": ["yi-UA"],
"yo": ["yo-NG"],
"yrl": ["yrl-BR"],
"yue-Hans": ["yue-Hans-CN"],
"yue-Hant": ["yue-Hant-HK"],
"za": ["za-CN"],
"zgh": ["zgh-MA"],
"zh-Hans": ["zh-Hans-CN"],
"zh-Hant": ["zh-Hant-TW"],
"zu": ["zu-ZA"]
};
// packages/ecma402-abstract/registerLocaleData.js
const registrations = /* @__PURE__ */ new WeakMap();
const getRegistrations = registrations.get.bind(registrations);
const setRegistrations = registrations.set.bind(registrations);
const LocaleMap$1 = Map;
const apply$6 = Reflect.apply;
const add = Set.prototype.add;
const getOwner = Map.prototype.get;
const setOwner = Map.prototype.set;
const forEachOwner = Map.prototype.forEach;
const split$1 = String.prototype.split;
const slice$1 = String.prototype.slice;
function canonicalizeLocaleDataTag(tag) {
const [locale] = CanonicalizeLocaleList$1(tag);
return splitUnicodeExtension$1(locale).locale;
}
function registerLocaleData(locale, data, localeData, availableLocales) {
let owners = getRegistrations(localeData);
if (!owners) {
owners = new LocaleMap$1();
setRegistrations(localeData, owners);
}
if (apply$6(getOwner, owners, [locale]) === locale) apply$6(forEachOwner, owners, [(owner, tag) => {
if (owner === locale) setDataProperty$1(localeData, tag, data);
}]);
apply$6(setOwner, owners, [locale, locale]);
setDataProperty$1(localeData, locale, data);
apply$6(add, availableLocales, [locale]);
const aliases = HasOwnProperty(defaultContent, locale) ? defaultContent[locale] : void 0;
for (let index = 0; index < (aliases?.length ?? 0); index++) {
const tag = aliases[index];
if (apply$6(getOwner, owners, [tag]) !== tag) {
setDataProperty$1(localeData, tag, data);
apply$6(setOwner, owners, [tag, locale]);
}
apply$6(add, availableLocales, [tag]);
}
for (let index = -1; index < (aliases?.length ?? 0); index++) {
const tag = index === -1 ? locale : aliases[index];
const owner = apply$6(getOwner, owners, [tag]) ?? tag;
const selected = localeData[tag];
const addFallback = (fallback) => {
if (!HasOwnProperty(localeData, fallback)) {
setDataProperty$1(localeData, fallback, selected);
apply$6(setOwner, owners, [fallback, owner]);
}
apply$6(add, availableLocales, [fallback]);
};
const parts = apply$6(split$1, tag, ["-"]);
const scriptEnd = parts[0].length + 5;
let parent = tag;
let length = 1;
let end = parts[0].length;
for (; length < parts.length && parts[length].length > 1; length++) end += parts[length].length + 1;
if (length < parts.length) {
parent = apply$6(slice$1, parent, [0, end]);
addFallback(parent);
}
for (; length > 1; length--) {
if (length > 2 && parts[1].length === 4) addFallback(parts[0] + apply$6(slice$1, parent, [scriptEnd]));
parent = apply$6(slice$1, parent, [0, parent.length - parts[length - 1].length - 1]);
addFallback(parent);
}
}
}
// packages/ecma262-abstract/ToString.js
const StringConstructor = String;
const TypeErrorConstructor = TypeError;
/**
* https://tc39.es/ecma262/#sec-tostring
*/
function ToString(o) {
if (typeof o === "symbol") throw TypeErrorConstructor("Cannot convert a Symbol value to a string");
return StringConstructor(o);
}
// node_modules/.aspect_rules_js/@formatjs+fast-memoize@0.0.0/node_modules/@formatjs/fast-memoize/index.js
const apply$5 = Reflect.apply;
const bind = Function.prototype.bind;
const slice = Array.prototype.slice;
const stringify = JSON.stringify;
const create = Object.create;
const defineProperty$2 = Object.defineProperty;
const setPrototypeOf = Object.setPrototypeOf;
function memoize(fn, options) {
const cache = options && options.cache ? options.cache : cacheDefault;
const serializer = options && options.serializer ? options.serializer : serializerDefault;
return (options && options.strategy ? options.strategy : strategyDefault)(fn, {
cache,
serializer
});
}
function isPrimitive(value) {
return value == null || typeof value === "number" || typeof value === "boolean";
}
function monadic(fn, cache, serializer, arg) {
const cacheKey = isPrimitive(arg) ? arg : serializer(arg);
let computedValue = cache.get(cacheKey);
if (typeof computedValue === "undefined") {
computedValue = apply$5(fn, this, [arg]);
cache.set(cacheKey, computedValue);
}
return computedValue;
}
function variadic(fn, cache, serializer) {
const args = apply$5(slice, arguments, [3]);
if (serializer === serializerDefault) setPrototypeOf(args, null);
const cacheKey = serializer(args);
let computedValue = cache.get(cacheKey);
if (typeof computedValue === "undefined") {
computedValue = apply$5(fn, this, args);
cache.set(cacheKey, computedValue);
}
return computedValue;
}
function assemble(fn, context, strategy, cache, serialize) {
return apply$5(bind, strategy, [
context,
fn,
cache,
serialize
]);
}
function strategyDefault(fn, options) {
const strategy = fn.length === 1 ? monadic : variadic;
return assemble(fn, this, strategy, options.cache.create(), options.serializer);
}
function strategyVariadic(fn, options) {
return assemble(fn, this, variadic, options.cache.create(), options.serializer);
}
function strategyMonadic(fn, options) {
return assemble(fn, this, monadic, options.cache.create(), options.serializer);
}
const serializerDefault = function() {
setPrototypeOf(arguments, null);
return stringify(arguments);
};
var ObjectWithoutPrototypeCache = class {
constructor() {
defineProperty$2(this, "cache", {
__proto__: null,
value: create(null),
writable: true,
enumerable: true,
configurable: true
});
}
get(key) {
return this.cache[key];
}
set(key, value) {
this.cache[key] = value;
}
};
const cacheDefault = { create: function create() {
return new ObjectWithoutPrototypeCache();
} };
const strategies = {
variadic: strategyVariadic,
monadic: strategyMonadic
};
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/index.js
let canonicalIntl = globalThis.Intl;
const getOwnDescriptor = Object.getOwnPropertyDescriptor;
const apply$3 = Reflect.apply;
const providerKey = Symbol.for("@formatjs/intlCanonicalizeLocaleList");
function ownCanonicalizer() {
const descriptor = canonicalIntl && getOwnDescriptor(canonicalIntl, "getCanonicalLocales");
return descriptor && getOwnDescriptor(descriptor, "value")?.value;
}
let canonicalize$1 = ownCanonicalizer();
function registeredCanonicalizer() {
try {
const descriptor = canonicalIntl && getOwnDescriptor(canonicalIntl, providerKey);
return descriptor && getOwnDescriptor(descriptor, "value")?.value;
} catch {}
}
function CanonicalizeLocaleList(locales) {
if (canonicalIntl === void 0) canonicalIntl = globalThis.Intl;
const registered = registeredCanonicalizer();
if (typeof registered === "function") return apply$3(registered, canonicalIntl, [locales]);
if (typeof canonicalize$1 !== "function") canonicalize$1 = ownCanonicalizer();
return apply$3(canonicalize$1, canonicalIntl, [locales]);
}
const apply$2 = Reflect.apply;
const includes = Array.prototype.includes;
const indexOf = Array.prototype.indexOf;
function arrayIncludes(values, search) {
return apply$2(includes, values, [search]);
}
function arrayIndexOf(values, search) {
return apply$2(indexOf, values, [search]);
}
const find = Array.prototype.find;
function arrayFind(values, predicate) {
return apply$2(find, values, [predicate]);
}
const defineProperty$1 = Object.defineProperty;
function setDataProperty(target, key, value) {
defineProperty$1(target, key, {
__proto__: null,
value,
writable: true,
enumerable: true,
configurable: true
});
}
const stringSlice = Function.prototype.call.bind(String.prototype.slice);
const stringIndexOf$1 = Function.prototype.call.bind(String.prototype.indexOf);
const stringLastIndexOf = Function.prototype.call.bind(String.prototype.lastIndexOf);
const stringLowerCase = Function.prototype.call.bind(String.prototype.toLowerCase);
const stringCharCodeAt = Function.prototype.call.bind(String.prototype.charCodeAt);
const LocaleSet$1 = Set;
const setAdd = Function.prototype.call.bind(Set.prototype.add);
const setHas = Function.prototype.call.bind(Set.prototype.has);
const availableLocalesSetCache = /* @__PURE__ */ new WeakMap();
const getAvailableLocales = availableLocalesSetCache.get.bind(availableLocalesSetCache);
const setAvailableLocales = availableLocalesSetCache.set.bind(availableLocalesSetCache);
/**
* https://tc39.es/ecma402/#sec-lookupmatchinglocalebyprefix
* @param availableLocales
* @param locale
*/
function BestAvailableLocale(availableLocales, locale) {
let availableSet = getAvailableLocales(availableLocales);
if (!availableSet) {
availableSet = new LocaleSet$1();
for (let i = 0; i < availableLocales.length; i++) setAdd(availableSet, availableLocales[i]);
setAvailableLocales(availableLocales, availableSet);
}
let candidate = locale;
while (candidate.length) {
if (setHas(availableSet, candidate)) return candidate;
let pos = stringLastIndexOf(candidate, "-");
if (pos === -1) return;
while (pos >= 2 && candidate[pos - 2] === "-") pos -= 2;
candidate = stringSlice(candidate, 0, pos);
}
}
const apply$1$1 = Reflect.apply;
const split = String.prototype.split;
const hyphen = {
__proto__: null,
toString: () => "-"
};
function splitLocaleSubtags(value) {
return apply$1$1(split, value, [hyphen]);
}
function splitUnicodeExtension(locale) {
const subtags = splitLocaleSubtags(locale);
for (let i = 1; i < subtags.length; i++) {
if (subtags[i] === "x") break;
if (subtags[i] !== "u") continue;
let end = i + 1;
while (end < subtags.length && subtags[end].length > 1) end++;
let base = subtags[0];
for (let j = 1; j < i; j++) base += "-" + subtags[j];
for (let j = end; j < subtags.length; j++) base += "-" + subtags[j];
let extension = "";
for (let j = i; j < end; j++) extension += "-" + subtags[j];
return {
locale: base,
extension
};
}
return {
locale,
extension: void 0
};
}
const matchingData = {
"language": {
"nb|no": 1,
"no|nb": 1,
"hr|bs": 4,
"bs|hr": 4,
"sh|bs": 4,
"bs|sh": 4,
"sh|hr": 4,
"hr|sh": 4,
"sh|sr": 4,
"sr|sh": 4,
"ssy|aa": 4,
"aa|ssy": 4,
"gsw|de": 4,
"lb|de": 4,
"da|no": 8,
"no|da": 8,
"da|nb": 8,
"nb|da": 8,
"ab|ru": 30,
"ach|en": 30,
"af|en": 20,
"ak|en": 30,
"am|en": 30,
"ay|es": 20,
"az|ru": 30,
"bal|ur": 20,
"be|ru": 20,
"bem|en": 30,
"bh|hi": 30,
"bn|en": 30,
"bo|zh": 20,
"br|fr": 20,
"ca|es": 20,
"ceb|fil": 30,
"chr|en": 20,
"ckb|ar": 30,
"co|fr": 20,
"crs|fr": 20,
"cs|sk": 20,
"sk|cs": 20,
"cy|en": 20,
"ee|en": 30,
"eo|en": 30,
"eu|es": 20,
"fo|da": 20,
"fy|nl": 20,
"ga|en": 20,
"gaa|en": 30,
"gd|en": 20,
"gl|es": 20,
"gn|es": 20,
"gu|hi": 30,
"ha|en": 30,
"haw|en": 20,
"ht|fr": 20,
"hy|ru": 30,
"ia|en": 30,
"ig|en": 30,
"is|en": 20,
"jv|id": 20,
"ka|en": 30,
"kg|fr": 30,
"kk|ru": 30,
"km|en": 30,
"kn|en": 30,
"kri|en": 30,
"ku|tr": 30,
"ky|ru": 30,
"la|it": 20,
"lg|en": 30,
"ln|fr": 30,
"lo|en": 30,
"loz|en": 30,
"lua|fr": 30,
"mai|hi": 20,
"mfe|en": 30,
"mg|fr": 30,
"mi|en": 20,
"ml|en": 30,
"mn|ru": 30,
"mr|hi": 30,
"ms|id": 30,
"mt|en": 30,
"my|en": 30,
"ne|en": 30,
"nn|nb": 20,
"nb|nn": 20,
"nn|no": 20,
"no|nn": 20,
"nso|en": 30,
"ny|en": 30,
"nyn|en": 30,
"oc|fr": 20,
"om|en": 30,
"or|en": 30,
"pa|en": 30,
"pcm|en": 20,
"ps|en": 30,
"qu|es": 30,
"rm|de": 20,
"rn|rw": 10,
"rw|rn": 10,
"rn|fr": 30,
"rn|en": 35,
"rw|en": 30,
"rw|fr": 35,
"sa|hi": 30,
"scn|it": 20,
"sd|en": 30,
"si|en": 30,
"sn|en": 30,
"so|en": 30,
"sq|en": 30,
"st|en": 30,
"su|id": 20,
"sw|en": 30,
"ta|en": 30,
"te|en": 30,
"tg|ru": 30,
"ti|en": 30,
"tk|ru": 30,
"tlh|en": 30,
"tn|en": 30,
"to|en": 30,
"tt|ru": 30,
"tum|en": 30,
"ug|zh": 20,
"ur|en": 30,
"uz|ru": 30,
"wo|fr": 30,
"xh|en": 30,
"yi|en": 30,
"yo|en": 30,
"za|zh": 20,
"zu|en": 30,
"aao|ar": 10,
"abh|ar": 10,
"abv|ar": 10,
"acm|ar": 10,
"acq|ar": 10,
"acw|ar": 10,
"acx|ar": 10,
"acy|ar": 10,
"adf|ar": 10,
"aeb|ar": 10,
"aec|ar": 10,
"afb|ar": 10,
"apc|ar": 10,
"apd|ar": 10,
"arq|ar": 10,
"ars|ar": 10,
"ary|ar": 10,
"arz|ar": 10,
"auz|ar": 10,
"avl|ar": 10,
"ayh|ar": 10,
"ayl|ar": 10,
"ayn|ar": 10,
"ayp|ar": 10,
"bbz|ar": 10,
"pga|ar": 10,
"shu|ar": 10,
"ssh|ar": 10,
"azb|az": 10,
"vro|et": 10,
"ffm|ff": 10,
"fub|ff": 10,
"fue|ff": 10,
"fuf|ff": 10,
"fuh|ff": 10,
"fui|ff": 10,
"fuq|ff": 10,
"fuv|ff": 10,
"gnw|gn": 10,
"gui|gn": 10,
"gun|gn": 10,
"nhd|gn": 10,
"ikt|iu": 10,
"enb|kln": 10,
"eyo|kln": 10,
"niq|kln": 10,
"oki|kln": 10,
"pko|kln": 10,
"sgc|kln": 10,
"tec|kln": 10,
"tuy|kln": 10,
"knn|kok": 10,
"gkp|kpe": 10,
"ida|luy": 10,
"lkb|luy": 10,
"lko|luy": 10,
"lks|luy": 10,
"lri|luy": 10,
"lrm|luy": 10,
"lsm|luy": 10,
"lto|luy": 10,
"lts|luy": 10,
"lwg|luy": 10,
"nle|luy": 10,
"nyd|luy": 10,
"rag|luy": 10,
"ltg|lv": 10,
"bhr|mg": 10,
"bjq|mg": 10,
"bmm|mg": 10,
"bzc|mg": 10,
"msh|mg": 10,
"skg|mg": 10,
"tdx|mg": 10,
"tkg|mg": 10,
"txy|mg": 10,
"xmv|mg": 10,
"xmw|mg": 10,
"mvf|mn": 10,
"bjn|ms": 10,
"btj|ms": 10,
"bve|ms": 10,
"bvu|ms": 10,
"coa|ms": 10,
"dup|ms": 10,
"hji|ms": 10,
"id|ms": 10,
"jak|ms": 10,
"jax|ms": 10,
"kvb|ms": 10,
"kvr|ms": 10,
"kxd|ms": 10,
"lce|ms": 10,
"lcf|ms": 10,
"liw|ms": 10,
"max|ms": 10,
"meo|ms": 10,
"mfa|ms": 10,
"mfb|ms": 10,
"min|ms": 10,
"mqg|ms": 10,
"msi|ms": 10,
"mui|ms": 10,
"orn|ms": 10,
"ors|ms": 10,
"pel|ms": 10,
"pse|ms": 10,
"tmw|ms": 10,
"urk|ms": 10,
"vkk|ms": 10,
"vkt|ms": 10,
"xmm|ms": 10,
"zlm|ms": 10,
"zmi|ms": 10,
"dty|ne": 10,
"gax|om": 10,
"hae|om": 10,
"orc|om": 10,
"spv|or": 10,
"pbt|ps": 10,
"pst|ps": 10,
"qub|qu": 10,
"qud|qu": 10,
"quf|qu": 10,
"qug|qu": 10,
"quh|qu": 10,
"quk|qu": 10,
"qul|qu": 10,
"qup|qu": 10,
"qur|qu": 10,
"qus|qu": 10,
"quw|qu": 10,
"qux|qu": 10,
"quy|qu": 10,
"qva|qu": 10,
"qvc|qu": 10,
"qve|qu": 10,
"qvh|qu": 10,
"qvi|qu": 10,
"qvj|qu": 10,
"qvl|qu": 10,
"qvm|qu": 10,
"qvn|qu": 10,
"qvo|qu": 10,
"qvp|qu": 10,
"qvs|qu": 10,
"qvw|qu": 10,
"qvz|qu": 10,
"qwa|qu": 10,
"qwc|qu": 10,
"qwh|qu": 10,
"qws|qu": 10,
"qxa|qu": 10,
"qxc|qu": 10,
"qxh|qu": 10,
"qxl|qu": 10,
"qxn|qu": 10,
"qxo|qu": 10,
"qxp|qu": 10,
"qxr|qu": 10,
"qxt|qu": 10,
"qxu|qu": 10,
"qxw|qu": 10,
"sdc|sc": 10,
"sdn|sc": 10,
"sro|sc": 10,
"aae|sq": 10,
"aat|sq": 10,
"aln|sq": 10,
"aii|syr": 10,
"uzs|uz": 10,
"yih|yi": 10,
"cdo|zh": 10,
"cjy|zh": 10,
"cnp|zh": 10,
"cpx|zh": 10,
"csp|zh": 10,
"czh|zh": 10,
"czo|zh": 10,
"gan|zh": 10,
"hak|zh": 10,
"hnm|zh": 10,
"hsn|zh": 10,
"luh|zh": 10,
"lzh|zh": 10,
"mnp|zh": 10,
"nan|zh": 10,
"sjc|zh": 10,
"wuu|zh": 10,
"yue|zh": 10
},
"script": {
"am|en|Ethi|Latn": 10,
"az|ru|Latn|Cyrl": 10,
"bn|en|Beng|Latn": 10,
"bo|zh|Tibt|Hans": 10,
"hy|ru|Armn|Cyrl": 10,
"ka|en|Geor|Latn": 10,
"km|en|Khmr|Latn": 10,
"kn|en|Knda|Latn": 10,
"lo|en|Laoo|Latn": 10,
"ml|en|Mlym|Latn": 10,
"my|en|Mymr|Latn": 10,
"ne|en|Deva|Latn": 10,
"or|en|Orya|Latn": 10,
"pa|en|Guru|Latn": 10,
"ps|en|Arab|Latn": 10,
"sd|en|Arab|Latn": 10,
"si|en|Sinh|Latn": 10,
"ta|en|Taml|Latn": 10,
"te|en|Telu|Latn": 10,
"ti|en|Ethi|Latn": 10,
"tk|ru|Latn|Cyrl": 10,
"ur|en|Arab|Latn": 10,
"uz|ru|Latn|Cyrl": 10,
"yi|en|Hebr|Latn": 10,
"sr|sr|Latn|Cyrl": 5,
"sr|sr|Cyrl|Latn": 5,
"za|zh|Latn|Hans": 10,
"zh|zh|Hani|Hans": 20,
"zh|zh|Hani|Hant": 20,
"ar|ar|Latn|Arab": 20,
"bn|bn|Latn|Beng": 20,
"gu|gu|Latn|Gujr": 20,
"hi|hi|Latn|Deva": 20,
"kn|kn|Latn|Knda": 20,
"ml|ml|Latn|Mlym": 20,
"mr|mr|Latn|Deva": 20,
"ta|ta|Latn|Taml": 20,
"te|te|Latn|Telu": 20,
"zh|zh|Latn|Hans": 20,
"ja|ja|Latn|Jpan": 5,
"ja|ja|Hani|Jpan": 5,
"ja|ja|Hira|Jpan": 5,
"ja|ja|Kana|Jpan": 5,
"ja|ja|Hrkt|Jpan": 5,
"ja|ja|Hira|Hrkt": 5,
"ja|ja|Kana|Hrkt": 5,
"ko|ko|Hani|Kore": 5,
"ko|ko|Hang|Kore": 5,
"ko|ko|Jamo|Kore": 5,
"ko|ko|Jamo|Hang": 5
},
"region": {
"ar|ar|*|*": [
4,
4,
4,
4,
5,
4,
4,
4,
4,
4,
4,
5,
4,
4,
4,
4,
4,
4,
5,
4,
4,
4,
4,
4,
4,
5,
4,
4,
5,
5,
5,
5,
4,
5,
5,
4,
4,
4,
4,
5,
4,
4,
4,
4,
4,
4,
5,
4,
4
],
"en|en|*|*": [
4,
4,
5,
5,
4,
3,
4,
4,
4,
5,
5,
4,
3,
4,
5,
5,
4,
4,
5,
5,
5,
5,
5,
4,
4,
5,
5,
5,
4,
4,
5,
5,
4,
3,
4,
3,
3,
5,
5,
3,
3,
3,
4,
4,
5,
5,
4,
3,
4
],
"es|es|*|*": [
4,
5,
4,
5,
4,
4,
4,
5,
4,
5,
4,
5,
5,
5,
4,
5,
4,
5,
4,
4,
4,
5,
4,
5,
4,
5,
5,
5,
4,
5,
4,
5,
4,
4,
4,
4,
5,
4,
5,
4,
4,
4,
4,
5,
4,
5,
4,
4,
4
],
"pt|pt|*|*": [
4,
5,
4,
5,
4,
4,
4,
5,
4,
5,
4,
5,
5,
5,
4,
5,
4,
5,
4,
4,
4,
5,
4,
5,
4,
5,
5,
5,
4,
5,
4,
5,
4,
4,
4,
4,
5,
4,
5,
4,
4,
4,
4,
5,
4,
5,
4,
4,
4
],
"zh|zh|Hant|Hant": [
4,
4,
4,
4,
4,
4,
5,
4,
4,
4,
4,
4,
4,
5,
4,
4,
4,
4,
4,
4,
5,
4,
4,
4,
4,
4,
4,
5,
4,
4,
4,
4,
4,
4,
5,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
4
]
},
"regions": {
"142": [
0,
2,
6
],
"143": [0],
"145": [0],
"150": [0, 5],
"151": [0],
"154": [0, 5],
"155": [0],
"202": [0, 4],
"419": [1, 3],
"001": [
0,
1,
2,
3,
4,
5,
6
],
"002": [0, 4],
"003": [1, 3],
"005": [1],
"009": [0, 2],
"011": [0, 4],
"013": [1],
"014": [0],
"015": [0, 4],
"017": [0],
"018": [0],
"019": [1, 3],
"021": [1, 3],
"029": [1, 3],
"030": [0, 6],
"034": [0],
"035": [0, 2],
"039": [0],
"053": [0],
"054": [0],
"057": [0, 2],
"061": [0, 2],
"AC": [0],
"AD": [0],
"AE": [0],
"AF": [0],
"AG": [1],
"AI": [1],
"AL": [0],
"AM": [0],
"AO": [0],
"AQ": [0],
"AR": [1],
"AS": [2],
"AT": [0],
"AU": [0],
"AW": [1],
"AX": [0],
"AZ": [0],
"BA": [0],
"BB": [1],
"BD": [0],
"BE": [0],
"BF": [0],
"BG": [0],
"BH": [0],
"BI": [0],
"BJ": [0],
"BL": [1],
"BM": [1],
"BN": [0],
"BO": [1],
"BQ": [1],
"BR": [1],
"BS": [1],
"BT": [0],
"BV": [1],
"BW": [0],
"BY": [0],
"BZ": [1],
"CA": [3],
"CC": [0],
"CD": [0],
"CF": [0],
"CG": [0],
"CH": [0],
"CI": [0],
"CK": [0],
"CL": [1],
"CM": [0],
"CN": [0],
"CO": [1],
"CP": [0],
"CQ": [0],
"CR": [1],
"CU": [1],
"CV": [0],
"CW": [1],
"CX": [0],
"CY": [0],
"CZ": [0],
"DE": [0],
"DG": [0],
"DJ": [0],
"DK": [0],
"DM": [1],
"DO": [1],
"DZ": [4],
"EA": [0],
"EC": [1],
"EE": [0],
"EG": [0],
"EH": [4],
"ER": [0],
"ES": [0],
"ET": [0],
"EU": [0],
"EZ": [0],
"FI": [0],
"FJ": [0],
"FK": [1],
"FM": [0],
"FO": [0],
"FR": [0],
"GA": [0],
"GB": [5],
"GD": [1],
"GE": [0],
"GF": [1],
"GG": [0],
"GH": [0],
"GI": [0],
"GL": [1],
"GM": [0],
"GN": [0],
"GP": [1],
"GQ": [0],
"GR": [0],
"GS": [1],
"GT": [1],
"GU": [2],
"GW": [0],
"GY": [1],
"HK": [6],
"HM": [0],
"HN": [1],
"HR": [0],
"HT": [1],
"HU": [0],
"IC": [0],
"ID": [0],
"IE": [0],
"IL": [0],
"IM": [0],
"IN": [0],
"IO": [0],
"IQ": [0],
"IR": [0],
"IS": [0],
"IT": [0],
"JE": [0],
"JM": [1],
"JO": [0],
"JP": [0],
"KE": [0],
"KG": [0],
"KH": [0],
"KI": [0],
"KM": [0],
"KN": [1],
"KP": [0],
"KR": [0],
"KW": [0],
"KY": [1],
"KZ": [0],
"LA": [0],
"LB": [0],
"LC": [1],
"LI": [0],
"LK": [0],
"LR": [0],
"LS": [0],
"LT": [0],
"LU": [0],
"LV": [0],
"LY": [4],
"MA": [4],
"MC": [0],
"MD": [0],
"ME": [0],
"MF": [1],
"MG": [0],
"MH": [2],
"MK": [0],
"ML": [0],
"MM": [0],
"MN": [0],
"MO": [6],
"MP": [2],
"MQ": [1],
"MR": [4],
"MS": [1],
"MT": [0],
"MU": [0],
"MV": [0],
"MW": [0],
"MX": [1],
"MY": [0],
"MZ": [0],
"NA": [0],
"NC": [0],
"NE": [0],
"NF": [0],
"NG": [0],
"NI": [1],
"NL": [0],
"NO": [0],
"NP": [0],
"NR": [0],
"NU": [0],
"NZ": [0],
"OM": [0],
"PA": [1],
"PE": [1],
"PF": [0],
"PG": [0],
"PH": [2],
"PK": [0],
"PL": [0],
"PM": [1],
"PN": [0],
"PR": [3],
"PS": [0],
"PT": [0],
"PW": [0],
"PY": [1],
"QA": [0],
"QO": [0],
"RE": [0],
"RO": [0],
"RS": [0],
"RU": [0],
"RW": [0],
"SA": [0],
"SB": [0],
"SC": [0],
"SD": [0],
"SE": [0],
"SG": [0],
"SH": [0],
"SI": [0],
"SJ": [0],
"SK": [0],
"SL": [0],
"SM": [0],
"SN": [0],
"SO": [0],
"SR": [1],
"SS": [0],
"ST": [0],
"SV": [1],
"SX": [1],
"SY": [0],
"SZ": [0],
"TA": [0],
"TC": [1],
"TD": [0],
"TF": [0],
"TG": [0],
"TH": [0],
"TJ": [0],
"TK": [0],
"TL": [0],
"TM": [0],
"TN": [4],
"TO": [0],
"TR": [0],
"TT": [1],
"TV": [0],
"TW": [0],
"TZ": [0],
"UA": [0],
"UG": [0],
"UM": [2],
"UN": [
0,
1,
2,
3,
4,
5
],
"US": [3],
"UY": [1],
"UZ": [0],
"VA": [0],
"VC": [1],
"VE": [1],
"VG": [1],
"VI": [3],
"VN": [0],
"VU": [0],
"WF": [0],
"WS": [0],
"XK": [0],
"YE": [0],
"YT": [0],
"ZA": [0],
"ZM": [0],
"ZW": [0]
},
"defaults": [
80,
50,
4
],
"partitionCount": 7,
"paradigms": [
"en",
"en-GB",
"es",
"es-419",
"pt-BR",
"pt-PT"
],
"cldrVersion": "49",
"macroRegions": ["419"],
"canonicalAliases": {
"language": [
"aam",
"aar",
"abk",
"adp",
"afr",
"agp",
"ais",
"ajp",
"ajt",
"aju",
"aka",
"alb",
"als",
"amh",
"ara",
"arb",
"arg",
"arm",
"asd",
"asm",
"aue",
"ava",
"ave",
"aym",
"ayr",
"ayx",
"aze",
"azj",
"bak",
"bam",
"baq",
"baz",
"bcc",
"bcl",
"bel",
"ben",
"bgm",
"bh",
"bhk",
"bic",
"bih",
"bis",
"bjd",
"bjq",
"bkb",
"blg",
"bod",
"bos",
"bre",
"btb",
"bul",
"bur",
"bxk",
"bxr",
"cat",
"ccq",
"ces",
"cha",
"che",
"chi",
"chu",
"chv",
"cjr",
"cka",
"cld",
"cls",
"cmk",
"cmn",
"cnr",
"cor",
"cos",
"coy",
"cqu",
"cre",
"cwd",
"cym",
"cze",
"daf",
"dan",
"dap",
"dek",
"deu",
"dgo",
"dhd",
"dik",
"diq",
"dit",
"div",
"djl",
"dkl",
"drh",
"drr",
"drw",
"dud",
"duj",
"dut",
"dwl",
"dzo",
"ekk",
"ell",
"elp",
"emk",
"eng",
"epo",
"esk",
"est",
"eus",
"ewe",
"fao",
"fas",
"fij",
"fin",
"fra",
"fre",
"fry",
"fuc",
"ful",
"gav",
"gaz",
"gbc",
"gbo",
"geo",
"ger",
"gfx",
"ggn",
"ggo",
"ggr",
"gio",
"gla",
"gle",
"glg",
"gli",
"glv",
"gno",
"gom",
"gre",
"grn",
"gti",
"gug",
"guj",
"guv",
"gya",
"hat",
"hau",
"hbs",
"hdn",
"hea",
"heb",
"her",
"him",
"hin",
"hmo",
"hrr",
"hrv",
"hun",
"hye",
"ibi",
"ibo",
"ice",
"ido",
"iii",
"ike",
"iku",
"ile",
"ill",
"ilw",
"in",
"ina",
"ind",
"ipk",
"isl",
"ita",
"iw",
"izi",
"jar",
"jav",
"jeg",
"ji",
"jpn",
"jw",
"kal",
"kan",
"kas",
"kat",
"kau",
"kaz",
"kdv",
"kgc",
"kgd",
"kgh",
"kgm",
"khk",
"khm",
"kik",
"kin",
"kir",
"kmr",
"knc",
"kng",
"koj",
"kom",
"kon",
"kor",
"kpp",
"kpv",
"krm",
"ktr",
"kua",
"kur",
"kvs",
"kwq",
"kxe",
"kxl",
"kzh",
"kzj",
"kzt",
"lak",
"lao",
"lat",
"lav",
"lbk",
"leg",
"lii",
"lim",
"lin",
"lit",
"llo",
"lmm",
"ltz",
"lub",
"lug",
"lvs",
"mac",
"mah",
"mal",
"mao",
"mar",
"may",
"meg",
"mgx",
"mhr",
"mkd",
"mlg",
"mlt",
"mnt",
"mo",
"mof",
"mol",
"mon",
"mrd",
"mri",
"msa",
"mst",
"mup",
"mwd",
"mwj",
"mya",
"myd",
"myt",
"nad",
"nau",
"nav",
"nbf",
"nbl",
"nbx",
"ncp",
"nde",
"ndo",
"nep",
"nld",
"nln",
"nlr",
"nno",
"nns",
"nnx",
"nob",
"nom",
"noo",
"nor",
"npi",
"nte",
"nts",
"nxu",
"nya",
"oci",
"ojg",
"oji",
"ori",
"orm",
"ory",
"oss",
"oun",
"pan",
"pat",
"pbu",
"pcr",
"per",
"pes",
"pli",
"plt",
"pmc",
"pmk",
"pmu",
"pnb",
"pol",
"por",
"ppa",
"ppr",
"prp",
"prs",
"pry",
"pus",
"puz",
"que",
"quz",
"rmr",
"rmy",
"roh",
"ron",
"rum",
"run",
"rus",
"sag",
"san",
"sap",
"sca",
"scc",
"scr",
"sgl",
"sgn",
"sh",
"shl",
"sin",
"skk",
"slk",
"slo",
"slv",
"smd",
"sme",
"smo",
"sna",
"snb",
"snd",
"som",
"sot",
"spa",
"spy",
"sqi",
"src",
"srd",
"srp",
"ssw",
"sul",
"sum",
"sun",
"swa",
"swc",
"swe",
"swh",
"szd",
"tah",
"tam",
"tat",
"tdu",
"tel",
"tgg",
"tgk",
"tgl",
"tha",
"thc",
"thw",
"thx",
"tib",
"tid",
"tie",
"tir",
"tkk",
"tl",
"tlw",
"tmk",
"tmp",
"tne",
"tnf",
"ton",
"tpw",
"tsf",
"tsn",
"tso",
"ttq",
"tuk",
"tur",
"tw",
"twi",
"uig",
"ukr",
"umu",
"unp",
"uok",
"urd",
"uzb",
"uzn",
"ven",
"vie",
"vol",
"wel",
"wgw",
"wit",
"wiw",
"wln",
"wol",
"xba",
"xho",
"xia",
"xkh",
"xpe",
"xrq",
"xsj",
"xsl",
"xss",
"ybd",
"ydd",
"yen",
"yid",
"yiy",
"yma",
"ymt",
"yol",
"yor",
"yos",
"yuu",
"zai",
"zha",
"zho",
"zir",
"zkb",
"zsm",
"zul",
"zyb"
],
"script": ["Qaai"],
"region": [
"004",
"008",
"010",
"012",
"016",
"020",
"024",
"028",
"031",
"032",
"036",
"040",
"044",
"048",
"050",
"051",
"052",
"056",
"060",
"062",
"064",
"068",
"070",
"072",
"074",
"076",
"084",
"086",
"090",
"092",
"096",
"100",
"104",
"108",
"112",
"116",
"120",
"124",
"132",
"136",
"140",
"144",
"148",
"152",
"156",
"158",
"162",
"166",
"170",
"172",
"174",
"175",
"178",
"180",
"184",
"188",
"191",
"192",
"196",
"200",
"203",
"204",
"208",
"212",
"214",
"218",
"222",
"226",
"230",
"231",
"232",
"233",
"234",
"238",
"239",
"242",
"246",
"248",
"249",
"250",
"254",
"258",
"260",
"262",
"266",
"268",
"270",
"275",
"276",
"278",
"280",
"288",
"292",
"296",
"300",
"304",
"308",
"312",
"316",
"320",
"324",
"328",
"332",
"334",
"336",
"340",
"344",
"348",
"352",
"356",
"360",
"364",
"368",
"372",
"376",
"380",
"384",
"388",
"392",
"398",
"400",
"404",
"408",
"410",
"414",
"417",
"418",
"422",
"426",
"428",
"430",
"434",
"438",
"440",
"442",
"446",
"450",
"454",
"458",
"462",
"466",
"470",
"474",
"478",
"480",
"484",
"492",
"496",
"498",
"499",
"500",
"504",
"508",
"512",
"516",
"520",
"524",
"528",
"530",
"531",
"532",
"533",
"534",
"535",
"536",
"540",
"548",
"554",
"558",
"562",
"566",
"570",
"574",
"578",
"580",
"581",
"582",
"583",
"584",
"585",
"586",
"591",
"598",
"600",
"604",
"608",
"612",
"616",
"620",
"624",
"626",
"630",
"634",
"638",
"642",
"643",
"646",
"652",
"654",
"659",
"660",
"662",
"663",
"666",
"670",
"674",
"678",
"682",
"686",
"688",
"690",
"694",
"702",
"703",
"704",
"705",
"706",
"710",
"716",
"720",
"724",
"728",
"729",
"732",
"736",
"740",
"744",
"748",
"752",
"756",
"760",
"762",
"764",
"768",
"772",
"776",
"780",
"784",
"788",
"792",
"795",
"796",
"798",
"800",
"804",
"807",
"810",
"818",
"826",
"830",
"831",
"832",
"833",
"834",
"840",
"850",
"854",
"858",
"860",
"862",
"876",
"882",
"886",
"887",
"890",
"891",
"894",
"958",
"959",
"960",
"962",
"963",
"964",
"965",
"966",
"967",
"968",
"969",
"970",
"971",
"972",
"973",
"974",
"975",
"976",
"977",
"978",
"979",
"980",
"981",
"982",
"983",
"984",
"985",
"986",
"987",
"988",
"989",
"990",
"991",
"992",
"993",
"994",
"995",
"996",
"997",
"998",
"999",
"AN",
"BU",
"CS",
"CT",
"DD",
"DY",
"FQ",
"FX",
"HV",
"JT",
"MI",
"NH",
"NQ",
"NT",
"PC",
"PU",
"PZ",
"QU",
"RH",
"SU",
"TP",
"UK",
"VD",
"WK",
"YD",
"YU",
"ZR"
]
},
"minLsrDistance": 1,
"demotion": 5
};
const apply$4 = Reflect.apply;
const some = Array.prototype.some;
const sortLocaleIndexes = Array.prototype.sort;
const freezeLocaleList = Object.freeze;
const LocaleError = Error;
const LocaleMap = Map;
const LocaleSet = Set;
const addLocaleSet = Function.prototype.call.bind(LocaleSet.prototype.add);
const hasLocaleSet = Function.prototype.call.bind(LocaleSet.prototype.has);
const minDistance = Math.min;
const maxDistance = Math.max;
/**
* Asserts that a condition is true, throwing an error if it is not.
* Used for runtime validation and type narrowing.
*
* @param condition - The condition to check
* @param message - Error message if condition is false
* @param Err - Error constructor to use (defaults to Error)
* @throws {Error} When condition is false
*
* @example
* ```ts
* invariant(locale !== undefined, 'Locale must be defined')
* // locale is now narrowed to non-undefined type
* ```
*/
function invariant$1(condition, message, Err = LocaleError) {
if (!condition) throw new Err(message);
}
const DEFAULT_MATCHING_THRESHOLD = matchingData.defaults[1];
const DISTANCE_SCALE = 8;
const MIN_LSR_DISTANCE = matchingData.minLsrDistance;
const languageAliases = new LocaleSet(matchingData.canonicalAliases.language);
const scriptAliases = new LocaleSet(matchingData.canonicalAliases.script);
const regionAliases = new LocaleSet(matchingData.canonicalAliases.region);
function ascii(value, start, end, min, max) {
for (let i = start; i < end; i++) {
const code = stringCharCodeAt(value, i);
if (code < min || code > max) return false;
}
return true;
}
function languageSubtag(value) {
return value.length >= 2 && value.length <= 8 && value.length !== 4 && ascii(value, 0, value.length, 97, 122);
}
function scriptSubtag(value) {
return value.length === 4 && ascii(value, 0, 1, 65, 90) && ascii(value, 1, 4, 97, 122);
}
function regionSubtag(value) {
return value.length === 2 && ascii(value, 0, 2, 65, 90) || value.length === 3 && ascii(value, 0, 3, 48, 57);
}
function pseudoRegion(value) {
return value === "XA" || value === "XB" || value === "XC";
}
function prefix(tag) {
let end = stringIndexOf$1(tag, "-");
if (end < 0) end = tag.length;
const language = stringSlice(tag, 0, end);
let script = "";
let region = "";
if (end < tag.length) {
let next = stringIndexOf$1(tag, "-", end + 1);
if (next < 0) next = tag.length;
let part = stringSlice(tag, end + 1, next);
if (scriptSubtag(part)) {
script = part;
end = next;
next = stringIndexOf$1(tag, "-", end + 1);
if (next < 0) next = tag.length;
part = stringSlice(tag, end + 1, next);
}
if (regionSubtag(part)) {
region = part;
end = next;
}
}
return {
language,
script,
region,
end
};
}
function scriptlessRegionLocale(tag) {
const { language, script, region } = prefix(tag);
if (script && region) return language + "-" + region;
}
function canUseBestFitPrefixFallback(tag) {
const { language, script, region } = prefix(tag);
return language !== "und" && script !== "Zzzz" && region !== "ZZ" && !pseudoRegion(region) && (stringIndexOf$1(tag, "-ps") === -1 || fields(tag).pseudo === void 0);
}
function fields(tag) {
const parsed = prefix(tag);
const language = parsed.language;
let { script, region } = parsed;
const parts = parsed.end < tag.length ? splitLocaleSubtags(stringSlice(tag, parsed.end + 1)) : [];
let pseudo;
for (let index = 0; index < parts.length; index++) {
const part = parts[index];
if (part.length === 1) break;
if (part === "psaccent" || part === "psbidi" || part === "pscrack") {
pseudo = part;
break;
}
}
if (!pseudo && !pseudoRegion(region)) {
if (script === "Zzzz") script = "";
if (region === "ZZ") region = "";
}
const flags = (language !== "und" ? 4 : 0) | (script && script !== "Zzzz" ? 2 : 0) | (region && region !== "ZZ" ? 1 : 0);
return {
language,
script,
region,
flags,
pseudo,
key: tag === "und" || stringIndexOf$1(tag, "und-x-") === 0 ? tag : `${language}|${script}|${region}|${flags}|${pseudo || ""}`
};
}
const stringKey = (value) => value;
const canonicalize = memoize((tag) => {
const basic = prefix(tag);
if (basic.end === tag.length && languageSubtag(basic.language) && !hasLocaleSet(languageAliases, basic.language) && !hasLocaleSet(scriptAliases, basic.script) && !hasLocaleSet(regionAliases, basic.region)) return tag;
return CanonicalizeLocaleList(tag)[0];
}, { serializer: stringKey });
const localeDescriptor$1 = Object.getOwnPropertyDescriptor;
const localePrototype = Object.getPrototypeOf;
const LocaleTypeError = TypeError;
const localeOperations = /* @__PURE__ */ new WeakMap();
const getLocaleOperations = localeOperations.get.bind(localeOperations);
const setLocaleOperations = localeOperations.set.bind(localeOperations);
let localeIntl = globalThis.Intl;
let localeConstructor;
function localeDescriptorMember(object, key, member = "value") {
const descriptor = localeDescriptor$1(object, key);
return descriptor && localeDescriptor$1(descriptor, member)?.value;
}
function localeFieldReader(prototype, key) {
const reader = localeDescriptorMember(prototype, key, "get");
return typeof reader === "function" ? reader : void 0;
}
function captureLocaleOperations(prototype) {
if (prototype === null) return void 0;
const cached = getLocaleOperations(prototype);
if (cached) return cached;
const inherited = captureLocaleOperations(localePrototype(prototype));
const ownMaximize = localeDescriptorMember(prototype, "maximize");
const operations = {
maximize: typeof ownMaximize === "function" ? ownMaximize : inherited?.maximize,
language: localeFieldReader(prototype, "language") ?? inherited?.language,
script: localeFieldReader(prototype, "script") ?? inherited?.script,
region: localeFieldReader(prototype, "region") ?? inherited?.region
};
setLocaleOperations(prototype, operations);
return operations;
}
function getLocaleConstructor() {
if (localeIntl === void 0) localeIntl = globalThis.Intl;
const installed = localeIntl && localeDescriptorMember(localeIntl, "Locale");
if (typeof installed === "function" && installed !== localeConstructor) {
const prototype = localeDescriptorMember(installed, "prototype");
if (typeof prototype === "object" && prototype !== null || typeof prototype === "function") captureLocaleOperations(prototype);
localeConstructor = installed;
}
return localeConstructor;
}
getLocaleConstructor();
function maximizeLocale(tag) {
const Constructor = getLocaleConstructor();
if (!Constructor) throw new LocaleTypeError("Intl.Locale provider is unavailable");
const locale = new Constructor(tag);
const maximize = captureLocaleOperations(localePrototype(locale))?.maximize;
if (!maximize) throw new LocaleTypeError("Intl.Locale maximize is unavailable");
return apply$4(maximize, locale, []);
}
function readLocaleField(locale, key) {
const reader = captureLocaleOperations(localePrototype(locale))?.[key];
return reader && apply$4(reader, locale, []);
}
const maximal = memoize((tag) => {
const input = fields(tag);
if (tag === "und" || stringIndexOf$1(tag, "und-x-") === 0) return {
...input,
language: tag,
script: "",
region: "",
flags: 7,
key: tag
};
const pseudo = pseudoRegion(input.region) ? input.region : input.pseudo === "psaccent" ? "XA" : input.pseudo === "psbidi" ? "XB" : input.pseudo === "pscrack" ? "XC" : void 0;
if (pseudo) {
const language = `${pseudo}:${input.language}`;
const script = `${pseudo}:${input.script}`;
const region = input.region || pseudo;
const flags = input.region ? 7 : 6;
return {
...input,
language,
script,
region,
flags,
key: `${language}|${script}|${region}|${flags}`
};
}
const locale = maximizeLocale(tag);
let flags = input.flags;
if (arrayIncludes(matchingData.macroRegions, input.region)) {
const regionLocale = maximizeLocale(`und-${input.region}`);
if (input.language === "und" && (!input.script || input.script === readLocaleField(regionLocale, "script")) || !input.script && !readLocaleField(maximizeLocale(input.language), "script")) flags &= -2;
}
let language = readLocaleField(locale, "language");
let script = readLocaleField(locale, "script") || "";
let region = readLocaleField(locale, "region") || "";
if (language === "und" || !script || !region) {
const fallback = maximizeLocale("und" + (script ? "-" + script : "") + (region ? "-" + region : ""));
if (language === "und") language = readLocaleField(fallback, "language") === "und" ? "en" : readLocaleField(fallback, "language");
script ||= readLocaleField(fallback, "script") || "Latn";
region ||= readLocaleField(fallback, "region") || "US";
}
return {
language,
script,
region,
flags,
key: `${language}|${script}|${region}|${flags}`
};
}, { serializer: stringKey });
function rawKey(tag) {
if (tag === "und") return "@und";
if (stringIndexOf$1(tag, "und-x-") === 0) return tag;
const parsed = prefix(tag);
const base = stringSlice(tag, 0, parsed.end);
if (pseudoRegion(parsed.region)) return base;
if (stringIndexOf$1(tag, "-ps") !== -1) {
const input = fields(tag);
if (input.pseudo) return input.key;
}
if (parsed.script !== "Zzzz" && parsed.region !== "ZZ") return base;
const script = parsed.script === "Zzzz" ? "" : parsed.script;
const region = parsed.region === "ZZ" ? "" : parsed.region;
return parsed.language + (script ? "-" + script : "") + (region ? "-" + region : "");
}
const hasOwnMatchingKey = Function.prototype.call.bind(Object.prototype.hasOwnProperty);
function matchingValue(table, key) {
return hasOwnMatchingKey(table, key) ? table[key] : void 0;
}
function distance(desired, supported) {
const languages = `${desired.language}|${supported.language}`;
let result = desired.language === supported.language ? 0 : matchingValue(matchingData.language, languages) ?? matchingData.defaults[0];
if (desired.script !== supported.script) result += matchingValue(matchingData.script, `${languages}|${desired.script}|${supported.script}`) ?? matchingData.defaults[1];
if (desired.region !== supported.region) {
const matrix = matchingValue(matchingData.region, `${languages}|${desired.script}|${supported.script}`) ?? matchingValue(matchingData.region, `${languages}|*|*`);
const desiredPartitions = matchingValue(matchingData.regions, desired.region);
const supportedPartitions = matchingValue(matchingData.regions, supported.region);
let regionDistance = matchingData.defaults[2];
if (matrix && desiredPartitions && supportedPartitions) {
regionDistance = 0;
for (let i = 0; i < desiredPartitions.length; i++) {
const row = desiredPartitions[i] * matchingData.partitionCount;
for (let j = 0; j < supportedPartitions.length; j++) regionDistance = maxDistance(regionDistance, matrix[row + supportedPartitions[j]]);
}
}
result += regionDistance;
}
return result === 0 ? (desired.flags ^ supported.flags) / DISTANCE_SCALE : result;
}
/** ICU language/script/region distance, including fractional explicit-subtag ties. */
const findMatchingDistance = memoize((desired, supported) => distance(maximal(canonicalize(desired)), maximal(canonicalize(supported))), { serializer: (args) => `${args[0]}|${args[1]}` });
const supportedCache = /* @__PURE__ */ new WeakMap();
const getSupported = supportedCache.get.bind(supportedCache);
const setSupported = supportedCache.set.bind(supportedCache);
const immutableLocaleLists = /* @__PURE__ */ new WeakSet();
const markLocaleListImmutable = immutableLocaleLists.add.bind(immutableLocaleLists);
const isLocaleListImmutable = immutableLocaleLists.has.bind(immutableLocaleLists);
let paradigms;
function createLocaleListSnapshot(locales, additionalLocales = []) {
const snapshot = [];
for (let index = 0; index < locales.length; index++) setDataProperty(snapshot, `${index}`, locales[index]);
for (let index = 0; index < additionalLocales.length; index++) setDataProperty(snapshot, `${snapshot.length}`, additionalLocales[index]);
markLocaleListImmutable(freezeLocaleList(snapshot));
return snapshot;
}
function equivalentKey(lsr) {
return `${lsr.language}|${lsr.script}|${lsr.region}`;
}
function prepare(locales) {
const immutable = isLocaleListImmutable(locales);
let result = getSupported(locales);
if (result && !immutable && (result.original.length !== locales.length || apply$4(some, result.original, [(tag, index) => tag !== locales[index]]))) result = void 0;
if (!result) {
result = {
__proto__: null,
original: immutable ? locales : Array.from(locales),
tags: [],
raw: new LocaleMap(),
orders: new LocaleMap(),
best: new LocaleMap()
};
setSupported(locales, result);
}
return result;
}
const getLocaleMap = Function.prototype.call.bind(LocaleMap.prototype.get);
const hasLocaleMap = Function.prototype.call.bind(LocaleMap.prototype.has);
const setLocaleMap = Function.prototype.call.bind(LocaleMap.prototype.set);
const localeMapSize = Object.getOwnPropertyDescriptor(LocaleMap.prototype, "size").get;
const clearLocaleMap = LocaleMap.prototype.clear;
function rawMatch(data, key) {
const cached = getLocaleMap(data.raw, key);
if (cached !== void 0) return cached;
for (let index = data.tags.length; index < data.original.length; index++) {
const tag = canonicalize(data.original[index]);
setDataProperty(data.tags, `${index}`, tag);
const candidate = rawKey(tag);
if (!hasLocaleMap(data.raw, candidate)) setLocaleMap(data.raw, candidate, index);
if (candidate === key) return getLocaleMap(data.raw, candidate);
}
}
function order(data, defaultLocale) {
let result = getLocaleMap(data.orders, defaultLocale);
if (!result) {
if (!data.maximal) {
const profiles = [];
for (let index = 0; index < data.tags.length; index++) setDataProperty(profiles, `${index}`, maximal(data.tags[index]));
data.maximal = profiles;
const exact = new LocaleMap();
data.exact = exact;
for (let index = 0; index < profiles.length; index++) {
const { key } = profiles[index];
if (!hasLocaleMap(exact, key)) setLocaleMap(exact, key, index);
}
}
if (!paradigms) {
const keys = new LocaleSet();
const tags = matchingData.paradigms;
for (let index = 0; index < tags.length; index++) addLocaleSet(keys, equivalentKey(maximal(canonicalize(tags[index]))));
paradigms = keys;
}
const defaultKey = defaultLocale ? equivalentKey(maximal(canonicalize(defaultLocale))) : "";
const rank = (index) => {
const key = equivalentKey(data.maximal[index]);
return key === defaultKey ? 0 : hasLocaleSet(paradigms, key) ? 1 : 2;
};
result = [];
for (let index = 0; index < data.tags.length; index++) setDataProperty(result, `${index}`, index);
apply$4(sortLocaleIndexes, result, [(a, b) => rank(a) - rank(b)]);
setLocaleMap(data.orders, defaultLocale, result);
}
return result;
}
function moreLikely(candidate, previous) {
if (candidate.language !== previous.language) return false;
if (!languageSubtag(candidate.language)) return false;
const likely = maximal(candidate.language);
return candidate.script !== previous.script ? candidate.script === likely.script : candidate.region !== previous.region && candidate.region === likely.region;
}
function equivalentMatch(desired, data) {
let best;
for (let flags = 0; flags < 8; flags++) {
let key = flags & 4 ? desired.language : "und";
if (flags & 2 && desired.script) key += "-" + desired.script;
if (flags & 1 && desired.region) key += "-" + desired.region;
const index = getLocaleMap(data.raw, key);
if (index === void 0) continue;
const supported = maximal(data.tags[index]);
if (equivalentKey(desired) !== equivalentKey(supported)) continue;
const d = distance(desired, supported);
if (d < minDistance(1, MIN_LSR_DISTANCE) && (!best || d < best.distance || d === best.distance && index < best.index)) best = {
index,
distance: d
};
}
return best;
}
/** Cached exact LSR lookup, then ICU distance matching. Threshold is exclusive. */
function findBestMatch(requestedLocales, supportedLocales, threshold = DEFAULT_MATCHING_THRESHOLD, defaultLocale = supportedLocales[0] || "", collectDistances = true) {
const result = {
__proto__: null,
distances: {}
};
if (!supportedLocales.length || !requestedLocales.length || threshold <= 0) return result;
const data = prepare(supportedLocales);
const demotion = matchingData.demotion;
let bestDistance = threshold;
for (let i = 0; i < requestedLocales.length && bestDistance > 0; i++) {
const desiredTag = requestedLocales[i];
const canonical = canonicalize(desiredTag);
const exactRaw = rawMatch(data, rawKey(canonical));
if (exactRaw !== void 0) {
result.matchedDesiredLocale = desiredTag;
result.matchedSupportedLocale = supportedLocales[exactRaw];
if (collectDistances) result.distances[desiredTag] = { [supportedLocales[exactRaw]]: i * demotion };
return result;
}
const desired = maximal(canonical);
const cacheKey = `${canonical}|${defaultLocale}`;
if (!collectDistances) {
const equivalent = getLocaleMap(data.best, cacheKey) || equivalentMatch(desired, data);
if (equivalent && equivalent.distance < minDistance(1, MIN_LSR_DISTANCE)) {
setLocaleMap(data.best, cacheKey, equivalent);
if (equivalent.distance < bestDistance) {
bestDistance = equivalent.distance;
result.matchedDesiredLocale = desiredTag;
result.matchedSupportedLocale = supportedLocales[equivalent.index];
}
bestDistance -= demotion;
continue;
}
}
const indexes = order(data, defaultLocale);
const exact = getLocaleMap(data.exact, desired.key);
if (exact !== void 0) {
result.matchedDesiredLocale = desiredTag;
result.matchedSupportedLocale = supportedLocales[exact];
if (collectDistances) result.distances[desiredTag] = { [supportedLocales[exact]]: i * demotion };
return result;
}
let best = collectDistances ? void 0 : getLocaleMap(data.best, cacheKey);
if (!best) {
best = {
index: -1,
distance: 1e400
};
const distances = {};
for (let candidate = 0; candidate < indexes.length; candidate++) {
const index = indexes[candidate];
const d = collectDistances ? findMatchingDistance(desiredTag, supportedLocales[index]) : distance(desired, data.maximal[index]);
if (collectDistances) distances[supportedLocales[index]] = d + i * demotion;
if (d < best.distance || d === best.distance && d >= 1 && best.index >= 0 && moreLikely(data.maximal[index], data.maximal[best.index])) best = {
index,
distance: d
};
}
if (collectDistances) result.distances[desiredTag] = distances;
else {
if (apply$4(localeMapSize, data.best, []) >= 256) apply$4(clearLocaleMap, data.best, []);
setLocaleMap(data.best, cacheKey, best);
}
}
if (best.distance < bestDistance) {
bestDistance = best.distance;
result.matchedDesiredLocale = desiredTag;
result.matchedSupportedLocale = supportedLocales[best.index];
}
bestDistance -= demotion;
}
return result;
}
/**
* https://tc39.es/ecma402/#sec-lookupmatchinglocalebybestfit
* @param availableLocales
* @param requestedLocales
* @param getDefaultLocale
*/
function BestFitMatcher(availableLocales, requestedLocales, getDefaultLocale) {
let foundLocale;
let extension;
const noExtensionLocaleMap = { __proto__: null };
const noExtensionLocales = [];
for (let index = 0; index < requestedLocales.length; index++) {
const locale = requestedLocales[index];
const { locale: noExtensionLocale } = splitUnicodeExtension(locale);
noExtensionLocaleMap[noExtensionLocale] ??= locale;
setDataProperty(noExtensionLocales, `${index}`, noExtensionLocale);
}
const defaultLocale = getDefaultLocale();
const result = findBestMatch(noExtensionLocales, availableLocales, void 0, defaultLocale, false);
if (result.matchedSupportedLocale && result.matchedDesiredLocale) {
foundLocale = result.matchedSupportedLocale;
extension = splitUnicodeExtension(noExtensionLocaleMap[result.matchedDesiredLocale]).extension;
}
if (!foundLocale) return {
locale: defaultLocale,
extension: void 0
};
return {
locale: foundLocale,
extension
};
}
const subdivisionAlias = {
"cn11": "cnbj",
"cn12": "cntj",
"cn13": "cnhe",
"cn14": "cnsx",
"cn15": "cnmn",
"cn21": "cnln",
"cn22": "cnjl",
"cn23": "cnhl",
"cn31": "cnsh",
"cn32": "cnjs",
"cn33": "cnzj",
"cn34": "cnah",
"cn35": "cnfj",
"cn36": "cnjx",
"cn37": "cnsd",
"cn41": "cnha",
"cn42": "cnhb",
"cn43": "cnhn",
"cn44": "cngd",
"cn45": "cngx",
"cn46": "cnhi",
"cn50": "cncq",
"cn51": "cnsc",
"cn52": "cngz",
"cn53": "cnyn",
"cn54": "cnxz",
"cn61": "cnsn",
"cn62": "cngs",
"cn63": "cnqh",
"cn64": "cnnx",
"cn65": "cnxj",
"cn71": "twzzzz",
"cn91": "hkzzzz",
"cn92": "mozzzz",
"cz10a": "cz110",
"cz10b": "cz111",
"cz10c": "cz112",
"cz10d": "cz113",
"cz10e": "cz114",
"cz10f": "cz115",
"cz611": "cz663",
"cz612": "cz632",
"cz613": "cz633",
"cz614": "cz634",
"cz615": "cz635",
"cz621": "cz641",
"cz622": "cz642",
"cz623": "cz643",
"cz624": "cz644",
"cz626": "cz646",
"cz627": "cz647",
"czjc": "cz31",
"czjm": "cz64",
"czka": "cz41",
"czkr": "cz52",
"czli": "cz51",
"czmo": "cz80",
"czol": "cz71",
"czpa": "cz53",
"czpl": "cz32",
"czpr": "cz10",
"czst": "cz20",
"czus": "cz42",
"czvy": "cz63",
"czzl": "cz72",
"fi01": "axzzzz",
"fra": "frges",
"frb": "frnaq",
"frbl": "blzzzz",
"frc": "frara",
"frcp": "cpzzzz",
"frd": "frbfc",
"fre": "frbre",
"frf": "frcvl",
"frg": "frges",
"frgf": "gfzzzz",
"frgp": "gpzzzz",
"frgua": "gpzzzz",
"frh": "frcor",
"fri": "frbfc",
"frj": "fridf",
"frk": "frocc",
"frl": "frnaq",
"frlre": "rezzzz",
"frm": "frges",
"frmay": "ytzzzz",
"frmf": "mfzzzz",
"frmq": "mqzzzz",
"frn": "frocc",
"frnc": "nczzzz",
"fro": "frhdf",
"frp": "frnor",
"frpf": "pfzzzz",
"frpm": "pmzzzz",
"frq": "frnor",
"frr": "frpdl",
"frre": "rezzzz",
"frs": "frhdf",
"frt": "frnaq",
"frtf": "tfzzzz",
"fru": "frpac",
"frv": "frara",
"frwf": "wfzzzz",
"fryt": "ytzzzz",
"laxn": "laxs",
"lud": "lucl",
"lug": "luec",
"lul": "luca",
"mrnkc": "mr13",
"nlaw": "awzzzz",
"nlcw": "cwzzzz",
"nlsx": "sxzzzz",
"no23": "no50",
"nzn": "nzauk",
"nzs": "nzcan",
"omba": "ombj",
"omsh": "omsj",
"plds": "pl02",
"plkp": "pl04",
"pllb": "pl08",
"plld": "pl10",
"pllu": "pl06",
"plma": "pl12",
"plmz": "pl14",
"plop": "pl16",
"plpd": "pl20",
"plpk": "pl18",
"plpm": "pl22",
"plsk": "pl26",
"plsl": "pl24",
"plwn": "pl28",
"plwp": "pl30",
"plzp": "pl32",
"shta": "tazzzz",
"tteto": "tttob",
"ttrcm": "ttmrc",
"ttwto": "tttob",
"twkhq": "twkhh",
"twtnq": "twtnn",
"twtpq": "twnwt",
"twtxq": "twtxg",
"usas": "aszzzz",
"usgu": "guzzzz",
"usmp": "mpzzzz",
"uspr": "przzzz",
"usum": "umzzzz",
"usvi": "vizzzz"
};
const extensionAlias = {
"t": {
"d0": { "name": "charname" },
"m0": {
"beta-metsehaf": "betamets",
"ies-jes": "iesjes",
"names": "prprname",
"tekie-alibekit": "tekieali"
}
},
"u": {
"ca": {
"ethiopic-amete-alem": "ethioaa",
"islamicc": "islamic-civil"
},
"kb": { "yes": "true" },
"kc": { "yes": "true" },
"kh": { "yes": "true" },
"kk": { "yes": "true" },
"kn": { "yes": "true" },
"ks": {
"primary": "level1",
"tertiary": "level3"
},
"ms": { "imperial": "uksystem" },
"tz": {
"aqams": "aqmcm",
"aukns": "auhba",
"caffs": "cawnp",
"camtr": "cator",
"canpg": "cator",
"capnt": "caiql",
"cathu": "cator",
"cayzf": "caedm",
"cet": "bebru",
"cnckg": "cnsha",
"cnhrb": "cnsha",
"cnkhg": "cnurc",
"cuba": "cuhav",
"eet": "grath",
"egypt": "egcai",
"eire": "iedub",
"est": "papty",
"factory": "unk",
"gaza": "gazastrp",
"gmt0": "gmt",
"hongkong": "hkhkg",
"hst": "ushnl",
"iceland": "isrey",
"iran": "irthr",
"israel": "jeruslm",
"jamaica": "jmkin",
"japan": "jptyo",
"libya": "lytip",
"met": "bebru",
"mncoq": "mnuln",
"mst": "usphx",
"mxstis": "mxtij",
"navajo": "usden",
"poland": "plwaw",
"portugal": "ptlis",
"prc": "cnsha",
"roc": "twtpe",
"rok": "krsel",
"turkey": "trist",
"uaozh": "uaiev",
"uauzh": "uaiev",
"uct": "utc",
"umjon": "ushnl",
"usnavajo": "usden",
"wet": "ptlis",
"zulu": "utc"
}
}
};
const hasOwn$1 = Function.prototype.call.bind(Object.prototype.hasOwnProperty);
const fromCharCode = String.fromCharCode;
function CanonicalizeUValue(ukey, uvalue) {
invariant$1(ukey !== void 0, `ukey must be defined`);
let canonicalized = "";
for (let i = 0; i < uvalue.length; i++) {
const code = stringCharCodeAt(uvalue, i);
canonicalized += code >= 65 && code <= 90 ? fromCharCode(code + 32) : uvalue[i];
}
const aliases = hasOwn$1(extensionAlias.u, ukey) ? extensionAlias.u[ukey] : void 0;
if (aliases && hasOwn$1(aliases, canonicalized)) canonicalized = aliases[canonicalized];
if ((ukey === "rg" || ukey === "sd") && hasOwn$1(subdivisionAlias, canonicalized)) canonicalized = subdivisionAlias[canonicalized];
return canonicalized === "true" ? "" : canonicalized;
}
function CanonicalizeUnicodeLocaleId(locale) {
return CanonicalizeLocaleList(locale)[0];
}
function InsertUnicodeExtensionAndCanonicalize(locale, attributes, keywords) {
invariant$1(splitUnicodeExtension(locale).extension === void 0, "Expected locale to not have a Unicode locale extension");
let extension = "-u";
for (let i = 0; i < attributes.length; i++) extension += `-${attributes[i]}`;
for (let i = 0; i < keywords.length; i++) {
const { key, value } = keywords[i];
extension += `-${key}`;
if (value !== "") extension += `-${value}`;
}
if (extension === "-u") return CanonicalizeUnicodeLocaleId(locale);
let privateIndex = stringIndexOf$1(locale, "-x-");
let newLocale;
if (privateIndex === -1) newLocale = locale + extension;
else {
let preExtension = stringSlice(locale, 0, privateIndex);
let postExtension = stringSlice(locale, privateIndex);
newLocale = preExtension + extension + postExtension;
}
return CanonicalizeUnicodeLocaleId(newLocale);
}
/**
* https://tc39.es/ecma402/#sec-lookupmatchinglocalebyprefix
* @param availableLocales
* @param requestedLocales
* @param getDefaultLocale
*/
function LookupMatcher(availableLocales, requestedLocales, getDefaultLocale) {
const result = {
locale: "",
extension: void 0
};
for (let i = 0; i < requestedLocales.length; i++) {
const locale = requestedLocales[i];
const { locale: noExtensionLocale, extension } = splitUnicodeExtension(locale);
const availableLocale = BestAvailableLocale(availableLocales, noExtensionLocale);
if (availableLocale) {
result.locale = availableLocale;
if (extension) result.extension = extension;
return result;
}
}
result.locale = getDefaultLocale();
return result;
}
function UnicodeExtensionComponents(extension) {
invariant$1(extension === stringLowerCase(extension), "Expected extension to be lowercase");
invariant$1(stringSlice(extension, 0, 3) === "-u-", "Expected extension to be a Unicode locale extension");
const attributes = [];
const keywords = [];
let keyword;
let size = extension.length;
let k = 3;
while (k < size) {
let e = stringIndexOf$1(extension, "-", k);
let len;
if (e === -1) len = size - k;
else len = e - k;
let subtag = stringSlice(extension, k, k + len);
invariant$1(len >= 2, "Expected a subtag to have at least 2 characters");
if (keyword === void 0 && len != 2) {
if (arrayIndexOf(attributes, subtag) === -1) setDataProperty(attributes, `${attributes.length}`, subtag);
} else if (len === 2) {
keyword = {
key: subtag,
value: ""
};
if (arrayFind(keywords, (k) => k.key === keyword?.key) === void 0) setDataProperty(keywords, `${keywords.length}`, keyword);
} else if (keyword?.value === "") keyword.value = subtag;
else {
invariant$1(keyword !== void 0, "Expected keyword to be defined");
keyword.value += "-" + subtag;
}
k += len + 1;
}
return {
attributes,
keywords
};
}
const availableLocaleArrays = /* @__PURE__ */ new WeakMap();
const getLocaleArray = availableLocaleArrays.get.bind(availableLocaleArrays);
const setLocaleArray = availableLocaleArrays.set.bind(availableLocaleArrays);
const localeApply = Reflect.apply;
const localeIsArray = Array.isArray;
const localeSetValues = Set.prototype.values;
const localeSetSize = Object.getOwnPropertyDescriptor(Set.prototype, "size").get;
const localeSetNext = Object.getPrototypeOf((/* @__PURE__ */ new Set()).values()).next;
const localeLowerCase = String.prototype.toLowerCase;
const localeDescriptor = Object.getOwnPropertyDescriptor;
const hostDefaultLocaleKey = Symbol.for("@formatjs/intlHostDefaultLocale");
function readHostDefaultLocale() {
const intl = localeDescriptorMember(globalThis, "Intl");
if (!intl) return void 0;
let canRetain = false;
try {
const retained = localeDescriptor(intl, hostDefaultLocaleKey);
const cached = retained && localeDescriptor(retained, "value")?.value;
if (typeof cached === "string") return cached;
canRetain = retained === void 0;
} catch {}
for (const name of ["NumberFormat", "DateTimeFormat"]) try {
const Constructor = localeDescriptorMember(intl, name);
if (typeof Constructor !== "function" || localeDescriptorMember(Constructor, "polyfilled")) continue;
const prototype = localeDescriptorMember(Constructor, "prototype");
if (!prototype) continue;
const resolve = localeDescriptorMember(prototype, "resolvedOptions");
if (typeof resolve !== "function") continue;
const locale = localeDescriptorMember(localeApply(resolve, new Constructor(), []), "locale");
if (typeof locale !== "string" || !locale) continue;
const tag = splitUnicodeExtension(locale).locale;
try {
if (canRetain && Object.isExtensible(intl)) Object.defineProperty(intl, hostDefaultLocaleKey, {
__proto__: null,
value: tag
});
} catch {}
return tag;
} catch {}
}
const hostDefaultLocale = readHostDefaultLocale();
const hostRegionLocale = hostDefaultLocale && scriptlessRegionLocale(hostDefaultLocale);
const hostLocaleSupport = /* @__PURE__ */ new WeakMap();
const getHostLocaleSupport = hostLocaleSupport.get.bind(hostLocaleSupport);
const setHostLocaleSupport = hostLocaleSupport.set.bind(hostLocaleSupport);
function getServiceLocaleList(locales, bestFit) {
const available = getAvailableLocaleList(locales, bestFit);
const cacheable = !localeIsArray(locales);
const cached = cacheable && getHostLocaleSupport(available);
if (cached) return cached;
const dataLocale = hostDefaultLocale && BestAvailableLocale(available, hostDefaultLocale);
const aliases = [];
if (hostDefaultLocale && dataLocale && dataLocale !== hostDefaultLocale) setDataProperty(aliases, 0, hostDefaultLocale);
const regionAlias = dataLocale && hostRegionLocale && arrayIndexOf(available, hostRegionLocale) < 0 ? hostRegionLocale : void 0;
if (regionAlias) setDataProperty(aliases, aliases.length, regionAlias);
const support = {
available: aliases.length ? createLocaleListSnapshot(available, aliases) : available,
defaultLocale: dataLocale ? hostDefaultLocale : void 0,
dataLocale,
regionAlias
};
if (cacheable) setHostLocaleSupport(available, support);
return support;
}
function getAvailableLocaleList(locales, bestFit) {
if (localeIsArray(locales)) return locales;
const available = locales;
let cached = getLocaleArray(available);
if (cached?.original.length !== localeApply(localeSetSize, available, [])) cached = void 0;
if (cached) {
const original = cached.original;
let index = 0;
const iterator = localeApply(localeSetValues, available, []);
for (;;) {
const next = localeApply(localeSetNext, iterator, []);
if (next.done) break;
if (original[index++] !== next.value) {
cached = void 0;
break;
}
}
}
if (!cached) {
const original = [];
const iterator = localeApply(localeSetValues, available, []);
for (;;) {
const next = localeApply(localeSetNext, iterator, []);
if (next.done) break;
setDataProperty(original, `${original.length}`, next.value);
}
cached = {
original,
snapshot: void 0
};
setLocaleArray(available, cached);
}
if (!bestFit) return cached.original;
return cached.snapshot ??= createLocaleListSnapshot(cached.original);
}
/**
* https://tc39.es/ecma402/#sec-resolvelocale
*/
function ResolveLocale(availableLocales, requestedLocales, options, relevantExtensionKeys, localeData, getDefaultLocale, mode = void 0) {
const matcher = options.localeMatcher;
const hostSupport = mode === "hostDefaultWithLocaleData" ? getServiceLocaleList(availableLocales, matcher !== "lookup") : void 0;
const available = hostSupport?.available ?? getAvailableLocaleList(availableLocales, matcher !== "lookup");
const hostLocale = hostSupport?.defaultLocale;
const defaultLocale = hostLocale ? () => hostLocale : getDefaultLocale;
let r;
if (matcher === "lookup") r = LookupMatcher(available, requestedLocales, defaultLocale);
else r = BestFitMatcher(available, requestedLocales, defaultLocale);
if (r == null) r = {
locale: defaultLocale(),
extension: ""
};
let foundLocale = r.locale;
const result = { __proto__: null };
const dataLocale = foundLocale === hostLocale || foundLocale === hostSupport?.regionAlias ? hostSupport?.dataLocale ?? foundLocale : foundLocale;
const foundLocaleData = localeData?.[dataLocale];
result.dataLocale = dataLocale;
if (mode) result.localeData = foundLocaleData;
let components;
let keywords;
if (r.extension) {
components = UnicodeExtensionComponents(r.extension);
keywords = components.keywords;
} else keywords = [];
let supportedKeywords = [];
for (let keyIndex = 0; keyIndex < relevantExtensionKeys.length; keyIndex++) {
const key = relevantExtensionKeys[keyIndex];
let keyLocaleData = foundLocaleData?.[key] ?? [];
invariant$1(localeIsArray(keyLocaleData), `keyLocaleData for ${key} must be an array`);
let value = keyLocaleData[0];
invariant$1(value == null || typeof value === "string", `value must be a string, null, or undefined`);
let supportedKeyword;
let entry = arrayFind(keywords, (k) => k.key === key);
if (entry) {
let requestedValue = entry.value;
if (requestedValue !== "") {
if (arrayIndexOf(keyLocaleData, requestedValue) > -1) {
value = requestedValue;
supportedKeyword = {
key,
value
};
}
} else if (arrayIndexOf(keyLocaleData, "true") > -1) {
value = "true";
supportedKeyword = {
key,
value
};
}
}
let optionsValue = options[key];
invariant$1(optionsValue == null || typeof optionsValue === "string", `optionsValue must be a string or undefined`);
if (typeof optionsValue === "string") {
optionsValue = CanonicalizeUValue(localeApply(localeLowerCase, key, []), optionsValue);
if (optionsValue === "") optionsValue = "true";
}
if (optionsValue !== void 0 && optionsValue !== value && arrayIndexOf(keyLocaleData, optionsValue) > -1) {
value = optionsValue;
supportedKeyword = void 0;
}
if (supportedKeyword) setDataProperty(supportedKeywords, `${supportedKeywords.length}`, supportedKeyword);
result[key] = value;
}
if (supportedKeywords.length > 0) foundLocale = InsertUnicodeExtensionAndCanonicalize(foundLocale, [], supportedKeywords);
result.locale = foundLocale;
return result;
}
function FilterLocales(availableLocales, requestedLocales, matcher, includeHostLocale = false) {
const bestFit = matcher === "best fit";
const available = includeHostLocale ? getServiceLocaleList(availableLocales, bestFit).available : getAvailableLocaleList(availableLocales, bestFit);
const subset = [];
for (let index = 0; index < requestedLocales.length; index++) {
const locale = requestedLocales[index];
const { locale: noExtensionLocale } = splitUnicodeExtension(locale);
if (matcher === "lookup" ? BestAvailableLocale(available, noExtensionLocale) : findBestMatch([noExtensionLocale], available, void 0, void 0, false).matchedSupportedLocale ?? (canUseBestFitPrefixFallback(noExtensionLocale) ? BestAvailableLocale(available, noExtensionLocale) : void 0)) setDataProperty(subset, subset.length, locale);
}
return subset;
}
function match(requestedLocales, availableLocales, defaultLocale, opts) {
return ResolveLocale(availableLocales, CanonicalizeLocaleList(requestedLocales), { localeMatcher: opts?.algorithm || "best fit" }, [], void 0, () => defaultLocale).locale;
}
// packages/ecma262-abstract/ToObject.js
/**
* https://tc39.es/ecma262/#sec-toobject
*/
function ToObject(arg) {
if (arg === void 0 || arg === null) throw new TypeErrorConstructor$1("undefined/null cannot be converted to object");
return objectFrom(arg);
}
// packages/ecma402-abstract/CoerceOptionsToObject.js
const createObject = Object.create;
/**
* https://tc39.es/ecma402/#sec-coerceoptionstoobject
* @param options
* @returns
*/
function CoerceOptionsToObject(options) {
if (options === void 0) return createObject(null);
return ToObject(options);
}
// packages/ecma262-abstract/IsObject.js
function IsObject(value) {
return value !== null && (typeof value === "object" || typeof value === "function" || typeof value === "undefined" && value !== void 0);
}
// packages/ecma402-abstract/GetOption.js
const optionApply = Reflect.apply;
const optionJoin = Array.prototype.join;
/**
* https://tc39.es/ecma402/#sec-getoption
* @param opts
* @param prop
* @param type
* @param values
* @param fallback
*/
function GetOption(opts, prop, type, values, fallback) {
if (!IsObject(opts)) throw new TypeErrorConstructor$1("Options must be an object");
let value = opts[prop];
if (value !== void 0) {
if (type !== "boolean" && type !== "string") throw new TypeErrorConstructor$1("invalid type");
if (type === "boolean") value = !!value;
if (type === "string") value = ToString(value);
if (values?.length && !arraySome(values, (val) => val === value)) throw new RangeErrorConstructor(`${value} is not within ${optionApply(optionJoin, values, [", "])}`);
return value;
}
return fallback;
}
// packages/ecma402-abstract/SupportedLocales.js
function SupportedLocales(availableLocales, requestedLocales, options) {
return FilterLocales(availableLocales, requestedLocales, GetOption(CoerceOptionsToObject(options), "localeMatcher", "string", ["lookup", "best fit"], "best fit"), true);
}
// packages/ecma402-abstract/IsUnicodeLocaleIdentifierType.js
const typeApply = Reflect.apply;
const charCodeAt = String.prototype.charCodeAt;
/** Tests the Unicode locale identifier `type` grammar, not locale support. */
function IsUnicodeLocaleIdentifierType(value) {
let length = 0;
for (let index = 0; index < value.length; index++) {
const code = typeApply(charCodeAt, value, [index]);
if (code === 45) {
if (length < 3) return false;
length = 0;
continue;
}
const letter = code | 32;
if (!(letter >= 97 && letter <= 122) && !(code >= 48 && code <= 57)) return false;
if (++length > 8) return false;
}
return length >= 3;
}
String.prototype.repeat;
Array.from;
Array.prototype.join;
function defineProperty(target, name, { value }) {
Object.defineProperty(target, name, {
configurable: true,
enumerable: false,
writable: true,
value
});
}
function ensureIntl() {
if (typeof Intl === "undefined") {
const intl = {};
if (typeof Symbol !== "undefined") Object.defineProperty(intl, Symbol.toStringTag, {
value: "Intl",
writable: false,
enumerable: false,
configurable: true
});
Object.defineProperty(globalThis, "Intl", {
configurable: true,
enumerable: false,
writable: true,
value: intl
});
}
if (providerIntl === void 0) providerIntl = Intl;
return Intl;
}
function invariant(condition, message, Err = ErrorConstructor) {
if (!condition) throw new Err(message);
}
memoize((...args) => new Intl.NumberFormat(...args), { strategy: strategies.variadic });
memoize((...args) => new Intl.ListFormat(...args), { strategy: strategies.variadic });
const getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
const formatterMemoizeOptions = {
__proto__: null,
strategy: strategies.variadic
};
let providerIntl = globalThis.Intl;
function ownIntlProvider(name) {
const descriptor = providerIntl && getOwnPropertyDescriptor(providerIntl, name);
return (descriptor && getOwnPropertyDescriptor(descriptor, "value"))?.value;
}
let numberFormatIntrinsic = ownIntlProvider("NumberFormat");
let listFormatIntrinsic = ownIntlProvider("ListFormat");
let pluralRulesProvider = ownIntlProvider("PluralRules");
const formatterIntrinsicKeys = {
NumberFormat: Symbol.for("@formatjs/intlNumberFormat"),
ListFormat: Symbol.for("@formatjs/intlListFormat"),
PluralRules: Symbol.for("@formatjs/intlPluralRules")
};
function getNumberFormatIntrinsic() {
if (providerIntl === void 0) providerIntl = globalThis.Intl;
const registered = ownIntlProvider(formatterIntrinsicKeys.NumberFormat);
if (typeof registered === "function") return registered;
if (typeof numberFormatIntrinsic !== "function") numberFormatIntrinsic = ownIntlProvider("NumberFormat");
return numberFormatIntrinsic;
}
function getPluralRulesIntrinsic() {
if (providerIntl === void 0) providerIntl = globalThis.Intl;
const registered = ownIntlProvider(formatterIntrinsicKeys.PluralRules);
if (typeof registered === "function") return registered;
if (typeof pluralRulesProvider !== "function") pluralRulesProvider = ownIntlProvider("PluralRules");
return pluralRulesProvider;
}
const getFormatterPrototype = Object.getPrototypeOf;
function formatterMethodLookup(name) {
const methods = /* @__PURE__ */ new WeakMap();
const owners = /* @__PURE__ */ new WeakMap();
const getMethod = methods.get.bind(methods);
const setMethod = methods.set.bind(methods);
const getOwner = owners.get.bind(owners);
const setOwner = owners.set.bind(owners);
return (Constructor) => {
const cached = getMethod(Constructor);
if (cached) return cached;
let prototype = getOwnPropertyDescriptor(Constructor, "prototype")?.value;
while (prototype != null) {
const inherited = getOwner(prototype);
if (inherited) {
setMethod(Constructor, inherited);
return inherited;
}
const descriptor = getOwnPropertyDescriptor(prototype, name);
const value = descriptor && getOwnPropertyDescriptor(descriptor, "value");
if (value && typeof value.value === "function") {
const method = value.value;
setMethod(Constructor, method);
setOwner(prototype, method);
return method;
}
prototype = getFormatterPrototype(prototype);
}
};
}
const findFormatterPartsMethod = formatterMethodLookup("formatToParts");
const findPluralRulesSelectMethod = formatterMethodLookup("select");
if (typeof numberFormatIntrinsic === "function") findFormatterPartsMethod(numberFormatIntrinsic);
if (typeof listFormatIntrinsic === "function") findFormatterPartsMethod(listFormatIntrinsic);
if (typeof pluralRulesProvider === "function") findPluralRulesSelectMethod(pluralRulesProvider);
const numberFormatMemoizers = /* @__PURE__ */ new WeakMap();
const getNumberFormatMemoizer = numberFormatMemoizers.get.bind(numberFormatMemoizers);
const setNumberFormatMemoizer = numberFormatMemoizers.set.bind(numberFormatMemoizers);
const listFormatMemoizers = /* @__PURE__ */ new WeakMap();
listFormatMemoizers.get.bind(listFormatMemoizers);
listFormatMemoizers.set.bind(listFormatMemoizers);
const pluralRulesMemoizers = /* @__PURE__ */ new WeakMap();
const getPluralRulesMemoizer = pluralRulesMemoizers.get.bind(pluralRulesMemoizers);
const setPluralRulesMemoizer = pluralRulesMemoizers.set.bind(pluralRulesMemoizers);
function createMemoizedPluralRulesForConstructor(Constructor) {
let factory = getPluralRulesMemoizer(Constructor);
if (!factory) {
factory = memoize((locale) => new Constructor(locale), formatterMemoizeOptions);
setPluralRulesMemoizer(Constructor, factory);
}
return factory;
}
function createMemoizedNumberFormatForConstructor(Constructor) {
let factory = getNumberFormatMemoizer(Constructor);
if (!factory) {
factory = memoize((...args) => new Constructor(args[0], args[1]), formatterMemoizeOptions);
setNumberFormatMemoizer(Constructor, factory);
}
return factory;
}
// packages/ecma402-abstract/RelativeTimeFormat/InitializeRelativeTimeFormat.js
const apply$1 = Reflect.apply;
function InitializeRelativeTimeFormat(rtf, locales, options, { getInternalSlots, availableLocales, relevantExtensionKeys, localeData, getDefaultLocale }) {
const internalSlots = getInternalSlots(rtf);
internalSlots.initializedRelativeTimeFormat = true;
const requestedLocales = CanonicalizeLocaleList$1(locales);
const opt = { __proto__: null };
const opts = CoerceOptionsToObject(options);
opt.localeMatcher = GetOption(opts, "localeMatcher", "string", ["best fit", "lookup"], "best fit");
const numberingSystem = GetOption(opts, "numberingSystem", "string", void 0, void 0);
if (numberingSystem !== void 0) {
if (!IsUnicodeLocaleIdentifierType(numberingSystem)) throw new RangeErrorConstructor(`Invalid numbering system ${numberingSystem}`);
}
opt.nu = numberingSystem;
const r = ResolveLocale(availableLocales, requestedLocales, opt, relevantExtensionKeys, localeData, getDefaultLocale, "hostDefaultWithLocaleData");
const { locale, nu } = r;
internalSlots.locale = locale;
const fields = r.localeData;
invariant(!!fields, `Missing locale data for ${r.dataLocale}`);
internalSlots.fields = fields;
internalSlots.numberingSystem = nu;
internalSlots.style = GetOption(opts, "style", "string", [
"long",
"narrow",
"short"
], "long");
internalSlots.numeric = GetOption(opts, "numeric", "string", ["always", "auto"], "always");
const nfOptions = {
__proto__: null,
numberingSystem: nu
};
const NumberFormat = getNumberFormatIntrinsic();
const numberFormat = createMemoizedNumberFormatForConstructor(NumberFormat)(locale, nfOptions);
const PluralRules = getPluralRulesIntrinsic();
const pluralRules = createMemoizedPluralRulesForConstructor(PluralRules)(locale);
const formatToParts = findFormatterPartsMethod(NumberFormat);
if (formatToParts) internalSlots.formatNumber = (value) => apply$1(formatToParts, numberFormat, [value]);
else {
const format = numberFormat.format;
internalSlots.formatNumber = (value) => [{
type: "literal",
value: format(value)
}];
}
const select = findPluralRulesSelectMethod(PluralRules);
invariant(select !== void 0, "Missing supplied PluralRules select method");
internalSlots.selectPlural = (value) => apply$1(select, pluralRules, [value]);
return rtf;
}
// packages/ecma262-abstract/SameValue.js
function SameValue(x, y) {
if (x === y) return x !== 0 || 1 / x === 1 / y;
return x !== x && y !== y;
}
// packages/ecma262-abstract/Type.js
function Type(x) {
if (x === null) return "Null";
if (x === void 0) return "Undefined";
if (IsObject(x)) return "Object";
if (typeof x === "number") return "Number";
if (typeof x === "boolean") return "Boolean";
if (typeof x === "string") return "String";
if (typeof x === "symbol") return "Symbol";
if (typeof x === "bigint") return "BigInt";
}
// packages/ecma402-abstract/RelativeTimeFormat/SingularRelativeTimeUnit.js
function SingularRelativeTimeUnit(unit) {
invariant(Type(unit) === "String", "unit must be a string");
if (unit === "seconds") return "second";
if (unit === "minutes") return "minute";
if (unit === "hours") return "hour";
if (unit === "days") return "day";
if (unit === "weeks") return "week";
if (unit === "months") return "month";
if (unit === "quarters") return "quarter";
if (unit === "years") return "year";
if (unit !== "second" && unit !== "minute" && unit !== "hour" && unit !== "day" && unit !== "week" && unit !== "month" && unit !== "quarter" && unit !== "year") throw new RangeErrorConstructor("invalid unit");
return unit;
}
// packages/ecma402-abstract/PartitionPattern.js
const apply = Reflect.apply;
const stringIndexOf = String.prototype.indexOf;
const substring = String.prototype.substring;
function PartitionPattern(pattern) {
const result = [];
let placeholderEnd = -1;
let placeholderStart = apply(stringIndexOf, pattern, ["{", 0]);
while (placeholderStart !== -1) {
const literal = apply(substring, pattern, [placeholderEnd + 1, placeholderStart]);
if (literal !== "") setDataProperty$1(result, `${result.length}`, {
type: "literal",
value: literal
});
placeholderEnd = apply(stringIndexOf, pattern, ["}", placeholderStart]);
invariant(placeholderEnd > placeholderStart, `Invalid pattern ${pattern}`);
const placeholderName = apply(substring, pattern, [placeholderStart + 1, placeholderEnd]);
setDataProperty$1(result, `${result.length}`, {
type: placeholderName,
value: void 0
});
placeholderStart = apply(stringIndexOf, pattern, ["{", placeholderEnd]);
}
const tail = apply(substring, pattern, [placeholderEnd + 1]);
if (tail !== "") setDataProperty$1(result, `${result.length}`, {
type: "literal",
value: tail
});
return result;
}
// packages/ecma402-abstract/RelativeTimeFormat/MakePartsList.js
function MakePartsList(pattern, unit, parts) {
const patternParts = PartitionPattern(pattern);
const result = [];
for (let i = 0; i < patternParts.length; i++) {
const patternPart = patternParts[i];
if (patternPart.type === "literal") setDataProperty$1(result, result.length, {
type: "literal",
value: patternPart.value
});
else {
invariant(patternPart.type === "0", `Malformed pattern ${pattern}`);
for (let j = 0; j < parts.length; j++) {
const part = parts[j];
setDataProperty$1(result, result.length, {
type: part.type,
value: part.value,
unit
});
}
}
}
return result;
}
// packages/ecma402-abstract/RelativeTimeFormat/PartitionRelativeTimePattern.js
const hasOwn = Function.prototype.call.bind(Object.prototype.hasOwnProperty);
const abs = Math.abs;
function PartitionRelativeTimePattern({ fields, style, numeric, selectPlural, formatNumber }, value, unit) {
if (!numberIsFinite(value)) throw new RangeErrorConstructor(`Invalid value ${value}`);
const resolvedUnit = SingularRelativeTimeUnit(unit);
let entry = resolvedUnit;
if (style === "short") entry = `${resolvedUnit}-short`;
else if (style === "narrow") entry = `${resolvedUnit}-narrow`;
if (!hasOwn(fields, entry)) entry = resolvedUnit;
const patterns = fields[entry];
if (numeric === "auto") {
const valueString = ToString(value);
if (hasOwn(patterns, valueString)) return [{
type: "literal",
value: patterns[valueString]
}];
}
let tl = "future";
if (SameValue(value, -0) || value < 0) tl = "past";
const po = patterns[tl];
const fv = formatNumber(abs(value));
const pr = selectPlural(value);
return MakePartsList((hasOwn(po, pr) ? po[pr] : void 0) ?? po.other, resolvedUnit, fv);
}
// packages/intl-relativetimeformat/get_internal_slots.ts
const internalSlotMap = /* @__PURE__ */ new WeakMap();
const readSlots = WeakMap.prototype.get.bind(internalSlotMap);
const writeSlots = WeakMap.prototype.set.bind(internalSlotMap);
function requireInternalSlots(receiver) {
const slots = readSlots(receiver);
if (!slots?.initializedRelativeTimeFormat) throw new TypeErrorConstructor$1("Incompatible Intl.RelativeTimeFormat receiver");
return slots;
}
function getInternalSlots(x) {
let internalSlots = readSlots(x);
if (!internalSlots) {
internalSlots = objectCreate(null);
writeSlots(x, internalSlots);
}
return internalSlots;
}
// packages/intl-relativetimeformat/index.ts
let defaultLocale = "";
function getDefaultLocale() {
return defaultLocale;
}
var RelativeTimeFormat = class RelativeTimeFormat extends null {
constructor(locales, options) {
return InitializeRelativeTimeFormat(createFromConstructor(new.target, RelativeTimeFormat.prototype), locales, options, {
getInternalSlots,
availableLocales: RelativeTimeFormat.availableLocales,
relevantExtensionKeys: ["nu"],
localeData: RelativeTimeFormat.localeData,
getDefaultLocale
});
}
format(value, unit) {
const parts = PartitionRelativeTimePattern(requireInternalSlots(this), +value, ToString(unit));
let result = "";
for (let index = 0; index < parts.length; index++) result += parts[index].value;
return result;
}
formatToParts(value, unit) {
return PartitionRelativeTimePattern(requireInternalSlots(this), +value, ToString(unit));
}
resolvedOptions() {
const internalSlots = requireInternalSlots(this);
return {
locale: internalSlots.locale,
style: internalSlots.style,
numeric: internalSlots.numeric,
numberingSystem: internalSlots.numberingSystem
};
}
static supportedLocalesOf(locales, options) {
return SupportedLocales(RelativeTimeFormat.availableLocales, CanonicalizeLocaleList$1(locales), options);
}
static __addLocaleData(...data) {
for (const { data: d, locale: tag } of data) {
const locale = canonicalizeLocaleDataTag(tag);
registerLocaleData(locale, d, RelativeTimeFormat.localeData, RelativeTimeFormat.availableLocales);
if (!defaultLocale) defaultLocale = locale;
}
}
static {
this.localeData = {};
}
static {
this.availableLocales = /* @__PURE__ */ new Set();
}
static {
this.polyfilled = true;
}
};
Object.setPrototypeOf(RelativeTimeFormat.prototype, Object.prototype);
try {
if (typeof Symbol !== "undefined") Object.defineProperty(RelativeTimeFormat.prototype, Symbol.toStringTag, {
value: "Intl.RelativeTimeFormat",
writable: false,
enumerable: false,
configurable: true
});
Object.defineProperty(RelativeTimeFormat.prototype.constructor, "length", {
value: 0,
writable: false,
enumerable: false,
configurable: true
});
Object.defineProperty(RelativeTimeFormat.supportedLocalesOf, "length", {
value: 1,
writable: false,
enumerable: false,
configurable: true
});
} catch {}
// node_modules/.aspect_rules_js/@formatjs_generated+cldr.supported-locales@0.0.0/node_modules/@formatjs_generated/cldr.supported-locales/intl-relativetimeformat.js
const supportedLocales = [
"ady",
"ady-JO",
"ady-TR",
"af",
"af-NA",
"agq",
"ak",
"am",
"ar",
"ar-AE",
"ar-BH",
"ar-DJ",
"ar-DZ",
"ar-EG",
"ar-EH",
"ar-ER",
"ar-IL",
"ar-IQ",
"ar-JO",
"ar-KM",
"ar-KW",
"ar-LB",
"ar-LY",
"ar-MA",
"ar-MR",
"ar-OM",
"ar-PS",
"ar-QA",
"ar-SA",
"ar-SD",
"ar-SO",
"ar-SS",
"ar-SY",
"ar-TD",
"ar-TN",
"ar-YE",
"as",
"asa",
"ast",
"az",
"az-Cyrl",
"az-Latn",
"ba",
"bal-Latn",
"bas",
"be",
"be-tarask",
"bem",
"bez",
"bg",
"bgc",
"bho",
"blo",
"bm",
"bn",
"bn-IN",
"bo",
"bo-IN",
"br",
"brx",
"bs",
"bs-Cyrl",
"bs-Latn",
"bua",
"ca",
"ca-AD",
"ca-ES-valencia",
"ca-FR",
"ca-IT",
"ccp",
"ccp-IN",
"ce",
"ceb",
"cgg",
"chr",
"ckb",
"ckb-IR",
"cop",
"cs",
"csw",
"cv",
"cy",
"da",
"da-GL",
"dav",
"de",
"de-AT",
"de-BE",
"de-CH",
"de-IT",
"de-LI",
"de-LU",
"dje",
"doi",
"dsb",
"dua",
"dyo",
"dz",
"ebu",
"ee",
"ee-TG",
"el",
"el-CY",
"el-polyton",
"en",
"en-001",
"en-150",
"en-AE",
"en-AG",
"en-AI",
"en-AS",
"en-AT",
"en-AU",
"en-BB",
"en-BE",
"en-BI",
"en-BM",
"en-BS",
"en-BW",
"en-BZ",
"en-CA",
"en-CC",
"en-CH",
"en-CK",
"en-CM",
"en-CX",
"en-CY",
"en-CZ",
"en-DE",
"en-DG",
"en-DK",
"en-DM",
"en-EE",
"en-ER",
"en-ES",
"en-FI",
"en-FJ",
"en-FK",
"en-FM",
"en-FR",
"en-GB",
"en-GD",
"en-GE",
"en-GG",
"en-GH",
"en-GI",
"en-GM",
"en-GS",
"en-GU",
"en-GY",
"en-HK",
"en-HU",
"en-ID",
"en-IE",
"en-IL",
"en-IM",
"en-IN",
"en-IO",
"en-IT",
"en-JE",
"en-JM",
"en-JP",
"en-KE",
"en-KI",
"en-KN",
"en-KY",
"en-LC",
"en-LR",
"en-LS",
"en-LT",
"en-LV",
"en-MG",
"en-MH",
"en-MO",
"en-MP",
"en-MS",
"en-MT",
"en-MU",
"en-MV",
"en-MW",
"en-MY",
"en-NA",
"en-NF",
"en-NG",
"en-NL",
"en-NO",
"en-NR",
"en-NU",
"en-NZ",
"en-PG",
"en-PH",
"en-PK",
"en-PL",
"en-PN",
"en-PR",
"en-PT",
"en-PW",
"en-RO",
"en-RW",
"en-SB",
"en-SC",
"en-SD",
"en-SE",
"en-SG",
"en-SH",
"en-SI",
"en-SK",
"en-SL",
"en-SS",
"en-SX",
"en-SZ",
"en-TC",
"en-TK",
"en-TO",
"en-TT",
"en-TV",
"en-TZ",
"en-UA",
"en-UG",
"en-UM",
"en-VC",
"en-VG",
"en-VI",
"en-VU",
"en-WS",
"en-ZA",
"en-ZM",
"en-ZW",
"eo",
"es",
"es-419",
"es-AR",
"es-BO",
"es-BR",
"es-BZ",
"es-CL",
"es-CO",
"es-CR",
"es-CU",
"es-DO",
"es-EA",
"es-EC",
"es-GQ",
"es-GT",
"es-HN",
"es-IC",
"es-MX",
"es-NI",
"es-PA",
"es-PE",
"es-PH",
"es-PR",
"es-PY",
"es-SV",
"es-US",
"es-UY",
"es-VE",
"et",
"eu",
"ewo",
"fa",
"fa-AF",
"ff",
"ff-Adlm",
"ff-Adlm-BF",
"ff-Adlm-CM",
"ff-Adlm-GH",
"ff-Adlm-GM",
"ff-Adlm-GW",
"ff-Adlm-LR",
"ff-Adlm-MR",
"ff-Adlm-NE",
"ff-Adlm-NG",
"ff-Adlm-SL",
"ff-Adlm-SN",
"ff-Latn",
"ff-Latn-BF",
"ff-Latn-CM",
"ff-Latn-GH",
"ff-Latn-GM",
"ff-Latn-GN",
"ff-Latn-GW",
"ff-Latn-LR",
"ff-Latn-MR",
"ff-Latn-NE",
"ff-Latn-NG",
"ff-Latn-SL",
"fi",
"fil",
"fo",
"fo-DK",
"fr",
"fr-BE",
"fr-BF",
"fr-BI",
"fr-BJ",
"fr-BL",
"fr-CA",
"fr-CD",
"fr-CF",
"fr-CG",
"fr-CH",
"fr-CI",
"fr-CM",
"fr-DJ",
"fr-DZ",
"fr-GA",
"fr-GF",
"fr-GN",
"fr-GP",
"fr-GQ",
"fr-HT",
"fr-KM",
"fr-LU",
"fr-MA",
"fr-MC",
"fr-MF",
"fr-MG",
"fr-ML",
"fr-MQ",
"fr-MR",
"fr-MU",
"fr-NC",
"fr-NE",
"fr-PF",
"fr-PM",
"fr-RE",
"fr-RW",
"fr-SC",
"fr-SN",
"fr-SY",
"fr-TD",
"fr-TG",
"fr-TN",
"fr-VU",
"fr-WF",
"fr-YT",
"fur",
"fy",
"ga",
"ga-GB",
"gaa",
"gd",
"gl",
"gsw",
"gsw-FR",
"gsw-LI",
"gu",
"guz",
"gv",
"ha",
"ha-GH",
"ha-NE",
"haw",
"he",
"hi",
"hi-Latn",
"hr",
"hr-BA",
"hsb",
"hu",
"hy",
"ia",
"id",
"ie",
"ig",
"ii",
"is",
"it",
"it-CH",
"it-SM",
"it-VA",
"ja",
"jgo",
"jmc",
"jv",
"ka",
"kab",
"kam",
"kbd",
"kbd-TR",
"kde",
"kea",
"kek",
"kgp",
"khq",
"ki",
"kk",
"kk-Arab",
"kk-Cyrl",
"kk-KZ",
"kkj",
"kl",
"kln",
"km",
"kn",
"ko",
"ko-CN",
"ko-KP",
"kok",
"kok-Deva",
"kok-Latn",
"ks",
"ks-Arab",
"ks-Deva",
"ksb",
"ksf",
"ksh",
"ku",
"ku-Latn",
"ku-Latn-IQ",
"ku-Latn-SY",
"ku-TR",
"kw",
"kxv",
"kxv-Deva",
"kxv-Latn",
"kxv-Orya",
"kxv-Telu",
"ky",
"lag",
"lb",
"lg",
"lij",
"lkt",
"lld",
"lmo",
"ln",
"ln-AO",
"ln-CF",
"ln-CG",
"lo",
"lrc",
"lrc-IQ",
"lt",
"lu",
"luo",
"luy",
"lv",
"mai",
"mas",
"mas-TZ",
"mer",
"mfe",
"mg",
"mgh",
"mgo",
"mi",
"mk",
"ml",
"mn",
"mni",
"mni-Beng",
"mr",
"ms",
"ms-BN",
"ms-ID",
"ms-SG",
"mt",
"mua",
"my",
"mzn",
"naq",
"nb",
"nb-SJ",
"nd",
"nds",
"nds-NL",
"ne",
"ne-IN",
"nl",
"nl-AW",
"nl-BE",
"nl-BQ",
"nl-CW",
"nl-SR",
"nl-SX",
"nmg",
"nn",
"nnh",
"no",
"nqo",
"nso",
"nus",
"nyn",
"oc",
"oc-ES",
"om",
"om-KE",
"or",
"os",
"os-RU",
"pa",
"pa-Arab",
"pa-Guru",
"pcm",
"pl",
"pms",
"prg",
"ps",
"ps-PK",
"pt",
"pt-AO",
"pt-CH",
"pt-CV",
"pt-GQ",
"pt-GW",
"pt-LU",
"pt-MO",
"pt-MZ",
"pt-PT",
"pt-ST",
"pt-TL",
"qu",
"qu-BO",
"qu-EC",
"quc",
"raj",
"rm",
"rn",
"ro",
"ro-MD",
"rof",
"ru",
"ru-BY",
"ru-KG",
"ru-KZ",
"ru-MD",
"ru-UA",
"rw",
"rwk",
"sa",
"sah",
"saq",
"sat",
"sat-Olck",
"sbp",
"sc",
"scn",
"sd",
"sd-Arab",
"sd-Deva",
"se",
"se-FI",
"se-SE",
"seh",
"ses",
"sg",
"shi",
"shi-Latn",
"shi-Tfng",
"shn",
"shn-TH",
"si",
"sk",
"sl",
"smn",
"sn",
"so",
"so-DJ",
"so-ET",
"so-KE",
"sq",
"sq-MK",
"sq-XK",
"sr",
"sr-Cyrl",
"sr-Cyrl-BA",
"sr-Cyrl-ME",
"sr-Cyrl-XK",
"sr-Latn",
"sr-Latn-BA",
"sr-Latn-ME",
"sr-Latn-XK",
"st",
"st-LS",
"su",
"su-Latn",
"suz-Sunu",
"sv",
"sv-AX",
"sv-FI",
"sw",
"sw-CD",
"sw-KE",
"sw-UG",
"syr",
"syr-SY",
"szl",
"ta",
"ta-LK",
"ta-MY",
"ta-SG",
"te",
"teo",
"teo-KE",
"tg",
"th",
"ti",
"ti-ER",
"tk",
"tn",
"tn-BW",
"to",
"tok",
"tr",
"tr-CY",
"tt",
"twq",
"tyv",
"tzm",
"ug",
"uk",
"und",
"ur",
"ur-IN",
"uz",
"uz-Arab",
"uz-Cyrl",
"uz-Latn",
"vai",
"vai-Latn",
"vai-Vaii",
"vec",
"vi",
"vmw",
"vun",
"wae",
"wo",
"xh",
"xnr",
"xog",
"yav",
"yi",
"yo",
"yo-BJ",
"yrl",
"yrl-CO",
"yrl-VE",
"yue",
"yue-Hans",
"yue-Hant",
"yue-Hant-CN",
"yue-Hant-MO",
"za",
"zgh",
"zh",
"zh-Hans",
"zh-Hans-HK",
"zh-Hans-MO",
"zh-Hans-MY",
"zh-Hans-SG",
"zh-Hant",
"zh-Hant-HK",
"zh-Hant-MO",
"zh-Hant-MY",
"zu"
];
// packages/intl-relativetimeformat/should-polyfill.ts
function supportedLocalesOf(locale) {
if (!locale) return true;
const locales = Array.isArray(locale) ? locale : [locale];
return Intl.RelativeTimeFormat.supportedLocalesOf(locales).length === locales.length;
}
function hasResolvedOptionsNumberingSystem(locale) {
return "numberingSystem" in new Intl.RelativeTimeFormat(locale || "en", { numeric: "auto" }).resolvedOptions();
}
function shouldPolyfill(locale = "en") {
try {
if (typeof Intl !== "undefined" && typeof Intl.RelativeTimeFormat === "function" && typeof Intl.RelativeTimeFormat.supportedLocalesOf === "function" && supportedLocalesOf(locale) && hasResolvedOptionsNumberingSystem(locale)) return void 0;
} catch {}
return match([locale], supportedLocales, "en");
}
// packages/intl-relativetimeformat/polyfill.ts
const intl = ensureIntl();
if (shouldPolyfill()) {
defineProperty(intl, "RelativeTimeFormat", { value: RelativeTimeFormat });
const buf = globalThis.__FORMATJS_RELATIVETIMEFORMAT_DATA__;
if (buf) {
for (const d of buf) RelativeTimeFormat.__addLocaleData(d);
delete globalThis.__FORMATJS_RELATIVETIMEFORMAT_DATA__;
}
}
//# sourceMappingURL=polyfill.iife.js.map