@maptiler/geocoding-control 0.0.42 → 0.0.43

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.
@@ -7,10 +7,9 @@ var Mn = (r, t, e) => (Ks(r, t, "read from private field"), e ? e.call(r) : t.ge
7
7
  throw TypeError("Cannot add the same private member more than once");
8
8
  t instanceof WeakSet ? t.add(r) : t.set(r, e);
9
9
  }, vo = (r, t, e, n) => (Ks(r, t, "write to private field"), n ? n.call(r, e) : t.set(r, e), e);
10
- import { Evented as nl } from "maplibre-gl";
11
10
  function Nt() {
12
11
  }
13
- function rl(r, t) {
12
+ function nl(r, t) {
14
13
  for (const e in t)
15
14
  r[e] = t[e];
16
15
  return r;
@@ -30,19 +29,19 @@ function Va(r) {
30
29
  function bi(r, t) {
31
30
  return r != r ? t == t : r !== t || r && typeof r == "object" || typeof r == "function";
32
31
  }
33
- function il(r) {
32
+ function rl(r) {
34
33
  return Object.keys(r).length === 0;
35
34
  }
36
- function ol(r, t, e, n) {
35
+ function il(r, t, e, n) {
37
36
  if (r) {
38
37
  const i = Ua(r, t, e, n);
39
38
  return r[0](i);
40
39
  }
41
40
  }
42
41
  function Ua(r, t, e, n) {
43
- return r[1] && n ? rl(e.ctx.slice(), r[1](n(t))) : e.ctx;
42
+ return r[1] && n ? nl(e.ctx.slice(), r[1](n(t))) : e.ctx;
44
43
  }
45
- function sl(r, t, e, n) {
44
+ function ol(r, t, e, n) {
46
45
  if (r[2] && n) {
47
46
  const i = r[2](n(e));
48
47
  if (t.dirty === void 0)
@@ -57,13 +56,13 @@ function sl(r, t, e, n) {
57
56
  }
58
57
  return t.dirty;
59
58
  }
60
- function al(r, t, e, n, i, o) {
59
+ function sl(r, t, e, n, i, o) {
61
60
  if (i) {
62
61
  const s = Ua(t, e, n, o);
63
62
  r.p(s, i);
64
63
  }
65
64
  }
66
- function ul(r) {
65
+ function al(r) {
67
66
  if (r.ctx.length > 32) {
68
67
  const t = [], e = r.ctx.length / 32;
69
68
  for (let n = 0; n < e; n++)
@@ -82,9 +81,9 @@ function je(r, t, e) {
82
81
  r.insertBefore(t, e || null);
83
82
  }
84
83
  function Ae(r) {
85
- r.parentNode.removeChild(r);
84
+ r.parentNode && r.parentNode.removeChild(r);
86
85
  }
87
- function ll(r, t) {
86
+ function ul(r, t) {
88
87
  for (let e = 0; e < r.length; e += 1)
89
88
  r[e] && r[e].d(t);
90
89
  }
@@ -103,7 +102,7 @@ function zn() {
103
102
  function Ge(r, t, e, n) {
104
103
  return r.addEventListener(t, e, n), () => r.removeEventListener(t, e, n);
105
104
  }
106
- function cl(r) {
105
+ function ll(r) {
107
106
  return function(t) {
108
107
  return t.preventDefault(), r.call(this, t);
109
108
  };
@@ -111,7 +110,7 @@ function cl(r) {
111
110
  function B(r, t, e) {
112
111
  e == null ? r.removeAttribute(t) : r.getAttribute(t) !== e && r.setAttribute(t, e);
113
112
  }
114
- function fl(r) {
113
+ function cl(r) {
115
114
  return Array.from(r.childNodes);
116
115
  }
117
116
  function qi(r, t) {
@@ -123,7 +122,7 @@ function Zs(r, t) {
123
122
  function fe(r, t, e) {
124
123
  r.classList[e ? "add" : "remove"](t);
125
124
  }
126
- function hl(r, t, { bubbles: e = !1, cancelable: n = !1 } = {}) {
125
+ function fl(r, t, { bubbles: e = !1, cancelable: n = !1 } = {}) {
127
126
  const i = document.createEvent("CustomEvent");
128
127
  return i.initCustomEvent(r, e, n, t), i;
129
128
  }
@@ -136,15 +135,15 @@ function qa() {
136
135
  throw new Error("Function called outside component initialization");
137
136
  return Xi;
138
137
  }
139
- function gl(r) {
138
+ function hl(r) {
140
139
  qa().$$.on_destroy.push(r);
141
140
  }
142
- function pl() {
141
+ function gl() {
143
142
  const r = qa();
144
143
  return (t, e, { cancelable: n = !1 } = {}) => {
145
144
  const i = r.$$.callbacks[t];
146
145
  if (i) {
147
- const o = hl(t, e, { cancelable: n });
146
+ const o = fl(t, e, { cancelable: n });
148
147
  return i.slice().forEach((s) => {
149
148
  s.call(r, o);
150
149
  }), !o.defaultPrevented;
@@ -152,10 +151,10 @@ function pl() {
152
151
  return !0;
153
152
  };
154
153
  }
155
- const Gi = [], fs = [], No = [], $s = [], dl = Promise.resolve();
154
+ const Gi = [], fs = [], No = [], $s = [], pl = Promise.resolve();
156
155
  let hs = !1;
157
- function vl() {
158
- hs || (hs = !0, dl.then(Xa));
156
+ function dl() {
157
+ hs || (hs = !0, pl.then(Xa));
159
158
  }
160
159
  function gs(r) {
161
160
  No.push(r);
@@ -167,7 +166,7 @@ function Xa() {
167
166
  do {
168
167
  for (; yo < Gi.length; ) {
169
168
  const t = Gi[yo];
170
- yo++, Vi(t), yl(t.$$);
169
+ yo++, Vi(t), vl(t.$$);
171
170
  }
172
171
  for (Vi(null), Gi.length = 0, yo = 0; fs.length; )
173
172
  fs.pop()();
@@ -181,7 +180,7 @@ function Xa() {
181
180
  $s.pop()();
182
181
  hs = !1, ss.clear(), Vi(r);
183
182
  }
184
- function yl(r) {
183
+ function vl(r) {
185
184
  if (r.fragment !== null) {
186
185
  r.update(), Rr(r.before_update);
187
186
  const t = r.dirty;
@@ -227,8 +226,8 @@ function si(r, t) {
227
226
  const e = r.$$;
228
227
  e.fragment !== null && (Rr(e.on_destroy), e.fragment && e.fragment.d(t), e.on_destroy = e.fragment = null, e.ctx = []);
229
228
  }
230
- function ml(r, t) {
231
- r.$$.dirty[0] === -1 && (Gi.push(r), vl(), r.$$.dirty.fill(0)), r.$$.dirty[t / 31 | 0] |= 1 << t % 31;
229
+ function yl(r, t) {
230
+ r.$$.dirty[0] === -1 && (Gi.push(r), dl(), r.$$.dirty.fill(0)), r.$$.dirty[t / 31 | 0] |= 1 << t % 31;
232
231
  }
233
232
  function Pi(r, t, e, n, i, o, s, a = [-1]) {
234
233
  const u = Xi;
@@ -255,10 +254,10 @@ function Pi(r, t, e, n, i, o, s, a = [-1]) {
255
254
  let c = !1;
256
255
  if (l.ctx = e ? e(r, t.props || {}, (f, h, ...g) => {
257
256
  const p = g.length ? g[0] : h;
258
- return l.ctx && i(l.ctx[f], l.ctx[f] = p) && (!l.skip_bound && l.bound[f] && l.bound[f](p), c && ml(r, f)), h;
257
+ return l.ctx && i(l.ctx[f], l.ctx[f] = p) && (!l.skip_bound && l.bound[f] && l.bound[f](p), c && yl(r, f)), h;
259
258
  }) : [], l.update(), c = !0, Rr(l.before_update), l.fragment = n ? n(l.ctx) : !1, t.target) {
260
259
  if (t.hydrate) {
261
- const f = fl(t.target);
260
+ const f = cl(t.target);
262
261
  l.fragment && l.fragment.l(f), f.forEach(Ae);
263
262
  } else
264
263
  l.fragment && l.fragment.c();
@@ -280,10 +279,10 @@ class Ri {
280
279
  };
281
280
  }
282
281
  $set(t) {
283
- this.$$set && !il(t) && (this.$$.skip_bound = !0, this.$$set(t), this.$$.skip_bound = !1);
282
+ this.$$set && !rl(t) && (this.$$.skip_bound = !0, this.$$set(t), this.$$.skip_bound = !1);
284
283
  }
285
284
  }
286
- function _l(r) {
285
+ function ml(r) {
287
286
  let t, e;
288
287
  return {
289
288
  c() {
@@ -300,12 +299,12 @@ function _l(r) {
300
299
  }
301
300
  };
302
301
  }
303
- class El extends Ri {
302
+ class _l extends Ri {
304
303
  constructor(t) {
305
- super(), Pi(this, t, null, _l, bi, {});
304
+ super(), Pi(this, t, null, ml, bi, {});
306
305
  }
307
306
  }
308
- function Il(r) {
307
+ function El(r) {
309
308
  let t, e;
310
309
  return {
311
310
  c() {
@@ -322,12 +321,12 @@ function Il(r) {
322
321
  }
323
322
  };
324
323
  }
325
- class Cl extends Ri {
324
+ class Il extends Ri {
326
325
  constructor(t) {
327
- super(), Pi(this, t, null, Il, bi, {});
326
+ super(), Pi(this, t, null, El, bi, {});
328
327
  }
329
328
  }
330
- function Nl(r) {
329
+ function Cl(r) {
331
330
  let t;
332
331
  return {
333
332
  c() {
@@ -344,12 +343,12 @@ function Nl(r) {
344
343
  }
345
344
  };
346
345
  }
347
- class xl extends Ri {
346
+ class Nl extends Ri {
348
347
  constructor(t) {
349
- super(), Pi(this, t, null, Nl, bi, {});
348
+ super(), Pi(this, t, null, Cl, bi, {});
350
349
  }
351
350
  }
352
- function Sl(r) {
351
+ function xl(r) {
353
352
  let t, e, n;
354
353
  return {
355
354
  c() {
@@ -368,7 +367,7 @@ function Sl(r) {
368
367
  }
369
368
  };
370
369
  }
371
- function wl(r, t, e) {
370
+ function Sl(r, t, e) {
372
371
  let { displayIn: n } = t;
373
372
  return r.$$set = (i) => {
374
373
  "displayIn" in i && e(0, n = i.displayIn);
@@ -376,10 +375,10 @@ function wl(r, t, e) {
376
375
  }
377
376
  class Ya extends Ri {
378
377
  constructor(t) {
379
- super(), Pi(this, t, wl, Sl, bi, { displayIn: 0 });
378
+ super(), Pi(this, t, Sl, xl, bi, { displayIn: 0 });
380
379
  }
381
380
  }
382
- function Ll(r) {
381
+ function wl(r) {
383
382
  let t, e;
384
383
  return {
385
384
  c() {
@@ -396,9 +395,9 @@ function Ll(r) {
396
395
  }
397
396
  };
398
397
  }
399
- class bl extends Ri {
398
+ class Ll extends Ri {
400
399
  constructor(t) {
401
- super(), Pi(this, t, null, Ll, bi, {});
400
+ super(), Pi(this, t, null, wl, bi, {});
402
401
  }
403
402
  }
404
403
  function ta(r, t, e) {
@@ -407,7 +406,7 @@ function ta(r, t, e) {
407
406
  }
408
407
  function ea(r) {
409
408
  let t, e;
410
- return t = new xl({}), {
409
+ return t = new Nl({}), {
411
410
  c() {
412
411
  Yi(t.$$.fragment);
413
412
  },
@@ -427,7 +426,7 @@ function ea(r) {
427
426
  }
428
427
  function na(r) {
429
428
  let t, e, n, i, o;
430
- return e = new El({}), {
429
+ return e = new _l({}), {
431
430
  c() {
432
431
  t = Qt("button"), Yi(e.$$.fragment), B(t, "type", "button"), B(t, "title", r[8]), B(t, "class", "svelte-1h1zm6d"), fe(t, "active", r[1]);
433
432
  },
@@ -448,7 +447,7 @@ function na(r) {
448
447
  }
449
448
  };
450
449
  }
451
- function Pl(r) {
450
+ function bl(r) {
452
451
  let t, e, n, i, o = r[12], s = [];
453
452
  for (let u = 0; u < o.length; u += 1)
454
453
  s[u] = ia(ta(r, o, u));
@@ -498,11 +497,11 @@ function Pl(r) {
498
497
  e = !1;
499
498
  },
500
499
  d(u) {
501
- u && Ae(t), ll(s, u), n = !1, Rr(i);
500
+ u && Ae(t), ul(s, u), n = !1, Rr(i);
502
501
  }
503
502
  };
504
503
  }
505
- function Rl(r) {
504
+ function Pl(r) {
506
505
  let t, e;
507
506
  return {
508
507
  c() {
@@ -521,7 +520,7 @@ function Rl(r) {
521
520
  }
522
521
  };
523
522
  }
524
- function Ol(r) {
523
+ function Rl(r) {
525
524
  let t, e;
526
525
  return {
527
526
  c() {
@@ -540,7 +539,7 @@ function Ol(r) {
540
539
  }
541
540
  };
542
541
  }
543
- function Dl(r) {
542
+ function Ol(r) {
544
543
  let t = "", e;
545
544
  return {
546
545
  c() {
@@ -608,11 +607,11 @@ function ia(r) {
608
607
  }
609
608
  };
610
609
  }
611
- function Tl(r) {
610
+ function Dl(r) {
612
611
  let t, e, n, i, o, s, a, u, l, c, f, h, g, p, y, d, _, I, N, C;
613
- i = new bl({}), c = new Cl({});
612
+ i = new Ll({}), c = new Il({});
614
613
  let b = r[18] && ea(), S = r[7] === !0 && na(r);
615
- const D = r[43].default, T = ol(D, r, r[42], null), F = [Dl, Ol, Rl, Pl], j = [];
614
+ const D = r[43].default, T = il(D, r, r[42], null), F = [Ol, Rl, Pl, bl], j = [];
616
615
  function z(O, X) {
617
616
  var P, Y;
618
617
  return O[15] ? O[17] ? 1 : ((P = O[12]) == null ? void 0 : P.length) === 0 ? 2 : O[15] && ((Y = O[12]) == null ? void 0 : Y.length) ? 3 : -1 : 0;
@@ -630,7 +629,7 @@ function Tl(r) {
630
629
  Ge(s, "keydown", r[20]),
631
630
  Ge(s, "input", r[49]),
632
631
  Ge(l, "click", r[50]),
633
- Ge(t, "submit", cl(r[19]))
632
+ Ge(t, "submit", ll(r[19]))
634
633
  ], N = !0);
635
634
  },
636
635
  p(O, X) {
@@ -638,12 +637,12 @@ function Tl(r) {
638
637
  b = null;
639
638
  }), wo()), O[7] === !0 ? S ? (S.p(O, X), X[0] & 128 && Kt(S, 1)) : (S = na(O), S.c(), Kt(S, 1), S.m(e, g)) : S && (So(), be(S, 1, 1, () => {
640
639
  S = null;
641
- }), wo()), T && T.p && (!I || X[1] & 2048) && al(
640
+ }), wo()), T && T.p && (!I || X[1] & 2048) && sl(
642
641
  T,
643
642
  D,
644
643
  O,
645
644
  O[42],
646
- I ? sl(D, O[42], X, null) : ul(O[42]),
645
+ I ? ol(D, O[42], X, null) : al(O[42]),
647
646
  null
648
647
  );
649
648
  let P = y;
@@ -666,7 +665,7 @@ function ps(r, t, e) {
666
665
  const n = t[1], i = t[0], o = n - i;
667
666
  return r === n && e ? r : ((r - i) % o + o) % o + i;
668
667
  }
669
- function Ml(r, t, e) {
668
+ function Tl(r, t, e) {
670
669
  let n, { $$slots: i = {}, $$scope: o } = t, { class: s = void 0 } = t, { mapController: a = void 0 } = t, { apiKey: u } = t, { debounceSearch: l = 200 } = t, { placeholder: c = "Search" } = t, { errorMessage: f = "Searching failed" } = t, { noResultsMessage: h = "No results found" } = t, { proximity: g = void 0 } = t, { bbox: p = void 0 } = t, { trackProximity: y = !0 } = t, { minLength: d = 2 } = t, { language: _ = void 0 } = t, { showResultsWhileTyping: I = !0 } = t, { zoom: N = 16 } = t, { flyTo: C = !0 } = t, { collapsed: b = !1 } = t, { clearOnBlur: S = !1 } = t, { enableReverse: D = !1 } = t, { reverseButtonTitle: T = "toggle reverse geocoding" } = t, { clearButtonTitle: F = "clear" } = t, { filter: j = () => !0 } = t, { searchValue: z = "" } = t, { reverseActive: O = D === "always" } = t, { showPlaceType: X = !1 } = t, { showFullGeometry: P = !0 } = t;
671
670
  function Y() {
672
671
  Bt.focus();
@@ -680,8 +679,8 @@ function Ml(r, t, e) {
680
679
  }));
681
680
  }
682
681
  let Dt = !1, et, Ft, nt, Dn = "", Bt, St = -1, ye, po = [], Tr, es, ns;
683
- const cr = pl();
684
- gl(() => {
682
+ const cr = gl();
683
+ hl(() => {
685
684
  a && (a.setProximityChangeHandler(void 0), a.setMapClickHandler(void 0), a.indicateReverse(!1), a.setSelectedMarker(-1), a.setMarkers(void 0, void 0));
686
685
  });
687
686
  function Hs(w) {
@@ -835,13 +834,13 @@ function Ml(r, t, e) {
835
834
  el
836
835
  ];
837
836
  }
838
- class Al extends Ri {
837
+ class Ml extends Ri {
839
838
  constructor(t) {
840
839
  super(), Pi(
841
840
  this,
842
841
  t,
843
- Ml,
844
842
  Tl,
843
+ Dl,
845
844
  bi,
846
845
  {
847
846
  class: 2,
@@ -913,7 +912,7 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
913
912
  See the Apache Version 2.0 License for specific language governing permissions
914
913
  and limitations under the License.
915
914
  ***************************************************************************** */
916
- function Fl(r, t) {
915
+ function Al(r, t) {
917
916
  var e = { label: 0, sent: function() {
918
917
  if (o[0] & 1)
919
918
  throw o[1];
@@ -984,7 +983,7 @@ var Er = function() {
984
983
  }
985
984
  return r;
986
985
  }();
987
- function Bl(r, t) {
986
+ function Fl(r, t) {
988
987
  return r > t ? 1 : r < t ? -1 : 0;
989
988
  }
990
989
  function dr(r, t, e) {
@@ -1030,7 +1029,7 @@ function oa(r, t, e) {
1030
1029
  }
1031
1030
  return { left: n, right: i };
1032
1031
  }
1033
- function Gl(r, t, e) {
1032
+ function Bl(r, t, e) {
1034
1033
  return t === null ? r : (r === null || (t = dr(r.key, t, e), t.left = r), t);
1035
1034
  }
1036
1035
  function ds(r, t, e, n, i) {
@@ -1043,7 +1042,7 @@ function ds(r, t, e, n, i) {
1043
1042
  }
1044
1043
  var Ps = function() {
1045
1044
  function r(t) {
1046
- t === void 0 && (t = Bl), this._root = null, this._size = 0, this._comparator = t;
1045
+ t === void 0 && (t = Fl), this._root = null, this._size = 0, this._comparator = t;
1047
1046
  }
1048
1047
  return r.prototype.insert = function(t, e) {
1049
1048
  return this._size++, this._root = as(t, e, this._root, this._comparator);
@@ -1171,14 +1170,14 @@ var Ps = function() {
1171
1170
  }, r.prototype.clear = function() {
1172
1171
  return this._root = null, this._size = 0, this;
1173
1172
  }, r.prototype.toList = function() {
1174
- return zl(this._root);
1173
+ return kl(this._root);
1175
1174
  }, r.prototype.load = function(t, e, n) {
1176
1175
  e === void 0 && (e = []), n === void 0 && (n = !1);
1177
1176
  var i = t.length, o = this._comparator;
1178
1177
  if (n && ms(t, e, 0, i - 1, o), this._root === null)
1179
1178
  this._root = vs(t, e, 0, i), this._size = i;
1180
1179
  else {
1181
- var s = Vl(this.toList(), kl(t, e), o);
1180
+ var s = zl(this.toList(), Gl(t, e), o);
1182
1181
  i = this._size + i, this._root = ys({ head: s }, 0, i);
1183
1182
  }
1184
1183
  return this;
@@ -1206,12 +1205,12 @@ var Ps = function() {
1206
1205
  }, t), e.join("");
1207
1206
  }, r.prototype.update = function(t, e, n) {
1208
1207
  var i = this._comparator, o = oa(t, this._root, i), s = o.left, a = o.right;
1209
- i(t, e) < 0 ? a = as(e, n, a, i) : s = as(e, n, s, i), this._root = Gl(s, a, i);
1208
+ i(t, e) < 0 ? a = as(e, n, a, i) : s = as(e, n, s, i), this._root = Bl(s, a, i);
1210
1209
  }, r.prototype.split = function(t) {
1211
1210
  return oa(t, this._root, this._comparator);
1212
1211
  }, r.prototype[Symbol.iterator] = function() {
1213
1212
  var t;
1214
- return Fl(this, function(e) {
1213
+ return Al(this, function(e) {
1215
1214
  switch (e.label) {
1216
1215
  case 0:
1217
1216
  t = this.minNode(), e.label = 1;
@@ -1233,12 +1232,12 @@ function vs(r, t, e, n) {
1233
1232
  }
1234
1233
  return null;
1235
1234
  }
1236
- function kl(r, t) {
1235
+ function Gl(r, t) {
1237
1236
  for (var e = new Er(null, null), n = e, i = 0; i < r.length; i++)
1238
1237
  n = n.next = new Er(r[i], t[i]);
1239
1238
  return n.next = null, e.next;
1240
1239
  }
1241
- function zl(r) {
1240
+ function kl(r) {
1242
1241
  for (var t = r, e = [], n = !1, i = new Er(null, null), o = i; !n; )
1243
1242
  t ? (e.push(t), t = t.left) : e.length > 0 ? (t = o = o.next = e.pop(), t = t.right) : n = !0;
1244
1243
  return o.next = null, i.next;
@@ -1251,7 +1250,7 @@ function ys(r, t, e) {
1251
1250
  }
1252
1251
  return null;
1253
1252
  }
1254
- function Vl(r, t, e) {
1253
+ function zl(r, t, e) {
1255
1254
  for (var n = new Er(null, null), i = n, o = r, s = t; o !== null && s !== null; )
1256
1255
  e(o.key, s.key) < 0 ? (i.next = o, o = o.next) : (i.next = s, s = s.next), i = i.next;
1257
1256
  return o !== null ? i.next = o : s !== null && (i.next = s), n.next;
@@ -1304,12 +1303,12 @@ var Fi = function(t, e) {
1304
1303
  };
1305
1304
  }, vr = Number.EPSILON;
1306
1305
  vr === void 0 && (vr = Math.pow(2, -52));
1307
- var Ul = vr * vr, Es = function(t, e) {
1306
+ var Vl = vr * vr, Es = function(t, e) {
1308
1307
  if (-vr < t && t < vr && -vr < e && e < vr)
1309
1308
  return 0;
1310
1309
  var n = t - e;
1311
- return n * n < Ul * t * e ? 0 : t < e ? -1 : 1;
1312
- }, ql = /* @__PURE__ */ function() {
1310
+ return n * n < Vl * t * e ? 0 : t < e ? -1 : 1;
1311
+ }, Ul = /* @__PURE__ */ function() {
1313
1312
  function r() {
1314
1313
  pn(this, r), this.reset();
1315
1314
  }
@@ -1341,7 +1340,7 @@ var Ul = vr * vr, Es = function(t, e) {
1341
1340
  return o !== null && Es(n.key, o.key) === 0 ? (this.tree.remove(e), o.key) : e;
1342
1341
  }
1343
1342
  }]), r;
1344
- }(), Hi = new ql(), Ui = function(t, e) {
1343
+ }(), Hi = new Ul(), Ui = function(t, e) {
1345
1344
  return t.x * e.y - t.y * e.x;
1346
1345
  }, Ha = function(t, e) {
1347
1346
  return t.x * e.x + t.y * e.y;
@@ -1356,7 +1355,7 @@ var Ul = vr * vr, Es = function(t, e) {
1356
1355
  return Es(s, 0);
1357
1356
  }, Po = function(t) {
1358
1357
  return Math.sqrt(Ha(t, t));
1359
- }, Xl = function(t, e, n) {
1358
+ }, ql = function(t, e, n) {
1360
1359
  var i = {
1361
1360
  x: e.x - t.x,
1362
1361
  y: e.y - t.y
@@ -1365,7 +1364,7 @@ var Ul = vr * vr, Es = function(t, e) {
1365
1364
  y: n.y - t.y
1366
1365
  };
1367
1366
  return Ui(o, i) / Po(o) / Po(i);
1368
- }, Yl = function(t, e, n) {
1367
+ }, Xl = function(t, e, n) {
1369
1368
  var i = {
1370
1369
  x: e.x - t.x,
1371
1370
  y: e.y - t.y
@@ -1384,7 +1383,7 @@ var Ul = vr * vr, Es = function(t, e) {
1384
1383
  x: n,
1385
1384
  y: t.y + e.y / e.x * (n - t.x)
1386
1385
  };
1387
- }, Hl = function(t, e, n, i) {
1386
+ }, Yl = function(t, e, n, i) {
1388
1387
  if (e.x === 0)
1389
1388
  return ca(n, i, t.x);
1390
1389
  if (i.x === 0)
@@ -1458,8 +1457,8 @@ var Ul = vr * vr, Es = function(t, e) {
1458
1457
  var n = this, i = /* @__PURE__ */ new Map(), o = function(a) {
1459
1458
  var u = a.otherSE;
1460
1459
  i.set(a, {
1461
- sine: Xl(n.point, e.point, u.point),
1462
- cosine: Yl(n.point, e.point, u.point)
1460
+ sine: ql(n.point, e.point, u.point),
1461
+ cosine: Xl(n.point, e.point, u.point)
1463
1462
  });
1464
1463
  };
1465
1464
  return function(s, a) {
@@ -1469,7 +1468,7 @@ var Ul = vr * vr, Es = function(t, e) {
1469
1468
  };
1470
1469
  }
1471
1470
  }]), r;
1472
- }(), Wl = 0, Ro = /* @__PURE__ */ function() {
1471
+ }(), Hl = 0, Ro = /* @__PURE__ */ function() {
1473
1472
  Ce(r, null, [{
1474
1473
  key: "compare",
1475
1474
  value: function(e, n) {
@@ -1530,7 +1529,7 @@ var Ul = vr * vr, Es = function(t, e) {
1530
1529
  }
1531
1530
  }]);
1532
1531
  function r(t, e, n, i) {
1533
- pn(this, r), this.id = ++Wl, this.leftSE = t, t.segment = this, t.otherSE = e, this.rightSE = e, e.segment = this, e.otherSE = t, this.rings = n, this.windings = i;
1532
+ pn(this, r), this.id = ++Hl, this.leftSE = t, t.segment = this, t.otherSE = e, this.rightSE = e, e.segment = this, e.otherSE = t, this.rings = n, this.windings = i;
1534
1533
  }
1535
1534
  return Ce(r, [{
1536
1535
  key: "replaceRightSE",
@@ -1598,7 +1597,7 @@ var Ul = vr * vr, Es = function(t, e) {
1598
1597
  return a;
1599
1598
  if (h)
1600
1599
  return l;
1601
- var p = Hl(s, this.vector(), u, e.vector());
1600
+ var p = Yl(s, this.vector(), u, e.vector());
1602
1601
  return p === null || !Fi(o, p) ? null : Hi.round(p.x, p.y);
1603
1602
  }
1604
1603
  }, {
@@ -1781,7 +1780,7 @@ var Ul = vr * vr, Es = function(t, e) {
1781
1780
  return e;
1782
1781
  }
1783
1782
  }]), r;
1784
- }(), jl = /* @__PURE__ */ function() {
1783
+ }(), Wl = /* @__PURE__ */ function() {
1785
1784
  function r(t, e) {
1786
1785
  if (pn(this, r), !Array.isArray(t))
1787
1786
  throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
@@ -1829,7 +1828,7 @@ var Ul = vr * vr, Es = function(t, e) {
1829
1828
  }
1830
1829
  };
1831
1830
  for (var n = 0, i = t.length; n < i; n++) {
1832
- var o = new jl(t[n], this);
1831
+ var o = new Wl(t[n], this);
1833
1832
  o.bbox.ll.x < this.bbox.ll.x && (this.bbox.ll.x = o.bbox.ll.x), o.bbox.ll.y < this.bbox.ll.y && (this.bbox.ll.y = o.bbox.ll.y), o.bbox.ur.x > this.bbox.ur.x && (this.bbox.ur.x = o.bbox.ur.x), o.bbox.ur.y > this.bbox.ur.y && (this.bbox.ur.y = o.bbox.ur.y), this.polys.push(o);
1834
1833
  }
1835
1834
  this.isSubject = e;
@@ -1843,7 +1842,7 @@ var Ul = vr * vr, Es = function(t, e) {
1843
1842
  return e;
1844
1843
  }
1845
1844
  }]), r;
1846
- }(), Kl = /* @__PURE__ */ function() {
1845
+ }(), jl = /* @__PURE__ */ function() {
1847
1846
  Ce(r, null, [{
1848
1847
  key: "factory",
1849
1848
  value: function(e) {
@@ -1960,7 +1959,7 @@ var Ul = vr * vr, Es = function(t, e) {
1960
1959
  return e;
1961
1960
  }
1962
1961
  }]), r;
1963
- }(), Ql = /* @__PURE__ */ function() {
1962
+ }(), Kl = /* @__PURE__ */ function() {
1964
1963
  function r(t) {
1965
1964
  pn(this, r), this.rings = t, this.polys = this._composePolys(t);
1966
1965
  }
@@ -1989,7 +1988,7 @@ var Ul = vr * vr, Es = function(t, e) {
1989
1988
  return n;
1990
1989
  }
1991
1990
  }]), r;
1992
- }(), Jl = /* @__PURE__ */ function() {
1991
+ }(), Ql = /* @__PURE__ */ function() {
1993
1992
  function r(t) {
1994
1993
  var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Ro.compare;
1995
1994
  pn(this, r), this.queue = t, this.tree = new Ps(e), this.segments = [];
@@ -2063,7 +2062,7 @@ var Ul = vr * vr, Es = function(t, e) {
2063
2062
  return o.push(i), e.consumedBy === void 0 && this.tree.insert(e), o;
2064
2063
  }
2065
2064
  }]), r;
2066
- }(), pa = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE || 1e6, Zl = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS || 1e6, $l = /* @__PURE__ */ function() {
2065
+ }(), pa = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE || 1e6, Jl = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS || 1e6, Zl = /* @__PURE__ */ function() {
2067
2066
  function r() {
2068
2067
  pn(this, r);
2069
2068
  }
@@ -2086,7 +2085,7 @@ var Ul = vr * vr, Es = function(t, e) {
2086
2085
  for (var I = o[d].getSweepEvents(), N = 0, C = I.length; N < C; N++)
2087
2086
  if (y.insert(I[N]), y.size > pa)
2088
2087
  throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");
2089
- for (var b = new Jl(y), S = y.size, D = y.pop(); D; ) {
2088
+ for (var b = new Ql(y), S = y.size, D = y.pop(); D; ) {
2090
2089
  var T = D.key;
2091
2090
  if (y.size === S) {
2092
2091
  var F = T.segment;
@@ -2094,7 +2093,7 @@ var Ul = vr * vr, Es = function(t, e) {
2094
2093
  }
2095
2094
  if (y.size > pa)
2096
2095
  throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");
2097
- if (b.segments.length > Zl)
2096
+ if (b.segments.length > Jl)
2098
2097
  throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");
2099
2098
  for (var j = b.process(T), z = 0, O = j.length; z < O; z++) {
2100
2099
  var X = j[z];
@@ -2103,31 +2102,31 @@ var Ul = vr * vr, Es = function(t, e) {
2103
2102
  S = y.size, D = y.pop();
2104
2103
  }
2105
2104
  Hi.reset();
2106
- var P = Kl.factory(b.segments), Y = new Ql(P);
2105
+ var P = jl.factory(b.segments), Y = new Kl(P);
2107
2106
  return Y.getGeom();
2108
2107
  }
2109
2108
  }]), r;
2110
- }(), _n = new $l(), tc = function(t) {
2109
+ }(), _n = new Zl(), $l = function(t) {
2111
2110
  for (var e = arguments.length, n = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
2112
2111
  n[i - 1] = arguments[i];
2113
2112
  return _n.run("union", t, n);
2114
- }, ec = function(t) {
2113
+ }, tc = function(t) {
2115
2114
  for (var e = arguments.length, n = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
2116
2115
  n[i - 1] = arguments[i];
2117
2116
  return _n.run("intersection", t, n);
2118
- }, nc = function(t) {
2117
+ }, ec = function(t) {
2119
2118
  for (var e = arguments.length, n = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
2120
2119
  n[i - 1] = arguments[i];
2121
2120
  return _n.run("xor", t, n);
2122
- }, rc = function(t) {
2121
+ }, nc = function(t) {
2123
2122
  for (var e = arguments.length, n = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
2124
2123
  n[i - 1] = arguments[i];
2125
2124
  return _n.run("difference", t, n);
2126
2125
  }, Wa = {
2127
- union: tc,
2128
- intersection: ec,
2129
- xor: nc,
2130
- difference: rc
2126
+ union: $l,
2127
+ intersection: tc,
2128
+ xor: ec,
2129
+ difference: nc
2131
2130
  }, _e = 63710088e-1, ja = {
2132
2131
  centimeters: _e * 100,
2133
2132
  centimetres: _e * 100,
@@ -2150,7 +2149,7 @@ function Uo(r, t, e) {
2150
2149
  var n = { type: "Feature" };
2151
2150
  return (e.id === 0 || e.id) && (n.id = e.id), e.bbox && (n.bbox = e.bbox), n.properties = t || {}, n.geometry = r, n;
2152
2151
  }
2153
- function ic(r, t, e) {
2152
+ function rc(r, t, e) {
2154
2153
  if (e === void 0 && (e = {}), !r)
2155
2154
  throw new Error("coordinates is required");
2156
2155
  if (!Array.isArray(r))
@@ -2194,14 +2193,14 @@ function Qa(r, t, e) {
2194
2193
  };
2195
2194
  return Uo(n, t, e);
2196
2195
  }
2197
- function oc(r, t) {
2196
+ function ic(r, t) {
2198
2197
  t === void 0 && (t = "kilometers");
2199
2198
  var e = ja[t];
2200
2199
  if (!e)
2201
2200
  throw new Error(t + " units is invalid");
2202
2201
  return r * e;
2203
2202
  }
2204
- function sc(r, t) {
2203
+ function oc(r, t) {
2205
2204
  t === void 0 && (t = "kilometers");
2206
2205
  var e = ja[t];
2207
2206
  if (!e)
@@ -2214,11 +2213,18 @@ function da(r) {
2214
2213
  function Oo(r) {
2215
2214
  return r.type === "Feature" ? r.geometry : r;
2216
2215
  }
2217
- function ac(r, t, e) {
2216
+ function sc(r, t, e) {
2218
2217
  e === void 0 && (e = {});
2219
2218
  var n = Oo(r), i = Oo(t), o = Wa.union(n.coordinates, i.coordinates);
2220
2219
  return o.length === 0 ? null : o.length === 1 ? Ka(o[0], e.properties) : Qa(o, e.properties);
2221
2220
  }
2221
+ function ac(r, t) {
2222
+ var e = Oo(r), n = Oo(t), i = r.properties || {}, o = Wa.difference(
2223
+ e.coordinates,
2224
+ n.coordinates
2225
+ );
2226
+ return o.length === 0 ? null : o.length === 1 ? Ka(o[0], i) : Qa(o, i);
2227
+ }
2222
2228
  function Ja(r, t, e) {
2223
2229
  if (r !== null)
2224
2230
  for (var n, i, o, s, a, u, l, c = 0, f = 0, h, g = r.type, p = g === "FeatureCollection", y = g === "Feature", d = p ? r.features.length : 1, _ = 0; _ < d; _++) {
@@ -2374,7 +2380,7 @@ Cs.default = Cs;
2374
2380
  function uc(r, t) {
2375
2381
  t === void 0 && (t = {});
2376
2382
  var e = Cs(r), n = (e[0] + e[2]) / 2, i = (e[1] + e[3]) / 2;
2377
- return ic([n, i], t.properties, t);
2383
+ return rc([n, i], t.properties, t);
2378
2384
  }
2379
2385
  "fill" in Array.prototype || Object.defineProperty(Array.prototype, "fill", {
2380
2386
  configurable: !0,
@@ -15138,7 +15144,7 @@ function bo(r, t, e, n) {
15138
15144
  var a = Zc(o), u = {
15139
15145
  type: o.type,
15140
15146
  coordinates: ku(o.coordinates, a)
15141
- }, l = new Bs(), c = l.read(u), f = oc(sc(t, e), "meters"), h = kt.bufferOp(c, f, n), g = new uu();
15147
+ }, l = new Bs(), c = l.read(u), f = ic(oc(t, e), "meters"), h = kt.bufferOp(c, f, n), g = new uu();
15142
15148
  if (h = g.write(h), !Gu(h.coordinates)) {
15143
15149
  var p = {
15144
15150
  type: h.type,
@@ -15164,20 +15170,13 @@ function Zc(r) {
15164
15170
  var t = uc(r).geometry.coordinates, e = [-t[0], -t[1]];
15165
15171
  return Qc().rotate(e).scale(_e);
15166
15172
  }
15167
- function $c(r, t) {
15168
- var e = Oo(r), n = Oo(t), i = r.properties || {}, o = Wa.difference(
15169
- e.coordinates,
15170
- n.coordinates
15171
- );
15172
- return o.length === 0 ? null : o.length === 1 ? Ka(o[0], i) : Qa(o, i);
15173
- }
15174
15173
  function Ba(r) {
15175
15174
  let t;
15176
15175
  for (const e of r)
15177
15176
  t && e[0] - t[0] >= 180 ? e[0] -= 360 : t && e[0] - t[0] < -180 && (e[0] += 360), t = e;
15178
15177
  }
15179
15178
  function Ga(r, t) {
15180
- const e = $c(
15179
+ const e = ac(
15181
15180
  {
15182
15181
  type: "Polygon",
15183
15182
  coordinates: [
@@ -15212,7 +15211,7 @@ let ka = {
15212
15211
  type: "FeatureCollection",
15213
15212
  features: []
15214
15213
  };
15215
- function tf(r, t, e = !0, n = !0, i = {}, o = {}, s = {
15214
+ function $c(r, t, e = !0, n = !0, i = {}, o = {}, s = {
15216
15215
  fill: {
15217
15216
  paint: {
15218
15217
  "fill-color": "#000",
@@ -15306,7 +15305,7 @@ function tf(r, t, e = !0, n = !0, i = {}, o = {}, s = {
15306
15305
  if (b.length > 0) {
15307
15306
  let S = b.pop();
15308
15307
  for (const D of b)
15309
- S = ac(S, D);
15308
+ S = sc(S, D);
15310
15309
  Ga({ ..._, geometry: S }, I), C = !0;
15311
15310
  } else {
15312
15311
  const S = _.geometry.geometries.filter(
@@ -15341,7 +15340,7 @@ function tf(r, t, e = !0, n = !0, i = {}, o = {}, s = {
15341
15340
  };
15342
15341
  }
15343
15342
  var yn, Fr;
15344
- class rf extends nl {
15343
+ class ef extends EventTarget {
15345
15344
  constructor(e) {
15346
15345
  super();
15347
15346
  os(this, yn, void 0);
@@ -15358,7 +15357,7 @@ class rf extends nl {
15358
15357
  flyTo: a,
15359
15358
  fullGeometryStyle: u,
15360
15359
  ...l
15361
- } = Mn(this, Fr), c = typeof a == "boolean" ? {} : a, f = tf(
15360
+ } = Mn(this, Fr), c = typeof a == "boolean" ? {} : a, f = $c(
15362
15361
  e,
15363
15362
  i,
15364
15363
  o,
@@ -15367,7 +15366,7 @@ class rf extends nl {
15367
15366
  c,
15368
15367
  u
15369
15368
  );
15370
- vo(this, yn, new Al({
15369
+ vo(this, yn, new Ml({
15371
15370
  target: n,
15372
15371
  props: {
15373
15372
  mapController: f,
@@ -15385,10 +15384,7 @@ class rf extends nl {
15385
15384
  "reverseToggle",
15386
15385
  "queryChange"
15387
15386
  ])
15388
- Mn(this, yn).$on(
15389
- h,
15390
- (g) => this.fire(h.toLowerCase(), g.detail)
15391
- );
15387
+ Mn(this, yn).$on(h, (g) => this.dispatchEvent(g));
15392
15388
  return n;
15393
15389
  }
15394
15390
  setOptions(e) {
@@ -15427,6 +15423,6 @@ class rf extends nl {
15427
15423
  }
15428
15424
  yn = new WeakMap(), Fr = new WeakMap();
15429
15425
  export {
15430
- rf as GeocodingControl,
15431
- tf as createMaplibreglMapController
15426
+ ef as GeocodingControl,
15427
+ $c as createMaplibreglMapController
15432
15428
  };