@itwin/rpcinterface-full-stack-tests 4.3.0-dev.31 → 4.3.0-dev.34

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.
@@ -42527,6 +42527,7 @@ __webpack_require__.r(__webpack_exports__);
42527
42527
  /* harmony export */ });
42528
42528
  /* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
42529
42529
  /* harmony import */ var _BackgroundMapProvider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BackgroundMapProvider */ "../../core/common/lib/esm/BackgroundMapProvider.js");
42530
+ /* eslint-disable deprecation/deprecation */
42530
42531
  /*---------------------------------------------------------------------------------------------
42531
42532
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
42532
42533
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -42660,6 +42661,9 @@ class ImageMapLayerSettings extends MapLayerSettings {
42660
42661
  this.formatId = props.formatId;
42661
42662
  this.url = props.url;
42662
42663
  this.accessKey = props.accessKey;
42664
+ if (props.queryParams) {
42665
+ this.savedQueryParams = { ...props.queryParams };
42666
+ }
42663
42667
  this.subLayers = [];
42664
42668
  if (!props.subLayers)
42665
42669
  return;
@@ -42679,6 +42683,8 @@ class ImageMapLayerSettings extends MapLayerSettings {
42679
42683
  props.formatId = this.formatId;
42680
42684
  if (this.subLayers.length > 0)
42681
42685
  props.subLayers = this.subLayers.map((x) => x.toJSON());
42686
+ if (this.savedQueryParams)
42687
+ props.queryParams = { ...this.savedQueryParams };
42682
42688
  return props;
42683
42689
  }
42684
42690
  /** Create a copy of this MapLayerSettings, optionally modifying some of its properties.
@@ -42691,6 +42697,10 @@ class ImageMapLayerSettings extends MapLayerSettings {
42691
42697
  clone.userName = this.userName;
42692
42698
  clone.password = this.password;
42693
42699
  clone.accessKey = this.accessKey;
42700
+ if (this.unsavedQueryParams)
42701
+ clone.unsavedQueryParams = { ...this.unsavedQueryParams };
42702
+ if (this.savedQueryParams)
42703
+ clone.savedQueryParams = { ...this.savedQueryParams };
42694
42704
  return clone;
42695
42705
  }
42696
42706
  /** @internal */
@@ -42700,6 +42710,12 @@ class ImageMapLayerSettings extends MapLayerSettings {
42700
42710
  props.url = changedProps.url ?? this.url;
42701
42711
  props.accessKey = changedProps.accessKey ?? this.accessKey;
42702
42712
  props.subLayers = changedProps.subLayers ?? this.subLayers;
42713
+ if (changedProps.queryParams) {
42714
+ props.queryParams = { ...changedProps.queryParams };
42715
+ }
42716
+ else if (this.savedQueryParams) {
42717
+ props.queryParams = { ...this.savedQueryParams };
42718
+ }
42703
42719
  return props;
42704
42720
  }
42705
42721
  /** @internal */
@@ -42768,6 +42784,17 @@ class ImageMapLayerSettings extends MapLayerSettings {
42768
42784
  this.userName = userName;
42769
42785
  this.password = password;
42770
42786
  }
42787
+ /** Collect all query parameters
42788
+ * @beta
42789
+ */
42790
+ collectQueryParams() {
42791
+ let queryParams = {};
42792
+ if (this.savedQueryParams)
42793
+ queryParams = { ...this.savedQueryParams };
42794
+ if (this.unsavedQueryParams)
42795
+ queryParams = { ...queryParams, ...this.unsavedQueryParams };
42796
+ return queryParams;
42797
+ }
42771
42798
  }
42772
42799
  /** Normalized representation of a [[ModelMapLayerProps]] for which values have been validated and default values have been applied where explicit values not defined.
42773
42800
  * Model map layers are produced from models, typically from two dimensional geometry that may originate in a GIS system.
@@ -47837,12 +47864,14 @@ __webpack_require__.r(__webpack_exports__);
47837
47864
  /* harmony export */ ThematicDisplaySensorSettings: () => (/* binding */ ThematicDisplaySensorSettings),
47838
47865
  /* harmony export */ ThematicGradientColorScheme: () => (/* binding */ ThematicGradientColorScheme),
47839
47866
  /* harmony export */ ThematicGradientMode: () => (/* binding */ ThematicGradientMode),
47840
- /* harmony export */ ThematicGradientSettings: () => (/* binding */ ThematicGradientSettings)
47867
+ /* harmony export */ ThematicGradientSettings: () => (/* binding */ ThematicGradientSettings),
47868
+ /* harmony export */ ThematicGradientTransparencyMode: () => (/* binding */ ThematicGradientTransparencyMode)
47841
47869
  /* harmony export */ });
47842
47870
  /* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
47843
47871
  /* harmony import */ var _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @itwin/core-geometry */ "../../core/geometry/lib/esm/core-geometry.js");
47844
47872
  /* harmony import */ var _ColorDef__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ColorDef */ "../../core/common/lib/esm/ColorDef.js");
47845
47873
  /* harmony import */ var _Gradient__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Gradient */ "../../core/common/lib/esm/Gradient.js");
47874
+ /* harmony import */ var _TextureProps__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./TextureProps */ "../../core/common/lib/esm/TextureProps.js");
47846
47875
  /*---------------------------------------------------------------------------------------------
47847
47876
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
47848
47877
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -47854,6 +47883,7 @@ __webpack_require__.r(__webpack_exports__);
47854
47883
 
47855
47884
 
47856
47885
 
47886
+
47857
47887
  /** A thematic gradient mode used to generate and apply a thematic effect to a scene.
47858
47888
  * @see [[ThematicGradientSettings.mode]]
47859
47889
  * @public
@@ -47870,6 +47900,24 @@ var ThematicGradientMode;
47870
47900
  /** Apply isolines to the scene to achieve an effect similar to a contour map. Can only be used with [[ThematicDisplayMode.Height]]. */
47871
47901
  ThematicGradientMode[ThematicGradientMode["IsoLines"] = 3] = "IsoLines";
47872
47902
  })(ThematicGradientMode || (ThematicGradientMode = {}));
