@itwin/ecschema-rpcinterface-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.
@@ -37269,6 +37269,7 @@ __webpack_require__.r(__webpack_exports__);
37269
37269
  /* harmony export */ });
37270
37270
  /* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
37271
37271
  /* harmony import */ var _BackgroundMapProvider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BackgroundMapProvider */ "../../core/common/lib/esm/BackgroundMapProvider.js");
37272
+ /* eslint-disable deprecation/deprecation */
37272
37273
  /*---------------------------------------------------------------------------------------------
37273
37274
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
37274
37275
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -37402,6 +37403,9 @@ class ImageMapLayerSettings extends MapLayerSettings {
37402
37403
  this.formatId = props.formatId;
37403
37404
  this.url = props.url;
37404
37405
  this.accessKey = props.accessKey;
37406
+ if (props.queryParams) {
37407
+ this.savedQueryParams = { ...props.queryParams };
37408
+ }
37405
37409
  this.subLayers = [];
37406
37410
  if (!props.subLayers)
37407
37411
  return;
@@ -37421,6 +37425,8 @@ class ImageMapLayerSettings extends MapLayerSettings {
37421
37425
  props.formatId = this.formatId;
37422
37426
  if (this.subLayers.length > 0)
37423
37427
  props.subLayers = this.subLayers.map((x) => x.toJSON());
37428
+ if (this.savedQueryParams)
37429
+ props.queryParams = { ...this.savedQueryParams };
37424
37430
  return props;
37425
37431
  }
37426
37432
  /** Create a copy of this MapLayerSettings, optionally modifying some of its properties.
@@ -37433,6 +37439,10 @@ class ImageMapLayerSettings extends MapLayerSettings {
37433
37439
  clone.userName = this.userName;
37434
37440
  clone.password = this.password;
37435
37441
  clone.accessKey = this.accessKey;
37442
+ if (this.unsavedQueryParams)
37443
+ clone.unsavedQueryParams = { ...this.unsavedQueryParams };
37444
+ if (this.savedQueryParams)
37445
+ clone.savedQueryParams = { ...this.savedQueryParams };
37436
37446
  return clone;
37437
37447
  }
37438
37448
  /** @internal */
@@ -37442,6 +37452,12 @@ class ImageMapLayerSettings extends MapLayerSettings {
37442
37452
  props.url = changedProps.url ?? this.url;
37443
37453
  props.accessKey = changedProps.accessKey ?? this.accessKey;
37444
37454
  props.subLayers = changedProps.subLayers ?? this.subLayers;
37455
+ if (changedProps.queryParams) {
37456
+ props.queryParams = { ...changedProps.queryParams };
37457
+ }
37458
+ else if (this.savedQueryParams) {
37459
+ props.queryParams = { ...this.savedQueryParams };
37460
+ }
37445
37461
  return props;
37446
37462
  }
37447
37463
  /** @internal */
@@ -37510,6 +37526,17 @@ class ImageMapLayerSettings extends MapLayerSettings {
37510
37526
  this.userName = userName;
37511
37527
  this.password = password;
37512
37528
  }
37529
+ /** Collect all query parameters
37530
+ * @beta
37531
+ */
37532
+ collectQueryParams() {
37533
+ let queryParams = {};
37534
+ if (this.savedQueryParams)
37535
+ queryParams = { ...this.savedQueryParams };
37536
+ if (this.unsavedQueryParams)
37537
+ queryParams = { ...queryParams, ...this.unsavedQueryParams };
37538
+ return queryParams;
37539
+ }
37513
37540
  }
37514
37541
  /** Normalized representation of a [[ModelMapLayerProps]] for which values have been validated and default values have been applied where explicit values not defined.
37515
37542
  * Model map layers are produced from models, typically from two dimensional geometry that may originate in a GIS system.
@@ -42579,12 +42606,14 @@ __webpack_require__.r(__webpack_exports__);
42579
42606
  /* harmony export */ ThematicDisplaySensorSettings: () => (/* binding */ ThematicDisplaySensorSettings),
42580
42607
  /* harmony export */ ThematicGradientColorScheme: () => (/* binding */ ThematicGradientColorScheme),
42581
42608
  /* harmony export */ ThematicGradientMode: () => (/* binding */ ThematicGradientMode),
42582
- /* harmony export */ ThematicGradientSettings: () => (/* binding */ ThematicGradientSettings)
42609
+ /* harmony export */ ThematicGradientSettings: () => (/* binding */ ThematicGradientSettings),
42610
+ /* harmony export */ ThematicGradientTransparencyMode: () => (/* binding */ ThematicGradientTransparencyMode)
42583
42611
  /* harmony export */ });
42584
42612
  /* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
42585
42613
  /* harmony import */ var _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @itwin/core-geometry */ "../../core/geometry/lib/esm/core-geometry.js");
42586
42614
  /* harmony import */ var _ColorDef__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ColorDef */ "../../core/common/lib/esm/ColorDef.js");
42587
42615
  /* harmony import */ var _Gradient__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Gradient */ "../../core/common/lib/esm/Gradient.js");
42616
+ /* harmony import */ var _TextureProps__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./TextureProps */ "../../core/common/lib/esm/TextureProps.js");
42588
42617
  /*---------------------------------------------------------------------------------------------
42589
42618
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
42590
42619
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -42596,6 +42625,7 @@ __webpack_require__.r(__webpack_exports__);
42596
42625
 
42597
42626
 
42598
42627
 
42628
+
42599
42629
  /** A thematic gradient mode used to generate and apply a thematic effect to a scene.
42600
42630
  * @see [[ThematicGradientSettings.mode]]
42601
42631
  * @public
@@ -42612,6 +42642,24 @@ var ThematicGradientMode;
42612
42642
  /** Apply isolines to the scene to achieve an effect similar to a contour map. Can only be used with [[ThematicDisplayMode.Height]]. */
42613
42643
  ThematicGradientMode[ThematicGradientMode["IsoLines"] = 3] = "IsoLines";
42614
42644
  })(ThematicGradientMode || (ThematicGradientMode = {}));
42645
+ /** Describes how transparency is computed when applying a thematic gradient to a surface.
42646
+ * Each [[Gradient.KeyColor]] in [[ThematicGradientSettings.customKeys]] has a transparency value.
42647
+ * Each surface to which the gradient is applied has its own transparency.
42648
+ * The transparency mode determines how these two values are combined to compute the final transparency.
42649
+ * @see [[ThematicGradientSettings.transparencyMode]].
42650
+ * @public
42651
+ * @extensions
42652
+ */
42653
+ var ThematicGradientTransparencyMode;
42654
+ (function (ThematicGradientTransparencyMode) {
42655
+ /** Ignore the gradient's transparency, applying only the surface's own transparency. */
42656
+ ThematicGradientTransparencyMode[ThematicGradientTransparencyMode["SurfaceOnly"] = 0] = "SurfaceOnly";
42657
+ /** The final transparency is computed from the product of the surface and gradient alpha channels.
42658
+ * (Alpha is the inverse of transparency, where `alpha = (255 - transparency) / 255`).
42659
+ * If the gradient color is opaque, this produces the same result as [[SurfaceOnly]].
42660
+ */
42661
+ ThematicGradientTransparencyMode[ThematicGradientTransparencyMode["MultiplySurfaceAndGradient"] = 1] = "MultiplySurfaceAndGradient";
42662
+ })(ThematicGradientTransparencyMode || (ThematicGradientTransparencyMode = {}));
42615
42663
  /** A color scheme used to generate the colors of a thematic gradient within an applied range.
42616
42664
  * @see [[ThematicGradientSettings.colorScheme]]
42617
42665
  * @see [[ThematicDisplay.range]]
@@ -42642,24 +42690,32 @@ class ThematicGradientSettings {
42642
42690
  static get margin() { return .001; } // A fixed portion of the gradient for out of range values.
42643
42691
  static get contentRange() { return 1.0 - 2.0 * ThematicGradientSettings.margin; }
42644
42692
  static get contentMax() { return 1.0 - ThematicGradientSettings.margin; }
42693
+ /** @alpha */
42694
+ get textureTransparency() {
42695
+ let transp = _TextureProps__WEBPACK_IMPORTED_MODULE_4__.TextureTransparency.Opaque;
42696
+ if (ThematicGradientColorScheme.Custom === this.colorScheme) {
42697
+ let haveOpaque = false;
42698
+ let haveTransparent = false;
42699
+ for (const key of this.customKeys) {
42700
+ const isOpaque = key.color.isOpaque;
42701
+ haveOpaque = haveOpaque || isOpaque;
42702
+ haveTransparent = haveTransparent || !isOpaque;
42703
+ }
42704
+ if (haveTransparent)
42705
+ transp = haveOpaque ? _TextureProps__WEBPACK_IMPORTED_MODULE_4__.TextureTransparency.Mixed : _TextureProps__WEBPACK_IMPORTED_MODULE_4__.TextureTransparency.Translucent;
42706
+ }
42707
+ if (transp !== _TextureProps__WEBPACK_IMPORTED_MODULE_4__.TextureTransparency.Mixed)
42708
+ if (this.marginColor.isOpaque !== (transp === _TextureProps__WEBPACK_IMPORTED_MODULE_4__.TextureTransparency.Opaque))
42709
+ transp = _TextureProps__WEBPACK_IMPORTED_MODULE_4__.TextureTransparency.Mixed;
42710
+ return transp;
42711
+ }
42645
42712
  equals(other) {
42646
- if (this.mode !== other.mode)
42647
- return false;
42648
- if (this.stepCount !== other.stepCount)
42649
- return false;
42650
- if (!this.marginColor.equals(other.marginColor))
42651
- return false;
42652
- if (this.colorScheme !== other.colorScheme)
42653
- return false;
42654
- if (this.customKeys.length !== other.customKeys.length)
42655
- return false;
42656
- if (this.colorMix !== other.colorMix)
42713
+ if (this.mode !== other.mode || this.stepCount !== other.stepCount || !this.marginColor.equals(other.marginColor)
42714
+ || this.colorScheme !== other.colorScheme || this.customKeys.length !== other.customKeys.length
42715
+ || this.colorMix !== other.colorMix || this.transparencyMode !== other.transparencyMode) {
42657
42716
  return false;
42658
- for (let i = 0; i < this.customKeys.length; i++) {
42659
- if (!_Gradient__WEBPACK_IMPORTED_MODULE_3__.Gradient.keyColorEquals(this.customKeys[i], other.customKeys[i]))
42660
- return false;
42661
42717
  }
42662
- return true;
42718
+ return this.customKeys.every((key, index) => _Gradient__WEBPACK_IMPORTED_MODULE_3__.Gradient.keyColorEquals(key, other.customKeys[index]));
42663
42719
  }
42664
42720
  /** Compares two sets of thematic gradient settings.
42665
42721
  * @param lhs First set of thematic gradient settings to compare
@@ -42680,10 +42736,11 @@ class ThematicGradientSettings {
42680
42736
  return diff;
42681
42737
  if ((diff = (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.compareNumbers)(lhs.customKeys.length, rhs.customKeys.length)) !== 0)
42682
42738
  return diff;
42683
- for (let i = 0; i < lhs.customKeys.length; i++) {
42739
+ if ((diff = (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.compareNumbers)(lhs.transparencyMode, rhs.transparencyMode)) !== 0)
42740
+ return diff;
42741
+ for (let i = 0; i < lhs.customKeys.length; i++)
42684
42742
  if ((diff = (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.compareNumbers)(lhs.customKeys[i].color.tbgr, rhs.customKeys[i].color.tbgr)) !== 0)
42685
42743
  return diff;
42686
- }
42687
42744
  return diff;
42688
42745
  }
42689
42746
  constructor(json) {
@@ -42694,6 +42751,7 @@ class ThematicGradientSettings {
42694
42751
  this.marginColor = _ColorDef__WEBPACK_IMPORTED_MODULE_2__.ColorDef.fromJSON();
42695
42752
  this.colorScheme = ThematicGradientColorScheme.BlueRed;
42696
42753
  this.colorMix = 0.0;
42754
+ this.transparencyMode = ThematicGradientTransparencyMode.SurfaceOnly;
42697
42755
  }
42698
42756
  else {
42699
42757
  this.mode = (json.mode !== undefined && json.mode !== null) ? json.mode : ThematicGradientMode.Smooth;
@@ -42715,6 +42773,7 @@ class ThematicGradientSettings {
42715
42773
  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]) }));
42716
42774
  }
42717
42775
  this.colorMix = json.colorMix ?? 0.0;
42776
+ this.transparencyMode = json.transparencyMode ?? ThematicGradientTransparencyMode.SurfaceOnly;
42718
42777
  }
42719
42778
  }
42720
42779
  static fromJSON(json) {
@@ -42733,6 +42792,8 @@ class ThematicGradientSettings {
42733
42792
  props.colorScheme = this.colorScheme;
42734
42793
  if (0 !== this.colorMix)
42735
42794
  props.colorMix = this.colorMix;
42795
+ if (ThematicGradientTransparencyMode.SurfaceOnly !== this.transparencyMode)
42796
+ props.transparencyMode = this.transparencyMode;
42736
42797
  if (this.customKeys.length > 0)
42737
42798
  props.customKeys = this.customKeys.map((key) => { return { value: key.value, color: key.color.toJSON() }; });
42738
42799
  return props;
@@ -42751,6 +42812,7 @@ class ThematicGradientSettings {
42751
42812
  colorScheme: undefined !== changedProps.colorScheme ? changedProps.colorScheme : this.colorScheme,
42752
42813
  customKeys: undefined !== changedProps.customKeys ? changedProps.customKeys : this.customKeys.map((key) => ({ value: key.value, color: key.color.tbgr })),
42753
42814
  colorMix: undefined !== changedProps.colorMix ? changedProps.colorMix : this.colorMix,
42815
+ transparencyMode: changedProps.transparencyMode ?? this.transparencyMode,
42754
42816
  };
42755
42817
  return ThematicGradientSettings.fromJSON(props);
42756
42818
  }
@@ -44580,6 +44642,7 @@ __webpack_require__.r(__webpack_exports__);
44580
44642
  /* harmony export */ ThematicGradientColorScheme: () => (/* reexport safe */ _ThematicDisplay__WEBPACK_IMPORTED_MODULE_106__.ThematicGradientColorScheme),
44581
44643
  /* harmony export */ ThematicGradientMode: () => (/* reexport safe */ _ThematicDisplay__WEBPACK_IMPORTED_MODULE_106__.ThematicGradientMode),
44582
44644
  /* harmony export */ ThematicGradientSettings: () => (/* reexport safe */ _ThematicDisplay__WEBPACK_IMPORTED_MODULE_106__.ThematicGradientSettings),
44645
+ /* harmony export */ ThematicGradientTransparencyMode: () => (/* reexport safe */ _ThematicDisplay__WEBPACK_IMPORTED_MODULE_106__.ThematicGradientTransparencyMode),
44583
44646
  /* harmony export */ TileContentSource: () => (/* reexport safe */ _TileProps__WEBPACK_IMPORTED_MODULE_108__.TileContentSource),
44584
44647
  /* harmony export */ TileFormat: () => (/* reexport safe */ _tile_TileIO__WEBPACK_IMPORTED_MODULE_149__.TileFormat),
44585
44648
  /* harmony export */ TileHeader: () => (/* reexport safe */ _tile_TileIO__WEBPACK_IMPORTED_MODULE_149__.TileHeader),
@@ -100105,6 +100168,7 @@ const extensionExports = {
100105
100168
  ThematicDisplayMode: _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.ThematicDisplayMode,
100106
100169
  ThematicGradientColorScheme: _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.ThematicGradientColorScheme,
100107
100170
  ThematicGradientMode: _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.ThematicGradientMode,
100171
+ ThematicGradientTransparencyMode: _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.ThematicGradientTransparencyMode,
100108
100172
  Tile: _core_frontend__WEBPACK_IMPORTED_MODULE_1__.Tile,
100109
100173
  TileAdmin: _core_frontend__WEBPACK_IMPORTED_MODULE_1__.TileAdmin,
100110
100174
  TileBoundingBoxes: _core_frontend__WEBPACK_IMPORTED_MODULE_1__.TileBoundingBoxes,
@@ -109408,8 +109472,16 @@ class BranchState {
109408
109472
  return overrides.getAppearance(elemLo, elemHi, subcatLo, subcatHi, geomClass, modelLo, modelHi, type, animationNodeId);
109409
109473
  }
109410
109474
  static createForDecorations() {
109411
- 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 });
109412
- 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 });
109475
+ 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 });
109476
+ const symbologyOverrides = new _FeatureSymbology__WEBPACK_IMPORTED_MODULE_2__.FeatureSymbology.Overrides();
109477
+ symbologyOverrides.ignoreSubCategory = true;
109478
+ return new BranchState({
109479
+ viewFlags,
109480
+ transform: _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Transform.createIdentity(),
109481
+ symbologyOverrides,
109482
+ edgeSettings: _EdgeSettings__WEBPACK_IMPORTED_MODULE_3__.EdgeSettings.create(undefined),
109483
+ is3d: true,
109484
+ });
109413
109485
  }
