@teritorio/openstreetmap-logical-history-component 0.4.0 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createSlots as o, createVNode as s, customRef as c, defineComponent as l, getCurrentInstance as u, getCurrentScope as d, guardReactiveProps as f, inject as p, mergeProps as m, nextTick as h, normalizeClass as g, normalizeProps as _, onMounted as v, onScopeDispose as y, openBlock as b, provide as x, readonly as S, ref as C, renderList as w, renderSlot as T, shallowRef as E, toDisplayString as D, toRef as O, toValue as k, unref as A, useCssVars as ee, useSlots as te, useTemplateRef as ne, watch as j, withCtx as M, withDirectives as re, withModifiers as N } from "vue";
1
+ import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createSlots as o, createVNode as s, customRef as c, defineComponent as l, getCurrentInstance as u, getCurrentScope as d, guardReactiveProps as f, inject as p, mergeProps as m, nextTick as h, normalizeClass as g, normalizeProps as _, onMounted as v, onScopeDispose as y, onUnmounted as b, openBlock as x, provide as S, readonly as C, ref as w, renderList as T, renderSlot as E, shallowRef as D, toDisplayString as O, toRef as k, toValue as A, unref as j, useCssVars as ee, useSlots as te, useTemplateRef as ne, watch as M, withCtx as N, withDirectives as re, withModifiers as P } from "vue";
2
2
  import ie from "maplibre-gl";
3
3
  //#region \0rolldown/runtime.js
4
4
  var ae = Object.create, oe = Object.defineProperty, se = Object.getOwnPropertyDescriptor, ce = Object.getOwnPropertyNames, le = Object.getPrototypeOf, ue = Object.prototype.hasOwnProperty, de = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), fe = (e, t, n, r) => {
@@ -10,24 +10,24 @@ var ae = Object.create, oe = Object.defineProperty, se = Object.getOwnPropertyDe
10
10
  }, pe = (e, t, n) => (n = e == null ? {} : ae(le(e)), fe(t || !e || !e.__esModule ? oe(n, "default", {
11
11
  value: e,
12
12
  enumerable: !0
13
- }) : n, e)), P = 6371008.8, me = {
14
- centimeters: P * 100,
15
- centimetres: P * 100,
13
+ }) : n, e)), F = 6371008.8, me = {
14
+ centimeters: F * 100,
15
+ centimetres: F * 100,
16
16
  degrees: 360 / (2 * Math.PI),
17
- feet: P * 3.28084,
18
- inches: P * 39.37,
19
- kilometers: P / 1e3,
20
- kilometres: P / 1e3,
21
- meters: P,
22
- metres: P,
23
- miles: P / 1609.344,
24
- millimeters: P * 1e3,
25
- millimetres: P * 1e3,
26
- nauticalmiles: P / 1852,
17
+ feet: F * 3.28084,
18
+ inches: F * 39.37,
19
+ kilometers: F / 1e3,
20
+ kilometres: F / 1e3,
21
+ meters: F,
22
+ metres: F,
23
+ miles: F / 1609.344,
24
+ millimeters: F * 1e3,
25
+ millimetres: F * 1e3,
26
+ nauticalmiles: F / 1852,
27
27
  radians: 1,
28
- yards: P * 1.0936
28
+ yards: F * 1.0936
29
29
  };
