@maptiler/geocoding-control 0.0.36 → 0.0.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/leaflet.js CHANGED
@@ -1,961 +1,2341 @@
1
- var Ve = (t, e, n) => {
2
- if (!e.has(t))
3
- throw TypeError("Cannot " + n);
1
+ var gt = (n, t, e) => {
2
+ if (!t.has(n))
3
+ throw TypeError("Cannot " + e);
4
4
  };
5
- var Z = (t, e, n) => (Ve(t, e, "read from private field"), n ? n.call(t) : e.get(t)), je = (t, e, n) => {
6
- if (e.has(t))
5
+ var J = (n, t, e) => (gt(n, t, "read from private field"), e ? e.call(n) : t.get(n)), He = (n, t, e) => {
6
+ if (t.has(n))
7
7
  throw TypeError("Cannot add the same private member more than once");
8
- e instanceof WeakSet ? e.add(t) : e.set(t, n);
9
- }, Te = (t, e, n, l) => (Ve(t, e, "write to private field"), l ? l.call(t, n) : e.set(t, n), n);
8
+ t instanceof WeakSet ? t.add(n) : t.set(n, e);
9
+ }, Be = (n, t, e, r) => (gt(n, t, "write to private field"), r ? r.call(n, e) : t.set(n, e), e);
10
10
  import * as se from "leaflet";
11
- function k() {
11
+ function T() {
12
12
  }
13
- function wt(t, e) {
14
- for (const n in e)
15
- t[n] = e[n];
16
- return t;
13
+ function ur(n, t) {
14
+ for (const e in t)
15
+ n[e] = t[e];
16
+ return n;
17
17
  }
18
- function $e(t) {
19
- return t();
18
+ function zt(n) {
19
+ return n();
20
20
  }
21
- function Ge() {
21
+ function vt() {
22
22
  return /* @__PURE__ */ Object.create(null);
23
23
  }
24
- function ne(t) {
25
- t.forEach($e);
24
+ function he(n) {
25
+ n.forEach(zt);
26
26
  }
27
- function et(t) {
28
- return typeof t == "function";
27
+ function Nt(n) {
28
+ return typeof n == "function";
29
29
  }
30
- function _e(t, e) {
31
- return t != t ? e == e : t !== e || t && typeof t == "object" || typeof t == "function";
30
+ function Se(n, t) {
31
+ return n != n ? t == t : n !== t || n && typeof n == "object" || typeof n == "function";
32
32
  }
33
- function vt(t) {
34
- return Object.keys(t).length === 0;
33
+ function fr(n) {
34
+ return Object.keys(n).length === 0;
35
35
  }
36
- function kt(t, e, n, l) {
37
- if (t) {
38
- const r = tt(t, e, n, l);
39
- return t[0](r);
36
+ function ar(n, t, e, r) {
37
+ if (n) {
38
+ const i = Bt(n, t, e, r);
39
+ return n[0](i);
40
40
  }
41
41
  }
42
- function tt(t, e, n, l) {
43
- return t[1] && l ? wt(n.ctx.slice(), t[1](l(e))) : n.ctx;
44
- }
45
- function Ct(t, e, n, l) {
46
- if (t[2] && l) {
47
- const r = t[2](l(n));
48
- if (e.dirty === void 0)
49
- return r;
50
- if (typeof r == "object") {
51
- const c = [], s = Math.max(e.dirty.length, r.length);
52
- for (let i = 0; i < s; i += 1)
53
- c[i] = e.dirty[i] | r[i];
54
- return c;
42
+ function Bt(n, t, e, r) {
43
+ return n[1] && r ? ur(e.ctx.slice(), n[1](r(t))) : e.ctx;
44
+ }
45
+ function cr(n, t, e, r) {
46
+ if (n[2] && r) {
47
+ const i = n[2](r(e));
48
+ if (t.dirty === void 0)
49
+ return i;
50
+ if (typeof i == "object") {
51
+ const o = [], l = Math.max(t.dirty.length, i.length);
52
+ for (let s = 0; s < l; s += 1)
53
+ o[s] = t.dirty[s] | i[s];
54
+ return o;
55
55
  }
56
- return e.dirty | r;
56
+ return t.dirty | i;
57
57
  }
58
- return e.dirty;
58
+ return t.dirty;
59
59
  }
60
- function Mt(t, e, n, l, r, c) {
61
- if (r) {
62
- const s = tt(e, n, l, c);
63
- t.p(s, r);
60
+ function hr(n, t, e, r, i, o) {
61
+ if (i) {
62
+ const l = Bt(t, e, r, o);
63
+ n.p(l, i);
64
64
  }
65
65
  }
66
- function Tt(t) {
67
- if (t.ctx.length > 32) {
68
- const e = [], n = t.ctx.length / 32;
69
- for (let l = 0; l < n; l++)
70
- e[l] = -1;
71
- return e;
66
+ function gr(n) {
67
+ if (n.ctx.length > 32) {
68
+ const t = [], e = n.ctx.length / 32;
69
+ for (let r = 0; r < e; r++)
70
+ t[r] = -1;
71
+ return t;
72
72
  }
73
73
  return -1;
74
74
  }
75
- function Ue(t) {
76
- return t == null ? "" : t;
75
+ function yt(n) {
76
+ return n == null ? "" : n;
77
77
  }
78
- function y(t, e) {
79
- t.appendChild(e);
78
+ function I(n, t) {
79
+ n.appendChild(t);
80
80
  }
81
- function V(t, e, n) {
82
- t.insertBefore(e, n || null);
81
+ function X(n, t, e) {
82
+ n.insertBefore(t, e || null);
83
83
  }
84
- function H(t) {
85
- t.parentNode.removeChild(t);
84
+ function Y(n) {
85
+ n.parentNode.removeChild(n);
86
86
  }
87
- function zt(t, e) {
88
- for (let n = 0; n < t.length; n += 1)
89
- t[n] && t[n].d(e);
87
+ function vr(n, t) {
88
+ for (let e = 0; e < n.length; e += 1)
89
+ n[e] && n[e].d(t);
90
90
  }
91
- function B(t) {
92
- return document.createElement(t);
91
+ function B(n) {
92
+ return document.createElement(n);
93
93
  }
94
- function te(t) {
95
- return document.createElementNS("http://www.w3.org/2000/svg", t);
94
+ function ae(n) {
95
+ return document.createElementNS("http://www.w3.org/2000/svg", n);
96
96
  }
97
- function fe(t) {
98
- return document.createTextNode(t);
97
+ function me(n) {
98
+ return document.createTextNode(n);
99
99
  }
100
- function x() {
101
- return fe(" ");
100
+ function ee() {
101
+ return me(" ");
102
102
  }
103
- function Q(t, e, n, l) {
104
- return t.addEventListener(e, n, l), () => t.removeEventListener(e, n, l);
103
+ function Z(n, t, e, r) {
104
+ return n.addEventListener(t, e, r), () => n.removeEventListener(t, e, r);
105
105
  }
106
- function Lt(t) {
107
- return function(e) {
108
- return e.preventDefault(), t.call(this, e);
106
+ function yr(n) {
107
+ return function(t) {
108
+ return t.preventDefault(), n.call(this, t);
109
109
  };
110
110
  }
111
- function f(t, e, n) {
112
- n == null ? t.removeAttribute(e) : t.getAttribute(e) !== n && t.setAttribute(e, n);
111
+ function y(n, t, e) {
112
+ e == null ? n.removeAttribute(t) : n.getAttribute(t) !== e && n.setAttribute(t, e);
113
113
  }
114
- function Et(t) {
115
- return Array.from(t.childNodes);
114
+ function dr(n) {
115
+ return Array.from(n.childNodes);
116
116
  }
117
- function ve(t, e) {
118
- e = "" + e, t.wholeText !== e && (t.data = e);
117
+ function Te(n, t) {
118
+ t = "" + t, n.wholeText !== t && (n.data = t);
119
119
  }
120
- function We(t, e) {
121
- t.value = e == null ? "" : e;
120
+ function dt(n, t) {
121
+ n.value = t == null ? "" : t;
122
122
  }
123
- function O(t, e, n) {
124
- t.classList[n ? "add" : "remove"](e);
123
+ function D(n, t, e) {
124
+ n.classList[e ? "add" : "remove"](t);
125
125
  }
126
- function Rt(t, e, { bubbles: n = !1, cancelable: l = !1 } = {}) {
127
- const r = document.createEvent("CustomEvent");
128
- return r.initCustomEvent(t, n, l, e), r;
126
+ function mr(n, t, { bubbles: e = !1, cancelable: r = !1 } = {}) {
127
+ const i = document.createEvent("CustomEvent");
128
+ return i.initCustomEvent(n, e, r, t), i;
129
129
  }
130
- let ke;
131
- function we(t) {
132
- ke = t;
130
+ let Ce;
131
+ function Le(n) {
132
+ Ce = n;
133
133
  }
134
- function nt() {
135
- if (!ke)
134
+ function Gt() {
135
+ if (!Ce)
136
136
  throw new Error("Function called outside component initialization");
137
- return ke;
138
- }
139
- function St(t) {
140
- nt().$$.on_destroy.push(t);
141
- }
142
- function It() {
143
- const t = nt();
144
- return (e, n, { cancelable: l = !1 } = {}) => {
145
- const r = t.$$.callbacks[e];
146
- if (r) {
147
- const c = Rt(e, n, { cancelable: l });
148
- return r.slice().forEach((s) => {
149
- s.call(t, c);
150
- }), !c.defaultPrevented;
137
+ return Ce;
138
+ }
139
+ function pr(n) {
140
+ Gt().$$.on_destroy.push(n);
141
+ }
142
+ function _r() {
143
+ const n = Gt();
144
+ return (t, e, { cancelable: r = !1 } = {}) => {
145
+ const i = n.$$.callbacks[t];
146
+ if (i) {
147
+ const o = mr(t, e, { cancelable: r });
148
+ return i.slice().forEach((l) => {
149
+ l.call(n, o);
150
+ }), !o.defaultPrevented;
151
151
  }
152
152
  return !0;
153
153
  };
154
154
  }
155
- const pe = [], De = [], Le = [], Ze = [], Pt = Promise.resolve();
156
- let Ne = !1;
157
- function Bt() {
158
- Ne || (Ne = !0, Pt.then(lt));
155
+ const Ie = [], Je = [], qe = [], mt = [], xr = Promise.resolve();
156
+ let $e = !1;
157
+ function br() {
158
+ $e || ($e = !0, xr.then(qt));
159
159
  }
160
- function qe(t) {
161
- Le.push(t);
160
+ function et(n) {
161
+ qe.push(n);
162
162
  }
163
- const Oe = /* @__PURE__ */ new Set();
164
- let ze = 0;
165
- function lt() {
166
- const t = ke;
163
+ const Ke = /* @__PURE__ */ new Set();
164
+ let Ge = 0;
165
+ function qt() {
166
+ const n = Ce;
167
167
  do {
168
- for (; ze < pe.length; ) {
169
- const e = pe[ze];
170
- ze++, we(e), At(e.$$);
171
- }
172
- for (we(null), pe.length = 0, ze = 0; De.length; )
173
- De.pop()();
174
- for (let e = 0; e < Le.length; e += 1) {
175
- const n = Le[e];
176
- Oe.has(n) || (Oe.add(n), n());
177
- }
178
- Le.length = 0;
179
- } while (pe.length);
180
- for (; Ze.length; )
181
- Ze.pop()();
182
- Ne = !1, Oe.clear(), we(t);
183
- }
184
- function At(t) {
185
- if (t.fragment !== null) {
186
- t.update(), ne(t.before_update);
187
- const e = t.dirty;
188
- t.dirty = [-1], t.fragment && t.fragment.p(t.ctx, e), t.after_update.forEach(qe);
189
- }
190
- }
191
- const Ee = /* @__PURE__ */ new Set();
192
- let ie;
193
- function Re() {
194
- ie = {
168
+ for (; Ge < Ie.length; ) {
169
+ const t = Ie[Ge];
170
+ Ge++, Le(t), wr(t.$$);
171
+ }
172
+ for (Le(null), Ie.length = 0, Ge = 0; Je.length; )
173
+ Je.pop()();
174
+ for (let t = 0; t < qe.length; t += 1) {
175
+ const e = qe[t];
176
+ Ke.has(e) || (Ke.add(e), e());
177
+ }
178
+ qe.length = 0;
179
+ } while (Ie.length);
180
+ for (; mt.length; )
181
+ mt.pop()();
182
+ $e = !1, Ke.clear(), Le(n);
183
+ }
184
+ function wr(n) {
185
+ if (n.fragment !== null) {
186
+ n.update(), he(n.before_update);
187
+ const t = n.dirty;
188
+ n.dirty = [-1], n.fragment && n.fragment.p(n.ctx, t), n.after_update.forEach(et);
189
+ }
190
+ }
191
+ const De = /* @__PURE__ */ new Set();
192
+ let ye;
193
+ function Fe() {
194
+ ye = {
195
195
  r: 0,
196
196
  c: [],
197
- p: ie
197
+ p: ye
198
198
  };
199
199
  }
200
- function Se() {
201
- ie.r || ne(ie.c), ie = ie.p;
200
+ function Qe() {
201
+ ye.r || he(ye.c), ye = ye.p;
202
202
  }
203
- function P(t, e) {
204
- t && t.i && (Ee.delete(t), t.i(e));
203
+ function N(n, t) {
204
+ n && n.i && (De.delete(n), n.i(t));
205
205
  }
206
- function q(t, e, n, l) {
207
- if (t && t.o) {
208
- if (Ee.has(t))
206
+ function V(n, t, e, r) {
207
+ if (n && n.o) {
208
+ if (De.has(n))
209
209
  return;
210
- Ee.add(t), ie.c.push(() => {
211
- Ee.delete(t), l && (n && t.d(1), l());
212
- }), t.o(e);
210
+ De.add(n), ye.c.push(() => {
211
+ De.delete(n), r && (e && n.d(1), r());
212
+ }), n.o(t);
213
213
  } else
214
- l && l();
214
+ r && r();
215
215
  }
216
- function Ce(t) {
217
- t && t.c();
216
+ function Ae(n) {
217
+ n && n.c();
218
218
  }
219
- function he(t, e, n, l) {
220
- const { fragment: r, after_update: c } = t.$$;
221
- r && r.m(e, n), l || qe(() => {
222
- const s = t.$$.on_mount.map($e).filter(et);
223
- t.$$.on_destroy ? t.$$.on_destroy.push(...s) : ne(s), t.$$.on_mount = [];
224
- }), c.forEach(qe);
219
+ function we(n, t, e, r) {
220
+ const { fragment: i, after_update: o } = n.$$;
221
+ i && i.m(t, e), r || et(() => {
222
+ const l = n.$$.on_mount.map(zt).filter(Nt);
223
+ n.$$.on_destroy ? n.$$.on_destroy.push(...l) : he(l), n.$$.on_mount = [];
224
+ }), o.forEach(et);
225
225
  }
226
- function me(t, e) {
227
- const n = t.$$;
228
- n.fragment !== null && (ne(n.on_destroy), n.fragment && n.fragment.d(e), n.on_destroy = n.fragment = null, n.ctx = []);
226
+ function Ee(n, t) {
227
+ const e = n.$$;
228
+ e.fragment !== null && (he(e.on_destroy), e.fragment && e.fragment.d(t), e.on_destroy = e.fragment = null, e.ctx = []);
229
229
  }
230
- function jt(t, e) {
231
- t.$$.dirty[0] === -1 && (pe.push(t), Bt(), t.$$.dirty.fill(0)), t.$$.dirty[e / 31 | 0] |= 1 << e % 31;
230
+ function Er(n, t) {
231
+ n.$$.dirty[0] === -1 && (Ie.push(n), br(), n.$$.dirty.fill(0)), n.$$.dirty[t / 31 | 0] |= 1 << t % 31;
232
232
  }
233
- function ge(t, e, n, l, r, c, s, i = [-1]) {
234
- const u = ke;
235
- we(t);
236
- const a = t.$$ = {
233
+ function ke(n, t, e, r, i, o, l, s = [-1]) {
234
+ const u = Ce;
235
+ Le(n);
236
+ const f = n.$$ = {
237
237
  fragment: null,
238
238
  ctx: [],
239
- props: c,
240
- update: k,
241
- not_equal: r,
242
- bound: Ge(),
239
+ props: o,
240
+ update: T,
241
+ not_equal: i,
242
+ bound: vt(),
243
243
  on_mount: [],
244
244
  on_destroy: [],
245
245
  on_disconnect: [],
246
246
  before_update: [],
247
247
  after_update: [],
248
- context: new Map(e.context || (u ? u.$$.context : [])),
249
- callbacks: Ge(),
250
- dirty: i,
248
+ context: new Map(t.context || (u ? u.$$.context : [])),
249
+ callbacks: vt(),
250
+ dirty: s,
251
251
  skip_bound: !1,
252
- root: e.target || u.$$.root
252
+ root: t.target || u.$$.root
253
253
  };
254
- s && s(a.root);
255
- let h = !1;
256
- if (a.ctx = n ? n(t, e.props || {}, (p, D, ...d) => {
257
- const g = d.length ? d[0] : D;
258
- return a.ctx && r(a.ctx[p], a.ctx[p] = g) && (!a.skip_bound && a.bound[p] && a.bound[p](g), h && jt(t, p)), D;
259
- }) : [], a.update(), h = !0, ne(a.before_update), a.fragment = l ? l(a.ctx) : !1, e.target) {
260
- if (e.hydrate) {
261
- const p = Et(e.target);
262
- a.fragment && a.fragment.l(p), p.forEach(H);
254
+ l && l(f.root);
255
+ let a = !1;
256
+ if (f.ctx = e ? e(n, t.props || {}, (v, m, ...d) => {
257
+ const w = d.length ? d[0] : m;
258
+ return f.ctx && i(f.ctx[v], f.ctx[v] = w) && (!f.skip_bound && f.bound[v] && f.bound[v](w), a && Er(n, v)), m;
259
+ }) : [], f.update(), a = !0, he(f.before_update), f.fragment = r ? r(f.ctx) : !1, t.target) {
260
+ if (t.hydrate) {
261
+ const v = dr(t.target);
262
+ f.fragment && f.fragment.l(v), v.forEach(Y);
263
263
  } else
264
- a.fragment && a.fragment.c();
265
- e.intro && P(t.$$.fragment), he(t, e.target, e.anchor, e.customElement), lt();
264
+ f.fragment && f.fragment.c();
265
+ t.intro && N(n.$$.fragment), we(n, t.target, t.anchor, t.customElement), qt();
266
266
  }
267
- we(u);
267
+ Le(u);
268
268
  }
269
- class ye {
269
+ class Pe {
270
270
  $destroy() {
271
- me(this, 1), this.$destroy = k;
272
- }
273
- $on(e, n) {
274
- if (!et(n))
275
- return k;
276
- const l = this.$$.callbacks[e] || (this.$$.callbacks[e] = []);
277
- return l.push(n), () => {
278
- const r = l.indexOf(n);
279
- r !== -1 && l.splice(r, 1);
271
+ Ee(this, 1), this.$destroy = T;
272
+ }
273
+ $on(t, e) {
274
+ if (!Nt(e))
275
+ return T;
276
+ const r = this.$$.callbacks[t] || (this.$$.callbacks[t] = []);
277
+ return r.push(e), () => {
278
+ const i = r.indexOf(e);
279
+ i !== -1 && r.splice(i, 1);
280
280
  };
281
281
  }
282
- $set(e) {
283
- this.$$set && !vt(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
282
+ $set(t) {
283
+ this.$$set && !fr(t) && (this.$$.skip_bound = !0, this.$$set(t), this.$$.skip_bound = !1);
284
284
  }
285
285
  }
286
- function Ot(t) {
287
- let e, n;
286
+ function Sr(n) {
287
+ let t, e;
288
288
  return {
289
289
  c() {
290
- e = te("svg"), n = te("path"), f(n, "d", "M500 115.1c212.2 0 384.9 172.6 384.9 384.9 0 212.2-172.7 384.9-384.9 384.9S115.1 712.2 115.1 500c0-212.4 172.5-384.9 384.9-384.9M500 10C229.4 10 10 229.4 10 500s219.4 490 490 490 490-219.4 490-490c-.2-270.6-219.5-490-490-490zm0 315c96.5 0 175 78.4 175 175 0 96.5-78.4 175-175 175-96.5 0-175-78.4-175-175 0-96.5 78.4-175 175-175m0-105c-154.7 0-279.9 125.4-279.9 279.9 0 154.7 125.4 279.9 279.9 279.9 154.5 0 279.9-125.4 279.9-279.9C779.9 345.3 654.5 220 500 220zm70 280c0 38.7-31.3 70-70 70s-70-31.3-70-70 31.3-70 70-70 70 31.3 70 70z"), f(e, "viewBox", "0 0 1000 1000"), f(e, "width", "18px"), f(e, "height", "18px"), f(e, "class", "svelte-en2qvf");
290
+ t = ae("svg"), e = ae("path"), y(e, "d", "M30.003-26.765C13.46-26.765 0-14.158 0 1.337c0 23.286 24.535 42.952 28.39 46.04.24.192.402.316.471.376.323.282.732.424 1.142.424.41 0 .82-.142 1.142-.424.068-.06.231-.183.471-.376 3.856-3.09 28.39-22.754 28.39-46.04 0-15.495-13.46-28.102-30.003-28.102Zm1.757 12.469c4.38 0 7.858 1.052 10.431 3.158 2.595 2.105 3.89 4.913 3.89 8.422 0 2.34-.53 4.362-1.593 6.063-1.063 1.702-3.086 3.616-6.063 5.742-2.042 1.51-3.337 2.659-3.89 3.446-.532.787-.8 1.82-.8 3.096v1.914h-8.449V15.18c0-2.041.434-3.815 1.306-5.325.872-1.51 2.467-3.118 4.785-4.82 2.233-1.594 3.7-2.89 4.402-3.889a5.582 5.582 0 0 0 1.087-3.35c0-1.382-.51-2.435-1.531-3.158-1.02-.723-2.45-1.087-4.28-1.087-3.19 0-6.826 1.047-10.91 3.131l-3.472-6.986c4.742-2.659 9.77-3.992 15.087-3.992Zm-1.88 37.324c1.765 0 3.124.472 4.08 1.408.98.936 1.47 2.276 1.47 4.02 0 1.68-.49 3.007-1.47 3.985-.977.957-2.336 1.435-4.08 1.435-1.787 0-3.171-.465-4.15-1.4-.978-.958-1.47-2.298-1.47-4.02 0-1.787.48-3.14 1.436-4.054.957-.915 2.355-1.374 4.184-1.374Z"), y(t, "viewBox", "0 0 60.006 21.412"), y(t, "width", "14"), y(t, "height", "20"), y(t, "class", "svelte-en2qvf");
291
291
  },
292
- m(l, r) {
293
- V(l, e, r), y(e, n);
292
+ m(r, i) {
293
+ X(r, t, i), I(t, e);
294
294
  },
295
- p: k,
296
- i: k,
297
- o: k,
298
- d(l) {
299
- l && H(e);
295
+ p: T,
296
+ i: T,
297
+ o: T,
298
+ d(r) {
299
+ r && Y(t);
300
300
  }
301
301
  };
302
302
  }
303
- class Dt extends ye {
304
- constructor(e) {
305
- super(), ge(this, e, null, Ot, _e, {});
303
+ class kr extends Pe {
304
+ constructor(t) {
305
+ super(), ke(this, t, null, Sr, Se, {});
306
306
  }
307
307
  }
308
- function Nt(t) {
309
- let e, n;
308
+ function Pr(n) {
309
+ let t, e;
310
310
  return {
311
311
  c() {
312
- e = te("svg"), n = te("path"), f(n, "d", "M3.8 2.5c-.6 0-1.3.7-1.3 1.3 0 .3.2.7.5.8L7.2 9 3 13.2c-.3.3-.5.7-.5 1 0 .6.7 1.3 1.3 1.3.3 0 .7-.2 1-.5L9 10.8l4.2 4.2c.2.3.7.3 1 .3.6 0 1.3-.7 1.3-1.3 0-.3-.2-.7-.3-1l-4.4-4L15 4.6c.3-.2.5-.5.5-.8 0-.7-.7-1.3-1.3-1.3-.3 0-.7.2-1 .3L9 7.1 4.8 2.8c-.3-.1-.7-.3-1-.3z"), f(e, "viewBox", "0 0 18 18"), f(e, "width", "16"), f(e, "height", "16"), f(e, "class", "svelte-en2qvf");
312
+ t = ae("svg"), e = ae("path"), y(e, "d", "M3.8 2.5c-.6 0-1.3.7-1.3 1.3 0 .3.2.7.5.8L7.2 9 3 13.2c-.3.3-.5.7-.5 1 0 .6.7 1.3 1.3 1.3.3 0 .7-.2 1-.5L9 10.8l4.2 4.2c.2.3.7.3 1 .3.6 0 1.3-.7 1.3-1.3 0-.3-.2-.7-.3-1l-4.4-4L15 4.6c.3-.2.5-.5.5-.8 0-.7-.7-1.3-1.3-1.3-.3 0-.7.2-1 .3L9 7.1 4.8 2.8c-.3-.1-.7-.3-1-.3z"), y(t, "viewBox", "0 0 18 18"), y(t, "width", "16"), y(t, "height", "16"), y(t, "class", "svelte-en2qvf");
313
313
  },
314
- m(l, r) {
315
- V(l, e, r), y(e, n);
314
+ m(r, i) {
315
+ X(r, t, i), I(t, e);
316
316
  },
317
- p: k,
318
- i: k,
319
- o: k,
320
- d(l) {
321
- l && H(e);
317
+ p: T,
318
+ i: T,
319
+ o: T,
320
+ d(r) {
321
+ r && Y(t);
322
322
  }
323
323
  };
324
324
  }
325
- class qt extends ye {
326
- constructor(e) {
327
- super(), ge(this, e, null, Nt, _e, {});
325
+ class Rr extends Pe {
326
+ constructor(t) {
327
+ super(), ke(this, t, null, Pr, Se, {});
328
328
  }
329
329
  }
330
- function Ht(t) {
331
- let e;
330
+ function Ir(n) {
331
+ let t;
332
332
  return {
333
333
  c() {
334
- e = B("div"), e.innerHTML = '<svg viewBox="0 0 18 18" width="24" height="24" class="svelte-7cmwmc"><path fill="#333" d="M4.4 4.4l.8.8c2.1-2.1 5.5-2.1 7.6 0l.8-.8c-2.5-2.5-6.7-2.5-9.2 0z"></path><path opacity=".1" d="M12.8 12.9c-2.1 2.1-5.5 2.1-7.6 0-2.1-2.1-2.1-5.5 0-7.7l-.8-.8c-2.5 2.5-2.5 6.7 0 9.2s6.6 2.5 9.2 0 2.5-6.6 0-9.2l-.8.8c2.2 2.1 2.2 5.6 0 7.7z"></path></svg>', f(e, "class", "svelte-7cmwmc");
334
+ t = B("div"), t.innerHTML = '<svg viewBox="0 0 18 18" width="24" height="24" class="svelte-7cmwmc"><path fill="#333" d="M4.4 4.4l.8.8c2.1-2.1 5.5-2.1 7.6 0l.8-.8c-2.5-2.5-6.7-2.5-9.2 0z"></path><path opacity=".1" d="M12.8 12.9c-2.1 2.1-5.5 2.1-7.6 0-2.1-2.1-2.1-5.5 0-7.7l-.8-.8c-2.5 2.5-2.5 6.7 0 9.2s6.6 2.5 9.2 0 2.5-6.6 0-9.2l-.8.8c2.2 2.1 2.2 5.6 0 7.7z"></path></svg>', y(t, "class", "svelte-7cmwmc");
335
335
  },
336
- m(n, l) {
337
- V(n, e, l);
336
+ m(e, r) {
337
+ X(e, t, r);
338
338
  },
339
- p: k,
340
- i: k,
341
- o: k,
342
- d(n) {
343
- n && H(e);
339
+ p: T,
340
+ i: T,
341
+ o: T,
342
+ d(e) {
343
+ e && Y(t);
344
344
  }
345
345
  };
346
346
  }
347
- class Kt extends ye {
348
- constructor(e) {
349
- super(), ge(this, e, null, Ht, _e, {});
347
+ class Lr extends Pe {
348
+ constructor(t) {
349
+ super(), ke(this, t, null, Ir, Se, {});
350
350
  }
351
351
  }
352
- function Qt(t) {
353
- let e, n, l;
352
+ function Or(n) {
353
+ let t, e, r;
354
354
  return {
355
355
  c() {
356
- e = te("svg"), n = te("path"), f(n, "stroke-width", "4"), f(n, "fill-rule", "evenodd"), f(n, "clip-rule", "evenodd"), f(n, "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"), f(n, "class", "svelte-656hh2"), f(e, "width", l = t[0] !== "list" ? void 0 : "20"), f(e, "viewBox", "0 0 70 85"), f(e, "fill", "none"), f(e, "class", "svelte-656hh2"), O(e, "in-map", t[0] !== "list"), O(e, "for-maplibre", t[0] === "maplibre"), O(e, "for-leaflet", t[0] === "leaflet"), O(e, "list-icon", t[0] === "list");
356
+ t = ae("svg"), e = ae("path"), y(e, "stroke-width", "4"), y(e, "fill-rule", "evenodd"), y(e, "clip-rule", "evenodd"), y(e, "d", "M 5,33.103579 C 5,17.607779 18.457,5 35,5 C 51.543,5 65,17.607779 65,33.103579 C 65,56.388679 40.4668,76.048179 36.6112,79.137779 C 36.3714,79.329879 36.2116,79.457979 36.1427,79.518879 C 35.8203,79.800879 35.4102,79.942779 35,79.942779 C 34.5899,79.942779 34.1797,79.800879 33.8575,79.518879 C 33.7886,79.457979 33.6289,79.330079 33.3893,79.138079 C 29.5346,76.049279 5,56.389379 5,33.103579 Z M 35.0001,49.386379 C 43.1917,49.386379 49.8323,42.646079 49.8323,34.331379 C 49.8323,26.016779 43.1917,19.276479 35.0001,19.276479 C 26.8085,19.276479 20.1679,26.016779 20.1679,34.331379 C 20.1679,42.646079 26.8085,49.386379 35.0001,49.386379 Z"), y(e, "class", "svelte-656hh2"), y(t, "width", r = n[0] !== "list" ? void 0 : "20"), y(t, "viewBox", "0 0 70 85"), y(t, "fill", "none"), y(t, "class", "svelte-656hh2"), D(t, "in-map", n[0] !== "list"), D(t, "for-maplibre", n[0] === "maplibre"), D(t, "for-leaflet", n[0] === "leaflet"), D(t, "list-icon", n[0] === "list");
357
357
  },
358
- m(r, c) {
359
- V(r, e, c), y(e, n);
358
+ m(i, o) {
359
+ X(i, t, o), I(t, e);
360
360
  },
361
- p(r, [c]) {
362
- c & 1 && l !== (l = r[0] !== "list" ? void 0 : "20") && f(e, "width", l), c & 1 && O(e, "in-map", r[0] !== "list"), c & 1 && O(e, "for-maplibre", r[0] === "maplibre"), c & 1 && O(e, "for-leaflet", r[0] === "leaflet"), c & 1 && O(e, "list-icon", r[0] === "list");
361
+ p(i, [o]) {
362
+ o & 1 && r !== (r = i[0] !== "list" ? void 0 : "20") && y(t, "width", r), o & 1 && D(t, "in-map", i[0] !== "list"), o & 1 && D(t, "for-maplibre", i[0] === "maplibre"), o & 1 && D(t, "for-leaflet", i[0] === "leaflet"), o & 1 && D(t, "list-icon", i[0] === "list");
363
363
  },
364
- i: k,
365
- o: k,
366
- d(r) {
367
- r && H(e);
364
+ i: T,
365
+ o: T,
366
+ d(i) {
367
+ i && Y(t);
368
368
  }
369
369
  };
370
370
  }
371
- function Vt(t, e, n) {
372
- let { displayIn: l } = e;
373
- return t.$$set = (r) => {
374
- "displayIn" in r && n(0, l = r.displayIn);
375
- }, [l];
371
+ function Mr(n, t, e) {
372
+ let { displayIn: r } = t;
373
+ return n.$$set = (i) => {
374
+ "displayIn" in i && e(0, r = i.displayIn);
375
+ }, [r];
376
376
  }
377
- class rt extends ye {
378
- constructor(e) {
379
- super(), ge(this, e, Vt, Qt, _e, { displayIn: 0 });
377
+ class Dt extends Pe {
378
+ constructor(t) {
379
+ super(), ke(this, t, Mr, Or, Se, { displayIn: 0 });
380
380
  }
381
381
  }
382
- function Gt(t) {
383
- let e, n;
382
+ function Tr(n) {
383
+ let t, e;
384
384
  return {
385
385
  c() {
386
- e = te("svg"), n = te("path"), f(n, "d", "M7.4 2.5c-2.7 0-4.9 2.2-4.9 4.9s2.2 4.9 4.9 4.9c1 0 1.8-.2 2.5-.8l3.7 3.7c.2.2.4.3.8.3.7 0 1.1-.4 1.1-1.1 0-.3-.1-.5-.3-.8L11.4 10c.4-.8.8-1.6.8-2.5.1-2.8-2.1-5-4.8-5zm0 1.6c1.8 0 3.2 1.4 3.2 3.2s-1.4 3.2-3.2 3.2-3.3-1.3-3.3-3.1 1.4-3.3 3.3-3.3z"), f(e, "viewBox", "0 0 18 18"), f(e, "xml:space", "preserve"), f(e, "width", "20"), f(e, "class", "svelte-en2qvf");
386
+ t = ae("svg"), e = ae("path"), y(e, "d", "M7.4 2.5c-2.7 0-4.9 2.2-4.9 4.9s2.2 4.9 4.9 4.9c1 0 1.8-.2 2.5-.8l3.7 3.7c.2.2.4.3.8.3.7 0 1.1-.4 1.1-1.1 0-.3-.1-.5-.3-.8L11.4 10c.4-.8.8-1.6.8-2.5.1-2.8-2.1-5-4.8-5zm0 1.6c1.8 0 3.2 1.4 3.2 3.2s-1.4 3.2-3.2 3.2-3.3-1.3-3.3-3.1 1.4-3.3 3.3-3.3z"), y(t, "viewBox", "0 0 18 18"), y(t, "xml:space", "preserve"), y(t, "width", "20"), y(t, "class", "svelte-en2qvf");
387
387
  },
388
- m(l, r) {
389
- V(l, e, r), y(e, n);
388
+ m(r, i) {
389
+ X(r, t, i), I(t, e);
390
390
  },
391
- p: k,
392
- i: k,
393
- o: k,
394
- d(l) {
395
- l && H(e);
391
+ p: T,
392
+ i: T,
393
+ o: T,
394
+ d(r) {
395
+ r && Y(t);
396
396
  }
397
397
  };
398
398
  }
399
- class Ut extends ye {
400
- constructor(e) {
401
- super(), ge(this, e, null, Gt, _e, {});
399
+ class Cr extends Pe {
400
+ constructor(t) {
401
+ super(), ke(this, t, null, Tr, Se, {});
402
402
  }
403
403
  }
404
- function xe(t, e, n) {
405
- const l = t.slice();
406
- return l[59] = e[n], l[61] = n, l;
404
+ function pt(n, t, e) {
405
+ const r = n.slice();
406
+ return r[63] = t[e], r[65] = e, r;
407
407
  }
408
- function Je(t) {
409
- let e, n;
410
- return e = new Kt({}), {
408
+ function _t(n) {
409
+ let t, e;
410
+ return t = new Lr({}), {
411
411
  c() {
412
- Ce(e.$$.fragment);
412
+ Ae(t.$$.fragment);
413
413
  },
414
- m(l, r) {
415
- he(e, l, r), n = !0;
414
+ m(r, i) {
415
+ we(t, r, i), e = !0;
416
416
  },
417
- i(l) {
418
- n || (P(e.$$.fragment, l), n = !0);
417
+ i(r) {
418
+ e || (N(t.$$.fragment, r), e = !0);
419
419
  },
420
- o(l) {
421
- q(e.$$.fragment, l), n = !1;
420
+ o(r) {
421
+ V(t.$$.fragment, r), e = !1;
422
422
  },
423
- d(l) {
424
- me(e, l);
423
+ d(r) {
424
+ Ee(t, r);
425
425
  }
426
426
  };
427
427
  }
428
- function Xe(t) {
429
- let e, n, l, r, c, s;
430
- return n = new Dt({}), {
428
+ function xt(n) {
429
+ let t, e, r, i, o;
430
+ return e = new kr({}), {
431
431
  c() {
432
- e = B("button"), Ce(n.$$.fragment), f(e, "type", "button"), f(e, "title", l = t[7] === !0 ? "toggle reverse geocoding" : t[7]), f(e, "class", "svelte-1h1zm6d"), O(e, "active", t[1]);
432
+ t = B("button"), Ae(e.$$.fragment), y(t, "type", "button"), y(t, "title", n[8]), y(t, "class", "svelte-1h1zm6d"), D(t, "active", n[1]);
433
433
  },
434
- m(i, u) {
435
- V(i, e, u), he(n, e, null), r = !0, c || (s = Q(e, "click", t[47]), c = !0);
434
+ m(l, s) {
435
+ X(l, t, s), we(e, t, null), r = !0, i || (o = Z(t, "click", n[50]), i = !0);
436
436
  },
437
- p(i, u) {
438
- (!r || u[0] & 128 && l !== (l = i[7] === !0 ? "toggle reverse geocoding" : i[7])) && f(e, "title", l), (!r || u[0] & 2) && O(e, "active", i[1]);
437
+ p(l, s) {
438
+ (!r || s[0] & 256) && y(t, "title", l[8]), (!r || s[0] & 2) && D(t, "active", l[1]);
439
439
  },
440
- i(i) {
441
- r || (P(n.$$.fragment, i), r = !0);
440
+ i(l) {
441
+ r || (N(e.$$.fragment, l), r = !0);
442
442
  },
443
- o(i) {
444
- q(n.$$.fragment, i), r = !1;
443
+ o(l) {
444
+ V(e.$$.fragment, l), r = !1;
445
445
  },
446
- d(i) {
447
- i && H(e), me(n), c = !1, s();
446
+ d(l) {
447
+ l && Y(t), Ee(e), i = !1, o();
448
448
  }
449
449
  };
450
450
  }
451
- function Wt(t) {
452
- let e, n, l, r, c = t[10], s = [];
453
- for (let u = 0; u < c.length; u += 1)
454
- s[u] = Fe(xe(t, c, u));
455
- const i = (u) => q(s[u], 1, 1, () => {
456
- s[u] = null;
451
+ function Ar(n) {
452
+ let t, e, r, i, o = n[12], l = [];
453
+ for (let u = 0; u < o.length; u += 1)
454
+ l[u] = wt(pt(n, o, u));
455
+ const s = (u) => V(l[u], 1, 1, () => {
456
+ l[u] = null;
457
457
  });
458
458
  return {
459
459
  c() {
460
- e = B("ul");
461
- for (let u = 0; u < s.length; u += 1)
462
- s[u].c();
463
- f(e, "class", "svelte-1h1zm6d");
464
- },
465
- m(u, a) {
466
- V(u, e, a);
467
- for (let h = 0; h < s.length; h += 1)
468
- s[h].m(e, null);
469
- n = !0, l || (r = [
470
- Q(e, "mouseout", t[50]),
471
- Q(e, "blur", t[51])
472
- ], l = !0);
473
- },
474
- p(u, a) {
475
- if (a[0] & 7425) {
476
- c = u[10];
477
- let h;
478
- for (h = 0; h < c.length; h += 1) {
479
- const p = xe(u, c, h);
480
- s[h] ? (s[h].p(p, a), P(s[h], 1)) : (s[h] = Fe(p), s[h].c(), P(s[h], 1), s[h].m(e, null));
460
+ t = B("ul");
461
+ for (let u = 0; u < l.length; u += 1)
462
+ l[u].c();
463
+ y(t, "class", "svelte-1h1zm6d");
464
+ },
465
+ m(u, f) {
466
+ X(u, t, f);
467
+ for (let a = 0; a < l.length; a += 1)
468
+ l[a].m(t, null);
469
+ e = !0, r || (i = [
470
+ Z(t, "mouseout", n[53]),
471
+ Z(t, "blur", n[54])
472
+ ], r = !0);
473
+ },
474
+ p(u, f) {
475
+ if (f[0] & 29697) {
476
+ o = u[12];
477
+ let a;
478
+ for (a = 0; a < o.length; a += 1) {
479
+ const v = pt(u, o, a);
480
+ l[a] ? (l[a].p(v, f), N(l[a], 1)) : (l[a] = wt(v), l[a].c(), N(l[a], 1), l[a].m(t, null));
481
481
  }
482
- for (Re(), h = c.length; h < s.length; h += 1)
483
- i(h);
484
- Se();
482
+ for (Fe(), a = o.length; a < l.length; a += 1)
483
+ s(a);
484
+ Qe();
485
485
  }
486
486
  },
487
487
  i(u) {
488
- if (!n) {
489
- for (let a = 0; a < c.length; a += 1)
490
- P(s[a]);
491
- n = !0;
488
+ if (!e) {
489
+ for (let f = 0; f < o.length; f += 1)
490
+ N(l[f]);
491
+ e = !0;
492
492
  }
493
493
  },
494
494
  o(u) {
495
- s = s.filter(Boolean);
496
- for (let a = 0; a < s.length; a += 1)
497
- q(s[a]);
498
- n = !1;
495
+ l = l.filter(Boolean);
496
+ for (let f = 0; f < l.length; f += 1)
497
+ V(l[f]);
498
+ e = !1;
499
499
  },
500
500
  d(u) {
501
- u && H(e), zt(s, u), l = !1, ne(r);
501
+ u && Y(t), vr(l, u), r = !1, he(i);
502
502
  }
503
503
  };
504
504
  }
505
- function Zt(t) {
506
- let e, n;
505
+ function zr(n) {
506
+ let t, e;
507
507
  return {
508
508
  c() {
509
- e = B("div"), n = fe(t[5]), f(e, "class", "no-results svelte-1h1zm6d");
509
+ t = B("div"), e = me(n[5]), y(t, "class", "no-results svelte-1h1zm6d");
510
510
  },
511
- m(l, r) {
512
- V(l, e, r), y(e, n);
511
+ m(r, i) {
512
+ X(r, t, i), I(t, e);
513
513
  },
514
- p(l, r) {
515
- r[0] & 32 && ve(n, l[5]);
514
+ p(r, i) {
515
+ i[0] & 32 && Te(e, r[5]);
516
516
  },
517
- i: k,
518
- o: k,
519
- d(l) {
520
- l && H(e);
517
+ i: T,
518
+ o: T,
519
+ d(r) {
520
+ r && Y(t);
521
521
  }
522
522
  };
523
523
  }
524
- function xt(t) {
525
- let e, n;
524
+ function Nr(n) {
525
+ let t, e;
526
526
  return {
527
527
  c() {
528
- e = B("div"), n = fe(t[4]), f(e, "class", "error svelte-1h1zm6d");
528
+ t = B("div"), e = me(n[4]), y(t, "class", "error svelte-1h1zm6d");
529
529
  },
530
- m(l, r) {
531
- V(l, e, r), y(e, n);
530
+ m(r, i) {
531
+ X(r, t, i), I(t, e);
532
532
  },
533
- p(l, r) {
534
- r[0] & 16 && ve(n, l[4]);
533
+ p(r, i) {
534
+ i[0] & 16 && Te(e, r[4]);
535
535
  },
536
- i: k,
537
- o: k,
538
- d(l) {
539
- l && H(e);
536
+ i: T,
537
+ o: T,
538
+ d(r) {
539
+ r && Y(t);
540
540
  }
541
541
  };
542
542
  }
543
- function Jt(t) {
544
- let e = "", n;
543
+ function Br(n) {
544
+ let t = "", e;
545
545
  return {
546
546
  c() {
547
- n = fe(e);
547
+ e = me(t);
548
548
  },
549
- m(l, r) {
550
- V(l, n, r);
549
+ m(r, i) {
550
+ X(r, e, i);
551
551
  },
552
- p: k,
553
- i: k,
554
- o: k,
555
- d(l) {
556
- l && H(n);
552
+ p: T,
553
+ i: T,
554
+ o: T,
555
+ d(r) {
556
+ r && Y(e);
557
557
  }
558
558
  };
559
559
  }
560
- function Ye(t) {
561
- let e, n = t[59].place_type + "", l;
560
+ function bt(n) {
561
+ let t, e = n[63].place_type + "", r;
562
562
  return {
563
563
  c() {
564
- e = B("span"), l = fe(n), f(e, "class", "svelte-1h1zm6d");
564
+ t = B("span"), r = me(e), y(t, "class", "svelte-1h1zm6d");
565
565
  },
566
- m(r, c) {
567
- V(r, e, c), y(e, l);
566
+ m(i, o) {
567
+ X(i, t, o), I(t, r);
568
568
  },
569
- p(r, c) {
570
- c[0] & 1024 && n !== (n = r[59].place_type + "") && ve(l, n);
569
+ p(i, o) {
570
+ o[0] & 4096 && e !== (e = i[63].place_type + "") && Te(r, e);
571
571
  },
572
- d(r) {
573
- r && H(e);
572
+ d(i) {
573
+ i && Y(t);
574
574
  }
575
575
  };
576
576
  }
577
- function Fe(t) {
578
- let e, n, l, r, c, s, i = t[59].place_name.replace(/,.*/, "") + "", u, a, h, p, D, d = t[59].place_name.replace(/[^,]*,?\s*/, "") + "", g, _, b, M, T, G;
579
- n = new rt({ props: { displayIn: "list" } });
580
- let z = t[8] && Ye(t);
581
- function L() {
582
- return t[48](t[61]);
577
+ function wt(n) {
578
+ let t, e, r, i, o, l, s = n[63].place_name.replace(/,.*/, "") + "", u, f, a, v, m, d = n[63].place_name.replace(/[^,]*,?\s*/, "") + "", w, h, g, x, E, S;
579
+ e = new Dt({ props: { displayIn: "list" } });
580
+ let _ = n[10] && bt(n);
581
+ function k() {
582
+ return n[51](n[65]);
583
583
  }
584
- function w() {
585
- return t[49](t[59]);
584
+ function b() {
585
+ return n[52](n[63]);
586
586
  }
587
587
  return {
588
588
  c() {
589
- e = B("li"), Ce(n.$$.fragment), l = x(), r = B("span"), c = B("span"), s = B("span"), u = fe(i), a = x(), z && z.c(), h = x(), p = B("span"), D = B("span"), g = fe(d), _ = x(), f(s, "class", "svelte-1h1zm6d"), f(c, "class", "svelte-1h1zm6d"), f(r, "class", "svelte-1h1zm6d"), f(D, "class", "svelte-1h1zm6d"), f(p, "class", "svelte-1h1zm6d"), f(e, "tabindex", "0"), f(e, "data-selected", b = t[12] === t[61]), f(e, "class", "svelte-1h1zm6d"), O(e, "selected", t[12] === t[61]);
589
+ t = B("li"), Ae(e.$$.fragment), r = ee(), i = B("span"), o = B("span"), l = B("span"), u = me(s), f = ee(), _ && _.c(), a = ee(), v = B("span"), m = B("span"), w = me(d), h = ee(), y(l, "class", "svelte-1h1zm6d"), y(o, "class", "svelte-1h1zm6d"), y(i, "class", "svelte-1h1zm6d"), y(m, "class", "svelte-1h1zm6d"), y(v, "class", "svelte-1h1zm6d"), y(t, "tabindex", "0"), y(t, "data-selected", g = n[14] === n[65]), y(t, "class", "svelte-1h1zm6d"), D(t, "selected", n[14] === n[65]);
590
590
  },
591
- m(j, C) {
592
- V(j, e, C), he(n, e, null), y(e, l), y(e, r), y(r, c), y(c, s), y(s, u), y(c, a), z && z.m(c, null), y(e, h), y(e, p), y(p, D), y(D, g), y(e, _), M = !0, T || (G = [
593
- Q(e, "mouseover", L),
594
- Q(e, "focus", w)
595
- ], T = !0);
591
+ m(P, R) {
592
+ X(P, t, R), we(e, t, null), I(t, r), I(t, i), I(i, o), I(o, l), I(l, u), I(o, f), _ && _.m(o, null), I(t, a), I(t, v), I(v, m), I(m, w), I(t, h), x = !0, E || (S = [
593
+ Z(t, "mouseover", k),
594
+ Z(t, "focus", b)
595
+ ], E = !0);
596
596
  },
597
- p(j, C) {
598
- t = j, (!M || C[0] & 1024) && i !== (i = t[59].place_name.replace(/,.*/, "") + "") && ve(u, i), t[8] ? z ? z.p(t, C) : (z = Ye(t), z.c(), z.m(c, null)) : z && (z.d(1), z = null), (!M || C[0] & 1024) && d !== (d = t[59].place_name.replace(/[^,]*,?\s*/, "") + "") && ve(g, d), (!M || C[0] & 4096 && b !== (b = t[12] === t[61])) && f(e, "data-selected", b), (!M || C[0] & 4096) && O(e, "selected", t[12] === t[61]);
597
+ p(P, R) {
598
+ n = P, (!x || R[0] & 4096) && s !== (s = n[63].place_name.replace(/,.*/, "") + "") && Te(u, s), n[10] ? _ ? _.p(n, R) : (_ = bt(n), _.c(), _.m(o, null)) : _ && (_.d(1), _ = null), (!x || R[0] & 4096) && d !== (d = n[63].place_name.replace(/[^,]*,?\s*/, "") + "") && Te(w, d), (!x || R[0] & 16384 && g !== (g = n[14] === n[65])) && y(t, "data-selected", g), (!x || R[0] & 16384) && D(t, "selected", n[14] === n[65]);
599
599
  },
600
- i(j) {
601
- M || (P(n.$$.fragment, j), M = !0);
600
+ i(P) {
601
+ x || (N(e.$$.fragment, P), x = !0);
602
602
  },
603
- o(j) {
604
- q(n.$$.fragment, j), M = !1;
603
+ o(P) {
604
+ V(e.$$.fragment, P), x = !1;
605
605
  },
606
- d(j) {
607
- j && H(e), me(n), z && z.d(), T = !1, ne(G);
606
+ d(P) {
607
+ P && Y(t), Ee(e), _ && _.d(), E = !1, he(S);
608
608
  }
609
609
  };
610
610
  }
611
- function Xt(t) {
612
- let e, n, l, r, c, s, i, u, a, h, p, D, d, g, _, b, M, T, G, z;
613
- r = new Ut({}), h = new qt({});
614
- let L = t[16] && Je(), w = t[7] && Xe(t);
615
- const j = t[39].default, C = kt(j, t, t[38], null), R = [Jt, xt, Zt, Wt], A = [];
616
- function be(m, S) {
617
- var J, X;
618
- return m[13] ? m[15] ? 1 : ((J = m[10]) == null ? void 0 : J.length) === 0 ? 2 : m[13] && ((X = m[10]) == null ? void 0 : X.length) ? 3 : -1 : 0;
611
+ function Gr(n) {
612
+ let t, e, r, i, o, l, s, u, f, a, v, m, d, w, h, g, x, E, S, _;
613
+ i = new Cr({}), a = new Rr({});
614
+ let k = n[18] && _t(), b = n[7] === !0 && xt(n);
615
+ const P = n[42].default, R = ar(P, n, n[41], null), G = [Br, Nr, zr, Ar], A = [];
616
+ function L(p, O) {
617
+ var q, re;
618
+ return p[15] ? p[17] ? 1 : ((q = p[12]) == null ? void 0 : q.length) === 0 ? 2 : p[15] && ((re = p[12]) == null ? void 0 : re.length) ? 3 : -1 : 0;
619
619
  }
620
- return ~(_ = be(t)) && (b = A[_] = R[_](t)), {
620
+ return ~(h = L(n)) && (g = A[h] = G[h](n)), {
621
621
  c() {
622
- e = B("form"), n = B("div"), l = B("button"), Ce(r.$$.fragment), c = x(), s = B("input"), i = x(), u = B("div"), a = B("button"), Ce(h.$$.fragment), p = x(), L && L.c(), D = x(), w && w.c(), d = x(), C && C.c(), g = x(), b && b.c(), f(l, "type", "button"), f(l, "class", "svelte-1h1zm6d"), f(s, "placeholder", t[3]), f(s, "aria-label", t[3]), f(s, "class", "svelte-1h1zm6d"), f(a, "type", "button"), f(a, "class", "svelte-1h1zm6d"), O(a, "displayable", t[0] !== ""), f(u, "class", "clear-button-container svelte-1h1zm6d"), f(n, "class", "input-group svelte-1h1zm6d"), f(e, "tabindex", "0"), f(e, "class", M = Ue(t[2]) + " svelte-1h1zm6d"), O(e, "can-collapse", t[6] && t[0] === "");
623
- },
624
- m(m, S) {
625
- V(m, e, S), y(e, n), y(n, l), he(r, l, null), y(n, c), y(n, s), t[41](s), We(s, t[0]), y(n, i), y(n, u), y(u, a), he(h, a, null), y(u, p), L && L.m(u, null), y(n, D), w && w.m(n, null), y(n, d), C && C.m(n, null), y(e, g), ~_ && A[_].m(e, null), T = !0, G || (z = [
626
- Q(l, "click", t[40]),
627
- Q(s, "input", t[42]),
628
- Q(s, "focus", t[43]),
629
- Q(s, "blur", t[44]),
630
- Q(s, "keydown", t[18]),
631
- Q(s, "input", t[45]),
632
- Q(a, "click", t[46]),
633
- Q(e, "submit", Lt(t[17]))
634
- ], G = !0);
635
- },
636
- p(m, S) {
637
- (!T || S[0] & 8) && f(s, "placeholder", m[3]), (!T || S[0] & 8) && f(s, "aria-label", m[3]), S[0] & 1 && s.value !== m[0] && We(s, m[0]), (!T || S[0] & 1) && O(a, "displayable", m[0] !== ""), m[16] ? L ? S[0] & 65536 && P(L, 1) : (L = Je(), L.c(), P(L, 1), L.m(u, null)) : L && (Re(), q(L, 1, 1, () => {
638
- L = null;
639
- }), Se()), m[7] ? w ? (w.p(m, S), S[0] & 128 && P(w, 1)) : (w = Xe(m), w.c(), P(w, 1), w.m(n, d)) : w && (Re(), q(w, 1, 1, () => {
640
- w = null;
641
- }), Se()), C && C.p && (!T || S[1] & 128) && Mt(
642
- C,
643
- j,
644
- m,
645
- m[38],
646
- T ? Ct(j, m[38], S, null) : Tt(m[38]),
622
+ t = B("form"), e = B("div"), r = B("button"), Ae(i.$$.fragment), o = ee(), l = B("input"), s = ee(), u = B("div"), f = B("button"), Ae(a.$$.fragment), v = ee(), k && k.c(), m = ee(), b && b.c(), d = ee(), R && R.c(), w = ee(), g && g.c(), y(r, "type", "button"), y(r, "class", "svelte-1h1zm6d"), y(l, "placeholder", n[3]), y(l, "aria-label", n[3]), y(l, "class", "svelte-1h1zm6d"), y(f, "type", "button"), y(f, "title", n[9]), y(f, "class", "svelte-1h1zm6d"), D(f, "displayable", n[0] !== ""), y(u, "class", "clear-button-container svelte-1h1zm6d"), y(e, "class", "input-group svelte-1h1zm6d"), y(t, "tabindex", "0"), y(t, "class", x = yt(n[2]) + " svelte-1h1zm6d"), D(t, "can-collapse", n[6] && n[0] === "");
623
+ },
624
+ m(p, O) {
625
+ X(p, t, O), I(t, e), I(e, r), we(i, r, null), I(e, o), I(e, l), n[44](l), dt(l, n[0]), I(e, s), I(e, u), I(u, f), we(a, f, null), I(u, v), k && k.m(u, null), I(e, m), b && b.m(e, null), I(e, d), R && R.m(e, null), I(t, w), ~h && A[h].m(t, null), E = !0, S || (_ = [
626
+ Z(r, "click", n[43]),
627
+ Z(l, "input", n[45]),
628
+ Z(l, "focus", n[46]),
629
+ Z(l, "blur", n[47]),
630
+ Z(l, "keydown", n[20]),
631
+ Z(l, "input", n[48]),
632
+ Z(f, "click", n[49]),
633
+ Z(t, "submit", yr(n[19]))
634
+ ], S = !0);
635
+ },
636
+ p(p, O) {
637
+ (!E || O[0] & 8) && y(l, "placeholder", p[3]), (!E || O[0] & 8) && y(l, "aria-label", p[3]), O[0] & 1 && l.value !== p[0] && dt(l, p[0]), (!E || O[0] & 512) && y(f, "title", p[9]), (!E || O[0] & 1) && D(f, "displayable", p[0] !== ""), p[18] ? k ? O[0] & 262144 && N(k, 1) : (k = _t(), k.c(), N(k, 1), k.m(u, null)) : k && (Fe(), V(k, 1, 1, () => {
638
+ k = null;
639
+ }), Qe()), p[7] === !0 ? b ? (b.p(p, O), O[0] & 128 && N(b, 1)) : (b = xt(p), b.c(), N(b, 1), b.m(e, d)) : b && (Fe(), V(b, 1, 1, () => {
640
+ b = null;
641
+ }), Qe()), R && R.p && (!E || O[1] & 1024) && hr(
642
+ R,
643
+ P,
644
+ p,
645
+ p[41],
646
+ E ? cr(P, p[41], O, null) : gr(p[41]),
647
647
  null
648
648
  );
649
- let J = _;
650
- _ = be(m), _ === J ? ~_ && A[_].p(m, S) : (b && (Re(), q(A[J], 1, 1, () => {
651
- A[J] = null;
652
- }), Se()), ~_ ? (b = A[_], b ? b.p(m, S) : (b = A[_] = R[_](m), b.c()), P(b, 1), b.m(e, null)) : b = null), (!T || S[0] & 4 && M !== (M = Ue(m[2]) + " svelte-1h1zm6d")) && f(e, "class", M), (!T || S[0] & 69) && O(e, "can-collapse", m[6] && m[0] === "");
649
+ let q = h;
650
+ h = L(p), h === q ? ~h && A[h].p(p, O) : (g && (Fe(), V(A[q], 1, 1, () => {
651
+ A[q] = null;
652
+ }), Qe()), ~h ? (g = A[h], g ? g.p(p, O) : (g = A[h] = G[h](p), g.c()), N(g, 1), g.m(t, null)) : g = null), (!E || O[0] & 4 && x !== (x = yt(p[2]) + " svelte-1h1zm6d")) && y(t, "class", x), (!E || O[0] & 69) && D(t, "can-collapse", p[6] && p[0] === "");
653
653
  },
654
- i(m) {
655
- T || (P(r.$$.fragment, m), P(h.$$.fragment, m), P(L), P(w), P(C, m), P(b), T = !0);
654
+ i(p) {
655
+ E || (N(i.$$.fragment, p), N(a.$$.fragment, p), N(k), N(b), N(R, p), N(g), E = !0);
656
656
  },
657
- o(m) {
658
- q(r.$$.fragment, m), q(h.$$.fragment, m), q(L), q(w), q(C, m), q(b), T = !1;
657
+ o(p) {
658
+ V(i.$$.fragment, p), V(a.$$.fragment, p), V(k), V(b), V(R, p), V(g), E = !1;
659
659
  },
660
- d(m) {
661
- m && H(e), me(r), t[41](null), me(h), L && L.d(), w && w.d(), C && C.d(m), ~_ && A[_].d(), G = !1, ne(z);
660
+ d(p) {
661
+ p && Y(t), Ee(i), n[44](null), Ee(a), k && k.d(), b && b.d(), R && R.d(p), ~h && A[h].d(), S = !1, he(_);
662
662
  }
663
663
  };
664
664
  }
665
- function Yt(t, e, n) {
666
- let l, { $$slots: r = {}, $$scope: c } = e, { class: s = void 0 } = e, { mapController: i = void 0 } = e, { apiKey: u } = e, { debounceSearch: a = 200 } = e, { placeholder: h = "Search" } = e, { errorMessage: p = "Searching failed" } = e, { noResultsMessage: D = "No results found" } = e, { proximity: d = void 0 } = e, { bbox: g = void 0 } = e, { trackProximity: _ = !0 } = e, { minLength: b = 2 } = e, { language: M = void 0 } = e, { showResultsWhileTyping: T = !0 } = e, { zoom: G = 16 } = e, { flyTo: z = !0 } = e, { collapsed: L = !1 } = e, { clearOnBlur: w = !1 } = e, { enableReverse: j = !1 } = e, { filter: C = () => !0 } = e, { searchValue: R = "" } = e, { reverseActive: A = !1 } = e, { showPlaceType: be = !1 } = e;
667
- function m() {
668
- W.focus();
665
+ function qr(n, t, e) {
666
+ let r, { $$slots: i = {}, $$scope: o } = t, { class: l = void 0 } = t, { mapController: s = void 0 } = t, { apiKey: u } = t, { debounceSearch: f = 200 } = t, { placeholder: a = "Search" } = t, { errorMessage: v = "Searching failed" } = t, { noResultsMessage: m = "No results found" } = t, { proximity: d = void 0 } = t, { bbox: w = void 0 } = t, { trackProximity: h = !0 } = t, { minLength: g = 2 } = t, { language: x = void 0 } = t, { showResultsWhileTyping: E = !0 } = t, { zoom: S = 16 } = t, { flyTo: _ = !0 } = t, { collapsed: k = !1 } = t, { clearOnBlur: b = !1 } = t, { enableReverse: P = !1 } = t, { reverseButtonTitle: R = "toggle reverse geocoding" } = t, { clearButtonTitle: G = "clear" } = t, { filter: A = () => !0 } = t, { searchValue: L = "" } = t, { reverseActive: p = P === "always" } = t, { showPlaceType: O = !1 } = t, { showFullGeometry: q = !0 } = t;
667
+ function re() {
668
+ j.focus();
669
669
  }
670
- function S() {
671
- W.blur();
670
+ function Zt() {
671
+ j.blur();
672
672
  }
673
- function J(o, K = !0) {
674
- n(0, R = o), K ? (n(12, I = -1), Ke()) : (Ae(), setTimeout(() => {
675
- W.focus(), W.select();
673
+ function ut(c, F = !0) {
674
+ e(0, L = c), F ? (e(14, z = -1), at()) : (We(), setTimeout(() => {
675
+ j.focus(), j.select();
676
676
  }));
677
677
  }
678
- let X = !1, E, N, v, He = "", W, I = -1, Y, Me = [], le, Ie, Pe;
679
- const F = It();
680
- St(() => {
681
- i && (i.setProximityChangeHandler(void 0), i.setMapClickHandler(void 0), i.indicateReverse(!1), i.setSelectedMarker(-1), i.setMarkers(void 0, void 0));
678
+ let pe = !1, C, U, M, ft = "", j, z = -1, ne, Ne = [], ge, Ye, Ze;
679
+ const ie = _r();
680
+ pr(() => {
681
+ s && (s.setProximityChangeHandler(void 0), s.setMapClickHandler(void 0), s.indicateReverse(!1), s.setSelectedMarker(-1), s.setMarkers(void 0, void 0));
682
682
  });
683
- function Ke() {
684
- I > -1 && E ? (n(11, v = E[I]), n(0, R = v.place_name.replace(/,.*/, "")), n(15, Y = void 0), n(36, N = void 0), n(12, I = -1)) : R && Be(R).then(() => {
685
- n(36, N = E), n(11, v = void 0), ot();
686
- }).catch((o) => n(15, Y = o));
687
- }
688
- async function Be(o, K = !1) {
689
- n(15, Y = void 0);
690
- const re = /^-?\d+(\.\d+)?,-?\d+(\.\d+)?$/.test(o), $ = new URLSearchParams();
691
- $.set("key", u), M && $.set("language", String(M)), re || (g && $.set("bbox", g.join(",")), d && $.set("proximity", d.join(",")));
692
- const oe = "https://api.maptiler.com/geocoding/" + encodeURIComponent(o) + ".json?" + $.toString();
693
- if (oe === He) {
694
- K ? (n(10, E = void 0), n(11, v = Me[0])) : n(10, E = Me);
683
+ function at(c) {
684
+ if (z > -1 && C)
685
+ e(13, M = C[z]), e(0, L = M.place_name.replace(/,.*/, "")), e(17, ne = void 0), e(39, U = void 0), e(14, z = -1);
686
+ else if (L) {
687
+ const F = c || !ct();
688
+ Xe(L).then(() => {
689
+ e(39, U = C), e(13, M = void 0), F && Xt();
690
+ }).catch((te) => e(17, ne = te));
691
+ }
692
+ }
693
+ function ct() {
694
+ return /^-?\d+(\.\d+)?,-?\d+(\.\d+)?$/.test(L);
695
+ }
696
+ async function Xe(c, F = !1) {
697
+ e(17, ne = void 0);
698
+ const te = ct(), oe = new URLSearchParams();
699
+ oe.set("key", u), x && oe.set("language", String(x)), te || (w && oe.set("bbox", w.join(",")), d && oe.set("proximity", d.join(",")));
700
+ const ve = "https://api.maptiler.com/geocoding/" + encodeURIComponent(c) + ".json?" + oe.toString();
701
+ if (ve === ft) {
702
+ F ? (e(12, C = void 0), e(13, M = Ne[0])) : e(12, C = Ne);
695
703
  return;
696
704
  }
697
- He = oe, le == null || le.abort(), n(16, le = new AbortController());
698
- let ue;
705
+ ft = ve, ge == null || ge.abort(), e(18, ge = new AbortController());
706
+ let _e;
699
707
  try {
700
- ue = await fetch(oe, { signal: le.signal }).finally(() => {
701
- n(16, le = void 0);
708
+ _e = await fetch(ve, { signal: ge.signal }).finally(() => {
709
+ e(18, ge = void 0);
702
710
  });
703
- } catch (de) {
704
- if (de && typeof de == "object" && de.name === "AbortError")
711
+ } catch (be) {
712
+ if (be && typeof be == "object" && be.name === "AbortError")
705
713
  return;
706
714
  throw new Error();
707
715
  }
708
- if (!ue.ok)
716
+ if (!_e.ok)
709
717
  throw new Error();
710
- const ae = await ue.json();
711
- F("response", { url: oe, featureCollection: ae }), K ? (n(10, E = void 0), n(11, v = ae.features[0]), Me = [v]) : (n(10, E = ae.features.filter(C)), Me = E, re && W.focus());
718
+ const xe = await _e.json();
719
+ ie("response", { url: ve, featureCollection: xe }), F ? (e(12, C = void 0), e(13, M = xe.features[0]), Ne = [M]) : (e(12, C = xe.features.filter(A)), Ne = C, te && j.focus());
712
720
  }
713
- function ot() {
714
- var K, re, $, oe, ue, ae, de, Qe;
715
- if (!(N != null && N.length) || !z)
721
+ function Xt() {
722
+ var F, te, oe, ve, _e, xe, be, ht;
723
+ if (!(U != null && U.length) || !_)
716
724
  return;
717
- const o = [180, 90, -180, -90];
718
- for (const ee of N)
719
- o[0] = Math.min(o[0], (re = (K = ee.bbox) == null ? void 0 : K[0]) != null ? re : ee.center[0]), o[1] = Math.min(o[1], (oe = ($ = ee.bbox) == null ? void 0 : $[1]) != null ? oe : ee.center[1]), o[2] = Math.max(o[2], (ae = (ue = ee.bbox) == null ? void 0 : ue[2]) != null ? ae : ee.center[0]), o[3] = Math.max(o[3], (Qe = (de = ee.bbox) == null ? void 0 : de[3]) != null ? Qe : ee.center[1]);
720
- i && N.length > 0 && (v && o[0] === o[2] && o[1] === o[3] ? i.flyTo(v.center, G) : i.fitBounds(o, 50));
725
+ const c = [180, 90, -180, -90];
726
+ for (const le of U)
727
+ c[0] = Math.min(c[0], (te = (F = le.bbox) == null ? void 0 : F[0]) != null ? te : le.center[0]), c[1] = Math.min(c[1], (ve = (oe = le.bbox) == null ? void 0 : oe[1]) != null ? ve : le.center[1]), c[2] = Math.max(c[2], (xe = (_e = le.bbox) == null ? void 0 : _e[2]) != null ? xe : le.center[0]), c[3] = Math.max(c[3], (ht = (be = le.bbox) == null ? void 0 : be[3]) != null ? ht : le.center[1]);
728
+ s && U.length > 0 && (M && c[0] === c[2] && c[1] === c[3] ? s.flyTo(M.center, S) : s.fitBounds(c, 50));
721
729
  }
722
- function st(o) {
723
- n(1, A = !1), J(o[0].toFixed(6) + "," + o[1].toFixed(6));
730
+ function Wt(c) {
731
+ e(1, p = P === "always"), ut(c[0].toFixed(6) + "," + c[1].toFixed(6));
724
732
  }
725
- function it(o) {
726
- if (!E)
733
+ function Ht(c) {
734
+ if (!C)
727
735
  return;
728
- let K = o.key === "ArrowDown" ? 1 : o.key === "ArrowUp" ? -1 : 0;
729
- K ? (I === -1 && K === -1 && n(12, I = E.length), n(12, I += K), I >= E.length && n(12, I = -1), o.preventDefault()) : ["ArrowLeft", "ArrowRight", "Home", "End"].includes(o.key) && n(12, I = -1);
730
- }
731
- function Ae(o = !0) {
732
- if (T && R.length > b) {
733
- Ie && clearTimeout(Ie);
734
- const K = R;
735
- Ie = window.setTimeout(
736
+ let F = c.key === "ArrowDown" ? 1 : c.key === "ArrowUp" ? -1 : 0;
737
+ F ? (z === -1 && F === -1 && e(14, z = C.length), e(14, z += F), z >= C.length && e(14, z = -1), c.preventDefault()) : ["ArrowLeft", "ArrowRight", "Home", "End"].includes(c.key) && e(14, z = -1);
738
+ }
739
+ function We(c = !0) {
740
+ if (E && L.length > g) {
741
+ Ye && clearTimeout(Ye);
742
+ const F = L;
743
+ Ye = window.setTimeout(
736
744
  () => {
737
- Be(K).catch((re) => n(15, Y = re));
745
+ Xe(F).catch((te) => e(17, ne = te));
738
746
  },
739
- o ? a : 0
747
+ c ? f : 0
740
748
  );
741
749
  } else
742
- n(10, E = void 0), n(15, Y = void 0);
750
+ e(12, C = void 0), e(17, ne = void 0);
743
751
  }
744
- const ct = () => W.focus();
745
- function ft(o) {
746
- De[o ? "unshift" : "push"](() => {
747
- W = o, n(14, W);
752
+ const Kt = () => j.focus();
753
+ function jt(c) {
754
+ Je[c ? "unshift" : "push"](() => {
755
+ j = c, e(16, j);
748
756
  });
749
757
  }
750
- function ut() {
751
- R = this.value, n(0, R), n(9, X), n(31, w);
758
+ function Jt() {
759
+ L = this.value, e(0, L), e(11, pe), e(33, b);
752
760
  }
753
- const at = () => n(9, X = !0), dt = () => n(9, X = !1), ht = () => Ae(), mt = () => {
754
- n(0, R = ""), W.focus();
755
- }, _t = () => n(1, A = !A), gt = (o) => n(12, I = o), yt = (o) => {
756
- n(11, v = o), n(0, R = o.place_name.replace(/,.*/, "")), n(12, I = -1);
757
- }, bt = () => n(12, I = -1), pt = () => {
761
+ const $t = () => e(11, pe = !0), er = () => e(11, pe = !1), tr = () => We(), rr = () => {
762
+ e(0, L = ""), j.focus();
763
+ }, nr = () => e(1, p = !p), ir = (c) => e(14, z = c), or = (c) => {
764
+ e(13, M = c), e(0, L = c.place_name.replace(/,.*/, "")), e(14, z = -1);
765
+ }, lr = () => e(14, z = -1), sr = () => {
758
766
  };
759
- return t.$$set = (o) => {
760
- "class" in o && n(2, s = o.class), "mapController" in o && n(21, i = o.mapController), "apiKey" in o && n(22, u = o.apiKey), "debounceSearch" in o && n(23, a = o.debounceSearch), "placeholder" in o && n(3, h = o.placeholder), "errorMessage" in o && n(4, p = o.errorMessage), "noResultsMessage" in o && n(5, D = o.noResultsMessage), "proximity" in o && n(20, d = o.proximity), "bbox" in o && n(24, g = o.bbox), "trackProximity" in o && n(25, _ = o.trackProximity), "minLength" in o && n(26, b = o.minLength), "language" in o && n(27, M = o.language), "showResultsWhileTyping" in o && n(28, T = o.showResultsWhileTyping), "zoom" in o && n(29, G = o.zoom), "flyTo" in o && n(30, z = o.flyTo), "collapsed" in o && n(6, L = o.collapsed), "clearOnBlur" in o && n(31, w = o.clearOnBlur), "enableReverse" in o && n(7, j = o.enableReverse), "filter" in o && n(32, C = o.filter), "searchValue" in o && n(0, R = o.searchValue), "reverseActive" in o && n(1, A = o.reverseActive), "showPlaceType" in o && n(8, be = o.showPlaceType), "$$scope" in o && n(38, c = o.$$scope);
761
- }, t.$$.update = () => {
762
- t.$$.dirty[0] & 35651584 && i && i.setProximityChangeHandler(_ ? (o) => {
763
- n(20, d = o);
764
- } : void 0), t.$$.dirty[0] & 33554432 && (_ || n(20, d = void 0)), t.$$.dirty[0] & 512 | t.$$.dirty[1] & 1 && setTimeout(() => {
765
- n(13, Pe = X), w && !X && n(0, R = "");
766
- }), t.$$.dirty[0] & 1025 && (R || (n(11, v = void 0), n(10, E = void 0), n(15, Y = void 0), n(36, N = E))), t.$$.dirty[0] & 2048 && v && !v.address && v.geometry.type === "Point" && Be(v.id, !0).catch((o) => n(15, Y = o)), t.$$.dirty[0] & 1612711936 && i && v && z && (!v.bbox || v.bbox[0] === v.bbox[2] && v.bbox[1] === v.bbox[3] ? i.flyTo(v.center, G) : i.fitBounds(v.bbox, 50), n(10, E = void 0), n(36, N = void 0), n(12, I = -1)), t.$$.dirty[0] & 1024 | t.$$.dirty[1] & 32 && N !== E && n(36, N = void 0), t.$$.dirty[0] & 2099200 | t.$$.dirty[1] & 32 && i && i.setMarkers(N, v), t.$$.dirty[0] & 1 && n(12, I = -1), t.$$.dirty[0] & 2101248 && (i == null || i.setSelectedMarker(I)), t.$$.dirty[0] & 5120 && n(37, l = E == null ? void 0 : E[I]), t.$$.dirty[1] & 64 && F("select", l), t.$$.dirty[0] & 2048 && F("pick", v), t.$$.dirty[0] & 9216 && F("optionsVisibilityChange", Pe && !!E), t.$$.dirty[0] & 1024 && F("featuresListed", E), t.$$.dirty[1] & 32 && F("featuresMarked", N), t.$$.dirty[0] & 2 && F("reverseToggle", A), t.$$.dirty[0] & 1 && F("queryChange", R), t.$$.dirty[0] & 2097154 && i && i.indicateReverse(A), t.$$.dirty[0] & 2097154 && i && i.setMapClickHandler(A ? st : void 0);
767
+ return n.$$set = (c) => {
768
+ "class" in c && e(2, l = c.class), "mapController" in c && e(23, s = c.mapController), "apiKey" in c && e(24, u = c.apiKey), "debounceSearch" in c && e(25, f = c.debounceSearch), "placeholder" in c && e(3, a = c.placeholder), "errorMessage" in c && e(4, v = c.errorMessage), "noResultsMessage" in c && e(5, m = c.noResultsMessage), "proximity" in c && e(22, d = c.proximity), "bbox" in c && e(26, w = c.bbox), "trackProximity" in c && e(27, h = c.trackProximity), "minLength" in c && e(28, g = c.minLength), "language" in c && e(29, x = c.language), "showResultsWhileTyping" in c && e(30, E = c.showResultsWhileTyping), "zoom" in c && e(31, S = c.zoom), "flyTo" in c && e(32, _ = c.flyTo), "collapsed" in c && e(6, k = c.collapsed), "clearOnBlur" in c && e(33, b = c.clearOnBlur), "enableReverse" in c && e(7, P = c.enableReverse), "reverseButtonTitle" in c && e(8, R = c.reverseButtonTitle), "clearButtonTitle" in c && e(9, G = c.clearButtonTitle), "filter" in c && e(34, A = c.filter), "searchValue" in c && e(0, L = c.searchValue), "reverseActive" in c && e(1, p = c.reverseActive), "showPlaceType" in c && e(10, O = c.showPlaceType), "showFullGeometry" in c && e(35, q = c.showFullGeometry), "$$scope" in c && e(41, o = c.$$scope);
769
+ }, n.$$.update = () => {
770
+ n.$$.dirty[0] & 142606336 && s && s.setProximityChangeHandler(h ? (c) => {
771
+ e(22, d = c);
772
+ } : void 0), n.$$.dirty[0] & 134217728 && (h || e(22, d = void 0)), n.$$.dirty[0] & 2048 | n.$$.dirty[1] & 4 && setTimeout(() => {
773
+ e(15, Ze = pe), b && !pe && e(0, L = "");
774
+ }), n.$$.dirty[0] & 4097 && (L || (e(13, M = void 0), e(12, C = void 0), e(17, ne = void 0), e(39, U = C))), n.$$.dirty[0] & 8192 | n.$$.dirty[1] & 16 && q && M && !M.address && M.geometry.type === "Point" && Xe(M.id, !0).catch((c) => e(17, ne = c)), n.$$.dirty[0] & 8396800 | n.$$.dirty[1] & 3 && s && M && _ && (!M.bbox || M.bbox[0] === M.bbox[2] && M.bbox[1] === M.bbox[3] ? s.flyTo(M.center, S) : s.fitBounds(M.bbox, 50), e(12, C = void 0), e(39, U = void 0), e(14, z = -1)), n.$$.dirty[0] & 4096 | n.$$.dirty[1] & 256 && U !== C && e(39, U = void 0), n.$$.dirty[0] & 8396800 | n.$$.dirty[1] & 256 && s && s.setMarkers(U, M), n.$$.dirty[0] & 1 && e(14, z = -1), n.$$.dirty[0] & 8404992 && (s == null || s.setSelectedMarker(z)), n.$$.dirty[0] & 20480 && e(40, r = C == null ? void 0 : C[z]), n.$$.dirty[1] & 512 && ie("select", r), n.$$.dirty[0] & 8192 && ie("pick", M), n.$$.dirty[0] & 36864 && ie("optionsVisibilityChange", Ze && !!C), n.$$.dirty[0] & 4096 && ie("featuresListed", C), n.$$.dirty[1] & 256 && ie("featuresMarked", U), n.$$.dirty[0] & 2 && ie("reverseToggle", p), n.$$.dirty[0] & 1 && ie("queryChange", L), n.$$.dirty[0] & 8388610 && s && s.indicateReverse(p), n.$$.dirty[0] & 8388610 && s && s.setMapClickHandler(p ? Wt : void 0);
767
775
  }, [
768
- R,
769
- A,
770
- s,
771
- h,
772
- p,
773
- D,
774
776
  L,
775
- j,
776
- be,
777
- X,
778
- E,
777
+ p,
778
+ l,
779
+ a,
779
780
  v,
780
- I,
781
- Pe,
782
- W,
783
- Y,
784
- le,
785
- Ke,
786
- it,
787
- Ae,
781
+ m,
782
+ k,
783
+ P,
784
+ R,
785
+ G,
786
+ O,
787
+ pe,
788
+ C,
789
+ M,
790
+ z,
791
+ Ze,
792
+ j,
793
+ ne,
794
+ ge,
795
+ at,
796
+ Ht,
797
+ We,
788
798
  d,
789
- i,
799
+ s,
790
800
  u,
791
- a,
801
+ f,
802
+ w,
803
+ h,
792
804
  g,
805
+ x,
806
+ E,
807
+ S,
793
808
  _,
794
809
  b,
795
- M,
796
- T,
797
- G,
798
- z,
799
- w,
800
- C,
801
- m,
802
- S,
803
- J,
804
- N,
805
- l,
806
- c,
807
- r,
808
- ct,
809
- ft,
810
+ A,
811
+ q,
812
+ re,
813
+ Zt,
810
814
  ut,
811
- at,
812
- dt,
813
- ht,
814
- mt,
815
- _t,
816
- gt,
817
- yt,
818
- bt,
819
- pt
815
+ U,
816
+ r,
817
+ o,
818
+ i,
819
+ Kt,
820
+ jt,
821
+ Jt,
822
+ $t,
823
+ er,
824
+ tr,
825
+ rr,
826
+ nr,
827
+ ir,
828
+ or,
829
+ lr,
830
+ sr
820
831
  ];
821
832
  }
822
- class Ft extends ye {
823
- constructor(e) {
824
- super(), ge(
833
+ class Dr extends Pe {
834
+ constructor(t) {
835
+ super(), ke(
825
836
  this,
826
- e,
827
- Yt,
828
- Xt,
829
- _e,
837
+ t,
838
+ qr,
839
+ Gr,
840
+ Se,
830
841
  {
831
842
  class: 2,
832
- mapController: 21,
833
- apiKey: 22,
834
- debounceSearch: 23,
843
+ mapController: 23,
844
+ apiKey: 24,
845
+ debounceSearch: 25,
835
846
  placeholder: 3,
836
847
  errorMessage: 4,
837
848
  noResultsMessage: 5,
838
- proximity: 20,
839
- bbox: 24,
840
- trackProximity: 25,
841
- minLength: 26,
842
- language: 27,
843
- showResultsWhileTyping: 28,
844
- zoom: 29,
845
- flyTo: 30,
849
+ proximity: 22,
850
+ bbox: 26,
851
+ trackProximity: 27,
852
+ minLength: 28,
853
+ language: 29,
854
+ showResultsWhileTyping: 30,
855
+ zoom: 31,
856
+ flyTo: 32,
846
857
  collapsed: 6,
847
- clearOnBlur: 31,
858
+ clearOnBlur: 33,
848
859
  enableReverse: 7,
849
- filter: 32,
860
+ reverseButtonTitle: 8,
861
+ clearButtonTitle: 9,
862
+ filter: 34,
850
863
  searchValue: 0,
851
864
  reverseActive: 1,
852
- showPlaceType: 8,
853
- focus: 33,
854
- blur: 34,
855
- setQuery: 35
865
+ showPlaceType: 10,
866
+ showFullGeometry: 35,
867
+ focus: 36,
868
+ blur: 37,
869
+ setQuery: 38
856
870
  },
857
871
  null,
858
- [-1, -1]
872
+ [-1, -1, -1]
859
873
  );
860
874
  }
861
875
  get focus() {
862
- return this.$$.ctx[33];
876
+ return this.$$.ctx[36];
863
877
  }
864
878
  get blur() {
865
- return this.$$.ctx[34];
879
+ return this.$$.ctx[37];
866
880
  }
867
881
  get setQuery() {
868
- return this.$$.ctx[35];
882
+ return this.$$.ctx[38];
883
+ }
884
+ }
885
+ function Ft(n, t, e) {
886
+ e === void 0 && (e = {});
887
+ var r = { type: "Feature" };
888
+ return (e.id === 0 || e.id) && (r.id = e.id), e.bbox && (r.bbox = e.bbox), r.properties = t || {}, r.geometry = n, r;
889
+ }
890
+ function Qt(n, t, e) {
891
+ e === void 0 && (e = {});
892
+ for (var r = 0, i = n; r < i.length; r++) {
893
+ var o = i[r];
894
+ if (o.length < 4)
895
+ throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");
896
+ for (var l = 0; l < o[o.length - 1].length; l++)
897
+ if (o[o.length - 1][l] !== o[0][l])
898
+ throw new Error("First and last Position are not equivalent.");
899
+ }
900
+ var s = {
901
+ type: "Polygon",
902
+ coordinates: n
903
+ };
904
+ return Ft(s, t, e);
905
+ }
906
+ function Ut(n, t, e) {
907
+ e === void 0 && (e = {});
908
+ var r = {
909
+ type: "MultiPolygon",
910
+ coordinates: n
911
+ };
912
+ return Ft(r, t, e);
913
+ }
914
+ /**
915
+ * splaytree v3.1.1
916
+ * Fast Splay tree for Node and browser
917
+ *
918
+ * @author Alexander Milevski <info@w8r.name>
919
+ * @license MIT
920
+ * @preserve
921
+ */
922
+ /*! *****************************************************************************
923
+ Copyright (c) Microsoft Corporation. All rights reserved.
924
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
925
+ this file except in compliance with the License. You may obtain a copy of the
926
+ License at http://www.apache.org/licenses/LICENSE-2.0
927
+
928
+ THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
929
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
930
+ WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
931
+ MERCHANTABLITY OR NON-INFRINGEMENT.
932
+
933
+ See the Apache Version 2.0 License for specific language governing permissions
934
+ and limitations under the License.
935
+ ***************************************************************************** */
936
+ function Fr(n, t) {
937
+ var e = { label: 0, sent: function() {
938
+ if (o[0] & 1)
939
+ throw o[1];
940
+ return o[1];
941
+ }, trys: [], ops: [] }, r, i, o, l;
942
+ return l = { next: s(0), throw: s(1), return: s(2) }, typeof Symbol == "function" && (l[Symbol.iterator] = function() {
943
+ return this;
944
+ }), l;
945
+ function s(f) {
946
+ return function(a) {
947
+ return u([f, a]);
948
+ };
949
+ }
950
+ function u(f) {
951
+ if (r)
952
+ throw new TypeError("Generator is already executing.");
953
+ for (; e; )
954
+ try {
955
+ if (r = 1, i && (o = f[0] & 2 ? i.return : f[0] ? i.throw || ((o = i.return) && o.call(i), 0) : i.next) && !(o = o.call(i, f[1])).done)
956
+ return o;
957
+ switch (i = 0, o && (f = [f[0] & 2, o.value]), f[0]) {
958
+ case 0:
959
+ case 1:
960
+ o = f;
961
+ break;
962
+ case 4:
963
+ return e.label++, { value: f[1], done: !1 };
964
+ case 5:
965
+ e.label++, i = f[1], f = [0];
966
+ continue;
967
+ case 7:
968
+ f = e.ops.pop(), e.trys.pop();
969
+ continue;
970
+ default:
971
+ if (o = e.trys, !(o = o.length > 0 && o[o.length - 1]) && (f[0] === 6 || f[0] === 2)) {
972
+ e = 0;
973
+ continue;
974
+ }
975
+ if (f[0] === 3 && (!o || f[1] > o[0] && f[1] < o[3])) {
976
+ e.label = f[1];
977
+ break;
978
+ }
979
+ if (f[0] === 6 && e.label < o[1]) {
980
+ e.label = o[1], o = f;
981
+ break;
982
+ }
983
+ if (o && e.label < o[2]) {
984
+ e.label = o[2], e.ops.push(f);
985
+ break;
986
+ }
987
+ o[2] && e.ops.pop(), e.trys.pop();
988
+ continue;
989
+ }
990
+ f = t.call(n, e);
991
+ } catch (a) {
992
+ f = [6, a], i = 0;
993
+ } finally {
994
+ r = o = 0;
995
+ }
996
+ if (f[0] & 5)
997
+ throw f[1];
998
+ return { value: f[0] ? f[1] : void 0, done: !0 };
999
+ }
1000
+ }
1001
+ var ce = function() {
1002
+ function n(t, e) {
1003
+ this.next = null, this.key = t, this.data = e, this.left = null, this.right = null;
1004
+ }
1005
+ return n;
1006
+ }();
1007
+ function Qr(n, t) {
1008
+ return n > t ? 1 : n < t ? -1 : 0;
1009
+ }
1010
+ function ue(n, t, e) {
1011
+ for (var r = new ce(null, null), i = r, o = r; ; ) {
1012
+ var l = e(n, t.key);
1013
+ if (l < 0) {
1014
+ if (t.left === null)
1015
+ break;
1016
+ if (e(n, t.left.key) < 0) {
1017
+ var s = t.left;
1018
+ if (t.left = s.right, s.right = t, t = s, t.left === null)
1019
+ break;
1020
+ }
1021
+ o.left = t, o = t, t = t.left;
1022
+ } else if (l > 0) {
1023
+ if (t.right === null)
1024
+ break;
1025
+ if (e(n, t.right.key) > 0) {
1026
+ var s = t.right;
1027
+ if (t.right = s.left, s.left = t, t = s, t.right === null)
1028
+ break;
1029
+ }
1030
+ i.right = t, i = t, t = t.right;
1031
+ } else
1032
+ break;
1033
+ }
1034
+ return i.right = t.left, o.left = t.right, t.left = r.right, t.right = r.left, t;
1035
+ }
1036
+ function je(n, t, e, r) {
1037
+ var i = new ce(n, t);
1038
+ if (e === null)
1039
+ return i.left = i.right = null, i;
1040
+ e = ue(n, e, r);
1041
+ var o = r(n, e.key);
1042
+ return o < 0 ? (i.left = e.left, i.right = e, e.left = null) : o >= 0 && (i.right = e.right, i.left = e, e.right = null), i;
1043
+ }
1044
+ function Et(n, t, e) {
1045
+ var r = null, i = null;
1046
+ if (t) {
1047
+ t = ue(n, t, e);
1048
+ var o = e(t.key, n);
1049
+ o === 0 ? (r = t.left, i = t.right) : o < 0 ? (i = t.right, t.right = null, r = t) : (r = t.left, t.left = null, i = t);
869
1050
  }
1051
+ return { left: r, right: i };
870
1052
  }
871
- function $t(t, e = !0, n = !0, l = {}, r = {}) {
872
- let c, s, i, u = [], a;
873
- const h = () => {
874
- if (!c) {
875
- i = void 0;
1053
+ function Ur(n, t, e) {
1054
+ return t === null ? n : (n === null || (t = ue(n.key, t, e), t.left = n), t);
1055
+ }
1056
+ function tt(n, t, e, r, i) {
1057
+ if (n) {
1058
+ r("" + t + (e ? "\u2514\u2500\u2500 " : "\u251C\u2500\u2500 ") + i(n) + `
1059
+ `);
1060
+ var o = t + (e ? " " : "\u2502 ");
1061
+ n.left && tt(n.left, o, !1, r, i), n.right && tt(n.right, o, !0, r, i);
1062
+ }
1063
+ }
1064
+ var st = function() {
1065
+ function n(t) {
1066
+ t === void 0 && (t = Qr), this._root = null, this._size = 0, this._comparator = t;
1067
+ }
1068
+ return n.prototype.insert = function(t, e) {
1069
+ return this._size++, this._root = je(t, e, this._root, this._comparator);
1070
+ }, n.prototype.add = function(t, e) {
1071
+ var r = new ce(t, e);
1072
+ this._root === null && (r.left = r.right = null, this._size++, this._root = r);
1073
+ var i = this._comparator, o = ue(t, this._root, i), l = i(t, o.key);
1074
+ return l === 0 ? this._root = o : (l < 0 ? (r.left = o.left, r.right = o, o.left = null) : l > 0 && (r.right = o.right, r.left = o, o.right = null), this._size++, this._root = r), this._root;
1075
+ }, n.prototype.remove = function(t) {
1076
+ this._root = this._remove(t, this._root, this._comparator);
1077
+ }, n.prototype._remove = function(t, e, r) {
1078
+ var i;
1079
+ if (e === null)
1080
+ return null;
1081
+ e = ue(t, e, r);
1082
+ var o = r(t, e.key);
1083
+ return o === 0 ? (e.left === null ? i = e.right : (i = ue(t, e.left, r), i.right = e.right), this._size--, i) : e;
1084
+ }, n.prototype.pop = function() {
1085
+ var t = this._root;
1086
+ if (t) {
1087
+ for (; t.left; )
1088
+ t = t.left;
1089
+ return this._root = ue(t.key, this._root, this._comparator), this._root = this._remove(t.key, this._root, this._comparator), { key: t.key, data: t.data };
1090
+ }
1091
+ return null;
1092
+ }, n.prototype.findStatic = function(t) {
1093
+ for (var e = this._root, r = this._comparator; e; ) {
1094
+ var i = r(t, e.key);
1095
+ if (i === 0)
1096
+ return e;
1097
+ i < 0 ? e = e.left : e = e.right;
1098
+ }
1099
+ return null;
1100
+ }, n.prototype.find = function(t) {
1101
+ return this._root && (this._root = ue(t, this._root, this._comparator), this._comparator(t, this._root.key) !== 0) ? null : this._root;
1102
+ }, n.prototype.contains = function(t) {
1103
+ for (var e = this._root, r = this._comparator; e; ) {
1104
+ var i = r(t, e.key);
1105
+ if (i === 0)
1106
+ return !0;
1107
+ i < 0 ? e = e.left : e = e.right;
1108
+ }
1109
+ return !1;
1110
+ }, n.prototype.forEach = function(t, e) {
1111
+ for (var r = this._root, i = [], o = !1; !o; )
1112
+ r !== null ? (i.push(r), r = r.left) : i.length !== 0 ? (r = i.pop(), t.call(e, r), r = r.right) : o = !0;
1113
+ return this;
1114
+ }, n.prototype.range = function(t, e, r, i) {
1115
+ for (var o = [], l = this._comparator, s = this._root, u; o.length !== 0 || s; )
1116
+ if (s)
1117
+ o.push(s), s = s.left;
1118
+ else {
1119
+ if (s = o.pop(), u = l(s.key, e), u > 0)
1120
+ break;
1121
+ if (l(s.key, t) >= 0 && r.call(i, s))
1122
+ return this;
1123
+ s = s.right;
1124
+ }
1125
+ return this;
1126
+ }, n.prototype.keys = function() {
1127
+ var t = [];
1128
+ return this.forEach(function(e) {
1129
+ var r = e.key;
1130
+ return t.push(r);
1131
+ }), t;
1132
+ }, n.prototype.values = function() {
1133
+ var t = [];
1134
+ return this.forEach(function(e) {
1135
+ var r = e.data;
1136
+ return t.push(r);
1137
+ }), t;
1138
+ }, n.prototype.min = function() {
1139
+ return this._root ? this.minNode(this._root).key : null;
1140
+ }, n.prototype.max = function() {
1141
+ return this._root ? this.maxNode(this._root).key : null;
1142
+ }, n.prototype.minNode = function(t) {
1143
+ if (t === void 0 && (t = this._root), t)
1144
+ for (; t.left; )
1145
+ t = t.left;
1146
+ return t;
1147
+ }, n.prototype.maxNode = function(t) {
1148
+ if (t === void 0 && (t = this._root), t)
1149
+ for (; t.right; )
1150
+ t = t.right;
1151
+ return t;
1152
+ }, n.prototype.at = function(t) {
1153
+ for (var e = this._root, r = !1, i = 0, o = []; !r; )
1154
+ if (e)
1155
+ o.push(e), e = e.left;
1156
+ else if (o.length > 0) {
1157
+ if (e = o.pop(), i === t)
1158
+ return e;
1159
+ i++, e = e.right;
1160
+ } else
1161
+ r = !0;
1162
+ return null;
1163
+ }, n.prototype.next = function(t) {
1164
+ var e = this._root, r = null;
1165
+ if (t.right) {
1166
+ for (r = t.right; r.left; )
1167
+ r = r.left;
1168
+ return r;
1169
+ }
1170
+ for (var i = this._comparator; e; ) {
1171
+ var o = i(t.key, e.key);
1172
+ if (o === 0)
1173
+ break;
1174
+ o < 0 ? (r = e, e = e.left) : e = e.right;
1175
+ }
1176
+ return r;
1177
+ }, n.prototype.prev = function(t) {
1178
+ var e = this._root, r = null;
1179
+ if (t.left !== null) {
1180
+ for (r = t.left; r.right; )
1181
+ r = r.right;
1182
+ return r;
1183
+ }
1184
+ for (var i = this._comparator; e; ) {
1185
+ var o = i(t.key, e.key);
1186
+ if (o === 0)
1187
+ break;
1188
+ o < 0 ? e = e.left : (r = e, e = e.right);
1189
+ }
1190
+ return r;
1191
+ }, n.prototype.clear = function() {
1192
+ return this._root = null, this._size = 0, this;
1193
+ }, n.prototype.toList = function() {
1194
+ return Yr(this._root);
1195
+ }, n.prototype.load = function(t, e, r) {
1196
+ e === void 0 && (e = []), r === void 0 && (r = !1);
1197
+ var i = t.length, o = this._comparator;
1198
+ if (r && it(t, e, 0, i - 1, o), this._root === null)
1199
+ this._root = rt(t, e, 0, i), this._size = i;
1200
+ else {
1201
+ var l = Zr(this.toList(), Vr(t, e), o);
1202
+ i = this._size + i, this._root = nt({ head: l }, 0, i);
1203
+ }
1204
+ return this;
1205
+ }, n.prototype.isEmpty = function() {
1206
+ return this._root === null;
1207
+ }, Object.defineProperty(n.prototype, "size", {
1208
+ get: function() {
1209
+ return this._size;
1210
+ },
1211
+ enumerable: !0,
1212
+ configurable: !0
1213
+ }), Object.defineProperty(n.prototype, "root", {
1214
+ get: function() {
1215
+ return this._root;
1216
+ },
1217
+ enumerable: !0,
1218
+ configurable: !0
1219
+ }), n.prototype.toString = function(t) {
1220
+ t === void 0 && (t = function(r) {
1221
+ return String(r.key);
1222
+ });
1223
+ var e = [];
1224
+ return tt(this._root, "", !0, function(r) {
1225
+ return e.push(r);
1226
+ }, t), e.join("");
1227
+ }, n.prototype.update = function(t, e, r) {
1228
+ var i = this._comparator, o = Et(t, this._root, i), l = o.left, s = o.right;
1229
+ i(t, e) < 0 ? s = je(e, r, s, i) : l = je(e, r, l, i), this._root = Ur(l, s, i);
1230
+ }, n.prototype.split = function(t) {
1231
+ return Et(t, this._root, this._comparator);
1232
+ }, n.prototype[Symbol.iterator] = function() {
1233
+ var t;
1234
+ return Fr(this, function(e) {
1235
+ switch (e.label) {
1236
+ case 0:
1237
+ t = this.minNode(), e.label = 1;
1238
+ case 1:
1239
+ return t ? [4, t] : [3, 3];
1240
+ case 2:
1241
+ return e.sent(), t = this.next(t), [3, 1];
1242
+ case 3:
1243
+ return [2];
1244
+ }
1245
+ });
1246
+ }, n;
1247
+ }();
1248
+ function rt(n, t, e, r) {
1249
+ var i = r - e;
1250
+ if (i > 0) {
1251
+ var o = e + Math.floor(i / 2), l = n[o], s = t[o], u = new ce(l, s);
1252
+ return u.left = rt(n, t, e, o), u.right = rt(n, t, o + 1, r), u;
1253
+ }
1254
+ return null;
1255
+ }
1256
+ function Vr(n, t) {
1257
+ for (var e = new ce(null, null), r = e, i = 0; i < n.length; i++)
1258
+ r = r.next = new ce(n[i], t[i]);
1259
+ return r.next = null, e.next;
1260
+ }
1261
+ function Yr(n) {
1262
+ for (var t = n, e = [], r = !1, i = new ce(null, null), o = i; !r; )
1263
+ t ? (e.push(t), t = t.left) : e.length > 0 ? (t = o = o.next = e.pop(), t = t.right) : r = !0;
1264
+ return o.next = null, i.next;
1265
+ }
1266
+ function nt(n, t, e) {
1267
+ var r = e - t;
1268
+ if (r > 0) {
1269
+ var i = t + Math.floor(r / 2), o = nt(n, t, i), l = n.head;
1270
+ return l.left = o, n.head = n.head.next, l.right = nt(n, i + 1, e), l;
1271
+ }
1272
+ return null;
1273
+ }
1274
+ function Zr(n, t, e) {
1275
+ for (var r = new ce(null, null), i = r, o = n, l = t; o !== null && l !== null; )
1276
+ e(o.key, l.key) < 0 ? (i.next = o, o = o.next) : (i.next = l, l = l.next), i = i.next;
1277
+ return o !== null ? i.next = o : l !== null && (i.next = l), r.next;
1278
+ }
1279
+ function it(n, t, e, r, i) {
1280
+ if (!(e >= r)) {
1281
+ for (var o = n[e + r >> 1], l = e - 1, s = r + 1; ; ) {
1282
+ do
1283
+ l++;
1284
+ while (i(n[l], o) < 0);
1285
+ do
1286
+ s--;
1287
+ while (i(n[s], o) > 0);
1288
+ if (l >= s)
1289
+ break;
1290
+ var u = n[l];
1291
+ n[l] = n[s], n[s] = u, u = t[l], t[l] = t[s], t[s] = u;
1292
+ }
1293
+ it(n, t, e, s, i), it(n, t, s + 1, r, i);
1294
+ }
1295
+ }
1296
+ function W(n, t) {
1297
+ if (!(n instanceof t))
1298
+ throw new TypeError("Cannot call a class as a function");
1299
+ }
1300
+ function St(n, t) {
1301
+ for (var e = 0; e < t.length; e++) {
1302
+ var r = t[e];
1303
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(n, r.key, r);
1304
+ }
1305
+ }
1306
+ function Q(n, t, e) {
1307
+ return t && St(n.prototype, t), e && St(n, e), n;
1308
+ }
1309
+ var Re = function(t, e) {
1310
+ return t.ll.x <= e.x && e.x <= t.ur.x && t.ll.y <= e.y && e.y <= t.ur.y;
1311
+ }, ot = function(t, e) {
1312
+ if (e.ur.x < t.ll.x || t.ur.x < e.ll.x || e.ur.y < t.ll.y || t.ur.y < e.ll.y)
1313
+ return null;
1314
+ var r = t.ll.x < e.ll.x ? e.ll.x : t.ll.x, i = t.ur.x < e.ur.x ? t.ur.x : e.ur.x, o = t.ll.y < e.ll.y ? e.ll.y : t.ll.y, l = t.ur.y < e.ur.y ? t.ur.y : e.ur.y;
1315
+ return {
1316
+ ll: {
1317
+ x: r,
1318
+ y: o
1319
+ },
1320
+ ur: {
1321
+ x: i,
1322
+ y: l
1323
+ }
1324
+ };
1325
+ }, fe = Number.EPSILON;
1326
+ fe === void 0 && (fe = Math.pow(2, -52));
1327
+ var Xr = fe * fe, lt = function(t, e) {
1328
+ if (-fe < t && t < fe && -fe < e && e < fe)
1329
+ return 0;
1330
+ var r = t - e;
1331
+ return r * r < Xr * t * e ? 0 : t < e ? -1 : 1;
1332
+ }, Wr = /* @__PURE__ */ function() {
1333
+ function n() {
1334
+ W(this, n), this.reset();
1335
+ }
1336
+ return Q(n, [{
1337
+ key: "reset",
1338
+ value: function() {
1339
+ this.xRounder = new kt(), this.yRounder = new kt();
1340
+ }
1341
+ }, {
1342
+ key: "round",
1343
+ value: function(e, r) {
1344
+ return {
1345
+ x: this.xRounder.round(e),
1346
+ y: this.yRounder.round(r)
1347
+ };
1348
+ }
1349
+ }]), n;
1350
+ }(), kt = /* @__PURE__ */ function() {
1351
+ function n() {
1352
+ W(this, n), this.tree = new st(), this.round(0);
1353
+ }
1354
+ return Q(n, [{
1355
+ key: "round",
1356
+ value: function(e) {
1357
+ var r = this.tree.add(e), i = this.tree.prev(r);
1358
+ if (i !== null && lt(r.key, i.key) === 0)
1359
+ return this.tree.remove(e), i.key;
1360
+ var o = this.tree.next(r);
1361
+ return o !== null && lt(r.key, o.key) === 0 ? (this.tree.remove(e), o.key) : e;
1362
+ }
1363
+ }]), n;
1364
+ }(), ze = new Wr(), Oe = function(t, e) {
1365
+ return t.x * e.y - t.y * e.x;
1366
+ }, Vt = function(t, e) {
1367
+ return t.x * e.x + t.y * e.y;
1368
+ }, Pt = function(t, e, r) {
1369
+ var i = {
1370
+ x: e.x - t.x,
1371
+ y: e.y - t.y
1372
+ }, o = {
1373
+ x: r.x - t.x,
1374
+ y: r.y - t.y
1375
+ }, l = Oe(i, o);
1376
+ return lt(l, 0);
1377
+ }, Ue = function(t) {
1378
+ return Math.sqrt(Vt(t, t));
1379
+ }, Hr = function(t, e, r) {
1380
+ var i = {
1381
+ x: e.x - t.x,
1382
+ y: e.y - t.y
1383
+ }, o = {
1384
+ x: r.x - t.x,
1385
+ y: r.y - t.y
1386
+ };
1387
+ return Oe(o, i) / Ue(o) / Ue(i);
1388
+ }, Kr = function(t, e, r) {
1389
+ var i = {
1390
+ x: e.x - t.x,
1391
+ y: e.y - t.y
1392
+ }, o = {
1393
+ x: r.x - t.x,
1394
+ y: r.y - t.y
1395
+ };
1396
+ return Vt(o, i) / Ue(o) / Ue(i);
1397
+ }, Rt = function(t, e, r) {
1398
+ return e.y === 0 ? null : {
1399
+ x: t.x + e.x / e.y * (r - t.y),
1400
+ y: r
1401
+ };
1402
+ }, It = function(t, e, r) {
1403
+ return e.x === 0 ? null : {
1404
+ x: r,
1405
+ y: t.y + e.y / e.x * (r - t.x)
1406
+ };
1407
+ }, jr = function(t, e, r, i) {
1408
+ if (e.x === 0)
1409
+ return It(r, i, t.x);
1410
+ if (i.x === 0)
1411
+ return It(t, e, r.x);
1412
+ if (e.y === 0)
1413
+ return Rt(r, i, t.y);
1414
+ if (i.y === 0)
1415
+ return Rt(t, e, r.y);
1416
+ var o = Oe(e, i);
1417
+ if (o == 0)
1418
+ return null;
1419
+ var l = {
1420
+ x: r.x - t.x,
1421
+ y: r.y - t.y
1422
+ }, s = Oe(l, e) / o, u = Oe(l, i) / o, f = t.x + u * e.x, a = r.x + s * i.x, v = t.y + u * e.y, m = r.y + s * i.y, d = (f + a) / 2, w = (v + m) / 2;
1423
+ return {
1424
+ x: d,
1425
+ y: w
1426
+ };
1427
+ }, $ = /* @__PURE__ */ function() {
1428
+ Q(n, null, [{
1429
+ key: "compare",
1430
+ value: function(e, r) {
1431
+ var i = n.comparePoints(e.point, r.point);
1432
+ return i !== 0 ? i : (e.point !== r.point && e.link(r), e.isLeft !== r.isLeft ? e.isLeft ? 1 : -1 : Ve.compare(e.segment, r.segment));
1433
+ }
1434
+ }, {
1435
+ key: "comparePoints",
1436
+ value: function(e, r) {
1437
+ return e.x < r.x ? -1 : e.x > r.x ? 1 : e.y < r.y ? -1 : e.y > r.y ? 1 : 0;
1438
+ }
1439
+ }]);
1440
+ function n(t, e) {
1441
+ W(this, n), t.events === void 0 ? t.events = [this] : t.events.push(this), this.point = t, this.isLeft = e;
1442
+ }
1443
+ return Q(n, [{
1444
+ key: "link",
1445
+ value: function(e) {
1446
+ if (e.point === this.point)
1447
+ throw new Error("Tried to link already linked events");
1448
+ for (var r = e.point.events, i = 0, o = r.length; i < o; i++) {
1449
+ var l = r[i];
1450
+ this.point.events.push(l), l.point = this.point;
1451
+ }
1452
+ this.checkForConsuming();
1453
+ }
1454
+ }, {
1455
+ key: "checkForConsuming",
1456
+ value: function() {
1457
+ for (var e = this.point.events.length, r = 0; r < e; r++) {
1458
+ var i = this.point.events[r];
1459
+ if (i.segment.consumedBy === void 0)
1460
+ for (var o = r + 1; o < e; o++) {
1461
+ var l = this.point.events[o];
1462
+ l.consumedBy === void 0 && i.otherSE.point.events === l.otherSE.point.events && i.segment.consume(l.segment);
1463
+ }
1464
+ }
1465
+ }
1466
+ }, {
1467
+ key: "getAvailableLinkedEvents",
1468
+ value: function() {
1469
+ for (var e = [], r = 0, i = this.point.events.length; r < i; r++) {
1470
+ var o = this.point.events[r];
1471
+ o !== this && !o.segment.ringOut && o.segment.isInResult() && e.push(o);
1472
+ }
1473
+ return e;
1474
+ }
1475
+ }, {
1476
+ key: "getLeftmostComparator",
1477
+ value: function(e) {
1478
+ var r = this, i = /* @__PURE__ */ new Map(), o = function(s) {
1479
+ var u = s.otherSE;
1480
+ i.set(s, {
1481
+ sine: Hr(r.point, e.point, u.point),
1482
+ cosine: Kr(r.point, e.point, u.point)
1483
+ });
1484
+ };
1485
+ return function(l, s) {
1486
+ i.has(l) || o(l), i.has(s) || o(s);
1487
+ var u = i.get(l), f = u.sine, a = u.cosine, v = i.get(s), m = v.sine, d = v.cosine;
1488
+ return f >= 0 && m >= 0 ? a < d ? 1 : a > d ? -1 : 0 : f < 0 && m < 0 ? a < d ? -1 : a > d ? 1 : 0 : m < f ? -1 : m > f ? 1 : 0;
1489
+ };
1490
+ }
1491
+ }]), n;
1492
+ }(), Jr = 0, Ve = /* @__PURE__ */ function() {
1493
+ Q(n, null, [{
1494
+ key: "compare",
1495
+ value: function(e, r) {
1496
+ var i = e.leftSE.point.x, o = r.leftSE.point.x, l = e.rightSE.point.x, s = r.rightSE.point.x;
1497
+ if (s < i)
1498
+ return 1;
1499
+ if (l < o)
1500
+ return -1;
1501
+ var u = e.leftSE.point.y, f = r.leftSE.point.y, a = e.rightSE.point.y, v = r.rightSE.point.y;
1502
+ if (i < o) {
1503
+ if (f < u && f < a)
1504
+ return 1;
1505
+ if (f > u && f > a)
1506
+ return -1;
1507
+ var m = e.comparePoint(r.leftSE.point);
1508
+ if (m < 0)
1509
+ return 1;
1510
+ if (m > 0)
1511
+ return -1;
1512
+ var d = r.comparePoint(e.rightSE.point);
1513
+ return d !== 0 ? d : -1;
1514
+ }
1515
+ if (i > o) {
1516
+ if (u < f && u < v)
1517
+ return -1;
1518
+ if (u > f && u > v)
1519
+ return 1;
1520
+ var w = r.comparePoint(e.leftSE.point);
1521
+ if (w !== 0)
1522
+ return w;
1523
+ var h = e.comparePoint(r.rightSE.point);
1524
+ return h < 0 ? 1 : h > 0 ? -1 : 1;
1525
+ }
1526
+ if (u < f)
1527
+ return -1;
1528
+ if (u > f)
1529
+ return 1;
1530
+ if (l < s) {
1531
+ var g = r.comparePoint(e.rightSE.point);
1532
+ if (g !== 0)
1533
+ return g;
1534
+ }
1535
+ if (l > s) {
1536
+ var x = e.comparePoint(r.rightSE.point);
1537
+ if (x < 0)
1538
+ return 1;
1539
+ if (x > 0)
1540
+ return -1;
1541
+ }
1542
+ if (l !== s) {
1543
+ var E = a - u, S = l - i, _ = v - f, k = s - o;
1544
+ if (E > S && _ < k)
1545
+ return 1;
1546
+ if (E < S && _ > k)
1547
+ return -1;
1548
+ }
1549
+ return l > s ? 1 : l < s || a < v ? -1 : a > v ? 1 : e.id < r.id ? -1 : e.id > r.id ? 1 : 0;
1550
+ }
1551
+ }]);
1552
+ function n(t, e, r, i) {
1553
+ W(this, n), this.id = ++Jr, this.leftSE = t, t.segment = this, t.otherSE = e, this.rightSE = e, e.segment = this, e.otherSE = t, this.rings = r, this.windings = i;
1554
+ }
1555
+ return Q(n, [{
1556
+ key: "replaceRightSE",
1557
+ value: function(e) {
1558
+ this.rightSE = e, this.rightSE.segment = this, this.rightSE.otherSE = this.leftSE, this.leftSE.otherSE = this.rightSE;
1559
+ }
1560
+ }, {
1561
+ key: "bbox",
1562
+ value: function() {
1563
+ var e = this.leftSE.point.y, r = this.rightSE.point.y;
1564
+ return {
1565
+ ll: {
1566
+ x: this.leftSE.point.x,
1567
+ y: e < r ? e : r
1568
+ },
1569
+ ur: {
1570
+ x: this.rightSE.point.x,
1571
+ y: e > r ? e : r
1572
+ }
1573
+ };
1574
+ }
1575
+ }, {
1576
+ key: "vector",
1577
+ value: function() {
1578
+ return {
1579
+ x: this.rightSE.point.x - this.leftSE.point.x,
1580
+ y: this.rightSE.point.y - this.leftSE.point.y
1581
+ };
1582
+ }
1583
+ }, {
1584
+ key: "isAnEndpoint",
1585
+ value: function(e) {
1586
+ return e.x === this.leftSE.point.x && e.y === this.leftSE.point.y || e.x === this.rightSE.point.x && e.y === this.rightSE.point.y;
1587
+ }
1588
+ }, {
1589
+ key: "comparePoint",
1590
+ value: function(e) {
1591
+ if (this.isAnEndpoint(e))
1592
+ return 0;
1593
+ var r = this.leftSE.point, i = this.rightSE.point, o = this.vector();
1594
+ if (r.x === i.x)
1595
+ return e.x === r.x ? 0 : e.x < r.x ? 1 : -1;
1596
+ var l = (e.y - r.y) / o.y, s = r.x + l * o.x;
1597
+ if (e.x === s)
1598
+ return 0;
1599
+ var u = (e.x - r.x) / o.x, f = r.y + u * o.y;
1600
+ return e.y === f ? 0 : e.y < f ? -1 : 1;
1601
+ }
1602
+ }, {
1603
+ key: "getIntersection",
1604
+ value: function(e) {
1605
+ var r = this.bbox(), i = e.bbox(), o = ot(r, i);
1606
+ if (o === null)
1607
+ return null;
1608
+ var l = this.leftSE.point, s = this.rightSE.point, u = e.leftSE.point, f = e.rightSE.point, a = Re(r, u) && this.comparePoint(u) === 0, v = Re(i, l) && e.comparePoint(l) === 0, m = Re(r, f) && this.comparePoint(f) === 0, d = Re(i, s) && e.comparePoint(s) === 0;
1609
+ if (v && a)
1610
+ return d && !m ? s : !d && m ? f : null;
1611
+ if (v)
1612
+ return m && l.x === f.x && l.y === f.y ? null : l;
1613
+ if (a)
1614
+ return d && s.x === u.x && s.y === u.y ? null : u;
1615
+ if (d && m)
1616
+ return null;
1617
+ if (d)
1618
+ return s;
1619
+ if (m)
1620
+ return f;
1621
+ var w = jr(l, this.vector(), u, e.vector());
1622
+ return w === null || !Re(o, w) ? null : ze.round(w.x, w.y);
1623
+ }
1624
+ }, {
1625
+ key: "split",
1626
+ value: function(e) {
1627
+ var r = [], i = e.events !== void 0, o = new $(e, !0), l = new $(e, !1), s = this.rightSE;
1628
+ this.replaceRightSE(l), r.push(l), r.push(o);
1629
+ var u = new n(o, s, this.rings.slice(), this.windings.slice());
1630
+ return $.comparePoints(u.leftSE.point, u.rightSE.point) > 0 && u.swapEvents(), $.comparePoints(this.leftSE.point, this.rightSE.point) > 0 && this.swapEvents(), i && (o.checkForConsuming(), l.checkForConsuming()), r;
1631
+ }
1632
+ }, {
1633
+ key: "swapEvents",
1634
+ value: function() {
1635
+ var e = this.rightSE;
1636
+ this.rightSE = this.leftSE, this.leftSE = e, this.leftSE.isLeft = !0, this.rightSE.isLeft = !1;
1637
+ for (var r = 0, i = this.windings.length; r < i; r++)
1638
+ this.windings[r] *= -1;
1639
+ }
1640
+ }, {
1641
+ key: "consume",
1642
+ value: function(e) {
1643
+ for (var r = this, i = e; r.consumedBy; )
1644
+ r = r.consumedBy;
1645
+ for (; i.consumedBy; )
1646
+ i = i.consumedBy;
1647
+ var o = n.compare(r, i);
1648
+ if (o !== 0) {
1649
+ if (o > 0) {
1650
+ var l = r;
1651
+ r = i, i = l;
1652
+ }
1653
+ if (r.prev === i) {
1654
+ var s = r;
1655
+ r = i, i = s;
1656
+ }
1657
+ for (var u = 0, f = i.rings.length; u < f; u++) {
1658
+ var a = i.rings[u], v = i.windings[u], m = r.rings.indexOf(a);
1659
+ m === -1 ? (r.rings.push(a), r.windings.push(v)) : r.windings[m] += v;
1660
+ }
1661
+ i.rings = null, i.windings = null, i.consumedBy = r, i.leftSE.consumedBy = r.leftSE, i.rightSE.consumedBy = r.rightSE;
1662
+ }
1663
+ }
1664
+ }, {
1665
+ key: "prevInResult",
1666
+ value: function() {
1667
+ return this._prevInResult !== void 0 ? this._prevInResult : (this.prev ? this.prev.isInResult() ? this._prevInResult = this.prev : this._prevInResult = this.prev.prevInResult() : this._prevInResult = null, this._prevInResult);
1668
+ }
1669
+ }, {
1670
+ key: "beforeState",
1671
+ value: function() {
1672
+ if (this._beforeState !== void 0)
1673
+ return this._beforeState;
1674
+ if (!this.prev)
1675
+ this._beforeState = {
1676
+ rings: [],
1677
+ windings: [],
1678
+ multiPolys: []
1679
+ };
1680
+ else {
1681
+ var e = this.prev.consumedBy || this.prev;
1682
+ this._beforeState = e.afterState();
1683
+ }
1684
+ return this._beforeState;
1685
+ }
1686
+ }, {
1687
+ key: "afterState",
1688
+ value: function() {
1689
+ if (this._afterState !== void 0)
1690
+ return this._afterState;
1691
+ var e = this.beforeState();
1692
+ this._afterState = {
1693
+ rings: e.rings.slice(0),
1694
+ windings: e.windings.slice(0),
1695
+ multiPolys: []
1696
+ };
1697
+ for (var r = this._afterState.rings, i = this._afterState.windings, o = this._afterState.multiPolys, l = 0, s = this.rings.length; l < s; l++) {
1698
+ var u = this.rings[l], f = this.windings[l], a = r.indexOf(u);
1699
+ a === -1 ? (r.push(u), i.push(f)) : i[a] += f;
1700
+ }
1701
+ for (var v = [], m = [], d = 0, w = r.length; d < w; d++)
1702
+ if (i[d] !== 0) {
1703
+ var h = r[d], g = h.poly;
1704
+ if (m.indexOf(g) === -1)
1705
+ if (h.isExterior)
1706
+ v.push(g);
1707
+ else {
1708
+ m.indexOf(g) === -1 && m.push(g);
1709
+ var x = v.indexOf(h.poly);
1710
+ x !== -1 && v.splice(x, 1);
1711
+ }
1712
+ }
1713
+ for (var E = 0, S = v.length; E < S; E++) {
1714
+ var _ = v[E].multiPoly;
1715
+ o.indexOf(_) === -1 && o.push(_);
1716
+ }
1717
+ return this._afterState;
1718
+ }
1719
+ }, {
1720
+ key: "isInResult",
1721
+ value: function() {
1722
+ if (this.consumedBy)
1723
+ return !1;
1724
+ if (this._isInResult !== void 0)
1725
+ return this._isInResult;
1726
+ var e = this.beforeState().multiPolys, r = this.afterState().multiPolys;
1727
+ switch (K.type) {
1728
+ case "union": {
1729
+ var i = e.length === 0, o = r.length === 0;
1730
+ this._isInResult = i !== o;
1731
+ break;
1732
+ }
1733
+ case "intersection": {
1734
+ var l, s;
1735
+ e.length < r.length ? (l = e.length, s = r.length) : (l = r.length, s = e.length), this._isInResult = s === K.numMultiPolys && l < s;
1736
+ break;
1737
+ }
1738
+ case "xor": {
1739
+ var u = Math.abs(e.length - r.length);
1740
+ this._isInResult = u % 2 === 1;
1741
+ break;
1742
+ }
1743
+ case "difference": {
1744
+ var f = function(v) {
1745
+ return v.length === 1 && v[0].isSubject;
1746
+ };
1747
+ this._isInResult = f(e) !== f(r);
1748
+ break;
1749
+ }
1750
+ default:
1751
+ throw new Error("Unrecognized operation type found ".concat(K.type));
1752
+ }
1753
+ return this._isInResult;
1754
+ }
1755
+ }], [{
1756
+ key: "fromRing",
1757
+ value: function(e, r, i) {
1758
+ var o, l, s, u = $.comparePoints(e, r);
1759
+ if (u < 0)
1760
+ o = e, l = r, s = 1;
1761
+ else if (u > 0)
1762
+ o = r, l = e, s = -1;
1763
+ else
1764
+ throw new Error("Tried to create degenerate segment at [".concat(e.x, ", ").concat(e.y, "]"));
1765
+ var f = new $(o, !0), a = new $(l, !1);
1766
+ return new n(f, a, [i], [s]);
1767
+ }
1768
+ }]), n;
1769
+ }(), Lt = /* @__PURE__ */ function() {
1770
+ function n(t, e, r) {
1771
+ if (W(this, n), !Array.isArray(t) || t.length === 0)
1772
+ throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
1773
+ if (this.poly = e, this.isExterior = r, this.segments = [], typeof t[0][0] != "number" || typeof t[0][1] != "number")
1774
+ throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
1775
+ var i = ze.round(t[0][0], t[0][1]);
1776
+ this.bbox = {
1777
+ ll: {
1778
+ x: i.x,
1779
+ y: i.y
1780
+ },
1781
+ ur: {
1782
+ x: i.x,
1783
+ y: i.y
1784
+ }
1785
+ };
1786
+ for (var o = i, l = 1, s = t.length; l < s; l++) {
1787
+ if (typeof t[l][0] != "number" || typeof t[l][1] != "number")
1788
+ throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
1789
+ var u = ze.round(t[l][0], t[l][1]);
1790
+ u.x === o.x && u.y === o.y || (this.segments.push(Ve.fromRing(o, u, this)), u.x < this.bbox.ll.x && (this.bbox.ll.x = u.x), u.y < this.bbox.ll.y && (this.bbox.ll.y = u.y), u.x > this.bbox.ur.x && (this.bbox.ur.x = u.x), u.y > this.bbox.ur.y && (this.bbox.ur.y = u.y), o = u);
1791
+ }
1792
+ (i.x !== o.x || i.y !== o.y) && this.segments.push(Ve.fromRing(o, i, this));
1793
+ }
1794
+ return Q(n, [{
1795
+ key: "getSweepEvents",
1796
+ value: function() {
1797
+ for (var e = [], r = 0, i = this.segments.length; r < i; r++) {
1798
+ var o = this.segments[r];
1799
+ e.push(o.leftSE), e.push(o.rightSE);
1800
+ }
1801
+ return e;
1802
+ }
1803
+ }]), n;
1804
+ }(), $r = /* @__PURE__ */ function() {
1805
+ function n(t, e) {
1806
+ if (W(this, n), !Array.isArray(t))
1807
+ throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
1808
+ this.exteriorRing = new Lt(t[0], this, !0), this.bbox = {
1809
+ ll: {
1810
+ x: this.exteriorRing.bbox.ll.x,
1811
+ y: this.exteriorRing.bbox.ll.y
1812
+ },
1813
+ ur: {
1814
+ x: this.exteriorRing.bbox.ur.x,
1815
+ y: this.exteriorRing.bbox.ur.y
1816
+ }
1817
+ }, this.interiorRings = [];
1818
+ for (var r = 1, i = t.length; r < i; r++) {
1819
+ var o = new Lt(t[r], this, !1);
1820
+ 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);
1821
+ }
1822
+ this.multiPoly = e;
1823
+ }
1824
+ return Q(n, [{
1825
+ key: "getSweepEvents",
1826
+ value: function() {
1827
+ for (var e = this.exteriorRing.getSweepEvents(), r = 0, i = this.interiorRings.length; r < i; r++)
1828
+ for (var o = this.interiorRings[r].getSweepEvents(), l = 0, s = o.length; l < s; l++)
1829
+ e.push(o[l]);
1830
+ return e;
1831
+ }
1832
+ }]), n;
1833
+ }(), Ot = /* @__PURE__ */ function() {
1834
+ function n(t, e) {
1835
+ if (W(this, n), !Array.isArray(t))
1836
+ throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
1837
+ try {
1838
+ typeof t[0][0][0] == "number" && (t = [t]);
1839
+ } catch {
1840
+ }
1841
+ this.polys = [], this.bbox = {
1842
+ ll: {
1843
+ x: Number.POSITIVE_INFINITY,
1844
+ y: Number.POSITIVE_INFINITY
1845
+ },
1846
+ ur: {
1847
+ x: Number.NEGATIVE_INFINITY,
1848
+ y: Number.NEGATIVE_INFINITY
1849
+ }
1850
+ };
1851
+ for (var r = 0, i = t.length; r < i; r++) {
1852
+ var o = new $r(t[r], this);
1853
+ 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);
1854
+ }
1855
+ this.isSubject = e;
1856
+ }
1857
+ return Q(n, [{
1858
+ key: "getSweepEvents",
1859
+ value: function() {
1860
+ for (var e = [], r = 0, i = this.polys.length; r < i; r++)
1861
+ for (var o = this.polys[r].getSweepEvents(), l = 0, s = o.length; l < s; l++)
1862
+ e.push(o[l]);
1863
+ return e;
1864
+ }
1865
+ }]), n;
1866
+ }(), en = /* @__PURE__ */ function() {
1867
+ Q(n, null, [{
1868
+ key: "factory",
1869
+ value: function(e) {
1870
+ for (var r = [], i = 0, o = e.length; i < o; i++) {
1871
+ var l = e[i];
1872
+ if (!(!l.isInResult() || l.ringOut)) {
1873
+ for (var s = null, u = l.leftSE, f = l.rightSE, a = [u], v = u.point, m = []; s = u, u = f, a.push(u), u.point !== v; )
1874
+ for (; ; ) {
1875
+ var d = u.getAvailableLinkedEvents();
1876
+ if (d.length === 0) {
1877
+ var w = a[0].point, h = a[a.length - 1].point;
1878
+ throw new Error("Unable to complete output ring starting at [".concat(w.x, ",") + " ".concat(w.y, "]. Last matching segment found ends at") + " [".concat(h.x, ", ").concat(h.y, "]."));
1879
+ }
1880
+ if (d.length === 1) {
1881
+ f = d[0].otherSE;
1882
+ break;
1883
+ }
1884
+ for (var g = null, x = 0, E = m.length; x < E; x++)
1885
+ if (m[x].point === u.point) {
1886
+ g = x;
1887
+ break;
1888
+ }
1889
+ if (g !== null) {
1890
+ var S = m.splice(g)[0], _ = a.splice(S.index);
1891
+ _.unshift(_[0].otherSE), r.push(new n(_.reverse()));
1892
+ continue;
1893
+ }
1894
+ m.push({
1895
+ index: a.length,
1896
+ point: u.point
1897
+ });
1898
+ var k = u.getLeftmostComparator(s);
1899
+ f = d.sort(k)[0].otherSE;
1900
+ break;
1901
+ }
1902
+ r.push(new n(a));
1903
+ }
1904
+ }
1905
+ return r;
1906
+ }
1907
+ }]);
1908
+ function n(t) {
1909
+ W(this, n), this.events = t;
1910
+ for (var e = 0, r = t.length; e < r; e++)
1911
+ t[e].segment.ringOut = this;
1912
+ this.poly = null;
1913
+ }
1914
+ return Q(n, [{
1915
+ key: "getGeom",
1916
+ value: function() {
1917
+ for (var e = this.events[0].point, r = [e], i = 1, o = this.events.length - 1; i < o; i++) {
1918
+ var l = this.events[i].point, s = this.events[i + 1].point;
1919
+ Pt(l, e, s) !== 0 && (r.push(l), e = l);
1920
+ }
1921
+ if (r.length === 1)
1922
+ return null;
1923
+ var u = r[0], f = r[1];
1924
+ Pt(u, e, f) === 0 && r.shift(), r.push(r[0]);
1925
+ for (var a = this.isExteriorRing() ? 1 : -1, v = this.isExteriorRing() ? 0 : r.length - 1, m = this.isExteriorRing() ? r.length : -1, d = [], w = v; w != m; w += a)
1926
+ d.push([r[w].x, r[w].y]);
1927
+ return d;
1928
+ }
1929
+ }, {
1930
+ key: "isExteriorRing",
1931
+ value: function() {
1932
+ if (this._isExteriorRing === void 0) {
1933
+ var e = this.enclosingRing();
1934
+ this._isExteriorRing = e ? !e.isExteriorRing() : !0;
1935
+ }
1936
+ return this._isExteriorRing;
1937
+ }
1938
+ }, {
1939
+ key: "enclosingRing",
1940
+ value: function() {
1941
+ return this._enclosingRing === void 0 && (this._enclosingRing = this._calcEnclosingRing()), this._enclosingRing;
1942
+ }
1943
+ }, {
1944
+ key: "_calcEnclosingRing",
1945
+ value: function() {
1946
+ for (var e = this.events[0], r = 1, i = this.events.length; r < i; r++) {
1947
+ var o = this.events[r];
1948
+ $.compare(e, o) > 0 && (e = o);
1949
+ }
1950
+ for (var l = e.segment.prevInResult(), s = l ? l.prevInResult() : null; ; ) {
1951
+ if (!l)
1952
+ return null;
1953
+ if (!s)
1954
+ return l.ringOut;
1955
+ if (s.ringOut !== l.ringOut)
1956
+ return s.ringOut.enclosingRing() !== l.ringOut ? l.ringOut : l.ringOut.enclosingRing();
1957
+ l = s.prevInResult(), s = l ? l.prevInResult() : null;
1958
+ }
1959
+ }
1960
+ }]), n;
1961
+ }(), Mt = /* @__PURE__ */ function() {
1962
+ function n(t) {
1963
+ W(this, n), this.exteriorRing = t, t.poly = this, this.interiorRings = [];
1964
+ }
1965
+ return Q(n, [{
1966
+ key: "addInterior",
1967
+ value: function(e) {
1968
+ this.interiorRings.push(e), e.poly = this;
1969
+ }
1970
+ }, {
1971
+ key: "getGeom",
1972
+ value: function() {
1973
+ var e = [this.exteriorRing.getGeom()];
1974
+ if (e[0] === null)
1975
+ return null;
1976
+ for (var r = 0, i = this.interiorRings.length; r < i; r++) {
1977
+ var o = this.interiorRings[r].getGeom();
1978
+ o !== null && e.push(o);
1979
+ }
1980
+ return e;
1981
+ }
1982
+ }]), n;
1983
+ }(), tn = /* @__PURE__ */ function() {
1984
+ function n(t) {
1985
+ W(this, n), this.rings = t, this.polys = this._composePolys(t);
1986
+ }
1987
+ return Q(n, [{
1988
+ key: "getGeom",
1989
+ value: function() {
1990
+ for (var e = [], r = 0, i = this.polys.length; r < i; r++) {
1991
+ var o = this.polys[r].getGeom();
1992
+ o !== null && e.push(o);
1993
+ }
1994
+ return e;
1995
+ }
1996
+ }, {
1997
+ key: "_composePolys",
1998
+ value: function(e) {
1999
+ for (var r = [], i = 0, o = e.length; i < o; i++) {
2000
+ var l = e[i];
2001
+ if (!l.poly)
2002
+ if (l.isExteriorRing())
2003
+ r.push(new Mt(l));
2004
+ else {
2005
+ var s = l.enclosingRing();
2006
+ s.poly || r.push(new Mt(s)), s.poly.addInterior(l);
2007
+ }
2008
+ }
2009
+ return r;
2010
+ }
2011
+ }]), n;
2012
+ }(), rn = /* @__PURE__ */ function() {
2013
+ function n(t) {
2014
+ var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Ve.compare;
2015
+ W(this, n), this.queue = t, this.tree = new st(e), this.segments = [];
2016
+ }
2017
+ return Q(n, [{
2018
+ key: "process",
2019
+ value: function(e) {
2020
+ var r = e.segment, i = [];
2021
+ if (e.consumedBy)
2022
+ return e.isLeft ? this.queue.remove(e.otherSE) : this.tree.remove(r), i;
2023
+ var o = e.isLeft ? this.tree.insert(r) : this.tree.find(r);
2024
+ if (!o)
2025
+ throw new Error("Unable to find segment #".concat(r.id, " ") + "[".concat(r.leftSE.point.x, ", ").concat(r.leftSE.point.y, "] -> ") + "[".concat(r.rightSE.point.x, ", ").concat(r.rightSE.point.y, "] ") + "in SweepLine tree. Please submit a bug report.");
2026
+ for (var l = o, s = o, u = void 0, f = void 0; u === void 0; )
2027
+ l = this.tree.prev(l), l === null ? u = null : l.key.consumedBy === void 0 && (u = l.key);
2028
+ for (; f === void 0; )
2029
+ s = this.tree.next(s), s === null ? f = null : s.key.consumedBy === void 0 && (f = s.key);
2030
+ if (e.isLeft) {
2031
+ var a = null;
2032
+ if (u) {
2033
+ var v = u.getIntersection(r);
2034
+ if (v !== null && (r.isAnEndpoint(v) || (a = v), !u.isAnEndpoint(v)))
2035
+ for (var m = this._splitSafely(u, v), d = 0, w = m.length; d < w; d++)
2036
+ i.push(m[d]);
2037
+ }
2038
+ var h = null;
2039
+ if (f) {
2040
+ var g = f.getIntersection(r);
2041
+ if (g !== null && (r.isAnEndpoint(g) || (h = g), !f.isAnEndpoint(g)))
2042
+ for (var x = this._splitSafely(f, g), E = 0, S = x.length; E < S; E++)
2043
+ i.push(x[E]);
2044
+ }
2045
+ if (a !== null || h !== null) {
2046
+ var _ = null;
2047
+ if (a === null)
2048
+ _ = h;
2049
+ else if (h === null)
2050
+ _ = a;
2051
+ else {
2052
+ var k = $.comparePoints(a, h);
2053
+ _ = k <= 0 ? a : h;
2054
+ }
2055
+ this.queue.remove(r.rightSE), i.push(r.rightSE);
2056
+ for (var b = r.split(_), P = 0, R = b.length; P < R; P++)
2057
+ i.push(b[P]);
2058
+ }
2059
+ i.length > 0 ? (this.tree.remove(r), i.push(e)) : (this.segments.push(r), r.prev = u);
2060
+ } else {
2061
+ if (u && f) {
2062
+ var G = u.getIntersection(f);
2063
+ if (G !== null) {
2064
+ if (!u.isAnEndpoint(G))
2065
+ for (var A = this._splitSafely(u, G), L = 0, p = A.length; L < p; L++)
2066
+ i.push(A[L]);
2067
+ if (!f.isAnEndpoint(G))
2068
+ for (var O = this._splitSafely(f, G), q = 0, re = O.length; q < re; q++)
2069
+ i.push(O[q]);
2070
+ }
2071
+ }
2072
+ this.tree.remove(r);
2073
+ }
2074
+ return i;
2075
+ }
2076
+ }, {
2077
+ key: "_splitSafely",
2078
+ value: function(e, r) {
2079
+ this.tree.remove(e);
2080
+ var i = e.rightSE;
2081
+ this.queue.remove(i);
2082
+ var o = e.split(r);
2083
+ return o.push(i), e.consumedBy === void 0 && this.tree.insert(e), o;
2084
+ }
2085
+ }]), n;
2086
+ }(), Tt = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE || 1e6, nn = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS || 1e6, on = /* @__PURE__ */ function() {
2087
+ function n() {
2088
+ W(this, n);
2089
+ }
2090
+ return Q(n, [{
2091
+ key: "run",
2092
+ value: function(e, r, i) {
2093
+ K.type = e, ze.reset();
2094
+ for (var o = [new Ot(r, !0)], l = 0, s = i.length; l < s; l++)
2095
+ o.push(new Ot(i[l], !1));
2096
+ if (K.numMultiPolys = o.length, K.type === "difference")
2097
+ for (var u = o[0], f = 1; f < o.length; )
2098
+ ot(o[f].bbox, u.bbox) !== null ? f++ : o.splice(f, 1);
2099
+ if (K.type === "intersection") {
2100
+ for (var a = 0, v = o.length; a < v; a++)
2101
+ for (var m = o[a], d = a + 1, w = o.length; d < w; d++)
2102
+ if (ot(m.bbox, o[d].bbox) === null)
2103
+ return [];
2104
+ }
2105
+ for (var h = new st($.compare), g = 0, x = o.length; g < x; g++)
2106
+ for (var E = o[g].getSweepEvents(), S = 0, _ = E.length; S < _; S++)
2107
+ if (h.insert(E[S]), h.size > Tt)
2108
+ throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");
2109
+ for (var k = new rn(h), b = h.size, P = h.pop(); P; ) {
2110
+ var R = P.key;
2111
+ if (h.size === b) {
2112
+ var G = R.segment;
2113
+ throw new Error("Unable to pop() ".concat(R.isLeft ? "left" : "right", " SweepEvent ") + "[".concat(R.point.x, ", ").concat(R.point.y, "] from segment #").concat(G.id, " ") + "[".concat(G.leftSE.point.x, ", ").concat(G.leftSE.point.y, "] -> ") + "[".concat(G.rightSE.point.x, ", ").concat(G.rightSE.point.y, "] from queue. ") + "Please file a bug report.");
2114
+ }
2115
+ if (h.size > Tt)
2116
+ throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");
2117
+ if (k.segments.length > nn)
2118
+ throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");
2119
+ for (var A = k.process(R), L = 0, p = A.length; L < p; L++) {
2120
+ var O = A[L];
2121
+ O.consumedBy === void 0 && h.insert(O);
2122
+ }
2123
+ b = h.size, P = h.pop();
2124
+ }
2125
+ ze.reset();
2126
+ var q = en.factory(k.segments), re = new tn(q);
2127
+ return re.getGeom();
2128
+ }
2129
+ }]), n;
2130
+ }(), K = new on(), ln = function(t) {
2131
+ for (var e = arguments.length, r = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
2132
+ r[i - 1] = arguments[i];
2133
+ return K.run("union", t, r);
2134
+ }, sn = function(t) {
2135
+ for (var e = arguments.length, r = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
2136
+ r[i - 1] = arguments[i];
2137
+ return K.run("intersection", t, r);
2138
+ }, un = function(t) {
2139
+ for (var e = arguments.length, r = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
2140
+ r[i - 1] = arguments[i];
2141
+ return K.run("xor", t, r);
2142
+ }, fn = function(t) {
2143
+ for (var e = arguments.length, r = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
2144
+ r[i - 1] = arguments[i];
2145
+ return K.run("difference", t, r);
2146
+ }, Me = {
2147
+ union: ln,
2148
+ intersection: sn,
2149
+ xor: un,
2150
+ difference: fn
2151
+ };
2152
+ function Ct(n, t) {
2153
+ var e = cn(t), r = null;
2154
+ return n.type === "FeatureCollection" ? r = an(n) : r = Yt(
2155
+ Me.union(n.geometry.coordinates)
2156
+ ), r.geometry.coordinates.forEach(function(i) {
2157
+ e.geometry.coordinates.push(i[0]);
2158
+ }), e;
2159
+ }
2160
+ function an(n) {
2161
+ var t = n.features.length === 2 ? Me.union(
2162
+ n.features[0].geometry.coordinates,
2163
+ n.features[1].geometry.coordinates
2164
+ ) : Me.union.apply(
2165
+ Me,
2166
+ n.features.map(function(e) {
2167
+ return e.geometry.coordinates;
2168
+ })
2169
+ );
2170
+ return Yt(t);
2171
+ }
2172
+ function Yt(n) {
2173
+ return Ut(n);
2174
+ }
2175
+ function cn(n) {
2176
+ var t = [
2177
+ [
2178
+ [180, 90],
2179
+ [-180, 90],
2180
+ [-180, -90],
2181
+ [180, -90],
2182
+ [180, 90]
2183
+ ]
2184
+ ], e = n && n.geometry.coordinates || t;
2185
+ return Qt(e);
2186
+ }
2187
+ function At(n) {
2188
+ return n.type === "Feature" ? n.geometry : n;
2189
+ }
2190
+ function hn(n, t, e) {
2191
+ e === void 0 && (e = {});
2192
+ var r = At(n), i = At(t), o = Me.union(r.coordinates, i.coordinates);
2193
+ return o.length === 0 ? null : o.length === 1 ? Qt(o[0], e.properties) : Ut(o, e.properties);
2194
+ }
2195
+ function gn(n, t = !0, e = !0, r = {}, i = {}, o = (l) => {
2196
+ var f;
2197
+ const s = (f = l == null ? void 0 : l.geometry) == null ? void 0 : f.type, u = s === "LineString" || s === "MultiLineString" ? 3 : 2;
2198
+ return {
2199
+ color: "#3170fe",
2200
+ fillColor: "#000",
2201
+ fillOpacity: 0.1,
2202
+ weight: u,
2203
+ dashArray: [u, u],
2204
+ lineCap: "butt"
2205
+ };
2206
+ }) {
2207
+ let l, s, u, f = [], a, v = se.geoJSON(void 0, {
2208
+ style: o
2209
+ }).addTo(n);
2210
+ const m = () => {
2211
+ if (!l) {
2212
+ u = void 0;
876
2213
  return;
877
2214
  }
878
- let d;
879
- const g = t.getZoom() > 10 ? [(d = t.getCenter().wrap()).lng, d.lat] : void 0;
880
- i !== g && (i = g, c(g));
881
- }, p = (d) => {
882
- s == null || s([d.latlng.lng, d.latlng.lat]);
2215
+ let h;
2216
+ const g = n.getZoom() > 10 ? [(h = n.getCenter().wrap()).lng, h.lat] : void 0;
2217
+ u !== g && (u = g, l(g));
2218
+ }, d = (h) => {
2219
+ s == null || s([h.latlng.lng, h.latlng.lat]);
883
2220
  };
884
2221
  return {
885
- setProximityChangeHandler(d) {
886
- d ? (c = d, t.on("moveend", h), h()) : (t.off("moveend", h), c == null || c(void 0), c = void 0);
2222
+ setProximityChangeHandler(h) {
2223
+ h ? (l = h, n.on("moveend", m), m()) : (n.off("moveend", m), l == null || l(void 0), l = void 0);
887
2224
  },
888
- setMapClickHandler(d) {
889
- s = d, s ? t.on("click", p) : t.off("click", p);
2225
+ setMapClickHandler(h) {
2226
+ s = h, s ? n.on("click", d) : n.off("click", d);
890
2227
  },
891
- flyTo(d, g) {
892
- t.flyTo(d, g, l);
2228
+ flyTo(h, g) {
2229
+ n.flyTo(h, g, { duration: 2, ...r });
893
2230
  },
894
- fitBounds(d, g) {
895
- t.flyToBounds(
2231
+ fitBounds(h, g) {
2232
+ n.flyToBounds(
896
2233
  [
897
- [d[1], d[0]],
898
- [d[3], d[2]]
2234
+ [h[1], h[0]],
2235
+ [h[3], h[2]]
899
2236
  ],
900
- { ...r, padding: [g, g] }
2237
+ { padding: [g, g], duration: 2, ...i }
901
2238
  );
902
2239
  },
903
- indicateReverse(d) {
904
- t.getContainer().style.cursor = d ? "crosshair" : "";
905
- },
906
- setMarkers(d, g) {
907
- for (const _ of u)
908
- _.remove();
909
- u.length = 0;
910
- for (const _ of g ? [...d != null ? d : [], g] : d != null ? d : []) {
911
- let b;
912
- const M = [_.center[1], _.center[0]];
913
- if (_ === g && typeof e == "object")
914
- b = new se.Marker(M, e);
915
- else if (_ !== g && typeof n == "object")
916
- b = new se.Marker(M, n);
917
- else {
918
- const T = document.createElement("div");
919
- new rt({ props: { displayIn: "leaflet" }, target: T }), b = new se.Marker(M, {
920
- icon: new se.DivIcon({ html: T, className: "" })
921
- });
2240
+ indicateReverse(h) {
2241
+ n.getContainer().style.cursor = h ? "crosshair" : "";
2242
+ },
2243
+ setMarkers(h, g) {
2244
+ function x(S) {
2245
+ v.clearLayers(), S && v.addData(S);
2246
+ }
2247
+ for (const S of f)
2248
+ S.remove();
2249
+ f.length = 0, x();
2250
+ const E = (S) => {
2251
+ const _ = document.createElement("div");
2252
+ return new Dt({ props: { displayIn: "leaflet" }, target: _ }), new se.Marker(S, {
2253
+ icon: new se.DivIcon({ html: _, className: "" })
2254
+ });
2255
+ };
2256
+ if (g) {
2257
+ let S = !1;
2258
+ if (g.geometry.type === "GeometryCollection") {
2259
+ const k = g.geometry.geometries.filter(
2260
+ (b) => b.type === "Polygon" || b.type === "MultiPolygon"
2261
+ );
2262
+ if (k.length > 0) {
2263
+ let b = k.pop();
2264
+ for (const P of k)
2265
+ b = hn(b, P);
2266
+ x(Ct({ ...g, geometry: b })), S = !0;
2267
+ } else {
2268
+ const b = g.geometry.geometries.filter(
2269
+ (P) => P.type === "LineString" || P.type === "MultiLineString"
2270
+ );
2271
+ b.length > 0 && (x({
2272
+ ...g,
2273
+ geometry: { type: "GeometryCollection", geometries: b }
2274
+ }), S = !0);
2275
+ }
2276
+ }
2277
+ if (!S) {
2278
+ if (g.geometry.type === "Polygon" || g.geometry.type === "MultiPolygon")
2279
+ x(Ct(g));
2280
+ else if (g.geometry.type === "LineString" || g.geometry.type === "MultiLineString") {
2281
+ x(g);
2282
+ return;
2283
+ }
922
2284
  }
923
- u.push(b.addTo(t));
2285
+ const _ = [g.center[1], g.center[0]];
2286
+ f.push(
2287
+ (typeof t == "object" ? new se.Marker(_, t) : E(_)).addTo(n)
2288
+ );
2289
+ }
2290
+ for (const S of h != null ? h : []) {
2291
+ if (S === g)
2292
+ continue;
2293
+ const _ = [S.center[1], S.center[0]];
2294
+ f.push(
2295
+ (typeof e == "object" ? new se.Marker(_, e) : E(_)).addTo(n)
2296
+ );
924
2297
  }
925
2298
  },
926
- setSelectedMarker(d) {
927
- var g, _;
928
- a && ((g = a.getElement()) == null || g.classList.toggle("marker-selected", !1)), a = d > -1 ? u[d] : void 0, (_ = a == null ? void 0 : a.getElement()) == null || _.classList.toggle("marker-selected", !0);
2299
+ setSelectedMarker(h) {
2300
+ var g, x;
2301
+ a && ((g = a.getElement()) == null || g.classList.toggle("marker-selected", !1)), a = h > -1 ? f[h] : void 0, (x = a == null ? void 0 : a.getElement()) == null || x.classList.toggle("marker-selected", !0);
929
2302
  }
930
2303
  };
931
2304
  }
932
- var U, ce;
933
- class en extends se.Control {
934
- constructor(n) {
2305
+ var H, de;
2306
+ class vn extends se.Control {
2307
+ constructor(e) {
935
2308
  super();
936
- je(this, U, void 0);
937
- je(this, ce, void 0);
938
- Te(this, ce, n);
939
- }
940
- onAdd(n) {
941
- const l = document.createElement("div");
942
- l.className = "leaflet-ctrl-geocoder", se.DomEvent.disableClickPropagation(l), se.DomEvent.disableScrollPropagation(l);
943
- const { marker: r, showResultMarkers: c, flyTo: s, ...i } = Z(this, ce), u = typeof s == "boolean" ? {} : s, a = $t(
944
- n,
945
- r,
946
- c,
947
- u,
948
- u
2309
+ He(this, H, void 0);
2310
+ He(this, de, void 0);
2311
+ Be(this, de, e);
2312
+ }
2313
+ onAdd(e) {
2314
+ const r = document.createElement("div");
2315
+ r.className = "leaflet-ctrl-geocoder", se.DomEvent.disableClickPropagation(r), se.DomEvent.disableScrollPropagation(r);
2316
+ const {
2317
+ marker: i,
2318
+ showResultMarkers: o,
2319
+ flyTo: l,
2320
+ fullGeometryStyle: s,
2321
+ ...u
2322
+ } = J(this, de), f = typeof l == "boolean" ? {} : l, a = gn(
2323
+ e,
2324
+ i,
2325
+ o,
2326
+ f,
2327
+ f,
2328
+ s
949
2329
  );
950
- Te(this, U, new Ft({
951
- target: l,
2330
+ Be(this, H, new Dr({
2331
+ target: r,
952
2332
  props: {
953
2333
  mapController: a,
954
- flyTo: s === void 0 ? !0 : !!s,
955
- ...i
2334
+ flyTo: l === void 0 ? !0 : !!l,
2335
+ ...u
956
2336
  }
957
2337
  }));
958
- for (const h of [
2338
+ for (const v of [
959
2339
  "select",
960
2340
  "pick",
961
2341
  "featuresListed",
@@ -965,45 +2345,51 @@ class en extends se.Control {
965
2345
  "reverseToggle",
966
2346
  "queryChange"
967
2347
  ])
968
- Z(this, U).$on(
969
- h,
970
- (p) => n.fire(h.toLowerCase(), p.detail)
2348
+ J(this, H).$on(
2349
+ v,
2350
+ (m) => e.fire(v.toLowerCase(), m.detail)
971
2351
  );
972
- return l;
2352
+ return r;
973
2353
  }
974
- setOptions(n) {
2354
+ setOptions(e) {
2355
+ var u;
2356
+ Be(this, de, e);
2357
+ const {
2358
+ marker: r,
2359
+ showResultMarkers: i,
2360
+ flyTo: o,
2361
+ fullGeometryStyle: l,
2362
+ ...s
2363
+ } = J(this, de);
2364
+ (u = J(this, H)) == null || u.$set(s);
2365
+ }
2366
+ setQuery(e, r = !0) {
975
2367
  var i;
976
- Te(this, ce, n);
977
- const { marker: l, showResultMarkers: r, flyTo: c, ...s } = Z(this, ce);
978
- (i = Z(this, U)) == null || i.$set(s);
2368
+ (i = J(this, H)) == null || i.setQuery(e, r);
979
2369
  }
980
- setQuery(n, l = !0) {
2370
+ setReverseMode(e) {
981
2371
  var r;
982
- (r = Z(this, U)) == null || r.setQuery(n, l);
983
- }
984
- setReverseMode(n) {
985
- var l;
986
- (l = Z(this, U)) == null || l.$set({ reverseActive: n });
2372
+ (r = J(this, H)) == null || r.$set({ reverseActive: e });
987
2373
  }
988
2374
  focus() {
989
- var n;
990
- (n = Z(this, U)) == null || n.focus();
2375
+ var e;
2376
+ (e = J(this, H)) == null || e.focus();
991
2377
  }
992
2378
  blur() {
993
- var n;
994
- (n = Z(this, U)) == null || n.blur();
2379
+ var e;
2380
+ (e = J(this, H)) == null || e.blur();
995
2381
  }
996
2382
  onRemove() {
997
- var n;
998
- (n = Z(this, U)) == null || n.$destroy();
2383
+ var e;
2384
+ (e = J(this, H)) == null || e.$destroy();
999
2385
  }
1000
2386
  }
1001
- U = new WeakMap(), ce = new WeakMap();
1002
- function tn(...t) {
1003
- return new en(...t);
2387
+ H = new WeakMap(), de = new WeakMap();
2388
+ function yn(...n) {
2389
+ return new vn(...n);
1004
2390
  }
1005
- window.L && typeof window.L == "object" && typeof window.L.control == "function" && (window.L.control.maptilerGeocoding = tn);
2391
+ window.L && typeof window.L == "object" && typeof window.L.control == "function" && (window.L.control.maptilerGeocoding = yn);
1006
2392
  export {
1007
- en as GeocodingControl,
1008
- $t as createLeafletMapController
2393
+ vn as GeocodingControl,
2394
+ gn as createLeafletMapController
1009
2395
  };