109414
109486
  withViewCoords() {
109415
109487
  return new BranchState({ ...this._opts, forceViewCoords: true });
@@ -113861,6 +113933,8 @@ class WorldDecorations extends Branch {
113861
113933
  super(new _GraphicBranch__WEBPACK_IMPORTED_MODULE_4__.GraphicBranch(), _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Transform.identity, viewFlags);
113862
113934
  // World decorations ignore all the symbology overrides for the "scene" geometry...
113863
113935
  this.branch.symbologyOverrides = new _FeatureSymbology__WEBPACK_IMPORTED_MODULE_3__.FeatureSymbology.Overrides();
113936
+ // Make all subcategories visible.
113937
+ this.branch.symbologyOverrides.ignoreSubCategory = true;
113864
113938
  }
113865
113939
  init(decs) {
113866
113940
  this.branch.clear();
@@ -123338,7 +123412,8 @@ class SurfaceGeometry extends _MeshGeometry__WEBPACK_IMPORTED_MODULE_7__.MeshGeo
123338
123412
  return target.isReadPixelsInProgress ? opaquePass : "translucent";
123339
123413
  const vf = target.currentViewFlags;
123340
123414
  // When rendering thematic isolines, we need translucency because they have anti-aliasing.
123341
- if (target.wantThematicDisplay && this.supportsThematicDisplay && target.uniforms.thematic.wantIsoLines)
123415
+ const thematic = target.wantThematicDisplay && this.supportsThematicDisplay ? target.uniforms.thematic.thematicDisplay : undefined;
123416
+ if (thematic && target.uniforms.thematic.wantIsoLines)
123342
123417
  return "translucent";
123343
123418
  // In wireframe, unless fill is explicitly enabled for planar region, surface does not draw
123344
123419
  if (_itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.RenderMode.Wireframe === vf.renderMode && !this.mesh.isTextureAlwaysDisplayed) {
@@ -123350,6 +123425,18 @@ class SurfaceGeometry extends _MeshGeometry__WEBPACK_IMPORTED_MODULE_7__.MeshGeo
123350
123425
  // If transparency disabled by render mode or view flag, always draw opaque.
123351
123426
  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)
123352
123427
  return opaquePass;
123428
+ // A gradient texture applied by analysis style always fully determines the transparency of the surface.
123429
+ if (this.hasScalarAnimation && undefined !== target.analysisTexture) {
123430
+ (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(undefined !== target.analysisStyle?.thematic);
123431
+ switch (target.analysisStyle.thematic.thematicSettings.textureTransparency) {
123432
+ case _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.TextureTransparency.Translucent:
123433
+ return "translucent";
123434
+ case _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.TextureTransparency.Opaque:
123435
+ return opaquePass;
123436
+ case _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.TextureTransparency.Mixed:
123437
+ return `${opaquePass}-translucent`;
123438
+ }
123439
+ }
123353
123440
  // We have 3 sources of alpha: the material, the texture, and the color.
123354
123441
  // Base alpha comes from the material if it overrides it; otherwise from the color.
123355
123442
  // The texture's alpha is multiplied by the base alpha.
@@ -123360,8 +123447,21 @@ class SurfaceGeometry extends _MeshGeometry__WEBPACK_IMPORTED_MODULE_7__.MeshGeo
123360
123447
  hasAlpha = mat.hasTranslucency;
123361
123448
  else
123362
123449
  hasAlpha = this.getColor(target).hasTranslucency;
123450
+ // Thematic gradient can optionally multiply gradient alpha with surface alpha.
123451
+ if (thematic && thematic.gradientSettings.transparencyMode === _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.ThematicGradientTransparencyMode.MultiplySurfaceAndGradient) {
123452
+ switch (thematic.gradientSettings.textureTransparency) {
123453
+ case _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.TextureTransparency.Opaque:
123454
+ // This surface's alpha gets multiplied by 1 - gradient colors are all opaque.
123455
+ return hasAlpha ? "translucent" : opaquePass;
123456
+ case _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.TextureTransparency.Translucent:
123457
+ // This surface's alpha gets multiplied by < 1 - gradient colors are all translucent.
123458
+ return "translucent";
123459
+ case _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.TextureTransparency.Mixed:
123460
+ // The gradient contains a mix of translucent and opaque colors.
123461
+ return hasAlpha ? "translucent" : `${opaquePass}-translucent`;
123462
+ }
123463
+ }
123363
123464
  if (!hasAlpha) {
123364
- // ###TODO handle TextureTransparency.Mixed; remove Texture.hasTranslucency.
123365
123465
  const tex = this.wantTextures(target, true) ? this.texture : undefined;
123366
123466
  switch (tex?.transparency) {
123367
123467
  case _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.TextureTransparency.Translucent:
@@ -127844,9 +127944,9 @@ class ThematicUniforms {
127844
127944
  this._colorMix = 0.0;
127845
127945
  this._axis = new Float32Array(3);
127846
127946
  this._sunDirection = new Float32Array(3);
127847
- this._marginColor = new Float32Array(3);
127947
+ this._marginColor = new _FloatRGBA__WEBPACK_IMPORTED_MODULE_8__.FloatRgba();
127848
127948
  this._displayMode = new Float32Array(1);
127849
- this._fragSettings = new Float32Array(3); // gradientMode, distanceCutoff, stepCount
127949
+ this._fragSettings = new Float32Array(4); // gradientMode, distanceCutoff, stepCount, > 0.0 if multiply gradient alpha
127850
127950
  this._numSensors = 0;
127851
127951
  this._gradientDimension = _getGradientDimension();
127852
127952
  this.syncKey = 0;
@@ -127920,15 +128020,13 @@ class ThematicUniforms {
127920
128020
  this._updateAxis(this.thematicDisplay.axis, (_itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.ThematicDisplayMode.Slope === this.thematicDisplay.displayMode) ? target.uniforms.frustum.viewMatrix : undefined);
127921
128021
  if (_itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.ThematicDisplayMode.HillShade === this.thematicDisplay.displayMode)
127922
128022
  this._updateSunDirection(this.thematicDisplay.sunDirection, target.uniforms.frustum.viewMatrix);
127923
- const marginRgb = _FloatRGBA__WEBPACK_IMPORTED_MODULE_8__.FloatRgb.fromColorDef(this.thematicDisplay.gradientSettings.marginColor);
127924
- this._marginColor[0] = marginRgb.red;
127925
- this._marginColor[1] = marginRgb.green;
127926
- this._marginColor[2] = marginRgb.blue;
128023
+ this._marginColor.setColorDef(this.thematicDisplay.gradientSettings.marginColor);
127927
128024
  this._displayMode[0] = this.thematicDisplay.displayMode;
127928
128025
  this._fragSettings[0] = this.thematicDisplay.gradientSettings.mode;
127929
128026
  const sensorSettings = this.thematicDisplay.sensorSettings;
127930
128027
  this._fragSettings[1] = (undefined === sensorSettings) ? 0 : this.thematicDisplay.sensorSettings.distanceCutoff;
127931
128028
  this._fragSettings[2] = Math.min(this.thematicDisplay.gradientSettings.stepCount, this._gradientDimension);
128029
+ this._fragSettings[3] = this.thematicDisplay.gradientSettings.transparencyMode === _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.ThematicGradientTransparencyMode.SurfaceOnly ? 0.0 : 1.0;
127932
128030
  // If we want sensors and have no distance cutoff, then create a global shared sensor texture.
127933
128031
  if (target.wantThematicSensors && !(this._distanceCutoff > 0)) {
127934
128032
  this._numSensors = sensorSettings.sensors.length;
@@ -127953,7 +128051,7 @@ class ThematicUniforms {
127953
128051
  }
127954
128052
  bindMarginColor(uniform) {
127955
128053
  if (!(0,_Sync__WEBPACK_IMPORTED_MODULE_3__.sync)(this, uniform))
127956
- uniform.setUniform3fv(this._marginColor);
128054
+ this._marginColor.bind(uniform);
127957
128055
  }
127958
128056
  bindDisplayMode(uniform) {
127959
128057
  if (!(0,_Sync__WEBPACK_IMPORTED_MODULE_3__.sync)(this, uniform))
@@ -127961,7 +128059,7 @@ class ThematicUniforms {
127961
128059
  }
127962
128060
  bindFragSettings(uniform) {
127963
128061
  if (!(0,_Sync__WEBPACK_IMPORTED_MODULE_3__.sync)(this, uniform))
127964
- uniform.setUniform3fv(this._fragSettings);
128062
+ uniform.setUniform4fv(this._fragSettings);
127965
128063
  }
127966
128064
  bindTexture(uniform, unit) {
127967
128065
  (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(undefined !== this._texture);
@@ -135400,7 +135498,7 @@ const computeBaseColor = `
135400
135498
  // set to black if almost white and reverse white-on-white is on
135401
135499
  bvec3 isAlmostWhite = greaterThan(surfaceColor.rgb, almostWhite);
135402
135500
  surfaceColor.rgb = (u_reverseWhiteOnWhite && isAlmostWhite.r && isAlmostWhite.g && isAlmostWhite.b ? vec3(0.0, 0.0, 0.0) : surfaceColor.rgb);
135403
- return vec4(surfaceColor.rgb * g_surfaceTexel.rgb, g_surfaceTexel.a);
135501
+ return vec4(surfaceColor.rgb * g_surfaceTexel.rgb, g_surfaceTexel.a * surfaceColor.a);
135404
135502
  `;
135405
135503
  const surfaceFlagArray = new Int32Array(12 /* SurfaceBitIndex.Count */);
135406
135504
  /** @internal */
@@ -135521,16 +135619,12 @@ const discardClassifiedByAlpha = `
135521
135619
  bool isTranslucentPass = kRenderPass_Translucent == u_renderPass;
135522
135620
  return (isOpaquePass && hasAlpha) || (isTranslucentPass && !hasAlpha);
135523
135621
  `;
135524
- const discardByTextureAlpha = `
135525
- if (isSurfaceBitSet(kSurfaceBit_HasTexture)) {
135526
- float cutoff = abs(u_alphaCutoff);
135527
- if (kRenderPass_Translucent == u_renderPass)
135528
- return u_alphaCutoff > 0.0 && alpha >= cutoff;
135529
- else
135530
- return alpha < cutoff;
135531
- }
135532
-
135533
- return false;
135622
+ const discardByAlphaCutoff = `
135623
+ float cutoff = abs(u_alphaCutoff);
135624
+ if (kRenderPass_Translucent == u_renderPass)
135625
+ return u_alphaCutoff > 0.0 && alpha >= cutoff;
135626
+ else
135627
+ return alpha < cutoff;
135534
135628
  `;
135535
135629
  function addTransparencyDiscard(frag) {
135536
135630
  (0,_RenderPass__WEBPACK_IMPORTED_MODULE_16__.addRenderPass)(frag);
@@ -135545,7 +135639,7 @@ function addTransparencyDiscard(frag) {
135545
135639
  uniform.setUniform1f(cutoff);
135546
135640
  });
135547
135641
  });
135548
- frag.set(5 /* FragmentShaderComponent.DiscardByAlpha */, discardByTextureAlpha);
135642
+ frag.set(5 /* FragmentShaderComponent.DiscardByAlpha */, discardByAlphaCutoff);
135549
135643
  }
135550
135644
  /** @internal */
135551
135645
  function createSurfaceBuilder(flags) {
@@ -135703,11 +135797,11 @@ vec4 getSensor(int index) {
135703
135797
  // A stepped gradient texture is arranged with single unique color pixels for each step. The dimension of a stepped gradient texture is stepCount.
135704
135798
  // 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.
135705
135799
  const getColor = `
135706
- vec3 getColor(float ndx) {
135800
+ vec4 getColor(float ndx) {
135707
135801
  if (ndx < 0.0 || ndx > 1.0)
135708
135802
  return u_marginColor;
135709
135803
 
135710
- return TEXTURE(s_texture, vec2(0.0, ndx)).rgb;
135804
+ return TEXTURE(s_texture, vec2(0.0, ndx));
135711
135805
  }
135712
135806
  `;
135713
135807
  // Access a stepped gradient texture at the specified index taking into account isolines.
@@ -135715,12 +135809,12 @@ vec3 getColor(float ndx) {
135715
135809
  // specifically to ensure that the texels sampled result in lines of overall singular colors - no stepping into the
135716
135810
  // neighboring bands.
135717
135811
  const getIsoLineColor = `
135718
- vec3 getIsoLineColor(float ndx, float stepCount) {
135812
+ vec4 getIsoLineColor(float ndx, float stepCount) {
135719
135813
  if (ndx < 0.01 || ndx > 0.99)
135720
135814
  return u_marginColor;
135721
135815
 
135722
135816
  ndx += 0.5 / stepCount; // center on step pixels
135723
- return TEXTURE(s_texture, vec2(0.0, ndx)).rgb;
135817
+ return TEXTURE(s_texture, vec2(0.0, ndx));
135724
135818
  }
135725
135819
  `;
135726
135820
  const fwidth = `\nfloat _universal_fwidth(float coord) { return fwidth(coord); }\n`;
@@ -135786,7 +135880,8 @@ const applyThematicColorPostlude = `
135786
135880
  float gradientMode = u_thematicSettings.x;
135787
135881
  float stepCount = u_thematicSettings.z;
135788
135882
 
135789
- vec4 rgba = vec4((kThematicGradientMode_IsoLines == gradientMode) ? getIsoLineColor(ndx, stepCount) : getColor(ndx), baseColor.a);
135883
+ vec4 rgba = (kThematicGradientMode_IsoLines == gradientMode) ? getIsoLineColor(ndx, stepCount) : getColor(ndx);
135884
+ rgba.a = baseColor.a * (u_thematicSettings.w > 0.0 ? rgba.a : 1.0);
135790
135885
  rgba = mix(rgba, baseColor, u_thematicColorMix);
135791
135886
 
135792
135887
  if (kThematicGradientMode_IsoLines == gradientMode) {
@@ -135811,7 +135906,8 @@ const applyThematicColorPostludeForPointClouds = `
135811
135906
  float gradientMode = u_thematicSettings.x;
135812
135907
  float stepCount = u_thematicSettings.z;
135813
135908
 
135814
- vec4 rgba = vec4((kThematicGradientMode_IsoLines == gradientMode) ? getIsoLineColor(ndx, stepCount) : getColor(ndx), baseColor.a);
135909
+ vec4 rgba = (kThematicGradientMode_IsoLines == gradientMode) ? getIsoLineColor(ndx, stepCount) : getColor(ndx);
135910
+ rgba.a = baseColor.a * (u_thematicSettings.w > 0.0 ? rgba.a : 1.0);
135815
135911
  rgba = mix(rgba, baseColor, u_thematicColorMix);
135816
135912
 
135817
135913
  if (kThematicGradientMode_IsoLines == gradientMode) {
@@ -135914,13 +136010,13 @@ function addThematicDisplay(builder, isForPointClouds = false, isForTerrainMesh
135914
136010
  params.target.uniforms.thematic.bindDisplayMode(uniform);
135915
136011
  });
135916
136012
  });
135917
- frag.addUniform("u_marginColor", 4 /* VariableType.Vec3 */, (prog) => {
136013
+ frag.addUniform("u_marginColor", 5 /* VariableType.Vec4 */, (prog) => {
135918
136014
  prog.addGraphicUniform("u_marginColor", (uniform, params) => {
135919
136015
  params.target.uniforms.thematic.bindMarginColor(uniform);
135920
136016
  });
135921
136017
  });
135922
136018
  // gradientMode, distanceCutoff, stepCount
135923
- builder.addUniform("u_thematicSettings", 4 /* VariableType.Vec3 */, (prog) => {
136019
+ builder.addUniform("u_thematicSettings", 5 /* VariableType.Vec4 */, (prog) => {
135924
136020
  prog.addGraphicUniform("u_thematicSettings", (uniform, params) => {
135925
136021
  params.target.uniforms.thematic.bindFragSettings(uniform);
135926
136022
  });
@@ -148299,9 +148395,8 @@ __webpack_require__.r(__webpack_exports__);
148299
148395
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
148300
148396
  /* harmony export */ ArcGISTileMap: () => (/* binding */ ArcGISTileMap)
148301
148397
  /* harmony export */ });
148302
- /* harmony import */ var _request_Request__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../request/Request */ "../../core/frontend/lib/esm/request/Request.js");
148303
- /* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
148304
- /* harmony import */ var _internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../internal */ "../../core/frontend/lib/esm/tile/internal.js");
148398
+ /* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
148399
+ /* harmony import */ var _internal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../internal */ "../../core/frontend/lib/esm/tile/internal.js");
148305
148400
  /*---------------------------------------------------------------------------------------------
148306
148401
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
148307
148402
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -148311,16 +148406,15 @@ __webpack_require__.r(__webpack_exports__);
148311
148406
  */
148312
148407
 
148313
148408
 
148314
-
148315
148409
  const nonVisibleChildren = [false, false, false, false];
148316
148410
  /** @internal */
148317
148411
  class ArcGISTileMap {
148318
- constructor(restBaseUrl, settings, nbLods, accessClient) {
148412
+ constructor(restBaseUrl, settings, fetchFunc, nbLods) {
148319
148413
  this.tileMapRequestSize = 32;
148320
148414
  this.fallbackTileMapRequestSize = 2;
148321
- this._tilesCache = new _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_1__.Dictionary((lhs, rhs) => (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_1__.compareStrings)(lhs, rhs));
148415
+ this._tilesCache = new _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Dictionary((lhs, rhs) => (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.compareStrings)(lhs, rhs));
148322
148416
  this._restBaseUrl = restBaseUrl;
148323
- this._accessClient = accessClient;
148417
+ this._fetchFunc = fetchFunc;
148324
148418
  this._settings = settings;
148325
148419
  if (nbLods !== undefined && nbLods > 0) {
148326
148420
  this._callQueues = new Array(nbLods).fill(Promise.resolve(nonVisibleChildren));
@@ -148328,19 +148422,8 @@ class ArcGISTileMap {
148328
148422
  }
148329
148423
  async fetchTileMapFromServer(level, row, column, width, height) {
148330
148424
  const tmpUrl = `${this._restBaseUrl}/tilemap/${level}/${row}/${column}/${width}/${height}?f=json`;
148331
- const urlObj = new URL(tmpUrl);
148332
- try {
148333
- if (this._accessClient) {
148334
- await _internal__WEBPACK_IMPORTED_MODULE_2__.ArcGisUtilities.appendSecurityToken(urlObj, this._accessClient, {
148335
- mapLayerUrl: new URL(this._settings.url),
148336
- userName: this._settings.userName,
148337
- password: this._settings.password,
148338
- });
148339
- }
148340
- }
148341
- catch {
148342
- }
148343
- return (0,_request_Request__WEBPACK_IMPORTED_MODULE_0__.request)(urlObj.toString(), "json");
148425
+ const response = await this._fetchFunc(new URL(tmpUrl));
148426
+ return response.json();
148344
148427
  }
148345
148428
  getAvailableTilesFromCache(tiles) {
148346
148429
  let allTilesFound = true;
@@ -148413,7 +148496,7 @@ class ArcGISTileMap {
148413
148496
  if (json.adjusted) {
148414
148497
  // If tilemap size got adjusted, I'm expecting to get adjusted size...
148415
148498
  // otherwise there is something really odd with this server.
148416
- (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_1__.assert)(json.location?.width !== undefined && json.location?.height !== undefined);
148499
+ (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(json.location?.width !== undefined && json.location?.height !== undefined);
148417
148500
  if (json.location?.width !== undefined && json.location?.height !== undefined) {
148418
148501
  tileMapWidth = json.location?.width;
148419
148502
  tileMapHeight = json.location?.height;
@@ -148426,7 +148509,7 @@ class ArcGISTileMap {
148426
148509
  const curColumn = reqColumn + i;
148427
148510
  const curRow = reqRow + j;
148428
148511
  // console.log(`Tilemap tile:: ${level},${curRow},${curColumn} => ${avail}`);
148429
- this._tilesCache.set(_internal__WEBPACK_IMPORTED_MODULE_2__.QuadId.getTileContentId(level, curColumn, curRow), avail);
148512
+ this._tilesCache.set(_internal__WEBPACK_IMPORTED_MODULE_1__.QuadId.getTileContentId(level, curColumn, curRow), avail);
148430
148513
  // Check if actual tile is among the children we are looking for, if so update the availability array.
148431
148514
  if (curColumn >= queryTiles[0].column && curColumn <= queryTiles[queryTiles.length - 1].column
148432
148515
  && curRow >= queryTiles[0].row && curRow <= queryTiles[queryTiles.length - 1].row) {
@@ -148441,7 +148524,7 @@ class ArcGISTileMap {
148441
148524
  // Mark all tilemap tiles to non-available in the cache too
148442
148525
  for (let j = 0; j < tileMapWidth; j++) {
148443
148526
  for (let i = 0; i < tileMapHeight; i++) {
148444
- this._tilesCache.set(_internal__WEBPACK_IMPORTED_MODULE_2__.QuadId.getTileContentId(level, reqColumn + i, reqRow + j), false);
148527
+ this._tilesCache.set(_internal__WEBPACK_IMPORTED_MODULE_1__.QuadId.getTileContentId(level, reqColumn + i, reqRow + j), false);
148445
148528
  }
148446
148529
  }
148447
148530
  }
@@ -148633,17 +148716,12 @@ class ArcGisUtilities {
148633
148716
  }
148634
148717
  /**
148635
148718
  * Attempt to access an ArcGIS service, and validate its service metadata.
148636
- * @param url URL of the source to validate.
148637
- * @param formatId Format Id of the source.
148638
- * @param capabilitiesFilter List of capabilities 'keyword' that needs to be advertised in the service's metadata
148639
- * in order to be valid. For example: 'Map', 'Query', etc
148640
- * @param userName Username to use for legacy token based security.
148641
- * @param password Password to use for legacy token based security.
148642
- * @param ignoreCache Flag to skip cache lookup (i.e. force a new server request)
148643
- * @return Validation Status. If successful, a list of available sub-layers will also be returned.
148644
- */
148645
- static async validateSource(url, formatId, capabilitiesFilter, userName, password, ignoreCache) {
148646
- const metadata = await this.getServiceJson(url, formatId, userName, password, ignoreCache);
148719
+ * @param source Source to validate.
148720
+ * @param opts Validation options
148721
+ */
148722
+ static async validateSource(args) {
148723
+ const { source, ignoreCache, capabilitiesFilter } = args;
148724
+ const metadata = await this.getServiceJson({ url: source.url, formatId: source.formatId, userName: source.userName, password: source.password, queryParams: source.collectQueryParams(), ignoreCache });
148647
148725
  const json = metadata?.content;
148648
148726
  if (json === undefined) {
148649
148727
  return { status: _internal__WEBPACK_IMPORTED_MODULE_1__.MapLayerSourceStatus.InvalidUrl };
@@ -148653,7 +148731,7 @@ class ArcGisUtilities {
148653
148731
  // and return information needed to initiate the authentification process... the end-user
148654
148732
  // will have to provide his credentials before we can fully validate this source.
148655
148733
  if (json.error.code === ArcGisErrorCode.TokenRequired) {
148656
- return (userName || password) ? { status: _internal__WEBPACK_IMPORTED_MODULE_1__.MapLayerSourceStatus.InvalidCredentials } : { status: _internal__WEBPACK_IMPORTED_MODULE_1__.MapLayerSourceStatus.RequireAuth };
148734
+ return (source.userName || source.password) ? { status: _internal__WEBPACK_IMPORTED_MODULE_1__.MapLayerSourceStatus.InvalidCredentials } : { status: _internal__WEBPACK_IMPORTED_MODULE_1__.MapLayerSourceStatus.RequireAuth };
148657
148735
  }
148658
148736
  else if (json.error.code === ArcGisErrorCode.InvalidCredentials)
148659
148737
  return { status: _internal__WEBPACK_IMPORTED_MODULE_1__.MapLayerSourceStatus.InvalidCredentials };
@@ -148704,16 +148782,30 @@ class ArcGisUtilities {
148704
148782
  * @param ignoreCache Flag to skip cache lookup (i.e. force a new server request)
148705
148783
  * @param requireToken Flag to indicate if a token is required
148706
148784
  */
148707
- static async getServiceJson(url, formatId, userName, password, ignoreCache, requireToken) {
148785
+ static async getServiceJson(args) {
148786
+ const { url, formatId, userName, password, queryParams, ignoreCache, requireToken } = args;
148708
148787
  if (!ignoreCache) {
148709
148788
  const cached = ArcGisUtilities._serviceCache.get(url);
148710
148789
  if (cached !== undefined)
148711
148790
  return cached;
148712
148791
  }
148792
+ const appendParams = (urlObj, params) => {
148793
+ if (params) {
148794
+ Object.keys(params).forEach((paramKey) => {
148795
+ if (!urlObj.searchParams.has(paramKey))
148796
+ urlObj.searchParams.append(paramKey, params[paramKey]);
148797
+ });
148798
+ }
148799
+ };
148800
+ const createUrlObj = () => {
148801
+ const tmpUrl = new URL(url);
148802
+ tmpUrl.searchParams.append("f", "json");
148803
+ appendParams(tmpUrl, queryParams);
148804
+ return tmpUrl;
148805
+ };
148713
148806
  let accessTokenRequired = false;
148714
148807
  try {
148715
- let tmpUrl = new URL(url);
148716
- tmpUrl.searchParams.append("f", "json");
148808
+ let tmpUrl = createUrlObj();
148717
148809
  // In some cases, caller might already know token is required, so append it immediately
148718
148810
  if (requireToken) {
148719
148811
  const accessClient = _IModelApp__WEBPACK_IMPORTED_MODULE_2__.IModelApp.mapLayerFormatRegistry.getAccessClient(formatId);
@@ -148732,8 +148824,7 @@ class ArcGisUtilities {
148732
148824
  // If token required
148733
148825
  const accessClient = _IModelApp__WEBPACK_IMPORTED_MODULE_2__.IModelApp.mapLayerFormatRegistry.getAccessClient(formatId);
148734
148826
  if (accessClient) {
148735
- tmpUrl = new URL(url);
148736
- tmpUrl.searchParams.append("f", "json");
148827
+ tmpUrl = createUrlObj();
148737
148828
  await ArcGisUtilities.appendSecurityToken(tmpUrl, accessClient, { mapLayerUrl: new URL(url), userName, password });
148738
148829
  response = await fetch(tmpUrl.toString(), { method: "GET" });
148739
148830
  errorCode = await ArcGisUtilities.checkForResponseErrorCode(response);
@@ -149633,7 +149724,7 @@ class ArcGISImageryProvider extends _internal__WEBPACK_IMPORTED_MODULE_0__.MapLa
149633
149724
  async getServiceJson() {
149634
149725
  let metadata;
149635
149726
  try {
149636
- metadata = await _internal__WEBPACK_IMPORTED_MODULE_0__.ArcGisUtilities.getServiceJson(this._settings.url, this._settings.formatId, this._settings.userName, this._settings.password);
149727
+ 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() });
149637
149728
  }
149638
149729
  catch (_e) {
149639
149730
  }
@@ -149662,6 +149753,11 @@ class ArcGISImageryProvider extends _internal__WEBPACK_IMPORTED_MODULE_0__.MapLa
149662
149753
  async fetch(url, options) {
149663
149754
  let errorCode;
149664
149755
  const urlObj = new URL(url);
149756
+ const queryParams = this._settings.collectQueryParams();
149757
+ Object.keys(queryParams).forEach((paramKey) => {
149758
+ if (!urlObj.searchParams.has(paramKey))
149759
+ urlObj.searchParams.append(paramKey, queryParams[paramKey]);
149760
+ });
149665
149761
  if (this._accessTokenRequired && this._accessClient) {
149666
149762
  this._lastAccessToken = await _internal__WEBPACK_IMPORTED_MODULE_0__.ArcGisUtilities.appendSecurityToken(urlObj, this._accessClient, {
149667
149763
  mapLayerUrl: new URL(this._settings.url),
@@ -149907,7 +150003,10 @@ class ArcGISMapLayerImageryProvider extends _internal__WEBPACK_IMPORTED_MODULE_2
149907
150003
  }
149908
150004
  // Create tile map object only if we are going to request tiles from this server and it support tilemap requests.
149909
150005
  if (this._tileMapSupported) {
149910
- this._tileMap = new _internal__WEBPACK_IMPORTED_MODULE_2__.ArcGISTileMap(this._settings.url, this._settings, json.tileInfo?.lods?.length, this._accessClient);
150006
+ const fetch = async (url, options) => {
150007
+ return this.fetch(url, options);
150008
+ };
150009
+ this._tileMap = new _internal__WEBPACK_IMPORTED_MODULE_2__.ArcGISTileMap(this._settings.url, this._settings, fetch, json.tileInfo?.lods?.length);
149911
150010
  }
149912
150011
  }
149913
150012
  // Read range using fullextent from service metadata
@@ -150758,7 +150857,8 @@ class TileUrlImageryProvider extends _internal__WEBPACK_IMPORTED_MODULE_0__.MapL
150758
150857
  url = `${url}/`;
150759
150858
  url = `${url}{level}/{column}/{row}.png`;
150760
150859
  }
150761
- return url.replace(levelToken, level.toString()).replace(columnToken, column.toString()).replace(rowToken, row.toString());
150860
+ const tmpUrl = url.replace(levelToken, level.toString()).replace(columnToken, column.toString()).replace(rowToken, row.toString());
150861
+ return this.appendCustomParams(tmpUrl);
150762
150862
  }
150763
150863
  }
150764
150864
 
@@ -150956,7 +151056,8 @@ class WmsMapLayerImageryProvider extends _internal__WEBPACK_IMPORTED_MODULE_3__.
150956
151056
  if (bboxString.length === 0 || crsString.length === 0 || layerString.length === 0)
150957
151057
  return "";
150958
151058
  const crsParamName = this._capabilities?.isVersion13 ? "CRS" : "SRS";
150959
- 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}`;
151059
+ 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}`;
151060
+ return this.appendCustomParams(tmpUrl);
150960
151061
  }
150961
151062
  async getToolTip(strings, quadId, carto, tree) {
150962
151063
  await super.getToolTip(strings, quadId, carto, tree);
@@ -150976,7 +151077,8 @@ class WmsMapLayerImageryProvider extends _internal__WEBPACK_IMPORTED_MODULE_3__.
150976
151077
  const y = Math.floor(.5 + (1.0 - fraction.y) * this.tileSize);
150977
151078
  const coordinateString = this._capabilities?.isVersion13 ? `&i=${x}&j=${y}` : `&x=${x}&y=${y}`;
150978
151079
  const crsParamName = this._capabilities?.isVersion13 ? "CRS" : "SRS";
150979
- 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}`;
151080
+ 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}`;
151081
+ getFeatureUrl = this.appendCustomParams(getFeatureUrl);
150980
151082
  return this.toolTipFromUrl(strings, getFeatureUrl);
150981
151083
  }
150982
151084
  }
@@ -151144,10 +151246,11 @@ class WmtsMapLayerImageryProvider extends _internal__WEBPACK_IMPORTED_MODULE_2__
151144
151246
  if (matrixSetAndLimits && matrixSetAndLimits.tileMatrixSet.tileMatrix.length > zoomLevel)
151145
151247
  tileMatrix = matrixSetAndLimits.tileMatrixSet.tileMatrix[zoomLevel].identifier;
151146
151248
  const styleParam = (style?.identifier === undefined ? "" : `&style=${style.identifier}`);
151147
- if (tileMatrix !== undefined && matrixSetAndLimits !== undefined)
151148
- 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} `;
151149
- else
151150
- return "";
151249
+ if (tileMatrix !== undefined && matrixSetAndLimits !== undefined) {
151250
+ 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}`;
151251
+ return this.appendCustomParams(tmpUrl);
151252
+ }
151253
+ return "";
151151
151254
  }
151152
151255
  }
151153
151256
 
@@ -151804,17 +151907,20 @@ class MapLayerFormat {
151804
151907
  * @param _ignoreCache Flag to skip cache lookup (i.e. force a new server request).
151805
151908
  * @returns Validation Status. If successful, a list of available sub-layers may also be returned.
151806
151909
  */
151807
- static async validateSource(_url, _userName, _password, _ignoreCache) { return { status: _internal__WEBPACK_IMPORTED_MODULE_2__.MapLayerSourceStatus.Valid }; }
151910
+ static async validateSource(_url, _userName, _password, _ignoreCache, _accesKey) { return { status: _internal__WEBPACK_IMPORTED_MODULE_2__.MapLayerSourceStatus.Valid }; }
151911
+ /** Allow a source object to be validated before being attached as a map-layer.
151912
+ * @beta
151913
+ */
151914
+ static async validate(args) {
151915
+ return this.validateSource(args.source.url, args.source.userName, args.source.password, args.ignoreCache);
151916
+ }
151808
151917
  /**
151809
151918
  * Create a [[MapLayerImageryProvider]] that will be used to feed data in a map-layer tile tree.
151810
151919
  * @param _settings The map layer settings to be applied to the imagery provider.
151811
151920
  * @returns Returns the new imagery provider.
151812
151921
  * @beta
151813
151922
  */
151814
- static createImageryProvider(_settings) {
151815
- (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(false, "Subclasses must override this method.");
151816
- return undefined;
151817
- }
151923
+ static createImageryProvider(_settings) { (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(false); }
151818
151924
  /**
151819
151925
  * Creates a MapLayerTileTreeReference for this map layer format.
151820
151926
  * @param _layerSettings Map layer settings that are applied to the MapLayerTileTreeReference.
@@ -151824,7 +151930,7 @@ class MapLayerFormat {
151824
151930
  * @beta
151825
151931
  */
151826
151932
  static createMapLayerTree(_layerSettings, _layerIndex, _iModel) {
151827
- (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(false, "Subclasses must override this method.");
151933
+ (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(false);
151828
151934
  return undefined;
151829
151935
  }
151830
151936
  }
@@ -151886,10 +151992,30 @@ class MapLayerFormatRegistry {
151886
151992
  }
151887
151993
  return (format === undefined) ? undefined : format.createImageryProvider(layerSettings);
151888
151994
  }
151889
- async validateSource(formatId, url, userName, password, ignoreCache) {
151890
- const entry = this._formats.get(formatId);
151891
- const format = entry?.type;
151892
- return (format === undefined) ? { status: _internal__WEBPACK_IMPORTED_MODULE_2__.MapLayerSourceStatus.InvalidFormat } : format.validateSource(url, userName, password, ignoreCache);
151995
+ /** @internal*/
151996
+ async validateSource(formatIdOrArgs, url, userName, password, ignoreCache) {
151997
+ let format;
151998
+ let args;
151999
+ if (typeof formatIdOrArgs == "string" && url !== undefined) {
152000
+ const formatId = formatIdOrArgs;
152001
+ const entry = this._formats.get(formatId);
152002
+ format = entry?.type;
152003
+ if (format !== undefined) {
152004
+ const source = _internal__WEBPACK_IMPORTED_MODULE_2__.MapLayerSource.fromJSON({ name: "", formatId, url });
152005
+ if (source !== undefined) {
152006
+ args = { source, ignoreCache };
152007
+ source.userName = userName;
152008
+ source.password = password;
152009
+ }
152010
+ }
152011
+ }
152012
+ else if (typeof formatIdOrArgs !== "string") {
152013
+ const entry = this._formats.get(formatIdOrArgs.source.formatId);
152014
+ format = entry?.type;
152015
+ }
152016
+ if (!args || !format)
152017
+ return { status: _internal__WEBPACK_IMPORTED_MODULE_2__.MapLayerSourceStatus.InvalidFormat };
152018
+ return format.validate(args);
151893
152019
  }
151894
152020
  }
151895
152021
 
@@ -151926,10 +152052,20 @@ class WmsMapLayerFormat extends ImageryMapLayerFormat {
151926
152052
  return new _internal__WEBPACK_IMPORTED_MODULE_0__.WmsMapLayerImageryProvider(settings);
151927
152053
  }
151928
152054
  static async validateSource(url, userName, password, ignoreCache) {
152055
+ const source = _internal__WEBPACK_IMPORTED_MODULE_0__.MapLayerSource.fromJSON({ name: "", formatId: WmsMapLayerFormat.formatId, url });
152056
+ if (source === undefined)
152057
+ return { status: _internal__WEBPACK_IMPORTED_MODULE_0__.MapLayerSourceStatus.InvalidFormat };
152058
+ source.userName = userName;
152059
+ source.password = password;
152060
+ return WmsMapLayerFormat.validate({ source, ignoreCache });
152061
+ }
152062
+ static async validate(args) {
152063
+ const { source, ignoreCache } = args;
152064
+ const { url, userName, password } = source;
151929
152065
  try {
151930
152066
  let subLayers;
151931
152067
  const maxVisibleSubLayers = 50;
151932
- const capabilities = await _internal__WEBPACK_IMPORTED_MODULE_0__.WmsCapabilities.create(url, (userName && password ? { user: userName, password } : undefined), ignoreCache);
152068
+ const capabilities = await _internal__WEBPACK_IMPORTED_MODULE_0__.WmsCapabilities.create(url, (userName && password ? { user: userName, password } : undefined), ignoreCache, source.collectQueryParams());
151933
152069
  if (capabilities !== undefined) {
151934
152070
  subLayers = capabilities.getSubLayers(false);
151935
152071
  const rootsSubLayer = subLayers?.find((sublayer) => sublayer.parent === undefined);
@@ -151984,9 +152120,19 @@ class WmtsMapLayerFormat extends ImageryMapLayerFormat {
151984
152120
  return new _internal__WEBPACK_IMPORTED_MODULE_0__.WmtsMapLayerImageryProvider(settings);
151985
152121
  }
151986
152122
  static async validateSource(url, userName, password, ignoreCache) {
152123
+ const source = _internal__WEBPACK_IMPORTED_MODULE_0__.MapLayerSource.fromJSON({ name: "", formatId: WmtsMapLayerFormat.formatId, url });
152124
+ if (source === undefined)
152125
+ return { status: _internal__WEBPACK_IMPORTED_MODULE_0__.MapLayerSourceStatus.InvalidFormat };
152126
+ source.userName = userName;
152127
+ source.password = password;
152128
+ return WmtsMapLayerFormat.validate({ source, ignoreCache });
152129
+ }
152130
+ static async validate(args) {
152131
+ const { source, ignoreCache } = args;
152132
+ const { url, userName, password } = source;
151987
152133
  try {
151988
152134
  const subLayers = [];
151989
- const capabilities = await _internal__WEBPACK_IMPORTED_MODULE_0__.WmtsCapabilities.create(url, (userName && password ? { user: userName, password } : undefined), ignoreCache);
152135
+ const capabilities = await _internal__WEBPACK_IMPORTED_MODULE_0__.WmtsCapabilities.create(url, (userName && password ? { user: userName, password } : undefined), ignoreCache, source.collectQueryParams());
151990
152136
  if (!capabilities)
151991
152137
  return { status: _internal__WEBPACK_IMPORTED_MODULE_0__.MapLayerSourceStatus.InvalidUrl };
151992
152138
  // Only returns layer that can be published in the Google maps or WGS84 aligned tile trees.
@@ -152033,11 +152179,19 @@ class WmtsMapLayerFormat extends ImageryMapLayerFormat {
152033
152179
  WmtsMapLayerFormat.formatId = "WMTS";
152034
152180
  class ArcGISMapLayerFormat extends ImageryMapLayerFormat {
152035
152181
  static async validateSource(url, userName, password, ignoreCache) {
152036
- const urlValidation = _internal__WEBPACK_IMPORTED_MODULE_0__.ArcGisUtilities.validateUrl(url, "MapServer");
152182
+ const source = _internal__WEBPACK_IMPORTED_MODULE_0__.MapLayerSource.fromJSON({ name: "", formatId: WmtsMapLayerFormat.formatId, url });
152183
+ if (source === undefined)
152184
+ return { status: _internal__WEBPACK_IMPORTED_MODULE_0__.MapLayerSourceStatus.InvalidFormat };
152185
+ source.userName = userName;
152186
+ source.password = password;
152187
+ return WmtsMapLayerFormat.validate({ source, ignoreCache });
152188
+ }
152189
+ static async validate(args) {
152190
+ const urlValidation = _internal__WEBPACK_IMPORTED_MODULE_0__.ArcGisUtilities.validateUrl(args.source.url, "MapServer");
152037
152191
  if (urlValidation !== _internal__WEBPACK_IMPORTED_MODULE_0__.MapLayerSourceStatus.Valid)
152038
152192
  return { status: urlValidation };
152039
152193
  // Some Map service supporting only tiles don't include the 'Map' capabilities, thus we can't make it mandatory.
152040
- return _internal__WEBPACK_IMPORTED_MODULE_0__.ArcGisUtilities.validateSource(url, this.formatId, [], userName, password, ignoreCache);
152194
+ return _internal__WEBPACK_IMPORTED_MODULE_0__.ArcGisUtilities.validateSource({ ...args, capabilitiesFilter: [] });
152041
152195
  }
152042
152196
  static createImageryProvider(settings) {
152043
152197
  return new _internal__WEBPACK_IMPORTED_MODULE_0__.ArcGISMapLayerImageryProvider(settings);
@@ -152423,6 +152577,47 @@ class MapLayerImageryProvider {
152423
152577
  ${tileExtent.longitudeRight.toFixed(8)},${tileExtent.latitudeTop.toFixed(8)}`;
152424
152578
  }
152425
152579
  }
152580
+ /** Append custom parameters for settings to provided URL object.
152581
+ * Make sure custom parameters do no override query parameters already part of the URL (lower case comparison)
152582
+ * @internal
152583
+ */
152584
+ appendCustomParams(url) {
152585
+ if (!this._settings.savedQueryParams && !this._settings.unsavedQueryParams)
152586
+ return url;
152587
+ // create a lower-case array of keys
152588
+ const currentParams = [];
152589
+ const currentUrl = new URL(url);
152590
+ currentUrl.searchParams.forEach((_value, key, _parent) => {
152591
+ currentParams.push(key.toLowerCase());
152592
+ });
152593
+ const urlParamsFromIndexArray = (indexArray, result) => {
152594
+ const urlParams = (result ? result : new URLSearchParams());
152595
+ if (!indexArray)
152596
+ return urlParams;
152597
+ Object.keys(indexArray).forEach((key) => {
152598
+ if (!currentParams.includes(key.toLowerCase()))
152599
+ urlParams.append(key, indexArray[key]);
152600
+ });
152601
+ return urlParams;
152602
+ };
152603
+ const params = urlParamsFromIndexArray(this._settings.savedQueryParams);
152604
+ urlParamsFromIndexArray(this._settings.unsavedQueryParams, params);
152605
+ const getSeparator = (u) => {
152606
+ let separator = "&";
152607
+ if (u.includes("?")) {
152608
+ if (u.endsWith("?"))
152609
+ separator = "";
152610
+ }
152611
+ else {
152612
+ separator = "?";
152613
+ }
152614
+ return separator;
152615
+ };
152616
+ if (params.size > 0) {
152617
+ url = `${url}${getSeparator(url)}${params.toString()}`;
152618
+ }
152619
+ return url;
152620
+ }
152426
152621
  }
152427
152622
 
152428
152623
 
@@ -152487,21 +152682,22 @@ var MapLayerSourceStatus;
152487
152682
  * @public
152488
152683
  */
152489
152684
  class MapLayerSource {
152490
- constructor(formatId = "WMS", name, url, baseMap = false, transparentBackground = true) {
152685
+ constructor(formatId = "WMS", name, url, baseMap = false, transparentBackground = true, savedQueryParams) {
152491
152686
  this.baseMap = false;
152492
152687
  this.formatId = formatId;
152493
152688
  this.name = name;
152494
152689
  this.url = url;
152495
152690
  this.baseMap = baseMap;
152496
152691
  this.transparentBackground = transparentBackground;
152692
+ this.savedQueryParams = savedQueryParams;
152497
152693
  }
152498
152694
  static fromJSON(json) {
152499
152695
  if (json === undefined)
152500
152696
  return undefined;
152501
- return new MapLayerSource(json.formatId, json.name, json.url, json.baseMap, json.transparentBackground);
152697
+ return new MapLayerSource(json.formatId, json.name, json.url, json.baseMap, json.transparentBackground, json.queryParams);
152502
152698
  }
152503
152699
  async validateSource(ignoreCache) {
152504
- return _IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.mapLayerFormatRegistry.validateSource(this.formatId, this.url, this.userName, this.password, ignoreCache);
152700
+ return _IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.mapLayerFormatRegistry.validateSource({ source: this, ignoreCache });
152505
152701
  }
152506
152702
  /** @internal*/
152507
152703
  static fromBackgroundMapProps(props) {
@@ -152517,7 +152713,7 @@ class MapLayerSource {
152517
152713
  return undefined;
152518
152714
  }
152519
152715
  toJSON() {
152520
- return { url: this.url, name: this.name, formatId: this.formatId, transparentBackground: this.transparentBackground };
152716
+ return { url: this.url, name: this.name, formatId: this.formatId, transparentBackground: this.transparentBackground, queryParams: this.savedQueryParams };
152521
152717
  }
152522
152718
  toLayerSettings(subLayers) {
152523
152719
  // When MapLayerSetting is created from a MapLayerSource, sub-layers and credentials need to be set separately.
@@ -152525,11 +152721,28 @@ class MapLayerSource {
152525
152721
  if (this.userName !== undefined || this.password !== undefined) {
152526
152722
  layerSettings?.setCredentials(this.userName, this.password);
152527
152723
  }
152724
+ if (this.savedQueryParams) {
152725
+ layerSettings.savedQueryParams = { ...this.savedQueryParams };
152726
+ }
152727
+ if (this.unsavedQueryParams) {
152728
+ layerSettings.unsavedQueryParams = { ...this.unsavedQueryParams };
152729
+ }
152528
152730
  return layerSettings;
152529
152731
  }
152530
152732
  getCredentials() {
152531
152733
  return this.userName && this.password ? { user: this.userName, password: this.password } : undefined;
152532
152734
  }
152735
+ /** Collect all query parameters
152736
+ * @beta
152737
+ */
152738
+ collectQueryParams() {
152739
+ let queryParams = {};
152740
+ if (this.savedQueryParams)
152741
+ queryParams = { ...this.savedQueryParams };
152742
+ if (this.unsavedQueryParams)
152743
+ queryParams = { ...queryParams, ...this.unsavedQueryParams };
152744
+ return queryParams;
152745
+ }
152533
152746
  }
152534
152747
  /** A collection of [[MapLayerSource]] objects.
152535
152748
  * @beta
@@ -155606,13 +155819,22 @@ class WmsCapabilities {
155606
155819
  if (_json.Capability)
155607
155820
  this.layer = new WmsCapability.Layer(_json.Capability.Layer, this);
155608
155821
  }
155609
- static async create(url, credentials, ignoreCache) {
155822
+ static async create(url, credentials, ignoreCache, queryParams) {
155610
155823
  if (!ignoreCache) {
155611
155824
  const cached = WmsCapabilities._capabilitiesCache.get(url);
155612
155825
  if (cached !== undefined)
155613
155826
  return cached;
155614
155827
  }
155615
- const xmlCapabilities = await getXml(`${_internal__WEBPACK_IMPORTED_MODULE_2__.WmsUtilities.getBaseUrl(url)}?request=GetCapabilities&service=WMS`, credentials);
155828
+ const tmpUrl = new URL(_internal__WEBPACK_IMPORTED_MODULE_2__.WmsUtilities.getBaseUrl(url));
155829
+ tmpUrl.searchParams.append("request", "GetCapabilities");
155830
+ tmpUrl.searchParams.append("service", "WMS");
155831
+ if (queryParams) {
155832
+ Object.keys(queryParams).forEach((paramKey) => {
155833
+ if (!tmpUrl.searchParams.has(paramKey))
155834
+ tmpUrl.searchParams.append(paramKey, queryParams[paramKey]);
155835
+ });
155836
+ }
155837
+ const xmlCapabilities = await getXml(tmpUrl.toString(), credentials);
155616
155838
  if (!xmlCapabilities)
155617
155839
  return undefined;
155618
155840
  const capabilities = new WmsCapabilities(new (wms_capabilities__WEBPACK_IMPORTED_MODULE_1___default())().parse(xmlCapabilities));
@@ -156105,13 +156327,22 @@ class WmtsCapabilities {
156105
156327
  const xmlDoc = parser.parseFromString(xmlCapabilities, "text/xml");
156106
156328
  return new WmtsCapabilities(xmlDoc);
156107
156329
  }
156108
- static async create(url, credentials, ignoreCache) {
156330
+ static async create(url, credentials, ignoreCache, queryParams) {
156109
156331
  if (!ignoreCache) {
156110
156332
  const cached = WmtsCapabilities._capabilitiesCache.get(url);
156111
156333
  if (cached !== undefined)
156112
156334
  return cached;
156113
156335
  }
156114
- const xmlCapabilities = await getXml(`${_internal__WEBPACK_IMPORTED_MODULE_2__.WmsUtilities.getBaseUrl(url)}?request=GetCapabilities&service=WMTS`, credentials);
156336
+ const tmpUrl = new URL(_internal__WEBPACK_IMPORTED_MODULE_2__.WmsUtilities.getBaseUrl(url));
156337
+ tmpUrl.searchParams.append("request", "GetCapabilities");
156338
+ tmpUrl.searchParams.append("service", "WMTS");
156339
+ if (queryParams) {
156340
+ Object.keys(queryParams).forEach((paramKey) => {
156341
+ if (!tmpUrl.searchParams.has(paramKey))
156342
+ tmpUrl.searchParams.append(paramKey, queryParams[paramKey]);
156343
+ });
156344
+ }
156345
+ const xmlCapabilities = await getXml(tmpUrl.toString(), credentials);
156115
156346
  if (!xmlCapabilities)
156116
156347
  return undefined;
156117
156348
  const capabilities = WmtsCapabilities.createFromXml(xmlCapabilities);
@@ -279575,7 +279806,7 @@ exports.executeBackendCallback = executeBackendCallback;
279575
279806
  __webpack_require__.r(__webpack_exports__);
279576
279807
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
279577
279808
  /* harmony export */ AbstractStatusBarItemUtilities: () => (/* reexport safe */ _appui_abstract_statusbar_StatusBarItem__WEBPACK_IMPORTED_MODULE_31__.AbstractStatusBarItemUtilities),
279578
- /* harmony export */ AbstractZoneLocation: () => (/* reexport safe */ _appui_abstract_widget_StagePanel__WEBPACK_IMPORTED_MODULE_46__.AbstractZoneLocation),
279809
+ /* harmony export */ AbstractZoneLocation: () => (/* reexport safe */ _appui_abstract_widget_StagePanel__WEBPACK_IMPORTED_MODULE_44__.AbstractZoneLocation),
279579
279810
  /* harmony export */ AlternateDateFormats: () => (/* reexport safe */ _appui_abstract_properties_EditorParams__WEBPACK_IMPORTED_MODULE_24__.AlternateDateFormats),
279580
279811
  /* harmony export */ BackstageItemType: () => (/* reexport safe */ _appui_abstract_backstage_BackstageItem__WEBPACK_IMPORTED_MODULE_4__.BackstageItemType),
279581
279812
  /* harmony export */ BackstageItemUtilities: () => (/* reexport safe */ _appui_abstract_backstage_BackstageItem__WEBPACK_IMPORTED_MODULE_4__.BackstageItemUtilities),
@@ -279591,7 +279822,6 @@ __webpack_require__.r(__webpack_exports__);
279591
279822
  /* harmony export */ DialogProperty: () => (/* reexport safe */ _appui_abstract_dialogs_DialogItem__WEBPACK_IMPORTED_MODULE_9__.DialogProperty),
279592
279823
  /* harmony export */ DisplayMessageType: () => (/* reexport safe */ _appui_abstract_notification_MessagePresenter__WEBPACK_IMPORTED_MODULE_21__.DisplayMessageType),
279593
279824
  /* harmony export */ FunctionKey: () => (/* reexport safe */ _appui_abstract_common_KeyboardKey__WEBPACK_IMPORTED_MODULE_6__.FunctionKey),
279594
- /* harmony export */ FuzzyScore: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.FuzzyScore),
279595
279825
  /* harmony export */ GenericUiEvent: () => (/* reexport safe */ _appui_abstract_UiAdmin__WEBPACK_IMPORTED_MODULE_1__.GenericUiEvent),
279596
279826
  /* harmony export */ IconSpecUtilities: () => (/* reexport safe */ _appui_abstract_utils_IconSpecUtilities__WEBPACK_IMPORTED_MODULE_37__.IconSpecUtilities),
279597
279827
  /* harmony export */ MessageSeverity: () => (/* reexport safe */ _appui_abstract_notification_MessageSeverity__WEBPACK_IMPORTED_MODULE_22__.MessageSeverity),
@@ -279602,8 +279832,8 @@ __webpack_require__.r(__webpack_exports__);
279602
279832
  /* harmony export */ PropertyValueFormat: () => (/* reexport safe */ _appui_abstract_properties_Value__WEBPACK_IMPORTED_MODULE_29__.PropertyValueFormat),
279603
279833
  /* harmony export */ RelativePosition: () => (/* reexport safe */ _appui_abstract_items_RelativePosition__WEBPACK_IMPORTED_MODULE_19__.RelativePosition),
279604
279834
  /* harmony export */ SpecialKey: () => (/* reexport safe */ _appui_abstract_common_KeyboardKey__WEBPACK_IMPORTED_MODULE_6__.SpecialKey),
279605
- /* harmony export */ StagePanelLocation: () => (/* reexport safe */ _appui_abstract_widget_StagePanel__WEBPACK_IMPORTED_MODULE_46__.StagePanelLocation),
279606
- /* harmony export */ StagePanelSection: () => (/* reexport safe */ _appui_abstract_widget_StagePanel__WEBPACK_IMPORTED_MODULE_46__.StagePanelSection),
279835
+ /* harmony export */ StagePanelLocation: () => (/* reexport safe */ _appui_abstract_widget_StagePanel__WEBPACK_IMPORTED_MODULE_44__.StagePanelLocation),
279836
+ /* harmony export */ StagePanelSection: () => (/* reexport safe */ _appui_abstract_widget_StagePanel__WEBPACK_IMPORTED_MODULE_44__.StagePanelSection),
279607
279837
  /* harmony export */ StageUsage: () => (/* reexport safe */ _appui_abstract_items_StageUsage__WEBPACK_IMPORTED_MODULE_20__.StageUsage),
279608
279838
  /* harmony export */ StandardContentLayouts: () => (/* reexport safe */ _appui_abstract_content_StandardContentLayouts__WEBPACK_IMPORTED_MODULE_8__.StandardContentLayouts),
279609
279839
  /* harmony export */ StandardEditorNames: () => (/* reexport safe */ _appui_abstract_properties_StandardEditorNames__WEBPACK_IMPORTED_MODULE_27__.StandardEditorNames),
@@ -279626,13 +279856,7 @@ __webpack_require__.r(__webpack_exports__);
279626
279856
  /* harmony export */ UiItemsManager: () => (/* reexport safe */ _appui_abstract_UiItemsManager__WEBPACK_IMPORTED_MODULE_2__.UiItemsManager),
279627
279857
  /* harmony export */ UiLayoutDataProvider: () => (/* reexport safe */ _appui_abstract_dialogs_UiLayoutDataProvider__WEBPACK_IMPORTED_MODULE_10__.UiLayoutDataProvider),
279628
279858
  /* harmony export */ UiSyncEvent: () => (/* reexport safe */ _appui_abstract_utils_UiEventDispatcher__WEBPACK_IMPORTED_MODULE_40__.UiSyncEvent),
279629
- /* harmony export */ WidgetState: () => (/* reexport safe */ _appui_abstract_widget_WidgetState__WEBPACK_IMPORTED_MODULE_47__.WidgetState),
279630
- /* harmony export */ convertSimple2RegExpPattern: () => (/* reexport safe */ _appui_abstract_utils_filter_strings__WEBPACK_IMPORTED_MODULE_44__.convertSimple2RegExpPattern),
279631
- /* harmony export */ createMatches: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.createMatches),
279632
- /* harmony export */ equalsIgnoreCase: () => (/* reexport safe */ _appui_abstract_utils_filter_strings__WEBPACK_IMPORTED_MODULE_44__.equalsIgnoreCase),
279633
- /* harmony export */ fuzzyScore: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.fuzzyScore),
279634
- /* harmony export */ fuzzyScoreGraceful: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.fuzzyScoreGraceful),
279635
- /* harmony export */ fuzzyScoreGracefulAggressive: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.fuzzyScoreGracefulAggressive),
279859
+ /* harmony export */ WidgetState: () => (/* reexport safe */ _appui_abstract_widget_WidgetState__WEBPACK_IMPORTED_MODULE_45__.WidgetState),
279636
279860
  /* harmony export */ getClassName: () => (/* reexport safe */ _appui_abstract_utils_misc__WEBPACK_IMPORTED_MODULE_36__.getClassName),
279637
279861
  /* harmony export */ isAbstractStatusBarActionItem: () => (/* reexport safe */ _appui_abstract_statusbar_StatusBarItem__WEBPACK_IMPORTED_MODULE_31__.isAbstractStatusBarActionItem),
279638
279862
  /* harmony export */ isAbstractStatusBarCustomItem: () => (/* reexport safe */ _appui_abstract_statusbar_StatusBarItem__WEBPACK_IMPORTED_MODULE_31__.isAbstractStatusBarCustomItem),
@@ -279644,22 +279868,9 @@ __webpack_require__.r(__webpack_exports__);
279644
279868
  /* harmony export */ isCustomFormattedNumberParams: () => (/* reexport safe */ _appui_abstract_properties_EditorParams__WEBPACK_IMPORTED_MODULE_24__.isCustomFormattedNumberParams),
279645
279869
  /* harmony export */ isIconListEditorParams: () => (/* reexport safe */ _appui_abstract_properties_EditorParams__WEBPACK_IMPORTED_MODULE_24__.isIconListEditorParams),
279646
279870
  /* harmony export */ isInputEditorSizeParams: () => (/* reexport safe */ _appui_abstract_properties_EditorParams__WEBPACK_IMPORTED_MODULE_24__.isInputEditorSizeParams),
279647
- /* harmony export */ isLowerAsciiLetter: () => (/* reexport safe */ _appui_abstract_utils_filter_strings__WEBPACK_IMPORTED_MODULE_44__.isLowerAsciiLetter),
279648
- /* harmony export */ isPatternInWord: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.isPatternInWord),
279649
279871
  /* harmony export */ isStageLauncher: () => (/* reexport safe */ _appui_abstract_backstage_BackstageItem__WEBPACK_IMPORTED_MODULE_4__.isStageLauncher),
279650
279872
  /* harmony export */ isSuppressLabelEditorParams: () => (/* reexport safe */ _appui_abstract_properties_EditorParams__WEBPACK_IMPORTED_MODULE_24__.isSuppressLabelEditorParams),
279651
- /* harmony export */ isUpperAsciiLetter: () => (/* reexport safe */ _appui_abstract_utils_filter_strings__WEBPACK_IMPORTED_MODULE_44__.isUpperAsciiLetter),
279652
- /* harmony export */ loggerCategory: () => (/* reexport safe */ _appui_abstract_utils_misc__WEBPACK_IMPORTED_MODULE_36__.loggerCategory),
279653
- /* harmony export */ matchesCamelCase: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.matchesCamelCase),
279654
- /* harmony export */ matchesContiguousSubString: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.matchesContiguousSubString),
279655
- /* harmony export */ matchesFuzzy: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.matchesFuzzy),
279656
- /* harmony export */ matchesFuzzy2: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.matchesFuzzy2),
279657
- /* harmony export */ matchesPrefix: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.matchesPrefix),
279658
- /* harmony export */ matchesStrictPrefix: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.matchesStrictPrefix),
279659
- /* harmony export */ matchesSubString: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.matchesSubString),
279660
- /* harmony export */ matchesWords: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.matchesWords),
279661
- /* harmony export */ or: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_43__.or),
279662
- /* harmony export */ startsWithIgnoreCase: () => (/* reexport safe */ _appui_abstract_utils_filter_strings__WEBPACK_IMPORTED_MODULE_44__.startsWithIgnoreCase)
279873
+ /* harmony export */ matchesWords: () => (/* reexport safe */ _appui_abstract_utils_filter_filters__WEBPACK_IMPORTED_MODULE_42__.matchesWords)
279663
279874
  /* harmony export */ });
