@maptiler/geocoding-control 2.0.0-rc.4 → 2.0.0-rc.6

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 (59) hide show
  1. package/MapLibreBasedGeocodingControl.d.ts +18 -1
  2. package/leaflet-controller.d.ts +2 -1
  3. package/leaflet-controller.js +222 -219
  4. package/leaflet-controller.js.map +1 -1
  5. package/leaflet-controller.umd.js +2 -2
  6. package/leaflet-controller.umd.js.map +1 -1
  7. package/leaflet.js +1013 -1022
  8. package/leaflet.js.map +1 -1
  9. package/leaflet.umd.js +3 -3
  10. package/leaflet.umd.js.map +1 -1
  11. package/maplibregl-controller.d.ts +2 -1
  12. package/maplibregl-controller.js +213 -210
  13. package/maplibregl-controller.js.map +1 -1
  14. package/maplibregl-controller.umd.js +3 -3
  15. package/maplibregl-controller.umd.js.map +1 -1
  16. package/maplibregl.d.ts +17 -0
  17. package/maplibregl.js +1459 -1466
  18. package/maplibregl.js.map +1 -1
  19. package/maplibregl.umd.js +3 -3
  20. package/maplibregl.umd.js.map +1 -1
  21. package/maptilersdk.d.ts +17 -0
  22. package/maptilersdk.js +1461 -1468
  23. package/maptilersdk.js.map +1 -1
  24. package/maptilersdk.umd.js +3 -3
  25. package/maptilersdk.umd.js.map +1 -1
  26. package/openlayers-controller.d.ts +2 -1
  27. package/openlayers-controller.js +298 -295
  28. package/openlayers-controller.js.map +1 -1
  29. package/openlayers-controller.umd.js +3 -3
  30. package/openlayers-controller.umd.js.map +1 -1
  31. package/openlayers.js +1301 -1310
  32. package/openlayers.js.map +1 -1
  33. package/openlayers.umd.js +3 -3
  34. package/openlayers.umd.js.map +1 -1
  35. package/package.json +1 -1
  36. package/react.js +680 -695
  37. package/react.js.map +1 -1
  38. package/react.umd.js +1 -1
  39. package/react.umd.js.map +1 -1
  40. package/svelte/GeocodingControl.svelte +22 -47
  41. package/svelte/GeocodingControl.svelte.d.ts +0 -1
  42. package/svelte/MapLibreBasedGeocodingControl.d.ts +18 -1
  43. package/svelte/MapLibreBasedGeocodingControl.js +5 -1
  44. package/svelte/leaflet-controller.d.ts +2 -1
  45. package/svelte/leaflet-controller.js +6 -2
  46. package/svelte/leaflet.js +5 -1
  47. package/svelte/maplibregl-controller.d.ts +2 -1
  48. package/svelte/maplibregl-controller.js +6 -2
  49. package/svelte/maplibregl.d.ts +17 -0
  50. package/svelte/maptilersdk.d.ts +17 -0
  51. package/svelte/openlayers-controller.d.ts +2 -1
  52. package/svelte/openlayers-controller.js +6 -2
  53. package/svelte/openlayers.js +6 -3
  54. package/svelte/types.d.ts +1 -1
  55. package/types.d.ts +1 -1
  56. package/vanilla.js +610 -625
  57. package/vanilla.js.map +1 -1
  58. package/vanilla.umd.js +1 -1
  59. package/vanilla.umd.js.map +1 -1
@@ -63,8 +63,8 @@ function ne(i, t) {
63
63
  return this;
64
64
  }), f;
65
65
  function l(u) {
66
- return function(p) {
67
- return c([u, p]);
66
+ return function(g) {
67
+ return c([u, g]);
68
68
  };
69
69
  }
70
70
  function c(u) {
@@ -105,8 +105,8 @@ function ne(i, t) {
105
105
  continue;
106
106
  }
107
107
  u = t.call(i, e);
108
- } catch (p) {
109
- u = [6, p], r = 0;
108
+ } catch (g) {
109
+ u = [6, g], r = 0;
110
110
  } finally {
111
111
  n = o = 0;
112
112
  }
@@ -424,19 +424,19 @@ function ht(i, t, e, n, r) {
424
424
  ht(i, t, e, l, r), ht(i, t, l + 1, n, r);
425
425
  }
426
426
  }
427
- const O = 11102230246251565e-32, S = 134217729, ue = (3 + 8 * O) * O;
427
+ const O = 11102230246251565e-32, P = 134217729, ue = (3 + 8 * O) * O;
428
428
  function st(i, t, e, n, r) {
429
- let o, f, l, c, u = t[0], p = n[0], s = 0, h = 0;
430
- p > u == p > -u ? (o = u, u = t[++s]) : (o = p, p = n[++h]);
431
- let g = 0;
429
+ let o, f, l, c, u = t[0], g = n[0], s = 0, h = 0;
430
+ g > u == g > -u ? (o = u, u = t[++s]) : (o = g, g = n[++h]);
431
+ let a = 0;
432
432
  if (s < i && h < e)
433
- for (p > u == p > -u ? (f = u + o, l = o - (f - u), u = t[++s]) : (f = p + o, l = o - (f - p), p = n[++h]), o = f, l !== 0 && (r[g++] = l); s < i && h < e; )
434
- p > u == p > -u ? (f = o + u, c = f - o, l = o - (f - c) + (u - c), u = t[++s]) : (f = o + p, c = f - o, l = o - (f - c) + (p - c), p = n[++h]), o = f, l !== 0 && (r[g++] = l);
433
+ for (g > u == g > -u ? (f = u + o, l = o - (f - u), u = t[++s]) : (f = g + o, l = o - (f - g), g = n[++h]), o = f, l !== 0 && (r[a++] = l); s < i && h < e; )
434
+ g > u == g > -u ? (f = o + u, c = f - o, l = o - (f - c) + (u - c), u = t[++s]) : (f = o + g, c = f - o, l = o - (f - c) + (g - c), g = n[++h]), o = f, l !== 0 && (r[a++] = l);
435
435
  for (; s < i; )
436
- f = o + u, c = f - o, l = o - (f - c) + (u - c), u = t[++s], o = f, l !== 0 && (r[g++] = l);
436
+ f = o + u, c = f - o, l = o - (f - c) + (u - c), u = t[++s], o = f, l !== 0 && (r[a++] = l);
437
437
  for (; h < e; )
438
- f = o + p, c = f - o, l = o - (f - c) + (p - c), p = n[++h], o = f, l !== 0 && (r[g++] = l);
439
- return (o !== 0 || g === 0) && (r[g++] = o), g;
438
+ f = o + g, c = f - o, l = o - (f - c) + (g - c), g = n[++h], o = f, l !== 0 && (r[a++] = l);
439
+ return (o !== 0 || a === 0) && (r[a++] = o), a;
440
440
  }
