@eox/drawtools 0.10.0 → 0.11.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.
@@ -1,27 +1,27 @@
1
- var At = Object.defineProperty;
2
- var X = (i) => {
1
+ var Et = Object.defineProperty;
2
+ var tt = (i) => {
3
3
  throw TypeError(i);
4
4
  };
5
- var St = (i, t, e) => t in i ? At(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
6
- var m = (i, t, e) => St(i, typeof t != "symbol" ? t + "" : t, e), Y = (i, t, e) => t.has(i) || X("Cannot " + e);
7
- var b = (i, t, e) => (Y(i, t, "read from private field"), e ? e.call(i) : t.get(i)), S = (i, t, e) => t.has(i) ? X("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(i) : t.set(i, e), $ = (i, t, e, r) => (Y(i, t, "write to private field"), r ? r.call(i, e) : t.set(i, e), e);
5
+ var Ht = (i, t, e) => t in i ? Et(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
6
+ var b = (i, t, e) => Ht(i, typeof t != "symbol" ? t + "" : t, e), et = (i, t, e) => t.has(i) || tt("Cannot " + e);
7
+ var y = (i, t, e) => (et(i, t, "read from private field"), e ? e.call(i) : t.get(i)), $ = (i, t, e) => t.has(i) ? tt("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(i) : t.set(i, e), g = (i, t, e, r) => (et(i, t, "write to private field"), r ? r.call(i, e) : t.set(i, e), e);
8
8
  /**
9
9
  * @license
10
10
  * Copyright 2019 Google LLC
11
11
  * SPDX-License-Identifier: BSD-3-Clause
12
12
  */
13
- const D = globalThis, K = D.ShadowRoot && (D.ShadyCSS === void 0 || D.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, yt = Symbol(), tt = /* @__PURE__ */ new WeakMap();
14
- let Et = class {
13
+ const J = globalThis, Y = J.ShadowRoot && (J.ShadyCSS === void 0 || J.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, vt = Symbol(), it = /* @__PURE__ */ new WeakMap();
14
+ let kt = class {
15
15
  constructor(t, e, r) {
16
- if (this._$cssResult$ = !0, r !== yt) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
16
+ if (this._$cssResult$ = !0, r !== vt) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
17
17
  this.cssText = t, this.t = e;
18
18
  }
19
19
  get styleSheet() {
20
20
  let t = this.o;
21
21
  const e = this.t;
22
- if (K && t === void 0) {
22
+ if (Y && t === void 0) {
23
23
  const r = e !== void 0 && e.length === 1;
24
- r && (t = tt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), r && tt.set(e, t));
24
+ r && (t = it.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), r && it.set(e, t));
25
25
  }
26
26
  return t;
27
27
  }
@@ -29,26 +29,26 @@ let Et = class {
29
29
  return this.cssText;
30
30
  }
31
31
  };
32
- const Ct = (i) => new Et(typeof i == "string" ? i : i + "", void 0, yt), Mt = (i, t) => {
33
- if (K) i.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
32
+ const Mt = (i) => new kt(typeof i == "string" ? i : i + "", void 0, vt), Ft = (i, t) => {
33
+ if (Y) i.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
34
34
  else for (const e of t) {
35
- const r = document.createElement("style"), s = D.litNonce;
35
+ const r = document.createElement("style"), s = J.litNonce;
36
36
  s !== void 0 && r.setAttribute("nonce", s), r.textContent = e.cssText, i.appendChild(r);
37
37
  }
38
- }, et = K ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((t) => {
38
+ }, rt = Y ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((t) => {
39
39
  let e = "";
40
40
  for (const r of t.cssRules) e += r.cssText;
41
- return Ct(e);
41
+ return Mt(e);
42
42
  })(i) : i;
43
43
  /**
44
44
  * @license
45
45
  * Copyright 2017 Google LLC
46
46
  * SPDX-License-Identifier: BSD-3-Clause
47
47
  */
48
- const { is: Ft, defineProperty: Ht, getOwnPropertyDescriptor: kt, getOwnPropertyNames: Ut, getOwnPropertySymbols: Ot, getPrototypeOf: Pt } = Object, f = globalThis, it = f.trustedTypes, It = it ? it.emptyScript : "", q = f.reactiveElementPolyfillSupport, U = (i, t) => i, Z = { toAttribute(i, t) {
48
+ const { is: It, defineProperty: Lt, getOwnPropertyDescriptor: Ut, getOwnPropertyNames: Ot, getOwnPropertySymbols: Pt, getPrototypeOf: Nt } = Object, v = globalThis, st = v.trustedTypes, Vt = st ? st.emptyScript : "", G = v.reactiveElementPolyfillSupport, L = (i, t) => i, Q = { toAttribute(i, t) {
49
49
  switch (t) {
50
50
  case Boolean:
51
- i = i ? It : null;
51
+ i = i ? Vt : null;
52
52
  break;
53
53
  case Object:
54
54
  case Array:
@@ -73,23 +73,23 @@ const { is: Ft, defineProperty: Ht, getOwnPropertyDescriptor: kt, getOwnProperty
73
73
  }
74
74
  }
75
75
  return e;
76
- } }, ft = (i, t) => !Ft(i, t), rt = { attribute: !0, type: String, converter: Z, reflect: !1, hasChanged: ft };
77
- Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), f.litPropertyMetadata ?? (f.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
78
- class E extends HTMLElement {
76
+ } }, bt = (i, t) => !It(i, t), nt = { attribute: !0, type: String, converter: Q, reflect: !1, hasChanged: bt };
77
+ Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), v.litPropertyMetadata ?? (v.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
78
+ class C extends HTMLElement {
79
79
  static addInitializer(t) {
80
80
  this._$Ei(), (this.l ?? (this.l = [])).push(t);
81
81
  }
82
82
  static get observedAttributes() {
83
83
  return this.finalize(), this._$Eh && [...this._$Eh.keys()];
84
84
  }
85
- static createProperty(t, e = rt) {
85
+ static createProperty(t, e = nt) {
86
86
  if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
87
87
  const r = Symbol(), s = this.getPropertyDescriptor(t, r, e);
88
- s !== void 0 && Ht(this.prototype, t, s);
88
+ s !== void 0 && Lt(this.prototype, t, s);
89
89
  }
90
90
  }
91
91
  static getPropertyDescriptor(t, e, r) {
92
- const { get: s, set: n } = kt(this.prototype, t) ?? { get() {
92
+ const { get: s, set: n } = Ut(this.prototype, t) ?? { get() {
93
93
  return this[e];
94
94
  }, set(o) {
95
95
  this[e] = o;
@@ -102,17 +102,17 @@ class E extends HTMLElement {
102
102
  }, configurable: !0, enumerable: !0 };
103
103
  }
104
104
  static getPropertyOptions(t) {
105
- return this.elementProperties.get(t) ?? rt;
105
+ return this.elementProperties.get(t) ?? nt;
106
106
  }
107
107
  static _$Ei() {
108
- if (this.hasOwnProperty(U("elementProperties"))) return;
109
- const t = Pt(this);
108
+ if (this.hasOwnProperty(L("elementProperties"))) return;
109
+ const t = Nt(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
- if (this.hasOwnProperty(U("finalized"))) return;
114
- if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(U("properties"))) {
115
- const e = this.properties, r = [...Ut(e), ...Ot(e)];
113
+ if (this.hasOwnProperty(L("finalized"))) return;
114
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(L("properties"))) {
115
+ const e = this.properties, r = [...Ot(e), ...Pt(e)];
116
116
  for (const s of r) this.createProperty(s, e[s]);
117
117
  }
118
118
  const t = this[Symbol.metadata];
@@ -131,8 +131,8 @@ class E extends HTMLElement {
131
131
  const e = [];
132
132
  if (Array.isArray(t)) {
133
133
  const r = new Set(t.flat(1 / 0).reverse());
134
- for (const s of r) e.unshift(et(s));
135
- } else t !== void 0 && e.push(et(t));
134
+ for (const s of r) e.unshift(rt(s));
135
+ } else t !== void 0 && e.push(rt(t));
136
136
  return e;
137
137
  }
138
138
  static _$Eu(t, e) {
@@ -161,7 +161,7 @@ class E extends HTMLElement {
161
161
  }
162
162
  createRenderRoot() {
163
163
  const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
164
- return Mt(t, this.constructor.elementStyles), t;
164
+ return Ft(t, this.constructor.elementStyles), t;
165
165
  }
166
166
  connectedCallback() {
167
167
  var t;
@@ -186,7 +186,7 @@ class E extends HTMLElement {
186
186
  var n;
187
187
  const r = this.constructor.elementProperties.get(t), s = this.constructor._$Eu(t, r);
188
188
  if (s !== void 0 && r.reflect === !0) {
189
- const o = (((n = r.converter) == null ? void 0 : n.toAttribute) !== void 0 ? r.converter : Z).toAttribute(e, r.type);
189
+ const o = (((n = r.converter) == null ? void 0 : n.toAttribute) !== void 0 ? r.converter : Q).toAttribute(e, r.type);
190
190
  this._$Em = t, o == null ? this.removeAttribute(s) : this.setAttribute(s, o), this._$Em = null;
191
191
  }
192
192
  }
@@ -194,13 +194,13 @@ class E extends HTMLElement {
194
194
  var n;
195
195
  const r = this.constructor, s = r._$Eh.get(t);
196
196
  if (s !== void 0 && this._$Em !== s) {
197
- const o = r.getPropertyOptions(s), l = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((n = o.converter) == null ? void 0 : n.fromAttribute) !== void 0 ? o.converter : Z;
197
+ const o = r.getPropertyOptions(s), l = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((n = o.converter) == null ? void 0 : n.fromAttribute) !== void 0 ? o.converter : Q;
198
198
  this._$Em = s, this[s] = l.fromAttribute(e, o.type), this._$Em = null;
199
199
  }
200
200
  }
201
201
  requestUpdate(t, e, r) {
202
202
  if (t !== void 0) {
203
- if (r ?? (r = this.constructor.getPropertyOptions(t)), !(r.hasChanged ?? ft)(this[t], e)) return;
203
+ if (r ?? (r = this.constructor.getPropertyOptions(t)), !(r.hasChanged ?? bt)(this[t], e)) return;
204
204
  this.P(t, e, r);
205
205
  }
206
206
  this.isUpdatePending === !1 && (this._$ES = this._$ET());
@@ -273,76 +273,76 @@ class E extends HTMLElement {
273
273
  firstUpdated(t) {
274
274
  }
275
275
  }
276
- E.elementStyles = [], E.shadowRootOptions = { mode: "open" }, E[U("elementProperties")] = /* @__PURE__ */ new Map(), E[U("finalized")] = /* @__PURE__ */ new Map(), q == null || q({ ReactiveElement: E }), (f.reactiveElementVersions ?? (f.reactiveElementVersions = [])).push("2.0.4");
276
+ C.elementStyles = [], C.shadowRootOptions = { mode: "open" }, C[L("elementProperties")] = /* @__PURE__ */ new Map(), C[L("finalized")] = /* @__PURE__ */ new Map(), G == null || G({ ReactiveElement: C }), (v.reactiveElementVersions ?? (v.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 O = globalThis, j = O.trustedTypes, st = j ? j.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, mt = "$lit$", y = `lit$${Math.random().toFixed(9).slice(2)}$`, bt = "?" + y, Nt = `<${bt}>`, A = document, P = () => A.createComment(""), I = (i) => i === null || typeof i != "object" && typeof i != "function", Q = Array.isArray, Bt = (i) => Q(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", T = `[
283
- \f\r]`, k = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, nt = /-->/g, ot = />/g, v = RegExp(`>|${T}(?:([^\\s"'>=/]+)(${T}*=${T}*(?:[^
284
- \f\r"'\`<>=]|("|')|))|$)`, "g"), at = /'/g, lt = /"/g, $t = /^(?:script|style|textarea|title)$/i, Vt = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), x = Vt(1), F = Symbol.for("lit-noChange"), d = Symbol.for("lit-nothing"), ct = /* @__PURE__ */ new WeakMap(), w = A.createTreeWalker(A, 129);
285
- function vt(i, t) {
286
- if (!Q(i) || !i.hasOwnProperty("raw")) throw Error("invalid template strings array");
287
- return st !== void 0 ? st.createHTML(t) : t;
282
+ const U = globalThis, q = U.trustedTypes, ot = q ? q.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, $t = "$lit$", m = `lit$${Math.random().toFixed(9).slice(2)}$`, wt = "?" + m, Bt = `<${wt}>`, S = document, O = () => S.createComment(""), P = (i) => i === null || typeof i != "object" && typeof i != "function", T = Array.isArray, Rt = (i) => T(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", W = `[
283
+ \f\r]`, I = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, at = /-->/g, lt = />/g, w = RegExp(`>|${W}(?:([^\\s"'>=/]+)(${W}*=${W}*(?:[^
284
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), ct = /'/g, dt = /"/g, _t = /^(?:script|style|textarea|title)$/i, zt = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), x = zt(1), M = Symbol.for("lit-noChange"), h = Symbol.for("lit-nothing"), ht = /* @__PURE__ */ new WeakMap(), _ = S.createTreeWalker(S, 129);
285
+ function xt(i, t) {
286
+ if (!T(i) || !i.hasOwnProperty("raw")) throw Error("invalid template strings array");
287
+ return ot !== void 0 ? ot.createHTML(t) : t;
288
288
  }
289
- const Lt = (i, t) => {
289
+ const jt = (i, t) => {
290
290
  const e = i.length - 1, r = [];
291
- let s, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = k;
291
+ let s, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = I;
292
292
  for (let l = 0; l < e; l++) {
293
293
  const a = i[l];
294
- let h, p, c = -1, u = 0;
295
- for (; u < a.length && (o.lastIndex = u, p = o.exec(a), p !== null); ) u = o.lastIndex, o === k ? p[1] === "!--" ? o = nt : p[1] !== void 0 ? o = ot : p[2] !== void 0 ? ($t.test(p[2]) && (s = RegExp("</" + p[2], "g")), o = v) : p[3] !== void 0 && (o = v) : o === v ? p[0] === ">" ? (o = s ?? k, c = -1) : p[1] === void 0 ? c = -2 : (c = o.lastIndex - p[2].length, h = p[1], o = p[3] === void 0 ? v : p[3] === '"' ? lt : at) : o === lt || o === at ? o = v : o === nt || o === ot ? o = k : (o = v, s = void 0);
296
- const g = o === v && i[l + 1].startsWith("/>") ? " " : "";
297
- n += o === k ? a + Nt : c >= 0 ? (r.push(h), a.slice(0, c) + mt + a.slice(c) + y + g) : a + y + (c === -2 ? l : g);
294
+ let d, p, c = -1, u = 0;
295
+ for (; u < a.length && (o.lastIndex = u, p = o.exec(a), p !== null); ) u = o.lastIndex, o === I ? p[1] === "!--" ? o = at : p[1] !== void 0 ? o = lt : p[2] !== void 0 ? (_t.test(p[2]) && (s = RegExp("</" + p[2], "g")), o = w) : p[3] !== void 0 && (o = w) : o === w ? p[0] === ">" ? (o = s ?? I, c = -1) : p[1] === void 0 ? c = -2 : (c = o.lastIndex - p[2].length, d = p[1], o = p[3] === void 0 ? w : p[3] === '"' ? dt : ct) : o === dt || o === ct ? o = w : o === at || o === lt ? o = I : (o = w, s = void 0);
296
+ const f = o === w && i[l + 1].startsWith("/>") ? " " : "";
297
+ n += o === I ? a + Bt : c >= 0 ? (r.push(d), a.slice(0, c) + $t + a.slice(c) + m + f) : a + m + (c === -2 ? l : f);
298
298
  }
299
- return [vt(i, n + (i[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), r];
299
+ return [xt(i, n + (i[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), r];
300
300
  };
301
301
  class N {
302
302
  constructor({ strings: t, _$litType$: e }, r) {
303
303
  let s;
304
304
  this.parts = [];
305
305
  let n = 0, o = 0;
306
- const l = t.length - 1, a = this.parts, [h, p] = Lt(t, e);
307
- if (this.el = N.createElement(h, r), w.currentNode = this.el.content, e === 2 || e === 3) {
306
+ const l = t.length - 1, a = this.parts, [d, p] = jt(t, e);
307
+ if (this.el = N.createElement(d, r), _.currentNode = this.el.content, e === 2 || e === 3) {
308
308
  const c = this.el.content.firstChild;
309
309
  c.replaceWith(...c.childNodes);
310
310
  }
311
- for (; (s = w.nextNode()) !== null && a.length < l; ) {
311
+ for (; (s = _.nextNode()) !== null && a.length < l; ) {
312
312
  if (s.nodeType === 1) {
313
- if (s.hasAttributes()) for (const c of s.getAttributeNames()) if (c.endsWith(mt)) {
314
- const u = p[o++], g = s.getAttribute(c).split(y), z = /([.?@])?(.*)/.exec(u);
315
- a.push({ type: 1, index: n, name: z[2], strings: g, ctor: z[1] === "." ? zt : z[1] === "?" ? Dt : z[1] === "@" ? jt : J }), s.removeAttribute(c);
316
- } else c.startsWith(y) && (a.push({ type: 6, index: n }), s.removeAttribute(c));
317
- if ($t.test(s.tagName)) {
318
- const c = s.textContent.split(y), u = c.length - 1;
313
+ if (s.hasAttributes()) for (const c of s.getAttributeNames()) if (c.endsWith($t)) {
314
+ const u = p[o++], f = s.getAttribute(c).split(m), j = /([.?@])?(.*)/.exec(u);
315
+ a.push({ type: 1, index: n, name: j[2], strings: f, ctor: j[1] === "." ? qt : j[1] === "?" ? Dt : j[1] === "@" ? Gt : D }), s.removeAttribute(c);
316
+ } else c.startsWith(m) && (a.push({ type: 6, index: n }), s.removeAttribute(c));
317
+ if (_t.test(s.tagName)) {
318
+ const c = s.textContent.split(m), u = c.length - 1;
319
319
  if (u > 0) {
320
- s.textContent = j ? j.emptyScript : "";
321
- for (let g = 0; g < u; g++) s.append(c[g], P()), w.nextNode(), a.push({ type: 2, index: ++n });
322
- s.append(c[u], P());
320
+ s.textContent = q ? q.emptyScript : "";
321
+ for (let f = 0; f < u; f++) s.append(c[f], O()), _.nextNode(), a.push({ type: 2, index: ++n });
322
+ s.append(c[u], O());
323
323
  }
324
324
  }
325
- } else if (s.nodeType === 8) if (s.data === bt) a.push({ type: 2, index: n });
325
+ } else if (s.nodeType === 8) if (s.data === wt) a.push({ type: 2, index: n });
326
326
  else {
327
327
  let c = -1;
328
- for (; (c = s.data.indexOf(y, c + 1)) !== -1; ) a.push({ type: 7, index: n }), c += y.length - 1;
328
+ for (; (c = s.data.indexOf(m, c + 1)) !== -1; ) a.push({ type: 7, index: n }), c += m.length - 1;
329
329
  }
330
330
  n++;
331
331
  }
332
332
  }
333
333
  static createElement(t, e) {
334
- const r = A.createElement("template");
334
+ const r = S.createElement("template");
335
335
  return r.innerHTML = t, r;
336
336
  }
337
337
  }
338
- function H(i, t, e = i, r) {
338
+ function F(i, t, e = i, r) {
339
339
  var o, l;
340
- if (t === F) return t;
340
+ if (t === M) return t;
341
341
  let s = r !== void 0 ? (o = e._$Co) == null ? void 0 : o[r] : e._$Cl;
342
- const n = I(t) ? void 0 : t._$litDirective$;
343
- return (s == null ? void 0 : s.constructor) !== n && ((l = s == null ? void 0 : s._$AO) == null || l.call(s, !1), n === void 0 ? s = void 0 : (s = new n(i), s._$AT(i, e, r)), r !== void 0 ? (e._$Co ?? (e._$Co = []))[r] = s : e._$Cl = s), s !== void 0 && (t = H(i, s._$AS(i, t.values), s, r)), t;
342
+ const n = P(t) ? void 0 : t._$litDirective$;
343
+ return (s == null ? void 0 : s.constructor) !== n && ((l = s == null ? void 0 : s._$AO) == null || l.call(s, !1), n === void 0 ? s = void 0 : (s = new n(i), s._$AT(i, e, r)), r !== void 0 ? (e._$Co ?? (e._$Co = []))[r] = s : e._$Cl = s), s !== void 0 && (t = F(i, s._$AS(i, t.values), s, r)), t;
344
344
  }
345
- class Rt {
345
+ class Jt {
346
346
  constructor(t, e) {
347
347
  this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
348
348
  }
@@ -353,30 +353,30 @@ class Rt {
353
353
  return this._$AM._$AU;
354
354
  }
355
355
  u(t) {
356
- const { el: { content: e }, parts: r } = this._$AD, s = ((t == null ? void 0 : t.creationScope) ?? A).importNode(e, !0);
357
- w.currentNode = s;
358
- let n = w.nextNode(), o = 0, l = 0, a = r[0];
356
+ const { el: { content: e }, parts: r } = this._$AD, s = ((t == null ? void 0 : t.creationScope) ?? S).importNode(e, !0);
357
+ _.currentNode = s;
358
+ let n = _.nextNode(), o = 0, l = 0, a = r[0];
359
359
  for (; a !== void 0; ) {
360
360
  if (o === a.index) {
361
- let h;
362
- a.type === 2 ? h = new R(n, n.nextSibling, this, t) : a.type === 1 ? h = new a.ctor(n, a.name, a.strings, this, t) : a.type === 6 && (h = new Jt(n, this, t)), this._$AV.push(h), a = r[++l];
361
+ let d;
362
+ a.type === 2 ? d = new z(n, n.nextSibling, this, t) : a.type === 1 ? d = new a.ctor(n, a.name, a.strings, this, t) : a.type === 6 && (d = new Wt(n, this, t)), this._$AV.push(d), a = r[++l];
363
363
  }
364
- o !== (a == null ? void 0 : a.index) && (n = w.nextNode(), o++);
364
+ o !== (a == null ? void 0 : a.index) && (n = _.nextNode(), o++);
365
365
  }
366
- return w.currentNode = A, s;
366
+ return _.currentNode = S, s;
367
367
  }
368
368
  p(t) {
369
369
  let e = 0;
370
370
  for (const r of this._$AV) r !== void 0 && (r.strings !== void 0 ? (r._$AI(t, r, e), e += r.strings.length - 2) : r._$AI(t[e])), e++;
371
371
  }
372
372
  }
373
- class R {
373
+ class z {
374
374
  get _$AU() {
375
375
  var t;
376
376
  return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
377
377
  }
378
378
  constructor(t, e, r, s) {
379
- this.type = 2, this._$AH = d, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = r, this.options = s, this._$Cv = (s == null ? void 0 : s.isConnected) ?? !0;
379
+ this.type = 2, this._$AH = h, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = r, this.options = s, this._$Cv = (s == null ? void 0 : s.isConnected) ?? !0;
380
380
  }
381
381
  get parentNode() {
382
382
  let t = this._$AA.parentNode;
@@ -390,7 +390,7 @@ class R {
390
390
  return this._$AB;
391
391
  }
392
392
  _$AI(t, e = this) {
393
- t = H(this, t, e), I(t) ? t === d || t == null || t === "" ? (this._$AH !== d && this._$AR(), this._$AH = d) : t !== this._$AH && t !== F && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Bt(t) ? this.k(t) : this._(t);
393
+ t = F(this, t, e), P(t) ? t === h || t == null || t === "" ? (this._$AH !== h && this._$AR(), this._$AH = h) : t !== this._$AH && t !== M && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Rt(t) ? this.k(t) : this._(t);
394
394
  }
395
395
  O(t) {
396
396
  return this._$AA.parentNode.insertBefore(t, this._$AB);
@@ -399,26 +399,26 @@ class R {
399
399
  this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
400
400
  }
401
401
  _(t) {
402
- this._$AH !== d && I(this._$AH) ? this._$AA.nextSibling.data = t : this.T(A.createTextNode(t)), this._$AH = t;
402
+ this._$AH !== h && P(this._$AH) ? this._$AA.nextSibling.data = t : this.T(S.createTextNode(t)), this._$AH = t;
403
403
  }
404
404
  $(t) {
405
405
  var n;
406
- const { values: e, _$litType$: r } = t, s = typeof r == "number" ? this._$AC(t) : (r.el === void 0 && (r.el = N.createElement(vt(r.h, r.h[0]), this.options)), r);
406
+ const { values: e, _$litType$: r } = t, s = typeof r == "number" ? this._$AC(t) : (r.el === void 0 && (r.el = N.createElement(xt(r.h, r.h[0]), this.options)), r);
407
407
  if (((n = this._$AH) == null ? void 0 : n._$AD) === s) this._$AH.p(e);
408
408
  else {
409
- const o = new Rt(s, this), l = o.u(this.options);
409
+ const o = new Jt(s, this), l = o.u(this.options);
410
410
  o.p(e), this.T(l), this._$AH = o;
411
411
  }
412
412
  }
413
413
  _$AC(t) {
414
- let e = ct.get(t.strings);
415
- return e === void 0 && ct.set(t.strings, e = new N(t)), e;
414
+ let e = ht.get(t.strings);
415
+ return e === void 0 && ht.set(t.strings, e = new N(t)), e;
416
416
  }
417
417
  k(t) {
418
- Q(this._$AH) || (this._$AH = [], this._$AR());
418
+ T(this._$AH) || (this._$AH = [], this._$AR());
419
419
  const e = this._$AH;
420
420
  let r, s = 0;
421
- for (const n of t) s === e.length ? e.push(r = new R(this.O(P()), this.O(P()), this, this.options)) : r = e[s], r._$AI(n), s++;
421
+ for (const n of t) s === e.length ? e.push(r = new z(this.O(O()), this.O(O()), this, this.options)) : r = e[s], r._$AI(n), s++;
422
422
  s < e.length && (this._$AR(r && r._$AB.nextSibling, s), e.length = s);
423
423
  }
424
424
  _$AR(t = this._$AA.nextSibling, e) {
@@ -433,7 +433,7 @@ class R {
433
433
  this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.call(this, t));
434
434
  }
435
435
  }
436
- class J {
436
+ class D {
437
437
  get tagName() {
438
438
  return this.element.tagName;
439
439
  }
@@ -441,46 +441,46 @@ class J {
441
441
  return this._$AM._$AU;
442
442
  }
443
443
  constructor(t, e, r, s, n) {
444
- this.type = 1, this._$AH = d, this._$AN = void 0, this.element = t, this.name = e, this._$AM = s, this.options = n, r.length > 2 || r[0] !== "" || r[1] !== "" ? (this._$AH = Array(r.length - 1).fill(new String()), this.strings = r) : this._$AH = d;
444
+ this.type = 1, this._$AH = h, this._$AN = void 0, this.element = t, this.name = e, this._$AM = s, this.options = n, r.length > 2 || r[0] !== "" || r[1] !== "" ? (this._$AH = Array(r.length - 1).fill(new String()), this.strings = r) : this._$AH = h;
445
445
  }
446
446
  _$AI(t, e = this, r, s) {
447
447
  const n = this.strings;
448
448
  let o = !1;
449
- if (n === void 0) t = H(this, t, e, 0), o = !I(t) || t !== this._$AH && t !== F, o && (this._$AH = t);
449
+ if (n === void 0) t = F(this, t, e, 0), o = !P(t) || t !== this._$AH && t !== M, o && (this._$AH = t);
450
450
  else {
451
451
  const l = t;
452
- let a, h;
453
- for (t = n[0], a = 0; a < n.length - 1; a++) h = H(this, l[r + a], e, a), h === F && (h = this._$AH[a]), o || (o = !I(h) || h !== this._$AH[a]), h === d ? t = d : t !== d && (t += (h ?? "") + n[a + 1]), this._$AH[a] = h;
452
+ let a, d;
453
+ for (t = n[0], a = 0; a < n.length - 1; a++) d = F(this, l[r + a], e, a), d === M && (d = this._$AH[a]), o || (o = !P(d) || d !== this._$AH[a]), d === h ? t = h : t !== h && (t += (d ?? "") + n[a + 1]), this._$AH[a] = d;
454
454
  }
455
455
  o && !s && this.j(t);
456
456
  }
457
457
  j(t) {
458
- t === d ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
458
+ t === h ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
459
459
  }
460
460
  }
461
- class zt extends J {
461
+ class qt extends D {
462
462
  constructor() {
463
463
  super(...arguments), this.type = 3;
464
464
  }
465
465
  j(t) {
466
- this.element[this.name] = t === d ? void 0 : t;
466
+ this.element[this.name] = t === h ? void 0 : t;
467
467
  }
468
468
  }
469
- class Dt extends J {
469
+ class Dt extends D {
470
470
  constructor() {
471
471
  super(...arguments), this.type = 4;
472
472
  }
473
473
  j(t) {
474
- this.element.toggleAttribute(this.name, !!t && t !== d);
474
+ this.element.toggleAttribute(this.name, !!t && t !== h);
475
475
  }
476
476
  }
477
- class jt extends J {
477
+ class Gt extends D {
478
478
  constructor(t, e, r, s, n) {
479
479
  super(t, e, r, s, n), this.type = 5;
480
480
  }
481
481
  _$AI(t, e = this) {
482
- if ((t = H(this, t, e, 0) ?? d) === F) return;
483
- const r = this._$AH, s = t === d && r !== d || t.capture !== r.capture || t.once !== r.once || t.passive !== r.passive, n = t !== d && (r === d || s);
482
+ if ((t = F(this, t, e, 0) ?? h) === M) return;
483
+ const r = this._$AH, s = t === h && r !== h || t.capture !== r.capture || t.once !== r.once || t.passive !== r.passive, n = t !== h && (r === h || s);
484
484
  s && this.element.removeEventListener(this.name, this, r), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
485
485
  }
486
486
  handleEvent(t) {
@@ -488,7 +488,7 @@ class jt extends J {
488
488
  typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
489
489
  }
490
490
  }
491
- class Jt {
491
+ class Wt {
492
492
  constructor(t, e, r) {
493
493
  this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = r;
494
494
  }
@@ -496,17 +496,17 @@ class Jt {
496
496
  return this._$AM._$AU;
497
497
  }
498
498
  _$AI(t) {
499
- H(this, t);
499
+ F(this, t);
500
500
  }
501
501
  }
502
- const G = O.litHtmlPolyfillSupport;
503
- G == null || G(N, R), (O.litHtmlVersions ?? (O.litHtmlVersions = [])).push("3.2.1");
504
- const qt = (i, t, e) => {
502
+ const Z = U.litHtmlPolyfillSupport;
503
+ Z == null || Z(N, z), (U.litHtmlVersions ?? (U.litHtmlVersions = [])).push("3.2.1");
504
+ const Zt = (i, t, e) => {
505
505
  const r = (e == null ? void 0 : e.renderBefore) ?? t;
506
506
  let s = r._$litPart$;
507
507
  if (s === void 0) {
508
508
  const n = (e == null ? void 0 : e.renderBefore) ?? null;
509
- r._$litPart$ = s = new R(t.insertBefore(P(), n), n, void 0, e ?? {});
509
+ r._$litPart$ = s = new z(t.insertBefore(O(), n), n, void 0, e ?? {});
510
510
  }
511
511
  return s._$AI(i), s;
512
512
  };
@@ -515,7 +515,7 @@ const qt = (i, t, e) => {
515
515
  * Copyright 2017 Google LLC
516
516
  * SPDX-License-Identifier: BSD-3-Clause
517
517
  */
518
- class _ extends E {
518
+ class A extends C {
519
519
  constructor() {
520
520
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
521
521
  }
@@ -526,7 +526,7 @@ class _ extends E {
526
526
  }
527
527
  update(t) {
528
528
  const e = this.render();
529
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = qt(e, this.renderRoot, this.renderOptions);
529
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Zt(e, this.renderRoot, this.renderOptions);
530
530
  }
531
531
  connectedCallback() {
532
532
  var t;
@@ -537,21 +537,21 @@ class _ extends E {
537
537
  super.disconnectedCallback(), (t = this._$Do) == null || t.setConnected(!1);
538
538
  }
539
539
  render() {
540
- return F;
540
+ return M;
541
541
  }
542
542
  }
543
- var gt;
544
- _._$litElement$ = !0, _.finalized = !0, (gt = globalThis.litElementHydrateSupport) == null || gt.call(globalThis, { LitElement: _ });
545
- const W = globalThis.litElementPolyfillSupport;
546
- W == null || W({ LitElement: _ });
543
+ var mt;
544
+ A._$litElement$ = !0, A.finalized = !0, (mt = globalThis.litElementHydrateSupport) == null || mt.call(globalThis, { LitElement: A });
545
+ const K = globalThis.litElementPolyfillSupport;
546
+ K == null || K({ LitElement: A });
547
547
  (globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.1.1");
548
548
  /**
549
549
  * @license
550
550
  * Copyright 2017 Google LLC
551
551
  * SPDX-License-Identifier: BSD-3-Clause
552
552
  */
553
- const Tt = (i) => (...t) => ({ _$litDirective$: i, values: t });
554
- let Gt = class {
553
+ const Kt = (i) => (...t) => ({ _$litDirective$: i, values: t });
554
+ let Qt = class {
555
555
  constructor(t) {
556
556
  }
557
557
  get _$AU() {
@@ -572,23 +572,23 @@ let Gt = class {
572
572
  * Copyright 2020 Google LLC
573
573
  * SPDX-License-Identifier: BSD-3-Clause
574
574
  */
575
- const Wt = {}, Zt = (i, t = Wt) => i._$AH = t;
575
+ const Xt = {}, Yt = (i, t = Xt) => i._$AH = t;
576
576
  /**
577
577
  * @license
578
578
  * Copyright 2021 Google LLC
579
579
  * SPDX-License-Identifier: BSD-3-Clause
580
580
  */
581
- const Kt = Tt(class extends Gt {
581
+ const Tt = Kt(class extends Qt {
582
582
  constructor() {
583
- super(...arguments), this.key = d;
583
+ super(...arguments), this.key = h;
584
584
  }
585
585
  render(i, t) {
586
586
  return this.key = i, t;
587
587
  }
588
588
  update(i, [t, e]) {
589
- return t !== this.key && (Zt(i), this.key = t), e;
589
+ return t !== this.key && (Yt(i), this.key = t), e;
590
590
  }
591
- }), Qt = (i) => {
591
+ }), te = (i) => {
592
592
  i.hoverInteraction = i.eoxMap.selectInteractions.selectHover, i.clickInteraction = i.eoxMap.selectInteractions.selectClick;
593
593
  const t = () => {
594
594
  i.requestUpdate();
@@ -600,47 +600,47 @@ const Kt = Tt(class extends Gt {
600
600
  "change",
601
601
  t
602
602
  );
603
- }, Xt = (i, t, e) => {
603
+ }, ee = (i, t, e) => {
604
604
  if (i.clickId === t) return;
605
605
  const r = e ? [] : [t];
606
606
  i.hoverInteraction.highlightById(r);
607
- }, Yt = (i, t) => {
607
+ }, ie = (i, t) => {
608
608
  i.stopPropagation();
609
609
  const e = Number(i.target.getAttribute("index")), r = t.drawnFeatures[e];
610
610
  t.drawLayer.getSource().removeFeature(r), t.drawnFeatures.splice(e, 1), t.requestUpdate();
611
- }, ht = { duration: 750 }, dt = {
611
+ }, pt = { duration: 750 }, ut = {
612
612
  type: "FeatureCollection",
613
613
  features: []
614
- }, te = (i, t) => {
615
- const e = i.get("id"), { clickId: r, drawLayer: s, olMap: n, clickInteraction: o } = t, l = r === e, a = i.getGeometry();
614
+ }, re = (i, t) => {
615
+ const e = i.getId(), { clickId: r, drawLayer: s, olMap: n, clickInteraction: o } = t, l = r === e, a = i.getGeometry();
616
616
  if (l) {
617
- const h = s.getSource().getExtent();
618
- n.getView().fit(h, ht), o.highlightById([]);
617
+ const d = s.getSource().getExtent();
618
+ n.getView().fit(d, pt), o.highlightById([]);
619
619
  } else {
620
- const h = a.getExtent();
621
- o.highlightById([e]), n.getView().fit(h, ht);
620
+ const d = a.getExtent();
621
+ o.highlightById([e]), n.getView().fit(d, pt);
622
622
  }
623
623
  t.requestUpdate();
624
- }, ee = "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;}";
625
- class wt extends _ {
624
+ }, se = "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;}";
625
+ class At extends A {
626
626
  constructor() {
627
627
  super();
628
628
  /**
629
629
  * @type import("../../../map/src/select").EOxSelectInteraction
630
630
  */
631
- m(this, "hoverInteraction");
631
+ b(this, "hoverInteraction");
632
632
  /**
633
633
  * @type import("../../../map/src/select").EOxSelectInteraction
634
634
  */
635
- m(this, "clickInteraction");
635
+ b(this, "clickInteraction");
636
636
  /**
637
637
  * @type string | number
638
638
  */
639
- m(this, "hoverId");
639
+ b(this, "hoverId");
640
640
  /**
641
641
  * @type string | number
642
642
  */
643
- m(this, "clickId");
643
+ b(this, "clickId");
644
644
  this.eoxMap = null, this.olMap = null, this.draw = null, this.drawLayer = null, this.drawnFeatures = [], this.modify = null, this.unstyled = !1;
645
645
  }
646
646
  /**
@@ -649,7 +649,7 @@ class wt extends _ {
649
649
  * @param {Event & { target: HTMLButtonElement }} evt - Event object containing button target.
650
650
  */
651
651
  _handleDelete(e) {
652
- Yt(e, this), this.dispatchEvent(new CustomEvent("changed", { bubbles: !0 }));
652
+ ie(e, this), this.dispatchEvent(new CustomEvent("changed", { bubbles: !0 }));
653
653
  }
654
654
  /**
655
655
  * Handles the selection and deselection of a feature from the list.
@@ -657,21 +657,21 @@ class wt extends _ {
657
657
  * @param {import("ol").Feature} feature - The selected feature.
658
658
  */
659
659
  _handleFeatureSelectAndDeselect(e) {
660
- te(e, this);
660
+ re(e, this);
661
661
  }
662
662
  /**
663
663
  *
664
- * @param {Number} featureId - The ID of the feature to hover.
664
+ * @param {number | string | undefined} featureId - The ID of the feature to hover.
665
665
  * @param {Boolean} mouseOut - Flag indicating mouse out event.
666
666
  */
667
667
  _handleHoverFeature(e, r = !1) {
668
- Xt(this, e, r);
668
+ ee(this, e, r);
669
669
  }
670
670
  /**
671
671
  * Initiates initial settings and event triggers upon the component's first update.
672
672
  */
673
673
  firstUpdated() {
674
- Qt(this);
674
+ te(this);
675
675
  }
676
676
  /**
677
677
  * Overrides createRenderRoot to handle shadow DOM.
@@ -683,16 +683,16 @@ class wt extends _ {
683
683
  var e, r;
684
684
  return this.hoverId = (e = this.hoverInteraction) == null ? void 0 : e.selectedFids[0], this.clickId = (r = this.clickInteraction) == null ? void 0 : r.selectedFids[0], x`
685
685
  <style>
686
- ${!this.unstyled && ee}
686
+ ${!this.unstyled && se}
687
687
  </style>
688
688
  <ul class="list-wrap">
689
689
  ${this.drawnFeatures.map((s, n) => {
690
- const o = n + 1, l = s.get("id"), a = this.hoverId === l, h = this.clickId === l;
691
- return Kt(
690
+ const o = n + 1, l = s.getId(), a = this.hoverId === l, d = this.clickId === l;
691
+ return Tt(
692
692
  o,
693
693
  x`
694
694
  <li
695
- class="${a || h ? "selected" : d}"
695
+ class="${a || d ? "selected" : h}"
696
696
  @mouseover=${() => this._handleHoverFeature(l)}
697
697
  @mouseout=${() => this._handleHoverFeature(l, !0)}
698
698
  >
@@ -717,7 +717,7 @@ class wt extends _ {
717
717
  `;
718
718
  }
719
719
  }
720
- m(wt, "properties", {
720
+ b(At, "properties", {
721
721
  eoxMap: { attribute: !1, state: !0 },
722
722
  olMap: { attribute: !1, state: !0 },
723
723
  draw: { attribute: !1, state: !0 },
@@ -726,12 +726,12 @@ m(wt, "properties", {
726
726
  modify: { attribute: !1, state: !0 },
727
727
  unstyled: { type: Boolean }
728
728
  });
729
- customElements.define("eox-drawtools-list", wt);
730
- const ie = (i) => {
729
+ customElements.define("eox-drawtools-list", At);
730
+ const ne = (i) => {
731
731
  const { multipleFeatures: t, drawnFeatures: e, currentlyDrawing: r } = i, s = !t && (e == null ? void 0 : e.length) > 0 || r, n = !(e != null && e.length) && !r;
732
732
  return { drawDisabled: s, discardDisabled: n };
733
- }, re = 'button,.button { 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):not(.json-editor-btntype-*),.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-btn-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,button[class*="json-editor-btntype-"] { 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,button[class*="json-editor-btntype-"]::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: 0;}', se = '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[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;}';
734
- function ne(i) {
733
+ }, oe = 'button,.button { 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):not(.json-editor-btntype-*),.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-btn-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,button[class*="json-editor-btntype-"] { 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,button[class*="json-editor-btntype-"]::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: 0;}', ae = '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[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;}';
734
+ function le(i) {
735
735
  navigator.clipboard.writeText(i).then(
736
736
  function() {
737
737
  },
@@ -745,29 +745,29 @@ function ne(i) {
745
745
  * Copyright 2021 Google LLC
746
746
  * SPDX-License-Identifier: BSD-3-Clause
747
747
  */
748
- function pt(i, t, e) {
748
+ function yt(i, t, e) {
749
749
  return i ? t(i) : e == null ? void 0 : e(i);
750
750
  }
751
- var B, V;
752
- class xt extends _ {
751
+ var V, B;
752
+ class St extends A {
753
753
  constructor() {
754
754
  super();
755
755
  /**
756
756
  * @type boolean | import("lit").nothing
757
757
  */
758
- S(this, B, !0);
758
+ $(this, V, !0);
759
759
  /**
760
760
  * @type boolean | import("lit").nothing
761
761
  */
762
- S(this, V, !0);
763
- this.multipleFeatures = !1, this.drawnFeatures = [], this.importFeatures = !1, this.showEditor = !1, this.currentlyDrawing = !1, this.drawFunc = null, this.geoJSON = "", this.unstyled = !1;
762
+ $(this, B, !0);
763
+ this.multipleFeatures = !1, this.drawnFeatures = [], this.importFeatures = !1, this.showEditor = !1, this.currentlyDrawing = !1, this.drawFunc = null, this.geoJSON = "", this.unstyled = !1, this.select = !1;
764
764
  }
765
765
  /**
766
766
  * Updates button states based on conditions
767
767
  */
768
768
  updateButtonStates() {
769
- const { drawDisabled: e, discardDisabled: r } = ie(this);
770
- $(this, B, e), $(this, V, r);
769
+ const { drawDisabled: e, discardDisabled: r } = ne(this);
770
+ g(this, V, e), g(this, B, r);
771
771
  }
772
772
  /**
773
773
  * Overrides createRenderRoot to handle shadow DOM
@@ -780,8 +780,8 @@ class xt extends _ {
780
780
  const e = this.currentlyDrawing ? "drawing" : "draw";
781
781
  return x`
782
782
  <style>
783
- ${!this.unstyled && re}
784
- ${!this.unstyled && se}
783
+ ${!this.unstyled && oe}
784
+ ${!this.unstyled && ae}
785
785
  </style>
786
786
  <div class="wrap-btn">
787
787
  <slot></slot>
@@ -789,8 +789,8 @@ class xt extends _ {
789
789
  <!-- Draw Button -->
790
790
  <button
791
791
  data-cy="drawBtn"
792
- class="polygon icon"
793
- ?disabled="${b(this, B) || d}"
792
+ class="${this.select ? "pointer" : "polygon"} icon"
793
+ ?disabled="${y(this, V) || h}"
794
794
  @click="${() => this.drawFunc.start()}"
795
795
  >
796
796
  ${e}
@@ -800,7 +800,7 @@ class xt extends _ {
800
800
  <button
801
801
  data-cy="discardBtn"
802
802
  class="discard icon"
803
- ?disabled="${b(this, V) || d}"
803
+ ?disabled="${y(this, B) || h}"
804
804
  @click="${() => this.drawFunc.discard()}"
805
805
  >
806
806
  discard
@@ -808,7 +808,7 @@ class xt extends _ {
808
808
  </div>
809
809
 
810
810
  <!-- Import Button -->
811
- ${pt(
811
+ ${yt(
812
812
  this.importFeatures,
813
813
  () => x`
814
814
  <!-- Import Input Field : Hidden -->
@@ -832,7 +832,7 @@ class xt extends _ {
832
832
  </div>
833
833
 
834
834
  <!-- Geo JSON Wrapper -->
835
- ${pt(
835
+ ${yt(
836
836
  this.showEditor,
837
837
  () => x`
838
838
  <div class="json-wrapper">
@@ -847,9 +847,9 @@ class xt extends _ {
847
847
  <button
848
848
  data-cy="copyBtn"
849
849
  class="icon-copy"
850
- @click=${() => ne(this.geoJSON)}
850
+ @click=${() => le(this.geoJSON)}
851
851
  >
852
- ${this.unstyled ? "copy" : d}
852
+ ${this.unstyled ? "copy" : h}
853
853
  </button>
854
854
  </div>
855
855
  `
@@ -857,22 +857,26 @@ class xt extends _ {
857
857
  `;
858
858
  }
859
859
  }
860
- B = new WeakMap(), V = new WeakMap(), // Define properties with default values and types
861
- m(xt, "properties", {
860
+ V = new WeakMap(), B = new WeakMap(), // Define properties with default values and types
861
+ b(St, "properties", {
862
862
  multipleFeatures: { attribute: !1, type: Boolean },
863
863
  drawnFeatures: { attribute: !1, state: !0, type: Array },
864
864
  currentlyDrawing: { attribute: !1, state: !0, type: Boolean },
865
865
  drawFunc: { attribute: !1, type: Object },
866
+ select: { type: Boolean },
866
867
  importFeatures: { attribute: "import-features", type: Boolean },
867
868
  showEditor: { attribute: "show-editor", type: Boolean },
868
869
  geoJSON: { attribute: "geo-json", type: String },
869
870
  unstyled: { type: Boolean }
870
871
  });
871
- customElements.define("eox-drawtools-controller", xt);
872
- const oe = `
872
+ customElements.define("eox-drawtools-controller", St);
873
+ const ce = `
873
874
  button.discard:before {
874
875
  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")
875
876
  }
877
+ button.pointer:before {
878
+ content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Ecursor-default-click%3C/title%3E%3Cpath d='M10.76,8.69A0.76,0.76 0 0,0 10,9.45V20.9C10,21.32 10.34,21.66 10.76,21.66C10.95,21.66 11.11,21.6 11.24,21.5L13.15,19.95L14.81,23.57C14.94,23.84 15.21,24 15.5,24C15.61,24 15.72,24 15.83,23.92L18.59,22.64C18.97,22.46 19.15,22 18.95,21.63L17.28,18L19.69,17.55C19.85,17.5 20,17.43 20.12,17.29C20.39,16.97 20.35,16.5 20,16.21L11.26,8.86L11.25,8.87C11.12,8.76 10.95,8.69 10.76,8.69M15,10V8H20V10H15M13.83,4.76L16.66,1.93L18.07,3.34L15.24,6.17L13.83,4.76M10,0H12V5H10V0M3.93,14.66L6.76,11.83L8.17,13.24L5.34,16.07L3.93,14.66M3.93,3.34L5.34,1.93L8.17,4.76L6.76,6.17L3.93,3.34M7,10H2V8H7V10' /%3E%3C/svg%3E");
879
+ }
876
880
  button.polygon:before {
877
881
  content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Eshape-polygon-plus%3C/title%3E%3Cpath d='M17,15.7V13H19V17L10,21L3,14L7,5H11V7H8.3L5.4,13.6L10.4,18.6L17,15.7M22,5V7H19V10H17V7H14V5H17V2H19V5H22Z' /%3E%3C/svg%3E");
878
882
  }
@@ -911,28 +915,29 @@ const oe = `
911
915
  color: white;
912
916
  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")
913
917
  }
914
- `, ae = (i) => {
918
+ `, de = (i) => {
915
919
  (() => {
916
- i.emitDrawnFeatures(), i.multipleFeatures || (i.draw.setActive(!1), i.currentlyDrawing = !1);
920
+ i.emitDrawnFeatures(), i.multipleFeatures || (i.draw.setActive(!1), i.selectionEvents.removeSelectionEvent(), i.currentlyDrawing = !1);
917
921
  })(), i.requestUpdate();
918
- }, le = (i) => {
922
+ }, he = (i) => {
919
923
  const t = () => {
920
- i.drawLayer.set("isDrawingEnabled", !0), i.draw.setActive(!0);
924
+ i.drawLayer.set("isDrawingEnabled", !0), i.draw.setActive(!0), i.selectionEvents.addSelectionEvent();
921
925
  }, e = () => {
922
926
  i.currentlyDrawing = !0, i.requestUpdate();
923
927
  };
924
928
  t(), e();
925
- }, ce = (i) => {
929
+ }, pe = (i) => {
926
930
  let t;
927
931
  return typeof i == "string" ? t = /** @type {HTMLElement} */
928
932
  document.querySelector(i) : t = i, t;
929
- }, ut = (i, t) => {
933
+ }, ft = (i, t) => {
930
934
  var n;
931
- const r = ce(i.for), s = r.map;
935
+ const r = pe(i.for), s = r.map;
932
936
  return i.drawLayer = r.addOrUpdateLayer({
933
937
  type: "Vector",
934
938
  properties: {
935
939
  id: "drawLayer",
940
+ // @ts-expect-error TODO
936
941
  layerControlHide: !0,
937
942
  isDrawingEnabled: !1,
938
943
  multipleFeatures: t
@@ -953,6 +958,7 @@ const oe = `
953
958
  },
954
959
  {
955
960
  type: "select",
961
+ //@ts-expect-error TODO
956
962
  options: {
957
963
  id: "selectHover",
958
964
  condition: "pointermove",
@@ -965,6 +971,7 @@ const oe = `
965
971
  },
966
972
  {
967
973
  type: "select",
974
+ //@ts-expect-error TODO
968
975
  options: {
969
976
  id: "selectClick",
970
977
  condition: "click",
@@ -981,20 +988,98 @@ const oe = `
981
988
  /** @type {unknown} */
982
989
  r.interactions.drawInteraction, i.modify = /** @type {import("ol/interaction").Modify} */
983
990
  /** @type {unknown} */
984
- r.interactions.drawInteractionmodify, (n = i.modify) == null || n.on("modifyend", () => i.onModifyEnd()), r.addEventListener("addfeatures", () => ae(i)), { EoxMap: r, OlMap: s };
985
- }, he = (i) => {
991
+ r.interactions.drawInteractionmodify, X(i, r, i.layerId), (n = i.modify) == null || n.on("modifyend", () => i.onModifyEnd()), r.addEventListener("addfeatures", () => de(i)), { EoxMap: r, OlMap: s };
992
+ }, ue = (i) => {
986
993
  const t = () => {
987
- i.drawnFeatures = [], i.draw.setActive(!1), i.drawLayer.getSource().clear(), i.geoJSON = null;
994
+ i.drawnFeatures = [], setTimeout(() => {
995
+ i.draw.setActive(!1), i.selectionEvents.removeSelectionEvent();
996
+ }, 200), i.drawLayer.getSource().clear(), i.geoJSON = null;
988
997
  }, e = () => {
989
998
  i.emitDrawnFeatures(), i.currentlyDrawing = !1, i.requestUpdate();
990
999
  };
991
1000
  t(), e();
992
- }, de = (i, t) => {
1001
+ }, ye = (i, t) => {
993
1002
  setTimeout(() => {
994
1003
  i.drawnFeatures = i.drawLayer.getSource().getFeatures(), i.updateGeoJSON(), i.requestUpdate(), t();
995
1004
  }, 0);
996
- }, pe = ':root,:host { --spacing: 1rem; --block-spacing-vertical: calc(var(--spacing) * 2); --block-spacing-horizontal: var(--spacing); --background-color: var(--eox-background-color, white); --color: var(--eox-color, #2c3d49); --h-color: var(--eox-h-color, var(--color)); --hover-transparency: var(--eox-hover-transparency, 20%); --bg-hover-transparency: var(--eox-bg-hover-transparency, 40%); --btn-hover-transparency: var(--eox-btn-hover-transparency, 80%); --primary-color: var(--eox-primary-color, #004170); --primary-color-hover: color-mix( in srgb, var(--primary-color) var(--hover-transparency), transparent ); --primary-bg-color-hover: color-mix( in srgb, var(--primary-color) var(--bg-hover-transparency), transparent ); --primary-btn-color-hover: color-mix( in srgb, var(--primary-color) var(--btn-hover-transparency), transparent ); --secondary-color: var(--eox-secondary-color, #c6d4df); --secondary-color-hover: color-mix( in srgb, var(--secondary-color) var(--hover-transparency), transparent ); --secondary-bg-color-hover: color-mix( in srgb, var(--secondary-color) var(--bg-hover-transparency), transparent ); --secondary-btn-color-hover: color-mix( in srgb, var(--secondary-color) var(--btn-hover-transparency), transparent ); --success: var(--eox-success, #26cc0f); --warning: var(--eox-warning, #f18e32); --error: var(--eox-error, #ff5252); --header-font-family: var(--eox-header-font-family, "Roboto", sans-serif); --body-font-family: var(--eox-body-font-family, "Roboto", sans-serif);}* { font-size: normal; font-family: var(--body-font-family); color: var(--eox-color);}h1,h2,h3,h4,h5,h6 { font-family: var(--header-font-family);}span,p,div,main,label { font-family: var(--body-font-family);}@media (min-width: 576px) { .container { max-width: 510px; padding-right: 0; padding-left: 0; --block-spacing-vertical: calc(var(--spacing) * 2.5); }}@media (min-width: 768px) { .container { max-width: 700px; --block-spacing-vertical: calc(var(--spacing) * 3); }}@media (min-width: 992px) { .container { max-width: 920px; --block-spacing-vertical: calc(var(--spacing) * 3.5); }}@media (min-width: 1200px) { .container { max-width: 1130px; --block-spacing-vertical: calc(var(--spacing) * 4); }}.container { width: 100%; margin-right: auto; margin-left: auto; display: block; padding: var(--block-spacing-vertical) var(--block-spacing-horizontal);}h1,h2,h3 { line-height: 120%; margin-top: 0.8rem; margin-bottom: 0.8rem;}p { --font-size: 1rem; font-weight: 400; line-height: 170%; margin-top: 0.8rem; margin-bottom: 1.6rem; font-size: var(--font-size);}body { padding: 0; margin: 0;}.sb-show-main.sb-main-padded { padding: 0;}h1,h2,h3,h4,h5,h6 { --font-weight: 700;}h1 { --font-size: 3rem; --typography-spacing-vertical: 0.5rem;}h2 { --font-size: 2rem; --typography-spacing-vertical: 0.5rem;}h3 { --font-size: 1.75rem; --typography-spacing-vertical: 0.5rem;}h4 { --font-size: 1.5rem; --typography-spacing-vertical: 0.5rem;}h5 { --font-size: 1.25rem; --typography-spacing-vertical: 0.5rem;}h1,h2,h3,h4,h5,h6 { margin-top: 0; margin-bottom: var(--typography-spacing-vertical); color: var(--h-color); font-weight: var(--font-weight); font-size: var(--font-size); font-family: var(--header-font-family);}';
997
- function ue(i, t) {
1005
+ }, fe = (i) => {
1006
+ const t = (s) => {
1007
+ (s == null ? void 0 : s.detail.id) !== "SelectLayerClickInteraction" || !s.detail.feature || (i.drawLayer.getSource().addFeature(s.detail.feature), i.eoxMap.dispatchEvent(
1008
+ new CustomEvent("addfeatures", { detail: s.detail })
1009
+ ));
1010
+ };
1011
+ return { addSelectionEvent: () => {
1012
+ i.layerId && (i.eoxMap.selectInteractions.SelectLayerHoverInteraction.setActive(!0), i.eoxMap.addEventListener("select", t));
1013
+ }, removeSelectionEvent: () => {
1014
+ var n;
1015
+ const s = (n = i.eoxMap.selectInteractions) == null ? void 0 : n.SelectLayerHoverInteraction;
1016
+ s && (s.selectedFids = [], s.setActive(!1)), i.eoxMap.removeEventListener("select", t);
1017
+ } };
1018
+ }, X = (i, t, e) => {
1019
+ if (!e || !t)
1020
+ return;
1021
+ const r = JSON.parse(
1022
+ JSON.stringify(
1023
+ /** @type {import("../../../../map/src/main").EoxLayer} */
1024
+ t.getLayerById(e).get("_jsonDefinition")
1025
+ )
1026
+ ) || null;
1027
+ if (!r) {
1028
+ console.error(`Layer with id ${e} not found`);
1029
+ return;
1030
+ }
1031
+ const s = {
1032
+ type: "select",
1033
+ active: !1,
1034
+ //@ts-expect-error TODO
1035
+ options: {
1036
+ id: "SelectLayerHoverInteraction",
1037
+ condition: "pointermove",
1038
+ active: !1,
1039
+ style: {
1040
+ "fill-color": "rgba(0, 0, 0,0.0)",
1041
+ "stroke-color": "#3399CC",
1042
+ "stroke-width": 2.5
1043
+ }
1044
+ }
1045
+ }, n = {
1046
+ type: "select",
1047
+ //@ts-expect-error TODO
1048
+ options: {
1049
+ id: "SelectLayerClickInteraction",
1050
+ condition: "click",
1051
+ multi: i.multipleFeatures,
1052
+ modify: i.allowModify,
1053
+ active: !1,
1054
+ style: {
1055
+ "fill-color": "rgba(0, 0, 0,0.0)",
1056
+ "stroke-color": "rgba(0, 0, 0,0.0)"
1057
+ }
1058
+ }
1059
+ };
1060
+ r.interactions = [s, n], t.addOrUpdateLayer(r);
1061
+ const o = i.draw;
1062
+ i.draw = t.selectInteractions.SelectLayerClickInteraction, setTimeout(() => {
1063
+ o.setActive(!1), t.selectInteractions.SelectLayerClickInteraction.setActive(!1), t.selectInteractions.SelectLayerHoverInteraction.setActive(!1);
1064
+ }, 200);
1065
+ }, ge = (i, t, e, r) => {
1066
+ if (t) {
1067
+ if (e) {
1068
+ r && e !== r && gt(i, t), X(i, t, e);
1069
+ return;
1070
+ }
1071
+ if (!e && r) {
1072
+ gt(i, t);
1073
+ return;
1074
+ }
1075
+ }
1076
+ };
1077
+ function gt(i, t) {
1078
+ t && (i.discardDrawing(), i.selectionEvents.removeSelectionEvent(), i.draw = /** @type {import("ol/interaction").Draw} */
1079
+ t.interactions.drawInteraction, t.selectInteractions.SelectLayerClickInteraction.remove(), t.selectInteractions.SelectLayerHoverInteraction.remove());
1080
+ }
1081
+ const me = ':root,:host { --spacing: 1rem; --block-spacing-vertical: calc(var(--spacing) * 2); --block-spacing-horizontal: var(--spacing); --background-color: var(--eox-background-color, white); --color: var(--eox-color, #2c3d49); --h-color: var(--eox-h-color, var(--color)); --hover-transparency: var(--eox-hover-transparency, 20%); --bg-hover-transparency: var(--eox-bg-hover-transparency, 40%); --btn-hover-transparency: var(--eox-btn-hover-transparency, 80%); --primary-color: var(--eox-primary-color, #004170); --primary-color-hover: color-mix( in srgb, var(--primary-color) var(--hover-transparency), transparent ); --primary-bg-color-hover: color-mix( in srgb, var(--primary-color) var(--bg-hover-transparency), transparent ); --primary-btn-color-hover: color-mix( in srgb, var(--primary-color) var(--btn-hover-transparency), transparent ); --secondary-color: var(--eox-secondary-color, #c6d4df); --secondary-color-hover: color-mix( in srgb, var(--secondary-color) var(--hover-transparency), transparent ); --secondary-bg-color-hover: color-mix( in srgb, var(--secondary-color) var(--bg-hover-transparency), transparent ); --secondary-btn-color-hover: color-mix( in srgb, var(--secondary-color) var(--btn-hover-transparency), transparent ); --success: var(--eox-success, #26cc0f); --warning: var(--eox-warning, #f18e32); --error: var(--eox-error, #ff5252); --header-font-family: var(--eox-header-font-family, "Roboto", sans-serif); --body-font-family: var(--eox-body-font-family, "Roboto", sans-serif);}* { font-size: normal; font-family: var(--body-font-family); color: var(--eox-color);}h1,h2,h3,h4,h5,h6 { font-family: var(--header-font-family);}span,p,div,main,label { font-family: var(--body-font-family);}@media (min-width: 576px) { .container { max-width: 510px; padding-right: 0; padding-left: 0; --block-spacing-vertical: calc(var(--spacing) * 2.5); }}@media (min-width: 768px) { .container { max-width: 700px; --block-spacing-vertical: calc(var(--spacing) * 3); }}@media (min-width: 992px) { .container { max-width: 920px; --block-spacing-vertical: calc(var(--spacing) * 3.5); }}@media (min-width: 1200px) { .container { max-width: 1130px; --block-spacing-vertical: calc(var(--spacing) * 4); }}.container { width: 100%; margin-right: auto; margin-left: auto; display: block; padding: var(--block-spacing-vertical) var(--block-spacing-horizontal);}h1,h2,h3 { line-height: 120%; margin-top: 0.8rem; margin-bottom: 0.8rem;}p { --font-size: 1rem; font-weight: 400; line-height: 170%; margin-top: 0.8rem; margin-bottom: 1.6rem; font-size: var(--font-size);}body { padding: 0; margin: 0;}.sb-show-main.sb-main-padded { padding: 0;}h1,h2,h3,h4,h5,h6 { --font-weight: 700;}h1 { --font-size: 3rem; --typography-spacing-vertical: 0.5rem;}h2 { --font-size: 2rem; --typography-spacing-vertical: 0.5rem;}h3 { --font-size: 1.75rem; --typography-spacing-vertical: 0.5rem;}h4 { --font-size: 1.5rem; --typography-spacing-vertical: 0.5rem;}h5 { --font-size: 1.25rem; --typography-spacing-vertical: 0.5rem;}h1,h2,h3,h4,h5,h6 { margin-top: 0; margin-bottom: var(--typography-spacing-vertical); color: var(--h-color); font-weight: var(--font-weight); font-size: var(--font-size); font-family: var(--header-font-family);}';
1082
+ function ve(i, t) {
998
1083
  function e(n) {
999
1084
  n.preventDefault(), n.stopPropagation();
1000
1085
  }
@@ -1006,39 +1091,43 @@ function ue(i, t) {
1006
1091
  }
1007
1092
  ["dragenter", "dragover", "dragleave", "drop"].forEach((n) => {
1008
1093
  t.addEventListener(n, e, !1), ["dragenter", "dragover"].includes(n) ? t.addEventListener(n, r, !1) : t.addEventListener(n, s, !1);
1009
- }), t.addEventListener("drop", (n) => _t(n, i), !1);
1094
+ }), t.addEventListener("drop", (n) => Ct(n, i), !1);
1010
1095
  }
1011
- function ge(i) {
1096
+ function be(i) {
1012
1097
  i.preventDefault(), i.stopPropagation();
1013
1098
  }
1014
- function _t(i, t) {
1015
- ge(i);
1099
+ function Ct(i, t) {
1100
+ be(i);
1016
1101
  const e = i.dataTransfer ? i.dataTransfer.files : i.target.files;
1017
- Array.from(e).forEach((r) => ye(r, t));
1102
+ Array.from(e).forEach((r) => $e(r, t));
1018
1103
  }
1019
- function ye(i, t) {
1104
+ function $e(i, t) {
1020
1105
  const e = new FileReader();
1021
1106
  e.readAsText(i), e.onloadend = function() {
1022
1107
  typeof e.result == "string" && t.handleFeatureChange(e.result);
1023
1108
  };
1024
1109
  }
1025
- var C, M, L;
1026
- class fe extends _ {
1110
+ var E, H, R, k;
1111
+ class we extends A {
1027
1112
  constructor() {
1028
1113
  super();
1029
1114
  /**
1030
- * @type import("../../map/main").EOxMap
1115
+ * @type import("../../map/src/main").EOxMap
1031
1116
  */
1032
- S(this, C);
1117
+ $(this, E);
1033
1118
  /**
1034
1119
  * @type import("ol").Map
1035
1120
  */
1036
- S(this, M);
1121
+ $(this, H);
1037
1122
  /**
1038
1123
  * @type string
1039
1124
  */
1040
- S(this, L);
1041
- this.allowModify = !1, this.for = "eox-map", this.currentlyDrawing = !1, this.draw = null, this.drawLayer = null, this.drawnFeatures = [], this.modify = null, this.multipleFeatures = !1, this.importFeatures = !1, this.showEditor = !1, this.showList = !1, this.type = "Polygon", this.unstyled = !1, this.noShadow = !1;
1125
+ $(this, R);
1126
+ /**
1127
+ * @type string
1128
+ */
1129
+ $(this, k);
1130
+ this.allowModify = !1, this.for = "eox-map", this.currentlyDrawing = !1, this.draw = null, this.drawLayer = null, this.layerId = "", this.drawnFeatures = [], this.modify = null, this.multipleFeatures = !1, this.importFeatures = !1, this.showEditor = !1, this.showList = !1, this.type = "Polygon", this.unstyled = !1, this.noShadow = !1, this.selectionEvents = null;
1042
1131
  }
1043
1132
  // Define properties with defaults and types
1044
1133
  static get properties() {
@@ -1048,6 +1137,7 @@ class fe extends _ {
1048
1137
  currentlyDrawing: { attribute: !1, state: !0, type: Boolean },
1049
1138
  draw: { attribute: !1, state: !0 },
1050
1139
  drawLayer: { attribute: !1, state: !0 },
1140
+ layerId: { attribute: "layer-id", type: String },
1051
1141
  drawnFeatures: { attribute: !1, state: !0, type: Array },
1052
1142
  modify: { attribute: !1, state: !0 },
1053
1143
  multipleFeatures: { attribute: "multiple-features", type: Boolean },
@@ -1059,18 +1149,29 @@ class fe extends _ {
1059
1149
  unstyled: { type: Boolean }
1060
1150
  };
1061
1151
  }
1152
+ /**
1153
+ *
1154
+ *
1155
+ * @type {string}
1156
+ */
1157
+ set layerId(e) {
1158
+ ge(this, this.eoxMap, e, y(this, k)), g(this, k, e);
1159
+ }
1160
+ get layerId() {
1161
+ return y(this, k);
1162
+ }
1062
1163
  /**
1063
1164
  * @onClick Event handler triggered to start drawing on the map.
1064
1165
  */
1065
- handleStartDrawing() {
1066
- le(this);
1166
+ startDrawing() {
1167
+ he(this);
1067
1168
  }
1068
1169
  /**
1069
1170
  * @onClick Event handler triggered to discard/stop drawing
1070
1171
  * on the map and delete the drawn shapes.
1071
1172
  */
1072
- handleDiscardDrawing() {
1073
- he(this);
1173
+ discardDrawing() {
1174
+ ue(this);
1074
1175
  }
1075
1176
  /**
1076
1177
  * @param {string} text - The string representation of the features to be parsed.
@@ -1078,8 +1179,9 @@ class fe extends _ {
1078
1179
  */
1079
1180
  handleFeatureChange(e, r = !1) {
1080
1181
  this.eoxMap.parseTextToFeature(
1081
- e || JSON.stringify(dt),
1182
+ e || JSON.stringify(ut),
1082
1183
  this.drawLayer,
1184
+ this.eoxMap,
1083
1185
  r
1084
1186
  );
1085
1187
  }
@@ -1087,7 +1189,7 @@ class fe extends _ {
1087
1189
  * @param {DragEvent | Event} evt - The event object from the file input interaction.
1088
1190
  */
1089
1191
  handleFilesChange(e) {
1090
- _t(e, this);
1192
+ Ct(e, this);
1091
1193
  }
1092
1194
  /**
1093
1195
  * @event onModifyEnd triggered when the modification of a shape is completed.
@@ -1099,8 +1201,8 @@ class fe extends _ {
1099
1201
  * Update #geoJSON with stringify feature.
1100
1202
  */
1101
1203
  updateGeoJSON() {
1102
- $(this, L, JSON.stringify(
1103
- this.eoxMap.parseFeature(this.drawnFeatures) || dt,
1204
+ g(this, R, JSON.stringify(
1205
+ this.eoxMap.parseFeature(this.drawnFeatures) || ut,
1104
1206
  void 0,
1105
1207
  2
1106
1208
  ));
@@ -1109,7 +1211,7 @@ class fe extends _ {
1109
1211
  * Triggers different events when the drawing of a shape is completed.
1110
1212
  */
1111
1213
  emitDrawnFeatures() {
1112
- de(this, () => {
1214
+ ye(this, () => {
1113
1215
  this.dispatchEvent(
1114
1216
  new CustomEvent("drawupdate", { detail: this.drawnFeatures })
1115
1217
  );
@@ -1127,21 +1229,21 @@ class fe extends _ {
1127
1229
  * It then calls requestUpdate to trigger a re-render.
1128
1230
  */
1129
1231
  firstUpdated() {
1130
- const { EoxMap: e, OlMap: r } = ut(this, this.multipleFeatures);
1131
- this.eoxMap = e, $(this, M, r), this.importFeatures && ue(this, this.eoxMap), this.updateGeoJSON(), this.requestUpdate();
1232
+ const { EoxMap: e, OlMap: r } = ft(this, this.multipleFeatures);
1233
+ this.eoxMap = e, g(this, H, r), this.selectionEvents = fe(this), this.importFeatures && ve(this, this.eoxMap), this.updateGeoJSON(), this.requestUpdate();
1132
1234
  }
1133
1235
  updated(e) {
1134
1236
  if (e.has("for")) {
1135
- const { EoxMap: r, OlMap: s } = ut(this, this.multipleFeatures);
1136
- this.eoxMap = r, $(this, M, s);
1237
+ const { EoxMap: r, OlMap: s } = ft(this, this.multipleFeatures);
1238
+ this.eoxMap = r, g(this, H, s);
1137
1239
  }
1138
1240
  }
1139
1241
  get eoxMap() {
1140
- return b(this, C);
1242
+ return y(this, E);
1141
1243
  }
1142
1244
  set eoxMap(e) {
1143
- const r = b(this, C);
1144
- $(this, C, e), this.requestUpdate("eoxMap", r);
1245
+ const r = y(this, E);
1246
+ g(this, E, e), this.requestUpdate("eoxMap", r);
1145
1247
  }
1146
1248
  // Render method for UI display
1147
1249
  render() {
@@ -1149,31 +1251,32 @@ class fe extends _ {
1149
1251
  return x`
1150
1252
  <style>
1151
1253
  :host { display: block; }
1152
- ${!this.unstyled && pe}
1153
- ${!this.unstyled && oe}
1254
+ ${!this.unstyled && me}
1255
+ ${!this.unstyled && ce}
1154
1256
  </style>
1155
1257
 
1156
1258
  <!-- Controller Component -->
1157
1259
  <eox-drawtools-controller
1158
1260
  .drawFunc=${{
1159
- start: () => this.handleStartDrawing(),
1160
- discard: () => this.handleDiscardDrawing(),
1261
+ start: () => this.startDrawing(),
1262
+ discard: () => this.discardDrawing(),
1161
1263
  editor: (r) => this.handleFeatureChange(r.target.value, !0),
1162
1264
  import: (r) => this.handleFilesChange(r)
1163
1265
  }}
1266
+ ?select=${!!this.layerId}
1164
1267
  .unstyled=${this.unstyled}
1165
1268
  .drawnFeatures=${this.drawnFeatures}
1166
1269
  .currentlyDrawing=${this.currentlyDrawing}
1167
1270
  .multipleFeatures=${this.multipleFeatures}
1168
1271
  .importFeatures=${this.importFeatures}
1169
1272
  .showEditor=${this.showEditor}
1170
- .geoJSON=${b(this, L)}
1273
+ .geoJSON=${y(this, R)}
1171
1274
  ></eox-drawtools-controller>
1172
1275
 
1173
1276
  <!-- List Component -->
1174
1277
  ${this.showList && ((e = this.drawnFeatures) != null && e.length) ? x`<eox-drawtools-list
1175
1278
  .eoxMap=${this.eoxMap}
1176
- .olMap=${b(this, M)}
1279
+ .olMap=${y(this, H)}
1177
1280
  .draw=${this.draw}
1178
1281
  .drawLayer=${this.drawLayer}
1179
1282
  .drawnFeatures=${this.drawnFeatures}
@@ -1182,12 +1285,12 @@ class fe extends _ {
1182
1285
  @changed=${() => {
1183
1286
  this.updateGeoJSON(), this.requestUpdate();
1184
1287
  }}
1185
- ></eox-drawtools-list>` : d}
1288
+ ></eox-drawtools-list>` : h}
1186
1289
  `;
1187
1290
  }
1188
1291
  }
1189
- C = new WeakMap(), M = new WeakMap(), L = new WeakMap();
1190
- customElements.define("eox-drawtools", fe);
1292
+ E = new WeakMap(), H = new WeakMap(), R = new WeakMap(), k = new WeakMap();
1293
+ customElements.define("eox-drawtools", we);
1191
1294
  export {
1192
- fe as EOxDrawTools
1295
+ we as EOxDrawTools
1193
1296
  };