279664
279875
  /* harmony import */ var _appui_abstract_BaseUiItemsProvider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./appui-abstract/BaseUiItemsProvider */ "../../ui/appui-abstract/lib/esm/appui-abstract/BaseUiItemsProvider.js");
279665
279876
  /* harmony import */ var _appui_abstract_UiAdmin__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./appui-abstract/UiAdmin */ "../../ui/appui-abstract/lib/esm/appui-abstract/UiAdmin.js");
@@ -279703,12 +279914,10 @@ __webpack_require__.r(__webpack_exports__);
279703
279914
  /* 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");
279704
279915
  /* 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");
279705
279916
  /* 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");
279706
- /* 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");
279707
- /* 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");
279708
- /* 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");
279709
- /* 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");
279710
- /* 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");
279711
- /* 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");
279917
+ /* 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");
279918
+ /* 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");
279919
+ /* 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");
279920
+ /* 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");
279712
279921
  /*---------------------------------------------------------------------------------------------
279713
279922
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
279714
279923
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -279758,8 +279967,6 @@ __webpack_require__.r(__webpack_exports__);
279758
279967
 
279759
279968
 
279760
279969
 
279761
-
279762
-
279763
279970
 
279764
279971
 
279765
279972
 
@@ -279924,8 +280131,6 @@ __webpack_require__.r(__webpack_exports__);
279924
280131
  /* harmony export */ UiAdmin: () => (/* binding */ UiAdmin)
