@itwin/core-i18n 4.3.0-dev.8 → 4.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +41 -1
- package/lib/cjs/test/webpack/bundled-tests.instrumented.js +213 -205
- package/lib/cjs/test/webpack/bundled-tests.instrumented.js.map +1 -1
- package/lib/cjs/test/webpack/bundled-tests.js +72 -64
- package/lib/cjs/test/webpack/bundled-tests.js.map +1 -1
- package/package.json +6 -7
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
/** @packageDocumentation
|
|
18
18
|
* @module Localization
|
|
19
19
|
*/
|
|
20
|
-
function
|
|
21
|
-
var path = "D:\\vsts_a\\
|
|
22
|
-
var hash = "
|
|
20
|
+
function cov_2l9mmpbx71() {
|
|
21
|
+
var path = "D:\\vsts_a\\4\\s\\core\\i18n\\lib\\cjs\\ITwinLocalization.js";
|
|
22
|
+
var hash = "a3e19dc4692088e37c0252ff0761cac28d4c1c4a";
|
|
23
23
|
var global = new Function("return this")();
|
|
24
24
|
var gcv = "__coverage__";
|
|
25
25
|
var coverageData = {
|
|
26
|
-
path: "D:\\vsts_a\\
|
|
26
|
+
path: "D:\\vsts_a\\4\\s\\core\\i18n\\lib\\cjs\\ITwinLocalization.js",
|
|
27
27
|
statementMap: {
|
|
28
28
|
"0": {
|
|
29
29
|
start: {
|
|
@@ -2270,13 +2270,13 @@ function cov_2awov3utze() {
|
|
|
2270
2270
|
inputSourceMap: {
|
|
2271
2271
|
version: 3,
|
|
2272
2272
|
file: "ITwinLocalization.js",
|
|
2273
|
-
sources: ["D:\\vsts_a\\
|
|
2273
|
+
sources: ["D:\\vsts_a\\4\\s\\core\\i18n\\src\\ITwinLocalization.ts"],
|
|
2274
2274
|
names: [],
|
|
2275
2275
|
mappings: ";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;AAEH,sDAA2E;AAC3E,wGAAmG;AACnG,gFAA+D;AAC/D,sDAA6C;AAG7C,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F,OAAO,EAAE,CAAC;YACZ,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC;QAC3C,OAAO,cAAc,CAAC;IACxB,CAAC;IAED,gBAAgB;IACT,mBAAmB,CAAC,IAAY;QACrC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;CACF;AAnOD,8CAmOC;AAED,MAAM,iBAAiB;IAEd,GAAG,CAAC,IAAc,IAAI,qBAAM,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5E,IAAI,CAAC,IAAc,IAAI,qBAAM,CAAC,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IAChF,KAAK,CAAC,IAAc,IAAI,qBAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9E,gBAAgB,CAAC,IAAc;QACrC,IAAI,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QACtB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE;YACpC,IAAI,OAAO,IAAI,CAAC,CAAC,CAAC,KAAK,QAAQ;gBAC7B,OAAO,IAAI,OAAO,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;SAC/B;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;;AAXsB,sBAAI,GAAG,QAAQ,CAAC",
|
|
2276
2276
|
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, { 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 /** Similar to `getLocalizedString` but the default namespace is a separate parameter and the key does not need\r\n * to include a namespace. If a key includes a namespace, that namespace will be used for interpolating that key.\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 getLocalizedStringWithNamespace(namespace: string, key: string | string[], options?: TOptionsBase): string {\r\n let fullKey: string | string[] = \"\";\r\n\r\n if (typeof key === \"string\") {\r\n fullKey = `${namespace}:${key}`;\r\n } else {\r\n fullKey = key.map((subKey: string) => {\r\n return `${namespace}:${subKey}`;\r\n });\r\n }\r\n\r\n return this.getLocalizedString(fullKey, options);\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 // Here we got a non-null err object.\r\n // This method is called when the system has attempted to load the resources for the namespaces for each possible locale.\r\n // For example 'fr-ca' might be the most specific locale, in which case 'fr' and 'en' are fallback locales.\r\n // Using Backend from i18next-http-backend, err will be an array of strings of each namespace it tried to read and its locale.\r\n // There might be errs for some other namespaces as well as this one. We resolve the promise unless there's an error for each possible locale.\r\n let locales = this.getLanguageList().map((thisLocale: any) => `/${thisLocale}/`);\r\n\r\n try {\r\n for (const thisError of err) {\r\n if (typeof thisError === \"string\")\r\n locales = locales.filter((thisLocale) => !thisError.includes(thisLocale));\r\n }\r\n } catch (e) {\r\n locales = [];\r\n }\r\n // if we removed every locale from the array, it wasn't loaded.\r\n if (locales.length === 0)\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"]
|
|
2277
2277
|
},
|
|
2278
2278
|
_coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
|
|
2279
|
-
hash: "
|
|
2279
|
+
hash: "a3e19dc4692088e37c0252ff0761cac28d4c1c4a"
|
|
2280
2280
|
};
|
|
2281
2281
|
var coverage = global[gcv] || (global[gcv] = {});
|
|
2282
2282
|
if (!coverage[path] || coverage[path].hash !== hash) {
|
|
@@ -2285,56 +2285,56 @@ function cov_2awov3utze() {
|
|
|
2285
2285
|
var actualCoverage = coverage[path];
|
|
2286
2286
|
{
|
|
2287
2287
|
// @ts-ignore
|
|
2288
|
-
|
|
2288
|
+
cov_2l9mmpbx71 = function () {
|
|
2289
2289
|
return actualCoverage;
|
|
2290
2290
|
};
|
|
2291
2291
|
}
|
|
2292
2292
|
return actualCoverage;
|
|
2293
2293
|
}
|
|
2294
|
-
|
|
2295
|
-
var __importDefault = (
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
return (
|
|
2294
|
+
cov_2l9mmpbx71();
|
|
2295
|
+
var __importDefault = (cov_2l9mmpbx71().s[0]++, (cov_2l9mmpbx71().b[0][0]++, this) && (cov_2l9mmpbx71().b[0][1]++, this.__importDefault) || (cov_2l9mmpbx71().b[0][2]++, function (mod) {
|
|
2296
|
+
cov_2l9mmpbx71().f[0]++;
|
|
2297
|
+
cov_2l9mmpbx71().s[1]++;
|
|
2298
|
+
return (cov_2l9mmpbx71().b[2][0]++, mod) && (cov_2l9mmpbx71().b[2][1]++, mod.__esModule) ? (cov_2l9mmpbx71().b[1][0]++, mod) : (cov_2l9mmpbx71().b[1][1]++, {
|
|
2299
2299
|
"default": mod
|
|
2300
2300
|
});
|
|
2301
2301
|
}));
|
|
2302
|
-
|
|
2302
|
+
cov_2l9mmpbx71().s[2]++;
|
|
2303
2303
|
Object.defineProperty(exports, "__esModule", ({
|
|
2304
2304
|
value: true
|
|
2305
2305
|
}));
|
|
2306
|
-
|
|
2306
|
+
cov_2l9mmpbx71().s[3]++;
|
|
2307
2307
|
exports.ITwinLocalization = void 0;
|
|
2308
|
-
const i18next_1 = (
|
|
2309
|
-
const i18next_browser_languagedetector_1 = (
|
|
2310
|
-
const i18next_http_backend_1 = (
|
|
2311
|
-
const core_bentley_1 = (
|
|
2312
|
-
const DEFAULT_MAX_RETRIES = (
|
|
2308
|
+
const i18next_1 = (cov_2l9mmpbx71().s[4]++, __importDefault(__webpack_require__(/*! i18next */ "../../common/temp/node_modules/.pnpm/i18next@21.10.0/node_modules/i18next/dist/cjs/i18next.js")));
|
|
2309
|
+
const i18next_browser_languagedetector_1 = (cov_2l9mmpbx71().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")));
|
|
2310
|
+
const i18next_http_backend_1 = (cov_2l9mmpbx71().s[6]++, __importDefault(__webpack_require__(/*! i18next-http-backend */ "../../common/temp/node_modules/.pnpm/i18next-http-backend@1.4.5/node_modules/i18next-http-backend/cjs/index.js")));
|
|
2311
|
+
const core_bentley_1 = (cov_2l9mmpbx71().s[7]++, __webpack_require__(/*! @itwin/core-bentley */ "../bentley/lib/esm/core-bentley.js"));
|
|
2312
|
+
const DEFAULT_MAX_RETRIES = (cov_2l9mmpbx71().s[8]++, 1); // a low number prevents wasted time and potential timeouts when requesting localization files throws an error
|
|
2313
2313
|
/** Supplies localizations for iTwin.js
|
|
2314
2314
|
* @note this class uses the [i18next](https://www.i18next.com/) package.
|
|
2315
2315
|
* @public
|
|
2316
2316
|
*/
|
|
2317
2317
|
class ITwinLocalization {
|
|
2318
2318
|
constructor(options) {
|
|
2319
|
-
|
|
2320
|
-
|
|
2319
|
+
cov_2l9mmpbx71().f[1]++;
|
|
2320
|
+
cov_2l9mmpbx71().s[9]++;
|
|
2321
2321
|
this._namespaces = new Map();
|
|
2322
|
-
|
|
2322
|
+
cov_2l9mmpbx71().s[10]++;
|
|
2323
2323
|
this.i18next = i18next_1.default.createInstance();
|
|
2324
|
-
|
|
2324
|
+
cov_2l9mmpbx71().s[11]++;
|
|
2325
2325
|
this._backendOptions = {
|
|
2326
|
-
loadPath: (
|
|
2326
|
+
loadPath: (cov_2l9mmpbx71().b[3][0]++, options?.urlTemplate) ?? (cov_2l9mmpbx71().b[3][1]++, "locales/{{lng}}/{{ns}}.json"),
|
|
2327
2327
|
crossDomain: true,
|
|
2328
2328
|
...options?.backendHttpOptions
|
|
2329
2329
|
};
|
|
2330
|
-
|
|
2330
|
+
cov_2l9mmpbx71().s[12]++;
|
|
2331
2331
|
this._detectionOptions = {
|
|
2332
2332
|
order: ["querystring", "navigator", "htmlTag"],
|
|
2333
2333
|
lookupQuerystring: "lng",
|
|
2334
2334
|
caches: [],
|
|
2335
2335
|
...options?.detectorOptions
|
|
2336
2336
|
};
|
|
2337
|
-
|
|
2337
|
+
cov_2l9mmpbx71().s[13]++;
|
|
2338
2338
|
this._initOptions = {
|
|
2339
2339
|
interpolation: {
|
|
2340
2340
|
escapeValue: true
|
|
@@ -2345,40 +2345,40 @@ class ITwinLocalization {
|
|
|
2345
2345
|
detection: this._detectionOptions,
|
|
2346
2346
|
...options?.initOptions
|
|
2347
2347
|
};
|
|
2348
|
-
|
|
2349
|
-
this.i18next.use((
|
|
2348
|
+
cov_2l9mmpbx71().s[14]++;
|
|
2349
|
+
this.i18next.use((cov_2l9mmpbx71().b[4][0]++, options?.detectorPlugin) ?? (cov_2l9mmpbx71().b[4][1]++, i18next_browser_languagedetector_1.default)).use((cov_2l9mmpbx71().b[5][0]++, options?.backendPlugin) ?? (cov_2l9mmpbx71().b[5][1]++, i18next_http_backend_1.default)).use(TranslationLogger);
|
|
2350
2350
|
}
|
|
2351
2351
|
async initialize(namespaces) {
|
|
2352
|
-
|
|
2352
|
+
cov_2l9mmpbx71().f[2]++;
|
|
2353
2353
|
// Also consider namespaces passed into constructor
|
|
2354
|
-
const initNamespaces = (
|
|
2355
|
-
const combinedNamespaces = (
|
|
2356
|
-
const defaultNamespace = (
|
|
2357
|
-
|
|
2354
|
+
const initNamespaces = (cov_2l9mmpbx71().s[15]++, [(cov_2l9mmpbx71().b[6][0]++, this._initOptions.ns) || (cov_2l9mmpbx71().b[6][1]++, [])].flat());
|
|
2355
|
+
const combinedNamespaces = (cov_2l9mmpbx71().s[16]++, new Set([...namespaces, ...initNamespaces])); // without duplicates
|
|
2356
|
+
const defaultNamespace = (cov_2l9mmpbx71().s[17]++, (cov_2l9mmpbx71().b[7][0]++, this._initOptions.defaultNS) ?? (cov_2l9mmpbx71().b[7][1]++, namespaces[0]));
|
|
2357
|
+
cov_2l9mmpbx71().s[18]++;
|
|
2358
2358
|
if (defaultNamespace) {
|
|
2359
|
-
|
|
2360
|
-
|
|
2359
|
+
cov_2l9mmpbx71().b[8][0]++;
|
|
2360
|
+
cov_2l9mmpbx71().s[19]++;
|
|
2361
2361
|
combinedNamespaces.add(defaultNamespace);
|
|
2362
2362
|
} else {
|
|
2363
|
-
|
|
2363
|
+
cov_2l9mmpbx71().b[8][1]++;
|
|
2364
2364
|
} // Make sure default namespace is in namespaces list
|
|
2365
|
-
const initOptions = (
|
|
2365
|
+
const initOptions = (cov_2l9mmpbx71().s[20]++, {
|
|
2366
2366
|
...this._initOptions,
|
|
2367
2367
|
defaultNS: defaultNamespace,
|
|
2368
2368
|
ns: [...combinedNamespaces]
|
|
2369
2369
|
});
|
|
2370
2370
|
// if in a development environment, set debugging
|
|
2371
|
-
|
|
2371
|
+
cov_2l9mmpbx71().s[21]++;
|
|
2372
2372
|
if (false) {} else {
|
|
2373
|
-
|
|
2373
|
+
cov_2l9mmpbx71().b[9][1]++;
|
|
2374
2374
|
}
|
|
2375
|
-
const initPromise = (
|
|
2376
|
-
|
|
2375
|
+
const initPromise = (cov_2l9mmpbx71().s[23]++, this.i18next.init(initOptions));
|
|
2376
|
+
cov_2l9mmpbx71().s[24]++;
|
|
2377
2377
|
for (const ns of namespaces) {
|
|
2378
|
-
|
|
2378
|
+
cov_2l9mmpbx71().s[25]++;
|
|
2379
2379
|
this._namespaces.set(ns, initPromise);
|
|
2380
2380
|
}
|
|
2381
|
-
|
|
2381
|
+
cov_2l9mmpbx71().s[26]++;
|
|
2382
2382
|
return initPromise;
|
|
2383
2383
|
}
|
|
2384
2384
|
/** Replace all instances of `%{key}` within a string with the translations of those keys.
|
|
@@ -2398,11 +2398,11 @@ class ITwinLocalization {
|
|
|
2398
2398
|
* @public
|
|
2399
2399
|
*/
|
|
2400
2400
|
getLocalizedKeys(line) {
|
|
2401
|
-
|
|
2402
|
-
|
|
2401
|
+
cov_2l9mmpbx71().f[3]++;
|
|
2402
|
+
cov_2l9mmpbx71().s[27]++;
|
|
2403
2403
|
return line.replace(/\%\{(.+?)\}/g, (_match, tag) => {
|
|
2404
|
-
|
|
2405
|
-
|
|
2404
|
+
cov_2l9mmpbx71().f[4]++;
|
|
2405
|
+
cov_2l9mmpbx71().s[28]++;
|
|
2406
2406
|
return this.getLocalizedString(tag);
|
|
2407
2407
|
});
|
|
2408
2408
|
}
|
|
@@ -2420,25 +2420,25 @@ class ITwinLocalization {
|
|
|
2420
2420
|
* @public
|
|
2421
2421
|
*/
|
|
2422
2422
|
getLocalizedString(key, options) {
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
if ((
|
|
2426
|
-
|
|
2427
|
-
|
|
2423
|
+
cov_2l9mmpbx71().f[5]++;
|
|
2424
|
+
cov_2l9mmpbx71().s[29]++;
|
|
2425
|
+
if ((cov_2l9mmpbx71().b[11][0]++, options?.returnDetails) || (cov_2l9mmpbx71().b[11][1]++, options?.returnObjects)) {
|
|
2426
|
+
cov_2l9mmpbx71().b[10][0]++;
|
|
2427
|
+
cov_2l9mmpbx71().s[30]++;
|
|
2428
2428
|
throw new Error("Translation key must map to a string, but the given options will result in an object");
|
|
2429
2429
|
} else {
|
|
2430
|
-
|
|
2430
|
+
cov_2l9mmpbx71().b[10][1]++;
|
|
2431
2431
|
}
|
|
2432
|
-
const value = (
|
|
2433
|
-
|
|
2432
|
+
const value = (cov_2l9mmpbx71().s[31]++, this.i18next.t(key, options));
|
|
2433
|
+
cov_2l9mmpbx71().s[32]++;
|
|
2434
2434
|
if (typeof value !== "string") {
|
|
2435
|
-
|
|
2436
|
-
|
|
2435
|
+
cov_2l9mmpbx71().b[12][0]++;
|
|
2436
|
+
cov_2l9mmpbx71().s[33]++;
|
|
2437
2437
|
throw new Error("Translation key(s) string not found");
|
|
2438
2438
|
} else {
|
|
2439
|
-
|
|
2439
|
+
cov_2l9mmpbx71().b[12][1]++;
|
|
2440
2440
|
}
|
|
2441
|
-
|
|
2441
|
+
cov_2l9mmpbx71().s[34]++;
|
|
2442
2442
|
return value;
|
|
2443
2443
|
}
|
|
2444
2444
|
/** Similar to `getLocalizedString` but the default namespace is a separate parameter and the key does not need
|
|
@@ -2450,23 +2450,23 @@ class ITwinLocalization {
|
|
|
2450
2450
|
* @internal
|
|
2451
2451
|
*/
|
|
2452
2452
|
getLocalizedStringWithNamespace(namespace, key, options) {
|
|
2453
|
-
|
|
2454
|
-
let fullKey = (
|
|
2455
|
-
|
|
2453
|
+
cov_2l9mmpbx71().f[6]++;
|
|
2454
|
+
let fullKey = (cov_2l9mmpbx71().s[35]++, "");
|
|
2455
|
+
cov_2l9mmpbx71().s[36]++;
|
|
2456
2456
|
if (typeof key === "string") {
|
|
2457
|
-
|
|
2458
|
-
|
|
2457
|
+
cov_2l9mmpbx71().b[13][0]++;
|
|
2458
|
+
cov_2l9mmpbx71().s[37]++;
|
|
2459
2459
|
fullKey = `${namespace}:${key}`;
|
|
2460
2460
|
} else {
|
|
2461
|
-
|
|
2462
|
-
|
|
2461
|
+
cov_2l9mmpbx71().b[13][1]++;
|
|
2462
|
+
cov_2l9mmpbx71().s[38]++;
|
|
2463
2463
|
fullKey = key.map(subKey => {
|
|
2464
|
-
|
|
2465
|
-
|
|
2464
|
+
cov_2l9mmpbx71().f[7]++;
|
|
2465
|
+
cov_2l9mmpbx71().s[39]++;
|
|
2466
2466
|
return `${namespace}:${subKey}`;
|
|
2467
2467
|
});
|
|
2468
2468
|
}
|
|
2469
|
-
|
|
2469
|
+
cov_2l9mmpbx71().s[40]++;
|
|
2470
2470
|
return this.getLocalizedString(fullKey, options);
|
|
2471
2471
|
}
|
|
2472
2472
|
/** Gets the English translation.
|
|
@@ -2477,32 +2477,32 @@ class ITwinLocalization {
|
|
|
2477
2477
|
* @internal
|
|
2478
2478
|
*/
|
|
2479
2479
|
getEnglishString(namespace, key, options) {
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
if ((
|
|
2483
|
-
|
|
2484
|
-
|
|
2480
|
+
cov_2l9mmpbx71().f[8]++;
|
|
2481
|
+
cov_2l9mmpbx71().s[41]++;
|
|
2482
|
+
if ((cov_2l9mmpbx71().b[15][0]++, options?.returnDetails) || (cov_2l9mmpbx71().b[15][1]++, options?.returnObjects)) {
|
|
2483
|
+
cov_2l9mmpbx71().b[14][0]++;
|
|
2484
|
+
cov_2l9mmpbx71().s[42]++;
|
|
2485
2485
|
throw new Error("Translation key must map to a string, but the given options will result in an object");
|
|
2486
2486
|
} else {
|
|
2487
|
-
|
|
2487
|
+
cov_2l9mmpbx71().b[14][1]++;
|
|
2488
2488
|
}
|
|
2489
|
-
|
|
2489
|
+
cov_2l9mmpbx71().s[43]++;
|
|
2490
2490
|
options = {
|
|
2491
2491
|
...options,
|
|
2492
2492
|
ns: namespace // ensure namespace argument is used
|
|
2493
2493
|
};
|
|
2494
2494
|
|
|
2495
|
-
const en = (
|
|
2496
|
-
const str = (
|
|
2497
|
-
|
|
2495
|
+
const en = (cov_2l9mmpbx71().s[44]++, this.i18next.getFixedT("en", namespace));
|
|
2496
|
+
const str = (cov_2l9mmpbx71().s[45]++, en(key, options));
|
|
2497
|
+
cov_2l9mmpbx71().s[46]++;
|
|
2498
2498
|
if (typeof str !== "string") {
|
|
2499
|
-
|
|
2500
|
-
|
|
2499
|
+
cov_2l9mmpbx71().b[16][0]++;
|
|
2500
|
+
cov_2l9mmpbx71().s[47]++;
|
|
2501
2501
|
throw new Error("Translation key(s) not found");
|
|
2502
2502
|
} else {
|
|
2503
|
-
|
|
2503
|
+
cov_2l9mmpbx71().b[16][1]++;
|
|
2504
2504
|
}
|
|
2505
|
-
|
|
2505
|
+
cov_2l9mmpbx71().s[48]++;
|
|
2506
2506
|
return str;
|
|
2507
2507
|
}
|
|
2508
2508
|
/** Get the promise for an already registered Namespace.
|
|
@@ -2510,20 +2510,20 @@ class ITwinLocalization {
|
|
|
2510
2510
|
* @public
|
|
2511
2511
|
*/
|
|
2512
2512
|
getNamespacePromise(name) {
|
|
2513
|
-
|
|
2514
|
-
|
|
2513
|
+
cov_2l9mmpbx71().f[9]++;
|
|
2514
|
+
cov_2l9mmpbx71().s[49]++;
|
|
2515
2515
|
return this._namespaces.get(name);
|
|
2516
2516
|
}
|
|
2517
2517
|
/** @internal */
|
|
2518
2518
|
getLanguageList() {
|
|
2519
|
-
|
|
2520
|
-
|
|
2519
|
+
cov_2l9mmpbx71().f[10]++;
|
|
2520
|
+
cov_2l9mmpbx71().s[50]++;
|
|
2521
2521
|
return this.i18next.languages;
|
|
2522
2522
|
}
|
|
2523
2523
|
/** override the language detected in the browser */
|
|
2524
2524
|
async changeLanguage(language) {
|
|
2525
|
-
|
|
2526
|
-
|
|
2525
|
+
cov_2l9mmpbx71().f[11]++;
|
|
2526
|
+
cov_2l9mmpbx71().s[51]++;
|
|
2527
2527
|
return this.i18next.changeLanguage(language);
|
|
2528
2528
|
}
|
|
2529
2529
|
/** Register a new Namespace and return it. If the namespace is already registered, it will be returned.
|
|
@@ -2535,123 +2535,123 @@ class ITwinLocalization {
|
|
|
2535
2535
|
* @public
|
|
2536
2536
|
*/
|
|
2537
2537
|
async registerNamespace(name) {
|
|
2538
|
-
|
|
2539
|
-
const existing = (
|
|
2540
|
-
|
|
2538
|
+
cov_2l9mmpbx71().f[12]++;
|
|
2539
|
+
const existing = (cov_2l9mmpbx71().s[52]++, this._namespaces.get(name));
|
|
2540
|
+
cov_2l9mmpbx71().s[53]++;
|
|
2541
2541
|
if (existing !== undefined) {
|
|
2542
|
-
|
|
2543
|
-
|
|
2542
|
+
cov_2l9mmpbx71().b[17][0]++;
|
|
2543
|
+
cov_2l9mmpbx71().s[54]++;
|
|
2544
2544
|
return existing;
|
|
2545
2545
|
} else {
|
|
2546
|
-
|
|
2546
|
+
cov_2l9mmpbx71().b[17][1]++;
|
|
2547
2547
|
}
|
|
2548
|
-
const theReadPromise = (
|
|
2549
|
-
|
|
2550
|
-
|
|
2548
|
+
const theReadPromise = (cov_2l9mmpbx71().s[55]++, new Promise(resolve => {
|
|
2549
|
+
cov_2l9mmpbx71().f[13]++;
|
|
2550
|
+
cov_2l9mmpbx71().s[56]++;
|
|
2551
2551
|
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
2552
2552
|
this.i18next.loadNamespaces(name, err => {
|
|
2553
|
-
|
|
2554
|
-
|
|
2553
|
+
cov_2l9mmpbx71().f[14]++;
|
|
2554
|
+
cov_2l9mmpbx71().s[57]++;
|
|
2555
2555
|
if (!err) {
|
|
2556
|
-
|
|
2557
|
-
|
|
2556
|
+
cov_2l9mmpbx71().b[18][0]++;
|
|
2557
|
+
cov_2l9mmpbx71().s[58]++;
|
|
2558
2558
|
return resolve();
|
|
2559
2559
|
} else {
|
|
2560
|
-
|
|
2560
|
+
cov_2l9mmpbx71().b[18][1]++;
|
|
2561
2561
|
}
|
|
2562
2562
|
// Here we got a non-null err object.
|
|
2563
2563
|
// This method is called when the system has attempted to load the resources for the namespaces for each possible locale.
|
|
2564
2564
|
// For example 'fr-ca' might be the most specific locale, in which case 'fr' and 'en' are fallback locales.
|
|
2565
2565
|
// Using Backend from i18next-http-backend, err will be an array of strings of each namespace it tried to read and its locale.
|
|
2566
2566
|
// There might be errs for some other namespaces as well as this one. We resolve the promise unless there's an error for each possible locale.
|
|
2567
|
-
let locales = (
|
|
2568
|
-
|
|
2569
|
-
|
|
2567
|
+
let locales = (cov_2l9mmpbx71().s[59]++, this.getLanguageList().map(thisLocale => {
|
|
2568
|
+
cov_2l9mmpbx71().f[15]++;
|
|
2569
|
+
cov_2l9mmpbx71().s[60]++;
|
|
2570
2570
|
return `/${thisLocale}/`;
|
|
2571
2571
|
}));
|
|
2572
|
-
|
|
2572
|
+
cov_2l9mmpbx71().s[61]++;
|
|
2573
2573
|
try {
|
|
2574
|
-
|
|
2574
|
+
cov_2l9mmpbx71().s[62]++;
|
|
2575
2575
|
for (const thisError of err) {
|
|
2576
|
-
|
|
2576
|
+
cov_2l9mmpbx71().s[63]++;
|
|
2577
2577
|
if (typeof thisError === "string") {
|
|
2578
|
-
|
|
2579
|
-
|
|
2578
|
+
cov_2l9mmpbx71().b[19][0]++;
|
|
2579
|
+
cov_2l9mmpbx71().s[64]++;
|
|
2580
2580
|
locales = locales.filter(thisLocale => {
|
|
2581
|
-
|
|
2582
|
-
|
|
2581
|
+
cov_2l9mmpbx71().f[16]++;
|
|
2582
|
+
cov_2l9mmpbx71().s[65]++;
|
|
2583
2583
|
return !thisError.includes(thisLocale);
|
|
2584
2584
|
});
|
|
2585
2585
|
} else {
|
|
2586
|
-
|
|
2586
|
+
cov_2l9mmpbx71().b[19][1]++;
|
|
2587
2587
|
}
|
|
2588
2588
|
}
|
|
2589
2589
|
} catch (e) {
|
|
2590
|
-
|
|
2590
|
+
cov_2l9mmpbx71().s[66]++;
|
|
2591
2591
|
locales = [];
|
|
2592
2592
|
}
|
|
2593
2593
|
// if we removed every locale from the array, it wasn't loaded.
|
|
2594
|
-
|
|
2594
|
+
cov_2l9mmpbx71().s[67]++;
|
|
2595
2595
|
if (locales.length === 0) {
|
|
2596
|
-
|
|
2597
|
-
|
|
2596
|
+
cov_2l9mmpbx71().b[20][0]++;
|
|
2597
|
+
cov_2l9mmpbx71().s[68]++;
|
|
2598
2598
|
core_bentley_1.Logger.logError("i18n", `No resources for namespace ${name} could be loaded`);
|
|
2599
2599
|
} else {
|
|
2600
|
-
|
|
2600
|
+
cov_2l9mmpbx71().b[20][1]++;
|
|
2601
2601
|
}
|
|
2602
|
-
|
|
2602
|
+
cov_2l9mmpbx71().s[69]++;
|
|
2603
2603
|
resolve();
|
|
2604
2604
|
});
|
|
2605
2605
|
}));
|
|
2606
|
-
|
|
2606
|
+
cov_2l9mmpbx71().s[70]++;
|
|
2607
2607
|
this._namespaces.set(name, theReadPromise);
|
|
2608
|
-
|
|
2608
|
+
cov_2l9mmpbx71().s[71]++;
|
|
2609
2609
|
return theReadPromise;
|
|
2610
2610
|
}
|
|
2611
2611
|
/** @internal */
|
|
2612
2612
|
unregisterNamespace(name) {
|
|
2613
|
-
|
|
2614
|
-
|
|
2613
|
+
cov_2l9mmpbx71().f[17]++;
|
|
2614
|
+
cov_2l9mmpbx71().s[72]++;
|
|
2615
2615
|
this._namespaces.delete(name);
|
|
2616
2616
|
}
|
|
2617
2617
|
}
|
|
2618
|
-
|
|
2618
|
+
cov_2l9mmpbx71().s[73]++;
|
|
2619
2619
|
exports.ITwinLocalization = ITwinLocalization;
|
|
2620
2620
|
class TranslationLogger {
|
|
2621
2621
|
log(args) {
|
|
2622
|
-
|
|
2623
|
-
|
|
2622
|
+
cov_2l9mmpbx71().f[18]++;
|
|
2623
|
+
cov_2l9mmpbx71().s[74]++;
|
|
2624
2624
|
core_bentley_1.Logger.logInfo("i18n", this.createLogMessage(args));
|
|
2625
2625
|
}
|
|
2626
2626
|
warn(args) {
|
|
2627
|
-
|
|
2628
|
-
|
|
2627
|
+
cov_2l9mmpbx71().f[19]++;
|
|
2628
|
+
cov_2l9mmpbx71().s[75]++;
|
|
2629
2629
|
core_bentley_1.Logger.logWarning("i18n", this.createLogMessage(args));
|
|
2630
2630
|
}
|
|
2631
2631
|
error(args) {
|
|
2632
|
-
|
|
2633
|
-
|
|
2632
|
+
cov_2l9mmpbx71().f[20]++;
|
|
2633
|
+
cov_2l9mmpbx71().s[76]++;
|
|
2634
2634
|
core_bentley_1.Logger.logError("i18n", this.createLogMessage(args));
|
|
2635
2635
|
}
|
|
2636
2636
|
createLogMessage(args) {
|
|
2637
|
-
|
|
2638
|
-
let message = (
|
|
2639
|
-
|
|
2640
|
-
for (let i = (
|
|
2641
|
-
|
|
2637
|
+
cov_2l9mmpbx71().f[21]++;
|
|
2638
|
+
let message = (cov_2l9mmpbx71().s[77]++, args[0]);
|
|
2639
|
+
cov_2l9mmpbx71().s[78]++;
|
|
2640
|
+
for (let i = (cov_2l9mmpbx71().s[79]++, 1); i < args.length; ++i) {
|
|
2641
|
+
cov_2l9mmpbx71().s[80]++;
|
|
2642
2642
|
if (typeof args[i] === "string") {
|
|
2643
|
-
|
|
2644
|
-
|
|
2643
|
+
cov_2l9mmpbx71().b[21][0]++;
|
|
2644
|
+
cov_2l9mmpbx71().s[81]++;
|
|
2645
2645
|
message += `\n ${args[i]}`;
|
|
2646
2646
|
} else {
|
|
2647
|
-
|
|
2647
|
+
cov_2l9mmpbx71().b[21][1]++;
|
|
2648
2648
|
}
|
|
2649
2649
|
}
|
|
2650
|
-
|
|
2650
|
+
cov_2l9mmpbx71().s[82]++;
|
|
2651
2651
|
return message;
|
|
2652
2652
|
}
|
|
2653
2653
|
}
|
|
2654
|
-
|
|
2654
|
+
cov_2l9mmpbx71().s[83]++;
|
|
2655
2655
|
TranslationLogger.type = "logger";
|
|
2656
2656
|
|
|
2657
2657
|
/***/ }),
|
|
@@ -11467,7 +11467,7 @@ exports.getOperator = __webpack_require__(/*! ./getOperator */ "../../common/tem
|
|
|
11467
11467
|
// https://github.com/joyent/node/blob/f8c335d0caf47f16d31413f89aa28eda3878e3aa/lib/util.js
|
|
11468
11468
|
|
|
11469
11469
|
var getName = __webpack_require__(/*! get-func-name */ "../../common/temp/node_modules/.pnpm/get-func-name@2.0.2/node_modules/get-func-name/index.js");
|
|
11470
|
-
var loupe = __webpack_require__(/*! loupe */ "../../common/temp/node_modules/.pnpm/loupe@2.3.
|
|
11470
|
+
var loupe = __webpack_require__(/*! loupe */ "../../common/temp/node_modules/.pnpm/loupe@2.3.7/node_modules/loupe/loupe.js");
|
|
11471
11471
|
var config = __webpack_require__(/*! ../config */ "../../common/temp/node_modules/.pnpm/chai@4.3.10/node_modules/chai/lib/chai/config.js");
|
|
11472
11472
|
|
|
11473
11473
|
module.exports = inspect;
|
|
@@ -13463,8 +13463,8 @@ module.exports = getFuncName;
|
|
|
13463
13463
|
"use strict";
|
|
13464
13464
|
|
|
13465
13465
|
|
|
13466
|
-
var _classCallCheck = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
13467
|
-
var _createClass = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
13466
|
+
var _classCallCheck = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/classCallCheck.js");
|
|
13467
|
+
var _createClass = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/createClass.js");
|
|
13468
13468
|
|
|
13469
13469
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
13470
13470
|
|
|
@@ -13896,15 +13896,15 @@ module.exports = Browser;
|
|
|
13896
13896
|
"use strict";
|
|
13897
13897
|
|
|
13898
13898
|
|
|
13899
|
-
var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
13900
|
-
var _classCallCheck = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
13901
|
-
var _createClass = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
13902
|
-
var _assertThisInitialized = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
13903
|
-
var _inherits = __webpack_require__(/*! @babel/runtime/helpers/inherits */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
13904
|
-
var _possibleConstructorReturn = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
13905
|
-
var _getPrototypeOf = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
13906
|
-
var _defineProperty = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
13907
|
-
var _toArray = __webpack_require__(/*! @babel/runtime/helpers/toArray */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
13899
|
+
var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/typeof.js");
|
|
13900
|
+
var _classCallCheck = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/classCallCheck.js");
|
|
13901
|
+
var _createClass = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/createClass.js");
|
|
13902
|
+
var _assertThisInitialized = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/assertThisInitialized.js");
|
|
13903
|
+
var _inherits = __webpack_require__(/*! @babel/runtime/helpers/inherits */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/inherits.js");
|
|
13904
|
+
var _possibleConstructorReturn = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js");
|
|
13905
|
+
var _getPrototypeOf = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/getPrototypeOf.js");
|
|
13906
|
+
var _defineProperty = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/defineProperty.js");
|
|
13907
|
+
var _toArray = __webpack_require__(/*! @babel/runtime/helpers/toArray */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/toArray.js");
|
|
13908
13908
|
|
|
13909
13909
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
13910
13910
|
|
|
@@ -16754,9 +16754,9 @@ module.exports = instance;
|
|
|
16754
16754
|
|
|
16755
16755
|
/***/ }),
|
|
16756
16756
|
|
|
16757
|
-
/***/ "../../common/temp/node_modules/.pnpm/loupe@2.3.
|
|
16757
|
+
/***/ "../../common/temp/node_modules/.pnpm/loupe@2.3.7/node_modules/loupe/loupe.js":
|
|
16758
16758
|
/*!************************************************************************************!*\
|
|
16759
|
-
!*** ../../common/temp/node_modules/.pnpm/loupe@2.3.
|
|
16759
|
+
!*** ../../common/temp/node_modules/.pnpm/loupe@2.3.7/node_modules/loupe/loupe.js ***!
|
|
16760
16760
|
\************************************************************************************/
|
|
16761
16761
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
16762
16762
|
|
|
@@ -17070,6 +17070,7 @@ module.exports = instance;
|
|
|
17070
17070
|
|
|
17071
17071
|
var toString = Function.prototype.toString;
|
|
17072
17072
|
var functionNameMatch = /\s*function(?:\s|\s*\/\*[^(?:*\/)]+\*\/\s*)*([^\s\(\/]+)/;
|
|
17073
|
+
var maxFunctionSourceLength = 512;
|
|
17073
17074
|
function getFuncName(aFunc) {
|
|
17074
17075
|
if (typeof aFunc !== 'function') {
|
|
17075
17076
|
return null;
|
|
@@ -17077,8 +17078,15 @@ module.exports = instance;
|
|
|
17077
17078
|
|
|
17078
17079
|
var name = '';
|
|
17079
17080
|
if (typeof Function.prototype.name === 'undefined' && typeof aFunc.name === 'undefined') {
|
|
17081
|
+
// eslint-disable-next-line prefer-reflect
|
|
17082
|
+
var functionSource = toString.call(aFunc);
|
|
17083
|
+
// To avoid unconstrained resource consumption due to pathalogically large function names,
|
|
17084
|
+
// we limit the available return value to be less than 512 characters.
|
|
17085
|
+
if (functionSource.indexOf('(') > maxFunctionSourceLength) {
|
|
17086
|
+
return name;
|
|
17087
|
+
}
|
|
17080
17088
|
// Here we run a polyfill if Function does not support the `name` property and if aFunc.name is not defined
|
|
17081
|
-
var match =
|
|
17089
|
+
var match = functionSource.match(functionNameMatch);
|
|
17082
17090
|
if (match) {
|
|
17083
17091
|
name = match[1];
|
|
17084
17092
|
}
|
|
@@ -17438,7 +17446,7 @@ module.exports = instance;
|
|
|
17438
17446
|
|
|
17439
17447
|
try {
|
|
17440
17448
|
// eslint-disable-next-line global-require
|
|
17441
|
-
var nodeUtil = __webpack_require__(/*! util */ "?
|
|
17449
|
+
var nodeUtil = __webpack_require__(/*! util */ "?088e");
|
|
17442
17450
|
|
|
17443
17451
|
nodeInspect = nodeUtil.inspect ? nodeUtil.inspect.custom : false;
|
|
17444
17452
|
} catch (noNodeInspect) {
|
|
@@ -25006,7 +25014,7 @@ function partitionArray(array, criterion) {
|
|
|
25006
25014
|
|
|
25007
25015
|
/***/ }),
|
|
25008
25016
|
|
|
25009
|
-
/***/ "?
|
|
25017
|
+
/***/ "?088e":
|
|
25010
25018
|
/*!**********************!*\
|
|
25011
25019
|
!*** util (ignored) ***!
|
|
25012
25020
|
\**********************/
|
|
@@ -25016,9 +25024,9 @@ function partitionArray(array, criterion) {
|
|
|
25016
25024
|
|
|
25017
25025
|
/***/ }),
|
|
25018
25026
|
|
|
25019
|
-
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
25027
|
+
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/arrayLikeToArray.js":
|
|
25020
25028
|
/*!**************************************************************************************************************************!*\
|
|
25021
|
-
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
25029
|
+
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
|
|
25022
25030
|
\**************************************************************************************************************************/
|
|
25023
25031
|
/***/ ((module) => {
|
|
25024
25032
|
|
|
@@ -25031,9 +25039,9 @@ module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exp
|
|
|
25031
25039
|
|
|
25032
25040
|
/***/ }),
|
|
25033
25041
|
|
|
25034
|
-
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
25042
|
+
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/arrayWithHoles.js":
|
|
25035
25043
|
/*!************************************************************************************************************************!*\
|
|
25036
|
-
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
25044
|
+
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
|
|
25037
25045
|
\************************************************************************************************************************/
|
|
25038
25046
|
/***/ ((module) => {
|
|
25039
25047
|
|
|
@@ -25044,9 +25052,9 @@ module.exports = _arrayWithHoles, module.exports.__esModule = true, module.expor
|
|
|
25044
25052
|
|
|
25045
25053
|
/***/ }),
|
|
25046
25054
|
|
|
25047
|
-
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
25055
|
+
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/assertThisInitialized.js":
|
|
25048
25056
|
/*!*******************************************************************************************************************************!*\
|
|
25049
|
-
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
25057
|
+
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/assertThisInitialized.js ***!
|
|
25050
25058
|
\*******************************************************************************************************************************/
|
|
25051
25059
|
/***/ ((module) => {
|
|
25052
25060
|
|
|
@@ -25060,9 +25068,9 @@ module.exports = _assertThisInitialized, module.exports.__esModule = true, modul
|
|
|
25060
25068
|
|
|
25061
25069
|
/***/ }),
|
|
25062
25070
|
|
|
25063
|
-
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
25071
|
+
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/classCallCheck.js":
|
|
25064
25072
|
/*!************************************************************************************************************************!*\
|
|
25065
|
-
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
25073
|
+
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/classCallCheck.js ***!
|
|
25066
25074
|
\************************************************************************************************************************/
|
|
25067
25075
|
/***/ ((module) => {
|
|
25068
25076
|
|
|
@@ -25075,13 +25083,13 @@ module.exports = _classCallCheck, module.exports.__esModule = true, module.expor
|
|
|
25075
25083
|
|
|
25076
25084
|
/***/ }),
|
|
25077
25085
|
|
|
25078
|
-
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
25086
|
+
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/createClass.js":
|
|
25079
25087
|
/*!*********************************************************************************************************************!*\
|
|
25080
|
-
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
25088
|
+
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/createClass.js ***!
|
|
25081
25089
|
\*********************************************************************************************************************/
|
|
25082
25090
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
25083
25091
|
|
|
25084
|
-
var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
25092
|
+
var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/toPropertyKey.js");
|
|
25085
25093
|
function _defineProperties(target, props) {
|
|
25086
25094
|
for (var i = 0; i < props.length; i++) {
|
|
25087
25095
|
var descriptor = props[i];
|
|
@@ -25103,13 +25111,13 @@ module.exports = _createClass, module.exports.__esModule = true, module.exports[
|
|
|
25103
25111
|
|
|
25104
25112
|
/***/ }),
|
|
25105
25113
|
|
|
25106
|
-
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
25114
|
+
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/defineProperty.js":
|
|
25107
25115
|
/*!************************************************************************************************************************!*\
|
|
25108
|
-
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
25116
|
+
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/defineProperty.js ***!
|
|
25109
25117
|
\************************************************************************************************************************/
|
|
25110
25118
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
25111
25119
|
|
|
25112
|
-
var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
25120
|
+
var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/toPropertyKey.js");
|
|
25113
25121
|
function _defineProperty(obj, key, value) {
|
|
25114
25122
|
key = toPropertyKey(key);
|
|
25115
25123
|
if (key in obj) {
|
|
@@ -25128,9 +25136,9 @@ module.exports = _defineProperty, module.exports.__esModule = true, module.expor
|
|
|
25128
25136
|
|
|
25129
25137
|
/***/ }),
|
|
25130
25138
|
|
|
25131
|
-
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
25139
|
+
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/getPrototypeOf.js":
|
|
25132
25140
|
/*!************************************************************************************************************************!*\
|
|
25133
|
-
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
25141
|
+
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/getPrototypeOf.js ***!
|
|
25134
25142
|
\************************************************************************************************************************/
|
|
25135
25143
|
/***/ ((module) => {
|
|
25136
25144
|
|
|
@@ -25144,13 +25152,13 @@ module.exports = _getPrototypeOf, module.exports.__esModule = true, module.expor
|
|
|
25144
25152
|
|
|
25145
25153
|
/***/ }),
|
|
25146
25154
|
|
|
25147
|
-
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
25155
|
+
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/inherits.js":
|
|
25148
25156
|
/*!******************************************************************************************************************!*\
|
|
25149
|
-
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
25157
|
+
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/inherits.js ***!
|
|
25150
25158
|
\******************************************************************************************************************/
|
|
25151
25159
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
25152
25160
|
|
|
25153
|
-
var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
25161
|
+
var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/setPrototypeOf.js");
|
|
25154
25162
|
function _inherits(subClass, superClass) {
|
|
25155
25163
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
25156
25164
|
throw new TypeError("Super expression must either be null or a function");
|
|
@@ -25171,9 +25179,9 @@ module.exports = _inherits, module.exports.__esModule = true, module.exports["de
|
|
|
25171
25179
|
|
|
25172
25180
|
/***/ }),
|
|
25173
25181
|
|
|
25174
|
-
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
25182
|
+
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/iterableToArray.js":
|
|
25175
25183
|
/*!*************************************************************************************************************************!*\
|
|
25176
|
-
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
25184
|
+
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/iterableToArray.js ***!
|
|
25177
25185
|
\*************************************************************************************************************************/
|
|
25178
25186
|
/***/ ((module) => {
|
|
25179
25187
|
|
|
@@ -25184,9 +25192,9 @@ module.exports = _iterableToArray, module.exports.__esModule = true, module.expo
|
|
|
25184
25192
|
|
|
25185
25193
|
/***/ }),
|
|
25186
25194
|
|
|
25187
|
-
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
25195
|
+
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/nonIterableRest.js":
|
|
25188
25196
|
/*!*************************************************************************************************************************!*\
|
|
25189
|
-
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
25197
|
+
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
|
|
25190
25198
|
\*************************************************************************************************************************/
|
|
25191
25199
|
/***/ ((module) => {
|
|
25192
25200
|
|
|
@@ -25197,14 +25205,14 @@ module.exports = _nonIterableRest, module.exports.__esModule = true, module.expo
|
|
|
25197
25205
|
|
|
25198
25206
|
/***/ }),
|
|
25199
25207
|
|
|
25200
|
-
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
25208
|
+
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js":
|
|
25201
25209
|
/*!***********************************************************************************************************************************!*\
|
|
25202
|
-
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
25210
|
+
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***!
|
|
25203
25211
|
\***********************************************************************************************************************************/
|
|
25204
25212
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
25205
25213
|
|
|
25206
|
-
var _typeof = (__webpack_require__(/*! ./typeof.js */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
25207
|
-
var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
25214
|
+
var _typeof = (__webpack_require__(/*! ./typeof.js */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/typeof.js")["default"]);
|
|
25215
|
+
var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/assertThisInitialized.js");
|
|
25208
25216
|
function _possibleConstructorReturn(self, call) {
|
|
25209
25217
|
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
25210
25218
|
return call;
|
|
@@ -25217,9 +25225,9 @@ module.exports = _possibleConstructorReturn, module.exports.__esModule = true, m
|
|
|
25217
25225
|
|
|
25218
25226
|
/***/ }),
|
|
25219
25227
|
|
|
25220
|
-
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
25228
|
+
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/setPrototypeOf.js":
|
|
25221
25229
|
/*!************************************************************************************************************************!*\
|
|
25222
|
-
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
25230
|
+
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/setPrototypeOf.js ***!
|
|
25223
25231
|
\************************************************************************************************************************/
|
|
25224
25232
|
/***/ ((module) => {
|
|
25225
25233
|
|
|
@@ -25234,16 +25242,16 @@ module.exports = _setPrototypeOf, module.exports.__esModule = true, module.expor
|
|
|
25234
25242
|
|
|
25235
25243
|
/***/ }),
|
|
25236
25244
|
|
|
25237
|
-
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
25245
|
+
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/toArray.js":
|
|
25238
25246
|
/*!*****************************************************************************************************************!*\
|
|
25239
|
-
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
25247
|
+
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/toArray.js ***!
|
|
25240
25248
|
\*****************************************************************************************************************/
|
|
25241
25249
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
25242
25250
|
|
|
25243
|
-
var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
25244
|
-
var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
25245
|
-
var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
25246
|
-
var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
25251
|
+
var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/arrayWithHoles.js");
|
|
25252
|
+
var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/iterableToArray.js");
|
|
25253
|
+
var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js");
|
|
25254
|
+
var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/nonIterableRest.js");
|
|
25247
25255
|
function _toArray(arr) {
|
|
25248
25256
|
return arrayWithHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableRest();
|
|
25249
25257
|
}
|
|
@@ -25251,13 +25259,13 @@ module.exports = _toArray, module.exports.__esModule = true, module.exports["def
|
|
|
25251
25259
|
|
|
25252
25260
|
/***/ }),
|
|
25253
25261
|
|
|
25254
|
-
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
25262
|
+
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/toPrimitive.js":
|
|
25255
25263
|
/*!*********************************************************************************************************************!*\
|
|
25256
|
-
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
25264
|
+
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/toPrimitive.js ***!
|
|
25257
25265
|
\*********************************************************************************************************************/
|
|
25258
25266
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
25259
25267
|
|
|
25260
|
-
var _typeof = (__webpack_require__(/*! ./typeof.js */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
25268
|
+
var _typeof = (__webpack_require__(/*! ./typeof.js */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/typeof.js")["default"]);
|
|
25261
25269
|
function _toPrimitive(input, hint) {
|
|
25262
25270
|
if (_typeof(input) !== "object" || input === null) return input;
|
|
25263
25271
|
var prim = input[Symbol.toPrimitive];
|
|
@@ -25272,14 +25280,14 @@ module.exports = _toPrimitive, module.exports.__esModule = true, module.exports[
|
|
|
25272
25280
|
|
|
25273
25281
|
/***/ }),
|
|
25274
25282
|
|
|
25275
|
-
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
25283
|
+
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/toPropertyKey.js":
|
|
25276
25284
|
/*!***********************************************************************************************************************!*\
|
|
25277
|
-
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
25285
|
+
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/toPropertyKey.js ***!
|
|
25278
25286
|
\***********************************************************************************************************************/
|
|
25279
25287
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
25280
25288
|
|
|
25281
|
-
var _typeof = (__webpack_require__(/*! ./typeof.js */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
25282
|
-
var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
25289
|
+
var _typeof = (__webpack_require__(/*! ./typeof.js */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/typeof.js")["default"]);
|
|
25290
|
+
var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/toPrimitive.js");
|
|
25283
25291
|
function _toPropertyKey(arg) {
|
|
25284
25292
|
var key = toPrimitive(arg, "string");
|
|
25285
25293
|
return _typeof(key) === "symbol" ? key : String(key);
|
|
@@ -25288,9 +25296,9 @@ module.exports = _toPropertyKey, module.exports.__esModule = true, module.export
|
|
|
25288
25296
|
|
|
25289
25297
|
/***/ }),
|
|
25290
25298
|
|
|
25291
|
-
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
25299
|
+
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/typeof.js":
|
|
25292
25300
|
/*!****************************************************************************************************************!*\
|
|
25293
|
-
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
25301
|
+
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/typeof.js ***!
|
|
25294
25302
|
\****************************************************************************************************************/
|
|
25295
25303
|
/***/ ((module) => {
|
|
25296
25304
|
|
|
@@ -25307,13 +25315,13 @@ module.exports = _typeof, module.exports.__esModule = true, module.exports["defa
|
|
|
25307
25315
|
|
|
25308
25316
|
/***/ }),
|
|
25309
25317
|
|
|
25310
|
-
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
25318
|
+
/***/ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js":
|
|
25311
25319
|
/*!************************************************************************************************************************************!*\
|
|
25312
|
-
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
25320
|
+
!*** ../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
|
|
25313
25321
|
\************************************************************************************************************************************/
|
|
25314
25322
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
25315
25323
|
|
|
25316
|
-
var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
25324
|
+
var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/arrayLikeToArray.js");
|
|
25317
25325
|
function _unsupportedIterableToArray(o, minLen) {
|
|
25318
25326
|
if (!o) return;
|
|
25319
25327
|
if (typeof o === "string") return arrayLikeToArray(o, minLen);
|