@maptiler/geocoding-control 1.4.2-dev.2 → 2.0.0-rc.1

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 (72) hide show
  1. package/MapLibreBasedGeocodingControl.d.ts +2971 -35
  2. package/leaflet-controller.d.ts +1 -1
  3. package/leaflet-controller.js +580 -569
  4. package/leaflet-controller.js.map +1 -1
  5. package/leaflet-controller.umd.js +3 -3
  6. package/leaflet-controller.umd.js.map +1 -1
  7. package/leaflet.d.ts +74 -16
  8. package/leaflet.js +1344 -1311
  9. package/leaflet.js.map +1 -1
  10. package/leaflet.umd.js +3 -3
  11. package/leaflet.umd.js.map +1 -1
  12. package/maplibregl-controller.d.ts +7 -7
  13. package/maplibregl-controller.js +683 -661
  14. package/maplibregl-controller.js.map +1 -1
  15. package/maplibregl-controller.umd.js +3 -3
  16. package/maplibregl-controller.umd.js.map +1 -1
  17. package/maplibregl.js +1632 -1481
  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.js +1642 -1488
  22. package/maptilersdk.js.map +1 -1
  23. package/maptilersdk.umd.js +3 -3
  24. package/maptilersdk.umd.js.map +1 -1
  25. package/openlayers-controller.d.ts +1 -1
  26. package/openlayers-controller.js +308 -306
  27. package/openlayers-controller.js.map +1 -1
  28. package/openlayers-controller.umd.js +3 -3
  29. package/openlayers-controller.umd.js.map +1 -1
  30. package/openlayers.d.ts +21 -0
  31. package/openlayers.js +1301 -1313
  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 +18 -18
  36. package/react.d.ts +4 -4
  37. package/react.js +663 -644
  38. package/react.js.map +1 -1
  39. package/react.umd.js +1 -1
  40. package/react.umd.js.map +1 -1
  41. package/style.css +1 -1
  42. package/svelte/FeatureItem.svelte.d.ts +1 -1
  43. package/svelte/GeocodingControl.svelte +64 -33
  44. package/svelte/GeocodingControl.svelte.d.ts +25 -9
  45. package/svelte/MapLibreBasedGeocodingControl.d.ts +2971 -35
  46. package/svelte/MapLibreBasedGeocodingControl.js +166 -58
  47. package/svelte/leaflet-controller.d.ts +1 -1
  48. package/svelte/leaflet-controller.js +50 -24
  49. package/svelte/leaflet.d.ts +74 -16
  50. package/svelte/leaflet.js +25 -15
  51. package/svelte/maplibregl-controller.d.ts +7 -7
  52. package/svelte/maplibregl-controller.js +96 -66
  53. package/svelte/maplibregl.js +10 -7
  54. package/svelte/maptilersdk.js +23 -18
  55. package/svelte/openlayers-controller.d.ts +1 -1
  56. package/svelte/openlayers-controller.js +4 -1
  57. package/svelte/openlayers.d.ts +21 -0
  58. package/svelte/openlayers.js +30 -45
  59. package/svelte/react.d.ts +4 -4
  60. package/svelte/types.d.ts +38 -12
  61. package/svelte/vanilla.d.ts +14 -1
  62. package/svelte/vanilla.js +31 -8
  63. package/types.d.ts +38 -12
  64. package/vanilla.d.ts +14 -1
  65. package/vanilla.js +838 -791
  66. package/vanilla.js.map +1 -1
  67. package/vanilla.umd.js +1 -1
  68. package/vanilla.umd.js.map +1 -1
  69. package/maplibregl.d.ts +0 -16
  70. package/maptilersdk.d.ts +0 -11
  71. package/svelte/maplibregl.d.ts +0 -16
  72. package/svelte/maptilersdk.d.ts +0 -11