279925
280132
  /* harmony export */ });
279926
280133
  /* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
279927
- /* harmony import */ var _utils_misc__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/misc */ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/misc.js");
279928
- /* harmony import */ var _utils_UiError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/UiError */ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/UiError.js");
279929
280134
  /*---------------------------------------------------------------------------------------------
279930
280135
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
279931
280136
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -279934,8 +280139,6 @@ __webpack_require__.r(__webpack_exports__);
279934
280139
  * @module UiAdmin
279935
280140
  */
279936
280141
 
279937
-
279938
-
279939
280142
  /** The GenericUiEvent is the base event class for UI events that target a specific component, as identified in uiComponentId.
279940
280143
  * @public
279941
280144
  */
@@ -279950,8 +280153,11 @@ class UiAdmin {
279950
280153
  }
279951
280154
  /** The MessagePresenter used to display messages. */
279952
280155
  static get messagePresenter() {
279953
- if (!UiAdmin._messagePresenter)
279954
- throw new _utils_UiError__WEBPACK_IMPORTED_MODULE_2__.UiError((0,_utils_misc__WEBPACK_IMPORTED_MODULE_1__.loggerCategory)(this), "UiAdmin.messagePresenter not set");
280156
+ if (!UiAdmin._messagePresenter) {
280157
+ const error = new _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BentleyError(_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BentleyStatus.ERROR, "UiAdmin.messagePresenter not set");
280158
+ error.category = "messagePresenter";
280159
+ throw error;
280160
+ }
279955
280161
  return UiAdmin._messagePresenter;
279956
280162
  }
