@aidc-toolkit/app-extension 1.0.32-beta → 1.0.33-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -6528
- package/dist/index.d.cts +105 -106
- package/dist/index.d.ts +105 -106
- package/dist/index.js +1 -6508
- package/package.json +12 -12
- package/src/app-extension.ts +26 -47
- package/src/{app-utility-proxy.ts → app-helper-proxy.ts} +21 -19
- package/src/descriptor.ts +43 -2
- package/src/generator/generator.ts +116 -91
- package/src/generator/locale-resources-generator.ts +26 -14
- package/src/gs1/check-proxy.ts +12 -11
- package/src/gs1/gtin-creator-proxy.ts +2 -3
- package/src/gs1/gtin-descriptor.ts +2 -2
- package/src/gs1/gtin-validator-proxy.ts +12 -14
- package/src/gs1/identifier-creator-proxy.ts +19 -21
- package/src/gs1/identifier-descriptor.ts +3 -3
- package/src/gs1/identifier-validator-proxy.ts +15 -16
- package/src/gs1/non-gtin-creator-proxy.ts +0 -11
- package/src/gs1/non-gtin-validator-proxy.ts +0 -11
- package/src/gs1/prefix-definition-descriptor.ts +2 -2
- package/src/gs1/prefix-manager-proxy.ts +80 -120
- package/src/gs1/service-proxy.ts +6 -5
- package/src/gs1/variable-measure-proxy.ts +9 -8
- package/src/index.ts +1 -2
- package/src/locale/en/locale-resources.ts +28 -15
- package/src/locale/fr/locale-resources.ts +28 -15
- package/src/locale/i18n.ts +10 -9
- package/src/locale/i18next.d.ts +2 -0
- package/src/proxy.ts +64 -40
- package/src/utility/character-set-descriptor.ts +2 -2
- package/src/utility/character-set-proxy.ts +7 -7
- package/src/utility/reg-exp-proxy.ts +5 -5
- package/src/utility/string-descriptor.ts +2 -2
- package/src/utility/string-proxy.ts +4 -0
- package/src/utility/transformer-descriptor.ts +5 -5
- package/src/utility/transformer-proxy.ts +6 -5
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/src/app-data.ts +0 -94
package/dist/index.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/locale/i18n.ts","../node_modules/i18next/dist/esm/i18next.js","../src/locale/en/locale-resources.ts","../src/locale/fr/locale-resources.ts","../src/app-data.ts","../src/app-extension.ts","../src/lib-proxy.ts","../src/descriptor.ts","../src/app-utility-proxy.ts","../src/proxy.ts","../src/utility/index.ts","../src/utility/transformer-proxy.ts","../src/utility/transformer-descriptor.ts","../src/utility/reg-exp-proxy.ts","../src/utility/string-descriptor.ts","../src/utility/string-proxy.ts","../src/utility/character-set-proxy.ts","../src/utility/character-set-descriptor.ts","../src/gs1/index.ts","../src/gs1/character-set-proxy.ts","../src/gs1/check-proxy.ts","../src/gs1/gtin-validator-proxy.ts","../src/gs1/gtin-descriptor.ts","../src/gs1/identifier-descriptor.ts","../src/gs1/identifier-validator-proxy.ts","../src/gs1/non-gtin-validator-proxy.ts","../src/gs1/prefix-manager-proxy.ts","../src/gs1/identifier-type.ts","../src/gs1/identifier-creator-proxy.ts","../src/gs1/prefix-definition-descriptor.ts","../src/gs1/gtin-creator-proxy.ts","../src/gs1/non-gtin-creator-proxy.ts","../src/gs1/variable-measure-proxy.ts","../src/gs1/service-proxy.ts","../src/generator/generator.ts"],"sourcesContent":["/*!\n * Copyright © 2024-2025 Dolphin Data Development Ltd. and AIDC Toolkit\n * contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport * from \"./locale/i18n.js\";\n\nexport type * from \"./type.js\";\nexport * from \"./app-data.js\";\n\nexport type * from \"./streaming.js\";\nexport * from \"./app-extension.js\";\nexport * from \"./lib-proxy.js\";\n\nexport * from \"./descriptor.js\";\nexport * from \"./app-utility-proxy.js\";\nexport * from \"./utility/index.js\";\nexport * as GS1 from \"./gs1/index.js\";\n\nexport * from \"./generator/index.js\";\nexport { expandParameterDescriptor } from \"./proxy.js\";\n","import { type I18nEnvironment, i18nFinalizeInit } from \"@aidc-toolkit/core\";\nimport { gs1Resources, i18nGS1Init } from \"@aidc-toolkit/gs1\";\nimport { i18nUtilityInit, utilityResources } from \"@aidc-toolkit/utility\";\nimport i18next, { type i18n, type Resource } from \"i18next\";\nimport enLocaleResources from \"./en/locale-resources.js\";\nimport frLocaleResources from \"./fr/locale-resources.js\";\n\nexport const appExtensionNS = \"aidct_app_extension\";\n\n/**\n * Locale resources type is extracted from the English locale resources object.\n */\nexport type AppExtensionLocaleResources = typeof enLocaleResources;\n\n/**\n * App extension resources.\n */\nexport const appExtensionResources: Resource = {\n en: {\n aidct_app_extension: enLocaleResources\n },\n fr: {\n aidct_app_extension: frLocaleResources\n }\n};\n\n// Explicit type is necessary because type can't be inferred without additional references.\nexport const i18nextAppExtension: i18n = i18next.createInstance();\n\n/**\n * Initialize internationalization.\n *\n * @param environment\n * Environment in which the application is running.\n *\n * @param debug\n * Debug setting.\n */\nexport async function i18nAppExtensionInit(environment: I18nEnvironment, debug = false): Promise<void> {\n await i18nUtilityInit(environment, debug);\n await i18nGS1Init(environment, debug);\n await i18nFinalizeInit(i18nextAppExtension, environment, debug, appExtensionNS, utilityResources, gs1Resources, appExtensionResources);\n}\n","const isString = obj => typeof obj === 'string';\nconst defer = () => {\n let res;\n let rej;\n const promise = new Promise((resolve, reject) => {\n res = resolve;\n rej = reject;\n });\n promise.resolve = res;\n promise.reject = rej;\n return promise;\n};\nconst makeString = object => {\n if (object == null) return '';\n return '' + object;\n};\nconst copy = (a, s, t) => {\n a.forEach(m => {\n if (s[m]) t[m] = s[m];\n });\n};\nconst lastOfPathSeparatorRegExp = /###/g;\nconst cleanKey = key => key && key.indexOf('###') > -1 ? key.replace(lastOfPathSeparatorRegExp, '.') : key;\nconst canNotTraverseDeeper = object => !object || isString(object);\nconst getLastOfPath = (object, path, Empty) => {\n const stack = !isString(path) ? path : path.split('.');\n let stackIndex = 0;\n while (stackIndex < stack.length - 1) {\n if (canNotTraverseDeeper(object)) return {};\n const key = cleanKey(stack[stackIndex]);\n if (!object[key] && Empty) object[key] = new Empty();\n if (Object.prototype.hasOwnProperty.call(object, key)) {\n object = object[key];\n } else {\n object = {};\n }\n ++stackIndex;\n }\n if (canNotTraverseDeeper(object)) return {};\n return {\n obj: object,\n k: cleanKey(stack[stackIndex])\n };\n};\nconst setPath = (object, path, newValue) => {\n const {\n obj,\n k\n } = getLastOfPath(object, path, Object);\n if (obj !== undefined || path.length === 1) {\n obj[k] = newValue;\n return;\n }\n let e = path[path.length - 1];\n let p = path.slice(0, path.length - 1);\n let last = getLastOfPath(object, p, Object);\n while (last.obj === undefined && p.length) {\n e = `${p[p.length - 1]}.${e}`;\n p = p.slice(0, p.length - 1);\n last = getLastOfPath(object, p, Object);\n if (last?.obj && typeof last.obj[`${last.k}.${e}`] !== 'undefined') {\n last.obj = undefined;\n }\n }\n last.obj[`${last.k}.${e}`] = newValue;\n};\nconst pushPath = (object, path, newValue, concat) => {\n const {\n obj,\n k\n } = getLastOfPath(object, path, Object);\n obj[k] = obj[k] || [];\n obj[k].push(newValue);\n};\nconst getPath = (object, path) => {\n const {\n obj,\n k\n } = getLastOfPath(object, path);\n if (!obj) return undefined;\n if (!Object.prototype.hasOwnProperty.call(obj, k)) return undefined;\n return obj[k];\n};\nconst getPathWithDefaults = (data, defaultData, key) => {\n const value = getPath(data, key);\n if (value !== undefined) {\n return value;\n }\n return getPath(defaultData, key);\n};\nconst deepExtend = (target, source, overwrite) => {\n for (const prop in source) {\n if (prop !== '__proto__' && prop !== 'constructor') {\n if (prop in target) {\n if (isString(target[prop]) || target[prop] instanceof String || isString(source[prop]) || source[prop] instanceof String) {\n if (overwrite) target[prop] = source[prop];\n } else {\n deepExtend(target[prop], source[prop], overwrite);\n }\n } else {\n target[prop] = source[prop];\n }\n }\n }\n return target;\n};\nconst regexEscape = str => str.replace(/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g, '\\\\$&');\nvar _entityMap = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": ''',\n '/': '/'\n};\nconst escape = data => {\n if (isString(data)) {\n return data.replace(/[&<>\"'\\/]/g, s => _entityMap[s]);\n }\n return data;\n};\nclass RegExpCache {\n constructor(capacity) {\n this.capacity = capacity;\n this.regExpMap = new Map();\n this.regExpQueue = [];\n }\n getRegExp(pattern) {\n const regExpFromCache = this.regExpMap.get(pattern);\n if (regExpFromCache !== undefined) {\n return regExpFromCache;\n }\n const regExpNew = new RegExp(pattern);\n if (this.regExpQueue.length === this.capacity) {\n this.regExpMap.delete(this.regExpQueue.shift());\n }\n this.regExpMap.set(pattern, regExpNew);\n this.regExpQueue.push(pattern);\n return regExpNew;\n }\n}\nconst chars = [' ', ',', '?', '!', ';'];\nconst looksLikeObjectPathRegExpCache = new RegExpCache(20);\nconst looksLikeObjectPath = (key, nsSeparator, keySeparator) => {\n nsSeparator = nsSeparator || '';\n keySeparator = keySeparator || '';\n const possibleChars = chars.filter(c => nsSeparator.indexOf(c) < 0 && keySeparator.indexOf(c) < 0);\n if (possibleChars.length === 0) return true;\n const r = looksLikeObjectPathRegExpCache.getRegExp(`(${possibleChars.map(c => c === '?' ? '\\\\?' : c).join('|')})`);\n let matched = !r.test(key);\n if (!matched) {\n const ki = key.indexOf(keySeparator);\n if (ki > 0 && !r.test(key.substring(0, ki))) {\n matched = true;\n }\n }\n return matched;\n};\nconst deepFind = (obj, path, keySeparator = '.') => {\n if (!obj) return undefined;\n if (obj[path]) {\n if (!Object.prototype.hasOwnProperty.call(obj, path)) return undefined;\n return obj[path];\n }\n const tokens = path.split(keySeparator);\n let current = obj;\n for (let i = 0; i < tokens.length;) {\n if (!current || typeof current !== 'object') {\n return undefined;\n }\n let next;\n let nextPath = '';\n for (let j = i; j < tokens.length; ++j) {\n if (j !== i) {\n nextPath += keySeparator;\n }\n nextPath += tokens[j];\n next = current[nextPath];\n if (next !== undefined) {\n if (['string', 'number', 'boolean'].indexOf(typeof next) > -1 && j < tokens.length - 1) {\n continue;\n }\n i += j - i + 1;\n break;\n }\n }\n current = next;\n }\n return current;\n};\nconst getCleanedCode = code => code?.replace('_', '-');\n\nconst consoleLogger = {\n type: 'logger',\n log(args) {\n this.output('log', args);\n },\n warn(args) {\n this.output('warn', args);\n },\n error(args) {\n this.output('error', args);\n },\n output(type, args) {\n console?.[type]?.apply?.(console, args);\n }\n};\nclass Logger {\n constructor(concreteLogger, options = {}) {\n this.init(concreteLogger, options);\n }\n init(concreteLogger, options = {}) {\n this.prefix = options.prefix || 'i18next:';\n this.logger = concreteLogger || consoleLogger;\n this.options = options;\n this.debug = options.debug;\n }\n log(...args) {\n return this.forward(args, 'log', '', true);\n }\n warn(...args) {\n return this.forward(args, 'warn', '', true);\n }\n error(...args) {\n return this.forward(args, 'error', '');\n }\n deprecate(...args) {\n return this.forward(args, 'warn', 'WARNING DEPRECATED: ', true);\n }\n forward(args, lvl, prefix, debugOnly) {\n if (debugOnly && !this.debug) return null;\n if (isString(args[0])) args[0] = `${prefix}${this.prefix} ${args[0]}`;\n return this.logger[lvl](args);\n }\n create(moduleName) {\n return new Logger(this.logger, {\n ...{\n prefix: `${this.prefix}:${moduleName}:`\n },\n ...this.options\n });\n }\n clone(options) {\n options = options || this.options;\n options.prefix = options.prefix || this.prefix;\n return new Logger(this.logger, options);\n }\n}\nvar baseLogger = new Logger();\n\nclass EventEmitter {\n constructor() {\n this.observers = {};\n }\n on(events, listener) {\n events.split(' ').forEach(event => {\n if (!this.observers[event]) this.observers[event] = new Map();\n const numListeners = this.observers[event].get(listener) || 0;\n this.observers[event].set(listener, numListeners + 1);\n });\n return this;\n }\n off(event, listener) {\n if (!this.observers[event]) return;\n if (!listener) {\n delete this.observers[event];\n return;\n }\n this.observers[event].delete(listener);\n }\n emit(event, ...args) {\n if (this.observers[event]) {\n const cloned = Array.from(this.observers[event].entries());\n cloned.forEach(([observer, numTimesAdded]) => {\n for (let i = 0; i < numTimesAdded; i++) {\n observer(...args);\n }\n });\n }\n if (this.observers['*']) {\n const cloned = Array.from(this.observers['*'].entries());\n cloned.forEach(([observer, numTimesAdded]) => {\n for (let i = 0; i < numTimesAdded; i++) {\n observer.apply(observer, [event, ...args]);\n }\n });\n }\n }\n}\n\nclass ResourceStore extends EventEmitter {\n constructor(data, options = {\n ns: ['translation'],\n defaultNS: 'translation'\n }) {\n super();\n this.data = data || {};\n this.options = options;\n if (this.options.keySeparator === undefined) {\n this.options.keySeparator = '.';\n }\n if (this.options.ignoreJSONStructure === undefined) {\n this.options.ignoreJSONStructure = true;\n }\n }\n addNamespaces(ns) {\n if (this.options.ns.indexOf(ns) < 0) {\n this.options.ns.push(ns);\n }\n }\n removeNamespaces(ns) {\n const index = this.options.ns.indexOf(ns);\n if (index > -1) {\n this.options.ns.splice(index, 1);\n }\n }\n getResource(lng, ns, key, options = {}) {\n const keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;\n const ignoreJSONStructure = options.ignoreJSONStructure !== undefined ? options.ignoreJSONStructure : this.options.ignoreJSONStructure;\n let path;\n if (lng.indexOf('.') > -1) {\n path = lng.split('.');\n } else {\n path = [lng, ns];\n if (key) {\n if (Array.isArray(key)) {\n path.push(...key);\n } else if (isString(key) && keySeparator) {\n path.push(...key.split(keySeparator));\n } else {\n path.push(key);\n }\n }\n }\n const result = getPath(this.data, path);\n if (!result && !ns && !key && lng.indexOf('.') > -1) {\n lng = path[0];\n ns = path[1];\n key = path.slice(2).join('.');\n }\n if (result || !ignoreJSONStructure || !isString(key)) return result;\n return deepFind(this.data?.[lng]?.[ns], key, keySeparator);\n }\n addResource(lng, ns, key, value, options = {\n silent: false\n }) {\n const keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;\n let path = [lng, ns];\n if (key) path = path.concat(keySeparator ? key.split(keySeparator) : key);\n if (lng.indexOf('.') > -1) {\n path = lng.split('.');\n value = ns;\n ns = path[1];\n }\n this.addNamespaces(ns);\n setPath(this.data, path, value);\n if (!options.silent) this.emit('added', lng, ns, key, value);\n }\n addResources(lng, ns, resources, options = {\n silent: false\n }) {\n for (const m in resources) {\n if (isString(resources[m]) || Array.isArray(resources[m])) this.addResource(lng, ns, m, resources[m], {\n silent: true\n });\n }\n if (!options.silent) this.emit('added', lng, ns, resources);\n }\n addResourceBundle(lng, ns, resources, deep, overwrite, options = {\n silent: false,\n skipCopy: false\n }) {\n let path = [lng, ns];\n if (lng.indexOf('.') > -1) {\n path = lng.split('.');\n deep = resources;\n resources = ns;\n ns = path[1];\n }\n this.addNamespaces(ns);\n let pack = getPath(this.data, path) || {};\n if (!options.skipCopy) resources = JSON.parse(JSON.stringify(resources));\n if (deep) {\n deepExtend(pack, resources, overwrite);\n } else {\n pack = {\n ...pack,\n ...resources\n };\n }\n setPath(this.data, path, pack);\n if (!options.silent) this.emit('added', lng, ns, resources);\n }\n removeResourceBundle(lng, ns) {\n if (this.hasResourceBundle(lng, ns)) {\n delete this.data[lng][ns];\n }\n this.removeNamespaces(ns);\n this.emit('removed', lng, ns);\n }\n hasResourceBundle(lng, ns) {\n return this.getResource(lng, ns) !== undefined;\n }\n getResourceBundle(lng, ns) {\n if (!ns) ns = this.options.defaultNS;\n return this.getResource(lng, ns);\n }\n getDataByLanguage(lng) {\n return this.data[lng];\n }\n hasLanguageSomeTranslations(lng) {\n const data = this.getDataByLanguage(lng);\n const n = data && Object.keys(data) || [];\n return !!n.find(v => data[v] && Object.keys(data[v]).length > 0);\n }\n toJSON() {\n return this.data;\n }\n}\n\nvar postProcessor = {\n processors: {},\n addPostProcessor(module) {\n this.processors[module.name] = module;\n },\n handle(processors, value, key, options, translator) {\n processors.forEach(processor => {\n value = this.processors[processor]?.process(value, key, options, translator) ?? value;\n });\n return value;\n }\n};\n\nconst PATH_KEY = Symbol('i18next/PATH_KEY');\nfunction createProxy() {\n const state = [];\n const handler = Object.create(null);\n let proxy;\n handler.get = (target, key) => {\n proxy?.revoke?.();\n if (key === PATH_KEY) return state;\n state.push(key);\n proxy = Proxy.revocable(target, handler);\n return proxy.proxy;\n };\n return Proxy.revocable(Object.create(null), handler).proxy;\n}\nfunction keysFromSelector(selector, opts) {\n const {\n [PATH_KEY]: path\n } = selector(createProxy());\n return path.join(opts?.keySeparator ?? '.');\n}\n\nconst checkedLoadedFor = {};\nconst shouldHandleAsObject = res => !isString(res) && typeof res !== 'boolean' && typeof res !== 'number';\nclass Translator extends EventEmitter {\n constructor(services, options = {}) {\n super();\n copy(['resourceStore', 'languageUtils', 'pluralResolver', 'interpolator', 'backendConnector', 'i18nFormat', 'utils'], services, this);\n this.options = options;\n if (this.options.keySeparator === undefined) {\n this.options.keySeparator = '.';\n }\n this.logger = baseLogger.create('translator');\n }\n changeLanguage(lng) {\n if (lng) this.language = lng;\n }\n exists(key, o = {\n interpolation: {}\n }) {\n const opt = {\n ...o\n };\n if (key == null) return false;\n const resolved = this.resolve(key, opt);\n if (resolved?.res === undefined) return false;\n const isObject = shouldHandleAsObject(resolved.res);\n if (opt.returnObjects === false && isObject) {\n return false;\n }\n return true;\n }\n extractFromKey(key, opt) {\n let nsSeparator = opt.nsSeparator !== undefined ? opt.nsSeparator : this.options.nsSeparator;\n if (nsSeparator === undefined) nsSeparator = ':';\n const keySeparator = opt.keySeparator !== undefined ? opt.keySeparator : this.options.keySeparator;\n let namespaces = opt.ns || this.options.defaultNS || [];\n const wouldCheckForNsInKey = nsSeparator && key.indexOf(nsSeparator) > -1;\n const seemsNaturalLanguage = !this.options.userDefinedKeySeparator && !opt.keySeparator && !this.options.userDefinedNsSeparator && !opt.nsSeparator && !looksLikeObjectPath(key, nsSeparator, keySeparator);\n if (wouldCheckForNsInKey && !seemsNaturalLanguage) {\n const m = key.match(this.interpolator.nestingRegexp);\n if (m && m.length > 0) {\n return {\n key,\n namespaces: isString(namespaces) ? [namespaces] : namespaces\n };\n }\n const parts = key.split(nsSeparator);\n if (nsSeparator !== keySeparator || nsSeparator === keySeparator && this.options.ns.indexOf(parts[0]) > -1) namespaces = parts.shift();\n key = parts.join(keySeparator);\n }\n return {\n key,\n namespaces: isString(namespaces) ? [namespaces] : namespaces\n };\n }\n translate(keys, o, lastKey) {\n let opt = typeof o === 'object' ? {\n ...o\n } : o;\n if (typeof opt !== 'object' && this.options.overloadTranslationOptionHandler) {\n opt = this.options.overloadTranslationOptionHandler(arguments);\n }\n if (typeof opt === 'object') opt = {\n ...opt\n };\n if (!opt) opt = {};\n if (keys == null) return '';\n if (typeof keys === 'function') keys = keysFromSelector(keys, {\n ...this.options,\n ...opt\n });\n if (!Array.isArray(keys)) keys = [String(keys)];\n const returnDetails = opt.returnDetails !== undefined ? opt.returnDetails : this.options.returnDetails;\n const keySeparator = opt.keySeparator !== undefined ? opt.keySeparator : this.options.keySeparator;\n const {\n key,\n namespaces\n } = this.extractFromKey(keys[keys.length - 1], opt);\n const namespace = namespaces[namespaces.length - 1];\n let nsSeparator = opt.nsSeparator !== undefined ? opt.nsSeparator : this.options.nsSeparator;\n if (nsSeparator === undefined) nsSeparator = ':';\n const lng = opt.lng || this.language;\n const appendNamespaceToCIMode = opt.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;\n if (lng?.toLowerCase() === 'cimode') {\n if (appendNamespaceToCIMode) {\n if (returnDetails) {\n return {\n res: `${namespace}${nsSeparator}${key}`,\n usedKey: key,\n exactUsedKey: key,\n usedLng: lng,\n usedNS: namespace,\n usedParams: this.getUsedParamsDetails(opt)\n };\n }\n return `${namespace}${nsSeparator}${key}`;\n }\n if (returnDetails) {\n return {\n res: key,\n usedKey: key,\n exactUsedKey: key,\n usedLng: lng,\n usedNS: namespace,\n usedParams: this.getUsedParamsDetails(opt)\n };\n }\n return key;\n }\n const resolved = this.resolve(keys, opt);\n let res = resolved?.res;\n const resUsedKey = resolved?.usedKey || key;\n const resExactUsedKey = resolved?.exactUsedKey || key;\n const noObject = ['[object Number]', '[object Function]', '[object RegExp]'];\n const joinArrays = opt.joinArrays !== undefined ? opt.joinArrays : this.options.joinArrays;\n const handleAsObjectInI18nFormat = !this.i18nFormat || this.i18nFormat.handleAsObject;\n const needsPluralHandling = opt.count !== undefined && !isString(opt.count);\n const hasDefaultValue = Translator.hasDefaultValue(opt);\n const defaultValueSuffix = needsPluralHandling ? this.pluralResolver.getSuffix(lng, opt.count, opt) : '';\n const defaultValueSuffixOrdinalFallback = opt.ordinal && needsPluralHandling ? this.pluralResolver.getSuffix(lng, opt.count, {\n ordinal: false\n }) : '';\n const needsZeroSuffixLookup = needsPluralHandling && !opt.ordinal && opt.count === 0;\n const defaultValue = needsZeroSuffixLookup && opt[`defaultValue${this.options.pluralSeparator}zero`] || opt[`defaultValue${defaultValueSuffix}`] || opt[`defaultValue${defaultValueSuffixOrdinalFallback}`] || opt.defaultValue;\n let resForObjHndl = res;\n if (handleAsObjectInI18nFormat && !res && hasDefaultValue) {\n resForObjHndl = defaultValue;\n }\n const handleAsObject = shouldHandleAsObject(resForObjHndl);\n const resType = Object.prototype.toString.apply(resForObjHndl);\n if (handleAsObjectInI18nFormat && resForObjHndl && handleAsObject && noObject.indexOf(resType) < 0 && !(isString(joinArrays) && Array.isArray(resForObjHndl))) {\n if (!opt.returnObjects && !this.options.returnObjects) {\n if (!this.options.returnedObjectHandler) {\n this.logger.warn('accessing an object - but returnObjects options is not enabled!');\n }\n const r = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(resUsedKey, resForObjHndl, {\n ...opt,\n ns: namespaces\n }) : `key '${key} (${this.language})' returned an object instead of string.`;\n if (returnDetails) {\n resolved.res = r;\n resolved.usedParams = this.getUsedParamsDetails(opt);\n return resolved;\n }\n return r;\n }\n if (keySeparator) {\n const resTypeIsArray = Array.isArray(resForObjHndl);\n const copy = resTypeIsArray ? [] : {};\n const newKeyToUse = resTypeIsArray ? resExactUsedKey : resUsedKey;\n for (const m in resForObjHndl) {\n if (Object.prototype.hasOwnProperty.call(resForObjHndl, m)) {\n const deepKey = `${newKeyToUse}${keySeparator}${m}`;\n if (hasDefaultValue && !res) {\n copy[m] = this.translate(deepKey, {\n ...opt,\n defaultValue: shouldHandleAsObject(defaultValue) ? defaultValue[m] : undefined,\n ...{\n joinArrays: false,\n ns: namespaces\n }\n });\n } else {\n copy[m] = this.translate(deepKey, {\n ...opt,\n ...{\n joinArrays: false,\n ns: namespaces\n }\n });\n }\n if (copy[m] === deepKey) copy[m] = resForObjHndl[m];\n }\n }\n res = copy;\n }\n } else if (handleAsObjectInI18nFormat && isString(joinArrays) && Array.isArray(res)) {\n res = res.join(joinArrays);\n if (res) res = this.extendTranslation(res, keys, opt, lastKey);\n } else {\n let usedDefault = false;\n let usedKey = false;\n if (!this.isValidLookup(res) && hasDefaultValue) {\n usedDefault = true;\n res = defaultValue;\n }\n if (!this.isValidLookup(res)) {\n usedKey = true;\n res = key;\n }\n const missingKeyNoValueFallbackToKey = opt.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey;\n const resForMissing = missingKeyNoValueFallbackToKey && usedKey ? undefined : res;\n const updateMissing = hasDefaultValue && defaultValue !== res && this.options.updateMissing;\n if (usedKey || usedDefault || updateMissing) {\n this.logger.log(updateMissing ? 'updateKey' : 'missingKey', lng, namespace, key, updateMissing ? defaultValue : res);\n if (keySeparator) {\n const fk = this.resolve(key, {\n ...opt,\n keySeparator: false\n });\n if (fk && fk.res) this.logger.warn('Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.');\n }\n let lngs = [];\n const fallbackLngs = this.languageUtils.getFallbackCodes(this.options.fallbackLng, opt.lng || this.language);\n if (this.options.saveMissingTo === 'fallback' && fallbackLngs && fallbackLngs[0]) {\n for (let i = 0; i < fallbackLngs.length; i++) {\n lngs.push(fallbackLngs[i]);\n }\n } else if (this.options.saveMissingTo === 'all') {\n lngs = this.languageUtils.toResolveHierarchy(opt.lng || this.language);\n } else {\n lngs.push(opt.lng || this.language);\n }\n const send = (l, k, specificDefaultValue) => {\n const defaultForMissing = hasDefaultValue && specificDefaultValue !== res ? specificDefaultValue : resForMissing;\n if (this.options.missingKeyHandler) {\n this.options.missingKeyHandler(l, namespace, k, defaultForMissing, updateMissing, opt);\n } else if (this.backendConnector?.saveMissing) {\n this.backendConnector.saveMissing(l, namespace, k, defaultForMissing, updateMissing, opt);\n }\n this.emit('missingKey', l, namespace, k, res);\n };\n if (this.options.saveMissing) {\n if (this.options.saveMissingPlurals && needsPluralHandling) {\n lngs.forEach(language => {\n const suffixes = this.pluralResolver.getSuffixes(language, opt);\n if (needsZeroSuffixLookup && opt[`defaultValue${this.options.pluralSeparator}zero`] && suffixes.indexOf(`${this.options.pluralSeparator}zero`) < 0) {\n suffixes.push(`${this.options.pluralSeparator}zero`);\n }\n suffixes.forEach(suffix => {\n send([language], key + suffix, opt[`defaultValue${suffix}`] || defaultValue);\n });\n });\n } else {\n send(lngs, key, defaultValue);\n }\n }\n }\n res = this.extendTranslation(res, keys, opt, resolved, lastKey);\n if (usedKey && res === key && this.options.appendNamespaceToMissingKey) {\n res = `${namespace}${nsSeparator}${key}`;\n }\n if ((usedKey || usedDefault) && this.options.parseMissingKeyHandler) {\n res = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${namespace}${nsSeparator}${key}` : key, usedDefault ? res : undefined, opt);\n }\n }\n if (returnDetails) {\n resolved.res = res;\n resolved.usedParams = this.getUsedParamsDetails(opt);\n return resolved;\n }\n return res;\n }\n extendTranslation(res, key, opt, resolved, lastKey) {\n if (this.i18nFormat?.parse) {\n res = this.i18nFormat.parse(res, {\n ...this.options.interpolation.defaultVariables,\n ...opt\n }, opt.lng || this.language || resolved.usedLng, resolved.usedNS, resolved.usedKey, {\n resolved\n });\n } else if (!opt.skipInterpolation) {\n if (opt.interpolation) this.interpolator.init({\n ...opt,\n ...{\n interpolation: {\n ...this.options.interpolation,\n ...opt.interpolation\n }\n }\n });\n const skipOnVariables = isString(res) && (opt?.interpolation?.skipOnVariables !== undefined ? opt.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);\n let nestBef;\n if (skipOnVariables) {\n const nb = res.match(this.interpolator.nestingRegexp);\n nestBef = nb && nb.length;\n }\n let data = opt.replace && !isString(opt.replace) ? opt.replace : opt;\n if (this.options.interpolation.defaultVariables) data = {\n ...this.options.interpolation.defaultVariables,\n ...data\n };\n res = this.interpolator.interpolate(res, data, opt.lng || this.language || resolved.usedLng, opt);\n if (skipOnVariables) {\n const na = res.match(this.interpolator.nestingRegexp);\n const nestAft = na && na.length;\n if (nestBef < nestAft) opt.nest = false;\n }\n if (!opt.lng && resolved && resolved.res) opt.lng = this.language || resolved.usedLng;\n if (opt.nest !== false) res = this.interpolator.nest(res, (...args) => {\n if (lastKey?.[0] === args[0] && !opt.context) {\n this.logger.warn(`It seems you are nesting recursively key: ${args[0]} in key: ${key[0]}`);\n return null;\n }\n return this.translate(...args, key);\n }, opt);\n if (opt.interpolation) this.interpolator.reset();\n }\n const postProcess = opt.postProcess || this.options.postProcess;\n const postProcessorNames = isString(postProcess) ? [postProcess] : postProcess;\n if (res != null && postProcessorNames?.length && opt.applyPostProcessor !== false) {\n res = postProcessor.handle(postProcessorNames, res, key, this.options && this.options.postProcessPassResolved ? {\n i18nResolved: {\n ...resolved,\n usedParams: this.getUsedParamsDetails(opt)\n },\n ...opt\n } : opt, this);\n }\n return res;\n }\n resolve(keys, opt = {}) {\n let found;\n let usedKey;\n let exactUsedKey;\n let usedLng;\n let usedNS;\n if (isString(keys)) keys = [keys];\n keys.forEach(k => {\n if (this.isValidLookup(found)) return;\n const extracted = this.extractFromKey(k, opt);\n const key = extracted.key;\n usedKey = key;\n let namespaces = extracted.namespaces;\n if (this.options.fallbackNS) namespaces = namespaces.concat(this.options.fallbackNS);\n const needsPluralHandling = opt.count !== undefined && !isString(opt.count);\n const needsZeroSuffixLookup = needsPluralHandling && !opt.ordinal && opt.count === 0;\n const needsContextHandling = opt.context !== undefined && (isString(opt.context) || typeof opt.context === 'number') && opt.context !== '';\n const codes = opt.lngs ? opt.lngs : this.languageUtils.toResolveHierarchy(opt.lng || this.language, opt.fallbackLng);\n namespaces.forEach(ns => {\n if (this.isValidLookup(found)) return;\n usedNS = ns;\n if (!checkedLoadedFor[`${codes[0]}-${ns}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(usedNS)) {\n checkedLoadedFor[`${codes[0]}-${ns}`] = true;\n this.logger.warn(`key \"${usedKey}\" for languages \"${codes.join(', ')}\" won't get resolved as namespace \"${usedNS}\" was not yet loaded`, 'This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!');\n }\n codes.forEach(code => {\n if (this.isValidLookup(found)) return;\n usedLng = code;\n const finalKeys = [key];\n if (this.i18nFormat?.addLookupKeys) {\n this.i18nFormat.addLookupKeys(finalKeys, key, code, ns, opt);\n } else {\n let pluralSuffix;\n if (needsPluralHandling) pluralSuffix = this.pluralResolver.getSuffix(code, opt.count, opt);\n const zeroSuffix = `${this.options.pluralSeparator}zero`;\n const ordinalPrefix = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;\n if (needsPluralHandling) {\n if (opt.ordinal && pluralSuffix.indexOf(ordinalPrefix) === 0) {\n finalKeys.push(key + pluralSuffix.replace(ordinalPrefix, this.options.pluralSeparator));\n }\n finalKeys.push(key + pluralSuffix);\n if (needsZeroSuffixLookup) {\n finalKeys.push(key + zeroSuffix);\n }\n }\n if (needsContextHandling) {\n const contextKey = `${key}${this.options.contextSeparator || '_'}${opt.context}`;\n finalKeys.push(contextKey);\n if (needsPluralHandling) {\n if (opt.ordinal && pluralSuffix.indexOf(ordinalPrefix) === 0) {\n finalKeys.push(contextKey + pluralSuffix.replace(ordinalPrefix, this.options.pluralSeparator));\n }\n finalKeys.push(contextKey + pluralSuffix);\n if (needsZeroSuffixLookup) {\n finalKeys.push(contextKey + zeroSuffix);\n }\n }\n }\n }\n let possibleKey;\n while (possibleKey = finalKeys.pop()) {\n if (!this.isValidLookup(found)) {\n exactUsedKey = possibleKey;\n found = this.getResource(code, ns, possibleKey, opt);\n }\n }\n });\n });\n });\n return {\n res: found,\n usedKey,\n exactUsedKey,\n usedLng,\n usedNS\n };\n }\n isValidLookup(res) {\n return res !== undefined && !(!this.options.returnNull && res === null) && !(!this.options.returnEmptyString && res === '');\n }\n getResource(code, ns, key, options = {}) {\n if (this.i18nFormat?.getResource) return this.i18nFormat.getResource(code, ns, key, options);\n return this.resourceStore.getResource(code, ns, key, options);\n }\n getUsedParamsDetails(options = {}) {\n const optionsKeys = ['defaultValue', 'ordinal', 'context', 'replace', 'lng', 'lngs', 'fallbackLng', 'ns', 'keySeparator', 'nsSeparator', 'returnObjects', 'returnDetails', 'joinArrays', 'postProcess', 'interpolation'];\n const useOptionsReplaceForData = options.replace && !isString(options.replace);\n let data = useOptionsReplaceForData ? options.replace : options;\n if (useOptionsReplaceForData && typeof options.count !== 'undefined') {\n data.count = options.count;\n }\n if (this.options.interpolation.defaultVariables) {\n data = {\n ...this.options.interpolation.defaultVariables,\n ...data\n };\n }\n if (!useOptionsReplaceForData) {\n data = {\n ...data\n };\n for (const key of optionsKeys) {\n delete data[key];\n }\n }\n return data;\n }\n static hasDefaultValue(options) {\n const prefix = 'defaultValue';\n for (const option in options) {\n if (Object.prototype.hasOwnProperty.call(options, option) && prefix === option.substring(0, prefix.length) && undefined !== options[option]) {\n return true;\n }\n }\n return false;\n }\n}\n\nclass LanguageUtil {\n constructor(options) {\n this.options = options;\n this.supportedLngs = this.options.supportedLngs || false;\n this.logger = baseLogger.create('languageUtils');\n }\n getScriptPartFromCode(code) {\n code = getCleanedCode(code);\n if (!code || code.indexOf('-') < 0) return null;\n const p = code.split('-');\n if (p.length === 2) return null;\n p.pop();\n if (p[p.length - 1].toLowerCase() === 'x') return null;\n return this.formatLanguageCode(p.join('-'));\n }\n getLanguagePartFromCode(code) {\n code = getCleanedCode(code);\n if (!code || code.indexOf('-') < 0) return code;\n const p = code.split('-');\n return this.formatLanguageCode(p[0]);\n }\n formatLanguageCode(code) {\n if (isString(code) && code.indexOf('-') > -1) {\n let formattedCode;\n try {\n formattedCode = Intl.getCanonicalLocales(code)[0];\n } catch (e) {}\n if (formattedCode && this.options.lowerCaseLng) {\n formattedCode = formattedCode.toLowerCase();\n }\n if (formattedCode) return formattedCode;\n if (this.options.lowerCaseLng) {\n return code.toLowerCase();\n }\n return code;\n }\n return this.options.cleanCode || this.options.lowerCaseLng ? code.toLowerCase() : code;\n }\n isSupportedCode(code) {\n if (this.options.load === 'languageOnly' || this.options.nonExplicitSupportedLngs) {\n code = this.getLanguagePartFromCode(code);\n }\n return !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.indexOf(code) > -1;\n }\n getBestMatchFromCodes(codes) {\n if (!codes) return null;\n let found;\n codes.forEach(code => {\n if (found) return;\n const cleanedLng = this.formatLanguageCode(code);\n if (!this.options.supportedLngs || this.isSupportedCode(cleanedLng)) found = cleanedLng;\n });\n if (!found && this.options.supportedLngs) {\n codes.forEach(code => {\n if (found) return;\n const lngScOnly = this.getScriptPartFromCode(code);\n if (this.isSupportedCode(lngScOnly)) return found = lngScOnly;\n const lngOnly = this.getLanguagePartFromCode(code);\n if (this.isSupportedCode(lngOnly)) return found = lngOnly;\n found = this.options.supportedLngs.find(supportedLng => {\n if (supportedLng === lngOnly) return supportedLng;\n if (supportedLng.indexOf('-') < 0 && lngOnly.indexOf('-') < 0) return;\n if (supportedLng.indexOf('-') > 0 && lngOnly.indexOf('-') < 0 && supportedLng.substring(0, supportedLng.indexOf('-')) === lngOnly) return supportedLng;\n if (supportedLng.indexOf(lngOnly) === 0 && lngOnly.length > 1) return supportedLng;\n });\n });\n }\n if (!found) found = this.getFallbackCodes(this.options.fallbackLng)[0];\n return found;\n }\n getFallbackCodes(fallbacks, code) {\n if (!fallbacks) return [];\n if (typeof fallbacks === 'function') fallbacks = fallbacks(code);\n if (isString(fallbacks)) fallbacks = [fallbacks];\n if (Array.isArray(fallbacks)) return fallbacks;\n if (!code) return fallbacks.default || [];\n let found = fallbacks[code];\n if (!found) found = fallbacks[this.getScriptPartFromCode(code)];\n if (!found) found = fallbacks[this.formatLanguageCode(code)];\n if (!found) found = fallbacks[this.getLanguagePartFromCode(code)];\n if (!found) found = fallbacks.default;\n return found || [];\n }\n toResolveHierarchy(code, fallbackCode) {\n const fallbackCodes = this.getFallbackCodes((fallbackCode === false ? [] : fallbackCode) || this.options.fallbackLng || [], code);\n const codes = [];\n const addCode = c => {\n if (!c) return;\n if (this.isSupportedCode(c)) {\n codes.push(c);\n } else {\n this.logger.warn(`rejecting language code not found in supportedLngs: ${c}`);\n }\n };\n if (isString(code) && (code.indexOf('-') > -1 || code.indexOf('_') > -1)) {\n if (this.options.load !== 'languageOnly') addCode(this.formatLanguageCode(code));\n if (this.options.load !== 'languageOnly' && this.options.load !== 'currentOnly') addCode(this.getScriptPartFromCode(code));\n if (this.options.load !== 'currentOnly') addCode(this.getLanguagePartFromCode(code));\n } else if (isString(code)) {\n addCode(this.formatLanguageCode(code));\n }\n fallbackCodes.forEach(fc => {\n if (codes.indexOf(fc) < 0) addCode(this.formatLanguageCode(fc));\n });\n return codes;\n }\n}\n\nconst suffixesOrder = {\n zero: 0,\n one: 1,\n two: 2,\n few: 3,\n many: 4,\n other: 5\n};\nconst dummyRule = {\n select: count => count === 1 ? 'one' : 'other',\n resolvedOptions: () => ({\n pluralCategories: ['one', 'other']\n })\n};\nclass PluralResolver {\n constructor(languageUtils, options = {}) {\n this.languageUtils = languageUtils;\n this.options = options;\n this.logger = baseLogger.create('pluralResolver');\n this.pluralRulesCache = {};\n }\n clearCache() {\n this.pluralRulesCache = {};\n }\n getRule(code, options = {}) {\n const cleanedCode = getCleanedCode(code === 'dev' ? 'en' : code);\n const type = options.ordinal ? 'ordinal' : 'cardinal';\n const cacheKey = JSON.stringify({\n cleanedCode,\n type\n });\n if (cacheKey in this.pluralRulesCache) {\n return this.pluralRulesCache[cacheKey];\n }\n let rule;\n try {\n rule = new Intl.PluralRules(cleanedCode, {\n type\n });\n } catch (err) {\n if (!Intl) {\n this.logger.error('No Intl support, please use an Intl polyfill!');\n return dummyRule;\n }\n if (!code.match(/-|_/)) return dummyRule;\n const lngPart = this.languageUtils.getLanguagePartFromCode(code);\n rule = this.getRule(lngPart, options);\n }\n this.pluralRulesCache[cacheKey] = rule;\n return rule;\n }\n needsPlural(code, options = {}) {\n let rule = this.getRule(code, options);\n if (!rule) rule = this.getRule('dev', options);\n return rule?.resolvedOptions().pluralCategories.length > 1;\n }\n getPluralFormsOfKey(code, key, options = {}) {\n return this.getSuffixes(code, options).map(suffix => `${key}${suffix}`);\n }\n getSuffixes(code, options = {}) {\n let rule = this.getRule(code, options);\n if (!rule) rule = this.getRule('dev', options);\n if (!rule) return [];\n return rule.resolvedOptions().pluralCategories.sort((pluralCategory1, pluralCategory2) => suffixesOrder[pluralCategory1] - suffixesOrder[pluralCategory2]).map(pluralCategory => `${this.options.prepend}${options.ordinal ? `ordinal${this.options.prepend}` : ''}${pluralCategory}`);\n }\n getSuffix(code, count, options = {}) {\n const rule = this.getRule(code, options);\n if (rule) {\n return `${this.options.prepend}${options.ordinal ? `ordinal${this.options.prepend}` : ''}${rule.select(count)}`;\n }\n this.logger.warn(`no plural rule found for: ${code}`);\n return this.getSuffix('dev', count, options);\n }\n}\n\nconst deepFindWithDefaults = (data, defaultData, key, keySeparator = '.', ignoreJSONStructure = true) => {\n let path = getPathWithDefaults(data, defaultData, key);\n if (!path && ignoreJSONStructure && isString(key)) {\n path = deepFind(data, key, keySeparator);\n if (path === undefined) path = deepFind(defaultData, key, keySeparator);\n }\n return path;\n};\nconst regexSafe = val => val.replace(/\\$/g, '$$$$');\nclass Interpolator {\n constructor(options = {}) {\n this.logger = baseLogger.create('interpolator');\n this.options = options;\n this.format = options?.interpolation?.format || (value => value);\n this.init(options);\n }\n init(options = {}) {\n if (!options.interpolation) options.interpolation = {\n escapeValue: true\n };\n const {\n escape: escape$1,\n escapeValue,\n useRawValueToEscape,\n prefix,\n prefixEscaped,\n suffix,\n suffixEscaped,\n formatSeparator,\n unescapeSuffix,\n unescapePrefix,\n nestingPrefix,\n nestingPrefixEscaped,\n nestingSuffix,\n nestingSuffixEscaped,\n nestingOptionsSeparator,\n maxReplaces,\n alwaysFormat\n } = options.interpolation;\n this.escape = escape$1 !== undefined ? escape$1 : escape;\n this.escapeValue = escapeValue !== undefined ? escapeValue : true;\n this.useRawValueToEscape = useRawValueToEscape !== undefined ? useRawValueToEscape : false;\n this.prefix = prefix ? regexEscape(prefix) : prefixEscaped || '{{';\n this.suffix = suffix ? regexEscape(suffix) : suffixEscaped || '}}';\n this.formatSeparator = formatSeparator || ',';\n this.unescapePrefix = unescapeSuffix ? '' : unescapePrefix || '-';\n this.unescapeSuffix = this.unescapePrefix ? '' : unescapeSuffix || '';\n this.nestingPrefix = nestingPrefix ? regexEscape(nestingPrefix) : nestingPrefixEscaped || regexEscape('$t(');\n this.nestingSuffix = nestingSuffix ? regexEscape(nestingSuffix) : nestingSuffixEscaped || regexEscape(')');\n this.nestingOptionsSeparator = nestingOptionsSeparator || ',';\n this.maxReplaces = maxReplaces || 1000;\n this.alwaysFormat = alwaysFormat !== undefined ? alwaysFormat : false;\n this.resetRegExp();\n }\n reset() {\n if (this.options) this.init(this.options);\n }\n resetRegExp() {\n const getOrResetRegExp = (existingRegExp, pattern) => {\n if (existingRegExp?.source === pattern) {\n existingRegExp.lastIndex = 0;\n return existingRegExp;\n }\n return new RegExp(pattern, 'g');\n };\n this.regexp = getOrResetRegExp(this.regexp, `${this.prefix}(.+?)${this.suffix}`);\n this.regexpUnescape = getOrResetRegExp(this.regexpUnescape, `${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`);\n this.nestingRegexp = getOrResetRegExp(this.nestingRegexp, `${this.nestingPrefix}((?:[^()\"']+|\"[^\"]*\"|'[^']*'|\\\\((?:[^()]|\"[^\"]*\"|'[^']*')*\\\\))*?)${this.nestingSuffix}`);\n }\n interpolate(str, data, lng, options) {\n let match;\n let value;\n let replaces;\n const defaultData = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {};\n const handleFormat = key => {\n if (key.indexOf(this.formatSeparator) < 0) {\n const path = deepFindWithDefaults(data, defaultData, key, this.options.keySeparator, this.options.ignoreJSONStructure);\n return this.alwaysFormat ? this.format(path, undefined, lng, {\n ...options,\n ...data,\n interpolationkey: key\n }) : path;\n }\n const p = key.split(this.formatSeparator);\n const k = p.shift().trim();\n const f = p.join(this.formatSeparator).trim();\n return this.format(deepFindWithDefaults(data, defaultData, k, this.options.keySeparator, this.options.ignoreJSONStructure), f, lng, {\n ...options,\n ...data,\n interpolationkey: k\n });\n };\n this.resetRegExp();\n const missingInterpolationHandler = options?.missingInterpolationHandler || this.options.missingInterpolationHandler;\n const skipOnVariables = options?.interpolation?.skipOnVariables !== undefined ? options.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;\n const todos = [{\n regex: this.regexpUnescape,\n safeValue: val => regexSafe(val)\n }, {\n regex: this.regexp,\n safeValue: val => this.escapeValue ? regexSafe(this.escape(val)) : regexSafe(val)\n }];\n todos.forEach(todo => {\n replaces = 0;\n while (match = todo.regex.exec(str)) {\n const matchedVar = match[1].trim();\n value = handleFormat(matchedVar);\n if (value === undefined) {\n if (typeof missingInterpolationHandler === 'function') {\n const temp = missingInterpolationHandler(str, match, options);\n value = isString(temp) ? temp : '';\n } else if (options && Object.prototype.hasOwnProperty.call(options, matchedVar)) {\n value = '';\n } else if (skipOnVariables) {\n value = match[0];\n continue;\n } else {\n this.logger.warn(`missed to pass in variable ${matchedVar} for interpolating ${str}`);\n value = '';\n }\n } else if (!isString(value) && !this.useRawValueToEscape) {\n value = makeString(value);\n }\n const safeValue = todo.safeValue(value);\n str = str.replace(match[0], safeValue);\n if (skipOnVariables) {\n todo.regex.lastIndex += value.length;\n todo.regex.lastIndex -= match[0].length;\n } else {\n todo.regex.lastIndex = 0;\n }\n replaces++;\n if (replaces >= this.maxReplaces) {\n break;\n }\n }\n });\n return str;\n }\n nest(str, fc, options = {}) {\n let match;\n let value;\n let clonedOptions;\n const handleHasOptions = (key, inheritedOptions) => {\n const sep = this.nestingOptionsSeparator;\n if (key.indexOf(sep) < 0) return key;\n const c = key.split(new RegExp(`${sep}[ ]*{`));\n let optionsString = `{${c[1]}`;\n key = c[0];\n optionsString = this.interpolate(optionsString, clonedOptions);\n const matchedSingleQuotes = optionsString.match(/'/g);\n const matchedDoubleQuotes = optionsString.match(/\"/g);\n if ((matchedSingleQuotes?.length ?? 0) % 2 === 0 && !matchedDoubleQuotes || matchedDoubleQuotes.length % 2 !== 0) {\n optionsString = optionsString.replace(/'/g, '\"');\n }\n try {\n clonedOptions = JSON.parse(optionsString);\n if (inheritedOptions) clonedOptions = {\n ...inheritedOptions,\n ...clonedOptions\n };\n } catch (e) {\n this.logger.warn(`failed parsing options string in nesting for key ${key}`, e);\n return `${key}${sep}${optionsString}`;\n }\n if (clonedOptions.defaultValue && clonedOptions.defaultValue.indexOf(this.prefix) > -1) delete clonedOptions.defaultValue;\n return key;\n };\n while (match = this.nestingRegexp.exec(str)) {\n let formatters = [];\n clonedOptions = {\n ...options\n };\n clonedOptions = clonedOptions.replace && !isString(clonedOptions.replace) ? clonedOptions.replace : clonedOptions;\n clonedOptions.applyPostProcessor = false;\n delete clonedOptions.defaultValue;\n const keyEndIndex = /{.*}/.test(match[1]) ? match[1].lastIndexOf('}') + 1 : match[1].indexOf(this.formatSeparator);\n if (keyEndIndex !== -1) {\n formatters = match[1].slice(keyEndIndex).split(this.formatSeparator).map(elem => elem.trim()).filter(Boolean);\n match[1] = match[1].slice(0, keyEndIndex);\n }\n value = fc(handleHasOptions.call(this, match[1].trim(), clonedOptions), clonedOptions);\n if (value && match[0] === str && !isString(value)) return value;\n if (!isString(value)) value = makeString(value);\n if (!value) {\n this.logger.warn(`missed to resolve ${match[1]} for nesting ${str}`);\n value = '';\n }\n if (formatters.length) {\n value = formatters.reduce((v, f) => this.format(v, f, options.lng, {\n ...options,\n interpolationkey: match[1].trim()\n }), value.trim());\n }\n str = str.replace(match[0], value);\n this.regexp.lastIndex = 0;\n }\n return str;\n }\n}\n\nconst parseFormatStr = formatStr => {\n let formatName = formatStr.toLowerCase().trim();\n const formatOptions = {};\n if (formatStr.indexOf('(') > -1) {\n const p = formatStr.split('(');\n formatName = p[0].toLowerCase().trim();\n const optStr = p[1].substring(0, p[1].length - 1);\n if (formatName === 'currency' && optStr.indexOf(':') < 0) {\n if (!formatOptions.currency) formatOptions.currency = optStr.trim();\n } else if (formatName === 'relativetime' && optStr.indexOf(':') < 0) {\n if (!formatOptions.range) formatOptions.range = optStr.trim();\n } else {\n const opts = optStr.split(';');\n opts.forEach(opt => {\n if (opt) {\n const [key, ...rest] = opt.split(':');\n const val = rest.join(':').trim().replace(/^'+|'+$/g, '');\n const trimmedKey = key.trim();\n if (!formatOptions[trimmedKey]) formatOptions[trimmedKey] = val;\n if (val === 'false') formatOptions[trimmedKey] = false;\n if (val === 'true') formatOptions[trimmedKey] = true;\n if (!isNaN(val)) formatOptions[trimmedKey] = parseInt(val, 10);\n }\n });\n }\n }\n return {\n formatName,\n formatOptions\n };\n};\nconst createCachedFormatter = fn => {\n const cache = {};\n return (v, l, o) => {\n let optForCache = o;\n if (o && o.interpolationkey && o.formatParams && o.formatParams[o.interpolationkey] && o[o.interpolationkey]) {\n optForCache = {\n ...optForCache,\n [o.interpolationkey]: undefined\n };\n }\n const key = l + JSON.stringify(optForCache);\n let frm = cache[key];\n if (!frm) {\n frm = fn(getCleanedCode(l), o);\n cache[key] = frm;\n }\n return frm(v);\n };\n};\nconst createNonCachedFormatter = fn => (v, l, o) => fn(getCleanedCode(l), o)(v);\nclass Formatter {\n constructor(options = {}) {\n this.logger = baseLogger.create('formatter');\n this.options = options;\n this.init(options);\n }\n init(services, options = {\n interpolation: {}\n }) {\n this.formatSeparator = options.interpolation.formatSeparator || ',';\n const cf = options.cacheInBuiltFormats ? createCachedFormatter : createNonCachedFormatter;\n this.formats = {\n number: cf((lng, opt) => {\n const formatter = new Intl.NumberFormat(lng, {\n ...opt\n });\n return val => formatter.format(val);\n }),\n currency: cf((lng, opt) => {\n const formatter = new Intl.NumberFormat(lng, {\n ...opt,\n style: 'currency'\n });\n return val => formatter.format(val);\n }),\n datetime: cf((lng, opt) => {\n const formatter = new Intl.DateTimeFormat(lng, {\n ...opt\n });\n return val => formatter.format(val);\n }),\n relativetime: cf((lng, opt) => {\n const formatter = new Intl.RelativeTimeFormat(lng, {\n ...opt\n });\n return val => formatter.format(val, opt.range || 'day');\n }),\n list: cf((lng, opt) => {\n const formatter = new Intl.ListFormat(lng, {\n ...opt\n });\n return val => formatter.format(val);\n })\n };\n }\n add(name, fc) {\n this.formats[name.toLowerCase().trim()] = fc;\n }\n addCached(name, fc) {\n this.formats[name.toLowerCase().trim()] = createCachedFormatter(fc);\n }\n format(value, format, lng, options = {}) {\n const formats = format.split(this.formatSeparator);\n if (formats.length > 1 && formats[0].indexOf('(') > 1 && formats[0].indexOf(')') < 0 && formats.find(f => f.indexOf(')') > -1)) {\n const lastIndex = formats.findIndex(f => f.indexOf(')') > -1);\n formats[0] = [formats[0], ...formats.splice(1, lastIndex)].join(this.formatSeparator);\n }\n const result = formats.reduce((mem, f) => {\n const {\n formatName,\n formatOptions\n } = parseFormatStr(f);\n if (this.formats[formatName]) {\n let formatted = mem;\n try {\n const valOptions = options?.formatParams?.[options.interpolationkey] || {};\n const l = valOptions.locale || valOptions.lng || options.locale || options.lng || lng;\n formatted = this.formats[formatName](mem, l, {\n ...formatOptions,\n ...options,\n ...valOptions\n });\n } catch (error) {\n this.logger.warn(error);\n }\n return formatted;\n } else {\n this.logger.warn(`there was no format function for ${formatName}`);\n }\n return mem;\n }, value);\n return result;\n }\n}\n\nconst removePending = (q, name) => {\n if (q.pending[name] !== undefined) {\n delete q.pending[name];\n q.pendingCount--;\n }\n};\nclass Connector extends EventEmitter {\n constructor(backend, store, services, options = {}) {\n super();\n this.backend = backend;\n this.store = store;\n this.services = services;\n this.languageUtils = services.languageUtils;\n this.options = options;\n this.logger = baseLogger.create('backendConnector');\n this.waitingReads = [];\n this.maxParallelReads = options.maxParallelReads || 10;\n this.readingCalls = 0;\n this.maxRetries = options.maxRetries >= 0 ? options.maxRetries : 5;\n this.retryTimeout = options.retryTimeout >= 1 ? options.retryTimeout : 350;\n this.state = {};\n this.queue = [];\n this.backend?.init?.(services, options.backend, options);\n }\n queueLoad(languages, namespaces, options, callback) {\n const toLoad = {};\n const pending = {};\n const toLoadLanguages = {};\n const toLoadNamespaces = {};\n languages.forEach(lng => {\n let hasAllNamespaces = true;\n namespaces.forEach(ns => {\n const name = `${lng}|${ns}`;\n if (!options.reload && this.store.hasResourceBundle(lng, ns)) {\n this.state[name] = 2;\n } else if (this.state[name] < 0) ; else if (this.state[name] === 1) {\n if (pending[name] === undefined) pending[name] = true;\n } else {\n this.state[name] = 1;\n hasAllNamespaces = false;\n if (pending[name] === undefined) pending[name] = true;\n if (toLoad[name] === undefined) toLoad[name] = true;\n if (toLoadNamespaces[ns] === undefined) toLoadNamespaces[ns] = true;\n }\n });\n if (!hasAllNamespaces) toLoadLanguages[lng] = true;\n });\n if (Object.keys(toLoad).length || Object.keys(pending).length) {\n this.queue.push({\n pending,\n pendingCount: Object.keys(pending).length,\n loaded: {},\n errors: [],\n callback\n });\n }\n return {\n toLoad: Object.keys(toLoad),\n pending: Object.keys(pending),\n toLoadLanguages: Object.keys(toLoadLanguages),\n toLoadNamespaces: Object.keys(toLoadNamespaces)\n };\n }\n loaded(name, err, data) {\n const s = name.split('|');\n const lng = s[0];\n const ns = s[1];\n if (err) this.emit('failedLoading', lng, ns, err);\n if (!err && data) {\n this.store.addResourceBundle(lng, ns, data, undefined, undefined, {\n skipCopy: true\n });\n }\n this.state[name] = err ? -1 : 2;\n if (err && data) this.state[name] = 0;\n const loaded = {};\n this.queue.forEach(q => {\n pushPath(q.loaded, [lng], ns);\n removePending(q, name);\n if (err) q.errors.push(err);\n if (q.pendingCount === 0 && !q.done) {\n Object.keys(q.loaded).forEach(l => {\n if (!loaded[l]) loaded[l] = {};\n const loadedKeys = q.loaded[l];\n if (loadedKeys.length) {\n loadedKeys.forEach(n => {\n if (loaded[l][n] === undefined) loaded[l][n] = true;\n });\n }\n });\n q.done = true;\n if (q.errors.length) {\n q.callback(q.errors);\n } else {\n q.callback();\n }\n }\n });\n this.emit('loaded', loaded);\n this.queue = this.queue.filter(q => !q.done);\n }\n read(lng, ns, fcName, tried = 0, wait = this.retryTimeout, callback) {\n if (!lng.length) return callback(null, {});\n if (this.readingCalls >= this.maxParallelReads) {\n this.waitingReads.push({\n lng,\n ns,\n fcName,\n tried,\n wait,\n callback\n });\n return;\n }\n this.readingCalls++;\n const resolver = (err, data) => {\n this.readingCalls--;\n if (this.waitingReads.length > 0) {\n const next = this.waitingReads.shift();\n this.read(next.lng, next.ns, next.fcName, next.tried, next.wait, next.callback);\n }\n if (err && data && tried < this.maxRetries) {\n setTimeout(() => {\n this.read.call(this, lng, ns, fcName, tried + 1, wait * 2, callback);\n }, wait);\n return;\n }\n callback(err, data);\n };\n const fc = this.backend[fcName].bind(this.backend);\n if (fc.length === 2) {\n try {\n const r = fc(lng, ns);\n if (r && typeof r.then === 'function') {\n r.then(data => resolver(null, data)).catch(resolver);\n } else {\n resolver(null, r);\n }\n } catch (err) {\n resolver(err);\n }\n return;\n }\n return fc(lng, ns, resolver);\n }\n prepareLoading(languages, namespaces, options = {}, callback) {\n if (!this.backend) {\n this.logger.warn('No backend was added via i18next.use. Will not load resources.');\n return callback && callback();\n }\n if (isString(languages)) languages = this.languageUtils.toResolveHierarchy(languages);\n if (isString(namespaces)) namespaces = [namespaces];\n const toLoad = this.queueLoad(languages, namespaces, options, callback);\n if (!toLoad.toLoad.length) {\n if (!toLoad.pending.length) callback();\n return null;\n }\n toLoad.toLoad.forEach(name => {\n this.loadOne(name);\n });\n }\n load(languages, namespaces, callback) {\n this.prepareLoading(languages, namespaces, {}, callback);\n }\n reload(languages, namespaces, callback) {\n this.prepareLoading(languages, namespaces, {\n reload: true\n }, callback);\n }\n loadOne(name, prefix = '') {\n const s = name.split('|');\n const lng = s[0];\n const ns = s[1];\n this.read(lng, ns, 'read', undefined, undefined, (err, data) => {\n if (err) this.logger.warn(`${prefix}loading namespace ${ns} for language ${lng} failed`, err);\n if (!err && data) this.logger.log(`${prefix}loaded namespace ${ns} for language ${lng}`, data);\n this.loaded(name, err, data);\n });\n }\n saveMissing(languages, namespace, key, fallbackValue, isUpdate, options = {}, clb = () => {}) {\n if (this.services?.utils?.hasLoadedNamespace && !this.services?.utils?.hasLoadedNamespace(namespace)) {\n this.logger.warn(`did not save key \"${key}\" as the namespace \"${namespace}\" was not yet loaded`, 'This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!');\n return;\n }\n if (key === undefined || key === null || key === '') return;\n if (this.backend?.create) {\n const opts = {\n ...options,\n isUpdate\n };\n const fc = this.backend.create.bind(this.backend);\n if (fc.length < 6) {\n try {\n let r;\n if (fc.length === 5) {\n r = fc(languages, namespace, key, fallbackValue, opts);\n } else {\n r = fc(languages, namespace, key, fallbackValue);\n }\n if (r && typeof r.then === 'function') {\n r.then(data => clb(null, data)).catch(clb);\n } else {\n clb(null, r);\n }\n } catch (err) {\n clb(err);\n }\n } else {\n fc(languages, namespace, key, fallbackValue, clb, opts);\n }\n }\n if (!languages || !languages[0]) return;\n this.store.addResource(languages[0], namespace, key, fallbackValue);\n }\n}\n\nconst get = () => ({\n debug: false,\n initAsync: true,\n ns: ['translation'],\n defaultNS: ['translation'],\n fallbackLng: ['dev'],\n fallbackNS: false,\n supportedLngs: false,\n nonExplicitSupportedLngs: false,\n load: 'all',\n preload: false,\n simplifyPluralSuffix: true,\n keySeparator: '.',\n nsSeparator: ':',\n pluralSeparator: '_',\n contextSeparator: '_',\n partialBundledLanguages: false,\n saveMissing: false,\n updateMissing: false,\n saveMissingTo: 'fallback',\n saveMissingPlurals: true,\n missingKeyHandler: false,\n missingInterpolationHandler: false,\n postProcess: false,\n postProcessPassResolved: false,\n returnNull: false,\n returnEmptyString: true,\n returnObjects: false,\n joinArrays: false,\n returnedObjectHandler: false,\n parseMissingKeyHandler: false,\n appendNamespaceToMissingKey: false,\n appendNamespaceToCIMode: false,\n overloadTranslationOptionHandler: args => {\n let ret = {};\n if (typeof args[1] === 'object') ret = args[1];\n if (isString(args[1])) ret.defaultValue = args[1];\n if (isString(args[2])) ret.tDescription = args[2];\n if (typeof args[2] === 'object' || typeof args[3] === 'object') {\n const options = args[3] || args[2];\n Object.keys(options).forEach(key => {\n ret[key] = options[key];\n });\n }\n return ret;\n },\n interpolation: {\n escapeValue: true,\n format: value => value,\n prefix: '{{',\n suffix: '}}',\n formatSeparator: ',',\n unescapePrefix: '-',\n nestingPrefix: '$t(',\n nestingSuffix: ')',\n nestingOptionsSeparator: ',',\n maxReplaces: 1000,\n skipOnVariables: true\n },\n cacheInBuiltFormats: true\n});\nconst transformOptions = options => {\n if (isString(options.ns)) options.ns = [options.ns];\n if (isString(options.fallbackLng)) options.fallbackLng = [options.fallbackLng];\n if (isString(options.fallbackNS)) options.fallbackNS = [options.fallbackNS];\n if (options.supportedLngs?.indexOf?.('cimode') < 0) {\n options.supportedLngs = options.supportedLngs.concat(['cimode']);\n }\n if (typeof options.initImmediate === 'boolean') options.initAsync = options.initImmediate;\n return options;\n};\n\nconst noop = () => {};\nconst bindMemberFunctions = inst => {\n const mems = Object.getOwnPropertyNames(Object.getPrototypeOf(inst));\n mems.forEach(mem => {\n if (typeof inst[mem] === 'function') {\n inst[mem] = inst[mem].bind(inst);\n }\n });\n};\nclass I18n extends EventEmitter {\n constructor(options = {}, callback) {\n super();\n this.options = transformOptions(options);\n this.services = {};\n this.logger = baseLogger;\n this.modules = {\n external: []\n };\n bindMemberFunctions(this);\n if (callback && !this.isInitialized && !options.isClone) {\n if (!this.options.initAsync) {\n this.init(options, callback);\n return this;\n }\n setTimeout(() => {\n this.init(options, callback);\n }, 0);\n }\n }\n init(options = {}, callback) {\n this.isInitializing = true;\n if (typeof options === 'function') {\n callback = options;\n options = {};\n }\n if (options.defaultNS == null && options.ns) {\n if (isString(options.ns)) {\n options.defaultNS = options.ns;\n } else if (options.ns.indexOf('translation') < 0) {\n options.defaultNS = options.ns[0];\n }\n }\n const defOpts = get();\n this.options = {\n ...defOpts,\n ...this.options,\n ...transformOptions(options)\n };\n this.options.interpolation = {\n ...defOpts.interpolation,\n ...this.options.interpolation\n };\n if (options.keySeparator !== undefined) {\n this.options.userDefinedKeySeparator = options.keySeparator;\n }\n if (options.nsSeparator !== undefined) {\n this.options.userDefinedNsSeparator = options.nsSeparator;\n }\n if (typeof this.options.overloadTranslationOptionHandler !== 'function') {\n this.options.overloadTranslationOptionHandler = defOpts.overloadTranslationOptionHandler;\n }\n const createClassOnDemand = ClassOrObject => {\n if (!ClassOrObject) return null;\n if (typeof ClassOrObject === 'function') return new ClassOrObject();\n return ClassOrObject;\n };\n if (!this.options.isClone) {\n if (this.modules.logger) {\n baseLogger.init(createClassOnDemand(this.modules.logger), this.options);\n } else {\n baseLogger.init(null, this.options);\n }\n let formatter;\n if (this.modules.formatter) {\n formatter = this.modules.formatter;\n } else {\n formatter = Formatter;\n }\n const lu = new LanguageUtil(this.options);\n this.store = new ResourceStore(this.options.resources, this.options);\n const s = this.services;\n s.logger = baseLogger;\n s.resourceStore = this.store;\n s.languageUtils = lu;\n s.pluralResolver = new PluralResolver(lu, {\n prepend: this.options.pluralSeparator,\n simplifyPluralSuffix: this.options.simplifyPluralSuffix\n });\n const usingLegacyFormatFunction = this.options.interpolation.format && this.options.interpolation.format !== defOpts.interpolation.format;\n if (usingLegacyFormatFunction) {\n this.logger.deprecate(`init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting`);\n }\n if (formatter && (!this.options.interpolation.format || this.options.interpolation.format === defOpts.interpolation.format)) {\n s.formatter = createClassOnDemand(formatter);\n if (s.formatter.init) s.formatter.init(s, this.options);\n this.options.interpolation.format = s.formatter.format.bind(s.formatter);\n }\n s.interpolator = new Interpolator(this.options);\n s.utils = {\n hasLoadedNamespace: this.hasLoadedNamespace.bind(this)\n };\n s.backendConnector = new Connector(createClassOnDemand(this.modules.backend), s.resourceStore, s, this.options);\n s.backendConnector.on('*', (event, ...args) => {\n this.emit(event, ...args);\n });\n if (this.modules.languageDetector) {\n s.languageDetector = createClassOnDemand(this.modules.languageDetector);\n if (s.languageDetector.init) s.languageDetector.init(s, this.options.detection, this.options);\n }\n if (this.modules.i18nFormat) {\n s.i18nFormat = createClassOnDemand(this.modules.i18nFormat);\n if (s.i18nFormat.init) s.i18nFormat.init(this);\n }\n this.translator = new Translator(this.services, this.options);\n this.translator.on('*', (event, ...args) => {\n this.emit(event, ...args);\n });\n this.modules.external.forEach(m => {\n if (m.init) m.init(this);\n });\n }\n this.format = this.options.interpolation.format;\n if (!callback) callback = noop;\n if (this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {\n const codes = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);\n if (codes.length > 0 && codes[0] !== 'dev') this.options.lng = codes[0];\n }\n if (!this.services.languageDetector && !this.options.lng) {\n this.logger.warn('init: no languageDetector is used and no lng is defined');\n }\n const storeApi = ['getResource', 'hasResourceBundle', 'getResourceBundle', 'getDataByLanguage'];\n storeApi.forEach(fcName => {\n this[fcName] = (...args) => this.store[fcName](...args);\n });\n const storeApiChained = ['addResource', 'addResources', 'addResourceBundle', 'removeResourceBundle'];\n storeApiChained.forEach(fcName => {\n this[fcName] = (...args) => {\n this.store[fcName](...args);\n return this;\n };\n });\n const deferred = defer();\n const load = () => {\n const finish = (err, t) => {\n this.isInitializing = false;\n if (this.isInitialized && !this.initializedStoreOnce) this.logger.warn('init: i18next is already initialized. You should call init just once!');\n this.isInitialized = true;\n if (!this.options.isClone) this.logger.log('initialized', this.options);\n this.emit('initialized', this.options);\n deferred.resolve(t);\n callback(err, t);\n };\n if (this.languages && !this.isInitialized) return finish(null, this.t.bind(this));\n this.changeLanguage(this.options.lng, finish);\n };\n if (this.options.resources || !this.options.initAsync) {\n load();\n } else {\n setTimeout(load, 0);\n }\n return deferred;\n }\n loadResources(language, callback = noop) {\n let usedCallback = callback;\n const usedLng = isString(language) ? language : this.language;\n if (typeof language === 'function') usedCallback = language;\n if (!this.options.resources || this.options.partialBundledLanguages) {\n if (usedLng?.toLowerCase() === 'cimode' && (!this.options.preload || this.options.preload.length === 0)) return usedCallback();\n const toLoad = [];\n const append = lng => {\n if (!lng) return;\n if (lng === 'cimode') return;\n const lngs = this.services.languageUtils.toResolveHierarchy(lng);\n lngs.forEach(l => {\n if (l === 'cimode') return;\n if (toLoad.indexOf(l) < 0) toLoad.push(l);\n });\n };\n if (!usedLng) {\n const fallbacks = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);\n fallbacks.forEach(l => append(l));\n } else {\n append(usedLng);\n }\n this.options.preload?.forEach?.(l => append(l));\n this.services.backendConnector.load(toLoad, this.options.ns, e => {\n if (!e && !this.resolvedLanguage && this.language) this.setResolvedLanguage(this.language);\n usedCallback(e);\n });\n } else {\n usedCallback(null);\n }\n }\n reloadResources(lngs, ns, callback) {\n const deferred = defer();\n if (typeof lngs === 'function') {\n callback = lngs;\n lngs = undefined;\n }\n if (typeof ns === 'function') {\n callback = ns;\n ns = undefined;\n }\n if (!lngs) lngs = this.languages;\n if (!ns) ns = this.options.ns;\n if (!callback) callback = noop;\n this.services.backendConnector.reload(lngs, ns, err => {\n deferred.resolve();\n callback(err);\n });\n return deferred;\n }\n use(module) {\n if (!module) throw new Error('You are passing an undefined module! Please check the object you are passing to i18next.use()');\n if (!module.type) throw new Error('You are passing a wrong module! Please check the object you are passing to i18next.use()');\n if (module.type === 'backend') {\n this.modules.backend = module;\n }\n if (module.type === 'logger' || module.log && module.warn && module.error) {\n this.modules.logger = module;\n }\n if (module.type === 'languageDetector') {\n this.modules.languageDetector = module;\n }\n if (module.type === 'i18nFormat') {\n this.modules.i18nFormat = module;\n }\n if (module.type === 'postProcessor') {\n postProcessor.addPostProcessor(module);\n }\n if (module.type === 'formatter') {\n this.modules.formatter = module;\n }\n if (module.type === '3rdParty') {\n this.modules.external.push(module);\n }\n return this;\n }\n setResolvedLanguage(l) {\n if (!l || !this.languages) return;\n if (['cimode', 'dev'].indexOf(l) > -1) return;\n for (let li = 0; li < this.languages.length; li++) {\n const lngInLngs = this.languages[li];\n if (['cimode', 'dev'].indexOf(lngInLngs) > -1) continue;\n if (this.store.hasLanguageSomeTranslations(lngInLngs)) {\n this.resolvedLanguage = lngInLngs;\n break;\n }\n }\n if (!this.resolvedLanguage && this.languages.indexOf(l) < 0 && this.store.hasLanguageSomeTranslations(l)) {\n this.resolvedLanguage = l;\n this.languages.unshift(l);\n }\n }\n changeLanguage(lng, callback) {\n this.isLanguageChangingTo = lng;\n const deferred = defer();\n this.emit('languageChanging', lng);\n const setLngProps = l => {\n this.language = l;\n this.languages = this.services.languageUtils.toResolveHierarchy(l);\n this.resolvedLanguage = undefined;\n this.setResolvedLanguage(l);\n };\n const done = (err, l) => {\n if (l) {\n if (this.isLanguageChangingTo === lng) {\n setLngProps(l);\n this.translator.changeLanguage(l);\n this.isLanguageChangingTo = undefined;\n this.emit('languageChanged', l);\n this.logger.log('languageChanged', l);\n }\n } else {\n this.isLanguageChangingTo = undefined;\n }\n deferred.resolve((...args) => this.t(...args));\n if (callback) callback(err, (...args) => this.t(...args));\n };\n const setLng = lngs => {\n if (!lng && !lngs && this.services.languageDetector) lngs = [];\n const fl = isString(lngs) ? lngs : lngs && lngs[0];\n const l = this.store.hasLanguageSomeTranslations(fl) ? fl : this.services.languageUtils.getBestMatchFromCodes(isString(lngs) ? [lngs] : lngs);\n if (l) {\n if (!this.language) {\n setLngProps(l);\n }\n if (!this.translator.language) this.translator.changeLanguage(l);\n this.services.languageDetector?.cacheUserLanguage?.(l);\n }\n this.loadResources(l, err => {\n done(err, l);\n });\n };\n if (!lng && this.services.languageDetector && !this.services.languageDetector.async) {\n setLng(this.services.languageDetector.detect());\n } else if (!lng && this.services.languageDetector && this.services.languageDetector.async) {\n if (this.services.languageDetector.detect.length === 0) {\n this.services.languageDetector.detect().then(setLng);\n } else {\n this.services.languageDetector.detect(setLng);\n }\n } else {\n setLng(lng);\n }\n return deferred;\n }\n getFixedT(lng, ns, keyPrefix) {\n const fixedT = (key, opts, ...rest) => {\n let o;\n if (typeof opts !== 'object') {\n o = this.options.overloadTranslationOptionHandler([key, opts].concat(rest));\n } else {\n o = {\n ...opts\n };\n }\n o.lng = o.lng || fixedT.lng;\n o.lngs = o.lngs || fixedT.lngs;\n o.ns = o.ns || fixedT.ns;\n if (o.keyPrefix !== '') o.keyPrefix = o.keyPrefix || keyPrefix || fixedT.keyPrefix;\n const keySeparator = this.options.keySeparator || '.';\n let resultKey;\n if (o.keyPrefix && Array.isArray(key)) {\n resultKey = key.map(k => {\n if (typeof k === 'function') k = keysFromSelector(k, {\n ...this.options,\n ...opts\n });\n return `${o.keyPrefix}${keySeparator}${k}`;\n });\n } else {\n if (typeof key === 'function') key = keysFromSelector(key, {\n ...this.options,\n ...opts\n });\n resultKey = o.keyPrefix ? `${o.keyPrefix}${keySeparator}${key}` : key;\n }\n return this.t(resultKey, o);\n };\n if (isString(lng)) {\n fixedT.lng = lng;\n } else {\n fixedT.lngs = lng;\n }\n fixedT.ns = ns;\n fixedT.keyPrefix = keyPrefix;\n return fixedT;\n }\n t(...args) {\n return this.translator?.translate(...args);\n }\n exists(...args) {\n return this.translator?.exists(...args);\n }\n setDefaultNamespace(ns) {\n this.options.defaultNS = ns;\n }\n hasLoadedNamespace(ns, options = {}) {\n if (!this.isInitialized) {\n this.logger.warn('hasLoadedNamespace: i18next was not initialized', this.languages);\n return false;\n }\n if (!this.languages || !this.languages.length) {\n this.logger.warn('hasLoadedNamespace: i18n.languages were undefined or empty', this.languages);\n return false;\n }\n const lng = options.lng || this.resolvedLanguage || this.languages[0];\n const fallbackLng = this.options ? this.options.fallbackLng : false;\n const lastLng = this.languages[this.languages.length - 1];\n if (lng.toLowerCase() === 'cimode') return true;\n const loadNotPending = (l, n) => {\n const loadState = this.services.backendConnector.state[`${l}|${n}`];\n return loadState === -1 || loadState === 0 || loadState === 2;\n };\n if (options.precheck) {\n const preResult = options.precheck(this, loadNotPending);\n if (preResult !== undefined) return preResult;\n }\n if (this.hasResourceBundle(lng, ns)) return true;\n if (!this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages) return true;\n if (loadNotPending(lng, ns) && (!fallbackLng || loadNotPending(lastLng, ns))) return true;\n return false;\n }\n loadNamespaces(ns, callback) {\n const deferred = defer();\n if (!this.options.ns) {\n if (callback) callback();\n return Promise.resolve();\n }\n if (isString(ns)) ns = [ns];\n ns.forEach(n => {\n if (this.options.ns.indexOf(n) < 0) this.options.ns.push(n);\n });\n this.loadResources(err => {\n deferred.resolve();\n if (callback) callback(err);\n });\n return deferred;\n }\n loadLanguages(lngs, callback) {\n const deferred = defer();\n if (isString(lngs)) lngs = [lngs];\n const preloaded = this.options.preload || [];\n const newLngs = lngs.filter(lng => preloaded.indexOf(lng) < 0 && this.services.languageUtils.isSupportedCode(lng));\n if (!newLngs.length) {\n if (callback) callback();\n return Promise.resolve();\n }\n this.options.preload = preloaded.concat(newLngs);\n this.loadResources(err => {\n deferred.resolve();\n if (callback) callback(err);\n });\n return deferred;\n }\n dir(lng) {\n if (!lng) lng = this.resolvedLanguage || (this.languages?.length > 0 ? this.languages[0] : this.language);\n if (!lng) return 'rtl';\n try {\n const l = new Intl.Locale(lng);\n if (l && l.getTextInfo) {\n const ti = l.getTextInfo();\n if (ti && ti.direction) return ti.direction;\n }\n } catch (e) {}\n const rtlLngs = ['ar', 'shu', 'sqr', 'ssh', 'xaa', 'yhd', 'yud', 'aao', 'abh', 'abv', 'acm', 'acq', 'acw', 'acx', 'acy', 'adf', 'ads', 'aeb', 'aec', 'afb', 'ajp', 'apc', 'apd', 'arb', 'arq', 'ars', 'ary', 'arz', 'auz', 'avl', 'ayh', 'ayl', 'ayn', 'ayp', 'bbz', 'pga', 'he', 'iw', 'ps', 'pbt', 'pbu', 'pst', 'prp', 'prd', 'ug', 'ur', 'ydd', 'yds', 'yih', 'ji', 'yi', 'hbo', 'men', 'xmn', 'fa', 'jpr', 'peo', 'pes', 'prs', 'dv', 'sam', 'ckb'];\n const languageUtils = this.services?.languageUtils || new LanguageUtil(get());\n if (lng.toLowerCase().indexOf('-latn') > 1) return 'ltr';\n return rtlLngs.indexOf(languageUtils.getLanguagePartFromCode(lng)) > -1 || lng.toLowerCase().indexOf('-arab') > 1 ? 'rtl' : 'ltr';\n }\n static createInstance(options = {}, callback) {\n const instance = new I18n(options, callback);\n instance.createInstance = I18n.createInstance;\n return instance;\n }\n cloneInstance(options = {}, callback = noop) {\n const forkResourceStore = options.forkResourceStore;\n if (forkResourceStore) delete options.forkResourceStore;\n const mergedOptions = {\n ...this.options,\n ...options,\n ...{\n isClone: true\n }\n };\n const clone = new I18n(mergedOptions);\n if (options.debug !== undefined || options.prefix !== undefined) {\n clone.logger = clone.logger.clone(options);\n }\n const membersToCopy = ['store', 'services', 'language'];\n membersToCopy.forEach(m => {\n clone[m] = this[m];\n });\n clone.services = {\n ...this.services\n };\n clone.services.utils = {\n hasLoadedNamespace: clone.hasLoadedNamespace.bind(clone)\n };\n if (forkResourceStore) {\n const clonedData = Object.keys(this.store.data).reduce((prev, l) => {\n prev[l] = {\n ...this.store.data[l]\n };\n prev[l] = Object.keys(prev[l]).reduce((acc, n) => {\n acc[n] = {\n ...prev[l][n]\n };\n return acc;\n }, prev[l]);\n return prev;\n }, {});\n clone.store = new ResourceStore(clonedData, mergedOptions);\n clone.services.resourceStore = clone.store;\n }\n if (options.interpolation) {\n const defOpts = get();\n const mergedInterpolation = {\n ...defOpts.interpolation,\n ...this.options.interpolation,\n ...options.interpolation\n };\n const mergedForInterpolator = {\n ...mergedOptions,\n interpolation: mergedInterpolation\n };\n clone.services.interpolator = new Interpolator(mergedForInterpolator);\n }\n clone.translator = new Translator(clone.services, mergedOptions);\n clone.translator.on('*', (event, ...args) => {\n clone.emit(event, ...args);\n });\n clone.init(mergedOptions, callback);\n clone.translator.options = mergedOptions;\n clone.translator.backendConnector.services.utils = {\n hasLoadedNamespace: clone.hasLoadedNamespace.bind(clone)\n };\n return clone;\n }\n toJSON() {\n return {\n options: this.options,\n store: this.store,\n language: this.language,\n languages: this.languages,\n resolvedLanguage: this.resolvedLanguage\n };\n }\n}\nconst instance = I18n.createInstance();\n\nconst createInstance = instance.createInstance;\nconst dir = instance.dir;\nconst init = instance.init;\nconst loadResources = instance.loadResources;\nconst reloadResources = instance.reloadResources;\nconst use = instance.use;\nconst changeLanguage = instance.changeLanguage;\nconst getFixedT = instance.getFixedT;\nconst t = instance.t;\nconst exists = instance.exists;\nconst setDefaultNamespace = instance.setDefaultNamespace;\nconst hasLoadedNamespace = instance.hasLoadedNamespace;\nconst loadNamespaces = instance.loadNamespaces;\nconst loadLanguages = instance.loadLanguages;\n\nexport { changeLanguage, createInstance, instance as default, dir, exists, getFixedT, hasLoadedNamespace, init, keysFromSelector as keyFromSelector, loadLanguages, loadNamespaces, loadResources, reloadResources, setDefaultNamespace, t, use };\n","export default {\n AppExtension: {\n sequenceCountMustBeLessThanOrEqualTo: \"Sequence count {{sequenceCount, number}} must be less than or equal to {{maximumSequenceCount, number}}\"\n },\n Proxy: {\n matrixMustBeArray: \"Input matrix must be one-dimensional\"\n },\n IdentifierCreatorProxy: {\n prefixDefinitionMustBeOneDimensional: \"Prefix definition must be a one-dimensional matrix\",\n prefixDefinitionMustHaveMaximumThreeElements: \"Prefix definition must have a maximum of 3 elements\",\n prefixMustBeString: \"Prefix must be a string\",\n prefixTypeMustBeNumber: \"Prefix type must be a number in the range of 0 to {{maximumPrefixType, number}}\",\n invalidPrefixType: \"Invalid prefix type\",\n tweakFactorMustBeNumber: \"Tweak factor must be a number\"\n },\n ServiceProxy: {\n invalidIdentifierType: \"Invalid identifier type \\\"{{identifierType}}\\\"\"\n },\n Parameters: {\n spillMatrix: {\n name: \"matrix\",\n description: \"One-dimensional matrix to spill.\"\n },\n spillMaximumWidth: {\n name: \"maximumWidth\",\n description: \"Maximum width into which to spill the matrix. If not provided, the remaining sheet width is used.\"\n },\n spillMaximumHeight: {\n name: \"maximumHeight\",\n description: \"Maximum height into which to spill the matrix. If not provided, the remaining sheet height is used.\"\n },\n domain: {\n name: \"domain\",\n description: \"Transformation domain. Valid input values are from zero to domain-1.\"\n },\n value: {\n name: \"value\",\n description: \"Value to transform.\"\n },\n startValue: {\n name: \"startValue\",\n description: \"Start value of a domain of values to transform.\"\n },\n count: {\n name: \"count\",\n description: \"Count of values to transform. If positive, values transformed are startValue to startValue+count-1. If negative, values transformed are startValue down to startValue+count+1.\"\n },\n transformedValue: {\n name: \"transformedValue\",\n description: \"Previous output value of a transformation.\"\n },\n tweak: {\n name: \"tweak\",\n description: \"Value by which to tweak the transformation. If not provided or zero, the output is sequential. Otherwise, the output is encrypted in such a way as to appear random, masking the values used as inputs to the sequence.\"\n },\n regExp: {\n name: \"regExp\",\n description: \"Regular expression against which to validate a string.\"\n },\n validateS: {\n name: \"s\",\n description: \"String to validate.\"\n },\n valueForS: {\n name: \"s\",\n description: \"String for which to determine the value.\"\n },\n errorMessage: {\n name: \"errorMessage\",\n description: \"Custom error message to use if validation fails. If not provided, an internal error message is used.\"\n },\n exclusionNone: {\n name: \"exclusion\",\n description: \"String values to exclude. The only valid value is 0 (no exclusions).\"\n },\n exclusionFirstZero: {\n name: \"exclusion\",\n description: \"String values to exclude. Valid values are 0 (no exclusions) and 1 (strings starting with 0 excluded).\"\n },\n exclusionAllNumeric: {\n name: \"exclusion\",\n description: \"String values to exclude. Valid values are 0 (no exclusions) and 2 (strings that are all numeric excluded).\"\n },\n exclusionAny: {\n name: \"exclusion\",\n description: \"String values to exclude. Valid values are 0 (no exclusions), 1 (strings starting with 0 excluded), and 2 (strings that are all numeric excluded).\"\n },\n length: {\n name: \"length\",\n description: \"Length of string to create.\"\n },\n numericS: {\n name: \"s\",\n description: \"Numeric string.\"\n },\n numericSFourOrFiveDigits: {\n name: \"s\",\n description: \"Four- or five-digit numeric string.\"\n },\n numericSWithCheckDigit: {\n name: \"s\",\n description: \"Numeric string with check digit.\"\n },\n checkDigit: {\n name: \"checkDigit\",\n description: \"Check digit.\"\n },\n ai82S: {\n name: \"s\",\n description: \"GS1 AI encodable character set 82 string.\"\n },\n ai82SWithCheckCharacterPair: {\n name: \"s\",\n description: \"GS1 AI encodable character set 82 string with check character pair.\"\n },\n validateIdentifier: {\n name: \"identifier\",\n description: \"Identifier to validate.\"\n },\n splitIdentifier: {\n name: \"splitIdentifier\",\n description: \"Identifier to split.\"\n },\n zeroSuppressibleGTIN12: {\n name: \"gtin12\",\n description: \"GTIN-12 for which to suppress zeros.\"\n },\n zeroSuppressedGTIN12: {\n name: \"zeroSuppressedGTIN12\",\n description: \"Zero-suppressed GTIN-12 to expand.\"\n },\n convertGTIN: {\n name: \"gtin\",\n description: \"GTIN to convert to GTIN-14.\"\n },\n normalizeGTIN: {\n name: \"gtin\",\n description: \"GTIN to normalize.\"\n },\n validateGTIN: {\n name: \"gtin\",\n description: \"GTIN to validate.\"\n },\n validateGTIN14: {\n name: \"gtin14\",\n description: \"GTIN-14 to validate.\"\n },\n gcpLengthIdentifier: {\n name: \"identifier\",\n description: \"Identifier for which to get the GS1 Company Prefix length.\"\n },\n baseIdentifier: {\n name: \"baseIdentifier\",\n description: \"Base identifier.\"\n },\n hyperlinkIdentifier: {\n name: \"identifier\",\n description: \"Identifier for which to create hyperlink.\"\n },\n indicatorDigit: {\n name: \"indicatorDigit\",\n description: \"Indicator digit.\"\n },\n gtinLevel: {\n name: \"level\",\n description: \"Level at which to validate the GTIN. Valid values are 0 (any), 1 (retail consumer trade item), and 2 (other than retail consumer trade item level).\"\n },\n prefix: {\n name: \"prefix\",\n description: \"Prefix.\"\n },\n prefixType: {\n name: \"prefixType\",\n description: \"Prefix type. Valid values are 0 (GS1 Company Prefix), 1 (U.P.C. Company Prefix), and 2 (GS1 Prefix).\"\n },\n tweakFactor: {\n name: \"tweakFactor\",\n description: \"Tweak factor, used to support the creation of sparse identifiers. The default tweak factor is based on the GS1 Company Prefix, and is usually sufficient for obfuscation. This allows more control over the encryption when higher security is required.\"\n },\n identifierType: {\n name: \"identifierType\",\n description: \"Identifier type (GTIN, GLN, SSCC, ...).\"\n },\n prefixDefinitionAny: {\n name: \"prefixDefinition\",\n description: \"Prefix definition, either a simple GS1 Company Prefix (as a string) or the result of a call to definePrefix. Any prefix type is supported.\"\n },\n prefixDefinitionGS1UPC: {\n name: \"prefixDefinition\",\n description: \"Prefix definition, either a simple GS1 Company Prefix (as a string) or the result of a call to definePrefix. Only prefix types 0 (GS1 Company Prefix) and 1 (U.P.C. Company Prefix) are supported.\"\n },\n sparse: {\n name: \"sparse\",\n description: \"If true, value is mapped to a sparse sequence resistant to discovery. Default is false.\"\n },\n serialComponent: {\n name: \"serialComponent\",\n description: \"Serial component.\"\n },\n reference: {\n name: \"reference\",\n description: \"Reference portion of identifier.\"\n },\n rcnFormat: {\n name: \"format\",\n description: \"Restricted Circulation Number format.\"\n },\n rcn: {\n name: \"rcn\",\n description: \"Restricted Circulation Number to parse.\"\n },\n rcnItemReference: {\n name: \"itemReference\",\n description: \"Item reference.\"\n },\n rcnPriceOrWeight: {\n name: \"priceOrWeight\",\n description: \"Price or weight (whole number only).\"\n },\n hyperlinkText: {\n name: \"text\",\n description: \"Text for hyperlink. If not provided, the identifier is used.\"\n },\n hyperlinkDetails: {\n name: \"details\",\n description: \"Details to display when hovering over hyperlink.\"\n }\n },\n Functions: {\n version: {\n name: \"version\",\n description: \"Get the version of the AIDC Toolkit.\"\n },\n spill: {\n name: \"spill\",\n description: \"Spill a one-dimensional matrix to fit a rectangle within a given maximum height and width.\"\n },\n forwardTransform: {\n name: \"forwardTransform\",\n description: \"Transform a value forward.\"\n },\n forwardTransformSequence: {\n name: \"forwardTransformSequence\",\n description: \"Transform a sequence of values forward.\"\n },\n reverseTransform: {\n name: \"reverseTransform\",\n description: \"Transform a value in reverse.\"\n },\n validateRegExp: {\n name: \"validateRegExp\",\n description: \"Validate a string against a regular expression.\"\n },\n isValidRegExp: {\n name: \"isValidRegExp\",\n description: \"Determine if a string is valid against a regular expression.\"\n },\n validateNumeric: {\n name: \"validateNumeric\",\n description: \"Validate a numeric string.\"\n },\n isValidNumeric: {\n name: \"isValidNumeric\",\n description: \"Determine if a string is numeric.\"\n },\n createNumeric: {\n name: \"createNumeric\",\n description: \"Create a numeric string.\"\n },\n createNumericSequence: {\n name: \"createNumericSequence\",\n description: \"Create a sequence of numeric strings.\"\n },\n valueForNumeric: {\n name: \"valueForNumeric\",\n description: \"Get the value for a numeric string.\"\n },\n validateHexadecimal: {\n name: \"validateHexadecimal\",\n description: \"Validate a hexadecimal string.\"\n },\n isValidHexadecimal: {\n name: \"isValidHexadecimal\",\n description: \"Determine if a string is hexadecimal.\"\n },\n createHexadecimal: {\n name: \"createHexadecimal\",\n description: \"Create a hexadecimal string.\"\n },\n createHexadecimalSequence: {\n name: \"createHexadecimalSequence\",\n description: \"Create a sequence of hexadecimal strings.\"\n },\n valueForHexadecimal: {\n name: \"valueForHexadecimal\",\n description: \"Get the value for a hexadecimal string.\"\n },\n validateAlphabetic: {\n name: \"validateAlphabetic\",\n description: \"Validate an alphabetic string.\"\n },\n isValidAlphabetic: {\n name: \"isValidAlphabetic\",\n description: \"Determine if a string is alphabetic.\"\n },\n createAlphabetic: {\n name: \"createAlphabetic\",\n description: \"Create an alphabetic string.\"\n },\n createAlphabeticSequence: {\n name: \"createAlphabeticSequence\",\n description: \"Create a sequence of alphabetic strings.\"\n },\n valueForAlphabetic: {\n name: \"valueForAlphabetic\",\n description: \"Get the value for an alphabetic string.\"\n },\n validateAlphanumeric: {\n name: \"validateAlphanumeric\",\n description: \"Validate an alphanumeric string.\"\n },\n isValidAlphanumeric: {\n name: \"isValidAlphanumeric\",\n description: \"Determine if a string is alphanumeric.\"\n },\n createAlphanumeric: {\n name: \"createAlphanumeric\",\n description: \"Create an alphanumeric string.\"\n },\n createAlphanumericSequence: {\n name: \"createAlphanumericSequence\",\n description: \"Create a sequence of alphanumeric strings.\"\n },\n valueForAlphanumeric: {\n name: \"valueForAlphanumeric\",\n description: \"Get the value for an alphanumeric string.\"\n },\n GS1: {\n validateAI82: {\n name: \"validateAI82\",\n description: \"Validate a GS1 AI 82 encodable character set string.\"\n },\n isValidAI82: {\n name: \"isValidAI82\",\n description: \"Determine if a string is GS1 AI 82 encodable character set.\"\n },\n createAI82: {\n name: \"createAI82\",\n description: \"Create a GS1 AI 82 encodable character set string.\"\n },\n createAI82Sequence: {\n name: \"createAI82Sequence\",\n description: \"Create a sequence of GS1 AI 82 encodable character set strings.\"\n },\n valueForAI82: {\n name: \"valueForAI82\",\n description: \"Get the value for a GS1 AI 82 encodable character set string.\"\n },\n validateAI39: {\n name: \"validateAI39\",\n description: \"Validate a GS1 AI 39 encodable character set string.\"\n },\n isValidAI39: {\n name: \"isValidAI39\",\n description: \"Determine if a string is GS1 AI 39 encodable character set.\"\n },\n createAI39: {\n name: \"createAI39\",\n description: \"Create a GS1 AI 39 encodable character set string.\"\n },\n createAI39Sequence: {\n name: \"createAI39Sequence\",\n description: \"Create a sequence of GS1 AI 39 encodable character set strings.\"\n },\n valueForAI39: {\n name: \"valueForAI39\",\n description: \"Get the value for a GS1 AI 39 encodable character set string.\"\n },\n validateAI64: {\n name: \"validateAI64\",\n description: \"Validate a GS1 AI 64 encodable character set string.\"\n },\n isValidAI64: {\n name: \"isValidAI64\",\n description: \"Determine if a string is GS1 AI 64 encodable character set.\"\n },\n checkDigit: {\n name: \"checkDigit\",\n description: \"Calculate the check digit for a numeric string.\"\n },\n hasValidCheckDigit: {\n name: \"hasValidCheckDigit\",\n description: \"Determine if a string has a valid check digit.\"\n },\n priceOrWeightCheckDigit: {\n name: \"priceOrWeightCheckDigit\",\n description: \"Calculate the check digit for a price or weight.\"\n },\n isValidPriceOrWeightCheckDigit: {\n name: \"isValidPriceOrWeightCheckDigit\",\n description: \"Determine if a price or weight check digit is valid.\"\n },\n checkCharacterPair: {\n name: \"checkCharacterPair\",\n description: \"Calculate the check character pair for a GS1 AI 82 encodable character set string.\"\n },\n hasValidCheckCharacterPair: {\n name: \"hasValidCheckCharacterPair\",\n description: \"Determine if a GS1 AI 82 encodable character set string has a valid check character pair.\"\n },\n validateGTIN13: {\n name: \"validateGTIN13\",\n description: \"Validate a GTIN-13.\"\n },\n isValidGTIN13: {\n name: \"isValidGTIN13\",\n description: \"Determine if a GTIN-13 is valid.\"\n },\n validateGTIN12: {\n name: \"validateGTIN12\",\n description: \"Validate a GTIN-12.\"\n },\n isValidGTIN12: {\n name: \"isValidGTIN12\",\n description: \"Determine if a GTIN-12 is valid.\"\n },\n validateGTIN8: {\n name: \"validateGTIN8\",\n description: \"Validate a GTIN-8.\"\n },\n isValidGTIN8: {\n name: \"isValidGTIN8\",\n description: \"Determine if a GTIN-8 is valid.\"\n },\n zeroSuppressGTIN12: {\n name: \"zeroSuppressGTIN12\",\n description: \"Zero-suppress a GTIN-12.\"\n },\n zeroExpandGTIN12: {\n name: \"zeroExpandGTIN12\",\n description: \"Expand a zero-suppressed GTIN-12.\"\n },\n convertToGTIN14: {\n name: \"convertToGTIN14\",\n description: \"Convert a GTIN to GTIN-14.\"\n },\n normalizeGTIN: {\n name: \"normalizeGTIN\",\n description: \"Normalize a GTIN.\"\n },\n validateGTIN: {\n name: \"validateGTIN\",\n description: \"Validate a GTIN of any length.\"\n },\n isValidGTIN: {\n name: \"isValidGTIN\",\n description: \"Determine if a GTIN of any length is valid.\"\n },\n validateGTIN14: {\n name: \"validateGTIN14\",\n description: \"Validate a GTIN-14.\"\n },\n isValidGTIN14: {\n name: \"isValidGTIN14\",\n description: \"Determine if a GTIN-14 is valid.\"\n },\n validateGLN: {\n name: \"validateGLN\",\n description: \"Validate a GLN.\"\n },\n isValidGLN: {\n name: \"isValidGLN\",\n description: \"Determine if a GLN is valid.\"\n },\n validateSSCC: {\n name: \"validateSSCC\",\n description: \"Validate an SSCC.\"\n },\n isValidSSCC: {\n name: \"isValidSSCC\",\n description: \"Determine if an SSCC is valid.\"\n },\n validateGRAI: {\n name: \"validateGRAI\",\n description: \"Validate a GRAI.\"\n },\n isValidGRAI: {\n name: \"isValidGRAI\",\n description: \"Determine if a GRAI is valid.\"\n },\n splitGRAI: {\n name: \"splitGRAI\",\n description: \"Split a GRAI into its base identifier and serial component.\"\n },\n validateGIAI: {\n name: \"validateGIAI\",\n description: \"Validate a GIAI.\"\n },\n isValidGIAI: {\n name: \"isValidGIAI\",\n description: \"Determine if a GIAI is valid.\"\n },\n validateGSRN: {\n name: \"validateGSRN\",\n description: \"Validate a GSRN.\"\n },\n isValidGSRN: {\n name: \"isValidGSRN\",\n description: \"Determine if a GSRN is valid.\"\n },\n validateGDTI: {\n name: \"validateGDTI\",\n description: \"Validate a GDTI.\"\n },\n isValidGDTI: {\n name: \"isValidGDTI\",\n description: \"Determine if a GDTI is valid.\"\n },\n splitGDTI: {\n name: \"splitGDTI\",\n description: \"Split a GDTI into its base identifier and serial component.\"\n },\n validateGINC: {\n name: \"validateGINC\",\n description: \"Validate a GINC.\"\n },\n isValidGINC: {\n name: \"isValidGINC\",\n description: \"Determine if a GINC is valid.\"\n },\n validateGSIN: {\n name: \"validateGSIN\",\n description: \"Validate a GSIN.\"\n },\n isValidGSIN: {\n name: \"isValidGSIN\",\n description: \"Determine if a GSIN is valid.\"\n },\n validateGCN: {\n name: \"validateGCN\",\n description: \"Validate a GCN.\"\n },\n isValidGCN: {\n name: \"isValidGCN\",\n description: \"Determine if a GCN is valid.\"\n },\n splitGCN: {\n name: \"splitGCN\",\n description: \"Split a GCN into its base identifier and serial component.\"\n },\n validateCPID: {\n name: \"validateCPID\",\n description: \"Validate a CPID.\"\n },\n isValidCPID: {\n name: \"isValidCPID\",\n description: \"Determine if a CPID is valid.\"\n },\n validateGMN: {\n name: \"validateGMN\",\n description: \"Validate a GMN.\"\n },\n isValidGMN: {\n name: \"isValidGMN\",\n description: \"Determine if a GMN is valid.\"\n },\n definePrefix: {\n name: \"definePrefix\",\n description: \"Define a prefix for use in GS1 identifier creation functions.\"\n },\n gcpLength: {\n name: \"gcpLength\",\n description: \"Get the length of a GS1 Company Prefix for an identifier.\"\n },\n gcpLengthDateTime: {\n name: \"gcpLengthDateTime\",\n description: \"Get the date and time the GS1 Company Prefix length data was last updated.\"\n },\n gcpLengthDisclaimer: {\n name: \"gcpLengthDisclaimer\",\n description: \"Get the disclaimer for the GS1 Company Prefix length data.\"\n },\n createGTIN: {\n name: \"createGTIN\",\n description: \"Create a GTIN.\"\n },\n createGTINSequence: {\n name: \"createGTINSequence\",\n description: \"Create a sequence of GTINs.\"\n },\n createAllGTIN: {\n name: \"createAllGTIN\",\n description: \"Create all GTINs for a prefix.\"\n },\n createGTIN14: {\n name: \"createGTIN14\",\n description: \"Create a GTIN-14.\"\n },\n createGLN: {\n name: \"createGLN\",\n description: \"Create a GLN.\"\n },\n createGLNSequence: {\n name: \"createGLNSequence\",\n description: \"Create a sequence of GLNs.\"\n },\n createAllGLN: {\n name: \"createAllGLN\",\n description: \"Create all GLNs for a prefix.\"\n },\n createSSCC: {\n name: \"createSSCC\",\n description: \"Create an SSCC.\"\n },\n createSSCCSequence: {\n name: \"createSSCCSequence\",\n description: \"Create a sequence of SSCCs.\"\n },\n createAllSSCC: {\n name: \"createAllSSCC\",\n description: \"Create all SSCCs for a prefix.\"\n },\n createGRAI: {\n name: \"createGRAI\",\n description: \"Create a GRAI.\"\n },\n createGRAISequence: {\n name: \"createGRAISequence\",\n description: \"Create a sequence of GRAIs.\"\n },\n createAllGRAI: {\n name: \"createAllGRAI\",\n description: \"Create all GRAIs for a prefix.\"\n },\n createSerializedGRAI: {\n name: \"createSerializedGRAI\",\n description: \"Create a serialized GRAI.\"\n },\n concatenateGRAI: {\n name: \"concatenateGRAI\",\n description: \"Concatenate a base GRAI with a serial component.\"\n },\n createGIAI: {\n name: \"createGIAI\",\n description: \"Create a GIAI.\"\n },\n createGSRN: {\n name: \"createGSRN\",\n description: \"Create a GSRN.\"\n },\n createGSRNSequence: {\n name: \"createGSRNSequence\",\n description: \"Create a sequence of GSRNs.\"\n },\n createAllGSRN: {\n name: \"createAllGSRN\",\n description: \"Create all GSRNs for a prefix.\"\n },\n createGDTI: {\n name: \"createGDTI\",\n description: \"Create a GDTI.\"\n },\n createGDTISequence: {\n name: \"createGDTISequence\",\n description: \"Create a sequence of GDTIs.\"\n },\n createAllGDTI: {\n name: \"createAllGDTI\",\n description: \"Create all GDTIs for a prefix.\"\n },\n createSerializedGDTI: {\n name: \"createSerializedGDTI\",\n description: \"Create a serialized GDTI.\"\n },\n concatenateGDTI: {\n name: \"concatenateGDTI\",\n description: \"Concatenate a base GDTI with a serial component.\"\n },\n createGINC: {\n name: \"createGINC\",\n description: \"Create a GINC.\"\n },\n createGSIN: {\n name: \"createGSIN\",\n description: \"Create a GSIN.\"\n },\n createGSINSequence: {\n name: \"createGSINSequence\",\n description: \"Create a sequence of GSINs.\"\n },\n createAllGSIN: {\n name: \"createAllGSIN\",\n description: \"Create all GSINs for a prefix.\"\n },\n createGCN: {\n name: \"createGCN\",\n description: \"Create a GCN.\"\n },\n createGCNSequence: {\n name: \"createGCNSequence\",\n description: \"Create a sequence of GCNs.\"\n },\n createAllGCN: {\n name: \"createAllGCN\",\n description: \"Create all GCNs for a prefix.\"\n },\n createSerializedGCN: {\n name: \"createSerializedGCN\",\n description: \"Create a serialized GCN.\"\n },\n concatenateGCN: {\n name: \"concatenateGCN\",\n description: \"Concatenate a base GCN with a serial component.\"\n },\n createCPID: {\n name: \"createCPID\",\n description: \"Create a CPID.\"\n },\n createGMN: {\n name: \"createGMN\",\n description: \"Create a GMN.\"\n },\n parseVariableMeasureRCN: {\n name: \"parseVariableMeasureRCN\",\n description: \"Parse a Restricted Circulation Number (RCN) using a variable measure trade item format.\"\n },\n createVariableMeasureRCN: {\n name: \"createVariableMeasureRCN\",\n description: \"Create a variable measure Restricted Circulation Number (RCN).\"\n },\n verifiedByGS1: {\n name: \"verifiedByGS1\",\n description: \"Create a Verified by GS1 hyperlink.\"\n }\n }\n }\n};\n","export default {\n AppExtension: {\n sequenceCountMustBeLessThanOrEqualTo: \"Le nombre de séquences {{sequenceCount, number}} doit être inférieur ou égal à {{maximumSequenceCount, number}}\"\n },\n Proxy: {\n matrixMustBeArray: \"La matrice d'entrée doit être unidimensionnelle\"\n },\n IdentifierCreatorProxy: {\n prefixDefinitionMustBeOneDimensional: \"La définition du préfixe doit être une matrice unidimensionnelle\",\n prefixDefinitionMustHaveMaximumThreeElements: \"La définition du préfixe doit comporter un maximum de 3 éléments\",\n prefixMustBeString: \"Le préfixe doit être une chaîne\",\n prefixTypeMustBeNumber: \"Le type de préfixe doit être un nombre compris entre 0 et {{maximumPrefixType, number}}\",\n invalidPrefixType: \"Type de préfixe invalide\",\n tweakFactorMustBeNumber: \"Le facteur de réglage doit être un nombre\"\n },\n ServiceProxy: {\n invalidIdentifierType: \"Type d'identifiant invalide «{{identifierType}}»\"\n },\n Parameters: {\n spillMatrix: {\n name: \"matrice\",\n description: \"Matrice unidimensionnelle à renverser.\"\n },\n spillMaximumWidth: {\n name: \"largeurMaximale\",\n description: \"Largeur maximale dans laquelle déverser la matrice. Si non fournie, la largeur restante de la feuille est utilisée.\"\n },\n spillMaximumHeight: {\n name: \"hauteurMaximale\",\n description: \"Hauteur maximale dans laquelle déverser la matrice. Si non fournie, la hauteur restante de la feuille est utilisée.\"\n },\n domain: {\n name: \"domaine\",\n description: \"Domaine de transformation. Les valeurs d'entrée valides vont de zéro au domaine-1.\"\n },\n value: {\n name: \"valeur\",\n description: \"Valeur à transformer.\"\n },\n startValue: {\n name: \"valeurInitiale\",\n description: \"Valeur de départ d'un domaine de valeurs à transformer.\"\n },\n count: {\n name: \"compte\",\n description: \"Nombre de valeurs à transformer. Si positive, les valeurs transformées vont de valeurInitiale ascendante à valeurInitiale+compte-1. Si négative, les valeurs transformées vont de valeurInitiale descendant à valeurInitiale+compte+1.\"\n },\n transformedValue: {\n name: \"valeurTransformee\",\n description: \"Valeur de sortie précédente d'une transformation.\"\n },\n tweak: {\n name: \"reglage\",\n description: \"Valeur par laquelle réglager la transformation. Si non fourni ou nul, la sortie est séquentielle. Sinon, la sortie est cryptée de manière à paraître aléatoire, masquant les valeurs utilisées comme entrées de la séquence.\"\n },\n regExp: {\n name: \"expReg\",\n description: \"Expression régulière par rapport à laquelle valider une chaîne.\"\n },\n validateS: {\n name: \"c\",\n description: \"Chaîne à valider.\"\n },\n valueForS: {\n name: \"c\",\n description: \"Chaîne pour laquelle déterminer la valeur.\"\n },\n errorMessage: {\n name: \"messageDErreur\",\n description: \"Message d'erreur personnalisé à utiliser si la validation échoue. S'il n'est pas fourni, un message d'erreur interne est utilisé.\"\n },\n exclusionNone: {\n name: \"exclusion\",\n description: \"Valeurs de chaîne à exclure. La seule valeur valide est 0 (aucune exclusion).\"\n },\n exclusionFirstZero: {\n name: \"exclusion\",\n description: \"Valeurs de chaîne à exclure. Les valeurs valides sont 0 (aucune exclusion) et 1 (chaînes commençant par 0 exclues).\"\n },\n exclusionAllNumeric: {\n name: \"exclusion\",\n description: \"Valeurs de chaîne à exclure. Les valeurs valides sont 0 (aucune exclusion) et 2 (chaînes entièrement numériques exclues).\"\n },\n exclusionAny: {\n name: \"exclusion\",\n description: \"Valeurs de chaîne à exclure. Les valeurs valides sont 0 (aucune exclusion), 1 (chaînes commençant par 0 exclues) et 2 (chaînes toutes numériques exclues).\"\n },\n length: {\n name: \"longueur\",\n description: \"Longueur de chaîne à créer.\"\n },\n numericS: {\n name: \"c\",\n description: \"Chaîne numérique.\"\n },\n numericSFourOrFiveDigits: {\n name: \"c\",\n description: \"Chaîne numérique à quatre ou cinq chiffres.\"\n },\n numericSWithCheckDigit: {\n name: \"c\",\n description: \"Chaîne numérique avec chiffre de contrôle.\"\n },\n checkDigit: {\n name: \"chiffreDeControle\",\n description: \"Chiffre de contrôle.\"\n },\n ai82S: {\n name: \"c\",\n description: \"Chaîne de caractères GS1 AI 82.\"\n },\n ai82SWithCheckCharacterPair: {\n name: \"c\",\n description: \"Chaîne de caractères GS1 AI 82 avec paire de caractères de contrôle.\"\n },\n validateIdentifier: {\n name: \"cleDIdentification\",\n description: \"Clé d'identification à valider.\"\n },\n splitIdentifier: {\n name: \"splitIdentifier\",\n description: \"Identifiant à diviser.\"\n },\n zeroSuppressibleGTIN12: {\n name: \"gtin12\",\n description: \"GTIN-12 pour lequel supprimer les zéros.\"\n },\n zeroSuppressedGTIN12: {\n name: \"gtin12SupprimeAZero\",\n description: \"GTIN-12 supprimé à zéro pour s'étendre.\"\n },\n convertGTIN: {\n name: \"gtin\",\n description: \"GTIN à convertir en GTIN-14.\"\n },\n normalizeGTIN: {\n name: \"gtin\",\n description: \"GTIN à normaliser.\"\n },\n validateGTIN: {\n name: \"gtin\",\n description: \"GTIN à valider.\"\n },\n validateGTIN14: {\n name: \"gtin14\",\n description: \"GTIN-14 à valider.\"\n },\n gcpLengthIdentifier: {\n name: \"identifiant\",\n description: \"Identifiant pour lequel obtenir la longueur du préfixe d'entreprise GS1.\"\n },\n baseIdentifier: {\n name: \"cleDIdentificationDeBase\",\n description: \"Clé d'identification de base.\"\n },\n hyperlinkIdentifier: {\n name: \"identifiant\",\n description: \"Identifiant pour lequel créer un lien hypertexte.\"\n },\n indicatorDigit: {\n name: \"indicatorDigit\",\n description: \"Chiffre indicateur.\"\n },\n gtinLevel: {\n name: \"niveau\",\n description: \"Niveau auquel valider le GTIN. Les valeurs valides sont 0 (n'importe lequel), 1 (article commercial de consommation au détail) et 2 (autre que le niveau de l'article commercial de consommation au détail).\"\n },\n prefix: {\n name: \"prefixe\",\n description: \"Préfixe.\"\n },\n prefixType: {\n name: \"typeDePréfixe\",\n description: \"Type de préfixe. Les valeurs valides sont 0 (préfixe d'entreprise GS1), 1 (préfixe d'entreprise U.P.C.) et 2 (préfixe GS1).\"\n },\n tweakFactor: {\n name: \"facteurDeReglage\",\n description: \"Facteur de réglage, utilisé pour prendre en charge la création de clés d'identification éparses. Le facteur de réglage par défaut est basé sur le préfixe d'entreprise GS1 et est généralement suffisant pour l'obscurcissement. Cela permet un meilleur contrôle du cryptage lorsqu'une sécurité plus élevée est requise.\"\n },\n identifierType: {\n name: \"typeDIdentifiant\",\n description: \"Type d'identifiant (GTIN, GLN, SSCC, ...).\"\n },\n prefixDefinitionAny: {\n name: \"prefixeDefinition\",\n description: \"Définition de préfixe, soit un préfixe d'entreprise simple GS1 (sous forme de chaîne), soit le résultat d'un appel à definePrefix. Tout type de préfixe est pris en charge.\"\n },\n prefixDefinitionGS1UPC: {\n name: \"prefixeDefinition\",\n description: \"Définition de préfixe, soit un préfixe d'entreprise simple GS1 (sous forme de chaîne), soit le résultat d'un appel à definePrefix. Seuls les types de préfixes 0 (préfixe d'entreprise GS1) et 1 (préfixe d'entreprise U.P.C.) sont pris en charge.\"\n },\n sparse: {\n name: \"clairsemee\",\n description: \"Si cette valeur est vraie, la valeur est mappée sur une séquence clairsemée résistante à la découverte. La valeur par défaut est faux.\"\n },\n serialComponent: {\n name: \"composanteSerie\",\n description: \"Composante série.\"\n },\n reference: {\n name: \"reference\",\n description: \"Partie de référence de la clé d'identification.\"\n },\n rcnFormat: {\n name: \"format\",\n description: \"Format de numéro de diffusion restreinte.\"\n },\n rcn: {\n name: \"rcn\",\n description: \"Numéro de diffusion restreint à analyser.\"\n },\n rcnItemReference: {\n name: \"referenceDArticle\",\n description: \"Référence d'article.\"\n },\n rcnPriceOrWeight: {\n name: \"prixOuPoids\",\n description: \"Prix ou poids (nombre entier uniquement).\"\n },\n hyperlinkText: {\n name: \"texte\",\n description: \"Texte du lien hypertexte. À défaut, l'identifiant est utilisé.\"\n },\n hyperlinkDetails: {\n name: \"details\",\n description: \"Détails à afficher au survol du lien hypertexte.\"\n }\n },\n Functions: {\n version: {\n name: \"version\",\n description: \"Obtener la version de la boîte à outils AIDC.\"\n },\n spill: {\n name: \"deverser\",\n description: \"Déverser une matrice unidimensionnelle pour l'adapter à un rectangle dont la hauteur et la largeur maximales sont données.\"\n },\n forwardTransform: {\n name: \"transformerAvant\",\n description: \"Transformer une valeur en avant.\"\n },\n forwardTransformSequence: {\n name: \"transformerSequenceAvant\",\n description: \"Transformer une séquence de valeurs en avant.\"\n },\n reverseTransform: {\n name: \"transformerArriere\",\n description: \"Transformer une valeur en arrière.\"\n },\n validateRegExp: {\n name: \"validerExpReg\",\n description: \"Valider une chaîne par rapport à une expression régulière.\"\n },\n isValidRegExp: {\n name: \"estValideExpReg\",\n description: \"Déterminer si une chaîne est valide par rapport à une expression régulière.\"\n },\n validateNumeric: {\n name: \"validerNumerique\",\n description: \"Valider une chaîne numérique.\"\n },\n isValidNumeric: {\n name: \"estValideNumerique\",\n description: \"Déterminer si une chaîne est numérique.\"\n },\n createNumeric: {\n name: \"creerNumerique\",\n description: \"Créer une chaîne numérique.\"\n },\n createNumericSequence: {\n name: \"creerSequenceNumerique\",\n description: \"Créer une séquence de chaînes numériques.\"\n },\n valueForNumeric: {\n name: \"valeurDeNumerique\",\n description: \"Obtenir la valeur d'une chaîne numérique.\"\n },\n validateHexadecimal: {\n name: \"validerHexadecimale\",\n description: \"Valider une chaîne hexadécimale.\"\n },\n isValidHexadecimal: {\n name: \"estValideHexadecimale\",\n description: \"Déterminer si une chaîne est hexadécimale.\"\n },\n createHexadecimal: {\n name: \"creerHexadecimale\",\n description: \"Créer une chaîne hexadécimale.\"\n },\n createHexadecimalSequence: {\n name: \"creerSequenceHexadecimale\",\n description: \"Créer une séquence de chaînes hexadécimales.\"\n },\n valueForHexadecimal: {\n name: \"valeurDeHexadecimale\",\n description: \"Obtenir la valeur d'une chaîne hexadécimale.\"\n },\n validateAlphabetic: {\n name: \"validerAlphabetique\",\n description: \"Valider une chaîne alphabétique.\"\n },\n isValidAlphabetic: {\n name: \"estValideAlphabetique\",\n description: \"Déterminer si une chaîne est alphabétique.\"\n },\n createAlphabetic: {\n name: \"creerAlphabetique\",\n description: \"Créer une chaîne alphabétique.\"\n },\n createAlphabeticSequence: {\n name: \"creerSequenceAlphabetique\",\n description: \"Créer une séquence de chaînes alphabétiques.\"\n },\n valueForAlphabetic: {\n name: \"valeurDeAlphabetique\",\n description: \"Obtenir la valeur d'une chaîne alphabétique.\"\n },\n validateAlphanumeric: {\n name: \"validerAlphanumerique\",\n description: \"Valider une chaîne alphanumérique.\"\n },\n isValidAlphanumeric: {\n name: \"estValideAlphanumerique\",\n description: \"Déterminer si une chaîne est alphanumérique.\"\n },\n createAlphanumeric: {\n name: \"creerAlphanumerique\",\n description: \"Créer une chaîne alphanumérique.\"\n },\n createAlphanumericSequence: {\n name: \"creerSequenceAlphanumerique\",\n description: \"Créer une séquence de chaînes alphanumériques.\"\n },\n valueForAlphanumeric: {\n name: \"valeurDeAlphanumerique\",\n description: \"Obtenir la valeur d'une chaîne alphanumérique.\"\n },\n GS1: {\n validateAI82: {\n name: \"validerAI82\",\n description: \"Valider une chaîne de caractères GS1 AI 82.\"\n },\n isValidAI82: {\n name: \"estValideAI82\",\n description: \"Déterminer si une chaîne est un jeu de caractères GS1 AI 82.\"\n },\n createAI82: {\n name: \"creerAI82\",\n description: \"Créer une chaîne de caractères GS1 AI 82.\"\n },\n createAI82Sequence: {\n name: \"creerSequenceAI82\",\n description: \"Créer une séquence de chaînes de caractères GS1 AI 82.\"\n },\n valueForAI82: {\n name: \"valeurDeAI82\",\n description: \"Obtenez la valeur d'une chaîne de caractères GS1 AI 82.\"\n },\n validateAI39: {\n name: \"validerAI39\",\n description: \"Valider une chaîne de caractères GS1 AI 39.\"\n },\n isValidAI39: {\n name: \"estValideAI39\",\n description: \"Déterminer si une chaîne est un jeu de caractères GS1 AI 39.\"\n },\n createAI39: {\n name: \"creerAI39\",\n description: \"Créer une chaîne de caractères GS1 AI 39.\"\n },\n createAI39Sequence: {\n name: \"creerSequenceAI39\",\n description: \"Créer une séquence de chaînes de caractères GS1 AI 39.\"\n },\n valueForAI39: {\n name: \"valeurDeAI39\",\n description: \"Obtenez la valeur d'une chaîne de caractères GS1 AI 39.\"\n },\n validateAI64: {\n name: \"validerAI64\",\n description: \"Valider une chaîne de caractères GS1 AI 64.\"\n },\n isValidAI64: {\n name: \"estValideAI64\",\n description: \"Déterminer si une chaîne est un jeu de caractères GS1 AI 64.\"\n },\n checkDigit: {\n name: \"chiffreDeControle\",\n description: \"Calculer le chiffre de contrôle pour une chaîne numérique.\"\n },\n hasValidCheckDigit: {\n name: \"aChiffreDeControleValide\",\n description: \"Déterminer si une chaîne a un chiffre de contrôle valide.\"\n },\n priceOrWeightCheckDigit: {\n name: \"chiffreDeControlePrixOuPoids\",\n description: \"Calculer le chiffre de contrôle pour un prix ou un poids.\"\n },\n isValidPriceOrWeightCheckDigit: {\n name: \"estChiffreDeControlePrixOuPoidsValide\",\n description: \"Déterminer si un chiffre de contrôle de prix ou de poids est valide.\"\n },\n checkCharacterPair: {\n name: \"paireDeCaracteresDeControle\",\n description: \"Calculer la paire de caractères de contrôle pour une chaîne de caractères.\"\n },\n hasValidCheckCharacterPair: {\n name: \"aPaireDeCaracteresDeControleValide\",\n description: \"Déterminez si une chaîne de caractères GS1 AI 82 a une paire de caractères de contrôle valide.\"\n },\n validateGTIN13: {\n name: \"validerGTIN13\",\n description: \"Valider un GTIN-13.\"\n },\n isValidGTIN13: {\n name: \"estValideGTIN13\",\n description: \"Déterminer si un GTIN-13 est valide.\"\n },\n validateGTIN12: {\n name: \"validerGTIN12\",\n description: \"Valider un GTIN-12.\"\n },\n isValidGTIN12: {\n name: \"estValideGTIN12\",\n description: \"Déterminer si un GTIN-12 est valide.\"\n },\n validateGTIN8: {\n name: \"validerGTIN8\",\n description: \"Valider un GTIN-8.\"\n },\n isValidGTIN8: {\n name: \"estValideGTIN8\",\n description: \"Déterminer si un GTIN-8 est valide.\"\n },\n zeroSuppressGTIN12: {\n name: \"supprimerZeroGTIN12\",\n description: \"Supprimer les zéros d'un GTIN-12.\"\n },\n zeroExpandGTIN12: {\n name: \"etendrerZeroGTIN12\",\n description: \"Étendrer un GTIN-12 supprimé à zéro.\"\n },\n convertToGTIN14: {\n name: \"convertirEnGTIN14\",\n description: \"Convertir un GTIN en GTIN-14.\"\n },\n normalizeGTIN: {\n name: \"normalizeGTIN\",\n description: \"Normaliser un GTIN.\"\n },\n validateGTIN: {\n name: \"validerGTIN\",\n description: \"Valider un GTIN de n'importe quelle longueur.\"\n },\n isValidGTIN: {\n name: \"estValideGTIN\",\n description: \"Déterminer si un GTIN, quelle que soit sa longueur, est valide.\"\n },\n validateGTIN14: {\n name: \"validerGTIN14\",\n description: \"Valider un GTIN-14.\"\n },\n isValidGTIN14: {\n name: \"estValideGTIN14\",\n description: \"Déterminer si un GTIN-14 est valide.\"\n },\n validateGLN: {\n name: \"validerGLN\",\n description: \"Valider un GLN.\"\n },\n isValidGLN: {\n name: \"estValideGLN\",\n description: \"Déterminer si un GLN est valide.\"\n },\n validateSSCC: {\n name: \"validerSSCC\",\n description: \"Valider un SSCC.\"\n },\n isValidSSCC: {\n name: \"estValideSSCC\",\n description: \"Déterminer si un SSCC est valide.\"\n },\n validateGRAI: {\n name: \"validerGRAI\",\n description: \"Valider un GRAI.\"\n },\n isValidGRAI: {\n name: \"estValideGRAI\",\n description: \"Déterminer si un GRAI est valide.\"\n },\n splitGRAI: {\n name: \"splitGRAI\",\n description: \"Séparer un GRAI en son identifiant de base et son composant sériel.\"\n },\n validateGIAI: {\n name: \"validerGIAI\",\n description: \"Valider un GIAI.\"\n },\n isValidGIAI: {\n name: \"estValideGIAI\",\n description: \"Déterminer si un GIAI est valide.\"\n },\n validateGSRN: {\n name: \"validerGSRN\",\n description: \"Valider un GSRN.\"\n },\n isValidGSRN: {\n name: \"estValideGSRN\",\n description: \"Déterminer si un GSRN est valide.\"\n },\n validateGDTI: {\n name: \"validerGDTI\",\n description: \"Valider un GDTI.\"\n },\n isValidGDTI: {\n name: \"estValideGDTI\",\n description: \"Déterminer si un GDTI est valide.\"\n },\n splitGDTI: {\n name: \"splitGDTI\",\n description: \"Séparer un GDTI en son identifiant de base et son composant sériel.\"\n },\n validateGINC: {\n name: \"validerGINC\",\n description: \"Valider un GINC.\"\n },\n isValidGINC: {\n name: \"estValideGINC\",\n description: \"Déterminer si un GINC est valide.\"\n },\n validateGSIN: {\n name: \"validerGSIN\",\n description: \"Valider un GSIN.\"\n },\n isValidGSIN: {\n name: \"estValideGSIN\",\n description: \"Déterminer si un GSIN est valide.\"\n },\n validateGCN: {\n name: \"validerGCN\",\n description: \"Valider un GCN.\"\n },\n isValidGCN: {\n name: \"estValideGCN\",\n description: \"Déterminer si un GCN est valide.\"\n },\n splitGCN: {\n name: \"splitGCN\",\n description: \"Séparer un GCN en son identifiant de base et son composant sériel.\"\n },\n validateCPID: {\n name: \"validerCPID\",\n description: \"Valider un CPID.\"\n },\n isValidCPID: {\n name: \"estValideCPID\",\n description: \"Déterminer si un CPID est valide.\"\n },\n validateGMN: {\n name: \"validerGMN\",\n description: \"Valider un GMN.\"\n },\n isValidGMN: {\n name: \"estValideGMN\",\n description: \"Déterminer si un GMN est valide.\"\n },\n definePrefix: {\n name: \"definisserPrefixe\",\n description: \"Définisser un préfixe à utiliser dans les fonctions de création de clé d'identification GS1.\"\n },\n gcpLength: {\n name: \"longueurGCPDe\",\n description: \"Obtenez la longueur du préfixe d'entreprise GS1 pour un identifiant.\"\n },\n gcpLengthDateTime: {\n name: \"dateHeureLongueurGCP\",\n description: \"Obtenez la date et l'heure de la dernière mise à jour des données relatives à la longueur du préfixe d'entreprise GS1.\"\n },\n gcpLengthDisclaimer: {\n name: \"avertissementLongueurGCP\",\n description: \"Obtenez l'avertissement relatif aux données sur la longueur des préfixes d'entreprise GS1.\"\n },\n createGTIN: {\n name: \"creerGTIN\",\n description: \"Créer un GTIN.\"\n },\n createGTINSequence: {\n name: \"creerSequenceGTIN\",\n description: \"Créer un séquence de GTIN.\"\n },\n createAllGTIN: {\n name: \"creerTousGTIN\",\n description: \"Créez tous les GTIN pour un préfixe.\"\n },\n createGTIN14: {\n name: \"creerGTIN14\",\n description: \"Créer un GTIN-14.\"\n },\n createGLN: {\n name: \"creerGLN\",\n description: \"Créer un GLN.\"\n },\n createGLNSequence: {\n name: \"creerSequenceGLN\",\n description: \"Créer un séquence de GLN.\"\n },\n createAllGLN: {\n name: \"creerTousGLN\",\n description: \"Créez tous les GLN pour un préfixe.\"\n },\n createSSCC: {\n name: \"creerSSCC\",\n description: \"Créer un SSCC.\"\n },\n createSSCCSequence: {\n name: \"creerSequenceSSCC\",\n description: \"Créer un séquence de SSCC.\"\n },\n createAllSSCC: {\n name: \"creerTousSSCC\",\n description: \"Créez tous les SSCC pour un préfixe.\"\n },\n createGRAI: {\n name: \"creerGRAI\",\n description: \"Créer un GRAI.\"\n },\n createGRAISequence: {\n name: \"creerSequenceGRAI\",\n description: \"Créer un séquence de GRAI.\"\n },\n createAllGRAI: {\n name: \"creerTousGRAI\",\n description: \"Créez tous les GRAI pour un préfixe.\"\n },\n createSerializedGRAI: {\n name: \"creerGRAISerialise\",\n description: \"Créer un GRAI sérialisé.\"\n },\n concatenateGRAI: {\n name: \"concatenerGRAI\",\n description: \"Concaténer une base GRAI avec un composant série.\"\n },\n createGIAI: {\n name: \"creerGIAI\",\n description: \"Créer un GIAI.\"\n },\n createGSRN: {\n name: \"creerGSRN\",\n description: \"Créer un GSRN.\"\n },\n createGSRNSequence: {\n name: \"creerSequenceGSRN\",\n description: \"Créer un séquence de GSRN.\"\n },\n createAllGSRN: {\n name: \"creerTousGSRN\",\n description: \"Créez tous les GSRN pour un préfixe.\"\n },\n createGDTI: {\n name: \"creerGDTI\",\n description: \"Créer un GDTI.\"\n },\n createGDTISequence: {\n name: \"creerSequenceGDTI\",\n description: \"Créer un séquence de GDTI.\"\n },\n createAllGDTI: {\n name: \"creerTousGDTI\",\n description: \"Créez tous les GDTI pour un préfixe.\"\n },\n createSerializedGDTI: {\n name: \"creerGDTISerialise\",\n description: \"Créer un GDTI sérialisé.\"\n },\n concatenateGDTI: {\n name: \"concatenerGDTI\",\n description: \"Concaténer une base GDTI avec un composant série.\"\n },\n createGINC: {\n name: \"creerGINC\",\n description: \"Créer un GINC.\"\n },\n createGSIN: {\n name: \"creerGSIN\",\n description: \"Créer un GSIN.\"\n },\n createGSINSequence: {\n name: \"creerSequenceGSIN\",\n description: \"Créer un séquence de GSIN.\"\n },\n createAllGSIN: {\n name: \"creerTousGSIN\",\n description: \"Créez tous les GSIN pour un préfixe.\"\n },\n createGCN: {\n name: \"creerGCN\",\n description: \"Créer un GCN.\"\n },\n createGCNSequence: {\n name: \"creerSequenceGCN\",\n description: \"Créer un séquence de GCN.\"\n },\n createAllGCN: {\n name: \"creerTousGCN\",\n description: \"Créez tous les GCN pour un préfixe.\"\n },\n createSerializedGCN: {\n name: \"creerGCNSerialise\",\n description: \"Créer un GCN sérialisé.\"\n },\n concatenateGCN: {\n name: \"concatenerGCN\",\n description: \"Concaténer une base GCN avec un composant série.\"\n },\n createCPID: {\n name: \"creerCPID\",\n description: \"Créer un CPID.\"\n },\n createGMN: {\n name: \"creerGMN\",\n description: \"Créer un GMN.\"\n },\n parseVariableMeasureRCN: {\n name: \"parseVariableMeasureRCN\",\n description: \"Analyser un numéro de diffusion restreinte (RCN) à l'aide d'un format d'article commercial à mesure variable.\"\n },\n createVariableMeasureRCN: {\n name: \"creerMesureVariableRCN\",\n description: \"Créer un numéro de diffusion restreinte (RCN) à l'aide d'un format d'article commercial à mesure variable.\"\n },\n verifiedByGS1: {\n name: \"verifiedByGS1\",\n description: \"Créer un lien hypertexte «Vérifié par GS1».\"\n }\n }\n }\n};\n","import { fromByteArray, toByteArray } from \"base64-js\";\n\n/**\n * Application data.\n */\nexport type AppData = string | number | boolean | Date | Uint8Array | object;\n\n/**\n * Decode application data from an encoded string.\n *\n * @param stringData\n * String data.\n *\n * @returns\n * Decoded application data.\n */\nexport function decodeAppData(stringData: string): AppData | undefined {\n let decodedAppData: AppData | undefined;\n\n try {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- Mapping is expected to be correct.\n decodedAppData = JSON.parse(stringData, (_key, value: unknown) => {\n let replacementValue = value;\n\n // Decode string representing date/time and binary array and pass through other values unmodified.\n if (typeof value === \"string\") {\n // First capture group is type, second is data; simple split at ':' character.\n const stringDataGroups = /^(?<type>\\w+):(?<data>.*)$/u.exec(value)?.groups;\n\n if (stringDataGroups !== undefined) {\n const type = stringDataGroups[\"type\"];\n const data = stringDataGroups[\"data\"];\n\n switch (type) {\n case \"dateTime\":\n replacementValue = new Date(data);\n break;\n\n case \"binary\":\n replacementValue = toByteArray(data);\n break;\n }\n }\n }\n\n return replacementValue;\n }) as AppData;\n } catch {\n // String data is not valid JSON; discard it.\n decodedAppData = undefined;\n }\n\n return decodedAppData;\n}\n\n/**\n * Encode an object to a format suitable for storage.\n *\n * @param data\n * Object.\n *\n * @returns\n * Object suitable for storage with date/time and binary types encoded as strings.\n */\nfunction encodeObject(data: object): object | string {\n let mappedData: object | string;\n\n if (data instanceof Date) {\n mappedData = `dateTime:${data.toISOString()}`;\n } else if (data instanceof Uint8Array) {\n mappedData = `binary:${fromByteArray(data)}`;\n } else {\n mappedData = Object.fromEntries(Object.entries(data).map(([key, value]: [string, unknown]) =>\n // Encode date/time and binary array as string and pass through other values unmodified.\n [key, typeof value === \"object\" && value !== null ? encodeObject(value) : value]\n ));\n }\n\n return mappedData;\n}\n\n/**\n * Encode application data as a string for storage. Encoded string is in JSON format with date/time and binary data\n * converted to identifiable strings for decoding.\n *\n * @param appData\n * Application data.\n *\n * @returns\n * Encoded application data.\n */\nexport function encodeAppData(appData: AppData): string {\n return JSON.stringify(typeof appData !== \"object\" ? appData : encodeObject(appData));\n}\n","import { getLogger, type Hyperlink, LogLevels, MemoryTransport, type Promisable } from \"@aidc-toolkit/core\";\nimport type { Logger } from \"tslog\";\nimport type { AppData } from \"./app-data.js\";\nimport { i18nextAppExtension } from \"./locale/i18n.js\";\nimport type { StreamingCancelledCallback, StreamingConsumerCallback } from \"./streaming.js\";\nimport type { ErrorExtends, MatrixResult, SheetAddress, SheetRange, SingletonResult } from \"./type.js\";\n\n/**\n * Application extension.\n *\n * @template ThrowError\n * If true, errors are reported through the throw/catch mechanism.\n *\n * @template TError\n * Error type.\n *\n * @template TInvocationContext\n * Application-specific invocation context type.\n *\n * @template TStreamingInvocationContext\n * Application-specific streaming invocation context type.\n *\n * @template TBigInt\n * Type to which big integer is mapped.\n */\nexport abstract class AppExtension<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> {\n /**\n * Application name prefix for properties and application data.\n */\n static readonly APPLICATION_NAME_PREFIX = \"AIDCToolkit.\";\n\n /**\n * Version property name.\n */\n static readonly VERSION_NAME = `${AppExtension.APPLICATION_NAME_PREFIX}version`;\n\n /**\n * Maximum logger messages length.\n */\n static readonly #MAXIMUM_LOGGER_MESSAGES_LENGTH = 120;\n\n /**\n * Truncate logger messages length.\n */\n static readonly #TRUNCATE_LOGGER_MESSAGES_LENGTH = 100;\n\n /**\n * Application version.\n */\n readonly #version: string;\n\n /**\n * Maximum sequence count supported by application.\n */\n readonly #maximumSequenceCount: number;\n\n /**\n * If true, errors are reported through the throw/catch mechanism.\n */\n readonly #throwError: ThrowError;\n\n /**\n * Logger.\n */\n readonly #logger: Logger<object>;\n\n /**\n * Logger memory transport.\n */\n readonly #memoryTransport: MemoryTransport<object>;\n\n /**\n * Constructor.\n *\n * @param version\n * Application version.\n *\n * @param maximumSequenceCount\n * Maximum sequence count supported by application.\n *\n * @param throwError\n * If true, errors are reported through the throw/catch mechanism.\n */\n protected constructor(version: string, maximumSequenceCount: number, throwError: ThrowError) {\n this.#version = version;\n this.#maximumSequenceCount = maximumSequenceCount;\n this.#throwError = throwError;\n\n // Running in production if version doesn't include a pre-release identifier.\n const isProduction = !version.includes(\"-\");\n\n this.#logger = getLogger(isProduction ? LogLevels.Info : LogLevels.Debug, {\n type: isProduction ? \"hidden\" : \"pretty\",\n hideLogPositionForProduction: isProduction\n });\n\n this.#memoryTransport = new MemoryTransport(this.#logger, AppExtension.#MAXIMUM_LOGGER_MESSAGES_LENGTH, AppExtension.#TRUNCATE_LOGGER_MESSAGES_LENGTH);\n }\n\n /**\n * Initialize the application extension.\n */\n async initialize(): Promise<void> {\n const fileVersion = await this.getFileProperty(AppExtension.VERSION_NAME);\n\n if (fileVersion !== this.#version) {\n await this.setFileProperty(AppExtension.VERSION_NAME, this.#version);\n }\n }\n\n /**\n * Get the version.\n *\n * @returns\n * Version.\n */\n get version(): string {\n return this.#version;\n }\n\n /**\n * Determine if errors are reported through the throw/catch mechanism.\n */\n get throwError(): ThrowError {\n return this.#throwError;\n }\n\n /**\n * Get the logger.\n */\n get logger(): Logger<object> {\n return this.#logger;\n }\n\n /**\n * Get the logger memory transport.\n */\n get memoryTransport(): MemoryTransport<object> {\n return this.#memoryTransport;\n }\n\n /**\n * Get the maximum width supported by the application.\n */\n abstract get maximumWidth(): number;\n\n /**\n * Get the maximum height supported by the application.\n */\n abstract get maximumHeight(): number;\n\n /**\n * Get the sheet address from an invocation context.\n *\n * @param invocationContext\n * Invocation context.\n *\n * @returns\n * Sheet address.\n */\n abstract getSheetAddress(invocationContext: TInvocationContext): Promisable<SheetAddress>;\n\n /**\n * Get a parameter range from an invocation context.\n *\n * @param invocationContext\n * Invocation context.\n *\n * @param parameterNumber\n * Parameter number.\n *\n * @returns\n * Sheet range or null if parameter is not a range.\n */\n abstract getParameterSheetRange(invocationContext: TInvocationContext, parameterNumber: number): Promisable<SheetRange | null>;\n\n /**\n * Set up streaming for a streaming function.\n *\n * @param streamingInvocationContext\n * Streaming invocation context.\n *\n * @param streamingCancelledCallback\n * Streaming cancelled callback, called when streaming is cancelled.\n *\n * @returns\n * Streaming consumer callback, called when stream contents updated.\n */\n abstract setUpStreaming<TResult>(streamingInvocationContext: TStreamingInvocationContext, streamingCancelledCallback: StreamingCancelledCallback): StreamingConsumerCallback<TResult, ThrowError, TError>;\n\n /**\n * Get a property stored within the active file.\n *\n * @param name\n * Property name.\n *\n * @returns\n * Property value or undefined if no value is stored under the given name.\n */\n abstract getFileProperty(name: string): Promisable<string | undefined>;\n\n /**\n * Set a property to be stored within the active file.\n *\n * @param name\n * Property name.\n *\n * @param value\n * Property value or null to remove.\n */\n abstract setFileProperty(name: string, value: string | null): Promisable<void>;\n\n /**\n * Get application data stored within the active file.\n *\n * @param name\n * Name under which data is stored.\n *\n * @returns\n * Application data or undefined if no data is stored under the given name.\n */\n abstract getFileData(name: string): Promisable<AppData | undefined>;\n\n /**\n * Set application data to be stored within the active file.\n *\n * @param name\n * Name under which to store data.\n *\n * @param appData\n * Application data or null to remove.\n */\n abstract setFileData(name: string, appData: AppData | null): Promisable<void>;\n\n /**\n * Get application data stored and shared across multiple files.\n *\n * @param name\n * Name under which data is stored.\n *\n * @returns\n * Application ata or undefined if no data is stored under the given name.\n */\n abstract getSharedData(name: string): Promisable<AppData | undefined>;\n\n /**\n * Set application data to be stored and shared across multiple files.\n *\n * @param name\n * Name under which to store data.\n *\n * @param appData\n * Application data or null to remove.\n */\n abstract setSharedData(name: string, appData: AppData | null): Promisable<void>;\n\n /**\n * Validate a sequence count against the maximum supported by application.\n *\n * @param sequenceCount\n * Sequence count.\n */\n validateSequenceCount(sequenceCount: number): void {\n const absoluteSequenceCount = Math.abs(sequenceCount);\n\n if (absoluteSequenceCount > this.#maximumSequenceCount) {\n throw new RangeError(i18nextAppExtension.t(\"AppExtension.sequenceCountMustBeLessThanOrEqualTo\", {\n sequenceCount: absoluteSequenceCount,\n maximumSequenceCount: this.#maximumSequenceCount\n }));\n }\n }\n\n /**\n * Map big integer to another type if necessary.\n *\n * @param value\n * Big integer value to map.\n *\n * @returns\n * Mapped big integer value.\n */\n abstract mapBigInt(value: bigint): SingletonResult<TBigInt, ThrowError, TError>;\n\n /**\n * Map hyperlink results to a form suitable for the application.\n *\n * @param invocationContext\n * Invocation context.\n *\n * @param matrixHyperlinkResults\n * Matrix of hyperlink results from function call.\n *\n * @returns\n * Matrix of results in a form suitable for the application.\n */\n abstract mapHyperlinkResults(invocationContext: TInvocationContext, matrixHyperlinkResults: MatrixResult<Hyperlink, ThrowError, TError>): Promisable<MatrixResult<unknown, ThrowError, TError>>;\n\n /**\n * Map a range error (thrown by the library) to an application-specific error. If errors are reported through the\n * throw/catch mechanism, the implementation may return the range error unmodified if that is supported.\n *\n * @param rangeError\n */\n abstract mapRangeError(rangeError: RangeError): TError;\n\n /**\n * Handle an error with a message; called when an exception occurs outside the control of the AIDC Toolkit library.\n * Implementation must not return, most likely by throwing the message wrapped in an error type.\n *\n * @param message\n * Message to include in the error.\n */\n abstract handleError(message: string): never;\n}\n","import { mapIterable } from \"@aidc-toolkit/utility\";\nimport type { AppExtension } from \"./app-extension.js\";\nimport { i18nextAppExtension } from \"./locale/i18n.js\";\nimport type { ErrorExtends, Matrix, MatrixResult, SingletonResult } from \"./type.js\";\n\n/**\n * Library proxy.\n *\n * @template ThrowError\n * If true, errors are reported through the throw/catch mechanism.\n *\n * @template TError\n * Error type.\n *\n * @template TInvocationContext\n * Application-specific invocation context type.\n *\n * @template TStreamingInvocationContext\n * Application-specific streaming invocation context type.\n * \n * @template TBigInt\n * Type to which big integer is mapped.\n */\nexport abstract class LibProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> {\n /**\n * Application extension.\n */\n readonly #appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>;\n\n /**\n * Constructor.\n *\n * @param appExtension\n * Application extension.\n */\n constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>) {\n this.#appExtension = appExtension;\n }\n\n /**\n * Get the application extension.\n */\n get appExtension(): AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {\n return this.#appExtension;\n }\n\n /**\n * Map big integer to another type if necessary.\n *\n * @param value\n * Big integer value to map.\n *\n * @returns\n * Mapped big integer value.\n */\n mapBigInt(value: bigint): SingletonResult<TBigInt, ThrowError, TError> {\n return this.#appExtension.mapBigInt(value);\n }\n\n /**\n * Handle an error thrown by a function call. Return type is {@linkcode SingletonResult} to ensure assignment\n * compatibility.\n *\n * @param e\n * Error.\n *\n * @returns\n * Error if errors are not thrown.\n */\n #handleError<TResult>(e: unknown): SingletonResult<TResult, ThrowError, TError> {\n let result: SingletonResult<TResult, ThrowError, TError>;\n\n if (e instanceof RangeError) {\n const error = this.#appExtension.mapRangeError(e);\n\n if (this.#appExtension.throwError) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- Type is determined by application mapping.\n throw error as Error;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- Won't get here if ThrowError is false so result is TError.\n result = error as SingletonResult<TResult, ThrowError, TError>;\n } else {\n // Unknown error; pass on to application extension.\n result = this.appExtension.handleError(e instanceof Error ? e.message : String(e));\n }\n\n return result;\n }\n\n /**\n * Call a singleton result function with error handling.\n *\n * @param callback\n * Callback.\n *\n * @returns\n * Callback return or error if errors are not thrown.\n */\n singletonResult<TResult>(callback: () => SingletonResult<TResult, ThrowError, TError>): SingletonResult<TResult, ThrowError, TError> {\n let result: SingletonResult<TResult, ThrowError, TError>;\n\n try {\n result = callback();\n } catch (e: unknown) {\n result = this.#handleError(e);\n }\n\n return result;\n }\n\n /**\n * Call a matrix result function with error handling.\n *\n * @param matrixValues\n * Matrix of values.\n *\n * @param valueCallback\n * Callback to process value.\n *\n * @returns\n * Matrix of callback results and errors if errors are not thrown.\n */\n protected matrixResult<TValue, TResult>(matrixValues: Matrix<TValue>, valueCallback: (value: TValue) => SingletonResult<TResult, ThrowError, TError>): MatrixResult<TResult, ThrowError, TError> {\n return matrixValues.map(rowValues => rowValues.map(value => this.singletonResult(() => valueCallback(value))));\n }\n\n /**\n * Map a matrix of validate string results to boolean. If the string is empty, the result is true, indicating that\n * there is no error.\n *\n * @param matrixValidateResults\n * Matrix of results from a call to a validate function.\n *\n * @returns\n * Matrix of boolean values, true if corresponding string is empty.\n */\n protected isValidString(matrixValidateResults: MatrixResult<string, ThrowError, TError>): Matrix<boolean> {\n return matrixValidateResults.map(rowValues => rowValues.map(value => (validateResult => validateResult === \"\")(value)));\n }\n\n /**\n * Set up a mapping and call a matrix result function with error handling.\n *\n * @param setUpCallback\n * Callback to set up the mapping.\n *\n * @param matrixValues\n * Matrix of values.\n *\n * @param valueCallback\n * Callback to process value.\n *\n * @returns\n * Matrix of callback results and errors if errors are not thrown.\n */\n protected setUpMatrixResult<TSetup, TValue, TResult>(setUpCallback: () => TSetup, matrixValues: Matrix<TValue>, valueCallback: (setup: TSetup, value: TValue) => SingletonResult<TResult, ThrowError, TError>): MatrixResult<TResult, ThrowError, TError> {\n let result: MatrixResult<TResult, ThrowError, TError>;\n\n try {\n result = matrixValues.map(rowValues => rowValues.map(value => this.singletonResult(() => valueCallback(setUpCallback(), value))));\n } catch (e: unknown) {\n result = [[this.#handleError(e)]];\n }\n\n return result;\n }\n\n /**\n * Do the callback for an array return.\n *\n * @param value\n * Value.\n *\n * @param callback\n * Callback.\n *\n * @returns\n * Callback result or error as array if errors are not thrown.\n */\n #arrayCallback<TValue, TResult>(value: TValue, callback: (value: TValue) => Array<SingletonResult<TResult, ThrowError, TError>>): Array<SingletonResult<TResult, ThrowError, TError>> {\n const result = this.singletonResult(() => callback(value));\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- If result is not an array, it must be an error.\n return result instanceof Array ? result : [result as SingletonResult<TResult, ThrowError, TError>];\n }\n\n /**\n * Call an array result function with error handling and map to a matrix.\n *\n * @param matrixValues\n * Matrix of values.\n *\n * @param callback\n * Callback.\n *\n * @returns\n * Matrix of callback results and errors if errors are not thrown.\n */\n protected arrayResult<TValue, TResult>(matrixValues: Matrix<TValue>, callback: (value: TValue) => Array<SingletonResult<TResult, ThrowError, TError>>): MatrixResult<TResult, ThrowError, TError> {\n let result: MatrixResult<TResult, ThrowError, TError>;\n\n if (matrixValues.length === 0) {\n // Special case; unlikely to occur.\n result = [[]];\n } else if (matrixValues.length === 1) {\n result = [];\n\n matrixValues[0].forEach((value, columnIndex) => {\n const arrayResult = this.#arrayCallback(value, callback);\n\n arrayResult.forEach((resultError, rowIndex) => {\n // Append a row if necessary.\n if (result.length <= rowIndex) {\n result.push([]);\n }\n\n // Assignment will automatically expand row to the number of columns in the matrix.\n result[rowIndex][columnIndex] = resultError;\n });\n });\n } else {\n result = matrixValues.map((rowValue) => {\n let arrayResult: Array<SingletonResult<TResult, ThrowError, TError>>;\n\n if (rowValue.length === 0) {\n // Special case; unlikely to occur.\n arrayResult = [];\n } else if (rowValue.length === 1) {\n arrayResult = this.#arrayCallback(rowValue[0], callback);\n } else {\n arrayResult = [this.#handleError(new RangeError(i18nextAppExtension.t(\"Proxy.matrixMustBeArray\")))];\n }\n\n return arrayResult;\n });\n }\n\n return result;\n }\n\n /**\n * Call a matrix result function with error handling and map a non-error result to an empty string and {@linkcode\n * RangeError} to the string error message.\n *\n * @param matrixValues\n * Matrix of values.\n *\n * @param callback\n * Callback that either returns or throws an exception.\n *\n * @returns\n * Matrix of strings.\n */\n protected matrixErrorResult<TValue>(matrixValues: Matrix<TValue>, callback: (value: TValue) => void): Matrix<string> {\n return matrixValues.map(rowValues => rowValues.map((value) => {\n let result: string;\n\n try {\n callback(value);\n\n // No error; return empty string.\n result = \"\";\n } catch (e: unknown) {\n if (e instanceof RangeError) {\n // Library error; return error message.\n result = e.message;\n } else {\n // Unknown error; pass up the stack.\n throw e;\n }\n }\n\n return result;\n }));\n }\n\n /**\n * Call an iterable result function with error handling and map to a matrix. Although the natural approach would be\n * to map to a single-element array containing an array of *N* results (i.e., [[r0, r1, r2, ..., r*N*]]), this is\n * rendered visually as a single row. The more readable approach is as a single column, so the mapping is to an\n * *N*-element array of single-element result arrays (i.e., [[r0], [r1], [r2], ..., [r*N*]]).\n *\n * @param iterableCallback\n * Iterable callback.\n *\n * @returns\n * Matrix of callback results.\n */\n protected iterableResult<TResult>(iterableCallback: () => Iterable<SingletonResult<TResult, ThrowError, TError>>): MatrixResult<TResult, ThrowError, TError> {\n let result: MatrixResult<TResult, ThrowError, TError>;\n\n try {\n result = Array.from(mapIterable(iterableCallback(), result => [result]));\n } catch (e: unknown) {\n result = [[this.#handleError(e)]];\n }\n\n return result;\n }\n}\n","/**\n * Core descriptor.\n */\ninterface Descriptor {\n /**\n * Name.\n */\n readonly name: string;\n}\n\n/**\n * Types supported by proxy methods.\n */\nexport const Types = {\n /**\n * String.\n */\n String: 0,\n\n /**\n * Number or enumeration.\n */\n Number: 1,\n\n /**\n * Boolean.\n */\n Boolean: 2,\n\n /**\n * Any.\n */\n Any: 3\n} as const;\n\n/**\n * Type key.\n */\nexport type TypeKey = keyof typeof Types;\n\n/**\n * Type.\n */\nexport type Type = typeof Types[TypeKey];\n\n/**\n * Type descriptor.\n */\ninterface TypeDescriptor extends Descriptor {\n /**\n * Type.\n */\n readonly type: Type;\n\n /**\n * True if type is a matrix (method accepts or returns, or parameter is, a two-dimensional array).\n */\n readonly isMatrix: boolean;\n}\n\n/**\n * Parameter descriptor.\n */\nexport interface ParameterDescriptor extends TypeDescriptor {\n /**\n * True if required.\n */\n readonly isRequired: boolean;\n}\n\n/**\n * Extends parameter descriptor.\n */\nexport interface ExtendsParameterDescriptor extends Partial<ParameterDescriptor> {\n /**\n * Parameter descriptor that this one extends.\n */\n readonly extendsDescriptor: ParameterDescriptor | ExtendsParameterDescriptor;\n\n /**\n * Sort order within extended parameter descriptor.\n */\n readonly sortOrder?: number;\n}\n\n/**\n * Replacement parameter descriptor.\n */\nexport interface ReplacementParameterDescriptor {\n /**\n * Name to replace.\n */\n readonly name: string;\n\n /**\n * Replacement parameter descriptor.\n */\n readonly replacement: ParameterDescriptor;\n}\n\n/**\n * Method descriptor.\n */\nexport interface MethodDescriptor extends TypeDescriptor {\n /**\n * If true, application-specific invocation context is required.\n */\n readonly requiresContext?: boolean;\n\n /**\n * If true, function is hidden from user interface.\n */\n readonly isHidden?: boolean;\n\n /**\n * If true, function is volatile and should be reevaluated regularly.\n */\n readonly isVolatile?: boolean;\n\n /**\n * If true, function opens a stream that updates asynchronously.\n */\n readonly isStream?: boolean;\n\n /**\n * If true, method infix is ignored.\n */\n readonly ignoreInfix?: boolean;\n\n /**\n * String before which method infix appears. If undefined, infix is appended to the method name. Ignored if\n * `ignoreInfix` is true.\n */\n readonly infixBefore?: string;\n\n /**\n * Parameter descriptors.\n */\n readonly parameterDescriptors: readonly ParameterDescriptor[];\n\n /**\n * Function name with optional infix.\n */\n readonly functionName: string;\n\n /**\n * Function name in optional namespace with optional infix.\n */\n readonly namespaceFunctionName: string;\n}\n\n/**\n * Class descriptor.\n */\nexport interface ClassDescriptor extends Descriptor {\n /**\n * Class namespace. If not provided, class is at the top level.\n */\n readonly namespace?: string | undefined;\n\n /**\n * Method infix. If undefined, method name is generated verbatim.\n */\n readonly methodInfix?: string | undefined;\n\n /**\n * Replacement parameter descriptors for class hierarchies where parameter types can narrow\n */\n readonly replacementParameterDescriptors?: ReplacementParameterDescriptor[];\n\n /**\n * Class name in optional namespace.\n */\n readonly namespaceClassName: string;\n\n /**\n * Object name.\n */\n readonly objectName: string;\n\n /**\n * Method descriptors.\n */\n readonly methodDescriptors: readonly MethodDescriptor[];\n}\n","import { isNullish, type LogLevel, logLevelOf, type NonNullishable, type Nullishable } from \"@aidc-toolkit/core\";\nimport { type ExtendsParameterDescriptor, type ParameterDescriptor, Types } from \"./descriptor.js\";\nimport { LibProxy } from \"./lib-proxy.js\";\nimport { i18nextAppExtension } from \"./locale/i18n.js\";\nimport { proxy } from \"./proxy.js\";\nimport type { ErrorExtends, Matrix, MatrixResult } from \"./type.js\";\n\nconst spillMatrixParameterDescriptor: ParameterDescriptor = {\n name: \"spillMatrix\",\n type: Types.Any,\n isMatrix: true,\n isRequired: true\n};\n\nconst spillMaximumParameterDescriptor: ParameterDescriptor = {\n name: \"spillMaximum\",\n type: Types.Number,\n isMatrix: false,\n isRequired: false\n};\n\nconst spillMaximumWidthParameterDescriptor: ExtendsParameterDescriptor = {\n extendsDescriptor: spillMaximumParameterDescriptor,\n sortOrder: 0,\n name: \"spillMaximumWidth\"\n};\n\nconst spillMaximumHeightParameterDescriptor: ExtendsParameterDescriptor = {\n extendsDescriptor: spillMaximumParameterDescriptor,\n sortOrder: 1,\n name: \"spillMaximumHeight\"\n};\n\n/**\n * Maximum dimensions.\n */\ninterface MaximumDimensions {\n /**\n * Optional maximum width.\n */\n width: Nullishable<number>;\n\n /**\n * Optional maximum height.\n */\n height: Nullishable<number>;\n}\n\n/**\n * Application utilities.\n *\n * @template ThrowError\n * If true, errors are reported through the throw/catch mechanism.\n *\n * @template TError\n * Error type.\n *\n * @template TInvocationContext\n * Application-specific invocation context type.\n *\n * @template TStreamingInvocationContext\n * Application-specific streaming invocation context type.\n * \n * @template TBigInt\n * Type to which big integer is mapped.\n */\n@proxy.describeClass(false)\nexport class AppUtilityProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends LibProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {\n /**\n * Get the version.\n *\n * @returns\n * Version.\n */\n @proxy.describeMethod({\n type: Types.String,\n isMatrix: false,\n parameterDescriptors: []\n })\n version(): string {\n return this.appExtension.version;\n }\n\n /**\n * Provide default values for maximum width and height if required.\n *\n * @param maximumDimensions\n * Maximum dimensions provided to function.\n *\n * @param invocationContext\n * Invocation context.\n *\n * @returns\n * Array of maximum width and maximum height.\n */\n async #defaultMaximums(maximumDimensions: MaximumDimensions, invocationContext: Nullishable<TInvocationContext>): Promise<NonNullishable<MaximumDimensions>> {\n if (isNullish(invocationContext)) {\n // Application error; no localization necessary.\n throw new Error(\"Invocation context not provided by application\");\n }\n\n const maximumWidth = maximumDimensions.width;\n const maximumHeight = maximumDimensions.height;\n\n let definedMaximumWidth: number;\n let definedMaximumHeight: number;\n\n // Skip any extra work if both values are provided.\n if (isNullish(maximumWidth) || isNullish(maximumHeight)) {\n const sheetAddress = await this.appExtension.getSheetAddress(invocationContext);\n\n definedMaximumWidth = maximumWidth ?? this.appExtension.maximumWidth - sheetAddress.columnIndex;\n definedMaximumHeight = maximumHeight ?? this.appExtension.maximumHeight - sheetAddress.rowIndex;\n } else {\n definedMaximumWidth = maximumWidth;\n definedMaximumHeight = maximumHeight;\n }\n\n return {\n width: definedMaximumWidth,\n height: definedMaximumHeight\n };\n }\n\n /**\n * Spill a one-dimensional matrix to fit a rectangle within a given maximum height and width.\n *\n * @param matrixValues\n * Matrix values. Matrix is length 1 or contains arrays of length 1 with the values.\n *\n * @param maximumHeight\n * Maximum height.\n *\n * @param maximumWidth\n * Maximum width.\n *\n * @param invocationContext\n * Invocation context.\n *\n * @returns\n * Matrix spilled within maximum height and maximum width.\n */\n @proxy.describeMethod({\n requiresContext: true,\n type: Types.Any,\n isMatrix: true,\n parameterDescriptors: [spillMatrixParameterDescriptor, spillMaximumHeightParameterDescriptor, spillMaximumWidthParameterDescriptor]\n })\n async spill(matrixValues: Matrix<unknown>, maximumHeight: Nullishable<number>, maximumWidth: Nullishable<number>, invocationContext: Nullishable<TInvocationContext>): Promise<MatrixResult<unknown, ThrowError, TError>> {\n let result: MatrixResult<unknown, ThrowError, TError>;\n\n // Assume matrix is uniformly two-dimensional.\n const height = matrixValues.length;\n const width = height !== 0 ? matrixValues[0].length : 0;\n\n const isArrayOrError = this.singletonResult(() => {\n if (height > 1 && width > 1) {\n throw new RangeError(i18nextAppExtension.t(\"Proxy.matrixMustBeArray\"));\n }\n\n return true;\n });\n\n if (isArrayOrError === true) {\n const maximumDimensions = await this.#defaultMaximums({\n width: maximumWidth,\n height: maximumHeight\n }, invocationContext);\n\n const isHorizontal = height === 1;\n const length = isHorizontal ? width : height;\n const maximumParallel = isHorizontal ? maximumDimensions.width : maximumDimensions.height;\n const maximumPerpendicular = isHorizontal ? maximumDimensions.height : maximumDimensions.width;\n const maximumArea = maximumParallel * maximumPerpendicular;\n\n // Lengths 0 and 1 are valid and require no special processing.\n if (length > 1 && length <= maximumArea) {\n const lengthSquareRoot = Math.sqrt(length);\n\n let spillParallel: number | undefined = undefined;\n\n // Array that has a length of a power of 10 is treated specially.\n if (Number.isInteger(Math.log10(length))) {\n // Try spill that is a power of 10, favouring the parallel direction.\n let spillParallel10 = 10 ** Math.ceil(Math.log10(lengthSquareRoot));\n\n // Favour the perpendicular direction if not enough parallel space.\n if (spillParallel10 > maximumParallel) {\n spillParallel10 /= 10;\n }\n\n // Take result as the spill parallel if it fits.\n if (spillParallel10 <= maximumParallel && length / spillParallel10 <= maximumPerpendicular) {\n spillParallel = spillParallel10;\n }\n }\n\n // Make spill as square as possible, favouring the parallel direction.\n spillParallel ??= Math.max(Math.min(Math.ceil(lengthSquareRoot), maximumParallel), Math.floor(length / maximumPerpendicular));\n\n const spillPerpendicular = Math.ceil(length / spillParallel);\n\n result = [];\n\n if (isHorizontal) {\n let startIndex = 0;\n\n do {\n const endIndex = startIndex + spillParallel;\n\n // Each row is a slice of the original single row.\n const row = matrixValues[0].slice(startIndex, endIndex);\n\n // Row length will be anywhere from 1 to spillParallel.\n if (row.length < spillParallel) {\n const rowLength = row.length;\n\n row.length = spillParallel;\n\n // Fill empty cells with empty string.\n row.fill(\"\", rowLength, spillParallel);\n }\n\n result.push(row);\n\n startIndex = endIndex;\n } while (startIndex < length);\n } else {\n for (let rowIndex = 0; rowIndex < spillParallel; rowIndex++) {\n const row: unknown[] = [];\n\n // Each column is a slice of the original single column.\n for (let valueIndex = rowIndex; valueIndex < length; valueIndex += spillParallel) {\n row.push(matrixValues[valueIndex][0]);\n }\n\n // Row length will always be spillPerpendicular or spillPerpendicular - 1.\n if (row.length < spillPerpendicular) {\n row[spillPerpendicular - 1] = \"\";\n }\n\n result.push(row);\n }\n }\n } else {\n // Return matrix unmodified and let application handle spill error if any.\n result = matrixValues;\n }\n } else {\n // Return error as only element in matrix.\n result = [[isArrayOrError]];\n }\n\n return result;\n }\n\n /**\n * Get the logger messages as a stream.\n *\n * @param logLevelString\n * Log level as string.\n *\n * @param streamingInvocationContext\n * Streaming invocation context.\n */\n @proxy.describeMethod({\n type: Types.String,\n isHidden: true,\n isStream: true,\n isMatrix: true,\n parameterDescriptors: [{\n name: \"logLevel\",\n type: Types.String,\n isMatrix: false,\n isRequired: false\n }]\n })\n loggerMessages(logLevelString: Nullishable<string>, streamingInvocationContext: Nullishable<TStreamingInvocationContext>): void {\n if (isNullish(streamingInvocationContext)) {\n // Application error; no localization necessary.\n throw new Error(\"Streaming invocation context not provided by application\");\n }\n\n const appExtension = this.appExtension;\n\n let notificationCallbackAdded = false;\n let previousLogLevel: number | undefined = undefined;\n\n const streamingConsumerCallback = appExtension.setUpStreaming<string>(streamingInvocationContext, () => {\n if (notificationCallbackAdded) {\n appExtension.memoryTransport.removeNotificationCallback(\"loggerMessages\");\n }\n\n if (previousLogLevel !== undefined) {\n appExtension.logger.settings.minLevel = previousLogLevel;\n }\n });\n\n if (appExtension.memoryTransport.addNotificationCallback(\"loggerMessages\", (_message, messages) => {\n streamingConsumerCallback(this.iterableResult(() => messages));\n })) {\n notificationCallbackAdded = true;\n\n let logLevel: LogLevel | undefined = undefined;\n\n if (!isNullish(logLevelString)) {\n try {\n logLevel = logLevelOf(logLevelString);\n } catch {\n // Ignore error.\n }\n }\n\n // Set log level if required.\n if (logLevel !== undefined) {\n previousLogLevel = appExtension.logger.settings.minLevel;\n appExtension.logger.settings.minLevel = logLevel;\n }\n } else {\n // Diagnostic tool; localization not required.\n streamingConsumerCallback([[\"Only one logger messages call allowable per workbook\"]]);\n }\n }\n}\n","import {\n type AbstractConstructor,\n type Constructor,\n loggableValue,\n omit,\n type TypedAbstractConstructor\n} from \"@aidc-toolkit/core\";\nimport type { Logger } from \"tslog\";\nimport type { AppExtension } from \"./app-extension.js\";\nimport type {\n ClassDescriptor,\n ExtendsParameterDescriptor,\n MethodDescriptor,\n ParameterDescriptor,\n ReplacementParameterDescriptor\n} from \"./descriptor.js\";\nimport { LibProxy } from \"./lib-proxy.js\";\nimport type { ErrorExtends } from \"./type.js\";\n\n/**\n * Remaining parameters past first parameter in constructor.\n */\ntype RemainingConstructorParameters<TConstructor extends TypedAbstractConstructor<TConstructor>> =\n TConstructor extends abstract new (arg0: infer _P0, ...args: infer P) => InstanceType<TConstructor> ? P : never;\n\n/**\n * Proxy class constructor type with fixed constructor signature for concrete class and variable constructor for\n * abstract class.\n *\n * @template T\n * Proxy class type.\n *\n * @template IsAbstract\n * True if the proxy class is abstract.\n *\n * @template TConstructor\n * Proxy class constructor type.\n */\ntype ProxyClassConstructor<\n ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt,\n T extends LibProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>,\n IsAbstract extends boolean,\n TConstructor extends TypedAbstractConstructor<TConstructor>\n> = IsAbstract extends true ?\n AbstractConstructor<[appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>, ...args: RemainingConstructorParameters<TConstructor>], T> :\n Constructor<[appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>], T>;\n\n/**\n * Class decorator type. Defines the parameters passed to a class decorator function and the return type as identical to\n * the constructor.\n *\n * @template T\n * Proxy class type.\n *\n * @template IsAbstract\n * True if the proxy class is abstract.\n *\n * @template TConstructor\n * Proxy class constructor type.\n *\n * @template TProxyClassConstructor\n * Narrowed proxy class constructor type.\n */\ntype ClassDecorator<\n ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt,\n T extends LibProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>,\n IsAbstract extends boolean,\n TConstructor extends TypedAbstractConstructor<TConstructor>,\n TProxyClassConstructor extends ProxyClassConstructor<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt, T, IsAbstract, TConstructor>\n> = (Target: TProxyClassConstructor, context: ClassDecoratorContext<TProxyClassConstructor>) => TProxyClassConstructor;\n\n/**\n * Class method decorator type. Defines the parameters passed to a class method decorator function and the return type\n * as identical to the method.\n *\n * @template TFunction\n * Function type.\n */\ntype ClassMethodDecorator<TThis, TArguments extends unknown[], TReturn> =\n (target: (this: TThis, ...args: TArguments) => TReturn, context: ClassMethodDecoratorContext<TThis>) => (this: TThis, ...args: TArguments) => TReturn;\n\n/**\n * Subset of method descriptor used during decoration process.\n */\ntype InterimMethodDescriptor = Omit<MethodDescriptor, \"functionName\" | \"namespaceFunctionName\">;\n\n/**\n * Subset of method descriptor used in call to decorator.\n */\ninterface DecoratorMethodDescriptor extends Omit<InterimMethodDescriptor, \"name\" | \"parameterDescriptors\"> {\n parameterDescriptors: Array<ParameterDescriptor | ExtendsParameterDescriptor>;\n}\n\n/**\n * Subset of class descriptor used during decoration process.\n */\ntype InterimClassDescriptor =\n Omit<ClassDescriptor, \"name\" | \"namespaceClassName\" | \"objectName\" | \"methodDescriptors\">;\n\n/**\n * Subset of class descriptor used in call to decorator.\n */\ninterface DecoratorClassDescriptor extends Omit<InterimClassDescriptor, \"replacementParameterDescriptors\"> {\n readonly replacementParameterDescriptors?: ReadonlyArray<Omit<ReplacementParameterDescriptor, \"replacement\"> & {\n readonly replacement: ParameterDescriptor | ExtendsParameterDescriptor;\n }>;\n}\n\n/**\n * Expand a parameter descriptor to its full form with all required attributes.\n *\n * @param parameterDescriptor\n * Parameter descriptor.\n *\n * @returns\n * Parameter descriptor in its full form.\n */\nexport function expandParameterDescriptor(parameterDescriptor: ParameterDescriptor | ExtendsParameterDescriptor): ParameterDescriptor {\n return !(\"extendsDescriptor\" in parameterDescriptor) ?\n parameterDescriptor :\n {\n ...expandParameterDescriptor(parameterDescriptor.extendsDescriptor),\n ...parameterDescriptor\n };\n}\n\n/**\n * Placeholder for interim descriptors.\n */\ninterface Interim {\n /**\n * Interim class descriptor.\n */\n readonly classDescriptor: InterimClassDescriptor;\n\n /**\n * Interim method descriptors.\n */\n readonly methodDescriptors: InterimMethodDescriptor[];\n}\n\n/**\n * Target logger interface to be implemented by returned decorator class.\n */\ninterface TargetLogger {\n /**\n * Logger.\n */\n readonly logger: Logger<object>;\n\n /**\n * Build a function that returns a loggable value for a method call.\n *\n * @param methodName\n * Method name.\n *\n * @param args\n * Input arguments.\n *\n * @param result\n * Output result.\n */\n callBuilder: (methodName: string, args: unknown[], result: unknown) => () => unknown;\n}\n\n/**\n * Proxy class.\n */\nexport class Proxy {\n /**\n * Abstract class descriptors map, keyed on declaration class name. Abstract classes are not used directly by target\n * applications.\n */\n readonly #abstractClassDescriptorsMap = new Map<string, ClassDescriptor>();\n\n /**\n * Concrete class descriptors map, keyed on declaration class name.\n */\n readonly #concreteClassDescriptorsMap = new Map<string, ClassDescriptor>();\n\n /**\n * Interim object.\n */\n #interim: Interim | undefined = undefined;\n\n /**\n * Describe a proxy class.\n *\n * @template T\n * Proxy class type.\n *\n * @template IsAbstract\n * True if the proxy class is abstract.\n *\n * @template TConstructor\n * Proxy class constructor type.\n *\n * @template TProxyClassConstructor\n * Narrowed proxy class constructor type.\n *\n * @param isAbstract\n * True if class is abstract.\n *\n * @param decoratorClassDescriptor\n * Class descriptor.\n *\n * @returns\n * Function with which to decorate the class.\n */\n describeClass<\n ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt,\n T extends LibProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>,\n IsAbstract extends boolean,\n TConstructor extends TypedAbstractConstructor<TConstructor>,\n TProxyClassConstructor extends ProxyClassConstructor<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt, T, IsAbstract, TConstructor>\n >(isAbstract: IsAbstract, decoratorClassDescriptor: DecoratorClassDescriptor = {}): ClassDecorator<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt, T, IsAbstract, TConstructor, TProxyClassConstructor> {\n const interimClassDescriptor: InterimClassDescriptor = decoratorClassDescriptor.replacementParameterDescriptors === undefined ?\n omit(decoratorClassDescriptor, \"replacementParameterDescriptors\") :\n {\n ...decoratorClassDescriptor,\n replacementParameterDescriptors: decoratorClassDescriptor.replacementParameterDescriptors.map(replaceParameterDescriptor => ({\n ...replaceParameterDescriptor,\n replacement: expandParameterDescriptor(replaceParameterDescriptor.replacement)\n }))\n };\n\n const interim: Interim = {\n classDescriptor: interimClassDescriptor,\n methodDescriptors: []\n };\n\n this.#interim = interim;\n\n return (Target: TProxyClassConstructor, context: ClassDecoratorContext<TProxyClassConstructor>) => {\n const name = context.name;\n\n // Validate that class descriptor is applied within an appropriate class.\n if (typeof name !== \"string\") {\n throw new Error(`${String(name)} has an invalid name`);\n }\n\n const namespacePrefix = decoratorClassDescriptor.namespace === undefined ? \"\" : `${decoratorClassDescriptor.namespace}.`;\n const namespaceClassName = `${namespacePrefix}${name}`;\n\n const abstractClassDescriptorsMap = this.#abstractClassDescriptorsMap;\n const concreteClassDescriptorsMap = this.#concreteClassDescriptorsMap;\n\n if (abstractClassDescriptorsMap.has(namespaceClassName) || concreteClassDescriptorsMap.has(namespaceClassName)) {\n throw new Error(`Duplicate class ${namespaceClassName}`);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- Class hierarchy is known.\n let baseClassType: typeof LibProxy = Target as unknown as typeof LibProxy;\n let baseClassDescriptor: ClassDescriptor | undefined;\n\n do {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- Class hierarchy is known.\n baseClassType = Object.getPrototypeOf(baseClassType) as typeof LibProxy;\n\n const namespaceBaseClassName = `${namespacePrefix}${baseClassType.name}`;\n\n // Look first within the namespace and then in no namespace, in both abstract class descriptors map and concrete class descriptors map.\n baseClassDescriptor =\n abstractClassDescriptorsMap.get(namespaceBaseClassName) ?? abstractClassDescriptorsMap.get(baseClassType.name) ??\n concreteClassDescriptorsMap.get(namespaceBaseClassName) ?? concreteClassDescriptorsMap.get(baseClassType.name);\n } while (baseClassType !== LibProxy && baseClassDescriptor === undefined);\n\n let interimMethodDescriptors: InterimMethodDescriptor[];\n\n if (baseClassDescriptor !== undefined) {\n const baseClassMethodDescriptors = baseClassDescriptor.methodDescriptors;\n const replaceParameterDescriptors = decoratorClassDescriptor.replacementParameterDescriptors;\n\n if (replaceParameterDescriptors !== undefined) {\n const replacementParameterDescriptorsMap = new Map(replaceParameterDescriptors.map(replaceParameterDescriptor => [replaceParameterDescriptor.name, expandParameterDescriptor(replaceParameterDescriptor.replacement)]));\n\n // Interim method descriptors for class have to be built as copies due to possible mutation of parameter descriptors.\n interimMethodDescriptors = baseClassMethodDescriptors.map(baseClassMethodDescriptor => ({\n ...baseClassMethodDescriptor,\n parameterDescriptors: baseClassMethodDescriptor.parameterDescriptors.map(parameterDescriptor => replacementParameterDescriptorsMap.get(parameterDescriptor.name) ?? parameterDescriptor)\n }));\n } else {\n interimMethodDescriptors = baseClassMethodDescriptors.slice();\n }\n } else {\n interimMethodDescriptors = [];\n }\n\n // Replace base class method descriptors with matching names or append new method descriptor.\n for (const classInterimMethodDescriptor of interim.methodDescriptors) {\n const existingIndex = interimMethodDescriptors.findIndex(interimMethodDescriptor => interimMethodDescriptor.name === classInterimMethodDescriptor.name);\n\n if (existingIndex !== -1) {\n interimMethodDescriptors[existingIndex] = classInterimMethodDescriptor;\n } else {\n interimMethodDescriptors.push(classInterimMethodDescriptor);\n }\n }\n\n const methodDescriptors: MethodDescriptor[] = [];\n\n const methodInfix = decoratorClassDescriptor.methodInfix;\n\n for (const interimMethodDescriptor of interimMethodDescriptors) {\n const methodName = interimMethodDescriptor.name;\n const infixBefore = interimMethodDescriptor.infixBefore;\n\n let functionName: string;\n\n if (methodInfix === undefined || interimMethodDescriptor.ignoreInfix === true) {\n // No other classes in the hierarchy or no infix required.\n functionName = methodName;\n } else if (infixBefore === undefined) {\n // Other classes in the hierarchy and infix is postfix.\n functionName = `${methodName}${methodInfix}`;\n } else {\n const insertIndex = methodName.indexOf(infixBefore);\n\n if (insertIndex === -1) {\n throw new Error(`Cannot find \"${infixBefore}\" in method ${methodName}`);\n }\n\n // Other classes in the hierarchy and infix is in the middle of the string.\n functionName = `${methodName.substring(0, insertIndex)}${methodInfix}${methodName.substring(insertIndex)}`;\n }\n\n const namespaceFunctionName = `${namespacePrefix}${functionName}`;\n\n const methodDescriptor = {\n ...interimMethodDescriptor,\n functionName,\n namespaceFunctionName\n };\n\n methodDescriptors.push(methodDescriptor);\n }\n\n // First capture group is:\n // - one or more uppercase letters followed by zero or more numbers; or\n // - single uppercase letter followed by zero or more characters except uppercase letters or period.\n //\n // Second capture group is:\n // - single uppercase letter followed by zero or more characters except period; or\n // - zero characters (empty string).\n //\n // Third capture group, separated by optional period, is:\n // - single uppercase letter followed by zero or more characters (remainder of string); or\n // - zero characters (empty string).\n const objectNameGroups = /^(?<namespaceFirstWord>[A-Z]+[0-9]*|[A-Z][^A-Z.]*)(?<namespaceRemaining>[A-Z][^.]*|)\\.?(?<className>[A-Z].*|)$/u.exec(namespaceClassName)?.groups;\n\n if (objectNameGroups === undefined) {\n throw new Error(`${namespaceClassName} is not a valid namespace-qualified class name`);\n }\n\n const classDescriptor: ClassDescriptor = {\n name,\n ...interimClassDescriptor,\n namespaceClassName,\n objectName: `${objectNameGroups[\"namespaceFirstWord\"].toLowerCase()}${objectNameGroups[\"namespaceRemaining\"]}${objectNameGroups[\"className\"]}`,\n methodDescriptors\n };\n\n (isAbstract ? abstractClassDescriptorsMap : concreteClassDescriptorsMap).set(namespaceClassName, classDescriptor);\n\n const methodDescriptorsMap = new Map<string, MethodDescriptor>();\n\n for (const methodDescriptor of methodDescriptors) {\n methodDescriptorsMap.set(methodDescriptor.name, methodDescriptor);\n }\n\n this.#interim = undefined;\n\n return class extends Target implements TargetLogger {\n /**\n * Get the logger.\n */\n get logger(): Logger<object> {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- Type hierarchy is known.\n return (this as unknown as T).appExtension.logger;\n }\n\n /**\n * @inheritDoc\n */\n callBuilder(methodName: string, args: unknown[], result: unknown): () => unknown {\n return () => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- Method name is known to be valid at this point.\n const methodDescriptor = methodDescriptorsMap.get(methodName)!;\n\n return {\n namespace: decoratorClassDescriptor.namespace,\n className: name,\n methodName,\n functionName: methodDescriptor.functionName,\n parameters: methodDescriptor.parameterDescriptors.map((parameterDescriptor, index) => ({\n name: parameterDescriptor.name,\n value: loggableValue(args[index])\n })),\n result: loggableValue(result)\n };\n };\n }\n };\n };\n }\n\n /**\n * Describe a proxy method.\n *\n * @template TFunction\n * Function type.\n *\n * @param decoratorMethodDescriptor\n * Method descriptor.\n *\n * @returns\n * Function with which to decorate the method.\n */\n describeMethod<TThis, TArguments extends unknown[], TReturn>(decoratorMethodDescriptor: DecoratorMethodDescriptor): ClassMethodDecorator<TThis, TArguments, TReturn> {\n return (target: (this: TThis, ...args: TArguments) => TReturn, context: ClassMethodDecoratorContext<TThis>): (this: TThis, ...args: TArguments) => TReturn => {\n const name = context.name;\n\n // Validate that method descriptor is applied within an appropriate class.\n if (this.#interim === undefined) {\n throw new Error(`Class for method ${String(name)} does not have a descriptor`);\n }\n\n // Validate that method descriptor has a valid name and is neither static nor private.\n if (typeof name !== \"string\" || context.static || context.private) {\n throw new Error(`Method ${String(name)} has an invalid name, is static, or is private`);\n }\n\n let anyOptional = false;\n\n // Expand all parameter descriptors.\n const parameterDescriptors = decoratorMethodDescriptor.parameterDescriptors.map((decoratorParameterDescriptor) => {\n const parameterDescriptor = expandParameterDescriptor(decoratorParameterDescriptor);\n\n if (!parameterDescriptor.isRequired) {\n anyOptional = true;\n } else if (anyOptional) {\n throw new Error(`Parameter ${parameterDescriptor.name} descriptor of method ${name} is required but prior parameter descriptor is optional`);\n }\n\n return parameterDescriptor;\n });\n\n this.#interim.methodDescriptors.push({\n name,\n ...decoratorMethodDescriptor,\n parameterDescriptors\n });\n\n return function methodProxy(this: TThis, ...args: TArguments): TReturn {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- Class has been modified to add log method.\n const targetLogger = this as TargetLogger;\n\n let result: TReturn;\n\n try {\n result = target.call(this, ...args);\n\n // Stream methods are responsible for their own logging.\n if (decoratorMethodDescriptor.isStream !== true) {\n if (!(result instanceof Promise)) {\n targetLogger.logger.trace(targetLogger.callBuilder(name, args, result));\n } else {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- Promise interception pattern.\n result = result.then((promisedResult: unknown) => {\n targetLogger.logger.trace(targetLogger.callBuilder(name, args, promisedResult));\n\n return promisedResult;\n }).catch((e: unknown) => {\n targetLogger.logger.error(targetLogger.callBuilder(name, args, e));\n\n throw e;\n }) as TReturn;\n }\n }\n } catch (e: unknown) {\n targetLogger.logger.error(targetLogger.callBuilder(name, args, e));\n\n throw e;\n }\n\n return result;\n };\n };\n }\n\n /**\n * Get the class descriptors map.\n */\n get classDescriptorsMap(): Map<string, ClassDescriptor> {\n return this.#concreteClassDescriptorsMap;\n }\n}\n\n/**\n * Proxy object used by all proxy classes.\n */\nexport const proxy = new Proxy();\n","export * from \"./transformer-proxy.js\";\nexport * from \"./reg-exp-proxy.js\";\nexport * from \"./character-set-proxy.js\";\n","import type { Nullishable } from \"@aidc-toolkit/core\";\nimport { mapIterable, Sequence, Transformer } from \"@aidc-toolkit/utility\";\nimport { type ExtendsParameterDescriptor, type ParameterDescriptor, Types } from \"../descriptor.js\";\nimport { LibProxy } from \"../lib-proxy.js\";\nimport { proxy } from \"../proxy.js\";\nimport type { ErrorExtends, Matrix, MatrixResult } from \"../type.js\";\nimport {\n countParameterDescriptor,\n startValueParameterDescriptor,\n tweakParameterDescriptor,\n valueParameterDescriptor\n} from \"./transformer-descriptor.js\";\n\nconst domainParameterDescriptor: ParameterDescriptor = {\n name: \"domain\",\n type: Types.Number,\n isMatrix: false,\n isRequired: true\n};\n\nconst transformedValueParameterDescriptor: ExtendsParameterDescriptor = {\n extendsDescriptor: valueParameterDescriptor,\n name: \"transformedValue\"\n};\n\n@proxy.describeClass(false, {\n methodInfix: \"Transform\"\n})\nexport class TransformerProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends LibProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {\n @proxy.describeMethod({\n type: Types.Number,\n isMatrix: true,\n parameterDescriptors: [domainParameterDescriptor, valueParameterDescriptor, tweakParameterDescriptor]\n })\n forward(domain: number | bigint, matrixValues: Matrix<number | bigint>, tweak: Nullishable<number | bigint>): MatrixResult<TBigInt, ThrowError, TError> {\n return this.setUpMatrixResult(() =>\n Transformer.get(domain, tweak ?? undefined),\n matrixValues, (transformer, value) =>\n this.mapBigInt(transformer.forward(value))\n );\n }\n\n @proxy.describeMethod({\n infixBefore: \"Sequence\",\n type: Types.Number,\n isMatrix: true,\n parameterDescriptors: [domainParameterDescriptor, startValueParameterDescriptor, countParameterDescriptor, tweakParameterDescriptor]\n })\n forwardSequence(domain: number | bigint, startValue: number, count: number, tweak: Nullishable<number | bigint>): MatrixResult<TBigInt, ThrowError, TError> {\n return this.iterableResult(() => {\n this.appExtension.validateSequenceCount(count);\n\n return mapIterable(Transformer.get(domain, tweak ?? undefined).forward(new Sequence(startValue, count)), value => this.mapBigInt(value));\n });\n }\n\n @proxy.describeMethod({\n type: Types.Number,\n isMatrix: true,\n parameterDescriptors: [domainParameterDescriptor, transformedValueParameterDescriptor, tweakParameterDescriptor]\n })\n reverse(domain: number | bigint, matrixTransformedValues: Matrix<number | bigint>, tweak: Nullishable<number | bigint>): MatrixResult<TBigInt, ThrowError, TError> {\n return this.setUpMatrixResult(() =>\n Transformer.get(domain, tweak ?? undefined),\n matrixTransformedValues, (transformer, transformedValue) =>\n this.mapBigInt(transformer.reverse(transformedValue))\n );\n }\n}\n","import { type ExtendsParameterDescriptor, type ParameterDescriptor, Types } from \"../descriptor.js\";\n\nexport const valueParameterDescriptor: ParameterDescriptor = {\n name: \"value\",\n type: Types.Number,\n isMatrix: true,\n isRequired: true\n};\n\nexport const startValueParameterDescriptor: ExtendsParameterDescriptor = {\n extendsDescriptor: valueParameterDescriptor,\n name: \"startValue\",\n isMatrix: false\n};\n\nexport const countParameterDescriptor: ExtendsParameterDescriptor = {\n extendsDescriptor: valueParameterDescriptor,\n name: \"count\",\n isMatrix: false\n};\n\nexport const tweakParameterDescriptor: ParameterDescriptor = {\n name: \"tweak\",\n type: Types.Number,\n isMatrix: false,\n isRequired: false\n};\n","import type { Nullishable } from \"@aidc-toolkit/core\";\nimport { RegExpValidator } from \"@aidc-toolkit/utility\";\nimport { type ParameterDescriptor, Types } from \"../descriptor.js\";\nimport { proxy } from \"../proxy.js\";\nimport type { ErrorExtends, Matrix } from \"../type.js\";\nimport { validateSParameterDescriptor } from \"./string-descriptor.js\";\nimport { StringProxy } from \"./string-proxy.js\";\n\nconst regExpParameterDescriptor: ParameterDescriptor = {\n name: \"regExp\",\n type: Types.String,\n isMatrix: false,\n isRequired: true\n};\n\nconst errorMessageParameterDescriptor: ParameterDescriptor = {\n name: \"errorMessage\",\n type: Types.String,\n isMatrix: false,\n isRequired: false\n};\n\n@proxy.describeClass(false, {\n methodInfix: \"RegExp\"\n})\nexport class RegExpProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends StringProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {\n @proxy.describeMethod({\n type: Types.String,\n isMatrix: true,\n parameterDescriptors: [regExpParameterDescriptor, validateSParameterDescriptor, errorMessageParameterDescriptor]\n })\n validate(regExp: string, matrixSs: Matrix<string>, errorMessage: Nullishable<string>): Matrix<string> {\n return this.validateString(new class extends RegExpValidator {\n protected override createErrorMessage(s: string): string {\n // Replace {{s}} with the invalid string.\n return errorMessage?.replace(/\\{\\{s\\}\\}/ug, s) ?? super.createErrorMessage(s);\n }\n }(new RegExp(regExp, \"u\")), matrixSs);\n }\n\n @proxy.describeMethod({\n type: Types.Boolean,\n isMatrix: true,\n parameterDescriptors: [regExpParameterDescriptor, validateSParameterDescriptor]\n })\n isValid(regExp: string, matrixSs: Matrix<string>): Matrix<boolean> {\n return this.isValidString(this.validate(regExp, matrixSs, undefined));\n }\n}\n","import { type ExtendsParameterDescriptor, type ParameterDescriptor, Types } from \"../descriptor.js\";\n\nexport const sParameterDescriptor: ParameterDescriptor = {\n name: \"s\",\n type: Types.String,\n isMatrix: true,\n isRequired: true\n};\n\nexport const validateSParameterDescriptor: ExtendsParameterDescriptor = {\n extendsDescriptor: sParameterDescriptor,\n name: \"validateS\"\n};\n","import type { StringValidation, StringValidator } from \"@aidc-toolkit/utility\";\nimport { LibProxy } from \"../lib-proxy.js\";\nimport type { ErrorExtends, Matrix } from \"../type.js\";\n\nexport abstract class StringProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends LibProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {\n protected validateString<TStringValidation extends StringValidation>(validator: StringValidator<TStringValidation>, matrixSs: Matrix<string>, validation?: TStringValidation): Matrix<string> {\n return this.matrixErrorResult(matrixSs, (s) => {\n validator.validate(s, validation);\n });\n }\n}\n","import type { Nullishable } from \"@aidc-toolkit/core\";\nimport {\n ALPHABETIC_CREATOR,\n ALPHANUMERIC_CREATOR,\n type CharacterSetCreator,\n type CharacterSetValidation,\n type CharacterSetValidator,\n type Exclusion,\n HEXADECIMAL_CREATOR,\n NUMERIC_CREATOR,\n Sequence\n} from \"@aidc-toolkit/utility\";\nimport type { AppExtension } from \"../app-extension.js\";\nimport { type ExtendsParameterDescriptor, type ParameterDescriptor, Types } from \"../descriptor.js\";\nimport { expandParameterDescriptor, proxy } from \"../proxy.js\";\nimport type { ErrorExtends, Matrix, MatrixResult } from \"../type.js\";\nimport {\n exclusionAnyParameterDescriptor,\n exclusionFirstZeroParameterDescriptor,\n exclusionNoneParameterDescriptor\n} from \"./character-set-descriptor.js\";\nimport { sParameterDescriptor, validateSParameterDescriptor } from \"./string-descriptor.js\";\nimport { StringProxy } from \"./string-proxy.js\";\nimport {\n countParameterDescriptor,\n startValueParameterDescriptor,\n tweakParameterDescriptor,\n valueParameterDescriptor\n} from \"./transformer-descriptor.js\";\n\nconst lengthParameterDescriptor: ParameterDescriptor = {\n name: \"length\",\n type: Types.Number,\n isMatrix: false,\n isRequired: true\n};\n\nconst valueForSParameterDescriptor: ExtendsParameterDescriptor = {\n extendsDescriptor: sParameterDescriptor,\n name: \"valueForS\"\n};\n\n@proxy.describeClass(true)\nexport abstract class CharacterSetValidatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends StringProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {\n readonly #characterSetValidator: CharacterSetValidator;\n\n constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>, characterSetValidator: CharacterSetValidator) {\n super(appExtension);\n\n this.#characterSetValidator = characterSetValidator;\n }\n\n @proxy.describeMethod({\n type: Types.String,\n isMatrix: true,\n parameterDescriptors: [validateSParameterDescriptor, exclusionNoneParameterDescriptor]\n })\n validate(matrixSs: Matrix<string>, exclusion: Nullishable<Exclusion>): Matrix<string> {\n return this.validateString(this.#characterSetValidator, matrixSs, {\n exclusion: exclusion ?? undefined\n } satisfies CharacterSetValidation);\n }\n\n @proxy.describeMethod({\n type: Types.Boolean,\n isMatrix: true,\n parameterDescriptors: [validateSParameterDescriptor, exclusionNoneParameterDescriptor]\n })\n isValid(matrixSs: Matrix<string>, exclusion: Nullishable<Exclusion>): Matrix<boolean> {\n return this.isValidString(this.validate(matrixSs, exclusion));\n }\n}\n\n@proxy.describeClass(true)\nexport abstract class CharacterSetCreatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends CharacterSetValidatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {\n readonly #characterSetCreator: CharacterSetCreator;\n\n constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>, characterSetCreator: CharacterSetCreator) {\n super(appExtension, characterSetCreator);\n\n this.#characterSetCreator = characterSetCreator;\n }\n\n @proxy.describeMethod({\n type: Types.String,\n isMatrix: true,\n parameterDescriptors: [lengthParameterDescriptor, valueParameterDescriptor, exclusionNoneParameterDescriptor, tweakParameterDescriptor]\n })\n create(length: number, matrixValues: Matrix<number | bigint>, exclusion: Nullishable<Exclusion>, tweak: Nullishable<number | bigint>): MatrixResult<string, ThrowError, TError> {\n const exclusionOrUndefined = exclusion ?? undefined;\n const tweakOrUndefined = tweak ?? undefined;\n\n return this.matrixResult(matrixValues, value =>\n this.#characterSetCreator.create(length, value, exclusionOrUndefined, tweakOrUndefined)\n );\n }\n\n @proxy.describeMethod({\n infixBefore: \"Sequence\",\n type: Types.String,\n isMatrix: true,\n parameterDescriptors: [lengthParameterDescriptor, startValueParameterDescriptor, countParameterDescriptor, exclusionNoneParameterDescriptor, tweakParameterDescriptor]\n })\n createSequence(length: number, startValue: number, count: number, exclusion: Nullishable<Exclusion>, tweak: Nullishable<number | bigint>): MatrixResult<string, ThrowError, TError> {\n const exclusionOrUndefined = exclusion ?? undefined;\n const tweakOrUndefined = tweak ?? undefined;\n\n return this.iterableResult(() => {\n this.appExtension.validateSequenceCount(count);\n\n return this.#characterSetCreator.create(length, new Sequence(startValue, count), exclusionOrUndefined, tweakOrUndefined);\n });\n }\n\n @proxy.describeMethod({\n type: Types.Number,\n isMatrix: true,\n parameterDescriptors: [valueForSParameterDescriptor, exclusionNoneParameterDescriptor, tweakParameterDescriptor]\n })\n valueFor(matrixSs: Matrix<string>, exclusion: Nullishable<Exclusion>, tweak: Nullishable<number | bigint>): MatrixResult<TBigInt, ThrowError, TError> {\n const exclusionOrUndefined = exclusion ?? undefined;\n const tweakOrUndefined = tweak ?? undefined;\n\n return this.matrixResult(matrixSs, s =>\n this.mapBigInt(this.#characterSetCreator.valueFor(s, exclusionOrUndefined, tweakOrUndefined))\n );\n }\n}\n\n@proxy.describeClass(false, {\n methodInfix: \"Numeric\",\n replacementParameterDescriptors: [\n {\n name: expandParameterDescriptor(exclusionNoneParameterDescriptor).name,\n replacement: exclusionFirstZeroParameterDescriptor\n }\n ]\n})\nexport class NumericProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends CharacterSetCreatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {\n constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>) {\n super(appExtension, NUMERIC_CREATOR);\n }\n}\n\n@proxy.describeClass(false, {\n methodInfix: \"Hexadecimal\",\n replacementParameterDescriptors: [\n {\n name: expandParameterDescriptor(exclusionNoneParameterDescriptor).name,\n replacement: exclusionAnyParameterDescriptor\n }\n ]\n})\nexport class HexadecimalProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends CharacterSetCreatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {\n constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>) {\n super(appExtension, HEXADECIMAL_CREATOR);\n }\n}\n\n@proxy.describeClass(false, {\n methodInfix: \"Alphabetic\"\n})\nexport class AlphabeticProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends CharacterSetCreatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {\n constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>) {\n super(appExtension, ALPHABETIC_CREATOR);\n }\n}\n\n@proxy.describeClass(false, {\n methodInfix: \"Alphanumeric\",\n replacementParameterDescriptors: [\n {\n name: expandParameterDescriptor(exclusionNoneParameterDescriptor).name,\n replacement: exclusionAnyParameterDescriptor\n }\n ]\n})\nexport class AlphanumericProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends CharacterSetCreatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {\n constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>) {\n super(appExtension, ALPHANUMERIC_CREATOR);\n }\n}\n","import { type ExtendsParameterDescriptor, type ParameterDescriptor, Types } from \"../descriptor.js\";\n\nconst exclusionParameterDescriptor: ParameterDescriptor = {\n name: \"exclusion\",\n type: Types.Number,\n isMatrix: false,\n isRequired: false\n};\n\nexport const exclusionNoneParameterDescriptor: ExtendsParameterDescriptor = {\n extendsDescriptor: exclusionParameterDescriptor,\n sortOrder: 0,\n name: \"exclusionNone\"\n};\n\nexport const exclusionFirstZeroParameterDescriptor: ExtendsParameterDescriptor = {\n extendsDescriptor: exclusionParameterDescriptor,\n sortOrder: 1,\n name: \"exclusionFirstZero\"\n};\n\nexport const exclusionAllNumericParameterDescriptor: ExtendsParameterDescriptor = {\n extendsDescriptor: exclusionParameterDescriptor,\n sortOrder: 2,\n name: \"exclusionAllNumeric\"\n};\n\nexport const exclusionAnyParameterDescriptor: ExtendsParameterDescriptor = {\n extendsDescriptor: exclusionParameterDescriptor,\n sortOrder: 3,\n name: \"exclusionAny\"\n};\n","export * from \"./character-set-proxy.js\";\n\nexport * from \"./check-proxy.js\";\n\nexport * from \"./gtin-validator-proxy.js\";\nexport * from \"./non-gtin-validator-proxy.js\";\n\nexport * from \"./prefix-manager-proxy.js\";\n\nexport * from \"./gtin-creator-proxy.js\";\nexport * from \"./non-gtin-creator-proxy.js\";\n\nexport * from \"./variable-measure-proxy.js\";\n\nexport * from \"./service-proxy.js\";\n","import { AI39_CREATOR, AI64_VALIDATOR, AI82_CREATOR } from \"@aidc-toolkit/gs1\";\nimport type { AppExtension } from \"../app-extension.js\";\nimport { expandParameterDescriptor, proxy } from \"../proxy.js\";\nimport type { ErrorExtends } from \"../type.js\";\nimport {\n exclusionAllNumericParameterDescriptor,\n exclusionNoneParameterDescriptor\n} from \"../utility/character-set-descriptor.js\";\nimport { CharacterSetCreatorProxy, CharacterSetValidatorProxy } from \"../utility/index.js\";\n\n@proxy.describeClass(false, {\n namespace: \"GS1\",\n methodInfix: \"AI82\",\n replacementParameterDescriptors: [\n {\n name: expandParameterDescriptor(exclusionNoneParameterDescriptor).name,\n replacement: exclusionAllNumericParameterDescriptor\n }\n ]\n})\nexport class AI82Proxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends CharacterSetCreatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {\n constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>) {\n super(appExtension, AI82_CREATOR);\n }\n}\n\n@proxy.describeClass(false, {\n namespace: \"GS1\",\n methodInfix: \"AI39\",\n replacementParameterDescriptors: [\n {\n name: expandParameterDescriptor(exclusionNoneParameterDescriptor).name,\n replacement: exclusionAllNumericParameterDescriptor\n }\n ]\n})\nexport class AI39Proxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends CharacterSetCreatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {\n constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>) {\n super(appExtension, AI39_CREATOR);\n }\n}\n\n@proxy.describeClass(false, {\n namespace: \"GS1\",\n methodInfix: \"AI64\"\n})\nexport class AI64Proxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends CharacterSetValidatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {\n constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>) {\n super(appExtension, AI64_VALIDATOR);\n }\n}\n","import {\n checkCharacterPair,\n checkDigit,\n hasValidCheckCharacterPair,\n hasValidCheckDigit,\n isValidPriceOrWeightCheckDigit,\n priceOrWeightCheckDigit\n} from \"@aidc-toolkit/gs1\";\nimport { type ExtendsParameterDescriptor, type ParameterDescriptor, Types } from \"../descriptor.js\";\nimport { LibProxy } from \"../lib-proxy.js\";\nimport { proxy } from \"../proxy.js\";\nimport type { ErrorExtends, Matrix, MatrixResult, SingletonResult } from \"../type.js\";\n\nconst checkSParameterDescriptor: ParameterDescriptor = {\n name: \"checkS\",\n type: Types.String,\n isMatrix: true,\n isRequired: true\n};\n\nconst numericSParameterDescriptor: ExtendsParameterDescriptor = {\n extendsDescriptor: checkSParameterDescriptor,\n name: \"numericS\"\n};\n\nconst numericSFourOrFiveDigitsParameterDescriptor: ExtendsParameterDescriptor = {\n extendsDescriptor: numericSParameterDescriptor,\n sortOrder: 0,\n name: \"numericSFourOrFiveDigits\"\n};\n\nconst numericSWithCheckDigitParameterDescriptor: ExtendsParameterDescriptor = {\n extendsDescriptor: numericSParameterDescriptor,\n sortOrder: 1,\n name: \"numericSWithCheckDigit\"\n};\n\nconst checkDigitParameterDescriptor: ExtendsParameterDescriptor = {\n extendsDescriptor: numericSParameterDescriptor,\n sortOrder: 2,\n name: \"checkDigit\",\n isMatrix: false\n};\n\nconst ai82SParameterDescriptor: ExtendsParameterDescriptor = {\n extendsDescriptor: checkSParameterDescriptor,\n name: \"ai82S\"\n};\n\nconst ai82SWithCheckCharacterPairParameterDescriptor: ExtendsParameterDescriptor = {\n extendsDescriptor: ai82SParameterDescriptor,\n name: \"ai82SWithCheckCharacterPair\"\n};\n\n@proxy.describeClass(false, {\n namespace: \"GS1\"\n})\nexport class CheckProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends LibProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {\n @proxy.describeMethod({\n type: Types.String,\n isMatrix: true,\n parameterDescriptors: [numericSParameterDescriptor]\n })\n checkDigit(matrixSs: Matrix<string>): MatrixResult<string, ThrowError, TError> {\n return this.matrixResult(matrixSs, s => checkDigit(s));\n }\n\n @proxy.describeMethod({\n type: Types.String,\n isMatrix: true,\n parameterDescriptors: [numericSWithCheckDigitParameterDescriptor]\n })\n hasValidCheckDigit(matrixSs: Matrix<string>): MatrixResult<boolean, ThrowError, TError> {\n return this.matrixResult(matrixSs, s => hasValidCheckDigit(s));\n }\n\n @proxy.describeMethod({\n type: Types.String,\n isMatrix: true,\n parameterDescriptors: [numericSFourOrFiveDigitsParameterDescriptor]\n })\n priceOrWeightCheckDigit(matrixSs: Matrix<string>): MatrixResult<string, ThrowError, TError> {\n return this.matrixResult(matrixSs, s => priceOrWeightCheckDigit(s));\n }\n\n @proxy.describeMethod({\n type: Types.String,\n isMatrix: false,\n parameterDescriptors: [{\n ...numericSFourOrFiveDigitsParameterDescriptor,\n isMatrix: false\n }, checkDigitParameterDescriptor]\n })\n isValidPriceOrWeightCheckDigit(s: string, checkDigit: string): SingletonResult<boolean, ThrowError, TError> {\n return this.singletonResult(() => isValidPriceOrWeightCheckDigit(s, checkDigit));\n }\n\n @proxy.describeMethod({\n type: Types.String,\n isMatrix: true,\n parameterDescriptors: [ai82SParameterDescriptor]\n })\n checkCharacterPair(matrixSs: Matrix<string>): MatrixResult<string, ThrowError, TError> {\n return this.matrixResult(matrixSs, s => checkCharacterPair(s));\n }\n\n @proxy.describeMethod({\n type: Types.String,\n isMatrix: true,\n parameterDescriptors: [ai82SWithCheckCharacterPairParameterDescriptor]\n })\n hasValidCheckCharacterPair(matrixSs: Matrix<string>): MatrixResult<boolean, ThrowError, TError> {\n return this.matrixResult(matrixSs, s => hasValidCheckCharacterPair(s));\n }\n}\n","import type { Nullishable } from \"@aidc-toolkit/core\";\nimport { GTINLengths, type GTINLevel, GTINValidator, IdentifierValidators } from \"@aidc-toolkit/gs1\";\nimport type { AppExtension } from \"../app-extension.js\";\nimport { type ExtendsParameterDescriptor, type ParameterDescriptor, Types } from \"../descriptor.js\";\nimport { LibProxy } from \"../lib-proxy.js\";\nimport { proxy } from \"../proxy.js\";\nimport type { ErrorExtends, Matrix, MatrixResult } from \"../type.js\";\nimport { indicatorDigitParameterDescriptor } from \"./gtin-descriptor.js\";\nimport { identifierParameterDescriptor } from \"./identifier-descriptor.js\";\nimport { GTINValidatorProxy } from \"./identifier-validator-proxy.js\";\n\n@proxy.describeClass(false, {\n namespace: \"GS1\",\n methodInfix: \"GTIN13\"\n})\nexport class GTIN13ValidatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends GTINValidatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {\n constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>) {\n super(appExtension, IdentifierValidators.GTIN[GTINLengths.GTIN13]);\n }\n}\n\n@proxy.describeClass(false, {\n namespace: \"GS1\",\n methodInfix: \"GTIN12\"\n})\nexport class GTIN12ValidatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends GTINValidatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {\n constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>) {\n super(appExtension, IdentifierValidators.GTIN[GTINLengths.GTIN12]);\n }\n}\n\n@proxy.describeClass(false, {\n namespace: \"GS1\",\n methodInfix: \"GTIN8\"\n})\nexport class GTIN8ValidatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends GTINValidatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {\n constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>) {\n super(appExtension, IdentifierValidators.GTIN[GTINLengths.GTIN8]);\n }\n}\n\nconst zeroSuppressibleGTIN12ParameterDescriptor: ExtendsParameterDescriptor = {\n extendsDescriptor: identifierParameterDescriptor,\n name: \"zeroSuppressibleGTIN12\"\n};\n\nconst zeroSuppressedGTIN12ParameterDescriptor: ExtendsParameterDescriptor = {\n extendsDescriptor: identifierParameterDescriptor,\n name: \"zeroSuppressedGTIN12\"\n};\n\nconst convertGTINParameterDescriptor: ExtendsParameterDescriptor = {\n extendsDescriptor: identifierParameterDescriptor,\n name: \"convertGTIN\"\n};\n\nconst normalizeGTINParameterDescriptor: ExtendsParameterDescriptor = {\n extendsDescriptor: identifierParameterDescriptor,\n name: \"normalizeGTIN\"\n};\n\nconst validateGTINParameterDescriptor: ExtendsParameterDescriptor = {\n extendsDescriptor: identifierParameterDescriptor,\n name: \"validateGTIN\"\n};\n\nconst gtinLevelParameterDescriptor: ParameterDescriptor = {\n name: \"gtinLevel\",\n type: Types.Number,\n isMatrix: false,\n isRequired: false\n};\n\nconst validateGTIN14ParameterDescriptor: ExtendsParameterDescriptor = {\n extendsDescriptor: identifierParameterDescriptor,\n name: \"validateGTIN14\"\n};\n\n@proxy.describeClass(false, {\n namespace: \"GS1\"\n})\nexport class GTINValidatorStaticProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends LibProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {\n @proxy.describeMethod({\n type: Types.String,\n isMatrix: true,\n parameterDescriptors: [zeroSuppressibleGTIN12ParameterDescriptor]\n })\n zeroSuppressGTIN12(matrixGTIN12s: Matrix<string>): MatrixResult<string, ThrowError, TError> {\n return this.matrixResult(matrixGTIN12s, gtin12 => GTINValidator.zeroSuppress(gtin12));\n }\n\n @proxy.describeMethod({\n type: Types.String,\n isMatrix: true,\n parameterDescriptors: [zeroSuppressedGTIN12ParameterDescriptor]\n })\n zeroExpandGTIN12(matrixZeroSuppressedGTIN12s: Matrix<string>): MatrixResult<string, ThrowError, TError> {\n return this.matrixResult(matrixZeroSuppressedGTIN12s, zeroSuppressedGTIN12 => GTINValidator.zeroExpand(zeroSuppressedGTIN12));\n }\n\n @proxy.describeMethod({\n type: Types.String,\n isMatrix: true,\n parameterDescriptors: [indicatorDigitParameterDescriptor, convertGTINParameterDescriptor]\n })\n convertToGTIN14(indicatorDigit: string, matrixGTINs: Matrix<string>): MatrixResult<string, ThrowError, TError> {\n return this.matrixResult(matrixGTINs, gtin => GTINValidator.convertToGTIN14(indicatorDigit, gtin));\n }\n\n @proxy.describeMethod({\n type: Types.String,\n isMatrix: true,\n parameterDescriptors: [normalizeGTINParameterDescriptor]\n })\n normalizeGTIN(matrixGTINs: Matrix<string>): MatrixResult<string, ThrowError, TError> {\n return this.matrixResult(matrixGTINs, gtin => GTINValidator.normalize(gtin));\n }\n\n @proxy.describeMethod({\n type: Types.String,\n isMatrix: true,\n parameterDescriptors: [validateGTINParameterDescriptor, gtinLevelParameterDescriptor]\n })\n validateGTIN(matrixGTINs: Matrix<string>, gtinLevel: Nullishable<GTINLevel>): Matrix<string> {\n const gtinLevelOrUndefined = gtinLevel ?? undefined;\n\n return this.matrixErrorResult(matrixGTINs, (gtin) => {\n GTINValidator.validateAny(gtin, gtinLevelOrUndefined);\n });\n }\n\n @proxy.describeMethod({\n type: Types.String,\n isMatrix: true,\n parameterDescriptors: [validateGTINParameterDescriptor, gtinLevelParameterDescriptor]\n })\n isValidGTIN(matrixGTINs: Matrix<string>, gtinLevel: Nullishable<GTINLevel>): Matrix<boolean> {\n return this.isValidString(this.validateGTIN(matrixGTINs, gtinLevel));\n }\n\n @proxy.describeMethod({\n type: Types.String,\n isMatrix: true,\n parameterDescriptors: [validateGTIN14ParameterDescriptor]\n })\n validateGTIN14(matrixGTIN14s: Matrix<string>): Matrix<string> {\n return this.matrixErrorResult(matrixGTIN14s, (gtin14) => {\n GTINValidator.validateGTIN14(gtin14);\n });\n }\n\n @proxy.describeMethod({\n type: Types.String,\n isMatrix: true,\n parameterDescriptors: [validateGTIN14ParameterDescriptor]\n })\n isValidGTIN14(matrixGTIN14s: Matrix<string>): Matrix<boolean> {\n return this.isValidString(this.validateGTIN14(matrixGTIN14s));\n }\n}\n","import { type ParameterDescriptor, Types } from \"../descriptor.js\";\n\nexport const indicatorDigitParameterDescriptor: ParameterDescriptor = {\n name: \"indicatorDigit\",\n type: Types.String,\n isMatrix: false,\n isRequired: true\n};\n","import { type ParameterDescriptor, Types } from \"../descriptor.js\";\n\nexport const identifierTypeParameterDescriptor: ParameterDescriptor = {\n name: \"identifierType\",\n type: Types.String,\n isMatrix: false,\n isRequired: true\n};\n\nexport const identifierParameterDescriptor: ParameterDescriptor = {\n name: \"identifier\",\n type: Types.String,\n isMatrix: true,\n isRequired: true\n};\n","import type { Nullishable } from \"@aidc-toolkit/core\";\nimport type {\n GTINType,\n IdentifierType,\n IdentifierTypeValidator,\n NonGTINNumericIdentifierType,\n NonNumericIdentifierType,\n NonNumericIdentifierValidation,\n NonSerializableNumericIdentifierType,\n NumericIdentifierType,\n SerializableNumericIdentifierType\n} from \"@aidc-toolkit/gs1\";\nimport type { AppExtension } from \"../app-extension.js\";\nimport { type ExtendsParameterDescriptor, Types } from \"../descriptor.js\";\nimport { proxy } from \"../proxy.js\";\nimport type { ErrorExtends, Matrix, MatrixResult } from \"../type.js\";\nimport { exclusionAllNumericParameterDescriptor } from \"../utility/character-set-descriptor.js\";\nimport { StringProxy } from \"../utility/string-proxy.js\";\nimport { identifierParameterDescriptor } from \"./identifier-descriptor.js\";\n\nconst validateIdentifierParameterDescriptor: ExtendsParameterDescriptor = {\n extendsDescriptor: identifierParameterDescriptor,\n sortOrder: 0,\n name: \"validateIdentifier\"\n};\n\nconst splitIdentifierParameterDescriptor: ExtendsParameterDescriptor = {\n extendsDescriptor: identifierParameterDescriptor,\n sortOrder: 1,\n name: \"splitIdentifier\"\n};\n\nabstract class IdentifierValidatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt, TIdentifierType extends IdentifierType> extends StringProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {\n readonly #validator: IdentifierTypeValidator<TIdentifierType>;\n\n constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>, validator: IdentifierTypeValidator<TIdentifierType>) {\n super(appExtension);\n\n this.#validator = validator;\n }\n\n protected get validator(): IdentifierTypeValidator<TIdentifierType> {\n return this.#validator;\n }\n}\n\n@proxy.describeClass(true, {\n namespace: \"GS1\"\n})\nabstract class NumericIdentifierValidatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt, TNumericIdentifierType extends NumericIdentifierType> extends IdentifierValidatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt, TNumericIdentifierType> {\n @proxy.describeMethod({\n type: Types.String,\n isMatrix: true,\n parameterDescriptors: [validateIdentifierParameterDescriptor]\n })\n validate(matrixIdentifiers: Matrix<string>): Matrix<string> {\n return this.validateString(this.validator, matrixIdentifiers);\n }\n\n @proxy.describeMethod({\n type: Types.String,\n isMatrix: true,\n parameterDescriptors: [validateIdentifierParameterDescriptor]\n })\n isValid(matrixIdentifiers: Matrix<string>): Matrix<boolean> {\n return this.isValidString(this.validate(matrixIdentifiers));\n }\n}\n\nexport abstract class GTINValidatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends NumericIdentifierValidatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt, GTINType> {\n}\n\nabstract class NonGTINNumericIdentifierValidatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt, TNonGTINNumericIdentifierType extends NonGTINNumericIdentifierType = NonGTINNumericIdentifierType> extends NumericIdentifierValidatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt, TNonGTINNumericIdentifierType> {\n}\n\nexport abstract class NonSerializableNumericIdentifierValidatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends NonGTINNumericIdentifierValidatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt, NonSerializableNumericIdentifierType> {\n}\n\n@proxy.describeClass(true, {\n namespace: \"GS1\"\n})\nexport abstract class SerializableNumericIdentifierValidatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends NonGTINNumericIdentifierValidatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt, SerializableNumericIdentifierType> {\n @proxy.describeMethod({\n type: Types.String,\n isMatrix: true,\n parameterDescriptors: [splitIdentifierParameterDescriptor]\n })\n split(matrixIdentifiers: Matrix<string>): MatrixResult<string, ThrowError, TError> {\n return this.arrayResult(matrixIdentifiers, (identifier) => {\n const serializableNumericIdentifierSplit = this.validator.split(identifier);\n\n return [serializableNumericIdentifierSplit.baseIdentifier, serializableNumericIdentifierSplit.serialComponent];\n });\n }\n}\n\n@proxy.describeClass(true, {\n namespace: \"GS1\"\n})\nexport abstract class NonNumericIdentifierValidatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends IdentifierValidatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt, NonNumericIdentifierType> {\n @proxy.describeMethod({\n type: Types.String,\n isMatrix: true,\n parameterDescriptors: [validateIdentifierParameterDescriptor, exclusionAllNumericParameterDescriptor]\n })\n validate(matrixIdentifiers: Matrix<string>, exclusion: Nullishable<NonNumericIdentifierValidation[\"exclusion\"]>): Matrix<string> {\n return this.validateString(this.validator, matrixIdentifiers, {\n exclusion: exclusion ?? undefined\n } satisfies NonNumericIdentifierValidation);\n }\n\n @proxy.describeMethod({\n type: Types.String,\n isMatrix: true,\n parameterDescriptors: [validateIdentifierParameterDescriptor, exclusionAllNumericParameterDescriptor]\n })\n isValid(matrixIdentifiers: Matrix<string>, exclusion: Nullishable<NonNumericIdentifierValidation[\"exclusion\"]>): Matrix<boolean> {\n return this.isValidString(this.validate(matrixIdentifiers, exclusion));\n }\n}\n","import { IdentifierValidators } from \"@aidc-toolkit/gs1\";\nimport type { AppExtension } from \"../app-extension.js\";\nimport { proxy } from \"../proxy.js\";\nimport type { ErrorExtends } from \"../type.js\";\nimport {\n NonNumericIdentifierValidatorProxy,\n NonSerializableNumericIdentifierValidatorProxy,\n SerializableNumericIdentifierValidatorProxy\n} from \"./identifier-validator-proxy.js\";\n\n@proxy.describeClass(false, {\n namespace: \"GS1\",\n methodInfix: \"GLN\"\n})\nexport class GLNValidatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends NonSerializableNumericIdentifierValidatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {\n constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>) {\n super(appExtension, IdentifierValidators.GLN);\n }\n}\n\n@proxy.describeClass(false, {\n namespace: \"GS1\",\n methodInfix: \"SSCC\"\n})\nexport class SSCCValidatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends NonSerializableNumericIdentifierValidatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {\n constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>) {\n super(appExtension, IdentifierValidators.SSCC);\n }\n}\n\n@proxy.describeClass(false, {\n namespace: \"GS1\",\n methodInfix: \"GRAI\"\n})\nexport class GRAIValidatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends SerializableNumericIdentifierValidatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {\n constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>) {\n super(appExtension, IdentifierValidators.GRAI);\n }\n}\n\n@proxy.describeClass(false, {\n namespace: \"GS1\",\n methodInfix: \"GIAI\"\n})\nexport class GIAIValidatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends NonNumericIdentifierValidatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {\n constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>) {\n super(appExtension, IdentifierValidators.GIAI);\n }\n}\n\n@proxy.describeClass(false, {\n namespace: \"GS1\",\n methodInfix: \"GSRN\"\n})\nexport class GSRNValidatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends NonSerializableNumericIdentifierValidatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {\n constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>) {\n super(appExtension, IdentifierValidators.GSRN);\n }\n}\n\n@proxy.describeClass(false, {\n namespace: \"GS1\",\n methodInfix: \"GDTI\"\n})\nexport class GDTIValidatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends SerializableNumericIdentifierValidatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {\n constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>) {\n super(appExtension, IdentifierValidators.GDTI);\n }\n}\n\n@proxy.describeClass(false, {\n namespace: \"GS1\",\n methodInfix: \"GINC\"\n})\nexport class GINCValidatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends NonNumericIdentifierValidatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {\n constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>) {\n super(appExtension, IdentifierValidators.GINC);\n }\n}\n\n@proxy.describeClass(false, {\n namespace: \"GS1\",\n methodInfix: \"GSIN\"\n})\nexport class GSINValidatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends NonSerializableNumericIdentifierValidatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {\n constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>) {\n super(appExtension, IdentifierValidators.GSIN);\n }\n}\n\n@proxy.describeClass(false, {\n namespace: \"GS1\",\n methodInfix: \"GCN\"\n})\nexport class GCNValidatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends SerializableNumericIdentifierValidatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {\n constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>) {\n super(appExtension, IdentifierValidators.GCN);\n }\n}\n\n@proxy.describeClass(false, {\n namespace: \"GS1\",\n methodInfix: \"CPID\"\n})\nexport class CPIDValidatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends NonNumericIdentifierValidatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {\n constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>) {\n super(appExtension, IdentifierValidators.CPID);\n }\n}\n\n@proxy.describeClass(false, {\n namespace: \"GS1\",\n methodInfix: \"GMN\"\n})\nexport class GMNValidatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends NonNumericIdentifierValidatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {\n constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>) {\n super(appExtension, IdentifierValidators.GMN);\n }\n}\n","import type { Nullishable } from \"@aidc-toolkit/core\";\nimport { type GCPLengthData, PrefixManager, type PrefixType, RemoteGCPLengthCache } from \"@aidc-toolkit/gs1\";\nimport type { AppData } from \"../app-data.js\";\nimport { AppExtension } from \"../app-extension.js\";\nimport { type ExtendsParameterDescriptor, type ParameterDescriptor, Types } from \"../descriptor.js\";\nimport { LibProxy } from \"../lib-proxy.js\";\nimport { proxy } from \"../proxy.js\";\nimport type { ErrorExtends, Matrix, MatrixResult, SingletonResult } from \"../type.js\";\nimport { identifierParameterDescriptor, identifierTypeParameterDescriptor } from \"./identifier-descriptor.js\";\nimport { validateIdentifierType } from \"./identifier-type.js\";\n\nconst prefixParameterDescriptor: ParameterDescriptor = {\n name: \"prefix\",\n type: Types.String,\n isMatrix: false,\n isRequired: true\n};\n\nconst prefixTypeParameterDescriptor: ParameterDescriptor = {\n name: \"prefixType\",\n type: Types.Number,\n isMatrix: false,\n isRequired: false\n};\n\nconst tweakFactorParameterDescriptor: ParameterDescriptor = {\n name: \"tweakFactor\",\n type: Types.Number,\n isMatrix: false,\n isRequired: false\n};\n\nconst gcpLengthIdentifierParameterDescriptor: ExtendsParameterDescriptor = {\n extendsDescriptor: identifierParameterDescriptor,\n name: \"gcpLengthIdentifier\"\n};\n\n/**\n * GS1 Company Prefix length application data.\n */\ninterface GCPLengthAppData {\n /**\n * Next check date/time.\n */\n nextCheckDateTime: Date | undefined;\n\n /**\n * GS1 Company Prefix length data.\n */\n gcpLengthData: GCPLengthData | undefined;\n}\n\n/**\n * Determine if data object is GS1 Company Prefix length application data.\n *\n * @param data\n * Data object.\n *\n * @returns\n * True if data object is GS1 Company Prefix length application data.\n */\nfunction isGCPLengthAppData(data: AppData | undefined): data is GCPLengthAppData {\n // Property type check is necessary to guard against data corruption or changes in format.\n return typeof data === \"object\" && \"nextCheckDateTime\" in data && data.nextCheckDateTime instanceof Date;\n}\n\n/**\n * Application extension GCP length cache. Data is stored in application extension shared data.\n */\nclass AppExtensionGCPLengthCache<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends RemoteGCPLengthCache {\n /**\n * GS1 Company Prefix length data property name.\n */\n static readonly #GCP_LENGTH_DATA_NAME = `${AppExtension.APPLICATION_NAME_PREFIX}gcpLength`;\n\n /**\n * Application extension.\n */\n readonly #appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>;\n\n #gcpLengthAppData?: GCPLengthAppData | undefined;\n\n /**\n * Constructor.\n *\n * @param appExtension\n * Application extension.\n */\n constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>) {\n super();\n\n this.#appExtension = appExtension;\n }\n \n async initialize(): Promise<void> {\n const gcpLengthAppData = await this.#appExtension.getSharedData(AppExtensionGCPLengthCache.#GCP_LENGTH_DATA_NAME);\n\n if (isGCPLengthAppData(gcpLengthAppData)) {\n this.#gcpLengthAppData = gcpLengthAppData;\n\n this.#appExtension.logger.trace(\"GS1 Company Prefix length data loaded from shared data\");\n }\n }\n\n get nextCheckDateTime(): Date | undefined {\n const nextCheckDateTime = this.#gcpLengthAppData?.nextCheckDateTime;\n\n this.#appExtension.logger.debug(`GS1 Company Prefix length next check date/time ${nextCheckDateTime?.toISOString()}`);\n\n return nextCheckDateTime;\n }\n\n get cacheDateTime(): Date | undefined {\n const cacheDateTime = this.#gcpLengthAppData?.gcpLengthData?.dateTime;\n\n this.#appExtension.logger.debug(`GS1 Company Prefix length cache date/time ${cacheDateTime?.toISOString()}`);\n\n return cacheDateTime;\n }\n\n get cacheData(): GCPLengthData {\n this.#appExtension.logger.debug(\"GS1 Company Prefix length cache data retrieved\");\n\n const gcpLengthData = this.#gcpLengthAppData?.gcpLengthData;\n\n if (gcpLengthData === undefined) {\n // Application bug; localization not necessary.\n throw new Error(\"Cache data not defined\");\n }\n\n return gcpLengthData;\n }\n\n override get sourceDateTime(): Promise<Date> {\n return super.sourceDateTime.then((sourceDateTime) => {\n this.#appExtension.logger.debug(`GS1 Company Prefix source date/time ${sourceDateTime.toISOString()}`);\n\n return sourceDateTime;\n });\n }\n\n override get sourceData(): Promise<GCPLengthData> {\n return super.sourceData.then((sourceData) => {\n this.#appExtension.logger.debug(\"GS1 Company Prefix length source data retrieved\");\n\n return sourceData;\n });\n }\n\n /**\n * @inheritDoc\n */\n async update(nextCheckDateTime: Date, _cacheDateTime?: Date, cacheData?: GCPLengthData): Promise<void> {\n this.#gcpLengthAppData = {\n nextCheckDateTime,\n gcpLengthData: cacheData ?? this.#gcpLengthAppData?.gcpLengthData\n };\n\n await this.#appExtension.setSharedData(AppExtensionGCPLengthCache.#GCP_LENGTH_DATA_NAME, this.#gcpLengthAppData);\n\n this.#appExtension.logger.trace(`GS1 Company Prefix length saved to shared data with next check date/time ${nextCheckDateTime.toISOString()}`);\n }\n}\n\n@proxy.describeClass(false, {\n namespace: \"GS1\"\n})\nexport class PrefixManagerProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends LibProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {\n #gcpLengthCache?: AppExtensionGCPLengthCache<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>;\n \n @proxy.describeMethod({\n type: Types.Any,\n isMatrix: true,\n parameterDescriptors: [prefixParameterDescriptor, prefixTypeParameterDescriptor, tweakFactorParameterDescriptor]\n })\n definePrefix(prefix: string, prefixType: Nullishable<PrefixType>, tweakFactor: Nullishable<number>): Matrix<unknown> {\n // Parameters will be validated by IdentifierCreatorProxy.getCreator().\n return [[prefix, prefixType, tweakFactor]];\n }\n\n /**\n * Load GS1 Company Prefix length data.\n */\n async #loadGCPLengthData(): Promise<void> {\n const appExtension = this.appExtension;\n\n if (this.#gcpLengthCache === undefined) {\n this.#gcpLengthCache = new AppExtensionGCPLengthCache(this.appExtension);\n\n await this.#gcpLengthCache.initialize();\n }\n\n const gcpLengthCache = this.#gcpLengthCache;\n\n await PrefixManager.loadGCPLengthData(gcpLengthCache).catch((e: unknown) => {\n // Swallow error and log it.\n appExtension.logger.error(\"Load GS1 Company Prefix length data failed\", e);\n });\n }\n\n @proxy.describeMethod({\n type: Types.Number,\n isMatrix: true,\n parameterDescriptors: [identifierTypeParameterDescriptor, gcpLengthIdentifierParameterDescriptor]\n })\n async gcpLength(identifierType: string, matrixIdentifiers: Matrix<string>): Promise<MatrixResult<number, ThrowError, TError>> {\n await this.#loadGCPLengthData();\n\n return this.setUpMatrixResult(() =>\n validateIdentifierType(identifierType),\n matrixIdentifiers, (validatedIdentifierType, identifier) =>\n PrefixManager.gcpLength(validatedIdentifierType, identifier)\n );\n }\n\n @proxy.describeMethod({\n type: Types.String,\n isMatrix: false,\n parameterDescriptors: []\n })\n async gcpLengthDateTime(): Promise<SingletonResult<string, ThrowError, TError>> {\n await this.#loadGCPLengthData();\n\n return this.singletonResult(() => PrefixManager.gcpLengthDateTime().toISOString());\n }\n\n @proxy.describeMethod({\n type: Types.String,\n isMatrix: false,\n parameterDescriptors: []\n })\n async gcpLengthDisclaimer(): Promise<SingletonResult<string, ThrowError, TError>> {\n await this.#loadGCPLengthData();\n\n return this.singletonResult(() => PrefixManager.gcpLengthDisclaimer());\n }\n}\n","import { type IdentifierType, IdentifierTypes } from \"@aidc-toolkit/gs1\";\nimport { i18nextAppExtension } from \"../locale/i18n.js\";\n\n/**\n * Determine if an identifier type is valid.\n *\n * @param identifierType\n * Identifier type.\n *\n * @returns\n * True if identifier type is valid.\n */\nexport function isIdentifierType(identifierType: string): identifierType is IdentifierType {\n return identifierType in IdentifierTypes;\n}\n\n/**\n * Validate an identifier type and return it normalized.\n *\n * @param identifierType\n * Identifier type.\n *\n * @returns\n * Normalized identifier type.\n */\nexport function validateIdentifierType(identifierType: string): IdentifierType {\n // Ignore case.\n const upperIdentifierType = identifierType.toUpperCase();\n\n if (!isIdentifierType(upperIdentifierType)) {\n throw new RangeError(i18nextAppExtension.t(\"ServiceProxy.invalidIdentifierType\", {\n identifierType\n }));\n }\n\n return upperIdentifierType;\n}\n","import { isNullish, type Nullishable } from \"@aidc-toolkit/core\";\nimport {\n type IdentifierCreator,\n type IdentifierType,\n type IdentifierValidation,\n type NonGTINNumericIdentifierCreator,\n type NonGTINNumericIdentifierType,\n type NonNumericIdentifierCreator,\n type NonNumericIdentifierType,\n type NonNumericIdentifierValidation,\n type NonSerializableNumericIdentifierType,\n type NumericIdentifierCreator,\n type NumericIdentifierType,\n type NumericIdentifierValidation,\n PrefixManager,\n type PrefixType,\n PrefixTypes,\n PrefixValidator,\n type SerializableNumericIdentifierCreator,\n type SerializableNumericIdentifierType\n} from \"@aidc-toolkit/gs1\";\nimport { Sequence } from \"@aidc-toolkit/utility\";\nimport type { AppExtension } from \"../app-extension.js\";\nimport { type ExtendsParameterDescriptor, type ParameterDescriptor, Types } from \"../descriptor.js\";\nimport { LibProxy } from \"../lib-proxy.js\";\nimport { i18nextAppExtension } from \"../locale/i18n.js\";\nimport { proxy } from \"../proxy.js\";\nimport type { ErrorExtends, Matrix, MatrixResult } from \"../type.js\";\nimport {\n countParameterDescriptor,\n startValueParameterDescriptor,\n valueParameterDescriptor\n} from \"../utility/transformer-descriptor.js\";\nimport { identifierParameterDescriptor } from \"./identifier-descriptor.js\";\nimport { prefixDefinitionGS1UPCParameterDescriptor } from \"./prefix-definition-descriptor.js\";\n\nabstract class IdentifierCreatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt, TIdentifierType extends IdentifierType, TIdentifierValidation extends IdentifierValidation, TIdentifierCreator extends IdentifierCreator<TIdentifierType, TIdentifierValidation>> extends LibProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {\n static readonly #PREFIX_TYPES: Array<PrefixType | undefined> = [PrefixTypes.GS1CompanyPrefix, PrefixTypes.UPCCompanyPrefix, PrefixTypes.GS18Prefix];\n\n readonly #getCreator: (prefixManager: PrefixManager) => TIdentifierCreator;\n\n constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>, getCreator: (prefixManager: PrefixManager) => TIdentifierCreator) {\n super(appExtension);\n\n this.#getCreator = getCreator;\n }\n\n protected getCreator(prefixDefinition: Matrix<unknown>): TIdentifierCreator {\n const reducedPrefixDefinition = prefixDefinition.length === 1 ?\n // Prefix definition is horizontal.\n prefixDefinition[0] :\n // Prefix definition is vertical.\n prefixDefinition.map((prefixDefinitionRow) => {\n if (prefixDefinitionRow.length !== 1) {\n throw new RangeError(i18nextAppExtension.t(\"IdentifierCreatorProxy.prefixDefinitionMustBeOneDimensional\"));\n }\n\n return prefixDefinitionRow[0];\n });\n\n if (reducedPrefixDefinition.length > 3) {\n throw new RangeError(i18nextAppExtension.t(\"IdentifierCreatorProxy.prefixDefinitionMustHaveMaximumThreeElements\"));\n }\n const prefix = reducedPrefixDefinition[0];\n\n if (typeof prefix !== \"string\") {\n throw new RangeError(i18nextAppExtension.t(\"IdentifierCreatorProxy.prefixMustBeString\"));\n }\n\n const prefixTypeIndex = reducedPrefixDefinition[1] ?? 0;\n\n if (typeof prefixTypeIndex !== \"number\" || prefixTypeIndex < 0 || prefixTypeIndex >= IdentifierCreatorProxy.#PREFIX_TYPES.length) {\n throw new RangeError(i18nextAppExtension.t(\"IdentifierCreatorProxy.prefixTypeMustBeNumber\", {\n maximumPrefixType: IdentifierCreatorProxy.#PREFIX_TYPES.length - 1\n }));\n }\n\n const prefixType = IdentifierCreatorProxy.#PREFIX_TYPES[prefixTypeIndex];\n\n // Undefined is included in type in case of invalid input.\n if (prefixType === undefined) {\n throw new RangeError(i18nextAppExtension.t(\"IdentifierCreatorProxy.invalidPrefixType\"));\n }\n\n const prefixManager = PrefixManager.get(prefixType, prefix);\n\n const tweakFactor = reducedPrefixDefinition[2];\n\n if (!isNullish(tweakFactor)) {\n if (typeof tweakFactor !== \"number\") {\n throw new RangeError(i18nextAppExtension.t(\"IdentifierCreatorProxy.tweakFactorMustBeNumber\"));\n }\n\n prefixManager.tweakFactor = tweakFactor;\n } else {\n prefixManager.resetTweakFactor();\n }\n\n return this.#getCreator(prefixManager);\n }\n}\n\nexport const sparseParameterDescriptor: ParameterDescriptor = {\n name: \"sparse\",\n type: Types.Boolean,\n isMatrix: false,\n isRequired: false\n};\n\n@proxy.describeClass(true, {\n namespace: \"GS1\"\n})\nexport abstract class NumericIdentifierCreatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt, TNumericIdentifierType extends NumericIdentifierType, TNumericIdentifierCreator extends NumericIdentifierCreator<TNumericIdentifierType>> extends IdentifierCreatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt, TNumericIdentifierType, NumericIdentifierValidation, TNumericIdentifierCreator> {\n @proxy.describeMethod({\n type: Types.String,\n isMatrix: true,\n parameterDescriptors: [prefixDefinitionGS1UPCParameterDescriptor, valueParameterDescriptor, sparseParameterDescriptor]\n })\n create(prefixDefinition: Matrix<unknown>, matrixValues: Matrix<number | bigint>, sparse: Nullishable<boolean>): MatrixResult<string, ThrowError, TError> {\n const sparseOrUndefined = sparse ?? undefined;\n\n return this.setUpMatrixResult(() =>\n this.getCreator(prefixDefinition),\n matrixValues, (creator, value) =>\n creator.create(value, sparseOrUndefined)\n );\n }\n\n @proxy.describeMethod({\n infixBefore: \"Sequence\",\n type: Types.String,\n isMatrix: true,\n parameterDescriptors: [prefixDefinitionGS1UPCParameterDescriptor, startValueParameterDescriptor, countParameterDescriptor, sparseParameterDescriptor]\n })\n createSequence(prefixDefinition: Matrix<unknown>, startValue: number, count: number, sparse: Nullishable<boolean>): MatrixResult<string, ThrowError, TError> {\n return this.iterableResult(() => {\n this.appExtension.validateSequenceCount(count);\n\n return this.getCreator(prefixDefinition).create(new Sequence(startValue, count), sparse ?? undefined);\n });\n }\n\n @proxy.describeMethod({\n type: Types.String,\n isMatrix: true,\n parameterDescriptors: [prefixDefinitionGS1UPCParameterDescriptor]\n })\n createAll(prefixDefinition: Matrix<unknown>): MatrixResult<string, ThrowError, TError> {\n return this.iterableResult(() => {\n const creator = this.getCreator(prefixDefinition);\n\n this.appExtension.validateSequenceCount(creator.capacity);\n\n return creator.createAll();\n });\n }\n}\n\nabstract class NonGTINNumericIdentifierCreatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt, TNonGTINNumericIdentifierType extends NonGTINNumericIdentifierType, TNonGTINNumericIdentifierCreator extends NonGTINNumericIdentifierCreator> extends NumericIdentifierCreatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt, TNonGTINNumericIdentifierType, TNonGTINNumericIdentifierCreator> {\n}\n\nexport abstract class NonSerializableNumericIdentifierCreatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt, TNonSerializableNumericIdentifierType extends NonSerializableNumericIdentifierType, TNonGTINNumericIdentifierCreator extends NonGTINNumericIdentifierCreator> extends NonGTINNumericIdentifierCreatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt, TNonSerializableNumericIdentifierType, TNonGTINNumericIdentifierCreator> {\n}\n\nconst singleValueParameterDescriptor: ExtendsParameterDescriptor = {\n extendsDescriptor: valueParameterDescriptor,\n isMatrix: false\n};\n\nconst baseIdentifierParameterDescriptor: ExtendsParameterDescriptor = {\n extendsDescriptor: identifierParameterDescriptor,\n name: \"baseIdentifier\",\n isMatrix: false\n};\n\nconst serialComponentParameterDescriptor: ParameterDescriptor = {\n name: \"serialComponent\",\n type: Types.String,\n isMatrix: true,\n isRequired: true\n};\n\n@proxy.describeClass(true, {\n namespace: \"GS1\"\n})\nexport abstract class SerializableNumericIdentifierCreatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends NonGTINNumericIdentifierCreatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt, SerializableNumericIdentifierType, SerializableNumericIdentifierCreator> {\n @proxy.describeMethod({\n type: Types.String,\n isMatrix: true,\n parameterDescriptors: [prefixDefinitionGS1UPCParameterDescriptor, singleValueParameterDescriptor, serialComponentParameterDescriptor, sparseParameterDescriptor]\n })\n createSerialized(prefixDefinition: Matrix<unknown>, value: number, matrixSerialComponents: Matrix<string>, sparse: Nullishable<boolean>): MatrixResult<string, ThrowError, TError> {\n const sparseOrUndefined = sparse ?? undefined;\n\n return this.setUpMatrixResult(() =>\n this.getCreator(prefixDefinition),\n matrixSerialComponents, (creator, serialComponent) =>\n creator.createSerialized(value, serialComponent, sparseOrUndefined)\n );\n }\n\n @proxy.describeMethod({\n type: Types.String,\n isMatrix: true,\n parameterDescriptors: [baseIdentifierParameterDescriptor, serialComponentParameterDescriptor]\n })\n concatenate(baseIdentifier: string, matrixSerialComponents: Matrix<string>): MatrixResult<string, ThrowError, TError> {\n return this.setUpMatrixResult(() =>\n this.getCreator([[baseIdentifier.substring(0, !baseIdentifier.startsWith(\"0\") ? PrefixValidator.GS1_COMPANY_PREFIX_MINIMUM_LENGTH : PrefixValidator.UPC_COMPANY_PREFIX_MINIMUM_LENGTH + 1), PrefixTypes.GS1CompanyPrefix]]),\n matrixSerialComponents, (creator, serialComponent) =>\n creator.concatenate(baseIdentifier, serialComponent)\n );\n }\n}\n\nconst referenceParameterDescriptor: ParameterDescriptor = {\n name: \"reference\",\n type: Types.String,\n isMatrix: true,\n isRequired: true\n};\n\n@proxy.describeClass(true, {\n namespace: \"GS1\"\n})\nexport abstract class NonNumericIdentifierCreatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends IdentifierCreatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt, NonNumericIdentifierType, NonNumericIdentifierValidation, NonNumericIdentifierCreator> {\n @proxy.describeMethod({\n type: Types.String,\n isMatrix: true,\n parameterDescriptors: [prefixDefinitionGS1UPCParameterDescriptor, referenceParameterDescriptor]\n })\n create(prefixDefinition: Matrix<unknown>, matrixReferences: Matrix<string>): MatrixResult<string, ThrowError, TError> {\n return this.setUpMatrixResult(() =>\n this.getCreator(prefixDefinition),\n matrixReferences, (creator, reference) =>\n creator.create(reference)\n );\n }\n}\n","import { type ExtendsParameterDescriptor, type ParameterDescriptor, Types } from \"../descriptor.js\";\n\nconst prefixDefinitionParameterDescriptor: ParameterDescriptor = {\n name: \"prefixDefinition\",\n type: Types.Any,\n isMatrix: true,\n isRequired: true\n};\n\nexport const prefixDefinitionGS1UPCParameterDescriptor: ExtendsParameterDescriptor = {\n extendsDescriptor: prefixDefinitionParameterDescriptor,\n name: \"prefixDefinitionGS1UPC\"\n};\n\nexport const prefixDefinitionAnyParameterDescriptor: ExtendsParameterDescriptor = {\n extendsDescriptor: prefixDefinitionParameterDescriptor,\n name: \"prefixDefinitionAny\"\n};\n","import type { Nullishable } from \"@aidc-toolkit/core\";\nimport type { GTINCreator, GTINType } from \"@aidc-toolkit/gs1\";\nimport type { AppExtension } from \"../app-extension.js\";\nimport { Types } from \"../descriptor.js\";\nimport { expandParameterDescriptor, proxy } from \"../proxy.js\";\nimport type { ErrorExtends, Matrix, MatrixResult } from \"../type.js\";\nimport { valueParameterDescriptor } from \"../utility/transformer-descriptor.js\";\nimport { indicatorDigitParameterDescriptor } from \"./gtin-descriptor.js\";\nimport { NumericIdentifierCreatorProxy, sparseParameterDescriptor } from \"./identifier-creator-proxy.js\";\nimport {\n prefixDefinitionAnyParameterDescriptor,\n prefixDefinitionGS1UPCParameterDescriptor\n} from \"./prefix-definition-descriptor.js\";\n\n@proxy.describeClass(false, {\n namespace: \"GS1\",\n methodInfix: \"GTIN\",\n replacementParameterDescriptors: [\n {\n name: expandParameterDescriptor(prefixDefinitionGS1UPCParameterDescriptor).name,\n replacement: prefixDefinitionAnyParameterDescriptor\n }\n ]\n})\nexport class GTINCreatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends NumericIdentifierCreatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt, GTINType, GTINCreator> {\n constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>) {\n super(appExtension, prefixManager => prefixManager.gtinCreator);\n }\n\n @proxy.describeMethod({\n type: Types.String,\n isMatrix: true,\n ignoreInfix: true,\n parameterDescriptors: [indicatorDigitParameterDescriptor, prefixDefinitionAnyParameterDescriptor, valueParameterDescriptor, sparseParameterDescriptor]\n })\n createGTIN14(indicatorDigit: string, prefixDefinition: Matrix<unknown>, matrixValues: Matrix<number | bigint>, sparse: Nullishable<boolean>): MatrixResult<string, ThrowError, TError> {\n const sparseOrUndefined = sparse ?? undefined;\n\n return this.setUpMatrixResult(() =>\n this.getCreator(prefixDefinition),\n matrixValues, (creator, value) =>\n creator.createGTIN14(indicatorDigit, value, sparseOrUndefined)\n );\n }\n}\n","import type { NonGTINNumericIdentifierCreator, NonSerializableNumericIdentifierType } from \"@aidc-toolkit/gs1\";\nimport type { AppExtension } from \"../app-extension.js\";\nimport { proxy } from \"../proxy.js\";\nimport type { ErrorExtends } from \"../type.js\";\nimport {\n NonNumericIdentifierCreatorProxy,\n NonSerializableNumericIdentifierCreatorProxy,\n SerializableNumericIdentifierCreatorProxy\n} from \"./identifier-creator-proxy.js\";\n\n@proxy.describeClass(false, {\n namespace: \"GS1\",\n methodInfix: \"GLN\"\n})\nexport class GLNCreatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends NonSerializableNumericIdentifierCreatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt, NonSerializableNumericIdentifierType, NonGTINNumericIdentifierCreator> {\n constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>) {\n super(appExtension, prefixManager => prefixManager.glnCreator);\n }\n}\n\n@proxy.describeClass(false, {\n namespace: \"GS1\",\n methodInfix: \"SSCC\"\n})\nexport class SSCCCreatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends NonSerializableNumericIdentifierCreatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt, NonSerializableNumericIdentifierType, NonGTINNumericIdentifierCreator> {\n constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>) {\n super(appExtension, prefixManager => prefixManager.ssccCreator);\n }\n}\n\n@proxy.describeClass(false, {\n namespace: \"GS1\",\n methodInfix: \"GRAI\"\n})\nexport class GRAICreatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends SerializableNumericIdentifierCreatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {\n constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>) {\n super(appExtension, prefixManager => prefixManager.graiCreator);\n }\n}\n\n@proxy.describeClass(false, {\n namespace: \"GS1\",\n methodInfix: \"GIAI\"\n})\nexport class GIAICreatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends NonNumericIdentifierCreatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {\n constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>) {\n super(appExtension, prefixManager => prefixManager.giaiCreator);\n }\n}\n\n@proxy.describeClass(false, {\n namespace: \"GS1\",\n methodInfix: \"GSRN\"\n})\nexport class GSRNCreatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends NonSerializableNumericIdentifierCreatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt, NonSerializableNumericIdentifierType, NonGTINNumericIdentifierCreator> {\n constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>) {\n super(appExtension, prefixManager => prefixManager.gsrnCreator);\n }\n}\n\n@proxy.describeClass(false, {\n namespace: \"GS1\",\n methodInfix: \"GDTI\"\n})\nexport class GDTICreatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends SerializableNumericIdentifierCreatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {\n constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>) {\n super(appExtension, prefixManager => prefixManager.gdtiCreator);\n }\n}\n\n@proxy.describeClass(false, {\n namespace: \"GS1\",\n methodInfix: \"GINC\"\n})\nexport class GINCCreatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends NonNumericIdentifierCreatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {\n constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>) {\n super(appExtension, prefixManager => prefixManager.gincCreator);\n }\n}\n\n@proxy.describeClass(false, {\n namespace: \"GS1\",\n methodInfix: \"GSIN\"\n})\nexport class GSINCreatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends NonSerializableNumericIdentifierCreatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt, NonSerializableNumericIdentifierType, NonGTINNumericIdentifierCreator> {\n constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>) {\n super(appExtension, prefixManager => prefixManager.gsinCreator);\n }\n}\n\n@proxy.describeClass(false, {\n namespace: \"GS1\",\n methodInfix: \"GCN\"\n})\nexport class GCNCreatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends SerializableNumericIdentifierCreatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {\n constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>) {\n super(appExtension, prefixManager => prefixManager.gcnCreator);\n }\n}\n\n@proxy.describeClass(false, {\n namespace: \"GS1\",\n methodInfix: \"CPID\"\n})\nexport class CPIDCreatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends NonNumericIdentifierCreatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {\n constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>) {\n super(appExtension, prefixManager => prefixManager.cpidCreator);\n }\n}\n\n@proxy.describeClass(false, {\n namespace: \"GS1\",\n methodInfix: \"GMN\"\n})\nexport class GMNCreatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends NonNumericIdentifierCreatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {\n constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>) {\n super(appExtension, prefixManager => prefixManager.gmnCreator);\n }\n}\n","import { VariableMeasure } from \"@aidc-toolkit/gs1\";\nimport { type ParameterDescriptor, Types } from \"../descriptor.js\";\nimport { LibProxy } from \"../lib-proxy.js\";\nimport { proxy } from \"../proxy.js\";\nimport type { ErrorExtends, Matrix, MatrixResult } from \"../type.js\";\n\nconst rcnFormatParameterDescriptor: ParameterDescriptor = {\n name: \"rcnFormat\",\n type: Types.String,\n isMatrix: false,\n isRequired: true\n};\n\nconst rcnParameterDescriptor: ParameterDescriptor = {\n name: \"rcn\",\n type: Types.String,\n isMatrix: true,\n isRequired: true\n};\n\nconst rcnItemReferenceParameterDescriptor: ParameterDescriptor = {\n name: \"rcnItemReference\",\n type: Types.Number,\n isMatrix: false,\n isRequired: true\n};\n\nconst rcnPriceOrWeightParameterDescriptor: ParameterDescriptor = {\n name: \"rcnPriceOrWeight\",\n type: Types.Number,\n isMatrix: true,\n isRequired: true\n};\n\n@proxy.describeClass(false, {\n namespace: \"GS1\"\n})\nexport class VariableMeasureProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends LibProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {\n @proxy.describeMethod({\n type: Types.Number,\n isMatrix: true,\n parameterDescriptors: [rcnFormatParameterDescriptor, rcnParameterDescriptor]\n })\n parseVariableMeasureRCN(format: string, matrixRCNs: Matrix<string>): MatrixResult<number, ThrowError, TError> {\n return this.arrayResult(matrixRCNs, (rcn) => {\n const rcnReference = VariableMeasure.parseRCN(format, rcn);\n\n return [rcnReference.itemReference, rcnReference.priceOrWeight];\n });\n }\n\n @proxy.describeMethod({\n type: Types.String,\n isMatrix: true,\n ignoreInfix: true,\n parameterDescriptors: [rcnFormatParameterDescriptor, rcnItemReferenceParameterDescriptor, rcnPriceOrWeightParameterDescriptor]\n })\n createVariableMeasureRCN(format: string, itemReference: number, matrixPricesOrWeights: Matrix<number>): MatrixResult<string, ThrowError, TError> {\n return this.matrixResult(matrixPricesOrWeights, priceOrWeight => VariableMeasure.createRCN(format, itemReference, priceOrWeight));\n }\n}\n","import { isNullish, type Nullishable } from \"@aidc-toolkit/core\";\nimport { verifiedByGS1 } from \"@aidc-toolkit/gs1\";\nimport { type ExtendsParameterDescriptor, type ParameterDescriptor, Types } from \"../descriptor.js\";\nimport { LibProxy } from \"../lib-proxy.js\";\nimport { proxy } from \"../proxy.js\";\nimport type { ErrorExtends, Matrix, MatrixResult } from \"../type.js\";\nimport { identifierParameterDescriptor, identifierTypeParameterDescriptor } from \"./identifier-descriptor.js\";\nimport { validateIdentifierType } from \"./identifier-type.js\";\n\nconst hyperlinkIdentifierParameterDescriptor: ExtendsParameterDescriptor = {\n extendsDescriptor: identifierParameterDescriptor,\n name: \"hyperlinkIdentifier\"\n};\n\nconst hyperlinkTextParameterDescriptor: ParameterDescriptor = {\n name: \"hyperlinkText\",\n type: Types.String,\n isMatrix: false,\n isRequired: false\n};\n\nconst hyperlinkDetailsParameterDescriptor: ParameterDescriptor = {\n name: \"hyperlinkDetails\",\n type: Types.String,\n isMatrix: false,\n isRequired: false\n};\n\n@proxy.describeClass(false, {\n namespace: \"GS1\"\n})\nexport class ServiceProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends LibProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {\n @proxy.describeMethod({\n type: Types.Any,\n isMatrix: true,\n requiresContext: true,\n parameterDescriptors: [\n identifierTypeParameterDescriptor,\n hyperlinkIdentifierParameterDescriptor,\n hyperlinkTextParameterDescriptor,\n hyperlinkDetailsParameterDescriptor\n ]\n })\n async verifiedByGS1(identifierType: string, matrixIdentifiers: Matrix<string>, text: Nullishable<string>, details: Nullishable<string>, invocationContext: Nullishable<TInvocationContext>): Promise<MatrixResult<unknown, ThrowError, TError>> {\n if (isNullish(invocationContext)) {\n // Application error; no localization necessary.\n throw new Error(\"Invocation context not provided by application\");\n }\n\n return this.appExtension.mapHyperlinkResults(invocationContext, this.setUpMatrixResult(() =>\n validateIdentifierType(identifierType),\n matrixIdentifiers, (validatedIdentifierType, identifier) =>\n verifiedByGS1(validatedIdentifierType, identifier, text ?? undefined, details ?? undefined)\n ));\n }\n}\n","import { I18nEnvironments, type Promisable } from \"@aidc-toolkit/core\";\nimport type { ParseKeys } from \"i18next\";\nimport { AppUtilityProxy } from \"../app-utility-proxy.js\";\nimport type { ClassDescriptor, MethodDescriptor } from \"../descriptor.js\";\nimport * as GS1 from \"../gs1/index.js\";\nimport { appExtensionResources, i18nAppExtensionInit, i18nextAppExtension } from \"../locale/i18n.js\";\nimport { proxy } from \"../proxy.js\";\nimport * as Utility from \"../utility/index.js\";\n\n/**\n * Dummy method to force proxies to register their decorators.\n *\n * @param _proxies\n * Proxies.\n */\nfunction registerProxies(..._proxies: unknown[]): void {\n}\n\nregisterProxies(AppUtilityProxy, Utility, GS1);\n\n/**\n * Localization.\n */\nexport interface Localization {\n /**\n * Name.\n */\n name: string;\n\n /**\n * Description.\n */\n description: string;\n}\n\n/**\n * Function localization.\n */\nexport interface FunctionLocalization extends Localization {\n /**\n * Documentation URL.\n */\n documentationURL: string;\n\n /**\n * Parameters map.\n */\n parametersMap: Map<string, Localization>;\n}\n\n/**\n * Abstract generator.\n */\nexport abstract class Generator {\n /**\n * Documentation base URL.\n */\n static readonly #DOCUMENTATION_BASE_URL = \"https://aidc-toolkit.com/\";\n\n /**\n * Documentation path, optionally preceded by locale.\n */\n static readonly #DOCUMENTATION_PATH = \"app-extension/\";\n\n /**\n * Locales.\n */\n readonly #locales: readonly string[];\n\n /**\n * Default locale.\n */\n readonly #defaultLocale: string;\n\n /**\n * Map of function localizations maps by namespace function name.\n */\n readonly #functionLocalizationsMapsMap = new Map<string, ReadonlyMap<string, FunctionLocalization>>();\n\n /**\n * Constructor.\n *\n * @param includeLocalizations\n * Include localizations if true.\n */\n constructor(includeLocalizations = true) {\n this.#locales = includeLocalizations ? Object.keys(appExtensionResources) : [];\n this.#defaultLocale = this.#locales[0] ?? \"\";\n }\n\n /**\n * Get the locales.\n */\n protected get locales(): readonly string[] {\n return this.#locales;\n }\n\n /**\n * Get the default locale.\n */\n protected get defaultLocale(): string {\n return this.#defaultLocale;\n }\n\n /**\n * Get function localization.\n *\n * @param locale\n * Locale.\n *\n * @param namespaceFunctionName\n * Namespace function name.\n *\n * @returns\n * Function localization.\n */\n protected getFunctionLocalization(locale: string, namespaceFunctionName: string): FunctionLocalization {\n const functionLocalization = this.#functionLocalizationsMapsMap.get(namespaceFunctionName)?.get(locale);\n\n if (functionLocalization === undefined) {\n throw new Error(`${locale} localization for function ${namespaceFunctionName} not found`);\n }\n\n return functionLocalization;\n }\n\n /**\n * Get parameter localization.\n *\n * @param locale\n * Locale.\n *\n * @param namespaceFunctionName\n * Namespace function name.\n *\n * @param parameterName\n * Parameter name.\n *\n * @returns\n * Parameter localization.\n */\n protected getParameterLocalization(locale: string, namespaceFunctionName: string, parameterName: string): Localization {\n const parameterLocalization = this.getFunctionLocalization(locale, namespaceFunctionName).parametersMap.get(parameterName);\n\n if (parameterLocalization === undefined) {\n throw new Error(`${locale} localization for function ${namespaceFunctionName} parameter ${parameterName} not found`);\n }\n\n return parameterLocalization;\n }\n\n /**\n * Initialize the generation of the output.\n */\n protected abstract initialize(): void;\n\n /**\n * Create a proxy object for a class.\n *\n * @param classDescriptor\n * Class descriptor.\n */\n protected abstract createProxyObject(classDescriptor: ClassDescriptor): void;\n\n /**\n * Create a proxy function for a class and method.\n *\n * @param classDescriptor\n * Class descriptor.\n *\n * @param methodDescriptor\n * Method descriptor.\n *\n * @param functionLocalizationsMap\n * Localizations map.\n */\n protected abstract createProxyFunction(classDescriptor: ClassDescriptor, methodDescriptor: MethodDescriptor, functionLocalizationsMap: ReadonlyMap<string, FunctionLocalization>): void;\n\n /**\n * Finalize the generation of the output.\n *\n * @param success\n * True if successful.\n */\n protected abstract finalize(success: boolean): Promisable<void>;\n\n /**\n * Generate a localization.\n *\n * @template TLocalization\n * Localization type.\n *\n * @param locale\n * Locale.\n *\n * @param localizedKeyPrefix\n * Localized key prefix.\n *\n * @param namespacePrefix\n * Namespace prefix to be appended to name.\n *\n * @param localizationCallback\n * Callback to finalize localization.\n *\n * @returns\n * Localization.\n */\n #generateLocalization<TLocalization extends Localization>(locale: string, localizedKeyPrefix: string, namespacePrefix: string, localizationCallback: (locale: string, localization: Localization) => TLocalization): TLocalization {\n const lngOption = {\n lng: locale\n };\n\n return localizationCallback(locale, {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- Localized key exists.\n name: `${namespacePrefix}${i18nextAppExtension.t(`${localizedKeyPrefix}name` as ParseKeys, lngOption)}`,\n // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- Localized key exists.\n description: i18nextAppExtension.t(`${localizedKeyPrefix}description` as ParseKeys, lngOption)\n });\n }\n\n /**\n * Generate by processing individual imports.\n */\n async generate(): Promise<void> {\n let success = false;\n\n await i18nAppExtensionInit(I18nEnvironments.CLI);\n\n this.initialize();\n\n try {\n for (const [_namespaceClassName, classDescriptor] of proxy.classDescriptorsMap.entries()) {\n const namespace = classDescriptor.namespace;\n const namespacePrefix = namespace === undefined ? \"\" : `${namespace}.`;\n const namespacePath = namespace === undefined ? \"\" : `${namespace}/`;\n\n this.createProxyObject(classDescriptor);\n\n for (const methodDescriptor of classDescriptor.methodDescriptors) {\n const namespaceFunctionName = methodDescriptor.namespaceFunctionName;\n const functionLocalizationsMap = new Map(this.#locales.map(locale =>\n [locale, this.#generateLocalization<FunctionLocalization>(locale, `Functions.${namespaceFunctionName}.`, namespacePrefix, (locale, localization) => ({\n ...localization,\n documentationURL: `${Generator.#DOCUMENTATION_BASE_URL}${locale === this.defaultLocale ? \"\" : `${locale}/`}${Generator.#DOCUMENTATION_PATH}${namespacePath}${localization.name}.html`,\n parametersMap: new Map(methodDescriptor.parameterDescriptors.map(parameterDescriptor =>\n // eslint-disable-next-line max-nested-callbacks -- Callback is empty.\n [parameterDescriptor.name, this.#generateLocalization(locale, `Parameters.${parameterDescriptor.name}.`, \"\", (_locale, localization) => localization)]\n ))\n }))]\n ));\n\n this.#functionLocalizationsMapsMap.set(namespaceFunctionName, functionLocalizationsMap);\n\n this.createProxyFunction(classDescriptor, methodDescriptor, functionLocalizationsMap);\n }\n }\n\n success = true;\n } finally {\n await this.finalize(success);\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,kBAAuD;AACvD,iBAA0C;AAC1C,qBAAkD;;;ACFlD,IAAM,WAAW,SAAO,OAAO,QAAQ;AACvC,IAAM,QAAQ,MAAM;AAClB,MAAI;AACJ,MAAI;AACJ,QAAM,UAAU,IAAI,QAAQ,CAAC,SAAS,WAAW;AAC/C,UAAM;AACN,UAAM;AAAA,EACR,CAAC;AACD,UAAQ,UAAU;AAClB,UAAQ,SAAS;AACjB,SAAO;AACT;AACA,IAAM,aAAa,YAAU;AAC3B,MAAI,UAAU,KAAM,QAAO;AAC3B,SAAO,KAAK;AACd;AACA,IAAM,OAAO,CAAC,GAAG,GAAGA,OAAM;AACxB,IAAE,QAAQ,OAAK;AACb,QAAI,EAAE,CAAC,EAAG,CAAAA,GAAE,CAAC,IAAI,EAAE,CAAC;AAAA,EACtB,CAAC;AACH;AACA,IAAM,4BAA4B;AAClC,IAAM,WAAW,SAAO,OAAO,IAAI,QAAQ,KAAK,IAAI,KAAK,IAAI,QAAQ,2BAA2B,GAAG,IAAI;AACvG,IAAM,uBAAuB,YAAU,CAAC,UAAU,SAAS,MAAM;AACjE,IA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,mBAAmB;AAC9D,gBAAM,wBAAwB,iBAAiB;AAC/C,gBAAM,2BAA2B,IAAI,IAAI,KAAK,SAAS;AAAA,YAAI,YACvD,CAAC,QAAQ,KAAK,sBAA4C,QAAQ,aAAa,qBAAqB,KAAK,iBAAiB,CAACC,SAAQ,kBAAkB;AAAA,cACjJ,GAAG;AAAA,cACH,kBAAkB,GAAG,WAAU,uBAAuB,GAAGA,YAAW,KAAK,gBAAgB,KAAK,GAAGA,OAAM,GAAG,GAAG,WAAU,mBAAmB,GAAG,aAAa,GAAG,aAAa,IAAI;AAAA,cAC9K,eAAe,IAAI,IAAI,iBAAiB,qBAAqB;AAAA,gBAAI;AAAA;AAAA,kBAE7D,CAAC,oBAAoB,MAAM,KAAK,sBAAsBA,SAAQ,cAAc,oBAAoB,IAAI,KAAK,IAAI,CAAC,SAASC,kBAAiBA,aAAY,CAAC;AAAA;AAAA,cACzJ,CAAC;AAAA,YACL,EAAE,CAAC;AAAA,UACP,CAAC;AAED,eAAK,8BAA8B,IAAI,uBAAuB,wBAAwB;AAEtF,eAAK,oBAAoB,iBAAiB,kBAAkB,wBAAwB;AAAA,QACxF;AAAA,MACJ;AAEA,gBAAU;AAAA,IACd,UAAE;AACE,YAAM,KAAK,SAAS,OAAO;AAAA,IAC/B;AAAA,EACJ;AACJ;","names":["t","module","proxy","copy","instance","locale_resources_default","locale_resources_default","import_core","import_utility","result","import_core","import_core","Proxy","import_utility","_a","_init","import_utility","_a","_init","import_utility","_isValid_dec","_validate_dec","_a","_init","import_gs1","_init","_a","import_gs1","_a","_init","checkDigit","import_gs1","_isValid_dec","_validate_dec","_a","_init","_init","_a","import_gs1","_init","_a","import_gs1","import_gs1","_a","_init","import_core","import_gs1","import_utility","_createSequence_dec","_create_dec","_a","_init","_a","_init","_init","_a","import_gs1","_a","_init","import_core","import_gs1","_a","_init","import_core","locale","localization"]}
|