@arcgis/map-components 5.2.0-next.12 → 5.2.0-next.14

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.
Files changed (59) hide show
  1. package/dist/cdn/{QKER2AXN.js → 47YKMHEI.js} +1 -1
  2. package/dist/cdn/4BGPI3L3.js +2 -0
  3. package/dist/cdn/{GTOGU3CL.js → 5D3ZCD2V.js} +1 -1
  4. package/dist/cdn/{HNGHLDNZ.js → 5Z6MDFHN.js} +1 -1
  5. package/dist/cdn/64S26ZIP.js +2 -0
  6. package/dist/cdn/BXK5DVDN.js +2 -0
  7. package/dist/cdn/FXNJNCK7.js +2 -0
  8. package/dist/cdn/IFWIGLKK.js +2 -0
  9. package/dist/cdn/IHDXJ4C3.js +2 -0
  10. package/dist/cdn/IYEZB6EU.js +2 -0
  11. package/dist/cdn/{3QWDXECJ.js → K6O7QOW4.js} +1 -1
  12. package/dist/cdn/{2KXO5AYW.js → MJ2AUX7N.js} +1 -1
  13. package/dist/cdn/O3S3JGUF.js +2 -0
  14. package/dist/cdn/QQPVIXFY.js +2 -0
  15. package/dist/cdn/TPZUKUI7.js +2 -0
  16. package/dist/cdn/{3PT4D6BD.js → UA3OPWND.js} +1 -1
  17. package/dist/cdn/UCPXN4Y5.js +2 -0
  18. package/dist/cdn/{HSGEBM7Q.js → XVNU3EUN.js} +1 -1
  19. package/dist/cdn/assets/print/t9n/messages.en.json +1 -1
  20. package/dist/cdn/index.js +1 -1
  21. package/dist/chunks/useArcgisViewReadyError.js +7 -7
  22. package/dist/components/arcgis-daylight/customElement.js +32 -23
  23. package/dist/components/arcgis-editor/customElement.d.ts +63 -0
  24. package/dist/components/arcgis-editor/customElement.js +5 -5
  25. package/dist/components/arcgis-features-next/customElement.js +15 -12
  26. package/dist/components/arcgis-labeled-switch/customElement.js +5 -5
  27. package/dist/components/arcgis-layer-list-next/customElement.js +80 -55
  28. package/dist/components/arcgis-multi-feature-form/customElement.js +14 -14
  29. package/dist/components/arcgis-print/customElement.d.ts +3 -0
  30. package/dist/components/arcgis-print-datum-transformation-input/customElement.js +74 -0
  31. package/dist/components/arcgis-print-datum-transformation-input/index.js +3 -0
  32. package/dist/components/arcgis-print-layout-advanced-options/customElement.js +14 -11
  33. package/dist/components/arcgis-print-layout-advanced-options/index.js +1 -0
  34. package/dist/components/arcgis-print-template-selector/customElement.js +8 -8
  35. package/dist/components/arcgis-sketch/customElement.d.ts +90 -1
  36. package/dist/components/arcgis-sketch/customElement.js +35 -25
  37. package/dist/components/arcgis-slider-scale-range/customElement.d.ts +4 -5
  38. package/dist/components/arcgis-slider-scale-range/customElement.js +69 -56
  39. package/dist/components/arcgis-utility-network-trace-location/customElement.js +66 -83
  40. package/dist/docs/api.json +1 -1
  41. package/dist/docs/docs.json +1 -1
  42. package/dist/docs/vscode.html-custom-data.json +1 -1
  43. package/dist/docs/web-types.json +1 -1
  44. package/dist/loader.js +3 -2
  45. package/dist/types/lumina.d.ts +2 -2
  46. package/dist/types/preact.d.ts +2 -2
  47. package/dist/types/react.d.ts +2 -2
  48. package/dist/types/stencil.d.ts +2 -2
  49. package/package.json +5 -5
  50. package/dist/cdn/25P6ABDR.js +0 -2
  51. package/dist/cdn/DNZU7DTQ.js +0 -2
  52. package/dist/cdn/IKSY73X2.js +0 -2
  53. package/dist/cdn/JE5LMTIW.js +0 -2
  54. package/dist/cdn/KI4JUPA7.js +0 -2
  55. package/dist/cdn/L3BUIPXT.js +0 -2
  56. package/dist/cdn/OJIPBNXS.js +0 -2
  57. package/dist/cdn/OUYGGJ47.js +0 -2
  58. package/dist/cdn/TXDMKNIB.js +0 -2
  59. package/dist/cdn/VNP4GF74.js +0 -2
@@ -1,14 +1,14 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import { g as x, c as p } from "../../chunks/runtime.js";
3
- import { keyed as g } from "lit/directives/keyed.js";
4
- import { LitElement as _, createEvent as d, safeStyleMap as u, nothing as v } from "@arcgis/lumina";
2
+ import { g as x, c as _ } from "../../chunks/runtime.js";
3
+ import { keyed as p } from "lit/directives/keyed.js";
4
+ import { LitElement as g, createEvent as d, safeStyleMap as u, nothing as M } from "@arcgis/lumina";
5
5
  import { watch as f } from "@arcgis/core/core/reactiveUtils.js";
6
- import { u as M } from "../../chunks/useView.js";
6
+ import { u as v } from "../../chunks/useView.js";
7
7
  import { u as y } from "../../chunks/useT9n.js";
