@itwin/core-i18n 5.2.0-dev.3 → 5.2.0-dev.30

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.
@@ -19,7 +19,7 @@
19
19
  */
20
20
  function cov_ogldeftyv() {
21
21
  var path = "C:\\agent\\_work\\1\\s\\core\\i18n\\lib\\cjs\\ITwinLocalization.js";
22
- var hash = "d940188727f7c3f13464903c9fef76d730c540e6";
22
+ var hash = "113751a8262a3149163a15d970bf9098e64926ce";
23
23
  var global = new Function("return this")();
24
24
  var gcv = "__coverage__";
25
25
  var coverageData = {
@@ -2123,10 +2123,10 @@ function cov_ogldeftyv() {
2123
2123
  sources: ["C:\\agent\\_work\\1\\s\\core\\i18n\\src\\ITwinLocalization.ts"],
2124
2124
  names: [],
2125
2125
  mappings: ";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;AAEH,sDAA2E;AAC3E,wGAAmG;AACnG,gFAAqF;AACrF,sDAA6C;AAG7C,MAAM,mBAAmB,GAAW,CAAC,CAAC,CAAC,8GAA8G;AAcrJ;;;GAGG;AACH,MAAa,iBAAiB;IACrB,OAAO,CAAO;IACJ,YAAY,CAAc;IAC1B,eAAe,CAAiB;IAChC,iBAAiB,CAAkB;IACnC,WAAW,GAAG,IAAI,GAAG,EAAyB,CAAC;IAEhE,YAAmB,OAA6B;QAC9C,IAAI,CAAC,OAAO,GAAG,iBAAO,CAAC,cAAc,EAAE,CAAC;QAExC,IAAI,CAAC,eAAe,GAAG;YACrB,QAAQ,EAAE,OAAO,EAAE,WAAW,IAAI,6BAA6B;YAC/D,WAAW,EAAE,IAAI;YACjB,GAAG,OAAO,EAAE,kBAAkB;SAC/B,CAAC;QAEF,IAAI,CAAC,iBAAiB,GAAG;YACvB,KAAK,EAAE,CAAC,aAAa,EAAE,WAAW,EAAE,SAAS,CAAC;YAC9C,iBAAiB,EAAE,KAAK;YACxB,MAAM,EAAE,EAAE;YACV,GAAG,OAAO,EAAE,eAAe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,EAAE,CAAC,EAAE,CAAC;YACrC,IAAI,OAAO,IAAI,CAAC,CAAC,CAAC,KAAK,QAAQ;gBAC7B,OAAO,IAAI,OAAO,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;QAChC,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC",
2126
- sourcesContent: ["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Localization\n */\n\nimport i18next, { i18n, InitOptions, Module, TOptionsBase } from \"i18next\";\nimport i18nextBrowserLanguageDetector, { DetectorOptions } from \"i18next-browser-languagedetector\";\nimport Backend, { HttpBackendOptions as BackendOptions } from \"i18next-http-backend\";\nimport { Logger } from \"@itwin/core-bentley\";\nimport type { Localization } from \"@itwin/core-common\";\n\nconst DEFAULT_MAX_RETRIES: number = 1; // a low number prevents wasted time and potential timeouts when requesting localization files throws an error\n\n/** Options for ITwinLocalization\n * @public\n */\nexport interface LocalizationOptions {\n urlTemplate?: string;\n backendPlugin?: Module;\n detectorPlugin?: Module;\n initOptions?: InitOptions;\n backendHttpOptions?: BackendOptions;\n detectorOptions?: DetectorOptions;\n}\n\n/** Supplies localizations for iTwin.js\n * @note this class uses the [i18next](https://www.i18next.com/) package.\n * @public\n */\nexport class ITwinLocalization implements Localization {\n public i18next: i18n;\n private readonly _initOptions: InitOptions;\n private readonly _backendOptions: BackendOptions;\n private readonly _detectionOptions: DetectorOptions;\n private readonly _namespaces = new Map<string, Promise<void>>();\n\n public constructor(options?: LocalizationOptions) {\n this.i18next = i18next.createInstance();\n\n this._backendOptions = {\n loadPath: options?.urlTemplate ?? \"locales/{{lng}}/{{ns}}.json\",\n crossDomain: true,\n ...options?.backendHttpOptions,\n };\n\n this._detectionOptions = {\n order: [\"querystring\", \"navigator\", \"htmlTag\"],\n lookupQuerystring: \"lng\",\n caches: [],\n ...options?.detectorOptions,\n };\n\n this._initOptions = {\n interpolation: { escapeValue: true },\n fallbackLng: \"en\",\n maxRetries: DEFAULT_MAX_RETRIES,\n backend: this._backendOptions,\n detection: this._detectionOptions,\n ...options?.initOptions,\n };\n\n this.i18next\n .use(options?.detectorPlugin ?? i18nextBrowserLanguageDetector)\n .use(options?.backendPlugin ?? Backend)\n .use(TranslationLogger);\n }\n\n public async initialize(namespaces: string[]): Promise<void> {\n\n // Also consider namespaces passed into constructor\n const initNamespaces: string[] = [this._initOptions.ns || []].flat();\n const combinedNamespaces: Set<string> = new Set([...namespaces, ...initNamespaces]); // without duplicates\n\n const defaultNamespace: string | false | readonly string[] = this._initOptions.defaultNS ?? namespaces[0];\n if (defaultNamespace)\n combinedNamespaces.add(defaultNamespace as string); // Make sure default namespace is in namespaces list\n\n const initOptions: InitOptions = {\n ...this._initOptions,\n defaultNS: defaultNamespace,\n ns: [...combinedNamespaces],\n };\n\n // if in a development environment, set debugging\n if (process.env.NODE_ENV === \"development\")\n initOptions.debug = true;\n\n const initPromise = this.i18next.init(initOptions) as unknown as Promise<void>;\n\n for (const ns of namespaces)\n this._namespaces.set(ns, initPromise);\n\n return initPromise;\n }\n\n /** Replace all instances of `%{key}` within a string with the translations of those keys.\n * For example:\n * ``` ts\n * \"MyKeys\": {\n * \"Key1\": \"First value\",\n * \"Key2\": \"Second value\"\n * }\n * ```\n *\n * ``` ts\n * i18.translateKeys(\"string with %{MyKeys.Key1} followed by %{MyKeys.Key2}!\"\") // returns \"string with First Value followed by Second Value!\"\n * ```\n * @param line The input line, potentially containing %{keys}.\n * @returns The line with all %{keys} translated\n * @public\n */\n public getLocalizedKeys(line: string): string {\n return line.replace(/\\%\\{(.+?)\\}/g, (_match, tag) => this.getLocalizedString(tag));\n }\n\n /** Return the translated value of a key.\n * @param key - the key that matches a property in the JSON localization file.\n * @note The key includes the namespace, which identifies the particular localization file that contains the property,\n * followed by a colon, followed by the property in the JSON file.\n * For example:\n * ``` ts\n * const dataString: string = IModelApp.localization.getLocalizedString(\"iModelJs:BackgroundMap.BingDataAttribution\");\n * ```\n * assigns to dataString the string with property BackgroundMap.BingDataAttribution from the iModelJs.json localization file.\n * @returns The string corresponding to the first key that resolves.\n * @throws Error if no keys resolve to a string.\n * @public\n */\n public getLocalizedString(key: string | string[], options?: TOptionsBase): string {\n if (options?.returnDetails || options?.returnObjects) {\n throw new Error(\"Translation key must map to a string, but the given options will result in an object\");\n }\n\n const value = this.i18next.t(key, options);\n\n if (typeof value !== \"string\") {\n throw new Error(\"Translation key(s) string not found\");\n }\n\n return value;\n }\n\n /** Gets the English translation.\n * @param namespace - the namespace that identifies the particular localization file that contains the property.\n * @param key - the key that matches a property in the JSON localization file.\n * @returns The string corresponding to the first key that resolves.\n * @throws Error if no keys resolve to a string.\n * @internal\n */\n public getEnglishString(namespace: string, key: string | string[], options?: TOptionsBase): string {\n if (options?.returnDetails || options?.returnObjects) {\n throw new Error(\"Translation key must map to a string, but the given options will result in an object\");\n }\n\n options = {\n ...options,\n ns: namespace, // ensure namespace argument is used\n };\n\n const en = this.i18next.getFixedT(\"en\", namespace);\n const str = en(key, options);\n if (typeof str !== \"string\")\n throw new Error(\"Translation key(s) not found\");\n\n return str;\n }\n\n /** Get the promise for an already registered Namespace.\n * @param name - the name of the namespace\n * @public\n */\n public getNamespacePromise(name: string): Promise<void> | undefined {\n return this._namespaces.get(name);\n }\n\n /** @internal */\n public getLanguageList(): readonly string[] {\n return this.i18next.languages;\n }\n\n /** override the language detected in the browser */\n public async changeLanguage(language: string) {\n return this.i18next.changeLanguage(language) as unknown as Promise<void>;\n }\n\n /** Register a new Namespace and return it. If the namespace is already registered, it will be returned.\n * @param name - the name of the namespace, which is the base name of the JSON file that contains the localization properties.\n * @note - The registerNamespace method starts fetching the appropriate version of the JSON localization file from the server,\n * based on the current locale. To make sure that fetch is complete before performing translations from this namespace, await\n * fulfillment of the readPromise Promise property of the returned LocalizationNamespace.\n * @see [Localization in iTwin.js]($docs/learning/frontend/Localization.md)\n * @public\n */\n public async registerNamespace(name: string): Promise<void> {\n const existing = this._namespaces.get(name);\n if (existing !== undefined)\n return existing;\n\n const theReadPromise = new Promise<void>((resolve) => {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.i18next.loadNamespaces(name, (err) => {\n if (!err)\n return resolve();\n\n // Here we got a non-null err object.\n // This method is called when the system has attempted to load the resources for the namespaces for each possible locale.\n // For example 'fr-ca' might be the most specific locale, in which case 'fr' and 'en' are fallback locales.\n // Using Backend from i18next-http-backend, err will be an array of strings of each namespace it tried to read and its locale.\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.\n let locales = this.getLanguageList().map((thisLocale: any) => `/${thisLocale}/`);\n\n try {\n for (const thisError of err) {\n if (typeof thisError === \"string\")\n locales = locales.filter((thisLocale) => !thisError.includes(thisLocale));\n }\n } catch {\n locales = [];\n }\n // if we removed every locale from the array, it wasn't loaded.\n if (locales.length === 0)\n Logger.logError(\"i18n\", `No resources for namespace ${name} could be loaded`);\n\n resolve();\n });\n });\n this._namespaces.set(name, theReadPromise);\n return theReadPromise;\n }\n\n /** @internal */\n public unregisterNamespace(name: string): void {\n this._namespaces.delete(name);\n }\n}\n\nclass TranslationLogger {\n public static readonly type = \"logger\";\n public log(args: string[]) { Logger.logInfo(\"i18n\", this.createLogMessage(args)); }\n public warn(args: string[]) { Logger.logWarning(\"i18n\", this.createLogMessage(args)); }\n public error(args: string[]) { Logger.logError(\"i18n\", this.createLogMessage(args)); }\n private createLogMessage(args: string[]) {\n let message = args[0];\n for (let i = 1; i < args.length; ++i) {\n if (typeof args[i] === \"string\")\n message += `\\n ${args[i]}`;\n }\n return message;\n }\n}\n"]
2126
+ 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 // 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 {\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"]
2127
2127
  },
2128
2128
  _coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
2129
- hash: "d940188727f7c3f13464903c9fef76d730c540e6"
2129
+ hash: "113751a8262a3149163a15d970bf9098e64926ce"
2130
2130
  };
2131
2131
  var coverage = global[gcv] || (global[gcv] = {});
2132
2132
  if (!coverage[path] || coverage[path].hash !== hash) {
@@ -19692,6 +19692,58 @@ class DisposableList {
19692
19692
  }
19693
19693
 
19694
19694
 
19695
+ /***/ }),
19696
+
19697
+ /***/ "../bentley/lib/esm/Expect.js":
19698
+ /*!************************************!*\
19699
+ !*** ../bentley/lib/esm/Expect.js ***!
19700
+ \************************************/
19701
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
19702
+
19703
+ "use strict";
19704
+ __webpack_require__.r(__webpack_exports__);
19705
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
19706
+ /* harmony export */ expectDefined: () => (/* binding */ expectDefined),
19707
+ /* harmony export */ expectNotNull: () => (/* binding */ expectNotNull)
19708
+ /* harmony export */ });
19709
+ /*---------------------------------------------------------------------------------------------
19710
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
19711
+ * See LICENSE.md in the project root for license terms and full copyright notice.
19712
+ *--------------------------------------------------------------------------------------------*/
19713
+ /**
19714
+ * Expects that a value is defined (not undefined).
19715
+ * @note Almost always, places that use this function should in the future be cleaned up to properly
19716
+ * handle undefined values instead of throwing an error.
19717
+ * @param value The value to check.
19718
+ * @param message Optional error message to be used in thrown Error.
19719
+ * @returns The original value if it is defined.
19720
+ * @throws Error if the value is undefined.
19721
+ * @internal
19722
+ */
19723
+ function expectDefined(value, message) {
19724
+ if (value === undefined) {
19725
+ throw new Error(message ?? "Expected value to be defined, but it was undefined.");
19726
+ }
19727
+ return value;
19728
+ }
19729
+ /**
19730
+ * Expects that a value is not null.
19731
+ * @note Almost always, places that use this function should in the future be cleaned up to properly
19732
+ * handle null values instead of throwing an error.
19733
+ * @param value The value to check.
19734
+ * @param message Optional error message to be used in thrown Error.
19735
+ * @returns The original value if it is not null.
19736
+ * @throws Error if the value is null.
19737
+ * @internal
19738
+ */
19739
+ function expectNotNull(value, message) {
19740
+ if (value === null) {
19741
+ throw new Error(message ?? "Expected value to be not null, but it was null.");
19742
+ }
19743
+ return value;
19744
+ }
19745
+
19746
+
19695
19747
  /***/ }),