279957
280163
  static set messagePresenter(mp) {
@@ -280165,7 +280371,6 @@ __webpack_require__.r(__webpack_exports__);
280165
280371
  /* harmony export */ UiItemsManager: () => (/* binding */ UiItemsManager)
280166
280372
  /* harmony export */ });
280167
280373
  /* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
280168
- /* harmony import */ var _utils_misc__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/misc */ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/misc.js");
280169
280374
  /*---------------------------------------------------------------------------------------------
280170
280375
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
280171
280376
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -280175,7 +280380,7 @@ __webpack_require__.r(__webpack_exports__);
280175
280380
  * @module UiItemsProvider
280176
280381
  */
280177
280382
 
280178
-
280383
+ const loggerCategory = "appui-abstract.UiItemsManager";
280179
280384
  /** Action taken by the application on item provided by a UiItemsProvider
280180
280385
  * @public @deprecated in 3.2. This was only used by the previously removed UiItemsArbiter.
280181
280386
  */
@@ -280224,11 +280429,11 @@ class UiItemsManager {
280224
280429
  static register(uiProvider, overrides) {
280225
280430
  const providerId = overrides?.providerId ?? uiProvider.id;
280226
280431
  if (UiItemsManager.getUiItemsProvider(providerId)) {
280227
- _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logInfo((0,_utils_misc__WEBPACK_IMPORTED_MODULE_1__.loggerCategory)(this), `UiItemsProvider (${providerId}) is already loaded`);
280432
+ _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logInfo(loggerCategory, `UiItemsProvider (${providerId}) is already loaded`);
280228
280433
  }
280229
280434
  else {
280230
280435
  UiItemsManager._registeredUiItemsProviders.set(providerId, { provider: uiProvider, overrides });
280231
- _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logInfo((0,_utils_misc__WEBPACK_IMPORTED_MODULE_1__.loggerCategory)(this), `UiItemsProvider ${uiProvider.id} registered as ${providerId} `);
280436
+ _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logInfo(loggerCategory, `UiItemsProvider ${uiProvider.id} registered as ${providerId} `);
280232
280437
  UiItemsManager.sendRegisteredEvent({ providerId });
280233
280438
  }
280234
280439
  }
@@ -280239,7 +280444,7 @@ class UiItemsManager {
280239
280444
  return;
280240
280445
  provider.onUnregister && provider.onUnregister();
280241
280446
  UiItemsManager._registeredUiItemsProviders.delete(uiProviderId);
280242
- _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logInfo((0,_utils_misc__WEBPACK_IMPORTED_MODULE_1__.loggerCategory)(this), `UiItemsProvider (${uiProviderId}) unloaded`);
280447
+ _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logInfo(loggerCategory, `UiItemsProvider (${uiProviderId}) unloaded`);
280243
280448
  // trigger a refresh of the ui
280244
280449
  UiItemsManager.sendRegisteredEvent({ providerId: uiProviderId });
280245
280450
  }
@@ -280629,7 +280834,7 @@ __webpack_require__.r(__webpack_exports__);
280629
280834
  * @module Utilities
280630
280835
  */
280631
280836
  /** Enumeration for Function Keys
280632
- * @public
280837
+ * @public @deprecated in 4.3. Please use the `ts-key-enum` npm package or string literals.
280633
280838
  */
280634
280839
  var FunctionKey;
280635
280840
  (function (FunctionKey) {
@@ -280647,7 +280852,7 @@ var FunctionKey;
280647
280852
  FunctionKey["F12"] = "F12";
280648
280853
  })(FunctionKey || (FunctionKey = {}));
280649
280854
  /** Enumeration for Special Keys
280650
- * @public
280855
+ * @public @deprecated in 4.3. Please use the `ts-key-enum` npm package or string literals.
280651
280856
  */
280652
280857
  var SpecialKey;
280653
280858
  (function (SpecialKey) {
@@ -280675,9 +280880,10 @@ var SpecialKey;
280675
280880
  SpecialKey["Decimal"] = "Decimal";
280676
280881
  })(SpecialKey || (SpecialKey = {}));
280677
280882
  /** Determines if a KeyboardEvent.key is an Arrow key
280678
- * @public
280883
+ * @public @deprecated in 4.3. Please use a custom implementation moving forward.
280679
280884
  */
280680
280885
  function isArrowKey(key) {
280886
+ // eslint-disable-next-line deprecation/deprecation
280681
280887
  return (key === SpecialKey.ArrowLeft || key === SpecialKey.ArrowRight || key === SpecialKey.ArrowUp || key === SpecialKey.ArrowDown);
280682
280888
  }
280683
280889
 
@@ -282802,8 +283008,9 @@ __webpack_require__.r(__webpack_exports__);
282802
283008
  /** @packageDocumentation
282803
283009
  * @module Utilities
282804
283010
  */
283011
+ /* eslint-disable deprecation/deprecation */
282805
283012
  /** Creates an IconSpec with an SVG source and gets the SVG source from an IconSpec.
282806
- * @public
283013
+ * @public @deprecated in 4.3. AppUI libraries >= 4.7.x support loading SVGs sources without prefixes, eliminating the need for these utilities.
282807
283014
  */
282808
283015
  class IconSpecUtilities {
282809
283016
  /** Create an IconSpec for an SVG loaded into web component with sprite loader
@@ -282814,7 +283021,7 @@ class IconSpecUtilities {
282814
283021
  return `${IconSpecUtilities.SVG_PREFIX}${svgSrc}`;
282815
283022
  }
282816
283023
  /** Create an IconSpec for an SVG loaded into web component with svg-loader
282817
- * @public
283024
+ * @public @deprecated in 4.3. AppUI libraries > 4.7.x support loading SVGs sources without prefixes, eliminating the need for this utility.
282818
283025
  */
282819
283026
  static createWebComponentIconSpec(srcString) {
282820
283027
  return `${IconSpecUtilities.WEB_COMPONENT_PREFIX}${srcString}`;
@@ -282830,7 +283037,7 @@ class IconSpecUtilities {
282830
283037
  return undefined;
282831
283038
  }
282832
283039
  /** Get the SVG Source from an svg-loader IconSpec
282833
- * @public
283040
+ * @public @deprecated in 4.3. AppUI libraries > 4.7.x support loading SVGs sources without prefixes, eliminating the need for this utility.
282834
283041
  */
282835
283042
  static getWebComponentSource(iconSpec) {
282836
283043
  if (iconSpec.startsWith(IconSpecUtilities.WEB_COMPONENT_PREFIX) && iconSpec.length > 7) {
@@ -282888,7 +283095,7 @@ __webpack_require__.r(__webpack_exports__);
282888
283095
  */
282889
283096
 
282890
283097
  /** iTwin.js UI UiError class is a subclass of BentleyError. Errors are logged.
282891
- * @public
283098
+ * @public @deprecated in 4.3. Use [[Bentley.BentleyError]] instead.
282892
283099
  */
282893
283100
  class UiError extends _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BentleyError {
282894
283101
  /** Constructs UiError using BentleyError. */
@@ -283096,23 +283303,6 @@ __webpack_require__.r(__webpack_exports__);
283096
283303
 
283097
283304
 
283098
283305
 
283099
- /***/ }),
283100
-
283101
- /***/ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/filter/charCode.js":
283102
- /*!*******************************************************************************!*\
283103
- !*** ../../ui/appui-abstract/lib/esm/appui-abstract/utils/filter/charCode.js ***!
283104
- \*******************************************************************************/
283105
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
283106
-
283107
- "use strict";
283108
- __webpack_require__.r(__webpack_exports__);
283109
- /*---------------------------------------------------------------------------------------------
283110
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
283111
- * See LICENSE.md in the project root for license terms and full copyright notice.
283112
- *--------------------------------------------------------------------------------------------*/
283113
-
283114
-
283115
-
283116
283306
  /***/ }),
283117
283307
 
283118
283308
  /***/ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/filter/filters.js":
@@ -283124,24 +283314,8 @@ __webpack_require__.r(__webpack_exports__);
283124
283314
  "use strict";
283125
283315
  __webpack_require__.r(__webpack_exports__);
283126
283316
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
283127
- /* harmony export */ FuzzyScore: () => (/* binding */ FuzzyScore),
283128
- /* harmony export */ createMatches: () => (/* binding */ createMatches),
283129
- /* harmony export */ fuzzyScore: () => (/* binding */ fuzzyScore),
283130
- /* harmony export */ fuzzyScoreGraceful: () => (/* binding */ fuzzyScoreGraceful),
283131
- /* harmony export */ fuzzyScoreGracefulAggressive: () => (/* binding */ fuzzyScoreGracefulAggressive),
283132
- /* harmony export */ isPatternInWord: () => (/* binding */ isPatternInWord),
283133
- /* harmony export */ matchesCamelCase: () => (/* binding */ matchesCamelCase),
283134
- /* harmony export */ matchesContiguousSubString: () => (/* binding */ matchesContiguousSubString),
283135
- /* harmony export */ matchesFuzzy: () => (/* binding */ matchesFuzzy),
283136
- /* harmony export */ matchesFuzzy2: () => (/* binding */ matchesFuzzy2),
283137
- /* harmony export */ matchesPrefix: () => (/* binding */ matchesPrefix),
283138
- /* harmony export */ matchesStrictPrefix: () => (/* binding */ matchesStrictPrefix),
283139
- /* harmony export */ matchesSubString: () => (/* binding */ matchesSubString),
283140
- /* harmony export */ matchesWords: () => (/* binding */ matchesWords),
283141
- /* harmony export */ or: () => (/* binding */ or)
283317
+ /* harmony export */ matchesWords: () => (/* binding */ matchesWords)
283142
283318
  /* harmony export */ });