47903
+ /** Describes how transparency is computed when applying a thematic gradient to a surface.
47904
+ * Each [[Gradient.KeyColor]] in [[ThematicGradientSettings.customKeys]] has a transparency value.
47905
+ * Each surface to which the gradient is applied has its own transparency.
47906
+ * The transparency mode determines how these two values are combined to compute the final transparency.
47907
+ * @see [[ThematicGradientSettings.transparencyMode]].
47908
+ * @public
47909
+ * @extensions
47910
+ */
47911
+ var ThematicGradientTransparencyMode;
47912
+ (function (ThematicGradientTransparencyMode) {
47913
+ /** Ignore the gradient's transparency, applying only the surface's own transparency. */
47914
+ ThematicGradientTransparencyMode[ThematicGradientTransparencyMode["SurfaceOnly"] = 0] = "SurfaceOnly";
47915
+ /** The final transparency is computed from the product of the surface and gradient alpha channels.
47916
+ * (Alpha is the inverse of transparency, where `alpha = (255 - transparency) / 255`).
47917
+ * If the gradient color is opaque, this produces the same result as [[SurfaceOnly]].
47918
+ */
47919
+ ThematicGradientTransparencyMode[ThematicGradientTransparencyMode["MultiplySurfaceAndGradient"] = 1] = "MultiplySurfaceAndGradient";
47920
+ })(ThematicGradientTransparencyMode || (ThematicGradientTransparencyMode = {}));
47873
47921
  /** A color scheme used to generate the colors of a thematic gradient within an applied range.
47874
47922
  * @see [[ThematicGradientSettings.colorScheme]]
47875
47923
  * @see [[ThematicDisplay.range]]
@@ -47900,24 +47948,32 @@ class ThematicGradientSettings {
47900
47948
  static get margin() { return .001; } // A fixed portion of the gradient for out of range values.
47901
47949
  static get contentRange() { return 1.0 - 2.0 * ThematicGradientSettings.margin; }
47902
47950
  static get contentMax() { return 1.0 - ThematicGradientSettings.margin; }
47951
+ /** @alpha */
47952
+ get textureTransparency() {
47953
+ let transp = _TextureProps__WEBPACK_IMPORTED_MODULE_4__.TextureTransparency.Opaque;
47954
+ if (ThematicGradientColorScheme.Custom === this.colorScheme) {
47955
+ let haveOpaque = false;
47956
+ let haveTransparent = false;
47957
+ for (const key of this.customKeys) {
47958
+ const isOpaque = key.color.isOpaque;
47959
+ haveOpaque = haveOpaque || isOpaque;
47960
+ haveTransparent = haveTransparent || !isOpaque;
47961
+ }
47962
+ if (haveTransparent)
47963
+ transp = haveOpaque ? _TextureProps__WEBPACK_IMPORTED_MODULE_4__.TextureTransparency.Mixed : _TextureProps__WEBPACK_IMPORTED_MODULE_4__.TextureTransparency.Translucent;
47964
+ }
47965
+ if (transp !== _TextureProps__WEBPACK_IMPORTED_MODULE_4__.TextureTransparency.Mixed)
47966
+ if (this.marginColor.isOpaque !== (transp === _TextureProps__WEBPACK_IMPORTED_MODULE_4__.TextureTransparency.Opaque))
47967
+ transp = _TextureProps__WEBPACK_IMPORTED_MODULE_4__.TextureTransparency.Mixed;
47968
+ return transp;
47969
+ }
47903
47970
  equals(other) {
47904
- if (this.mode !== other.mode)
47905
- return false;
47906
- if (this.stepCount !== other.stepCount)
47907
- return false;
47908
- if (!this.marginColor.equals(other.marginColor))
47909
- return false;
47910
- if (this.colorScheme !== other.colorScheme)
47911
- return false;
47912
- if (this.customKeys.length !== other.customKeys.length)
47913
- return false;
47914
- if (this.colorMix !== other.colorMix)
47971
+ if (this.mode !== other.mode || this.stepCount !== other.stepCount || !this.marginColor.equals(other.marginColor)
47972
+ || this.colorScheme !== other.colorScheme || this.customKeys.length !== other.customKeys.length
47973
+ || this.colorMix !== other.colorMix || this.transparencyMode !== other.transparencyMode) {
47915
47974
  return false;
47916
- for (let i = 0; i < this.customKeys.length; i++) {
47917
- if (!_Gradient__WEBPACK_IMPORTED_MODULE_3__.Gradient.keyColorEquals(this.customKeys[i], other.customKeys[i]))
47918
- return false;
47919
47975
  }
47920
- return true;
47976
+ return this.customKeys.every((key, index) => _Gradient__WEBPACK_IMPORTED_MODULE_3__.Gradient.keyColorEquals(key, other.customKeys[index]));
47921
47977
  }
47922
47978
  /** Compares two sets of thematic gradient settings.
47923
47979
  * @param lhs First set of thematic gradient settings to compare
@@ -47938,10 +47994,11 @@ class ThematicGradientSettings {
47938
47994
  return diff;
47939
47995
  if ((diff = (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.compareNumbers)(lhs.customKeys.length, rhs.customKeys.length)) !== 0)
47940
47996
  return diff;
47941
- for (let i = 0; i < lhs.customKeys.length; i++) {
47997
+ if ((diff = (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.compareNumbers)(lhs.transparencyMode, rhs.transparencyMode)) !== 0)
47998
+ return diff;
47999
+ for (let i = 0; i < lhs.customKeys.length; i++)
47942
48000
  if ((diff = (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.compareNumbers)(lhs.customKeys[i].color.tbgr, rhs.customKeys[i].color.tbgr)) !== 0)
47943
48001
  return diff;
47944
- }
47945
48002
  return diff;
47946
48003
  }
47947
48004
  constructor(json) {
@@ -47952,6 +48009,7 @@ class ThematicGradientSettings {
47952
48009
  this.marginColor = _ColorDef__WEBPACK_IMPORTED_MODULE_2__.ColorDef.fromJSON();
47953
48010
  this.colorScheme = ThematicGradientColorScheme.BlueRed;
47954
48011
  this.colorMix = 0.0;
48012
+ this.transparencyMode = ThematicGradientTransparencyMode.SurfaceOnly;
47955
48013
  }
47956
48014
  else {
47957
48015
  this.mode = (json.mode !== undefined && json.mode !== null) ? json.mode : ThematicGradientMode.Smooth;
@@ -47973,6 +48031,7 @@ class ThematicGradientSettings {
47973
48031
  this.customKeys.push(new _Gradient__WEBPACK_IMPORTED_MODULE_3__.Gradient.KeyColor({ value: keyValue[0], color: _ColorDef__WEBPACK_IMPORTED_MODULE_2__.ColorDef.computeTbgrFromComponents(keyValue[1], keyValue[3], keyValue[2]) }));
47974
48032
  }
47975
48033
  this.colorMix = json.colorMix ?? 0.0;
48034
+ this.transparencyMode = json.transparencyMode ?? ThematicGradientTransparencyMode.SurfaceOnly;
47976
48035
  }
47977
48036
  }
47978
48037
  static fromJSON(json) {
@@ -47991,6 +48050,8 @@ class ThematicGradientSettings {
47991
48050
  props.colorScheme = this.colorScheme;
47992
48051
  if (0 !== this.colorMix)
47993
48052
  props.colorMix = this.colorMix;
48053
+ if (ThematicGradientTransparencyMode.SurfaceOnly !== this.transparencyMode)
48054
+ props.transparencyMode = this.transparencyMode;
47994
48055
  if (this.customKeys.length > 0)
47995
48056
  props.customKeys = this.customKeys.map((key) => { return { value: key.value, color: key.color.toJSON() }; });
47996
48057
  return props;
@@ -48009,6 +48070,7 @@ class ThematicGradientSettings {
48009
48070
  colorScheme: undefined !== changedProps.colorScheme ? changedProps.colorScheme : this.colorScheme,
48010
48071
  customKeys: undefined !== changedProps.customKeys ? changedProps.customKeys : this.customKeys.map((key) => ({ value: key.value, color: key.color.tbgr })),
48011
48072
  colorMix: undefined !== changedProps.colorMix ? changedProps.colorMix : this.colorMix,
48073
+ transparencyMode: changedProps.transparencyMode ?? this.transparencyMode,
48012
48074
  };
48013
48075
  return ThematicGradientSettings.fromJSON(props);
48014
48076
  }
@@ -49838,6 +49900,7 @@ __webpack_require__.r(__webpack_exports__);
49838
49900
  /* harmony export */ ThematicGradientColorScheme: () => (/* reexport safe */ _ThematicDisplay__WEBPACK_IMPORTED_MODULE_106__.ThematicGradientColorScheme),
49839
49901
  /* harmony export */ ThematicGradientMode: () => (/* reexport safe */ _ThematicDisplay__WEBPACK_IMPORTED_MODULE_106__.ThematicGradientMode),
49840
49902
  /* harmony export */ ThematicGradientSettings: () => (/* reexport safe */ _ThematicDisplay__WEBPACK_IMPORTED_MODULE_106__.ThematicGradientSettings),
49903
+ /* harmony export */ ThematicGradientTransparencyMode: () => (/* reexport safe */ _ThematicDisplay__WEBPACK_IMPORTED_MODULE_106__.ThematicGradientTransparencyMode),
49841
49904
  /* harmony export */ TileContentSource: () => (/* reexport safe */ _TileProps__WEBPACK_IMPORTED_MODULE_108__.TileContentSource),
49842
49905
  /* harmony export */ TileFormat: () => (/* reexport safe */ _tile_TileIO__WEBPACK_IMPORTED_MODULE_149__.TileFormat),
49843
49906
  /* harmony export */ TileHeader: () => (/* reexport safe */ _tile_TileIO__WEBPACK_IMPORTED_MODULE_149__.TileHeader),
@@ -105194,6 +105257,7 @@ const extensionExports = {
105194
105257
  ThematicDisplayMode: _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.ThematicDisplayMode,
105195
105258
  ThematicGradientColorScheme: _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.ThematicGradientColorScheme,
105196
105259
  ThematicGradientMode: _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.ThematicGradientMode,
105260
+ ThematicGradientTransparencyMode: _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.ThematicGradientTransparencyMode,
105197
105261
  Tile: _core_frontend__WEBPACK_IMPORTED_MODULE_1__.Tile,
105198
105262
  TileAdmin: _core_frontend__WEBPACK_IMPORTED_MODULE_1__.TileAdmin,
105199
105263
  TileBoundingBoxes: _core_frontend__WEBPACK_IMPORTED_MODULE_1__.TileBoundingBoxes,
@@ -114497,8 +114561,16 @@ class BranchState {
114497
114561
  return overrides.getAppearance(elemLo, elemHi, subcatLo, subcatHi, geomClass, modelLo, modelHi, type, animationNodeId);
114498
114562
  }
114499
114563
  static createForDecorations() {
114500
- const vf = new _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.ViewFlags({ renderMode: _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.RenderMode.SmoothShade, lighting: false, whiteOnWhiteReversal: false });
114501
- return new BranchState({ viewFlags: vf, transform: _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Transform.createIdentity(), symbologyOverrides: new _FeatureSymbology__WEBPACK_IMPORTED_MODULE_2__.FeatureSymbology.Overrides(), edgeSettings: _EdgeSettings__WEBPACK_IMPORTED_MODULE_3__.EdgeSettings.create(undefined), is3d: true });
114564
+ const viewFlags = new _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.ViewFlags({ renderMode: _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.RenderMode.SmoothShade, lighting: false, whiteOnWhiteReversal: false });
114565
+ const symbologyOverrides = new _FeatureSymbology__WEBPACK_IMPORTED_MODULE_2__.FeatureSymbology.Overrides();
114566
+ symbologyOverrides.ignoreSubCategory = true;
114567
+ return new BranchState({
114568
+ viewFlags,
114569
+ transform: _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Transform.createIdentity(),
114570
+ symbologyOverrides,
114571
+ edgeSettings: _EdgeSettings__WEBPACK_IMPORTED_MODULE_3__.EdgeSettings.create(undefined),
114572
+ is3d: true,
114573
+ });
114502
114574
  }
114503
114575
  withViewCoords() {
114504
114576
  return new BranchState({ ...this._opts, forceViewCoords: true });
@@ -118950,6 +119022,8 @@ class WorldDecorations extends Branch {
118950
119022
  super(new _GraphicBranch__WEBPACK_IMPORTED_MODULE_4__.GraphicBranch(), _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Transform.identity, viewFlags);
118951
119023
  // World decorations ignore all the symbology overrides for the "scene" geometry...
118952
119024
  this.branch.symbologyOverrides = new _FeatureSymbology__WEBPACK_IMPORTED_MODULE_3__.FeatureSymbology.Overrides();
119025
+ // Make all subcategories visible.
119026
+ this.branch.symbologyOverrides.ignoreSubCategory = true;
118953
119027
  }
118954
119028
  init(decs) {
118955
119029
  this.branch.clear();
@@ -128427,7 +128501,8 @@ class SurfaceGeometry extends _MeshGeometry__WEBPACK_IMPORTED_MODULE_7__.MeshGeo
128427
128501
  return target.isReadPixelsInProgress ? opaquePass : "translucent";
128428
128502
  const vf = target.currentViewFlags;
128429
128503
  // When rendering thematic isolines, we need translucency because they have anti-aliasing.
128430
- if (target.wantThematicDisplay && this.supportsThematicDisplay && target.uniforms.thematic.wantIsoLines)
128504
+ const thematic = target.wantThematicDisplay && this.supportsThematicDisplay ? target.uniforms.thematic.thematicDisplay : undefined;
128505
+ if (thematic && target.uniforms.thematic.wantIsoLines)
128431
128506
  return "translucent";
128432
128507
  // In wireframe, unless fill is explicitly enabled for planar region, surface does not draw
128433
128508
  if (_itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.RenderMode.Wireframe === vf.renderMode && !this.mesh.isTextureAlwaysDisplayed) {
@@ -128439,6 +128514,18 @@ class SurfaceGeometry extends _MeshGeometry__WEBPACK_IMPORTED_MODULE_7__.MeshGeo
128439
128514
  // If transparency disabled by render mode or view flag, always draw opaque.
128440
128515
  if (!vf.transparency || _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.RenderMode.SolidFill === vf.renderMode || _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.RenderMode.HiddenLine === vf.renderMode)
128441
128516
  return opaquePass;
128517
+ // A gradient texture applied by analysis style always fully determines the transparency of the surface.
128518
+ if (this.hasScalarAnimation && undefined !== target.analysisTexture) {
128519
+ (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(undefined !== target.analysisStyle?.thematic);
128520
+ switch (target.analysisStyle.thematic.thematicSettings.textureTransparency) {
128521
+ case _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.TextureTransparency.Translucent:
128522
+ return "translucent";
128523
+ case _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.TextureTransparency.Opaque:
128524
+ return opaquePass;
128525
+ case _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.TextureTransparency.Mixed:
128526
+ return `${opaquePass}-translucent`;
128527
+ }
128528
+ }
128442
128529
  // We have 3 sources of alpha: the material, the texture, and the color.
128443
128530
  // Base alpha comes from the material if it overrides it; otherwise from the color.
128444
128531
  // The texture's alpha is multiplied by the base alpha.
@@ -128449,8 +128536,21 @@ class SurfaceGeometry extends _MeshGeometry__WEBPACK_IMPORTED_MODULE_7__.MeshGeo
128449
128536
  hasAlpha = mat.hasTranslucency;
128450
128537
  else
128451
128538
  hasAlpha = this.getColor(target).hasTranslucency;
128539
+ // Thematic gradient can optionally multiply gradient alpha with surface alpha.
128540
+ if (thematic && thematic.gradientSettings.transparencyMode === _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.ThematicGradientTransparencyMode.MultiplySurfaceAndGradient) {
128541
+ switch (thematic.gradientSettings.textureTransparency) {
128542
+ case _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.TextureTransparency.Opaque:
128543
+ // This surface's alpha gets multiplied by 1 - gradient colors are all opaque.
128544
+ return hasAlpha ? "translucent" : opaquePass;
128545
+ case _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.TextureTransparency.Translucent:
128546
+ // This surface's alpha gets multiplied by < 1 - gradient colors are all translucent.
128547
+ return "translucent";
128548
+ case _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.TextureTransparency.Mixed:
128549
+ // The gradient contains a mix of translucent and opaque colors.
128550
+ return hasAlpha ? "translucent" : `${opaquePass}-translucent`;
128551
+ }
128552
+ }
128452
128553
  if (!hasAlpha) {
128453
- // ###TODO handle TextureTransparency.Mixed; remove Texture.hasTranslucency.
128454
128554
  const tex = this.wantTextures(target, true) ? this.texture : undefined;
128455
128555
  switch (tex?.transparency) {
128456
128556
  case _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.TextureTransparency.Translucent:
@@ -132933,9 +133033,9 @@ class ThematicUniforms {
132933
133033
  this._colorMix = 0.0;
132934
133034
  this._axis = new Float32Array(3);
132935
133035
  this._sunDirection = new Float32Array(3);
132936
- this._marginColor = new Float32Array(3);
133036
+ this._marginColor = new _FloatRGBA__WEBPACK_IMPORTED_MODULE_8__.FloatRgba();
132937
133037
  this._displayMode = new Float32Array(1);
132938
- this._fragSettings = new Float32Array(3); // gradientMode, distanceCutoff, stepCount
133038
+ this._fragSettings = new Float32Array(4); // gradientMode, distanceCutoff, stepCount, > 0.0 if multiply gradient alpha
132939
133039
  this._numSensors = 0;
132940
133040
  this._gradientDimension = _getGradientDimension();
132941
133041
  this.syncKey = 0;
@@ -133009,15 +133109,13 @@ class ThematicUniforms {
133009
133109
  this._updateAxis(this.thematicDisplay.axis, (_itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.ThematicDisplayMode.Slope === this.thematicDisplay.displayMode) ? target.uniforms.frustum.viewMatrix : undefined);
133010
133110
  if (_itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.ThematicDisplayMode.HillShade === this.thematicDisplay.displayMode)
133011
133111
  this._updateSunDirection(this.thematicDisplay.sunDirection, target.uniforms.frustum.viewMatrix);
133012
- const marginRgb = _FloatRGBA__WEBPACK_IMPORTED_MODULE_8__.FloatRgb.fromColorDef(this.thematicDisplay.gradientSettings.marginColor);
133013
- this._marginColor[0] = marginRgb.red;
133014
- this._marginColor[1] = marginRgb.green;
133015
- this._marginColor[2] = marginRgb.blue;
133112
+ this._marginColor.setColorDef(this.thematicDisplay.gradientSettings.marginColor);
133016
133113
  this._displayMode[0] = this.thematicDisplay.displayMode;
133017
133114
  this._fragSettings[0] = this.thematicDisplay.gradientSettings.mode;
133018
133115
  const sensorSettings = this.thematicDisplay.sensorSettings;
133019
133116
  this._fragSettings[1] = (undefined === sensorSettings) ? 0 : this.thematicDisplay.sensorSettings.distanceCutoff;
133020
133117
  this._fragSettings[2] = Math.min(this.thematicDisplay.gradientSettings.stepCount, this._gradientDimension);
133118
+ this._fragSettings[3] = this.thematicDisplay.gradientSettings.transparencyMode === _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.ThematicGradientTransparencyMode.SurfaceOnly ? 0.0 : 1.0;
133021
133119
  // If we want sensors and have no distance cutoff, then create a global shared sensor texture.
133022
133120
  if (target.wantThematicSensors && !(this._distanceCutoff > 0)) {
133023
133121
  this._numSensors = sensorSettings.sensors.length;
@@ -133042,7 +133140,7 @@ class ThematicUniforms {
133042
133140
  }
133043
133141
  bindMarginColor(uniform) {
133044
133142
  if (!(0,_Sync__WEBPACK_IMPORTED_MODULE_3__.sync)(this, uniform))
133045
- uniform.setUniform3fv(this._marginColor);
133143
+ this._marginColor.bind(uniform);
133046
133144
  }
133047
133145
  bindDisplayMode(uniform) {
133048
133146
  if (!(0,_Sync__WEBPACK_IMPORTED_MODULE_3__.sync)(this, uniform))
@@ -133050,7 +133148,7 @@ class ThematicUniforms {
133050
133148
  }
133051
133149
  bindFragSettings(uniform) {
133052
133150
  if (!(0,_Sync__WEBPACK_IMPORTED_MODULE_3__.sync)(this, uniform))
133053
- uniform.setUniform3fv(this._fragSettings);
133151
+ uniform.setUniform4fv(this._fragSettings);
133054
133152
  }
133055
133153
  bindTexture(uniform, unit) {
133056
133154
  (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(undefined !== this._texture);
@@ -140489,7 +140587,7 @@ const computeBaseColor = `
140489
140587
  // set to black if almost white and reverse white-on-white is on
140490
140588
  bvec3 isAlmostWhite = greaterThan(surfaceColor.rgb, almostWhite);
140491
140589
  surfaceColor.rgb = (u_reverseWhiteOnWhite && isAlmostWhite.r && isAlmostWhite.g && isAlmostWhite.b ? vec3(0.0, 0.0, 0.0) : surfaceColor.rgb);
140492
- return vec4(surfaceColor.rgb * g_surfaceTexel.rgb, g_surfaceTexel.a);
140590
+ return vec4(surfaceColor.rgb * g_surfaceTexel.rgb, g_surfaceTexel.a * surfaceColor.a);
140493
140591
  `;
140494
140592
  const surfaceFlagArray = new Int32Array(12 /* SurfaceBitIndex.Count */);
140495
140593
  /** @internal */
@@ -140610,16 +140708,12 @@ const discardClassifiedByAlpha = `
140610
140708
  bool isTranslucentPass = kRenderPass_Translucent == u_renderPass;
140611
140709
  return (isOpaquePass && hasAlpha) || (isTranslucentPass && !hasAlpha);
140612
140710
  `;
140613
- const discardByTextureAlpha = `
140614
- if (isSurfaceBitSet(kSurfaceBit_HasTexture)) {
140615
- float cutoff = abs(u_alphaCutoff);
140616
- if (kRenderPass_Translucent == u_renderPass)
140617
- return u_alphaCutoff > 0.0 && alpha >= cutoff;
140618
- else
140619
- return alpha < cutoff;
140620
- }
140621
-
140622
- return false;
140711
+ const discardByAlphaCutoff = `
140712
+ float cutoff = abs(u_alphaCutoff);
140713
+ if (kRenderPass_Translucent == u_renderPass)
140714
+ return u_alphaCutoff > 0.0 && alpha >= cutoff;
140715
+ else
140716
+ return alpha < cutoff;
140623
140717
  `;
140624
140718
  function addTransparencyDiscard(frag) {
140625
140719
  (0,_RenderPass__WEBPACK_IMPORTED_MODULE_16__.addRenderPass)(frag);
@@ -140634,7 +140728,7 @@ function addTransparencyDiscard(frag) {
140634
140728
  uniform.setUniform1f(cutoff);
140635
140729
  });
140636
140730
  });
140637
- frag.set(5 /* FragmentShaderComponent.DiscardByAlpha */, discardByTextureAlpha);
140731
+ frag.set(5 /* FragmentShaderComponent.DiscardByAlpha */, discardByAlphaCutoff);
140638
140732
  }
140639
140733
  /** @internal */
140640
140734
  function createSurfaceBuilder(flags) {
@@ -140792,11 +140886,11 @@ vec4 getSensor(int index) {
140792
140886
  // A stepped gradient texture is arranged with single unique color pixels for each step. The dimension of a stepped gradient texture is stepCount.
140793
140887
  // A smooth gradient texture is arranged with blended color pixels across the entire span of the texture. The dimension of a smooth gradient texture is the system's maximum texture size.
140794
140888
  const getColor = `
140795
- vec3 getColor(float ndx) {
140889
+ vec4 getColor(float ndx) {
140796
140890
  if (ndx < 0.0 || ndx > 1.0)
140797
140891
  return u_marginColor;
140798
140892
 
140799
- return TEXTURE(s_texture, vec2(0.0, ndx)).rgb;
140893
+ return TEXTURE(s_texture, vec2(0.0, ndx));
140800
140894
  }
140801
140895
  `;
140802
140896
  // Access a stepped gradient texture at the specified index taking into account isolines.
@@ -140804,12 +140898,12 @@ vec3 getColor(float ndx) {
140804
140898
  // specifically to ensure that the texels sampled result in lines of overall singular colors - no stepping into the
140805
140899
  // neighboring bands.
140806
140900
  const getIsoLineColor = `
140807
- vec3 getIsoLineColor(float ndx, float stepCount) {
140901
+ vec4 getIsoLineColor(float ndx, float stepCount) {
140808
140902
  if (ndx < 0.01 || ndx > 0.99)
140809
140903
  return u_marginColor;
140810
140904
 
140811
140905
  ndx += 0.5 / stepCount; // center on step pixels
140812
- return TEXTURE(s_texture, vec2(0.0, ndx)).rgb;
140906
+ return TEXTURE(s_texture, vec2(0.0, ndx));
140813
140907
  }
140814
140908
  `;
140815
140909
  const fwidth = `\nfloat _universal_fwidth(float coord) { return fwidth(coord); }\n`;
@@ -140875,7 +140969,8 @@ const applyThematicColorPostlude = `
140875
140969
  float gradientMode = u_thematicSettings.x;
140876
140970
  float stepCount = u_thematicSettings.z;
140877
140971
 
140878
- vec4 rgba = vec4((kThematicGradientMode_IsoLines == gradientMode) ? getIsoLineColor(ndx, stepCount) : getColor(ndx), baseColor.a);
140972
+ vec4 rgba = (kThematicGradientMode_IsoLines == gradientMode) ? getIsoLineColor(ndx, stepCount) : getColor(ndx);
140973
+ rgba.a = baseColor.a * (u_thematicSettings.w > 0.0 ? rgba.a : 1.0);
140879
140974
  rgba = mix(rgba, baseColor, u_thematicColorMix);
140880
140975
 
140881
140976
  if (kThematicGradientMode_IsoLines == gradientMode) {
@@ -140900,7 +140995,8 @@ const applyThematicColorPostludeForPointClouds = `
140900
140995
  float gradientMode = u_thematicSettings.x;
140901
140996
  float stepCount = u_thematicSettings.z;
140902
140997
 
140903
- vec4 rgba = vec4((kThematicGradientMode_IsoLines == gradientMode) ? getIsoLineColor(ndx, stepCount) : getColor(ndx), baseColor.a);
140998
+ vec4 rgba = (kThematicGradientMode_IsoLines == gradientMode) ? getIsoLineColor(ndx, stepCount) : getColor(ndx);
140999
+ rgba.a = baseColor.a * (u_thematicSettings.w > 0.0 ? rgba.a : 1.0);
140904
141000
  rgba = mix(rgba, baseColor, u_thematicColorMix);
140905
141001
 
140906
141002
  if (kThematicGradientMode_IsoLines == gradientMode) {
@@ -141003,13 +141099,13 @@ function addThematicDisplay(builder, isForPointClouds = false, isForTerrainMesh
141003
141099
  params.target.uniforms.thematic.bindDisplayMode(uniform);
141004
141100
  });
141005
141101
  });
141006
- frag.addUniform("u_marginColor", 4 /* VariableType.Vec3 */, (prog) => {
141102
+ frag.addUniform("u_marginColor", 5 /* VariableType.Vec4 */, (prog) => {
141007
141103
  prog.addGraphicUniform("u_marginColor", (uniform, params) => {
141008
141104
  params.target.uniforms.thematic.bindMarginColor(uniform);
141009
141105
  });
141010
141106
  });
141011
141107
  // gradientMode, distanceCutoff, stepCount
141012
- builder.addUniform("u_thematicSettings", 4 /* VariableType.Vec3 */, (prog) => {
141108
+ builder.addUniform("u_thematicSettings", 5 /* VariableType.Vec4 */, (prog) => {
141013
141109
  prog.addGraphicUniform("u_thematicSettings", (uniform, params) => {
141014
141110
  params.target.uniforms.thematic.bindFragSettings(uniform);
141015
141111
  });
@@ -153388,9 +153484,8 @@ __webpack_require__.r(__webpack_exports__);
153388
153484
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
153389
153485
  /* harmony export */ ArcGISTileMap: () => (/* binding */ ArcGISTileMap)
153390
153486
  /* harmony export */ });
153391
- /* harmony import */ var _request_Request__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../request/Request */ "../../core/frontend/lib/esm/request/Request.js");
153392
- /* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
153393
- /* harmony import */ var _internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../internal */ "../../core/frontend/lib/esm/tile/internal.js");
153487
+ /* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
153488
+ /* harmony import */ var _internal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../internal */ "../../core/frontend/lib/esm/tile/internal.js");
153394
153489
  /*---------------------------------------------------------------------------------------------
153395
153490
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
153396
153491
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -153400,16 +153495,15 @@ __webpack_require__.r(__webpack_exports__);
153400
153495
  */
153401
153496
 
153402
153497
 
153403
-
153404
153498
  const nonVisibleChildren = [false, false, false, false];
153405
153499
  /** @internal */
153406
153500
  class ArcGISTileMap {
153407
- constructor(restBaseUrl, settings, nbLods, accessClient) {
153501
+ constructor(restBaseUrl, settings, fetchFunc, nbLods) {
153408
153502
  this.tileMapRequestSize = 32;
153409
153503
  this.fallbackTileMapRequestSize = 2;
153410
- this._tilesCache = new _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_1__.Dictionary((lhs, rhs) => (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_1__.compareStrings)(lhs, rhs));
153504
+ this._tilesCache = new _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Dictionary((lhs, rhs) => (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.compareStrings)(lhs, rhs));
153411
153505
  this._restBaseUrl = restBaseUrl;
153412
- this._accessClient = accessClient;
153506
+ this._fetchFunc = fetchFunc;
153413
153507
  this._settings = settings;
153414
153508
  if (nbLods !== undefined && nbLods > 0) {
153415
153509
  this._callQueues = new Array(nbLods).fill(Promise.resolve(nonVisibleChildren));
@@ -153417,19 +153511,8 @@ class ArcGISTileMap {
153417
153511
  }
153418
153512
  async fetchTileMapFromServer(level, row, column, width, height) {
153419
153513
  const tmpUrl = `${this._restBaseUrl}/tilemap/${level}/${row}/${column}/${width}/${height}?f=json`;
153420
- const urlObj = new URL(tmpUrl);
153421
- try {
153422
- if (this._accessClient) {
153423
- await _internal__WEBPACK_IMPORTED_MODULE_2__.ArcGisUtilities.appendSecurityToken(urlObj, this._accessClient, {
153424
- mapLayerUrl: new URL(this._settings.url),
153425
- userName: this._settings.userName,
153426
- password: this._settings.password,
153427
- });
153428
- }
153429
- }
153430
- catch {
153431
- }
153432
- return (0,_request_Request__WEBPACK_IMPORTED_MODULE_0__.request)(urlObj.toString(), "json");
153514
+ const response = await this._fetchFunc(new URL(tmpUrl));
153515
+ return response.json();
153433
153516
  }
153434
153517
  getAvailableTilesFromCache(tiles) {
153435
153518
  let allTilesFound = true;
@@ -153502,7 +153585,7 @@ class ArcGISTileMap {
153502
153585
  if (json.adjusted) {
153503
153586
  // If tilemap size got adjusted, I'm expecting to get adjusted size...
153504
153587
  // otherwise there is something really odd with this server.
153505
- (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_1__.assert)(json.location?.width !== undefined && json.location?.height !== undefined);
153588
+ (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(json.location?.width !== undefined && json.location?.height !== undefined);
153506
153589
  if (json.location?.width !== undefined && json.location?.height !== undefined) {
153507
153590
  tileMapWidth = json.location?.width;
153508
153591
  tileMapHeight = json.location?.height;
@@ -153515,7 +153598,7 @@ class ArcGISTileMap {
153515
153598
  const curColumn = reqColumn + i;
153516
153599
  const curRow = reqRow + j;
153517
153600
  // console.log(`Tilemap tile:: ${level},${curRow},${curColumn} => ${avail}`);
153518
- this._tilesCache.set(_internal__WEBPACK_IMPORTED_MODULE_2__.QuadId.getTileContentId(level, curColumn, curRow), avail);
153601
+ this._tilesCache.set(_internal__WEBPACK_IMPORTED_MODULE_1__.QuadId.getTileContentId(level, curColumn, curRow), avail);
153519
153602
  // Check if actual tile is among the children we are looking for, if so update the availability array.
153520
153603
  if (curColumn >= queryTiles[0].column && curColumn <= queryTiles[queryTiles.length - 1].column
153521
153604
  && curRow >= queryTiles[0].row && curRow <= queryTiles[queryTiles.length - 1].row) {
@@ -153530,7 +153613,7 @@ class ArcGISTileMap {
153530
153613
  // Mark all tilemap tiles to non-available in the cache too
153531
153614
  for (let j = 0; j < tileMapWidth; j++) {
153532
153615
  for (let i = 0; i < tileMapHeight; i++) {
153533
- this._tilesCache.set(_internal__WEBPACK_IMPORTED_MODULE_2__.QuadId.getTileContentId(level, reqColumn + i, reqRow + j), false);
153616
+ this._tilesCache.set(_internal__WEBPACK_IMPORTED_MODULE_1__.QuadId.getTileContentId(level, reqColumn + i, reqRow + j), false);
153534
153617
  }
153535
153618
  }
153536
153619
  }
@@ -153722,17 +153805,12 @@ class ArcGisUtilities {
153722
153805
  }
153723
153806
  /**
153724
153807
  * Attempt to access an ArcGIS service, and validate its service metadata.
153725
- * @param url URL of the source to validate.
153726
- * @param formatId Format Id of the source.
153727
- * @param capabilitiesFilter List of capabilities 'keyword' that needs to be advertised in the service's metadata
153728
- * in order to be valid. For example: 'Map', 'Query', etc
153729
- * @param userName Username to use for legacy token based security.
153730
- * @param password Password to use for legacy token based security.
153731
- * @param ignoreCache Flag to skip cache lookup (i.e. force a new server request)
153732
- * @return Validation Status. If successful, a list of available sub-layers will also be returned.
153733
- */
153734
- static async validateSource(url, formatId, capabilitiesFilter, userName, password, ignoreCache) {
153735
- const metadata = await this.getServiceJson(url, formatId, userName, password, ignoreCache);
153808
+ * @param source Source to validate.
153809
+ * @param opts Validation options
153810
+ */
153811
+ static async validateSource(args) {
153812
+ const { source, ignoreCache, capabilitiesFilter } = args;
153813
+ const metadata = await this.getServiceJson({ url: source.url, formatId: source.formatId, userName: source.userName, password: source.password, queryParams: source.collectQueryParams(), ignoreCache });
153736
153814
  const json = metadata?.content;
153737
153815
  if (json === undefined) {
153738
153816
  return { status: _internal__WEBPACK_IMPORTED_MODULE_1__.MapLayerSourceStatus.InvalidUrl };
@@ -153742,7 +153820,7 @@ class ArcGisUtilities {
153742
153820
  // and return information needed to initiate the authentification process... the end-user
153743
153821
  // will have to provide his credentials before we can fully validate this source.
153744
153822
  if (json.error.code === ArcGisErrorCode.TokenRequired) {
153745
- return (userName || password) ? { status: _internal__WEBPACK_IMPORTED_MODULE_1__.MapLayerSourceStatus.InvalidCredentials } : { status: _internal__WEBPACK_IMPORTED_MODULE_1__.MapLayerSourceStatus.RequireAuth };
153823
+ return (source.userName || source.password) ? { status: _internal__WEBPACK_IMPORTED_MODULE_1__.MapLayerSourceStatus.InvalidCredentials } : { status: _internal__WEBPACK_IMPORTED_MODULE_1__.MapLayerSourceStatus.RequireAuth };
153746
153824
  }
153747
153825
  else if (json.error.code === ArcGisErrorCode.InvalidCredentials)
153748
153826
  return { status: _internal__WEBPACK_IMPORTED_MODULE_1__.MapLayerSourceStatus.InvalidCredentials };
@@ -153793,16 +153871,30 @@ class ArcGisUtilities {
153793
153871
  * @param ignoreCache Flag to skip cache lookup (i.e. force a new server request)
153794
153872
  * @param requireToken Flag to indicate if a token is required
153795
153873
  */
153796
- static async getServiceJson(url, formatId, userName, password, ignoreCache, requireToken) {
153874
+ static async getServiceJson(args) {
153875
+ const { url, formatId, userName, password, queryParams, ignoreCache, requireToken } = args;
153797
153876
  if (!ignoreCache) {
153798
153877
  const cached = ArcGisUtilities._serviceCache.get(url);
153799
153878
  if (cached !== undefined)
153800
153879
  return cached;
153801
153880
  }
153881
+ const appendParams = (urlObj, params) => {
153882
+ if (params) {
153883
+ Object.keys(params).forEach((paramKey) => {
153884
+ if (!urlObj.searchParams.has(paramKey))
153885
+ urlObj.searchParams.append(paramKey, params[paramKey]);
153886
+ });
153887
+ }
153888
+ };
153889
+ const createUrlObj = () => {
153890
+ const tmpUrl = new URL(url);
153891
+ tmpUrl.searchParams.append("f", "json");
153892
+ appendParams(tmpUrl, queryParams);
153893
+ return tmpUrl;
153894
+ };
153802
153895
  let accessTokenRequired = false;
153803
153896
  try {
153804
- let tmpUrl = new URL(url);
153805
- tmpUrl.searchParams.append("f", "json");
153897
+ let tmpUrl = createUrlObj();
153806
153898
  // In some cases, caller might already know token is required, so append it immediately
153807
153899
  if (requireToken) {
153808
153900
  const accessClient = _IModelApp__WEBPACK_IMPORTED_MODULE_2__.IModelApp.mapLayerFormatRegistry.getAccessClient(formatId);
@@ -153821,8 +153913,7 @@ class ArcGisUtilities {
153821
153913
  // If token required
153822
153914
  const accessClient = _IModelApp__WEBPACK_IMPORTED_MODULE_2__.IModelApp.mapLayerFormatRegistry.getAccessClient(formatId);
153823
153915
  if (accessClient) {
153824
- tmpUrl = new URL(url);
153825
- tmpUrl.searchParams.append("f", "json");
153916
+ tmpUrl = createUrlObj();
153826
153917
  await ArcGisUtilities.appendSecurityToken(tmpUrl, accessClient, { mapLayerUrl: new URL(url), userName, password });
153827
153918
  response = await fetch(tmpUrl.toString(), { method: "GET" });
153828
153919
  errorCode = await ArcGisUtilities.checkForResponseErrorCode(response);
@@ -154722,7 +154813,7 @@ class ArcGISImageryProvider extends _internal__WEBPACK_IMPORTED_MODULE_0__.MapLa
154722
154813
  async getServiceJson() {
154723
154814
  let metadata;
154724
154815
  try {
154725
- metadata = await _internal__WEBPACK_IMPORTED_MODULE_0__.ArcGisUtilities.getServiceJson(this._settings.url, this._settings.formatId, this._settings.userName, this._settings.password);
154816
+ metadata = await _internal__WEBPACK_IMPORTED_MODULE_0__.ArcGisUtilities.getServiceJson({ url: this._settings.url, formatId: this._settings.formatId, userName: this._settings.userName, password: this._settings.password, queryParams: this._settings.collectQueryParams() });
154726
154817
  }
154727
154818
  catch (_e) {
154728
154819
  }
@@ -154751,6 +154842,11 @@ class ArcGISImageryProvider extends _internal__WEBPACK_IMPORTED_MODULE_0__.MapLa
154751
154842
  async fetch(url, options) {
154752
154843
  let errorCode;
154753
154844
  const urlObj = new URL(url);
154845
+ const queryParams = this._settings.collectQueryParams();
154846
+ Object.keys(queryParams).forEach((paramKey) => {
154847
+ if (!urlObj.searchParams.has(paramKey))
154848
+ urlObj.searchParams.append(paramKey, queryParams[paramKey]);
154849
+ });
154754
154850
  if (this._accessTokenRequired && this._accessClient) {
154755
154851
  this._lastAccessToken = await _internal__WEBPACK_IMPORTED_MODULE_0__.ArcGisUtilities.appendSecurityToken(urlObj, this._accessClient, {
154756
154852
  mapLayerUrl: new URL(this._settings.url),
@@ -154996,7 +155092,10 @@ class ArcGISMapLayerImageryProvider extends _internal__WEBPACK_IMPORTED_MODULE_2
154996
155092
  }
154997
155093
  // Create tile map object only if we are going to request tiles from this server and it support tilemap requests.
154998
155094
  if (this._tileMapSupported) {
154999
- this._tileMap = new _internal__WEBPACK_IMPORTED_MODULE_2__.ArcGISTileMap(this._settings.url, this._settings, json.tileInfo?.lods?.length, this._accessClient);
155095
+ const fetch = async (url, options) => {
155096
+ return this.fetch(url, options);
155097
+ };
155098
+ this._tileMap = new _internal__WEBPACK_IMPORTED_MODULE_2__.ArcGISTileMap(this._settings.url, this._settings, fetch, json.tileInfo?.lods?.length);
155000
155099
  }
155001
155100
  }
155002
155101
  // Read range using fullextent from service metadata
@@ -155847,7 +155946,8 @@ class TileUrlImageryProvider extends _internal__WEBPACK_IMPORTED_MODULE_0__.MapL
155847
155946
  url = `${url}/`;
155848
155947
  url = `${url}{level}/{column}/{row}.png`;
155849
155948
  }
155850
- return url.replace(levelToken, level.toString()).replace(columnToken, column.toString()).replace(rowToken, row.toString());
155949
+ const tmpUrl = url.replace(levelToken, level.toString()).replace(columnToken, column.toString()).replace(rowToken, row.toString());
155950
+ return this.appendCustomParams(tmpUrl);
155851
155951
  }
155852
155952
  }
155853
155953
 
@@ -156045,7 +156145,8 @@ class WmsMapLayerImageryProvider extends _internal__WEBPACK_IMPORTED_MODULE_3__.
156045
156145
  if (bboxString.length === 0 || crsString.length === 0 || layerString.length === 0)
156046
156146
  return "";
156047
156147
  const crsParamName = this._capabilities?.isVersion13 ? "CRS" : "SRS";
156048
- return `${this._baseUrl}?SERVICE=WMS&VERSION=${this._capabilities?.version}&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=${this.transparentBackgroundString}&LAYERS=${layerString}&WIDTH=${this.tileSize}&HEIGHT=${this.tileSize}&${crsParamName}=${crsString}&STYLES=&BBOX=${bboxString}`;
156148
+ const tmpUrl = `${this._baseUrl}?SERVICE=WMS&VERSION=${this._capabilities?.version}&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=${this.transparentBackgroundString}&LAYERS=${layerString}&WIDTH=${this.tileSize}&HEIGHT=${this.tileSize}&${crsParamName}=${crsString}&STYLES=&BBOX=${bboxString}`;
156149
+ return this.appendCustomParams(tmpUrl);
156049
156150
  }
156050
156151
  async getToolTip(strings, quadId, carto, tree) {
156051
156152
  await super.getToolTip(strings, quadId, carto, tree);
@@ -156065,7 +156166,8 @@ class WmsMapLayerImageryProvider extends _internal__WEBPACK_IMPORTED_MODULE_3__.
156065
156166
  const y = Math.floor(.5 + (1.0 - fraction.y) * this.tileSize);
156066
156167
  const coordinateString = this._capabilities?.isVersion13 ? `&i=${x}&j=${y}` : `&x=${x}&y=${y}`;
156067
156168
  const crsParamName = this._capabilities?.isVersion13 ? "CRS" : "SRS";
156068
- const getFeatureUrl = `${this._baseUrl}?SERVICE=WMS&VERSION=${this._capabilities?.version}&REQUEST=GetFeatureInfo&LAYERS=${layerString}&WIDTH=${this.tileSize}&HEIGHT=${this.tileSize}&${crsParamName}=EPSG%3A3857&BBOX=${bboxString}&QUERY_LAYERS=${layerString}${coordinateString}&info_format=${formatString}`;
156169
+ let getFeatureUrl = `${this._baseUrl}?SERVICE=WMS&VERSION=${this._capabilities?.version}&REQUEST=GetFeatureInfo&LAYERS=${layerString}&WIDTH=${this.tileSize}&HEIGHT=${this.tileSize}&${crsParamName}=EPSG%3A3857&BBOX=${bboxString}&QUERY_LAYERS=${layerString}${coordinateString}&info_format=${formatString}`;
156170
+ getFeatureUrl = this.appendCustomParams(getFeatureUrl);
156069
156171
  return this.toolTipFromUrl(strings, getFeatureUrl);
156070
156172
  }
156071
156173
  }
@@ -156233,10 +156335,11 @@ class WmtsMapLayerImageryProvider extends _internal__WEBPACK_IMPORTED_MODULE_2__
156233
156335
  if (matrixSetAndLimits && matrixSetAndLimits.tileMatrixSet.tileMatrix.length > zoomLevel)
156234
156336
  tileMatrix = matrixSetAndLimits.tileMatrixSet.tileMatrix[zoomLevel].identifier;
156235
156337
  const styleParam = (style?.identifier === undefined ? "" : `&style=${style.identifier}`);
156236
- if (tileMatrix !== undefined && matrixSetAndLimits !== undefined)
156237
- return `${this._baseUrl}?Service=WMTS&Version=1.0.0&Request=GetTile&Format=image%2Fpng&layer=${this.displayedLayerName}${styleParam}&TileMatrixSet=${matrixSetAndLimits.tileMatrixSet.identifier}&TileMatrix=${tileMatrix}&TileCol=${column}&TileRow=${row} `;
156238
- else
156239
- return "";
156338
+ if (tileMatrix !== undefined && matrixSetAndLimits !== undefined) {
156339
+ const tmpUrl = `${this._baseUrl}?Service=WMTS&Version=1.0.0&Request=GetTile&Format=image%2Fpng&layer=${this.displayedLayerName}${styleParam}&TileMatrixSet=${matrixSetAndLimits.tileMatrixSet.identifier}&TileMatrix=${tileMatrix}&TileCol=${column}&TileRow=${row}`;
156340
+ return this.appendCustomParams(tmpUrl);
156341
+ }
156342
+ return "";
156240
156343
  }
156241
156344
  }
156242
156345
 
@@ -156893,17 +156996,20 @@ class MapLayerFormat {
156893
156996
  * @param _ignoreCache Flag to skip cache lookup (i.e. force a new server request).
156894
156997
  * @returns Validation Status. If successful, a list of available sub-layers may also be returned.
156895
156998
  */
156896
- static async validateSource(_url, _userName, _password, _ignoreCache) { return { status: _internal__WEBPACK_IMPORTED_MODULE_2__.MapLayerSourceStatus.Valid }; }
156999
+ static async validateSource(_url, _userName, _password, _ignoreCache, _accesKey) { return { status: _internal__WEBPACK_IMPORTED_MODULE_2__.MapLayerSourceStatus.Valid }; }
157000
+ /** Allow a source object to be validated before being attached as a map-layer.
157001
+ * @beta
157002
+ */
157003
+ static async validate(args) {
157004
+ return this.validateSource(args.source.url, args.source.userName, args.source.password, args.ignoreCache);
157005
+ }
156897
157006
  /**
156898
157007
  * Create a [[MapLayerImageryProvider]] that will be used to feed data in a map-layer tile tree.
156899
157008
  * @param _settings The map layer settings to be applied to the imagery provider.
156900
157009
  * @returns Returns the new imagery provider.
156901
157010
  * @beta
156902
157011
  */
156903
- static createImageryProvider(_settings) {
156904
- (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(false, "Subclasses must override this method.");
156905
- return undefined;
156906
- }
157012
+ static createImageryProvider(_settings) { (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(false); }
156907
157013
  /**
156908
157014
  * Creates a MapLayerTileTreeReference for this map layer format.
156909
157015
  * @param _layerSettings Map layer settings that are applied to the MapLayerTileTreeReference.
@@ -156913,7 +157019,7 @@ class MapLayerFormat {
156913
157019
  * @beta
156914
157020
  */
156915
157021
  static createMapLayerTree(_layerSettings, _layerIndex, _iModel) {
156916
- (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(false, "Subclasses must override this method.");
157022
+ (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(false);
156917
157023
  return undefined;
156918
157024
  }
156919
157025
  }
@@ -156975,10 +157081,30 @@ class MapLayerFormatRegistry {
156975
157081
  }
156976
157082
  return (format === undefined) ? undefined : format.createImageryProvider(layerSettings);
156977
157083
  }
156978
- async validateSource(formatId, url, userName, password, ignoreCache) {
156979
- const entry = this._formats.get(formatId);
156980
- const format = entry?.type;
156981
- return (format === undefined) ? { status: _internal__WEBPACK_IMPORTED_MODULE_2__.MapLayerSourceStatus.InvalidFormat } : format.validateSource(url, userName, password, ignoreCache);
157084
+ /** @internal*/
157085
+ async validateSource(formatIdOrArgs, url, userName, password, ignoreCache) {
157086
+ let format;
157087
+ let args;
157088
+ if (typeof formatIdOrArgs == "string" && url !== undefined) {
157089
+ const formatId = formatIdOrArgs;
157090
+ const entry = this._formats.get(formatId);
157091
+ format = entry?.type;
157092
+ if (format !== undefined) {
157093
+ const source = _internal__WEBPACK_IMPORTED_MODULE_2__.MapLayerSource.fromJSON({ name: "", formatId, url });
157094
+ if (source !== undefined) {
157095
+ args = { source, ignoreCache };
157096
+ source.userName = userName;
157097
+ source.password = password;
157098
+ }
157099
+ }
157100
+ }
157101
+ else if (typeof formatIdOrArgs !== "string") {
157102
+ const entry = this._formats.get(formatIdOrArgs.source.formatId);
157103
+ format = entry?.type;
157104
+ }
157105
+ if (!args || !format)
157106
+ return { status: _internal__WEBPACK_IMPORTED_MODULE_2__.MapLayerSourceStatus.InvalidFormat };
157107
+ return format.validate(args);
156982
157108
  }
156983
157109
  }
156984
157110
 
@@ -157015,10 +157141,20 @@ class WmsMapLayerFormat extends ImageryMapLayerFormat {
157015
157141
  return new _internal__WEBPACK_IMPORTED_MODULE_0__.WmsMapLayerImageryProvider(settings);
157016
157142
  }
157017
157143
  static async validateSource(url, userName, password, ignoreCache) {
157144
+ const source = _internal__WEBPACK_IMPORTED_MODULE_0__.MapLayerSource.fromJSON({ name: "", formatId: WmsMapLayerFormat.formatId, url });
157145
+ if (source === undefined)
157146
+ return { status: _internal__WEBPACK_IMPORTED_MODULE_0__.MapLayerSourceStatus.InvalidFormat };
157147
+ source.userName = userName;
157148
+ source.password = password;
157149
+ return WmsMapLayerFormat.validate({ source, ignoreCache });
157150
+ }
157151
+ static async validate(args) {
157152
+ const { source, ignoreCache } = args;
157153
+ const { url, userName, password } = source;
157018
157154
  try {
157019
157155
  let subLayers;
157020
157156
  const maxVisibleSubLayers = 50;
157021
- const capabilities = await _internal__WEBPACK_IMPORTED_MODULE_0__.WmsCapabilities.create(url, (userName && password ? { user: userName, password } : undefined), ignoreCache);
157157
+ const capabilities = await _internal__WEBPACK_IMPORTED_MODULE_0__.WmsCapabilities.create(url, (userName && password ? { user: userName, password } : undefined), ignoreCache, source.collectQueryParams());
157022
157158
  if (capabilities !== undefined) {
157023
157159
  subLayers = capabilities.getSubLayers(false);
157024
157160
  const rootsSubLayer = subLayers?.find((sublayer) => sublayer.parent === undefined);
@@ -157073,9 +157209,19 @@ class WmtsMapLayerFormat extends ImageryMapLayerFormat {
157073
157209
  return new _internal__WEBPACK_IMPORTED_MODULE_0__.WmtsMapLayerImageryProvider(settings);
157074
157210
  }
157075
157211
  static async validateSource(url, userName, password, ignoreCache) {
157212
+ const source = _internal__WEBPACK_IMPORTED_MODULE_0__.MapLayerSource.fromJSON({ name: "", formatId: WmtsMapLayerFormat.formatId, url });
157213
+ if (source === undefined)
157214
+ return { status: _internal__WEBPACK_IMPORTED_MODULE_0__.MapLayerSourceStatus.InvalidFormat };
157215
+ source.userName = userName;
157216
+ source.password = password;
157217
+ return WmtsMapLayerFormat.validate({ source, ignoreCache });
157218
+ }
157219
+ static async validate(args) {
157220
+ const { source, ignoreCache } = args;
157221
+ const { url, userName, password } = source;
157076
157222
  try {
157077
157223
  const subLayers = [];
157078
- const capabilities = await _internal__WEBPACK_IMPORTED_MODULE_0__.WmtsCapabilities.create(url, (userName && password ? { user: userName, password } : undefined), ignoreCache);
157224
+ const capabilities = await _internal__WEBPACK_IMPORTED_MODULE_0__.WmtsCapabilities.create(url, (userName && password ? { user: userName, password } : undefined), ignoreCache, source.collectQueryParams());
157079
157225
  if (!capabilities)
157080
157226
  return { status: _internal__WEBPACK_IMPORTED_MODULE_0__.MapLayerSourceStatus.InvalidUrl };
157081
157227
  // Only returns layer that can be published in the Google maps or WGS84 aligned tile trees.
@@ -157122,11 +157268,19 @@ class WmtsMapLayerFormat extends ImageryMapLayerFormat {
157122
157268
  WmtsMapLayerFormat.formatId = "WMTS";
157123
157269
  class ArcGISMapLayerFormat extends ImageryMapLayerFormat {
157124
157270
  static async validateSource(url, userName, password, ignoreCache) {
157125
- const urlValidation = _internal__WEBPACK_IMPORTED_MODULE_0__.ArcGisUtilities.validateUrl(url, "MapServer");
157271
+ const source = _internal__WEBPACK_IMPORTED_MODULE_0__.MapLayerSource.fromJSON({ name: "", formatId: WmtsMapLayerFormat.formatId, url });
157272
+ if (source === undefined)
157273
+ return { status: _internal__WEBPACK_IMPORTED_MODULE_0__.MapLayerSourceStatus.InvalidFormat };
157274
+ source.userName = userName;
157275
+ source.password = password;
157276
+ return WmtsMapLayerFormat.validate({ source, ignoreCache });
157277
+ }
157278
+ static async validate(args) {
157279
+ const urlValidation = _internal__WEBPACK_IMPORTED_MODULE_0__.ArcGisUtilities.validateUrl(args.source.url, "MapServer");
157126
157280
  if (urlValidation !== _internal__WEBPACK_IMPORTED_MODULE_0__.MapLayerSourceStatus.Valid)
157127
157281
  return { status: urlValidation };
157128
157282
  // Some Map service supporting only tiles don't include the 'Map' capabilities, thus we can't make it mandatory.
157129
- return _internal__WEBPACK_IMPORTED_MODULE_0__.ArcGisUtilities.validateSource(url, this.formatId, [], userName, password, ignoreCache);
157283
+ return _internal__WEBPACK_IMPORTED_MODULE_0__.ArcGisUtilities.validateSource({ ...args, capabilitiesFilter: [] });
157130
157284
  }
157131
157285
  static createImageryProvider(settings) {
157132
157286
  return new _internal__WEBPACK_IMPORTED_MODULE_0__.ArcGISMapLayerImageryProvider(settings);
@@ -157512,6 +157666,47 @@ class MapLayerImageryProvider {
157512
157666
  ${tileExtent.longitudeRight.toFixed(8)},${tileExtent.latitudeTop.toFixed(8)}`;
157513
157667
  }
157514
157668
  }
157669
+ /** Append custom parameters for settings to provided URL object.
157670
+ * Make sure custom parameters do no override query parameters already part of the URL (lower case comparison)
157671
+ * @internal
157672
+ */
157673
+ appendCustomParams(url) {
157674
+ if (!this._settings.savedQueryParams && !this._settings.unsavedQueryParams)
157675
+ return url;
157676
+ // create a lower-case array of keys
157677
+ const currentParams = [];
157678
+ const currentUrl = new URL(url);
157679
+ currentUrl.searchParams.forEach((_value, key, _parent) => {
157680
+ currentParams.push(key.toLowerCase());
157681
+ });
157682
+ const urlParamsFromIndexArray = (indexArray, result) => {
157683
+ const urlParams = (result ? result : new URLSearchParams());
157684
+ if (!indexArray)
157685
+ return urlParams;
157686
+ Object.keys(indexArray).forEach((key) => {
157687
+ if (!currentParams.includes(key.toLowerCase()))
157688
+ urlParams.append(key, indexArray[key]);
157689
+ });
157690
+ return urlParams;
157691
+ };
157692
+ const params = urlParamsFromIndexArray(this._settings.savedQueryParams);
157693
+ urlParamsFromIndexArray(this._settings.unsavedQueryParams, params);
157694
+ const getSeparator = (u) => {
157695
+ let separator = "&";
157696
+ if (u.includes("?")) {
157697
+ if (u.endsWith("?"))
157698
+ separator = "";
157699
+ }
157700
+ else {
157701
+ separator = "?";
157702
+ }
157703
+ return separator;
157704
+ };
157705
+ if (params.size > 0) {
157706
+ url = `${url}${getSeparator(url)}${params.toString()}`;
157707
+ }
157708
+ return url;
157709
+ }
157515
157710
  }
157516
157711
 
157517
157712
 
@@ -157576,21 +157771,22 @@ var MapLayerSourceStatus;
157576
157771
  * @public
157577
157772
  */
157578
157773
  class MapLayerSource {
157579
- constructor(formatId = "WMS", name, url, baseMap = false, transparentBackground = true) {
157774
+ constructor(formatId = "WMS", name, url, baseMap = false, transparentBackground = true, savedQueryParams) {
157580
157775
  this.baseMap = false;
157581
157776
  this.formatId = formatId;
157582
157777
  this.name = name;
157583
157778
  this.url = url;
157584
157779
  this.baseMap = baseMap;
157585
157780
  this.transparentBackground = transparentBackground;
157781
+ this.savedQueryParams = savedQueryParams;
157586
157782
  }
157587
157783
  static fromJSON(json) {
157588
157784
  if (json === undefined)
157589
157785
  return undefined;
157590
- return new MapLayerSource(json.formatId, json.name, json.url, json.baseMap, json.transparentBackground);
157786
+ return new MapLayerSource(json.formatId, json.name, json.url, json.baseMap, json.transparentBackground, json.queryParams);
157591
157787
  }
157592
157788
  async validateSource(ignoreCache) {
157593
- return _IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.mapLayerFormatRegistry.validateSource(this.formatId, this.url, this.userName, this.password, ignoreCache);
157789
+ return _IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.mapLayerFormatRegistry.validateSource({ source: this, ignoreCache });
157594
157790
  }
157595
157791
  /** @internal*/
157596
157792
  static fromBackgroundMapProps(props) {
@@ -157606,7 +157802,7 @@ class MapLayerSource {
157606
157802
  return undefined;
157607
157803
  }
157608
157804
  toJSON() {
157609
- return { url: this.url, name: this.name, formatId: this.formatId, transparentBackground: this.transparentBackground };
157805
+ return { url: this.url, name: this.name, formatId: this.formatId, transparentBackground: this.transparentBackground, queryParams: this.savedQueryParams };
157610
157806
  }
157611
157807
  toLayerSettings(subLayers) {
157612
157808
  // When MapLayerSetting is created from a MapLayerSource, sub-layers and credentials need to be set separately.
@@ -157614,11 +157810,28 @@ class MapLayerSource {
157614
157810
  if (this.userName !== undefined || this.password !== undefined) {
157615
157811
  layerSettings?.setCredentials(this.userName, this.password);
157616
157812
  }
157813
+ if (this.savedQueryParams) {
157814
+ layerSettings.savedQueryParams = { ...this.savedQueryParams };
157815
+ }
157816
+ if (this.unsavedQueryParams) {
157817
+ layerSettings.unsavedQueryParams = { ...this.unsavedQueryParams };
157818
+ }
157617
157819
  return layerSettings;
157618
157820
  }
157619
157821
  getCredentials() {
157620
157822
  return this.userName && this.password ? { user: this.userName, password: this.password } : undefined;
157621
157823
  }
157824
+ /** Collect all query parameters
157825
+ * @beta
157826
+ */
157827
+ collectQueryParams() {
157828
+ let queryParams = {};
157829
+ if (this.savedQueryParams)
157830
+ queryParams = { ...this.savedQueryParams };
157831
+ if (this.unsavedQueryParams)
157832
+ queryParams = { ...queryParams, ...this.unsavedQueryParams };
157833
+ return queryParams;
157834
+ }
157622
157835
  }
157623
157836
  /** A collection of [[MapLayerSource]] objects.
157624
157837
  * @beta
@@ -160695,13 +160908,22 @@ class WmsCapabilities {
160695
160908
  if (_json.Capability)
160696
160909
  this.layer = new WmsCapability.Layer(_json.Capability.Layer, this);
160697
160910
  }
160698
- static async create(url, credentials, ignoreCache) {
160911
+ static async create(url, credentials, ignoreCache, queryParams) {
160699
160912
  if (!ignoreCache) {
160700
160913
  const cached = WmsCapabilities._capabilitiesCache.get(url);
160701
160914
  if (cached !== undefined)
160702
160915
  return cached;
160703
160916
  }
160704
- const xmlCapabilities = await getXml(`${_internal__WEBPACK_IMPORTED_MODULE_2__.WmsUtilities.getBaseUrl(url)}?request=GetCapabilities&service=WMS`, credentials);
160917
+ const tmpUrl = new URL(_internal__WEBPACK_IMPORTED_MODULE_2__.WmsUtilities.getBaseUrl(url));
160918
+ tmpUrl.searchParams.append("request", "GetCapabilities");
160919
+ tmpUrl.searchParams.append("service", "WMS");
160920
+ if (queryParams) {
160921
+ Object.keys(queryParams).forEach((paramKey) => {
160922
+ if (!tmpUrl.searchParams.has(paramKey))
160923
+ tmpUrl.searchParams.append(paramKey, queryParams[paramKey]);
160924
+ });
160925
+ }
160926
+ const xmlCapabilities = await getXml(tmpUrl.toString(), credentials);
160705
160927
  if (!xmlCapabilities)
160706
160928
  return undefined;
160707
160929
  const capabilities = new WmsCapabilities(new (wms_capabilities__WEBPACK_IMPORTED_MODULE_1___default())().parse(xmlCapabilities));
@@ -161194,13 +161416,22 @@ class WmtsCapabilities {
161194
161416
  const xmlDoc = parser.parseFromString(xmlCapabilities, "text/xml");
161195
161417
  return new WmtsCapabilities(xmlDoc);
161196
161418
  }
161197
- static async create(url, credentials, ignoreCache) {
161419
+ static async create(url, credentials, ignoreCache, queryParams) {
161198
161420
  if (!ignoreCache) {
161199
161421
  const cached = WmtsCapabilities._capabilitiesCache.get(url);
161200
161422
  if (cached !== undefined)
161201
161423
  return cached;
161202
161424
  }
161203
- const xmlCapabilities = await getXml(`${_internal__WEBPACK_IMPORTED_MODULE_2__.WmsUtilities.getBaseUrl(url)}?request=GetCapabilities&service=WMTS`, credentials);
161425
+ const tmpUrl = new URL(_internal__WEBPACK_IMPORTED_MODULE_2__.WmsUtilities.getBaseUrl(url));
161426
+ tmpUrl.searchParams.append("request", "GetCapabilities");
161427
+ tmpUrl.searchParams.append("service", "WMTS");
161428
+ if (queryParams) {
161429
+ Object.keys(queryParams).forEach((paramKey) => {
161430
+ if (!tmpUrl.searchParams.has(paramKey))
161431
+ tmpUrl.searchParams.append(paramKey, queryParams[paramKey]);
161432
+ });
161433
+ }
161434
+ const xmlCapabilities = await getXml(tmpUrl.toString(), credentials);
161204
161435
  if (!xmlCapabilities)
161205
161436
  return undefined;
161206
161437
  const capabilities = WmtsCapabilities.createFromXml(xmlCapabilities);
@@ -284659,7 +284890,7 @@ class TestContext {
284659
284890
  this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
284660
284891
  const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
284661
284892
  await core_frontend_1.NoRenderApp.startup({
284662
- applicationVersion: "4.3.0-dev.31",
284893
+ applicationVersion: "4.3.0-dev.34",
284663
284894
  applicationId: this.settings.gprid,
284664
284895
  authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.adminUserAccessToken),
284665
284896
  hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
@@ -293890,7 +294121,7 @@ exports.executeBackendCallback = executeBackendCallback;
293890
294121
  __webpack_require__.r(__webpack_exports__);
293891
294122
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
293892
294123
  /* harmony export */ AbstractStatusBarItemUtilities: () => (/* reexport safe */ _appui_abstract_statusbar_StatusBarItem__WEBPACK_IMPORTED_MODULE_31__.AbstractStatusBarItemUtilities),
293893
- /* harmony export */ AbstractZoneLocation: () => (/* reexport safe */ _appui_abstract_widget_StagePanel__WEBPACK_IMPORTED_MODULE_46__.AbstractZoneLocation),
294124
+ /* harmony export */ AbstractZoneLocation: () => (/* reexport safe */ _appui_abstract_widget_StagePanel__WEBPACK_IMPORTED_MODULE_44__.AbstractZoneLocation),
293894
294125
  /* harmony export */ AlternateDateFormats: () => (/* reexport safe */ _appui_abstract_properties_EditorParams__WEBPACK_IMPORTED_MODULE_24__.AlternateDateFormats),
293895
294126
  /* harmony export */ BackstageItemType: () => (/* reexport safe */ _appui_abstract_backstage_BackstageItem__WEBPACK_IMPORTED_MODULE_4__.BackstageItemType),
293896
294127
  /* harmony export */ BackstageItemUtilities: () => (/* reexport safe */ _appui_abstract_backstage_BackstageItem__WEBPACK_IMPORTED_MODULE_4__.BackstageItemUtilities),
@@ -293906,7 +294137,6 @@ __webpack_require__.r(__webpack_exports__);
293906
294137
  /* harmony export */ DialogProperty: () => (/* reexport safe */ _appui_abstract_dialogs_DialogItem__WEBPACK_IMPORTED_MODULE_9__.DialogProperty),
293907
294138
  /* harmony export */ DisplayMessageType: () => (/* reexport safe */ _appui_abstract_notification_MessagePresenter__WEBPACK_IMPORTED_MODULE_21__.DisplayMessageType),
293908
294139
  /* harmony export */ FunctionKey: () => (/* reexport safe */ _appui_abstract_common_KeyboardKey__WEBPACK_IMPORTED_MODULE_6__.FunctionKey),
293909
- /* harmony export */ FuzzyScore: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.FuzzyScore),
293910
294140
  /* harmony export */ GenericUiEvent: () => (/* reexport safe */ _appui_abstract_UiAdmin__WEBPACK_IMPORTED_MODULE_1__.GenericUiEvent),
293911
294141
  /* harmony export */ IconSpecUtilities: () => (/* reexport safe */ _appui_abstract_utils_IconSpecUtilities__WEBPACK_IMPORTED_MODULE_37__.IconSpecUtilities),
293912
294142
  /* harmony export */ MessageSeverity: () => (/* reexport safe */ _appui_abstract_notification_MessageSeverity__WEBPACK_IMPORTED_MODULE_22__.MessageSeverity),
@@ -293917,8 +294147,8 @@ __webpack_require__.r(__webpack_exports__);
293917
294147
  /* harmony export */ PropertyValueFormat: () => (/* reexport safe */ _appui_abstract_properties_Value__WEBPACK_IMPORTED_MODULE_29__.PropertyValueFormat),
293918
294148
  /* harmony export */ RelativePosition: () => (/* reexport safe */ _appui_abstract_items_RelativePosition__WEBPACK_IMPORTED_MODULE_19__.RelativePosition),
293919
294149
  /* harmony export */ SpecialKey: () => (/* reexport safe */ _appui_abstract_common_KeyboardKey__WEBPACK_IMPORTED_MODULE_6__.SpecialKey),
293920
- /* harmony export */ StagePanelLocation: () => (/* reexport safe */ _appui_abstract_widget_StagePanel__WEBPACK_IMPORTED_MODULE_46__.StagePanelLocation),
293921
- /* harmony export */ StagePanelSection: () => (/* reexport safe */ _appui_abstract_widget_StagePanel__WEBPACK_IMPORTED_MODULE_46__.StagePanelSection),
294150
+ /* harmony export */ StagePanelLocation: () => (/* reexport safe */ _appui_abstract_widget_StagePanel__WEBPACK_IMPORTED_MODULE_44__.StagePanelLocation),
294151
+ /* harmony export */ StagePanelSection: () => (/* reexport safe */ _appui_abstract_widget_StagePanel__WEBPACK_IMPORTED_MODULE_44__.StagePanelSection),
293922
294152
  /* harmony export */ StageUsage: () => (/* reexport safe */ _appui_abstract_items_StageUsage__WEBPACK_IMPORTED_MODULE_20__.StageUsage),
293923
294153
  /* harmony export */ StandardContentLayouts: () => (/* reexport safe */ _appui_abstract_content_StandardContentLayouts__WEBPACK_IMPORTED_MODULE_8__.StandardContentLayouts),
293924
294154
  /* harmony export */ StandardEditorNames: () => (/* reexport safe */ _appui_abstract_properties_StandardEditorNames__WEBPACK_IMPORTED_MODULE_27__.StandardEditorNames),
@@ -293941,13 +294171,7 @@ __webpack_require__.r(__webpack_exports__);
293941
294171
  /* harmony export */ UiItemsManager: () => (/* reexport safe */ _appui_abstract_UiItemsManager__WEBPACK_IMPORTED_MODULE_2__.UiItemsManager),
293942
294172
  /* harmony export */ UiLayoutDataProvider: () => (/* reexport safe */ _appui_abstract_dialogs_UiLayoutDataProvider__WEBPACK_IMPORTED_MODULE_10__.UiLayoutDataProvider),
293943
294173
  /* harmony export */ UiSyncEvent: () => (/* reexport safe */ _appui_abstract_utils_UiEventDispatcher__WEBPACK_IMPORTED_MODULE_40__.UiSyncEvent),
293944
- /* harmony export */ WidgetState: () => (/* reexport safe */ _appui_abstract_widget_WidgetState__WEBPACK_IMPORTED_MODULE_47__.WidgetState),
293945
- /* harmony export */ convertSimple2RegExpPattern: () => (/* reexport safe */ _appui_abstract_utils_filter_strings__WEBPACK_IMPORTED_MODULE_44__.convertSimple2RegExpPattern),
293946
- /* harmony export */ createMatches: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.createMatches),
293947
- /* harmony export */ equalsIgnoreCase: () => (/* reexport safe */ _appui_abstract_utils_filter_strings__WEBPACK_IMPORTED_MODULE_44__.equalsIgnoreCase),
293948
- /* harmony export */ fuzzyScore: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.fuzzyScore),
293949
- /* harmony export */ fuzzyScoreGraceful: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.fuzzyScoreGraceful),
293950
- /* harmony export */ fuzzyScoreGracefulAggressive: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.fuzzyScoreGracefulAggressive),
294174
+ /* harmony export */ WidgetState: () => (/* reexport safe */ _appui_abstract_widget_WidgetState__WEBPACK_IMPORTED_MODULE_45__.WidgetState),
293951
294175
  /* harmony export */ getClassName: () => (/* reexport safe */ _appui_abstract_utils_misc__WEBPACK_IMPORTED_MODULE_36__.getClassName),
293952
294176
  /* harmony export */ isAbstractStatusBarActionItem: () => (/* reexport safe */ _appui_abstract_statusbar_StatusBarItem__WEBPACK_IMPORTED_MODULE_31__.isAbstractStatusBarActionItem),
293953
294177
  /* harmony export */ isAbstractStatusBarCustomItem: () => (/* reexport safe */ _appui_abstract_statusbar_StatusBarItem__WEBPACK_IMPORTED_MODULE_31__.isAbstractStatusBarCustomItem),
@@ -293959,22 +294183,9 @@ __webpack_require__.r(__webpack_exports__);
293959
294183
  /* harmony export */ isCustomFormattedNumberParams: () => (/* reexport safe */ _appui_abstract_properties_EditorParams__WEBPACK_IMPORTED_MODULE_24__.isCustomFormattedNumberParams),
293960
294184
  /* harmony export */ isIconListEditorParams: () => (/* reexport safe */ _appui_abstract_properties_EditorParams__WEBPACK_IMPORTED_MODULE_24__.isIconListEditorParams),
293961
294185
  /* harmony export */ isInputEditorSizeParams: () => (/* reexport safe */ _appui_abstract_properties_EditorParams__WEBPACK_IMPORTED_MODULE_24__.isInputEditorSizeParams),
293962
- /* harmony export */ isLowerAsciiLetter: () => (/* reexport safe */ _appui_abstract_utils_filter_strings__WEBPACK_IMPORTED_MODULE_44__.isLowerAsciiLetter),
293963
- /* harmony export */ isPatternInWord: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.isPatternInWord),
293964
294186
  /* harmony export */ isStageLauncher: () => (/* reexport safe */ _appui_abstract_backstage_BackstageItem__WEBPACK_IMPORTED_MODULE_4__.isStageLauncher),
293965
294187
  /* harmony export */ isSuppressLabelEditorParams: () => (/* reexport safe */ _appui_abstract_properties_EditorParams__WEBPACK_IMPORTED_MODULE_24__.isSuppressLabelEditorParams),
293966
- /* harmony export */ isUpperAsciiLetter: () => (/* reexport safe */ _appui_abstract_utils_filter_strings__WEBPACK_IMPORTED_MODULE_44__.isUpperAsciiLetter),
293967
- /* harmony export */ loggerCategory: () => (/* reexport safe */ _appui_abstract_utils_misc__WEBPACK_IMPORTED_MODULE_36__.loggerCategory),
293968
- /* harmony export */ matchesCamelCase: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.matchesCamelCase),
293969
- /* harmony export */ matchesContiguousSubString: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.matchesContiguousSubString),
293970
- /* harmony export */ matchesFuzzy: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.matchesFuzzy),
293971
- /* harmony export */ matchesFuzzy2: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.matchesFuzzy2),
293972
- /* harmony export */ matchesPrefix: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.matchesPrefix),
293973
- /* harmony export */ matchesStrictPrefix: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.matchesStrictPrefix),
293974
- /* harmony export */ matchesSubString: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.matchesSubString),
293975
- /* harmony export */ matchesWords: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.matchesWords),
293976
- /* harmony export */ or: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.or),
293977
- /* harmony export */ startsWithIgnoreCase: () => (/* reexport safe */ _appui_abstract_utils_filter_strings__WEBPACK_IMPORTED_MODULE_44__.startsWithIgnoreCase)
294188
+ /* harmony export */ matchesWords: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_42__.matchesWords)
293978
294189
  /* harmony export */ });
