@itwin/core-i18n 5.15.0-dev.7 → 5.16.0-dev.2

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.
@@ -17,13 +17,13 @@
17
17
  /** @packageDocumentation
18
18
  * @module Localization
19
19
  */
20
- function cov_ogldeftyv() {
21
- var path = "C:\\agent\\_work\\1\\s\\core\\i18n\\lib\\cjs\\ITwinLocalization.js";
22
- var hash = "8de28e753813d64322bcaeb99c8c8dfad2c2faad";
20
+ function cov_1wctd2lw3r() {
21
+ var path = "C:\\agent\\_work\\2\\s\\core\\i18n\\lib\\cjs\\ITwinLocalization.js";
22
+ var hash = "11843a9389894bd74427d7137f54e50ca9e52905";
23
23
  var global = new Function("return this")();
24
24
  var gcv = "__coverage__";
25
25
  var coverageData = {
26
- path: "C:\\agent\\_work\\1\\s\\core\\i18n\\lib\\cjs\\ITwinLocalization.js",
26
+ path: "C:\\agent\\_work\\2\\s\\core\\i18n\\lib\\cjs\\ITwinLocalization.js",
27
27
  statementMap: {
28
28
  "0": {
29
29
  start: {
@@ -1995,13 +1995,13 @@ function cov_ogldeftyv() {
1995
1995
  inputSourceMap: {
1996
1996
  version: 3,
1997
1997
  file: "ITwinLocalization.js",
1998
- sources: ["C:\\agent\\_work\\1\\s\\core\\i18n\\src\\ITwinLocalization.ts"],
1998
+ sources: ["C:\\agent\\_work\\2\\s\\core\\i18n\\src\\ITwinLocalization.ts"],
1999
1999
  names: [],
2000
2000
  mappings: "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",
2001
2001
  sourcesContent: ["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Localization\r\n */\r\n\r\nimport i18next, { i18n, InitOptions, Module, TOptionsBase } from \"i18next\";\r\nimport i18nextBrowserLanguageDetector, { DetectorOptions } from \"i18next-browser-languagedetector\";\r\nimport Backend, { HttpBackendOptions as BackendOptions } from \"i18next-http-backend\";\r\nimport { Logger } from \"@itwin/core-bentley\";\r\nimport type { Localization } from \"@itwin/core-common\";\r\n\r\nconst DEFAULT_MAX_RETRIES: number = 1; // a low number prevents wasted time and potential timeouts when requesting localization files throws an error\r\n\r\n/** Options for ITwinLocalization\r\n * @public\r\n */\r\nexport interface LocalizationOptions {\r\n urlTemplate?: string;\r\n backendPlugin?: Module;\r\n detectorPlugin?: Module;\r\n initOptions?: InitOptions;\r\n backendHttpOptions?: BackendOptions;\r\n detectorOptions?: DetectorOptions;\r\n}\r\n\r\n/** Supplies localizations for iTwin.js\r\n * @note this class uses the [i18next](https://www.i18next.com/) package.\r\n * @public\r\n */\r\nexport class ITwinLocalization implements Localization {\r\n public i18next: i18n;\r\n private readonly _initOptions: InitOptions;\r\n private readonly _backendOptions: BackendOptions;\r\n private readonly _detectionOptions: DetectorOptions;\r\n private readonly _namespaces = new Map<string, Promise<void>>();\r\n\r\n public constructor(options?: LocalizationOptions) {\r\n this.i18next = i18next.createInstance();\r\n\r\n this._backendOptions = {\r\n loadPath: options?.urlTemplate ?? \"locales/{{lng}}/{{ns}}.json\",\r\n crossDomain: true,\r\n ...options?.backendHttpOptions,\r\n };\r\n\r\n this._detectionOptions = {\r\n order: [\"querystring\", \"navigator\", \"htmlTag\"],\r\n lookupQuerystring: \"lng\",\r\n caches: [],\r\n ...options?.detectorOptions,\r\n };\r\n\r\n this._initOptions = {\r\n interpolation: { escapeValue: true },\r\n fallbackLng: \"en\",\r\n maxRetries: DEFAULT_MAX_RETRIES,\r\n backend: this._backendOptions,\r\n detection: this._detectionOptions,\r\n ...options?.initOptions,\r\n };\r\n\r\n this.i18next\r\n .use(options?.detectorPlugin ?? i18nextBrowserLanguageDetector)\r\n .use(options?.backendPlugin ?? Backend)\r\n .use(TranslationLogger);\r\n }\r\n\r\n public async initialize(namespaces: string[]): Promise<void> {\r\n\r\n // Also consider namespaces passed into constructor\r\n const initNamespaces: string[] = [this._initOptions.ns || []].flat();\r\n const combinedNamespaces: Set<string> = new Set([...namespaces, ...initNamespaces]); // without duplicates\r\n\r\n const defaultNamespace: string | false | readonly string[] = this._initOptions.defaultNS ?? namespaces[0];\r\n if (defaultNamespace)\r\n combinedNamespaces.add(defaultNamespace as string); // Make sure default namespace is in namespaces list\r\n\r\n const initOptions: InitOptions = {\r\n ...this._initOptions,\r\n defaultNS: defaultNamespace,\r\n ns: [...combinedNamespaces],\r\n };\r\n\r\n // if in a development environment, set debugging\r\n if (process.env.NODE_ENV === \"development\")\r\n initOptions.debug = true;\r\n\r\n const initPromise = this.i18next.init(initOptions) as unknown as Promise<void>;\r\n\r\n for (const ns of namespaces)\r\n this._namespaces.set(ns, initPromise);\r\n\r\n return initPromise;\r\n }\r\n\r\n /** Replace all instances of `%{key}` within a string with the translations of those keys.\r\n * For example:\r\n * ``` ts\r\n * \"MyKeys\": {\r\n * \"Key1\": \"First value\",\r\n * \"Key2\": \"Second value\"\r\n * }\r\n * ```\r\n *\r\n * ``` ts\r\n * i18.translateKeys(\"string with %{MyKeys.Key1} followed by %{MyKeys.Key2}!\"\") // returns \"string with First Value followed by Second Value!\"\r\n * ```\r\n * @param line The input line, potentially containing %{keys}.\r\n * @returns The line with all %{keys} translated\r\n * @public\r\n */\r\n public getLocalizedKeys(line: string): string {\r\n return line.replace(/\\%\\{(.+?)\\}/g, (_match, tag) => this.getLocalizedString(tag));\r\n }\r\n\r\n /** Return the translated value of a key.\r\n * @param key - the key that matches a property in the JSON localization file.\r\n * @note The key includes the namespace, which identifies the particular localization file that contains the property,\r\n * followed by a colon, followed by the property in the JSON file.\r\n * For example:\r\n * ``` ts\r\n * const dataString: string = IModelApp.localization.getLocalizedString(\"iModelJs:BackgroundMap.BingDataAttribution\");\r\n * ```\r\n * assigns to dataString the string with property BackgroundMap.BingDataAttribution from the iModelJs.json localization file.\r\n * @returns The string corresponding to the first key that resolves.\r\n * @throws Error if no keys resolve to a string.\r\n * @public\r\n */\r\n public getLocalizedString(key: string | string[], options?: TOptionsBase): string {\r\n if (options?.returnDetails || options?.returnObjects) {\r\n throw new Error(\"Translation key must map to a string, but the given options will result in an object\");\r\n }\r\n\r\n const value = this.i18next.t(key, options);\r\n\r\n if (typeof value !== \"string\") {\r\n throw new Error(\"Translation key(s) string not found\");\r\n }\r\n\r\n return value;\r\n }\r\n\r\n /** Gets the English translation.\r\n * @param namespace - the namespace that identifies the particular localization file that contains the property.\r\n * @param key - the key that matches a property in the JSON localization file.\r\n * @returns The string corresponding to the first key that resolves.\r\n * @throws Error if no keys resolve to a string.\r\n * @internal\r\n */\r\n public getEnglishString(namespace: string, key: string | string[], options?: TOptionsBase): string {\r\n if (options?.returnDetails || options?.returnObjects) {\r\n throw new Error(\"Translation key must map to a string, but the given options will result in an object\");\r\n }\r\n\r\n options = {\r\n ...options,\r\n ns: namespace, // ensure namespace argument is used\r\n };\r\n\r\n const en = this.i18next.getFixedT(\"en\", namespace);\r\n const str = en(key, options);\r\n if (typeof str !== \"string\")\r\n throw new Error(\"Translation key(s) not found\");\r\n\r\n return str;\r\n }\r\n\r\n /** Get the promise for an already registered Namespace.\r\n * @param name - the name of the namespace\r\n * @public\r\n */\r\n public getNamespacePromise(name: string): Promise<void> | undefined {\r\n return this._namespaces.get(name);\r\n }\r\n\r\n /** @internal */\r\n public getLanguageList(): readonly string[] {\r\n return this.i18next.languages;\r\n }\r\n\r\n /** override the language detected in the browser */\r\n public async changeLanguage(language: string) {\r\n return this.i18next.changeLanguage(language) as unknown as Promise<void>;\r\n }\r\n\r\n /** Register a new Namespace and return it. If the namespace is already registered, it will be returned.\r\n * @param name - the name of the namespace, which is the base name of the JSON file that contains the localization properties.\r\n * @note - The registerNamespace method starts fetching the appropriate version of the JSON localization file from the server,\r\n * based on the current locale. To make sure that fetch is complete before performing translations from this namespace, await\r\n * fulfillment of the readPromise Promise property of the returned LocalizationNamespace.\r\n * @see [Localization in iTwin.js]($docs/learning/frontend/Localization.md)\r\n * @public\r\n */\r\n public async registerNamespace(name: string): Promise<void> {\r\n const existing = this._namespaces.get(name);\r\n if (existing !== undefined)\r\n return existing;\r\n\r\n const theReadPromise = new Promise<void>((resolve) => {\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n this.i18next.loadNamespaces(name, (err) => {\r\n if (!err)\r\n return resolve();\r\n\r\n // i18next can return errors from other concurrent namespace loads in this callback.\r\n const wasLoaded = this.getLanguageList().some((language) => this.i18next.hasResourceBundle(language, name));\r\n if (!wasLoaded)\r\n Logger.logError(\"i18n\", `No resources for namespace ${name} could be loaded`);\r\n\r\n resolve();\r\n });\r\n });\r\n this._namespaces.set(name, theReadPromise);\r\n return theReadPromise;\r\n }\r\n\r\n /** @internal */\r\n public unregisterNamespace(name: string): void {\r\n this._namespaces.delete(name);\r\n }\r\n}\r\n\r\nclass TranslationLogger {\r\n public static readonly type = \"logger\";\r\n public log(args: string[]) { Logger.logInfo(\"i18n\", this.createLogMessage(args)); }\r\n public warn(args: string[]) { Logger.logWarning(\"i18n\", this.createLogMessage(args)); }\r\n public error(args: string[]) { Logger.logError(\"i18n\", this.createLogMessage(args)); }\r\n private createLogMessage(args: string[]) {\r\n let message = args[0];\r\n for (let i = 1; i < args.length; ++i) {\r\n if (typeof args[i] === \"string\")\r\n message += `\\n ${args[i]}`;\r\n }\r\n return message;\r\n }\r\n}\r\n"]
2002
2002
  },
2003
2003
  _coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
2004
- hash: "8de28e753813d64322bcaeb99c8c8dfad2c2faad"
2004
+ hash: "11843a9389894bd74427d7137f54e50ca9e52905"
2005
2005
  };
2006
2006
  var coverage = global[gcv] || (global[gcv] = {});
2007
2007
  if (!coverage[path] || coverage[path].hash !== hash) {
@@ -2010,31 +2010,31 @@ function cov_ogldeftyv() {
2010
2010
  var actualCoverage = coverage[path];
2011
2011
  {
2012
2012
  // @ts-ignore
2013
- cov_ogldeftyv = function () {
2013
+ cov_1wctd2lw3r = function () {
2014
2014
  return actualCoverage;
2015
2015
  };
2016
2016
  }
2017
2017
  return actualCoverage;
2018
2018
  }
2019
- cov_ogldeftyv();
2020
- var __importDefault = (cov_ogldeftyv().s[0]++, (cov_ogldeftyv().b[0][0]++, this) && (cov_ogldeftyv().b[0][1]++, this.__importDefault) || (cov_ogldeftyv().b[0][2]++, function (mod) {
2021
- cov_ogldeftyv().f[0]++;
2022
- cov_ogldeftyv().s[1]++;
2023
- return (cov_ogldeftyv().b[2][0]++, mod) && (cov_ogldeftyv().b[2][1]++, mod.__esModule) ? (cov_ogldeftyv().b[1][0]++, mod) : (cov_ogldeftyv().b[1][1]++, {
2019
+ cov_1wctd2lw3r();
2020
+ var __importDefault = (cov_1wctd2lw3r().s[0]++, (cov_1wctd2lw3r().b[0][0]++, this) && (cov_1wctd2lw3r().b[0][1]++, this.__importDefault) || (cov_1wctd2lw3r().b[0][2]++, function (mod) {
2021
+ cov_1wctd2lw3r().f[0]++;
2022
+ cov_1wctd2lw3r().s[1]++;
2023
+ return (cov_1wctd2lw3r().b[2][0]++, mod) && (cov_1wctd2lw3r().b[2][1]++, mod.__esModule) ? (cov_1wctd2lw3r().b[1][0]++, mod) : (cov_1wctd2lw3r().b[1][1]++, {
2024
2024
  "default": mod
2025
2025
  });
2026
2026
  }));
2027
- cov_ogldeftyv().s[2]++;
2027
+ cov_1wctd2lw3r().s[2]++;
2028
2028
  Object.defineProperty(exports, "__esModule", ({
2029
2029
  value: true
2030
2030
  }));
2031
- cov_ogldeftyv().s[3]++;
2031
+ cov_1wctd2lw3r().s[3]++;
2032
2032
  exports.ITwinLocalization = void 0;
2033
- const i18next_1 = (cov_ogldeftyv().s[4]++, __importDefault(__webpack_require__(/*! i18next */ "../../common/temp/node_modules/.pnpm/i18next@21.10.0/node_modules/i18next/dist/cjs/i18next.js")));
2034
- const i18next_browser_languagedetector_1 = (cov_ogldeftyv().s[5]++, __importDefault(__webpack_require__(/*! i18next-browser-languagedetector */ "../../common/temp/node_modules/.pnpm/i18next-browser-languagedetector@6.1.8/node_modules/i18next-browser-languagedetector/dist/cjs/i18nextBrowserLanguageDetector.js")));
2035
- const i18next_http_backend_1 = (cov_ogldeftyv().s[6]++, __importDefault(__webpack_require__(/*! i18next-http-backend */ "../../common/temp/node_modules/.pnpm/i18next-http-backend@3.0.6/node_modules/i18next-http-backend/esm/index.js")));
2036
- const core_bentley_1 = (cov_ogldeftyv().s[7]++, __webpack_require__(/*! @itwin/core-bentley */ "../bentley/lib/esm/core-bentley.js"));
2037
- const DEFAULT_MAX_RETRIES = (cov_ogldeftyv().s[8]++, 1); // a low number prevents wasted time and potential timeouts when requesting localization files throws an error
2033
+ const i18next_1 = (cov_1wctd2lw3r().s[4]++, __importDefault(__webpack_require__(/*! i18next */ "../../common/temp/node_modules/.pnpm/i18next@21.10.0/node_modules/i18next/dist/cjs/i18next.js")));
2034
+ const i18next_browser_languagedetector_1 = (cov_1wctd2lw3r().s[5]++, __importDefault(__webpack_require__(/*! i18next-browser-languagedetector */ "../../common/temp/node_modules/.pnpm/i18next-browser-languagedetector@6.1.8/node_modules/i18next-browser-languagedetector/dist/cjs/i18nextBrowserLanguageDetector.js")));
2035
+ const i18next_http_backend_1 = (cov_1wctd2lw3r().s[6]++, __importDefault(__webpack_require__(/*! i18next-http-backend */ "../../common/temp/node_modules/.pnpm/i18next-http-backend@4.0.5/node_modules/i18next-http-backend/esm/index.js")));
2036
+ const core_bentley_1 = (cov_1wctd2lw3r().s[7]++, __webpack_require__(/*! @itwin/core-bentley */ "../bentley/lib/esm/core-bentley.js"));
2037
+ const DEFAULT_MAX_RETRIES = (cov_1wctd2lw3r().s[8]++, 1); // a low number prevents wasted time and potential timeouts when requesting localization files throws an error
2038
2038
  /** Supplies localizations for iTwin.js
2039
2039
  * @note this class uses the [i18next](https://www.i18next.com/) package.
2040
2040
  * @public
@@ -2044,25 +2044,25 @@ class ITwinLocalization {
2044
2044
  _initOptions;
2045
2045
  _backendOptions;
2046
2046
  _detectionOptions;
2047
- _namespaces = (cov_ogldeftyv().s[9]++, new Map());
2047
+ _namespaces = (cov_1wctd2lw3r().s[9]++, new Map());
2048
2048
  constructor(options) {
2049
- cov_ogldeftyv().f[1]++;
2050
- cov_ogldeftyv().s[10]++;
2049
+ cov_1wctd2lw3r().f[1]++;
2050
+ cov_1wctd2lw3r().s[10]++;
2051
2051
  this.i18next = i18next_1.default.createInstance();
2052
- cov_ogldeftyv().s[11]++;
2052
+ cov_1wctd2lw3r().s[11]++;
2053
2053
  this._backendOptions = {
2054
- loadPath: (cov_ogldeftyv().b[3][0]++, options?.urlTemplate) ?? (cov_ogldeftyv().b[3][1]++, "locales/{{lng}}/{{ns}}.json"),
2054
+ loadPath: (cov_1wctd2lw3r().b[3][0]++, options?.urlTemplate) ?? (cov_1wctd2lw3r().b[3][1]++, "locales/{{lng}}/{{ns}}.json"),
2055
2055
  crossDomain: true,
2056
2056
  ...options?.backendHttpOptions
2057
2057
  };
2058
- cov_ogldeftyv().s[12]++;
2058
+ cov_1wctd2lw3r().s[12]++;
2059
2059
  this._detectionOptions = {
2060
2060
  order: ["querystring", "navigator", "htmlTag"],
2061
2061
  lookupQuerystring: "lng",
2062
2062
  caches: [],
2063
2063
  ...options?.detectorOptions
2064
2064
  };
2065
- cov_ogldeftyv().s[13]++;
2065
+ cov_1wctd2lw3r().s[13]++;
2066
2066
  this._initOptions = {
2067
2067
  interpolation: {
2068
2068
  escapeValue: true
@@ -2073,41 +2073,41 @@ class ITwinLocalization {
2073
2073
  detection: this._detectionOptions,
2074
2074
  ...options?.initOptions
2075
2075
  };
2076
- cov_ogldeftyv().s[14]++;
2077
- this.i18next.use((cov_ogldeftyv().b[4][0]++, options?.detectorPlugin) ?? (cov_ogldeftyv().b[4][1]++, i18next_browser_languagedetector_1.default)).use((cov_ogldeftyv().b[5][0]++, options?.backendPlugin) ?? (cov_ogldeftyv().b[5][1]++, i18next_http_backend_1.default)).use(TranslationLogger);
2076
+ cov_1wctd2lw3r().s[14]++;
2077
+ this.i18next.use((cov_1wctd2lw3r().b[4][0]++, options?.detectorPlugin) ?? (cov_1wctd2lw3r().b[4][1]++, i18next_browser_languagedetector_1.default)).use((cov_1wctd2lw3r().b[5][0]++, options?.backendPlugin) ?? (cov_1wctd2lw3r().b[5][1]++, i18next_http_backend_1.default)).use(TranslationLogger);
2078
2078
  }
2079
2079
  async initialize(namespaces) {
2080
- cov_ogldeftyv().f[2]++;
2080
+ cov_1wctd2lw3r().f[2]++;
2081
2081
  // Also consider namespaces passed into constructor
2082
- const initNamespaces = (cov_ogldeftyv().s[15]++, [(cov_ogldeftyv().b[6][0]++, this._initOptions.ns) || (cov_ogldeftyv().b[6][1]++, [])].flat());
2083
- const combinedNamespaces = (cov_ogldeftyv().s[16]++, new Set([...namespaces, ...initNamespaces])); // without duplicates
2084
- const defaultNamespace = (cov_ogldeftyv().s[17]++, (cov_ogldeftyv().b[7][0]++, this._initOptions.defaultNS) ?? (cov_ogldeftyv().b[7][1]++, namespaces[0]));
2085
- cov_ogldeftyv().s[18]++;
2082
+ const initNamespaces = (cov_1wctd2lw3r().s[15]++, [(cov_1wctd2lw3r().b[6][0]++, this._initOptions.ns) || (cov_1wctd2lw3r().b[6][1]++, [])].flat());
2083
+ const combinedNamespaces = (cov_1wctd2lw3r().s[16]++, new Set([...namespaces, ...initNamespaces])); // without duplicates
2084
+ const defaultNamespace = (cov_1wctd2lw3r().s[17]++, (cov_1wctd2lw3r().b[7][0]++, this._initOptions.defaultNS) ?? (cov_1wctd2lw3r().b[7][1]++, namespaces[0]));
2085
+ cov_1wctd2lw3r().s[18]++;
2086
2086
  if (defaultNamespace) {
2087
- cov_ogldeftyv().b[8][0]++;
2088
- cov_ogldeftyv().s[19]++;
2087
+ cov_1wctd2lw3r().b[8][0]++;
2088
+ cov_1wctd2lw3r().s[19]++;
2089
2089
  combinedNamespaces.add(defaultNamespace);
2090
2090
  } else {
2091
- cov_ogldeftyv().b[8][1]++;
2091
+ cov_1wctd2lw3r().b[8][1]++;
2092
2092
  } // Make sure default namespace is in namespaces list
2093
- const initOptions = (cov_ogldeftyv().s[20]++, {
2093
+ const initOptions = (cov_1wctd2lw3r().s[20]++, {
2094
2094
  ...this._initOptions,
2095
2095
  defaultNS: defaultNamespace,
2096
2096
  ns: [...combinedNamespaces]
2097
2097
  });
2098
2098
  // if in a development environment, set debugging
2099
- cov_ogldeftyv().s[21]++;
2099
+ cov_1wctd2lw3r().s[21]++;
2100
2100
  if (false) // removed by dead control flow
2101
2101
  {} else {
2102
- cov_ogldeftyv().b[9][1]++;
2102
+ cov_1wctd2lw3r().b[9][1]++;
2103
2103
  }
2104
- const initPromise = (cov_ogldeftyv().s[23]++, this.i18next.init(initOptions));
2105
- cov_ogldeftyv().s[24]++;
2104
+ const initPromise = (cov_1wctd2lw3r().s[23]++, this.i18next.init(initOptions));
2105
+ cov_1wctd2lw3r().s[24]++;
2106
2106
  for (const ns of namespaces) {
2107
- cov_ogldeftyv().s[25]++;
2107
+ cov_1wctd2lw3r().s[25]++;
2108
2108
  this._namespaces.set(ns, initPromise);
2109
2109
  }
2110
- cov_ogldeftyv().s[26]++;
2110
+ cov_1wctd2lw3r().s[26]++;
2111
2111
  return initPromise;
2112
2112
  }
2113
2113
  /** Replace all instances of `%{key}` within a string with the translations of those keys.
@@ -2127,11 +2127,11 @@ class ITwinLocalization {
2127
2127
  * @public
2128
2128
  */
2129
2129
  getLocalizedKeys(line) {
2130
- cov_ogldeftyv().f[3]++;
2131
- cov_ogldeftyv().s[27]++;
2130
+ cov_1wctd2lw3r().f[3]++;
2131
+ cov_1wctd2lw3r().s[27]++;
2132
2132
  return line.replace(/\%\{(.+?)\}/g, (_match, tag) => {
2133
- cov_ogldeftyv().f[4]++;
2134
- cov_ogldeftyv().s[28]++;
2133
+ cov_1wctd2lw3r().f[4]++;
2134
+ cov_1wctd2lw3r().s[28]++;
2135
2135
  return this.getLocalizedString(tag);
2136
2136
  });
2137
2137
  }
@@ -2149,25 +2149,25 @@ class ITwinLocalization {
2149
2149
  * @public
2150
2150
  */
2151
2151
  getLocalizedString(key, options) {
2152
- cov_ogldeftyv().f[5]++;
2153
- cov_ogldeftyv().s[29]++;
2154
- if ((cov_ogldeftyv().b[11][0]++, options?.returnDetails) || (cov_ogldeftyv().b[11][1]++, options?.returnObjects)) {
2155
- cov_ogldeftyv().b[10][0]++;
2156
- cov_ogldeftyv().s[30]++;
2152
+ cov_1wctd2lw3r().f[5]++;
2153
+ cov_1wctd2lw3r().s[29]++;
2154
+ if ((cov_1wctd2lw3r().b[11][0]++, options?.returnDetails) || (cov_1wctd2lw3r().b[11][1]++, options?.returnObjects)) {
2155
+ cov_1wctd2lw3r().b[10][0]++;
2156
+ cov_1wctd2lw3r().s[30]++;
2157
2157
  throw new Error("Translation key must map to a string, but the given options will result in an object");
2158
2158
  } else {
2159
- cov_ogldeftyv().b[10][1]++;
2159
+ cov_1wctd2lw3r().b[10][1]++;
2160
2160
  }
2161
- const value = (cov_ogldeftyv().s[31]++, this.i18next.t(key, options));
2162
- cov_ogldeftyv().s[32]++;
2161
+ const value = (cov_1wctd2lw3r().s[31]++, this.i18next.t(key, options));
2162
+ cov_1wctd2lw3r().s[32]++;
2163
2163
  if (typeof value !== "string") {
2164
- cov_ogldeftyv().b[12][0]++;
2165
- cov_ogldeftyv().s[33]++;
2164
+ cov_1wctd2lw3r().b[12][0]++;
2165
+ cov_1wctd2lw3r().s[33]++;
2166
2166
  throw new Error("Translation key(s) string not found");
2167
2167
  } else {
2168
- cov_ogldeftyv().b[12][1]++;
2168
+ cov_1wctd2lw3r().b[12][1]++;
2169
2169
  }
2170
- cov_ogldeftyv().s[34]++;
2170
+ cov_1wctd2lw3r().s[34]++;
2171
2171
  return value;
2172
2172
  }
2173
2173
  /** Gets the English translation.
@@ -2178,31 +2178,31 @@ class ITwinLocalization {
2178
2178
  * @internal
2179
2179
  */
2180
2180
  getEnglishString(namespace, key, options) {
2181
- cov_ogldeftyv().f[6]++;
2182
- cov_ogldeftyv().s[35]++;
2183
- if ((cov_ogldeftyv().b[14][0]++, options?.returnDetails) || (cov_ogldeftyv().b[14][1]++, options?.returnObjects)) {
2184
- cov_ogldeftyv().b[13][0]++;
2185
- cov_ogldeftyv().s[36]++;
2181
+ cov_1wctd2lw3r().f[6]++;
2182
+ cov_1wctd2lw3r().s[35]++;
2183
+ if ((cov_1wctd2lw3r().b[14][0]++, options?.returnDetails) || (cov_1wctd2lw3r().b[14][1]++, options?.returnObjects)) {
2184
+ cov_1wctd2lw3r().b[13][0]++;
2185
+ cov_1wctd2lw3r().s[36]++;
2186
2186
  throw new Error("Translation key must map to a string, but the given options will result in an object");
2187
2187
  } else {
2188
- cov_ogldeftyv().b[13][1]++;
2188
+ cov_1wctd2lw3r().b[13][1]++;
2189
2189
  }
2190
- cov_ogldeftyv().s[37]++;
2190
+ cov_1wctd2lw3r().s[37]++;
2191
2191
  options = {
2192
2192
  ...options,
2193
2193
  ns: namespace // ensure namespace argument is used
2194
2194
  };
2195
- const en = (cov_ogldeftyv().s[38]++, this.i18next.getFixedT("en", namespace));
2196
- const str = (cov_ogldeftyv().s[39]++, en(key, options));
2197
- cov_ogldeftyv().s[40]++;
2195
+ const en = (cov_1wctd2lw3r().s[38]++, this.i18next.getFixedT("en", namespace));
2196
+ const str = (cov_1wctd2lw3r().s[39]++, en(key, options));
2197
+ cov_1wctd2lw3r().s[40]++;
2198
2198
  if (typeof str !== "string") {
2199
- cov_ogldeftyv().b[15][0]++;
2200
- cov_ogldeftyv().s[41]++;
2199
+ cov_1wctd2lw3r().b[15][0]++;
2200
+ cov_1wctd2lw3r().s[41]++;
2201
2201
  throw new Error("Translation key(s) not found");
2202
2202
  } else {
2203
- cov_ogldeftyv().b[15][1]++;
2203
+ cov_1wctd2lw3r().b[15][1]++;
2204
2204
  }
2205
- cov_ogldeftyv().s[42]++;
2205
+ cov_1wctd2lw3r().s[42]++;
2206
2206
  return str;
2207
2207
  }
2208
2208
  /** Get the promise for an already registered Namespace.
@@ -2210,20 +2210,20 @@ class ITwinLocalization {
2210
2210
  * @public
2211
2211
  */
2212
2212
  getNamespacePromise(name) {
2213
- cov_ogldeftyv().f[7]++;
2214
- cov_ogldeftyv().s[43]++;
2213
+ cov_1wctd2lw3r().f[7]++;
2214
+ cov_1wctd2lw3r().s[43]++;
2215
2215
  return this._namespaces.get(name);
2216
2216
  }
2217
2217
  /** @internal */
2218
2218
  getLanguageList() {
2219
- cov_ogldeftyv().f[8]++;
2220
- cov_ogldeftyv().s[44]++;
2219
+ cov_1wctd2lw3r().f[8]++;
2220
+ cov_1wctd2lw3r().s[44]++;
2221
2221
  return this.i18next.languages;
2222
2222
  }
2223
2223
  /** override the language detected in the browser */
2224
2224
  async changeLanguage(language) {
2225
- cov_ogldeftyv().f[9]++;
2226
- cov_ogldeftyv().s[45]++;
2225
+ cov_1wctd2lw3r().f[9]++;
2226
+ cov_1wctd2lw3r().s[45]++;
2227
2227
  return this.i18next.changeLanguage(language);
2228
2228
  }
2229
2229
  /** Register a new Namespace and return it. If the namespace is already registered, it will be returned.
@@ -2235,94 +2235,94 @@ class ITwinLocalization {
2235
2235
  * @public
2236
2236
  */
2237
2237
  async registerNamespace(name) {
2238
- cov_ogldeftyv().f[10]++;
2239
- const existing = (cov_ogldeftyv().s[46]++, this._namespaces.get(name));
2240
- cov_ogldeftyv().s[47]++;
2238
+ cov_1wctd2lw3r().f[10]++;
2239
+ const existing = (cov_1wctd2lw3r().s[46]++, this._namespaces.get(name));
2240
+ cov_1wctd2lw3r().s[47]++;
2241
2241
  if (existing !== undefined) {
2242
- cov_ogldeftyv().b[16][0]++;
2243
- cov_ogldeftyv().s[48]++;
2242
+ cov_1wctd2lw3r().b[16][0]++;
2243
+ cov_1wctd2lw3r().s[48]++;
2244
2244
  return existing;
2245
2245
  } else {
2246
- cov_ogldeftyv().b[16][1]++;
2246
+ cov_1wctd2lw3r().b[16][1]++;
2247
2247
  }
2248
- const theReadPromise = (cov_ogldeftyv().s[49]++, new Promise(resolve => {
2249
- cov_ogldeftyv().f[11]++;
2250
- cov_ogldeftyv().s[50]++;
2248
+ const theReadPromise = (cov_1wctd2lw3r().s[49]++, new Promise(resolve => {
2249
+ cov_1wctd2lw3r().f[11]++;
2250
+ cov_1wctd2lw3r().s[50]++;
2251
2251
  // eslint-disable-next-line @typescript-eslint/no-floating-promises
2252
2252
  this.i18next.loadNamespaces(name, err => {
2253
- cov_ogldeftyv().f[12]++;
2254
- cov_ogldeftyv().s[51]++;
2253
+ cov_1wctd2lw3r().f[12]++;
2254
+ cov_1wctd2lw3r().s[51]++;
2255
2255
  if (!err) {
2256
- cov_ogldeftyv().b[17][0]++;
2257
- cov_ogldeftyv().s[52]++;
2256
+ cov_1wctd2lw3r().b[17][0]++;
2257
+ cov_1wctd2lw3r().s[52]++;
2258
2258
  return resolve();
2259
2259
  } else {
2260
- cov_ogldeftyv().b[17][1]++;
2260
+ cov_1wctd2lw3r().b[17][1]++;
2261
2261
  }
2262
2262
  // i18next can return errors from other concurrent namespace loads in this callback.
2263
- const wasLoaded = (cov_ogldeftyv().s[53]++, this.getLanguageList().some(language => {
2264
- cov_ogldeftyv().f[13]++;
2265
- cov_ogldeftyv().s[54]++;
2263
+ const wasLoaded = (cov_1wctd2lw3r().s[53]++, this.getLanguageList().some(language => {
2264
+ cov_1wctd2lw3r().f[13]++;
2265
+ cov_1wctd2lw3r().s[54]++;
2266
2266
  return this.i18next.hasResourceBundle(language, name);
2267
2267
  }));
2268
- cov_ogldeftyv().s[55]++;
2268
+ cov_1wctd2lw3r().s[55]++;
2269
2269
  if (!wasLoaded) {
2270
- cov_ogldeftyv().b[18][0]++;
2271
- cov_ogldeftyv().s[56]++;
2270
+ cov_1wctd2lw3r().b[18][0]++;
2271
+ cov_1wctd2lw3r().s[56]++;
2272
2272
  core_bentley_1.Logger.logError("i18n", `No resources for namespace ${name} could be loaded`);
2273
2273
  } else {
2274
- cov_ogldeftyv().b[18][1]++;
2274
+ cov_1wctd2lw3r().b[18][1]++;
2275
2275
  }
2276
- cov_ogldeftyv().s[57]++;
2276
+ cov_1wctd2lw3r().s[57]++;
2277
2277
  resolve();
2278
2278
  });
2279
2279
  }));
2280
- cov_ogldeftyv().s[58]++;
2280
+ cov_1wctd2lw3r().s[58]++;
2281
2281
  this._namespaces.set(name, theReadPromise);
2282
- cov_ogldeftyv().s[59]++;
2282
+ cov_1wctd2lw3r().s[59]++;
2283
2283
  return theReadPromise;
2284
2284
  }
2285
2285
  /** @internal */
2286
2286
  unregisterNamespace(name) {
2287
- cov_ogldeftyv().f[14]++;
2288
- cov_ogldeftyv().s[60]++;
2287
+ cov_1wctd2lw3r().f[14]++;
2288
+ cov_1wctd2lw3r().s[60]++;
2289
2289
  this._namespaces.delete(name);
2290
2290
  }
2291
2291
  }
2292
- cov_ogldeftyv().s[61]++;
2292
+ cov_1wctd2lw3r().s[61]++;
2293
2293
  exports.ITwinLocalization = ITwinLocalization;
2294
2294
  class TranslationLogger {
2295
- static type = (cov_ogldeftyv().s[62]++, "logger");
2295
+ static type = (cov_1wctd2lw3r().s[62]++, "logger");
2296
2296
  log(args) {
2297
- cov_ogldeftyv().f[15]++;
2298
- cov_ogldeftyv().s[63]++;
2297
+ cov_1wctd2lw3r().f[15]++;
2298
+ cov_1wctd2lw3r().s[63]++;
2299
2299
  core_bentley_1.Logger.logInfo("i18n", this.createLogMessage(args));
2300
2300
  }
2301
2301
  warn(args) {
2302
- cov_ogldeftyv().f[16]++;
2303
- cov_ogldeftyv().s[64]++;
2302
+ cov_1wctd2lw3r().f[16]++;
2303
+ cov_1wctd2lw3r().s[64]++;
2304
2304
  core_bentley_1.Logger.logWarning("i18n", this.createLogMessage(args));
2305
2305
  }
2306
2306
  error(args) {
2307
- cov_ogldeftyv().f[17]++;
2308
- cov_ogldeftyv().s[65]++;
2307
+ cov_1wctd2lw3r().f[17]++;
2308
+ cov_1wctd2lw3r().s[65]++;
2309
2309
  core_bentley_1.Logger.logError("i18n", this.createLogMessage(args));
2310
2310
  }
2311
2311
  createLogMessage(args) {
2312
- cov_ogldeftyv().f[18]++;
2313
- let message = (cov_ogldeftyv().s[66]++, args[0]);
2314
- cov_ogldeftyv().s[67]++;
2315
- for (let i = (cov_ogldeftyv().s[68]++, 1); i < args.length; ++i) {
2316
- cov_ogldeftyv().s[69]++;
2312
+ cov_1wctd2lw3r().f[18]++;
2313
+ let message = (cov_1wctd2lw3r().s[66]++, args[0]);
2314
+ cov_1wctd2lw3r().s[67]++;
2315
+ for (let i = (cov_1wctd2lw3r().s[68]++, 1); i < args.length; ++i) {
2316
+ cov_1wctd2lw3r().s[69]++;
2317
2317
  if (typeof args[i] === "string") {
2318
- cov_ogldeftyv().b[19][0]++;
2319
- cov_ogldeftyv().s[70]++;
2318
+ cov_1wctd2lw3r().b[19][0]++;
2319
+ cov_1wctd2lw3r().s[70]++;
2320
2320
  message += `\n ${args[i]}`;
2321
2321
  } else {
2322
- cov_ogldeftyv().b[19][1]++;
2322
+ cov_1wctd2lw3r().b[19][1]++;
2323
2323
  }
2324
2324
  }
2325
- cov_ogldeftyv().s[71]++;
2325
+ cov_1wctd2lw3r().s[71]++;
2326
2326
  return message;
2327
2327
  }
2328
2328
  }
@@ -17339,6 +17339,7 @@ function assert(condition, message) {
17339
17339
  "use strict";
17340
17340
  __webpack_require__.r(__webpack_exports__);
17341
17341
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
17342
+ /* harmony export */ BeAsyncEvent: () => (/* binding */ BeAsyncEvent),
17342
17343
  /* harmony export */ BeEvent: () => (/* binding */ BeEvent),
17343
17344
  /* harmony export */ BeEventList: () => (/* binding */ BeEventList),
17344
17345
  /* harmony export */ BeUiEvent: () => (/* binding */ BeUiEvent),
@@ -17426,8 +17427,13 @@ class BeEvent {
17426
17427
  dropped = true;
17427
17428
  }
17428
17429
  else {
17430
+ const listener = context.listener;
17431
+ if (context.once) {
17432
+ context.listener = undefined;
17433
+ dropped = true;
17434
+ }
17429
17435
  try {
17430
- context.listener.apply(context.scope, args);
17436
+ listener.apply(context.scope, args);
17431
17437
  }
17432
17438
  catch (e) {
17433
17439
  _UnexpectedErrors__WEBPACK_IMPORTED_MODULE_0__.UnexpectedErrors.handle(e);
@@ -17436,10 +17442,6 @@ class BeEvent {
17436
17442
  // listener was removed during its own callback
17437
17443
  dropped = true;
17438
17444
  }
17439
- else if (context.once) {
17440
- context.listener = undefined;
17441
- dropped = true;
17442
- }
17443
17445
  }
17444
17446
  }
17445
17447
  this._emitDepth--;
@@ -17483,8 +17485,6 @@ class BeUiEvent extends BeEvent {
17483
17485
  */
17484
17486
  class BeUnorderedEvent {
17485
17487
  _listeners = new Set();
17486
- _emitDepth = 0;
17487
- _hasTombstones = false;
17488
17488
  /** The number of listeners currently subscribed to the event.
17489
17489
  * @note During `raiseEvent()`, this may include listeners that have been removed or are one-shot
17490
17490
  * but are awaiting deferred cleanup. The count is accurate outside of `raiseEvent()`.
@@ -17514,43 +17514,26 @@ class BeUnorderedEvent {
17514
17514
  }
17515
17515
  /** Remove a specific context entry, deferring during emit. */
17516
17516
  _removeCtx(ctx) {
17517
- if (this._emitDepth > 0) {
17518
- ctx.listener = undefined; // tombstone for deferred cleanup
17519
- this._hasTombstones = true;
17520
- }
17521
- else {
17522
- this._listeners.delete(ctx);
17523
- }
17517
+ this._listeners.delete(ctx);
17524
17518
  }
17525
17519
  /**
17526
17520
  * Raises the event by calling each registered listener with the supplied arguments.
17527
17521
  * @param args This method takes any number of parameters and passes them through to the listeners.
17528
17522
  */
17529
17523
  raiseEvent(...args) {
17530
- this._emitDepth++;
17531
17524
  for (const ctx of this._listeners) {
17532
17525
  if (!ctx.listener) {
17533
17526
  continue;
17534
17527
  }
17528
+ if (ctx.once) {
17529
+ this._listeners.delete(ctx);
17530
+ }
17535
17531
  try {
17536
17532
  ctx.listener.apply(ctx.scope, args);
17537
17533
  }
17538
17534
  catch (e) {
17539
17535
  _UnexpectedErrors__WEBPACK_IMPORTED_MODULE_0__.UnexpectedErrors.handle(e);
17540
17536
  }
17541
- if (ctx.listener && ctx.once) {
17542
- ctx.listener = undefined;
17543
- this._hasTombstones = true;
17544
- }
17545
- }
17546
- this._emitDepth--;
17547
- // Only clean up tombstoned entries when we're back at the outermost emit
17548
- if (this._hasTombstones && this._emitDepth === 0) {
17549
- this._hasTombstones = false;
17550
- for (const ctx of this._listeners) {
17551
- if (ctx.listener === undefined)
17552
- this._listeners.delete(ctx);
17553
- }
17554
17537
  }
17555
17538
  }
17556
17539
  /** Clear all listeners from this BeUnorderedEvent.
@@ -17566,6 +17549,108 @@ class BeUnorderedUiEvent extends BeUnorderedEvent {
17566
17549
  /** Raises event with single strongly typed argument. */
17567
17550
  emit(args) { this.raiseEvent(args); }
17568
17551
  }
17552
+ /**
17553
+ * Manages a set of *listeners* for a particular event and notifies them when the event is raised.
17554
+ * Each listener is async (return a Promise<void>). The listeners may be invoked in series
17555
+ * or concurrently depending on the configuration of the instance.
17556
+ *
17557
+ * Like [[BeUnorderedEvent]], this class uses a `Set` internally to support more performant removal
17558
+ * of old listeners. When a listener is removed during emit, it is marked for deferred removal instead
17559
+ * of mutating the set immediately. Despite the "unordered" implication, items in a `Set` are enumerated
17560
+ * in insertion order, which means that this class invokes the listeners in insertion order.
17561
+ *
17562
+ * Listeners are managed exclusively through the disposal closure returned by [[addListener]] and
17563
+ * [[addOnce]]. There is no `removeListener` or `has` method — callers must capture the returned
17564
+ * closure to unsubscribe.
17565
+ * @beta
17566
+ */
17567
+ class BeAsyncEvent {
17568
+ _listeners = new Set();
17569
+ _concurrent = false;
17570
+ _promiseRejectionIsUnexpected = false;
17571
+ constructor(options) {
17572
+ if (options?.concurrent)
17573
+ this._concurrent = true;
17574
+ if (options?.promiseRejectionIsUnexpected)
17575
+ this._promiseRejectionIsUnexpected = true;
17576
+ }
17577
+ /** The number of listeners currently subscribed to the event.
17578
+ * @note During `raiseEvent()`, this may include listeners that have been removed or are one-shot
17579
+ * but are awaiting deferred cleanup. The count is accurate outside of `raiseEvent()`.
17580
+ */
17581
+ get numberOfListeners() { return this._listeners.size; }
17582
+ /**
17583
+ * Registers a Listener to be executed whenever this event is raised.
17584
+ * @param listener The function to be executed when the event is raised.
17585
+ * @param scope An optional object scope to serve as the 'this' pointer when listener is invoked.
17586
+ * @returns A function that will remove this event listener in O(1).
17587
+ */
17588
+ addListener(listener, scope) {
17589
+ const ctx = { listener, scope, once: false };
17590
+ this._listeners.add(ctx);
17591
+ return () => this._removeCtx(ctx);
17592
+ }
17593
+ /**
17594
+ * Registers a callback function to be executed *only once* when the event is raised.
17595
+ * @param listener The function to be executed once when the event is raised.
17596
+ * @param scope An optional object scope to serve as the `this` pointer in which the listener function will execute.
17597
+ * @returns A function that will remove this event listener in O(1).
17598
+ */
17599
+ addOnce(listener, scope) {
17600
+ const ctx = { listener, scope, once: true };
17601
+ this._listeners.add(ctx);
17602
+ return () => this._removeCtx(ctx);
17603
+ }
17604
+ /** Remove a specific context entry, deferring during emit. */
17605
+ _removeCtx(ctx) {
17606
+ this._listeners.delete(ctx);
17607
+ }
17608
+ /**
17609
+ * Raises the event by calling each registered listener with the supplied arguments.
17610
+ *
17611
+ * See [[BeAsyncEventOptions]] for options that control the behavior of this method.
17612
+ *
17613
+ * @param args This method takes any number of parameters and passes them through to the listeners.
17614
+ * @returns A Promise that settles when the event invocation is complete.
17615
+ */
17616
+ async raiseEvent(...args) {
17617
+ const promises = [];
17618
+ // Wrapper to ensure that an exception thrown immediately by a listener is captured as a rejected promise rather than
17619
+ // allowed to propagate as an exception. A well-behaved Promise-returning function should never throw, but
17620
+ // this defends against the poorly-behaved ones. In Node 23+ we could use `Promise.try` instead.
17621
+ const invoke = async (ctx, args) => {
17622
+ if (!ctx.listener)
17623
+ return;
17624
+ await ctx.listener.apply(ctx.scope, args);
17625
+ };
17626
+ for (const ctx of this._listeners) {
17627
+ if (!ctx.listener)
17628
+ continue;
17629
+ if (ctx.once) {
17630
+ // Set guarantees this is safe during iteration.
17631
+ this._listeners.delete(ctx);
17632
+ }
17633
+ let promise = invoke(ctx, args);
17634
+ if (this._promiseRejectionIsUnexpected)
17635
+ promise = promise.catch(reason => _UnexpectedErrors__WEBPACK_IMPORTED_MODULE_0__.UnexpectedErrors.handle(reason));
17636
+ if (this._concurrent)
17637
+ promises.push(promise);
17638
+ else
17639
+ await promise;
17640
+ }
17641
+ if (this._concurrent) {
17642
+ const result = await Promise.allSettled(promises);
17643
+ const firstRejection = result.find(r => r.status === "rejected");
17644
+ if (firstRejection)
17645
+ throw firstRejection.reason;
17646
+ }
17647
+ }
17648
+ /** Clear all listeners from this BeAsyncEvent.
17649
+ * @note If called during `raiseEvent`, remaining listeners in the current iteration are skipped
17650
+ * immediately rather than being tombstoned.
17651
+ */
17652
+ clear() { this._listeners.clear(); }
17653
+ }
17569
17654
  /**
17570
17655
  * A list of BeEvent objects, accessible by an event name.
17571
17656
  * This class may be used instead of explicitly declaring each BeEvent as a member of a containing class.
@@ -20122,16 +20207,18 @@ var Id64;
20122
20207
  Id64.getFirst = getFirst;
20123
20208
  /** Return the number of [[Id64String]]s represented by an [[Id64Arg]]. */
20124
20209
  function sizeOf(arg) {
20125
- return typeof arg === "string" ? 1 : (Array.isArray(arg) ? arg.length : arg.size);
20210
+ return typeof arg === "string" ? 1 : "size" in arg ? arg.size : arg.length;
20126
20211
  }
20127
20212
  Id64.sizeOf = sizeOf;
20128
20213
  /** Returns true if the [[Id64Arg]] contains the specified Id. */
20129
20214
  function has(arg, id) {
20130
- if (typeof arg === "string")
20215
+ if (typeof arg === "string") {
20131
20216
  return arg === id;
20132
- if (Array.isArray(arg))
20133
- return -1 !== arg.indexOf(id);
20134
- return arg.has(id);
20217
+ }
20218
+ if ("has" in arg) {
20219
+ return arg.has(id);
20220
+ }
20221
+ return -1 !== arg.indexOf(id);
20135
20222
  }
20136
20223
  Id64.has = has;
20137
20224
  /** The string representation of an invalid Id. */
@@ -24201,6 +24288,7 @@ class YieldManager {
24201
24288
  __webpack_require__.r(__webpack_exports__);
24202
24289
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
24203
24290
  /* harmony export */ AbandonedError: () => (/* reexport safe */ _OneAtATimeAction__WEBPACK_IMPORTED_MODULE_22__.AbandonedError),
24291
+ /* harmony export */ BeAsyncEvent: () => (/* reexport safe */ _BeEvent__WEBPACK_IMPORTED_MODULE_2__.BeAsyncEvent),
24204
24292
  /* harmony export */ BeDuration: () => (/* reexport safe */ _Time__WEBPACK_IMPORTED_MODULE_30__.BeDuration),
24205
24293
  /* harmony export */ BeEvent: () => (/* reexport safe */ _BeEvent__WEBPACK_IMPORTED_MODULE_2__.BeEvent),
24206
24294
  /* harmony export */ BeEventList: () => (/* reexport safe */ _BeEvent__WEBPACK_IMPORTED_MODULE_2__.BeEventList),
@@ -24924,534 +25012,377 @@ module.exports = _unsupportedIterableToArray, module.exports.__esModule = true,
24924
25012
 
24925
25013
  /***/ },
24926
25014
 
24927
- /***/ "../../common/temp/node_modules/.pnpm/i18next-http-backend@3.0.6/node_modules/i18next-http-backend/esm/index.js"
25015
+ /***/ "../../common/temp/node_modules/.pnpm/i18next-http-backend@4.0.5/node_modules/i18next-http-backend/esm/index.js"
24928
25016
  /*!**********************************************************************************************************************!*\
24929
- !*** ../../common/temp/node_modules/.pnpm/i18next-http-backend@3.0.6/node_modules/i18next-http-backend/esm/index.js ***!
25017
+ !*** ../../common/temp/node_modules/.pnpm/i18next-http-backend@4.0.5/node_modules/i18next-http-backend/esm/index.js ***!
24930
25018
  \**********************************************************************************************************************/
24931
25019
  (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
24932
25020
 
24933
25021
  "use strict";
24934
25022
  __webpack_require__.r(__webpack_exports__);
24935
25023
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
24936
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
25024
+ /* harmony export */ "default": () => (/* binding */ Backend)
24937
25025
  /* harmony export */ });
24938
- /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils.js */ "../../common/temp/node_modules/.pnpm/i18next-http-backend@3.0.6/node_modules/i18next-http-backend/esm/utils.js");
24939
- /* harmony import */ var _request_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./request.js */ "../../common/temp/node_modules/.pnpm/i18next-http-backend@3.0.6/node_modules/i18next-http-backend/esm/request.js");
24940
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
24941
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
24942
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
24943
- function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
24944
- function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
24945
- function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
24946
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
24947
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
24948
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
24949
- ;
24950
-
24951
- var getDefaults = function getDefaults() {
24952
- return {
24953
- loadPath: '/locales/{{lng}}/{{ns}}.json',
24954
- addPath: '/locales/add/{{lng}}/{{ns}}',
24955
- parse: function parse(data) {
24956
- return JSON.parse(data);
24957
- },
24958
- stringify: JSON.stringify,
24959
- parsePayload: function parsePayload(namespace, key, fallbackValue) {
24960
- return _defineProperty({}, key, fallbackValue || '');
24961
- },
24962
- parseLoadPayload: function parseLoadPayload(languages, namespaces) {
24963
- return undefined;
24964
- },
24965
- request: _request_js__WEBPACK_IMPORTED_MODULE_1__["default"],
24966
- reloadInterval: typeof window !== 'undefined' ? false : 60 * 60 * 1000,
24967
- customHeaders: {},
24968
- queryStringParams: {},
24969
- crossDomain: false,
24970
- withCredentials: false,
24971
- overrideMimeType: false,
24972
- requestOptions: {
24973
- mode: 'cors',
24974
- credentials: 'same-origin',
24975
- cache: 'default'
24976
- }
24977
- };
24978
- };
24979
- var Backend = function () {
24980
- function Backend(services) {
24981
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
24982
- var allOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
24983
- _classCallCheck(this, Backend);
24984
- this.services = services;
24985
- this.options = options;
24986
- this.allOptions = allOptions;
24987
- this.type = 'backend';
24988
- this.init(services, options, allOptions);
24989
- }
24990
- return _createClass(Backend, [{
24991
- key: "init",
24992
- value: function init(services) {
24993
- var _this = this;
24994
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
24995
- var allOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
24996
- this.services = services;
24997
- this.options = _objectSpread(_objectSpread(_objectSpread({}, getDefaults()), this.options || {}), options);
24998
- this.allOptions = allOptions;
24999
- if (this.services && this.options.reloadInterval) {
25000
- var timer = setInterval(function () {
25001
- return _this.reload();
25002
- }, this.options.reloadInterval);
25003
- if (_typeof(timer) === 'object' && typeof timer.unref === 'function') timer.unref();
25004
- }
25005
- }
25006
- }, {
25007
- key: "readMulti",
25008
- value: function readMulti(languages, namespaces, callback) {
25009
- this._readAny(languages, languages, namespaces, namespaces, callback);
25010
- }
25011
- }, {
25012
- key: "read",
25013
- value: function read(language, namespace, callback) {
25014
- this._readAny([language], language, [namespace], namespace, callback);
25015
- }
25016
- }, {
25017
- key: "_readAny",
25018
- value: function _readAny(languages, loadUrlLanguages, namespaces, loadUrlNamespaces, callback) {
25019
- var _this2 = this;
25020
- var loadPath = this.options.loadPath;
25021
- if (typeof this.options.loadPath === 'function') {
25022
- loadPath = this.options.loadPath(languages, namespaces);
25023
- }
25024
- loadPath = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.makePromise)(loadPath);
25025
- loadPath.then(function (resolvedLoadPath) {
25026
- if (!resolvedLoadPath) return callback(null, {});
25027
- var url = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.interpolateUrl)(resolvedLoadPath, {
25028
- lng: languages.join('+'),
25029
- ns: namespaces.join('+')
25030
- });
25031
- if (url == null) {
25032
- var safeLngs = languages.map(_utils_js__WEBPACK_IMPORTED_MODULE_0__.sanitizeLogValue).join(', ');
25033
- var safeNss = namespaces.map(_utils_js__WEBPACK_IMPORTED_MODULE_0__.sanitizeLogValue).join(', ');
25034
- return callback(new Error('i18next-http-backend: unsafe lng/ns value — refusing to build request URL for languages=[' + safeLngs + '] namespaces=[' + safeNss + ']'), false);
25035
- }
25036
- _this2.loadUrl(url, callback, loadUrlLanguages, loadUrlNamespaces);
25037
- });
25038
- }
25039
- }, {
25040
- key: "loadUrl",
25041
- value: function loadUrl(url, callback, languages, namespaces) {
25042
- var _this3 = this;
25043
- var lng = typeof languages === 'string' ? [languages] : languages;
25044
- var ns = typeof namespaces === 'string' ? [namespaces] : namespaces;
25045
- var payload = this.options.parseLoadPayload(lng, ns);
25046
- var safeUrl = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.sanitizeLogValue)((0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.redactUrlCredentials)(url));
25047
- this.options.request(this.options, url, payload, function (err, res) {
25048
- if (res && (res.status >= 500 && res.status < 600 || !res.status)) return callback('failed loading ' + safeUrl + '; status code: ' + res.status, true);
25049
- if (res && res.status >= 400 && res.status < 500) return callback('failed loading ' + safeUrl + '; status code: ' + res.status, false);
25050
- if (!res && err && err.message) {
25051
- var errorMessage = err.message.toLowerCase();
25052
- var isNetworkError = ['failed', 'fetch', 'network', 'load'].find(function (term) {
25053
- return errorMessage.indexOf(term) > -1;
25054
- });
25055
- if (isNetworkError) {
25056
- return callback('failed loading ' + safeUrl + ': ' + (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.sanitizeLogValue)(err.message), true);
25057
- }
25058
- }
25059
- if (err) return callback(err, false);
25060
- var ret, parseErr;
25061
- try {
25062
- if (typeof res.data === 'string') {
25063
- ret = _this3.options.parse(res.data, languages, namespaces);
25064
- } else {
25065
- ret = res.data;
25066
- }
25067
- } catch (e) {
25068
- parseErr = 'failed parsing ' + safeUrl + ' to json';
25069
- }
25070
- if (parseErr) return callback(parseErr, false);
25071
- callback(null, ret);
25072
- });
25073
- }
25074
- }, {
25075
- key: "create",
25076
- value: function create(languages, namespace, key, fallbackValue, callback) {
25077
- var _this4 = this;
25078
- if (!this.options.addPath) return;
25079
- if (typeof languages === 'string') languages = [languages];
25080
- var payload = this.options.parsePayload(namespace, key, fallbackValue);
25081
- var finished = 0;
25082
- var dataArray = [];
25083
- var resArray = [];
25084
- languages.forEach(function (lng) {
25085
- var addPath = _this4.options.addPath;
25086
- if (typeof _this4.options.addPath === 'function') {
25087
- addPath = _this4.options.addPath(lng, namespace);
25088
- }
25089
- var url = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.interpolateUrl)(addPath, {
25090
- lng: lng,
25091
- ns: namespace
25092
- });
25093
- if (url == null) {
25094
- finished += 1;
25095
- if (callback && finished === languages.length) callback(dataArray, resArray);
25096
- return;
25097
- }
25098
- _this4.options.request(_this4.options, url, payload, function (data, res) {
25099
- finished += 1;
25100
- dataArray.push(data);
25101
- resArray.push(res);
25102
- if (finished === languages.length) {
25103
- if (typeof callback === 'function') callback(dataArray, resArray);
25104
- }
25105
- });
25106
- });
25107
- }
25108
- }, {
25109
- key: "reload",
25110
- value: function reload() {
25111
- var _this5 = this;
25112
- var _this$services = this.services,
25113
- backendConnector = _this$services.backendConnector,
25114
- languageUtils = _this$services.languageUtils,
25115
- logger = _this$services.logger;
25116
- var currentLanguage = backendConnector.language;
25117
- if (currentLanguage && currentLanguage.toLowerCase() === 'cimode') return;
25118
- var toLoad = [];
25119
- var append = function append(lng) {
25120
- var lngs = languageUtils.toResolveHierarchy(lng);
25121
- lngs.forEach(function (l) {
25122
- if (toLoad.indexOf(l) < 0) toLoad.push(l);
25123
- });
25124
- };
25125
- append(currentLanguage);
25126
- if (this.allOptions.preload) this.allOptions.preload.forEach(function (l) {
25127
- return append(l);
25128
- });
25129
- toLoad.forEach(function (lng) {
25130
- _this5.allOptions.ns.forEach(function (ns) {
25131
- backendConnector.read(lng, ns, 'read', null, null, function (err, data) {
25132
- if (err) logger.warn("loading namespace ".concat(ns, " for language ").concat(lng, " failed"), err);
25133
- if (!err && data) logger.log("loaded namespace ".concat(ns, " for language ").concat(lng), data);
25134
- backendConnector.loaded("".concat(lng, "|").concat(ns), err, data);
25135
- });
25136
- });
25137
- });
25138
- }
25139
- }]);
25140
- }();
25141
- Backend.type = 'backend';
25142
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Backend);
25143
-
25144
- /***/ },
25145
-
25146
- /***/ "../../common/temp/node_modules/.pnpm/i18next-http-backend@3.0.6/node_modules/i18next-http-backend/esm/request.js"
25147
- /*!************************************************************************************************************************!*\
25148
- !*** ../../common/temp/node_modules/.pnpm/i18next-http-backend@3.0.6/node_modules/i18next-http-backend/esm/request.js ***!
25149
- \************************************************************************************************************************/
25150
- (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
25151
-
25152
- "use strict";
25153
- __webpack_require__.r(__webpack_exports__);
25154
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
25155
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
25156
- /* harmony export */ });
25157
- /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils.js */ "../../common/temp/node_modules/.pnpm/i18next-http-backend@3.0.6/node_modules/i18next-http-backend/esm/utils.js");
25158
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
25159
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
25160
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
25161
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
25162
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
25163
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
25164
- ;
25165
- var fetchApi = typeof fetch === 'function' ? fetch : undefined;
25166
- if (typeof __webpack_require__.g !== 'undefined' && __webpack_require__.g.fetch) {
25167
- fetchApi = __webpack_require__.g.fetch;
25168
- } else if (typeof window !== 'undefined' && window.fetch) {
25169
- fetchApi = window.fetch;
25170
- }
25171
- var XmlHttpRequestApi;
25172
- if ((0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.hasXMLHttpRequest)()) {
25173
- if (typeof __webpack_require__.g !== 'undefined' && __webpack_require__.g.XMLHttpRequest) {
25174
- XmlHttpRequestApi = __webpack_require__.g.XMLHttpRequest;
25175
- } else if (typeof window !== 'undefined' && window.XMLHttpRequest) {
25176
- XmlHttpRequestApi = window.XMLHttpRequest;
25177
- }
25178
- }
25179
- var ActiveXObjectApi;
25180
- if (typeof ActiveXObject === 'function') {
25181
- if (typeof __webpack_require__.g !== 'undefined' && __webpack_require__.g.ActiveXObject) {
25182
- ActiveXObjectApi = __webpack_require__.g.ActiveXObject;
25183
- } else if (typeof window !== 'undefined' && window.ActiveXObject) {
25184
- ActiveXObjectApi = window.ActiveXObject;
25185
- }
25186
- }
25187
- if (typeof fetchApi !== 'function') fetchApi = undefined;
25188
- if (!fetchApi && !XmlHttpRequestApi && !ActiveXObjectApi) {
25189
- try {
25190
- __webpack_require__.e(/*! import() */ "vendors-common_temp_node_modules_pnpm_cross-fetch_4_1_0_node_modules_cross-fetch_dist_browser-44272f").then(() => (__webpack_require__.t(/*! cross-fetch */ "../../common/temp/node_modules/.pnpm/cross-fetch@4.1.0/node_modules/cross-fetch/dist/browser-ponyfill.js", 19))).then(function (mod) {
25191
- fetchApi = mod.default;
25192
- }).catch(function () {});
25193
- } catch (e) {}
25194
- }
25195
- var UNSAFE_KEYS = ['__proto__', 'constructor', 'prototype'];
25196
- var addQueryString = function addQueryString(url, params) {
25197
- if (params && _typeof(params) === 'object') {
25198
- var queryString = '';
25199
- for (var _i = 0, _Object$keys = Object.keys(params); _i < _Object$keys.length; _i++) {
25200
- var paramName = _Object$keys[_i];
25201
- if (UNSAFE_KEYS.indexOf(paramName) > -1) continue;
25202
- queryString += '&' + encodeURIComponent(paramName) + '=' + encodeURIComponent(params[paramName]);
25203
- }
25204
- if (!queryString) return url;
25205
- url = url + (url.indexOf('?') !== -1 ? '&' : '?') + queryString.slice(1);
25206
- }
25207
- return url;
25208
- };
25209
- var fetchIt = function fetchIt(url, fetchOptions, callback, altFetch) {
25210
- var resolver = function resolver(response) {
25211
- if (!response.ok) return callback(response.statusText || 'Error', {
25212
- status: response.status
25213
- });
25214
- response.text().then(function (data) {
25215
- callback(null, {
25216
- status: response.status,
25217
- data: data
25218
- });
25219
- }).catch(callback);
25220
- };
25221
- if (altFetch) {
25222
- var altResponse = altFetch(url, fetchOptions);
25223
- if (altResponse instanceof Promise) {
25224
- altResponse.then(resolver).catch(callback);
25225
- return;
25226
- }
25227
- }
25228
- if (typeof fetch === 'function') {
25229
- fetch(url, fetchOptions).then(resolver).catch(callback);
25230
- } else {
25231
- fetchApi(url, fetchOptions).then(resolver).catch(callback);
25232
- }
25233
- };
25234
- var requestWithFetch = function requestWithFetch(options, url, payload, callback) {
25235
- if (options.queryStringParams) {
25236
- url = addQueryString(url, options.queryStringParams);
25237
- }
25238
- var headers = _objectSpread({}, typeof options.customHeaders === 'function' ? options.customHeaders() : options.customHeaders);
25239
- if (typeof window === 'undefined' && typeof __webpack_require__.g !== 'undefined' && typeof __webpack_require__.g.process !== 'undefined' && __webpack_require__.g.process.versions && __webpack_require__.g.process.versions.node) {
25240
- headers['User-Agent'] = "i18next-http-backend (node/".concat(__webpack_require__.g.process.version, "; ").concat(__webpack_require__.g.process.platform, " ").concat(__webpack_require__.g.process.arch, ")");
25241
- }
25242
- if (payload) headers['Content-Type'] = 'application/json';
25243
- var reqOptions = typeof options.requestOptions === 'function' ? options.requestOptions(payload) : options.requestOptions;
25244
- var fetchOptions = _objectSpread({
25245
- method: payload ? 'POST' : 'GET',
25246
- body: payload ? options.stringify(payload) : undefined,
25247
- headers: headers
25248
- }, options._omitFetchOptions ? {} : reqOptions);
25249
- var altFetch = typeof options.alternateFetch === 'function' && options.alternateFetch.length >= 1 ? options.alternateFetch : undefined;
25250
- try {
25251
- fetchIt(url, fetchOptions, callback, altFetch);
25252
- } catch (e) {
25253
- if (!reqOptions || Object.keys(reqOptions).length === 0 || !e.message || e.message.indexOf('not implemented') < 0) {
25254
- return callback(e);
25255
- }
25256
- try {
25257
- Object.keys(reqOptions).forEach(function (opt) {
25258
- delete fetchOptions[opt];
25259
- });
25260
- fetchIt(url, fetchOptions, callback, altFetch);
25261
- options._omitFetchOptions = true;
25262
- } catch (err) {
25263
- callback(err);
25264
- }
25265
- }
25266
- };
25267
- var requestWithXmlHttpRequest = function requestWithXmlHttpRequest(options, url, payload, callback) {
25268
- if (payload && _typeof(payload) === 'object') {
25269
- payload = addQueryString('', payload).slice(1);
25270
- }
25271
- if (options.queryStringParams) {
25272
- url = addQueryString(url, options.queryStringParams);
25273
- }
25274
- try {
25275
- var x = XmlHttpRequestApi ? new XmlHttpRequestApi() : new ActiveXObjectApi('MSXML2.XMLHTTP.3.0');
25276
- x.open(payload ? 'POST' : 'GET', url, 1);
25277
- if (!options.crossDomain) {
25278
- x.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
25279
- }
25280
- x.withCredentials = !!options.withCredentials;
25281
- if (payload) {
25282
- x.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
25283
- }
25284
- if (x.overrideMimeType) {
25285
- x.overrideMimeType('application/json');
25286
- }
25287
- var h = options.customHeaders;
25288
- h = typeof h === 'function' ? h() : h;
25289
- if (h) {
25290
- for (var _i2 = 0, _Object$keys2 = Object.keys(h); _i2 < _Object$keys2.length; _i2++) {
25291
- var i = _Object$keys2[_i2];
25292
- if (UNSAFE_KEYS.indexOf(i) > -1) continue;
25293
- x.setRequestHeader(i, h[i]);
25294
- }
25295
- }
25296
- x.onreadystatechange = function () {
25297
- x.readyState > 3 && callback(x.status >= 400 ? x.statusText : null, {
25298
- status: x.status,
25299
- data: x.responseText
25300
- });
25301
- };
25302
- x.send(payload);
25303
- } catch (e) {
25304
- console && console.log(e);
25305
- }
25306
- };
25307
- var request = function request(options, url, payload, callback) {
25308
- if (typeof payload === 'function') {
25309
- callback = payload;
25310
- payload = undefined;
25311
- }
25312
- callback = callback || function () {};
25313
- if (fetchApi && url.indexOf('file:') !== 0) {
25314
- return requestWithFetch(options, url, payload, callback);
25315
- }
25316
- if ((0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.hasXMLHttpRequest)() || typeof ActiveXObject === 'function') {
25317
- return requestWithXmlHttpRequest(options, url, payload, callback);
25318
- }
25319
- callback(new Error('No fetch and no xhr implementation found!'));
25320
- };
25321
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (request);
25322
-
25323
- /***/ },
25324
-
25325
- /***/ "../../common/temp/node_modules/.pnpm/i18next-http-backend@3.0.6/node_modules/i18next-http-backend/esm/utils.js"
25326
- /*!**********************************************************************************************************************!*\
25327
- !*** ../../common/temp/node_modules/.pnpm/i18next-http-backend@3.0.6/node_modules/i18next-http-backend/esm/utils.js ***!
25328
- \**********************************************************************************************************************/
25329
- (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
25330
-
25331
- "use strict";
25332
- __webpack_require__.r(__webpack_exports__);
25333
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
25334
- /* harmony export */ defaults: () => (/* binding */ defaults),
25335
- /* harmony export */ hasXMLHttpRequest: () => (/* binding */ hasXMLHttpRequest),
25336
- /* harmony export */ interpolate: () => (/* binding */ interpolate),
25337
- /* harmony export */ interpolateUrl: () => (/* binding */ interpolateUrl),
25338
- /* harmony export */ isSafeLangUrlSegment: () => (/* binding */ isSafeLangUrlSegment),
25339
- /* harmony export */ isSafeNsUrlSegment: () => (/* binding */ isSafeNsUrlSegment),
25340
- /* harmony export */ isSafeUrlSegment: () => (/* binding */ isSafeUrlSegment),
25341
- /* harmony export */ makePromise: () => (/* binding */ makePromise),
25342
- /* harmony export */ redactUrlCredentials: () => (/* binding */ redactUrlCredentials),
25343
- /* harmony export */ sanitizeLogValue: () => (/* binding */ sanitizeLogValue)
25344
- /* harmony export */ });
25345
- function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
25346
- function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
25347
- function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
25348
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
25349
- var arr = [];
25350
- var each = arr.forEach;
25351
- var slice = arr.slice;
25352
- var UNSAFE_KEYS = ['__proto__', 'constructor', 'prototype'];
25353
- function defaults(obj) {
25354
- each.call(slice.call(arguments, 1), function (source) {
25355
- if (source) {
25356
- for (var _i = 0, _Object$keys = Object.keys(source); _i < _Object$keys.length; _i++) {
25357
- var prop = _Object$keys[_i];
25358
- if (UNSAFE_KEYS.indexOf(prop) > -1) continue;
25359
- if (obj[prop] === undefined) obj[prop] = source[prop];
25360
- }
25361
- }
25362
- });
25363
- return obj;
25364
- }
25026
+ //#region lib/utils.js
25027
+ const arr = [];
25028
+ arr.forEach;
25029
+ arr.slice;
25030
+ const UNSAFE_KEYS$1 = [
25031
+ "__proto__",
25032
+ "constructor",
25033
+ "prototype"
25034
+ ];
25365
25035
  function isSafeUrlSegmentBase(v) {
25366
- if (typeof v !== 'string') return false;
25367
- if (v.length === 0 || v.length > 128) return false;
25368
- if (UNSAFE_KEYS.indexOf(v) > -1) return false;
25369
- if (v.indexOf('..') > -1) return false;
25370
- if (v.indexOf('\\') > -1) return false;
25371
- if (/[?#%\s@]/.test(v)) return false;
25372
- if (/[\x00-\x1F\x7F]/.test(v)) return false;
25373
- return true;
25036
+ if (typeof v !== "string") return false;
25037
+ if (v.length === 0 || v.length > 128) return false;
25038
+ if (UNSAFE_KEYS$1.indexOf(v) > -1) return false;
25039
+ if (v.indexOf("..") > -1) return false;
25040
+ if (v.indexOf("\\") > -1) return false;
25041
+ if (/[?#%:&=;\s]/.test(v)) return false;
25042
+ if (/[\x00-\x1F\x7F]/.test(v)) return false;
25043
+ return true;
25374
25044
  }
25375
25045
  function isSafeLangUrlSegment(v) {
25376
- if (!isSafeUrlSegmentBase(v)) return false;
25377
- if (v.indexOf('/') > -1) return false;
25378
- return true;
25046
+ if (!isSafeUrlSegmentBase(v)) return false;
25047
+ if (v.indexOf("/") > -1 || v.indexOf("@") > -1) return false;
25048
+ return true;
25379
25049
  }
25380
25050
  function isSafeNsUrlSegment(v) {
25381
- return isSafeUrlSegmentBase(v);
25051
+ if (!isSafeUrlSegmentBase(v)) return false;
25052
+ if (v.indexOf("//") > -1) return false;
25053
+ return true;
25382
25054
  }
25383
- var isSafeUrlSegment = isSafeLangUrlSegment;
25384
- var SAFETY_CHECK_BY_KEY = {
25385
- lng: isSafeLangUrlSegment,
25386
- ns: isSafeNsUrlSegment
25055
+ const SAFETY_CHECK_BY_KEY = {
25056
+ lng: isSafeLangUrlSegment,
25057
+ ns: isSafeNsUrlSegment
25387
25058
  };
25388
25059
  function sanitizeLogValue(v) {
25389
- if (typeof v !== 'string') return v;
25390
- return v.replace(/[\r\n\x00-\x1F\x7F]/g, ' ');
25060
+ if (typeof v !== "string") return v;
25061
+ return v.replace(/[\r\n\x00-\x1F\x7F]/g, " ");
25391
25062
  }
25392
25063
  function redactUrlCredentials(u) {
25393
- if (typeof u !== 'string' || u.length === 0) return u;
25394
- try {
25395
- var parsed = new URL(u);
25396
- if (parsed.username || parsed.password) {
25397
- parsed.username = '';
25398
- parsed.password = '';
25399
- return parsed.toString();
25400
- }
25401
- return u;
25402
- } catch (e) {
25403
- return u.replace(/(\/\/)[^/@\s]+@/g, '$1');
25404
- }
25064
+ if (typeof u !== "string" || u.length === 0) return u;
25065
+ try {
25066
+ const parsed = new URL(u);
25067
+ if (parsed.username || parsed.password) {
25068
+ parsed.username = "";
25069
+ parsed.password = "";
25070
+ return parsed.toString();
25071
+ }
25072
+ return u;
25073
+ } catch (e) {
25074
+ return u.replace(/(\/\/)[^/@\s]+@/g, "$1");
25075
+ }
25405
25076
  }
25406
25077
  function hasXMLHttpRequest() {
25407
- return typeof XMLHttpRequest === 'function' || (typeof XMLHttpRequest === "undefined" ? "undefined" : _typeof(XMLHttpRequest)) === 'object';
25078
+ return typeof XMLHttpRequest === "function" || typeof XMLHttpRequest === "object";
25408
25079
  }
25080
+ /**
25081
+ * Determine whether the given `maybePromise` is a Promise.
25082
+ *
25083
+ * @param {*} maybePromise
25084
+ *
25085
+ * @returns {Boolean}
25086
+ */
25409
25087
  function isPromise(maybePromise) {
25410
- return !!maybePromise && typeof maybePromise.then === 'function';
25088
+ return !!maybePromise && typeof maybePromise.then === "function";
25411
25089
  }
25090
+ /**
25091
+ * Convert any value to a Promise than will resolve to this value.
25092
+ *
25093
+ * @param {*} maybePromise
25094
+ *
25095
+ * @returns {Promise}
25096
+ */
25412
25097
  function makePromise(maybePromise) {
25413
- if (isPromise(maybePromise)) {
25414
- return maybePromise;
25415
- }
25416
- return Promise.resolve(maybePromise);
25417
- }
25418
- var interpolationRegexp = /\{\{(.+?)\}\}/g;
25419
- function interpolate(str, data) {
25420
- return str.replace(interpolationRegexp, function (match, key) {
25421
- var k = key.trim();
25422
- if (UNSAFE_KEYS.indexOf(k) > -1) return match;
25423
- var value = data[k];
25424
- return value != null ? value : match;
25425
- });
25098
+ if (isPromise(maybePromise)) return maybePromise;
25099
+ return Promise.resolve(maybePromise);
25426
25100
  }
25101
+ const interpolationRegexp = /\{\{(.+?)\}\}/g;
25102
+ const LEADING_DOUBLE_SLASH = /^[/\\]{2}/;
25427
25103
  function interpolateUrl(str, data) {
25428
- var unsafe = false;
25429
- var result = str.replace(interpolationRegexp, function (match, key) {
25430
- var k = key.trim();
25431
- if (UNSAFE_KEYS.indexOf(k) > -1) return match;
25432
- var value = data[k];
25433
- if (value == null) return match;
25434
- var check = SAFETY_CHECK_BY_KEY[k] || isSafeLangUrlSegment;
25435
- var segments = String(value).split('+');
25436
- var _iterator = _createForOfIteratorHelper(segments),
25437
- _step;
25438
- try {
25439
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
25440
- var seg = _step.value;
25441
- if (!check(seg)) {
25442
- unsafe = true;
25443
- return match;
25444
- }
25445
- }
25446
- } catch (err) {
25447
- _iterator.e(err);
25448
- } finally {
25449
- _iterator.f();
25450
- }
25451
- return segments.join('+');
25452
- });
25453
- return unsafe ? null : result;
25104
+ let unsafe = false;
25105
+ const result = str.replace(interpolationRegexp, (match, key) => {
25106
+ const k = key.trim();
25107
+ if (UNSAFE_KEYS$1.indexOf(k) > -1) return match;
25108
+ const value = data[k];
25109
+ if (value == null) return match;
25110
+ const check = SAFETY_CHECK_BY_KEY[k] || isSafeLangUrlSegment;
25111
+ const segments = String(value).split("+");
25112
+ for (const seg of segments) if (!check(seg)) {
25113
+ unsafe = true;
25114
+ return match;
25115
+ }
25116
+ return segments.join("+");
25117
+ });
25118
+ if (unsafe) return null;
25119
+ if (LEADING_DOUBLE_SLASH.test(result) && !LEADING_DOUBLE_SLASH.test(str)) return null;
25120
+ return result;
25454
25121
  }
25122
+ //#endregion
25123
+ //#region lib/request.js
25124
+ const g = typeof globalThis !== "undefined" ? globalThis : typeof __webpack_require__.g !== "undefined" ? __webpack_require__.g : typeof window !== "undefined" ? window : void 0;
25125
+ let fetchApi;
25126
+ if (typeof fetch === "function") fetchApi = fetch;
25127
+ else if (g && typeof g.fetch === "function") fetchApi = g.fetch;
25128
+ const XmlHttpRequestApi = hasXMLHttpRequest() && g ? g.XMLHttpRequest : void 0;
25129
+ const ActiveXObjectApi = typeof ActiveXObject === "function" && g ? g.ActiveXObject : void 0;
25130
+ const UNSAFE_KEYS = [
25131
+ "__proto__",
25132
+ "constructor",
25133
+ "prototype"
25134
+ ];
25135
+ const addQueryString = (url, params) => {
25136
+ if (params && typeof params === "object") {
25137
+ let queryString = "";
25138
+ for (const paramName of Object.keys(params)) {
25139
+ if (UNSAFE_KEYS.indexOf(paramName) > -1) continue;
25140
+ queryString += "&" + encodeURIComponent(paramName) + "=" + encodeURIComponent(params[paramName]);
25141
+ }
25142
+ if (!queryString) return url;
25143
+ url = url + (url.indexOf("?") !== -1 ? "&" : "?") + queryString.slice(1);
25144
+ }
25145
+ return url;
25146
+ };
25147
+ const fetchIt = (url, fetchOptions, callback, altFetch) => {
25148
+ const resolver = (response) => {
25149
+ if (!response.ok) return callback(response.statusText || "Error", { status: response.status });
25150
+ response.text().then((data) => {
25151
+ callback(null, {
25152
+ status: response.status,
25153
+ data
25154
+ });
25155
+ }).catch(callback);
25156
+ };
25157
+ if (altFetch) {
25158
+ const altResponse = altFetch(url, fetchOptions);
25159
+ if (altResponse instanceof Promise) {
25160
+ altResponse.then(resolver).catch(callback);
25161
+ return;
25162
+ }
25163
+ }
25164
+ if (typeof fetch === "function") fetch(url, fetchOptions).then(resolver).catch(callback);
25165
+ else fetchApi(url, fetchOptions).then(resolver).catch(callback);
25166
+ };
25167
+ const requestWithFetch = (options, url, payload, callback) => {
25168
+ if (options.queryStringParams) url = addQueryString(url, options.queryStringParams);
25169
+ const headers = { ...typeof options.customHeaders === "function" ? options.customHeaders() : options.customHeaders };
25170
+ if (typeof window === "undefined" && typeof __webpack_require__.g !== "undefined" && typeof __webpack_require__.g.process !== "undefined" && __webpack_require__.g.process.versions && __webpack_require__.g.process.versions.node) headers["User-Agent"] = `i18next-http-backend (node/${__webpack_require__.g.process.version}; ${__webpack_require__.g.process.platform} ${__webpack_require__.g.process.arch})`;
25171
+ if (payload) headers["Content-Type"] = "application/json";
25172
+ const reqOptions = typeof options.requestOptions === "function" ? options.requestOptions(payload) : options.requestOptions;
25173
+ const fetchOptions = {
25174
+ method: payload ? "POST" : "GET",
25175
+ body: payload ? options.stringify(payload) : void 0,
25176
+ headers,
25177
+ ...options._omitFetchOptions ? {} : reqOptions
25178
+ };
25179
+ const altFetch = typeof options.alternateFetch === "function" && options.alternateFetch.length >= 1 ? options.alternateFetch : void 0;
25180
+ try {
25181
+ fetchIt(url, fetchOptions, callback, altFetch);
25182
+ } catch (e) {
25183
+ if (!reqOptions || Object.keys(reqOptions).length === 0 || !e.message || e.message.indexOf("not implemented") < 0) return callback(e);
25184
+ try {
25185
+ Object.keys(reqOptions).forEach((opt) => {
25186
+ delete fetchOptions[opt];
25187
+ });
25188
+ fetchIt(url, fetchOptions, callback, altFetch);
25189
+ options._omitFetchOptions = true;
25190
+ } catch (err) {
25191
+ callback(err);
25192
+ }
25193
+ }
25194
+ };
25195
+ const requestWithXmlHttpRequest = (options, url, payload, callback) => {
25196
+ if (payload && typeof payload === "object") payload = addQueryString("", payload).slice(1);
25197
+ if (options.queryStringParams) url = addQueryString(url, options.queryStringParams);
25198
+ try {
25199
+ const x = XmlHttpRequestApi ? new XmlHttpRequestApi() : new ActiveXObjectApi("MSXML2.XMLHTTP.3.0");
25200
+ x.open(payload ? "POST" : "GET", url, 1);
25201
+ if (!options.crossDomain) x.setRequestHeader("X-Requested-With", "XMLHttpRequest");
25202
+ x.withCredentials = !!options.withCredentials;
25203
+ if (payload) x.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
25204
+ if (x.overrideMimeType) x.overrideMimeType("application/json");
25205
+ let h = options.customHeaders;
25206
+ h = typeof h === "function" ? h() : h;
25207
+ if (h) for (const i of Object.keys(h)) {
25208
+ if (UNSAFE_KEYS.indexOf(i) > -1) continue;
25209
+ x.setRequestHeader(i, h[i]);
25210
+ }
25211
+ x.onreadystatechange = () => {
25212
+ x.readyState > 3 && callback(x.status >= 400 ? x.statusText : null, {
25213
+ status: x.status,
25214
+ data: x.responseText
25215
+ });
25216
+ };
25217
+ x.send(payload);
25218
+ } catch (e) {
25219
+ console && console.log(e);
25220
+ }
25221
+ };
25222
+ const request = (options, url, payload, callback) => {
25223
+ if (typeof payload === "function") {
25224
+ callback = payload;
25225
+ payload = void 0;
25226
+ }
25227
+ callback = callback || (() => {});
25228
+ if (fetchApi && url.indexOf("file:") !== 0) return requestWithFetch(options, url, payload, callback);
25229
+ if (hasXMLHttpRequest() || typeof ActiveXObject === "function") return requestWithXmlHttpRequest(options, url, payload, callback);
25230
+ callback(/* @__PURE__ */ new Error("No fetch and no xhr implementation found!"));
25231
+ };
25232
+ //#endregion
25233
+ //#region lib/index.js
25234
+ const getDefaults = () => {
25235
+ return {
25236
+ loadPath: "/locales/{{lng}}/{{ns}}.json",
25237
+ addPath: "/locales/add/{{lng}}/{{ns}}",
25238
+ parse: (data) => JSON.parse(data),
25239
+ stringify: JSON.stringify,
25240
+ parsePayload: (namespace, key, fallbackValue) => ({ [key]: fallbackValue || "" }),
25241
+ parseLoadPayload: (languages, namespaces) => void 0,
25242
+ request,
25243
+ reloadInterval: typeof window !== "undefined" ? false : 3600 * 1e3,
25244
+ customHeaders: {},
25245
+ queryStringParams: {},
25246
+ crossDomain: false,
25247
+ withCredentials: false,
25248
+ overrideMimeType: false,
25249
+ requestOptions: {
25250
+ mode: "cors",
25251
+ credentials: "same-origin",
25252
+ cache: "default"
25253
+ }
25254
+ };
25255
+ };
25256
+ var Backend = class {
25257
+ constructor(services, options = {}, allOptions = {}) {
25258
+ this.services = services;
25259
+ this.options = options;
25260
+ this.allOptions = allOptions;
25261
+ this.type = "backend";
25262
+ this.init(services, options, allOptions);
25263
+ }
25264
+ init(services, options = {}, allOptions = {}) {
25265
+ this.services = services;
25266
+ this.options = {
25267
+ ...getDefaults(),
25268
+ ...this.options || {},
25269
+ ...options
25270
+ };
25271
+ this.allOptions = allOptions;
25272
+ if (this.services && this.options.reloadInterval) {
25273
+ const timer = setInterval(() => this.reload(), this.options.reloadInterval);
25274
+ if (typeof timer === "object" && typeof timer.unref === "function") timer.unref();
25275
+ }
25276
+ }
25277
+ readMulti(languages, namespaces, callback) {
25278
+ this._readAny(languages, languages, namespaces, namespaces, callback);
25279
+ }
25280
+ read(language, namespace, callback) {
25281
+ this._readAny([language], language, [namespace], namespace, callback);
25282
+ }
25283
+ _readAny(languages, loadUrlLanguages, namespaces, loadUrlNamespaces, callback) {
25284
+ let loadPath = this.options.loadPath;
25285
+ if (typeof this.options.loadPath === "function") loadPath = this.options.loadPath(languages, namespaces);
25286
+ loadPath = makePromise(loadPath);
25287
+ loadPath.then((resolvedLoadPath) => {
25288
+ if (!resolvedLoadPath) return callback(null, {});
25289
+ const url = interpolateUrl(resolvedLoadPath, {
25290
+ lng: languages.join("+"),
25291
+ ns: namespaces.join("+")
25292
+ });
25293
+ if (url == null) {
25294
+ const safeLngs = languages.map(sanitizeLogValue).join(", ");
25295
+ const safeNss = namespaces.map(sanitizeLogValue).join(", ");
25296
+ return callback(/* @__PURE__ */ new Error("i18next-http-backend: unsafe lng/ns value — refusing to build request URL for languages=[" + safeLngs + "] namespaces=[" + safeNss + "]"), false);
25297
+ }
25298
+ this.loadUrl(url, callback, loadUrlLanguages, loadUrlNamespaces);
25299
+ }, (err) => callback(err, false));
25300
+ }
25301
+ loadUrl(url, callback, languages, namespaces) {
25302
+ const lng = typeof languages === "string" ? [languages] : languages;
25303
+ const ns = typeof namespaces === "string" ? [namespaces] : namespaces;
25304
+ const payload = this.options.parseLoadPayload(lng, ns);
25305
+ const safeUrl = sanitizeLogValue(redactUrlCredentials(url));
25306
+ this.options.request(this.options, url, payload, (err, res) => {
25307
+ if (res && (res.status >= 500 && res.status < 600 || !res.status)) return callback("failed loading " + safeUrl + "; status code: " + res.status, true);
25308
+ if (res && res.status >= 400 && res.status < 500) return callback("failed loading " + safeUrl + "; status code: " + res.status, false);
25309
+ if (!res && err && err.message) {
25310
+ const errorMessage = err.message.toLowerCase();
25311
+ if ([
25312
+ "failed",
25313
+ "fetch",
25314
+ "network",
25315
+ "load"
25316
+ ].find((term) => errorMessage.indexOf(term) > -1)) return callback("failed loading " + safeUrl + ": " + sanitizeLogValue(err.message), true);
25317
+ }
25318
+ if (err) return callback(err, false);
25319
+ let ret, parseErr;
25320
+ try {
25321
+ if (typeof res.data === "string") ret = this.options.parse(res.data, languages, namespaces);
25322
+ else ret = res.data;
25323
+ } catch (e) {
25324
+ parseErr = "failed parsing " + safeUrl + " to json";
25325
+ }
25326
+ if (parseErr) return callback(parseErr, false);
25327
+ callback(null, ret);
25328
+ });
25329
+ }
25330
+ create(languages, namespace, key, fallbackValue, callback) {
25331
+ if (!this.options.addPath) return;
25332
+ if (typeof languages === "string") languages = [languages];
25333
+ const payload = this.options.parsePayload(namespace, key, fallbackValue);
25334
+ let finished = 0;
25335
+ const dataArray = [];
25336
+ const resArray = [];
25337
+ languages.forEach((lng) => {
25338
+ let addPath = this.options.addPath;
25339
+ if (typeof this.options.addPath === "function") addPath = this.options.addPath(lng, namespace);
25340
+ const url = interpolateUrl(addPath, {
25341
+ lng,
25342
+ ns: namespace
25343
+ });
25344
+ if (url == null) {
25345
+ finished += 1;
25346
+ if (callback && finished === languages.length) callback(dataArray, resArray);
25347
+ return;
25348
+ }
25349
+ this.options.request(this.options, url, payload, (data, res) => {
25350
+ finished += 1;
25351
+ dataArray.push(data);
25352
+ resArray.push(res);
25353
+ if (finished === languages.length) {
25354
+ if (typeof callback === "function") callback(dataArray, resArray);
25355
+ }
25356
+ });
25357
+ });
25358
+ }
25359
+ reload() {
25360
+ const { backendConnector, languageUtils, logger } = this.services;
25361
+ const currentLanguage = backendConnector.language;
25362
+ if (currentLanguage && currentLanguage.toLowerCase() === "cimode") return;
25363
+ const toLoad = [];
25364
+ const append = (lng) => {
25365
+ languageUtils.toResolveHierarchy(lng).forEach((l) => {
25366
+ if (toLoad.indexOf(l) < 0) toLoad.push(l);
25367
+ });
25368
+ };
25369
+ append(currentLanguage);
25370
+ if (this.allOptions.preload) this.allOptions.preload.forEach((l) => append(l));
25371
+ toLoad.forEach((lng) => {
25372
+ this.allOptions.ns.forEach((ns) => {
25373
+ backendConnector.read(lng, ns, "read", null, null, (err, data) => {
25374
+ if (err) logger.warn(`loading namespace ${ns} for language ${lng} failed`, err);
25375
+ if (!err && data) logger.log(`loaded namespace ${ns} for language ${lng}`, data);
25376
+ backendConnector.loaded(`${lng}|${ns}`, err, data);
25377
+ });
25378
+ });
25379
+ });
25380
+ }
25381
+ };
25382
+ Backend.type = "backend";
25383
+ //#endregion
25384
+
25385
+
25455
25386
 
25456
25387
  /***/ }
25457
25388
 
@@ -25487,40 +25418,7 @@ function interpolateUrl(str, data) {
25487
25418
  /******/ return module.exports;
25488
25419
  /******/ }
25489
25420
  /******/
25490
- /******/ // expose the modules object (__webpack_modules__)
25491
- /******/ __webpack_require__.m = __webpack_modules__;
25492
- /******/
25493
25421
  /************************************************************************/
25494
- /******/ /* webpack/runtime/create fake namespace object */
25495
- /******/ (() => {
25496
- /******/ const getProto = Object.getPrototypeOf;
25497
- /******/ let leafPrototypes;
25498
- /******/ // create a fake namespace object
25499
- /******/ // mode & 1: value is a module id, require it
25500
- /******/ // mode & 2: merge all properties of value into the ns
25501
- /******/ // mode & 4: return value when already ns object
25502
- /******/ // mode & 16: return value when it's Promise-like
25503
- /******/ // mode & 8|1: behave like require
25504
- /******/ __webpack_require__.t = function(value, mode) {
25505
- /******/ if(mode & 1) value = this(value);
25506
- /******/ if(mode & 8) return value;
25507
- /******/ if(typeof value === 'object' && value) {
25508
- /******/ if((mode & 4) && value.__esModule) return value;
25509
- /******/ if((mode & 16) && typeof value.then === 'function') return value;
25510
- /******/ }
25511
- /******/ const ns = Object.create(null);
25512
- /******/ __webpack_require__.r(ns);
25513
- /******/ const def = {};
25514
- /******/ leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];
25515
- /******/ for(var current = mode & 2 && value; (typeof current == 'object' || typeof current == 'function') && !~leafPrototypes.indexOf(current); current = getProto(current)) {
25516
- /******/ Object.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key])));
25517
- /******/ }
25518
- /******/ def['default'] = () => (value);
25519
- /******/ __webpack_require__.d(ns, def);
25520
- /******/ return ns;
25521
- /******/ };
25522
- /******/ })();
25523
- /******/
25524
25422
  /******/ /* webpack/runtime/define property getters */
25525
25423
  /******/ // define getter/value functions for harmony exports
25526
25424
  /******/ __webpack_require__.d = (exports, definition) => {
@@ -25531,20 +25429,6 @@ function interpolateUrl(str, data) {
25531
25429
  /******/ }
25532
25430
  /******/ };
25533
25431
  /******/
25534
- /******/ /* webpack/runtime/ensure chunk */
25535
- /******/ __webpack_require__.f = {};
25536
- /******/ // This file contains only the entry chunk.
25537
- /******/ // The chunk loading function for additional chunks
25538
- /******/ __webpack_require__.e = (chunkId) => {
25539
- /******/ const promises = [];
25540
- /******/ __webpack_require__.f.j(chunkId, promises);
25541
- /******/ return Promise.all(promises);
25542
- /******/ };
25543
- /******/
25544
- /******/ /* webpack/runtime/get javascript chunk filename */
25545
- /******/ // This function allow to reference async chunks
25546
- /******/ __webpack_require__.u = (chunkId) => (chunkId + ".bundled-tests.instrumented.js");
25547
- /******/
25548
25432
  /******/ /* webpack/runtime/global */
25549
25433
  /******/ __webpack_require__.g = (function() {
25550
25434
  /******/ if (typeof globalThis === 'object') return globalThis;
@@ -25558,51 +25442,6 @@ function interpolateUrl(str, data) {
25558
25442
  /******/ /* webpack/runtime/hasOwnProperty shorthand */
25559
25443
  /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop));
25560
25444
  /******/
25561
- /******/ /* webpack/runtime/load script */
25562
- /******/ (() => {
25563
- /******/ const inProgress = {};
25564
- /******/ const dataWebpackPrefix = "@itwin/core-i18n:";
25565
- /******/ // loadScript function to load a script via script tag
25566
- /******/ __webpack_require__.l = (url, done, key, chunkId) => {
25567
- /******/ if(inProgress[url]) { inProgress[url].push(done); return; }
25568
- /******/ let script, needAttach;
25569
- /******/ if(key !== undefined) {
25570
- /******/ const scripts = document.getElementsByTagName("script");
25571
- /******/ for(var i = 0; i < scripts.length; i++) {
25572
- /******/ const s = scripts[i];
25573
- /******/ if(s.getAttribute("src") == url || s.getAttribute("data-webpack") == dataWebpackPrefix + key) { script = s; break; }
25574
- /******/ }
25575
- /******/ }
25576
- /******/ if(!script) {
25577
- /******/ needAttach = true;
25578
- /******/ script = document.createElement('script');
25579
- /******/
25580
- /******/ script.charset = 'utf-8';
25581
- /******/ if (__webpack_require__.nc) {
25582
- /******/ script.setAttribute("nonce", __webpack_require__.nc);
25583
- /******/ }
25584
- /******/ script.setAttribute("data-webpack", dataWebpackPrefix + key);
25585
- /******/
25586
- /******/ script.src = url;
25587
- /******/ }
25588
- /******/ inProgress[url] = [done];
25589
- /******/ const onScriptComplete = (prev, event) => {
25590
- /******/ // avoid mem leaks in IE.
25591
- /******/ script.onerror = script.onload = null;
25592
- /******/ clearTimeout(timeout);
25593
- /******/ const doneFns = inProgress[url];
25594
- /******/ delete inProgress[url];
25595
- /******/ script.parentNode?.removeChild(script);
25596
- /******/ doneFns?.forEach((fn) => (fn(event)));
25597
- /******/ if(prev) return prev(event);
25598
- /******/ }
25599
- /******/ const timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);
25600
- /******/ script.onerror = onScriptComplete.bind(null, script.onerror);
25601
- /******/ script.onload = onScriptComplete.bind(null, script.onload);
25602
- /******/ needAttach && document.head.appendChild(script);
25603
- /******/ };
25604
- /******/ })();
25605
- /******/
25606
25445
  /******/ /* webpack/runtime/make namespace object */
25607
25446
  /******/ // define __esModule on exports
25608
25447
  /******/ __webpack_require__.r = (exports) => {
@@ -25610,118 +25449,6 @@ function interpolateUrl(str, data) {
25610
25449
  /******/ Object.defineProperty(exports, '__esModule', { value: true });
25611
25450
  /******/ };
25612
25451
  /******/
25613
- /******/ /* webpack/runtime/publicPath */
25614
- /******/ (() => {
25615
- /******/ let scriptUrl;
25616
- /******/ if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + "";
25617
- /******/ const document = __webpack_require__.g.document;
25618
- /******/ if (!scriptUrl && document) {
25619
- /******/ if (document.currentScript?.tagName.toUpperCase() === 'SCRIPT')
25620
- /******/ scriptUrl = document.currentScript.src;
25621
- /******/ if (!scriptUrl) {
25622
- /******/ const scripts = document.getElementsByTagName("script");
25623
- /******/ if(scripts.length) {
25624
- /******/ let i = scripts.length - 1;
25625
- /******/ while (i > -1 && (!scriptUrl || !/^https?:/.test(scriptUrl))) scriptUrl = scripts[i--].src;
25626
- /******/ }
25627
- /******/ }
25628
- /******/ }
25629
- /******/ // When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration
25630
- /******/ // or pass an empty string ("") and set the __webpack_public_path__ variable from your code to use your own logic.
25631
- /******/ if (!scriptUrl) throw new Error("Automatic publicPath is not supported in this browser");
25632
- /******/ scriptUrl = scriptUrl.replace(/^blob:|[?#].*$/g, "").replace(/\/[^/]+$/, "/");
25633
- /******/ __webpack_require__.p = scriptUrl;
25634
- /******/ })();
25635
- /******/
25636
- /******/ /* webpack/runtime/jsonp chunk loading */
25637
- /******/ (() => {
25638
- /******/ // no baseURI
25639
- /******/
25640
- /******/ // object to store loaded and loading chunks
25641
- /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
25642
- /******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
25643
- /******/ const installedChunks = {
25644
- /******/ "main": 0
25645
- /******/ };
25646
- /******/
25647
- /******/ __webpack_require__.f.j = (chunkId, promises) => {
25648
- /******/ // JSONP chunk loading for javascript
25649
- /******/ let installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;
25650
- /******/ if(installedChunkData !== 0) { // 0 means "already installed".
25651
- /******/
25652
- /******/ // a Promise means "currently loading".
25653
- /******/ if(installedChunkData) {
25654
- /******/ promises.push(installedChunkData[2]);
25655
- /******/ } else {
25656
- /******/ if(true) { // all chunks have JS
25657
- /******/ // setup Promise in chunk cache
25658
- /******/ const promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));
25659
- /******/ promises.push(installedChunkData[2] = promise);
25660
- /******/
25661
- /******/ // create error before stack unwound to get useful stacktrace later
25662
- /******/ const error = new Error();
25663
- /******/ const loadingEnded = (event) => {
25664
- /******/ if(__webpack_require__.o(installedChunks, chunkId)) {
25665
- /******/ installedChunkData = installedChunks[chunkId];
25666
- /******/ if(installedChunkData !== 0) installedChunks[chunkId] = undefined;
25667
- /******/ if(installedChunkData) {
25668
- /******/ const errorType = event && (event.type === 'load' ? 'missing' : event.type);
25669
- /******/ const realSrc = event && event.target && event.target.src;
25670
- /******/ error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')';
25671
- /******/ error.name = 'ChunkLoadError';
25672
- /******/ error.type = errorType;
25673
- /******/ error.request = realSrc;
25674
- /******/ error.event = event;
25675
- /******/ installedChunkData[1](error);
25676
- /******/ }
25677
- /******/ }
25678
- /******/ };
25679
- /******/ __webpack_require__.l(__webpack_require__.p + __webpack_require__.u(chunkId), loadingEnded, "chunk-" + chunkId, chunkId);
25680
- /******/ }
25681
- /******/ }
25682
- /******/ }
25683
- /******/ };
25684
- /******/
25685
- /******/ // no prefetching
25686
- /******/
25687
- /******/ // no preloaded
25688
- /******/
25689
- /******/ // no HMR
25690
- /******/
25691
- /******/ // no HMR manifest
25692
- /******/
25693
- /******/ // no on chunks loaded
25694
- /******/
25695
- /******/ // install a JSONP callback for chunk loading
25696
- /******/ const webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
25697
- /******/ let [chunkIds, moreModules, runtime] = data;
25698
- /******/ // add "moreModules" to the modules object,
25699
- /******/ // then flag all "chunkIds" as loaded and fire callback
25700
- /******/ var moduleId, chunkId, i = 0;
25701
- /******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
25702
- /******/ for(moduleId in moreModules) {
25703
- /******/ if(__webpack_require__.o(moreModules, moduleId)) {
25704
- /******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
25705
- /******/ }
25706
- /******/ }
25707
- /******/ if(runtime) var result = runtime(__webpack_require__);
25708
- /******/ }
25709
- /******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
25710
- /******/ for(;i < chunkIds.length; i++) {
25711
- /******/ chunkId = chunkIds[i];
25712
- /******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
25713
- /******/ installedChunks[chunkId][0]();
25714
- /******/ }
25715
- /******/ installedChunks[chunkId] = 0;
25716
- /******/ }
25717
- /******/
25718
- /******/ }
25719
- /******/
25720
- /******/ const chunkLoadingGlobal = self["webpackChunk_itwin_core_i18n"] = self["webpackChunk_itwin_core_i18n"] || [];
25721
- /******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
25722
- /******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
25723
- /******/ })();
25724
- /******/
25725
25452
  /************************************************************************/
25726
25453
  let __webpack_exports__ = {};
25727
25454
  // This entry needs to be wrapped in an IIFE because it needs to be in strict mode.