19696
19748
 
19697
19749
  /***/ "../bentley/lib/esm/Id.js":
@@ -21055,7 +21107,7 @@ class LRUCache {
21055
21107
  let s = "";
21056
21108
  let entry = this.oldest;
21057
21109
  while (entry) {
21058
- s += `${String(entry.key)}:${entry.value}`;
21110
+ s += `${String(entry.key)}:${String(entry.value)}`;
21059
21111
  entry = entry.newer;
21060
21112
  if (entry) {
21061
21113
  s += " < ";
@@ -22105,6 +22157,8 @@ class ProcessDetector {
22105
22157
  static get isElectronAppFrontend() { return typeof navigator === "object" && navigator.userAgent.toLowerCase().indexOf("electron") >= 0; }
22106
22158
  /** Is this process the backend of an Electron app? */
22107
22159
  static get isElectronAppBackend() { return typeof process === "object" && process.versions.hasOwnProperty("electron"); }
22160
+ /** Is this process running in an Internet Explorer or old Microsoft Edge browser? */
22161
+ static get isIEBrowser() { return !!document.documentMode || !!window.StyleMedia; }
22108
22162
  /** Is this process running in a browser on an iPad?
22109
22163
  * @note This method will return `true` for any frontend running on an iPad, whether it is a user-launched web browser (e.g. Safari) or the frontend of a mobile app.
22110
22164
  */
@@ -23822,11 +23876,11 @@ class YieldManager {
23822
23876
  "use strict";
23823
23877
  __webpack_require__.r(__webpack_exports__);
23824
23878
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
23825
- /* harmony export */ AbandonedError: () => (/* reexport safe */ _OneAtATimeAction__WEBPACK_IMPORTED_MODULE_20__.AbandonedError),
23826
- /* harmony export */ BeDuration: () => (/* reexport safe */ _Time__WEBPACK_IMPORTED_MODULE_28__.BeDuration),
23879
+ /* harmony export */ AbandonedError: () => (/* reexport safe */ _OneAtATimeAction__WEBPACK_IMPORTED_MODULE_21__.AbandonedError),
23880
+ /* harmony export */ BeDuration: () => (/* reexport safe */ _Time__WEBPACK_IMPORTED_MODULE_29__.BeDuration),
23827
23881
  /* harmony export */ BeEvent: () => (/* reexport safe */ _BeEvent__WEBPACK_IMPORTED_MODULE_2__.BeEvent),
23828
23882
  /* harmony export */ BeEventList: () => (/* reexport safe */ _BeEvent__WEBPACK_IMPORTED_MODULE_2__.BeEventList),
23829
- /* harmony export */ BeTimePoint: () => (/* reexport safe */ _Time__WEBPACK_IMPORTED_MODULE_28__.BeTimePoint),
23883
+ /* harmony export */ BeTimePoint: () => (/* reexport safe */ _Time__WEBPACK_IMPORTED_MODULE_29__.BeTimePoint),
23830
23884
  /* harmony export */ BeUiEvent: () => (/* reexport safe */ _BeEvent__WEBPACK_IMPORTED_MODULE_2__.BeUiEvent),
23831
23885
  /* harmony export */ BentleyError: () => (/* reexport safe */ _BentleyError__WEBPACK_IMPORTED_MODULE_3__.BentleyError),
23832
23886
  /* harmony export */ BentleyLoggerCategory: () => (/* reexport safe */ _BentleyLoggerCategory__WEBPACK_IMPORTED_MODULE_4__.BentleyLoggerCategory),
@@ -23835,66 +23889,66 @@ __webpack_require__.r(__webpack_exports__);
23835
23889
  /* harmony export */ ByteStream: () => (/* reexport safe */ _ByteStream__WEBPACK_IMPORTED_MODULE_7__.ByteStream),
23836
23890
  /* harmony export */ ChangeSetStatus: () => (/* reexport safe */ _BentleyError__WEBPACK_IMPORTED_MODULE_3__.ChangeSetStatus),
23837
23891
  /* harmony export */ CompressedId64Set: () => (/* reexport safe */ _CompressedId64Set__WEBPACK_IMPORTED_MODULE_10__.CompressedId64Set),
23838
- /* harmony export */ DbChangeStage: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_35__.DbChangeStage),
23839
- /* harmony export */ DbConflictCause: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_35__.DbConflictCause),
23840
- /* harmony export */ DbConflictResolution: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_35__.DbConflictResolution),
23892
+ /* harmony export */ DbChangeStage: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_36__.DbChangeStage),
23893
+ /* harmony export */ DbConflictCause: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_36__.DbConflictCause),
23894
+ /* harmony export */ DbConflictResolution: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_36__.DbConflictResolution),
23841
23895
  /* harmony export */ DbOpcode: () => (/* reexport safe */ _BeSQLite__WEBPACK_IMPORTED_MODULE_6__.DbOpcode),