293979
294190
  /* harmony import */ var _appui_abstract_BaseUiItemsProvider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./appui-abstract/BaseUiItemsProvider */ "../../ui/appui-abstract/lib/esm/appui-abstract/BaseUiItemsProvider.js");
293980
294191
  /* harmony import */ var _appui_abstract_UiAdmin__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./appui-abstract/UiAdmin */ "../../ui/appui-abstract/lib/esm/appui-abstract/UiAdmin.js");
@@ -294018,12 +294229,10 @@ __webpack_require__.r(__webpack_exports__);
294018
294229
  /* harmony import */ var _appui_abstract_utils_UiError__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./appui-abstract/utils/UiError */ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/UiError.js");
294019
294230
  /* harmony import */ var _appui_abstract_utils_UiEventDispatcher__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./appui-abstract/utils/UiEventDispatcher */ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/UiEventDispatcher.js");
294020
294231
  /* harmony import */ var _appui_abstract_utils_UiEvent__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./appui-abstract/utils/UiEvent */ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/UiEvent.js");
294021
- /* harmony import */ var _appui_abstract_utils_filter_charCode__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./appui-abstract/utils/filter/charCode */ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/filter/charCode.js");
294022
- /* harmony import */ var _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./appui-abstract/utils/filter/filters */ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/filter/filters.js");
294023
- /* harmony import */ var _appui_abstract_utils_filter_strings__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./appui-abstract/utils/filter/strings */ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/filter/strings.js");
294024
- /* harmony import */ var _appui_abstract_widget_AbstractWidgetProps__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./appui-abstract/widget/AbstractWidgetProps */ "../../ui/appui-abstract/lib/esm/appui-abstract/widget/AbstractWidgetProps.js");
294025
- /* harmony import */ var _appui_abstract_widget_StagePanel__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./appui-abstract/widget/StagePanel */ "../../ui/appui-abstract/lib/esm/appui-abstract/widget/StagePanel.js");
294026
- /* harmony import */ var _appui_abstract_widget_WidgetState__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./appui-abstract/widget/WidgetState */ "../../ui/appui-abstract/lib/esm/appui-abstract/widget/WidgetState.js");
294232
+ /* harmony import */ var _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./appui-abstract/utils/filter/filters */ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/filter/filters.js");
294233
+ /* harmony import */ var _appui_abstract_widget_AbstractWidgetProps__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./appui-abstract/widget/AbstractWidgetProps */ "../../ui/appui-abstract/lib/esm/appui-abstract/widget/AbstractWidgetProps.js");
294234
+ /* harmony import */ var _appui_abstract_widget_StagePanel__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./appui-abstract/widget/StagePanel */ "../../ui/appui-abstract/lib/esm/appui-abstract/widget/StagePanel.js");
294235
+ /* harmony import */ var _appui_abstract_widget_WidgetState__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./appui-abstract/widget/WidgetState */ "../../ui/appui-abstract/lib/esm/appui-abstract/widget/WidgetState.js");
294027
294236
  /*---------------------------------------------------------------------------------------------
294028
294237
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
294029
294238
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -294073,8 +294282,6 @@ __webpack_require__.r(__webpack_exports__);
294073
294282
 
294074
294283
 
294075
294284
 
294076
-
294077
-
294078
294285
 
294079
294286
 
294080
294287
 
@@ -294239,8 +294446,6 @@ __webpack_require__.r(__webpack_exports__);
294239
294446
  /* harmony export */ UiAdmin: () => (/* binding */ UiAdmin)
