@edugis-org/webmapx 0.1.16 → 0.2.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.
Files changed (43) hide show
  1. package/dist-lib/{alert-C_G5X6J8.js → alert-CM5EIQzP.js} +28 -30
  2. package/dist-lib/{attribution-format-B4f05_u0.js → attribution-format-CZg2WjHO.js} +1 -1
  3. package/dist-lib/{button-BlZd3WPH.js → button-B_8TR-jN.js} +34 -38
  4. package/dist-lib/{checkbox-DB4oPyyw.js → checkbox-DOopjfpt.js} +25 -29
  5. package/dist-lib/{chunk.36O46B5H-km1dakSW.js → chunk.36O46B5H-EYkf8iaY.js} +8 -8
  6. package/dist-lib/{chunk.3RPBFEDE-Cxq6VVR6.js → chunk.3RPBFEDE-DC091CnT.js} +1 -1
  7. package/dist-lib/{chunk.5JY5FUCG-CYkzbQXS.js → chunk.5JY5FUCG-BmZ-LXEt.js} +324 -306
  8. package/dist-lib/{chunk.AJ3ENQ5C-DXVGX5Dn.js → chunk.AJ3ENQ5C-BhSO747I.js} +22 -25
  9. package/dist-lib/chunk.NYIIDP5N-DoNij0Gf.js +99 -0
  10. package/dist-lib/{chunk.SI4ACBFK-CLb9VfMG.js → chunk.SI4ACBFK-CdJVQctt.js} +1 -1
  11. package/dist-lib/{chunk.YHLNUJ7P-ByKy0MKm.js → chunk.YHLNUJ7P-DINaI4pI.js} +22 -24
  12. package/dist-lib/{decorate-CKr8yG1g.js → decorate-DNmmPsJp.js} +1 -1
  13. package/dist-lib/decorators-d8E4nZJy.js +624 -0
  14. package/dist-lib/{divider-BOFbR_Ny.js → divider-Ly2UhLd1.js} +6 -7
  15. package/dist-lib/{icon-CBNpO1lq.js → icon-DIjRqLFJ.js} +1 -1
  16. package/dist-lib/{icon-button-B5rXu3Gg.js → icon-button-C5K3NZWf.js} +39 -42
  17. package/dist-lib/{input-B212BH6L.js → input-DUaeAHt8.js} +63 -49
  18. package/dist-lib/{option-BQN9Zz_8.js → option-LnK7BxuV.js} +56 -59
  19. package/dist-lib/{spinner-DdcBaa3z.js → spinner-D_cltutw.js} +2 -2
  20. package/dist-lib/{toast-Bq2PmEpm.js → toast-DDqkINxT.js} +1 -1
  21. package/dist-lib/{tooltip-CBGOiZwJ.js → tooltip-C86FhPFx.js} +26 -27
  22. package/dist-lib/{webmapx-3d-tool-CKoLGMpk.js → webmapx-3d-tool-DXzN9Tha.js} +6 -7
  23. package/dist-lib/{webmapx-base-tool-Bc9Wz0yA.js → webmapx-base-tool-idjVnrFA.js} +8 -8
  24. package/dist-lib/{webmapx-config-edit-tool-7265_DNz.js → webmapx-config-edit-tool-B14KD1ak.js} +21 -22
  25. package/dist-lib/{webmapx-coordinates-tool-CI6NSE3t.js → webmapx-coordinates-tool-D57LfNy6.js} +25 -26
  26. package/dist-lib/{webmapx-core-bundle-Q6mWOib1.js → webmapx-core-bundle-C4M7AiLh.js} +726 -723
  27. package/dist-lib/{webmapx-draw-tool-6QRr5Gip.js → webmapx-draw-tool-utv2v3LN.js} +345 -325
  28. package/dist-lib/{webmapx-geolocation-tool-qxN5aaVB.js → webmapx-geolocation-tool-BIEqZkMX.js} +27 -28
  29. package/dist-lib/{webmapx-import-layer-tool-tJ374qHR.js → webmapx-import-layer-tool-DcFxtRJN.js} +18 -19
  30. package/dist-lib/{webmapx-info-tool-C3txgv3v.js → webmapx-info-tool-DDrllfth.js} +69 -70
  31. package/dist-lib/{webmapx-language-osmvector-jQzTOPU1.js → webmapx-language-osmvector-D_OP-fC3.js} +8 -9
  32. package/dist-lib/{webmapx-measure-tool-Cxxrzgdf.js → webmapx-measure-tool-D-6STy8v.js} +33 -34
  33. package/dist-lib/{webmapx-modal-tool-DQVHNXqX.js → webmapx-modal-tool-CftNio2w.js} +10 -10
  34. package/dist-lib/{webmapx-plugin-tool-BNZ61x6s.js → webmapx-plugin-tool-CGwliIUs.js} +5 -6
  35. package/dist-lib/{webmapx-print-tool-BDOTbS6u.js → webmapx-print-tool-DVL_0Hqz.js} +55 -56
  36. package/dist-lib/{webmapx-search-tool-CHlsE2Wx.js → webmapx-search-tool-D6y6WT8q.js} +13 -14
  37. package/dist-lib/{webmapx-settings-B0AT9Vjn.js → webmapx-settings--mFVPZsD.js} +41 -45
  38. package/dist-lib/{webmapx-truearea-tool-dxSgcbOj.js → webmapx-truearea-tool-nQzVCTAC.js} +31 -32
  39. package/dist-lib/{webmapx-view-mode-tool-DVSMakdh.js → webmapx-view-mode-tool-CQI54rFj.js} +11 -12
  40. package/dist-lib/webmapx.css +1 -1
  41. package/dist-lib/webmapx.js +18 -18
  42. package/package.json +1 -1
  43. package/dist-lib/chunk.NYIIDP5N-B4UCI-rQ.js +0 -34