23842
23896
  /* harmony export */ DbResult: () => (/* reexport safe */ _BeSQLite__WEBPACK_IMPORTED_MODULE_6__.DbResult),
23843
- /* harmony export */ DbValueType: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_35__.DbValueType),
23897
+ /* harmony export */ DbValueType: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_36__.DbValueType),
23844
23898
  /* harmony export */ Dictionary: () => (/* reexport safe */ _Dictionary__WEBPACK_IMPORTED_MODULE_11__.Dictionary),
23845
23899
  /* harmony export */ DisposableList: () => (/* reexport safe */ _Disposable__WEBPACK_IMPORTED_MODULE_12__.DisposableList),
23846
- /* harmony export */ DuplicatePolicy: () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_26__.DuplicatePolicy),
23847
- /* harmony export */ Entry: () => (/* reexport safe */ _LRUMap__WEBPACK_IMPORTED_MODULE_18__.Entry),
23900
+ /* harmony export */ DuplicatePolicy: () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_27__.DuplicatePolicy),
23901
+ /* harmony export */ Entry: () => (/* reexport safe */ _LRUMap__WEBPACK_IMPORTED_MODULE_19__.Entry),
23848
23902
  /* harmony export */ ErrorCategory: () => (/* reexport safe */ _StatusCategory__WEBPACK_IMPORTED_MODULE_5__.ErrorCategory),