294240
294447
  /* harmony export */ });
294241
294448
  /* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
294242
- /* harmony import */ var _utils_misc__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/misc */ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/misc.js");
294243
- /* harmony import */ var _utils_UiError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/UiError */ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/UiError.js");
294244
294449
  /*---------------------------------------------------------------------------------------------
294245
294450
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
294246
294451
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -294249,8 +294454,6 @@ __webpack_require__.r(__webpack_exports__);
294249
294454
  * @module UiAdmin
294250
294455
  */
294251
294456
 
294252
-
294253
-
294254
294457
  /** The GenericUiEvent is the base event class for UI events that target a specific component, as identified in uiComponentId.
294255
294458
  * @public
294256
294459
  */
@@ -294265,8 +294468,11 @@ class UiAdmin {
294265
294468
  }
294266
294469
  /** The MessagePresenter used to display messages. */
294267
294470
  static get messagePresenter() {
294268
- if (!UiAdmin._messagePresenter)
294269
- throw new _utils_UiError__WEBPACK_IMPORTED_MODULE_2__.UiError((0,_utils_misc__WEBPACK_IMPORTED_MODULE_1__.loggerCategory)(this), "UiAdmin.messagePresenter not set");
294471
+ if (!UiAdmin._messagePresenter) {
294472
+ const error = new _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BentleyError(_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BentleyStatus.ERROR, "UiAdmin.messagePresenter not set");
294473
+ error.category = "messagePresenter";
294474
+ throw error;
294475
+ }
294270
294476
  return UiAdmin._messagePresenter;
294271
294477
  }
