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