441
441
  function fe(i, t) {
442
442
  let e = t[0];
@@ -446,19 +446,19 @@ function fe(i, t) {
446
446
  function J(i) {
447
447
  return new Float64Array(i);
448
448
  }
449
- const ce = (3 + 16 * O) * O, he = (2 + 12 * O) * O, ae = (9 + 64 * O) * O * O, U = J(4), mt = J(8), wt = J(12), bt = J(16), P = J(4);
449
+ const ce = (3 + 16 * O) * O, he = (2 + 12 * O) * O, ae = (9 + 64 * O) * O * O, U = J(4), mt = J(8), wt = J(12), bt = J(16), M = J(4);
450
450
  function ge(i, t, e, n, r, o, f) {
451
- let l, c, u, p, s, h, g, y, x, m, a, d, v, E, w, b, M, _;
452
- const R = i - r, I = e - r, C = t - o, k = n - o;
453
- E = R * k, h = S * R, g = h - (h - R), y = R - g, h = S * k, x = h - (h - k), m = k - x, w = y * m - (E - g * x - y * x - g * m), b = C * I, h = S * C, g = h - (h - C), y = C - g, h = S * I, x = h - (h - I), m = I - x, M = y * m - (b - g * x - y * x - g * m), a = w - M, s = w - a, U[0] = w - (a + s) + (s - M), d = E + a, s = d - E, v = E - (d - s) + (a - s), a = v - b, s = v - a, U[1] = v - (a + s) + (s - b), _ = d + a, s = _ - d, U[2] = d - (_ - s) + (a - s), U[3] = _;
451
+ let l, c, u, g, s, h, a, y, d, m, v, p, x, E, w, b, _, S;
452
+ const R = i - r, I = e - r, k = t - o, C = n - o;
453
+ E = R * C, h = P * R, a = h - (h - R), y = R - a, h = P * C, d = h - (h - C), m = C - d, w = y * m - (E - a * d - y * d - a * m), b = k * I, h = P * k, a = h - (h - k), y = k - a, h = P * I, d = h - (h - I), m = I - d, _ = y * m - (b - a * d - y * d - a * m), v = w - _, s = w - v, U[0] = w - (v + s) + (s - _), p = E + v, s = p - E, x = E - (p - s) + (v - s), v = x - b, s = x - v, U[1] = x - (v + s) + (s - b), S = p + v, s = S - p, U[2] = p - (S - s) + (v - s), U[3] = S;
454
454
  let A = fe(4, U), Q = he * f;
455
- if (A >= Q || -A >= Q || (s = i - R, l = i - (R + s) + (s - r), s = e - I, u = e - (I + s) + (s - r), s = t - C, c = t - (C + s) + (s - o), s = n - k, p = n - (k + s) + (s - o), l === 0 && c === 0 && u === 0 && p === 0) || (Q = ae * f + ue * Math.abs(A), A += R * p + k * l - (C * u + I * c), A >= Q || -A >= Q)) return A;
456
- E = l * k, h = S * l, g = h - (h - l), y = l - g, h = S * k, x = h - (h - k), m = k - x, w = y * m - (E - g * x - y * x - g * m), b = c * I, h = S * c, g = h - (h - c), y = c - g, h = S * I, x = h - (h - I), m = I - x, M = y * m - (b - g * x - y * x - g * m), a = w - M, s = w - a, P[0] = w - (a + s) + (s - M), d = E + a, s = d - E, v = E - (d - s) + (a - s), a = v - b, s = v - a, P[1] = v - (a + s) + (s - b), _ = d + a, s = _ - d, P[2] = d - (_ - s) + (a - s), P[3] = _;
457
- const Jt = st(4, U, 4, P, mt);
458
- E = R * p, h = S * R, g = h - (h - R), y = R - g, h = S * p, x = h - (h - p), m = p - x, w = y * m - (E - g * x - y * x - g * m), b = C * u, h = S * C, g = h - (h - C), y = C - g, h = S * u, x = h - (h - u), m = u - x, M = y * m - (b - g * x - y * x - g * m), a = w - M, s = w - a, P[0] = w - (a + s) + (s - M), d = E + a, s = d - E, v = E - (d - s) + (a - s), a = v - b, s = v - a, P[1] = v - (a + s) + (s - b), _ = d + a, s = _ - d, P[2] = d - (_ - s) + (a - s), P[3] = _;
459
- const Kt = st(Jt, mt, 4, P, wt);
460
- E = l * p, h = S * l, g = h - (h - l), y = l - g, h = S * p, x = h - (h - p), m = p - x, w = y * m - (E - g * x - y * x - g * m), b = c * u, h = S * c, g = h - (h - c), y = c - g, h = S * u, x = h - (h - u), m = u - x, M = y * m - (b - g * x - y * x - g * m), a = w - M, s = w - a, P[0] = w - (a + s) + (s - M), d = E + a, s = d - E, v = E - (d - s) + (a - s), a = v - b, s = v - a, P[1] = v - (a + s) + (s - b), _ = d + a, s = _ - d, P[2] = d - (_ - s) + (a - s), P[3] = _;
461
- const Ht = st(Kt, wt, 4, P, bt);
455
+ if (A >= Q || -A >= Q || (s = i - R, l = i - (R + s) + (s - r), s = e - I, u = e - (I + s) + (s - r), s = t - k, c = t - (k + s) + (s - o), s = n - C, g = n - (C + s) + (s - o), l === 0 && c === 0 && u === 0 && g === 0) || (Q = ae * f + ue * Math.abs(A), A += R * g + C * l - (k * u + I * c), A >= Q || -A >= Q)) return A;
456
+ E = l * C, h = P * l, a = h - (h - l), y = l - a, h = P * C, d = h - (h - C), m = C - d, w = y * m - (E - a * d - y * d - a * m), b = c * I, h = P * c, a = h - (h - c), y = c - a, h = P * I, d = h - (h - I), m = I - d, _ = y * m - (b - a * d - y * d - a * m), v = w - _, s = w - v, M[0] = w - (v + s) + (s - _), p = E + v, s = p - E, x = E - (p - s) + (v - s), v = x - b, s = x - v, M[1] = x - (v + s) + (s - b), S = p + v, s = S - p, M[2] = p - (S - s) + (v - s), M[3] = S;
457
+ const Jt = st(4, U, 4, M, mt);
458
+ E = R * g, h = P * R, a = h - (h - R), y = R - a, h = P * g, d = h - (h - g), m = g - d, w = y * m - (E - a * d - y * d - a * m), b = k * u, h = P * k, a = h - (h - k), y = k - a, h = P * u, d = h - (h - u), m = u - d, _ = y * m - (b - a * d - y * d - a * m), v = w - _, s = w - v, M[0] = w - (v + s) + (s - _), p = E + v, s = p - E, x = E - (p - s) + (v - s), v = x - b, s = x - v, M[1] = x - (v + s) + (s - b), S = p + v, s = S - p, M[2] = p - (S - s) + (v - s), M[3] = S;
459
+ const Kt = st(Jt, mt, 4, M, wt);
460
+ E = l * g, h = P * l, a = h - (h - l), y = l - a, h = P * g, d = h - (h - g), m = g - d, w = y * m - (E - a * d - y * d - a * m), b = c * u, h = P * c, a = h - (h - c), y = c - a, h = P * u, d = h - (h - u), m = u - d, _ = y * m - (b - a * d - y * d - a * m), v = w - _, s = w - v, M[0] = w - (v + s) + (s - _), p = E + v, s = p - E, x = E - (p - s) + (v - s), v = x - b, s = x - v, M[1] = x - (v + s) + (s - b), S = p + v, s = S - p, M[2] = p - (S - s) + (v - s), M[3] = S;
461
+ const Ht = st(Kt, wt, 4, M, bt);
462
462
  return bt[Ht - 1];
463
463
  }
464
464
  function pe(i, t, e, n, r, o) {
@@ -557,10 +557,10 @@ const Z = new de(), tt = (i, t) => i.x * t.y - i.y * t.x, Yt = (i, t) => i.x * t
557
557
  const o = {
558
558
  x: e.x - i.x,
559
559
  y: e.y - i.y
560
- }, f = tt(o, t) / r, l = tt(o, n) / r, c = i.x + l * t.x, u = e.x + f * n.x, p = i.y + l * t.y, s = e.y + f * n.y, h = (c + u) / 2, g = (p + s) / 2;
560
+ }, f = tt(o, t) / r, l = tt(o, n) / r, c = i.x + l * t.x, u = e.x + f * n.x, g = i.y + l * t.y, s = e.y + f * n.y, h = (c + u) / 2, a = (g + s) / 2;
561
561
  return {
562
562
  x: h,
563
- y: g
563
+ y: a
564
564
  };
565
565
  };
566
566
  class L {
@@ -658,7 +658,7 @@ class z {
658
658
  const n = t.leftSE.point.x, r = e.leftSE.point.x, o = t.rightSE.point.x, f = e.rightSE.point.x;
659
659
  if (f < n) return 1;
660
660
  if (o < r) return -1;
661
- const l = t.leftSE.point.y, c = e.leftSE.point.y, u = t.rightSE.point.y, p = e.rightSE.point.y;
661
+ const l = t.leftSE.point.y, c = e.leftSE.point.y, u = t.rightSE.point.y, g = e.rightSE.point.y;
662
662
  if (n < r) {
663
663
  if (c < l && c < u) return 1;
664
664
  if (c > l && c > u) return -1;
@@ -669,8 +669,8 @@ class z {
669
669
  return h !== 0 ? h : -1;
670
670
  }
671
671
  if (n > r) {
672
- if (l < c && l < p) return -1;
673
- if (l > c && l > p) return 1;
672
+ if (l < c && l < g) return -1;
673
+ if (l > c && l > g) return 1;
674
674
  const s = e.comparePoint(t.leftSE.point);
675
675
  if (s !== 0) return s;
676
676
  const h = t.comparePoint(e.rightSE.point);
@@ -688,11 +688,11 @@ class z {
688
688
  if (s > 0) return -1;
689
689
  }
690
690
  if (o !== f) {
691
- const s = u - l, h = o - n, g = p - c, y = f - r;
692
- if (s > h && g < y) return 1;
693
- if (s < h && g > y) return -1;
691
+ const s = u - l, h = o - n, a = g - c, y = f - r;
692
+ if (s > h && a < y) return 1;
693
+ if (s < h && a > y) return -1;
694
694
  }
695
- return o > f ? 1 : o < f || u < p ? -1 : u > p ? 1 : t.id < e.id ? -1 : t.id > e.id ? 1 : 0;
695
+ return o > f ? 1 : o < f || u < g ? -1 : u > g ? 1 : t.id < e.id ? -1 : t.id > e.id ? 1 : 0;
696
696
  }
697
697
  /* Warning: a reference to ringWindings input will be stored,
698
698
  * and possibly will be later modified */
@@ -778,18 +778,18 @@ class z {
778
778
  getIntersection(t) {
779
779
  const e = this.bbox(), n = t.bbox(), r = at(e, n);
780
780
  if (r === null) return null;
781
- const o = this.leftSE.point, f = this.rightSE.point, l = t.leftSE.point, c = t.rightSE.point, u = F(e, l) && this.comparePoint(l) === 0, p = F(n, o) && t.comparePoint(o) === 0, s = F(e, c) && this.comparePoint(c) === 0, h = F(n, f) && t.comparePoint(f) === 0;
782
- if (p && u)
781
+ const o = this.leftSE.point, f = this.rightSE.point, l = t.leftSE.point, c = t.rightSE.point, u = F(e, l) && this.comparePoint(l) === 0, g = F(n, o) && t.comparePoint(o) === 0, s = F(e, c) && this.comparePoint(c) === 0, h = F(n, f) && t.comparePoint(f) === 0;
782
+ if (g && u)
783
783
  return h && !s ? f : !h && s ? c : null;
784
- if (p)
784
+ if (g)
785
785
  return s && o.x === c.x && o.y === c.y ? null : o;
786
786
  if (u)
787
787
  return h && f.x === l.x && f.y === l.y ? null : l;
788
788
  if (h && s) return null;
789
789
  if (h) return f;
790
790
  if (s) return c;
791
- const g = Ee(o, this.vector(), l, t.vector());
792
- return g === null || !F(r, g) ? null : Z.round(g.x, g.y);
791
+ const a = Ee(o, this.vector(), l, t.vector());
792
+ return a === null || !F(r, a) ? null : Z.round(a.x, a.y);
793
793
  }
794
794
  /**
795
795
  * Split the given segment into multiple segments on the given points.
@@ -866,17 +866,17 @@ class z {
866
866
  };
867
867
  const e = this._afterState.rings, n = this._afterState.windings, r = this._afterState.multiPolys;
868
868
  for (let l = 0, c = this.rings.length; l < c; l++) {
869
- const u = this.rings[l], p = this.windings[l], s = e.indexOf(u);
870
- s === -1 ? (e.push(u), n.push(p)) : n[s] += p;
869
+ const u = this.rings[l], g = this.windings[l], s = e.indexOf(u);
870
+ s === -1 ? (e.push(u), n.push(g)) : n[s] += g;
871
871
  }
872
872
  const o = [], f = [];
873
873
  for (let l = 0, c = e.length; l < c; l++) {
874
874
  if (n[l] === 0) continue;
875
- const u = e[l], p = u.poly;
876
- if (f.indexOf(p) === -1)
877
- if (u.isExterior) o.push(p);
875
+ const u = e[l], g = u.poly;
876
+ if (f.indexOf(g) === -1)
877
+ if (u.isExterior) o.push(g);
878
878
  else {
879
- f.indexOf(p) === -1 && f.push(p);
879
+ f.indexOf(g) === -1 && f.push(g);
880
880
  const s = o.indexOf(u.poly);
881
881
  s !== -1 && o.splice(s, 1);
882
882
  }
@@ -1027,26 +1027,26 @@ class nt {
1027
1027
  const o = t[n];
1028
1028
  if (!o.isInResult() || o.ringOut) continue;
1029
1029
  let f = null, l = o.leftSE, c = o.rightSE;
1030
- const u = [l], p = l.point, s = [];
1031
- for (; f = l, l = c, u.push(l), l.point !== p; )
1030
+ const u = [l], g = l.point, s = [];
1031
+ for (; f = l, l = c, u.push(l), l.point !== g; )
1032
1032
  for (; ; ) {
1033
1033
  const h = l.getAvailableLinkedEvents();
1034
1034
  if (h.length === 0) {
1035
- const x = u[0].point, m = u[u.length - 1].point;
1036
- throw new Error(`Unable to complete output ring starting at [${x.x}, ${x.y}]. Last matching segment found ends at [${m.x}, ${m.y}].`);
1035
+ const d = u[0].point, m = u[u.length - 1].point;
1036
+ throw new Error(`Unable to complete output ring starting at [${d.x}, ${d.y}]. Last matching segment found ends at [${m.x}, ${m.y}].`);
1037
1037
  }
1038
1038
  if (h.length === 1) {
1039
1039
  c = h[0].otherSE;
1040
1040
  break;
1041
1041
  }
1042
- let g = null;
1043
- for (let x = 0, m = s.length; x < m; x++)
1044
- if (s[x].point === l.point) {
1045
- g = x;
1042
+ let a = null;
1043
+ for (let d = 0, m = s.length; d < m; d++)
1044
+ if (s[d].point === l.point) {
1045
+ a = d;
1046
1046
  break;
1047
1047
  }
1048
- if (g !== null) {
1049
- const x = s.splice(g)[0], m = u.splice(x.index);
1048
+ if (a !== null) {
1049
+ const d = s.splice(a)[0], m = u.splice(d.index);
1050
1050
  m.unshift(m[0].otherSE), e.push(new nt(m.reverse()));
1051
1051
  continue;
1052
1052
  }
@@ -1071,7 +1071,7 @@ class nt {
1071
1071
  getGeom() {
1072
1072
  let t = this.events[0].point;
1073
1073
  const e = [t];
1074
- for (let u = 1, p = this.events.length - 1; u < p; u++) {
1074
+ for (let u = 1, g = this.events.length - 1; u < g; u++) {
1075
1075
  const s = this.events[u].point, h = this.events[u + 1].point;
1076
1076
  Pt(s, t, h) !== 0 && (e.push(s), t = s);
1077
1077
  }
@@ -1109,7 +1109,7 @@ class nt {
1109
1109
  }
1110
1110
  }
1111
1111
  }
1112
- class Ct {
1112
+ class kt {
1113
1113
  constructor(t) {
1114
1114
  this.exteriorRing = t, t.poly = this, this.interiorRings = [];
1115
1115
  }
@@ -1143,10 +1143,10 @@ class be {
1143
1143
  for (let n = 0, r = t.length; n < r; n++) {
1144
1144
  const o = t[n];
1145
1145
  if (!o.poly)
1146
- if (o.isExteriorRing()) e.push(new Ct(o));
1146
+ if (o.isExteriorRing()) e.push(new kt(o));
1147
1147
  else {
1148
1148
  const f = o.enclosingRing();
1149
- f.poly || e.push(new Ct(f)), f.poly.addInterior(o);
1149
+ f.poly || e.push(new kt(f)), f.poly.addInterior(o);
1150
1150
  }
1151
1151
  }
1152
1152
  return e;
@@ -1174,25 +1174,25 @@ class _e {
1174
1174
  const s = l.getIntersection(e);
1175
1175
  if (s !== null && (e.isAnEndpoint(s) || (u = s), !l.isAnEndpoint(s))) {
1176
1176
  const h = this._splitSafely(l, s);
1177
- for (let g = 0, y = h.length; g < y; g++)
1178
- n.push(h[g]);
1177
+ for (let a = 0, y = h.length; a < y; a++)
1178
+ n.push(h[a]);
1179
1179
  }
1180
1180
  }
1181
- let p = null;
1181
+ let g = null;
1182
1182
  if (c) {
1183
1183
  const s = c.getIntersection(e);
1184
- if (s !== null && (e.isAnEndpoint(s) || (p = s), !c.isAnEndpoint(s))) {
1184
+ if (s !== null && (e.isAnEndpoint(s) || (g = s), !c.isAnEndpoint(s))) {
1185
1185
  const h = this._splitSafely(c, s);
1186
- for (let g = 0, y = h.length; g < y; g++)
1187
- n.push(h[g]);
1186
+ for (let a = 0, y = h.length; a < y; a++)
1187
+ n.push(h[a]);
1188
1188
  }
1189
1189
  }
1190
- if (u !== null || p !== null) {
1190
+ if (u !== null || g !== null) {
1191
1191
  let s = null;
1192
- u === null ? s = p : p === null ? s = u : s = L.comparePoints(u, p) <= 0 ? u : p, this.queue.remove(e.rightSE), n.push(e.rightSE);
1192
+ u === null ? s = g : g === null ? s = u : s = L.comparePoints(u, g) <= 0 ? u : g, this.queue.remove(e.rightSE), n.push(e.rightSE);
1193
1193
  const h = e.split(s);
1194
- for (let g = 0, y = h.length; g < y; g++)
1195
- n.push(h[g]);
1194
+ for (let a = 0, y = h.length; a < y; a++)
1195
+ n.push(h[a]);
1196
1196
  }
1197
1197
  n.length > 0 ? (this.tree.remove(e), n.push(t)) : (this.segments.push(e), e.prev = l);
1198
1198
  } else {
@@ -1200,14 +1200,14 @@ class _e {
1200
1200
  const u = l.getIntersection(c);
1201
1201
  if (u !== null) {
1202
1202
  if (!l.isAnEndpoint(u)) {
1203
- const p = this._splitSafely(l, u);
1204
- for (let s = 0, h = p.length; s < h; s++)
1205
- n.push(p[s]);
1203
+ const g = this._splitSafely(l, u);
1204
+ for (let s = 0, h = g.length; s < h; s++)
1205
+ n.push(g[s]);
1206
1206
  }
1207
1207
  if (!c.isAnEndpoint(u)) {
1208
- const p = this._splitSafely(c, u);
1209
- for (let s = 0, h = p.length; s < h; s++)
1210
- n.push(p[s]);
1208
+ const g = this._splitSafely(c, u);
1209
+ for (let s = 0, h = g.length; s < h; s++)
1210
+ n.push(g[s]);
1211
1211
  }
1212
1212
  }
1213
1213
  }
@@ -1225,7 +1225,7 @@ class _e {
1225
1225
  return r.push(n), t.consumedBy === void 0 && this.tree.add(t), r;
1226
1226
  }
1227
1227
  }
1228
- const kt = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE || 1e6, Se = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS || 1e6;
1228
+ const Ct = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE || 1e6, Se = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS || 1e6;
1229
1229
  class Pe {
1230
1230
  run(t, e, n) {
1231
1231
  $.type = t, Z.reset();
@@ -1240,15 +1240,15 @@ class Pe {
1240
1240
  }
1241
1241
  if ($.type === "intersection")
1242
1242
  for (let s = 0, h = r.length; s < h; s++) {
1243
- const g = r[s];
1244
- for (let y = s + 1, x = r.length; y < x; y++)
1245
- if (at(g.bbox, r[y].bbox) === null) return [];
1243
+ const a = r[s];
1244
+ for (let y = s + 1, d = r.length; y < d; y++)
1245
+ if (at(a.bbox, r[y].bbox) === null) return [];
1246
1246
  }
1247
1247
  const o = new dt(L.compare);
1248
1248
  for (let s = 0, h = r.length; s < h; s++) {
1249
- const g = r[s].getSweepEvents();
1250
- for (let y = 0, x = g.length; y < x; y++)
1251
- if (o.insert(g[y]), o.size > kt)
1249
+ const a = r[s].getSweepEvents();
1250
+ for (let y = 0, d = a.length; y < d; y++)
1251
+ if (o.insert(a[y]), o.size > Ct)
1252
1252
  throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big).");
1253
1253
  }
1254
1254
  const f = new _e(o);
@@ -1256,17 +1256,17 @@ class Pe {
1256
1256
  for (; c; ) {
1257
1257
  const s = c.key;
1258
1258
  if (o.size === l) {
1259
- const g = s.segment;
1260
- throw new Error(`Unable to pop() ${s.isLeft ? "left" : "right"} SweepEvent [${s.point.x}, ${s.point.y}] from segment #${g.id} [${g.leftSE.point.x}, ${g.leftSE.point.y}] -> [${g.rightSE.point.x}, ${g.rightSE.point.y}] from queue.`);
1259
+ const a = s.segment;
1260
+ throw new Error(`Unable to pop() ${s.isLeft ? "left" : "right"} SweepEvent [${s.point.x}, ${s.point.y}] from segment #${a.id} [${a.leftSE.point.x}, ${a.leftSE.point.y}] -> [${a.rightSE.point.x}, ${a.rightSE.point.y}] from queue.`);
1261
1261
  }
1262
- if (o.size > kt)
1262
+ if (o.size > Ct)
1263
1263
  throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big).");
1264
1264
  if (f.segments.length > Se)
1265
1265
  throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments).");
1266
1266
  const h = f.process(s);
1267
- for (let g = 0, y = h.length; g < y; g++) {
1268
- const x = h[g];
1269
- x.consumedBy === void 0 && o.insert(x);
1267
+ for (let a = 0, y = h.length; a < y; a++) {
1268
+ const d = h[a];
1269
+ d.consumedBy === void 0 && o.insert(d);
1270
1270
  }
1271
1271
  l = o.size, c = o.pop();
1272
1272
  }
@@ -1300,26 +1300,26 @@ var Qt = {
1300
1300
  };
1301
1301
  function Ft(i, t, e) {
1302
1302
  if (i !== null)
1303
- for (var n, r, o, f, l, c, u, p = 0, s = 0, h, g = i.type, y = g === "FeatureCollection", x = g === "Feature", m = y ? i.features.length : 1, a = 0; a < m; a++) {
1304
- u = y ? i.features[a].geometry : x ? i.geometry : i, h = u ? u.type === "GeometryCollection" : !1, l = h ? u.geometries.length : 1;
1305
- for (var d = 0; d < l; d++) {
1306
- var v = 0, E = 0;
1307
- if (f = h ? u.geometries[d] : u, f !== null) {
1303
+ for (var n, r, o, f, l, c, u, g = 0, s = 0, h, a = i.type, y = a === "FeatureCollection", d = a === "Feature", m = y ? i.features.length : 1, v = 0; v < m; v++) {
1304
+ u = y ? i.features[v].geometry : d ? i.geometry : i, h = u ? u.type === "GeometryCollection" : !1, l = h ? u.geometries.length : 1;
1305
+ for (var p = 0; p < l; p++) {
1306
+ var x = 0, E = 0;
1307
+ if (f = h ? u.geometries[p] : u, f !== null) {
1308
1308
  c = f.coordinates;
1309
1309
  var w = f.type;
1310
- switch (p = 0, w) {
1310
+ switch (g = 0, w) {
1311
1311
  case null:
1312
1312
  break;
1313
1313
  case "Point":
1314
1314
  if (t(
1315
1315
  c,
1316
1316
  s,
1317
- a,
1318
1317
  v,
1318
+ x,
1319
1319
  E
1320
1320
  ) === !1)
1321
1321
  return !1;
1322
- s++, v++;
1322
+ s++, x++;
1323
1323
  break;
1324
1324
  case "LineString":
1325
1325
  case "MultiPoint":
@@ -1327,42 +1327,42 @@ function Ft(i, t, e) {
1327
1327
  if (t(
1328
1328
  c[n],
1329
1329
  s,
1330
- a,
1331
1330
  v,
1331
+ x,
1332
1332
  E
1333
1333
  ) === !1)
1334
1334
  return !1;
1335
- s++, w === "MultiPoint" && v++;
1335
+ s++, w === "MultiPoint" && x++;
1336
1336
  }
1337
- w === "LineString" && v++;
1337
+ w === "LineString" && x++;
1338
1338
  break;
1339
1339
  case "Polygon":
1340
1340
  case "MultiLineString":
1341
1341
  for (n = 0; n < c.length; n++) {
1342
- for (r = 0; r < c[n].length - p; r++) {
1342
+ for (r = 0; r < c[n].length - g; r++) {
1343
1343
  if (t(
1344
1344
  c[n][r],
1345
1345
  s,
1346
- a,
1347
1346
  v,
1347
+ x,
1348
1348
  E
1349
1349
  ) === !1)
1350
1350
  return !1;
1351
1351
  s++;
1352
1352
  }
1353
- w === "MultiLineString" && v++, w === "Polygon" && E++;
1353
+ w === "MultiLineString" && x++, w === "Polygon" && E++;
1354
1354
  }
1355
- w === "Polygon" && v++;
1355
+ w === "Polygon" && x++;
1356
1356
  break;
1357
1357
  case "MultiPolygon":
1358
1358
  for (n = 0; n < c.length; n++) {
1359
1359
  for (E = 0, r = 0; r < c[n].length; r++) {
1360
- for (o = 0; o < c[n][r].length - p; o++) {
1360
+ for (o = 0; o < c[n][r].length - g; o++) {
1361
1361
  if (t(
1362
1362
  c[n][r][o],
1363
1363
  s,
1364
- a,
1365
1364
  v,
1365
+ x,
1366
1366
  E
1367
1367
  ) === !1)
1368
1368
  return !1;
@@ -1370,7 +1370,7 @@ function Ft(i, t, e) {
1370
1370
  }
1371
1371
  E++;
1372
1372
  }
1373
- v++;
1373
+ x++;
1374
1374
  }
1375
1375
  break;
1376
1376
  case "GeometryCollection":
@@ -1386,15 +1386,15 @@ function Ft(i, t, e) {
1386
1386
  }
1387
1387
  }
1388
1388
  function xt(i, t) {
1389
- var e, n, r, o, f, l, c, u, p, s, h = 0, g = i.type === "FeatureCollection", y = i.type === "Feature", x = g ? i.features.length : 1;
1390
- for (e = 0; e < x; e++) {
1391
- for (l = g ? i.features[e].geometry : y ? i.geometry : i, u = g ? i.features[e].properties : y ? i.properties : {}, p = g ? i.features[e].bbox : y ? i.bbox : void 0, s = g ? i.features[e].id : y ? i.id : void 0, c = l ? l.type === "GeometryCollection" : !1, f = c ? l.geometries.length : 1, r = 0; r < f; r++) {
1389
+ var e, n, r, o, f, l, c, u, g, s, h = 0, a = i.type === "FeatureCollection", y = i.type === "Feature", d = a ? i.features.length : 1;
1390
+ for (e = 0; e < d; e++) {
1391
+ for (l = a ? i.features[e].geometry : y ? i.geometry : i, u = a ? i.features[e].properties : y ? i.properties : {}, g = a ? i.features[e].bbox : y ? i.bbox : void 0, s = a ? i.features[e].id : y ? i.id : void 0, c = l ? l.type === "GeometryCollection" : !1, f = c ? l.geometries.length : 1, r = 0; r < f; r++) {
1392
1392
  if (o = c ? l.geometries[r] : l, o === null) {
1393
1393
  if (t(
1394
1394
  null,
1395
1395
  h,
1396
1396
  u,
1397
- p,
1397
+ g,
1398
1398
  s
1399
1399
  ) === !1)
1400
1400
  return !1;
@@ -1411,7 +1411,7 @@ function xt(i, t) {
1411
1411
  o,
1412
1412
  h,
1413
1413
  u,
1414
- p,
1414
+ g,
1415
1415
  s
1416
1416
  ) === !1)
1417
1417
  return !1;
@@ -1423,7 +1423,7 @@ function xt(i, t) {
1423
1423
  o.geometries[n],
1424
1424
  h,
1425
1425
  u,
1426
- p,
1426
+ g,
1427
1427
  s
1428
1428
  ) === !1)
1429
1429
  return !1;
@@ -1436,7 +1436,7 @@ function xt(i, t) {
1436
1436
  h++;
1437
1437
  }
1438
1438
  }
1439
- function Ce(i, t) {
1439
+ function ke(i, t) {
1440
1440
  xt(i, function(e, n, r, o, f) {
1441
1441
  var l = e === null ? null : e.type;
1442
1442
  switch (l) {
@@ -1463,16 +1463,16 @@ function Ce(i, t) {
1463
1463
  break;
1464
1464
  }
1465
1465
  for (var u = 0; u < e.coordinates.length; u++) {
1466
- var p = e.coordinates[u], s = {
1466
+ var g = e.coordinates[u], s = {
1467
1467
  type: c,
1468
- coordinates: p
1468
+ coordinates: g
1469
1469
  };
1470
1470
  if (t(X(s, r), n, u) === !1)
1471
1471
  return !1;
1472
1472
  }
1473
1473
  });
1474
1474
  }
1475
- function ke(i, t = {}) {
1475
+ function Ce(i, t = {}) {
1476
1476
  const e = [];
1477
1477
  if (xt(i, (r) => {
1478
1478
  e.push(r.coordinates);
@@ -1481,7 +1481,7 @@ function ke(i, t = {}) {
1481
1481
  const n = Qt.union(e[0], ...e.slice(1));
1482
1482
  return n.length === 0 ? null : n.length === 1 ? yt(n[0], t.properties) : jt(n, t.properties);
1483
1483
  }
1484
- var Dt = ke;
1484
+ var Dt = Ce;
1485
1485
  function W() {
1486
1486
  }
1487
1487
  function Xt(i) {
@@ -1617,11 +1617,11 @@ function De(i, t, e, n, r, o, f = null, l = [-1]) {
1617
1617
  root: t.target || c.$$.root
1618
1618
  };
1619
1619
  f && f(u.root);
1620
- let p = !1;
1621
- if (u.ctx = e ? e(i, t.props || {}, (s, h, ...g) => {
1622
- const y = g.length ? g[0] : h;
1623
- return u.ctx && r(u.ctx[s], u.ctx[s] = y) && (!u.skip_bound && u.bound[s] && u.bound[s](y), p && Fe(i, s)), h;
1624
- }) : [], u.update(), p = !0, it(u.before_update), u.fragment = n ? n(u.ctx) : !1, t.target) {
1620
+ let g = !1;
1621
+ if (u.ctx = e ? e(i, t.props || {}, (s, h, ...a) => {
1622
+ const y = a.length ? a[0] : h;
1623
+ return u.ctx && r(u.ctx[s], u.ctx[s] = y) && (!u.skip_bound && u.bound[s] && u.bound[s](y), g && Fe(i, s)), h;
1624
+ }) : [], u.update(), g = !0, it(u.before_update), u.fragment = n ? n(u.ctx) : !1, t.target) {
1625
1625
  if (t.hydrate) {
1626
1626
  const s = Be(t.target);
1627
1627
  u.fragment && u.fragment.l(s), s.forEach(Zt);
@@ -1757,7 +1757,7 @@ function en(i) {
1757
1757
  if (!i)
1758
1758
  throw new Error("geojson is required");
1759
1759
  var t = [];
1760
- return Ce(i, function(e) {
1760
+ return ke(i, function(e) {
1761
1761
  t.push(e);
1762
1762
  }), V(t);
1763
1763
  }
@@ -1789,12 +1789,12 @@ function zt(i, t) {
1789
1789
  for (const c of l.features) {
1790
1790
  const u = Tt(Bt(c));
1791
1791
  if (f && u[0] < -180 + r)
1792
- for (const p of c.geometry.coordinates)
1793
- for (const s of p)
1792
+ for (const g of c.geometry.coordinates)
1793
+ for (const s of g)
1794
1794
  s[0] += 360 - r;
1795
1795
  if (o && u[2] > 180 - r)
1796
- for (const p of c.geometry.coordinates)
1797
- for (const s of p)
1796
+ for (const g of c.geometry.coordinates)
1797
+ for (const s of g)
1798
1798
  s[0] -= 360 - r;
1799
1799
  }
1800
1800
  t(
@@ -1827,18 +1827,18 @@ const Gt = {
1827
1827
  function on(i, t, e = !0, n = !0, r = {}, o = {}, f = Gt, l = !1) {
1828
1828
  let c;
1829
1829
  const u = [];
1830
- let p, s, h;
1831
- function g() {
1830
+ let g, s, h, a = l;
1831
+ function y() {
1832
1832
  if (!i.loaded) {
1833
- i.once("load", g);
1833
+ i.once("load", y);
1834
1834
  return;
1835
1835
  }
1836
- const a = f ? f === !0 ? Gt : f : void 0;
1837
- if (!(a != null && a.fill) && !(a != null && a.line))
1836
+ const p = f ? f === !0 ? Gt : f : void 0;
1837
+ if (!(p != null && p.fill) && !(p != null && p.line))
1838
1838
  return;
1839
- const d = i.getSource(H);
1840
- if (d)
1841
- d.setData(h ?? V([]));
1839
+ const x = i.getSource(H);
1840
+ if (x)
1841
+ x.setData(h ?? V([]));
1842
1842
  else if (h)
1843
1843
  i.addSource(H, {
1844
1844
  type: "geojson",
@@ -1846,149 +1846,152 @@ function on(i, t, e = !0, n = !0, r = {}, o = {}, f = Gt, l = !1) {
1846
1846
  });
1847
1847
  else
1848
1848
  return;
1849
- !i.getLayer(Ut) && (a != null && a.fill) && i.addLayer({
1850
- ...a == null ? void 0 : a.fill,
1849
+ !i.getLayer(Ut) && (p != null && p.fill) && i.addLayer({
1850
+ ...p == null ? void 0 : p.fill,
1851
1851
  id: Ut,
1852
1852
  type: "fill",
1853
1853
  source: H
1854
- }), !i.getLayer(qt) && (a != null && a.line) && i.addLayer({
1855
- ...a == null ? void 0 : a.line,
1854
+ }), !i.getLayer(qt) && (p != null && p.line) && i.addLayer({
1855
+ ...p == null ? void 0 : p.line,
1856
1856
  id: qt,
1857
1857
  type: "line",
1858
1858
  source: H
1859
1859
  });
1860
1860
  }
1861
- function y(a) {
1862
- h = a, g();
1861
+ function d(p) {
1862
+ h = p, y();
1863
1863
  }
1864
1864
  i.on("styledata", () => {
1865
1865
  setTimeout(() => {
1866
- h && g();
1866
+ h && y();
1867
1867
  });
1868
1868
  });
1869
- const x = (a) => {
1869
+ const m = (p) => {
1870
1870
  c == null || c({
1871
1871
  type: "mapClick",
1872
- coordinates: [a.lngLat.lng, a.lngLat.lat]
1872
+ coordinates: [p.lngLat.lng, p.lngLat.lat]
1873
1873
  });
1874
1874
  };
1875
- function m(a = !1) {
1875
+ function v(p = !1) {
1876
1876
  if (!t)
1877
1877
  throw new Error();
1878
- const d = document.createElement("div");
1879
- return a && d.classList.add("marker-interactive"), new Je({
1878
+ const x = document.createElement("div");
1879
+ return p && x.classList.add("marker-interactive"), new Je({
1880
1880
  props: { displayIn: "maplibre" },
1881
- target: d
1882
- }), new t.Marker({ element: d, offset: [1, -13] });
1881
+ target: x
1882
+ }), new t.Marker({ element: x, offset: [1, -13] });
1883
1883
  }
1884
1884
  return {
1885
- setEventHandler(a) {
1886
- a ? (c = a, i.on("click", x)) : (c = void 0, i.off("click", x));
1885
+ setEventHandler(p) {
1886
+ p ? (c = p, i.on("click", m)) : (c = void 0, i.off("click", m));
1887
1887
  },
1888
- flyTo(a, d) {
1889
- i.flyTo({ center: a, ...d ? { zoom: d } : {}, ...r });
1888
+ flyTo(p, x) {
1889
+ i.flyTo({ center: p, ...x ? { zoom: x } : {}, ...r });
1890
1890
  },
1891
- fitBounds(a, d, v) {
1891
+ fitBounds(p, x, E) {
1892
1892
  i.fitBounds(
1893
1893
  [
1894
- [a[0], a[1]],
1895
- [a[2], a[3]]
1894
+ [p[0], p[1]],
1895
+ [p[2], p[3]]
1896
1896
  ],
1897
- { padding: d, ...v ? { maxZoom: v } : {}, ...o }
1897
+ { padding: x, ...E ? { maxZoom: E } : {}, ...o }
1898
1898
  );
1899
1899
  },
1900
- indicateReverse(a) {
1901
- i.getCanvasContainer().style.cursor = a ? "crosshair" : "";
1900
+ indicateReverse(p) {
1901
+ i.getCanvasContainer().style.cursor = p ? "crosshair" : "";
1902
1902
  },
1903
- setReverseMarker(a) {
1904
- !t || !e || (s ? a ? s.setLngLat(a) : (s.remove(), s = void 0) : a && (e instanceof Function ? s = e(i) ?? void 0 : (s = (typeof e == "object" ? new t.Marker(e) : m()).setLngLat(a).addTo(i), s.getElement().classList.add("marker-reverse"))));
1903
+ setReverseMarker(p) {
1904
+ !t || !e || (s ? p ? s.setLngLat(p) : (s.remove(), s = void 0) : p && (e instanceof Function ? s = e(i) ?? void 0 : (s = (typeof e == "object" ? new t.Marker(e) : v()).setLngLat(p).addTo(i), s.getElement().classList.add("marker-reverse"))));
1905
1905
  },
1906
- setMarkers(a, d) {
1907
- for (const v of u)
1908
- v.remove();
1909
- if (u.length = 0, y(void 0), !!t) {
1910
- if (d) {
1911
- let v = !1;
1912
- if (d.geometry.type === "GeometryCollection") {
1913
- const E = d.geometry.geometries.filter(
1914
- (w) => w.type === "Polygon" || w.type === "MultiPolygon"
1906
+ setMarkers(p, x) {
1907
+ for (const E of u)
1908
+ E.remove();
1909
+ if (u.length = 0, d(void 0), !!t) {
1910
+ if (x) {
1911
+ let E = !1;
1912
+ if (x.geometry.type === "GeometryCollection") {
1913
+ const w = x.geometry.geometries.filter(
1914
+ (b) => b.type === "Polygon" || b.type === "MultiPolygon"
1915
1915
  );
1916
- t: if (E.length > 0) {
1917
- const w = Dt(
1918
- V(E.map((b) => X(b)))
1916
+ t: if (w.length > 0) {
1917
+ const b = Dt(
1918
+ V(w.map((_) => X(_)))
1919
1919
  );
1920
- if (!w)
1920
+ if (!b)
1921
1921
  break t;
1922
1922
  zt(
1923
1923
  {
1924
- ...d,
1925
- geometry: w.geometry
1924
+ ...x,
1925
+ geometry: b.geometry
1926
1926
  },
1927
- y
1928
- ), v = !0;
1927
+ d
1928
+ ), E = !0;
1929
1929
  } else {
1930
- const w = d.geometry.geometries.filter(
1931
- (b) => b.type === "LineString" || b.type === "MultiLineString"
1930
+ const b = x.geometry.geometries.filter(
1931
+ (_) => _.type === "LineString" || _.type === "MultiLineString"
1932
1932
  );
1933
- w.length > 0 && (y({
1934
- ...d,
1935
- geometry: { type: "GeometryCollection", geometries: w }
1936
- }), v = !0);
1933
+ b.length > 0 && (d({
1934
+ ...x,
1935
+ geometry: { type: "GeometryCollection", geometries: b }
1936
+ }), E = !0);
1937
1937
  }
1938
1938
  }
1939
- if (!v) {
1940
- if (d.geometry.type === "Polygon" || d.geometry.type === "MultiPolygon")
1941
- zt(d, y);
1942
- else if (d.geometry.type === "LineString" || d.geometry.type === "MultiLineString") {
1943
- y(d);
1939
+ if (!E) {
1940
+ if (x.geometry.type === "Polygon" || x.geometry.type === "MultiPolygon")
1941
+ zt(x, d);
1942
+ else if (x.geometry.type === "LineString" || x.geometry.type === "MultiLineString") {
1943
+ d(x);
1944
1944
  return;
1945
1945
  }
1946
1946
  }
1947
- if (!l && d.geometry.type !== "Point")
1947
+ if (!a && x.geometry.type !== "Point")
1948
1948
  return;
1949
1949
  if (e instanceof Function) {
1950
- const E = e(i, d);
1951
- E && u.push(E);
1950
+ const w = e(i, x);
1951
+ w && u.push(w);
1952
1952
  } else e && u.push(
1953
- typeof e == "object" ? new t.Marker(e) : m().setLngLat(d.center).addTo(i)
1953
+ typeof e == "object" ? new t.Marker(e) : v().setLngLat(x.center).addTo(i)
1954
1954
  );
1955
1955
  }
1956
1956
  if (n)
1957
- for (const v of a ?? []) {
1958
- if (v === d)
1957
+ for (const E of p ?? []) {
1958
+ if (E === x)
1959
1959
  continue;
1960
- let E;
1960
+ let w;
1961
1961
  if (n instanceof Function) {
1962
- if (E = n(i, v), !E)
1962
+ if (w = n(i, E), !w)
1963
1963
  continue;
1964
1964
  } else
1965
- E = (typeof n == "object" ? new t.Marker(n) : m(!0)).setLngLat(v.center).setPopup(
1965
+ w = (typeof n == "object" ? new t.Marker(n) : v(!0)).setLngLat(E.center).setPopup(
1966
1966
  new t.Popup({
1967
1967
  offset: [1, -27],
1968
1968
  closeButton: !1,
1969
1969
  closeOnMove: !0,
1970
1970
  className: "maptiler-gc-popup"
1971
1971
  }).setText(
1972
- v.place_type[0] === "reverse" ? v.place_name : v.place_name.replace(/,.*/, "")
1972
+ E.place_type[0] === "reverse" ? E.place_name : E.place_name.replace(/,.*/, "")
1973
1973
  )
1974
1974
  ).addTo(i);
1975
- const w = E.getElement();
1976
- w.addEventListener("click", (b) => {
1977
- b.stopPropagation(), c == null || c({ type: "markerClick", id: v.id });
1978
- }), w.addEventListener("mouseenter", () => {
1979
- c == null || c({ type: "markerMouseEnter", id: v.id }), E.togglePopup();
1980
- }), w.addEventListener("mouseleave", () => {
1981
- c == null || c({ type: "markerMouseLeave", id: v.id }), E.togglePopup();
1982
- }), u.push(E);
1975
+ const b = w.getElement();
1976
+ b.addEventListener("click", (_) => {
1977
+ _.stopPropagation(), c == null || c({ type: "markerClick", id: E.id });
1978
+ }), b.addEventListener("mouseenter", () => {
1979
+ c == null || c({ type: "markerMouseEnter", id: E.id }), w.togglePopup();
1980
+ }), b.addEventListener("mouseleave", () => {
1981
+ c == null || c({ type: "markerMouseLeave", id: E.id }), w.togglePopup();
1982
+ }), u.push(w);
1983
1983
  }
1984
1984
  }
1985
1985
  },
1986
- setSelectedMarker(a) {
1987
- p && p.getElement().classList.toggle("marker-selected", !1), p = a > -1 ? u[a] : void 0, p == null || p.getElement().classList.toggle("marker-selected", !0);
1986
+ setSelectedMarker(p) {
1987
+ g && g.getElement().classList.toggle("marker-selected", !1), g = p > -1 ? u[p] : void 0, g == null || g.getElement().classList.toggle("marker-selected", !0);
1988
1988
  },
1989
1989
  getCenterAndZoom() {
1990
- const a = i.getCenter();
1991
- return [i.getZoom(), a.lng, a.lat];
1990
+ const p = i.getCenter();
1991
+ return [i.getZoom(), p.lng, p.lat];
1992
+ },
1993
+ setShowPolygonMarker(p) {
1994
+ a = p;
1992
1995
  }
1993
1996
  };
1994
1997
  }