294272
294478
  static set messagePresenter(mp) {
@@ -294480,7 +294686,6 @@ __webpack_require__.r(__webpack_exports__);
294480
294686
  /* harmony export */ UiItemsManager: () => (/* binding */ UiItemsManager)
294481
294687
  /* harmony export */ });
294482
294688
  /* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
294483
- /* harmony import */ var _utils_misc__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/misc */ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/misc.js");
294484
294689
  /*---------------------------------------------------------------------------------------------
294485
294690
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
294486
294691
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -294490,7 +294695,7 @@ __webpack_require__.r(__webpack_exports__);
294490
294695
  * @module UiItemsProvider
294491
294696
  */
294492
294697
 
294493
-
294698
+ const loggerCategory = "appui-abstract.UiItemsManager";
294494
294699
  /** Action taken by the application on item provided by a UiItemsProvider
294495
294700
  * @public @deprecated in 3.2. This was only used by the previously removed UiItemsArbiter.
294496
294701
  */
@@ -294539,11 +294744,11 @@ class UiItemsManager {
294539
294744
  static register(uiProvider, overrides) {
294540
294745
  const providerId = overrides?.providerId ?? uiProvider.id;
294541
294746
  if (UiItemsManager.getUiItemsProvider(providerId)) {
294542
- _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logInfo((0,_utils_misc__WEBPACK_IMPORTED_MODULE_1__.loggerCategory)(this), `UiItemsProvider (${providerId}) is already loaded`);
294747
+ _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logInfo(loggerCategory, `UiItemsProvider (${providerId}) is already loaded`);
294543
294748
  }
294544
294749
  else {
294545
294750
  UiItemsManager._registeredUiItemsProviders.set(providerId, { provider: uiProvider, overrides });
294546
- _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logInfo((0,_utils_misc__WEBPACK_IMPORTED_MODULE_1__.loggerCategory)(this), `UiItemsProvider ${uiProvider.id} registered as ${providerId} `);
294751
+ _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logInfo(loggerCategory, `UiItemsProvider ${uiProvider.id} registered as ${providerId} `);
294547
294752
  UiItemsManager.sendRegisteredEvent({ providerId });
294548
294753
  }
294549
294754
  }
@@ -294554,7 +294759,7 @@ class UiItemsManager {
294554
294759
  return;
294555
294760
  provider.onUnregister && provider.onUnregister();
294556
294761
  UiItemsManager._registeredUiItemsProviders.delete(uiProviderId);
294557
- _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logInfo((0,_utils_misc__WEBPACK_IMPORTED_MODULE_1__.loggerCategory)(this), `UiItemsProvider (${uiProviderId}) unloaded`);
294762
+ _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logInfo(loggerCategory, `UiItemsProvider (${uiProviderId}) unloaded`);
294558
294763
  // trigger a refresh of the ui
294559
294764
  UiItemsManager.sendRegisteredEvent({ providerId: uiProviderId });
294560
294765
  }
@@ -294944,7 +295149,7 @@ __webpack_require__.r(__webpack_exports__);
294944
295149
  * @module Utilities
294945
295150
  */
294946
295151
  /** Enumeration for Function Keys
294947
- * @public
295152
+ * @public @deprecated in 4.3. Please use the `ts-key-enum` npm package or string literals.
294948
295153
  */
294949
295154
  var FunctionKey;
294950
295155
  (function (FunctionKey) {
@@ -294962,7 +295167,7 @@ var FunctionKey;
294962
295167
  FunctionKey["F12"] = "F12";
294963
295168
  })(FunctionKey || (FunctionKey = {}));
294964
295169
  /** Enumeration for Special Keys
294965
- * @public
295170
+ * @public @deprecated in 4.3. Please use the `ts-key-enum` npm package or string literals.
294966
295171
  */
294967
295172
  var SpecialKey;
294968
295173
  (function (SpecialKey) {
@@ -294990,9 +295195,10 @@ var SpecialKey;
294990
295195
  SpecialKey["Decimal"] = "Decimal";
294991
295196
  })(SpecialKey || (SpecialKey = {}));
294992
295197
  /** Determines if a KeyboardEvent.key is an Arrow key
294993
- * @public
295198
+ * @public @deprecated in 4.3. Please use a custom implementation moving forward.
294994
295199
  */
294995
295200
  function isArrowKey(key) {
295201
+ // eslint-disable-next-line deprecation/deprecation
294996
295202
  return (key === SpecialKey.ArrowLeft || key === SpecialKey.ArrowRight || key === SpecialKey.ArrowUp || key === SpecialKey.ArrowDown);
294997
295203
  }
294998
295204
 
@@ -297117,8 +297323,9 @@ __webpack_require__.r(__webpack_exports__);
297117
297323
  /** @packageDocumentation
297118
297324
  * @module Utilities
297119
297325
  */
297326
+ /* eslint-disable deprecation/deprecation */
297120
297327
  /** Creates an IconSpec with an SVG source and gets the SVG source from an IconSpec.
297121
- * @public
297328
+ * @public @deprecated in 4.3. AppUI libraries >= 4.7.x support loading SVGs sources without prefixes, eliminating the need for these utilities.
297122
297329
  */
297123
297330
  class IconSpecUtilities {
297124
297331
  /** Create an IconSpec for an SVG loaded into web component with sprite loader
@@ -297129,7 +297336,7 @@ class IconSpecUtilities {
297129
297336
  return `${IconSpecUtilities.SVG_PREFIX}${svgSrc}`;
297130
297337
  }
297131
297338
  /** Create an IconSpec for an SVG loaded into web component with svg-loader
297132
- * @public
297339
+ * @public @deprecated in 4.3. AppUI libraries > 4.7.x support loading SVGs sources without prefixes, eliminating the need for this utility.
297133
297340
  */
297134
297341
  static createWebComponentIconSpec(srcString) {
297135
297342
  return `${IconSpecUtilities.WEB_COMPONENT_PREFIX}${srcString}`;
@@ -297145,7 +297352,7 @@ class IconSpecUtilities {
297145
297352
  return undefined;
297146
297353
  }
297147
297354
  /** Get the SVG Source from an svg-loader IconSpec
297148
- * @public
297355
+ * @public @deprecated in 4.3. AppUI libraries > 4.7.x support loading SVGs sources without prefixes, eliminating the need for this utility.
297149
297356
  */
297150
297357
  static getWebComponentSource(iconSpec) {
297151
297358
  if (iconSpec.startsWith(IconSpecUtilities.WEB_COMPONENT_PREFIX) && iconSpec.length > 7) {
@@ -297203,7 +297410,7 @@ __webpack_require__.r(__webpack_exports__);
297203
297410
  */
297204
297411
 
297205
297412
  /** iTwin.js UI UiError class is a subclass of BentleyError. Errors are logged.
297206
- * @public
297413
+ * @public @deprecated in 4.3. Use [[Bentley.BentleyError]] instead.
297207
297414
  */
297208
297415
  class UiError extends _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BentleyError {
297209
297416
  /** Constructs UiError using BentleyError. */
@@ -297411,23 +297618,6 @@ __webpack_require__.r(__webpack_exports__);
297411
297618
 
297412
297619
 
297413
297620
 
297414
- /***/ }),
297415
-
297416
- /***/ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/filter/charCode.js":
297417
- /*!*******************************************************************************!*\
297418
- !*** ../../ui/appui-abstract/lib/esm/appui-abstract/utils/filter/charCode.js ***!
297419
- \*******************************************************************************/
297420
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
297421
-
297422
- "use strict";
297423
- __webpack_require__.r(__webpack_exports__);
297424
- /*---------------------------------------------------------------------------------------------
297425
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
297426
- * See LICENSE.md in the project root for license terms and full copyright notice.
297427
- *--------------------------------------------------------------------------------------------*/
297428
-
297429
-
297430
-
297431
297621
  /***/ }),
297432
297622
 
297433
297623
  /***/ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/filter/filters.js":
@@ -297439,24 +297629,8 @@ __webpack_require__.r(__webpack_exports__);
297439
297629
  "use strict";
297440
297630
  __webpack_require__.r(__webpack_exports__);
297441
297631
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
297442
- /* harmony export */ FuzzyScore: () => (/* binding */ FuzzyScore),
297443
- /* harmony export */ createMatches: () => (/* binding */ createMatches),
297444
- /* harmony export */ fuzzyScore: () => (/* binding */ fuzzyScore),
297445
- /* harmony export */ fuzzyScoreGraceful: () => (/* binding */ fuzzyScoreGraceful),
297446
- /* harmony export */ fuzzyScoreGracefulAggressive: () => (/* binding */ fuzzyScoreGracefulAggressive),
297447
- /* harmony export */ isPatternInWord: () => (/* binding */ isPatternInWord),
297448
- /* harmony export */ matchesCamelCase: () => (/* binding */ matchesCamelCase),
297449
- /* harmony export */ matchesContiguousSubString: () => (/* binding */ matchesContiguousSubString),
297450
- /* harmony export */ matchesFuzzy: () => (/* binding */ matchesFuzzy),
297451
- /* harmony export */ matchesFuzzy2: () => (/* binding */ matchesFuzzy2),
297452
- /* harmony export */ matchesPrefix: () => (/* binding */ matchesPrefix),
297453
- /* harmony export */ matchesStrictPrefix: () => (/* binding */ matchesStrictPrefix),
297454
- /* harmony export */ matchesSubString: () => (/* binding */ matchesSubString),
297455
- /* harmony export */ matchesWords: () => (/* binding */ matchesWords),
297456
- /* harmony export */ or: () => (/* binding */ or)
297632
+ /* harmony export */ matchesWords: () => (/* binding */ matchesWords)
297457
297633
  /* harmony export */ });