23849
23903
  /* harmony export */ GeoServiceStatus: () => (/* reexport safe */ _BentleyError__WEBPACK_IMPORTED_MODULE_3__.GeoServiceStatus),
23850
- /* harmony export */ Guid: () => (/* reexport safe */ _Id__WEBPACK_IMPORTED_MODULE_13__.Guid),
23904
+ /* harmony export */ Guid: () => (/* reexport safe */ _Id__WEBPACK_IMPORTED_MODULE_14__.Guid),
23851
23905
  /* harmony export */ HttpStatus: () => (/* reexport safe */ _BentleyError__WEBPACK_IMPORTED_MODULE_3__.HttpStatus),
23852
23906
  /* harmony export */ IModelHubStatus: () => (/* reexport safe */ _BentleyError__WEBPACK_IMPORTED_MODULE_3__.IModelHubStatus),
23853
23907
  /* harmony export */ IModelStatus: () => (/* reexport safe */ _BentleyError__WEBPACK_IMPORTED_MODULE_3__.IModelStatus),
23854
23908
  /* harmony export */ ITwinError: () => (/* reexport safe */ _BentleyError__WEBPACK_IMPORTED_MODULE_3__.ITwinError),
23855
- /* harmony export */ Id64: () => (/* reexport safe */ _Id__WEBPACK_IMPORTED_MODULE_13__.Id64),
23856
- /* harmony export */ IndexMap: () => (/* reexport safe */ _IndexMap__WEBPACK_IMPORTED_MODULE_14__.IndexMap),
23857
- /* harmony export */ IndexedValue: () => (/* reexport safe */ _IndexMap__WEBPACK_IMPORTED_MODULE_14__.IndexedValue),
23858
- /* harmony export */ JsonUtils: () => (/* reexport safe */ _JsonUtils__WEBPACK_IMPORTED_MODULE_16__.JsonUtils),
23859
- /* harmony export */ LRUCache: () => (/* reexport safe */ _LRUMap__WEBPACK_IMPORTED_MODULE_18__.LRUCache),
23860
- /* harmony export */ LRUDictionary: () => (/* reexport safe */ _LRUMap__WEBPACK_IMPORTED_MODULE_18__.LRUDictionary),
23861
- /* harmony export */ LRUMap: () => (/* reexport safe */ _LRUMap__WEBPACK_IMPORTED_MODULE_18__.LRUMap),
23862
- /* harmony export */ LogLevel: () => (/* reexport safe */ _Logger__WEBPACK_IMPORTED_MODULE_17__.LogLevel),
23863
- /* harmony export */ Logger: () => (/* reexport safe */ _Logger__WEBPACK_IMPORTED_MODULE_17__.Logger),
23909
+ /* harmony export */ Id64: () => (/* reexport safe */ _Id__WEBPACK_IMPORTED_MODULE_14__.Id64),
23910
+ /* harmony export */ IndexMap: () => (/* reexport safe */ _IndexMap__WEBPACK_IMPORTED_MODULE_15__.IndexMap),
23911
+ /* harmony export */ IndexedValue: () => (/* reexport safe */ _IndexMap__WEBPACK_IMPORTED_MODULE_15__.IndexedValue),
23912
+ /* harmony export */ JsonUtils: () => (/* reexport safe */ _JsonUtils__WEBPACK_IMPORTED_MODULE_17__.JsonUtils),
23913
+ /* harmony export */ LRUCache: () => (/* reexport safe */ _LRUMap__WEBPACK_IMPORTED_MODULE_19__.LRUCache),
23914
+ /* harmony export */ LRUDictionary: () => (/* reexport safe */ _LRUMap__WEBPACK_IMPORTED_MODULE_19__.LRUDictionary),
23915
+ /* harmony export */ LRUMap: () => (/* reexport safe */ _LRUMap__WEBPACK_IMPORTED_MODULE_19__.LRUMap),
23916
+ /* harmony export */ LogLevel: () => (/* reexport safe */ _Logger__WEBPACK_IMPORTED_MODULE_18__.LogLevel),
23917
+ /* harmony export */ Logger: () => (/* reexport safe */ _Logger__WEBPACK_IMPORTED_MODULE_18__.Logger),
23864
23918
  /* harmony export */ MutableCompressedId64Set: () => (/* reexport safe */ _CompressedId64Set__WEBPACK_IMPORTED_MODULE_10__.MutableCompressedId64Set),