283143
- /* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./map */ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/filter/map.js");
283144
- /* harmony import */ var _strings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./strings */ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/filter/strings.js");
283145
283319
  /*---------------------------------------------------------------------------------------------
283146
283320
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
283147
283321
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -283149,100 +283323,18 @@ __webpack_require__.r(__webpack_exports__);
283149
283323
  /** @packageDocumentation
283150
283324
  * @module Utilities
283151
283325
  */
283152
-
283153
-
283154
- // Combined filters
283155
- /**
283156
- * @returns A filter which combines the provided set
283157
- * of filters with an or. The *first* filters that
283158
- * matches defined the return value of the returned
283159
- * filter.
283160
- * @internal
283161
- */
283162
- function or(...filter) {
283163
- return function (word, wordToMatchAgainst) {
283164
- for (let i = 0, len = filter.length; i < len; i++) {
283165
- const match = filter[i](word, wordToMatchAgainst);
283166
- if (match) {
283167
- return match;
283168
- }
283169
- }
283170
- return null;
283171
- };
283172
- }
283173
- // Prefix
283174
- /** @internal */
283175
- const matchesStrictPrefix = _matchesPrefix.bind(undefined, false);
283176
- /** @internal */
283177
- const matchesPrefix = _matchesPrefix.bind(undefined, true);
283178
- function _matchesPrefix(ignoreCase, word, wordToMatchAgainst) {
283179
- if (!wordToMatchAgainst || wordToMatchAgainst.length < word.length) {
283180
- return null;
283181
- }
283182
- let matches;
283183
- if (ignoreCase) {
283184
- matches = _strings__WEBPACK_IMPORTED_MODULE_1__.startsWithIgnoreCase(wordToMatchAgainst, word);
283185
- }
283186
- else {
283187
- matches = wordToMatchAgainst.indexOf(word) === 0;
283188
- }
283189
- if (!matches) {
283190
- return null;
283191
- }
283192
- return word.length > 0 ? [{ start: 0, end: word.length }] : [];
283193
- }
283194
- // Contiguous Substring
283195
- /** @internal */
283196
- function matchesContiguousSubString(word, wordToMatchAgainst) {
283197
- const index = wordToMatchAgainst.toLowerCase().indexOf(word.toLowerCase());
283198
- if (index === -1) {
283199
- return null;
283200
- }
283201
- return [{ start: index, end: index + word.length }];
283202
- }
283203
- // Substring
283204
- /**
283205
- * Return case insensitive substring matches
283206
- * @param word filter string
283207
- * @param wordToMatchAgainst string to test
283208
- * @internal
283209
- */
283210
- function matchesSubString(word, wordToMatchAgainst) {
283211
- return _matchesSubString(word.toLowerCase(), wordToMatchAgainst.toLowerCase(), 0, 0);
283212
- }
283213
- function _matchesSubString(word, wordToMatchAgainst, i, j) {
283214
- if (i === word.length) {
283215
- return [];
283216
- }
283217
- else if (j === wordToMatchAgainst.length) {
283218
- return null;
283219
- }
283220
- else {
283221
- if (word[i] === wordToMatchAgainst[j]) {
283222
- let result = null;
283223
- if (result = _matchesSubString(word, wordToMatchAgainst, i + 1, j + 1)) {
283224
- return join({ start: j, end: j + 1 }, result);
283225
- }
283226
- return null;
283227
- }
283228
- return _matchesSubString(word, wordToMatchAgainst, i, j + 1);
283229
- }
283230
- }
283231
- // CamelCase
283232
- function isLower(code) {
283233
- return 97 /* CharCode.a */ <= code && code <= 122 /* CharCode.z */;
283234
- }
283235
- function isUpper(code) {
283236
- return 65 /* CharCode.A */ <= code && code <= 90 /* CharCode.Z */;
283237
- }
283238
- function isNumber(code) {
283239
- return 48 /* CharCode.Digit0 */ <= code && code <= 57 /* CharCode.Digit9 */;
283240
- }
283326
+ var CharCode;
283327
+ (function (CharCode) {
283328
+ CharCode[CharCode["Space"] = 32] = "Space";
283329
+ CharCode[CharCode["Tab"] = 9] = "Tab";
283330
+ CharCode[CharCode["LineFeed"] = 10] = "LineFeed";
283331
+ CharCode[CharCode["CarriageReturn"] = 13] = "CarriageReturn";
283332
+ })(CharCode || (CharCode = {}));
283241
283333
  function isWhitespace(code) {
283242
- return (code === 32 /* CharCode.Space */
283243
- || code === 9 /* CharCode.Tab */
283244
- || code === 10 /* CharCode.LineFeed */
283245
- || code === 13 /* CharCode.CarriageReturn */);
283334
+ return (code === CharCode.Space
283335
+ || code === CharCode.Tab
283336
+ || code === CharCode.LineFeed
283337
+ || code === CharCode.CarriageReturn);
283246
283338
  }
283247
283339
  const wordSeparators = new Set();
283248
283340
  '`~!@#$%^&*()-=+[{]}\\|;:\'",.<>/?'
