/*
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
* This devtool is neither made for production nor for readable output files.
* It uses "eval()" calls to create a separate source file in the browser devtools.
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
* or disable the default devtool with "devtool: false".
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
*/
(self["webpackChunkjandl"] = self["webpackChunkjandl"] || []).push([["chunk-vendors"],{
/***/ "./node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseBase.js":
/*!*******************************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseBase.js ***!
\*******************************************************************************/
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
"use strict";
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ _classPrivateFieldBase; }\n/* harmony export */ });\nfunction _classPrivateFieldBase(e, t) {\n if (!{}.hasOwnProperty.call(e, t)) throw new TypeError(\"attempted to use private field on non-instance\");\n return e;\n}\n\n\n//# sourceURL=webpack://jandl/./node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseBase.js?\n}");
/***/ }),
/***/ "./node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseKey.js":
/*!******************************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseKey.js ***!
\******************************************************************************/
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
"use strict";
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ _classPrivateFieldKey; }\n/* harmony export */ });\nvar id = 0;\nfunction _classPrivateFieldKey(e) {\n return \"__private_\" + id++ + \"_\" + e;\n}\n\n\n//# sourceURL=webpack://jandl/./node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseKey.js?\n}");
/***/ }),
/***/ "./node_modules/@capacitor/core/dist/index.js":
/*!****************************************************!*\
!*** ./node_modules/@capacitor/core/dist/index.js ***!
\****************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Capacitor: function() { return /* binding */ Capacitor; },\n/* harmony export */ CapacitorCookies: function() { return /* binding */ CapacitorCookies; },\n/* harmony export */ CapacitorException: function() { return /* binding */ CapacitorException; },\n/* harmony export */ CapacitorHttp: function() { return /* binding */ CapacitorHttp; },\n/* harmony export */ CapacitorPlatforms: function() { return /* binding */ CapacitorPlatforms; },\n/* harmony export */ ExceptionCode: function() { return /* binding */ ExceptionCode; },\n/* harmony export */ Plugins: function() { return /* binding */ Plugins; },\n/* harmony export */ WebPlugin: function() { return /* binding */ WebPlugin; },\n/* harmony export */ WebView: function() { return /* binding */ WebView; },\n/* harmony export */ addPlatform: function() { return /* binding */ addPlatform; },\n/* harmony export */ registerPlugin: function() { return /* binding */ registerPlugin; },\n/* harmony export */ registerWebPlugin: function() { return /* binding */ registerWebPlugin; },\n/* harmony export */ setPlatform: function() { return /* binding */ setPlatform; }\n/* harmony export */ });\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.push.js */ \"./node_modules/core-js/modules/es.array.push.js\");\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es_json_stringify_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.json.stringify.js */ \"./node_modules/core-js/modules/es.json.stringify.js\");\n/* harmony import */ var core_js_modules_es_json_stringify_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_json_stringify_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/esnext.iterator.constructor.js */ \"./node_modules/core-js/modules/esnext.iterator.constructor.js\");\n/* harmony import */ var core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var core_js_modules_esnext_iterator_find_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/esnext.iterator.find.js */ \"./node_modules/core-js/modules/esnext.iterator.find.js\");\n/* harmony import */ var core_js_modules_esnext_iterator_find_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_esnext_iterator_find_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var core_js_modules_esnext_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/esnext.iterator.for-each.js */ \"./node_modules/core-js/modules/esnext.iterator.for-each.js\");\n/* harmony import */ var core_js_modules_esnext_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_esnext_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var core_js_modules_esnext_iterator_map_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/esnext.iterator.map.js */ \"./node_modules/core-js/modules/esnext.iterator.map.js\");\n/* harmony import */ var core_js_modules_esnext_iterator_map_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_esnext_iterator_map_js__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var core_js_modules_esnext_iterator_reduce_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/esnext.iterator.reduce.js */ \"./node_modules/core-js/modules/esnext.iterator.reduce.js\");\n/* harmony import */ var core_js_modules_esnext_iterator_reduce_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_esnext_iterator_reduce_js__WEBPACK_IMPORTED_MODULE_6__);\n/* provided dependency */ var console = __webpack_require__(/*! ./node_modules/console-browserify/index.js */ \"./node_modules/console-browserify/index.js\");\n\n\n\n\n\n\n\n/*! Capacitor: https://capacitorjs.com/ - MIT License */\nconst createCapacitorPlatforms = win => {\n const defaultPlatformMap = new Map();\n defaultPlatformMap.set('web', {\n name: 'web'\n });\n const capPlatforms = win.CapacitorPlatforms || {\n currentPlatform: {\n name: 'web'\n },\n platforms: defaultPlatformMap\n };\n const addPlatform = (name, platform) => {\n capPlatforms.platforms.set(name, platform);\n };\n const setPlatform = name => {\n if (capPlatforms.platforms.has(name)) {\n capPlatforms.currentPlatform = capPlatforms.platforms.get(name);\n }\n };\n capPlatforms.addPlatform = addPlatform;\n capPlatforms.setPlatform = setPlatform;\n return capPlatforms;\n};\nconst initPlatforms = win => win.CapacitorPlatforms = createCapacitorPlatforms(win);\n/**\n * @deprecated Set `CapacitorCustomPlatform` on the window object prior to runtime executing in the web app instead\n */\nconst CapacitorPlatforms = /*#__PURE__*/initPlatforms(typeof globalThis !== 'undefined' ? globalThis : typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : {});\n/**\n * @deprecated Set `CapacitorCustomPlatform` on the window object prior to runtime executing in the web app instead\n */\nconst addPlatform = CapacitorPlatforms.addPlatform;\n/**\n * @deprecated Set `CapacitorCustomPlatform` on the window object prior to runtime executing in the web app instead\n */\nconst setPlatform = CapacitorPlatforms.setPlatform;\nconst legacyRegisterWebPlugin = (cap, webPlugin) => {\n var _a;\n const config = webPlugin.config;\n const Plugins = cap.Plugins;\n if (!config || !config.name) {\n // TODO: add link to upgrade guide\n throw new Error(`Capacitor WebPlugin is using the deprecated \"registerWebPlugin()\" function, but without the config. Please use \"registerPlugin()\" instead to register this web plugin.\"`);\n }\n // TODO: add link to upgrade guide\n console.warn(`Capacitor plugin \"${config.name}\" is using the deprecated \"registerWebPlugin()\" function`);\n if (!Plugins[config.name] || ((_a = config === null || config === void 0 ? void 0 : config.platforms) === null || _a === void 0 ? void 0 : _a.includes(cap.getPlatform()))) {\n // Add the web plugin into the plugins registry if there already isn't\n // an existing one. If it doesn't already exist, that means\n // there's no existing native implementation for it.\n // - OR -\n // If we already have a plugin registered (meaning it was defined in the native layer),\n // then we should only overwrite it if the corresponding web plugin activates on\n // a certain platform. For example: Geolocation uses the WebPlugin on Android but not iOS\n Plugins[config.name] = webPlugin;\n }\n};\nvar ExceptionCode;\n(function (ExceptionCode) {\n /**\n * API is not implemented.\n *\n * This usually means the API can't be used because it is not implemented for\n * the current platform.\n */\n ExceptionCode[\"Unimplemented\"] = \"UNIMPLEMENTED\";\n /**\n * API is not available.\n *\n * This means the API can't be used right now because:\n * - it is currently missing a prerequisite, such as network connectivity\n * - it requires a particular platform or browser version\n */\n ExceptionCode[\"Unavailable\"] = \"UNAVAILABLE\";\n})(ExceptionCode || (ExceptionCode = {}));\nclass CapacitorException extends Error {\n constructor(message, code, data) {\n super(message);\n this.message = message;\n this.code = code;\n this.data = data;\n }\n}\nconst getPlatformId = win => {\n var _a, _b;\n if (win === null || win === void 0 ? void 0 : win.androidBridge) {\n return 'android';\n } else if ((_b = (_a = win === null || win === void 0 ? void 0 : win.webkit) === null || _a === void 0 ? void 0 : _a.messageHandlers) === null || _b === void 0 ? void 0 : _b.bridge) {\n return 'ios';\n } else {\n return 'web';\n }\n};\nconst createCapacitor = win => {\n var _a, _b, _c, _d, _e;\n const capCustomPlatform = win.CapacitorCustomPlatform || null;\n const cap = win.Capacitor || {};\n const Plugins = cap.Plugins = cap.Plugins || {};\n /**\n * @deprecated Use `capCustomPlatform` instead, default functions like registerPlugin will function with the new object.\n */\n const capPlatforms = win.CapacitorPlatforms;\n const defaultGetPlatform = () => {\n return capCustomPlatform !== null ? capCustomPlatform.name : getPlatformId(win);\n };\n const getPlatform = ((_a = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _a === void 0 ? void 0 : _a.getPlatform) || defaultGetPlatform;\n const defaultIsNativePlatform = () => getPlatform() !== 'web';\n const isNativePlatform = ((_b = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _b === void 0 ? void 0 : _b.isNativePlatform) || defaultIsNativePlatform;\n const defaultIsPluginAvailable = pluginName => {\n const plugin = registeredPlugins.get(pluginName);\n if (plugin === null || plugin === void 0 ? void 0 : plugin.platforms.has(getPlatform())) {\n // JS implementation available for the current platform.\n return true;\n }\n if (getPluginHeader(pluginName)) {\n // Native implementation available.\n return true;\n }\n return false;\n };\n const isPluginAvailable = ((_c = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _c === void 0 ? void 0 : _c.isPluginAvailable) || defaultIsPluginAvailable;\n const defaultGetPluginHeader = pluginName => {\n var _a;\n return (_a = cap.PluginHeaders) === null || _a === void 0 ? void 0 : _a.find(h => h.name === pluginName);\n };\n const getPluginHeader = ((_d = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _d === void 0 ? void 0 : _d.getPluginHeader) || defaultGetPluginHeader;\n const handleError = err => win.console.error(err);\n const pluginMethodNoop = (_target, prop, pluginName) => {\n return Promise.reject(`${pluginName} does not have an implementation of \"${prop}\".`);\n };\n const registeredPlugins = new Map();\n const defaultRegisterPlugin = (pluginName, jsImplementations = {}) => {\n const registeredPlugin = registeredPlugins.get(pluginName);\n if (registeredPlugin) {\n console.warn(`Capacitor plugin \"${pluginName}\" already registered. Cannot register plugins twice.`);\n return registeredPlugin.proxy;\n }\n const platform = getPlatform();\n const pluginHeader = getPluginHeader(pluginName);\n let jsImplementation;\n const loadPluginImplementation = async () => {\n if (!jsImplementation && platform in jsImplementations) {\n jsImplementation = typeof jsImplementations[platform] === 'function' ? jsImplementation = await jsImplementations[platform]() : jsImplementation = jsImplementations[platform];\n } else if (capCustomPlatform !== null && !jsImplementation && 'web' in jsImplementations) {\n jsImplementation = typeof jsImplementations['web'] === 'function' ? jsImplementation = await jsImplementations['web']() : jsImplementation = jsImplementations['web'];\n }\n return jsImplementation;\n };\n const createPluginMethod = (impl, prop) => {\n var _a, _b;\n if (pluginHeader) {\n const methodHeader = pluginHeader === null || pluginHeader === void 0 ? void 0 : pluginHeader.methods.find(m => prop === m.name);\n if (methodHeader) {\n if (methodHeader.rtype === 'promise') {\n return options => cap.nativePromise(pluginName, prop.toString(), options);\n } else {\n return (options, callback) => cap.nativeCallback(pluginName, prop.toString(), options, callback);\n }\n } else if (impl) {\n return (_a = impl[prop]) === null || _a === void 0 ? void 0 : _a.bind(impl);\n }\n } else if (impl) {\n return (_b = impl[prop]) === null || _b === void 0 ? void 0 : _b.bind(impl);\n } else {\n throw new CapacitorException(`\"${pluginName}\" plugin is not implemented on ${platform}`, ExceptionCode.Unimplemented);\n }\n };\n const createPluginMethodWrapper = prop => {\n let remove;\n const wrapper = (...args) => {\n const p = loadPluginImplementation().then(impl => {\n const fn = createPluginMethod(impl, prop);\n if (fn) {\n const p = fn(...args);\n remove = p === null || p === void 0 ? void 0 : p.remove;\n return p;\n } else {\n throw new CapacitorException(`\"${pluginName}.${prop}()\" is not implemented on ${platform}`, ExceptionCode.Unimplemented);\n }\n });\n if (prop === 'addListener') {\n p.remove = async () => remove();\n }\n return p;\n };\n // Some flair ✨\n wrapper.toString = () => `${prop.toString()}() { [capacitor code] }`;\n Object.defineProperty(wrapper, 'name', {\n value: prop,\n writable: false,\n configurable: false\n });\n return wrapper;\n };\n const addListener = createPluginMethodWrapper('addListener');\n const removeListener = createPluginMethodWrapper('removeListener');\n const addListenerNative = (eventName, callback) => {\n const call = addListener({\n eventName\n }, callback);\n const remove = async () => {\n const callbackId = await call;\n removeListener({\n eventName,\n callbackId\n }, callback);\n };\n const p = new Promise(resolve => call.then(() => resolve({\n remove\n })));\n p.remove = async () => {\n console.warn(`Using addListener() without 'await' is deprecated.`);\n await remove();\n };\n return p;\n };\n const proxy = new Proxy({}, {\n get(_, prop) {\n switch (prop) {\n // https://github.com/facebook/react/issues/20030\n case '$$typeof':\n return undefined;\n case 'toJSON':\n return () => ({});\n case 'addListener':\n return pluginHeader ? addListenerNative : addListener;\n case 'removeListener':\n return removeListener;\n default:\n return createPluginMethodWrapper(prop);\n }\n }\n });\n Plugins[pluginName] = proxy;\n registeredPlugins.set(pluginName, {\n name: pluginName,\n proxy,\n platforms: new Set([...Object.keys(jsImplementations), ...(pluginHeader ? [platform] : [])])\n });\n return proxy;\n };\n const registerPlugin = ((_e = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _e === void 0 ? void 0 : _e.registerPlugin) || defaultRegisterPlugin;\n // Add in convertFileSrc for web, it will already be available in native context\n if (!cap.convertFileSrc) {\n cap.convertFileSrc = filePath => filePath;\n }\n cap.getPlatform = getPlatform;\n cap.handleError = handleError;\n cap.isNativePlatform = isNativePlatform;\n cap.isPluginAvailable = isPluginAvailable;\n cap.pluginMethodNoop = pluginMethodNoop;\n cap.registerPlugin = registerPlugin;\n cap.Exception = CapacitorException;\n cap.DEBUG = !!cap.DEBUG;\n cap.isLoggingEnabled = !!cap.isLoggingEnabled;\n // Deprecated props\n cap.platform = cap.getPlatform();\n cap.isNative = cap.isNativePlatform();\n return cap;\n};\nconst initCapacitorGlobal = win => win.Capacitor = createCapacitor(win);\nconst Capacitor = /*#__PURE__*/initCapacitorGlobal(typeof globalThis !== 'undefined' ? globalThis : typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : {});\nconst registerPlugin = Capacitor.registerPlugin;\n/**\n * @deprecated Provided for backwards compatibility for Capacitor v2 plugins.\n * Capacitor v3 plugins should import the plugin directly. This \"Plugins\"\n * export is deprecated in v3, and will be removed in v4.\n */\nconst Plugins = Capacitor.Plugins;\n/**\n * Provided for backwards compatibility. Use the registerPlugin() API\n * instead, and provide the web plugin as the \"web\" implmenetation.\n * For example\n *\n * export const Example = registerPlugin('Example', {\n * web: () => import('./web').then(m => new m.Example())\n * })\n *\n * @deprecated Deprecated in v3, will be removed from v4.\n */\nconst registerWebPlugin = plugin => legacyRegisterWebPlugin(Capacitor, plugin);\n\n/**\n * Base class web plugins should extend.\n */\nclass WebPlugin {\n constructor(config) {\n this.listeners = {};\n this.windowListeners = {};\n if (config) {\n // TODO: add link to upgrade guide\n console.warn(`Capacitor WebPlugin \"${config.name}\" config object was deprecated in v3 and will be removed in v4.`);\n this.config = config;\n }\n }\n addListener(eventName, listenerFunc) {\n const listeners = this.listeners[eventName];\n if (!listeners) {\n this.listeners[eventName] = [];\n }\n this.listeners[eventName].push(listenerFunc);\n // If we haven't added a window listener for this event and it requires one,\n // go ahead and add it\n const windowListener = this.windowListeners[eventName];\n if (windowListener && !windowListener.registered) {\n this.addWindowListener(windowListener);\n }\n const remove = async () => this.removeListener(eventName, listenerFunc);\n const p = Promise.resolve({\n remove\n });\n Object.defineProperty(p, 'remove', {\n value: async () => {\n console.warn(`Using addListener() without 'await' is deprecated.`);\n await remove();\n }\n });\n return p;\n }\n async removeAllListeners() {\n this.listeners = {};\n for (const listener in this.windowListeners) {\n this.removeWindowListener(this.windowListeners[listener]);\n }\n this.windowListeners = {};\n }\n notifyListeners(eventName, data) {\n const listeners = this.listeners[eventName];\n if (listeners) {\n listeners.forEach(listener => listener(data));\n }\n }\n hasListeners(eventName) {\n return !!this.listeners[eventName].length;\n }\n registerWindowListener(windowEventName, pluginEventName) {\n this.windowListeners[pluginEventName] = {\n registered: false,\n windowEventName,\n pluginEventName,\n handler: event => {\n this.notifyListeners(pluginEventName, event);\n }\n };\n }\n unimplemented(msg = 'not implemented') {\n return new Capacitor.Exception(msg, ExceptionCode.Unimplemented);\n }\n unavailable(msg = 'not available') {\n return new Capacitor.Exception(msg, ExceptionCode.Unavailable);\n }\n async removeListener(eventName, listenerFunc) {\n const listeners = this.listeners[eventName];\n if (!listeners) {\n return;\n }\n const index = listeners.indexOf(listenerFunc);\n this.listeners[eventName].splice(index, 1);\n // If there are no more listeners for this type of event,\n // remove the window listener\n if (!this.listeners[eventName].length) {\n this.removeWindowListener(this.windowListeners[eventName]);\n }\n }\n addWindowListener(handle) {\n window.addEventListener(handle.windowEventName, handle.handler);\n handle.registered = true;\n }\n removeWindowListener(handle) {\n if (!handle) {\n return;\n }\n window.removeEventListener(handle.windowEventName, handle.handler);\n handle.registered = false;\n }\n}\nconst WebView = /*#__PURE__*/registerPlugin('WebView');\n/******** END WEB VIEW PLUGIN ********/\n/******** COOKIES PLUGIN ********/\n/**\n * Safely web encode a string value (inspired by js-cookie)\n * @param str The string value to encode\n */\nconst encode = str => encodeURIComponent(str).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);\n/**\n * Safely web decode a string value (inspired by js-cookie)\n * @param str The string value to decode\n */\nconst decode = str => str.replace(/(%[\\dA-F]{2})+/gi, decodeURIComponent);\nclass CapacitorCookiesPluginWeb extends WebPlugin {\n async getCookies() {\n const cookies = document.cookie;\n const cookieMap = {};\n cookies.split(';').forEach(cookie => {\n if (cookie.length <= 0) return;\n // Replace first \"=\" with CAP_COOKIE to prevent splitting on additional \"=\"\n let [key, value] = cookie.replace(/=/, 'CAP_COOKIE').split('CAP_COOKIE');\n key = decode(key).trim();\n value = decode(value).trim();\n cookieMap[key] = value;\n });\n return cookieMap;\n }\n async setCookie(options) {\n try {\n // Safely Encoded Key/Value\n const encodedKey = encode(options.key);\n const encodedValue = encode(options.value);\n // Clean & sanitize options\n const expires = `; expires=${(options.expires || '').replace('expires=', '')}`; // Default is \"; expires=\"\n const path = (options.path || '/').replace('path=', ''); // Default is \"path=/\"\n document.cookie = `${encodedKey}=${encodedValue || ''}${expires}; path=${path}`;\n } catch (error) {\n return Promise.reject(error);\n }\n }\n async deleteCookie(options) {\n try {\n document.cookie = `${options.key}=; Max-Age=0`;\n } catch (error) {\n return Promise.reject(error);\n }\n }\n async clearCookies() {\n try {\n const cookies = document.cookie.split(';') || [];\n for (const cookie of cookies) {\n document.cookie = cookie.replace(/^ +/, '').replace(/=.*/, `=;expires=${new Date().toUTCString()};path=/`);\n }\n } catch (error) {\n return Promise.reject(error);\n }\n }\n async clearAllCookies() {\n try {\n await this.clearCookies();\n } catch (error) {\n return Promise.reject(error);\n }\n }\n}\nconst CapacitorCookies = registerPlugin('CapacitorCookies', {\n web: () => new CapacitorCookiesPluginWeb()\n});\n// UTILITY FUNCTIONS\n/**\n * Read in a Blob value and return it as a base64 string\n * @param blob The blob value to convert to a base64 string\n */\nconst readBlobAsBase64 = async blob => new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onload = () => {\n const base64String = reader.result;\n // remove prefix \"data:application/pdf;base64,\"\n resolve(base64String.indexOf(',') >= 0 ? base64String.split(',')[1] : base64String);\n };\n reader.onerror = error => reject(error);\n reader.readAsDataURL(blob);\n});\n/**\n * Normalize an HttpHeaders map by lowercasing all of the values\n * @param headers The HttpHeaders object to normalize\n */\nconst normalizeHttpHeaders = (headers = {}) => {\n const originalKeys = Object.keys(headers);\n const loweredKeys = Object.keys(headers).map(k => k.toLocaleLowerCase());\n const normalized = loweredKeys.reduce((acc, key, index) => {\n acc[key] = headers[originalKeys[index]];\n return acc;\n }, {});\n return normalized;\n};\n/**\n * Builds a string of url parameters that\n * @param params A map of url parameters\n * @param shouldEncode true if you should encodeURIComponent() the values (true by default)\n */\nconst buildUrlParams = (params, shouldEncode = true) => {\n if (!params) return null;\n const output = Object.entries(params).reduce((accumulator, entry) => {\n const [key, value] = entry;\n let encodedValue;\n let item;\n if (Array.isArray(value)) {\n item = '';\n value.forEach(str => {\n encodedValue = shouldEncode ? encodeURIComponent(str) : str;\n item += `${key}=${encodedValue}&`;\n });\n // last character will always be \"&\" so slice it off\n item.slice(0, -1);\n } else {\n encodedValue = shouldEncode ? encodeURIComponent(value) : value;\n item = `${key}=${encodedValue}`;\n }\n return `${accumulator}&${item}`;\n }, '');\n // Remove initial \"&\" from the reduce\n return output.substr(1);\n};\n/**\n * Build the RequestInit object based on the options passed into the initial request\n * @param options The Http plugin options\n * @param extra Any extra RequestInit values\n */\nconst buildRequestInit = (options, extra = {}) => {\n const output = Object.assign({\n method: options.method || 'GET',\n headers: options.headers\n }, extra);\n // Get the content-type\n const headers = normalizeHttpHeaders(options.headers);\n const type = headers['content-type'] || '';\n // If body is already a string, then pass it through as-is.\n if (typeof options.data === 'string') {\n output.body = options.data;\n }\n // Build request initializers based off of content-type\n else if (type.includes('application/x-www-form-urlencoded')) {\n const params = new URLSearchParams();\n for (const [key, value] of Object.entries(options.data || {})) {\n params.set(key, value);\n }\n output.body = params.toString();\n } else if (type.includes('multipart/form-data')) {\n const form = new FormData();\n if (options.data instanceof FormData) {\n options.data.forEach((value, key) => {\n form.append(key, value);\n });\n } else {\n for (const key of Object.keys(options.data)) {\n form.append(key, options.data[key]);\n }\n }\n output.body = form;\n const headers = new Headers(output.headers);\n headers.delete('content-type'); // content-type will be set by `window.fetch` to includy boundary\n output.headers = headers;\n } else if (type.includes('application/json') || typeof options.data === 'object') {\n output.body = JSON.stringify(options.data);\n }\n return output;\n};\n// WEB IMPLEMENTATION\nclass CapacitorHttpPluginWeb extends WebPlugin {\n /**\n * Perform an Http request given a set of options\n * @param options Options to build the HTTP request\n */\n async request(options) {\n const requestInit = buildRequestInit(options, options.webFetchExtra);\n const urlParams = buildUrlParams(options.params, options.shouldEncodeUrlParams);\n const url = urlParams ? `${options.url}?${urlParams}` : options.url;\n const response = await fetch(url, requestInit);\n const contentType = response.headers.get('content-type') || '';\n // Default to 'text' responseType so no parsing happens\n let {\n responseType = 'text'\n } = response.ok ? options : {};\n // If the response content-type is json, force the response to be json\n if (contentType.includes('application/json')) {\n responseType = 'json';\n }\n let data;\n let blob;\n switch (responseType) {\n case 'arraybuffer':\n case 'blob':\n blob = await response.blob();\n data = await readBlobAsBase64(blob);\n break;\n case 'json':\n data = await response.json();\n break;\n case 'document':\n case 'text':\n default:\n data = await response.text();\n }\n // Convert fetch headers to Capacitor HttpHeaders\n const headers = {};\n response.headers.forEach((value, key) => {\n headers[key] = value;\n });\n return {\n data,\n headers,\n status: response.status,\n url: response.url\n };\n }\n /**\n * Perform an Http GET request given a set of options\n * @param options Options to build the HTTP request\n */\n async get(options) {\n return this.request(Object.assign(Object.assign({}, options), {\n method: 'GET'\n }));\n }\n /**\n * Perform an Http POST request given a set of options\n * @param options Options to build the HTTP request\n */\n async post(options) {\n return this.request(Object.assign(Object.assign({}, options), {\n method: 'POST'\n }));\n }\n /**\n * Perform an Http PUT request given a set of options\n * @param options Options to build the HTTP request\n */\n async put(options) {\n return this.request(Object.assign(Object.assign({}, options), {\n method: 'PUT'\n }));\n }\n /**\n * Perform an Http PATCH request given a set of options\n * @param options Options to build the HTTP request\n */\n async patch(options) {\n return this.request(Object.assign(Object.assign({}, options), {\n method: 'PATCH'\n }));\n }\n /**\n * Perform an Http DELETE request given a set of options\n * @param options Options to build the HTTP request\n */\n async delete(options) {\n return this.request(Object.assign(Object.assign({}, options), {\n method: 'DELETE'\n }));\n }\n}\nconst CapacitorHttp = registerPlugin('CapacitorHttp', {\n web: () => new CapacitorHttpPluginWeb()\n});\n/******** END HTTP PLUGIN ********/\n\n\n\n//# sourceURL=webpack://jandl/./node_modules/@capacitor/core/dist/index.js?\n}");
/***/ }),
/***/ "./node_modules/@capacitor/preferences/dist/esm/definitions.js":
/*!*********************************************************************!*\
!*** ./node_modules/@capacitor/preferences/dist/esm/definitions.js ***!
\*********************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("{__webpack_require__.r(__webpack_exports__);\n\n\n//# sourceURL=webpack://jandl/./node_modules/@capacitor/preferences/dist/esm/definitions.js?\n}");
/***/ }),
/***/ "./node_modules/@capacitor/preferences/dist/esm/index.js":
/*!***************************************************************!*\
!*** ./node_modules/@capacitor/preferences/dist/esm/index.js ***!
\***************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Preferences: function() { return /* binding */ Preferences; }\n/* harmony export */ });\n/* harmony import */ var _capacitor_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @capacitor/core */ \"./node_modules/@capacitor/core/dist/index.js\");\n/* harmony import */ var _definitions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./definitions */ \"./node_modules/@capacitor/preferences/dist/esm/definitions.js\");\n\nconst Preferences = (0,_capacitor_core__WEBPACK_IMPORTED_MODULE_0__.registerPlugin)('Preferences', {\n web: () => __webpack_require__.e(/*! import() */ \"node_modules_capacitor_preferences_dist_esm_web_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./web */ \"./node_modules/@capacitor/preferences/dist/esm/web.js\")).then(m => new m.PreferencesWeb())\n});\n\n\n\n//# sourceURL=webpack://jandl/./node_modules/@capacitor/preferences/dist/esm/index.js?\n}");
/***/ }),
/***/ "./node_modules/@intlify/core-base/dist/core-base.mjs":
/*!************************************************************!*\
!*** ./node_modules/@intlify/core-base/dist/core-base.mjs ***!
\************************************************************/
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
"use strict";
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ AST_NODE_PROPS_KEYS: function() { return /* binding */ AST_NODE_PROPS_KEYS; },\n/* harmony export */ CompileErrorCodes: function() { return /* reexport safe */ _intlify_message_compiler__WEBPACK_IMPORTED_MODULE_7__.CompileErrorCodes; },\n/* harmony export */ CoreErrorCodes: function() { return /* binding */ CoreErrorCodes; },\n/* harmony export */ CoreWarnCodes: function() { return /* binding */ CoreWarnCodes; },\n/* harmony export */ DATETIME_FORMAT_OPTIONS_KEYS: function() { return /* binding */ DATETIME_FORMAT_OPTIONS_KEYS; },\n/* harmony export */ DEFAULT_LOCALE: function() { return /* binding */ DEFAULT_LOCALE; },\n/* harmony export */ DEFAULT_MESSAGE_DATA_TYPE: function() { return /* binding */ DEFAULT_MESSAGE_DATA_TYPE; },\n/* harmony export */ MISSING_RESOLVE_VALUE: function() { return /* binding */ MISSING_RESOLVE_VALUE; },\n/* harmony export */ NOT_REOSLVED: function() { return /* binding */ NOT_REOSLVED; },\n/* harmony export */ NUMBER_FORMAT_OPTIONS_KEYS: function() { return /* binding */ NUMBER_FORMAT_OPTIONS_KEYS; },\n/* harmony export */ VERSION: function() { return /* binding */ VERSION; },\n/* harmony export */ clearCompileCache: function() { return /* binding */ clearCompileCache; },\n/* harmony export */ clearDateTimeFormat: function() { return /* binding */ clearDateTimeFormat; },\n/* harmony export */ clearNumberFormat: function() { return /* binding */ clearNumberFormat; },\n/* harmony export */ compile: function() { return /* binding */ compile; },\n/* harmony export */ compileToFunction: function() { return /* binding */ compileToFunction; },\n/* harmony export */ createCompileError: function() { return /* reexport safe */ _intlify_message_compiler__WEBPACK_IMPORTED_MODULE_7__.createCompileError; },\n/* harmony export */ createCoreContext: function() { return /* binding */ createCoreContext; },\n/* harmony export */ createCoreError: function() { return /* binding */ createCoreError; },\n/* harmony export */ createMessageContext: function() { return /* binding */ createMessageContext; },\n/* harmony export */ datetime: function() { return /* binding */ datetime; },\n/* harmony export */ fallbackWithLocaleChain: function() { return /* binding */ fallbackWithLocaleChain; },\n/* harmony export */ fallbackWithSimple: function() { return /* binding */ fallbackWithSimple; },\n/* harmony export */ getAdditionalMeta: function() { return /* binding */ getAdditionalMeta; },\n/* harmony export */ getDevToolsHook: function() { return /* binding */ getDevToolsHook; },\n/* harmony export */ getFallbackContext: function() { return /* binding */ getFallbackContext; },\n/* harmony export */ getLocale: function() { return /* binding */ getLocale; },\n/* harmony export */ getWarnMessage: function() { return /* binding */ getWarnMessage; },\n/* harmony export */ handleMissing: function() { return /* binding */ handleMissing; },\n/* harmony export */ initI18nDevTools: function() { return /* binding */ initI18nDevTools; },\n/* harmony export */ isAlmostSameLocale: function() { return /* binding */ isAlmostSameLocale; },\n/* harmony export */ isImplicitFallback: function() { return /* binding */ isImplicitFallback; },\n/* harmony export */ isMessageAST: function() { return /* binding */ isMessageAST; },\n/* harmony export */ isMessageFunction: function() { return /* binding */ isMessageFunction; },\n/* harmony export */ isTranslateFallbackWarn: function() { return /* binding */ isTranslateFallbackWarn; },\n/* harmony export */ isTranslateMissingWarn: function() { return /* binding */ isTranslateMissingWarn; },\n/* harmony export */ number: function() { return /* binding */ number; },\n/* harmony export */ parse: function() { return /* binding */ parse; },\n/* harmony export */ parseDateTimeArgs: function() { return /* binding */ parseDateTimeArgs; },\n/* harmony export */ parseNumberArgs: function() { return /* binding */ parseNumberArgs; },\n/* harmony export */ parseTranslateArgs: function() { return /* binding */ parseTranslateArgs; },\n/* harmony export */ registerLocaleFallbacker: function() { return /* binding */ registerLocaleFallbacker; },\n/* harmony export */ registerMessageCompiler: function() { return /* binding */ registerMessageCompiler; },\n/* harmony export */ registerMessageResolver: function() { return /* binding */ registerMessageResolver; },\n/* harmony export */ resolveLocale: function() { return /* binding */ resolveLocale; },\n/* harmony export */ resolveValue: function() { return /* binding */ resolveValue; },\n/* harmony export */ resolveWithKeyValue: function() { return /* binding */ resolveWithKeyValue; },\n/* harmony export */ setAdditionalMeta: function() { return /* binding */ setAdditionalMeta; },\n/* harmony export */ setDevToolsHook: function() { return /* binding */ setDevToolsHook; },\n/* harmony export */ setFallbackContext: function() { return /* binding */ setFallbackContext; },\n/* harmony export */ translate: function() { return /* binding */ translate; },\n/* harmony export */ translateDevTools: function() { return /* binding */ translateDevTools; },\n/* harmony export */ updateFallbackLocale: function() { return /* binding */ updateFallbackLocale; }\n/* harmony export */ });\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.push.js */ \"./node_modules/core-js/modules/es.array.push.js\");\n/* harmony import */ var core_js_modules_es_json_stringify_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.json.stringify.js */ \"./node_modules/core-js/modules/es.json.stringify.js\");\n/* harmony import */ var core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/esnext.iterator.constructor.js */ \"./node_modules/core-js/modules/esnext.iterator.constructor.js\");\n/* harmony import */ var core_js_modules_esnext_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/esnext.iterator.for-each.js */ \"./node_modules/core-js/modules/esnext.iterator.for-each.js\");\n/* harmony import */ var core_js_modules_esnext_iterator_map_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/esnext.iterator.map.js */ \"./node_modules/core-js/modules/esnext.iterator.map.js\");\n/* harmony import */ var core_js_modules_esnext_iterator_reduce_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/esnext.iterator.reduce.js */ \"./node_modules/core-js/modules/esnext.iterator.reduce.js\");\n/* harmony import */ var _intlify_shared__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @intlify/shared */ \"./node_modules/@intlify/shared/dist/shared.mjs\");\n/* harmony import */ var _intlify_message_compiler__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @intlify/message-compiler */ \"./node_modules/@intlify/message-compiler/dist/message-compiler.esm-browser.js\");\n/* provided dependency */ var console = __webpack_require__(/*! ./node_modules/console-browserify/index.js */ \"./node_modules/console-browserify/index.js\");\n\n\n\n\n\n\n/*!\n * core-base v9.14.5\n * (c) 2025 kazuya kawaguchi\n * Released under the MIT License.\n */\n\n\n\n\n/**\n * This is only called in esm-bundler builds.\n * istanbul-ignore-next\n */\nfunction initFeatureFlags() {\n if (typeof __INTLIFY_PROD_DEVTOOLS__ !== 'boolean') {\n (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.getGlobalThis)().__INTLIFY_PROD_DEVTOOLS__ = false;\n }\n if (typeof __INTLIFY_JIT_COMPILATION__ !== 'boolean') {\n (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.getGlobalThis)().__INTLIFY_JIT_COMPILATION__ = false;\n }\n if (typeof __INTLIFY_DROP_MESSAGE_COMPILER__ !== 'boolean') {\n (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.getGlobalThis)().__INTLIFY_DROP_MESSAGE_COMPILER__ = false;\n }\n}\nfunction isMessageAST(val) {\n return (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isObject)(val) && resolveType(val) === 0 && ((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.hasOwn)(val, 'b') || (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.hasOwn)(val, 'body'));\n}\nconst PROPS_BODY = ['b', 'body'];\nfunction resolveBody(node) {\n return resolveProps(node, PROPS_BODY);\n}\nconst PROPS_CASES = ['c', 'cases'];\nfunction resolveCases(node) {\n return resolveProps(node, PROPS_CASES, []);\n}\nconst PROPS_STATIC = ['s', 'static'];\nfunction resolveStatic(node) {\n return resolveProps(node, PROPS_STATIC);\n}\nconst PROPS_ITEMS = ['i', 'items'];\nfunction resolveItems(node) {\n return resolveProps(node, PROPS_ITEMS, []);\n}\nconst PROPS_TYPE = ['t', 'type'];\nfunction resolveType(node) {\n return resolveProps(node, PROPS_TYPE);\n}\nconst PROPS_VALUE = ['v', 'value'];\nfunction resolveValue$1(node, type) {\n const resolved = resolveProps(node, PROPS_VALUE);\n if (resolved != null) {\n return resolved;\n } else {\n throw createUnhandleNodeError(type);\n }\n}\nconst PROPS_MODIFIER = ['m', 'modifier'];\nfunction resolveLinkedModifier(node) {\n return resolveProps(node, PROPS_MODIFIER);\n}\nconst PROPS_KEY = ['k', 'key'];\nfunction resolveLinkedKey(node) {\n const resolved = resolveProps(node, PROPS_KEY);\n if (resolved) {\n return resolved;\n } else {\n throw createUnhandleNodeError(6 /* NodeTypes.Linked */);\n }\n}\nfunction resolveProps(node, props, defaultValue) {\n for (let i = 0; i < props.length; i++) {\n const prop = props[i];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if ((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.hasOwn)(node, prop) && node[prop] != null) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return node[prop];\n }\n }\n return defaultValue;\n}\nconst AST_NODE_PROPS_KEYS = [...PROPS_BODY, ...PROPS_CASES, ...PROPS_STATIC, ...PROPS_ITEMS, ...PROPS_KEY, ...PROPS_MODIFIER, ...PROPS_VALUE, ...PROPS_TYPE];\nfunction createUnhandleNodeError(type) {\n return new Error(`unhandled node type: ${type}`);\n}\nconst pathStateMachine = [];\npathStateMachine[0 /* States.BEFORE_PATH */] = {\n [\"w\" /* PathCharTypes.WORKSPACE */]: [0 /* States.BEFORE_PATH */],\n [\"i\" /* PathCharTypes.IDENT */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */],\n [\"[\" /* PathCharTypes.LEFT_BRACKET */]: [4 /* States.IN_SUB_PATH */],\n [\"o\" /* PathCharTypes.END_OF_FAIL */]: [7 /* States.AFTER_PATH */]\n};\npathStateMachine[1 /* States.IN_PATH */] = {\n [\"w\" /* PathCharTypes.WORKSPACE */]: [1 /* States.IN_PATH */],\n [\".\" /* PathCharTypes.DOT */]: [2 /* States.BEFORE_IDENT */],\n [\"[\" /* PathCharTypes.LEFT_BRACKET */]: [4 /* States.IN_SUB_PATH */],\n [\"o\" /* PathCharTypes.END_OF_FAIL */]: [7 /* States.AFTER_PATH */]\n};\npathStateMachine[2 /* States.BEFORE_IDENT */] = {\n [\"w\" /* PathCharTypes.WORKSPACE */]: [2 /* States.BEFORE_IDENT */],\n [\"i\" /* PathCharTypes.IDENT */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */],\n [\"0\" /* PathCharTypes.ZERO */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */]\n};\npathStateMachine[3 /* States.IN_IDENT */] = {\n [\"i\" /* PathCharTypes.IDENT */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */],\n [\"0\" /* PathCharTypes.ZERO */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */],\n [\"w\" /* PathCharTypes.WORKSPACE */]: [1 /* States.IN_PATH */, 1 /* Actions.PUSH */],\n [\".\" /* PathCharTypes.DOT */]: [2 /* States.BEFORE_IDENT */, 1 /* Actions.PUSH */],\n [\"[\" /* PathCharTypes.LEFT_BRACKET */]: [4 /* States.IN_SUB_PATH */, 1 /* Actions.PUSH */],\n [\"o\" /* PathCharTypes.END_OF_FAIL */]: [7 /* States.AFTER_PATH */, 1 /* Actions.PUSH */]\n};\npathStateMachine[4 /* States.IN_SUB_PATH */] = {\n [\"'\" /* PathCharTypes.SINGLE_QUOTE */]: [5 /* States.IN_SINGLE_QUOTE */, 0 /* Actions.APPEND */],\n [\"\\\"\" /* PathCharTypes.DOUBLE_QUOTE */]: [6 /* States.IN_DOUBLE_QUOTE */, 0 /* Actions.APPEND */],\n [\"[\" /* PathCharTypes.LEFT_BRACKET */]: [4 /* States.IN_SUB_PATH */, 2 /* Actions.INC_SUB_PATH_DEPTH */],\n [\"]\" /* PathCharTypes.RIGHT_BRACKET */]: [1 /* States.IN_PATH */, 3 /* Actions.PUSH_SUB_PATH */],\n [\"o\" /* PathCharTypes.END_OF_FAIL */]: 8 /* States.ERROR */,\n [\"l\" /* PathCharTypes.ELSE */]: [4 /* States.IN_SUB_PATH */, 0 /* Actions.APPEND */]\n};\npathStateMachine[5 /* States.IN_SINGLE_QUOTE */] = {\n [\"'\" /* PathCharTypes.SINGLE_QUOTE */]: [4 /* States.IN_SUB_PATH */, 0 /* Actions.APPEND */],\n [\"o\" /* PathCharTypes.END_OF_FAIL */]: 8 /* States.ERROR */,\n [\"l\" /* PathCharTypes.ELSE */]: [5 /* States.IN_SINGLE_QUOTE */, 0 /* Actions.APPEND */]\n};\npathStateMachine[6 /* States.IN_DOUBLE_QUOTE */] = {\n [\"\\\"\" /* PathCharTypes.DOUBLE_QUOTE */]: [4 /* States.IN_SUB_PATH */, 0 /* Actions.APPEND */],\n [\"o\" /* PathCharTypes.END_OF_FAIL */]: 8 /* States.ERROR */,\n [\"l\" /* PathCharTypes.ELSE */]: [6 /* States.IN_DOUBLE_QUOTE */, 0 /* Actions.APPEND */]\n};\n/**\n * Check if an expression is a literal value.\n */\nconst literalValueRE = /^\\s?(?:true|false|-?[\\d.]+|'[^']*'|\"[^\"]*\")\\s?$/;\nfunction isLiteral(exp) {\n return literalValueRE.test(exp);\n}\n/**\n * Strip quotes from a string\n */\nfunction stripQuotes(str) {\n const a = str.charCodeAt(0);\n const b = str.charCodeAt(str.length - 1);\n return a === b && (a === 0x22 || a === 0x27) ? str.slice(1, -1) : str;\n}\n/**\n * Determine the type of a character in a keypath.\n */\nfunction getPathCharType(ch) {\n if (ch === undefined || ch === null) {\n return \"o\" /* PathCharTypes.END_OF_FAIL */;\n }\n const code = ch.charCodeAt(0);\n switch (code) {\n case 0x5b: // [\n case 0x5d: // ]\n case 0x2e: // .\n case 0x22: // \"\n case 0x27:\n // '\n return ch;\n case 0x5f: // _\n case 0x24: // $\n case 0x2d:\n // -\n return \"i\" /* PathCharTypes.IDENT */;\n case 0x09: // Tab (HT)\n case 0x0a: // Newline (LF)\n case 0x0d: // Return (CR)\n case 0xa0: // No-break space (NBSP)\n case 0xfeff: // Byte Order Mark (BOM)\n case 0x2028: // Line Separator (LS)\n case 0x2029:\n // Paragraph Separator (PS)\n return \"w\" /* PathCharTypes.WORKSPACE */;\n }\n return \"i\" /* PathCharTypes.IDENT */;\n}\n/**\n * Format a subPath, return its plain form if it is\n * a literal string or number. Otherwise prepend the\n * dynamic indicator (*).\n */\nfunction formatSubPath(path) {\n const trimmed = path.trim();\n // invalid leading 0\n if (path.charAt(0) === '0' && isNaN(parseInt(path))) {\n return false;\n }\n return isLiteral(trimmed) ? stripQuotes(trimmed) : \"*\" /* PathCharTypes.ASTARISK */ + trimmed;\n}\n/**\n * Parse a string path into an array of segments\n */\nfunction parse(path) {\n const keys = [];\n let index = -1;\n let mode = 0 /* States.BEFORE_PATH */;\n let subPathDepth = 0;\n let c;\n let key; // eslint-disable-line\n let newChar;\n let type;\n let transition;\n let action;\n let typeMap;\n const actions = [];\n actions[0 /* Actions.APPEND */] = () => {\n if (key === undefined) {\n key = newChar;\n } else {\n key += newChar;\n }\n };\n actions[1 /* Actions.PUSH */] = () => {\n if (key !== undefined) {\n keys.push(key);\n key = undefined;\n }\n };\n actions[2 /* Actions.INC_SUB_PATH_DEPTH */] = () => {\n actions[0 /* Actions.APPEND */]();\n subPathDepth++;\n };\n actions[3 /* Actions.PUSH_SUB_PATH */] = () => {\n if (subPathDepth > 0) {\n subPathDepth--;\n mode = 4 /* States.IN_SUB_PATH */;\n actions[0 /* Actions.APPEND */]();\n } else {\n subPathDepth = 0;\n if (key === undefined) {\n return false;\n }\n key = formatSubPath(key);\n if (key === false) {\n return false;\n } else {\n actions[1 /* Actions.PUSH */]();\n }\n }\n };\n function maybeUnescapeQuote() {\n const nextChar = path[index + 1];\n if (mode === 5 /* States.IN_SINGLE_QUOTE */ && nextChar === \"'\" /* PathCharTypes.SINGLE_QUOTE */ || mode === 6 /* States.IN_DOUBLE_QUOTE */ && nextChar === \"\\\"\" /* PathCharTypes.DOUBLE_QUOTE */) {\n index++;\n newChar = '\\\\' + nextChar;\n actions[0 /* Actions.APPEND */]();\n return true;\n }\n }\n while (mode !== null) {\n index++;\n c = path[index];\n if (c === '\\\\' && maybeUnescapeQuote()) {\n continue;\n }\n type = getPathCharType(c);\n typeMap = pathStateMachine[mode];\n transition = typeMap[type] || typeMap[\"l\" /* PathCharTypes.ELSE */] || 8 /* States.ERROR */;\n // check parse error\n if (transition === 8 /* States.ERROR */) {\n return;\n }\n mode = transition[0];\n if (transition[1] !== undefined) {\n action = actions[transition[1]];\n if (action) {\n newChar = c;\n if (action() === false) {\n return;\n }\n }\n }\n // check parse finish\n if (mode === 7 /* States.AFTER_PATH */) {\n return keys;\n }\n }\n}\n// path token cache\nconst cache = new Map();\n/**\n * key-value message resolver\n *\n * @remarks\n * Resolves messages with the key-value structure. Note that messages with a hierarchical structure such as objects cannot be resolved\n *\n * @param obj - A target object to be resolved with path\n * @param path - A {@link Path | path} to resolve the value of message\n *\n * @returns A resolved {@link PathValue | path value}\n *\n * @VueI18nGeneral\n */\nfunction resolveWithKeyValue(obj, path) {\n return (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isObject)(obj) ? obj[path] : null;\n}\n/**\n * message resolver\n *\n * @remarks\n * Resolves messages. messages with a hierarchical structure such as objects can be resolved. This resolver is used in VueI18n as default.\n *\n * @param obj - A target object to be resolved with path\n * @param path - A {@link Path | path} to resolve the value of message\n *\n * @returns A resolved {@link PathValue | path value}\n *\n * @VueI18nGeneral\n */\nfunction resolveValue(obj, path) {\n // check object\n if (!(0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isObject)(obj)) {\n return null;\n }\n // parse path\n let hit = cache.get(path);\n if (!hit) {\n hit = parse(path);\n if (hit) {\n cache.set(path, hit);\n }\n }\n // check hit\n if (!hit) {\n return null;\n }\n // resolve path value\n const len = hit.length;\n let last = obj;\n let i = 0;\n while (i < len) {\n const key = hit[i];\n /**\n * NOTE:\n * if `key` is intlify message format AST node key and `last` is intlify message format AST, skip it.\n * because the AST node is not a key-value structure.\n */\n if (AST_NODE_PROPS_KEYS.includes(key) && isMessageAST(last)) {\n return null;\n }\n const val = last[key];\n if (val === undefined) {\n return null;\n }\n if ((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isFunction)(last)) {\n return null;\n }\n last = val;\n i++;\n }\n return last;\n}\nconst DEFAULT_MODIFIER = str => str;\nconst DEFAULT_MESSAGE = ctx => ''; // eslint-disable-line\nconst DEFAULT_MESSAGE_DATA_TYPE = 'text';\nconst DEFAULT_NORMALIZE = values => values.length === 0 ? '' : (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.join)(values);\nconst DEFAULT_INTERPOLATE = _intlify_shared__WEBPACK_IMPORTED_MODULE_6__.toDisplayString;\nfunction pluralDefault(choice, choicesLength) {\n choice = Math.abs(choice);\n if (choicesLength === 2) {\n // prettier-ignore\n return choice ? choice > 1 ? 1 : 0 : 1;\n }\n return choice ? Math.min(choice, 2) : 0;\n}\nfunction getPluralIndex(options) {\n // prettier-ignore\n const index = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isNumber)(options.pluralIndex) ? options.pluralIndex : -1;\n // prettier-ignore\n return options.named && ((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isNumber)(options.named.count) || (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isNumber)(options.named.n)) ? (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isNumber)(options.named.count) ? options.named.count : (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isNumber)(options.named.n) ? options.named.n : index : index;\n}\nfunction normalizeNamed(pluralIndex, props) {\n if (!props.count) {\n props.count = pluralIndex;\n }\n if (!props.n) {\n props.n = pluralIndex;\n }\n}\nfunction createMessageContext(options = {}) {\n const locale = options.locale;\n const pluralIndex = getPluralIndex(options);\n const pluralRule = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isObject)(options.pluralRules) && (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isString)(locale) && (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isFunction)(options.pluralRules[locale]) ? options.pluralRules[locale] : pluralDefault;\n const orgPluralRule = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isObject)(options.pluralRules) && (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isString)(locale) && (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isFunction)(options.pluralRules[locale]) ? pluralDefault : undefined;\n const plural = messages => {\n return messages[pluralRule(pluralIndex, messages.length, orgPluralRule)];\n };\n const _list = options.list || [];\n const list = index => _list[index];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const _named = options.named || (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.create)();\n (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isNumber)(options.pluralIndex) && normalizeNamed(pluralIndex, _named);\n const named = key => _named[key];\n function message(key) {\n // prettier-ignore\n const msg = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isFunction)(options.messages) ? options.messages(key) : (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isObject)(options.messages) ? options.messages[key] : false;\n return !msg ? options.parent ? options.parent.message(key) // resolve from parent messages\n : DEFAULT_MESSAGE : msg;\n }\n const _modifier = name => options.modifiers ? options.modifiers[name] : DEFAULT_MODIFIER;\n const normalize = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isPlainObject)(options.processor) && (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isFunction)(options.processor.normalize) ? options.processor.normalize : DEFAULT_NORMALIZE;\n const interpolate = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isPlainObject)(options.processor) && (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isFunction)(options.processor.interpolate) ? options.processor.interpolate : DEFAULT_INTERPOLATE;\n const type = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isPlainObject)(options.processor) && (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isString)(options.processor.type) ? options.processor.type : DEFAULT_MESSAGE_DATA_TYPE;\n const linked = (key, ...args) => {\n const [arg1, arg2] = args;\n let type = 'text';\n let modifier = '';\n if (args.length === 1) {\n if ((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isObject)(arg1)) {\n modifier = arg1.modifier || modifier;\n type = arg1.type || type;\n } else if ((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isString)(arg1)) {\n modifier = arg1 || modifier;\n }\n } else if (args.length === 2) {\n if ((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isString)(arg1)) {\n modifier = arg1 || modifier;\n }\n if ((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isString)(arg2)) {\n type = arg2 || type;\n }\n }\n const ret = message(key)(ctx);\n const msg =\n // The message in vnode resolved with linked are returned as an array by processor.nomalize\n type === 'vnode' && (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isArray)(ret) && modifier ? ret[0] : ret;\n return modifier ? _modifier(modifier)(msg, type) : msg;\n };\n const ctx = {\n [\"list\" /* HelperNameMap.LIST */]: list,\n [\"named\" /* HelperNameMap.NAMED */]: named,\n [\"plural\" /* HelperNameMap.PLURAL */]: plural,\n [\"linked\" /* HelperNameMap.LINKED */]: linked,\n [\"message\" /* HelperNameMap.MESSAGE */]: message,\n [\"type\" /* HelperNameMap.TYPE */]: type,\n [\"interpolate\" /* HelperNameMap.INTERPOLATE */]: interpolate,\n [\"normalize\" /* HelperNameMap.NORMALIZE */]: normalize,\n [\"values\" /* HelperNameMap.VALUES */]: (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.assign)((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.create)(), _list, _named)\n };\n return ctx;\n}\nlet devtools = null;\nfunction setDevToolsHook(hook) {\n devtools = hook;\n}\nfunction getDevToolsHook() {\n return devtools;\n}\nfunction initI18nDevTools(i18n, version, meta) {\n // TODO: queue if devtools is undefined\n devtools && devtools.emit(\"i18n:init\" /* IntlifyDevToolsHooks.I18nInit */, {\n timestamp: Date.now(),\n i18n,\n version,\n meta\n });\n}\nconst translateDevTools = /* #__PURE__*/createDevToolsHook(\"function:translate\" /* IntlifyDevToolsHooks.FunctionTranslate */);\nfunction createDevToolsHook(hook) {\n return payloads => devtools && devtools.emit(hook, payloads);\n}\nconst code$1 = _intlify_message_compiler__WEBPACK_IMPORTED_MODULE_7__.CompileWarnCodes.__EXTEND_POINT__;\nconst inc$1 = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.incrementer)(code$1);\nconst CoreWarnCodes = {\n NOT_FOUND_KEY: code$1,\n // 2\n FALLBACK_TO_TRANSLATE: inc$1(),\n // 3\n CANNOT_FORMAT_NUMBER: inc$1(),\n // 4\n FALLBACK_TO_NUMBER_FORMAT: inc$1(),\n // 5\n CANNOT_FORMAT_DATE: inc$1(),\n // 6\n FALLBACK_TO_DATE_FORMAT: inc$1(),\n // 7\n EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER: inc$1(),\n // 8\n __EXTEND_POINT__: inc$1() // 9\n};\n/** @internal */\nconst warnMessages = {\n [CoreWarnCodes.NOT_FOUND_KEY]: `Not found '{key}' key in '{locale}' locale messages.`,\n [CoreWarnCodes.FALLBACK_TO_TRANSLATE]: `Fall back to translate '{key}' key with '{target}' locale.`,\n [CoreWarnCodes.CANNOT_FORMAT_NUMBER]: `Cannot format a number value due to not supported Intl.NumberFormat.`,\n [CoreWarnCodes.FALLBACK_TO_NUMBER_FORMAT]: `Fall back to number format '{key}' key with '{target}' locale.`,\n [CoreWarnCodes.CANNOT_FORMAT_DATE]: `Cannot format a date value due to not supported Intl.DateTimeFormat.`,\n [CoreWarnCodes.FALLBACK_TO_DATE_FORMAT]: `Fall back to datetime format '{key}' key with '{target}' locale.`,\n [CoreWarnCodes.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER]: `This project is using Custom Message Compiler, which is an experimental feature. It may receive breaking changes or be removed in the future.`\n};\nfunction getWarnMessage(code, ...args) {\n return (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.format)(warnMessages[code], ...args);\n}\nconst code = _intlify_message_compiler__WEBPACK_IMPORTED_MODULE_7__.CompileErrorCodes.__EXTEND_POINT__;\nconst inc = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.incrementer)(code);\nconst CoreErrorCodes = {\n INVALID_ARGUMENT: code,\n // 17\n INVALID_DATE_ARGUMENT: inc(),\n // 18\n INVALID_ISO_DATE_ARGUMENT: inc(),\n // 19\n NOT_SUPPORT_NON_STRING_MESSAGE: inc(),\n // 20\n NOT_SUPPORT_LOCALE_PROMISE_VALUE: inc(),\n // 21\n NOT_SUPPORT_LOCALE_ASYNC_FUNCTION: inc(),\n // 22\n NOT_SUPPORT_LOCALE_TYPE: inc(),\n // 23\n __EXTEND_POINT__: inc() // 24\n};\nfunction createCoreError(code) {\n return (0,_intlify_message_compiler__WEBPACK_IMPORTED_MODULE_7__.createCompileError)(code, null, true ? {\n messages: errorMessages\n } : 0);\n}\n/** @internal */\nconst errorMessages = {\n [CoreErrorCodes.INVALID_ARGUMENT]: 'Invalid arguments',\n [CoreErrorCodes.INVALID_DATE_ARGUMENT]: 'The date provided is an invalid Date object.' + 'Make sure your Date represents a valid date.',\n [CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT]: 'The argument provided is not a valid ISO date string',\n [CoreErrorCodes.NOT_SUPPORT_NON_STRING_MESSAGE]: 'Not support non-string message',\n [CoreErrorCodes.NOT_SUPPORT_LOCALE_PROMISE_VALUE]: 'cannot support promise value',\n [CoreErrorCodes.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]: 'cannot support async function',\n [CoreErrorCodes.NOT_SUPPORT_LOCALE_TYPE]: 'cannot support locale type'\n};\n\n/** @internal */\nfunction getLocale(context, options) {\n return options.locale != null ? resolveLocale(options.locale) : resolveLocale(context.locale);\n}\nlet _resolveLocale;\n/** @internal */\nfunction resolveLocale(locale) {\n if ((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isString)(locale)) {\n return locale;\n } else {\n if ((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isFunction)(locale)) {\n if (locale.resolvedOnce && _resolveLocale != null) {\n return _resolveLocale;\n } else if (locale.constructor.name === 'Function') {\n const resolve = locale();\n if ((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isPromise)(resolve)) {\n throw createCoreError(CoreErrorCodes.NOT_SUPPORT_LOCALE_PROMISE_VALUE);\n }\n return _resolveLocale = resolve;\n } else {\n throw createCoreError(CoreErrorCodes.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION);\n }\n } else {\n throw createCoreError(CoreErrorCodes.NOT_SUPPORT_LOCALE_TYPE);\n }\n }\n}\n/**\n * Fallback with simple implemenation\n *\n * @remarks\n * A fallback locale function implemented with a simple fallback algorithm.\n *\n * Basically, it returns the value as specified in the `fallbackLocale` props, and is processed with the fallback inside intlify.\n *\n * @param ctx - A {@link CoreContext | context}\n * @param fallback - A {@link FallbackLocale | fallback locale}\n * @param start - A starting {@link Locale | locale}\n *\n * @returns Fallback locales\n *\n * @VueI18nGeneral\n */\nfunction fallbackWithSimple(ctx, fallback, start // eslint-disable-line @typescript-eslint/no-unused-vars\n) {\n // prettier-ignore\n return [...new Set([start, ...((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isArray)(fallback) ? fallback : (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isObject)(fallback) ? Object.keys(fallback) : (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isString)(fallback) ? [fallback] : [start])])];\n}\n/**\n * Fallback with locale chain\n *\n * @remarks\n * A fallback locale function implemented with a fallback chain algorithm. It's used in VueI18n as default.\n *\n * @param ctx - A {@link CoreContext | context}\n * @param fallback - A {@link FallbackLocale | fallback locale}\n * @param start - A starting {@link Locale | locale}\n *\n * @returns Fallback locales\n *\n * @VueI18nSee [Fallbacking](../guide/essentials/fallback)\n *\n * @VueI18nGeneral\n */\nfunction fallbackWithLocaleChain(ctx, fallback, start) {\n const startLocale = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isString)(start) ? start : DEFAULT_LOCALE;\n const context = ctx;\n if (!context.__localeChainCache) {\n context.__localeChainCache = new Map();\n }\n let chain = context.__localeChainCache.get(startLocale);\n if (!chain) {\n chain = [];\n // first block defined by start\n let block = [start];\n // while any intervening block found\n while ((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isArray)(block)) {\n block = appendBlockToChain(chain, block, fallback);\n }\n // prettier-ignore\n // last block defined by default\n const defaults = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isArray)(fallback) || !(0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isPlainObject)(fallback) ? fallback : fallback['default'] ? fallback['default'] : null;\n // convert defaults to array\n block = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isString)(defaults) ? [defaults] : defaults;\n if ((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isArray)(block)) {\n appendBlockToChain(chain, block, false);\n }\n context.__localeChainCache.set(startLocale, chain);\n }\n return chain;\n}\nfunction appendBlockToChain(chain, block, blocks) {\n let follow = true;\n for (let i = 0; i < block.length && (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isBoolean)(follow); i++) {\n const locale = block[i];\n if ((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isString)(locale)) {\n follow = appendLocaleToChain(chain, block[i], blocks);\n }\n }\n return follow;\n}\nfunction appendLocaleToChain(chain, locale, blocks) {\n let follow;\n const tokens = locale.split('-');\n do {\n const target = tokens.join('-');\n follow = appendItemToChain(chain, target, blocks);\n tokens.splice(-1, 1);\n } while (tokens.length && follow === true);\n return follow;\n}\nfunction appendItemToChain(chain, target, blocks) {\n let follow = false;\n if (!chain.includes(target)) {\n follow = true;\n if (target) {\n follow = target[target.length - 1] !== '!';\n const locale = target.replace(/!/g, '');\n chain.push(locale);\n if (((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isArray)(blocks) || (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isPlainObject)(blocks)) && blocks[locale] // eslint-disable-line @typescript-eslint/no-explicit-any\n ) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n follow = blocks[locale];\n }\n }\n }\n return follow;\n}\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n * Intlify core-base version\n * @internal\n */\nconst VERSION = '9.14.5';\nconst NOT_REOSLVED = -1;\nconst DEFAULT_LOCALE = 'en-US';\nconst MISSING_RESOLVE_VALUE = '';\nconst capitalize = str => `${str.charAt(0).toLocaleUpperCase()}${str.substr(1)}`;\nfunction getDefaultLinkedModifiers() {\n return {\n upper: (val, type) => {\n // prettier-ignore\n return type === 'text' && (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isString)(val) ? val.toUpperCase() : type === 'vnode' && (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isObject)(val) && '__v_isVNode' in val ? val.children.toUpperCase() : val;\n },\n lower: (val, type) => {\n // prettier-ignore\n return type === 'text' && (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isString)(val) ? val.toLowerCase() : type === 'vnode' && (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isObject)(val) && '__v_isVNode' in val ? val.children.toLowerCase() : val;\n },\n capitalize: (val, type) => {\n // prettier-ignore\n return type === 'text' && (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isString)(val) ? capitalize(val) : type === 'vnode' && (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isObject)(val) && '__v_isVNode' in val ? capitalize(val.children) : val;\n }\n };\n}\nlet _compiler;\nfunction registerMessageCompiler(compiler) {\n _compiler = compiler;\n}\nlet _resolver;\n/**\n * Register the message resolver\n *\n * @param resolver - A {@link MessageResolver} function\n *\n * @VueI18nGeneral\n */\nfunction registerMessageResolver(resolver) {\n _resolver = resolver;\n}\nlet _fallbacker;\n/**\n * Register the locale fallbacker\n *\n * @param fallbacker - A {@link LocaleFallbacker} function\n *\n * @VueI18nGeneral\n */\nfunction registerLocaleFallbacker(fallbacker) {\n _fallbacker = fallbacker;\n}\n// Additional Meta for Intlify DevTools\nlet _additionalMeta = null;\n/* #__NO_SIDE_EFFECTS__ */\nconst setAdditionalMeta = meta => {\n _additionalMeta = meta;\n};\n/* #__NO_SIDE_EFFECTS__ */\nconst getAdditionalMeta = () => _additionalMeta;\nlet _fallbackContext = null;\nconst setFallbackContext = context => {\n _fallbackContext = context;\n};\nconst getFallbackContext = () => _fallbackContext;\n// ID for CoreContext\nlet _cid = 0;\nfunction createCoreContext(options = {}) {\n // setup options\n const onWarn = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isFunction)(options.onWarn) ? options.onWarn : _intlify_shared__WEBPACK_IMPORTED_MODULE_6__.warn;\n const version = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isString)(options.version) ? options.version : VERSION;\n const locale = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isString)(options.locale) || (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isFunction)(options.locale) ? options.locale : DEFAULT_LOCALE;\n const _locale = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isFunction)(locale) ? DEFAULT_LOCALE : locale;\n const fallbackLocale = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isArray)(options.fallbackLocale) || (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isPlainObject)(options.fallbackLocale) || (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isString)(options.fallbackLocale) || options.fallbackLocale === false ? options.fallbackLocale : _locale;\n const messages = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isPlainObject)(options.messages) ? options.messages : createResources(_locale);\n const datetimeFormats = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isPlainObject)(options.datetimeFormats) ? options.datetimeFormats : createResources(_locale);\n const numberFormats = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isPlainObject)(options.numberFormats) ? options.numberFormats : createResources(_locale);\n const modifiers = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.assign)((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.create)(), options.modifiers, getDefaultLinkedModifiers());\n const pluralRules = options.pluralRules || (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.create)();\n const missing = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isFunction)(options.missing) ? options.missing : null;\n const missingWarn = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isBoolean)(options.missingWarn) || (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isRegExp)(options.missingWarn) ? options.missingWarn : true;\n const fallbackWarn = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isBoolean)(options.fallbackWarn) || (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isRegExp)(options.fallbackWarn) ? options.fallbackWarn : true;\n const fallbackFormat = !!options.fallbackFormat;\n const unresolving = !!options.unresolving;\n const postTranslation = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isFunction)(options.postTranslation) ? options.postTranslation : null;\n const processor = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isPlainObject)(options.processor) ? options.processor : null;\n const warnHtmlMessage = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isBoolean)(options.warnHtmlMessage) ? options.warnHtmlMessage : true;\n const escapeParameter = !!options.escapeParameter;\n const messageCompiler = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isFunction)(options.messageCompiler) ? options.messageCompiler : _compiler;\n if ( true && (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isFunction)(options.messageCompiler)) {\n (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.warnOnce)(getWarnMessage(CoreWarnCodes.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));\n }\n const messageResolver = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isFunction)(options.messageResolver) ? options.messageResolver : _resolver || resolveWithKeyValue;\n const localeFallbacker = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isFunction)(options.localeFallbacker) ? options.localeFallbacker : _fallbacker || fallbackWithSimple;\n const fallbackContext = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isObject)(options.fallbackContext) ? options.fallbackContext : undefined;\n // setup internal options\n const internalOptions = options;\n const __datetimeFormatters = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isObject)(internalOptions.__datetimeFormatters) ? internalOptions.__datetimeFormatters : new Map();\n const __numberFormatters = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isObject)(internalOptions.__numberFormatters) ? internalOptions.__numberFormatters : new Map();\n const __meta = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isObject)(internalOptions.__meta) ? internalOptions.__meta : {};\n _cid++;\n const context = {\n version,\n cid: _cid,\n locale,\n fallbackLocale,\n messages,\n modifiers,\n pluralRules,\n missing,\n missingWarn,\n fallbackWarn,\n fallbackFormat,\n unresolving,\n postTranslation,\n processor,\n warnHtmlMessage,\n escapeParameter,\n messageCompiler,\n messageResolver,\n localeFallbacker,\n fallbackContext,\n onWarn,\n __meta\n };\n {\n context.datetimeFormats = datetimeFormats;\n context.numberFormats = numberFormats;\n context.__datetimeFormatters = __datetimeFormatters;\n context.__numberFormatters = __numberFormatters;\n }\n // for vue-devtools timeline event\n if (true) {\n context.__v_emitter = internalOptions.__v_emitter != null ? internalOptions.__v_emitter : undefined;\n }\n // NOTE: experimental !!\n if (true) {\n initI18nDevTools(context, version, __meta);\n }\n return context;\n}\nconst createResources = locale => ({\n [locale]: (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.create)()\n});\n/** @internal */\nfunction isTranslateFallbackWarn(fallback, key) {\n return fallback instanceof RegExp ? fallback.test(key) : fallback;\n}\n/** @internal */\nfunction isTranslateMissingWarn(missing, key) {\n return missing instanceof RegExp ? missing.test(key) : missing;\n}\n/** @internal */\nfunction handleMissing(context, key, locale, missingWarn, type) {\n const {\n missing,\n onWarn\n } = context;\n // for vue-devtools timeline event\n if (true) {\n const emitter = context.__v_emitter;\n if (emitter) {\n emitter.emit(\"missing\" /* VueDevToolsTimelineEvents.MISSING */, {\n locale,\n key,\n type,\n groupId: `${type}:${key}`\n });\n }\n }\n if (missing !== null) {\n const ret = missing(context, locale, key, type);\n return (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isString)(ret) ? ret : key;\n } else {\n if ( true && isTranslateMissingWarn(missingWarn, key)) {\n onWarn(getWarnMessage(CoreWarnCodes.NOT_FOUND_KEY, {\n key,\n locale\n }));\n }\n return key;\n }\n}\n/** @internal */\nfunction updateFallbackLocale(ctx, locale, fallback) {\n const context = ctx;\n context.__localeChainCache = new Map();\n ctx.localeFallbacker(ctx, fallback, locale);\n}\n/** @internal */\nfunction isAlmostSameLocale(locale, compareLocale) {\n if (locale === compareLocale) return false;\n return locale.split('-')[0] === compareLocale.split('-')[0];\n}\n/** @internal */\nfunction isImplicitFallback(targetLocale, locales) {\n const index = locales.indexOf(targetLocale);\n if (index === -1) {\n return false;\n }\n for (let i = index + 1; i < locales.length; i++) {\n if (isAlmostSameLocale(targetLocale, locales[i])) {\n return true;\n }\n }\n return false;\n}\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\nfunction format(ast) {\n const msg = ctx => formatParts(ctx, ast);\n return msg;\n}\nfunction formatParts(ctx, ast) {\n const body = resolveBody(ast);\n if (body == null) {\n throw createUnhandleNodeError(0 /* NodeTypes.Resource */);\n }\n const type = resolveType(body);\n if (type === 1 /* NodeTypes.Plural */) {\n const plural = body;\n const cases = resolveCases(plural);\n return ctx.plural(cases.reduce((messages, c) => [...messages, formatMessageParts(ctx, c)], []));\n } else {\n return formatMessageParts(ctx, body);\n }\n}\nfunction formatMessageParts(ctx, node) {\n const static_ = resolveStatic(node);\n if (static_ != null) {\n return ctx.type === 'text' ? static_ : ctx.normalize([static_]);\n } else {\n const messages = resolveItems(node).reduce((acm, c) => [...acm, formatMessagePart(ctx, c)], []);\n return ctx.normalize(messages);\n }\n}\nfunction formatMessagePart(ctx, node) {\n const type = resolveType(node);\n switch (type) {\n case 3 /* NodeTypes.Text */:\n {\n return resolveValue$1(node, type);\n }\n case 9 /* NodeTypes.Literal */:\n {\n return resolveValue$1(node, type);\n }\n case 4 /* NodeTypes.Named */:\n {\n const named = node;\n if ((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.hasOwn)(named, 'k') && named.k) {\n return ctx.interpolate(ctx.named(named.k));\n }\n if ((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.hasOwn)(named, 'key') && named.key) {\n return ctx.interpolate(ctx.named(named.key));\n }\n throw createUnhandleNodeError(type);\n }\n case 5 /* NodeTypes.List */:\n {\n const list = node;\n if ((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.hasOwn)(list, 'i') && (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isNumber)(list.i)) {\n return ctx.interpolate(ctx.list(list.i));\n }\n if ((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.hasOwn)(list, 'index') && (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isNumber)(list.index)) {\n return ctx.interpolate(ctx.list(list.index));\n }\n throw createUnhandleNodeError(type);\n }\n case 6 /* NodeTypes.Linked */:\n {\n const linked = node;\n const modifier = resolveLinkedModifier(linked);\n const key = resolveLinkedKey(linked);\n return ctx.linked(formatMessagePart(ctx, key), modifier ? formatMessagePart(ctx, modifier) : undefined, ctx.type);\n }\n case 7 /* NodeTypes.LinkedKey */:\n {\n return resolveValue$1(node, type);\n }\n case 8 /* NodeTypes.LinkedModifier */:\n {\n return resolveValue$1(node, type);\n }\n default:\n throw new Error(`unhandled node on format message part: ${type}`);\n }\n}\nconst WARN_MESSAGE = `Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.`;\nfunction checkHtmlMessage(source, warnHtmlMessage) {\n if (warnHtmlMessage && (0,_intlify_message_compiler__WEBPACK_IMPORTED_MODULE_7__.detectHtmlTag)(source)) {\n (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.warn)((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.format)(WARN_MESSAGE, {\n source\n }));\n }\n}\nconst defaultOnCacheKey = message => message;\nlet compileCache = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.create)();\nfunction onCompileWarn(_warn) {\n if (_warn.code === _intlify_message_compiler__WEBPACK_IMPORTED_MODULE_7__.CompileWarnCodes.USE_MODULO_SYNTAX) {\n (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.warn)(`The use of named interpolation with modulo syntax is deprecated. ` + `It will be removed in v10.\\n` + `reference: https://vue-i18n.intlify.dev/guide/essentials/syntax#rails-i18n-format \\n` + `(message compiler warning message: ${_warn.message})`);\n }\n}\nfunction clearCompileCache() {\n compileCache = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.create)();\n}\nfunction baseCompile(message, options = {}) {\n // error detecting on compile\n let detectError = false;\n const onError = options.onError || _intlify_message_compiler__WEBPACK_IMPORTED_MODULE_7__.defaultOnError;\n options.onError = err => {\n detectError = true;\n onError(err);\n };\n // compile with mesasge-compiler\n return {\n ...(0,_intlify_message_compiler__WEBPACK_IMPORTED_MODULE_7__.baseCompile)(message, options),\n detectError\n };\n}\n/* #__NO_SIDE_EFFECTS__ */\nconst compileToFunction = (message, context) => {\n if (!(0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isString)(message)) {\n throw createCoreError(CoreErrorCodes.NOT_SUPPORT_NON_STRING_MESSAGE);\n }\n // set onWarn\n if (true) {\n context.onWarn = onCompileWarn;\n }\n {\n // check HTML message\n const warnHtmlMessage = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isBoolean)(context.warnHtmlMessage) ? context.warnHtmlMessage : true;\n true && checkHtmlMessage(message, warnHtmlMessage);\n // check caches\n const onCacheKey = context.onCacheKey || defaultOnCacheKey;\n const cacheKey = onCacheKey(message);\n const cached = compileCache[cacheKey];\n if (cached) {\n return cached;\n }\n // compile\n const {\n code,\n detectError\n } = baseCompile(message, context);\n // evaluate function\n const msg = new Function(`return ${code}`)();\n // if occurred compile error, don't cache\n return !detectError ? compileCache[cacheKey] = msg : msg;\n }\n};\nfunction compile(message, context) {\n // set onWarn\n if (true) {\n context.onWarn = onCompileWarn;\n }\n if (__INTLIFY_JIT_COMPILATION__ && !__INTLIFY_DROP_MESSAGE_COMPILER__ && (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isString)(message)) {\n // check HTML message\n const warnHtmlMessage = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isBoolean)(context.warnHtmlMessage) ? context.warnHtmlMessage : true;\n true && checkHtmlMessage(message, warnHtmlMessage);\n // check caches\n const onCacheKey = context.onCacheKey || defaultOnCacheKey;\n const cacheKey = onCacheKey(message);\n const cached = compileCache[cacheKey];\n if (cached) {\n return cached;\n }\n // compile with JIT mode\n const {\n ast,\n detectError\n } = baseCompile(message, {\n ...context,\n location: \"development\" !== 'production',\n jit: true\n });\n // compose message function from AST\n const msg = format(ast);\n // if occurred compile error, don't cache\n return !detectError ? compileCache[cacheKey] = msg : msg;\n } else {\n if ( true && !isMessageAST(message)) {\n (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.warn)(`the message that is resolve with key '${context.key}' is not supported for jit compilation`);\n return () => message;\n }\n // AST case (passed from bundler)\n const cacheKey = message.cacheKey;\n if (cacheKey) {\n const cached = compileCache[cacheKey];\n if (cached) {\n return cached;\n }\n // compose message function from message (AST)\n return compileCache[cacheKey] = format(message);\n } else {\n return format(message);\n }\n }\n}\nconst NOOP_MESSAGE_FUNCTION = () => '';\nconst isMessageFunction = val => (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isFunction)(val);\n// implementation of `translate` function\nfunction translate(context, ...args) {\n const {\n fallbackFormat,\n postTranslation,\n unresolving,\n messageCompiler,\n fallbackLocale,\n messages\n } = context;\n const [key, options] = parseTranslateArgs(...args);\n const missingWarn = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isBoolean)(options.missingWarn) ? options.missingWarn : context.missingWarn;\n const fallbackWarn = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isBoolean)(options.fallbackWarn) ? options.fallbackWarn : context.fallbackWarn;\n const escapeParameter = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isBoolean)(options.escapeParameter) ? options.escapeParameter : context.escapeParameter;\n const resolvedMessage = !!options.resolvedMessage;\n // prettier-ignore\n const defaultMsgOrKey = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isString)(options.default) || (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isBoolean)(options.default) // default by function option\n ? !(0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isBoolean)(options.default) ? options.default : !messageCompiler ? () => key : key : fallbackFormat // default by `fallbackFormat` option\n ? !messageCompiler ? () => key : key : '';\n const enableDefaultMsg = fallbackFormat || defaultMsgOrKey !== '';\n const locale = getLocale(context, options);\n // escape params\n escapeParameter && escapeParams(options);\n // resolve message format\n // eslint-disable-next-line prefer-const\n let [formatScope, targetLocale, message] = !resolvedMessage ? resolveMessageFormat(context, key, locale, fallbackLocale, fallbackWarn, missingWarn) : [key, locale, messages[locale] || (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.create)()];\n // NOTE:\n // Fix to work around `ssrTransfrom` bug in Vite.\n // https://github.com/vitejs/vite/issues/4306\n // To get around this, use temporary variables.\n // https://github.com/nuxt/framework/issues/1461#issuecomment-954606243\n let format = formatScope;\n // if you use default message, set it as message format!\n let cacheBaseKey = key;\n if (!resolvedMessage && !((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isString)(format) || isMessageAST(format) || isMessageFunction(format))) {\n if (enableDefaultMsg) {\n format = defaultMsgOrKey;\n cacheBaseKey = format;\n }\n }\n // checking message format and target locale\n if (!resolvedMessage && (!((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isString)(format) || isMessageAST(format) || isMessageFunction(format)) || !(0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isString)(targetLocale))) {\n return unresolving ? NOT_REOSLVED : key;\n }\n // TODO: refactor\n if ( true && (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isString)(format) && context.messageCompiler == null) {\n (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.warn)(`The message format compilation is not supported in this build. ` + `Because message compiler isn't included. ` + `You need to pre-compilation all message format. ` + `So translate function return '${key}'.`);\n return key;\n }\n // setup compile error detecting\n let occurred = false;\n const onError = () => {\n occurred = true;\n };\n // compile message format\n const msg = !isMessageFunction(format) ? compileMessageFormat(context, key, targetLocale, format, cacheBaseKey, onError) : format;\n // if occurred compile error, return the message format\n if (occurred) {\n return format;\n }\n // evaluate message with context\n const ctxOptions = getMessageContextOptions(context, targetLocale, message, options);\n const msgContext = createMessageContext(ctxOptions);\n const messaged = evaluateMessage(context, msg, msgContext);\n // if use post translation option, proceed it with handler\n let ret = postTranslation ? postTranslation(messaged, key) : messaged;\n // apply HTML sanitization for security\n if (escapeParameter && (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isString)(ret)) {\n ret = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.sanitizeTranslatedHtml)(ret);\n }\n // NOTE: experimental !!\n if (true) {\n // prettier-ignore\n const payloads = {\n timestamp: Date.now(),\n key: (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isString)(key) ? key : isMessageFunction(format) ? format.key : '',\n locale: targetLocale || (isMessageFunction(format) ? format.locale : ''),\n format: (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isString)(format) ? format : isMessageFunction(format) ? format.source : '',\n message: ret\n };\n payloads.meta = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.assign)({}, context.__meta, getAdditionalMeta() || {});\n translateDevTools(payloads);\n }\n return ret;\n}\nfunction escapeParams(options) {\n if ((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isArray)(options.list)) {\n options.list = options.list.map(item => (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isString)(item) ? (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.escapeHtml)(item) : item);\n } else if ((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isObject)(options.named)) {\n Object.keys(options.named).forEach(key => {\n if ((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isString)(options.named[key])) {\n options.named[key] = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.escapeHtml)(options.named[key]);\n }\n });\n }\n}\nfunction resolveMessageFormat(context, key, locale, fallbackLocale, fallbackWarn, missingWarn) {\n const {\n messages,\n onWarn,\n messageResolver: resolveValue,\n localeFallbacker\n } = context;\n const locales = localeFallbacker(context, fallbackLocale, locale); // eslint-disable-line @typescript-eslint/no-explicit-any\n let message = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.create)();\n let targetLocale;\n let format = null;\n let from = locale;\n let to = null;\n const type = 'translate';\n for (let i = 0; i < locales.length; i++) {\n targetLocale = to = locales[i];\n if ( true && locale !== targetLocale && !isAlmostSameLocale(locale, targetLocale) && isTranslateFallbackWarn(fallbackWarn, key)) {\n onWarn(getWarnMessage(CoreWarnCodes.FALLBACK_TO_TRANSLATE, {\n key,\n target: targetLocale\n }));\n }\n // for vue-devtools timeline event\n if ( true && locale !== targetLocale) {\n const emitter = context.__v_emitter;\n if (emitter) {\n emitter.emit(\"fallback\" /* VueDevToolsTimelineEvents.FALBACK */, {\n type,\n key,\n from,\n to,\n groupId: `${type}:${key}`\n });\n }\n }\n message = messages[targetLocale] || (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.create)();\n // for vue-devtools timeline event\n let start = null;\n let startTag;\n let endTag;\n if ( true && _intlify_shared__WEBPACK_IMPORTED_MODULE_6__.inBrowser) {\n start = window.performance.now();\n startTag = 'intlify-message-resolve-start';\n endTag = 'intlify-message-resolve-end';\n _intlify_shared__WEBPACK_IMPORTED_MODULE_6__.mark && (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.mark)(startTag);\n }\n if ((format = resolveValue(message, key)) === null) {\n // if null, resolve with object key path\n format = message[key]; // eslint-disable-line @typescript-eslint/no-explicit-any\n }\n // for vue-devtools timeline event\n if ( true && _intlify_shared__WEBPACK_IMPORTED_MODULE_6__.inBrowser) {\n const end = window.performance.now();\n const emitter = context.__v_emitter;\n if (emitter && start && format) {\n emitter.emit(\"message-resolve\" /* VueDevToolsTimelineEvents.MESSAGE_RESOLVE */, {\n type: \"message-resolve\" /* VueDevToolsTimelineEvents.MESSAGE_RESOLVE */,\n key,\n message: format,\n time: end - start,\n groupId: `${type}:${key}`\n });\n }\n if (startTag && endTag && _intlify_shared__WEBPACK_IMPORTED_MODULE_6__.mark && _intlify_shared__WEBPACK_IMPORTED_MODULE_6__.measure) {\n (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.mark)(endTag);\n (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.measure)('intlify message resolve', startTag, endTag);\n }\n }\n if ((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isString)(format) || isMessageAST(format) || isMessageFunction(format)) {\n break;\n }\n if (!isImplicitFallback(targetLocale, locales)) {\n const missingRet = handleMissing(context,\n // eslint-disable-line @typescript-eslint/no-explicit-any\n key, targetLocale, missingWarn, type);\n if (missingRet !== key) {\n format = missingRet;\n }\n }\n from = to;\n }\n return [format, targetLocale, message];\n}\nfunction compileMessageFormat(context, key, targetLocale, format, cacheBaseKey, onError) {\n const {\n messageCompiler,\n warnHtmlMessage\n } = context;\n if (isMessageFunction(format)) {\n const msg = format;\n msg.locale = msg.locale || targetLocale;\n msg.key = msg.key || key;\n return msg;\n }\n if (messageCompiler == null) {\n const msg = () => format;\n msg.locale = targetLocale;\n msg.key = key;\n return msg;\n }\n // for vue-devtools timeline event\n let start = null;\n let startTag;\n let endTag;\n if ( true && _intlify_shared__WEBPACK_IMPORTED_MODULE_6__.inBrowser) {\n start = window.performance.now();\n startTag = 'intlify-message-compilation-start';\n endTag = 'intlify-message-compilation-end';\n _intlify_shared__WEBPACK_IMPORTED_MODULE_6__.mark && (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.mark)(startTag);\n }\n const msg = messageCompiler(format, getCompileContext(context, targetLocale, cacheBaseKey, format, warnHtmlMessage, onError));\n // for vue-devtools timeline event\n if ( true && _intlify_shared__WEBPACK_IMPORTED_MODULE_6__.inBrowser) {\n const end = window.performance.now();\n const emitter = context.__v_emitter;\n if (emitter && start) {\n emitter.emit(\"message-compilation\" /* VueDevToolsTimelineEvents.MESSAGE_COMPILATION */, {\n type: \"message-compilation\" /* VueDevToolsTimelineEvents.MESSAGE_COMPILATION */,\n message: format,\n time: end - start,\n groupId: `${'translate'}:${key}`\n });\n }\n if (startTag && endTag && _intlify_shared__WEBPACK_IMPORTED_MODULE_6__.mark && _intlify_shared__WEBPACK_IMPORTED_MODULE_6__.measure) {\n (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.mark)(endTag);\n (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.measure)('intlify message compilation', startTag, endTag);\n }\n }\n msg.locale = targetLocale;\n msg.key = key;\n msg.source = format;\n return msg;\n}\nfunction evaluateMessage(context, msg, msgCtx) {\n // for vue-devtools timeline event\n let start = null;\n let startTag;\n let endTag;\n if ( true && _intlify_shared__WEBPACK_IMPORTED_MODULE_6__.inBrowser) {\n start = window.performance.now();\n startTag = 'intlify-message-evaluation-start';\n endTag = 'intlify-message-evaluation-end';\n _intlify_shared__WEBPACK_IMPORTED_MODULE_6__.mark && (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.mark)(startTag);\n }\n const messaged = msg(msgCtx);\n // for vue-devtools timeline event\n if ( true && _intlify_shared__WEBPACK_IMPORTED_MODULE_6__.inBrowser) {\n const end = window.performance.now();\n const emitter = context.__v_emitter;\n if (emitter && start) {\n emitter.emit(\"message-evaluation\" /* VueDevToolsTimelineEvents.MESSAGE_EVALUATION */, {\n type: \"message-evaluation\" /* VueDevToolsTimelineEvents.MESSAGE_EVALUATION */,\n value: messaged,\n time: end - start,\n groupId: `${'translate'}:${msg.key}`\n });\n }\n if (startTag && endTag && _intlify_shared__WEBPACK_IMPORTED_MODULE_6__.mark && _intlify_shared__WEBPACK_IMPORTED_MODULE_6__.measure) {\n (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.mark)(endTag);\n (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.measure)('intlify message evaluation', startTag, endTag);\n }\n }\n return messaged;\n}\n/** @internal */\nfunction parseTranslateArgs(...args) {\n const [arg1, arg2, arg3] = args;\n const options = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.create)();\n if (!(0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isString)(arg1) && !(0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isNumber)(arg1) && !isMessageFunction(arg1) && !isMessageAST(arg1)) {\n throw createCoreError(CoreErrorCodes.INVALID_ARGUMENT);\n }\n // prettier-ignore\n const key = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isNumber)(arg1) ? String(arg1) : isMessageFunction(arg1) ? arg1 : arg1;\n if ((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isNumber)(arg2)) {\n options.plural = arg2;\n } else if ((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isString)(arg2)) {\n options.default = arg2;\n } else if ((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isPlainObject)(arg2) && !(0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isEmptyObject)(arg2)) {\n options.named = arg2;\n } else if ((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isArray)(arg2)) {\n options.list = arg2;\n }\n if ((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isNumber)(arg3)) {\n options.plural = arg3;\n } else if ((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isString)(arg3)) {\n options.default = arg3;\n } else if ((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isPlainObject)(arg3)) {\n (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.assign)(options, arg3);\n }\n return [key, options];\n}\nfunction getCompileContext(context, locale, key, source, warnHtmlMessage, onError) {\n return {\n locale,\n key,\n warnHtmlMessage,\n onError: err => {\n onError && onError(err);\n if (true) {\n const _source = getSourceForCodeFrame(source);\n const message = `Message compilation error: ${err.message}`;\n const codeFrame = err.location && _source && (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.generateCodeFrame)(_source, err.location.start.offset, err.location.end.offset);\n const emitter = context.__v_emitter;\n if (emitter && _source) {\n emitter.emit(\"compile-error\" /* VueDevToolsTimelineEvents.COMPILE_ERROR */, {\n message: _source,\n error: err.message,\n start: err.location && err.location.start.offset,\n end: err.location && err.location.end.offset,\n groupId: `${'translate'}:${key}`\n });\n }\n console.error(codeFrame ? `${message}\\n${codeFrame}` : message);\n } else // removed by dead control flow\n{}\n },\n onCacheKey: source => (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.generateFormatCacheKey)(locale, key, source)\n };\n}\nfunction getSourceForCodeFrame(source) {\n if ((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isString)(source)) {\n return source;\n } else {\n if (source.loc && source.loc.source) {\n return source.loc.source;\n }\n }\n}\nfunction getMessageContextOptions(context, locale, message, options) {\n const {\n modifiers,\n pluralRules,\n messageResolver: resolveValue,\n fallbackLocale,\n fallbackWarn,\n missingWarn,\n fallbackContext\n } = context;\n const resolveMessage = key => {\n let val = resolveValue(message, key);\n // fallback to root context\n if (val == null && fallbackContext) {\n const [,, message] = resolveMessageFormat(fallbackContext, key, locale, fallbackLocale, fallbackWarn, missingWarn);\n val = resolveValue(message, key);\n }\n if ((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isString)(val) || isMessageAST(val)) {\n let occurred = false;\n const onError = () => {\n occurred = true;\n };\n const msg = compileMessageFormat(context, key, locale, val, key, onError);\n return !occurred ? msg : NOOP_MESSAGE_FUNCTION;\n } else if (isMessageFunction(val)) {\n return val;\n } else {\n // TODO: should be implemented warning message\n return NOOP_MESSAGE_FUNCTION;\n }\n };\n const ctxOptions = {\n locale,\n modifiers,\n pluralRules,\n messages: resolveMessage\n };\n if (context.processor) {\n ctxOptions.processor = context.processor;\n }\n if (options.list) {\n ctxOptions.list = options.list;\n }\n if (options.named) {\n ctxOptions.named = options.named;\n }\n if ((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isNumber)(options.plural)) {\n ctxOptions.pluralIndex = options.plural;\n }\n return ctxOptions;\n}\nconst intlDefined = typeof Intl !== 'undefined';\nconst Availabilities = {\n dateTimeFormat: intlDefined && typeof Intl.DateTimeFormat !== 'undefined',\n numberFormat: intlDefined && typeof Intl.NumberFormat !== 'undefined'\n};\n\n// implementation of `datetime` function\nfunction datetime(context, ...args) {\n const {\n datetimeFormats,\n unresolving,\n fallbackLocale,\n onWarn,\n localeFallbacker\n } = context;\n const {\n __datetimeFormatters\n } = context;\n if ( true && !Availabilities.dateTimeFormat) {\n onWarn(getWarnMessage(CoreWarnCodes.CANNOT_FORMAT_DATE));\n return MISSING_RESOLVE_VALUE;\n }\n const [key, value, options, overrides] = parseDateTimeArgs(...args);\n const missingWarn = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isBoolean)(options.missingWarn) ? options.missingWarn : context.missingWarn;\n const fallbackWarn = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isBoolean)(options.fallbackWarn) ? options.fallbackWarn : context.fallbackWarn;\n const part = !!options.part;\n const locale = getLocale(context, options);\n const locales = localeFallbacker(context,\n // eslint-disable-line @typescript-eslint/no-explicit-any\n fallbackLocale, locale);\n if (!(0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isString)(key) || key === '') {\n return new Intl.DateTimeFormat(locale, overrides).format(value);\n }\n // resolve format\n let datetimeFormat = {};\n let targetLocale;\n let format = null;\n let from = locale;\n let to = null;\n const type = 'datetime format';\n for (let i = 0; i < locales.length; i++) {\n targetLocale = to = locales[i];\n if ( true && locale !== targetLocale && isTranslateFallbackWarn(fallbackWarn, key)) {\n onWarn(getWarnMessage(CoreWarnCodes.FALLBACK_TO_DATE_FORMAT, {\n key,\n target: targetLocale\n }));\n }\n // for vue-devtools timeline event\n if ( true && locale !== targetLocale) {\n const emitter = context.__v_emitter;\n if (emitter) {\n emitter.emit(\"fallback\" /* VueDevToolsTimelineEvents.FALBACK */, {\n type,\n key,\n from,\n to,\n groupId: `${type}:${key}`\n });\n }\n }\n datetimeFormat = datetimeFormats[targetLocale] || {};\n format = datetimeFormat[key];\n if ((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isPlainObject)(format)) break;\n handleMissing(context, key, targetLocale, missingWarn, type); // eslint-disable-line @typescript-eslint/no-explicit-any\n from = to;\n }\n // checking format and target locale\n if (!(0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isPlainObject)(format) || !(0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isString)(targetLocale)) {\n return unresolving ? NOT_REOSLVED : key;\n }\n let id = `${targetLocale}__${key}`;\n if (!(0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isEmptyObject)(overrides)) {\n id = `${id}__${JSON.stringify(overrides)}`;\n }\n let formatter = __datetimeFormatters.get(id);\n if (!formatter) {\n formatter = new Intl.DateTimeFormat(targetLocale, (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.assign)({}, format, overrides));\n __datetimeFormatters.set(id, formatter);\n }\n return !part ? formatter.format(value) : formatter.formatToParts(value);\n}\n/** @internal */\nconst DATETIME_FORMAT_OPTIONS_KEYS = ['localeMatcher', 'weekday', 'era', 'year', 'month', 'day', 'hour', 'minute', 'second', 'timeZoneName', 'formatMatcher', 'hour12', 'timeZone', 'dateStyle', 'timeStyle', 'calendar', 'dayPeriod', 'numberingSystem', 'hourCycle', 'fractionalSecondDigits'];\n/** @internal */\nfunction parseDateTimeArgs(...args) {\n const [arg1, arg2, arg3, arg4] = args;\n const options = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.create)();\n let overrides = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.create)();\n let value;\n if ((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isString)(arg1)) {\n // Only allow ISO strings - other date formats are often supported,\n // but may cause different results in different browsers.\n const matches = arg1.match(/(\\d{4}-\\d{2}-\\d{2})(T|\\s)?(.*)/);\n if (!matches) {\n throw createCoreError(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT);\n }\n // Some browsers can not parse the iso datetime separated by space,\n // this is a compromise solution by replace the 'T'/' ' with 'T'\n const dateTime = matches[3] ? matches[3].trim().startsWith('T') ? `${matches[1].trim()}${matches[3].trim()}` : `${matches[1].trim()}T${matches[3].trim()}` : matches[1].trim();\n value = new Date(dateTime);\n try {\n // This will fail if the date is not valid\n value.toISOString();\n } catch (e) {\n throw createCoreError(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT);\n }\n } else if ((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isDate)(arg1)) {\n if (isNaN(arg1.getTime())) {\n throw createCoreError(CoreErrorCodes.INVALID_DATE_ARGUMENT);\n }\n value = arg1;\n } else if ((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isNumber)(arg1)) {\n value = arg1;\n } else {\n throw createCoreError(CoreErrorCodes.INVALID_ARGUMENT);\n }\n if ((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isString)(arg2)) {\n options.key = arg2;\n } else if ((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isPlainObject)(arg2)) {\n Object.keys(arg2).forEach(key => {\n if (DATETIME_FORMAT_OPTIONS_KEYS.includes(key)) {\n overrides[key] = arg2[key];\n } else {\n options[key] = arg2[key];\n }\n });\n }\n if ((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isString)(arg3)) {\n options.locale = arg3;\n } else if ((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isPlainObject)(arg3)) {\n overrides = arg3;\n }\n if ((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isPlainObject)(arg4)) {\n overrides = arg4;\n }\n return [options.key || '', value, options, overrides];\n}\n/** @internal */\nfunction clearDateTimeFormat(ctx, locale, format) {\n const context = ctx;\n for (const key in format) {\n const id = `${locale}__${key}`;\n if (!context.__datetimeFormatters.has(id)) {\n continue;\n }\n context.__datetimeFormatters.delete(id);\n }\n}\n\n// implementation of `number` function\nfunction number(context, ...args) {\n const {\n numberFormats,\n unresolving,\n fallbackLocale,\n onWarn,\n localeFallbacker\n } = context;\n const {\n __numberFormatters\n } = context;\n if ( true && !Availabilities.numberFormat) {\n onWarn(getWarnMessage(CoreWarnCodes.CANNOT_FORMAT_NUMBER));\n return MISSING_RESOLVE_VALUE;\n }\n const [key, value, options, overrides] = parseNumberArgs(...args);\n const missingWarn = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isBoolean)(options.missingWarn) ? options.missingWarn : context.missingWarn;\n const fallbackWarn = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isBoolean)(options.fallbackWarn) ? options.fallbackWarn : context.fallbackWarn;\n const part = !!options.part;\n const locale = getLocale(context, options);\n const locales = localeFallbacker(context,\n // eslint-disable-line @typescript-eslint/no-explicit-any\n fallbackLocale, locale);\n if (!(0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isString)(key) || key === '') {\n return new Intl.NumberFormat(locale, overrides).format(value);\n }\n // resolve format\n let numberFormat = {};\n let targetLocale;\n let format = null;\n let from = locale;\n let to = null;\n const type = 'number format';\n for (let i = 0; i < locales.length; i++) {\n targetLocale = to = locales[i];\n if ( true && locale !== targetLocale && isTranslateFallbackWarn(fallbackWarn, key)) {\n onWarn(getWarnMessage(CoreWarnCodes.FALLBACK_TO_NUMBER_FORMAT, {\n key,\n target: targetLocale\n }));\n }\n // for vue-devtools timeline event\n if ( true && locale !== targetLocale) {\n const emitter = context.__v_emitter;\n if (emitter) {\n emitter.emit(\"fallback\" /* VueDevToolsTimelineEvents.FALBACK */, {\n type,\n key,\n from,\n to,\n groupId: `${type}:${key}`\n });\n }\n }\n numberFormat = numberFormats[targetLocale] || {};\n format = numberFormat[key];\n if ((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isPlainObject)(format)) break;\n handleMissing(context, key, targetLocale, missingWarn, type); // eslint-disable-line @typescript-eslint/no-explicit-any\n from = to;\n }\n // checking format and target locale\n if (!(0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isPlainObject)(format) || !(0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isString)(targetLocale)) {\n return unresolving ? NOT_REOSLVED : key;\n }\n let id = `${targetLocale}__${key}`;\n if (!(0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isEmptyObject)(overrides)) {\n id = `${id}__${JSON.stringify(overrides)}`;\n }\n let formatter = __numberFormatters.get(id);\n if (!formatter) {\n formatter = new Intl.NumberFormat(targetLocale, (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.assign)({}, format, overrides));\n __numberFormatters.set(id, formatter);\n }\n return !part ? formatter.format(value) : formatter.formatToParts(value);\n}\n/** @internal */\nconst NUMBER_FORMAT_OPTIONS_KEYS = ['localeMatcher', 'style', 'currency', 'currencyDisplay', 'currencySign', 'useGrouping', 'minimumIntegerDigits', 'minimumFractionDigits', 'maximumFractionDigits', 'minimumSignificantDigits', 'maximumSignificantDigits', 'compactDisplay', 'notation', 'signDisplay', 'unit', 'unitDisplay', 'roundingMode', 'roundingPriority', 'roundingIncrement', 'trailingZeroDisplay'];\n/** @internal */\nfunction parseNumberArgs(...args) {\n const [arg1, arg2, arg3, arg4] = args;\n const options = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.create)();\n let overrides = (0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.create)();\n if (!(0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isNumber)(arg1)) {\n throw createCoreError(CoreErrorCodes.INVALID_ARGUMENT);\n }\n const value = arg1;\n if ((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isString)(arg2)) {\n options.key = arg2;\n } else if ((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isPlainObject)(arg2)) {\n Object.keys(arg2).forEach(key => {\n if (NUMBER_FORMAT_OPTIONS_KEYS.includes(key)) {\n overrides[key] = arg2[key];\n } else {\n options[key] = arg2[key];\n }\n });\n }\n if ((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isString)(arg3)) {\n options.locale = arg3;\n } else if ((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isPlainObject)(arg3)) {\n overrides = arg3;\n }\n if ((0,_intlify_shared__WEBPACK_IMPORTED_MODULE_6__.isPlainObject)(arg4)) {\n overrides = arg4;\n }\n return [options.key || '', value, options, overrides];\n}\n/** @internal */\nfunction clearNumberFormat(ctx, locale, format) {\n const context = ctx;\n for (const key in format) {\n const id = `${locale}__${key}`;\n if (!context.__numberFormatters.has(id)) {\n continue;\n }\n context.__numberFormatters.delete(id);\n }\n}\n{\n initFeatureFlags();\n}\n\n\n//# sourceURL=webpack://jandl/./node_modules/@intlify/core-base/dist/core-base.mjs?\n}");
/***/ }),
/***/ "./node_modules/@intlify/message-compiler/dist/message-compiler.esm-browser.js":
/*!*************************************************************************************!*\
!*** ./node_modules/@intlify/message-compiler/dist/message-compiler.esm-browser.js ***!
\*************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ CompileErrorCodes: function() { return /* binding */ CompileErrorCodes; },\n/* harmony export */ CompileWarnCodes: function() { return /* binding */ CompileWarnCodes; },\n/* harmony export */ ERROR_DOMAIN: function() { return /* binding */ ERROR_DOMAIN$2; },\n/* harmony export */ LOCATION_STUB: function() { return /* binding */ LOCATION_STUB; },\n/* harmony export */ baseCompile: function() { return /* binding */ baseCompile; },\n/* harmony export */ createCompileError: function() { return /* binding */ createCompileError; },\n/* harmony export */ createCompileWarn: function() { return /* binding */ createCompileWarn; },\n/* harmony export */ createLocation: function() { return /* binding */ createLocation; },\n/* harmony export */ createParser: function() { return /* binding */ createParser; },\n/* harmony export */ createPosition: function() { return /* binding */ createPosition; },\n/* harmony export */ defaultOnError: function() { return /* binding */ defaultOnError; },\n/* harmony export */ detectHtmlTag: function() { return /* binding */ detectHtmlTag; },\n/* harmony export */ errorMessages: function() { return /* binding */ errorMessages; },\n/* harmony export */ warnMessages: function() { return /* binding */ warnMessages; }\n/* harmony export */ });\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.push.js */ \"./node_modules/core-js/modules/es.array.push.js\");\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es_json_stringify_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.json.stringify.js */ \"./node_modules/core-js/modules/es.json.stringify.js\");\n/* harmony import */ var core_js_modules_es_json_stringify_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_json_stringify_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/esnext.iterator.constructor.js */ \"./node_modules/core-js/modules/esnext.iterator.constructor.js\");\n/* harmony import */ var core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var core_js_modules_esnext_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/esnext.iterator.for-each.js */ \"./node_modules/core-js/modules/esnext.iterator.for-each.js\");\n/* harmony import */ var core_js_modules_esnext_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_esnext_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var core_js_modules_esnext_iterator_map_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/esnext.iterator.map.js */ \"./node_modules/core-js/modules/esnext.iterator.map.js\");\n/* harmony import */ var core_js_modules_esnext_iterator_map_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_esnext_iterator_map_js__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var core_js_modules_esnext_iterator_reduce_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/esnext.iterator.reduce.js */ \"./node_modules/core-js/modules/esnext.iterator.reduce.js\");\n/* harmony import */ var core_js_modules_esnext_iterator_reduce_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_esnext_iterator_reduce_js__WEBPACK_IMPORTED_MODULE_5__);\n\n\n\n\n\n\n/*!\n * message-compiler v9.14.5\n * (c) 2025 kazuya kawaguchi\n * Released under the MIT License.\n */\nconst LOCATION_STUB = {\n start: {\n line: 1,\n column: 1,\n offset: 0\n },\n end: {\n line: 1,\n column: 1,\n offset: 0\n }\n};\nfunction createPosition(line, column, offset) {\n return {\n line,\n column,\n offset\n };\n}\nfunction createLocation(start, end, source) {\n const loc = {\n start,\n end\n };\n if (source != null) {\n loc.source = source;\n }\n return loc;\n}\n\n/**\n * Original Utilities\n * written by kazuya kawaguchi\n */\nconst RE_ARGS = /\\{([0-9a-zA-Z]+)\\}/g;\n/* eslint-disable */\nfunction format(message, ...args) {\n if (args.length === 1 && isObject(args[0])) {\n args = args[0];\n }\n if (!args || !args.hasOwnProperty) {\n args = {};\n }\n return message.replace(RE_ARGS, (match, identifier) => {\n return args.hasOwnProperty(identifier) ? args[identifier] : '';\n });\n}\nconst assign = Object.assign;\nconst isString = val => typeof val === 'string';\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst isObject = val => val !== null && typeof val === 'object';\nfunction join(items, separator = '') {\n return items.reduce((str, item, index) => index === 0 ? str + item : str + separator + item, '');\n}\nconst CompileWarnCodes = {\n USE_MODULO_SYNTAX: 1,\n __EXTEND_POINT__: 2\n};\n/** @internal */\nconst warnMessages = {\n [CompileWarnCodes.USE_MODULO_SYNTAX]: `Use modulo before '{{0}}'.`\n};\nfunction createCompileWarn(code, loc, ...args) {\n const msg = format(warnMessages[code] || '', ...(args || []));\n const message = {\n message: String(msg),\n code\n };\n if (loc) {\n message.location = loc;\n }\n return message;\n}\nconst CompileErrorCodes = {\n // tokenizer error codes\n EXPECTED_TOKEN: 1,\n INVALID_TOKEN_IN_PLACEHOLDER: 2,\n UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER: 3,\n UNKNOWN_ESCAPE_SEQUENCE: 4,\n INVALID_UNICODE_ESCAPE_SEQUENCE: 5,\n UNBALANCED_CLOSING_BRACE: 6,\n UNTERMINATED_CLOSING_BRACE: 7,\n EMPTY_PLACEHOLDER: 8,\n NOT_ALLOW_NEST_PLACEHOLDER: 9,\n INVALID_LINKED_FORMAT: 10,\n // parser error codes\n MUST_HAVE_MESSAGES_IN_PLURAL: 11,\n UNEXPECTED_EMPTY_LINKED_MODIFIER: 12,\n UNEXPECTED_EMPTY_LINKED_KEY: 13,\n UNEXPECTED_LEXICAL_ANALYSIS: 14,\n // generator error codes\n UNHANDLED_CODEGEN_NODE_TYPE: 15,\n // minifier error codes\n UNHANDLED_MINIFIER_NODE_TYPE: 16,\n // Special value for higher-order compilers to pick up the last code\n // to avoid collision of error codes. This should always be kept as the last\n // item.\n __EXTEND_POINT__: 17\n};\n/** @internal */\nconst errorMessages = {\n // tokenizer error messages\n [CompileErrorCodes.EXPECTED_TOKEN]: `Expected token: '{0}'`,\n [CompileErrorCodes.INVALID_TOKEN_IN_PLACEHOLDER]: `Invalid token in placeholder: '{0}'`,\n [CompileErrorCodes.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]: `Unterminated single quote in placeholder`,\n [CompileErrorCodes.UNKNOWN_ESCAPE_SEQUENCE]: `Unknown escape sequence: \\\\{0}`,\n [CompileErrorCodes.INVALID_UNICODE_ESCAPE_SEQUENCE]: `Invalid unicode escape sequence: {0}`,\n [CompileErrorCodes.UNBALANCED_CLOSING_BRACE]: `Unbalanced closing brace`,\n [CompileErrorCodes.UNTERMINATED_CLOSING_BRACE]: `Unterminated closing brace`,\n [CompileErrorCodes.EMPTY_PLACEHOLDER]: `Empty placeholder`,\n [CompileErrorCodes.NOT_ALLOW_NEST_PLACEHOLDER]: `Not allowed nest placeholder`,\n [CompileErrorCodes.INVALID_LINKED_FORMAT]: `Invalid linked format`,\n // parser error messages\n [CompileErrorCodes.MUST_HAVE_MESSAGES_IN_PLURAL]: `Plural must have messages`,\n [CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_MODIFIER]: `Unexpected empty linked modifier`,\n [CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_KEY]: `Unexpected empty linked key`,\n [CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS]: `Unexpected lexical analysis in token: '{0}'`,\n // generator error messages\n [CompileErrorCodes.UNHANDLED_CODEGEN_NODE_TYPE]: `unhandled codegen node type: '{0}'`,\n // minimizer error messages\n [CompileErrorCodes.UNHANDLED_MINIFIER_NODE_TYPE]: `unhandled mimifier node type: '{0}'`\n};\nfunction createCompileError(code, loc, options = {}) {\n const {\n domain,\n messages,\n args\n } = options;\n const msg = format((messages || errorMessages)[code] || '', ...(args || []));\n const error = new SyntaxError(String(msg));\n error.code = code;\n if (loc) {\n error.location = loc;\n }\n error.domain = domain;\n return error;\n}\n/** @internal */\nfunction defaultOnError(error) {\n throw error;\n}\n\n// eslint-disable-next-line no-useless-escape\nconst RE_HTML_TAG = /<\\/?[\\w\\s=\"/.':;#-\\/]+>/;\nconst detectHtmlTag = source => RE_HTML_TAG.test(source);\nconst CHAR_SP = ' ';\nconst CHAR_CR = '\\r';\nconst CHAR_LF = '\\n';\nconst CHAR_LS = String.fromCharCode(0x2028);\nconst CHAR_PS = String.fromCharCode(0x2029);\nfunction createScanner(str) {\n const _buf = str;\n let _index = 0;\n let _line = 1;\n let _column = 1;\n let _peekOffset = 0;\n const isCRLF = index => _buf[index] === CHAR_CR && _buf[index + 1] === CHAR_LF;\n const isLF = index => _buf[index] === CHAR_LF;\n const isPS = index => _buf[index] === CHAR_PS;\n const isLS = index => _buf[index] === CHAR_LS;\n const isLineEnd = index => isCRLF(index) || isLF(index) || isPS(index) || isLS(index);\n const index = () => _index;\n const line = () => _line;\n const column = () => _column;\n const peekOffset = () => _peekOffset;\n const charAt = offset => isCRLF(offset) || isPS(offset) || isLS(offset) ? CHAR_LF : _buf[offset];\n const currentChar = () => charAt(_index);\n const currentPeek = () => charAt(_index + _peekOffset);\n function next() {\n _peekOffset = 0;\n if (isLineEnd(_index)) {\n _line++;\n _column = 0;\n }\n if (isCRLF(_index)) {\n _index++;\n }\n _index++;\n _column++;\n return _buf[_index];\n }\n function peek() {\n if (isCRLF(_index + _peekOffset)) {\n _peekOffset++;\n }\n _peekOffset++;\n return _buf[_index + _peekOffset];\n }\n function reset() {\n _index = 0;\n _line = 1;\n _column = 1;\n _peekOffset = 0;\n }\n function resetPeek(offset = 0) {\n _peekOffset = offset;\n }\n function skipToPeek() {\n const target = _index + _peekOffset;\n // eslint-disable-next-line no-unmodified-loop-condition\n while (target !== _index) {\n next();\n }\n _peekOffset = 0;\n }\n return {\n index,\n line,\n column,\n peekOffset,\n charAt,\n currentChar,\n currentPeek,\n next,\n peek,\n reset,\n resetPeek,\n skipToPeek\n };\n}\nconst EOF = undefined;\nconst DOT = '.';\nconst LITERAL_DELIMITER = \"'\";\nconst ERROR_DOMAIN$3 = 'tokenizer';\nfunction createTokenizer(source, options = {}) {\n const location = options.location !== false;\n const _scnr = createScanner(source);\n const currentOffset = () => _scnr.index();\n const currentPosition = () => createPosition(_scnr.line(), _scnr.column(), _scnr.index());\n const _initLoc = currentPosition();\n const _initOffset = currentOffset();\n const _context = {\n currentType: 14 /* TokenTypes.EOF */,\n offset: _initOffset,\n startLoc: _initLoc,\n endLoc: _initLoc,\n lastType: 14 /* TokenTypes.EOF */,\n lastOffset: _initOffset,\n lastStartLoc: _initLoc,\n lastEndLoc: _initLoc,\n braceNest: 0,\n inLinked: false,\n text: ''\n };\n const context = () => _context;\n const {\n onError\n } = options;\n function emitError(code, pos, offset, ...args) {\n const ctx = context();\n pos.column += offset;\n pos.offset += offset;\n if (onError) {\n const loc = location ? createLocation(ctx.startLoc, pos) : null;\n const err = createCompileError(code, loc, {\n domain: ERROR_DOMAIN$3,\n args\n });\n onError(err);\n }\n }\n function getToken(context, type, value) {\n context.endLoc = currentPosition();\n context.currentType = type;\n const token = {\n type\n };\n if (location) {\n token.loc = createLocation(context.startLoc, context.endLoc);\n }\n if (value != null) {\n token.value = value;\n }\n return token;\n }\n const getEndToken = context => getToken(context, 14 /* TokenTypes.EOF */);\n function eat(scnr, ch) {\n if (scnr.currentChar() === ch) {\n scnr.next();\n return ch;\n } else {\n emitError(CompileErrorCodes.EXPECTED_TOKEN, currentPosition(), 0, ch);\n return '';\n }\n }\n function peekSpaces(scnr) {\n let buf = '';\n while (scnr.currentPeek() === CHAR_SP || scnr.currentPeek() === CHAR_LF) {\n buf += scnr.currentPeek();\n scnr.peek();\n }\n return buf;\n }\n function skipSpaces(scnr) {\n const buf = peekSpaces(scnr);\n scnr.skipToPeek();\n return buf;\n }\n function isIdentifierStart(ch) {\n if (ch === EOF) {\n return false;\n }\n const cc = ch.charCodeAt(0);\n return cc >= 97 && cc <= 122 ||\n // a-z\n cc >= 65 && cc <= 90 ||\n // A-Z\n cc === 95 // _\n ;\n }\n function isNumberStart(ch) {\n if (ch === EOF) {\n return false;\n }\n const cc = ch.charCodeAt(0);\n return cc >= 48 && cc <= 57; // 0-9\n }\n function isNamedIdentifierStart(scnr, context) {\n const {\n currentType\n } = context;\n if (currentType !== 2 /* TokenTypes.BraceLeft */) {\n return false;\n }\n peekSpaces(scnr);\n const ret = isIdentifierStart(scnr.currentPeek());\n scnr.resetPeek();\n return ret;\n }\n function isListIdentifierStart(scnr, context) {\n const {\n currentType\n } = context;\n if (currentType !== 2 /* TokenTypes.BraceLeft */) {\n return false;\n }\n peekSpaces(scnr);\n const ch = scnr.currentPeek() === '-' ? scnr.peek() : scnr.currentPeek();\n const ret = isNumberStart(ch);\n scnr.resetPeek();\n return ret;\n }\n function isLiteralStart(scnr, context) {\n const {\n currentType\n } = context;\n if (currentType !== 2 /* TokenTypes.BraceLeft */) {\n return false;\n }\n peekSpaces(scnr);\n const ret = scnr.currentPeek() === LITERAL_DELIMITER;\n scnr.resetPeek();\n return ret;\n }\n function isLinkedDotStart(scnr, context) {\n const {\n currentType\n } = context;\n if (currentType !== 8 /* TokenTypes.LinkedAlias */) {\n return false;\n }\n peekSpaces(scnr);\n const ret = scnr.currentPeek() === \".\" /* TokenChars.LinkedDot */;\n scnr.resetPeek();\n return ret;\n }\n function isLinkedModifierStart(scnr, context) {\n const {\n currentType\n } = context;\n if (currentType !== 9 /* TokenTypes.LinkedDot */) {\n return false;\n }\n peekSpaces(scnr);\n const ret = isIdentifierStart(scnr.currentPeek());\n scnr.resetPeek();\n return ret;\n }\n function isLinkedDelimiterStart(scnr, context) {\n const {\n currentType\n } = context;\n if (!(currentType === 8 /* TokenTypes.LinkedAlias */ || currentType === 12 /* TokenTypes.LinkedModifier */)) {\n return false;\n }\n peekSpaces(scnr);\n const ret = scnr.currentPeek() === \":\" /* TokenChars.LinkedDelimiter */;\n scnr.resetPeek();\n return ret;\n }\n function isLinkedReferStart(scnr, context) {\n const {\n currentType\n } = context;\n if (currentType !== 10 /* TokenTypes.LinkedDelimiter */) {\n return false;\n }\n const fn = () => {\n const ch = scnr.currentPeek();\n if (ch === \"{\" /* TokenChars.BraceLeft */) {\n return isIdentifierStart(scnr.peek());\n } else if (ch === \"@\" /* TokenChars.LinkedAlias */ || ch === \"%\" /* TokenChars.Modulo */ || ch === \"|\" /* TokenChars.Pipe */ || ch === \":\" /* TokenChars.LinkedDelimiter */ || ch === \".\" /* TokenChars.LinkedDot */ || ch === CHAR_SP || !ch) {\n return false;\n } else if (ch === CHAR_LF) {\n scnr.peek();\n return fn();\n } else {\n // other characters\n return isTextStart(scnr, false);\n }\n };\n const ret = fn();\n scnr.resetPeek();\n return ret;\n }\n function isPluralStart(scnr) {\n peekSpaces(scnr);\n const ret = scnr.currentPeek() === \"|\" /* TokenChars.Pipe */;\n scnr.resetPeek();\n return ret;\n }\n function detectModuloStart(scnr) {\n const spaces = peekSpaces(scnr);\n const ret = scnr.currentPeek() === \"%\" /* TokenChars.Modulo */ && scnr.peek() === \"{\" /* TokenChars.BraceLeft */;\n scnr.resetPeek();\n return {\n isModulo: ret,\n hasSpace: spaces.length > 0\n };\n }\n function isTextStart(scnr, reset = true) {\n const fn = (hasSpace = false, prev = '', detectModulo = false) => {\n const ch = scnr.currentPeek();\n if (ch === \"{\" /* TokenChars.BraceLeft */) {\n return prev === \"%\" /* TokenChars.Modulo */ ? false : hasSpace;\n } else if (ch === \"@\" /* TokenChars.LinkedAlias */ || !ch) {\n return prev === \"%\" /* TokenChars.Modulo */ ? true : hasSpace;\n } else if (ch === \"%\" /* TokenChars.Modulo */) {\n scnr.peek();\n return fn(hasSpace, \"%\" /* TokenChars.Modulo */, true);\n } else if (ch === \"|\" /* TokenChars.Pipe */) {\n return prev === \"%\" /* TokenChars.Modulo */ || detectModulo ? true : !(prev === CHAR_SP || prev === CHAR_LF);\n } else if (ch === CHAR_SP) {\n scnr.peek();\n return fn(true, CHAR_SP, detectModulo);\n } else if (ch === CHAR_LF) {\n scnr.peek();\n return fn(true, CHAR_LF, detectModulo);\n } else {\n return true;\n }\n };\n const ret = fn();\n reset && scnr.resetPeek();\n return ret;\n }\n function takeChar(scnr, fn) {\n const ch = scnr.currentChar();\n if (ch === EOF) {\n return EOF;\n }\n if (fn(ch)) {\n scnr.next();\n return ch;\n }\n return null;\n }\n function isIdentifier(ch) {\n const cc = ch.charCodeAt(0);\n return cc >= 97 && cc <= 122 ||\n // a-z\n cc >= 65 && cc <= 90 ||\n // A-Z\n cc >= 48 && cc <= 57 ||\n // 0-9\n cc === 95 ||\n // _\n cc === 36 // $\n ;\n }\n function takeIdentifierChar(scnr) {\n return takeChar(scnr, isIdentifier);\n }\n function isNamedIdentifier(ch) {\n const cc = ch.charCodeAt(0);\n return cc >= 97 && cc <= 122 ||\n // a-z\n cc >= 65 && cc <= 90 ||\n // A-Z\n cc >= 48 && cc <= 57 ||\n // 0-9\n cc === 95 ||\n // _\n cc === 36 ||\n // $\n cc === 45 // -\n ;\n }\n function takeNamedIdentifierChar(scnr) {\n return takeChar(scnr, isNamedIdentifier);\n }\n function isDigit(ch) {\n const cc = ch.charCodeAt(0);\n return cc >= 48 && cc <= 57; // 0-9\n }\n function takeDigit(scnr) {\n return takeChar(scnr, isDigit);\n }\n function isHexDigit(ch) {\n const cc = ch.charCodeAt(0);\n return cc >= 48 && cc <= 57 ||\n // 0-9\n cc >= 65 && cc <= 70 ||\n // A-F\n cc >= 97 && cc <= 102; // a-f\n }\n function takeHexDigit(scnr) {\n return takeChar(scnr, isHexDigit);\n }\n function getDigits(scnr) {\n let ch = '';\n let num = '';\n while (ch = takeDigit(scnr)) {\n num += ch;\n }\n return num;\n }\n function readModulo(scnr) {\n skipSpaces(scnr);\n const ch = scnr.currentChar();\n if (ch !== \"%\" /* TokenChars.Modulo */) {\n emitError(CompileErrorCodes.EXPECTED_TOKEN, currentPosition(), 0, ch);\n }\n scnr.next();\n return \"%\" /* TokenChars.Modulo */;\n }\n function readText(scnr) {\n let buf = '';\n // eslint-disable-next-line no-constant-condition\n while (true) {\n const ch = scnr.currentChar();\n if (ch === \"{\" /* TokenChars.BraceLeft */ || ch === \"}\" /* TokenChars.BraceRight */ || ch === \"@\" /* TokenChars.LinkedAlias */ || ch === \"|\" /* TokenChars.Pipe */ || !ch) {\n break;\n } else if (ch === \"%\" /* TokenChars.Modulo */) {\n if (isTextStart(scnr)) {\n buf += ch;\n scnr.next();\n } else {\n break;\n }\n } else if (ch === CHAR_SP || ch === CHAR_LF) {\n if (isTextStart(scnr)) {\n buf += ch;\n scnr.next();\n } else if (isPluralStart(scnr)) {\n break;\n } else {\n buf += ch;\n scnr.next();\n }\n } else {\n buf += ch;\n scnr.next();\n }\n }\n return buf;\n }\n function readNamedIdentifier(scnr) {\n skipSpaces(scnr);\n let ch = '';\n let name = '';\n while (ch = takeNamedIdentifierChar(scnr)) {\n name += ch;\n }\n if (scnr.currentChar() === EOF) {\n emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);\n }\n return name;\n }\n function readListIdentifier(scnr) {\n skipSpaces(scnr);\n let value = '';\n if (scnr.currentChar() === '-') {\n scnr.next();\n value += `-${getDigits(scnr)}`;\n } else {\n value += getDigits(scnr);\n }\n if (scnr.currentChar() === EOF) {\n emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);\n }\n return value;\n }\n function isLiteral(ch) {\n return ch !== LITERAL_DELIMITER && ch !== CHAR_LF;\n }\n function readLiteral(scnr) {\n skipSpaces(scnr);\n // eslint-disable-next-line no-useless-escape\n eat(scnr, `\\'`);\n let ch = '';\n let literal = '';\n while (ch = takeChar(scnr, isLiteral)) {\n if (ch === '\\\\') {\n literal += readEscapeSequence(scnr);\n } else {\n literal += ch;\n }\n }\n const current = scnr.currentChar();\n if (current === CHAR_LF || current === EOF) {\n emitError(CompileErrorCodes.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, currentPosition(), 0);\n // TODO: Is it correct really?\n if (current === CHAR_LF) {\n scnr.next();\n // eslint-disable-next-line no-useless-escape\n eat(scnr, `\\'`);\n }\n return literal;\n }\n // eslint-disable-next-line no-useless-escape\n eat(scnr, `\\'`);\n return literal;\n }\n function readEscapeSequence(scnr) {\n const ch = scnr.currentChar();\n switch (ch) {\n case '\\\\':\n case `\\'`:\n // eslint-disable-line no-useless-escape\n scnr.next();\n return `\\\\${ch}`;\n case 'u':\n return readUnicodeEscapeSequence(scnr, ch, 4);\n case 'U':\n return readUnicodeEscapeSequence(scnr, ch, 6);\n default:\n emitError(CompileErrorCodes.UNKNOWN_ESCAPE_SEQUENCE, currentPosition(), 0, ch);\n return '';\n }\n }\n function readUnicodeEscapeSequence(scnr, unicode, digits) {\n eat(scnr, unicode);\n let sequence = '';\n for (let i = 0; i < digits; i++) {\n const ch = takeHexDigit(scnr);\n if (!ch) {\n emitError(CompileErrorCodes.INVALID_UNICODE_ESCAPE_SEQUENCE, currentPosition(), 0, `\\\\${unicode}${sequence}${scnr.currentChar()}`);\n break;\n }\n sequence += ch;\n }\n return `\\\\${unicode}${sequence}`;\n }\n function isInvalidIdentifier(ch) {\n return ch !== \"{\" /* TokenChars.BraceLeft */ && ch !== \"}\" /* TokenChars.BraceRight */ && ch !== CHAR_SP && ch !== CHAR_LF;\n }\n function readInvalidIdentifier(scnr) {\n skipSpaces(scnr);\n let ch = '';\n let identifiers = '';\n while (ch = takeChar(scnr, isInvalidIdentifier)) {\n identifiers += ch;\n }\n return identifiers;\n }\n function readLinkedModifier(scnr) {\n let ch = '';\n let name = '';\n while (ch = takeIdentifierChar(scnr)) {\n name += ch;\n }\n return name;\n }\n function readLinkedRefer(scnr) {\n const fn = buf => {\n const ch = scnr.currentChar();\n if (ch === \"{\" /* TokenChars.BraceLeft */ || ch === \"%\" /* TokenChars.Modulo */ || ch === \"@\" /* TokenChars.LinkedAlias */ || ch === \"|\" /* TokenChars.Pipe */ || ch === \"(\" /* TokenChars.ParenLeft */ || ch === \")\" /* TokenChars.ParenRight */ || !ch) {\n return buf;\n } else if (ch === CHAR_SP) {\n return buf;\n } else if (ch === CHAR_LF || ch === DOT) {\n buf += ch;\n scnr.next();\n return fn(buf);\n } else {\n buf += ch;\n scnr.next();\n return fn(buf);\n }\n };\n return fn('');\n }\n function readPlural(scnr) {\n skipSpaces(scnr);\n const plural = eat(scnr, \"|\" /* TokenChars.Pipe */);\n skipSpaces(scnr);\n return plural;\n }\n // TODO: We need refactoring of token parsing ...\n function readTokenInPlaceholder(scnr, context) {\n let token = null;\n const ch = scnr.currentChar();\n switch (ch) {\n case \"{\" /* TokenChars.BraceLeft */:\n if (context.braceNest >= 1) {\n emitError(CompileErrorCodes.NOT_ALLOW_NEST_PLACEHOLDER, currentPosition(), 0);\n }\n scnr.next();\n token = getToken(context, 2 /* TokenTypes.BraceLeft */, \"{\" /* TokenChars.BraceLeft */);\n skipSpaces(scnr);\n context.braceNest++;\n return token;\n case \"}\" /* TokenChars.BraceRight */:\n if (context.braceNest > 0 && context.currentType === 2 /* TokenTypes.BraceLeft */) {\n emitError(CompileErrorCodes.EMPTY_PLACEHOLDER, currentPosition(), 0);\n }\n scnr.next();\n token = getToken(context, 3 /* TokenTypes.BraceRight */, \"}\" /* TokenChars.BraceRight */);\n context.braceNest--;\n context.braceNest > 0 && skipSpaces(scnr);\n if (context.inLinked && context.braceNest === 0) {\n context.inLinked = false;\n }\n return token;\n case \"@\" /* TokenChars.LinkedAlias */:\n if (context.braceNest > 0) {\n emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);\n }\n token = readTokenInLinked(scnr, context) || getEndToken(context);\n context.braceNest = 0;\n return token;\n default:\n {\n let validNamedIdentifier = true;\n let validListIdentifier = true;\n let validLiteral = true;\n if (isPluralStart(scnr)) {\n if (context.braceNest > 0) {\n emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);\n }\n token = getToken(context, 1 /* TokenTypes.Pipe */, readPlural(scnr));\n // reset\n context.braceNest = 0;\n context.inLinked = false;\n return token;\n }\n if (context.braceNest > 0 && (context.currentType === 5 /* TokenTypes.Named */ || context.currentType === 6 /* TokenTypes.List */ || context.currentType === 7 /* TokenTypes.Literal */)) {\n emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);\n context.braceNest = 0;\n return readToken(scnr, context);\n }\n if (validNamedIdentifier = isNamedIdentifierStart(scnr, context)) {\n token = getToken(context, 5 /* TokenTypes.Named */, readNamedIdentifier(scnr));\n skipSpaces(scnr);\n return token;\n }\n if (validListIdentifier = isListIdentifierStart(scnr, context)) {\n token = getToken(context, 6 /* TokenTypes.List */, readListIdentifier(scnr));\n skipSpaces(scnr);\n return token;\n }\n if (validLiteral = isLiteralStart(scnr, context)) {\n token = getToken(context, 7 /* TokenTypes.Literal */, readLiteral(scnr));\n skipSpaces(scnr);\n return token;\n }\n if (!validNamedIdentifier && !validListIdentifier && !validLiteral) {\n // TODO: we should be re-designed invalid cases, when we will extend message syntax near the future ...\n token = getToken(context, 13 /* TokenTypes.InvalidPlace */, readInvalidIdentifier(scnr));\n emitError(CompileErrorCodes.INVALID_TOKEN_IN_PLACEHOLDER, currentPosition(), 0, token.value);\n skipSpaces(scnr);\n return token;\n }\n break;\n }\n }\n return token;\n }\n // TODO: We need refactoring of token parsing ...\n function readTokenInLinked(scnr, context) {\n const {\n currentType\n } = context;\n let token = null;\n const ch = scnr.currentChar();\n if ((currentType === 8 /* TokenTypes.LinkedAlias */ || currentType === 9 /* TokenTypes.LinkedDot */ || currentType === 12 /* TokenTypes.LinkedModifier */ || currentType === 10 /* TokenTypes.LinkedDelimiter */) && (ch === CHAR_LF || ch === CHAR_SP)) {\n emitError(CompileErrorCodes.INVALID_LINKED_FORMAT, currentPosition(), 0);\n }\n switch (ch) {\n case \"@\" /* TokenChars.LinkedAlias */:\n scnr.next();\n token = getToken(context, 8 /* TokenTypes.LinkedAlias */, \"@\" /* TokenChars.LinkedAlias */);\n context.inLinked = true;\n return token;\n case \".\" /* TokenChars.LinkedDot */:\n skipSpaces(scnr);\n scnr.next();\n return getToken(context, 9 /* TokenTypes.LinkedDot */, \".\" /* TokenChars.LinkedDot */);\n case \":\" /* TokenChars.LinkedDelimiter */:\n skipSpaces(scnr);\n scnr.next();\n return getToken(context, 10 /* TokenTypes.LinkedDelimiter */, \":\" /* TokenChars.LinkedDelimiter */);\n default:\n if (isPluralStart(scnr)) {\n token = getToken(context, 1 /* TokenTypes.Pipe */, readPlural(scnr));\n // reset\n context.braceNest = 0;\n context.inLinked = false;\n return token;\n }\n if (isLinkedDotStart(scnr, context) || isLinkedDelimiterStart(scnr, context)) {\n skipSpaces(scnr);\n return readTokenInLinked(scnr, context);\n }\n if (isLinkedModifierStart(scnr, context)) {\n skipSpaces(scnr);\n return getToken(context, 12 /* TokenTypes.LinkedModifier */, readLinkedModifier(scnr));\n }\n if (isLinkedReferStart(scnr, context)) {\n skipSpaces(scnr);\n if (ch === \"{\" /* TokenChars.BraceLeft */) {\n // scan the placeholder\n return readTokenInPlaceholder(scnr, context) || token;\n } else {\n return getToken(context, 11 /* TokenTypes.LinkedKey */, readLinkedRefer(scnr));\n }\n }\n if (currentType === 8 /* TokenTypes.LinkedAlias */) {\n emitError(CompileErrorCodes.INVALID_LINKED_FORMAT, currentPosition(), 0);\n }\n context.braceNest = 0;\n context.inLinked = false;\n return readToken(scnr, context);\n }\n }\n // TODO: We need refactoring of token parsing ...\n function readToken(scnr, context) {\n let token = {\n type: 14 /* TokenTypes.EOF */\n };\n if (context.braceNest > 0) {\n return readTokenInPlaceholder(scnr, context) || getEndToken(context);\n }\n if (context.inLinked) {\n return readTokenInLinked(scnr, context) || getEndToken(context);\n }\n const ch = scnr.currentChar();\n switch (ch) {\n case \"{\" /* TokenChars.BraceLeft */:\n return readTokenInPlaceholder(scnr, context) || getEndToken(context);\n case \"}\" /* TokenChars.BraceRight */:\n emitError(CompileErrorCodes.UNBALANCED_CLOSING_BRACE, currentPosition(), 0);\n scnr.next();\n return getToken(context, 3 /* TokenTypes.BraceRight */, \"}\" /* TokenChars.BraceRight */);\n case \"@\" /* TokenChars.LinkedAlias */:\n return readTokenInLinked(scnr, context) || getEndToken(context);\n default:\n {\n if (isPluralStart(scnr)) {\n token = getToken(context, 1 /* TokenTypes.Pipe */, readPlural(scnr));\n // reset\n context.braceNest = 0;\n context.inLinked = false;\n return token;\n }\n const {\n isModulo,\n hasSpace\n } = detectModuloStart(scnr);\n if (isModulo) {\n return hasSpace ? getToken(context, 0 /* TokenTypes.Text */, readText(scnr)) : getToken(context, 4 /* TokenTypes.Modulo */, readModulo(scnr));\n }\n if (isTextStart(scnr)) {\n return getToken(context, 0 /* TokenTypes.Text */, readText(scnr));\n }\n break;\n }\n }\n return token;\n }\n function nextToken() {\n const {\n currentType,\n offset,\n startLoc,\n endLoc\n } = _context;\n _context.lastType = currentType;\n _context.lastOffset = offset;\n _context.lastStartLoc = startLoc;\n _context.lastEndLoc = endLoc;\n _context.offset = currentOffset();\n _context.startLoc = currentPosition();\n if (_scnr.currentChar() === EOF) {\n return getToken(_context, 14 /* TokenTypes.EOF */);\n }\n return readToken(_scnr, _context);\n }\n return {\n nextToken,\n currentOffset,\n currentPosition,\n context\n };\n}\nconst ERROR_DOMAIN$2 = 'parser';\n// Backslash backslash, backslash quote, uHHHH, UHHHHHH.\nconst KNOWN_ESCAPES = /(?:\\\\\\\\|\\\\'|\\\\u([0-9a-fA-F]{4})|\\\\U([0-9a-fA-F]{6}))/g;\nfunction fromEscapeSequence(match, codePoint4, codePoint6) {\n switch (match) {\n case `\\\\\\\\`:\n return `\\\\`;\n // eslint-disable-next-line no-useless-escape\n case `\\\\\\'`:\n // eslint-disable-next-line no-useless-escape\n return `\\'`;\n default:\n {\n const codePoint = parseInt(codePoint4 || codePoint6, 16);\n if (codePoint <= 0xd7ff || codePoint >= 0xe000) {\n return String.fromCodePoint(codePoint);\n }\n // invalid ...\n // Replace them with U+FFFD REPLACEMENT CHARACTER.\n return '�';\n }\n }\n}\nfunction createParser(options = {}) {\n const location = options.location !== false;\n const {\n onError,\n onWarn\n } = options;\n function emitError(tokenzer, code, start, offset, ...args) {\n const end = tokenzer.currentPosition();\n end.offset += offset;\n end.column += offset;\n if (onError) {\n const loc = location ? createLocation(start, end) : null;\n const err = createCompileError(code, loc, {\n domain: ERROR_DOMAIN$2,\n args\n });\n onError(err);\n }\n }\n function emitWarn(tokenzer, code, start, offset, ...args) {\n const end = tokenzer.currentPosition();\n end.offset += offset;\n end.column += offset;\n if (onWarn) {\n const loc = location ? createLocation(start, end) : null;\n onWarn(createCompileWarn(code, loc, args));\n }\n }\n function startNode(type, offset, loc) {\n const node = {\n type\n };\n if (location) {\n node.start = offset;\n node.end = offset;\n node.loc = {\n start: loc,\n end: loc\n };\n }\n return node;\n }\n function endNode(node, offset, pos, type) {\n if (type) {\n node.type = type;\n }\n if (location) {\n node.end = offset;\n if (node.loc) {\n node.loc.end = pos;\n }\n }\n }\n function parseText(tokenizer, value) {\n const context = tokenizer.context();\n const node = startNode(3 /* NodeTypes.Text */, context.offset, context.startLoc);\n node.value = value;\n endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\n return node;\n }\n function parseList(tokenizer, index) {\n const context = tokenizer.context();\n const {\n lastOffset: offset,\n lastStartLoc: loc\n } = context; // get brace left loc\n const node = startNode(5 /* NodeTypes.List */, offset, loc);\n node.index = parseInt(index, 10);\n tokenizer.nextToken(); // skip brach right\n endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\n return node;\n }\n function parseNamed(tokenizer, key, modulo) {\n const context = tokenizer.context();\n const {\n lastOffset: offset,\n lastStartLoc: loc\n } = context; // get brace left loc\n const node = startNode(4 /* NodeTypes.Named */, offset, loc);\n node.key = key;\n if (modulo === true) {\n node.modulo = true;\n }\n tokenizer.nextToken(); // skip brach right\n endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\n return node;\n }\n function parseLiteral(tokenizer, value) {\n const context = tokenizer.context();\n const {\n lastOffset: offset,\n lastStartLoc: loc\n } = context; // get brace left loc\n const node = startNode(9 /* NodeTypes.Literal */, offset, loc);\n node.value = value.replace(KNOWN_ESCAPES, fromEscapeSequence);\n tokenizer.nextToken(); // skip brach right\n endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\n return node;\n }\n function parseLinkedModifier(tokenizer) {\n const token = tokenizer.nextToken();\n const context = tokenizer.context();\n const {\n lastOffset: offset,\n lastStartLoc: loc\n } = context; // get linked dot loc\n const node = startNode(8 /* NodeTypes.LinkedModifier */, offset, loc);\n if (token.type !== 12 /* TokenTypes.LinkedModifier */) {\n // empty modifier\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_MODIFIER, context.lastStartLoc, 0);\n node.value = '';\n endNode(node, offset, loc);\n return {\n nextConsumeToken: token,\n node\n };\n }\n // check token\n if (token.value == null) {\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n }\n node.value = token.value || '';\n endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\n return {\n node\n };\n }\n function parseLinkedKey(tokenizer, value) {\n const context = tokenizer.context();\n const node = startNode(7 /* NodeTypes.LinkedKey */, context.offset, context.startLoc);\n node.value = value;\n endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\n return node;\n }\n function parseLinked(tokenizer) {\n const context = tokenizer.context();\n const linkedNode = startNode(6 /* NodeTypes.Linked */, context.offset, context.startLoc);\n let token = tokenizer.nextToken();\n if (token.type === 9 /* TokenTypes.LinkedDot */) {\n const parsed = parseLinkedModifier(tokenizer);\n linkedNode.modifier = parsed.node;\n token = parsed.nextConsumeToken || tokenizer.nextToken();\n }\n // asset check token\n if (token.type !== 10 /* TokenTypes.LinkedDelimiter */) {\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n }\n token = tokenizer.nextToken();\n // skip brace left\n if (token.type === 2 /* TokenTypes.BraceLeft */) {\n token = tokenizer.nextToken();\n }\n switch (token.type) {\n case 11 /* TokenTypes.LinkedKey */:\n if (token.value == null) {\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n }\n linkedNode.key = parseLinkedKey(tokenizer, token.value || '');\n break;\n case 5 /* TokenTypes.Named */:\n if (token.value == null) {\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n }\n linkedNode.key = parseNamed(tokenizer, token.value || '');\n break;\n case 6 /* TokenTypes.List */:\n if (token.value == null) {\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n }\n linkedNode.key = parseList(tokenizer, token.value || '');\n break;\n case 7 /* TokenTypes.Literal */:\n if (token.value == null) {\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n }\n linkedNode.key = parseLiteral(tokenizer, token.value || '');\n break;\n default:\n {\n // empty key\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_KEY, context.lastStartLoc, 0);\n const nextContext = tokenizer.context();\n const emptyLinkedKeyNode = startNode(7 /* NodeTypes.LinkedKey */, nextContext.offset, nextContext.startLoc);\n emptyLinkedKeyNode.value = '';\n endNode(emptyLinkedKeyNode, nextContext.offset, nextContext.startLoc);\n linkedNode.key = emptyLinkedKeyNode;\n endNode(linkedNode, nextContext.offset, nextContext.startLoc);\n return {\n nextConsumeToken: token,\n node: linkedNode\n };\n }\n }\n endNode(linkedNode, tokenizer.currentOffset(), tokenizer.currentPosition());\n return {\n node: linkedNode\n };\n }\n function parseMessage(tokenizer) {\n const context = tokenizer.context();\n const startOffset = context.currentType === 1 /* TokenTypes.Pipe */ ? tokenizer.currentOffset() : context.offset;\n const startLoc = context.currentType === 1 /* TokenTypes.Pipe */ ? context.endLoc : context.startLoc;\n const node = startNode(2 /* NodeTypes.Message */, startOffset, startLoc);\n node.items = [];\n let nextToken = null;\n let modulo = null;\n do {\n const token = nextToken || tokenizer.nextToken();\n nextToken = null;\n switch (token.type) {\n case 0 /* TokenTypes.Text */:\n if (token.value == null) {\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n }\n node.items.push(parseText(tokenizer, token.value || ''));\n break;\n case 6 /* TokenTypes.List */:\n if (token.value == null) {\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n }\n node.items.push(parseList(tokenizer, token.value || ''));\n break;\n case 4 /* TokenTypes.Modulo */:\n modulo = true;\n break;\n case 5 /* TokenTypes.Named */:\n if (token.value == null) {\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n }\n node.items.push(parseNamed(tokenizer, token.value || '', !!modulo));\n if (modulo) {\n emitWarn(tokenizer, CompileWarnCodes.USE_MODULO_SYNTAX, context.lastStartLoc, 0, getTokenCaption(token));\n modulo = null;\n }\n break;\n case 7 /* TokenTypes.Literal */:\n if (token.value == null) {\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n }\n node.items.push(parseLiteral(tokenizer, token.value || ''));\n break;\n case 8 /* TokenTypes.LinkedAlias */:\n {\n const parsed = parseLinked(tokenizer);\n node.items.push(parsed.node);\n nextToken = parsed.nextConsumeToken || null;\n break;\n }\n }\n } while (context.currentType !== 14 /* TokenTypes.EOF */ && context.currentType !== 1 /* TokenTypes.Pipe */);\n // adjust message node loc\n const endOffset = context.currentType === 1 /* TokenTypes.Pipe */ ? context.lastOffset : tokenizer.currentOffset();\n const endLoc = context.currentType === 1 /* TokenTypes.Pipe */ ? context.lastEndLoc : tokenizer.currentPosition();\n endNode(node, endOffset, endLoc);\n return node;\n }\n function parsePlural(tokenizer, offset, loc, msgNode) {\n const context = tokenizer.context();\n let hasEmptyMessage = msgNode.items.length === 0;\n const node = startNode(1 /* NodeTypes.Plural */, offset, loc);\n node.cases = [];\n node.cases.push(msgNode);\n do {\n const msg = parseMessage(tokenizer);\n if (!hasEmptyMessage) {\n hasEmptyMessage = msg.items.length === 0;\n }\n node.cases.push(msg);\n } while (context.currentType !== 14 /* TokenTypes.EOF */);\n if (hasEmptyMessage) {\n emitError(tokenizer, CompileErrorCodes.MUST_HAVE_MESSAGES_IN_PLURAL, loc, 0);\n }\n endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\n return node;\n }\n function parseResource(tokenizer) {\n const context = tokenizer.context();\n const {\n offset,\n startLoc\n } = context;\n const msgNode = parseMessage(tokenizer);\n if (context.currentType === 14 /* TokenTypes.EOF */) {\n return msgNode;\n } else {\n return parsePlural(tokenizer, offset, startLoc, msgNode);\n }\n }\n function parse(source) {\n const tokenizer = createTokenizer(source, assign({}, options));\n const context = tokenizer.context();\n const node = startNode(0 /* NodeTypes.Resource */, context.offset, context.startLoc);\n if (location && node.loc) {\n node.loc.source = source;\n }\n node.body = parseResource(tokenizer);\n if (options.onCacheKey) {\n node.cacheKey = options.onCacheKey(source);\n }\n // assert whether achieved to EOF\n if (context.currentType !== 14 /* TokenTypes.EOF */) {\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, source[context.offset] || '');\n }\n endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\n return node;\n }\n return {\n parse\n };\n}\nfunction getTokenCaption(token) {\n if (token.type === 14 /* TokenTypes.EOF */) {\n return 'EOF';\n }\n const name = (token.value || '').replace(/\\r?\\n/gu, '\\\\n');\n return name.length > 10 ? name.slice(0, 9) + '…' : name;\n}\nfunction createTransformer(ast, options = {} // eslint-disable-line\n) {\n const _context = {\n ast,\n helpers: new Set()\n };\n const context = () => _context;\n const helper = name => {\n _context.helpers.add(name);\n return name;\n };\n return {\n context,\n helper\n };\n}\nfunction traverseNodes(nodes, transformer) {\n for (let i = 0; i < nodes.length; i++) {\n traverseNode(nodes[i], transformer);\n }\n}\nfunction traverseNode(node, transformer) {\n // TODO: if we need pre-hook of transform, should be implemented to here\n switch (node.type) {\n case 1 /* NodeTypes.Plural */:\n traverseNodes(node.cases, transformer);\n transformer.helper(\"plural\" /* HelperNameMap.PLURAL */);\n break;\n case 2 /* NodeTypes.Message */:\n traverseNodes(node.items, transformer);\n break;\n case 6 /* NodeTypes.Linked */:\n {\n const linked = node;\n traverseNode(linked.key, transformer);\n transformer.helper(\"linked\" /* HelperNameMap.LINKED */);\n transformer.helper(\"type\" /* HelperNameMap.TYPE */);\n break;\n }\n case 5 /* NodeTypes.List */:\n transformer.helper(\"interpolate\" /* HelperNameMap.INTERPOLATE */);\n transformer.helper(\"list\" /* HelperNameMap.LIST */);\n break;\n case 4 /* NodeTypes.Named */:\n transformer.helper(\"interpolate\" /* HelperNameMap.INTERPOLATE */);\n transformer.helper(\"named\" /* HelperNameMap.NAMED */);\n break;\n }\n // TODO: if we need post-hook of transform, should be implemented to here\n}\n// transform AST\nfunction transform(ast, options = {} // eslint-disable-line\n) {\n const transformer = createTransformer(ast);\n transformer.helper(\"normalize\" /* HelperNameMap.NORMALIZE */);\n // traverse\n ast.body && traverseNode(ast.body, transformer);\n // set meta information\n const context = transformer.context();\n ast.helpers = Array.from(context.helpers);\n}\nfunction optimize(ast) {\n const body = ast.body;\n if (body.type === 2 /* NodeTypes.Message */) {\n optimizeMessageNode(body);\n } else {\n body.cases.forEach(c => optimizeMessageNode(c));\n }\n return ast;\n}\nfunction optimizeMessageNode(message) {\n if (message.items.length === 1) {\n const item = message.items[0];\n if (item.type === 3 /* NodeTypes.Text */ || item.type === 9 /* NodeTypes.Literal */) {\n message.static = item.value;\n delete item.value; // optimization for size\n }\n } else {\n const values = [];\n for (let i = 0; i < message.items.length; i++) {\n const item = message.items[i];\n if (!(item.type === 3 /* NodeTypes.Text */ || item.type === 9 /* NodeTypes.Literal */)) {\n break;\n }\n if (item.value == null) {\n break;\n }\n values.push(item.value);\n }\n if (values.length === message.items.length) {\n message.static = join(values);\n for (let i = 0; i < message.items.length; i++) {\n const item = message.items[i];\n if (item.type === 3 /* NodeTypes.Text */ || item.type === 9 /* NodeTypes.Literal */) {\n delete item.value; // optimization for size\n }\n }\n }\n }\n}\nconst ERROR_DOMAIN$1 = 'minifier';\n/* eslint-disable @typescript-eslint/no-explicit-any */\nfunction minify(node) {\n node.t = node.type;\n switch (node.type) {\n case 0 /* NodeTypes.Resource */:\n {\n const resource = node;\n minify(resource.body);\n resource.b = resource.body;\n delete resource.body;\n break;\n }\n case 1 /* NodeTypes.Plural */:\n {\n const plural = node;\n const cases = plural.cases;\n for (let i = 0; i < cases.length; i++) {\n minify(cases[i]);\n }\n plural.c = cases;\n delete plural.cases;\n break;\n }\n case 2 /* NodeTypes.Message */:\n {\n const message = node;\n const items = message.items;\n for (let i = 0; i < items.length; i++) {\n minify(items[i]);\n }\n message.i = items;\n delete message.items;\n if (message.static) {\n message.s = message.static;\n delete message.static;\n }\n break;\n }\n case 3 /* NodeTypes.Text */:\n case 9 /* NodeTypes.Literal */:\n case 8 /* NodeTypes.LinkedModifier */:\n case 7 /* NodeTypes.LinkedKey */:\n {\n const valueNode = node;\n if (valueNode.value) {\n valueNode.v = valueNode.value;\n delete valueNode.value;\n }\n break;\n }\n case 6 /* NodeTypes.Linked */:\n {\n const linked = node;\n minify(linked.key);\n linked.k = linked.key;\n delete linked.key;\n if (linked.modifier) {\n minify(linked.modifier);\n linked.m = linked.modifier;\n delete linked.modifier;\n }\n break;\n }\n case 5 /* NodeTypes.List */:\n {\n const list = node;\n list.i = list.index;\n delete list.index;\n break;\n }\n case 4 /* NodeTypes.Named */:\n {\n const named = node;\n named.k = named.key;\n delete named.key;\n break;\n }\n default:\n {\n throw createCompileError(CompileErrorCodes.UNHANDLED_MINIFIER_NODE_TYPE, null, {\n domain: ERROR_DOMAIN$1,\n args: [node.type]\n });\n }\n }\n delete node.type;\n}\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\n// eslint-disable-next-line @typescript-eslint/triple-slash-reference\n///