23865
- /* harmony export */ ObservableSet: () => (/* reexport safe */ _ObservableSet__WEBPACK_IMPORTED_MODULE_19__.ObservableSet),
23866
- /* harmony export */ OneAtATimeAction: () => (/* reexport safe */ _OneAtATimeAction__WEBPACK_IMPORTED_MODULE_20__.OneAtATimeAction),
23919
+ /* harmony export */ ObservableSet: () => (/* reexport safe */ _ObservableSet__WEBPACK_IMPORTED_MODULE_20__.ObservableSet),
23920
+ /* harmony export */ OneAtATimeAction: () => (/* reexport safe */ _OneAtATimeAction__WEBPACK_IMPORTED_MODULE_21__.OneAtATimeAction),
23867
23921
  /* harmony export */ OpenMode: () => (/* reexport safe */ _BeSQLite__WEBPACK_IMPORTED_MODULE_6__.OpenMode),
23868
23922
  /* harmony export */ OrderedId64Array: () => (/* reexport safe */ _CompressedId64Set__WEBPACK_IMPORTED_MODULE_10__.OrderedId64Array),
23869
- /* harmony export */ OrderedId64Iterable: () => (/* reexport safe */ _OrderedId64Iterable__WEBPACK_IMPORTED_MODULE_21__.OrderedId64Iterable),
23870
- /* harmony export */ OrderedSet: () => (/* reexport safe */ _OrderedSet__WEBPACK_IMPORTED_MODULE_22__.OrderedSet),
23871
- /* harmony export */ PerfLogger: () => (/* reexport safe */ _Logger__WEBPACK_IMPORTED_MODULE_17__.PerfLogger),
23872
- /* harmony export */ PriorityQueue: () => (/* reexport safe */ _PriorityQueue__WEBPACK_IMPORTED_MODULE_24__.PriorityQueue),
23873
- /* harmony export */ ProcessDetector: () => (/* reexport safe */ _ProcessDetector__WEBPACK_IMPORTED_MODULE_25__.ProcessDetector),
23874
- /* harmony export */ ReadonlyOrderedSet: () => (/* reexport safe */ _OrderedSet__WEBPACK_IMPORTED_MODULE_22__.ReadonlyOrderedSet),
23875
- /* harmony export */ ReadonlySortedArray: () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_26__.ReadonlySortedArray),
23923
+ /* harmony export */ OrderedId64Iterable: () => (/* reexport safe */ _OrderedId64Iterable__WEBPACK_IMPORTED_MODULE_22__.OrderedId64Iterable),
23924
+ /* harmony export */ OrderedSet: () => (/* reexport safe */ _OrderedSet__WEBPACK_IMPORTED_MODULE_23__.OrderedSet),
23925
+ /* harmony export */ PerfLogger: () => (/* reexport safe */ _Logger__WEBPACK_IMPORTED_MODULE_18__.PerfLogger),
23926
+ /* harmony export */ PriorityQueue: () => (/* reexport safe */ _PriorityQueue__WEBPACK_IMPORTED_MODULE_25__.PriorityQueue),
23927
+ /* harmony export */ ProcessDetector: () => (/* reexport safe */ _ProcessDetector__WEBPACK_IMPORTED_MODULE_26__.ProcessDetector),
23928
+ /* harmony export */ ReadonlyOrderedSet: () => (/* reexport safe */ _OrderedSet__WEBPACK_IMPORTED_MODULE_23__.ReadonlyOrderedSet),
23929
+ /* harmony export */ ReadonlySortedArray: () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_27__.ReadonlySortedArray),
23876
23930
  /* harmony export */ RealityDataStatus: () => (/* reexport safe */ _BentleyError__WEBPACK_IMPORTED_MODULE_3__.RealityDataStatus),