@@ -1,18 +1,14 @@
1
- import { a as e, i as t, n, r } from "./chunk.YHLNUJ7P-ByKy0MKm.js";
2
- import { c as i, d as a, l as o, r as s, s as c, t as l, u } from "./decorate-CKr8yG1g.js";
3
- import { t as d } from "./chunk.NYIIDP5N-B4UCI-rQ.js";
4
- import { t as f } from "./chunk.3RPBFEDE-Cxq6VVR6.js";
5
- import { n as p } from "./input-B212BH6L.js";
6
- import { t as m } from "./chunk.SI4ACBFK-CLb9VfMG.js";
7
- import "./divider-BOFbR_Ny.js";
8
- import "./option-BQN9Zz_8.js";
9
- import { LitElement as h, css as g, html as _ } from "lit";
10
- import { customElement as v, property as y, query as b, state as x } from "lit/decorators.js";
11
- import { classMap as S } from "lit/directives/class-map.js";
12
- import { ifDefined as C } from "lit/directives/if-defined.js";
13
- import { live as w } from "lit/directives/live.js";
1
+ import { a as e, i as t, o as n, s as r } from "./chunk.YHLNUJ7P-DINaI4pI.js";
2
+ import { a as i, h as a, i as o, n as s, o as c, p as l, s as u } from "./decorators-d8E4nZJy.js";
3
+ import { c as d, d as f, l as p, r as m, s as h, t as g, u as _ } from "./decorate-DNmmPsJp.js";
4
+ import { a as v, n as y, t as b } from "./chunk.NYIIDP5N-DoNij0Gf.js";
5
+ import { t as x } from "./chunk.3RPBFEDE-DC091CnT.js";
6
+ import { n as S, r as C } from "./input-DUaeAHt8.js";
7
+ import { t as w } from "./chunk.SI4ACBFK-CdJVQctt.js";
8
+ import "./divider-Ly2UhLd1.js";
9
+ import "./option-LnK7BxuV.js";
14
10
  //#region node_modules/@shoelace-style/shoelace/dist/chunks/chunk.EU44RQUN.js
15
- var T = g`
11
+ var T = a`
16
12
  :host {
17
13
  display: inline-block;
18
14
  }