package/leaflet.js CHANGED
@@ -1,59 +1,59 @@
1
- var an = Object.defineProperty;
2
- var Zt = (i) => {
1
+ var yn = Object.defineProperty;
2
+ var Vt = (i) => {
3
3
  throw TypeError(i);
4
4
  };
5
- var cn = (i, e, t) => e in i ? an(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
6
- var _t = (i, e, t) => cn(i, typeof e != "symbol" ? e + "" : e, t), qt = (i, e, t) => e.has(i) || Zt("Cannot " + t);
7
- var se = (i, e, t) => (qt(i, e, "read from private field"), t ? t.call(i) : e.get(i)), Et = (i, e, t) => e.has(i) ? Zt("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(i) : e.set(i, t), it = (i, e, t, n) => (qt(i, e, "write to private field"), n ? n.call(i, t) : e.set(i, t), t);
8
- import * as de from "leaflet";
5
+ var pn = (i, e, t) => e in i ? yn(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
6
+ var xt = (i, e, t) => pn(i, typeof e != "symbol" ? e + "" : e, t), Yt = (i, e, t) => e.has(i) || Vt("Cannot " + t);
7
+ var le = (i, e, t) => (Yt(i, e, "read from private field"), t ? t.call(i) : e.get(i)), Mt = (i, e, t) => e.has(i) ? Vt("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(i) : e.set(i, t), st = (i, e, t, n) => (Yt(i, e, "write to private field"), n ? n.call(i, t) : e.set(i, t), t);
8
+ import * as ue from "leaflet";
9
9
  function A() {
10
10
  }
11
- function fn(i, e) {
11
+ function bn(i, e) {
12
12
  for (const t in e) i[t] = e[t];
13
13
  return (
14
14
  /** @type {T & S} */
15
15
  i
16
16
  );
17
17
  }
18
- function Mi(i) {
18
+ function Pi(i) {
19
19
  return i();
20
20
  }
21
- function Qt() {
21
+ function Xt() {
22
22
  return /* @__PURE__ */ Object.create(null);
23
23
  }
24
24
  function ye(i) {
25
- i.forEach(Mi);
25
+ i.forEach(Pi);
26
26
  }
27
- function Ci(i) {
27
+ function Ri(i) {
28
28
  return typeof i == "function";
29
29
  }
30
- function Se(i, e) {
30
+ function Me(i, e) {
31
31
  return i != i ? e == e : i !== e || i && typeof i == "object" || typeof i == "function";
32
32
  }
33
- let nt;
33
+ let lt;
34
34
  function X(i, e) {
35
- return i === e ? !0 : (nt || (nt = document.createElement("a")), nt.href = e, i === nt.href);
35
+ return i === e ? !0 : (lt || (lt = document.createElement("a")), lt.href = e, i === lt.href);
36
36
  }
37
- function dn(i) {
37
+ function vn(i) {
38
38
  return Object.keys(i).length === 0;
39
39
  }
40
- function hn(i, e, t, n) {
40
+ function wn(i, e, t, n) {
41
41
  if (i) {
42
- const r = ki(i, e, t, n);
42
+ const r = Ii(i, e, t, n);
43
43
  return i[0](r);
44
44
  }
45
45
  }
46
- function ki(i, e, t, n) {
47
- return i[1] && n ? fn(t.ctx.slice(), i[1](n(e))) : t.ctx;
46
+ function Ii(i, e, t, n) {
47
+ return i[1] && n ? bn(t.ctx.slice(), i[1](n(e))) : t.ctx;
48
48
  }
49
- function mn(i, e, t, n) {
49
+ function _n(i, e, t, n) {
50
50
  if (i[2] && n) {
51
51
  const r = i[2](n(t));
52
52
  if (e.dirty === void 0)
53
53
  return r;
54
54
  if (typeof r == "object") {
55
- const o = [], l = Math.max(e.dirty.length, r.length);
56
- for (let s = 0; s < l; s += 1)
55
+ const o = [], u = Math.max(e.dirty.length, r.length);
56
+ for (let s = 0; s < u; s += 1)
57
57
  o[s] = e.dirty[s] | r[s];
58
58
  return o;
59
59
  }
@@ -61,13 +61,13 @@ function mn(i, e, t, n) {
61
61
  }
62
62
  return e.dirty;
63
63
  }
64
- function gn(i, e, t, n, r, o) {
64
+ function En(i, e, t, n, r, o) {
65
65
  if (r) {
66
- const l = ki(e, t, n, o);
67
- i.p(l, r);
66
+ const u = Ii(e, t, n, o);
67
+ i.p(u, r);
68
68
  }
69
69
  }
70
- function yn(i) {
70
+ function Ln(i) {
71
71
  if (i.ctx.length > 32) {
72
72
  const e = [], t = i.ctx.length / 32;
73
73
  for (let n = 0; n < t; n++)
@@ -76,225 +76,225 @@ function yn(i) {
76
76
  }
77
77
  return -1;
78
78
  }
79
- function Ht(i) {
79
+ function Kt(i) {
80
80
  return i ?? "";
81
81
  }
82
- function T(i, e) {
82
+ function P(i, e) {
83
83
  i.appendChild(e);
84
84
  }
85
85
  function F(i, e, t) {
86
86
  i.insertBefore(e, t || null);
87
87
  }
88
- function B(i) {
88
+ function z(i) {
89
89
  i.parentNode && i.parentNode.removeChild(i);
90
90
  }
91
91
  function W(i) {
92
92
  return document.createElement(i);
93
93
  }
94
- function ue(i) {
94
+ function ce(i) {
95
95
  return document.createElementNS("http://www.w3.org/2000/svg", i);
96
96
  }
97
- function _e(i) {
97
+ function Le(i) {
98
98
  return document.createTextNode(i);
99
99
  }
100
100
  function te() {
101
- return _e(" ");
101
+ return Le(" ");
102
102
  }
103
- function pn() {
104
- return _e("");
103
+ function Sn() {
104
+ return Le("");
105
105
  }
106
106
  function J(i, e, t, n) {
107
107
  return i.addEventListener(e, t, n), () => i.removeEventListener(e, t, n);
108
108
  }
109
- function vn(i) {
109
+ function xn(i) {
110
110
  return function(e) {
111
111
  return e.preventDefault(), i.call(this, e);
112
112
  };
113
113
  }
114
- function y(i, e, t) {
114
+ function p(i, e, t) {
115
115
  t == null ? i.removeAttribute(e) : i.getAttribute(e) !== t && i.setAttribute(e, t);
116
116
  }
117
- function bn(i) {
117
+ function Mn(i) {
118
118
  return Array.from(i.childNodes);
119
119
  }
120
- function Ge(i, e) {
120
+ function Qe(i, e) {
121
121
  e = "" + e, i.data !== e && (i.data = /** @type {string} */
122
122
  e);
123
123
  }
124
- function Vt(i, e) {
124
+ function Jt(i, e) {
125
125
  i.value = e ?? "";
126
126
  }
127
- function re(i, e, t) {
127
+ function se(i, e, t) {
128
128
  i.classList.toggle(e, !!t);
129
129
  }
130
- function wn(i, e, { bubbles: t = !1, cancelable: n = !1 } = {}) {
130
+ function Cn(i, e, { bubbles: t = !1, cancelable: n = !1 } = {}) {
131
131
  return new CustomEvent(i, { detail: e, bubbles: t, cancelable: n });
132
132
  }
133
- let je;
134
- function ze(i) {
135
- je = i;
133
+ let He;
134
+ function qe(i) {
135
+ He = i;
136
136
  }
137
- function Ni() {
138
- if (!je) throw new Error("Function called outside component initialization");
139
- return je;
137
+ function Oi() {
138
+ if (!He) throw new Error("Function called outside component initialization");
139
+ return He;
140
140
  }
141
- function _n(i) {
142
- Ni().$$.on_destroy.push(i);
141
+ function kn(i) {
142
+ Oi().$$.on_destroy.push(i);
143
143
  }
144
- function En() {
145
- const i = Ni();
144
+ function Nn() {
145
+ const i = Oi();
146
146
  return (e, t, { cancelable: n = !1 } = {}) => {
147
147
  const r = i.$$.callbacks[e];
148
148
  if (r) {
149
- const o = wn(
149
+ const o = Cn(
150
150
  /** @type {string} */
151
151
  e,
152
152
  t,
153
153
  { cancelable: n }
154
154
  );
155
- return r.slice().forEach((l) => {
156
- l.call(i, o);
155
+ return r.slice().forEach((u) => {
156
+ u.call(i, o);
157
157
  }), !o.defaultPrevented;
158
158
  }
159
159
  return !0;
160
160
  };
161
161
  }
162
- function Yt(i, e) {
162
+ function $t(i, e) {
163
163
  const t = i.$$.callbacks[e.type];
164
164
  t && t.slice().forEach((n) => n.call(this, e));
165
165
  }
166
- const We = [], Mt = [];
167
- let Ae = [];
168
- const Xt = [], Ln = /* @__PURE__ */ Promise.resolve();
169
- let Ct = !1;
170
- function Sn() {
171
- Ct || (Ct = !0, Ln.then(Pi));
166
+ const Be = [], Tt = [];
167
+ let De = [];
168
+ const ei = [], Tn = /* @__PURE__ */ Promise.resolve();
169
+ let Pt = !1;
170
+ function Pn() {
171
+ Pt || (Pt = !0, Tn.then(Wi));
172
172
  }
173
- function kt(i) {
174
- Ae.push(i);
173
+ function Rt(i) {
174
+ De.push(i);
175
175
  }
176
- const Lt = /* @__PURE__ */ new Set();
177
- let Ie = 0;
178
- function Pi() {
179
- if (Ie !== 0)
176
+ const Ct = /* @__PURE__ */ new Set();
177
+ let Ae = 0;
178
+ function Wi() {
179
+ if (Ae !== 0)
180
180
  return;
181
- const i = je;
181
+ const i = He;
182
182
  do {
183
183
  try {
184
- for (; Ie < We.length; ) {
185
- const e = We[Ie];
186
- Ie++, ze(e), xn(e.$$);
184
+ for (; Ae < Be.length; ) {
185
+ const e = Be[Ae];
186
+ Ae++, qe(e), Rn(e.$$);
187
187
  }
188
188
  } catch (e) {
189
- throw We.length = 0, Ie = 0, e;
189
+ throw Be.length = 0, Ae = 0, e;
190
190
  }
191
- for (ze(null), We.length = 0, Ie = 0; Mt.length; ) Mt.pop()();
192
- for (let e = 0; e < Ae.length; e += 1) {
193
- const t = Ae[e];
194
- Lt.has(t) || (Lt.add(t), t());
191
+ for (qe(null), Be.length = 0, Ae = 0; Tt.length; ) Tt.pop()();
192
+ for (let e = 0; e < De.length; e += 1) {
193
+ const t = De[e];
194
+ Ct.has(t) || (Ct.add(t), t());
195
195
  }
196
- Ae.length = 0;
197
- } while (We.length);
198
- for (; Xt.length; )
199
- Xt.pop()();
200
- Ct = !1, Lt.clear(), ze(i);
196
+ De.length = 0;
197
+ } while (Be.length);
198
+ for (; ei.length; )
199
+ ei.pop()();
200
+ Pt = !1, Ct.clear(), qe(i);
201
201
  }
202
- function xn(i) {
202
+ function Rn(i) {
203
203
  if (i.fragment !== null) {
204
204
  i.update(), ye(i.before_update);
205
205
  const e = i.dirty;
206
- i.dirty = [-1], i.fragment && i.fragment.p(i.ctx, e), i.after_update.forEach(kt);
206
+ i.dirty = [-1], i.fragment && i.fragment.p(i.ctx, e), i.after_update.forEach(Rt);
207
207
  }
208
208
  }
209
- function Mn(i) {
209
+ function In(i) {
210
210
  const e = [], t = [];
211
- Ae.forEach((n) => i.indexOf(n) === -1 ? e.push(n) : t.push(n)), t.forEach((n) => n()), Ae = e;
211
+ De.forEach((n) => i.indexOf(n) === -1 ? e.push(n) : t.push(n)), t.forEach((n) => n()), De = e;
212
212
  }
213
- const rt = /* @__PURE__ */ new Set();
214
- let ke;
215
- function ot() {
216
- ke = {
213
+ const ut = /* @__PURE__ */ new Set();
214
+ let Pe;
215
+ function at() {
216
+ Pe = {
217
217
  r: 0,
218
218
  c: [],
219
- p: ke
219
+ p: Pe
220
220
  // parent group
221
221
  };
222
222
  }
223
- function st() {
224
- ke.r || ye(ke.c), ke = ke.p;
223
+ function ct() {
224
+ Pe.r || ye(Pe.c), Pe = Pe.p;
225
225
  }
226
226
  function Z(i, e) {
227
- i && i.i && (rt.delete(i), i.i(e));
227
+ i && i.i && (ut.delete(i), i.i(e));
228
228
  }
229
229
  function V(i, e, t, n) {
230
230
  if (i && i.o) {
231
- if (rt.has(i)) return;
232
- rt.add(i), ke.c.push(() => {
233
- rt.delete(i), n && (t && i.d(1), n());
231
+ if (ut.has(i)) return;
232
+ ut.add(i), Pe.c.push(() => {
233
+ ut.delete(i), n && (t && i.d(1), n());
234
234
  }), i.o(e);
235
235
  } else n && n();
236
236
  }
237
- function Kt(i) {
237
+ function ti(i) {
238
238
  return (i == null ? void 0 : i.length) !== void 0 ? i : Array.from(i);
239
239
  }
240
- function Cn(i, e) {
240
+ function On(i, e) {
241
241
  V(i, 1, 1, () => {
242
242
  e.delete(i.key);
243
243
  });
244
244
  }
245
- function kn(i, e, t, n, r, o, l, s, c, u, h, a) {
246
- let f = i.length, d = o.length, g = f;
247
- const p = {};
248
- for (; g--; ) p[i[g].key] = g;
249
- const v = [], b = /* @__PURE__ */ new Map(), S = /* @__PURE__ */ new Map(), E = [];
250
- for (g = d; g--; ) {
251
- const L = a(r, o, g), w = t(L);
252
- let k = l.get(w);
253
- k ? E.push(() => k.p(L, e)) : (k = u(w, L), k.c()), b.set(w, v[g] = k), w in p && S.set(w, Math.abs(g - p[w]));
245
+ function Wn(i, e, t, n, r, o, u, s, c, l, d, a) {
246
+ let f = i.length, h = o.length, g = f;
247
+ const y = {};
248
+ for (; g--; ) y[i[g].key] = g;
249
+ const v = [], b = /* @__PURE__ */ new Map(), E = /* @__PURE__ */ new Map(), L = [];
250
+ for (g = h; g--; ) {
251
+ const S = a(r, o, g), w = t(S);
252
+ let k = u.get(w);
253
+ k ? L.push(() => k.p(S, e)) : (k = l(w, S), k.c()), b.set(w, v[g] = k), w in y && E.set(w, Math.abs(g - y[w]));
254
254
  }
255
255
  const _ = /* @__PURE__ */ new Set(), C = /* @__PURE__ */ new Set();
256
- function x(L) {
257
- Z(L, 1), L.m(s, h), l.set(L.key, L), h = L.first, d--;
256
+ function x(S) {
257
+ Z(S, 1), S.m(s, d), u.set(S.key, S), d = S.first, h--;
258
258
  }
259
- for (; f && d; ) {
260
- const L = v[d - 1], w = i[f - 1], k = L.key, I = w.key;
261
- L === w ? (h = L.first, f--, d--) : b.has(I) ? !l.has(k) || _.has(k) ? x(L) : C.has(I) ? f-- : S.get(k) > S.get(I) ? (C.add(k), x(L)) : (_.add(I), f--) : (c(w, l), f--);
259
+ for (; f && h; ) {
260
+ const S = v[h - 1], w = i[f - 1], k = S.key, I = w.key;
261
+ S === w ? (d = S.first, f--, h--) : b.has(I) ? !u.has(k) || _.has(k) ? x(S) : C.has(I) ? f-- : E.get(k) > E.get(I) ? (C.add(k), x(S)) : (_.add(I), f--) : (c(w, u), f--);
262
262
  }
263
263
  for (; f--; ) {
264
- const L = i[f];
265
- b.has(L.key) || c(L, l);
264
+ const S = i[f];
265
+ b.has(S.key) || c(S, u);
266
266
  }
267
- for (; d; ) x(v[d - 1]);
268
- return ye(E), v;
267
+ for (; h; ) x(v[h - 1]);
268
+ return ye(L), v;
269
269
  }
270
- function Ee(i) {
270
+ function Se(i) {
271
271
  i && i.c();
272
272
  }
273
273
  function me(i, e, t) {
274
274
  const { fragment: n, after_update: r } = i.$$;
275
- n && n.m(e, t), kt(() => {
276
- const o = i.$$.on_mount.map(Mi).filter(Ci);
275
+ n && n.m(e, t), Rt(() => {
276
+ const o = i.$$.on_mount.map(Pi).filter(Ri);
277
277
  i.$$.on_destroy ? i.$$.on_destroy.push(...o) : ye(o), i.$$.on_mount = [];
278
- }), r.forEach(kt);
278
+ }), r.forEach(Rt);
279
279
  }
280
280
  function ge(i, e) {
281
281
  const t = i.$$;
282
- t.fragment !== null && (Mn(t.after_update), ye(t.on_destroy), t.fragment && t.fragment.d(e), t.on_destroy = t.fragment = null, t.ctx = []);
282
+ t.fragment !== null && (In(t.after_update), ye(t.on_destroy), t.fragment && t.fragment.d(e), t.on_destroy = t.fragment = null, t.ctx = []);
283
283
  }
284
- function Nn(i, e) {
285
- i.$$.dirty[0] === -1 && (We.push(i), Sn(), i.$$.dirty.fill(0)), i.$$.dirty[e / 31 | 0] |= 1 << e % 31;
284
+ function An(i, e) {
285
+ i.$$.dirty[0] === -1 && (Be.push(i), Pn(), i.$$.dirty.fill(0)), i.$$.dirty[e / 31 | 0] |= 1 << e % 31;
286
286
  }
287
- function xe(i, e, t, n, r, o, l = null, s = [-1]) {
288
- const c = je;
289
- ze(i);
290
- const u = i.$$ = {
287
+ function Ce(i, e, t, n, r, o, u = null, s = [-1]) {
288
+ const c = He;
289
+ qe(i);
290
+ const l = i.$$ = {
291
291
  fragment: null,
292
292
  ctx: [],
293
293
  // state
294
294
  props: o,
295
295
  update: A,
296
296
  not_equal: r,
297
- bound: Qt(),
297
+ bound: Xt(),
298
298
  // lifecycle
299
299
  on_mount: [],
300
300
  on_destroy: [],
@@ -303,27 +303,27 @@ function xe(i, e, t, n, r, o, l = null, s = [-1]) {
303
303
  after_update: [],
304
304
  context: new Map(e.context || (c ? c.$$.context : [])),
305
305
  // everything else
306
- callbacks: Qt(),
306
+ callbacks: Xt(),
307
307
  dirty: s,
308
308
  skip_bound: !1,
309
309
  root: e.target || c.$$.root
310
310
  };
311
- l && l(u.root);
312
- let h = !1;
313
- if (u.ctx = t ? t(i, e.props || {}, (a, f, ...d) => {
314
- const g = d.length ? d[0] : f;
315
- return u.ctx && r(u.ctx[a], u.ctx[a] = g) && (!u.skip_bound && u.bound[a] && u.bound[a](g), h && Nn(i, a)), f;
316
- }) : [], u.update(), h = !0, ye(u.before_update), u.fragment = n ? n(u.ctx) : !1, e.target) {
311
+ u && u(l.root);
312
+ let d = !1;
313
+ if (l.ctx = t ? t(i, e.props || {}, (a, f, ...h) => {
314
+ const g = h.length ? h[0] : f;
315
+ return l.ctx && r(l.ctx[a], l.ctx[a] = g) && (!l.skip_bound && l.bound[a] && l.bound[a](g), d && An(i, a)), f;
316
+ }) : [], l.update(), d = !0, ye(l.before_update), l.fragment = n ? n(l.ctx) : !1, e.target) {
317
317
  if (e.hydrate) {
318
- const a = bn(e.target);
319
- u.fragment && u.fragment.l(a), a.forEach(B);
318
+ const a = Mn(e.target);
319
+ l.fragment && l.fragment.l(a), a.forEach(z);
320
320
  } else
321
- u.fragment && u.fragment.c();
322
- e.intro && Z(i.$$.fragment), me(i, e.target, e.anchor), Pi();
321
+ l.fragment && l.fragment.c();
322
+ e.intro && Z(i.$$.fragment), me(i, e.target, e.anchor), Wi();
323
323
  }
324
- ze(c);
324
+ qe(c);
325
325
  }
326
- class Me {
326
+ class ke {
327
327
  constructor() {
328
328
  /**
329
329
  * ### PRIVATE API
@@ -332,7 +332,7 @@ class Me {
332
332
  *
333
333
  * @type {any}
334
334
  */
335
- _t(this, "$$");
335
+ xt(this, "$$");
336
336
  /**
337
337
  * ### PRIVATE API
338
338
  *
@@ -340,7 +340,7 @@ class Me {
340
340
  *
341
341
  * @type {any}
342
342
  */
343
- _t(this, "$$set");
343
+ xt(this, "$$set");
344
344
  }
345
345
  /** @returns {void} */
346
346
  $destroy() {
@@ -353,7 +353,7 @@ class Me {
353
353
  * @returns {() => void}
354
354
  */
355
355
  $on(e, t) {
356
- if (!Ci(t))
356
+ if (!Ri(t))
357
357
  return A;
358
358
  const n = this.$$.callbacks[e] || (this.$$.callbacks[e] = []);
359
359
  return n.push(t), () => {
@@ -366,66 +366,66 @@ class Me {
366
366
  * @returns {void}
367
367
  */
368
368
  $set(e) {
369
- this.$$set && !dn(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
369
+ this.$$set && !vn(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
370
370
  }
371
371
  }
372
- const Pn = "4";
373
- typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(Pn);
374
- function Tn(i) {
372
+ const zn = "4";
373
+ typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(zn);
374
+ function Bn(i) {
375
375
  let e, t;
376
376
  return {
377
377
  c() {
378
- e = ue("svg"), t = ue("path"), y(t, "d", "M13.12.706a.982.982 0 0 0-1.391 0L6.907 5.517 2.087.696a.982.982 0 1 0-1.391 1.39l4.821 4.821L.696 11.73a.982.982 0 1 0 1.39 1.39l4.821-4.821 4.822 4.821a.982.982 0 1 0 1.39-1.39L8.298 6.908l4.821-4.822a.988.988 0 0 0 0-1.38Z"), y(e, "viewBox", "0 0 14 14"), y(e, "width", "13"), y(e, "height", "13"), y(e, "class", "svelte-en2qvf");
378
+ e = ce("svg"), t = ce("path"), p(t, "d", "M13.12.706a.982.982 0 0 0-1.391 0L6.907 5.517 2.087.696a.982.982 0 1 0-1.391 1.39l4.821 4.821L.696 11.73a.982.982 0 1 0 1.39 1.39l4.821-4.821 4.822 4.821a.982.982 0 1 0 1.39-1.39L8.298 6.908l4.821-4.822a.988.988 0 0 0 0-1.38Z"), p(e, "viewBox", "0 0 14 14"), p(e, "width", "13"), p(e, "height", "13"), p(e, "class", "svelte-en2qvf");
379
379
  },
380
380
  m(n, r) {
381
- F(n, e, r), T(e, t);
381
+ F(n, e, r), P(e, t);
382
382
  },
383
383
  p: A,
384
384
  i: A,
385
385
  o: A,
386
386
  d(n) {
387
- n && B(e);
387
+ n && z(e);
388
388
  }
389
389
  };
390
390
  }
391
- class Ti extends Me {
391
+ class Ai extends ke {
392
392
  constructor(e) {
393
- super(), xe(this, e, null, Tn, Se, {});
393
+ super(), Ce(this, e, null, Bn, Me, {});
394
394
  }
395
395
  }
396
- function Rn(i) {
396
+ function Dn(i) {
397
397
  let e, t;
398
398
  return {
399
399
  c() {
400
- e = ue("svg"), t = ue("path"), y(t, "d", "M15 0C6.705 0 0 6.705 0 15C0 23.295 6.705 30 15 30C23.295 30 30 23.295 30 15C30 6.705 23.295 0 15 0ZM22.5 20.385L20.385 22.5L15 17.115L9.615 22.5L7.5 20.385L12.885 15L7.5 9.615L9.615 7.5L15 12.885L20.385 7.5L22.5 9.615L17.115 15L22.5 20.385Z"), y(e, "viewBox", "0 0 30 30"), y(e, "fill", "none"), y(e, "xmlns", "http://www.w3.org/2000/svg"), y(e, "class", "svelte-d2loi5");
400
+ e = ce("svg"), t = ce("path"), p(t, "d", "M15 0C6.705 0 0 6.705 0 15C0 23.295 6.705 30 15 30C23.295 30 30 23.295 30 15C30 6.705 23.295 0 15 0ZM22.5 20.385L20.385 22.5L15 17.115L9.615 22.5L7.5 20.385L12.885 15L7.5 9.615L9.615 7.5L15 12.885L20.385 7.5L22.5 9.615L17.115 15L22.5 20.385Z"), p(e, "viewBox", "0 0 30 30"), p(e, "fill", "none"), p(e, "xmlns", "http://www.w3.org/2000/svg"), p(e, "class", "svelte-d2loi5");
401
401
  },
402
402
  m(n, r) {
403
- F(n, e, r), T(e, t);
403
+ F(n, e, r), P(e, t);
404
404
  },
405
405
  p: A,
406
406
  i: A,
407
407
  o: A,
408
408
  d(n) {
409
- n && B(e);
409
+ n && z(e);
410
410
  }
411
411
  };
412
412
  }
413
- class Ri extends Me {
413
+ class zi extends ke {
414
414
  constructor(e) {
415
- super(), xe(this, e, null, Rn, Se, {});
415
+ super(), Ce(this, e, null, Dn, Me, {});
416
416
  }
417
417
  }
418
- function In(i) {
418
+ function Fn(i) {
419
419
  let e, t;
420
420
  return {
421
421
  c() {
422
422
  e = W("img"), X(e.src, t = /*iconsBaseUrl*/
423
- i[3] + "area.svg") || y(e, "src", t), y(
423
+ i[3] + "area.svg") || p(e, "src", t), p(
424
424
  e,
425
425
  "alt",
426
426
  /*placeType*/
427
427
  i[6]
428
- ), y(e, "class", "svelte-ltkwvy");
428
+ ), p(e, "class", "svelte-ltkwvy");
429
429
  },
430
430
  m(n, r) {
431
431
  F(n, e, r);
@@ -433,8 +433,8 @@ function In(i) {
433
433
  p(n, r) {
434
434
  r & /*iconsBaseUrl*/
435
435
  8 && !X(e.src, t = /*iconsBaseUrl*/
436
- n[3] + "area.svg") && y(e, "src", t), r & /*placeType*/
437
- 64 && y(
436
+ n[3] + "area.svg") && p(e, "src", t), r & /*placeType*/
437
+ 64 && p(
438
438
  e,
439
439
  "alt",
440
440
  /*placeType*/
@@ -442,21 +442,21 @@ function In(i) {
442
442
  );
443
443
  },
444
444
  d(n) {
445
- n && B(e);
445
+ n && z(e);
446
446
  }
447
447
  };
448
448
  }
449
- function On(i) {
449
+ function Un(i) {
450
450
  let e, t;
451
451
  return {
452
452
  c() {
453
453
  e = W("img"), X(e.src, t = /*iconsBaseUrl*/
454
- i[3] + "reverse.svg") || y(e, "src", t), y(
454
+ i[3] + "reverse.svg") || p(e, "src", t), p(
455
455
  e,
456
456
  "alt",
457
457
  /*placeType*/
458
458
  i[6]
459
- ), y(e, "class", "svelte-ltkwvy");
459
+ ), p(e, "class", "svelte-ltkwvy");
460
460
  },
461
461
  m(n, r) {
462
462
  F(n, e, r);
@@ -464,8 +464,8 @@ function On(i) {
464
464
  p(n, r) {
465
465
  r & /*iconsBaseUrl*/
466
466
  8 && !X(e.src, t = /*iconsBaseUrl*/
467
- n[3] + "reverse.svg") && y(e, "src", t), r & /*placeType*/
468
- 64 && y(
467
+ n[3] + "reverse.svg") && p(e, "src", t), r & /*placeType*/
468
+ 64 && p(
469
469
  e,
470
470
  "alt",
471
471
  /*placeType*/
@@ -473,21 +473,21 @@ function On(i) {
473
473
  );
474
474
  },
475
475
  d(n) {
476
- n && B(e);
476
+ n && z(e);
477
477
  }
478
478
  };
479
479
  }
480
- function Wn(i) {
480
+ function Gn(i) {
481
481
  let e, t;
482
482
  return {
483
483
  c() {
484
484
  e = W("img"), X(e.src, t = /*iconsBaseUrl*/
485
- i[3] + "poi.svg") || y(e, "src", t), y(
485
+ i[3] + "poi.svg") || p(e, "src", t), p(
486
486
  e,
487
487
  "alt",
488
488
  /*placeType*/
489
489
  i[6]
490
- ), y(e, "class", "svelte-ltkwvy");
490
+ ), p(e, "class", "svelte-ltkwvy");
491
491
  },
492
492
  m(n, r) {
493
493
  F(n, e, r);
@@ -495,8 +495,8 @@ function Wn(i) {
495
495
  p(n, r) {
496
496
  r & /*iconsBaseUrl*/
497
497
  8 && !X(e.src, t = /*iconsBaseUrl*/
498
- n[3] + "poi.svg") && y(e, "src", t), r & /*placeType*/
499
- 64 && y(
498
+ n[3] + "poi.svg") && p(e, "src", t), r & /*placeType*/
499
+ 64 && p(
500
500
  e,
501
501
  "alt",
502
502
  /*placeType*/
@@ -504,21 +504,21 @@ function Wn(i) {
504
504
  );
505
505
  },
506
506
  d(n) {
507
- n && B(e);
507
+ n && z(e);
508
508
  }
509
509
  };
510
510
  }
511
- function An(i) {
511
+ function jn(i) {
512
512
  let e, t;
513
513
  return {
514
514
  c() {
515
515
  e = W("img"), X(e.src, t = /*iconsBaseUrl*/
516
- i[3] + "postal_code.svg") || y(e, "src", t), y(
516
+ i[3] + "postal_code.svg") || p(e, "src", t), p(
517
517
  e,
518
518
  "alt",
519
519
  /*placeType*/
520
520
  i[6]
521
- ), y(e, "class", "svelte-ltkwvy");
521
+ ), p(e, "class", "svelte-ltkwvy");
522
522
  },
523
523
  m(n, r) {
524
524
  F(n, e, r);
@@ -526,8 +526,8 @@ function An(i) {
526
526
  p(n, r) {
527
527
  r & /*iconsBaseUrl*/
528
528
  8 && !X(e.src, t = /*iconsBaseUrl*/
529
- n[3] + "postal_code.svg") && y(e, "src", t), r & /*placeType*/
530
- 64 && y(
529
+ n[3] + "postal_code.svg") && p(e, "src", t), r & /*placeType*/
530
+ 64 && p(
531
531
  e,
532
532
  "alt",
533
533
  /*placeType*/
@@ -535,21 +535,21 @@ function An(i) {
535
535
  );
536
536
  },
537
537
  d(n) {
538
- n && B(e);
538
+ n && z(e);
539
539
  }
540
540
  };
541
541
  }
542
- function Bn(i) {
542
+ function Zn(i) {
543
543
  let e, t;
544
544
  return {
545
545
  c() {
546
546
  e = W("img"), X(e.src, t = /*iconsBaseUrl*/
547
- i[3] + "street.svg") || y(e, "src", t), y(
547
+ i[3] + "street.svg") || p(e, "src", t), p(
548
548
  e,
549
549
  "alt",
550
550
  /*placeType*/
551
551
  i[6]
552
- ), y(e, "class", "svelte-ltkwvy");
552
+ ), p(e, "class", "svelte-ltkwvy");
553
553
  },
554
554
  m(n, r) {
555
555
  F(n, e, r);
@@ -557,8 +557,8 @@ function Bn(i) {
557
557
  p(n, r) {
558
558
  r & /*iconsBaseUrl*/
559
559
  8 && !X(e.src, t = /*iconsBaseUrl*/
560
- n[3] + "street.svg") && y(e, "src", t), r & /*placeType*/
561
- 64 && y(
560
+ n[3] + "street.svg") && p(e, "src", t), r & /*placeType*/
561
+ 64 && p(
562
562
  e,
563
563
  "alt",
564
564
  /*placeType*/
@@ -566,21 +566,21 @@ function Bn(i) {
566
566
  );
567
567
  },
568
568
  d(n) {
569
- n && B(e);
569
+ n && z(e);
570
570
  }
571
571
  };
572
572
  }
573
- function Dn(i) {
573
+ function qn(i) {
574
574
  let e, t;
575
575
  return {
576
576
  c() {
577
577
  e = W("img"), X(e.src, t = /*iconsBaseUrl*/
578
- i[3] + "road.svg") || y(e, "src", t), y(
578
+ i[3] + "road.svg") || p(e, "src", t), p(
579
579
  e,
580
580
  "alt",
581
581
  /*placeType*/
582
582
  i[6]
583
- ), y(e, "class", "svelte-ltkwvy");
583
+ ), p(e, "class", "svelte-ltkwvy");
584
584
  },
585
585
  m(n, r) {
586
586
  F(n, e, r);
@@ -588,8 +588,8 @@ function Dn(i) {
588
588
  p(n, r) {
589
589
  r & /*iconsBaseUrl*/
590
590
  8 && !X(e.src, t = /*iconsBaseUrl*/
591
- n[3] + "road.svg") && y(e, "src", t), r & /*placeType*/
592
- 64 && y(
591
+ n[3] + "road.svg") && p(e, "src", t), r & /*placeType*/
592
+ 64 && p(
593
593
  e,
594
594
  "alt",
595
595
  /*placeType*/
@@ -597,21 +597,21 @@ function Dn(i) {
597
597
  );
598
598
  },
599
599
  d(n) {
600
- n && B(e);
600
+ n && z(e);
601
601
  }
602
602
  };
603
603
  }
604
- function Un(i) {
604
+ function Qn(i) {
605
605
  let e, t;
606
606
  return {
607
607
  c() {
608
608
  e = W("img"), X(e.src, t = /*iconsBaseUrl*/
609
- i[3] + "housenumber.svg") || y(e, "src", t), y(
609
+ i[3] + "housenumber.svg") || p(e, "src", t), p(
610
610
  e,
611
611
  "alt",
612
612
  /*placeType*/
613
613
  i[6]
614
- ), y(e, "class", "svelte-ltkwvy");
614
+ ), p(e, "class", "svelte-ltkwvy");
615
615
  },
616
616
  m(n, r) {
617
617
  F(n, e, r);
@@ -619,8 +619,8 @@ function Un(i) {
619
619
  p(n, r) {
620
620
  r & /*iconsBaseUrl*/
621
621
  8 && !X(e.src, t = /*iconsBaseUrl*/
622
- n[3] + "housenumber.svg") && y(e, "src", t), r & /*placeType*/
623
- 64 && y(
622
+ n[3] + "housenumber.svg") && p(e, "src", t), r & /*placeType*/
623
+ 64 && p(
624
624
  e,
625
625
  "alt",
626
626
  /*placeType*/
@@ -628,35 +628,35 @@ function Un(i) {
628
628
  );
629
629
  },
630
630
  d(n) {
631
- n && B(e);
631
+ n && z(e);
632
632
  }
633
633
  };
634
634
  }
635
- function Fn(i) {
635
+ function Hn(i) {
636
636
  let e, t, n, r;
637
637
  return {
638
638
  c() {
639
639
  e = W("img"), X(e.src, t = /*imageUrl*/
640
- i[5]) || y(e, "src", t), y(
640
+ i[5]) || p(e, "src", t), p(
641
641
  e,
642
642
  "alt",
643
643
  /*category*/
644
644
  i[4]
645
- ), y(e, "class", "svelte-ltkwvy");
645
+ ), p(e, "class", "svelte-ltkwvy");
646
646
  },
647
- m(o, l) {
648
- F(o, e, l), n || (r = J(
647
+ m(o, u) {
648
+ F(o, e, u), n || (r = J(
649
649
  e,
650
650
  "error",
651
651
  /*error_handler*/
652
652
  i[14]
653
653
  ), n = !0);
654
654
  },
655
- p(o, l) {
656
- l & /*imageUrl*/
655
+ p(o, u) {
656
+ u & /*imageUrl*/
657
657
  32 && !X(e.src, t = /*imageUrl*/
658
- o[5]) && y(e, "src", t), l & /*category*/
659
- 16 && y(
658
+ o[5]) && p(e, "src", t), u & /*category*/
659
+ 16 && p(
660
660
  e,
661
661
  "alt",
662
662
  /*category*/
@@ -664,37 +664,37 @@ function Fn(i) {
664
664
  );
665
665
  },
666
666
  d(o) {
667
- o && B(e), n = !1, r();
667
+ o && z(e), n = !1, r();
668
668
  }
669
669
  };
670
670
  }
671
- function Jt(i) {
671
+ function ii(i) {
672
672
  let e, t;
673
673
  return {
674
674
  c() {
675
- e = W("span"), t = _e(
675
+ e = W("span"), t = Le(
676
676
  /*placeType*/
677
677
  i[6]
678
- ), y(e, "class", "secondary svelte-ltkwvy");
678
+ ), p(e, "class", "secondary svelte-ltkwvy");
679
679
  },
680
680
  m(n, r) {
681
- F(n, e, r), T(e, t);
681
+ F(n, e, r), P(e, t);
682
682
  },
683
683
  p(n, r) {
684
684
  r & /*placeType*/
685
- 64 && Ge(
685
+ 64 && Qe(
686
686
  t,
687
687
  /*placeType*/
688
688
  n[6]
689
689
  );
690
690
  },
691
691
  d(n) {
692
- n && B(e);
692
+ n && z(e);
693
693
  }
694
694
  };
695
695
  }
696
- function zn(i) {
697
- let e, t, n, r, o, l, s, c, u, h = (
696
+ function Vn(i) {
697
+ let e, t, n, r, o, u, s, c, l, d = (
698
698
  /*isReverse*/
699
699
  (i[7] ? (
700
700
  /*feature*/
@@ -703,7 +703,7 @@ function zn(i) {
703
703
  /*feature*/
704
704
  i[0].place_name.replace(/,.*/, "")
705
705
  )) + ""
706
- ), a, f, d = (
706
+ ), a, f, h = (
707
707
  /*showPlaceType*/
708
708
  i[2] === "always" || /*showPlaceType*/
709
709
  i[2] && !/*feature*/
@@ -714,40 +714,40 @@ function zn(i) {
714
714
  i[0].id.startsWith("poi.") || !/*imageUrl*/
715
715
  i[5]) && !/*isReverse*/
716
716
  i[7]
717
- ), g, p, v = (
717
+ ), g, y, v = (
718
718
  /*isReverse*/
719
719
  (i[7] ? "" : (
720
720
  /*feature*/
721
721
  i[0].place_name.replace(/[^,]*,?\s*/, "")
722
722
  )) + ""
723
- ), b, S, E;
723
+ ), b, E, L;
724
724
  function _(w, k) {
725
725
  return k & /*feature*/
726
726
  1 && (t = null), k & /*feature*/
727
727
  1 && (n = null), k & /*feature*/
728
728
  1 && (r = null), k & /*feature*/
729
729
  1 && (o = null), /*imageUrl*/
730
- w[5] ? Fn : (
730
+ w[5] ? Hn : (
731
731
  /*feature*/
732
- w[0].address ? Un : (t == null && (t = !!/*feature*/
733
- w[0].id.startsWith("road.")), t ? Dn : (n == null && (n = !!/*feature*/
734
- w[0].id.startsWith("address.")), n ? Bn : (r == null && (r = !!/*feature*/
735
- w[0].id.startsWith("postal_code.")), r ? An : (o == null && (o = !!/*feature*/
736
- w[0].id.startsWith("poi.")), o ? Wn : (
732
+ w[0].address ? Qn : (t == null && (t = !!/*feature*/
733
+ w[0].id.startsWith("road.")), t ? qn : (n == null && (n = !!/*feature*/
734
+ w[0].id.startsWith("address.")), n ? Zn : (r == null && (r = !!/*feature*/
735
+ w[0].id.startsWith("postal_code.")), r ? jn : (o == null && (o = !!/*feature*/
736
+ w[0].id.startsWith("poi.")), o ? Gn : (
737
737
  /*isReverse*/
738
- w[7] ? On : In
738
+ w[7] ? Un : Fn
739
739
  )))))
740
740
  );
741
741
  }
742
- let C = _(i, -1), x = C(i), L = d && Jt(i);
742
+ let C = _(i, -1), x = C(i), S = h && ii(i);
743
743
  return {
744
744
  c() {
745
- e = W("li"), x.c(), l = te(), s = W("span"), c = W("span"), u = W("span"), a = _e(h), f = te(), L && L.c(), g = te(), p = W("span"), b = _e(v), y(u, "class", "primary svelte-ltkwvy"), y(c, "class", "svelte-ltkwvy"), y(p, "class", "line2 svelte-ltkwvy"), y(s, "class", "texts svelte-ltkwvy"), y(e, "tabindex", "0"), y(
745
+ e = W("li"), x.c(), u = te(), s = W("span"), c = W("span"), l = W("span"), a = Le(d), f = te(), S && S.c(), g = te(), y = W("span"), b = Le(v), p(l, "class", "primary svelte-ltkwvy"), p(c, "class", "svelte-ltkwvy"), p(y, "class", "line2 svelte-ltkwvy"), p(s, "class", "texts svelte-ltkwvy"), p(e, "tabindex", "0"), p(
746
746
  e,
747
747
  "data-selected",
748
748
  /*selected*/
749
749
  i[1]
750
- ), y(e, "class", "svelte-ltkwvy"), re(
750
+ ), p(e, "class", "svelte-ltkwvy"), se(
751
751
  e,
752
752
  "selected",
753
753
  /*selected*/
@@ -755,7 +755,7 @@ function zn(i) {
755
755
  );
756
756
  },
757
757
  m(w, k) {
758
- F(w, e, k), x.m(e, null), T(e, l), T(e, s), T(s, c), T(c, u), T(u, a), T(c, f), L && L.m(c, null), T(s, g), T(s, p), T(p, b), S || (E = [
758
+ F(w, e, k), x.m(e, null), P(e, u), P(e, s), P(s, c), P(c, l), P(l, a), P(c, f), S && S.m(c, null), P(s, g), P(s, y), P(y, b), E || (L = [
759
759
  J(
760
760
  e,
761
761
  "mouseenter",
@@ -768,19 +768,19 @@ function zn(i) {
768
768
  /*focus_handler*/
769
769
  i[13]
770
770
  )
771
- ], S = !0);
771
+ ], E = !0);
772
772
  },
773
773
  p(w, [k]) {
774
- C === (C = _(w, k)) && x ? x.p(w, k) : (x.d(1), x = C(w), x && (x.c(), x.m(e, l))), k & /*feature*/
775
- 1 && h !== (h = /*isReverse*/
774
+ C === (C = _(w, k)) && x ? x.p(w, k) : (x.d(1), x = C(w), x && (x.c(), x.m(e, u))), k & /*feature*/
775
+ 1 && d !== (d = /*isReverse*/
776
776
  (w[7] ? (
777
777
  /*feature*/
778
778
  w[0].place_name
779
779
  ) : (
780
780
  /*feature*/
781
781
  w[0].place_name.replace(/,.*/, "")
782
- )) + "") && Ge(a, h), k & /*showPlaceType, feature, imageUrl*/
783
- 37 && (d = /*showPlaceType*/
782
+ )) + "") && Qe(a, d), k & /*showPlaceType, feature, imageUrl*/
783
+ 37 && (h = /*showPlaceType*/
784
784
  w[2] === "always" || /*showPlaceType*/
785
785
  w[2] && !/*feature*/
786
786
  w[0].address && !/*feature*/
@@ -789,19 +789,19 @@ function zn(i) {
789
789
  w[0].id.startsWith("postal_code.") && (!/*feature*/
790
790
  w[0].id.startsWith("poi.") || !/*imageUrl*/
791
791
  w[5]) && !/*isReverse*/
792
- w[7]), d ? L ? L.p(w, k) : (L = Jt(w), L.c(), L.m(c, null)) : L && (L.d(1), L = null), k & /*feature*/
792
+ w[7]), h ? S ? S.p(w, k) : (S = ii(w), S.c(), S.m(c, null)) : S && (S.d(1), S = null), k & /*feature*/
793
793
  1 && v !== (v = /*isReverse*/
794
794
  (w[7] ? "" : (
795
795
  /*feature*/
796
796
  w[0].place_name.replace(/[^,]*,?\s*/, "")
797
- )) + "") && Ge(b, v), k & /*selected*/
798
- 2 && y(
797
+ )) + "") && Qe(b, v), k & /*selected*/
798
+ 2 && p(
799
799
  e,
800
800
  "data-selected",
801
801
  /*selected*/
802
802
  w[1]
803
803
  ), k & /*selected*/
804
- 2 && re(
804
+ 2 && se(
805
805
  e,
806
806
  "selected",
807
807
  /*selected*/
@@ -811,57 +811,57 @@ function zn(i) {
811
811
  i: A,
812
812
  o: A,
813
813
  d(w) {
814
- w && B(e), x.d(), L && L.d(), S = !1, ye(E);
814
+ w && z(e), x.d(), S && S.d(), E = !1, ye(L);
815
815
  }
816
816
  };
817
817
  }
818
- function Gn(i, e, t) {
819
- var E;
820
- let n, r, { feature: o } = e, { selected: l = !1 } = e, { showPlaceType: s } = e, { missingIconsCache: c } = e, { iconsBaseUrl: u } = e;
821
- const h = (E = o.properties) == null ? void 0 : E.categories;
822
- let a, f, d = 0, g = o.place_type[0] === "reverse";
823
- function p() {
824
- f && c.add(f), t(10, d++, d);
818
+ function Yn(i, e, t) {
819
+ var L;
820
+ let n, r, { feature: o } = e, { selected: u = !1 } = e, { showPlaceType: s } = e, { missingIconsCache: c } = e, { iconsBaseUrl: l } = e;
821
+ const d = (L = o.properties) == null ? void 0 : L.categories;
822
+ let a, f, h = 0, g = o.place_type[0] === "reverse";
823
+ function y() {
824
+ f && c.add(f), t(10, h++, h);
825
825
  }
826
826
  function v(_) {
827
- Yt.call(this, i, _);
827
+ $t.call(this, i, _);
828
828
  }
829
829
  function b(_) {
830
- Yt.call(this, i, _);
830
+ $t.call(this, i, _);
831
831
  }
832
- const S = () => p();
832
+ const E = () => y();
833
833
  return i.$$set = (_) => {
834
- "feature" in _ && t(0, o = _.feature), "selected" in _ && t(1, l = _.selected), "showPlaceType" in _ && t(2, s = _.showPlaceType), "missingIconsCache" in _ && t(9, c = _.missingIconsCache), "iconsBaseUrl" in _ && t(3, u = _.iconsBaseUrl);
834
+ "feature" in _ && t(0, o = _.feature), "selected" in _ && t(1, u = _.selected), "showPlaceType" in _ && t(2, s = _.showPlaceType), "missingIconsCache" in _ && t(9, c = _.missingIconsCache), "iconsBaseUrl" in _ && t(3, l = _.iconsBaseUrl);
835
835
  }, i.$$.update = () => {
836
- var _, C, x, L;
836
+ var _, C, x, S;
837
837
  if (i.$$.dirty & /*loadIconAttempt, index, category, iconsBaseUrl, imageUrl, missingIconsCache*/
838
838
  3640)
839
839
  do
840
- t(11, n--, n), t(4, a = h == null ? void 0 : h[n]), t(5, f = a ? u + a.replace(/ /g, "_") + ".svg" : void 0);
840
+ t(11, n--, n), t(4, a = d == null ? void 0 : d[n]), t(5, f = a ? l + a.replace(/ /g, "_") + ".svg" : void 0);
841
841
  while (n > -1 && (!f || c.has(f)));
842
842
  i.$$.dirty & /*feature*/
843
- 1 && t(6, r = ((C = (_ = o.properties) == null ? void 0 : _.categories) == null ? void 0 : C.join(", ")) ?? ((L = (x = o.properties) == null ? void 0 : x.place_type_name) == null ? void 0 : L[0]) ?? o.place_type[0]);
844
- }, t(11, n = (h == null ? void 0 : h.length) ?? 0), [
843
+ 1 && t(6, r = ((C = (_ = o.properties) == null ? void 0 : _.categories) == null ? void 0 : C.join(", ")) ?? ((S = (x = o.properties) == null ? void 0 : x.place_type_name) == null ? void 0 : S[0]) ?? o.place_type[0]);
844
+ }, t(11, n = (d == null ? void 0 : d.length) ?? 0), [
845
845
  o,
846
- l,
847
- s,
848
846
  u,
847
+ s,
848
+ l,
849
849
  a,
850
850
  f,
851
851
  r,
852
852
  g,
853
- p,
853
+ y,
854
854
  c,
855
- d,
855
+ h,
856
856
  n,
857
857
  v,
858
858
  b,
859
- S
859
+ E
860
860
  ];
861
861
  }
862
- class jn extends Me {
862
+ class Xn extends ke {
863
863
  constructor(e) {
864
- super(), xe(this, e, Gn, zn, Se, {
864
+ super(), Ce(this, e, Yn, Vn, Me, {
865
865
  feature: 0,
866
866
  selected: 1,
867
867
  showPlaceType: 2,
@@ -870,11 +870,11 @@ class jn extends Me {
870
870
  });
871
871
  }
872
872
  }
873
- function Zn(i) {
873
+ function Kn(i) {
874
874
  let e;
875
875
  return {
876
876
  c() {
877
- e = W("div"), e.innerHTML = '<svg viewBox="0 0 18 18" width="24" height="24" class="svelte-7cmwmc"><path fill="#333" d="M4.4 4.4l.8.8c2.1-2.1 5.5-2.1 7.6 0l.8-.8c-2.5-2.5-6.7-2.5-9.2 0z"></path><path opacity=".1" d="M12.8 12.9c-2.1 2.1-5.5 2.1-7.6 0-2.1-2.1-2.1-5.5 0-7.7l-.8-.8c-2.5 2.5-2.5 6.7 0 9.2s6.6 2.5 9.2 0 2.5-6.6 0-9.2l-.8.8c2.2 2.1 2.2 5.6 0 7.7z"></path></svg>', y(e, "class", "svelte-7cmwmc");
877
+ e = W("div"), e.innerHTML = '<svg viewBox="0 0 18 18" width="24" height="24" class="svelte-7cmwmc"><path fill="#333" d="M4.4 4.4l.8.8c2.1-2.1 5.5-2.1 7.6 0l.8-.8c-2.5-2.5-6.7-2.5-9.2 0z"></path><path opacity=".1" d="M12.8 12.9c-2.1 2.1-5.5 2.1-7.6 0-2.1-2.1-2.1-5.5 0-7.7l-.8-.8c-2.5 2.5-2.5 6.7 0 9.2s6.6 2.5 9.2 0 2.5-6.6 0-9.2l-.8.8c2.2 2.1 2.2 5.6 0 7.7z"></path></svg>', p(e, "class", "svelte-7cmwmc");
878
878
  },
879
879
  m(t, n) {
880
880
  F(t, e, n);
@@ -883,26 +883,26 @@ function Zn(i) {
883
883
  i: A,
884
884
  o: A,
885
885
  d(t) {
886
- t && B(e);
886
+ t && z(e);
887
887
  }
888
888
  };
889
889
  }
890
- class qn extends Me {
890
+ class Jn extends ke {
891
891
  constructor(e) {
892
- super(), xe(this, e, null, Zn, Se, {});
892
+ super(), Ce(this, e, null, Kn, Me, {});
893
893
  }
894
894
  }
895
- function Qn(i) {
895
+ function $n(i) {
896
896
  let e, t, n;
897
897
  return {
898
898
  c() {
899
- e = ue("svg"), t = ue("path"), y(t, "stroke-width", "4"), y(t, "d", "M 5,33.103579 C 5,17.607779 18.457,5 35,5 C 51.543,5 65,17.607779 65,33.103579 C 65,56.388679 40.4668,76.048179 36.6112,79.137779 C 36.3714,79.329879 36.2116,79.457979 36.1427,79.518879 C 35.8203,79.800879 35.4102,79.942779 35,79.942779 C 34.5899,79.942779 34.1797,79.800879 33.8575,79.518879 C 33.7886,79.457979 33.6289,79.330079 33.3893,79.138079 C 29.5346,76.049279 5,56.389379 5,33.103579 Z M 35.0001,49.386379 C 43.1917,49.386379 49.8323,42.646079 49.8323,34.331379 C 49.8323,26.016779 43.1917,19.276479 35.0001,19.276479 C 26.8085,19.276479 20.1679,26.016779 20.1679,34.331379 C 20.1679,42.646079 26.8085,49.386379 35.0001,49.386379 Z"), y(t, "class", "svelte-gzo3ar"), y(e, "width", n = /*displayIn*/
900
- i[0] === "list" ? 20 : void 0), y(e, "viewBox", "0 0 70 85"), y(e, "fill", "none"), y(e, "class", "svelte-gzo3ar"), re(
899
+ e = ce("svg"), t = ce("path"), p(t, "stroke-width", "4"), p(t, "d", "M 5,33.103579 C 5,17.607779 18.457,5 35,5 C 51.543,5 65,17.607779 65,33.103579 C 65,56.388679 40.4668,76.048179 36.6112,79.137779 C 36.3714,79.329879 36.2116,79.457979 36.1427,79.518879 C 35.8203,79.800879 35.4102,79.942779 35,79.942779 C 34.5899,79.942779 34.1797,79.800879 33.8575,79.518879 C 33.7886,79.457979 33.6289,79.330079 33.3893,79.138079 C 29.5346,76.049279 5,56.389379 5,33.103579 Z M 35.0001,49.386379 C 43.1917,49.386379 49.8323,42.646079 49.8323,34.331379 C 49.8323,26.016779 43.1917,19.276479 35.0001,19.276479 C 26.8085,19.276479 20.1679,26.016779 20.1679,34.331379 C 20.1679,42.646079 26.8085,49.386379 35.0001,49.386379 Z"), p(t, "class", "svelte-gzo3ar"), p(e, "width", n = /*displayIn*/
900
+ i[0] === "list" ? 20 : void 0), p(e, "viewBox", "0 0 70 85"), p(e, "fill", "none"), p(e, "class", "svelte-gzo3ar"), se(
901
901
  e,
902
902
  "in-map",
903
903
  /*displayIn*/
904
904
  i[0] !== "list"
905
- ), re(
905
+ ), se(
906
906
  e,
907
907
  "list-icon",
908
908
  /*displayIn*/
@@ -910,19 +910,19 @@ function Qn(i) {
910
910
  );
911
911
  },
912
912
  m(r, o) {
913
- F(r, e, o), T(e, t);
913
+ F(r, e, o), P(e, t);
914
914
  },
915
915
  p(r, [o]) {
916
916
  o & /*displayIn*/
917
917
  1 && n !== (n = /*displayIn*/
918
- r[0] === "list" ? 20 : void 0) && y(e, "width", n), o & /*displayIn*/
919
- 1 && re(
918
+ r[0] === "list" ? 20 : void 0) && p(e, "width", n), o & /*displayIn*/
919
+ 1 && se(
920
920
  e,
921
921
  "in-map",
922
922
  /*displayIn*/
923
923
  r[0] !== "list"
924
924
  ), o & /*displayIn*/
925
- 1 && re(
925
+ 1 && se(
926
926
  e,
927
927
  "list-icon",
928
928
  /*displayIn*/
@@ -932,95 +932,95 @@ function Qn(i) {
932
932
  i: A,
933
933
  o: A,
934
934
  d(r) {
935
- r && B(e);
935
+ r && z(e);
936
936
  }
937
937
  };
938
938
  }
939
- function Hn(i, e, t) {
939
+ function er(i, e, t) {
940
940
  let { displayIn: n } = e;
941
941
  return i.$$set = (r) => {
942
942
  "displayIn" in r && t(0, n = r.displayIn);
943
943
  }, [n];
944
944
  }
945
- class Vn extends Me {
945
+ class tr extends ke {
946
946
  constructor(e) {
947
- super(), xe(this, e, Hn, Qn, Se, { displayIn: 0 });
947
+ super(), Ce(this, e, er, $n, Me, { displayIn: 0 });
948
948
  }
949
949
  }
950
- function Yn(i) {
950
+ function ir(i) {
951
951
  let e, t;
952
952
  return {
953
953
  c() {
954
- e = ue("svg"), t = ue("path"), y(t, "d", "M30.003-26.765C13.46-26.765 0-14.158 0 1.337c0 23.286 24.535 42.952 28.39 46.04.24.192.402.316.471.376.323.282.732.424 1.142.424.41 0 .82-.142 1.142-.424.068-.06.231-.183.471-.376 3.856-3.09 28.39-22.754 28.39-46.04 0-15.495-13.46-28.102-30.003-28.102Zm1.757 12.469c4.38 0 7.858 1.052 10.431 3.158 2.595 2.105 3.89 4.913 3.89 8.422 0 2.34-.53 4.362-1.593 6.063-1.063 1.702-3.086 3.616-6.063 5.742-2.042 1.51-3.337 2.659-3.89 3.446-.532.787-.8 1.82-.8 3.096v1.914h-8.449V15.18c0-2.041.434-3.815 1.306-5.325.872-1.51 2.467-3.118 4.785-4.82 2.233-1.594 3.7-2.89 4.402-3.889a5.582 5.582 0 0 0 1.087-3.35c0-1.382-.51-2.435-1.531-3.158-1.02-.723-2.45-1.087-4.28-1.087-3.19 0-6.826 1.047-10.91 3.131l-3.472-6.986c4.742-2.659 9.77-3.992 15.087-3.992Zm-1.88 37.324c1.765 0 3.124.472 4.08 1.408.98.936 1.47 2.276 1.47 4.02 0 1.68-.49 3.007-1.47 3.985-.977.957-2.336 1.435-4.08 1.435-1.787 0-3.171-.465-4.15-1.4-.978-.958-1.47-2.298-1.47-4.02 0-1.787.48-3.14 1.436-4.054.957-.915 2.355-1.374 4.184-1.374Z"), y(e, "viewBox", "0 0 60.006 21.412"), y(e, "width", "14"), y(e, "height", "20"), y(e, "class", "svelte-en2qvf");
954
+ e = ce("svg"), t = ce("path"), p(t, "d", "M30.003-26.765C13.46-26.765 0-14.158 0 1.337c0 23.286 24.535 42.952 28.39 46.04.24.192.402.316.471.376.323.282.732.424 1.142.424.41 0 .82-.142 1.142-.424.068-.06.231-.183.471-.376 3.856-3.09 28.39-22.754 28.39-46.04 0-15.495-13.46-28.102-30.003-28.102Zm1.757 12.469c4.38 0 7.858 1.052 10.431 3.158 2.595 2.105 3.89 4.913 3.89 8.422 0 2.34-.53 4.362-1.593 6.063-1.063 1.702-3.086 3.616-6.063 5.742-2.042 1.51-3.337 2.659-3.89 3.446-.532.787-.8 1.82-.8 3.096v1.914h-8.449V15.18c0-2.041.434-3.815 1.306-5.325.872-1.51 2.467-3.118 4.785-4.82 2.233-1.594 3.7-2.89 4.402-3.889a5.582 5.582 0 0 0 1.087-3.35c0-1.382-.51-2.435-1.531-3.158-1.02-.723-2.45-1.087-4.28-1.087-3.19 0-6.826 1.047-10.91 3.131l-3.472-6.986c4.742-2.659 9.77-3.992 15.087-3.992Zm-1.88 37.324c1.765 0 3.124.472 4.08 1.408.98.936 1.47 2.276 1.47 4.02 0 1.68-.49 3.007-1.47 3.985-.977.957-2.336 1.435-4.08 1.435-1.787 0-3.171-.465-4.15-1.4-.978-.958-1.47-2.298-1.47-4.02 0-1.787.48-3.14 1.436-4.054.957-.915 2.355-1.374 4.184-1.374Z"), p(e, "viewBox", "0 0 60.006 21.412"), p(e, "width", "14"), p(e, "height", "20"), p(e, "class", "svelte-en2qvf");
955
955
  },
956
956
  m(n, r) {
957
- F(n, e, r), T(e, t);
957
+ F(n, e, r), P(e, t);
958
958
  },
959
959
  p: A,
960
960
  i: A,
961
961
  o: A,
962
962
  d(n) {
963
- n && B(e);
963
+ n && z(e);
964
964
  }
965
965
  };
966
966
  }
967
- class Xn extends Me {
967
+ class nr extends ke {
968
968
  constructor(e) {
969
- super(), xe(this, e, null, Yn, Se, {});
969
+ super(), Ce(this, e, null, ir, Me, {});
970
970
  }
971
971
  }
972
- function Kn(i) {
972
+ function rr(i) {
973
973
  let e, t, n;
974
974
  return {
975
975
  c() {
976
- e = ue("svg"), t = ue("circle"), n = ue("path"), y(t, "cx", "4.789"), y(t, "cy", "4.787"), y(t, "r", "3.85"), y(t, "class", "svelte-1aq105l"), y(n, "d", "M12.063 12.063 7.635 7.635"), y(n, "class", "svelte-1aq105l"), y(e, "xmlns", "http://www.w3.org/2000/svg"), y(e, "width", "13"), y(e, "height", "13"), y(e, "viewBox", "0 0 13 13"), y(e, "class", "svelte-1aq105l");
976
+ e = ce("svg"), t = ce("circle"), n = ce("path"), p(t, "cx", "4.789"), p(t, "cy", "4.787"), p(t, "r", "3.85"), p(t, "class", "svelte-1aq105l"), p(n, "d", "M12.063 12.063 7.635 7.635"), p(n, "class", "svelte-1aq105l"), p(e, "xmlns", "http://www.w3.org/2000/svg"), p(e, "width", "13"), p(e, "height", "13"), p(e, "viewBox", "0 0 13 13"), p(e, "class", "svelte-1aq105l");
977
977
  },
978
978
  m(r, o) {
979
- F(r, e, o), T(e, t), T(e, n);
979
+ F(r, e, o), P(e, t), P(e, n);
980
980
  },
981
981
  p: A,
982
982
  i: A,
983
983
  o: A,
984
984
  d(r) {
985
- r && B(e);
985
+ r && z(e);
986
986
  }
987
987
  };
988
988
  }
989
- class Jn extends Me {
989
+ class or extends ke {
990
990
  constructor(e) {
991
- super(), xe(this, e, null, Kn, Se, {});
991
+ super(), Ce(this, e, null, rr, Me, {});
992
992
  }
993
993
  }
994
- function $n(i, e, t) {
994
+ function sr(i, e, t) {
995
995
  const n = e[1], r = e[0], o = n - r;
996
996
  return i === n && t ? i : ((i - r) % o + o) % o + r;
997
997
  }
998
- function Ze(i) {
998
+ function Ve(i) {
999
999
  const e = [...i];
1000
1000
  return e[2] < e[0] && (Math.abs((e[0] + e[2] + 360) / 2) > Math.abs((e[0] - 360 + e[2]) / 2) ? e[0] -= 360 : e[2] += 360), e;
1001
1001
  }
1002
- let De;
1003
- async function er(i, e, t) {
1002
+ let Ge;
1003
+ async function lr(i, e, t) {
1004
1004
  const n = i == null ? void 0 : i.getCenterAndZoom();
1005
1005
  for (const r of e ?? [])
1006
1006
  if (!(n && (r.minZoom != null && r.minZoom > n[0] || r.maxZoom != null && r.maxZoom < n[0]))) {
1007
1007
  if (r.type === "fixed")
1008
1008
  return r.coordinates.join(",");
1009
1009
  e: if (r.type === "client-geolocation") {
1010
- if (De && r.cachedLocationExpiry && De.time + r.cachedLocationExpiry > Date.now()) {
1011
- if (!De.coords)
1010
+ if (Ge && r.cachedLocationExpiry && Ge.time + r.cachedLocationExpiry > Date.now()) {
1011
+ if (!Ge.coords)
1012
1012
  break e;
1013
- return De.coords;
1013
+ return Ge.coords;
1014
1014
  }
1015
1015
  let o;
1016
1016
  try {
1017
- return o = await new Promise((l, s) => {
1017
+ return o = await new Promise((u, s) => {
1018
1018
  t.signal.addEventListener("abort", () => {
1019
1019
  s(Error("aborted"));
1020
1020
  }), navigator.geolocation.getCurrentPosition(
1021
1021
  (c) => {
1022
- l(
1023
- [c.coords.longitude, c.coords.latitude].map((u) => u.toFixed(6)).join(",")
1022
+ u(
1023
+ [c.coords.longitude, c.coords.latitude].map((l) => l.toFixed(6)).join(",")
1024
1024
  );
1025
1025
  },
1026
1026
  (c) => {
@@ -1031,7 +1031,7 @@ async function er(i, e, t) {
1031
1031
  }), o;
1032
1032
  } catch {
1033
1033
  } finally {
1034
- r.cachedLocationExpiry && (De = {
1034
+ r.cachedLocationExpiry && (Ge = {
1035
1035
  time: Date.now(),
1036
1036
  coords: o
1037
1037
  });
@@ -1045,67 +1045,67 @@ async function er(i, e, t) {
1045
1045
  return n[1].toFixed(6) + "," + n[2].toFixed(6);
1046
1046
  }
1047
1047
  }
1048
- const tr = /^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([6-9][0-9])\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([6-9][0-9])\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*(EAST|WEST|[EW])?$/i, $t = /^([+-]?[0-8]?[0-9])\s+([0-5]?[0-9]\.\d{3,})[\s,]{1,}([+-]?[0-1]?[0-9]?[0-9])\s+([0-5]?[0-9]\.\d{3,})$/, ei = /^(NORTH|SOUTH|[NS])?[\s]*([+-]?[0-8]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(NORTH|SOUTH|[NS])?[\s]*[,/;]?[\s]*(EAST|WEST|[EW])?[\s]*([+-]?[0-1]?[0-9]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(EAST|WEST|[EW])?$/i, ti = /^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(EAST|WEST|[EW])?$/i, ii = /^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)\s*(EAST|WEST|[EW])?$/i, ni = /^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|’’|´´|["″”\.])?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|´´|’’|["″”\.])?\s*(EAST|WEST|[EW])?$/i;
1049
- function ir(i) {
1048
+ const ur = /^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([6-9][0-9])\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([6-9][0-9])\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*(EAST|WEST|[EW])?$/i, ni = /^([+-]?[0-8]?[0-9])\s+([0-5]?[0-9]\.\d{3,})[\s,]{1,}([+-]?[0-1]?[0-9]?[0-9])\s+([0-5]?[0-9]\.\d{3,})$/, ri = /^(NORTH|SOUTH|[NS])?[\s]*([+-]?[0-8]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(NORTH|SOUTH|[NS])?[\s]*[,/;]?[\s]*(EAST|WEST|[EW])?[\s]*([+-]?[0-1]?[0-9]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(EAST|WEST|[EW])?$/i, oi = /^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(EAST|WEST|[EW])?$/i, si = /^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)\s*(EAST|WEST|[EW])?$/i, li = /^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|’’|´´|["″”\.])?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|´´|’’|["″”\.])?\s*(EAST|WEST|[EW])?$/i;
1049
+ function ar(i) {
1050
1050
  if (!["DMS", "DM", "DD"].includes(i))
1051
1051
  throw new Error("invalid format specified");
1052
1052
  if (this.decimalCoordinates && this.decimalCoordinates.trim()) {
1053
- const e = this.decimalCoordinates.split(",").map((d) => Number(d.trim())), t = Number(e[0]), n = Number(e[1]), r = Math.abs(t), o = Math.abs(n), l = t > 0 ? "N" : "S", s = n > 0 ? "E" : "W";
1053
+ const e = this.decimalCoordinates.split(",").map((h) => Number(h.trim())), t = Number(e[0]), n = Number(e[1]), r = Math.abs(t), o = Math.abs(n), u = t > 0 ? "N" : "S", s = n > 0 ? "E" : "W";
1054
1054
  let c;
1055
- i == "DD" && (c = `${r}° ${l}, ${o}° ${s}`);
1056
- const u = Math.floor(r), h = Math.floor(o), a = (r - u) * 60, f = (o - h) * 60;
1055
+ i == "DD" && (c = `${r}° ${u}, ${o}° ${s}`);
1056
+ const l = Math.floor(r), d = Math.floor(o), a = (r - l) * 60, f = (o - d) * 60;
1057
1057
  if (i == "DM") {
1058
- let d = ri(a, 3).toFixed(3).padStart(6, "0"), g = ri(f, 3).toFixed(3).padStart(6, "0");
1059
- d.endsWith(".000") && g.endsWith(".000") && (d = d.replace(/\.000$/, ""), g = g.replace(/\.000$/, "")), c = `${u}° ${d}' ${l}, ${h}° ${g}' ${s}`;
1058
+ let h = ui(a, 3).toFixed(3).padStart(6, "0"), g = ui(f, 3).toFixed(3).padStart(6, "0");
1059
+ h.endsWith(".000") && g.endsWith(".000") && (h = h.replace(/\.000$/, ""), g = g.replace(/\.000$/, "")), c = `${l}° ${h}' ${u}, ${d}° ${g}' ${s}`;
1060
1060
  }
1061
1061
  if (i == "DMS") {
1062
- const d = Math.floor(a), g = Math.floor(f);
1063
- let p = ((a - d) * 60).toFixed(1).padStart(4, "0"), v = ((f - g) * 60).toFixed(1).padStart(4, "0");
1064
- const b = d.toString().padStart(2, "0"), S = g.toString().padStart(2, "0");
1065
- p.endsWith(".0") && v.endsWith(".0") && (p = p.replace(/\.0$/, ""), v = v.replace(/\.0$/, "")), c = `${u}° ${b}' ${p}" ${l}, ${h}° ${S}' ${v}" ${s}`;
1062
+ const h = Math.floor(a), g = Math.floor(f);
1063
+ let y = ((a - h) * 60).toFixed(1).padStart(4, "0"), v = ((f - g) * 60).toFixed(1).padStart(4, "0");
1064
+ const b = h.toString().padStart(2, "0"), E = g.toString().padStart(2, "0");
1065
+ y.endsWith(".0") && v.endsWith(".0") && (y = y.replace(/\.0$/, ""), v = v.replace(/\.0$/, "")), c = `${l}° ${b}' ${y}" ${u}, ${d}° ${E}' ${v}" ${s}`;
1066
1066
  }
1067
1067
  return c;
1068
1068
  } else
1069
1069
  throw new Error("no decimal coordinates to convert");
1070
1070
  }
1071
- function ri(i, e) {
1071
+ function ui(i, e) {
1072
1072
  const t = Math.pow(10, e);
1073
1073
  return Math.round((i + Number.EPSILON) * t) / t;
1074
1074
  }
1075
- function Wt(i, e) {
1075
+ function Dt(i, e) {
1076
1076
  e || (e = 5), i = i.replace(/\s+/g, " ").trim();
1077
- let t = null, n = null, r = "", o = "", l = null, s = [], c = !1;
1078
- if (tr.test(i))
1077
+ let t = null, n = null, r = "", o = "", u = null, s = [], c = !1;
1078
+ if (ur.test(i))
1079
1079
  throw new Error("invalid coordinate value");
1080
- if ($t.test(i))
1081
- if (s = $t.exec(i), c = Ue(s), c)
1082
- t = Math.abs(s[1]) + s[2] / 60, Number(s[1]) < 0 && (t *= -1), n = Math.abs(s[3]) + s[4] / 60, Number(s[3]) < 0 && (n *= -1), l = "DM";
1080
+ if (ni.test(i))
1081
+ if (s = ni.exec(i), c = je(s), c)
1082
+ t = Math.abs(s[1]) + s[2] / 60, Number(s[1]) < 0 && (t *= -1), n = Math.abs(s[3]) + s[4] / 60, Number(s[3]) < 0 && (n *= -1), u = "DM";
1083
1083
  else
1084
1084
  throw new Error("invalid coordinate format");
1085
- else if (ei.test(i))
1086
- if (s = ei.exec(i), c = Ue(s), c) {
1087
- if (t = s[2], n = s[6], t.includes(",") && (t = t.replace(",", ".")), n.includes(",") && (n = n.replace(",", ".")), l = "DD", Number(Math.round(t)) == Number(t))
1085
+ else if (ri.test(i))
1086
+ if (s = ri.exec(i), c = je(s), c) {
1087
+ if (t = s[2], n = s[6], t.includes(",") && (t = t.replace(",", ".")), n.includes(",") && (n = n.replace(",", ".")), u = "DD", Number(Math.round(t)) == Number(t))
1088
1088
  throw new Error("integer only coordinate provided");
1089
1089
  if (Number(Math.round(n)) == Number(n))
1090
1090
  throw new Error("integer only coordinate provided");
1091
1091
  s[1] ? (r = s[1], o = s[5]) : s[4] && (r = s[4], o = s[8]);
1092
1092
  } else
1093
1093
  throw new Error("invalid decimal coordinate format");
1094
- else if (ti.test(i))
1095
- if (s = ti.exec(i), c = Ue(s), c)
1096
- t = Math.abs(parseInt(s[2])), s[4] && (t += s[4] / 60, l = "DM"), s[6] && (t += s[6].replace(",", ".") / 3600, l = "DMS"), parseInt(s[2]) < 0 && (t = -1 * t), n = Math.abs(parseInt(s[9])), s[11] && (n += s[11] / 60), s[13] && (n += s[13].replace(",", ".") / 3600), parseInt(s[9]) < 0 && (n = -1 * n), s[1] ? (r = s[1], o = s[8]) : s[7] && (r = s[7], o = s[14]);
1094
+ else if (oi.test(i))
1095
+ if (s = oi.exec(i), c = je(s), c)
1096
+ t = Math.abs(parseInt(s[2])), s[4] && (t += s[4] / 60, u = "DM"), s[6] && (t += s[6].replace(",", ".") / 3600, u = "DMS"), parseInt(s[2]) < 0 && (t = -1 * t), n = Math.abs(parseInt(s[9])), s[11] && (n += s[11] / 60), s[13] && (n += s[13].replace(",", ".") / 3600), parseInt(s[9]) < 0 && (n = -1 * n), s[1] ? (r = s[1], o = s[8]) : s[7] && (r = s[7], o = s[14]);
1097
1097
  else
1098
1098
  throw new Error("invalid DMS coordinates format");
1099
- else if (ii.test(i))
1100
- if (s = ii.exec(i), c = Ue(s), c)
1101
- t = Math.abs(parseInt(s[2])), s[4] && (t += s[4] / 60, l = "DM"), s[6] && (t += s[6] / 3600, l = "DMS"), parseInt(s[2]) < 0 && (t = -1 * t), n = Math.abs(parseInt(s[10])), s[12] && (n += s[12] / 60), s[14] && (n += s[14] / 3600), parseInt(s[10]) < 0 && (n = -1 * n), s[1] ? (r = s[1], o = s[9]) : s[8] && (r = s[8], o = s[16]);
1099
+ else if (si.test(i))
1100
+ if (s = si.exec(i), c = je(s), c)
1101
+ t = Math.abs(parseInt(s[2])), s[4] && (t += s[4] / 60, u = "DM"), s[6] && (t += s[6] / 3600, u = "DMS"), parseInt(s[2]) < 0 && (t = -1 * t), n = Math.abs(parseInt(s[10])), s[12] && (n += s[12] / 60), s[14] && (n += s[14] / 3600), parseInt(s[10]) < 0 && (n = -1 * n), s[1] ? (r = s[1], o = s[9]) : s[8] && (r = s[8], o = s[16]);
1102
1102
  else
1103
1103
  throw new Error("invalid DMS coordinates format");
1104
- else if (ni.test(i)) {
1105
- if (s = ni.exec(i), c = Ue(s), s.filter((u) => u).length <= 5)
1104
+ else if (li.test(i)) {
1105
+ if (s = li.exec(i), c = je(s), s.filter((l) => l).length <= 5)
1106
1106
  throw new Error("invalid coordinates format");
1107
1107
  if (c)
1108
- t = Math.abs(parseInt(s[2])), s[4] && (t += s[4].replace(",", ".") / 60, l = "DM"), s[6] && (t += s[6].replace(",", ".") / 3600, l = "DMS"), parseInt(s[2]) < 0 && (t = -1 * t), n = Math.abs(parseInt(s[10])), s[12] && (n += s[12].replace(",", ".") / 60), s[14] && (n += s[14].replace(",", ".") / 3600), parseInt(s[10]) < 0 && (n = -1 * n), s[1] ? (r = s[1], o = s[9]) : s[8] && (r = s[8], o = s[16]);
1108
+ t = Math.abs(parseInt(s[2])), s[4] && (t += s[4].replace(",", ".") / 60, u = "DM"), s[6] && (t += s[6].replace(",", ".") / 3600, u = "DMS"), parseInt(s[2]) < 0 && (t = -1 * t), n = Math.abs(parseInt(s[10])), s[12] && (n += s[12].replace(",", ".") / 60), s[14] && (n += s[14].replace(",", ".") / 3600), parseInt(s[10]) < 0 && (n = -1 * n), s[1] ? (r = s[1], o = s[9]) : s[8] && (r = s[8], o = s[16]);
1109
1109
  else
1110
1110
  throw new Error("invalid coordinates format");
1111
1111
  }
@@ -1119,29 +1119,29 @@ function Wt(i, e) {
1119
1119
  if (r && r == o)
1120
1120
  throw new Error("invalid coordinates format");
1121
1121
  t.toString().includes(",") && (t = t.replace(",", ".")), n.toString().includes(",") && (n = n.replace(",", "."));
1122
- let u = /S|SOUTH/i;
1123
- u.test(r) && t > 0 && (t = -1 * t), u = /W|WEST/i, u.test(o) && n > 0 && (n = -1 * n);
1124
- const h = s[0].trim();
1122
+ let l = /S|SOUTH/i;
1123
+ l.test(r) && t > 0 && (t = -1 * t), l = /W|WEST/i, l.test(o) && n > 0 && (n = -1 * n);
1124
+ const d = s[0].trim();
1125
1125
  let a, f;
1126
- const d = /[,/;\u0020]/g, g = h.match(d);
1126
+ const h = /[,/;\u0020]/g, g = d.match(h);
1127
1127
  if (g == null) {
1128
1128
  const b = Math.floor(i.length / 2);
1129
- a = h.substring(0, b).trim(), f = h.substring(b).trim();
1129
+ a = d.substring(0, b).trim(), f = d.substring(b).trim();
1130
1130
  } else {
1131
1131
  let b;
1132
1132
  g.length % 2 == 1 ? b = Math.floor(g.length / 2) : b = g.length / 2 - 1;
1133
- let S = 0;
1133
+ let E = 0;
1134
1134
  if (b == 0)
1135
- S = h.indexOf(g[0]), a = h.substring(0, S).trim(), f = h.substring(S + 1).trim();
1135
+ E = d.indexOf(g[0]), a = d.substring(0, E).trim(), f = d.substring(E + 1).trim();
1136
1136
  else {
1137
- let E = 0, _ = 0;
1138
- for (; E <= b; )
1139
- S = h.indexOf(g[E], _), _ = S + 1, E++;
1140
- a = h.substring(0, S).trim(), f = h.substring(S + 1).trim();
1137
+ let L = 0, _ = 0;
1138
+ for (; L <= b; )
1139
+ E = d.indexOf(g[L], _), _ = E + 1, L++;
1140
+ a = d.substring(0, E).trim(), f = d.substring(E + 1).trim();
1141
1141
  }
1142
1142
  }
1143
- const p = a.split(".");
1144
- if (p.length == 2 && p[1] == 0 && p[1].length != 2)
1143
+ const y = a.split(".");
1144
+ if (y.length == 2 && y[1] == 0 && y[1].length != 2)
1145
1145
  throw new Error("invalid coordinates format");
1146
1146
  const v = f.split(".");
1147
1147
  if (v.length == 2 && v[1] == 0 && v[1].length != 2)
@@ -1149,20 +1149,20 @@ function Wt(i, e) {
1149
1149
  if (/^\d+$/.test(a) || /^\d+$/.test(f))
1150
1150
  throw new Error("degree only coordinate/s provided");
1151
1151
  return t = Number(Number(t).toFixed(e)), n = Number(Number(n).toFixed(e)), Object.freeze({
1152
- verbatimCoordinates: h,
1152
+ verbatimCoordinates: d,
1153
1153
  verbatimLatitude: a,
1154
1154
  verbatimLongitude: f,
1155
1155
  decimalLatitude: t,
1156
1156
  decimalLongitude: n,
1157
1157
  decimalCoordinates: `${t},${n}`,
1158
- originalFormat: l,
1159
- closeEnough: nr,
1160
- toCoordinateFormat: ir
1158
+ originalFormat: u,
1159
+ closeEnough: cr,
1160
+ toCoordinateFormat: ar
1161
1161
  });
1162
1162
  } else
1163
1163
  throw new Error("coordinates pattern match failed");
1164
1164
  }
1165
- function Ue(i) {
1165
+ function je(i) {
1166
1166
  if (!isNaN(i[0]))
1167
1167
  return !1;
1168
1168
  const e = [...i];
@@ -1170,39 +1170,39 @@ function Ue(i) {
1170
1170
  return !1;
1171
1171
  const t = /^[-+]?\d+([\.,]\d+)?$/, n = /[eastsouthnorthwest]+/i, r = e.length / 2;
1172
1172
  for (let o = 0; o < r; o++) {
1173
- const l = e[o], s = e[o + r], c = t.test(l) && t.test(s), u = n.test(l) && n.test(s), h = l == s;
1174
- if (!(l == null && s == null)) {
1175
- if (l == null || s == null)
1173
+ const u = e[o], s = e[o + r], c = t.test(u) && t.test(s), l = n.test(u) && n.test(s), d = u == s;
1174
+ if (!(u == null && s == null)) {
1175
+ if (u == null || s == null)
1176
1176
  return !1;
1177
- if (c || u || h)
1177
+ if (c || l || d)
1178
1178
  continue;
1179
1179
  return !1;
1180
1180
  }
1181
1181
  }
1182
1182
  return !0;
1183
1183
  }
1184
- function oi(i, e) {
1184
+ function ai(i, e) {
1185
1185
  const t = Math.abs(i - e);
1186
1186
  return Number(t.toFixed(6)) <= 1e-5;
1187
1187
  }
1188
- function nr(i) {
1188
+ function cr(i) {
1189
1189
  if (!i)
1190
1190
  throw new Error("coords must be provided");
1191
1191
  if (i.includes(",")) {
1192
1192
  const e = i.split(",");
1193
1193
  if (Number(e[0]) == NaN || Number(e[1]) == NaN)
1194
1194
  throw new Error("coords are not valid decimals");
1195
- return oi(this.decimalLatitude, Number(e[0])) && oi(this.decimalLongitude, e[1]);
1195
+ return ai(this.decimalLatitude, Number(e[0])) && ai(this.decimalLongitude, e[1]);
1196
1196
  } else
1197
1197
  throw new Error("coords being tested must be separated by a comma");
1198
1198
  }
1199
- const rr = Object.freeze({
1199
+ const fr = Object.freeze({
1200
1200
  DMS: "DMS",
1201
1201
  DM: "DM",
1202
1202
  DD: "DD"
1203
1203
  });
1204
- Wt.to = rr;
1205
- const or = [
1204
+ Dt.to = fr;
1205
+ const dr = [
1206
1206
  {
1207
1207
  verbatimCoordinates: "40.123, -74.123",
1208
1208
  verbatimLatitude: "40.123",
@@ -1343,10 +1343,10 @@ const or = [
1343
1343
  verbatimLatitude: "40 7 22.8",
1344
1344
  verbatimLongitude: "-74 7 22.8"
1345
1345
  }
1346
- ], sr = {
1346
+ ], hr = {
1347
1347
  decimalLatitude: 40.123,
1348
1348
  decimalLongitude: -74.123
1349
- }, lr = [
1349
+ }, mr = [
1350
1350
  {
1351
1351
  verbatimCoordinates: `50°4'17.698"south, 14°24'2.826"east`,
1352
1352
  verbatimLatitude: `50°4'17.698"south`,
@@ -1431,7 +1431,7 @@ const or = [
1431
1431
  decimalLatitude: -18.4,
1432
1432
  decimalLongitude: 22.75
1433
1433
  }
1434
- ], ur = [
1434
+ ], gr = [
1435
1435
  {
1436
1436
  verbatimCoordinates: "10.432342S 10.6345345E",
1437
1437
  verbatimLatitude: "10.432342S",
@@ -1566,24 +1566,24 @@ const or = [
1566
1566
  decimalLongitude: 18.33453
1567
1567
  }
1568
1568
  ];
1569
- function ar() {
1569
+ function yr() {
1570
1570
  const i = [];
1571
- return or.forEach((e) => {
1572
- e.decimalLatitude ? i.push(e) : i.push({ ...e, ...sr });
1573
- }), [...i, ...lr, ...ur];
1574
- }
1575
- const cr = ar();
1576
- Wt.formats = cr.map((i) => i.verbatimCoordinates);
1577
- const fr = Wt;
1578
- function si(i, e, t) {
1571
+ return dr.forEach((e) => {
1572
+ e.decimalLatitude ? i.push(e) : i.push({ ...e, ...hr });
1573
+ }), [...i, ...mr, ...gr];
1574
+ }
1575
+ const pr = yr();
1576
+ Dt.formats = pr.map((i) => i.verbatimCoordinates);
1577
+ const br = Dt;
1578
+ function ci(i, e, t) {
1579
1579
  const n = i.slice();
1580
- return n[83] = e[t], n[85] = t, n;
1580
+ return n[87] = e[t], n[89] = t, n;
1581
1581
  }
1582
- function li(i) {
1582
+ function fi(i) {
1583
1583
  let e, t;
1584
- return e = new qn({}), {
1584
+ return e = new Jn({}), {
1585
1585
  c() {
1586
- Ee(e.$$.fragment);
1586
+ Se(e.$$.fragment);
1587
1587
  },
1588
1588
  m(n, r) {
1589
1589
  me(e, n, r), t = !0;
@@ -1599,160 +1599,160 @@ function li(i) {
1599
1599
  }
1600
1600
  };
1601
1601
  }
1602
- function ui(i) {
1602
+ function di(i) {
1603
1603
  let e, t, n, r, o;
1604
- return t = new Xn({}), {
1604
+ return t = new nr({}), {
1605
1605
  c() {
1606
- e = W("button"), Ee(t.$$.fragment), y(e, "type", "button"), y(
1606
+ e = W("button"), Se(t.$$.fragment), p(e, "type", "button"), p(
1607
1607
  e,
1608
1608
  "title",
1609
1609
  /*reverseButtonTitle*/
1610
1610
  i[9]
1611
- ), y(e, "class", "svelte-1uvos7g"), re(
1611
+ ), p(e, "class", "svelte-bz0zu3"), se(
1612
1612
  e,
1613
1613
  "active",
1614
1614
  /*reverseActive*/
1615
1615
  i[0]
1616
1616
  );
1617
1617
  },
1618
- m(l, s) {
1619
- F(l, e, s), me(t, e, null), n = !0, r || (o = J(
1618
+ m(u, s) {
1619
+ F(u, e, s), me(t, e, null), n = !0, r || (o = J(
1620
1620
  e,
1621
1621
  "click",
1622
1622
  /*click_handler_2*/
1623
- i[68]
1623
+ i[71]
1624
1624
  ), r = !0);
1625
1625
  },
1626
- p(l, s) {
1626
+ p(u, s) {
1627
1627
  (!n || s[0] & /*reverseButtonTitle*/
1628
- 512) && y(
1628
+ 512) && p(
1629
1629
  e,
1630
1630
  "title",
1631
1631
  /*reverseButtonTitle*/
1632
- l[9]
1632
+ u[9]
1633
1633
  ), (!n || s[0] & /*reverseActive*/
1634
- 1) && re(
1634
+ 1) && se(
1635
1635
  e,
1636
1636
  "active",
1637
1637
  /*reverseActive*/
1638
- l[0]
1638
+ u[0]
1639
1639
  );
1640
1640
  },
1641
- i(l) {
1642
- n || (Z(t.$$.fragment, l), n = !0);
1641
+ i(u) {
1642
+ n || (Z(t.$$.fragment, u), n = !0);
1643
1643
  },
1644
- o(l) {
1645
- V(t.$$.fragment, l), n = !1;
1644
+ o(u) {
1645
+ V(t.$$.fragment, u), n = !1;
1646
1646
  },
1647
- d(l) {
1648
- l && B(e), ge(t), r = !1, o();
1647
+ d(u) {
1648
+ u && z(e), ge(t), r = !1, o();
1649
1649
  }
1650
1650
  };
1651
1651
  }
1652
- function dr(i) {
1653
- let e, t = [], n = /* @__PURE__ */ new Map(), r, o, l, s = Kt(
1652
+ function vr(i) {
1653
+ let e, t = [], n = /* @__PURE__ */ new Map(), r, o, u, s = ti(
1654
1654
  /*listFeatures*/
1655
1655
  i[14]
1656
1656
  );
1657
- const c = (u) => (
1657
+ const c = (l) => (
1658
1658
  /*feature*/
1659
- u[83].id + /*feature*/
1660
- (u[83].address ? "," + /*feature*/
1661
- u[83].address : "")
1659
+ l[87].id + /*feature*/
1660
+ (l[87].address ? "," + /*feature*/
1661
+ l[87].address : "")
1662
1662
  );
1663
- for (let u = 0; u < s.length; u += 1) {
1664
- let h = si(i, s, u), a = c(h);
1665
- n.set(a, t[u] = ai(a, h));
1663
+ for (let l = 0; l < s.length; l += 1) {
1664
+ let d = ci(i, s, l), a = c(d);
1665
+ n.set(a, t[l] = hi(a, d));
1666
1666
  }
1667
1667
  return {
1668
1668
  c() {
1669
1669
  e = W("ul");
1670
- for (let u = 0; u < t.length; u += 1)
1671
- t[u].c();
1672
- y(e, "class", "svelte-1uvos7g");
1670
+ for (let l = 0; l < t.length; l += 1)
1671
+ t[l].c();
1672
+ p(e, "class", "options svelte-bz0zu3");
1673
1673
  },
1674
- m(u, h) {
1675
- F(u, e, h);
1674
+ m(l, d) {
1675
+ F(l, e, d);
1676
1676
  for (let a = 0; a < t.length; a += 1)
1677
1677
  t[a] && t[a].m(e, null);
1678
- r = !0, o || (l = [
1678
+ r = !0, o || (u = [
1679
1679
  J(
1680
1680
  e,
1681
1681
  "mouseleave",
1682
1682
  /*mouseleave_handler*/
1683
- i[72]
1683
+ i[75]
1684
1684
  ),
1685
1685
  J(
1686
1686
  e,
1687
1687
  "blur",
1688
1688
  /*blur_handler_1*/
1689
- i[73]
1689
+ i[76]
1690
1690
  )
1691
1691
  ], o = !0);
1692
1692
  },
1693
- p(u, h) {
1694
- h[0] & /*listFeatures, showPlaceType, selectedItemIndex, missingIconsCache, iconsBaseUrl, pick*/
1695
- 17880064 && (s = Kt(
1693
+ p(l, d) {
1694
+ d[0] & /*listFeatures, showPlaceType, selectedItemIndex, missingIconsCache, iconsBaseUrl, pick*/
1695
+ 17880064 && (s = ti(
1696
1696
  /*listFeatures*/
1697
- u[14]
1698
- ), ot(), t = kn(t, h, c, 1, u, s, n, e, Cn, ai, null, si), st());
1697
+ l[14]
1698
+ ), at(), t = Wn(t, d, c, 1, l, s, n, e, On, hi, null, ci), ct());
1699
1699
  },
1700
- i(u) {
1700
+ i(l) {
1701
1701
  if (!r) {
1702
- for (let h = 0; h < s.length; h += 1)
1703
- Z(t[h]);
1702
+ for (let d = 0; d < s.length; d += 1)
1703
+ Z(t[d]);
1704
1704
  r = !0;
1705
1705
  }
1706
1706
  },
1707
- o(u) {
1708
- for (let h = 0; h < t.length; h += 1)
1709
- V(t[h]);
1707
+ o(l) {
1708
+ for (let d = 0; d < t.length; d += 1)
1709
+ V(t[d]);
1710
1710
  r = !1;
1711
1711
  },
1712
- d(u) {
1713
- u && B(e);
1714
- for (let h = 0; h < t.length; h += 1)
1715
- t[h].d();
1716
- o = !1, ye(l);
1712
+ d(l) {
1713
+ l && z(e);
1714
+ for (let d = 0; d < t.length; d += 1)
1715
+ t[d].d();
1716
+ o = !1, ye(u);
1717
1717
  }
1718
1718
  };
1719
1719
  }
1720
- function hr(i) {
1721
- let e, t, n, r, o, l;
1722
- return t = new Ri({}), {
1720
+ function wr(i) {
1721
+ let e, t, n, r, o, u;
1722
+ return t = new zi({}), {
1723
1723
  c() {
1724
- e = W("div"), Ee(t.$$.fragment), n = te(), r = W("div"), o = _e(
1724
+ e = W("div"), Se(t.$$.fragment), n = te(), r = W("div"), o = Le(
1725
1725
  /*noResultsMessage*/
1726
1726
  i[7]
1727
- ), y(r, "class", "svelte-1uvos7g"), y(e, "class", "no-results svelte-1uvos7g");
1727
+ ), p(r, "class", "svelte-bz0zu3"), p(e, "class", "no-results svelte-bz0zu3");
1728
1728
  },
1729
1729
  m(s, c) {
1730
- F(s, e, c), me(t, e, null), T(e, n), T(e, r), T(r, o), l = !0;
1730
+ F(s, e, c), me(t, e, null), P(e, n), P(e, r), P(r, o), u = !0;
1731
1731
  },
1732
1732
  p(s, c) {
1733
- (!l || c[0] & /*noResultsMessage*/
1734
- 128) && Ge(
1733
+ (!u || c[0] & /*noResultsMessage*/
1734
+ 128) && Qe(
1735
1735
  o,
1736
1736
  /*noResultsMessage*/
1737
1737
  s[7]
1738
1738
  );
1739
1739
  },
1740
1740
  i(s) {
1741
- l || (Z(t.$$.fragment, s), l = !0);
1741
+ u || (Z(t.$$.fragment, s), u = !0);
1742
1742
  },
1743
1743
  o(s) {
1744
- V(t.$$.fragment, s), l = !1;
1744
+ V(t.$$.fragment, s), u = !1;
1745
1745
  },
1746
1746
  d(s) {
1747
- s && B(e), ge(t);
1747
+ s && z(e), ge(t);
1748
1748
  }
1749
1749
  };
1750
1750
  }
1751
- function mr(i) {
1751
+ function _r(i) {
1752
1752
  let e = "", t;
1753
1753
  return {
1754
1754
  c() {
1755
- t = _e(e);
1755
+ t = Le(e);
1756
1756
  },
1757
1757
  m(n, r) {
1758
1758
  F(n, t, r);
@@ -1761,71 +1761,71 @@ function mr(i) {
1761
1761
  i: A,
1762
1762
  o: A,
1763
1763
  d(n) {
1764
- n && B(t);
1764
+ n && z(t);
1765
1765
  }
1766
1766
  };
1767
1767
  }
1768
- function gr(i) {
1769
- let e, t, n, r, o, l, s, c, u, h, a;
1770
- return t = new Ri({}), c = new Ti({}), {
1768
+ function Er(i) {
1769
+ let e, t, n, r, o, u, s, c, l, d, a;
1770
+ return t = new zi({}), c = new Ai({}), {
1771
1771
  c() {
1772
- e = W("div"), Ee(t.$$.fragment), n = te(), r = W("div"), o = _e(
1772
+ e = W("div"), Se(t.$$.fragment), n = te(), r = W("div"), o = Le(
1773
1773
  /*errorMessage*/
1774
1774
  i[6]
1775
- ), l = te(), s = W("button"), Ee(c.$$.fragment), y(r, "class", "svelte-1uvos7g"), y(s, "class", "svelte-1uvos7g"), y(e, "class", "error svelte-1uvos7g");
1775
+ ), u = te(), s = W("button"), Se(c.$$.fragment), p(r, "class", "svelte-bz0zu3"), p(s, "class", "svelte-bz0zu3"), p(e, "class", "error svelte-bz0zu3");
1776
1776
  },
1777
- m(f, d) {
1778
- F(f, e, d), me(t, e, null), T(e, n), T(e, r), T(r, o), T(e, l), T(e, s), me(c, s, null), u = !0, h || (a = J(
1777
+ m(f, h) {
1778
+ F(f, e, h), me(t, e, null), P(e, n), P(e, r), P(r, o), P(e, u), P(e, s), me(c, s, null), l = !0, d || (a = J(
1779
1779
  s,
1780
1780
  "click",
1781
1781
  /*click_handler_3*/
1782
- i[69]
1783
- ), h = !0);
1782
+ i[72]
1783
+ ), d = !0);
1784
1784
  },
1785
- p(f, d) {
1786
- (!u || d[0] & /*errorMessage*/
1787
- 64) && Ge(
1785
+ p(f, h) {
1786
+ (!l || h[0] & /*errorMessage*/
1787
+ 64) && Qe(
1788
1788
  o,
1789
1789
  /*errorMessage*/
1790
1790
  f[6]
1791
1791
  );
1792
1792
  },
1793
1793
  i(f) {
1794
- u || (Z(t.$$.fragment, f), Z(c.$$.fragment, f), u = !0);
1794
+ l || (Z(t.$$.fragment, f), Z(c.$$.fragment, f), l = !0);
1795
1795
  },
1796
1796
  o(f) {
1797
- V(t.$$.fragment, f), V(c.$$.fragment, f), u = !1;
1797
+ V(t.$$.fragment, f), V(c.$$.fragment, f), l = !1;
1798
1798
  },
1799
1799
  d(f) {
1800
- f && B(e), ge(t), ge(c), h = !1, a();
1800
+ f && z(e), ge(t), ge(c), d = !1, a();
1801
1801
  }
1802
1802
  };
1803
1803
  }
1804
- function ai(i, e) {
1804
+ function hi(i, e) {
1805
1805
  let t, n, r;
1806
1806
  function o() {
1807
1807
  return (
1808
1808
  /*mouseenter_handler*/
1809
- e[70](
1809
+ e[73](
1810
1810
  /*i*/
1811
- e[85]
1811
+ e[89]
1812
1812
  )
1813
1813
  );
1814
1814
  }
1815
- function l() {
1815
+ function u() {
1816
1816
  return (
1817
1817
  /*focus_handler_1*/
1818
- e[71](
1818
+ e[74](
1819
1819
  /*feature*/
1820
- e[83]
1820
+ e[87]
1821
1821
  )
1822
1822
  );
1823
1823
  }
1824
- return n = new jn({
1824
+ return n = new Xn({
1825
1825
  props: {
1826
1826
  feature: (
1827
1827
  /*feature*/
1828
- e[83]
1828
+ e[87]
1829
1829
  ),
1830
1830
  showPlaceType: (
1831
1831
  /*showPlaceType*/
@@ -1834,7 +1834,7 @@ function ai(i, e) {
1834
1834
  selected: (
1835
1835
  /*selectedItemIndex*/
1836
1836
  e[15] === /*i*/
1837
- e[85]
1837
+ e[89]
1838
1838
  ),
1839
1839
  missingIconsCache: (
1840
1840
  /*missingIconsCache*/
@@ -1845,28 +1845,28 @@ function ai(i, e) {
1845
1845
  e[12]
1846
1846
  )
1847
1847
  }
1848
- }), n.$on("mouseenter", o), n.$on("focus", l), {
1848
+ }), n.$on("mouseenter", o), n.$on("focus", u), {
1849
1849
  key: i,
1850
1850
  first: null,
1851
1851
  c() {
1852
- t = pn(), Ee(n.$$.fragment), this.first = t;
1852
+ t = Sn(), Se(n.$$.fragment), this.first = t;
1853
1853
  },
1854
1854
  m(s, c) {
1855
1855
  F(s, t, c), me(n, s, c), r = !0;
1856
1856
  },
1857
1857
  p(s, c) {
1858
1858
  e = s;
1859
- const u = {};
1859
+ const l = {};
1860
1860
  c[0] & /*listFeatures*/
1861
- 16384 && (u.feature = /*feature*/
1862
- e[83]), c[0] & /*showPlaceType*/
1863
- 1024 && (u.showPlaceType = /*showPlaceType*/
1861
+ 16384 && (l.feature = /*feature*/
1862
+ e[87]), c[0] & /*showPlaceType*/
1863
+ 1024 && (l.showPlaceType = /*showPlaceType*/
1864
1864
  e[10]), c[0] & /*selectedItemIndex, listFeatures*/
1865
- 49152 && (u.selected = /*selectedItemIndex*/
1865
+ 49152 && (l.selected = /*selectedItemIndex*/
1866
1866
  e[15] === /*i*/
1867
- e[85]), c[0] & /*iconsBaseUrl*/
1868
- 4096 && (u.iconsBaseUrl = /*iconsBaseUrl*/
1869
- e[12]), n.$set(u);
1867
+ e[89]), c[0] & /*iconsBaseUrl*/
1868
+ 4096 && (l.iconsBaseUrl = /*iconsBaseUrl*/
1869
+ e[12]), n.$set(l);
1870
1870
  },
1871
1871
  i(s) {
1872
1872
  r || (Z(n.$$.fragment, s), r = !0);
@@ -1875,32 +1875,32 @@ function ai(i, e) {
1875
1875
  V(n.$$.fragment, s), r = !1;
1876
1876
  },
1877
1877
  d(s) {
1878
- s && B(t), ge(n, s);
1878
+ s && z(t), ge(n, s);
1879
1879
  }
1880
1880
  };
1881
1881
  }
1882
- function yr(i) {
1883
- let e, t, n, r, o, l, s, c, u, h, a, f, d, g, p, v, b, S, E, _, C, x = !1;
1884
- o = new Jn({}), a = new Ti({});
1885
- let L = (
1882
+ function Lr(i) {
1883
+ let e, t, n, r, o, u, s, c, l, d, a, f, h, g, y, v, b, E, L, _, C, x = !1;
1884
+ o = new or({}), a = new Ai({});
1885
+ let S = (
1886
1886
  /*abortController*/
1887
- i[19] && li()
1887
+ i[19] && fi()
1888
1888
  ), w = (
1889
1889
  /*enableReverse*/
1890
- i[5] === !0 && ui(i)
1890
+ i[5] === !0 && di(i)
1891
1891
  );
1892
1892
  const k = (
1893
1893
  /*#slots*/
1894
- i[60].default
1895
- ), I = hn(
1894
+ i[63].default
1895
+ ), I = wn(
1896
1896
  k,
1897
1897
  i,
1898
1898
  /*$$scope*/
1899
- i[59],
1899
+ i[62],
1900
1900
  null
1901
- ), D = [gr, mr, hr, dr], z = [];
1901
+ ), B = [Er, _r, wr, vr], U = [];
1902
1902
  function O(M, G) {
1903
- var $, oe;
1903
+ var $, pe;
1904
1904
  return (
1905
1905
  /*error*/
1906
1906
  M[18] ? 0 : (
@@ -1910,38 +1910,38 @@ function yr(i) {
1910
1910
  (($ = M[14]) == null ? void 0 : $.length) === 0 ? 2 : (
1911
1911
  /*focusedDelayed*/
1912
1912
  M[16] && /*listFeatures*/
1913
- ((oe = M[14]) != null && oe.length) ? 3 : -1
1913
+ ((pe = M[14]) != null && pe.length) ? 3 : -1
1914
1914
  )
1915
1915
  ) : 1
1916
1916
  )
1917
1917
  );
1918
1918
  }
1919
- return ~(v = O(i)) && (b = z[v] = D[v](i)), {
1919
+ return ~(v = O(i)) && (b = U[v] = B[v](i)), {
1920
1920
  c() {
1921
- e = te(), t = W("form"), n = W("div"), r = W("button"), Ee(o.$$.fragment), l = te(), s = W("input"), c = te(), u = W("div"), h = W("button"), Ee(a.$$.fragment), f = te(), L && L.c(), d = te(), w && w.c(), g = te(), I && I.c(), p = te(), b && b.c(), y(r, "class", "search-button svelte-1uvos7g"), y(r, "type", "button"), y(
1921
+ e = te(), t = W("form"), n = W("div"), r = W("button"), Se(o.$$.fragment), u = te(), s = W("input"), c = te(), l = W("div"), d = W("button"), Se(a.$$.fragment), f = te(), S && S.c(), h = te(), w && w.c(), g = te(), I && I.c(), y = te(), b && b.c(), p(r, "class", "search-button svelte-bz0zu3"), p(r, "type", "button"), p(
1922
1922
  s,
1923
1923
  "placeholder",
1924
1924
  /*placeholder*/
1925
1925
  i[8]
1926
- ), y(
1926
+ ), p(
1927
1927
  s,
1928
1928
  "aria-label",
1929
1929
  /*placeholder*/
1930
1930
  i[8]
1931
- ), y(s, "class", "svelte-1uvos7g"), y(h, "type", "button"), y(
1932
- h,
1931
+ ), p(s, "class", "svelte-bz0zu3"), p(d, "type", "button"), p(
1932
+ d,
1933
1933
  "title",
1934
1934
  /*clearButtonTitle*/
1935
1935
  i[3]
1936
- ), y(h, "class", "svelte-1uvos7g"), y(u, "class", "clear-button-container svelte-1uvos7g"), re(
1937
- u,
1936
+ ), p(d, "class", "svelte-bz0zu3"), p(l, "class", "clear-button-container svelte-bz0zu3"), se(
1937
+ l,
1938
1938
  "displayable",
1939
1939
  /*searchValue*/
1940
1940
  i[1] !== ""
1941
- ), y(n, "class", "input-group svelte-1uvos7g"), y(t, "tabindex", "0"), y(t, "class", S = Ht(
1941
+ ), p(n, "class", "input-group svelte-bz0zu3"), p(t, "tabindex", "0"), p(t, "class", E = Kt(
1942
1942
  /*className*/
1943
1943
  i[2]
1944
- ) + " svelte-1uvos7g"), re(
1944
+ ) + " svelte-bz0zu3"), se(
1945
1945
  t,
1946
1946
  "can-collapse",
1947
1947
  /*collapsed*/
@@ -1950,34 +1950,34 @@ function yr(i) {
1950
1950
  );
1951
1951
  },
1952
1952
  m(M, G) {
1953
- F(M, e, G), F(M, t, G), T(t, n), T(n, r), me(o, r, null), T(n, l), T(n, s), i[62](s), Vt(
1953
+ F(M, e, G), F(M, t, G), P(t, n), P(n, r), me(o, r, null), P(n, u), P(n, s), i[65](s), Jt(
1954
1954
  s,
1955
1955
  /*searchValue*/
1956
1956
  i[1]
1957
- ), T(n, c), T(n, u), T(u, h), me(a, h, null), T(u, f), L && L.m(u, null), T(n, d), w && w.m(n, null), T(n, g), I && I.m(n, null), T(t, p), ~v && z[v].m(t, null), E = !0, _ || (C = [
1957
+ ), P(n, c), P(n, l), P(l, d), me(a, d, null), P(l, f), S && S.m(l, null), P(n, h), w && w.m(n, null), P(n, g), I && I.m(n, null), P(t, y), ~v && U[v].m(t, null), L = !0, _ || (C = [
1958
1958
  J(
1959
1959
  r,
1960
1960
  "click",
1961
1961
  /*click_handler*/
1962
- i[61]
1962
+ i[64]
1963
1963
  ),
1964
1964
  J(
1965
1965
  s,
1966
1966
  "input",
1967
1967
  /*input_1_input_handler*/
1968
- i[63]
1968
+ i[66]
1969
1969
  ),
1970
1970
  J(
1971
1971
  s,
1972
1972
  "focus",
1973
1973
  /*focus_handler*/
1974
- i[64]
1974
+ i[67]
1975
1975
  ),
1976
1976
  J(
1977
1977
  s,
1978
1978
  "blur",
1979
1979
  /*blur_handler*/
1980
- i[65]
1980
+ i[68]
1981
1981
  ),
1982
1982
  J(
1983
1983
  s,
@@ -1989,87 +1989,87 @@ function yr(i) {
1989
1989
  s,
1990
1990
  "input",
1991
1991
  /*input_handler*/
1992
- i[66]
1992
+ i[69]
1993
1993
  ),
1994
1994
  J(
1995
- h,
1995
+ d,
1996
1996
  "click",
1997
1997
  /*click_handler_1*/
1998
- i[67]
1998
+ i[70]
1999
1999
  ),
2000
- J(t, "submit", vn(
2001
- /*handleOnSubmit*/
2000
+ J(t, "submit", xn(
2001
+ /*handleSubmit*/
2002
2002
  i[21]
2003
2003
  ))
2004
2004
  ], _ = !0);
2005
2005
  },
2006
2006
  p(M, G) {
2007
- (!E || G[0] & /*placeholder*/
2008
- 256) && y(
2007
+ (!L || G[0] & /*placeholder*/
2008
+ 256) && p(
2009
2009
  s,
2010
2010
  "placeholder",
2011
2011
  /*placeholder*/
2012
2012
  M[8]
2013
- ), (!E || G[0] & /*placeholder*/
2014
- 256) && y(
2013
+ ), (!L || G[0] & /*placeholder*/
2014
+ 256) && p(
2015
2015
  s,
2016
2016
  "aria-label",
2017
2017
  /*placeholder*/
2018
2018
  M[8]
2019
2019
  ), G[0] & /*searchValue*/
2020
2020
  2 && s.value !== /*searchValue*/
2021
- M[1] && Vt(
2021
+ M[1] && Jt(
2022
2022
  s,
2023
2023
  /*searchValue*/
2024
2024
  M[1]
2025
- ), (!E || G[0] & /*clearButtonTitle*/
2026
- 8) && y(
2027
- h,
2025
+ ), (!L || G[0] & /*clearButtonTitle*/
2026
+ 8) && p(
2027
+ d,
2028
2028
  "title",
2029
2029
  /*clearButtonTitle*/
2030
2030
  M[3]
2031
2031
  ), /*abortController*/
2032
- M[19] ? L ? G[0] & /*abortController*/
2033
- 524288 && Z(L, 1) : (L = li(), L.c(), Z(L, 1), L.m(u, null)) : L && (ot(), V(L, 1, 1, () => {
2034
- L = null;
2035
- }), st()), (!E || G[0] & /*searchValue*/
2036
- 2) && re(
2037
- u,
2032
+ M[19] ? S ? G[0] & /*abortController*/
2033
+ 524288 && Z(S, 1) : (S = fi(), S.c(), Z(S, 1), S.m(l, null)) : S && (at(), V(S, 1, 1, () => {
2034
+ S = null;
2035
+ }), ct()), (!L || G[0] & /*searchValue*/
2036
+ 2) && se(
2037
+ l,
2038
2038
  "displayable",
2039
2039
  /*searchValue*/
2040
2040
  M[1] !== ""
2041
2041
  ), /*enableReverse*/
2042
2042
  M[5] === !0 ? w ? (w.p(M, G), G[0] & /*enableReverse*/
2043
- 32 && Z(w, 1)) : (w = ui(M), w.c(), Z(w, 1), w.m(n, g)) : w && (ot(), V(w, 1, 1, () => {
2043
+ 32 && Z(w, 1)) : (w = di(M), w.c(), Z(w, 1), w.m(n, g)) : w && (at(), V(w, 1, 1, () => {
2044
2044
  w = null;
2045
- }), st()), I && I.p && (!E || G[1] & /*$$scope*/
2046
- 268435456) && gn(
2045
+ }), ct()), I && I.p && (!L || G[2] & /*$$scope*/
2046
+ 1) && En(
2047
2047
  I,
2048
2048
  k,
2049
2049
  M,
2050
2050
  /*$$scope*/
2051
- M[59],
2052
- E ? mn(
2051
+ M[62],
2052
+ L ? _n(
2053
2053
  k,
2054
2054
  /*$$scope*/
2055
- M[59],
2055
+ M[62],
2056
2056
  G,
2057
2057
  null
2058
- ) : yn(
2058
+ ) : Ln(
2059
2059
  /*$$scope*/
2060
- M[59]
2060
+ M[62]
2061
2061
  ),
2062
2062
  null
2063
2063
  );
2064
2064
  let $ = v;
2065
- v = O(M), v === $ ? ~v && z[v].p(M, G) : (b && (ot(), V(z[$], 1, 1, () => {
2066
- z[$] = null;
2067
- }), st()), ~v ? (b = z[v], b ? b.p(M, G) : (b = z[v] = D[v](M), b.c()), Z(b, 1), b.m(t, null)) : b = null), (!E || G[0] & /*className*/
2068
- 4 && S !== (S = Ht(
2065
+ v = O(M), v === $ ? ~v && U[v].p(M, G) : (b && (at(), V(U[$], 1, 1, () => {
2066
+ U[$] = null;
2067
+ }), ct()), ~v ? (b = U[v], b ? b.p(M, G) : (b = U[v] = B[v](M), b.c()), Z(b, 1), b.m(t, null)) : b = null), (!L || G[0] & /*className*/
2068
+ 4 && E !== (E = Kt(
2069
2069
  /*className*/
2070
2070
  M[2]
2071
- ) + " svelte-1uvos7g")) && y(t, "class", S), (!E || G[0] & /*className, collapsed, searchValue*/
2072
- 22) && re(
2071
+ ) + " svelte-bz0zu3")) && p(t, "class", E), (!L || G[0] & /*className, collapsed, searchValue*/
2072
+ 22) && se(
2073
2073
  t,
2074
2074
  "can-collapse",
2075
2075
  /*collapsed*/
@@ -2078,19 +2078,19 @@ function yr(i) {
2078
2078
  );
2079
2079
  },
2080
2080
  i(M) {
2081
- E || (Z(x), Z(o.$$.fragment, M), Z(a.$$.fragment, M), Z(L), Z(w), Z(I, M), Z(b), E = !0);
2081
+ L || (Z(x), Z(o.$$.fragment, M), Z(a.$$.fragment, M), Z(S), Z(w), Z(I, M), Z(b), L = !0);
2082
2082
  },
2083
2083
  o(M) {
2084
- V(x), V(o.$$.fragment, M), V(a.$$.fragment, M), V(L), V(w), V(I, M), V(b), E = !1;
2084
+ V(x), V(o.$$.fragment, M), V(a.$$.fragment, M), V(S), V(w), V(I, M), V(b), L = !1;
2085
2085
  },
2086
2086
  d(M) {
2087
- M && (B(e), B(t)), ge(o), i[62](null), ge(a), L && L.d(), w && w.d(), I && I.d(M), ~v && z[v].d(), _ = !1, ye(C);
2087
+ M && (z(e), z(t)), ge(o), i[65](null), ge(a), S && S.d(), w && w.d(), I && I.d(M), ~v && U[v].d(), _ = !1, ye(C);
2088
2088
  }
2089
2089
  };
2090
2090
  }
2091
- function pr(i, e, t) {
2091
+ function Sr(i, e, t) {
2092
2092
  let n, { $$slots: r = {}, $$scope: o } = e;
2093
- const l = {
2093
+ const u = {
2094
2094
  continental_marine: 4,
2095
2095
  country: 4,
2096
2096
  major_landform: 8,
@@ -2114,308 +2114,325 @@ function pr(i, e, t) {
2114
2114
  "poi.restaurant": 18,
2115
2115
  "poi.aerodrome": 13
2116
2116
  };
2117
- let { class: s = void 0 } = e, { apiKey: c } = e, { bbox: u = void 0 } = e, { clearButtonTitle: h = "clear" } = e, { clearOnBlur: a = !1 } = e, { collapsed: f = !1 } = e, { country: d = void 0 } = e, { debounceSearch: g = 200 } = e, { enableReverse: p = !1 } = e, { errorMessage: v = "Something went wrong…" } = e, { filter: b = () => !0 } = e, { flyTo: S = !0 } = e, { fuzzyMatch: E = !0 } = e, { language: _ = void 0 } = e, { limit: C = void 0 } = e, { mapController: x = void 0 } = e, { minLength: L = 2 } = e, { noResultsMessage: w = "Oops! Looks like you're trying to predict something that's not quite right. We can't seem to find what you're looking for. Maybe try double-checking your spelling or try a different search term. Keep on typing - we'll do our best to get you where you need to go!" } = e, { placeholder: k = "Search" } = e, { proximity: I = [{ type: "server-geolocation" }] } = e, { reverseActive: D = p === "always" } = e, { reverseButtonTitle: z = "toggle reverse geocoding" } = e, { searchValue: O = "" } = e, { showFullGeometry: M = !0 } = e, { showPlaceType: G = "ifNeeded" } = e, { showResultsWhileTyping: $ = !0 } = e, { selectFirst: oe = !0 } = e, { flyToSelected: ct = !1 } = e, { markerOnSelected: Ye = !0 } = e, { types: Xe = void 0 } = e, { excludeTypes: Ke = !1 } = e, { zoom: Pe = l } = e, { maxZoom: Je = void 0 } = e, { apiUrl: ft = "https://api.maptiler.com/geocoding" } = e, { fetchParameters: dt = {} } = e, { iconsBaseUrl: Ft = "https://cdn.maptiler.com/maptiler-geocoding-control/v1.4.2-dev.2/icons/" } = e, { adjustUrlQuery: ht = () => {
2117
+ let { class: s = void 0 } = e, { apiKey: c } = e, { bbox: l = void 0 } = e, { clearButtonTitle: d = "clear" } = e, { clearOnBlur: a = !1 } = e, { collapsed: f = !1 } = e, { country: h = void 0 } = e, { debounceSearch: g = 200 } = e, { enableReverse: y = !1 } = e, { errorMessage: v = "Something went wrong…" } = e, { filter: b = () => !0 } = e, { flyTo: E = !0 } = e, { fuzzyMatch: L = !0 } = e, { language: _ = void 0 } = e, { limit: C = void 0 } = e, { mapController: x = void 0 } = e, { minLength: S = 2 } = e, { noResultsMessage: w = "Oops! Looks like you're trying to predict something that's not quite right. We can't seem to find what you're looking for. Maybe try double-checking your spelling or try a different search term. Keep on typing - we'll do our best to get you where you need to go!" } = e, { placeholder: k = "Search" } = e, { proximity: I = [{ type: "server-geolocation" }] } = e, { reverseActive: B = y === "always" } = e, { reverseButtonTitle: U = "toggle reverse geocoding" } = e, { searchValue: O = "" } = e, { showFullGeometry: M = !0 } = e, { showPlaceType: G = "if-needed" } = e, { showResultsWhileTyping: $ = !0 } = e, { autocompleteTimeout: pe = void 0 } = e, { selectFirst: Ie = !0 } = e, { flyToSelected: mt = !1 } = e, { markerOnSelected: $e = !0 } = e, { types: Ne = void 0 } = e, { exhaustiveReverseGeocoding: gt = !1 } = e, { excludeTypes: et = !1 } = e, { zoom: Oe = u } = e, { maxZoom: tt = void 0 } = e, { apiUrl: yt = "https://api.maptiler.com/geocoding" } = e, { fetchParameters: pt = {} } = e, { iconsBaseUrl: Zt = "https://cdn.maptiler.com/maptiler-geocoding-control/v2.0.0-rc.1/icons/" } = e, { adjustUrlQuery: bt = () => {
2118
2118
  } } = e;
2119
- function zi() {
2120
- ae.focus();
2119
+ function Hi() {
2120
+ fe.focus();
2121
2121
  }
2122
- function Gi() {
2123
- ae.blur();
2122
+ function Vi() {
2123
+ fe.blur();
2124
2124
  }
2125
- function zt(m, j = !0, H = !1) {
2126
- t(1, O = m), j ? (t(15, U = -1), jt()) : (pt(!H, H), setTimeout(() => {
2127
- ae.focus(), ae.select();
2125
+ function qt(m, j = !0, Q = !1) {
2126
+ t(1, O = m), j ? (t(15, D = -1), Ht()) : (_t(!Q, Q), setTimeout(() => {
2127
+ fe.focus(), fe.select();
2128
2128
  }));
2129
2129
  }
2130
- function ji() {
2131
- t(14, R = void 0), t(56, N = void 0), t(15, U = -1);
2130
+ function Yi() {
2131
+ t(14, R = void 0), t(58, N = void 0), t(15, D = -1);
2132
+ }
2133
+ function Xi() {
2134
+ t(57, q = []), t(58, N = void 0);
2132
2135
  }
2133
- function Zi() {
2134
- t(55, q = []), t(56, N = void 0);
2136
+ let We = !1, R, q, N, Qt = "", fe, D = -1, de, it = [], Te, be, ie, nt, vt;
2137
+ const Ki = /* @__PURE__ */ new Set(), ve = Nn();
2138
+ function Ji() {
2139
+ return !!ie;
2135
2140
  }
2136
- let Te = !1, R, q, N, Gt = "", ae, U = -1, ce, $e = [], Ce, Re, et, mt;
2137
- const qi = /* @__PURE__ */ new Set(), pe = En();
2138
- _n(() => {
2141
+ kn(() => {
2139
2142
  x && (x.setEventHandler(void 0), x.indicateReverse(!1), x.setSelectedMarker(-1), x.setMarkers(void 0, void 0));
2140
2143
  });
2141
- function jt(m) {
2142
- if (Re && (clearTimeout(Re), Re = void 0), U > -1 && R)
2143
- t(56, N = R[U]), t(1, O = N.place_type[0] === "reverse" ? N.place_name : N.place_name.replace(/,.*/, "")), t(18, ce = void 0), t(55, q = void 0), t(15, U = -1);
2144
+ function Ht(m) {
2145
+ if (be && (window.clearTimeout(be), be = void 0), ie) {
2146
+ window.clearTimeout(ie), t(59, ie = void 0), Fe(O, { exact: !0 });
2147
+ return;
2148
+ }
2149
+ if (D > -1 && R)
2150
+ t(58, N = R[D]), t(1, O = N.place_type[0] === "reverse" ? N.place_name : N.place_name.replace(/,.*/, "")), t(18, de = void 0), t(57, q = void 0), t(15, D = -1);
2144
2151
  else if (O) {
2145
- const j = m || !gt(O);
2146
- yt(O, { exact: !0 }).then(() => {
2147
- t(55, q = R), t(56, N = void 0), j && Qi();
2148
- }).catch((H) => t(18, ce = H));
2152
+ const j = m || !wt(O);
2153
+ Fe(O, { exact: !0 }).then(() => {
2154
+ t(57, q = R), t(58, N = void 0), j && $i();
2155
+ }).catch((Q) => t(18, de = Q));
2149
2156
  }
2150
2157
  }
2151
- function gt(m) {
2158
+ function wt(m) {
2152
2159
  try {
2153
- return fr(m, 6);
2160
+ return br(m, 6);
2154
2161
  } catch {
2155
2162
  return !1;
2156
2163
  }
2157
2164
  }
2158
- async function yt(m, { byId: j = !1, exact: H = !1 } = {}) {
2159
- t(18, ce = void 0), Ce == null || Ce.abort();
2165
+ async function Fe(m, { byId: j = !1, exact: Q = !1, appendSpace: ne = !1 } = {}) {
2166
+ t(18, de = void 0), Te == null || Te.abort();
2160
2167
  const ee = new AbortController();
2161
- t(19, Ce = ee);
2168
+ t(19, Te = ee);
2162
2169
  try {
2163
- const P = gt(m), Q = new URLSearchParams();
2164
- if (_ !== void 0 && Q.set("language", Array.isArray(_) ? _.join(",") : _ ?? ""), Xe && Q.set("types", Xe.join(",")), Ke && Q.set("excludeTypes", String(Ke)), u && Q.set("bbox", u.map((tt) => tt.toFixed(6)).join(",")), d && Q.set("country", Array.isArray(d) ? d.join(",") : d), !j && !P) {
2165
- const tt = await er(x, I, ee);
2166
- tt && Q.set("proximity", tt), (H || !$) && Q.set("autocomplete", "false"), Q.set("fuzzyMatch", String(E));
2170
+ const T = wt(m), H = new URLSearchParams();
2171
+ if (_ !== void 0 && H.set("language", Array.isArray(_) ? _.join(",") : _ ?? ""), Ne && H.set("types", Ne.join(",")), et && H.set("excludeTypes", String(et)), l && H.set("bbox", l.map((ot) => ot.toFixed(6)).join(",")), h && H.set("country", Array.isArray(h) ? h.join(",") : h), !j && !T) {
2172
+ const ot = await lr(x, I, ee);
2173
+ ot && H.set("proximity", ot), (Q || !$) && H.set("autocomplete", "false"), H.set("fuzzyMatch", String(L));
2167
2174
  }
2168
- C !== void 0 && Q.set("limit", String(C)), Q.set("key", c), ht(Q);
2169
- const fe = ft + "/" + encodeURIComponent(P ? P.decimalLongitude + "," + P.decimalLatitude : m) + ".json?" + Q.toString();
2170
- if (fe === Gt) {
2171
- j ? (t(14, R = void 0), t(56, N = $e[0])) : t(14, R = $e);
2175
+ C !== void 0 && (gt || !T || (Ne == null ? void 0 : Ne.length) === 1) && H.set("limit", String(C)), H.set("key", c), bt(H);
2176
+ const rt = yt + "/" + encodeURIComponent(T ? T.decimalLongitude + "," + T.decimalLatitude : m + (ne ? " " : "")) + ".json?" + H.toString();
2177
+ if (rt === Qt) {
2178
+ j ? (t(14, R = void 0), t(58, N = it[0])) : t(14, R = it);
2172
2179
  return;
2173
2180
  }
2174
- Gt = fe;
2175
- const bt = await fetch(fe, { signal: ee.signal, ...dt });
2176
- if (!bt.ok)
2177
- throw new Error(await bt.text());
2178
- const wt = await bt.json();
2179
- pe("response", { url: fe, featureCollection: wt }), j ? (t(14, R = void 0), t(56, N = wt.features[0]), $e = [N]) : (t(14, R = wt.features.filter(b)), P && R.unshift({
2181
+ Qt = rt;
2182
+ const Lt = await fetch(rt, { signal: ee.signal, ...pt });
2183
+ if (!Lt.ok)
2184
+ throw new Error(await Lt.text());
2185
+ const St = await Lt.json();
2186
+ ve("response", { url: rt, featureCollection: St }), j ? (t(14, R = void 0), t(58, N = St.features[0]), it = [N]) : (t(14, R = St.features.filter(b)), T && R.unshift({
2180
2187
  type: "Feature",
2181
2188
  properties: {},
2182
- id: "reverse_" + P.decimalLongitude + "_" + P.decimalLatitude,
2183
- text: P.decimalLatitude + ", " + P.decimalLongitude,
2184
- place_name: P.decimalLatitude + ", " + P.decimalLongitude,
2189
+ id: "reverse_" + T.decimalLongitude + "_" + T.decimalLatitude,
2190
+ text: T.decimalLatitude + ", " + T.decimalLongitude,
2191
+ place_name: T.decimalLatitude + ", " + T.decimalLongitude,
2185
2192
  place_type: ["reverse"],
2186
- center: [P.decimalLongitude, P.decimalLatitude],
2193
+ center: [T.decimalLongitude, T.decimalLatitude],
2187
2194
  bbox: [
2188
- P.decimalLongitude,
2189
- P.decimalLatitude,
2190
- P.decimalLongitude,
2191
- P.decimalLatitude
2195
+ T.decimalLongitude,
2196
+ T.decimalLatitude,
2197
+ T.decimalLongitude,
2198
+ T.decimalLatitude
2192
2199
  ],
2193
2200
  geometry: {
2194
2201
  type: "Point",
2195
- coordinates: [P.decimalLongitude, P.decimalLatitude]
2202
+ coordinates: [T.decimalLongitude, T.decimalLatitude]
2196
2203
  }
2197
- }), $e = R, P && ae.focus());
2198
- } catch (P) {
2199
- if (P && typeof P == "object" && "name" in P && P.name === "AbortError")
2204
+ }), it = R, T && fe.focus());
2205
+ } catch (T) {
2206
+ if (T && typeof T == "object" && "name" in T && T.name === "AbortError")
2200
2207
  return;
2201
- throw P;
2208
+ throw T;
2202
2209
  } finally {
2203
- ee === Ce && t(19, Ce = void 0);
2210
+ ee === Te && t(19, Te = void 0);
2204
2211
  }
2205
2212
  }
2206
- function Qi() {
2207
- var ee;
2208
- if (!(q != null && q.length) || !S)
2213
+ function $i() {
2214
+ var ne;
2215
+ if (!(q != null && q.length) || !E)
2209
2216
  return;
2210
- const m = [180, 90, -180, -90], j = !q.some((P) => !P.matching_text);
2211
- let H;
2212
- for (const P of q) {
2213
- const Q = Be(P);
2214
- if (H = Je ?? (H === void 0 ? Q : Q === void 0 ? H : Math.max(H, Q)), j || !P.matching_text)
2215
- for (const fe of [0, 1, 2, 3])
2216
- m[fe] = Math[fe < 2 ? "min" : "max"](m[fe], ((ee = P.bbox) == null ? void 0 : ee[fe]) ?? P.center[fe % 2]);
2217
+ const m = [180, 90, -180, -90], j = !q.some((ee) => !ee.matching_text);
2218
+ let Q;
2219
+ for (const ee of q) {
2220
+ const T = Ue(ee);
2221
+ if (Q = tt ?? (Q === void 0 ? T : T === void 0 ? Q : Math.max(Q, T)), j || !ee.matching_text)
2222
+ for (const H of [0, 1, 2, 3])
2223
+ m[H] = Math[H < 2 ? "min" : "max"](m[H], ((ne = ee.bbox) == null ? void 0 : ne[H]) ?? ee.center[H % 2]);
2217
2224
  }
2218
- x && q.length > 0 && (N && m[0] === m[2] && m[1] === m[3] ? x.flyTo(N.center, Be(N)) : x.fitBounds(Ze(m), 50, H));
2225
+ x && q.length > 0 && (N && m[0] === m[2] && m[1] === m[3] ? x.flyTo(N.center, Ue(N)) : x.fitBounds(Ve(m), 50, Q));
2219
2226
  }
2220
- function Be(m) {
2221
- var H;
2227
+ function Ue(m) {
2228
+ var Q;
2222
2229
  if (!m.bbox || m.bbox[0] !== m.bbox[2] && m.bbox[1] !== m.bbox[3])
2223
2230
  return;
2224
- if (typeof Pe == "number")
2225
- return m.id.startsWith("poi.") || m.id.startsWith("address.") ? Je : Pe;
2231
+ if (typeof Oe == "number")
2232
+ return m.id.startsWith("poi.") || m.id.startsWith("address.") ? tt : Oe;
2226
2233
  const j = m.id.replace(/\..*/, "");
2227
- return (Array.isArray((H = m.properties) == null ? void 0 : H.categories) ? m.properties.categories.reduce(
2228
- (ee, P) => {
2229
- const Q = Pe[j + "." + P];
2230
- return ee === void 0 ? Q : Q === void 0 ? ee : Math.max(ee, Q);
2234
+ return (Array.isArray((Q = m.properties) == null ? void 0 : Q.categories) ? m.properties.categories.reduce(
2235
+ (ne, ee) => {
2236
+ const T = Oe[j + "." + ee];
2237
+ return ne === void 0 ? T : T === void 0 ? ne : Math.max(ne, T);
2231
2238
  },
2232
2239
  void 0
2233
- ) : void 0) ?? Pe[j];
2240
+ ) : void 0) ?? Oe[j];
2234
2241
  }
2235
- function Hi(m) {
2236
- t(0, D = p === "always"), t(14, R = void 0), t(56, N = void 0), t(15, U = -1), zt(m[1].toFixed(6) + ", " + $n(m[0], [-180, 180], !0).toFixed(6), !1, !0);
2242
+ function en(m) {
2243
+ t(0, B = y === "always"), t(14, R = void 0), t(58, N = void 0), t(15, D = -1), qt(m[1].toFixed(6) + ", " + sr(m[0], [-180, 180], !0).toFixed(6), !1, !0);
2237
2244
  }
2238
- function Vi(m) {
2245
+ function tn(m) {
2239
2246
  if (!R)
2240
2247
  return;
2241
2248
  let j = m.key === "ArrowDown" ? 1 : m.key === "ArrowUp" ? -1 : 0;
2242
- j && (U === (oe ? 0 : -1) && j === -1 && t(15, U = R.length), t(15, U += j), U >= R.length && t(15, U = -1), U < 0 && oe && t(15, U = 0), m.preventDefault());
2249
+ j && (D === (Ie ? 0 : -1) && j === -1 && t(15, D = R.length), t(15, D += j), D >= R.length && t(15, D = -1), D < 0 && Ie && t(15, D = 0), m.preventDefault());
2243
2250
  }
2244
- function pt(m = !0, j = !1) {
2245
- if (t(18, ce = void 0), $ || j) {
2246
- if (Re && clearTimeout(Re), O.length < L)
2247
- return;
2248
- const H = O;
2249
- Re = window.setTimeout(
2250
- () => {
2251
- yt(H).catch((ee) => t(18, ce = ee));
2252
- },
2253
- m ? g : 0
2254
- );
2255
- } else
2256
- t(14, R = void 0), t(18, ce = void 0);
2251
+ function _t(m = !0, j = !1) {
2252
+ if (t(18, de = void 0), be && (window.clearTimeout(be), be = void 0), ie && (window.clearTimeout(ie), t(59, ie = void 0)), !$ && !j || O.length < S) {
2253
+ t(14, R = void 0);
2254
+ return;
2255
+ }
2256
+ const Q = O;
2257
+ be = window.setTimeout(
2258
+ () => {
2259
+ be = void 0, Fe(Q).catch((ne) => t(18, de = ne));
2260
+ },
2261
+ m ? g : 0
2262
+ ), O.endsWith(" ") || t(59, ie = window.setTimeout(
2263
+ () => {
2264
+ t(59, ie = void 0), Fe(Q, { appendSpace: !0 }).catch((ne) => t(18, de = ne));
2265
+ },
2266
+ pe
2267
+ ));
2257
2268
  }
2258
- function vt(m) {
2259
- t(56, N = m), t(1, O = m.place_name), t(15, U = -1);
2269
+ function Et(m) {
2270
+ t(58, N = m), t(1, O = m.place_name), t(15, D = -1);
2260
2271
  }
2261
- const Yi = () => ae.focus();
2262
- function Xi(m) {
2263
- Mt[m ? "unshift" : "push"](() => {
2264
- ae = m, t(17, ae);
2272
+ const nn = () => fe.focus();
2273
+ function rn(m) {
2274
+ Tt[m ? "unshift" : "push"](() => {
2275
+ fe = m, t(17, fe);
2265
2276
  });
2266
2277
  }
2267
- function Ki() {
2268
- O = this.value, t(1, O), t(13, Te), t(28, a);
2278
+ function on() {
2279
+ O = this.value, t(1, O), t(13, We), t(28, a);
2269
2280
  }
2270
- const Ji = () => t(13, Te = !0), $i = () => t(13, Te = !1), en = () => pt(), tn = () => {
2271
- t(1, O = ""), ae.focus();
2272
- }, nn = () => t(0, D = !D), rn = () => t(18, ce = void 0), on = (m) => t(15, U = m), sn = (m) => vt(m), ln = () => {
2273
- oe || t(15, U = -1);
2274
- }, un = () => {
2281
+ const sn = () => t(13, We = !0), ln = () => t(13, We = !1), un = () => _t(), an = () => {
2282
+ t(1, O = ""), fe.focus();
2283
+ }, cn = () => t(0, B = !B), fn = () => t(18, de = void 0), dn = (m) => t(15, D = m), hn = (m) => Et(m), mn = () => {
2284
+ Ie || t(15, D = -1);
2285
+ }, gn = () => {
2275
2286
  };
2276
2287
  return i.$$set = (m) => {
2277
- "class" in m && t(2, s = m.class), "apiKey" in m && t(26, c = m.apiKey), "bbox" in m && t(27, u = m.bbox), "clearButtonTitle" in m && t(3, h = m.clearButtonTitle), "clearOnBlur" in m && t(28, a = m.clearOnBlur), "collapsed" in m && t(4, f = m.collapsed), "country" in m && t(29, d = m.country), "debounceSearch" in m && t(30, g = m.debounceSearch), "enableReverse" in m && t(5, p = m.enableReverse), "errorMessage" in m && t(6, v = m.errorMessage), "filter" in m && t(31, b = m.filter), "flyTo" in m && t(32, S = m.flyTo), "fuzzyMatch" in m && t(33, E = m.fuzzyMatch), "language" in m && t(34, _ = m.language), "limit" in m && t(35, C = m.limit), "mapController" in m && t(36, x = m.mapController), "minLength" in m && t(37, L = m.minLength), "noResultsMessage" in m && t(7, w = m.noResultsMessage), "placeholder" in m && t(8, k = m.placeholder), "proximity" in m && t(38, I = m.proximity), "reverseActive" in m && t(0, D = m.reverseActive), "reverseButtonTitle" in m && t(9, z = m.reverseButtonTitle), "searchValue" in m && t(1, O = m.searchValue), "showFullGeometry" in m && t(39, M = m.showFullGeometry), "showPlaceType" in m && t(10, G = m.showPlaceType), "showResultsWhileTyping" in m && t(40, $ = m.showResultsWhileTyping), "selectFirst" in m && t(11, oe = m.selectFirst), "flyToSelected" in m && t(41, ct = m.flyToSelected), "markerOnSelected" in m && t(42, Ye = m.markerOnSelected), "types" in m && t(43, Xe = m.types), "excludeTypes" in m && t(44, Ke = m.excludeTypes), "zoom" in m && t(45, Pe = m.zoom), "maxZoom" in m && t(46, Je = m.maxZoom), "apiUrl" in m && t(47, ft = m.apiUrl), "fetchParameters" in m && t(48, dt = m.fetchParameters), "iconsBaseUrl" in m && t(12, Ft = m.iconsBaseUrl), "adjustUrlQuery" in m && t(49, ht = m.adjustUrlQuery), "$$scope" in m && t(59, o = m.$$scope);
2288
+ "class" in m && t(2, s = m.class), "apiKey" in m && t(26, c = m.apiKey), "bbox" in m && t(27, l = m.bbox), "clearButtonTitle" in m && t(3, d = m.clearButtonTitle), "clearOnBlur" in m && t(28, a = m.clearOnBlur), "collapsed" in m && t(4, f = m.collapsed), "country" in m && t(29, h = m.country), "debounceSearch" in m && t(30, g = m.debounceSearch), "enableReverse" in m && t(5, y = m.enableReverse), "errorMessage" in m && t(6, v = m.errorMessage), "filter" in m && t(31, b = m.filter), "flyTo" in m && t(32, E = m.flyTo), "fuzzyMatch" in m && t(33, L = m.fuzzyMatch), "language" in m && t(34, _ = m.language), "limit" in m && t(35, C = m.limit), "mapController" in m && t(36, x = m.mapController), "minLength" in m && t(37, S = m.minLength), "noResultsMessage" in m && t(7, w = m.noResultsMessage), "placeholder" in m && t(8, k = m.placeholder), "proximity" in m && t(38, I = m.proximity), "reverseActive" in m && t(0, B = m.reverseActive), "reverseButtonTitle" in m && t(9, U = m.reverseButtonTitle), "searchValue" in m && t(1, O = m.searchValue), "showFullGeometry" in m && t(39, M = m.showFullGeometry), "showPlaceType" in m && t(10, G = m.showPlaceType), "showResultsWhileTyping" in m && t(40, $ = m.showResultsWhileTyping), "autocompleteTimeout" in m && t(41, pe = m.autocompleteTimeout), "selectFirst" in m && t(11, Ie = m.selectFirst), "flyToSelected" in m && t(42, mt = m.flyToSelected), "markerOnSelected" in m && t(43, $e = m.markerOnSelected), "types" in m && t(44, Ne = m.types), "exhaustiveReverseGeocoding" in m && t(45, gt = m.exhaustiveReverseGeocoding), "excludeTypes" in m && t(46, et = m.excludeTypes), "zoom" in m && t(47, Oe = m.zoom), "maxZoom" in m && t(48, tt = m.maxZoom), "apiUrl" in m && t(49, yt = m.apiUrl), "fetchParameters" in m && t(50, pt = m.fetchParameters), "iconsBaseUrl" in m && t(12, Zt = m.iconsBaseUrl), "adjustUrlQuery" in m && t(51, bt = m.adjustUrlQuery), "$$scope" in m && t(62, o = m.$$scope);
2278
2289
  }, i.$$.update = () => {
2279
2290
  if (i.$$.dirty[0] & /*enableReverse*/
2280
- 32 && t(0, D = p === "always"), i.$$.dirty[0] & /*focused, clearOnBlur*/
2291
+ 32 && t(0, B = y === "always"), i.$$.dirty[0] & /*focused, clearOnBlur*/
2281
2292
  268443648 && setTimeout(() => {
2282
- t(16, et = Te), a && !Te && t(1, O = "");
2293
+ t(16, nt = We), a && !We && t(1, O = "");
2283
2294
  }), i.$$.dirty[0] & /*searchValue, listFeatures*/
2284
2295
  16386 | i.$$.dirty[1] & /*minLength*/
2285
- 64 && O.length < L && (t(56, N = void 0), t(14, R = void 0), t(18, ce = void 0), t(55, q = R)), i.$$.dirty[1] & /*showFullGeometry, picked*/
2286
- 33554688 && M && N && !N.address && N.geometry.type === "Point" && N.place_type[0] !== "reverse" && yt(N.id, { byId: !0 }).catch((m) => t(18, ce = m)), i.$$.dirty[1] & /*mapController, picked, prevIdToFly, flyTo*/
2287
- 100663330 && (x && N && N.id !== mt && S && (!N.bbox || N.bbox[0] === N.bbox[2] && N.bbox[1] === N.bbox[3] ? x.flyTo(N.center, Be(N)) : x.fitBounds(Ze(N.bbox), 50, Be(N)), t(14, R = void 0), t(55, q = void 0), t(15, U = -1)), t(57, mt = N == null ? void 0 : N.id)), i.$$.dirty[0] & /*selectFirst, listFeatures*/
2288
- 18432 && oe && R != null && R.length && t(15, U = 0), i.$$.dirty[0] & /*searchValue*/
2289
- 2 && t(15, U = -1), i.$$.dirty[0] & /*listFeatures*/
2296
+ 64 && O.length < S && (t(58, N = void 0), t(14, R = void 0), t(18, de = void 0), t(57, q = R)), i.$$.dirty[1] & /*showFullGeometry, picked*/
2297
+ 134217984 && M && N && !N.address && N.geometry.type === "Point" && N.place_type[0] !== "reverse" && Fe(N.id, { byId: !0 }).catch((m) => t(18, de = m)), i.$$.dirty[1] & /*mapController, picked, prevIdToFly, flyTo*/
2298
+ 671088674 && (x && N && N.id !== vt && E && (!N.bbox || N.bbox[0] === N.bbox[2] && N.bbox[1] === N.bbox[3] ? x.flyTo(N.center, Ue(N)) : x.fitBounds(Ve(N.bbox), 50, Ue(N)), t(14, R = void 0), t(57, q = void 0), t(15, D = -1)), t(60, vt = N == null ? void 0 : N.id)), i.$$.dirty[0] & /*selectFirst, listFeatures*/
2299
+ 18432 && Ie && R != null && R.length && (Ji() || t(15, D = 0)), i.$$.dirty[0] & /*searchValue*/
2300
+ 2 && t(15, D = -1), i.$$.dirty[0] & /*listFeatures*/
2290
2301
  16384 | i.$$.dirty[1] & /*markedFeatures*/
2291
- 16777216 && q !== R && t(55, q = void 0), i.$$.dirty[0] & /*reverseActive, listFeatures, focusedDelayed*/
2302
+ 67108864 && q !== R && t(57, q = void 0), i.$$.dirty[0] & /*reverseActive, listFeatures, focusedDelayed*/
2292
2303
  81921 | i.$$.dirty[1] & /*mapController, markedFeatures*/
2293
- 16777248 && x && x.setEventHandler((m) => {
2304
+ 67108896 && x && x.setEventHandler((m) => {
2294
2305
  switch (m.type) {
2295
2306
  case "mapClick":
2296
- D && Hi(m.coordinates);
2307
+ B && en(m.coordinates);
2297
2308
  break;
2298
2309
  case "markerClick":
2299
2310
  {
2300
- const j = R == null ? void 0 : R.find((H) => H.id === m.id);
2301
- j && vt(j);
2311
+ const j = R == null ? void 0 : R.find((Q) => Q.id === m.id);
2312
+ j && Et(j);
2302
2313
  }
2303
2314
  break;
2304
2315
  case "markerMouseEnter":
2305
- q && t(15, U = et ? (R == null ? void 0 : R.findIndex((j) => j.id === m.id)) ?? -1 : -1);
2316
+ q && t(15, D = nt ? (R == null ? void 0 : R.findIndex((j) => j.id === m.id)) ?? -1 : -1);
2306
2317
  break;
2307
2318
  case "markerMouseLeave":
2308
- q && t(15, U = -1);
2319
+ q && t(15, D = -1);
2309
2320
  break;
2310
2321
  }
2311
2322
  }), i.$$.dirty[0] & /*listFeatures, selectedItemIndex*/
2312
- 49152 && t(58, n = R == null ? void 0 : R[U]), i.$$.dirty[1] & /*mapController, selected, flyTo, flyToSelected*/
2313
- 134218786 && x && n && S && ct && x.flyTo(n.center, Be(n)), i.$$.dirty[1] & /*markerOnSelected, mapController*/
2314
- 2080 && (Ye || x == null || x.setMarkers(void 0, void 0)), i.$$.dirty[1] & /*mapController, markerOnSelected, markedFeatures, selected*/
2315
- 150997024 && x && Ye && !q && (x.setMarkers(n ? [n] : void 0, void 0), x.setSelectedMarker(n ? 0 : -1)), i.$$.dirty[1] & /*mapController, markedFeatures, picked*/
2316
- 50331680 && x && x.setMarkers(q, N), i.$$.dirty[0] & /*selectedItemIndex*/
2323
+ 49152 && t(61, n = R == null ? void 0 : R[D]), i.$$.dirty[1] & /*mapController, selected, flyTo, flyToSelected*/
2324
+ 1073743906 && x && n && E && mt && x.flyTo(n.center, Ue(n)), i.$$.dirty[1] & /*markerOnSelected, mapController*/
2325
+ 4128 && ($e || x == null || x.setMarkers(void 0, void 0)), i.$$.dirty[1] & /*mapController, markerOnSelected, markedFeatures, selected*/
2326
+ 1140854816 && x && $e && !q && (x.setMarkers(n ? [n] : void 0, void 0), x.setSelectedMarker(n ? 0 : -1)), i.$$.dirty[1] & /*mapController, markedFeatures, picked*/
2327
+ 201326624 && x && x.setMarkers(q, N), i.$$.dirty[0] & /*selectedItemIndex*/
2317
2328
  32768 | i.$$.dirty[1] & /*markedFeatures, mapController*/
2318
- 16777248 && q && x && x.setSelectedMarker(U), i.$$.dirty[0] & /*searchValue*/
2329
+ 67108896 && q && x && x.setSelectedMarker(D), i.$$.dirty[1] & /*selected, autocompleteTimeoutRef*/
2330
+ 1342177280 && n && (window.clearTimeout(ie), t(59, ie = void 0)), i.$$.dirty[0] & /*searchValue*/
2319
2331
  2 | i.$$.dirty[1] & /*mapController*/
2320
2332
  32 && x) {
2321
- const m = gt(O);
2333
+ const m = wt(O);
2322
2334
  x.setReverseMarker(m ? [m.decimalLongitude, m.decimalLatitude] : void 0);
2323
2335
  }
2324
2336
  i.$$.dirty[1] & /*selected*/
2325
- 134217728 && pe("select", n), i.$$.dirty[1] & /*picked*/
2326
- 33554432 && pe("pick", N), i.$$.dirty[0] & /*focusedDelayed, listFeatures*/
2327
- 81920 && pe("optionsVisibilityChange", et && !!R), i.$$.dirty[0] & /*listFeatures*/
2328
- 16384 && pe("featuresListed", R), i.$$.dirty[1] & /*markedFeatures*/
2329
- 16777216 && pe("featuresMarked", q), i.$$.dirty[0] & /*reverseActive*/
2330
- 1 && pe("reverseToggle", D), i.$$.dirty[0] & /*searchValue*/
2331
- 2 && pe("queryChange", O), i.$$.dirty[0] & /*reverseActive*/
2337
+ 1073741824 && ve("select", { feature: n }), i.$$.dirty[1] & /*picked*/
2338
+ 134217728 && ve("pick", { feature: N }), i.$$.dirty[0] & /*focusedDelayed, listFeatures*/
2339
+ 81920 && ve("optionsvisibilitychange", {
2340
+ optionsVisible: nt && !!R
2341
+ }), i.$$.dirty[0] & /*listFeatures*/
2342
+ 16384 && ve("featureslisted", { features: R }), i.$$.dirty[1] & /*markedFeatures*/
2343
+ 67108864 && ve("featuresmarked", { features: q }), i.$$.dirty[0] & /*reverseActive*/
2344
+ 1 && ve("reversetoggle", { reverse: B }), i.$$.dirty[0] & /*searchValue*/
2345
+ 2 && ve("querychange", { query: O }), i.$$.dirty[0] & /*reverseActive*/
2332
2346
  1 | i.$$.dirty[1] & /*mapController*/
2333
- 32 && x && x.indicateReverse(D);
2347
+ 32 && x && x.indicateReverse(B);
2334
2348
  }, [
2335
- D,
2349
+ B,
2336
2350
  O,
2337
2351
  s,
2338
- h,
2352
+ d,
2339
2353
  f,
2340
- p,
2354
+ y,
2341
2355
  v,
2342
2356
  w,
2343
2357
  k,
2344
- z,
2358
+ U,
2345
2359
  G,
2346
- oe,
2347
- Ft,
2348
- Te,
2360
+ Ie,
2361
+ Zt,
2362
+ We,
2349
2363
  R,
2350
- U,
2351
- et,
2352
- ae,
2353
- ce,
2354
- Ce,
2355
- qi,
2356
- jt,
2357
- Vi,
2358
- pt,
2359
- vt,
2360
- l,
2361
- c,
2364
+ D,
2365
+ nt,
2366
+ fe,
2367
+ de,
2368
+ Te,
2369
+ Ki,
2370
+ Ht,
2371
+ tn,
2372
+ _t,
2373
+ Et,
2362
2374
  u,
2375
+ c,
2376
+ l,
2363
2377
  a,
2364
- d,
2378
+ h,
2365
2379
  g,
2366
2380
  b,
2367
- S,
2368
2381
  E,
2382
+ L,
2369
2383
  _,
2370
2384
  C,
2371
2385
  x,
2372
- L,
2386
+ S,
2373
2387
  I,
2374
2388
  M,
2375
2389
  $,
2376
- ct,
2377
- Ye,
2378
- Xe,
2379
- Ke,
2380
- Pe,
2381
- Je,
2382
- ft,
2383
- dt,
2384
- ht,
2385
- zi,
2386
- Gi,
2387
- zt,
2388
- ji,
2389
- Zi,
2390
+ pe,
2391
+ mt,
2392
+ $e,
2393
+ Ne,
2394
+ gt,
2395
+ et,
2396
+ Oe,
2397
+ tt,
2398
+ yt,
2399
+ pt,
2400
+ bt,
2401
+ Hi,
2402
+ Vi,
2403
+ qt,
2404
+ Yi,
2405
+ Xi,
2390
2406
  q,
2391
2407
  N,
2392
- mt,
2408
+ ie,
2409
+ vt,
2393
2410
  n,
2394
2411
  o,
2395
2412
  r,
2396
- Yi,
2397
- Xi,
2398
- Ki,
2399
- Ji,
2400
- $i,
2401
- en,
2402
- tn,
2403
2413
  nn,
2404
2414
  rn,
2405
2415
  on,
2406
2416
  sn,
2407
2417
  ln,
2408
- un
2418
+ un,
2419
+ an,
2420
+ cn,
2421
+ fn,
2422
+ dn,
2423
+ hn,
2424
+ mn,
2425
+ gn
2409
2426
  ];
2410
2427
  }
2411
- let vr = class extends Me {
2428
+ let xr = class extends ke {
2412
2429
  constructor(e) {
2413
- super(), xe(
2430
+ super(), Ce(
2414
2431
  this,
2415
2432
  e,
2416
- pr,
2417
- yr,
2418
- Se,
2433
+ Sr,
2434
+ Lr,
2435
+ Me,
2419
2436
  {
2420
2437
  ZOOM_DEFAULTS: 25,
2421
2438
  class: 2,
@@ -2444,22 +2461,24 @@ let vr = class extends Me {
2444
2461
  showFullGeometry: 39,
2445
2462
  showPlaceType: 10,
2446
2463
  showResultsWhileTyping: 40,
2464
+ autocompleteTimeout: 41,
2447
2465
  selectFirst: 11,
2448
- flyToSelected: 41,
2449
- markerOnSelected: 42,
2450
- types: 43,
2451
- excludeTypes: 44,
2452
- zoom: 45,
2453
- maxZoom: 46,
2454
- apiUrl: 47,
2455
- fetchParameters: 48,
2466
+ flyToSelected: 42,
2467
+ markerOnSelected: 43,
2468
+ types: 44,
2469
+ exhaustiveReverseGeocoding: 45,
2470
+ excludeTypes: 46,
2471
+ zoom: 47,
2472
+ maxZoom: 48,
2473
+ apiUrl: 49,
2474
+ fetchParameters: 50,
2456
2475
  iconsBaseUrl: 12,
2457
- adjustUrlQuery: 49,
2458
- focus: 50,
2459
- blur: 51,
2460
- setQuery: 52,
2461
- clearList: 53,
2462
- clearMap: 54
2476
+ adjustUrlQuery: 51,
2477
+ focus: 52,
2478
+ blur: 53,
2479
+ setQuery: 54,
2480
+ clearList: 55,
2481
+ clearMap: 56
2463
2482
  },
2464
2483
  null,
2465
2484
  [-1, -1, -1]
@@ -2469,26 +2488,26 @@ let vr = class extends Me {
2469
2488
  return this.$$.ctx[25];
2470
2489
  }
2471
2490
  get focus() {
2472
- return this.$$.ctx[50];
2491
+ return this.$$.ctx[52];
2473
2492
  }
2474
2493
  get blur() {
2475
- return this.$$.ctx[51];
2494
+ return this.$$.ctx[53];
2476
2495
  }
2477
2496
  get setQuery() {
2478
- return this.$$.ctx[52];
2497
+ return this.$$.ctx[54];
2479
2498
  }
2480
2499
  get clearList() {
2481
- return this.$$.ctx[53];
2500
+ return this.$$.ctx[55];
2482
2501
  }
2483
2502
  get clearMap() {
2484
- return this.$$.ctx[54];
2503
+ return this.$$.ctx[56];
2485
2504
  }
2486
2505
  };
2487
- function qe(i, e, t = {}) {
2506
+ function Ye(i, e, t = {}) {
2488
2507
  const n = { type: "Feature" };
2489
2508
  return (t.id === 0 || t.id) && (n.id = t.id), t.bbox && (n.bbox = t.bbox), n.properties = e || {}, n.geometry = i, n;
2490
2509
  }
2491
- function At(i, e, t = {}) {
2510
+ function Ft(i, e, t = {}) {
2492
2511
  for (const r of i) {
2493
2512
  if (r.length < 4)
2494
2513
  throw new Error(
@@ -2500,31 +2519,31 @@ function At(i, e, t = {}) {
2500
2519
  if (r[r.length - 1][o] !== r[0][o])
2501
2520
  throw new Error("First and last Position are not equivalent.");
2502
2521
  }
2503
- return qe({
2522
+ return Ye({
2504
2523
  type: "Polygon",
2505
2524
  coordinates: i
2506
2525
  }, e, t);
2507
2526
  }
2508
- function Qe(i, e = {}) {
2527
+ function Xe(i, e = {}) {
2509
2528
  const t = { type: "FeatureCollection" };
2510
2529
  return e.id && (t.id = e.id), e.bbox && (t.bbox = e.bbox), t.features = i, t;
2511
2530
  }
2512
- function Ii(i, e, t = {}) {
2513
- return qe({
2531
+ function Bi(i, e, t = {}) {
2532
+ return Ye({
2514
2533
  type: "MultiPolygon",
2515
2534
  coordinates: i
2516
2535
  }, e, t);
2517
2536
  }
2518
- function Oi(i, e, t) {
2537
+ function Di(i, e, t) {
2519
2538
  if (i !== null)
2520
- for (var n, r, o, l, s, c, u, h = 0, a = 0, f, d = i.type, g = d === "FeatureCollection", p = d === "Feature", v = g ? i.features.length : 1, b = 0; b < v; b++) {
2521
- u = g ? i.features[b].geometry : p ? i.geometry : i, f = u ? u.type === "GeometryCollection" : !1, s = f ? u.geometries.length : 1;
2522
- for (var S = 0; S < s; S++) {
2523
- var E = 0, _ = 0;
2524
- if (l = f ? u.geometries[S] : u, l !== null) {
2525
- c = l.coordinates;
2526
- var C = l.type;
2527
- switch (h = 0, C) {
2539
+ for (var n, r, o, u, s, c, l, d = 0, a = 0, f, h = i.type, g = h === "FeatureCollection", y = h === "Feature", v = g ? i.features.length : 1, b = 0; b < v; b++) {
2540
+ l = g ? i.features[b].geometry : y ? i.geometry : i, f = l ? l.type === "GeometryCollection" : !1, s = f ? l.geometries.length : 1;
2541
+ for (var E = 0; E < s; E++) {
2542
+ var L = 0, _ = 0;
2543
+ if (u = f ? l.geometries[E] : l, u !== null) {
2544
+ c = u.coordinates;
2545
+ var C = u.type;
2546
+ switch (d = 0, C) {
2528
2547
  case null:
2529
2548
  break;
2530
2549
  case "Point":
@@ -2532,11 +2551,11 @@ function Oi(i, e, t) {
2532
2551
  c,
2533
2552
  a,
2534
2553
  b,
2535
- E,
2554
+ L,
2536
2555
  _
2537
2556
  ) === !1)
2538
2557
  return !1;
2539
- a++, E++;
2558
+ a++, L++;
2540
2559
  break;
2541
2560
  case "LineString":
2542
2561
  case "MultiPoint":
@@ -2545,41 +2564,41 @@ function Oi(i, e, t) {
2545
2564
  c[n],
2546
2565
  a,
2547
2566
  b,
2548
- E,
2567
+ L,
2549
2568
  _
2550
2569
  ) === !1)
2551
2570
  return !1;
2552
- a++, C === "MultiPoint" && E++;
2571
+ a++, C === "MultiPoint" && L++;
2553
2572
  }
2554
- C === "LineString" && E++;
2573
+ C === "LineString" && L++;
2555
2574
  break;
2556
2575
  case "Polygon":
2557
2576
  case "MultiLineString":
2558
2577
  for (n = 0; n < c.length; n++) {
2559
- for (r = 0; r < c[n].length - h; r++) {
2578
+ for (r = 0; r < c[n].length - d; r++) {
2560
2579
  if (e(
2561
2580
  c[n][r],
2562
2581
  a,
2563
2582
  b,
2564
- E,
2583
+ L,
2565
2584
  _
2566
2585
  ) === !1)
2567
2586
  return !1;
2568
2587
  a++;
2569
2588
  }
2570
- C === "MultiLineString" && E++, C === "Polygon" && _++;
2589
+ C === "MultiLineString" && L++, C === "Polygon" && _++;
2571
2590
  }
2572
- C === "Polygon" && E++;
2591
+ C === "Polygon" && L++;
2573
2592
  break;
2574
2593
  case "MultiPolygon":
2575
2594
  for (n = 0; n < c.length; n++) {
2576
2595
  for (_ = 0, r = 0; r < c[n].length; r++) {
2577
- for (o = 0; o < c[n][r].length - h; o++) {
2596
+ for (o = 0; o < c[n][r].length - d; o++) {
2578
2597
  if (e(
2579
2598
  c[n][r][o],
2580
2599
  a,
2581
2600
  b,
2582
- E,
2601
+ L,
2583
2602
  _
2584
2603
  ) === !1)
2585
2604
  return !1;
@@ -2587,12 +2606,12 @@ function Oi(i, e, t) {
2587
2606
  }
2588
2607
  _++;
2589
2608
  }
2590
- E++;
2609
+ L++;
2591
2610
  }
2592
2611
  break;
2593
2612
  case "GeometryCollection":
2594
- for (n = 0; n < l.geometries.length; n++)
2595
- if (Oi(l.geometries[n], e) === !1)
2613
+ for (n = 0; n < u.geometries.length; n++)
2614
+ if (Di(u.geometries[n], e) === !1)
2596
2615
  return !1;
2597
2616
  break;
2598
2617
  default:
@@ -2602,16 +2621,16 @@ function Oi(i, e, t) {
2602
2621
  }
2603
2622
  }
2604
2623
  }
2605
- function Bt(i, e) {
2606
- var t, n, r, o, l, s, c, u, h, a, f = 0, d = i.type === "FeatureCollection", g = i.type === "Feature", p = d ? i.features.length : 1;
2607
- for (t = 0; t < p; t++) {
2608
- for (s = d ? i.features[t].geometry : g ? i.geometry : i, u = d ? i.features[t].properties : g ? i.properties : {}, h = d ? i.features[t].bbox : g ? i.bbox : void 0, a = d ? i.features[t].id : g ? i.id : void 0, c = s ? s.type === "GeometryCollection" : !1, l = c ? s.geometries.length : 1, r = 0; r < l; r++) {
2624
+ function Ut(i, e) {
2625
+ var t, n, r, o, u, s, c, l, d, a, f = 0, h = i.type === "FeatureCollection", g = i.type === "Feature", y = h ? i.features.length : 1;
2626
+ for (t = 0; t < y; t++) {
2627
+ for (s = h ? i.features[t].geometry : g ? i.geometry : i, l = h ? i.features[t].properties : g ? i.properties : {}, d = h ? i.features[t].bbox : g ? i.bbox : void 0, a = h ? i.features[t].id : g ? i.id : void 0, c = s ? s.type === "GeometryCollection" : !1, u = c ? s.geometries.length : 1, r = 0; r < u; r++) {
2609
2628
  if (o = c ? s.geometries[r] : s, o === null) {
2610
2629
  if (e(
2611
2630
  null,
2612
2631
  f,
2613
- u,
2614
- h,
2632
+ l,
2633
+ d,
2615
2634
  a
2616
2635
  ) === !1)
2617
2636
  return !1;
@@ -2627,8 +2646,8 @@ function Bt(i, e) {
2627
2646
  if (e(
2628
2647
  o,
2629
2648
  f,
2630
- u,
2631
- h,
2649
+ l,
2650
+ d,
2632
2651
  a
2633
2652
  ) === !1)
2634
2653
  return !1;
@@ -2639,8 +2658,8 @@ function Bt(i, e) {
2639
2658
  if (e(
2640
2659
  o.geometries[n],
2641
2660
  f,
2642
- u,
2643
- h,
2661
+ l,
2662
+ d,
2644
2663
  a
2645
2664
  ) === !1)
2646
2665
  return !1;
@@ -2653,8 +2672,8 @@ function Bt(i, e) {
2653
2672
  f++;
2654
2673
  }
2655
2674
  }
2656
- function br(i, e) {
2657
- Bt(i, function(t, n, r, o, l) {
2675
+ function Mr(i, e) {
2676
+ Ut(i, function(t, n, r, o, u) {
2658
2677
  var s = t === null ? null : t.type;
2659
2678
  switch (s) {
2660
2679
  case null:
@@ -2662,7 +2681,7 @@ function br(i, e) {
2662
2681
  case "LineString":
2663
2682
  case "Polygon":
2664
2683
  return e(
2665
- qe(t, r, { bbox: o, id: l }),
2684
+ Ye(t, r, { bbox: o, id: u }),
2666
2685
  n,
2667
2686
  0
2668
2687
  ) === !1 ? !1 : void 0;
@@ -2679,33 +2698,33 @@ function br(i, e) {
2679
2698
  c = "Polygon";
2680
2699
  break;
2681
2700
  }
2682
- for (var u = 0; u < t.coordinates.length; u++) {
2683
- var h = t.coordinates[u], a = {
2701
+ for (var l = 0; l < t.coordinates.length; l++) {
2702
+ var d = t.coordinates[l], a = {
2684
2703
  type: c,
2685
- coordinates: h
2704
+ coordinates: d
2686
2705
  };
2687
- if (e(qe(a, r), n, u) === !1)
2706
+ if (e(Ye(a, r), n, l) === !1)
2688
2707
  return !1;
2689
2708
  }
2690
2709
  });
2691
2710
  }
2692
- function wr(i, e = {}) {
2711
+ function Cr(i, e = {}) {
2693
2712
  if (i.bbox != null && e.recompute !== !0)
2694
2713
  return i.bbox;
2695
2714
  const t = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
2696
- return Oi(i, (n) => {
2715
+ return Di(i, (n) => {
2697
2716
  t[0] > n[0] && (t[0] = n[0]), t[1] > n[1] && (t[1] = n[1]), t[2] < n[0] && (t[2] = n[0]), t[3] < n[1] && (t[3] = n[1]);
2698
2717
  }), t;
2699
2718
  }
2700
- var Nt = wr;
2701
- function _r(i) {
2719
+ var It = Cr;
2720
+ function kr(i) {
2702
2721
  if (!i)
2703
2722
  throw new Error("geojson is required");
2704
2723
  switch (i.type) {
2705
2724
  case "Feature":
2706
- return Wi(i);
2725
+ return Fi(i);
2707
2726
  case "FeatureCollection":
2708
- return Er(i);
2727
+ return Nr(i);
2709
2728
  case "Point":
2710
2729
  case "LineString":
2711
2730
  case "Polygon":
@@ -2713,12 +2732,12 @@ function _r(i) {
2713
2732
  case "MultiLineString":
2714
2733
  case "MultiPolygon":
2715
2734
  case "GeometryCollection":
2716
- return Dt(i);
2735
+ return Gt(i);
2717
2736
  default:
2718
2737
  throw new Error("unknown GeoJSON type");
2719
2738
  }
2720
2739
  }
2721
- function Wi(i) {
2740
+ function Fi(i) {
2722
2741
  const e = { type: "Feature" };
2723
2742
  return Object.keys(i).forEach((t) => {
2724
2743
  switch (t) {
@@ -2729,16 +2748,16 @@ function Wi(i) {
2729
2748
  default:
2730
2749
  e[t] = i[t];
2731
2750
  }
2732
- }), e.properties = Ai(i.properties), i.geometry == null ? e.geometry = null : e.geometry = Dt(i.geometry), e;
2751
+ }), e.properties = Ui(i.properties), i.geometry == null ? e.geometry = null : e.geometry = Gt(i.geometry), e;
2733
2752
  }
2734
- function Ai(i) {
2753
+ function Ui(i) {
2735
2754
  const e = {};
2736
2755
  return i && Object.keys(i).forEach((t) => {
2737
2756
  const n = i[t];
2738
- typeof n == "object" ? n === null ? e[t] = null : Array.isArray(n) ? e[t] = n.map((r) => r) : e[t] = Ai(n) : e[t] = n;
2757
+ typeof n == "object" ? n === null ? e[t] = null : Array.isArray(n) ? e[t] = n.map((r) => r) : e[t] = Ui(n) : e[t] = n;
2739
2758
  }), e;
2740
2759
  }
2741
- function Er(i) {
2760
+ function Nr(i) {
2742
2761
  const e = { type: "FeatureCollection" };
2743
2762
  return Object.keys(i).forEach((t) => {
2744
2763
  switch (t) {
@@ -2748,17 +2767,17 @@ function Er(i) {
2748
2767
  default:
2749
2768
  e[t] = i[t];
2750
2769
  }
2751
- }), e.features = i.features.map((t) => Wi(t)), e;
2770
+ }), e.features = i.features.map((t) => Fi(t)), e;
2752
2771
  }
2753
- function Dt(i) {
2772
+ function Gt(i) {
2754
2773
  const e = { type: i.type };
2755
- return i.bbox && (e.bbox = i.bbox), i.type === "GeometryCollection" ? (e.geometries = i.geometries.map((t) => Dt(t)), e) : (e.coordinates = Bi(i.coordinates), e);
2774
+ return i.bbox && (e.bbox = i.bbox), i.type === "GeometryCollection" ? (e.geometries = i.geometries.map((t) => Gt(t)), e) : (e.coordinates = Gi(i.coordinates), e);
2756
2775
  }
2757
- function Bi(i) {
2776
+ function Gi(i) {
2758
2777
  const e = i;
2759
- return typeof e[0] != "object" ? e.slice() : e.map((t) => Bi(t));
2778
+ return typeof e[0] != "object" ? e.slice() : e.map((t) => Gi(t));
2760
2779
  }
2761
- var Lr = _r;
2780
+ var Tr = kr;
2762
2781
  /**
2763
2782
  * splaytree v3.1.2
2764
2783
  * Fast Splay tree for Node and browser
@@ -2781,67 +2800,67 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
2781
2800
  See the Apache Version 2.0 License for specific language governing permissions
2782
2801
  and limitations under the License.
2783
2802
  ***************************************************************************** */
2784
- function Sr(i, e) {
2803
+ function Pr(i, e) {
2785
2804
  var t = { label: 0, sent: function() {
2786
2805
  if (o[0] & 1) throw o[1];
2787
2806
  return o[1];
2788
- }, trys: [], ops: [] }, n, r, o, l;
2789
- return l = { next: s(0), throw: s(1), return: s(2) }, typeof Symbol == "function" && (l[Symbol.iterator] = function() {
2807
+ }, trys: [], ops: [] }, n, r, o, u;
2808
+ return u = { next: s(0), throw: s(1), return: s(2) }, typeof Symbol == "function" && (u[Symbol.iterator] = function() {
2790
2809
  return this;
2791
- }), l;
2792
- function s(u) {
2793
- return function(h) {
2794
- return c([u, h]);
2810
+ }), u;
2811
+ function s(l) {
2812
+ return function(d) {
2813
+ return c([l, d]);
2795
2814
  };
2796
2815
  }
2797
- function c(u) {
2816
+ function c(l) {
2798
2817
  if (n) throw new TypeError("Generator is already executing.");
2799
2818
  for (; t; ) try {
2800
- if (n = 1, r && (o = u[0] & 2 ? r.return : u[0] ? r.throw || ((o = r.return) && o.call(r), 0) : r.next) && !(o = o.call(r, u[1])).done) return o;
2801
- switch (r = 0, o && (u = [u[0] & 2, o.value]), u[0]) {
2819
+ if (n = 1, r && (o = l[0] & 2 ? r.return : l[0] ? r.throw || ((o = r.return) && o.call(r), 0) : r.next) && !(o = o.call(r, l[1])).done) return o;
2820
+ switch (r = 0, o && (l = [l[0] & 2, o.value]), l[0]) {
2802
2821
  case 0:
2803
2822
  case 1:
2804
- o = u;
2823
+ o = l;
2805
2824
  break;
2806
2825
  case 4:
2807
- return t.label++, { value: u[1], done: !1 };
2826
+ return t.label++, { value: l[1], done: !1 };
2808
2827
  case 5:
2809
- t.label++, r = u[1], u = [0];
2828
+ t.label++, r = l[1], l = [0];
2810
2829
  continue;
2811
2830
  case 7:
2812
- u = t.ops.pop(), t.trys.pop();
2831
+ l = t.ops.pop(), t.trys.pop();
2813
2832
  continue;
2814
2833
  default:
2815
- if (o = t.trys, !(o = o.length > 0 && o[o.length - 1]) && (u[0] === 6 || u[0] === 2)) {
2834
+ if (o = t.trys, !(o = o.length > 0 && o[o.length - 1]) && (l[0] === 6 || l[0] === 2)) {
2816
2835
  t = 0;
2817
2836
  continue;
2818
2837
  }
2819
- if (u[0] === 3 && (!o || u[1] > o[0] && u[1] < o[3])) {
2820
- t.label = u[1];
2838
+ if (l[0] === 3 && (!o || l[1] > o[0] && l[1] < o[3])) {
2839
+ t.label = l[1];
2821
2840
  break;
2822
2841
  }
2823
- if (u[0] === 6 && t.label < o[1]) {
2824
- t.label = o[1], o = u;
2842
+ if (l[0] === 6 && t.label < o[1]) {
2843
+ t.label = o[1], o = l;
2825
2844
  break;
2826
2845
  }
2827
2846
  if (o && t.label < o[2]) {
2828
- t.label = o[2], t.ops.push(u);
2847
+ t.label = o[2], t.ops.push(l);
2829
2848
  break;
2830
2849
  }
2831
2850
  o[2] && t.ops.pop(), t.trys.pop();
2832
2851
  continue;
2833
2852
  }
2834
- u = e.call(i, t);
2835
- } catch (h) {
2836
- u = [6, h], r = 0;
2853
+ l = e.call(i, t);
2854
+ } catch (d) {
2855
+ l = [6, d], r = 0;
2837
2856
  } finally {
2838
2857
  n = o = 0;
2839
2858
  }
2840
- if (u[0] & 5) throw u[1];
2841
- return { value: u[0] ? u[1] : void 0, done: !0 };
2859
+ if (l[0] & 5) throw l[1];
2860
+ return { value: l[0] ? l[1] : void 0, done: !0 };
2842
2861
  }
2843
2862
  }
2844
- var Le = (
2863
+ var xe = (
2845
2864
  /** @class */
2846
2865
  /* @__PURE__ */ function() {
2847
2866
  function i(e, t) {
@@ -2850,13 +2869,13 @@ var Le = (
2850
2869
  return i;
2851
2870
  }()
2852
2871
  );
2853
- function xr(i, e) {
2872
+ function Rr(i, e) {
2854
2873
  return i > e ? 1 : i < e ? -1 : 0;
2855
2874
  }
2856
- function ve(i, e, t) {
2857
- for (var n = new Le(null, null), r = n, o = n; ; ) {
2858
- var l = t(i, e.key);
2859
- if (l < 0) {
2875
+ function we(i, e, t) {
2876
+ for (var n = new xe(null, null), r = n, o = n; ; ) {
2877
+ var u = t(i, e.key);
2878
+ if (u < 0) {
2860
2879
  if (e.left === null)
2861
2880
  break;
2862
2881
  if (t(i, e.left.key) < 0) {
@@ -2865,7 +2884,7 @@ function ve(i, e, t) {
2865
2884
  break;
2866
2885
  }
2867
2886
  o.left = e, o = e, e = e.left;
2868
- } else if (l > 0) {
2887
+ } else if (u > 0) {
2869
2888
  if (e.right === null)
2870
2889
  break;
2871
2890
  if (t(i, e.right.key) > 0) {
@@ -2879,62 +2898,62 @@ function ve(i, e, t) {
2879
2898
  }
2880
2899
  return r.right = e.left, o.left = e.right, e.left = n.right, e.right = n.left, e;
2881
2900
  }
2882
- function St(i, e, t, n) {
2883
- var r = new Le(i, e);
2901
+ function kt(i, e, t, n) {
2902
+ var r = new xe(i, e);
2884
2903
  if (t === null)
2885
2904
  return r.left = r.right = null, r;
2886
- t = ve(i, t, n);
2905
+ t = we(i, t, n);
2887
2906
  var o = n(i, t.key);
2888
2907
  return o < 0 ? (r.left = t.left, r.right = t, t.left = null) : o >= 0 && (r.right = t.right, r.left = t, t.right = null), r;
2889
2908
  }
2890
- function ci(i, e, t) {
2909
+ function mi(i, e, t) {
2891
2910
  var n = null, r = null;
2892
2911
  if (e) {
2893
- e = ve(i, e, t);
2912
+ e = we(i, e, t);
2894
2913
  var o = t(e.key, i);
2895
2914
  o === 0 ? (n = e.left, r = e.right) : o < 0 ? (r = e.right, e.right = null, n = e) : (n = e.left, e.left = null, r = e);
2896
2915
  }
2897
2916
  return { left: n, right: r };
2898
2917
  }
2899
- function Mr(i, e, t) {
2900
- return e === null ? i : (i === null || (e = ve(i.key, e, t), e.left = i), e);
2918
+ function Ir(i, e, t) {
2919
+ return e === null ? i : (i === null || (e = we(i.key, e, t), e.left = i), e);
2901
2920
  }
2902
- function Pt(i, e, t, n, r) {
2921
+ function Ot(i, e, t, n, r) {
2903
2922
  if (i) {
2904
2923
  n("" + e + (t ? "└── " : "├── ") + r(i) + `
2905
2924
  `);
2906
2925
  var o = e + (t ? " " : "│ ");
2907
- i.left && Pt(i.left, o, !1, n, r), i.right && Pt(i.right, o, !0, n, r);
2926
+ i.left && Ot(i.left, o, !1, n, r), i.right && Ot(i.right, o, !0, n, r);
2908
2927
  }
2909
2928
  }
2910
- var Ut = (
2929
+ var jt = (
2911
2930
  /** @class */
2912
2931
  function() {
2913
2932
  function i(e) {
2914
- e === void 0 && (e = xr), this._root = null, this._size = 0, this._comparator = e;
2933
+ e === void 0 && (e = Rr), this._root = null, this._size = 0, this._comparator = e;
2915
2934
  }
2916
2935
  return i.prototype.insert = function(e, t) {
2917
- return this._size++, this._root = St(e, t, this._root, this._comparator);
2936
+ return this._size++, this._root = kt(e, t, this._root, this._comparator);
2918
2937
  }, i.prototype.add = function(e, t) {
2919
- var n = new Le(e, t);
2938
+ var n = new xe(e, t);
2920
2939
  this._root === null && (n.left = n.right = null, this._size++, this._root = n);
2921
- var r = this._comparator, o = ve(e, this._root, r), l = r(e, o.key);
2922
- return l === 0 ? this._root = o : (l < 0 ? (n.left = o.left, n.right = o, o.left = null) : l > 0 && (n.right = o.right, n.left = o, o.right = null), this._size++, this._root = n), this._root;
2940
+ var r = this._comparator, o = we(e, this._root, r), u = r(e, o.key);
2941
+ return u === 0 ? this._root = o : (u < 0 ? (n.left = o.left, n.right = o, o.left = null) : u > 0 && (n.right = o.right, n.left = o, o.right = null), this._size++, this._root = n), this._root;
2923
2942
  }, i.prototype.remove = function(e) {
2924
2943
  this._root = this._remove(e, this._root, this._comparator);
2925
2944
  }, i.prototype._remove = function(e, t, n) {
2926
2945
  var r;
2927
2946
  if (t === null)
2928
2947
  return null;
2929
- t = ve(e, t, n);
2948
+ t = we(e, t, n);
2930
2949
  var o = n(e, t.key);
2931
- return o === 0 ? (t.left === null ? r = t.right : (r = ve(e, t.left, n), r.right = t.right), this._size--, r) : t;
2950
+ return o === 0 ? (t.left === null ? r = t.right : (r = we(e, t.left, n), r.right = t.right), this._size--, r) : t;
2932
2951
  }, i.prototype.pop = function() {
2933
2952
  var e = this._root;
2934
2953
  if (e) {
2935
2954
  for (; e.left; )
2936
2955
  e = e.left;
2937
- return this._root = ve(e.key, this._root, this._comparator), this._root = this._remove(e.key, this._root, this._comparator), { key: e.key, data: e.data };
2956
+ return this._root = we(e.key, this._root, this._comparator), this._root = this._remove(e.key, this._root, this._comparator), { key: e.key, data: e.data };
2938
2957
  }
2939
2958
  return null;
2940
2959
  }, i.prototype.findStatic = function(e) {
@@ -2946,7 +2965,7 @@ var Ut = (
2946
2965
  }
2947
2966
  return null;
2948
2967
  }, i.prototype.find = function(e) {
2949
- return this._root && (this._root = ve(e, this._root, this._comparator), this._comparator(e, this._root.key) !== 0) ? null : this._root;
2968
+ return this._root && (this._root = we(e, this._root, this._comparator), this._comparator(e, this._root.key) !== 0) ? null : this._root;
2950
2969
  }, i.prototype.contains = function(e) {
2951
2970
  for (var t = this._root, n = this._comparator; t; ) {
2952
2971
  var r = n(e, t.key);
@@ -2960,13 +2979,13 @@ var Ut = (
2960
2979
  n !== null ? (r.push(n), n = n.left) : r.length !== 0 ? (n = r.pop(), e.call(t, n), n = n.right) : o = !0;
2961
2980
  return this;
2962
2981
  }, i.prototype.range = function(e, t, n, r) {
2963
- for (var o = [], l = this._comparator, s = this._root, c; o.length !== 0 || s; )
2982
+ for (var o = [], u = this._comparator, s = this._root, c; o.length !== 0 || s; )
2964
2983
  if (s)
2965
2984
  o.push(s), s = s.left;
2966
2985
  else {
2967
- if (s = o.pop(), c = l(s.key, t), c > 0)
2986
+ if (s = o.pop(), c = u(s.key, t), c > 0)
2968
2987
  break;
2969
- if (l(s.key, e) >= 0 && n.call(r, s))
2988
+ if (u(s.key, e) >= 0 && n.call(r, s))
2970
2989
  return this;
2971
2990
  s = s.right;
2972
2991
  }
@@ -3039,15 +3058,15 @@ var Ut = (
3039
3058
  }, i.prototype.clear = function() {
3040
3059
  return this._root = null, this._size = 0, this;
3041
3060
  }, i.prototype.toList = function() {
3042
- return kr(this._root);
3061
+ return Wr(this._root);
3043
3062
  }, i.prototype.load = function(e, t, n) {
3044
3063
  t === void 0 && (t = []), n === void 0 && (n = !1);
3045
3064
  var r = e.length, o = this._comparator;
3046
- if (n && It(e, t, 0, r - 1, o), this._root === null)
3047
- this._root = Tt(e, t, 0, r), this._size = r;
3065
+ if (n && zt(e, t, 0, r - 1, o), this._root === null)
3066
+ this._root = Wt(e, t, 0, r), this._size = r;
3048
3067
  else {
3049
- var l = Nr(this.toList(), Cr(e, t), o);
3050
- r = this._size + r, this._root = Rt({ head: l }, 0, r);
3068
+ var u = Ar(this.toList(), Or(e, t), o);
3069
+ r = this._size + r, this._root = At({ head: u }, 0, r);
3051
3070
  }
3052
3071
  return this;
3053
3072
  }, i.prototype.isEmpty = function() {
@@ -3069,17 +3088,17 @@ var Ut = (
3069
3088
  return String(n.key);
3070
3089
  });
3071
3090
  var t = [];
3072
- return Pt(this._root, "", !0, function(n) {
3091
+ return Ot(this._root, "", !0, function(n) {
3073
3092
  return t.push(n);
3074
3093
  }, e), t.join("");
3075
3094
  }, i.prototype.update = function(e, t, n) {
3076
- var r = this._comparator, o = ci(e, this._root, r), l = o.left, s = o.right;
3077
- r(e, t) < 0 ? s = St(t, n, s, r) : l = St(t, n, l, r), this._root = Mr(l, s, r);
3095
+ var r = this._comparator, o = mi(e, this._root, r), u = o.left, s = o.right;
3096
+ r(e, t) < 0 ? s = kt(t, n, s, r) : u = kt(t, n, u, r), this._root = Ir(u, s, r);
3078
3097
  }, i.prototype.split = function(e) {
3079
- return ci(e, this._root, this._comparator);
3098
+ return mi(e, this._root, this._comparator);
3080
3099
  }, i.prototype[Symbol.iterator] = function() {
3081
3100
  var e, t, n;
3082
- return Sr(this, function(r) {
3101
+ return Pr(this, function(r) {
3083
3102
  switch (r.label) {
3084
3103
  case 0:
3085
3104
  e = this._root, t = [], n = !1, r.label = 1;
@@ -3103,96 +3122,96 @@ var Ut = (
3103
3122
  }, i;
3104
3123
  }()
3105
3124
  );
3106
- function Tt(i, e, t, n) {
3125
+ function Wt(i, e, t, n) {
3107
3126
  var r = n - t;
3108
3127
  if (r > 0) {
3109
- var o = t + Math.floor(r / 2), l = i[o], s = e[o], c = new Le(l, s);
3110
- return c.left = Tt(i, e, t, o), c.right = Tt(i, e, o + 1, n), c;
3128
+ var o = t + Math.floor(r / 2), u = i[o], s = e[o], c = new xe(u, s);
3129
+ return c.left = Wt(i, e, t, o), c.right = Wt(i, e, o + 1, n), c;
3111
3130
  }
3112
3131
  return null;
3113
3132
  }
3114
- function Cr(i, e) {
3115
- for (var t = new Le(null, null), n = t, r = 0; r < i.length; r++)
3116
- n = n.next = new Le(i[r], e[r]);
3133
+ function Or(i, e) {
3134
+ for (var t = new xe(null, null), n = t, r = 0; r < i.length; r++)
3135
+ n = n.next = new xe(i[r], e[r]);
3117
3136
  return n.next = null, t.next;
3118
3137
  }
3119
- function kr(i) {
3120
- for (var e = i, t = [], n = !1, r = new Le(null, null), o = r; !n; )
3138
+ function Wr(i) {
3139
+ for (var e = i, t = [], n = !1, r = new xe(null, null), o = r; !n; )
3121
3140
  e ? (t.push(e), e = e.left) : t.length > 0 ? (e = o = o.next = t.pop(), e = e.right) : n = !0;
3122
3141
  return o.next = null, r.next;
3123
3142
  }
3124
- function Rt(i, e, t) {
3143
+ function At(i, e, t) {
3125
3144
  var n = t - e;
3126
3145
  if (n > 0) {
3127
- var r = e + Math.floor(n / 2), o = Rt(i, e, r), l = i.head;
3128
- return l.left = o, i.head = i.head.next, l.right = Rt(i, r + 1, t), l;
3146
+ var r = e + Math.floor(n / 2), o = At(i, e, r), u = i.head;
3147
+ return u.left = o, i.head = i.head.next, u.right = At(i, r + 1, t), u;
3129
3148
  }
3130
3149
  return null;
3131
3150
  }
3132
- function Nr(i, e, t) {
3133
- for (var n = new Le(null, null), r = n, o = i, l = e; o !== null && l !== null; )
3134
- t(o.key, l.key) < 0 ? (r.next = o, o = o.next) : (r.next = l, l = l.next), r = r.next;
3135
- return o !== null ? r.next = o : l !== null && (r.next = l), n.next;
3151
+ function Ar(i, e, t) {
3152
+ for (var n = new xe(null, null), r = n, o = i, u = e; o !== null && u !== null; )
3153
+ t(o.key, u.key) < 0 ? (r.next = o, o = o.next) : (r.next = u, u = u.next), r = r.next;
3154
+ return o !== null ? r.next = o : u !== null && (r.next = u), n.next;
3136
3155
  }
3137
- function It(i, e, t, n, r) {
3156
+ function zt(i, e, t, n, r) {
3138
3157
  if (!(t >= n)) {
3139
- for (var o = i[t + n >> 1], l = t - 1, s = n + 1; ; ) {
3158
+ for (var o = i[t + n >> 1], u = t - 1, s = n + 1; ; ) {
3140
3159
  do
3141
- l++;
3142
- while (r(i[l], o) < 0);
3160
+ u++;
3161
+ while (r(i[u], o) < 0);
3143
3162
  do
3144
3163
  s--;
3145
3164
  while (r(i[s], o) > 0);
3146
- if (l >= s)
3165
+ if (u >= s)
3147
3166
  break;
3148
- var c = i[l];
3149
- i[l] = i[s], i[s] = c, c = e[l], e[l] = e[s], e[s] = c;
3167
+ var c = i[u];
3168
+ i[u] = i[s], i[s] = c, c = e[u], e[u] = e[s], e[s] = c;
3150
3169
  }
3151
- It(i, e, t, s, r), It(i, e, s + 1, n, r);
3170
+ zt(i, e, t, s, r), zt(i, e, s + 1, n, r);
3152
3171
  }
3153
3172
  }
3154
- const he = 11102230246251565e-32, Y = 134217729, Pr = (3 + 8 * he) * he;
3155
- function xt(i, e, t, n, r) {
3156
- let o, l, s, c, u = e[0], h = n[0], a = 0, f = 0;
3157
- h > u == h > -u ? (o = u, u = e[++a]) : (o = h, h = n[++f]);
3158
- let d = 0;
3173
+ const he = 11102230246251565e-32, Y = 134217729, zr = (3 + 8 * he) * he;
3174
+ function Nt(i, e, t, n, r) {
3175
+ let o, u, s, c, l = e[0], d = n[0], a = 0, f = 0;
3176
+ d > l == d > -l ? (o = l, l = e[++a]) : (o = d, d = n[++f]);
3177
+ let h = 0;
3159
3178
  if (a < i && f < t)
3160
- for (h > u == h > -u ? (l = u + o, s = o - (l - u), u = e[++a]) : (l = h + o, s = o - (l - h), h = n[++f]), o = l, s !== 0 && (r[d++] = s); a < i && f < t; )
3161
- h > u == h > -u ? (l = o + u, c = l - o, s = o - (l - c) + (u - c), u = e[++a]) : (l = o + h, c = l - o, s = o - (l - c) + (h - c), h = n[++f]), o = l, s !== 0 && (r[d++] = s);
3179
+ for (d > l == d > -l ? (u = l + o, s = o - (u - l), l = e[++a]) : (u = d + o, s = o - (u - d), d = n[++f]), o = u, s !== 0 && (r[h++] = s); a < i && f < t; )
3180
+ d > l == d > -l ? (u = o + l, c = u - o, s = o - (u - c) + (l - c), l = e[++a]) : (u = o + d, c = u - o, s = o - (u - c) + (d - c), d = n[++f]), o = u, s !== 0 && (r[h++] = s);
3162
3181
  for (; a < i; )
3163
- l = o + u, c = l - o, s = o - (l - c) + (u - c), u = e[++a], o = l, s !== 0 && (r[d++] = s);
3182
+ u = o + l, c = u - o, s = o - (u - c) + (l - c), l = e[++a], o = u, s !== 0 && (r[h++] = s);
3164
3183
  for (; f < t; )
3165
- l = o + h, c = l - o, s = o - (l - c) + (h - c), h = n[++f], o = l, s !== 0 && (r[d++] = s);
3166
- return (o !== 0 || d === 0) && (r[d++] = o), d;
3184
+ u = o + d, c = u - o, s = o - (u - c) + (d - c), d = n[++f], o = u, s !== 0 && (r[h++] = s);
3185
+ return (o !== 0 || h === 0) && (r[h++] = o), h;
3167
3186
  }
3168
- function Tr(i, e) {
3187
+ function Br(i, e) {
3169
3188
  let t = e[0];
3170
3189
  for (let n = 1; n < i; n++) t += e[n];
3171
3190
  return t;
3172
3191
  }
3173
- function Ve(i) {
3192
+ function Je(i) {
3174
3193
  return new Float64Array(i);
3175
3194
  }
3176
- const Rr = (3 + 16 * he) * he, Ir = (2 + 12 * he) * he, Or = (9 + 64 * he) * he * he, Oe = Ve(4), fi = Ve(8), di = Ve(12), hi = Ve(16), K = Ve(4);
3177
- function Wr(i, e, t, n, r, o, l) {
3178
- let s, c, u, h, a, f, d, g, p, v, b, S, E, _, C, x, L, w;
3179
- const k = i - r, I = t - r, D = e - o, z = n - o;
3180
- _ = k * z, f = Y * k, d = f - (f - k), g = k - d, f = Y * z, p = f - (f - z), v = z - p, C = g * v - (_ - d * p - g * p - d * v), x = D * I, f = Y * D, d = f - (f - D), g = D - d, f = Y * I, p = f - (f - I), v = I - p, L = g * v - (x - d * p - g * p - d * v), b = C - L, a = C - b, Oe[0] = C - (b + a) + (a - L), S = _ + b, a = S - _, E = _ - (S - a) + (b - a), b = E - x, a = E - b, Oe[1] = E - (b + a) + (a - x), w = S + b, a = w - S, Oe[2] = S - (w - a) + (b - a), Oe[3] = w;
3181
- let O = Tr(4, Oe), M = Ir * l;
3182
- if (O >= M || -O >= M || (a = i - k, s = i - (k + a) + (a - r), a = t - I, u = t - (I + a) + (a - r), a = e - D, c = e - (D + a) + (a - o), a = n - z, h = n - (z + a) + (a - o), s === 0 && c === 0 && u === 0 && h === 0) || (M = Or * l + Pr * Math.abs(O), O += k * h + z * s - (D * u + I * c), O >= M || -O >= M)) return O;
3183
- _ = s * z, f = Y * s, d = f - (f - s), g = s - d, f = Y * z, p = f - (f - z), v = z - p, C = g * v - (_ - d * p - g * p - d * v), x = c * I, f = Y * c, d = f - (f - c), g = c - d, f = Y * I, p = f - (f - I), v = I - p, L = g * v - (x - d * p - g * p - d * v), b = C - L, a = C - b, K[0] = C - (b + a) + (a - L), S = _ + b, a = S - _, E = _ - (S - a) + (b - a), b = E - x, a = E - b, K[1] = E - (b + a) + (a - x), w = S + b, a = w - S, K[2] = S - (w - a) + (b - a), K[3] = w;
3184
- const G = xt(4, Oe, 4, K, fi);
3185
- _ = k * h, f = Y * k, d = f - (f - k), g = k - d, f = Y * h, p = f - (f - h), v = h - p, C = g * v - (_ - d * p - g * p - d * v), x = D * u, f = Y * D, d = f - (f - D), g = D - d, f = Y * u, p = f - (f - u), v = u - p, L = g * v - (x - d * p - g * p - d * v), b = C - L, a = C - b, K[0] = C - (b + a) + (a - L), S = _ + b, a = S - _, E = _ - (S - a) + (b - a), b = E - x, a = E - b, K[1] = E - (b + a) + (a - x), w = S + b, a = w - S, K[2] = S - (w - a) + (b - a), K[3] = w;
3186
- const $ = xt(G, fi, 4, K, di);
3187
- _ = s * h, f = Y * s, d = f - (f - s), g = s - d, f = Y * h, p = f - (f - h), v = h - p, C = g * v - (_ - d * p - g * p - d * v), x = c * u, f = Y * c, d = f - (f - c), g = c - d, f = Y * u, p = f - (f - u), v = u - p, L = g * v - (x - d * p - g * p - d * v), b = C - L, a = C - b, K[0] = C - (b + a) + (a - L), S = _ + b, a = S - _, E = _ - (S - a) + (b - a), b = E - x, a = E - b, K[1] = E - (b + a) + (a - x), w = S + b, a = w - S, K[2] = S - (w - a) + (b - a), K[3] = w;
3188
- const oe = xt($, di, 4, K, hi);
3189
- return hi[oe - 1];
3190
- }
3191
- function Ar(i, e, t, n, r, o) {
3192
- const l = (e - o) * (t - r), s = (i - r) * (n - o), c = l - s, u = Math.abs(l + s);
3193
- return Math.abs(c) >= Rr * u ? c : -Wr(i, e, t, n, r, o, u);
3194
- }
3195
- const Fe = (i, e) => i.ll.x <= e.x && e.x <= i.ur.x && i.ll.y <= e.y && e.y <= i.ur.y, Ot = (i, e) => {
3195
+ const Dr = (3 + 16 * he) * he, Fr = (2 + 12 * he) * he, Ur = (9 + 64 * he) * he * he, ze = Je(4), gi = Je(8), yi = Je(12), pi = Je(16), K = Je(4);
3196
+ function Gr(i, e, t, n, r, o, u) {
3197
+ let s, c, l, d, a, f, h, g, y, v, b, E, L, _, C, x, S, w;
3198
+ const k = i - r, I = t - r, B = e - o, U = n - o;
3199
+ _ = k * U, f = Y * k, h = f - (f - k), g = k - h, f = Y * U, y = f - (f - U), v = U - y, C = g * v - (_ - h * y - g * y - h * v), x = B * I, f = Y * B, h = f - (f - B), g = B - h, f = Y * I, y = f - (f - I), v = I - y, S = g * v - (x - h * y - g * y - h * v), b = C - S, a = C - b, ze[0] = C - (b + a) + (a - S), E = _ + b, a = E - _, L = _ - (E - a) + (b - a), b = L - x, a = L - b, ze[1] = L - (b + a) + (a - x), w = E + b, a = w - E, ze[2] = E - (w - a) + (b - a), ze[3] = w;
3200
+ let O = Br(4, ze), M = Fr * u;
3201
+ if (O >= M || -O >= M || (a = i - k, s = i - (k + a) + (a - r), a = t - I, l = t - (I + a) + (a - r), a = e - B, c = e - (B + a) + (a - o), a = n - U, d = n - (U + a) + (a - o), s === 0 && c === 0 && l === 0 && d === 0) || (M = Ur * u + zr * Math.abs(O), O += k * d + U * s - (B * l + I * c), O >= M || -O >= M)) return O;
3202
+ _ = s * U, f = Y * s, h = f - (f - s), g = s - h, f = Y * U, y = f - (f - U), v = U - y, C = g * v - (_ - h * y - g * y - h * v), x = c * I, f = Y * c, h = f - (f - c), g = c - h, f = Y * I, y = f - (f - I), v = I - y, S = g * v - (x - h * y - g * y - h * v), b = C - S, a = C - b, K[0] = C - (b + a) + (a - S), E = _ + b, a = E - _, L = _ - (E - a) + (b - a), b = L - x, a = L - b, K[1] = L - (b + a) + (a - x), w = E + b, a = w - E, K[2] = E - (w - a) + (b - a), K[3] = w;
3203
+ const G = Nt(4, ze, 4, K, gi);
3204
+ _ = k * d, f = Y * k, h = f - (f - k), g = k - h, f = Y * d, y = f - (f - d), v = d - y, C = g * v - (_ - h * y - g * y - h * v), x = B * l, f = Y * B, h = f - (f - B), g = B - h, f = Y * l, y = f - (f - l), v = l - y, S = g * v - (x - h * y - g * y - h * v), b = C - S, a = C - b, K[0] = C - (b + a) + (a - S), E = _ + b, a = E - _, L = _ - (E - a) + (b - a), b = L - x, a = L - b, K[1] = L - (b + a) + (a - x), w = E + b, a = w - E, K[2] = E - (w - a) + (b - a), K[3] = w;
3205
+ const $ = Nt(G, gi, 4, K, yi);
3206
+ _ = s * d, f = Y * s, h = f - (f - s), g = s - h, f = Y * d, y = f - (f - d), v = d - y, C = g * v - (_ - h * y - g * y - h * v), x = c * l, f = Y * c, h = f - (f - c), g = c - h, f = Y * l, y = f - (f - l), v = l - y, S = g * v - (x - h * y - g * y - h * v), b = C - S, a = C - b, K[0] = C - (b + a) + (a - S), E = _ + b, a = E - _, L = _ - (E - a) + (b - a), b = L - x, a = L - b, K[1] = L - (b + a) + (a - x), w = E + b, a = w - E, K[2] = E - (w - a) + (b - a), K[3] = w;
3207
+ const pe = Nt($, yi, 4, K, pi);
3208
+ return pi[pe - 1];
3209
+ }
3210
+ function jr(i, e, t, n, r, o) {
3211
+ const u = (e - o) * (t - r), s = (i - r) * (n - o), c = u - s, l = Math.abs(u + s);
3212
+ return Math.abs(c) >= Dr * l ? c : -Gr(i, e, t, n, r, o, l);
3213
+ }
3214
+ const Ze = (i, e) => i.ll.x <= e.x && e.x <= i.ur.x && i.ll.y <= e.y && e.y <= i.ur.y, Bt = (i, e) => {
3196
3215
  if (e.ur.x < i.ll.x || i.ur.x < e.ll.x || e.ur.y < i.ll.y || i.ur.y < e.ll.y) return null;
3197
3216
  const t = i.ll.x < e.ll.x ? e.ll.x : i.ll.x, n = i.ur.x < e.ur.x ? i.ur.x : e.ur.x, r = i.ll.y < e.ll.y ? e.ll.y : i.ll.y, o = i.ur.y < e.ur.y ? i.ur.y : e.ur.y;
3198
3217
  return {
@@ -3206,20 +3225,20 @@ const Fe = (i, e) => i.ll.x <= e.x && e.x <= i.ur.x && i.ll.y <= e.y && e.y <= i
3206
3225
  }
3207
3226
  };
3208
3227
  };
3209
- let be = Number.EPSILON;
3210
- be === void 0 && (be = Math.pow(2, -52));
3211
- const Br = be * be, mi = (i, e) => {
3212
- if (-be < i && i < be && -be < e && e < be)
3228
+ let _e = Number.EPSILON;
3229
+ _e === void 0 && (_e = Math.pow(2, -52));
3230
+ const Zr = _e * _e, bi = (i, e) => {
3231
+ if (-_e < i && i < _e && -_e < e && e < _e)
3213
3232
  return 0;
3214
3233
  const t = i - e;
3215
- return t * t < Br * i * e ? 0 : i < e ? -1 : 1;
3234
+ return t * t < Zr * i * e ? 0 : i < e ? -1 : 1;
3216
3235
  };
3217
- class Dr {
3236
+ class qr {
3218
3237
  constructor() {
3219
3238
  this.reset();
3220
3239
  }
3221
3240
  reset() {
3222
- this.xRounder = new gi(), this.yRounder = new gi();
3241
+ this.xRounder = new vi(), this.yRounder = new vi();
3223
3242
  }
3224
3243
  round(e, t) {
3225
3244
  return {
@@ -3228,9 +3247,9 @@ class Dr {
3228
3247
  };
3229
3248
  }
3230
3249
  }
3231
- class gi {
3250
+ class vi {
3232
3251
  constructor() {
3233
- this.tree = new Ut(), this.round(0);
3252
+ this.tree = new jt(), this.round(0);
3234
3253
  }
3235
3254
  // Note: this can rounds input values backwards or forwards.
3236
3255
  // You might ask, why not restrict this to just rounding
@@ -3241,16 +3260,16 @@ class gi {
3241
3260
  // angle for t-intersections).
3242
3261
  round(e) {
3243
3262
  const t = this.tree.add(e), n = this.tree.prev(t);
3244
- if (n !== null && mi(t.key, n.key) === 0)
3263
+ if (n !== null && bi(t.key, n.key) === 0)
3245
3264
  return this.tree.remove(e), n.key;
3246
3265
  const r = this.tree.next(t);
3247
- return r !== null && mi(t.key, r.key) === 0 ? (this.tree.remove(e), r.key) : e;
3266
+ return r !== null && bi(t.key, r.key) === 0 ? (this.tree.remove(e), r.key) : e;
3248
3267
  }
3249
3268
  }
3250
- const He = new Dr(), lt = (i, e) => i.x * e.y - i.y * e.x, Di = (i, e) => i.x * e.x + i.y * e.y, yi = (i, e, t) => {
3251
- const n = Ar(i.x, i.y, e.x, e.y, t.x, t.y);
3269
+ const Ke = new qr(), ft = (i, e) => i.x * e.y - i.y * e.x, ji = (i, e) => i.x * e.x + i.y * e.y, wi = (i, e, t) => {
3270
+ const n = jr(i.x, i.y, e.x, e.y, t.x, t.y);
3252
3271
  return n > 0 ? -1 : n < 0 ? 1 : 0;
3253
- }, ut = (i) => Math.sqrt(Di(i, i)), Ur = (i, e, t) => {
3272
+ }, dt = (i) => Math.sqrt(ji(i, i)), Qr = (i, e, t) => {
3254
3273
  const n = {
3255
3274
  x: e.x - i.x,
3256
3275
  y: e.y - i.y
@@ -3258,8 +3277,8 @@ const He = new Dr(), lt = (i, e) => i.x * e.y - i.y * e.x, Di = (i, e) => i.x *
3258
3277
  x: t.x - i.x,
3259
3278
  y: t.y - i.y
3260
3279
  };
3261
- return lt(r, n) / ut(r) / ut(n);
3262
- }, Fr = (i, e, t) => {
3280
+ return ft(r, n) / dt(r) / dt(n);
3281
+ }, Hr = (i, e, t) => {
3263
3282
  const n = {
3264
3283
  x: e.x - i.x,
3265
3284
  y: e.y - i.y
@@ -3267,34 +3286,34 @@ const He = new Dr(), lt = (i, e) => i.x * e.y - i.y * e.x, Di = (i, e) => i.x *
3267
3286
  x: t.x - i.x,
3268
3287
  y: t.y - i.y
3269
3288
  };
3270
- return Di(r, n) / ut(r) / ut(n);
3271
- }, pi = (i, e, t) => e.y === 0 ? null : {
3289
+ return ji(r, n) / dt(r) / dt(n);
3290
+ }, _i = (i, e, t) => e.y === 0 ? null : {
3272
3291
  x: i.x + e.x / e.y * (t - i.y),
3273
3292
  y: t
3274
- }, vi = (i, e, t) => e.x === 0 ? null : {
3293
+ }, Ei = (i, e, t) => e.x === 0 ? null : {
3275
3294
  x: t,
3276
3295
  y: i.y + e.y / e.x * (t - i.x)
3277
- }, zr = (i, e, t, n) => {
3278
- if (e.x === 0) return vi(t, n, i.x);
3279
- if (n.x === 0) return vi(i, e, t.x);
3280
- if (e.y === 0) return pi(t, n, i.y);
3281
- if (n.y === 0) return pi(i, e, t.y);
3282
- const r = lt(e, n);
3296
+ }, Vr = (i, e, t, n) => {
3297
+ if (e.x === 0) return Ei(t, n, i.x);
3298
+ if (n.x === 0) return Ei(i, e, t.x);
3299
+ if (e.y === 0) return _i(t, n, i.y);
3300
+ if (n.y === 0) return _i(i, e, t.y);
3301
+ const r = ft(e, n);
3283
3302
  if (r == 0) return null;
3284
3303
  const o = {
3285
3304
  x: t.x - i.x,
3286
3305
  y: t.y - i.y
3287
- }, l = lt(o, e) / r, s = lt(o, n) / r, c = i.x + s * e.x, u = t.x + l * n.x, h = i.y + s * e.y, a = t.y + l * n.y, f = (c + u) / 2, d = (h + a) / 2;
3306
+ }, u = ft(o, e) / r, s = ft(o, n) / r, c = i.x + s * e.x, l = t.x + u * n.x, d = i.y + s * e.y, a = t.y + u * n.y, f = (c + l) / 2, h = (d + a) / 2;
3288
3307
  return {
3289
3308
  x: f,
3290
- y: d
3309
+ y: h
3291
3310
  };
3292
3311
  };
3293
- class ne {
3312
+ class oe {
3294
3313
  // for ordering sweep events in the sweep event queue
3295
3314
  static compare(e, t) {
3296
- const n = ne.comparePoints(e.point, t.point);
3297
- return n !== 0 ? n : (e.point !== t.point && e.link(t), e.isLeft !== t.isLeft ? e.isLeft ? 1 : -1 : we.compare(e.segment, t.segment));
3315
+ const n = oe.comparePoints(e.point, t.point);
3316
+ return n !== 0 ? n : (e.point !== t.point && e.link(t), e.isLeft !== t.isLeft ? e.isLeft ? 1 : -1 : Ee.compare(e.segment, t.segment));
3298
3317
  }
3299
3318
  // for ordering points in sweep line order
3300
3319
  static comparePoints(e, t) {
@@ -3349,25 +3368,25 @@ class ne {
3349
3368
  const t = /* @__PURE__ */ new Map(), n = (r) => {
3350
3369
  const o = r.otherSE;
3351
3370
  t.set(r, {
3352
- sine: Ur(this.point, e.point, o.point),
3353
- cosine: Fr(this.point, e.point, o.point)
3371
+ sine: Qr(this.point, e.point, o.point),
3372
+ cosine: Hr(this.point, e.point, o.point)
3354
3373
  });
3355
3374
  };
3356
3375
  return (r, o) => {
3357
3376
  t.has(r) || n(r), t.has(o) || n(o);
3358
3377
  const {
3359
- sine: l,
3378
+ sine: u,
3360
3379
  cosine: s
3361
3380
  } = t.get(r), {
3362
3381
  sine: c,
3363
- cosine: u
3382
+ cosine: l
3364
3383
  } = t.get(o);
3365
- return l >= 0 && c >= 0 ? s < u ? 1 : s > u ? -1 : 0 : l < 0 && c < 0 ? s < u ? -1 : s > u ? 1 : 0 : c < l ? -1 : c > l ? 1 : 0;
3384
+ return u >= 0 && c >= 0 ? s < l ? 1 : s > l ? -1 : 0 : u < 0 && c < 0 ? s < l ? -1 : s > l ? 1 : 0 : c < u ? -1 : c > u ? 1 : 0;
3366
3385
  };
3367
3386
  }
3368
3387
  }
3369
- let Gr = 0;
3370
- class we {
3388
+ let Yr = 0;
3389
+ class Ee {
3371
3390
  /* This compare() function is for ordering segments in the sweep
3372
3391
  * line tree, and does so according to the following criteria:
3373
3392
  *
@@ -3382,13 +3401,13 @@ class we {
3382
3401
  * is directly on the right-more of the two left inputs.
3383
3402
  */
3384
3403
  static compare(e, t) {
3385
- const n = e.leftSE.point.x, r = t.leftSE.point.x, o = e.rightSE.point.x, l = t.rightSE.point.x;
3386
- if (l < n) return 1;
3404
+ const n = e.leftSE.point.x, r = t.leftSE.point.x, o = e.rightSE.point.x, u = t.rightSE.point.x;
3405
+ if (u < n) return 1;
3387
3406
  if (o < r) return -1;
3388
- const s = e.leftSE.point.y, c = t.leftSE.point.y, u = e.rightSE.point.y, h = t.rightSE.point.y;
3407
+ const s = e.leftSE.point.y, c = t.leftSE.point.y, l = e.rightSE.point.y, d = t.rightSE.point.y;
3389
3408
  if (n < r) {
3390
- if (c < s && c < u) return 1;
3391
- if (c > s && c > u) return -1;
3409
+ if (c < s && c < l) return 1;
3410
+ if (c > s && c > l) return -1;
3392
3411
  const a = e.comparePoint(t.leftSE.point);
3393
3412
  if (a < 0) return 1;
3394
3413
  if (a > 0) return -1;
@@ -3396,8 +3415,8 @@ class we {
3396
3415
  return f !== 0 ? f : -1;
3397
3416
  }
3398
3417
  if (n > r) {
3399
- if (s < c && s < h) return -1;
3400
- if (s > c && s > h) return 1;
3418
+ if (s < c && s < d) return -1;
3419
+ if (s > c && s > d) return 1;
3401
3420
  const a = t.comparePoint(e.leftSE.point);
3402
3421
  if (a !== 0) return a;
3403
3422
  const f = e.comparePoint(t.rightSE.point);
@@ -3405,37 +3424,37 @@ class we {
3405
3424
  }
3406
3425
  if (s < c) return -1;
3407
3426
  if (s > c) return 1;
3408
- if (o < l) {
3427
+ if (o < u) {
3409
3428
  const a = t.comparePoint(e.rightSE.point);
3410
3429
  if (a !== 0) return a;
3411
3430
  }
3412
- if (o > l) {
3431
+ if (o > u) {
3413
3432
  const a = e.comparePoint(t.rightSE.point);
3414
3433
  if (a < 0) return 1;
3415
3434
  if (a > 0) return -1;
3416
3435
  }
3417
- if (o !== l) {
3418
- const a = u - s, f = o - n, d = h - c, g = l - r;
3419
- if (a > f && d < g) return 1;
3420
- if (a < f && d > g) return -1;
3436
+ if (o !== u) {
3437
+ const a = l - s, f = o - n, h = d - c, g = u - r;
3438
+ if (a > f && h < g) return 1;
3439
+ if (a < f && h > g) return -1;
3421
3440
  }
3422
- return o > l ? 1 : o < l || u < h ? -1 : u > h ? 1 : e.id < t.id ? -1 : e.id > t.id ? 1 : 0;
3441
+ return o > u ? 1 : o < u || l < d ? -1 : l > d ? 1 : e.id < t.id ? -1 : e.id > t.id ? 1 : 0;
3423
3442
  }
3424
3443
  /* Warning: a reference to ringWindings input will be stored,
3425
3444
  * and possibly will be later modified */
3426
3445
  constructor(e, t, n, r) {
3427
- this.id = ++Gr, this.leftSE = e, e.segment = this, e.otherSE = t, this.rightSE = t, t.segment = this, t.otherSE = e, this.rings = n, this.windings = r;
3446
+ this.id = ++Yr, this.leftSE = e, e.segment = this, e.otherSE = t, this.rightSE = t, t.segment = this, t.otherSE = e, this.rings = n, this.windings = r;
3428
3447
  }
3429
3448
  static fromRing(e, t, n) {
3430
- let r, o, l;
3431
- const s = ne.comparePoints(e, t);
3449
+ let r, o, u;
3450
+ const s = oe.comparePoints(e, t);
3432
3451
  if (s < 0)
3433
- r = e, o = t, l = 1;
3452
+ r = e, o = t, u = 1;
3434
3453
  else if (s > 0)
3435
- r = t, o = e, l = -1;
3454
+ r = t, o = e, u = -1;
3436
3455
  else throw new Error(`Tried to create degenerate segment at [${e.x}, ${e.y}]`);
3437
- const c = new ne(r, !0), u = new ne(o, !1);
3438
- return new we(c, u, [n], [l]);
3456
+ const c = new oe(r, !0), l = new oe(o, !1);
3457
+ return new Ee(c, l, [n], [u]);
3439
3458
  }
3440
3459
  /* When a segment is split, the rightSE is replaced with a new sweep event */
3441
3460
  replaceRightSE(e) {
@@ -3482,8 +3501,8 @@ class we {
3482
3501
  const t = this.leftSE.point, n = this.rightSE.point, r = this.vector();
3483
3502
  if (t.x === n.x)
3484
3503
  return e.x === t.x ? 0 : e.x < t.x ? 1 : -1;
3485
- const o = (e.y - t.y) / r.y, l = t.x + o * r.x;
3486
- if (e.x === l) return 0;
3504
+ const o = (e.y - t.y) / r.y, u = t.x + o * r.x;
3505
+ if (e.x === u) return 0;
3487
3506
  const s = (e.x - t.x) / r.x, c = t.y + s * r.y;
3488
3507
  return e.y === c ? 0 : e.y < c ? -1 : 1;
3489
3508
  }
@@ -3503,20 +3522,20 @@ class we {
3503
3522
  * Else, return null.
3504
3523
  */
3505
3524
  getIntersection(e) {
3506
- const t = this.bbox(), n = e.bbox(), r = Ot(t, n);
3525
+ const t = this.bbox(), n = e.bbox(), r = Bt(t, n);
3507
3526
  if (r === null) return null;
3508
- const o = this.leftSE.point, l = this.rightSE.point, s = e.leftSE.point, c = e.rightSE.point, u = Fe(t, s) && this.comparePoint(s) === 0, h = Fe(n, o) && e.comparePoint(o) === 0, a = Fe(t, c) && this.comparePoint(c) === 0, f = Fe(n, l) && e.comparePoint(l) === 0;
3509
- if (h && u)
3510
- return f && !a ? l : !f && a ? c : null;
3511
- if (h)
3527
+ const o = this.leftSE.point, u = this.rightSE.point, s = e.leftSE.point, c = e.rightSE.point, l = Ze(t, s) && this.comparePoint(s) === 0, d = Ze(n, o) && e.comparePoint(o) === 0, a = Ze(t, c) && this.comparePoint(c) === 0, f = Ze(n, u) && e.comparePoint(u) === 0;
3528
+ if (d && l)
3529
+ return f && !a ? u : !f && a ? c : null;
3530
+ if (d)
3512
3531
  return a && o.x === c.x && o.y === c.y ? null : o;
3513
- if (u)
3514
- return f && l.x === s.x && l.y === s.y ? null : s;
3532
+ if (l)
3533
+ return f && u.x === s.x && u.y === s.y ? null : s;
3515
3534
  if (f && a) return null;
3516
- if (f) return l;
3535
+ if (f) return u;
3517
3536
  if (a) return c;
3518
- const d = zr(o, this.vector(), s, e.vector());
3519
- return d === null || !Fe(r, d) ? null : He.round(d.x, d.y);
3537
+ const h = Vr(o, this.vector(), s, e.vector());
3538
+ return h === null || !Ze(r, h) ? null : Ke.round(h.x, h.y);
3520
3539
  }
3521
3540
  /**
3522
3541
  * Split the given segment into multiple segments on the given points.
@@ -3531,10 +3550,10 @@ class we {
3531
3550
  * Warning: input array of points is modified
3532
3551
  */
3533
3552
  split(e) {
3534
- const t = [], n = e.events !== void 0, r = new ne(e, !0), o = new ne(e, !1), l = this.rightSE;
3553
+ const t = [], n = e.events !== void 0, r = new oe(e, !0), o = new oe(e, !1), u = this.rightSE;
3535
3554
  this.replaceRightSE(o), t.push(o), t.push(r);
3536
- const s = new we(r, l, this.rings.slice(), this.windings.slice());
3537
- return ne.comparePoints(s.leftSE.point, s.rightSE.point) > 0 && s.swapEvents(), ne.comparePoints(this.leftSE.point, this.rightSE.point) > 0 && this.swapEvents(), n && (r.checkForConsuming(), o.checkForConsuming()), t;
3555
+ const s = new Ee(r, u, this.rings.slice(), this.windings.slice());
3556
+ return oe.comparePoints(s.leftSE.point, s.rightSE.point) > 0 && s.swapEvents(), oe.comparePoints(this.leftSE.point, this.rightSE.point) > 0 && this.swapEvents(), n && (r.checkForConsuming(), o.checkForConsuming()), t;
3538
3557
  }
3539
3558
  /* Swap which event is left and right */
3540
3559
  swapEvents() {
@@ -3549,7 +3568,7 @@ class we {
3549
3568
  let t = this, n = e;
3550
3569
  for (; t.consumedBy; ) t = t.consumedBy;
3551
3570
  for (; n.consumedBy; ) n = n.consumedBy;
3552
- const r = we.compare(t, n);
3571
+ const r = Ee.compare(t, n);
3553
3572
  if (r !== 0) {
3554
3573
  if (r > 0) {
3555
3574
  const o = t;
@@ -3559,9 +3578,9 @@ class we {
3559
3578
  const o = t;
3560
3579
  t = n, n = o;
3561
3580
  }
3562
- for (let o = 0, l = n.rings.length; o < l; o++) {
3563
- const s = n.rings[o], c = n.windings[o], u = t.rings.indexOf(s);
3564
- u === -1 ? (t.rings.push(s), t.windings.push(c)) : t.windings[u] += c;
3581
+ for (let o = 0, u = n.rings.length; o < u; o++) {
3582
+ const s = n.rings[o], c = n.windings[o], l = t.rings.indexOf(s);
3583
+ l === -1 ? (t.rings.push(s), t.windings.push(c)) : t.windings[l] += c;
3565
3584
  }
3566
3585
  n.rings = null, n.windings = null, n.consumedBy = t, n.leftSE.consumedBy = t.leftSE, n.rightSE.consumedBy = t.rightSE;
3567
3586
  }
@@ -3593,24 +3612,24 @@ class we {
3593
3612
  };
3594
3613
  const t = this._afterState.rings, n = this._afterState.windings, r = this._afterState.multiPolys;
3595
3614
  for (let s = 0, c = this.rings.length; s < c; s++) {
3596
- const u = this.rings[s], h = this.windings[s], a = t.indexOf(u);
3597
- a === -1 ? (t.push(u), n.push(h)) : n[a] += h;
3615
+ const l = this.rings[s], d = this.windings[s], a = t.indexOf(l);
3616
+ a === -1 ? (t.push(l), n.push(d)) : n[a] += d;
3598
3617
  }
3599
- const o = [], l = [];
3618
+ const o = [], u = [];
3600
3619
  for (let s = 0, c = t.length; s < c; s++) {
3601
3620
  if (n[s] === 0) continue;
3602
- const u = t[s], h = u.poly;
3603
- if (l.indexOf(h) === -1)
3604
- if (u.isExterior) o.push(h);
3621
+ const l = t[s], d = l.poly;
3622
+ if (u.indexOf(d) === -1)
3623
+ if (l.isExterior) o.push(d);
3605
3624
  else {
3606
- l.indexOf(h) === -1 && l.push(h);
3607
- const a = o.indexOf(u.poly);
3625
+ u.indexOf(d) === -1 && u.push(d);
3626
+ const a = o.indexOf(l.poly);
3608
3627
  a !== -1 && o.splice(a, 1);
3609
3628
  }
3610
3629
  }
3611
3630
  for (let s = 0, c = o.length; s < c; s++) {
3612
- const u = o[s].multiPoly;
3613
- r.indexOf(u) === -1 && r.push(u);
3631
+ const l = o[s].multiPoly;
3632
+ r.indexOf(l) === -1 && r.push(l);
3614
3633
  }
3615
3634
  return this._afterState;
3616
3635
  }
@@ -3619,7 +3638,7 @@ class we {
3619
3638
  if (this.consumedBy) return !1;
3620
3639
  if (this._isInResult !== void 0) return this._isInResult;
3621
3640
  const e = this.beforeState().multiPolys, t = this.afterState().multiPolys;
3622
- switch (le.type) {
3641
+ switch (ae.type) {
3623
3642
  case "union": {
3624
3643
  const n = e.length === 0, r = t.length === 0;
3625
3644
  this._isInResult = n !== r;
@@ -3627,7 +3646,7 @@ class we {
3627
3646
  }
3628
3647
  case "intersection": {
3629
3648
  let n, r;
3630
- e.length < t.length ? (n = e.length, r = t.length) : (n = t.length, r = e.length), this._isInResult = r === le.numMultiPolys && n < r;
3649
+ e.length < t.length ? (n = e.length, r = t.length) : (n = t.length, r = e.length), this._isInResult = r === ae.numMultiPolys && n < r;
3631
3650
  break;
3632
3651
  }
3633
3652
  case "xor": {
@@ -3641,18 +3660,18 @@ class we {
3641
3660
  break;
3642
3661
  }
3643
3662
  default:
3644
- throw new Error(`Unrecognized operation type found ${le.type}`);
3663
+ throw new Error(`Unrecognized operation type found ${ae.type}`);
3645
3664
  }
3646
3665
  return this._isInResult;
3647
3666
  }
3648
3667
  }
3649
- class bi {
3668
+ class Li {
3650
3669
  constructor(e, t, n) {
3651
3670
  if (!Array.isArray(e) || e.length === 0)
3652
3671
  throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
3653
3672
  if (this.poly = t, this.isExterior = n, this.segments = [], typeof e[0][0] != "number" || typeof e[0][1] != "number")
3654
3673
  throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
3655
- const r = He.round(e[0][0], e[0][1]);
3674
+ const r = Ke.round(e[0][0], e[0][1]);
3656
3675
  this.bbox = {
3657
3676
  ll: {
3658
3677
  x: r.x,
@@ -3664,13 +3683,13 @@ class bi {
3664
3683
  }
3665
3684
  };
3666
3685
  let o = r;
3667
- for (let l = 1, s = e.length; l < s; l++) {
3668
- if (typeof e[l][0] != "number" || typeof e[l][1] != "number")
3686
+ for (let u = 1, s = e.length; u < s; u++) {
3687
+ if (typeof e[u][0] != "number" || typeof e[u][1] != "number")
3669
3688
  throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
3670
- let c = He.round(e[l][0], e[l][1]);
3671
- c.x === o.x && c.y === o.y || (this.segments.push(we.fromRing(o, c, this)), c.x < this.bbox.ll.x && (this.bbox.ll.x = c.x), c.y < this.bbox.ll.y && (this.bbox.ll.y = c.y), c.x > this.bbox.ur.x && (this.bbox.ur.x = c.x), c.y > this.bbox.ur.y && (this.bbox.ur.y = c.y), o = c);
3689
+ let c = Ke.round(e[u][0], e[u][1]);
3690
+ c.x === o.x && c.y === o.y || (this.segments.push(Ee.fromRing(o, c, this)), c.x < this.bbox.ll.x && (this.bbox.ll.x = c.x), c.y < this.bbox.ll.y && (this.bbox.ll.y = c.y), c.x > this.bbox.ur.x && (this.bbox.ur.x = c.x), c.y > this.bbox.ur.y && (this.bbox.ur.y = c.y), o = c);
3672
3691
  }
3673
- (r.x !== o.x || r.y !== o.y) && this.segments.push(we.fromRing(o, r, this));
3692
+ (r.x !== o.x || r.y !== o.y) && this.segments.push(Ee.fromRing(o, r, this));
3674
3693
  }
3675
3694
  getSweepEvents() {
3676
3695
  const e = [];
@@ -3681,11 +3700,11 @@ class bi {
3681
3700
  return e;
3682
3701
  }
3683
3702
  }
3684
- class jr {
3703
+ class Xr {
3685
3704
  constructor(e, t) {
3686
3705
  if (!Array.isArray(e))
3687
3706
  throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
3688
- this.exteriorRing = new bi(e[0], this, !0), this.bbox = {
3707
+ this.exteriorRing = new Li(e[0], this, !0), this.bbox = {
3689
3708
  ll: {
3690
3709
  x: this.exteriorRing.bbox.ll.x,
3691
3710
  y: this.exteriorRing.bbox.ll.y
@@ -3696,7 +3715,7 @@ class jr {
3696
3715
  }
3697
3716
  }, this.interiorRings = [];
3698
3717
  for (let n = 1, r = e.length; n < r; n++) {
3699
- const o = new bi(e[n], this, !1);
3718
+ const o = new Li(e[n], this, !1);
3700
3719
  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.interiorRings.push(o);
3701
3720
  }
3702
3721
  this.multiPoly = t;
@@ -3705,13 +3724,13 @@ class jr {
3705
3724
  const e = this.exteriorRing.getSweepEvents();
3706
3725
  for (let t = 0, n = this.interiorRings.length; t < n; t++) {
3707
3726
  const r = this.interiorRings[t].getSweepEvents();
3708
- for (let o = 0, l = r.length; o < l; o++)
3727
+ for (let o = 0, u = r.length; o < u; o++)
3709
3728
  e.push(r[o]);
3710
3729
  }
3711
3730
  return e;
3712
3731
  }
3713
3732
  }
3714
- class wi {
3733
+ class Si {
3715
3734
  constructor(e, t) {
3716
3735
  if (!Array.isArray(e))
3717
3736
  throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
@@ -3730,7 +3749,7 @@ class wi {
3730
3749
  }
3731
3750
  };
3732
3751
  for (let n = 0, r = e.length; n < r; n++) {
3733
- const o = new jr(e[n], this);
3752
+ const o = new Xr(e[n], this);
3734
3753
  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);
3735
3754
  }
3736
3755
  this.isSubject = t;
@@ -3739,13 +3758,13 @@ class wi {
3739
3758
  const e = [];
3740
3759
  for (let t = 0, n = this.polys.length; t < n; t++) {
3741
3760
  const r = this.polys[t].getSweepEvents();
3742
- for (let o = 0, l = r.length; o < l; o++)
3761
+ for (let o = 0, u = r.length; o < u; o++)
3743
3762
  e.push(r[o]);
3744
3763
  }
3745
3764
  return e;
3746
3765
  }
3747
3766
  }
3748
- class at {
3767
+ class ht {
3749
3768
  /* Given the segments from the sweep line pass, compute & return a series
3750
3769
  * of closed rings from all the segments marked to be part of the result */
3751
3770
  static factory(e) {
@@ -3753,39 +3772,39 @@ class at {
3753
3772
  for (let n = 0, r = e.length; n < r; n++) {
3754
3773
  const o = e[n];
3755
3774
  if (!o.isInResult() || o.ringOut) continue;
3756
- let l = null, s = o.leftSE, c = o.rightSE;
3757
- const u = [s], h = s.point, a = [];
3758
- for (; l = s, s = c, u.push(s), s.point !== h; )
3775
+ let u = null, s = o.leftSE, c = o.rightSE;
3776
+ const l = [s], d = s.point, a = [];
3777
+ for (; u = s, s = c, l.push(s), s.point !== d; )
3759
3778
  for (; ; ) {
3760
3779
  const f = s.getAvailableLinkedEvents();
3761
3780
  if (f.length === 0) {
3762
- const p = u[0].point, v = u[u.length - 1].point;
3763
- throw new Error(`Unable to complete output ring starting at [${p.x}, ${p.y}]. Last matching segment found ends at [${v.x}, ${v.y}].`);
3781
+ const y = l[0].point, v = l[l.length - 1].point;
3782
+ throw new Error(`Unable to complete output ring starting at [${y.x}, ${y.y}]. Last matching segment found ends at [${v.x}, ${v.y}].`);
3764
3783
  }
3765
3784
  if (f.length === 1) {
3766
3785
  c = f[0].otherSE;
3767
3786
  break;
3768
3787
  }
3769
- let d = null;
3770
- for (let p = 0, v = a.length; p < v; p++)
3771
- if (a[p].point === s.point) {
3772
- d = p;
3788
+ let h = null;
3789
+ for (let y = 0, v = a.length; y < v; y++)
3790
+ if (a[y].point === s.point) {
3791
+ h = y;
3773
3792
  break;
3774
3793
  }
3775
- if (d !== null) {
3776
- const p = a.splice(d)[0], v = u.splice(p.index);
3777
- v.unshift(v[0].otherSE), t.push(new at(v.reverse()));
3794
+ if (h !== null) {
3795
+ const y = a.splice(h)[0], v = l.splice(y.index);
3796
+ v.unshift(v[0].otherSE), t.push(new ht(v.reverse()));
3778
3797
  continue;
3779
3798
  }
3780
3799
  a.push({
3781
- index: u.length,
3800
+ index: l.length,
3782
3801
  point: s.point
3783
3802
  });
3784
- const g = s.getLeftmostComparator(l);
3803
+ const g = s.getLeftmostComparator(u);
3785
3804
  c = f.sort(g)[0].otherSE;
3786
3805
  break;
3787
3806
  }
3788
- t.push(new at(u));
3807
+ t.push(new ht(l));
3789
3808
  }
3790
3809
  return t;
3791
3810
  }
@@ -3798,15 +3817,15 @@ class at {
3798
3817
  getGeom() {
3799
3818
  let e = this.events[0].point;
3800
3819
  const t = [e];
3801
- for (let u = 1, h = this.events.length - 1; u < h; u++) {
3802
- const a = this.events[u].point, f = this.events[u + 1].point;
3803
- yi(a, e, f) !== 0 && (t.push(a), e = a);
3820
+ for (let l = 1, d = this.events.length - 1; l < d; l++) {
3821
+ const a = this.events[l].point, f = this.events[l + 1].point;
3822
+ wi(a, e, f) !== 0 && (t.push(a), e = a);
3804
3823
  }
3805
3824
  if (t.length === 1) return null;
3806
3825
  const n = t[0], r = t[1];
3807
- yi(n, e, r) === 0 && t.shift(), t.push(t[0]);
3808
- const o = this.isExteriorRing() ? 1 : -1, l = this.isExteriorRing() ? 0 : t.length - 1, s = this.isExteriorRing() ? t.length : -1, c = [];
3809
- for (let u = l; u != s; u += o) c.push([t[u].x, t[u].y]);
3826
+ wi(n, e, r) === 0 && t.shift(), t.push(t[0]);
3827
+ const o = this.isExteriorRing() ? 1 : -1, u = this.isExteriorRing() ? 0 : t.length - 1, s = this.isExteriorRing() ? t.length : -1, c = [];
3828
+ for (let l = u; l != s; l += o) c.push([t[l].x, t[l].y]);
3810
3829
  return c;
3811
3830
  }
3812
3831
  isExteriorRing() {
@@ -3823,8 +3842,8 @@ class at {
3823
3842
  _calcEnclosingRing() {
3824
3843
  let e = this.events[0];
3825
3844
  for (let r = 1, o = this.events.length; r < o; r++) {
3826
- const l = this.events[r];
3827
- ne.compare(e, l) > 0 && (e = l);
3845
+ const u = this.events[r];
3846
+ oe.compare(e, u) > 0 && (e = u);
3828
3847
  }
3829
3848
  let t = e.segment.prevInResult(), n = t ? t.prevInResult() : null;
3830
3849
  for (; ; ) {
@@ -3836,7 +3855,7 @@ class at {
3836
3855
  }
3837
3856
  }
3838
3857
  }
3839
- class _i {
3858
+ class xi {
3840
3859
  constructor(e) {
3841
3860
  this.exteriorRing = e, e.poly = this, this.interiorRings = [];
3842
3861
  }
@@ -3853,7 +3872,7 @@ class _i {
3853
3872
  return e;
3854
3873
  }
3855
3874
  }
3856
- class Zr {
3875
+ class Kr {
3857
3876
  constructor(e) {
3858
3877
  this.rings = e, this.polys = this._composePolys(e);
3859
3878
  }
@@ -3870,19 +3889,19 @@ class Zr {
3870
3889
  for (let n = 0, r = e.length; n < r; n++) {
3871
3890
  const o = e[n];
3872
3891
  if (!o.poly)
3873
- if (o.isExteriorRing()) t.push(new _i(o));
3892
+ if (o.isExteriorRing()) t.push(new xi(o));
3874
3893
  else {
3875
- const l = o.enclosingRing();
3876
- l.poly || t.push(new _i(l)), l.poly.addInterior(o);
3894
+ const u = o.enclosingRing();
3895
+ u.poly || t.push(new xi(u)), u.poly.addInterior(o);
3877
3896
  }
3878
3897
  }
3879
3898
  return t;
3880
3899
  }
3881
3900
  }
3882
- class qr {
3901
+ class Jr {
3883
3902
  constructor(e) {
3884
- let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : we.compare;
3885
- this.queue = e, this.tree = new Ut(t), this.segments = [];
3903
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Ee.compare;
3904
+ this.queue = e, this.tree = new jt(t), this.segments = [];
3886
3905
  }
3887
3906
  process(e) {
3888
3907
  const t = e.segment, n = [];
@@ -3890,51 +3909,51 @@ class qr {
3890
3909
  return e.isLeft ? this.queue.remove(e.otherSE) : this.tree.remove(t), n;
3891
3910
  const r = e.isLeft ? this.tree.add(t) : this.tree.find(t);
3892
3911
  if (!r) throw new Error(`Unable to find segment #${t.id} [${t.leftSE.point.x}, ${t.leftSE.point.y}] -> [${t.rightSE.point.x}, ${t.rightSE.point.y}] in SweepLine tree.`);
3893
- let o = r, l = r, s, c;
3912
+ let o = r, u = r, s, c;
3894
3913
  for (; s === void 0; )
3895
3914
  o = this.tree.prev(o), o === null ? s = null : o.key.consumedBy === void 0 && (s = o.key);
3896
3915
  for (; c === void 0; )
3897
- l = this.tree.next(l), l === null ? c = null : l.key.consumedBy === void 0 && (c = l.key);
3916
+ u = this.tree.next(u), u === null ? c = null : u.key.consumedBy === void 0 && (c = u.key);
3898
3917
  if (e.isLeft) {
3899
- let u = null;
3918
+ let l = null;
3900
3919
  if (s) {
3901
3920
  const a = s.getIntersection(t);
3902
- if (a !== null && (t.isAnEndpoint(a) || (u = a), !s.isAnEndpoint(a))) {
3921
+ if (a !== null && (t.isAnEndpoint(a) || (l = a), !s.isAnEndpoint(a))) {
3903
3922
  const f = this._splitSafely(s, a);
3904
- for (let d = 0, g = f.length; d < g; d++)
3905
- n.push(f[d]);
3923
+ for (let h = 0, g = f.length; h < g; h++)
3924
+ n.push(f[h]);
3906
3925
  }
3907
3926
  }
3908
- let h = null;
3927
+ let d = null;
3909
3928
  if (c) {
3910
3929
  const a = c.getIntersection(t);
3911
- if (a !== null && (t.isAnEndpoint(a) || (h = a), !c.isAnEndpoint(a))) {
3930
+ if (a !== null && (t.isAnEndpoint(a) || (d = a), !c.isAnEndpoint(a))) {
3912
3931
  const f = this._splitSafely(c, a);
3913
- for (let d = 0, g = f.length; d < g; d++)
3914
- n.push(f[d]);
3932
+ for (let h = 0, g = f.length; h < g; h++)
3933
+ n.push(f[h]);
3915
3934
  }
3916
3935
  }
3917
- if (u !== null || h !== null) {
3936
+ if (l !== null || d !== null) {
3918
3937
  let a = null;
3919
- u === null ? a = h : h === null ? a = u : a = ne.comparePoints(u, h) <= 0 ? u : h, this.queue.remove(t.rightSE), n.push(t.rightSE);
3938
+ l === null ? a = d : d === null ? a = l : a = oe.comparePoints(l, d) <= 0 ? l : d, this.queue.remove(t.rightSE), n.push(t.rightSE);
3920
3939
  const f = t.split(a);
3921
- for (let d = 0, g = f.length; d < g; d++)
3922
- n.push(f[d]);
3940
+ for (let h = 0, g = f.length; h < g; h++)
3941
+ n.push(f[h]);
3923
3942
  }
3924
3943
  n.length > 0 ? (this.tree.remove(t), n.push(e)) : (this.segments.push(t), t.prev = s);
3925
3944
  } else {
3926
3945
  if (s && c) {
3927
- const u = s.getIntersection(c);
3928
- if (u !== null) {
3929
- if (!s.isAnEndpoint(u)) {
3930
- const h = this._splitSafely(s, u);
3931
- for (let a = 0, f = h.length; a < f; a++)
3932
- n.push(h[a]);
3946
+ const l = s.getIntersection(c);
3947
+ if (l !== null) {
3948
+ if (!s.isAnEndpoint(l)) {
3949
+ const d = this._splitSafely(s, l);
3950
+ for (let a = 0, f = d.length; a < f; a++)
3951
+ n.push(d[a]);
3933
3952
  }
3934
- if (!c.isAnEndpoint(u)) {
3935
- const h = this._splitSafely(c, u);
3936
- for (let a = 0, f = h.length; a < f; a++)
3937
- n.push(h[a]);
3953
+ if (!c.isAnEndpoint(l)) {
3954
+ const d = this._splitSafely(c, l);
3955
+ for (let a = 0, f = d.length; a < f; a++)
3956
+ n.push(d[a]);
3938
3957
  }
3939
3958
  }
3940
3959
  }
@@ -3952,112 +3971,112 @@ class qr {
3952
3971
  return r.push(n), e.consumedBy === void 0 && this.tree.add(e), r;
3953
3972
  }
3954
3973
  }
3955
- const Ei = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE || 1e6, Qr = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS || 1e6;
3956
- class Hr {
3974
+ const Mi = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE || 1e6, $r = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS || 1e6;
3975
+ class eo {
3957
3976
  run(e, t, n) {
3958
- le.type = e, He.reset();
3959
- const r = [new wi(t, !0)];
3977
+ ae.type = e, Ke.reset();
3978
+ const r = [new Si(t, !0)];
3960
3979
  for (let a = 0, f = n.length; a < f; a++)
3961
- r.push(new wi(n[a], !1));
3962
- if (le.numMultiPolys = r.length, le.type === "difference") {
3980
+ r.push(new Si(n[a], !1));
3981
+ if (ae.numMultiPolys = r.length, ae.type === "difference") {
3963
3982
  const a = r[0];
3964
3983
  let f = 1;
3965
3984
  for (; f < r.length; )
3966
- Ot(r[f].bbox, a.bbox) !== null ? f++ : r.splice(f, 1);
3985
+ Bt(r[f].bbox, a.bbox) !== null ? f++ : r.splice(f, 1);
3967
3986
  }
3968
- if (le.type === "intersection")
3987
+ if (ae.type === "intersection")
3969
3988
  for (let a = 0, f = r.length; a < f; a++) {
3970
- const d = r[a];
3971
- for (let g = a + 1, p = r.length; g < p; g++)
3972
- if (Ot(d.bbox, r[g].bbox) === null) return [];
3989
+ const h = r[a];
3990
+ for (let g = a + 1, y = r.length; g < y; g++)
3991
+ if (Bt(h.bbox, r[g].bbox) === null) return [];
3973
3992
  }
3974
- const o = new Ut(ne.compare);
3993
+ const o = new jt(oe.compare);
3975
3994
  for (let a = 0, f = r.length; a < f; a++) {
3976
- const d = r[a].getSweepEvents();
3977
- for (let g = 0, p = d.length; g < p; g++)
3978
- if (o.insert(d[g]), o.size > Ei)
3995
+ const h = r[a].getSweepEvents();
3996
+ for (let g = 0, y = h.length; g < y; g++)
3997
+ if (o.insert(h[g]), o.size > Mi)
3979
3998
  throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big).");
3980
3999
  }
3981
- const l = new qr(o);
4000
+ const u = new Jr(o);
3982
4001
  let s = o.size, c = o.pop();
3983
4002
  for (; c; ) {
3984
4003
  const a = c.key;
3985
4004
  if (o.size === s) {
3986
- const d = a.segment;
3987
- throw new Error(`Unable to pop() ${a.isLeft ? "left" : "right"} SweepEvent [${a.point.x}, ${a.point.y}] from segment #${d.id} [${d.leftSE.point.x}, ${d.leftSE.point.y}] -> [${d.rightSE.point.x}, ${d.rightSE.point.y}] from queue.`);
4005
+ const h = a.segment;
4006
+ throw new Error(`Unable to pop() ${a.isLeft ? "left" : "right"} SweepEvent [${a.point.x}, ${a.point.y}] from segment #${h.id} [${h.leftSE.point.x}, ${h.leftSE.point.y}] -> [${h.rightSE.point.x}, ${h.rightSE.point.y}] from queue.`);
3988
4007
  }
3989
- if (o.size > Ei)
4008
+ if (o.size > Mi)
3990
4009
  throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big).");
3991
- if (l.segments.length > Qr)
4010
+ if (u.segments.length > $r)
3992
4011
  throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments).");
3993
- const f = l.process(a);
3994
- for (let d = 0, g = f.length; d < g; d++) {
3995
- const p = f[d];
3996
- p.consumedBy === void 0 && o.insert(p);
4012
+ const f = u.process(a);
4013
+ for (let h = 0, g = f.length; h < g; h++) {
4014
+ const y = f[h];
4015
+ y.consumedBy === void 0 && o.insert(y);
3997
4016
  }
3998
4017
  s = o.size, c = o.pop();
3999
4018
  }
4000
- He.reset();
4001
- const u = at.factory(l.segments);
4002
- return new Zr(u).getGeom();
4019
+ Ke.reset();
4020
+ const l = ht.factory(u.segments);
4021
+ return new Kr(l).getGeom();
4003
4022
  }
4004
4023
  }
4005
- const le = new Hr(), Vr = function(i) {
4024
+ const ae = new eo(), to = function(i) {
4006
4025
  for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), n = 1; n < e; n++)
4007
4026
  t[n - 1] = arguments[n];
4008
- return le.run("union", i, t);
4009
- }, Yr = function(i) {
4027
+ return ae.run("union", i, t);
4028
+ }, io = function(i) {
4010
4029
  for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), n = 1; n < e; n++)
4011
4030
  t[n - 1] = arguments[n];
4012
- return le.run("intersection", i, t);
4013
- }, Xr = function(i) {
4031
+ return ae.run("intersection", i, t);
4032
+ }, no = function(i) {
4014
4033
  for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), n = 1; n < e; n++)
4015
4034
  t[n - 1] = arguments[n];
4016
- return le.run("xor", i, t);
4017
- }, Kr = function(i) {
4035
+ return ae.run("xor", i, t);
4036
+ }, ro = function(i) {
4018
4037
  for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), n = 1; n < e; n++)
4019
4038
  t[n - 1] = arguments[n];
4020
- return le.run("difference", i, t);
4039
+ return ae.run("difference", i, t);
4021
4040
  };
4022
- var Ui = {
4023
- union: Vr,
4024
- intersection: Yr,
4025
- xor: Xr,
4026
- difference: Kr
4041
+ var Zi = {
4042
+ union: to,
4043
+ intersection: io,
4044
+ xor: no,
4045
+ difference: ro
4027
4046
  };
4028
- function Jr(i, e = {}) {
4047
+ function oo(i, e = {}) {
4029
4048
  const t = [];
4030
- if (Bt(i, (r) => {
4049
+ if (Ut(i, (r) => {
4031
4050
  t.push(r.coordinates);
4032
4051
  }), t.length < 2)
4033
4052
  throw new Error("Must have at least 2 geometries");
4034
- const n = Ui.union(t[0], ...t.slice(1));
4035
- return n.length === 0 ? null : n.length === 1 ? At(n[0], e.properties) : Ii(n, e.properties);
4053
+ const n = Zi.union(t[0], ...t.slice(1));
4054
+ return n.length === 0 ? null : n.length === 1 ? Ft(n[0], e.properties) : Bi(n, e.properties);
4036
4055
  }
4037
- var Fi = Jr;
4038
- function $r(i) {
4056
+ var qi = oo;
4057
+ function so(i) {
4039
4058
  const e = [];
4040
- if (Bt(i, (r) => {
4059
+ if (Ut(i, (r) => {
4041
4060
  e.push(r.coordinates);
4042
4061
  }), e.length < 2)
4043
4062
  throw new Error("Must have at least two features");
4044
- const t = i.features[0].properties || {}, n = Ui.difference(e[0], ...e.slice(1));
4045
- return n.length === 0 ? null : n.length === 1 ? At(n[0], t) : Ii(n, t);
4063
+ const t = i.features[0].properties || {}, n = Zi.difference(e[0], ...e.slice(1));
4064
+ return n.length === 0 ? null : n.length === 1 ? Ft(n[0], t) : Bi(n, t);
4046
4065
  }
4047
- var eo = $r;
4048
- function to(i) {
4066
+ var lo = so;
4067
+ function uo(i) {
4049
4068
  if (!i)
4050
4069
  throw new Error("geojson is required");
4051
4070
  var e = [];
4052
- return br(i, function(t) {
4071
+ return Mr(i, function(t) {
4053
4072
  e.push(t);
4054
- }), Qe(e);
4073
+ }), Xe(e);
4055
4074
  }
4056
- var io = to;
4057
- function Li(i, e) {
4058
- const t = eo(
4059
- Qe([
4060
- At([
4075
+ var ao = uo;
4076
+ function Ci(i, e) {
4077
+ const t = lo(
4078
+ Xe([
4079
+ Ft([
4061
4080
  [
4062
4081
  [180, 90],
4063
4082
  [-180, 90],
@@ -4072,56 +4091,57 @@ function Li(i, e) {
4072
4091
  if (!t)
4073
4092
  return;
4074
4093
  t.properties = { isMask: !0 };
4075
- const n = Ze(Nt(i)), r = (n[2] - n[0]) / 360 / 1e3, o = n[0] < -180, l = n[2] > 180, s = io(i);
4076
- if (s.features.length > 1 && (o || l))
4094
+ const n = Ve(It(i)), r = (n[2] - n[0]) / 360 / 1e3, o = n[0] < -180, u = n[2] > 180, s = ao(i);
4095
+ if (s.features.length > 1 && (o || u))
4077
4096
  for (const c of s.features) {
4078
- const u = Ze(Nt(c));
4079
- if (l && u[0] < -180 + r)
4080
- for (const h of c.geometry.coordinates)
4081
- for (const a of h)
4097
+ const l = Ve(It(c));
4098
+ if (u && l[0] < -180 + r)
4099
+ for (const d of c.geometry.coordinates)
4100
+ for (const a of d)
4082
4101
  a[0] += 360 - r;
4083
- if (o && u[2] > 180 - r)
4084
- for (const h of c.geometry.coordinates)
4085
- for (const a of h)
4102
+ if (o && l[2] > 180 - r)
4103
+ for (const d of c.geometry.coordinates)
4104
+ for (const a of d)
4086
4105
  a[0] -= 360 - r;
4087
4106
  }
4088
4107
  e(
4089
- Qe([
4090
- s.features.length < 2 ? i : Fi(s) ?? i,
4108
+ Xe([
4109
+ s.features.length < 2 ? i : qi(s) ?? i,
4091
4110
  t
4092
4111
  ])
4093
4112
  );
4094
4113
  }
4095
- function no(i, e = !0, t = !0, n = {}, r = {}, o = (l) => {
4096
- var u, h, a;
4097
- const s = (u = l == null ? void 0 : l.geometry) == null ? void 0 : u.type, c = (h = l == null ? void 0 : l.properties) != null && h.isMask ? 0 : s === "LineString" || s === "MultiLineString" ? 3 : 2;
4114
+ const ki = (i) => {
4115
+ var n, r, o;
4116
+ const e = (n = i == null ? void 0 : i.geometry) == null ? void 0 : n.type, t = (r = i == null ? void 0 : i.properties) != null && r.isMask ? 0 : e === "LineString" || e === "MultiLineString" ? 3 : 2;
4098
4117
  return {
4099
4118
  color: "#3170fe",
4100
4119
  fillColor: "#000",
4101
- fillOpacity: (a = l == null ? void 0 : l.properties) != null && a.isMask ? 0.1 : 0,
4102
- weight: c,
4103
- dashArray: [c, c],
4120
+ fillOpacity: (o = i == null ? void 0 : i.properties) != null && o.isMask ? 0.1 : 0,
4121
+ weight: t,
4122
+ dashArray: [t, t],
4104
4123
  lineCap: "butt"
4105
4124
  };
4106
- }) {
4107
- let l;
4108
- const s = [];
4109
- let c, u;
4110
- const h = de.geoJSON(void 0, {
4111
- style: o,
4125
+ };
4126
+ function co(i, e = !0, t = !0, n = {}, r = {}, o = ki, u = !1) {
4127
+ let s;
4128
+ const c = [];
4129
+ let l, d;
4130
+ const a = ue.geoJSON(void 0, {
4131
+ style: o === !0 ? ki : o === !1 ? void 0 : o ?? void 0,
4112
4132
  interactive: !1
4113
- }).addTo(i), a = (d) => {
4114
- l == null || l({
4133
+ }).addTo(i), f = (g) => {
4134
+ s == null || s({
4115
4135
  type: "mapClick",
4116
- coordinates: [d.latlng.lng, d.latlng.lat]
4136
+ coordinates: [g.latlng.lng, g.latlng.lat]
4117
4137
  });
4118
4138
  };
4119
- function f(d, g = !1) {
4120
- const p = document.createElement("div");
4121
- return new Vn({ props: { displayIn: "leaflet" }, target: p }), new de.Marker(d, {
4122
- interactive: g,
4123
- icon: new de.DivIcon({
4124
- html: p,
4139
+ function h(g, y = !1) {
4140
+ const v = document.createElement("div");
4141
+ return new tr({ props: { displayIn: "leaflet" }, target: v }), new ue.Marker(g, {
4142
+ interactive: y,
4143
+ icon: new ue.DivIcon({
4144
+ html: v,
4125
4145
  className: "",
4126
4146
  iconAnchor: [12, 26],
4127
4147
  iconSize: [25, 30],
@@ -4130,233 +4150,246 @@ function no(i, e = !0, t = !0, n = {}, r = {}, o = (l) => {
4130
4150
  });
4131
4151
  }
4132
4152
  return {
4133
- setEventHandler(d) {
4134
- d ? (l = d, i.on("click", a)) : (l = void 0, i.off("click", a));
4153
+ setEventHandler(g) {
4154
+ g ? (s = g, i.on("click", f)) : (s = void 0, i.off("click", f));
4135
4155
  },
4136
- flyTo(d, g) {
4137
- i.flyTo([d[1], d[0]], g, { duration: 2, ...n });
4156
+ flyTo(g, y) {
4157
+ i.flyTo([g[1], g[0]], y, { duration: 2, ...n });
4138
4158
  },
4139
- fitBounds(d, g, p) {
4159
+ fitBounds(g, y, v) {
4140
4160
  i.flyToBounds(
4141
4161
  [
4142
- [d[1], d[0]],
4143
- [d[3], d[2]]
4162
+ [g[1], g[0]],
4163
+ [g[3], g[2]]
4144
4164
  ],
4145
4165
  {
4146
- padding: [g, g],
4166
+ padding: [y, y],
4147
4167
  duration: 2,
4148
- ...p ? { maxZoom: p } : {},
4168
+ ...v ? { maxZoom: v } : {},
4149
4169
  ...r
4150
4170
  }
4151
4171
  );
4152
4172
  },
4153
- indicateReverse(d) {
4154
- i.getContainer().style.cursor = d ? "crosshair" : "";
4173
+ indicateReverse(g) {
4174
+ i.getContainer().style.cursor = g ? "crosshair" : "";
4155
4175
  },
4156
- setReverseMarker(d) {
4157
- var p;
4176
+ setReverseMarker(g) {
4177
+ var v;
4158
4178
  if (!e)
4159
4179
  return;
4160
- const g = d && [d[1], d[0]];
4161
- u ? g ? u.setLatLng(g) : (u.remove(), u = void 0) : g && (u = (typeof e == "object" ? new de.Marker(g, e) : f(g)).addTo(i), (p = u.getElement()) == null || p.classList.add("marker-reverse"));
4180
+ const y = g && [g[1], g[0]];
4181
+ d ? y ? d.setLatLng(y) : (d.remove(), d = void 0) : y && (e instanceof Function ? d = e(i) ?? void 0 : (d = (typeof e == "object" ? new ue.Marker(y, e) : h(y)).addTo(i), (v = d.getElement()) == null || v.classList.add("marker-reverse")));
4162
4182
  },
4163
- setMarkers(d, g) {
4164
- if (!e)
4165
- return;
4166
- function p(v) {
4167
- h.clearLayers(), v && h.addData(v);
4183
+ setMarkers(g, y) {
4184
+ function v(b) {
4185
+ a.clearLayers(), b && a.addData(b);
4168
4186
  }
4169
- for (const v of s)
4170
- v.remove();
4171
- if (s.length = 0, p(), g) {
4172
- let v = !1;
4173
- if (g.geometry.type === "GeometryCollection") {
4174
- const S = g.geometry.geometries.filter(
4175
- (E) => E.type === "Polygon" || E.type === "MultiPolygon"
4187
+ for (const b of c)
4188
+ b.remove();
4189
+ if (c.length = 0, v(), y) {
4190
+ let b = !1;
4191
+ if (y.geometry.type === "GeometryCollection") {
4192
+ const E = y.geometry.geometries.filter(
4193
+ (L) => L.type === "Polygon" || L.type === "MultiPolygon"
4176
4194
  );
4177
- e: if (S.length > 0) {
4178
- const E = Fi(
4179
- Qe(S.map((_) => qe(_)))
4195
+ e: if (E.length > 0) {
4196
+ const L = qi(
4197
+ Xe(E.map((_) => Ye(_)))
4180
4198
  );
4181
- if (!E)
4199
+ if (!L)
4182
4200
  break e;
4183
- Li(
4201
+ Ci(
4184
4202
  {
4185
- ...g,
4186
- geometry: E.geometry
4203
+ ...y,
4204
+ geometry: L.geometry
4187
4205
  },
4188
- p
4189
- ), v = !0;
4206
+ v
4207
+ ), b = !0;
4190
4208
  } else {
4191
- const E = g.geometry.geometries.filter(
4209
+ const L = y.geometry.geometries.filter(
4192
4210
  (_) => _.type === "LineString" || _.type === "MultiLineString"
4193
4211
  );
4194
- E.length > 0 && (p({
4195
- ...g,
4196
- geometry: { type: "GeometryCollection", geometries: E }
4197
- }), v = !0);
4212
+ L.length > 0 && (v({
4213
+ ...y,
4214
+ geometry: { type: "GeometryCollection", geometries: L }
4215
+ }), b = !0);
4198
4216
  }
4199
4217
  }
4200
- if (!v) {
4201
- if (g.geometry.type === "Polygon" || g.geometry.type === "MultiPolygon")
4202
- Li(g, (S) => {
4203
- if (!S)
4218
+ if (!b) {
4219
+ if (y.geometry.type === "Polygon" || y.geometry.type === "MultiPolygon")
4220
+ Ci(y, (E) => {
4221
+ if (!E)
4204
4222
  return;
4205
- const E = [...S.features], _ = Ze(Nt(g)), C = _[2] - _[0];
4206
- _[0] - C / 4 < -180 && E.push(...Si(S, -360).features), _[2] + C / 4 > 180 && E.push(...Si(S, 360).features), p(Qe(E));
4223
+ const L = [...E.features], _ = Ve(It(y)), C = _[2] - _[0];
4224
+ _[0] - C / 4 < -180 && L.push(...Ni(E, -360).features), _[2] + C / 4 > 180 && L.push(...Ni(E, 360).features), v(Xe(L));
4207
4225
  });
4208
- else if (g.geometry.type === "LineString" || g.geometry.type === "MultiLineString") {
4209
- p(g);
4226
+ else if (y.geometry.type === "LineString" || y.geometry.type === "MultiLineString") {
4227
+ v(y);
4210
4228
  return;
4211
4229
  }
4212
4230
  }
4213
- const b = [g.center[1], g.center[0]];
4214
- s.push(
4215
- (typeof e == "object" ? new de.Marker(b, e) : f(b)).addTo(i)
4216
- );
4231
+ if (!u && y.geometry.type !== "Point")
4232
+ return;
4233
+ if (e instanceof Function) {
4234
+ const E = e(i, y);
4235
+ E && c.push(E.addTo(i));
4236
+ } else if (e) {
4237
+ const E = [y.center[1], y.center[0]];
4238
+ c.push(
4239
+ typeof e == "object" ? new ue.Marker(E, e) : h(E).addTo(i)
4240
+ );
4241
+ }
4217
4242
  }
4218
4243
  if (t)
4219
- for (const v of d ?? []) {
4220
- if (v === g)
4244
+ for (const b of g ?? []) {
4245
+ if (b === y)
4221
4246
  continue;
4222
- const b = [
4223
- v.center[1],
4224
- v.center[0]
4225
- ], S = typeof t == "object" ? new de.Marker(b, t) : f(b, !0);
4226
- S.addTo(i).bindTooltip(
4227
- v.place_type[0] === "reverse" ? v.place_name : v.place_name.replace(/,.*/, ""),
4228
- {
4229
- direction: "top"
4230
- }
4231
- );
4232
- const E = S.getElement();
4233
- E && (E.addEventListener("click", (_) => {
4234
- _.stopPropagation(), l == null || l({ type: "markerClick", id: v.id });
4235
- }), E.addEventListener("mouseenter", () => {
4236
- l == null || l({ type: "markerMouseEnter", id: v.id });
4237
- }), E.addEventListener("mouseleave", () => {
4238
- l == null || l({ type: "markerMouseLeave", id: v.id });
4239
- }), E.classList.toggle("marker-fuzzy", !!v.matching_text)), s.push(S);
4247
+ const E = [
4248
+ b.center[1],
4249
+ b.center[0]
4250
+ ];
4251
+ let L;
4252
+ if (t instanceof Function) {
4253
+ if (L = t(i, b), !L)
4254
+ continue;
4255
+ } else
4256
+ L = (typeof t == "object" ? new ue.Marker(E, t) : h(E, !0)).addTo(i).bindTooltip(
4257
+ b.place_type[0] === "reverse" ? b.place_name : b.place_name.replace(/,.*/, ""),
4258
+ {
4259
+ direction: "top"
4260
+ }
4261
+ );
4262
+ const _ = L.getElement();
4263
+ _ && (_.addEventListener("click", (C) => {
4264
+ C.stopPropagation(), s == null || s({ type: "markerClick", id: b.id });
4265
+ }), _.addEventListener("mouseenter", () => {
4266
+ s == null || s({ type: "markerMouseEnter", id: b.id });
4267
+ }), _.addEventListener("mouseleave", () => {
4268
+ s == null || s({ type: "markerMouseLeave", id: b.id });
4269
+ }), _.classList.toggle("marker-fuzzy", !!b.matching_text)), c.push(L);
4240
4270
  }
4241
4271
  },
4242
- setSelectedMarker(d) {
4243
- var g, p;
4244
- c && ((g = c.getElement()) == null || g.classList.toggle("marker-selected", !1)), c = d > -1 ? s[d] : void 0, (p = c == null ? void 0 : c.getElement()) == null || p.classList.toggle("marker-selected", !0);
4272
+ setSelectedMarker(g) {
4273
+ var y, v;
4274
+ l && ((y = l.getElement()) == null || y.classList.toggle("marker-selected", !1)), l = g > -1 ? c[g] : void 0, (v = l == null ? void 0 : l.getElement()) == null || v.classList.toggle("marker-selected", !0);
4245
4275
  },
4246
4276
  getCenterAndZoom() {
4247
- const d = i.getCenter();
4248
- return [i.getZoom(), d.lng, d.lat];
4277
+ const g = i.getCenter();
4278
+ return [i.getZoom(), g.lng, g.lat];
4249
4279
  }
4250
4280
  };
4251
4281
  }
4252
- function Si(i, e) {
4253
- const t = Lr(i);
4282
+ function Ni(i, e) {
4283
+ const t = Tr(i);
4254
4284
  for (const n of t.features)
4255
4285
  if (n.geometry.type == "MultiPolygon")
4256
4286
  for (const r of n.geometry.coordinates)
4257
- xi(r, e);
4287
+ Ti(r, e);
4258
4288
  else
4259
- xi(n.geometry.coordinates, e);
4289
+ Ti(n.geometry.coordinates, e);
4260
4290
  return t;
4261
4291
  }
4262
- function xi(i, e) {
4292
+ function Ti(i, e) {
4263
4293
  for (const t of i)
4264
4294
  for (const n of t)
4265
4295
  n[0] += e;
4266
4296
  }
4267
- var ie, Ne;
4268
- class ro extends de.Control {
4297
+ class Qi extends ue.Control {
4298
+ }
4299
+ ue.Util.extend(Qi.prototype, ue.Evented.prototype);
4300
+ var re, Re;
4301
+ class fo extends Qi {
4269
4302
  constructor(t) {
4270
- super();
4271
- Et(this, ie);
4272
- Et(this, Ne);
4273
- it(this, Ne, t);
4303
+ super(t);
4304
+ Mt(this, re);
4305
+ Mt(this, Re);
4306
+ st(this, Re, t);
4274
4307
  }
4275
4308
  onAdd(t) {
4276
4309
  const n = document.createElement("div");
4277
- n.className = "leaflet-ctrl-geocoder", de.DomEvent.disableClickPropagation(n), de.DomEvent.disableScrollPropagation(n);
4310
+ n.className = "leaflet-ctrl-geocoder", ue.DomEvent.disableClickPropagation(n), ue.DomEvent.disableScrollPropagation(n);
4278
4311
  const {
4279
4312
  marker: r,
4280
4313
  showResultMarkers: o,
4281
- flyTo: l,
4314
+ flyTo: u,
4282
4315
  fullGeometryStyle: s,
4283
- ...c
4284
- } = se(this, Ne), u = typeof l == "boolean" ? {} : l, h = no(
4316
+ position: c,
4317
+ ...l
4318
+ } = le(this, Re), d = typeof u == "boolean" ? {} : u, a = co(
4285
4319
  t,
4286
4320
  r,
4287
4321
  o,
4288
- u,
4289
- u,
4290
- s
4322
+ d,
4323
+ d,
4324
+ s,
4325
+ l.showFullGeometry === "polygon-with-marker"
4291
4326
  );
4292
- it(this, ie, new vr({
4327
+ st(this, re, new xr({
4293
4328
  target: n,
4294
4329
  props: {
4295
- mapController: h,
4296
- flyTo: l === void 0 ? !0 : !!l,
4297
- ...c
4330
+ mapController: a,
4331
+ flyTo: u === void 0 ? !0 : !!u,
4332
+ ...l
4298
4333
  }
4299
4334
  }));
4300
- for (const a of [
4301
- "select",
4302
- "pick",
4303
- "featuresListed",
4304
- "featuresMarked",
4305
- "response",
4306
- "optionsVisibilityChange",
4307
- "reverseToggle",
4308
- "queryChange"
4309
- ])
4310
- se(this, ie).$on(
4311
- a,
4312
- (f) => t.fire(a.toLowerCase(), f.detail)
4313
- );
4335
+ const f = {
4336
+ select: void 0,
4337
+ pick: void 0,
4338
+ featureslisted: void 0,
4339
+ featuresmarked: void 0,
4340
+ response: void 0,
4341
+ optionsvisibilitychange: void 0,
4342
+ reversetoggle: void 0,
4343
+ querychange: void 0
4344
+ };
4345
+ for (const h in f)
4346
+ le(this, re).$on(h, (g) => this.fire(h, g.detail));
4314
4347
  return n;
4315
4348
  }
4316
4349
  setOptions(t) {
4317
4350
  var c;
4318
- it(this, Ne, t);
4351
+ st(this, Re, t);
4319
4352
  const {
4320
4353
  marker: n,
4321
4354
  showResultMarkers: r,
4322
4355
  flyTo: o,
4323
- fullGeometryStyle: l,
4356
+ fullGeometryStyle: u,
4324
4357
  ...s
4325
- } = se(this, Ne);
4326
- (c = se(this, ie)) == null || c.$set(s);
4358
+ } = le(this, Re);
4359
+ (c = le(this, re)) == null || c.$set(s);
4327
4360
  }
4328
4361
  setQuery(t, n = !0) {
4329
4362
  var r;
4330
- (r = se(this, ie)) == null || r.setQuery(t, n);
4363
+ (r = le(this, re)) == null || r.setQuery(t, n);
4331
4364
  }
4332
4365
  clearMap() {
4333
4366
  var t;
4334
- (t = se(this, ie)) == null || t.clearMap();
4367
+ (t = le(this, re)) == null || t.clearMap();
4335
4368
  }
4336
4369
  clearList() {
4337
4370
  var t;
4338
- (t = se(this, ie)) == null || t.clearList();
4371
+ (t = le(this, re)) == null || t.clearList();
4339
4372
  }
4340
4373
  focus() {
4341
4374
  var t;
4342
- (t = se(this, ie)) == null || t.focus();
4375
+ (t = le(this, re)) == null || t.focus();
4343
4376
  }
4344
4377
  blur() {
4345
4378
  var t;
4346
- (t = se(this, ie)) == null || t.blur();
4379
+ (t = le(this, re)) == null || t.blur();
4347
4380
  }
4348
4381
  onRemove() {
4349
4382
  var t;
4350
- (t = se(this, ie)) == null || t.$destroy();
4383
+ (t = le(this, re)) == null || t.$destroy();
4351
4384
  }
4352
4385
  }
4353
- ie = new WeakMap(), Ne = new WeakMap();
4354
- function oo(...i) {
4355
- return new ro(...i);
4386
+ re = new WeakMap(), Re = new WeakMap();
4387
+ function ho(...i) {
4388
+ return new fo(...i);
4356
4389
  }
4357
- window.L && typeof window.L == "object" && typeof window.L.control == "function" && (window.L.control.maptilerGeocoding = oo);
4390
+ window.L && typeof window.L == "object" && typeof window.L.control == "function" && (window.L.control.maptilerGeocoding = ho);
4358
4391
  export {
4359
- ro as GeocodingControl,
4360
- no as createLeafletMapController
4392
+ fo as GeocodingControl,
4393
+ co as createLeafletMapController
4361
4394
  };
4362
4395
  //# sourceMappingURL=leaflet.js.map