23877
- /* harmony export */ RepositoryStatus: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_35__.RepositoryStatus),
23931
+ /* harmony export */ RepositoryStatus: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_36__.RepositoryStatus),
23878
23932
  /* harmony export */ RpcInterfaceStatus: () => (/* reexport safe */ _BentleyError__WEBPACK_IMPORTED_MODULE_3__.RpcInterfaceStatus),
23879
- /* harmony export */ SortedArray: () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_26__.SortedArray),
23880
- /* harmony export */ SpanKind: () => (/* reexport safe */ _Tracing__WEBPACK_IMPORTED_MODULE_29__.SpanKind),
23933
+ /* harmony export */ SortedArray: () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_27__.SortedArray),
23934
+ /* harmony export */ SpanKind: () => (/* reexport safe */ _Tracing__WEBPACK_IMPORTED_MODULE_30__.SpanKind),
23881
23935
  /* harmony export */ StatusCategory: () => (/* reexport safe */ _StatusCategory__WEBPACK_IMPORTED_MODULE_5__.StatusCategory),
23882
- /* harmony export */ StopWatch: () => (/* reexport safe */ _Time__WEBPACK_IMPORTED_MODULE_28__.StopWatch),
23936
+ /* harmony export */ StopWatch: () => (/* reexport safe */ _Time__WEBPACK_IMPORTED_MODULE_29__.StopWatch),
23883
23937
  /* harmony export */ SuccessCategory: () => (/* reexport safe */ _StatusCategory__WEBPACK_IMPORTED_MODULE_5__.SuccessCategory),
23884
- /* harmony export */ Tracing: () => (/* reexport safe */ _Tracing__WEBPACK_IMPORTED_MODULE_29__.Tracing),
23885
- /* harmony export */ TransientIdSequence: () => (/* reexport safe */ _Id__WEBPACK_IMPORTED_MODULE_13__.TransientIdSequence),
23886
- /* harmony export */ TupleKeyedMap: () => (/* reexport safe */ _TupleKeyedMap__WEBPACK_IMPORTED_MODULE_30__.TupleKeyedMap),
23887
- /* harmony export */ TypedArrayBuilder: () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_31__.TypedArrayBuilder),
23888
- /* harmony export */ Uint16ArrayBuilder: () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_31__.Uint16ArrayBuilder),
23889
- /* harmony export */ Uint32ArrayBuilder: () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_31__.Uint32ArrayBuilder),
23890
- /* harmony export */ Uint8ArrayBuilder: () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_31__.Uint8ArrayBuilder),
23891
- /* harmony export */ UintArrayBuilder: () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_31__.UintArrayBuilder),
23892
- /* harmony export */ UnexpectedErrors: () => (/* reexport safe */ _UnexpectedErrors__WEBPACK_IMPORTED_MODULE_32__.UnexpectedErrors),
23893
- /* harmony export */ YieldManager: () => (/* reexport safe */ _YieldManager__WEBPACK_IMPORTED_MODULE_34__.YieldManager),
23938
+ /* harmony export */ Tracing: () => (/* reexport safe */ _Tracing__WEBPACK_IMPORTED_MODULE_30__.Tracing),
23939
+ /* harmony export */ TransientIdSequence: () => (/* reexport safe */ _Id__WEBPACK_IMPORTED_MODULE_14__.TransientIdSequence),
23940
+ /* harmony export */ TupleKeyedMap: () => (/* reexport safe */ _TupleKeyedMap__WEBPACK_IMPORTED_MODULE_31__.TupleKeyedMap),
23941
+ /* harmony export */ TypedArrayBuilder: () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_32__.TypedArrayBuilder),
23942
+ /* harmony export */ Uint16ArrayBuilder: () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_32__.Uint16ArrayBuilder),
23943
+ /* harmony export */ Uint32ArrayBuilder: () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_32__.Uint32ArrayBuilder),
23944
+ /* harmony export */ Uint8ArrayBuilder: () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_32__.Uint8ArrayBuilder),
23945
+ /* harmony export */ UintArrayBuilder: () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_32__.UintArrayBuilder),
23946
+ /* harmony export */ UnexpectedErrors: () => (/* reexport safe */ _UnexpectedErrors__WEBPACK_IMPORTED_MODULE_33__.UnexpectedErrors),
23947
+ /* harmony export */ YieldManager: () => (/* reexport safe */ _YieldManager__WEBPACK_IMPORTED_MODULE_35__.YieldManager),
23894
23948
  /* harmony export */ areEqualPossiblyUndefined: () => (/* reexport safe */ _Compare__WEBPACK_IMPORTED_MODULE_9__.areEqualPossiblyUndefined),
23895
- /* harmony export */ asInstanceOf: () => (/* reexport safe */ _UtilityTypes__WEBPACK_IMPORTED_MODULE_33__.asInstanceOf),
23949
+ /* harmony export */ asInstanceOf: () => (/* reexport safe */ _UtilityTypes__WEBPACK_IMPORTED_MODULE_34__.asInstanceOf),
23896
23950
  /* harmony export */ assert: () => (/* reexport safe */ _Assert__WEBPACK_IMPORTED_MODULE_1__.assert),
23897
- /* harmony export */ base64StringToUint8Array: () => (/* reexport safe */ _StringUtils__WEBPACK_IMPORTED_MODULE_27__.base64StringToUint8Array),
23951
+ /* harmony export */ base64StringToUint8Array: () => (/* reexport safe */ _StringUtils__WEBPACK_IMPORTED_MODULE_28__.base64StringToUint8Array),
23898
23952
  /* harmony export */ compareArrays: () => (/* reexport safe */ _Compare__WEBPACK_IMPORTED_MODULE_9__.compareArrays),
