generaltranslation 6.3.2 → 7.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.min.cjs","sources":["../../../node_modules/tslib/tslib.es6.js","../src/cache/IntlCache.ts","../src/settings/settings.ts","../src/locales/isValidLocale.ts","../src/locales/isSameDialect.ts","../src/locales/isSameLanguage.ts","../src/api/translate/translate.ts","../src/settings/settingsUrls.ts","../src/api/jsx/translateJsx.ts","../src/api/icu/translate.ts","../src/locales/customLocaleMapping.ts","../src/locales/getLocaleEmoji.ts","../src/locales/getLocaleProperties.ts","../src/locales/determineLocale.ts","../src/formatting/format.ts","../src/formatting/string_content.ts","../src/locales/getLocaleName.ts","../src/index.ts","../src/locales/getLocaleDirection.ts","../src/locales/isSupersetLocale.ts","../src/locales/requiresTranslation.ts"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\r\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nvar ownKeys = function(o) {\r\n ownKeys = Object.getOwnPropertyNames || function (o) {\r\n var ar = [];\r\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\r\n return ar;\r\n };\r\n return ownKeys(o);\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n var r, s = 0;\r\n function next() {\r\n while (r = env.stack.pop()) {\r\n try {\r\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\r\n if (r.dispose) {\r\n var result = r.dispose.call(r.value);\r\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n else s |= 1;\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\r\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\r\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\r\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\r\n });\r\n }\r\n return path;\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __esDecorate: __esDecorate,\r\n __runInitializers: __runInitializers,\r\n __propKey: __propKey,\r\n __setFunctionName: __setFunctionName,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n __rewriteRelativeImportExtension: __rewriteRelativeImportExtension,\r\n};\r\n","class IntlCache {\n private cache: Map<string, any>;\n\n constructor() {\n // Create separate caches for each Intl constructor\n this.cache = new Map();\n }\n\n private _generateKey(\n constructor: string,\n locales: string | string[],\n options = {}\n ) {\n // Handle both string and array locales\n const localeKey = Array.isArray(locales) ? locales.join(',') : locales;\n // Sort option keys to ensure consistent key generation\n const sortedOptions = options\n ? JSON.stringify(options, Object.keys(options).sort())\n : '{}';\n return `${constructor}:${localeKey}:${sortedOptions}`;\n }\n\n get<K extends keyof typeof Intl>(\n constructor: K,\n locales: string | string[],\n options = {}\n ): /* @ts-expect-error constructors must be valid */\n InstanceType<(typeof Intl)[K]> {\n const key = this._generateKey(constructor, locales, options);\n if (!this.cache.has(key)) {\n // Create a new Intl object if not in cache\n const intlObject = new (Intl[constructor] as any)(locales, options);\n this.cache.set(key, intlObject);\n }\n return this.cache.get(key);\n }\n}\n\nexport const intlCache = new IntlCache();\n","export const libraryDefaultLocale = 'en' as const;\nexport const maxTimeout = 60000;\n","import { intlCache } from 'src/cache/IntlCache';\nimport { libraryDefaultLocale } from '../internal';\n\nconst scriptExceptions = ['Cham', 'Jamo', 'Kawi', 'Lisu', 'Toto', 'Thai'];\n\n//// According to BCP 47, the range qaa–qtz is reserved for private-use language codes\nconst isCustomLanguage = (language: string) => {\n return language >= 'qaa' && language <= 'qtz';\n};\n\n/**\n * Checks if a given BCP 47 language code is valid.\n * @param {string} code - The BCP 47 language code to validate.\n * @returns {boolean} True if the BCP 47 code is valid, false otherwise.\n * @internal\n */\nexport const _isValidLocale = (locale: string): boolean => {\n try {\n const { language, region, script } = intlCache.get('Locale', locale);\n if (\n locale.split('-').length !==\n (() => {\n let partCount = 1;\n if (region) partCount += 1;\n if (script) partCount += 1;\n return partCount;\n })()\n )\n return false;\n const displayLanguageNames = intlCache.get(\n 'DisplayNames',\n [libraryDefaultLocale],\n {\n type: 'language',\n }\n );\n if (\n displayLanguageNames.of(language) === language &&\n !isCustomLanguage(language)\n )\n return false;\n if (region) {\n const displayRegionNames = intlCache.get(\n 'DisplayNames',\n [libraryDefaultLocale],\n {\n type: 'region',\n }\n );\n if (displayRegionNames.of(region) === region) return false;\n }\n if (script) {\n const displayScriptNames = intlCache.get(\n 'DisplayNames',\n [libraryDefaultLocale],\n {\n type: 'script',\n }\n );\n if (\n displayScriptNames.of(script) === script &&\n !scriptExceptions.includes(script)\n )\n return false;\n }\n return true;\n } catch {\n return false;\n }\n};\n\n/**\n * Standardizes a BCP 47 locale to ensure correct formatting.\n * @param {string} locale - The BCP 47 locale to standardize.\n * @returns {string} The standardized BCP 47 locale, or an empty string if invalid.\n * @internal\n */\nexport const _standardizeLocale = (locale: string): string => {\n try {\n return Intl.getCanonicalLocales(locale)[0];\n } catch {\n return locale;\n }\n};\n","import { intlCache } from 'src/cache/IntlCache';\nimport { _standardizeLocale } from './isValidLocale';\n\nfunction checkTwoLocalesAreSameDialect(codeA: string, codeB: string) {\n const {\n language: languageA,\n region: regionA,\n script: scriptA,\n } = intlCache.get('Locale', codeA);\n const {\n language: languageB,\n region: regionB,\n script: scriptB,\n } = intlCache.get('Locale', codeB);\n if (languageA !== languageB) return false;\n if (regionA && regionB && regionA !== regionB) return false;\n if (scriptA && scriptB && scriptA !== scriptB) return false;\n return true;\n}\n\n/**\n * Test two or more language codes to determine if they are exactly the same\n * e.g. \"en-US\" and \"en\" would be exactly the same.\n * \"en-GB\" and \"en\" would be exactly the same.\n * \"en-GB\" and \"en-US\" would be different.\n * @internal\n */\nexport default function _isSameDialect(\n ...locales: (string | string[])[]\n): boolean {\n try {\n // standardize codes\n const flattenedCodes = locales.flat().map(_standardizeLocale);\n\n for (let i = 0; i < flattenedCodes.length; i++) {\n for (let j = i + 1; j < flattenedCodes.length; j++) {\n if (\n !checkTwoLocalesAreSameDialect(flattenedCodes[i], flattenedCodes[j])\n )\n return false;\n }\n }\n\n return true;\n } catch (error) {\n console.error(error);\n return false;\n }\n}\n","import { intlCache } from 'src/cache/IntlCache';\n\n/**\n * @internal\n */\nexport default function _isSameLanguage(\n ...locales: (string | string[])[]\n): boolean {\n try {\n const flattenedCodes = locales.flat();\n // Get the language for each code\n const languages = flattenedCodes.map(\n (locale) => intlCache.get('Locale', locale).language\n );\n return languages.every((language) => language === languages[0]);\n } catch (error) {\n console.error(error);\n return false;\n }\n}\n","import {\n Content,\n ContentTranslationResult,\n TranslationError,\n} from '../../types';\nimport { maxTimeout } from '../../settings/settings';\nimport { translateContentUrl } from '../../settings/settingsUrls';\n\n/**\n * @internal\n **/\nexport default async function _translate(\n gt: { baseUrl: string; apiKey?: string; devApiKey?: string },\n source: Content,\n targetLocale: string,\n metadata: { [key: string]: any }\n): Promise<ContentTranslationResult | TranslationError> {\n const controller = new AbortController();\n const signal = controller.signal;\n\n const timeout = Math.min(metadata?.timeout || maxTimeout, maxTimeout);\n if (timeout) setTimeout(() => controller.abort(), timeout);\n\n let response;\n try {\n response = await fetch(`${gt.baseUrl}${translateContentUrl}`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n ...(gt.apiKey && { 'x-gt-api-key': gt.apiKey }),\n ...(gt.devApiKey && { 'x-gt-dev-api-key': gt.devApiKey }),\n },\n body: JSON.stringify({\n source,\n targetLocale,\n metadata,\n }),\n signal,\n });\n } catch (error: any) {\n if (error?.name === 'AbortError') {\n throw new Error(\n 'Translation request timed out. This has either occured due to the translation of an unusually large request or a translation failure in the API.'\n );\n }\n throw error;\n }\n\n if (!response.ok) {\n throw new Error(`${response.status}: ${await response.text()}`);\n }\n const result = await response.json();\n return result as ContentTranslationResult | TranslationError;\n}\n","export const defaultCacheUrl = 'https://cdn.gtx.dev' as const;\nexport const defaultBaseUrl = 'https://api.gtx.dev' as const;\nexport const defaultRuntimeApiUrl = 'https://runtime.gtx.dev' as const;\nexport const translateBatchUrl = '/v1/translate/batch' as const;\nexport const translateJsxUrl = '/v1/translate/react' as const;\nexport const translateContentUrl = '/v1/translate/content' as const;\nexport const translateIcuUrl = '/v1/translate/icu' as const;\nexport const updateProjectTranslationsUrl =\n '/v1/project/translations/update' as const;\nexport const getProjectLocalesUrl = '/v1/project/locales' as const;\n","import {\n JsxChildren,\n JsxTranslationResult,\n TranslationError,\n} from '../../types';\nimport { maxTimeout } from '../../settings/settings';\nimport { translateJsxUrl } from '../../settings/settingsUrls';\n\n/**\n * @internal\n **/\nexport default async function _translateJsx(\n gt: { baseUrl: string; apiKey?: string; devApiKey?: string },\n source: JsxChildren,\n targetLocale: string,\n metadata: { [key: string]: any }\n): Promise<JsxTranslationResult | TranslationError> {\n const controller = new AbortController();\n const signal = controller.signal;\n\n const timeout = Math.min(metadata?.timeout || maxTimeout, maxTimeout);\n if (timeout) setTimeout(() => controller.abort(), timeout);\n let response;\n try {\n response = await fetch(`${gt.baseUrl}${translateJsxUrl}`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n ...(gt.apiKey && { 'x-gt-api-key': gt.apiKey }),\n ...(gt.devApiKey && { 'x-gt-dev-api-key': gt.devApiKey }),\n },\n body: JSON.stringify({\n source,\n targetLocale,\n metadata,\n }),\n signal,\n });\n } catch (error: any) {\n if (error?.name === 'AbortError') {\n throw new Error(\n 'Translation request timed out. This has either occured due to the translation of an unusually large request or a translation failure in the API.'\n );\n }\n throw error;\n }\n\n if (!response.ok) {\n throw new Error(`${response.status}: ${await response.text()}`);\n }\n return (await response.json()) as JsxTranslationResult | TranslationError;\n}\n","import {\n Content,\n ContentTranslationResult,\n IcuTranslationResult,\n TranslationError,\n} from '../../types';\nimport { maxTimeout } from '../../settings/settings';\nimport { translateIcuUrl } from '../../settings/settingsUrls';\n\n/**\n * @internal\n **/\nexport async function _translateIcu(\n gt: { baseUrl: string; apiKey?: string; devApiKey?: string },\n source: string,\n targetLocale: string,\n metadata: { [key: string]: any }\n): Promise<IcuTranslationResult | TranslationError> {\n const controller = new AbortController();\n const signal = controller.signal;\n\n const timeout = Math.min(metadata?.timeout || maxTimeout, maxTimeout);\n if (timeout) setTimeout(() => controller.abort(), timeout);\n\n let response;\n try {\n response = await fetch(`${gt.baseUrl}${translateIcuUrl}`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n ...(gt.apiKey && { 'x-gt-api-key': gt.apiKey }),\n ...(gt.devApiKey && { 'x-gt-dev-api-key': gt.devApiKey }),\n },\n body: JSON.stringify({\n source,\n targetLocale,\n metadata,\n }),\n signal,\n });\n } catch (error: any) {\n if (error?.name === 'AbortError') {\n throw new Error(\n 'Translation request timed out. This has either occured due to the translation of an unusually large request or a translation failure in the API.'\n );\n }\n throw error;\n }\n\n if (!response.ok) {\n throw new Error(`${response.status}: ${await response.text()}`);\n }\n const result = await response.json();\n return result as IcuTranslationResult | TranslationError;\n}\n","import { LocaleProperties } from './getLocaleProperties';\n\nexport type FullCustomMapping = Record<string, LocaleProperties>;\nexport type CustomMapping = Record<string, string | Partial<LocaleProperties>>;\n\nexport const getCustomProperty = (\n customMapping: CustomMapping,\n locale: string,\n property: keyof LocaleProperties\n): string | undefined => {\n if (customMapping?.[locale]) {\n if (typeof customMapping[locale] === 'string') {\n return property === 'name' ? customMapping[locale] : undefined;\n }\n return customMapping[locale][property];\n }\n return undefined;\n};\n","import { intlCache } from '../cache/IntlCache';\nimport {\n CustomMapping,\n FullCustomMapping,\n getCustomProperty,\n} from './customLocaleMapping';\nimport { _isValidLocale, _standardizeLocale } from './isValidLocale';\n\n/**\n * @internal\n */\nexport default function _getLocaleEmoji(\n locale: string,\n customMapping?: CustomMapping\n): string {\n try {\n const standardizedLocale = _standardizeLocale(locale);\n const localeObject = intlCache.get('Locale', standardizedLocale);\n const { language, region } = localeObject;\n\n // if a custom mapping is specified, use it\n if (customMapping) {\n for (const l of [locale, standardizedLocale, language]) {\n const customEmoji = getCustomProperty(customMapping, l, 'emoji');\n if (customEmoji) return customEmoji;\n }\n }\n\n // if a region is specified, use it!\n if (region && emojis[region]) return emojis[region];\n\n // if not, attempt to extrapolate\n const extrapolated = localeObject.maximize();\n const extrapolatedRegion = extrapolated.region || '';\n\n return (\n exceptions[extrapolated.language] ||\n emojis[extrapolatedRegion] ||\n defaultEmoji\n );\n } catch {\n return defaultEmoji;\n }\n}\n\n// Default language emoji for when none else can be found\nconst europeAfricaGlobe = '🌍';\nconst asiaAustraliaGlobe = '🌏';\nexport const defaultEmoji = europeAfricaGlobe;\n\n// Exceptions to better reflect linguistic and cultural identities\nconst exceptions = {\n ca: europeAfricaGlobe,\n eu: europeAfricaGlobe,\n ku: europeAfricaGlobe,\n bo: asiaAustraliaGlobe,\n ug: asiaAustraliaGlobe,\n gd: '🏴󠁧󠁢󠁳󠁣󠁴󠁿',\n cy: '🏴󠁧󠁢󠁷󠁬󠁳󠁿',\n gv: '🇮🇲',\n grc: '🏺',\n} as Record<string, string>;\n\nconst emojis = {\n AF: '🇦🇫', // Afghanistan\n AX: '🇦🇽', // Åland Islands\n AL: '🇦🇱', // Albania\n DZ: '🇩🇿', // Algeria\n AS: '🇦🇸', // American Samoa\n AD: '🇦🇩', // Andorra\n AO: '🇦🇴', // Angola\n AI: '🇦🇮', // Anguilla\n AQ: '🇦🇶', // Antarctica\n AG: '🇦🇬', // Antigua and Barbuda\n AR: '🇦🇷', // Argentina\n AM: '🇦🇲', // Armenia\n AW: '🇦🇼', // Aruba\n AU: '🇦🇺', // Australia\n AT: '🇦🇹', // Austria\n AZ: '🇦🇿', // Azerbaijan\n BS: '🇧🇸', // Bahamas\n BH: '🇧🇭', // Bahrain\n BD: '🇧🇩', // Bangladesh\n BB: '🇧🇧', // Barbados\n BY: '🇧🇾', // Belarus\n BE: '🇧🇪', // Belgium\n BZ: '🇧🇿', // Belize\n BJ: '🇧🇯', // Benin\n BM: '🇧🇲', // Bermuda\n BT: '🇧🇹', // Bhutan\n BO: '🇧🇴', // Bolivia\n BQ: '🇧🇶', // Bonaire, Sint Eustatius and Saba\n BA: '🇧🇦', // Bosnia and Herzegovina\n BW: '🇧🇼', // Botswana\n BV: '🇧🇻', // Bouvet Island\n BR: '🇧🇷', // Brazil\n IO: '🇮🇴', // British Indian Ocean Territory\n BN: '🇧🇳', // Brunei Darussalam\n BG: '🇧🇬', // Bulgaria\n BF: '🇧🇫', // Burkina Faso\n BI: '🇧🇮', // Burundi\n CV: '🇨🇻', // Cabo Verde\n KH: '🇰🇭', // Cambodia\n CM: '🇨🇲', // Cameroon\n CA: '🇨🇦', // Canada\n KY: '🇰🇾', // Cayman Islands\n CF: '🇨🇫', // Central African Republic\n TD: '🇹🇩', // Chad\n CL: '🇨🇱', // Chile\n CN: '🇨🇳', // China\n CX: '🇨🇽', // Christmas Island\n CC: '🇨🇨', // Cocos (Keeling) Islands\n CO: '🇨🇴', // Colombia\n KM: '🇰🇲', // Comoros\n CD: '🇨🇩', // Congo (Democratic Republic)\n CG: '🇨🇬', // Congo (Republic)\n CK: '🇨🇰', // Cook Islands\n CR: '🇨🇷', // Costa Rica\n CI: '🇨🇮', // Côte d'Ivoire\n HR: '🇭🇷', // Croatia\n CU: '🇨🇺', // Cuba\n CW: '🇨🇼', // Curaçao\n CY: '🇨🇾', // Cyprus\n CZ: '🇨🇿', // Czechia\n DK: '🇩🇰', // Denmark\n DJ: '🇩🇯', // Djibouti\n DM: '🇩🇲', // Dominica\n DO: '🇩🇴', // Dominican Republic\n EC: '🇪🇨', // Ecuador\n EG: '🇪🇬', // Egypt\n SV: '🇸🇻', // El Salvador\n GQ: '🇬🇶', // Equatorial Guinea\n ER: '🇪🇷', // Eritrea\n EE: '🇪🇪', // Estonia\n SZ: '🇸🇿', // Eswatini\n ET: '🇪🇹', // Ethiopia\n FK: '🇫🇰', // Falkland Islands\n FO: '🇫🇴', // Faroe Islands\n FJ: '🇫🇯', // Fiji\n FI: '🇫🇮', // Finland\n FR: '🇫🇷', // France\n GF: '🇬🇫', // French Guiana\n PF: '🇵🇫', // French Polynesia\n TF: '🇹🇫', // French Southern Territories\n GA: '🇬🇦', // Gabon\n GM: '🇬🇲', // Gambia\n GE: '🇬🇪', // Georgia\n DE: '🇩🇪', // Germany\n GH: '🇬🇭', // Ghana\n GI: '🇬🇮', // Gibraltar\n GR: '🇬🇷', // Greece\n GL: '🇬🇱', // Greenland\n GD: '🇬🇩', // Grenada\n GP: '🇬🇵', // Guadeloupe\n GU: '🇬🇺', // Guam\n GT: '🇬🇹', // Guatemala\n GG: '🇬🇬', // Guernsey\n GN: '🇬🇳', // Guinea\n GW: '🇬🇼', // Guinea-Bissau\n GY: '🇬🇾', // Guyana\n HT: '🇭🇹', // Haiti\n HM: '🇭🇲', // Heard Island and McDonald Islands\n VA: '🇻🇦', // Holy See\n HN: '🇭🇳', // Honduras\n HK: '🇭🇰', // Hong Kong\n HU: '🇭🇺', // Hungary\n IS: '🇮🇸', // Iceland\n IN: '🇮🇳', // India\n ID: '🇮🇩', // Indonesia\n IR: '🇮🇷', // Iran\n IQ: '🇮🇶', // Iraq\n IE: '🇮🇪', // Ireland\n IM: '🇮🇲', // Isle of Man\n IL: '🇮🇱', // Israel\n IT: '🇮🇹', // Italy\n JM: '🇯🇲', // Jamaica\n JP: '🇯🇵', // Japan\n JE: '🇯🇪', // Jersey\n JO: '🇯🇴', // Jordan\n KZ: '🇰🇿', // Kazakhstan\n KE: '🇰🇪', // Kenya\n KI: '🇰🇮', // Kiribati\n KP: '🇰🇵', // Korea (North)\n KR: '🇰🇷', // Korea (South)\n KW: '🇰🇼', // Kuwait\n KG: '🇰🇬', // Kyrgyzstan\n LA: '🇱🇦', // Laos\n LV: '🇱🇻', // Latvia\n LB: '🇱🇧', // Lebanon\n LS: '🇱🇸', // Lesotho\n LR: '🇱🇷', // Liberia\n LY: '🇱🇾', // Libya\n LI: '🇱🇮', // Liechtenstein\n LT: '🇱🇹', // Lithuania\n LU: '🇱🇺', // Luxembourg\n MO: '🇲🇴', // Macao\n MG: '🇲🇬', // Madagascar\n MW: '🇲🇼', // Malawi\n MY: '🇲🇾', // Malaysia\n MV: '🇲🇻', // Maldives\n ML: '🇲🇱', // Mali\n MT: '🇲🇹', // Malta\n MH: '🇲🇭', // Marshall Islands\n MQ: '🇲🇶', // Martinique\n MR: '🇲🇷', // Mauritania\n MU: '🇲🇺', // Mauritius\n YT: '🇾🇹', // Mayotte\n MX: '🇲🇽', // Mexico\n FM: '🇫🇲', // Micronesia\n MD: '🇲🇩', // Moldova\n MC: '🇲🇨', // Monaco\n MN: '🇲🇳', // Mongolia\n ME: '🇲🇪', // Montenegro\n MS: '🇲🇸', // Montserrat\n MA: '🇲🇦', // Morocco\n MZ: '🇲🇿', // Mozambique\n MM: '🇲🇲', // Myanmar\n NA: '🇳🇦', // Namibia\n NR: '🇳🇷', // Nauru\n NP: '🇳🇵', // Nepal\n NL: '🇳🇱', // Netherlands\n NC: '🇳🇨', // New Caledonia\n NZ: '🇳🇿', // New Zealand\n NI: '🇳🇮', // Nicaragua\n NE: '🇳🇪', // Niger\n NG: '🇳🇬', // Nigeria\n NU: '🇳🇺', // Niue\n NF: '🇳🇫', // Norfolk Island\n MK: '🇲🇰', // North Macedonia\n MP: '🇲🇵', // Northern Mariana Islands\n NO: '🇳🇴', // Norway\n OM: '🇴🇲', // Oman\n PK: '🇵🇰', // Pakistan\n PW: '🇵🇼', // Palau\n PS: '🇵🇸', // Palestine, State of\n PA: '🇵🇦', // Panama\n PG: '🇵🇬', // Papua New Guinea\n PY: '🇵🇾', // Paraguay\n PE: '🇵🇪', // Peru\n PH: '🇵🇭', // Philippines\n PN: '🇵🇳', // Pitcairn\n PL: '🇵🇱', // Poland\n PT: '🇵🇹', // Portugal\n PR: '🇵🇷', // Puerto Rico\n QA: '🇶🇦', // Qatar\n RE: '🇷🇪', // Réunion\n RO: '🇷🇴', // Romania\n RU: '🇷🇺', // Russian Federation\n RW: '🇷🇼', // Rwanda\n BL: '🇧🇱', // Saint Barthélemy\n SH: '🇸🇭', // Saint Helena, Ascension and Tristan da Cunha\n KN: '🇰🇳', // Saint Kitts and Nevis\n LC: '🇱🇨', // Saint Lucia\n MF: '🇲🇫', // Saint Martin (French part)\n PM: '🇵🇲', // Saint Pierre and Miquelon\n VC: '🇻🇨', // Saint Vincent and the Grenadines\n WS: '🇼🇸', // Samoa\n SM: '🇸🇲', // San Marino\n ST: '🇸🇹', // São Tomé and Príncipe\n SA: '🇸🇦', // Saudi Arabia\n SN: '🇸🇳', // Senegal\n RS: '🇷🇸', // Serbia\n SC: '🇸🇨', // Seychelles\n SL: '🇸🇱', // Sierra Leone\n SG: '🇸🇬', // Singapore\n SX: '🇸🇽', // Sint Maarten (Dutch part)\n SK: '🇸🇰', // Slovakia\n SI: '🇸🇮', // Slovenia\n SB: '🇸🇧', // Solomon Islands\n SO: '🇸🇴', // Somalia\n ZA: '🇿🇦', // South Africa\n GS: '🇬🇸', // South Georgia and the South Sandwich Islands\n SS: '🇸🇸', // South Sudan\n ES: '🇪🇸', // Spain\n LK: '🇱🇰', // Sri Lanka\n SD: '🇸🇩', // Sudan\n SR: '🇸🇷', // Suriname\n SJ: '🇸🇯', // Svalbard and Jan Mayen\n SE: '🇸🇪', // Sweden\n CH: '🇨🇭', // Switzerland\n SY: '🇸🇾', // Syrian Arab Republic\n TW: '🇹🇼', // Taiwan\n TJ: '🇹🇯', // Tajikistan\n TZ: '🇹🇿', // Tanzania\n TH: '🇹🇭', // Thailand\n TL: '🇹🇱', // Timor-Leste\n TG: '🇹🇬', // Togo\n TK: '🇹🇰', // Tokelau\n TO: '🇹🇴', // Tonga\n TT: '🇹🇹', // Trinidad and Tobago\n TN: '🇹🇳', // Tunisia\n TR: '🇹🇷', // Türkiye\n TM: '🇹🇲', // Turkmenistan\n TC: '🇹🇨', // Turks and Caicos Islands\n TV: '🇹🇻', // Tuvalu\n UG: '🇺🇬', // Uganda\n UA: '🇺🇦', // Ukraine\n AE: '🇦🇪', // United Arab Emirates\n GB: '🇬🇧', // United Kingdom\n US: '🇺🇸', // United States of America\n UM: '🇺🇲', // United States Minor Outlying Islands\n UY: '🇺🇾', // Uruguay\n UZ: '🇺🇿', // Uzbekistan\n VU: '🇻🇺', // Vanuatu\n VE: '🇻🇪', // Venezuela\n VN: '🇻🇳', // Viet Nam\n VG: '🇻🇬', // Virgin Islands (British)\n VI: '🇻🇮', // Virgin Islands (U.S.)\n WF: '🇼🇫', // Wallis and Futuna\n EH: '🇪🇭', // Western Sahara\n YE: '🇾🇪', // Yemen\n ZM: '🇿🇲', // Zambia\n ZW: '🇿🇼', // Zimbabwe,\n EU: '🇪🇺', // European Union (EU)\n} as Record<string, string>;\n","import { libraryDefaultLocale } from '../internal';\nimport { defaultEmoji } from './getLocaleEmoji';\nimport { _isValidLocale, _standardizeLocale } from './isValidLocale';\nimport _getLocaleEmoji from './getLocaleEmoji';\nimport { intlCache } from 'src/cache/IntlCache';\nimport { CustomMapping, FullCustomMapping } from './customLocaleMapping';\n\nexport type LocaleProperties = {\n // assume code = \"de-AT\", defaultLocale = \"en-US\"\n\n code: string; // \"de-AT\"\n name: string; // \"Austrian German\"\n nativeName: string; // \"Österreichisches Deutsch\"\n\n languageCode: string; // \"de\"\n languageName: string; // \"German\"\n nativeLanguageName: string; // \"Deutsch\"\n\n // note that maximize() is NOT called here!\n\n nameWithRegionCode: string; // \"German (AT)\"\n nativeNameWithRegionCode: string; // \"Deutsch (AT)\"\n\n // for most likely script and region, maximize() is called\n\n regionCode: string; // \"AT\"\n regionName: string; // \"Austria\"\n nativeRegionName: string; // Österreich\n\n scriptCode: string; // \"Latn\"\n scriptName: string; // \"Latin\"\n nativeScriptName: string; // \"Lateinisch\"\n\n maximizedCode: string; // \"de-Latn-AT\"\n maximizedName: string; // \"Austrian German (Latin)\"\n nativeMaximizedName: string; // Österreichisches Deutsch (Lateinisch)\n\n minimizedCode: string; // \"de-AT\", but for \"de-DE\" it would just be \"de\"\n minimizedName: string; // \"\"Austrian German\";\n nativeMinimizedName: string; // \"Österreichisches Deutsch\"\n\n // Emoji depending on region code\n // In order not to accidentally spark international conflict, some emojis are hard-coded\n emoji: string;\n};\n\n/**\n * Creates a set of custom locale properties from a custom mapping.\n *\n * @param lArray - An array of locale codes to search for in the custom mapping.\n * @param customMapping - Optional custom mapping of locale codes to names.\n * @returns A partial set of locale properties, or undefined if no custom mapping is provided.\n */\nfunction createCustomLocaleProperties(\n lArray: string[],\n customMapping?: CustomMapping\n): Partial<LocaleProperties> | undefined {\n if (customMapping) {\n let merged: Partial<LocaleProperties> = {};\n for (const l of lArray) {\n const value = customMapping[l];\n if (value) {\n if (typeof value === 'string') {\n merged.name ||= value;\n } else if (value) {\n merged = { ...value, ...merged };\n }\n }\n }\n return merged;\n }\n return undefined;\n}\n\n/**\n * @internal\n */\nexport default function _getLocaleProperties(\n locale: string,\n defaultLocale: string = libraryDefaultLocale,\n customMapping?: CustomMapping\n): LocaleProperties {\n defaultLocale ||= libraryDefaultLocale;\n\n try {\n const standardizedLocale = _standardizeLocale(locale); // \"de-AT\"\n\n const localeObject = intlCache.get('Locale', locale);\n const languageCode = localeObject.language; // \"de\"\n\n const customLocaleProperties = createCustomLocaleProperties(\n [locale, standardizedLocale, languageCode],\n customMapping\n );\n\n const baseRegion = localeObject.region; // \"AT\"\n\n const maximizedLocale = localeObject.maximize();\n const maximizedCode = maximizedLocale.toString(); // \"de-Latn-AT\"\n const regionCode =\n localeObject.region ||\n customLocaleProperties?.regionCode ||\n maximizedLocale.region ||\n ''; // \"AT\"\n const scriptCode =\n localeObject.script ||\n customLocaleProperties?.scriptCode ||\n maximizedLocale.script ||\n ''; // \"Latn\"\n\n const minimizedLocale = localeObject.minimize();\n const minimizedCode = minimizedLocale.toString(); // \"de-AT\"\n\n // Language names (default and native)\n\n const defaultLanguageOrder = [defaultLocale, locale, libraryDefaultLocale];\n const nativeLanguageOrder = [locale, defaultLocale, libraryDefaultLocale];\n\n const languageNames = intlCache.get('DisplayNames', defaultLanguageOrder, {\n type: 'language',\n });\n const nativeLanguageNames = intlCache.get(\n 'DisplayNames',\n nativeLanguageOrder,\n { type: 'language' }\n );\n\n const customName = customLocaleProperties?.name;\n const customNativeName =\n customLocaleProperties?.nativeName || customLocaleProperties?.name;\n\n const name = customName || languageNames.of(locale) || locale; // \"Austrian German\"\n const nativeName =\n customNativeName || nativeLanguageNames.of(locale) || locale; // \"Österreichisches Deutsch\"\n\n const maximizedName =\n customLocaleProperties?.maximizedName ||\n customName ||\n languageNames.of(maximizedCode) ||\n locale; // \"Austrian German (Latin)\"\n const nativeMaximizedName =\n customLocaleProperties?.nativeMaximizedName ||\n customNativeName ||\n nativeLanguageNames.of(maximizedCode) ||\n locale; // \"Österreichisches Deutsch (Lateinisch)\"\n\n const minimizedName =\n customLocaleProperties?.minimizedName ||\n customName ||\n languageNames.of(minimizedCode) ||\n locale; // \"Austrian German\", but for \"de-DE\" would just be \"German\"\n const nativeMinimizedName =\n customLocaleProperties?.nativeMinimizedName ||\n customNativeName ||\n nativeLanguageNames.of(minimizedCode) ||\n locale; // \"Österreichisches Deutsch\", but for \"de-DE\" would just be \"Deutsch\"\n\n const languageName =\n customLocaleProperties?.languageName ||\n customName ||\n languageNames.of(languageCode) ||\n locale; // \"German\"\n const nativeLanguageName =\n customLocaleProperties?.nativeLanguageName ||\n customNativeName ||\n nativeLanguageNames.of(languageCode) ||\n locale; // \"Deutsch\"\n\n const nameWithRegionCode =\n customLocaleProperties?.nameWithRegionCode || baseRegion\n ? `${languageName} (${baseRegion})`\n : languageName; // German (AT)\n const nativeNameWithRegionCode =\n customLocaleProperties?.nativeNameWithRegionCode ||\n (baseRegion\n ? `${nativeLanguageName} (${baseRegion})`\n : nativeLanguageName) ||\n nameWithRegionCode; // \"Deutsch (AT)\"\n\n // Region names (default and native)\n\n const regionNames = intlCache.get('DisplayNames', defaultLanguageOrder, {\n type: 'region',\n });\n const nativeRegionNames = intlCache.get(\n 'DisplayNames',\n nativeLanguageOrder,\n { type: 'region' }\n );\n\n const regionName =\n customLocaleProperties?.regionName ||\n (regionCode ? regionNames.of(regionCode) : '') ||\n ''; // \"Austria\"\n const nativeRegionName =\n customLocaleProperties?.nativeRegionName ||\n (regionCode ? nativeRegionNames.of(regionCode) : '') ||\n ''; // \"Österreich\"\n\n // Script names (default and native)\n\n const scriptNames = intlCache.get('DisplayNames', defaultLanguageOrder, {\n type: 'script',\n });\n const nativeScriptNames = intlCache.get(\n 'DisplayNames',\n nativeLanguageOrder,\n { type: 'script' }\n );\n\n const scriptName =\n customLocaleProperties?.scriptName ||\n (scriptCode ? scriptNames.of(scriptCode) : '') ||\n ''; // \"Latin\"\n const nativeScriptName =\n customLocaleProperties?.nativeScriptName ||\n (scriptCode ? nativeScriptNames.of(scriptCode) : '') ||\n ''; // \"Lateinisch\"\n\n // Emoji\n\n const emoji =\n customLocaleProperties?.emoji ||\n _getLocaleEmoji(standardizedLocale, customMapping);\n\n return {\n code: standardizedLocale,\n name,\n nativeName,\n maximizedCode,\n maximizedName,\n nativeMaximizedName,\n minimizedCode,\n minimizedName,\n nativeMinimizedName,\n languageCode,\n languageName,\n nativeLanguageName,\n nameWithRegionCode,\n nativeNameWithRegionCode,\n regionCode,\n regionName,\n nativeRegionName,\n scriptCode,\n scriptName,\n nativeScriptName,\n emoji,\n };\n } catch {\n let code = _isValidLocale(locale) ? _standardizeLocale(locale) : locale;\n const codeParts = code?.split('-');\n let languageCode = codeParts?.[0] || code || '';\n let regionCode =\n codeParts.length > 2 ? codeParts?.[2] : codeParts?.[1] || '';\n let scriptCode = codeParts?.[3] || '';\n\n const customLocaleProperties = createCustomLocaleProperties(\n [code, languageCode],\n customMapping\n );\n\n code = customLocaleProperties?.code || code;\n const name = customLocaleProperties?.name || code;\n const nativeName = customLocaleProperties?.nativeName || name;\n\n const maximizedCode = customLocaleProperties?.maximizedCode || code;\n const maximizedName = customLocaleProperties?.maximizedName || name;\n const nativeMaximizedName =\n customLocaleProperties?.nativeMaximizedName || nativeName;\n\n const minimizedCode = customLocaleProperties?.minimizedCode || code;\n const minimizedName = customLocaleProperties?.minimizedName || name;\n const nativeMinimizedName =\n customLocaleProperties?.nativeMinimizedName || nativeName;\n\n languageCode = customLocaleProperties?.languageCode || languageCode;\n const languageName = customLocaleProperties?.languageName || name;\n const nativeLanguageName =\n customLocaleProperties?.nativeLanguageName || nativeName;\n\n regionCode = customLocaleProperties?.regionCode || regionCode;\n const regionName = customLocaleProperties?.regionName || '';\n const nativeRegionName = customLocaleProperties?.nativeRegionName || '';\n\n scriptCode = customLocaleProperties?.scriptCode || scriptCode;\n const scriptName = customLocaleProperties?.scriptName || '';\n const nativeScriptName = customLocaleProperties?.nativeScriptName || '';\n\n const nameWithRegionCode =\n customLocaleProperties?.nameWithRegionCode ||\n (regionName ? `${name} (${regionName})` : name);\n const nativeNameWithRegionCode =\n customLocaleProperties?.nativeNameWithRegionCode ||\n (nativeRegionName ? `${nativeName} (${nativeRegionName})` : nativeName);\n\n const emoji = customLocaleProperties?.emoji || defaultEmoji;\n\n return {\n code,\n name,\n nativeName,\n maximizedCode,\n maximizedName,\n nativeMaximizedName,\n minimizedCode,\n minimizedName,\n nativeMinimizedName,\n languageCode,\n languageName,\n nativeLanguageName,\n nameWithRegionCode,\n nativeNameWithRegionCode,\n regionCode,\n regionName,\n nativeRegionName,\n scriptCode,\n scriptName,\n nativeScriptName,\n emoji,\n };\n }\n}\n","import { _isValidLocale, _standardizeLocale } from './isValidLocale';\nimport _isSameLanguage from './isSameLanguage';\nimport _isSameDialect from './isSameDialect';\nimport _getLocaleProperties from './getLocaleProperties';\n\n/**\n * Given a list of locales and a list of approved locales, sorted in preference order\n * Determines which locale is the best match among the approved locales, prioritizing exact matches and falling back to dialects of the same language\n * @internal\n */\nexport default function _determineLocale(\n locales: string | string[],\n approvedLocales: string[]\n): string | undefined {\n if (typeof locales === 'string') locales = [locales];\n locales = locales.filter(_isValidLocale).map(_standardizeLocale);\n approvedLocales = approvedLocales\n .filter(_isValidLocale)\n .map(_standardizeLocale);\n for (const locale of locales) {\n const candidates = approvedLocales.filter((approvedLocale) =>\n _isSameLanguage(locale, approvedLocale)\n );\n const getMatchingCode = ({\n locale,\n languageCode,\n minimizedCode,\n regionCode,\n scriptCode,\n }: {\n locale: string;\n languageCode: string;\n minimizedCode: string;\n regionCode: string;\n scriptCode: string;\n }) => {\n const locales = [\n locale, // If the full locale is supported under this language category\n `${languageCode}-${regionCode}`, // Attempt to match parts\n `${languageCode}-${scriptCode}`,\n minimizedCode, // If a minimized variant of this locale is supported\n ];\n for (const l of locales) {\n if (candidates.includes(l)) return l;\n }\n return null;\n };\n const { languageCode, ...codes } = _getLocaleProperties(locale);\n const matchingCode =\n getMatchingCode({ locale, languageCode, ...codes }) ||\n getMatchingCode({\n locale: languageCode,\n ..._getLocaleProperties(languageCode),\n });\n if (matchingCode) return matchingCode;\n }\n return undefined;\n}\n","import { intlCache } from '../cache/IntlCache';\nimport { libraryDefaultLocale } from '../internal';\n\n/**\n * Formats a number according to the specified locales and options.\n *\n * @param {Object} params - The parameters for the number formatting.\n * @param {number} params.value - The number to format.\n * @param {string | string[]} [params.locales=['en']] - The locales to use for formatting.\n * @param {Intl.NumberFormatOptions} [params.options={}] - Additional options for number formatting.\n *\n * @returns {string} The formatted number.\n * @internal\n */\nexport function _formatNum({\n value,\n locales = [libraryDefaultLocale],\n options = {},\n}: {\n value: number;\n locales?: string | string[];\n options?: Intl.NumberFormatOptions;\n}): string {\n const res = intlCache\n .get('NumberFormat', locales, {\n numberingSystem: 'latn',\n ...options,\n })\n .format(value);\n return res;\n}\n\n/**\n * Formats a date according to the specified locales and options.\n *\n * @param {Object} params - The parameters for the date formatting.\n * @param {Date} params.value - The date to format.\n * @param {string | string[]} [params.locales='en']] - The locales to use for formatting.\n * @param {Intl.DateTimeFormatOptions} [params.options={}] - Additional options for date formatting.\n *\n * @returns {string} The formatted date.\n * @internal\n */\nexport function _formatDateTime({\n value,\n locales = [libraryDefaultLocale],\n options = {},\n}: {\n value: Date;\n locales?: string | string[];\n options?: Intl.DateTimeFormatOptions;\n}): string {\n return intlCache\n .get('DateTimeFormat', locales, {\n calendar: 'gregory',\n numberingSystem: 'latn',\n ...options,\n })\n .format(value);\n}\n\n/**\n * Formats a currency value according to the specified locales, currency, and options.\n *\n * @param {Object} params - The parameters for the currency formatting.\n * @param {number} params.value - The currency value to format.\n * @param {string} params.currency - The currency code (e.g., 'USD').\n * @param {string | string[]} [params.locales=['en']] - The locales to use for formatting.\n * @param {Intl.NumberFormatOptions} [params.options={}] - Additional options for currency formatting.\n *\n * @returns {string} The formatted currency value.\n * @internal\n */\n\nexport function _formatCurrency({\n value,\n locales = [libraryDefaultLocale],\n currency = 'USD',\n options = {},\n}: {\n value: number;\n currency?: string;\n locales?: string | string[];\n options?: Intl.NumberFormatOptions;\n}): string {\n return intlCache\n .get('NumberFormat', locales, {\n style: 'currency',\n currency,\n numberingSystem: 'latn',\n ...options,\n })\n .format(value);\n}\n\n/**\n * Formats a list of items according to the specified locales and options.\n *\n * @param {Object} params - The parameters for the list formatting.\n * @param {Array<string | number>} params.value - The list of items to format.\n * @param {string | string[]} [params.locales=['en']] - The locales to use for formatting.\n * @param {Intl.ListFormatOptions} [params.options={}] - Additional options for list formatting.\n *\n * @returns {string} The formatted list.\n * @internal\n */\nexport function _formatList({\n value,\n locales = [libraryDefaultLocale],\n options = {},\n}: {\n value: Array<any>;\n locales?: string | string[];\n options?: Intl.ListFormatOptions;\n}): string {\n return intlCache\n .get('ListFormat', locales, {\n type: 'conjunction', // Default type, can be overridden via options\n style: 'long', // Default style, can be overridden via options\n ...options,\n })\n .format(value);\n}\n\n/**\n * Formats a relative time value according to the specified locales and options.\n *\n * @param {Object} params - The parameters for the relative time formatting.\n * @param {number} params.value - The relative time value to format.\n * @param {Intl.RelativeTimeFormatUnit} params.unit - The unit of time (e.g., 'second', 'minute', 'hour', 'day', 'week', 'month', 'year').\n * @param {string | string[]} [params.locales=['en']] - The locales to use for formatting.\n * @param {Intl.RelativeTimeFormatOptions} [params.options={}] - Additional options for relative time formatting.\n *\n * @returns {string} The formatted relative time string.\n * @internal\n */\nexport function _formatRelativeTime({\n value,\n unit,\n locales = [libraryDefaultLocale],\n options = {},\n}: {\n value: number;\n unit: Intl.RelativeTimeFormatUnit;\n locales?: string | string[];\n options?: Intl.RelativeTimeFormatOptions;\n}): string {\n return intlCache\n .get('RelativeTimeFormat', locales, {\n style: 'long',\n numeric: 'auto',\n ...options,\n })\n .format(value, unit);\n}\n","import { libraryDefaultLocale } from '../internal';\nimport { Content, Variable } from '../types';\nimport {\n _formatCurrency,\n _formatDateTime,\n _formatNum,\n _formatList,\n _formatRelativeTime,\n} from './format';\n\n// Variable types mapping\nconst variableTypeMap: { [key: string]: string } = {\n var: 'variable',\n num: 'number',\n datetime: 'datetime',\n currency: 'currency',\n};\n\n/**\n * @internal\n */\n/**\n * @internal\n */\nexport function _splitStringToContent(string: string): Content {\n if (typeof string !== 'string')\n throw new Error(`splitStringToContent: ${string} is not a string!`);\n\n const result: (string | Variable)[] = [];\n const regex = /{([^}]+)}/g;\n let lastIndex = 0;\n let match: RegExpExecArray | null;\n\n while ((match = regex.exec(string)) !== null) {\n const [fullMatch, content] = match;\n const startIndex = match.index;\n\n // Check for escaped braces with '^' right before the opening brace\n if (string[startIndex - 1] === '^') {\n // Add text before the escape sequence\n if (startIndex - 1 > lastIndex) {\n result.push(string.slice(lastIndex, startIndex - 1));\n }\n // Add the escaped content as literal text\n result.push(fullMatch);\n lastIndex = startIndex + fullMatch.length;\n continue;\n }\n\n // Add text before the match\n if (startIndex > lastIndex) {\n result.push(string.slice(lastIndex, startIndex));\n }\n\n // Handle the variable substitution inside the braces\n const parts = content.split(',').map((part) => part.trim());\n const key = parts[0];\n const variableType = parts[1] ? variableTypeMap[parts[1]] : undefined;\n\n const variableObject: Variable = {\n key,\n ...(variableType && { variable: variableType }),\n };\n result.push(variableObject);\n\n lastIndex = startIndex + fullMatch.length;\n }\n\n // Add the remaining part of the string after the last match\n if (lastIndex < string.length) {\n result.push(string.slice(lastIndex));\n }\n\n return result;\n}\n\n/**\n * @internal\n */\nexport function _renderContentToString(\n content: Content,\n locales: string | string[] = libraryDefaultLocale,\n variables: Record<string, any> = {},\n variableOptions: Record<string, any> = {}\n): string {\n if (typeof content === 'string') content = _splitStringToContent(content);\n if (typeof content === 'string') return content;\n if (!Array.isArray(content))\n throw new Error(`renderContentToString: content ${content} is invalid`);\n return content\n .map((item) => {\n if (typeof item === 'string') return item;\n if (typeof item === 'object') {\n const value = variables[item.key];\n if (!item.variable) return value;\n else if (item.variable === 'number') {\n return _formatNum({\n value,\n locales,\n options: variableOptions[item.key],\n });\n } else if (item.variable === 'currency') {\n return _formatCurrency({\n value,\n locales,\n ...(variableOptions[item.key] && {\n options: variableOptions[item.key],\n }),\n ...(variableOptions[item.key]?.currency && {\n currency: variableOptions[item.key].currency,\n }),\n });\n } else if (item.variable === 'datetime') {\n return _formatDateTime({\n value,\n locales,\n ...(variableOptions[item.key] && {\n options: variableOptions[item.key],\n }),\n });\n } else if (item.variable === 'list') {\n return _formatList({\n value,\n locales,\n ...(variableOptions[item.key] && {\n options: variableOptions[item.key],\n }),\n });\n }\n return value;\n }\n })\n .join('');\n}\n","import { intlCache } from '../cache/IntlCache';\nimport { libraryDefaultLocale } from '../internal';\nimport { CustomMapping, getCustomProperty } from './customLocaleMapping';\nimport { LocaleProperties } from './getLocaleProperties';\nimport { _standardizeLocale } from './isValidLocale';\n\n/**\n * Retrieves the display name(s) of language code(s) using Intl.DisplayNames.\n *\n * @param {string} locale - A BCP-47 locale code.\n * @param {string} [defaultLanguage=libraryDefaultLanguage] - The language for display names.\n * @returns {string} The display name(s) corresponding to the code(s), or empty string(s) if invalid.\n * @internal\n */\nexport function _getLocaleName(\n locale: string,\n defaultLanguage: string = libraryDefaultLocale,\n customMapping?: CustomMapping\n): string {\n defaultLanguage ||= libraryDefaultLocale;\n try {\n const standardizedLocale = _standardizeLocale(locale);\n if (customMapping) {\n for (const l of [\n locale,\n standardizedLocale,\n intlCache.get('Locale', standardizedLocale).language,\n ]) {\n const customName = getCustomProperty(customMapping, l, 'name');\n if (customName) return customName;\n }\n }\n const displayNames = intlCache.get(\n 'DisplayNames',\n [defaultLanguage, standardizedLocale, libraryDefaultLocale], // default language order\n { type: 'language' }\n );\n return displayNames.of(standardizedLocale) || '';\n } catch {\n // In case Intl.DisplayNames construction fails, return empty string(s)\n return '';\n }\n}\n","// `generaltranslation` language toolkit\n// © 2024, General Translation, Inc.\n\n// ----- IMPORTS ----- //\n\nimport _requiresTranslation from './locales/requiresTranslation';\nimport _translate from './api/translate/translate';\nimport _translateJsx from './api/jsx/translateJsx';\nimport { _translateIcu } from './api/icu/translate';\nimport _determineLocale from './locales/determineLocale';\nimport {\n _formatNum,\n _formatCurrency,\n _formatList,\n _formatRelativeTime,\n _formatDateTime,\n} from './formatting/format';\nimport {\n _splitStringToContent,\n _renderContentToString,\n} from './formatting/string_content';\nimport {\n Content,\n JsxChildren,\n JsxTranslationResult,\n ContentTranslationResult,\n TranslationError,\n IcuTranslationResult,\n Metadata,\n CustomMapping,\n} from './types';\nimport _isSameLanguage from './locales/isSameLanguage';\nimport _getLocaleProperties, {\n LocaleProperties,\n} from './locales/getLocaleProperties';\nimport _getLocaleEmoji from './locales/getLocaleEmoji';\nimport { _isValidLocale, _standardizeLocale } from './locales/isValidLocale';\nimport { _getLocaleName } from './locales/getLocaleName';\nimport { _getLocaleDirection } from './locales/getLocaleDirection';\nimport { defaultBaseUrl, libraryDefaultLocale } from './internal';\nimport _isSameDialect from './locales/isSameDialect';\nimport _isSupersetLocale from './locales/isSupersetLocale';\nimport { FullCustomMapping } from './locales/customLocaleMapping';\n// ----- CORE CLASS ----- //\n/**\n * Type representing the constructor parameters for the GT class.\n */\ntype GTConstructorParams = {\n apiKey?: string;\n devApiKey?: string;\n sourceLocale?: string;\n projectId?: string;\n baseUrl?: string;\n customMapping?: CustomMapping;\n};\n\n/**\n * GT is the core driver for the General Translation library.\n */\nexport class GT {\n apiKey: string;\n devApiKey: string;\n sourceLocale: string;\n projectId: string;\n baseUrl: string;\n customMapping: CustomMapping;\n\n /**\n * Constructs an instance of the GT class.\n *\n * @param {GTConstructorParams} [params] - The parameters for initializing the GT instance.\n * @param {string} [params.apiKey=''] - The API key for accessing the translation service.\n * @param {string} [params.sourceLocale=''] - The default locale for translations.\n * @param {string} [params.projectId=''] - The project ID for the translation service.\n * @param {string} [params.baseUrl='https://api.gtx.dev'] - The base URL for the translation service.\n */\n constructor({\n apiKey = '',\n devApiKey = '',\n sourceLocale = '',\n projectId = '',\n baseUrl = defaultBaseUrl,\n customMapping = {},\n }: GTConstructorParams = {}) {\n const processUndefined = typeof process !== 'undefined';\n this.apiKey =\n apiKey || (processUndefined ? process.env?.GT_API_KEY || '' : '');\n this.devApiKey =\n devApiKey || (processUndefined ? process.env?.GT_DEV_API_KEY || '' : '');\n this.projectId =\n projectId || (processUndefined ? process.env?.GT_PROJECT_ID || '' : '');\n this.sourceLocale = _standardizeLocale(sourceLocale) || '';\n this.baseUrl = baseUrl;\n this.customMapping = customMapping;\n }\n\n /**\n * Translates a string or an array of strings/variables into a target locale.\n *\n * @param {Content} source - The string or array of strings/variables to be translated.\n * @param {string} locale - The target locale code (e.g., 'en-US', 'fr') for the translation.\n * @param {{ context?: string, [key: string]: any }} [metadata] - Additional metadata for the translation request.\n *\n * @returns {Promise<ContentTranslationResult | TranslationError>} A promise that resolves to the translated content, or an error if the translation fails.\n */\n async translate(\n source: Content,\n locale: string,\n metadata?: Metadata\n ): Promise<ContentTranslationResult | TranslationError> {\n return await _translate(this, source, locale, {\n sourceLocale: this.sourceLocale,\n ...metadata,\n });\n }\n\n /**\n * Translates JSX elements into a given locale.\n *\n * @param {Object} params - The parameters for the translation.\n * @param {JsxChildren} params.source - The JSX children content to be translated.\n * @param {string} params.locale - The target locale for the translation.\n * @param {Object} params.metadata - Additional metadata for the translation process.\n *\n * @returns {Promise<JsxTranslationResult | TranslationError>} - A promise that resolves to the translated content.\n */\n async translateJsx(\n source: JsxChildren,\n locale: string,\n metadata?: Metadata\n ): Promise<JsxTranslationResult | TranslationError> {\n return await _translateJsx(this, source, locale, {\n sourceLocale: this.sourceLocale,\n ...metadata,\n });\n }\n\n /**\n * Translates an ICU message into a given locale.\n *\n * @param {string} source - The ICU message to be translated.\n * @param {string} locale - The target locale code (e.g., 'en-US', 'fr') for the translation.\n * @param {{ context?: string, [key: string]: any }} [metadata] - Additional metadata for the translation request.\n * @param {string} [metadata.context] - Contextual information to assist with the translation.\n *\n * @returns {Promise<ContentTranslationResult | TranslationError>} A promise that resolves to the translated content, or an error if the translation fails.\n */\n async translateIcu(\n source: string,\n locale: string,\n metadata?: Metadata\n ): Promise<IcuTranslationResult | TranslationError> {\n return await _translateIcu(this, source, locale, {\n sourceLocale: this.sourceLocale,\n ...metadata,\n });\n }\n\n /**\n * Retrieves the display name of locale code using Intl.DisplayNames.\n *\n * @param {string} locale - A BCP-47 locale code.\n * @returns {string} The display name corresponding to the code.\n */\n getLocaleName(locale: string): string {\n return _getLocaleName(locale, this.sourceLocale, this.customMapping);\n }\n\n /**\n * Retrieves an emoji based on a given locale code, taking into account region, language, and specific exceptions.\n * This function uses the locale's region (if present) to select an emoji or falls back on default emojis for certain languages.\n *\n * @param locale - A string representing the locale code (e.g., 'en-US', 'fr-CA').\n * @returns The emoji representing the locale or its region, or a default emoji if no specific match is found.\n */\n getLocaleEmoji(locale: string): string {\n return _getLocaleEmoji(locale, this.customMapping);\n }\n\n /**\n * Generates linguistic details for a given locale code.\n *\n * This function returns information about the locale,\n * script, and region of a given language code both in a standard form and in a maximized form (with likely script and region).\n * The function provides these names in both your default language and native forms, and an associated emoji.\n *\n * @param {string} locale - The locale code to get properties for (e.g., \"de-AT\").\n * @returns {LocaleProperties} - An object containing detailed information about the locale.\n *\n * @property {string} code - The full locale code, e.g., \"de-AT\".\n * @property {string} name - Language name in the default display language, e.g., \"Austrian German\".\n * @property {string} nativeName - Language name in the locale's native language, e.g., \"Österreichisches Deutsch\".\n * @property {string} languageCode - The base language code, e.g., \"de\".\n * @property {string} languageName - The language name in the default display language, e.g., \"German\".\n * @property {string} nativeLanguageName - The language name in the native language, e.g., \"Deutsch\".\n * @property {string} nameWithRegionCode - Language name with region in the default language, e.g., \"German (AT)\".\n * @property {string} nativeNameWithRegionCode - Language name with region in the native language, e.g., \"Deutsch (AT)\".\n * @property {string} regionCode - The region code from maximization, e.g., \"AT\".\n * @property {string} regionName - The region name in the default display language, e.g., \"Austria\".\n * @property {string} nativeRegionName - The region name in the native language, e.g., \"Österreich\".\n * @property {string} scriptCode - The script code from maximization, e.g., \"Latn\".\n * @property {string} scriptName - The script name in the default display language, e.g., \"Latin\".\n * @property {string} nativeScriptName - The script name in the native language, e.g., \"Lateinisch\".\n * @property {string} maximizedCode - The maximized locale code, e.g., \"de-Latn-AT\".\n * @property {string} maximizedName - Maximized locale name with likely script in the default language, e.g., \"Austrian German (Latin)\".\n * @property {string} nativeMaximizedName - Maximized locale name in the native language, e.g., \"Österreichisches Deutsch (Lateinisch)\".\n * @property {string} minimizedCode - Minimized locale code, e.g., \"de-AT\" (or \"de\" for \"de-DE\").\n * @property {string} minimizedName - Minimized language name in the default language, e.g., \"Austrian German\".\n * @property {string} nativeMinimizedName - Minimized language name in the native language, e.g., \"Österreichisches Deutsch\".\n * @property {string} emoji - The emoji associated with the locale's region, if applicable.\n */\n getLocaleProperties(locale: string): LocaleProperties {\n return _getLocaleProperties(locale, this.sourceLocale, this.customMapping);\n }\n}\n\n// ----- EXPORTS ----- //\n\n/**\n * Get the text direction for a given locale code using the Intl.Locale API.\n *\n * @param locale - A BCP-47 locale code.\n * @returns {string} - 'rtl' if the locale is right-to-left, otherwise 'ltr'.\n */\nexport function getLocaleDirection(locale: string): 'ltr' | 'rtl' {\n return _getLocaleDirection(locale);\n}\n\n/**\n * Retrieves the display name of locale code using Intl.DisplayNames.\n *\n * @param {string} locale - A BCP-47 locale code.\n * @param {string} [defaultLocale = 'en'] - The locale for display names.\n * @param {FullCustomMapping} [customMapping] - Optional custom mapping of locale codes to names.\n * @returns {string} The display name corresponding to the code.\n */\nexport function getLocaleName(\n locale: string,\n defaultLocale: string = libraryDefaultLocale,\n customMapping?: FullCustomMapping\n): string {\n return _getLocaleName(locale, defaultLocale, customMapping);\n}\n\n/**\n * Generates linguistic details for a given locale code.\n *\n * This function returns information about the locale,\n * script, and region of a given language code both in a standard form and in a maximized form (with likely script and region).\n * The function provides these names in both your default language and native forms, and an associated emoji.\n *\n * @param {string} locale - The locale code to get properties for (e.g., \"de-AT\").\n * @param {string} [defaultLocale=libraryDefaultLocale] - The default locale code for display names.\n * @param {FullCustomMapping} [customMapping] - Optional custom mapping of locale codes to properties.\n * @returns {LocaleProperties} - An object containing detailed information about the locale.\n *\n * @property {string} code - The full locale code, e.g., \"de-AT\".\n * @property {string} name - Language name in the default display language, e.g., \"Austrian German\".\n * @property {string} nativeName - Language name in the locale's native language, e.g., \"Österreichisches Deutsch\".\n * @property {string} languageCode - The base language code, e.g., \"de\".\n * @property {string} languageName - The language name in the default display language, e.g., \"German\".\n * @property {string} nativeLanguageName - The language name in the native language, e.g., \"Deutsch\".\n * @property {string} nameWithRegionCode - Language name with region in the default language, e.g., \"German (AT)\".\n * @property {string} nativeNameWithRegionCode - Language name with region in the native language, e.g., \"Deutsch (AT)\".\n * @property {string} regionCode - The region code from maximization, e.g., \"AT\".\n * @property {string} regionName - The region name in the default display language, e.g., \"Austria\".\n * @property {string} nativeRegionName - The region name in the native language, e.g., \"Österreich\".\n * @property {string} scriptCode - The script code from maximization, e.g., \"Latn\".\n * @property {string} scriptName - The script name in the default display language, e.g., \"Latin\".\n * @property {string} nativeScriptName - The script name in the native language, e.g., \"Lateinisch\".\n * @property {string} maximizedCode - The maximized locale code, e.g., \"de-Latn-AT\".\n * @property {string} maximizedName - Maximized locale name with likely script in the default language, e.g., \"Austrian German (Latin)\".\n * @property {string} nativeMaximizedName - Maximized locale name in the native language, e.g., \"Österreichisches Deutsch (Lateinisch)\".\n * @property {string} minimizedCode - Minimized locale code, e.g., \"de-AT\" (or \"de\" for \"de-DE\").\n * @property {string} minimizedName - Minimized language name in the default language, e.g., \"Austrian German\".\n * @property {string} nativeMinimizedName - Minimized language name in the native language, e.g., \"Österreichisches Deutsch\".\n * @property {string} emoji - The emoji associated with the locale's region, if applicable.\n */\nexport function getLocaleProperties(\n locale: string,\n defaultLocale?: string,\n customMapping?: FullCustomMapping\n): {\n // assume code = \"de-AT\", defaultLocale = \"en-US\"\n code: string; // \"de-AT\"\n name: string; // \"Austrian German\"\n nativeName: string; // \"Österreichisches Deutsch\"\n languageCode: string; // \"de\"\n languageName: string; // \"German\"\n nativeLanguageName: string; // \"Deutsch\"\n // note that maximize() is NOT called here!\n nameWithRegionCode: string; // \"German (AT)\"\n nativeNameWithRegionCode: string; // \"Deutsch (AT)\"\n // for most likely script and region, maximize() is called\n regionCode: string; // \"AT\"\n regionName: string; // \"Austria\"\n nativeRegionName: string; // Österreich\n scriptCode: string; // \"Latn\"\n scriptName: string; // \"Latin\"\n nativeScriptName: string; // \"Lateinisch\"\n maximizedCode: string; // \"de-Latn-AT\"\n maximizedName: string; // \"Austrian German (Latin)\"\n nativeMaximizedName: string; // Österreichisches Deutsch (Lateinisch)\n minimizedCode: string; // \"de-AT\", but for \"de-DE\" it would just be \"de\"\n minimizedName: string; // \"\"Austrian German\";\n nativeMinimizedName: string; // \"Österreichisches Deutsch\"\n // Emoji depending on region code\n // In order not to accidentally spark international conflict, some emojis are hard-coded\n emoji: string;\n} {\n return _getLocaleProperties(locale, defaultLocale, customMapping);\n}\n\n/**\n * Retrieves an emoji based on a given locale code, taking into account region, language, and specific exceptions.\n * This function uses the locale's region (if present) to select an emoji or falls back on default emojis for certain languages.\n *\n * @param locale - A string representing the locale code (e.g., 'en-US', 'fr-CA').\n * @param customMapping - An optional custom mapping of locale codes to emojis.\n * @returns The emoji representing the locale or its region, or a default emoji if no specific match is found.\n */\nexport function getLocaleEmoji(\n locale: string,\n customMapping?: FullCustomMapping\n) {\n return _getLocaleEmoji(locale, customMapping);\n}\n\n/**\n * Checks if a given BCP 47 locale code is valid.\n * @param {string} locale - The BCP 47 locale code to validate.\n * @returns {boolean} True if the BCP 47 code is valid, false otherwise.\n */\nexport function isValidLocale(locale: string): boolean {\n return _isValidLocale(locale);\n}\n\n/**\n * Standardizes a BCP 47 locale code to ensure correct formatting.\n * @param {string} locale - The BCP 47 locale code to standardize.\n * @returns {string} The standardized BCP 47 locale code or an empty string if it is an invalid code.\n */\nexport function standardizeLocale(locale: string): string {\n return _standardizeLocale(locale);\n}\n\n/**\n * Checks if multiple BCP 47 locale codes represent the same dialect.\n *\n * For example, `\"en-US\"` and `\"en-GB\"` are the same language, but different dialects.\n * `isSameDialect(\"en-US\", \"en-GB\")` would return `false`.\n *\n * For checking if two locale codes represent the same language, see `isSameLanguage()`.\n *\n * Note that `isSameDialect(\"en\", \"en-US\")` and `isSameDialect(\"en\", \"en-GB\")` would both return true.\n *\n * @param {string[]} locales - The BCP 47 locale codes to compare.\n * @returns {boolean} True if all BCP 47 codes represent the same dialect, false otherwise.\n */\nexport function isSameDialect(...locales: (string | string[])[]): boolean {\n return _isSameDialect(...locales);\n}\n\n/**\n * Checks if multiple BCP 47 locale codes represent the same language.\n *\n * For example, `\"en-US\"` and `\"en-GB\"` are the same language, English.\n * `isSameDialect(\"en-US\", \"en-GB\")` would return `true`.\n *\n * For checking if two codes represent the exact same dialect, see `isSameDialect()`.\n *\n * @param {string[]} locales - The BCP 47 locale codes to compare.\n * @returns {boolean} True if all BCP 47 codes represent the same locale, false otherwise.\n */\nexport function isSameLanguage(...locales: (string | string[])[]): boolean {\n return _isSameLanguage(...locales);\n}\n\n/**\n * Checks if a locale is a superset of another locale.\n * A subLocale is a subset of superLocale if it is an extension of superLocale or are otherwise identical.\n *\n * `isSupersetLocale(\"en\", \"en-US\")` would return `true`.\n * `isSupersetLocale(\"en-US\", \"en\")` would return `false`.\n *\n * @param {string} superLocale - The locale to check if it is a superset of the other locale.\n * @param {string} subLocale - The locale to check if it is a subset of the other locale.\n * @returns {boolean} True if the first locale is a superset of the second locale, false otherwise.\n */\nexport function isSupersetLocale(\n superLocale: string,\n subLocale: string\n): boolean {\n return _isSupersetLocale(superLocale, subLocale);\n}\n\n/**\n * Formats a number according to the specified locales and options.\n * @param {Object} params - The parameters for the number formatting.\n * @param {number} params.value - The number to format.\n * @param {string | string[]} [params.locales=['en']] - The locales to use for formatting.\n * @param {Intl.NumberFormatOptions} [params.options={}] - Additional options for number formatting.\n * @returns {string} The formatted number.\n */\nexport function formatNum(\n number: number,\n options?: {\n locales?: string | string[];\n } & Intl.NumberFormatOptions\n): string {\n return _formatNum({\n value: number,\n locales: options?.locales,\n options,\n });\n}\n\n/**\n * Formats a date according to the specified languages and options.\n * @param {Object} params - The parameters for the date formatting.\n * @param {Date} params.value - The date to format.\n * @param {string | string[]} [params.locales=['en']] - The languages to use for formatting.\n * @param {Intl.DateTimeFormatOptions} [params.options={}] - Additional options for date formatting.\n * @returns {string} The formatted date.\n */\nexport function formatDateTime(\n date: Date,\n options?: {\n locales?: string | string[];\n } & Intl.DateTimeFormatOptions\n): string {\n return _formatDateTime({\n value: date,\n locales: options?.locales,\n options,\n });\n}\n\n/**\n * Formats a currency value according to the specified languages, currency, and options.\n * @param {Object} params - The parameters for the currency formatting.\n * @param {number} params.value - The currency value to format.\n * @param {string} params.currency - The currency code (e.g., 'USD').\n * @param {string | string[]} [params.locales=['en']] - The locale codes to use for formatting.\n * @param {Intl.NumberFormatOptions} [params.options={}] - Additional options for currency formatting.\n * @returns {string} The formatted currency value.\n */\nexport function formatCurrency(\n value: number,\n currency: string,\n options?: {\n locales?: string | string[];\n } & Intl.NumberFormatOptions\n): string {\n return _formatCurrency({\n value,\n currency,\n locales: options?.locales,\n options,\n });\n}\n\n/**\n * Formats a list of items according to the specified locales and options.\n * @param {Object} params - The parameters for the list formatting.\n * @param {Array<string | number>} params.value - The list of items to format.\n * @param {string | string[]} [params.locales=['en']] - The locales to use for formatting.\n * @param {Intl.ListFormatOptions} [params.options={}] - Additional options for list formatting.\n * @returns {string} The formatted list.\n */\nexport function formatList(\n array: Array<string | number>,\n options: {\n locales?: string | string[];\n } & Intl.ListFormatOptions\n) {\n return _formatList({\n value: array,\n locales: options?.locales,\n options: options,\n });\n}\n\n/**\n * Formats a relative time value according to the specified locales and options.\n * @param {Object} params - The parameters for the relative time formatting.\n * @param {number} params.value - The relative time value to format.\n * @param {Intl.RelativeTimeFormatUnit} params.unit - The unit of time (e.g., 'second', 'minute', 'hour', 'day', 'week', 'month', 'year').\n * @param {string | string[]} [params.locales=['en']] - The locales to use for formatting.\n * @param {Intl.RelativeTimeFormatOptions} [params.options={}] - Additional options for relative time formatting.\n * @returns {string} The formatted relative time string.\n */\nexport function formatRelativeTime(\n value: number,\n unit: Intl.RelativeTimeFormatUnit,\n options: {\n locales?: string | string[];\n } & Intl.RelativeTimeFormatOptions\n): string {\n return _formatRelativeTime({\n value,\n unit,\n locales: options?.locales,\n options,\n });\n}\n\n/**\n * Splits a string into an array of text and variable objects.\n * @param {string} string - The input string to split.\n * @returns {Content} - An array containing strings and variables.\n */\nexport function splitStringToContent(string: string): Content {\n return _splitStringToContent(string);\n}\n\n/**\n * Renders content to a string by replacing variables with their formatted values.\n * @param {Content} content - The content to render.\n * @param {string | string[]} [locales='en'] - The locale(s) to use for formatting.\n * @param {Record<string, any>} [variables={}] - An object containing variable values.\n * @param {Record<string, any>} [variableOptions={}] - An object containing options for formatting variables.\n * @returns {string} - The rendered string with variables replaced by their formatted values.\n */\nexport function renderContentToString(\n content: Content,\n locales?: string | string[],\n variables?: Record<string, any>,\n variableOptions?: Record<string, any>\n): string {\n return _renderContentToString(content, locales, variables, variableOptions);\n}\n\n/**\n * Determines the best matching locale from the provided approved locales list.\n * @param {string | string[]} locales - A single locale or an array of locales sorted in preference order.\n * @param {string[]} approvedLocales - An array of approved locales, also sorted by preference.\n * @returns {string | undefined} - The best matching locale from the approvedLocales list, or undefined if no match is found.\n */\nexport function determineLocale(\n locales: string | string[],\n approvedLocales: string[]\n): string | undefined {\n return _determineLocale(locales, approvedLocales);\n}\n\n/**\n * Determines whether a translation is required based on the source and target locales.\n *\n * - If the target locale is not specified, the function returns `false`, as translation is not needed.\n * - If the source and target locale are the same, returns `false`, indicating that no translation is necessary.\n * - If the `approvedLocales` array is provided, and the target locale is not within that array, the function also returns `false`.\n * - Otherwise, it returns `true`, meaning that a translation is required.\n *\n * @param {string} sourceLocale - The locale code for the original content (BCP 47 locale code).\n * @param {string} targetLocale - The locale code of the language to translate the content into (BCP 47 locale code).\n * @param {string[]} [approvedLocale] - An optional array of approved target locales.\n *\n * @returns {boolean} - Returns `true` if translation is required, otherwise `false`.\n */\nexport function requiresTranslation(\n sourceLocale: string,\n targetLocale: string,\n approvedLocales?: string[]\n): boolean {\n return _requiresTranslation(sourceLocale, targetLocale, approvedLocales);\n}\n","import { intlCache } from '../cache/IntlCache';\n\n/**\n * Get the text direction for a given locale code using the Intl.Locale API.\n *\n * @param {string} code - The locale code to check.\n * @returns {string} - 'rtl' if the language is right-to-left, otherwise 'ltr'.\n * @internal\n */\nexport function _getLocaleDirection(code: string): 'ltr' | 'rtl' {\n try {\n const locale = intlCache.get('Locale', code);\n // Return 'rtl' if the text direction of the language is right-to-left, otherwise 'ltr'\n return (locale as any)?.textInfo?.direction === 'rtl' ? 'rtl' : 'ltr';\n } catch {\n // If the code is invalid or causes an error, fallback to 'ltr'\n return 'ltr';\n }\n}\n","import { intlCache } from 'src/cache/IntlCache';\nimport { _standardizeLocale } from './isValidLocale';\n\n/**\n * @internal\n */\nexport default function _isSupersetLocale(\n superLocale: string,\n subLocale: string\n): boolean {\n try {\n const {\n language: languageSuper,\n region: regionSuper,\n script: scriptSuper,\n } = intlCache.get('Locale', _standardizeLocale(superLocale));\n const {\n language: languageSub,\n region: regionSub,\n script: scriptSub,\n } = intlCache.get('Locale', _standardizeLocale(subLocale));\n\n if (languageSuper !== languageSub) return false;\n if (regionSuper && regionSuper !== regionSub) return false;\n if (scriptSuper && scriptSuper !== scriptSub) return false;\n\n return true;\n } catch (error) {\n console.error(error);\n return false;\n }\n}\n","import _isSameDialect from './isSameDialect';\nimport _isSameLanguage from './isSameLanguage';\nimport { _isValidLocale, _standardizeLocale } from './isValidLocale';\n\n/**\n * Given a target locale and a source locale, determines whether a translation is required\n * If the target locale and the source locale are the same, returns false, otherwise returns true\n * If a translation is not possible due to the target locale being outside of the optional approvedLanguages scope, also returns false\n * @internal\n */\nexport default function _requiresTranslation(\n sourceLocale: string,\n targetLocale: string,\n approvedLocales?: string[]\n): boolean {\n // If codes are invalid\n if (\n !_isValidLocale(sourceLocale) ||\n !_isValidLocale(targetLocale) ||\n (approvedLocales &&\n approvedLocales.some((approvedLocale) => !_isValidLocale(approvedLocale)))\n )\n return false;\n\n // Check if the languages are identical, if so, a translation is not required\n if (_isSameDialect(sourceLocale, targetLocale)) return false;\n\n // Check that the target locale is within the approvedLocales scope, if not, a translation is not required\n // isSameLanguage rather than checkTwoLocalesAreSameDialect so we can show different dialects as a fallback\n if (\n approvedLocales &&\n !approvedLocales.some((approvedLocale) =>\n _isSameLanguage(targetLocale, approvedLocale)\n )\n )\n return false;\n\n // Otherwise, a translation is required!\n return true;\n}\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","value","step","next","e","rejected","result","done","then","__generator","body","f","y","_","label","sent","trys","ops","g","create","Iterator","verb","Symbol","iterator","v","op","TypeError","pop","push","SuppressedError","intlCache","IntlCache","cache","Map","_generateKey","constructor","locales","options","localeKey","Array","isArray","join","sortedOptions","JSON","stringify","keys","sort","concat","get","key","has","intlObject","Intl","set","libraryDefaultLocale","maxTimeout","scriptExceptions","_isValidLocale","locale","_a","language","region_1","script_1","split","partCount","type","of","isCustomLanguage","includes","_b","_standardizeLocale","getCanonicalLocales","_isSameDialect","codeA","codeB","languageA","regionA","scriptA","languageB","regionB","scriptB","_i","flattenedCodes","flat","map","j","error","console","_isSameLanguage","languages_1","every","_translate","gt","source","targetLocale","metadata","controller","AbortController","signal","timeout","Math","min","setTimeout","abort","fetch","baseUrl","method","headers","apiKey","devApiKey","response","_d","error_1","name","Error","ok","bind","_c","status","text","json","_translateJsx","_translateIcu","getCustomProperty","customMapping","property","undefined","_getLocaleEmoji","standardizedLocale","localeObject","region","customEmoji","emojis","extrapolated","maximize","extrapolatedRegion","exceptions","defaultEmoji","europeAfricaGlobe","ca","eu","ku","bo","ug","gd","cy","gv","grc","AF","AX","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BQ","BA","BW","BV","BR","IO","BN","BG","BF","BI","CV","KH","CM","CA","KY","CF","TD","CL","CN","CX","CC","CO","KM","CD","CG","CK","CR","CI","HR","CU","CW","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","SZ","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GG","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IM","IL","IT","JM","JP","JE","JO","KZ","KE","KI","KP","KR","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","ME","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MK","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","BL","SH","KN","LC","MF","PM","VC","WS","SM","ST","SA","SN","RS","SC","SL","SG","SX","SK","SI","SB","SO","ZA","GS","SS","ES","LK","SD","SR","SJ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW","EU","createCustomLocaleProperties","lArray","merged","lArray_1","_getLocaleProperties","defaultLocale","customLocaleProperties","languageCode","baseRegion","maximizedLocale","maximizedCode","toString","regionCode","scriptCode","script","minimizedCode","minimize","defaultLanguageOrder","nativeLanguageOrder","languageNames","nativeLanguageNames","customName","customNativeName","nativeName","maximizedName","nativeMaximizedName","minimizedName","nativeMinimizedName","languageName","nativeLanguageName","nameWithRegionCode","nativeNameWithRegionCode","regionNames","nativeRegionNames","regionName","nativeRegionName","scriptNames","nativeScriptNames","code","scriptName","nativeScriptName","emoji","codeParts","_determineLocale","approvedLocales","filter","candidates","approvedLocale","getMatchingCode","locales_2","l","codes","indexOf","getOwnPropertySymbols","propertyIsEnumerable","__rest","matchingCode","locales_1","_formatNum","numberingSystem","format","_formatDateTime","calendar","_formatCurrency","currency","style","_formatList","variableTypeMap","var","num","datetime","_splitStringToContent","string","match","regex","lastIndex","exec","fullMatch","content","startIndex","index","slice","parts","part","trim","variableType","variableObject","variable","_getLocaleName","defaultLanguage","_e","sourceLocale","_f","projectId","_g","_h","processUndefined","process","env","_j","GT_API_KEY","_k","GT_DEV_API_KEY","_l","GT_PROJECT_ID","translate","translateJsx","translateIcu","getLocaleName","getLocaleEmoji","getLocaleProperties","date","array","number","unit","numeric","_formatRelativeTime","textInfo","direction","_getLocaleDirection","superLocale","subLocale","languageSuper","regionSuper","scriptSuper","languageSub","regionSub","scriptSub","_isSupersetLocale","variables","variableOptions","item","_renderContentToString","some","_requiresTranslation"],"mappings":"aA+BO,IAAIA,EAAW,WAQlB,OAPA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ACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,GAAI,OACJC,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,EAAKhe,QAGP,SAAlBge,EAAK5C,SACPrB,EAAWve,EAAA,CAChBwB,MAAKA,EACLmC,QAAOA,GACH4e,EAAgBC,EAAKhe,MAAQ,CAC/BZ,QAAS2e,EAAgBC,EAAKhe,QAI7BhD,EAnCoBA,EAqC9B,IACAwC,KAAK,GACV,CE6YSye,CAAuBtD,EAASxb,EAAS2e,EAAWC,EAC7D,uCA8BEvC,EACA3Y,EACA4V,GAEA,OG3iBsB,SACtB+C,EACA3Y,EACA4V,GAGA,SACGjY,EAAegb,KACfhb,EAAeqC,IACf4V,GACCA,EAAgByF,MAAK,SAACtF,GAAmB,OAACpY,EAAeoY,EAAhB,KAKzCrX,EAAeia,EAAc3Y,IAK/B4V,IACCA,EAAgByF,MAAK,SAACtF,GACrB,OAAArW,EAAgBM,EAAc+V,EAA9B,IAON,CH8gBSuF,CAAqB3C,EAAc3Y,EAAc4V,EAC1D,+BAtDM,SAA+B4B,GACnC,OAAOD,EAAsBC,EAC/B,4BA5KM,SAA4B5Z,GAChC,OAAOY,EAAmBZ,EAC5B","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.cjs.min.cjs","sources":["../../../node_modules/tslib/tslib.es6.js","../src/cache/IntlCache.ts","../src/settings/settings.ts","../src/locales/isValidLocale.ts","../src/locales/isSameDialect.ts","../src/locales/isSameLanguage.ts","../src/locales/requiresTranslation.ts","../src/locales/customLocaleMapping.ts","../src/locales/getLocaleEmoji.ts","../src/locales/getLocaleProperties.ts","../src/locales/determineLocale.ts","../../../node_modules/@formatjs/fast-memoize/lib/index.js","../../../node_modules/@formatjs/icu-messageformat-parser/lib/error.js","../../../node_modules/@formatjs/icu-messageformat-parser/lib/types.js","../../../node_modules/@formatjs/icu-messageformat-parser/lib/regex.generated.js","../../../node_modules/@formatjs/icu-skeleton-parser/lib/date-time.js","../../../node_modules/@formatjs/icu-skeleton-parser/lib/regex.generated.js","../../../node_modules/@formatjs/icu-skeleton-parser/lib/number.js","../../../node_modules/@formatjs/icu-messageformat-parser/lib/time-data.generated.js","../../../node_modules/@formatjs/icu-messageformat-parser/lib/parser.js","../../../node_modules/@formatjs/icu-messageformat-parser/lib/date-time-pattern-generator.js","../../../node_modules/intl-messageformat/lib/src/error.js","../../../node_modules/@formatjs/icu-messageformat-parser/lib/index.js","../../../node_modules/intl-messageformat/lib/src/formatters.js","../../../node_modules/intl-messageformat/lib/src/core.js","../src/formatting/format.ts","../src/locales/getLocaleName.ts","../src/settings/errors.ts","../src/index.ts","../src/settings/settingsUrls.ts","../src/locales/getLocaleDirection.ts","../src/locales/isSupersetLocale.ts"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\r\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nvar ownKeys = function(o) {\r\n ownKeys = Object.getOwnPropertyNames || function (o) {\r\n var ar = [];\r\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\r\n return ar;\r\n };\r\n return ownKeys(o);\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n var r, s = 0;\r\n function next() {\r\n while (r = env.stack.pop()) {\r\n try {\r\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\r\n if (r.dispose) {\r\n var result = r.dispose.call(r.value);\r\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n else s |= 1;\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\r\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\r\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\r\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\r\n });\r\n }\r\n return path;\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __esDecorate: __esDecorate,\r\n __runInitializers: __runInitializers,\r\n __propKey: __propKey,\r\n __setFunctionName: __setFunctionName,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n __rewriteRelativeImportExtension: __rewriteRelativeImportExtension,\r\n};\r\n","class IntlCache {\n private cache: Map<string, any>;\n\n constructor() {\n // Create separate caches for each Intl constructor\n this.cache = new Map();\n }\n\n private _generateKey(\n constructor: string,\n locales: string | string[],\n options = {}\n ) {\n // Handle both string and array locales\n const localeKey = Array.isArray(locales) ? locales.join(',') : locales;\n // Sort option keys to ensure consistent key generation\n const sortedOptions = options\n ? JSON.stringify(options, Object.keys(options).sort())\n : '{}';\n return `${constructor}:${localeKey}:${sortedOptions}`;\n }\n\n get<K extends keyof typeof Intl>(\n constructor: K,\n locales: string | string[],\n options = {}\n ): /* @ts-expect-error constructors must be valid */\n InstanceType<(typeof Intl)[K]> {\n const key = this._generateKey(constructor, locales, options);\n if (!this.cache.has(key)) {\n // Create a new Intl object if not in cache\n const intlObject = new (Intl[constructor] as any)(locales, options);\n this.cache.set(key, intlObject);\n }\n return this.cache.get(key);\n }\n}\n\nexport const intlCache = new IntlCache();\n","export const libraryDefaultLocale = 'en' as const;\nexport const maxTimeout = 60000;\n","import { intlCache } from 'src/cache/IntlCache';\nimport { libraryDefaultLocale } from '../internal';\n\nconst scriptExceptions = ['Cham', 'Jamo', 'Kawi', 'Lisu', 'Toto', 'Thai'];\n\n//// According to BCP 47, the range qaa–qtz is reserved for private-use language codes\nconst isCustomLanguage = (language: string) => {\n return language >= 'qaa' && language <= 'qtz';\n};\n\n/**\n * Checks if a given BCP 47 language code is valid.\n * @param {string} code - The BCP 47 language code to validate.\n * @returns {boolean} True if the BCP 47 code is valid, false otherwise.\n * @internal\n */\nexport const _isValidLocale = (locale: string): boolean => {\n try {\n const { language, region, script } = intlCache.get('Locale', locale);\n if (\n locale.split('-').length !==\n (() => {\n let partCount = 1;\n if (region) partCount += 1;\n if (script) partCount += 1;\n return partCount;\n })()\n )\n return false;\n const displayLanguageNames = intlCache.get(\n 'DisplayNames',\n [libraryDefaultLocale],\n {\n type: 'language',\n }\n );\n if (\n displayLanguageNames.of(language) === language &&\n !isCustomLanguage(language)\n )\n return false;\n if (region) {\n const displayRegionNames = intlCache.get(\n 'DisplayNames',\n [libraryDefaultLocale],\n {\n type: 'region',\n }\n );\n if (displayRegionNames.of(region) === region) return false;\n }\n if (script) {\n const displayScriptNames = intlCache.get(\n 'DisplayNames',\n [libraryDefaultLocale],\n {\n type: 'script',\n }\n );\n if (\n displayScriptNames.of(script) === script &&\n !scriptExceptions.includes(script)\n )\n return false;\n }\n return true;\n } catch {\n return false;\n }\n};\n\n/**\n * Standardizes a BCP 47 locale to ensure correct formatting.\n * @param {string} locale - The BCP 47 locale to standardize.\n * @returns {string} The standardized BCP 47 locale, or an empty string if invalid.\n * @internal\n */\nexport const _standardizeLocale = (locale: string): string => {\n try {\n return Intl.getCanonicalLocales(locale)[0];\n } catch {\n return locale;\n }\n};\n","import { intlCache } from 'src/cache/IntlCache';\nimport { _standardizeLocale } from './isValidLocale';\n\nfunction checkTwoLocalesAreSameDialect(codeA: string, codeB: string) {\n const {\n language: languageA,\n region: regionA,\n script: scriptA,\n } = intlCache.get('Locale', codeA);\n const {\n language: languageB,\n region: regionB,\n script: scriptB,\n } = intlCache.get('Locale', codeB);\n if (languageA !== languageB) return false;\n if (regionA && regionB && regionA !== regionB) return false;\n if (scriptA && scriptB && scriptA !== scriptB) return false;\n return true;\n}\n\n/**\n * Test two or more language codes to determine if they are exactly the same\n * e.g. \"en-US\" and \"en\" would be exactly the same.\n * \"en-GB\" and \"en\" would be exactly the same.\n * \"en-GB\" and \"en-US\" would be different.\n * @internal\n */\nexport default function _isSameDialect(\n ...locales: (string | string[])[]\n): boolean {\n try {\n // standardize codes\n const flattenedCodes = locales.flat().map(_standardizeLocale);\n\n for (let i = 0; i < flattenedCodes.length; i++) {\n for (let j = i + 1; j < flattenedCodes.length; j++) {\n if (\n !checkTwoLocalesAreSameDialect(flattenedCodes[i], flattenedCodes[j])\n )\n return false;\n }\n }\n\n return true;\n } catch (error) {\n console.error(error);\n return false;\n }\n}\n","import { intlCache } from 'src/cache/IntlCache';\n\n/**\n * @internal\n */\nexport default function _isSameLanguage(\n ...locales: (string | string[])[]\n): boolean {\n try {\n const flattenedCodes = locales.flat();\n // Get the language for each code\n const languages = flattenedCodes.map(\n (locale) => intlCache.get('Locale', locale).language\n );\n return languages.every((language) => language === languages[0]);\n } catch (error) {\n console.error(error);\n return false;\n }\n}\n","import _isSameDialect from './isSameDialect';\nimport _isSameLanguage from './isSameLanguage';\nimport { _isValidLocale, _standardizeLocale } from './isValidLocale';\n\n/**\n * Given a target locale and a source locale, determines whether a translation is required\n * If the target locale and the source locale are the same, returns false, otherwise returns true\n * If a translation is not possible due to the target locale being outside of the optional approvedLanguages scope, also returns false\n * @internal\n */\nexport default function _requiresTranslation(\n sourceLocale: string,\n targetLocale: string,\n approvedLocales?: string[]\n): boolean {\n // If codes are invalid\n if (\n !_isValidLocale(sourceLocale) ||\n !_isValidLocale(targetLocale) ||\n (approvedLocales &&\n approvedLocales.some((approvedLocale) => !_isValidLocale(approvedLocale)))\n )\n return false;\n\n // Check if the languages are identical, if so, a translation is not required\n if (_isSameDialect(sourceLocale, targetLocale)) return false;\n\n // Check that the target locale is within the approvedLocales scope, if not, a translation is not required\n // isSameLanguage rather than checkTwoLocalesAreSameDialect so we can show different dialects as a fallback\n if (\n approvedLocales &&\n !approvedLocales.some((approvedLocale) =>\n _isSameLanguage(targetLocale, approvedLocale)\n )\n )\n return false;\n\n // Otherwise, a translation is required!\n return true;\n}\n","import { LocaleProperties } from './getLocaleProperties';\n\nexport type FullCustomMapping = Record<string, LocaleProperties>;\nexport type CustomMapping = Record<string, string | Partial<LocaleProperties>>;\n\nexport const getCustomProperty = (\n customMapping: CustomMapping,\n locale: string,\n property: keyof LocaleProperties\n): string | undefined => {\n if (customMapping?.[locale]) {\n if (typeof customMapping[locale] === 'string') {\n return property === 'name' ? customMapping[locale] : undefined;\n }\n return customMapping[locale][property];\n }\n return undefined;\n};\n","import { intlCache } from '../cache/IntlCache';\nimport {\n CustomMapping,\n FullCustomMapping,\n getCustomProperty,\n} from './customLocaleMapping';\nimport { _isValidLocale, _standardizeLocale } from './isValidLocale';\n\n/**\n * @internal\n */\nexport default function _getLocaleEmoji(\n locale: string,\n customMapping?: CustomMapping\n): string {\n try {\n const standardizedLocale = _standardizeLocale(locale);\n const localeObject = intlCache.get('Locale', standardizedLocale);\n const { language, region } = localeObject;\n\n // if a custom mapping is specified, use it\n if (customMapping) {\n for (const l of [locale, standardizedLocale, language]) {\n const customEmoji = getCustomProperty(customMapping, l, 'emoji');\n if (customEmoji) return customEmoji;\n }\n }\n\n // if a region is specified, use it!\n if (region && emojis[region]) return emojis[region];\n\n // if not, attempt to extrapolate\n const extrapolated = localeObject.maximize();\n const extrapolatedRegion = extrapolated.region || '';\n\n return (\n exceptions[extrapolated.language] ||\n emojis[extrapolatedRegion] ||\n defaultEmoji\n );\n } catch {\n return defaultEmoji;\n }\n}\n\n// Default language emoji for when none else can be found\nconst europeAfricaGlobe = '🌍';\nconst asiaAustraliaGlobe = '🌏';\nexport const defaultEmoji = europeAfricaGlobe;\n\n// Exceptions to better reflect linguistic and cultural identities\nconst exceptions = {\n ca: europeAfricaGlobe,\n eu: europeAfricaGlobe,\n ku: europeAfricaGlobe,\n bo: asiaAustraliaGlobe,\n ug: asiaAustraliaGlobe,\n gd: '🏴󠁧󠁢󠁳󠁣󠁴󠁿',\n cy: '🏴󠁧󠁢󠁷󠁬󠁳󠁿',\n gv: '🇮🇲',\n grc: '🏺',\n} as Record<string, string>;\n\nconst emojis = {\n AF: '🇦🇫', // Afghanistan\n AX: '🇦🇽', // Åland Islands\n AL: '🇦🇱', // Albania\n DZ: '🇩🇿', // Algeria\n AS: '🇦🇸', // American Samoa\n AD: '🇦🇩', // Andorra\n AO: '🇦🇴', // Angola\n AI: '🇦🇮', // Anguilla\n AQ: '🇦🇶', // Antarctica\n AG: '🇦🇬', // Antigua and Barbuda\n AR: '🇦🇷', // Argentina\n AM: '🇦🇲', // Armenia\n AW: '🇦🇼', // Aruba\n AU: '🇦🇺', // Australia\n AT: '🇦🇹', // Austria\n AZ: '🇦🇿', // Azerbaijan\n BS: '🇧🇸', // Bahamas\n BH: '🇧🇭', // Bahrain\n BD: '🇧🇩', // Bangladesh\n BB: '🇧🇧', // Barbados\n BY: '🇧🇾', // Belarus\n BE: '🇧🇪', // Belgium\n BZ: '🇧🇿', // Belize\n BJ: '🇧🇯', // Benin\n BM: '🇧🇲', // Bermuda\n BT: '🇧🇹', // Bhutan\n BO: '🇧🇴', // Bolivia\n BQ: '🇧🇶', // Bonaire, Sint Eustatius and Saba\n BA: '🇧🇦', // Bosnia and Herzegovina\n BW: '🇧🇼', // Botswana\n BV: '🇧🇻', // Bouvet Island\n BR: '🇧🇷', // Brazil\n IO: '🇮🇴', // British Indian Ocean Territory\n BN: '🇧🇳', // Brunei Darussalam\n BG: '🇧🇬', // Bulgaria\n BF: '🇧🇫', // Burkina Faso\n BI: '🇧🇮', // Burundi\n CV: '🇨🇻', // Cabo Verde\n KH: '🇰🇭', // Cambodia\n CM: '🇨🇲', // Cameroon\n CA: '🇨🇦', // Canada\n KY: '🇰🇾', // Cayman Islands\n CF: '🇨🇫', // Central African Republic\n TD: '🇹🇩', // Chad\n CL: '🇨🇱', // Chile\n CN: '🇨🇳', // China\n CX: '🇨🇽', // Christmas Island\n CC: '🇨🇨', // Cocos (Keeling) Islands\n CO: '🇨🇴', // Colombia\n KM: '🇰🇲', // Comoros\n CD: '🇨🇩', // Congo (Democratic Republic)\n CG: '🇨🇬', // Congo (Republic)\n CK: '🇨🇰', // Cook Islands\n CR: '🇨🇷', // Costa Rica\n CI: '🇨🇮', // Côte d'Ivoire\n HR: '🇭🇷', // Croatia\n CU: '🇨🇺', // Cuba\n CW: '🇨🇼', // Curaçao\n CY: '🇨🇾', // Cyprus\n CZ: '🇨🇿', // Czechia\n DK: '🇩🇰', // Denmark\n DJ: '🇩🇯', // Djibouti\n DM: '🇩🇲', // Dominica\n DO: '🇩🇴', // Dominican Republic\n EC: '🇪🇨', // Ecuador\n EG: '🇪🇬', // Egypt\n SV: '🇸🇻', // El Salvador\n GQ: '🇬🇶', // Equatorial Guinea\n ER: '🇪🇷', // Eritrea\n EE: '🇪🇪', // Estonia\n SZ: '🇸🇿', // Eswatini\n ET: '🇪🇹', // Ethiopia\n FK: '🇫🇰', // Falkland Islands\n FO: '🇫🇴', // Faroe Islands\n FJ: '🇫🇯', // Fiji\n FI: '🇫🇮', // Finland\n FR: '🇫🇷', // France\n GF: '🇬🇫', // French Guiana\n PF: '🇵🇫', // French Polynesia\n TF: '🇹🇫', // French Southern Territories\n GA: '🇬🇦', // Gabon\n GM: '🇬🇲', // Gambia\n GE: '🇬🇪', // Georgia\n DE: '🇩🇪', // Germany\n GH: '🇬🇭', // Ghana\n GI: '🇬🇮', // Gibraltar\n GR: '🇬🇷', // Greece\n GL: '🇬🇱', // Greenland\n GD: '🇬🇩', // Grenada\n GP: '🇬🇵', // Guadeloupe\n GU: '🇬🇺', // Guam\n GT: '🇬🇹', // Guatemala\n GG: '🇬🇬', // Guernsey\n GN: '🇬🇳', // Guinea\n GW: '🇬🇼', // Guinea-Bissau\n GY: '🇬🇾', // Guyana\n HT: '🇭🇹', // Haiti\n HM: '🇭🇲', // Heard Island and McDonald Islands\n VA: '🇻🇦', // Holy See\n HN: '🇭🇳', // Honduras\n HK: '🇭🇰', // Hong Kong\n HU: '🇭🇺', // Hungary\n IS: '🇮🇸', // Iceland\n IN: '🇮🇳', // India\n ID: '🇮🇩', // Indonesia\n IR: '🇮🇷', // Iran\n IQ: '🇮🇶', // Iraq\n IE: '🇮🇪', // Ireland\n IM: '🇮🇲', // Isle of Man\n IL: '🇮🇱', // Israel\n IT: '🇮🇹', // Italy\n JM: '🇯🇲', // Jamaica\n JP: '🇯🇵', // Japan\n JE: '🇯🇪', // Jersey\n JO: '🇯🇴', // Jordan\n KZ: '🇰🇿', // Kazakhstan\n KE: '🇰🇪', // Kenya\n KI: '🇰🇮', // Kiribati\n KP: '🇰🇵', // Korea (North)\n KR: '🇰🇷', // Korea (South)\n KW: '🇰🇼', // Kuwait\n KG: '🇰🇬', // Kyrgyzstan\n LA: '🇱🇦', // Laos\n LV: '🇱🇻', // Latvia\n LB: '🇱🇧', // Lebanon\n LS: '🇱🇸', // Lesotho\n LR: '🇱🇷', // Liberia\n LY: '🇱🇾', // Libya\n LI: '🇱🇮', // Liechtenstein\n LT: '🇱🇹', // Lithuania\n LU: '🇱🇺', // Luxembourg\n MO: '🇲🇴', // Macao\n MG: '🇲🇬', // Madagascar\n MW: '🇲🇼', // Malawi\n MY: '🇲🇾', // Malaysia\n MV: '🇲🇻', // Maldives\n ML: '🇲🇱', // Mali\n MT: '🇲🇹', // Malta\n MH: '🇲🇭', // Marshall Islands\n MQ: '🇲🇶', // Martinique\n MR: '🇲🇷', // Mauritania\n MU: '🇲🇺', // Mauritius\n YT: '🇾🇹', // Mayotte\n MX: '🇲🇽', // Mexico\n FM: '🇫🇲', // Micronesia\n MD: '🇲🇩', // Moldova\n MC: '🇲🇨', // Monaco\n MN: '🇲🇳', // Mongolia\n ME: '🇲🇪', // Montenegro\n MS: '🇲🇸', // Montserrat\n MA: '🇲🇦', // Morocco\n MZ: '🇲🇿', // Mozambique\n MM: '🇲🇲', // Myanmar\n NA: '🇳🇦', // Namibia\n NR: '🇳🇷', // Nauru\n NP: '🇳🇵', // Nepal\n NL: '🇳🇱', // Netherlands\n NC: '🇳🇨', // New Caledonia\n NZ: '🇳🇿', // New Zealand\n NI: '🇳🇮', // Nicaragua\n NE: '🇳🇪', // Niger\n NG: '🇳🇬', // Nigeria\n NU: '🇳🇺', // Niue\n NF: '🇳🇫', // Norfolk Island\n MK: '🇲🇰', // North Macedonia\n MP: '🇲🇵', // Northern Mariana Islands\n NO: '🇳🇴', // Norway\n OM: '🇴🇲', // Oman\n PK: '🇵🇰', // Pakistan\n PW: '🇵🇼', // Palau\n PS: '🇵🇸', // Palestine, State of\n PA: '🇵🇦', // Panama\n PG: '🇵🇬', // Papua New Guinea\n PY: '🇵🇾', // Paraguay\n PE: '🇵🇪', // Peru\n PH: '🇵🇭', // Philippines\n PN: '🇵🇳', // Pitcairn\n PL: '🇵🇱', // Poland\n PT: '🇵🇹', // Portugal\n PR: '🇵🇷', // Puerto Rico\n QA: '🇶🇦', // Qatar\n RE: '🇷🇪', // Réunion\n RO: '🇷🇴', // Romania\n RU: '🇷🇺', // Russian Federation\n RW: '🇷🇼', // Rwanda\n BL: '🇧🇱', // Saint Barthélemy\n SH: '🇸🇭', // Saint Helena, Ascension and Tristan da Cunha\n KN: '🇰🇳', // Saint Kitts and Nevis\n LC: '🇱🇨', // Saint Lucia\n MF: '🇲🇫', // Saint Martin (French part)\n PM: '🇵🇲', // Saint Pierre and Miquelon\n VC: '🇻🇨', // Saint Vincent and the Grenadines\n WS: '🇼🇸', // Samoa\n SM: '🇸🇲', // San Marino\n ST: '🇸🇹', // São Tomé and Príncipe\n SA: '🇸🇦', // Saudi Arabia\n SN: '🇸🇳', // Senegal\n RS: '🇷🇸', // Serbia\n SC: '🇸🇨', // Seychelles\n SL: '🇸🇱', // Sierra Leone\n SG: '🇸🇬', // Singapore\n SX: '🇸🇽', // Sint Maarten (Dutch part)\n SK: '🇸🇰', // Slovakia\n SI: '🇸🇮', // Slovenia\n SB: '🇸🇧', // Solomon Islands\n SO: '🇸🇴', // Somalia\n ZA: '🇿🇦', // South Africa\n GS: '🇬🇸', // South Georgia and the South Sandwich Islands\n SS: '🇸🇸', // South Sudan\n ES: '🇪🇸', // Spain\n LK: '🇱🇰', // Sri Lanka\n SD: '🇸🇩', // Sudan\n SR: '🇸🇷', // Suriname\n SJ: '🇸🇯', // Svalbard and Jan Mayen\n SE: '🇸🇪', // Sweden\n CH: '🇨🇭', // Switzerland\n SY: '🇸🇾', // Syrian Arab Republic\n TW: '🇹🇼', // Taiwan\n TJ: '🇹🇯', // Tajikistan\n TZ: '🇹🇿', // Tanzania\n TH: '🇹🇭', // Thailand\n TL: '🇹🇱', // Timor-Leste\n TG: '🇹🇬', // Togo\n TK: '🇹🇰', // Tokelau\n TO: '🇹🇴', // Tonga\n TT: '🇹🇹', // Trinidad and Tobago\n TN: '🇹🇳', // Tunisia\n TR: '🇹🇷', // Türkiye\n TM: '🇹🇲', // Turkmenistan\n TC: '🇹🇨', // Turks and Caicos Islands\n TV: '🇹🇻', // Tuvalu\n UG: '🇺🇬', // Uganda\n UA: '🇺🇦', // Ukraine\n AE: '🇦🇪', // United Arab Emirates\n GB: '🇬🇧', // United Kingdom\n US: '🇺🇸', // United States of America\n UM: '🇺🇲', // United States Minor Outlying Islands\n UY: '🇺🇾', // Uruguay\n UZ: '🇺🇿', // Uzbekistan\n VU: '🇻🇺', // Vanuatu\n VE: '🇻🇪', // Venezuela\n VN: '🇻🇳', // Viet Nam\n VG: '🇻🇬', // Virgin Islands (British)\n VI: '🇻🇮', // Virgin Islands (U.S.)\n WF: '🇼🇫', // Wallis and Futuna\n EH: '🇪🇭', // Western Sahara\n YE: '🇾🇪', // Yemen\n ZM: '🇿🇲', // Zambia\n ZW: '🇿🇼', // Zimbabwe,\n EU: '🇪🇺', // European Union (EU)\n} as Record<string, string>;\n","import { libraryDefaultLocale } from '../internal';\nimport { defaultEmoji } from './getLocaleEmoji';\nimport { _isValidLocale, _standardizeLocale } from './isValidLocale';\nimport _getLocaleEmoji from './getLocaleEmoji';\nimport { intlCache } from 'src/cache/IntlCache';\nimport { CustomMapping, FullCustomMapping } from './customLocaleMapping';\n\nexport type LocaleProperties = {\n // assume code = \"de-AT\", defaultLocale = \"en-US\"\n\n code: string; // \"de-AT\"\n name: string; // \"Austrian German\"\n nativeName: string; // \"Österreichisches Deutsch\"\n\n languageCode: string; // \"de\"\n languageName: string; // \"German\"\n nativeLanguageName: string; // \"Deutsch\"\n\n // note that maximize() is NOT called here!\n\n nameWithRegionCode: string; // \"German (AT)\"\n nativeNameWithRegionCode: string; // \"Deutsch (AT)\"\n\n // for most likely script and region, maximize() is called\n\n regionCode: string; // \"AT\"\n regionName: string; // \"Austria\"\n nativeRegionName: string; // Österreich\n\n scriptCode: string; // \"Latn\"\n scriptName: string; // \"Latin\"\n nativeScriptName: string; // \"Lateinisch\"\n\n maximizedCode: string; // \"de-Latn-AT\"\n maximizedName: string; // \"Austrian German (Latin)\"\n nativeMaximizedName: string; // Österreichisches Deutsch (Lateinisch)\n\n minimizedCode: string; // \"de-AT\", but for \"de-DE\" it would just be \"de\"\n minimizedName: string; // \"\"Austrian German\";\n nativeMinimizedName: string; // \"Österreichisches Deutsch\"\n\n // Emoji depending on region code\n // In order not to accidentally spark international conflict, some emojis are hard-coded\n emoji: string;\n};\n\n/**\n * Creates a set of custom locale properties from a custom mapping.\n *\n * @param lArray - An array of locale codes to search for in the custom mapping.\n * @param customMapping - Optional custom mapping of locale codes to names.\n * @returns A partial set of locale properties, or undefined if no custom mapping is provided.\n */\nfunction createCustomLocaleProperties(\n lArray: string[],\n customMapping?: CustomMapping\n): Partial<LocaleProperties> | undefined {\n if (customMapping) {\n let merged: Partial<LocaleProperties> = {};\n for (const l of lArray) {\n const value = customMapping[l];\n if (value) {\n if (typeof value === 'string') {\n merged.name ||= value;\n } else if (value) {\n merged = { ...value, ...merged };\n }\n }\n }\n return merged;\n }\n return undefined;\n}\n\n/**\n * @internal\n */\nexport default function _getLocaleProperties(\n locale: string,\n defaultLocale: string = libraryDefaultLocale,\n customMapping?: CustomMapping\n): LocaleProperties {\n defaultLocale ||= libraryDefaultLocale;\n\n try {\n const standardizedLocale = _standardizeLocale(locale); // \"de-AT\"\n\n const localeObject = intlCache.get('Locale', locale);\n const languageCode = localeObject.language; // \"de\"\n\n const customLocaleProperties = createCustomLocaleProperties(\n [locale, standardizedLocale, languageCode],\n customMapping\n );\n\n const baseRegion = localeObject.region; // \"AT\"\n\n const maximizedLocale = localeObject.maximize();\n const maximizedCode = maximizedLocale.toString(); // \"de-Latn-AT\"\n const regionCode =\n localeObject.region ||\n customLocaleProperties?.regionCode ||\n maximizedLocale.region ||\n ''; // \"AT\"\n const scriptCode =\n localeObject.script ||\n customLocaleProperties?.scriptCode ||\n maximizedLocale.script ||\n ''; // \"Latn\"\n\n const minimizedLocale = localeObject.minimize();\n const minimizedCode = minimizedLocale.toString(); // \"de-AT\"\n\n // Language names (default and native)\n\n const defaultLanguageOrder = [defaultLocale, locale, libraryDefaultLocale];\n const nativeLanguageOrder = [locale, defaultLocale, libraryDefaultLocale];\n\n const languageNames = intlCache.get('DisplayNames', defaultLanguageOrder, {\n type: 'language',\n });\n const nativeLanguageNames = intlCache.get(\n 'DisplayNames',\n nativeLanguageOrder,\n { type: 'language' }\n );\n\n const customName = customLocaleProperties?.name;\n const customNativeName =\n customLocaleProperties?.nativeName || customLocaleProperties?.name;\n\n const name = customName || languageNames.of(locale) || locale; // \"Austrian German\"\n const nativeName =\n customNativeName || nativeLanguageNames.of(locale) || locale; // \"Österreichisches Deutsch\"\n\n const maximizedName =\n customLocaleProperties?.maximizedName ||\n customName ||\n languageNames.of(maximizedCode) ||\n locale; // \"Austrian German (Latin)\"\n const nativeMaximizedName =\n customLocaleProperties?.nativeMaximizedName ||\n customNativeName ||\n nativeLanguageNames.of(maximizedCode) ||\n locale; // \"Österreichisches Deutsch (Lateinisch)\"\n\n const minimizedName =\n customLocaleProperties?.minimizedName ||\n customName ||\n languageNames.of(minimizedCode) ||\n locale; // \"Austrian German\", but for \"de-DE\" would just be \"German\"\n const nativeMinimizedName =\n customLocaleProperties?.nativeMinimizedName ||\n customNativeName ||\n nativeLanguageNames.of(minimizedCode) ||\n locale; // \"Österreichisches Deutsch\", but for \"de-DE\" would just be \"Deutsch\"\n\n const languageName =\n customLocaleProperties?.languageName ||\n customName ||\n languageNames.of(languageCode) ||\n locale; // \"German\"\n const nativeLanguageName =\n customLocaleProperties?.nativeLanguageName ||\n customNativeName ||\n nativeLanguageNames.of(languageCode) ||\n locale; // \"Deutsch\"\n\n const nameWithRegionCode =\n customLocaleProperties?.nameWithRegionCode || baseRegion\n ? `${languageName} (${baseRegion})`\n : languageName; // German (AT)\n const nativeNameWithRegionCode =\n customLocaleProperties?.nativeNameWithRegionCode ||\n (baseRegion\n ? `${nativeLanguageName} (${baseRegion})`\n : nativeLanguageName) ||\n nameWithRegionCode; // \"Deutsch (AT)\"\n\n // Region names (default and native)\n\n const regionNames = intlCache.get('DisplayNames', defaultLanguageOrder, {\n type: 'region',\n });\n const nativeRegionNames = intlCache.get(\n 'DisplayNames',\n nativeLanguageOrder,\n { type: 'region' }\n );\n\n const regionName =\n customLocaleProperties?.regionName ||\n (regionCode ? regionNames.of(regionCode) : '') ||\n ''; // \"Austria\"\n const nativeRegionName =\n customLocaleProperties?.nativeRegionName ||\n (regionCode ? nativeRegionNames.of(regionCode) : '') ||\n ''; // \"Österreich\"\n\n // Script names (default and native)\n\n const scriptNames = intlCache.get('DisplayNames', defaultLanguageOrder, {\n type: 'script',\n });\n const nativeScriptNames = intlCache.get(\n 'DisplayNames',\n nativeLanguageOrder,\n { type: 'script' }\n );\n\n const scriptName =\n customLocaleProperties?.scriptName ||\n (scriptCode ? scriptNames.of(scriptCode) : '') ||\n ''; // \"Latin\"\n const nativeScriptName =\n customLocaleProperties?.nativeScriptName ||\n (scriptCode ? nativeScriptNames.of(scriptCode) : '') ||\n ''; // \"Lateinisch\"\n\n // Emoji\n\n const emoji =\n customLocaleProperties?.emoji ||\n _getLocaleEmoji(standardizedLocale, customMapping);\n\n return {\n code: standardizedLocale,\n name,\n nativeName,\n maximizedCode,\n maximizedName,\n nativeMaximizedName,\n minimizedCode,\n minimizedName,\n nativeMinimizedName,\n languageCode,\n languageName,\n nativeLanguageName,\n nameWithRegionCode,\n nativeNameWithRegionCode,\n regionCode,\n regionName,\n nativeRegionName,\n scriptCode,\n scriptName,\n nativeScriptName,\n emoji,\n };\n } catch {\n let code = _isValidLocale(locale) ? _standardizeLocale(locale) : locale;\n const codeParts = code?.split('-');\n let languageCode = codeParts?.[0] || code || '';\n let regionCode =\n codeParts.length > 2 ? codeParts?.[2] : codeParts?.[1] || '';\n let scriptCode = codeParts?.[3] || '';\n\n const customLocaleProperties = createCustomLocaleProperties(\n [code, languageCode],\n customMapping\n );\n\n code = customLocaleProperties?.code || code;\n const name = customLocaleProperties?.name || code;\n const nativeName = customLocaleProperties?.nativeName || name;\n\n const maximizedCode = customLocaleProperties?.maximizedCode || code;\n const maximizedName = customLocaleProperties?.maximizedName || name;\n const nativeMaximizedName =\n customLocaleProperties?.nativeMaximizedName || nativeName;\n\n const minimizedCode = customLocaleProperties?.minimizedCode || code;\n const minimizedName = customLocaleProperties?.minimizedName || name;\n const nativeMinimizedName =\n customLocaleProperties?.nativeMinimizedName || nativeName;\n\n languageCode = customLocaleProperties?.languageCode || languageCode;\n const languageName = customLocaleProperties?.languageName || name;\n const nativeLanguageName =\n customLocaleProperties?.nativeLanguageName || nativeName;\n\n regionCode = customLocaleProperties?.regionCode || regionCode;\n const regionName = customLocaleProperties?.regionName || '';\n const nativeRegionName = customLocaleProperties?.nativeRegionName || '';\n\n scriptCode = customLocaleProperties?.scriptCode || scriptCode;\n const scriptName = customLocaleProperties?.scriptName || '';\n const nativeScriptName = customLocaleProperties?.nativeScriptName || '';\n\n const nameWithRegionCode =\n customLocaleProperties?.nameWithRegionCode ||\n (regionName ? `${name} (${regionName})` : name);\n const nativeNameWithRegionCode =\n customLocaleProperties?.nativeNameWithRegionCode ||\n (nativeRegionName ? `${nativeName} (${nativeRegionName})` : nativeName);\n\n const emoji = customLocaleProperties?.emoji || defaultEmoji;\n\n return {\n code,\n name,\n nativeName,\n maximizedCode,\n maximizedName,\n nativeMaximizedName,\n minimizedCode,\n minimizedName,\n nativeMinimizedName,\n languageCode,\n languageName,\n nativeLanguageName,\n nameWithRegionCode,\n nativeNameWithRegionCode,\n regionCode,\n regionName,\n nativeRegionName,\n scriptCode,\n scriptName,\n nativeScriptName,\n emoji,\n };\n }\n}\n","import { _isValidLocale, _standardizeLocale } from './isValidLocale';\nimport _isSameLanguage from './isSameLanguage';\nimport _isSameDialect from './isSameDialect';\nimport _getLocaleProperties from './getLocaleProperties';\n\n/**\n * Given a list of locales and a list of approved locales, sorted in preference order\n * Determines which locale is the best match among the approved locales, prioritizing exact matches and falling back to dialects of the same language\n * @internal\n */\nexport default function _determineLocale(\n locales: string | string[],\n approvedLocales: string[]\n): string | undefined {\n if (typeof locales === 'string') locales = [locales];\n locales = locales.filter(_isValidLocale).map(_standardizeLocale);\n approvedLocales = approvedLocales\n .filter(_isValidLocale)\n .map(_standardizeLocale);\n for (const locale of locales) {\n const candidates = approvedLocales.filter((approvedLocale) =>\n _isSameLanguage(locale, approvedLocale)\n );\n const getMatchingCode = ({\n locale,\n languageCode,\n minimizedCode,\n regionCode,\n scriptCode,\n }: {\n locale: string;\n languageCode: string;\n minimizedCode: string;\n regionCode: string;\n scriptCode: string;\n }) => {\n const locales = [\n locale, // If the full locale is supported under this language category\n `${languageCode}-${regionCode}`, // Attempt to match parts\n `${languageCode}-${scriptCode}`,\n minimizedCode, // If a minimized variant of this locale is supported\n ];\n for (const l of locales) {\n if (candidates.includes(l)) return l;\n }\n return null;\n };\n const { languageCode, ...codes } = _getLocaleProperties(locale);\n const matchingCode =\n getMatchingCode({ locale, languageCode, ...codes }) ||\n getMatchingCode({\n locale: languageCode,\n ..._getLocaleProperties(languageCode),\n });\n if (matchingCode) return matchingCode;\n }\n return undefined;\n}\n","//\n// Main\n//\nexport function memoize(fn, options) {\n var cache = options && options.cache ? options.cache : cacheDefault;\n var serializer = options && options.serializer ? options.serializer : serializerDefault;\n var strategy = options && options.strategy ? options.strategy : strategyDefault;\n return strategy(fn, {\n cache: cache,\n serializer: serializer,\n });\n}\n//\n// Strategy\n//\nfunction isPrimitive(value) {\n return (value == null || typeof value === 'number' || typeof value === 'boolean'); // || typeof value === \"string\" 'unsafe' primitive for our needs\n}\nfunction monadic(fn, cache, serializer, arg) {\n var cacheKey = isPrimitive(arg) ? arg : serializer(arg);\n var computedValue = cache.get(cacheKey);\n if (typeof computedValue === 'undefined') {\n computedValue = fn.call(this, arg);\n cache.set(cacheKey, computedValue);\n }\n return computedValue;\n}\nfunction variadic(fn, cache, serializer) {\n var args = Array.prototype.slice.call(arguments, 3);\n var cacheKey = serializer(args);\n var computedValue = cache.get(cacheKey);\n if (typeof computedValue === 'undefined') {\n computedValue = fn.apply(this, args);\n cache.set(cacheKey, computedValue);\n }\n return computedValue;\n}\nfunction assemble(fn, context, strategy, cache, serialize) {\n return strategy.bind(context, fn, cache, serialize);\n}\nfunction strategyDefault(fn, options) {\n var strategy = fn.length === 1 ? monadic : variadic;\n return assemble(fn, this, strategy, options.cache.create(), options.serializer);\n}\nfunction strategyVariadic(fn, options) {\n return assemble(fn, this, variadic, options.cache.create(), options.serializer);\n}\nfunction strategyMonadic(fn, options) {\n return assemble(fn, this, monadic, options.cache.create(), options.serializer);\n}\n//\n// Serializer\n//\nvar serializerDefault = function () {\n return JSON.stringify(arguments);\n};\n//\n// Cache\n//\nvar ObjectWithoutPrototypeCache = /** @class */ (function () {\n function ObjectWithoutPrototypeCache() {\n this.cache = Object.create(null);\n }\n ObjectWithoutPrototypeCache.prototype.get = function (key) {\n return this.cache[key];\n };\n ObjectWithoutPrototypeCache.prototype.set = function (key, value) {\n this.cache[key] = value;\n };\n return ObjectWithoutPrototypeCache;\n}());\nvar cacheDefault = {\n create: function create() {\n return new ObjectWithoutPrototypeCache();\n },\n};\nexport var strategies = {\n variadic: strategyVariadic,\n monadic: strategyMonadic,\n};\n","export var ErrorKind;\n(function (ErrorKind) {\n /** Argument is unclosed (e.g. `{0`) */\n ErrorKind[ErrorKind[\"EXPECT_ARGUMENT_CLOSING_BRACE\"] = 1] = \"EXPECT_ARGUMENT_CLOSING_BRACE\";\n /** Argument is empty (e.g. `{}`). */\n ErrorKind[ErrorKind[\"EMPTY_ARGUMENT\"] = 2] = \"EMPTY_ARGUMENT\";\n /** Argument is malformed (e.g. `{foo!}``) */\n ErrorKind[ErrorKind[\"MALFORMED_ARGUMENT\"] = 3] = \"MALFORMED_ARGUMENT\";\n /** Expect an argument type (e.g. `{foo,}`) */\n ErrorKind[ErrorKind[\"EXPECT_ARGUMENT_TYPE\"] = 4] = \"EXPECT_ARGUMENT_TYPE\";\n /** Unsupported argument type (e.g. `{foo,foo}`) */\n ErrorKind[ErrorKind[\"INVALID_ARGUMENT_TYPE\"] = 5] = \"INVALID_ARGUMENT_TYPE\";\n /** Expect an argument style (e.g. `{foo, number, }`) */\n ErrorKind[ErrorKind[\"EXPECT_ARGUMENT_STYLE\"] = 6] = \"EXPECT_ARGUMENT_STYLE\";\n /** The number skeleton is invalid. */\n ErrorKind[ErrorKind[\"INVALID_NUMBER_SKELETON\"] = 7] = \"INVALID_NUMBER_SKELETON\";\n /** The date time skeleton is invalid. */\n ErrorKind[ErrorKind[\"INVALID_DATE_TIME_SKELETON\"] = 8] = \"INVALID_DATE_TIME_SKELETON\";\n /** Exepct a number skeleton following the `::` (e.g. `{foo, number, ::}`) */\n ErrorKind[ErrorKind[\"EXPECT_NUMBER_SKELETON\"] = 9] = \"EXPECT_NUMBER_SKELETON\";\n /** Exepct a date time skeleton following the `::` (e.g. `{foo, date, ::}`) */\n ErrorKind[ErrorKind[\"EXPECT_DATE_TIME_SKELETON\"] = 10] = \"EXPECT_DATE_TIME_SKELETON\";\n /** Unmatched apostrophes in the argument style (e.g. `{foo, number, 'test`) */\n ErrorKind[ErrorKind[\"UNCLOSED_QUOTE_IN_ARGUMENT_STYLE\"] = 11] = \"UNCLOSED_QUOTE_IN_ARGUMENT_STYLE\";\n /** Missing select argument options (e.g. `{foo, select}`) */\n ErrorKind[ErrorKind[\"EXPECT_SELECT_ARGUMENT_OPTIONS\"] = 12] = \"EXPECT_SELECT_ARGUMENT_OPTIONS\";\n /** Expecting an offset value in `plural` or `selectordinal` argument (e.g `{foo, plural, offset}`) */\n ErrorKind[ErrorKind[\"EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE\"] = 13] = \"EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE\";\n /** Offset value in `plural` or `selectordinal` is invalid (e.g. `{foo, plural, offset: x}`) */\n ErrorKind[ErrorKind[\"INVALID_PLURAL_ARGUMENT_OFFSET_VALUE\"] = 14] = \"INVALID_PLURAL_ARGUMENT_OFFSET_VALUE\";\n /** Expecting a selector in `select` argument (e.g `{foo, select}`) */\n ErrorKind[ErrorKind[\"EXPECT_SELECT_ARGUMENT_SELECTOR\"] = 15] = \"EXPECT_SELECT_ARGUMENT_SELECTOR\";\n /** Expecting a selector in `plural` or `selectordinal` argument (e.g `{foo, plural}`) */\n ErrorKind[ErrorKind[\"EXPECT_PLURAL_ARGUMENT_SELECTOR\"] = 16] = \"EXPECT_PLURAL_ARGUMENT_SELECTOR\";\n /** Expecting a message fragment after the `select` selector (e.g. `{foo, select, apple}`) */\n ErrorKind[ErrorKind[\"EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT\"] = 17] = \"EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT\";\n /**\n * Expecting a message fragment after the `plural` or `selectordinal` selector\n * (e.g. `{foo, plural, one}`)\n */\n ErrorKind[ErrorKind[\"EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT\"] = 18] = \"EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT\";\n /** Selector in `plural` or `selectordinal` is malformed (e.g. `{foo, plural, =x {#}}`) */\n ErrorKind[ErrorKind[\"INVALID_PLURAL_ARGUMENT_SELECTOR\"] = 19] = \"INVALID_PLURAL_ARGUMENT_SELECTOR\";\n /**\n * Duplicate selectors in `plural` or `selectordinal` argument.\n * (e.g. {foo, plural, one {#} one {#}})\n */\n ErrorKind[ErrorKind[\"DUPLICATE_PLURAL_ARGUMENT_SELECTOR\"] = 20] = \"DUPLICATE_PLURAL_ARGUMENT_SELECTOR\";\n /** Duplicate selectors in `select` argument.\n * (e.g. {foo, select, apple {apple} apple {apple}})\n */\n ErrorKind[ErrorKind[\"DUPLICATE_SELECT_ARGUMENT_SELECTOR\"] = 21] = \"DUPLICATE_SELECT_ARGUMENT_SELECTOR\";\n /** Plural or select argument option must have `other` clause. */\n ErrorKind[ErrorKind[\"MISSING_OTHER_CLAUSE\"] = 22] = \"MISSING_OTHER_CLAUSE\";\n /** The tag is malformed. (e.g. `<bold!>foo</bold!>) */\n ErrorKind[ErrorKind[\"INVALID_TAG\"] = 23] = \"INVALID_TAG\";\n /** The tag name is invalid. (e.g. `<123>foo</123>`) */\n ErrorKind[ErrorKind[\"INVALID_TAG_NAME\"] = 25] = \"INVALID_TAG_NAME\";\n /** The closing tag does not match the opening tag. (e.g. `<bold>foo</italic>`) */\n ErrorKind[ErrorKind[\"UNMATCHED_CLOSING_TAG\"] = 26] = \"UNMATCHED_CLOSING_TAG\";\n /** The opening tag has unmatched closing tag. (e.g. `<bold>foo`) */\n ErrorKind[ErrorKind[\"UNCLOSED_TAG\"] = 27] = \"UNCLOSED_TAG\";\n})(ErrorKind || (ErrorKind = {}));\n","export var TYPE;\n(function (TYPE) {\n /**\n * Raw text\n */\n TYPE[TYPE[\"literal\"] = 0] = \"literal\";\n /**\n * Variable w/o any format, e.g `var` in `this is a {var}`\n */\n TYPE[TYPE[\"argument\"] = 1] = \"argument\";\n /**\n * Variable w/ number format\n */\n TYPE[TYPE[\"number\"] = 2] = \"number\";\n /**\n * Variable w/ date format\n */\n TYPE[TYPE[\"date\"] = 3] = \"date\";\n /**\n * Variable w/ time format\n */\n TYPE[TYPE[\"time\"] = 4] = \"time\";\n /**\n * Variable w/ select format\n */\n TYPE[TYPE[\"select\"] = 5] = \"select\";\n /**\n * Variable w/ plural format\n */\n TYPE[TYPE[\"plural\"] = 6] = \"plural\";\n /**\n * Only possible within plural argument.\n * This is the `#` symbol that will be substituted with the count.\n */\n TYPE[TYPE[\"pound\"] = 7] = \"pound\";\n /**\n * XML-like tag\n */\n TYPE[TYPE[\"tag\"] = 8] = \"tag\";\n})(TYPE || (TYPE = {}));\nexport var SKELETON_TYPE;\n(function (SKELETON_TYPE) {\n SKELETON_TYPE[SKELETON_TYPE[\"number\"] = 0] = \"number\";\n SKELETON_TYPE[SKELETON_TYPE[\"dateTime\"] = 1] = \"dateTime\";\n})(SKELETON_TYPE || (SKELETON_TYPE = {}));\n/**\n * Type Guards\n */\nexport function isLiteralElement(el) {\n return el.type === TYPE.literal;\n}\nexport function isArgumentElement(el) {\n return el.type === TYPE.argument;\n}\nexport function isNumberElement(el) {\n return el.type === TYPE.number;\n}\nexport function isDateElement(el) {\n return el.type === TYPE.date;\n}\nexport function isTimeElement(el) {\n return el.type === TYPE.time;\n}\nexport function isSelectElement(el) {\n return el.type === TYPE.select;\n}\nexport function isPluralElement(el) {\n return el.type === TYPE.plural;\n}\nexport function isPoundElement(el) {\n return el.type === TYPE.pound;\n}\nexport function isTagElement(el) {\n return el.type === TYPE.tag;\n}\nexport function isNumberSkeleton(el) {\n return !!(el && typeof el === 'object' && el.type === SKELETON_TYPE.number);\n}\nexport function isDateTimeSkeleton(el) {\n return !!(el && typeof el === 'object' && el.type === SKELETON_TYPE.dateTime);\n}\nexport function createLiteralElement(value) {\n return {\n type: TYPE.literal,\n value: value,\n };\n}\nexport function createNumberElement(value, style) {\n return {\n type: TYPE.number,\n value: value,\n style: style,\n };\n}\n","// @generated from regex-gen.ts\nexport var SPACE_SEPARATOR_REGEX = /[ \\xA0\\u1680\\u2000-\\u200A\\u202F\\u205F\\u3000]/;\nexport var WHITE_SPACE_REGEX = /[\\t-\\r \\x85\\u200E\\u200F\\u2028\\u2029]/;\n","/**\n * https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * Credit: https://github.com/caridy/intl-datetimeformat-pattern/blob/master/index.js\n * with some tweaks\n */\nvar DATE_TIME_REGEX = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;\n/**\n * Parse Date time skeleton into Intl.DateTimeFormatOptions\n * Ref: https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * @public\n * @param skeleton skeleton string\n */\nexport function parseDateTimeSkeleton(skeleton) {\n var result = {};\n skeleton.replace(DATE_TIME_REGEX, function (match) {\n var len = match.length;\n switch (match[0]) {\n // Era\n case 'G':\n result.era = len === 4 ? 'long' : len === 5 ? 'narrow' : 'short';\n break;\n // Year\n case 'y':\n result.year = len === 2 ? '2-digit' : 'numeric';\n break;\n case 'Y':\n case 'u':\n case 'U':\n case 'r':\n throw new RangeError('`Y/u/U/r` (year) patterns are not supported, use `y` instead');\n // Quarter\n case 'q':\n case 'Q':\n throw new RangeError('`q/Q` (quarter) patterns are not supported');\n // Month\n case 'M':\n case 'L':\n result.month = ['numeric', '2-digit', 'short', 'long', 'narrow'][len - 1];\n break;\n // Week\n case 'w':\n case 'W':\n throw new RangeError('`w/W` (week) patterns are not supported');\n case 'd':\n result.day = ['numeric', '2-digit'][len - 1];\n break;\n case 'D':\n case 'F':\n case 'g':\n throw new RangeError('`D/F/g` (day) patterns are not supported, use `d` instead');\n // Weekday\n case 'E':\n result.weekday = len === 4 ? 'long' : len === 5 ? 'narrow' : 'short';\n break;\n case 'e':\n if (len < 4) {\n throw new RangeError('`e..eee` (weekday) patterns are not supported');\n }\n result.weekday = ['short', 'long', 'narrow', 'short'][len - 4];\n break;\n case 'c':\n if (len < 4) {\n throw new RangeError('`c..ccc` (weekday) patterns are not supported');\n }\n result.weekday = ['short', 'long', 'narrow', 'short'][len - 4];\n break;\n // Period\n case 'a': // AM, PM\n result.hour12 = true;\n break;\n case 'b': // am, pm, noon, midnight\n case 'B': // flexible day periods\n throw new RangeError('`b/B` (period) patterns are not supported, use `a` instead');\n // Hour\n case 'h':\n result.hourCycle = 'h12';\n result.hour = ['numeric', '2-digit'][len - 1];\n break;\n case 'H':\n result.hourCycle = 'h23';\n result.hour = ['numeric', '2-digit'][len - 1];\n break;\n case 'K':\n result.hourCycle = 'h11';\n result.hour = ['numeric', '2-digit'][len - 1];\n break;\n case 'k':\n result.hourCycle = 'h24';\n result.hour = ['numeric', '2-digit'][len - 1];\n break;\n case 'j':\n case 'J':\n case 'C':\n throw new RangeError('`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead');\n // Minute\n case 'm':\n result.minute = ['numeric', '2-digit'][len - 1];\n break;\n // Second\n case 's':\n result.second = ['numeric', '2-digit'][len - 1];\n break;\n case 'S':\n case 'A':\n throw new RangeError('`S/A` (second) patterns are not supported, use `s` instead');\n // Zone\n case 'z': // 1..3, 4: specific non-location format\n result.timeZoneName = len < 4 ? 'short' : 'long';\n break;\n case 'Z': // 1..3, 4, 5: The ISO8601 varios formats\n case 'O': // 1, 4: milliseconds in day short, long\n case 'v': // 1, 4: generic non-location format\n case 'V': // 1, 2, 3, 4: time zone ID or city\n case 'X': // 1, 2, 3, 4: The ISO8601 varios formats\n case 'x': // 1, 2, 3, 4: The ISO8601 varios formats\n throw new RangeError('`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead');\n }\n return '';\n });\n return result;\n}\n","// @generated from regex-gen.ts\nexport var WHITE_SPACE_REGEX = /[\\t-\\r \\x85\\u200E\\u200F\\u2028\\u2029]/i;\n","import { __assign } from \"tslib\";\nimport { WHITE_SPACE_REGEX } from './regex.generated';\nexport function parseNumberSkeletonFromString(skeleton) {\n if (skeleton.length === 0) {\n throw new Error('Number skeleton cannot be empty');\n }\n // Parse the skeleton\n var stringTokens = skeleton\n .split(WHITE_SPACE_REGEX)\n .filter(function (x) { return x.length > 0; });\n var tokens = [];\n for (var _i = 0, stringTokens_1 = stringTokens; _i < stringTokens_1.length; _i++) {\n var stringToken = stringTokens_1[_i];\n var stemAndOptions = stringToken.split('/');\n if (stemAndOptions.length === 0) {\n throw new Error('Invalid number skeleton');\n }\n var stem = stemAndOptions[0], options = stemAndOptions.slice(1);\n for (var _a = 0, options_1 = options; _a < options_1.length; _a++) {\n var option = options_1[_a];\n if (option.length === 0) {\n throw new Error('Invalid number skeleton');\n }\n }\n tokens.push({ stem: stem, options: options });\n }\n return tokens;\n}\nfunction icuUnitToEcma(unit) {\n return unit.replace(/^(.*?)-/, '');\n}\nvar FRACTION_PRECISION_REGEX = /^\\.(?:(0+)(\\*)?|(#+)|(0+)(#+))$/g;\nvar SIGNIFICANT_PRECISION_REGEX = /^(@+)?(\\+|#+)?[rs]?$/g;\nvar INTEGER_WIDTH_REGEX = /(\\*)(0+)|(#+)(0+)|(0+)/g;\nvar CONCISE_INTEGER_WIDTH_REGEX = /^(0+)$/;\nfunction parseSignificantPrecision(str) {\n var result = {};\n if (str[str.length - 1] === 'r') {\n result.roundingPriority = 'morePrecision';\n }\n else if (str[str.length - 1] === 's') {\n result.roundingPriority = 'lessPrecision';\n }\n str.replace(SIGNIFICANT_PRECISION_REGEX, function (_, g1, g2) {\n // @@@ case\n if (typeof g2 !== 'string') {\n result.minimumSignificantDigits = g1.length;\n result.maximumSignificantDigits = g1.length;\n }\n // @@@+ case\n else if (g2 === '+') {\n result.minimumSignificantDigits = g1.length;\n }\n // .### case\n else if (g1[0] === '#') {\n result.maximumSignificantDigits = g1.length;\n }\n // .@@## or .@@@ case\n else {\n result.minimumSignificantDigits = g1.length;\n result.maximumSignificantDigits =\n g1.length + (typeof g2 === 'string' ? g2.length : 0);\n }\n return '';\n });\n return result;\n}\nfunction parseSign(str) {\n switch (str) {\n case 'sign-auto':\n return {\n signDisplay: 'auto',\n };\n case 'sign-accounting':\n case '()':\n return {\n currencySign: 'accounting',\n };\n case 'sign-always':\n case '+!':\n return {\n signDisplay: 'always',\n };\n case 'sign-accounting-always':\n case '()!':\n return {\n signDisplay: 'always',\n currencySign: 'accounting',\n };\n case 'sign-except-zero':\n case '+?':\n return {\n signDisplay: 'exceptZero',\n };\n case 'sign-accounting-except-zero':\n case '()?':\n return {\n signDisplay: 'exceptZero',\n currencySign: 'accounting',\n };\n case 'sign-never':\n case '+_':\n return {\n signDisplay: 'never',\n };\n }\n}\nfunction parseConciseScientificAndEngineeringStem(stem) {\n // Engineering\n var result;\n if (stem[0] === 'E' && stem[1] === 'E') {\n result = {\n notation: 'engineering',\n };\n stem = stem.slice(2);\n }\n else if (stem[0] === 'E') {\n result = {\n notation: 'scientific',\n };\n stem = stem.slice(1);\n }\n if (result) {\n var signDisplay = stem.slice(0, 2);\n if (signDisplay === '+!') {\n result.signDisplay = 'always';\n stem = stem.slice(2);\n }\n else if (signDisplay === '+?') {\n result.signDisplay = 'exceptZero';\n stem = stem.slice(2);\n }\n if (!CONCISE_INTEGER_WIDTH_REGEX.test(stem)) {\n throw new Error('Malformed concise eng/scientific notation');\n }\n result.minimumIntegerDigits = stem.length;\n }\n return result;\n}\nfunction parseNotationOptions(opt) {\n var result = {};\n var signOpts = parseSign(opt);\n if (signOpts) {\n return signOpts;\n }\n return result;\n}\n/**\n * https://github.com/unicode-org/icu/blob/master/docs/userguide/format_parse/numbers/skeletons.md#skeleton-stems-and-options\n */\nexport function parseNumberSkeleton(tokens) {\n var result = {};\n for (var _i = 0, tokens_1 = tokens; _i < tokens_1.length; _i++) {\n var token = tokens_1[_i];\n switch (token.stem) {\n case 'percent':\n case '%':\n result.style = 'percent';\n continue;\n case '%x100':\n result.style = 'percent';\n result.scale = 100;\n continue;\n case 'currency':\n result.style = 'currency';\n result.currency = token.options[0];\n continue;\n case 'group-off':\n case ',_':\n result.useGrouping = false;\n continue;\n case 'precision-integer':\n case '.':\n result.maximumFractionDigits = 0;\n continue;\n case 'measure-unit':\n case 'unit':\n result.style = 'unit';\n result.unit = icuUnitToEcma(token.options[0]);\n continue;\n case 'compact-short':\n case 'K':\n result.notation = 'compact';\n result.compactDisplay = 'short';\n continue;\n case 'compact-long':\n case 'KK':\n result.notation = 'compact';\n result.compactDisplay = 'long';\n continue;\n case 'scientific':\n result = __assign(__assign(__assign({}, result), { notation: 'scientific' }), token.options.reduce(function (all, opt) { return (__assign(__assign({}, all), parseNotationOptions(opt))); }, {}));\n continue;\n case 'engineering':\n result = __assign(__assign(__assign({}, result), { notation: 'engineering' }), token.options.reduce(function (all, opt) { return (__assign(__assign({}, all), parseNotationOptions(opt))); }, {}));\n continue;\n case 'notation-simple':\n result.notation = 'standard';\n continue;\n // https://github.com/unicode-org/icu/blob/master/icu4c/source/i18n/unicode/unumberformatter.h\n case 'unit-width-narrow':\n result.currencyDisplay = 'narrowSymbol';\n result.unitDisplay = 'narrow';\n continue;\n case 'unit-width-short':\n result.currencyDisplay = 'code';\n result.unitDisplay = 'short';\n continue;\n case 'unit-width-full-name':\n result.currencyDisplay = 'name';\n result.unitDisplay = 'long';\n continue;\n case 'unit-width-iso-code':\n result.currencyDisplay = 'symbol';\n continue;\n case 'scale':\n result.scale = parseFloat(token.options[0]);\n continue;\n case 'rounding-mode-floor':\n result.roundingMode = 'floor';\n continue;\n case 'rounding-mode-ceiling':\n result.roundingMode = 'ceil';\n continue;\n case 'rounding-mode-down':\n result.roundingMode = 'trunc';\n continue;\n case 'rounding-mode-up':\n result.roundingMode = 'expand';\n continue;\n case 'rounding-mode-half-even':\n result.roundingMode = 'halfEven';\n continue;\n case 'rounding-mode-half-down':\n result.roundingMode = 'halfTrunc';\n continue;\n case 'rounding-mode-half-up':\n result.roundingMode = 'halfExpand';\n continue;\n // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width\n case 'integer-width':\n if (token.options.length > 1) {\n throw new RangeError('integer-width stems only accept a single optional option');\n }\n token.options[0].replace(INTEGER_WIDTH_REGEX, function (_, g1, g2, g3, g4, g5) {\n if (g1) {\n result.minimumIntegerDigits = g2.length;\n }\n else if (g3 && g4) {\n throw new Error('We currently do not support maximum integer digits');\n }\n else if (g5) {\n throw new Error('We currently do not support exact integer digits');\n }\n return '';\n });\n continue;\n }\n // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width\n if (CONCISE_INTEGER_WIDTH_REGEX.test(token.stem)) {\n result.minimumIntegerDigits = token.stem.length;\n continue;\n }\n if (FRACTION_PRECISION_REGEX.test(token.stem)) {\n // Precision\n // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#fraction-precision\n // precision-integer case\n if (token.options.length > 1) {\n throw new RangeError('Fraction-precision stems only accept a single optional option');\n }\n token.stem.replace(FRACTION_PRECISION_REGEX, function (_, g1, g2, g3, g4, g5) {\n // .000* case (before ICU67 it was .000+)\n if (g2 === '*') {\n result.minimumFractionDigits = g1.length;\n }\n // .### case\n else if (g3 && g3[0] === '#') {\n result.maximumFractionDigits = g3.length;\n }\n // .00## case\n else if (g4 && g5) {\n result.minimumFractionDigits = g4.length;\n result.maximumFractionDigits = g4.length + g5.length;\n }\n else {\n result.minimumFractionDigits = g1.length;\n result.maximumFractionDigits = g1.length;\n }\n return '';\n });\n var opt = token.options[0];\n // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#trailing-zero-display\n if (opt === 'w') {\n result = __assign(__assign({}, result), { trailingZeroDisplay: 'stripIfInteger' });\n }\n else if (opt) {\n result = __assign(__assign({}, result), parseSignificantPrecision(opt));\n }\n continue;\n }\n // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#significant-digits-precision\n if (SIGNIFICANT_PRECISION_REGEX.test(token.stem)) {\n result = __assign(__assign({}, result), parseSignificantPrecision(token.stem));\n continue;\n }\n var signOpts = parseSign(token.stem);\n if (signOpts) {\n result = __assign(__assign({}, result), signOpts);\n }\n var conciseScientificAndEngineeringOpts = parseConciseScientificAndEngineeringStem(token.stem);\n if (conciseScientificAndEngineeringOpts) {\n result = __assign(__assign({}, result), conciseScientificAndEngineeringOpts);\n }\n }\n return result;\n}\n","// @generated from time-data-gen.ts\n// prettier-ignore \nexport var timeData = {\n \"001\": [\n \"H\",\n \"h\"\n ],\n \"419\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"AC\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"AD\": [\n \"H\",\n \"hB\"\n ],\n \"AE\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"AF\": [\n \"H\",\n \"hb\",\n \"hB\",\n \"h\"\n ],\n \"AG\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"AI\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"AL\": [\n \"h\",\n \"H\",\n \"hB\"\n ],\n \"AM\": [\n \"H\",\n \"hB\"\n ],\n \"AO\": [\n \"H\",\n \"hB\"\n ],\n \"AR\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"AS\": [\n \"h\",\n \"H\"\n ],\n \"AT\": [\n \"H\",\n \"hB\"\n ],\n \"AU\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"AW\": [\n \"H\",\n \"hB\"\n ],\n \"AX\": [\n \"H\"\n ],\n \"AZ\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"BA\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"BB\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"BD\": [\n \"h\",\n \"hB\",\n \"H\"\n ],\n \"BE\": [\n \"H\",\n \"hB\"\n ],\n \"BF\": [\n \"H\",\n \"hB\"\n ],\n \"BG\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"BH\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"BI\": [\n \"H\",\n \"h\"\n ],\n \"BJ\": [\n \"H\",\n \"hB\"\n ],\n \"BL\": [\n \"H\",\n \"hB\"\n ],\n \"BM\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"BN\": [\n \"hb\",\n \"hB\",\n \"h\",\n \"H\"\n ],\n \"BO\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"BQ\": [\n \"H\"\n ],\n \"BR\": [\n \"H\",\n \"hB\"\n ],\n \"BS\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"BT\": [\n \"h\",\n \"H\"\n ],\n \"BW\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"BY\": [\n \"H\",\n \"h\"\n ],\n \"BZ\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"CA\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"CC\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"CD\": [\n \"hB\",\n \"H\"\n ],\n \"CF\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"CG\": [\n \"H\",\n \"hB\"\n ],\n \"CH\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"CI\": [\n \"H\",\n \"hB\"\n ],\n \"CK\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"CL\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"CM\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"CN\": [\n \"H\",\n \"hB\",\n \"hb\",\n \"h\"\n ],\n \"CO\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"CP\": [\n \"H\"\n ],\n \"CR\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"CU\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"CV\": [\n \"H\",\n \"hB\"\n ],\n \"CW\": [\n \"H\",\n \"hB\"\n ],\n \"CX\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"CY\": [\n \"h\",\n \"H\",\n \"hb\",\n \"hB\"\n ],\n \"CZ\": [\n \"H\"\n ],\n \"DE\": [\n \"H\",\n \"hB\"\n ],\n \"DG\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"DJ\": [\n \"h\",\n \"H\"\n ],\n \"DK\": [\n \"H\"\n ],\n \"DM\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"DO\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"DZ\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"EA\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"EC\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"EE\": [\n \"H\",\n \"hB\"\n ],\n \"EG\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"EH\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"ER\": [\n \"h\",\n \"H\"\n ],\n \"ES\": [\n \"H\",\n \"hB\",\n \"h\",\n \"hb\"\n ],\n \"ET\": [\n \"hB\",\n \"hb\",\n \"h\",\n \"H\"\n ],\n \"FI\": [\n \"H\"\n ],\n \"FJ\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"FK\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"FM\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"FO\": [\n \"H\",\n \"h\"\n ],\n \"FR\": [\n \"H\",\n \"hB\"\n ],\n \"GA\": [\n \"H\",\n \"hB\"\n ],\n \"GB\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"GD\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"GE\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"GF\": [\n \"H\",\n \"hB\"\n ],\n \"GG\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"GH\": [\n \"h\",\n \"H\"\n ],\n \"GI\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"GL\": [\n \"H\",\n \"h\"\n ],\n \"GM\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"GN\": [\n \"H\",\n \"hB\"\n ],\n \"GP\": [\n \"H\",\n \"hB\"\n ],\n \"GQ\": [\n \"H\",\n \"hB\",\n \"h\",\n \"hb\"\n ],\n \"GR\": [\n \"h\",\n \"H\",\n \"hb\",\n \"hB\"\n ],\n \"GT\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"GU\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"GW\": [\n \"H\",\n \"hB\"\n ],\n \"GY\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"HK\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"HN\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"HR\": [\n \"H\",\n \"hB\"\n ],\n \"HU\": [\n \"H\",\n \"h\"\n ],\n \"IC\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"ID\": [\n \"H\"\n ],\n \"IE\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"IL\": [\n \"H\",\n \"hB\"\n ],\n \"IM\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"IN\": [\n \"h\",\n \"H\"\n ],\n \"IO\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"IQ\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"IR\": [\n \"hB\",\n \"H\"\n ],\n \"IS\": [\n \"H\"\n ],\n \"IT\": [\n \"H\",\n \"hB\"\n ],\n \"JE\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"JM\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"JO\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"JP\": [\n \"H\",\n \"K\",\n \"h\"\n ],\n \"KE\": [\n \"hB\",\n \"hb\",\n \"H\",\n \"h\"\n ],\n \"KG\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"KH\": [\n \"hB\",\n \"h\",\n \"H\",\n \"hb\"\n ],\n \"KI\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"KM\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"KN\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"KP\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"KR\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"KW\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"KY\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"KZ\": [\n \"H\",\n \"hB\"\n ],\n \"LA\": [\n \"H\",\n \"hb\",\n \"hB\",\n \"h\"\n ],\n \"LB\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"LC\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"LI\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"LK\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"LR\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"LS\": [\n \"h\",\n \"H\"\n ],\n \"LT\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"LU\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"LV\": [\n \"H\",\n \"hB\",\n \"hb\",\n \"h\"\n ],\n \"LY\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"MA\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"MC\": [\n \"H\",\n \"hB\"\n ],\n \"MD\": [\n \"H\",\n \"hB\"\n ],\n \"ME\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"MF\": [\n \"H\",\n \"hB\"\n ],\n \"MG\": [\n \"H\",\n \"h\"\n ],\n \"MH\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"MK\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"ML\": [\n \"H\"\n ],\n \"MM\": [\n \"hB\",\n \"hb\",\n \"H\",\n \"h\"\n ],\n \"MN\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"MO\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"MP\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"MQ\": [\n \"H\",\n \"hB\"\n ],\n \"MR\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"MS\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"MT\": [\n \"H\",\n \"h\"\n ],\n \"MU\": [\n \"H\",\n \"h\"\n ],\n \"MV\": [\n \"H\",\n \"h\"\n ],\n \"MW\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"MX\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"MY\": [\n \"hb\",\n \"hB\",\n \"h\",\n \"H\"\n ],\n \"MZ\": [\n \"H\",\n \"hB\"\n ],\n \"NA\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"NC\": [\n \"H\",\n \"hB\"\n ],\n \"NE\": [\n \"H\"\n ],\n \"NF\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"NG\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"NI\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"NL\": [\n \"H\",\n \"hB\"\n ],\n \"NO\": [\n \"H\",\n \"h\"\n ],\n \"NP\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"NR\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"NU\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"NZ\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"OM\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"PA\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"PE\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"PF\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"PG\": [\n \"h\",\n \"H\"\n ],\n \"PH\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"PK\": [\n \"h\",\n \"hB\",\n \"H\"\n ],\n \"PL\": [\n \"H\",\n \"h\"\n ],\n \"PM\": [\n \"H\",\n \"hB\"\n ],\n \"PN\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"PR\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"PS\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"PT\": [\n \"H\",\n \"hB\"\n ],\n \"PW\": [\n \"h\",\n \"H\"\n ],\n \"PY\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"QA\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"RE\": [\n \"H\",\n \"hB\"\n ],\n \"RO\": [\n \"H\",\n \"hB\"\n ],\n \"RS\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"RU\": [\n \"H\"\n ],\n \"RW\": [\n \"H\",\n \"h\"\n ],\n \"SA\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"SB\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"SC\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"SD\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"SE\": [\n \"H\"\n ],\n \"SG\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"SH\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"SI\": [\n \"H\",\n \"hB\"\n ],\n \"SJ\": [\n \"H\"\n ],\n \"SK\": [\n \"H\"\n ],\n \"SL\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"SM\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"SN\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"SO\": [\n \"h\",\n \"H\"\n ],\n \"SR\": [\n \"H\",\n \"hB\"\n ],\n \"SS\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"ST\": [\n \"H\",\n \"hB\"\n ],\n \"SV\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"SX\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"SY\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"SZ\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"TA\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"TC\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"TD\": [\n \"h\",\n \"H\",\n \"hB\"\n ],\n \"TF\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"TG\": [\n \"H\",\n \"hB\"\n ],\n \"TH\": [\n \"H\",\n \"h\"\n ],\n \"TJ\": [\n \"H\",\n \"h\"\n ],\n \"TL\": [\n \"H\",\n \"hB\",\n \"hb\",\n \"h\"\n ],\n \"TM\": [\n \"H\",\n \"h\"\n ],\n \"TN\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"TO\": [\n \"h\",\n \"H\"\n ],\n \"TR\": [\n \"H\",\n \"hB\"\n ],\n \"TT\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"TW\": [\n \"hB\",\n \"hb\",\n \"h\",\n \"H\"\n ],\n \"TZ\": [\n \"hB\",\n \"hb\",\n \"H\",\n \"h\"\n ],\n \"UA\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"UG\": [\n \"hB\",\n \"hb\",\n \"H\",\n \"h\"\n ],\n \"UM\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"US\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"UY\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"UZ\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"VA\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"VC\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"VE\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"VG\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"VI\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"VN\": [\n \"H\",\n \"h\"\n ],\n \"VU\": [\n \"h\",\n \"H\"\n ],\n \"WF\": [\n \"H\",\n \"hB\"\n ],\n \"WS\": [\n \"h\",\n \"H\"\n ],\n \"XK\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"YE\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"YT\": [\n \"H\",\n \"hB\"\n ],\n \"ZA\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"ZM\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"ZW\": [\n \"H\",\n \"h\"\n ],\n \"af-ZA\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"ar-001\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"ca-ES\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"en-001\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"en-HK\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"en-IL\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"en-MY\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"es-BR\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"es-ES\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"es-GQ\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"fr-CA\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"gl-ES\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"gu-IN\": [\n \"hB\",\n \"hb\",\n \"h\",\n \"H\"\n ],\n \"hi-IN\": [\n \"hB\",\n \"h\",\n \"H\"\n ],\n \"it-CH\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"it-IT\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"kn-IN\": [\n \"hB\",\n \"h\",\n \"H\"\n ],\n \"ml-IN\": [\n \"hB\",\n \"h\",\n \"H\"\n ],\n \"mr-IN\": [\n \"hB\",\n \"hb\",\n \"h\",\n \"H\"\n ],\n \"pa-IN\": [\n \"hB\",\n \"hb\",\n \"h\",\n \"H\"\n ],\n \"ta-IN\": [\n \"hB\",\n \"h\",\n \"hb\",\n \"H\"\n ],\n \"te-IN\": [\n \"hB\",\n \"h\",\n \"H\"\n ],\n \"zu-ZA\": [\n \"H\",\n \"hB\",\n \"hb\",\n \"h\"\n ]\n};\n","var _a;\nimport { __assign } from \"tslib\";\nimport { ErrorKind } from './error';\nimport { SKELETON_TYPE, TYPE, } from './types';\nimport { SPACE_SEPARATOR_REGEX } from './regex.generated';\nimport { parseNumberSkeleton, parseNumberSkeletonFromString, parseDateTimeSkeleton, } from '@formatjs/icu-skeleton-parser';\nimport { getBestPattern } from './date-time-pattern-generator';\nvar SPACE_SEPARATOR_START_REGEX = new RegExp(\"^\".concat(SPACE_SEPARATOR_REGEX.source, \"*\"));\nvar SPACE_SEPARATOR_END_REGEX = new RegExp(\"\".concat(SPACE_SEPARATOR_REGEX.source, \"*$\"));\nfunction createLocation(start, end) {\n return { start: start, end: end };\n}\n// #region Ponyfills\n// Consolidate these variables up top for easier toggling during debugging\nvar hasNativeStartsWith = !!String.prototype.startsWith && '_a'.startsWith('a', 1);\nvar hasNativeFromCodePoint = !!String.fromCodePoint;\nvar hasNativeFromEntries = !!Object.fromEntries;\nvar hasNativeCodePointAt = !!String.prototype.codePointAt;\nvar hasTrimStart = !!String.prototype.trimStart;\nvar hasTrimEnd = !!String.prototype.trimEnd;\nvar hasNativeIsSafeInteger = !!Number.isSafeInteger;\nvar isSafeInteger = hasNativeIsSafeInteger\n ? Number.isSafeInteger\n : function (n) {\n return (typeof n === 'number' &&\n isFinite(n) &&\n Math.floor(n) === n &&\n Math.abs(n) <= 0x1fffffffffffff);\n };\n// IE11 does not support y and u.\nvar REGEX_SUPPORTS_U_AND_Y = true;\ntry {\n var re = RE('([^\\\\p{White_Space}\\\\p{Pattern_Syntax}]*)', 'yu');\n /**\n * legacy Edge or Xbox One browser\n * Unicode flag support: supported\n * Pattern_Syntax support: not supported\n * See https://github.com/formatjs/formatjs/issues/2822\n */\n REGEX_SUPPORTS_U_AND_Y = ((_a = re.exec('a')) === null || _a === void 0 ? void 0 : _a[0]) === 'a';\n}\ncatch (_) {\n REGEX_SUPPORTS_U_AND_Y = false;\n}\nvar startsWith = hasNativeStartsWith\n ? // Native\n function startsWith(s, search, position) {\n return s.startsWith(search, position);\n }\n : // For IE11\n function startsWith(s, search, position) {\n return s.slice(position, position + search.length) === search;\n };\nvar fromCodePoint = hasNativeFromCodePoint\n ? String.fromCodePoint\n : // IE11\n function fromCodePoint() {\n var codePoints = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n codePoints[_i] = arguments[_i];\n }\n var elements = '';\n var length = codePoints.length;\n var i = 0;\n var code;\n while (length > i) {\n code = codePoints[i++];\n if (code > 0x10ffff)\n throw RangeError(code + ' is not a valid code point');\n elements +=\n code < 0x10000\n ? String.fromCharCode(code)\n : String.fromCharCode(((code -= 0x10000) >> 10) + 0xd800, (code % 0x400) + 0xdc00);\n }\n return elements;\n };\nvar fromEntries = \n// native\nhasNativeFromEntries\n ? Object.fromEntries\n : // Ponyfill\n function fromEntries(entries) {\n var obj = {};\n for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {\n var _a = entries_1[_i], k = _a[0], v = _a[1];\n obj[k] = v;\n }\n return obj;\n };\nvar codePointAt = hasNativeCodePointAt\n ? // Native\n function codePointAt(s, index) {\n return s.codePointAt(index);\n }\n : // IE 11\n function codePointAt(s, index) {\n var size = s.length;\n if (index < 0 || index >= size) {\n return undefined;\n }\n var first = s.charCodeAt(index);\n var second;\n return first < 0xd800 ||\n first > 0xdbff ||\n index + 1 === size ||\n (second = s.charCodeAt(index + 1)) < 0xdc00 ||\n second > 0xdfff\n ? first\n : ((first - 0xd800) << 10) + (second - 0xdc00) + 0x10000;\n };\nvar trimStart = hasTrimStart\n ? // Native\n function trimStart(s) {\n return s.trimStart();\n }\n : // Ponyfill\n function trimStart(s) {\n return s.replace(SPACE_SEPARATOR_START_REGEX, '');\n };\nvar trimEnd = hasTrimEnd\n ? // Native\n function trimEnd(s) {\n return s.trimEnd();\n }\n : // Ponyfill\n function trimEnd(s) {\n return s.replace(SPACE_SEPARATOR_END_REGEX, '');\n };\n// Prevent minifier to translate new RegExp to literal form that might cause syntax error on IE11.\nfunction RE(s, flag) {\n return new RegExp(s, flag);\n}\n// #endregion\nvar matchIdentifierAtIndex;\nif (REGEX_SUPPORTS_U_AND_Y) {\n // Native\n var IDENTIFIER_PREFIX_RE_1 = RE('([^\\\\p{White_Space}\\\\p{Pattern_Syntax}]*)', 'yu');\n matchIdentifierAtIndex = function matchIdentifierAtIndex(s, index) {\n var _a;\n IDENTIFIER_PREFIX_RE_1.lastIndex = index;\n var match = IDENTIFIER_PREFIX_RE_1.exec(s);\n return (_a = match[1]) !== null && _a !== void 0 ? _a : '';\n };\n}\nelse {\n // IE11\n matchIdentifierAtIndex = function matchIdentifierAtIndex(s, index) {\n var match = [];\n while (true) {\n var c = codePointAt(s, index);\n if (c === undefined || _isWhiteSpace(c) || _isPatternSyntax(c)) {\n break;\n }\n match.push(c);\n index += c >= 0x10000 ? 2 : 1;\n }\n return fromCodePoint.apply(void 0, match);\n };\n}\nvar Parser = /** @class */ (function () {\n function Parser(message, options) {\n if (options === void 0) { options = {}; }\n this.message = message;\n this.position = { offset: 0, line: 1, column: 1 };\n this.ignoreTag = !!options.ignoreTag;\n this.locale = options.locale;\n this.requiresOtherClause = !!options.requiresOtherClause;\n this.shouldParseSkeletons = !!options.shouldParseSkeletons;\n }\n Parser.prototype.parse = function () {\n if (this.offset() !== 0) {\n throw Error('parser can only be used once');\n }\n return this.parseMessage(0, '', false);\n };\n Parser.prototype.parseMessage = function (nestingLevel, parentArgType, expectingCloseTag) {\n var elements = [];\n while (!this.isEOF()) {\n var char = this.char();\n if (char === 123 /* `{` */) {\n var result = this.parseArgument(nestingLevel, expectingCloseTag);\n if (result.err) {\n return result;\n }\n elements.push(result.val);\n }\n else if (char === 125 /* `}` */ && nestingLevel > 0) {\n break;\n }\n else if (char === 35 /* `#` */ &&\n (parentArgType === 'plural' || parentArgType === 'selectordinal')) {\n var position = this.clonePosition();\n this.bump();\n elements.push({\n type: TYPE.pound,\n location: createLocation(position, this.clonePosition()),\n });\n }\n else if (char === 60 /* `<` */ &&\n !this.ignoreTag &&\n this.peek() === 47 // char code for '/'\n ) {\n if (expectingCloseTag) {\n break;\n }\n else {\n return this.error(ErrorKind.UNMATCHED_CLOSING_TAG, createLocation(this.clonePosition(), this.clonePosition()));\n }\n }\n else if (char === 60 /* `<` */ &&\n !this.ignoreTag &&\n _isAlpha(this.peek() || 0)) {\n var result = this.parseTag(nestingLevel, parentArgType);\n if (result.err) {\n return result;\n }\n elements.push(result.val);\n }\n else {\n var result = this.parseLiteral(nestingLevel, parentArgType);\n if (result.err) {\n return result;\n }\n elements.push(result.val);\n }\n }\n return { val: elements, err: null };\n };\n /**\n * A tag name must start with an ASCII lower/upper case letter. The grammar is based on the\n * [custom element name][] except that a dash is NOT always mandatory and uppercase letters\n * are accepted:\n *\n * ```\n * tag ::= \"<\" tagName (whitespace)* \"/>\" | \"<\" tagName (whitespace)* \">\" message \"</\" tagName (whitespace)* \">\"\n * tagName ::= [a-z] (PENChar)*\n * PENChar ::=\n * \"-\" | \".\" | [0-9] | \"_\" | [a-z] | [A-Z] | #xB7 | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x37D] |\n * [#x37F-#x1FFF] | [#x200C-#x200D] | [#x203F-#x2040] | [#x2070-#x218F] | [#x2C00-#x2FEF] |\n * [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]\n * ```\n *\n * [custom element name]: https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name\n * NOTE: We're a bit more lax here since HTML technically does not allow uppercase HTML element but we do\n * since other tag-based engines like React allow it\n */\n Parser.prototype.parseTag = function (nestingLevel, parentArgType) {\n var startPosition = this.clonePosition();\n this.bump(); // `<`\n var tagName = this.parseTagName();\n this.bumpSpace();\n if (this.bumpIf('/>')) {\n // Self closing tag\n return {\n val: {\n type: TYPE.literal,\n value: \"<\".concat(tagName, \"/>\"),\n location: createLocation(startPosition, this.clonePosition()),\n },\n err: null,\n };\n }\n else if (this.bumpIf('>')) {\n var childrenResult = this.parseMessage(nestingLevel + 1, parentArgType, true);\n if (childrenResult.err) {\n return childrenResult;\n }\n var children = childrenResult.val;\n // Expecting a close tag\n var endTagStartPosition = this.clonePosition();\n if (this.bumpIf('</')) {\n if (this.isEOF() || !_isAlpha(this.char())) {\n return this.error(ErrorKind.INVALID_TAG, createLocation(endTagStartPosition, this.clonePosition()));\n }\n var closingTagNameStartPosition = this.clonePosition();\n var closingTagName = this.parseTagName();\n if (tagName !== closingTagName) {\n return this.error(ErrorKind.UNMATCHED_CLOSING_TAG, createLocation(closingTagNameStartPosition, this.clonePosition()));\n }\n this.bumpSpace();\n if (!this.bumpIf('>')) {\n return this.error(ErrorKind.INVALID_TAG, createLocation(endTagStartPosition, this.clonePosition()));\n }\n return {\n val: {\n type: TYPE.tag,\n value: tagName,\n children: children,\n location: createLocation(startPosition, this.clonePosition()),\n },\n err: null,\n };\n }\n else {\n return this.error(ErrorKind.UNCLOSED_TAG, createLocation(startPosition, this.clonePosition()));\n }\n }\n else {\n return this.error(ErrorKind.INVALID_TAG, createLocation(startPosition, this.clonePosition()));\n }\n };\n /**\n * This method assumes that the caller has peeked ahead for the first tag character.\n */\n Parser.prototype.parseTagName = function () {\n var startOffset = this.offset();\n this.bump(); // the first tag name character\n while (!this.isEOF() && _isPotentialElementNameChar(this.char())) {\n this.bump();\n }\n return this.message.slice(startOffset, this.offset());\n };\n Parser.prototype.parseLiteral = function (nestingLevel, parentArgType) {\n var start = this.clonePosition();\n var value = '';\n while (true) {\n var parseQuoteResult = this.tryParseQuote(parentArgType);\n if (parseQuoteResult) {\n value += parseQuoteResult;\n continue;\n }\n var parseUnquotedResult = this.tryParseUnquoted(nestingLevel, parentArgType);\n if (parseUnquotedResult) {\n value += parseUnquotedResult;\n continue;\n }\n var parseLeftAngleResult = this.tryParseLeftAngleBracket();\n if (parseLeftAngleResult) {\n value += parseLeftAngleResult;\n continue;\n }\n break;\n }\n var location = createLocation(start, this.clonePosition());\n return {\n val: { type: TYPE.literal, value: value, location: location },\n err: null,\n };\n };\n Parser.prototype.tryParseLeftAngleBracket = function () {\n if (!this.isEOF() &&\n this.char() === 60 /* `<` */ &&\n (this.ignoreTag ||\n // If at the opening tag or closing tag position, bail.\n !_isAlphaOrSlash(this.peek() || 0))) {\n this.bump(); // `<`\n return '<';\n }\n return null;\n };\n /**\n * Starting with ICU 4.8, an ASCII apostrophe only starts quoted text if it immediately precedes\n * a character that requires quoting (that is, \"only where needed\"), and works the same in\n * nested messages as on the top level of the pattern. The new behavior is otherwise compatible.\n */\n Parser.prototype.tryParseQuote = function (parentArgType) {\n if (this.isEOF() || this.char() !== 39 /* `'` */) {\n return null;\n }\n // Parse escaped char following the apostrophe, or early return if there is no escaped char.\n // Check if is valid escaped character\n switch (this.peek()) {\n case 39 /* `'` */:\n // double quote, should return as a single quote.\n this.bump();\n this.bump();\n return \"'\";\n // '{', '<', '>', '}'\n case 123:\n case 60:\n case 62:\n case 125:\n break;\n case 35: // '#'\n if (parentArgType === 'plural' || parentArgType === 'selectordinal') {\n break;\n }\n return null;\n default:\n return null;\n }\n this.bump(); // apostrophe\n var codePoints = [this.char()]; // escaped char\n this.bump();\n // read chars until the optional closing apostrophe is found\n while (!this.isEOF()) {\n var ch = this.char();\n if (ch === 39 /* `'` */) {\n if (this.peek() === 39 /* `'` */) {\n codePoints.push(39);\n // Bump one more time because we need to skip 2 characters.\n this.bump();\n }\n else {\n // Optional closing apostrophe.\n this.bump();\n break;\n }\n }\n else {\n codePoints.push(ch);\n }\n this.bump();\n }\n return fromCodePoint.apply(void 0, codePoints);\n };\n Parser.prototype.tryParseUnquoted = function (nestingLevel, parentArgType) {\n if (this.isEOF()) {\n return null;\n }\n var ch = this.char();\n if (ch === 60 /* `<` */ ||\n ch === 123 /* `{` */ ||\n (ch === 35 /* `#` */ &&\n (parentArgType === 'plural' || parentArgType === 'selectordinal')) ||\n (ch === 125 /* `}` */ && nestingLevel > 0)) {\n return null;\n }\n else {\n this.bump();\n return fromCodePoint(ch);\n }\n };\n Parser.prototype.parseArgument = function (nestingLevel, expectingCloseTag) {\n var openingBracePosition = this.clonePosition();\n this.bump(); // `{`\n this.bumpSpace();\n if (this.isEOF()) {\n return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));\n }\n if (this.char() === 125 /* `}` */) {\n this.bump();\n return this.error(ErrorKind.EMPTY_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));\n }\n // argument name\n var value = this.parseIdentifierIfPossible().value;\n if (!value) {\n return this.error(ErrorKind.MALFORMED_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));\n }\n this.bumpSpace();\n if (this.isEOF()) {\n return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));\n }\n switch (this.char()) {\n // Simple argument: `{name}`\n case 125 /* `}` */: {\n this.bump(); // `}`\n return {\n val: {\n type: TYPE.argument,\n // value does not include the opening and closing braces.\n value: value,\n location: createLocation(openingBracePosition, this.clonePosition()),\n },\n err: null,\n };\n }\n // Argument with options: `{name, format, ...}`\n case 44 /* `,` */: {\n this.bump(); // `,`\n this.bumpSpace();\n if (this.isEOF()) {\n return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));\n }\n return this.parseArgumentOptions(nestingLevel, expectingCloseTag, value, openingBracePosition);\n }\n default:\n return this.error(ErrorKind.MALFORMED_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));\n }\n };\n /**\n * Advance the parser until the end of the identifier, if it is currently on\n * an identifier character. Return an empty string otherwise.\n */\n Parser.prototype.parseIdentifierIfPossible = function () {\n var startingPosition = this.clonePosition();\n var startOffset = this.offset();\n var value = matchIdentifierAtIndex(this.message, startOffset);\n var endOffset = startOffset + value.length;\n this.bumpTo(endOffset);\n var endPosition = this.clonePosition();\n var location = createLocation(startingPosition, endPosition);\n return { value: value, location: location };\n };\n Parser.prototype.parseArgumentOptions = function (nestingLevel, expectingCloseTag, value, openingBracePosition) {\n var _a;\n // Parse this range:\n // {name, type, style}\n // ^---^\n var typeStartPosition = this.clonePosition();\n var argType = this.parseIdentifierIfPossible().value;\n var typeEndPosition = this.clonePosition();\n switch (argType) {\n case '':\n // Expecting a style string number, date, time, plural, selectordinal, or select.\n return this.error(ErrorKind.EXPECT_ARGUMENT_TYPE, createLocation(typeStartPosition, typeEndPosition));\n case 'number':\n case 'date':\n case 'time': {\n // Parse this range:\n // {name, number, style}\n // ^-------^\n this.bumpSpace();\n var styleAndLocation = null;\n if (this.bumpIf(',')) {\n this.bumpSpace();\n var styleStartPosition = this.clonePosition();\n var result = this.parseSimpleArgStyleIfPossible();\n if (result.err) {\n return result;\n }\n var style = trimEnd(result.val);\n if (style.length === 0) {\n return this.error(ErrorKind.EXPECT_ARGUMENT_STYLE, createLocation(this.clonePosition(), this.clonePosition()));\n }\n var styleLocation = createLocation(styleStartPosition, this.clonePosition());\n styleAndLocation = { style: style, styleLocation: styleLocation };\n }\n var argCloseResult = this.tryParseArgumentClose(openingBracePosition);\n if (argCloseResult.err) {\n return argCloseResult;\n }\n var location_1 = createLocation(openingBracePosition, this.clonePosition());\n // Extract style or skeleton\n if (styleAndLocation && startsWith(styleAndLocation === null || styleAndLocation === void 0 ? void 0 : styleAndLocation.style, '::', 0)) {\n // Skeleton starts with `::`.\n var skeleton = trimStart(styleAndLocation.style.slice(2));\n if (argType === 'number') {\n var result = this.parseNumberSkeletonFromString(skeleton, styleAndLocation.styleLocation);\n if (result.err) {\n return result;\n }\n return {\n val: { type: TYPE.number, value: value, location: location_1, style: result.val },\n err: null,\n };\n }\n else {\n if (skeleton.length === 0) {\n return this.error(ErrorKind.EXPECT_DATE_TIME_SKELETON, location_1);\n }\n var dateTimePattern = skeleton;\n // Get \"best match\" pattern only if locale is passed, if not, let it\n // pass as-is where `parseDateTimeSkeleton()` will throw an error\n // for unsupported patterns.\n if (this.locale) {\n dateTimePattern = getBestPattern(skeleton, this.locale);\n }\n var style = {\n type: SKELETON_TYPE.dateTime,\n pattern: dateTimePattern,\n location: styleAndLocation.styleLocation,\n parsedOptions: this.shouldParseSkeletons\n ? parseDateTimeSkeleton(dateTimePattern)\n : {},\n };\n var type = argType === 'date' ? TYPE.date : TYPE.time;\n return {\n val: { type: type, value: value, location: location_1, style: style },\n err: null,\n };\n }\n }\n // Regular style or no style.\n return {\n val: {\n type: argType === 'number'\n ? TYPE.number\n : argType === 'date'\n ? TYPE.date\n : TYPE.time,\n value: value,\n location: location_1,\n style: (_a = styleAndLocation === null || styleAndLocation === void 0 ? void 0 : styleAndLocation.style) !== null && _a !== void 0 ? _a : null,\n },\n err: null,\n };\n }\n case 'plural':\n case 'selectordinal':\n case 'select': {\n // Parse this range:\n // {name, plural, options}\n // ^---------^\n var typeEndPosition_1 = this.clonePosition();\n this.bumpSpace();\n if (!this.bumpIf(',')) {\n return this.error(ErrorKind.EXPECT_SELECT_ARGUMENT_OPTIONS, createLocation(typeEndPosition_1, __assign({}, typeEndPosition_1)));\n }\n this.bumpSpace();\n // Parse offset:\n // {name, plural, offset:1, options}\n // ^-----^\n //\n // or the first option:\n //\n // {name, plural, one {...} other {...}}\n // ^--^\n var identifierAndLocation = this.parseIdentifierIfPossible();\n var pluralOffset = 0;\n if (argType !== 'select' && identifierAndLocation.value === 'offset') {\n if (!this.bumpIf(':')) {\n return this.error(ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, createLocation(this.clonePosition(), this.clonePosition()));\n }\n this.bumpSpace();\n var result = this.tryParseDecimalInteger(ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, ErrorKind.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);\n if (result.err) {\n return result;\n }\n // Parse another identifier for option parsing\n this.bumpSpace();\n identifierAndLocation = this.parseIdentifierIfPossible();\n pluralOffset = result.val;\n }\n var optionsResult = this.tryParsePluralOrSelectOptions(nestingLevel, argType, expectingCloseTag, identifierAndLocation);\n if (optionsResult.err) {\n return optionsResult;\n }\n var argCloseResult = this.tryParseArgumentClose(openingBracePosition);\n if (argCloseResult.err) {\n return argCloseResult;\n }\n var location_2 = createLocation(openingBracePosition, this.clonePosition());\n if (argType === 'select') {\n return {\n val: {\n type: TYPE.select,\n value: value,\n options: fromEntries(optionsResult.val),\n location: location_2,\n },\n err: null,\n };\n }\n else {\n return {\n val: {\n type: TYPE.plural,\n value: value,\n options: fromEntries(optionsResult.val),\n offset: pluralOffset,\n pluralType: argType === 'plural' ? 'cardinal' : 'ordinal',\n location: location_2,\n },\n err: null,\n };\n }\n }\n default:\n return this.error(ErrorKind.INVALID_ARGUMENT_TYPE, createLocation(typeStartPosition, typeEndPosition));\n }\n };\n Parser.prototype.tryParseArgumentClose = function (openingBracePosition) {\n // Parse: {value, number, ::currency/GBP }\n //\n if (this.isEOF() || this.char() !== 125 /* `}` */) {\n return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));\n }\n this.bump(); // `}`\n return { val: true, err: null };\n };\n /**\n * See: https://github.com/unicode-org/icu/blob/af7ed1f6d2298013dc303628438ec4abe1f16479/icu4c/source/common/messagepattern.cpp#L659\n */\n Parser.prototype.parseSimpleArgStyleIfPossible = function () {\n var nestedBraces = 0;\n var startPosition = this.clonePosition();\n while (!this.isEOF()) {\n var ch = this.char();\n switch (ch) {\n case 39 /* `'` */: {\n // Treat apostrophe as quoting but include it in the style part.\n // Find the end of the quoted literal text.\n this.bump();\n var apostrophePosition = this.clonePosition();\n if (!this.bumpUntil(\"'\")) {\n return this.error(ErrorKind.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE, createLocation(apostrophePosition, this.clonePosition()));\n }\n this.bump();\n break;\n }\n case 123 /* `{` */: {\n nestedBraces += 1;\n this.bump();\n break;\n }\n case 125 /* `}` */: {\n if (nestedBraces > 0) {\n nestedBraces -= 1;\n }\n else {\n return {\n val: this.message.slice(startPosition.offset, this.offset()),\n err: null,\n };\n }\n break;\n }\n default:\n this.bump();\n break;\n }\n }\n return {\n val: this.message.slice(startPosition.offset, this.offset()),\n err: null,\n };\n };\n Parser.prototype.parseNumberSkeletonFromString = function (skeleton, location) {\n var tokens = [];\n try {\n tokens = parseNumberSkeletonFromString(skeleton);\n }\n catch (e) {\n return this.error(ErrorKind.INVALID_NUMBER_SKELETON, location);\n }\n return {\n val: {\n type: SKELETON_TYPE.number,\n tokens: tokens,\n location: location,\n parsedOptions: this.shouldParseSkeletons\n ? parseNumberSkeleton(tokens)\n : {},\n },\n err: null,\n };\n };\n /**\n * @param nesting_level The current nesting level of messages.\n * This can be positive when parsing message fragment in select or plural argument options.\n * @param parent_arg_type The parent argument's type.\n * @param parsed_first_identifier If provided, this is the first identifier-like selector of\n * the argument. It is a by-product of a previous parsing attempt.\n * @param expecting_close_tag If true, this message is directly or indirectly nested inside\n * between a pair of opening and closing tags. The nested message will not parse beyond\n * the closing tag boundary.\n */\n Parser.prototype.tryParsePluralOrSelectOptions = function (nestingLevel, parentArgType, expectCloseTag, parsedFirstIdentifier) {\n var _a;\n var hasOtherClause = false;\n var options = [];\n var parsedSelectors = new Set();\n var selector = parsedFirstIdentifier.value, selectorLocation = parsedFirstIdentifier.location;\n // Parse:\n // one {one apple}\n // ^--^\n while (true) {\n if (selector.length === 0) {\n var startPosition = this.clonePosition();\n if (parentArgType !== 'select' && this.bumpIf('=')) {\n // Try parse `={number}` selector\n var result = this.tryParseDecimalInteger(ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, ErrorKind.INVALID_PLURAL_ARGUMENT_SELECTOR);\n if (result.err) {\n return result;\n }\n selectorLocation = createLocation(startPosition, this.clonePosition());\n selector = this.message.slice(startPosition.offset, this.offset());\n }\n else {\n break;\n }\n }\n // Duplicate selector clauses\n if (parsedSelectors.has(selector)) {\n return this.error(parentArgType === 'select'\n ? ErrorKind.DUPLICATE_SELECT_ARGUMENT_SELECTOR\n : ErrorKind.DUPLICATE_PLURAL_ARGUMENT_SELECTOR, selectorLocation);\n }\n if (selector === 'other') {\n hasOtherClause = true;\n }\n // Parse:\n // one {one apple}\n // ^----------^\n this.bumpSpace();\n var openingBracePosition = this.clonePosition();\n if (!this.bumpIf('{')) {\n return this.error(parentArgType === 'select'\n ? ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT\n : ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, createLocation(this.clonePosition(), this.clonePosition()));\n }\n var fragmentResult = this.parseMessage(nestingLevel + 1, parentArgType, expectCloseTag);\n if (fragmentResult.err) {\n return fragmentResult;\n }\n var argCloseResult = this.tryParseArgumentClose(openingBracePosition);\n if (argCloseResult.err) {\n return argCloseResult;\n }\n options.push([\n selector,\n {\n value: fragmentResult.val,\n location: createLocation(openingBracePosition, this.clonePosition()),\n },\n ]);\n // Keep track of the existing selectors\n parsedSelectors.add(selector);\n // Prep next selector clause.\n this.bumpSpace();\n (_a = this.parseIdentifierIfPossible(), selector = _a.value, selectorLocation = _a.location);\n }\n if (options.length === 0) {\n return this.error(parentArgType === 'select'\n ? ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR\n : ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, createLocation(this.clonePosition(), this.clonePosition()));\n }\n if (this.requiresOtherClause && !hasOtherClause) {\n return this.error(ErrorKind.MISSING_OTHER_CLAUSE, createLocation(this.clonePosition(), this.clonePosition()));\n }\n return { val: options, err: null };\n };\n Parser.prototype.tryParseDecimalInteger = function (expectNumberError, invalidNumberError) {\n var sign = 1;\n var startingPosition = this.clonePosition();\n if (this.bumpIf('+')) {\n }\n else if (this.bumpIf('-')) {\n sign = -1;\n }\n var hasDigits = false;\n var decimal = 0;\n while (!this.isEOF()) {\n var ch = this.char();\n if (ch >= 48 /* `0` */ && ch <= 57 /* `9` */) {\n hasDigits = true;\n decimal = decimal * 10 + (ch - 48);\n this.bump();\n }\n else {\n break;\n }\n }\n var location = createLocation(startingPosition, this.clonePosition());\n if (!hasDigits) {\n return this.error(expectNumberError, location);\n }\n decimal *= sign;\n if (!isSafeInteger(decimal)) {\n return this.error(invalidNumberError, location);\n }\n return { val: decimal, err: null };\n };\n Parser.prototype.offset = function () {\n return this.position.offset;\n };\n Parser.prototype.isEOF = function () {\n return this.offset() === this.message.length;\n };\n Parser.prototype.clonePosition = function () {\n // This is much faster than `Object.assign` or spread.\n return {\n offset: this.position.offset,\n line: this.position.line,\n column: this.position.column,\n };\n };\n /**\n * Return the code point at the current position of the parser.\n * Throws if the index is out of bound.\n */\n Parser.prototype.char = function () {\n var offset = this.position.offset;\n if (offset >= this.message.length) {\n throw Error('out of bound');\n }\n var code = codePointAt(this.message, offset);\n if (code === undefined) {\n throw Error(\"Offset \".concat(offset, \" is at invalid UTF-16 code unit boundary\"));\n }\n return code;\n };\n Parser.prototype.error = function (kind, location) {\n return {\n val: null,\n err: {\n kind: kind,\n message: this.message,\n location: location,\n },\n };\n };\n /** Bump the parser to the next UTF-16 code unit. */\n Parser.prototype.bump = function () {\n if (this.isEOF()) {\n return;\n }\n var code = this.char();\n if (code === 10 /* '\\n' */) {\n this.position.line += 1;\n this.position.column = 1;\n this.position.offset += 1;\n }\n else {\n this.position.column += 1;\n // 0 ~ 0x10000 -> unicode BMP, otherwise skip the surrogate pair.\n this.position.offset += code < 0x10000 ? 1 : 2;\n }\n };\n /**\n * If the substring starting at the current position of the parser has\n * the given prefix, then bump the parser to the character immediately\n * following the prefix and return true. Otherwise, don't bump the parser\n * and return false.\n */\n Parser.prototype.bumpIf = function (prefix) {\n if (startsWith(this.message, prefix, this.offset())) {\n for (var i = 0; i < prefix.length; i++) {\n this.bump();\n }\n return true;\n }\n return false;\n };\n /**\n * Bump the parser until the pattern character is found and return `true`.\n * Otherwise bump to the end of the file and return `false`.\n */\n Parser.prototype.bumpUntil = function (pattern) {\n var currentOffset = this.offset();\n var index = this.message.indexOf(pattern, currentOffset);\n if (index >= 0) {\n this.bumpTo(index);\n return true;\n }\n else {\n this.bumpTo(this.message.length);\n return false;\n }\n };\n /**\n * Bump the parser to the target offset.\n * If target offset is beyond the end of the input, bump the parser to the end of the input.\n */\n Parser.prototype.bumpTo = function (targetOffset) {\n if (this.offset() > targetOffset) {\n throw Error(\"targetOffset \".concat(targetOffset, \" must be greater than or equal to the current offset \").concat(this.offset()));\n }\n targetOffset = Math.min(targetOffset, this.message.length);\n while (true) {\n var offset = this.offset();\n if (offset === targetOffset) {\n break;\n }\n if (offset > targetOffset) {\n throw Error(\"targetOffset \".concat(targetOffset, \" is at invalid UTF-16 code unit boundary\"));\n }\n this.bump();\n if (this.isEOF()) {\n break;\n }\n }\n };\n /** advance the parser through all whitespace to the next non-whitespace code unit. */\n Parser.prototype.bumpSpace = function () {\n while (!this.isEOF() && _isWhiteSpace(this.char())) {\n this.bump();\n }\n };\n /**\n * Peek at the *next* Unicode codepoint in the input without advancing the parser.\n * If the input has been exhausted, then this returns null.\n */\n Parser.prototype.peek = function () {\n if (this.isEOF()) {\n return null;\n }\n var code = this.char();\n var offset = this.offset();\n var nextCode = this.message.charCodeAt(offset + (code >= 0x10000 ? 2 : 1));\n return nextCode !== null && nextCode !== void 0 ? nextCode : null;\n };\n return Parser;\n}());\nexport { Parser };\n/**\n * This check if codepoint is alphabet (lower & uppercase)\n * @param codepoint\n * @returns\n */\nfunction _isAlpha(codepoint) {\n return ((codepoint >= 97 && codepoint <= 122) ||\n (codepoint >= 65 && codepoint <= 90));\n}\nfunction _isAlphaOrSlash(codepoint) {\n return _isAlpha(codepoint) || codepoint === 47; /* '/' */\n}\n/** See `parseTag` function docs. */\nfunction _isPotentialElementNameChar(c) {\n return (c === 45 /* '-' */ ||\n c === 46 /* '.' */ ||\n (c >= 48 && c <= 57) /* 0..9 */ ||\n c === 95 /* '_' */ ||\n (c >= 97 && c <= 122) /** a..z */ ||\n (c >= 65 && c <= 90) /* A..Z */ ||\n c == 0xb7 ||\n (c >= 0xc0 && c <= 0xd6) ||\n (c >= 0xd8 && c <= 0xf6) ||\n (c >= 0xf8 && c <= 0x37d) ||\n (c >= 0x37f && c <= 0x1fff) ||\n (c >= 0x200c && c <= 0x200d) ||\n (c >= 0x203f && c <= 0x2040) ||\n (c >= 0x2070 && c <= 0x218f) ||\n (c >= 0x2c00 && c <= 0x2fef) ||\n (c >= 0x3001 && c <= 0xd7ff) ||\n (c >= 0xf900 && c <= 0xfdcf) ||\n (c >= 0xfdf0 && c <= 0xfffd) ||\n (c >= 0x10000 && c <= 0xeffff));\n}\n/**\n * Code point equivalent of regex `\\p{White_Space}`.\n * From: https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt\n */\nfunction _isWhiteSpace(c) {\n return ((c >= 0x0009 && c <= 0x000d) ||\n c === 0x0020 ||\n c === 0x0085 ||\n (c >= 0x200e && c <= 0x200f) ||\n c === 0x2028 ||\n c === 0x2029);\n}\n/**\n * Code point equivalent of regex `\\p{Pattern_Syntax}`.\n * See https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt\n */\nfunction _isPatternSyntax(c) {\n return ((c >= 0x0021 && c <= 0x0023) ||\n c === 0x0024 ||\n (c >= 0x0025 && c <= 0x0027) ||\n c === 0x0028 ||\n c === 0x0029 ||\n c === 0x002a ||\n c === 0x002b ||\n c === 0x002c ||\n c === 0x002d ||\n (c >= 0x002e && c <= 0x002f) ||\n (c >= 0x003a && c <= 0x003b) ||\n (c >= 0x003c && c <= 0x003e) ||\n (c >= 0x003f && c <= 0x0040) ||\n c === 0x005b ||\n c === 0x005c ||\n c === 0x005d ||\n c === 0x005e ||\n c === 0x0060 ||\n c === 0x007b ||\n c === 0x007c ||\n c === 0x007d ||\n c === 0x007e ||\n c === 0x00a1 ||\n (c >= 0x00a2 && c <= 0x00a5) ||\n c === 0x00a6 ||\n c === 0x00a7 ||\n c === 0x00a9 ||\n c === 0x00ab ||\n c === 0x00ac ||\n c === 0x00ae ||\n c === 0x00b0 ||\n c === 0x00b1 ||\n c === 0x00b6 ||\n c === 0x00bb ||\n c === 0x00bf ||\n c === 0x00d7 ||\n c === 0x00f7 ||\n (c >= 0x2010 && c <= 0x2015) ||\n (c >= 0x2016 && c <= 0x2017) ||\n c === 0x2018 ||\n c === 0x2019 ||\n c === 0x201a ||\n (c >= 0x201b && c <= 0x201c) ||\n c === 0x201d ||\n c === 0x201e ||\n c === 0x201f ||\n (c >= 0x2020 && c <= 0x2027) ||\n (c >= 0x2030 && c <= 0x2038) ||\n c === 0x2039 ||\n c === 0x203a ||\n (c >= 0x203b && c <= 0x203e) ||\n (c >= 0x2041 && c <= 0x2043) ||\n c === 0x2044 ||\n c === 0x2045 ||\n c === 0x2046 ||\n (c >= 0x2047 && c <= 0x2051) ||\n c === 0x2052 ||\n c === 0x2053 ||\n (c >= 0x2055 && c <= 0x205e) ||\n (c >= 0x2190 && c <= 0x2194) ||\n (c >= 0x2195 && c <= 0x2199) ||\n (c >= 0x219a && c <= 0x219b) ||\n (c >= 0x219c && c <= 0x219f) ||\n c === 0x21a0 ||\n (c >= 0x21a1 && c <= 0x21a2) ||\n c === 0x21a3 ||\n (c >= 0x21a4 && c <= 0x21a5) ||\n c === 0x21a6 ||\n (c >= 0x21a7 && c <= 0x21ad) ||\n c === 0x21ae ||\n (c >= 0x21af && c <= 0x21cd) ||\n (c >= 0x21ce && c <= 0x21cf) ||\n (c >= 0x21d0 && c <= 0x21d1) ||\n c === 0x21d2 ||\n c === 0x21d3 ||\n c === 0x21d4 ||\n (c >= 0x21d5 && c <= 0x21f3) ||\n (c >= 0x21f4 && c <= 0x22ff) ||\n (c >= 0x2300 && c <= 0x2307) ||\n c === 0x2308 ||\n c === 0x2309 ||\n c === 0x230a ||\n c === 0x230b ||\n (c >= 0x230c && c <= 0x231f) ||\n (c >= 0x2320 && c <= 0x2321) ||\n (c >= 0x2322 && c <= 0x2328) ||\n c === 0x2329 ||\n c === 0x232a ||\n (c >= 0x232b && c <= 0x237b) ||\n c === 0x237c ||\n (c >= 0x237d && c <= 0x239a) ||\n (c >= 0x239b && c <= 0x23b3) ||\n (c >= 0x23b4 && c <= 0x23db) ||\n (c >= 0x23dc && c <= 0x23e1) ||\n (c >= 0x23e2 && c <= 0x2426) ||\n (c >= 0x2427 && c <= 0x243f) ||\n (c >= 0x2440 && c <= 0x244a) ||\n (c >= 0x244b && c <= 0x245f) ||\n (c >= 0x2500 && c <= 0x25b6) ||\n c === 0x25b7 ||\n (c >= 0x25b8 && c <= 0x25c0) ||\n c === 0x25c1 ||\n (c >= 0x25c2 && c <= 0x25f7) ||\n (c >= 0x25f8 && c <= 0x25ff) ||\n (c >= 0x2600 && c <= 0x266e) ||\n c === 0x266f ||\n (c >= 0x2670 && c <= 0x2767) ||\n c === 0x2768 ||\n c === 0x2769 ||\n c === 0x276a ||\n c === 0x276b ||\n c === 0x276c ||\n c === 0x276d ||\n c === 0x276e ||\n c === 0x276f ||\n c === 0x2770 ||\n c === 0x2771 ||\n c === 0x2772 ||\n c === 0x2773 ||\n c === 0x2774 ||\n c === 0x2775 ||\n (c >= 0x2794 && c <= 0x27bf) ||\n (c >= 0x27c0 && c <= 0x27c4) ||\n c === 0x27c5 ||\n c === 0x27c6 ||\n (c >= 0x27c7 && c <= 0x27e5) ||\n c === 0x27e6 ||\n c === 0x27e7 ||\n c === 0x27e8 ||\n c === 0x27e9 ||\n c === 0x27ea ||\n c === 0x27eb ||\n c === 0x27ec ||\n c === 0x27ed ||\n c === 0x27ee ||\n c === 0x27ef ||\n (c >= 0x27f0 && c <= 0x27ff) ||\n (c >= 0x2800 && c <= 0x28ff) ||\n (c >= 0x2900 && c <= 0x2982) ||\n c === 0x2983 ||\n c === 0x2984 ||\n c === 0x2985 ||\n c === 0x2986 ||\n c === 0x2987 ||\n c === 0x2988 ||\n c === 0x2989 ||\n c === 0x298a ||\n c === 0x298b ||\n c === 0x298c ||\n c === 0x298d ||\n c === 0x298e ||\n c === 0x298f ||\n c === 0x2990 ||\n c === 0x2991 ||\n c === 0x2992 ||\n c === 0x2993 ||\n c === 0x2994 ||\n c === 0x2995 ||\n c === 0x2996 ||\n c === 0x2997 ||\n c === 0x2998 ||\n (c >= 0x2999 && c <= 0x29d7) ||\n c === 0x29d8 ||\n c === 0x29d9 ||\n c === 0x29da ||\n c === 0x29db ||\n (c >= 0x29dc && c <= 0x29fb) ||\n c === 0x29fc ||\n c === 0x29fd ||\n (c >= 0x29fe && c <= 0x2aff) ||\n (c >= 0x2b00 && c <= 0x2b2f) ||\n (c >= 0x2b30 && c <= 0x2b44) ||\n (c >= 0x2b45 && c <= 0x2b46) ||\n (c >= 0x2b47 && c <= 0x2b4c) ||\n (c >= 0x2b4d && c <= 0x2b73) ||\n (c >= 0x2b74 && c <= 0x2b75) ||\n (c >= 0x2b76 && c <= 0x2b95) ||\n c === 0x2b96 ||\n (c >= 0x2b97 && c <= 0x2bff) ||\n (c >= 0x2e00 && c <= 0x2e01) ||\n c === 0x2e02 ||\n c === 0x2e03 ||\n c === 0x2e04 ||\n c === 0x2e05 ||\n (c >= 0x2e06 && c <= 0x2e08) ||\n c === 0x2e09 ||\n c === 0x2e0a ||\n c === 0x2e0b ||\n c === 0x2e0c ||\n c === 0x2e0d ||\n (c >= 0x2e0e && c <= 0x2e16) ||\n c === 0x2e17 ||\n (c >= 0x2e18 && c <= 0x2e19) ||\n c === 0x2e1a ||\n c === 0x2e1b ||\n c === 0x2e1c ||\n c === 0x2e1d ||\n (c >= 0x2e1e && c <= 0x2e1f) ||\n c === 0x2e20 ||\n c === 0x2e21 ||\n c === 0x2e22 ||\n c === 0x2e23 ||\n c === 0x2e24 ||\n c === 0x2e25 ||\n c === 0x2e26 ||\n c === 0x2e27 ||\n c === 0x2e28 ||\n c === 0x2e29 ||\n (c >= 0x2e2a && c <= 0x2e2e) ||\n c === 0x2e2f ||\n (c >= 0x2e30 && c <= 0x2e39) ||\n (c >= 0x2e3a && c <= 0x2e3b) ||\n (c >= 0x2e3c && c <= 0x2e3f) ||\n c === 0x2e40 ||\n c === 0x2e41 ||\n c === 0x2e42 ||\n (c >= 0x2e43 && c <= 0x2e4f) ||\n (c >= 0x2e50 && c <= 0x2e51) ||\n c === 0x2e52 ||\n (c >= 0x2e53 && c <= 0x2e7f) ||\n (c >= 0x3001 && c <= 0x3003) ||\n c === 0x3008 ||\n c === 0x3009 ||\n c === 0x300a ||\n c === 0x300b ||\n c === 0x300c ||\n c === 0x300d ||\n c === 0x300e ||\n c === 0x300f ||\n c === 0x3010 ||\n c === 0x3011 ||\n (c >= 0x3012 && c <= 0x3013) ||\n c === 0x3014 ||\n c === 0x3015 ||\n c === 0x3016 ||\n c === 0x3017 ||\n c === 0x3018 ||\n c === 0x3019 ||\n c === 0x301a ||\n c === 0x301b ||\n c === 0x301c ||\n c === 0x301d ||\n (c >= 0x301e && c <= 0x301f) ||\n c === 0x3020 ||\n c === 0x3030 ||\n c === 0xfd3e ||\n c === 0xfd3f ||\n (c >= 0xfe45 && c <= 0xfe46));\n}\n","import { timeData } from './time-data.generated';\n/**\n * Returns the best matching date time pattern if a date time skeleton\n * pattern is provided with a locale. Follows the Unicode specification:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#table-mapping-requested-time-skeletons-to-patterns\n * @param skeleton date time skeleton pattern that possibly includes j, J or C\n * @param locale\n */\nexport function getBestPattern(skeleton, locale) {\n var skeletonCopy = '';\n for (var patternPos = 0; patternPos < skeleton.length; patternPos++) {\n var patternChar = skeleton.charAt(patternPos);\n if (patternChar === 'j') {\n var extraLength = 0;\n while (patternPos + 1 < skeleton.length &&\n skeleton.charAt(patternPos + 1) === patternChar) {\n extraLength++;\n patternPos++;\n }\n var hourLen = 1 + (extraLength & 1);\n var dayPeriodLen = extraLength < 2 ? 1 : 3 + (extraLength >> 1);\n var dayPeriodChar = 'a';\n var hourChar = getDefaultHourSymbolFromLocale(locale);\n if (hourChar == 'H' || hourChar == 'k') {\n dayPeriodLen = 0;\n }\n while (dayPeriodLen-- > 0) {\n skeletonCopy += dayPeriodChar;\n }\n while (hourLen-- > 0) {\n skeletonCopy = hourChar + skeletonCopy;\n }\n }\n else if (patternChar === 'J') {\n skeletonCopy += 'H';\n }\n else {\n skeletonCopy += patternChar;\n }\n }\n return skeletonCopy;\n}\n/**\n * Maps the [hour cycle type](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/hourCycle)\n * of the given `locale` to the corresponding time pattern.\n * @param locale\n */\nfunction getDefaultHourSymbolFromLocale(locale) {\n var hourCycle = locale.hourCycle;\n if (hourCycle === undefined &&\n // @ts-ignore hourCycle(s) is not identified yet\n locale.hourCycles &&\n // @ts-ignore\n locale.hourCycles.length) {\n // @ts-ignore\n hourCycle = locale.hourCycles[0];\n }\n if (hourCycle) {\n switch (hourCycle) {\n case 'h24':\n return 'k';\n case 'h23':\n return 'H';\n case 'h12':\n return 'h';\n case 'h11':\n return 'K';\n default:\n throw new Error('Invalid hourCycle');\n }\n }\n // TODO: Once hourCycle is fully supported remove the following with data generation\n var languageTag = locale.language;\n var regionTag;\n if (languageTag !== 'root') {\n regionTag = locale.maximize().region;\n }\n var hourCycles = timeData[regionTag || ''] ||\n timeData[languageTag || ''] ||\n timeData[\"\".concat(languageTag, \"-001\")] ||\n timeData['001'];\n return hourCycles[0];\n}\n","import { __extends } from \"tslib\";\nexport var ErrorCode;\n(function (ErrorCode) {\n // When we have a placeholder but no value to format\n ErrorCode[\"MISSING_VALUE\"] = \"MISSING_VALUE\";\n // When value supplied is invalid\n ErrorCode[\"INVALID_VALUE\"] = \"INVALID_VALUE\";\n // When we need specific Intl API but it's not available\n ErrorCode[\"MISSING_INTL_API\"] = \"MISSING_INTL_API\";\n})(ErrorCode || (ErrorCode = {}));\nvar FormatError = /** @class */ (function (_super) {\n __extends(FormatError, _super);\n function FormatError(msg, code, originalMessage) {\n var _this = _super.call(this, msg) || this;\n _this.code = code;\n _this.originalMessage = originalMessage;\n return _this;\n }\n FormatError.prototype.toString = function () {\n return \"[formatjs Error: \".concat(this.code, \"] \").concat(this.message);\n };\n return FormatError;\n}(Error));\nexport { FormatError };\nvar InvalidValueError = /** @class */ (function (_super) {\n __extends(InvalidValueError, _super);\n function InvalidValueError(variableId, value, options, originalMessage) {\n return _super.call(this, \"Invalid values for \\\"\".concat(variableId, \"\\\": \\\"\").concat(value, \"\\\". Options are \\\"\").concat(Object.keys(options).join('\", \"'), \"\\\"\"), ErrorCode.INVALID_VALUE, originalMessage) || this;\n }\n return InvalidValueError;\n}(FormatError));\nexport { InvalidValueError };\nvar InvalidValueTypeError = /** @class */ (function (_super) {\n __extends(InvalidValueTypeError, _super);\n function InvalidValueTypeError(value, type, originalMessage) {\n return _super.call(this, \"Value for \\\"\".concat(value, \"\\\" must be of type \").concat(type), ErrorCode.INVALID_VALUE, originalMessage) || this;\n }\n return InvalidValueTypeError;\n}(FormatError));\nexport { InvalidValueTypeError };\nvar MissingValueError = /** @class */ (function (_super) {\n __extends(MissingValueError, _super);\n function MissingValueError(variableId, originalMessage) {\n return _super.call(this, \"The intl string context variable \\\"\".concat(variableId, \"\\\" was not provided to the string \\\"\").concat(originalMessage, \"\\\"\"), ErrorCode.MISSING_VALUE, originalMessage) || this;\n }\n return MissingValueError;\n}(FormatError));\nexport { MissingValueError };\n","import { __assign } from \"tslib\";\nimport { ErrorKind } from './error';\nimport { Parser } from './parser';\nimport { isDateElement, isDateTimeSkeleton, isNumberElement, isNumberSkeleton, isPluralElement, isSelectElement, isTagElement, isTimeElement, } from './types';\nfunction pruneLocation(els) {\n els.forEach(function (el) {\n delete el.location;\n if (isSelectElement(el) || isPluralElement(el)) {\n for (var k in el.options) {\n delete el.options[k].location;\n pruneLocation(el.options[k].value);\n }\n }\n else if (isNumberElement(el) && isNumberSkeleton(el.style)) {\n delete el.style.location;\n }\n else if ((isDateElement(el) || isTimeElement(el)) &&\n isDateTimeSkeleton(el.style)) {\n delete el.style.location;\n }\n else if (isTagElement(el)) {\n pruneLocation(el.children);\n }\n });\n}\nexport function parse(message, opts) {\n if (opts === void 0) { opts = {}; }\n opts = __assign({ shouldParseSkeletons: true, requiresOtherClause: true }, opts);\n var result = new Parser(message, opts).parse();\n if (result.err) {\n var error = SyntaxError(ErrorKind[result.err.kind]);\n // @ts-expect-error Assign to error object\n error.location = result.err.location;\n // @ts-expect-error Assign to error object\n error.originalMessage = result.err.message;\n throw error;\n }\n if (!(opts === null || opts === void 0 ? void 0 : opts.captureLocation)) {\n pruneLocation(result.val);\n }\n return result.val;\n}\nexport * from './types';\n// only for testing\nexport var _Parser = Parser;\nexport { isStructurallySame } from './manipulator';\n","import { isArgumentElement, isDateElement, isDateTimeSkeleton, isLiteralElement, isNumberElement, isNumberSkeleton, isPluralElement, isPoundElement, isSelectElement, isTagElement, isTimeElement, } from '@formatjs/icu-messageformat-parser';\nimport { ErrorCode, FormatError, InvalidValueError, InvalidValueTypeError, MissingValueError, } from './error';\nexport var PART_TYPE;\n(function (PART_TYPE) {\n PART_TYPE[PART_TYPE[\"literal\"] = 0] = \"literal\";\n PART_TYPE[PART_TYPE[\"object\"] = 1] = \"object\";\n})(PART_TYPE || (PART_TYPE = {}));\nfunction mergeLiteral(parts) {\n if (parts.length < 2) {\n return parts;\n }\n return parts.reduce(function (all, part) {\n var lastPart = all[all.length - 1];\n if (!lastPart ||\n lastPart.type !== PART_TYPE.literal ||\n part.type !== PART_TYPE.literal) {\n all.push(part);\n }\n else {\n lastPart.value += part.value;\n }\n return all;\n }, []);\n}\nexport function isFormatXMLElementFn(el) {\n return typeof el === 'function';\n}\n// TODO(skeleton): add skeleton support\nexport function formatToParts(els, locales, formatters, formats, values, currentPluralValue, \n// For debugging\noriginalMessage) {\n // Hot path for straight simple msg translations\n if (els.length === 1 && isLiteralElement(els[0])) {\n return [\n {\n type: PART_TYPE.literal,\n value: els[0].value,\n },\n ];\n }\n var result = [];\n for (var _i = 0, els_1 = els; _i < els_1.length; _i++) {\n var el = els_1[_i];\n // Exit early for string parts.\n if (isLiteralElement(el)) {\n result.push({\n type: PART_TYPE.literal,\n value: el.value,\n });\n continue;\n }\n // TODO: should this part be literal type?\n // Replace `#` in plural rules with the actual numeric value.\n if (isPoundElement(el)) {\n if (typeof currentPluralValue === 'number') {\n result.push({\n type: PART_TYPE.literal,\n value: formatters.getNumberFormat(locales).format(currentPluralValue),\n });\n }\n continue;\n }\n var varName = el.value;\n // Enforce that all required values are provided by the caller.\n if (!(values && varName in values)) {\n throw new MissingValueError(varName, originalMessage);\n }\n var value = values[varName];\n if (isArgumentElement(el)) {\n if (!value || typeof value === 'string' || typeof value === 'number') {\n value =\n typeof value === 'string' || typeof value === 'number'\n ? String(value)\n : '';\n }\n result.push({\n type: typeof value === 'string' ? PART_TYPE.literal : PART_TYPE.object,\n value: value,\n });\n continue;\n }\n // Recursively format plural and select parts' option — which can be a\n // nested pattern structure. The choosing of the option to use is\n // abstracted-by and delegated-to the part helper object.\n if (isDateElement(el)) {\n var style = typeof el.style === 'string'\n ? formats.date[el.style]\n : isDateTimeSkeleton(el.style)\n ? el.style.parsedOptions\n : undefined;\n result.push({\n type: PART_TYPE.literal,\n value: formatters\n .getDateTimeFormat(locales, style)\n .format(value),\n });\n continue;\n }\n if (isTimeElement(el)) {\n var style = typeof el.style === 'string'\n ? formats.time[el.style]\n : isDateTimeSkeleton(el.style)\n ? el.style.parsedOptions\n : formats.time.medium;\n result.push({\n type: PART_TYPE.literal,\n value: formatters\n .getDateTimeFormat(locales, style)\n .format(value),\n });\n continue;\n }\n if (isNumberElement(el)) {\n var style = typeof el.style === 'string'\n ? formats.number[el.style]\n : isNumberSkeleton(el.style)\n ? el.style.parsedOptions\n : undefined;\n if (style && style.scale) {\n value =\n value *\n (style.scale || 1);\n }\n result.push({\n type: PART_TYPE.literal,\n value: formatters\n .getNumberFormat(locales, style)\n .format(value),\n });\n continue;\n }\n if (isTagElement(el)) {\n var children = el.children, value_1 = el.value;\n var formatFn = values[value_1];\n if (!isFormatXMLElementFn(formatFn)) {\n throw new InvalidValueTypeError(value_1, 'function', originalMessage);\n }\n var parts = formatToParts(children, locales, formatters, formats, values, currentPluralValue);\n var chunks = formatFn(parts.map(function (p) { return p.value; }));\n if (!Array.isArray(chunks)) {\n chunks = [chunks];\n }\n result.push.apply(result, chunks.map(function (c) {\n return {\n type: typeof c === 'string' ? PART_TYPE.literal : PART_TYPE.object,\n value: c,\n };\n }));\n }\n if (isSelectElement(el)) {\n var opt = el.options[value] || el.options.other;\n if (!opt) {\n throw new InvalidValueError(el.value, value, Object.keys(el.options), originalMessage);\n }\n result.push.apply(result, formatToParts(opt.value, locales, formatters, formats, values));\n continue;\n }\n if (isPluralElement(el)) {\n var opt = el.options[\"=\".concat(value)];\n if (!opt) {\n if (!Intl.PluralRules) {\n throw new FormatError(\"Intl.PluralRules is not available in this environment.\\nTry polyfilling it using \\\"@formatjs/intl-pluralrules\\\"\\n\", ErrorCode.MISSING_INTL_API, originalMessage);\n }\n var rule = formatters\n .getPluralRules(locales, { type: el.pluralType })\n .select(value - (el.offset || 0));\n opt = el.options[rule] || el.options.other;\n }\n if (!opt) {\n throw new InvalidValueError(el.value, value, Object.keys(el.options), originalMessage);\n }\n result.push.apply(result, formatToParts(opt.value, locales, formatters, formats, values, value - (el.offset || 0)));\n continue;\n }\n }\n return mergeLiteral(result);\n}\n","/*\nCopyright (c) 2014, Yahoo! Inc. All rights reserved.\nCopyrights licensed under the New BSD License.\nSee the accompanying LICENSE file for terms.\n*/\nimport { __assign, __rest, __spreadArray } from \"tslib\";\nimport { memoize, strategies } from '@formatjs/fast-memoize';\nimport { parse, } from '@formatjs/icu-messageformat-parser';\nimport { formatToParts, PART_TYPE, } from './formatters';\n// -- MessageFormat --------------------------------------------------------\nfunction mergeConfig(c1, c2) {\n if (!c2) {\n return c1;\n }\n return __assign(__assign(__assign({}, (c1 || {})), (c2 || {})), Object.keys(c1).reduce(function (all, k) {\n all[k] = __assign(__assign({}, c1[k]), (c2[k] || {}));\n return all;\n }, {}));\n}\nfunction mergeConfigs(defaultConfig, configs) {\n if (!configs) {\n return defaultConfig;\n }\n return Object.keys(defaultConfig).reduce(function (all, k) {\n all[k] = mergeConfig(defaultConfig[k], configs[k]);\n return all;\n }, __assign({}, defaultConfig));\n}\nfunction createFastMemoizeCache(store) {\n return {\n create: function () {\n return {\n get: function (key) {\n return store[key];\n },\n set: function (key, value) {\n store[key] = value;\n },\n };\n },\n };\n}\nfunction createDefaultFormatters(cache) {\n if (cache === void 0) { cache = {\n number: {},\n dateTime: {},\n pluralRules: {},\n }; }\n return {\n getNumberFormat: memoize(function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return new ((_a = Intl.NumberFormat).bind.apply(_a, __spreadArray([void 0], args, false)))();\n }, {\n cache: createFastMemoizeCache(cache.number),\n strategy: strategies.variadic,\n }),\n getDateTimeFormat: memoize(function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return new ((_a = Intl.DateTimeFormat).bind.apply(_a, __spreadArray([void 0], args, false)))();\n }, {\n cache: createFastMemoizeCache(cache.dateTime),\n strategy: strategies.variadic,\n }),\n getPluralRules: memoize(function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return new ((_a = Intl.PluralRules).bind.apply(_a, __spreadArray([void 0], args, false)))();\n }, {\n cache: createFastMemoizeCache(cache.pluralRules),\n strategy: strategies.variadic,\n }),\n };\n}\nvar IntlMessageFormat = /** @class */ (function () {\n function IntlMessageFormat(message, locales, overrideFormats, opts) {\n if (locales === void 0) { locales = IntlMessageFormat.defaultLocale; }\n var _this = this;\n this.formatterCache = {\n number: {},\n dateTime: {},\n pluralRules: {},\n };\n this.format = function (values) {\n var parts = _this.formatToParts(values);\n // Hot path for straight simple msg translations\n if (parts.length === 1) {\n return parts[0].value;\n }\n var result = parts.reduce(function (all, part) {\n if (!all.length ||\n part.type !== PART_TYPE.literal ||\n typeof all[all.length - 1] !== 'string') {\n all.push(part.value);\n }\n else {\n all[all.length - 1] += part.value;\n }\n return all;\n }, []);\n if (result.length <= 1) {\n return result[0] || '';\n }\n return result;\n };\n this.formatToParts = function (values) {\n return formatToParts(_this.ast, _this.locales, _this.formatters, _this.formats, values, undefined, _this.message);\n };\n this.resolvedOptions = function () {\n var _a;\n return ({\n locale: ((_a = _this.resolvedLocale) === null || _a === void 0 ? void 0 : _a.toString()) ||\n Intl.NumberFormat.supportedLocalesOf(_this.locales)[0],\n });\n };\n this.getAst = function () { return _this.ast; };\n // Defined first because it's used to build the format pattern.\n this.locales = locales;\n this.resolvedLocale = IntlMessageFormat.resolveLocale(locales);\n if (typeof message === 'string') {\n this.message = message;\n if (!IntlMessageFormat.__parse) {\n throw new TypeError('IntlMessageFormat.__parse must be set to process `message` of type `string`');\n }\n var _a = opts || {}, formatters = _a.formatters, parseOpts = __rest(_a, [\"formatters\"]);\n // Parse string messages into an AST.\n this.ast = IntlMessageFormat.__parse(message, __assign(__assign({}, parseOpts), { locale: this.resolvedLocale }));\n }\n else {\n this.ast = message;\n }\n if (!Array.isArray(this.ast)) {\n throw new TypeError('A message must be provided as a String or AST.');\n }\n // Creates a new object with the specified `formats` merged with the default\n // formats.\n this.formats = mergeConfigs(IntlMessageFormat.formats, overrideFormats);\n this.formatters =\n (opts && opts.formatters) || createDefaultFormatters(this.formatterCache);\n }\n Object.defineProperty(IntlMessageFormat, \"defaultLocale\", {\n get: function () {\n if (!IntlMessageFormat.memoizedDefaultLocale) {\n IntlMessageFormat.memoizedDefaultLocale =\n new Intl.NumberFormat().resolvedOptions().locale;\n }\n return IntlMessageFormat.memoizedDefaultLocale;\n },\n enumerable: false,\n configurable: true\n });\n IntlMessageFormat.memoizedDefaultLocale = null;\n IntlMessageFormat.resolveLocale = function (locales) {\n if (typeof Intl.Locale === 'undefined') {\n return;\n }\n var supportedLocales = Intl.NumberFormat.supportedLocalesOf(locales);\n if (supportedLocales.length > 0) {\n return new Intl.Locale(supportedLocales[0]);\n }\n return new Intl.Locale(typeof locales === 'string' ? locales : locales[0]);\n };\n IntlMessageFormat.__parse = parse;\n // Default format options used as the prototype of the `formats` provided to the\n // constructor. These are used when constructing the internal Intl.NumberFormat\n // and Intl.DateTimeFormat instances.\n IntlMessageFormat.formats = {\n number: {\n integer: {\n maximumFractionDigits: 0,\n },\n currency: {\n style: 'currency',\n },\n percent: {\n style: 'percent',\n },\n },\n date: {\n short: {\n month: 'numeric',\n day: 'numeric',\n year: '2-digit',\n },\n medium: {\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n },\n long: {\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n },\n full: {\n weekday: 'long',\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n },\n },\n time: {\n short: {\n hour: 'numeric',\n minute: 'numeric',\n },\n medium: {\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n },\n long: {\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n timeZoneName: 'short',\n },\n full: {\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n timeZoneName: 'short',\n },\n },\n };\n return IntlMessageFormat;\n}());\nexport { IntlMessageFormat };\n","import { intlCache } from '../cache/IntlCache';\nimport { libraryDefaultLocale } from '../internal';\nimport IntlMessageFormat from 'intl-messageformat';\n\n/**\n * Formats a message according to the specified locales and options.\n *\n * @param {string} message - The message to format.\n * @param {string | string[]} [locales='en'] - The locales to use for formatting.\n * @param {Record<string, any>} [variables={}] - The variables to use for formatting.\n * @returns {string} The formatted message.\n * @internal\n */\nexport function _formatMessage(\n message: string,\n locales: string | string[] = libraryDefaultLocale,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n variables: Record<string, any> = {}\n): string {\n const messageFormat = new IntlMessageFormat(message, locales);\n return messageFormat.format(variables);\n}\n\n/**\n * Formats a number according to the specified locales and options.\n *\n * @param {Object} params - The parameters for the number formatting.\n * @param {number} params.value - The number to format.\n * @param {string | string[]} [params.locales=['en']] - The locales to use for formatting.\n * @param {Intl.NumberFormatOptions} [params.options={}] - Additional options for number formatting.\n *\n * @returns {string} The formatted number.\n * @internal\n */\nexport function _formatNum({\n value,\n locales = [libraryDefaultLocale],\n options = {},\n}: {\n value: number;\n locales?: string | string[];\n options?: Intl.NumberFormatOptions;\n}): string {\n const res = intlCache\n .get('NumberFormat', locales, {\n numberingSystem: 'latn',\n ...options,\n })\n .format(value);\n return res;\n}\n\n/**\n * Formats a date according to the specified locales and options.\n *\n * @param {Object} params - The parameters for the date formatting.\n * @param {Date} params.value - The date to format.\n * @param {string | string[]} [params.locales='en']] - The locales to use for formatting.\n * @param {Intl.DateTimeFormatOptions} [params.options={}] - Additional options for date formatting.\n *\n * @returns {string} The formatted date.\n * @internal\n */\nexport function _formatDateTime({\n value,\n locales = [libraryDefaultLocale],\n options = {},\n}: {\n value: Date;\n locales?: string | string[];\n options?: Intl.DateTimeFormatOptions;\n}): string {\n return intlCache\n .get('DateTimeFormat', locales, {\n calendar: 'gregory',\n numberingSystem: 'latn',\n ...options,\n })\n .format(value);\n}\n\n/**\n * Formats a currency value according to the specified locales, currency, and options.\n *\n * @param {Object} params - The parameters for the currency formatting.\n * @param {number} params.value - The currency value to format.\n * @param {string} params.currency - The currency code (e.g., 'USD').\n * @param {string | string[]} [params.locales=['en']] - The locales to use for formatting.\n * @param {Intl.NumberFormatOptions} [params.options={}] - Additional options for currency formatting.\n *\n * @returns {string} The formatted currency value.\n * @internal\n */\n\nexport function _formatCurrency({\n value,\n locales = [libraryDefaultLocale],\n currency = 'USD',\n options = {},\n}: {\n value: number;\n currency?: string;\n locales?: string | string[];\n options?: Intl.NumberFormatOptions;\n}): string {\n return intlCache\n .get('NumberFormat', locales, {\n style: 'currency',\n currency,\n numberingSystem: 'latn',\n ...options,\n })\n .format(value);\n}\n\n/**\n * Formats a list of items according to the specified locales and options.\n *\n * @param {Object} params - The parameters for the list formatting.\n * @param {Array<string | number>} params.value - The list of items to format.\n * @param {string | string[]} [params.locales=['en']] - The locales to use for formatting.\n * @param {Intl.ListFormatOptions} [params.options={}] - Additional options for list formatting.\n *\n * @returns {string} The formatted list.\n * @internal\n */\nexport function _formatList({\n value,\n locales = [libraryDefaultLocale],\n options = {},\n}: {\n value: Array<any>;\n locales?: string | string[];\n options?: Intl.ListFormatOptions;\n}): string {\n return intlCache\n .get('ListFormat', locales, {\n type: 'conjunction', // Default type, can be overridden via options\n style: 'long', // Default style, can be overridden via options\n ...options,\n })\n .format(value);\n}\n\n/**\n * Formats a relative time value according to the specified locales and options.\n *\n * @param {Object} params - The parameters for the relative time formatting.\n * @param {number} params.value - The relative time value to format.\n * @param {Intl.RelativeTimeFormatUnit} params.unit - The unit of time (e.g., 'second', 'minute', 'hour', 'day', 'week', 'month', 'year').\n * @param {string | string[]} [params.locales=['en']] - The locales to use for formatting.\n * @param {Intl.RelativeTimeFormatOptions} [params.options={}] - Additional options for relative time formatting.\n *\n * @returns {string} The formatted relative time string.\n * @internal\n */\nexport function _formatRelativeTime({\n value,\n unit,\n locales = [libraryDefaultLocale],\n options = {},\n}: {\n value: number;\n unit: Intl.RelativeTimeFormatUnit;\n locales?: string | string[];\n options?: Intl.RelativeTimeFormatOptions;\n}): string {\n return intlCache\n .get('RelativeTimeFormat', locales, {\n style: 'long',\n numeric: 'auto',\n ...options,\n })\n .format(value, unit);\n}\n","import { intlCache } from '../cache/IntlCache';\nimport { libraryDefaultLocale } from '../internal';\nimport { CustomMapping, getCustomProperty } from './customLocaleMapping';\nimport { LocaleProperties } from './getLocaleProperties';\nimport { _standardizeLocale } from './isValidLocale';\n\n/**\n * Retrieves the display name(s) of language code(s) using Intl.DisplayNames.\n *\n * @param {string} locale - A BCP-47 locale code.\n * @param {string} [defaultLanguage=libraryDefaultLanguage] - The language for display names.\n * @returns {string} The display name(s) corresponding to the code(s), or empty string(s) if invalid.\n * @internal\n */\nexport function _getLocaleName(\n locale: string,\n defaultLanguage: string = libraryDefaultLocale,\n customMapping?: CustomMapping\n): string {\n defaultLanguage ||= libraryDefaultLocale;\n try {\n const standardizedLocale = _standardizeLocale(locale);\n if (customMapping) {\n for (const l of [\n locale,\n standardizedLocale,\n intlCache.get('Locale', standardizedLocale).language,\n ]) {\n const customName = getCustomProperty(customMapping, l, 'name');\n if (customName) return customName;\n }\n }\n const displayNames = intlCache.get(\n 'DisplayNames',\n [defaultLanguage, standardizedLocale, libraryDefaultLocale], // default language order\n { type: 'language' }\n );\n return displayNames.of(standardizedLocale) || '';\n } catch {\n // In case Intl.DisplayNames construction fails, return empty string(s)\n return '';\n }\n}\n","export const noTargetLocaleProvidedError = (functionName: string) =>\n `GT error: Cannot call \\`${functionName}\\` without a specified locale. Either pass a locale to the \\`${functionName}\\` function or specify a targetLocale in the GT constructor.`;\n\nexport const noSourceLocaleProvidedError = (functionName: string) =>\n `GT error: Cannot call \\`${functionName}\\` without a specified locale. Either pass a locale to the \\`${functionName}\\` function or specify a targetLocale in the GT constructor.`;\n\nexport const invalidLocaleError = (locale: string) =>\n `GT error: Invalid locale: ${locale}.`;\n\nexport const invalidLocalesError = (locales: string[]) =>\n `GT error: Invalid locales: ${locales.join(', ')}.`;\n","// `generaltranslation` language toolkit\n// © 2024, General Translation, Inc.\n\n// ----- IMPORTS ----- //\n\nimport _requiresTranslation from './locales/requiresTranslation';\nimport _determineLocale from './locales/determineLocale';\nimport {\n _formatNum,\n _formatCurrency,\n _formatList,\n _formatRelativeTime,\n _formatDateTime,\n _formatMessage,\n} from './formatting/format';\nimport { CustomMapping } from './types';\nimport _isSameLanguage from './locales/isSameLanguage';\nimport _getLocaleProperties, {\n LocaleProperties,\n} from './locales/getLocaleProperties';\nimport _getLocaleEmoji from './locales/getLocaleEmoji';\nimport { _isValidLocale, _standardizeLocale } from './locales/isValidLocale';\nimport { _getLocaleName } from './locales/getLocaleName';\nimport { _getLocaleDirection } from './locales/getLocaleDirection';\nimport { defaultBaseUrl, libraryDefaultLocale } from './internal';\nimport _isSameDialect from './locales/isSameDialect';\nimport _isSupersetLocale from './locales/isSupersetLocale';\nimport {\n noSourceLocaleProvidedError,\n noTargetLocaleProvidedError,\n invalidLocaleError,\n invalidLocalesError,\n} from './settings/errors';\n// ----- CORE CLASS ----- //\n/**\n * Type representing the constructor parameters for the GT class.\n * @typedef {Object} GTConstructorParams\n * @property {string} [apiKey] - The API key for accessing the translation service\n * @property {string} [devApiKey] - The development API key for accessing the translation service\n * @property {string} [sourceLocale] - The default source locale for translations\n * @property {string} [targetLocale] - The default target locale for translations\n * @property {string[]} [locales] - Array of supported locales\n * @property {string} [projectId] - The project ID for the translation service\n * @property {string} [baseUrl] - The base URL for the translation service\n * @property {CustomMapping} [customMapping] - Custom mapping of locale codes to their names\n */\ntype GTConstructorParams = {\n apiKey?: string;\n devApiKey?: string;\n sourceLocale?: string;\n targetLocale?: string;\n locales?: string[];\n projectId?: string;\n baseUrl?: string;\n customMapping?: CustomMapping;\n};\n\n/**\n * GT is the core driver for the General Translation library.\n * This class provides functionality for locale management, formatting, and translation operations.\n *\n * @class GT\n * @description A comprehensive toolkit for handling internationalization and localization.\n *\n * @example\n * const gt = new GT({\n * sourceLocale: 'en-US',\n * targetLocale: 'es-ES',\n * locales: ['en-US', 'es-ES', 'fr-FR']\n * });\n */\nexport default class GT {\n // ============================================================ //\n // Instance Properties //\n // ============================================================ //\n\n /** Base URL for the translation service API */\n baseUrl: string;\n\n /** Project ID for the translation service */\n projectId?: string;\n\n /** API key for accessing the translation service */\n apiKey?: string;\n\n /** Development API key for accessing the translation service */\n devApiKey?: string;\n\n /** Source locale for translations */\n sourceLocale?: string;\n\n /** Target locale for translations */\n targetLocale?: string;\n\n /** Array of supported locales */\n locales?: string[];\n\n /** Array of locales used for rendering variables */\n _renderingLocales: string[];\n\n /** Custom mapping for locale codes to their names */\n customMapping?: CustomMapping;\n\n // ============================================================ //\n // Instance Methods //\n // ============================================================ //\n\n /**\n * Constructs an instance of the GT class.\n *\n * @param {GTConstructorParams} [params] - The parameters for initializing the GT instance\n * @throws {Error} If an invalid locale is provided\n * @throws {Error} If any of the provided locales are invalid\n *\n * @example\n * const gt = new GT({\n * apiKey: 'your-api-key',\n * sourceLocale: 'en-US',\n * targetLocale: 'es-ES',\n * locales: ['en-US', 'es-ES', 'fr-FR']\n * });\n */\n constructor({\n apiKey,\n devApiKey,\n sourceLocale,\n targetLocale,\n locales,\n projectId,\n customMapping,\n baseUrl = defaultBaseUrl,\n }: GTConstructorParams = {}) {\n // ----- Environment properties ----- //\n this.apiKey = apiKey;\n this.devApiKey = devApiKey;\n this.projectId = projectId;\n if (typeof process !== 'undefined') {\n this.apiKey ||= process.env?.GT_API_KEY;\n this.devApiKey ||= process.env?.GT_DEV_API_KEY;\n this.projectId ||= process.env?.GT_PROJECT_ID;\n }\n\n // ----- Standardize locales ----- //\n\n this._renderingLocales = [];\n\n // source locale\n if (sourceLocale) {\n this.sourceLocale = _standardizeLocale(sourceLocale);\n if (!_isValidLocale(this.sourceLocale))\n throw new Error(invalidLocaleError(this.sourceLocale));\n this._renderingLocales.push(this.sourceLocale);\n }\n\n // target locale\n if (targetLocale) {\n this.targetLocale = _standardizeLocale(targetLocale);\n if (!_isValidLocale(this.targetLocale))\n throw new Error(invalidLocaleError(this.targetLocale));\n this._renderingLocales.push(this.targetLocale);\n }\n\n // locales\n if (locales) {\n const result: string[] = [];\n const invalidLocales: string[] = [];\n locales.forEach((locale) => {\n const standardizedLocale = _standardizeLocale(locale);\n if (_isValidLocale(standardizedLocale)) {\n result.push(standardizedLocale);\n } else {\n invalidLocales.push(locale);\n }\n });\n if (invalidLocales.length > 0) {\n throw new Error(invalidLocalesError(invalidLocales));\n }\n this.locales = result;\n }\n\n // fallback ordered array of locales\n this._renderingLocales.push(libraryDefaultLocale);\n\n // ----- Other properties ----- //\n this.baseUrl = baseUrl;\n this.customMapping = customMapping;\n }\n\n // ============================================================ //\n // Instance methods //\n // ============================================================ //\n\n // -------------- Translation methods -------------- //\n translatef() {}\n\n mtranslatef() {}\n\n // -------------- Formatting -------------- //\n\n /**\n * Formats a message according to the specified locales and options.\n *\n * @param {string} message - The message to format.\n * @param {string | string[]} [locales='en'] - The locales to use for formatting.\n * @param {Record<string, any>} [variables={}] - The variables to use for formatting.\n * @returns {string} The formatted message.\n *\n * @example\n * gt.formatMessage('Hello {name}', { name: 'John' });\n * // Returns: \"Hello John\"\n *\n * gt.formatMessage('Hello {name}', { name: 'John' }, { locales: ['fr'] });\n * // Returns: \"Bonjour John\"\n */\n formatMessage(\n message: string,\n options?: {\n locales?: string[];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n variables?: Record<string, any>;\n }\n ): string {\n return GT.formatMessage(message, {\n locales: this._renderingLocales,\n ...options,\n });\n }\n /**\n * Formats a number according to the specified locales and options.\n *\n * @param {number} number - The number to format\n * @param {Object} [options] - Additional options for number formatting\n * @param {string[]} [options.locales] - The locales to use for formatting\n * @param {Intl.NumberFormatOptions} [options] - Additional Intl.NumberFormat options\n * @returns {string} The formatted number\n *\n * @example\n * gt.formatNum(1234.56, { style: 'currency', currency: 'USD' });\n * // Returns: \"$1,234.56\"\n */\n formatNum(\n number: number,\n options?: {\n locales?: string[];\n } & Intl.NumberFormatOptions\n ): string {\n return GT.formatNum(number, {\n locales: this._renderingLocales,\n ...options,\n });\n }\n\n /**\n * Formats a date according to the specified locales and options.\n *\n * @param {Date} date - The date to format\n * @param {Object} [options] - Additional options for date formatting\n * @param {string[]} [options.locales] - The locales to use for formatting\n * @param {Intl.DateTimeFormatOptions} [options] - Additional Intl.DateTimeFormat options\n * @returns {string} The formatted date\n *\n * @example\n * gt.formatDateTime(new Date(), { dateStyle: 'full', timeStyle: 'long' });\n * // Returns: \"Thursday, March 14, 2024 at 2:30:45 PM GMT-7\"\n */\n formatDateTime(\n date: Date,\n options?: {\n locales?: string[];\n } & Intl.DateTimeFormatOptions\n ): string {\n return GT.formatDateTime(date, {\n locales: this._renderingLocales,\n ...options,\n });\n }\n\n /**\n * Formats a currency value according to the specified locales and options.\n *\n * @param {number} value - The currency value to format\n * @param {string} currency - The currency code (e.g., 'USD', 'EUR')\n * @param {Object} [options] - Additional options for currency formatting\n * @param {string[]} [options.locales] - The locales to use for formatting\n * @param {Intl.NumberFormatOptions} [options] - Additional Intl.NumberFormat options\n * @returns {string} The formatted currency value\n *\n * @example\n * gt.formatCurrency(1234.56, 'USD', { style: 'currency' });\n * // Returns: \"$1,234.56\"\n */\n formatCurrency(\n value: number,\n currency: string,\n options?: {\n locales?: string[];\n } & Intl.NumberFormatOptions\n ): string {\n return GT.formatCurrency(value, currency, {\n locales: this._renderingLocales,\n ...options,\n });\n }\n\n /**\n * Formats a list of items according to the specified locales and options.\n *\n * @param {Array<string | number>} array - The list of items to format\n * @param {Object} [options] - Additional options for list formatting\n * @param {string[]} [options.locales] - The locales to use for formatting\n * @param {Intl.ListFormatOptions} [options] - Additional Intl.ListFormat options\n * @returns {string} The formatted list\n *\n * @example\n * gt.formatList(['apple', 'banana', 'orange'], { type: 'conjunction' });\n * // Returns: \"apple, banana, and orange\"\n */\n formatList(\n array: Array<string | number>,\n options?: {\n locales?: string[];\n } & Intl.ListFormatOptions\n ) {\n return _formatList({\n value: array,\n locales: options?.locales || this._renderingLocales,\n options: options,\n });\n }\n\n /**\n * Formats a relative time value according to the specified locales and options.\n *\n * @param {number} value - The relative time value to format\n * @param {Intl.RelativeTimeFormatUnit} unit - The unit of time (e.g., 'second', 'minute', 'hour', 'day', 'week', 'month', 'year')\n * @param {Object} options - Additional options for relative time formatting\n * @param {string[]} [options.locales] - The locales to use for formatting\n * @param {Intl.RelativeTimeFormatOptions} [options] - Additional Intl.RelativeTimeFormat options\n * @returns {string} The formatted relative time string\n *\n * @example\n * gt.formatRelativeTime(-1, 'day', { locales: ['en-US'], numeric: 'auto' });\n * // Returns: \"yesterday\"\n */\n formatRelativeTime(\n value: number,\n unit: Intl.RelativeTimeFormatUnit,\n options?: {\n locales?: string[];\n } & Omit<Intl.RelativeTimeFormatOptions, 'locales'>\n ): string {\n return GT.formatRelativeTime(value, unit, {\n locales: this._renderingLocales,\n ...options,\n });\n }\n // -------------- Locale Properties -------------- //\n\n /**\n * Retrieves the display name of a locale code using Intl.DisplayNames.\n *\n * @param {string} [locale=this.targetLocale] - A BCP-47 locale code\n * @returns {string} The display name corresponding to the code\n * @throws {Error} If no target locale is provided\n *\n * @example\n * gt.getLocaleName('es-ES');\n * // Returns: \"Spanish (Spain)\"\n */\n getLocaleName(locale = this.targetLocale): string {\n if (!locale) throw new Error(noTargetLocaleProvidedError('getLocaleName'));\n return _getLocaleName(locale, this.sourceLocale, this.customMapping);\n }\n\n /**\n * Retrieves an emoji based on a given locale code.\n * Uses the locale's region (if present) to select an emoji or falls back on default emojis.\n *\n * @param {string} [locale=this.targetLocale] - A BCP-47 locale code (e.g., 'en-US', 'fr-CA')\n * @returns {string} The emoji representing the locale or its region\n * @throws {Error} If no target locale is provided\n *\n * @example\n * gt.getLocaleEmoji('es-ES');\n * // Returns: \"🇪🇸\"\n */\n getLocaleEmoji(locale = this.targetLocale): string {\n if (!locale) throw new Error(noTargetLocaleProvidedError('getLocaleEmoji'));\n return GT.getLocaleEmoji(locale, this.customMapping);\n }\n\n /**\n * Retrieves an emoji based on a given locale code, taking into account region, language, and specific exceptions.\n *\n * This function uses the locale's region (if present) to select an emoji or falls back on default emojis for certain languages.\n *\n * @param locale - A string representing the locale code (e.g., 'en-US', 'fr-CA').\n * @param {CustomMapping} [customMapping] - A custom mapping of locale codes to their names.\n * @returns The emoji representing the locale or its region, or a default emoji if no specific match is found.\n */\n static getLocaleEmoji(locale: string, customMapping?: CustomMapping): string {\n return _getLocaleEmoji(locale, customMapping);\n }\n\n /**\n * Generates linguistic details for a given locale code.\n *\n * This function returns information about the locale,\n * script, and region of a given language code both in a standard form and in a maximized form (with likely script and region).\n * The function provides these names in both your default language and native forms, and an associated emoji.\n *\n * @param {string} [locale=this.targetLocale] - The locale code to get properties for (e.g., \"de-AT\").\n * @returns {LocaleProperties} - An object containing detailed information about the locale.\n *\n * @property {string} code - The full locale code, e.g., \"de-AT\".\n * @property {string} name - Language name in the default display language, e.g., \"Austrian German\".\n * @property {string} nativeName - Language name in the locale's native language, e.g., \"Österreichisches Deutsch\".\n * @property {string} languageCode - The base language code, e.g., \"de\".\n * @property {string} languageName - The language name in the default display language, e.g., \"German\".\n * @property {string} nativeLanguageName - The language name in the native language, e.g., \"Deutsch\".\n * @property {string} nameWithRegionCode - Language name with region in the default language, e.g., \"German (AT)\".\n * @property {string} nativeNameWithRegionCode - Language name with region in the native language, e.g., \"Deutsch (AT)\".\n * @property {string} regionCode - The region code from maximization, e.g., \"AT\".\n * @property {string} regionName - The region name in the default display language, e.g., \"Austria\".\n * @property {string} nativeRegionName - The region name in the native language, e.g., \"Österreich\".\n * @property {string} scriptCode - The script code from maximization, e.g., \"Latn\".\n * @property {string} scriptName - The script name in the default display language, e.g., \"Latin\".\n * @property {string} nativeScriptName - The script name in the native language, e.g., \"Lateinisch\".\n * @property {string} maximizedCode - The maximized locale code, e.g., \"de-Latn-AT\".\n * @property {string} maximizedName - Maximized locale name with likely script in the default language, e.g., \"Austrian German (Latin)\".\n * @property {string} nativeMaximizedName - Maximized locale name in the native language, e.g., \"Österreichisches Deutsch (Lateinisch)\".\n * @property {string} minimizedCode - Minimized locale code, e.g., \"de-AT\" (or \"de\" for \"de-DE\").\n * @property {string} minimizedName - Minimized language name in the default language, e.g., \"Austrian German\".\n * @property {string} nativeMinimizedName - Minimized language name in the native language, e.g., \"Österreichisches Deutsch\".\n * @property {string} emoji - The emoji associated with the locale's region, if applicable.\n */\n getLocaleProperties(locale = this.targetLocale): LocaleProperties {\n if (!locale)\n throw new Error(noTargetLocaleProvidedError('getLocaleProperties'));\n return GT.getLocaleProperties(\n locale,\n this.sourceLocale,\n this.customMapping\n );\n }\n\n /**\n * Determines whether a translation is required based on the source and target locales.\n *\n * @param {string} [sourceLocale=this.sourceLocale] - The locale code for the original content\n * @param {string} [targetLocale=this.targetLocale] - The locale code to translate into\n * @param {string[]} [approvedLocales=this.locales] - Optional array of approved target locales\n * @returns {boolean} True if translation is required, false otherwise\n * @throws {Error} If no source locale is provided\n * @throws {Error} If no target locale is provided\n *\n * @example\n * gt.requiresTranslation('en-US', 'es-ES');\n * // Returns: true\n */\n requiresTranslation(\n sourceLocale = this.sourceLocale,\n targetLocale = this.targetLocale,\n approvedLocales: string[] | undefined = this.locales\n ): boolean {\n if (!sourceLocale)\n throw new Error(noSourceLocaleProvidedError('requiresTranslation'));\n if (!targetLocale)\n throw new Error(noTargetLocaleProvidedError('requiresTranslation'));\n return _requiresTranslation(sourceLocale, targetLocale, approvedLocales);\n }\n\n /**\n * Determines the best matching locale from the provided approved locales list.\n *\n * @param {string | string[]} locales - A single locale or array of locales in preference order\n * @param {string[]} [approvedLocales=this.locales] - Array of approved locales in preference order\n * @returns {string | undefined} The best matching locale or undefined if no match is found\n *\n * @example\n * gt.determineLocale(['fr-CA', 'fr-FR'], ['en-US', 'fr-FR', 'es-ES']);\n * // Returns: \"fr-FR\"\n */\n determineLocale(\n locales: string | string[],\n approvedLocales: string[] | undefined = this.locales || []\n ): string | undefined {\n return _determineLocale(locales, approvedLocales);\n }\n\n /**\n * Gets the text direction for a given locale code.\n *\n * @param {string} [locale=this.targetLocale] - A BCP-47 locale code\n * @returns {'ltr' | 'rtl'} 'rtl' if the locale is right-to-left, otherwise 'ltr'\n * @throws {Error} If no target locale is provided\n *\n * @example\n * gt.getLocaleDirection('ar-SA');\n * // Returns: \"rtl\"\n */\n getLocaleDirection(locale = this.targetLocale): 'ltr' | 'rtl' {\n if (!locale)\n throw new Error(noTargetLocaleProvidedError('getLocaleDirection'));\n return GT.getLocaleDirection(locale);\n }\n\n /**\n * Checks if a given BCP 47 locale code is valid.\n *\n * @param {string} [locale=this.targetLocale] - The BCP 47 locale code to validate\n * @returns {boolean} True if the locale code is valid, false otherwise\n * @throws {Error} If no target locale is provided\n *\n * @example\n * gt.isValidLocale('en-US');\n * // Returns: true\n */\n isValidLocale(locale = this.targetLocale): boolean {\n if (!locale) throw new Error(noTargetLocaleProvidedError('isValidLocale'));\n return GT.isValidLocale(locale);\n }\n\n /**\n * Standardizes a BCP 47 locale code to ensure correct formatting.\n *\n * @param {string} [locale=this.targetLocale] - The BCP 47 locale code to standardize\n * @returns {string} The standardized locale code or empty string if invalid\n * @throws {Error} If no target locale is provided\n *\n * @example\n * gt.standardizeLocale('en_us');\n * // Returns: \"en-US\"\n */\n standardizeLocale(locale = this.targetLocale): string {\n if (!locale)\n throw new Error(noTargetLocaleProvidedError('standardizeLocale'));\n return _standardizeLocale(locale);\n }\n\n /**\n * Checks if multiple BCP 47 locale codes represent the same dialect.\n *\n * @param {...(string | string[])} locales - The BCP 47 locale codes to compare\n * @returns {boolean} True if all codes represent the same dialect, false otherwise\n *\n * @example\n * gt.isSameDialect('en-US', 'en-GB');\n * // Returns: false\n *\n * gt.isSameDialect('en', 'en-US');\n * // Returns: true\n */\n isSameDialect(...locales: (string | string[])[]): boolean {\n return GT.isSameDialect(...locales);\n }\n\n /**\n * Checks if multiple BCP 47 locale codes represent the same language.\n *\n * @param {...(string | string[])} locales - The BCP 47 locale codes to compare\n * @returns {boolean} True if all codes represent the same language, false otherwise\n *\n * @example\n * gt.isSameLanguage('en-US', 'en-GB');\n * // Returns: true\n */\n isSameLanguage(...locales: (string | string[])[]): boolean {\n return _isSameLanguage(...locales);\n }\n\n /**\n * Checks if a locale is a superset of another locale.\n *\n * @param {string} superLocale - The locale to check if it is a superset\n * @param {string} subLocale - The locale to check if it is a subset\n * @returns {boolean} True if superLocale is a superset of subLocale, false otherwise\n *\n * @example\n * gt.isSupersetLocale('en', 'en-US');\n * // Returns: true\n *\n * gt.isSupersetLocale('en-US', 'en');\n * // Returns: false\n */\n isSupersetLocale(superLocale: string, subLocale: string): boolean {\n return GT.isSupersetLocale(superLocale, subLocale);\n }\n\n // ============================================================ //\n // Static methods //\n // ============================================================ //\n\n // -------------- Formatting -------------- //\n\n static formatMessage(\n message: string,\n options?: {\n locales?: string[];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n variables?: Record<string, any>;\n }\n ): string {\n return _formatMessage(message, options?.locales, options?.variables);\n }\n\n /**\n * Formats a number according to the specified locales and options.\n * @param {Object} params - The parameters for the number formatting.\n * @param {number} params.value - The number to format.\n * @param {Intl.NumberFormatOptions} [params.options] - Additional options for number formatting.\n * @param {string[]} [params.options.locales] - The locales to use for formatting.\n * @returns {string} The formatted number.\n */\n static formatNum(\n number: number,\n options: {\n locales: string[];\n } & Intl.NumberFormatOptions\n ): string {\n return _formatNum({\n value: number,\n locales: options.locales,\n options,\n });\n }\n\n /**\n * Formats a date according to the specified languages and options.\n * @param {Object} params - The parameters for the date formatting.\n * @param {Date} params.value - The date to format.\n * @param {Intl.DateTimeFormatOptions} [params.options] - Additional options for date formatting.\n * @param {string[]} [params.options.locales] - The languages to use for formatting.\n * @returns {string} The formatted date.\n */\n static formatDateTime(\n date: Date,\n options?: {\n locales?: string[];\n } & Intl.DateTimeFormatOptions\n ): string {\n return _formatDateTime({\n value: date,\n locales: options?.locales,\n options,\n });\n }\n\n /**\n * Formats a currency value according to the specified languages, currency, and options.\n * @param {Object} params - The parameters for the currency formatting.\n * @param {number} params.value - The currency value to format.\n * @param {string} params.currency - The currency code (e.g., 'USD').\n * @param {Intl.NumberFormatOptions} [params.options={}] - Additional options for currency formatting.\n * @param {string[]} [params.options.locales] - The locale codes to use for formatting.\n * @returns {string} The formatted currency value.\n */\n static formatCurrency(\n value: number,\n currency: string,\n options: {\n locales: string[];\n } & Intl.NumberFormatOptions\n ): string {\n return _formatCurrency({\n value,\n currency,\n locales: options.locales,\n options,\n });\n }\n\n /**\n * Formats a list of items according to the specified locales and options.\n * @param {Object} params - The parameters for the list formatting.\n * @param {Array<string | number>} params.value - The list of items to format.\n * @param {Intl.ListFormatOptions} [params.options={}] - Additional options for list formatting.\n * @param {string[]} [params.options.locales] - The locales to use for formatting.\n * @returns {string} The formatted list.\n */\n static formatList(\n array: Array<string | number>,\n options: {\n locales: string[];\n } & Intl.ListFormatOptions\n ): string {\n return _formatList({\n value: array,\n locales: options.locales,\n options,\n });\n }\n\n /**\n * Formats a relative time value according to the specified locales and options.\n * @param {Object} params - The parameters for the relative time formatting.\n * @param {number} params.value - The relative time value to format.\n * @param {Intl.RelativeTimeFormatUnit} params.unit - The unit of time (e.g., 'second', 'minute', 'hour', 'day', 'week', 'month', 'year').\n * @param {Intl.RelativeTimeFormatOptions} [params.options={}] - Additional options for relative time formatting.\n * @param {string[]} [params.options.locales] - The locales to use for formatting.\n * @returns {string} The formatted relative time string.\n */\n static formatRelativeTime(\n value: number,\n unit: Intl.RelativeTimeFormatUnit,\n options: {\n locales: string[];\n } & Omit<Intl.RelativeTimeFormatOptions, 'locales'>\n ): string {\n return _formatRelativeTime({\n value,\n unit,\n locales: options.locales,\n options,\n });\n }\n // -------------- Locale Properties -------------- //\n\n /**\n * Retrieves the display name of locale code using Intl.DisplayNames.\n *\n * @param {string} locale - A BCP-47 locale code.\n * @param {string} [defaultLocale] - The default locale to use for formatting.\n * @param {CustomMapping} [customMapping] - A custom mapping of locale codes to their names.\n * @returns {string} The display name corresponding to the code.\n */\n static getLocaleName(\n locale: string,\n defaultLocale?: string,\n customMapping?: CustomMapping\n ): string {\n return _getLocaleName(locale, defaultLocale, customMapping);\n }\n\n /**\n * Generates linguistic details for a given locale code.\n *\n * This function returns information about the locale,\n * script, and region of a given language code both in a standard form and in a maximized form (with likely script and region).\n * The function provides these names in both your default language and native forms, and an associated emoji.\n *\n * @param {string} locale - The locale code to get properties for (e.g., \"de-AT\").\n * @param {string} [defaultLocale] - The default locale to use for formatting.\n * @param {CustomMapping} [customMapping] - A custom mapping of locale codes to their names.\n * @returns {LocaleProperties} - An object containing detailed information about the locale.\n *\n * @property {string} code - The full locale code, e.g., \"de-AT\".\n * @property {string} name - Language name in the default display language, e.g., \"Austrian German\".\n * @property {string} nativeName - Language name in the locale's native language, e.g., \"Österreichisches Deutsch\".\n * @property {string} languageCode - The base language code, e.g., \"de\".\n * @property {string} languageName - The language name in the default display language, e.g., \"German\".\n * @property {string} nativeLanguageName - The language name in the native language, e.g., \"Deutsch\".\n * @property {string} nameWithRegionCode - Language name with region in the default language, e.g., \"German (AT)\".\n * @property {string} nativeNameWithRegionCode - Language name with region in the native language, e.g., \"Deutsch (AT)\".\n * @property {string} regionCode - The region code from maximization, e.g., \"AT\".\n * @property {string} regionName - The region name in the default display language, e.g., \"Austria\".\n * @property {string} nativeRegionName - The region name in the native language, e.g., \"Österreich\".\n * @property {string} scriptCode - The script code from maximization, e.g., \"Latn\".\n * @property {string} scriptName - The script name in the default display language, e.g., \"Latin\".\n * @property {string} nativeScriptName - The script name in the native language, e.g., \"Lateinisch\".\n * @property {string} maximizedCode - The maximized locale code, e.g., \"de-Latn-AT\".\n * @property {string} maximizedName - Maximized locale name with likely script in the default language, e.g., \"Austrian German (Latin)\".\n * @property {string} nativeMaximizedName - Maximized locale name in the native language, e.g., \"Österreichisches Deutsch (Lateinisch)\".\n * @property {string} minimizedCode - Minimized locale code, e.g., \"de-AT\" (or \"de\" for \"de-DE\").\n * @property {string} minimizedName - Minimized language name in the default language, e.g., \"Austrian German\".\n * @property {string} nativeMinimizedName - Minimized language name in the native language, e.g., \"Österreichisches Deutsch\".\n * @property {string} emoji - The emoji associated with the locale's region, if applicable.\n */\n static getLocaleProperties(\n locale: string,\n defaultLocale?: string,\n customMapping?: CustomMapping\n ): LocaleProperties {\n return _getLocaleProperties(locale, defaultLocale, customMapping);\n }\n\n /**\n * Determines whether a translation is required based on the source and target locales.\n *\n * - If the target locale is not specified, the function returns `false`, as translation is not needed.\n * - If the source and target locale are the same, returns `false`, indicating that no translation is necessary.\n * - If the `approvedLocales` array is provided, and the target locale is not within that array, the function also returns `false`.\n * - Otherwise, it returns `true`, meaning that a translation is required.\n *\n * @param {string} sourceLocale - The locale code for the original content (BCP 47 locale code).\n * @param {string} targetLocale - The locale code of the language to translate the content into (BCP 47 locale code).\n * @param {string[]} [approvedLocale] - An optional array of approved target locales.\n *\n * @returns {boolean} - Returns `true` if translation is required, otherwise `false`.\n */\n static requiresTranslation(\n sourceLocale: string,\n targetLocale: string,\n approvedLocales?: string[]\n ): boolean {\n return _requiresTranslation(sourceLocale, targetLocale, approvedLocales);\n }\n\n /**\n * Determines the best matching locale from the provided approved locales list.\n * @param {string | string[]} locales - A single locale or an array of locales sorted in preference order.\n * @param {string[]} [approvedLocales=this.locales] - An array of approved locales, also sorted by preference.\n * @returns {string | undefined} - The best matching locale from the approvedLocales list, or undefined if no match is found.\n */\n static determineLocale(\n locales: string | string[],\n approvedLocales: string[] | undefined = []\n ): string | undefined {\n return _determineLocale(locales, approvedLocales);\n }\n\n /**\n * Get the text direction for a given locale code using the Intl.Locale API.\n *\n * @param {string} locale - A BCP-47 locale code.\n * @returns {string} - 'rtl' if the locale is right-to-left, otherwise 'ltr'.\n */\n static getLocaleDirection(locale: string): 'ltr' | 'rtl' {\n return _getLocaleDirection(locale);\n }\n\n /**\n * Checks if a given BCP 47 locale code is valid.\n * @param {string} locale - The BCP 47 locale code to validate.\n * @returns {boolean} True if the BCP 47 code is valid, false otherwise.\n */\n static isValidLocale(locale: string): boolean {\n return _isValidLocale(locale);\n }\n\n /**\n * Standardizes a BCP 47 locale code to ensure correct formatting.\n * @param {string} locale - The BCP 47 locale code to standardize.\n * @returns {string} The standardized BCP 47 locale code or an empty string if it is an invalid code.\n */\n static standardizeLocale(locale: string): string {\n return _standardizeLocale(locale);\n }\n\n /**\n * Checks if multiple BCP 47 locale codes represent the same dialect.\n * @param {string[]} locales - The BCP 47 locale codes to compare.\n * @returns {boolean} True if all BCP 47 codes represent the same dialect, false otherwise.\n */\n static isSameDialect(...locales: (string | string[])[]): boolean {\n return _isSameDialect(...locales);\n }\n\n /**\n * Checks if multiple BCP 47 locale codes represent the same language.\n * @param {string[]} locales - The BCP 47 locale codes to compare.\n * @returns {boolean} True if all BCP 47 codes represent the same language, false otherwise.\n */\n static isSameLanguage(...locales: (string | string[])[]): boolean {\n return _isSameLanguage(...locales);\n }\n\n /**\n * Checks if a locale is a superset of another locale.\n * A subLocale is a subset of superLocale if it is an extension of superLocale or are otherwise identical.\n *\n * @param {string} superLocale - The locale to check if it is a superset of the other locale.\n * @param {string} subLocale - The locale to check if it is a subset of the other locale.\n * @returns {boolean} True if the first locale is a superset of the second locale, false otherwise.\n */\n static isSupersetLocale(superLocale: string, subLocale: string): boolean {\n return _isSupersetLocale(superLocale, subLocale);\n }\n}\n","export const defaultCacheUrl = 'https://cdn.gtx.dev' as const;\nexport const defaultBaseUrl = 'https://api.gtx.dev' as const;\nexport const defaultRuntimeApiUrl = 'https://runtime.gtx.dev' as const;\nexport const translateBatchUrl = '/v1/translate/batch' as const;\nexport const translateJsxUrl = '/v1/translate/react' as const;\nexport const translateContentUrl = '/v1/translate/content' as const;\nexport const translateIcuUrl = '/v1/translate/icu' as const;\nexport const updateProjectTranslationsUrl =\n '/v1/project/translations/update' as const;\nexport const getProjectLocalesUrl = '/v1/project/locales' as const;\n","import { intlCache } from '../cache/IntlCache';\n\n/**\n * Get the text direction for a given locale code using the Intl.Locale API.\n *\n * @param {string} code - The locale code to check.\n * @returns {string} - 'rtl' if the language is right-to-left, otherwise 'ltr'.\n * @internal\n */\nexport function _getLocaleDirection(code: string): 'ltr' | 'rtl' {\n try {\n const locale = intlCache.get('Locale', code);\n // Return 'rtl' if the text direction of the language is right-to-left, otherwise 'ltr'\n return (locale as any)?.textInfo?.direction === 'rtl' ? 'rtl' : 'ltr';\n } catch {\n // If the code is invalid or causes an error, fallback to 'ltr'\n return 'ltr';\n }\n}\n","import { intlCache } from 'src/cache/IntlCache';\nimport { _standardizeLocale } from './isValidLocale';\n\n/**\n * @internal\n */\nexport default function _isSupersetLocale(\n superLocale: string,\n subLocale: string\n): boolean {\n try {\n const {\n language: languageSuper,\n region: regionSuper,\n script: scriptSuper,\n } = intlCache.get('Locale', _standardizeLocale(superLocale));\n const {\n language: languageSub,\n region: regionSub,\n script: scriptSub,\n } = intlCache.get('Locale', _standardizeLocale(subLocale));\n\n if (languageSuper !== languageSub) return false;\n if (regionSuper && regionSuper !== regionSub) return false;\n if (scriptSuper && scriptSuper !== scriptSub) return false;\n\n return true;\n } catch (error) {\n console.error(error);\n return false;\n }\n}\n"],"names":["extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","prototype","hasOwnProperty","call","__extends","TypeError","String","__","this","constructor","create","__assign","assign","t","s","i","n","arguments","length","apply","__rest","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","__spreadArray","to","from","pack","ar","l","slice","concat","SuppressedError","intlCache","IntlCache","cache","Map","_generateKey","locales","options","localeKey","isArray","join","sortedOptions","JSON","stringify","keys","sort","get","key","has","intlObject","Intl","set","libraryDefaultLocale","scriptExceptions","_isValidLocale","locale","_a","language","region_1","script_1","split","partCount","type","of","isCustomLanguage","includes","_b","_standardizeLocale","getCanonicalLocales","checkTwoLocalesAreSameDialect","codeA","codeB","languageA","regionA","scriptA","languageB","regionB","scriptB","_isSameDialect","_i","flattenedCodes","flat","map","j","error","console","_isSameLanguage","languages_1","every","_requiresTranslation","sourceLocale","targetLocale","approvedLocales","some","approvedLocale","getCustomProperty","customMapping","property","undefined","_getLocaleEmoji","standardizedLocale","localeObject","region","customEmoji","emojis","extrapolated","maximize","extrapolatedRegion","exceptions","defaultEmoji","europeAfricaGlobe","ca","eu","ku","bo","ug","gd","cy","gv","grc","AF","AX","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BQ","BA","BW","BV","BR","IO","BN","BG","BF","BI","CV","KH","CM","CA","KY","CF","TD","CL","CN","CX","CC","CO","KM","CD","CG","CK","CR","CI","HR","CU","CW","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","SZ","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GG","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IM","IL","IT","JM","JP","JE","JO","KZ","KE","KI","KP","KR","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","ME","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MK","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","BL","SH","KN","LC","MF","PM","VC","WS","SM","ST","SA","SN","RS","SC","SL","SG","SX","SK","SI","SB","SO","ZA","GS","SS","ES","LK","SD","SR","SJ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW","EU","createCustomLocaleProperties","lArray","merged","lArray_1","value","name","_getLocaleProperties","defaultLocale","customLocaleProperties","languageCode","baseRegion","maximizedLocale","maximizedCode","toString","regionCode","scriptCode","script","minimizedCode","minimize","defaultLanguageOrder","nativeLanguageOrder","languageNames","nativeLanguageNames","customName","customNativeName","nativeName","maximizedName","nativeMaximizedName","minimizedName","nativeMinimizedName","languageName","nativeLanguageName","nameWithRegionCode","nativeNameWithRegionCode","regionNames","nativeRegionNames","regionName","nativeRegionName","scriptNames","nativeScriptNames","code","scriptName","nativeScriptName","emoji","codeParts","_determineLocale","filter","candidates","getMatchingCode","locales_2","codes","matchingCode","locales_1","memoize","fn","cacheDefault","serializer","serializerDefault","strategy","strategyDefault","monadic","arg","cacheKey","computedValue","variadic","args","assemble","context","serialize","bind","ErrorKind","TYPE","SKELETON_TYPE","ObjectWithoutPrototypeCache","strategies","isLiteralElement","el","literal","isArgumentElement","argument","isNumberElement","number","isDateElement","date","isTimeElement","time","isSelectElement","select","isPluralElement","plural","isPoundElement","pound","isTagElement","tag","isNumberSkeleton","isDateTimeSkeleton","dateTime","SPACE_SEPARATOR_REGEX","DATE_TIME_REGEX","parseDateTimeSkeleton","skeleton","result","replace","match","len","era","year","RangeError","month","day","weekday","hour12","hourCycle","hour","minute","second","timeZoneName","WHITE_SPACE_REGEX","FRACTION_PRECISION_REGEX","SIGNIFICANT_PRECISION_REGEX","INTEGER_WIDTH_REGEX","CONCISE_INTEGER_WIDTH_REGEX","parseSignificantPrecision","str","roundingPriority","_","g1","g2","minimumSignificantDigits","maximumSignificantDigits","parseSign","signDisplay","currencySign","parseConciseScientificAndEngineeringStem","stem","notation","test","Error","minimumIntegerDigits","parseNotationOptions","opt","signOpts","parseNumberSkeleton","tokens","tokens_1","token","style","scale","currency","useGrouping","maximumFractionDigits","unit","compactDisplay","reduce","all","currencyDisplay","unitDisplay","parseFloat","roundingMode","g3","g4","g5","minimumFractionDigits","trailingZeroDisplay","conciseScientificAndEngineeringOpts","timeData","AC","CP","DG","EA","IC","TA","XK","getDefaultHourSymbolFromLocale","hourCycles","regionTag","languageTag","SPACE_SEPARATOR_START_REGEX","RegExp","source","SPACE_SEPARATOR_END_REGEX","createLocation","start","end","hasNativeStartsWith","startsWith","hasNativeFromCodePoint","fromCodePoint","hasNativeFromEntries","fromEntries","hasNativeCodePointAt","codePointAt","hasTrimStart","trimStart","hasTrimEnd","trimEnd","isSafeInteger","Number","isFinite","Math","floor","abs","REGEX_SUPPORTS_U_AND_Y","exec","matchIdentifierAtIndex","search","position","codePoints","elements","fromCharCode","entries","obj","entries_1","k","v","index","size","first","charCodeAt","flag","IDENTIFIER_PREFIX_RE_1","lastIndex","c","_isWhiteSpace","_isPatternSyntax","push","ErrorCode","Parser","message","offset","line","column","ignoreTag","requiresOtherClause","shouldParseSkeletons","parse","parseMessage","nestingLevel","parentArgType","expectingCloseTag","isEOF","char","parseArgument","err","val","peek","UNMATCHED_CLOSING_TAG","clonePosition","_isAlpha","parseTag","parseLiteral","bump","location","startPosition","tagName","parseTagName","bumpSpace","bumpIf","childrenResult","children","endTagStartPosition","INVALID_TAG","closingTagNameStartPosition","UNCLOSED_TAG","startOffset","parseQuoteResult","tryParseQuote","parseUnquotedResult","tryParseUnquoted","parseLeftAngleResult","tryParseLeftAngleBracket","codepoint","ch","openingBracePosition","EXPECT_ARGUMENT_CLOSING_BRACE","EMPTY_ARGUMENT","parseIdentifierIfPossible","MALFORMED_ARGUMENT","parseArgumentOptions","startingPosition","endOffset","bumpTo","typeStartPosition","argType","typeEndPosition","EXPECT_ARGUMENT_TYPE","styleAndLocation","styleStartPosition","parseSimpleArgStyleIfPossible","EXPECT_ARGUMENT_STYLE","styleLocation","argCloseResult","tryParseArgumentClose","location_1","parseNumberSkeletonFromString","EXPECT_DATE_TIME_SKELETON","dateTimePattern","skeletonCopy","patternPos","patternChar","charAt","extraLength","hourLen","dayPeriodLen","hourChar","getBestPattern","pattern","parsedOptions","typeEndPosition_1","EXPECT_SELECT_ARGUMENT_OPTIONS","identifierAndLocation","pluralOffset","EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE","tryParseDecimalInteger","INVALID_PLURAL_ARGUMENT_OFFSET_VALUE","optionsResult","tryParsePluralOrSelectOptions","location_2","pluralType","INVALID_ARGUMENT_TYPE","nestedBraces","apostrophePosition","bumpUntil","UNCLOSED_QUOTE_IN_ARGUMENT_STYLE","stringTokens_1","x","stemAndOptions","options_1","INVALID_NUMBER_SKELETON","expectCloseTag","parsedFirstIdentifier","hasOtherClause","parsedSelectors","Set","selector","selectorLocation","EXPECT_PLURAL_ARGUMENT_SELECTOR","INVALID_PLURAL_ARGUMENT_SELECTOR","DUPLICATE_SELECT_ARGUMENT_SELECTOR","DUPLICATE_PLURAL_ARGUMENT_SELECTOR","EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT","EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT","fragmentResult","add","EXPECT_SELECT_ARGUMENT_SELECTOR","MISSING_OTHER_CLAUSE","expectNumberError","invalidNumberError","sign","hasDigits","decimal","kind","prefix","currentOffset","targetOffset","min","nextCode","pruneLocation","els","forEach","opts","SyntaxError","originalMessage","captureLocation","PART_TYPE","FormatError","_super","msg","_this","InvalidValueError","variableId","INVALID_VALUE","InvalidValueTypeError","MissingValueError","MISSING_VALUE","isFormatXMLElementFn","formatToParts","formatters","formats","values","currentPluralValue","els_1","getNumberFormat","format","varName","object","getDateTimeFormat","medium","value_1","formatFn","chunks","other","PluralRules","MISSING_INTL_API","rule","getPluralRules","parts","part","lastPart","mergeLiteral","mergeConfigs","defaultConfig","configs","c1","c2","createFastMemoizeCache","store","IntlMessageFormat","overrideFormats","formatterCache","pluralRules","ast","resolvedOptions","resolvedLocale","NumberFormat","supportedLocalesOf","getAst","resolveLocale","__parse","parseOpts","DateTimeFormat","defineProperty","memoizedDefaultLocale","enumerable","configurable","Locale","supportedLocales","integer","percent","short","long","full","_formatList","_c","_getLocaleName","defaultLanguage","noTargetLocaleProvidedError","functionName","invalidLocaleError","apiKey","devApiKey","projectId","baseUrl","process","_d","env","GT_API_KEY","_e","GT_DEV_API_KEY","_f","GT_PROJECT_ID","_renderingLocales","result_1","invalidLocales_1","invalidLocalesError","translatef","mtranslatef","formatMessage","formatNum","formatDateTime","formatCurrency","formatList","array","formatRelativeTime","getLocaleName","getLocaleEmoji","getLocaleProperties","requiresTranslation","determineLocale","getLocaleDirection","isValidLocale","standardizeLocale","isSameDialect","isSameLanguage","isSupersetLocale","superLocale","subLocale","variables","_formatMessage","numberingSystem","_formatNum","calendar","_formatDateTime","_formatCurrency","numeric","_formatRelativeTime","textInfo","direction","_getLocaleDirection","languageSuper","regionSuper","scriptSuper","languageSub","regionSub","scriptSub","_isSupersetLocale"],"mappings":"aAgBA,IAAIA,EAAgB,SAASC,EAAGC,GAI5B,OAHAF,EAAgBG,OAAOC,gBAClB,CAAEC,UAAW,cAAgBC,OAAS,SAAUL,EAAGC,GAAKD,EAAEI,UAAYH,CAAE,GACzE,SAAUD,EAAGC,GAAK,IAAK,IAAIK,KAAKL,EAAOC,OAAOK,UAAUC,eAAeC,KAAKR,EAAGK,KAAIN,EAAEM,GAAKL,EAAEK,KACzFP,EAAcC,EAAGC,EAC5B,EAEO,SAASS,EAAUV,EAAGC,GACzB,GAAiB,mBAANA,GAA0B,OAANA,EAC3B,MAAM,IAAIU,UAAU,uBAAyBC,OAAOX,GAAK,iCAE7D,SAASY,IAAOC,KAAKC,YAAcf,CAAI,CADvCD,EAAcC,EAAGC,GAEjBD,EAAEO,UAAkB,OAANN,EAAaC,OAAOc,OAAOf,IA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AM,CACF,IACA,KACA,KAEJT,GAAM,CACF,IACA,KACA,IACA,MAEJD,GAAM,CACF,IACA,KACA,KAEJG,GAAM,CACF,IACA,MAEJc,GAAM,CACF,IACA,MAEJD,GAAM,CACF,IACA,KACA,KAEJjB,GAAM,CACF,IACA,KACA,KACA,KAEJmB,GAAM,CACF,IACA,KAEJb,GAAM,CACF,IACA,MAEJkK,GAAM,CACF,IACA,MAEJjK,GAAM,CACF,IACA,KACA,IACA,MAEJS,GAAM,CACF,KACA,KACA,IACA,KAEJP,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,KAEJI,GAAM,CACF,IACA,MAEJf,GAAM,CACF,IACA,KACA,IACA,MAEJS,GAAM,CACF,IACA,KAEJI,GAAM,CACF,IACA,IACA,KACA,MAEJT,GAAM,CACF,IACA,KAEJE,GAAM,CACF,IACA,IACA,KACA,MAEJkB,GAAM,CACF,IACA,KACA,IACA,MAEJO,GAAM,CACF,IACA,IACA,KACA,MAEJG,GAAM,CACF,KACA,KAEJR,GAAM,CACF,IACA,IACA,MAEJS,GAAM,CACF,IACA,MAEJoK,GAAM,CACF,IACA,KACA,KAEJjK,GAAM,CACF,IACA,MAEJF,GAAM,CACF,IACA,IACA,KACA,MAEJR,GAAM,CACF,IACA,IACA,KACA,MAEJL,GAAM,CACF,IACA,IACA,MAEJM,GAAM,CACF,IACA,KACA,KACA,KAEJG,GAAM,CACF,IACA,IACA,KACA,MAEJiX,GAAM,CACF,KAEJ5W,GAAM,CACF,IACA,IACA,KACA,MAEJG,GAAM,CACF,IACA,IACA,KACA,MAEJnB,GAAM,CACF,IACA,MAEJoB,GAAM,CACF,IACA,MAEJX,GAAM,CACF,IACA,IACA,KACA,MAEJY,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,KAEJwB,GAAM,CACF,IACA,MAEJ+U,GAAM,CACF,IACA,IACA,KACA,MAEJrW,GAAM,CACF,IACA,KAEJD,GAAM,CACF,KAEJE,GAAM,CACF,IACA,KACA,IACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJ5D,GAAM,CACF,IACA,KACA,KACA,KAEJga,GAAM,CACF,IACA,IACA,KACA,MAEJnW,GAAM,CACF,IACA,IACA,KACA,MAEJK,GAAM,CACF,IACA,MAEJJ,GAAM,CACF,IACA,KACA,KACA,KAEJoL,GAAM,CACF,IACA,KACA,KACA,KAEJjL,GAAM,CACF,IACA,KAEJ6I,GAAM,CACF,IACA,KACA,IACA,MAEJ1I,GAAM,CACF,KACA,KACA,IACA,KAEJI,GAAM,CACF,KAEJD,GAAM,CACF,IACA,KACA,IACA,MAEJF,GAAM,CACF,IACA,IACA,KACA,MAEJwE,GAAM,CACF,IACA,KACA,IACA,MAEJvE,GAAM,CACF,IACA,KAEJG,GAAM,CACF,IACA,MAEJI,GAAM,CACF,IACA,MAEJ0J,GAAM,CACF,IACA,IACA,KACA,MAEJlJ,GAAM,CACF,IACA,KACA,IACA,MAEJN,GAAM,CACF,IACA,KACA,KAEJL,GAAM,CACF,IACA,MAEJe,GAAM,CACF,IACA,IACA,KACA,MAEJR,GAAM,CACF,IACA,KAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJE,GAAM,CACF,IACA,KAEJN,GAAM,CACF,IACA,KACA,IACA,MAEJY,GAAM,CACF,IACA,MAEJJ,GAAM,CACF,IACA,MAEJtB,GAAM,CACF,IACA,KACA,IACA,MAEJmB,GAAM,CACF,IACA,IACA,KACA,MAEJK,GAAM,CACF,IACA,IACA,KACA,MAEJD,GAAM,CACF,IACA,KACA,IACA,MAEJI,GAAM,CACF,IACA,MAEJC,GAAM,CACF,IACA,KACA,IACA,MAEJK,GAAM,CACF,IACA,KACA,KACA,KAEJD,GAAM,CACF,IACA,IACA,KACA,MAEJ5C,GAAM,CACF,IACA,MAEJ8C,GAAM,CACF,IACA,KAEJ+T,GAAM,CACF,IACA,IACA,KACA,MAEJ5T,GAAM,CACF,KAEJG,GAAM,CACF,IACA,IACA,KACA,MAEJE,GAAM,CACF,IACA,MAEJD,GAAM,CACF,IACA,IACA,KACA,MAEJL,GAAM,CACF,IACA,KAEJvE,GAAM,CACF,IACA,IACA,KACA,MAEJ0E,GAAM,CACF,IACA,KACA,KACA,KAEJD,GAAM,CACF,KACA,KAEJH,GAAM,CACF,KAEJQ,GAAM,CACF,IACA,MAEJG,GAAM,CACF,IACA,IACA,KACA,MAEJF,GAAM,CACF,IACA,KACA,IACA,MAEJG,GAAM,CACF,IACA,KACA,KACA,KAEJF,GAAM,CACF,IACA,IACA,KAEJI,GAAM,CACF,KACA,KACA,IACA,KAEJK,GAAM,CACF,IACA,IACA,KACA,MAEJnF,GAAM,CACF,KACA,IACA,IACA,MAEJ+E,GAAM,CACF,IACA,KACA,IACA,MAEJpE,GAAM,CACF,IACA,IACA,KACA,MAEJ0I,GAAM,CACF,IACA,KACA,IACA,MAEJrE,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,KACA,KACA,KAEJ/E,GAAM,CACF,IACA,KACA,IACA,MAEJ0E,GAAM,CACF,IACA,MAEJO,GAAM,CACF,IACA,KACA,KACA,KAEJE,GAAM,CACF,IACA,KACA,KACA,KAEJgE,GAAM,CACF,IACA,KACA,IACA,MAEJ5D,GAAM,CACF,IACA,KACA,KAEJkF,GAAM,CACF,IACA,IACA,KACA,MAEJpF,GAAM,CACF,IACA,KACA,IACA,MAEJD,GAAM,CACF,IACA,KAEJI,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,MAEJP,GAAM,CACF,IACA,KACA,KACA,KAEJI,GAAM,CACF,IACA,KACA,KACA,KAEJuB,GAAM,CACF,IACA,IACA,KACA,MAEJJ,GAAM,CACF,IACA,MAEJD,GAAM,CACF,IACA,MAEJG,GAAM,CACF,IACA,KACA,KAEJyC,GAAM,CACF,IACA,MAEJzD,GAAM,CACF,IACA,KAEJM,GAAM,CACF,IACA,KACA,IACA,MAEJ0B,GAAM,CACF,IACA,IACA,KACA,MAEJ5B,GAAM,CACF,KAEJgB,GAAM,CACF,KACA,KACA,IACA,KAEJL,GAAM,CACF,IACA,IACA,KACA,MAEJhB,GAAM,CACF,IACA,KACA,KACA,KAEJkC,GAAM,CACF,IACA,KACA,IACA,MAEJ1B,GAAM,CACF,IACA,MAEJC,GAAM,CACF,IACA,KACA,KACA,KAEJS,GAAM,CACF,IACA,IACA,KACA,MAEJZ,GAAM,CACF,IACA,KAEJI,GAAM,CACF,IACA,KAEJN,GAAM,CACF,IACA,KAEJF,GAAM,CACF,IACA,KACA,IACA,MAEJU,GAAM,CACF,IACA,IACA,KACA,MAEJT,GAAM,CACF,KACA,KACA,IACA,KAEJiB,GAAM,CACF,IACA,MAEJE,GAAM,CACF,IACA,IACA,KACA,MAEJI,GAAM,CACF,IACA,MAEJG,GAAM,CACF,KAEJG,GAAM,CACF,IACA,IACA,KACA,MAEJF,GAAM,CACF,IACA,IACA,KACA,MAEJF,GAAM,CACF,IACA,IACA,KACA,MAEJH,GAAM,CACF,IACA,MAEJU,GAAM,CACF,IACA,KAEJX,GAAM,CACF,IACA,IACA,MAEJD,GAAM,CACF,IACA,IACA,KACA,MAEJQ,GAAM,CACF,IACA,IACA,KACA,MAEJJ,GAAM,CACF,IACA,KACA,IACA,MAEJS,GAAM,CACF,IACA,KACA,KACA,KAEJI,GAAM,CACF,IACA,IACA,KACA,MAEJG,GAAM,CACF,IACA,IACA,KACA,MAEJhG,GAAM,CACF,IACA,IACA,MAEJ8F,GAAM,CACF,IACA,KAEJG,GAAM,CACF,IACA,KACA,KACA,KAEJP,GAAM,CACF,IACA,KACA,KAEJS,GAAM,CACF,IACA,KAEJa,GAAM,CACF,IACA,MAEJd,GAAM,CACF,IACA,IACA,KACA,MAEJG,GAAM,CACF,IACA,IACA,KACA,MAEJT,GAAM,CACF,IACA,KACA,KACA,KAEJQ,GAAM,CACF,IACA,MAEJT,GAAM,CACF,IACA,KAEJI,GAAM,CACF,IACA,IACA,KACA,MAEJO,GAAM,CACF,IACA,KACA,KACA,KAEJC,GAAM,CACF,IACA,MAEJC,GAAM,CACF,IACA,MAEJe,GAAM,CACF,IACA,KACA,KAEJd,GAAM,CACF,KAEJC,GAAM,CACF,IACA,KAEJW,GAAM,CACF,IACA,KACA,KACA,KAEJS,GAAM,CACF,IACA,KACA,IACA,MAEJN,GAAM,CACF,IACA,IACA,MAEJa,GAAM,CACF,IACA,KACA,KACA,KAEJG,GAAM,CACF,KAEJd,GAAM,CACF,IACA,KACA,IACA,MAEJd,GAAM,CACF,IACA,IACA,KACA,MAEJiB,GAAM,CACF,IACA,MAEJU,GAAM,CACF,KAEJX,GAAM,CACF,KAEJH,GAAM,CACF,IACA,KACA,IACA,MAEJN,GAAM,CACF,IACA,IACA,MAEJG,GAAM,CACF,IACA,IACA,MAEJS,GAAM,CACF,IACA,KAEJO,GAAM,CACF,IACA,MAEJJ,GAAM,CACF,IACA,KACA,IACA,MAEJd,GAAM,CACF,IACA,MAEJhI,GAAM,CACF,IACA,IACA,KACA,MAEJuI,GAAM,CACF,IACA,IACA,KACA,MAEJe,GAAM,CACF,IACA,KACA,KACA,KAEJlJ,GAAM,CACF,IACA,KACA,IACA,MAEJ+V,GAAM,CACF,IACA,IACA,KACA,MAEJhM,GAAM,CACF,IACA,KACA,IACA,MAEJ1L,GAAM,CACF,IACA,IACA,MAEJoC,GAAM,CACF,IACA,IACA,MAEJ+I,GAAM,CACF,IACA,MAEJF,GAAM,CACF,IACA,KAEJF,GAAM,CACF,IACA,KAEJG,GAAM,CACF,IACA,KACA,KACA,KAEJO,GAAM,CACF,IACA,KAEJF,GAAM,CACF,IACA,KACA,KACA,KAEJF,GAAM,CACF,IACA,KAEJG,GAAM,CACF,IACA,MAEJF,GAAM,CACF,IACA,KACA,IACA,MAEJR,GAAM,CACF,KACA,KACA,IACA,KAEJE,GAAM,CACF,KACA,KACA,IACA,KAEJa,GAAM,CACF,IACA,KACA,KAEJD,GAAM,CACF,KACA,KACA,IACA,KAEJK,GAAM,CACF,IACA,KACA,IACA,MAEJD,GAAM,CACF,IACA,KACA,IACA,MAEJE,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,KACA,KAEJ5I,GAAM,CACF,IACA,IACA,MAEJ6F,GAAM,CACF,IACA,KACA,IACA,MAEJiD,GAAM,CACF,IACA,IACA,KACA,MAEJE,GAAM,CACF,IACA,KACA,IACA,MAEJC,GAAM,CACF,IACA,KACA,IACA,MAEJF,GAAM,CACF,IACA,KAEJF,GAAM,CACF,IACA,KAEJK,GAAM,CACF,IACA,MAEJpD,GAAM,CACF,IACA,KAEJsO,GAAM,CACF,IACA,KACA,KAEJhL,GAAM,CACF,IACA,KACA,KACA,KAEJxG,GAAM,CACF,IACA,MAEJgE,GAAM,CACF,IACA,IACA,KACA,MAEJyC,GAAM,CACF,IACA,KACA,IACA,MAEJC,GAAM,CACF,IACA,KAEJ,QAAS,CACL,IACA,IACA,KACA,MAEJ,SAAU,CACN,IACA,KACA,KACA,KAEJ,QAAS,CACL,IACA,IACA,MAEJ,SAAU,CACN,IACA,KACA,IACA,MAEJ,QAAS,CACL,IACA,KACA,IACA,MAEJ,QAAS,CACL,IACA,IACA,KACA,MAEJ,QAAS,CACL,IACA,KACA,IACA,MAEJ,QAAS,CACL,IACA,IACA,KACA,MAEJ,QAAS,CACL,IACA,IACA,KACA,MAEJ,QAAS,CACL,IACA,IACA,KACA,MAEJ,QAAS,CACL,IACA,IACA,MAEJ,QAAS,CACL,IACA,IACA,MAEJ,QAAS,CACL,KACA,KACA,IACA,KAEJ,QAAS,CACL,KACA,IACA,KAEJ,QAAS,CACL,IACA,IACA,MAEJ,QAAS,CACL,IACA,IACA,MAEJ,QAAS,CACL,KACA,IACA,KAEJ,QAAS,CACL,KACA,IACA,KAEJ,QAAS,CACL,KACA,KACA,IACA,KAEJ,QAAS,CACL,KACA,KACA,IACA,KAEJ,QAAS,CACL,KACA,IACA,KACA,KAEJ,QAAS,CACL,KACA,IACA,KAEJ,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AOvlB,UAAUonB,UAAY,WACzB,MAAQ7mB,KAAK6lB,SAAWjB,GAAc5kB,KAAK8lB,SACvC9lB,KAAKwmB,MAEZ,EAKDxB,EAAOvlB,UAAUymB,KAAO,WACpB,GAAIlmB,KAAK6lB,QACL,OAAO,KAEX,IAAIxM,EAAOrZ,KAAK8lB,OACZZ,EAASllB,KAAKklB,SACd+H,EAAWjtB,KAAKilB,QAAQV,WAAWW,GAAU7L,GAAQ,MAAU,EAAI,IACvE,OAAO4T,QAA2CA,EAAW,IAChE,EACMjI,CACX,IAOA,SAASqB,GAASuB,GACd,OAASA,GAAa,IAAMA,GAAa,KACpCA,GAAa,IAAMA,GAAa,EACzC,CA8BA,SAAShD,GAAcD,GACnB,OAASA,GAAK,GAAUA,GAAK,IACnB,KAANA,GACM,MAANA,GACCA,GAAK,MAAUA,GAAK,MACf,OAANA,GACM,OAANA,CACR,CAKA,SAASE,GAAiBF,GACtB,OAASA,GAAK,IAAUA,GAAK,IACnB,KAANA,GACCA,GAAK,IAAUA,GAAK,IACf,KAANA,GACM,KAANA,GACM,KAANA,GACM,KAANA,GACM,KAANA,GACM,KAANA,GACCA,GAAK,IAAUA,GAAK,IACpBA,GAAK,IAAUA,GAAK,IACpBA,GAAK,IAAUA,GAAK,IACpBA,GAAK,IAAUA,GAAK,IACf,KAANA,GACM,KAANA,GACM,KAANA,GACM,KAANA,GACM,KAANA,GACM,MAANA,GACM,MAANA,GACM,MAANA,GACM,MAANA,GACM,MAANA,GACCA,GAAK,KAAUA,GAAK,KACf,MAANA,GACM,MAANA,GACM,MAANA,GACM,MAANA,GACM,MAANA,GACM,MAANA,GACM,MAANA,GACM,MAANA,GACM,MAANA,GACM,MAANA,GACM,MAANA,GACM,MAANA,GACM,MAANA,GACCA,GAAK,MAAUA,GAAK,MACpBA,GAAK,MAAUA,GAAK,MACf,OAANA,GACM,OAANA,GACM,OAANA,GACCA,GAAK,MAAUA,GAAK,MACf,OAANA,GACM,OAANA,GACM,OAANA,GACCA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QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACCA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACf,QAANA,GACM,QAANA,GACCA,GAAK,OAAUA,GAAK,OACf,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACCA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACf,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACCA,GAAK,OAAUA,GAAK,OACf,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACCA,GAAK,OAAUA,GAAK,OACf,QAANA,GACM,QAANA,GACCA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACf,QAANA,GACCA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACf,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACCA,GAAK,OAAUA,GAAK,OACf,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACCA,GAAK,OAAUA,GAAK,OACf,QAANA,GACCA,GAAK,OAAUA,GAAK,OACf,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACCA,GAAK,OAAUA,GAAK,OACf,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACCA,GAAK,OAAUA,GAAK,OACf,QAANA,GACCA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACf,QAANA,GACM,QAANA,GACM,QAANA,GACCA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACf,QAANA,GACCA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACf,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACCA,GAAK,OAAUA,GAAK,OACf,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACCA,GAAK,OAAUA,GAAK,OACf,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACCA,GAAK,OAAUA,GAAK,KAC7B,CGvvCA,SAASuI,GAAcC,GACnBA,EAAIC,SAAQ,SAAU3R,GAElB,UADOA,EAAGgL,SACNtK,EAAgBV,IAAOY,EAAgBZ,GACvC,IAAK,IAAIyI,KAAKzI,EAAGzZ,eACNyZ,EAAGzZ,QAAQkiB,GAAGuC,SACrByG,GAAczR,EAAGzZ,QAAQkiB,GAAGjN,YAG3B4E,EAAgBJ,IAAOkB,EAAiBlB,EAAGsE,SAG1ChE,EAAcN,IAAOQ,EAAcR,KACzCmB,EAAmBnB,EAAGsE,cAHftE,EAAGsE,MAAM0G,SAMXhK,EAAahB,IAClByR,GAAczR,EAAGuL,SAE7B,GACA,CACO,SAASxB,GAAMP,EAASoI,QACd,IAATA,IAAmBA,EAA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