297458
- /* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./map */ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/filter/map.js");
297459
- /* harmony import */ var _strings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./strings */ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/filter/strings.js");
297460
297634
  /*---------------------------------------------------------------------------------------------
297461
297635
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
297462
297636
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -297464,100 +297638,18 @@ __webpack_require__.r(__webpack_exports__);
297464
297638
  /** @packageDocumentation
297465
297639
  * @module Utilities
297466
297640
  */
297467
-
297468
-
297469
- // Combined filters
297470
- /**
297471
- * @returns A filter which combines the provided set
297472
- * of filters with an or. The *first* filters that
297473
- * matches defined the return value of the returned
297474
- * filter.
297475
- * @internal
297476
- */
297477
- function or(...filter) {
297478
- return function (word, wordToMatchAgainst) {
297479
- for (let i = 0, len = filter.length; i < len; i++) {
297480
- const match = filter[i](word, wordToMatchAgainst);
297481
- if (match) {
297482
- return match;
297483
- }
297484
- }
297485
- return null;
297486
- };
297487
- }
297488
- // Prefix
297489
- /** @internal */
297490
- const matchesStrictPrefix = _matchesPrefix.bind(undefined, false);
297491
- /** @internal */
297492
- const matchesPrefix = _matchesPrefix.bind(undefined, true);
297493
- function _matchesPrefix(ignoreCase, word, wordToMatchAgainst) {
297494
- if (!wordToMatchAgainst || wordToMatchAgainst.length < word.length) {
297495
- return null;
297496
- }
297497
- let matches;
297498
- if (ignoreCase) {
297499
- matches = _strings__WEBPACK_IMPORTED_MODULE_1__.startsWithIgnoreCase(wordToMatchAgainst, word);
297500
- }
297501
- else {
297502
- matches = wordToMatchAgainst.indexOf(word) === 0;
297503
- }
297504
- if (!matches) {
297505
- return null;
297506
- }
297507
- return word.length > 0 ? [{ start: 0, end: word.length }] : [];
297508
- }
297509
- // Contiguous Substring
297510
- /** @internal */
297511
- function matchesContiguousSubString(word, wordToMatchAgainst) {
297512
- const index = wordToMatchAgainst.toLowerCase().indexOf(word.toLowerCase());
297513
- if (index === -1) {
297514
- return null;
297515
- }
297516
- return [{ start: index, end: index + word.length }];
297517
- }
297518
- // Substring
297519
- /**
297520
- * Return case insensitive substring matches
297521
- * @param word filter string
297522
- * @param wordToMatchAgainst string to test
297523
- * @internal
297524
- */
297525
- function matchesSubString(word, wordToMatchAgainst) {
297526
- return _matchesSubString(word.toLowerCase(), wordToMatchAgainst.toLowerCase(), 0, 0);
297527
- }
297528
- function _matchesSubString(word, wordToMatchAgainst, i, j) {
297529
- if (i === word.length) {
297530
- return [];
297531
- }
297532
- else if (j === wordToMatchAgainst.length) {
297533
- return null;
297534
- }
297535
- else {
297536
- if (word[i] === wordToMatchAgainst[j]) {
297537
- let result = null;
297538
- if (result = _matchesSubString(word, wordToMatchAgainst, i + 1, j + 1)) {
297539
- return join({ start: j, end: j + 1 }, result);
297540
- }
297541
- return null;
297542
- }
297543
- return _matchesSubString(word, wordToMatchAgainst, i, j + 1);
297544
- }
297545
- }
297546
- // CamelCase
297547
- function isLower(code) {
297548
- return 97 /* CharCode.a */ <= code && code <= 122 /* CharCode.z */;
297549
- }
297550
- function isUpper(code) {
297551
- return 65 /* CharCode.A */ <= code && code <= 90 /* CharCode.Z */;
297552
- }
297553
- function isNumber(code) {
297554
- return 48 /* CharCode.Digit0 */ <= code && code <= 57 /* CharCode.Digit9 */;
297555
- }
297641
+ var CharCode;
297642
+ (function (CharCode) {
297643
+ CharCode[CharCode["Space"] = 32] = "Space";
297644
+ CharCode[CharCode["Tab"] = 9] = "Tab";
297645
+ CharCode[CharCode["LineFeed"] = 10] = "LineFeed";
297646
+ CharCode[CharCode["CarriageReturn"] = 13] = "CarriageReturn";
297647
+ })(CharCode || (CharCode = {}));
297556
297648
  function isWhitespace(code) {
297557
- return (code === 32 /* CharCode.Space */
297558
- || code === 9 /* CharCode.Tab */
297559
- || code === 10 /* CharCode.LineFeed */
297560
- || code === 13 /* CharCode.CarriageReturn */);
297649
+ return (code === CharCode.Space
297650
+ || code === CharCode.Tab
297651
+ || code === CharCode.LineFeed
297652
+ || code === CharCode.CarriageReturn);
297561
297653
  }
297562
297654
  const wordSeparators = new Set();
297563
297655
  '`~!@#$%^&*()-=+[{]}\\|;:\'",.<>/?'