8
- import { css as L, html as r } from "lit";
9
- import { usePropertyChange as b } from "@arcgis/lumina/controllers";
10
- import { createRef as $, ref as w } from "lit/directives/ref.js";
11
- import T from "@arcgis/core/portal/Portal.js";
8
+ import { css as b, html as o } from "lit";
9
+ import { usePropertyChange as $ } from "@arcgis/lumina/controllers";
10
+ import { createRef as L, ref as w } from "lit/directives/ref.js";
11
+ import R from "@arcgis/core/portal/Portal.js";
12
12
  const h = /* @__PURE__ */ new Set([
13
13
  "ar-iq",
14
14
  "ar-kw",
@@ -84,7 +84,7 @@ const h = /* @__PURE__ */ new Set([
84
84
  "th-th",
85
85
  "zh-cn",
86
86
  "zh-tw"
87
- ]), R = {
87
+ ]), T = {
88
88
  ar: "iq",
89
89
  bg: "bg",
90
90
  cs: "cz",
@@ -112,7 +112,7 @@ const h = /* @__PURE__ */ new Set([
112
112
  sv: "se",
113
113
  th: "th",
114
114
  zh: "cn"
115
- }, P = L`:host{display:block;width:310px;max-width:100%}.slider{height:50px}.scale-indicator-container{position:relative;width:100%;margin-top:2px}.scale-indicator-icon{transform:scale(.8,1.7);margin-left:-6px;width:1px;--calcite-icon-color: var(--calcite-color-text-3)}.scale-menu-list{max-height:220px;overflow-y:auto}.scale-menu-input{max-width:120px}.scale-menu-button-container{display:flex;direction:ltr;justify-content:space-between}.scale-menu-button{min-width:0}:dir(rtl) .scale-menu-button-container>*{direction:rtl}.preview-container{padding:6px;background-color:var(--calcite-color-foreground-1);box-shadow:0 1px 2px #0000004d}`, l = [
115
+ }, P = b`:host{display:block;width:310px;max-width:100%}.slider{height:50px}.scale-indicator-container{position:relative;width:100%;margin-top:2px}.scale-indicator-icon{transform:scale(.8,1.7);margin-left:-6px;width:1px;--calcite-icon-color: var(--calcite-color-text-3)}.scale-menu-list{max-height:220px;overflow-y:auto}.scale-menu-input{max-width:120px}.scale-menu-button-container{display:flex;direction:ltr;justify-content:space-between}.scale-menu-button{min-width:0}:dir(rtl) .scale-menu-button-container>*{direction:rtl}.preview-container{padding:6px;background-color:var(--calcite-color-foreground-1);box-shadow:0 1px 2px #0000004d}`, l = [
116
116
  { id: "world", scale: 147914382, minScale: 147914382, maxScale: 1e8 },
117
117
  { id: "continent", scale: 5e7, minScale: 99999999, maxScale: 35e6 },
118
118
  { id: "countriesBig", scale: 25e6, minScale: 34999999, maxScale: 15e6 },
@@ -134,9 +134,9 @@ const h = /* @__PURE__ */ new Set([
134
134
  { id: "rooms", scale: 400, minScale: 400, maxScale: 101 },
135
135
  { id: "room", scale: 100, minScale: 100, maxScale: 0 }
136
136
  ];
137
- class I extends _ {
137
+ class I extends g {
138
138
  constructor() {
139
- super(...arguments), this.messages = y(), this._sliderRef = $(), this._activeMenu = null, this._customScaleSelected = null, this._portalRegion = null, this._layerMaxScaleLimit = l[l.length - 1].maxScale, this._layerMinScaleLimit = l[0].minScale, this.autoDestroyDisabled = !1, this.disabled = !1, this.hidePreview = !1, this.hideMaxScaleMenu = !1, this.hideMinScaleMenu = !1, this.icon = "actual-size", this.maxScale = 0, this.maxScaleLimit = l[l.length - 1].maxScale, this.minScale = 0, this.minScaleLimit = l[0].minScale, this.mode = "range", this.showWorldValue = !1, this.view = M(this), this.arcgisChange = d(), this.arcgisInput = d(), this.arcgisPropertyChange = b()("state", "minScale", "maxScale"), this.arcgisReady = d();
139
+ super(...arguments), this.messages = y(), this._sliderRef = L(), this._activeMenu = null, this._customScaleSelected = null, this._portalRegion = null, this._layerMaxScaleLimit = l[l.length - 1].maxScale, this._layerMinScaleLimit = l[0].minScale, this.autoDestroyDisabled = !1, this.disabled = !1, this.hidePreview = !1, this.hideMaxScaleMenu = !1, this.hideMinScaleMenu = !1, this.icon = "actual-size", this.maxScale = 0, this.maxScaleLimit = l[l.length - 1].maxScale, this.minScale = 0, this.minScaleLimit = l[0].minScale, this.mode = "range", this.showWorldValue = !1, this.view = v(this), this.arcgisChange = d(), this.arcgisInput = d(), this.arcgisPropertyChange = $()("state", "minScale", "maxScale"), this.arcgisReady = d();
140
140
  }
141
141
  static {
142
142
  this.properties = { _activeMenu: 16, _customScaleSelected: 16, _portalRegion: 16, _layerMaxScaleLimit: 16, _layerMinScaleLimit: 16, autoDestroyDisabled: 5, disabled: 7, hidePreview: 5, hideMaxScaleMenu: 5, hideMinScaleMenu: 5, icon: 1, label: 1, layer: 0, maxScale: 9, maxScaleLimit: 9, minScale: 9, minScaleLimit: 9, mode: 1, referenceElement: 1, region: 1, showWorldValue: 5, state: 32, view: 0 };
@@ -152,7 +152,7 @@ class I extends _ {
152
152
  await this.manager.destroy();
153
153
  }
154
154
  willUpdate(e) {
155
- if ((e.has("maxScaleLimit") || e.has("minScaleLimit")) && (this.minScaleLimit === 0 && (this.minScaleLimit = this._layerMinScaleLimit), this.maxScaleLimit === 0 && (this.maxScaleLimit = this._layerMaxScaleLimit), this.minScaleLimit = Math.min(this.minScaleLimit, this._layerMinScaleLimit), this.maxScaleLimit = Math.max(this.maxScaleLimit, this._layerMaxScaleLimit), this.minScale !== 0 && (this.minScale = Math.min(this.minScale, this.minScaleLimit)), this.maxScale !== 0 && (this.maxScale = Math.max(this.maxScale, this.maxScaleLimit)), this._syncLayerScale()), e.has("maxScale") || e.has("minScale")) {
155
+ if ((e.has("maxScaleLimit") || e.has("minScaleLimit")) && (this.minScaleLimit === 0 && (this.minScaleLimit = l[0].minScale), this.maxScaleLimit === 0 && (this.maxScaleLimit = l[l.length - 1].maxScale), this.minScaleLimit = Math.min(this.minScaleLimit, l[0].minScale), this.maxScaleLimit = Math.max(this.maxScaleLimit, l[l.length - 1].maxScale), this.minScale !== 0 && (this.minScale = Math.min(this.minScale, this._interactiveMinScale)), this.maxScale !== 0 && (this.maxScale = Math.max(this.maxScale, this._interactiveMaxScale)), this.hasUpdated && this._syncLayerScale()), e.has("maxScale") || e.has("minScale")) {
156
156
  if (this.minScale !== 0) {
157
157
  const i = this._clampScale("min", this.minScale);
158
158
  this.minScale = i === this.minScaleLimit ? 0 : i;
@@ -162,11 +162,11 @@ class I extends _ {
162
162
  this.maxScale = i === this.maxScaleLimit ? 0 : i;
163
163
  }
164
164
  }
165
- e.has("layer") && this.layer && this.layer.load().catch(() => {
166
- }), e.has("mode") && (this.mode === "max-scale-only" ? this.minScale = 0 : this.mode === "min-scale-only" && (this.maxScale = 0), e.get("mode") !== void 0 && this._syncLayerScale());
165
+ e.has("layer") && (this.layer ? this.layer.load().catch(() => {
166
+ }) : (this._layerMinScaleLimit = l[0].minScale, this._layerMaxScaleLimit = l[l.length - 1].maxScale)), e.has("mode") && (this.mode === "max-scale-only" ? this.minScale = 0 : this.mode === "min-scale-only" && (this.maxScale = 0), e.get("mode") !== void 0 && this._syncLayerScale());
167
167
  }
168
168
  loaded() {
169
- T.getDefault().load().then((i) => {
169
+ R.getDefault().load().then((i) => {
170
170
  const a = i.user?.culture ?? i.culture;
171
171
  a && (this._portalRegion = a.split("-")[1]?.toLowerCase() ?? null);
172
172
  }).catch(() => {
@@ -179,37 +179,46 @@ class I extends _ {
179
179
  }), ({ loaded: i, ready: a }) => {
180
180
  if (!i || !a || !this.layer)
181
181
  return;
182
+ this._layerMinScaleLimit = l[0].minScale, this._layerMaxScaleLimit = l[l.length - 1].maxScale;
182
183
  const s = this.layer.type === "wcs" || this.layer.type === "imagery-tile" && this.layer.raster?.tileType === "Raster" ? null : "tileInfo" in this.layer ? this.layer.tileInfo?.lods : null;
183
184
  if (s)
184
- this._layerMinScaleLimit = s[0].scale === 0 ? l[0].minScale : Math.min(l[0].minScale, s[0].scale), !("resampling" in this.layer) || this.layer.resampling || (this._layerMaxScaleLimit = s[s.length - 1].scale);
185
+ !("resampling" in this.layer) || this.layer.resampling || (this._layerMinScaleLimit = s[0].scale === 0 ? l[0].minScale : Math.min(l[0].minScale, s[0].scale), this._layerMaxScaleLimit = s[s.length - 1].scale);
185
186
  else {
186
- const m = this.layer && "maxScaleRange" in this.layer ? this.layer.maxScaleRange : null;
187
- let n = 0, o = 0;
188
- m && (n = m.minScale, o = m.maxScale), o !== 0 && (this._layerMaxScaleLimit = o), n !== 0 && (this._layerMinScaleLimit = n);
187
+ const n = this.layer && "maxScaleRange" in this.layer ? this.layer.maxScaleRange : null;
188
+ let r = 0, m = 0;
189
+ n && (r = n.minScale, m = n.maxScale), m !== 0 && (this._layerMaxScaleLimit = m), r !== 0 && (this._layerMinScaleLimit = r);
189
190
  }
190
- this.minScaleLimit = Math.min(this.minScaleLimit, this._layerMinScaleLimit), this.maxScaleLimit = Math.max(this.maxScaleLimit, this._layerMaxScaleLimit);
191
191
  const c = this.layer;
192
- c && "minScale" in c && "maxScale" in c && (c.minScale !== 0 && this.minScale === 0 && (this.minScale = Math.min(c.minScale, this.minScaleLimit)), c.maxScale !== 0 && this.maxScale === 0 && (this.maxScale = Math.max(c.maxScale, this.maxScaleLimit)));
192
+ c && "minScale" in c && "maxScale" in c && (c.minScale !== 0 && this.minScale === 0 && (this.minScale = Math.min(c.minScale, this._interactiveMinScale)), c.maxScale !== 0 && this.maxScale === 0 && (this.maxScale = Math.max(c.maxScale, this._interactiveMaxScale)));
193
193
  }, { initial: !0 })
194
194
  ]);
195
195
  }
196
+ get _interactiveMinScale() {
197
+ return Math.min(this.minScaleLimit, this._layerMinScaleLimit);
198
+ }
199
+ get _interactiveMaxScale() {
200
+ return Math.max(this.maxScaleLimit, this._layerMaxScaleLimit);
201
+ }
196
202
  get _effectiveMinScale() {
197
- return this.minScale === 0 ? this.minScaleLimit : this.minScale;
203
+ return this.minScale === 0 ? this._interactiveMinScale : this.minScale;
198
204
  }
199
205
  get _effectiveMaxScale() {
200
- return this.maxScale === 0 ? this.maxScaleLimit : this.maxScale;
206
+ return this.maxScale === 0 ? this._interactiveMaxScale : this.maxScale;
207
+ }
208
+ get _sliderFullRangeMin() {
209
+ return this._mapScaleToSlider(this.minScaleLimit);
210
+ }
211
+ get _sliderFullRangeMax() {
212
+ return this._mapScaleToSlider(this.maxScaleLimit);
201
213
  }
202
214
  _clampScale(e, i) {
203
- return e === "min" ? Math.min(Math.max(i, this._effectiveMaxScale + 1), this.minScaleLimit) : Math.max(Math.min(i, this._effectiveMinScale - 1), this.maxScaleLimit);
215
+ return e === "min" ? Math.min(Math.max(i, this._effectiveMaxScale + 1), this._interactiveMinScale) : Math.max(Math.min(i, this._effectiveMinScale - 1), this._interactiveMaxScale);
204
216
  }
205
217
  _getDropdownLabel(e) {
206
218
  const i = e === "min" ? this._effectiveMinScale : this._effectiveMaxScale, a = Math.floor(this._mapScaleToSlider(i)), t = this.messages.scaleRangeLabels;
207
219
  return t ? t[l[a].id] : "";
208
220
  }
209
221
  _getSpriteSheetFile() {
210
- const e = this.messages._lang.toLowerCase();
211
- if (h.has(e))
212
- return e;
213
222
  if (this.region) {
214
223
  const a = this.region.toLowerCase(), t = `${this.messages._t9nLocale}-${a}`;
215
224
  if (h.has(t))
@@ -218,12 +227,15 @@ class I extends _ {
218
227
  if (s.endsWith(`-${a}`))
219
228
  return s;
220
229
  }
230
+ const e = this.messages._lang.toLowerCase();
231
+ if (h.has(e))
232
+ return e;
221
233
  if (this._portalRegion) {
222
234
  const a = `${this.messages._t9nLocale}-${this._portalRegion}`;
223
235
  if (h.has(a))
224
236
  return a;
225
237
  }
226
- const i = R[this.messages._t9nLocale];
238
+ const i = T[this.messages._t9nLocale];
227
239
  if (i) {
228
240
  const a = `${this.messages._t9nLocale}-${i}`;
229
241
  if (h.has(a))
@@ -242,20 +254,20 @@ class I extends _ {
242
254
  const e = this._sliderRef.value;
243
255
  if (e) {
244
256
  if (this.mode === "max-scale-only") {
245
- const i = Math.max(this._mapSliderToScale(e.values[0]), this.maxScaleLimit);
246
- this.maxScale = i === this.maxScaleLimit ? 0 : i;
257
+ const i = Math.max(this._mapSliderToScale(e.values[0]), this._interactiveMaxScale);
258
+ this.maxScale = i === this._interactiveMaxScale ? 0 : i;
247
259
  } else if (this.mode === "min-scale-only") {
248
- const i = Math.min(this._mapSliderToScale(e.values[0]), this.minScaleLimit);
249
- this.minScale = i === this.minScaleLimit ? 0 : i;
260
+ const i = Math.min(this._mapSliderToScale(e.values[0]), this._interactiveMinScale);
261
+ this.minScale = i === this._interactiveMinScale ? 0 : i;
250
262
  } else {
251
- const i = Math.min(this._mapSliderToScale(e.values[0]), this.minScaleLimit), a = Math.max(this._mapSliderToScale(e.values[1]), this.maxScaleLimit);
252
- this.minScale = i === this.minScaleLimit ? 0 : i, this.maxScale = a === this.maxScaleLimit ? 0 : a;
263
+ const i = Math.min(this._mapSliderToScale(e.values[0]), this._interactiveMinScale), a = Math.max(this._mapSliderToScale(e.values[1]), this._interactiveMaxScale);
264
+ this.minScale = i === this._interactiveMinScale ? 0 : i, this.maxScale = a === this._interactiveMaxScale ? 0 : a;
253
265
  }
254
266
  this._syncLayerScale();
255
267
  }
256
268
  }
257
269
  _mapScaleToSlider(e) {
258
- const i = Math.min(l[0].minScale, Math.max(l[l.length - 1].maxScale, e)), a = l.findIndex((n) => i >= n.maxScale && i <= n.minScale), t = l[a], s = a, c = a + 0.9999;
270
+ const i = Math.min(l[0].minScale, Math.max(l[l.length - 1].maxScale, e)), a = l.findIndex((r) => i >= r.maxScale && i <= r.minScale), t = l[a], s = a, c = a + 0.9999;
259
271
  return t ? s + (i - t.minScale) * (c - s) / (t.maxScale - t.minScale) : 0;
260
272
  }
261
273
  _mapSliderToScale(e) {
@@ -270,21 +282,22 @@ class I extends _ {
270
282
  }
271
283
  _renderScalePreviewPopover() {
272
284
  const e = this._renderScalePreview();
273
- return this.hidePreview || !e ? null : r`<div slot=popover>${e}</div>`;
285
+ return this.hidePreview || !e ? null : o`<div slot=popover>${e}</div>`;
274
286
  }
275
287
  render() {
276
- return r`<div><arcgis-slider class="slider" .disabled=${this.disabled} layout=horizontal .fillPlacement=${this.mode === "max-scale-only" ? "start" : this.mode === "min-scale-only" ? "end" : void 0} .fullRangeMin=${this._mapScaleToSlider(l[0].minScale)} .fullRangeMax=${this._mapScaleToSlider(l[l.length - 1].maxScale)} .max=${this._mapScaleToSlider(this.maxScaleLimit)} .min=${this._mapScaleToSlider(this.minScaleLimit)} .labelFormatter=${(e, i, a) => a(Math.round(this._mapSliderToScale(e)))} .values=${this.mode === "max-scale-only" ? [this._mapScaleToSlider(this._effectiveMaxScale)] : this.mode === "min-scale-only" ? [this._mapScaleToSlider(this._effectiveMinScale)] : [this._mapScaleToSlider(this._effectiveMinScale), this._mapScaleToSlider(this._effectiveMaxScale)]} @arcgisInput=${this._handleSliderThumbDrag} ${w(this._sliderRef)}>${this._renderScalePreviewPopover()}${this.view?.scale != null && this._renderCurrentScaleIndicator(this.view.scale) || ""}</arcgis-slider><div class="scale-menu-button-container" slot=content-end>${this.mode !== "max-scale-only" && !this.hideMinScaleMenu ? [this._renderScaleMenuButtons("min"), this._renderScaleMenuPopover("min")] : r`<div></div>`}${this.mode !== "min-scale-only" && !this.hideMaxScaleMenu && [this._renderScaleMenuButtons("max"), this._renderScaleMenuPopover("max")] || ""}</div></div>`;
288
+ const e = this._mapScaleToSlider(this._interactiveMinScale), i = this._mapScaleToSlider(this._interactiveMaxScale), a = this._sliderFullRangeMin, t = this._sliderFullRangeMax;
289
+ return o`<div><arcgis-slider class="slider" .disabled=${this.disabled} layout=horizontal .fillPlacement=${this.mode === "max-scale-only" ? "start" : this.mode === "min-scale-only" ? "end" : void 0} .fullRangeMin=${a < e ? a : void 0} .fullRangeMax=${t > i ? t : void 0} .max=${i} .min=${e} .labelFormatter=${(s, c, n) => n(Math.round(this._mapSliderToScale(s)))} .values=${this.mode === "max-scale-only" ? [this._mapScaleToSlider(this._effectiveMaxScale)] : this.mode === "min-scale-only" ? [this._mapScaleToSlider(this._effectiveMinScale)] : [this._mapScaleToSlider(this._effectiveMinScale), this._mapScaleToSlider(this._effectiveMaxScale)]} @arcgisInput=${this._handleSliderThumbDrag} ${w(this._sliderRef)}>${this._renderScalePreviewPopover()}${this.view?.scale != null && this._renderCurrentScaleIndicator(this.view.scale) || ""}</arcgis-slider><div class="scale-menu-button-container" slot=content-end>${this.mode !== "max-scale-only" && !this.hideMinScaleMenu ? [this._renderScaleMenuButtons("min"), this._renderScaleMenuPopover("min")] : o`<div></div>`}${this.mode !== "min-scale-only" && !this.hideMaxScaleMenu && [this._renderScaleMenuButtons("max"), this._renderScaleMenuPopover("max")] || ""}</div></div>`;
277
290
  }
278
291
  _renderCurrentScaleIndicator(e) {
279
- const i = this._sliderRef.value, a = i?.fullRangeMax ?? this._mapScaleToSlider(l[l.length - 1].maxScale), t = i?.fullRangeMin ?? this._mapScaleToSlider(l[0].minScale), s = a - t, c = Math.min(100, Math.max(0, (this._mapScaleToSlider(e) - t) / s * 100));
280
- return g("scale-indicator", r`<div class="scale-indicator-container" slot=content-end><div class="scale-indicator-icon" style=${u({
292
+ const i = this._sliderFullRangeMin, t = this._sliderFullRangeMax - i, s = Math.min(100, Math.max(0, (this._mapScaleToSlider(e) - i) / t * 100));
293
+ return p("scale-indicator", o`<div class="scale-indicator-container" slot=content-end><div class="scale-indicator-icon" style=${u({
281
294
  position: "absolute",
282
- left: `${c}%`
295
+ left: `${s}%`
283
296
  })} .title=${`${this.messages.currentScale} 1:${Math.round(e).toLocaleString(this.messages._t9nLocale)}`}><calcite-icon icon=caret-up scale=s></calcite-icon></div></div>`);
284
297
  }
285
298
  _renderCustomScaleValue(e, i) {
286
299
  const a = Math.round(i).toString();
287
- return r`<calcite-list-item .label=${this.messages?.featuredScaleLabels?.custom} .selected=${this._customScaleSelected === e} @calciteListItemSelect=${(t) => {
300
+ return o`<calcite-list-item .label=${this.messages?.featuredScaleLabels?.custom} .selected=${this._customScaleSelected === e} @calciteListItemSelect=${(t) => {
288
301
  const s = t.target.querySelector("calcite-input-number");
289
302
  this._handleCustomScaleInput(e, s?.value ?? ""), this._customScaleSelected = e;
290
303
  }}><calcite-input-number dir=ltr class="scale-menu-input" slot=content-end group-separator inputmode=numeric .max=${l[0].minScale} .min=${l[l.length - 1].maxScale} number-button-type=none .placeholder=${this.messages?.customScaleInputTooltip} prefix-text=1: scale=s step=1 .value=${a} @click=${(t) => t.stopPropagation()} @keydown=${(t) => {
@@ -292,10 +305,10 @@ class I extends _ {
292
305
  }}></calcite-input-number></calcite-list-item>`;
293
306
  }
294
307
  _renderScaleMenuButtons(e) {
295
- return r`<calcite-button .disabled=${this.disabled} class="scale-menu-button" .id=${`scale-menu-button-${e}`} icon-end=chevron-down scale=s .appearance=${this._activeMenu === e ? "outline" : "transparent"}>${this._getDropdownLabel(e)}</calcite-button>`;
308
+ return o`<calcite-button .disabled=${this.disabled} class="scale-menu-button" .id=${`scale-menu-button-${e}`} icon-end=chevron-down scale=s .appearance=${this._activeMenu === e ? "outline" : "transparent"}>${this._getDropdownLabel(e)}</calcite-button>`;
296
309
  }
297
310
  _renderScaleMenuPopover(e) {
298
- return r`<calcite-popover auto-close .label=${`${e === "min" ? "Min" : "Max"} scale menu`} .referenceElement=${`scale-menu-button-${e}`} .placement=${e === "max" ? "bottom-end" : "bottom-start"} .open=${this._activeMenu === e} scale=s @calcitePopoverOpen=${() => this._activeMenu = e} @calcitePopoverClose=${() => {
311
+ return o`<calcite-popover auto-close .label=${`${e === "min" ? "Min" : "Max"} scale menu`} .referenceElement=${`scale-menu-button-${e}`} .placement=${e === "max" ? "bottom-end" : "bottom-start"} .open=${this._activeMenu === e} scale=s @calcitePopoverOpen=${() => this._activeMenu = e} @calcitePopoverClose=${() => {
299
312
  this._activeMenu === e && (this._activeMenu = null);
300
313
  }}>${this._renderScaleMenu(e)}</calcite-popover>`;
301
314
  }
@@ -303,24 +316,24 @@ class I extends _ {
303
316
  const i = Math.floor(this._mapScaleToSlider(this._effectiveMaxScale)), a = Math.floor(this._mapScaleToSlider(this._effectiveMinScale)), t = e === "min" ? this._effectiveMinScale : this._effectiveMaxScale, s = this.messages.featuredScaleLabels;
304
317
  if (!s)
305
318
  return;
306
- const c = Math.floor(this._mapScaleToSlider(this.maxScaleLimit)), m = Math.floor(this._mapScaleToSlider(this.minScaleLimit)), n = l.filter((o, S) => e === "min" ? S < i && S >= m : S > a && S <= c).map((o) => this._renderScaleMenuItem({
307
- scaleLabel: s[o.id],
308
- scaleValue: o.scale,
309
- isSelected: t === o.scale,
310
- valueVisible: o.id !== "world" || this.showWorldValue,
319
+ const c = Math.floor(this._mapScaleToSlider(this._interactiveMaxScale)), n = Math.floor(this._mapScaleToSlider(this._interactiveMinScale)), r = l.filter((m, S) => e === "min" ? S < i && S >= n : S > a && S <= c).map((m) => this._renderScaleMenuItem({
320
+ scaleLabel: s[m.id],
321
+ scaleValue: m.scale,
322
+ isSelected: t === m.scale,
323
+ valueVisible: m.id !== "world" || this.showWorldValue,
311
324
  type: e
312
325
  }));
313
- return r`<calcite-list label="Scale Menu List" scale=s class="scale-menu-list" selection-appearance=icon selection-mode=single-persist>${this.view?.scale != null && this._renderCustomScaleValue(e, t) || ""}${this.view?.scale != null ? this._renderScaleMenuItem({
326
+ return o`<calcite-list label="Scale Menu List" scale=s class="scale-menu-list" selection-appearance=icon selection-mode=single-persist>${this.view?.scale != null && this._renderCustomScaleValue(e, t) || ""}${this.view?.scale != null ? this._renderScaleMenuItem({
314
327
  scaleValue: this.view.scale,
315
328
  scaleLabel: s.current,
316
329
  isSelected: t === this.view.scale,
317
330
  valueVisible: !0,
318
331
  type: e
319
- }) : null}${n}</calcite-list>`;
332
+ }) : null}${r}</calcite-list>`;
320
333
  }
321
334
  _renderScaleMenuItem(e) {
322
335
  const { scaleValue: i, scaleLabel: a, isSelected: t, valueVisible: s } = e, c = i === l[0].scale ? ` ${this.messages.aboveSuffix}` : i === l[l.length - 1].scale ? ` ${this.messages.belowSuffix}` : "";
323
- return r`<calcite-list-item .label=${a} .selected=${t && this._customScaleSelected !== e.type} .description=${s ? `1:${Math.round(i).toLocaleString(this.messages._t9nLocale)}${c}` : void 0} @calciteListItemSelect=${() => {
336
+ return o`<calcite-list-item .label=${a} .selected=${t && this._customScaleSelected !== e.type} .description=${s ? `1:${Math.round(i).toLocaleString(this.messages._t9nLocale)}${c}` : void 0} @calciteListItemSelect=${() => {
324
337
  this._setScale(e.type, i), this._customScaleSelected = null;
325
338
  }}></calcite-list-item>`;
326
339
  }
@@ -328,17 +341,17 @@ class I extends _ {
328
341
  const e = this._sliderRef.value?.activeValue;
329
342
  if (typeof e != "number")
330
343
  return null;
331
- const i = Math.min(l.length - 1, Math.max(0, Math.floor(e))), a = 5, t = 128, s = t * (i % a), c = t * Math.floor(i / a), m = `-${s}px -${c}px`, n = this._getSpriteSheetFile();
332
- return r`<div class="preview-container"><img src=${x(`./assets/slider-scale-range/images/${n}.avif`) ?? v} style=${u({
344
+ const i = Math.min(l.length - 1, Math.max(0, Math.floor(e))), a = 5, t = 128, s = t * (i % a), c = t * Math.floor(i / a), n = `-${s}px -${c}px`, r = this._getSpriteSheetFile();
345
+ return o`<div class="preview-container"><img src=${x(`./assets/slider-scale-range/images/${r}.avif`) ?? M} style=${u({
333
346
  display: "block",
334
347
  height: `${t}px`,
335
348
  width: `${t}px`,
336
- objectPosition: m,
349
+ objectPosition: n,
337
350
  objectFit: "none"
338
351
  })}></div>`;
339
352
  }
340
353
  }
341
- p("arcgis-slider-scale-range", I);
354
+ _("arcgis-slider-scale-range", I);
342
355
  export {
343
356
  I as ArcgisSliderScaleRange
344
357
  };
@@ -5,18 +5,18 @@ import * as C from "@arcgis/core/geometry/operators/cutOperator.js";
5
5
  import * as m from "@arcgis/core/geometry/operators/lengthOperator.js";
6
6
  import * as b from "@arcgis/core/geometry/operators/projectOperator.js";
7
7
  import I from "@arcgis/core/geometry/Polyline.js";
8
- import F from "@arcgis/core/geometry/SpatialReference.js";
9
- import v from "@arcgis/core/Graphic.js";
8
+ import G from "@arcgis/core/geometry/SpatialReference.js";
9
+ import F from "@arcgis/core/Graphic.js";
10
10
  import T from "@arcgis/core/rest/networks/support/TraceLocation.js";
11
- import w from "@arcgis/core/symbols/SimpleMarkerSymbol.js";
12
- import { LitElement as G, createEvent as L } from "@arcgis/lumina";
13
- import { log as u, composeMissingPropertyMessage as f } from "@arcgis/toolkit/log";
11
+ import L from "@arcgis/core/symbols/SimpleMarkerSymbol.js";
12
+ import { LitElement as v, createEvent as w } from "@arcgis/lumina";
13
+ import { log as l, composeMissingPropertyMessage as g } from "@arcgis/toolkit/log";
14
14
  import { u as A } from "../../chunks/useT9n.js";
15
15
  import { d as S, i as P } from "../../chunks/layer-utils.js";
16
16
  const N = x`calcite-block{--calcite-block-content-space: 0;--calcite-block-border-color: transparent;margin:0}.add-location-button{--calcite-button-border-color: var(--calcite-color-border-1);--calcite-button-icon-color: var(--calcite-color-text-1);--calcite-button-text-color: var(--calcite-color-text-1)}.button-container{justify-content:center;display:grid}.clear-button{--calcite-button-border-color: transparent}`;
17
- class R extends G {
17
+ class R extends v {
18
18
  constructor() {
19
- super(...arguments), this.messages = A({ blocking: !0 }), this.isSelectWaiting = !1, this.traceLocationType = "starting-point", this.spatialTolerance = 0.05, this.autoDestroyDisabled = !1, this.arcgisTraceLocationChange = L(), this.arcgisTraceLocationSelectEnd = L(), this.arcgisTraceLocationSelectStart = L();
19
+ super(...arguments), this.messages = A({ blocking: !0 }), this.isSelectWaiting = !1, this.traceLocationType = "starting-point", this.spatialTolerance = 0.05, this.autoDestroyDisabled = !1, this.arcgisTraceLocationChange = w(), this.arcgisTraceLocationSelectEnd = w(), this.arcgisTraceLocationSelectStart = w();
20
20
  }
21
21
  static {
22
22
  this.properties = { isSelectWaiting: 16, beforeTraceLocationSelectStart: 0, afterHitTest: 0, view: 0, traceLocationType: 1, traceLocations: 0, filterLayers: 0, sketchViewModel: 0, spatialTolerance: 9, autoDestroyDisabled: 5, utilityNetwork: 0 };
@@ -35,25 +35,25 @@ class R extends G {
35
35
  hasZ: !1,
36
36
  hasM: !0,
37
37
  paths: e,
38
- spatialReference: new F({ wkid: t })
38
+ spatialReference: new G({ wkid: t })
39
39
  });
40
40
  }
41
41
  _calculatePercentAlong(e, t) {
42
- const r = e.spatialReference, s = this._createPolyline(e.paths, r.wkid), n = t.x - 0.5, a = t.x + 0.5, c = t.y - 0.5, i = t.y + 0.5, o = [
42
+ const r = e.spatialReference, s = this._createPolyline(e.paths, r.wkid), o = t.x - 0.5, a = t.x + 0.5, c = t.y - 0.5, i = t.y + 0.5, u = [
43
43
  [
44
- [n, c],
44
+ [o, c],
45
45
  [a, i]
46
46
  ]
47
- ], l = this._createPolyline(o, t.spatialReference.wkid), p = b.execute(l, r);
47
+ ], n = this._createPolyline(u, t.spatialReference.wkid), p = b.execute(n, r);
48
48
  if (!p)
49
- return u("error", this, "Unable to project flag geometry to source geometry spatial reference."), 0.5;
49
+ return l("error", this, "Unable to project flag geometry to source geometry spatial reference."), -1;
50
50
  const d = C.execute(s, p);
51
51
  if (d.length > 0) {
52
- const g = m.execute(s, { unit: "feet" });
53
- let h;
54
- return d[0].paths[0][0][0] === s.paths[0][0][0] ? h = m.execute(d[0], { unit: "feet" }) : d.length > 1 ? h = m.execute(d[1], { unit: "feet" }) : h = 0, h / g;
52
+ const h = m.execute(s, { unit: "feet" });
53
+ let f;
54
+ return d[0].paths[0][0][0] === s.paths[0][0][0] ? f = m.execute(d[0], { unit: "feet" }) : d.length > 1 ? f = m.execute(d[1], { unit: "feet" }) : f = 0, f / h;
55
55
  }
56
- return u("warn", this, "Unable to cut the source geometry with the flag geometry."), 0.5;
56
+ return l("warn", this, "Unable to cut the source geometry with the flag geometry."), -1;
57
57
  }
58
58
  get _edgeSourceLayerIds() {
59
59
  const e = this.utilityNetwork?.dataElement?.domainNetworks;
@@ -62,7 +62,7 @@ class R extends G {
62
62
  async _handleAddButtonClick() {
63
63
  const { view: e, sketchViewModel: t } = this;
64
64
  if (!(e && t)) {
65
- u("error", this, "Cannot add trace location."), t || u("error", this, f("sketchViewModel")), e || u("error", this, f("view"));
65
+ l("error", this, "Cannot add trace location."), t || l("error", this, g("sketchViewModel")), e || l("error", this, g("view"));
66
66
  return;
67
67
  }
68
68
  if (this.beforeTraceLocationSelectStart) {
@@ -73,10 +73,10 @@ class R extends G {
73
73
  this.isSelectWaiting = !1;
74
74
  }
75
75
  }
76
- this.arcgisTraceLocationSelectStart.emit({ cancelSelect: () => t.cancel() }).defaultPrevented || await this._startSketch(e, t);
76
+ await this._startSketch(e, t);
77
77
  }
78
78
  async _startSketch(e, t) {
79
- this._clickHandler?.remove(), this._clickHandler = t.on("create", (r) => this._handleSketchComplete(r, e, t)), "acquireCursor" in e && e.acquireCursor("crosshair"), t.snappingOptions.enabled = !0, t.create("point");
79
+ this.arcgisTraceLocationSelectStart.emit({ cancelSelect: () => t.cancel() }).defaultPrevented || (this._clickHandler?.remove(), this._clickHandler = t.on("create", (s) => this._handleSketchComplete(s, e, t)), "acquireCursor" in e && e.acquireCursor("crosshair"), t.snappingOptions.enabled = !0, t.create("point"));
80
80
  }
81
81
  _handleSketchComplete(e, t, r) {
82
82
  if (e.state === "complete" && e.graphic) {
@@ -88,104 +88,87 @@ class R extends G {
88
88
  async _performHitTest(e, t, r) {
89
89
  const { utilityNetwork: s } = this;
90
90
  if (!s) {
91
- u("error", this, f("utilityNetwork")), this._resetCursor(), this.arcgisTraceLocationSelectEnd.emit();
91
+ l("error", this, g("utilityNetwork")), this._resetCursor(), this.arcgisTraceLocationSelectEnd.emit();
92
92
  return;
93
93
  }
94
- const n = e.graphic?.geometry, a = t.toScreen(n);
94
+ const o = e.graphic?.geometry, a = t.toScreen(o);
95
95
  if (!a) {
96
- u("warn", this, "No screen point available for hit test."), this._startSketch(t, r);
96
+ l("warn", this, "No screen point available for hit test."), this._startSketch(t, r);
97
97
  return;
98
98
  }
99
99
  const i = (await t.hitTest(a, {
100
100
  include: this.filterLayers
101
- })).results.filter((o) => o.type === "graphic" && o?.layer && o.graphic);
101
+ })).results.filter((n) => n.type === "graphic" && n?.layer && n.graphic);
102
102
  if (i.length === 0) {
103
- u("info", this, "No usable hit test results found."), this._startSketch(t, r);
103
+ l("info", this, "No usable hit test results found."), this._startSketch(t, r);
104
104
  return;
105
105
  }
106
- this._resetCursor(), await this._processHitTestResults(i, n, t), this.arcgisTraceLocationSelectEnd.emit();
106
+ this._resetCursor(), await this._processHitTestResults(i, o, t) ? this.arcgisTraceLocationSelectEnd.emit() : this._startSketch(t, r);
107
107
  }
108
108
  _resetCursor() {
109
109
  const { view: e, sketchViewModel: t } = this;
110
110
  if (!e) {
111
- u("error", this, f("view"));
111
+ l("error", this, g("view"));
112
112
  return;
113
113
  }
114
114
  t && (t.snappingOptions.enabled = !1), this._clickHandler?.remove(), this._clickHandler = void 0, "acquireCursor" in e && e.acquireCursor("default");
115
115
  }
116
116
  async _processHitTestResults(e, t, r) {
117
- if (e.length === 0) {
118
- u("error", this, "There are no hit test results to process.");
119
- return;
120
- }
121
- const s = e[0], n = e.map((i) => {
122
- const o = i, l = o.graphic;
123
- return l.origin = o.layer, l.sourceLayer = o.layer, l;
117
+ if (e.length === 0)
118
+ return l("error", this, "There are no hit test results to process."), !1;
119
+ const s = e[0], o = e.map((u) => {
120
+ const n = u, p = n.graphic;
121
+ return p.origin = n.layer, p.sourceLayer = n.layer, p;
124
122
  });
125
123
  let a = s.graphic;
126
124
  if (this.afterHitTest)
127
125
  try {
128
- a = await this.afterHitTest(n);
126
+ a = await this.afterHitTest(o);
129
127
  } catch {
130
128
  a = null;
131
129
  }
132
- if (!a) {
133
- u("error", this, "No graphic available from hit test results."), this.arcgisTraceLocationSelectEnd.emit();
134
- return;
135
- }
130
+ if (!a)
131
+ return l("error", this, "No graphic available from hit test results."), this.arcgisTraceLocationSelectEnd.emit(), !0;
136
132
  const c = await this._ensureNecessaryAttributes(a);
137
- if (!c) {
138
- u("error", this, "Unable to ensure necessary attributes on the selected graphic."), this.arcgisTraceLocationSelectEnd.emit();
139
- return;
140
- }
141
- await this._generateTraceLocation(c, t, r);
133
+ return c ? await this._generateTraceLocation(c, t, r) : (l("error", this, "Unable to ensure necessary attributes on the selected graphic."), this.arcgisTraceLocationSelectEnd.emit(), !0);
142
134
  }
143
135
  async _ensureNecessaryAttributes(e) {
144
- const t = (S(e.layer), e.layer), r = t.geometryType === null, s = t.fieldsIndex?.get("assetgroup") ?? !1, n = t.fieldsIndex?.get("assetgroup")?.name ?? "assetgroup", a = t.fieldsIndex?.get("assettype") ?? !1, c = t.fieldsIndex?.get("assettype")?.name ?? "assettype", i = e.getGlobalId(), o = e.getObjectId(), l = s ? !!e.getAttribute(n) : !0, p = a ? !!e.getAttribute(c) : !0, d = !!e.geometry;
145
- if (i && o && l && p && (d || r))
136
+ const t = (S(e.layer), e.layer), r = t.geometryType === null, s = t.fieldsIndex?.get("assetgroup") ?? !1, o = t.fieldsIndex?.get("assetgroup")?.name ?? "assetgroup", a = t.fieldsIndex?.get("assettype") ?? !1, c = t.fieldsIndex?.get("assettype")?.name ?? "assettype", i = e.getGlobalId(), u = e.getObjectId(), n = s ? !!e.getAttribute(o) : !0, p = a ? !!e.getAttribute(c) : !0, d = !!e.geometry;
137
+ if (i && u && n && p && (d || r))
146
138
  return e;
147
- const g = t.createQuery();
148
- return g.objectIds = [o], (await t.queryFeatures(g))?.features[0] || null;
139
+ const h = t.createQuery();
140
+ return h.objectIds = [u], (await t.queryFeatures(h))?.features[0] || null;
149
141
  }
150
142
  async _generateTraceLocation(e, t, r) {
151
- const { traceLocations: s } = this, n = e.getGlobalId() ?? "", a = e.geometry?.type, c = await this._generateFlagInfo(e, t);
152
- if (!c) {
153
- u("error", this, "Unable to generate flag info for trace location.");
154
- return;
155
- }
156
- const i = s?.filter((l) => l.spatialProperties.mapGraphic?.getGlobalId() === n) ?? [];
143
+ const { traceLocations: s } = this, o = e.getGlobalId() ?? "", a = e.geometry?.type, c = await this._generateFlagInfo(e, t);
144
+ if (!c)
145
+ return l("error", this, "Unable to generate flag info for trace location."), !1;
146
+ const i = s?.filter((n) => n.spatialProperties.mapGraphic?.getGlobalId() === o) ?? [];
157
147
  if (i.length > 0) {
158
- if (a !== "polyline") {
159
- u("warn", this, "A flag with the same globalId already exists.");
160
- return;
161
- } else if (i.some((l) => Math.abs(l.traceLocation.percentAlong - c.traceLocation.percentAlong) <= this.spatialTolerance)) {
162
- u("warn", this, "A flag with the same globalId already exists within tolerance.");
163
- return;
164
- }
148
+ if (a !== "polyline")
149
+ return l("warn", this, "A flag with the same globalId already exists."), !1;
150
+ if (i.some((n) => Math.abs(n.traceLocation.percentAlong - c.traceLocation.percentAlong) <= this.spatialTolerance))
151
+ return l("warn", this, "A flag with the same globalId already exists within tolerance."), !1;
165
152
  }
166
- const o = this._addFlagGraphic(e, t, r);
167
- if (!o) {
168
- u("warn", this, "Unable to add flag graphic.");
169
- return;
170
- }
171
- c.spatialProperties.flagGraphic = o, s?.add(c);
153
+ const u = this._addFlagGraphic(e, t, r);
154
+ return u ? (c.spatialProperties.flagGraphic = u, s?.add(c), !0) : (l("warn", this, "Unable to add flag graphic."), !1);
172
155
  }
173
156
  async _generateFlagInfo(e, t) {
174
- const { traceLocationType: r, utilityNetwork: s } = this, n = e.getGlobalId() ?? "", a = e.geometry?.type, c = await this._generateItemTitle(e);
157
+ const { traceLocationType: r, utilityNetwork: s } = this, o = e.getGlobalId() ?? "", a = e.geometry?.type, c = await this._generateItemTitle(e);
175
158
  if (a === "point" || a === "polygon") {
176
- const i = s?.getTerminalConfiguration(e), o = i ? i.terminals[0].id : 1;
159
+ const i = s?.getTerminalConfiguration(e), u = i ? i.terminals[0].id : 1;
177
160
  return {
178
161
  traceLocation: new T({
179
162
  type: r,
180
163
  isFilterBarrier: !1,
181
- globalId: n,
182
- terminalId: o
164
+ globalId: o,
165
+ terminalId: u
183
166
  }),
184
167
  flagProperties: {
185
168
  title: c,
186
169
  expanded: !1,
187
170
  terminalConfiguration: i ?? void 0,
188
- selectedTerminals: i ? /* @__PURE__ */ new Set([o]) : void 0
171
+ selectedTerminals: i ? /* @__PURE__ */ new Set([u]) : void 0
189
172
  },
190
173
  spatialProperties: {
191
174
  mapPoint: t,
@@ -194,11 +177,11 @@ class R extends G {
194
177
  };
195
178
  } else if (a === "polyline") {
196
179
  const i = this._calculatePercentAlong(e.geometry, t);
197
- return {
180
+ return i < 0 ? (l("warn", this, "Unable to calculate percent along for polyline flag."), null) : {
198
181
  traceLocation: new T({
199
182
  type: r,
200
183
  isFilterBarrier: !1,
201
- globalId: n,
184
+ globalId: o,
202
185
  percentAlong: i
203
186
  }),
204
187
  flagProperties: {
@@ -213,20 +196,20 @@ class R extends G {
213
196
  }
214
197
  };
215
198
  } else if (!a) {
216
- const i = P(e.layer) ? e.layer.parent : e.layer, o = i && this._edgeSourceLayerIds.includes(i.layerId), l = s?.getTerminalConfiguration(e), p = l ? l.terminals[0].id : o ? -1 : 1, d = o ? 0.5 : -1;
199
+ const i = P(e.layer) ? e.layer.parent : e.layer, u = i && this._edgeSourceLayerIds.includes(i.layerId), n = s?.getTerminalConfiguration(e), p = n ? n.terminals[0].id : u ? -1 : 1, d = u ? 0.5 : -1;
217
200
  return {
218
201
  traceLocation: new T({
219
202
  type: r,
220
203
  isFilterBarrier: !1,
221
- globalId: n,
204
+ globalId: o,
222
205
  terminalId: p,
223
206
  percentAlong: d
224
207
  }),
225
208
  flagProperties: {
226
209
  title: c,
227
210
  expanded: !1,
228
- terminalConfiguration: l ?? void 0,
229
- selectedTerminals: l ? /* @__PURE__ */ new Set([p]) : void 0
211
+ terminalConfiguration: n ?? void 0,
212
+ selectedTerminals: n ? /* @__PURE__ */ new Set([p]) : void 0
230
213
  },
231
214
  spatialProperties: {
232
215
  mapPoint: t,
@@ -241,16 +224,16 @@ class R extends G {
241
224
  return ("getFeatureTitle" in r ? await r.getFeatureTitle(e) : null) || e?.getObjectId()?.toString() || t.labels.unknown;
242
225
  }
243
226
  _addFlagGraphic(e, t, r) {
244
- const s = e.geometry ? e.geometry.type === "point" ? e.geometry : t : null, n = this._createFlagSymbol(), a = new v({
227
+ const s = e.geometry ? e.geometry.type === "point" ? e.geometry : t : null, o = this._createFlagSymbol(), a = new F({
245
228
  geometry: s,
246
- symbol: n,
229
+ symbol: o,
247
230
  attributes: e.attributes
248
231
  });
249
232
  return r.graphics.add(a), a;
250
233
  }
251
234
  _createFlagSymbol() {
252
235
  const { traceLocationType: e } = this, t = [244, 21, 21, 0.6], r = [21, 244, 21, 0.6];
253
- return e === "stopping-point" ? new w({
236
+ return e === "stopping-point" ? new L({
254
237
  color: t,
255
238
  style: "x",
256
239
  size: 12,
@@ -258,7 +241,7 @@ class R extends G {
258
241
  color: t,
259
242
  width: 2
260
243
  }
261
- }) : e === "barrier" ? new w({
244
+ }) : e === "barrier" ? new L({
262
245
  color: t,
263
246
  style: "square",
264
247
  size: 12,
@@ -266,7 +249,7 @@ class R extends G {
266
249
  color: t,
267
250
  width: 0
268
251
  }
269
- }) : new w({
252
+ }) : new L({
270
253
  color: r,
271
254
  style: "circle",
272
255
  size: 12,
@@ -283,7 +266,7 @@ class R extends G {
283
266
  }), t?.removeAll();
284
267
  }
285
268
  renderAddLocationBlock() {
286
- const { traceLocationType: e, messages: t, traceLocations: r, view: s } = this, n = e === "starting-point" ? t.types.startingPoint : e === "barrier" ? t.types.barrier : t.types.stoppingPoint, a = n.heading, c = n.description, i = n.buttonText;
269
+ const { traceLocationType: e, messages: t, traceLocations: r, view: s } = this, o = e === "starting-point" ? t.types.startingPoint : e === "barrier" ? t.types.barrier : t.types.stoppingPoint, a = o.heading, c = o.description, i = o.buttonText;
287
270
  return y`<calcite-block .heading=${a} .label=${a} expanded .description=${c}>${r?.length ? y`<calcite-button class="clear-button" slot=actions-end appearance=transparent .label=${t.buttons.clear} @click=${() => this._handleClearButtonClick()}>${t.buttons.clear}</calcite-button><arcgis-utility-network-trace-location-list .traceLocations=${r} .traceLocationType=${e} .view=${s}></arcgis-utility-network-trace-location-list>` : null}<div class="button-container"><calcite-button .loading=${this.isSelectWaiting} class="add-location-button" icon-start=select appearance=outline .label=${i} @click=${() => this._handleAddButtonClick()}>${i}</calcite-button></div></calcite-block>`;
288
271
  }
289
272
  render() {