@@ -283254,9 +283346,6 @@ function isWordSeparator(code) {
283254
283346
  function charactersMatch(codeA, codeB) {
283255
283347
  return (codeA === codeB) || (isWordSeparator(codeA) && isWordSeparator(codeB));
283256
283348
  }
283257
- function isAlphanumeric(code) {
283258
- return isLower(code) || isUpper(code) || isNumber(code);
283259
- }
283260
283349
  function join(head, tail) {
283261
283350
  if (tail.length === 0) {
283262
283351
  tail = [head];
@@ -283269,128 +283358,6 @@ function join(head, tail) {
283269
283358
  }
283270
283359
  return tail;
283271
283360
  }
283272
- function nextAnchor(camelCaseWord, start) {
283273
- for (let i = start; i < camelCaseWord.length; i++) {
283274
- const c = camelCaseWord.charCodeAt(i);
283275
- if (isUpper(c) || isNumber(c) || (i > 0 && !isAlphanumeric(camelCaseWord.charCodeAt(i - 1)))) {
283276
- return i;
283277
- }
283278
- }
283279
- return camelCaseWord.length;
283280
- }
283281
- function _matchesCamelCase(word, camelCaseWord, i, j) {
283282
- if (i === word.length) {
283283
- return [];
283284
- }
283285
- else if (j === camelCaseWord.length) {
283286
- return null;
283287
- }
283288
- else if (word[i] !== camelCaseWord[j].toLowerCase()) {
283289
- return null;
283290
- }
283291
- else {
283292
- let result = null;
283293
- let nextUpperIndex = j + 1;
283294
- result = _matchesCamelCase(word, camelCaseWord, i + 1, j + 1);
283295
- while (!result && (nextUpperIndex = nextAnchor(camelCaseWord, nextUpperIndex)) < camelCaseWord.length) {
283296
- result = _matchesCamelCase(word, camelCaseWord, i + 1, nextUpperIndex);
283297
- nextUpperIndex++;
283298
- }
283299
- return result === null ? null : join({ start: j, end: j + 1 }, result);
283300
- }
283301
- }
283302
- // Heuristic to avoid computing camel case matcher for words that don't
283303
- // look like camelCaseWords.
283304
- function analyzeCamelCaseWord(word) {
283305
- let upper = 0, lower = 0, alpha = 0, numeric = 0, code = 0;
283306
- for (let i = 0; i < word.length; i++) {
283307
- code = word.charCodeAt(i);
283308
- if (isUpper(code)) {
283309
- upper++;
283310
- }
283311
- if (isLower(code)) {
283312
- lower++;
283313
- }
283314
- if (isAlphanumeric(code)) {
283315
- alpha++;
283316
- }
283317
- if (isNumber(code)) {
283318
- numeric++;
283319
- }
283320
- }
283321
- const upperPercent = upper / word.length;
283322
- const lowerPercent = lower / word.length;
283323
- const alphaPercent = alpha / word.length;
283324
- const numericPercent = numeric / word.length;
283325
- return { upperPercent, lowerPercent, alphaPercent, numericPercent };
283326
- }
283327
- function isUpperCaseWord(analysis) {
283328
- const { upperPercent, lowerPercent } = analysis;
283329
- return lowerPercent === 0 && upperPercent > 0.6;
283330
- }
283331
- function isCamelCaseWord(analysis) {
283332
- const { upperPercent, lowerPercent, alphaPercent, numericPercent } = analysis;
283333
- return lowerPercent > 0.2 && upperPercent < 0.8 && alphaPercent > 0.6 && numericPercent < 0.2;
283334
- }
283335
- // Heuristic to avoid computing camel case matcher for words that don't
283336
- // look like camel case patterns.
283337
- function isCamelCasePattern(word) {
283338
- let upper = 0, lower = 0, code = 0, whitespace = 0;
283339
- for (let i = 0; i < word.length; i++) {
283340
- code = word.charCodeAt(i);
283341
- if (isUpper(code)) {
283342
- upper++;
283343
- }
283344
- if (isLower(code)) {
283345
- lower++;
283346
- }
283347
- if (isWhitespace(code)) {
283348
- whitespace++;
283349
- }
283350
- }
283351
- if ((upper === 0 || lower === 0) && whitespace === 0) {
283352
- return word.length <= 30;
283353
- }
283354
- else {
283355
- return upper <= 5;
283356
- }
283357
- }
283358
- /**
283359
- * Return matches treating "camelCase" words separately. For example the filter string "gp" would return two matches in string "Git Pull".
283360
- * @param word filter string
283361
- * @param wordToMatchAgainst string to test
283362
- * @internal
283363
- */
283364
- function matchesCamelCase(word, camelCaseWord) {
283365
- if (!camelCaseWord) {
283366
- return null;
283367
- }
283368
- camelCaseWord = camelCaseWord.trim();
283369
- if (camelCaseWord.length === 0) {
283370
- return null;
283371
- }
283372
- if (!isCamelCasePattern(camelCaseWord)) {
283373
- return null;
283374
- }
283375
- if (camelCaseWord.length > 60) {
283376
- return null;
283377
- }
283378
- const analysis = analyzeCamelCaseWord(camelCaseWord);
283379
- if (!isCamelCaseWord(analysis)) {
283380
- // istanbul ignore next
283381
- if (!isUpperCaseWord(analysis)) {
283382
- return null;
283383
- }
283384
- camelCaseWord = camelCaseWord.toLowerCase();
283385
- }
283386
- let result = null;
283387
- let i = 0;
283388
- word = word.toLowerCase();
283389
- while (i < camelCaseWord.length && (result = _matchesCamelCase(word, camelCaseWord, 0, i)) === null) {
283390
- i = nextAnchor(camelCaseWord, i + 1);
283391
- }
283392
- return result;
283393
- }
283394
283361
  /**
283395
283362
  * Matches beginning of words supporting non-ASCII languages.
283396
283363
  * @param word Filter string
@@ -283398,7 +283365,7 @@ function matchesCamelCase(word, camelCaseWord) {
283398
283365
  * @param contiguous - If true the filter string must be found "contiguous" in the searched string (E.g. "pul" will match "Git: Pull").
283399
283366
  * 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").
283400
283367
  * Useful in cases where the target is words (e.g. command labels)
283401
- * @internal
283368
+ * @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.
283402
283369
  */
283403
283370
  function matchesWords(word, target, contiguous = false) {
283404
283371
  if (!target || target.length === 0) {
@@ -283446,898 +283413,6 @@ function nextWord(word, start) {
283446
283413
  }
283447
283414
  return word.length;
283448
283415
  }
283449
- // Fuzzy
283450
- const fuzzyContiguousFilter = or(matchesPrefix, matchesCamelCase, matchesContiguousSubString);
283451
- const fuzzySeparateFilter = or(matchesPrefix, matchesCamelCase, matchesSubString);
283452
- const fuzzyRegExpCache = new _map__WEBPACK_IMPORTED_MODULE_0__.LRUCache(10000); // bounded to 10000 elements
283453
- /**
283454
- * Match pattern against word in a fuzzy way. This will only return a single match.
283455
- * @internal
283456
- */
283457
- function matchesFuzzy(word, wordToMatchAgainst, enableSeparateSubstringMatching = false) {
283458
- // istanbul ignore next
283459
- if (typeof word !== "string" || typeof wordToMatchAgainst !== "string") {
283460
- return null; // return early for invalid input
283461
- }
283462
- // Form RegExp for wildcard matches
283463
- let regexp = fuzzyRegExpCache.get(word);
283464
- if (!regexp) {
283465
- regexp = new RegExp(_strings__WEBPACK_IMPORTED_MODULE_1__.convertSimple2RegExpPattern(word), "i");
283466
- fuzzyRegExpCache.set(word, regexp);
283467
- }
283468
- // RegExp Filter
283469
- const match = regexp.exec(wordToMatchAgainst);
283470
- if (match) {
283471
- return [{ start: match.index, end: match.index + match[0].length }];
283472
- }
283473
- // Default Filter
283474
- return enableSeparateSubstringMatching ? /* istanbul ignore next */ fuzzySeparateFilter(word, wordToMatchAgainst) : fuzzyContiguousFilter(word, wordToMatchAgainst);
283475
- }
283476
- /**
283477
- * Match pattern against word in a fuzzy way. As in IntelliSense and faster and more
283478
- * powerful than `matchesFuzzy`. This will only return a single match.
283479
- * @internal
283480
- */
283481
- function matchesFuzzy2(pattern, word) {
283482
- const score = fuzzyScore(pattern, pattern.toLowerCase(), 0, word, word.toLowerCase(), 0, true);
283483
- return score ? createMatches(score) : null;
283484
- }
283485
- // #region --- fuzzyScore ---
283486
- /**
283487
- * @internal
283488
- */
283489
- function createMatches(score) {
283490
- // istanbul ignore next
283491
- if (typeof score === "undefined") {
283492
- return [];
283493
- }
283494
- const matches = score[1].toString(2);
283495
- const wordStart = score[2];
283496
- const res = [];
283497
- for (let pos = wordStart; pos < _maxLen; pos++) {
283498
- if (matches[matches.length - (pos + 1)] === "1") {
283499
- const last = res[res.length - 1];
283500
- if (last && last.end === pos) {
283501
- last.end = pos + 1;
283502
- }
283503
- else {
283504
- res.push({ start: pos, end: pos + 1 });
283505
- }
283506
- }
283507
- }
283508
- return res;
283509
- }
283510
- const _maxLen = 128;
283511
- function initTable() {
283512
- const table = [];
283513
- const row = [0];
283514
- for (let i = 1; i <= _maxLen; i++) {
283515
- row.push(-i);
283516
- }
283517
- for (let i = 0; i <= _maxLen; i++) {
283518
- const thisRow = row.slice(0);
283519
- thisRow[0] = -i;
283520
- table.push(thisRow);
283521
- }
283522
- return table;
283523
- }
283524
- const _table = initTable();
283525
- const _scores = initTable();
283526
- // eslint-disable-next-line @typescript-eslint/consistent-type-assertions
283527
- const _arrows = initTable();
283528
- const _debug = false;
283529
- function isSeparatorAtPos(value, index) {
283530
- if (index < 0 || index >= value.length) {
283531
- return false;
283532
- }
283533
- const code = value.charCodeAt(index);
283534
- switch (code) {
283535
- case 95 /* CharCode.Underline */:
283536
- case 45 /* CharCode.Dash */:
283537
- case 46 /* CharCode.Period */:
283538
- case 32 /* CharCode.Space */:
283539
- case 47 /* CharCode.Slash */:
283540
- case 92 /* CharCode.Backslash */:
283541
- case 39 /* CharCode.SingleQuote */:
283542
- case 34 /* CharCode.DoubleQuote */:
283543
- case 58 /* CharCode.Colon */:
283544
- case 36 /* CharCode.DollarSign */:
283545
- return true;
283546
- default:
283547
- return false;
283548
- }
283549
- }
283550
- function isWhitespaceAtPos(value, index) {
283551
- if (index < 0 || index >= value.length) {
283552
- return false;
283553
- }
283554
- const code = value.charCodeAt(index);
283555
- switch (code) {
283556
- // istanbul ignore next
283557
- case 32 /* CharCode.Space */:
283558
- case 9 /* CharCode.Tab */:
283559
- return true;
283560
- default:
283561
- return false;
283562
- }
283563
- }
283564
- function isUpperCaseAtPos(pos, word, wordLow) {
283565
- return word[pos] !== wordLow[pos];
283566
- }
283567
- /** @internal */
283568
- function isPatternInWord(patternLow, patternPos, patternLen, wordLow, wordPos, wordLen) {
283569
- while (patternPos < patternLen && wordPos < wordLen) {
283570
- if (patternLow[patternPos] === wordLow[wordPos]) {
283571
- patternPos += 1;
283572
- }
283573
- wordPos += 1;
283574
- }
283575
- return patternPos === patternLen; // pattern must be exhausted
283576
- }
283577
- /** @internal */
283578
- var FuzzyScore;
283579
- (function (FuzzyScore) {
283580
- /**
283581
- * No matches and value `-100`
283582
- * @internal
283583
- */
283584
- // eslint-disable-next-line @typescript-eslint/consistent-type-assertions
283585
- FuzzyScore.Default = Object.freeze([-100, 0, 0]);
283586
- // istanbul ignore next
283587
- /** @internal */
283588
- function isDefault(score) {
283589
- return !score || (score[0] === -100 && score[1] === 0 && score[2] === 0);
283590
- }
283591
- FuzzyScore.isDefault = isDefault;
283592
- })(FuzzyScore || (FuzzyScore = {}));
283593
- /** @internal */
283594
- function fuzzyScore(pattern, patternLow, patternStart, word, wordLow, wordStart, firstMatchCanBeWeak) {
283595
- // istanbul ignore next
283596
- const patternLen = pattern.length > _maxLen ? _maxLen : pattern.length;
283597
- const wordLen = word.length > _maxLen ? _maxLen : word.length;
283598
- if (patternStart >= patternLen || wordStart >= wordLen || (patternLen - patternStart) > (wordLen - wordStart)) {
283599
- return undefined;
283600
- }
283601
- // Run a simple check if the characters of pattern occur
283602
- // (in order) at all in word. If that isn't the case we
283603
- // stop because no match will be possible
283604
- if (!isPatternInWord(patternLow, patternStart, patternLen, wordLow, wordStart, wordLen)) {
283605
- return undefined;
283606
- }
283607
- let row = 1;
283608
- let column = 1;
283609
- let patternPos = patternStart;
283610
- let wordPos = wordStart;
283611
- let hasStrongFirstMatch = false;
283612
- // There will be a match, fill in tables
283613
- for (row = 1, patternPos = patternStart; patternPos < patternLen; row++, patternPos++) {
283614
- for (column = 1, wordPos = wordStart; wordPos < wordLen; column++, wordPos++) {
283615
- const score = _doScore(pattern, patternLow, patternPos, patternStart, word, wordLow, wordPos);
283616
- if (patternPos === patternStart && score > 1) {
283617
- hasStrongFirstMatch = true;
283618
- }
283619
- _scores[row][column] = score;
283620
- const diag = _table[row - 1][column - 1] + (score > 1 ? 1 : score);
283621
- const top = _table[row - 1][column] + -1;
283622
- const left = _table[row][column - 1] + -1;
283623
- if (left >= top) {
283624
- // left or diag
283625
- if (left > diag) {
283626
- _table[row][column] = left;
283627
- _arrows[row][column] = 4 /* Arrow.Left */;
283628
- }
283629
- else if (left === diag) {
283630
- _table[row][column] = left;
283631
- _arrows[row][column] = 4 /* Arrow.Left */ | 2 /* Arrow.Diag */;
283632
- }
283633
- else {
283634
- _table[row][column] = diag;
283635
- _arrows[row][column] = 2 /* Arrow.Diag */;
283636
- }
283637
- }
283638
- else {
283639
- // top or diag
283640
- if (top > diag) {
283641
- _table[row][column] = top;
283642
- _arrows[row][column] = 1 /* Arrow.Top */;
283643
- }
283644
- else if (top === diag) {
283645
- _table[row][column] = top;
283646
- _arrows[row][column] = 1 /* Arrow.Top */ | 2 /* Arrow.Diag */;
283647
- }
283648
- else {
283649
- _table[row][column] = diag;
283650
- _arrows[row][column] = 2 /* Arrow.Diag */;
283651
- }
283652
- }
283653
- }
283654
- }
283655
- if (!hasStrongFirstMatch && !firstMatchCanBeWeak) {
283656
- return undefined;
283657
- }
283658
- _matchesCount = 0;
283659
- _topScore = -100;
283660
- _wordStart = wordStart;
283661
- _firstMatchCanBeWeak = firstMatchCanBeWeak;
283662
- _findAllMatches2(row - 1, column - 1, patternLen === wordLen ? 1 : 0, 0, false);
283663
- if (_matchesCount === 0) {
283664
- return undefined;
283665
- }
283666
- return [_topScore, _topMatch2, wordStart];
283667
- }
283668
- function _doScore(pattern, patternLow, patternPos, patternStart, word, wordLow, wordPos) {
283669
- if (patternLow[patternPos] !== wordLow[wordPos]) {
283670
- return -1;
283671
- }
283672
- if (wordPos === (patternPos - patternStart)) {
283673
- // common prefix: `foobar <-> foobaz`
283674
- // ^^^^^
283675
- if (pattern[patternPos] === word[wordPos]) {
283676
- return 7;
283677
- }
283678
- else {
283679
- return 5;
283680
- }
283681
- }
283682
- else if (isUpperCaseAtPos(wordPos, word, wordLow) && (wordPos === 0 || !isUpperCaseAtPos(wordPos - 1, word, wordLow))) {
283683
- // hitting upper-case: `foo <-> forOthers`
283684
- // ^^ ^
283685
- if (pattern[patternPos] === word[wordPos]) {
283686
- return 7;
283687
- }
283688
- else {
283689
- return 5;
283690
- }
283691
- }
283692
- else if (isSeparatorAtPos(wordLow, wordPos) && (wordPos === 0 || !isSeparatorAtPos(wordLow, wordPos - 1))) {
283693
- // hitting a separator: `. <-> foo.bar`
283694
- // ^
283695
- return 5;
283696
- }
283697
- else if (isSeparatorAtPos(wordLow, wordPos - 1) || isWhitespaceAtPos(wordLow, wordPos - 1)) {
283698
- // post separator: `foo <-> bar_foo`
283699
- // ^^^
283700
- return 5;
283701
- }
283702
- else {
283703
- return 1;
283704
- }
283705
- }
283706
- let _matchesCount = 0;
283707
- let _topMatch2 = 0;
283708
- let _topScore = 0;
283709
- let _wordStart = 0;
283710
- let _firstMatchCanBeWeak = false;
283711
- function _findAllMatches2(row, column, total, matches, lastMatched) {
283712
- if (_matchesCount >= 10 || total < -25) {
283713
- // stop when having already 10 results, or
283714
- // when a potential alignment as already 5 gaps
283715
- return;
283716
- }
283717
- let simpleMatchCount = 0;
283718
- while (row > 0 && column > 0) {
283719
- const score = _scores[row][column];
283720
- const arrow = _arrows[row][column];
283721
- if (arrow === 4 /* Arrow.Left */) {
283722
- // left -> no match, skip a word character
283723
- column -= 1;
283724
- if (lastMatched) {
283725
- total -= 5; // new gap penalty
283726
- }
283727
- else if (matches !== 0) {
283728
- total -= 1; // gap penalty after first match
283729
- }
283730
- lastMatched = false;
283731
- simpleMatchCount = 0;
283732
- }
283733
- else {
283734
- /* istanbul ignore else */
283735
- if (arrow & 2 /* Arrow.Diag */) {
283736
- if (arrow & 4 /* Arrow.Left */) {
283737
- // left
283738
- _findAllMatches2(row, column - 1, matches !== 0 ? total - 1 : total, // gap penalty after first match
283739
- matches, lastMatched);
283740
- }
283741
- // diag
283742
- total += score;
283743
- row -= 1;
283744
- column -= 1;
283745
- lastMatched = true;
283746
- // match -> set a 1 at the word pos
283747
- matches += 2 ** (column + _wordStart);
283748
- // count simple matches and boost a row of
283749
- // simple matches when they yield in a
283750
- // strong match.
283751
- if (score === 1) {
283752
- simpleMatchCount += 1;
283753
- if (row === 0 && !_firstMatchCanBeWeak) {
283754
- // when the first match is a weak
283755
- // match we discard it
283756
- return undefined;
283757
- }
283758
- }
283759
- else {
283760
- // boost
283761
- total += 1 + (simpleMatchCount * (score - 1));
283762
- simpleMatchCount = 0;
283763
- }
283764
- }
283765
- else {
283766
- // istanbul ignore next
283767
- return undefined;
283768
- }
283769
- }
283770
- }
283771
- total -= column >= 3 ? 9 : column * 3; // late start penalty
283772
- // dynamically keep track of the current top score
283773
- // and insert the current best score at head, the rest at tail
283774
- _matchesCount += 1;
283775
- if (total > _topScore) {
283776
- _topScore = total;
283777
- _topMatch2 = matches;
283778
- }
283779
- }
283780
- // #endregion
283781
- // #region --- graceful ---
283782
- /** @internal */
283783
- function fuzzyScoreGracefulAggressive(pattern, lowPattern, patternPos, word, lowWord, wordPos, firstMatchCanBeWeak) {
283784
- return fuzzyScoreWithPermutations(pattern, lowPattern, patternPos, word, lowWord, wordPos, true, firstMatchCanBeWeak);
283785
- }
283786
- /** @internal */
283787
- function fuzzyScoreGraceful(pattern, lowPattern, patternPos, word, lowWord, wordPos, firstMatchCanBeWeak) {
283788
- return fuzzyScoreWithPermutations(pattern, lowPattern, patternPos, word, lowWord, wordPos, false, firstMatchCanBeWeak);
283789
- }
283790
- function fuzzyScoreWithPermutations(pattern, lowPattern, patternPos, word, lowWord, wordPos, aggressive, firstMatchCanBeWeak) {
283791
- let top = fuzzyScore(pattern, lowPattern, patternPos, word, lowWord, wordPos, firstMatchCanBeWeak);
283792
- if (top && !aggressive) {
283793
- // when using the original pattern yield a result we`
283794
- // return it unless we are aggressive and try to find
283795
- // a better alignment, e.g. `cno` -> `^co^ns^ole` or `^c^o^nsole`.
283796
- return top;
283797
- }
283798
- // istanbul ignore else
283799
- if (pattern.length >= 3) {
283800
- // When the pattern is long enough then try a few (max 7)
283801
- // permutations of the pattern to find a better match. The
283802
- // permutations only swap neighbouring characters, e.g
283803
- // `cnoso` becomes `conso`, `cnsoo`, `cnoos`.
283804
- const tries = Math.min(7, pattern.length - 1);
283805
- for (let movingPatternPos = patternPos + 1; movingPatternPos < tries; movingPatternPos++) {
283806
- const newPattern = nextTypoPermutation(pattern, movingPatternPos);
283807
- // istanbul ignore else
283808
- if (newPattern) {
283809
- const candidate = fuzzyScore(newPattern, newPattern.toLowerCase(), patternPos, word, lowWord, wordPos, firstMatchCanBeWeak);
283810
- if (candidate) {
283811
- candidate[0] -= 3; // permutation penalty
283812
- // istanbul ignore else
283813
- if (!top || candidate[0] > top[0]) {
283814
- top = candidate;
283815
- }
283816
- }
283817
- }
283818
- }
283819
- }
283820
- return top;
283821
- }
283822
- function nextTypoPermutation(pattern, patternPos) {
283823
- // istanbul ignore next
283824
- if (patternPos + 1 >= pattern.length) {
283825
- return undefined;
283826
- }
283827
- const swap1 = pattern[patternPos];
283828
- const swap2 = pattern[patternPos + 1];
283829
- // istanbul ignore next
283830
- if (swap1 === swap2) {
283831
- return undefined;
283832
- }
283833
- return pattern.slice(0, patternPos)
283834
- + swap2
283835
- + swap1
283836
- + pattern.slice(patternPos + 2);
283837
- }
283838
- // #endregion
283839
-
283840
-
283841
- /***/ }),
283842
-
283843
- /***/ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/filter/map.js":
283844
- /*!**************************************************************************!*\
283845
- !*** ../../ui/appui-abstract/lib/esm/appui-abstract/utils/filter/map.js ***!
283846
- \**************************************************************************/
283847
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
283848
-
283849
- "use strict";
283850
- __webpack_require__.r(__webpack_exports__);
283851
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
283852
- /* harmony export */ LRUCache: () => (/* binding */ LRUCache),
283853
- /* harmony export */ LinkedMap: () => (/* binding */ LinkedMap)
283854
- /* harmony export */ });
283855
- /*---------------------------------------------------------------------------------------------
283856
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
283857
- * See LICENSE.md in the project root for license terms and full copyright notice.
283858
- *--------------------------------------------------------------------------------------------*/
283859
- var _a;
283860
- /**
283861
- * @internal
283862
- */
283863
- // istanbul ignore next
283864
- class LinkedMap {
283865
- constructor() {
283866
- this[_a] = "LinkedMap";
283867
- this._map = new Map();
283868
- this._head = undefined;
283869
- this._tail = undefined;
283870
- this._size = 0;
283871
- this._state = 0;
283872
- }
283873
- clear() {
283874
- this._map.clear();
283875
- this._head = undefined;
283876
- this._tail = undefined;
283877
- this._size = 0;
283878
- this._state++;
283879
- }
283880
- isEmpty() {
283881
- return !this._head && !this._tail;
283882
- }
283883
- get size() {
283884
- return this._size;
283885
- }
283886
- get first() {
283887
- return this._head?.value;
283888
- }
283889
- get last() {
283890
- return this._tail?.value;
283891
- }
283892
- has(key) {
283893
- return this._map.has(key);
283894
- }
283895
- get(key, touch = 0 /* Touch.None */) {
283896
- const item = this._map.get(key);
283897
- if (!item) {
283898
- return undefined;
283899
- }
283900
- if (touch !== 0 /* Touch.None */) {
283901
- this.touch(item, touch);
283902
- }
283903
- return item.value;
283904
- }
283905
- set(key, value, touch = 0 /* Touch.None */) {
283906
- let item = this._map.get(key);
283907
- if (item) {
283908
- item.value = value;
283909
- if (touch !== 0 /* Touch.None */) {
283910
- this.touch(item, touch);
283911
- }
283912
- }
283913
- else {
283914
- item = { key, value, next: undefined, previous: undefined };
283915
- switch (touch) {
283916
- case 0 /* Touch.None */:
283917
- this.addItemLast(item);
283918
- break;
283919
- case 1 /* Touch.AsOld */:
283920
- this.addItemFirst(item);
283921
- break;
283922
- case 2 /* Touch.AsNew */:
283923
- this.addItemLast(item);
283924
- break;
283925
- default:
283926
- this.addItemLast(item);
283927
- break;
283928
- }
283929
- this._map.set(key, item);
283930
- this._size++;
283931
- }
283932
- return this;
283933
- }
283934
- delete(key) {
283935
- return !!this.remove(key);
283936
- }
283937
- remove(key) {
283938
- const item = this._map.get(key);
283939
- if (!item) {
283940
- return undefined;
283941
- }
283942
- this._map.delete(key);
283943
- this.removeItem(item);
283944
- this._size--;
283945
- return item.value;
283946
- }
283947
- shift() {
283948
- if (!this._head && !this._tail) {
283949
- return undefined;
283950
- }
283951
- if (!this._head || !this._tail) {
283952
- throw new Error("Invalid list");
283953
- }
283954
- const item = this._head;
283955
- this._map.delete(item.key);
283956
- this.removeItem(item);
283957
- this._size--;
283958
- return item.value;
283959
- }
283960
- forEach(callbackfn, thisArg) {
283961
- const state = this._state;
283962
- let current = this._head;
283963
- while (current) {
283964
- if (thisArg) {
283965
- callbackfn.bind(thisArg)(current.value, current.key, this);
283966
- }
283967
- else {
283968
- callbackfn(current.value, current.key, this);
283969
- }
283970
- if (this._state !== state) {
283971
- throw new Error(`LinkedMap got modified during iteration.`);
283972
- }
283973
- current = current.next;
283974
- }
283975
- }
283976
- keys() {
283977
- const map = this;
283978
- const state = this._state;
283979
- let current = this._head;
283980
- const iterator = {
283981
- [Symbol.iterator]() {
283982
- return iterator;
283983
- },
283984
- next() {
283985
- if (map._state !== state) {
283986
- throw new Error(`LinkedMap got modified during iteration.`);
283987
- }
283988
- if (current) {
283989
- const result = { value: current.key, done: false };
283990
- current = current.next;
283991
- return result;
283992
- }
283993
- else {
283994
- return { value: undefined, done: true };
283995
- }
283996
- },
283997
- };
283998
- return iterator;
283999
- }
284000
- values() {
284001
- const map = this;
284002
- const state = this._state;
284003
- let current = this._head;
284004
- const iterator = {
284005
- [Symbol.iterator]() {
284006
- return iterator;
284007
- },
284008
- next() {
284009
- if (map._state !== state) {
284010
- throw new Error(`LinkedMap got modified during iteration.`);
284011
- }
284012
- if (current) {
284013
- const result = { value: current.value, done: false };
284014
- current = current.next;
284015
- return result;
284016
- }
284017
- else {
284018
- return { value: undefined, done: true };
284019
- }
284020
- },
284021
- };
284022
- return iterator;
284023
- }
284024
- entries() {
284025
- // eslint-disable-next-line @typescript-eslint/no-this-alias
284026
- const map = this;
284027
- const state = this._state;
284028
- let current = this._head;
284029
- const iterator = {
284030
- [Symbol.iterator]() {
284031
- return iterator;
284032
- },
284033
- next() {
284034
- if (map._state !== state) {
284035
- throw new Error(`LinkedMap got modified during iteration.`);
284036
- }
284037
- if (current) {
284038
- const result = { value: [current.key, current.value], done: false };
284039
- current = current.next;
284040
- return result;
284041
- }
284042
- else {
284043
- return { value: undefined, done: true };
284044
- }
284045
- },
284046
- };
284047
- return iterator;
284048
- }
284049
- [(_a = Symbol.toStringTag, Symbol.iterator)]() {
284050
- return this.entries();
284051
- }
284052
- trimOld(newSize) {
284053
- if (newSize >= this.size) {
284054
- return;
284055
- }
284056
- if (newSize === 0) {
284057
- this.clear();
284058
- return;
284059
- }
284060
- let current = this._head;
284061
- let currentSize = this.size;
284062
- while (current && currentSize > newSize) {
284063
- this._map.delete(current.key);
284064
- current = current.next;
284065
- currentSize--;
284066
- }
284067
- this._head = current;
284068
- this._size = currentSize;
284069
- if (current) {
284070
- current.previous = undefined;
284071
- }
284072
- this._state++;
284073
- }
284074
- addItemFirst(item) {
284075
- // First time Insert
284076
- if (!this._head && !this._tail) {
284077
- this._tail = item;
284078
- }
284079
- else if (!this._head) {
284080
- throw new Error("Invalid list");
284081
- }
284082
- else {
284083
- item.next = this._head;
284084
- this._head.previous = item;
284085
- }
284086
- this._head = item;
284087
- this._state++;
284088
- }
284089
- addItemLast(item) {
284090
- // First time Insert
284091
- if (!this._head && !this._tail) {
284092
- this._head = item;
284093
- }
284094
- else if (!this._tail) {
284095
- throw new Error("Invalid list");
284096
- }
284097
- else {
284098
- item.previous = this._tail;
284099
- this._tail.next = item;
284100
- }
284101
- this._tail = item;
284102
- this._state++;
284103
- }
284104
- removeItem(item) {
284105
- if (item === this._head && item === this._tail) {
284106
- this._head = undefined;
284107
- this._tail = undefined;
284108
- }
284109
- else if (item === this._head) {
284110
- // This can only happend if size === 1 which is handle
284111
- // by the case above.
284112
- if (!item.next) {
284113
- throw new Error("Invalid list");
284114
- }
284115
- item.next.previous = undefined;
284116
- this._head = item.next;
284117
- }
284118
- else if (item === this._tail) {
284119
- // This can only happend if size === 1 which is handle
284120
- // by the case above.
284121
- if (!item.previous) {
284122
- throw new Error("Invalid list");
284123
- }
284124
- item.previous.next = undefined;
284125
- this._tail = item.previous;
284126
- }
284127
- else {
284128
- const next = item.next;
284129
- const previous = item.previous;
284130
- if (!next || !previous) {
284131
- throw new Error("Invalid list");
284132
- }
284133
- next.previous = previous;
284134
- previous.next = next;
284135
- }
284136
- item.next = undefined;
284137
- item.previous = undefined;
284138
- this._state++;
284139
- }
284140
- touch(item, touch) {
284141
- if (!this._head || !this._tail) {
284142
- throw new Error("Invalid list");
284143
- }
284144
- if ((touch !== 1 /* Touch.AsOld */ && touch !== 2 /* Touch.AsNew */)) {
284145
- return;
284146
- }
284147
- if (touch === 1 /* Touch.AsOld */) {
284148
- if (item === this._head) {
284149
- return;
284150
- }
284151
- const next = item.next;
284152
- const previous = item.previous;
284153
- // Unlink the item
284154
- if (item === this._tail) {
284155
- // previous must be defined since item was not head but is tail
284156
- // So there are more than on item in the map
284157
- previous.next = undefined;
284158
- this._tail = previous;
284159
- }
284160
- else {
284161
- // Both next and previous are not undefined since item was neither head nor tail.
284162
- next.previous = previous;
284163
- previous.next = next;
284164
- }
284165
- // Insert the node at head
284166
- item.previous = undefined;
284167
- item.next = this._head;
284168
- this._head.previous = item;
284169
- this._head = item;
284170
- this._state++;
284171
- }
284172
- else if (touch === 2 /* Touch.AsNew */) {
284173
- if (item === this._tail) {
284174
- return;
284175
- }
284176
- const next = item.next;
284177
- const previous = item.previous;
284178
- // Unlink the item.
284179
- if (item === this._head) {
284180
- // next must be defined since item was not tail but is head
284181
- // So there are more than on item in the map
284182
- next.previous = undefined;
284183
- this._head = next;
284184
- }
284185
- else {
284186
- // Both next and previous are not undefined since item was neither head nor tail.
284187
- next.previous = previous;
284188
- previous.next = next;
284189
- }
284190
- item.next = undefined;
284191
- item.previous = this._tail;
284192
- this._tail.next = item;
284193
- this._tail = item;
284194
- this._state++;
284195
- }
284196
- }
284197
- toJSON() {
284198
- const data = [];
284199
- this.forEach((value, key) => {
284200
- data.push([key, value]);
284201
- });
284202
- return data;
284203
- }
284204
- fromJSON(data) {
284205
- this.clear();
284206
- for (const [key, value] of data) {
284207
- this.set(key, value);
284208
- }
284209
- }
284210
- }
284211
- /**
284212
- * @internal
284213
- */
284214
- // istanbul ignore next
284215
- class LRUCache extends LinkedMap {
284216
- constructor(limit, ratio = 1) {
284217
- super();
284218
- this._limit = limit;
284219
- this._ratio = Math.min(Math.max(0, ratio), 1);
284220
- }
284221
- get limit() {
284222
- return this._limit;
284223
- }
284224
- set limit(limit) {
284225
- this._limit = limit;
284226
- this.checkTrim();
284227
- }
284228
- get ratio() {
284229
- return this._ratio;
284230
- }
284231
- set ratio(ratio) {
284232
- this._ratio = Math.min(Math.max(0, ratio), 1);
284233
- this.checkTrim();
284234
- }
284235
- get(key, touch = 2 /* Touch.AsNew */) {
284236
- return super.get(key, touch);
284237
- }
284238
- peek(key) {
284239
- return super.get(key, 0 /* Touch.None */);
284240
- }
284241
- set(key, value) {
284242
- super.set(key, value, 2 /* Touch.AsNew */);
284243
- this.checkTrim();
284244
- return this;
284245
- }
284246
- checkTrim() {
284247
- if (this.size > this._limit) {
284248
- this.trimOld(Math.round(this._limit * this._ratio));
284249
- }
284250
- }
284251
- }
284252
-
284253
-
284254
- /***/ }),
284255
-
284256
- /***/ "../../ui/appui-abstract/lib/esm/appui-abstract/utils/filter/strings.js":
284257
- /*!******************************************************************************!*\
284258
- !*** ../../ui/appui-abstract/lib/esm/appui-abstract/utils/filter/strings.js ***!
284259
- \******************************************************************************/
284260
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
284261
-
284262
- "use strict";
284263
- __webpack_require__.r(__webpack_exports__);
284264
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
284265
- /* harmony export */ convertSimple2RegExpPattern: () => (/* binding */ convertSimple2RegExpPattern),
284266
- /* harmony export */ equalsIgnoreCase: () => (/* binding */ equalsIgnoreCase),
284267
- /* harmony export */ isLowerAsciiLetter: () => (/* binding */ isLowerAsciiLetter),
284268
- /* harmony export */ isUpperAsciiLetter: () => (/* binding */ isUpperAsciiLetter),
284269
- /* harmony export */ startsWithIgnoreCase: () => (/* binding */ startsWithIgnoreCase)
284270
- /* harmony export */ });
284271
- /*---------------------------------------------------------------------------------------------
284272
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
284273
- * See LICENSE.md in the project root for license terms and full copyright notice.
284274
- *--------------------------------------------------------------------------------------------*/
284275
- /**
284276
- * @internal
284277
- */
284278
- function convertSimple2RegExpPattern(pattern) {
284279
- return pattern.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g, "\\$&").replace(/[\*]/g, ".*");
284280
- }
284281
- /**
284282
- * @internal
284283
- */
284284
- function isLowerAsciiLetter(code) {
284285
- return code >= 97 /* CharCode.a */ && code <= 122 /* CharCode.z */;
284286
- }
284287
- /**
284288
- * @internal
284289
- */
284290
- function isUpperAsciiLetter(code) {
284291
- return code >= 65 /* CharCode.A */ && code <= 90 /* CharCode.Z */;
284292
- }
284293
- /**
284294
- * @internal
284295
- */
284296
- function isAsciiLetter(code) {
284297
- return isLowerAsciiLetter(code) || isUpperAsciiLetter(code);
284298
- }
284299
- /**
284300
- * @internal
284301
- */
284302
- function equalsIgnoreCase(a, b) {
284303
- return a.length === b.length && doEqualsIgnoreCase(a, b);
284304
- }
284305
- /**
284306
- * @internal
284307
- */
284308
- function doEqualsIgnoreCase(a, b, stopAt = a.length) {
284309
- for (let i = 0; i < stopAt; i++) {
284310
- const codeA = a.charCodeAt(i);
284311
- const codeB = b.charCodeAt(i);
284312
- if (codeA === codeB) {
284313
- continue;
284314
- }
284315
- // a-z A-Z
284316
- if (isAsciiLetter(codeA) && isAsciiLetter(codeB)) {
284317
- const diff = Math.abs(codeA - codeB);
284318
- if (diff !== 0 && diff !== 32) {
284319
- return false;
284320
- }
284321
- }
284322
- else {
284323
- // Any other char code
284324
- if (String.fromCharCode(codeA).toLowerCase() !== String.fromCharCode(codeB).toLowerCase()) {
284325
- return false;
284326
- }
284327
- }
284328
- }
284329
- return true;
284330
- }
284331
- /**
284332
- * @internal
284333
- */
284334
- function startsWithIgnoreCase(str, candidate) {
284335
- const candidateLength = candidate.length;
284336
- if (candidate.length > str.length) {
284337
- return false;
284338
- }
284339
- return doEqualsIgnoreCase(str, candidate, candidateLength);
284340
- }
284341
283416
 