@@ -297569,9 +297661,6 @@ function isWordSeparator(code) {
297569
297661
  function charactersMatch(codeA, codeB) {
297570
297662
  return (codeA === codeB) || (isWordSeparator(codeA) && isWordSeparator(codeB));
297571
297663
  }
297572
- function isAlphanumeric(code) {
297573
- return isLower(code) || isUpper(code) || isNumber(code);
297574
- }
297575
297664
  function join(head, tail) {
297576
297665
  if (tail.length === 0) {
297577
297666
  tail = [head];
@@ -297584,128 +297673,6 @@ function join(head, tail) {
297584
297673
  }
297585
297674
  return tail;
297586
297675
  }
297587
- function nextAnchor(camelCaseWord, start) {
297588
- for (let i = start; i < camelCaseWord.length; i++) {
297589
- const c = camelCaseWord.charCodeAt(i);
297590
- if (isUpper(c) || isNumber(c) || (i > 0 && !isAlphanumeric(camelCaseWord.charCodeAt(i - 1)))) {
297591
- return i;
297592
- }
297593
- }
297594
- return camelCaseWord.length;
297595
- }
297596
- function _matchesCamelCase(word, camelCaseWord, i, j) {
297597
- if (i === word.length) {
297598
- return [];
297599
- }
297600
- else if (j === camelCaseWord.length) {
297601
- return null;
297602
- }
297603
- else if (word[i] !== camelCaseWord[j].toLowerCase()) {
297604
- return null;
297605
- }
297606
- else {
297607
- let result = null;
297608
- let nextUpperIndex = j + 1;
297609
- result = _matchesCamelCase(word, camelCaseWord, i + 1, j + 1);
297610
- while (!result && (nextUpperIndex = nextAnchor(camelCaseWord, nextUpperIndex)) < camelCaseWord.length) {
297611
- result = _matchesCamelCase(word, camelCaseWord, i + 1, nextUpperIndex);
297612
- nextUpperIndex++;
297613
- }
297614
- return result === null ? null : join({ start: j, end: j + 1 }, result);
297615
- }
297616
- }
297617
- // Heuristic to avoid computing camel case matcher for words that don't
297618
- // look like camelCaseWords.
297619
- function analyzeCamelCaseWord(word) {
297620
- let upper = 0, lower = 0, alpha = 0, numeric = 0, code = 0;
297621
- for (let i = 0; i < word.length; i++) {
297622
- code = word.charCodeAt(i);
297623
- if (isUpper(code)) {
297624
- upper++;
297625
- }
297626
- if (isLower(code)) {
297627
- lower++;
297628
- }
297629
- if (isAlphanumeric(code)) {
297630
- alpha++;
297631
- }
297632
- if (isNumber(code)) {
297633
- numeric++;
297634
- }
297635
- }
297636
- const upperPercent = upper / word.length;
297637
- const lowerPercent = lower / word.length;
297638
- const alphaPercent = alpha / word.length;
297639
- const numericPercent = numeric / word.length;
297640
- return { upperPercent, lowerPercent, alphaPercent, numericPercent };
297641
- }
297642
- function isUpperCaseWord(analysis) {
297643
- const { upperPercent, lowerPercent } = analysis;
297644
- return lowerPercent === 0 && upperPercent > 0.6;
297645
- }
297646
- function isCamelCaseWord(analysis) {
297647
- const { upperPercent, lowerPercent, alphaPercent, numericPercent } = analysis;
297648
- return lowerPercent > 0.2 && upperPercent < 0.8 && alphaPercent > 0.6 && numericPercent < 0.2;
297649
- }
297650
- // Heuristic to avoid computing camel case matcher for words that don't
297651
- // look like camel case patterns.
297652
- function isCamelCasePattern(word) {
297653
- let upper = 0, lower = 0, code = 0, whitespace = 0;
297654
- for (let i = 0; i < word.length; i++) {
297655
- code = word.charCodeAt(i);
297656
- if (isUpper(code)) {
297657
- upper++;
297658
- }
297659
- if (isLower(code)) {
297660
- lower++;
297661
- }
297662
- if (isWhitespace(code)) {
297663
- whitespace++;
297664
- }
297665
- }
297666
- if ((upper === 0 || lower === 0) && whitespace === 0) {
297667
- return word.length <= 30;
297668
- }
297669
- else {
297670
- return upper <= 5;
297671
- }
297672
- }
297673
- /**
297674
- * Return matches treating "camelCase" words separately. For example the filter string "gp" would return two matches in string "Git Pull".
297675
- * @param word filter string
297676
- * @param wordToMatchAgainst string to test
297677
- * @internal
297678
- */
297679
- function matchesCamelCase(word, camelCaseWord) {
297680
- if (!camelCaseWord) {
297681
- return null;
297682
- }
297683
- camelCaseWord = camelCaseWord.trim();
297684
- if (camelCaseWord.length === 0) {
297685
- return null;
297686
- }
297687
- if (!isCamelCasePattern(camelCaseWord)) {
297688
- return null;
297689
- }
297690
- if (camelCaseWord.length > 60) {
297691
- return null;
297692
- }
297693
- const analysis = analyzeCamelCaseWord(camelCaseWord);
297694
- if (!isCamelCaseWord(analysis)) {
297695
- // istanbul ignore next
297696
- if (!isUpperCaseWord(analysis)) {
297697
- return null;
297698
- }
297699
- camelCaseWord = camelCaseWord.toLowerCase();
297700
- }
297701
- let result = null;
297702
- let i = 0;
297703
- word = word.toLowerCase();
297704
- while (i < camelCaseWord.length && (result = _matchesCamelCase(word, camelCaseWord, 0, i)) === null) {
297705
- i = nextAnchor(camelCaseWord, i + 1);
297706
- }
297707
- return result;
297708
- }
297709
297676
  /**
297710
297677
  * Matches beginning of words supporting non-ASCII languages.
297711
297678
  * @param word Filter string
@@ -297713,7 +297680,7 @@ function matchesCamelCase(word, camelCaseWord) {
297713
297680
  * @param contiguous - If true the filter string must be found "contiguous" in the searched string (E.g. "pul" will match "Git: Pull").
297714
297681
  * Otherwise also matches sub string of the word with beginnings of the words in the target (e.g. "gp" or "g p" will match "Git: Pull").
297715
297682
  * Useful in cases where the target is words (e.g. command labels)
297716
- * @internal
297683
+ * @internal @deprecated in 4.3. Use `matchesWords` from @itwin/core-react instead. Though internal, this requires deprecation due to known public usage in @itwin/core-react.
297717
297684
  */
297718
297685
  function matchesWords(word, target, contiguous = false) {
297719
297686
  if (!target || target.length === 0) {
@@ -297761,898 +297728,6 @@ function nextWord(word, start) {
297761
297728
  }
297762
297729
  return word.length;
297763
297730
  }
297764
- // Fuzzy
297765
- const fuzzyContiguousFilter = or(matchesPrefix, matchesCamelCase, matchesContiguousSubString);
297766
- const fuzzySeparateFilter = or(matchesPrefix, matchesCamelCase, matchesSubString);
297767
- const fuzzyRegExpCache = new _map__WEBPACK_IMPORTED_MODULE_0__.LRUCache(10000); // bounded to 10000 elements
297768
- /**
297769
- * Match pattern against word in a fuzzy way. This will only return a single match.
297770
- * @internal
297771
- */
297772
- function matchesFuzzy(word, wordToMatchAgainst, enableSeparateSubstringMatching = false) {
297773
- // istanbul ignore next
297774
- if (typeof word !== "string" || typeof wordToMatchAgainst !== "string") {
297775
- return null; // return early for invalid input
297776
- }
297777
- // Form RegExp for wildcard matches
297778
- let regexp = fuzzyRegExpCache.get(word);
297779
- if (!regexp) {
297780
- regexp = new RegExp(_strings__WEBPACK_IMPORTED_MODULE_1__.convertSimple2RegExpPattern(word), "i");
297781
- fuzzyRegExpCache.set(word, regexp);
297782
- }
297783
- // RegExp Filter
297784
- const match = regexp.exec(wordToMatchAgainst);
297785
- if (match) {
297786
- return [{ start: match.index, end: match.index + match[0].length }];
297787
- }
297788
- // Default Filter
297789
- return enableSeparateSubstringMatching ? /* istanbul ignore next */ fuzzySeparateFilter(word, wordToMatchAgainst) : fuzzyContiguousFilter(word, wordToMatchAgainst);
297790
- }
297791
- /**
297792
- * Match pattern against word in a fuzzy way. As in IntelliSense and faster and more
297793
- * powerful than `matchesFuzzy`. This will only return a single match.
297794
- * @internal
297795
- */
297796
- function matchesFuzzy2(pattern, word) {
297797
- const score = fuzzyScore(pattern, pattern.toLowerCase(), 0, word, word.toLowerCase(), 0, true);
297798
- return score ? createMatches(score) : null;
297799
- }
297800
- // #region --- fuzzyScore ---
297801
- /**
297802
- * @internal
297803
- */
297804
- function createMatches(score) {
297805
- // istanbul ignore next
297806
- if (typeof score === "undefined") {
297807
- return [];
297808
- }
297809
- const matches = score[1].toString(2);
297810
- const wordStart = score[2];
297811
- const res = [];
297812
- for (let pos = wordStart; pos < _maxLen; pos++) {
297813
- if (matches[matches.length - (pos + 1)] === "1") {
297814
- const last = res[res.length - 1];
297815
- if (last && last.end === pos) {
297816
- last.end = pos + 1;
297817
- }
297818
- else {
297819
- res.push({ start: pos, end: pos + 1 });
297820
- }
297821
- }
297822
- }
297823
- return res;
297824
- }
297825
- const _maxLen = 128;
297826
- function initTable() {
297827
- const table = [];
297828
- const row = [0];
297829
- for (let i = 1; i <= _maxLen; i++) {
297830
- row.push(-i);
297831
- }
297832
- for (let i = 0; i <= _maxLen; i++) {
297833
- const thisRow = row.slice(0);
297834
- thisRow[0] = -i;
297835
- table.push(thisRow);
297836
- }
297837
- return table;
297838
- }
297839
- const _table = initTable();
297840
- const _scores = initTable();
297841
- // eslint-disable-next-line @typescript-eslint/consistent-type-assertions
297842
- const _arrows = initTable();
297843
- const _debug = false;
297844
- function isSeparatorAtPos(value, index) {
297845
- if (index < 0 || index >= value.length) {
297846
- return false;
297847
- }
297848
- const code = value.charCodeAt(index);
297849
- switch (code) {
297850
- case 95 /* CharCode.Underline */:
297851
- case 45 /* CharCode.Dash */:
297852
- case 46 /* CharCode.Period */:
297853
- case 32 /* CharCode.Space */:
297854
- case 47 /* CharCode.Slash */:
297855
- case 92 /* CharCode.Backslash */:
297856
- case 39 /* CharCode.SingleQuote */:
297857
- case 34 /* CharCode.DoubleQuote */:
297858
- case 58 /* CharCode.Colon */:
297859
- case 36 /* CharCode.DollarSign */:
297860
- return true;
297861
- default:
297862
- return false;
297863
- }
297864
- }
297865
- function isWhitespaceAtPos(value, index) {
297866
- if (index < 0 || index >= value.length) {
297867
- return false;
297868
- }
297869
- const code = value.charCodeAt(index);
297870
- switch (code) {
297871
- // istanbul ignore next
297872
- case 32 /* CharCode.Space */:
297873
- case 9 /* CharCode.Tab */:
297874
- return true;
297875
- default:
297876
- return false;
297877
- }
297878
- }
297879
- function isUpperCaseAtPos(pos, word, wordLow) {
297880
- return word[pos] !== wordLow[pos];
297881
- }
297882
- /** @internal */
297883
- function isPatternInWord(patternLow, patternPos, patternLen, wordLow, wordPos, wordLen) {
297884
- while (patternPos < patternLen && wordPos < wordLen) {
297885
- if (patternLow[patternPos] === wordLow[wordPos]) {
297886
- patternPos += 1;
297887
- }
297888
- wordPos += 1;
297889
- }
297890
- return patternPos === patternLen; // pattern must be exhausted
297891
- }
297892
- /** @internal */
297893
- var FuzzyScore;
297894
- (function (FuzzyScore) {
297895
- /**
297896
- * No matches and value `-100`
297897
- * @internal
297898
- */
297899
- // eslint-disable-next-line @typescript-eslint/consistent-type-assertions
297900
- FuzzyScore.Default = Object.freeze([-100, 0, 0]);
297901
- // istanbul ignore next
297902
- /** @internal */
297903
- function isDefault(score) {
297904
- return !score || (score[0] === -100 && score[1] === 0 && score[2] === 0);
297905
- }
297906
- FuzzyScore.isDefault = isDefault;
297907
- })(FuzzyScore || (FuzzyScore = {}));
297908
- /** @internal */
297909
- function fuzzyScore(pattern, patternLow, patternStart, word, wordLow, wordStart, firstMatchCanBeWeak) {
297910
- // istanbul ignore next
297911
- const patternLen = pattern.length > _maxLen ? _maxLen : pattern.length;
297912
- const wordLen = word.length > _maxLen ? _maxLen : word.length;
297913
- if (patternStart >= patternLen || wordStart >= wordLen || (patternLen - patternStart) > (wordLen - wordStart)) {
297914
- return undefined;
297915
- }
297916
- // Run a simple check if the characters of pattern occur
297917
- // (in order) at all in word. If that isn't the case we
297918
- // stop because no match will be possible
297919
- if (!isPatternInWord(patternLow, patternStart, patternLen, wordLow, wordStart, wordLen)) {
297920
- return undefined;
297921
- }
297922
- let row = 1;
297923
- let column = 1;
297924
- let patternPos = patternStart;
297925
- let wordPos = wordStart;
297926
- let hasStrongFirstMatch = false;
297927
- // There will be a match, fill in tables
297928
- for (row = 1, patternPos = patternStart; patternPos < patternLen; row++, patternPos++) {
297929
- for (column = 1, wordPos = wordStart; wordPos < wordLen; column++, wordPos++) {
297930
- const score = _doScore(pattern, patternLow, patternPos, patternStart, word, wordLow, wordPos);
297931
- if (patternPos === patternStart && score > 1) {
297932
- hasStrongFirstMatch = true;
297933
- }
297934
- _scores[row][column] = score;
297935
- const diag = _table[row - 1][column - 1] + (score > 1 ? 1 : score);
297936
- const top = _table[row - 1][column] + -1;
297937
- const left = _table[row][column - 1] + -1;
297938
- if (left >= top) {
297939
- // left or diag
297940
- if (left > diag) {
297941
- _table[row][column] = left;
297942
- _arrows[row][column] = 4 /* Arrow.Left */;
297943
- }
297944
- else if (left === diag) {
297945
- _table[row][column] = left;
297946
- _arrows[row][column] = 4 /* Arrow.Left */ | 2 /* Arrow.Diag */;
297947
- }
297948
- else {
297949
- _table[row][column] = diag;
297950
- _arrows[row][column] = 2 /* Arrow.Diag */;
297951
- }
297952
- }
297953
- else {
297954
- // top or diag
297955
- if (top > diag) {
297956
- _table[row][column] = top;
297957
- _arrows[row][column] = 1 /* Arrow.Top */;
297958
- }
297959
- else if (top === diag) {
297960
- _table[row][column] = top;
297961
- _arrows[row][column] = 1 /* Arrow.Top */ | 2 /* Arrow.Diag */;
297962
- }
297963
- else {
297964
- _table[row][column] = diag;
297965
- _arrows[row][column] = 2 /* Arrow.Diag */;
297966
- }
297967
- }
297968
- }
297969
- }
297970
- if (!hasStrongFirstMatch && !firstMatchCanBeWeak) {
297971
- return undefined;
297972
- }
297973
- _matchesCount = 0;
297974
- _topScore = -100;
297975
- _wordStart = wordStart;
297976
- _firstMatchCanBeWeak = firstMatchCanBeWeak;
297977
- _findAllMatches2(row - 1, column - 1, patternLen === wordLen ? 1 : 0, 0, false);
297978
- if (_matchesCount === 0) {
297979
- return undefined;
297980
- }
297981
- return [_topScore, _topMatch2, wordStart];
297982
- }
297983
- function _doScore(pattern, patternLow, patternPos, patternStart, word, wordLow, wordPos) {
297984
- if (patternLow[patternPos] !== wordLow[wordPos]) {
297985
- return -1;
297986
- }
297987
- if (wordPos === (patternPos - patternStart)) {
297988
- // common prefix: `foobar <-> foobaz`
297989
- // ^^^^^
297990
- if (pattern[patternPos] === word[wordPos]) {
297991
- return 7;
297992
- }
297993
- else {
297994
- return 5;
297995
- }
297996
- }
297997
- else if (isUpperCaseAtPos(wordPos, word, wordLow) && (wordPos === 0 || !isUpperCaseAtPos(wordPos - 1, word, wordLow))) {
297998
- // hitting upper-case: `foo <-> forOthers`
297999
- // ^^ ^
298000
- if (pattern[patternPos] === word[wordPos]) {
298001
- return 7;
298002
- }
298003
- else {
298004
- return 5;
298005
- }
298006
- }
298007
- else if (isSeparatorAtPos(wordLow, wordPos) && (wordPos === 0 || !isSeparatorAtPos(wordLow, wordPos - 1))) {
298008
- // hitting a separator: `. <-> foo.bar`
298009
- // ^
298010
- return 5;
298011
- }
298012
- else if (isSeparatorAtPos(wordLow, wordPos - 1) || isWhitespaceAtPos(wordLow, wordPos - 1)) {
298013
- // post separator: `foo <-> bar_foo`
298014
- // ^^^
298015
- return 5;
298016
- }
298017
- else {
298018
- return 1;
298019
- }
298020
- }
298021
- let _matchesCount = 0;
298022
- let _topMatch2 = 0;
298023
- let _topScore = 0;
298024
- let _wordStart = 0;
298025
- let _firstMatchCanBeWeak = false;
298026
- function _findAllMatches2(row, column, total, matches, lastMatched) {
298027
- if (_matchesCount >= 10 || total < -25) {
298028
- // stop when having already 10 results, or
298029
- // when a potential alignment as already 5 gaps
298030
- return;
298031
- }
298032
- let simpleMatchCount = 0;
298033
- while (row > 0 && column > 0) {
298034
- const score = _scores[row][column];
298035
- const arrow = _arrows[row][column];
298036
- if (arrow === 4 /* Arrow.Left */) {
298037
- // left -> no match, skip a word character
298038
- column -= 1;
298039
- if (lastMatched) {
298040
- total -= 5; // new gap penalty
298041
- }
298042
- else if (matches !== 0) {
298043
- total -= 1; // gap penalty after first match
298044
- }
298045
- lastMatched = false;
298046
- simpleMatchCount = 0;
298047
- }
298048
- else {
298049
- /* istanbul ignore else */
298050
- if (arrow & 2 /* Arrow.Diag */) {
298051
- if (arrow & 4 /* Arrow.Left */) {
298052
- // left
298053
- _findAllMatches2(row, column - 1, matches !== 0 ? total - 1 : total, // gap penalty after first match
298054
- matches, lastMatched);
298055
- }
298056
- // diag
298057
- total += score;
298058
- row -= 1;
298059
- column -= 1;
298060
- lastMatched = true;
298061
- // match -> set a 1 at the word pos
298062
- matches += 2 ** (column + _wordStart);
298063
- // count simple matches and boost a row of
298064
- // simple matches when they yield in a
298065
- // strong match.
298066
- if (score === 1) {
298067
- simpleMatchCount += 1;
298068
- if (row === 0 && !_firstMatchCanBeWeak) {
298069
- // when the first match is a weak
298070
- // match we discard it
298071
- return undefined;
298072
- }
298073
- }
298074
- else {
298075
- // boost
298076
- total += 1 + (simpleMatchCount * (score - 1));
298077
- simpleMatchCount = 0;
298078
- }
298079
- }
298080
- else {
298081
- // istanbul ignore next
298082
- return undefined;
298083
- }
298084
- }
298085
- }
298086
- total -= column >= 3 ? 9 : column * 3; // late start penalty
298087
- // dynamically keep track of the current top score
298088
- // and insert the current best score at head, the rest at tail
298089
- _matchesCount += 1;
298090
- if (total > _topScore) {
298091
- _topScore = total;
298092
- _topMatch2 = matches;
298093
- }
298094
- }
298095
- // #endregion
298096
- // #region --- graceful ---
298097
- /** @internal */
298098
- function fuzzyScoreGracefulAggressive(pattern, lowPattern, patternPos, word, lowWord, wordPos, firstMatchCanBeWeak) {
298099
- return fuzzyScoreWithPermutations(pattern, lowPattern, patternPos, word, lowWord, wordPos, true, firstMatchCanBeWeak);
298100
- }
298101
- /** @internal */
298102
- function fuzzyScoreGraceful(pattern, lowPattern, patternPos, word, lowWord, wordPos, firstMatchCanBeWeak) {
298103
- return fuzzyScoreWithPermutations(pattern, lowPattern, patternPos, word, lowWord, wordPos, false, firstMatchCanBeWeak);
298104
- }
298105
- function fuzzyScoreWithPermutations(pattern, lowPattern, patternPos, word, lowWord, wordPos, aggressive, firstMatchCanBeWeak) {
298106
- let top = fuzzyScore(pattern, lowPattern, patternPos, word, lowWord, wordPos, firstMatchCanBeWeak);
298107
- if (top && !aggressive) {
298108
- // when using the original pattern yield a result we`
298109
- // return it unless we are aggressive and try to find
298110
- // a better alignment, e.g. `cno` -> `^co^ns^ole` or `^c^o^nsole`.
298111
- return top;
298112
- }
298113
- // istanbul ignore else
298114
- if (pattern.length >= 3) {
298115
- // When the pattern is long enough then try a few (max 7)
298116
- // permutations of the pattern to find a better match. The
298117
- // permutations only swap neighbouring characters, e.g
298118
- // `cnoso` becomes `conso`, `cnsoo`, `cnoos`.
298119
- const tries = Math.min(7, pattern.length - 1);
298120
- for (let movingPatternPos = patternPos + 1; movingPatternPos < tries; movingPatternPos++) {
298121
- const newPattern = nextTypoPermutation(pattern, movingPatternPos);
298122
- // istanbul ignore else
298123
- if (newPattern) {
298124
- const candidate = fuzzyScore(newPattern, newPattern.toLowerCase(), patternPos, word, lowWord, wordPos, firstMatchCanBeWeak);
298125
- if (candidate) {
298126
- candidate[0] -= 3; // permutation penalty
298127
- // istanbul ignore else
298128
- if (!top || candidate[0] > top[0]) {
298129
- top = candidate;
298130
- }
298131
- }
298132
- }
298133
- }
298134
- }
298135
- return top;
298136
- }
298137
- function nextTypoPermutation(pattern, patternPos) {
298138
- // istanbul ignore next
298139
- if (patternPos + 1 >= pattern.length) {
298140
- return undefined;
298141
- }
298142
- const swap1 = pattern[patternPos];
298143
- const swap2 = pattern[patternPos + 1];
298144
- // istanbul ignore next
298145
- if (swap1 === swap2) {
298146
- return undefined;
298147
- }
298148
- return pattern.slice(0, patternPos)
298149
- + swap2
298150
- + swap1
298151
- + pattern.slice(patternPos + 2);
298152
- }
298153
- // #endregion
298154
-
298155
-
298156
- /***/ }),
298157
-
298158
- /***/ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/filter/map.js":
298159
- /*!**************************************************************************!*\
298160
- !*** ../../ui/appui-abstract/lib/esm/appui-abstract/utils/filter/map.js ***!
298161
- \**************************************************************************/
298162
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
298163
-
298164
- "use strict";
298165
- __webpack_require__.r(__webpack_exports__);
298166
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
298167
- /* harmony export */ LRUCache: () => (/* binding */ LRUCache),
298168
- /* harmony export */ LinkedMap: () => (/* binding */ LinkedMap)
298169
- /* harmony export */ });
298170
- /*---------------------------------------------------------------------------------------------
298171
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
298172
- * See LICENSE.md in the project root for license terms and full copyright notice.
298173
- *--------------------------------------------------------------------------------------------*/
298174
- var _a;
298175
- /**
298176
- * @internal
298177
- */
298178
- // istanbul ignore next
298179
- class LinkedMap {
298180
- constructor() {
298181
- this[_a] = "LinkedMap";
298182
- this._map = new Map();
298183
- this._head = undefined;
298184
- this._tail = undefined;
298185
- this._size = 0;
298186
- this._state = 0;
298187
- }
298188
- clear() {
298189
- this._map.clear();
298190
- this._head = undefined;
298191
- this._tail = undefined;
298192
- this._size = 0;
298193
- this._state++;
298194
- }
298195
- isEmpty() {
298196
- return !this._head && !this._tail;
298197
- }
298198
- get size() {
298199
- return this._size;
298200
- }
298201
- get first() {
298202
- return this._head?.value;
298203
- }
298204
- get last() {
298205
- return this._tail?.value;
298206
- }
298207
- has(key) {
298208
- return this._map.has(key);
298209
- }
298210
- get(key, touch = 0 /* Touch.None */) {
298211
- const item = this._map.get(key);
298212
- if (!item) {
298213
- return undefined;
298214
- }
298215
- if (touch !== 0 /* Touch.None */) {
298216
- this.touch(item, touch);
298217
- }
298218
- return item.value;
298219
- }
298220
- set(key, value, touch = 0 /* Touch.None */) {
298221
- let item = this._map.get(key);
298222
- if (item) {
298223
- item.value = value;
298224
- if (touch !== 0 /* Touch.None */) {
298225
- this.touch(item, touch);
298226
- }
298227
- }
298228
- else {
298229
- item = { key, value, next: undefined, previous: undefined };
298230
- switch (touch) {
298231
- case 0 /* Touch.None */:
298232
- this.addItemLast(item);
298233
- break;
298234
- case 1 /* Touch.AsOld */:
298235
- this.addItemFirst(item);
298236
- break;
298237
- case 2 /* Touch.AsNew */:
298238
- this.addItemLast(item);
298239
- break;
298240
- default:
298241
- this.addItemLast(item);
298242
- break;
298243
- }
298244
- this._map.set(key, item);
298245
- this._size++;
298246
- }
298247
- return this;
298248
- }
298249
- delete(key) {
298250
- return !!this.remove(key);
298251
- }
298252
- remove(key) {
298253
- const item = this._map.get(key);
298254
- if (!item) {
298255
- return undefined;
298256
- }
298257
- this._map.delete(key);
298258
- this.removeItem(item);
298259
- this._size--;
298260
- return item.value;
298261
- }
298262
- shift() {
298263
- if (!this._head && !this._tail) {
298264
- return undefined;
298265
- }
298266
- if (!this._head || !this._tail) {
298267
- throw new Error("Invalid list");
298268
- }
298269
- const item = this._head;
298270
- this._map.delete(item.key);
298271
- this.removeItem(item);
298272
- this._size--;
298273
- return item.value;
298274
- }
298275
- forEach(callbackfn, thisArg) {
298276
- const state = this._state;
298277
- let current = this._head;
298278
- while (current) {
298279
- if (thisArg) {
298280
- callbackfn.bind(thisArg)(current.value, current.key, this);
298281
- }
298282
- else {
298283
- callbackfn(current.value, current.key, this);
298284
- }
298285
- if (this._state !== state) {
298286
- throw new Error(`LinkedMap got modified during iteration.`);
298287
- }
298288
- current = current.next;
298289
- }
298290
- }
298291
- keys() {
298292
- const map = this;
298293
- const state = this._state;
298294
- let current = this._head;
298295
- const iterator = {
298296
- [Symbol.iterator]() {
298297
- return iterator;
298298
- },
298299
- next() {
298300
- if (map._state !== state) {
298301
- throw new Error(`LinkedMap got modified during iteration.`);
298302
- }
298303
- if (current) {
298304
- const result = { value: current.key, done: false };
298305
- current = current.next;
298306
- return result;
298307
- }
298308
- else {
298309
- return { value: undefined, done: true };
298310
- }
298311
- },
298312
- };
298313
- return iterator;
298314
- }
298315
- values() {
298316
- const map = this;
298317
- const state = this._state;
298318
- let current = this._head;
298319
- const iterator = {
298320
- [Symbol.iterator]() {
298321
- return iterator;
298322
- },
298323
- next() {
298324
- if (map._state !== state) {
298325
- throw new Error(`LinkedMap got modified during iteration.`);
298326
- }
298327
- if (current) {
298328
- const result = { value: current.value, done: false };
298329
- current = current.next;
298330
- return result;
298331
- }
298332
- else {
298333
- return { value: undefined, done: true };
298334
- }
298335
- },
298336
- };
298337
- return iterator;
298338
- }
298339
- entries() {
298340
- // eslint-disable-next-line @typescript-eslint/no-this-alias
298341
- const map = this;
298342
- const state = this._state;
298343
- let current = this._head;
298344
- const iterator = {
298345
- [Symbol.iterator]() {
298346
- return iterator;
298347
- },
298348
- next() {
298349
- if (map._state !== state) {
298350
- throw new Error(`LinkedMap got modified during iteration.`);
298351
- }
298352
- if (current) {
298353
- const result = { value: [current.key, current.value], done: false };
298354
- current = current.next;
298355
- return result;
298356
- }
298357
- else {
298358
- return { value: undefined, done: true };
298359
- }
298360
- },
298361
- };
298362
- return iterator;
298363
- }
298364
- [(_a = Symbol.toStringTag, Symbol.iterator)]() {
298365
- return this.entries();
298366
- }
298367
- trimOld(newSize) {
298368
- if (newSize >= this.size) {
298369
- return;
298370
- }
298371
- if (newSize === 0) {
298372
- this.clear();
298373
- return;
298374
- }
298375
- let current = this._head;
298376
- let currentSize = this.size;
298377
- while (current && currentSize > newSize) {
298378
- this._map.delete(current.key);
298379
- current = current.next;
298380
- currentSize--;
298381
- }
298382
- this._head = current;
298383
- this._size = currentSize;
298384
- if (current) {
298385
- current.previous = undefined;
298386
- }
298387
- this._state++;
298388
- }
298389
- addItemFirst(item) {
298390
- // First time Insert
298391
- if (!this._head && !this._tail) {
298392
- this._tail = item;
298393
- }
298394
- else if (!this._head) {
298395
- throw new Error("Invalid list");
298396
- }
298397
- else {
298398
- item.next = this._head;
298399
- this._head.previous = item;
298400
- }
298401
- this._head = item;
298402
- this._state++;
298403
- }
298404
- addItemLast(item) {
298405
- // First time Insert
298406
- if (!this._head && !this._tail) {
298407
- this._head = item;
298408
- }
298409
- else if (!this._tail) {
298410
- throw new Error("Invalid list");
298411
- }
298412
- else {
298413
- item.previous = this._tail;
298414
- this._tail.next = item;
298415
- }
298416
- this._tail = item;
298417
- this._state++;
298418
- }
298419
- removeItem(item) {
298420
- if (item === this._head && item === this._tail) {
298421
- this._head = undefined;
298422
- this._tail = undefined;
298423
- }
298424
- else if (item === this._head) {
298425
- // This can only happend if size === 1 which is handle
298426
- // by the case above.
298427
- if (!item.next) {
298428
- throw new Error("Invalid list");
298429
- }
298430
- item.next.previous = undefined;
298431
- this._head = item.next;
298432
- }
298433
- else if (item === this._tail) {
298434
- // This can only happend if size === 1 which is handle
298435
- // by the case above.
298436
- if (!item.previous) {
298437
- throw new Error("Invalid list");
298438
- }
298439
- item.previous.next = undefined;
298440
- this._tail = item.previous;
298441
- }
298442
- else {
298443
- const next = item.next;
298444
- const previous = item.previous;
298445
- if (!next || !previous) {
298446
- throw new Error("Invalid list");
298447
- }
298448
- next.previous = previous;
298449
- previous.next = next;
298450
- }
298451
- item.next = undefined;
298452
- item.previous = undefined;
298453
- this._state++;
298454
- }
298455
- touch(item, touch) {
298456
- if (!this._head || !this._tail) {
298457
- throw new Error("Invalid list");
298458
- }
298459
- if ((touch !== 1 /* Touch.AsOld */ && touch !== 2 /* Touch.AsNew */)) {
298460
- return;
298461
- }
298462
- if (touch === 1 /* Touch.AsOld */) {
298463
- if (item === this._head) {
298464
- return;
298465
- }
298466
- const next = item.next;
298467
- const previous = item.previous;
298468
- // Unlink the item
298469
- if (item === this._tail) {
298470
- // previous must be defined since item was not head but is tail
298471
- // So there are more than on item in the map
298472
- previous.next = undefined;
298473
- this._tail = previous;
298474
- }
298475
- else {
298476
- // Both next and previous are not undefined since item was neither head nor tail.
298477
- next.previous = previous;
298478
- previous.next = next;
298479
- }
298480
- // Insert the node at head
298481
- item.previous = undefined;
298482
- item.next = this._head;
298483
- this._head.previous = item;
298484
- this._head = item;
298485
- this._state++;
298486
- }
298487
- else if (touch === 2 /* Touch.AsNew */) {
298488
- if (item === this._tail) {
298489
- return;
298490
- }
298491
- const next = item.next;
298492
- const previous = item.previous;
298493
- // Unlink the item.
298494
- if (item === this._head) {
298495
- // next must be defined since item was not tail but is head
298496
- // So there are more than on item in the map
298497
- next.previous = undefined;
298498
- this._head = next;
298499
- }
298500
- else {
298501
- // Both next and previous are not undefined since item was neither head nor tail.
298502
- next.previous = previous;
298503
- previous.next = next;
298504
- }
298505
- item.next = undefined;
298506
- item.previous = this._tail;
298507
- this._tail.next = item;
298508
- this._tail = item;
298509
- this._state++;
298510
- }
298511
- }
298512
- toJSON() {
298513
- const data = [];
298514
- this.forEach((value, key) => {
298515
- data.push([key, value]);
298516
- });
298517
- return data;
298518
- }
298519
- fromJSON(data) {
298520
- this.clear();
298521
- for (const [key, value] of data) {
298522
- this.set(key, value);
298523
- }
298524
- }
298525
- }
298526
- /**
298527
- * @internal
298528
- */
298529
- // istanbul ignore next
298530
- class LRUCache extends LinkedMap {
298531
- constructor(limit, ratio = 1) {
298532
- super();
298533
- this._limit = limit;
298534
- this._ratio = Math.min(Math.max(0, ratio), 1);
298535
- }
298536
- get limit() {
298537
- return this._limit;
298538
- }
298539
- set limit(limit) {
298540
- this._limit = limit;
298541
- this.checkTrim();
298542
- }
298543
- get ratio() {
298544
- return this._ratio;
298545
- }
298546
- set ratio(ratio) {
298547
- this._ratio = Math.min(Math.max(0, ratio), 1);
298548
- this.checkTrim();
298549
- }
298550
- get(key, touch = 2 /* Touch.AsNew */) {
298551
- return super.get(key, touch);
298552
- }
298553
- peek(key) {
298554
- return super.get(key, 0 /* Touch.None */);
298555
- }
298556
- set(key, value) {
298557
- super.set(key, value, 2 /* Touch.AsNew */);
298558
- this.checkTrim();
298559
- return this;
298560
- }
298561
- checkTrim() {
298562
- if (this.size > this._limit) {
298563
- this.trimOld(Math.round(this._limit * this._ratio));
298564
- }
298565
- }
298566
- }
298567
-
298568
-
298569
- /***/ }),
298570
-
298571
- /***/ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/filter/strings.js":
298572
- /*!******************************************************************************!*\
298573
- !*** ../../ui/appui-abstract/lib/esm/appui-abstract/utils/filter/strings.js ***!
298574
- \******************************************************************************/
298575
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
298576
-
298577
- "use strict";
298578
- __webpack_require__.r(__webpack_exports__);
298579
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
298580
- /* harmony export */ convertSimple2RegExpPattern: () => (/* binding */ convertSimple2RegExpPattern),
298581
- /* harmony export */ equalsIgnoreCase: () => (/* binding */ equalsIgnoreCase),
298582
- /* harmony export */ isLowerAsciiLetter: () => (/* binding */ isLowerAsciiLetter),
298583
- /* harmony export */ isUpperAsciiLetter: () => (/* binding */ isUpperAsciiLetter),
298584
- /* harmony export */ startsWithIgnoreCase: () => (/* binding */ startsWithIgnoreCase)
298585
- /* harmony export */ });
298586
- /*---------------------------------------------------------------------------------------------
298587
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
298588
- * See LICENSE.md in the project root for license terms and full copyright notice.
298589
- *--------------------------------------------------------------------------------------------*/
298590
- /**
298591
- * @internal
298592
- */
298593
- function convertSimple2RegExpPattern(pattern) {
298594
- return pattern.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g, "\\$&").replace(/[\*]/g, ".*");
298595
- }
298596
- /**
298597
- * @internal
298598
- */
298599
- function isLowerAsciiLetter(code) {
298600
- return code >= 97 /* CharCode.a */ && code <= 122 /* CharCode.z */;
298601
- }
298602
- /**
298603
- * @internal
298604
- */
298605
- function isUpperAsciiLetter(code) {
298606
- return code >= 65 /* CharCode.A */ && code <= 90 /* CharCode.Z */;
298607
- }
298608
- /**
298609
- * @internal
298610
- */
298611
- function isAsciiLetter(code) {
298612
- return isLowerAsciiLetter(code) || isUpperAsciiLetter(code);
298613
- }
298614
- /**
298615
- * @internal
298616
- */
298617
- function equalsIgnoreCase(a, b) {
298618
- return a.length === b.length && doEqualsIgnoreCase(a, b);
298619
- }
298620
- /**
298621
- * @internal
298622
- */
298623
- function doEqualsIgnoreCase(a, b, stopAt = a.length) {
298624
- for (let i = 0; i < stopAt; i++) {
298625
- const codeA = a.charCodeAt(i);
298626
- const codeB = b.charCodeAt(i);
298627
- if (codeA === codeB) {
298628
- continue;
298629
- }
298630
- // a-z A-Z
298631
- if (isAsciiLetter(codeA) && isAsciiLetter(codeB)) {
298632
- const diff = Math.abs(codeA - codeB);
298633
- if (diff !== 0 && diff !== 32) {
298634
- return false;
298635
- }
298636
- }
298637
- else {
298638
- // Any other char code
298639
- if (String.fromCharCode(codeA).toLowerCase() !== String.fromCharCode(codeB).toLowerCase()) {
298640
- return false;
298641
- }
298642
- }
298643
- }
298644
- return true;
298645
- }
298646
- /**
298647
- * @internal
298648
- */
298649
- function startsWithIgnoreCase(str, candidate) {
298650
- const candidateLength = candidate.length;
298651
- if (candidate.length > str.length) {
298652
- return false;
298653
- }
298654
- return doEqualsIgnoreCase(str, candidate, candidateLength);
298655
- }
298656
297731
 