23899
23953
  /* harmony export */ compareBooleans: () => (/* reexport safe */ _Compare__WEBPACK_IMPORTED_MODULE_9__.compareBooleans),
23900
23954
  /* harmony export */ compareBooleansOrUndefined: () => (/* reexport safe */ _Compare__WEBPACK_IMPORTED_MODULE_9__.compareBooleansOrUndefined),
@@ -23908,17 +23962,19 @@ __webpack_require__.r(__webpack_exports__);
23908
23962
  /* harmony export */ compareWithTolerance: () => (/* reexport safe */ _Compare__WEBPACK_IMPORTED_MODULE_9__.compareWithTolerance),
23909
23963
  /* harmony export */ dispose: () => (/* reexport safe */ _Disposable__WEBPACK_IMPORTED_MODULE_12__.dispose),
23910
23964
  /* harmony export */ disposeArray: () => (/* reexport safe */ _Disposable__WEBPACK_IMPORTED_MODULE_12__.disposeArray),
23965
+ /* harmony export */ expectDefined: () => (/* reexport safe */ _Expect__WEBPACK_IMPORTED_MODULE_13__.expectDefined),
23966
+ /* harmony export */ expectNotNull: () => (/* reexport safe */ _Expect__WEBPACK_IMPORTED_MODULE_13__.expectNotNull),
23911
23967
  /* harmony export */ isDisposable: () => (/* reexport safe */ _Disposable__WEBPACK_IMPORTED_MODULE_12__.isDisposable),
23912
23968
  /* harmony export */ isIDisposable: () => (/* reexport safe */ _Disposable__WEBPACK_IMPORTED_MODULE_12__.isIDisposable),
23913
- /* harmony export */ isInstanceOf: () => (/* reexport safe */ _UtilityTypes__WEBPACK_IMPORTED_MODULE_33__.isInstanceOf),
23969
+ /* harmony export */ isInstanceOf: () => (/* reexport safe */ _UtilityTypes__WEBPACK_IMPORTED_MODULE_34__.isInstanceOf),
23914
23970
  /* harmony export */ isProperSubclassOf: () => (/* reexport safe */ _ClassUtils__WEBPACK_IMPORTED_MODULE_8__.isProperSubclassOf),
23915
23971
  /* harmony export */ isSubclassOf: () => (/* reexport safe */ _ClassUtils__WEBPACK_IMPORTED_MODULE_8__.isSubclassOf),
23916
- /* harmony export */ lowerBound: () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_26__.lowerBound),
23917
- /* harmony export */ omit: () => (/* reexport safe */ _UtilityTypes__WEBPACK_IMPORTED_MODULE_33__.omit),
23918
- /* harmony export */ partitionArray: () => (/* reexport safe */ _partitionArray__WEBPACK_IMPORTED_MODULE_23__.partitionArray),
23919
- /* harmony export */ shallowClone: () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_26__.shallowClone),
23972
+ /* harmony export */ lowerBound: () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_27__.lowerBound),
23973
+ /* harmony export */ omit: () => (/* reexport safe */ _UtilityTypes__WEBPACK_IMPORTED_MODULE_34__.omit),
23974
+ /* harmony export */ partitionArray: () => (/* reexport safe */ _partitionArray__WEBPACK_IMPORTED_MODULE_24__.partitionArray),
23975
+ /* harmony export */ shallowClone: () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_27__.shallowClone),
23920
23976
  /* harmony export */ using: () => (/* reexport safe */ _Disposable__WEBPACK_IMPORTED_MODULE_12__.using),
23921
- /* harmony export */ utf8ToString: () => (/* reexport safe */ _StringUtils__WEBPACK_IMPORTED_MODULE_27__.utf8ToString)
23977
+ /* harmony export */ utf8ToString: () => (/* reexport safe */ _StringUtils__WEBPACK_IMPORTED_MODULE_28__.utf8ToString)
23922
23978
  /* harmony export */ });
23923
23979
  /* harmony import */ var _AccessToken__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AccessToken */ "../bentley/lib/esm/AccessToken.js");
23924
23980
  /* harmony import */ var _Assert__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Assert */ "../bentley/lib/esm/Assert.js");
@@ -23933,29 +23989,30 @@ __webpack_require__.r(__webpack_exports__);
23933
23989
  /* harmony import */ var _CompressedId64Set__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./CompressedId64Set */ "../bentley/lib/esm/CompressedId64Set.js");
23934
23990
  /* harmony import */ var _Dictionary__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Dictionary */ "../bentley/lib/esm/Dictionary.js");
23935
23991
  /* harmony import */ var _Disposable__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Disposable */ "../bentley/lib/esm/Disposable.js");
