@maptiler/geocoding-control 2.0.0-rc.7 → 2.0.0-rc.8

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 (51) hide show
  1. package/leaflet-controller.d.ts +1 -1
  2. package/leaflet-controller.js +1 -1
  3. package/leaflet-controller.js.map +1 -1
  4. package/leaflet-controller.umd.js +1 -1
  5. package/leaflet-controller.umd.js.map +1 -1
  6. package/leaflet.js +817 -802
  7. package/leaflet.js.map +1 -1
  8. package/leaflet.umd.js +3 -3
  9. package/leaflet.umd.js.map +1 -1
  10. package/maplibregl-controller.d.ts +1 -1
  11. package/maplibregl-controller.js +16 -16
  12. package/maplibregl-controller.js.map +1 -1
  13. package/maplibregl-controller.umd.js +1 -1
  14. package/maplibregl-controller.umd.js.map +1 -1
  15. package/maplibregl.js +1220 -1205
  16. package/maplibregl.js.map +1 -1
  17. package/maplibregl.umd.js +3 -3
  18. package/maplibregl.umd.js.map +1 -1
  19. package/maptilersdk.js +1196 -1181
  20. package/maptilersdk.js.map +1 -1
  21. package/maptilersdk.umd.js +3 -3
  22. package/maptilersdk.umd.js.map +1 -1
  23. package/openlayers-controller.d.ts +1 -1
  24. package/openlayers-controller.js +5 -5
  25. package/openlayers-controller.js.map +1 -1
  26. package/openlayers-controller.umd.js +2 -2
  27. package/openlayers-controller.umd.js.map +1 -1
  28. package/openlayers.js +1405 -1391
  29. package/openlayers.js.map +1 -1
  30. package/openlayers.umd.js +3 -3
  31. package/openlayers.umd.js.map +1 -1
  32. package/package.json +4 -4
  33. package/react.js +860 -845
  34. package/react.js.map +1 -1
  35. package/react.umd.js +1 -1
  36. package/react.umd.js.map +1 -1
  37. package/svelte/GeocodingControl.svelte +50 -25
  38. package/svelte/GeocodingControl.svelte.d.ts +1 -0
  39. package/svelte/leaflet-controller.d.ts +1 -1
  40. package/svelte/leaflet-controller.js +1 -1
  41. package/svelte/maplibregl-controller.d.ts +1 -1
  42. package/svelte/maplibregl-controller.js +1 -1
  43. package/svelte/openlayers-controller.d.ts +1 -1
  44. package/svelte/openlayers-controller.js +1 -1
  45. package/svelte/openlayers.js +2 -3
  46. package/svelte/types.d.ts +2 -1
  47. package/types.d.ts +2 -1
  48. package/vanilla.js +606 -591
  49. package/vanilla.js.map +1 -1
  50. package/vanilla.umd.js +1 -1
  51. package/vanilla.umd.js.map +1 -1
