@eox/drawtools 0.14.0 → 0.14.1-dev.1740731700.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/dist/eox-drawtools.js +288 -289
- package/dist/eox-drawtools.umd.cjs +20 -20
- package/package.json +1 -1
- package/src/main.js +3 -2
- package/src/methods/draw/create-select-handler.js +4 -4
- package/src/methods/draw/emit-drawn-features.js +9 -2
- package/src/methods/draw/on-draw-end.js +12 -6
- package/types/drawtools/src/main.d.ts +2 -1
- package/types/drawtools/src/main.d.ts.map +1 -1
- package/types/drawtools/src/methods/draw/create-select-handler.d.ts.map +1 -1
- package/types/drawtools/src/methods/draw/emit-drawn-features.d.ts +2 -1
- package/types/drawtools/src/methods/draw/emit-drawn-features.d.ts.map +1 -1
- package/types/drawtools/src/methods/draw/on-draw-end.d.ts +2 -1
- package/types/drawtools/src/methods/draw/on-draw-end.d.ts.map +1 -1
package/dist/eox-drawtools.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var
|
|
1
|
+
var vn = Object.defineProperty;
|
|
2
2
|
var Ue = (n) => {
|
|
3
3
|
throw TypeError(n);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var R = (n, t, e) =>
|
|
5
|
+
var Cn = (n, t, e) => t in n ? vn(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
|
|
6
|
+
var R = (n, t, e) => Cn(n, typeof t != "symbol" ? t + "" : t, e), Xe = (n, t, e) => t.has(n) || Ue("Cannot " + e);
|
|
7
7
|
var M = (n, t, e) => (Xe(n, t, "read from private field"), e ? e.call(n) : t.get(n)), F = (n, t, e) => t.has(n) ? Ue("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(n) : t.set(n, e), $ = (n, t, e, i) => (Xe(n, t, "write to private field"), i ? i.call(n, e) : t.set(n, e), e);
|
|
8
8
|
/**
|
|
9
9
|
* @license
|
|
@@ -11,7 +11,7 @@ var M = (n, t, e) => (Xe(n, t, "read from private field"), e ? e.call(n) : t.get
|
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
12
|
*/
|
|
13
13
|
const Lt = globalThis, fe = Lt.ShadowRoot && (Lt.ShadyCSS === void 0 || Lt.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, bi = Symbol(), Ye = /* @__PURE__ */ new WeakMap();
|
|
14
|
-
let
|
|
14
|
+
let wn = class {
|
|
15
15
|
constructor(t, e, i) {
|
|
16
16
|
if (this._$cssResult$ = !0, i !== bi) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
17
17
|
this.cssText = t, this.t = e;
|
|
@@ -29,7 +29,7 @@ let Cn = class {
|
|
|
29
29
|
return this.cssText;
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
|
-
const
|
|
32
|
+
const bn = (n) => new wn(typeof n == "string" ? n : n + "", void 0, bi), En = (n, t) => {
|
|
33
33
|
if (fe) n.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
|
34
34
|
else for (const e of t) {
|
|
35
35
|
const i = document.createElement("style"), r = Lt.litNonce;
|
|
@@ -38,17 +38,17 @@ const wn = (n) => new Cn(typeof n == "string" ? n : n + "", void 0, bi), bn = (n
|
|
|
38
38
|
}, Be = fe ? (n) => n : (n) => n instanceof CSSStyleSheet ? ((t) => {
|
|
39
39
|
let e = "";
|
|
40
40
|
for (const i of t.cssRules) e += i.cssText;
|
|
41
|
-
return
|
|
41
|
+
return bn(e);
|
|
42
42
|
})(n) : n;
|
|
43
43
|
/**
|
|
44
44
|
* @license
|
|
45
45
|
* Copyright 2017 Google LLC
|
|
46
46
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
47
|
*/
|
|
48
|
-
const { is:
|
|
48
|
+
const { is: xn, defineProperty: Pn, getOwnPropertyDescriptor: Mn, getOwnPropertyNames: Sn, getOwnPropertySymbols: $n, getPrototypeOf: An } = Object, I = globalThis, Ve = I.trustedTypes, Fn = Ve ? Ve.emptyScript : "", Dt = I.reactiveElementPolyfillSupport, dt = (n, t) => n, se = { toAttribute(n, t) {
|
|
49
49
|
switch (t) {
|
|
50
50
|
case Boolean:
|
|
51
|
-
n = n ?
|
|
51
|
+
n = n ? Fn : null;
|
|
52
52
|
break;
|
|
53
53
|
case Object:
|
|
54
54
|
case Array:
|
|
@@ -73,7 +73,7 @@ const { is: En, defineProperty: xn, getOwnPropertyDescriptor: Pn, getOwnProperty
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
return e;
|
|
76
|
-
} }, Ei = (n, t) => !
|
|
76
|
+
} }, Ei = (n, t) => !xn(n, t), ze = { attribute: !0, type: String, converter: se, reflect: !1, hasChanged: Ei };
|
|
77
77
|
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), I.litPropertyMetadata ?? (I.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
78
78
|
class tt extends HTMLElement {
|
|
79
79
|
static addInitializer(t) {
|
|
@@ -85,11 +85,11 @@ class tt extends HTMLElement {
|
|
|
85
85
|
static createProperty(t, e = ze) {
|
|
86
86
|
if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
|
|
87
87
|
const i = Symbol(), r = this.getPropertyDescriptor(t, i, e);
|
|
88
|
-
r !== void 0 &&
|
|
88
|
+
r !== void 0 && Pn(this.prototype, t, r);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
static getPropertyDescriptor(t, e, i) {
|
|
92
|
-
const { get: r, set: s } =
|
|
92
|
+
const { get: r, set: s } = Mn(this.prototype, t) ?? { get() {
|
|
93
93
|
return this[e];
|
|
94
94
|
}, set(o) {
|
|
95
95
|
this[e] = o;
|
|
@@ -106,13 +106,13 @@ class tt extends HTMLElement {
|
|
|
106
106
|
}
|
|
107
107
|
static _$Ei() {
|
|
108
108
|
if (this.hasOwnProperty(dt("elementProperties"))) return;
|
|
109
|
-
const t =
|
|
109
|
+
const t = An(this);
|
|
110
110
|
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
111
111
|
}
|
|
112
112
|
static finalize() {
|
|
113
113
|
if (this.hasOwnProperty(dt("finalized"))) return;
|
|
114
114
|
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(dt("properties"))) {
|
|
115
|
-
const e = this.properties, i = [...
|
|
115
|
+
const e = this.properties, i = [...Sn(e), ...$n(e)];
|
|
116
116
|
for (const r of i) this.createProperty(r, e[r]);
|
|
117
117
|
}
|
|
118
118
|
const t = this[Symbol.metadata];
|
|
@@ -161,7 +161,7 @@ class tt extends HTMLElement {
|
|
|
161
161
|
}
|
|
162
162
|
createRenderRoot() {
|
|
163
163
|
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
164
|
-
return
|
|
164
|
+
return En(t, this.constructor.elementStyles), t;
|
|
165
165
|
}
|
|
166
166
|
connectedCallback() {
|
|
167
167
|
var t;
|
|
@@ -273,28 +273,28 @@ class tt extends HTMLElement {
|
|
|
273
273
|
firstUpdated(t) {
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
|
-
tt.elementStyles = [], tt.shadowRootOptions = { mode: "open" }, tt[dt("elementProperties")] = /* @__PURE__ */ new Map(), tt[dt("finalized")] = /* @__PURE__ */ new Map(),
|
|
276
|
+
tt.elementStyles = [], tt.shadowRootOptions = { mode: "open" }, tt[dt("elementProperties")] = /* @__PURE__ */ new Map(), tt[dt("finalized")] = /* @__PURE__ */ new Map(), Dt == null || Dt({ ReactiveElement: tt }), (I.reactiveElementVersions ?? (I.reactiveElementVersions = [])).push("2.0.4");
|
|
277
277
|
/**
|
|
278
278
|
* @license
|
|
279
279
|
* Copyright 2017 Google LLC
|
|
280
280
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
281
281
|
*/
|
|
282
|
-
const gt = globalThis, Tt = gt.trustedTypes, Je = Tt ? Tt.createPolicy("lit-html", { createHTML: (n) => n }) : void 0, xi = "$lit$", G = `lit$${Math.random().toFixed(9).slice(2)}$`, Pi = "?" + G,
|
|
282
|
+
const gt = globalThis, Tt = gt.trustedTypes, Je = Tt ? Tt.createPolicy("lit-html", { createHTML: (n) => n }) : void 0, xi = "$lit$", G = `lit$${Math.random().toFixed(9).slice(2)}$`, Pi = "?" + G, Gn = `<${Pi}>`, Y = document, ft = () => Y.createComment(""), pt = (n) => n === null || typeof n != "object" && typeof n != "function", pe = Array.isArray, In = (n) => pe(n) || typeof (n == null ? void 0 : n[Symbol.iterator]) == "function", Qt = `[
|
|
283
283
|
\f\r]`, ut = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, We = /-->/g, qe = />/g, T = RegExp(`>|${Qt}(?:([^\\s"'>=/]+)(${Qt}*=${Qt}*(?:[^
|
|
284
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), Ze = /'/g,
|
|
284
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), Ze = /'/g, Ke = /"/g, Mi = /^(?:script|style|textarea|title)$/i, Ln = (n) => (t, ...e) => ({ _$litType$: n, strings: t, values: e }), H = Ln(1), ot = Symbol.for("lit-noChange"), C = Symbol.for("lit-nothing"), De = /* @__PURE__ */ new WeakMap(), O = Y.createTreeWalker(Y, 129);
|
|
285
285
|
function Si(n, t) {
|
|
286
286
|
if (!pe(n) || !n.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
287
287
|
return Je !== void 0 ? Je.createHTML(t) : t;
|
|
288
288
|
}
|
|
289
|
-
const
|
|
289
|
+
const Rn = (n, t) => {
|
|
290
290
|
const e = n.length - 1, i = [];
|
|
291
291
|
let r, s = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = ut;
|
|
292
292
|
for (let a = 0; a < e; a++) {
|
|
293
293
|
const l = n[a];
|
|
294
294
|
let h, c, u = -1, d = 0;
|
|
295
|
-
for (; d < l.length && (o.lastIndex = d, c = o.exec(l), c !== null); ) d = o.lastIndex, o === ut ? c[1] === "!--" ? o = We : c[1] !== void 0 ? o = qe : c[2] !== void 0 ? (Mi.test(c[2]) && (r = RegExp("</" + c[2], "g")), o = T) : c[3] !== void 0 && (o = T) : o === T ? c[0] === ">" ? (o = r ?? ut, u = -1) : c[1] === void 0 ? u = -2 : (u = o.lastIndex - c[2].length, h = c[1], o = c[3] === void 0 ? T : c[3] === '"' ?
|
|
295
|
+
for (; d < l.length && (o.lastIndex = d, c = o.exec(l), c !== null); ) d = o.lastIndex, o === ut ? c[1] === "!--" ? o = We : c[1] !== void 0 ? o = qe : c[2] !== void 0 ? (Mi.test(c[2]) && (r = RegExp("</" + c[2], "g")), o = T) : c[3] !== void 0 && (o = T) : o === T ? c[0] === ">" ? (o = r ?? ut, u = -1) : c[1] === void 0 ? u = -2 : (u = o.lastIndex - c[2].length, h = c[1], o = c[3] === void 0 ? T : c[3] === '"' ? Ke : Ze) : o === Ke || o === Ze ? o = T : o === We || o === qe ? o = ut : (o = T, r = void 0);
|
|
296
296
|
const g = o === T && n[a + 1].startsWith("/>") ? " " : "";
|
|
297
|
-
s += o === ut ? l +
|
|
297
|
+
s += o === ut ? l + Gn : u >= 0 ? (i.push(h), l.slice(0, u) + xi + l.slice(u) + G + g) : l + G + (u === -2 ? a : g);
|
|
298
298
|
}
|
|
299
299
|
return [Si(n, s + (n[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), i];
|
|
300
300
|
};
|
|
@@ -303,7 +303,7 @@ class yt {
|
|
|
303
303
|
let r;
|
|
304
304
|
this.parts = [];
|
|
305
305
|
let s = 0, o = 0;
|
|
306
|
-
const a = t.length - 1, l = this.parts, [h, c] =
|
|
306
|
+
const a = t.length - 1, l = this.parts, [h, c] = Rn(t, e);
|
|
307
307
|
if (this.el = yt.createElement(h, i), O.currentNode = this.el.content, e === 2 || e === 3) {
|
|
308
308
|
const u = this.el.content.firstChild;
|
|
309
309
|
u.replaceWith(...u.childNodes);
|
|
@@ -312,7 +312,7 @@ class yt {
|
|
|
312
312
|
if (r.nodeType === 1) {
|
|
313
313
|
if (r.hasAttributes()) for (const u of r.getAttributeNames()) if (u.endsWith(xi)) {
|
|
314
314
|
const d = c[o++], g = r.getAttribute(u).split(G), f = /([.?@])?(.*)/.exec(d);
|
|
315
|
-
l.push({ type: 1, index: s, name: f[2], strings: g, ctor: f[1] === "." ?
|
|
315
|
+
l.push({ type: 1, index: s, name: f[2], strings: g, ctor: f[1] === "." ? Nn : f[1] === "?" ? On : f[1] === "@" ? kn : Xt }), r.removeAttribute(u);
|
|
316
316
|
} else u.startsWith(G) && (l.push({ type: 6, index: s }), r.removeAttribute(u));
|
|
317
317
|
if (Mi.test(r.tagName)) {
|
|
318
318
|
const u = r.textContent.split(G), d = u.length - 1;
|
|
@@ -342,7 +342,7 @@ function at(n, t, e = n, i) {
|
|
|
342
342
|
const s = pt(t) ? void 0 : t._$litDirective$;
|
|
343
343
|
return (r == null ? void 0 : r.constructor) !== s && ((a = r == null ? void 0 : r._$AO) == null || a.call(r, !1), s === void 0 ? r = void 0 : (r = new s(n), r._$AT(n, e, i)), i !== void 0 ? (e._$Co ?? (e._$Co = []))[i] = r : e._$Cl = r), r !== void 0 && (t = at(n, r._$AS(n, t.values), r, i)), t;
|
|
344
344
|
}
|
|
345
|
-
let
|
|
345
|
+
let Tn = class {
|
|
346
346
|
constructor(t, e) {
|
|
347
347
|
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
|
|
348
348
|
}
|
|
@@ -359,7 +359,7 @@ let Rn = class {
|
|
|
359
359
|
for (; l !== void 0; ) {
|
|
360
360
|
if (o === l.index) {
|
|
361
361
|
let h;
|
|
362
|
-
l.type === 2 ? h = new ye(s, s.nextSibling, this, t) : l.type === 1 ? h = new l.ctor(s, l.name, l.strings, this, t) : l.type === 6 && (h = new
|
|
362
|
+
l.type === 2 ? h = new ye(s, s.nextSibling, this, t) : l.type === 1 ? h = new l.ctor(s, l.name, l.strings, this, t) : l.type === 6 && (h = new jn(s, this, t)), this._$AV.push(h), l = i[++a];
|
|
363
363
|
}
|
|
364
364
|
o !== (l == null ? void 0 : l.index) && (s = O.nextNode(), o++);
|
|
365
365
|
}
|
|
@@ -389,7 +389,7 @@ let Rn = class {
|
|
|
389
389
|
return this._$AB;
|
|
390
390
|
}
|
|
391
391
|
_$AI(t, e = this) {
|
|
392
|
-
t = at(this, t, e), pt(t) ? t === C || t == null || t === "" ? (this._$AH !== C && this._$AR(), this._$AH = C) : t !== this._$AH && t !== ot && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) :
|
|
392
|
+
t = at(this, t, e), pt(t) ? t === C || t == null || t === "" ? (this._$AH !== C && this._$AR(), this._$AH = C) : t !== this._$AH && t !== ot && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : In(t) ? this.k(t) : this._(t);
|
|
393
393
|
}
|
|
394
394
|
O(t) {
|
|
395
395
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
@@ -405,13 +405,13 @@ let Rn = class {
|
|
|
405
405
|
const { values: e, _$litType$: i } = t, r = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = yt.createElement(Si(i.h, i.h[0]), this.options)), i);
|
|
406
406
|
if (((s = this._$AH) == null ? void 0 : s._$AD) === r) this._$AH.p(e);
|
|
407
407
|
else {
|
|
408
|
-
const o = new
|
|
408
|
+
const o = new Tn(r, this), a = o.u(this.options);
|
|
409
409
|
o.p(e), this.T(a), this._$AH = o;
|
|
410
410
|
}
|
|
411
411
|
}
|
|
412
412
|
_$AC(t) {
|
|
413
|
-
let e =
|
|
414
|
-
return e === void 0 &&
|
|
413
|
+
let e = De.get(t.strings);
|
|
414
|
+
return e === void 0 && De.set(t.strings, e = new yt(t)), e;
|
|
415
415
|
}
|
|
416
416
|
k(t) {
|
|
417
417
|
pe(this._$AH) || (this._$AH = [], this._$AR());
|
|
@@ -457,7 +457,7 @@ class Xt {
|
|
|
457
457
|
t === C ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
458
458
|
}
|
|
459
459
|
}
|
|
460
|
-
class
|
|
460
|
+
class Nn extends Xt {
|
|
461
461
|
constructor() {
|
|
462
462
|
super(...arguments), this.type = 3;
|
|
463
463
|
}
|
|
@@ -465,7 +465,7 @@ class Tn extends Xt {
|
|
|
465
465
|
this.element[this.name] = t === C ? void 0 : t;
|
|
466
466
|
}
|
|
467
467
|
}
|
|
468
|
-
class
|
|
468
|
+
class On extends Xt {
|
|
469
469
|
constructor() {
|
|
470
470
|
super(...arguments), this.type = 4;
|
|
471
471
|
}
|
|
@@ -473,7 +473,7 @@ class Nn extends Xt {
|
|
|
473
473
|
this.element.toggleAttribute(this.name, !!t && t !== C);
|
|
474
474
|
}
|
|
475
475
|
}
|
|
476
|
-
class
|
|
476
|
+
class kn extends Xt {
|
|
477
477
|
constructor(t, e, i, r, s) {
|
|
478
478
|
super(t, e, i, r, s), this.type = 5;
|
|
479
479
|
}
|
|
@@ -487,7 +487,7 @@ class On extends Xt {
|
|
|
487
487
|
typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
|
|
488
488
|
}
|
|
489
489
|
}
|
|
490
|
-
class
|
|
490
|
+
class jn {
|
|
491
491
|
constructor(t, e, i) {
|
|
492
492
|
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = i;
|
|
493
493
|
}
|
|
@@ -500,7 +500,7 @@ class kn {
|
|
|
500
500
|
}
|
|
501
501
|
const te = gt.litHtmlPolyfillSupport;
|
|
502
502
|
te == null || te(yt, ye), (gt.litHtmlVersions ?? (gt.litHtmlVersions = [])).push("3.2.1");
|
|
503
|
-
const
|
|
503
|
+
const Hn = (n, t, e) => {
|
|
504
504
|
const i = (e == null ? void 0 : e.renderBefore) ?? t;
|
|
505
505
|
let r = i._$litPart$;
|
|
506
506
|
if (r === void 0) {
|
|
@@ -525,7 +525,7 @@ class U extends tt {
|
|
|
525
525
|
}
|
|
526
526
|
update(t) {
|
|
527
527
|
const e = this.render();
|
|
528
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do =
|
|
528
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Hn(e, this.renderRoot, this.renderOptions);
|
|
529
529
|
}
|
|
530
530
|
connectedCallback() {
|
|
531
531
|
var t;
|
|
@@ -549,8 +549,8 @@ ee == null || ee({ LitElement: U });
|
|
|
549
549
|
* Copyright 2017 Google LLC
|
|
550
550
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
551
551
|
*/
|
|
552
|
-
const
|
|
553
|
-
let
|
|
552
|
+
const Un = (n) => (...t) => ({ _$litDirective$: n, values: t });
|
|
553
|
+
let Xn = class {
|
|
554
554
|
constructor(t) {
|
|
555
555
|
}
|
|
556
556
|
get _$AU() {
|
|
@@ -571,13 +571,13 @@ let Un = class {
|
|
|
571
571
|
* Copyright 2020 Google LLC
|
|
572
572
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
573
573
|
*/
|
|
574
|
-
const
|
|
574
|
+
const Yn = {}, Bn = (n, t = Yn) => n._$AH = t;
|
|
575
575
|
/**
|
|
576
576
|
* @license
|
|
577
577
|
* Copyright 2021 Google LLC
|
|
578
578
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
579
579
|
*/
|
|
580
|
-
const
|
|
580
|
+
const Vn = Un(class extends Xn {
|
|
581
581
|
constructor() {
|
|
582
582
|
super(...arguments), this.key = C;
|
|
583
583
|
}
|
|
@@ -585,9 +585,9 @@ const Bn = Hn(class extends Un {
|
|
|
585
585
|
return this.key = n, t;
|
|
586
586
|
}
|
|
587
587
|
update(n, [t, e]) {
|
|
588
|
-
return t !== this.key && (
|
|
588
|
+
return t !== this.key && (Bn(n), this.key = t), e;
|
|
589
589
|
}
|
|
590
|
-
}),
|
|
590
|
+
}), zn = (n) => {
|
|
591
591
|
n.hoverInteraction = n.eoxMap.selectInteractions.selectHover, n.clickInteraction = n.eoxMap.selectInteractions.selectClick;
|
|
592
592
|
const t = () => {
|
|
593
593
|
n.requestUpdate();
|
|
@@ -599,11 +599,11 @@ const Bn = Hn(class extends Un {
|
|
|
599
599
|
"change",
|
|
600
600
|
t
|
|
601
601
|
);
|
|
602
|
-
},
|
|
602
|
+
}, Jn = (n, t, e) => {
|
|
603
603
|
if (n.clickId === t) return;
|
|
604
604
|
const i = e ? [] : [t];
|
|
605
605
|
n.hoverInteraction.highlightById(i);
|
|
606
|
-
},
|
|
606
|
+
}, Wn = (n, t) => {
|
|
607
607
|
n.stopPropagation();
|
|
608
608
|
const e = Number(n.target.getAttribute("index")), i = t.drawnFeatures[e];
|
|
609
609
|
t.drawLayer.getSource().removeFeature(i), t.drawnFeatures.splice(e, 1), t.requestUpdate();
|
|
@@ -613,7 +613,7 @@ const Bn = Hn(class extends Un {
|
|
|
613
613
|
}, ti = {
|
|
614
614
|
type: "FeatureCollection",
|
|
615
615
|
features: []
|
|
616
|
-
},
|
|
616
|
+
}, qn = (n, t) => {
|
|
617
617
|
const { clickId: e, drawLayer: i, olMap: r, clickInteraction: s } = t, o = s.getId(n);
|
|
618
618
|
if (e === o) {
|
|
619
619
|
const l = i.getSource().getExtent();
|
|
@@ -623,7 +623,7 @@ const Bn = Hn(class extends Un {
|
|
|
623
623
|
s.highlightById([o]), r.getView().fit(c, Qe);
|
|
624
624
|
}
|
|
625
625
|
t.requestUpdate();
|
|
626
|
-
},
|
|
626
|
+
}, Zn = "ul.list-wrap { padding: 0;}ul.list-wrap li:hover,ul.list-wrap li.selected { background: var(--secondary-bg-color-hover);}ul.list-wrap li { list-style: none; padding: 4px;}ul.list-wrap li { border-bottom: 1.2px solid var(--secondary-color);}ul.list-wrap li:first-child { border-top: 1.2px solid var(--secondary-color);}ul.list-wrap li .list { width: 100%; align-items: center; justify-content: space-between; display: flex; align-items: center; cursor: pointer; font-size: small; gap: 10px;}ul.list-wrap li .list span { display: flex; align-items: center; cursor: pointer; font-size: small; flex-grow: 1;}";
|
|
627
627
|
class Ai extends U {
|
|
628
628
|
constructor() {
|
|
629
629
|
super();
|
|
@@ -651,7 +651,7 @@ class Ai extends U {
|
|
|
651
651
|
* @param {Event & { target: HTMLButtonElement }} evt - Event object containing button target.
|
|
652
652
|
*/
|
|
653
653
|
_handleDelete(e) {
|
|
654
|
-
|
|
654
|
+
Wn(e, this), this.dispatchEvent(new CustomEvent("changed", { bubbles: !0 }));
|
|
655
655
|
}
|
|
656
656
|
/**
|
|
657
657
|
* Handles the selection and deselection of a feature from the list.
|
|
@@ -659,7 +659,7 @@ class Ai extends U {
|
|
|
659
659
|
* @param {import("ol").Feature} feature - The selected feature.
|
|
660
660
|
*/
|
|
661
661
|
_handleFeatureSelectAndDeselect(e) {
|
|
662
|
-
|
|
662
|
+
qn(e, this);
|
|
663
663
|
}
|
|
664
664
|
/**
|
|
665
665
|
*
|
|
@@ -667,13 +667,13 @@ class Ai extends U {
|
|
|
667
667
|
* @param {Boolean} mouseOut - Flag indicating mouse out event.
|
|
668
668
|
*/
|
|
669
669
|
_handleHoverFeature(e, i = !1) {
|
|
670
|
-
|
|
670
|
+
Jn(this, e, i);
|
|
671
671
|
}
|
|
672
672
|
/**
|
|
673
673
|
* Initiates initial settings and event triggers upon the component's first update.
|
|
674
674
|
*/
|
|
675
675
|
firstUpdated() {
|
|
676
|
-
|
|
676
|
+
zn(this);
|
|
677
677
|
}
|
|
678
678
|
/**
|
|
679
679
|
* Overrides createRenderRoot to handle shadow DOM.
|
|
@@ -685,14 +685,14 @@ class Ai extends U {
|
|
|
685
685
|
var e, i;
|
|
686
686
|
return this.hoverId = (e = this.hoverInteraction) == null ? void 0 : e.selectedFids[0], this.clickId = (i = this.clickInteraction) == null ? void 0 : i.selectedFids[0], H`
|
|
687
687
|
<style>
|
|
688
|
-
${!this.unstyled &&
|
|
688
|
+
${!this.unstyled && Zn}
|
|
689
689
|
</style>
|
|
690
690
|
<ul class="list-wrap">
|
|
691
691
|
${this.drawnFeatures.map((r, s) => {
|
|
692
692
|
const o = s + 1, a = Object.values(
|
|
693
693
|
this.eoxMap.selectInteractions
|
|
694
694
|
)[0].getId(r), l = this.hoverId === a, h = this.clickId === a;
|
|
695
|
-
return
|
|
695
|
+
return Vn(
|
|
696
696
|
o,
|
|
697
697
|
H`
|
|
698
698
|
<li
|
|
@@ -735,11 +735,11 @@ R(Ai, "properties", {
|
|
|
735
735
|
unstyled: { type: Boolean }
|
|
736
736
|
});
|
|
737
737
|
customElements.define("eox-drawtools-list", Ai);
|
|
738
|
-
const
|
|
738
|
+
const Kn = (n) => {
|
|
739
739
|
const { multipleFeatures: t, drawnFeatures: e, currentlyDrawing: i } = n, r = !t && (e == null ? void 0 : e.length) > 0 || i, s = !(e != null && e.length) && !i;
|
|
740
740
|
return { drawDisabled: r, discardDisabled: s };
|
|
741
|
-
}, Dn = "button,.button { /* TODO: why does this only work here and not from :root? */ --primary-color: #004170; --primary-color-hover: #004170cc; --error-color: #ff5252; display: inline-flex; position: relative; align-items: center; color: #fff; border-width: 0; outline: none; border-radius: 4px; padding: 16px; height: 36px; cursor: pointer; font-family: inherit; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 1.25px; font-weight: 500; box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12); transition-property: box-shadow, transform, opacity, background; transition-duration: 0.28s; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);}button:hover:not([disabled]):not(.icon),.button:hover:not([disabled]):not(.icon) { box-shadow: 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12); background: var(--primary-color-hover);}button,button:active,.button,.button:active { background: var(--primary-color);}button[disabled],.button[disabled] { opacity: 0.5; cursor: not-allowed;}button.block,.button.block { display: block;}button.outline,.button.outline { background: transparent; box-shadow: none; color: var(--primary-color); outline: 1px solid var(--primary-color);}button.outline:hover,.button.outline:hover { background: transparent;}button.icon,.button.icon { background: transparent; border: none; box-shadow: none; padding: 0; border-radius: 50%; width: 24px; height: 24px; text-indent: -9999px;}button.icon-text,.button.icon-text { text-indent: 26px;}button.icon-text.block,.button.icon-text.block { text-indent: 20px;}button.icon:before,button.icon-text:before,.button.icon:before,.button.icon-text:before { position: absolute; text-indent: 0; line-height: initial;}button.icon-text.block:before,.button.icon-text.block:before { text-indent: -54px;}button.icon:before,.button.icon:before { width: 24px; height: 24px; margin-right: 0;}button.icon-text:before,.button.icon-text:before { width: 18px; height: 18px;}button.small,.button.small { height: 28px; padding: 12.4px; font-size: 0.75rem;}button.smallest.icon,button.smallest.icon::before { height: 16px; width: 16px; padding: 0px;}",
|
|
742
|
-
function
|
|
741
|
+
}, Dn = "button,.button { /* TODO: why does this only work here and not from :root? */ --primary-color: #004170; --primary-color-hover: #004170cc; --error-color: #ff5252; display: inline-flex; position: relative; align-items: center; color: #fff; border-width: 0; outline: none; border-radius: 4px; padding: 16px; height: 36px; cursor: pointer; font-family: inherit; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 1.25px; font-weight: 500; box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12); transition-property: box-shadow, transform, opacity, background; transition-duration: 0.28s; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);}button:hover:not([disabled]):not(.icon),.button:hover:not([disabled]):not(.icon) { box-shadow: 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12); background: var(--primary-color-hover);}button,button:active,.button,.button:active { background: var(--primary-color);}button[disabled],.button[disabled] { opacity: 0.5; cursor: not-allowed;}button.block,.button.block { display: block;}button.outline,.button.outline { background: transparent; box-shadow: none; color: var(--primary-color); outline: 1px solid var(--primary-color);}button.outline:hover,.button.outline:hover { background: transparent;}button.icon,.button.icon { background: transparent; border: none; box-shadow: none; padding: 0; border-radius: 50%; width: 24px; height: 24px; text-indent: -9999px;}button.icon-text,.button.icon-text { text-indent: 26px;}button.icon-text.block,.button.icon-text.block { text-indent: 20px;}button.icon:before,button.icon-text:before,.button.icon:before,.button.icon-text:before { position: absolute; text-indent: 0; line-height: initial;}button.icon-text.block:before,.button.icon-text.block:before { text-indent: -54px;}button.icon:before,.button.icon:before { width: 24px; height: 24px; margin-right: 0;}button.icon-text:before,.button.icon-text:before { width: 18px; height: 18px;}button.small,.button.small { height: 28px; padding: 12.4px; font-size: 0.75rem;}button.smallest.icon,button.smallest.icon::before { height: 16px; width: 16px; padding: 0px;}", Qn = 'textarea { height: 90px; resize: none; border-radius: 4px; box-sizing: border-box !important; width: 100%; padding: 5px 7px; border: 1px solid var(--secondary-color); font-size: smaller; background: var(--background-color);}input,input[type="text"],input[type="url"],input[type="email"],input[type="password"],input[type="text"],input[type="number"],input[type="search"],input[type="tel"],select { box-sizing: border-box; width: 100%; margin-top: 0.5rem; margin-bottom: 0.5rem; padding: 5px 7px; border-radius: 4px; border: 1px solid #0004; background-color: var(--background-color);}';
|
|
742
|
+
function tr(n) {
|
|
743
743
|
navigator.clipboard.writeText(n).then(
|
|
744
744
|
function() {
|
|
745
745
|
},
|
|
@@ -748,7 +748,7 @@ function Qn(n) {
|
|
|
748
748
|
}
|
|
749
749
|
);
|
|
750
750
|
}
|
|
751
|
-
const
|
|
751
|
+
const er = {
|
|
752
752
|
/**
|
|
753
753
|
* Triggered when a property is changed.
|
|
754
754
|
* @event module:ol/Object.ObjectEvent#propertychange
|
|
@@ -763,7 +763,7 @@ const tr = {
|
|
|
763
763
|
*/
|
|
764
764
|
CHANGE: "change"
|
|
765
765
|
};
|
|
766
|
-
class
|
|
766
|
+
class ir {
|
|
767
767
|
constructor() {
|
|
768
768
|
this.disposed = !1;
|
|
769
769
|
}
|
|
@@ -780,7 +780,7 @@ class er {
|
|
|
780
780
|
disposeInternal() {
|
|
781
781
|
}
|
|
782
782
|
}
|
|
783
|
-
function
|
|
783
|
+
function nr(n, t, e) {
|
|
784
784
|
let i, r;
|
|
785
785
|
e = e || Fi;
|
|
786
786
|
let s = 0, o = n.length, a = !1;
|
|
@@ -796,7 +796,7 @@ function A(n, t) {
|
|
|
796
796
|
for (let r = 0; r < i; r++)
|
|
797
797
|
n[n.length] = e[r];
|
|
798
798
|
}
|
|
799
|
-
function
|
|
799
|
+
function rr(n, t) {
|
|
800
800
|
const e = n.length;
|
|
801
801
|
if (e !== t.length)
|
|
802
802
|
return !1;
|
|
@@ -811,7 +811,7 @@ function Gi(n) {
|
|
|
811
811
|
let t, e, i;
|
|
812
812
|
return function() {
|
|
813
813
|
const r = Array.prototype.slice.call(arguments);
|
|
814
|
-
return (!e || this !== i || !
|
|
814
|
+
return (!e || this !== i || !rr(r, e)) && (i = this, e = r, t = n.apply(this, arguments)), t;
|
|
815
815
|
};
|
|
816
816
|
}
|
|
817
817
|
function Ii(n) {
|
|
@@ -847,7 +847,7 @@ class Ri {
|
|
|
847
847
|
this.propagationStopped = !0;
|
|
848
848
|
}
|
|
849
849
|
}
|
|
850
|
-
class
|
|
850
|
+
class sr extends ir {
|
|
851
851
|
/**
|
|
852
852
|
* @param {*} [target] Default event target for dispatched events.
|
|
853
853
|
*/
|
|
@@ -960,7 +960,7 @@ function ii(n, t, e, i) {
|
|
|
960
960
|
function Nt(n) {
|
|
961
961
|
n && n.target && (n.target.removeEventListener(n.type, n.listener), Ii(n));
|
|
962
962
|
}
|
|
963
|
-
class Yt extends
|
|
963
|
+
class Yt extends sr {
|
|
964
964
|
constructor() {
|
|
965
965
|
super(), this.on = /** @type {ObservableOnSignature<import("./events").EventsKey>} */
|
|
966
966
|
this.onInternal, this.once = /** @type {ObservableOnSignature<import("./events").EventsKey>} */
|
|
@@ -1037,7 +1037,7 @@ class Yt extends rr {
|
|
|
1037
1037
|
e.ol_key
|
|
1038
1038
|
);
|
|
1039
1039
|
if (i)
|
|
1040
|
-
|
|
1040
|
+
or(i);
|
|
1041
1041
|
else if (Array.isArray(t))
|
|
1042
1042
|
for (let r = 0, s = t.length; r < s; ++r)
|
|
1043
1043
|
this.removeEventListener(t[r], e);
|
|
@@ -1048,7 +1048,7 @@ class Yt extends rr {
|
|
|
1048
1048
|
Yt.prototype.on;
|
|
1049
1049
|
Yt.prototype.once;
|
|
1050
1050
|
Yt.prototype.un;
|
|
1051
|
-
function
|
|
1051
|
+
function or(n) {
|
|
1052
1052
|
if (Array.isArray(n))
|
|
1053
1053
|
for (let t = 0, e = n.length; t < e; ++t)
|
|
1054
1054
|
Nt(n[t]);
|
|
@@ -1061,9 +1061,9 @@ function sr(n) {
|
|
|
1061
1061
|
function y() {
|
|
1062
1062
|
throw new Error("Unimplemented abstract method.");
|
|
1063
1063
|
}
|
|
1064
|
-
let
|
|
1065
|
-
function
|
|
1066
|
-
return n.ol_uid || (n.ol_uid = String(++
|
|
1064
|
+
let ar = 0;
|
|
1065
|
+
function lr(n) {
|
|
1066
|
+
return n.ol_uid || (n.ol_uid = String(++ar));
|
|
1067
1067
|
}
|
|
1068
1068
|
class ni extends Ri {
|
|
1069
1069
|
/**
|
|
@@ -1080,7 +1080,7 @@ class Ti extends Yt {
|
|
|
1080
1080
|
* @param {Object<string, *>} [values] An object with key-value pairs.
|
|
1081
1081
|
*/
|
|
1082
1082
|
constructor(t) {
|
|
1083
|
-
super(), this.on, this.once, this.un,
|
|
1083
|
+
super(), this.on, this.once, this.un, lr(this), this.values_ = null, t !== void 0 && this.setProperties(t);
|
|
1084
1084
|
}
|
|
1085
1085
|
/**
|
|
1086
1086
|
* Gets a value.
|
|
@@ -1127,7 +1127,7 @@ class Ti extends Yt {
|
|
|
1127
1127
|
*/
|
|
1128
1128
|
notify(t, e) {
|
|
1129
1129
|
let i;
|
|
1130
|
-
i = `change:${t}`, this.hasListener(i) && this.dispatchEvent(new ni(i, t, e)), i =
|
|
1130
|
+
i = `change:${t}`, this.hasListener(i) && this.dispatchEvent(new ni(i, t, e)), i = er.PROPERTYCHANGE, this.hasListener(i) && this.dispatchEvent(new ni(i, t, e));
|
|
1131
1131
|
}
|
|
1132
1132
|
/**
|
|
1133
1133
|
* @param {string} key Key name.
|
|
@@ -1191,7 +1191,7 @@ class Ti extends Yt {
|
|
|
1191
1191
|
}
|
|
1192
1192
|
}
|
|
1193
1193
|
}
|
|
1194
|
-
function
|
|
1194
|
+
function hr(n, t) {
|
|
1195
1195
|
if (!n)
|
|
1196
1196
|
throw new Error(t);
|
|
1197
1197
|
}
|
|
@@ -1327,7 +1327,7 @@ class lt extends Ti {
|
|
|
1327
1327
|
* @fires module:ol/events/Event~BaseEvent#event:change
|
|
1328
1328
|
*/
|
|
1329
1329
|
setStyle(t) {
|
|
1330
|
-
this.style_ = t, this.styleFunction_ = t ?
|
|
1330
|
+
this.style_ = t, this.styleFunction_ = t ? cr(t) : void 0, this.changed();
|
|
1331
1331
|
}
|
|
1332
1332
|
/**
|
|
1333
1333
|
* Set the feature id. The feature id is considered stable and may be used when
|
|
@@ -1352,11 +1352,11 @@ class lt extends Ti {
|
|
|
1352
1352
|
this.removeChangeListener(this.geometryName_, this.handleGeometryChanged_), this.geometryName_ = t, this.addChangeListener(this.geometryName_, this.handleGeometryChanged_), this.handleGeometryChanged_();
|
|
1353
1353
|
}
|
|
1354
1354
|
}
|
|
1355
|
-
function
|
|
1355
|
+
function cr(n) {
|
|
1356
1356
|
if (typeof n == "function")
|
|
1357
1357
|
return n;
|
|
1358
1358
|
let t;
|
|
1359
|
-
return Array.isArray(n) ? t = n : (
|
|
1359
|
+
return Array.isArray(n) ? t = n : (hr(
|
|
1360
1360
|
typeof /** @type {?} */
|
|
1361
1361
|
n.getZIndex == "function",
|
|
1362
1362
|
"Expected an `ol/style/Style` or an array of `ol/style/Style.js`"
|
|
@@ -1404,25 +1404,25 @@ function Ce(n, t, e, i, r) {
|
|
|
1404
1404
|
const s = ve(r);
|
|
1405
1405
|
return ji(s, n, t, e, i);
|
|
1406
1406
|
}
|
|
1407
|
-
function
|
|
1407
|
+
function ur(n, t) {
|
|
1408
1408
|
return t[0] < n[0] && (n[0] = t[0]), t[2] > n[2] && (n[2] = t[2]), t[1] < n[1] && (n[1] = t[1]), t[3] > n[3] && (n[3] = t[3]), n;
|
|
1409
1409
|
}
|
|
1410
1410
|
function ji(n, t, e, i, r) {
|
|
1411
1411
|
for (; e < i; e += r)
|
|
1412
|
-
|
|
1412
|
+
dr(n, t[e], t[e + 1]);
|
|
1413
1413
|
return n;
|
|
1414
1414
|
}
|
|
1415
|
-
function
|
|
1415
|
+
function dr(n, t, e) {
|
|
1416
1416
|
n[0] = Math.min(n[0], t), n[1] = Math.min(n[1], e), n[2] = Math.max(n[2], t), n[3] = Math.max(n[3], e);
|
|
1417
1417
|
}
|
|
1418
|
-
function
|
|
1418
|
+
function gr(n, t) {
|
|
1419
1419
|
let e;
|
|
1420
|
-
return e = t(
|
|
1420
|
+
return e = t(fr(n)), e || (e = t(pr(n)), e) || (e = t(mr(n)), e) || (e = t(yr(n)), e) ? e : !1;
|
|
1421
1421
|
}
|
|
1422
|
-
function
|
|
1422
|
+
function fr(n) {
|
|
1423
1423
|
return [n[0], n[1]];
|
|
1424
1424
|
}
|
|
1425
|
-
function
|
|
1425
|
+
function pr(n) {
|
|
1426
1426
|
return [n[2], n[1]];
|
|
1427
1427
|
}
|
|
1428
1428
|
function Bt(n) {
|
|
@@ -1431,19 +1431,19 @@ function Bt(n) {
|
|
|
1431
1431
|
function Ot(n) {
|
|
1432
1432
|
return n[3] - n[1];
|
|
1433
1433
|
}
|
|
1434
|
-
function
|
|
1434
|
+
function yr(n) {
|
|
1435
1435
|
return [n[0], n[3]];
|
|
1436
1436
|
}
|
|
1437
|
-
function
|
|
1437
|
+
function mr(n) {
|
|
1438
1438
|
return [n[2], n[3]];
|
|
1439
1439
|
}
|
|
1440
|
-
function
|
|
1440
|
+
function _r(n, t) {
|
|
1441
1441
|
return n[0] <= t[2] && n[2] >= t[0] && n[1] <= t[3] && n[3] >= t[1];
|
|
1442
1442
|
}
|
|
1443
|
-
function
|
|
1443
|
+
function vr(n, t) {
|
|
1444
1444
|
return t ? (t[0] = n[0], t[1] = n[1], t[2] = n[2], t[3] = n[3], t) : n;
|
|
1445
1445
|
}
|
|
1446
|
-
function
|
|
1446
|
+
function Cr(n, t, e) {
|
|
1447
1447
|
let i = !1;
|
|
1448
1448
|
const r = ri(n, t), s = ri(n, e);
|
|
1449
1449
|
if (r === w.INTERSECTING || s === w.INTERSECTING)
|
|
@@ -1455,7 +1455,7 @@ function vr(n, t, e) {
|
|
|
1455
1455
|
}
|
|
1456
1456
|
return i;
|
|
1457
1457
|
}
|
|
1458
|
-
function
|
|
1458
|
+
function wr(n, t, e, i, r, s) {
|
|
1459
1459
|
const o = r - e, a = s - i;
|
|
1460
1460
|
if (o !== 0 || a !== 0) {
|
|
1461
1461
|
const l = ((n - e) * o + (t - i) * a) / (o * o + a * a);
|
|
@@ -1482,7 +1482,7 @@ function oe(n, t, e) {
|
|
|
1482
1482
|
const i = e - t;
|
|
1483
1483
|
return ((n - t) % i + i) % i + t;
|
|
1484
1484
|
}
|
|
1485
|
-
const
|
|
1485
|
+
const br = {
|
|
1486
1486
|
// use the radius of the Normal sphere
|
|
1487
1487
|
radians: 6370997 / (2 * Math.PI),
|
|
1488
1488
|
degrees: 2 * Math.PI * 6370997 / 360,
|
|
@@ -1536,7 +1536,7 @@ class be {
|
|
|
1536
1536
|
* @api
|
|
1537
1537
|
*/
|
|
1538
1538
|
getMetersPerUnit() {
|
|
1539
|
-
return this.metersPerUnit_ ||
|
|
1539
|
+
return this.metersPerUnit_ || br[this.units_];
|
|
1540
1540
|
}
|
|
1541
1541
|
/**
|
|
1542
1542
|
* Get the world extent for this projection.
|
|
@@ -1623,8 +1623,8 @@ class be {
|
|
|
1623
1623
|
return this.getPointResolutionFunc_;
|
|
1624
1624
|
}
|
|
1625
1625
|
}
|
|
1626
|
-
const St = 6378137, et = Math.PI * St,
|
|
1627
|
-
class
|
|
1626
|
+
const St = 6378137, et = Math.PI * St, Er = [-et, -et, et, et], xr = [-180, -85, 180, 85], Ft = St * Math.log(Math.tan(Math.PI / 2));
|
|
1627
|
+
class D extends be {
|
|
1628
1628
|
/**
|
|
1629
1629
|
* @param {string} code Code.
|
|
1630
1630
|
*/
|
|
@@ -1632,9 +1632,9 @@ class K extends be {
|
|
|
1632
1632
|
super({
|
|
1633
1633
|
code: t,
|
|
1634
1634
|
units: "m",
|
|
1635
|
-
extent:
|
|
1635
|
+
extent: Er,
|
|
1636
1636
|
global: !0,
|
|
1637
|
-
worldExtent:
|
|
1637
|
+
worldExtent: xr,
|
|
1638
1638
|
getPointResolution: function(e, i) {
|
|
1639
1639
|
return e / Math.cosh(i[1] / St);
|
|
1640
1640
|
}
|
|
@@ -1642,14 +1642,14 @@ class K extends be {
|
|
|
1642
1642
|
}
|
|
1643
1643
|
}
|
|
1644
1644
|
const oi = [
|
|
1645
|
-
new
|
|
1646
|
-
new
|
|
1647
|
-
new
|
|
1648
|
-
new
|
|
1649
|
-
new
|
|
1650
|
-
new
|
|
1645
|
+
new D("EPSG:3857"),
|
|
1646
|
+
new D("EPSG:102100"),
|
|
1647
|
+
new D("EPSG:102113"),
|
|
1648
|
+
new D("EPSG:900913"),
|
|
1649
|
+
new D("http://www.opengis.net/def/crs/EPSG/0/3857"),
|
|
1650
|
+
new D("http://www.opengis.net/gml/srs/epsg.xml#3857")
|
|
1651
1651
|
];
|
|
1652
|
-
function
|
|
1652
|
+
function Pr(n, t, e, i) {
|
|
1653
1653
|
const r = n.length;
|
|
1654
1654
|
e = e > 1 ? e : 2, i = i ?? e, t === void 0 && (e > 2 ? t = n.slice() : t = new Array(r));
|
|
1655
1655
|
for (let s = 0; s < r; s += i) {
|
|
@@ -1659,14 +1659,14 @@ function xr(n, t, e, i) {
|
|
|
1659
1659
|
}
|
|
1660
1660
|
return t;
|
|
1661
1661
|
}
|
|
1662
|
-
function
|
|
1662
|
+
function Mr(n, t, e, i) {
|
|
1663
1663
|
const r = n.length;
|
|
1664
1664
|
e = e > 1 ? e : 2, i = i ?? e, t === void 0 && (e > 2 ? t = n.slice() : t = new Array(r));
|
|
1665
1665
|
for (let s = 0; s < r; s += i)
|
|
1666
1666
|
t[s] = 180 * n[s] / et, t[s + 1] = 360 * Math.atan(Math.exp(n[s + 1] / St)) / Math.PI - 90;
|
|
1667
1667
|
return t;
|
|
1668
1668
|
}
|
|
1669
|
-
const
|
|
1669
|
+
const Sr = 6378137, ai = [-180, -90, 180, 90], $r = Math.PI * Sr / 180;
|
|
1670
1670
|
class N extends be {
|
|
1671
1671
|
/**
|
|
1672
1672
|
* @param {string} code Code.
|
|
@@ -1679,7 +1679,7 @@ class N extends be {
|
|
|
1679
1679
|
extent: ai,
|
|
1680
1680
|
axisOrientation: e,
|
|
1681
1681
|
global: !0,
|
|
1682
|
-
metersPerUnit:
|
|
1682
|
+
metersPerUnit: $r,
|
|
1683
1683
|
worldExtent: ai
|
|
1684
1684
|
});
|
|
1685
1685
|
}
|
|
@@ -1694,10 +1694,10 @@ const li = [
|
|
|
1694
1694
|
new N("http://www.opengis.net/def/crs/EPSG/0/4326", "neu")
|
|
1695
1695
|
];
|
|
1696
1696
|
let ae = {};
|
|
1697
|
-
function
|
|
1697
|
+
function Ar(n) {
|
|
1698
1698
|
return ae[n] || ae[n.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/, "EPSG:$3")] || null;
|
|
1699
1699
|
}
|
|
1700
|
-
function
|
|
1700
|
+
function Fr(n, t) {
|
|
1701
1701
|
ae[n] = t;
|
|
1702
1702
|
}
|
|
1703
1703
|
let it = {};
|
|
@@ -1708,34 +1708,34 @@ function _t(n, t, e) {
|
|
|
1708
1708
|
function ie(n, t) {
|
|
1709
1709
|
return n in it && t in it[n] ? it[n][t] : null;
|
|
1710
1710
|
}
|
|
1711
|
-
const kt = 0.9996, P = 669438e-8, Vt = P * P, zt = Vt * P, k = P / (1 - P), hi = Math.sqrt(1 - P), ht = (1 - hi) / (1 + hi), Hi = ht * ht, Ee = Hi * ht, xe = Ee * ht, Ui = xe * ht, Xi = 1 - P / 4 - 3 * Vt / 64 - 5 * zt / 256,
|
|
1712
|
-
function
|
|
1713
|
-
const i = n - 5e5, o = (e.north ? t : t - 1e7) / kt / (jt * Xi), a = o +
|
|
1714
|
-
let
|
|
1715
|
-
return
|
|
1716
|
-
|
|
1711
|
+
const kt = 0.9996, P = 669438e-8, Vt = P * P, zt = Vt * P, k = P / (1 - P), hi = Math.sqrt(1 - P), ht = (1 - hi) / (1 + hi), Hi = ht * ht, Ee = Hi * ht, xe = Ee * ht, Ui = xe * ht, Xi = 1 - P / 4 - 3 * Vt / 64 - 5 * zt / 256, Gr = 3 * P / 8 + 3 * Vt / 32 + 45 * zt / 1024, Ir = 15 * Vt / 256 + 45 * zt / 1024, Lr = 35 * zt / 3072, Rr = 3 / 2 * ht - 27 / 32 * Ee + 269 / 512 * Ui, Tr = 21 / 16 * Hi - 55 / 32 * xe, Nr = 151 / 96 * Ee - 417 / 128 * Ui, Or = 1097 / 512 * xe, jt = 6378137;
|
|
1712
|
+
function kr(n, t, e) {
|
|
1713
|
+
const i = n - 5e5, o = (e.north ? t : t - 1e7) / kt / (jt * Xi), a = o + Rr * Math.sin(2 * o) + Tr * Math.sin(4 * o) + Nr * Math.sin(6 * o) + Or * Math.sin(8 * o), l = Math.sin(a), h = l * l, c = Math.cos(a), u = l / c, d = u * u, g = d * d, f = 1 - P * h, p = Math.sqrt(1 - P * h), _ = jt / p, b = (1 - P) / f, v = k * c ** 2, S = v * v, E = i / (_ * kt), L = E * E, ct = L * E, je = ct * E, He = je * E, mn = He * E, _n = a - u / b * (L / 2 - je / 24 * (5 + 3 * d + 10 * v - 4 * S - 9 * k)) + mn / 720 * (61 + 90 * d + 298 * v + 45 * g - 252 * k - 3 * S);
|
|
1714
|
+
let Kt = (E - ct / 6 * (1 + 2 * d + v) + He / 120 * (5 - 2 * v + 28 * d - 3 * S + 8 * k + 24 * g)) / c;
|
|
1715
|
+
return Kt = oe(
|
|
1716
|
+
Kt + Rt(Yi(e.number)),
|
|
1717
1717
|
-Math.PI,
|
|
1718
1718
|
Math.PI
|
|
1719
|
-
), [si(
|
|
1719
|
+
), [si(Kt), si(_n)];
|
|
1720
1720
|
}
|
|
1721
|
-
const ci = -80, ui = 84,
|
|
1722
|
-
function
|
|
1723
|
-
n = oe(n,
|
|
1724
|
-
const i = Rt(t), r = Math.sin(i), s = Math.cos(i), o = r / s, a = o * o, l = a * a, h = Rt(n), c = Yi(e.number), u = Rt(c), d = jt / Math.sqrt(1 - P * r ** 2), g = k * s ** 2, f = s * oe(h - u, -Math.PI, Math.PI), p = f * f, _ = p * f, b = _ * f, v = b * f, S = v * f, E = jt * (Xi * i -
|
|
1721
|
+
const ci = -80, ui = 84, jr = -180, Hr = 180;
|
|
1722
|
+
function Ur(n, t, e) {
|
|
1723
|
+
n = oe(n, jr, Hr), t < ci ? t = ci : t > ui && (t = ui);
|
|
1724
|
+
const i = Rt(t), r = Math.sin(i), s = Math.cos(i), o = r / s, a = o * o, l = a * a, h = Rt(n), c = Yi(e.number), u = Rt(c), d = jt / Math.sqrt(1 - P * r ** 2), g = k * s ** 2, f = s * oe(h - u, -Math.PI, Math.PI), p = f * f, _ = p * f, b = _ * f, v = b * f, S = v * f, E = jt * (Xi * i - Gr * Math.sin(2 * i) + Ir * Math.sin(4 * i) - Lr * Math.sin(6 * i)), L = kt * d * (f + _ / 6 * (1 - a + g) + v / 120 * (5 - 18 * a + l + 72 * g - 58 * k)) + 5e5;
|
|
1725
1725
|
let ct = kt * (E + d * o * (p / 2 + b / 24 * (5 - a + 9 * g + 4 * g ** 2) + S / 720 * (61 - 58 * a + l + 600 * g - 330 * k)));
|
|
1726
1726
|
return e.north || (ct += 1e7), [L, ct];
|
|
1727
1727
|
}
|
|
1728
1728
|
function Yi(n) {
|
|
1729
1729
|
return (n - 1) * 6 - 180 + 3;
|
|
1730
1730
|
}
|
|
1731
|
-
const
|
|
1731
|
+
const Xr = [
|
|
1732
1732
|
/^EPSG:(\d+)$/,
|
|
1733
1733
|
/^urn:ogc:def:crs:EPSG::(\d+)$/,
|
|
1734
1734
|
/^http:\/\/www\.opengis\.net\/def\/crs\/EPSG\/0\/(\d+)$/
|
|
1735
1735
|
];
|
|
1736
1736
|
function Bi(n) {
|
|
1737
1737
|
let t = 0;
|
|
1738
|
-
for (const r of
|
|
1738
|
+
for (const r of Xr) {
|
|
1739
1739
|
const s = n.match(r);
|
|
1740
1740
|
if (s) {
|
|
1741
1741
|
t = parseInt(s[1]);
|
|
@@ -1758,17 +1758,17 @@ function di(n, t) {
|
|
|
1758
1758
|
return i;
|
|
1759
1759
|
};
|
|
1760
1760
|
}
|
|
1761
|
-
function
|
|
1761
|
+
function Yr(n) {
|
|
1762
1762
|
return Bi(n) ? new be({ code: n, units: "m" }) : null;
|
|
1763
1763
|
}
|
|
1764
|
-
function
|
|
1764
|
+
function Br(n) {
|
|
1765
1765
|
const t = Bi(n.getCode());
|
|
1766
1766
|
return t ? {
|
|
1767
|
-
forward: di(
|
|
1768
|
-
inverse: di(
|
|
1767
|
+
forward: di(Ur, t),
|
|
1768
|
+
inverse: di(kr, t)
|
|
1769
1769
|
} : null;
|
|
1770
1770
|
}
|
|
1771
|
-
const
|
|
1771
|
+
const Vr = [Br], zr = [Yr];
|
|
1772
1772
|
function Pe(n, t) {
|
|
1773
1773
|
if (t !== void 0) {
|
|
1774
1774
|
for (let e = 0, i = n.length; e < i; ++e)
|
|
@@ -1779,18 +1779,18 @@ function Pe(n, t) {
|
|
|
1779
1779
|
return t;
|
|
1780
1780
|
}
|
|
1781
1781
|
function le(n) {
|
|
1782
|
-
|
|
1782
|
+
Fr(n.getCode(), n), _t(n, n, Pe);
|
|
1783
1783
|
}
|
|
1784
|
-
function
|
|
1784
|
+
function Jr(n) {
|
|
1785
1785
|
n.forEach(le);
|
|
1786
1786
|
}
|
|
1787
1787
|
function x(n) {
|
|
1788
1788
|
if (typeof n != "string")
|
|
1789
1789
|
return n;
|
|
1790
|
-
const t =
|
|
1790
|
+
const t = Ar(n);
|
|
1791
1791
|
if (t)
|
|
1792
1792
|
return t;
|
|
1793
|
-
for (const e of
|
|
1793
|
+
for (const e of zr) {
|
|
1794
1794
|
const i = e(n);
|
|
1795
1795
|
if (i)
|
|
1796
1796
|
return i;
|
|
@@ -1798,20 +1798,20 @@ function x(n) {
|
|
|
1798
1798
|
return null;
|
|
1799
1799
|
}
|
|
1800
1800
|
function gi(n) {
|
|
1801
|
-
|
|
1801
|
+
Jr(n), n.forEach(function(t) {
|
|
1802
1802
|
n.forEach(function(e) {
|
|
1803
1803
|
t !== e && _t(t, e, Pe);
|
|
1804
1804
|
});
|
|
1805
1805
|
});
|
|
1806
1806
|
}
|
|
1807
|
-
function
|
|
1807
|
+
function Wr(n, t, e, i) {
|
|
1808
1808
|
n.forEach(function(r) {
|
|
1809
1809
|
t.forEach(function(s) {
|
|
1810
1810
|
_t(r, s, e), _t(s, r, i);
|
|
1811
1811
|
});
|
|
1812
1812
|
});
|
|
1813
1813
|
}
|
|
1814
|
-
function
|
|
1814
|
+
function qr(n, t) {
|
|
1815
1815
|
if (n === t)
|
|
1816
1816
|
return !0;
|
|
1817
1817
|
const e = n.getUnits() === t.getUnits();
|
|
@@ -1823,7 +1823,7 @@ function Vi(n, t) {
|
|
|
1823
1823
|
if (r)
|
|
1824
1824
|
return r;
|
|
1825
1825
|
let s = null, o = null;
|
|
1826
|
-
for (const l of
|
|
1826
|
+
for (const l of Vr)
|
|
1827
1827
|
s || (s = l(n)), o || (o = l(t));
|
|
1828
1828
|
if (!s && !o)
|
|
1829
1829
|
return null;
|
|
@@ -1859,15 +1859,15 @@ function he(n, t) {
|
|
|
1859
1859
|
const e = x(n), i = x(t);
|
|
1860
1860
|
return Vi(e, i);
|
|
1861
1861
|
}
|
|
1862
|
-
function
|
|
1863
|
-
gi(oi), gi(li),
|
|
1862
|
+
function Zr() {
|
|
1863
|
+
gi(oi), gi(li), Wr(
|
|
1864
1864
|
li,
|
|
1865
1865
|
oi,
|
|
1866
|
-
|
|
1867
|
-
|
|
1866
|
+
Pr,
|
|
1867
|
+
Mr
|
|
1868
1868
|
);
|
|
1869
1869
|
}
|
|
1870
|
-
|
|
1870
|
+
Zr();
|
|
1871
1871
|
new Array(6);
|
|
1872
1872
|
function zi() {
|
|
1873
1873
|
return [1, 0, 0, 1, 0, 0];
|
|
@@ -1887,7 +1887,7 @@ function Wi(n, t, e, i, r, s, o) {
|
|
|
1887
1887
|
}
|
|
1888
1888
|
return s && s.length != a && (s.length = a), s;
|
|
1889
1889
|
}
|
|
1890
|
-
function
|
|
1890
|
+
function Kr(n, t, e, i, r, s, o) {
|
|
1891
1891
|
o = o || [];
|
|
1892
1892
|
const a = Math.cos(r), l = Math.sin(r), h = s[0], c = s[1];
|
|
1893
1893
|
let u = 0;
|
|
@@ -1911,7 +1911,7 @@ function Dr(n, t, e, i, r, s, o, a) {
|
|
|
1911
1911
|
}
|
|
1912
1912
|
return a && a.length != c && (a.length = c), a;
|
|
1913
1913
|
}
|
|
1914
|
-
function
|
|
1914
|
+
function Qr(n, t, e, i, r, s, o) {
|
|
1915
1915
|
o = o || [];
|
|
1916
1916
|
let a = 0;
|
|
1917
1917
|
for (let l = t; l < e; l += i) {
|
|
@@ -1921,7 +1921,7 @@ function Kr(n, t, e, i, r, s, o) {
|
|
|
1921
1921
|
}
|
|
1922
1922
|
return o && o.length != a && (o.length = a), o;
|
|
1923
1923
|
}
|
|
1924
|
-
const fi = zi(),
|
|
1924
|
+
const fi = zi(), ts = [NaN, NaN];
|
|
1925
1925
|
class qi extends Ti {
|
|
1926
1926
|
constructor() {
|
|
1927
1927
|
super(), this.extent_ = _e(), this.extentRevision_ = -1, this.simplifiedGeometryMaxMinSquaredTolerance = 0, this.simplifiedGeometryRevision = 0, this.simplifyTransformedInternal = Gi(
|
|
@@ -1972,7 +1972,7 @@ class qi extends Ti {
|
|
|
1972
1972
|
* @return {boolean} Contains (x, y).
|
|
1973
1973
|
*/
|
|
1974
1974
|
containsXY(t, e) {
|
|
1975
|
-
return this.closestPointXY(t, e,
|
|
1975
|
+
return this.closestPointXY(t, e, ts, Number.MIN_VALUE) === 0;
|
|
1976
1976
|
}
|
|
1977
1977
|
/**
|
|
1978
1978
|
* Return the closest point of the geometry to the passed point as
|
|
@@ -2015,7 +2015,7 @@ class qi extends Ti {
|
|
|
2015
2015
|
const e = this.computeExtent(this.extent_);
|
|
2016
2016
|
(isNaN(e[0]) || isNaN(e[1])) && ve(e), this.extentRevision_ = this.getRevision();
|
|
2017
2017
|
}
|
|
2018
|
-
return
|
|
2018
|
+
return vr(this.extent_, t);
|
|
2019
2019
|
}
|
|
2020
2020
|
/**
|
|
2021
2021
|
* Rotate the geometry around a given coordinate. This modifies the geometry
|
|
@@ -2263,7 +2263,7 @@ class Z extends qi {
|
|
|
2263
2263
|
e = /** @type {Array<unknown>} */
|
|
2264
2264
|
e[0];
|
|
2265
2265
|
}
|
|
2266
|
-
r = e.length, t =
|
|
2266
|
+
r = e.length, t = K(r);
|
|
2267
2267
|
}
|
|
2268
2268
|
this.layout = t, this.stride = r;
|
|
2269
2269
|
}
|
|
@@ -2297,7 +2297,7 @@ class Z extends qi {
|
|
|
2297
2297
|
const i = this.getFlatCoordinates();
|
|
2298
2298
|
if (i) {
|
|
2299
2299
|
const r = this.getStride();
|
|
2300
|
-
|
|
2300
|
+
Kr(
|
|
2301
2301
|
i,
|
|
2302
2302
|
0,
|
|
2303
2303
|
i.length,
|
|
@@ -2347,7 +2347,7 @@ class Z extends qi {
|
|
|
2347
2347
|
const i = this.getFlatCoordinates();
|
|
2348
2348
|
if (i) {
|
|
2349
2349
|
const r = this.getStride();
|
|
2350
|
-
|
|
2350
|
+
Qr(
|
|
2351
2351
|
i,
|
|
2352
2352
|
0,
|
|
2353
2353
|
i.length,
|
|
@@ -2359,7 +2359,7 @@ class Z extends qi {
|
|
|
2359
2359
|
}
|
|
2360
2360
|
}
|
|
2361
2361
|
}
|
|
2362
|
-
function
|
|
2362
|
+
function K(n) {
|
|
2363
2363
|
let t;
|
|
2364
2364
|
return n == 2 ? t = "XY" : n == 3 ? t = "XYZ" : n == 4 && (t = "XYZM"), /** @type {import("./Geometry.js").GeometryLayout} */
|
|
2365
2365
|
t;
|
|
@@ -2369,7 +2369,7 @@ function pi(n) {
|
|
|
2369
2369
|
return n == "XY" ? t = 2 : n == "XYZ" || n == "XYM" ? t = 3 : n == "XYZM" && (t = 4), /** @type {number} */
|
|
2370
2370
|
t;
|
|
2371
2371
|
}
|
|
2372
|
-
function
|
|
2372
|
+
function es(n, t, e, i) {
|
|
2373
2373
|
for (let r = 0, s = e.length; r < s; ++r)
|
|
2374
2374
|
n[t++] = e[r];
|
|
2375
2375
|
return t;
|
|
@@ -2411,7 +2411,7 @@ function Zi(n, t, e, i, r) {
|
|
|
2411
2411
|
}
|
|
2412
2412
|
return r.length = s, r;
|
|
2413
2413
|
}
|
|
2414
|
-
function
|
|
2414
|
+
function Ki(n, t, e, i) {
|
|
2415
2415
|
const r = [];
|
|
2416
2416
|
let s = _e();
|
|
2417
2417
|
for (let o = 0, a = e.length; o < a; ++o) {
|
|
@@ -2425,8 +2425,8 @@ function Di(n, t, e, i) {
|
|
|
2425
2425
|
}
|
|
2426
2426
|
return r;
|
|
2427
2427
|
}
|
|
2428
|
-
function
|
|
2429
|
-
return !
|
|
2428
|
+
function is(n, t, e, i, r) {
|
|
2429
|
+
return !gr(
|
|
2430
2430
|
r,
|
|
2431
2431
|
/**
|
|
2432
2432
|
* @param {import("../../coordinate.js").Coordinate} coordinate Coordinate.
|
|
@@ -2460,7 +2460,7 @@ function Me(n, t, e, i, r, s) {
|
|
|
2460
2460
|
return !1;
|
|
2461
2461
|
return !0;
|
|
2462
2462
|
}
|
|
2463
|
-
function
|
|
2463
|
+
function ns(n, t, e, i, r, s) {
|
|
2464
2464
|
if (e.length === 0)
|
|
2465
2465
|
return !1;
|
|
2466
2466
|
for (let o = 0, a = e.length; o < a; ++o) {
|
|
@@ -2487,7 +2487,7 @@ function Se(n, t, e, i, r, s, o) {
|
|
|
2487
2487
|
}
|
|
2488
2488
|
return isNaN(_) && (_ = r[s]), o ? (o.push(_, f, b), o) : [_, f, b];
|
|
2489
2489
|
}
|
|
2490
|
-
function
|
|
2490
|
+
function Di(n, t, e, i, r) {
|
|
2491
2491
|
let s = [];
|
|
2492
2492
|
for (let o = 0, a = e.length; o < a; ++o) {
|
|
2493
2493
|
const l = e[o];
|
|
@@ -2517,7 +2517,7 @@ function Ht(n, t, e, i, r, s, o) {
|
|
|
2517
2517
|
const b = n[_], v = n[_ + 1];
|
|
2518
2518
|
d += Math.sqrt((b - c) * (b - c) + (v - u) * (v - u)), g.push(d), c = b, u = v;
|
|
2519
2519
|
}
|
|
2520
|
-
const f = r * d, p =
|
|
2520
|
+
const f = r * d, p = nr(g, f);
|
|
2521
2521
|
p < 0 ? (l = (f - g[-p - 2]) / (g[-p - 1] - g[-p - 2]), a = t + (-p - 2) * i) : a = t + p * i;
|
|
2522
2522
|
}
|
|
2523
2523
|
o = o > 1 ? o : 2, s = s || new Array(o);
|
|
@@ -2555,7 +2555,7 @@ function ce(n, t, e, i, r, s) {
|
|
|
2555
2555
|
);
|
|
2556
2556
|
return o.push(r), o;
|
|
2557
2557
|
}
|
|
2558
|
-
function
|
|
2558
|
+
function rs(n, t, e, i, r, s, o) {
|
|
2559
2559
|
if (o)
|
|
2560
2560
|
return ce(
|
|
2561
2561
|
n,
|
|
@@ -2589,7 +2589,7 @@ function ns(n, t, e, i, r, s, o) {
|
|
|
2589
2589
|
}
|
|
2590
2590
|
return null;
|
|
2591
2591
|
}
|
|
2592
|
-
function
|
|
2592
|
+
function ss(n, t, e, i) {
|
|
2593
2593
|
for (; t < e - i; ) {
|
|
2594
2594
|
for (let r = 0; r < i; ++r) {
|
|
2595
2595
|
const s = n[t + r];
|
|
@@ -2642,7 +2642,7 @@ function Ut(n, t, e, i, r) {
|
|
|
2642
2642
|
a,
|
|
2643
2643
|
i
|
|
2644
2644
|
);
|
|
2645
|
-
(s === 0 ? r && l || !r && !l : r && !l || !r && l) &&
|
|
2645
|
+
(s === 0 ? r && l || !r && !l : r && !l || !r && l) && ss(n, t, a, i), t = a;
|
|
2646
2646
|
}
|
|
2647
2647
|
return t;
|
|
2648
2648
|
}
|
|
@@ -2657,7 +2657,7 @@ function ue(n, t, e, i, r) {
|
|
|
2657
2657
|
);
|
|
2658
2658
|
return t;
|
|
2659
2659
|
}
|
|
2660
|
-
function
|
|
2660
|
+
function os(n, t) {
|
|
2661
2661
|
const e = [];
|
|
2662
2662
|
let i = 0, r = 0, s;
|
|
2663
2663
|
for (let o = 0, a = t.length; o < a; ++o) {
|
|
@@ -2689,7 +2689,7 @@ function Wt(n, t, e, i, r, s, o) {
|
|
|
2689
2689
|
let g = 0;
|
|
2690
2690
|
const f = n[d], p = n[d + 1], _ = n[u], b = n[u + 1];
|
|
2691
2691
|
for (let v = d + i; v < u; v += i) {
|
|
2692
|
-
const S = n[v], E = n[v + 1], L =
|
|
2692
|
+
const S = n[v], E = n[v + 1], L = wr(S, E, f, p, _, b);
|
|
2693
2693
|
L > g && (c = v, g = L);
|
|
2694
2694
|
}
|
|
2695
2695
|
g > r && (l[(c - t) / i] = 1, d + i < c && h.push(d, c), c + i < u && h.push(c, u));
|
|
@@ -2716,7 +2716,7 @@ function tn(n, t, e, i, r, s, o, a) {
|
|
|
2716
2716
|
function Q(n, t) {
|
|
2717
2717
|
return t * Math.round(n / t);
|
|
2718
2718
|
}
|
|
2719
|
-
function
|
|
2719
|
+
function as(n, t, e, i, r, s, o) {
|
|
2720
2720
|
if (t == e)
|
|
2721
2721
|
return o;
|
|
2722
2722
|
let a = Q(n[t], r), l = Q(n[t + 1], r);
|
|
@@ -2742,7 +2742,7 @@ function os(n, t, e, i, r, s, o) {
|
|
|
2742
2742
|
function Fe(n, t, e, i, r, s, o, a) {
|
|
2743
2743
|
for (let l = 0, h = e.length; l < h; ++l) {
|
|
2744
2744
|
const c = e[l];
|
|
2745
|
-
o =
|
|
2745
|
+
o = as(
|
|
2746
2746
|
n,
|
|
2747
2747
|
t,
|
|
2748
2748
|
c,
|
|
@@ -2754,7 +2754,7 @@ function Fe(n, t, e, i, r, s, o, a) {
|
|
|
2754
2754
|
}
|
|
2755
2755
|
return o;
|
|
2756
2756
|
}
|
|
2757
|
-
function
|
|
2757
|
+
function ls(n, t, e, i, r, s, o, a) {
|
|
2758
2758
|
for (let l = 0, h = e.length; l < h; ++l) {
|
|
2759
2759
|
const c = e[l], u = [];
|
|
2760
2760
|
o = Fe(
|
|
@@ -2849,7 +2849,7 @@ class B extends qi {
|
|
|
2849
2849
|
ve(t);
|
|
2850
2850
|
const e = this.geometries_;
|
|
2851
2851
|
for (let i = 0, r = e.length; i < r; ++i)
|
|
2852
|
-
|
|
2852
|
+
ur(t, e[i].getExtent());
|
|
2853
2853
|
return t;
|
|
2854
2854
|
}
|
|
2855
2855
|
/**
|
|
@@ -3032,7 +3032,7 @@ function nn(n, t, e, i) {
|
|
|
3032
3032
|
}
|
|
3033
3033
|
return r;
|
|
3034
3034
|
}
|
|
3035
|
-
function
|
|
3035
|
+
function hs(n, t, e, i) {
|
|
3036
3036
|
let r = 0;
|
|
3037
3037
|
for (let s = 0, o = e.length; s < o; ++s) {
|
|
3038
3038
|
const a = e[s];
|
|
@@ -3080,7 +3080,7 @@ function Ie(n, t, e, i, r) {
|
|
|
3080
3080
|
}
|
|
3081
3081
|
return r;
|
|
3082
3082
|
}
|
|
3083
|
-
function
|
|
3083
|
+
function cs(n, t, e, i, r) {
|
|
3084
3084
|
for (let s = 0, o = e.length; s < o; ++s) {
|
|
3085
3085
|
const a = e[s];
|
|
3086
3086
|
r = Ie(n, t, a, i, r), t = a[a.length - 1];
|
|
@@ -3159,7 +3159,7 @@ function Re(n, t, e, i, r, s, o, a, l, h, c) {
|
|
|
3159
3159
|
}
|
|
3160
3160
|
return h;
|
|
3161
3161
|
}
|
|
3162
|
-
function
|
|
3162
|
+
function us(n, t, e, i, r, s, o, a, l, h, c) {
|
|
3163
3163
|
c = c || [NaN, NaN];
|
|
3164
3164
|
for (let u = 0, d = e.length; u < d; ++u) {
|
|
3165
3165
|
const g = e[u];
|
|
@@ -3201,7 +3201,7 @@ function Te(n, t, e, i, r) {
|
|
|
3201
3201
|
}
|
|
3202
3202
|
return r.length = s, r;
|
|
3203
3203
|
}
|
|
3204
|
-
function
|
|
3204
|
+
function ds(n, t, e, i, r) {
|
|
3205
3205
|
r = r !== void 0 ? r : [];
|
|
3206
3206
|
let s = 0;
|
|
3207
3207
|
for (let o = 0, a = e.length; o < a; ++o) {
|
|
@@ -3363,7 +3363,7 @@ function rn(n, t, e, i, r) {
|
|
|
3363
3363
|
return !1;
|
|
3364
3364
|
}
|
|
3365
3365
|
function Zt(n, t, e, i, r, s) {
|
|
3366
|
-
return s = s ?? ji(_e(), n, t, e, i),
|
|
3366
|
+
return s = s ?? ji(_e(), n, t, e, i), _r(r, s) ? s[0] >= r[0] && s[2] <= r[2] || s[1] >= r[1] && s[3] <= r[3] ? !0 : rn(
|
|
3367
3367
|
n,
|
|
3368
3368
|
t,
|
|
3369
3369
|
e,
|
|
@@ -3375,11 +3375,11 @@ function Zt(n, t, e, i, r, s) {
|
|
|
3375
3375
|
* `false` otherwise.
|
|
3376
3376
|
*/
|
|
3377
3377
|
function(o, a) {
|
|
3378
|
-
return
|
|
3378
|
+
return Cr(r, o, a);
|
|
3379
3379
|
}
|
|
3380
3380
|
) : !1;
|
|
3381
3381
|
}
|
|
3382
|
-
function
|
|
3382
|
+
function gs(n, t, e, i, r) {
|
|
3383
3383
|
for (let s = 0, o = e.length; s < o; ++s) {
|
|
3384
3384
|
if (Zt(n, t, e[s], i, r))
|
|
3385
3385
|
return !0;
|
|
@@ -3387,7 +3387,7 @@ function ds(n, t, e, i, r) {
|
|
|
3387
3387
|
}
|
|
3388
3388
|
return !1;
|
|
3389
3389
|
}
|
|
3390
|
-
function
|
|
3390
|
+
function fs(n, t, e, i, r) {
|
|
3391
3391
|
return !!(Zt(n, t, e, i, r) || j(
|
|
3392
3392
|
n,
|
|
3393
3393
|
t,
|
|
@@ -3419,12 +3419,12 @@ function gs(n, t, e, i, r) {
|
|
|
3419
3419
|
));
|
|
3420
3420
|
}
|
|
3421
3421
|
function sn(n, t, e, i, r) {
|
|
3422
|
-
if (!
|
|
3422
|
+
if (!fs(n, t, e[0], i, r))
|
|
3423
3423
|
return !1;
|
|
3424
3424
|
if (e.length === 1)
|
|
3425
3425
|
return !0;
|
|
3426
3426
|
for (let s = 1, o = e.length; s < o; ++s)
|
|
3427
|
-
if (
|
|
3427
|
+
if (is(
|
|
3428
3428
|
n,
|
|
3429
3429
|
e[s - 1],
|
|
3430
3430
|
e[s],
|
|
@@ -3440,7 +3440,7 @@ function sn(n, t, e, i, r) {
|
|
|
3440
3440
|
return !1;
|
|
3441
3441
|
return !0;
|
|
3442
3442
|
}
|
|
3443
|
-
function
|
|
3443
|
+
function ps(n, t, e, i, r) {
|
|
3444
3444
|
for (let s = 0, o = e.length; s < o; ++s) {
|
|
3445
3445
|
const a = e[s];
|
|
3446
3446
|
if (sn(n, t, a, i, r))
|
|
@@ -3449,7 +3449,7 @@ function fs(n, t, e, i, r) {
|
|
|
3449
3449
|
}
|
|
3450
3450
|
return !1;
|
|
3451
3451
|
}
|
|
3452
|
-
function
|
|
3452
|
+
function ys(n, t, e, i) {
|
|
3453
3453
|
let r = n[t], s = n[t + 1], o = 0;
|
|
3454
3454
|
for (let a = t + i; a < e; a += i) {
|
|
3455
3455
|
const l = n[a], h = n[a + 1];
|
|
@@ -3610,7 +3610,7 @@ class V extends Z {
|
|
|
3610
3610
|
* @api
|
|
3611
3611
|
*/
|
|
3612
3612
|
getLength() {
|
|
3613
|
-
return
|
|
3613
|
+
return ys(
|
|
3614
3614
|
this.flatCoordinates,
|
|
3615
3615
|
0,
|
|
3616
3616
|
this.flatCoordinates.length,
|
|
@@ -3796,7 +3796,7 @@ class Ct extends Z {
|
|
|
3796
3796
|
* @api
|
|
3797
3797
|
*/
|
|
3798
3798
|
getCoordinateAtM(t, e, i) {
|
|
3799
|
-
return this.layout != "XYM" && this.layout != "XYZM" || this.flatCoordinates.length === 0 ? null : (e = e !== void 0 ? e : !1, i = i !== void 0 ? i : !1,
|
|
3799
|
+
return this.layout != "XYM" && this.layout != "XYZM" || this.flatCoordinates.length === 0 ? null : (e = e !== void 0 ? e : !1, i = i !== void 0 ? i : !1, rs(
|
|
3800
3800
|
this.flatCoordinates,
|
|
3801
3801
|
0,
|
|
3802
3802
|
this.ends_,
|
|
@@ -3913,7 +3913,7 @@ class Ct extends Z {
|
|
|
3913
3913
|
* @override
|
|
3914
3914
|
*/
|
|
3915
3915
|
intersectsExtent(t) {
|
|
3916
|
-
return
|
|
3916
|
+
return gs(
|
|
3917
3917
|
this.flatCoordinates,
|
|
3918
3918
|
0,
|
|
3919
3919
|
this.ends_,
|
|
@@ -4025,7 +4025,7 @@ class z extends Z {
|
|
|
4025
4025
|
* @override
|
|
4026
4026
|
*/
|
|
4027
4027
|
setCoordinates(t, e) {
|
|
4028
|
-
this.setLayout(e, t, 0), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length =
|
|
4028
|
+
this.setLayout(e, t, 0), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = es(
|
|
4029
4029
|
this.flatCoordinates,
|
|
4030
4030
|
0,
|
|
4031
4031
|
t,
|
|
@@ -4542,14 +4542,14 @@ class wt extends Z {
|
|
|
4542
4542
|
*/
|
|
4543
4543
|
closestPointXY(t, e, i, r) {
|
|
4544
4544
|
return r < q(this.getExtent(), t, e) ? r : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt(
|
|
4545
|
-
|
|
4545
|
+
cs(
|
|
4546
4546
|
this.flatCoordinates,
|
|
4547
4547
|
0,
|
|
4548
4548
|
this.endss_,
|
|
4549
4549
|
this.stride,
|
|
4550
4550
|
0
|
|
4551
4551
|
)
|
|
4552
|
-
), this.maxDeltaRevision_ = this.getRevision()),
|
|
4552
|
+
), this.maxDeltaRevision_ = this.getRevision()), us(
|
|
4553
4553
|
this.getOrientedFlatCoordinates(),
|
|
4554
4554
|
0,
|
|
4555
4555
|
this.endss_,
|
|
@@ -4569,7 +4569,7 @@ class wt extends Z {
|
|
|
4569
4569
|
* @override
|
|
4570
4570
|
*/
|
|
4571
4571
|
containsXY(t, e) {
|
|
4572
|
-
return
|
|
4572
|
+
return ns(
|
|
4573
4573
|
this.getOrientedFlatCoordinates(),
|
|
4574
4574
|
0,
|
|
4575
4575
|
this.endss_,
|
|
@@ -4584,7 +4584,7 @@ class wt extends Z {
|
|
|
4584
4584
|
* @api
|
|
4585
4585
|
*/
|
|
4586
4586
|
getArea() {
|
|
4587
|
-
return
|
|
4587
|
+
return hs(
|
|
4588
4588
|
this.getOrientedFlatCoordinates(),
|
|
4589
4589
|
0,
|
|
4590
4590
|
this.endss_,
|
|
@@ -4613,7 +4613,7 @@ class wt extends Z {
|
|
|
4613
4613
|
this.endss_,
|
|
4614
4614
|
this.stride,
|
|
4615
4615
|
t
|
|
4616
|
-
)) : e = this.flatCoordinates,
|
|
4616
|
+
)) : e = this.flatCoordinates, ds(
|
|
4617
4617
|
e,
|
|
4618
4618
|
0,
|
|
4619
4619
|
this.endss_,
|
|
@@ -4631,13 +4631,13 @@ class wt extends Z {
|
|
|
4631
4631
|
*/
|
|
4632
4632
|
getFlatInteriorPoints() {
|
|
4633
4633
|
if (this.flatInteriorPointsRevision_ != this.getRevision()) {
|
|
4634
|
-
const t =
|
|
4634
|
+
const t = Ki(
|
|
4635
4635
|
this.flatCoordinates,
|
|
4636
4636
|
0,
|
|
4637
4637
|
this.endss_,
|
|
4638
4638
|
this.stride
|
|
4639
4639
|
);
|
|
4640
|
-
this.flatInteriorPoints_ =
|
|
4640
|
+
this.flatInteriorPoints_ = Di(
|
|
4641
4641
|
this.getOrientedFlatCoordinates(),
|
|
4642
4642
|
0,
|
|
4643
4643
|
this.endss_,
|
|
@@ -4685,7 +4685,7 @@ class wt extends Z {
|
|
|
4685
4685
|
*/
|
|
4686
4686
|
getSimplifiedGeometryInternal(t) {
|
|
4687
4687
|
const e = [], i = [];
|
|
4688
|
-
return e.length =
|
|
4688
|
+
return e.length = ls(
|
|
4689
4689
|
this.flatCoordinates,
|
|
4690
4690
|
0,
|
|
4691
4691
|
this.endss_,
|
|
@@ -4761,7 +4761,7 @@ class wt extends Z {
|
|
|
4761
4761
|
* @override
|
|
4762
4762
|
*/
|
|
4763
4763
|
intersectsExtent(t) {
|
|
4764
|
-
return
|
|
4764
|
+
return ps(
|
|
4765
4765
|
this.getOrientedFlatCoordinates(),
|
|
4766
4766
|
0,
|
|
4767
4767
|
this.endss_,
|
|
@@ -4852,8 +4852,8 @@ class W {
|
|
|
4852
4852
|
*/
|
|
4853
4853
|
getFlatInteriorPoints() {
|
|
4854
4854
|
if (!this.flatInteriorPoints_) {
|
|
4855
|
-
const t =
|
|
4856
|
-
this.flatInteriorPoints_ =
|
|
4855
|
+
const t = os(this.flatCoordinates_, this.ends_), e = Ki(this.flatCoordinates_, 0, t, 2);
|
|
4856
|
+
this.flatInteriorPoints_ = Di(
|
|
4857
4857
|
this.flatCoordinates_,
|
|
4858
4858
|
0,
|
|
4859
4859
|
t,
|
|
@@ -5217,7 +5217,7 @@ class on {
|
|
|
5217
5217
|
function bt(n, t, e) {
|
|
5218
5218
|
const i = e ? x(e.featureProjection) : null, r = e ? x(e.dataProjection) : null;
|
|
5219
5219
|
let s = n;
|
|
5220
|
-
if (i && r && !
|
|
5220
|
+
if (i && r && !qr(i, r)) {
|
|
5221
5221
|
t && (s = /** @type {T} */
|
|
5222
5222
|
n.clone());
|
|
5223
5223
|
const o = t ? i : r, a = t ? r : i;
|
|
@@ -5239,7 +5239,7 @@ function bt(n, t, e) {
|
|
|
5239
5239
|
}
|
|
5240
5240
|
return s;
|
|
5241
5241
|
}
|
|
5242
|
-
const
|
|
5242
|
+
const ms = {
|
|
5243
5243
|
Point: z,
|
|
5244
5244
|
LineString: V,
|
|
5245
5245
|
Polygon: J,
|
|
@@ -5247,7 +5247,7 @@ const ys = {
|
|
|
5247
5247
|
MultiLineString: Ct,
|
|
5248
5248
|
MultiPolygon: wt
|
|
5249
5249
|
};
|
|
5250
|
-
function
|
|
5250
|
+
function _s(n, t, e) {
|
|
5251
5251
|
return Array.isArray(t[0]) ? (Qi(n, 0, t, e) || (n = n.slice(), ue(n, 0, t, e)), n) : (Ae(n, 0, t, e) || (n = n.slice(), Ut(n, 0, t, e)), n);
|
|
5252
5252
|
}
|
|
5253
5253
|
function an(n, t) {
|
|
@@ -5264,7 +5264,7 @@ function an(n, t) {
|
|
|
5264
5264
|
return bt(
|
|
5265
5265
|
new W(
|
|
5266
5266
|
i,
|
|
5267
|
-
i === "Polygon" ?
|
|
5267
|
+
i === "Polygon" ? _s(e.flatCoordinates, e.ends, r) : e.flatCoordinates,
|
|
5268
5268
|
(s = e.ends) == null ? void 0 : s.flat(),
|
|
5269
5269
|
r,
|
|
5270
5270
|
n.properties || {},
|
|
@@ -5283,14 +5283,14 @@ function Ne(n, t) {
|
|
|
5283
5283
|
);
|
|
5284
5284
|
return new B(i);
|
|
5285
5285
|
}
|
|
5286
|
-
const e =
|
|
5286
|
+
const e = ms[n.type];
|
|
5287
5287
|
return bt(
|
|
5288
5288
|
new e(n.flatCoordinates, n.layout || "XY", n.ends),
|
|
5289
5289
|
!1,
|
|
5290
5290
|
t
|
|
5291
5291
|
);
|
|
5292
5292
|
}
|
|
5293
|
-
class
|
|
5293
|
+
class vs extends on {
|
|
5294
5294
|
constructor() {
|
|
5295
5295
|
super();
|
|
5296
5296
|
}
|
|
@@ -5469,7 +5469,7 @@ function Gt(n) {
|
|
|
5469
5469
|
}
|
|
5470
5470
|
return n !== null ? n : null;
|
|
5471
5471
|
}
|
|
5472
|
-
class
|
|
5472
|
+
class Cs extends vs {
|
|
5473
5473
|
/**
|
|
5474
5474
|
* @param {Options<FeatureType>} [options] Options.
|
|
5475
5475
|
*/
|
|
@@ -5558,7 +5558,7 @@ class vs extends _s {
|
|
|
5558
5558
|
* @override
|
|
5559
5559
|
*/
|
|
5560
5560
|
readGeometryFromObject(t, e) {
|
|
5561
|
-
return
|
|
5561
|
+
return ws(t, e);
|
|
5562
5562
|
}
|
|
5563
5563
|
/**
|
|
5564
5564
|
* @param {Object} object Object.
|
|
@@ -5642,49 +5642,49 @@ function Oe(n, t) {
|
|
|
5642
5642
|
let e;
|
|
5643
5643
|
switch (n.type) {
|
|
5644
5644
|
case "Point": {
|
|
5645
|
-
e =
|
|
5645
|
+
e = Es(
|
|
5646
5646
|
/** @type {GeoJSONPoint} */
|
|
5647
5647
|
n
|
|
5648
5648
|
);
|
|
5649
5649
|
break;
|
|
5650
5650
|
}
|
|
5651
5651
|
case "LineString": {
|
|
5652
|
-
e =
|
|
5652
|
+
e = xs(
|
|
5653
5653
|
/** @type {GeoJSONLineString} */
|
|
5654
5654
|
n
|
|
5655
5655
|
);
|
|
5656
5656
|
break;
|
|
5657
5657
|
}
|
|
5658
5658
|
case "Polygon": {
|
|
5659
|
-
e =
|
|
5659
|
+
e = $s(
|
|
5660
5660
|
/** @type {GeoJSONPolygon} */
|
|
5661
5661
|
n
|
|
5662
5662
|
);
|
|
5663
5663
|
break;
|
|
5664
5664
|
}
|
|
5665
5665
|
case "MultiPoint": {
|
|
5666
|
-
e =
|
|
5666
|
+
e = Ms(
|
|
5667
5667
|
/** @type {GeoJSONMultiPoint} */
|
|
5668
5668
|
n
|
|
5669
5669
|
);
|
|
5670
5670
|
break;
|
|
5671
5671
|
}
|
|
5672
5672
|
case "MultiLineString": {
|
|
5673
|
-
e =
|
|
5673
|
+
e = Ps(
|
|
5674
5674
|
/** @type {GeoJSONMultiLineString} */
|
|
5675
5675
|
n
|
|
5676
5676
|
);
|
|
5677
5677
|
break;
|
|
5678
5678
|
}
|
|
5679
5679
|
case "MultiPolygon": {
|
|
5680
|
-
e =
|
|
5680
|
+
e = Ss(
|
|
5681
5681
|
/** @type {GeoJSONMultiPolygon} */
|
|
5682
5682
|
n
|
|
5683
5683
|
);
|
|
5684
5684
|
break;
|
|
5685
5685
|
}
|
|
5686
5686
|
case "GeometryCollection": {
|
|
5687
|
-
e =
|
|
5687
|
+
e = bs(
|
|
5688
5688
|
/** @type {GeoJSONGeometryCollection} */
|
|
5689
5689
|
n
|
|
5690
5690
|
);
|
|
@@ -5695,11 +5695,11 @@ function Oe(n, t) {
|
|
|
5695
5695
|
}
|
|
5696
5696
|
return e;
|
|
5697
5697
|
}
|
|
5698
|
-
function
|
|
5698
|
+
function ws(n, t) {
|
|
5699
5699
|
const e = Oe(n);
|
|
5700
5700
|
return Ne(e, t);
|
|
5701
5701
|
}
|
|
5702
|
-
function
|
|
5702
|
+
function bs(n, t) {
|
|
5703
5703
|
return n.geometries.map(
|
|
5704
5704
|
/**
|
|
5705
5705
|
* @param {GeoJSONGeometry} geometry Geometry.
|
|
@@ -5710,44 +5710,44 @@ function ws(n, t) {
|
|
|
5710
5710
|
}
|
|
5711
5711
|
);
|
|
5712
5712
|
}
|
|
5713
|
-
function
|
|
5713
|
+
function Es(n) {
|
|
5714
5714
|
const t = n.coordinates;
|
|
5715
5715
|
return {
|
|
5716
5716
|
type: "Point",
|
|
5717
5717
|
flatCoordinates: t,
|
|
5718
|
-
layout:
|
|
5718
|
+
layout: K(t.length)
|
|
5719
5719
|
};
|
|
5720
5720
|
}
|
|
5721
|
-
function
|
|
5721
|
+
function xs(n) {
|
|
5722
5722
|
var i;
|
|
5723
5723
|
const t = n.coordinates, e = t.flat();
|
|
5724
5724
|
return {
|
|
5725
5725
|
type: "LineString",
|
|
5726
5726
|
flatCoordinates: e,
|
|
5727
5727
|
ends: [e.length],
|
|
5728
|
-
layout:
|
|
5728
|
+
layout: K(((i = t[0]) == null ? void 0 : i.length) || 2)
|
|
5729
5729
|
};
|
|
5730
5730
|
}
|
|
5731
|
-
function
|
|
5731
|
+
function Ps(n) {
|
|
5732
5732
|
var s, o;
|
|
5733
5733
|
const t = n.coordinates, e = ((o = (s = t[0]) == null ? void 0 : s[0]) == null ? void 0 : o.length) || 2, i = [], r = $t(i, 0, t, e);
|
|
5734
5734
|
return {
|
|
5735
5735
|
type: "MultiLineString",
|
|
5736
5736
|
flatCoordinates: i,
|
|
5737
5737
|
ends: r,
|
|
5738
|
-
layout:
|
|
5738
|
+
layout: K(e)
|
|
5739
5739
|
};
|
|
5740
5740
|
}
|
|
5741
|
-
function
|
|
5741
|
+
function Ms(n) {
|
|
5742
5742
|
var e;
|
|
5743
5743
|
const t = n.coordinates;
|
|
5744
5744
|
return {
|
|
5745
5745
|
type: "MultiPoint",
|
|
5746
5746
|
flatCoordinates: t.flat(),
|
|
5747
|
-
layout:
|
|
5747
|
+
layout: K(((e = t[0]) == null ? void 0 : e.length) || 2)
|
|
5748
5748
|
};
|
|
5749
5749
|
}
|
|
5750
|
-
function
|
|
5750
|
+
function Ss(n) {
|
|
5751
5751
|
var s, o;
|
|
5752
5752
|
const t = n.coordinates, e = [], i = ((o = (s = t[0]) == null ? void 0 : s[0]) == null ? void 0 : o[0].length) || 2, r = Zi(
|
|
5753
5753
|
e,
|
|
@@ -5759,17 +5759,17 @@ function Ms(n) {
|
|
|
5759
5759
|
type: "MultiPolygon",
|
|
5760
5760
|
flatCoordinates: e,
|
|
5761
5761
|
ends: r,
|
|
5762
|
-
layout:
|
|
5762
|
+
layout: K(i)
|
|
5763
5763
|
};
|
|
5764
5764
|
}
|
|
5765
|
-
function
|
|
5765
|
+
function $s(n) {
|
|
5766
5766
|
var s, o;
|
|
5767
5767
|
const t = n.coordinates, e = [], i = (o = (s = t[0]) == null ? void 0 : s[0]) == null ? void 0 : o.length, r = $t(e, 0, t, i);
|
|
5768
5768
|
return {
|
|
5769
5769
|
type: "Polygon",
|
|
5770
5770
|
flatCoordinates: e,
|
|
5771
5771
|
ends: r,
|
|
5772
|
-
layout:
|
|
5772
|
+
layout: K(i)
|
|
5773
5773
|
};
|
|
5774
5774
|
}
|
|
5775
5775
|
function de(n, t) {
|
|
@@ -5778,21 +5778,21 @@ function de(n, t) {
|
|
|
5778
5778
|
let i;
|
|
5779
5779
|
switch (e) {
|
|
5780
5780
|
case "Point": {
|
|
5781
|
-
i =
|
|
5781
|
+
i = Rs(
|
|
5782
5782
|
/** @type {import("../geom/Point.js").default} */
|
|
5783
5783
|
n
|
|
5784
5784
|
);
|
|
5785
5785
|
break;
|
|
5786
5786
|
}
|
|
5787
5787
|
case "LineString": {
|
|
5788
|
-
i =
|
|
5788
|
+
i = Fs(
|
|
5789
5789
|
/** @type {import("../geom/LineString.js").default} */
|
|
5790
5790
|
n
|
|
5791
5791
|
);
|
|
5792
5792
|
break;
|
|
5793
5793
|
}
|
|
5794
5794
|
case "Polygon": {
|
|
5795
|
-
i =
|
|
5795
|
+
i = Ts(
|
|
5796
5796
|
/** @type {import("../geom/Polygon.js").default} */
|
|
5797
5797
|
n,
|
|
5798
5798
|
t
|
|
@@ -5800,21 +5800,21 @@ function de(n, t) {
|
|
|
5800
5800
|
break;
|
|
5801
5801
|
}
|
|
5802
5802
|
case "MultiPoint": {
|
|
5803
|
-
i =
|
|
5803
|
+
i = Is(
|
|
5804
5804
|
/** @type {import("../geom/MultiPoint.js").default} */
|
|
5805
5805
|
n
|
|
5806
5806
|
);
|
|
5807
5807
|
break;
|
|
5808
5808
|
}
|
|
5809
5809
|
case "MultiLineString": {
|
|
5810
|
-
i =
|
|
5810
|
+
i = Gs(
|
|
5811
5811
|
/** @type {import("../geom/MultiLineString.js").default} */
|
|
5812
5812
|
n
|
|
5813
5813
|
);
|
|
5814
5814
|
break;
|
|
5815
5815
|
}
|
|
5816
5816
|
case "MultiPolygon": {
|
|
5817
|
-
i =
|
|
5817
|
+
i = Ls(
|
|
5818
5818
|
/** @type {import("../geom/MultiPolygon.js").default} */
|
|
5819
5819
|
n,
|
|
5820
5820
|
t
|
|
@@ -5822,7 +5822,7 @@ function de(n, t) {
|
|
|
5822
5822
|
break;
|
|
5823
5823
|
}
|
|
5824
5824
|
case "GeometryCollection": {
|
|
5825
|
-
i =
|
|
5825
|
+
i = As(
|
|
5826
5826
|
/** @type {import("../geom/GeometryCollection.js").default} */
|
|
5827
5827
|
n,
|
|
5828
5828
|
t
|
|
@@ -5841,7 +5841,7 @@ function de(n, t) {
|
|
|
5841
5841
|
}
|
|
5842
5842
|
return i;
|
|
5843
5843
|
}
|
|
5844
|
-
function
|
|
5844
|
+
function As(n, t) {
|
|
5845
5845
|
return t = Object.assign({}, t), delete t.featureProjection, {
|
|
5846
5846
|
type: "GeometryCollection",
|
|
5847
5847
|
geometries: n.getGeometriesArray().map(function(i) {
|
|
@@ -5849,46 +5849,46 @@ function $s(n, t) {
|
|
|
5849
5849
|
})
|
|
5850
5850
|
};
|
|
5851
5851
|
}
|
|
5852
|
-
function
|
|
5852
|
+
function Fs(n, t) {
|
|
5853
5853
|
return {
|
|
5854
5854
|
type: "LineString",
|
|
5855
5855
|
coordinates: n.getCoordinates()
|
|
5856
5856
|
};
|
|
5857
5857
|
}
|
|
5858
|
-
function
|
|
5858
|
+
function Gs(n, t) {
|
|
5859
5859
|
return {
|
|
5860
5860
|
type: "MultiLineString",
|
|
5861
5861
|
coordinates: n.getCoordinates()
|
|
5862
5862
|
};
|
|
5863
5863
|
}
|
|
5864
|
-
function
|
|
5864
|
+
function Is(n, t) {
|
|
5865
5865
|
return {
|
|
5866
5866
|
type: "MultiPoint",
|
|
5867
5867
|
coordinates: n.getCoordinates()
|
|
5868
5868
|
};
|
|
5869
5869
|
}
|
|
5870
|
-
function
|
|
5870
|
+
function Ls(n, t) {
|
|
5871
5871
|
let e;
|
|
5872
5872
|
return t && (e = t.rightHanded), {
|
|
5873
5873
|
type: "MultiPolygon",
|
|
5874
5874
|
coordinates: n.getCoordinates(e)
|
|
5875
5875
|
};
|
|
5876
5876
|
}
|
|
5877
|
-
function
|
|
5877
|
+
function Rs(n, t) {
|
|
5878
5878
|
return {
|
|
5879
5879
|
type: "Point",
|
|
5880
5880
|
coordinates: n.getCoordinates()
|
|
5881
5881
|
};
|
|
5882
5882
|
}
|
|
5883
|
-
function
|
|
5883
|
+
function Ts(n, t) {
|
|
5884
5884
|
let e;
|
|
5885
5885
|
return t && (e = t.rightHanded), {
|
|
5886
5886
|
type: "Polygon",
|
|
5887
5887
|
coordinates: n.getCoordinates(e)
|
|
5888
5888
|
};
|
|
5889
5889
|
}
|
|
5890
|
-
const
|
|
5891
|
-
class
|
|
5890
|
+
const Ns = (n, t) => new Cs().writeFeaturesObject(n, t);
|
|
5891
|
+
class Os extends on {
|
|
5892
5892
|
constructor() {
|
|
5893
5893
|
super();
|
|
5894
5894
|
}
|
|
@@ -6063,14 +6063,14 @@ class Ns extends on {
|
|
|
6063
6063
|
function It(n) {
|
|
6064
6064
|
return typeof n == "string" ? n : "";
|
|
6065
6065
|
}
|
|
6066
|
-
const
|
|
6066
|
+
const ks = {
|
|
6067
6067
|
POINT: z,
|
|
6068
6068
|
LINESTRING: V,
|
|
6069
6069
|
POLYGON: J,
|
|
6070
6070
|
MULTIPOINT: At,
|
|
6071
6071
|
MULTILINESTRING: Ct,
|
|
6072
6072
|
MULTIPOLYGON: wt
|
|
6073
|
-
}, ln = "EMPTY", hn = "Z", cn = "M",
|
|
6073
|
+
}, ln = "EMPTY", hn = "Z", cn = "M", js = "ZM", m = {
|
|
6074
6074
|
START: 0,
|
|
6075
6075
|
TEXT: 1,
|
|
6076
6076
|
LEFT_PAREN: 2,
|
|
@@ -6078,7 +6078,7 @@ const Os = {
|
|
|
6078
6078
|
NUMBER: 4,
|
|
6079
6079
|
COMMA: 5,
|
|
6080
6080
|
EOF: 6
|
|
6081
|
-
},
|
|
6081
|
+
}, Hs = {
|
|
6082
6082
|
Point: "POINT",
|
|
6083
6083
|
LineString: "LINESTRING",
|
|
6084
6084
|
Polygon: "POLYGON",
|
|
@@ -6088,7 +6088,7 @@ const Os = {
|
|
|
6088
6088
|
GeometryCollection: "GEOMETRYCOLLECTION",
|
|
6089
6089
|
Circle: "CIRCLE"
|
|
6090
6090
|
};
|
|
6091
|
-
class
|
|
6091
|
+
class Us {
|
|
6092
6092
|
/**
|
|
6093
6093
|
* @param {string} wkt WKT string.
|
|
6094
6094
|
*/
|
|
@@ -6186,7 +6186,7 @@ class Hs {
|
|
|
6186
6186
|
return this.wkt.substring(e, this.index_--).toUpperCase();
|
|
6187
6187
|
}
|
|
6188
6188
|
}
|
|
6189
|
-
class
|
|
6189
|
+
class Xs {
|
|
6190
6190
|
/**
|
|
6191
6191
|
* @param {Lexer} lexer The lexer.
|
|
6192
6192
|
*/
|
|
@@ -6237,7 +6237,7 @@ class Us {
|
|
|
6237
6237
|
const e = this.token_;
|
|
6238
6238
|
if (this.isTokenType(m.TEXT)) {
|
|
6239
6239
|
const i = e.value;
|
|
6240
|
-
i === hn ? t = "XYZ" : i === cn ? t = "XYM" : i ===
|
|
6240
|
+
i === hn ? t = "XYZ" : i === cn ? t = "XYM" : i === js && (t = "XYZM"), t !== "XY" && this.consume_();
|
|
6241
6241
|
}
|
|
6242
6242
|
return t;
|
|
6243
6243
|
}
|
|
@@ -6424,7 +6424,7 @@ class Us {
|
|
|
6424
6424
|
const o = this.parseGeometryCollectionText_();
|
|
6425
6425
|
return new B(o);
|
|
6426
6426
|
}
|
|
6427
|
-
const r =
|
|
6427
|
+
const r = ks[e];
|
|
6428
6428
|
if (!r)
|
|
6429
6429
|
throw new Error("Invalid geometry type: " + e);
|
|
6430
6430
|
let s;
|
|
@@ -6462,7 +6462,7 @@ class Us {
|
|
|
6462
6462
|
throw new Error(this.formatErrorMessage_());
|
|
6463
6463
|
}
|
|
6464
6464
|
}
|
|
6465
|
-
class
|
|
6465
|
+
class Ys extends Os {
|
|
6466
6466
|
/**
|
|
6467
6467
|
* @param {Options} [options] Options.
|
|
6468
6468
|
*/
|
|
@@ -6477,8 +6477,8 @@ class Xs extends Ns {
|
|
|
6477
6477
|
* @private
|
|
6478
6478
|
*/
|
|
6479
6479
|
parse_(t) {
|
|
6480
|
-
const e = new
|
|
6481
|
-
return new
|
|
6480
|
+
const e = new Us(t);
|
|
6481
|
+
return new Xs(e).parse();
|
|
6482
6482
|
}
|
|
6483
6483
|
/**
|
|
6484
6484
|
* @protected
|
|
@@ -6563,13 +6563,13 @@ function un(n) {
|
|
|
6563
6563
|
const t = n.getCoordinates();
|
|
6564
6564
|
return t.length === 0 ? "" : t.join(" ");
|
|
6565
6565
|
}
|
|
6566
|
-
function
|
|
6566
|
+
function Bs(n) {
|
|
6567
6567
|
const t = [], e = n.getPoints();
|
|
6568
6568
|
for (let i = 0, r = e.length; i < r; ++i)
|
|
6569
6569
|
t.push("(" + un(e[i]) + ")");
|
|
6570
6570
|
return t.join(",");
|
|
6571
6571
|
}
|
|
6572
|
-
function
|
|
6572
|
+
function Vs(n) {
|
|
6573
6573
|
const t = [], e = n.getGeometries();
|
|
6574
6574
|
for (let i = 0, r = e.length; i < r; ++i)
|
|
6575
6575
|
t.push(gn(e[i]));
|
|
@@ -6581,7 +6581,7 @@ function ke(n) {
|
|
|
6581
6581
|
e.push(t[i].join(" "));
|
|
6582
6582
|
return e.join(",");
|
|
6583
6583
|
}
|
|
6584
|
-
function
|
|
6584
|
+
function zs(n) {
|
|
6585
6585
|
const t = [], e = n.getLineStrings();
|
|
6586
6586
|
for (let i = 0, r = e.length; i < r; ++i)
|
|
6587
6587
|
t.push("(" + ke(e[i]) + ")");
|
|
@@ -6593,32 +6593,32 @@ function dn(n) {
|
|
|
6593
6593
|
t.push("(" + ke(e[i]) + ")");
|
|
6594
6594
|
return t.join(",");
|
|
6595
6595
|
}
|
|
6596
|
-
function
|
|
6596
|
+
function Js(n) {
|
|
6597
6597
|
const t = [], e = n.getPolygons();
|
|
6598
6598
|
for (let i = 0, r = e.length; i < r; ++i)
|
|
6599
6599
|
t.push("(" + dn(e[i]) + ")");
|
|
6600
6600
|
return t.join(",");
|
|
6601
6601
|
}
|
|
6602
|
-
function
|
|
6602
|
+
function Ws(n) {
|
|
6603
6603
|
const t = n.getLayout();
|
|
6604
6604
|
let e = "";
|
|
6605
6605
|
return (t === "XYZ" || t === "XYZM") && (e += hn), (t === "XYM" || t === "XYZM") && (e += cn), e;
|
|
6606
6606
|
}
|
|
6607
|
-
const
|
|
6607
|
+
const qs = {
|
|
6608
6608
|
Point: un,
|
|
6609
6609
|
LineString: ke,
|
|
6610
6610
|
Polygon: dn,
|
|
6611
|
-
MultiPoint:
|
|
6612
|
-
MultiLineString:
|
|
6613
|
-
MultiPolygon:
|
|
6614
|
-
GeometryCollection:
|
|
6611
|
+
MultiPoint: Bs,
|
|
6612
|
+
MultiLineString: zs,
|
|
6613
|
+
MultiPolygon: Js,
|
|
6614
|
+
GeometryCollection: Vs
|
|
6615
6615
|
};
|
|
6616
6616
|
function gn(n) {
|
|
6617
|
-
const t = n.getType(), e =
|
|
6618
|
-
let r =
|
|
6617
|
+
const t = n.getType(), e = qs[t], i = e(n);
|
|
6618
|
+
let r = Hs[t];
|
|
6619
6619
|
if (typeof /** @type {?} */
|
|
6620
6620
|
n.getFlatCoordinates == "function") {
|
|
6621
|
-
const s =
|
|
6621
|
+
const s = Ws(
|
|
6622
6622
|
/** @type {import("../geom/SimpleGeometry.js").default} */
|
|
6623
6623
|
n
|
|
6624
6624
|
);
|
|
@@ -6626,7 +6626,7 @@ function gn(n) {
|
|
|
6626
6626
|
}
|
|
6627
6627
|
return i.length === 0 ? r + " " + ln : r + "(" + i + ")";
|
|
6628
6628
|
}
|
|
6629
|
-
const
|
|
6629
|
+
const Zs = (n, t) => new Ys().writeFeatures(n, t);
|
|
6630
6630
|
/**
|
|
6631
6631
|
* @license
|
|
6632
6632
|
* Copyright 2021 Google LLC
|
|
@@ -6653,7 +6653,7 @@ class fn extends U {
|
|
|
6653
6653
|
* Updates button states based on conditions
|
|
6654
6654
|
*/
|
|
6655
6655
|
updateButtonStates() {
|
|
6656
|
-
const { drawDisabled: e, discardDisabled: i } =
|
|
6656
|
+
const { drawDisabled: e, discardDisabled: i } = Kn(this);
|
|
6657
6657
|
$(this, Et, e), $(this, xt, i);
|
|
6658
6658
|
}
|
|
6659
6659
|
/**
|
|
@@ -6668,7 +6668,7 @@ class fn extends U {
|
|
|
6668
6668
|
return H`
|
|
6669
6669
|
<style>
|
|
6670
6670
|
${!this.unstyled && Dn}
|
|
6671
|
-
${!this.unstyled &&
|
|
6671
|
+
${!this.unstyled && Qn}
|
|
6672
6672
|
</style>
|
|
6673
6673
|
<div class="wrap-btn">
|
|
6674
6674
|
<slot></slot>
|
|
@@ -6737,7 +6737,7 @@ class fn extends U {
|
|
|
6737
6737
|
<button
|
|
6738
6738
|
data-cy="copyBtn"
|
|
6739
6739
|
class="icon-copy"
|
|
6740
|
-
@click=${() =>
|
|
6740
|
+
@click=${() => tr(this.geoJSON)}
|
|
6741
6741
|
>
|
|
6742
6742
|
${this.unstyled ? "copy" : C}
|
|
6743
6743
|
</button>
|
|
@@ -6760,7 +6760,7 @@ R(fn, "properties", {
|
|
|
6760
6760
|
unstyled: { type: Boolean }
|
|
6761
6761
|
});
|
|
6762
6762
|
customElements.define("eox-drawtools-controller", fn);
|
|
6763
|
-
const
|
|
6763
|
+
const Ks = `
|
|
6764
6764
|
button.discard:before {
|
|
6765
6765
|
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23FF5252' viewBox='0 0 24 24'%3E%3Ctitle%3Etrash-can-outline%3C/title%3E%3Cpath d='M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M7,6H17V19H7V6M9,8V17H11V8H9M13,8V17H15V8H13Z' /%3E%3C/svg%3E")
|
|
6766
6766
|
}
|
|
@@ -6805,19 +6805,19 @@ const Zs = `
|
|
|
6805
6805
|
color: white;
|
|
6806
6806
|
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ctitle%3Econtent-copy%3C/title%3E%3Cpath d='M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z' fill='white' /%3E%3C/svg%3E")
|
|
6807
6807
|
}
|
|
6808
|
-
`,
|
|
6808
|
+
`, pn = (n, t) => {
|
|
6809
6809
|
(() => {
|
|
6810
|
-
if (n.emitDrawnFeatures(), !n.multipleFeatures)
|
|
6810
|
+
if (n.emitDrawnFeatures(t), !n.multipleFeatures)
|
|
6811
6811
|
n.draw.setActive(!1), n.selectionEvents.removeSelectionEvent(), n.currentlyDrawing = !1;
|
|
6812
6812
|
else if (n.continuous)
|
|
6813
6813
|
if (!n.layerId)
|
|
6814
6814
|
n.drawLayer.getSource().clear(!0), n.drawnFeatures = [];
|
|
6815
6815
|
else {
|
|
6816
|
-
|
|
6817
|
-
n.drawLayer.getSource().clear(!0), n.drawLayer.getSource().addFeature(i), n.drawnFeatures = [i];
|
|
6816
|
+
let i;
|
|
6817
|
+
t ? i = n.drawnFeatures.at(-1) : (i = n.drawLayer.getSource().getFeatures().at(-1), n.drawLayer.getSource().clear(!0), n.drawLayer.getSource().addFeature(i)), n.drawnFeatures = [i];
|
|
6818
6818
|
}
|
|
6819
6819
|
})(), n.requestUpdate();
|
|
6820
|
-
},
|
|
6820
|
+
}, Ds = (n) => {
|
|
6821
6821
|
const t = () => {
|
|
6822
6822
|
n.drawLayer.set("isDrawingEnabled", !0), n.draw.setActive(!0), n.selectionEvents.addSelectionEvent();
|
|
6823
6823
|
}, e = () => {
|
|
@@ -6887,7 +6887,7 @@ const Zs = `
|
|
|
6887
6887
|
/** @type {unknown} */
|
|
6888
6888
|
i.interactions.drawInteraction, n.modify = /** @type {import("ol/interaction").Modify} */
|
|
6889
6889
|
/** @type {unknown} */
|
|
6890
|
-
i.interactions.drawInteractionmodify, ge(n, i, n.layerId), (h = n.modify) == null || h.on("modifyend", () => n.onModifyEnd()), i.addEventListener("addfeatures", () =>
|
|
6890
|
+
i.interactions.drawInteractionmodify, ge(n, i, n.layerId), (h = n.modify) == null || h.on("modifyend", () => n.onModifyEnd()), i.addEventListener("addfeatures", () => pn(n)), { EoxMap: i, OlMap: r };
|
|
6891
6891
|
}, to = (n) => {
|
|
6892
6892
|
const t = () => {
|
|
6893
6893
|
n.drawnFeatures = [], n.draw.setActive(!1), n.selectionEvents.removeSelectionEvent(), n.drawLayer.getSource().clear(), n.geoJSON = null;
|
|
@@ -6895,36 +6895,34 @@ const Zs = `
|
|
|
6895
6895
|
n.emitDrawnFeatures(), n.currentlyDrawing = !1, n.requestUpdate();
|
|
6896
6896
|
};
|
|
6897
6897
|
t(), e();
|
|
6898
|
-
}, eo = (n, t) => {
|
|
6898
|
+
}, eo = (n, t, e) => {
|
|
6899
6899
|
setTimeout(() => {
|
|
6900
|
-
const
|
|
6901
|
-
n.drawnFeatures =
|
|
6902
|
-
|
|
6903
|
-
const
|
|
6904
|
-
return
|
|
6905
|
-
}) :
|
|
6906
|
-
let
|
|
6900
|
+
const r = e ? n.drawnFeatures : n.drawLayer.getSource().getFeatures(), s = n.eoxMap.projection || "EPSG:3857", o = n.projection;
|
|
6901
|
+
n.drawnFeatures = o ? r.map((l) => {
|
|
6902
|
+
l = l.clone();
|
|
6903
|
+
const h = l.getGeometry().transform(s, o);
|
|
6904
|
+
return l.setGeometry(h), l;
|
|
6905
|
+
}) : r;
|
|
6906
|
+
let a;
|
|
6907
6907
|
switch (n.format) {
|
|
6908
6908
|
case "geojson":
|
|
6909
|
-
|
|
6909
|
+
a = Ns(n.drawnFeatures);
|
|
6910
6910
|
break;
|
|
6911
6911
|
case "wkt":
|
|
6912
|
-
|
|
6912
|
+
a = Zs(n.drawnFeatures);
|
|
6913
6913
|
break;
|
|
6914
6914
|
case "feature":
|
|
6915
|
-
|
|
6915
|
+
a = n.drawnFeatures;
|
|
6916
6916
|
break;
|
|
6917
6917
|
default:
|
|
6918
|
-
|
|
6918
|
+
a = n.drawnFeatures;
|
|
6919
6919
|
break;
|
|
6920
6920
|
}
|
|
6921
|
-
n.updateGeoJSON(), n.requestUpdate(), t(
|
|
6921
|
+
n.updateGeoJSON(), n.requestUpdate(), t(a);
|
|
6922
6922
|
}, 0);
|
|
6923
6923
|
}, io = (n) => {
|
|
6924
6924
|
const t = (r) => {
|
|
6925
|
-
(r == null ? void 0 : r.detail.id) !== "SelectLayerClickInteraction" || !r.detail.feature || (n.
|
|
6926
|
-
new CustomEvent("addfeatures", { detail: r.detail })
|
|
6927
|
-
));
|
|
6925
|
+
(r == null ? void 0 : r.detail.id) !== "SelectLayerClickInteraction" || !r.detail.feature || (n.drawnFeatures.push(r.detail.feature), pn(n, r.detail.feature));
|
|
6928
6926
|
};
|
|
6929
6927
|
return { addSelectionEvent: () => {
|
|
6930
6928
|
n.layerId && (n.eoxMap.selectInteractions.SelectLayerHoverInteraction.setActive(!0), n.eoxMap.addEventListener("select", t));
|
|
@@ -7006,12 +7004,12 @@ function so(n, t) {
|
|
|
7006
7004
|
}
|
|
7007
7005
|
["dragenter", "dragover", "dragleave", "drop"].forEach((s) => {
|
|
7008
7006
|
t.addEventListener(s, e, !1), ["dragenter", "dragover"].includes(s) ? t.addEventListener(s, i, !1) : t.addEventListener(s, r, !1);
|
|
7009
|
-
}), t.addEventListener("drop", (s) =>
|
|
7007
|
+
}), t.addEventListener("drop", (s) => yn(s, n), !1);
|
|
7010
7008
|
}
|
|
7011
7009
|
function oo(n) {
|
|
7012
7010
|
n.preventDefault(), n.stopPropagation();
|
|
7013
7011
|
}
|
|
7014
|
-
function
|
|
7012
|
+
function yn(n, t) {
|
|
7015
7013
|
oo(n);
|
|
7016
7014
|
const e = n.dataTransfer ? n.dataTransfer.files : (
|
|
7017
7015
|
/**@type {HTMLInputElement}*/
|
|
@@ -7101,7 +7099,7 @@ class lo extends U {
|
|
|
7101
7099
|
* @onClick Event handler triggered to start drawing on the map.
|
|
7102
7100
|
*/
|
|
7103
7101
|
startDrawing() {
|
|
7104
|
-
|
|
7102
|
+
Ds(this);
|
|
7105
7103
|
}
|
|
7106
7104
|
/**
|
|
7107
7105
|
* @onClick Event handler triggered to discard/stop drawing
|
|
@@ -7126,7 +7124,7 @@ class lo extends U {
|
|
|
7126
7124
|
* @param {DragEvent} evt - The event object from the file input interaction.
|
|
7127
7125
|
*/
|
|
7128
7126
|
handleFilesChange(e) {
|
|
7129
|
-
|
|
7127
|
+
yn(e, this);
|
|
7130
7128
|
}
|
|
7131
7129
|
/**
|
|
7132
7130
|
* @event onModifyEnd triggered when the modification of a shape is completed.
|
|
@@ -7146,11 +7144,12 @@ class lo extends U {
|
|
|
7146
7144
|
}
|
|
7147
7145
|
/**
|
|
7148
7146
|
* Triggers different events when the drawing of a shape is completed.
|
|
7147
|
+
* @param {import("ol/Feature").default} [selectedFeature] - The feature that was selected by the user.
|
|
7149
7148
|
*/
|
|
7150
|
-
emitDrawnFeatures() {
|
|
7151
|
-
eo(this, (
|
|
7152
|
-
this.dispatchEvent(new CustomEvent("drawupdate", { detail:
|
|
7153
|
-
});
|
|
7149
|
+
emitDrawnFeatures(e) {
|
|
7150
|
+
eo(this, (r) => {
|
|
7151
|
+
this.dispatchEvent(new CustomEvent("drawupdate", { detail: r }));
|
|
7152
|
+
}, e);
|
|
7154
7153
|
}
|
|
7155
7154
|
/**
|
|
7156
7155
|
* Overrides createRenderRoot to handle shadow DOM creation based on the noShadow property.
|
|
@@ -7191,7 +7190,7 @@ class lo extends U {
|
|
|
7191
7190
|
<style>
|
|
7192
7191
|
:host { display: block; }
|
|
7193
7192
|
${!this.unstyled && ro}
|
|
7194
|
-
${!this.unstyled &&
|
|
7193
|
+
${!this.unstyled && Ks}
|
|
7195
7194
|
</style>
|
|
7196
7195
|
|
|
7197
7196
|
<!-- Controller Component -->
|