@vcmap/viewshed 3.0.5 → 4.1.0
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/CHANGELOG.md +10 -0
- package/README.md +49 -0
- package/dist/index.js +1174 -1111
- package/package.json +24 -24
- package/src/ViewshedConfigEditor.vue +32 -34
- package/src/ViewshedWindow.vue +152 -160
- package/src/callbacks/activateViewshedCallback.ts +57 -0
- package/src/callbacks/deactivateViewshedCallback.ts +26 -0
- package/src/{index.js → index.ts} +139 -85
- package/src/util/{toolboxHelper.js → toolboxHelper.ts} +57 -38
- package/src/util/{windowHelper.js → windowHelper.ts} +28 -27
- package/src/{viewshed.js → viewshed.ts} +159 -202
- package/src/{viewshedCategory.js → viewshedCategory.ts} +67 -60
- package/src/{viewshedInteraction.js → viewshedInteraction.ts} +20 -14
- package/src/{viewshedManager.js → viewshedManager.ts} +130 -97
- package/src/{viewshedPrimitive.js → viewshedPrimitive.ts} +34 -19
package/dist/index.js
CHANGED
|
@@ -1,13 +1,119 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { VcsCameraPrimitive as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { ol$Observable$unByKey as
|
|
8
|
-
import { VcsTextField as
|
|
9
|
-
import {
|
|
10
|
-
const
|
|
1
|
+
var ze = Object.defineProperty;
|
|
2
|
+
var He = (e, o, t) => o in e ? ze(e, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[o] = t;
|
|
3
|
+
var C = (e, o, t) => He(e, typeof o != "symbol" ? o + "" : o, t);
|
|
4
|
+
import { VcsCameraPrimitive as Ke, VcsObject as Ye, VcsEvent as se, AbstractInteraction as Xe, EventType as oe, Projection as Z, SessionType as Je, CesiumMap as H, startEditFeaturesSession as Ze, startEditGeometrySession as qe, VectorLayer as Qe, maxZIndex as et, wgs84Projection as tt, markVolatile as it, Viewpoint as ot, TransformationMode as st, Category as nt, moduleIdSymbol as ee } from "../../../assets/core.js";
|
|
5
|
+
import { shallowRef as le, ref as K, nextTick as at, defineComponent as Ae, inject as me, reactive as Q, watchEffect as rt, watch as q, onMounted as lt, onUnmounted as ct, computed as dt, resolveComponent as V, openBlock as N, createElementBlock as te, createCommentVNode as Y, createBlock as W, withCtx as v, createTextVNode as z, toDisplayString as j, createVNode as m, createElementVNode as ut, Fragment as Ve, renderList as Se, toRaw as ht, mergeProps as ft } from "../../../assets/vue.js";
|
|
6
|
+
import { Color as ne, Matrix4 as pt, Transforms as mt, Primitive as Oe, PerInstanceColorAppearance as Te, GeometryInstance as Re, SphereGeometry as vt, ColorGeometryInstanceAttribute as Me, SphereOutlineGeometry as wt, Math as F, Cartesian3 as x, ShadowMap as gt, Camera as Ct, HeightReference as _t } from "../../../assets/cesium.js";
|
|
7
|
+
import { ol$Observable$unByKey as Et, Feature as yt, ol$geom$Point as bt, ol$style$Style as Vt } from "../../../assets/ol.js";
|
|
8
|
+
import { VcsWorkspaceWrapper as St, VcsTextField as Ot, VcsSelect as ke, VcsLabeledSlider as Tt, VcsLabel as De, VcsHelp as Rt, VcsFormSection as $e, VcsFeatureTransforms as Mt, VcsFormButton as Nt, makeEditorCollectionComponentClass as It, WindowSlot as Pt, ToolboxType as Ne, createSupportedMapMappingFunction as At, createListExportAction as kt, downloadText as Dt, createListImportAction as $t, NotificationType as re, AbstractConfigEditor as Lt, VcsCallback as Le } from "../../../assets/ui.js";
|
|
9
|
+
import { VRow as Fe, VDivider as Ft, VCol as We, VColorPicker as Wt, VContainer as jt } from "../../../assets/vuetify.js";
|
|
10
|
+
const b = {
|
|
11
|
+
ERROR: 2,
|
|
12
|
+
WARN: 4,
|
|
13
|
+
INFO: 8,
|
|
14
|
+
DEBUG: 16
|
|
15
|
+
}, G = {
|
|
16
|
+
ERROR: 0,
|
|
17
|
+
WARN: 0,
|
|
18
|
+
INFO: 0,
|
|
19
|
+
DEBUG: 0
|
|
20
|
+
};
|
|
21
|
+
G.ERROR = b.ERROR | b.WARN | b.INFO | b.DEBUG;
|
|
22
|
+
G.WARN = b.WARN | b.INFO | b.DEBUG;
|
|
23
|
+
G.INFO = b.INFO | b.DEBUG;
|
|
24
|
+
G.DEBUG = b.DEBUG;
|
|
25
|
+
const ie = {
|
|
26
|
+
logLevel: b.INFO
|
|
27
|
+
}, ae = /* @__PURE__ */ new Map();
|
|
28
|
+
ae.set(b.ERROR, "error");
|
|
29
|
+
ae.set(b.WARN, "warn");
|
|
30
|
+
ae.set(b.INFO, "info");
|
|
31
|
+
ae.set(b.DEBUG, "log");
|
|
32
|
+
class je {
|
|
33
|
+
/**
|
|
34
|
+
* @param {string=} className
|
|
35
|
+
*/
|
|
36
|
+
constructor(o) {
|
|
37
|
+
this.className = o, this.deprecations = /* @__PURE__ */ new Map();
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Logs an error message
|
|
41
|
+
* @param {string} msg The message to log.
|
|
42
|
+
* @param {...any} optArgs
|
|
43
|
+
*/
|
|
44
|
+
error(o, ...t) {
|
|
45
|
+
ie.logLevel & G.ERROR && this._log(String(o), b.ERROR, t);
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Logs a warning message
|
|
49
|
+
* @param {string} msg The message to log.
|
|
50
|
+
* @param {...any} optArgs
|
|
51
|
+
*/
|
|
52
|
+
warning(o, ...t) {
|
|
53
|
+
ie.logLevel & G.WARN && this._log(String(o), b.WARN, t);
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Deprecate a function. deprecations are stored on the logger
|
|
57
|
+
* @param {string} functionName
|
|
58
|
+
* @param {string=} alternativeFunctionName
|
|
59
|
+
*/
|
|
60
|
+
deprecate(o, t) {
|
|
61
|
+
const i = String(o), s = t ? String(t) : null;
|
|
62
|
+
if (!this.deprecations.has(i)) {
|
|
63
|
+
this.deprecations.set(i, s || null);
|
|
64
|
+
let n = `${i} has been deprecated and will be removed`;
|
|
65
|
+
s && (n = `${n}. ${s}`), this.warning(n);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Logs an info message
|
|
70
|
+
* @param {string} msg The message to log.
|
|
71
|
+
* @param {...any} optArgs
|
|
72
|
+
*/
|
|
73
|
+
info(o, ...t) {
|
|
74
|
+
ie.logLevel & G.INFO && this._log(String(o), b.INFO, t);
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Logs a debug message
|
|
78
|
+
* @param {string} msg The message to log.
|
|
79
|
+
* @param {...any} optArgs
|
|
80
|
+
*/
|
|
81
|
+
debug(o, ...t) {
|
|
82
|
+
ie.logLevel & G.DEBUG && this._log(String(o), b.DEBUG, t);
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Alias for debug
|
|
86
|
+
* @param {string} msg The message to log.
|
|
87
|
+
* @param {...any} optArgs
|
|
88
|
+
*/
|
|
89
|
+
log(o, ...t) {
|
|
90
|
+
ie.logLevel & G.DEBUG && this._log(String(o), b.DEBUG, t);
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Logs a message
|
|
94
|
+
* @param {string} msg The message to log.
|
|
95
|
+
* @param {LOG_LEVEL} level
|
|
96
|
+
* @param {Array} optArgs
|
|
97
|
+
* @private
|
|
98
|
+
*/
|
|
99
|
+
_log(o, t, i) {
|
|
100
|
+
let s = o;
|
|
101
|
+
this.className && (s = `[${this.className}] ${s}`), console[ae.get(t)](s, ...i), t & b.ERROR && (console.group(), console.trace(), console.groupEnd());
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
const ve = /* @__PURE__ */ new Map();
|
|
105
|
+
let ce;
|
|
106
|
+
function Gt() {
|
|
107
|
+
return ce || (ce = new je()), ce;
|
|
108
|
+
}
|
|
109
|
+
function Bt(e) {
|
|
110
|
+
const o = new je(e);
|
|
111
|
+
return ve.set(e, o), o;
|
|
112
|
+
}
|
|
113
|
+
function X(e) {
|
|
114
|
+
return e ? ve.has(e) ? ve.get(e) : Bt(e) : Gt();
|
|
115
|
+
}
|
|
116
|
+
const Ge = Symbol("isMatcher"), Ut = Symbol("Integer"), xt = Symbol("NonEmptyString"), Ee = /* @__PURE__ */ new Map();
|
|
11
117
|
[
|
|
12
118
|
[String, "string"],
|
|
13
119
|
[Number, "number"],
|
|
@@ -15,397 +121,389 @@ const Te = Symbol("isMatcher"), yt = Symbol("Integer"), Vt = Symbol("NonEmptyStr
|
|
|
15
121
|
[Function, "function"],
|
|
16
122
|
[void 0, "undefined"],
|
|
17
123
|
[Symbol, "symbol"]
|
|
18
|
-
].forEach(([
|
|
19
|
-
|
|
124
|
+
].forEach(([e, o]) => {
|
|
125
|
+
Ee.set(e, o);
|
|
20
126
|
});
|
|
21
|
-
function
|
|
22
|
-
return
|
|
127
|
+
function zt(e) {
|
|
128
|
+
return e == null ? void 0 : e[Ge];
|
|
23
129
|
}
|
|
24
|
-
function
|
|
25
|
-
if (!
|
|
130
|
+
function we(e) {
|
|
131
|
+
if (!e || String(e) !== "[object Object]")
|
|
26
132
|
return !1;
|
|
27
|
-
const
|
|
28
|
-
if (!
|
|
133
|
+
const o = Object.getPrototypeOf(e);
|
|
134
|
+
if (!o)
|
|
29
135
|
return !0;
|
|
30
|
-
const
|
|
31
|
-
return typeof
|
|
136
|
+
const i = {}.hasOwnProperty.call(o, "constructor") && o.constructor;
|
|
137
|
+
return typeof i == "function" && String(i) === String(Object);
|
|
32
138
|
}
|
|
33
|
-
function
|
|
34
|
-
if (
|
|
139
|
+
function A(e, o) {
|
|
140
|
+
if (e === null)
|
|
35
141
|
return "null";
|
|
36
|
-
if (typeof
|
|
142
|
+
if (typeof e > "u")
|
|
37
143
|
return "undefined";
|
|
38
|
-
if (
|
|
39
|
-
return typeof
|
|
40
|
-
let
|
|
41
|
-
if (Array.isArray(
|
|
42
|
-
|
|
144
|
+
if (o)
|
|
145
|
+
return typeof e;
|
|
146
|
+
let t;
|
|
147
|
+
if (Array.isArray(e))
|
|
148
|
+
t = `[${e.map((s) => A(s, o)).join(",")}]`;
|
|
43
149
|
else
|
|
44
150
|
try {
|
|
45
|
-
|
|
151
|
+
t = JSON.stringify(e);
|
|
46
152
|
} catch {
|
|
47
|
-
|
|
153
|
+
t = typeof e;
|
|
48
154
|
}
|
|
49
|
-
return
|
|
155
|
+
return t = t || typeof e, t.length > 20 ? `${t.substring(0, 20)}...` : t;
|
|
50
156
|
}
|
|
51
|
-
function
|
|
52
|
-
return typeof
|
|
157
|
+
function Ht(e, o) {
|
|
158
|
+
return typeof o == "string" || typeof o == "number" || typeof o == "boolean" || typeof o == "symbol" ? e === o ? !1 : `Expected ${A(e)} to equal ${o.toString()}` : null;
|
|
53
159
|
}
|
|
54
|
-
function
|
|
55
|
-
if (Array.isArray(
|
|
56
|
-
if (
|
|
160
|
+
function Kt(e, o, t) {
|
|
161
|
+
if (Array.isArray(o)) {
|
|
162
|
+
if (o.length !== 1)
|
|
57
163
|
throw new Error("Array patterns may only have one type");
|
|
58
|
-
if (Array.isArray(
|
|
59
|
-
let
|
|
60
|
-
return
|
|
164
|
+
if (Array.isArray(e)) {
|
|
165
|
+
let i = !1;
|
|
166
|
+
return e.findIndex((n) => (i = t(n, o[0]), i)) > -1 ? `${String(i)} in ${A(e)}` : !1;
|
|
61
167
|
}
|
|
62
|
-
return `Expected ${
|
|
168
|
+
return `Expected ${A(e)} to be an Array`;
|
|
63
169
|
}
|
|
64
170
|
return null;
|
|
65
171
|
}
|
|
66
|
-
function
|
|
67
|
-
const s =
|
|
68
|
-
if (!
|
|
69
|
-
return `Expected ${
|
|
70
|
-
let
|
|
71
|
-
const
|
|
72
|
-
const
|
|
73
|
-
return
|
|
172
|
+
function ge(e, o, t, i) {
|
|
173
|
+
const s = i ? `${i}.` : "";
|
|
174
|
+
if (!we(e))
|
|
175
|
+
return `Expected ${A(e)} to be a plain Object`;
|
|
176
|
+
let d = !1;
|
|
177
|
+
const r = Object.keys(o).find((u) => {
|
|
178
|
+
const l = e[u];
|
|
179
|
+
return we(o[u]) ? d = ge(l, o[u], t, s + u) : d = t(l, o[u]), d;
|
|
74
180
|
});
|
|
75
|
-
return
|
|
181
|
+
return r ? `${String(d)} in object.${s}${r}` : !1;
|
|
76
182
|
}
|
|
77
|
-
function
|
|
78
|
-
if (
|
|
79
|
-
return Number.isFinite(
|
|
80
|
-
if (
|
|
81
|
-
return Number.isInteger(
|
|
82
|
-
if (
|
|
83
|
-
return typeof
|
|
84
|
-
const
|
|
85
|
-
return
|
|
183
|
+
function Yt(e, o) {
|
|
184
|
+
if (o === Number)
|
|
185
|
+
return Number.isFinite(e) ? !1 : `expected ${A(e)} to be a number, excluding NaN`;
|
|
186
|
+
if (o === Ut)
|
|
187
|
+
return Number.isInteger(e) ? !1 : `expected ${A(e)} to be an integer number`;
|
|
188
|
+
if (o === xt)
|
|
189
|
+
return typeof e == "string" && e.length > 0 ? !1 : `expected ${A(e)} to be a non-empty string`;
|
|
190
|
+
const t = Ee.get(o);
|
|
191
|
+
return t ? typeof e === t ? !1 : `expected ${A(e)} to be a ${String(t)}` : null;
|
|
86
192
|
}
|
|
87
|
-
function
|
|
88
|
-
if (
|
|
193
|
+
function Be(e) {
|
|
194
|
+
if (e === null)
|
|
89
195
|
return "null";
|
|
90
|
-
const
|
|
91
|
-
if (e)
|
|
92
|
-
return e;
|
|
93
|
-
const o = i == null ? void 0 : i.className;
|
|
196
|
+
const o = Ee.get(e);
|
|
94
197
|
if (o)
|
|
95
198
|
return o;
|
|
96
|
-
|
|
97
|
-
|
|
199
|
+
const t = e == null ? void 0 : e.className;
|
|
200
|
+
if (t)
|
|
201
|
+
return t;
|
|
202
|
+
let i = String(e);
|
|
203
|
+
const s = i.match(/function (.*)\(/);
|
|
98
204
|
if (s && s.length > 1) {
|
|
99
|
-
const n =
|
|
205
|
+
const n = e == null ? void 0 : e.name;
|
|
100
206
|
return n || s[1].substring(0, 20);
|
|
101
207
|
}
|
|
102
|
-
if (
|
|
208
|
+
if (we(e)) {
|
|
103
209
|
const n = {};
|
|
104
|
-
Object.keys(
|
|
105
|
-
n[
|
|
210
|
+
Object.keys(e).forEach((d) => {
|
|
211
|
+
n[d] = Be(e[d]);
|
|
106
212
|
});
|
|
107
213
|
try {
|
|
108
|
-
|
|
214
|
+
i = `Object of ${JSON.stringify(n)}`;
|
|
109
215
|
} catch {
|
|
110
|
-
|
|
216
|
+
i = "Object";
|
|
111
217
|
}
|
|
112
218
|
}
|
|
113
|
-
return
|
|
219
|
+
return i;
|
|
114
220
|
}
|
|
115
|
-
function
|
|
116
|
-
const
|
|
117
|
-
if (
|
|
118
|
-
return s(
|
|
221
|
+
function Xt(e, o) {
|
|
222
|
+
const t = (i, s) => {
|
|
223
|
+
if (zt(s))
|
|
224
|
+
return s(i);
|
|
119
225
|
if (s == null)
|
|
120
|
-
return
|
|
121
|
-
const n =
|
|
226
|
+
return i === s ? !1 : `Expected ${A(i)} to be ${String(s)}`;
|
|
227
|
+
const n = Yt(i, s);
|
|
122
228
|
if (n !== null)
|
|
123
229
|
return n;
|
|
124
|
-
const
|
|
125
|
-
if (
|
|
126
|
-
return
|
|
230
|
+
const d = Ht(i, s);
|
|
231
|
+
if (d !== null)
|
|
232
|
+
return d;
|
|
127
233
|
if (Array.isArray(s))
|
|
128
|
-
return
|
|
234
|
+
return Kt(i, s, t);
|
|
129
235
|
if (s === Object)
|
|
130
|
-
return
|
|
236
|
+
return ge(i, {}, t);
|
|
131
237
|
if (s instanceof Function)
|
|
132
|
-
return
|
|
238
|
+
return i instanceof s ? !1 : `Expected ${A(i, !0)} to be of Type ${Be(s)}`;
|
|
133
239
|
if (typeof s == "object") {
|
|
134
|
-
const
|
|
135
|
-
return
|
|
240
|
+
const r = ge(i, s, t);
|
|
241
|
+
return r || !1;
|
|
136
242
|
}
|
|
137
243
|
throw new Error(`Cannot handle pattern ${String(s)}`);
|
|
138
244
|
};
|
|
139
|
-
return
|
|
245
|
+
return t(e, o);
|
|
140
246
|
}
|
|
141
|
-
let
|
|
142
|
-
function
|
|
143
|
-
const
|
|
144
|
-
if (
|
|
145
|
-
throw new
|
|
247
|
+
let Jt = Error;
|
|
248
|
+
function ye(e, o) {
|
|
249
|
+
const t = Xt(e, o);
|
|
250
|
+
if (t)
|
|
251
|
+
throw new Jt(`Match failed: ${t}`);
|
|
146
252
|
}
|
|
147
|
-
function
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
253
|
+
function Zt(e, o) {
|
|
254
|
+
ye(e, Object);
|
|
255
|
+
let t = Object.values(e);
|
|
256
|
+
const i = (s) => t.includes(s) ? !1 : `expected ${A(s)} to be of enum: ${t.join(", ")}`;
|
|
257
|
+
return i[Ge] = !0, i;
|
|
151
258
|
}
|
|
152
|
-
function
|
|
153
|
-
if (
|
|
154
|
-
const
|
|
155
|
-
if (
|
|
156
|
-
return
|
|
259
|
+
function Ue(e, o, t) {
|
|
260
|
+
if (e != null) {
|
|
261
|
+
const i = Object.values(o).find((s) => s == e);
|
|
262
|
+
if (i != null)
|
|
263
|
+
return i;
|
|
157
264
|
}
|
|
158
|
-
return
|
|
265
|
+
return t;
|
|
159
266
|
}
|
|
160
|
-
const
|
|
161
|
-
class
|
|
162
|
-
constructor(
|
|
163
|
-
super(
|
|
267
|
+
const qt = new ne(), de = new pt();
|
|
268
|
+
class Qt extends Ke {
|
|
269
|
+
constructor(t) {
|
|
270
|
+
super(t);
|
|
271
|
+
C(this, "spot");
|
|
272
|
+
C(this, "_allowPicking");
|
|
273
|
+
C(this, "_color", ne.WHITE);
|
|
274
|
+
C(this, "_camera");
|
|
275
|
+
C(this, "_planesPrimitives", []);
|
|
276
|
+
C(this, "_outlinePrimitives", []);
|
|
277
|
+
this.spot = t.spot, this._camera = t.camera, this._allowPicking = t.allowPicking;
|
|
164
278
|
}
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
update(e) {
|
|
279
|
+
static get className() {
|
|
280
|
+
return "ViewshedCameraPrimitive";
|
|
281
|
+
}
|
|
282
|
+
update(t) {
|
|
170
283
|
if (this.show)
|
|
171
284
|
if (this.spot)
|
|
172
|
-
super.update(
|
|
285
|
+
super.update(t);
|
|
173
286
|
else {
|
|
174
|
-
const
|
|
175
|
-
|
|
287
|
+
const i = this._planesPrimitives, s = this._outlinePrimitives;
|
|
288
|
+
i.length === 0 && (mt.eastNorthUpToFixedFrame(
|
|
176
289
|
this._camera.positionWC,
|
|
177
290
|
void 0,
|
|
178
|
-
|
|
179
|
-
),
|
|
180
|
-
allowPicking: this.
|
|
181
|
-
geometryInstances: new
|
|
182
|
-
geometry: new
|
|
291
|
+
de
|
|
292
|
+
), i[0] = new Oe({
|
|
293
|
+
allowPicking: this._allowPicking,
|
|
294
|
+
geometryInstances: new Re({
|
|
295
|
+
geometry: new vt({
|
|
183
296
|
radius: 2
|
|
184
297
|
}),
|
|
185
298
|
attributes: {
|
|
186
|
-
color:
|
|
187
|
-
|
|
299
|
+
color: Me.fromColor(
|
|
300
|
+
ne.fromAlpha(this._color, 0.1, qt)
|
|
188
301
|
)
|
|
189
302
|
},
|
|
190
|
-
modelMatrix:
|
|
303
|
+
modelMatrix: de
|
|
191
304
|
}),
|
|
192
|
-
appearance: new
|
|
305
|
+
appearance: new Te({
|
|
193
306
|
translucent: !0,
|
|
194
307
|
flat: !0
|
|
195
308
|
}),
|
|
196
309
|
asynchronous: !1
|
|
197
|
-
}),
|
|
198
|
-
allowPicking: this.
|
|
199
|
-
geometryInstances: new
|
|
200
|
-
geometry: new
|
|
310
|
+
}), s[0] = new Oe({
|
|
311
|
+
allowPicking: this._allowPicking,
|
|
312
|
+
geometryInstances: new Re({
|
|
313
|
+
geometry: new wt({
|
|
201
314
|
radius: 2
|
|
202
315
|
}),
|
|
203
316
|
attributes: {
|
|
204
|
-
color:
|
|
317
|
+
color: Me.fromColor(this._color)
|
|
205
318
|
},
|
|
206
|
-
modelMatrix:
|
|
319
|
+
modelMatrix: de
|
|
207
320
|
}),
|
|
208
|
-
appearance: new
|
|
321
|
+
appearance: new Te({
|
|
209
322
|
translucent: !1,
|
|
210
323
|
flat: !0
|
|
211
324
|
}),
|
|
212
325
|
asynchronous: !1
|
|
213
326
|
}));
|
|
214
|
-
const { length:
|
|
215
|
-
for (let
|
|
216
|
-
|
|
327
|
+
const { length: n } = i;
|
|
328
|
+
for (let d = 0; d < n; ++d)
|
|
329
|
+
s[d].update(t), i[d].update(t);
|
|
217
330
|
}
|
|
218
331
|
}
|
|
219
332
|
}
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
function Dt(i, e) {
|
|
225
|
-
const o = new Je(i), t = (
|
|
226
|
-
/** @type {import("@vcmap-cesium/engine").PerspectiveFrustum} */
|
|
227
|
-
o.frustum
|
|
228
|
-
);
|
|
229
|
-
return t.fov = e.fov, t.near = e.near, t.aspectRatio = e.aspectRatio, t.far = e.far, o;
|
|
333
|
+
var _ = /* @__PURE__ */ ((e) => (e.CONE = "cone", e.THREESIXTY = "360", e))(_ || {});
|
|
334
|
+
function ei(e, o) {
|
|
335
|
+
const t = new Ct(e), i = t.frustum;
|
|
336
|
+
return i.fov = o.fov, i.near = o.near, i.aspectRatio = o.aspectRatio, i.far = o.far, t;
|
|
230
337
|
}
|
|
231
|
-
const
|
|
338
|
+
const P = class P extends Ye {
|
|
339
|
+
constructor(t) {
|
|
340
|
+
var i, s, n, d, r, u;
|
|
341
|
+
super(t);
|
|
342
|
+
C(this, "_cesiumMap", null);
|
|
343
|
+
C(this, "_shadowCamera", null);
|
|
344
|
+
C(this, "_scene", null);
|
|
345
|
+
C(this, "_frustumOptions");
|
|
346
|
+
C(this, "_headingPitchRollValues");
|
|
347
|
+
/**
|
|
348
|
+
* The viewsheds position, excluding height offset, in lat/lon degrees.
|
|
349
|
+
*/
|
|
350
|
+
C(this, "_position");
|
|
351
|
+
C(this, "_viewshedType");
|
|
352
|
+
C(this, "_colors");
|
|
353
|
+
C(this, "_heightOffset");
|
|
354
|
+
C(this, "_shadowMap", null);
|
|
355
|
+
C(this, "_primitive", null);
|
|
356
|
+
C(this, "_showPrimitive");
|
|
357
|
+
C(this, "_positionChanged", new se());
|
|
358
|
+
C(this, "_active", !1);
|
|
359
|
+
this._frustumOptions = {
|
|
360
|
+
fov: ((i = t.frustumOptions) == null ? void 0 : i.fov) || P.getDefaultOptions().frustumOptions.fov,
|
|
361
|
+
far: ((s = t.frustumOptions) == null ? void 0 : s.far) || P.getDefaultOptions().frustumOptions.far,
|
|
362
|
+
near: ((n = t.frustumOptions) == null ? void 0 : n.near) || P.getDefaultOptions().frustumOptions.near,
|
|
363
|
+
aspectRatio: ((d = t.frustumOptions) == null ? void 0 : d.aspectRatio) || P.getDefaultOptions().frustumOptions.aspectRatio
|
|
364
|
+
}, this._headingPitchRollValues = t.orientation || {
|
|
365
|
+
...P.getDefaultOptions().orientation
|
|
366
|
+
}, this._position = t.position || P.getDefaultOptions().position, this._viewshedType = Ue(
|
|
367
|
+
t.viewshedType,
|
|
368
|
+
_,
|
|
369
|
+
"cone"
|
|
370
|
+
/* CONE */
|
|
371
|
+
), this._colors = {
|
|
372
|
+
visibleColor: ne.fromCssColorString(
|
|
373
|
+
((r = t.colorOptions) == null ? void 0 : r.visibleColor) || P.getDefaultOptions().colorOptions.visibleColor
|
|
374
|
+
),
|
|
375
|
+
shadowColor: ne.fromCssColorString(
|
|
376
|
+
((u = t.colorOptions) == null ? void 0 : u.shadowColor) || P.getDefaultOptions().colorOptions.shadowColor
|
|
377
|
+
)
|
|
378
|
+
}, this._heightOffset = t.heightOffset || 0, this._showPrimitive = !!t.showPrimitive;
|
|
379
|
+
}
|
|
232
380
|
static get className() {
|
|
233
381
|
return "Viewshed";
|
|
234
382
|
}
|
|
235
|
-
/**
|
|
236
|
-
* Returns the default viewshed options.
|
|
237
|
-
* @returns {{frustum: ShadowFrustumOptions, shadowColor: string, visibleColor: string, orientation: import("@vcmap-cesium/engine").HeadingPitchRollValues, position: import("ol/coordinate").Coordinate}}
|
|
238
|
-
*/
|
|
239
383
|
static getDefaultOptions() {
|
|
240
384
|
return {
|
|
241
|
-
|
|
242
|
-
|
|
385
|
+
colorOptions: { shadowColor: "#3333331A", visibleColor: "#FF990080" },
|
|
386
|
+
frustumOptions: {
|
|
387
|
+
fov: F.PI / 3,
|
|
243
388
|
near: 1,
|
|
244
389
|
aspectRatio: 1,
|
|
245
390
|
far: 300
|
|
246
391
|
},
|
|
247
|
-
|
|
248
|
-
visibleColor: "#FF990080",
|
|
249
|
-
orientation: {
|
|
250
|
-
heading: 0,
|
|
251
|
-
pitch: 0,
|
|
252
|
-
roll: 0
|
|
253
|
-
},
|
|
392
|
+
orientation: { heading: 0, pitch: 0, roll: 0 },
|
|
254
393
|
position: [0, 0, 0]
|
|
255
394
|
};
|
|
256
395
|
}
|
|
257
|
-
/**
|
|
258
|
-
* @param {ViewshedOptions} options The options for the viewshed.
|
|
259
|
-
*/
|
|
260
|
-
constructor(e) {
|
|
261
|
-
var o, t, s, n, r, l;
|
|
262
|
-
super(e), this._cesiumMap = null, this._shadowCamera = null, this._scene = null, this._frustumOptions = {
|
|
263
|
-
fov: ((o = e.frustumOptions) == null ? void 0 : o.fov) || I.getDefaultOptions().frustum.fov,
|
|
264
|
-
far: ((t = e.frustumOptions) == null ? void 0 : t.far) || I.getDefaultOptions().frustum.far,
|
|
265
|
-
near: ((s = e.frustumOptions) == null ? void 0 : s.near) || I.getDefaultOptions().frustum.near,
|
|
266
|
-
aspectRatio: ((n = e.frustumOptions) == null ? void 0 : n.aspectRatio) || I.getDefaultOptions().frustum.aspectRatio
|
|
267
|
-
}, this._headingPitchRollValues = e.orientation || {
|
|
268
|
-
...I.getDefaultOptions().orientation
|
|
269
|
-
}, this._position = e.position || I.getDefaultOptions().position, this._viewshedType = At(e.viewshedType, g), this._colors = {
|
|
270
|
-
visibleColor: ee.fromCssColorString(
|
|
271
|
-
((r = e.colorOptions) == null ? void 0 : r.visibleColor) || I.getDefaultOptions().visibleColor
|
|
272
|
-
),
|
|
273
|
-
shadowColor: ee.fromCssColorString(
|
|
274
|
-
((l = e.colorOptions) == null ? void 0 : l.shadowColor) || I.getDefaultOptions().shadowColor
|
|
275
|
-
)
|
|
276
|
-
}, this._heightOffset = e.heightOffset || 0, this._shadowMap = null, this._primitive = null, this._showPrimitive = !!e.showPrimitive, this._positionChanged = new X(), this._active = !1;
|
|
277
|
-
}
|
|
278
396
|
/**
|
|
279
397
|
* 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
|
-
* @param
|
|
398
|
+
* @param coords The new positions coordinates in degrees
|
|
281
399
|
*/
|
|
282
|
-
set position(
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
), this._shadowCamera.setView({ orientation: this._headingPitchRollValues }), this._updatePrimitive()), this._positionChanged.raiseEvent(
|
|
400
|
+
set position(t) {
|
|
401
|
+
ye(t, [Number]), this._position = t, this._shadowCamera && (this._shadowCamera.position = x.fromDegrees(
|
|
402
|
+
t[0],
|
|
403
|
+
t[1],
|
|
404
|
+
t[2] + this._heightOffset
|
|
405
|
+
), this._shadowCamera.setView({ orientation: this._headingPitchRollValues }), this._updatePrimitive()), this._positionChanged.raiseEvent(t);
|
|
288
406
|
}
|
|
289
407
|
/**
|
|
290
|
-
* @returns
|
|
408
|
+
* @returns The current position of the viewshed source.
|
|
291
409
|
*/
|
|
292
410
|
get position() {
|
|
293
411
|
return [...this._position];
|
|
294
412
|
}
|
|
295
413
|
/**
|
|
296
414
|
* Getter for Event that is triggered each time the position is changed.
|
|
297
|
-
* @returns
|
|
415
|
+
* @returns The new position
|
|
298
416
|
*/
|
|
299
417
|
get positionChanged() {
|
|
300
418
|
return this._positionChanged;
|
|
301
419
|
}
|
|
302
420
|
/**
|
|
303
421
|
* Sets the height offset of the viewshed.
|
|
304
|
-
* @param
|
|
422
|
+
* @param value the offset that is added to the position height.
|
|
305
423
|
*/
|
|
306
|
-
set heightOffset(
|
|
307
|
-
this._heightOffset =
|
|
424
|
+
set heightOffset(t) {
|
|
425
|
+
this._heightOffset = t, this._shadowCamera && (this._shadowCamera.position = x.fromDegrees(
|
|
308
426
|
this.position[0],
|
|
309
427
|
this.position[1],
|
|
310
|
-
this.position[2] +
|
|
428
|
+
this.position[2] + t
|
|
311
429
|
), this._updatePrimitive());
|
|
312
430
|
}
|
|
313
|
-
/**
|
|
314
|
-
* Getter for height offset.
|
|
315
|
-
* @returns {number}
|
|
316
|
-
*/
|
|
317
431
|
get heightOffset() {
|
|
318
432
|
return this._heightOffset;
|
|
319
433
|
}
|
|
320
434
|
/**
|
|
321
435
|
* Sets the reach of the viewshed.
|
|
322
|
-
* @param
|
|
436
|
+
* @param value The distance in meters.
|
|
323
437
|
*/
|
|
324
|
-
set distance(
|
|
325
|
-
this._frustumOptions.far =
|
|
438
|
+
set distance(t) {
|
|
439
|
+
this._frustumOptions.far = t > P.MIN_DISTANCE ? t : P.MIN_DISTANCE, this._shadowCamera && (this._shadowCamera.frustum.far = this._frustumOptions.far, this._viewshedType === "360" && this._updateShadowMap(), this._viewshedType === "cone" && this._updatePrimitive());
|
|
326
440
|
}
|
|
327
441
|
/**
|
|
328
442
|
* Returns the reach of the viewshed.
|
|
329
|
-
* @returns
|
|
443
|
+
* @returns The distance in meters.
|
|
330
444
|
*/
|
|
331
445
|
get distance() {
|
|
332
446
|
return this._frustumOptions.far;
|
|
333
447
|
}
|
|
334
448
|
/**
|
|
335
449
|
* Sets the field of view of a cone viewshed. Does not have a impact on 360 viewshed.
|
|
336
|
-
* @param
|
|
450
|
+
* @param value The field of view in degrees.
|
|
337
451
|
*/
|
|
338
|
-
set fov(
|
|
339
|
-
this._frustumOptions.fov =
|
|
452
|
+
set fov(t) {
|
|
453
|
+
this._frustumOptions.fov = t * F.RADIANS_PER_DEGREE, this._shadowCamera && (this._shadowCamera.frustum.fov = t * F.RADIANS_PER_DEGREE, this._viewshedType === "cone" && (this._updateShadowMap(), this._updatePrimitive()));
|
|
340
454
|
}
|
|
341
455
|
/**
|
|
342
456
|
* Returns the field of view.
|
|
343
|
-
* @returns
|
|
457
|
+
* @returns The field of view in degrees.
|
|
344
458
|
*/
|
|
345
459
|
get fov() {
|
|
346
|
-
return this._frustumOptions.fov *
|
|
460
|
+
return this._frustumOptions.fov * F.DEGREES_PER_RADIAN;
|
|
347
461
|
}
|
|
348
462
|
/**
|
|
349
463
|
* Sets the heading of a cone viewshed. Does not have impact on 360 viewshed.
|
|
350
|
-
* @param
|
|
464
|
+
* @param value Heading in degrees.
|
|
351
465
|
*/
|
|
352
|
-
set heading(
|
|
353
|
-
this._headingPitchRollValues.heading =
|
|
466
|
+
set heading(t) {
|
|
467
|
+
this._headingPitchRollValues.heading = t * F.RADIANS_PER_DEGREE, this._shadowCamera && (this._shadowCamera.setView({
|
|
354
468
|
orientation: {
|
|
355
|
-
heading:
|
|
469
|
+
heading: t * F.RADIANS_PER_DEGREE,
|
|
356
470
|
pitch: this._shadowCamera.pitch,
|
|
357
471
|
roll: 0
|
|
358
472
|
}
|
|
359
|
-
}), this._viewshedType ===
|
|
473
|
+
}), this._viewshedType === "cone" && this._updatePrimitive());
|
|
360
474
|
}
|
|
361
|
-
/**
|
|
362
|
-
* Getter for the heading of a cone viewshed.
|
|
363
|
-
* @returns {number} The heading in degress.
|
|
364
|
-
*/
|
|
365
475
|
get heading() {
|
|
366
|
-
return this._headingPitchRollValues.heading *
|
|
476
|
+
return this._headingPitchRollValues.heading * F.DEGREES_PER_RADIAN;
|
|
367
477
|
}
|
|
368
478
|
/**
|
|
369
479
|
* Sets the pitch of a cone viewshed. 0 is horizontal. Does not have impact on 360 viewshed.
|
|
370
|
-
* @param
|
|
480
|
+
* @param value The pitch in degrees.
|
|
371
481
|
*/
|
|
372
|
-
set pitch(
|
|
373
|
-
if (this._headingPitchRollValues.pitch =
|
|
374
|
-
const
|
|
375
|
-
this._shadowCamera.lookUp(
|
|
482
|
+
set pitch(t) {
|
|
483
|
+
if (this._headingPitchRollValues.pitch = t * F.RADIANS_PER_DEGREE, this._shadowCamera) {
|
|
484
|
+
const i = t * F.RADIANS_PER_DEGREE - this._shadowCamera.pitch;
|
|
485
|
+
this._shadowCamera.lookUp(i), this._viewshedType === "cone" && this._updatePrimitive();
|
|
376
486
|
}
|
|
377
487
|
}
|
|
378
|
-
/**
|
|
379
|
-
* Getter for the pitch of a cone viewshed.
|
|
380
|
-
* @returns {number} The pitch in degrees.
|
|
381
|
-
*/
|
|
382
488
|
get pitch() {
|
|
383
|
-
return this._headingPitchRollValues.pitch *
|
|
489
|
+
return this._headingPitchRollValues.pitch * F.DEGREES_PER_RADIAN;
|
|
384
490
|
}
|
|
385
491
|
/**
|
|
386
492
|
* Sets whether the primitive of the viewshed should be shown or not.
|
|
387
|
-
* @param
|
|
493
|
+
* @param value
|
|
388
494
|
*/
|
|
389
|
-
set showPrimitive(
|
|
390
|
-
this._showPrimitive =
|
|
495
|
+
set showPrimitive(t) {
|
|
496
|
+
this._showPrimitive = t, this._updatePrimitive();
|
|
391
497
|
}
|
|
392
498
|
/**
|
|
393
499
|
* Gets if the primitive of the viewshed is shown or not.
|
|
394
|
-
* @returns {boolean}
|
|
395
500
|
*/
|
|
396
501
|
get showPrimitive() {
|
|
397
502
|
return this._showPrimitive;
|
|
398
503
|
}
|
|
399
|
-
/**
|
|
400
|
-
* Returns the type of the Viewshed.
|
|
401
|
-
* @returns {ViewshedTypes}
|
|
402
|
-
*/
|
|
403
504
|
get type() {
|
|
404
505
|
return this._viewshedType;
|
|
405
506
|
}
|
|
406
|
-
/**
|
|
407
|
-
* @returns {ShadowMap|null}
|
|
408
|
-
*/
|
|
409
507
|
get shadowMap() {
|
|
410
508
|
return this._shadowMap;
|
|
411
509
|
}
|
|
@@ -413,19 +511,19 @@ const I = class I extends Re {
|
|
|
413
511
|
* Deactivates the viewshed by removing primitive and removing shadowMap.
|
|
414
512
|
*/
|
|
415
513
|
deactivate() {
|
|
416
|
-
var
|
|
417
|
-
this._active && (this._removePrimitive(), this._shadowMap.enabled = !1, (
|
|
514
|
+
var t;
|
|
515
|
+
this._active && (this._removePrimitive(), this._shadowMap.enabled = !1, (t = this._shadowMap) == null || t.destroy(), this._shadowCamera = null, this._scene = null, this._cesiumMap = null, this._shadowMap = null, this._active = !1);
|
|
418
516
|
}
|
|
419
517
|
/**
|
|
420
518
|
* Activates viewshed.
|
|
421
|
-
* @param
|
|
519
|
+
* @param The cesium map to which the shadow map of the viewshed is applied to.
|
|
422
520
|
*/
|
|
423
|
-
activate(
|
|
424
|
-
if (this._active || (this._active = !0),
|
|
425
|
-
this._cesiumMap =
|
|
426
|
-
const
|
|
427
|
-
if (
|
|
428
|
-
this._shadowCamera =
|
|
521
|
+
activate(t) {
|
|
522
|
+
if (this._active || (this._active = !0), t !== this._cesiumMap) {
|
|
523
|
+
this._cesiumMap = t;
|
|
524
|
+
const i = t.getScene();
|
|
525
|
+
if (i)
|
|
526
|
+
this._shadowCamera = ei(i, this._frustumOptions), this._position && (this.position = this._position), this._scene = i;
|
|
429
527
|
else
|
|
430
528
|
throw new Error("CesiumMap contains no scene");
|
|
431
529
|
this._updateShadowMap(), this._updatePrimitive();
|
|
@@ -435,13 +533,12 @@ const I = class I extends Re {
|
|
|
435
533
|
* Updates the shadow map by creating a new one and applying all the current parameters.
|
|
436
534
|
*/
|
|
437
535
|
_updateShadowMap() {
|
|
438
|
-
var
|
|
439
|
-
!this._active || !this._shadowCamera || !this._cesiumMap || !this._scene || ((
|
|
440
|
-
// @ts-ignore
|
|
536
|
+
var t;
|
|
537
|
+
!this._active || !this._shadowCamera || !this._cesiumMap || !this._scene || ((t = this._shadowMap) == null || t.destroy(), this._shadowMap = new gt({
|
|
441
538
|
context: this._scene.context,
|
|
442
539
|
lightCamera: this._shadowCamera,
|
|
443
540
|
enabled: !0,
|
|
444
|
-
isPointLight: this._viewshedType ===
|
|
541
|
+
isPointLight: this._viewshedType === "360",
|
|
445
542
|
softShadows: !0,
|
|
446
543
|
fromLightSource: !0,
|
|
447
544
|
cascadesEnabled: !1,
|
|
@@ -451,30 +548,31 @@ const I = class I extends Re {
|
|
|
451
548
|
}), this._shadowMap.viewshed = this._colors, this._cesiumMap.setShadowMap(this._shadowMap));
|
|
452
549
|
}
|
|
453
550
|
_removePrimitive() {
|
|
454
|
-
var
|
|
455
|
-
this._primitive && !this._primitive.isDestroyed() && ((
|
|
551
|
+
var t;
|
|
552
|
+
this._primitive && !this._primitive.isDestroyed() && ((t = this._scene) == null || t.primitives.remove(this._primitive), this._primitive.destroy(), this._primitive = null);
|
|
456
553
|
}
|
|
457
554
|
_updatePrimitive() {
|
|
458
|
-
this._showPrimitive && this._active && this._scene ? (this._removePrimitive(), this._primitive = new
|
|
555
|
+
this._showPrimitive && this._active && this._scene ? (this._removePrimitive(), this._primitive = new Qt({
|
|
459
556
|
camera: this._shadowCamera,
|
|
460
557
|
allowPicking: !1,
|
|
461
|
-
spot: this._viewshedType ===
|
|
558
|
+
spot: this._viewshedType === "cone"
|
|
559
|
+
/* CONE */
|
|
462
560
|
}), this._scene.primitives.add(this._primitive)) : this._removePrimitive();
|
|
463
561
|
}
|
|
464
562
|
/**
|
|
465
563
|
* Sets distance and, in case of cone viewsheds, also heading and pitch. Only works when viewshed is **active**.
|
|
466
|
-
* @param
|
|
564
|
+
* @param target Point to calculate distance, heading and pitch from.
|
|
467
565
|
*/
|
|
468
|
-
lookAt(
|
|
566
|
+
lookAt(t) {
|
|
469
567
|
if (!this._shadowCamera)
|
|
470
568
|
return;
|
|
471
|
-
const
|
|
472
|
-
if (this.distance =
|
|
473
|
-
const
|
|
474
|
-
|
|
569
|
+
const i = x.fromDegrees(t[0], t[1], t[2]);
|
|
570
|
+
if (this.distance = x.distance(this._shadowCamera.position, i), this.type === "cone" && !i.equals(this._shadowCamera.position)) {
|
|
571
|
+
const s = new x();
|
|
572
|
+
x.subtract(i, this._shadowCamera.position, i), x.normalize(i, i), x.normalize(this._shadowCamera.position, s), this._shadowCamera.setView({
|
|
475
573
|
orientation: {
|
|
476
|
-
direction:
|
|
477
|
-
up:
|
|
574
|
+
direction: i,
|
|
575
|
+
up: s
|
|
478
576
|
}
|
|
479
577
|
}), this._headingPitchRollValues.heading = this._shadowCamera.heading, this._headingPitchRollValues.pitch = this._shadowCamera.pitch;
|
|
480
578
|
}
|
|
@@ -482,7 +580,6 @@ const I = class I extends Re {
|
|
|
482
580
|
}
|
|
483
581
|
/**
|
|
484
582
|
* Returns an object with all the settings of a viewshed instance.
|
|
485
|
-
* @returns {ViewshedOptions}
|
|
486
583
|
*/
|
|
487
584
|
toJSON() {
|
|
488
585
|
return {
|
|
@@ -499,24 +596,26 @@ const I = class I extends Re {
|
|
|
499
596
|
heightOffset: this.heightOffset
|
|
500
597
|
};
|
|
501
598
|
}
|
|
502
|
-
/**
|
|
503
|
-
* Destroys the viewshed.
|
|
504
|
-
*/
|
|
505
599
|
destroy() {
|
|
506
|
-
var
|
|
507
|
-
const
|
|
508
|
-
this.deactivate(), ((
|
|
600
|
+
var s;
|
|
601
|
+
const t = this._cesiumMap, i = this._shadowMap;
|
|
602
|
+
this.deactivate(), ((s = t == null ? void 0 : t.getScene()) == null ? void 0 : s.shadowMap) === i && t.setDefaultShadowMap();
|
|
509
603
|
}
|
|
510
604
|
};
|
|
511
|
-
|
|
512
|
-
let
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
605
|
+
C(P, "MIN_DISTANCE", 10);
|
|
606
|
+
let B = P;
|
|
607
|
+
const T = "@vcmap/viewshed", ti = "4.1.0", ii = "^6.3";
|
|
608
|
+
class oi extends Xe {
|
|
609
|
+
constructor(t) {
|
|
610
|
+
super(oe.CLICKMOVE);
|
|
611
|
+
C(this, "_viewshed");
|
|
612
|
+
C(this, "_positioned", new se());
|
|
613
|
+
C(this, "_finished", new se());
|
|
614
|
+
C(this, "_position", !1);
|
|
615
|
+
this._viewshed = t, this.setActive();
|
|
616
|
+
}
|
|
617
|
+
static get className() {
|
|
618
|
+
return "ViewshedInteraction";
|
|
520
619
|
}
|
|
521
620
|
get finished() {
|
|
522
621
|
return this._finished;
|
|
@@ -524,442 +623,514 @@ class kt extends Ne {
|
|
|
524
623
|
get positioned() {
|
|
525
624
|
return this._positioned;
|
|
526
625
|
}
|
|
527
|
-
async pipe(
|
|
528
|
-
return
|
|
626
|
+
async pipe(t) {
|
|
627
|
+
return t.position && (this._position ? (this._viewshed.lookAt(Z.mercatorToWgs84(t.position)), t.type & oe.CLICK && (this.setActive(!1), this._finished.raiseEvent(null))) : (this._viewshed.position = Z.mercatorToWgs84(t.position), t.type & oe.CLICK && (this._position = !0, this._positioned.raiseEvent(null)))), Promise.resolve(t);
|
|
529
628
|
}
|
|
530
629
|
destroy() {
|
|
531
630
|
super.destroy(), this._finished.destroy(), this._positioned.destroy();
|
|
532
631
|
}
|
|
533
632
|
}
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
}, _e = 1.8;
|
|
544
|
-
function xt(i) {
|
|
545
|
-
const e = new Le({
|
|
546
|
-
projection: Fe.toJSON(),
|
|
547
|
-
zIndex: je - 1
|
|
633
|
+
var J = /* @__PURE__ */ ((e) => (e.ABSOLUTE = "absolute", e.RELATIVE = "relative", e))(J || {}), O = /* @__PURE__ */ ((e) => (e.CREATE = "create", e.VIEW = "view", e.EDIT = "edit", e.MOVE = "move", e.MULTI_SELECT = "multiSelect", e))(O || {});
|
|
634
|
+
const Ie = 1.8;
|
|
635
|
+
function si(e) {
|
|
636
|
+
const o = new Qe({
|
|
637
|
+
projection: tt.toJSON(),
|
|
638
|
+
zIndex: et - 1
|
|
639
|
+
});
|
|
640
|
+
it(o), o.activate().catch((i) => {
|
|
641
|
+
X(T).error("Failed to activate layer", String(i));
|
|
548
642
|
});
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
feature: o,
|
|
643
|
+
const t = new yt(new bt(e));
|
|
644
|
+
return t.setStyle(new Vt({})), o.addFeatures([t]), o.vectorProperties.altitudeMode = _t.NONE, {
|
|
645
|
+
layer: o,
|
|
646
|
+
feature: t,
|
|
554
647
|
destroy() {
|
|
555
|
-
|
|
648
|
+
t.dispose(), o.destroy();
|
|
556
649
|
}
|
|
557
650
|
};
|
|
558
651
|
}
|
|
559
|
-
function
|
|
560
|
-
const
|
|
561
|
-
|
|
652
|
+
function ue(e, o) {
|
|
653
|
+
const t = o === "absolute" ? oe.CLICKMOVE : oe.NONE;
|
|
654
|
+
e.setActive(t), e.pickPosition = t, e.pullPickedPosition = 1.8;
|
|
562
655
|
}
|
|
563
|
-
function
|
|
564
|
-
const
|
|
565
|
-
|
|
656
|
+
function ni(e, o, t) {
|
|
657
|
+
const i = le(null), s = K(null), n = K(null), d = K(
|
|
658
|
+
"absolute"
|
|
659
|
+
/* ABSOLUTE */
|
|
660
|
+
), r = le(null);
|
|
661
|
+
let u = () => {
|
|
566
662
|
};
|
|
567
|
-
const
|
|
568
|
-
let
|
|
663
|
+
const l = le([]);
|
|
664
|
+
let c = () => {
|
|
569
665
|
};
|
|
570
666
|
function f() {
|
|
571
667
|
var a;
|
|
572
|
-
s.value &&
|
|
668
|
+
s.value && i.value ? (i.value.deactivate(), t.setVisibility(i.value.name, !1)) : (a = i.value) == null || a.destroy();
|
|
573
669
|
}
|
|
574
|
-
function
|
|
575
|
-
|
|
670
|
+
function h(a = !0) {
|
|
671
|
+
c(), u(), f(), i.value = null, a && t.clearSelection(), s.value = null, n.value = null;
|
|
576
672
|
}
|
|
577
|
-
function
|
|
578
|
-
|
|
579
|
-
var
|
|
580
|
-
|
|
673
|
+
function g(a) {
|
|
674
|
+
c(), f(), e.maps.activeMap instanceof H && (i.value = a, a.activate(e.maps.activeMap), c = e.maps.activeMap.shadowMapChanged.addEventListener((p) => {
|
|
675
|
+
var E;
|
|
676
|
+
p !== ((E = i.value) == null ? void 0 : E.shadowMap) && h(!1);
|
|
581
677
|
}));
|
|
582
678
|
}
|
|
583
679
|
async function y(a) {
|
|
584
|
-
|
|
585
|
-
const { eventHandler:
|
|
680
|
+
h(), await at();
|
|
681
|
+
const { eventHandler: p } = e.maps, { featureInteraction: E } = p, S = new B({
|
|
586
682
|
viewshedType: a,
|
|
587
683
|
colorOptions: {
|
|
588
|
-
visibleColor:
|
|
589
|
-
shadowColor:
|
|
684
|
+
visibleColor: o.visibleColor,
|
|
685
|
+
shadowColor: o.shadowColor
|
|
590
686
|
},
|
|
591
|
-
heightOffset:
|
|
687
|
+
heightOffset: d.value === "absolute" ? 0 : Ie
|
|
592
688
|
});
|
|
593
|
-
|
|
594
|
-
const
|
|
595
|
-
|
|
596
|
-
|
|
689
|
+
g(S);
|
|
690
|
+
const I = new oi(i.value);
|
|
691
|
+
I.finished.addEventListener(() => {
|
|
692
|
+
u(), i.value ? (i.value.showPrimitive = !0, n.value = "edit") : h();
|
|
597
693
|
});
|
|
598
|
-
const
|
|
599
|
-
|
|
694
|
+
const w = p.addExclusiveInteraction(
|
|
695
|
+
I,
|
|
600
696
|
() => {
|
|
601
|
-
|
|
697
|
+
I.destroy();
|
|
602
698
|
}
|
|
603
699
|
);
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
700
|
+
ue(E, d.value), I.positioned.addEventListener(() => {
|
|
701
|
+
ue(
|
|
702
|
+
E,
|
|
703
|
+
"absolute"
|
|
704
|
+
/* ABSOLUTE */
|
|
705
|
+
);
|
|
706
|
+
}), u = () => {
|
|
707
|
+
w(), I.destroy(), E.setActive(), u = () => {
|
|
608
708
|
};
|
|
609
|
-
}, n.value =
|
|
709
|
+
}, n.value = "create";
|
|
610
710
|
}
|
|
611
|
-
function
|
|
612
|
-
var
|
|
613
|
-
if (
|
|
614
|
-
|
|
711
|
+
function k(a) {
|
|
712
|
+
var p;
|
|
713
|
+
if (i.value && a) {
|
|
714
|
+
u();
|
|
615
715
|
const {
|
|
616
|
-
layer:
|
|
617
|
-
feature:
|
|
618
|
-
destroy:
|
|
619
|
-
} =
|
|
620
|
-
|
|
621
|
-
|
|
716
|
+
layer: E,
|
|
717
|
+
feature: S,
|
|
718
|
+
destroy: I
|
|
719
|
+
} = si(i.value.position);
|
|
720
|
+
e.layers.add(E), l.value = [S], d.value === "absolute" ? (r.value = Ze(e, E), r.value.setFeatures([S])) : (r.value = qe(e, E), r.value.setFeature(S)), r.value.stopped.addEventListener(() => {
|
|
721
|
+
u();
|
|
622
722
|
});
|
|
623
|
-
const
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
) : m();
|
|
723
|
+
const w = (p = S.getGeometry()) == null ? void 0 : p.on("change", () => {
|
|
724
|
+
i.value ? i.value.position = Z.mercatorToWgs84(
|
|
725
|
+
S.getGeometry().getCoordinates()
|
|
726
|
+
) : h();
|
|
628
727
|
});
|
|
629
|
-
n.value =
|
|
630
|
-
var
|
|
631
|
-
|
|
632
|
-
},
|
|
728
|
+
n.value = "move", u = () => {
|
|
729
|
+
var R;
|
|
730
|
+
u = () => {
|
|
731
|
+
}, w && Et(w), (R = r.value) == null || R.stop(), r.value = null, l.value = [], e.layers.remove(E), I(), n.value = "edit";
|
|
633
732
|
};
|
|
634
733
|
} else
|
|
635
|
-
|
|
734
|
+
u();
|
|
636
735
|
}
|
|
637
|
-
function
|
|
638
|
-
|
|
736
|
+
function M(a, p) {
|
|
737
|
+
u(), i.value !== p && (g(p), d.value = p.heightOffset ? "relative" : "absolute"), s.value = !!p.properties.title, n.value = a, s.value && t.setVisibility(p.name, !0);
|
|
639
738
|
}
|
|
640
|
-
const
|
|
641
|
-
|
|
739
|
+
const U = [
|
|
740
|
+
t.collectionComponent.collection.removed.addEventListener(
|
|
642
741
|
(a) => {
|
|
643
|
-
var
|
|
644
|
-
|
|
742
|
+
var p;
|
|
743
|
+
t.remove(a.name), ((p = i.value) == null ? void 0 : p.name) === a.name && h();
|
|
645
744
|
}
|
|
646
745
|
),
|
|
647
|
-
|
|
648
|
-
var
|
|
649
|
-
const
|
|
650
|
-
`${
|
|
746
|
+
t.renamed.addEventListener(({ item: a, title: p }) => {
|
|
747
|
+
var S;
|
|
748
|
+
const E = e.windowManager.get(
|
|
749
|
+
`${t.collectionComponent.id}-editor`
|
|
651
750
|
);
|
|
652
|
-
|
|
751
|
+
E && ((S = i.value) == null ? void 0 : S.name) === a.name && (E.state.headerTitle = p);
|
|
653
752
|
}),
|
|
654
|
-
|
|
655
|
-
var
|
|
656
|
-
const
|
|
657
|
-
|
|
753
|
+
t.visibilityChanged.addEventListener(({ item: a }) => {
|
|
754
|
+
var E;
|
|
755
|
+
const p = ((E = i.value) == null ? void 0 : E.name) === a.name;
|
|
756
|
+
p ? h() : (M("view", a), t.clearSelection()), t.setVisibility(a.name, !p);
|
|
658
757
|
})
|
|
659
758
|
];
|
|
660
|
-
function
|
|
661
|
-
if (!(a ===
|
|
662
|
-
if (
|
|
663
|
-
|
|
664
|
-
|
|
759
|
+
function $(a) {
|
|
760
|
+
if (!(a === d.value || !i.value)) {
|
|
761
|
+
if (d.value = a, n.value === "move" && u(), n.value === "create")
|
|
762
|
+
ue(
|
|
763
|
+
e.maps.eventHandler.featureInteraction,
|
|
665
764
|
a
|
|
666
|
-
),
|
|
667
|
-
else if (n.value ===
|
|
668
|
-
const { position:
|
|
669
|
-
a ===
|
|
670
|
-
const
|
|
671
|
-
|
|
672
|
-
})
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
765
|
+
), i.value.heightOffset = a === "absolute" ? 0 : Ie;
|
|
766
|
+
else if (n.value === "edit") {
|
|
767
|
+
const { position: p, heightOffset: E } = i.value;
|
|
768
|
+
a === "relative" ? e.maps.activeMap.getHeightFromTerrain([Z.wgs84ToMercator(p)]).then((S) => {
|
|
769
|
+
const I = Z.mercatorToWgs84(S[0]);
|
|
770
|
+
i.value && (i.value.heightOffset = p[2] - I[2], i.value.position = I);
|
|
771
|
+
}).catch((S) => {
|
|
772
|
+
X(T).error(
|
|
773
|
+
"Failed to get height from terrain",
|
|
774
|
+
String(S)
|
|
775
|
+
);
|
|
776
|
+
}) : (i.value.position = [
|
|
777
|
+
p[0],
|
|
778
|
+
p[1],
|
|
779
|
+
p[2] + E
|
|
780
|
+
], i.value.heightOffset = 0);
|
|
677
781
|
}
|
|
678
782
|
}
|
|
679
783
|
}
|
|
680
784
|
return {
|
|
681
|
-
currentViewshed:
|
|
785
|
+
currentViewshed: i,
|
|
682
786
|
currentIsPersisted: s,
|
|
683
|
-
currentEditSession:
|
|
684
|
-
currentFeatures:
|
|
787
|
+
currentEditSession: r,
|
|
788
|
+
currentFeatures: l,
|
|
685
789
|
createViewshed: y,
|
|
686
790
|
viewViewshed(a) {
|
|
687
|
-
|
|
791
|
+
M("view", a);
|
|
688
792
|
},
|
|
689
793
|
editViewshed(a) {
|
|
690
|
-
|
|
794
|
+
M("edit", a), s.value && t.setSelection(a.name);
|
|
691
795
|
},
|
|
692
796
|
persistCurrent() {
|
|
693
|
-
|
|
797
|
+
i.value && (t.add(i.value), s.value = !0, t.setSelection(i.value.name), t.setVisibility(i.value.name, !0));
|
|
694
798
|
},
|
|
695
|
-
moveCurrentViewshed:
|
|
799
|
+
moveCurrentViewshed: k,
|
|
696
800
|
setupMultiSelect() {
|
|
697
|
-
|
|
801
|
+
u(), n.value = "multiSelect", f(), i.value = null;
|
|
698
802
|
},
|
|
699
803
|
mode: n,
|
|
700
|
-
heightMode:
|
|
701
|
-
changeHeightMode:
|
|
804
|
+
heightMode: d,
|
|
805
|
+
changeHeightMode: $,
|
|
702
806
|
async placeCurrentFeaturesOnTerrain() {
|
|
703
|
-
var a,
|
|
704
|
-
if (
|
|
705
|
-
const
|
|
706
|
-
|
|
707
|
-
]))[0][2] -
|
|
708
|
-
|
|
807
|
+
var a, p;
|
|
808
|
+
if (i.value && ((a = r.value) == null ? void 0 : a.type) === Je.EDIT_FEATURES && e.maps.activeMap instanceof H) {
|
|
809
|
+
const S = (await e.maps.activeMap.getHeightFromTerrain([
|
|
810
|
+
Z.wgs84ToMercator((p = i.value) == null ? void 0 : p.position)
|
|
811
|
+
]))[0][2] - i.value.position[2];
|
|
812
|
+
r.value.translate(0, 0, S);
|
|
709
813
|
}
|
|
710
814
|
},
|
|
711
|
-
stop:
|
|
815
|
+
stop: h,
|
|
712
816
|
destroy() {
|
|
713
|
-
|
|
817
|
+
h(), U.forEach((a) => {
|
|
818
|
+
a();
|
|
819
|
+
});
|
|
714
820
|
}
|
|
715
821
|
};
|
|
716
822
|
}
|
|
717
|
-
const
|
|
718
|
-
|
|
719
|
-
for (const [t, s] of e)
|
|
720
|
-
o[t] = s;
|
|
721
|
-
return o;
|
|
722
|
-
}, Ft = {
|
|
723
|
-
distance: [D.MIN_DISTANCE, 2e3],
|
|
823
|
+
const ai = {
|
|
824
|
+
distance: [B.MIN_DISTANCE, 2e3],
|
|
724
825
|
fov: [25, 85],
|
|
725
826
|
heading: [0, 360],
|
|
726
827
|
pitch: [-90, 90]
|
|
727
|
-
},
|
|
828
|
+
}, ri = Ae({
|
|
829
|
+
name: "ViewshedWindow",
|
|
728
830
|
components: {
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
VRow:
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
831
|
+
VCol: We,
|
|
832
|
+
VDivider: Ft,
|
|
833
|
+
VRow: Fe,
|
|
834
|
+
VcsFormButton: Nt,
|
|
835
|
+
VcsFeatureTransforms: Mt,
|
|
836
|
+
VcsFormSection: $e,
|
|
837
|
+
VcsHelp: Rt,
|
|
838
|
+
VcsLabel: De,
|
|
839
|
+
VcsLabeledSlider: Tt,
|
|
840
|
+
VcsSelect: ke,
|
|
841
|
+
VcsTextField: Ot,
|
|
842
|
+
VcsWorkspaceWrapper: St
|
|
741
843
|
},
|
|
742
|
-
name: "ViewshedWindow",
|
|
743
844
|
props: {
|
|
744
845
|
getViewshed: {
|
|
745
846
|
type: Function,
|
|
746
|
-
|
|
747
|
-
|
|
847
|
+
default: () => {
|
|
848
|
+
}
|
|
748
849
|
},
|
|
749
850
|
selection: {
|
|
750
851
|
type: Object,
|
|
751
|
-
|
|
752
|
-
|
|
852
|
+
default: () => {
|
|
853
|
+
}
|
|
753
854
|
}
|
|
754
855
|
},
|
|
755
|
-
setup(
|
|
756
|
-
var
|
|
757
|
-
const
|
|
758
|
-
|
|
759
|
-
me("manager")
|
|
760
|
-
), o = (
|
|
761
|
-
/** @type {import("@vcmap/ui").VcsUiApp} */
|
|
762
|
-
me("vcsApp")
|
|
763
|
-
), {
|
|
764
|
-
currentViewshed: t,
|
|
856
|
+
setup(e) {
|
|
857
|
+
var a, p, E, S, I;
|
|
858
|
+
const o = me("manager"), t = me("vcsApp"), {
|
|
859
|
+
currentViewshed: i,
|
|
765
860
|
mode: s,
|
|
766
861
|
currentIsPersisted: n
|
|
767
|
-
} =
|
|
768
|
-
((
|
|
862
|
+
} = o, d = K(
|
|
863
|
+
((a = t.maps.activeMap) == null ? void 0 : a.movementApiCallsDisabled) ?? !1
|
|
769
864
|
);
|
|
770
|
-
let
|
|
771
|
-
};
|
|
772
|
-
const w = ve(() => i.selection);
|
|
773
|
-
let c = () => {
|
|
865
|
+
let r, u = () => {
|
|
774
866
|
};
|
|
775
|
-
const
|
|
867
|
+
const l = Q({
|
|
776
868
|
X: void 0,
|
|
777
869
|
Y: void 0,
|
|
778
870
|
Z: void 0
|
|
779
|
-
}),
|
|
780
|
-
let
|
|
871
|
+
}), c = le();
|
|
872
|
+
let f = () => {
|
|
781
873
|
};
|
|
782
|
-
const
|
|
874
|
+
const h = Q({
|
|
783
875
|
showPrimitive: !1,
|
|
784
|
-
distance: void 0,
|
|
785
|
-
fov: void 0,
|
|
786
|
-
heading: void 0,
|
|
787
|
-
pitch: void 0
|
|
788
|
-
}),
|
|
789
|
-
function
|
|
790
|
-
|
|
876
|
+
distance: ((p = i.value) == null ? void 0 : p.distance) || 0,
|
|
877
|
+
fov: ((E = i.value) == null ? void 0 : E.fov) || 0,
|
|
878
|
+
heading: ((S = i.value) == null ? void 0 : S.heading) || 0,
|
|
879
|
+
pitch: ((I = i.value) == null ? void 0 : I.pitch) || 0
|
|
880
|
+
}), g = K();
|
|
881
|
+
function y() {
|
|
882
|
+
i.value && (l.X = i.value.position[0], l.Y = i.value.position[1], l.Z = o.heightMode.value === J.ABSOLUTE ? i.value.position[2] : i.value.heightOffset);
|
|
791
883
|
}
|
|
792
|
-
function
|
|
793
|
-
|
|
884
|
+
function k() {
|
|
885
|
+
y(), i.value && (h.distance = i.value.distance, h.fov = i.value.fov, h.heading = i.value.heading, h.pitch = i.value.pitch, h.showPrimitive = i.value.showPrimitive, g.value = i.value.type);
|
|
794
886
|
}
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
}),
|
|
798
|
-
|
|
887
|
+
rt(() => {
|
|
888
|
+
i.value && s.value !== O.CREATE && k();
|
|
889
|
+
}), q(
|
|
890
|
+
i,
|
|
799
891
|
() => {
|
|
800
|
-
|
|
801
|
-
|
|
892
|
+
i.value && (u(), u = i.value.positionChanged.addEventListener(() => {
|
|
893
|
+
y(), f();
|
|
802
894
|
}));
|
|
803
895
|
},
|
|
804
896
|
{ immediate: !0 }
|
|
805
897
|
);
|
|
806
|
-
|
|
807
|
-
var
|
|
808
|
-
(
|
|
809
|
-
const
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
m = () => {
|
|
816
|
-
var K;
|
|
817
|
-
C == null || C(), f.value = null, (K = t.value) == null || K.activate(o.maps.activeMap), m = () => {
|
|
898
|
+
function M() {
|
|
899
|
+
var D, L;
|
|
900
|
+
(D = i.value) == null || D.deactivate();
|
|
901
|
+
const w = (L = t.maps.activeMap.getScene()) == null ? void 0 : L.camera, R = w == null ? void 0 : w.changed.addEventListener(
|
|
902
|
+
f
|
|
903
|
+
);
|
|
904
|
+
f = () => {
|
|
905
|
+
var be;
|
|
906
|
+
R == null || R(), c.value = null, (be = i.value) == null || be.activate(t.maps.activeMap), f = () => {
|
|
818
907
|
};
|
|
819
908
|
};
|
|
820
909
|
}
|
|
821
|
-
|
|
822
|
-
var
|
|
823
|
-
const
|
|
824
|
-
|
|
825
|
-
(
|
|
826
|
-
|
|
910
|
+
lt(() => {
|
|
911
|
+
var R, D;
|
|
912
|
+
const w = (R = e.getViewshed) == null ? void 0 : R.call(e);
|
|
913
|
+
w && o.editViewshed(w), r = (D = t.maps.activeMap) == null ? void 0 : D.movementDisabledChanged.addEventListener(
|
|
914
|
+
(L) => {
|
|
915
|
+
d.value = L.apiCalls;
|
|
827
916
|
}
|
|
828
917
|
);
|
|
829
|
-
}),
|
|
830
|
-
|
|
918
|
+
}), ct(() => {
|
|
919
|
+
var w;
|
|
920
|
+
u(), f(), r == null || r(), n.value || ((s.value === O.EDIT || s.value === O.MOVE) && i.value ? o.viewViewshed(i.value) : s.value === O.CREATE && o.stop()), (w = e.selection) != null && w.value && (e.selection.value.length > 1 ? o.setupMultiSelect() : e.selection.value.length === 1 && i.value ? o.viewViewshed(i.value) : (
|
|
831
921
|
// when a persited viewshed is deselected, stops plugin
|
|
832
|
-
!
|
|
922
|
+
!e.selection.value.length && s.value === O.EDIT && o.stop(!1)
|
|
833
923
|
));
|
|
834
|
-
}),
|
|
835
|
-
function
|
|
836
|
-
|
|
924
|
+
}), k();
|
|
925
|
+
function U(w, R) {
|
|
926
|
+
f(), i.value && (h[w] = R, i.value[w] = R);
|
|
837
927
|
}
|
|
838
|
-
const
|
|
839
|
-
const
|
|
840
|
-
return
|
|
928
|
+
const $ = dt(() => {
|
|
929
|
+
const w = [];
|
|
930
|
+
return g.value === _.CONE && w.push({
|
|
841
931
|
name: "jumpToViewpoint",
|
|
842
|
-
title:
|
|
932
|
+
title: c.value ? "viewshed.returnToViewpoint" : "viewshed.jumpToViewpoint",
|
|
843
933
|
icon: "mdi-human-male",
|
|
844
|
-
active: !!
|
|
845
|
-
disabled:
|
|
934
|
+
active: !!c.value,
|
|
935
|
+
disabled: d.value,
|
|
846
936
|
async callback() {
|
|
847
|
-
var
|
|
848
|
-
|
|
849
|
-
new
|
|
937
|
+
var R, D, L;
|
|
938
|
+
o.moveCurrentViewshed(!1), i.value && !c.value ? (c.value = await ((R = t.maps.activeMap) == null ? void 0 : R.getViewpoint()), await ((D = t.maps.activeMap) == null ? void 0 : D.gotoViewpoint(
|
|
939
|
+
new ot({
|
|
850
940
|
groundPosition: [
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
941
|
+
i.value.position[0],
|
|
942
|
+
i.value.position[1],
|
|
943
|
+
i.value.position[2] + i.value.heightOffset
|
|
854
944
|
],
|
|
855
|
-
heading:
|
|
856
|
-
pitch:
|
|
945
|
+
heading: i.value.heading,
|
|
946
|
+
pitch: i.value.pitch,
|
|
857
947
|
distance: 0,
|
|
858
948
|
animate: !0
|
|
859
949
|
// if not animate, async does not work and the cameraChanged listener is triggered immediately. alternatively set timeout
|
|
860
950
|
})
|
|
861
|
-
)),
|
|
951
|
+
)), M()) : c.value && (await ((L = t.maps.activeMap) == null ? void 0 : L.gotoViewpoint(c.value)), f());
|
|
862
952
|
}
|
|
863
|
-
}),
|
|
953
|
+
}), w.push({
|
|
864
954
|
name: "moveViewshed",
|
|
865
955
|
title: "viewshed.move",
|
|
866
|
-
icon:
|
|
867
|
-
active: s.value ===
|
|
956
|
+
icon: o.heightMode.value === J.RELATIVE ? "$vcsEditVertices" : "mdi-axis-arrow",
|
|
957
|
+
active: s.value === O.MOVE,
|
|
868
958
|
callback() {
|
|
869
|
-
|
|
870
|
-
s.value !==
|
|
959
|
+
o.moveCurrentViewshed(
|
|
960
|
+
s.value !== O.MOVE
|
|
871
961
|
);
|
|
872
962
|
}
|
|
873
|
-
}),
|
|
963
|
+
}), w.unshift({
|
|
874
964
|
name: "showPrimitive",
|
|
875
965
|
title: "viewshed.showPrimitive",
|
|
876
966
|
icon: "mdi-eye",
|
|
877
|
-
active:
|
|
967
|
+
active: h.showPrimitive,
|
|
878
968
|
callback() {
|
|
879
|
-
this.active = !this.active,
|
|
969
|
+
this.active = !this.active, U("showPrimitive", this.active);
|
|
880
970
|
}
|
|
881
|
-
}),
|
|
971
|
+
}), w;
|
|
882
972
|
});
|
|
883
973
|
return {
|
|
884
|
-
position:
|
|
885
|
-
setPosition(
|
|
886
|
-
if (
|
|
887
|
-
if (
|
|
888
|
-
|
|
974
|
+
position: l,
|
|
975
|
+
setPosition(w, R, D) {
|
|
976
|
+
if (f(), !!i.value) {
|
|
977
|
+
if (D === 2 && o.heightMode.value === J.RELATIVE)
|
|
978
|
+
i.value.heightOffset = Number(w);
|
|
889
979
|
else {
|
|
890
|
-
const
|
|
891
|
-
|
|
980
|
+
const L = [...i.value.position];
|
|
981
|
+
L[D] = Number(w), i.value.position = L;
|
|
892
982
|
}
|
|
893
|
-
|
|
983
|
+
l[R] = Number(w);
|
|
894
984
|
}
|
|
895
985
|
},
|
|
896
|
-
parameters:
|
|
897
|
-
setParameter:
|
|
898
|
-
parameterRanges:
|
|
899
|
-
ViewshedPluginModes:
|
|
986
|
+
parameters: h,
|
|
987
|
+
setParameter: U,
|
|
988
|
+
parameterRanges: ai,
|
|
989
|
+
ViewshedPluginModes: O,
|
|
900
990
|
viewshedMode: s,
|
|
901
991
|
currentIsPersisted: n,
|
|
902
|
-
viewshedType:
|
|
903
|
-
ViewshedTypes:
|
|
904
|
-
HeightModes:
|
|
905
|
-
heightMode:
|
|
906
|
-
|
|
907
|
-
|
|
992
|
+
viewshedType: g,
|
|
993
|
+
ViewshedTypes: _,
|
|
994
|
+
HeightModes: J,
|
|
995
|
+
heightMode: o.heightMode,
|
|
996
|
+
heightModes: Object.values(J).map((w) => ({
|
|
997
|
+
value: w,
|
|
998
|
+
title: `viewshed.${w}`
|
|
999
|
+
})),
|
|
1000
|
+
TransformationMode: st,
|
|
1001
|
+
changeHeightMode: (w) => {
|
|
1002
|
+
o.changeHeightMode(w);
|
|
1003
|
+
},
|
|
908
1004
|
async createNewViewshed() {
|
|
909
|
-
await
|
|
1005
|
+
await o.createViewshed(g.value);
|
|
910
1006
|
},
|
|
911
|
-
addToMyWorkspace: () =>
|
|
912
|
-
|
|
913
|
-
|
|
1007
|
+
addToMyWorkspace: () => {
|
|
1008
|
+
o.persistCurrent();
|
|
1009
|
+
},
|
|
1010
|
+
cancel: () => {
|
|
1011
|
+
o.stop();
|
|
1012
|
+
},
|
|
1013
|
+
headerActions: $
|
|
914
1014
|
};
|
|
915
1015
|
}
|
|
916
|
-
},
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
default:
|
|
929
|
-
|
|
930
|
-
|
|
1016
|
+
}), xe = (e, o) => {
|
|
1017
|
+
const t = e.__vccOpts || e;
|
|
1018
|
+
for (const [i, s] of o)
|
|
1019
|
+
t[i] = s;
|
|
1020
|
+
return t;
|
|
1021
|
+
}, li = { key: 0 }, ci = { class: "px-1" };
|
|
1022
|
+
function di(e, o, t, i, s, n) {
|
|
1023
|
+
const d = V("VcsHelp"), r = V("VcsLabel"), u = V("v-col"), l = V("VcsSelect"), c = V("v-row"), f = V("v-divider"), h = V("VcsFormButton"), g = V("VcsFeatureTransforms"), y = V("VcsTextField"), k = V("VcsFormSection"), M = V("VcsLabeledSlider"), U = V("VcsWorkspaceWrapper");
|
|
1024
|
+
return N(), te("div", null, [
|
|
1025
|
+
Y(" CREATE "),
|
|
1026
|
+
e.viewshedMode === e.ViewshedPluginModes.CREATE ? (N(), te("div", li, [
|
|
1027
|
+
e.viewshedType === e.ViewshedTypes.CONE ? (N(), W(d, { key: 0 }, {
|
|
1028
|
+
default: v(() => [
|
|
1029
|
+
z(
|
|
1030
|
+
j(e.$t("viewshed.createDescription")),
|
|
931
1031
|
1
|
|
932
1032
|
/* TEXT */
|
|
933
1033
|
)
|
|
934
1034
|
]),
|
|
935
1035
|
_: 1
|
|
936
1036
|
/* STABLE */
|
|
937
|
-
})) :
|
|
938
|
-
default:
|
|
939
|
-
|
|
940
|
-
|
|
1037
|
+
})) : e.viewshedType === e.ViewshedTypes.THREESIXTY ? (N(), W(d, { key: 1 }, {
|
|
1038
|
+
default: v(() => [
|
|
1039
|
+
z(
|
|
1040
|
+
j(e.$t("viewshed.createThreeSixtyDescription")),
|
|
941
1041
|
1
|
|
942
1042
|
/* TEXT */
|
|
943
1043
|
)
|
|
944
1044
|
]),
|
|
945
1045
|
_: 1
|
|
946
1046
|
/* STABLE */
|
|
947
|
-
})) :
|
|
948
|
-
|
|
1047
|
+
})) : Y("v-if", !0),
|
|
1048
|
+
m(c, {
|
|
1049
|
+
"no-gutters": "",
|
|
1050
|
+
class: "px-1"
|
|
1051
|
+
}, {
|
|
1052
|
+
default: v(() => [
|
|
1053
|
+
m(u, null, {
|
|
1054
|
+
default: v(() => [
|
|
1055
|
+
m(r, { "html-for": "heightMode" }, {
|
|
1056
|
+
default: v(() => [
|
|
1057
|
+
z(
|
|
1058
|
+
j(e.$t("viewshed.heightMode")),
|
|
1059
|
+
1
|
|
1060
|
+
/* TEXT */
|
|
1061
|
+
)
|
|
1062
|
+
]),
|
|
1063
|
+
_: 1
|
|
1064
|
+
/* STABLE */
|
|
1065
|
+
})
|
|
1066
|
+
]),
|
|
1067
|
+
_: 1
|
|
1068
|
+
/* STABLE */
|
|
1069
|
+
}),
|
|
1070
|
+
m(u, null, {
|
|
1071
|
+
default: v(() => [
|
|
1072
|
+
m(l, {
|
|
1073
|
+
id: "heightMode",
|
|
1074
|
+
items: e.heightModes,
|
|
1075
|
+
"model-value": e.heightMode,
|
|
1076
|
+
"onUpdate:modelValue": e.changeHeightMode
|
|
1077
|
+
}, null, 8, ["items", "model-value", "onUpdate:modelValue"])
|
|
1078
|
+
]),
|
|
1079
|
+
_: 1
|
|
1080
|
+
/* STABLE */
|
|
1081
|
+
})
|
|
1082
|
+
]),
|
|
1083
|
+
_: 1
|
|
1084
|
+
/* STABLE */
|
|
1085
|
+
}),
|
|
1086
|
+
m(f),
|
|
1087
|
+
m(c, {
|
|
1088
|
+
"no-gutters": "",
|
|
1089
|
+
class: "px-2 pt-2 pb-1 d-flex justify-end"
|
|
1090
|
+
}, {
|
|
1091
|
+
default: v(() => [
|
|
1092
|
+
m(h, {
|
|
1093
|
+
onClick: o[0] || (o[0] = ($) => e.cancel())
|
|
1094
|
+
}, {
|
|
1095
|
+
default: v(() => [
|
|
1096
|
+
z(
|
|
1097
|
+
j(e.$t("viewshed.cancel")),
|
|
1098
|
+
1
|
|
1099
|
+
/* TEXT */
|
|
1100
|
+
)
|
|
1101
|
+
]),
|
|
1102
|
+
_: 1
|
|
1103
|
+
/* STABLE */
|
|
1104
|
+
})
|
|
1105
|
+
]),
|
|
1106
|
+
_: 1
|
|
1107
|
+
/* STABLE */
|
|
1108
|
+
})
|
|
1109
|
+
])) : Y("v-if", !0),
|
|
1110
|
+
Y(" EDIT AND MOVE "),
|
|
1111
|
+
e.viewshedMode === e.ViewshedPluginModes.EDIT || e.viewshedMode === e.ViewshedPluginModes.MOVE ? (N(), W(U, {
|
|
949
1112
|
key: 1,
|
|
950
|
-
"
|
|
951
|
-
|
|
952
|
-
|
|
1113
|
+
"disable-add": e.currentIsPersisted,
|
|
1114
|
+
class: "wrapper",
|
|
1115
|
+
onAddClicked: e.addToMyWorkspace,
|
|
1116
|
+
onNewClicked: e.createNewViewshed
|
|
953
1117
|
}, {
|
|
954
|
-
default:
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
1118
|
+
default: v(() => [
|
|
1119
|
+
m(k, {
|
|
1120
|
+
"header-actions": e.headerActions,
|
|
1121
|
+
heading: "viewshed.viewpoint",
|
|
1122
|
+
"action-button-list-overflow-count": 3
|
|
1123
|
+
}, {
|
|
1124
|
+
default: v(() => [
|
|
1125
|
+
m(c, {
|
|
1126
|
+
"no-gutters": "",
|
|
1127
|
+
class: "px-1"
|
|
1128
|
+
}, {
|
|
1129
|
+
default: v(() => [
|
|
1130
|
+
ut(
|
|
960
1131
|
"span",
|
|
961
|
-
|
|
962
|
-
|
|
1132
|
+
ci,
|
|
1133
|
+
j(e.$t("viewshed.position")),
|
|
963
1134
|
1
|
|
964
1135
|
/* TEXT */
|
|
965
1136
|
)
|
|
@@ -967,13 +1138,14 @@ function Gt(i, e, o, t, s, n) {
|
|
|
967
1138
|
_: 1
|
|
968
1139
|
/* STABLE */
|
|
969
1140
|
}),
|
|
970
|
-
|
|
1141
|
+
e.viewshedMode === e.ViewshedPluginModes.MOVE && e.heightMode === e.HeightModes.ABSOLUTE ? (N(), W(c, {
|
|
971
1142
|
key: 0,
|
|
972
|
-
"no-gutters": ""
|
|
1143
|
+
"no-gutters": "",
|
|
1144
|
+
class: "px-1"
|
|
973
1145
|
}, {
|
|
974
|
-
default:
|
|
975
|
-
|
|
976
|
-
"transformation-mode":
|
|
1146
|
+
default: v(() => [
|
|
1147
|
+
m(g, {
|
|
1148
|
+
"transformation-mode": e.TransformationMode.TRANSLATE,
|
|
977
1149
|
"feature-properties": { altitudeMode: "absolute" },
|
|
978
1150
|
"allow-z-input": !0,
|
|
979
1151
|
class: "w-100"
|
|
@@ -981,33 +1153,34 @@ function Gt(i, e, o, t, s, n) {
|
|
|
981
1153
|
]),
|
|
982
1154
|
_: 1
|
|
983
1155
|
/* STABLE */
|
|
984
|
-
})) : (
|
|
1156
|
+
})) : (N(), W(c, {
|
|
985
1157
|
key: 1,
|
|
986
|
-
"no-gutters": ""
|
|
1158
|
+
"no-gutters": "",
|
|
1159
|
+
class: "px-1"
|
|
987
1160
|
}, {
|
|
988
|
-
default:
|
|
989
|
-
(
|
|
990
|
-
|
|
1161
|
+
default: v(() => [
|
|
1162
|
+
(N(!0), te(
|
|
1163
|
+
Ve,
|
|
991
1164
|
null,
|
|
992
|
-
|
|
993
|
-
|
|
1165
|
+
Se(e.position, ($, a, p) => (N(), W(
|
|
1166
|
+
u,
|
|
994
1167
|
{
|
|
995
|
-
key:
|
|
1168
|
+
key: p,
|
|
996
1169
|
class: "pb-1"
|
|
997
1170
|
},
|
|
998
1171
|
{
|
|
999
|
-
default:
|
|
1000
|
-
|
|
1001
|
-
"model-value":
|
|
1002
|
-
"onUpdate:modelValue": (u) => t.setPosition(u, a, v),
|
|
1172
|
+
default: v(() => [
|
|
1173
|
+
m(y, {
|
|
1174
|
+
"model-value": $,
|
|
1003
1175
|
type: "number",
|
|
1004
1176
|
prefix: a,
|
|
1005
1177
|
step: a === "Z" ? 1 : 1e-4,
|
|
1006
1178
|
unit: a === "Z" ? "m" : "°",
|
|
1007
1179
|
decimals: a === "Z" ? 2 : 8,
|
|
1008
|
-
disabled:
|
|
1009
|
-
"hide-spin-buttons": !0
|
|
1010
|
-
|
|
1180
|
+
disabled: e.viewshedMode === e.ViewshedPluginModes.MOVE && !(a === "Z" && e.heightMode === e.HeightModes.RELATIVE),
|
|
1181
|
+
"hide-spin-buttons": !0,
|
|
1182
|
+
"onUpdate:modelValue": (E) => e.setPosition(E, a, p)
|
|
1183
|
+
}, null, 8, ["model-value", "prefix", "step", "unit", "decimals", "disabled", "onUpdate:modelValue"])
|
|
1011
1184
|
]),
|
|
1012
1185
|
_: 2
|
|
1013
1186
|
/* DYNAMIC */
|
|
@@ -1025,22 +1198,19 @@ function Gt(i, e, o, t, s, n) {
|
|
|
1025
1198
|
]),
|
|
1026
1199
|
_: 1
|
|
1027
1200
|
/* STABLE */
|
|
1028
|
-
})
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
default: h(() => [
|
|
1042
|
-
F(
|
|
1043
|
-
A(i.$t("viewshed.heightMode")),
|
|
1201
|
+
}, 8, ["header-actions"]),
|
|
1202
|
+
m(f),
|
|
1203
|
+
m(c, {
|
|
1204
|
+
"no-gutters": "",
|
|
1205
|
+
class: "px-1"
|
|
1206
|
+
}, {
|
|
1207
|
+
default: v(() => [
|
|
1208
|
+
m(u, null, {
|
|
1209
|
+
default: v(() => [
|
|
1210
|
+
m(r, { "html-for": "heightMode" }, {
|
|
1211
|
+
default: v(() => [
|
|
1212
|
+
z(
|
|
1213
|
+
j(e.$t("viewshed.heightMode")),
|
|
1044
1214
|
1
|
|
1045
1215
|
/* TEXT */
|
|
1046
1216
|
)
|
|
@@ -1052,16 +1222,13 @@ function Gt(i, e, o, t, s, n) {
|
|
|
1052
1222
|
_: 1
|
|
1053
1223
|
/* STABLE */
|
|
1054
1224
|
}),
|
|
1055
|
-
|
|
1056
|
-
default:
|
|
1057
|
-
|
|
1225
|
+
m(u, null, {
|
|
1226
|
+
default: v(() => [
|
|
1227
|
+
m(l, {
|
|
1058
1228
|
id: "heightMode",
|
|
1059
|
-
items:
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
})),
|
|
1063
|
-
"model-value": t.heightMode,
|
|
1064
|
-
"onUpdate:modelValue": t.changeHeightMode
|
|
1229
|
+
items: e.heightModes,
|
|
1230
|
+
"model-value": e.heightMode,
|
|
1231
|
+
"onUpdate:modelValue": e.changeHeightMode
|
|
1065
1232
|
}, null, 8, ["items", "model-value", "onUpdate:modelValue"])
|
|
1066
1233
|
]),
|
|
1067
1234
|
_: 1
|
|
@@ -1070,498 +1237,323 @@ function Gt(i, e, o, t, s, n) {
|
|
|
1070
1237
|
]),
|
|
1071
1238
|
_: 1
|
|
1072
1239
|
/* STABLE */
|
|
1073
|
-
})
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
/* STABLE */
|
|
1077
|
-
}),
|
|
1078
|
-
t.viewshedMode === t.ViewshedPluginModes.EDIT || t.viewshedMode === t.ViewshedPluginModes.MOVE ? (M(), N(f, {
|
|
1079
|
-
key: 2,
|
|
1080
|
-
class: "px-1 pt-0 pb-2"
|
|
1081
|
-
}, {
|
|
1082
|
-
default: h(() => [
|
|
1083
|
-
(M(!0), B(
|
|
1084
|
-
pe,
|
|
1240
|
+
}),
|
|
1241
|
+
(N(!0), te(
|
|
1242
|
+
Ve,
|
|
1085
1243
|
null,
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
{
|
|
1106
|
-
default: h(() => [
|
|
1107
|
-
p(
|
|
1108
|
-
d,
|
|
1109
|
-
null,
|
|
1110
|
-
{
|
|
1111
|
-
default: h(() => [
|
|
1112
|
-
p(y, {
|
|
1113
|
-
"html-for": a,
|
|
1114
|
-
class: "py-0"
|
|
1115
|
-
}, {
|
|
1116
|
-
default: h(() => [
|
|
1117
|
-
F(
|
|
1118
|
-
A(i.$t(`viewshed.${a}`)),
|
|
1119
|
-
1
|
|
1120
|
-
/* TEXT */
|
|
1121
|
-
)
|
|
1122
|
-
]),
|
|
1123
|
-
_: 2
|
|
1124
|
-
/* DYNAMIC */
|
|
1125
|
-
}, 1032, ["html-for"])
|
|
1126
|
-
]),
|
|
1127
|
-
_: 2
|
|
1128
|
-
/* DYNAMIC */
|
|
1129
|
-
},
|
|
1130
|
-
1024
|
|
1131
|
-
/* DYNAMIC_SLOTS */
|
|
1132
|
-
),
|
|
1133
|
-
p(
|
|
1134
|
-
d,
|
|
1135
|
-
{ class: "d-flex justify-end align-center" },
|
|
1136
|
-
{
|
|
1137
|
-
default: h(() => [
|
|
1138
|
-
a === "distance" ? (M(), B(
|
|
1139
|
-
"span",
|
|
1140
|
-
Ut,
|
|
1141
|
-
A(`${Math.round(T)} m`),
|
|
1142
|
-
1
|
|
1143
|
-
/* TEXT */
|
|
1144
|
-
)) : (M(), B(
|
|
1145
|
-
"span",
|
|
1146
|
-
$t,
|
|
1147
|
-
A(`${Math.round(T)} °`),
|
|
1148
|
-
1
|
|
1149
|
-
/* TEXT */
|
|
1150
|
-
))
|
|
1151
|
-
]),
|
|
1152
|
-
_: 2
|
|
1153
|
-
/* DYNAMIC */
|
|
1154
|
-
},
|
|
1155
|
-
1024
|
|
1156
|
-
/* DYNAMIC_SLOTS */
|
|
1157
|
-
)
|
|
1158
|
-
]),
|
|
1159
|
-
_: 2
|
|
1160
|
-
/* DYNAMIC */
|
|
1161
|
-
},
|
|
1162
|
-
1024
|
|
1163
|
-
/* DYNAMIC_SLOTS */
|
|
1164
|
-
),
|
|
1165
|
-
p(
|
|
1166
|
-
l,
|
|
1167
|
-
{ "no-gutters": "" },
|
|
1168
|
-
{
|
|
1169
|
-
default: h(() => [
|
|
1170
|
-
p(
|
|
1171
|
-
d,
|
|
1172
|
-
null,
|
|
1173
|
-
{
|
|
1174
|
-
default: h(() => [
|
|
1175
|
-
p(S, {
|
|
1176
|
-
id: a,
|
|
1177
|
-
class: "pa-0",
|
|
1178
|
-
"model-value": T,
|
|
1179
|
-
"onUpdate:modelValue": (v) => t.setParameter(a, v),
|
|
1180
|
-
type: "number",
|
|
1181
|
-
step: "1",
|
|
1182
|
-
min: t.parameterRanges[a][0],
|
|
1183
|
-
max: t.parameterRanges[a][1]
|
|
1184
|
-
}, null, 8, ["id", "model-value", "onUpdate:modelValue", "min", "max"])
|
|
1185
|
-
]),
|
|
1186
|
-
_: 2
|
|
1187
|
-
/* DYNAMIC */
|
|
1188
|
-
},
|
|
1189
|
-
1024
|
|
1190
|
-
/* DYNAMIC_SLOTS */
|
|
1191
|
-
)
|
|
1192
|
-
]),
|
|
1193
|
-
_: 2
|
|
1194
|
-
/* DYNAMIC */
|
|
1195
|
-
},
|
|
1196
|
-
1024
|
|
1197
|
-
/* DYNAMIC_SLOTS */
|
|
1198
|
-
)
|
|
1199
|
-
]),
|
|
1200
|
-
_: 2
|
|
1201
|
-
/* DYNAMIC */
|
|
1202
|
-
},
|
|
1203
|
-
1024
|
|
1204
|
-
/* DYNAMIC_SLOTS */
|
|
1205
|
-
)) : H("v-if", !0)
|
|
1206
|
-
]),
|
|
1207
|
-
_: 2
|
|
1208
|
-
/* DYNAMIC */
|
|
1209
|
-
},
|
|
1210
|
-
1024
|
|
1211
|
-
/* DYNAMIC_SLOTS */
|
|
1212
|
-
))),
|
|
1244
|
+
Se(e.parameters, ($, a) => (N(), te("div", {
|
|
1245
|
+
key: a,
|
|
1246
|
+
class: "px-1"
|
|
1247
|
+
}, [
|
|
1248
|
+
a === "distance" || e.viewshedType === e.ViewshedTypes.CONE && a !== "showPrimitive" ? (N(), W(M, {
|
|
1249
|
+
key: 0,
|
|
1250
|
+
class: "pa-0",
|
|
1251
|
+
label: `viewshed.${a}`,
|
|
1252
|
+
unit: a === "distance" ? "m" : "°",
|
|
1253
|
+
min: e.parameterRanges[a][0],
|
|
1254
|
+
max: e.parameterRanges[a][1],
|
|
1255
|
+
step: 1,
|
|
1256
|
+
"text-input-cols": 3,
|
|
1257
|
+
"allow-text-input": "",
|
|
1258
|
+
"hide-spin-buttons": "",
|
|
1259
|
+
"model-value": Math.round(Number($)),
|
|
1260
|
+
"onUpdate:modelValue": (p) => e.setParameter(a, p)
|
|
1261
|
+
}, null, 8, ["label", "unit", "min", "max", "model-value", "onUpdate:modelValue"])) : Y("v-if", !0)
|
|
1262
|
+
]))),
|
|
1213
1263
|
128
|
|
1214
1264
|
/* KEYED_FRAGMENT */
|
|
1215
1265
|
))
|
|
1216
1266
|
]),
|
|
1217
1267
|
_: 1
|
|
1218
1268
|
/* STABLE */
|
|
1219
|
-
})) :
|
|
1220
|
-
p(_),
|
|
1221
|
-
t.viewshedMode === t.ViewshedPluginModes.EDIT || t.viewshedMode === t.ViewshedPluginModes.MOVE ? (M(), B("div", Ht, [
|
|
1222
|
-
p(L, {
|
|
1223
|
-
onClick: e[0] || (e[0] = (T) => t.addToMyWorkspace()),
|
|
1224
|
-
tooltip: "viewshed.addToMyWorkspace",
|
|
1225
|
-
icon: "$vcsComponentsPlus",
|
|
1226
|
-
disabled: t.currentIsPersisted || void 0
|
|
1227
|
-
}, null, 8, ["disabled"]),
|
|
1228
|
-
p(L, {
|
|
1229
|
-
onClick: e[1] || (e[1] = (T) => t.createNewViewshed()),
|
|
1230
|
-
variant: "filled"
|
|
1231
|
-
}, {
|
|
1232
|
-
default: h(() => [
|
|
1233
|
-
F(
|
|
1234
|
-
A(i.$t("viewshed.new")),
|
|
1235
|
-
1
|
|
1236
|
-
/* TEXT */
|
|
1237
|
-
)
|
|
1238
|
-
]),
|
|
1239
|
-
_: 1
|
|
1240
|
-
/* STABLE */
|
|
1241
|
-
})
|
|
1242
|
-
])) : t.viewshedMode === t.ViewshedPluginModes.CREATE ? (M(), B("div", zt, [
|
|
1243
|
-
p(L, {
|
|
1244
|
-
onClick: e[2] || (e[2] = (T) => t.cancel()),
|
|
1245
|
-
variant: "outlined"
|
|
1246
|
-
}, {
|
|
1247
|
-
default: h(() => [
|
|
1248
|
-
F(
|
|
1249
|
-
A(i.$t("viewshed.cancel")),
|
|
1250
|
-
1
|
|
1251
|
-
/* TEXT */
|
|
1252
|
-
)
|
|
1253
|
-
]),
|
|
1254
|
-
_: 1
|
|
1255
|
-
/* STABLE */
|
|
1256
|
-
})
|
|
1257
|
-
])) : H("v-if", !0)
|
|
1269
|
+
}, 8, ["disable-add", "onAddClicked", "onNewClicked"])) : Y("v-if", !0)
|
|
1258
1270
|
]);
|
|
1259
1271
|
}
|
|
1260
|
-
const
|
|
1261
|
-
[
|
|
1262
|
-
[
|
|
1272
|
+
const ui = /* @__PURE__ */ xe(ri, [["render", di]]), Ce = {
|
|
1273
|
+
[_.CONE]: "$vcsViewshed",
|
|
1274
|
+
[_.THREESIXTY]: "$vcsViewshedCone"
|
|
1263
1275
|
};
|
|
1264
|
-
function
|
|
1265
|
-
const
|
|
1266
|
-
component:
|
|
1267
|
-
provides: {
|
|
1268
|
-
manager: i
|
|
1269
|
-
},
|
|
1276
|
+
function hi(e, o, t) {
|
|
1277
|
+
const i = K(""), s = K(), n = `${t.id}-editor`, d = {
|
|
1278
|
+
component: ui,
|
|
1279
|
+
provides: { manager: e },
|
|
1270
1280
|
state: {
|
|
1271
|
-
headerTitle:
|
|
1281
|
+
headerTitle: i,
|
|
1272
1282
|
headerIcon: s,
|
|
1273
1283
|
styles: { width: "280px", height: "auto" },
|
|
1274
|
-
infoUrlCallback:
|
|
1284
|
+
infoUrlCallback: o.getHelpUrlCallback("tools/viewshed.html")
|
|
1275
1285
|
}
|
|
1276
1286
|
};
|
|
1277
|
-
|
|
1278
|
-
editor: (
|
|
1279
|
-
...
|
|
1287
|
+
It(o, t, {
|
|
1288
|
+
editor: (h) => ({
|
|
1289
|
+
...d,
|
|
1280
1290
|
props: {
|
|
1281
|
-
selection:
|
|
1282
|
-
getViewshed: () =>
|
|
1291
|
+
selection: t.selection,
|
|
1292
|
+
getViewshed: () => t.collection.getByKey(h.name)
|
|
1283
1293
|
}
|
|
1284
1294
|
})
|
|
1285
1295
|
});
|
|
1286
|
-
function
|
|
1287
|
-
|
|
1296
|
+
function r() {
|
|
1297
|
+
e.currentViewshed.value && (s.value = Ce[e.currentViewshed.value.type], e.currentIsPersisted.value ? i.value = e.currentViewshed.value.properties.title : e.mode.value === O.CREATE ? i.value = `viewshed.create.${e.currentViewshed.value.type}` : i.value = [
|
|
1288
1298
|
"viewshed.temporary",
|
|
1289
|
-
`viewshed.${
|
|
1299
|
+
`viewshed.${e.currentViewshed.value.type}`
|
|
1290
1300
|
]);
|
|
1291
1301
|
}
|
|
1292
|
-
function
|
|
1293
|
-
|
|
1302
|
+
function u() {
|
|
1303
|
+
r(), e.currentViewshed.value && !e.currentIsPersisted.value && (e.mode.value === O.EDIT || e.mode.value === O.MOVE || e.mode.value === O.CREATE) && (o.windowManager.has(n) || o.windowManager.add(
|
|
1294
1304
|
{
|
|
1295
|
-
...
|
|
1305
|
+
...d,
|
|
1296
1306
|
id: n,
|
|
1297
1307
|
parentId: "category-manager",
|
|
1298
|
-
slot:
|
|
1308
|
+
slot: Pt.DYNAMIC_CHILD
|
|
1299
1309
|
},
|
|
1300
|
-
|
|
1310
|
+
T
|
|
1301
1311
|
));
|
|
1302
1312
|
}
|
|
1303
|
-
const
|
|
1304
|
-
|
|
1305
|
-
}),
|
|
1306
|
-
|
|
1307
|
-
}), f =
|
|
1308
|
-
|
|
1313
|
+
const l = q(e.currentViewshed, (h) => {
|
|
1314
|
+
h && u();
|
|
1315
|
+
}), c = q(e.currentIsPersisted, (h) => {
|
|
1316
|
+
h && r();
|
|
1317
|
+
}), f = q(e.mode, () => {
|
|
1318
|
+
e.mode.value ? u() : o.windowManager.remove(n);
|
|
1309
1319
|
});
|
|
1310
1320
|
return {
|
|
1311
1321
|
destroy() {
|
|
1312
|
-
|
|
1322
|
+
o.windowManager.remove(n), l(), f(), c();
|
|
1313
1323
|
}
|
|
1314
1324
|
};
|
|
1315
1325
|
}
|
|
1316
|
-
function
|
|
1317
|
-
function s(
|
|
1318
|
-
return
|
|
1319
|
-
name:
|
|
1320
|
-
icon:
|
|
1321
|
-
title: `viewshed.create.${
|
|
1322
|
-
} :
|
|
1323
|
-
name:
|
|
1324
|
-
icon:
|
|
1325
|
-
title: `viewshed.create.${
|
|
1326
|
+
function fi(e, o, t, i) {
|
|
1327
|
+
function s(l) {
|
|
1328
|
+
return l === _.CONE ? {
|
|
1329
|
+
name: _.CONE,
|
|
1330
|
+
icon: Ce[_.CONE],
|
|
1331
|
+
title: `viewshed.create.${_.CONE}`
|
|
1332
|
+
} : l === _.THREESIXTY ? {
|
|
1333
|
+
name: _.THREESIXTY,
|
|
1334
|
+
icon: Ce[_.THREESIXTY],
|
|
1335
|
+
title: `viewshed.create.${_.THREESIXTY}`
|
|
1326
1336
|
} : void 0;
|
|
1327
1337
|
}
|
|
1328
|
-
let n,
|
|
1329
|
-
if (
|
|
1330
|
-
const
|
|
1338
|
+
let n, d;
|
|
1339
|
+
if (i.length === 1) {
|
|
1340
|
+
const l = s(i[0]);
|
|
1331
1341
|
n = {
|
|
1332
|
-
type:
|
|
1333
|
-
action:
|
|
1334
|
-
...
|
|
1342
|
+
type: Ne.SINGLE,
|
|
1343
|
+
action: Q({
|
|
1344
|
+
...l,
|
|
1335
1345
|
active: !1,
|
|
1336
1346
|
background: !1,
|
|
1337
|
-
disabled: !(
|
|
1338
|
-
callback() {
|
|
1339
|
-
this.active ? this.background &&
|
|
1347
|
+
disabled: !(e.maps.activeMap instanceof H),
|
|
1348
|
+
async callback() {
|
|
1349
|
+
this.active ? this.background && o.currentViewshed.value ? o.editViewshed(o.currentViewshed.value) : o.stop() : l && await o.createViewshed(l.name);
|
|
1340
1350
|
}
|
|
1341
1351
|
})
|
|
1342
1352
|
};
|
|
1343
1353
|
} else
|
|
1344
1354
|
n = {
|
|
1345
|
-
type:
|
|
1346
|
-
action:
|
|
1347
|
-
name:
|
|
1355
|
+
type: Ne.SELECT,
|
|
1356
|
+
action: Q({
|
|
1357
|
+
name: t,
|
|
1348
1358
|
currentIndex: 0,
|
|
1349
1359
|
active: !1,
|
|
1350
1360
|
background: !1,
|
|
1351
|
-
disabled: !(
|
|
1352
|
-
callback() {
|
|
1361
|
+
disabled: !(e.maps.activeMap instanceof H),
|
|
1362
|
+
async callback() {
|
|
1353
1363
|
if (this.active)
|
|
1354
|
-
this.background &&
|
|
1364
|
+
this.background && o.currentViewshed.value ? o.editViewshed(o.currentViewshed.value) : o.stop();
|
|
1355
1365
|
else {
|
|
1356
|
-
const
|
|
1357
|
-
|
|
1366
|
+
const l = this.tools[this.currentIndex].name;
|
|
1367
|
+
await o.createViewshed(l);
|
|
1358
1368
|
}
|
|
1359
1369
|
},
|
|
1360
|
-
selected(
|
|
1361
|
-
|
|
1362
|
-
const
|
|
1363
|
-
|
|
1370
|
+
async selected(l) {
|
|
1371
|
+
l !== this.currentIndex && (this.currentIndex = l);
|
|
1372
|
+
const c = this.tools[this.currentIndex].name;
|
|
1373
|
+
await o.createViewshed(c);
|
|
1364
1374
|
},
|
|
1365
|
-
tools:
|
|
1375
|
+
tools: i.flatMap((l) => s(l))
|
|
1366
1376
|
})
|
|
1367
|
-
},
|
|
1368
|
-
|
|
1369
|
-
(
|
|
1370
|
-
|
|
1371
|
-
(
|
|
1377
|
+
}, d = q(
|
|
1378
|
+
o.currentViewshed,
|
|
1379
|
+
(l) => {
|
|
1380
|
+
l && (n.action.currentIndex = n.action.tools.findIndex(
|
|
1381
|
+
(c) => c.name === l.type
|
|
1372
1382
|
));
|
|
1373
1383
|
}
|
|
1374
1384
|
);
|
|
1375
|
-
const
|
|
1376
|
-
|
|
1377
|
-
}),
|
|
1378
|
-
|
|
1385
|
+
const r = q(o.mode, (l) => {
|
|
1386
|
+
l === O.VIEW ? (n.action.background = !0, n.action.active = !0) : l ? (n.action.background = !1, n.action.active = !0) : (n.action.background = !1, n.action.active = !1);
|
|
1387
|
+
}), u = e.maps.mapActivated.addEventListener((l) => {
|
|
1388
|
+
l instanceof H ? n.action.disabled = !1 : n.action.disabled = !0;
|
|
1379
1389
|
});
|
|
1380
1390
|
return {
|
|
1391
|
+
toolbox: n,
|
|
1381
1392
|
destroy() {
|
|
1382
|
-
|
|
1383
|
-
}
|
|
1384
|
-
toolbox: n
|
|
1393
|
+
r(), d == null || d(), u();
|
|
1394
|
+
}
|
|
1385
1395
|
};
|
|
1386
1396
|
}
|
|
1387
|
-
function
|
|
1388
|
-
|
|
1389
|
-
const { toolbox: s, destroy: n } =
|
|
1397
|
+
function pi(e, o, t, i) {
|
|
1398
|
+
ye(i, [Zt(_)]);
|
|
1399
|
+
const { toolbox: s, destroy: n } = fi(e, o, t, i), d = e.toolboxManager.add(s, t).id;
|
|
1390
1400
|
return () => {
|
|
1391
|
-
|
|
1401
|
+
e.toolboxManager.remove(d), n();
|
|
1392
1402
|
};
|
|
1393
1403
|
}
|
|
1394
|
-
class
|
|
1404
|
+
class _e extends nt {
|
|
1395
1405
|
static get className() {
|
|
1396
1406
|
return "ViewshedCategory";
|
|
1397
1407
|
}
|
|
1398
|
-
async _deserializeItem(
|
|
1399
|
-
var
|
|
1400
|
-
if (
|
|
1401
|
-
|
|
1402
|
-
(t = this._app) == null ? void 0 : t.maps.getByType(U.className)[0]
|
|
1403
|
-
)
|
|
1404
|
-
return new D(e);
|
|
1408
|
+
async _deserializeItem(o) {
|
|
1409
|
+
var i;
|
|
1410
|
+
if ((i = this._app) == null ? void 0 : i.maps.getByType(H.className)[0])
|
|
1411
|
+
return Promise.resolve(new B(o));
|
|
1405
1412
|
throw new Error("No CesiumMap available");
|
|
1406
1413
|
}
|
|
1407
1414
|
}
|
|
1408
|
-
function
|
|
1409
|
-
let
|
|
1415
|
+
function mi(e, o) {
|
|
1416
|
+
let t, i = 0;
|
|
1410
1417
|
const s = new Set(
|
|
1411
|
-
|
|
1418
|
+
o.filter((n) => n.type === e).map((n) => n.properties.title)
|
|
1412
1419
|
);
|
|
1413
1420
|
do
|
|
1414
|
-
|
|
1415
|
-
while (!
|
|
1416
|
-
return
|
|
1421
|
+
i += 1, s.has(`${e}-${i}`) || (t = `${e}-${i}`);
|
|
1422
|
+
while (!t);
|
|
1423
|
+
return t;
|
|
1417
1424
|
}
|
|
1418
|
-
async function
|
|
1419
|
-
const
|
|
1425
|
+
async function vi(e) {
|
|
1426
|
+
const o = new se(), t = new se(), { collectionComponent: i, category: s } = await e.categoryManager.requestCategory(
|
|
1420
1427
|
{
|
|
1421
|
-
type:
|
|
1428
|
+
type: _e.className,
|
|
1422
1429
|
name: "Viewsheds",
|
|
1423
1430
|
title: "viewshed.viewshedCategory"
|
|
1424
1431
|
},
|
|
1425
|
-
|
|
1426
|
-
{
|
|
1427
|
-
selectable: !0,
|
|
1428
|
-
renamable: !0,
|
|
1429
|
-
removable: !0
|
|
1430
|
-
}
|
|
1432
|
+
T,
|
|
1433
|
+
{ selectable: !0, renamable: !0, removable: !0 }
|
|
1431
1434
|
);
|
|
1432
|
-
|
|
1433
|
-
mappingFunction:
|
|
1434
|
-
[
|
|
1435
|
-
|
|
1435
|
+
i.addItemMapping({
|
|
1436
|
+
mappingFunction: At(
|
|
1437
|
+
[H.className],
|
|
1438
|
+
e.maps
|
|
1436
1439
|
),
|
|
1437
|
-
owner:
|
|
1440
|
+
owner: T
|
|
1438
1441
|
});
|
|
1439
|
-
const n = (
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
},
|
|
1443
|
-
|
|
1442
|
+
const n = (c, f, h) => {
|
|
1443
|
+
h.title = c.properties.title, h.titleChanged = (g) => {
|
|
1444
|
+
c.properties.title = g, h.title = g, o.raiseEvent({ item: c, title: g });
|
|
1445
|
+
}, h.actions.push(
|
|
1446
|
+
Q({
|
|
1444
1447
|
name: "visibilityAction",
|
|
1445
1448
|
icon: "$vcsCheckbox",
|
|
1446
1449
|
callback() {
|
|
1447
|
-
|
|
1450
|
+
t.raiseEvent({ item: c, visible: !!h.visible });
|
|
1448
1451
|
}
|
|
1449
1452
|
})
|
|
1450
1453
|
);
|
|
1451
1454
|
};
|
|
1452
|
-
|
|
1455
|
+
e.categoryManager.addMappingFunction(
|
|
1453
1456
|
() => !0,
|
|
1454
1457
|
n,
|
|
1455
|
-
|
|
1456
|
-
[
|
|
1458
|
+
T,
|
|
1459
|
+
[i.id]
|
|
1457
1460
|
);
|
|
1458
|
-
const { action:
|
|
1459
|
-
|
|
1461
|
+
const { action: d, destroy: r } = kt(
|
|
1462
|
+
i.selection,
|
|
1460
1463
|
() => {
|
|
1461
|
-
const
|
|
1462
|
-
(f) =>
|
|
1464
|
+
const c = i.selection.value.map(
|
|
1465
|
+
(f) => i.collection.getByKey(f.name)
|
|
1463
1466
|
);
|
|
1464
|
-
|
|
1467
|
+
Dt(JSON.stringify(c), "viewsheds.json");
|
|
1465
1468
|
},
|
|
1466
|
-
|
|
1467
|
-
), { action:
|
|
1468
|
-
async (
|
|
1469
|
-
const { vueI18n: f } =
|
|
1470
|
-
|
|
1471
|
-
const
|
|
1469
|
+
T
|
|
1470
|
+
), { action: u, destroy: l } = $t(
|
|
1471
|
+
async (c) => {
|
|
1472
|
+
const { vueI18n: f } = e, g = (await Promise.all(
|
|
1473
|
+
c.map(async (M) => {
|
|
1474
|
+
const U = await M.text();
|
|
1472
1475
|
try {
|
|
1473
|
-
return JSON.parse(
|
|
1476
|
+
return JSON.parse(U).map((a) => new B(a));
|
|
1474
1477
|
} catch {
|
|
1475
|
-
|
|
1476
|
-
type:
|
|
1478
|
+
e.notifier.add({
|
|
1479
|
+
type: re.ERROR,
|
|
1477
1480
|
message: f.t("components.import.failure", {
|
|
1478
|
-
fileName:
|
|
1481
|
+
fileName: M.name
|
|
1479
1482
|
})
|
|
1480
1483
|
});
|
|
1481
1484
|
}
|
|
1482
1485
|
return [];
|
|
1483
1486
|
})
|
|
1484
|
-
)).flat(), y =
|
|
1485
|
-
if (
|
|
1486
|
-
return
|
|
1487
|
-
type:
|
|
1488
|
-
message: f.t("components.import.addFailure", [
|
|
1487
|
+
)).flat(), y = g.map((M) => s.collection.add(M)).filter((M) => M != null), k = g.length - y.length;
|
|
1488
|
+
if (k > 0)
|
|
1489
|
+
return e.notifier.add({
|
|
1490
|
+
type: re.WARNING,
|
|
1491
|
+
message: f.t("components.import.addFailure", [k])
|
|
1489
1492
|
}), !1;
|
|
1490
1493
|
if (y.length > 0)
|
|
1491
|
-
|
|
1492
|
-
type:
|
|
1494
|
+
e.notifier.add({
|
|
1495
|
+
type: re.SUCCESS,
|
|
1493
1496
|
message: f.t("components.import.featuresAdded", [
|
|
1494
1497
|
y.length
|
|
1495
1498
|
])
|
|
1496
1499
|
});
|
|
1497
1500
|
else
|
|
1498
|
-
return
|
|
1499
|
-
type:
|
|
1501
|
+
return e.notifier.add({
|
|
1502
|
+
type: re.ERROR,
|
|
1500
1503
|
message: f.t("components.import.nothingAdded")
|
|
1501
1504
|
}), !1;
|
|
1502
1505
|
return !0;
|
|
1503
1506
|
},
|
|
1504
|
-
|
|
1505
|
-
|
|
1507
|
+
e.windowManager,
|
|
1508
|
+
T,
|
|
1506
1509
|
"category-manager"
|
|
1507
1510
|
);
|
|
1508
|
-
return
|
|
1509
|
-
renamed:
|
|
1510
|
-
visibilityChanged:
|
|
1511
|
-
setSelection(
|
|
1512
|
-
|
|
1511
|
+
return i.addActions([d, u]), {
|
|
1512
|
+
renamed: o,
|
|
1513
|
+
visibilityChanged: t,
|
|
1514
|
+
setSelection(c) {
|
|
1515
|
+
c && (i.selection.value = i.items.value.filter((f) => c === f.name));
|
|
1513
1516
|
},
|
|
1514
1517
|
clearSelection() {
|
|
1515
|
-
|
|
1518
|
+
i.selection.value.length && (i.selection.value = []);
|
|
1516
1519
|
},
|
|
1517
|
-
setVisibility(
|
|
1518
|
-
const
|
|
1519
|
-
(
|
|
1520
|
+
setVisibility(c, f) {
|
|
1521
|
+
const h = i.items.value.find(
|
|
1522
|
+
(g) => c === g.name
|
|
1520
1523
|
);
|
|
1521
|
-
if (
|
|
1522
|
-
const
|
|
1524
|
+
if (h) {
|
|
1525
|
+
const g = h.actions.find(
|
|
1523
1526
|
(y) => y.name === "visibilityAction"
|
|
1524
1527
|
);
|
|
1525
|
-
|
|
1528
|
+
g && (g.icon = f ? "$vcsCheckboxChecked" : "$vcsCheckbox");
|
|
1526
1529
|
}
|
|
1527
1530
|
},
|
|
1528
|
-
add(
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
[
|
|
1533
|
-
...s.collection
|
|
1534
|
-
]
|
|
1535
|
-
), s.collection.add(d);
|
|
1531
|
+
add(c) {
|
|
1532
|
+
c.properties.title = mi(c.type, [
|
|
1533
|
+
...s.collection
|
|
1534
|
+
]), s.collection.add(c);
|
|
1536
1535
|
},
|
|
1537
|
-
remove(
|
|
1538
|
-
const f = s.collection.getByKey(
|
|
1536
|
+
remove(c) {
|
|
1537
|
+
const f = s.collection.getByKey(c);
|
|
1539
1538
|
f && s.collection.remove(f);
|
|
1540
1539
|
},
|
|
1541
|
-
collectionComponent:
|
|
1540
|
+
collectionComponent: i,
|
|
1542
1541
|
destroy() {
|
|
1543
|
-
|
|
1542
|
+
e.categoryManager.removeOwner(T), o.destroy(), t.destroy(), r(), l();
|
|
1544
1543
|
}
|
|
1545
1544
|
};
|
|
1546
1545
|
}
|
|
1547
|
-
|
|
1548
|
-
return {
|
|
1549
|
-
visibleColor: D.getDefaultOptions().visibleColor,
|
|
1550
|
-
shadowColor: D.getDefaultOptions().shadowColor,
|
|
1551
|
-
tools: [...Object.values(g)]
|
|
1552
|
-
};
|
|
1553
|
-
}
|
|
1554
|
-
const ti = {
|
|
1546
|
+
const wi = Ae({
|
|
1555
1547
|
name: "ViewshedConfigEditor",
|
|
1556
1548
|
components: {
|
|
1557
|
-
AbstractConfigEditor:
|
|
1558
|
-
VcsFormSection:
|
|
1559
|
-
VContainer:
|
|
1560
|
-
VRow:
|
|
1561
|
-
VCol:
|
|
1562
|
-
VcsLabel:
|
|
1563
|
-
VcsSelect:
|
|
1564
|
-
VColorPicker:
|
|
1549
|
+
AbstractConfigEditor: Lt,
|
|
1550
|
+
VcsFormSection: $e,
|
|
1551
|
+
VContainer: jt,
|
|
1552
|
+
VRow: Fe,
|
|
1553
|
+
VCol: We,
|
|
1554
|
+
VcsLabel: De,
|
|
1555
|
+
VcsSelect: ke,
|
|
1556
|
+
VColorPicker: Wt
|
|
1565
1557
|
},
|
|
1566
1558
|
props: {
|
|
1567
1559
|
getConfig: {
|
|
@@ -1573,41 +1565,46 @@ const ti = {
|
|
|
1573
1565
|
required: !0
|
|
1574
1566
|
}
|
|
1575
1567
|
},
|
|
1576
|
-
setup(
|
|
1577
|
-
const
|
|
1578
|
-
|
|
1579
|
-
|
|
1568
|
+
setup(e) {
|
|
1569
|
+
const o = me("vcsUiApp"), { getDefaultOptions: t } = o.plugins.getByKey(
|
|
1570
|
+
T
|
|
1571
|
+
), i = K({
|
|
1572
|
+
...t == null ? void 0 : t(),
|
|
1573
|
+
...e.getConfig()
|
|
1574
|
+
});
|
|
1575
|
+
function s() {
|
|
1576
|
+
e.setConfig(structuredClone(ht(i.value)));
|
|
1580
1577
|
}
|
|
1581
1578
|
return {
|
|
1582
|
-
localConfig:
|
|
1583
|
-
ViewshedTypes:
|
|
1584
|
-
apply:
|
|
1585
|
-
toolItems: Object.values(
|
|
1586
|
-
value:
|
|
1587
|
-
title: `viewshed.${
|
|
1579
|
+
localConfig: i,
|
|
1580
|
+
ViewshedTypes: _,
|
|
1581
|
+
apply: s,
|
|
1582
|
+
toolItems: Object.values(_).map((n) => ({
|
|
1583
|
+
value: n,
|
|
1584
|
+
title: `viewshed.${n}`
|
|
1588
1585
|
}))
|
|
1589
1586
|
};
|
|
1590
1587
|
}
|
|
1591
|
-
};
|
|
1592
|
-
function
|
|
1593
|
-
const
|
|
1594
|
-
return
|
|
1595
|
-
default:
|
|
1596
|
-
|
|
1588
|
+
});
|
|
1589
|
+
function gi(e, o, t, i, s, n) {
|
|
1590
|
+
const d = V("VcsLabel"), r = V("v-col"), u = V("VcsSelect"), l = V("v-row"), c = V("VColorPicker"), f = V("v-container"), h = V("VcsFormSection"), g = V("AbstractConfigEditor");
|
|
1591
|
+
return N(), W(g, ft({ ...e.$attrs, ...e.$props }, { onSubmit: e.apply }), {
|
|
1592
|
+
default: v(() => [
|
|
1593
|
+
e.localConfig ? (N(), W(h, {
|
|
1597
1594
|
key: 0,
|
|
1598
1595
|
heading: "viewshed.editor.general"
|
|
1599
1596
|
}, {
|
|
1600
|
-
default:
|
|
1601
|
-
|
|
1602
|
-
default:
|
|
1603
|
-
|
|
1604
|
-
default:
|
|
1605
|
-
|
|
1606
|
-
default:
|
|
1607
|
-
|
|
1608
|
-
default:
|
|
1609
|
-
|
|
1610
|
-
|
|
1597
|
+
default: v(() => [
|
|
1598
|
+
m(f, { class: "px-1 py-0" }, {
|
|
1599
|
+
default: v(() => [
|
|
1600
|
+
m(l, { "no-gutters": "" }, {
|
|
1601
|
+
default: v(() => [
|
|
1602
|
+
m(r, null, {
|
|
1603
|
+
default: v(() => [
|
|
1604
|
+
m(d, { "html-for": "viewshed-editor-tools" }, {
|
|
1605
|
+
default: v(() => [
|
|
1606
|
+
z(
|
|
1607
|
+
j(e.$t("viewshed.editor.tools")),
|
|
1611
1608
|
1
|
|
1612
1609
|
/* TEXT */
|
|
1613
1610
|
)
|
|
@@ -1619,15 +1616,15 @@ function ii(i, e, o, t, s, n) {
|
|
|
1619
1616
|
_: 1
|
|
1620
1617
|
/* STABLE */
|
|
1621
1618
|
}),
|
|
1622
|
-
|
|
1623
|
-
default:
|
|
1624
|
-
|
|
1619
|
+
m(r, null, {
|
|
1620
|
+
default: v(() => [
|
|
1621
|
+
m(u, {
|
|
1625
1622
|
id: "viewshed-tools",
|
|
1626
|
-
|
|
1627
|
-
modelValue:
|
|
1628
|
-
|
|
1623
|
+
modelValue: e.localConfig.tools,
|
|
1624
|
+
"onUpdate:modelValue": o[0] || (o[0] = (y) => e.localConfig.tools = y),
|
|
1625
|
+
items: e.toolItems,
|
|
1629
1626
|
multiple: !0
|
|
1630
|
-
}, null, 8, ["
|
|
1627
|
+
}, null, 8, ["modelValue", "items"])
|
|
1631
1628
|
]),
|
|
1632
1629
|
_: 1
|
|
1633
1630
|
/* STABLE */
|
|
@@ -1636,14 +1633,14 @@ function ii(i, e, o, t, s, n) {
|
|
|
1636
1633
|
_: 1
|
|
1637
1634
|
/* STABLE */
|
|
1638
1635
|
}),
|
|
1639
|
-
|
|
1640
|
-
default:
|
|
1641
|
-
|
|
1642
|
-
default:
|
|
1643
|
-
|
|
1644
|
-
default:
|
|
1645
|
-
|
|
1646
|
-
|
|
1636
|
+
m(l, { "no-gutters": "" }, {
|
|
1637
|
+
default: v(() => [
|
|
1638
|
+
m(r, null, {
|
|
1639
|
+
default: v(() => [
|
|
1640
|
+
m(d, { "html-for": "viewshed-editor-visible-color" }, {
|
|
1641
|
+
default: v(() => [
|
|
1642
|
+
z(
|
|
1643
|
+
j(e.$t("viewshed.editor.visibleColor")),
|
|
1647
1644
|
1
|
|
1648
1645
|
/* TEXT */
|
|
1649
1646
|
)
|
|
@@ -1655,11 +1652,11 @@ function ii(i, e, o, t, s, n) {
|
|
|
1655
1652
|
_: 1
|
|
1656
1653
|
/* STABLE */
|
|
1657
1654
|
}),
|
|
1658
|
-
|
|
1659
|
-
default:
|
|
1660
|
-
|
|
1661
|
-
modelValue:
|
|
1662
|
-
"onUpdate:modelValue":
|
|
1655
|
+
m(r, null, {
|
|
1656
|
+
default: v(() => [
|
|
1657
|
+
m(c, {
|
|
1658
|
+
modelValue: e.localConfig.visibleColor,
|
|
1659
|
+
"onUpdate:modelValue": o[1] || (o[1] = (y) => e.localConfig.visibleColor = y),
|
|
1663
1660
|
mode: "rgba"
|
|
1664
1661
|
}, null, 8, ["modelValue"])
|
|
1665
1662
|
]),
|
|
@@ -1670,14 +1667,14 @@ function ii(i, e, o, t, s, n) {
|
|
|
1670
1667
|
_: 1
|
|
1671
1668
|
/* STABLE */
|
|
1672
1669
|
}),
|
|
1673
|
-
|
|
1674
|
-
default:
|
|
1675
|
-
|
|
1676
|
-
default:
|
|
1677
|
-
|
|
1678
|
-
default:
|
|
1679
|
-
|
|
1680
|
-
|
|
1670
|
+
m(l, { "no-gutters": "" }, {
|
|
1671
|
+
default: v(() => [
|
|
1672
|
+
m(r, null, {
|
|
1673
|
+
default: v(() => [
|
|
1674
|
+
m(d, { "html-for": "viewshed-editor-shadow-color" }, {
|
|
1675
|
+
default: v(() => [
|
|
1676
|
+
z(
|
|
1677
|
+
j(e.$t("viewshed.editor.shadowColor")),
|
|
1681
1678
|
1
|
|
1682
1679
|
/* TEXT */
|
|
1683
1680
|
)
|
|
@@ -1689,11 +1686,11 @@ function ii(i, e, o, t, s, n) {
|
|
|
1689
1686
|
_: 1
|
|
1690
1687
|
/* STABLE */
|
|
1691
1688
|
}),
|
|
1692
|
-
|
|
1693
|
-
default:
|
|
1694
|
-
|
|
1695
|
-
modelValue:
|
|
1696
|
-
"onUpdate:modelValue":
|
|
1689
|
+
m(r, null, {
|
|
1690
|
+
default: v(() => [
|
|
1691
|
+
m(c, {
|
|
1692
|
+
modelValue: e.localConfig.shadowColor,
|
|
1693
|
+
"onUpdate:modelValue": o[2] || (o[2] = (y) => e.localConfig.shadowColor = y),
|
|
1697
1694
|
mode: "rgba"
|
|
1698
1695
|
}, null, 8, ["modelValue"])
|
|
1699
1696
|
]),
|
|
@@ -1711,101 +1708,162 @@ function ii(i, e, o, t, s, n) {
|
|
|
1711
1708
|
]),
|
|
1712
1709
|
_: 1
|
|
1713
1710
|
/* STABLE */
|
|
1714
|
-
})) :
|
|
1711
|
+
})) : Y("v-if", !0)
|
|
1715
1712
|
]),
|
|
1716
1713
|
_: 1
|
|
1717
1714
|
/* STABLE */
|
|
1718
1715
|
}, 16, ["onSubmit"]);
|
|
1719
1716
|
}
|
|
1720
|
-
const
|
|
1721
|
-
|
|
1722
|
-
|
|
1717
|
+
const Ci = /* @__PURE__ */ xe(wi, [["render", gi]]);
|
|
1718
|
+
class he extends Le {
|
|
1719
|
+
constructor(t, i) {
|
|
1720
|
+
super(t, i);
|
|
1721
|
+
C(this, "_mode");
|
|
1722
|
+
C(this, "_viewshedOptions");
|
|
1723
|
+
this._mode = Ue(
|
|
1724
|
+
t.m,
|
|
1725
|
+
O,
|
|
1726
|
+
O.CREATE
|
|
1727
|
+
), this._viewshedOptions = t.cv || null;
|
|
1728
|
+
}
|
|
1729
|
+
static get className() {
|
|
1730
|
+
return "ActivateViewshedCallback";
|
|
1731
|
+
}
|
|
1732
|
+
callback() {
|
|
1733
|
+
const t = this._app.plugins.getByKey(T);
|
|
1734
|
+
if (!t) {
|
|
1735
|
+
X("ActivateViewshedCallback").warning(
|
|
1736
|
+
`Plugin ${T} not found`
|
|
1737
|
+
);
|
|
1738
|
+
return;
|
|
1739
|
+
}
|
|
1740
|
+
t.state.m = this._mode, t.state.cv = this._viewshedOptions, t.activate();
|
|
1741
|
+
}
|
|
1742
|
+
toJSON() {
|
|
1743
|
+
const t = super.toJSON();
|
|
1744
|
+
return this._mode && (t.m = this._mode), this._viewshedOptions && (t.cv = structuredClone(this._viewshedOptions)), t;
|
|
1745
|
+
}
|
|
1746
|
+
}
|
|
1747
|
+
class fe extends Le {
|
|
1748
|
+
static get className() {
|
|
1749
|
+
return "DeactivateViewshedCallback";
|
|
1750
|
+
}
|
|
1751
|
+
callback() {
|
|
1752
|
+
const o = this._app.plugins.getByKey(T);
|
|
1753
|
+
if (!o) {
|
|
1754
|
+
X("DeactivateShadowCallback").warning(
|
|
1755
|
+
`Plugin ${T} not found`
|
|
1756
|
+
);
|
|
1757
|
+
return;
|
|
1758
|
+
}
|
|
1759
|
+
o.deactivate();
|
|
1760
|
+
}
|
|
1761
|
+
}
|
|
1762
|
+
function Pe() {
|
|
1763
|
+
return {
|
|
1764
|
+
visibleColor: B.getDefaultOptions().colorOptions.visibleColor,
|
|
1765
|
+
shadowColor: B.getDefaultOptions().colorOptions.shadowColor,
|
|
1766
|
+
tools: [...Object.values(_)]
|
|
1723
1767
|
};
|
|
1768
|
+
}
|
|
1769
|
+
function pe(e, o, t) {
|
|
1770
|
+
var i;
|
|
1771
|
+
if (!(!(t != null && t.m) || !(e instanceof H))) {
|
|
1772
|
+
if (t.m === O.CREATE) {
|
|
1773
|
+
const s = ((i = t.cv) == null ? void 0 : i.viewshedType) ?? _.CONE;
|
|
1774
|
+
o == null || o.createViewshed(s).catch((n) => {
|
|
1775
|
+
X(T).error("Failed to create viewshed", String(n));
|
|
1776
|
+
});
|
|
1777
|
+
} else if (t.cv) {
|
|
1778
|
+
const s = new B(t.cv);
|
|
1779
|
+
t.m === O.VIEW ? o == null || o.viewViewshed(s) : o == null || o.editViewshed(s);
|
|
1780
|
+
}
|
|
1781
|
+
}
|
|
1782
|
+
}
|
|
1783
|
+
function Ti(e) {
|
|
1784
|
+
let o, t, i = () => {
|
|
1785
|
+
};
|
|
1786
|
+
const s = Pe(), n = { ...s, ...e }, d = Q({});
|
|
1724
1787
|
return {
|
|
1725
1788
|
get name() {
|
|
1726
|
-
return
|
|
1789
|
+
return T;
|
|
1727
1790
|
},
|
|
1728
1791
|
get version() {
|
|
1729
|
-
return
|
|
1792
|
+
return ti;
|
|
1730
1793
|
},
|
|
1731
1794
|
get mapVersion() {
|
|
1732
|
-
return
|
|
1795
|
+
return ii;
|
|
1733
1796
|
},
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1797
|
+
getDefaultOptions: Pe,
|
|
1798
|
+
state: d,
|
|
1799
|
+
async initialize(r, u) {
|
|
1800
|
+
o = r, o.callbackClassRegistry.registerClass(
|
|
1801
|
+
this[ee],
|
|
1802
|
+
he.className,
|
|
1803
|
+
he
|
|
1804
|
+
), o.callbackClassRegistry.registerClass(
|
|
1805
|
+
this[ee],
|
|
1806
|
+
fe.className,
|
|
1807
|
+
fe
|
|
1808
|
+
), r.categoryClassRegistry.registerClass(
|
|
1809
|
+
this[ee],
|
|
1810
|
+
_e.className,
|
|
1811
|
+
_e
|
|
1744
1812
|
);
|
|
1745
|
-
const
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1813
|
+
const l = await vi(r);
|
|
1814
|
+
t = ni(
|
|
1815
|
+
r,
|
|
1816
|
+
n,
|
|
1817
|
+
l
|
|
1750
1818
|
);
|
|
1751
|
-
const
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
), { destroy:
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
), { activeMap:
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
}
|
|
1767
|
-
let f = !1;
|
|
1768
|
-
c && (f = !0, d(c));
|
|
1769
|
-
const m = s.maps.mapActivated.addEventListener(
|
|
1770
|
-
(_) => {
|
|
1771
|
-
e.stop(), f || (d(_), f = !0);
|
|
1819
|
+
const c = pi(
|
|
1820
|
+
r,
|
|
1821
|
+
t,
|
|
1822
|
+
T,
|
|
1823
|
+
n.tools || s.tools
|
|
1824
|
+
), { destroy: f } = hi(
|
|
1825
|
+
t,
|
|
1826
|
+
r,
|
|
1827
|
+
l.collectionComponent
|
|
1828
|
+
), { activeMap: h } = r.maps;
|
|
1829
|
+
let g = !1;
|
|
1830
|
+
h && (g = !0, pe(h, t, u));
|
|
1831
|
+
const y = r.maps.mapActivated.addEventListener(
|
|
1832
|
+
(k) => {
|
|
1833
|
+
t == null || t.stop(), g || (pe(k, t, u), g = !0);
|
|
1772
1834
|
}
|
|
1773
1835
|
);
|
|
1774
|
-
|
|
1775
|
-
|
|
1836
|
+
i = () => {
|
|
1837
|
+
y(), c(), f(), l == null || l.destroy(), t == null || t.destroy();
|
|
1776
1838
|
};
|
|
1777
1839
|
},
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1840
|
+
activate() {
|
|
1841
|
+
if (!t || !o) {
|
|
1842
|
+
X(T).error("Cannot activate plugin before initialization");
|
|
1843
|
+
return;
|
|
1844
|
+
}
|
|
1845
|
+
if (!o.maps.activeMap) {
|
|
1846
|
+
X(T).error("Cannot activate plugin without an active map");
|
|
1847
|
+
return;
|
|
1848
|
+
}
|
|
1849
|
+
pe(o.maps.activeMap, t, this.state);
|
|
1850
|
+
},
|
|
1851
|
+
deactivate() {
|
|
1852
|
+
t == null || t.stop();
|
|
1853
|
+
},
|
|
1787
1854
|
toJSON() {
|
|
1788
|
-
const
|
|
1789
|
-
return
|
|
1855
|
+
const r = {};
|
|
1856
|
+
return n.tools && s.tools.length !== n.tools.length && (r.tools = [...n.tools]), n.shadowColor && n.shadowColor !== s.shadowColor && (r.shadowColor = n.shadowColor), n.visibleColor && n.visibleColor !== s.visibleColor && (r.visibleColor = n.visibleColor), r;
|
|
1790
1857
|
},
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
*/
|
|
1796
|
-
getState(s) {
|
|
1797
|
-
var w, c;
|
|
1798
|
-
const n = {}, r = e.mode.value, l = (w = e.currentViewshed.value) == null ? void 0 : w.toJSON();
|
|
1799
|
-
return r !== null && r !== "create" && l && (n.m = r, n.cv = l, s && ((c = n.cv.properties) != null && c.title) && (Object.keys(n.properties).length === 1 ? delete n.cv.properties : delete n.cv.properties.title)), n;
|
|
1858
|
+
getState(r) {
|
|
1859
|
+
var f, h, g, y;
|
|
1860
|
+
const u = {}, l = t == null ? void 0 : t.mode.value, c = (f = t == null ? void 0 : t.currentViewshed.value) == null ? void 0 : f.toJSON();
|
|
1861
|
+
return l !== null && l !== O.CREATE && c && (u.m = l, u.cv = c, r && ((g = (h = u.cv) == null ? void 0 : h.properties) != null && g.title) && (Object.keys((y = u.cv) == null ? void 0 : y.properties).length === 1 ? delete u.cv.properties : delete u.cv.properties.title)), u;
|
|
1800
1862
|
},
|
|
1801
|
-
/**
|
|
1802
|
-
* components for configuring the plugin and/ or custom items defined by the plugin
|
|
1803
|
-
* @returns {Array<import("@vcmap/ui").PluginConfigEditor>}
|
|
1804
|
-
*/
|
|
1805
1863
|
getConfigEditors() {
|
|
1806
1864
|
return [
|
|
1807
1865
|
{
|
|
1808
|
-
component:
|
|
1866
|
+
component: Ci,
|
|
1809
1867
|
title: "viewshed.editor.title",
|
|
1810
1868
|
infoUrlCallback: o == null ? void 0 : o.getHelpUrlCallback(
|
|
1811
1869
|
"/components/plugins/viewshedToolConfig.html",
|
|
@@ -1814,7 +1872,6 @@ function ui(i) {
|
|
|
1814
1872
|
}
|
|
1815
1873
|
];
|
|
1816
1874
|
},
|
|
1817
|
-
destroy: () => t(),
|
|
1818
1875
|
i18n: {
|
|
1819
1876
|
en: {
|
|
1820
1877
|
viewshed: {
|
|
@@ -1829,15 +1886,13 @@ function ui(i) {
|
|
|
1829
1886
|
heightMode: "Height mode",
|
|
1830
1887
|
relative: "Relative to ground",
|
|
1831
1888
|
absolute: "Absolute",
|
|
1832
|
-
new: "New",
|
|
1833
1889
|
cancel: "Cancel",
|
|
1834
|
-
[
|
|
1835
|
-
[
|
|
1890
|
+
[_.CONE]: "Cone viewshed analysis",
|
|
1891
|
+
[_.THREESIXTY]: "360° viewshed analysis",
|
|
1836
1892
|
create: {
|
|
1837
|
-
[
|
|
1838
|
-
[
|
|
1893
|
+
[_.CONE]: "Create cone viewshed analysis",
|
|
1894
|
+
[_.THREESIXTY]: "Create 360° viewshed analysis"
|
|
1839
1895
|
},
|
|
1840
|
-
addToMyWorkspace: "Add to My Workspace",
|
|
1841
1896
|
temporary: "Temporary",
|
|
1842
1897
|
jumpToViewpoint: "Jump to viewpoint",
|
|
1843
1898
|
returnToViewpoint: "Return to previous viewpoint",
|
|
@@ -1867,15 +1922,13 @@ function ui(i) {
|
|
|
1867
1922
|
heightMode: "Höhenmodus",
|
|
1868
1923
|
relative: "Relativ zum Gelände",
|
|
1869
1924
|
absolute: "Absolut",
|
|
1870
|
-
new: "Neu",
|
|
1871
1925
|
cancel: "Abbrechen",
|
|
1872
|
-
[
|
|
1873
|
-
[
|
|
1926
|
+
[_.CONE]: "Sichtkegelanalyse",
|
|
1927
|
+
[_.THREESIXTY]: "360° Sichtsanalyse",
|
|
1874
1928
|
create: {
|
|
1875
|
-
[
|
|
1876
|
-
[
|
|
1929
|
+
[_.CONE]: "Sichtkegelanalyse erstellen",
|
|
1930
|
+
[_.THREESIXTY]: "360° Sichtanalyse erstellen"
|
|
1877
1931
|
},
|
|
1878
|
-
addToMyWorkspace: "Zu Mein Arbeitsbereich hinzufügen",
|
|
1879
1932
|
temporary: "Temporäre",
|
|
1880
1933
|
jumpToViewpoint: "Zu Standpunkt springen",
|
|
1881
1934
|
returnToViewpoint: "Zu vorherigem Standpunkt zurück springen",
|
|
@@ -1892,9 +1945,19 @@ function ui(i) {
|
|
|
1892
1945
|
}
|
|
1893
1946
|
}
|
|
1894
1947
|
}
|
|
1948
|
+
},
|
|
1949
|
+
destroy() {
|
|
1950
|
+
o && (o.callbackClassRegistry.unregisterClass(
|
|
1951
|
+
this[ee],
|
|
1952
|
+
he.className
|
|
1953
|
+
), o.callbackClassRegistry.unregisterClass(
|
|
1954
|
+
this[ee],
|
|
1955
|
+
fe.className
|
|
1956
|
+
)), i();
|
|
1895
1957
|
}
|
|
1896
1958
|
};
|
|
1897
1959
|
}
|
|
1898
1960
|
export {
|
|
1899
|
-
|
|
1961
|
+
Ti as default,
|
|
1962
|
+
Pe as getDefaultOptions
|
|
1900
1963
|
};
|