@vcmap/viewshed 3.0.1 → 3.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,13 +1,13 @@
1
1
  var Oe = Object.defineProperty;
2
2
  var Ie = (i, t, o) => t in i ? Oe(i, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : i[t] = o;
3
3
  var de = (i, t, o) => Ie(i, typeof t != "symbol" ? t + "" : t, o);
4
- import { VcsCameraPrimitive as Pe, VcsObject as Ae, VcsEvent as Y, AbstractInteraction as Re, EventType as K, Projection as H, SessionType as Ne, CesiumMap as G, startEditFeaturesSession as De, startEditGeometrySession as xe, VectorLayer as ke, wgs84Projection as Le, maxZIndex as Fe, markVolatile as je, Viewpoint as We, TransformationMode as Be, Category as Ue, moduleIdSymbol as $e } from "../../../assets/core.js";
5
- import { Color as Z, Matrix4 as He, Transforms as ze, Primitive as ce, GeometryInstance as ue, SphereGeometry as Ge, ColorGeometryInstanceAttribute as he, PerInstanceColorAppearance as fe, SphereOutlineGeometry as Ke, Math as k, Cartesian3 as W, ShadowMap as Ye, Camera as Xe, HeightReference as Je } from "../../../assets/cesium.js";
6
- import { shallowRef as te, ref as U, nextTick as Ze, inject as me, computed as ve, reactive as q, watchEffect as qe, watch as z, onMounted as Qe, onUnmounted as et, resolveComponent as b, openBlock as M, createElementBlock as B, createBlock as D, withCtx as f, createTextVNode as F, toDisplayString as A, createCommentVNode as $, createVNode as m, createElementVNode as tt, Fragment as pe, renderList as we, mergeProps as it } from "../../../assets/vue.js";
4
+ import { VcsCameraPrimitive as Pe, VcsObject as Ae, VcsEvent as X, AbstractInteraction as Re, EventType as Y, Projection as z, SessionType as Ne, CesiumMap as $, startEditFeaturesSession as De, startEditGeometrySession as xe, VectorLayer as ke, wgs84Projection as Le, maxZIndex as Fe, markVolatile as je, Viewpoint as We, TransformationMode as Be, Category as Ue, moduleIdSymbol as $e } from "../../../assets/core.js";
5
+ import { Color as Q, Matrix4 as He, Transforms as ze, Primitive as ce, GeometryInstance as ue, SphereGeometry as Ge, ColorGeometryInstanceAttribute as he, PerInstanceColorAppearance as fe, SphereOutlineGeometry as Ke, Math as x, Cartesian3 as W, ShadowMap as Ye, Camera as Xe, HeightReference as Je } from "../../../assets/cesium.js";
6
+ import { shallowRef as Z, ref as U, nextTick as Ze, inject as me, computed as ve, reactive as ee, watchEffect as qe, watch as G, onMounted as Qe, onUnmounted as et, resolveComponent as b, openBlock as M, createElementBlock as B, createBlock as N, withCtx as h, createTextVNode as F, toDisplayString as A, createCommentVNode as H, createVNode as p, createElementVNode as tt, Fragment as pe, renderList as we, mergeProps as it } from "../../../assets/vue.js";
7
7
  import { ol$Observable$unByKey as ot, Feature as st, ol$geom$Point as nt, ol$style$Style as at } from "../../../assets/ol.js";
8
- import { VcsTextField as rt, VcsSlider as lt, VcsLabel as _e, VcsFormSection as Ce, VcsSelect as Ee, VcsFormButton as dt, VcsFeatureTransforms as ct, VcsHelp as ut, makeEditorCollectionComponentClass as ht, WindowSlot as ft, ToolboxType as mt, createSupportedMapMappingFunction as vt, createListExportAction as pt, downloadText as wt, createListImportAction as gt, NotificationType as X, AbstractConfigEditor as _t } from "../../../assets/ui.js";
8
+ import { VcsTextField as rt, VcsSlider as lt, VcsLabel as _e, VcsFormSection as Ce, VcsSelect as Ee, VcsFormButton as dt, VcsFeatureTransforms as ct, VcsHelp as ut, makeEditorCollectionComponentClass as ht, WindowSlot as ft, ToolboxType as mt, createSupportedMapMappingFunction as vt, createListExportAction as pt, downloadText as wt, createListImportAction as gt, NotificationType as J, AbstractConfigEditor as _t } from "../../../assets/ui.js";
9
9
  import { VContainer as ye, VRow as Ve, VCol as be, VDivider as Ct, VColorPicker as Et } from "../../../assets/vuetify.js";
10
- const Me = Symbol("isMatcher"), yt = Symbol("Integer"), Vt = Symbol("NonEmptyString"), ae = /* @__PURE__ */ new Map();
10
+ const Me = Symbol("isMatcher"), yt = Symbol("Integer"), Vt = Symbol("NonEmptyString"), re = /* @__PURE__ */ new Map();
11
11
  [
12
12
  [String, "string"],
13
13
  [Number, "number"],
@@ -16,12 +16,12 @@ const Me = Symbol("isMatcher"), yt = Symbol("Integer"), Vt = Symbol("NonEmptyStr
16
16
  [void 0, "undefined"],
17
17
  [Symbol, "symbol"]
18
18
  ].forEach(([i, t]) => {
19
- ae.set(i, t);
19
+ re.set(i, t);
20
20
  });
21
21
  function bt(i) {
22
22
  return i == null ? void 0 : i[Me];
23
23
  }
24
- function ie(i) {
24
+ function oe(i) {
25
25
  if (!i || String(i) !== "[object Object]")
26
26
  return !1;
27
27
  const t = Object.getPrototypeOf(i);
@@ -63,16 +63,16 @@ function Tt(i, t, o) {
63
63
  }
64
64
  return null;
65
65
  }
66
- function oe(i, t, o, e) {
66
+ function se(i, t, o, e) {
67
67
  const s = e ? `${e}.` : "";
68
- if (!ie(i))
68
+ if (!oe(i))
69
69
  return `Expected ${R(i)} to be a plain Object`;
70
70
  let d = !1;
71
- const l = Object.keys(t).find((c) => {
72
- const C = i[c];
73
- return ie(t[c]) ? d = oe(C, t[c], o, s + c) : d = o(C, t[c]), d;
71
+ const r = Object.keys(t).find((l) => {
72
+ const _ = i[l];
73
+ return oe(t[l]) ? d = se(_, t[l], o, s + l) : d = o(_, t[l]), d;
74
74
  });
75
- return l ? `${String(d)} in object.${s}${l}` : !1;
75
+ return r ? `${String(d)} in object.${s}${r}` : !1;
76
76
  }
77
77
  function St(i, t) {
78
78
  if (t === Number)
@@ -81,13 +81,13 @@ function St(i, t) {
81
81
  return Number.isInteger(i) ? !1 : `expected ${R(i)} to be an integer number`;
82
82
  if (t === Vt)
83
83
  return typeof i == "string" && i.length > 0 ? !1 : `expected ${R(i)} to be a non-empty string`;
84
- const o = ae.get(t);
84
+ const o = re.get(t);
85
85
  return o ? typeof i === o ? !1 : `expected ${R(i)} to be a ${String(o)}` : null;
86
86
  }
87
87
  function Te(i) {
88
88
  if (i === null)
89
89
  return "null";
90
- const t = ae.get(i);
90
+ const t = re.get(i);
91
91
  if (t)
92
92
  return t;
93
93
  const o = i == null ? void 0 : i.className;
@@ -99,7 +99,7 @@ function Te(i) {
99
99
  const n = i == null ? void 0 : i.name;
100
100
  return n || s[1].substring(0, 20);
101
101
  }
102
- if (ie(i)) {
102
+ if (oe(i)) {
103
103
  const n = {};
104
104
  Object.keys(i).forEach((d) => {
105
105
  n[d] = Te(i[d]);
@@ -127,25 +127,25 @@ function Ot(i, t) {
127
127
  if (Array.isArray(s))
128
128
  return Tt(e, s, o);
129
129
  if (s === Object)
130
- return oe(e, {}, o);
130
+ return se(e, {}, o);
131
131
  if (s instanceof Function)
132
132
  return e instanceof s ? !1 : `Expected ${R(e, !0)} to be of Type ${Te(s)}`;
133
133
  if (typeof s == "object") {
134
- const l = oe(e, s, o);
135
- return l || !1;
134
+ const r = se(e, s, o);
135
+ return r || !1;
136
136
  }
137
137
  throw new Error(`Cannot handle pattern ${String(s)}`);
138
138
  };
139
139
  return o(i, t);
140
140
  }
141
141
  let It = Error;
142
- function re(i, t) {
142
+ function le(i, t) {
143
143
  const o = Ot(i, t);
144
144
  if (o)
145
145
  throw new It(`Match failed: ${o}`);
146
146
  }
147
147
  function Pt(i) {
148
- re(i, Object);
148
+ le(i, Object);
149
149
  const t = Object.values(i), o = (e) => t.includes(e) ? !1 : `expected ${R(e)} to be of enum: ${t.join(", ")}`;
150
150
  return o[Me] = !0, o;
151
151
  }
@@ -157,7 +157,7 @@ function At(i, t, o) {
157
157
  }
158
158
  return o;
159
159
  }
160
- const Rt = new Z(), Q = new He();
160
+ const Rt = new Q(), te = new He();
161
161
  class Nt extends Pe {
162
162
  constructor(t) {
163
163
  super(t), this.spot = t.spot;
@@ -175,7 +175,7 @@ class Nt extends Pe {
175
175
  o.length === 0 && (ze.eastNorthUpToFixedFrame(
176
176
  this._camera.positionWC,
177
177
  void 0,
178
- Q
178
+ te
179
179
  ), o[0] = new ce({
180
180
  allowPicking: this.allowPicking,
181
181
  geometryInstances: new ue({
@@ -184,10 +184,10 @@ class Nt extends Pe {
184
184
  }),
185
185
  attributes: {
186
186
  color: he.fromColor(
187
- Z.fromAlpha(this._color, 0.1, Rt)
187
+ Q.fromAlpha(this._color, 0.1, Rt)
188
188
  )
189
189
  },
190
- modelMatrix: Q
190
+ modelMatrix: te
191
191
  }),
192
192
  appearance: new fe({
193
193
  translucent: !0,
@@ -203,7 +203,7 @@ class Nt extends Pe {
203
203
  attributes: {
204
204
  color: he.fromColor(this._color)
205
205
  },
206
- modelMatrix: Q
206
+ modelMatrix: te
207
207
  }),
208
208
  appearance: new fe({
209
209
  translucent: !1,
@@ -217,7 +217,7 @@ class Nt extends Pe {
217
217
  }
218
218
  }
219
219
  }
220
- const p = {
220
+ const w = {
221
221
  CONE: "cone",
222
222
  THREESIXTY: "360"
223
223
  };
@@ -239,7 +239,7 @@ const I = class I extends Ae {
239
239
  static getDefaultOptions() {
240
240
  return {
241
241
  frustum: {
242
- fov: k.PI / 3,
242
+ fov: x.PI / 3,
243
243
  near: 1,
244
244
  aspectRatio: 1,
245
245
  far: 300
@@ -258,7 +258,7 @@ const I = class I extends Ae {
258
258
  * @param {ViewshedOptions} options The options for the viewshed.
259
259
  */
260
260
  constructor(t) {
261
- var o, e, s, n, d, l;
261
+ var o, e, s, n, d, r;
262
262
  super(t), this._cesiumMap = null, this._shadowCamera = null, this._scene = null, this._frustumOptions = {
263
263
  fov: ((o = t.frustumOptions) == null ? void 0 : o.fov) || I.getDefaultOptions().frustum.fov,
264
264
  far: ((e = t.frustumOptions) == null ? void 0 : e.far) || I.getDefaultOptions().frustum.far,
@@ -266,21 +266,21 @@ const I = class I extends Ae {
266
266
  aspectRatio: ((n = t.frustumOptions) == null ? void 0 : n.aspectRatio) || I.getDefaultOptions().frustum.aspectRatio
267
267
  }, this._headingPitchRollValues = t.orientation || {
268
268
  ...I.getDefaultOptions().orientation
269
- }, this._position = t.position || I.getDefaultOptions().position, this._viewshedType = At(t.viewshedType, p), this._colors = {
270
- visibleColor: Z.fromCssColorString(
269
+ }, this._position = t.position || I.getDefaultOptions().position, this._viewshedType = At(t.viewshedType, w), this._colors = {
270
+ visibleColor: Q.fromCssColorString(
271
271
  ((d = t.colorOptions) == null ? void 0 : d.visibleColor) || I.getDefaultOptions().visibleColor
272
272
  ),
273
- shadowColor: Z.fromCssColorString(
274
- ((l = t.colorOptions) == null ? void 0 : l.shadowColor) || I.getDefaultOptions().shadowColor
273
+ shadowColor: Q.fromCssColorString(
274
+ ((r = t.colorOptions) == null ? void 0 : r.shadowColor) || I.getDefaultOptions().shadowColor
275
275
  )
276
- }, this._heightOffset = t.heightOffset || 0, this._shadowMap = null, this._primitive = null, this._showPrimitive = !!t.showPrimitive, this._positionChanged = new Y(), this._active = !1;
276
+ }, this._heightOffset = t.heightOffset || 0, this._shadowMap = null, this._primitive = null, this._showPrimitive = !!t.showPrimitive, this._positionChanged = new X(), this._active = !1;
277
277
  }
278
278
  /**
279
279
  * Sets a new position for the shadow map. If no shadow map was created yet, due to missing position, this method triggers the creation of a shadow map.
280
280
  * @param {import("ol/coordinate").Coordinate} coords The new positions coordinates in degrees
281
281
  */
282
282
  set position(t) {
283
- re(t, [Number]), this._position = t, this._shadowCamera && (this._shadowCamera.position = W.fromDegrees(
283
+ le(t, [Number]), this._position = t, this._shadowCamera && (this._shadowCamera.position = W.fromDegrees(
284
284
  t[0],
285
285
  t[1],
286
286
  t[2] + this._heightOffset
@@ -322,7 +322,7 @@ const I = class I extends Ae {
322
322
  * @param {number} value The distance in meters.
323
323
  */
324
324
  set distance(t) {
325
- this._frustumOptions.far = t > I.MIN_DISTANCE ? t : I.MIN_DISTANCE, this._shadowCamera && (this._shadowCamera.frustum.far = this._frustumOptions.far, this._viewshedType === p.THREESIXTY && this._updateShadowMap(), this._viewshedType === p.CONE && this._updatePrimitive());
325
+ this._frustumOptions.far = t > I.MIN_DISTANCE ? t : I.MIN_DISTANCE, this._shadowCamera && (this._shadowCamera.frustum.far = this._frustumOptions.far, this._viewshedType === w.THREESIXTY && this._updateShadowMap(), this._viewshedType === w.CONE && this._updatePrimitive());
326
326
  }
327
327
  /**
328
328
  * Returns the reach of the viewshed.
@@ -336,43 +336,43 @@ const I = class I extends Ae {
336
336
  * @param {number} value The field of view in degrees.
337
337
  */
338
338
  set fov(t) {
339
- this._frustumOptions.fov = t * k.RADIANS_PER_DEGREE, this._shadowCamera && (this._shadowCamera.frustum.fov = t * k.RADIANS_PER_DEGREE, this._viewshedType === p.CONE && (this._updateShadowMap(), this._updatePrimitive()));
339
+ this._frustumOptions.fov = t * x.RADIANS_PER_DEGREE, this._shadowCamera && (this._shadowCamera.frustum.fov = t * x.RADIANS_PER_DEGREE, this._viewshedType === w.CONE && (this._updateShadowMap(), this._updatePrimitive()));
340
340
  }
341
341
  /**
342
342
  * Returns the field of view.
343
343
  * @returns {number} The field of view in degrees.
344
344
  */
345
345
  get fov() {
346
- return this._frustumOptions.fov * k.DEGREES_PER_RADIAN;
346
+ return this._frustumOptions.fov * x.DEGREES_PER_RADIAN;
347
347
  }
348
348
  /**
349
349
  * Sets the heading of a cone viewshed. Does not have impact on 360 viewshed.
350
350
  * @param {number} value Heading in degrees.
351
351
  */
352
352
  set heading(t) {
353
- this._headingPitchRollValues.heading = t * k.RADIANS_PER_DEGREE, this._shadowCamera && (this._shadowCamera.setView({
353
+ this._headingPitchRollValues.heading = t * x.RADIANS_PER_DEGREE, this._shadowCamera && (this._shadowCamera.setView({
354
354
  orientation: {
355
- heading: t * k.RADIANS_PER_DEGREE,
355
+ heading: t * x.RADIANS_PER_DEGREE,
356
356
  pitch: this._shadowCamera.pitch,
357
357
  roll: 0
358
358
  }
359
- }), this._viewshedType === p.CONE && this._updatePrimitive());
359
+ }), this._viewshedType === w.CONE && this._updatePrimitive());
360
360
  }
361
361
  /**
362
362
  * Getter for the heading of a cone viewshed.
363
363
  * @returns {number} The heading in degress.
364
364
  */
365
365
  get heading() {
366
- return this._headingPitchRollValues.heading * k.DEGREES_PER_RADIAN;
366
+ return this._headingPitchRollValues.heading * x.DEGREES_PER_RADIAN;
367
367
  }
368
368
  /**
369
369
  * Sets the pitch of a cone viewshed. 0 is horizontal. Does not have impact on 360 viewshed.
370
370
  * @param {number} value The pitch in degrees.
371
371
  */
372
372
  set pitch(t) {
373
- if (this._headingPitchRollValues.pitch = t * k.RADIANS_PER_DEGREE, this._shadowCamera) {
374
- const o = t * k.RADIANS_PER_DEGREE - this._shadowCamera.pitch;
375
- this._shadowCamera.lookUp(o), this._viewshedType === p.CONE && this._updatePrimitive();
373
+ if (this._headingPitchRollValues.pitch = t * x.RADIANS_PER_DEGREE, this._shadowCamera) {
374
+ const o = t * x.RADIANS_PER_DEGREE - this._shadowCamera.pitch;
375
+ this._shadowCamera.lookUp(o), this._viewshedType === w.CONE && this._updatePrimitive();
376
376
  }
377
377
  }
378
378
  /**
@@ -380,7 +380,7 @@ const I = class I extends Ae {
380
380
  * @returns {number} The pitch in degrees.
381
381
  */
382
382
  get pitch() {
383
- return this._headingPitchRollValues.pitch * k.DEGREES_PER_RADIAN;
383
+ return this._headingPitchRollValues.pitch * x.DEGREES_PER_RADIAN;
384
384
  }
385
385
  /**
386
386
  * Sets whether the primitive of the viewshed should be shown or not.
@@ -441,7 +441,7 @@ const I = class I extends Ae {
441
441
  context: this._scene.context,
442
442
  lightCamera: this._shadowCamera,
443
443
  enabled: !0,
444
- isPointLight: this._viewshedType === p.THREESIXTY,
444
+ isPointLight: this._viewshedType === w.THREESIXTY,
445
445
  softShadows: !0,
446
446
  fromLightSource: !0,
447
447
  cascadesEnabled: !1,
@@ -458,7 +458,7 @@ const I = class I extends Ae {
458
458
  this._showPrimitive && this._active && this._scene ? (this._removePrimitive(), this._primitive = new Nt({
459
459
  camera: this._shadowCamera,
460
460
  allowPicking: !1,
461
- spot: this._viewshedType === p.CONE
461
+ spot: this._viewshedType === w.CONE
462
462
  }), this._scene.primitives.add(this._primitive)) : this._removePrimitive();
463
463
  }
464
464
  /**
@@ -469,7 +469,7 @@ const I = class I extends Ae {
469
469
  if (!this._shadowCamera)
470
470
  return;
471
471
  const o = W.fromDegrees(t[0], t[1], t[2]);
472
- if (this.distance = W.distance(this._shadowCamera.position, o), this.type === p.CONE && !o.equals(this._shadowCamera.position)) {
472
+ if (this.distance = W.distance(this._shadowCamera.position, o), this.type === w.CONE && !o.equals(this._shadowCamera.position)) {
473
473
  const e = new W();
474
474
  W.subtract(o, this._shadowCamera.position, o), W.normalize(o, o), W.normalize(this._shadowCamera.position, e), this._shadowCamera.setView({
475
475
  orientation: {
@@ -509,14 +509,14 @@ const I = class I extends Ae {
509
509
  }
510
510
  };
511
511
  de(I, "MIN_DISTANCE", 10);
512
- let x = I;
512
+ let D = I;
513
513
  class xt extends Re {
514
514
  /**
515
515
  *
516
516
  * @param {import("./viewshed").default} viewshed
517
517
  */
518
518
  constructor(t) {
519
- super(K.CLICKMOVE), this._viewshed = t, this._positioned = new Y(), this._finished = new Y(), this._position = !1, this.setActive();
519
+ super(Y.CLICKMOVE), this._viewshed = t, this._positioned = new X(), this._finished = new X(), this._position = !1, this.setActive();
520
520
  }
521
521
  get finished() {
522
522
  return this._finished;
@@ -525,7 +525,7 @@ class xt extends Re {
525
525
  return this._positioned;
526
526
  }
527
527
  async pipe(t) {
528
- return t.position && (this._position ? (this._viewshed.lookAt(H.mercatorToWgs84(t.position)), t.type & K.CLICK && (this.setActive(!1), this._finished.raiseEvent(null))) : (this._viewshed.position = H.mercatorToWgs84(t.position), t.type & K.CLICK && (this._position = !0, this._positioned.raiseEvent(null)))), t;
528
+ return t.position && (this._position ? (this._viewshed.lookAt(z.mercatorToWgs84(t.position)), t.type & Y.CLICK && (this.setActive(!1), this._finished.raiseEvent(null))) : (this._viewshed.position = z.mercatorToWgs84(t.position), t.type & Y.CLICK && (this._position = !0, this._positioned.raiseEvent(null)))), t;
529
529
  }
530
530
  destroy() {
531
531
  super.destroy(), this._finished.destroy(), this._positioned.destroy();
@@ -534,7 +534,7 @@ class xt extends Re {
534
534
  const P = {
535
535
  ABSOLUTE: "absolute",
536
536
  RELATIVE: "relative"
537
- }, y = {
537
+ }, E = {
538
538
  CREATE: "create",
539
539
  VIEW: "view",
540
540
  EDIT: "edit",
@@ -556,33 +556,33 @@ function kt(i) {
556
556
  }
557
557
  };
558
558
  }
559
- function ee(i, t) {
560
- const o = t === P.ABSOLUTE ? K.CLICKMOVE : K.NONE;
559
+ function ie(i, t) {
560
+ const o = t === P.ABSOLUTE ? Y.CLICKMOVE : Y.NONE;
561
561
  i.setActive(o), i.pickPosition = o, i.pullPickedPosition = 1.8;
562
562
  }
563
563
  function Lt(i, t, o) {
564
- const e = te(null), s = U(null), n = U(null), d = U(P.ABSOLUTE);
565
- let l = () => {
564
+ const e = Z(null), s = U(null), n = U(null), d = U(P.ABSOLUTE);
565
+ let r = () => {
566
566
  };
567
- const c = te(null);
568
- let C = () => {
567
+ const l = Z(null), _ = Z([]);
568
+ let c = () => {
569
569
  };
570
- function u() {
570
+ function f() {
571
571
  var a;
572
572
  s.value && e.value ? (e.value.deactivate(), o.setVisibility(e.value.name, !1)) : (a = e.value) == null || a.destroy();
573
573
  }
574
- function h(a = !0) {
575
- C(), l(), u(), e.value = null, a && o.clearSelection(), s.value = null, n.value = null;
574
+ function m(a = !0) {
575
+ c(), r(), f(), e.value = null, a && o.clearSelection(), s.value = null, n.value = null;
576
576
  }
577
- function w(a) {
578
- C(), u(), i.maps.activeMap instanceof G && (e.value = a, a.activate(i.maps.activeMap), C = i.maps.activeMap.shadowMapChanged.addEventListener((r) => {
579
- var _;
580
- r !== ((_ = e.value) == null ? void 0 : _.shadowMap) && h(!1);
577
+ function g(a) {
578
+ c(), f(), i.maps.activeMap instanceof $ && (e.value = a, a.activate(i.maps.activeMap), c = i.maps.activeMap.shadowMapChanged.addEventListener((v) => {
579
+ var u;
580
+ v !== ((u = e.value) == null ? void 0 : u.shadowMap) && m(!1);
581
581
  }));
582
582
  }
583
- async function g(a) {
584
- h(), await Ze();
585
- const { eventHandler: r } = i.maps, { featureInteraction: _ } = r, v = new x({
583
+ async function y(a) {
584
+ m(), await Ze();
585
+ const { eventHandler: v } = i.maps, { featureInteraction: u } = v, C = new D({
586
586
  viewshedType: a,
587
587
  colorOptions: {
588
588
  visibleColor: t.visibleColor,
@@ -590,89 +590,89 @@ function Lt(i, t, o) {
590
590
  },
591
591
  heightOffset: d.value === P.ABSOLUTE ? 0 : ge
592
592
  });
593
- w(v);
594
- const E = new xt(e.value);
595
- E.finished.addEventListener(() => {
596
- l(), e.value ? (e.value.showPrimitive = !0, n.value = y.EDIT) : h();
593
+ g(C);
594
+ const V = new xt(e.value);
595
+ V.finished.addEventListener(() => {
596
+ r(), e.value ? (e.value.showPrimitive = !0, n.value = E.EDIT) : m();
597
597
  });
598
- const T = r.addExclusiveInteraction(
599
- E,
598
+ const O = v.addExclusiveInteraction(
599
+ V,
600
600
  () => {
601
- E.destroy();
601
+ V.destroy();
602
602
  }
603
603
  );
604
- ee(_, d.value), E.positioned.addEventListener(() => {
605
- ee(_, P.ABSOLUTE);
606
- }), l = () => {
607
- T(), E.destroy(), _.setActive(), l = () => {
604
+ ie(u, d.value), V.positioned.addEventListener(() => {
605
+ ie(u, P.ABSOLUTE);
606
+ }), r = () => {
607
+ O(), V.destroy(), u.setActive(), r = () => {
608
608
  };
609
- }, n.value = y.CREATE;
609
+ }, n.value = E.CREATE;
610
610
  }
611
- function V(a) {
612
- var r;
611
+ function k(a) {
612
+ var v;
613
613
  if (e.value && a) {
614
- l();
614
+ r();
615
615
  const {
616
- layer: _,
617
- feature: v,
618
- destroy: E
616
+ layer: u,
617
+ feature: C,
618
+ destroy: V
619
619
  } = kt(e.value.position);
620
- i.layers.add(_), d.value === P.ABSOLUTE ? (c.value = De(i, _), c.value.setFeatures([v])) : (c.value = xe(i, _), c.value.setFeature(v)), c.value.stopped.addEventListener(() => {
621
- l();
620
+ i.layers.add(u), _.value = [C], d.value === P.ABSOLUTE ? (l.value = De(i, u), l.value.setFeatures([C])) : (l.value = xe(i, u), l.value.setFeature(C)), l.value.stopped.addEventListener(() => {
621
+ r();
622
622
  });
623
- const T = (r = v.getGeometry()) == null ? void 0 : r.on("change", () => {
624
- e.value ? e.value.position = H.mercatorToWgs84(
623
+ const O = (v = C.getGeometry()) == null ? void 0 : v.on("change", () => {
624
+ e.value ? e.value.position = z.mercatorToWgs84(
625
625
  /** @type {import("ol/geom").Point} */
626
- v.getGeometry().getCoordinates()
627
- ) : h();
626
+ C.getGeometry().getCoordinates()
627
+ ) : m();
628
628
  });
629
- n.value = y.MOVE, l = () => {
630
- var O;
631
- l = () => {
632
- }, T && ot(T), (O = c.value) == null || O.stop(), c.value = null, i.layers.remove(_), E(), n.value = y.EDIT;
629
+ n.value = E.MOVE, r = () => {
630
+ var K;
631
+ r = () => {
632
+ }, O && ot(O), (K = l.value) == null || K.stop(), l.value = null, _.value = [], i.layers.remove(u), V(), n.value = E.EDIT;
633
633
  };
634
634
  } else
635
- l();
635
+ r();
636
636
  }
637
- function N(a, r) {
638
- l(), e.value !== r && (w(r), d.value = r.heightOffset ? P.RELATIVE : P.ABSOLUTE), s.value = !!r.properties.title, n.value = a, s.value && o.setVisibility(r.name, !0);
637
+ function S(a, v) {
638
+ r(), e.value !== v && (g(v), d.value = v.heightOffset ? P.RELATIVE : P.ABSOLUTE), s.value = !!v.properties.title, n.value = a, s.value && o.setVisibility(v.name, !0);
639
639
  }
640
- const S = [
640
+ const L = [
641
641
  o.collectionComponent.collection.removed.addEventListener(
642
642
  (a) => {
643
- var r;
644
- o.remove(a.name), ((r = e.value) == null ? void 0 : r.name) === a.name && h();
643
+ var v;
644
+ o.remove(a.name), ((v = e.value) == null ? void 0 : v.name) === a.name && m();
645
645
  }
646
646
  ),
647
- o.renamed.addEventListener(({ item: a, title: r }) => {
648
- var v;
649
- const _ = i.windowManager.get(
647
+ o.renamed.addEventListener(({ item: a, title: v }) => {
648
+ var C;
649
+ const u = i.windowManager.get(
650
650
  `${o.collectionComponent.id}-editor`
651
651
  );
652
- _ && ((v = e.value) == null ? void 0 : v.name) === a.name && (_.state.headerTitle = r);
652
+ u && ((C = e.value) == null ? void 0 : C.name) === a.name && (u.state.headerTitle = v);
653
653
  }),
654
654
  o.visibilityChanged.addEventListener((a) => {
655
- var _;
656
- const r = ((_ = e.value) == null ? void 0 : _.name) === a.name;
657
- r ? h() : (N(y.VIEW, a), o.clearSelection()), o.setVisibility(a.name, !r);
655
+ var u;
656
+ const v = ((u = e.value) == null ? void 0 : u.name) === a.name;
657
+ v ? m() : (S(E.VIEW, a), o.clearSelection()), o.setVisibility(a.name, !v);
658
658
  })
659
659
  ];
660
- function L(a) {
660
+ function T(a) {
661
661
  if (!(a === d.value || !e.value)) {
662
- if (d.value = a, n.value === y.MOVE && l(), n.value === y.CREATE)
663
- ee(
662
+ if (d.value = a, n.value === E.MOVE && r(), n.value === E.CREATE)
663
+ ie(
664
664
  i.maps.eventHandler.featureInteraction,
665
665
  a
666
666
  ), e.value.heightOffset = a === P.ABSOLUTE ? 0 : ge;
667
- else if (n.value === y.EDIT) {
668
- const { position: r, heightOffset: _ } = e.value;
669
- a === P.RELATIVE ? i.maps.activeMap.getHeightFromTerrain([H.wgs84ToMercator(r)]).then((v) => {
670
- const E = H.mercatorToWgs84(v[0]);
671
- e.value && (e.value.heightOffset = r[2] - E[2], e.value.position = E);
667
+ else if (n.value === E.EDIT) {
668
+ const { position: v, heightOffset: u } = e.value;
669
+ a === P.RELATIVE ? i.maps.activeMap.getHeightFromTerrain([z.wgs84ToMercator(v)]).then((C) => {
670
+ const V = z.mercatorToWgs84(C[0]);
671
+ e.value && (e.value.heightOffset = v[2] - V[2], e.value.position = V);
672
672
  }) : (e.value.position = [
673
- r[0],
674
- r[1],
675
- r[2] + _
673
+ v[0],
674
+ v[1],
675
+ v[2] + u
676
676
  ], e.value.heightOffset = 0);
677
677
  }
678
678
  }
@@ -680,36 +680,37 @@ function Lt(i, t, o) {
680
680
  return {
681
681
  currentViewshed: e,
682
682
  currentIsPersisted: s,
683
- currentEditSession: c,
684
- createViewshed: g,
683
+ currentEditSession: l,
684
+ currentFeatures: _,
685
+ createViewshed: y,
685
686
  viewViewshed(a) {
686
- N(y.VIEW, a);
687
+ S(E.VIEW, a);
687
688
  },
688
689
  editViewshed(a) {
689
- N(y.EDIT, a), s.value && (o.setSelection(a.name), o.collectionComponent.openEditorWindow(a));
690
+ S(E.EDIT, a), s.value && (o.setSelection(a.name), o.collectionComponent.openEditorWindow(a));
690
691
  },
691
692
  persistCurrent() {
692
693
  e.value && (o.add(e.value), s.value = !0, o.setSelection(e.value.name), o.setVisibility(e.value.name, !0));
693
694
  },
694
- moveCurrentViewshed: V,
695
+ moveCurrentViewshed: k,
695
696
  setupMultiSelect() {
696
- l(), n.value = y.MULTI_SELECT, u(), e.value = null;
697
+ r(), n.value = E.MULTI_SELECT, f(), e.value = null;
697
698
  },
698
699
  mode: n,
699
700
  heightMode: d,
700
- changeHeightMode: L,
701
+ changeHeightMode: T,
701
702
  async placeCurrentFeaturesOnTerrain() {
702
- var a, r;
703
- if (e.value && ((a = c.value) == null ? void 0 : a.type) === Ne.EDIT_FEATURES && i.maps.activeMap instanceof G) {
704
- const v = (await i.maps.activeMap.getHeightFromTerrain([
705
- H.wgs84ToMercator((r = e.value) == null ? void 0 : r.position)
703
+ var a, v;
704
+ if (e.value && ((a = l.value) == null ? void 0 : a.type) === Ne.EDIT_FEATURES && i.maps.activeMap instanceof $) {
705
+ const C = (await i.maps.activeMap.getHeightFromTerrain([
706
+ z.wgs84ToMercator((v = e.value) == null ? void 0 : v.position)
706
707
  ]))[0][2] - e.value.position[2];
707
- c.value.translate(0, 0, v);
708
+ l.value.translate(0, 0, C);
708
709
  }
709
710
  },
710
- stop: h,
711
+ stop: m,
711
712
  destroy() {
712
- h(), S.forEach((a) => a());
713
+ m(), L.forEach((a) => a());
713
714
  }
714
715
  };
715
716
  }
@@ -719,7 +720,7 @@ const Se = (i, t) => {
719
720
  o[e] = s;
720
721
  return o;
721
722
  }, Ft = {
722
- distance: [x.MIN_DISTANCE, 2e3],
723
+ distance: [D.MIN_DISTANCE, 2e3],
723
724
  fov: [25, 85],
724
725
  heading: [0, 360],
725
726
  pitch: [-90, 90]
@@ -752,7 +753,7 @@ const Se = (i, t) => {
752
753
  }
753
754
  },
754
755
  setup(i) {
755
- var _;
756
+ var v;
756
757
  const t = (
757
758
  /** @type {import("./viewshedManager.js").ViewshedManager} */
758
759
  me("manager")
@@ -764,87 +765,87 @@ const Se = (i, t) => {
764
765
  mode: s,
765
766
  currentIsPersisted: n
766
767
  } = t, d = U(
767
- ((_ = o.maps.activeMap) == null ? void 0 : _.movementApiCallsDisabled) ?? !1
768
+ ((v = o.maps.activeMap) == null ? void 0 : v.movementApiCallsDisabled) ?? !1
768
769
  );
769
- let l = () => {
770
+ let r = () => {
770
771
  };
771
- const c = ve(() => i.selection);
772
- let C = () => {
772
+ const l = ve(() => i.selection);
773
+ let _ = () => {
773
774
  };
774
- const u = q({
775
+ const c = ee({
775
776
  X: void 0,
776
777
  Y: void 0,
777
778
  Z: void 0
778
- }), h = te();
779
- let w = () => {
779
+ }), f = Z();
780
+ let m = () => {
780
781
  };
781
- const g = q({
782
+ const g = ee({
782
783
  showPrimitive: !1,
783
784
  distance: void 0,
784
785
  fov: void 0,
785
786
  heading: void 0,
786
787
  pitch: void 0
787
- }), V = U();
788
- function N() {
789
- e.value && (u.X = e.value.position[0], u.Y = e.value.position[1], u.Z = t.heightMode.value === P.ABSOLUTE ? e.value.position[2] : e.value.heightOffset);
788
+ }), y = U();
789
+ function k() {
790
+ e.value && (c.X = e.value.position[0], c.Y = e.value.position[1], c.Z = t.heightMode.value === P.ABSOLUTE ? e.value.position[2] : e.value.heightOffset);
790
791
  }
791
792
  function S() {
792
- N(), e.value && (g.distance = e.value.distance, g.fov = e.value.fov, g.heading = e.value.heading, g.pitch = e.value.pitch, g.showPrimitive = e.value.showPrimitive, V.value = e.value.type);
793
+ k(), e.value && (g.distance = e.value.distance, g.fov = e.value.fov, g.heading = e.value.heading, g.pitch = e.value.pitch, g.showPrimitive = e.value.showPrimitive, y.value = e.value.type);
793
794
  }
794
795
  qe(() => {
795
- e.value && s.value !== y.CREATE && S();
796
- }), z(
796
+ e.value && s.value !== E.CREATE && S();
797
+ }), G(
797
798
  e,
798
799
  () => {
799
- e.value && (C(), C = e.value.positionChanged.addEventListener(() => {
800
- N(), w();
800
+ e.value && (_(), _ = e.value.positionChanged.addEventListener(() => {
801
+ k(), m();
801
802
  }));
802
803
  },
803
804
  { immediate: !0 }
804
805
  );
805
806
  async function L() {
806
- var T, O;
807
- (T = e.value) == null || T.deactivate();
808
- const v = (
807
+ var V, O;
808
+ (V = e.value) == null || V.deactivate();
809
+ const u = (
809
810
  /** @type {import("@vcmap/core").CesiumMap} */
810
811
  (O = o.maps.activeMap.getScene()) == null ? void 0 : O.camera
811
- ), E = v == null ? void 0 : v.changed.addEventListener(() => {
812
- w();
812
+ ), C = u == null ? void 0 : u.changed.addEventListener(() => {
813
+ m();
813
814
  });
814
- w = () => {
815
- var le;
816
- E == null || E(), h.value = null, (le = e.value) == null || le.activate(o.maps.activeMap), w = () => {
815
+ m = () => {
816
+ var K;
817
+ C == null || C(), f.value = null, (K = e.value) == null || K.activate(o.maps.activeMap), m = () => {
817
818
  };
818
819
  };
819
820
  }
820
821
  Qe(() => {
821
- var E, T;
822
- const v = (E = i.getViewshed) == null ? void 0 : E.call(i);
823
- v && t.editViewshed(v), l = (T = o.maps.activeMap) == null ? void 0 : T.movementDisabledChanged.addEventListener(
822
+ var C, V;
823
+ const u = (C = i.getViewshed) == null ? void 0 : C.call(i);
824
+ u && t.editViewshed(u), r = (V = o.maps.activeMap) == null ? void 0 : V.movementDisabledChanged.addEventListener(
824
825
  (O) => {
825
826
  d.value = O.apiCalls;
826
827
  }
827
828
  );
828
829
  }), et(() => {
829
- C(), w(), l(), n.value || ((s.value === y.EDIT || s.value === y.MOVE) && e.value ? t.viewViewshed(e.value) : s.value === y.CREATE && t.stop()), c.value && (c.value.length > 1 ? t.setupMultiSelect() : c.value.length === 1 && e.value ? t.viewViewshed(e.value) : (
830
+ _(), m(), r(), n.value || ((s.value === E.EDIT || s.value === E.MOVE) && e.value ? t.viewViewshed(e.value) : s.value === E.CREATE && t.stop()), l.value && (l.value.length > 1 ? t.setupMultiSelect() : l.value.length === 1 && e.value ? t.viewViewshed(e.value) : (
830
831
  // when a persited viewshed is deselected, stops plugin
831
- !c.value.length && s.value === y.EDIT && t.stop(!1)
832
+ !l.value.length && s.value === E.EDIT && t.stop(!1)
832
833
  ));
833
834
  }), S();
834
- function a(v, E) {
835
- w(), e.value && (g[v] = E, e.value[v] = E);
835
+ function T(u, C) {
836
+ m(), e.value && (g[u] = C, e.value[u] = C);
836
837
  }
837
- const r = ve(() => {
838
- const v = [];
839
- return V.value === p.CONE && v.push({
838
+ const a = ve(() => {
839
+ const u = [];
840
+ return y.value === w.CONE && u.push({
840
841
  name: "jumpToViewpoint",
841
- title: h.value ? "viewshed.returnToViewpoint" : "viewshed.jumpToViewpoint",
842
+ title: f.value ? "viewshed.returnToViewpoint" : "viewshed.jumpToViewpoint",
842
843
  icon: "mdi-human-male",
843
- active: !!h.value,
844
+ active: !!f.value,
844
845
  disabled: d.value,
845
846
  async callback() {
846
- var E, T, O;
847
- t.moveCurrentViewshed(!1), e.value && !h.value ? (h.value = await ((E = o.maps.activeMap) == null ? void 0 : E.getViewpoint()), await ((T = o.maps.activeMap) == null ? void 0 : T.gotoViewpoint(
847
+ var C, V, O;
848
+ t.moveCurrentViewshed(!1), e.value && !f.value ? (f.value = await ((C = o.maps.activeMap) == null ? void 0 : C.getViewpoint()), await ((V = o.maps.activeMap) == null ? void 0 : V.gotoViewpoint(
848
849
  new We({
849
850
  groundPosition: [
850
851
  e.value.position[0],
@@ -857,59 +858,59 @@ const Se = (i, t) => {
857
858
  animate: !0
858
859
  // if not animate, async does not work and the cameraChanged listener is triggered immediately. alternatively set timeout
859
860
  })
860
- )), L()) : h.value && ((O = o.maps.activeMap) == null || O.gotoViewpoint(h.value), w());
861
+ )), L()) : f.value && ((O = o.maps.activeMap) == null || O.gotoViewpoint(f.value), m());
861
862
  }
862
- }), v.push({
863
+ }), u.push({
863
864
  name: "moveViewshed",
864
865
  title: "viewshed.move",
865
866
  icon: t.heightMode.value === P.RELATIVE ? "$vcsEditVertices" : "mdi-axis-arrow",
866
- active: s.value === y.MOVE,
867
+ active: s.value === E.MOVE,
867
868
  callback() {
868
869
  t.moveCurrentViewshed(
869
- s.value !== y.MOVE
870
+ s.value !== E.MOVE
870
871
  );
871
872
  }
872
- }), v.unshift({
873
+ }), u.unshift({
873
874
  name: "showPrimitive",
874
875
  title: "viewshed.showPrimitive",
875
876
  icon: "mdi-eye",
876
877
  active: g.showPrimitive,
877
878
  callback() {
878
- this.active = !this.active, a("showPrimitive", this.active);
879
+ this.active = !this.active, T("showPrimitive", this.active);
879
880
  }
880
- }), v;
881
+ }), u;
881
882
  });
882
883
  return {
883
- position: u,
884
- setPosition(v, E, T) {
885
- if (w(), !!e.value) {
886
- if (T === 2 && t.heightMode.value === P.RELATIVE)
887
- e.value.heightOffset = Number(v);
884
+ position: c,
885
+ setPosition(u, C, V) {
886
+ if (m(), !!e.value) {
887
+ if (V === 2 && t.heightMode.value === P.RELATIVE)
888
+ e.value.heightOffset = Number(u);
888
889
  else {
889
890
  const O = [...e.value.position];
890
- O[T] = Number(v), e.value.position = O;
891
+ O[V] = Number(u), e.value.position = O;
891
892
  }
892
- u[E] = Number(v);
893
+ c[C] = Number(u);
893
894
  }
894
895
  },
895
896
  parameters: g,
896
- setParameter: a,
897
+ setParameter: T,
897
898
  parameterRanges: Ft,
898
- ViewshedPluginModes: y,
899
+ ViewshedPluginModes: E,
899
900
  viewshedMode: s,
900
901
  currentIsPersisted: n,
901
- viewshedType: V,
902
- ViewshedTypes: p,
902
+ viewshedType: y,
903
+ ViewshedTypes: w,
903
904
  HeightModes: P,
904
905
  heightMode: t.heightMode,
905
906
  TransformationMode: Be,
906
907
  changeHeightMode: t.changeHeightMode,
907
908
  async createNewViewshed() {
908
- await t.createViewshed(V.value);
909
+ await t.createViewshed(y.value);
909
910
  },
910
911
  addToMyWorkspace: () => t.persistCurrent(),
911
912
  cancel: () => t.stop(),
912
- headerActions: r
913
+ headerActions: a
913
914
  };
914
915
  }
915
916
  }, Wt = { key: 0 }, Bt = { class: "px-1 py-0" }, Ut = { key: 0 }, $t = { key: 1 }, Ht = {
@@ -920,11 +921,11 @@ const Se = (i, t) => {
920
921
  class: "d-flex w-full justify-end px-2 pt-2 pb-1"
921
922
  };
922
923
  function Gt(i, t, o, e, s, n) {
923
- const d = b("VcsHelp"), l = b("v-row"), c = b("VcsFeatureTransforms"), C = b("VcsTextField"), u = b("v-col"), h = b("v-container"), w = b("VcsFormSection"), g = b("v-divider"), V = b("VcsLabel"), N = b("VcsSelect"), S = b("VcsSlider"), L = b("VcsFormButton");
924
+ const d = b("VcsHelp"), r = b("v-row"), l = b("VcsFeatureTransforms"), _ = b("VcsTextField"), c = b("v-col"), f = b("v-container"), m = b("VcsFormSection"), g = b("v-divider"), y = b("VcsLabel"), k = b("VcsSelect"), S = b("VcsSlider"), L = b("VcsFormButton");
924
925
  return M(), B("div", null, [
925
926
  e.viewshedMode === e.ViewshedPluginModes.CREATE ? (M(), B("div", Wt, [
926
- e.viewshedType === e.ViewshedTypes.CONE ? (M(), D(d, { key: 0 }, {
927
- default: f(() => [
927
+ e.viewshedType === e.ViewshedTypes.CONE ? (M(), N(d, { key: 0 }, {
928
+ default: h(() => [
928
929
  F(
929
930
  A(i.$t("viewshed.createDescription")),
930
931
  1
@@ -933,8 +934,8 @@ function Gt(i, t, o, e, s, n) {
933
934
  ]),
934
935
  _: 1
935
936
  /* STABLE */
936
- })) : e.viewshedType === e.ViewshedTypes.THREESIXTY ? (M(), D(d, { key: 1 }, {
937
- default: f(() => [
937
+ })) : e.viewshedType === e.ViewshedTypes.THREESIXTY ? (M(), N(d, { key: 1 }, {
938
+ default: h(() => [
938
939
  F(
939
940
  A(i.$t("viewshed.createThreeSixtyDescription")),
940
941
  1
@@ -943,18 +944,18 @@ function Gt(i, t, o, e, s, n) {
943
944
  ]),
944
945
  _: 1
945
946
  /* STABLE */
946
- })) : $("v-if", !0)
947
- ])) : e.viewshedMode === e.ViewshedPluginModes.EDIT || e.viewshedMode === e.ViewshedPluginModes.MOVE ? (M(), D(w, {
947
+ })) : H("v-if", !0)
948
+ ])) : e.viewshedMode === e.ViewshedPluginModes.EDIT || e.viewshedMode === e.ViewshedPluginModes.MOVE ? (M(), N(m, {
948
949
  key: 1,
949
950
  "header-actions": e.headerActions,
950
951
  heading: "viewshed.viewpoint",
951
952
  "action-button-list-overflow-count": 3
952
953
  }, {
953
- default: f(() => [
954
- m(h, { class: "px-1 py-0" }, {
955
- default: f(() => [
956
- m(l, { "no-gutters": "" }, {
957
- default: f(() => [
954
+ default: h(() => [
955
+ p(f, { class: "px-1 py-0" }, {
956
+ default: h(() => [
957
+ p(r, { "no-gutters": "" }, {
958
+ default: h(() => [
958
959
  tt(
959
960
  "span",
960
961
  Bt,
@@ -966,12 +967,12 @@ function Gt(i, t, o, e, s, n) {
966
967
  _: 1
967
968
  /* STABLE */
968
969
  }),
969
- e.viewshedMode === e.ViewshedPluginModes.MOVE && e.heightMode === e.HeightModes.ABSOLUTE ? (M(), D(l, {
970
+ e.viewshedMode === e.ViewshedPluginModes.MOVE && e.heightMode === e.HeightModes.ABSOLUTE ? (M(), N(r, {
970
971
  key: 0,
971
972
  "no-gutters": ""
972
973
  }, {
973
- default: f(() => [
974
- m(c, {
974
+ default: h(() => [
975
+ p(l, {
975
976
  "transformation-mode": e.TransformationMode.TRANSLATE,
976
977
  "feature-properties": { altitudeMode: "absolute" },
977
978
  "allow-z-input": !0,
@@ -980,31 +981,31 @@ function Gt(i, t, o, e, s, n) {
980
981
  ]),
981
982
  _: 1
982
983
  /* STABLE */
983
- })) : (M(), D(l, {
984
+ })) : (M(), N(r, {
984
985
  key: 1,
985
986
  "no-gutters": ""
986
987
  }, {
987
- default: f(() => [
988
+ default: h(() => [
988
989
  (M(!0), B(
989
990
  pe,
990
991
  null,
991
- we(e.position, (a, r, _) => (M(), D(
992
- u,
992
+ we(e.position, (T, a, v) => (M(), N(
993
+ c,
993
994
  {
994
- key: _,
995
+ key: v,
995
996
  class: "pb-1"
996
997
  },
997
998
  {
998
- default: f(() => [
999
- m(C, {
1000
- "model-value": a,
1001
- "onUpdate:modelValue": (v) => e.setPosition(v, r, _),
999
+ default: h(() => [
1000
+ p(_, {
1001
+ "model-value": T,
1002
+ "onUpdate:modelValue": (u) => e.setPosition(u, a, v),
1002
1003
  type: "number",
1003
- prefix: r,
1004
- step: r === "Z" ? 1 : 1e-4,
1005
- unit: r === "Z" ? "m" : "°",
1006
- decimals: r === "Z" ? 2 : 8,
1007
- disabled: e.viewshedMode === e.ViewshedPluginModes.MOVE && !(r === "Z" && e.heightMode === e.HeightModes.RELATIVE),
1004
+ prefix: a,
1005
+ step: a === "Z" ? 1 : 1e-4,
1006
+ unit: a === "Z" ? "m" : "°",
1007
+ decimals: a === "Z" ? 2 : 8,
1008
+ disabled: e.viewshedMode === e.ViewshedPluginModes.MOVE && !(a === "Z" && e.heightMode === e.HeightModes.RELATIVE),
1008
1009
  "hide-spin-buttons": !0
1009
1010
  }, null, 8, ["model-value", "onUpdate:modelValue", "prefix", "step", "unit", "decimals", "disabled"])
1010
1011
  ]),
@@ -1028,16 +1029,16 @@ function Gt(i, t, o, e, s, n) {
1028
1029
  ]),
1029
1030
  _: 1
1030
1031
  /* STABLE */
1031
- }, 8, ["header-actions"])) : $("v-if", !0),
1032
- m(g),
1033
- m(h, { class: "px-1 py-0" }, {
1034
- default: f(() => [
1035
- m(l, { "no-gutters": "" }, {
1036
- default: f(() => [
1037
- m(u, null, {
1038
- default: f(() => [
1039
- m(V, { "html-for": "heightMode" }, {
1040
- default: f(() => [
1032
+ }, 8, ["header-actions"])) : H("v-if", !0),
1033
+ p(g),
1034
+ p(f, { class: "px-1 py-0" }, {
1035
+ default: h(() => [
1036
+ p(r, { "no-gutters": "" }, {
1037
+ default: h(() => [
1038
+ p(c, null, {
1039
+ default: h(() => [
1040
+ p(y, { "html-for": "heightMode" }, {
1041
+ default: h(() => [
1041
1042
  F(
1042
1043
  A(i.$t("viewshed.heightMode")),
1043
1044
  1
@@ -1051,13 +1052,13 @@ function Gt(i, t, o, e, s, n) {
1051
1052
  _: 1
1052
1053
  /* STABLE */
1053
1054
  }),
1054
- m(u, null, {
1055
- default: f(() => [
1056
- m(N, {
1055
+ p(c, null, {
1056
+ default: h(() => [
1057
+ p(k, {
1057
1058
  id: "heightMode",
1058
- items: Object.values(e.HeightModes).map((a) => ({
1059
- value: a,
1060
- title: `viewshed.${a}`
1059
+ items: Object.values(e.HeightModes).map((T) => ({
1060
+ value: T,
1061
+ title: `viewshed.${T}`
1061
1062
  })),
1062
1063
  "model-value": e.heightMode,
1063
1064
  "onUpdate:modelValue": e.changeHeightMode
@@ -1074,47 +1075,47 @@ function Gt(i, t, o, e, s, n) {
1074
1075
  _: 1
1075
1076
  /* STABLE */
1076
1077
  }),
1077
- e.viewshedMode === e.ViewshedPluginModes.EDIT || e.viewshedMode === e.ViewshedPluginModes.MOVE ? (M(), D(h, {
1078
+ e.viewshedMode === e.ViewshedPluginModes.EDIT || e.viewshedMode === e.ViewshedPluginModes.MOVE ? (M(), N(f, {
1078
1079
  key: 2,
1079
1080
  class: "px-1 pt-0 pb-2"
1080
1081
  }, {
1081
- default: f(() => [
1082
+ default: h(() => [
1082
1083
  (M(!0), B(
1083
1084
  pe,
1084
1085
  null,
1085
- we(e.parameters, (a, r) => (M(), D(
1086
- l,
1086
+ we(e.parameters, (T, a) => (M(), N(
1087
+ r,
1087
1088
  {
1088
1089
  "no-gutters": "",
1089
- key: r
1090
+ key: a
1090
1091
  },
1091
1092
  {
1092
- default: f(() => [
1093
- r === "distance" || e.viewshedType === e.ViewshedTypes.CONE && r !== "showPrimitive" ? (M(), D(
1094
- u,
1093
+ default: h(() => [
1094
+ a === "distance" || e.viewshedType === e.ViewshedTypes.CONE && a !== "showPrimitive" ? (M(), N(
1095
+ c,
1095
1096
  { key: 0 },
1096
1097
  {
1097
- default: f(() => [
1098
- m(
1099
- l,
1098
+ default: h(() => [
1099
+ p(
1100
+ r,
1100
1101
  {
1101
1102
  "no-gutters": "",
1102
1103
  class: "px-1"
1103
1104
  },
1104
1105
  {
1105
- default: f(() => [
1106
- m(
1107
- u,
1106
+ default: h(() => [
1107
+ p(
1108
+ c,
1108
1109
  null,
1109
1110
  {
1110
- default: f(() => [
1111
- m(V, {
1112
- "html-for": r,
1111
+ default: h(() => [
1112
+ p(y, {
1113
+ "html-for": a,
1113
1114
  class: "py-0"
1114
1115
  }, {
1115
- default: f(() => [
1116
+ default: h(() => [
1116
1117
  F(
1117
- A(i.$t(`viewshed.${r}`)),
1118
+ A(i.$t(`viewshed.${a}`)),
1118
1119
  1
1119
1120
  /* TEXT */
1120
1121
  )
@@ -1129,21 +1130,21 @@ function Gt(i, t, o, e, s, n) {
1129
1130
  1024
1130
1131
  /* DYNAMIC_SLOTS */
1131
1132
  ),
1132
- m(
1133
- u,
1133
+ p(
1134
+ c,
1134
1135
  { class: "d-flex justify-end align-center" },
1135
1136
  {
1136
- default: f(() => [
1137
- r === "distance" ? (M(), B(
1137
+ default: h(() => [
1138
+ a === "distance" ? (M(), B(
1138
1139
  "span",
1139
1140
  Ut,
1140
- A(`${Math.round(a)} m`),
1141
+ A(`${Math.round(T)} m`),
1141
1142
  1
1142
1143
  /* TEXT */
1143
1144
  )) : (M(), B(
1144
1145
  "span",
1145
1146
  $t,
1146
- A(`${Math.round(a)} °`),
1147
+ A(`${Math.round(T)} °`),
1147
1148
  1
1148
1149
  /* TEXT */
1149
1150
  ))
@@ -1161,25 +1162,25 @@ function Gt(i, t, o, e, s, n) {
1161
1162
  1024
1162
1163
  /* DYNAMIC_SLOTS */
1163
1164
  ),
1164
- m(
1165
- l,
1165
+ p(
1166
+ r,
1166
1167
  { "no-gutters": "" },
1167
1168
  {
1168
- default: f(() => [
1169
- m(
1170
- u,
1169
+ default: h(() => [
1170
+ p(
1171
+ c,
1171
1172
  null,
1172
1173
  {
1173
- default: f(() => [
1174
- m(S, {
1175
- id: r,
1174
+ default: h(() => [
1175
+ p(S, {
1176
+ id: a,
1176
1177
  class: "pa-0",
1177
- "model-value": a,
1178
- "onUpdate:modelValue": (_) => e.setParameter(r, _),
1178
+ "model-value": T,
1179
+ "onUpdate:modelValue": (v) => e.setParameter(a, v),
1179
1180
  type: "number",
1180
1181
  step: "1",
1181
- min: e.parameterRanges[r][0],
1182
- max: e.parameterRanges[r][1]
1182
+ min: e.parameterRanges[a][0],
1183
+ max: e.parameterRanges[a][1]
1183
1184
  }, null, 8, ["id", "model-value", "onUpdate:modelValue", "min", "max"])
1184
1185
  ]),
1185
1186
  _: 2
@@ -1201,7 +1202,7 @@ function Gt(i, t, o, e, s, n) {
1201
1202
  },
1202
1203
  1024
1203
1204
  /* DYNAMIC_SLOTS */
1204
- )) : $("v-if", !0)
1205
+ )) : H("v-if", !0)
1205
1206
  ]),
1206
1207
  _: 2
1207
1208
  /* DYNAMIC */
@@ -1215,20 +1216,20 @@ function Gt(i, t, o, e, s, n) {
1215
1216
  ]),
1216
1217
  _: 1
1217
1218
  /* STABLE */
1218
- })) : $("v-if", !0),
1219
- m(g),
1219
+ })) : H("v-if", !0),
1220
+ p(g),
1220
1221
  e.viewshedMode === e.ViewshedPluginModes.EDIT || e.viewshedMode === e.ViewshedPluginModes.MOVE ? (M(), B("div", Ht, [
1221
- m(L, {
1222
- onClick: t[0] || (t[0] = (a) => e.addToMyWorkspace()),
1222
+ p(L, {
1223
+ onClick: t[0] || (t[0] = (T) => e.addToMyWorkspace()),
1223
1224
  tooltip: "viewshed.addToMyWorkspace",
1224
1225
  icon: "$vcsComponentsPlus",
1225
1226
  disabled: e.currentIsPersisted || void 0
1226
1227
  }, null, 8, ["disabled"]),
1227
- m(L, {
1228
- onClick: t[1] || (t[1] = (a) => e.createNewViewshed()),
1228
+ p(L, {
1229
+ onClick: t[1] || (t[1] = (T) => e.createNewViewshed()),
1229
1230
  variant: "filled"
1230
1231
  }, {
1231
- default: f(() => [
1232
+ default: h(() => [
1232
1233
  F(
1233
1234
  A(i.$t("viewshed.new")),
1234
1235
  1
@@ -1239,11 +1240,11 @@ function Gt(i, t, o, e, s, n) {
1239
1240
  /* STABLE */
1240
1241
  })
1241
1242
  ])) : e.viewshedMode === e.ViewshedPluginModes.CREATE ? (M(), B("div", zt, [
1242
- m(L, {
1243
- onClick: t[2] || (t[2] = (a) => e.cancel()),
1243
+ p(L, {
1244
+ onClick: t[2] || (t[2] = (T) => e.cancel()),
1244
1245
  variant: "outlined"
1245
1246
  }, {
1246
- default: f(() => [
1247
+ default: h(() => [
1247
1248
  F(
1248
1249
  A(i.$t("viewshed.cancel")),
1249
1250
  1
@@ -1253,12 +1254,12 @@ function Gt(i, t, o, e, s, n) {
1253
1254
  _: 1
1254
1255
  /* STABLE */
1255
1256
  })
1256
- ])) : $("v-if", !0)
1257
+ ])) : H("v-if", !0)
1257
1258
  ]);
1258
1259
  }
1259
- const Kt = /* @__PURE__ */ Se(jt, [["render", Gt]]), j = "@vcmap/viewshed", Yt = "3.0.1", Xt = "^6.0", se = {
1260
- [p.CONE]: "$vcsViewshed",
1261
- [p.THREESIXTY]: "$vcsViewshedCone"
1260
+ const Kt = /* @__PURE__ */ Se(jt, [["render", Gt]]), j = "@vcmap/viewshed", Yt = "3.0.3", Xt = "^6.0", ne = {
1261
+ [w.CONE]: "$vcsViewshed",
1262
+ [w.THREESIXTY]: "$vcsViewshedCone"
1262
1263
  };
1263
1264
  function Jt(i, t, o) {
1264
1265
  const e = U(), s = U(), n = `${o.id}-editor`, d = {
@@ -1274,22 +1275,22 @@ function Jt(i, t, o) {
1274
1275
  }
1275
1276
  };
1276
1277
  ht(t, o, {
1277
- editor: (w) => ({
1278
+ editor: (m) => ({
1278
1279
  ...d,
1279
1280
  props: {
1280
1281
  selection: o.selection,
1281
- getViewshed: () => o.collection.getByKey(w.name)
1282
+ getViewshed: () => o.collection.getByKey(m.name)
1282
1283
  }
1283
1284
  })
1284
1285
  });
1285
- function l() {
1286
- i.currentViewshed.value && (s.value = se[i.currentViewshed.value.type], i.currentIsPersisted.value ? e.value = i.currentViewshed.value.properties.title : i.mode.value === y.CREATE ? e.value = `viewshed.create.${i.currentViewshed.value.type}` : e.value = [
1286
+ function r() {
1287
+ i.currentViewshed.value && (s.value = ne[i.currentViewshed.value.type], i.currentIsPersisted.value ? e.value = i.currentViewshed.value.properties.title : i.mode.value === E.CREATE ? e.value = `viewshed.create.${i.currentViewshed.value.type}` : e.value = [
1287
1288
  "viewshed.temporary",
1288
1289
  `viewshed.${i.currentViewshed.value.type}`
1289
1290
  ]);
1290
1291
  }
1291
- function c() {
1292
- l(), i.currentViewshed.value && !i.currentIsPersisted.value && (i.mode.value === y.EDIT || i.mode.value === y.MOVE || i.mode.value === y.CREATE) && (t.windowManager.has(n) || t.windowManager.add(
1292
+ function l() {
1293
+ r(), i.currentViewshed.value && !i.currentIsPersisted.value && (i.mode.value === E.EDIT || i.mode.value === E.MOVE || i.mode.value === E.CREATE) && (t.windowManager.has(n) || t.windowManager.add(
1293
1294
  {
1294
1295
  ...d,
1295
1296
  id: n,
@@ -1299,78 +1300,78 @@ function Jt(i, t, o) {
1299
1300
  j
1300
1301
  ));
1301
1302
  }
1302
- const C = z(i.currentViewshed, (w) => {
1303
- w && c();
1304
- }), u = z(i.currentIsPersisted, (w) => {
1305
- w && l();
1306
- }), h = z(i.mode, () => {
1307
- i.mode.value ? c() : t.windowManager.remove(n);
1303
+ const _ = G(i.currentViewshed, (m) => {
1304
+ m && l();
1305
+ }), c = G(i.currentIsPersisted, (m) => {
1306
+ m && r();
1307
+ }), f = G(i.mode, () => {
1308
+ i.mode.value ? l() : t.windowManager.remove(n);
1308
1309
  });
1309
1310
  return {
1310
1311
  destroy() {
1311
- t.windowManager.remove(n), C(), h(), u();
1312
+ t.windowManager.remove(n), _(), f(), c();
1312
1313
  }
1313
1314
  };
1314
1315
  }
1315
1316
  function Zt(i, t, o, e) {
1316
1317
  const s = {
1317
1318
  type: mt.SELECT,
1318
- action: q({
1319
+ action: ee({
1319
1320
  name: o,
1320
1321
  currentIndex: 0,
1321
1322
  active: !1,
1322
1323
  background: !1,
1323
- disabled: !1,
1324
+ disabled: !(i.maps.activeMap instanceof $),
1324
1325
  callback() {
1325
1326
  if (this.active)
1326
1327
  this.background && t.currentViewshed.value ? t.editViewshed(t.currentViewshed.value) : t.stop();
1327
1328
  else {
1328
- const c = this.tools[this.currentIndex].name;
1329
- t.createViewshed(c);
1329
+ const l = this.tools[this.currentIndex].name;
1330
+ t.createViewshed(l);
1330
1331
  }
1331
1332
  },
1332
- selected(c) {
1333
- c !== this.currentIndex && (this.currentIndex = c);
1334
- const C = this.tools[this.currentIndex].name;
1335
- t.createViewshed(C);
1333
+ selected(l) {
1334
+ l !== this.currentIndex && (this.currentIndex = l);
1335
+ const _ = this.tools[this.currentIndex].name;
1336
+ t.createViewshed(_);
1336
1337
  },
1337
- tools: e.flatMap((c) => c === p.CONE ? {
1338
- name: p.CONE,
1339
- icon: se[p.CONE],
1340
- title: `viewshed.create.${p.CONE}`
1341
- } : c === p.THREESIXTY ? {
1342
- name: p.THREESIXTY,
1343
- icon: se[p.THREESIXTY],
1344
- title: `viewshed.create.${p.THREESIXTY}`
1338
+ tools: e.flatMap((l) => l === w.CONE ? {
1339
+ name: w.CONE,
1340
+ icon: ne[w.CONE],
1341
+ title: `viewshed.create.${w.CONE}`
1342
+ } : l === w.THREESIXTY ? {
1343
+ name: w.THREESIXTY,
1344
+ icon: ne[w.THREESIXTY],
1345
+ title: `viewshed.create.${w.THREESIXTY}`
1345
1346
  } : [])
1346
1347
  })
1347
- }, n = z(t.mode, (c) => {
1348
- c === y.VIEW ? (s.action.background = !0, s.action.active = !0) : c ? (s.action.background = !1, s.action.active = !0) : (s.action.background = !1, s.action.active = !1);
1349
- }), d = z(
1348
+ }, n = G(t.mode, (l) => {
1349
+ l === E.VIEW ? (s.action.background = !0, s.action.active = !0) : l ? (s.action.background = !1, s.action.active = !0) : (s.action.background = !1, s.action.active = !1);
1350
+ }), d = G(
1350
1351
  t.currentViewshed,
1351
- (c) => {
1352
- c && (s.action.currentIndex = s.action.tools.findIndex(
1353
- (C) => C.name === c.type
1352
+ (l) => {
1353
+ l && (s.action.currentIndex = s.action.tools.findIndex(
1354
+ (_) => _.name === l.type
1354
1355
  ));
1355
1356
  }
1356
- ), l = i.maps.mapActivated.addEventListener((c) => {
1357
- c instanceof G ? s.action.disabled = !1 : s.action.disabled = !0;
1357
+ ), r = i.maps.mapActivated.addEventListener((l) => {
1358
+ l instanceof $ ? s.action.disabled = !1 : s.action.disabled = !0;
1358
1359
  });
1359
1360
  return {
1360
1361
  destroy() {
1361
- n(), d(), l();
1362
+ n(), d(), r();
1362
1363
  },
1363
1364
  toolbox: s
1364
1365
  };
1365
1366
  }
1366
1367
  function qt(i, t, o, e) {
1367
- re(e, [Pt(p)]);
1368
+ le(e, [Pt(w)]);
1368
1369
  const { toolbox: s, destroy: n } = Zt(i, t, o, e), d = i.toolboxManager.add(s, o).id;
1369
1370
  return () => {
1370
1371
  i.toolboxManager.remove(d), n();
1371
1372
  };
1372
1373
  }
1373
- class ne extends Ue {
1374
+ class ae extends Ue {
1374
1375
  static get className() {
1375
1376
  return "ViewshedCategory";
1376
1377
  }
@@ -1378,9 +1379,9 @@ class ne extends Ue {
1378
1379
  var e;
1379
1380
  if (
1380
1381
  /** @type {import("@vcmap/core").CesiumMap | undefined} */
1381
- (e = this._app) == null ? void 0 : e.maps.getByType(G.className)[0]
1382
+ (e = this._app) == null ? void 0 : e.maps.getByType($.className)[0]
1382
1383
  )
1383
- return new x(t);
1384
+ return new D(t);
1384
1385
  throw new Error("No CesiumMap available");
1385
1386
  }
1386
1387
  }
@@ -1395,9 +1396,9 @@ function Qt(i, t) {
1395
1396
  return o;
1396
1397
  }
1397
1398
  async function ei(i) {
1398
- const t = new Y(), o = new Y(), { collectionComponent: e, category: s } = await i.categoryManager.requestCategory(
1399
+ const t = new X(), o = new X(), { collectionComponent: e, category: s } = await i.categoryManager.requestCategory(
1399
1400
  {
1400
- type: ne.className,
1401
+ type: ae.className,
1401
1402
  name: "Viewsheds",
1402
1403
  title: "viewshed.viewshedCategory"
1403
1404
  },
@@ -1410,20 +1411,20 @@ async function ei(i) {
1410
1411
  );
1411
1412
  e.addItemMapping({
1412
1413
  mappingFunction: vt(
1413
- [G.className],
1414
+ [$.className],
1414
1415
  i.maps
1415
1416
  ),
1416
1417
  owner: j
1417
1418
  });
1418
- const n = (u, h, w) => {
1419
- w.title = u.properties.title, w.titleChanged = (g) => {
1420
- u.properties.title = g, w.title = g, t.raiseEvent({ item: u, title: g });
1421
- }, w.actions.push(
1422
- q({
1419
+ const n = (c, f, m) => {
1420
+ m.title = c.properties.title, m.titleChanged = (g) => {
1421
+ c.properties.title = g, m.title = g, t.raiseEvent({ item: c, title: g });
1422
+ }, m.actions.push(
1423
+ ee({
1423
1424
  name: "visibilityAction",
1424
1425
  icon: "$vcsCheckbox",
1425
1426
  callback() {
1426
- o.raiseEvent(u);
1427
+ o.raiseEvent(c);
1427
1428
  }
1428
1429
  })
1429
1430
  );
@@ -1434,49 +1435,49 @@ async function ei(i) {
1434
1435
  j,
1435
1436
  [e.id]
1436
1437
  );
1437
- const { action: d, destroy: l } = pt(
1438
+ const { action: d, destroy: r } = pt(
1438
1439
  e.selection,
1439
1440
  () => {
1440
- const u = e.selection.value.map(
1441
- (h) => e.collection.getByKey(h.name)
1441
+ const c = e.selection.value.map(
1442
+ (f) => e.collection.getByKey(f.name)
1442
1443
  );
1443
- wt(JSON.stringify(u), "viewsheds.json");
1444
+ wt(JSON.stringify(c), "viewsheds.json");
1444
1445
  },
1445
1446
  j
1446
- ), { action: c, destroy: C } = gt(
1447
- async (u) => {
1448
- const { vueI18n: h } = i, g = (await Promise.all(
1449
- u.map(async (S) => {
1447
+ ), { action: l, destroy: _ } = gt(
1448
+ async (c) => {
1449
+ const { vueI18n: f } = i, g = (await Promise.all(
1450
+ c.map(async (S) => {
1450
1451
  const L = await S.text();
1451
1452
  try {
1452
- return JSON.parse(L).map((r) => new x(r));
1453
+ return JSON.parse(L).map((a) => new D(a));
1453
1454
  } catch {
1454
1455
  i.notifier.add({
1455
- type: X.ERROR,
1456
- message: h.t("components.import.failure", {
1456
+ type: J.ERROR,
1457
+ message: f.t("components.import.failure", {
1457
1458
  fileName: S.name
1458
1459
  })
1459
1460
  });
1460
1461
  }
1461
1462
  return [];
1462
1463
  })
1463
- )).flat(), V = g.map((S) => s.collection.add(S)).filter((S) => S != null), N = g.length - V.length;
1464
- if (N > 0)
1464
+ )).flat(), y = g.map((S) => s.collection.add(S)).filter((S) => S != null), k = g.length - y.length;
1465
+ if (k > 0)
1465
1466
  return i.notifier.add({
1466
- type: X.WARNING,
1467
- message: h.t("components.import.addFailure", [N])
1467
+ type: J.WARNING,
1468
+ message: f.t("components.import.addFailure", [k])
1468
1469
  }), !1;
1469
- if (V.length > 0)
1470
+ if (y.length > 0)
1470
1471
  i.notifier.add({
1471
- type: X.SUCCESS,
1472
- message: h.t("components.import.featuresAdded", [
1473
- V.length
1472
+ type: J.SUCCESS,
1473
+ message: f.t("components.import.featuresAdded", [
1474
+ y.length
1474
1475
  ])
1475
1476
  });
1476
1477
  else
1477
1478
  return i.notifier.add({
1478
- type: X.ERROR,
1479
- message: h.t("components.import.nothingAdded")
1479
+ type: J.ERROR,
1480
+ message: f.t("components.import.nothingAdded")
1480
1481
  }), !1;
1481
1482
  return !0;
1482
1483
  },
@@ -1484,50 +1485,50 @@ async function ei(i) {
1484
1485
  j,
1485
1486
  "category-manager"
1486
1487
  );
1487
- return e.addActions([d, c]), {
1488
+ return e.addActions([d, l]), {
1488
1489
  renamed: t,
1489
1490
  visibilityChanged: o,
1490
- setSelection(u) {
1491
- u && (e.selection.value = e.items.value.filter((h) => u === h.name));
1491
+ setSelection(c) {
1492
+ c && (e.selection.value = e.items.value.filter((f) => c === f.name));
1492
1493
  },
1493
1494
  clearSelection() {
1494
1495
  e.selection.value.length && (e.selection.value = []);
1495
1496
  },
1496
- setVisibility(u, h) {
1497
- const w = e.items.value.find(
1498
- (g) => u === g.name
1497
+ setVisibility(c, f) {
1498
+ const m = e.items.value.find(
1499
+ (g) => c === g.name
1499
1500
  );
1500
- if (w) {
1501
- const g = w.actions.find(
1502
- (V) => V.name === "visibilityAction"
1501
+ if (m) {
1502
+ const g = m.actions.find(
1503
+ (y) => y.name === "visibilityAction"
1503
1504
  );
1504
- g && (g.icon = h ? "$vcsCheckboxChecked" : "$vcsCheckbox");
1505
+ g && (g.icon = f ? "$vcsCheckboxChecked" : "$vcsCheckbox");
1505
1506
  }
1506
1507
  },
1507
- add(u) {
1508
- u.properties.title = Qt(
1509
- u.type,
1508
+ add(c) {
1509
+ c.properties.title = Qt(
1510
+ c.type,
1510
1511
  /** @type {import("./viewshed.js").default[]} */
1511
1512
  [
1512
1513
  ...s.collection
1513
1514
  ]
1514
- ), s.collection.add(u);
1515
+ ), s.collection.add(c);
1515
1516
  },
1516
- remove(u) {
1517
- const h = s.collection.getByKey(u);
1518
- h && s.collection.remove(h);
1517
+ remove(c) {
1518
+ const f = s.collection.getByKey(c);
1519
+ f && s.collection.remove(f);
1519
1520
  },
1520
1521
  collectionComponent: e,
1521
1522
  destroy() {
1522
- i.categoryManager.removeOwner(j), t.destroy(), o.destroy(), l(), C();
1523
+ i.categoryManager.removeOwner(j), t.destroy(), o.destroy(), r(), _();
1523
1524
  }
1524
1525
  };
1525
1526
  }
1526
- function J() {
1527
+ function q() {
1527
1528
  return {
1528
- visibleColor: x.getDefaultOptions().visibleColor,
1529
- shadowColor: x.getDefaultOptions().shadowColor,
1530
- tools: [...Object.values(p)]
1529
+ visibleColor: D.getDefaultOptions().visibleColor,
1530
+ shadowColor: D.getDefaultOptions().shadowColor,
1531
+ tools: [...Object.values(w)]
1531
1532
  };
1532
1533
  }
1533
1534
  const ti = {
@@ -1553,15 +1554,15 @@ const ti = {
1553
1554
  }
1554
1555
  },
1555
1556
  setup(i) {
1556
- const t = i.getConfig(), o = U({ ...J(), ...t });
1557
+ const t = i.getConfig(), o = U({ ...q(), ...t });
1557
1558
  function e() {
1558
1559
  i.setConfig(o.value);
1559
1560
  }
1560
1561
  return {
1561
1562
  localConfig: o,
1562
- ViewshedTypes: p,
1563
+ ViewshedTypes: w,
1563
1564
  apply: e,
1564
- toolItems: Object.values(p).map((s) => ({
1565
+ toolItems: Object.values(w).map((s) => ({
1565
1566
  value: s,
1566
1567
  title: `viewshed.${s}`
1567
1568
  }))
@@ -1569,22 +1570,22 @@ const ti = {
1569
1570
  }
1570
1571
  };
1571
1572
  function ii(i, t, o, e, s, n) {
1572
- const d = b("VcsLabel"), l = b("v-col"), c = b("VcsSelect"), C = b("v-row"), u = b("VColorPicker"), h = b("v-container"), w = b("VcsFormSection"), g = b("AbstractConfigEditor");
1573
- return M(), D(g, it({ onSubmit: e.apply }, { ...i.$attrs, ...i.$props }), {
1574
- default: f(() => [
1575
- e.localConfig ? (M(), D(w, {
1573
+ const d = b("VcsLabel"), r = b("v-col"), l = b("VcsSelect"), _ = b("v-row"), c = b("VColorPicker"), f = b("v-container"), m = b("VcsFormSection"), g = b("AbstractConfigEditor");
1574
+ return M(), N(g, it({ onSubmit: e.apply }, { ...i.$attrs, ...i.$props }), {
1575
+ default: h(() => [
1576
+ e.localConfig ? (M(), N(m, {
1576
1577
  key: 0,
1577
1578
  heading: "viewshed.editor.general"
1578
1579
  }, {
1579
- default: f(() => [
1580
- m(h, { class: "px-1 py-0" }, {
1581
- default: f(() => [
1582
- m(C, { "no-gutters": "" }, {
1583
- default: f(() => [
1584
- m(l, null, {
1585
- default: f(() => [
1586
- m(d, { "html-for": "viewshed-editor-tools" }, {
1587
- default: f(() => [
1580
+ default: h(() => [
1581
+ p(f, { class: "px-1 py-0" }, {
1582
+ default: h(() => [
1583
+ p(_, { "no-gutters": "" }, {
1584
+ default: h(() => [
1585
+ p(r, null, {
1586
+ default: h(() => [
1587
+ p(d, { "html-for": "viewshed-editor-tools" }, {
1588
+ default: h(() => [
1588
1589
  F(
1589
1590
  A(i.$t("viewshed.editor.tools")),
1590
1591
  1
@@ -1598,13 +1599,13 @@ function ii(i, t, o, e, s, n) {
1598
1599
  _: 1
1599
1600
  /* STABLE */
1600
1601
  }),
1601
- m(l, null, {
1602
- default: f(() => [
1603
- m(c, {
1602
+ p(r, null, {
1603
+ default: h(() => [
1604
+ p(l, {
1604
1605
  id: "viewshed-tools",
1605
1606
  items: e.toolItems,
1606
1607
  modelValue: e.localConfig.tools,
1607
- "onUpdate:modelValue": t[0] || (t[0] = (V) => e.localConfig.tools = V),
1608
+ "onUpdate:modelValue": t[0] || (t[0] = (y) => e.localConfig.tools = y),
1608
1609
  multiple: !0
1609
1610
  }, null, 8, ["items", "modelValue"])
1610
1611
  ]),
@@ -1615,12 +1616,12 @@ function ii(i, t, o, e, s, n) {
1615
1616
  _: 1
1616
1617
  /* STABLE */
1617
1618
  }),
1618
- m(C, { "no-gutters": "" }, {
1619
- default: f(() => [
1620
- m(l, null, {
1621
- default: f(() => [
1622
- m(d, { "html-for": "viewshed-editor-visible-color" }, {
1623
- default: f(() => [
1619
+ p(_, { "no-gutters": "" }, {
1620
+ default: h(() => [
1621
+ p(r, null, {
1622
+ default: h(() => [
1623
+ p(d, { "html-for": "viewshed-editor-visible-color" }, {
1624
+ default: h(() => [
1624
1625
  F(
1625
1626
  A(i.$t("viewshed.editor.visibleColor")),
1626
1627
  1
@@ -1634,11 +1635,11 @@ function ii(i, t, o, e, s, n) {
1634
1635
  _: 1
1635
1636
  /* STABLE */
1636
1637
  }),
1637
- m(l, null, {
1638
- default: f(() => [
1639
- m(u, {
1638
+ p(r, null, {
1639
+ default: h(() => [
1640
+ p(c, {
1640
1641
  modelValue: e.localConfig.visibleColor,
1641
- "onUpdate:modelValue": t[1] || (t[1] = (V) => e.localConfig.visibleColor = V),
1642
+ "onUpdate:modelValue": t[1] || (t[1] = (y) => e.localConfig.visibleColor = y),
1642
1643
  mode: "rgba"
1643
1644
  }, null, 8, ["modelValue"])
1644
1645
  ]),
@@ -1649,12 +1650,12 @@ function ii(i, t, o, e, s, n) {
1649
1650
  _: 1
1650
1651
  /* STABLE */
1651
1652
  }),
1652
- m(C, { "no-gutters": "" }, {
1653
- default: f(() => [
1654
- m(l, null, {
1655
- default: f(() => [
1656
- m(d, { "html-for": "viewshed-editor-shadow-color" }, {
1657
- default: f(() => [
1653
+ p(_, { "no-gutters": "" }, {
1654
+ default: h(() => [
1655
+ p(r, null, {
1656
+ default: h(() => [
1657
+ p(d, { "html-for": "viewshed-editor-shadow-color" }, {
1658
+ default: h(() => [
1658
1659
  F(
1659
1660
  A(i.$t("viewshed.editor.shadowColor")),
1660
1661
  1
@@ -1668,11 +1669,11 @@ function ii(i, t, o, e, s, n) {
1668
1669
  _: 1
1669
1670
  /* STABLE */
1670
1671
  }),
1671
- m(l, null, {
1672
- default: f(() => [
1673
- m(u, {
1672
+ p(r, null, {
1673
+ default: h(() => [
1674
+ p(c, {
1674
1675
  modelValue: e.localConfig.shadowColor,
1675
- "onUpdate:modelValue": t[2] || (t[2] = (V) => e.localConfig.shadowColor = V),
1676
+ "onUpdate:modelValue": t[2] || (t[2] = (y) => e.localConfig.shadowColor = y),
1676
1677
  mode: "rgba"
1677
1678
  }, null, 8, ["modelValue"])
1678
1679
  ]),
@@ -1690,7 +1691,7 @@ function ii(i, t, o, e, s, n) {
1690
1691
  ]),
1691
1692
  _: 1
1692
1693
  /* STABLE */
1693
- })) : $("v-if", !0)
1694
+ })) : H("v-if", !0)
1694
1695
  ]),
1695
1696
  _: 1
1696
1697
  /* STABLE */
@@ -1718,8 +1719,8 @@ function ui(i) {
1718
1719
  async initialize(s, n) {
1719
1720
  o = s, s.categoryClassRegistry.registerClass(
1720
1721
  this[$e],
1721
- ne.className,
1722
- ne
1722
+ ae.className,
1723
+ ae
1723
1724
  );
1724
1725
  const d = await ei(s);
1725
1726
  t = Lt(
@@ -1727,55 +1728,55 @@ function ui(i) {
1727
1728
  i,
1728
1729
  d
1729
1730
  );
1730
- const l = qt(
1731
+ const r = qt(
1731
1732
  s,
1732
1733
  t,
1733
1734
  j,
1734
- i.tools || J().tools
1735
- ), { destroy: c } = Jt(
1735
+ i.tools || q().tools
1736
+ ), { destroy: l } = Jt(
1736
1737
  t,
1737
1738
  s,
1738
1739
  d.collectionComponent
1739
- ), { activeMap: C } = s.maps;
1740
- function u(g) {
1741
- if (n != null && n.m && n.cv && g instanceof G) {
1742
- n.cv.properties.title && delete n.cv.properties.title;
1743
- const V = new x(n.cv);
1744
- n.m === y.VIEW ? t.viewViewshed(V) : t.editViewshed(V);
1740
+ ), { activeMap: _ } = s.maps;
1741
+ function c(g) {
1742
+ if (n != null && n.m && n.cv && g instanceof $) {
1743
+ const y = new D(n.cv);
1744
+ n.m === E.VIEW ? t.viewViewshed(y) : t.editViewshed(y);
1745
1745
  }
1746
1746
  }
1747
- let h = !1;
1748
- C && (h = !0, u(C));
1749
- const w = s.maps.mapActivated.addEventListener(
1747
+ let f = !1;
1748
+ _ && (f = !0, c(_));
1749
+ const m = s.maps.mapActivated.addEventListener(
1750
1750
  (g) => {
1751
- t.stop(), h || (u(g), h = !0);
1751
+ t.stop(), f || (c(g), f = !0);
1752
1752
  }
1753
1753
  );
1754
1754
  e = () => {
1755
- w(), l(), c(), d.destroy(), t.destroy();
1755
+ m(), r(), l(), d.destroy(), t.destroy();
1756
1756
  };
1757
1757
  },
1758
1758
  /**
1759
1759
  * should return all default values of the configuration
1760
1760
  * @returns {ViewshedPluginOptions}
1761
1761
  */
1762
- getDefaultOptions: J,
1762
+ getDefaultOptions: q,
1763
1763
  /**
1764
1764
  * should return the plugin's serialization excluding all default values
1765
1765
  * @returns {ViewshedPluginOptions}
1766
1766
  */
1767
1767
  toJSON() {
1768
1768
  const s = {};
1769
- return i.tools && J().tools.length !== i.tools.length && (s.tools = [...i.tools]), i.shadowColor && i.shadowColor !== x.getDefaultOptions().shadowColor && (s.shadowColor = i.shadowColor), i.visibleColor && i.visibleColor !== x.getDefaultOptions().visibleColor && (s.visibleColor = i.visibleColor), s;
1769
+ return i.tools && q().tools.length !== i.tools.length && (s.tools = [...i.tools]), i.shadowColor && i.shadowColor !== D.getDefaultOptions().shadowColor && (s.shadowColor = i.shadowColor), i.visibleColor && i.visibleColor !== D.getDefaultOptions().visibleColor && (s.visibleColor = i.visibleColor), s;
1770
1770
  },
1771
1771
  /**
1772
1772
  * should return the plugins state
1773
+ * @param {boolean} forUrl
1773
1774
  * @returns {ViewshedPluginState}
1774
1775
  */
1775
- getState() {
1776
- var l;
1777
- const s = {}, n = t.mode.value, d = (l = t.currentViewshed.value) == null ? void 0 : l.toJSON();
1778
- return n !== null && n !== "create" && d && (s.m = n, s.cv = d), s;
1776
+ getState(s) {
1777
+ var l, _;
1778
+ const n = {}, d = t.mode.value, r = (l = t.currentViewshed.value) == null ? void 0 : l.toJSON();
1779
+ return d !== null && d !== "create" && r && (n.m = d, n.cv = r, s && ((_ = n.cv.properties) != null && _.title) && (Object.keys(n.properties).length === 1 ? delete n.cv.properties : delete n.cv.properties.title)), n;
1779
1780
  },
1780
1781
  /**
1781
1782
  * components for configuring the plugin and/ or custom items defined by the plugin
@@ -1810,11 +1811,11 @@ function ui(i) {
1810
1811
  absolute: "Absolute",
1811
1812
  new: "New",
1812
1813
  cancel: "Cancel",
1813
- [p.CONE]: "Cone viewshed analysis",
1814
- [p.THREESIXTY]: "360° viewshed analysis",
1814
+ [w.CONE]: "Cone viewshed analysis",
1815
+ [w.THREESIXTY]: "360° viewshed analysis",
1815
1816
  create: {
1816
- [p.CONE]: "Create cone viewshed analysis",
1817
- [p.THREESIXTY]: "Create 360° viewshed analysis"
1817
+ [w.CONE]: "Create cone viewshed analysis",
1818
+ [w.THREESIXTY]: "Create 360° viewshed analysis"
1818
1819
  },
1819
1820
  addToMyWorkspace: "Add to My Workspace",
1820
1821
  temporary: "Temporary",
@@ -1848,11 +1849,11 @@ function ui(i) {
1848
1849
  absolute: "Absolut",
1849
1850
  new: "Neu",
1850
1851
  cancel: "Abbrechen",
1851
- [p.CONE]: "Sichtkegelanalyse",
1852
- [p.THREESIXTY]: "360° Sichtsanalyse",
1852
+ [w.CONE]: "Sichtkegelanalyse",
1853
+ [w.THREESIXTY]: "360° Sichtsanalyse",
1853
1854
  create: {
1854
- [p.CONE]: "Sichtkegelanalyse erstellen",
1855
- [p.THREESIXTY]: "360° Sichtanalyse erstellen"
1855
+ [w.CONE]: "Sichtkegelanalyse erstellen",
1856
+ [w.THREESIXTY]: "360° Sichtanalyse erstellen"
1856
1857
  },
1857
1858
  addToMyWorkspace: "Zu Mein Arbeitsbereich hinzufügen",
1858
1859
  temporary: "Temporäre",