@itwin/rpcinterface-full-stack-tests 5.15.0-dev.7 → 5.16.0-dev.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/dist/bundled-tests.js +857 -748
- package/lib/dist/bundled-tests.js.map +1 -1
- package/lib/dist/core_frontend_lib_esm_ApproximateTerrainHeightsProps_js.bundled-tests.js.map +1 -1
- package/lib/dist/vendors-common_temp_node_modules_pnpm_loaders_gl_draco_4_5_2__loaders_gl_core_4_5_2_node_modu-bbc95a.bundled-tests.js.map +1 -1
- package/lib/frontend/IModelConnection.test.js.map +1 -1
- package/lib/frontend/Views.test.js.map +1 -1
- package/package.json +14 -16
- package/lib/dist/vendors-common_temp_node_modules_pnpm_cross-fetch_4_1_0_node_modules_cross-fetch_dist_browser-44272f.bundled-tests.js +0 -698
- package/lib/dist/vendors-common_temp_node_modules_pnpm_cross-fetch_4_1_0_node_modules_cross-fetch_dist_browser-44272f.bundled-tests.js.map +0 -1
|
@@ -38476,6 +38476,7 @@ function assert(condition, message) {
|
|
|
38476
38476
|
"use strict";
|
|
38477
38477
|
__webpack_require__.r(__webpack_exports__);
|
|
38478
38478
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
38479
|
+
/* harmony export */ BeAsyncEvent: () => (/* binding */ BeAsyncEvent),
|
|
38479
38480
|
/* harmony export */ BeEvent: () => (/* binding */ BeEvent),
|
|
38480
38481
|
/* harmony export */ BeEventList: () => (/* binding */ BeEventList),
|
|
38481
38482
|
/* harmony export */ BeUiEvent: () => (/* binding */ BeUiEvent),
|
|
@@ -38563,8 +38564,13 @@ class BeEvent {
|
|
|
38563
38564
|
dropped = true;
|
|
38564
38565
|
}
|
|
38565
38566
|
else {
|
|
38567
|
+
const listener = context.listener;
|
|
38568
|
+
if (context.once) {
|
|
38569
|
+
context.listener = undefined;
|
|
38570
|
+
dropped = true;
|
|
38571
|
+
}
|
|
38566
38572
|
try {
|
|
38567
|
-
|
|
38573
|
+
listener.apply(context.scope, args);
|
|
38568
38574
|
}
|
|
38569
38575
|
catch (e) {
|
|
38570
38576
|
_UnexpectedErrors__WEBPACK_IMPORTED_MODULE_0__.UnexpectedErrors.handle(e);
|
|
@@ -38573,10 +38579,6 @@ class BeEvent {
|
|
|
38573
38579
|
// listener was removed during its own callback
|
|
38574
38580
|
dropped = true;
|
|
38575
38581
|
}
|
|
38576
|
-
else if (context.once) {
|
|
38577
|
-
context.listener = undefined;
|
|
38578
|
-
dropped = true;
|
|
38579
|
-
}
|
|
38580
38582
|
}
|
|
38581
38583
|
}
|
|
38582
38584
|
this._emitDepth--;
|
|
@@ -38620,8 +38622,6 @@ class BeUiEvent extends BeEvent {
|
|
|
38620
38622
|
*/
|
|
38621
38623
|
class BeUnorderedEvent {
|
|
38622
38624
|
_listeners = new Set();
|
|
38623
|
-
_emitDepth = 0;
|
|
38624
|
-
_hasTombstones = false;
|
|
38625
38625
|
/** The number of listeners currently subscribed to the event.
|
|
38626
38626
|
* @note During `raiseEvent()`, this may include listeners that have been removed or are one-shot
|
|
38627
38627
|
* but are awaiting deferred cleanup. The count is accurate outside of `raiseEvent()`.
|
|
@@ -38651,43 +38651,26 @@ class BeUnorderedEvent {
|
|
|
38651
38651
|
}
|
|
38652
38652
|
/** Remove a specific context entry, deferring during emit. */
|
|
38653
38653
|
_removeCtx(ctx) {
|
|
38654
|
-
|
|
38655
|
-
ctx.listener = undefined; // tombstone for deferred cleanup
|
|
38656
|
-
this._hasTombstones = true;
|
|
38657
|
-
}
|
|
38658
|
-
else {
|
|
38659
|
-
this._listeners.delete(ctx);
|
|
38660
|
-
}
|
|
38654
|
+
this._listeners.delete(ctx);
|
|
38661
38655
|
}
|
|
38662
38656
|
/**
|
|
38663
38657
|
* Raises the event by calling each registered listener with the supplied arguments.
|
|
38664
38658
|
* @param args This method takes any number of parameters and passes them through to the listeners.
|
|
38665
38659
|
*/
|
|
38666
38660
|
raiseEvent(...args) {
|
|
38667
|
-
this._emitDepth++;
|
|
38668
38661
|
for (const ctx of this._listeners) {
|
|
38669
38662
|
if (!ctx.listener) {
|
|
38670
38663
|
continue;
|
|
38671
38664
|
}
|
|
38665
|
+
if (ctx.once) {
|
|
38666
|
+
this._listeners.delete(ctx);
|
|
38667
|
+
}
|
|
38672
38668
|
try {
|
|
38673
38669
|
ctx.listener.apply(ctx.scope, args);
|
|
38674
38670
|
}
|
|
38675
38671
|
catch (e) {
|
|
38676
38672
|
_UnexpectedErrors__WEBPACK_IMPORTED_MODULE_0__.UnexpectedErrors.handle(e);
|
|
38677
38673
|
}
|
|
38678
|
-
if (ctx.listener && ctx.once) {
|
|
38679
|
-
ctx.listener = undefined;
|
|
38680
|
-
this._hasTombstones = true;
|
|
38681
|
-
}
|
|
38682
|
-
}
|
|
38683
|
-
this._emitDepth--;
|
|
38684
|
-
// Only clean up tombstoned entries when we're back at the outermost emit
|
|
38685
|
-
if (this._hasTombstones && this._emitDepth === 0) {
|
|
38686
|
-
this._hasTombstones = false;
|
|
38687
|
-
for (const ctx of this._listeners) {
|
|
38688
|
-
if (ctx.listener === undefined)
|
|
38689
|
-
this._listeners.delete(ctx);
|
|
38690
|
-
}
|
|
38691
38674
|
}
|
|
38692
38675
|
}
|
|
38693
38676
|
/** Clear all listeners from this BeUnorderedEvent.
|
|
@@ -38703,6 +38686,108 @@ class BeUnorderedUiEvent extends BeUnorderedEvent {
|
|
|
38703
38686
|
/** Raises event with single strongly typed argument. */
|
|
38704
38687
|
emit(args) { this.raiseEvent(args); }
|
|
38705
38688
|
}
|
|
38689
|
+
/**
|
|
38690
|
+
* Manages a set of *listeners* for a particular event and notifies them when the event is raised.
|
|
38691
|
+
* Each listener is async (return a Promise<void>). The listeners may be invoked in series
|
|
38692
|
+
* or concurrently depending on the configuration of the instance.
|
|
38693
|
+
*
|
|
38694
|
+
* Like [[BeUnorderedEvent]], this class uses a `Set` internally to support more performant removal
|
|
38695
|
+
* of old listeners. When a listener is removed during emit, it is marked for deferred removal instead
|
|
38696
|
+
* of mutating the set immediately. Despite the "unordered" implication, items in a `Set` are enumerated
|
|
38697
|
+
* in insertion order, which means that this class invokes the listeners in insertion order.
|
|
38698
|
+
*
|
|
38699
|
+
* Listeners are managed exclusively through the disposal closure returned by [[addListener]] and
|
|
38700
|
+
* [[addOnce]]. There is no `removeListener` or `has` method — callers must capture the returned
|
|
38701
|
+
* closure to unsubscribe.
|
|
38702
|
+
* @beta
|
|
38703
|
+
*/
|
|
38704
|
+
class BeAsyncEvent {
|
|
38705
|
+
_listeners = new Set();
|
|
38706
|
+
_concurrent = false;
|
|
38707
|
+
_promiseRejectionIsUnexpected = false;
|
|
38708
|
+
constructor(options) {
|
|
38709
|
+
if (options?.concurrent)
|
|
38710
|
+
this._concurrent = true;
|
|
38711
|
+
if (options?.promiseRejectionIsUnexpected)
|
|
38712
|
+
this._promiseRejectionIsUnexpected = true;
|
|
38713
|
+
}
|
|
38714
|
+
/** The number of listeners currently subscribed to the event.
|
|
38715
|
+
* @note During `raiseEvent()`, this may include listeners that have been removed or are one-shot
|
|
38716
|
+
* but are awaiting deferred cleanup. The count is accurate outside of `raiseEvent()`.
|
|
38717
|
+
*/
|
|
38718
|
+
get numberOfListeners() { return this._listeners.size; }
|
|
38719
|
+
/**
|
|
38720
|
+
* Registers a Listener to be executed whenever this event is raised.
|
|
38721
|
+
* @param listener The function to be executed when the event is raised.
|
|
38722
|
+
* @param scope An optional object scope to serve as the 'this' pointer when listener is invoked.
|
|
38723
|
+
* @returns A function that will remove this event listener in O(1).
|
|
38724
|
+
*/
|
|
38725
|
+
addListener(listener, scope) {
|
|
38726
|
+
const ctx = { listener, scope, once: false };
|
|
38727
|
+
this._listeners.add(ctx);
|
|
38728
|
+
return () => this._removeCtx(ctx);
|
|
38729
|
+
}
|
|
38730
|
+
/**
|
|
38731
|
+
* Registers a callback function to be executed *only once* when the event is raised.
|
|
38732
|
+
* @param listener The function to be executed once when the event is raised.
|
|
38733
|
+
* @param scope An optional object scope to serve as the `this` pointer in which the listener function will execute.
|
|
38734
|
+
* @returns A function that will remove this event listener in O(1).
|
|
38735
|
+
*/
|
|
38736
|
+
addOnce(listener, scope) {
|
|
38737
|
+
const ctx = { listener, scope, once: true };
|
|
38738
|
+
this._listeners.add(ctx);
|
|
38739
|
+
return () => this._removeCtx(ctx);
|
|
38740
|
+
}
|
|
38741
|
+
/** Remove a specific context entry, deferring during emit. */
|
|
38742
|
+
_removeCtx(ctx) {
|
|
38743
|
+
this._listeners.delete(ctx);
|
|
38744
|
+
}
|
|
38745
|
+
/**
|
|
38746
|
+
* Raises the event by calling each registered listener with the supplied arguments.
|
|
38747
|
+
*
|
|
38748
|
+
* See [[BeAsyncEventOptions]] for options that control the behavior of this method.
|
|
38749
|
+
*
|
|
38750
|
+
* @param args This method takes any number of parameters and passes them through to the listeners.
|
|
38751
|
+
* @returns A Promise that settles when the event invocation is complete.
|
|
38752
|
+
*/
|
|
38753
|
+
async raiseEvent(...args) {
|
|
38754
|
+
const promises = [];
|
|
38755
|
+
// Wrapper to ensure that an exception thrown immediately by a listener is captured as a rejected promise rather than
|
|
38756
|
+
// allowed to propagate as an exception. A well-behaved Promise-returning function should never throw, but
|
|
38757
|
+
// this defends against the poorly-behaved ones. In Node 23+ we could use `Promise.try` instead.
|
|
38758
|
+
const invoke = async (ctx, args) => {
|
|
38759
|
+
if (!ctx.listener)
|
|
38760
|
+
return;
|
|
38761
|
+
await ctx.listener.apply(ctx.scope, args);
|
|
38762
|
+
};
|
|
38763
|
+
for (const ctx of this._listeners) {
|
|
38764
|
+
if (!ctx.listener)
|
|
38765
|
+
continue;
|
|
38766
|
+
if (ctx.once) {
|
|
38767
|
+
// Set guarantees this is safe during iteration.
|
|
38768
|
+
this._listeners.delete(ctx);
|
|
38769
|
+
}
|
|
38770
|
+
let promise = invoke(ctx, args);
|
|
38771
|
+
if (this._promiseRejectionIsUnexpected)
|
|
38772
|
+
promise = promise.catch(reason => _UnexpectedErrors__WEBPACK_IMPORTED_MODULE_0__.UnexpectedErrors.handle(reason));
|
|
38773
|
+
if (this._concurrent)
|
|
38774
|
+
promises.push(promise);
|
|
38775
|
+
else
|
|
38776
|
+
await promise;
|
|
38777
|
+
}
|
|
38778
|
+
if (this._concurrent) {
|
|
38779
|
+
const result = await Promise.allSettled(promises);
|
|
38780
|
+
const firstRejection = result.find(r => r.status === "rejected");
|
|
38781
|
+
if (firstRejection)
|
|
38782
|
+
throw firstRejection.reason;
|
|
38783
|
+
}
|
|
38784
|
+
}
|
|
38785
|
+
/** Clear all listeners from this BeAsyncEvent.
|
|
38786
|
+
* @note If called during `raiseEvent`, remaining listeners in the current iteration are skipped
|
|
38787
|
+
* immediately rather than being tombstoned.
|
|
38788
|
+
*/
|
|
38789
|
+
clear() { this._listeners.clear(); }
|
|
38790
|
+
}
|
|
38706
38791
|
/**
|
|
38707
38792
|
* A list of BeEvent objects, accessible by an event name.
|
|
38708
38793
|
* This class may be used instead of explicitly declaring each BeEvent as a member of a containing class.
|
|
@@ -41259,16 +41344,18 @@ var Id64;
|
|
|
41259
41344
|
Id64.getFirst = getFirst;
|
|
41260
41345
|
/** Return the number of [[Id64String]]s represented by an [[Id64Arg]]. */
|
|
41261
41346
|
function sizeOf(arg) {
|
|
41262
|
-
return typeof arg === "string" ? 1 :
|
|
41347
|
+
return typeof arg === "string" ? 1 : "size" in arg ? arg.size : arg.length;
|
|
41263
41348
|
}
|
|
41264
41349
|
Id64.sizeOf = sizeOf;
|
|
41265
41350
|
/** Returns true if the [[Id64Arg]] contains the specified Id. */
|
|
41266
41351
|
function has(arg, id) {
|
|
41267
|
-
if (typeof arg === "string")
|
|
41352
|
+
if (typeof arg === "string") {
|
|
41268
41353
|
return arg === id;
|
|
41269
|
-
|
|
41270
|
-
|
|
41271
|
-
|
|
41354
|
+
}
|
|
41355
|
+
if ("has" in arg) {
|
|
41356
|
+
return arg.has(id);
|
|
41357
|
+
}
|
|
41358
|
+
return -1 !== arg.indexOf(id);
|
|
41272
41359
|
}
|
|
41273
41360
|
Id64.has = has;
|
|
41274
41361
|
/** The string representation of an invalid Id. */
|
|
@@ -45338,6 +45425,7 @@ class YieldManager {
|
|
|
45338
45425
|
__webpack_require__.r(__webpack_exports__);
|
|
45339
45426
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
45340
45427
|
/* harmony export */ AbandonedError: () => (/* reexport safe */ _OneAtATimeAction__WEBPACK_IMPORTED_MODULE_22__.AbandonedError),
|
|
45428
|
+
/* harmony export */ BeAsyncEvent: () => (/* reexport safe */ _BeEvent__WEBPACK_IMPORTED_MODULE_2__.BeAsyncEvent),
|
|
45341
45429
|
/* harmony export */ BeDuration: () => (/* reexport safe */ _Time__WEBPACK_IMPORTED_MODULE_30__.BeDuration),
|
|
45342
45430
|
/* harmony export */ BeEvent: () => (/* reexport safe */ _BeEvent__WEBPACK_IMPORTED_MODULE_2__.BeEvent),
|
|
45343
45431
|
/* harmony export */ BeEventList: () => (/* reexport safe */ _BeEvent__WEBPACK_IMPORTED_MODULE_2__.BeEventList),
|
|
@@ -50901,7 +50989,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
50901
50989
|
/* harmony export */ ECSqlReader: () => (/* binding */ ECSqlReader)
|
|
50902
50990
|
/* harmony export */ });
|
|
50903
50991
|
/* harmony import */ var _ConcurrentQuery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ConcurrentQuery */ "../../core/common/lib/esm/ConcurrentQuery.js");
|
|
50904
|
-
/* harmony import */ var
|
|
50992
|
+
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
50993
|
+
/* harmony import */ var _ECSqlReaderBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ECSqlReaderBase */ "../../core/common/lib/esm/ECSqlReaderBase.js");
|
|
50905
50994
|
/*---------------------------------------------------------------------------------------------
|
|
50906
50995
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
50907
50996
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -50911,6 +51000,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
50911
51000
|
*/
|
|
50912
51001
|
|
|
50913
51002
|
|
|
51003
|
+
|
|
50914
51004
|
/**
|
|
50915
51005
|
* Execute ECSQL statements and read the results.
|
|
50916
51006
|
*
|
|
@@ -50933,7 +51023,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
50933
51023
|
* JavaScript object, call [[QueryRowProxy.toRow]] on it.
|
|
50934
51024
|
* @public
|
|
50935
51025
|
*/
|
|
50936
|
-
class ECSqlReader extends
|
|
51026
|
+
class ECSqlReader extends _ECSqlReaderBase__WEBPACK_IMPORTED_MODULE_2__.ECSqlReaderBase {
|
|
50937
51027
|
_executor;
|
|
50938
51028
|
query;
|
|
50939
51029
|
static _maxRetryCount = 10;
|
|
@@ -50944,6 +51034,7 @@ class ECSqlReader extends _ECSqlReaderBase__WEBPACK_IMPORTED_MODULE_1__.ECSqlRea
|
|
|
50944
51034
|
_globalDone = false;
|
|
50945
51035
|
_param = new _ConcurrentQuery__WEBPACK_IMPORTED_MODULE_0__.QueryBinder().serialize();
|
|
50946
51036
|
_lockArgs = false;
|
|
51037
|
+
_cursorId = "";
|
|
50947
51038
|
_stats = { backendCpuTime: 0, backendTotalTime: 0, backendMemUsed: 0, backendRowsReturned: 0, totalTime: 0, retryCount: 0, prepareTime: 0 };
|
|
50948
51039
|
_options = new _ConcurrentQuery__WEBPACK_IMPORTED_MODULE_0__.QueryOptionsBuilder().getOptions();
|
|
50949
51040
|
/**
|
|
@@ -50975,10 +51066,11 @@ class ECSqlReader extends _ECSqlReaderBase__WEBPACK_IMPORTED_MODULE_1__.ECSqlRea
|
|
|
50975
51066
|
* @deprecated in 5.6 - will not be removed until after 2027-04-02. Should not be used. Will be made private in a future release.
|
|
50976
51067
|
*/
|
|
50977
51068
|
reset(options) {
|
|
51069
|
+
this._cursorId = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_1__.Guid.createValue();
|
|
50978
51070
|
if (options) {
|
|
50979
51071
|
this._options = options;
|
|
50980
51072
|
}
|
|
50981
|
-
this._props = new
|
|
51073
|
+
this._props = new _ECSqlReaderBase__WEBPACK_IMPORTED_MODULE_2__.PropertyMetaDataMap([]);
|
|
50982
51074
|
this._localRows = [];
|
|
50983
51075
|
this._globalDone = false;
|
|
50984
51076
|
this._globalOffset = 0;
|
|
@@ -50999,6 +51091,7 @@ class ECSqlReader extends _ECSqlReaderBase__WEBPACK_IMPORTED_MODULE_1__.ECSqlRea
|
|
|
50999
51091
|
* @deprecated in 5.6 - will not be removed until after 2027-04-02. Should not be used. Will be made private in a future release.
|
|
51000
51092
|
*/
|
|
51001
51093
|
resetBindings() {
|
|
51094
|
+
this._cursorId = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_1__.Guid.createValue();
|
|
51002
51095
|
this._param = new _ConcurrentQuery__WEBPACK_IMPORTED_MODULE_0__.QueryBinder().serialize();
|
|
51003
51096
|
this._lockArgs = false;
|
|
51004
51097
|
}
|
|
@@ -51037,13 +51130,14 @@ class ECSqlReader extends _ECSqlReaderBase__WEBPACK_IMPORTED_MODULE_1__.ECSqlRea
|
|
|
51037
51130
|
valueFormat,
|
|
51038
51131
|
query: this.query,
|
|
51039
51132
|
args: this._param,
|
|
51133
|
+
cursorId: this._cursorId,
|
|
51040
51134
|
};
|
|
51041
51135
|
request.includeMetaData = this._props.length > 0 ? false : true;
|
|
51042
51136
|
request.limit = { offset: this._globalOffset, count: this._globalCount < 1 ? -1 : this._globalCount };
|
|
51043
51137
|
const resp = await this.runWithRetry(request);
|
|
51044
51138
|
this._globalDone = resp.status === _ConcurrentQuery__WEBPACK_IMPORTED_MODULE_0__.DbResponseStatus.Done || resp.status === _ConcurrentQuery__WEBPACK_IMPORTED_MODULE_0__.DbResponseStatus.NotOpen;
|
|
51045
51139
|
if (this._props.length === 0 && resp.meta.length > 0) {
|
|
51046
|
-
this._props = new
|
|
51140
|
+
this._props = new _ECSqlReaderBase__WEBPACK_IMPORTED_MODULE_2__.PropertyMetaDataMap(resp.meta);
|
|
51047
51141
|
}
|
|
51048
51142
|
for (const row of resp.data) {
|
|
51049
51143
|
ECSqlReader.replaceBase64WithUint8Array(row);
|
|
@@ -51807,7 +51901,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
51807
51901
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
51808
51902
|
/* harmony export */ EntityMetaData: () => (/* binding */ EntityMetaData),
|
|
51809
51903
|
/* harmony export */ PrimitiveTypeCode: () => (/* binding */ PrimitiveTypeCode),
|
|
51810
|
-
/* harmony export */ PropertyMetaData: () => (/* binding */ PropertyMetaData)
|
|
51904
|
+
/* harmony export */ PropertyMetaData: () => (/* binding */ PropertyMetaData),
|
|
51905
|
+
/* harmony export */ isPersisted: () => (/* binding */ isPersisted)
|
|
51811
51906
|
/* harmony export */ });
|
|
51812
51907
|
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
51813
51908
|
/* harmony import */ var _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @itwin/core-geometry */ "../../core/geometry/lib/esm/core-geometry.js");
|
|
@@ -51822,6 +51917,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
51822
51917
|
|
|
51823
51918
|
|
|
51824
51919
|
|
|
51920
|
+
/** Tests whether an [[EntityProps]] has a valid `id`, narrowing its type to [[Persisted]] if it does.
|
|
51921
|
+
* @public @preview
|
|
51922
|
+
* @extensions
|
|
51923
|
+
*/
|
|
51924
|
+
function isPersisted(entity) {
|
|
51925
|
+
return undefined !== entity.id && _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.isValidId64(entity.id);
|
|
51926
|
+
}
|
|
51825
51927
|
/** The primitive types of an Entity property.
|
|
51826
51928
|
* @beta
|
|
51827
51929
|
*/
|
|
@@ -53700,6 +53802,9 @@ var GeoCoordStatus;
|
|
|
53700
53802
|
* Geoid separation data or vertical datum differential data (such as used by NGVD29 to NAVD88 conversion).
|
|
53701
53803
|
* The horizontal coordinates returned are valid but the elevation ordinate will be returned unchanged or partially changed.
|
|
53702
53804
|
* This status should be somehow reported so actions can be performed to provide the missing information.
|
|
53805
|
+
* A finite elevation, including one equal to the input elevation, is not evidence that vertical conversion succeeded.
|
|
53806
|
+
* Callers requiring converted elevations must reject this result. Horizontal-only callers may use XY while retaining
|
|
53807
|
+
* and reporting this status. A visual fallback must not be presented as a successful vertical conversion.
|
|
53703
53808
|
*/
|
|
53704
53809
|
GeoCoordStatus[GeoCoordStatus["VerticalDatumConvertError"] = 26] = "VerticalDatumConvertError";
|
|
53705
53810
|
/** General inner conversion engine error. Coordinates returned are invalid and should be discarded */
|
|
@@ -65955,6 +66060,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
65955
66060
|
/* harmony export */ isBinaryImageSource: () => (/* reexport safe */ _Image__WEBPACK_IMPORTED_MODULE_69__.isBinaryImageSource),
|
|
65956
66061
|
/* harmony export */ isKnownFieldPropertyType: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_166__.isKnownFieldPropertyType),
|
|
65957
66062
|
/* harmony export */ isKnownTileFormat: () => (/* reexport safe */ _tile_TileIO__WEBPACK_IMPORTED_MODULE_162__.isKnownTileFormat),
|
|
66063
|
+
/* harmony export */ isPersisted: () => (/* reexport safe */ _EntityProps__WEBPACK_IMPORTED_MODULE_34__.isPersisted),
|
|
65958
66064
|
/* harmony export */ isPlacement2dProps: () => (/* reexport safe */ _ElementProps__WEBPACK_IMPORTED_MODULE_32__.isPlacement2dProps),
|
|
65959
66065
|
/* harmony export */ isPlacement3dProps: () => (/* reexport safe */ _ElementProps__WEBPACK_IMPORTED_MODULE_32__.isPlacement3dProps),
|
|
65960
66066
|
/* harmony export */ isPowerOfTwo: () => (/* reexport safe */ _Image__WEBPACK_IMPORTED_MODULE_69__.isPowerOfTwo),
|
|
@@ -76991,7 +77097,7 @@ class IModelReadRpcInterface extends _RpcInterface__WEBPACK_IMPORTED_MODULE_0__.
|
|
|
76991
77097
|
/** The immutable name of the interface. */
|
|
76992
77098
|
static interfaceName = "IModelReadRpcInterface";
|
|
76993
77099
|
/** The semantic version of the interface. */
|
|
76994
|
-
static interfaceVersion = "3.8.
|
|
77100
|
+
static interfaceVersion = "3.8.1";
|
|
76995
77101
|
/*===========================================================================================
|
|
76996
77102
|
NOTE: Any add/remove/change to the methods below requires an update of the interface version.
|
|
76997
77103
|
NOTE: Please consult the README in this folder for the semantic versioning rules.
|
|
@@ -77936,8 +78042,7 @@ class RpcInvocation {
|
|
|
77936
78042
|
return;
|
|
77937
78043
|
for (let i = 0; i !== parameters.length; ++i) {
|
|
77938
78044
|
const parameter = parameters[i];
|
|
77939
|
-
|
|
77940
|
-
if (isToken && this.protocol.checkToken && !this.operation.policy.allowTokenMismatch) {
|
|
78045
|
+
if (this.protocol.checkToken && !this.operation.policy.allowTokenMismatch && RpcInvocation.isTokenParameter(parameter, i)) {
|
|
77941
78046
|
const inflated = this.protocol.inflateToken(parameter, this.request);
|
|
77942
78047
|
parameters[i] = inflated;
|
|
77943
78048
|
if (!RpcInvocation.compareTokens(parameter, inflated)) {
|
|
@@ -77951,9 +78056,20 @@ class RpcInvocation {
|
|
|
77951
78056
|
}
|
|
77952
78057
|
}
|
|
77953
78058
|
}
|
|
78059
|
+
/** Determine whether an operation parameter is an [[IModelRpcProps]]. Every property of the token other than `key` is optional
|
|
78060
|
+
* and all of them are supplied by the caller, so the first parameter is treated as a token if it has *any* of the identifying properties.
|
|
78061
|
+
*/
|
|
78062
|
+
static isTokenParameter(parameter, index) {
|
|
78063
|
+
if (typeof parameter !== "object" || parameter === null || Array.isArray(parameter))
|
|
78064
|
+
return false;
|
|
78065
|
+
const has = (prop) => Object.prototype.hasOwnProperty.call(parameter, prop);
|
|
78066
|
+
if (has("iModelId") && has("iTwinId"))
|
|
78067
|
+
return true;
|
|
78068
|
+
return 0 === index && (has("key") || has("iModelId") || has("iTwinId"));
|
|
78069
|
+
}
|
|
77954
78070
|
static compareTokens(a, b) {
|
|
77955
78071
|
return a.key === b.key &&
|
|
77956
|
-
a.iTwinId === b.iTwinId &&
|
|
78072
|
+
(undefined === a.iTwinId || a.iTwinId === b.iTwinId) &&
|
|
77957
78073
|
a.iModelId === b.iModelId &&
|
|
77958
78074
|
(undefined === a.changeset || (a.changeset.id === b.changeset?.id));
|
|
77959
78075
|
}
|
|
@@ -96516,8 +96632,8 @@ class SchemaView {
|
|
|
96516
96632
|
throw new Error("SchemaView is not mergeable: create it via SchemaView.createMergeable to merge fragments.");
|
|
96517
96633
|
this._mergeContext.mergeBlob(blob);
|
|
96518
96634
|
// A new fragment can add subclasses to an already-present base class, so the derived-class map
|
|
96519
|
-
// must be rebuilt. transitiveBaseCache
|
|
96520
|
-
// before it (dependency order), so an append never adds an ancestor to an already-cached class.
|
|
96635
|
+
// must be rebuilt. transitiveBaseCache and PropertyRef.overriddenProperty stay valid: a class's ancestors
|
|
96636
|
+
// are always merged before it (dependency order), so an append never adds an ancestor to an already-cached class.
|
|
96521
96637
|
this[_storage].derivedClassMap = undefined;
|
|
96522
96638
|
}
|
|
96523
96639
|
// --- Internal helpers used by view objects ---
|
|
@@ -96607,12 +96723,18 @@ class SchemaView {
|
|
|
96607
96723
|
// 1. Base class (recursive, depth-first)
|
|
96608
96724
|
if (cls.baseClassIdx !== -1)
|
|
96609
96725
|
this._collectProperties(cls.baseClassIdx, merged);
|
|
96610
|
-
// 2. Mixins in declaration order
|
|
96726
|
+
// 2. Mixins in declaration order. Each mixin is resolved on its own so its overrides win over its
|
|
96727
|
+
// ancestors, then only adds names not already provided by the base class or an earlier mixin.
|
|
96611
96728
|
for (let i = 0; i < cls.mixinCount; i++) {
|
|
96612
96729
|
const mixinIdx = this[_storage].classMixins[cls.mixinStartIdx + i];
|
|
96613
96730
|
if (mixinIdx === -1 || mixinIdx === undefined)
|
|
96614
96731
|
continue; // safety: dangling mixin ref
|
|
96615
|
-
|
|
96732
|
+
const mixinProperties = new Map();
|
|
96733
|
+
this._collectProperties(mixinIdx, mixinProperties);
|
|
96734
|
+
for (const [nameKey, resolved] of mixinProperties) {
|
|
96735
|
+
if (!merged.has(nameKey))
|
|
96736
|
+
merged.set(nameKey, resolved);
|
|
96737
|
+
}
|
|
96616
96738
|
}
|
|
96617
96739
|
// 3. Own properties - always override
|
|
96618
96740
|
for (let i = 0; i < cls.ownPropCount; i++) {
|
|
@@ -96621,27 +96743,62 @@ class SchemaView {
|
|
|
96621
96743
|
merged.set(nameKey, { ref, classIdx });
|
|
96622
96744
|
}
|
|
96623
96745
|
}
|
|
96624
|
-
|
|
96625
|
-
|
|
96626
|
-
|
|
96627
|
-
|
|
96628
|
-
|
|
96629
|
-
if (
|
|
96630
|
-
|
|
96631
|
-
|
|
96632
|
-
|
|
96633
|
-
|
|
96634
|
-
|
|
96746
|
+
/** Finds the property declaration that a property of the given class overrides.
|
|
96747
|
+
* Searches the base class and its ancestors first, then each mixin in declaration order.
|
|
96748
|
+
*/
|
|
96749
|
+
_findOverriddenProperty(classIdx, nameKey) {
|
|
96750
|
+
const cls = this[_storage].classes[classIdx];
|
|
96751
|
+
if (cls === undefined || cls.type === _SchemaViewInterfaces__WEBPACK_IMPORTED_MODULE_0__.ClassType.View)
|
|
96752
|
+
return undefined;
|
|
96753
|
+
if (cls.baseClassIdx !== -1) {
|
|
96754
|
+
const found = this._findPropertyDeclaration(cls.baseClassIdx, nameKey);
|
|
96755
|
+
if (found !== undefined)
|
|
96756
|
+
return found;
|
|
96757
|
+
}
|
|
96758
|
+
for (let i = 0; i < cls.mixinCount; i++) {
|
|
96759
|
+
const mixinIdx = this[_storage].classMixins[cls.mixinStartIdx + i];
|
|
96760
|
+
if (mixinIdx === -1 || mixinIdx === undefined)
|
|
96635
96761
|
continue; // safety: dangling mixin ref
|
|
96636
|
-
this.
|
|
96762
|
+
const found = this._findPropertyDeclaration(mixinIdx, nameKey);
|
|
96763
|
+
if (found !== undefined)
|
|
96764
|
+
return found;
|
|
96765
|
+
}
|
|
96766
|
+
return undefined;
|
|
96767
|
+
}
|
|
96768
|
+
_findPropertyDeclaration(classIdx, nameKey) {
|
|
96769
|
+
const cls = this[_storage].classes[classIdx];
|
|
96770
|
+
if (cls === undefined)
|
|
96771
|
+
return undefined; // safety: dangling index from excluded schema
|
|
96772
|
+
for (let i = 0; i < cls.ownPropCount; i++) {
|
|
96773
|
+
const ref = this[_storage].propertyRefs[cls.ownPropStart + i];
|
|
96774
|
+
if (this[_storage].lowerStrings[this[_storage].propDefs[ref.defIdx].nameStringIdx] === nameKey)
|
|
96775
|
+
return { ref, classIdx };
|
|
96637
96776
|
}
|
|
96638
|
-
|
|
96639
|
-
|
|
96640
|
-
|
|
96777
|
+
return this._findOverriddenProperty(classIdx, nameKey);
|
|
96778
|
+
}
|
|
96779
|
+
/** Returns the first declaration matching `predicate`, starting with the given declaration and
|
|
96780
|
+
* continuing with the declarations it overrides.
|
|
96781
|
+
* @internal
|
|
96782
|
+
*/
|
|
96783
|
+
findPropertyDefInOverrides(ref, classIdx, predicate) {
|
|
96784
|
+
let current = { ref, classIdx };
|
|
96785
|
+
while (current !== null) {
|
|
96786
|
+
const def = this[_storage].propDefs[current.ref.defIdx];
|
|
96787
|
+
if (predicate(def))
|
|
96788
|
+
return def;
|
|
96789
|
+
current = this._getOverriddenProperty(current.ref, current.classIdx);
|
|
96790
|
+
}
|
|
96791
|
+
return undefined;
|
|
96792
|
+
}
|
|
96793
|
+
/** Returns the declaration the given one overrides, resolving and storing it on the ref on first access.
|
|
96794
|
+
* Caching per ref is sound because a ref belongs to exactly one class; view properties (classIdx -1) never override.
|
|
96795
|
+
*/
|
|
96796
|
+
_getOverriddenProperty(ref, classIdx) {
|
|
96797
|
+
if (ref.overriddenProperty === undefined) {
|
|
96641
96798
|
const nameKey = this[_storage].lowerStrings[this[_storage].propDefs[ref.defIdx].nameStringIdx];
|
|
96642
|
-
|
|
96643
|
-
merged.set(nameKey, { ref, classIdx: mixinIdx });
|
|
96799
|
+
ref.overriddenProperty = classIdx !== -1 ? this._findOverriddenProperty(classIdx, nameKey) ?? null : null;
|
|
96644
96800
|
}
|
|
96801
|
+
return ref.overriddenProperty;
|
|
96645
96802
|
}
|
|
96646
96803
|
/** @internal */
|
|
96647
96804
|
buildDerivedClassMap() {
|
|
@@ -96666,6 +96823,9 @@ class SchemaView {
|
|
|
96666
96823
|
// =====================================================================================
|
|
96667
96824
|
// SchemaView namespace - flyweight view types
|
|
96668
96825
|
// =====================================================================================
|
|
96826
|
+
function hasCategory(def) { return def.categoryIdx !== -1; }
|
|
96827
|
+
function hasKindOfQuantity(def) { return def.koqIdx !== -1; }
|
|
96828
|
+
function isHiddenDef(def) { return def.isHidden; }
|
|
96669
96829
|
/** @beta */
|
|
96670
96830
|
(function (SchemaView) {
|
|
96671
96831
|
/** Lightweight view over a schema in a `SchemaView`. Holds only a view reference and
|
|
@@ -97009,10 +97169,21 @@ class SchemaView {
|
|
|
97009
97169
|
}
|
|
97010
97170
|
get kind() { return this._def.kind; }
|
|
97011
97171
|
get isReadOnly() { return this._def.isReadOnly; }
|
|
97012
|
-
/** Reflects the `HiddenProperty` custom attribute from `CoreCustomAttributes
|
|
97013
|
-
* Properties marked hidden are typically excluded from UI display but remain
|
|
97172
|
+
/** Reflects the `HiddenProperty` custom attribute from `CoreCustomAttributes` on this declaration only;
|
|
97173
|
+
* see `isEffectivelyHidden`. Properties marked hidden are typically excluded from UI display but remain
|
|
97174
|
+
* accessible programmatically. */
|
|
97014
97175
|
get isHidden() { return this._def.isHidden; }
|
|
97015
|
-
/**
|
|
97176
|
+
/** True if this declaration is hidden. If it is not and the property is an override, we take this from the
|
|
97177
|
+
* overridden property. Limitation: `HiddenProperty(Show=true)` reads the same as no `HiddenProperty`, so it does not
|
|
97178
|
+
* unhide a property whose overridden property is hidden. */
|
|
97179
|
+
get isEffectivelyHidden() {
|
|
97180
|
+
if (this._def.isHidden)
|
|
97181
|
+
return true;
|
|
97182
|
+
return this._ctx.findPropertyDefInOverrides(this._ref, this._classIdx, isHiddenDef) !== undefined;
|
|
97183
|
+
}
|
|
97184
|
+
/** Display priority. Higher values should be displayed more prominently. 0 means default.
|
|
97185
|
+
* Not inherited from the overridden property: an omitted priority is stored as 0, which cannot be told
|
|
97186
|
+
* apart from an explicit 0 that overrides a base priority. */
|
|
97016
97187
|
get priority() { return this._ref.priority; }
|
|
97017
97188
|
/** The class that declared or contributed this property through inheritance.
|
|
97018
97189
|
* For own properties, returns the class itself. For inherited properties, returns the
|
|
@@ -97023,11 +97194,21 @@ class SchemaView {
|
|
|
97023
97194
|
get declaringClass() {
|
|
97024
97195
|
return this._classIdx !== -1 ? createClass(this._ctx, this._classIdx) : undefined;
|
|
97025
97196
|
}
|
|
97026
|
-
/** Property category
|
|
97197
|
+
/** Property category. If there is no local category and the property is an override, we take this from
|
|
97198
|
+
* the overridden property. Available on all property kinds. */
|
|
97027
97199
|
get category() {
|
|
97028
|
-
|
|
97200
|
+
let idx = this._def.categoryIdx;
|
|
97201
|
+
if (idx === -1 && this._ctx[_storage].propCategories.length !== 0)
|
|
97202
|
+
idx = this._ctx.findPropertyDefInOverrides(this._ref, this._classIdx, hasCategory)?.categoryIdx ?? -1;
|
|
97029
97203
|
return idx !== -1 ? new PropertyCategory(this._ctx, idx) : undefined;
|
|
97030
97204
|
}
|
|
97205
|
+
/** @internal */
|
|
97206
|
+
get _kindOfQuantity() {
|
|
97207
|
+
let idx = this._def.koqIdx;
|
|
97208
|
+
if (idx === -1 && this._ctx[_storage].koqs.length !== 0)
|
|
97209
|
+
idx = this._ctx.findPropertyDefInOverrides(this._ref, this._classIdx, hasKindOfQuantity)?.koqIdx ?? -1;
|
|
97210
|
+
return idx !== -1 ? new KindOfQuantity(this._ctx, idx) : undefined;
|
|
97211
|
+
}
|
|
97031
97212
|
// Type guards - real type predicates that narrow `this`
|
|
97032
97213
|
/** True for `SchemaView.PrimitiveProperty` and `SchemaView.PrimitiveArrayProperty`.
|
|
97033
97214
|
* Matches ecschema-metadata behavior where `isPrimitive()` includes primitive arrays. */
|
|
@@ -97089,10 +97270,9 @@ class SchemaView {
|
|
|
97089
97270
|
const idx = this._def.enumIdx;
|
|
97090
97271
|
return idx !== -1 ? new Enumeration(this._ctx, idx) : undefined;
|
|
97091
97272
|
}
|
|
97092
|
-
|
|
97093
|
-
|
|
97094
|
-
|
|
97095
|
-
}
|
|
97273
|
+
/** KindOfQuantity. If there is no local KindOfQuantity and the property is an override, we take this
|
|
97274
|
+
* from the overridden property. */
|
|
97275
|
+
get kindOfQuantity() { return this._kindOfQuantity; }
|
|
97096
97276
|
}
|
|
97097
97277
|
SchemaView.PrimitiveProperty = PrimitiveProperty;
|
|
97098
97278
|
/** An array of primitive values. Same primitive/enum fields as `PrimitiveProperty`,
|
|
@@ -97109,10 +97289,9 @@ class SchemaView {
|
|
|
97109
97289
|
const idx = this._def.enumIdx;
|
|
97110
97290
|
return idx !== -1 ? new Enumeration(this._ctx, idx) : undefined;
|
|
97111
97291
|
}
|
|
97112
|
-
|
|
97113
|
-
|
|
97114
|
-
|
|
97115
|
-
}
|
|
97292
|
+
/** KindOfQuantity. If there is no local KindOfQuantity and the property is an override, we take this
|
|
97293
|
+
* from the overridden property. */
|
|
97294
|
+
get kindOfQuantity() { return this._kindOfQuantity; }
|
|
97116
97295
|
get arrayMinOccurs() { return this._def.arrayMinOccurs; }
|
|
97117
97296
|
get arrayMaxOccurs() { return this._def.arrayMaxOccurs; }
|
|
97118
97297
|
}
|
|
@@ -98018,6 +98197,7 @@ function mergeFragmentBlob(ctx, data) {
|
|
|
98018
98197
|
defIdx,
|
|
98019
98198
|
labelStringIdx: pr.labelStringIdx,
|
|
98020
98199
|
priority: pr.priority,
|
|
98200
|
+
overriddenProperty: undefined,
|
|
98021
98201
|
});
|
|
98022
98202
|
}
|
|
98023
98203
|
let sourceConstraintIdx = -1;
|
|
@@ -110829,30 +111009,63 @@ class CoordinateConverter {
|
|
|
110829
111009
|
}
|
|
110830
111010
|
}
|
|
110831
111011
|
/** An object capable of communicating with the backend to convert between coordinates in a geographic coordinate system and coordinates in an [[IModelConnection]]'s own coordinate system.
|
|
111012
|
+
* Conversion results retain the backend's per-point status, including failed vertical conversions. Check each status
|
|
111013
|
+
* before using elevations; [[GeoCoordStatus.VerticalDatumConvertError]] does not provide a reliable converted Z.
|
|
111014
|
+
* Results, including failures, are cached in this converter. Loading grids does not invalidate those cached results.
|
|
111015
|
+
* To retry after resources become available, finish outstanding requests and acquire a fresh converter from
|
|
111016
|
+
* [[GeoServices.getConverter]] instead of reusing the retained instance.
|
|
110832
111017
|
* @see [[GeoServices.getConverter]] to obtain a converter.
|
|
110833
111018
|
* @see [GeographicCRS]($common) for more information about geographic coordinate reference systems.
|
|
110834
111019
|
* @public
|
|
110835
111020
|
*/
|
|
110836
111021
|
class GeoConverter {
|
|
110837
|
-
|
|
110838
|
-
|
|
111022
|
+
_converters;
|
|
111023
|
+
_gcs;
|
|
111024
|
+
_options;
|
|
110839
111025
|
/** Used for removing this converter from GeoServices' cache after all requests are completed.
|
|
110840
111026
|
* @internal
|
|
110841
111027
|
*/
|
|
110842
111028
|
onAllRequestsCompleted = new _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BeEvent();
|
|
110843
111029
|
/** @internal */
|
|
110844
111030
|
constructor(opts) {
|
|
111031
|
+
this._options = opts;
|
|
111032
|
+
this._gcs = opts.getGcs?.();
|
|
111033
|
+
this._converters = this.createConverters();
|
|
111034
|
+
}
|
|
111035
|
+
createConverters() {
|
|
111036
|
+
const opts = this._options;
|
|
110845
111037
|
const isIModelClosed = opts.isIModelClosed;
|
|
110846
|
-
|
|
110847
|
-
|
|
110848
|
-
|
|
110849
|
-
|
|
110850
|
-
|
|
110851
|
-
|
|
110852
|
-
|
|
110853
|
-
|
|
110854
|
-
|
|
110855
|
-
|
|
111038
|
+
return {
|
|
111039
|
+
geoToIModel: new CoordinateConverter({
|
|
111040
|
+
direction: "geoToIModel",
|
|
111041
|
+
isIModelClosed,
|
|
111042
|
+
requestPoints: async (geoCoords) => opts.toIModelCoords({ source: opts.datum, geoCoords }),
|
|
111043
|
+
}),
|
|
111044
|
+
iModelToGeo: new CoordinateConverter({
|
|
111045
|
+
direction: "iModelToGeo",
|
|
111046
|
+
isIModelClosed,
|
|
111047
|
+
requestPoints: async (iModelCoords) => opts.fromIModelCoords({ target: opts.datum, iModelCoords }),
|
|
111048
|
+
}),
|
|
111049
|
+
};
|
|
111050
|
+
}
|
|
111051
|
+
refreshGcs() {
|
|
111052
|
+
const gcs = this._options.getGcs?.();
|
|
111053
|
+
if (gcs !== this._gcs) {
|
|
111054
|
+
this._gcs = gcs;
|
|
111055
|
+
this._converters = this.createConverters();
|
|
111056
|
+
}
|
|
111057
|
+
}
|
|
111058
|
+
async convert(points, direction) {
|
|
111059
|
+
for (;;) {
|
|
111060
|
+
this.refreshGcs();
|
|
111061
|
+
const converter = this._converters[direction];
|
|
111062
|
+
const result = await converter.convert(points);
|
|
111063
|
+
this.refreshGcs();
|
|
111064
|
+
if (converter !== this._converters[direction])
|
|
111065
|
+
continue;
|
|
111066
|
+
this.checkCompletion();
|
|
111067
|
+
return result;
|
|
111068
|
+
}
|
|
110856
111069
|
}
|
|
110857
111070
|
/** Convert the specified geographic coordinates into iModel coordinates. */
|
|
110858
111071
|
async convertToIModelCoords(geoPoints) {
|
|
@@ -110866,8 +111079,7 @@ class GeoConverter {
|
|
|
110866
111079
|
}
|
|
110867
111080
|
/** @internal */
|
|
110868
111081
|
async getIModelCoordinatesFromGeoCoordinates(geoPoints) {
|
|
110869
|
-
const result = await this.
|
|
110870
|
-
this.checkCompletion();
|
|
111082
|
+
const result = await this.convert(geoPoints, "geoToIModel");
|
|
110871
111083
|
return {
|
|
110872
111084
|
iModelCoords: result.points,
|
|
110873
111085
|
fromCache: result.fromCache,
|
|
@@ -110875,20 +111087,20 @@ class GeoConverter {
|
|
|
110875
111087
|
}
|
|
110876
111088
|
/** @internal */
|
|
110877
111089
|
async getGeoCoordinatesFromIModelCoordinates(iModelPoints) {
|
|
110878
|
-
const result = await this.
|
|
110879
|
-
this.checkCompletion();
|
|
111090
|
+
const result = await this.convert(iModelPoints, "iModelToGeo");
|
|
110880
111091
|
return {
|
|
110881
111092
|
geoCoords: result.points,
|
|
110882
111093
|
fromCache: result.fromCache,
|
|
110883
111094
|
};
|
|
110884
111095
|
}
|
|
110885
111096
|
checkCompletion() {
|
|
110886
|
-
if (this.
|
|
111097
|
+
if (this._converters.geoToIModel.isIdle && this._converters.iModelToGeo.isIdle)
|
|
110887
111098
|
this.onAllRequestsCompleted.raiseEvent();
|
|
110888
111099
|
}
|
|
110889
111100
|
/** @internal */
|
|
110890
111101
|
getCachedIModelCoordinatesFromGeoCoordinates(geoPoints) {
|
|
110891
|
-
|
|
111102
|
+
this.refreshGcs();
|
|
111103
|
+
return this._converters.geoToIModel.findCached(geoPoints);
|
|
110892
111104
|
}
|
|
110893
111105
|
}
|
|
110894
111106
|
/** The Geographic Services available for an [[IModelConnection]].
|
|
@@ -110916,6 +111128,7 @@ class GeoServices {
|
|
|
110916
111128
|
static createForIModel(iModel) {
|
|
110917
111129
|
return new GeoServices({
|
|
110918
111130
|
isIModelClosed: () => iModel.isClosed,
|
|
111131
|
+
getGcs: () => iModel.geographicCoordinateSystem,
|
|
110919
111132
|
toIModelCoords: async (request) => {
|
|
110920
111133
|
const rpc = _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.IModelReadRpcInterface.getClientForRouting(iModel.routingContext.token);
|
|
110921
111134
|
const response = await rpc.getIModelCoordinatesFromGeoCoordinates(iModel.getRpcProps(), request);
|
|
@@ -113041,6 +113254,25 @@ class IModelConnection extends _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.I
|
|
|
113041
113254
|
async generateElementMeshes(requestProps) {
|
|
113042
113255
|
return _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.IModelReadRpcInterface.getClientForRouting(this.routingContext.token).generateElementMeshes(this.getRpcProps(), requestProps);
|
|
113043
113256
|
}
|
|
113257
|
+
/** Constructs a point after validating raw ordinates, before JSON normalization can conceal NaN.
|
|
113258
|
+
* Omitted ordinates default to zero.
|
|
113259
|
+
* @throws IModelError with GeoServiceStatus.CSMapError if any supplied ordinate is non-finite.
|
|
113260
|
+
* @internal
|
|
113261
|
+
*/
|
|
113262
|
+
static getFiniteGeoPoint(props) {
|
|
113263
|
+
const coordinates = Array.isArray(props) ? props : [props.x, props.y, props.z];
|
|
113264
|
+
for (let index = 0; index < 3; ++index) {
|
|
113265
|
+
// RPC marshaling converts NaN and infinities to null; reject null rather than defaulting it to zero.
|
|
113266
|
+
if (!Number.isFinite(coordinates[index] === undefined ? 0 : coordinates[index])) {
|
|
113267
|
+
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logError(loggerCategory, "Non-finite coordinate returned by geographic conversion", {
|
|
113268
|
+
ordinateIndex: index,
|
|
113269
|
+
coordinates: coordinates.map((ordinate) => String(ordinate)),
|
|
113270
|
+
});
|
|
113271
|
+
throw new _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.IModelError(_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.GeoServiceStatus.CSMapError, "Non-finite coordinate returned by geographic conversion");
|
|
113272
|
+
}
|
|
113273
|
+
}
|
|
113274
|
+
return _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Point3d.fromJSON(props);
|
|
113275
|
+
}
|
|
113044
113276
|
/** Convert a point in this iModel's Spatial coordinates to a [[Cartographic]] using the Geographic location services for this IModelConnection.
|
|
113045
113277
|
* @param spatial A point in the iModel's spatial coordinates
|
|
113046
113278
|
* @param result If defined, use this for output
|
|
@@ -113059,7 +113291,7 @@ class IModelConnection extends _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.I
|
|
|
113059
113291
|
const geoServiceStatus = (0,_itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.mapToGeoServiceStatus)(coordResponse.geoCoords[0].s);
|
|
113060
113292
|
throw new _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.IModelError(geoServiceStatus, "Error converting spatial to cartographic");
|
|
113061
113293
|
}
|
|
113062
|
-
const longLatHeight =
|
|
113294
|
+
const longLatHeight = IModelConnection.getFiniteGeoPoint(coordResponse.geoCoords[0].p); // x is longitude in degrees, y is latitude in degrees, z is height in meters...
|
|
113063
113295
|
return _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.Cartographic.fromDegrees({ longitude: longLatHeight.x, latitude: longLatHeight.y, height: longLatHeight.z }, result);
|
|
113064
113296
|
}
|
|
113065
113297
|
/** Convert a point in this iModel's Spatial coordinates to a [[Cartographic]] using the Geographic location services for this IModelConnection or [[IModel.ecefLocation]].
|
|
@@ -113113,7 +113345,7 @@ class IModelConnection extends _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.I
|
|
|
113113
113345
|
case _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.GeoCoordStatus.NoGCSDefined:
|
|
113114
113346
|
throw new _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.IModelError(_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.GeoServiceStatus.NoGeoLocation, "iModel is not GeoLocated");
|
|
113115
113347
|
case _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.GeoCoordStatus.Success:
|
|
113116
|
-
const llh =
|
|
113348
|
+
const llh = IModelConnection.getFiniteGeoPoint(coord.p);
|
|
113117
113349
|
return _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.Cartographic.fromDegrees({ longitude: llh.x, latitude: llh.y, height: llh.z });
|
|
113118
113350
|
default:
|
|
113119
113351
|
throw new _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.IModelError((0,_itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.mapToGeoServiceStatus)(coord.s), "Error converting spatial to cartographic");
|
|
@@ -113140,7 +113372,7 @@ class IModelConnection extends _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.I
|
|
|
113140
113372
|
throw new _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.IModelError(geoServiceStatus, "Error converting cartographic to spatial");
|
|
113141
113373
|
}
|
|
113142
113374
|
result = result ? result : _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Point3d.createZero();
|
|
113143
|
-
result.
|
|
113375
|
+
result.setFrom(IModelConnection.getFiniteGeoPoint(coordResponse.iModelCoords[0].p));
|
|
113144
113376
|
return result;
|
|
113145
113377
|
}
|
|
113146
113378
|
/** Convert a [Cartographic]($common) to a point in this iModel's Spatial coordinates using a [[GeoConverter]] or[[IModel.ecefLocation]($common).
|
|
@@ -113190,7 +113422,7 @@ class IModelConnection extends _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.I
|
|
|
113190
113422
|
case _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.GeoCoordStatus.NoGCSDefined:
|
|
113191
113423
|
throw new _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.IModelError(_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.GeoServiceStatus.NoGeoLocation, "iModel is not GeoLocated");
|
|
113192
113424
|
case _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.GeoCoordStatus.Success:
|
|
113193
|
-
return
|
|
113425
|
+
return IModelConnection.getFiniteGeoPoint(coord.p);
|
|
113194
113426
|
default:
|
|
113195
113427
|
throw new _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.IModelError((0,_itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.mapToGeoServiceStatus)(coord.s), "Error converting cartographic to spatial");
|
|
113196
113428
|
}
|
|
@@ -113526,7 +113758,7 @@ class SnapshotConnection extends IModelConnection {
|
|
|
113526
113758
|
/** @internal */
|
|
113527
113759
|
async getDictionaryModel() {
|
|
113528
113760
|
const res = await this._iModel.models.queryProps({ from: "bis.DictionaryModel", wantPrivate: true });
|
|
113529
|
-
if (res.length !== 1
|
|
113761
|
+
if (res.length !== 1)
|
|
113530
113762
|
throw new _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.IModelError(_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.IModelStatus.BadModel, "bis.DictionaryModel");
|
|
113531
113763
|
return res[0].id;
|
|
113532
113764
|
}
|
|
@@ -137061,6 +137293,7 @@ const extensionExports = {
|
|
|
137061
137293
|
imageBufferToPngDataUrl: _core_frontend__WEBPACK_IMPORTED_MODULE_1__.imageBufferToPngDataUrl,
|
|
137062
137294
|
imageElementFromImageSource: _core_frontend__WEBPACK_IMPORTED_MODULE_1__.imageElementFromImageSource,
|
|
137063
137295
|
imageElementFromUrl: _core_frontend__WEBPACK_IMPORTED_MODULE_1__.imageElementFromUrl,
|
|
137296
|
+
isPersisted: _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.isPersisted,
|
|
137064
137297
|
queryTerrainElevationOffset: _core_frontend__WEBPACK_IMPORTED_MODULE_1__.queryTerrainElevationOffset,
|
|
137065
137298
|
readElementGraphics: _core_frontend__WEBPACK_IMPORTED_MODULE_1__.readElementGraphics,
|
|
137066
137299
|
readGltfGraphics: _core_frontend__WEBPACK_IMPORTED_MODULE_1__.readGltfGraphics,
|
|
@@ -174181,9 +174414,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
174181
174414
|
/* harmony import */ var _common_FrontendLoggerCategory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/FrontendLoggerCategory */ "../../core/frontend/lib/esm/common/FrontendLoggerCategory.js");
|
|
174182
174415
|
/* harmony import */ var _DisplayStyleState__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../DisplayStyleState */ "../../core/frontend/lib/esm/DisplayStyleState.js");
|
|
174183
174416
|
/* harmony import */ var _IModelApp__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../IModelApp */ "../../core/frontend/lib/esm/IModelApp.js");
|
|
174184
|
-
/* harmony import */ var
|
|
174185
|
-
/* harmony import */ var
|
|
174186
|
-
/* harmony import */ var
|
|
174417
|
+
/* harmony import */ var _IModelConnection__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../IModelConnection */ "../../core/frontend/lib/esm/IModelConnection.js");
|
|
174418
|
+
/* harmony import */ var _RealityDataSource__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../RealityDataSource */ "../../core/frontend/lib/esm/RealityDataSource.js");
|
|
174419
|
+
/* harmony import */ var _common_internal_render_MeshPrimitives__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../common/internal/render/MeshPrimitives */ "../../core/frontend/lib/esm/common/internal/render/MeshPrimitives.js");
|
|
174420
|
+
/* harmony import */ var _tile_internal__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../tile/internal */ "../../core/frontend/lib/esm/tile/internal.js");
|
|
174187
174421
|
/*---------------------------------------------------------------------------------------------
|
|
174188
174422
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
174189
174423
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -174202,6 +174436,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
174202
174436
|
|
|
174203
174437
|
|
|
174204
174438
|
|
|
174439
|
+
|
|
174205
174440
|
const scratchRange = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Range3d.create();
|
|
174206
174441
|
const scratchWorldFrustum = new _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.Frustum();
|
|
174207
174442
|
function compareSourceKeys(lhs, rhs) {
|
|
@@ -174265,7 +174500,7 @@ class OrbitGtTileTreeParams {
|
|
|
174265
174500
|
id;
|
|
174266
174501
|
modelId;
|
|
174267
174502
|
iModel;
|
|
174268
|
-
get priority() { return
|
|
174503
|
+
get priority() { return _tile_internal__WEBPACK_IMPORTED_MODULE_11__.TileLoadPriority.Context; }
|
|
174269
174504
|
constructor(rdSourceKey, iModel, modelId, location) {
|
|
174270
174505
|
this.location = location;
|
|
174271
174506
|
const key = rdSourceKey;
|
|
@@ -174274,7 +174509,7 @@ class OrbitGtTileTreeParams {
|
|
|
174274
174509
|
this.iModel = iModel;
|
|
174275
174510
|
}
|
|
174276
174511
|
}
|
|
174277
|
-
class OrbitGtRootTile extends
|
|
174512
|
+
class OrbitGtRootTile extends _tile_internal__WEBPACK_IMPORTED_MODULE_11__.Tile {
|
|
174278
174513
|
_loadChildren(_resolve, _reject) { }
|
|
174279
174514
|
async requestContent(_isCanceled) { return undefined; }
|
|
174280
174515
|
get channel() { return _IModelApp__WEBPACK_IMPORTED_MODULE_7__.IModelApp.tileAdmin.channels.getForHttp("itwinjs-orbitgit"); }
|
|
@@ -174347,7 +174582,7 @@ class TileSortProjector {
|
|
|
174347
174582
|
coordinate.z = point.z;
|
|
174348
174583
|
}
|
|
174349
174584
|
}
|
|
174350
|
-
class OrbitGtTileGraphic extends
|
|
174585
|
+
class OrbitGtTileGraphic extends _tile_internal__WEBPACK_IMPORTED_MODULE_11__.TileUsageMarker {
|
|
174351
174586
|
graphic;
|
|
174352
174587
|
constructor(graphic, viewport, time) {
|
|
174353
174588
|
super();
|
|
@@ -174358,7 +174593,7 @@ class OrbitGtTileGraphic extends _tile_internal__WEBPACK_IMPORTED_MODULE_10__.Ti
|
|
|
174358
174593
|
this.graphic[Symbol.dispose]();
|
|
174359
174594
|
}
|
|
174360
174595
|
}
|
|
174361
|
-
class OrbitGtTileTree extends
|
|
174596
|
+
class OrbitGtTileTree extends _tile_internal__WEBPACK_IMPORTED_MODULE_11__.TileTree {
|
|
174362
174597
|
_dataManager;
|
|
174363
174598
|
_centerOffset;
|
|
174364
174599
|
_ecefTransform;
|
|
@@ -174374,7 +174609,7 @@ class OrbitGtTileTree extends _tile_internal__WEBPACK_IMPORTED_MODULE_10__.TileT
|
|
|
174374
174609
|
this._dataManager = _dataManager;
|
|
174375
174610
|
this._centerOffset = _centerOffset;
|
|
174376
174611
|
this._ecefTransform = _ecefTransform;
|
|
174377
|
-
this._layerHandler = new
|
|
174612
|
+
this._layerHandler = new _tile_internal__WEBPACK_IMPORTED_MODULE_11__.LayerTileTreeHandler(this);
|
|
174378
174613
|
this._tileParams = { contentId: "0", range: cloudRange, maximumSize: 256 };
|
|
174379
174614
|
this.rootTile = new OrbitGtRootTile(this._tileParams, this);
|
|
174380
174615
|
}
|
|
@@ -174444,7 +174679,7 @@ class OrbitGtTileTree extends _tile_internal__WEBPACK_IMPORTED_MODULE_10__.TileT
|
|
|
174444
174679
|
range.high.addInPlace(this._centerOffset);
|
|
174445
174680
|
const qParams = _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.QParams3d.fromRange(range, undefined, (tile.points8 != null) ? _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.Quantization.rangeScale8 : _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.Quantization.rangeScale16);
|
|
174446
174681
|
const featureTable = new _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.FeatureTable(1, this.modelId, _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.BatchType.Primary);
|
|
174447
|
-
const features = new
|
|
174682
|
+
const features = new _common_internal_render_MeshPrimitives__WEBPACK_IMPORTED_MODULE_10__.Mesh.Features(featureTable);
|
|
174448
174683
|
const system = _IModelApp__WEBPACK_IMPORTED_MODULE_7__.IModelApp.renderSystem;
|
|
174449
174684
|
const voxelSize = (range.high.x - range.low.x) / 64;
|
|
174450
174685
|
features.add(new _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.Feature(this.modelId), 1);
|
|
@@ -174519,7 +174754,17 @@ async function computeVerticalDatumShift(geoOrigin, heightAsEllipsoidalDbZ, iMod
|
|
|
174519
174754
|
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logWarning(_common_FrontendLoggerCategory__WEBPACK_IMPORTED_MODULE_5__.FrontendLoggerCategory.RealityData, `Failed to compute orthometric height correction for point cloud (status ${response.iModelCoords[0].s}); heights will be treated as ellipsoidal`);
|
|
174520
174755
|
return 0;
|
|
174521
174756
|
}
|
|
174522
|
-
|
|
174757
|
+
try {
|
|
174758
|
+
const converted = _IModelConnection__WEBPACK_IMPORTED_MODULE_8__.IModelConnection.getFiniteGeoPoint(response.iModelCoords[0].p);
|
|
174759
|
+
const shift = converted.z - heightAsEllipsoidalDbZ;
|
|
174760
|
+
if (!Number.isFinite(shift))
|
|
174761
|
+
throw new Error("Non-finite orthometric height correction");
|
|
174762
|
+
return shift;
|
|
174763
|
+
}
|
|
174764
|
+
catch {
|
|
174765
|
+
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logWarning(_common_FrontendLoggerCategory__WEBPACK_IMPORTED_MODULE_5__.FrontendLoggerCategory.RealityData, "Non-finite orthometric height correction for point cloud; heights will be treated as ellipsoidal");
|
|
174766
|
+
return 0;
|
|
174767
|
+
}
|
|
174523
174768
|
}
|
|
174524
174769
|
catch (err) {
|
|
174525
174770
|
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logError(_common_FrontendLoggerCategory__WEBPACK_IMPORTED_MODULE_5__.FrontendLoggerCategory.RealityData, err);
|
|
@@ -174549,7 +174794,7 @@ async function computeVerticalDatumShift(geoOrigin, heightAsEllipsoidalDbZ, iMod
|
|
|
174549
174794
|
return isValidSASToken(props.sasToken);
|
|
174550
174795
|
}
|
|
174551
174796
|
async function createOrbitGtTileTree(rdSourceKey, iModel, modelId) {
|
|
174552
|
-
const rdSource = await
|
|
174797
|
+
const rdSource = await _RealityDataSource__WEBPACK_IMPORTED_MODULE_9__.RealityDataSource.fromKey(rdSourceKey, iModel.iTwinId);
|
|
174553
174798
|
const isContextShare = rdSourceKey.provider === _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.RealityDataProvider.ContextShare;
|
|
174554
174799
|
const isTilestUrl = rdSourceKey.provider === _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.RealityDataProvider.TilesetUrl;
|
|
174555
174800
|
let blobStringUrl;
|
|
@@ -174568,7 +174813,7 @@ async function computeVerticalDatumShift(geoOrigin, heightAsEllipsoidalDbZ, iMod
|
|
|
174568
174813
|
blobStringUrl = rdSourceKey.id;
|
|
174569
174814
|
}
|
|
174570
174815
|
else {
|
|
174571
|
-
const orbitGtBlobProps =
|
|
174816
|
+
const orbitGtBlobProps = _RealityDataSource__WEBPACK_IMPORTED_MODULE_9__.RealityDataSource.createOrbitGtBlobPropsFromKey(rdSourceKey);
|
|
174572
174817
|
if (orbitGtBlobProps === undefined)
|
|
174573
174818
|
return undefined;
|
|
174574
174819
|
if (!isValidOrbitGtBlobProps(orbitGtBlobProps))
|
|
@@ -174657,7 +174902,7 @@ async function computeVerticalDatumShift(geoOrigin, heightAsEllipsoidalDbZ, iMod
|
|
|
174657
174902
|
/** Supplies a reality data [[TileTree]] from a URL. May be associated with a persistent [[GeometricModelState]], or attached at run-time via a [[ContextOrbitGtState]].
|
|
174658
174903
|
* Exported strictly for tests.
|
|
174659
174904
|
*/
|
|
174660
|
-
class OrbitGtTreeReference extends
|
|
174905
|
+
class OrbitGtTreeReference extends _tile_internal__WEBPACK_IMPORTED_MODULE_11__.RealityModelTileTree.Reference {
|
|
174661
174906
|
treeOwner;
|
|
174662
174907
|
_rdSourceKey;
|
|
174663
174908
|
_modelId;
|
|
@@ -174670,11 +174915,11 @@ class OrbitGtTreeReference extends _tile_internal__WEBPACK_IMPORTED_MODULE_10__.
|
|
|
174670
174915
|
this._rdSourceKey = props.rdSourceKey;
|
|
174671
174916
|
}
|
|
174672
174917
|
else if (props.orbitGtBlob) {
|
|
174673
|
-
this._rdSourceKey =
|
|
174918
|
+
this._rdSourceKey = _RealityDataSource__WEBPACK_IMPORTED_MODULE_9__.RealityDataSource.createKeyFromOrbitGtBlobProps(props.orbitGtBlob);
|
|
174674
174919
|
}
|
|
174675
174920
|
else {
|
|
174676
174921
|
// TODO: Maybe we should throw an exception
|
|
174677
|
-
this._rdSourceKey =
|
|
174922
|
+
this._rdSourceKey = _RealityDataSource__WEBPACK_IMPORTED_MODULE_9__.RealityDataSource.createKeyFromBlobUrl("", _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.RealityDataProvider.OrbitGtBlob, _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.RealityDataFormat.OPC);
|
|
174678
174923
|
}
|
|
174679
174924
|
// ###TODO find compatible model Id
|
|
174680
174925
|
let modelId = props.modelId;
|
|
@@ -181673,7 +181918,12 @@ var QuantityType;
|
|
|
181673
181918
|
class AlternateUnitLabelsRegistry {
|
|
181674
181919
|
_alternateLabelRegistry = new Map();
|
|
181675
181920
|
addAlternateLabels(key, ...labels) {
|
|
181676
|
-
|
|
181921
|
+
let entry = this._alternateLabelRegistry.get(key);
|
|
181922
|
+
if (!entry) {
|
|
181923
|
+
entry = new Set();
|
|
181924
|
+
this._alternateLabelRegistry.set(key, entry);
|
|
181925
|
+
}
|
|
181926
|
+
labels.forEach((value) => entry.add(value));
|
|
181677
181927
|
}
|
|
181678
181928
|
constructor(defaultAlternates) {
|
|
181679
181929
|
if (defaultAlternates) {
|
|
@@ -182476,7 +182726,7 @@ class QuantityFormatter {
|
|
|
182476
182726
|
const entry = this.quantityTypesRegistry.get(quantityKey);
|
|
182477
182727
|
if (!entry)
|
|
182478
182728
|
throw new Error(`Unable to find registered quantity type with key ${quantityKey}`);
|
|
182479
|
-
return entry.generateParserSpec(this.getFormatPropsByQuantityTypeEntryAndSystem(entry, requestedSystem), this.unitsProvider);
|
|
182729
|
+
return entry.generateParserSpec(this.getFormatPropsByQuantityTypeEntryAndSystem(entry, requestedSystem), this.unitsProvider, this.alternateUnitLabelsProvider);
|
|
182480
182730
|
}
|
|
182481
182731
|
/** Asynchronous Call to get a ParserSpec for a QuantityType.
|
|
182482
182732
|
* @param type One of the built-in quantity types supported.
|
|
@@ -182624,7 +182874,7 @@ class QuantityFormatter {
|
|
|
182624
182874
|
const { persistenceUnitName, formatProps, formatName } = props;
|
|
182625
182875
|
const persistenceUnitProps = await this._unitsProvider.findUnitByName(persistenceUnitName);
|
|
182626
182876
|
const format = await _itwin_core_quantity__WEBPACK_IMPORTED_MODULE_1__.Format.createFromJSON(formatName ?? "temp", this._unitsProvider, formatProps);
|
|
182627
|
-
return _itwin_core_quantity__WEBPACK_IMPORTED_MODULE_1__.ParserSpec.create(format, this._unitsProvider, persistenceUnitProps);
|
|
182877
|
+
return _itwin_core_quantity__WEBPACK_IMPORTED_MODULE_1__.ParserSpec.create(format, this._unitsProvider, persistenceUnitProps, this.alternateUnitLabelsProvider);
|
|
182628
182878
|
}
|
|
182629
182879
|
/**
|
|
182630
182880
|
* @beta
|
|
@@ -183166,6 +183416,9 @@ const UNIT_EXTRA_DATA = [
|
|
|
183166
183416
|
{ name: "Units.CUB_US_SURVEY_FT", altDisplayLabels: ["cf"] },
|
|
183167
183417
|
{ name: "Units.CUB_YRD", altDisplayLabels: ["cy"] },
|
|
183168
183418
|
{ name: "Units.CUB_M", altDisplayLabels: ["cm"] },
|
|
183419
|
+
// Velocity ( base unit m/s )
|
|
183420
|
+
{ name: "Units.KM_PER_HR", altDisplayLabels: ["kph", "kmh"] },
|
|
183421
|
+
{ name: "Units.MPH", altDisplayLabels: ["mph"] },
|
|
183169
183422
|
];
|
|
183170
183423
|
|
|
183171
183424
|
|
|
@@ -316496,7 +316749,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
316496
316749
|
/* harmony export */ });
|
|
316497
316750
|
/* harmony import */ var i18next__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! i18next */ "../../common/temp/node_modules/.pnpm/i18next@21.10.0/node_modules/i18next/dist/esm/i18next.js");
|
|
316498
316751
|
/* harmony import */ var i18next_browser_languagedetector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! i18next-browser-languagedetector */ "../../common/temp/node_modules/.pnpm/i18next-browser-languagedetector@6.1.8/node_modules/i18next-browser-languagedetector/dist/esm/i18nextBrowserLanguageDetector.js");
|
|
316499
|
-
/* harmony import */ var i18next_http_backend__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! i18next-http-backend */ "../../common/temp/node_modules/.pnpm/i18next-http-backend@
|
|
316752
|
+
/* harmony import */ var i18next_http_backend__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! i18next-http-backend */ "../../common/temp/node_modules/.pnpm/i18next-http-backend@4.0.5/node_modules/i18next-http-backend/esm/index.js");
|
|
316500
316753
|
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
316501
316754
|
/*---------------------------------------------------------------------------------------------
|
|
316502
316755
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
@@ -337211,7 +337464,16 @@ class Parser {
|
|
|
337211
337464
|
// Don't add space when the wip token is empty.
|
|
337212
337465
|
continue;
|
|
337213
337466
|
}
|
|
337214
|
-
|
|
337467
|
+
// A slash directly between two label characters (e.g. "km/h") is part of the label, not a division.
|
|
337468
|
+
const nextCharCode = str.charCodeAt(i + 1);
|
|
337469
|
+
const isUnitLabelSlash = charCode === _Constants__WEBPACK_IMPORTED_MODULE_1__.QuantityConstants.CHAR_SLASH &&
|
|
337470
|
+
wipToken.length > 0 &&
|
|
337471
|
+
i + 1 < str.length &&
|
|
337472
|
+
!/\s/.test(str[i - 1]) &&
|
|
337473
|
+
!/\s/.test(str[i + 1]) &&
|
|
337474
|
+
!Parser.isDigitOrDecimalSeparator(nextCharCode, format) &&
|
|
337475
|
+
!isOperator(nextCharCode);
|
|
337476
|
+
if (isCharOperator && !isUnitLabelSlash) {
|
|
337215
337477
|
if (wipToken.length > 0) {
|
|
337216
337478
|
// There is a token is progress, process it now, before adding the new operator token.
|
|
337217
337479
|
tokens.push(new ParseToken(wipToken));
|
|
@@ -337381,11 +337643,18 @@ class Parser {
|
|
|
337381
337643
|
}
|
|
337382
337644
|
return undefined;
|
|
337383
337645
|
}
|
|
337646
|
+
/** Get the Unit Conversion for a known unit. Matches by unit name first because labels can differ between units providers
|
|
337647
|
+
* (e.g. an unlabeled schema unit may have an empty label in one provider and a name-derived label in another). Falls back to label lookup.
|
|
337648
|
+
*/
|
|
337649
|
+
static tryFindUnitConversionForUnit(unit, unitsConversions) {
|
|
337650
|
+
const byName = unitsConversions.find((conversion) => conversion.name === unit.name);
|
|
337651
|
+
return byName ? byName.conversion : Parser.tryFindUnitConversion(unit.label, unitsConversions, unit);
|
|
337652
|
+
}
|
|
337384
337653
|
/**
|
|
337385
337654
|
* Get what the unit conversion is for a unitless value.
|
|
337386
337655
|
*/
|
|
337387
337656
|
static getDefaultUnitConversion(tokens, unitsConversions, defaultUnit) {
|
|
337388
|
-
let unitConversion = defaultUnit ? Parser.
|
|
337657
|
+
let unitConversion = defaultUnit ? Parser.tryFindUnitConversionForUnit(defaultUnit, unitsConversions) : undefined;
|
|
337389
337658
|
if (!unitConversion) {
|
|
337390
337659
|
// No default unit conversion, take the first valid unit.
|
|
337391
337660
|
const uniqueUnitLabels = [...new Set(tokens.filter((token) => token.isString).map((token) => token.value))];
|
|
@@ -337505,7 +337774,7 @@ class Parser {
|
|
|
337505
337774
|
if (compositeUnitIndex > 0 && format.units && format.units.length > compositeUnitIndex) {
|
|
337506
337775
|
// if this is not the first token, and we have a composite spec, look up the unit from the current index
|
|
337507
337776
|
const presUnitAtIndex = format.units[compositeUnitIndex][0];
|
|
337508
|
-
conversion = Parser.
|
|
337777
|
+
conversion = Parser.tryFindUnitConversionForUnit(presUnitAtIndex, unitsConversions);
|
|
337509
337778
|
}
|
|
337510
337779
|
else if (defaultUnitConversion) {
|
|
337511
337780
|
conversion = defaultUnitConversion;
|
|
@@ -337798,7 +338067,7 @@ class Parser {
|
|
|
337798
338067
|
}
|
|
337799
338068
|
// Original flow for 1-unit composite - use Quantity.convertTo for proper unit conversion
|
|
337800
338069
|
const defaultUnit = spec.format.units && spec.format.units.length > 0 ? spec.format.units[0][0] : undefined;
|
|
337801
|
-
const unitConversion = defaultUnit ? Parser.
|
|
338070
|
+
const unitConversion = defaultUnit ? Parser.tryFindUnitConversionForUnit(defaultUnit, spec.unitConversions) : undefined;
|
|
337802
338071
|
if (!unitConversion) {
|
|
337803
338072
|
throw new _Exception__WEBPACK_IMPORTED_MODULE_2__.QuantityError(_Exception__WEBPACK_IMPORTED_MODULE_2__.QuantityStatus.MissingRequiredProperty, `Missing input unit or unit conversion for interpreting ${spec.format.name}.`);
|
|
337804
338073
|
}
|
|
@@ -344174,7 +344443,7 @@ class TestContext {
|
|
|
344174
344443
|
this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
|
|
344175
344444
|
const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
|
|
344176
344445
|
await core_frontend_1.NoRenderApp.startup({
|
|
344177
|
-
applicationVersion: "5.
|
|
344446
|
+
applicationVersion: "5.16.0-dev.2",
|
|
344178
344447
|
applicationId: this.settings.gprid,
|
|
344179
344448
|
authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.serviceAuthToken),
|
|
344180
344449
|
hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
|
|
@@ -348655,6 +348924,32 @@ class KoqPropertyValueFormatter {
|
|
|
348655
348924
|
}
|
|
348656
348925
|
return formatterSpec.applyFormatting(value);
|
|
348657
348926
|
}
|
|
348927
|
+
/**
|
|
348928
|
+
* Creates a formatter that reuses formatter specs for repeated formatting options.
|
|
348929
|
+
* Each call creates an independent cache that lasts as long as the returned formatter.
|
|
348930
|
+
* Cached specs and missing-format results are not invalidated by changes to formats,
|
|
348931
|
+
* default formats, or schemas. Create a new formatter to pick up those changes.
|
|
348932
|
+
* Failed spec lookups are not cached and may be retried by subsequent calls.
|
|
348933
|
+
* @returns A formatter with its own cache, suitable for a single content-formatting operation.
|
|
348934
|
+
*/
|
|
348935
|
+
createCachedFormatter() {
|
|
348936
|
+
const specs = new Map();
|
|
348937
|
+
return {
|
|
348938
|
+
format: async (value, options) => {
|
|
348939
|
+
const key = JSON.stringify([options.koqName, options.unitSystem, Object.entries(options.formatOverride ?? {})]);
|
|
348940
|
+
let specPromise = specs.get(key);
|
|
348941
|
+
if (!specPromise) {
|
|
348942
|
+
specPromise = this.getFormatterSpec(options).catch((error) => {
|
|
348943
|
+
specs.delete(key);
|
|
348944
|
+
throw error;
|
|
348945
|
+
});
|
|
348946
|
+
specs.set(key, specPromise);
|
|
348947
|
+
}
|
|
348948
|
+
const spec = await specPromise;
|
|
348949
|
+
return spec?.applyFormatting(value);
|
|
348950
|
+
},
|
|
348951
|
+
};
|
|
348952
|
+
}
|
|
348658
348953
|
async getFormatterSpec(options) {
|
|
348659
348954
|
const formattingProps = await this.#getFormattingProps(options);
|
|
348660
348955
|
if (!formattingProps) {
|
|
@@ -348828,12 +349123,14 @@ var LabelDefinition;
|
|
|
348828
349123
|
*/
|
|
348829
349124
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
348830
349125
|
exports.LocalizationHelper = void 0;
|
|
348831
|
-
const Content_js_1 = __webpack_require__(/*! ./content/Content.js */ "../../presentation/common/lib/cjs/presentation-common/content/Content.js");
|
|
348832
|
-
const Descriptor_js_1 = __webpack_require__(/*! ./content/Descriptor.js */ "../../presentation/common/lib/cjs/presentation-common/content/Descriptor.js");
|
|
348833
349126
|
const Value_js_1 = __webpack_require__(/*! ./content/Value.js */ "../../presentation/common/lib/cjs/presentation-common/content/Value.js");
|
|
348834
349127
|
const LabelDefinition_js_1 = __webpack_require__(/*! ./LabelDefinition.js */ "../../presentation/common/lib/cjs/presentation-common/LabelDefinition.js");
|
|
348835
349128
|
const KEY_PATTERN = /@[\w\d\-_]+:[\w\d\-\._]+?@/g;
|
|
348836
|
-
/**
|
|
349129
|
+
/**
|
|
349130
|
+
* Localizes presentation data structures **in place**. Callers must pass a mutable graph owned by the current
|
|
349131
|
+
* operation and must not reuse it as untranslated data for another locale.
|
|
349132
|
+
* @internal
|
|
349133
|
+
*/
|
|
348837
349134
|
class LocalizationHelper {
|
|
348838
349135
|
_getLocalizedString;
|
|
348839
349136
|
constructor(props) {
|
|
@@ -348843,126 +349140,122 @@ class LocalizationHelper {
|
|
|
348843
349140
|
return text.replace(KEY_PATTERN, (key) => this._getLocalizedString(key.replace(/^@|@$/g, "")));
|
|
348844
349141
|
}
|
|
348845
349142
|
/* eslint-disable @typescript-eslint/no-deprecated */
|
|
348846
|
-
|
|
348847
|
-
|
|
349143
|
+
localizeNodes(nodes) {
|
|
349144
|
+
nodes.forEach((n) => this.localizeNode(n));
|
|
349145
|
+
return nodes;
|
|
348848
349146
|
}
|
|
348849
|
-
|
|
348850
|
-
|
|
348851
|
-
|
|
348852
|
-
|
|
348853
|
-
|
|
348854
|
-
|
|
349147
|
+
localizeNode(node) {
|
|
349148
|
+
this.localizeLabelDefinition(node.label);
|
|
349149
|
+
if (node.description) {
|
|
349150
|
+
node.description = this.getLocalizedString(node.description);
|
|
349151
|
+
}
|
|
349152
|
+
return node;
|
|
348855
349153
|
}
|
|
348856
|
-
|
|
348857
|
-
|
|
348858
|
-
|
|
348859
|
-
|
|
348860
|
-
children: npe.children.map((c) => this.getLocalizedNodePathElement(c)),
|
|
348861
|
-
};
|
|
349154
|
+
localizeNodePathElement(npe) {
|
|
349155
|
+
this.localizeNode(npe.node);
|
|
349156
|
+
npe.children.forEach((c) => this.localizeNodePathElement(c));
|
|
349157
|
+
return npe;
|
|
348862
349158
|
}
|
|
348863
349159
|
/* eslint-enable @typescript-eslint/no-deprecated */
|
|
348864
|
-
|
|
348865
|
-
|
|
348866
|
-
|
|
348867
|
-
displayValue: this.getLocalizedDisplayValue(group.displayValue),
|
|
348868
|
-
};
|
|
349160
|
+
localizeDisplayValueGroup(group) {
|
|
349161
|
+
group.displayValue = this.localizeDisplayValue(group.displayValue);
|
|
349162
|
+
return group;
|
|
348869
349163
|
}
|
|
348870
|
-
|
|
348871
|
-
const getLocalizedComposite = (compositeValue) => ({
|
|
348872
|
-
...compositeValue,
|
|
348873
|
-
values: compositeValue.values.map((value) => this.getLocalizedLabelDefinition(value)),
|
|
348874
|
-
});
|
|
349164
|
+
localizeLabelDefinition(labelDefinition) {
|
|
348875
349165
|
if (labelDefinition.typeName === LabelDefinition_js_1.COMPOSITE_LABEL_DEFINITION_TYPENAME) {
|
|
348876
|
-
|
|
348877
|
-
...labelDefinition,
|
|
348878
|
-
rawValue: getLocalizedComposite(labelDefinition.rawValue),
|
|
348879
|
-
};
|
|
349166
|
+
labelDefinition.rawValue.values.forEach((value) => this.localizeLabelDefinition(value));
|
|
348880
349167
|
}
|
|
348881
|
-
if (labelDefinition.typeName === "string") {
|
|
348882
|
-
|
|
348883
|
-
|
|
348884
|
-
rawValue: this.getLocalizedString(labelDefinition.rawValue),
|
|
348885
|
-
displayValue: this.getLocalizedString(labelDefinition.displayValue),
|
|
348886
|
-
};
|
|
349168
|
+
else if (labelDefinition.typeName === "string") {
|
|
349169
|
+
labelDefinition.rawValue = this.getLocalizedString(labelDefinition.rawValue);
|
|
349170
|
+
labelDefinition.displayValue = this.getLocalizedString(labelDefinition.displayValue);
|
|
348887
349171
|
}
|
|
348888
349172
|
return labelDefinition;
|
|
348889
349173
|
}
|
|
348890
|
-
|
|
348891
|
-
|
|
349174
|
+
localizeLabelDefinitions(labelDefinitions) {
|
|
349175
|
+
labelDefinitions.forEach((labelDefinition) => this.localizeLabelDefinition(labelDefinition));
|
|
349176
|
+
return labelDefinitions;
|
|
348892
349177
|
}
|
|
348893
|
-
|
|
348894
|
-
|
|
348895
|
-
|
|
348896
|
-
|
|
348897
|
-
return clone;
|
|
349178
|
+
localizeContentDescriptor(descriptor) {
|
|
349179
|
+
descriptor.fields.forEach((field) => this.localizeContentField(field));
|
|
349180
|
+
descriptor.categories.forEach((category) => this.localizeCategoryDescription(category));
|
|
349181
|
+
return descriptor;
|
|
348898
349182
|
}
|
|
348899
|
-
|
|
348900
|
-
|
|
349183
|
+
localizeContentItems(items) {
|
|
349184
|
+
items.forEach((item) => this.localizeContentItem(item));
|
|
349185
|
+
return items;
|
|
348901
349186
|
}
|
|
348902
|
-
|
|
348903
|
-
|
|
349187
|
+
localizeContent(content) {
|
|
349188
|
+
this.localizeContentDescriptor(content.descriptor);
|
|
349189
|
+
this.localizeContentItems(content.contentSet);
|
|
349190
|
+
return content;
|
|
348904
349191
|
}
|
|
348905
|
-
|
|
348906
|
-
|
|
348907
|
-
|
|
348908
|
-
label: this.getLocalizedString(elem.label),
|
|
348909
|
-
};
|
|
349192
|
+
localizeElementProperties(elem) {
|
|
349193
|
+
elem.label = this.getLocalizedString(elem.label);
|
|
349194
|
+
return elem;
|
|
348910
349195
|
}
|
|
348911
|
-
|
|
348912
|
-
|
|
348913
|
-
|
|
348914
|
-
|
|
348915
|
-
item.displayValues = Object.entries(item.displayValues).reduce((o, [k, v]) => ({ ...o, [k]: this.getLocalizedDisplayValue(v) }), {});
|
|
349196
|
+
localizeContentItem(item) {
|
|
349197
|
+
this.localizeLabelDefinition(item.label);
|
|
349198
|
+
this.localizeRawValuesDictionary(item.values);
|
|
349199
|
+
this.localizeDisplayValuesDictionary(item.displayValues);
|
|
348916
349200
|
return item;
|
|
348917
349201
|
}
|
|
348918
|
-
|
|
349202
|
+
localizeRawValuesDictionary(values) {
|
|
349203
|
+
for (const key of Object.keys(values)) {
|
|
349204
|
+
values[key] = this.localizeRawValue(values[key]);
|
|
349205
|
+
}
|
|
349206
|
+
}
|
|
349207
|
+
localizeDisplayValuesDictionary(values) {
|
|
349208
|
+
for (const key of Object.keys(values)) {
|
|
349209
|
+
values[key] = this.localizeDisplayValue(values[key]);
|
|
349210
|
+
}
|
|
349211
|
+
}
|
|
349212
|
+
localizeRawValue(value) {
|
|
348919
349213
|
if (typeof value === "string") {
|
|
348920
349214
|
return this.getLocalizedString(value);
|
|
348921
349215
|
}
|
|
348922
349216
|
if (Value_js_1.Value.isNavigationValue(value)) {
|
|
348923
|
-
|
|
348924
|
-
|
|
348925
|
-
label: this.getLocalizedLabelDefinition(value.label),
|
|
348926
|
-
};
|
|
349217
|
+
this.localizeLabelDefinition(value.label);
|
|
349218
|
+
return value;
|
|
348927
349219
|
}
|
|
348928
349220
|
if (Value_js_1.Value.isNestedContent(value)) {
|
|
348929
|
-
|
|
348930
|
-
|
|
348931
|
-
|
|
348932
|
-
|
|
348933
|
-
|
|
349221
|
+
value.forEach((item) => {
|
|
349222
|
+
this.localizeRawValuesDictionary(item.values);
|
|
349223
|
+
this.localizeDisplayValuesDictionary(item.displayValues);
|
|
349224
|
+
});
|
|
349225
|
+
return value;
|
|
348934
349226
|
}
|
|
348935
349227
|
if (Value_js_1.Value.isArray(value)) {
|
|
348936
|
-
|
|
349228
|
+
for (let i = 0; i < value.length; ++i) {
|
|
349229
|
+
value[i] = this.localizeRawValue(value[i]);
|
|
349230
|
+
}
|
|
349231
|
+
return value;
|
|
348937
349232
|
}
|
|
348938
349233
|
if (Value_js_1.Value.isMap(value)) {
|
|
348939
|
-
|
|
349234
|
+
this.localizeRawValuesDictionary(value);
|
|
348940
349235
|
}
|
|
348941
349236
|
return value;
|
|
348942
349237
|
}
|
|
348943
|
-
|
|
348944
|
-
getLocalizedContentField(field) {
|
|
349238
|
+
localizeContentField(field) {
|
|
348945
349239
|
field.label = this.getLocalizedString(field.label);
|
|
348946
349240
|
if (field.isPropertiesField()) {
|
|
348947
349241
|
if (field.isStructPropertiesField()) {
|
|
348948
|
-
field.memberFields
|
|
349242
|
+
field.memberFields.forEach((m) => this.localizeContentField(m));
|
|
348949
349243
|
}
|
|
348950
349244
|
else if (field.isArrayPropertiesField()) {
|
|
348951
|
-
|
|
349245
|
+
this.localizeContentField(field.itemsField);
|
|
348952
349246
|
}
|
|
348953
349247
|
}
|
|
348954
349248
|
else if (field.isNestedContentField()) {
|
|
348955
|
-
field.nestedFields
|
|
349249
|
+
field.nestedFields.forEach((m) => this.localizeContentField(m));
|
|
348956
349250
|
}
|
|
348957
349251
|
return field;
|
|
348958
349252
|
}
|
|
348959
|
-
|
|
348960
|
-
getLocalizedCategoryDescription(category) {
|
|
349253
|
+
localizeCategoryDescription(category) {
|
|
348961
349254
|
category.label = this.getLocalizedString(category.label);
|
|
348962
349255
|
category.description = this.getLocalizedString(category.description);
|
|
348963
349256
|
return category;
|
|
348964
349257
|
}
|
|
348965
|
-
|
|
349258
|
+
localizeDisplayValue(value) {
|
|
348966
349259
|
if (typeof value === "undefined") {
|
|
348967
349260
|
return undefined;
|
|
348968
349261
|
}
|
|
@@ -348970,9 +349263,13 @@ class LocalizationHelper {
|
|
|
348970
349263
|
return this.getLocalizedString(value);
|
|
348971
349264
|
}
|
|
348972
349265
|
if (Value_js_1.DisplayValue.isArray(value)) {
|
|
348973
|
-
|
|
349266
|
+
for (let i = 0; i < value.length; ++i) {
|
|
349267
|
+
value[i] = this.localizeDisplayValue(value[i]);
|
|
349268
|
+
}
|
|
349269
|
+
return value;
|
|
348974
349270
|
}
|
|
348975
|
-
|
|
349271
|
+
this.localizeDisplayValuesDictionary(value);
|
|
349272
|
+
return value;
|
|
348976
349273
|
}
|
|
348977
349274
|
}
|
|
348978
349275
|
exports.LocalizationHelper = LocalizationHelper;
|
|
@@ -354225,7 +354522,7 @@ class PresentationManager {
|
|
|
354225
354522
|
const result = await this._requestsHandler.getPagedNodes({ ...rpcOptions, paging });
|
|
354226
354523
|
return {
|
|
354227
354524
|
total: result.total,
|
|
354228
|
-
items: this._localizationHelper.
|
|
354525
|
+
items: this._localizationHelper.localizeNodes(result.items),
|
|
354229
354526
|
};
|
|
354230
354527
|
},
|
|
354231
354528
|
});
|
|
@@ -354274,7 +354571,7 @@ class PresentationManager {
|
|
|
354274
354571
|
const rpcOptions = this.toRpcTokenOptions({ ...options });
|
|
354275
354572
|
const result = await this._requestsHandler.getNodesDescriptor(rpcOptions);
|
|
354276
354573
|
const descriptor = presentation_common_1.Descriptor.fromJSON(result);
|
|
354277
|
-
return descriptor ? this._localizationHelper.
|
|
354574
|
+
return descriptor ? this._localizationHelper.localizeContentDescriptor(descriptor) : undefined;
|
|
354278
354575
|
}
|
|
354279
354576
|
finally {
|
|
354280
354577
|
await (0, IModelConnectionInitialization_js_1.ensureIModelInitialized)(requestOptions.imodel);
|
|
@@ -354290,7 +354587,7 @@ class PresentationManager {
|
|
|
354290
354587
|
const options = await this.addRulesetAndVariablesToOptions(requestOptions);
|
|
354291
354588
|
const rpcOptions = this.toRpcTokenOptions({ ...options });
|
|
354292
354589
|
const result = await this._requestsHandler.getNodePaths(rpcOptions);
|
|
354293
|
-
return result.map((npe) => this._localizationHelper.
|
|
354590
|
+
return result.map((npe) => this._localizationHelper.localizeNodePathElement(npe));
|
|
354294
354591
|
}
|
|
354295
354592
|
/**
|
|
354296
354593
|
* Retrieves paths from root nodes to nodes containing filter text in their label.
|
|
@@ -354301,7 +354598,7 @@ class PresentationManager {
|
|
|
354301
354598
|
(0, IModelConnectionInitialization_js_1.startIModelInitialization)(requestOptions.imodel);
|
|
354302
354599
|
const options = await this.addRulesetAndVariablesToOptions(requestOptions);
|
|
354303
354600
|
const result = await this._requestsHandler.getFilteredNodePaths(this.toRpcTokenOptions(options));
|
|
354304
|
-
return result.map((npe) => this._localizationHelper.
|
|
354601
|
+
return result.map((npe) => this._localizationHelper.localizeNodePathElement(npe));
|
|
354305
354602
|
}
|
|
354306
354603
|
/* eslint-enable @typescript-eslint/no-deprecated */
|
|
354307
354604
|
/**
|
|
@@ -354326,7 +354623,7 @@ class PresentationManager {
|
|
|
354326
354623
|
});
|
|
354327
354624
|
const result = await this._requestsHandler.getContentDescriptor(rpcOptions);
|
|
354328
354625
|
const descriptor = presentation_common_1.Descriptor.fromJSON(result);
|
|
354329
|
-
return descriptor ? this._localizationHelper.
|
|
354626
|
+
return descriptor ? this._localizationHelper.localizeContentDescriptor(descriptor) : undefined;
|
|
354330
354627
|
}
|
|
354331
354628
|
finally {
|
|
354332
354629
|
await (0, IModelConnectionInitialization_js_1.ensureIModelInitialized)(requestOptions.imodel);
|
|
@@ -354362,7 +354659,7 @@ class PresentationManager {
|
|
|
354362
354659
|
formatsProvider: core_frontend_1.IModelApp.formatsProvider,
|
|
354363
354660
|
});
|
|
354364
354661
|
koqPropertyFormatter.defaultFormats = this._defaultFormats;
|
|
354365
|
-
contentFormatter = (0, presentation_common_1.createContentFormatter)({ propertyValueFormatter: koqPropertyFormatter, unitSystem });
|
|
354662
|
+
contentFormatter = (0, presentation_common_1.createContentFormatter)({ propertyValueFormatter: koqPropertyFormatter.createCachedFormatter(), unitSystem });
|
|
354366
354663
|
}
|
|
354367
354664
|
let descriptor = requestOptions.descriptor instanceof presentation_common_1.Descriptor ? requestOptions.descriptor : undefined;
|
|
354368
354665
|
let firstPage;
|
|
@@ -354371,14 +354668,13 @@ class PresentationManager {
|
|
|
354371
354668
|
if (!firstPageResponse?.descriptor || !firstPageResponse.contentSet) {
|
|
354372
354669
|
return undefined;
|
|
354373
354670
|
}
|
|
354374
|
-
descriptor = presentation_common_1.Descriptor.fromJSON(firstPageResponse
|
|
354671
|
+
descriptor = this._localizationHelper.localizeContentDescriptor(presentation_common_1.Descriptor.fromJSON(firstPageResponse.descriptor));
|
|
354375
354672
|
firstPage = firstPageResponse?.contentSet;
|
|
354376
354673
|
}
|
|
354377
354674
|
/* c8 ignore next 3 */
|
|
354378
354675
|
if (!descriptor) {
|
|
354379
354676
|
return undefined;
|
|
354380
354677
|
}
|
|
354381
|
-
descriptor = this._localizationHelper.getLocalizedContentDescriptor(descriptor);
|
|
354382
354678
|
const getPage = async (paging, requestIndex) => {
|
|
354383
354679
|
let contentSet = requestIndex === 0 ? firstPage : undefined;
|
|
354384
354680
|
contentSet ??= await this._requestsHandler.getPagedContentSet({ ...rpcOptions, paging });
|
|
@@ -354386,7 +354682,7 @@ class PresentationManager {
|
|
|
354386
354682
|
if (contentFormatter) {
|
|
354387
354683
|
items = await contentFormatter.formatContentItems(items, descriptor);
|
|
354388
354684
|
}
|
|
354389
|
-
items = this._localizationHelper.
|
|
354685
|
+
items = this._localizationHelper.localizeContentItems(items);
|
|
354390
354686
|
return {
|
|
354391
354687
|
total: contentSet.total,
|
|
354392
354688
|
items,
|
|
@@ -354450,7 +354746,7 @@ class PresentationManager {
|
|
|
354450
354746
|
const response = await this._requestsHandler.getPagedDistinctValues({ ...rpcOptions, paging });
|
|
354451
354747
|
return {
|
|
354452
354748
|
total: response.total,
|
|
354453
|
-
items: response.items.map((x) => this._localizationHelper.
|
|
354749
|
+
items: response.items.map((x) => this._localizationHelper.localizeDisplayValueGroup(x)),
|
|
354454
354750
|
};
|
|
354455
354751
|
},
|
|
354456
354752
|
});
|
|
@@ -354528,7 +354824,7 @@ class PresentationManager {
|
|
|
354528
354824
|
(0, IModelConnectionInitialization_js_1.startIModelInitialization)(requestOptions.imodel);
|
|
354529
354825
|
const rpcOptions = this.toRpcTokenOptions({ ...requestOptions });
|
|
354530
354826
|
const result = await this._requestsHandler.getDisplayLabelDefinition(rpcOptions);
|
|
354531
|
-
return this._localizationHelper.
|
|
354827
|
+
return this._localizationHelper.localizeLabelDefinition(result);
|
|
354532
354828
|
}
|
|
354533
354829
|
/** Retrieves display label definition of specific items. */
|
|
354534
354830
|
async getDisplayLabelDefinitionsIterator(requestOptions) {
|
|
@@ -354539,7 +354835,7 @@ class PresentationManager {
|
|
|
354539
354835
|
getBatch: async (page) => {
|
|
354540
354836
|
const partialKeys = !page.start ? rpcOptions.keys : rpcOptions.keys.slice(page.start);
|
|
354541
354837
|
const result = await this._requestsHandler.getPagedDisplayLabelDefinitions({ ...rpcOptions, keys: partialKeys });
|
|
354542
|
-
result.items = this._localizationHelper.
|
|
354838
|
+
result.items = this._localizationHelper.localizeLabelDefinitions(result.items);
|
|
354543
354839
|
return result;
|
|
354544
354840
|
},
|
|
354545
354841
|
});
|
|
@@ -366320,534 +366616,377 @@ const isSafeIterable = (thing) =>
|
|
|
366320
366616
|
|
|
366321
366617
|
/***/ },
|
|
366322
366618
|
|
|
366323
|
-
/***/ "../../common/temp/node_modules/.pnpm/i18next-http-backend@
|
|
366619
|
+
/***/ "../../common/temp/node_modules/.pnpm/i18next-http-backend@4.0.5/node_modules/i18next-http-backend/esm/index.js"
|
|
366324
366620
|
/*!**********************************************************************************************************************!*\
|
|
366325
|
-
!*** ../../common/temp/node_modules/.pnpm/i18next-http-backend@
|
|
366621
|
+
!*** ../../common/temp/node_modules/.pnpm/i18next-http-backend@4.0.5/node_modules/i18next-http-backend/esm/index.js ***!
|
|
366326
366622
|
\**********************************************************************************************************************/
|
|
366327
366623
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
366328
366624
|
|
|
366329
366625
|
"use strict";
|
|
366330
366626
|
__webpack_require__.r(__webpack_exports__);
|
|
366331
366627
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
366332
|
-
/* harmony export */ "default": () => (
|
|
366333
|
-
/* harmony export */ });
|
|
366334
|
-
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils.js */ "../../common/temp/node_modules/.pnpm/i18next-http-backend@3.0.6/node_modules/i18next-http-backend/esm/utils.js");
|
|
366335
|
-
/* harmony import */ var _request_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./request.js */ "../../common/temp/node_modules/.pnpm/i18next-http-backend@3.0.6/node_modules/i18next-http-backend/esm/request.js");
|
|
366336
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
366337
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
366338
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
366339
|
-
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
366340
|
-
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
366341
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
366342
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
366343
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
366344
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
366345
|
-
;
|
|
366346
|
-
|
|
366347
|
-
var getDefaults = function getDefaults() {
|
|
366348
|
-
return {
|
|
366349
|
-
loadPath: '/locales/{{lng}}/{{ns}}.json',
|
|
366350
|
-
addPath: '/locales/add/{{lng}}/{{ns}}',
|
|
366351
|
-
parse: function parse(data) {
|
|
366352
|
-
return JSON.parse(data);
|
|
366353
|
-
},
|
|
366354
|
-
stringify: JSON.stringify,
|
|
366355
|
-
parsePayload: function parsePayload(namespace, key, fallbackValue) {
|
|
366356
|
-
return _defineProperty({}, key, fallbackValue || '');
|
|
366357
|
-
},
|
|
366358
|
-
parseLoadPayload: function parseLoadPayload(languages, namespaces) {
|
|
366359
|
-
return undefined;
|
|
366360
|
-
},
|
|
366361
|
-
request: _request_js__WEBPACK_IMPORTED_MODULE_1__["default"],
|
|
366362
|
-
reloadInterval: typeof window !== 'undefined' ? false : 60 * 60 * 1000,
|
|
366363
|
-
customHeaders: {},
|
|
366364
|
-
queryStringParams: {},
|
|
366365
|
-
crossDomain: false,
|
|
366366
|
-
withCredentials: false,
|
|
366367
|
-
overrideMimeType: false,
|
|
366368
|
-
requestOptions: {
|
|
366369
|
-
mode: 'cors',
|
|
366370
|
-
credentials: 'same-origin',
|
|
366371
|
-
cache: 'default'
|
|
366372
|
-
}
|
|
366373
|
-
};
|
|
366374
|
-
};
|
|
366375
|
-
var Backend = function () {
|
|
366376
|
-
function Backend(services) {
|
|
366377
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
366378
|
-
var allOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
366379
|
-
_classCallCheck(this, Backend);
|
|
366380
|
-
this.services = services;
|
|
366381
|
-
this.options = options;
|
|
366382
|
-
this.allOptions = allOptions;
|
|
366383
|
-
this.type = 'backend';
|
|
366384
|
-
this.init(services, options, allOptions);
|
|
366385
|
-
}
|
|
366386
|
-
return _createClass(Backend, [{
|
|
366387
|
-
key: "init",
|
|
366388
|
-
value: function init(services) {
|
|
366389
|
-
var _this = this;
|
|
366390
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
366391
|
-
var allOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
366392
|
-
this.services = services;
|
|
366393
|
-
this.options = _objectSpread(_objectSpread(_objectSpread({}, getDefaults()), this.options || {}), options);
|
|
366394
|
-
this.allOptions = allOptions;
|
|
366395
|
-
if (this.services && this.options.reloadInterval) {
|
|
366396
|
-
var timer = setInterval(function () {
|
|
366397
|
-
return _this.reload();
|
|
366398
|
-
}, this.options.reloadInterval);
|
|
366399
|
-
if (_typeof(timer) === 'object' && typeof timer.unref === 'function') timer.unref();
|
|
366400
|
-
}
|
|
366401
|
-
}
|
|
366402
|
-
}, {
|
|
366403
|
-
key: "readMulti",
|
|
366404
|
-
value: function readMulti(languages, namespaces, callback) {
|
|
366405
|
-
this._readAny(languages, languages, namespaces, namespaces, callback);
|
|
366406
|
-
}
|
|
366407
|
-
}, {
|
|
366408
|
-
key: "read",
|
|
366409
|
-
value: function read(language, namespace, callback) {
|
|
366410
|
-
this._readAny([language], language, [namespace], namespace, callback);
|
|
366411
|
-
}
|
|
366412
|
-
}, {
|
|
366413
|
-
key: "_readAny",
|
|
366414
|
-
value: function _readAny(languages, loadUrlLanguages, namespaces, loadUrlNamespaces, callback) {
|
|
366415
|
-
var _this2 = this;
|
|
366416
|
-
var loadPath = this.options.loadPath;
|
|
366417
|
-
if (typeof this.options.loadPath === 'function') {
|
|
366418
|
-
loadPath = this.options.loadPath(languages, namespaces);
|
|
366419
|
-
}
|
|
366420
|
-
loadPath = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.makePromise)(loadPath);
|
|
366421
|
-
loadPath.then(function (resolvedLoadPath) {
|
|
366422
|
-
if (!resolvedLoadPath) return callback(null, {});
|
|
366423
|
-
var url = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.interpolateUrl)(resolvedLoadPath, {
|
|
366424
|
-
lng: languages.join('+'),
|
|
366425
|
-
ns: namespaces.join('+')
|
|
366426
|
-
});
|
|
366427
|
-
if (url == null) {
|
|
366428
|
-
var safeLngs = languages.map(_utils_js__WEBPACK_IMPORTED_MODULE_0__.sanitizeLogValue).join(', ');
|
|
366429
|
-
var safeNss = namespaces.map(_utils_js__WEBPACK_IMPORTED_MODULE_0__.sanitizeLogValue).join(', ');
|
|
366430
|
-
return callback(new Error('i18next-http-backend: unsafe lng/ns value — refusing to build request URL for languages=[' + safeLngs + '] namespaces=[' + safeNss + ']'), false);
|
|
366431
|
-
}
|
|
366432
|
-
_this2.loadUrl(url, callback, loadUrlLanguages, loadUrlNamespaces);
|
|
366433
|
-
});
|
|
366434
|
-
}
|
|
366435
|
-
}, {
|
|
366436
|
-
key: "loadUrl",
|
|
366437
|
-
value: function loadUrl(url, callback, languages, namespaces) {
|
|
366438
|
-
var _this3 = this;
|
|
366439
|
-
var lng = typeof languages === 'string' ? [languages] : languages;
|
|
366440
|
-
var ns = typeof namespaces === 'string' ? [namespaces] : namespaces;
|
|
366441
|
-
var payload = this.options.parseLoadPayload(lng, ns);
|
|
366442
|
-
var safeUrl = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.sanitizeLogValue)((0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.redactUrlCredentials)(url));
|
|
366443
|
-
this.options.request(this.options, url, payload, function (err, res) {
|
|
366444
|
-
if (res && (res.status >= 500 && res.status < 600 || !res.status)) return callback('failed loading ' + safeUrl + '; status code: ' + res.status, true);
|
|
366445
|
-
if (res && res.status >= 400 && res.status < 500) return callback('failed loading ' + safeUrl + '; status code: ' + res.status, false);
|
|
366446
|
-
if (!res && err && err.message) {
|
|
366447
|
-
var errorMessage = err.message.toLowerCase();
|
|
366448
|
-
var isNetworkError = ['failed', 'fetch', 'network', 'load'].find(function (term) {
|
|
366449
|
-
return errorMessage.indexOf(term) > -1;
|
|
366450
|
-
});
|
|
366451
|
-
if (isNetworkError) {
|
|
366452
|
-
return callback('failed loading ' + safeUrl + ': ' + (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.sanitizeLogValue)(err.message), true);
|
|
366453
|
-
}
|
|
366454
|
-
}
|
|
366455
|
-
if (err) return callback(err, false);
|
|
366456
|
-
var ret, parseErr;
|
|
366457
|
-
try {
|
|
366458
|
-
if (typeof res.data === 'string') {
|
|
366459
|
-
ret = _this3.options.parse(res.data, languages, namespaces);
|
|
366460
|
-
} else {
|
|
366461
|
-
ret = res.data;
|
|
366462
|
-
}
|
|
366463
|
-
} catch (e) {
|
|
366464
|
-
parseErr = 'failed parsing ' + safeUrl + ' to json';
|
|
366465
|
-
}
|
|
366466
|
-
if (parseErr) return callback(parseErr, false);
|
|
366467
|
-
callback(null, ret);
|
|
366468
|
-
});
|
|
366469
|
-
}
|
|
366470
|
-
}, {
|
|
366471
|
-
key: "create",
|
|
366472
|
-
value: function create(languages, namespace, key, fallbackValue, callback) {
|
|
366473
|
-
var _this4 = this;
|
|
366474
|
-
if (!this.options.addPath) return;
|
|
366475
|
-
if (typeof languages === 'string') languages = [languages];
|
|
366476
|
-
var payload = this.options.parsePayload(namespace, key, fallbackValue);
|
|
366477
|
-
var finished = 0;
|
|
366478
|
-
var dataArray = [];
|
|
366479
|
-
var resArray = [];
|
|
366480
|
-
languages.forEach(function (lng) {
|
|
366481
|
-
var addPath = _this4.options.addPath;
|
|
366482
|
-
if (typeof _this4.options.addPath === 'function') {
|
|
366483
|
-
addPath = _this4.options.addPath(lng, namespace);
|
|
366484
|
-
}
|
|
366485
|
-
var url = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.interpolateUrl)(addPath, {
|
|
366486
|
-
lng: lng,
|
|
366487
|
-
ns: namespace
|
|
366488
|
-
});
|
|
366489
|
-
if (url == null) {
|
|
366490
|
-
finished += 1;
|
|
366491
|
-
if (callback && finished === languages.length) callback(dataArray, resArray);
|
|
366492
|
-
return;
|
|
366493
|
-
}
|
|
366494
|
-
_this4.options.request(_this4.options, url, payload, function (data, res) {
|
|
366495
|
-
finished += 1;
|
|
366496
|
-
dataArray.push(data);
|
|
366497
|
-
resArray.push(res);
|
|
366498
|
-
if (finished === languages.length) {
|
|
366499
|
-
if (typeof callback === 'function') callback(dataArray, resArray);
|
|
366500
|
-
}
|
|
366501
|
-
});
|
|
366502
|
-
});
|
|
366503
|
-
}
|
|
366504
|
-
}, {
|
|
366505
|
-
key: "reload",
|
|
366506
|
-
value: function reload() {
|
|
366507
|
-
var _this5 = this;
|
|
366508
|
-
var _this$services = this.services,
|
|
366509
|
-
backendConnector = _this$services.backendConnector,
|
|
366510
|
-
languageUtils = _this$services.languageUtils,
|
|
366511
|
-
logger = _this$services.logger;
|
|
366512
|
-
var currentLanguage = backendConnector.language;
|
|
366513
|
-
if (currentLanguage && currentLanguage.toLowerCase() === 'cimode') return;
|
|
366514
|
-
var toLoad = [];
|
|
366515
|
-
var append = function append(lng) {
|
|
366516
|
-
var lngs = languageUtils.toResolveHierarchy(lng);
|
|
366517
|
-
lngs.forEach(function (l) {
|
|
366518
|
-
if (toLoad.indexOf(l) < 0) toLoad.push(l);
|
|
366519
|
-
});
|
|
366520
|
-
};
|
|
366521
|
-
append(currentLanguage);
|
|
366522
|
-
if (this.allOptions.preload) this.allOptions.preload.forEach(function (l) {
|
|
366523
|
-
return append(l);
|
|
366524
|
-
});
|
|
366525
|
-
toLoad.forEach(function (lng) {
|
|
366526
|
-
_this5.allOptions.ns.forEach(function (ns) {
|
|
366527
|
-
backendConnector.read(lng, ns, 'read', null, null, function (err, data) {
|
|
366528
|
-
if (err) logger.warn("loading namespace ".concat(ns, " for language ").concat(lng, " failed"), err);
|
|
366529
|
-
if (!err && data) logger.log("loaded namespace ".concat(ns, " for language ").concat(lng), data);
|
|
366530
|
-
backendConnector.loaded("".concat(lng, "|").concat(ns), err, data);
|
|
366531
|
-
});
|
|
366532
|
-
});
|
|
366533
|
-
});
|
|
366534
|
-
}
|
|
366535
|
-
}]);
|
|
366536
|
-
}();
|
|
366537
|
-
Backend.type = 'backend';
|
|
366538
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Backend);
|
|
366539
|
-
|
|
366540
|
-
/***/ },
|
|
366541
|
-
|
|
366542
|
-
/***/ "../../common/temp/node_modules/.pnpm/i18next-http-backend@3.0.6/node_modules/i18next-http-backend/esm/request.js"
|
|
366543
|
-
/*!************************************************************************************************************************!*\
|
|
366544
|
-
!*** ../../common/temp/node_modules/.pnpm/i18next-http-backend@3.0.6/node_modules/i18next-http-backend/esm/request.js ***!
|
|
366545
|
-
\************************************************************************************************************************/
|
|
366546
|
-
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
366547
|
-
|
|
366548
|
-
"use strict";
|
|
366549
|
-
__webpack_require__.r(__webpack_exports__);
|
|
366550
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
366551
|
-
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
366628
|
+
/* harmony export */ "default": () => (/* binding */ Backend)
|
|
366552
366629
|
/* harmony export */ });
|
|
366553
|
-
|
|
366554
|
-
|
|
366555
|
-
|
|
366556
|
-
|
|
366557
|
-
|
|
366558
|
-
|
|
366559
|
-
|
|
366560
|
-
|
|
366561
|
-
|
|
366562
|
-
if (typeof __webpack_require__.g !== 'undefined' && __webpack_require__.g.fetch) {
|
|
366563
|
-
fetchApi = __webpack_require__.g.fetch;
|
|
366564
|
-
} else if (typeof window !== 'undefined' && window.fetch) {
|
|
366565
|
-
fetchApi = window.fetch;
|
|
366566
|
-
}
|
|
366567
|
-
var XmlHttpRequestApi;
|
|
366568
|
-
if ((0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.hasXMLHttpRequest)()) {
|
|
366569
|
-
if (typeof __webpack_require__.g !== 'undefined' && __webpack_require__.g.XMLHttpRequest) {
|
|
366570
|
-
XmlHttpRequestApi = __webpack_require__.g.XMLHttpRequest;
|
|
366571
|
-
} else if (typeof window !== 'undefined' && window.XMLHttpRequest) {
|
|
366572
|
-
XmlHttpRequestApi = window.XMLHttpRequest;
|
|
366573
|
-
}
|
|
366574
|
-
}
|
|
366575
|
-
var ActiveXObjectApi;
|
|
366576
|
-
if (typeof ActiveXObject === 'function') {
|
|
366577
|
-
if (typeof __webpack_require__.g !== 'undefined' && __webpack_require__.g.ActiveXObject) {
|
|
366578
|
-
ActiveXObjectApi = __webpack_require__.g.ActiveXObject;
|
|
366579
|
-
} else if (typeof window !== 'undefined' && window.ActiveXObject) {
|
|
366580
|
-
ActiveXObjectApi = window.ActiveXObject;
|
|
366581
|
-
}
|
|
366582
|
-
}
|
|
366583
|
-
if (typeof fetchApi !== 'function') fetchApi = undefined;
|
|
366584
|
-
if (!fetchApi && !XmlHttpRequestApi && !ActiveXObjectApi) {
|
|
366585
|
-
try {
|
|
366586
|
-
__webpack_require__.e(/*! import() */ "vendors-common_temp_node_modules_pnpm_cross-fetch_4_1_0_node_modules_cross-fetch_dist_browser-44272f").then(() => (__webpack_require__.t(/*! cross-fetch */ "../../common/temp/node_modules/.pnpm/cross-fetch@4.1.0/node_modules/cross-fetch/dist/browser-ponyfill.js", 19))).then(function (mod) {
|
|
366587
|
-
fetchApi = mod.default;
|
|
366588
|
-
}).catch(function () {});
|
|
366589
|
-
} catch (e) {}
|
|
366590
|
-
}
|
|
366591
|
-
var UNSAFE_KEYS = ['__proto__', 'constructor', 'prototype'];
|
|
366592
|
-
var addQueryString = function addQueryString(url, params) {
|
|
366593
|
-
if (params && _typeof(params) === 'object') {
|
|
366594
|
-
var queryString = '';
|
|
366595
|
-
for (var _i = 0, _Object$keys = Object.keys(params); _i < _Object$keys.length; _i++) {
|
|
366596
|
-
var paramName = _Object$keys[_i];
|
|
366597
|
-
if (UNSAFE_KEYS.indexOf(paramName) > -1) continue;
|
|
366598
|
-
queryString += '&' + encodeURIComponent(paramName) + '=' + encodeURIComponent(params[paramName]);
|
|
366599
|
-
}
|
|
366600
|
-
if (!queryString) return url;
|
|
366601
|
-
url = url + (url.indexOf('?') !== -1 ? '&' : '?') + queryString.slice(1);
|
|
366602
|
-
}
|
|
366603
|
-
return url;
|
|
366604
|
-
};
|
|
366605
|
-
var fetchIt = function fetchIt(url, fetchOptions, callback, altFetch) {
|
|
366606
|
-
var resolver = function resolver(response) {
|
|
366607
|
-
if (!response.ok) return callback(response.statusText || 'Error', {
|
|
366608
|
-
status: response.status
|
|
366609
|
-
});
|
|
366610
|
-
response.text().then(function (data) {
|
|
366611
|
-
callback(null, {
|
|
366612
|
-
status: response.status,
|
|
366613
|
-
data: data
|
|
366614
|
-
});
|
|
366615
|
-
}).catch(callback);
|
|
366616
|
-
};
|
|
366617
|
-
if (altFetch) {
|
|
366618
|
-
var altResponse = altFetch(url, fetchOptions);
|
|
366619
|
-
if (altResponse instanceof Promise) {
|
|
366620
|
-
altResponse.then(resolver).catch(callback);
|
|
366621
|
-
return;
|
|
366622
|
-
}
|
|
366623
|
-
}
|
|
366624
|
-
if (typeof fetch === 'function') {
|
|
366625
|
-
fetch(url, fetchOptions).then(resolver).catch(callback);
|
|
366626
|
-
} else {
|
|
366627
|
-
fetchApi(url, fetchOptions).then(resolver).catch(callback);
|
|
366628
|
-
}
|
|
366629
|
-
};
|
|
366630
|
-
var requestWithFetch = function requestWithFetch(options, url, payload, callback) {
|
|
366631
|
-
if (options.queryStringParams) {
|
|
366632
|
-
url = addQueryString(url, options.queryStringParams);
|
|
366633
|
-
}
|
|
366634
|
-
var headers = _objectSpread({}, typeof options.customHeaders === 'function' ? options.customHeaders() : options.customHeaders);
|
|
366635
|
-
if (typeof window === 'undefined' && typeof __webpack_require__.g !== 'undefined' && typeof __webpack_require__.g.process !== 'undefined' && __webpack_require__.g.process.versions && __webpack_require__.g.process.versions.node) {
|
|
366636
|
-
headers['User-Agent'] = "i18next-http-backend (node/".concat(__webpack_require__.g.process.version, "; ").concat(__webpack_require__.g.process.platform, " ").concat(__webpack_require__.g.process.arch, ")");
|
|
366637
|
-
}
|
|
366638
|
-
if (payload) headers['Content-Type'] = 'application/json';
|
|
366639
|
-
var reqOptions = typeof options.requestOptions === 'function' ? options.requestOptions(payload) : options.requestOptions;
|
|
366640
|
-
var fetchOptions = _objectSpread({
|
|
366641
|
-
method: payload ? 'POST' : 'GET',
|
|
366642
|
-
body: payload ? options.stringify(payload) : undefined,
|
|
366643
|
-
headers: headers
|
|
366644
|
-
}, options._omitFetchOptions ? {} : reqOptions);
|
|
366645
|
-
var altFetch = typeof options.alternateFetch === 'function' && options.alternateFetch.length >= 1 ? options.alternateFetch : undefined;
|
|
366646
|
-
try {
|
|
366647
|
-
fetchIt(url, fetchOptions, callback, altFetch);
|
|
366648
|
-
} catch (e) {
|
|
366649
|
-
if (!reqOptions || Object.keys(reqOptions).length === 0 || !e.message || e.message.indexOf('not implemented') < 0) {
|
|
366650
|
-
return callback(e);
|
|
366651
|
-
}
|
|
366652
|
-
try {
|
|
366653
|
-
Object.keys(reqOptions).forEach(function (opt) {
|
|
366654
|
-
delete fetchOptions[opt];
|
|
366655
|
-
});
|
|
366656
|
-
fetchIt(url, fetchOptions, callback, altFetch);
|
|
366657
|
-
options._omitFetchOptions = true;
|
|
366658
|
-
} catch (err) {
|
|
366659
|
-
callback(err);
|
|
366660
|
-
}
|
|
366661
|
-
}
|
|
366662
|
-
};
|
|
366663
|
-
var requestWithXmlHttpRequest = function requestWithXmlHttpRequest(options, url, payload, callback) {
|
|
366664
|
-
if (payload && _typeof(payload) === 'object') {
|
|
366665
|
-
payload = addQueryString('', payload).slice(1);
|
|
366666
|
-
}
|
|
366667
|
-
if (options.queryStringParams) {
|
|
366668
|
-
url = addQueryString(url, options.queryStringParams);
|
|
366669
|
-
}
|
|
366670
|
-
try {
|
|
366671
|
-
var x = XmlHttpRequestApi ? new XmlHttpRequestApi() : new ActiveXObjectApi('MSXML2.XMLHTTP.3.0');
|
|
366672
|
-
x.open(payload ? 'POST' : 'GET', url, 1);
|
|
366673
|
-
if (!options.crossDomain) {
|
|
366674
|
-
x.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
|
|
366675
|
-
}
|
|
366676
|
-
x.withCredentials = !!options.withCredentials;
|
|
366677
|
-
if (payload) {
|
|
366678
|
-
x.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
|
|
366679
|
-
}
|
|
366680
|
-
if (x.overrideMimeType) {
|
|
366681
|
-
x.overrideMimeType('application/json');
|
|
366682
|
-
}
|
|
366683
|
-
var h = options.customHeaders;
|
|
366684
|
-
h = typeof h === 'function' ? h() : h;
|
|
366685
|
-
if (h) {
|
|
366686
|
-
for (var _i2 = 0, _Object$keys2 = Object.keys(h); _i2 < _Object$keys2.length; _i2++) {
|
|
366687
|
-
var i = _Object$keys2[_i2];
|
|
366688
|
-
if (UNSAFE_KEYS.indexOf(i) > -1) continue;
|
|
366689
|
-
x.setRequestHeader(i, h[i]);
|
|
366690
|
-
}
|
|
366691
|
-
}
|
|
366692
|
-
x.onreadystatechange = function () {
|
|
366693
|
-
x.readyState > 3 && callback(x.status >= 400 ? x.statusText : null, {
|
|
366694
|
-
status: x.status,
|
|
366695
|
-
data: x.responseText
|
|
366696
|
-
});
|
|
366697
|
-
};
|
|
366698
|
-
x.send(payload);
|
|
366699
|
-
} catch (e) {
|
|
366700
|
-
console && console.log(e);
|
|
366701
|
-
}
|
|
366702
|
-
};
|
|
366703
|
-
var request = function request(options, url, payload, callback) {
|
|
366704
|
-
if (typeof payload === 'function') {
|
|
366705
|
-
callback = payload;
|
|
366706
|
-
payload = undefined;
|
|
366707
|
-
}
|
|
366708
|
-
callback = callback || function () {};
|
|
366709
|
-
if (fetchApi && url.indexOf('file:') !== 0) {
|
|
366710
|
-
return requestWithFetch(options, url, payload, callback);
|
|
366711
|
-
}
|
|
366712
|
-
if ((0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.hasXMLHttpRequest)() || typeof ActiveXObject === 'function') {
|
|
366713
|
-
return requestWithXmlHttpRequest(options, url, payload, callback);
|
|
366714
|
-
}
|
|
366715
|
-
callback(new Error('No fetch and no xhr implementation found!'));
|
|
366716
|
-
};
|
|
366717
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (request);
|
|
366718
|
-
|
|
366719
|
-
/***/ },
|
|
366720
|
-
|
|
366721
|
-
/***/ "../../common/temp/node_modules/.pnpm/i18next-http-backend@3.0.6/node_modules/i18next-http-backend/esm/utils.js"
|
|
366722
|
-
/*!**********************************************************************************************************************!*\
|
|
366723
|
-
!*** ../../common/temp/node_modules/.pnpm/i18next-http-backend@3.0.6/node_modules/i18next-http-backend/esm/utils.js ***!
|
|
366724
|
-
\**********************************************************************************************************************/
|
|
366725
|
-
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
366726
|
-
|
|
366727
|
-
"use strict";
|
|
366728
|
-
__webpack_require__.r(__webpack_exports__);
|
|
366729
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
366730
|
-
/* harmony export */ defaults: () => (/* binding */ defaults),
|
|
366731
|
-
/* harmony export */ hasXMLHttpRequest: () => (/* binding */ hasXMLHttpRequest),
|
|
366732
|
-
/* harmony export */ interpolate: () => (/* binding */ interpolate),
|
|
366733
|
-
/* harmony export */ interpolateUrl: () => (/* binding */ interpolateUrl),
|
|
366734
|
-
/* harmony export */ isSafeLangUrlSegment: () => (/* binding */ isSafeLangUrlSegment),
|
|
366735
|
-
/* harmony export */ isSafeNsUrlSegment: () => (/* binding */ isSafeNsUrlSegment),
|
|
366736
|
-
/* harmony export */ isSafeUrlSegment: () => (/* binding */ isSafeUrlSegment),
|
|
366737
|
-
/* harmony export */ makePromise: () => (/* binding */ makePromise),
|
|
366738
|
-
/* harmony export */ redactUrlCredentials: () => (/* binding */ redactUrlCredentials),
|
|
366739
|
-
/* harmony export */ sanitizeLogValue: () => (/* binding */ sanitizeLogValue)
|
|
366740
|
-
/* harmony export */ });
|
|
366741
|
-
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
366742
|
-
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
366743
|
-
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
366744
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
366745
|
-
var arr = [];
|
|
366746
|
-
var each = arr.forEach;
|
|
366747
|
-
var slice = arr.slice;
|
|
366748
|
-
var UNSAFE_KEYS = ['__proto__', 'constructor', 'prototype'];
|
|
366749
|
-
function defaults(obj) {
|
|
366750
|
-
each.call(slice.call(arguments, 1), function (source) {
|
|
366751
|
-
if (source) {
|
|
366752
|
-
for (var _i = 0, _Object$keys = Object.keys(source); _i < _Object$keys.length; _i++) {
|
|
366753
|
-
var prop = _Object$keys[_i];
|
|
366754
|
-
if (UNSAFE_KEYS.indexOf(prop) > -1) continue;
|
|
366755
|
-
if (obj[prop] === undefined) obj[prop] = source[prop];
|
|
366756
|
-
}
|
|
366757
|
-
}
|
|
366758
|
-
});
|
|
366759
|
-
return obj;
|
|
366760
|
-
}
|
|
366630
|
+
//#region lib/utils.js
|
|
366631
|
+
const arr = [];
|
|
366632
|
+
arr.forEach;
|
|
366633
|
+
arr.slice;
|
|
366634
|
+
const UNSAFE_KEYS$1 = [
|
|
366635
|
+
"__proto__",
|
|
366636
|
+
"constructor",
|
|
366637
|
+
"prototype"
|
|
366638
|
+
];
|
|
366761
366639
|
function isSafeUrlSegmentBase(v) {
|
|
366762
|
-
|
|
366763
|
-
|
|
366764
|
-
|
|
366765
|
-
|
|
366766
|
-
|
|
366767
|
-
|
|
366768
|
-
|
|
366769
|
-
|
|
366640
|
+
if (typeof v !== "string") return false;
|
|
366641
|
+
if (v.length === 0 || v.length > 128) return false;
|
|
366642
|
+
if (UNSAFE_KEYS$1.indexOf(v) > -1) return false;
|
|
366643
|
+
if (v.indexOf("..") > -1) return false;
|
|
366644
|
+
if (v.indexOf("\\") > -1) return false;
|
|
366645
|
+
if (/[?#%:&=;\s]/.test(v)) return false;
|
|
366646
|
+
if (/[\x00-\x1F\x7F]/.test(v)) return false;
|
|
366647
|
+
return true;
|
|
366770
366648
|
}
|
|
366771
366649
|
function isSafeLangUrlSegment(v) {
|
|
366772
|
-
|
|
366773
|
-
|
|
366774
|
-
|
|
366650
|
+
if (!isSafeUrlSegmentBase(v)) return false;
|
|
366651
|
+
if (v.indexOf("/") > -1 || v.indexOf("@") > -1) return false;
|
|
366652
|
+
return true;
|
|
366775
366653
|
}
|
|
366776
366654
|
function isSafeNsUrlSegment(v) {
|
|
366777
|
-
|
|
366655
|
+
if (!isSafeUrlSegmentBase(v)) return false;
|
|
366656
|
+
if (v.indexOf("//") > -1) return false;
|
|
366657
|
+
return true;
|
|
366778
366658
|
}
|
|
366779
|
-
|
|
366780
|
-
|
|
366781
|
-
|
|
366782
|
-
ns: isSafeNsUrlSegment
|
|
366659
|
+
const SAFETY_CHECK_BY_KEY = {
|
|
366660
|
+
lng: isSafeLangUrlSegment,
|
|
366661
|
+
ns: isSafeNsUrlSegment
|
|
366783
366662
|
};
|
|
366784
366663
|
function sanitizeLogValue(v) {
|
|
366785
|
-
|
|
366786
|
-
|
|
366664
|
+
if (typeof v !== "string") return v;
|
|
366665
|
+
return v.replace(/[\r\n\x00-\x1F\x7F]/g, " ");
|
|
366787
366666
|
}
|
|
366788
366667
|
function redactUrlCredentials(u) {
|
|
366789
|
-
|
|
366790
|
-
|
|
366791
|
-
|
|
366792
|
-
|
|
366793
|
-
|
|
366794
|
-
|
|
366795
|
-
|
|
366796
|
-
|
|
366797
|
-
|
|
366798
|
-
|
|
366799
|
-
|
|
366800
|
-
|
|
366668
|
+
if (typeof u !== "string" || u.length === 0) return u;
|
|
366669
|
+
try {
|
|
366670
|
+
const parsed = new URL(u);
|
|
366671
|
+
if (parsed.username || parsed.password) {
|
|
366672
|
+
parsed.username = "";
|
|
366673
|
+
parsed.password = "";
|
|
366674
|
+
return parsed.toString();
|
|
366675
|
+
}
|
|
366676
|
+
return u;
|
|
366677
|
+
} catch (e) {
|
|
366678
|
+
return u.replace(/(\/\/)[^/@\s]+@/g, "$1");
|
|
366679
|
+
}
|
|
366801
366680
|
}
|
|
366802
366681
|
function hasXMLHttpRequest() {
|
|
366803
|
-
|
|
366682
|
+
return typeof XMLHttpRequest === "function" || typeof XMLHttpRequest === "object";
|
|
366804
366683
|
}
|
|
366684
|
+
/**
|
|
366685
|
+
* Determine whether the given `maybePromise` is a Promise.
|
|
366686
|
+
*
|
|
366687
|
+
* @param {*} maybePromise
|
|
366688
|
+
*
|
|
366689
|
+
* @returns {Boolean}
|
|
366690
|
+
*/
|
|
366805
366691
|
function isPromise(maybePromise) {
|
|
366806
|
-
|
|
366692
|
+
return !!maybePromise && typeof maybePromise.then === "function";
|
|
366807
366693
|
}
|
|
366694
|
+
/**
|
|
366695
|
+
* Convert any value to a Promise than will resolve to this value.
|
|
366696
|
+
*
|
|
366697
|
+
* @param {*} maybePromise
|
|
366698
|
+
*
|
|
366699
|
+
* @returns {Promise}
|
|
366700
|
+
*/
|
|
366808
366701
|
function makePromise(maybePromise) {
|
|
366809
|
-
|
|
366810
|
-
|
|
366811
|
-
}
|
|
366812
|
-
return Promise.resolve(maybePromise);
|
|
366813
|
-
}
|
|
366814
|
-
var interpolationRegexp = /\{\{(.+?)\}\}/g;
|
|
366815
|
-
function interpolate(str, data) {
|
|
366816
|
-
return str.replace(interpolationRegexp, function (match, key) {
|
|
366817
|
-
var k = key.trim();
|
|
366818
|
-
if (UNSAFE_KEYS.indexOf(k) > -1) return match;
|
|
366819
|
-
var value = data[k];
|
|
366820
|
-
return value != null ? value : match;
|
|
366821
|
-
});
|
|
366702
|
+
if (isPromise(maybePromise)) return maybePromise;
|
|
366703
|
+
return Promise.resolve(maybePromise);
|
|
366822
366704
|
}
|
|
366705
|
+
const interpolationRegexp = /\{\{(.+?)\}\}/g;
|
|
366706
|
+
const LEADING_DOUBLE_SLASH = /^[/\\]{2}/;
|
|
366823
366707
|
function interpolateUrl(str, data) {
|
|
366824
|
-
|
|
366825
|
-
|
|
366826
|
-
|
|
366827
|
-
|
|
366828
|
-
|
|
366829
|
-
|
|
366830
|
-
|
|
366831
|
-
|
|
366832
|
-
|
|
366833
|
-
|
|
366834
|
-
|
|
366835
|
-
|
|
366836
|
-
|
|
366837
|
-
|
|
366838
|
-
|
|
366839
|
-
|
|
366840
|
-
|
|
366841
|
-
|
|
366842
|
-
|
|
366843
|
-
|
|
366844
|
-
|
|
366845
|
-
|
|
366846
|
-
|
|
366847
|
-
|
|
366848
|
-
|
|
366849
|
-
|
|
366850
|
-
|
|
366708
|
+
let unsafe = false;
|
|
366709
|
+
const result = str.replace(interpolationRegexp, (match, key) => {
|
|
366710
|
+
const k = key.trim();
|
|
366711
|
+
if (UNSAFE_KEYS$1.indexOf(k) > -1) return match;
|
|
366712
|
+
const value = data[k];
|
|
366713
|
+
if (value == null) return match;
|
|
366714
|
+
const check = SAFETY_CHECK_BY_KEY[k] || isSafeLangUrlSegment;
|
|
366715
|
+
const segments = String(value).split("+");
|
|
366716
|
+
for (const seg of segments) if (!check(seg)) {
|
|
366717
|
+
unsafe = true;
|
|
366718
|
+
return match;
|
|
366719
|
+
}
|
|
366720
|
+
return segments.join("+");
|
|
366721
|
+
});
|
|
366722
|
+
if (unsafe) return null;
|
|
366723
|
+
if (LEADING_DOUBLE_SLASH.test(result) && !LEADING_DOUBLE_SLASH.test(str)) return null;
|
|
366724
|
+
return result;
|
|
366725
|
+
}
|
|
366726
|
+
//#endregion
|
|
366727
|
+
//#region lib/request.js
|
|
366728
|
+
const g = typeof globalThis !== "undefined" ? globalThis : typeof __webpack_require__.g !== "undefined" ? __webpack_require__.g : typeof window !== "undefined" ? window : void 0;
|
|
366729
|
+
let fetchApi;
|
|
366730
|
+
if (typeof fetch === "function") fetchApi = fetch;
|
|
366731
|
+
else if (g && typeof g.fetch === "function") fetchApi = g.fetch;
|
|
366732
|
+
const XmlHttpRequestApi = hasXMLHttpRequest() && g ? g.XMLHttpRequest : void 0;
|
|
366733
|
+
const ActiveXObjectApi = typeof ActiveXObject === "function" && g ? g.ActiveXObject : void 0;
|
|
366734
|
+
const UNSAFE_KEYS = [
|
|
366735
|
+
"__proto__",
|
|
366736
|
+
"constructor",
|
|
366737
|
+
"prototype"
|
|
366738
|
+
];
|
|
366739
|
+
const addQueryString = (url, params) => {
|
|
366740
|
+
if (params && typeof params === "object") {
|
|
366741
|
+
let queryString = "";
|
|
366742
|
+
for (const paramName of Object.keys(params)) {
|
|
366743
|
+
if (UNSAFE_KEYS.indexOf(paramName) > -1) continue;
|
|
366744
|
+
queryString += "&" + encodeURIComponent(paramName) + "=" + encodeURIComponent(params[paramName]);
|
|
366745
|
+
}
|
|
366746
|
+
if (!queryString) return url;
|
|
366747
|
+
url = url + (url.indexOf("?") !== -1 ? "&" : "?") + queryString.slice(1);
|
|
366748
|
+
}
|
|
366749
|
+
return url;
|
|
366750
|
+
};
|
|
366751
|
+
const fetchIt = (url, fetchOptions, callback, altFetch) => {
|
|
366752
|
+
const resolver = (response) => {
|
|
366753
|
+
if (!response.ok) return callback(response.statusText || "Error", { status: response.status });
|
|
366754
|
+
response.text().then((data) => {
|
|
366755
|
+
callback(null, {
|
|
366756
|
+
status: response.status,
|
|
366757
|
+
data
|
|
366758
|
+
});
|
|
366759
|
+
}).catch(callback);
|
|
366760
|
+
};
|
|
366761
|
+
if (altFetch) {
|
|
366762
|
+
const altResponse = altFetch(url, fetchOptions);
|
|
366763
|
+
if (altResponse instanceof Promise) {
|
|
366764
|
+
altResponse.then(resolver).catch(callback);
|
|
366765
|
+
return;
|
|
366766
|
+
}
|
|
366767
|
+
}
|
|
366768
|
+
if (typeof fetch === "function") fetch(url, fetchOptions).then(resolver).catch(callback);
|
|
366769
|
+
else fetchApi(url, fetchOptions).then(resolver).catch(callback);
|
|
366770
|
+
};
|
|
366771
|
+
const requestWithFetch = (options, url, payload, callback) => {
|
|
366772
|
+
if (options.queryStringParams) url = addQueryString(url, options.queryStringParams);
|
|
366773
|
+
const headers = { ...typeof options.customHeaders === "function" ? options.customHeaders() : options.customHeaders };
|
|
366774
|
+
if (typeof window === "undefined" && typeof __webpack_require__.g !== "undefined" && typeof __webpack_require__.g.process !== "undefined" && __webpack_require__.g.process.versions && __webpack_require__.g.process.versions.node) headers["User-Agent"] = `i18next-http-backend (node/${__webpack_require__.g.process.version}; ${__webpack_require__.g.process.platform} ${__webpack_require__.g.process.arch})`;
|
|
366775
|
+
if (payload) headers["Content-Type"] = "application/json";
|
|
366776
|
+
const reqOptions = typeof options.requestOptions === "function" ? options.requestOptions(payload) : options.requestOptions;
|
|
366777
|
+
const fetchOptions = {
|
|
366778
|
+
method: payload ? "POST" : "GET",
|
|
366779
|
+
body: payload ? options.stringify(payload) : void 0,
|
|
366780
|
+
headers,
|
|
366781
|
+
...options._omitFetchOptions ? {} : reqOptions
|
|
366782
|
+
};
|
|
366783
|
+
const altFetch = typeof options.alternateFetch === "function" && options.alternateFetch.length >= 1 ? options.alternateFetch : void 0;
|
|
366784
|
+
try {
|
|
366785
|
+
fetchIt(url, fetchOptions, callback, altFetch);
|
|
366786
|
+
} catch (e) {
|
|
366787
|
+
if (!reqOptions || Object.keys(reqOptions).length === 0 || !e.message || e.message.indexOf("not implemented") < 0) return callback(e);
|
|
366788
|
+
try {
|
|
366789
|
+
Object.keys(reqOptions).forEach((opt) => {
|
|
366790
|
+
delete fetchOptions[opt];
|
|
366791
|
+
});
|
|
366792
|
+
fetchIt(url, fetchOptions, callback, altFetch);
|
|
366793
|
+
options._omitFetchOptions = true;
|
|
366794
|
+
} catch (err) {
|
|
366795
|
+
callback(err);
|
|
366796
|
+
}
|
|
366797
|
+
}
|
|
366798
|
+
};
|
|
366799
|
+
const requestWithXmlHttpRequest = (options, url, payload, callback) => {
|
|
366800
|
+
if (payload && typeof payload === "object") payload = addQueryString("", payload).slice(1);
|
|
366801
|
+
if (options.queryStringParams) url = addQueryString(url, options.queryStringParams);
|
|
366802
|
+
try {
|
|
366803
|
+
const x = XmlHttpRequestApi ? new XmlHttpRequestApi() : new ActiveXObjectApi("MSXML2.XMLHTTP.3.0");
|
|
366804
|
+
x.open(payload ? "POST" : "GET", url, 1);
|
|
366805
|
+
if (!options.crossDomain) x.setRequestHeader("X-Requested-With", "XMLHttpRequest");
|
|
366806
|
+
x.withCredentials = !!options.withCredentials;
|
|
366807
|
+
if (payload) x.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
|
|
366808
|
+
if (x.overrideMimeType) x.overrideMimeType("application/json");
|
|
366809
|
+
let h = options.customHeaders;
|
|
366810
|
+
h = typeof h === "function" ? h() : h;
|
|
366811
|
+
if (h) for (const i of Object.keys(h)) {
|
|
366812
|
+
if (UNSAFE_KEYS.indexOf(i) > -1) continue;
|
|
366813
|
+
x.setRequestHeader(i, h[i]);
|
|
366814
|
+
}
|
|
366815
|
+
x.onreadystatechange = () => {
|
|
366816
|
+
x.readyState > 3 && callback(x.status >= 400 ? x.statusText : null, {
|
|
366817
|
+
status: x.status,
|
|
366818
|
+
data: x.responseText
|
|
366819
|
+
});
|
|
366820
|
+
};
|
|
366821
|
+
x.send(payload);
|
|
366822
|
+
} catch (e) {
|
|
366823
|
+
console && console.log(e);
|
|
366824
|
+
}
|
|
366825
|
+
};
|
|
366826
|
+
const request = (options, url, payload, callback) => {
|
|
366827
|
+
if (typeof payload === "function") {
|
|
366828
|
+
callback = payload;
|
|
366829
|
+
payload = void 0;
|
|
366830
|
+
}
|
|
366831
|
+
callback = callback || (() => {});
|
|
366832
|
+
if (fetchApi && url.indexOf("file:") !== 0) return requestWithFetch(options, url, payload, callback);
|
|
366833
|
+
if (hasXMLHttpRequest() || typeof ActiveXObject === "function") return requestWithXmlHttpRequest(options, url, payload, callback);
|
|
366834
|
+
callback(/* @__PURE__ */ new Error("No fetch and no xhr implementation found!"));
|
|
366835
|
+
};
|
|
366836
|
+
//#endregion
|
|
366837
|
+
//#region lib/index.js
|
|
366838
|
+
const getDefaults = () => {
|
|
366839
|
+
return {
|
|
366840
|
+
loadPath: "/locales/{{lng}}/{{ns}}.json",
|
|
366841
|
+
addPath: "/locales/add/{{lng}}/{{ns}}",
|
|
366842
|
+
parse: (data) => JSON.parse(data),
|
|
366843
|
+
stringify: JSON.stringify,
|
|
366844
|
+
parsePayload: (namespace, key, fallbackValue) => ({ [key]: fallbackValue || "" }),
|
|
366845
|
+
parseLoadPayload: (languages, namespaces) => void 0,
|
|
366846
|
+
request,
|
|
366847
|
+
reloadInterval: typeof window !== "undefined" ? false : 3600 * 1e3,
|
|
366848
|
+
customHeaders: {},
|
|
366849
|
+
queryStringParams: {},
|
|
366850
|
+
crossDomain: false,
|
|
366851
|
+
withCredentials: false,
|
|
366852
|
+
overrideMimeType: false,
|
|
366853
|
+
requestOptions: {
|
|
366854
|
+
mode: "cors",
|
|
366855
|
+
credentials: "same-origin",
|
|
366856
|
+
cache: "default"
|
|
366857
|
+
}
|
|
366858
|
+
};
|
|
366859
|
+
};
|
|
366860
|
+
var Backend = class {
|
|
366861
|
+
constructor(services, options = {}, allOptions = {}) {
|
|
366862
|
+
this.services = services;
|
|
366863
|
+
this.options = options;
|
|
366864
|
+
this.allOptions = allOptions;
|
|
366865
|
+
this.type = "backend";
|
|
366866
|
+
this.init(services, options, allOptions);
|
|
366867
|
+
}
|
|
366868
|
+
init(services, options = {}, allOptions = {}) {
|
|
366869
|
+
this.services = services;
|
|
366870
|
+
this.options = {
|
|
366871
|
+
...getDefaults(),
|
|
366872
|
+
...this.options || {},
|
|
366873
|
+
...options
|
|
366874
|
+
};
|
|
366875
|
+
this.allOptions = allOptions;
|
|
366876
|
+
if (this.services && this.options.reloadInterval) {
|
|
366877
|
+
const timer = setInterval(() => this.reload(), this.options.reloadInterval);
|
|
366878
|
+
if (typeof timer === "object" && typeof timer.unref === "function") timer.unref();
|
|
366879
|
+
}
|
|
366880
|
+
}
|
|
366881
|
+
readMulti(languages, namespaces, callback) {
|
|
366882
|
+
this._readAny(languages, languages, namespaces, namespaces, callback);
|
|
366883
|
+
}
|
|
366884
|
+
read(language, namespace, callback) {
|
|
366885
|
+
this._readAny([language], language, [namespace], namespace, callback);
|
|
366886
|
+
}
|
|
366887
|
+
_readAny(languages, loadUrlLanguages, namespaces, loadUrlNamespaces, callback) {
|
|
366888
|
+
let loadPath = this.options.loadPath;
|
|
366889
|
+
if (typeof this.options.loadPath === "function") loadPath = this.options.loadPath(languages, namespaces);
|
|
366890
|
+
loadPath = makePromise(loadPath);
|
|
366891
|
+
loadPath.then((resolvedLoadPath) => {
|
|
366892
|
+
if (!resolvedLoadPath) return callback(null, {});
|
|
366893
|
+
const url = interpolateUrl(resolvedLoadPath, {
|
|
366894
|
+
lng: languages.join("+"),
|
|
366895
|
+
ns: namespaces.join("+")
|
|
366896
|
+
});
|
|
366897
|
+
if (url == null) {
|
|
366898
|
+
const safeLngs = languages.map(sanitizeLogValue).join(", ");
|
|
366899
|
+
const safeNss = namespaces.map(sanitizeLogValue).join(", ");
|
|
366900
|
+
return callback(/* @__PURE__ */ new Error("i18next-http-backend: unsafe lng/ns value — refusing to build request URL for languages=[" + safeLngs + "] namespaces=[" + safeNss + "]"), false);
|
|
366901
|
+
}
|
|
366902
|
+
this.loadUrl(url, callback, loadUrlLanguages, loadUrlNamespaces);
|
|
366903
|
+
}, (err) => callback(err, false));
|
|
366904
|
+
}
|
|
366905
|
+
loadUrl(url, callback, languages, namespaces) {
|
|
366906
|
+
const lng = typeof languages === "string" ? [languages] : languages;
|
|
366907
|
+
const ns = typeof namespaces === "string" ? [namespaces] : namespaces;
|
|
366908
|
+
const payload = this.options.parseLoadPayload(lng, ns);
|
|
366909
|
+
const safeUrl = sanitizeLogValue(redactUrlCredentials(url));
|
|
366910
|
+
this.options.request(this.options, url, payload, (err, res) => {
|
|
366911
|
+
if (res && (res.status >= 500 && res.status < 600 || !res.status)) return callback("failed loading " + safeUrl + "; status code: " + res.status, true);
|
|
366912
|
+
if (res && res.status >= 400 && res.status < 500) return callback("failed loading " + safeUrl + "; status code: " + res.status, false);
|
|
366913
|
+
if (!res && err && err.message) {
|
|
366914
|
+
const errorMessage = err.message.toLowerCase();
|
|
366915
|
+
if ([
|
|
366916
|
+
"failed",
|
|
366917
|
+
"fetch",
|
|
366918
|
+
"network",
|
|
366919
|
+
"load"
|
|
366920
|
+
].find((term) => errorMessage.indexOf(term) > -1)) return callback("failed loading " + safeUrl + ": " + sanitizeLogValue(err.message), true);
|
|
366921
|
+
}
|
|
366922
|
+
if (err) return callback(err, false);
|
|
366923
|
+
let ret, parseErr;
|
|
366924
|
+
try {
|
|
366925
|
+
if (typeof res.data === "string") ret = this.options.parse(res.data, languages, namespaces);
|
|
366926
|
+
else ret = res.data;
|
|
366927
|
+
} catch (e) {
|
|
366928
|
+
parseErr = "failed parsing " + safeUrl + " to json";
|
|
366929
|
+
}
|
|
366930
|
+
if (parseErr) return callback(parseErr, false);
|
|
366931
|
+
callback(null, ret);
|
|
366932
|
+
});
|
|
366933
|
+
}
|
|
366934
|
+
create(languages, namespace, key, fallbackValue, callback) {
|
|
366935
|
+
if (!this.options.addPath) return;
|
|
366936
|
+
if (typeof languages === "string") languages = [languages];
|
|
366937
|
+
const payload = this.options.parsePayload(namespace, key, fallbackValue);
|
|
366938
|
+
let finished = 0;
|
|
366939
|
+
const dataArray = [];
|
|
366940
|
+
const resArray = [];
|
|
366941
|
+
languages.forEach((lng) => {
|
|
366942
|
+
let addPath = this.options.addPath;
|
|
366943
|
+
if (typeof this.options.addPath === "function") addPath = this.options.addPath(lng, namespace);
|
|
366944
|
+
const url = interpolateUrl(addPath, {
|
|
366945
|
+
lng,
|
|
366946
|
+
ns: namespace
|
|
366947
|
+
});
|
|
366948
|
+
if (url == null) {
|
|
366949
|
+
finished += 1;
|
|
366950
|
+
if (callback && finished === languages.length) callback(dataArray, resArray);
|
|
366951
|
+
return;
|
|
366952
|
+
}
|
|
366953
|
+
this.options.request(this.options, url, payload, (data, res) => {
|
|
366954
|
+
finished += 1;
|
|
366955
|
+
dataArray.push(data);
|
|
366956
|
+
resArray.push(res);
|
|
366957
|
+
if (finished === languages.length) {
|
|
366958
|
+
if (typeof callback === "function") callback(dataArray, resArray);
|
|
366959
|
+
}
|
|
366960
|
+
});
|
|
366961
|
+
});
|
|
366962
|
+
}
|
|
366963
|
+
reload() {
|
|
366964
|
+
const { backendConnector, languageUtils, logger } = this.services;
|
|
366965
|
+
const currentLanguage = backendConnector.language;
|
|
366966
|
+
if (currentLanguage && currentLanguage.toLowerCase() === "cimode") return;
|
|
366967
|
+
const toLoad = [];
|
|
366968
|
+
const append = (lng) => {
|
|
366969
|
+
languageUtils.toResolveHierarchy(lng).forEach((l) => {
|
|
366970
|
+
if (toLoad.indexOf(l) < 0) toLoad.push(l);
|
|
366971
|
+
});
|
|
366972
|
+
};
|
|
366973
|
+
append(currentLanguage);
|
|
366974
|
+
if (this.allOptions.preload) this.allOptions.preload.forEach((l) => append(l));
|
|
366975
|
+
toLoad.forEach((lng) => {
|
|
366976
|
+
this.allOptions.ns.forEach((ns) => {
|
|
366977
|
+
backendConnector.read(lng, ns, "read", null, null, (err, data) => {
|
|
366978
|
+
if (err) logger.warn(`loading namespace ${ns} for language ${lng} failed`, err);
|
|
366979
|
+
if (!err && data) logger.log(`loaded namespace ${ns} for language ${lng}`, data);
|
|
366980
|
+
backendConnector.loaded(`${lng}|${ns}`, err, data);
|
|
366981
|
+
});
|
|
366982
|
+
});
|
|
366983
|
+
});
|
|
366984
|
+
}
|
|
366985
|
+
};
|
|
366986
|
+
Backend.type = "backend";
|
|
366987
|
+
//#endregion
|
|
366988
|
+
|
|
366989
|
+
|
|
366851
366990
|
|
|
366852
366991
|
/***/ },
|
|
366853
366992
|
|
|
@@ -370916,7 +371055,7 @@ class WMS {
|
|
|
370916
371055
|
(module) {
|
|
370917
371056
|
|
|
370918
371057
|
"use strict";
|
|
370919
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.
|
|
371058
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.16.0-dev.2","description":"iTwin.js frontend components","main":"lib/cjs/core-frontend.js","module":"lib/esm/core-frontend.js","typings":"lib/cjs/core-frontend","license":"MIT","scripts":{"build":"npm run -s copy:public && npm run -s build:cjs && npm run -s build:esm && npm run -s build:workers && npm run -s copy:draco","build:cjs":"npm run -s copy:js:cjs && tsc 1>&2 --outDir lib/cjs","build:esm":"npm run -s copy:js:esm && tsc 1>&2 --module ES2022 --outDir lib/esm","clean":"rimraf -g lib .rush/temp/package-deps*.json","copy:public":"cpx \\"./src/public/**/*\\" ./lib/public","copy:js:cjs":"cpx \\"./src/**/*.js\\" ./lib/cjs","copy:js:esm":"cpx \\"./src/**/*.js\\" ./lib/esm","copy:draco":"cpx \\"./node_modules/@loaders.gl/draco/dist/libs/*\\" ./lib/public/scripts","docs":"betools docs --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts && npm run -s extract","extract":"betools extract --fileExt=ts --extractFrom=./src/test/example-code --recursive --out=../../generated-docs/extract","extract-api":"betools extract-api --entry=core-frontend && npm run extract-extension-api","extract-extension-api":"eslint --no-inline-config -c extraction.eslint.config.js \\"./src/**/*.ts\\" 1>&2","lint":"eslint \\"./src/**/*.ts\\" 1>&2","lint-fix":"eslint --fix -f visualstudio \\"./src/**/*.ts\\" 1>&2","lint-deprecation":"eslint --fix -f visualstudio --no-inline-config -c ../../common/config/eslint/eslint.config.deprecation-policy.js \\"./src/**/*.ts\\"","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run build:test-worker && vitest --run","cover":"npm run build:test-worker && vitest --run","build:test-worker":"vite build --config ./src/test/worker/vite.config.mts 1>&2","build:workers":"rimraf lib/workers/webpack && vite build --config ./src/workers/ImdlParser/vite.config.mts 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core.git","directory":"core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*"},"//devDependencies":["NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install","NOTE: All tools used by scripts in this package must be listed as devDependencies"],"devDependencies":{"@bentley/aec-units-schema":"^1.0.3","@bentley/formats-schema":"^1.0.0","@bentley/units-schema":"^1.0.12","@itwin/appui-abstract":"workspace:*","@itwin/build-tools":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*","@itwin/object-storage-core":"^3.0.4","@itwin/eslint-plugin":"^6.0.0","@types/node":"~20.17.0","@types/sinon":"^17.0.2","@vitest/browser-playwright":"^4.1.10","@vitest/coverage-v8":"^4.1.10","cpx2":"^8.0.0","eslint":"^9.31.0","playwright":"~1.56.1","rimraf":"^6.0.1","sinon":"^17.0.2","typescript":"~5.6.2","vite":"^6.4.4","vitest":"^4.1.10"},"//dependencies":["NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API","NOTE: core-frontend should remain UI technology agnostic, so no react/angular dependencies are allowed"],"dependencies":{"@itwin/core-i18n":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^4.4.5","@loaders.gl/draco":"^4.4.5","fuse.js":"^3.3.0","wms-capabilities":"0.6.0"}}');
|
|
370920
371059
|
|
|
370921
371060
|
/***/ },
|
|
370922
371061
|
|
|
@@ -370988,36 +371127,6 @@ module.exports = /*#__PURE__*/JSON.parse('{"$schema":"../../../node_modules/@itw
|
|
|
370988
371127
|
/******/ return getter;
|
|
370989
371128
|
/******/ };
|
|
370990
371129
|
/******/
|
|
370991
|
-
/******/ /* webpack/runtime/create fake namespace object */
|
|
370992
|
-
/******/ (() => {
|
|
370993
|
-
/******/ const getProto = Object.getPrototypeOf;
|
|
370994
|
-
/******/ let leafPrototypes;
|
|
370995
|
-
/******/ // create a fake namespace object
|
|
370996
|
-
/******/ // mode & 1: value is a module id, require it
|
|
370997
|
-
/******/ // mode & 2: merge all properties of value into the ns
|
|
370998
|
-
/******/ // mode & 4: return value when already ns object
|
|
370999
|
-
/******/ // mode & 16: return value when it's Promise-like
|
|
371000
|
-
/******/ // mode & 8|1: behave like require
|
|
371001
|
-
/******/ __webpack_require__.t = function(value, mode) {
|
|
371002
|
-
/******/ if(mode & 1) value = this(value);
|
|
371003
|
-
/******/ if(mode & 8) return value;
|
|
371004
|
-
/******/ if(typeof value === 'object' && value) {
|
|
371005
|
-
/******/ if((mode & 4) && value.__esModule) return value;
|
|
371006
|
-
/******/ if((mode & 16) && typeof value.then === 'function') return value;
|
|
371007
|
-
/******/ }
|
|
371008
|
-
/******/ const ns = Object.create(null);
|
|
371009
|
-
/******/ __webpack_require__.r(ns);
|
|
371010
|
-
/******/ const def = {};
|
|
371011
|
-
/******/ leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];
|
|
371012
|
-
/******/ for(var current = mode & 2 && value; (typeof current == 'object' || typeof current == 'function') && !~leafPrototypes.indexOf(current); current = getProto(current)) {
|
|
371013
|
-
/******/ Object.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key])));
|
|
371014
|
-
/******/ }
|
|
371015
|
-
/******/ def['default'] = () => (value);
|
|
371016
|
-
/******/ __webpack_require__.d(ns, def);
|
|
371017
|
-
/******/ return ns;
|
|
371018
|
-
/******/ };
|
|
371019
|
-
/******/ })();
|
|
371020
|
-
/******/
|
|
371021
371130
|
/******/ /* webpack/runtime/define property getters */
|
|
371022
371131
|
/******/ // define getter/value functions for harmony exports
|
|
371023
371132
|
/******/ __webpack_require__.d = (exports, definition) => {
|