298657
297732
 
298658
297733
  /***/ }),
@@ -298666,8 +297741,7 @@ function startsWithIgnoreCase(str, candidate) {
298666
297741
  "use strict";
298667
297742
  __webpack_require__.r(__webpack_exports__);
298668
297743
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
298669
- /* harmony export */ getClassName: () => (/* binding */ getClassName),
298670
- /* harmony export */ loggerCategory: () => (/* binding */ loggerCategory)
297744
+ /* harmony export */ getClassName: () => (/* binding */ getClassName)
298671
297745
  /* harmony export */ });
298672
297746
  /*---------------------------------------------------------------------------------------------
298673
297747
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
@@ -298678,6 +297752,7 @@ __webpack_require__.r(__webpack_exports__);
298678
297752
  */
298679
297753
  /** Gets the class name for an object.
298680
297754
  * @internal
297755
+ * @deprecated in 4.3. Please use your own implementation in the future. Though internal, this requires deprecation due to known public usage in @itwin/core-react.
298681
297756
  */
298682
297757
  const getClassName = (obj) => {
298683
297758
  let className = "";
@@ -298692,14 +297767,6 @@ const getClassName = (obj) => {
298692
297767
  }
298693
297768
  return className;
298694
297769
  };
298695
- /** Gets category to use for adding Log entries
298696
- * @internal
298697
- */
298698
- const loggerCategory = (obj) => {
298699
- const className = getClassName(obj);
298700
- const category = `appui-abstract${(className ? `.${className}` : "")}`;
298701
- return category;
298702
- };
298703
297770
 
298704
297771
 
298705
297772
  /***/ }),
@@ -304581,7 +303648,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
304581
303648
  /***/ ((module) => {
304582
303649
 
304583
303650
  "use strict";
304584
- module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.3.0-dev.31","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 webpackWorkers && npm run -s copy:workers","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 ES2020 --outDir lib/esm","clean":"rimraf 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:workers":"cpx \\"./lib/workers/webpack/parse-imdl-worker.js\\" ./lib/public/scripts","docs":"betools docs --includes=../../generated-docs/extract --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts","extract-api":"betools extract-api --entry=core-frontend && npm run extract-extension-api","extract-extension-api":"eslint -c extraction.eslint.config.js \\"./src/**/*.ts\\" 1>&2","lint":"eslint -f visualstudio \\"./src/**/*.ts\\" 1>&2","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run -s webpackTests && certa -r chrome","cover":"npm -s test","test:debug":"certa -r chrome --debug","webpackTests":"webpack --config ./src/test/utils/webpack.config.js 1>&2 && npm run -s webpackTestWorker","webpackTestWorker":"webpack --config ./src/test/worker/webpack.config.js 1>&2 && cpx \\"./lib/test/test-worker.js\\" ./lib/test","webpackWorkers":"webpack --config ./src/workers/ImdlParser/webpack.config.js 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:^4.3.0-dev.31","@itwin/core-bentley":"workspace:^4.3.0-dev.31","@itwin/core-common":"workspace:^4.3.0-dev.31","@itwin/core-geometry":"workspace:^4.3.0-dev.31","@itwin/core-orbitgt":"workspace:^4.3.0-dev.31","@itwin/core-quantity":"workspace:^4.3.0-dev.31"},"//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":{"@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/certa":"workspace:*","@itwin/eslint-plugin":"4.0.0-dev.44","@types/chai":"4.3.1","@types/chai-as-promised":"^7","@types/mocha":"^8.2.2","@types/sinon":"^10.0.15","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","chai":"^4.3.10","chai-as-promised":"^7","cpx2":"^3.0.0","eslint":"^8.44.0","glob":"^7.1.2","mocha":"^10.0.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^15.0.4","source-map-loader":"^4.0.0","typescript":"~5.0.2","typemoq":"^2.1.0","webpack":"^5.76.0"},"//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/cloud-agnostic-core":"^2.1.0","@itwin/object-storage-core":"^2.1.0","@itwin/core-i18n":"workspace:*","@itwin/core-telemetry":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","fuse.js":"^3.3.0","wms-capabilities":"0.4.0"},"nyc":{"extends":"./node_modules/@itwin/build-tools/.nycrc"}}');
303651
+ module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.3.0-dev.34","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 webpackWorkers && npm run -s copy:workers","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 ES2020 --outDir lib/esm","clean":"rimraf 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:workers":"cpx \\"./lib/workers/webpack/parse-imdl-worker.js\\" ./lib/public/scripts","docs":"betools docs --includes=../../generated-docs/extract --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts","extract-api":"betools extract-api --entry=core-frontend && npm run extract-extension-api","extract-extension-api":"eslint -c extraction.eslint.config.js \\"./src/**/*.ts\\" 1>&2","lint":"eslint -f visualstudio \\"./src/**/*.ts\\" 1>&2","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run -s webpackTests && certa -r chrome","cover":"npm -s test","test:debug":"certa -r chrome --debug","webpackTests":"webpack --config ./src/test/utils/webpack.config.js 1>&2 && npm run -s webpackTestWorker","webpackTestWorker":"webpack --config ./src/test/worker/webpack.config.js 1>&2 && cpx \\"./lib/test/test-worker.js\\" ./lib/test","webpackWorkers":"webpack --config ./src/workers/ImdlParser/webpack.config.js 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:^4.3.0-dev.34","@itwin/core-bentley":"workspace:^4.3.0-dev.34","@itwin/core-common":"workspace:^4.3.0-dev.34","@itwin/core-geometry":"workspace:^4.3.0-dev.34","@itwin/core-orbitgt":"workspace:^4.3.0-dev.34","@itwin/core-quantity":"workspace:^4.3.0-dev.34"},"//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":{"@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/certa":"workspace:*","@itwin/eslint-plugin":"4.0.0-dev.44","@types/chai":"4.3.1","@types/chai-as-promised":"^7","@types/mocha":"^8.2.2","@types/sinon":"^10.0.15","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","chai":"^4.3.10","chai-as-promised":"^7","cpx2":"^3.0.0","eslint":"^8.44.0","glob":"^7.1.2","mocha":"^10.0.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^15.0.4","source-map-loader":"^4.0.0","typescript":"~5.0.2","typemoq":"^2.1.0","webpack":"^5.76.0"},"//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/cloud-agnostic-core":"^2.1.0","@itwin/object-storage-core":"^2.1.0","@itwin/core-i18n":"workspace:*","@itwin/core-telemetry":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","fuse.js":"^3.3.0","wms-capabilities":"0.4.0"},"nyc":{"extends":"./node_modules/@itwin/build-tools/.nycrc"}}');
304585
303652
 
304586
303653
  /***/ }),
304587
303654