23936
- /* harmony import */ var _Id__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./Id */ "../bentley/lib/esm/Id.js");
23937
- /* harmony import */ var _IndexMap__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./IndexMap */ "../bentley/lib/esm/IndexMap.js");
23938
- /* harmony import */ var _JsonSchema__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./JsonSchema */ "../bentley/lib/esm/JsonSchema.js");
23939
- /* harmony import */ var _JsonUtils__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./JsonUtils */ "../bentley/lib/esm/JsonUtils.js");
23940
- /* harmony import */ var _Logger__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./Logger */ "../bentley/lib/esm/Logger.js");
23941
- /* harmony import */ var _LRUMap__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./LRUMap */ "../bentley/lib/esm/LRUMap.js");
23942
- /* harmony import */ var _ObservableSet__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./ObservableSet */ "../bentley/lib/esm/ObservableSet.js");
23943
- /* harmony import */ var _OneAtATimeAction__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./OneAtATimeAction */ "../bentley/lib/esm/OneAtATimeAction.js");
23944
- /* harmony import */ var _OrderedId64Iterable__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./OrderedId64Iterable */ "../bentley/lib/esm/OrderedId64Iterable.js");
23945
- /* harmony import */ var _OrderedSet__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./OrderedSet */ "../bentley/lib/esm/OrderedSet.js");
23946
- /* harmony import */ var _partitionArray__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./partitionArray */ "../bentley/lib/esm/partitionArray.js");
23947
- /* harmony import */ var _PriorityQueue__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./PriorityQueue */ "../bentley/lib/esm/PriorityQueue.js");
23948
- /* harmony import */ var _ProcessDetector__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./ProcessDetector */ "../bentley/lib/esm/ProcessDetector.js");
23949
- /* harmony import */ var _SortedArray__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./SortedArray */ "../bentley/lib/esm/SortedArray.js");
23950
- /* harmony import */ var _StringUtils__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./StringUtils */ "../bentley/lib/esm/StringUtils.js");
23951
- /* harmony import */ var _Time__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./Time */ "../bentley/lib/esm/Time.js");
23952
- /* harmony import */ var _Tracing__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./Tracing */ "../bentley/lib/esm/Tracing.js");
23953
- /* harmony import */ var _TupleKeyedMap__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./TupleKeyedMap */ "../bentley/lib/esm/TupleKeyedMap.js");
23954
- /* harmony import */ var _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./TypedArrayBuilder */ "../bentley/lib/esm/TypedArrayBuilder.js");
23955
- /* harmony import */ var _UnexpectedErrors__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./UnexpectedErrors */ "../bentley/lib/esm/UnexpectedErrors.js");
23956
- /* harmony import */ var _UtilityTypes__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./UtilityTypes */ "../bentley/lib/esm/UtilityTypes.js");
23957
- /* harmony import */ var _YieldManager__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./YieldManager */ "../bentley/lib/esm/YieldManager.js");
23958
- /* harmony import */ var _internal_cross_package__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./internal/cross-package */ "../bentley/lib/esm/internal/cross-package.js");
23992
+ /* harmony import */ var _Expect__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./Expect */ "../bentley/lib/esm/Expect.js");
23993
+ /* harmony import */ var _Id__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./Id */ "../bentley/lib/esm/Id.js");
23994
+ /* harmony import */ var _IndexMap__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./IndexMap */ "../bentley/lib/esm/IndexMap.js");
23995
+ /* harmony import */ var _JsonSchema__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./JsonSchema */ "../bentley/lib/esm/JsonSchema.js");
23996
+ /* harmony import */ var _JsonUtils__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./JsonUtils */ "../bentley/lib/esm/JsonUtils.js");
23997
+ /* harmony import */ var _Logger__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Logger */ "../bentley/lib/esm/Logger.js");
23998
+ /* harmony import */ var _LRUMap__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./LRUMap */ "../bentley/lib/esm/LRUMap.js");
23999
+ /* harmony import */ var _ObservableSet__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./ObservableSet */ "../bentley/lib/esm/ObservableSet.js");
24000
+ /* harmony import */ var _OneAtATimeAction__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./OneAtATimeAction */ "../bentley/lib/esm/OneAtATimeAction.js");
24001
+ /* harmony import */ var _OrderedId64Iterable__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./OrderedId64Iterable */ "../bentley/lib/esm/OrderedId64Iterable.js");
24002
+ /* harmony import */ var _OrderedSet__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./OrderedSet */ "../bentley/lib/esm/OrderedSet.js");
24003
+ /* harmony import */ var _partitionArray__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./partitionArray */ "../bentley/lib/esm/partitionArray.js");
24004
+ /* harmony import */ var _PriorityQueue__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./PriorityQueue */ "../bentley/lib/esm/PriorityQueue.js");
24005
+ /* harmony import */ var _ProcessDetector__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./ProcessDetector */ "../bentley/lib/esm/ProcessDetector.js");
24006
+ /* harmony import */ var _SortedArray__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./SortedArray */ "../bentley/lib/esm/SortedArray.js");
24007
+ /* harmony import */ var _StringUtils__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./StringUtils */ "../bentley/lib/esm/StringUtils.js");
24008
+ /* harmony import */ var _Time__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./Time */ "../bentley/lib/esm/Time.js");
24009
+ /* harmony import */ var _Tracing__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./Tracing */ "../bentley/lib/esm/Tracing.js");
24010
+ /* harmony import */ var _TupleKeyedMap__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./TupleKeyedMap */ "../bentley/lib/esm/TupleKeyedMap.js");
24011
+ /* harmony import */ var _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./TypedArrayBuilder */ "../bentley/lib/esm/TypedArrayBuilder.js");
24012
+ /* harmony import */ var _UnexpectedErrors__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./UnexpectedErrors */ "../bentley/lib/esm/UnexpectedErrors.js");
24013
+ /* harmony import */ var _UtilityTypes__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./UtilityTypes */ "../bentley/lib/esm/UtilityTypes.js");
24014
+ /* harmony import */ var _YieldManager__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./YieldManager */ "../bentley/lib/esm/YieldManager.js");
24015
+ /* harmony import */ var _internal_cross_package__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./internal/cross-package */ "../bentley/lib/esm/internal/cross-package.js");
23959
24016
  /*---------------------------------------------------------------------------------------------
23960
24017
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
23961
24018
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -23993,6 +24050,7 @@ __webpack_require__.r(__webpack_exports__);
23993
24050
 
23994
24051
 
23995
24052
 
24053
+
23996
24054
 
23997
24055
 
23998
24056
  // Temporarily (until 5.0) export top-level internal APIs to avoid breaking callers.