package/maplibregl.js CHANGED
@@ -1,73 +1,73 @@
1
- var ln = Object.defineProperty;
2
- var Gt = (i) => {
1
+ var fn = Object.defineProperty;
2
+ var Qt = (i) => {
3
3
  throw TypeError(i);
4
4
  };
5
- var un = (i, e, t) => e in i ? ln(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
6
- var ee = (i, e, t) => un(i, typeof e != "symbol" ? e + "" : e, t), jt = (i, e, t) => e.has(i) || Gt("Cannot " + t);
7
- var Z = (i, e, t) => (jt(i, e, "read from private field"), t ? t.call(i) : e.get(i)), _t = (i, e, t) => e.has(i) ? Gt("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(i) : e.set(i, t), wt = (i, e, t, n) => (jt(i, e, "write to private field"), n ? n.call(i, t) : e.set(i, t), t);
8
- import * as qt from "maplibre-gl";
5
+ var dn = (i, e, t) => e in i ? fn(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
6
+ var ee = (i, e, t) => dn(i, typeof e != "symbol" ? e + "" : e, t), Zt = (i, e, t) => e.has(i) || Qt("Cannot " + t);
7
+ var Z = (i, e, t) => (Zt(i, e, "read from private field"), t ? t.call(i) : e.get(i)), St = (i, e, t) => e.has(i) ? Qt("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(i) : e.set(i, t), xt = (i, e, t, n) => (Zt(i, e, "write to private field"), n ? n.call(i, t) : e.set(i, t), t);
8
+ import * as Ht from "maplibre-gl";
9
9
  function z() {
10
10
  }
11
- function an(i, e) {
11
+ function hn(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 ki(i) {
18
+ function Ti(i) {
19
19
  return i();
20
20
  }
21
- function Qt() {
21
+ function Vt() {
22
22
  return /* @__PURE__ */ Object.create(null);
23
23
  }
24
- function me(i) {
25
- i.forEach(ki);
24
+ function ve(i) {
25
+ i.forEach(Ti);
26
26
  }
27
- function Ci(i) {
27
+ function Ri(i) {
28
28
  return typeof i == "function";
29
29
  }
30
- function Le(i, e) {
30
+ function xe(i, e) {
31
31
  return i != i ? e == e : i !== e || i && typeof i == "object" || typeof i == "function";
32
32
  }
33
- let et;
33
+ let nt;
34
34
  function K(i, e) {
35
- return i === e ? !0 : (et || (et = document.createElement("a")), et.href = e, i === et.href);
35
+ return i === e ? !0 : (nt || (nt = document.createElement("a")), nt.href = e, i === nt.href);
36
36
  }
37
- function cn(i) {
37
+ function gn(i) {
38
38
  return Object.keys(i).length === 0;
39
39
  }
40
- function fn(i, e, t, n) {
40
+ function mn(i, e, t, n) {
41
41
  if (i) {
42
- const r = Ni(i, e, t, n);
42
+ const r = Pi(i, e, t, n);
43
43
  return i[0](r);
44
44
  }
45
45
  }
46
- function Ni(i, e, t, n) {
47
- return i[1] && n ? an(t.ctx.slice(), i[1](n(e))) : t.ctx;
46
+ function Pi(i, e, t, n) {
47
+ return i[1] && n ? hn(t.ctx.slice(), i[1](n(e))) : t.ctx;
48
48
  }
49
- function dn(i, e, t, n) {
49
+ function vn(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 s = [], u = Math.max(e.dirty.length, r.length);
56
- for (let o = 0; o < u; o += 1)
57
- s[o] = e.dirty[o] | r[o];
58
- return s;
55
+ const o = [], u = Math.max(e.dirty.length, r.length);
56
+ for (let s = 0; s < u; s += 1)
57
+ o[s] = e.dirty[s] | r[s];
58
+ return o;
59
59
  }
60
60
  return e.dirty | r;
61
61
  }
62
62
  return e.dirty;
63
63
  }
64
- function hn(i, e, t, n, r, s) {
64
+ function yn(i, e, t, n, r, o) {
65
65
  if (r) {
66
- const u = Ni(e, t, n, s);
66
+ const u = Pi(e, t, n, o);
67
67
  i.p(u, r);
68
68
  }
69
69
  }
70
- function gn(i) {
70
+ function pn(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,7 +76,7 @@ function gn(i) {
76
76
  }
77
77
  return -1;
78
78
  }
79
- function Zt(i) {
79
+ function Yt(i) {
80
80
  return i ?? "";
81
81
  }
82
82
  function P(i, e) {
@@ -91,22 +91,22 @@ function B(i) {
91
91
  function A(i) {
92
92
  return document.createElement(i);
93
93
  }
94
- function le(i) {
94
+ function ae(i) {
95
95
  return document.createElementNS("http://www.w3.org/2000/svg", i);
96
96
  }
97
- function Ee(i) {
97
+ function _e(i) {
98
98
  return document.createTextNode(i);
99
99
  }
100
100
  function ie() {
101
- return Ee(" ");
101
+ return _e(" ");
102
102
  }
103
- function mn() {
104
- return Ee("");
103
+ function bn() {
104
+ return _e("");
105
105
  }
106
106
  function $(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 wn(i) {
110
110
  return function(e) {
111
111
  return e.preventDefault(), i.call(this, e);
112
112
  };
@@ -114,187 +114,187 @@ function vn(i) {
114
114
  function b(i, e, t) {
115
115
  t == null ? i.removeAttribute(e) : i.getAttribute(e) !== t && i.setAttribute(e, t);
116
116
  }
117
- function yn(i) {
117
+ function En(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 Ht(i, e) {
124
+ function Kt(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 pn(i, e, { bubbles: t = !1, cancelable: n = !1 } = {}) {
130
+ function _n(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 Fe(i) {
135
- je = i;
133
+ let Qe;
134
+ function je(i) {
135
+ Qe = i;
136
136
  }
137
- function Ri() {
138
- if (!je) throw new Error("Function called outside component initialization");
139
- return je;
137
+ function Ii() {
138
+ if (!Qe) throw new Error("Function called outside component initialization");
139
+ return Qe;
140
140
  }
141
- function bn(i) {
142
- Ri().$$.on_destroy.push(i);
141
+ function Ln(i) {
142
+ Ii().$$.on_destroy.push(i);
143
143
  }
144
- function En() {
145
- const i = Ri();
144
+ function Sn() {
145
+ const i = Ii();
146
146
  return (e, t, { cancelable: n = !1 } = {}) => {
147
147
  const r = i.$$.callbacks[e];
148
148
  if (r) {
149
- const s = pn(
149
+ const o = _n(
150
150
  /** @type {string} */
151
151
  e,
152
152
  t,
153
153
  { cancelable: n }
154
154
  );
155
155
  return r.slice().forEach((u) => {
156
- u.call(i, s);
157
- }), !s.defaultPrevented;
156
+ u.call(i, o);
157
+ }), !o.defaultPrevented;
158
158
  }
159
159
  return !0;
160
160
  };
161
161
  }
162
- function Vt(i, e) {
162
+ function Xt(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 Ae = [], Mt = [];
167
- let We = [];
168
- const Yt = [], _n = /* @__PURE__ */ Promise.resolve();
169
- let kt = !1;
170
- function wn() {
171
- kt || (kt = !0, _n.then(Ti));
166
+ const We = [], Nt = [];
167
+ let ze = [];
168
+ const Jt = [], xn = /* @__PURE__ */ Promise.resolve();
169
+ let Tt = !1;
170
+ function Mn() {
171
+ Tt || (Tt = !0, xn.then(Oi));
172
172
  }
173
- function Ct(i) {
174
- We.push(i);
173
+ function Rt(i) {
174
+ ze.push(i);
175
175
  }
176
- const Lt = /* @__PURE__ */ new Set();
177
- let Ie = 0;
178
- function Ti() {
179
- if (Ie !== 0)
176
+ const Mt = /* @__PURE__ */ new Set();
177
+ let Oe = 0;
178
+ function Oi() {
179
+ if (Oe !== 0)
180
180
  return;
181
- const i = je;
181
+ const i = Qe;
182
182
  do {
183
183
  try {
184
- for (; Ie < Ae.length; ) {
185
- const e = Ae[Ie];
186
- Ie++, Fe(e), Ln(e.$$);
184
+ for (; Oe < We.length; ) {
185
+ const e = We[Oe];
186
+ Oe++, je(e), Cn(e.$$);
187
187
  }
188
188
  } catch (e) {
189
- throw Ae.length = 0, Ie = 0, e;
189
+ throw We.length = 0, Oe = 0, e;
190
190
  }
191
- for (Fe(null), Ae.length = 0, Ie = 0; Mt.length; ) Mt.pop()();
192
- for (let e = 0; e < We.length; e += 1) {
193
- const t = We[e];
194
- Lt.has(t) || (Lt.add(t), t());
191
+ for (je(null), We.length = 0, Oe = 0; Nt.length; ) Nt.pop()();
192
+ for (let e = 0; e < ze.length; e += 1) {
193
+ const t = ze[e];
194
+ Mt.has(t) || (Mt.add(t), t());
195
195
  }
196
- We.length = 0;
197
- } while (Ae.length);
198
- for (; Yt.length; )
199
- Yt.pop()();
200
- kt = !1, Lt.clear(), Fe(i);
196
+ ze.length = 0;
197
+ } while (We.length);
198
+ for (; Jt.length; )
199
+ Jt.pop()();
200
+ Tt = !1, Mt.clear(), je(i);
201
201
  }
202
- function Ln(i) {
202
+ function Cn(i) {
203
203
  if (i.fragment !== null) {
204
- i.update(), me(i.before_update);
204
+ i.update(), ve(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(Ct);
206
+ i.dirty = [-1], i.fragment && i.fragment.p(i.ctx, e), i.after_update.forEach(Rt);
207
207
  }
208
208
  }
209
- function Sn(i) {
209
+ function kn(i) {
210
210
  const e = [], t = [];
211
- We.forEach((n) => i.indexOf(n) === -1 ? e.push(n) : t.push(n)), t.forEach((n) => n()), We = e;
211
+ ze.forEach((n) => i.indexOf(n) === -1 ? e.push(n) : t.push(n)), t.forEach((n) => n()), ze = e;
212
212
  }
213
- const it = /* @__PURE__ */ new Set();
214
- let Ne;
215
- function nt() {
216
- Ne = {
213
+ const ot = /* @__PURE__ */ new Set();
214
+ let Re;
215
+ function st() {
216
+ Re = {
217
217
  r: 0,
218
218
  c: [],
219
- p: Ne
219
+ p: Re
220
220
  // parent group
221
221
  };
222
222
  }
223
- function rt() {
224
- Ne.r || me(Ne.c), Ne = Ne.p;
223
+ function lt() {
224
+ Re.r || ve(Re.c), Re = Re.p;
225
225
  }
226
226
  function j(i, e) {
227
- i && i.i && (it.delete(i), i.i(e));
227
+ i && i.i && (ot.delete(i), i.i(e));
228
228
  }
229
229
  function V(i, e, t, n) {
230
230
  if (i && i.o) {
231
- if (it.has(i)) return;
232
- it.add(i), Ne.c.push(() => {
233
- it.delete(i), n && (t && i.d(1), n());
231
+ if (ot.has(i)) return;
232
+ ot.add(i), Re.c.push(() => {
233
+ ot.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 $t(i) {
238
238
  return (i == null ? void 0 : i.length) !== void 0 ? i : Array.from(i);
239
239
  }
240
- function xn(i, e) {
240
+ function Nn(i, e) {
241
241
  V(i, 1, 1, () => {
242
242
  e.delete(i.key);
243
243
  });
244
244
  }
245
- function Mn(i, e, t, n, r, s, u, o, c, l, d, a) {
246
- let f = i.length, g = s.length, y = f;
247
- const w = {};
248
- for (; y--; ) w[i[y].key] = y;
249
- const h = [], v = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map(), E = [];
245
+ function Tn(i, e, t, n, r, o, u, s, c, l, d, a) {
246
+ let f = i.length, g = o.length, y = f;
247
+ const _ = {};
248
+ for (; y--; ) _[i[y].key] = y;
249
+ const h = [], v = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map(), w = [];
250
250
  for (y = g; y--; ) {
251
- const _ = a(r, s, y), L = t(_);
252
- let C = u.get(L);
253
- C ? E.push(() => C.p(_, e)) : (C = l(L, _), C.c()), v.set(L, h[y] = C), L in w && p.set(L, Math.abs(y - w[L]));
251
+ const E = a(r, o, y), L = t(E);
252
+ let k = u.get(L);
253
+ k ? w.push(() => k.p(E, e)) : (k = l(L, E), k.c()), v.set(L, h[y] = k), L in _ && p.set(L, Math.abs(y - _[L]));
254
254
  }
255
255
  const S = /* @__PURE__ */ new Set(), M = /* @__PURE__ */ new Set();
256
- function k(_) {
257
- j(_, 1), _.m(o, d), u.set(_.key, _), d = _.first, g--;
256
+ function C(E) {
257
+ j(E, 1), E.m(s, d), u.set(E.key, E), d = E.first, g--;
258
258
  }
259
259
  for (; f && g; ) {
260
- const _ = h[g - 1], L = i[f - 1], C = _.key, O = L.key;
261
- _ === L ? (d = _.first, f--, g--) : v.has(O) ? !u.has(C) || S.has(C) ? k(_) : M.has(O) ? f-- : p.get(C) > p.get(O) ? (M.add(C), k(_)) : (S.add(O), f--) : (c(L, u), f--);
260
+ const E = h[g - 1], L = i[f - 1], k = E.key, O = L.key;
261
+ E === L ? (d = E.first, f--, g--) : v.has(O) ? !u.has(k) || S.has(k) ? C(E) : M.has(O) ? f-- : p.get(k) > p.get(O) ? (M.add(k), C(E)) : (S.add(O), f--) : (c(L, u), f--);
262
262
  }
263
263
  for (; f--; ) {
264
- const _ = i[f];
265
- v.has(_.key) || c(_, u);
264
+ const E = i[f];
265
+ v.has(E.key) || c(E, u);
266
266
  }
267
- for (; g; ) k(h[g - 1]);
268
- return me(E), h;
267
+ for (; g; ) C(h[g - 1]);
268
+ return ve(w), h;
269
269
  }
270
- function _e(i) {
270
+ function Le(i) {
271
271
  i && i.c();
272
272
  }
273
- function he(i, e, t) {
273
+ function ge(i, e, t) {
274
274
  const { fragment: n, after_update: r } = i.$$;
275
- n && n.m(e, t), Ct(() => {
276
- const s = i.$$.on_mount.map(ki).filter(Ci);
277
- i.$$.on_destroy ? i.$$.on_destroy.push(...s) : me(s), i.$$.on_mount = [];
278
- }), r.forEach(Ct);
275
+ n && n.m(e, t), Rt(() => {
276
+ const o = i.$$.on_mount.map(Ti).filter(Ri);
277
+ i.$$.on_destroy ? i.$$.on_destroy.push(...o) : ve(o), i.$$.on_mount = [];
278
+ }), r.forEach(Rt);
279
279
  }
280
- function ge(i, e) {
280
+ function me(i, e) {
281
281
  const t = i.$$;
282
- t.fragment !== null && (Sn(t.after_update), me(t.on_destroy), t.fragment && t.fragment.d(e), t.on_destroy = t.fragment = null, t.ctx = []);
282
+ t.fragment !== null && (kn(t.after_update), ve(t.on_destroy), t.fragment && t.fragment.d(e), t.on_destroy = t.fragment = null, t.ctx = []);
283
283
  }
284
- function kn(i, e) {
285
- i.$$.dirty[0] === -1 && (Ae.push(i), wn(), i.$$.dirty.fill(0)), i.$$.dirty[e / 31 | 0] |= 1 << e % 31;
284
+ function Rn(i, e) {
285
+ i.$$.dirty[0] === -1 && (We.push(i), Mn(), i.$$.dirty.fill(0)), i.$$.dirty[e / 31 | 0] |= 1 << e % 31;
286
286
  }
287
- function Se(i, e, t, n, r, s, u = null, o = [-1]) {
288
- const c = je;
289
- Fe(i);
287
+ function Me(i, e, t, n, r, o, u = null, s = [-1]) {
288
+ const c = Qe;
289
+ je(i);
290
290
  const l = i.$$ = {
291
291
  fragment: null,
292
292
  ctx: [],
293
293
  // state
294
- props: s,
294
+ props: o,
295
295
  update: z,
296
296
  not_equal: r,
297
- bound: Qt(),
297
+ bound: Vt(),
298
298
  // lifecycle
299
299
  on_mount: [],
300
300
  on_destroy: [],
@@ -303,8 +303,8 @@ function Se(i, e, t, n, r, s, u = null, o = [-1]) {
303
303
  after_update: [],
304
304
  context: new Map(e.context || (c ? c.$$.context : [])),
305
305
  // everything else
306
- callbacks: Qt(),
307
- dirty: o,
306
+ callbacks: Vt(),
307
+ dirty: s,
308
308
  skip_bound: !1,
309
309
  root: e.target || c.$$.root
310
310
  };
@@ -312,18 +312,18 @@ function Se(i, e, t, n, r, s, u = null, o = [-1]) {
312
312
  let d = !1;
313
313
  if (l.ctx = t ? t(i, e.props || {}, (a, f, ...g) => {
314
314
  const y = g.length ? g[0] : f;
315
- return l.ctx && r(l.ctx[a], l.ctx[a] = y) && (!l.skip_bound && l.bound[a] && l.bound[a](y), d && kn(i, a)), f;
316
- }) : [], l.update(), d = !0, me(l.before_update), l.fragment = n ? n(l.ctx) : !1, e.target) {
315
+ return l.ctx && r(l.ctx[a], l.ctx[a] = y) && (!l.skip_bound && l.bound[a] && l.bound[a](y), d && Rn(i, a)), f;
316
+ }) : [], l.update(), d = !0, ve(l.before_update), l.fragment = n ? n(l.ctx) : !1, e.target) {
317
317
  if (e.hydrate) {
318
- const a = yn(e.target);
318
+ const a = En(e.target);
319
319
  l.fragment && l.fragment.l(a), a.forEach(B);
320
320
  } else
321
321
  l.fragment && l.fragment.c();
322
- e.intro && j(i.$$.fragment), he(i, e.target, e.anchor), Ti();
322
+ e.intro && j(i.$$.fragment), ge(i, e.target, e.anchor), Oi();
323
323
  }
324
- Fe(c);
324
+ je(c);
325
325
  }
326
- class xe {
326
+ class Ce {
327
327
  constructor() {
328
328
  /**
329
329
  * ### PRIVATE API
@@ -344,7 +344,7 @@ class xe {
344
344
  }
345
345
  /** @returns {void} */
346
346
  $destroy() {
347
- ge(this, 1), this.$destroy = z;
347
+ me(this, 1), this.$destroy = z;
348
348
  }
349
349
  /**
350
350
  * @template {Extract<keyof Events, string>} K
@@ -353,7 +353,7 @@ class xe {
353
353
  * @returns {() => void}
354
354
  */
355
355
  $on(e, t) {
356
- if (!Ci(t))
356
+ if (!Ri(t))
357
357
  return z;
358
358
  const n = this.$$.callbacks[e] || (this.$$.callbacks[e] = []);
359
359
  return n.push(t), () => {
@@ -366,16 +366,16 @@ class xe {
366
366
  * @returns {void}
367
367
  */
368
368
  $set(e) {
369
- this.$$set && !cn(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
369
+ this.$$set && !gn(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
370
370
  }
371
371
  }
372
- const Cn = "4";
373
- typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(Cn);
374
- function Nn(i) {
372
+ const Pn = "4";
373
+ typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(Pn);
374
+ function In(i) {
375
375
  let e, t;
376
376
  return {
377
377
  c() {
378
- e = le("svg"), t = le("path"), b(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"), b(e, "viewBox", "0 0 14 14"), b(e, "width", "13"), b(e, "height", "13"), b(e, "class", "svelte-en2qvf");
378
+ e = ae("svg"), t = ae("path"), b(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"), b(e, "viewBox", "0 0 14 14"), b(e, "width", "13"), b(e, "height", "13"), b(e, "class", "svelte-en2qvf");
379
379
  },
380
380
  m(n, r) {
381
381
  U(n, e, r), P(e, t);
@@ -388,16 +388,16 @@ function Nn(i) {
388
388
  }
389
389
  };
390
390
  }
391
- class Pi extends xe {
391
+ class Ai extends Ce {
392
392
  constructor(e) {
393
- super(), Se(this, e, null, Nn, Le, {});
393
+ super(), Me(this, e, null, In, xe, {});
394
394
  }
395
395
  }
396
- function Rn(i) {
396
+ function On(i) {
397
397
  let e, t;
398
398
  return {
399
399
  c() {
400
- e = le("svg"), t = le("path"), b(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"), b(e, "viewBox", "0 0 30 30"), b(e, "fill", "none"), b(e, "xmlns", "http://www.w3.org/2000/svg"), b(e, "class", "svelte-d2loi5");
400
+ e = ae("svg"), t = ae("path"), b(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"), b(e, "viewBox", "0 0 30 30"), b(e, "fill", "none"), b(e, "xmlns", "http://www.w3.org/2000/svg"), b(e, "class", "svelte-d2loi5");
401
401
  },
402
402
  m(n, r) {
403
403
  U(n, e, r), P(e, t);
@@ -410,12 +410,12 @@ function Rn(i) {
410
410
  }
411
411
  };
412
412
  }
413
- class Ii extends xe {
413
+ class Wi extends Ce {
414
414
  constructor(e) {
415
- super(), Se(this, e, null, Rn, Le, {});
415
+ super(), Me(this, e, null, On, xe, {});
416
416
  }
417
417
  }
418
- function Tn(i) {
418
+ function An(i) {
419
419
  let e, t;
420
420
  return {
421
421
  c() {
@@ -446,7 +446,7 @@ function Tn(i) {
446
446
  }
447
447
  };
448
448
  }
449
- function Pn(i) {
449
+ function Wn(i) {
450
450
  let e, t;
451
451
  return {
452
452
  c() {
@@ -477,7 +477,7 @@ function Pn(i) {
477
477
  }
478
478
  };
479
479
  }
480
- function In(i) {
480
+ function zn(i) {
481
481
  let e, t;
482
482
  return {
483
483
  c() {
@@ -508,7 +508,7 @@ function In(i) {
508
508
  }
509
509
  };
510
510
  }
511
- function On(i) {
511
+ function Bn(i) {
512
512
  let e, t;
513
513
  return {
514
514
  c() {
@@ -539,7 +539,7 @@ function On(i) {
539
539
  }
540
540
  };
541
541
  }
542
- function An(i) {
542
+ function Dn(i) {
543
543
  let e, t;
544
544
  return {
545
545
  c() {
@@ -570,7 +570,7 @@ function An(i) {
570
570
  }
571
571
  };
572
572
  }
573
- function Wn(i) {
573
+ function Un(i) {
574
574
  let e, t;
575
575
  return {
576
576
  c() {
@@ -601,7 +601,7 @@ function Wn(i) {
601
601
  }
602
602
  };
603
603
  }
604
- function zn(i) {
604
+ function Fn(i) {
605
605
  let e, t;
606
606
  return {
607
607
  c() {
@@ -632,7 +632,7 @@ function zn(i) {
632
632
  }
633
633
  };
634
634
  }
635
- function Bn(i) {
635
+ function Gn(i) {
636
636
  let e, t, n, r;
637
637
  return {
638
638
  c() {
@@ -644,35 +644,35 @@ function Bn(i) {
644
644
  i[4]
645
645
  ), b(e, "class", "svelte-ltkwvy");
646
646
  },
647
- m(s, u) {
648
- U(s, e, u), n || (r = $(
647
+ m(o, u) {
648
+ U(o, e, u), n || (r = $(
649
649
  e,
650
650
  "error",
651
651
  /*error_handler*/
652
652
  i[14]
653
653
  ), n = !0);
654
654
  },
655
- p(s, u) {
655
+ p(o, u) {
656
656
  u & /*imageUrl*/
657
657
  32 && !K(e.src, t = /*imageUrl*/
658
- s[5]) && b(e, "src", t), u & /*category*/
658
+ o[5]) && b(e, "src", t), u & /*category*/
659
659
  16 && b(
660
660
  e,
661
661
  "alt",
662
662
  /*category*/
663
- s[4]
663
+ o[4]
664
664
  );
665
665
  },
666
- d(s) {
667
- s && B(e), n = !1, r();
666
+ d(o) {
667
+ o && B(e), n = !1, r();
668
668
  }
669
669
  };
670
670
  }
671
- function Xt(i) {
671
+ function ei(i) {
672
672
  let e, t;
673
673
  return {
674
674
  c() {
675
- e = A("span"), t = Ee(
675
+ e = A("span"), t = _e(
676
676
  /*placeType*/
677
677
  i[6]
678
678
  ), b(e, "class", "secondary svelte-ltkwvy");
@@ -682,7 +682,7 @@ function Xt(i) {
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]
@@ -693,8 +693,8 @@ function Xt(i) {
693
693
  }
694
694
  };
695
695
  }
696
- function Dn(i) {
697
- let e, t, n, r, s, u, o, c, l, d = (
696
+ function jn(i) {
697
+ let e, t, n, r, o, u, s, c, l, d = (
698
698
  /*isReverse*/
699
699
  (i[7] ? (
700
700
  /*feature*/
@@ -714,48 +714,48 @@ function Dn(i) {
714
714
  i[0].id.startsWith("poi.") || !/*imageUrl*/
715
715
  i[5]) && !/*isReverse*/
716
716
  i[7]
717
- ), y, w, h = (
717
+ ), y, _, h = (
718
718
  /*isReverse*/
719
719
  (i[7] ? "" : (
720
720
  /*feature*/
721
721
  i[0].place_name.replace(/[^,]*,?\s*/, "")
722
722
  )) + ""
723
- ), v, p, E;
724
- function S(L, C) {
725
- return C & /*feature*/
726
- 1 && (t = null), C & /*feature*/
727
- 1 && (n = null), C & /*feature*/
728
- 1 && (r = null), C & /*feature*/
729
- 1 && (s = null), /*imageUrl*/
730
- L[5] ? Bn : (
723
+ ), v, p, w;
724
+ function S(L, k) {
725
+ return k & /*feature*/
726
+ 1 && (t = null), k & /*feature*/
727
+ 1 && (n = null), k & /*feature*/
728
+ 1 && (r = null), k & /*feature*/
729
+ 1 && (o = null), /*imageUrl*/
730
+ L[5] ? Gn : (
731
731
  /*feature*/
732
- L[0].address ? zn : (t == null && (t = !!/*feature*/
733
- L[0].id.startsWith("road.")), t ? Wn : (n == null && (n = !!/*feature*/
734
- L[0].id.startsWith("address.")), n ? An : (r == null && (r = !!/*feature*/
735
- L[0].id.startsWith("postal_code.")), r ? On : (s == null && (s = !!/*feature*/
736
- L[0].id.startsWith("poi.")), s ? In : (
732
+ L[0].address ? Fn : (t == null && (t = !!/*feature*/
733
+ L[0].id.startsWith("road.")), t ? Un : (n == null && (n = !!/*feature*/
734
+ L[0].id.startsWith("address.")), n ? Dn : (r == null && (r = !!/*feature*/
735
+ L[0].id.startsWith("postal_code.")), r ? Bn : (o == null && (o = !!/*feature*/
736
+ L[0].id.startsWith("poi.")), o ? zn : (
737
737
  /*isReverse*/
738
- L[7] ? Pn : Tn
738
+ L[7] ? Wn : An
739
739
  )))))
740
740
  );
741
741
  }
742
- let M = S(i, -1), k = M(i), _ = g && Xt(i);
742
+ let M = S(i, -1), C = M(i), E = g && ei(i);
743
743
  return {
744
744
  c() {
745
- e = A("li"), k.c(), u = ie(), o = A("span"), c = A("span"), l = A("span"), a = Ee(d), f = ie(), _ && _.c(), y = ie(), w = A("span"), v = Ee(h), b(l, "class", "primary svelte-ltkwvy"), b(c, "class", "svelte-ltkwvy"), b(w, "class", "line2 svelte-ltkwvy"), b(o, "class", "texts svelte-ltkwvy"), b(e, "tabindex", "0"), b(
745
+ e = A("li"), C.c(), u = ie(), s = A("span"), c = A("span"), l = A("span"), a = _e(d), f = ie(), E && E.c(), y = ie(), _ = A("span"), v = _e(h), b(l, "class", "primary svelte-ltkwvy"), b(c, "class", "svelte-ltkwvy"), b(_, "class", "line2 svelte-ltkwvy"), b(s, "class", "texts svelte-ltkwvy"), b(e, "tabindex", "0"), b(
746
746
  e,
747
747
  "data-selected",
748
748
  /*selected*/
749
749
  i[1]
750
- ), b(e, "class", "svelte-ltkwvy"), re(
750
+ ), b(e, "class", "svelte-ltkwvy"), se(
751
751
  e,
752
752
  "selected",
753
753
  /*selected*/
754
754
  i[1]
755
755
  );
756
756
  },
757
- m(L, C) {
758
- U(L, e, C), k.m(e, null), P(e, u), P(e, o), P(o, c), P(c, l), P(l, a), P(c, f), _ && _.m(c, null), P(o, y), P(o, w), P(w, v), p || (E = [
757
+ m(L, k) {
758
+ U(L, e, k), C.m(e, null), P(e, u), P(e, s), P(s, c), P(c, l), P(l, a), P(c, f), E && E.m(c, null), P(s, y), P(s, _), P(_, v), p || (w = [
759
759
  $(
760
760
  e,
761
761
  "mouseenter",
@@ -770,8 +770,8 @@ function Dn(i) {
770
770
  )
771
771
  ], p = !0);
772
772
  },
773
- p(L, [C]) {
774
- M === (M = S(L, C)) && k ? k.p(L, C) : (k.d(1), k = M(L), k && (k.c(), k.m(e, u))), C & /*feature*/
773
+ p(L, [k]) {
774
+ M === (M = S(L, k)) && C ? C.p(L, k) : (C.d(1), C = M(L), C && (C.c(), C.m(e, u))), k & /*feature*/
775
775
  1 && d !== (d = /*isReverse*/
776
776
  (L[7] ? (
777
777
  /*feature*/
@@ -779,7 +779,7 @@ function Dn(i) {
779
779
  ) : (
780
780
  /*feature*/
781
781
  L[0].place_name.replace(/,.*/, "")
782
- )) + "") && Ge(a, d), C & /*showPlaceType, feature, imageUrl*/
782
+ )) + "") && qe(a, d), k & /*showPlaceType, feature, imageUrl*/
783
783
  37 && (g = /*showPlaceType*/
784
784
  L[2] === "always" || /*showPlaceType*/
785
785
  L[2] !== "never" && !/*feature*/
@@ -789,19 +789,19 @@ function Dn(i) {
789
789
  L[0].id.startsWith("postal_code.") && (!/*feature*/
790
790
  L[0].id.startsWith("poi.") || !/*imageUrl*/
791
791
  L[5]) && !/*isReverse*/
792
- L[7]), g ? _ ? _.p(L, C) : (_ = Xt(L), _.c(), _.m(c, null)) : _ && (_.d(1), _ = null), C & /*feature*/
792
+ L[7]), g ? E ? E.p(L, k) : (E = ei(L), E.c(), E.m(c, null)) : E && (E.d(1), E = null), k & /*feature*/
793
793
  1 && h !== (h = /*isReverse*/
794
794
  (L[7] ? "" : (
795
795
  /*feature*/
796
796
  L[0].place_name.replace(/[^,]*,?\s*/, "")
797
- )) + "") && Ge(v, h), C & /*selected*/
797
+ )) + "") && qe(v, h), k & /*selected*/
798
798
  2 && b(
799
799
  e,
800
800
  "data-selected",
801
801
  /*selected*/
802
802
  L[1]
803
- ), C & /*selected*/
804
- 2 && re(
803
+ ), k & /*selected*/
804
+ 2 && se(
805
805
  e,
806
806
  "selected",
807
807
  /*selected*/
@@ -811,46 +811,46 @@ function Dn(i) {
811
811
  i: z,
812
812
  o: z,
813
813
  d(L) {
814
- L && B(e), k.d(), _ && _.d(), p = !1, me(E);
814
+ L && B(e), C.d(), E && E.d(), p = !1, ve(w);
815
815
  }
816
816
  };
817
817
  }
818
- function Un(i, e, t) {
819
- var E;
820
- let n, r, { feature: s } = e, { selected: u = !1 } = e, { showPlaceType: o } = e, { missingIconsCache: c } = e, { iconsBaseUrl: l } = e;
821
- const d = (E = s.properties) == null ? void 0 : E.categories;
822
- let a, f, g = 0, y = s.place_type[0] === "reverse";
823
- function w() {
818
+ function qn(i, e, t) {
819
+ var w;
820
+ let n, r, { feature: o } = e, { selected: u = !1 } = e, { showPlaceType: s } = e, { missingIconsCache: c } = e, { iconsBaseUrl: l } = e;
821
+ const d = (w = o.properties) == null ? void 0 : w.categories;
822
+ let a, f, g = 0, y = o.place_type[0] === "reverse";
823
+ function _() {
824
824
  f && c.add(f), t(10, g++, g);
825
825
  }
826
826
  function h(S) {
827
- Vt.call(this, i, S);
827
+ Xt.call(this, i, S);
828
828
  }
829
829
  function v(S) {
830
- Vt.call(this, i, S);
830
+ Xt.call(this, i, S);
831
831
  }
832
- const p = () => w();
832
+ const p = () => _();
833
833
  return i.$$set = (S) => {
834
- "feature" in S && t(0, s = S.feature), "selected" in S && t(1, u = S.selected), "showPlaceType" in S && t(2, o = S.showPlaceType), "missingIconsCache" in S && t(9, c = S.missingIconsCache), "iconsBaseUrl" in S && t(3, l = S.iconsBaseUrl);
834
+ "feature" in S && t(0, o = S.feature), "selected" in S && t(1, u = S.selected), "showPlaceType" in S && t(2, s = S.showPlaceType), "missingIconsCache" in S && t(9, c = S.missingIconsCache), "iconsBaseUrl" in S && t(3, l = S.iconsBaseUrl);
835
835
  }, i.$$.update = () => {
836
- var S, M, k, _;
836
+ var S, M, C, E;
837
837
  if (i.$$.dirty & /*loadIconAttempt, index, category, iconsBaseUrl, imageUrl, missingIconsCache*/
838
838
  3640)
839
839
  do
840
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 = ((M = (S = s.properties) == null ? void 0 : S.categories) == null ? void 0 : M.join(", ")) ?? ((_ = (k = s.properties) == null ? void 0 : k.place_type_name) == null ? void 0 : _[0]) ?? s.place_type[0]);
843
+ 1 && t(6, r = ((M = (S = o.properties) == null ? void 0 : S.categories) == null ? void 0 : M.join(", ")) ?? ((E = (C = o.properties) == null ? void 0 : C.place_type_name) == null ? void 0 : E[0]) ?? o.place_type[0]);
844
844
  }, t(11, n = (d == null ? void 0 : d.length) ?? 0), [
845
- s,
846
- u,
847
845
  o,
846
+ u,
847
+ s,
848
848
  l,
849
849
  a,
850
850
  f,
851
851
  r,
852
852
  y,
853
- w,
853
+ _,
854
854
  c,
855
855
  g,
856
856
  n,
@@ -859,9 +859,9 @@ function Un(i, e, t) {
859
859
  p
860
860
  ];
861
861
  }
862
- class Fn extends xe {
862
+ class Qn extends Ce {
863
863
  constructor(e) {
864
- super(), Se(this, e, Un, Dn, Le, {
864
+ super(), Me(this, e, qn, jn, xe, {
865
865
  feature: 0,
866
866
  selected: 1,
867
867
  showPlaceType: 2,
@@ -870,7 +870,7 @@ class Fn extends xe {
870
870
  });
871
871
  }
872
872
  }
873
- function Gn(i) {
873
+ function Zn(i) {
874
874
  let e;
875
875
  return {
876
876
  c() {
@@ -887,42 +887,42 @@ function Gn(i) {
887
887
  }
888
888
  };
889
889
  }
890
- class jn extends xe {
890
+ class Hn extends Ce {
891
891
  constructor(e) {
892
- super(), Se(this, e, null, Gn, Le, {});
892
+ super(), Me(this, e, null, Zn, xe, {});
893
893
  }
894
894
  }
895
- function qn(i) {
895
+ function Vn(i) {
896
896
  let e, t, n;
897
897
  return {
898
898
  c() {
899
- e = le("svg"), t = le("path"), b(t, "stroke-width", "4"), b(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"), b(t, "class", "svelte-gzo3ar"), b(e, "width", n = /*displayIn*/
900
- i[0] === "list" ? 20 : void 0), b(e, "viewBox", "0 0 70 85"), b(e, "fill", "none"), b(e, "class", "svelte-gzo3ar"), re(
899
+ e = ae("svg"), t = ae("path"), b(t, "stroke-width", "4"), b(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"), b(t, "class", "svelte-gzo3ar"), b(e, "width", n = /*displayIn*/
900
+ i[0] === "list" ? 20 : void 0), b(e, "viewBox", "0 0 70 85"), b(e, "fill", "none"), b(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*/
909
909
  i[0] === "list"
910
910
  );
911
911
  },
912
- m(r, s) {
913
- U(r, e, s), P(e, t);
912
+ m(r, o) {
913
+ U(r, e, o), P(e, t);
914
914
  },
915
- p(r, [s]) {
916
- s & /*displayIn*/
915
+ p(r, [o]) {
916
+ o & /*displayIn*/
917
917
  1 && n !== (n = /*displayIn*/
918
- r[0] === "list" ? 20 : void 0) && b(e, "width", n), s & /*displayIn*/
919
- 1 && re(
918
+ r[0] === "list" ? 20 : void 0) && b(e, "width", n), o & /*displayIn*/
919
+ 1 && se(
920
920
  e,
921
921
  "in-map",
922
922
  /*displayIn*/
923
923
  r[0] !== "list"
924
- ), s & /*displayIn*/
925
- 1 && re(
924
+ ), o & /*displayIn*/
925
+ 1 && se(
926
926
  e,
927
927
  "list-icon",
928
928
  /*displayIn*/
@@ -936,22 +936,22 @@ function qn(i) {
936
936
  }
937
937
  };
938
938
  }
939
- function Qn(i, e, t) {
939
+ function Yn(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 Zn extends xe {
945
+ class Kn extends Ce {
946
946
  constructor(e) {
947
- super(), Se(this, e, Qn, qn, Le, { displayIn: 0 });
947
+ super(), Me(this, e, Yn, Vn, xe, { displayIn: 0 });
948
948
  }
949
949
  }
950
- function Hn(i) {
950
+ function Xn(i) {
951
951
  let e, t;
952
952
  return {
953
953
  c() {
954
- e = le("svg"), t = le("path"), b(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"), b(e, "viewBox", "0 0 60.006 21.412"), b(e, "width", "14"), b(e, "height", "20"), b(e, "class", "svelte-en2qvf");
954
+ e = ae("svg"), t = ae("path"), b(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"), b(e, "viewBox", "0 0 60.006 21.412"), b(e, "width", "14"), b(e, "height", "20"), b(e, "class", "svelte-en2qvf");
955
955
  },
956
956
  m(n, r) {
957
957
  U(n, e, r), P(e, t);
@@ -964,19 +964,19 @@ function Hn(i) {
964
964
  }
965
965
  };
966
966
  }
967
- class Vn extends xe {
967
+ class Jn extends Ce {
968
968
  constructor(e) {
969
- super(), Se(this, e, null, Hn, Le, {});
969
+ super(), Me(this, e, null, Xn, xe, {});
970
970
  }
971
971
  }
972
- function Yn(i) {
972
+ function $n(i) {
973
973
  let e, t, n;
974
974
  return {
975
975
  c() {
976
- e = le("svg"), t = le("circle"), n = le("path"), b(t, "cx", "4.789"), b(t, "cy", "4.787"), b(t, "r", "3.85"), b(t, "class", "svelte-1aq105l"), b(n, "d", "M12.063 12.063 7.635 7.635"), b(n, "class", "svelte-1aq105l"), b(e, "xmlns", "http://www.w3.org/2000/svg"), b(e, "width", "13"), b(e, "height", "13"), b(e, "viewBox", "0 0 13 13"), b(e, "class", "svelte-1aq105l");
976
+ e = ae("svg"), t = ae("circle"), n = ae("path"), b(t, "cx", "4.789"), b(t, "cy", "4.787"), b(t, "r", "3.85"), b(t, "class", "svelte-1aq105l"), b(n, "d", "M12.063 12.063 7.635 7.635"), b(n, "class", "svelte-1aq105l"), b(e, "xmlns", "http://www.w3.org/2000/svg"), b(e, "width", "13"), b(e, "height", "13"), b(e, "viewBox", "0 0 13 13"), b(e, "class", "svelte-1aq105l");
977
977
  },
978
- m(r, s) {
979
- U(r, e, s), P(e, t), P(e, n);
978
+ m(r, o) {
979
+ U(r, e, o), P(e, t), P(e, n);
980
980
  },
981
981
  p: z,
982
982
  i: z,
@@ -986,37 +986,37 @@ function Yn(i) {
986
986
  }
987
987
  };
988
988
  }
989
- class Kn extends xe {
989
+ class er extends Ce {
990
990
  constructor(e) {
991
- super(), Se(this, e, null, Yn, Le, {});
991
+ super(), Me(this, e, null, $n, xe, {});
992
992
  }
993
993
  }
994
- function Xn(i, e, t) {
995
- const n = e[1], r = e[0], s = n - r;
996
- return i === n && t ? i : ((i - r) % s + s) % s + r;
994
+ function tr(i, e, t) {
995
+ const n = e[1], r = e[0], o = n - r;
996
+ return i === n && t ? i : ((i - r) % o + o) % o + r;
997
997
  }
998
- function ot(i) {
998
+ function at(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 Be;
1003
- async function Jn(i, e, t) {
1002
+ let Ue;
1003
+ async function ir(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 (Be && r.cachedLocationExpiry && Be.time + r.cachedLocationExpiry > Date.now()) {
1011
- if (!Be.coords)
1010
+ if (Ue && r.cachedLocationExpiry && Ue.time + r.cachedLocationExpiry > Date.now()) {
1011
+ if (!Ue.coords)
1012
1012
  break e;
1013
- return Be.coords;
1013
+ return Ue.coords;
1014
1014
  }
1015
- let s;
1015
+ let o;
1016
1016
  try {
1017
- return s = await new Promise((u, o) => {
1017
+ return o = await new Promise((u, s) => {
1018
1018
  t.signal.addEventListener("abort", () => {
1019
- o(Error("aborted"));
1019
+ s(Error("aborted"));
1020
1020
  }), navigator.geolocation.getCurrentPosition(
1021
1021
  (c) => {
1022
1022
  u(
@@ -1024,16 +1024,16 @@ async function Jn(i, e, t) {
1024
1024
  );
1025
1025
  },
1026
1026
  (c) => {
1027
- o(c);
1027
+ s(c);
1028
1028
  },
1029
1029
  r
1030
1030
  );
1031
- }), s;
1031
+ }), o;
1032
1032
  } catch {
1033
1033
  } finally {
1034
- r.cachedLocationExpiry && (Be = {
1034
+ r.cachedLocationExpiry && (Ue = {
1035
1035
  time: Date.now(),
1036
- coords: s
1036
+ coords: o
1037
1037
  });
1038
1038
  }
1039
1039
  if (t.signal.aborted)
@@ -1045,67 +1045,67 @@ async function Jn(i, e, t) {
1045
1045
  return n[1].toFixed(6) + "," + n[2].toFixed(6);
1046
1046
  }
1047
1047
  }
1048
- const $n = /^(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, Jt = /^([+-]?[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,})$/, $t = /^(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, ei = /^(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, ti = /^(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, ii = /^(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 er(i) {
1048
+ const nr = /^(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, ti = /^([+-]?[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,})$/, ii = /^(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, ni = /^(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, ri = /^(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, oi = /^(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 rr(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((g) => Number(g.trim())), t = Number(e[0]), n = Number(e[1]), r = Math.abs(t), s = Math.abs(n), u = t > 0 ? "N" : "S", o = n > 0 ? "E" : "W";
1053
+ const e = this.decimalCoordinates.split(",").map((g) => Number(g.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}° ${u}, ${s}° ${o}`);
1056
- const l = Math.floor(r), d = Math.floor(s), a = (r - l) * 60, f = (s - d) * 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 g = ni(a, 3).toFixed(3).padStart(6, "0"), y = ni(f, 3).toFixed(3).padStart(6, "0");
1059
- g.endsWith(".000") && y.endsWith(".000") && (g = g.replace(/\.000$/, ""), y = y.replace(/\.000$/, "")), c = `${l}° ${g}' ${u}, ${d}° ${y}' ${o}`;
1058
+ let g = si(a, 3).toFixed(3).padStart(6, "0"), y = si(f, 3).toFixed(3).padStart(6, "0");
1059
+ g.endsWith(".000") && y.endsWith(".000") && (g = g.replace(/\.000$/, ""), y = y.replace(/\.000$/, "")), c = `${l}° ${g}' ${u}, ${d}° ${y}' ${s}`;
1060
1060
  }
1061
1061
  if (i == "DMS") {
1062
1062
  const g = Math.floor(a), y = Math.floor(f);
1063
- let w = ((a - g) * 60).toFixed(1).padStart(4, "0"), h = ((f - y) * 60).toFixed(1).padStart(4, "0");
1063
+ let _ = ((a - g) * 60).toFixed(1).padStart(4, "0"), h = ((f - y) * 60).toFixed(1).padStart(4, "0");
1064
1064
  const v = g.toString().padStart(2, "0"), p = y.toString().padStart(2, "0");
1065
- w.endsWith(".0") && h.endsWith(".0") && (w = w.replace(/\.0$/, ""), h = h.replace(/\.0$/, "")), c = `${l}° ${v}' ${w}" ${u}, ${d}° ${p}' ${h}" ${o}`;
1065
+ _.endsWith(".0") && h.endsWith(".0") && (_ = _.replace(/\.0$/, ""), h = h.replace(/\.0$/, "")), c = `${l}° ${v}' ${_}" ${u}, ${d}° ${p}' ${h}" ${s}`;
1066
1066
  }
1067
1067
  return c;
1068
1068
  } else
1069
1069
  throw new Error("no decimal coordinates to convert");
1070
1070
  }
1071
- function ni(i, e) {
1071
+ function si(i, e) {
1072
1072
  const t = Math.pow(10, e);
1073
1073
  return Math.round((i + Number.EPSILON) * t) / t;
1074
1074
  }
1075
- function Ot(i, e) {
1075
+ function zt(i, e) {
1076
1076
  e || (e = 5), i = i.replace(/\s+/g, " ").trim();
1077
- let t = null, n = null, r = "", s = "", u = null, o = [], c = !1;
1078
- if ($n.test(i))
1077
+ let t = null, n = null, r = "", o = "", u = null, s = [], c = !1;
1078
+ if (nr.test(i))
1079
1079
  throw new Error("invalid coordinate value");
1080
- if (Jt.test(i))
1081
- if (o = Jt.exec(i), c = De(o), c)
1082
- t = Math.abs(o[1]) + o[2] / 60, Number(o[1]) < 0 && (t *= -1), n = Math.abs(o[3]) + o[4] / 60, Number(o[3]) < 0 && (n *= -1), u = "DM";
1080
+ if (ti.test(i))
1081
+ if (s = ti.exec(i), c = Fe(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 ($t.test(i))
1086
- if (o = $t.exec(i), c = De(o), c) {
1087
- if (t = o[2], n = o[6], t.includes(",") && (t = t.replace(",", ".")), n.includes(",") && (n = n.replace(",", ".")), u = "DD", Number(Math.round(t)) == Number(t))
1085
+ else if (ii.test(i))
1086
+ if (s = ii.exec(i), c = Fe(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
- o[1] ? (r = o[1], s = o[5]) : o[4] && (r = o[4], s = o[8]);
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 (ei.test(i))
1095
- if (o = ei.exec(i), c = De(o), c)
1096
- t = Math.abs(parseInt(o[2])), o[4] && (t += o[4] / 60, u = "DM"), o[6] && (t += o[6].replace(",", ".") / 3600, u = "DMS"), parseInt(o[2]) < 0 && (t = -1 * t), n = Math.abs(parseInt(o[9])), o[11] && (n += o[11] / 60), o[13] && (n += o[13].replace(",", ".") / 3600), parseInt(o[9]) < 0 && (n = -1 * n), o[1] ? (r = o[1], s = o[8]) : o[7] && (r = o[7], s = o[14]);
1094
+ else if (ni.test(i))
1095
+ if (s = ni.exec(i), c = Fe(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 (ti.test(i))
1100
- if (o = ti.exec(i), c = De(o), c)
1101
- t = Math.abs(parseInt(o[2])), o[4] && (t += o[4] / 60, u = "DM"), o[6] && (t += o[6] / 3600, u = "DMS"), parseInt(o[2]) < 0 && (t = -1 * t), n = Math.abs(parseInt(o[10])), o[12] && (n += o[12] / 60), o[14] && (n += o[14] / 3600), parseInt(o[10]) < 0 && (n = -1 * n), o[1] ? (r = o[1], s = o[9]) : o[8] && (r = o[8], s = o[16]);
1099
+ else if (ri.test(i))
1100
+ if (s = ri.exec(i), c = Fe(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 (ii.test(i)) {
1105
- if (o = ii.exec(i), c = De(o), o.filter((l) => l).length <= 5)
1104
+ else if (oi.test(i)) {
1105
+ if (s = oi.exec(i), c = Fe(s), s.filter((l) => l).length <= 5)
1106
1106
  throw new Error("invalid coordinates format");
1107
1107
  if (c)
1108
- t = Math.abs(parseInt(o[2])), o[4] && (t += o[4].replace(",", ".") / 60, u = "DM"), o[6] && (t += o[6].replace(",", ".") / 3600, u = "DMS"), parseInt(o[2]) < 0 && (t = -1 * t), n = Math.abs(parseInt(o[10])), o[12] && (n += o[12].replace(",", ".") / 60), o[14] && (n += o[14].replace(",", ".") / 3600), parseInt(o[10]) < 0 && (n = -1 * n), o[1] ? (r = o[1], s = o[9]) : o[8] && (r = o[8], s = o[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
  }
@@ -1114,14 +1114,14 @@ function Ot(i, e) {
1114
1114
  throw new Error("invalid longitude value");
1115
1115
  if (Math.abs(t) >= 90)
1116
1116
  throw new Error("invalid latitude value");
1117
- if (r && !s || !r && s)
1117
+ if (r && !o || !r && o)
1118
1118
  throw new Error("invalid coordinates value");
1119
- if (r && r == s)
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
1122
  let l = /S|SOUTH/i;
1123
- l.test(r) && t > 0 && (t = -1 * t), l = /W|WEST/i, l.test(s) && n > 0 && (n = -1 * n);
1124
- const d = o[0].trim();
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
1126
  const g = /[,/;\u0020]/g, y = d.match(g);
1127
1127
  if (y == null) {
@@ -1134,14 +1134,14 @@ function Ot(i, e) {
1134
1134
  if (v == 0)
1135
1135
  p = d.indexOf(y[0]), a = d.substring(0, p).trim(), f = d.substring(p + 1).trim();
1136
1136
  else {
1137
- let E = 0, S = 0;
1138
- for (; E <= v; )
1139
- p = d.indexOf(y[E], S), S = p + 1, E++;
1137
+ let w = 0, S = 0;
1138
+ for (; w <= v; )
1139
+ p = d.indexOf(y[w], S), S = p + 1, w++;
1140
1140
  a = d.substring(0, p).trim(), f = d.substring(p + 1).trim();
1141
1141
  }
1142
1142
  }
1143
- const w = a.split(".");
1144
- if (w.length == 2 && w[1] == 0 && w[1].length != 2)
1143
+ const _ = a.split(".");
1144
+ if (_.length == 2 && _[1] == 0 && _[1].length != 2)
1145
1145
  throw new Error("invalid coordinates format");
1146
1146
  const h = f.split(".");
1147
1147
  if (h.length == 2 && h[1] == 0 && h[1].length != 2)
@@ -1156,23 +1156,23 @@ function Ot(i, e) {
1156
1156
  decimalLongitude: n,
1157
1157
  decimalCoordinates: `${t},${n}`,
1158
1158
  originalFormat: u,
1159
- closeEnough: tr,
1160
- toCoordinateFormat: er
1159
+ closeEnough: or,
1160
+ toCoordinateFormat: rr
1161
1161
  });
1162
1162
  } else
1163
1163
  throw new Error("coordinates pattern match failed");
1164
1164
  }
1165
- function De(i) {
1165
+ function Fe(i) {
1166
1166
  if (!isNaN(i[0]))
1167
1167
  return !1;
1168
1168
  const e = [...i];
1169
1169
  if (e.shift(), e.length % 2 > 0)
1170
1170
  return !1;
1171
1171
  const t = /^[-+]?\d+([\.,]\d+)?$/, n = /[eastsouthnorthwest]+/i, r = e.length / 2;
1172
- for (let s = 0; s < r; s++) {
1173
- const u = e[s], o = e[s + r], c = t.test(u) && t.test(o), l = n.test(u) && n.test(o), d = u == o;
1174
- if (!(u == null && o == null)) {
1175
- if (u == null || o == null)
1172
+ for (let o = 0; o < r; o++) {
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
1177
  if (c || l || d)
1178
1178
  continue;
@@ -1181,28 +1181,28 @@ function De(i) {
1181
1181
  }
1182
1182
  return !0;
1183
1183
  }
1184
- function ri(i, e) {
1184
+ function li(i, e) {
1185
1185
  const t = Math.abs(i - e);
1186
1186
  return Number(t.toFixed(6)) <= 1e-5;
1187
1187
  }
1188
- function tr(i) {
1188
+ function or(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 ri(this.decimalLatitude, Number(e[0])) && ri(this.decimalLongitude, e[1]);
1195
+ return li(this.decimalLatitude, Number(e[0])) && li(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 ir = Object.freeze({
1199
+ const sr = Object.freeze({
1200
1200
  DMS: "DMS",
1201
1201
  DM: "DM",
1202
1202
  DD: "DD"
1203
1203
  });
1204
- Ot.to = ir;
1205
- const nr = [
1204
+ zt.to = sr;
1205
+ const lr = [
1206
1206
  {
1207
1207
  verbatimCoordinates: "40.123, -74.123",
1208
1208
  verbatimLatitude: "40.123",
@@ -1343,10 +1343,10 @@ const nr = [
1343
1343
  verbatimLatitude: "40 7 22.8",
1344
1344
  verbatimLongitude: "-74 7 22.8"
1345
1345
  }
1346
- ], rr = {
1346
+ ], ur = {
1347
1347
  decimalLatitude: 40.123,
1348
1348
  decimalLongitude: -74.123
1349
- }, sr = [
1349
+ }, ar = [
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 nr = [
1431
1431
  decimalLatitude: -18.4,
1432
1432
  decimalLongitude: 22.75
1433
1433
  }
1434
- ], or = [
1434
+ ], cr = [
1435
1435
  {
1436
1436
  verbatimCoordinates: "10.432342S 10.6345345E",
1437
1437
  verbatimLatitude: "10.432342S",
@@ -1566,27 +1566,27 @@ const nr = [
1566
1566
  decimalLongitude: 18.33453
1567
1567
  }
1568
1568
  ];
1569
- function lr() {
1569
+ function fr() {
1570
1570
  const i = [];
1571
- return nr.forEach((e) => {
1572
- e.decimalLatitude ? i.push(e) : i.push({ ...e, ...rr });
1573
- }), [...i, ...sr, ...or];
1574
- }
1575
- const ur = lr();
1576
- Ot.formats = ur.map((i) => i.verbatimCoordinates);
1577
- const ar = Ot;
1578
- function si(i, e, t) {
1571
+ return lr.forEach((e) => {
1572
+ e.decimalLatitude ? i.push(e) : i.push({ ...e, ...ur });
1573
+ }), [...i, ...ar, ...cr];
1574
+ }
1575
+ const dr = fr();
1576
+ zt.formats = dr.map((i) => i.verbatimCoordinates);
1577
+ const hr = zt;
1578
+ function ui(i, e, t) {
1579
1579
  const n = i.slice();
1580
- return n[84] = e[t], n[86] = t, n;
1580
+ return n[87] = e[t], n[89] = t, n;
1581
1581
  }
1582
- function oi(i) {
1582
+ function ai(i) {
1583
1583
  let e, t;
1584
- return e = new jn({}), {
1584
+ return e = new Hn({}), {
1585
1585
  c() {
1586
- _e(e.$$.fragment);
1586
+ Le(e.$$.fragment);
1587
1587
  },
1588
1588
  m(n, r) {
1589
- he(e, n, r), t = !0;
1589
+ ge(e, n, r), t = !0;
1590
1590
  },
1591
1591
  i(n) {
1592
1592
  t || (j(e.$$.fragment, n), t = !0);
@@ -1595,43 +1595,43 @@ function oi(i) {
1595
1595
  V(e.$$.fragment, n), t = !1;
1596
1596
  },
1597
1597
  d(n) {
1598
- ge(e, n);
1598
+ me(e, n);
1599
1599
  }
1600
1600
  };
1601
1601
  }
1602
- function li(i) {
1603
- let e, t, n, r, s;
1604
- return t = new Vn({}), {
1602
+ function ci(i) {
1603
+ let e, t, n, r, o;
1604
+ return t = new Jn({}), {
1605
1605
  c() {
1606
- e = A("button"), _e(t.$$.fragment), b(e, "type", "button"), b(
1606
+ e = A("button"), Le(t.$$.fragment), b(e, "type", "button"), b(
1607
1607
  e,
1608
1608
  "title",
1609
1609
  /*reverseButtonTitle*/
1610
1610
  i[9]
1611
- ), b(e, "class", "svelte-bz0zu3"), re(
1611
+ ), b(e, "class", "svelte-bz0zu3"), se(
1612
1612
  e,
1613
1613
  "active",
1614
1614
  /*reverseActive*/
1615
1615
  i[0]
1616
1616
  );
1617
1617
  },
1618
- m(u, o) {
1619
- U(u, e, o), he(t, e, null), n = !0, r || (s = $(
1618
+ m(u, s) {
1619
+ U(u, e, s), ge(t, e, null), n = !0, r || (o = $(
1620
1620
  e,
1621
1621
  "click",
1622
1622
  /*click_handler_2*/
1623
- i[69]
1623
+ i[71]
1624
1624
  ), r = !0);
1625
1625
  },
1626
- p(u, o) {
1627
- (!n || o[0] & /*reverseButtonTitle*/
1626
+ p(u, s) {
1627
+ (!n || s[0] & /*reverseButtonTitle*/
1628
1628
  512) && b(
1629
1629
  e,
1630
1630
  "title",
1631
1631
  /*reverseButtonTitle*/
1632
1632
  u[9]
1633
- ), (!n || o[0] & /*reverseActive*/
1634
- 1) && re(
1633
+ ), (!n || s[0] & /*reverseActive*/
1634
+ 1) && se(
1635
1635
  e,
1636
1636
  "active",
1637
1637
  /*reverseActive*/
@@ -1645,24 +1645,24 @@ function li(i) {
1645
1645
  V(t.$$.fragment, u), n = !1;
1646
1646
  },
1647
1647
  d(u) {
1648
- u && B(e), ge(t), r = !1, s();
1648
+ u && B(e), me(t), r = !1, o();
1649
1649
  }
1650
1650
  };
1651
1651
  }
1652
- function cr(i) {
1653
- let e, t = [], n = /* @__PURE__ */ new Map(), r, s, u, o = Kt(
1652
+ function gr(i) {
1653
+ let e, t = [], n = /* @__PURE__ */ new Map(), r, o, u, s = $t(
1654
1654
  /*listFeatures*/
1655
1655
  i[14]
1656
1656
  );
1657
1657
  const c = (l) => (
1658
1658
  /*feature*/
1659
- l[84].id + /*feature*/
1660
- (l[84].address ? "," + /*feature*/
1661
- l[84].address : "")
1659
+ l[87].id + /*feature*/
1660
+ (l[87].address ? "," + /*feature*/
1661
+ l[87].address : "")
1662
1662
  );
1663
- for (let l = 0; l < o.length; l += 1) {
1664
- let d = si(i, o, l), a = c(d);
1665
- n.set(a, t[l] = ui(a, d));
1663
+ for (let l = 0; l < s.length; l += 1) {
1664
+ let d = ui(i, s, l), a = c(d);
1665
+ n.set(a, t[l] = fi(a, d));
1666
1666
  }
1667
1667
  return {
1668
1668
  c() {
@@ -1675,31 +1675,31 @@ function cr(i) {
1675
1675
  U(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, s || (u = [
1678
+ r = !0, o || (u = [
1679
1679
  $(
1680
1680
  e,
1681
1681
  "mouseleave",
1682
1682
  /*mouseleave_handler*/
1683
- i[73]
1683
+ i[75]
1684
1684
  ),
1685
1685
  $(
1686
1686
  e,
1687
1687
  "blur",
1688
1688
  /*blur_handler_1*/
1689
- i[74]
1689
+ i[76]
1690
1690
  )
1691
- ], s = !0);
1691
+ ], o = !0);
1692
1692
  },
1693
1693
  p(l, d) {
1694
1694
  d[0] & /*listFeatures, showPlaceType, selectedItemIndex, missingIconsCache, iconsBaseUrl, pick*/
1695
- 17880064 && (o = Kt(
1695
+ 17880064 && (s = $t(
1696
1696
  /*listFeatures*/
1697
1697
  l[14]
1698
- ), nt(), t = Mn(t, d, c, 1, l, o, n, e, xn, ui, null, si), rt());
1698
+ ), st(), t = Tn(t, d, c, 1, l, s, n, e, Nn, fi, null, ui), lt());
1699
1699
  },
1700
1700
  i(l) {
1701
1701
  if (!r) {
1702
- for (let d = 0; d < o.length; d += 1)
1702
+ for (let d = 0; d < s.length; d += 1)
1703
1703
  j(t[d]);
1704
1704
  r = !0;
1705
1705
  }
@@ -1713,46 +1713,46 @@ function cr(i) {
1713
1713
  l && B(e);
1714
1714
  for (let d = 0; d < t.length; d += 1)
1715
1715
  t[d].d();
1716
- s = !1, me(u);
1716
+ o = !1, ve(u);
1717
1717
  }
1718
1718
  };
1719
1719
  }
1720
- function fr(i) {
1721
- let e, t, n, r, s, u;
1722
- return t = new Ii({}), {
1720
+ function mr(i) {
1721
+ let e, t, n, r, o, u;
1722
+ return t = new Wi({}), {
1723
1723
  c() {
1724
- e = A("div"), _e(t.$$.fragment), n = ie(), r = A("div"), s = Ee(
1724
+ e = A("div"), Le(t.$$.fragment), n = ie(), r = A("div"), o = _e(
1725
1725
  /*noResultsMessage*/
1726
1726
  i[7]
1727
1727
  ), b(r, "class", "svelte-bz0zu3"), b(e, "class", "no-results svelte-bz0zu3");
1728
1728
  },
1729
- m(o, c) {
1730
- U(o, e, c), he(t, e, null), P(e, n), P(e, r), P(r, s), u = !0;
1729
+ m(s, c) {
1730
+ U(s, e, c), ge(t, e, null), P(e, n), P(e, r), P(r, o), u = !0;
1731
1731
  },
1732
- p(o, c) {
1732
+ p(s, c) {
1733
1733
  (!u || c[0] & /*noResultsMessage*/
1734
- 128) && Ge(
1735
- s,
1734
+ 128) && qe(
1735
+ o,
1736
1736
  /*noResultsMessage*/
1737
- o[7]
1737
+ s[7]
1738
1738
  );
1739
1739
  },
1740
- i(o) {
1741
- u || (j(t.$$.fragment, o), u = !0);
1740
+ i(s) {
1741
+ u || (j(t.$$.fragment, s), u = !0);
1742
1742
  },
1743
- o(o) {
1744
- V(t.$$.fragment, o), u = !1;
1743
+ o(s) {
1744
+ V(t.$$.fragment, s), u = !1;
1745
1745
  },
1746
- d(o) {
1747
- o && B(e), ge(t);
1746
+ d(s) {
1747
+ s && B(e), me(t);
1748
1748
  }
1749
1749
  };
1750
1750
  }
1751
- function dr(i) {
1751
+ function vr(i) {
1752
1752
  let e = "", t;
1753
1753
  return {
1754
1754
  c() {
1755
- t = Ee(e);
1755
+ t = _e(e);
1756
1756
  },
1757
1757
  m(n, r) {
1758
1758
  U(n, t, r);
@@ -1765,27 +1765,27 @@ function dr(i) {
1765
1765
  }
1766
1766
  };
1767
1767
  }
1768
- function hr(i) {
1769
- let e, t, n, r, s, u, o, c, l, d, a;
1770
- return t = new Ii({}), c = new Pi({}), {
1768
+ function yr(i) {
1769
+ let e, t, n, r, o, u, s, c, l, d, a;
1770
+ return t = new Wi({}), c = new Ai({}), {
1771
1771
  c() {
1772
- e = A("div"), _e(t.$$.fragment), n = ie(), r = A("div"), s = Ee(
1772
+ e = A("div"), Le(t.$$.fragment), n = ie(), r = A("div"), o = _e(
1773
1773
  /*errorMessage*/
1774
1774
  i[6]
1775
- ), u = ie(), o = A("button"), _e(c.$$.fragment), b(r, "class", "svelte-bz0zu3"), b(o, "class", "svelte-bz0zu3"), b(e, "class", "error svelte-bz0zu3");
1775
+ ), u = ie(), s = A("button"), Le(c.$$.fragment), b(r, "class", "svelte-bz0zu3"), b(s, "class", "svelte-bz0zu3"), b(e, "class", "error svelte-bz0zu3");
1776
1776
  },
1777
1777
  m(f, g) {
1778
- U(f, e, g), he(t, e, null), P(e, n), P(e, r), P(r, s), P(e, u), P(e, o), he(c, o, null), l = !0, d || (a = $(
1779
- o,
1778
+ U(f, e, g), ge(t, e, null), P(e, n), P(e, r), P(r, o), P(e, u), P(e, s), ge(c, s, null), l = !0, d || (a = $(
1779
+ s,
1780
1780
  "click",
1781
1781
  /*click_handler_3*/
1782
- i[70]
1782
+ i[72]
1783
1783
  ), d = !0);
1784
1784
  },
1785
1785
  p(f, g) {
1786
1786
  (!l || g[0] & /*errorMessage*/
1787
- 64) && Ge(
1788
- s,
1787
+ 64) && qe(
1788
+ o,
1789
1789
  /*errorMessage*/
1790
1790
  f[6]
1791
1791
  );
@@ -1797,35 +1797,35 @@ function hr(i) {
1797
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), d = !1, a();
1800
+ f && B(e), me(t), me(c), d = !1, a();
1801
1801
  }
1802
1802
  };
1803
1803
  }
1804
- function ui(i, e) {
1804
+ function fi(i, e) {
1805
1805
  let t, n, r;
1806
- function s() {
1806
+ function o() {
1807
1807
  return (
1808
1808
  /*mouseenter_handler*/
1809
- e[71](
1809
+ e[73](
1810
1810
  /*i*/
1811
- e[86]
1811
+ e[89]
1812
1812
  )
1813
1813
  );
1814
1814
  }
1815
1815
  function u() {
1816
1816
  return (
1817
1817
  /*focus_handler_1*/
1818
- e[72](
1818
+ e[74](
1819
1819
  /*feature*/
1820
- e[84]
1820
+ e[87]
1821
1821
  )
1822
1822
  );
1823
1823
  }
1824
- return n = new Fn({
1824
+ return n = new Qn({
1825
1825
  props: {
1826
1826
  feature: (
1827
1827
  /*feature*/
1828
- e[84]
1828
+ e[87]
1829
1829
  ),
1830
1830
  showPlaceType: (
1831
1831
  /*showPlaceType*/
@@ -1834,7 +1834,7 @@ function ui(i, e) {
1834
1834
  selected: (
1835
1835
  /*selectedItemIndex*/
1836
1836
  e[15] === /*i*/
1837
- e[86]
1837
+ e[89]
1838
1838
  ),
1839
1839
  missingIconsCache: (
1840
1840
  /*missingIconsCache*/
@@ -1845,72 +1845,72 @@ function ui(i, e) {
1845
1845
  e[12]
1846
1846
  )
1847
1847
  }
1848
- }), n.$on("mouseenter", s), n.$on("focus", u), {
1848
+ }), n.$on("mouseenter", o), n.$on("focus", u), {
1849
1849
  key: i,
1850
1850
  first: null,
1851
1851
  c() {
1852
- t = mn(), _e(n.$$.fragment), this.first = t;
1852
+ t = bn(), Le(n.$$.fragment), this.first = t;
1853
1853
  },
1854
- m(o, c) {
1855
- U(o, t, c), he(n, o, c), r = !0;
1854
+ m(s, c) {
1855
+ U(s, t, c), ge(n, s, c), r = !0;
1856
1856
  },
1857
- p(o, c) {
1858
- e = o;
1857
+ p(s, c) {
1858
+ e = s;
1859
1859
  const l = {};
1860
1860
  c[0] & /*listFeatures*/
1861
1861
  16384 && (l.feature = /*feature*/
1862
- e[84]), c[0] & /*showPlaceType*/
1862
+ e[87]), c[0] & /*showPlaceType*/
1863
1863
  1024 && (l.showPlaceType = /*showPlaceType*/
1864
1864
  e[10]), c[0] & /*selectedItemIndex, listFeatures*/
1865
1865
  49152 && (l.selected = /*selectedItemIndex*/
1866
1866
  e[15] === /*i*/
1867
- e[86]), c[0] & /*iconsBaseUrl*/
1867
+ e[89]), c[0] & /*iconsBaseUrl*/
1868
1868
  4096 && (l.iconsBaseUrl = /*iconsBaseUrl*/
1869
1869
  e[12]), n.$set(l);
1870
1870
  },
1871
- i(o) {
1872
- r || (j(n.$$.fragment, o), r = !0);
1871
+ i(s) {
1872
+ r || (j(n.$$.fragment, s), r = !0);
1873
1873
  },
1874
- o(o) {
1875
- V(n.$$.fragment, o), r = !1;
1874
+ o(s) {
1875
+ V(n.$$.fragment, s), r = !1;
1876
1876
  },
1877
- d(o) {
1878
- o && B(t), ge(n, o);
1877
+ d(s) {
1878
+ s && B(t), me(n, s);
1879
1879
  }
1880
1880
  };
1881
1881
  }
1882
- function gr(i) {
1883
- let e, t, n, r, s, u, o, c, l, d, a, f, g, y, w, h, v, p, E, S, M, k = !1;
1884
- s = new Kn({}), a = new Pi({});
1885
- let _ = (
1882
+ function pr(i) {
1883
+ let e, t, n, r, o, u, s, c, l, d, a, f, g, y, _, h, v, p, w, S, M, C = !1;
1884
+ o = new er({}), a = new Ai({});
1885
+ let E = (
1886
1886
  /*abortController*/
1887
- i[19] && oi()
1887
+ i[19] && ai()
1888
1888
  ), L = (
1889
1889
  /*enableReverse*/
1890
- i[5] === "button" && li(i)
1890
+ i[5] === "button" && ci(i)
1891
1891
  );
1892
- const C = (
1892
+ const k = (
1893
1893
  /*#slots*/
1894
- i[61].default
1895
- ), O = fn(
1896
- C,
1894
+ i[63].default
1895
+ ), O = mn(
1896
+ k,
1897
1897
  i,
1898
1898
  /*$$scope*/
1899
- i[60],
1899
+ i[62],
1900
1900
  null
1901
- ), G = [hr, dr, fr, cr], N = [];
1901
+ ), G = [yr, vr, mr, gr], N = [];
1902
1902
  function X(x, W) {
1903
- var se, fe;
1903
+ var le, de;
1904
1904
  return (
1905
1905
  /*error*/
1906
1906
  x[18] ? 0 : (
1907
1907
  /*focusedDelayed*/
1908
1908
  x[16] ? (
1909
1909
  /*listFeatures*/
1910
- ((se = x[14]) == null ? void 0 : se.length) === 0 ? 2 : (
1910
+ ((le = x[14]) == null ? void 0 : le.length) === 0 ? 2 : (
1911
1911
  /*focusedDelayed*/
1912
1912
  x[16] && /*listFeatures*/
1913
- ((fe = x[14]) != null && fe.length) ? 3 : -1
1913
+ ((de = x[14]) != null && de.length) ? 3 : -1
1914
1914
  )
1915
1915
  ) : 1
1916
1916
  )
@@ -1918,30 +1918,30 @@ function gr(i) {
1918
1918
  }
1919
1919
  return ~(h = X(i)) && (v = N[h] = G[h](i)), {
1920
1920
  c() {
1921
- e = ie(), t = A("form"), n = A("div"), r = A("button"), _e(s.$$.fragment), u = ie(), o = A("input"), c = ie(), l = A("div"), d = A("button"), _e(a.$$.fragment), f = ie(), _ && _.c(), g = ie(), L && L.c(), y = ie(), O && O.c(), w = ie(), v && v.c(), b(r, "class", "search-button svelte-bz0zu3"), b(r, "type", "button"), b(
1922
- o,
1921
+ e = ie(), t = A("form"), n = A("div"), r = A("button"), Le(o.$$.fragment), u = ie(), s = A("input"), c = ie(), l = A("div"), d = A("button"), Le(a.$$.fragment), f = ie(), E && E.c(), g = ie(), L && L.c(), y = ie(), O && O.c(), _ = ie(), v && v.c(), b(r, "class", "search-button svelte-bz0zu3"), b(r, "type", "button"), b(
1922
+ s,
1923
1923
  "placeholder",
1924
1924
  /*placeholder*/
1925
1925
  i[8]
1926
1926
  ), b(
1927
- o,
1927
+ s,
1928
1928
  "aria-label",
1929
1929
  /*placeholder*/
1930
1930
  i[8]
1931
- ), b(o, "class", "svelte-bz0zu3"), b(d, "type", "button"), b(
1931
+ ), b(s, "class", "svelte-bz0zu3"), b(d, "type", "button"), b(
1932
1932
  d,
1933
1933
  "title",
1934
1934
  /*clearButtonTitle*/
1935
1935
  i[3]
1936
- ), b(d, "class", "svelte-bz0zu3"), b(l, "class", "clear-button-container svelte-bz0zu3"), re(
1936
+ ), b(d, "class", "svelte-bz0zu3"), b(l, "class", "clear-button-container svelte-bz0zu3"), se(
1937
1937
  l,
1938
1938
  "displayable",
1939
1939
  /*searchValue*/
1940
1940
  i[1] !== ""
1941
- ), b(n, "class", "input-group svelte-bz0zu3"), b(t, "tabindex", "0"), b(t, "class", p = Zt(
1941
+ ), b(n, "class", "input-group svelte-bz0zu3"), b(t, "tabindex", "0"), b(t, "class", p = Yt(
1942
1942
  /*className*/
1943
1943
  i[2]
1944
- ) + " svelte-bz0zu3"), re(
1944
+ ) + " svelte-bz0zu3"), se(
1945
1945
  t,
1946
1946
  "can-collapse",
1947
1947
  /*collapsed*/
@@ -1950,126 +1950,126 @@ function gr(i) {
1950
1950
  );
1951
1951
  },
1952
1952
  m(x, W) {
1953
- U(x, e, W), U(x, t, W), P(t, n), P(n, r), he(s, r, null), P(n, u), P(n, o), i[63](o), Ht(
1954
- o,
1953
+ U(x, e, W), U(x, t, W), P(t, n), P(n, r), ge(o, r, null), P(n, u), P(n, s), i[65](s), Kt(
1954
+ s,
1955
1955
  /*searchValue*/
1956
1956
  i[1]
1957
- ), P(n, c), P(n, l), P(l, d), he(a, d, null), P(l, f), _ && _.m(l, null), P(n, g), L && L.m(n, null), P(n, y), O && O.m(n, null), P(t, w), ~h && N[h].m(t, null), E = !0, S || (M = [
1957
+ ), P(n, c), P(n, l), P(l, d), ge(a, d, null), P(l, f), E && E.m(l, null), P(n, g), L && L.m(n, null), P(n, y), O && O.m(n, null), P(t, _), ~h && N[h].m(t, null), w = !0, S || (M = [
1958
1958
  $(
1959
1959
  r,
1960
1960
  "click",
1961
1961
  /*click_handler*/
1962
- i[62]
1962
+ i[64]
1963
1963
  ),
1964
1964
  $(
1965
- o,
1965
+ s,
1966
1966
  "input",
1967
1967
  /*input_1_input_handler*/
1968
- i[64]
1968
+ i[66]
1969
1969
  ),
1970
1970
  $(
1971
- o,
1971
+ s,
1972
1972
  "focus",
1973
1973
  /*focus_handler*/
1974
- i[65]
1974
+ i[67]
1975
1975
  ),
1976
1976
  $(
1977
- o,
1977
+ s,
1978
1978
  "blur",
1979
1979
  /*blur_handler*/
1980
- i[66]
1980
+ i[68]
1981
1981
  ),
1982
1982
  $(
1983
- o,
1983
+ s,
1984
1984
  "keydown",
1985
1985
  /*handleKeyDown*/
1986
1986
  i[22]
1987
1987
  ),
1988
1988
  $(
1989
- o,
1989
+ s,
1990
1990
  "input",
1991
1991
  /*input_handler*/
1992
- i[67]
1992
+ i[69]
1993
1993
  ),
1994
1994
  $(
1995
1995
  d,
1996
1996
  "click",
1997
1997
  /*click_handler_1*/
1998
- i[68]
1998
+ i[70]
1999
1999
  ),
2000
- $(t, "submit", vn(
2001
- /*handleOnSubmit*/
2000
+ $(t, "submit", wn(
2001
+ /*handleSubmit*/
2002
2002
  i[21]
2003
2003
  ))
2004
2004
  ], S = !0);
2005
2005
  },
2006
2006
  p(x, W) {
2007
- (!E || W[0] & /*placeholder*/
2007
+ (!w || W[0] & /*placeholder*/
2008
2008
  256) && b(
2009
- o,
2009
+ s,
2010
2010
  "placeholder",
2011
2011
  /*placeholder*/
2012
2012
  x[8]
2013
- ), (!E || W[0] & /*placeholder*/
2013
+ ), (!w || W[0] & /*placeholder*/
2014
2014
  256) && b(
2015
- o,
2015
+ s,
2016
2016
  "aria-label",
2017
2017
  /*placeholder*/
2018
2018
  x[8]
2019
2019
  ), W[0] & /*searchValue*/
2020
- 2 && o.value !== /*searchValue*/
2021
- x[1] && Ht(
2022
- o,
2020
+ 2 && s.value !== /*searchValue*/
2021
+ x[1] && Kt(
2022
+ s,
2023
2023
  /*searchValue*/
2024
2024
  x[1]
2025
- ), (!E || W[0] & /*clearButtonTitle*/
2025
+ ), (!w || W[0] & /*clearButtonTitle*/
2026
2026
  8) && b(
2027
2027
  d,
2028
2028
  "title",
2029
2029
  /*clearButtonTitle*/
2030
2030
  x[3]
2031
2031
  ), /*abortController*/
2032
- x[19] ? _ ? W[0] & /*abortController*/
2033
- 524288 && j(_, 1) : (_ = oi(), _.c(), j(_, 1), _.m(l, null)) : _ && (nt(), V(_, 1, 1, () => {
2034
- _ = null;
2035
- }), rt()), (!E || W[0] & /*searchValue*/
2036
- 2) && re(
2032
+ x[19] ? E ? W[0] & /*abortController*/
2033
+ 524288 && j(E, 1) : (E = ai(), E.c(), j(E, 1), E.m(l, null)) : E && (st(), V(E, 1, 1, () => {
2034
+ E = null;
2035
+ }), lt()), (!w || W[0] & /*searchValue*/
2036
+ 2) && se(
2037
2037
  l,
2038
2038
  "displayable",
2039
2039
  /*searchValue*/
2040
2040
  x[1] !== ""
2041
2041
  ), /*enableReverse*/
2042
2042
  x[5] === "button" ? L ? (L.p(x, W), W[0] & /*enableReverse*/
2043
- 32 && j(L, 1)) : (L = li(x), L.c(), j(L, 1), L.m(n, y)) : L && (nt(), V(L, 1, 1, () => {
2043
+ 32 && j(L, 1)) : (L = ci(x), L.c(), j(L, 1), L.m(n, y)) : L && (st(), V(L, 1, 1, () => {
2044
2044
  L = null;
2045
- }), rt()), O && O.p && (!E || W[1] & /*$$scope*/
2046
- 536870912) && hn(
2045
+ }), lt()), O && O.p && (!w || W[2] & /*$$scope*/
2046
+ 1) && yn(
2047
2047
  O,
2048
- C,
2048
+ k,
2049
2049
  x,
2050
2050
  /*$$scope*/
2051
- x[60],
2052
- E ? dn(
2053
- C,
2051
+ x[62],
2052
+ w ? vn(
2053
+ k,
2054
2054
  /*$$scope*/
2055
- x[60],
2055
+ x[62],
2056
2056
  W,
2057
2057
  null
2058
- ) : gn(
2058
+ ) : pn(
2059
2059
  /*$$scope*/
2060
- x[60]
2060
+ x[62]
2061
2061
  ),
2062
2062
  null
2063
2063
  );
2064
- let se = h;
2065
- h = X(x), h === se ? ~h && N[h].p(x, W) : (v && (nt(), V(N[se], 1, 1, () => {
2066
- N[se] = null;
2067
- }), rt()), ~h ? (v = N[h], v ? v.p(x, W) : (v = N[h] = G[h](x), v.c()), j(v, 1), v.m(t, null)) : v = null), (!E || W[0] & /*className*/
2068
- 4 && p !== (p = Zt(
2064
+ let le = h;
2065
+ h = X(x), h === le ? ~h && N[h].p(x, W) : (v && (st(), V(N[le], 1, 1, () => {
2066
+ N[le] = null;
2067
+ }), lt()), ~h ? (v = N[h], v ? v.p(x, W) : (v = N[h] = G[h](x), v.c()), j(v, 1), v.m(t, null)) : v = null), (!w || W[0] & /*className*/
2068
+ 4 && p !== (p = Yt(
2069
2069
  /*className*/
2070
2070
  x[2]
2071
- ) + " svelte-bz0zu3")) && b(t, "class", p), (!E || W[0] & /*className, collapsed, searchValue*/
2072
- 22) && re(
2071
+ ) + " svelte-bz0zu3")) && b(t, "class", p), (!w || W[0] & /*className, collapsed, searchValue*/
2072
+ 22) && se(
2073
2073
  t,
2074
2074
  "can-collapse",
2075
2075
  /*collapsed*/
@@ -2078,19 +2078,19 @@ function gr(i) {
2078
2078
  );
2079
2079
  },
2080
2080
  i(x) {
2081
- E || (j(k), j(s.$$.fragment, x), j(a.$$.fragment, x), j(_), j(L), j(O, x), j(v), E = !0);
2081
+ w || (j(C), j(o.$$.fragment, x), j(a.$$.fragment, x), j(E), j(L), j(O, x), j(v), w = !0);
2082
2082
  },
2083
2083
  o(x) {
2084
- V(k), V(s.$$.fragment, x), V(a.$$.fragment, x), V(_), V(L), V(O, x), V(v), E = !1;
2084
+ V(C), V(o.$$.fragment, x), V(a.$$.fragment, x), V(E), V(L), V(O, x), V(v), w = !1;
2085
2085
  },
2086
2086
  d(x) {
2087
- x && (B(e), B(t)), ge(s), i[63](null), ge(a), _ && _.d(), L && L.d(), O && O.d(x), ~h && N[h].d(), S = !1, me(M);
2087
+ x && (B(e), B(t)), me(o), i[65](null), me(a), E && E.d(), L && L.d(), O && O.d(x), ~h && N[h].d(), S = !1, ve(M);
2088
2088
  }
2089
2089
  };
2090
2090
  }
2091
- function mr(i, e, t) {
2092
- let n, r, { $$slots: s = {}, $$scope: u } = e;
2093
- const o = {
2091
+ function br(i, e, t) {
2092
+ let n, r, { $$slots: o = {}, $$scope: u } = e;
2093
+ const s = {
2094
2094
  continental_marine: 4,
2095
2095
  country: 4,
2096
2096
  major_landform: 8,
@@ -2114,224 +2114,236 @@ function mr(i, e, t) {
2114
2114
  "poi.restaurant": 18,
2115
2115
  "poi.aerodrome": 13
2116
2116
  };
2117
- let { class: c = void 0 } = e, { apiKey: l } = e, { bbox: d = void 0 } = e, { clearButtonTitle: a = "clear" } = e, { clearOnBlur: f = !1 } = e, { collapsed: g = !1 } = e, { country: y = void 0 } = e, { debounceSearch: w = 200 } = e, { enableReverse: h = "never" } = e, { errorMessage: v = "Something went wrong…" } = e, { filter: p = () => !0 } = e, { flyTo: E = !0 } = e, { fuzzyMatch: S = !0 } = e, { language: M = void 0 } = e, { limit: k = void 0 } = e, { mapController: _ = void 0 } = e, { minLength: L = 2 } = e, { noResultsMessage: C = "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: O = "Search" } = e, { proximity: G = [{ type: "server-geolocation" }] } = e, { reverseActive: N = h === "always" } = e, { reverseButtonTitle: X = "toggle reverse geocoding" } = e, { searchValue: x = "" } = e, { pickedResultStyle: W = "full-geometry" } = e, { showPlaceType: se = "if-needed" } = e, { showResultsWhileTyping: fe = !0 } = e, { selectFirst: Re = !0 } = e, { flyToSelected: at = !1 } = e, { markerOnSelected: Ve = !0 } = e, { types: ke = void 0 } = e, { exhaustiveReverseGeocoding: ct = !1 } = e, { excludeTypes: Ye = !1 } = e, { zoom: Ke = o } = e, { apiUrl: ft = "https://api.maptiler.com/geocoding" } = e, { fetchParameters: dt = {} } = e, { iconsBaseUrl: Bt = "https://cdn.maptiler.com/maptiler-geocoding-control/v2.0.0-rc.7/icons/" } = e, { adjustUrlQuery: ht = () => {
2117
+ let { class: c = void 0 } = e, { apiKey: l } = e, { bbox: d = void 0 } = e, { clearButtonTitle: a = "clear" } = e, { clearOnBlur: f = !1 } = e, { collapsed: g = !1 } = e, { country: y = void 0 } = e, { debounceSearch: _ = 200 } = e, { enableReverse: h = "never" } = e, { errorMessage: v = "Something went wrong…" } = e, { filter: p = () => !0 } = e, { flyTo: w = !0 } = e, { fuzzyMatch: S = !0 } = e, { language: M = void 0 } = e, { limit: C = void 0 } = e, { mapController: E = void 0 } = e, { minLength: L = 2 } = e, { noResultsMessage: k = "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: O = "Search" } = e, { proximity: G = [{ type: "server-geolocation" }] } = e, { reverseActive: N = h === "always" } = e, { reverseButtonTitle: X = "toggle reverse geocoding" } = e, { searchValue: x = "" } = e, { pickedResultStyle: W = "full-geometry" } = e, { showPlaceType: le = "if-needed" } = e, { showResultsWhileTyping: de = !0 } = e, { autocompleteTimeout: dt = void 0 } = e, { selectFirst: Pe = !0 } = e, { flyToSelected: ht = !1 } = e, { markerOnSelected: Ke = !0 } = e, { types: Ne = void 0 } = e, { exhaustiveReverseGeocoding: gt = !1 } = e, { excludeTypes: Xe = !1 } = e, { zoom: Je = s } = e, { apiUrl: mt = "https://api.maptiler.com/geocoding" } = e, { fetchParameters: vt = {} } = e, { iconsBaseUrl: Ft = "https://cdn.maptiler.com/maptiler-geocoding-control/v2.0.0-rc.8/icons/" } = e, { adjustUrlQuery: yt = () => {
2118
2118
  } } = e;
2119
- function Di() {
2120
- ue.focus();
2119
+ function Gi() {
2120
+ ce.focus();
2121
2121
  }
2122
- function Ui() {
2123
- ue.blur();
2122
+ function ji() {
2123
+ ce.blur();
2124
2124
  }
2125
- function Dt(m, F = !0, H = !1) {
2126
- t(1, x = m), F ? (t(15, D = -1), Ft()) : (yt(!H, H), setTimeout(() => {
2127
- ue.focus(), ue.select();
2125
+ function Gt(m, F = !0, Q = !1) {
2126
+ t(1, x = m), F ? (t(15, D = -1), qt()) : (wt(!Q, Q), setTimeout(() => {
2127
+ ce.focus(), ce.select();
2128
2128
  }));
2129
2129
  }
2130
- function Fi() {
2131
- t(14, I = void 0), t(56, R = void 0), t(15, D = -1);
2130
+ function qi() {
2131
+ t(14, I = void 0), t(57, T = void 0), t(15, D = -1);
2132
+ }
2133
+ function Qi() {
2134
+ t(56, q = []), t(57, T = void 0);
2132
2135
  }
2133
- function Gi() {
2134
- t(55, q = []), t(56, R = void 0);
2136
+ let Ie = !1, I, q, T, jt = "", ce, D = -1, fe, $e = [], Te, ye, ne, et, pt;
2137
+ const Zi = /* @__PURE__ */ new Set(), pe = Sn();
2138
+ function Hi() {
2139
+ return !!ne;
2135
2140
  }
2136
- let Te = !1, I, q, R, Ut = "", ue, D = -1, ae, Xe = [], Ce, Pe, Je, gt;
2137
- const ji = /* @__PURE__ */ new Set(), ve = En();
2138
- bn(() => {
2139
- _ && (_.setEventHandler(void 0), _.indicateReverse(!1), _.setSelectedMarker(-1), _.setMarkers(void 0, void 0, !1));
2141
+ Ln(() => {
2142
+ E && (E.setEventHandler(void 0), E.indicateReverse(!1), E.setSelectedMarker(-1), E.setFeatures(void 0, void 0, !1));
2140
2143
  });
2141
- function Ft(m) {
2142
- if (Pe && (clearTimeout(Pe), Pe = void 0), D > -1 && I)
2143
- t(56, R = I[D]), t(1, x = R.place_type[0] === "reverse" ? R.place_name : R.place_name.replace(/,.*/, "")), t(18, ae = void 0), t(55, q = void 0), t(15, D = -1);
2144
+ function qt(m) {
2145
+ if (ye && (window.clearTimeout(ye), ye = void 0), ne) {
2146
+ window.clearTimeout(ne), t(58, ne = void 0), Be(x, { exact: !0 });
2147
+ return;
2148
+ }
2149
+ if (D > -1 && I)
2150
+ t(57, T = I[D]), t(1, x = T.place_type[0] === "reverse" ? T.place_name : T.place_name.replace(/,.*/, "")), t(18, fe = void 0), t(56, q = void 0), t(15, D = -1);
2144
2151
  else if (x) {
2145
- const F = m || !mt(x);
2146
- vt(x, { exact: !0 }).then(() => {
2147
- t(55, q = I), t(56, R = void 0), F && qi();
2148
- }).catch((H) => t(18, ae = H));
2152
+ const F = m || !bt(x);
2153
+ Be(x, { exact: !0 }).then(() => {
2154
+ t(56, q = I), t(57, T = void 0), F && Vi();
2155
+ }).catch((Q) => t(18, fe = Q));
2149
2156
  }
2150
2157
  }
2151
- function mt(m) {
2158
+ function bt(m) {
2152
2159
  try {
2153
- return ar(m, 6);
2160
+ return hr(m, 6);
2154
2161
  } catch {
2155
2162
  return !1;
2156
2163
  }
2157
2164
  }
2158
- async function vt(m, { byId: F = !1, exact: H = !1 } = {}) {
2159
- t(18, ae = void 0), Ce == null || Ce.abort();
2165
+ async function Be(m, { byId: F = !1, exact: Q = !1, appendSpace: re = !1 } = {}) {
2166
+ t(18, fe = void 0), Te == null || Te.abort();
2160
2167
  const te = new AbortController();
2161
- t(19, Ce = te);
2168
+ t(19, Te = te);
2162
2169
  try {
2163
- const T = mt(m), Q = new URLSearchParams();
2164
- if (M !== void 0 && Q.set("language", Array.isArray(M) ? M.join(",") : M ?? ""), ke && Q.set("types", ke.join(",")), Ye && Q.set("excludeTypes", String(Ye)), d && Q.set("bbox", d.map(($e) => $e.toFixed(6)).join(",")), y && Q.set("country", Array.isArray(y) ? y.join(",") : y), !F && !T) {
2165
- const $e = await Jn(_, G, te);
2166
- $e && Q.set("proximity", $e), (H || !fe) && Q.set("autocomplete", "false"), Q.set("fuzzyMatch", String(S));
2170
+ const R = bt(m), H = new URLSearchParams();
2171
+ if (M !== void 0 && H.set("language", Array.isArray(M) ? M.join(",") : M ?? ""), Ne && H.set("types", Ne.join(",")), Xe && H.set("excludeTypes", String(Xe)), d && H.set("bbox", d.map((it) => it.toFixed(6)).join(",")), y && H.set("country", Array.isArray(y) ? y.join(",") : y), !F && !R) {
2172
+ const it = await ir(E, G, te);
2173
+ it && H.set("proximity", it), (Q || !de) && H.set("autocomplete", "false"), H.set("fuzzyMatch", String(S));
2167
2174
  }
2168
- k !== void 0 && (ct || !T || (ke == null ? void 0 : ke.length) === 1) && Q.set("limit", String(k)), Q.set("key", l), ht(Q);
2169
- const ce = ft + "/" + encodeURIComponent(T ? T.decimalLongitude + "," + T.decimalLatitude : m) + ".json?" + Q.toString();
2170
- if (ce === Ut) {
2171
- F ? (t(14, I = void 0), t(56, R = Xe[0])) : t(14, I = Xe);
2175
+ C !== void 0 && (gt || !R || (Ne == null ? void 0 : Ne.length) === 1) && H.set("limit", String(C)), H.set("key", l), yt(H);
2176
+ const tt = mt + "/" + encodeURIComponent(R ? R.decimalLongitude + "," + R.decimalLatitude : m + (re ? " " : "")) + ".json?" + H.toString();
2177
+ if (tt === jt) {
2178
+ F ? (t(14, I = void 0), t(57, T = $e[0])) : t(14, I = $e);
2172
2179
  return;
2173
2180
  }
2174
- Ut = ce;
2175
- const bt = await fetch(ce, { signal: te.signal, ...dt });
2176
- if (!bt.ok)
2177
- throw new Error(await bt.text());
2178
- const Et = await bt.json();
2179
- ve("response", { url: ce, featureCollection: Et }), F ? (t(14, I = void 0), t(56, R = Et.features[0]), Xe = [R]) : (t(14, I = Et.features.filter(p)), T && I.unshift({
2181
+ jt = tt;
2182
+ const _t = await fetch(tt, { signal: te.signal, ...vt });
2183
+ if (!_t.ok)
2184
+ throw new Error(await _t.text());
2185
+ const Lt = await _t.json();
2186
+ pe("response", { url: tt, featureCollection: Lt }), F ? (t(14, I = void 0), t(57, T = Lt.features[0]), $e = [T]) : (t(14, I = Lt.features.filter(p)), R && I.unshift({
2180
2187
  type: "Feature",
2181
2188
  properties: {},
2182
- id: "reverse_" + T.decimalLongitude + "_" + T.decimalLatitude,
2183
- text: T.decimalLatitude + ", " + T.decimalLongitude,
2184
- place_name: T.decimalLatitude + ", " + T.decimalLongitude,
2189
+ id: "reverse_" + R.decimalLongitude + "_" + R.decimalLatitude,
2190
+ text: R.decimalLatitude + ", " + R.decimalLongitude,
2191
+ place_name: R.decimalLatitude + ", " + R.decimalLongitude,
2185
2192
  place_type: ["reverse"],
2186
- center: [T.decimalLongitude, T.decimalLatitude],
2193
+ center: [R.decimalLongitude, R.decimalLatitude],
2187
2194
  bbox: [
2188
- T.decimalLongitude,
2189
- T.decimalLatitude,
2190
- T.decimalLongitude,
2191
- T.decimalLatitude
2195
+ R.decimalLongitude,
2196
+ R.decimalLatitude,
2197
+ R.decimalLongitude,
2198
+ R.decimalLatitude
2192
2199
  ],
2193
2200
  geometry: {
2194
2201
  type: "Point",
2195
- coordinates: [T.decimalLongitude, T.decimalLatitude]
2202
+ coordinates: [R.decimalLongitude, R.decimalLatitude]
2196
2203
  }
2197
- }), Xe = I, T && ue.focus());
2198
- } catch (T) {
2199
- if (T && typeof T == "object" && "name" in T && T.name === "AbortError")
2204
+ }), $e = I, R && ce.focus());
2205
+ } catch (R) {
2206
+ if (R && typeof R == "object" && "name" in R && R.name === "AbortError")
2200
2207
  return;
2201
- throw T;
2208
+ throw R;
2202
2209
  } finally {
2203
- te === Ce && t(19, Ce = void 0);
2210
+ te === Te && t(19, Te = void 0);
2204
2211
  }
2205
2212
  }
2206
- function qi() {
2207
- var te;
2208
- if (!(q != null && q.length) || !E)
2213
+ function Vi() {
2214
+ var re;
2215
+ if (!(q != null && q.length) || !w)
2209
2216
  return;
2210
- const m = [180, 90, -180, -90], F = !q.some((T) => !T.matching_text);
2211
- let H;
2212
- for (const T of q) {
2213
- const Q = ze(T);
2214
- if (H = H === void 0 ? Q : Q === void 0 ? H : Math.max(H, Q), F || !T.matching_text)
2215
- for (const ce of [0, 1, 2, 3])
2216
- m[ce] = Math[ce < 2 ? "min" : "max"](m[ce], ((te = T.bbox) == null ? void 0 : te[ce]) ?? T.center[ce % 2]);
2217
+ const m = [180, 90, -180, -90], F = !q.some((te) => !te.matching_text);
2218
+ let Q;
2219
+ for (const te of q) {
2220
+ const R = De(te);
2221
+ if (Q = Q === void 0 ? R : R === void 0 ? Q : Math.max(Q, R), F || !te.matching_text)
2222
+ for (const H of [0, 1, 2, 3])
2223
+ m[H] = Math[H < 2 ? "min" : "max"](m[H], ((re = te.bbox) == null ? void 0 : re[H]) ?? te.center[H % 2]);
2217
2224
  }
2218
- _ && q.length > 0 && (R && m[0] === m[2] && m[1] === m[3] ? _.flyTo(R.center, ze(R)) : _.fitBounds(ot(m), 50, H));
2225
+ E && q.length > 0 && (T && m[0] === m[2] && m[1] === m[3] ? E.flyTo(T.center, De(T)) : E.fitBounds(at(m), 50, Q));
2219
2226
  }
2220
- function ze(m) {
2221
- var H;
2227
+ function De(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
2231
  const F = m.id.replace(/\..*/, "");
2225
- return (Array.isArray((H = m.properties) == null ? void 0 : H.categories) ? m.properties.categories.reduce(
2226
- (te, T) => {
2227
- const Q = Ke[F + "." + T];
2228
- return te === void 0 ? Q : Q === void 0 ? te : Math.max(te, Q);
2232
+ return (Array.isArray((Q = m.properties) == null ? void 0 : Q.categories) ? m.properties.categories.reduce(
2233
+ (re, te) => {
2234
+ const R = Je[F + "." + te];
2235
+ return re === void 0 ? R : R === void 0 ? re : Math.max(re, R);
2229
2236
  },
2230
2237
  void 0
2231
- ) : void 0) ?? Ke[F];
2238
+ ) : void 0) ?? Je[F];
2232
2239
  }
2233
- function Qi(m) {
2234
- t(0, N = h === "always"), t(14, I = void 0), t(56, R = void 0), t(15, D = -1), Dt(m[1].toFixed(6) + ", " + Xn(m[0], [-180, 180], !0).toFixed(6), !1, !0);
2240
+ function Yi(m) {
2241
+ t(0, N = h === "always"), t(14, I = void 0), t(57, T = void 0), t(15, D = -1), Gt(m[1].toFixed(6) + ", " + tr(m[0], [-180, 180], !0).toFixed(6), !1, !0);
2235
2242
  }
2236
- function Zi(m) {
2243
+ function Ki(m) {
2237
2244
  if (!I)
2238
2245
  return;
2239
2246
  let F = m.key === "ArrowDown" ? 1 : m.key === "ArrowUp" ? -1 : 0;
2240
- F && (D === (Re ? 0 : -1) && F === -1 && t(15, D = I.length), t(15, D += F), D >= I.length && t(15, D = -1), D < 0 && Re && t(15, D = 0), m.preventDefault());
2247
+ F && (D === (Pe ? 0 : -1) && F === -1 && t(15, D = I.length), t(15, D += F), D >= I.length && t(15, D = -1), D < 0 && Pe && t(15, D = 0), m.preventDefault());
2241
2248
  }
2242
- function yt(m = !0, F = !1) {
2243
- if (t(18, ae = void 0), fe || F) {
2244
- if (Pe && clearTimeout(Pe), x.length < L)
2245
- return;
2246
- const H = x;
2247
- Pe = window.setTimeout(
2248
- () => {
2249
- vt(H).catch((te) => t(18, ae = te));
2250
- },
2251
- m ? w : 0
2252
- );
2253
- } else
2254
- t(14, I = void 0), t(18, ae = void 0);
2249
+ function wt(m = !0, F = !1) {
2250
+ if (t(18, fe = void 0), ye && (window.clearTimeout(ye), ye = void 0), ne && (window.clearTimeout(ne), t(58, ne = void 0)), !de && !F || x.length < L) {
2251
+ t(14, I = void 0);
2252
+ return;
2253
+ }
2254
+ const Q = x;
2255
+ ye = window.setTimeout(
2256
+ () => {
2257
+ ye = void 0, Be(Q).catch((re) => t(18, fe = re));
2258
+ },
2259
+ m ? _ : 0
2260
+ ), x.endsWith(" ") || t(58, ne = window.setTimeout(
2261
+ () => {
2262
+ t(58, ne = void 0), Be(Q, { appendSpace: !0 }).catch((re) => t(18, fe = re));
2263
+ },
2264
+ dt
2265
+ ));
2255
2266
  }
2256
- function pt(m) {
2257
- t(56, R = m), t(1, x = m.place_name), t(15, D = -1);
2267
+ function Et(m) {
2268
+ t(57, T = m), t(1, x = m.place_name), t(15, D = -1);
2258
2269
  }
2259
- const Hi = () => ue.focus();
2260
- function Vi(m) {
2261
- Mt[m ? "unshift" : "push"](() => {
2262
- ue = m, t(17, ue);
2270
+ const Xi = () => ce.focus();
2271
+ function Ji(m) {
2272
+ Nt[m ? "unshift" : "push"](() => {
2273
+ ce = m, t(17, ce);
2263
2274
  });
2264
2275
  }
2265
- function Yi() {
2266
- x = this.value, t(1, x), t(13, Te), t(28, f);
2276
+ function $i() {
2277
+ x = this.value, t(1, x), t(13, Ie), t(28, f);
2267
2278
  }
2268
- const Ki = () => t(13, Te = !0), Xi = () => t(13, Te = !1), Ji = () => yt(), $i = () => {
2269
- t(1, x = ""), ue.focus();
2270
- }, en = () => t(0, N = !N), tn = () => t(18, ae = void 0), nn = (m) => t(15, D = m), rn = (m) => pt(m), sn = () => {
2271
- Re || t(15, D = -1);
2272
- }, on = () => {
2279
+ const en = () => t(13, Ie = !0), tn = () => t(13, Ie = !1), nn = () => wt(), rn = () => {
2280
+ t(1, x = ""), ce.focus();
2281
+ }, on = () => t(0, N = !N), sn = () => t(18, fe = void 0), ln = (m) => t(15, D = m), un = (m) => Et(m), an = () => {
2282
+ Pe || t(15, D = -1);
2283
+ }, cn = () => {
2273
2284
  };
2274
2285
  return i.$$set = (m) => {
2275
- "class" in m && t(2, c = m.class), "apiKey" in m && t(26, l = m.apiKey), "bbox" in m && t(27, d = m.bbox), "clearButtonTitle" in m && t(3, a = m.clearButtonTitle), "clearOnBlur" in m && t(28, f = m.clearOnBlur), "collapsed" in m && t(4, g = m.collapsed), "country" in m && t(29, y = m.country), "debounceSearch" in m && t(30, w = m.debounceSearch), "enableReverse" in m && t(5, h = m.enableReverse), "errorMessage" in m && t(6, v = m.errorMessage), "filter" in m && t(31, p = m.filter), "flyTo" in m && t(32, E = m.flyTo), "fuzzyMatch" in m && t(33, S = m.fuzzyMatch), "language" in m && t(34, M = m.language), "limit" in m && t(35, k = m.limit), "mapController" in m && t(36, _ = m.mapController), "minLength" in m && t(37, L = m.minLength), "noResultsMessage" in m && t(7, C = m.noResultsMessage), "placeholder" in m && t(8, O = m.placeholder), "proximity" in m && t(38, G = m.proximity), "reverseActive" in m && t(0, N = m.reverseActive), "reverseButtonTitle" in m && t(9, X = m.reverseButtonTitle), "searchValue" in m && t(1, x = m.searchValue), "pickedResultStyle" in m && t(39, W = m.pickedResultStyle), "showPlaceType" in m && t(10, se = m.showPlaceType), "showResultsWhileTyping" in m && t(40, fe = m.showResultsWhileTyping), "selectFirst" in m && t(11, Re = m.selectFirst), "flyToSelected" in m && t(41, at = m.flyToSelected), "markerOnSelected" in m && t(42, Ve = m.markerOnSelected), "types" in m && t(43, ke = m.types), "exhaustiveReverseGeocoding" in m && t(44, ct = m.exhaustiveReverseGeocoding), "excludeTypes" in m && t(45, Ye = m.excludeTypes), "zoom" in m && t(46, Ke = m.zoom), "apiUrl" in m && t(47, ft = m.apiUrl), "fetchParameters" in m && t(48, dt = m.fetchParameters), "iconsBaseUrl" in m && t(12, Bt = m.iconsBaseUrl), "adjustUrlQuery" in m && t(49, ht = m.adjustUrlQuery), "$$scope" in m && t(60, u = m.$$scope);
2286
+ "class" in m && t(2, c = m.class), "apiKey" in m && t(26, l = m.apiKey), "bbox" in m && t(27, d = m.bbox), "clearButtonTitle" in m && t(3, a = m.clearButtonTitle), "clearOnBlur" in m && t(28, f = m.clearOnBlur), "collapsed" in m && t(4, g = m.collapsed), "country" in m && t(29, y = m.country), "debounceSearch" in m && t(30, _ = m.debounceSearch), "enableReverse" in m && t(5, h = m.enableReverse), "errorMessage" in m && t(6, v = m.errorMessage), "filter" in m && t(31, p = m.filter), "flyTo" in m && t(32, w = m.flyTo), "fuzzyMatch" in m && t(33, S = m.fuzzyMatch), "language" in m && t(34, M = m.language), "limit" in m && t(35, C = m.limit), "mapController" in m && t(36, E = m.mapController), "minLength" in m && t(37, L = m.minLength), "noResultsMessage" in m && t(7, k = m.noResultsMessage), "placeholder" in m && t(8, O = m.placeholder), "proximity" in m && t(38, G = m.proximity), "reverseActive" in m && t(0, N = m.reverseActive), "reverseButtonTitle" in m && t(9, X = m.reverseButtonTitle), "searchValue" in m && t(1, x = m.searchValue), "pickedResultStyle" in m && t(39, W = m.pickedResultStyle), "showPlaceType" in m && t(10, le = m.showPlaceType), "showResultsWhileTyping" in m && t(40, de = m.showResultsWhileTyping), "autocompleteTimeout" in m && t(41, dt = m.autocompleteTimeout), "selectFirst" in m && t(11, Pe = m.selectFirst), "flyToSelected" in m && t(42, ht = m.flyToSelected), "markerOnSelected" in m && t(43, Ke = m.markerOnSelected), "types" in m && t(44, Ne = m.types), "exhaustiveReverseGeocoding" in m && t(45, gt = m.exhaustiveReverseGeocoding), "excludeTypes" in m && t(46, Xe = m.excludeTypes), "zoom" in m && t(47, Je = m.zoom), "apiUrl" in m && t(48, mt = m.apiUrl), "fetchParameters" in m && t(49, vt = m.fetchParameters), "iconsBaseUrl" in m && t(12, Ft = m.iconsBaseUrl), "adjustUrlQuery" in m && t(50, yt = m.adjustUrlQuery), "$$scope" in m && t(62, u = m.$$scope);
2276
2287
  }, i.$$.update = () => {
2277
2288
  if (i.$$.dirty[0] & /*enableReverse*/
2278
2289
  32 && t(0, N = h === "always"), i.$$.dirty[0] & /*focused, clearOnBlur*/
2279
2290
  268443648 && setTimeout(() => {
2280
- t(16, Je = Te), f && !Te && t(1, x = "");
2291
+ t(16, et = Ie), f && !Ie && t(1, x = "");
2281
2292
  }), i.$$.dirty[0] & /*searchValue, listFeatures*/
2282
2293
  16386 | i.$$.dirty[1] & /*minLength*/
2283
- 64 && x.length < L && (t(56, R = void 0), t(14, I = void 0), t(18, ae = void 0), t(55, q = I)), i.$$.dirty[1] & /*pickedResultStyle, picked*/
2284
- 33554688 && W !== "marker-only" && R && !R.address && R.geometry.type === "Point" && R.place_type[0] !== "reverse" && vt(R.id, { byId: !0 }).catch((m) => t(18, ae = m)), i.$$.dirty[1] & /*mapController, picked, prevIdToFly, flyTo*/
2285
- 100663330 && (_ && R && R.id !== gt && E && (!R.bbox || R.bbox[0] === R.bbox[2] && R.bbox[1] === R.bbox[3] ? _.flyTo(R.center, ze(R)) : _.fitBounds(ot(R.bbox), 50, ze(R)), t(14, I = void 0), t(55, q = void 0), t(15, D = -1)), t(57, gt = R == null ? void 0 : R.id)), i.$$.dirty[0] & /*selectFirst, listFeatures*/
2286
- 18432 && Re && I != null && I.length && t(15, D = 0), i.$$.dirty[0] & /*searchValue*/
2294
+ 64 && x.length < L && (t(57, T = void 0), t(14, I = void 0), t(18, fe = void 0), t(56, q = I)), i.$$.dirty[1] & /*pickedResultStyle, picked*/
2295
+ 67109120 && W !== "marker-only" && T && !T.address && T.geometry.type === "Point" && T.place_type[0] !== "reverse" && Be(T.id, { byId: !0 }).catch((m) => t(18, fe = m)), i.$$.dirty[1] & /*mapController, picked, prevIdToFly, flyTo*/
2296
+ 335544354 && (E && T && T.id !== pt && w && (!T.bbox || T.bbox[0] === T.bbox[2] && T.bbox[1] === T.bbox[3] ? E.flyTo(T.center, De(T)) : E.fitBounds(at(T.bbox), 50, De(T)), t(14, I = void 0), t(56, q = void 0), t(15, D = -1)), t(59, pt = T == null ? void 0 : T.id)), i.$$.dirty[0] & /*selectFirst, listFeatures*/
2297
+ 18432 && Pe && I != null && I.length && (Hi() || t(15, D = 0)), i.$$.dirty[0] & /*searchValue*/
2287
2298
  2 && t(15, D = -1), i.$$.dirty[0] & /*listFeatures*/
2288
2299
  16384 | i.$$.dirty[1] & /*markedFeatures*/
2289
- 16777216 && q !== I && t(55, q = void 0), i.$$.dirty[0] & /*reverseActive, listFeatures, focusedDelayed*/
2300
+ 33554432 && q !== I && t(56, q = void 0), i.$$.dirty[0] & /*reverseActive, listFeatures, focusedDelayed*/
2290
2301
  81921 | i.$$.dirty[1] & /*mapController, markedFeatures*/
2291
- 16777248 && _ && _.setEventHandler((m) => {
2302
+ 33554464 && E && E.setEventHandler((m) => {
2292
2303
  switch (m.type) {
2293
2304
  case "mapClick":
2294
- N && Qi(m.coordinates);
2305
+ N && Yi(m.coordinates);
2295
2306
  break;
2296
2307
  case "markerClick":
2297
2308
  {
2298
- const F = I == null ? void 0 : I.find((H) => H.id === m.id);
2299
- F && pt(F);
2309
+ const F = I == null ? void 0 : I.find((Q) => Q.id === m.id);
2310
+ F && Et(F);
2300
2311
  }
2301
2312
  break;
2302
2313
  case "markerMouseEnter":
2303
- q && t(15, D = Je ? (I == null ? void 0 : I.findIndex((F) => F.id === m.id)) ?? -1 : -1);
2314
+ q && t(15, D = et ? (I == null ? void 0 : I.findIndex((F) => F.id === m.id)) ?? -1 : -1);
2304
2315
  break;
2305
2316
  case "markerMouseLeave":
2306
2317
  q && t(15, D = -1);
2307
2318
  break;
2308
2319
  }
2309
2320
  }), i.$$.dirty[0] & /*listFeatures, selectedItemIndex*/
2310
- 49152 && t(58, r = I == null ? void 0 : I[D]), i.$$.dirty[1] & /*mapController, selected, flyTo, flyToSelected*/
2311
- 134218786 && _ && r && E && at && _.flyTo(r.center, ze(r)), i.$$.dirty[1] & /*pickedResultStyle*/
2312
- 256 && t(59, n = W === "full-geometry-including-polygon-center-marker"), i.$$.dirty[1] & /*markerOnSelected, mapController, showPolygonMarker*/
2313
- 268437536 && (Ve || _ == null || _.setMarkers(void 0, void 0, n)), i.$$.dirty[1] & /*mapController, markerOnSelected, markedFeatures, selected, showPolygonMarker*/
2314
- 419432480 && _ && Ve && !q && (_.setMarkers(r ? [r] : void 0, void 0, n), _.setSelectedMarker(r ? 0 : -1)), i.$$.dirty[1] & /*mapController, markedFeatures, picked, showPolygonMarker*/
2315
- 318767136 && _ && _.setMarkers(q, R, n), i.$$.dirty[0] & /*selectedItemIndex*/
2321
+ 49152 && t(60, r = I == null ? void 0 : I[D]), i.$$.dirty[1] & /*mapController, selected, flyTo, flyToSelected*/
2322
+ 536872994 && E && r && w && ht && E.flyTo(r.center, De(r)), i.$$.dirty[1] & /*pickedResultStyle*/
2323
+ 256 && t(61, n = W === "full-geometry-including-polygon-center-marker"), i.$$.dirty[1] & /*markerOnSelected, mapController, showPolygonMarker*/
2324
+ 1073745952 && (Ke || E == null || E.setFeatures(void 0, void 0, n)), i.$$.dirty[1] & /*mapController, markerOnSelected, markedFeatures, selected, showPolygonMarker*/
2325
+ 1644171296 && E && Ke && !q && (E.setFeatures(r ? [r] : void 0, void 0, n), E.setSelectedMarker(r ? 0 : -1)), i.$$.dirty[1] & /*mapController, markedFeatures, picked, showPolygonMarker*/
2326
+ 1174405152 && E && E.setFeatures(q, T, n), i.$$.dirty[0] & /*selectedItemIndex*/
2316
2327
  32768 | i.$$.dirty[1] & /*markedFeatures, mapController*/
2317
- 16777248 && q && _ && _.setSelectedMarker(D), i.$$.dirty[0] & /*searchValue*/
2328
+ 33554464 && q && E && E.setSelectedMarker(D), i.$$.dirty[1] & /*selected, autocompleteTimeoutRef*/
2329
+ 671088640 && r && (window.clearTimeout(ne), t(58, ne = void 0)), i.$$.dirty[0] & /*searchValue*/
2318
2330
  2 | i.$$.dirty[1] & /*mapController*/
2319
- 32 && _) {
2320
- const m = mt(x);
2321
- _.setReverseMarker(m ? [m.decimalLongitude, m.decimalLatitude] : void 0);
2331
+ 32 && E) {
2332
+ const m = bt(x);
2333
+ E.setReverseMarker(m ? [m.decimalLongitude, m.decimalLatitude] : void 0);
2322
2334
  }
2323
2335
  i.$$.dirty[1] & /*selected*/
2324
- 134217728 && ve("select", { feature: r }), i.$$.dirty[1] & /*picked*/
2325
- 33554432 && ve("pick", { feature: R }), i.$$.dirty[0] & /*focusedDelayed, listFeatures*/
2326
- 81920 && ve("optionsvisibilitychange", {
2327
- optionsVisible: Je && !!I
2336
+ 536870912 && pe("select", { feature: r }), i.$$.dirty[1] & /*picked*/
2337
+ 67108864 && pe("pick", { feature: T }), i.$$.dirty[0] & /*focusedDelayed, listFeatures*/
2338
+ 81920 && pe("optionsvisibilitychange", {
2339
+ optionsVisible: et && !!I
2328
2340
  }), i.$$.dirty[0] & /*listFeatures*/
2329
- 16384 && ve("featureslisted", { features: I }), i.$$.dirty[1] & /*markedFeatures*/
2330
- 16777216 && ve("featuresmarked", { features: q }), i.$$.dirty[0] & /*reverseActive*/
2331
- 1 && ve("reversetoggle", { reverse: N }), i.$$.dirty[0] & /*searchValue*/
2332
- 2 && ve("querychange", { query: x }), i.$$.dirty[0] & /*reverseActive*/
2341
+ 16384 && pe("featureslisted", { features: I }), i.$$.dirty[1] & /*markedFeatures*/
2342
+ 33554432 && pe("featuresmarked", { features: q }), i.$$.dirty[0] & /*reverseActive*/
2343
+ 1 && pe("reversetoggle", { reverse: N }), i.$$.dirty[0] & /*searchValue*/
2344
+ 2 && pe("querychange", { query: x }), i.$$.dirty[0] & /*reverseActive*/
2333
2345
  1 | i.$$.dirty[1] & /*mapController*/
2334
- 32 && _ && _.indicateReverse(N);
2346
+ 32 && E && E.indicateReverse(N);
2335
2347
  }, [
2336
2348
  N,
2337
2349
  x,
@@ -2340,65 +2352,63 @@ function mr(i, e, t) {
2340
2352
  g,
2341
2353
  h,
2342
2354
  v,
2343
- C,
2355
+ k,
2344
2356
  O,
2345
2357
  X,
2346
- se,
2347
- Re,
2348
- Bt,
2349
- Te,
2358
+ le,
2359
+ Pe,
2360
+ Ft,
2361
+ Ie,
2350
2362
  I,
2351
2363
  D,
2352
- Je,
2353
- ue,
2354
- ae,
2355
- Ce,
2356
- ji,
2357
- Ft,
2364
+ et,
2365
+ ce,
2366
+ fe,
2367
+ Te,
2358
2368
  Zi,
2359
- yt,
2360
- pt,
2361
- o,
2369
+ qt,
2370
+ Ki,
2371
+ wt,
2372
+ Et,
2373
+ s,
2362
2374
  l,
2363
2375
  d,
2364
2376
  f,
2365
2377
  y,
2366
- w,
2378
+ _,
2367
2379
  p,
2368
- E,
2380
+ w,
2369
2381
  S,
2370
2382
  M,
2371
- k,
2372
- _,
2383
+ C,
2384
+ E,
2373
2385
  L,
2374
2386
  G,
2375
2387
  W,
2376
- fe,
2377
- at,
2378
- Ve,
2379
- ke,
2380
- ct,
2381
- Ye,
2382
- Ke,
2383
- ft,
2388
+ de,
2384
2389
  dt,
2385
2390
  ht,
2386
- Di,
2387
- Ui,
2388
- Dt,
2389
- Fi,
2391
+ Ke,
2392
+ Ne,
2393
+ gt,
2394
+ Xe,
2395
+ Je,
2396
+ mt,
2397
+ vt,
2398
+ yt,
2390
2399
  Gi,
2400
+ ji,
2401
+ Gt,
2402
+ qi,
2403
+ Qi,
2391
2404
  q,
2392
- R,
2393
- gt,
2405
+ T,
2406
+ ne,
2407
+ pt,
2394
2408
  r,
2395
2409
  n,
2396
2410
  u,
2397
- s,
2398
- Hi,
2399
- Vi,
2400
- Yi,
2401
- Ki,
2411
+ o,
2402
2412
  Xi,
2403
2413
  Ji,
2404
2414
  $i,
@@ -2406,18 +2416,22 @@ function mr(i, e, t) {
2406
2416
  tn,
2407
2417
  nn,
2408
2418
  rn,
2419
+ on,
2409
2420
  sn,
2410
- on
2421
+ ln,
2422
+ un,
2423
+ an,
2424
+ cn
2411
2425
  ];
2412
2426
  }
2413
- let vr = class extends xe {
2427
+ let wr = class extends Ce {
2414
2428
  constructor(e) {
2415
- super(), Se(
2429
+ super(), Me(
2416
2430
  this,
2417
2431
  e,
2418
- mr,
2419
- gr,
2420
- Le,
2432
+ br,
2433
+ pr,
2434
+ xe,
2421
2435
  {
2422
2436
  ZOOM_DEFAULTS: 25,
2423
2437
  class: 2,
@@ -2446,22 +2460,23 @@ let vr = class extends xe {
2446
2460
  pickedResultStyle: 39,
2447
2461
  showPlaceType: 10,
2448
2462
  showResultsWhileTyping: 40,
2463
+ autocompleteTimeout: 41,
2449
2464
  selectFirst: 11,
2450
- flyToSelected: 41,
2451
- markerOnSelected: 42,
2452
- types: 43,
2453
- exhaustiveReverseGeocoding: 44,
2454
- excludeTypes: 45,
2455
- zoom: 46,
2456
- apiUrl: 47,
2457
- fetchParameters: 48,
2465
+ flyToSelected: 42,
2466
+ markerOnSelected: 43,
2467
+ types: 44,
2468
+ exhaustiveReverseGeocoding: 45,
2469
+ excludeTypes: 46,
2470
+ zoom: 47,
2471
+ apiUrl: 48,
2472
+ fetchParameters: 49,
2458
2473
  iconsBaseUrl: 12,
2459
- adjustUrlQuery: 49,
2460
- focus: 50,
2461
- blur: 51,
2462
- setQuery: 52,
2463
- clearList: 53,
2464
- clearMap: 54
2474
+ adjustUrlQuery: 50,
2475
+ focus: 51,
2476
+ blur: 52,
2477
+ setQuery: 53,
2478
+ clearList: 54,
2479
+ clearMap: 55
2465
2480
  },
2466
2481
  null,
2467
2482
  [-1, -1, -1]
@@ -2471,26 +2486,26 @@ let vr = class extends xe {
2471
2486
  return this.$$.ctx[25];
2472
2487
  }
2473
2488
  get focus() {
2474
- return this.$$.ctx[50];
2489
+ return this.$$.ctx[51];
2475
2490
  }
2476
2491
  get blur() {
2477
- return this.$$.ctx[51];
2492
+ return this.$$.ctx[52];
2478
2493
  }
2479
2494
  get setQuery() {
2480
- return this.$$.ctx[52];
2495
+ return this.$$.ctx[53];
2481
2496
  }
2482
2497
  get clearList() {
2483
- return this.$$.ctx[53];
2498
+ return this.$$.ctx[54];
2484
2499
  }
2485
2500
  get clearMap() {
2486
- return this.$$.ctx[54];
2501
+ return this.$$.ctx[55];
2487
2502
  }
2488
2503
  };
2489
- function qe(i, e, t = {}) {
2504
+ function Ze(i, e, t = {}) {
2490
2505
  const n = { type: "Feature" };
2491
2506
  return (t.id === 0 || t.id) && (n.id = t.id), t.bbox && (n.bbox = t.bbox), n.properties = e || {}, n.geometry = i, n;
2492
2507
  }
2493
- function At(i, e, t = {}) {
2508
+ function Bt(i, e, t = {}) {
2494
2509
  for (const r of i) {
2495
2510
  if (r.length < 4)
2496
2511
  throw new Error(
@@ -2498,21 +2513,21 @@ function At(i, e, t = {}) {
2498
2513
  );
2499
2514
  if (r[r.length - 1].length !== r[0].length)
2500
2515
  throw new Error("First and last Position are not equivalent.");
2501
- for (let s = 0; s < r[r.length - 1].length; s++)
2502
- if (r[r.length - 1][s] !== r[0][s])
2516
+ for (let o = 0; o < r[r.length - 1].length; o++)
2517
+ if (r[r.length - 1][o] !== r[0][o])
2503
2518
  throw new Error("First and last Position are not equivalent.");
2504
2519
  }
2505
- return qe({
2520
+ return Ze({
2506
2521
  type: "Polygon",
2507
2522
  coordinates: i
2508
2523
  }, e, t);
2509
2524
  }
2510
- function Qe(i, e = {}) {
2525
+ function He(i, e = {}) {
2511
2526
  const t = { type: "FeatureCollection" };
2512
2527
  return e.id && (t.id = e.id), e.bbox && (t.bbox = e.bbox), t.features = i, t;
2513
2528
  }
2514
- function Oi(i, e, t = {}) {
2515
- return qe({
2529
+ function zi(i, e, t = {}) {
2530
+ return Ze({
2516
2531
  type: "MultiPolygon",
2517
2532
  coordinates: i
2518
2533
  }, e, t);
@@ -2539,15 +2554,15 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
2539
2554
  See the Apache Version 2.0 License for specific language governing permissions
2540
2555
  and limitations under the License.
2541
2556
  ***************************************************************************** */
2542
- function yr(i, e) {
2557
+ function Er(i, e) {
2543
2558
  var t = { label: 0, sent: function() {
2544
- if (s[0] & 1) throw s[1];
2545
- return s[1];
2546
- }, trys: [], ops: [] }, n, r, s, u;
2547
- return u = { next: o(0), throw: o(1), return: o(2) }, typeof Symbol == "function" && (u[Symbol.iterator] = function() {
2559
+ if (o[0] & 1) throw o[1];
2560
+ return o[1];
2561
+ }, trys: [], ops: [] }, n, r, o, u;
2562
+ return u = { next: s(0), throw: s(1), return: s(2) }, typeof Symbol == "function" && (u[Symbol.iterator] = function() {
2548
2563
  return this;
2549
2564
  }), u;
2550
- function o(l) {
2565
+ function s(l) {
2551
2566
  return function(d) {
2552
2567
  return c([l, d]);
2553
2568
  };
@@ -2555,11 +2570,11 @@ function yr(i, e) {
2555
2570
  function c(l) {
2556
2571
  if (n) throw new TypeError("Generator is already executing.");
2557
2572
  for (; t; ) try {
2558
- if (n = 1, r && (s = l[0] & 2 ? r.return : l[0] ? r.throw || ((s = r.return) && s.call(r), 0) : r.next) && !(s = s.call(r, l[1])).done) return s;
2559
- switch (r = 0, s && (l = [l[0] & 2, s.value]), l[0]) {
2573
+ 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;
2574
+ switch (r = 0, o && (l = [l[0] & 2, o.value]), l[0]) {
2560
2575
  case 0:
2561
2576
  case 1:
2562
- s = l;
2577
+ o = l;
2563
2578
  break;
2564
2579
  case 4:
2565
2580
  return t.label++, { value: l[1], done: !1 };
@@ -2570,36 +2585,36 @@ function yr(i, e) {
2570
2585
  l = t.ops.pop(), t.trys.pop();
2571
2586
  continue;
2572
2587
  default:
2573
- if (s = t.trys, !(s = s.length > 0 && s[s.length - 1]) && (l[0] === 6 || l[0] === 2)) {
2588
+ if (o = t.trys, !(o = o.length > 0 && o[o.length - 1]) && (l[0] === 6 || l[0] === 2)) {
2574
2589
  t = 0;
2575
2590
  continue;
2576
2591
  }
2577
- if (l[0] === 3 && (!s || l[1] > s[0] && l[1] < s[3])) {
2592
+ if (l[0] === 3 && (!o || l[1] > o[0] && l[1] < o[3])) {
2578
2593
  t.label = l[1];
2579
2594
  break;
2580
2595
  }
2581
- if (l[0] === 6 && t.label < s[1]) {
2582
- t.label = s[1], s = l;
2596
+ if (l[0] === 6 && t.label < o[1]) {
2597
+ t.label = o[1], o = l;
2583
2598
  break;
2584
2599
  }
2585
- if (s && t.label < s[2]) {
2586
- t.label = s[2], t.ops.push(l);
2600
+ if (o && t.label < o[2]) {
2601
+ t.label = o[2], t.ops.push(l);
2587
2602
  break;
2588
2603
  }
2589
- s[2] && t.ops.pop(), t.trys.pop();
2604
+ o[2] && t.ops.pop(), t.trys.pop();
2590
2605
  continue;
2591
2606
  }
2592
2607
  l = e.call(i, t);
2593
2608
  } catch (d) {
2594
2609
  l = [6, d], r = 0;
2595
2610
  } finally {
2596
- n = s = 0;
2611
+ n = o = 0;
2597
2612
  }
2598
2613
  if (l[0] & 5) throw l[1];
2599
2614
  return { value: l[0] ? l[1] : void 0, done: !0 };
2600
2615
  }
2601
2616
  }
2602
- var we = (
2617
+ var Se = (
2603
2618
  /** @class */
2604
2619
  /* @__PURE__ */ function() {
2605
2620
  function i(e, t) {
@@ -2608,91 +2623,91 @@ var we = (
2608
2623
  return i;
2609
2624
  }()
2610
2625
  );
2611
- function pr(i, e) {
2626
+ function _r(i, e) {
2612
2627
  return i > e ? 1 : i < e ? -1 : 0;
2613
2628
  }
2614
- function ye(i, e, t) {
2615
- for (var n = new we(null, null), r = n, s = n; ; ) {
2629
+ function be(i, e, t) {
2630
+ for (var n = new Se(null, null), r = n, o = n; ; ) {
2616
2631
  var u = t(i, e.key);
2617
2632
  if (u < 0) {
2618
2633
  if (e.left === null)
2619
2634
  break;
2620
2635
  if (t(i, e.left.key) < 0) {
2621
- var o = e.left;
2622
- if (e.left = o.right, o.right = e, e = o, e.left === null)
2636
+ var s = e.left;
2637
+ if (e.left = s.right, s.right = e, e = s, e.left === null)
2623
2638
  break;
2624
2639
  }
2625
- s.left = e, s = e, e = e.left;
2640
+ o.left = e, o = e, e = e.left;
2626
2641
  } else if (u > 0) {
2627
2642
  if (e.right === null)
2628
2643
  break;
2629
2644
  if (t(i, e.right.key) > 0) {
2630
- var o = e.right;
2631
- if (e.right = o.left, o.left = e, e = o, e.right === null)
2645
+ var s = e.right;
2646
+ if (e.right = s.left, s.left = e, e = s, e.right === null)
2632
2647
  break;
2633
2648
  }
2634
2649
  r.right = e, r = e, e = e.right;
2635
2650
  } else
2636
2651
  break;
2637
2652
  }
2638
- return r.right = e.left, s.left = e.right, e.left = n.right, e.right = n.left, e;
2653
+ return r.right = e.left, o.left = e.right, e.left = n.right, e.right = n.left, e;
2639
2654
  }
2640
- function St(i, e, t, n) {
2641
- var r = new we(i, e);
2655
+ function Ct(i, e, t, n) {
2656
+ var r = new Se(i, e);
2642
2657
  if (t === null)
2643
2658
  return r.left = r.right = null, r;
2644
- t = ye(i, t, n);
2645
- var s = n(i, t.key);
2646
- return s < 0 ? (r.left = t.left, r.right = t, t.left = null) : s >= 0 && (r.right = t.right, r.left = t, t.right = null), r;
2659
+ t = be(i, t, n);
2660
+ var o = n(i, t.key);
2661
+ 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;
2647
2662
  }
2648
- function ai(i, e, t) {
2663
+ function di(i, e, t) {
2649
2664
  var n = null, r = null;
2650
2665
  if (e) {
2651
- e = ye(i, e, t);
2652
- var s = t(e.key, i);
2653
- s === 0 ? (n = e.left, r = e.right) : s < 0 ? (r = e.right, e.right = null, n = e) : (n = e.left, e.left = null, r = e);
2666
+ e = be(i, e, t);
2667
+ var o = t(e.key, i);
2668
+ 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);
2654
2669
  }
2655
2670
  return { left: n, right: r };
2656
2671
  }
2657
- function br(i, e, t) {
2658
- return e === null ? i : (i === null || (e = ye(i.key, e, t), e.left = i), e);
2672
+ function Lr(i, e, t) {
2673
+ return e === null ? i : (i === null || (e = be(i.key, e, t), e.left = i), e);
2659
2674
  }
2660
- function Nt(i, e, t, n, r) {
2675
+ function Pt(i, e, t, n, r) {
2661
2676
  if (i) {
2662
2677
  n("" + e + (t ? "└── " : "├── ") + r(i) + `
2663
2678
  `);
2664
- var s = e + (t ? " " : "│ ");
2665
- i.left && Nt(i.left, s, !1, n, r), i.right && Nt(i.right, s, !0, n, r);
2679
+ var o = e + (t ? " " : "│ ");
2680
+ i.left && Pt(i.left, o, !1, n, r), i.right && Pt(i.right, o, !0, n, r);
2666
2681
  }
2667
2682
  }
2668
- var Wt = (
2683
+ var Dt = (
2669
2684
  /** @class */
2670
2685
  function() {
2671
2686
  function i(e) {
2672
- e === void 0 && (e = pr), this._root = null, this._size = 0, this._comparator = e;
2687
+ e === void 0 && (e = _r), this._root = null, this._size = 0, this._comparator = e;
2673
2688
  }
2674
2689
  return i.prototype.insert = function(e, t) {
2675
- return this._size++, this._root = St(e, t, this._root, this._comparator);
2690
+ return this._size++, this._root = Ct(e, t, this._root, this._comparator);
2676
2691
  }, i.prototype.add = function(e, t) {
2677
- var n = new we(e, t);
2692
+ var n = new Se(e, t);
2678
2693
  this._root === null && (n.left = n.right = null, this._size++, this._root = n);
2679
- var r = this._comparator, s = ye(e, this._root, r), u = r(e, s.key);
2680
- return u === 0 ? this._root = s : (u < 0 ? (n.left = s.left, n.right = s, s.left = null) : u > 0 && (n.right = s.right, n.left = s, s.right = null), this._size++, this._root = n), this._root;
2694
+ var r = this._comparator, o = be(e, this._root, r), u = r(e, o.key);
2695
+ 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;
2681
2696
  }, i.prototype.remove = function(e) {
2682
2697
  this._root = this._remove(e, this._root, this._comparator);
2683
2698
  }, i.prototype._remove = function(e, t, n) {
2684
2699
  var r;
2685
2700
  if (t === null)
2686
2701
  return null;
2687
- t = ye(e, t, n);
2688
- var s = n(e, t.key);
2689
- return s === 0 ? (t.left === null ? r = t.right : (r = ye(e, t.left, n), r.right = t.right), this._size--, r) : t;
2702
+ t = be(e, t, n);
2703
+ var o = n(e, t.key);
2704
+ return o === 0 ? (t.left === null ? r = t.right : (r = be(e, t.left, n), r.right = t.right), this._size--, r) : t;
2690
2705
  }, i.prototype.pop = function() {
2691
2706
  var e = this._root;
2692
2707
  if (e) {
2693
2708
  for (; e.left; )
2694
2709
  e = e.left;
2695
- return this._root = ye(e.key, this._root, this._comparator), this._root = this._remove(e.key, this._root, this._comparator), { key: e.key, data: e.data };
2710
+ return this._root = be(e.key, this._root, this._comparator), this._root = this._remove(e.key, this._root, this._comparator), { key: e.key, data: e.data };
2696
2711
  }
2697
2712
  return null;
2698
2713
  }, i.prototype.findStatic = function(e) {
@@ -2704,7 +2719,7 @@ var Wt = (
2704
2719
  }
2705
2720
  return null;
2706
2721
  }, i.prototype.find = function(e) {
2707
- return this._root && (this._root = ye(e, this._root, this._comparator), this._comparator(e, this._root.key) !== 0) ? null : this._root;
2722
+ return this._root && (this._root = be(e, this._root, this._comparator), this._comparator(e, this._root.key) !== 0) ? null : this._root;
2708
2723
  }, i.prototype.contains = function(e) {
2709
2724
  for (var t = this._root, n = this._comparator; t; ) {
2710
2725
  var r = n(e, t.key);
@@ -2714,19 +2729,19 @@ var Wt = (
2714
2729
  }
2715
2730
  return !1;
2716
2731
  }, i.prototype.forEach = function(e, t) {
2717
- for (var n = this._root, r = [], s = !1; !s; )
2718
- n !== null ? (r.push(n), n = n.left) : r.length !== 0 ? (n = r.pop(), e.call(t, n), n = n.right) : s = !0;
2732
+ for (var n = this._root, r = [], o = !1; !o; )
2733
+ n !== null ? (r.push(n), n = n.left) : r.length !== 0 ? (n = r.pop(), e.call(t, n), n = n.right) : o = !0;
2719
2734
  return this;
2720
2735
  }, i.prototype.range = function(e, t, n, r) {
2721
- for (var s = [], u = this._comparator, o = this._root, c; s.length !== 0 || o; )
2722
- if (o)
2723
- s.push(o), o = o.left;
2736
+ for (var o = [], u = this._comparator, s = this._root, c; o.length !== 0 || s; )
2737
+ if (s)
2738
+ o.push(s), s = s.left;
2724
2739
  else {
2725
- if (o = s.pop(), c = u(o.key, t), c > 0)
2740
+ if (s = o.pop(), c = u(s.key, t), c > 0)
2726
2741
  break;
2727
- if (u(o.key, e) >= 0 && n.call(r, o))
2742
+ if (u(s.key, e) >= 0 && n.call(r, s))
2728
2743
  return this;
2729
- o = o.right;
2744
+ s = s.right;
2730
2745
  }
2731
2746
  return this;
2732
2747
  }, i.prototype.keys = function() {
@@ -2756,11 +2771,11 @@ var Wt = (
2756
2771
  e = e.right;
2757
2772
  return e;
2758
2773
  }, i.prototype.at = function(e) {
2759
- for (var t = this._root, n = !1, r = 0, s = []; !n; )
2774
+ for (var t = this._root, n = !1, r = 0, o = []; !n; )
2760
2775
  if (t)
2761
- s.push(t), t = t.left;
2762
- else if (s.length > 0) {
2763
- if (t = s.pop(), r === e)
2776
+ o.push(t), t = t.left;
2777
+ else if (o.length > 0) {
2778
+ if (t = o.pop(), r === e)
2764
2779
  return t;
2765
2780
  r++, t = t.right;
2766
2781
  } else
@@ -2774,10 +2789,10 @@ var Wt = (
2774
2789
  return n;
2775
2790
  }
2776
2791
  for (var r = this._comparator; t; ) {
2777
- var s = r(e.key, t.key);
2778
- if (s === 0)
2792
+ var o = r(e.key, t.key);
2793
+ if (o === 0)
2779
2794
  break;
2780
- s < 0 ? (n = t, t = t.left) : t = t.right;
2795
+ o < 0 ? (n = t, t = t.left) : t = t.right;
2781
2796
  }
2782
2797
  return n;
2783
2798
  }, i.prototype.prev = function(e) {
@@ -2788,24 +2803,24 @@ var Wt = (
2788
2803
  return n;
2789
2804
  }
2790
2805
  for (var r = this._comparator; t; ) {
2791
- var s = r(e.key, t.key);
2792
- if (s === 0)
2806
+ var o = r(e.key, t.key);
2807
+ if (o === 0)
2793
2808
  break;
2794
- s < 0 ? t = t.left : (n = t, t = t.right);
2809
+ o < 0 ? t = t.left : (n = t, t = t.right);
2795
2810
  }
2796
2811
  return n;
2797
2812
  }, i.prototype.clear = function() {
2798
2813
  return this._root = null, this._size = 0, this;
2799
2814
  }, i.prototype.toList = function() {
2800
- return _r(this._root);
2815
+ return xr(this._root);
2801
2816
  }, i.prototype.load = function(e, t, n) {
2802
2817
  t === void 0 && (t = []), n === void 0 && (n = !1);
2803
- var r = e.length, s = this._comparator;
2804
- if (n && Pt(e, t, 0, r - 1, s), this._root === null)
2805
- this._root = Rt(e, t, 0, r), this._size = r;
2818
+ var r = e.length, o = this._comparator;
2819
+ if (n && At(e, t, 0, r - 1, o), this._root === null)
2820
+ this._root = It(e, t, 0, r), this._size = r;
2806
2821
  else {
2807
- var u = wr(this.toList(), Er(e, t), s);
2808
- r = this._size + r, this._root = Tt({ head: u }, 0, r);
2822
+ var u = Mr(this.toList(), Sr(e, t), o);
2823
+ r = this._size + r, this._root = Ot({ head: u }, 0, r);
2809
2824
  }
2810
2825
  return this;
2811
2826
  }, i.prototype.isEmpty = function() {
@@ -2827,17 +2842,17 @@ var Wt = (
2827
2842
  return String(n.key);
2828
2843
  });
2829
2844
  var t = [];
2830
- return Nt(this._root, "", !0, function(n) {
2845
+ return Pt(this._root, "", !0, function(n) {
2831
2846
  return t.push(n);
2832
2847
  }, e), t.join("");
2833
2848
  }, i.prototype.update = function(e, t, n) {
2834
- var r = this._comparator, s = ai(e, this._root, r), u = s.left, o = s.right;
2835
- r(e, t) < 0 ? o = St(t, n, o, r) : u = St(t, n, u, r), this._root = br(u, o, r);
2849
+ var r = this._comparator, o = di(e, this._root, r), u = o.left, s = o.right;
2850
+ r(e, t) < 0 ? s = Ct(t, n, s, r) : u = Ct(t, n, u, r), this._root = Lr(u, s, r);
2836
2851
  }, i.prototype.split = function(e) {
2837
- return ai(e, this._root, this._comparator);
2852
+ return di(e, this._root, this._comparator);
2838
2853
  }, i.prototype[Symbol.iterator] = function() {
2839
2854
  var e, t, n;
2840
- return yr(this, function(r) {
2855
+ return Er(this, function(r) {
2841
2856
  switch (r.label) {
2842
2857
  case 0:
2843
2858
  e = this._root, t = [], n = !1, r.label = 1;
@@ -2861,98 +2876,98 @@ var Wt = (
2861
2876
  }, i;
2862
2877
  }()
2863
2878
  );
2864
- function Rt(i, e, t, n) {
2879
+ function It(i, e, t, n) {
2865
2880
  var r = n - t;
2866
2881
  if (r > 0) {
2867
- var s = t + Math.floor(r / 2), u = i[s], o = e[s], c = new we(u, o);
2868
- return c.left = Rt(i, e, t, s), c.right = Rt(i, e, s + 1, n), c;
2882
+ var o = t + Math.floor(r / 2), u = i[o], s = e[o], c = new Se(u, s);
2883
+ return c.left = It(i, e, t, o), c.right = It(i, e, o + 1, n), c;
2869
2884
  }
2870
2885
  return null;
2871
2886
  }
2872
- function Er(i, e) {
2873
- for (var t = new we(null, null), n = t, r = 0; r < i.length; r++)
2874
- n = n.next = new we(i[r], e[r]);
2887
+ function Sr(i, e) {
2888
+ for (var t = new Se(null, null), n = t, r = 0; r < i.length; r++)
2889
+ n = n.next = new Se(i[r], e[r]);
2875
2890
  return n.next = null, t.next;
2876
2891
  }
2877
- function _r(i) {
2878
- for (var e = i, t = [], n = !1, r = new we(null, null), s = r; !n; )
2879
- e ? (t.push(e), e = e.left) : t.length > 0 ? (e = s = s.next = t.pop(), e = e.right) : n = !0;
2880
- return s.next = null, r.next;
2892
+ function xr(i) {
2893
+ for (var e = i, t = [], n = !1, r = new Se(null, null), o = r; !n; )
2894
+ e ? (t.push(e), e = e.left) : t.length > 0 ? (e = o = o.next = t.pop(), e = e.right) : n = !0;
2895
+ return o.next = null, r.next;
2881
2896
  }
2882
- function Tt(i, e, t) {
2897
+ function Ot(i, e, t) {
2883
2898
  var n = t - e;
2884
2899
  if (n > 0) {
2885
- var r = e + Math.floor(n / 2), s = Tt(i, e, r), u = i.head;
2886
- return u.left = s, i.head = i.head.next, u.right = Tt(i, r + 1, t), u;
2900
+ var r = e + Math.floor(n / 2), o = Ot(i, e, r), u = i.head;
2901
+ return u.left = o, i.head = i.head.next, u.right = Ot(i, r + 1, t), u;
2887
2902
  }
2888
2903
  return null;
2889
2904
  }
2890
- function wr(i, e, t) {
2891
- for (var n = new we(null, null), r = n, s = i, u = e; s !== null && u !== null; )
2892
- t(s.key, u.key) < 0 ? (r.next = s, s = s.next) : (r.next = u, u = u.next), r = r.next;
2893
- return s !== null ? r.next = s : u !== null && (r.next = u), n.next;
2905
+ function Mr(i, e, t) {
2906
+ for (var n = new Se(null, null), r = n, o = i, u = e; o !== null && u !== null; )
2907
+ t(o.key, u.key) < 0 ? (r.next = o, o = o.next) : (r.next = u, u = u.next), r = r.next;
2908
+ return o !== null ? r.next = o : u !== null && (r.next = u), n.next;
2894
2909
  }
2895
- function Pt(i, e, t, n, r) {
2910
+ function At(i, e, t, n, r) {
2896
2911
  if (!(t >= n)) {
2897
- for (var s = i[t + n >> 1], u = t - 1, o = n + 1; ; ) {
2912
+ for (var o = i[t + n >> 1], u = t - 1, s = n + 1; ; ) {
2898
2913
  do
2899
2914
  u++;
2900
- while (r(i[u], s) < 0);
2915
+ while (r(i[u], o) < 0);
2901
2916
  do
2902
- o--;
2903
- while (r(i[o], s) > 0);
2904
- if (u >= o)
2917
+ s--;
2918
+ while (r(i[s], o) > 0);
2919
+ if (u >= s)
2905
2920
  break;
2906
2921
  var c = i[u];
2907
- i[u] = i[o], i[o] = c, c = e[u], e[u] = e[o], e[o] = c;
2922
+ i[u] = i[s], i[s] = c, c = e[u], e[u] = e[s], e[s] = c;
2908
2923
  }
2909
- Pt(i, e, t, o, r), Pt(i, e, o + 1, n, r);
2924
+ At(i, e, t, s, r), At(i, e, s + 1, n, r);
2910
2925
  }
2911
2926
  }
2912
- const de = 11102230246251565e-32, Y = 134217729, Lr = (3 + 8 * de) * de;
2913
- function xt(i, e, t, n, r) {
2914
- let s, u, o, c, l = e[0], d = n[0], a = 0, f = 0;
2915
- d > l == d > -l ? (s = l, l = e[++a]) : (s = d, d = n[++f]);
2927
+ const he = 11102230246251565e-32, Y = 134217729, Cr = (3 + 8 * he) * he;
2928
+ function kt(i, e, t, n, r) {
2929
+ let o, u, s, c, l = e[0], d = n[0], a = 0, f = 0;
2930
+ d > l == d > -l ? (o = l, l = e[++a]) : (o = d, d = n[++f]);
2916
2931
  let g = 0;
2917
2932
  if (a < i && f < t)
2918
- for (d > l == d > -l ? (u = l + s, o = s - (u - l), l = e[++a]) : (u = d + s, o = s - (u - d), d = n[++f]), s = u, o !== 0 && (r[g++] = o); a < i && f < t; )
2919
- d > l == d > -l ? (u = s + l, c = u - s, o = s - (u - c) + (l - c), l = e[++a]) : (u = s + d, c = u - s, o = s - (u - c) + (d - c), d = n[++f]), s = u, o !== 0 && (r[g++] = o);
2933
+ 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[g++] = s); a < i && f < t; )
2934
+ 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[g++] = s);
2920
2935
  for (; a < i; )
2921
- u = s + l, c = u - s, o = s - (u - c) + (l - c), l = e[++a], s = u, o !== 0 && (r[g++] = o);
2936
+ u = o + l, c = u - o, s = o - (u - c) + (l - c), l = e[++a], o = u, s !== 0 && (r[g++] = s);
2922
2937
  for (; f < t; )
2923
- u = s + d, c = u - s, o = s - (u - c) + (d - c), d = n[++f], s = u, o !== 0 && (r[g++] = o);
2924
- return (s !== 0 || g === 0) && (r[g++] = s), g;
2938
+ u = o + d, c = u - o, s = o - (u - c) + (d - c), d = n[++f], o = u, s !== 0 && (r[g++] = s);
2939
+ return (o !== 0 || g === 0) && (r[g++] = o), g;
2925
2940
  }
2926
- function Sr(i, e) {
2941
+ function kr(i, e) {
2927
2942
  let t = e[0];
2928
2943
  for (let n = 1; n < i; n++) t += e[n];
2929
2944
  return t;
2930
2945
  }
2931
- function He(i) {
2946
+ function Ye(i) {
2932
2947
  return new Float64Array(i);
2933
2948
  }
2934
- const xr = (3 + 16 * de) * de, Mr = (2 + 12 * de) * de, kr = (9 + 64 * de) * de * de, Oe = He(4), ci = He(8), fi = He(12), di = He(16), J = He(4);
2935
- function Cr(i, e, t, n, r, s, u) {
2936
- let o, c, l, d, a, f, g, y, w, h, v, p, E, S, M, k, _, L;
2937
- const C = i - r, O = t - r, G = e - s, N = n - s;
2938
- S = C * N, f = Y * C, g = f - (f - C), y = C - g, f = Y * N, w = f - (f - N), h = N - w, M = y * h - (S - g * w - y * w - g * h), k = G * O, f = Y * G, g = f - (f - G), y = G - g, f = Y * O, w = f - (f - O), h = O - w, _ = y * h - (k - g * w - y * w - g * h), v = M - _, a = M - v, Oe[0] = M - (v + a) + (a - _), p = S + v, a = p - S, E = S - (p - a) + (v - a), v = E - k, a = E - v, Oe[1] = E - (v + a) + (a - k), L = p + v, a = L - p, Oe[2] = p - (L - a) + (v - a), Oe[3] = L;
2939
- let X = Sr(4, Oe), x = Mr * u;
2940
- if (X >= x || -X >= x || (a = i - C, o = i - (C + a) + (a - r), a = t - O, l = t - (O + a) + (a - r), a = e - G, c = e - (G + a) + (a - s), a = n - N, d = n - (N + a) + (a - s), o === 0 && c === 0 && l === 0 && d === 0) || (x = kr * u + Lr * Math.abs(X), X += C * d + N * o - (G * l + O * c), X >= x || -X >= x)) return X;
2941
- S = o * N, f = Y * o, g = f - (f - o), y = o - g, f = Y * N, w = f - (f - N), h = N - w, M = y * h - (S - g * w - y * w - g * h), k = c * O, f = Y * c, g = f - (f - c), y = c - g, f = Y * O, w = f - (f - O), h = O - w, _ = y * h - (k - g * w - y * w - g * h), v = M - _, a = M - v, J[0] = M - (v + a) + (a - _), p = S + v, a = p - S, E = S - (p - a) + (v - a), v = E - k, a = E - v, J[1] = E - (v + a) + (a - k), L = p + v, a = L - p, J[2] = p - (L - a) + (v - a), J[3] = L;
2942
- const W = xt(4, Oe, 4, J, ci);
2943
- S = C * d, f = Y * C, g = f - (f - C), y = C - g, f = Y * d, w = f - (f - d), h = d - w, M = y * h - (S - g * w - y * w - g * h), k = G * l, f = Y * G, g = f - (f - G), y = G - g, f = Y * l, w = f - (f - l), h = l - w, _ = y * h - (k - g * w - y * w - g * h), v = M - _, a = M - v, J[0] = M - (v + a) + (a - _), p = S + v, a = p - S, E = S - (p - a) + (v - a), v = E - k, a = E - v, J[1] = E - (v + a) + (a - k), L = p + v, a = L - p, J[2] = p - (L - a) + (v - a), J[3] = L;
2944
- const se = xt(W, ci, 4, J, fi);
2945
- S = o * d, f = Y * o, g = f - (f - o), y = o - g, f = Y * d, w = f - (f - d), h = d - w, M = y * h - (S - g * w - y * w - g * h), k = c * l, f = Y * c, g = f - (f - c), y = c - g, f = Y * l, w = f - (f - l), h = l - w, _ = y * h - (k - g * w - y * w - g * h), v = M - _, a = M - v, J[0] = M - (v + a) + (a - _), p = S + v, a = p - S, E = S - (p - a) + (v - a), v = E - k, a = E - v, J[1] = E - (v + a) + (a - k), L = p + v, a = L - p, J[2] = p - (L - a) + (v - a), J[3] = L;
2946
- const fe = xt(se, fi, 4, J, di);
2947
- return di[fe - 1];
2948
- }
2949
- function Nr(i, e, t, n, r, s) {
2950
- const u = (e - s) * (t - r), o = (i - r) * (n - s), c = u - o, l = Math.abs(u + o);
2951
- return Math.abs(c) >= xr * l ? c : -Cr(i, e, t, n, r, s, l);
2952
- }
2953
- const Ue = (i, e) => i.ll.x <= e.x && e.x <= i.ur.x && i.ll.y <= e.y && e.y <= i.ur.y, It = (i, e) => {
2949
+ const Nr = (3 + 16 * he) * he, Tr = (2 + 12 * he) * he, Rr = (9 + 64 * he) * he * he, Ae = Ye(4), hi = Ye(8), gi = Ye(12), mi = Ye(16), J = Ye(4);
2950
+ function Pr(i, e, t, n, r, o, u) {
2951
+ let s, c, l, d, a, f, g, y, _, h, v, p, w, S, M, C, E, L;
2952
+ const k = i - r, O = t - r, G = e - o, N = n - o;
2953
+ S = k * N, f = Y * k, g = f - (f - k), y = k - g, f = Y * N, _ = f - (f - N), h = N - _, M = y * h - (S - g * _ - y * _ - g * h), C = G * O, f = Y * G, g = f - (f - G), y = G - g, f = Y * O, _ = f - (f - O), h = O - _, E = y * h - (C - g * _ - y * _ - g * h), v = M - E, a = M - v, Ae[0] = M - (v + a) + (a - E), p = S + v, a = p - S, w = S - (p - a) + (v - a), v = w - C, a = w - v, Ae[1] = w - (v + a) + (a - C), L = p + v, a = L - p, Ae[2] = p - (L - a) + (v - a), Ae[3] = L;
2954
+ let X = kr(4, Ae), x = Tr * u;
2955
+ if (X >= x || -X >= x || (a = i - k, s = i - (k + a) + (a - r), a = t - O, l = t - (O + a) + (a - r), a = e - G, c = e - (G + a) + (a - o), a = n - N, d = n - (N + a) + (a - o), s === 0 && c === 0 && l === 0 && d === 0) || (x = Rr * u + Cr * Math.abs(X), X += k * d + N * s - (G * l + O * c), X >= x || -X >= x)) return X;
2956
+ S = s * N, f = Y * s, g = f - (f - s), y = s - g, f = Y * N, _ = f - (f - N), h = N - _, M = y * h - (S - g * _ - y * _ - g * h), C = c * O, f = Y * c, g = f - (f - c), y = c - g, f = Y * O, _ = f - (f - O), h = O - _, E = y * h - (C - g * _ - y * _ - g * h), v = M - E, a = M - v, J[0] = M - (v + a) + (a - E), p = S + v, a = p - S, w = S - (p - a) + (v - a), v = w - C, a = w - v, J[1] = w - (v + a) + (a - C), L = p + v, a = L - p, J[2] = p - (L - a) + (v - a), J[3] = L;
2957
+ const W = kt(4, Ae, 4, J, hi);
2958
+ S = k * d, f = Y * k, g = f - (f - k), y = k - g, f = Y * d, _ = f - (f - d), h = d - _, M = y * h - (S - g * _ - y * _ - g * h), C = G * l, f = Y * G, g = f - (f - G), y = G - g, f = Y * l, _ = f - (f - l), h = l - _, E = y * h - (C - g * _ - y * _ - g * h), v = M - E, a = M - v, J[0] = M - (v + a) + (a - E), p = S + v, a = p - S, w = S - (p - a) + (v - a), v = w - C, a = w - v, J[1] = w - (v + a) + (a - C), L = p + v, a = L - p, J[2] = p - (L - a) + (v - a), J[3] = L;
2959
+ const le = kt(W, hi, 4, J, gi);
2960
+ S = s * d, f = Y * s, g = f - (f - s), y = s - g, f = Y * d, _ = f - (f - d), h = d - _, M = y * h - (S - g * _ - y * _ - g * h), C = c * l, f = Y * c, g = f - (f - c), y = c - g, f = Y * l, _ = f - (f - l), h = l - _, E = y * h - (C - g * _ - y * _ - g * h), v = M - E, a = M - v, J[0] = M - (v + a) + (a - E), p = S + v, a = p - S, w = S - (p - a) + (v - a), v = w - C, a = w - v, J[1] = w - (v + a) + (a - C), L = p + v, a = L - p, J[2] = p - (L - a) + (v - a), J[3] = L;
2961
+ const de = kt(le, gi, 4, J, mi);
2962
+ return mi[de - 1];
2963
+ }
2964
+ function Ir(i, e, t, n, r, o) {
2965
+ const u = (e - o) * (t - r), s = (i - r) * (n - o), c = u - s, l = Math.abs(u + s);
2966
+ return Math.abs(c) >= Nr * l ? c : -Pr(i, e, t, n, r, o, l);
2967
+ }
2968
+ const Ge = (i, e) => i.ll.x <= e.x && e.x <= i.ur.x && i.ll.y <= e.y && e.y <= i.ur.y, Wt = (i, e) => {
2954
2969
  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;
2955
- 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, s = i.ur.y < e.ur.y ? i.ur.y : e.ur.y;
2970
+ 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;
2956
2971
  return {
2957
2972
  ll: {
2958
2973
  x: t,
@@ -2960,24 +2975,24 @@ const Ue = (i, e) => i.ll.x <= e.x && e.x <= i.ur.x && i.ll.y <= e.y && e.y <= i
2960
2975
  },
2961
2976
  ur: {
2962
2977
  x: n,
2963
- y: s
2978
+ y: o
2964
2979
  }
2965
2980
  };
2966
2981
  };
2967
- let pe = Number.EPSILON;
2968
- pe === void 0 && (pe = Math.pow(2, -52));
2969
- const Rr = pe * pe, hi = (i, e) => {
2970
- if (-pe < i && i < pe && -pe < e && e < pe)
2982
+ let we = Number.EPSILON;
2983
+ we === void 0 && (we = Math.pow(2, -52));
2984
+ const Or = we * we, vi = (i, e) => {
2985
+ if (-we < i && i < we && -we < e && e < we)
2971
2986
  return 0;
2972
2987
  const t = i - e;
2973
- return t * t < Rr * i * e ? 0 : i < e ? -1 : 1;
2988
+ return t * t < Or * i * e ? 0 : i < e ? -1 : 1;
2974
2989
  };
2975
- class Tr {
2990
+ class Ar {
2976
2991
  constructor() {
2977
2992
  this.reset();
2978
2993
  }
2979
2994
  reset() {
2980
- this.xRounder = new gi(), this.yRounder = new gi();
2995
+ this.xRounder = new yi(), this.yRounder = new yi();
2981
2996
  }
2982
2997
  round(e, t) {
2983
2998
  return {
@@ -2986,9 +3001,9 @@ class Tr {
2986
3001
  };
2987
3002
  }
2988
3003
  }
2989
- class gi {
3004
+ class yi {
2990
3005
  constructor() {
2991
- this.tree = new Wt(), this.round(0);
3006
+ this.tree = new Dt(), this.round(0);
2992
3007
  }
2993
3008
  // Note: this can rounds input values backwards or forwards.
2994
3009
  // You might ask, why not restrict this to just rounding
@@ -2999,16 +3014,16 @@ class gi {
2999
3014
  // angle for t-intersections).
3000
3015
  round(e) {
3001
3016
  const t = this.tree.add(e), n = this.tree.prev(t);
3002
- if (n !== null && hi(t.key, n.key) === 0)
3017
+ if (n !== null && vi(t.key, n.key) === 0)
3003
3018
  return this.tree.remove(e), n.key;
3004
3019
  const r = this.tree.next(t);
3005
- return r !== null && hi(t.key, r.key) === 0 ? (this.tree.remove(e), r.key) : e;
3020
+ return r !== null && vi(t.key, r.key) === 0 ? (this.tree.remove(e), r.key) : e;
3006
3021
  }
3007
3022
  }
3008
- const Ze = new Tr(), st = (i, e) => i.x * e.y - i.y * e.x, Ai = (i, e) => i.x * e.x + i.y * e.y, mi = (i, e, t) => {
3009
- const n = Nr(i.x, i.y, e.x, e.y, t.x, t.y);
3023
+ const Ve = new Ar(), ut = (i, e) => i.x * e.y - i.y * e.x, Bi = (i, e) => i.x * e.x + i.y * e.y, pi = (i, e, t) => {
3024
+ const n = Ir(i.x, i.y, e.x, e.y, t.x, t.y);
3010
3025
  return n > 0 ? -1 : n < 0 ? 1 : 0;
3011
- }, lt = (i) => Math.sqrt(Ai(i, i)), Pr = (i, e, t) => {
3026
+ }, ct = (i) => Math.sqrt(Bi(i, i)), Wr = (i, e, t) => {
3012
3027
  const n = {
3013
3028
  x: e.x - i.x,
3014
3029
  y: e.y - i.y
@@ -3016,8 +3031,8 @@ const Ze = new Tr(), st = (i, e) => i.x * e.y - i.y * e.x, Ai = (i, e) => i.x *
3016
3031
  x: t.x - i.x,
3017
3032
  y: t.y - i.y
3018
3033
  };
3019
- return st(r, n) / lt(r) / lt(n);
3020
- }, Ir = (i, e, t) => {
3034
+ return ut(r, n) / ct(r) / ct(n);
3035
+ }, zr = (i, e, t) => {
3021
3036
  const n = {
3022
3037
  x: e.x - i.x,
3023
3038
  y: e.y - i.y
@@ -3025,34 +3040,34 @@ const Ze = new Tr(), st = (i, e) => i.x * e.y - i.y * e.x, Ai = (i, e) => i.x *
3025
3040
  x: t.x - i.x,
3026
3041
  y: t.y - i.y
3027
3042
  };
3028
- return Ai(r, n) / lt(r) / lt(n);
3029
- }, vi = (i, e, t) => e.y === 0 ? null : {
3043
+ return Bi(r, n) / ct(r) / ct(n);
3044
+ }, bi = (i, e, t) => e.y === 0 ? null : {
3030
3045
  x: i.x + e.x / e.y * (t - i.y),
3031
3046
  y: t
3032
- }, yi = (i, e, t) => e.x === 0 ? null : {
3047
+ }, wi = (i, e, t) => e.x === 0 ? null : {
3033
3048
  x: t,
3034
3049
  y: i.y + e.y / e.x * (t - i.x)
3035
- }, Or = (i, e, t, n) => {
3036
- if (e.x === 0) return yi(t, n, i.x);
3037
- if (n.x === 0) return yi(i, e, t.x);
3038
- if (e.y === 0) return vi(t, n, i.y);
3039
- if (n.y === 0) return vi(i, e, t.y);
3040
- const r = st(e, n);
3050
+ }, Br = (i, e, t, n) => {
3051
+ if (e.x === 0) return wi(t, n, i.x);
3052
+ if (n.x === 0) return wi(i, e, t.x);
3053
+ if (e.y === 0) return bi(t, n, i.y);
3054
+ if (n.y === 0) return bi(i, e, t.y);
3055
+ const r = ut(e, n);
3041
3056
  if (r == 0) return null;
3042
- const s = {
3057
+ const o = {
3043
3058
  x: t.x - i.x,
3044
3059
  y: t.y - i.y
3045
- }, u = st(s, e) / r, o = st(s, n) / r, c = i.x + o * e.x, l = t.x + u * n.x, d = i.y + o * e.y, a = t.y + u * n.y, f = (c + l) / 2, g = (d + a) / 2;
3060
+ }, u = ut(o, e) / r, s = ut(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, g = (d + a) / 2;
3046
3061
  return {
3047
3062
  x: f,
3048
3063
  y: g
3049
3064
  };
3050
3065
  };
3051
- class ne {
3066
+ class oe {
3052
3067
  // for ordering sweep events in the sweep event queue
3053
3068
  static compare(e, t) {
3054
- const n = ne.comparePoints(e.point, t.point);
3055
- return n !== 0 ? n : (e.point !== t.point && e.link(t), e.isLeft !== t.isLeft ? e.isLeft ? 1 : -1 : be.compare(e.segment, t.segment));
3069
+ const n = oe.comparePoints(e.point, t.point);
3070
+ 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));
3056
3071
  }
3057
3072
  // for ordering points in sweep line order
3058
3073
  static comparePoints(e, t) {
@@ -3067,8 +3082,8 @@ class ne {
3067
3082
  throw new Error("Tried to link already linked events");
3068
3083
  const t = e.point.events;
3069
3084
  for (let n = 0, r = t.length; n < r; n++) {
3070
- const s = t[n];
3071
- this.point.events.push(s), s.point = this.point;
3085
+ const o = t[n];
3086
+ this.point.events.push(o), o.point = this.point;
3072
3087
  }
3073
3088
  this.checkForConsuming();
3074
3089
  }
@@ -3080,8 +3095,8 @@ class ne {
3080
3095
  const n = this.point.events[t];
3081
3096
  if (n.segment.consumedBy === void 0)
3082
3097
  for (let r = t + 1; r < e; r++) {
3083
- const s = this.point.events[r];
3084
- s.consumedBy === void 0 && n.otherSE.point.events === s.otherSE.point.events && n.segment.consume(s.segment);
3098
+ const o = this.point.events[r];
3099
+ o.consumedBy === void 0 && n.otherSE.point.events === o.otherSE.point.events && n.segment.consume(o.segment);
3085
3100
  }
3086
3101
  }
3087
3102
  }
@@ -3105,27 +3120,27 @@ class ne {
3105
3120
  */
3106
3121
  getLeftmostComparator(e) {
3107
3122
  const t = /* @__PURE__ */ new Map(), n = (r) => {
3108
- const s = r.otherSE;
3123
+ const o = r.otherSE;
3109
3124
  t.set(r, {
3110
- sine: Pr(this.point, e.point, s.point),
3111
- cosine: Ir(this.point, e.point, s.point)
3125
+ sine: Wr(this.point, e.point, o.point),
3126
+ cosine: zr(this.point, e.point, o.point)
3112
3127
  });
3113
3128
  };
3114
- return (r, s) => {
3115
- t.has(r) || n(r), t.has(s) || n(s);
3129
+ return (r, o) => {
3130
+ t.has(r) || n(r), t.has(o) || n(o);
3116
3131
  const {
3117
3132
  sine: u,
3118
- cosine: o
3133
+ cosine: s
3119
3134
  } = t.get(r), {
3120
3135
  sine: c,
3121
3136
  cosine: l
3122
- } = t.get(s);
3123
- return u >= 0 && c >= 0 ? o < l ? 1 : o > l ? -1 : 0 : u < 0 && c < 0 ? o < l ? -1 : o > l ? 1 : 0 : c < u ? -1 : c > u ? 1 : 0;
3137
+ } = t.get(o);
3138
+ 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;
3124
3139
  };
3125
3140
  }
3126
3141
  }
3127
- let Ar = 0;
3128
- class be {
3142
+ let Dr = 0;
3143
+ class Ee {
3129
3144
  /* This compare() function is for ordering segments in the sweep
3130
3145
  * line tree, and does so according to the following criteria:
3131
3146
  *
@@ -3140,13 +3155,13 @@ class be {
3140
3155
  * is directly on the right-more of the two left inputs.
3141
3156
  */
3142
3157
  static compare(e, t) {
3143
- const n = e.leftSE.point.x, r = t.leftSE.point.x, s = e.rightSE.point.x, u = t.rightSE.point.x;
3158
+ const n = e.leftSE.point.x, r = t.leftSE.point.x, o = e.rightSE.point.x, u = t.rightSE.point.x;
3144
3159
  if (u < n) return 1;
3145
- if (s < r) return -1;
3146
- const o = e.leftSE.point.y, c = t.leftSE.point.y, l = e.rightSE.point.y, d = t.rightSE.point.y;
3160
+ if (o < r) return -1;
3161
+ const s = e.leftSE.point.y, c = t.leftSE.point.y, l = e.rightSE.point.y, d = t.rightSE.point.y;
3147
3162
  if (n < r) {
3148
- if (c < o && c < l) return 1;
3149
- if (c > o && c > l) return -1;
3163
+ if (c < s && c < l) return 1;
3164
+ if (c > s && c > l) return -1;
3150
3165
  const a = e.comparePoint(t.leftSE.point);
3151
3166
  if (a < 0) return 1;
3152
3167
  if (a > 0) return -1;
@@ -3154,46 +3169,46 @@ class be {
3154
3169
  return f !== 0 ? f : -1;
3155
3170
  }
3156
3171
  if (n > r) {
3157
- if (o < c && o < d) return -1;
3158
- if (o > c && o > d) return 1;
3172
+ if (s < c && s < d) return -1;
3173
+ if (s > c && s > d) return 1;
3159
3174
  const a = t.comparePoint(e.leftSE.point);
3160
3175
  if (a !== 0) return a;
3161
3176
  const f = e.comparePoint(t.rightSE.point);
3162
3177
  return f < 0 ? 1 : f > 0 ? -1 : 1;
3163
3178
  }
3164
- if (o < c) return -1;
3165
- if (o > c) return 1;
3166
- if (s < u) {
3179
+ if (s < c) return -1;
3180
+ if (s > c) return 1;
3181
+ if (o < u) {
3167
3182
  const a = t.comparePoint(e.rightSE.point);
3168
3183
  if (a !== 0) return a;
3169
3184
  }
3170
- if (s > u) {
3185
+ if (o > u) {
3171
3186
  const a = e.comparePoint(t.rightSE.point);
3172
3187
  if (a < 0) return 1;
3173
3188
  if (a > 0) return -1;
3174
3189
  }
3175
- if (s !== u) {
3176
- const a = l - o, f = s - n, g = d - c, y = u - r;
3190
+ if (o !== u) {
3191
+ const a = l - s, f = o - n, g = d - c, y = u - r;
3177
3192
  if (a > f && g < y) return 1;
3178
3193
  if (a < f && g > y) return -1;
3179
3194
  }
3180
- return s > u ? 1 : s < u || l < d ? -1 : l > d ? 1 : e.id < t.id ? -1 : e.id > t.id ? 1 : 0;
3195
+ return o > u ? 1 : o < u || l < d ? -1 : l > d ? 1 : e.id < t.id ? -1 : e.id > t.id ? 1 : 0;
3181
3196
  }
3182
3197
  /* Warning: a reference to ringWindings input will be stored,
3183
3198
  * and possibly will be later modified */
3184
3199
  constructor(e, t, n, r) {
3185
- this.id = ++Ar, this.leftSE = e, e.segment = this, e.otherSE = t, this.rightSE = t, t.segment = this, t.otherSE = e, this.rings = n, this.windings = r;
3200
+ this.id = ++Dr, this.leftSE = e, e.segment = this, e.otherSE = t, this.rightSE = t, t.segment = this, t.otherSE = e, this.rings = n, this.windings = r;
3186
3201
  }
3187
3202
  static fromRing(e, t, n) {
3188
- let r, s, u;
3189
- const o = ne.comparePoints(e, t);
3190
- if (o < 0)
3191
- r = e, s = t, u = 1;
3192
- else if (o > 0)
3193
- r = t, s = e, u = -1;
3203
+ let r, o, u;
3204
+ const s = oe.comparePoints(e, t);
3205
+ if (s < 0)
3206
+ r = e, o = t, u = 1;
3207
+ else if (s > 0)
3208
+ r = t, o = e, u = -1;
3194
3209
  else throw new Error(`Tried to create degenerate segment at [${e.x}, ${e.y}]`);
3195
- const c = new ne(r, !0), l = new ne(s, !1);
3196
- return new be(c, l, [n], [u]);
3210
+ const c = new oe(r, !0), l = new oe(o, !1);
3211
+ return new Ee(c, l, [n], [u]);
3197
3212
  }
3198
3213
  /* When a segment is split, the rightSE is replaced with a new sweep event */
3199
3214
  replaceRightSE(e) {
@@ -3240,9 +3255,9 @@ class be {
3240
3255
  const t = this.leftSE.point, n = this.rightSE.point, r = this.vector();
3241
3256
  if (t.x === n.x)
3242
3257
  return e.x === t.x ? 0 : e.x < t.x ? 1 : -1;
3243
- const s = (e.y - t.y) / r.y, u = t.x + s * r.x;
3258
+ const o = (e.y - t.y) / r.y, u = t.x + o * r.x;
3244
3259
  if (e.x === u) return 0;
3245
- const o = (e.x - t.x) / r.x, c = t.y + o * r.y;
3260
+ const s = (e.x - t.x) / r.x, c = t.y + s * r.y;
3246
3261
  return e.y === c ? 0 : e.y < c ? -1 : 1;
3247
3262
  }
3248
3263
  /**
@@ -3261,20 +3276,20 @@ class be {
3261
3276
  * Else, return null.
3262
3277
  */
3263
3278
  getIntersection(e) {
3264
- const t = this.bbox(), n = e.bbox(), r = It(t, n);
3279
+ const t = this.bbox(), n = e.bbox(), r = Wt(t, n);
3265
3280
  if (r === null) return null;
3266
- const s = this.leftSE.point, u = this.rightSE.point, o = e.leftSE.point, c = e.rightSE.point, l = Ue(t, o) && this.comparePoint(o) === 0, d = Ue(n, s) && e.comparePoint(s) === 0, a = Ue(t, c) && this.comparePoint(c) === 0, f = Ue(n, u) && e.comparePoint(u) === 0;
3281
+ const o = this.leftSE.point, u = this.rightSE.point, s = e.leftSE.point, c = e.rightSE.point, l = Ge(t, s) && this.comparePoint(s) === 0, d = Ge(n, o) && e.comparePoint(o) === 0, a = Ge(t, c) && this.comparePoint(c) === 0, f = Ge(n, u) && e.comparePoint(u) === 0;
3267
3282
  if (d && l)
3268
3283
  return f && !a ? u : !f && a ? c : null;
3269
3284
  if (d)
3270
- return a && s.x === c.x && s.y === c.y ? null : s;
3285
+ return a && o.x === c.x && o.y === c.y ? null : o;
3271
3286
  if (l)
3272
- return f && u.x === o.x && u.y === o.y ? null : o;
3287
+ return f && u.x === s.x && u.y === s.y ? null : s;
3273
3288
  if (f && a) return null;
3274
3289
  if (f) return u;
3275
3290
  if (a) return c;
3276
- const g = Or(s, this.vector(), o, e.vector());
3277
- return g === null || !Ue(r, g) ? null : Ze.round(g.x, g.y);
3291
+ const g = Br(o, this.vector(), s, e.vector());
3292
+ return g === null || !Ge(r, g) ? null : Ve.round(g.x, g.y);
3278
3293
  }
3279
3294
  /**
3280
3295
  * Split the given segment into multiple segments on the given points.
@@ -3289,10 +3304,10 @@ class be {
3289
3304
  * Warning: input array of points is modified
3290
3305
  */
3291
3306
  split(e) {
3292
- const t = [], n = e.events !== void 0, r = new ne(e, !0), s = new ne(e, !1), u = this.rightSE;
3293
- this.replaceRightSE(s), t.push(s), t.push(r);
3294
- const o = new be(r, u, this.rings.slice(), this.windings.slice());
3295
- return ne.comparePoints(o.leftSE.point, o.rightSE.point) > 0 && o.swapEvents(), ne.comparePoints(this.leftSE.point, this.rightSE.point) > 0 && this.swapEvents(), n && (r.checkForConsuming(), s.checkForConsuming()), t;
3307
+ const t = [], n = e.events !== void 0, r = new oe(e, !0), o = new oe(e, !1), u = this.rightSE;
3308
+ this.replaceRightSE(o), t.push(o), t.push(r);
3309
+ const s = new Ee(r, u, this.rings.slice(), this.windings.slice());
3310
+ 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;
3296
3311
  }
3297
3312
  /* Swap which event is left and right */
3298
3313
  swapEvents() {
@@ -3307,19 +3322,19 @@ class be {
3307
3322
  let t = this, n = e;
3308
3323
  for (; t.consumedBy; ) t = t.consumedBy;
3309
3324
  for (; n.consumedBy; ) n = n.consumedBy;
3310
- const r = be.compare(t, n);
3325
+ const r = Ee.compare(t, n);
3311
3326
  if (r !== 0) {
3312
3327
  if (r > 0) {
3313
- const s = t;
3314
- t = n, n = s;
3328
+ const o = t;
3329
+ t = n, n = o;
3315
3330
  }
3316
3331
  if (t.prev === n) {
3317
- const s = t;
3318
- t = n, n = s;
3332
+ const o = t;
3333
+ t = n, n = o;
3319
3334
  }
3320
- for (let s = 0, u = n.rings.length; s < u; s++) {
3321
- const o = n.rings[s], c = n.windings[s], l = t.rings.indexOf(o);
3322
- l === -1 ? (t.rings.push(o), t.windings.push(c)) : t.windings[l] += c;
3335
+ for (let o = 0, u = n.rings.length; o < u; o++) {
3336
+ const s = n.rings[o], c = n.windings[o], l = t.rings.indexOf(s);
3337
+ l === -1 ? (t.rings.push(s), t.windings.push(c)) : t.windings[l] += c;
3323
3338
  }
3324
3339
  n.rings = null, n.windings = null, n.consumedBy = t, n.leftSE.consumedBy = t.leftSE, n.rightSE.consumedBy = t.rightSE;
3325
3340
  }
@@ -3350,24 +3365,24 @@ class be {
3350
3365
  multiPolys: []
3351
3366
  };
3352
3367
  const t = this._afterState.rings, n = this._afterState.windings, r = this._afterState.multiPolys;
3353
- for (let o = 0, c = this.rings.length; o < c; o++) {
3354
- const l = this.rings[o], d = this.windings[o], a = t.indexOf(l);
3368
+ for (let s = 0, c = this.rings.length; s < c; s++) {
3369
+ const l = this.rings[s], d = this.windings[s], a = t.indexOf(l);
3355
3370
  a === -1 ? (t.push(l), n.push(d)) : n[a] += d;
3356
3371
  }
3357
- const s = [], u = [];
3358
- for (let o = 0, c = t.length; o < c; o++) {
3359
- if (n[o] === 0) continue;
3360
- const l = t[o], d = l.poly;
3372
+ const o = [], u = [];
3373
+ for (let s = 0, c = t.length; s < c; s++) {
3374
+ if (n[s] === 0) continue;
3375
+ const l = t[s], d = l.poly;
3361
3376
  if (u.indexOf(d) === -1)
3362
- if (l.isExterior) s.push(d);
3377
+ if (l.isExterior) o.push(d);
3363
3378
  else {
3364
3379
  u.indexOf(d) === -1 && u.push(d);
3365
- const a = s.indexOf(l.poly);
3366
- a !== -1 && s.splice(a, 1);
3380
+ const a = o.indexOf(l.poly);
3381
+ a !== -1 && o.splice(a, 1);
3367
3382
  }
3368
3383
  }
3369
- for (let o = 0, c = s.length; o < c; o++) {
3370
- const l = s[o].multiPoly;
3384
+ for (let s = 0, c = o.length; s < c; s++) {
3385
+ const l = o[s].multiPoly;
3371
3386
  r.indexOf(l) === -1 && r.push(l);
3372
3387
  }
3373
3388
  return this._afterState;
@@ -3377,7 +3392,7 @@ class be {
3377
3392
  if (this.consumedBy) return !1;
3378
3393
  if (this._isInResult !== void 0) return this._isInResult;
3379
3394
  const e = this.beforeState().multiPolys, t = this.afterState().multiPolys;
3380
- switch (oe.type) {
3395
+ switch (ue.type) {
3381
3396
  case "union": {
3382
3397
  const n = e.length === 0, r = t.length === 0;
3383
3398
  this._isInResult = n !== r;
@@ -3385,7 +3400,7 @@ class be {
3385
3400
  }
3386
3401
  case "intersection": {
3387
3402
  let n, r;
3388
- e.length < t.length ? (n = e.length, r = t.length) : (n = t.length, r = e.length), this._isInResult = r === oe.numMultiPolys && n < r;
3403
+ e.length < t.length ? (n = e.length, r = t.length) : (n = t.length, r = e.length), this._isInResult = r === ue.numMultiPolys && n < r;
3389
3404
  break;
3390
3405
  }
3391
3406
  case "xor": {
@@ -3399,18 +3414,18 @@ class be {
3399
3414
  break;
3400
3415
  }
3401
3416
  default:
3402
- throw new Error(`Unrecognized operation type found ${oe.type}`);
3417
+ throw new Error(`Unrecognized operation type found ${ue.type}`);
3403
3418
  }
3404
3419
  return this._isInResult;
3405
3420
  }
3406
3421
  }
3407
- class pi {
3422
+ class Ei {
3408
3423
  constructor(e, t, n) {
3409
3424
  if (!Array.isArray(e) || e.length === 0)
3410
3425
  throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
3411
3426
  if (this.poly = t, this.isExterior = n, this.segments = [], typeof e[0][0] != "number" || typeof e[0][1] != "number")
3412
3427
  throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
3413
- const r = Ze.round(e[0][0], e[0][1]);
3428
+ const r = Ve.round(e[0][0], e[0][1]);
3414
3429
  this.bbox = {
3415
3430
  ll: {
3416
3431
  x: r.x,
@@ -3421,14 +3436,14 @@ class pi {
3421
3436
  y: r.y
3422
3437
  }
3423
3438
  };
3424
- let s = r;
3425
- for (let u = 1, o = e.length; u < o; u++) {
3439
+ let o = r;
3440
+ for (let u = 1, s = e.length; u < s; u++) {
3426
3441
  if (typeof e[u][0] != "number" || typeof e[u][1] != "number")
3427
3442
  throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
3428
- let c = Ze.round(e[u][0], e[u][1]);
3429
- c.x === s.x && c.y === s.y || (this.segments.push(be.fromRing(s, 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), s = c);
3443
+ let c = Ve.round(e[u][0], e[u][1]);
3444
+ 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);
3430
3445
  }
3431
- (r.x !== s.x || r.y !== s.y) && this.segments.push(be.fromRing(s, r, this));
3446
+ (r.x !== o.x || r.y !== o.y) && this.segments.push(Ee.fromRing(o, r, this));
3432
3447
  }
3433
3448
  getSweepEvents() {
3434
3449
  const e = [];
@@ -3439,11 +3454,11 @@ class pi {
3439
3454
  return e;
3440
3455
  }
3441
3456
  }
3442
- class Wr {
3457
+ class Ur {
3443
3458
  constructor(e, t) {
3444
3459
  if (!Array.isArray(e))
3445
3460
  throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
3446
- this.exteriorRing = new pi(e[0], this, !0), this.bbox = {
3461
+ this.exteriorRing = new Ei(e[0], this, !0), this.bbox = {
3447
3462
  ll: {
3448
3463
  x: this.exteriorRing.bbox.ll.x,
3449
3464
  y: this.exteriorRing.bbox.ll.y
@@ -3454,8 +3469,8 @@ class Wr {
3454
3469
  }
3455
3470
  }, this.interiorRings = [];
3456
3471
  for (let n = 1, r = e.length; n < r; n++) {
3457
- const s = new pi(e[n], this, !1);
3458
- s.bbox.ll.x < this.bbox.ll.x && (this.bbox.ll.x = s.bbox.ll.x), s.bbox.ll.y < this.bbox.ll.y && (this.bbox.ll.y = s.bbox.ll.y), s.bbox.ur.x > this.bbox.ur.x && (this.bbox.ur.x = s.bbox.ur.x), s.bbox.ur.y > this.bbox.ur.y && (this.bbox.ur.y = s.bbox.ur.y), this.interiorRings.push(s);
3472
+ const o = new Ei(e[n], this, !1);
3473
+ 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);
3459
3474
  }
3460
3475
  this.multiPoly = t;
3461
3476
  }
@@ -3463,13 +3478,13 @@ class Wr {
3463
3478
  const e = this.exteriorRing.getSweepEvents();
3464
3479
  for (let t = 0, n = this.interiorRings.length; t < n; t++) {
3465
3480
  const r = this.interiorRings[t].getSweepEvents();
3466
- for (let s = 0, u = r.length; s < u; s++)
3467
- e.push(r[s]);
3481
+ for (let o = 0, u = r.length; o < u; o++)
3482
+ e.push(r[o]);
3468
3483
  }
3469
3484
  return e;
3470
3485
  }
3471
3486
  }
3472
- class bi {
3487
+ class _i {
3473
3488
  constructor(e, t) {
3474
3489
  if (!Array.isArray(e))
3475
3490
  throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
@@ -3488,8 +3503,8 @@ class bi {
3488
3503
  }
3489
3504
  };
3490
3505
  for (let n = 0, r = e.length; n < r; n++) {
3491
- const s = new Wr(e[n], this);
3492
- s.bbox.ll.x < this.bbox.ll.x && (this.bbox.ll.x = s.bbox.ll.x), s.bbox.ll.y < this.bbox.ll.y && (this.bbox.ll.y = s.bbox.ll.y), s.bbox.ur.x > this.bbox.ur.x && (this.bbox.ur.x = s.bbox.ur.x), s.bbox.ur.y > this.bbox.ur.y && (this.bbox.ur.y = s.bbox.ur.y), this.polys.push(s);
3506
+ const o = new Ur(e[n], this);
3507
+ 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);
3493
3508
  }
3494
3509
  this.isSubject = t;
3495
3510
  }
@@ -3497,53 +3512,53 @@ class bi {
3497
3512
  const e = [];
3498
3513
  for (let t = 0, n = this.polys.length; t < n; t++) {
3499
3514
  const r = this.polys[t].getSweepEvents();
3500
- for (let s = 0, u = r.length; s < u; s++)
3501
- e.push(r[s]);
3515
+ for (let o = 0, u = r.length; o < u; o++)
3516
+ e.push(r[o]);
3502
3517
  }
3503
3518
  return e;
3504
3519
  }
3505
3520
  }
3506
- class ut {
3521
+ class ft {
3507
3522
  /* Given the segments from the sweep line pass, compute & return a series
3508
3523
  * of closed rings from all the segments marked to be part of the result */
3509
3524
  static factory(e) {
3510
3525
  const t = [];
3511
3526
  for (let n = 0, r = e.length; n < r; n++) {
3512
- const s = e[n];
3513
- if (!s.isInResult() || s.ringOut) continue;
3514
- let u = null, o = s.leftSE, c = s.rightSE;
3515
- const l = [o], d = o.point, a = [];
3516
- for (; u = o, o = c, l.push(o), o.point !== d; )
3527
+ const o = e[n];
3528
+ if (!o.isInResult() || o.ringOut) continue;
3529
+ let u = null, s = o.leftSE, c = o.rightSE;
3530
+ const l = [s], d = s.point, a = [];
3531
+ for (; u = s, s = c, l.push(s), s.point !== d; )
3517
3532
  for (; ; ) {
3518
- const f = o.getAvailableLinkedEvents();
3533
+ const f = s.getAvailableLinkedEvents();
3519
3534
  if (f.length === 0) {
3520
- const w = l[0].point, h = l[l.length - 1].point;
3521
- throw new Error(`Unable to complete output ring starting at [${w.x}, ${w.y}]. Last matching segment found ends at [${h.x}, ${h.y}].`);
3535
+ const _ = l[0].point, h = l[l.length - 1].point;
3536
+ throw new Error(`Unable to complete output ring starting at [${_.x}, ${_.y}]. Last matching segment found ends at [${h.x}, ${h.y}].`);
3522
3537
  }
3523
3538
  if (f.length === 1) {
3524
3539
  c = f[0].otherSE;
3525
3540
  break;
3526
3541
  }
3527
3542
  let g = null;
3528
- for (let w = 0, h = a.length; w < h; w++)
3529
- if (a[w].point === o.point) {
3530
- g = w;
3543
+ for (let _ = 0, h = a.length; _ < h; _++)
3544
+ if (a[_].point === s.point) {
3545
+ g = _;
3531
3546
  break;
3532
3547
  }
3533
3548
  if (g !== null) {
3534
- const w = a.splice(g)[0], h = l.splice(w.index);
3535
- h.unshift(h[0].otherSE), t.push(new ut(h.reverse()));
3549
+ const _ = a.splice(g)[0], h = l.splice(_.index);
3550
+ h.unshift(h[0].otherSE), t.push(new ft(h.reverse()));
3536
3551
  continue;
3537
3552
  }
3538
3553
  a.push({
3539
3554
  index: l.length,
3540
- point: o.point
3555
+ point: s.point
3541
3556
  });
3542
- const y = o.getLeftmostComparator(u);
3557
+ const y = s.getLeftmostComparator(u);
3543
3558
  c = f.sort(y)[0].otherSE;
3544
3559
  break;
3545
3560
  }
3546
- t.push(new ut(l));
3561
+ t.push(new ft(l));
3547
3562
  }
3548
3563
  return t;
3549
3564
  }
@@ -3558,13 +3573,13 @@ class ut {
3558
3573
  const t = [e];
3559
3574
  for (let l = 1, d = this.events.length - 1; l < d; l++) {
3560
3575
  const a = this.events[l].point, f = this.events[l + 1].point;
3561
- mi(a, e, f) !== 0 && (t.push(a), e = a);
3576
+ pi(a, e, f) !== 0 && (t.push(a), e = a);
3562
3577
  }
3563
3578
  if (t.length === 1) return null;
3564
3579
  const n = t[0], r = t[1];
3565
- mi(n, e, r) === 0 && t.shift(), t.push(t[0]);
3566
- const s = this.isExteriorRing() ? 1 : -1, u = this.isExteriorRing() ? 0 : t.length - 1, o = this.isExteriorRing() ? t.length : -1, c = [];
3567
- for (let l = u; l != o; l += s) c.push([t[l].x, t[l].y]);
3580
+ pi(n, e, r) === 0 && t.shift(), t.push(t[0]);
3581
+ const o = this.isExteriorRing() ? 1 : -1, u = this.isExteriorRing() ? 0 : t.length - 1, s = this.isExteriorRing() ? t.length : -1, c = [];
3582
+ for (let l = u; l != s; l += o) c.push([t[l].x, t[l].y]);
3568
3583
  return c;
3569
3584
  }
3570
3585
  isExteriorRing() {
@@ -3580,9 +3595,9 @@ class ut {
3580
3595
  /* Returns the ring that encloses this one, if any */
3581
3596
  _calcEnclosingRing() {
3582
3597
  let e = this.events[0];
3583
- for (let r = 1, s = this.events.length; r < s; r++) {
3598
+ for (let r = 1, o = this.events.length; r < o; r++) {
3584
3599
  const u = this.events[r];
3585
- ne.compare(e, u) > 0 && (e = u);
3600
+ oe.compare(e, u) > 0 && (e = u);
3586
3601
  }
3587
3602
  let t = e.segment.prevInResult(), n = t ? t.prevInResult() : null;
3588
3603
  for (; ; ) {
@@ -3594,7 +3609,7 @@ class ut {
3594
3609
  }
3595
3610
  }
3596
3611
  }
3597
- class Ei {
3612
+ class Li {
3598
3613
  constructor(e) {
3599
3614
  this.exteriorRing = e, e.poly = this, this.interiorRings = [];
3600
3615
  }
@@ -3611,7 +3626,7 @@ class Ei {
3611
3626
  return e;
3612
3627
  }
3613
3628
  }
3614
- class zr {
3629
+ class Fr {
3615
3630
  constructor(e) {
3616
3631
  this.rings = e, this.polys = this._composePolys(e);
3617
3632
  }
@@ -3626,21 +3641,21 @@ class zr {
3626
3641
  _composePolys(e) {
3627
3642
  const t = [];
3628
3643
  for (let n = 0, r = e.length; n < r; n++) {
3629
- const s = e[n];
3630
- if (!s.poly)
3631
- if (s.isExteriorRing()) t.push(new Ei(s));
3644
+ const o = e[n];
3645
+ if (!o.poly)
3646
+ if (o.isExteriorRing()) t.push(new Li(o));
3632
3647
  else {
3633
- const u = s.enclosingRing();
3634
- u.poly || t.push(new Ei(u)), u.poly.addInterior(s);
3648
+ const u = o.enclosingRing();
3649
+ u.poly || t.push(new Li(u)), u.poly.addInterior(o);
3635
3650
  }
3636
3651
  }
3637
3652
  return t;
3638
3653
  }
3639
3654
  }
3640
- class Br {
3655
+ class Gr {
3641
3656
  constructor(e) {
3642
- let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : be.compare;
3643
- this.queue = e, this.tree = new Wt(t), this.segments = [];
3657
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Ee.compare;
3658
+ this.queue = e, this.tree = new Dt(t), this.segments = [];
3644
3659
  }
3645
3660
  process(e) {
3646
3661
  const t = e.segment, n = [];
@@ -3648,17 +3663,17 @@ class Br {
3648
3663
  return e.isLeft ? this.queue.remove(e.otherSE) : this.tree.remove(t), n;
3649
3664
  const r = e.isLeft ? this.tree.add(t) : this.tree.find(t);
3650
3665
  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.`);
3651
- let s = r, u = r, o, c;
3652
- for (; o === void 0; )
3653
- s = this.tree.prev(s), s === null ? o = null : s.key.consumedBy === void 0 && (o = s.key);
3666
+ let o = r, u = r, s, c;
3667
+ for (; s === void 0; )
3668
+ o = this.tree.prev(o), o === null ? s = null : o.key.consumedBy === void 0 && (s = o.key);
3654
3669
  for (; c === void 0; )
3655
3670
  u = this.tree.next(u), u === null ? c = null : u.key.consumedBy === void 0 && (c = u.key);
3656
3671
  if (e.isLeft) {
3657
3672
  let l = null;
3658
- if (o) {
3659
- const a = o.getIntersection(t);
3660
- if (a !== null && (t.isAnEndpoint(a) || (l = a), !o.isAnEndpoint(a))) {
3661
- const f = this._splitSafely(o, a);
3673
+ if (s) {
3674
+ const a = s.getIntersection(t);
3675
+ if (a !== null && (t.isAnEndpoint(a) || (l = a), !s.isAnEndpoint(a))) {
3676
+ const f = this._splitSafely(s, a);
3662
3677
  for (let g = 0, y = f.length; g < y; g++)
3663
3678
  n.push(f[g]);
3664
3679
  }
@@ -3674,18 +3689,18 @@ class Br {
3674
3689
  }
3675
3690
  if (l !== null || d !== null) {
3676
3691
  let a = null;
3677
- l === null ? a = d : d === null ? a = l : a = ne.comparePoints(l, d) <= 0 ? l : d, this.queue.remove(t.rightSE), n.push(t.rightSE);
3692
+ 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);
3678
3693
  const f = t.split(a);
3679
3694
  for (let g = 0, y = f.length; g < y; g++)
3680
3695
  n.push(f[g]);
3681
3696
  }
3682
- n.length > 0 ? (this.tree.remove(t), n.push(e)) : (this.segments.push(t), t.prev = o);
3697
+ n.length > 0 ? (this.tree.remove(t), n.push(e)) : (this.segments.push(t), t.prev = s);
3683
3698
  } else {
3684
- if (o && c) {
3685
- const l = o.getIntersection(c);
3699
+ if (s && c) {
3700
+ const l = s.getIntersection(c);
3686
3701
  if (l !== null) {
3687
- if (!o.isAnEndpoint(l)) {
3688
- const d = this._splitSafely(o, l);
3702
+ if (!s.isAnEndpoint(l)) {
3703
+ const d = this._splitSafely(s, l);
3689
3704
  for (let a = 0, f = d.length; a < f; a++)
3690
3705
  n.push(d[a]);
3691
3706
  }
@@ -3710,85 +3725,85 @@ class Br {
3710
3725
  return r.push(n), e.consumedBy === void 0 && this.tree.add(e), r;
3711
3726
  }
3712
3727
  }
3713
- const _i = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE || 1e6, Dr = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS || 1e6;
3714
- class Ur {
3728
+ const Si = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE || 1e6, jr = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS || 1e6;
3729
+ class qr {
3715
3730
  run(e, t, n) {
3716
- oe.type = e, Ze.reset();
3717
- const r = [new bi(t, !0)];
3731
+ ue.type = e, Ve.reset();
3732
+ const r = [new _i(t, !0)];
3718
3733
  for (let a = 0, f = n.length; a < f; a++)
3719
- r.push(new bi(n[a], !1));
3720
- if (oe.numMultiPolys = r.length, oe.type === "difference") {
3734
+ r.push(new _i(n[a], !1));
3735
+ if (ue.numMultiPolys = r.length, ue.type === "difference") {
3721
3736
  const a = r[0];
3722
3737
  let f = 1;
3723
3738
  for (; f < r.length; )
3724
- It(r[f].bbox, a.bbox) !== null ? f++ : r.splice(f, 1);
3739
+ Wt(r[f].bbox, a.bbox) !== null ? f++ : r.splice(f, 1);
3725
3740
  }
3726
- if (oe.type === "intersection")
3741
+ if (ue.type === "intersection")
3727
3742
  for (let a = 0, f = r.length; a < f; a++) {
3728
3743
  const g = r[a];
3729
- for (let y = a + 1, w = r.length; y < w; y++)
3730
- if (It(g.bbox, r[y].bbox) === null) return [];
3744
+ for (let y = a + 1, _ = r.length; y < _; y++)
3745
+ if (Wt(g.bbox, r[y].bbox) === null) return [];
3731
3746
  }
3732
- const s = new Wt(ne.compare);
3747
+ const o = new Dt(oe.compare);
3733
3748
  for (let a = 0, f = r.length; a < f; a++) {
3734
3749
  const g = r[a].getSweepEvents();
3735
- for (let y = 0, w = g.length; y < w; y++)
3736
- if (s.insert(g[y]), s.size > _i)
3750
+ for (let y = 0, _ = g.length; y < _; y++)
3751
+ if (o.insert(g[y]), o.size > Si)
3737
3752
  throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big).");
3738
3753
  }
3739
- const u = new Br(s);
3740
- let o = s.size, c = s.pop();
3754
+ const u = new Gr(o);
3755
+ let s = o.size, c = o.pop();
3741
3756
  for (; c; ) {
3742
3757
  const a = c.key;
3743
- if (s.size === o) {
3758
+ if (o.size === s) {
3744
3759
  const g = a.segment;
3745
3760
  throw new Error(`Unable to pop() ${a.isLeft ? "left" : "right"} SweepEvent [${a.point.x}, ${a.point.y}] from segment #${g.id} [${g.leftSE.point.x}, ${g.leftSE.point.y}] -> [${g.rightSE.point.x}, ${g.rightSE.point.y}] from queue.`);
3746
3761
  }
3747
- if (s.size > _i)
3762
+ if (o.size > Si)
3748
3763
  throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big).");
3749
- if (u.segments.length > Dr)
3764
+ if (u.segments.length > jr)
3750
3765
  throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments).");
3751
3766
  const f = u.process(a);
3752
3767
  for (let g = 0, y = f.length; g < y; g++) {
3753
- const w = f[g];
3754
- w.consumedBy === void 0 && s.insert(w);
3768
+ const _ = f[g];
3769
+ _.consumedBy === void 0 && o.insert(_);
3755
3770
  }
3756
- o = s.size, c = s.pop();
3771
+ s = o.size, c = o.pop();
3757
3772
  }
3758
- Ze.reset();
3759
- const l = ut.factory(u.segments);
3760
- return new zr(l).getGeom();
3773
+ Ve.reset();
3774
+ const l = ft.factory(u.segments);
3775
+ return new Fr(l).getGeom();
3761
3776
  }
3762
3777
  }
3763
- const oe = new Ur(), Fr = function(i) {
3778
+ const ue = new qr(), Qr = function(i) {
3764
3779
  for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), n = 1; n < e; n++)
3765
3780
  t[n - 1] = arguments[n];
3766
- return oe.run("union", i, t);
3767
- }, Gr = function(i) {
3781
+ return ue.run("union", i, t);
3782
+ }, Zr = function(i) {
3768
3783
  for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), n = 1; n < e; n++)
3769
3784
  t[n - 1] = arguments[n];
3770
- return oe.run("intersection", i, t);
3771
- }, jr = function(i) {
3785
+ return ue.run("intersection", i, t);
3786
+ }, Hr = function(i) {
3772
3787
  for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), n = 1; n < e; n++)
3773
3788
  t[n - 1] = arguments[n];
3774
- return oe.run("xor", i, t);
3775
- }, qr = function(i) {
3789
+ return ue.run("xor", i, t);
3790
+ }, Vr = function(i) {
3776
3791
  for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), n = 1; n < e; n++)
3777
3792
  t[n - 1] = arguments[n];
3778
- return oe.run("difference", i, t);
3793
+ return ue.run("difference", i, t);
3779
3794
  };
3780
- var Wi = {
3781
- union: Fr,
3782
- intersection: Gr,
3783
- xor: jr,
3784
- difference: qr
3795
+ var Di = {
3796
+ union: Qr,
3797
+ intersection: Zr,
3798
+ xor: Hr,
3799
+ difference: Vr
3785
3800
  };
3786
- function zi(i, e, t) {
3801
+ function Ui(i, e, t) {
3787
3802
  if (i !== null)
3788
- for (var n, r, s, u, o, c, l, d = 0, a = 0, f, g = i.type, y = g === "FeatureCollection", w = g === "Feature", h = y ? i.features.length : 1, v = 0; v < h; v++) {
3789
- l = y ? i.features[v].geometry : w ? i.geometry : i, f = l ? l.type === "GeometryCollection" : !1, o = f ? l.geometries.length : 1;
3790
- for (var p = 0; p < o; p++) {
3791
- var E = 0, S = 0;
3803
+ for (var n, r, o, u, s, c, l, d = 0, a = 0, f, g = i.type, y = g === "FeatureCollection", _ = g === "Feature", h = y ? i.features.length : 1, v = 0; v < h; v++) {
3804
+ l = y ? i.features[v].geometry : _ ? i.geometry : i, f = l ? l.type === "GeometryCollection" : !1, s = f ? l.geometries.length : 1;
3805
+ for (var p = 0; p < s; p++) {
3806
+ var w = 0, S = 0;
3792
3807
  if (u = f ? l.geometries[p] : l, u !== null) {
3793
3808
  c = u.coordinates;
3794
3809
  var M = u.type;
@@ -3800,11 +3815,11 @@ function zi(i, e, t) {
3800
3815
  c,
3801
3816
  a,
3802
3817
  v,
3803
- E,
3818
+ w,
3804
3819
  S
3805
3820
  ) === !1)
3806
3821
  return !1;
3807
- a++, E++;
3822
+ a++, w++;
3808
3823
  break;
3809
3824
  case "LineString":
3810
3825
  case "MultiPoint":
@@ -3813,13 +3828,13 @@ function zi(i, e, t) {
3813
3828
  c[n],
3814
3829
  a,
3815
3830
  v,
3816
- E,
3831
+ w,
3817
3832
  S
3818
3833
  ) === !1)
3819
3834
  return !1;
3820
- a++, M === "MultiPoint" && E++;
3835
+ a++, M === "MultiPoint" && w++;
3821
3836
  }
3822
- M === "LineString" && E++;
3837
+ M === "LineString" && w++;
3823
3838
  break;
3824
3839
  case "Polygon":
3825
3840
  case "MultiLineString":
@@ -3829,25 +3844,25 @@ function zi(i, e, t) {
3829
3844
  c[n][r],
3830
3845
  a,
3831
3846
  v,
3832
- E,
3847
+ w,
3833
3848
  S
3834
3849
  ) === !1)
3835
3850
  return !1;
3836
3851
  a++;
3837
3852
  }
3838
- M === "MultiLineString" && E++, M === "Polygon" && S++;
3853
+ M === "MultiLineString" && w++, M === "Polygon" && S++;
3839
3854
  }
3840
- M === "Polygon" && E++;
3855
+ M === "Polygon" && w++;
3841
3856
  break;
3842
3857
  case "MultiPolygon":
3843
3858
  for (n = 0; n < c.length; n++) {
3844
3859
  for (S = 0, r = 0; r < c[n].length; r++) {
3845
- for (s = 0; s < c[n][r].length - d; s++) {
3860
+ for (o = 0; o < c[n][r].length - d; o++) {
3846
3861
  if (e(
3847
- c[n][r][s],
3862
+ c[n][r][o],
3848
3863
  a,
3849
3864
  v,
3850
- E,
3865
+ w,
3851
3866
  S
3852
3867
  ) === !1)
3853
3868
  return !1;
@@ -3855,12 +3870,12 @@ function zi(i, e, t) {
3855
3870
  }
3856
3871
  S++;
3857
3872
  }
3858
- E++;
3873
+ w++;
3859
3874
  }
3860
3875
  break;
3861
3876
  case "GeometryCollection":
3862
3877
  for (n = 0; n < u.geometries.length; n++)
3863
- if (zi(u.geometries[n], e) === !1)
3878
+ if (Ui(u.geometries[n], e) === !1)
3864
3879
  return !1;
3865
3880
  break;
3866
3881
  default:
@@ -3870,11 +3885,11 @@ function zi(i, e, t) {
3870
3885
  }
3871
3886
  }
3872
3887
  }
3873
- function zt(i, e) {
3874
- var t, n, r, s, u, o, c, l, d, a, f = 0, g = i.type === "FeatureCollection", y = i.type === "Feature", w = g ? i.features.length : 1;
3875
- for (t = 0; t < w; t++) {
3876
- for (o = g ? i.features[t].geometry : y ? i.geometry : i, l = g ? i.features[t].properties : y ? i.properties : {}, d = g ? i.features[t].bbox : y ? i.bbox : void 0, a = g ? i.features[t].id : y ? i.id : void 0, c = o ? o.type === "GeometryCollection" : !1, u = c ? o.geometries.length : 1, r = 0; r < u; r++) {
3877
- if (s = c ? o.geometries[r] : o, s === null) {
3888
+ function Ut(i, e) {
3889
+ var t, n, r, o, u, s, c, l, d, a, f = 0, g = i.type === "FeatureCollection", y = i.type === "Feature", _ = g ? i.features.length : 1;
3890
+ for (t = 0; t < _; t++) {
3891
+ for (s = g ? i.features[t].geometry : y ? i.geometry : i, l = g ? i.features[t].properties : y ? i.properties : {}, d = g ? i.features[t].bbox : y ? i.bbox : void 0, a = g ? i.features[t].id : y ? i.id : void 0, c = s ? s.type === "GeometryCollection" : !1, u = c ? s.geometries.length : 1, r = 0; r < u; r++) {
3892
+ if (o = c ? s.geometries[r] : s, o === null) {
3878
3893
  if (e(
3879
3894
  null,
3880
3895
  f,
@@ -3885,7 +3900,7 @@ function zt(i, e) {
3885
3900
  return !1;
3886
3901
  continue;
3887
3902
  }
3888
- switch (s.type) {
3903
+ switch (o.type) {
3889
3904
  case "Point":
3890
3905
  case "LineString":
3891
3906
  case "MultiPoint":
@@ -3893,7 +3908,7 @@ function zt(i, e) {
3893
3908
  case "MultiLineString":
3894
3909
  case "MultiPolygon": {
3895
3910
  if (e(
3896
- s,
3911
+ o,
3897
3912
  f,
3898
3913
  l,
3899
3914
  d,
@@ -3903,9 +3918,9 @@ function zt(i, e) {
3903
3918
  break;
3904
3919
  }
3905
3920
  case "GeometryCollection": {
3906
- for (n = 0; n < s.geometries.length; n++)
3921
+ for (n = 0; n < o.geometries.length; n++)
3907
3922
  if (e(
3908
- s.geometries[n],
3923
+ o.geometries[n],
3909
3924
  f,
3910
3925
  l,
3911
3926
  d,
@@ -3921,22 +3936,22 @@ function zt(i, e) {
3921
3936
  f++;
3922
3937
  }
3923
3938
  }
3924
- function Qr(i, e) {
3925
- zt(i, function(t, n, r, s, u) {
3926
- var o = t === null ? null : t.type;
3927
- switch (o) {
3939
+ function Yr(i, e) {
3940
+ Ut(i, function(t, n, r, o, u) {
3941
+ var s = t === null ? null : t.type;
3942
+ switch (s) {
3928
3943
  case null:
3929
3944
  case "Point":
3930
3945
  case "LineString":
3931
3946
  case "Polygon":
3932
3947
  return e(
3933
- qe(t, r, { bbox: s, id: u }),
3948
+ Ze(t, r, { bbox: o, id: u }),
3934
3949
  n,
3935
3950
  0
3936
3951
  ) === !1 ? !1 : void 0;
3937
3952
  }
3938
3953
  var c;
3939
- switch (o) {
3954
+ switch (s) {
3940
3955
  case "MultiPoint":
3941
3956
  c = "Point";
3942
3957
  break;
@@ -3952,53 +3967,53 @@ function Qr(i, e) {
3952
3967
  type: c,
3953
3968
  coordinates: d
3954
3969
  };
3955
- if (e(qe(a, r), n, l) === !1)
3970
+ if (e(Ze(a, r), n, l) === !1)
3956
3971
  return !1;
3957
3972
  }
3958
3973
  });
3959
3974
  }
3960
- function Zr(i, e = {}) {
3975
+ function Kr(i, e = {}) {
3961
3976
  const t = [];
3962
- if (zt(i, (r) => {
3977
+ if (Ut(i, (r) => {
3963
3978
  t.push(r.coordinates);
3964
3979
  }), t.length < 2)
3965
3980
  throw new Error("Must have at least 2 geometries");
3966
- const n = Wi.union(t[0], ...t.slice(1));
3967
- return n.length === 0 ? null : n.length === 1 ? At(n[0], e.properties) : Oi(n, e.properties);
3981
+ const n = Di.union(t[0], ...t.slice(1));
3982
+ return n.length === 0 ? null : n.length === 1 ? Bt(n[0], e.properties) : zi(n, e.properties);
3968
3983
  }
3969
- var Bi = Zr;
3970
- function Hr(i, e = {}) {
3984
+ var Fi = Kr;
3985
+ function Xr(i, e = {}) {
3971
3986
  if (i.bbox != null && e.recompute !== !0)
3972
3987
  return i.bbox;
3973
3988
  const t = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
3974
- return zi(i, (n) => {
3989
+ return Ui(i, (n) => {
3975
3990
  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]);
3976
3991
  }), t;
3977
3992
  }
3978
- var wi = Hr;
3979
- function Vr(i) {
3993
+ var xi = Xr;
3994
+ function Jr(i) {
3980
3995
  const e = [];
3981
- if (zt(i, (r) => {
3996
+ if (Ut(i, (r) => {
3982
3997
  e.push(r.coordinates);
3983
3998
  }), e.length < 2)
3984
3999
  throw new Error("Must have at least two features");
3985
- const t = i.features[0].properties || {}, n = Wi.difference(e[0], ...e.slice(1));
3986
- return n.length === 0 ? null : n.length === 1 ? At(n[0], t) : Oi(n, t);
4000
+ const t = i.features[0].properties || {}, n = Di.difference(e[0], ...e.slice(1));
4001
+ return n.length === 0 ? null : n.length === 1 ? Bt(n[0], t) : zi(n, t);
3987
4002
  }
3988
- var Yr = Vr;
3989
- function Kr(i) {
4003
+ var $r = Jr;
4004
+ function eo(i) {
3990
4005
  if (!i)
3991
4006
  throw new Error("geojson is required");
3992
4007
  var e = [];
3993
- return Qr(i, function(t) {
4008
+ return Yr(i, function(t) {
3994
4009
  e.push(t);
3995
- }), Qe(e);
4010
+ }), He(e);
3996
4011
  }
3997
- var Xr = Kr;
3998
- function Li(i, e) {
3999
- const t = Yr(
4000
- Qe([
4001
- At([
4012
+ var to = eo;
4013
+ function Mi(i, e) {
4014
+ const t = $r(
4015
+ He([
4016
+ Bt([
4002
4017
  [
4003
4018
  [180, 90],
4004
4019
  [-180, 90],
@@ -4013,27 +4028,27 @@ function Li(i, e) {
4013
4028
  if (!t)
4014
4029
  return;
4015
4030
  t.properties = { isMask: !0 };
4016
- const n = ot(wi(i)), r = (n[2] - n[0]) / 360 / 1e3, s = n[0] < -180, u = n[2] > 180, o = Xr(i);
4017
- if (o.features.length > 1 && (s || u))
4018
- for (const c of o.features) {
4019
- const l = ot(wi(c));
4031
+ const n = at(xi(i)), r = (n[2] - n[0]) / 360 / 1e3, o = n[0] < -180, u = n[2] > 180, s = to(i);
4032
+ if (s.features.length > 1 && (o || u))
4033
+ for (const c of s.features) {
4034
+ const l = at(xi(c));
4020
4035
  if (u && l[0] < -180 + r)
4021
4036
  for (const d of c.geometry.coordinates)
4022
4037
  for (const a of d)
4023
4038
  a[0] += 360 - r;
4024
- if (s && l[2] > 180 - r)
4039
+ if (o && l[2] > 180 - r)
4025
4040
  for (const d of c.geometry.coordinates)
4026
4041
  for (const a of d)
4027
4042
  a[0] -= 360 - r;
4028
4043
  }
4029
4044
  e(
4030
- Qe([
4031
- o.features.length < 2 ? i : Bi(o) ?? i,
4045
+ He([
4046
+ s.features.length < 2 ? i : Fi(s) ?? i,
4032
4047
  t
4033
4048
  ])
4034
4049
  );
4035
4050
  }
4036
- const Si = {
4051
+ const Ci = {
4037
4052
  fill: {
4038
4053
  paint: {
4039
4054
  "fill-color": "#000",
@@ -4052,9 +4067,9 @@ const Si = {
4052
4067
  },
4053
4068
  filter: ["!", ["has", "isMask"]]
4054
4069
  }
4055
- }, tt = "mtlr-gc-full-geom", xi = "mtlr-gc-full-geom-fill", Mi = "mtlr-gc-full-geom-line";
4056
- function Jr(i, e, t = !0, n = !0, r = {}, s = {}, u = Si) {
4057
- let o;
4070
+ }, rt = "mtlr-gc-full-geom", ki = "mtlr-gc-full-geom-fill", Ni = "mtlr-gc-full-geom-line";
4071
+ function io(i, e, t = !0, n = !0, r = {}, o = {}, u = Ci) {
4072
+ let s;
4058
4073
  const c = [];
4059
4074
  let l, d, a;
4060
4075
  function f() {
@@ -4062,29 +4077,29 @@ function Jr(i, e, t = !0, n = !0, r = {}, s = {}, u = Si) {
4062
4077
  i.once("load", f);
4063
4078
  return;
4064
4079
  }
4065
- const h = u ? u === !0 ? Si : u : void 0;
4080
+ const h = u ? u === !0 ? Ci : u : void 0;
4066
4081
  if (!(h != null && h.fill) && !(h != null && h.line))
4067
4082
  return;
4068
- const v = i.getSource(tt);
4083
+ const v = i.getSource(rt);
4069
4084
  if (v)
4070
- v.setData(a ?? Qe([]));
4085
+ v.setData(a ?? He([]));
4071
4086
  else if (a)
4072
- i.addSource(tt, {
4087
+ i.addSource(rt, {
4073
4088
  type: "geojson",
4074
4089
  data: a
4075
4090
  });
4076
4091
  else
4077
4092
  return;
4078
- !i.getLayer(xi) && (h != null && h.fill) && i.addLayer({
4093
+ !i.getLayer(ki) && (h != null && h.fill) && i.addLayer({
4079
4094
  ...h == null ? void 0 : h.fill,
4080
- id: xi,
4095
+ id: ki,
4081
4096
  type: "fill",
4082
- source: tt
4083
- }), !i.getLayer(Mi) && (h != null && h.line) && i.addLayer({
4097
+ source: rt
4098
+ }), !i.getLayer(Ni) && (h != null && h.line) && i.addLayer({
4084
4099
  ...h == null ? void 0 : h.line,
4085
- id: Mi,
4100
+ id: Ni,
4086
4101
  type: "line",
4087
- source: tt
4102
+ source: rt
4088
4103
  });
4089
4104
  }
4090
4105
  function g(h) {
@@ -4096,23 +4111,23 @@ function Jr(i, e, t = !0, n = !0, r = {}, s = {}, u = Si) {
4096
4111
  });
4097
4112
  });
4098
4113
  const y = (h) => {
4099
- o == null || o({
4114
+ s == null || s({
4100
4115
  type: "mapClick",
4101
4116
  coordinates: [h.lngLat.lng, h.lngLat.lat]
4102
4117
  });
4103
4118
  };
4104
- function w(h = !1) {
4119
+ function _(h = !1) {
4105
4120
  if (!e)
4106
4121
  throw new Error();
4107
4122
  const v = document.createElement("div");
4108
- return h && v.classList.add("marker-interactive"), new Zn({
4123
+ return h && v.classList.add("marker-interactive"), new Kn({
4109
4124
  props: { displayIn: "maplibre" },
4110
4125
  target: v
4111
4126
  }), new e.Marker({ element: v, offset: [1, -13] });
4112
4127
  }
4113
4128
  return {
4114
4129
  setEventHandler(h) {
4115
- h ? (o = h, i.on("click", y)) : (o = void 0, i.off("click", y));
4130
+ h ? (s = h, i.on("click", y)) : (s = void 0, i.off("click", y));
4116
4131
  },
4117
4132
  flyTo(h, v) {
4118
4133
  i.flyTo({ center: h, ...v ? { zoom: v } : {}, ...r });
@@ -4123,51 +4138,51 @@ function Jr(i, e, t = !0, n = !0, r = {}, s = {}, u = Si) {
4123
4138
  [h[0], h[1]],
4124
4139
  [h[2], h[3]]
4125
4140
  ],
4126
- { padding: v, ...p ? { maxZoom: p } : {}, ...s }
4141
+ { padding: v, ...p ? { maxZoom: p } : {}, ...o }
4127
4142
  );
4128
4143
  },
4129
4144
  indicateReverse(h) {
4130
4145
  i.getCanvasContainer().style.cursor = h ? "crosshair" : "";
4131
4146
  },
4132
4147
  setReverseMarker(h) {
4133
- !e || !t || (d ? h ? d.setLngLat(h) : (d.remove(), d = void 0) : h && (t instanceof Function ? d = t(i) ?? void 0 : (d = (typeof t == "object" ? new e.Marker(t) : w()).setLngLat(h).addTo(i), d.getElement().classList.add("marker-reverse"))));
4148
+ !e || !t || (d ? h ? d.setLngLat(h) : (d.remove(), d = void 0) : h && (t instanceof Function ? d = t(i) ?? void 0 : (d = (typeof t == "object" ? new e.Marker(t) : _()).setLngLat(h).addTo(i), d.getElement().classList.add("marker-reverse"))));
4134
4149
  },
4135
- setMarkers(h, v, p) {
4136
- for (const E of c)
4137
- E.remove();
4150
+ setFeatures(h, v, p) {
4151
+ for (const w of c)
4152
+ w.remove();
4138
4153
  if (c.length = 0, g(void 0), !!e) {
4139
4154
  if (v) {
4140
- let E = !1;
4155
+ let w = !1;
4141
4156
  if (v.geometry.type === "GeometryCollection") {
4142
4157
  const S = v.geometry.geometries.filter(
4143
4158
  (M) => M.type === "Polygon" || M.type === "MultiPolygon"
4144
4159
  );
4145
4160
  e: if (S.length > 0) {
4146
- const M = Bi(
4147
- Qe(S.map((k) => qe(k)))
4161
+ const M = Fi(
4162
+ He(S.map((C) => Ze(C)))
4148
4163
  );
4149
4164
  if (!M)
4150
4165
  break e;
4151
- Li(
4166
+ Mi(
4152
4167
  {
4153
4168
  ...v,
4154
4169
  geometry: M.geometry
4155
4170
  },
4156
4171
  g
4157
- ), E = !0;
4172
+ ), w = !0;
4158
4173
  } else {
4159
4174
  const M = v.geometry.geometries.filter(
4160
- (k) => k.type === "LineString" || k.type === "MultiLineString"
4175
+ (C) => C.type === "LineString" || C.type === "MultiLineString"
4161
4176
  );
4162
4177
  M.length > 0 && (g({
4163
4178
  ...v,
4164
4179
  geometry: { type: "GeometryCollection", geometries: M }
4165
- }), E = !0);
4180
+ }), w = !0);
4166
4181
  }
4167
4182
  }
4168
- if (!E) {
4183
+ if (!w) {
4169
4184
  if (v.geometry.type === "Polygon" || v.geometry.type === "MultiPolygon")
4170
- Li(v, g);
4185
+ Mi(v, g);
4171
4186
  else if (v.geometry.type === "LineString" || v.geometry.type === "MultiLineString") {
4172
4187
  g(v);
4173
4188
  return;
@@ -4179,35 +4194,35 @@ function Jr(i, e, t = !0, n = !0, r = {}, s = {}, u = Si) {
4179
4194
  const S = t(i, v);
4180
4195
  S && c.push(S);
4181
4196
  } else t && c.push(
4182
- typeof t == "object" ? new e.Marker(t) : w().setLngLat(v.center).addTo(i)
4197
+ typeof t == "object" ? new e.Marker(t) : _().setLngLat(v.center).addTo(i)
4183
4198
  );
4184
4199
  }
4185
4200
  if (n)
4186
- for (const E of h ?? []) {
4187
- if (E === v)
4201
+ for (const w of h ?? []) {
4202
+ if (w === v)
4188
4203
  continue;
4189
4204
  let S;
4190
4205
  if (n instanceof Function) {
4191
- if (S = n(i, E), !S)
4206
+ if (S = n(i, w), !S)
4192
4207
  continue;
4193
4208
  } else
4194
- S = (typeof n == "object" ? new e.Marker(n) : w(!0)).setLngLat(E.center).setPopup(
4209
+ S = (typeof n == "object" ? new e.Marker(n) : _(!0)).setLngLat(w.center).setPopup(
4195
4210
  new e.Popup({
4196
4211
  offset: [1, -27],
4197
4212
  closeButton: !1,
4198
4213
  closeOnMove: !0,
4199
4214
  className: "maptiler-gc-popup"
4200
4215
  }).setText(
4201
- E.place_type[0] === "reverse" ? E.place_name : E.place_name.replace(/,.*/, "")
4216
+ w.place_type[0] === "reverse" ? w.place_name : w.place_name.replace(/,.*/, "")
4202
4217
  )
4203
4218
  ).addTo(i);
4204
4219
  const M = S.getElement();
4205
- M.addEventListener("click", (k) => {
4206
- k.stopPropagation(), o == null || o({ type: "markerClick", id: E.id });
4220
+ M.addEventListener("click", (C) => {
4221
+ C.stopPropagation(), s == null || s({ type: "markerClick", id: w.id });
4207
4222
  }), M.addEventListener("mouseenter", () => {
4208
- o == null || o({ type: "markerMouseEnter", id: E.id }), S.togglePopup();
4223
+ s == null || s({ type: "markerMouseEnter", id: w.id }), S.togglePopup();
4209
4224
  }), M.addEventListener("mouseleave", () => {
4210
- o == null || o({ type: "markerMouseLeave", id: E.id }), S.togglePopup();
4225
+ s == null || s({ type: "markerMouseLeave", id: w.id }), S.togglePopup();
4211
4226
  }), c.push(S);
4212
4227
  }
4213
4228
  }
@@ -4221,8 +4236,8 @@ function Jr(i, e, t = !0, n = !0, r = {}, s = {}, u = Si) {
4221
4236
  }
4222
4237
  };
4223
4238
  }
4224
- function $r(i, e, t) {
4225
- var y, w;
4239
+ function no(i, e, t) {
4240
+ var y, _;
4226
4241
  class n {
4227
4242
  constructor(v, p) {
4228
4243
  ee(this, "type");
@@ -4231,102 +4246,102 @@ function $r(i, e, t) {
4231
4246
  }
4232
4247
  }
4233
4248
  class r extends n {
4234
- constructor(p, E) {
4249
+ constructor(p, w) {
4235
4250
  super(p, "select");
4236
4251
  ee(this, "feature");
4237
- Object.assign(this, E);
4252
+ Object.assign(this, w);
4238
4253
  }
4239
4254
  }
4240
- class s extends n {
4241
- constructor(p, E) {
4255
+ class o extends n {
4256
+ constructor(p, w) {
4242
4257
  super(p, "featureslisted");
4243
4258
  ee(this, "features");
4244
- this.features = E;
4259
+ this.features = w;
4245
4260
  }
4246
4261
  }
4247
4262
  class u extends n {
4248
- constructor(p, E) {
4263
+ constructor(p, w) {
4249
4264
  super(p, "featuresmarked");
4250
4265
  ee(this, "features");
4251
- this.features = E;
4266
+ this.features = w;
4252
4267
  }
4253
4268
  }
4254
- class o extends n {
4255
- constructor(p, E) {
4269
+ class s extends n {
4270
+ constructor(p, w) {
4256
4271
  super(p, "optionsvisibilitychange");
4257
4272
  ee(this, "optionsVisible");
4258
- this.optionsVisible = E;
4273
+ this.optionsVisible = w;
4259
4274
  }
4260
4275
  }
4261
4276
  class c extends n {
4262
- constructor(p, E) {
4277
+ constructor(p, w) {
4263
4278
  super(p, "pick");
4264
4279
  ee(this, "feature");
4265
- this.feature = E;
4280
+ this.feature = w;
4266
4281
  }
4267
4282
  }
4268
4283
  class l extends n {
4269
- constructor(p, E) {
4284
+ constructor(p, w) {
4270
4285
  super(p, "querychange");
4271
4286
  ee(this, "query");
4272
- this.query = E;
4287
+ this.query = w;
4273
4288
  }
4274
4289
  }
4275
4290
  class d extends n {
4276
- constructor(p, E, S) {
4291
+ constructor(p, w, S) {
4277
4292
  super(p, "response");
4278
4293
  ee(this, "url");
4279
4294
  ee(this, "featureCollection");
4280
- this.url = E, this.featureCollection = S;
4295
+ this.url = w, this.featureCollection = S;
4281
4296
  }
4282
4297
  }
4283
4298
  class a extends n {
4284
- constructor(p, E) {
4299
+ constructor(p, w) {
4285
4300
  super(p, "reversetoggle");
4286
4301
  ee(this, "reverse");
4287
- this.reverse = E;
4302
+ this.reverse = w;
4288
4303
  }
4289
4304
  }
4290
4305
  class f extends i {
4291
4306
  constructor(p = {}) {
4292
4307
  super();
4293
- _t(this, y);
4294
- _t(this, w);
4295
- wt(this, w, p);
4308
+ St(this, y);
4309
+ St(this, _);
4310
+ xt(this, _, p);
4296
4311
  }
4297
4312
  onAddInt(p) {
4298
- const E = document.createElement("div");
4299
- E.className = "mapboxgl-ctrl-geocoder mapboxgl-ctrl maplibregl-ctrl-geocoder maplibregl-ctrl mapboxgl-ctrl-group";
4313
+ const w = document.createElement("div");
4314
+ w.className = "mapboxgl-ctrl-geocoder mapboxgl-ctrl maplibregl-ctrl-geocoder maplibregl-ctrl mapboxgl-ctrl-group";
4300
4315
  const {
4301
4316
  marker: S,
4302
4317
  showResultMarkers: M,
4303
- flyTo: k,
4304
- fullGeometryStyle: _,
4318
+ flyTo: C,
4319
+ fullGeometryStyle: E,
4305
4320
  ...L
4306
- } = Z(this, w), C = typeof k == "boolean" ? {} : k, G = {
4307
- mapController: Jr(
4321
+ } = Z(this, _), k = typeof C == "boolean" ? {} : C, G = {
4322
+ mapController: io(
4308
4323
  p,
4309
4324
  e,
4310
4325
  S,
4311
4326
  M,
4312
- C,
4313
- C,
4314
- _
4327
+ k,
4328
+ k,
4329
+ E
4315
4330
  ),
4316
- flyTo: k === void 0 ? !0 : !!k,
4331
+ flyTo: C === void 0 ? !0 : !!C,
4317
4332
  apiKey: "",
4318
4333
  // just to satisfy apiKey; TODO find a better solution
4319
- ...t == null ? void 0 : t(p, E),
4334
+ ...t == null ? void 0 : t(p, w),
4320
4335
  ...L
4321
4336
  };
4322
4337
  if (!G.apiKey)
4323
4338
  throw new Error("no apiKey provided");
4324
- return wt(this, y, new vr({ target: E, props: G })), Z(this, y).$on("select", (N) => {
4339
+ return xt(this, y, new wr({ target: w, props: G })), Z(this, y).$on("select", (N) => {
4325
4340
  this.fire(new r(this, N.detail));
4326
4341
  }), Z(this, y).$on("pick", (N) => {
4327
4342
  this.fire(new c(this, N.detail.feature));
4328
4343
  }), Z(this, y).$on("featureslisted", (N) => {
4329
- this.fire(new s(this, N.detail.features));
4344
+ this.fire(new o(this, N.detail.features));
4330
4345
  }), Z(this, y).$on("featuresmarked", (N) => {
4331
4346
  this.fire(new u(this, N.detail.features));
4332
4347
  }), Z(this, y).$on("response", (N) => {
@@ -4339,41 +4354,41 @@ function $r(i, e, t) {
4339
4354
  );
4340
4355
  }), Z(this, y).$on("optionsvisibilitychange", (N) => {
4341
4356
  this.fire(
4342
- new o(this, N.detail.optionsVisible)
4357
+ new s(this, N.detail.optionsVisible)
4343
4358
  );
4344
4359
  }), Z(this, y).$on("reversetoggle", (N) => {
4345
4360
  this.fire(new a(this, N.detail.reverse));
4346
4361
  }), Z(this, y).$on("querychange", (N) => {
4347
4362
  this.fire(new l(this, N.detail.query));
4348
- }), E;
4363
+ }), w;
4349
4364
  }
4350
- on(p, E) {
4351
- return super.on(p, E);
4365
+ on(p, w) {
4366
+ return super.on(p, w);
4352
4367
  }
4353
- once(p, E) {
4354
- return super.once(p, E);
4368
+ once(p, w) {
4369
+ return super.once(p, w);
4355
4370
  }
4356
- off(p, E) {
4357
- return super.off(p, E);
4371
+ off(p, w) {
4372
+ return super.off(p, w);
4358
4373
  }
4359
4374
  listens(p) {
4360
4375
  return super.listens(p);
4361
4376
  }
4362
4377
  setOptions(p) {
4363
4378
  var L;
4364
- Object.assign(Z(this, w), p);
4379
+ Object.assign(Z(this, _), p);
4365
4380
  const {
4366
- marker: E,
4381
+ marker: w,
4367
4382
  showResultMarkers: S,
4368
4383
  flyTo: M,
4369
- fullGeometryStyle: k,
4370
- ..._
4371
- } = Z(this, w);
4372
- (L = Z(this, y)) == null || L.$set(_);
4384
+ fullGeometryStyle: C,
4385
+ ...E
4386
+ } = Z(this, _);
4387
+ (L = Z(this, y)) == null || L.$set(E);
4373
4388
  }
4374
- setQuery(p, E = !0) {
4389
+ setQuery(p, w = !0) {
4375
4390
  var S;
4376
- (S = Z(this, y)) == null || S.setQuery(p, E);
4391
+ (S = Z(this, y)) == null || S.setQuery(p, w);
4377
4392
  }
4378
4393
  clearMap() {
4379
4394
  var p;
@@ -4384,8 +4399,8 @@ function $r(i, e, t) {
4384
4399
  (p = Z(this, y)) == null || p.clearList();
4385
4400
  }
4386
4401
  setReverseMode(p) {
4387
- var E;
4388
- (E = Z(this, y)) == null || E.$set({ reverseActive: p });
4402
+ var w;
4403
+ (w = Z(this, y)) == null || w.$set({ reverseActive: p });
4389
4404
  }
4390
4405
  focus() {
4391
4406
  var p;
@@ -4400,13 +4415,13 @@ function $r(i, e, t) {
4400
4415
  (p = Z(this, y)) == null || p.$destroy();
4401
4416
  }
4402
4417
  }
4403
- return y = new WeakMap(), w = new WeakMap(), {
4418
+ return y = new WeakMap(), _ = new WeakMap(), {
4404
4419
  MapLibreBasedGeocodingControl: f,
4405
4420
  events: {
4406
4421
  SelectEvent: r,
4407
- FeaturesListedEvent: s,
4422
+ FeaturesListedEvent: o,
4408
4423
  FeaturesMarkedEvent: u,
4409
- OptionsVisibilityChangeEvent: o,
4424
+ OptionsVisibilityChangeEvent: s,
4410
4425
  PickEvent: c,
4411
4426
  QueryChangeEvent: l,
4412
4427
  ResponseEvent: d,
@@ -4414,26 +4429,26 @@ function $r(i, e, t) {
4414
4429
  }
4415
4430
  };
4416
4431
  }
4417
- const { MapLibreBasedGeocodingControl: es, events: Me } = $r(
4418
- qt.Evented,
4419
- qt
4432
+ const { MapLibreBasedGeocodingControl: ro, events: ke } = no(
4433
+ Ht.Evented,
4434
+ Ht
4420
4435
  );
4421
- class ns extends es {
4436
+ class lo extends ro {
4422
4437
  onAdd(e) {
4423
4438
  return super.onAddInt(e);
4424
4439
  }
4425
4440
  }
4426
- const rs = Me.SelectEvent, ss = Me.FeaturesListedEvent, os = Me.FeaturesMarkedEvent, ls = Me.OptionsVisibilityChangeEvent, us = Me.PickEvent, as = Me.QueryChangeEvent, cs = Me.ResponseEvent, fs = Me.ReverseToggleEvent;
4441
+ const uo = ke.SelectEvent, ao = ke.FeaturesListedEvent, co = ke.FeaturesMarkedEvent, fo = ke.OptionsVisibilityChangeEvent, ho = ke.PickEvent, go = ke.QueryChangeEvent, mo = ke.ResponseEvent, vo = ke.ReverseToggleEvent;
4427
4442
  export {
4428
- ss as FeaturesListedEvent,
4429
- os as FeaturesMarkedEvent,
4430
- ns as GeocodingControl,
4431
- ls as OptionsVisibilityChangeEvent,
4432
- us as PickEvent,
4433
- as as QueryChangeEvent,
4434
- cs as ResponseEvent,
4435
- fs as ReverseToggleEvent,
4436
- rs as SelectEvent,
4437
- Jr as createMapLibreGlMapController
4443
+ ao as FeaturesListedEvent,
4444
+ co as FeaturesMarkedEvent,
4445
+ lo as GeocodingControl,
4446
+ fo as OptionsVisibilityChangeEvent,
4447
+ ho as PickEvent,
4448
+ go as QueryChangeEvent,
4449
+ mo as ResponseEvent,
4450
+ vo as ReverseToggleEvent,
4451
+ uo as SelectEvent,
4452
+ io as createMapLibreGlMapController
4438
4453
  };
4439
4454
  //# sourceMappingURL=maplibregl.js.map