@@ -177,13 +173,13 @@ var T = g`
177
173
  background-color: ButtonText;
178
174
  }
179
175
  }
180
- `, E = class extends n {
176
+ `, E = class extends t {
181
177
  constructor() {
182
- super(...arguments), this.formControlController = new f(this, {
178
+ super(...arguments), this.formControlController = new x(this, {
183
179
  value: (e) => e.checked ? e.value || "on" : void 0,
184
180
  defaultValue: (e) => e.defaultChecked,
185
181
  setValue: (e, t) => e.checked = t
186
- }), this.hasSlotController = new d(this, "help-text"), this.hasFocus = !1, this.title = "", this.name = "", this.size = "medium", this.disabled = !1, this.checked = !1, this.defaultChecked = !1, this.form = "", this.required = !1, this.helpText = "";
182
+ }), this.hasSlotController = new b(this, "help-text"), this.hasFocus = !1, this.title = "", this.name = "", this.size = "medium", this.disabled = !1, this.checked = !1, this.defaultChecked = !1, this.form = "", this.required = !1, this.helpText = "";
187
183
  }
188
184
  get validity() {
189
185
  return this.input.validity;
@@ -241,9 +237,9 @@ var T = g`
241
237
  }
242
238
  render() {
243
239
  let e = this.hasSlotController.test("help-text"), t = this.helpText ? !0 : !!e;
244
- return _`
240
+ return l`
245
241
  <div
246
- class=${S({
242
+ class=${v({
247
243
  "form-control": !0,
248
244
  "form-control--small": this.size === "small",
249
245
  "form-control--medium": this.size === "medium",
@@ -253,7 +249,7 @@ var T = g`
253
249
  >
254
250
  <label
255
251
  part="base"
256
- class=${S({
252
+ class=${v({
257
253
  switch: !0,
258
254
  "switch--checked": this.checked,
259
255
  "switch--disabled": this.disabled,
@@ -268,8 +264,8 @@ var T = g`
268
264
  type="checkbox"
269
265
  title=${this.title}
270
266
  name=${this.name}
271
- value=${C(this.value)}
272
- .checked=${w(this.checked)}
267
+ value=${y(this.value)}
268
+ .checked=${S(this.checked)}
273
269
  .disabled=${this.disabled}
274
270
  .required=${this.required}
275
271
  role="switch"
@@ -307,27 +303,27 @@ var T = g`
307
303
  //#endregion
308
304
  //#region node_modules/@shoelace-style/shoelace/dist/chunks/chunk.IADS735N.js
309
305
  E.styles = [
310
- r,
311
- m,
306
+ e,
307
+ w,
312
308
  T
313
- ], e([b("input[type=\"checkbox\"]")], E.prototype, "input", 2), e([x()], E.prototype, "hasFocus", 2), e([y()], E.prototype, "title", 2), e([y()], E.prototype, "name", 2), e([y()], E.prototype, "value", 2), e([y({ reflect: !0 })], E.prototype, "size", 2), e([y({
309
+ ], r([s("input[type=\"checkbox\"]")], E.prototype, "input", 2), r([o()], E.prototype, "hasFocus", 2), r([i()], E.prototype, "title", 2), r([i()], E.prototype, "name", 2), r([i()], E.prototype, "value", 2), r([i({ reflect: !0 })], E.prototype, "size", 2), r([i({
314
310
  type: Boolean,
315
311
  reflect: !0
316
- })], E.prototype, "disabled", 2), e([y({
312
+ })], E.prototype, "disabled", 2), r([i({
317
313
  type: Boolean,
318
314
  reflect: !0
319
- })], E.prototype, "checked", 2), e([p("checked")], E.prototype, "defaultChecked", 2), e([y({ reflect: !0 })], E.prototype, "form", 2), e([y({
315
+ })], E.prototype, "checked", 2), r([C("checked")], E.prototype, "defaultChecked", 2), r([i({ reflect: !0 })], E.prototype, "form", 2), r([i({
320
316
  type: Boolean,
321
317
  reflect: !0
322
- })], E.prototype, "required", 2), e([y({ attribute: "help-text" })], E.prototype, "helpText", 2), e([t("checked", { waitUntilFirstUpdate: !0 })], E.prototype, "handleCheckedChange", 1), e([t("disabled", { waitUntilFirstUpdate: !0 })], E.prototype, "handleDisabledChange", 1), E.define("sl-switch");
318
+ })], E.prototype, "required", 2), r([i({ attribute: "help-text" })], E.prototype, "helpText", 2), r([n("checked", { waitUntilFirstUpdate: !0 })], E.prototype, "handleCheckedChange", 1), r([n("disabled", { waitUntilFirstUpdate: !0 })], E.prototype, "handleDisabledChange", 1), E.define("sl-switch");
323
319
  //#endregion
324
320
  //#region src/components/webmapx-settings.ts
325
- var D = class extends h {
321
+ var D = class extends u {
326
322
  constructor(...e) {
327
- super(...e), this.darkMode = !1, this.apiKey = "", this.currentAdapter = u, this.availableAdapters = [];
323
+ super(...e), this.darkMode = !1, this.apiKey = "", this.currentAdapter = _, this.availableAdapters = [];
328
324
  }
329
325
  static {
330
- this.styles = g`
326
+ this.styles = a`
331
327
  :host {
332
328
  display: block;
333
329
  padding: 1rem;
@@ -373,25 +369,25 @@ var D = class extends h {
373
369
  }
374
370
  loadSettings() {
375
371
  let e = localStorage.getItem("webmapx-theme");
376
- e ? this.darkMode = e === "dark" : this.darkMode = window.matchMedia("(prefers-color-scheme: dark)").matches, this.applyTheme(), this.apiKey = localStorage.getItem("webmapx-api-key") || "", this.availableAdapters = a().filter((e) => ![
372
+ e ? this.darkMode = e === "dark" : this.darkMode = window.matchMedia("(prefers-color-scheme: dark)").matches, this.applyTheme(), this.apiKey = localStorage.getItem("webmapx-api-key") || "", this.availableAdapters = f().filter((e) => ![
377
373
  "ol",
378
374
  "l",
379
375
  "c"
380
376
  ].includes(e)), this.currentAdapter = this.detectCurrentAdapter();
381
377
  }
382
378
  getMapStorageKey(e, t) {
383
- return c(e.id, t);
379
+ return h(e.id, t);
384
380
  }
385
381
  detectCurrentAdapter() {
386
- let e = s(this);
387
- if (!e) return u;
388
- let t = this.getMapStorageKey(e, "adapter"), n = o({
382
+ let e = m(this);
383
+ if (!e) return _;
384
+ let t = this.getMapStorageKey(e, "adapter"), n = p({
389
385
  explicitAdapter: e.getAttribute("adapter") ?? e.getAttribute("type"),
390
386
  savedAdapter: t ? localStorage.getItem(t) : null,
391
387
  configuredAdapter: e.mapConfig?.type ?? null,
392
- defaultAdapter: u
388
+ defaultAdapter: _
393
389
  });
394
- return this.availableAdapters.includes(n) ? n : u;
390
+ return this.availableAdapters.includes(n) ? n : _;
395
391
  }
396
392
  applyTheme() {
397
393
  let e = document.documentElement;
@@ -414,15 +410,15 @@ var D = class extends h {
414
410
  }));
415
411
  }
416
412
  handleAdapterChange(e) {
417
- let t = e.target, n = i(t.value);
413
+ let t = e.target, n = d(t.value);
418
414
  if (!n || n === this.currentAdapter) return;
419
- let r = s(this);
415
+ let r = m(this);
420
416
  if (!r) {
421
417
  console.error("[webmapx-settings] No <webmapx-map> found for adapter switching.");
422
418
  return;
423
419
  }
424
- let a = this.getMapStorageKey(r, "adapter");
425
- r.saveState?.(), a && localStorage.setItem(a, n), window.location.reload();
420
+ let i = this.getMapStorageKey(r, "adapter");
421
+ r.saveState?.(), i && localStorage.setItem(i, n), window.location.reload();
426
422
  }
427
423
  formatAdapterName(e) {
428
424
  return {
@@ -433,7 +429,7 @@ var D = class extends h {
433
429
  }[e] || e;
434
430
  }
435
431
  render() {
436
- return _`
432
+ return l`
437
433
  <div class="setting-group">
438
434
  <h4>Map Engine</h4>
439
435
  <sl-select
@@ -441,7 +437,7 @@ var D = class extends h {
441
437
  value=${this.currentAdapter}
442
438
  @sl-change=${this.handleAdapterChange}
443
439
  >
444
- ${this.availableAdapters.map((e) => _`
440
+ ${this.availableAdapters.map((e) => l`
445
441
  <sl-option value=${e}>
446
442
  ${this.formatAdapterName(e)}
447
443
  </sl-option>
@@ -477,6 +473,6 @@ var D = class extends h {
477
473
  `;
478
474
  }
479
475
  };
480
- l([x()], D.prototype, "darkMode", void 0), l([x()], D.prototype, "apiKey", void 0), l([x()], D.prototype, "currentAdapter", void 0), l([x()], D.prototype, "availableAdapters", void 0), D = l([v("webmapx-settings")], D);
476
+ g([o()], D.prototype, "darkMode", void 0), g([o()], D.prototype, "apiKey", void 0), g([o()], D.prototype, "currentAdapter", void 0), g([o()], D.prototype, "availableAdapters", void 0), D = g([c("webmapx-settings")], D);
481
477
  //#endregion
482
478
  export { D as WebmapxSettings };
@@ -1,8 +1,7 @@
1
- import { r as e, t } from "./decorate-CKr8yG1g.js";
2
- import { t as n } from "./esm-CTuscnN5.js";
3
- import { t as r } from "./webmapx-modal-tool-DQVHNXqX.js";
4
- import { css as i, html as a } from "lit";
5
- import { customElement as o, state as s } from "lit/decorators.js";
1
+ import { h as e, i as t, o as n, p as r } from "./decorators-d8E4nZJy.js";
2
+ import { r as i, t as a } from "./decorate-DNmmPsJp.js";
3
+ import { t as o } from "./esm-CTuscnN5.js";
4
+ import { t as s } from "./webmapx-modal-tool-CftNio2w.js";
6
5
  //#region node_modules/@turf/bearing/node_modules/@turf/helpers/dist/esm/index.js
7
6
  var c = 6371008.8;
8
7
  c * 100, c * 100, 360 / (2 * Math.PI), c * 3.28084, c * 39.37, c / 1e3, c / 1e3, c / 1609.344, c * 1e3, c * 1e3, c / 1852, c * 1.0936;
@@ -138,31 +137,31 @@ function P(e, t) {
138
137
  }
139
138
  return j(t);
140
139
  }
141
- function F(e, t, r) {
142
- let i = {
140
+ function F(e, t, n) {
141
+ let r = {
143
142
  type: "Feature",
144
143
  geometry: {
145
144
  type: "Point",
146
- coordinates: r
145
+ coordinates: n
147
146
  },
148
147
  properties: {}
149
- }, a = (e) => {
150
- let r = {
148
+ }, i = (e) => {
149
+ let n = {
151
150
  type: "Feature",
152
151
  geometry: {
153
152
  type: "Point",
154
153
  coordinates: e
155
154
  },
156
155
  properties: {}
157
- }, a = m(i, r);
158
- return T(i, n(i, r, { units: "kilometers" }), a + t, { units: "kilometers" }).geometry.coordinates;
159
- }, o = (e) => e.map(a);
156
+ }, i = m(r, n);
157
+ return T(r, o(r, n, { units: "kilometers" }), i + t, { units: "kilometers" }).geometry.coordinates;
158
+ }, a = (e) => e.map(i);
160
159
  return e.type === "Polygon" ? {
161
160
  type: "Polygon",
162
- coordinates: e.coordinates.map(o)
161
+ coordinates: e.coordinates.map(a)
163
162
  } : e.type === "MultiPolygon" ? {
164
163
  type: "MultiPolygon",
165
- coordinates: e.coordinates.map((e) => e.map(o))
164
+ coordinates: e.coordinates.map((e) => e.map(a))
166
165
  } : e;
167
166
  }
168
167
  function I(e, t, n, r) {
@@ -179,15 +178,15 @@ function I(e, t, n, r) {
179
178
  } : e;
180
179
  }
181
180
  function L(e, t) {
182
- let r = {
181
+ let n = {
183
182
  type: "Feature",
184
183
  geometry: {
185
184
  type: "Point",
186
185
  coordinates: t
187
186
  },
188
187
  properties: {}
189
- }, i = (e) => e.map((e) => ({
190
- bearing: m(r, {
188
+ }, r = (e) => e.map((e) => ({
189
+ bearing: m(n, {
191
190
  type: "Feature",
192
191
  geometry: {
193
192
  type: "Point",
@@ -195,7 +194,7 @@ function L(e, t) {
195
194
  },
196
195
  properties: {}
197
196
  }),
198
- distance: n(r, {
197
+ distance: o(n, {
199
198
  type: "Feature",
200
199
  geometry: {
201
200
  type: "Point",
@@ -204,7 +203,7 @@ function L(e, t) {
204
203
  properties: {}
205
204
  }, { units: "kilometers" })
206
205
  }));
207
- return e.type === "Polygon" ? e.coordinates.map(i) : e.type === "MultiPolygon" ? e.coordinates.flat().map(i) : [];
206
+ return e.type === "Polygon" ? e.coordinates.map(r) : e.type === "MultiPolygon" ? e.coordinates.flat().map(r) : [];
208
207
  }
209
208
  function R(e, t, n) {
210
209
  let r = {
@@ -223,7 +222,7 @@ function R(e, t, n) {
223
222
  coordinates: e.coordinates.map((e) => e.map(() => a()))
224
223
  } : e;
225
224
  }
226
- var z = class extends r {
225
+ var z = class extends s {
227
226
  constructor(...e) {
228
227
  super(...e), this.toolId = "truearea", this.mapElement = null, this.availableLayers = [], this.selectedLayerId = "", this.copies = [], this.dragging = !1, this.lastTouchedCopyId = null, this.rotationDeg = 0, this.geodesic = !0, this.copyMeta = /* @__PURE__ */ new Map(), this.features = [], this.colorIdx = 0, this.unsubEvents = [], this.dragState = null;
229
228
  }
@@ -234,7 +233,7 @@ var z = class extends r {
234
233
  this.cleanupEvents(), this.adapter && (this.adapter.setPanEnabled(!0), this.adapter.setTouchCaptureEnabled(!0)), this.dragState = null, this.dragging = !1, this.clearGhost(), this.copies.length === 0 && this.cleanupLayers();
235
234
  }
236
235
  static {
237
- this.styles = i`
236
+ this.styles = e`
238
237
  :host { display: none; padding: var(--webmapx-tool-padding, 0); font-size: 0.875rem; min-width: 200px; }
239
238
  :host([active]) { display: block; }
240
239
  label { display: block; font-weight: 600; margin-bottom: 0.25rem; }
@@ -282,8 +281,8 @@ var z = class extends r {
282
281
  .rotation-value { font-variant-numeric: tabular-nums; min-width: 3.5em; text-align: right; font-size: 0.8rem; color: var(--sl-color-neutral-600, #555); }
283
282
  `;
284
283
  }
285
- onMapAttached(t) {
286
- super.onMapAttached(t), this.mapElement = e(this), this.refreshLayers(t.store.getState()), this.active && (t.setTouchCaptureEnabled(!1), this.bindEvents());
284
+ onMapAttached(e) {
285
+ super.onMapAttached(e), this.mapElement = i(this), this.refreshLayers(e.store.getState()), this.active && (e.setTouchCaptureEnabled(!1), this.bindEvents());
287
286
  }
288
287
  onMapDetached() {
289
288
  this.cleanupEvents(), this.cleanupLayers(), this.dragState = null, this.dragging = !1, this.features = [], this.copies = [], this.copyMeta.clear(), this.availableLayers = [], this.mapElement = null, super.onMapDetached();
@@ -566,22 +565,22 @@ var z = class extends r {
566
565
  });
567
566
  }
568
567
  render() {
569
- return a`
568
+ return r`
570
569
  <label>Source layer</label>
571
- ${this.availableLayers.length === 0 ? a`<div class="hint">No visible polygon layers on map.</div>` : a`
570
+ ${this.availableLayers.length === 0 ? r`<div class="hint">No visible polygon layers on map.</div>` : r`
572
571
  <select @change=${(e) => {
573
572
  this.selectedLayerId = e.target.value;
574
573
  }}>
575
- ${this.availableLayers.map((e) => a`
574
+ ${this.availableLayers.map((e) => r`
576
575
  <option value=${e.id} ?selected=${e.id === this.selectedLayerId}>${e.label}</option>
577
576
  `)}
578
577
  </select>
579
- ${this.dragging ? a`<div class="dragging-hint">Drag to target location, release to place.</div>` : a`<div class="hint">Click and drag a polygon to compare sizes.</div>`}
578
+ ${this.dragging ? r`<div class="dragging-hint">Drag to target location, release to place.</div>` : r`<div class="hint">Click and drag a polygon to compare sizes.</div>`}
580
579
  `}
581
580
 
582
581
  ${(() => {
583
582
  let e = this.copies.find((e) => e.id === this.lastTouchedCopyId);
584
- return !e && this.availableLayers.length === 0 ? "" : e ? a`
583
+ return !e && this.availableLayers.length === 0 ? "" : e ? r`
585
584
  <div class="copy-item">
586
585
  <div class="copy-swatch" style="background:${e.color}"></div>
587
586
  <span class="copy-label" title=${e.label}>${e.label}</span>
@@ -604,12 +603,12 @@ var z = class extends r {
604
603
  <label for="geodesic-toggle">Geodesic (shape-accurate, may rotate borders)</label>
605
604
  </div>
606
605
 
607
- ${this.copies.length > 0 ? a`<button class="clear-btn" @click=${() => this.clearAll()}>Clear all</button>` : ""}
608
- ` : a`<div class="no-copies">No copy selected. Click a polygon on the map.</div>`;
606
+ ${this.copies.length > 0 ? r`<button class="clear-btn" @click=${() => this.clearAll()}>Clear all</button>` : ""}
607
+ ` : r`<div class="no-copies">No copy selected. Click a polygon on the map.</div>`;
609
608
  })()}
610
609
  `;
611
610
  }
612
611
  };
613
- t([s()], z.prototype, "availableLayers", void 0), t([s()], z.prototype, "selectedLayerId", void 0), t([s()], z.prototype, "copies", void 0), t([s()], z.prototype, "dragging", void 0), t([s()], z.prototype, "lastTouchedCopyId", void 0), t([s()], z.prototype, "rotationDeg", void 0), t([s()], z.prototype, "geodesic", void 0), z = t([o("webmapx-truearea-tool")], z);
612
+ a([t()], z.prototype, "availableLayers", void 0), a([t()], z.prototype, "selectedLayerId", void 0), a([t()], z.prototype, "copies", void 0), a([t()], z.prototype, "dragging", void 0), a([t()], z.prototype, "lastTouchedCopyId", void 0), a([t()], z.prototype, "rotationDeg", void 0), a([t()], z.prototype, "geodesic", void 0), z = a([n("webmapx-truearea-tool")], z);
614
613
  //#endregion
615
614
  export { z as WebmapxTrueAreaTool };
@@ -1,7 +1,6 @@
1
- import { r as e, t } from "./decorate-CKr8yG1g.js";
2
- import { t as n } from "./webmapx-base-tool-Bc9Wz0yA.js";
3
- import { css as r, html as i } from "lit";
4
- import { customElement as a, state as o } from "lit/decorators.js";
1
+ import { h as e, i as t, o as n, p as r } from "./decorators-d8E4nZJy.js";
2
+ import { r as i, t as a } from "./decorate-DNmmPsJp.js";
3
+ import { t as o } from "./webmapx-base-tool-idjVnrFA.js";
5
4
  //#region src/components/webmapx-view-mode-tool.ts
6
5
  var s = [{
7
6
  id: "mercator",
@@ -13,12 +12,12 @@ var s = [{
13
12
  name: "Globe",
14
13
  description: "Globe view: orthographic-like or perspective",
15
14
  image: "globe-view.png"
16
- }], c = class extends n {
15
+ }], c = class extends o {
17
16
  constructor(...e) {
18
17
  super(...e), this.viewModeName = "mercator", this.centerLng = 0, this.centerLat = 30, this.parallel1 = 29.5, this.parallel2 = 45.5, this.supported = !0;
19
18
  }
20
19
  static {
21
- this.styles = r`
20
+ this.styles = e`
22
21
  :host { display: block; padding: var(--webmapx-tool-padding, 0); font-size: 0.875rem; }
23
22
  .unsupported { color: var(--sl-color-neutral-500, #888); font-style: italic; }
24
23
  label { display: block; font-weight: 600; margin-bottom: 0.25rem; }
@@ -53,19 +52,19 @@ var s = [{
53
52
  parallels: [this.parallel1, this.parallel2]
54
53
  }) || this.syncFromAdapter();
55
54
  else {
56
- let t = e(this);
57
- t && typeof t.setProjection == "function" ? t.setProjection(this.viewModeName) : this.adapter.setProjection(this.viewModeName) || this.syncFromAdapter();
55
+ let e = i(this);
56
+ e && typeof e.setProjection == "function" ? e.setProjection(this.viewModeName) : this.adapter.setProjection(this.viewModeName) || this.syncFromAdapter();
58
57
  }
59
58
  }
60
59
  render() {
61
- if (!this.supported) return i`<div class="unsupported">View modes are not supported by this engine.</div>`;
60
+ if (!this.supported) return r`<div class="unsupported">View modes are not supported by this engine.</div>`;
62
61
  let e = s.find((e) => e.id === this.viewModeName) ?? s[0], t = e.conic === !0;
63
- return i`
62
+ return r`
64
63
  <label>View mode</label>
65
64
  <select @change=${(e) => {
66
65
  this.viewModeName = e.target.value, this.applyViewMode();
67
66
  }}>
68
- ${s.map((e) => i`<option value=${e.id} ?selected=${e.id === this.viewModeName}>${e.name}</option>`)}
67
+ ${s.map((e) => r`<option value=${e.id} ?selected=${e.id === this.viewModeName}>${e.name}</option>`)}
69
68
  </select>
70
69
  <div class="mode-description">${e.description}</div>
71
70
  <img src=${e.image} alt=${e.description}>
@@ -101,6 +100,6 @@ var s = [{
101
100
  `;
102
101
  }
103
102
  };
104
- t([o()], c.prototype, "viewModeName", void 0), t([o()], c.prototype, "centerLng", void 0), t([o()], c.prototype, "centerLat", void 0), t([o()], c.prototype, "parallel1", void 0), t([o()], c.prototype, "parallel2", void 0), t([o()], c.prototype, "supported", void 0), c = t([a("webmapx-view-mode-tool")], c);
103
+ a([t()], c.prototype, "viewModeName", void 0), a([t()], c.prototype, "centerLng", void 0), a([t()], c.prototype, "centerLat", void 0), a([t()], c.prototype, "parallel1", void 0), a([t()], c.prototype, "parallel2", void 0), a([t()], c.prototype, "supported", void 0), c = a([n("webmapx-view-mode-tool")], c);
105
104
  //#endregion
106
105
  export { c as WebmapxViewModeTool };