30
- function F(e, t, n = {}) {
30
+ function I(e, t, n = {}) {
31
31
  let r = { type: "Feature" };
32
32
  return (n.id === 0 || n.id) && (r.id = n.id), n.bbox && (r.bbox = n.bbox), r.properties = t || {}, r.geometry = e, r;
33
33
  }
@@ -36,7 +36,7 @@ function he(e, t, n = {}) {
36
36
  if (!Array.isArray(e)) throw Error("coordinates must be an Array");
37
37
  if (e.length < 2) throw Error("coordinates must be at least 2 numbers long");
38
38
  if (!xe(e[0]) || !xe(e[1])) throw Error("coordinates must contain numbers");
39
- return F({
39
+ return I({
40
40
  type: "Point",
41
41
  coordinates: e
42
42
  }, t, n);
@@ -47,30 +47,30 @@ function ge(e, t, n = {}) {
47
47
  if (t[t.length - 1].length !== t[0].length) throw Error("First and last Position are not equivalent.");
48
48
  for (let e = 0; e < t[t.length - 1].length; e++) if (t[t.length - 1][e] !== t[0][e]) throw Error("First and last Position are not equivalent.");
49
49
  }
50
- return F({
50
+ return I({
51
51
  type: "Polygon",
52
52
  coordinates: e
53
53
  }, t, n);
54
54
  }
55
- function I(e, t, n = {}) {
55
+ function L(e, t, n = {}) {
56
56
  if (e.length < 2) throw Error("coordinates must be an array of two or more positions");
57
- return F({
57
+ return I({
58
58
  type: "LineString",
59
59
  coordinates: e
60
60
  }, t, n);
61
61
  }
62
- function L(e, t = {}) {
62
+ function R(e, t = {}) {
63
63
  let n = { type: "FeatureCollection" };
64
64
  return t.id && (n.id = t.id), t.bbox && (n.bbox = t.bbox), n.features = e, n;
65
65
  }
66
66
  function _e(e, t, n = {}) {
67
- return F({
67
+ return I({
68
68
  type: "MultiLineString",
69
69
  coordinates: e
70
70
  }, t, n);
71
71
  }
72
72
  function ve(e, t, n = {}) {
73
- return F({
73
+ return I({
74
74
  type: "MultiPolygon",
75
75
  coordinates: e
76
76
  }, t, n);
@@ -83,7 +83,7 @@ function ye(e, t = "kilometers") {
83
83
  function be(e) {
84
84
  return e % (2 * Math.PI) * 180 / Math.PI;
85
85
  }
86
- function R(e) {
86
+ function z(e) {
87
87
  return e % 360 * Math.PI / 180;
88
88
  }
89
89
  function xe(e) {
@@ -197,7 +197,7 @@ function Oe(e, t) {
197
197
  case null:
198
198
  case "Point":
199
199
  case "LineString":
200
- case "Polygon": return t(F(e, r, {
200
+ case "Polygon": return t(I(e, r, {
201
201
  bbox: i,
202
202
  id: a
203
203
  }), n, 0) === !1 ? !1 : void 0;
@@ -216,7 +216,7 @@ function Oe(e, t) {
216
216
  }
217
217
  for (var c = 0; c < e.coordinates.length; c++) {
218
218
  var l = e.coordinates[c];
219
- if (t(F({
219
+ if (t(I({
220
220
  type: s,
221
221
  coordinates: l
222
222
  }, r), n, c) === !1) return !1;
@@ -250,7 +250,7 @@ function je(e) {
250
250
  }
251
251
  return t;
252
252
  }
253
- var Me = P * P / 2, Ne = Math.PI / 180;
253
+ var Me = F * F / 2, Ne = Math.PI / 180;
254
254
  function Pe(e) {
255
255
  let t = e.length - 1;
256
256
  if (t <= 2) return 0;
@@ -263,7 +263,7 @@ function Pe(e) {
263
263
  }
264
264
  //#endregion
265
265
  //#region node_modules/geojson-equality-ts/dist/esm/index.js
266
- var Fe = Object.defineProperty, z = (e, t) => Fe(e, "name", {
266
+ var Fe = Object.defineProperty, B = (e, t) => Fe(e, "name", {
267
267
  value: t,
268
268
  configurable: !0
269
269
  }), Ie = class {
@@ -331,23 +331,23 @@ var Fe = Object.defineProperty, z = (e, t) => Fe(e, "name", {
331
331
  return !e.bbox && !t.bbox || (e.bbox && t.bbox ? this.compareCoord(e.bbox, t.bbox) : !1);
332
332
  }
333
333
  };
334
- z(Ie, "GeojsonEquality");
334
+ B(Ie, "GeojsonEquality");
335
335
  var Le = Ie;
336
336
  function Re(e, t) {
337
337
  return e.coordinates ? e.coordinates.length === t.coordinates.length : e.length === t.length;
338
338
  }
339
- z(Re, "sameLength");
339
+ B(Re, "sameLength");
340
340
  function ze(e) {
341
341
  return e.coordinates.map((t) => ({
342
342
  type: e.type.replace("Multi", ""),
343
343
  coordinates: t
344
344
  }));
345
345
  }
346
- z(ze, "explode");
346
+ B(ze, "explode");
347
347
  function Be(e, t, n) {
348
348
  return new Le(n).compare(e, t);
349
349
  }
350
- z(Be, "geojsonEquality");
350
+ B(Be, "geojsonEquality");
351
351
  function Ve(e, t) {
352
352
  if (e === null && t === null) return !0;
353
353
  if (e === null || t === null) return !1;
@@ -359,11 +359,11 @@ function Ve(e, t) {
359
359
  }
360
360
  return !0;
361
361
  }
362
- z(Ve, "equal");
363
- var He = /* @__PURE__ */ z((e) => typeof e == "object" && !!e, "isObject");
362
+ B(Ve, "equal");
363
+ var He = /* @__PURE__ */ B((e) => typeof e == "object" && !!e, "isObject");
364
364
  //#endregion
365
365
  //#region node_modules/@turf/invariant/dist/esm/index.js
366
- function B(e) {
366
+ function V(e) {
367
367
  if (!e) throw Error("coord is required");
368
368
  if (!Array.isArray(e)) {
369
369
  if (e.type === "Feature" && e.geometry !== null && e.geometry.type === "Point") return [...e.geometry.coordinates];
@@ -372,14 +372,14 @@ function B(e) {
372
372
  if (Array.isArray(e) && e.length >= 2 && !Array.isArray(e[0]) && !Array.isArray(e[1])) return [...e];
373
373
  throw Error("coord must be GeoJSON Point or an Array of numbers");
374
374
  }
375
- function V(e) {
375
+ function H(e) {
376
376
  if (Array.isArray(e)) return e;
377
377
  if (e.type === "Feature") {
378
378
  if (e.geometry !== null) return e.geometry.coordinates;
379
379
  } else if (e.coordinates) return e.coordinates;
380
380
  throw Error("coords must be GeoJSON Feature, Geometry Object or an Array");
381
381
  }
382
- function H(e) {
382
+ function U(e) {
383
383
  return e.type === "Feature" ? e.geometry : e;
384
384
  }
385
385
  function Ue(e, t) {
@@ -387,8 +387,8 @@ function Ue(e, t) {
387
387
  }
388
388
  //#endregion
389
389
  //#region node_modules/@turf/boolean-point-on-line/dist/esm/index.js
390
- function U(e, t, n = {}) {
391
- let r = B(e), i = V(t);
390
+ function W(e, t, n = {}) {
391
+ let r = V(e), i = H(t);
392
392
  for (let e = 0; e < i.length - 1; e++) {
393
393
  let t = !1;
394
394
  if (n.ignoreEndVertices && (e === 0 && (t = "start"), e === i.length - 2 && (t = "end"), e === 0 && e + 1 === i.length - 1 && (t = "both")), We(i[e], i[e + 1], r, t, n.epsilon === void 0 ? null : n.epsilon)) return !0;
@@ -414,12 +414,12 @@ function Ge(e, t = {}) {
414
414
  break;
415
415
  case "MultiLineString":
416
416
  case "Polygon":
417
- V(e).forEach(function(e) {
417
+ H(e).forEach(function(e) {
418
418
  i.push(Ke(e, r));
419
419
  });
420
420
  break;
421
421
  case "MultiPolygon":
422
- V(e).forEach(function(e) {
422
+ H(e).forEach(function(e) {
423
423
  var t = [];
424
424
  e.forEach(function(e) {
425
425
  t.push(Ke(e, r));
@@ -429,7 +429,7 @@ function Ge(e, t = {}) {
429
429
  case "Point": return e;
430
430
  case "MultiPoint":
431
431
  var a = {};
432
- V(e).forEach(function(e) {
432
+ H(e).forEach(function(e) {
433
433
  var t = e.join("-");
434
434
  Object.prototype.hasOwnProperty.call(a, t) || (i.push(e), a[t] = !0);
435
435
  });
@@ -439,7 +439,7 @@ function Ge(e, t = {}) {
439
439
  return e.coordinates ? n === !0 ? (e.coordinates = i, e) : {
440
440
  type: r,
441
441
  coordinates: i
442
- } : n === !0 ? (e.geometry.coordinates = i, e) : F({
442
+ } : n === !0 ? (e.geometry.coordinates = i, e) : I({
443
443
  type: r,
444
444
  coordinates: i
445
445
  }, e.properties, {
@@ -448,12 +448,12 @@ function Ge(e, t = {}) {
448
448
  });
449
449
  }
450
450
  function Ke(e, t) {
451
- let n = V(e);
451
+ let n = H(e);
452
452
  if (n.length === 2 && !qe(n[0], n[1])) return n;
453
453
  let r = [], i = 0, a = 1, o = 2;
454
- for (r.push(n[i]); o < n.length;) U(n[a], I([n[i], n[o]])) ? a = o : (r.push(n[a]), i = a, a++, o = a), o++;
454
+ for (r.push(n[i]); o < n.length;) W(n[a], L([n[i], n[o]])) ? a = o : (r.push(n[a]), i = a, a++, o = a), o++;
455
455
  if (r.push(n[a]), t === "Polygon" || t === "MultiPolygon") {
456
- if (U(r[0], I([r[1], r[r.length - 2]])) && (r.shift(), r.pop(), r.push(r[0])), r.length < 4) throw Error("invalid polygon, fewer than 4 points");
456
+ if (W(r[0], L([r[1], r[r.length - 2]])) && (r.shift(), r.pop(), r.push(r[0])), r.length < 4) throw Error("invalid polygon, fewer than 4 points");
457
457
  if (!qe(r[0], r[r.length - 1])) throw Error("invalid polygon, first and last points not equal");
458
458
  }
459
459
  return r;
@@ -466,7 +466,7 @@ function qe(e, t) {
466
466
  function Je(e, t, n = {}) {
467
467
  let r = n.precision;
468
468
  if (r = r == null || isNaN(r) ? 6 : r, typeof r != "number" || !(r >= 0)) throw Error("precision must be a positive number");
469
- return H(e).type === H(t).type ? Be(Ge(e), Ge(t), { precision: r }) : !1;
469
+ return U(e).type === U(t).type ? Be(Ge(e), Ge(t), { precision: r }) : !1;
470
470
  }
471
471
  var Ye = Je;
472
472
  //#endregion
@@ -514,7 +514,7 @@ function Xe(e) {
514
514
  }
515
515
  //#endregion
516
516
  //#region src/composables/useLoCha.ts
517
- var W = {
517
+ var G = {
518
518
  new: "#52c41a",
519
519
  delete: "#FF0000",
520
520
  updateBefore: "#FFA479",
@@ -526,7 +526,7 @@ var W = {
526
526
  "updateBefore"
527
527
  ].map((e) => [e, e]));
528
528
  function Qe() {
529
- let e = C(), n = C([]), r = t(() => e.value?.features.length);
529
+ let e = w(), n = w([]), r = t(() => e.value?.features.length);
530
530
  function i(e) {
531
531
  return e.reduce((e, t) => {
532
532
  let n = t.properties.links;
@@ -595,9 +595,9 @@ var lt = { class: "locha-object" }, ut = { class: "wrap" }, dt = ["href"], ft =
595
595
  },
596
596
  setup(e) {
597
597
  ee((e) => ({
598
- v26dc6b0d: l.value,
599
- v817d1e34: A(W).delete,
600
- v0b8a0045: A(W).new
598
+ v642a69b5: l.value,
599
+ e2a6f984: j(G).delete,
600
+ v6c07cced: j(G).new
601
601
  }));
602
602
  let n = e, { getStatus: o } = p(et), s = t(() => o(n.feature)), c = t(() => {
603
603
  switch (s.value) {
@@ -605,74 +605,75 @@ var lt = { class: "locha-object" }, ut = { class: "wrap" }, dt = ["href"], ft =
605
605
  case "delete": return "deleted";
606
606
  default: return "";
607
607
  }
608
- }), l = t(() => W[s.value]);
609
- return (t, o) => (b(), i("article", lt, [a("header", null, [
608
+ }), l = t(() => G[s.value]);
609
+ return (t, o) => (x(), i("article", lt, [a("header", null, [
610
610
  a("div", ut, [
611
611
  a("a", {
612
- href: A(it)(e.feature.properties.objtype, e.feature.properties.id),
612
+ href: j(it)(e.feature.properties.objtype, e.feature.properties.id),
613
613
  title: "OSM History",
614
614
  target: "_blank",
615
- onClick: o[0] ||= N(() => {}, ["stop"])
616
- }, D(`${e.feature.properties.objtype}${e.feature.properties.id}-v${e.feature.properties.version}`), 9, dt),
617
- s.value === "new" || s.value === "delete" ? (b(), i("div", {
615
+ onClick: o[0] ||= P(() => {}, ["stop"])
616
+ }, O(`${e.feature.properties.objtype}${e.feature.properties.id}-v${e.feature.properties.version}`), 9, dt),
617
+ s.value === "new" || s.value === "delete" ? (x(), i("div", {
618
618
  key: 0,
619
619
  class: g(["status-content", {
620
620
  "object-new": s.value === "new",
621
621
  "object-deleted": s.value === "delete"
622
622
  }])
623
- }, D(c.value), 3)) : r("", !0),
623
+ }, O(c.value), 3)) : r("", !0),
624
624
  a("div", ft, [o[6] ||= a("button", {
625
625
  class: "fab-toggle",
626
626
  type: "button",
627
627
  title: "Tools"
628
628
  }, " 🔧 Tools ", -1), a("div", pt, [
629
629
  a("a", {
630
- href: A(it)(e.feature.properties.objtype, e.feature.properties.id),
630
+ href: j(it)(e.feature.properties.objtype, e.feature.properties.id),
631
631
  class: "action-btn",
632
632
  title: "Edit in OSM iD",
633
633
  target: "_blank",
634
- onClick: o[1] ||= N(() => {}, ["stop"])
634
+ onClick: o[1] ||= P(() => {}, ["stop"])
635
635
  }, " OSM iD ", 8, mt),
636
636
  a("a", {
637
- href: A(ot)(e.feature.properties.objtype, e.feature.properties.id),
637
+ href: j(ot)(e.feature.properties.objtype, e.feature.properties.id),
638
638
  class: "action-btn",
639
639
  title: "Edit in JOSM",
640
640
  target: e.josmTarget || "hidden_josm_target",
641
- onClick: o[2] ||= N(() => {}, ["stop"])
641
+ onClick: o[2] ||= P(() => {}, ["stop"])
642
642
  }, " JOSM ", 8, ht),
643
643
  a("a", {
644
- href: A(st)(e.feature.properties.objtype, e.feature.properties.id),
644
+ href: j(st)(e.feature.properties.objtype, e.feature.properties.id),
645
645
  class: "action-btn",
646
646
  title: "OSM Deep History",
647
647
  target: "_blank",
648
- onClick: o[3] ||= N(() => {}, ["stop"])
648
+ onClick: o[3] ||= P(() => {}, ["stop"])
649
649
  }, " Deep H ", 8, gt),
650
650
  a("a", {
651
- href: A(ct)(e.feature.properties.objtype, e.feature.properties.id),
651
+ href: j(ct)(e.feature.properties.objtype, e.feature.properties.id),
652
652
  class: "action-btn",
653
653
  title: "OSM History Viewer",
654
654
  target: "_blank",
655
- onClick: o[4] ||= N(() => {}, ["stop"])
655
+ onClick: o[4] ||= P(() => {}, ["stop"])
656
656
  }, " OSM H ", 8, _t)
657
657
  ])])
658
658
  ]),
659
- a("p", vt, " 📅 " + D(n.feature.properties.created), 1),
660
- a("a", {
661
- href: A(at)(e.feature.properties.username),
659
+ a("p", vt, " 📅 " + O(n.feature.properties.created), 1),
660
+ e.feature.properties.username ? (x(), i("a", {
661
+ key: 0,
662
+ href: j(at)(e.feature.properties.username),
662
663
  title: `View ${e.feature.properties.username} OSM profile`,
663
664
  target: "_blank",
664
- onClick: o[5] ||= N(() => {}, ["stop"])
665
- }, " 👤" + D(e.feature.properties.username), 9, yt)
666
- ]), T(t.$slots, "object-detail", {}, void 0, !0)]));
665
+ onClick: o[5] ||= P(() => {}, ["stop"])
666
+ }, " 👤" + O(e.feature.properties.username), 9, yt)) : r("", !0)
667
+ ]), E(t.$slots, "object-detail", {}, void 0, !0)]));
667
668
  }
668
669
  }), xt = (e, t) => {
669
670
  let n = e.__vccOpts || e;
670
671
  for (let [e, r] of t) n[e] = r;
671
672
  return n;
672
- }, St = /* @__PURE__ */ xt(bt, [["__scopeId", "data-v-4e68f036"]]);
673
+ }, St = /* @__PURE__ */ xt(bt, [["__scopeId", "data-v-fac1b144"]]);
673
674
  //#endregion
674
675
  //#region node_modules/@turf/bbox/dist/esm/index.js
675
- function G(e, t = {}) {
676
+ function K(e, t = {}) {
676
677
  if (e.bbox != null && !0 !== t.recompute) return e.bbox;
677
678
  let n = [
678
679
  Infinity,
@@ -684,7 +685,7 @@ function G(e, t = {}) {
684
685
  n[0] > e[0] && (n[0] = e[0]), n[1] > e[1] && (n[1] = e[1]), n[2] < e[0] && (n[2] = e[0]), n[3] < e[1] && (n[3] = e[1]);
685
686
  }), n;
686
687
  }
687
- var Ct = G;
688
+ var Ct = K;
688
689
  //#endregion
689
690
  //#region node_modules/@vueuse/shared/dist/index.js
690
691
  function wt(e, t) {
@@ -698,18 +699,18 @@ function jt() {
698
699
  return Tt && !!(!((e = window) == null || (e = e.navigator) == null) && e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((t = window) == null || (t = t.navigator) == null ? void 0 : t.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window?.navigator.userAgent));
699
700
  }
700
701
  function Mt(...e) {
701
- if (e.length !== 1) return O(...e);
702
+ if (e.length !== 1) return k(...e);
702
703
  let t = e[0];
703
- return typeof t == "function" ? S(c(() => ({
704
+ return typeof t == "function" ? C(c(() => ({
704
705
  get: t,
705
706
  set: kt
706
- }))) : C(t);
707
+ }))) : w(t);
707
708
  }
708
709
  function Nt(e) {
709
710
  return Array.isArray(e) ? e : [e];
710
711
  }
711
712
  function Pt(e, t, n) {
712
- return j(e, t, {
713
+ return M(e, t, {
713
714
  ...n,
714
715
  immediate: !0
715
716
  });
@@ -719,19 +720,19 @@ function Pt(e, t, n) {
719
720
  var Ft = Tt ? window : void 0;
720
721
  Tt && window.document, Tt && window.navigator, Tt && window.location;
721
722
  function It(e) {
722
- let t = k(e);
723
+ let t = A(e);
723
724
  return t?.$el ?? t;
724
725
  }
725
726
  function Lt(...e) {
726
727
  let n = (e, t, n, r) => (e.addEventListener(t, n, r), () => e.removeEventListener(t, n, r)), r = t(() => {
727
- let t = Nt(k(e[0])).filter((e) => e != null);
728
+ let t = Nt(A(e[0])).filter((e) => e != null);
728
729
  return t.every((e) => typeof e != "string") ? t : void 0;
729
730
  });
730
731
  return Pt(() => [
731
732
  r.value?.map((e) => It(e)) ?? [Ft].filter((e) => e != null),
732
- Nt(k(r.value ? e[1] : e[0])),
733
- Nt(A(r.value ? e[2] : e[1])),
734
- k(r.value ? e[3] : e[2])
733
+ Nt(A(r.value ? e[1] : e[0])),
734
+ Nt(j(r.value ? e[2] : e[1])),
735
+ A(r.value ? e[3] : e[2])
735
736
  ], ([e, t, r, i], a, o) => {
736
737
  if (!e?.length || !t?.length || !r?.length) return;
737
738
  let s = Ot(i) ? { ...i } : i, c = e.flatMap((e) => t.flatMap((t) => r.map((r) => n(e, t, r, s))));
@@ -741,7 +742,7 @@ function Lt(...e) {
741
742
  }, { flush: "post" });
742
743
  }
743
744
  function Rt() {
744
- let e = E(!1), t = u();
745
+ let e = D(!1), t = u();
745
746
  return t && v(() => {
746
747
  e.value = !0;
747
748
  }, t), e;
@@ -752,10 +753,10 @@ function zt(e) {
752
753
  return t(() => (n.value, !!e()));
753
754
  }
754
755
  function Bt(e, n, r = {}) {
755
- let { root: i, rootMargin: a, threshold: o = 0, window: s = Ft, immediate: c = !0 } = r, l = /* @__PURE__ */ zt(() => s && "IntersectionObserver" in s), u = t(() => Nt(k(e)).map(It).filter(Et)), d = kt, f = E(c), p = l.value ? j(() => [
756
+ let { root: i, rootMargin: a, threshold: o = 0, window: s = Ft, immediate: c = !0 } = r, l = /* @__PURE__ */ zt(() => s && "IntersectionObserver" in s), u = t(() => Nt(A(e)).map(It).filter(Et)), d = kt, f = D(c), p = l.value ? M(() => [
756
757
  u.value,
757
758
  It(i),
758
- k(a),
759
+ A(a),
759
760
  f.value
760
761
  ], ([e, t, r]) => {
761
762
  if (d(), !f.value || !e.length) return;
@@ -802,9 +803,9 @@ function Ut(e) {
802
803
  }
803
804
  var Wt = /* @__PURE__ */ new WeakMap();
804
805
  function Gt(e, n = !1) {
805
- let r = E(n), i = null, a = "";
806
- j(Mt(e), (e) => {
807
- let t = Vt(k(e));
806
+ let r = D(n), i = null, a = "";
807
+ M(Mt(e), (e) => {
808
+ let t = Vt(A(e));
808
809
  if (t) {
809
810
  let e = t;
810
811
  if (Wt.get(e) || Wt.set(e, e.style.overflow), e.style.overflow !== "hidden" && (a = e.style.overflow), e.style.overflow === "hidden") return r.value = !0;
@@ -812,12 +813,12 @@ function Gt(e, n = !1) {
812
813
  }
813
814
  }, { immediate: !0 });
814
815
  let o = () => {
815
- let t = Vt(k(e));
816
+ let t = Vt(A(e));
816
817
  !t || r.value || (At && (i = Lt(t, "touchmove", (e) => {
817
818
  Ut(e);
818
819
  }, { passive: !1 })), t.style.overflow = "hidden", r.value = !0);
819
820
  }, s = () => {
820
- let t = Vt(k(e));
821
+ let t = Vt(A(e));
821
822
  !t || !r.value || (At && i?.(), t.style.overflow = a, Wt.delete(t), r.value = !1);
822
823
  };
823
824
  return wt(s), t({
@@ -835,18 +836,18 @@ var Kt = { mounted(e, t) {
835
836
  typeof t.value == "function" ? Bt(e, t.value) : Bt(e, ...t.value);
836
837
  } };
837
838
  function qt() {
838
- let e = !1, t = E(!1);
839
+ let e = !1, t = D(!1);
839
840
  return (n, r) => {
840
841
  if (t.value = r.value, e) return;
841
842
  e = !0;
842
843
  let i = Gt(n, r.value);
843
- j(t, (e) => i.value = e);
844
+ M(t, (e) => i.value = e);
844
845
  };
845
846
  }
846
847
  qt();
847
848
  //#endregion
848
849
  //#region src/constants/map.ts
849
- var Jt = "https://maps.cartoway.com/styles/positron/style.json", Yt = "#f4f4f5", Xt = "bbox", K = "lochas", q = {
850
+ var Jt = "https://maps.cartoway.com/styles/positron/style.json", Yt = "#f4f4f5", Xt = "bbox", q = "lochas", J = {
850
851
  Bbox: {
851
852
  id: "bbox-layer",
852
853
  type: "line",
@@ -860,7 +861,7 @@ var Jt = "https://maps.cartoway.com/styles/positron/style.json", Yt = "#f4f4f5",
860
861
  PolygonBorder: {
861
862
  id: "feature-polygons-border",
862
863
  type: "line",
863
- source: K,
864
+ source: q,
864
865
  paint: {
865
866
  "line-width": [
866
867
  "case",
@@ -883,7 +884,7 @@ var Jt = "https://maps.cartoway.com/styles/positron/style.json", Yt = "#f4f4f5",
883
884
  Polygon: {
884
885
  id: "feature-polygons",
885
886
  type: "fill",
886
- source: K,
887
+ source: q,
887
888
  paint: {
888
889
  "fill-opacity": [
889
890
  "case",
@@ -908,20 +909,20 @@ var Jt = "https://maps.cartoway.com/styles/positron/style.json", Yt = "#f4f4f5",
908
909
  ["get", "is_new"],
909
910
  !0
910
911
  ],
911
- W.new,
912
+ G.new,
912
913
  [
913
914
  "==",
914
915
  ["get", "deleted"],
915
916
  !0
916
917
  ],
917
- W.delete,
918
+ G.delete,
918
919
  [
919
920
  "==",
920
921
  ["get", "is_before"],
921
922
  !0
922
923
  ],
923
- W.updateBefore,
924
- W.updateAfter
924
+ G.updateBefore,
925
+ G.updateAfter
925
926
  ]
926
927
  },
927
928
  filter: [
@@ -933,7 +934,7 @@ var Jt = "https://maps.cartoway.com/styles/positron/style.json", Yt = "#f4f4f5",
933
934
  LineString: {
934
935
  id: "feature-lines",
935
936
  type: "line",
936
- source: K,
937
+ source: q,
937
938
  paint: {
938
939
  "line-width": 6,
939
940
  "line-color": [
@@ -949,20 +950,20 @@ var Jt = "https://maps.cartoway.com/styles/positron/style.json", Yt = "#f4f4f5",
949
950
  ["get", "is_new"],
950
951
  !0
951
952
  ],
952
- W.new,
953
+ G.new,
953
954
  [
954
955
  "==",
955
956
  ["get", "deleted"],
956
957
  !0
957
958
  ],
958
- W.delete,
959
+ G.delete,
959
960
  [
960
961
  "==",
961
962
  ["get", "is_before"],
962
963
  !0
963
964
  ],
964
- W.updateBefore,
965
- W.updateAfter
965
+ G.updateBefore,
966
+ G.updateAfter
966
967
  ],
967
968
  "line-opacity": [
968
969
  "case",
@@ -995,7 +996,7 @@ var Jt = "https://maps.cartoway.com/styles/positron/style.json", Yt = "#f4f4f5",
995
996
  LineStringBorder: {
996
997
  id: "feature-lines-border",
997
998
  type: "line",
998
- source: K,
999
+ source: q,
999
1000
  paint: {
1000
1001
  "line-width": [
1001
1002
  "case",
@@ -1029,7 +1030,7 @@ var Jt = "https://maps.cartoway.com/styles/positron/style.json", Yt = "#f4f4f5",
1029
1030
  Point: {
1030
1031
  id: "feature-points",
1031
1032
  type: "circle",
1032
- source: K,
1033
+ source: q,
1033
1034
  paint: {
1034
1035
  "circle-radius": [
1035
1036
  "case",
@@ -1075,20 +1076,20 @@ var Jt = "https://maps.cartoway.com/styles/positron/style.json", Yt = "#f4f4f5",
1075
1076
  ["get", "is_new"],
1076
1077
  !0
1077
1078
  ],
1078
- W.new,
1079
+ G.new,
1079
1080
  [
1080
1081
  "==",
1081
1082
  ["get", "deleted"],
1082
1083
  !0
1083
1084
  ],
1084
- W.delete,
1085
+ G.delete,
1085
1086
  [
1086
1087
  "==",
1087
1088
  ["get", "is_before"],
1088
1089
  !0
1089
1090
  ],
1090
- W.updateBefore,
1091
- W.updateAfter
1091
+ G.updateBefore,
1092
+ G.updateAfter
1092
1093
  ]
1093
1094
  },
1094
1095
  filter: [
@@ -1101,14 +1102,14 @@ var Jt = "https://maps.cartoway.com/styles/positron/style.json", Yt = "#f4f4f5",
1101
1102
  //#endregion
1102
1103
  //#region node_modules/@turf/bbox-clip/dist/esm/index.js
1103
1104
  function Zt(e, t, n) {
1104
- var r = e.length, i = J(e[0], t), a = [], o, s, c;
1105
+ var r = e.length, i = en(e[0], t), a = [], o, s, c;
1105
1106
  let l, u;
1106
1107
  for (n ||= [], o = 1; o < r; o++) {
1107
- for (l = e[o - 1], u = e[o], s = c = J(u, t);;) if (!(i | s)) {
1108
+ for (l = e[o - 1], u = e[o], s = c = en(u, t);;) if (!(i | s)) {
1108
1109
  a.push(l), s === c ? o === r - 1 && a.push(u) : (a.push(u), o < r - 1 && (n.push(a), a = []));
1109
1110
  break;
1110
1111
  } else if (i & s) break;
1111
- else i ? (l = $t(l, u, i, t), i = J(l, t)) : (u = $t(l, u, s, t), s = J(u, t));
1112
+ else i ? (l = $t(l, u, i, t), i = en(l, t)) : (u = $t(l, u, s, t), s = en(u, t));
1112
1113
  i = c;
1113
1114
  }
1114
1115
  return a.length && n.push(a), n;
@@ -1116,7 +1117,7 @@ function Zt(e, t, n) {
1116
1117
  function Qt(e, t) {
1117
1118
  var n, r, i, a, o, s, c;
1118
1119
  for (r = 1; r <= 8; r *= 2) {
1119
- for (n = [], i = e[e.length - 1], a = !(J(i, t) & r), o = 0; o < e.length; o++) s = e[o], c = !(J(s, t) & r), c !== a && n.push($t(i, s, r, t)), c && n.push(s), i = s, a = c;
1120
+ for (n = [], i = e[e.length - 1], a = !(en(i, t) & r), o = 0; o < e.length; o++) s = e[o], c = !(en(s, t) & r), c !== a && n.push($t(i, s, r, t)), c && n.push(s), i = s, a = c;
1120
1121
  if (e = n, !e.length) break;
1121
1122
  }
1122
1123
  return n;
@@ -1124,26 +1125,26 @@ function Qt(e, t) {
1124
1125
  function $t(e, t, n, r) {
1125
1126
  return n & 8 ? [e[0] + (t[0] - e[0]) * (r[3] - e[1]) / (t[1] - e[1]), r[3]] : n & 4 ? [e[0] + (t[0] - e[0]) * (r[1] - e[1]) / (t[1] - e[1]), r[1]] : n & 2 ? [r[2], e[1] + (t[1] - e[1]) * (r[2] - e[0]) / (t[0] - e[0])] : n & 1 ? [r[0], e[1] + (t[1] - e[1]) * (r[0] - e[0]) / (t[0] - e[0])] : null;
1126
1127
  }
1127
- function J(e, t) {
1128
+ function en(e, t) {
1128
1129
  var n = 0;
1129
1130
  return e[0] < t[0] ? n |= 1 : e[0] > t[2] && (n |= 2), e[1] < t[1] ? n |= 4 : e[1] > t[3] && (n |= 8), n;
1130
1131
  }
1131
- function en(e, t) {
1132
- let n = H(e), r = n.type, i = e.type === "Feature" ? e.properties : {}, a = n.coordinates;
1132
+ function tn(e, t) {
1133
+ let n = U(e), r = n.type, i = e.type === "Feature" ? e.properties : {}, a = n.coordinates;
1133
1134
  switch (r) {
1134
1135
  case "LineString":
1135
1136
  case "MultiLineString": {
1136
1137
  let e = [];
1137
1138
  return r === "LineString" && (a = [a]), a.forEach((n) => {
1138
1139
  Zt(n, t, e);
1139
- }), e.length === 1 ? I(e[0], i) : _e(e, i);
1140
+ }), e.length === 1 ? L(e[0], i) : _e(e, i);
1140
1141
  }
1141
- case "Polygon": return ge(tn(a, t), i);
1142
- case "MultiPolygon": return ve(a.map((e) => tn(e, t)), i);
1142
+ case "Polygon": return ge(nn(a, t), i);
1143
+ case "MultiPolygon": return ve(a.map((e) => nn(e, t)), i);
1143
1144
  default: throw Error("geometry " + r + " not supported");
1144
1145
  }
1145
1146
  }
1146
- function tn(e, t) {
1147
+ function nn(e, t) {
1147
1148
  let n = [];
1148
1149
  for (let r of e) {
1149
1150
  let e = Qt(r, t);
@@ -1151,10 +1152,10 @@ function tn(e, t) {
1151
1152
  }
1152
1153
  return n;
1153
1154
  }
1154
- var nn = en;
1155
+ var rn = tn;
1155
1156
  //#endregion
1156
1157
  //#region node_modules/@turf/bbox-polygon/dist/esm/index.js
1157
- function rn(e, t = {}) {
1158
+ function an(e, t = {}) {
1158
1159
  let n = Number(e[0]), r = Number(e[1]), i = Number(e[2]), a = Number(e[3]);
1159
1160
  if (e.length === 6) throw Error("@turf/bbox-polygon does not support BBox with 6 positions");
1160
1161
  let o = [n, r];
@@ -1169,8 +1170,8 @@ function rn(e, t = {}) {
1169
1170
  id: t.id
1170
1171
  });
1171
1172
  }
1172
- var an = rn, Y = 11102230246251565e-32, X = 134217729, on = (3 + 8 * Y) * Y;
1173
- function sn(e, t, n, r, i) {
1173
+ var on = an, Y = 11102230246251565e-32, X = 134217729, sn = (3 + 8 * Y) * Y;
1174
+ function cn(e, t, n, r, i) {
1174
1175
  let a, o, s, c, l = t[0], u = r[0], d = 0, f = 0;
1175
1176
  u > l == u > -l ? (a = l, l = t[++d]) : (a = u, u = r[++f]);
1176
1177
  let p = 0;
@@ -1179,7 +1180,7 @@ function sn(e, t, n, r, i) {
1179
1180
  for (; f < n;) o = a + u, c = o - a, s = a - (o - c) + (u - c), u = r[++f], a = o, s !== 0 && (i[p++] = s);
1180
1181
  return (a !== 0 || p === 0) && (i[p++] = a), p;
1181
1182
  }
1182
- function cn(e, t) {
1183
+ function ln(e, t) {
1183
1184
  let n = t[0];
1184
1185
  for (let r = 1; r < e; r++) n += t[r];
1185
1186
  return n;
@@ -1189,26 +1190,26 @@ function Z(e) {
1189
1190
  }
1190
1191
  //#endregion
1191
1192
  //#region node_modules/robust-predicates/esm/orient2d.js
1192
- var ln = (3 + 16 * Y) * Y, un = (2 + 12 * Y) * Y, dn = (9 + 64 * Y) * Y * Y, fn = Z(4), pn = Z(8), mn = Z(12), hn = Z(16), Q = Z(4);
1193
- function gn(e, t, n, r, i, a, o) {
1193
+ var un = (3 + 16 * Y) * Y, dn = (2 + 12 * Y) * Y, fn = (9 + 64 * Y) * Y * Y, pn = Z(4), mn = Z(8), hn = Z(12), gn = Z(16), Q = Z(4);
1194
+ function _n(e, t, n, r, i, a, o) {
1194
1195
  let s, c, l, u, d, f, p, m, h, g, _, v, y, b, x, S, C, w, T = e - i, E = n - i, D = t - a, O = r - a;
1195
- b = T * O, f = X * T, p = f - (f - T), m = T - p, f = X * O, h = f - (f - O), g = O - h, x = m * g - (b - p * h - m * h - p * g), S = D * E, f = X * D, p = f - (f - D), m = D - p, f = X * E, h = f - (f - E), g = E - h, C = m * g - (S - p * h - m * h - p * g), _ = x - C, d = x - _, fn[0] = x - (_ + d) + (d - C), v = b + _, d = v - b, y = b - (v - d) + (_ - d), _ = y - S, d = y - _, fn[1] = y - (_ + d) + (d - S), w = v + _, d = w - v, fn[2] = v - (w - d) + (_ - d), fn[3] = w;
1196
- let k = cn(4, fn), A = un * o;
1197
- if (k >= A || -k >= A || (d = e - T, s = e - (T + d) + (d - i), d = n - E, l = n - (E + d) + (d - i), d = t - D, c = t - (D + d) + (d - a), d = r - O, u = r - (O + d) + (d - a), s === 0 && c === 0 && l === 0 && u === 0) || (A = dn * o + on * Math.abs(k), k += T * u + O * s - (D * l + E * c), k >= A || -k >= A)) return k;
1196
+ b = T * O, f = X * T, p = f - (f - T), m = T - p, f = X * O, h = f - (f - O), g = O - h, x = m * g - (b - p * h - m * h - p * g), S = D * E, f = X * D, p = f - (f - D), m = D - p, f = X * E, h = f - (f - E), g = E - h, C = m * g - (S - p * h - m * h - p * g), _ = x - C, d = x - _, pn[0] = x - (_ + d) + (d - C), v = b + _, d = v - b, y = b - (v - d) + (_ - d), _ = y - S, d = y - _, pn[1] = y - (_ + d) + (d - S), w = v + _, d = w - v, pn[2] = v - (w - d) + (_ - d), pn[3] = w;
1197
+ let k = ln(4, pn), A = dn * o;
1198
+ if (k >= A || -k >= A || (d = e - T, s = e - (T + d) + (d - i), d = n - E, l = n - (E + d) + (d - i), d = t - D, c = t - (D + d) + (d - a), d = r - O, u = r - (O + d) + (d - a), s === 0 && c === 0 && l === 0 && u === 0) || (A = fn * o + sn * Math.abs(k), k += T * u + O * s - (D * l + E * c), k >= A || -k >= A)) return k;
1198
1199
  b = s * O, f = X * s, p = f - (f - s), m = s - p, f = X * O, h = f - (f - O), g = O - h, x = m * g - (b - p * h - m * h - p * g), S = c * E, f = X * c, p = f - (f - c), m = c - p, f = X * E, h = f - (f - E), g = E - h, C = m * g - (S - p * h - m * h - p * g), _ = x - C, d = x - _, Q[0] = x - (_ + d) + (d - C), v = b + _, d = v - b, y = b - (v - d) + (_ - d), _ = y - S, d = y - _, Q[1] = y - (_ + d) + (d - S), w = v + _, d = w - v, Q[2] = v - (w - d) + (_ - d), Q[3] = w;
1199
- let ee = sn(4, fn, 4, Q, pn);
1200
+ let j = cn(4, pn, 4, Q, mn);
1200
1201
  b = T * u, f = X * T, p = f - (f - T), m = T - p, f = X * u, h = f - (f - u), g = u - h, x = m * g - (b - p * h - m * h - p * g), S = D * l, f = X * D, p = f - (f - D), m = D - p, f = X * l, h = f - (f - l), g = l - h, C = m * g - (S - p * h - m * h - p * g), _ = x - C, d = x - _, Q[0] = x - (_ + d) + (d - C), v = b + _, d = v - b, y = b - (v - d) + (_ - d), _ = y - S, d = y - _, Q[1] = y - (_ + d) + (d - S), w = v + _, d = w - v, Q[2] = v - (w - d) + (_ - d), Q[3] = w;
1201
- let te = sn(ee, pn, 4, Q, mn);
1202
- return b = s * u, f = X * s, p = f - (f - s), m = s - p, f = X * u, h = f - (f - u), g = u - h, x = m * g - (b - p * h - m * h - p * g), S = c * l, f = X * c, p = f - (f - c), m = c - p, f = X * l, h = f - (f - l), g = l - h, C = m * g - (S - p * h - m * h - p * g), _ = x - C, d = x - _, Q[0] = x - (_ + d) + (d - C), v = b + _, d = v - b, y = b - (v - d) + (_ - d), _ = y - S, d = y - _, Q[1] = y - (_ + d) + (d - S), w = v + _, d = w - v, Q[2] = v - (w - d) + (_ - d), Q[3] = w, hn[sn(te, mn, 4, Q, hn) - 1];
1202
+ let ee = cn(j, mn, 4, Q, hn);
1203
+ return b = s * u, f = X * s, p = f - (f - s), m = s - p, f = X * u, h = f - (f - u), g = u - h, x = m * g - (b - p * h - m * h - p * g), S = c * l, f = X * c, p = f - (f - c), m = c - p, f = X * l, h = f - (f - l), g = l - h, C = m * g - (S - p * h - m * h - p * g), _ = x - C, d = x - _, Q[0] = x - (_ + d) + (d - C), v = b + _, d = v - b, y = b - (v - d) + (_ - d), _ = y - S, d = y - _, Q[1] = y - (_ + d) + (d - S), w = v + _, d = w - v, Q[2] = v - (w - d) + (_ - d), Q[3] = w, gn[cn(ee, hn, 4, Q, gn) - 1];
1203
1204
  }
1204
- function _n(e, t, n, r, i, a) {
1205
+ function vn(e, t, n, r, i, a) {
1205
1206
  let o = (t - a) * (n - i), s = (e - i) * (r - a), c = o - s, l = Math.abs(o + s);
1206
- return Math.abs(c) >= ln * l ? c : -gn(e, t, n, r, i, a, l);
1207
+ return Math.abs(c) >= un * l ? c : -_n(e, t, n, r, i, a, l);
1207
1208
  }
1208
1209
  (7 + 56 * Y) * Y, (3 + 28 * Y) * Y, (26 + 288 * Y) * Y * Y, Z(4), Z(4), Z(4), Z(4), Z(4), Z(4), Z(4), Z(4), Z(4), Z(8), Z(8), Z(8), Z(4), Z(8), Z(8), Z(8), Z(12), Z(192), Z(192), (10 + 96 * Y) * Y, (4 + 48 * Y) * Y, (44 + 576 * Y) * Y * Y, Z(4), Z(4), Z(4), Z(4), Z(4), Z(4), Z(4), Z(4), Z(8), Z(8), Z(8), Z(8), Z(8), Z(8), Z(8), Z(8), Z(8), Z(4), Z(4), Z(4), Z(8), Z(16), Z(16), Z(16), Z(32), Z(32), Z(48), Z(64), Z(1152), Z(1152), (16 + 224 * Y) * Y, (5 + 72 * Y) * Y, (71 + 1408 * Y) * Y * Y, Z(4), Z(4), Z(4), Z(4), Z(4), Z(4), Z(4), Z(4), Z(4), Z(4), Z(24), Z(24), Z(24), Z(24), Z(24), Z(24), Z(24), Z(24), Z(24), Z(24), Z(1152), Z(1152), Z(1152), Z(1152), Z(1152), Z(2304), Z(2304), Z(3456), Z(5760), Z(8), Z(8), Z(8), Z(16), Z(24), Z(48), Z(48), Z(96), Z(192), Z(384), Z(384), Z(384), Z(768), Z(96), Z(96), Z(96), Z(1152);
1209
1210
  //#endregion
1210
1211
  //#region node_modules/point-in-polygon-hao/dist/esm/index.js
1211
- function vn(e, t) {
1212
+ function yn(e, t) {
1212
1213
  var n, r, i = 0, a, o, s, c, l, u, d, f = e[0], p = e[1], m = t.length;
1213
1214
  for (n = 0; n < m; n++) {
1214
1215
  r = 0;
@@ -1218,7 +1219,7 @@ function vn(e, t) {
1218
1219
  if (d = h[r + 1], c = d[0] - f, l = d[1] - p, s === 0 && l === 0) {
1219
1220
  if (c <= 0 && o >= 0 || o <= 0 && c >= 0) return 0;
1220
1221
  } else if (l >= 0 && s <= 0 || l <= 0 && s >= 0) {
1221
- if (a = _n(o, c, s, l, 0, 0), a === 0) return 0;
1222
+ if (a = vn(o, c, s, l, 0, 0), a === 0) return 0;
1222
1223
  (a > 0 && l > 0 && s <= 0 || a < 0 && l <= 0 && s > 0) && i++;
1223
1224
  }
1224
1225
  u = d, s = l, o = c;
@@ -1228,26 +1229,26 @@ function vn(e, t) {
1228
1229
  }
1229
1230
  //#endregion
1230
1231
  //#region node_modules/@turf/boolean-point-in-polygon/dist/esm/index.js
1231
- function yn(e, t, n = {}) {
1232
+ function bn(e, t, n = {}) {
1232
1233
  if (!e) throw Error("point is required");
1233
1234
  if (!t) throw Error("polygon is required");
1234
- let r = B(e), i = H(t), a = i.type, o = t.bbox, s = i.coordinates;
1235
- if (o && bn(r, o) === !1) return !1;
1235
+ let r = V(e), i = U(t), a = i.type, o = t.bbox, s = i.coordinates;
1236
+ if (o && xn(r, o) === !1) return !1;
1236
1237
  a === "Polygon" && (s = [s]);
1237
1238
  let c = !1;
1238
1239
  for (var l = 0; l < s.length; ++l) {
1239
- let e = vn(r, s[l]);
1240
+ let e = yn(r, s[l]);
1240
1241
  if (e === 0) return !n.ignoreBoundary;
1241
1242
  e && (c = !0);
1242
1243
  }
1243
1244
  return c;
1244
1245
  }
1245
- function bn(e, t) {
1246
+ function xn(e, t) {
1246
1247
  return t[0] <= e[0] && t[1] <= e[1] && t[2] >= e[0] && t[3] >= e[1];
1247
1248
  }
1248
1249
  //#endregion
1249
1250
  //#region node_modules/@turf/geojson-rbush/dist/esm/index.js
1250
- var xn = /* @__PURE__ */ pe((/* @__PURE__ */ de(((e, t) => {
1251
+ var Sn = /* @__PURE__ */ pe((/* @__PURE__ */ de(((e, t) => {
1251
1252
  (function(n, r) {
1252
1253
  typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n ||= self).RBush = r();
1253
1254
  })(e, function() {
@@ -1465,7 +1466,7 @@ var xn = /* @__PURE__ */ pe((/* @__PURE__ */ de(((e, t) => {
1465
1466
  }, r;
1466
1467
  });
1467
1468
  })))(), 1);
1468
- function Sn(e) {
1469
+ function Cn(e) {
1469
1470
  var t;
1470
1471
  if (e.bbox) t = e.bbox;
1471
1472
  else if (Array.isArray(e) && e.length === 4) t = e;
@@ -1475,8 +1476,8 @@ function Sn(e) {
1475
1476
  e[3],
1476
1477
  e[4]
1477
1478
  ];
1478
- else if (e.type === "Feature") t = G(e);
1479
- else if (e.type === "FeatureCollection") t = G(e);
1479
+ else if (e.type === "Feature") t = K(e);
1480
+ else if (e.type === "FeatureCollection") t = K(e);
1480
1481
  else throw Error("invalid geojson");
1481
1482
  return {
1482
1483
  minX: t[0],
@@ -1485,39 +1486,39 @@ function Sn(e) {
1485
1486
  maxY: t[3]
1486
1487
  };
1487
1488
  }
1488
- var Cn = class {
1489
+ var wn = class {
1489
1490
  constructor(e = 9) {
1490
- this.tree = new xn.default(e), this.tree.toBBox = Sn;
1491
+ this.tree = new Sn.default(e), this.tree.toBBox = Cn;
1491
1492
  }
1492
1493
  insert(e) {
1493
1494
  if (e.type !== "Feature") throw Error("invalid feature");
1494
- return e.bbox = e.bbox ? e.bbox : G(e), this.tree.insert(e), this;
1495
+ return e.bbox = e.bbox ? e.bbox : K(e), this.tree.insert(e), this;
1495
1496
  }
1496
1497
  load(e) {
1497
1498
  var t = [];
1498
1499
  return Array.isArray(e) ? e.forEach(function(e) {
1499
1500
  if (e.type !== "Feature") throw Error("invalid features");
1500
- e.bbox = e.bbox ? e.bbox : G(e), t.push(e);
1501
+ e.bbox = e.bbox ? e.bbox : K(e), t.push(e);
1501
1502
  }) : we(e, function(e) {
1502
1503
  if (e.type !== "Feature") throw Error("invalid features");
1503
- e.bbox = e.bbox ? e.bbox : G(e), t.push(e);
1504
+ e.bbox = e.bbox ? e.bbox : K(e), t.push(e);
1504
1505
  }), this.tree.load(t), this;
1505
1506
  }
1506
1507
  remove(e, t) {
1507
1508
  if (e.type !== "Feature") throw Error("invalid feature");
1508
- return e.bbox = e.bbox ? e.bbox : G(e), this.tree.remove(e, t), this;
1509
+ return e.bbox = e.bbox ? e.bbox : K(e), this.tree.remove(e, t), this;
1509
1510
  }
1510
1511
  clear() {
1511
1512
  return this.tree.clear(), this;
1512
1513
  }
1513
1514
  search(e) {
1514
- return L(this.tree.search(Sn(e)));
1515
+ return R(this.tree.search(Cn(e)));
1515
1516
  }
1516
1517
  collides(e) {
1517
- return this.tree.collides(Sn(e));
1518
+ return this.tree.collides(Cn(e));
1518
1519
  }
1519
1520
  all() {
1520
- return L(this.tree.all());
1521
+ return R(this.tree.all());
1521
1522
  }
1522
1523
  toJSON() {
1523
1524
  return this.tree.toJSON();
@@ -1526,12 +1527,12 @@ var Cn = class {
1526
1527
  return this.tree.fromJSON(e), this;
1527
1528
  }
1528
1529
  };
1529
- function wn(e) {
1530
- return new Cn(e);
1530
+ function Tn(e) {
1531
+ return new wn(e);
1531
1532
  }
1532
1533
  //#endregion
1533
1534
  //#region node_modules/@turf/truncate/dist/esm/index.js
1534
- function Tn(e, t) {
1535
+ function En(e, t) {
1535
1536
  if (t ??= {}, !Se(t)) throw Error("options is invalid");
1536
1537
  var n = t.precision, r = t.coordinates, i = t.mutate;
1537
1538
  if (n = n == null || isNaN(n) ? 6 : n, r = r == null || isNaN(r) ? 3 : r, !e) throw Error("<geojson> is required");
@@ -1540,47 +1541,47 @@ function Tn(e, t) {
1540
1541
  (i === !1 || i === void 0) && (e = JSON.parse(JSON.stringify(e)));
1541
1542
  var a = 10 ** n;
1542
1543
  return Ce(e, function(e) {
1543
- En(e, a, r);
1544
+ Dn(e, a, r);
1544
1545
  }), e;
1545
1546
  }
1546
- function En(e, t, n) {
1547
+ function Dn(e, t, n) {
1547
1548
  e.length > n && e.splice(n, e.length);
1548
1549
  for (var r = 0; r < e.length; r++) e[r] = Math.round(e[r] * t) / t;
1549
1550
  return e;
1550
1551
  }
1551
1552
  //#endregion
1552
1553
  //#region node_modules/@turf/line-segment/dist/esm/index.js
1553
- function Dn(e) {
1554
+ function On(e) {
1554
1555
  if (!e) throw Error("geojson is required");
1555
1556
  let t = [];
1556
1557
  return Oe(e, (e) => {
1557
- On(e, t);
1558
- }), L(t);
1558
+ kn(e, t);
1559
+ }), R(t);
1559
1560
  }
1560
- function On(e, t) {
1561
+ function kn(e, t) {
1561
1562
  let n = [], r = e.geometry;
1562
1563
  if (r !== null) {
1563
1564
  switch (r.type) {
1564
1565
  case "Polygon":
1565
- n = V(r);
1566
+ n = H(r);
1566
1567
  break;
1567
- case "LineString": n = [V(r)];
1568
+ case "LineString": n = [H(r)];
1568
1569
  }
1569
1570
  n.forEach((n) => {
1570
- kn(n, e.properties).forEach((e) => {
1571
+ An(n, e.properties).forEach((e) => {
1571
1572
  e.id = t.length, t.push(e);
1572
1573
  });
1573
1574
  });
1574
1575
  }
1575
1576
  }
1576
- function kn(e, t) {
1577
+ function An(e, t) {
1577
1578
  let n = [];
1578
1579
  return e.reduce((e, r) => {
1579
- let i = I([e, r], t);
1580
- return i.bbox = An(e, r), n.push(i), r;
1580
+ let i = L([e, r], t);
1581
+ return i.bbox = jn(e, r), n.push(i), r;
1581
1582
  }), n;
1582
1583
  }
1583
- function An(e, t) {
1584
+ function jn(e, t) {
1584
1585
  let n = e[0], r = e[1], i = t[0], a = t[1];
1585
1586
  return [
1586
1587
  n < i ? n : i,
@@ -1591,8 +1592,8 @@ function An(e, t) {
1591
1592
  }
1592
1593
  //#endregion
1593
1594
  //#region node_modules/sweepline-intersections/dist/sweeplineIntersections.esm.js
1594
- var jn = class {
1595
- constructor(e = [], t = Mn) {
1595
+ var Mn = class {
1596
+ constructor(e = [], t = Nn) {
1596
1597
  if (this.data = e, this.length = this.data.length, this.compare = t, this.length > 0) for (let e = (this.length >> 1) - 1; e >= 0; e--) this._down(e);
1597
1598
  }
1598
1599
  push(e) {
@@ -1625,16 +1626,16 @@ var jn = class {
1625
1626
  t[e] = i;
1626
1627
  }
1627
1628
  };
1628
- function Mn(e, t) {
1629
+ function Nn(e, t) {
1629
1630
  return e < t ? -1 : e > t ? 1 : 0;
1630
1631
  }
1631
- function Nn(e, t) {
1632
+ function Pn(e, t) {
1632
1633
  return e.p.x > t.p.x ? 1 : e.p.x < t.p.x ? -1 : e.p.y === t.p.y || e.p.y > t.p.y ? 1 : -1;
1633
1634
  }
1634
- function Pn(e, t) {
1635
+ function Fn(e, t) {
1635
1636
  return e.rightSweepEvent.p.x > t.rightSweepEvent.p.x ? 1 : e.rightSweepEvent.p.x < t.rightSweepEvent.p.x ? -1 : e.rightSweepEvent.p.y === t.rightSweepEvent.p.y || e.rightSweepEvent.p.y < t.rightSweepEvent.p.y ? 1 : -1;
1636
1637
  }
1637
- var Fn = class {
1638
+ var In = class {
1638
1639
  constructor(e, t, n, r) {
1639
1640
  this.p = {
1640
1641
  x: e[0],
@@ -1645,50 +1646,50 @@ var Fn = class {
1645
1646
  return this.p.x === e.p.x && this.p.y === e.p.y;
1646
1647
  }
1647
1648
  };
1648
- function In(e, t) {
1649
+ function Ln(e, t) {
1649
1650
  if (e.type === "FeatureCollection") {
1650
1651
  let n = e.features;
1651
- for (let e = 0; e < n.length; e++) Bn(n[e], t);
1652
- } else Bn(e, t);
1652
+ for (let e = 0; e < n.length; e++) Vn(n[e], t);
1653
+ } else Vn(e, t);
1653
1654
  }
1654
- var Ln = 0, Rn = 0, zn = 0;
1655
- function Bn(e, t) {
1655
+ var Rn = 0, zn = 0, Bn = 0;
1656
+ function Vn(e, t) {
1656
1657
  let n = e.type === "Feature" ? e.geometry : e, r = n.coordinates;
1657
1658
  (n.type === "Polygon" || n.type === "MultiLineString") && (r = [r]), n.type === "LineString" && (r = [[r]]);
1658
1659
  for (let e = 0; e < r.length; e++) for (let n = 0; n < r[e].length; n++) {
1659
1660
  let i = r[e][n][0], a = null;
1660
- Rn += 1;
1661
+ zn += 1;
1661
1662
  for (let o = 0; o < r[e][n].length - 1; o++) {
1662
1663
  a = r[e][n][o + 1];
1663
- let s = new Fn(i, Ln, Rn, zn), c = new Fn(a, Ln, Rn, zn + 1);
1664
- s.otherEvent = c, c.otherEvent = s, Nn(s, c) > 0 ? (c.isLeftEndpoint = !0, s.isLeftEndpoint = !1) : (s.isLeftEndpoint = !0, c.isLeftEndpoint = !1), t.push(s), t.push(c), i = a, zn += 1;
1664
+ let s = new In(i, Rn, zn, Bn), c = new In(a, Rn, zn, Bn + 1);
1665
+ s.otherEvent = c, c.otherEvent = s, Pn(s, c) > 0 ? (c.isLeftEndpoint = !0, s.isLeftEndpoint = !1) : (s.isLeftEndpoint = !0, c.isLeftEndpoint = !1), t.push(s), t.push(c), i = a, Bn += 1;
1665
1666
  }
1666
1667
  }
1667
- Ln += 1;
1668
+ Rn += 1;
1668
1669
  }
1669
- var Vn = class {
1670
+ var Hn = class {
1670
1671
  constructor(e) {
1671
1672
  this.leftSweepEvent = e, this.rightSweepEvent = e.otherEvent;
1672
1673
  }
1673
1674
  };
1674
- function Hn(e, t) {
1675
+ function Un(e, t) {
1675
1676
  if (e === null || t === null || e.leftSweepEvent.ringId === t.leftSweepEvent.ringId && (e.rightSweepEvent.isSamePoint(t.leftSweepEvent) || e.rightSweepEvent.isSamePoint(t.leftSweepEvent) || e.rightSweepEvent.isSamePoint(t.rightSweepEvent) || e.leftSweepEvent.isSamePoint(t.leftSweepEvent) || e.leftSweepEvent.isSamePoint(t.rightSweepEvent))) return !1;
1676
1677
  let n = e.leftSweepEvent.p.x, r = e.leftSweepEvent.p.y, i = e.rightSweepEvent.p.x, a = e.rightSweepEvent.p.y, o = t.leftSweepEvent.p.x, s = t.leftSweepEvent.p.y, c = t.rightSweepEvent.p.x, l = t.rightSweepEvent.p.y, u = (l - s) * (i - n) - (c - o) * (a - r), d = (c - o) * (r - s) - (l - s) * (n - o), f = (i - n) * (r - s) - (a - r) * (n - o);
1677
1678
  if (u === 0) return !1;
1678
1679
  let p = d / u, m = f / u;
1679
1680
  return p >= 0 && p <= 1 && m >= 0 && m <= 1 ? [n + p * (i - n), r + p * (a - r)] : !1;
1680
1681
  }
1681
- function Un(e, t) {
1682
+ function Wn(e, t) {
1682
1683
  t ||= !1;
1683
- let n = [], r = new jn([], Pn);
1684
+ let n = [], r = new Mn([], Fn);
1684
1685
  for (; e.length;) {
1685
1686
  let i = e.pop();
1686
1687
  if (i.isLeftEndpoint) {
1687
- let e = new Vn(i);
1688
+ let e = new Hn(i);
1688
1689
  for (let a = 0; a < r.data.length; a++) {
1689
1690
  let o = r.data[a];
1690
1691
  if (t && o.leftSweepEvent.featureId === i.featureId) continue;
1691
- let s = Hn(e, o);
1692
+ let s = Un(e, o);
1692
1693
  s !== !1 && n.push(s);
1693
1694
  }
1694
1695
  r.push(e);
@@ -1696,17 +1697,17 @@ function Un(e, t) {
1696
1697
  }
1697
1698
  return n;
1698
1699
  }
1699
- function Wn(e, t) {
1700
- let n = new jn([], Nn);
1701
- return In(e, n), Un(n, t);
1700
+ function Gn(e, t) {
1701
+ let n = new Mn([], Pn);
1702
+ return Ln(e, n), Wn(n, t);
1702
1703
  }
1703
1704
  //#endregion
1704
1705
  //#region node_modules/@turf/line-intersect/dist/esm/index.js
1705
- var Gn = Wn;
1706
- function Kn(e, t, n = {}) {
1706
+ var Kn = Gn;
1707
+ function qn(e, t, n = {}) {
1707
1708
  let { removeDuplicates: r = !0, ignoreSelfIntersections: i = !0 } = n, a = [];
1708
- e.type === "FeatureCollection" ? a = a.concat(e.features) : e.type === "Feature" ? a.push(e) : (e.type === "LineString" || e.type === "Polygon" || e.type === "MultiLineString" || e.type === "MultiPolygon") && a.push(F(e)), t.type === "FeatureCollection" ? a = a.concat(t.features) : t.type === "Feature" ? a.push(t) : (t.type === "LineString" || t.type === "Polygon" || t.type === "MultiLineString" || t.type === "MultiPolygon") && a.push(F(t));
1709
- let o = Gn(L(a), i), s = [];
1709
+ e.type === "FeatureCollection" ? a = a.concat(e.features) : e.type === "Feature" ? a.push(e) : (e.type === "LineString" || e.type === "Polygon" || e.type === "MultiLineString" || e.type === "MultiPolygon") && a.push(I(e)), t.type === "FeatureCollection" ? a = a.concat(t.features) : t.type === "Feature" ? a.push(t) : (t.type === "LineString" || t.type === "Polygon" || t.type === "MultiLineString" || t.type === "MultiPolygon") && a.push(I(t));
1710
+ let o = Kn(R(a), i), s = [];
1710
1711
  if (r) {
1711
1712
  let e = {};
1712
1713
  o.forEach((t) => {
@@ -1714,29 +1715,29 @@ function Kn(e, t, n = {}) {
1714
1715
  e[n] || (e[n] = !0, s.push(t));
1715
1716
  });
1716
1717
  } else s = o;
1717
- return L(s.map((e) => he(e)));
1718
+ return R(s.map((e) => he(e)));
1718
1719
  }
1719
1720
  //#endregion
1720
1721
  //#region node_modules/@turf/distance/dist/esm/index.js
1721
- function qn(e, t, n = {}) {
1722
- var r = B(e), i = B(t), a = R(i[1] - r[1]), o = R(i[0] - r[0]), s = R(r[1]), c = R(i[1]), l = Math.sin(a / 2) ** 2 + Math.sin(o / 2) ** 2 * Math.cos(s) * Math.cos(c);
1722
+ function Jn(e, t, n = {}) {
1723
+ var r = V(e), i = V(t), a = z(i[1] - r[1]), o = z(i[0] - r[0]), s = z(r[1]), c = z(i[1]), l = Math.sin(a / 2) ** 2 + Math.sin(o / 2) ** 2 * Math.cos(s) * Math.cos(c);
1723
1724
  return ye(2 * Math.atan2(Math.sqrt(l), Math.sqrt(1 - l)), n.units);
1724
1725
  }
1725
1726
  //#endregion
1726
1727
  //#region node_modules/@turf/nearest-point-on-line/dist/esm/index.js
1727
- var Jn = Object.defineProperty, Yn = Object.defineProperties, Xn = Object.getOwnPropertyDescriptors, Zn = Object.getOwnPropertySymbols, Qn = Object.prototype.hasOwnProperty, $n = Object.prototype.propertyIsEnumerable, er = (e, t, n) => t in e ? Jn(e, t, {
1728
+ var Yn = Object.defineProperty, Xn = Object.defineProperties, Zn = Object.getOwnPropertyDescriptors, Qn = Object.getOwnPropertySymbols, $n = Object.prototype.hasOwnProperty, er = Object.prototype.propertyIsEnumerable, tr = (e, t, n) => t in e ? Yn(e, t, {
1728
1729
  enumerable: !0,
1729
1730
  configurable: !0,
1730
1731
  writable: !0,
1731
1732
  value: n
1732
- }) : e[t] = n, tr = (e, t) => {
1733
- for (var n in t ||= {}) Qn.call(t, n) && er(e, n, t[n]);
1734
- if (Zn) for (var n of Zn(t)) $n.call(t, n) && er(e, n, t[n]);
1733
+ }) : e[t] = n, nr = (e, t) => {
1734
+ for (var n in t ||= {}) $n.call(t, n) && tr(e, n, t[n]);
1735
+ if (Qn) for (var n of Qn(t)) er.call(t, n) && tr(e, n, t[n]);
1735
1736
  return e;
1736
- }, nr = (e, t) => Yn(e, Xn(t));
1737
- function rr(e, t, n = {}) {
1737
+ }, rr = (e, t) => Xn(e, Zn(t));
1738
+ function ir(e, t, n = {}) {
1738
1739
  if (!e || !t) throw Error("lines and inputPoint are required arguments");
1739
- let r = B(t), i = he([Infinity, Infinity], {
1740
+ let r = V(t), i = he([Infinity, Infinity], {
1740
1741
  lineStringIndex: -1,
1741
1742
  segmentIndex: -1,
1742
1743
  totalDistance: -1,
@@ -1750,13 +1751,13 @@ function rr(e, t, n = {}) {
1750
1751
  }), a = 0, o = 0, s = -1;
1751
1752
  return Oe(e, function(e, c, l) {
1752
1753
  s !== l && (s = l, o = 0);
1753
- let u = V(e);
1754
+ let u = H(e);
1754
1755
  for (let e = 0; e < u.length - 1; e++) {
1755
- let s = he(u[e]), c = B(s), d = he(u[e + 1]), f = B(d), p = qn(s, d, n), m, h;
1756
- f[0] === r[0] && f[1] === r[1] ? [m, h] = [f, !0] : c[0] === r[0] && c[1] === r[1] ? [m, h] = [c, !1] : [m, h] = lr(c, f, r);
1757
- let g = qn(t, m, n);
1756
+ let s = he(u[e]), c = V(s), d = he(u[e + 1]), f = V(d), p = Jn(s, d, n), m, h;
1757
+ f[0] === r[0] && f[1] === r[1] ? [m, h] = [f, !0] : c[0] === r[0] && c[1] === r[1] ? [m, h] = [c, !1] : [m, h] = ur(c, f, r);
1758
+ let g = Jn(t, m, n);
1758
1759
  if (g < i.properties.pointDistance) {
1759
- let t = qn(s, m, n);
1760
+ let t = Jn(s, m, n);
1760
1761
  i = he(m, {
1761
1762
  lineStringIndex: l,
1762
1763
  segmentIndex: h ? e + 1 : e,
@@ -1768,7 +1769,7 @@ function rr(e, t, n = {}) {
1768
1769
  index: -1,
1769
1770
  location: -1,
1770
1771
  dist: Infinity
1771
- }), i.properties = nr(tr({}, i.properties), {
1772
+ }), i.properties = rr(nr({}, i.properties), {
1772
1773
  multiFeatureIndex: i.properties.lineStringIndex,
1773
1774
  index: i.properties.segmentIndex,
1774
1775
  location: i.properties.totalDistance,
@@ -1783,7 +1784,7 @@ function $(e, t) {
1783
1784
  let [n, r, i] = e, [a, o, s] = t;
1784
1785
  return n * a + r * o + i * s;
1785
1786
  }
1786
- function ir(e, t) {
1787
+ function ar(e, t) {
1787
1788
  let [n, r, i] = e, [a, o, s] = t;
1788
1789
  return [
1789
1790
  r * s - i * o,
@@ -1791,163 +1792,163 @@ function ir(e, t) {
1791
1792
  n * o - r * a
1792
1793
  ];
1793
1794
  }
1794
- function ar(e) {
1795
+ function or(e) {
1795
1796
  return Math.sqrt(e[0] ** 2 + e[1] ** 2 + e[2] ** 2);
1796
1797
  }
1797
- function or(e) {
1798
- let t = ar(e);
1798
+ function sr(e) {
1799
+ let t = or(e);
1799
1800
  return [
1800
1801
  e[0] / t,
1801
1802
  e[1] / t,
1802
1803
  e[2] / t
1803
1804
  ];
1804
1805
  }
1805
- function sr(e) {
1806
- let t = R(e[1]), n = R(e[0]);
1806
+ function cr(e) {
1807
+ let t = z(e[1]), n = z(e[0]);
1807
1808
  return [
1808
1809
  Math.cos(t) * Math.cos(n),
1809
1810
  Math.cos(t) * Math.sin(n),
1810
1811
  Math.sin(t)
1811
1812
  ];
1812
1813
  }
1813
- function cr(e) {
1814
+ function lr(e) {
1814
1815
  let [t, n, r] = e, i = Math.min(Math.max(r, -1), 1), a = be(Math.asin(i));
1815
1816
  return [be(Math.atan2(n, t)), a];
1816
1817
  }
1817
- function lr(e, t, n) {
1818
- let r = sr(e), i = sr(t), a = sr(n), o = ir(r, i);
1818
+ function ur(e, t, n) {
1819
+ let r = cr(e), i = cr(t), a = cr(n), o = ar(r, i);
1819
1820
  if (o[0] === 0 && o[1] === 0 && o[2] === 0) return $(r, i) > 0 ? [[...t], !0] : [[...n], !1];
1820
- let s = ir(o, a);
1821
+ let s = ar(o, a);
1821
1822
  if (s[0] === 0 && s[1] === 0 && s[2] === 0) return [[...t], !0];
1822
- let c = or(ir(s, o)), l = [
1823
+ let c = sr(ar(s, o)), l = [
1823
1824
  -c[0],
1824
1825
  -c[1],
1825
1826
  -c[2]
1826
- ], u = $(a, c) > $(a, l) ? c : l, d = or(o), f = $(ir(r, u), d), p = $(ir(u, i), d);
1827
- return f >= 0 && p >= 0 ? [cr(u), !1] : $(r, a) > $(i, a) ? [[...e], !1] : [[...t], !0];
1827
+ ], u = $(a, c) > $(a, l) ? c : l, d = sr(o), f = $(ar(r, u), d), p = $(ar(u, i), d);
1828
+ return f >= 0 && p >= 0 ? [lr(u), !1] : $(r, a) > $(i, a) ? [[...e], !1] : [[...t], !0];
1828
1829
  }
1829
1830
  //#endregion
1830
1831
  //#region node_modules/@turf/line-split/dist/esm/index.js
1831
- function ur(e, t) {
1832
+ function dr(e, t) {
1832
1833
  if (!e) throw Error("line is required");
1833
1834
  if (!t) throw Error("splitter is required");
1834
1835
  let n = Ue(e), r = Ue(t);
1835
1836
  if (n !== "LineString") throw Error("line must be LineString");
1836
1837
  if (r === "FeatureCollection") throw Error("splitter cannot be a FeatureCollection");
1837
1838
  if (r === "GeometryCollection") throw Error("splitter cannot be a GeometryCollection");
1838
- var i = Tn(t, { precision: 7 });
1839
- switch (e.type !== "Feature" && (e = F(e)), r) {
1840
- case "Point": return fr(e, i);
1841
- case "MultiPoint": return dr(e, i);
1839
+ var i = En(t, { precision: 7 });
1840
+ switch (e.type !== "Feature" && (e = I(e)), r) {
1841
+ case "Point": return pr(e, i);
1842
+ case "MultiPoint": return fr(e, i);
1842
1843
  case "LineString":
1843
1844
  case "MultiLineString":
1844
1845
  case "Polygon":
1845
- case "MultiPolygon": return dr(e, Kn(e, i, { ignoreSelfIntersections: !0 }));
1846
+ case "MultiPolygon": return fr(e, qn(e, i, { ignoreSelfIntersections: !0 }));
1846
1847
  }
1847
1848
  }
1848
- function dr(e, t) {
1849
- var n = [], r = wn();
1849
+ function fr(e, t) {
1850
+ var n = [], r = Tn();
1850
1851
  return Oe(t, function(t) {
1851
1852
  if (n.forEach(function(e, t) {
1852
1853
  e.id = t;
1853
- }), !n.length) n = fr(e, t).features, r.load(L(n));
1854
+ }), !n.length) n = pr(e, t).features, r.load(R(n));
1854
1855
  else {
1855
1856
  var i = r.search(t);
1856
1857
  if (i.features.length) {
1857
- var a = pr(t, i);
1858
+ var a = mr(t, i);
1858
1859
  n = n.filter(function(e) {
1859
1860
  return e.id !== a.id;
1860
- }), r.remove(a), we(fr(a, t), function(e) {
1861
+ }), r.remove(a), we(pr(a, t), function(e) {
1861
1862
  n.push(e), r.insert(e);
1862
1863
  });
1863
1864
  }
1864
1865
  }
1865
- }), L(n);
1866
+ }), R(n);
1866
1867
  }
1867
- function fr(e, t) {
1868
- var n = [], r = V(e)[0], i = V(e)[e.geometry.coordinates.length - 1];
1869
- if (mr(r, B(t)) || mr(i, B(t))) return L([e]);
1870
- var a = wn(), o = Dn(e);
1868
+ function pr(e, t) {
1869
+ var n = [], r = H(e)[0], i = H(e)[e.geometry.coordinates.length - 1];
1870
+ if (hr(r, V(t)) || hr(i, V(t))) return R([e]);
1871
+ var a = Tn(), o = On(e);
1871
1872
  a.load(o);
1872
1873
  var s = a.search(t);
1873
- if (!s.features.length) return L([e]);
1874
- var c = pr(t, s), l = Te(o, function(e, r, i) {
1875
- var a = V(r)[1], o = B(t);
1876
- return i === c.id ? (e.push(o), n.push(I(e)), mr(o, a) ? [o] : [o, a]) : (e.push(a), e);
1874
+ if (!s.features.length) return R([e]);
1875
+ var c = mr(t, s), l = Te(o, function(e, r, i) {
1876
+ var a = H(r)[1], o = V(t);
1877
+ return i === c.id ? (e.push(o), n.push(L(e)), hr(o, a) ? [o] : [o, a]) : (e.push(a), e);
1877
1878
  }, [r]);
1878
- return l.length > 1 && n.push(I(l)), L(n);
1879
+ return l.length > 1 && n.push(L(l)), R(n);
1879
1880
  }
1880
- function pr(e, t) {
1881
+ function mr(e, t) {
1881
1882
  if (!t.features.length) throw Error("lines must contain features");
1882
1883
  if (t.features.length === 1) return t.features[0];
1883
1884
  var n, r = Infinity;
1884
1885
  return we(t, function(t) {
1885
- var i = rr(t, e).properties.dist;
1886
+ var i = ir(t, e).properties.dist;
1886
1887
  i < r && (n = t, r = i);
1887
1888
  }), n;
1888
1889
  }
1889
- function mr(e, t) {
1890
+ function hr(e, t) {
1890
1891
  return e[0] === t[0] && e[1] === t[1];
1891
1892
  }
1892
1893
  //#endregion
1893
1894
  //#region node_modules/@turf/boolean-contains/dist/esm/index.js
1894
- function hr(e, t) {
1895
- let n = H(e), r = H(t), i = n.type, a = r.type, o = n.coordinates, s = r.coordinates;
1895
+ function gr(e, t) {
1896
+ let n = U(e), r = U(t), i = n.type, a = r.type, o = n.coordinates, s = r.coordinates;
1896
1897
  switch (i) {
1897
1898
  case "Point": switch (a) {
1898
- case "Point": return Dr(o, s);
1899
+ case "Point": return Or(o, s);
1899
1900
  default: throw Error("feature2 " + a + " geometry not supported");
1900
1901
  }
1901
1902
  case "MultiPoint": switch (a) {
1902
- case "Point": return vr(n, r);
1903
- case "MultiPoint": return yr(n, r);
1903
+ case "Point": return yr(n, r);
1904
+ case "MultiPoint": return br(n, r);
1904
1905
  default: throw Error("feature2 " + a + " geometry not supported");
1905
1906
  }
1906
1907
  case "LineString": switch (a) {
1907
- case "Point": return U(r, n, { ignoreEndVertices: !0 });
1908
- case "LineString": return Sr(n, r);
1909
- case "MultiPoint": return br(n, r);
1908
+ case "Point": return W(r, n, { ignoreEndVertices: !0 });
1909
+ case "LineString": return Cr(n, r);
1910
+ case "MultiPoint": return xr(n, r);
1910
1911
  default: throw Error("feature2 " + a + " geometry not supported");
1911
1912
  }
1912
1913
  case "Polygon": switch (a) {
1913
- case "Point": return yn(r, n, { ignoreBoundary: !0 });
1914
- case "LineString": return wr(n, r);
1915
- case "Polygon": return Tr(n, r);
1916
- case "MultiPoint": return xr(n, r);
1917
- case "MultiPolygon": return _r(n, r);
1914
+ case "Point": return bn(r, n, { ignoreBoundary: !0 });
1915
+ case "LineString": return Tr(n, r);
1916
+ case "Polygon": return Er(n, r);
1917
+ case "MultiPoint": return Sr(n, r);
1918
+ case "MultiPolygon": return vr(n, r);
1918
1919
  default: throw Error("feature2 " + a + " geometry not supported");
1919
1920
  }
1920
1921
  case "MultiPolygon": switch (a) {
1921
- case "Polygon": return gr(n, r);
1922
+ case "Polygon": return _r(n, r);
1922
1923
  default: throw Error("feature2 " + a + " geometry not supported");
1923
1924
  }
1924
1925
  default: throw Error("feature1 " + i + " geometry not supported");
1925
1926
  }
1926
1927
  }
1927
- function gr(e, t) {
1928
- return e.coordinates.some((e) => Tr({
1928
+ function _r(e, t) {
1929
+ return e.coordinates.some((e) => Er({
1929
1930
  type: "Polygon",
1930
1931
  coordinates: e
1931
1932
  }, t));
1932
1933
  }
1933
- function _r(e, t) {
1934
- return t.coordinates.every((t) => Tr(e, {
1934
+ function vr(e, t) {
1935
+ return t.coordinates.every((t) => Er(e, {
1935
1936
  type: "Polygon",
1936
1937
  coordinates: t
1937
1938
  }));
1938
1939
  }
1939
- function vr(e, t) {
1940
+ function yr(e, t) {
1940
1941
  let n, r = !1;
1941
- for (n = 0; n < e.coordinates.length; n++) if (Dr(e.coordinates[n], t.coordinates)) {
1942
+ for (n = 0; n < e.coordinates.length; n++) if (Or(e.coordinates[n], t.coordinates)) {
1942
1943
  r = !0;
1943
1944
  break;
1944
1945
  }
1945
1946
  return r;
1946
1947
  }
1947
- function yr(e, t) {
1948
+ function br(e, t) {
1948
1949
  for (let n of t.coordinates) {
1949
1950
  let t = !1;
1950
- for (let r of e.coordinates) if (Dr(n, r)) {
1951
+ for (let r of e.coordinates) if (Or(n, r)) {
1951
1952
  t = !0;
1952
1953
  break;
1953
1954
  }
@@ -1955,78 +1956,78 @@ function yr(e, t) {
1955
1956
  }
1956
1957
  return !0;
1957
1958
  }
1958
- function br(e, t) {
1959
+ function xr(e, t) {
1959
1960
  let n = !1;
1960
- for (let r of t.coordinates) if (U(r, e, { ignoreEndVertices: !0 }) && (n = !0), !U(r, e)) return !1;
1961
+ for (let r of t.coordinates) if (W(r, e, { ignoreEndVertices: !0 }) && (n = !0), !W(r, e)) return !1;
1961
1962
  return !!n;
1962
1963
  }
1963
- function xr(e, t) {
1964
- for (let n of t.coordinates) if (!yn(n, e, { ignoreBoundary: !0 })) return !1;
1964
+ function Sr(e, t) {
1965
+ for (let n of t.coordinates) if (!bn(n, e, { ignoreBoundary: !0 })) return !1;
1965
1966
  return !0;
1966
1967
  }
1967
- function Sr(e, t) {
1968
+ function Cr(e, t) {
1968
1969
  let n = !1;
1969
- for (let r of t.coordinates) if (U({
1970
+ for (let r of t.coordinates) if (W({
1970
1971
  type: "Point",
1971
1972
  coordinates: r
1972
- }, e, { ignoreEndVertices: !0 }) && (n = !0), !U({
1973
+ }, e, { ignoreEndVertices: !0 }) && (n = !0), !W({
1973
1974
  type: "Point",
1974
1975
  coordinates: r
1975
1976
  }, e, { ignoreEndVertices: !1 })) return !1;
1976
1977
  return n;
1977
1978
  }
1978
- function Cr(e, t) {
1979
+ function wr(e, t) {
1979
1980
  let n = e.coordinates, r = [];
1980
1981
  for (let e = 0; e < n.length - 1; e++) {
1981
- let i = I([n[e], n[e + 1]]), a = ur(i, F(t));
1982
+ let i = L([n[e], n[e + 1]]), a = dr(i, I(t));
1982
1983
  a.features.length === 0 ? r.push(i) : r.push(...a.features);
1983
1984
  }
1984
- return L(r);
1985
+ return R(r);
1985
1986
  }
1986
- function wr(e, t) {
1987
- if (!Er(G(e), G(t))) return !1;
1988
- for (let n of t.coordinates) if (!yn(n, e)) return !1;
1989
- let n = !1, r = Cr(t, e);
1987
+ function Tr(e, t) {
1988
+ if (!Dr(K(e), K(t))) return !1;
1989
+ for (let n of t.coordinates) if (!bn(n, e)) return !1;
1990
+ let n = !1, r = wr(t, e);
1990
1991
  for (let t of r.features) {
1991
- let r = Or(t.geometry.coordinates[0], t.geometry.coordinates[1]);
1992
- if (!yn(r, e)) return !1;
1993
- !n && yn(r, e, { ignoreBoundary: !0 }) && (n = !0);
1992
+ let r = kr(t.geometry.coordinates[0], t.geometry.coordinates[1]);
1993
+ if (!bn(r, e)) return !1;
1994
+ !n && bn(r, e, { ignoreBoundary: !0 }) && (n = !0);
1994
1995
  }
1995
1996
  return n;
1996
1997
  }
1997
- function Tr(e, t) {
1998
- if (e.type === "Feature" && e.geometry === null || t.type === "Feature" && t.geometry === null || !Er(G(e), G(t))) return !1;
1999
- let n = H(t).coordinates;
2000
- for (let t of n) for (let n of t) if (!yn(n, e)) return !1;
1998
+ function Er(e, t) {
1999
+ if (e.type === "Feature" && e.geometry === null || t.type === "Feature" && t.geometry === null || !Dr(K(e), K(t))) return !1;
2000
+ let n = U(t).coordinates;
2001
+ for (let t of n) for (let n of t) if (!bn(n, e)) return !1;
2001
2002
  return !0;
2002
2003
  }
2003
- function Er(e, t) {
2004
+ function Dr(e, t) {
2004
2005
  return !(e[0] > t[0] || e[2] < t[2] || e[1] > t[1] || e[3] < t[3]);
2005
2006
  }
2006
- function Dr(e, t) {
2007
+ function Or(e, t) {
2007
2008
  return e[0] === t[0] && e[1] === t[1];
2008
2009
  }
2009
- function Or(e, t) {
2010
+ function kr(e, t) {
2010
2011
  return [(e[0] + t[0]) / 2, (e[1] + t[1]) / 2];
2011
2012
  }
2012
- var kr = hr;
2013
+ var Ar = gr;
2013
2014
  //#endregion
2014
2015
  //#region node_modules/@turf/envelope/dist/esm/index.js
2015
- function Ar(e) {
2016
- return rn(G(e));
2016
+ function jr(e) {
2017
+ return an(K(e));
2017
2018
  }
2018
- var jr = Ar;
2019
+ var Mr = jr;
2019
2020
  //#endregion
2020
2021
  //#region src/utils/geom.ts
2021
- function Mr(e) {
2022
+ function Nr(e) {
2022
2023
  return e.geometry && (e.geometry.type === "LineString" || e.geometry.type === "MultiLineString" || e.geometry.type === "Polygon" || e.geometry.type === "MultiPolygon");
2023
2024
  }
2024
- function Nr(e, t) {
2025
- let n = e.map((e) => e.geometry ? e.geometry.type === "Point" || e.geometry.type === "MultiPoint" ? kr(an(t), e) ? e : null : Mr(e) ? nn(e, t) : null : null).filter((e) => e !== null);
2026
- return n.length === 0 ? null : jr(L(n));
2025
+ function Pr(e, t) {
2026
+ let n = e.map((e) => e.geometry ? e.geometry.type === "Point" || e.geometry.type === "MultiPoint" ? Ar(on(t), e) ? e : null : Nr(e) ? rn(e, t) : null : null).filter((e) => e !== null);
2027
+ return n.length === 0 ? null : Mr(R(n));
2027
2028
  }
2028
- var Pr = .001, Fr = 1e-4;
2029
- function Ir(e, t) {
2029
+ var Fr = .001, Ir = 1e-4;
2030
+ function Lr(e, t) {
2030
2031
  return [
2031
2032
  e[0] - t,
2032
2033
  e[1] - t,
@@ -2034,15 +2035,15 @@ function Ir(e, t) {
2034
2035
  e[3] + t
2035
2036
  ];
2036
2037
  }
2037
- function Lr(e) {
2038
- return Ir(e, Pr);
2039
- }
2040
2038
  function Rr(e) {
2041
- return Ir(e, Fr);
2039
+ return Lr(e, Fr);
2040
+ }
2041
+ function zr(e) {
2042
+ return Lr(e, Ir);
2042
2043
  }
2043
2044
  //#endregion
2044
2045
  //#region src/components/VMap.vue?vue&type=script&setup=true&lang.ts
2045
- var zr = ["id"], Br = /* @__PURE__ */ xt(/* @__PURE__ */ l({
2046
+ var Br = ["id"], Vr = /* @__PURE__ */ xt(/* @__PURE__ */ l({
2046
2047
  __name: "VMap",
2047
2048
  props: {
2048
2049
  id: {},
@@ -2055,18 +2056,18 @@ var zr = ["id"], Br = /* @__PURE__ */ xt(/* @__PURE__ */ l({
2055
2056
  left: 60,
2056
2057
  right: 60,
2057
2058
  bottom: 80
2058
- }, a = E(), o = E(!1), s = E(), c = E(), l;
2059
- j(o, (e) => {
2059
+ }, a = D(), o = D(!1), s = D(), c = D(), l;
2060
+ M(o, (e) => {
2060
2061
  e ? u() : (a.value && a.value.remove(), a.value = void 0);
2061
- }), j(() => t.features, (e) => {
2062
+ }), M(() => t.features, (e) => {
2062
2063
  a.value && o.value && e && (a.value.remove(), a.value = void 0, u());
2063
2064
  });
2064
2065
  function u() {
2065
2066
  if (!a.value) {
2066
- l = t.bbox ? Lr(t.bbox) : void 0;
2067
- let e = l ? Nr(t.features, l) : L(t.features);
2067
+ l = t.bbox ? Rr(t.bbox) : void 0;
2068
+ let e = l ? Pr(t.features, l) : R(t.features);
2068
2069
  if (e) {
2069
- let i = Rr(Ct(e)), o = [[i[0], i[1]], [i[2], i[3]]];
2070
+ let i = zr(Ct(e)), o = [[i[0], i[1]], [i[2], i[3]]];
2070
2071
  a.value = new ie.Map({
2071
2072
  hash: !1,
2072
2073
  container: `map-${t.id}`,
@@ -2101,11 +2102,11 @@ var zr = ["id"], Br = /* @__PURE__ */ xt(/* @__PURE__ */ l({
2101
2102
  },
2102
2103
  properties: {}
2103
2104
  }
2104
- }), a.value.addLayer(q.Bbox);
2105
+ }), a.value.addLayer(J.Bbox);
2105
2106
  }
2106
2107
  function f() {
2107
2108
  if (!a.value) throw Error("Call initMap() function first.");
2108
- l && d(l), a.value.addSource(K, {
2109
+ l && d(l), a.value.addSource(q, {
2109
2110
  type: "geojson",
2110
2111
  data: {
2111
2112
  type: "FeatureCollection",
@@ -2115,20 +2116,20 @@ var zr = ["id"], Br = /* @__PURE__ */ xt(/* @__PURE__ */ l({
2115
2116
  }
2116
2117
  function m() {
2117
2118
  if (!a.value) throw Error("Call initMap() function first.");
2118
- a.value.getLayer(q.Polygon.id) || a.value.addLayer(q.Polygon), a.value.getLayer(q.PolygonBorder.id) || a.value.addLayer(q.PolygonBorder), a.value.getLayer(q.LineStringBorder.id) || a.value.addLayer(q.LineStringBorder), a.value.getLayer(q.LineString.id) || a.value.addLayer(q.LineString), a.value.getLayer(q.Point.id) || a.value.addLayer(q.Point);
2119
+ a.value.getLayer(J.Polygon.id) || a.value.addLayer(J.Polygon), a.value.getLayer(J.PolygonBorder.id) || a.value.addLayer(J.PolygonBorder), a.value.getLayer(J.LineStringBorder.id) || a.value.addLayer(J.LineStringBorder), a.value.getLayer(J.LineString.id) || a.value.addLayer(J.LineString), a.value.getLayer(J.Point.id) || a.value.addLayer(J.Point);
2119
2120
  }
2120
2121
  function h(e) {
2121
- !e.features || e.features.length === 0 || (c.value !== void 0 && x(), c.value = e.features[0], y(e.lngLat, e.features[0]));
2122
+ !e.features || e.features.length === 0 || (c.value !== void 0 && b(), c.value = e.features[0], y(e.lngLat, e.features[0]));
2122
2123
  }
2123
2124
  function g() {
2124
2125
  a.value.getCanvas().style.cursor = "pointer";
2125
2126
  }
2126
2127
  function _() {
2127
- a.value.getCanvas().style.cursor = "", c.value !== void 0 && (c.value = void 0), x();
2128
+ a.value.getCanvas().style.cursor = "", c.value !== void 0 && (c.value = void 0), b();
2128
2129
  }
2129
2130
  function v() {
2130
2131
  if (!a.value) throw Error("Call initMap() function first.");
2131
- Object.values(q).forEach((e) => {
2132
+ Object.values(J).forEach((e) => {
2132
2133
  e.id !== "bbox-layer" && (a.value.on("mousemove", e.id, h), a.value.on("mouseenter", e.id, g), a.value.on("mouseleave", e.id, _));
2133
2134
  });
2134
2135
  }
@@ -2136,24 +2137,33 @@ var zr = ["id"], Br = /* @__PURE__ */ xt(/* @__PURE__ */ l({
2136
2137
  if (!a.value) throw Error("Call initMap() function first.");
2137
2138
  s.value = new ie.Popup().setLngLat(e).setHTML(`${rt[t.properties.objtype]}-${t.properties.id}-v${t.properties.version}`).addTo(a.value);
2138
2139
  }
2139
- function x() {
2140
+ function b() {
2140
2141
  s.value?.remove(), s.value = void 0;
2141
2142
  }
2142
2143
  function S([e]) {
2143
2144
  o.value = e?.isIntersecting || !1;
2144
2145
  }
2145
- return (t, n) => re((b(), i("div", {
2146
+ return (t, n) => re((x(), i("div", {
2146
2147
  id: `map-${e.id}`,
2147
2148
  class: "v-map"
2148
- }, null, 8, zr)), [[A(Kt), S]]);
2149
+ }, null, 8, Br)), [[j(Kt), S]]);
2149
2150
  }
2150
- }), [["__scopeId", "data-v-e1815a55"]]), Vr = ["id"], Hr = { class: "group-header" }, Ur = { class: "header-start" }, Wr = ["href"], Gr = ["title"], Kr = { class: "header-center" }, qr = {
2151
+ }), [["__scopeId", "data-v-e1815a55"]]), Hr = ["id"], Ur = { class: "group-header" }, Wr = { class: "header-start" }, Gr = ["href"], Kr = ["title"], qr = {
2152
+ key: 0,
2153
+ class: "name-before"
2154
+ }, Jr = {
2155
+ key: 1,
2156
+ class: "name-separator"
2157
+ }, Yr = {
2158
+ key: 2,
2159
+ class: "name-after"
2160
+ }, Xr = { class: "header-center" }, Zr = {
2151
2161
  key: 0,
2152
2162
  class: "header-end"
2153
- }, Jr = { class: "group-content" }, Yr = {
2163
+ }, Qr = { class: "group-content" }, $r = {
2154
2164
  key: 0,
2155
2165
  class: "content-start"
2156
- }, Xr = { class: "before-list" }, Zr = { class: "after-list" }, Qr = /* @__PURE__ */ xt(/* @__PURE__ */ l({
2166
+ }, ei = { class: "before-list" }, ti = { class: "after-list" }, ni = /* @__PURE__ */ xt(/* @__PURE__ */ l({
2157
2167
  __name: "LoChaGroup",
2158
2168
  props: {
2159
2169
  id: {},
@@ -2163,66 +2173,82 @@ var zr = ["id"], Br = /* @__PURE__ */ xt(/* @__PURE__ */ l({
2163
2173
  },
2164
2174
  emits: ["navigate"],
2165
2175
  setup(n) {
2166
- ee((e) => ({ v67f2bcc7: u.value }));
2167
- let c = n, l = te(), u = t(() => l["content-start"] ? "repeat(4, minmax(0, 1fr))" : "repeat(3, minmax(0, 1fr))"), d = p(tt), { loCha: f, getBeforeFeatures: m, getAfterFeatures: h } = p(et);
2168
- if (!f.value) throw Error("LoCha is empty.");
2169
- let g = t(() => {
2170
- let e = [...new Set(m(c.features).map((e) => e.properties.tags?.name).filter(Boolean))], t = [...new Set(h(c.features).map((e) => e.properties.tags?.name).filter(Boolean))], n = e.length > 0 ? e.join(", ") : "(unnamed)", r = t.length > 0 ? t.join(", ") : "(unnamed)";
2171
- return n === r ? n : `${n} → ${r}`;
2176
+ ee((e) => ({
2177
+ cd71894a: u.value,
2178
+ v0e080b8e: d.value
2179
+ }));
2180
+ let c = n, l = te(), u = t(() => l["content-start"] ? "repeat(4, minmax(0, 1fr))" : "repeat(3, minmax(0, 1fr))"), d = t(() => l["header-end"] ? "minmax(0, 1fr) minmax(0, 1fr) auto" : "minmax(0, 1fr) minmax(0, 1fr)"), f = p(tt), { loCha: m, getBeforeFeatures: h, getAfterFeatures: g } = p(et);
2181
+ if (!m.value) throw Error("LoCha is empty.");
2182
+ let _ = t(() => {
2183
+ let e = [...new Set(h(c.features).map((e) => e.properties.tags?.name).filter(Boolean))], t = [...new Set(g(c.features).map((e) => e.properties.tags?.name).filter(Boolean))], n = e.length > 0 ? e.join(", ") : null, r = t.length > 0 ? t.join(", ") : null;
2184
+ return n === r ? {
2185
+ before: null,
2186
+ after: r
2187
+ } : {
2188
+ before: n,
2189
+ after: r
2190
+ };
2191
+ }), v = t(() => {
2192
+ let { before: e, after: t } = _.value;
2193
+ return e && t ? `${e} → ${t}` : e ?? t ?? void 0;
2172
2194
  });
2173
- return (t, l) => (b(), i("div", {
2195
+ return (t, l) => (x(), i("div", {
2174
2196
  id: n.id,
2175
2197
  class: "locha-group"
2176
- }, [a("div", Hr, [
2177
- a("div", Ur, [a("a", {
2198
+ }, [a("div", Ur, [
2199
+ a("div", Wr, [a("a", {
2178
2200
  class: "anchor-button",
2179
2201
  href: `#${n.id}`,
2180
- onClick: l[0] ||= N((e) => t.$emit("navigate", `#${n.id}`), ["prevent"])
2181
- }, "🔗", 8, Wr), a("h3", {
2202
+ onClick: l[0] ||= P((e) => t.$emit("navigate", `#${n.id}`), ["prevent"])
2203
+ }, "🔗", 8, Gr), a("h3", {
2182
2204
  class: "group-name",
2183
- title: g.value
2184
- }, D(g.value), 9, Gr)]),
2185
- a("div", Kr, [T(t.$slots, "header-center", { index: n.index }, void 0, !0)]),
2186
- t.$slots["header-end"] ? (b(), i("div", qr, [T(t.$slots, "header-end", { index: n.index }, void 0, !0)])) : r("", !0)
2187
- ]), a("div", Jr, [
2188
- t.$slots["content-start"] ? (b(), i("div", Yr, [T(t.$slots, "content-start", { index: n.index }, void 0, !0)])) : r("", !0),
2189
- a("div", Xr, [a("ul", null, [(b(!0), i(e, null, w(A(m)(n.features), (e) => (b(), i("li", { key: e.id }, [s(St, {
2205
+ title: v.value
2206
+ }, [
2207
+ _.value.before ? (x(), i("span", qr, O(_.value.before), 1)) : r("", !0),
2208
+ _.value.before ? (x(), i("span", Jr, " ")) : r("", !0),
2209
+ _.value.after ? (x(), i("span", Yr, O(_.value.after), 1)) : r("", !0)
2210
+ ], 8, Kr)]),
2211
+ a("div", Xr, [E(t.$slots, "header-center", { index: n.index }, void 0, !0)]),
2212
+ t.$slots["header-end"] ? (x(), i("div", Zr, [E(t.$slots, "header-end", { index: n.index }, void 0, !0)])) : r("", !0)
2213
+ ]), a("div", Qr, [
2214
+ t.$slots["content-start"] ? (x(), i("div", $r, [E(t.$slots, "content-start", { index: n.index }, void 0, !0)])) : r("", !0),
2215
+ a("div", ei, [a("ul", null, [(x(!0), i(e, null, T(j(h)(n.features), (e) => (x(), i("li", { key: e.id }, [s(St, {
2190
2216
  feature: e,
2191
2217
  "josm-target": n.josmTarget
2192
2218
  }, o({ _: 2 }, [t.$slots["object-detail"] ? {
2193
2219
  name: "object-detail",
2194
- fn: M(() => [T(t.$slots, "object-detail", {
2220
+ fn: N(() => [E(t.$slots, "object-detail", {
2195
2221
  feature: e,
2196
2222
  index: n.index
2197
2223
  }, void 0, !0)]),
2198
2224
  key: "0"
2199
2225
  } : void 0]), 1032, ["feature", "josm-target"])]))), 128))])]),
2200
- a("div", Zr, [a("ul", null, [(b(!0), i(e, null, w(A(h)(n.features), (e) => (b(), i("li", { key: e.id }, [s(St, {
2226
+ a("div", ti, [a("ul", null, [(x(!0), i(e, null, T(j(g)(n.features), (e) => (x(), i("li", { key: e.id }, [s(St, {
2201
2227
  feature: e,
2202
2228
  "josm-target": n.josmTarget
2203
2229
  }, o({ _: 2 }, [t.$slots["object-detail"] ? {
2204
2230
  name: "object-detail",
2205
- fn: M(() => [T(t.$slots, "object-detail", {
2231
+ fn: N(() => [E(t.$slots, "object-detail", {
2206
2232
  feature: e,
2207
2233
  index: n.index
2208
2234
  }, void 0, !0)]),
2209
2235
  key: "0"
2210
2236
  } : void 0]), 1032, ["feature", "josm-target"])]))), 128))])]),
2211
- s(Br, {
2212
- id: `${A(d)}-${c.index}`,
2237
+ s(Vr, {
2238
+ id: `${j(f)}-${c.index}`,
2213
2239
  features: n.features,
2214
- bbox: A(f)?.bbox
2240
+ bbox: j(m)?.bbox
2215
2241
  }, null, 8, [
2216
2242
  "id",
2217
2243
  "features",
2218
2244
  "bbox"
2219
2245
  ])
2220
- ])], 8, Vr));
2246
+ ])], 8, Hr));
2221
2247
  }
2222
- }), [["__scopeId", "data-v-5b721cff"]]);
2248
+ }), [["__scopeId", "data-v-da7a6115"]]);
2223
2249
  //#endregion
2224
2250
  //#region src/utils/scrollToSection.ts
2225
- function $r(e, t = {}) {
2251
+ function ri(e, t = {}) {
2226
2252
  let { container: n = document, behavior: r = "smooth", block: i = "start", inline: a = "nearest" } = t, o = e.startsWith("#") ? e.slice(1) : e, s = n.querySelector(`#${CSS.escape(o)}`);
2227
2253
  return s ? (s.scrollIntoView({
2228
2254
  behavior: r,
@@ -2232,58 +2258,80 @@ function $r(e, t = {}) {
2232
2258
  }
2233
2259
  //#endregion
2234
2260
  //#region src/components/LoCha/LoChaGroupList.vue?vue&type=script&setup=true&lang.ts
2235
- var ei = ["name"], ti = /* @__PURE__ */ xt(/* @__PURE__ */ l({
2261
+ var ii = ["name"], ai = /* @__PURE__ */ xt(/* @__PURE__ */ l({
2236
2262
  __name: "LoChaGroupList",
2237
2263
  props: { hash: {} },
2238
2264
  setup(t) {
2239
- ee((e) => ({ bf57d7a0: A(l) }));
2240
- let n = t, { groups: r } = p(et), c = p(tt), l = W.delete, u = C(), d = ne("listRef");
2265
+ ee((e) => ({ v32a2838c: j(l) }));
2266
+ let n = t, { groups: r } = p(et), c = p(tt), l = G.delete, u = w(), d = ne("listRef");
2241
2267
  function f(e) {
2242
2268
  return `locha-${c}-group-${e}`;
2243
2269
  }
2244
2270
  function _() {
2245
2271
  return `hidden_josm_target_${c}`;
2246
2272
  }
2247
- function y(e) {
2248
- u.value = e, history.replaceState(null, "", e), h(() => $r(e, { container: d.value ?? void 0 }));
2273
+ let y = !1;
2274
+ function S(e) {
2275
+ if (u.value === e) {
2276
+ y = !0, u.value = void 0, history.replaceState(null, "", `${location.pathname}${location.search}`), window.dispatchEvent(new CustomEvent("locha-navigate", { detail: {
2277
+ hash: void 0,
2278
+ instanceId: c
2279
+ } })), h(() => {
2280
+ y = !1;
2281
+ });
2282
+ return;
2283
+ }
2284
+ y = !0, u.value = e, history.replaceState(null, "", e), window.dispatchEvent(new CustomEvent("locha-navigate", { detail: {
2285
+ hash: e,
2286
+ instanceId: c
2287
+ } })), h(() => {
2288
+ y = !1, ri(e, { container: d.value ?? void 0 });
2289
+ });
2290
+ }
2291
+ function C(e) {
2292
+ let { instanceId: t } = e.detail;
2293
+ t !== c && (u.value = void 0);
2249
2294
  }
2250
- return j(() => n.hash, (e) => {
2251
- u.value = e, e && h(() => $r(e, { container: d.value ?? void 0 }));
2295
+ return M(() => n.hash, (e) => {
2296
+ y || (u.value = e, e && h(() => ri(e, { container: d.value ?? void 0 })));
2252
2297
  }, { immediate: !0 }), v(() => {
2298
+ window.addEventListener("locha-navigate", C);
2253
2299
  let e = window.location.hash;
2254
- e && !n.hash && y(e);
2255
- }), (t, n) => (b(), i("div", {
2300
+ e && !n.hash && S(e);
2301
+ }), b(() => {
2302
+ window.removeEventListener("locha-navigate", C);
2303
+ }), (t, n) => (x(), i("div", {
2256
2304
  ref_key: "listRef",
2257
2305
  ref: d,
2258
2306
  class: "locha-group-list"
2259
- }, [a("ul", null, [(b(!0), i(e, null, w(A(r), (e, n) => (b(), i("li", {
2307
+ }, [a("ul", null, [(x(!0), i(e, null, T(j(r), (e, n) => (x(), i("li", {
2260
2308
  key: n,
2261
2309
  class: g({ selected: u.value === `#${f(n)}` })
2262
- }, [s(Qr, {
2310
+ }, [s(ni, {
2263
2311
  id: f(n),
2264
2312
  features: e,
2265
2313
  index: n,
2266
2314
  "josm-target": _(),
2267
- onNavigate: y
2315
+ onNavigate: S
2268
2316
  }, o({ _: 2 }, [
2269
2317
  t.$slots["object-detail"] ? {
2270
2318
  name: "object-detail",
2271
- fn: M((e) => [T(t.$slots, "object-detail", m({ ref_for: !0 }, e), void 0, !0)]),
2319
+ fn: N((e) => [E(t.$slots, "object-detail", m({ ref_for: !0 }, e), void 0, !0)]),
2272
2320
  key: "0"
2273
2321
  } : void 0,
2274
2322
  t.$slots["header-center"] ? {
2275
2323
  name: "header-center",
2276
- fn: M((e) => [T(t.$slots, "header-center", m({ ref_for: !0 }, e), void 0, !0)]),
2324
+ fn: N((e) => [E(t.$slots, "header-center", m({ ref_for: !0 }, e), void 0, !0)]),
2277
2325
  key: "1"
2278
2326
  } : void 0,
2279
2327
  t.$slots["header-end"] ? {
2280
2328
  name: "header-end",
2281
- fn: M((e) => [T(t.$slots, "header-end", m({ ref_for: !0 }, e), void 0, !0)]),
2329
+ fn: N((e) => [E(t.$slots, "header-end", m({ ref_for: !0 }, e), void 0, !0)]),
2282
2330
  key: "2"
2283
2331
  } : void 0,
2284
2332
  t.$slots["content-start"] ? {
2285
2333
  name: "content-start",
2286
- fn: M((e) => [T(t.$slots, "content-start", m({ ref_for: !0 }, e), void 0, !0)]),
2334
+ fn: N((e) => [E(t.$slots, "content-start", m({ ref_for: !0 }, e), void 0, !0)]),
2287
2335
  key: "3"
2288
2336
  } : void 0
2289
2337
  ]), 1032, [
@@ -2294,12 +2342,12 @@ var ei = ["name"], ti = /* @__PURE__ */ xt(/* @__PURE__ */ l({
2294
2342
  ])], 2))), 128))]), a("iframe", {
2295
2343
  name: _(),
2296
2344
  style: { display: "none" }
2297
- }, null, 8, ei)], 512));
2345
+ }, null, 8, ii)], 512));
2298
2346
  }
2299
- }), [["__scopeId", "data-v-d3c72fff"]]), ni = { class: "locha" }, ri = {
2347
+ }), [["__scopeId", "data-v-178acf78"]]), oi = { class: "locha" }, si = {
2300
2348
  key: 0,
2301
2349
  class: "user-feedback"
2302
- }, ii = /* @__PURE__ */ xt(/* @__PURE__ */ l({
2350
+ }, ci = /* @__PURE__ */ xt(/* @__PURE__ */ l({
2303
2351
  __name: "LoCha",
2304
2352
  props: {
2305
2353
  id: {},
@@ -2313,40 +2361,40 @@ var ei = ["name"], ti = /* @__PURE__ */ xt(/* @__PURE__ */ l({
2313
2361
  },
2314
2362
  setup(e) {
2315
2363
  let t = e;
2316
- x($e, t.reasonCollapsed), x(tt, t.id), x(nt, t.mapStyleUrl);
2364
+ S($e, t.reasonCollapsed), S(tt, t.id), S(nt, t.mapStyleUrl);
2317
2365
  let r = Qe();
2318
- x(et, r);
2366
+ S(et, r);
2319
2367
  let { featureCount: a, setLoCha: s } = r;
2320
- return j(() => t.data, (e) => {
2368
+ return M(() => t.data, (e) => {
2321
2369
  e && s(e);
2322
- }, { immediate: !0 }), (t, r) => (b(), i("section", ni, [A(a) ? (b(), n(ti, {
2370
+ }, { immediate: !0 }), (t, r) => (x(), i("section", oi, [j(a) ? (x(), n(ai, {
2323
2371
  key: 1,
2324
2372
  hash: e.hash
2325
2373
  }, o({ _: 2 }, [
2326
2374
  t.$slots["object-detail"] ? {
2327
2375
  name: "object-detail",
2328
- fn: M((e) => [T(t.$slots, "object-detail", _(f(e)), void 0, !0)]),
2376
+ fn: N((e) => [E(t.$slots, "object-detail", _(f(e)), void 0, !0)]),
2329
2377
  key: "0"
2330
2378
  } : void 0,
2331
2379
  t.$slots["header-center"] ? {
2332
2380
  name: "header-center",
2333
- fn: M((e) => [T(t.$slots, "header-center", _(f(e)), void 0, !0)]),
2381
+ fn: N((e) => [E(t.$slots, "header-center", _(f(e)), void 0, !0)]),
2334
2382
  key: "1"
2335
2383
  } : void 0,
2336
2384
  t.$slots["header-end"] ? {
2337
2385
  name: "header-end",
2338
- fn: M((e) => [T(t.$slots, "header-end", _(f(e)), void 0, !0)]),
2386
+ fn: N((e) => [E(t.$slots, "header-end", _(f(e)), void 0, !0)]),
2339
2387
  key: "2"
2340
2388
  } : void 0,
2341
2389
  t.$slots["content-start"] ? {
2342
2390
  name: "content-start",
2343
- fn: M((e) => [T(t.$slots, "content-start", _(f(e)), void 0, !0)]),
2391
+ fn: N((e) => [E(t.$slots, "content-start", _(f(e)), void 0, !0)]),
2344
2392
  key: "3"
2345
2393
  } : void 0
2346
- ]), 1032, ["hash"])) : (b(), i("p", ri, " ⚠️ No data "))]));
2394
+ ]), 1032, ["hash"])) : (x(), i("p", si, " ⚠️ No data "))]));
2347
2395
  }
2348
2396
  }), [["__scopeId", "data-v-34eb8402"]]);
2349
2397
  //#endregion
2350
- export { ii as LoCha, $r as scrollToSection };
2398
+ export { ci as LoCha, ri as scrollToSection };
2351
2399
 
2352
2400
  //# sourceMappingURL=index.js.map