284342
283417
 
284343
283418
  /***/ }),
@@ -284351,8 +283426,7 @@ function startsWithIgnoreCase(str, candidate) {
284351
283426
  "use strict";
284352
283427
  __webpack_require__.r(__webpack_exports__);
284353
283428
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
284354
- /* harmony export */ getClassName: () => (/* binding */ getClassName),
284355
- /* harmony export */ loggerCategory: () => (/* binding */ loggerCategory)
283429
+ /* harmony export */ getClassName: () => (/* binding */ getClassName)
284356
283430
  /* harmony export */ });
284357
283431
  /*---------------------------------------------------------------------------------------------
284358
283432
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
@@ -284363,6 +283437,7 @@ __webpack_require__.r(__webpack_exports__);
284363
283437
  */
284364
283438
  /** Gets the class name for an object.
284365
283439
  * @internal
283440
+ * @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.
284366
283441
  */
284367
283442
  const getClassName = (obj) => {
284368
283443
  let className = "";
@@ -284377,14 +283452,6 @@ const getClassName = (obj) => {
284377
283452
  }
284378
283453
  return className;
284379
283454
  };
284380
- /** Gets category to use for adding Log entries
284381
- * @internal
284382
- */
284383
- const loggerCategory = (obj) => {
284384
- const className = getClassName(obj);
284385
- const category = `appui-abstract${(className ? `.${className}` : "")}`;
284386
- return category;
284387
- };
284388
283455
 
284389
283456
 
284390
283457
  /***/ }),
@@ -289850,7 +288917,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
289850
288917
  /***/ ((module) => {
289851
288918
 
289852
288919
  "use strict";
289853
- 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"}}');
288920
+ 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"}}');
289854
288921
 
289855
288922
  /***/ })
289856
288923