@maptiler/geocoding-control 2.0.0-rc.1 → 2.0.0-rc.2
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/MapLibreBasedGeocodingControl.d.ts +1436 -1748
- package/leaflet.js +714 -718
- package/leaflet.js.map +1 -1
- package/leaflet.umd.js +3 -3
- package/leaflet.umd.js.map +1 -1
- package/maplibregl.d.ts +2625 -0
- package/maplibregl.js +636 -640
- package/maplibregl.js.map +1 -1
- package/maplibregl.umd.js +3 -3
- package/maplibregl.umd.js.map +1 -1
- package/maptilersdk.d.ts +2620 -0
- package/maptilersdk.js +636 -640
- package/maptilersdk.js.map +1 -1
- package/maptilersdk.umd.js +3 -3
- package/maptilersdk.umd.js.map +1 -1
- package/openlayers.js +643 -647
- package/openlayers.js.map +1 -1
- package/openlayers.umd.js +3 -3
- package/openlayers.umd.js.map +1 -1
- package/package.json +2 -2
- package/react.js +427 -431
- package/react.js.map +1 -1
- package/react.umd.js +1 -1
- package/react.umd.js.map +1 -1
- package/svelte/FeatureItem.svelte +1 -1
- package/svelte/FeatureItem.svelte.d.ts +1 -1
- package/svelte/GeocodingControl.svelte +8 -15
- package/svelte/GeocodingControl.svelte.d.ts +3 -4
- package/svelte/MapLibreBasedGeocodingControl.d.ts +1436 -1748
- package/svelte/MapLibreBasedGeocodingControl.js +2 -3
- package/svelte/leaflet.js +2 -1
- package/svelte/maplibregl.d.ts +2625 -0
- package/svelte/maptilersdk.d.ts +2620 -0
- package/svelte/openlayers.js +2 -1
- package/svelte/react.js +5 -5
- package/svelte/types.d.ts +45 -23
- package/types.d.ts +45 -23
- package/vanilla.js +484 -488
- package/vanilla.js.map +1 -1
- package/vanilla.umd.js +1 -1
- package/vanilla.umd.js.map +1 -1
package/maptilersdk.js
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var cn = Object.defineProperty;
|
|
2
|
+
var qt = (n) => {
|
|
3
3
|
throw TypeError(n);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var ee = (n, e, t) =>
|
|
7
|
-
var H = (n, e, t) => (Qt(n, e, "read from private field"), t ? t.call(n) : e.get(n)),
|
|
8
|
-
import * as
|
|
5
|
+
var fn = (n, e, t) => e in n ? cn(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
6
|
+
var ee = (n, e, t) => fn(n, typeof e != "symbol" ? e + "" : e, t), Qt = (n, e, t) => e.has(n) || qt("Cannot " + t);
|
|
7
|
+
var H = (n, e, t) => (Qt(n, e, "read from private field"), t ? t.call(n) : e.get(n)), St = (n, e, t) => e.has(n) ? qt("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(n) : e.set(n, t), nt = (n, e, t, i) => (Qt(n, e, "write to private field"), i ? i.call(n, t) : e.set(n, t), t);
|
|
8
|
+
import * as Zt from "@maptiler/sdk";
|
|
9
9
|
function B() {
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function dn(n, e) {
|
|
12
12
|
for (const t in e) n[t] = e[t];
|
|
13
13
|
return (
|
|
14
14
|
/** @type {T & S} */
|
|
15
15
|
n
|
|
16
16
|
);
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function Ni(n) {
|
|
19
19
|
return n();
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function Ht() {
|
|
22
22
|
return /* @__PURE__ */ Object.create(null);
|
|
23
23
|
}
|
|
24
24
|
function me(n) {
|
|
25
|
-
n.forEach(
|
|
25
|
+
n.forEach(Ni);
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function Ti(n) {
|
|
28
28
|
return typeof n == "function";
|
|
29
29
|
}
|
|
30
30
|
function xe(n, e) {
|
|
31
31
|
return n != n ? e == e : n !== e || n && typeof n == "object" || typeof n == "function";
|
|
32
32
|
}
|
|
33
|
-
let
|
|
33
|
+
let rt;
|
|
34
34
|
function X(n, e) {
|
|
35
|
-
return n === e ? !0 : (
|
|
35
|
+
return n === e ? !0 : (rt || (rt = document.createElement("a")), rt.href = e, n === rt.href);
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function hn(n) {
|
|
38
38
|
return Object.keys(n).length === 0;
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function gn(n, e, t, i) {
|
|
41
41
|
if (n) {
|
|
42
|
-
const r =
|
|
42
|
+
const r = Ri(n, e, t, i);
|
|
43
43
|
return n[0](r);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
function
|
|
47
|
-
return n[1] && i ?
|
|
46
|
+
function Ri(n, e, t, i) {
|
|
47
|
+
return n[1] && i ? dn(t.ctx.slice(), n[1](i(e))) : t.ctx;
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function mn(n, e, t, i) {
|
|
50
50
|
if (n[2] && i) {
|
|
51
51
|
const r = n[2](i(t));
|
|
52
52
|
if (e.dirty === void 0)
|
|
@@ -61,13 +61,13 @@ function yn(n, e, t, i) {
|
|
|
61
61
|
}
|
|
62
62
|
return e.dirty;
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function yn(n, e, t, i, r, o) {
|
|
65
65
|
if (r) {
|
|
66
|
-
const u =
|
|
66
|
+
const u = Ri(e, t, i, o);
|
|
67
67
|
n.p(u, r);
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function vn(n) {
|
|
71
71
|
if (n.ctx.length > 32) {
|
|
72
72
|
const e = [], t = n.ctx.length / 32;
|
|
73
73
|
for (let i = 0; i < t; i++)
|
|
@@ -76,7 +76,7 @@ function pn(n) {
|
|
|
76
76
|
}
|
|
77
77
|
return -1;
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function Vt(n) {
|
|
80
80
|
return n ?? "";
|
|
81
81
|
}
|
|
82
82
|
function P(n, e) {
|
|
@@ -88,7 +88,7 @@ function F(n, e, t) {
|
|
|
88
88
|
function D(n) {
|
|
89
89
|
n.parentNode && n.parentNode.removeChild(n);
|
|
90
90
|
}
|
|
91
|
-
function
|
|
91
|
+
function W(n) {
|
|
92
92
|
return document.createElement(n);
|
|
93
93
|
}
|
|
94
94
|
function ae(n) {
|
|
@@ -100,13 +100,13 @@ function _e(n) {
|
|
|
100
100
|
function ne() {
|
|
101
101
|
return _e(" ");
|
|
102
102
|
}
|
|
103
|
-
function
|
|
103
|
+
function pn() {
|
|
104
104
|
return _e("");
|
|
105
105
|
}
|
|
106
106
|
function $(n, e, t, i) {
|
|
107
107
|
return n.addEventListener(e, t, i), () => n.removeEventListener(e, t, i);
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function bn(n) {
|
|
110
110
|
return function(e) {
|
|
111
111
|
return e.preventDefault(), n.call(this, e);
|
|
112
112
|
};
|
|
@@ -114,39 +114,39 @@ function wn(n) {
|
|
|
114
114
|
function p(n, e, t) {
|
|
115
115
|
t == null ? n.removeAttribute(e) : n.getAttribute(e) !== t && n.setAttribute(e, t);
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function wn(n) {
|
|
118
118
|
return Array.from(n.childNodes);
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function qe(n, e) {
|
|
121
121
|
e = "" + e, n.data !== e && (n.data = /** @type {string} */
|
|
122
122
|
e);
|
|
123
123
|
}
|
|
124
|
-
function
|
|
124
|
+
function Yt(n, e) {
|
|
125
125
|
n.value = e ?? "";
|
|
126
126
|
}
|
|
127
127
|
function le(n, e, t) {
|
|
128
128
|
n.classList.toggle(e, !!t);
|
|
129
129
|
}
|
|
130
|
-
function
|
|
130
|
+
function En(n, e, { bubbles: t = !1, cancelable: i = !1 } = {}) {
|
|
131
131
|
return new CustomEvent(n, { detail: e, bubbles: t, cancelable: i });
|
|
132
132
|
}
|
|
133
133
|
let Qe;
|
|
134
|
-
function
|
|
134
|
+
function je(n) {
|
|
135
135
|
Qe = n;
|
|
136
136
|
}
|
|
137
|
-
function
|
|
137
|
+
function Pi() {
|
|
138
138
|
if (!Qe) throw new Error("Function called outside component initialization");
|
|
139
139
|
return Qe;
|
|
140
140
|
}
|
|
141
|
-
function
|
|
142
|
-
|
|
141
|
+
function _n(n) {
|
|
142
|
+
Pi().$$.on_destroy.push(n);
|
|
143
143
|
}
|
|
144
|
-
function
|
|
145
|
-
const n =
|
|
144
|
+
function Ln() {
|
|
145
|
+
const n = Pi();
|
|
146
146
|
return (e, t, { cancelable: i = !1 } = {}) => {
|
|
147
147
|
const r = n.$$.callbacks[e];
|
|
148
148
|
if (r) {
|
|
149
|
-
const o =
|
|
149
|
+
const o = En(
|
|
150
150
|
/** @type {string} */
|
|
151
151
|
e,
|
|
152
152
|
t,
|
|
@@ -159,60 +159,60 @@ function Sn() {
|
|
|
159
159
|
return !0;
|
|
160
160
|
};
|
|
161
161
|
}
|
|
162
|
-
function
|
|
162
|
+
function Kt(n, e) {
|
|
163
163
|
const t = n.$$.callbacks[e.type];
|
|
164
164
|
t && t.slice().forEach((i) => i.call(this, e));
|
|
165
165
|
}
|
|
166
|
-
const
|
|
167
|
-
let
|
|
168
|
-
const
|
|
169
|
-
let
|
|
170
|
-
function
|
|
171
|
-
|
|
166
|
+
const We = [], Ct = [];
|
|
167
|
+
let ze = [];
|
|
168
|
+
const Xt = [], Sn = /* @__PURE__ */ Promise.resolve();
|
|
169
|
+
let Nt = !1;
|
|
170
|
+
function xn() {
|
|
171
|
+
Nt || (Nt = !0, Sn.then(Ii));
|
|
172
172
|
}
|
|
173
|
-
function
|
|
174
|
-
|
|
173
|
+
function Tt(n) {
|
|
174
|
+
ze.push(n);
|
|
175
175
|
}
|
|
176
|
-
const
|
|
177
|
-
let
|
|
178
|
-
function
|
|
179
|
-
if (
|
|
176
|
+
const xt = /* @__PURE__ */ new Set();
|
|
177
|
+
let Oe = 0;
|
|
178
|
+
function Ii() {
|
|
179
|
+
if (Oe !== 0)
|
|
180
180
|
return;
|
|
181
181
|
const n = Qe;
|
|
182
182
|
do {
|
|
183
183
|
try {
|
|
184
|
-
for (;
|
|
185
|
-
const e =
|
|
186
|
-
|
|
184
|
+
for (; Oe < We.length; ) {
|
|
185
|
+
const e = We[Oe];
|
|
186
|
+
Oe++, je(e), Mn(e.$$);
|
|
187
187
|
}
|
|
188
188
|
} catch (e) {
|
|
189
|
-
throw
|
|
189
|
+
throw We.length = 0, Oe = 0, e;
|
|
190
190
|
}
|
|
191
|
-
for (
|
|
192
|
-
for (let e = 0; e <
|
|
193
|
-
const t =
|
|
194
|
-
|
|
191
|
+
for (je(null), We.length = 0, Oe = 0; Ct.length; ) Ct.pop()();
|
|
192
|
+
for (let e = 0; e < ze.length; e += 1) {
|
|
193
|
+
const t = ze[e];
|
|
194
|
+
xt.has(t) || (xt.add(t), t());
|
|
195
195
|
}
|
|
196
|
-
|
|
197
|
-
} while (
|
|
198
|
-
for (;
|
|
199
|
-
|
|
200
|
-
|
|
196
|
+
ze.length = 0;
|
|
197
|
+
} while (We.length);
|
|
198
|
+
for (; Xt.length; )
|
|
199
|
+
Xt.pop()();
|
|
200
|
+
Nt = !1, xt.clear(), je(n);
|
|
201
201
|
}
|
|
202
|
-
function
|
|
202
|
+
function Mn(n) {
|
|
203
203
|
if (n.fragment !== null) {
|
|
204
204
|
n.update(), me(n.before_update);
|
|
205
205
|
const e = n.dirty;
|
|
206
|
-
n.dirty = [-1], n.fragment && n.fragment.p(n.ctx, e), n.after_update.forEach(
|
|
206
|
+
n.dirty = [-1], n.fragment && n.fragment.p(n.ctx, e), n.after_update.forEach(Tt);
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
209
|
function kn(n) {
|
|
210
210
|
const e = [], t = [];
|
|
211
|
-
|
|
211
|
+
ze.forEach((i) => n.indexOf(i) === -1 ? e.push(i) : t.push(i)), t.forEach((i) => i()), ze = e;
|
|
212
212
|
}
|
|
213
|
-
const
|
|
213
|
+
const st = /* @__PURE__ */ new Set();
|
|
214
214
|
let Re;
|
|
215
|
-
function
|
|
215
|
+
function lt() {
|
|
216
216
|
Re = {
|
|
217
217
|
r: 0,
|
|
218
218
|
c: [],
|
|
@@ -220,45 +220,45 @@ function ut() {
|
|
|
220
220
|
// parent group
|
|
221
221
|
};
|
|
222
222
|
}
|
|
223
|
-
function
|
|
223
|
+
function ut() {
|
|
224
224
|
Re.r || me(Re.c), Re = Re.p;
|
|
225
225
|
}
|
|
226
226
|
function q(n, e) {
|
|
227
|
-
n && n.i && (
|
|
227
|
+
n && n.i && (st.delete(n), n.i(e));
|
|
228
228
|
}
|
|
229
229
|
function Y(n, e, t, i) {
|
|
230
230
|
if (n && n.o) {
|
|
231
|
-
if (
|
|
232
|
-
|
|
233
|
-
|
|
231
|
+
if (st.has(n)) return;
|
|
232
|
+
st.add(n), Re.c.push(() => {
|
|
233
|
+
st.delete(n), i && (t && n.d(1), i());
|
|
234
234
|
}), n.o(e);
|
|
235
235
|
} else i && i();
|
|
236
236
|
}
|
|
237
|
-
function
|
|
237
|
+
function Jt(n) {
|
|
238
238
|
return (n == null ? void 0 : n.length) !== void 0 ? n : Array.from(n);
|
|
239
239
|
}
|
|
240
|
-
function
|
|
240
|
+
function Cn(n, e) {
|
|
241
241
|
Y(n, 1, 1, () => {
|
|
242
242
|
e.delete(n.key);
|
|
243
243
|
});
|
|
244
244
|
}
|
|
245
|
-
function
|
|
245
|
+
function Nn(n, e, t, i, r, o, u, s, c, l, d, a) {
|
|
246
246
|
let f = n.length, g = o.length, v = f;
|
|
247
247
|
const w = {};
|
|
248
248
|
for (; v--; ) w[n[v].key] = v;
|
|
249
249
|
const E = [], h = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Map(), b = [];
|
|
250
250
|
for (v = g; v--; ) {
|
|
251
251
|
const x = a(r, o, v), _ = t(x);
|
|
252
|
-
let
|
|
253
|
-
|
|
252
|
+
let C = u.get(_);
|
|
253
|
+
C ? b.push(() => C.p(x, e)) : (C = l(_, x), C.c()), h.set(_, E[v] = C), _ in w && m.set(_, Math.abs(v - w[_]));
|
|
254
254
|
}
|
|
255
255
|
const L = /* @__PURE__ */ new Set(), M = /* @__PURE__ */ new Set();
|
|
256
256
|
function S(x) {
|
|
257
257
|
q(x, 1), x.m(s, d), u.set(x.key, x), d = x.first, g--;
|
|
258
258
|
}
|
|
259
259
|
for (; f && g; ) {
|
|
260
|
-
const x = E[g - 1], _ = n[f - 1],
|
|
261
|
-
x === _ ? (d = x.first, f--, g--) : h.has(O) ? !u.has(
|
|
260
|
+
const x = E[g - 1], _ = n[f - 1], C = x.key, O = _.key;
|
|
261
|
+
x === _ ? (d = x.first, f--, g--) : h.has(O) ? !u.has(C) || L.has(C) ? S(x) : M.has(O) ? f-- : m.get(C) > m.get(O) ? (M.add(C), S(x)) : (L.add(O), f--) : (c(_, u), f--);
|
|
262
262
|
}
|
|
263
263
|
for (; f--; ) {
|
|
264
264
|
const x = n[f];
|
|
@@ -272,21 +272,21 @@ function Le(n) {
|
|
|
272
272
|
}
|
|
273
273
|
function he(n, e, t) {
|
|
274
274
|
const { fragment: i, after_update: r } = n.$$;
|
|
275
|
-
i && i.m(e, t),
|
|
276
|
-
const o = n.$$.on_mount.map(
|
|
275
|
+
i && i.m(e, t), Tt(() => {
|
|
276
|
+
const o = n.$$.on_mount.map(Ni).filter(Ti);
|
|
277
277
|
n.$$.on_destroy ? n.$$.on_destroy.push(...o) : me(o), n.$$.on_mount = [];
|
|
278
|
-
}), r.forEach(
|
|
278
|
+
}), r.forEach(Tt);
|
|
279
279
|
}
|
|
280
280
|
function ge(n, e) {
|
|
281
281
|
const t = n.$$;
|
|
282
282
|
t.fragment !== null && (kn(t.after_update), me(t.on_destroy), t.fragment && t.fragment.d(e), t.on_destroy = t.fragment = null, t.ctx = []);
|
|
283
283
|
}
|
|
284
|
-
function
|
|
285
|
-
n.$$.dirty[0] === -1 && (
|
|
284
|
+
function Tn(n, e) {
|
|
285
|
+
n.$$.dirty[0] === -1 && (We.push(n), xn(), n.$$.dirty.fill(0)), n.$$.dirty[e / 31 | 0] |= 1 << e % 31;
|
|
286
286
|
}
|
|
287
287
|
function Me(n, e, t, i, r, o, u = null, s = [-1]) {
|
|
288
288
|
const c = Qe;
|
|
289
|
-
|
|
289
|
+
je(n);
|
|
290
290
|
const l = n.$$ = {
|
|
291
291
|
fragment: null,
|
|
292
292
|
ctx: [],
|
|
@@ -294,7 +294,7 @@ function Me(n, e, t, i, r, o, u = null, s = [-1]) {
|
|
|
294
294
|
props: o,
|
|
295
295
|
update: B,
|
|
296
296
|
not_equal: r,
|
|
297
|
-
bound:
|
|
297
|
+
bound: Ht(),
|
|
298
298
|
// lifecycle
|
|
299
299
|
on_mount: [],
|
|
300
300
|
on_destroy: [],
|
|
@@ -303,7 +303,7 @@ function Me(n, e, t, i, r, o, u = 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: Ht(),
|
|
307
307
|
dirty: s,
|
|
308
308
|
skip_bound: !1,
|
|
309
309
|
root: e.target || c.$$.root
|
|
@@ -312,18 +312,18 @@ function Me(n, e, t, i, r, o, u = null, s = [-1]) {
|
|
|
312
312
|
let d = !1;
|
|
313
313
|
if (l.ctx = t ? t(n, e.props || {}, (a, f, ...g) => {
|
|
314
314
|
const v = g.length ? g[0] : f;
|
|
315
|
-
return l.ctx && r(l.ctx[a], l.ctx[a] = v) && (!l.skip_bound && l.bound[a] && l.bound[a](v), d &&
|
|
315
|
+
return l.ctx && r(l.ctx[a], l.ctx[a] = v) && (!l.skip_bound && l.bound[a] && l.bound[a](v), d && Tn(n, a)), f;
|
|
316
316
|
}) : [], l.update(), d = !0, me(l.before_update), l.fragment = i ? i(l.ctx) : !1, e.target) {
|
|
317
317
|
if (e.hydrate) {
|
|
318
|
-
const a =
|
|
318
|
+
const a = wn(e.target);
|
|
319
319
|
l.fragment && l.fragment.l(a), a.forEach(D);
|
|
320
320
|
} else
|
|
321
321
|
l.fragment && l.fragment.c();
|
|
322
|
-
e.intro && q(n.$$.fragment), he(n, e.target, e.anchor),
|
|
322
|
+
e.intro && q(n.$$.fragment), he(n, e.target, e.anchor), Ii();
|
|
323
323
|
}
|
|
324
|
-
|
|
324
|
+
je(c);
|
|
325
325
|
}
|
|
326
|
-
class
|
|
326
|
+
class ke {
|
|
327
327
|
constructor() {
|
|
328
328
|
/**
|
|
329
329
|
* ### PRIVATE API
|
|
@@ -353,7 +353,7 @@ class Ce {
|
|
|
353
353
|
* @returns {() => void}
|
|
354
354
|
*/
|
|
355
355
|
$on(e, t) {
|
|
356
|
-
if (!
|
|
356
|
+
if (!Ti(t))
|
|
357
357
|
return B;
|
|
358
358
|
const i = this.$$.callbacks[e] || (this.$$.callbacks[e] = []);
|
|
359
359
|
return i.push(t), () => {
|
|
@@ -366,12 +366,12 @@ class Ce {
|
|
|
366
366
|
* @returns {void}
|
|
367
367
|
*/
|
|
368
368
|
$set(e) {
|
|
369
|
-
this.$$set && !
|
|
369
|
+
this.$$set && !hn(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 Rn = "4";
|
|
373
|
+
typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(Rn);
|
|
374
|
+
function Pn(n) {
|
|
375
375
|
let e, t;
|
|
376
376
|
return {
|
|
377
377
|
c() {
|
|
@@ -388,12 +388,12 @@ function In(n) {
|
|
|
388
388
|
}
|
|
389
389
|
};
|
|
390
390
|
}
|
|
391
|
-
class
|
|
391
|
+
class Oi extends ke {
|
|
392
392
|
constructor(e) {
|
|
393
|
-
super(), Me(this, e, null,
|
|
393
|
+
super(), Me(this, e, null, Pn, xe, {});
|
|
394
394
|
}
|
|
395
395
|
}
|
|
396
|
-
function
|
|
396
|
+
function In(n) {
|
|
397
397
|
let e, t;
|
|
398
398
|
return {
|
|
399
399
|
c() {
|
|
@@ -410,16 +410,16 @@ function On(n) {
|
|
|
410
410
|
}
|
|
411
411
|
};
|
|
412
412
|
}
|
|
413
|
-
class Ai extends
|
|
413
|
+
class Ai extends ke {
|
|
414
414
|
constructor(e) {
|
|
415
|
-
super(), Me(this, e, null,
|
|
415
|
+
super(), Me(this, e, null, In, xe, {});
|
|
416
416
|
}
|
|
417
417
|
}
|
|
418
|
-
function
|
|
418
|
+
function On(n) {
|
|
419
419
|
let e, t;
|
|
420
420
|
return {
|
|
421
421
|
c() {
|
|
422
|
-
e =
|
|
422
|
+
e = W("img"), X(e.src, t = /*iconsBaseUrl*/
|
|
423
423
|
n[3] + "area.svg") || p(e, "src", t), p(
|
|
424
424
|
e,
|
|
425
425
|
"alt",
|
|
@@ -450,7 +450,7 @@ function An(n) {
|
|
|
450
450
|
let e, t;
|
|
451
451
|
return {
|
|
452
452
|
c() {
|
|
453
|
-
e =
|
|
453
|
+
e = W("img"), X(e.src, t = /*iconsBaseUrl*/
|
|
454
454
|
n[3] + "reverse.svg") || p(e, "src", t), p(
|
|
455
455
|
e,
|
|
456
456
|
"alt",
|
|
@@ -477,11 +477,11 @@ function An(n) {
|
|
|
477
477
|
}
|
|
478
478
|
};
|
|
479
479
|
}
|
|
480
|
-
function
|
|
480
|
+
function Wn(n) {
|
|
481
481
|
let e, t;
|
|
482
482
|
return {
|
|
483
483
|
c() {
|
|
484
|
-
e =
|
|
484
|
+
e = W("img"), X(e.src, t = /*iconsBaseUrl*/
|
|
485
485
|
n[3] + "poi.svg") || p(e, "src", t), p(
|
|
486
486
|
e,
|
|
487
487
|
"alt",
|
|
@@ -508,11 +508,11 @@ function zn(n) {
|
|
|
508
508
|
}
|
|
509
509
|
};
|
|
510
510
|
}
|
|
511
|
-
function
|
|
511
|
+
function zn(n) {
|
|
512
512
|
let e, t;
|
|
513
513
|
return {
|
|
514
514
|
c() {
|
|
515
|
-
e =
|
|
515
|
+
e = W("img"), X(e.src, t = /*iconsBaseUrl*/
|
|
516
516
|
n[3] + "postal_code.svg") || p(e, "src", t), p(
|
|
517
517
|
e,
|
|
518
518
|
"alt",
|
|
@@ -539,11 +539,11 @@ function Bn(n) {
|
|
|
539
539
|
}
|
|
540
540
|
};
|
|
541
541
|
}
|
|
542
|
-
function
|
|
542
|
+
function Bn(n) {
|
|
543
543
|
let e, t;
|
|
544
544
|
return {
|
|
545
545
|
c() {
|
|
546
|
-
e =
|
|
546
|
+
e = W("img"), X(e.src, t = /*iconsBaseUrl*/
|
|
547
547
|
n[3] + "street.svg") || p(e, "src", t), p(
|
|
548
548
|
e,
|
|
549
549
|
"alt",
|
|
@@ -570,11 +570,11 @@ function Dn(n) {
|
|
|
570
570
|
}
|
|
571
571
|
};
|
|
572
572
|
}
|
|
573
|
-
function
|
|
573
|
+
function Dn(n) {
|
|
574
574
|
let e, t;
|
|
575
575
|
return {
|
|
576
576
|
c() {
|
|
577
|
-
e =
|
|
577
|
+
e = W("img"), X(e.src, t = /*iconsBaseUrl*/
|
|
578
578
|
n[3] + "road.svg") || p(e, "src", t), p(
|
|
579
579
|
e,
|
|
580
580
|
"alt",
|
|
@@ -601,11 +601,11 @@ function Un(n) {
|
|
|
601
601
|
}
|
|
602
602
|
};
|
|
603
603
|
}
|
|
604
|
-
function
|
|
604
|
+
function Un(n) {
|
|
605
605
|
let e, t;
|
|
606
606
|
return {
|
|
607
607
|
c() {
|
|
608
|
-
e =
|
|
608
|
+
e = W("img"), X(e.src, t = /*iconsBaseUrl*/
|
|
609
609
|
n[3] + "housenumber.svg") || p(e, "src", t), p(
|
|
610
610
|
e,
|
|
611
611
|
"alt",
|
|
@@ -632,11 +632,11 @@ function Fn(n) {
|
|
|
632
632
|
}
|
|
633
633
|
};
|
|
634
634
|
}
|
|
635
|
-
function
|
|
635
|
+
function Fn(n) {
|
|
636
636
|
let e, t, i, r;
|
|
637
637
|
return {
|
|
638
638
|
c() {
|
|
639
|
-
e =
|
|
639
|
+
e = W("img"), X(e.src, t = /*imageUrl*/
|
|
640
640
|
n[5]) || p(e, "src", t), p(
|
|
641
641
|
e,
|
|
642
642
|
"alt",
|
|
@@ -668,11 +668,11 @@ function Gn(n) {
|
|
|
668
668
|
}
|
|
669
669
|
};
|
|
670
670
|
}
|
|
671
|
-
function
|
|
671
|
+
function $t(n) {
|
|
672
672
|
let e, t;
|
|
673
673
|
return {
|
|
674
674
|
c() {
|
|
675
|
-
e =
|
|
675
|
+
e = W("span"), t = _e(
|
|
676
676
|
/*placeType*/
|
|
677
677
|
n[6]
|
|
678
678
|
), p(e, "class", "secondary svelte-ltkwvy");
|
|
@@ -682,7 +682,7 @@ function ei(n) {
|
|
|
682
682
|
},
|
|
683
683
|
p(i, r) {
|
|
684
684
|
r & /*placeType*/
|
|
685
|
-
64 &&
|
|
685
|
+
64 && qe(
|
|
686
686
|
t,
|
|
687
687
|
/*placeType*/
|
|
688
688
|
i[6]
|
|
@@ -693,7 +693,7 @@ function ei(n) {
|
|
|
693
693
|
}
|
|
694
694
|
};
|
|
695
695
|
}
|
|
696
|
-
function
|
|
696
|
+
function Gn(n) {
|
|
697
697
|
let e, t, i, r, o, u, s, c, l, d = (
|
|
698
698
|
/*isReverse*/
|
|
699
699
|
(n[7] ? (
|
|
@@ -706,7 +706,7 @@ function jn(n) {
|
|
|
706
706
|
), a, f, g = (
|
|
707
707
|
/*showPlaceType*/
|
|
708
708
|
n[2] === "always" || /*showPlaceType*/
|
|
709
|
-
n[2] && !/*feature*/
|
|
709
|
+
n[2] !== "never" && !/*feature*/
|
|
710
710
|
n[0].address && !/*feature*/
|
|
711
711
|
n[0].id.startsWith("road.") && !/*feature*/
|
|
712
712
|
n[0].id.startsWith("address.") && !/*feature*/
|
|
@@ -721,28 +721,28 @@ function jn(n) {
|
|
|
721
721
|
n[0].place_name.replace(/[^,]*,?\s*/, "")
|
|
722
722
|
)) + ""
|
|
723
723
|
), h, m, b;
|
|
724
|
-
function L(_,
|
|
725
|
-
return
|
|
726
|
-
1 && (t = null),
|
|
727
|
-
1 && (i = null),
|
|
728
|
-
1 && (r = null),
|
|
724
|
+
function L(_, C) {
|
|
725
|
+
return C & /*feature*/
|
|
726
|
+
1 && (t = null), C & /*feature*/
|
|
727
|
+
1 && (i = null), C & /*feature*/
|
|
728
|
+
1 && (r = null), C & /*feature*/
|
|
729
729
|
1 && (o = null), /*imageUrl*/
|
|
730
|
-
_[5] ?
|
|
730
|
+
_[5] ? Fn : (
|
|
731
731
|
/*feature*/
|
|
732
|
-
_[0].address ?
|
|
733
|
-
_[0].id.startsWith("road.")), t ?
|
|
734
|
-
_[0].id.startsWith("address.")), i ?
|
|
735
|
-
_[0].id.startsWith("postal_code.")), r ?
|
|
736
|
-
_[0].id.startsWith("poi.")), o ?
|
|
732
|
+
_[0].address ? Un : (t == null && (t = !!/*feature*/
|
|
733
|
+
_[0].id.startsWith("road.")), t ? Dn : (i == null && (i = !!/*feature*/
|
|
734
|
+
_[0].id.startsWith("address.")), i ? Bn : (r == null && (r = !!/*feature*/
|
|
735
|
+
_[0].id.startsWith("postal_code.")), r ? zn : (o == null && (o = !!/*feature*/
|
|
736
|
+
_[0].id.startsWith("poi.")), o ? Wn : (
|
|
737
737
|
/*isReverse*/
|
|
738
|
-
_[7] ? An :
|
|
738
|
+
_[7] ? An : On
|
|
739
739
|
)))))
|
|
740
740
|
);
|
|
741
741
|
}
|
|
742
|
-
let M = L(n, -1), S = M(n), x = g &&
|
|
742
|
+
let M = L(n, -1), S = M(n), x = g && $t(n);
|
|
743
743
|
return {
|
|
744
744
|
c() {
|
|
745
|
-
e =
|
|
745
|
+
e = W("li"), S.c(), u = ne(), s = W("span"), c = W("span"), l = W("span"), a = _e(d), f = ne(), x && x.c(), v = ne(), w = W("span"), h = _e(E), p(l, "class", "primary svelte-ltkwvy"), p(c, "class", "svelte-ltkwvy"), p(w, "class", "line2 svelte-ltkwvy"), p(s, "class", "texts svelte-ltkwvy"), p(e, "tabindex", "0"), p(
|
|
746
746
|
e,
|
|
747
747
|
"data-selected",
|
|
748
748
|
/*selected*/
|
|
@@ -754,8 +754,8 @@ function jn(n) {
|
|
|
754
754
|
n[1]
|
|
755
755
|
);
|
|
756
756
|
},
|
|
757
|
-
m(_,
|
|
758
|
-
F(_, e,
|
|
757
|
+
m(_, C) {
|
|
758
|
+
F(_, e, C), S.m(e, null), P(e, u), P(e, s), P(s, c), P(c, l), P(l, a), P(c, f), x && x.m(c, null), P(s, v), P(s, w), P(w, h), m || (b = [
|
|
759
759
|
$(
|
|
760
760
|
e,
|
|
761
761
|
"mouseenter",
|
|
@@ -770,8 +770,8 @@ function jn(n) {
|
|
|
770
770
|
)
|
|
771
771
|
], m = !0);
|
|
772
772
|
},
|
|
773
|
-
p(_, [
|
|
774
|
-
M === (M = L(_,
|
|
773
|
+
p(_, [C]) {
|
|
774
|
+
M === (M = L(_, C)) && S ? S.p(_, C) : (S.d(1), S = M(_), S && (S.c(), S.m(e, u))), C & /*feature*/
|
|
775
775
|
1 && d !== (d = /*isReverse*/
|
|
776
776
|
(_[7] ? (
|
|
777
777
|
/*feature*/
|
|
@@ -779,28 +779,28 @@ function jn(n) {
|
|
|
779
779
|
) : (
|
|
780
780
|
/*feature*/
|
|
781
781
|
_[0].place_name.replace(/,.*/, "")
|
|
782
|
-
)) + "") &&
|
|
782
|
+
)) + "") && qe(a, d), C & /*showPlaceType, feature, imageUrl*/
|
|
783
783
|
37 && (g = /*showPlaceType*/
|
|
784
784
|
_[2] === "always" || /*showPlaceType*/
|
|
785
|
-
_[2] && !/*feature*/
|
|
785
|
+
_[2] !== "never" && !/*feature*/
|
|
786
786
|
_[0].address && !/*feature*/
|
|
787
787
|
_[0].id.startsWith("road.") && !/*feature*/
|
|
788
788
|
_[0].id.startsWith("address.") && !/*feature*/
|
|
789
789
|
_[0].id.startsWith("postal_code.") && (!/*feature*/
|
|
790
790
|
_[0].id.startsWith("poi.") || !/*imageUrl*/
|
|
791
791
|
_[5]) && !/*isReverse*/
|
|
792
|
-
_[7]), g ? x ? x.p(_,
|
|
792
|
+
_[7]), g ? x ? x.p(_, C) : (x = $t(_), x.c(), x.m(c, null)) : x && (x.d(1), x = null), C & /*feature*/
|
|
793
793
|
1 && E !== (E = /*isReverse*/
|
|
794
794
|
(_[7] ? "" : (
|
|
795
795
|
/*feature*/
|
|
796
796
|
_[0].place_name.replace(/[^,]*,?\s*/, "")
|
|
797
|
-
)) + "") &&
|
|
797
|
+
)) + "") && qe(h, E), C & /*selected*/
|
|
798
798
|
2 && p(
|
|
799
799
|
e,
|
|
800
800
|
"data-selected",
|
|
801
801
|
/*selected*/
|
|
802
802
|
_[1]
|
|
803
|
-
),
|
|
803
|
+
), C & /*selected*/
|
|
804
804
|
2 && le(
|
|
805
805
|
e,
|
|
806
806
|
"selected",
|
|
@@ -815,7 +815,7 @@ function jn(n) {
|
|
|
815
815
|
}
|
|
816
816
|
};
|
|
817
817
|
}
|
|
818
|
-
function
|
|
818
|
+
function jn(n, e, t) {
|
|
819
819
|
var b;
|
|
820
820
|
let i, r, { feature: o } = e, { selected: u = !1 } = e, { showPlaceType: s } = e, { missingIconsCache: c } = e, { iconsBaseUrl: l } = e;
|
|
821
821
|
const d = (b = o.properties) == null ? void 0 : b.categories;
|
|
@@ -824,10 +824,10 @@ function qn(n, e, t) {
|
|
|
824
824
|
f && c.add(f), t(10, g++, g);
|
|
825
825
|
}
|
|
826
826
|
function E(L) {
|
|
827
|
-
|
|
827
|
+
Kt.call(this, n, L);
|
|
828
828
|
}
|
|
829
829
|
function h(L) {
|
|
830
|
-
|
|
830
|
+
Kt.call(this, n, L);
|
|
831
831
|
}
|
|
832
832
|
const m = () => w();
|
|
833
833
|
return n.$$set = (L) => {
|
|
@@ -859,9 +859,9 @@ function qn(n, e, t) {
|
|
|
859
859
|
m
|
|
860
860
|
];
|
|
861
861
|
}
|
|
862
|
-
class
|
|
862
|
+
class qn extends ke {
|
|
863
863
|
constructor(e) {
|
|
864
|
-
super(), Me(this, e,
|
|
864
|
+
super(), Me(this, e, jn, Gn, xe, {
|
|
865
865
|
feature: 0,
|
|
866
866
|
selected: 1,
|
|
867
867
|
showPlaceType: 2,
|
|
@@ -874,7 +874,7 @@ function Qn(n) {
|
|
|
874
874
|
let e;
|
|
875
875
|
return {
|
|
876
876
|
c() {
|
|
877
|
-
e =
|
|
877
|
+
e = W("div"), e.innerHTML = '<svg viewBox="0 0 18 18" width="24" height="24" class="svelte-7cmwmc"><path fill="#333" d="M4.4 4.4l.8.8c2.1-2.1 5.5-2.1 7.6 0l.8-.8c-2.5-2.5-6.7-2.5-9.2 0z"></path><path opacity=".1" d="M12.8 12.9c-2.1 2.1-5.5 2.1-7.6 0-2.1-2.1-2.1-5.5 0-7.7l-.8-.8c-2.5 2.5-2.5 6.7 0 9.2s6.6 2.5 9.2 0 2.5-6.6 0-9.2l-.8.8c2.2 2.1 2.2 5.6 0 7.7z"></path></svg>', p(e, "class", "svelte-7cmwmc");
|
|
878
878
|
},
|
|
879
879
|
m(t, i) {
|
|
880
880
|
F(t, e, i);
|
|
@@ -887,12 +887,12 @@ function Qn(n) {
|
|
|
887
887
|
}
|
|
888
888
|
};
|
|
889
889
|
}
|
|
890
|
-
class
|
|
890
|
+
class Zn extends ke {
|
|
891
891
|
constructor(e) {
|
|
892
892
|
super(), Me(this, e, null, Qn, xe, {});
|
|
893
893
|
}
|
|
894
894
|
}
|
|
895
|
-
function
|
|
895
|
+
function Hn(n) {
|
|
896
896
|
let e, t, i;
|
|
897
897
|
return {
|
|
898
898
|
c() {
|
|
@@ -936,18 +936,18 @@ function Vn(n) {
|
|
|
936
936
|
}
|
|
937
937
|
};
|
|
938
938
|
}
|
|
939
|
-
function
|
|
939
|
+
function Vn(n, e, t) {
|
|
940
940
|
let { displayIn: i } = e;
|
|
941
941
|
return n.$$set = (r) => {
|
|
942
942
|
"displayIn" in r && t(0, i = r.displayIn);
|
|
943
943
|
}, [i];
|
|
944
944
|
}
|
|
945
|
-
class
|
|
945
|
+
class Yn extends ke {
|
|
946
946
|
constructor(e) {
|
|
947
|
-
super(), Me(this, e,
|
|
947
|
+
super(), Me(this, e, Vn, Hn, xe, { displayIn: 0 });
|
|
948
948
|
}
|
|
949
949
|
}
|
|
950
|
-
function
|
|
950
|
+
function Kn(n) {
|
|
951
951
|
let e, t;
|
|
952
952
|
return {
|
|
953
953
|
c() {
|
|
@@ -964,12 +964,12 @@ function Xn(n) {
|
|
|
964
964
|
}
|
|
965
965
|
};
|
|
966
966
|
}
|
|
967
|
-
class
|
|
967
|
+
class Xn extends ke {
|
|
968
968
|
constructor(e) {
|
|
969
|
-
super(), Me(this, e, null,
|
|
969
|
+
super(), Me(this, e, null, Kn, xe, {});
|
|
970
970
|
}
|
|
971
971
|
}
|
|
972
|
-
function
|
|
972
|
+
function Jn(n) {
|
|
973
973
|
let e, t, i;
|
|
974
974
|
return {
|
|
975
975
|
c() {
|
|
@@ -986,31 +986,31 @@ function $n(n) {
|
|
|
986
986
|
}
|
|
987
987
|
};
|
|
988
988
|
}
|
|
989
|
-
class
|
|
989
|
+
class $n extends ke {
|
|
990
990
|
constructor(e) {
|
|
991
|
-
super(), Me(this, e, null,
|
|
991
|
+
super(), Me(this, e, null, Jn, xe, {});
|
|
992
992
|
}
|
|
993
993
|
}
|
|
994
|
-
function
|
|
994
|
+
function er(n, e, t) {
|
|
995
995
|
const i = e[1], r = e[0], o = i - r;
|
|
996
996
|
return n === i && t ? n : ((n - r) % o + o) % o + r;
|
|
997
997
|
}
|
|
998
|
-
function
|
|
998
|
+
function ct(n) {
|
|
999
999
|
const e = [...n];
|
|
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 tr(n, e, t) {
|
|
1004
1004
|
const i = n == null ? void 0 : n.getCenterAndZoom();
|
|
1005
1005
|
for (const r of e ?? [])
|
|
1006
1006
|
if (!(i && (r.minZoom != null && r.minZoom > i[0] || r.maxZoom != null && r.maxZoom < i[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 ir(n, 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 ir(n, e, t) {
|
|
|
1045
1045
|
return i[1].toFixed(6) + "," + i[2].toFixed(6);
|
|
1046
1046
|
}
|
|
1047
1047
|
}
|
|
1048
|
-
const
|
|
1049
|
-
function
|
|
1048
|
+
const ir = /^(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, ei = /^([+-]?[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,})$/, ti = /^(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, ii = /^(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, ni = /^(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, ri = /^(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 nr(n) {
|
|
1050
1050
|
if (!["DMS", "DM", "DD"].includes(n))
|
|
1051
1051
|
throw new Error("invalid format specified");
|
|
1052
1052
|
if (this.decimalCoordinates && this.decimalCoordinates.trim()) {
|
|
@@ -1055,7 +1055,7 @@ function rr(n) {
|
|
|
1055
1055
|
n == "DD" && (c = `${r}° ${u}, ${o}° ${s}`);
|
|
1056
1056
|
const l = Math.floor(r), d = Math.floor(o), a = (r - l) * 60, f = (o - d) * 60;
|
|
1057
1057
|
if (n == "DM") {
|
|
1058
|
-
let g =
|
|
1058
|
+
let g = oi(a, 3).toFixed(3).padStart(6, "0"), v = oi(f, 3).toFixed(3).padStart(6, "0");
|
|
1059
1059
|
g.endsWith(".000") && v.endsWith(".000") && (g = g.replace(/\.000$/, ""), v = v.replace(/\.000$/, "")), c = `${l}° ${g}' ${u}, ${d}° ${v}' ${s}`;
|
|
1060
1060
|
}
|
|
1061
1061
|
if (n == "DMS") {
|
|
@@ -1068,22 +1068,22 @@ function rr(n) {
|
|
|
1068
1068
|
} else
|
|
1069
1069
|
throw new Error("no decimal coordinates to convert");
|
|
1070
1070
|
}
|
|
1071
|
-
function
|
|
1071
|
+
function oi(n, e) {
|
|
1072
1072
|
const t = Math.pow(10, e);
|
|
1073
1073
|
return Math.round((n + Number.EPSILON) * t) / t;
|
|
1074
1074
|
}
|
|
1075
|
-
function
|
|
1075
|
+
function Wt(n, e) {
|
|
1076
1076
|
e || (e = 5), n = n.replace(/\s+/g, " ").trim();
|
|
1077
1077
|
let t = null, i = null, r = "", o = "", u = null, s = [], c = !1;
|
|
1078
|
-
if (
|
|
1078
|
+
if (ir.test(n))
|
|
1079
1079
|
throw new Error("invalid coordinate value");
|
|
1080
|
-
if (
|
|
1081
|
-
if (s =
|
|
1080
|
+
if (ei.test(n))
|
|
1081
|
+
if (s = ei.exec(n), c = Fe(s), c)
|
|
1082
1082
|
t = Math.abs(s[1]) + s[2] / 60, Number(s[1]) < 0 && (t *= -1), i = Math.abs(s[3]) + s[4] / 60, Number(s[3]) < 0 && (i *= -1), u = "DM";
|
|
1083
1083
|
else
|
|
1084
1084
|
throw new Error("invalid coordinate format");
|
|
1085
|
-
else if (
|
|
1086
|
-
if (s =
|
|
1085
|
+
else if (ti.test(n))
|
|
1086
|
+
if (s = ti.exec(n), c = Fe(s), c) {
|
|
1087
1087
|
if (t = s[2], i = s[6], t.includes(",") && (t = t.replace(",", ".")), i.includes(",") && (i = i.replace(",", ".")), u = "DD", Number(Math.round(t)) == Number(t))
|
|
1088
1088
|
throw new Error("integer only coordinate provided");
|
|
1089
1089
|
if (Number(Math.round(i)) == Number(i))
|
|
@@ -1091,18 +1091,18 @@ function zt(n, 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 (ii.test(n))
|
|
1095
|
+
if (s = ii.exec(n), c = Fe(s), c)
|
|
1096
1096
|
t = Math.abs(parseInt(s[2])), s[4] && (t += s[4] / 60, u = "DM"), s[6] && (t += s[6].replace(",", ".") / 3600, u = "DMS"), parseInt(s[2]) < 0 && (t = -1 * t), i = Math.abs(parseInt(s[9])), s[11] && (i += s[11] / 60), s[13] && (i += s[13].replace(",", ".") / 3600), parseInt(s[9]) < 0 && (i = -1 * i), 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 (ni.test(n))
|
|
1100
|
+
if (s = ni.exec(n), c = Fe(s), c)
|
|
1101
1101
|
t = Math.abs(parseInt(s[2])), s[4] && (t += s[4] / 60, u = "DM"), s[6] && (t += s[6] / 3600, u = "DMS"), parseInt(s[2]) < 0 && (t = -1 * t), i = Math.abs(parseInt(s[10])), s[12] && (i += s[12] / 60), s[14] && (i += s[14] / 3600), parseInt(s[10]) < 0 && (i = -1 * i), 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 (ri.test(n)) {
|
|
1105
|
+
if (s = ri.exec(n), c = Fe(s), s.filter((l) => l).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, u = "DM"), s[6] && (t += s[6].replace(",", ".") / 3600, u = "DMS"), parseInt(s[2]) < 0 && (t = -1 * t), i = Math.abs(parseInt(s[10])), s[12] && (i += s[12].replace(",", ".") / 60), s[14] && (i += s[14].replace(",", ".") / 3600), parseInt(s[10]) < 0 && (i = -1 * i), s[1] ? (r = s[1], o = s[9]) : s[8] && (r = s[8], o = s[16]);
|
|
@@ -1156,13 +1156,13 @@ function zt(n, e) {
|
|
|
1156
1156
|
decimalLongitude: i,
|
|
1157
1157
|
decimalCoordinates: `${t},${i}`,
|
|
1158
1158
|
originalFormat: u,
|
|
1159
|
-
closeEnough:
|
|
1160
|
-
toCoordinateFormat:
|
|
1159
|
+
closeEnough: rr,
|
|
1160
|
+
toCoordinateFormat: nr
|
|
1161
1161
|
});
|
|
1162
1162
|
} else
|
|
1163
1163
|
throw new Error("coordinates pattern match failed");
|
|
1164
1164
|
}
|
|
1165
|
-
function
|
|
1165
|
+
function Fe(n) {
|
|
1166
1166
|
if (!isNaN(n[0]))
|
|
1167
1167
|
return !1;
|
|
1168
1168
|
const e = [...n];
|
|
@@ -1181,28 +1181,28 @@ function Ge(n) {
|
|
|
1181
1181
|
}
|
|
1182
1182
|
return !0;
|
|
1183
1183
|
}
|
|
1184
|
-
function
|
|
1184
|
+
function si(n, e) {
|
|
1185
1185
|
const t = Math.abs(n - e);
|
|
1186
1186
|
return Number(t.toFixed(6)) <= 1e-5;
|
|
1187
1187
|
}
|
|
1188
|
-
function
|
|
1188
|
+
function rr(n) {
|
|
1189
1189
|
if (!n)
|
|
1190
1190
|
throw new Error("coords must be provided");
|
|
1191
1191
|
if (n.includes(",")) {
|
|
1192
1192
|
const e = n.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 si(this.decimalLatitude, Number(e[0])) && si(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 or = Object.freeze({
|
|
1200
1200
|
DMS: "DMS",
|
|
1201
1201
|
DM: "DM",
|
|
1202
1202
|
DD: "DD"
|
|
1203
1203
|
});
|
|
1204
|
-
|
|
1205
|
-
const
|
|
1204
|
+
Wt.to = or;
|
|
1205
|
+
const sr = [
|
|
1206
1206
|
{
|
|
1207
1207
|
verbatimCoordinates: "40.123, -74.123",
|
|
1208
1208
|
verbatimLatitude: "40.123",
|
|
@@ -1343,10 +1343,10 @@ const lr = [
|
|
|
1343
1343
|
verbatimLatitude: "40 7 22.8",
|
|
1344
1344
|
verbatimLongitude: "-74 7 22.8"
|
|
1345
1345
|
}
|
|
1346
|
-
],
|
|
1346
|
+
], lr = {
|
|
1347
1347
|
decimalLatitude: 40.123,
|
|
1348
1348
|
decimalLongitude: -74.123
|
|
1349
|
-
},
|
|
1349
|
+
}, ur = [
|
|
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 lr = [
|
|
|
1431
1431
|
decimalLatitude: -18.4,
|
|
1432
1432
|
decimalLongitude: 22.75
|
|
1433
1433
|
}
|
|
1434
|
-
],
|
|
1434
|
+
], ar = [
|
|
1435
1435
|
{
|
|
1436
1436
|
verbatimCoordinates: "10.432342S 10.6345345E",
|
|
1437
1437
|
verbatimLatitude: "10.432342S",
|
|
@@ -1566,22 +1566,22 @@ const lr = [
|
|
|
1566
1566
|
decimalLongitude: 18.33453
|
|
1567
1567
|
}
|
|
1568
1568
|
];
|
|
1569
|
-
function
|
|
1569
|
+
function cr() {
|
|
1570
1570
|
const n = [];
|
|
1571
|
-
return
|
|
1572
|
-
e.decimalLatitude ? n.push(e) : n.push({ ...e, ...
|
|
1573
|
-
}), [...n, ...
|
|
1574
|
-
}
|
|
1575
|
-
const
|
|
1576
|
-
|
|
1577
|
-
const
|
|
1578
|
-
function
|
|
1571
|
+
return sr.forEach((e) => {
|
|
1572
|
+
e.decimalLatitude ? n.push(e) : n.push({ ...e, ...lr });
|
|
1573
|
+
}), [...n, ...ur, ...ar];
|
|
1574
|
+
}
|
|
1575
|
+
const fr = cr();
|
|
1576
|
+
Wt.formats = fr.map((n) => n.verbatimCoordinates);
|
|
1577
|
+
const dr = Wt;
|
|
1578
|
+
function li(n, e, t) {
|
|
1579
1579
|
const i = n.slice();
|
|
1580
|
-
return i[
|
|
1580
|
+
return i[86] = e[t], i[88] = t, i;
|
|
1581
1581
|
}
|
|
1582
|
-
function
|
|
1582
|
+
function ui(n) {
|
|
1583
1583
|
let e, t;
|
|
1584
|
-
return e = new
|
|
1584
|
+
return e = new Zn({}), {
|
|
1585
1585
|
c() {
|
|
1586
1586
|
Le(e.$$.fragment);
|
|
1587
1587
|
},
|
|
@@ -1599,11 +1599,11 @@ function ai(n) {
|
|
|
1599
1599
|
}
|
|
1600
1600
|
};
|
|
1601
1601
|
}
|
|
1602
|
-
function
|
|
1602
|
+
function ai(n) {
|
|
1603
1603
|
let e, t, i, r, o;
|
|
1604
|
-
return t = new
|
|
1604
|
+
return t = new Xn({}), {
|
|
1605
1605
|
c() {
|
|
1606
|
-
e =
|
|
1606
|
+
e = W("button"), Le(t.$$.fragment), p(e, "type", "button"), p(
|
|
1607
1607
|
e,
|
|
1608
1608
|
"title",
|
|
1609
1609
|
/*reverseButtonTitle*/
|
|
@@ -1620,7 +1620,7 @@ function ci(n) {
|
|
|
1620
1620
|
e,
|
|
1621
1621
|
"click",
|
|
1622
1622
|
/*click_handler_2*/
|
|
1623
|
-
n[
|
|
1623
|
+
n[70]
|
|
1624
1624
|
), r = !0);
|
|
1625
1625
|
},
|
|
1626
1626
|
p(u, s) {
|
|
@@ -1649,24 +1649,24 @@ function ci(n) {
|
|
|
1649
1649
|
}
|
|
1650
1650
|
};
|
|
1651
1651
|
}
|
|
1652
|
-
function
|
|
1653
|
-
let e, t = [], i = /* @__PURE__ */ new Map(), r, o, u, s =
|
|
1652
|
+
function hr(n) {
|
|
1653
|
+
let e, t = [], i = /* @__PURE__ */ new Map(), r, o, u, s = Jt(
|
|
1654
1654
|
/*listFeatures*/
|
|
1655
1655
|
n[14]
|
|
1656
1656
|
);
|
|
1657
1657
|
const c = (l) => (
|
|
1658
1658
|
/*feature*/
|
|
1659
|
-
l[
|
|
1660
|
-
(l[
|
|
1661
|
-
l[
|
|
1659
|
+
l[86].id + /*feature*/
|
|
1660
|
+
(l[86].address ? "," + /*feature*/
|
|
1661
|
+
l[86].address : "")
|
|
1662
1662
|
);
|
|
1663
1663
|
for (let l = 0; l < s.length; l += 1) {
|
|
1664
|
-
let d =
|
|
1665
|
-
i.set(a, t[l] =
|
|
1664
|
+
let d = li(n, s, l), a = c(d);
|
|
1665
|
+
i.set(a, t[l] = ci(a, d));
|
|
1666
1666
|
}
|
|
1667
1667
|
return {
|
|
1668
1668
|
c() {
|
|
1669
|
-
e =
|
|
1669
|
+
e = W("ul");
|
|
1670
1670
|
for (let l = 0; l < t.length; l += 1)
|
|
1671
1671
|
t[l].c();
|
|
1672
1672
|
p(e, "class", "options svelte-bz0zu3");
|
|
@@ -1680,22 +1680,22 @@ function gr(n) {
|
|
|
1680
1680
|
e,
|
|
1681
1681
|
"mouseleave",
|
|
1682
1682
|
/*mouseleave_handler*/
|
|
1683
|
-
n[
|
|
1683
|
+
n[74]
|
|
1684
1684
|
),
|
|
1685
1685
|
$(
|
|
1686
1686
|
e,
|
|
1687
1687
|
"blur",
|
|
1688
1688
|
/*blur_handler_1*/
|
|
1689
|
-
n[
|
|
1689
|
+
n[75]
|
|
1690
1690
|
)
|
|
1691
1691
|
], o = !0);
|
|
1692
1692
|
},
|
|
1693
1693
|
p(l, d) {
|
|
1694
1694
|
d[0] & /*listFeatures, showPlaceType, selectedItemIndex, missingIconsCache, iconsBaseUrl, pick*/
|
|
1695
|
-
17880064 && (s =
|
|
1695
|
+
17880064 && (s = Jt(
|
|
1696
1696
|
/*listFeatures*/
|
|
1697
1697
|
l[14]
|
|
1698
|
-
),
|
|
1698
|
+
), lt(), t = Nn(t, d, c, 1, l, s, i, e, Cn, ci, null, li), ut());
|
|
1699
1699
|
},
|
|
1700
1700
|
i(l) {
|
|
1701
1701
|
if (!r) {
|
|
@@ -1717,11 +1717,11 @@ function gr(n) {
|
|
|
1717
1717
|
}
|
|
1718
1718
|
};
|
|
1719
1719
|
}
|
|
1720
|
-
function
|
|
1720
|
+
function gr(n) {
|
|
1721
1721
|
let e, t, i, r, o, u;
|
|
1722
1722
|
return t = new Ai({}), {
|
|
1723
1723
|
c() {
|
|
1724
|
-
e =
|
|
1724
|
+
e = W("div"), Le(t.$$.fragment), i = ne(), r = W("div"), o = _e(
|
|
1725
1725
|
/*noResultsMessage*/
|
|
1726
1726
|
n[7]
|
|
1727
1727
|
), p(r, "class", "svelte-bz0zu3"), p(e, "class", "no-results svelte-bz0zu3");
|
|
@@ -1731,7 +1731,7 @@ function mr(n) {
|
|
|
1731
1731
|
},
|
|
1732
1732
|
p(s, c) {
|
|
1733
1733
|
(!u || c[0] & /*noResultsMessage*/
|
|
1734
|
-
128) &&
|
|
1734
|
+
128) && qe(
|
|
1735
1735
|
o,
|
|
1736
1736
|
/*noResultsMessage*/
|
|
1737
1737
|
s[7]
|
|
@@ -1748,7 +1748,7 @@ function mr(n) {
|
|
|
1748
1748
|
}
|
|
1749
1749
|
};
|
|
1750
1750
|
}
|
|
1751
|
-
function
|
|
1751
|
+
function mr(n) {
|
|
1752
1752
|
let e = "", t;
|
|
1753
1753
|
return {
|
|
1754
1754
|
c() {
|
|
@@ -1765,26 +1765,26 @@ function yr(n) {
|
|
|
1765
1765
|
}
|
|
1766
1766
|
};
|
|
1767
1767
|
}
|
|
1768
|
-
function
|
|
1768
|
+
function yr(n) {
|
|
1769
1769
|
let e, t, i, r, o, u, s, c, l, d, a;
|
|
1770
|
-
return t = new Ai({}), c = new
|
|
1770
|
+
return t = new Ai({}), c = new Oi({}), {
|
|
1771
1771
|
c() {
|
|
1772
|
-
e =
|
|
1772
|
+
e = W("div"), Le(t.$$.fragment), i = ne(), r = W("div"), o = _e(
|
|
1773
1773
|
/*errorMessage*/
|
|
1774
1774
|
n[6]
|
|
1775
|
-
), u = ne(), s =
|
|
1775
|
+
), u = ne(), s = W("button"), Le(c.$$.fragment), p(r, "class", "svelte-bz0zu3"), p(s, "class", "svelte-bz0zu3"), p(e, "class", "error svelte-bz0zu3");
|
|
1776
1776
|
},
|
|
1777
1777
|
m(f, g) {
|
|
1778
1778
|
F(f, e, g), he(t, e, null), P(e, i), P(e, r), P(r, o), P(e, u), P(e, s), he(c, s, null), l = !0, d || (a = $(
|
|
1779
1779
|
s,
|
|
1780
1780
|
"click",
|
|
1781
1781
|
/*click_handler_3*/
|
|
1782
|
-
n[
|
|
1782
|
+
n[71]
|
|
1783
1783
|
), d = !0);
|
|
1784
1784
|
},
|
|
1785
1785
|
p(f, g) {
|
|
1786
1786
|
(!l || g[0] & /*errorMessage*/
|
|
1787
|
-
64) &&
|
|
1787
|
+
64) && qe(
|
|
1788
1788
|
o,
|
|
1789
1789
|
/*errorMessage*/
|
|
1790
1790
|
f[6]
|
|
@@ -1801,31 +1801,31 @@ function vr(n) {
|
|
|
1801
1801
|
}
|
|
1802
1802
|
};
|
|
1803
1803
|
}
|
|
1804
|
-
function
|
|
1804
|
+
function ci(n, e) {
|
|
1805
1805
|
let t, i, r;
|
|
1806
1806
|
function o() {
|
|
1807
1807
|
return (
|
|
1808
1808
|
/*mouseenter_handler*/
|
|
1809
|
-
e[
|
|
1809
|
+
e[72](
|
|
1810
1810
|
/*i*/
|
|
1811
|
-
e[
|
|
1811
|
+
e[88]
|
|
1812
1812
|
)
|
|
1813
1813
|
);
|
|
1814
1814
|
}
|
|
1815
1815
|
function u() {
|
|
1816
1816
|
return (
|
|
1817
1817
|
/*focus_handler_1*/
|
|
1818
|
-
e[
|
|
1818
|
+
e[73](
|
|
1819
1819
|
/*feature*/
|
|
1820
|
-
e[
|
|
1820
|
+
e[86]
|
|
1821
1821
|
)
|
|
1822
1822
|
);
|
|
1823
1823
|
}
|
|
1824
|
-
return i = new
|
|
1824
|
+
return i = new qn({
|
|
1825
1825
|
props: {
|
|
1826
1826
|
feature: (
|
|
1827
1827
|
/*feature*/
|
|
1828
|
-
e[
|
|
1828
|
+
e[86]
|
|
1829
1829
|
),
|
|
1830
1830
|
showPlaceType: (
|
|
1831
1831
|
/*showPlaceType*/
|
|
@@ -1834,7 +1834,7 @@ function fi(n, e) {
|
|
|
1834
1834
|
selected: (
|
|
1835
1835
|
/*selectedItemIndex*/
|
|
1836
1836
|
e[15] === /*i*/
|
|
1837
|
-
e[
|
|
1837
|
+
e[88]
|
|
1838
1838
|
),
|
|
1839
1839
|
missingIconsCache: (
|
|
1840
1840
|
/*missingIconsCache*/
|
|
@@ -1849,7 +1849,7 @@ function fi(n, e) {
|
|
|
1849
1849
|
key: n,
|
|
1850
1850
|
first: null,
|
|
1851
1851
|
c() {
|
|
1852
|
-
t =
|
|
1852
|
+
t = pn(), Le(i.$$.fragment), this.first = t;
|
|
1853
1853
|
},
|
|
1854
1854
|
m(s, c) {
|
|
1855
1855
|
F(s, t, c), he(i, s, c), r = !0;
|
|
@@ -1859,12 +1859,12 @@ function fi(n, e) {
|
|
|
1859
1859
|
const l = {};
|
|
1860
1860
|
c[0] & /*listFeatures*/
|
|
1861
1861
|
16384 && (l.feature = /*feature*/
|
|
1862
|
-
e[
|
|
1862
|
+
e[86]), c[0] & /*showPlaceType*/
|
|
1863
1863
|
1024 && (l.showPlaceType = /*showPlaceType*/
|
|
1864
1864
|
e[10]), c[0] & /*selectedItemIndex, listFeatures*/
|
|
1865
1865
|
49152 && (l.selected = /*selectedItemIndex*/
|
|
1866
1866
|
e[15] === /*i*/
|
|
1867
|
-
e[
|
|
1867
|
+
e[88]), c[0] & /*iconsBaseUrl*/
|
|
1868
1868
|
4096 && (l.iconsBaseUrl = /*iconsBaseUrl*/
|
|
1869
1869
|
e[12]), i.$set(l);
|
|
1870
1870
|
},
|
|
@@ -1879,46 +1879,46 @@ function fi(n, e) {
|
|
|
1879
1879
|
}
|
|
1880
1880
|
};
|
|
1881
1881
|
}
|
|
1882
|
-
function
|
|
1882
|
+
function vr(n) {
|
|
1883
1883
|
let e, t, i, r, o, u, s, c, l, d, a, f, g, v, w, E, h, m, b, L, M, S = !1;
|
|
1884
|
-
o = new
|
|
1884
|
+
o = new $n({}), a = new Oi({});
|
|
1885
1885
|
let x = (
|
|
1886
1886
|
/*abortController*/
|
|
1887
|
-
n[19] &&
|
|
1887
|
+
n[19] && ui()
|
|
1888
1888
|
), _ = (
|
|
1889
1889
|
/*enableReverse*/
|
|
1890
|
-
n[5] === !0 &&
|
|
1890
|
+
n[5] === !0 && ai(n)
|
|
1891
1891
|
);
|
|
1892
|
-
const
|
|
1892
|
+
const C = (
|
|
1893
1893
|
/*#slots*/
|
|
1894
|
-
n[
|
|
1895
|
-
), O =
|
|
1896
|
-
|
|
1894
|
+
n[62].default
|
|
1895
|
+
), O = gn(
|
|
1896
|
+
C,
|
|
1897
1897
|
n,
|
|
1898
1898
|
/*$$scope*/
|
|
1899
|
-
n[
|
|
1899
|
+
n[61],
|
|
1900
1900
|
null
|
|
1901
|
-
), z = [
|
|
1902
|
-
function
|
|
1901
|
+
), z = [yr, mr, gr, hr], N = [];
|
|
1902
|
+
function A(k, G) {
|
|
1903
1903
|
var te, ye;
|
|
1904
1904
|
return (
|
|
1905
1905
|
/*error*/
|
|
1906
|
-
|
|
1906
|
+
k[18] ? 0 : (
|
|
1907
1907
|
/*focusedDelayed*/
|
|
1908
|
-
|
|
1908
|
+
k[16] ? (
|
|
1909
1909
|
/*listFeatures*/
|
|
1910
|
-
((te =
|
|
1910
|
+
((te = k[14]) == null ? void 0 : te.length) === 0 ? 2 : (
|
|
1911
1911
|
/*focusedDelayed*/
|
|
1912
|
-
|
|
1913
|
-
((ye =
|
|
1912
|
+
k[16] && /*listFeatures*/
|
|
1913
|
+
((ye = k[14]) != null && ye.length) ? 3 : -1
|
|
1914
1914
|
)
|
|
1915
1915
|
) : 1
|
|
1916
1916
|
)
|
|
1917
1917
|
);
|
|
1918
1918
|
}
|
|
1919
|
-
return ~(E =
|
|
1919
|
+
return ~(E = A(n)) && (h = N[E] = z[E](n)), {
|
|
1920
1920
|
c() {
|
|
1921
|
-
e = ne(), t =
|
|
1921
|
+
e = ne(), t = W("form"), i = W("div"), r = W("button"), Le(o.$$.fragment), u = ne(), s = W("input"), c = ne(), l = W("div"), d = W("button"), Le(a.$$.fragment), f = ne(), x && x.c(), g = ne(), _ && _.c(), v = ne(), O && O.c(), w = ne(), h && h.c(), p(r, "class", "search-button svelte-bz0zu3"), p(r, "type", "button"), p(
|
|
1922
1922
|
s,
|
|
1923
1923
|
"placeholder",
|
|
1924
1924
|
/*placeholder*/
|
|
@@ -1938,7 +1938,7 @@ function pr(n) {
|
|
|
1938
1938
|
"displayable",
|
|
1939
1939
|
/*searchValue*/
|
|
1940
1940
|
n[1] !== ""
|
|
1941
|
-
), p(i, "class", "input-group svelte-bz0zu3"), p(t, "tabindex", "0"), p(t, "class", m =
|
|
1941
|
+
), p(i, "class", "input-group svelte-bz0zu3"), p(t, "tabindex", "0"), p(t, "class", m = Vt(
|
|
1942
1942
|
/*className*/
|
|
1943
1943
|
n[2]
|
|
1944
1944
|
) + " svelte-bz0zu3"), le(
|
|
@@ -1949,8 +1949,8 @@ function pr(n) {
|
|
|
1949
1949
|
n[1] === ""
|
|
1950
1950
|
);
|
|
1951
1951
|
},
|
|
1952
|
-
m(
|
|
1953
|
-
F(
|
|
1952
|
+
m(k, G) {
|
|
1953
|
+
F(k, e, G), F(k, t, G), P(t, i), P(i, r), he(o, r, null), P(i, u), P(i, s), n[64](s), Yt(
|
|
1954
1954
|
s,
|
|
1955
1955
|
/*searchValue*/
|
|
1956
1956
|
n[1]
|
|
@@ -1959,25 +1959,25 @@ function pr(n) {
|
|
|
1959
1959
|
r,
|
|
1960
1960
|
"click",
|
|
1961
1961
|
/*click_handler*/
|
|
1962
|
-
n[
|
|
1962
|
+
n[63]
|
|
1963
1963
|
),
|
|
1964
1964
|
$(
|
|
1965
1965
|
s,
|
|
1966
1966
|
"input",
|
|
1967
1967
|
/*input_1_input_handler*/
|
|
1968
|
-
n[
|
|
1968
|
+
n[65]
|
|
1969
1969
|
),
|
|
1970
1970
|
$(
|
|
1971
1971
|
s,
|
|
1972
1972
|
"focus",
|
|
1973
1973
|
/*focus_handler*/
|
|
1974
|
-
n[
|
|
1974
|
+
n[66]
|
|
1975
1975
|
),
|
|
1976
1976
|
$(
|
|
1977
1977
|
s,
|
|
1978
1978
|
"blur",
|
|
1979
1979
|
/*blur_handler*/
|
|
1980
|
-
n[
|
|
1980
|
+
n[67]
|
|
1981
1981
|
),
|
|
1982
1982
|
$(
|
|
1983
1983
|
s,
|
|
@@ -1989,106 +1989,106 @@ function pr(n) {
|
|
|
1989
1989
|
s,
|
|
1990
1990
|
"input",
|
|
1991
1991
|
/*input_handler*/
|
|
1992
|
-
n[
|
|
1992
|
+
n[68]
|
|
1993
1993
|
),
|
|
1994
1994
|
$(
|
|
1995
1995
|
d,
|
|
1996
1996
|
"click",
|
|
1997
1997
|
/*click_handler_1*/
|
|
1998
|
-
n[
|
|
1998
|
+
n[69]
|
|
1999
1999
|
),
|
|
2000
|
-
$(t, "submit",
|
|
2000
|
+
$(t, "submit", bn(
|
|
2001
2001
|
/*handleSubmit*/
|
|
2002
2002
|
n[21]
|
|
2003
2003
|
))
|
|
2004
2004
|
], L = !0);
|
|
2005
2005
|
},
|
|
2006
|
-
p(
|
|
2006
|
+
p(k, G) {
|
|
2007
2007
|
(!b || G[0] & /*placeholder*/
|
|
2008
2008
|
256) && p(
|
|
2009
2009
|
s,
|
|
2010
2010
|
"placeholder",
|
|
2011
2011
|
/*placeholder*/
|
|
2012
|
-
|
|
2012
|
+
k[8]
|
|
2013
2013
|
), (!b || G[0] & /*placeholder*/
|
|
2014
2014
|
256) && p(
|
|
2015
2015
|
s,
|
|
2016
2016
|
"aria-label",
|
|
2017
2017
|
/*placeholder*/
|
|
2018
|
-
|
|
2018
|
+
k[8]
|
|
2019
2019
|
), G[0] & /*searchValue*/
|
|
2020
2020
|
2 && s.value !== /*searchValue*/
|
|
2021
|
-
|
|
2021
|
+
k[1] && Yt(
|
|
2022
2022
|
s,
|
|
2023
2023
|
/*searchValue*/
|
|
2024
|
-
|
|
2024
|
+
k[1]
|
|
2025
2025
|
), (!b || G[0] & /*clearButtonTitle*/
|
|
2026
2026
|
8) && p(
|
|
2027
2027
|
d,
|
|
2028
2028
|
"title",
|
|
2029
2029
|
/*clearButtonTitle*/
|
|
2030
|
-
|
|
2030
|
+
k[3]
|
|
2031
2031
|
), /*abortController*/
|
|
2032
|
-
|
|
2033
|
-
524288 && q(x, 1) : (x =
|
|
2032
|
+
k[19] ? x ? G[0] & /*abortController*/
|
|
2033
|
+
524288 && q(x, 1) : (x = ui(), x.c(), q(x, 1), x.m(l, null)) : x && (lt(), Y(x, 1, 1, () => {
|
|
2034
2034
|
x = null;
|
|
2035
|
-
}),
|
|
2035
|
+
}), ut()), (!b || G[0] & /*searchValue*/
|
|
2036
2036
|
2) && le(
|
|
2037
2037
|
l,
|
|
2038
2038
|
"displayable",
|
|
2039
2039
|
/*searchValue*/
|
|
2040
|
-
|
|
2040
|
+
k[1] !== ""
|
|
2041
2041
|
), /*enableReverse*/
|
|
2042
|
-
|
|
2043
|
-
32 && q(_, 1)) : (_ =
|
|
2042
|
+
k[5] === !0 ? _ ? (_.p(k, G), G[0] & /*enableReverse*/
|
|
2043
|
+
32 && q(_, 1)) : (_ = ai(k), _.c(), q(_, 1), _.m(i, v)) : _ && (lt(), Y(_, 1, 1, () => {
|
|
2044
2044
|
_ = null;
|
|
2045
|
-
}),
|
|
2046
|
-
|
|
2045
|
+
}), ut()), O && O.p && (!b || G[1] & /*$$scope*/
|
|
2046
|
+
1073741824) && yn(
|
|
2047
2047
|
O,
|
|
2048
|
-
k,
|
|
2049
2048
|
C,
|
|
2049
|
+
k,
|
|
2050
2050
|
/*$$scope*/
|
|
2051
|
-
|
|
2052
|
-
b ?
|
|
2053
|
-
|
|
2051
|
+
k[61],
|
|
2052
|
+
b ? mn(
|
|
2053
|
+
C,
|
|
2054
2054
|
/*$$scope*/
|
|
2055
|
-
|
|
2055
|
+
k[61],
|
|
2056
2056
|
G,
|
|
2057
2057
|
null
|
|
2058
|
-
) :
|
|
2058
|
+
) : vn(
|
|
2059
2059
|
/*$$scope*/
|
|
2060
|
-
|
|
2060
|
+
k[61]
|
|
2061
2061
|
),
|
|
2062
2062
|
null
|
|
2063
2063
|
);
|
|
2064
2064
|
let te = E;
|
|
2065
|
-
E =
|
|
2065
|
+
E = A(k), E === te ? ~E && N[E].p(k, G) : (h && (lt(), Y(N[te], 1, 1, () => {
|
|
2066
2066
|
N[te] = null;
|
|
2067
|
-
}),
|
|
2068
|
-
4 && m !== (m =
|
|
2067
|
+
}), ut()), ~E ? (h = N[E], h ? h.p(k, G) : (h = N[E] = z[E](k), h.c()), q(h, 1), h.m(t, null)) : h = null), (!b || G[0] & /*className*/
|
|
2068
|
+
4 && m !== (m = Vt(
|
|
2069
2069
|
/*className*/
|
|
2070
|
-
|
|
2070
|
+
k[2]
|
|
2071
2071
|
) + " svelte-bz0zu3")) && p(t, "class", m), (!b || G[0] & /*className, collapsed, searchValue*/
|
|
2072
2072
|
22) && le(
|
|
2073
2073
|
t,
|
|
2074
2074
|
"can-collapse",
|
|
2075
2075
|
/*collapsed*/
|
|
2076
|
-
|
|
2077
|
-
|
|
2076
|
+
k[4] && /*searchValue*/
|
|
2077
|
+
k[1] === ""
|
|
2078
2078
|
);
|
|
2079
2079
|
},
|
|
2080
|
-
i(
|
|
2081
|
-
b || (q(S), q(o.$$.fragment,
|
|
2080
|
+
i(k) {
|
|
2081
|
+
b || (q(S), q(o.$$.fragment, k), q(a.$$.fragment, k), q(x), q(_), q(O, k), q(h), b = !0);
|
|
2082
2082
|
},
|
|
2083
|
-
o(
|
|
2084
|
-
Y(S), Y(o.$$.fragment,
|
|
2083
|
+
o(k) {
|
|
2084
|
+
Y(S), Y(o.$$.fragment, k), Y(a.$$.fragment, k), Y(x), Y(_), Y(O, k), Y(h), b = !1;
|
|
2085
2085
|
},
|
|
2086
|
-
d(
|
|
2087
|
-
|
|
2086
|
+
d(k) {
|
|
2087
|
+
k && (D(e), D(t)), ge(o), n[64](null), ge(a), x && x.d(), _ && _.d(), O && O.d(k), ~E && N[E].d(), L = !1, me(M);
|
|
2088
2088
|
}
|
|
2089
2089
|
};
|
|
2090
2090
|
}
|
|
2091
|
-
function
|
|
2091
|
+
function pr(n, e, t) {
|
|
2092
2092
|
let i, { $$slots: r = {}, $$scope: o } = e;
|
|
2093
2093
|
const u = {
|
|
2094
2094
|
continental_marine: 4,
|
|
@@ -2114,76 +2114,76 @@ function br(n, e, t) {
|
|
|
2114
2114
|
"poi.restaurant": 18,
|
|
2115
2115
|
"poi.aerodrome": 13
|
|
2116
2116
|
};
|
|
2117
|
-
let { class: s = void 0 } = e, { apiKey: c } = e, { bbox: l = void 0 } = e, { clearButtonTitle: d = "clear" } = e, { clearOnBlur: a = !1 } = e, { collapsed: f = !1 } = e, { country: g = void 0 } = e, { debounceSearch: v = 200 } = e, { enableReverse: w = !1 } = e, { errorMessage: E = "Something went wrong…" } = e, { filter: h = () => !0 } = e, { flyTo: m = !0 } = e, { fuzzyMatch: b = !0 } = e, { language: L = void 0 } = e, { limit: M = void 0 } = e, { mapController: S = void 0 } = e, { minLength: x = 2 } = e, { noResultsMessage: _ = "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:
|
|
2117
|
+
let { class: s = void 0 } = e, { apiKey: c } = e, { bbox: l = void 0 } = e, { clearButtonTitle: d = "clear" } = e, { clearOnBlur: a = !1 } = e, { collapsed: f = !1 } = e, { country: g = void 0 } = e, { debounceSearch: v = 200 } = e, { enableReverse: w = !1 } = e, { errorMessage: E = "Something went wrong…" } = e, { filter: h = () => !0 } = e, { flyTo: m = !0 } = e, { fuzzyMatch: b = !0 } = e, { language: L = void 0 } = e, { limit: M = void 0 } = e, { mapController: S = void 0 } = e, { minLength: x = 2 } = e, { noResultsMessage: _ = "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: C = "Search" } = e, { proximity: O = [{ type: "server-geolocation" }] } = e, { reverseActive: z = w === "always" } = e, { reverseButtonTitle: N = "toggle reverse geocoding" } = e, { searchValue: A = "" } = e, { pickedResultStyle: k = "full-geometry" } = e, { showPlaceType: G = "if-needed" } = e, { showResultsWhileTyping: te = !0 } = e, { autocompleteTimeout: ye = void 0 } = e, { selectFirst: Pe = !0 } = e, { flyToSelected: ht = !1 } = e, { markerOnSelected: Ke = !0 } = e, { types: Ne = void 0 } = e, { exhaustiveReverseGeocoding: gt = !1 } = e, { excludeTypes: Xe = !1 } = e, { zoom: Je = u } = e, { apiUrl: mt = "https://api.maptiler.com/geocoding" } = e, { fetchParameters: yt = {} } = e, { iconsBaseUrl: Ut = "https://cdn.maptiler.com/maptiler-geocoding-control/v2.0.0-rc.2/icons/" } = e, { adjustUrlQuery: vt = () => {
|
|
2118
2118
|
} } = e;
|
|
2119
|
-
function
|
|
2119
|
+
function Fi() {
|
|
2120
2120
|
ce.focus();
|
|
2121
2121
|
}
|
|
2122
|
-
function
|
|
2122
|
+
function Gi() {
|
|
2123
2123
|
ce.blur();
|
|
2124
2124
|
}
|
|
2125
|
-
function
|
|
2126
|
-
t(1,
|
|
2125
|
+
function Ft(y, j = !0, Z = !1) {
|
|
2126
|
+
t(1, A = y), j ? (t(15, U = -1), jt()) : (wt(!Z, Z), setTimeout(() => {
|
|
2127
2127
|
ce.focus(), ce.select();
|
|
2128
2128
|
}));
|
|
2129
2129
|
}
|
|
2130
|
+
function ji() {
|
|
2131
|
+
t(14, I = void 0), t(57, T = void 0), t(15, U = -1);
|
|
2132
|
+
}
|
|
2130
2133
|
function qi() {
|
|
2131
|
-
t(
|
|
2134
|
+
t(56, Q = []), t(57, T = void 0);
|
|
2132
2135
|
}
|
|
2136
|
+
let Ie = !1, I, Q, T, Gt = "", ce, U = -1, fe, $e = [], Te, ve, re, et, pt;
|
|
2137
|
+
const Qi = /* @__PURE__ */ new Set(), pe = Ln();
|
|
2133
2138
|
function Zi() {
|
|
2134
|
-
t(57, Z = []), t(58, T = void 0);
|
|
2135
|
-
}
|
|
2136
|
-
let Oe = !1, I, Z, T, jt = "", ce, U = -1, fe, et = [], Te, ve, re, tt, bt;
|
|
2137
|
-
const Qi = /* @__PURE__ */ new Set(), pe = Sn();
|
|
2138
|
-
function Hi() {
|
|
2139
2139
|
return !!re;
|
|
2140
2140
|
}
|
|
2141
|
-
|
|
2141
|
+
_n(() => {
|
|
2142
2142
|
S && (S.setEventHandler(void 0), S.indicateReverse(!1), S.setSelectedMarker(-1), S.setMarkers(void 0, void 0));
|
|
2143
2143
|
});
|
|
2144
|
-
function
|
|
2144
|
+
function jt(y) {
|
|
2145
2145
|
if (ve && (window.clearTimeout(ve), ve = void 0), re) {
|
|
2146
|
-
window.clearTimeout(re), t(
|
|
2146
|
+
window.clearTimeout(re), t(58, re = void 0), Be(A, { exact: !0 });
|
|
2147
2147
|
return;
|
|
2148
2148
|
}
|
|
2149
2149
|
if (U > -1 && I)
|
|
2150
|
-
t(
|
|
2151
|
-
else if (
|
|
2152
|
-
const j = y || !
|
|
2153
|
-
|
|
2154
|
-
t(
|
|
2155
|
-
}).catch((
|
|
2150
|
+
t(57, T = I[U]), t(1, A = T.place_type[0] === "reverse" ? T.place_name : T.place_name.replace(/,.*/, "")), t(18, fe = void 0), t(56, Q = void 0), t(15, U = -1);
|
|
2151
|
+
else if (A) {
|
|
2152
|
+
const j = y || !bt(A);
|
|
2153
|
+
Be(A, { exact: !0 }).then(() => {
|
|
2154
|
+
t(56, Q = I), t(57, T = void 0), j && Hi();
|
|
2155
|
+
}).catch((Z) => t(18, fe = Z));
|
|
2156
2156
|
}
|
|
2157
2157
|
}
|
|
2158
|
-
function
|
|
2158
|
+
function bt(y) {
|
|
2159
2159
|
try {
|
|
2160
|
-
return
|
|
2160
|
+
return dr(y, 6);
|
|
2161
2161
|
} catch {
|
|
2162
2162
|
return !1;
|
|
2163
2163
|
}
|
|
2164
2164
|
}
|
|
2165
|
-
async function
|
|
2165
|
+
async function Be(y, { byId: j = !1, exact: Z = !1, appendSpace: oe = !1 } = {}) {
|
|
2166
2166
|
t(18, fe = void 0), Te == null || Te.abort();
|
|
2167
2167
|
const ie = new AbortController();
|
|
2168
2168
|
t(19, Te = ie);
|
|
2169
2169
|
try {
|
|
2170
|
-
const R =
|
|
2171
|
-
if (L !== void 0 && V.set("language", Array.isArray(L) ? L.join(",") : L ?? ""), Ne && V.set("types", Ne.join(",")),
|
|
2172
|
-
const
|
|
2173
|
-
|
|
2170
|
+
const R = bt(y), V = new URLSearchParams();
|
|
2171
|
+
if (L !== void 0 && V.set("language", Array.isArray(L) ? L.join(",") : L ?? ""), Ne && V.set("types", Ne.join(",")), Xe && V.set("excludeTypes", String(Xe)), l && V.set("bbox", l.map((it) => it.toFixed(6)).join(",")), g && V.set("country", Array.isArray(g) ? g.join(",") : g), !j && !R) {
|
|
2172
|
+
const it = await tr(S, O, ie);
|
|
2173
|
+
it && V.set("proximity", it), (Z || !te) && V.set("autocomplete", "false"), V.set("fuzzyMatch", String(b));
|
|
2174
2174
|
}
|
|
2175
|
-
M !== void 0 && (
|
|
2176
|
-
const
|
|
2177
|
-
if (
|
|
2178
|
-
j ? (t(14, I = void 0), t(
|
|
2175
|
+
M !== void 0 && (gt || !R || (Ne == null ? void 0 : Ne.length) === 1) && V.set("limit", String(M)), V.set("key", c), vt(V);
|
|
2176
|
+
const tt = mt + "/" + encodeURIComponent(R ? R.decimalLongitude + "," + R.decimalLatitude : y + (oe ? " " : "")) + ".json?" + V.toString();
|
|
2177
|
+
if (tt === Gt) {
|
|
2178
|
+
j ? (t(14, I = void 0), t(57, T = $e[0])) : t(14, I = $e);
|
|
2179
2179
|
return;
|
|
2180
2180
|
}
|
|
2181
|
-
|
|
2182
|
-
const
|
|
2183
|
-
if (!
|
|
2184
|
-
throw new Error(await
|
|
2185
|
-
const
|
|
2186
|
-
pe("response", { url:
|
|
2181
|
+
Gt = tt;
|
|
2182
|
+
const _t = await fetch(tt, { signal: ie.signal, ...yt });
|
|
2183
|
+
if (!_t.ok)
|
|
2184
|
+
throw new Error(await _t.text());
|
|
2185
|
+
const Lt = await _t.json();
|
|
2186
|
+
pe("response", { url: tt, featureCollection: Lt }), j ? (t(14, I = void 0), t(57, T = Lt.features[0]), $e = [T]) : (t(14, I = Lt.features.filter(h)), R && I.unshift({
|
|
2187
2187
|
type: "Feature",
|
|
2188
2188
|
properties: {},
|
|
2189
2189
|
id: "reverse_" + R.decimalLongitude + "_" + R.decimalLatitude,
|
|
@@ -2201,7 +2201,7 @@ function br(n, e, t) {
|
|
|
2201
2201
|
type: "Point",
|
|
2202
2202
|
coordinates: [R.decimalLongitude, R.decimalLatitude]
|
|
2203
2203
|
}
|
|
2204
|
-
}),
|
|
2204
|
+
}), $e = I, R && ce.focus());
|
|
2205
2205
|
} catch (R) {
|
|
2206
2206
|
if (R && typeof R == "object" && "name" in R && R.name === "AbortError")
|
|
2207
2207
|
return;
|
|
@@ -2210,167 +2210,165 @@ function br(n, e, t) {
|
|
|
2210
2210
|
ie === Te && t(19, Te = void 0);
|
|
2211
2211
|
}
|
|
2212
2212
|
}
|
|
2213
|
-
function
|
|
2213
|
+
function Hi() {
|
|
2214
2214
|
var oe;
|
|
2215
|
-
if (!(
|
|
2215
|
+
if (!(Q != null && Q.length) || !m)
|
|
2216
2216
|
return;
|
|
2217
|
-
const y = [180, 90, -180, -90], j = !
|
|
2218
|
-
let
|
|
2219
|
-
for (const ie of
|
|
2220
|
-
const R =
|
|
2221
|
-
if (
|
|
2217
|
+
const y = [180, 90, -180, -90], j = !Q.some((ie) => !ie.matching_text);
|
|
2218
|
+
let Z;
|
|
2219
|
+
for (const ie of Q) {
|
|
2220
|
+
const R = De(ie);
|
|
2221
|
+
if (Z = Z === void 0 ? R : R === void 0 ? Z : Math.max(Z, R), j || !ie.matching_text)
|
|
2222
2222
|
for (const V of [0, 1, 2, 3])
|
|
2223
2223
|
y[V] = Math[V < 2 ? "min" : "max"](y[V], ((oe = ie.bbox) == null ? void 0 : oe[V]) ?? ie.center[V % 2]);
|
|
2224
2224
|
}
|
|
2225
|
-
S &&
|
|
2225
|
+
S && Q.length > 0 && (T && y[0] === y[2] && y[1] === y[3] ? S.flyTo(T.center, De(T)) : S.fitBounds(ct(y), 50, Z));
|
|
2226
2226
|
}
|
|
2227
|
-
function
|
|
2228
|
-
var
|
|
2227
|
+
function De(y) {
|
|
2228
|
+
var Z;
|
|
2229
2229
|
if (!y.bbox || y.bbox[0] !== y.bbox[2] && y.bbox[1] !== y.bbox[3])
|
|
2230
2230
|
return;
|
|
2231
|
-
if (typeof Ie == "number")
|
|
2232
|
-
return y.id.startsWith("poi.") || y.id.startsWith("address.") ? $e : Ie;
|
|
2233
2231
|
const j = y.id.replace(/\..*/, "");
|
|
2234
|
-
return (Array.isArray((
|
|
2232
|
+
return (Array.isArray((Z = y.properties) == null ? void 0 : Z.categories) ? y.properties.categories.reduce(
|
|
2235
2233
|
(oe, ie) => {
|
|
2236
|
-
const R =
|
|
2234
|
+
const R = Je[j + "." + ie];
|
|
2237
2235
|
return oe === void 0 ? R : R === void 0 ? oe : Math.max(oe, R);
|
|
2238
2236
|
},
|
|
2239
2237
|
void 0
|
|
2240
|
-
) : void 0) ??
|
|
2238
|
+
) : void 0) ?? Je[j];
|
|
2241
2239
|
}
|
|
2242
|
-
function
|
|
2243
|
-
t(0, z = w === "always"), t(14, I = void 0), t(
|
|
2240
|
+
function Vi(y) {
|
|
2241
|
+
t(0, z = w === "always"), t(14, I = void 0), t(57, T = void 0), t(15, U = -1), Ft(y[1].toFixed(6) + ", " + er(y[0], [-180, 180], !0).toFixed(6), !1, !0);
|
|
2244
2242
|
}
|
|
2245
|
-
function
|
|
2243
|
+
function Yi(y) {
|
|
2246
2244
|
if (!I)
|
|
2247
2245
|
return;
|
|
2248
2246
|
let j = y.key === "ArrowDown" ? 1 : y.key === "ArrowUp" ? -1 : 0;
|
|
2249
2247
|
j && (U === (Pe ? 0 : -1) && j === -1 && t(15, U = I.length), t(15, U += j), U >= I.length && t(15, U = -1), U < 0 && Pe && t(15, U = 0), y.preventDefault());
|
|
2250
2248
|
}
|
|
2251
|
-
function
|
|
2252
|
-
if (t(18, fe = void 0), ve && (window.clearTimeout(ve), ve = void 0), re && (window.clearTimeout(re), t(
|
|
2249
|
+
function wt(y = !0, j = !1) {
|
|
2250
|
+
if (t(18, fe = void 0), ve && (window.clearTimeout(ve), ve = void 0), re && (window.clearTimeout(re), t(58, re = void 0)), !te && !j || A.length < x) {
|
|
2253
2251
|
t(14, I = void 0);
|
|
2254
2252
|
return;
|
|
2255
2253
|
}
|
|
2256
|
-
const
|
|
2254
|
+
const Z = A;
|
|
2257
2255
|
ve = window.setTimeout(
|
|
2258
2256
|
() => {
|
|
2259
|
-
ve = void 0,
|
|
2257
|
+
ve = void 0, Be(Z).catch((oe) => t(18, fe = oe));
|
|
2260
2258
|
},
|
|
2261
2259
|
y ? v : 0
|
|
2262
|
-
),
|
|
2260
|
+
), A.endsWith(" ") || t(58, re = window.setTimeout(
|
|
2263
2261
|
() => {
|
|
2264
|
-
t(
|
|
2262
|
+
t(58, re = void 0), Be(Z, { appendSpace: !0 }).catch((oe) => t(18, fe = oe));
|
|
2265
2263
|
},
|
|
2266
2264
|
ye
|
|
2267
2265
|
));
|
|
2268
2266
|
}
|
|
2269
|
-
function
|
|
2270
|
-
t(
|
|
2267
|
+
function Et(y) {
|
|
2268
|
+
t(57, T = y), t(1, A = y.place_name), t(15, U = -1);
|
|
2271
2269
|
}
|
|
2272
|
-
const
|
|
2273
|
-
function
|
|
2274
|
-
|
|
2270
|
+
const Ki = () => ce.focus();
|
|
2271
|
+
function Xi(y) {
|
|
2272
|
+
Ct[y ? "unshift" : "push"](() => {
|
|
2275
2273
|
ce = y, t(17, ce);
|
|
2276
2274
|
});
|
|
2277
2275
|
}
|
|
2278
|
-
function
|
|
2279
|
-
|
|
2276
|
+
function Ji() {
|
|
2277
|
+
A = this.value, t(1, A), t(13, Ie), t(28, a);
|
|
2280
2278
|
}
|
|
2281
|
-
const
|
|
2282
|
-
t(1,
|
|
2283
|
-
},
|
|
2279
|
+
const $i = () => t(13, Ie = !0), en = () => t(13, Ie = !1), tn = () => wt(), nn = () => {
|
|
2280
|
+
t(1, A = ""), ce.focus();
|
|
2281
|
+
}, rn = () => t(0, z = !z), on = () => t(18, fe = void 0), sn = (y) => t(15, U = y), ln = (y) => Et(y), un = () => {
|
|
2284
2282
|
Pe || t(15, U = -1);
|
|
2285
|
-
},
|
|
2283
|
+
}, an = () => {
|
|
2286
2284
|
};
|
|
2287
2285
|
return n.$$set = (y) => {
|
|
2288
|
-
"class" in y && t(2, s = y.class), "apiKey" in y && t(26, c = y.apiKey), "bbox" in y && t(27, l = y.bbox), "clearButtonTitle" in y && t(3, d = y.clearButtonTitle), "clearOnBlur" in y && t(28, a = y.clearOnBlur), "collapsed" in y && t(4, f = y.collapsed), "country" in y && t(29, g = y.country), "debounceSearch" in y && t(30, v = y.debounceSearch), "enableReverse" in y && t(5, w = y.enableReverse), "errorMessage" in y && t(6, E = y.errorMessage), "filter" in y && t(31, h = y.filter), "flyTo" in y && t(32, m = y.flyTo), "fuzzyMatch" in y && t(33, b = y.fuzzyMatch), "language" in y && t(34, L = y.language), "limit" in y && t(35, M = y.limit), "mapController" in y && t(36, S = y.mapController), "minLength" in y && t(37, x = y.minLength), "noResultsMessage" in y && t(7, _ = y.noResultsMessage), "placeholder" in y && t(8,
|
|
2286
|
+
"class" in y && t(2, s = y.class), "apiKey" in y && t(26, c = y.apiKey), "bbox" in y && t(27, l = y.bbox), "clearButtonTitle" in y && t(3, d = y.clearButtonTitle), "clearOnBlur" in y && t(28, a = y.clearOnBlur), "collapsed" in y && t(4, f = y.collapsed), "country" in y && t(29, g = y.country), "debounceSearch" in y && t(30, v = y.debounceSearch), "enableReverse" in y && t(5, w = y.enableReverse), "errorMessage" in y && t(6, E = y.errorMessage), "filter" in y && t(31, h = y.filter), "flyTo" in y && t(32, m = y.flyTo), "fuzzyMatch" in y && t(33, b = y.fuzzyMatch), "language" in y && t(34, L = y.language), "limit" in y && t(35, M = y.limit), "mapController" in y && t(36, S = y.mapController), "minLength" in y && t(37, x = y.minLength), "noResultsMessage" in y && t(7, _ = y.noResultsMessage), "placeholder" in y && t(8, C = y.placeholder), "proximity" in y && t(38, O = y.proximity), "reverseActive" in y && t(0, z = y.reverseActive), "reverseButtonTitle" in y && t(9, N = y.reverseButtonTitle), "searchValue" in y && t(1, A = y.searchValue), "pickedResultStyle" in y && t(39, k = y.pickedResultStyle), "showPlaceType" in y && t(10, G = y.showPlaceType), "showResultsWhileTyping" in y && t(40, te = y.showResultsWhileTyping), "autocompleteTimeout" in y && t(41, ye = y.autocompleteTimeout), "selectFirst" in y && t(11, Pe = y.selectFirst), "flyToSelected" in y && t(42, ht = y.flyToSelected), "markerOnSelected" in y && t(43, Ke = y.markerOnSelected), "types" in y && t(44, Ne = y.types), "exhaustiveReverseGeocoding" in y && t(45, gt = y.exhaustiveReverseGeocoding), "excludeTypes" in y && t(46, Xe = y.excludeTypes), "zoom" in y && t(47, Je = y.zoom), "apiUrl" in y && t(48, mt = y.apiUrl), "fetchParameters" in y && t(49, yt = y.fetchParameters), "iconsBaseUrl" in y && t(12, Ut = y.iconsBaseUrl), "adjustUrlQuery" in y && t(50, vt = y.adjustUrlQuery), "$$scope" in y && t(61, o = y.$$scope);
|
|
2289
2287
|
}, n.$$.update = () => {
|
|
2290
2288
|
if (n.$$.dirty[0] & /*enableReverse*/
|
|
2291
2289
|
32 && t(0, z = w === "always"), n.$$.dirty[0] & /*focused, clearOnBlur*/
|
|
2292
2290
|
268443648 && setTimeout(() => {
|
|
2293
|
-
t(16,
|
|
2291
|
+
t(16, et = Ie), a && !Ie && t(1, A = "");
|
|
2294
2292
|
}), n.$$.dirty[0] & /*searchValue, listFeatures*/
|
|
2295
2293
|
16386 | n.$$.dirty[1] & /*minLength*/
|
|
2296
|
-
64 &&
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
18432 && Pe && I != null && I.length && (
|
|
2294
|
+
64 && A.length < x && (t(57, T = void 0), t(14, I = void 0), t(18, fe = void 0), t(56, Q = I)), n.$$.dirty[1] & /*pickedResultStyle, picked*/
|
|
2295
|
+
67109120 && k !== "marker-only" && T && !T.address && T.geometry.type === "Point" && T.place_type[0] !== "reverse" && Be(T.id, { byId: !0 }).catch((y) => t(18, fe = y)), n.$$.dirty[1] & /*mapController, picked, prevIdToFly, flyTo*/
|
|
2296
|
+
335544354 && (S && T && T.id !== pt && m && (!T.bbox || T.bbox[0] === T.bbox[2] && T.bbox[1] === T.bbox[3] ? S.flyTo(T.center, De(T)) : S.fitBounds(ct(T.bbox), 50, De(T)), t(14, I = void 0), t(56, Q = void 0), t(15, U = -1)), t(59, pt = T == null ? void 0 : T.id)), n.$$.dirty[0] & /*selectFirst, listFeatures*/
|
|
2297
|
+
18432 && Pe && I != null && I.length && (Zi() || t(15, U = 0)), n.$$.dirty[0] & /*searchValue*/
|
|
2300
2298
|
2 && t(15, U = -1), n.$$.dirty[0] & /*listFeatures*/
|
|
2301
2299
|
16384 | n.$$.dirty[1] & /*markedFeatures*/
|
|
2302
|
-
|
|
2300
|
+
33554432 && Q !== I && t(56, Q = void 0), n.$$.dirty[0] & /*reverseActive, listFeatures, focusedDelayed*/
|
|
2303
2301
|
81921 | n.$$.dirty[1] & /*mapController, markedFeatures*/
|
|
2304
|
-
|
|
2302
|
+
33554464 && S && S.setEventHandler((y) => {
|
|
2305
2303
|
switch (y.type) {
|
|
2306
2304
|
case "mapClick":
|
|
2307
|
-
z &&
|
|
2305
|
+
z && Vi(y.coordinates);
|
|
2308
2306
|
break;
|
|
2309
2307
|
case "markerClick":
|
|
2310
2308
|
{
|
|
2311
|
-
const j = I == null ? void 0 : I.find((
|
|
2312
|
-
j &&
|
|
2309
|
+
const j = I == null ? void 0 : I.find((Z) => Z.id === y.id);
|
|
2310
|
+
j && Et(j);
|
|
2313
2311
|
}
|
|
2314
2312
|
break;
|
|
2315
2313
|
case "markerMouseEnter":
|
|
2316
|
-
|
|
2314
|
+
Q && t(15, U = et ? (I == null ? void 0 : I.findIndex((j) => j.id === y.id)) ?? -1 : -1);
|
|
2317
2315
|
break;
|
|
2318
2316
|
case "markerMouseLeave":
|
|
2319
|
-
|
|
2317
|
+
Q && t(15, U = -1);
|
|
2320
2318
|
break;
|
|
2321
2319
|
}
|
|
2322
2320
|
}), n.$$.dirty[0] & /*listFeatures, selectedItemIndex*/
|
|
2323
|
-
49152 && t(
|
|
2324
|
-
|
|
2325
|
-
4128 && (
|
|
2326
|
-
|
|
2327
|
-
|
|
2321
|
+
49152 && t(60, i = I == null ? void 0 : I[U]), n.$$.dirty[1] & /*mapController, selected, flyTo, flyToSelected*/
|
|
2322
|
+
536872994 && S && i && m && ht && S.flyTo(i.center, De(i)), n.$$.dirty[1] & /*markerOnSelected, mapController*/
|
|
2323
|
+
4128 && (Ke || S == null || S.setMarkers(void 0, void 0)), n.$$.dirty[1] & /*mapController, markerOnSelected, markedFeatures, selected*/
|
|
2324
|
+
570429472 && S && Ke && !Q && (S.setMarkers(i ? [i] : void 0, void 0), S.setSelectedMarker(i ? 0 : -1)), n.$$.dirty[1] & /*mapController, markedFeatures, picked*/
|
|
2325
|
+
100663328 && S && S.setMarkers(Q, T), n.$$.dirty[0] & /*selectedItemIndex*/
|
|
2328
2326
|
32768 | n.$$.dirty[1] & /*markedFeatures, mapController*/
|
|
2329
|
-
|
|
2330
|
-
|
|
2327
|
+
33554464 && Q && S && S.setSelectedMarker(U), n.$$.dirty[1] & /*selected, autocompleteTimeoutRef*/
|
|
2328
|
+
671088640 && i && (window.clearTimeout(re), t(58, re = void 0)), n.$$.dirty[0] & /*searchValue*/
|
|
2331
2329
|
2 | n.$$.dirty[1] & /*mapController*/
|
|
2332
2330
|
32 && S) {
|
|
2333
|
-
const y =
|
|
2331
|
+
const y = bt(A);
|
|
2334
2332
|
S.setReverseMarker(y ? [y.decimalLongitude, y.decimalLatitude] : void 0);
|
|
2335
2333
|
}
|
|
2336
2334
|
n.$$.dirty[1] & /*selected*/
|
|
2337
|
-
|
|
2338
|
-
|
|
2335
|
+
536870912 && pe("select", { feature: i }), n.$$.dirty[1] & /*picked*/
|
|
2336
|
+
67108864 && pe("pick", { feature: T }), n.$$.dirty[0] & /*focusedDelayed, listFeatures*/
|
|
2339
2337
|
81920 && pe("optionsvisibilitychange", {
|
|
2340
|
-
optionsVisible:
|
|
2338
|
+
optionsVisible: et && !!I
|
|
2341
2339
|
}), n.$$.dirty[0] & /*listFeatures*/
|
|
2342
2340
|
16384 && pe("featureslisted", { features: I }), n.$$.dirty[1] & /*markedFeatures*/
|
|
2343
|
-
|
|
2341
|
+
33554432 && pe("featuresmarked", { features: Q }), n.$$.dirty[0] & /*reverseActive*/
|
|
2344
2342
|
1 && pe("reversetoggle", { reverse: z }), n.$$.dirty[0] & /*searchValue*/
|
|
2345
|
-
2 && pe("querychange", { query:
|
|
2343
|
+
2 && pe("querychange", { query: A }), n.$$.dirty[0] & /*reverseActive*/
|
|
2346
2344
|
1 | n.$$.dirty[1] & /*mapController*/
|
|
2347
2345
|
32 && S && S.indicateReverse(z);
|
|
2348
2346
|
}, [
|
|
2349
2347
|
z,
|
|
2350
|
-
|
|
2348
|
+
A,
|
|
2351
2349
|
s,
|
|
2352
2350
|
d,
|
|
2353
2351
|
f,
|
|
2354
2352
|
w,
|
|
2355
2353
|
E,
|
|
2356
2354
|
_,
|
|
2357
|
-
|
|
2355
|
+
C,
|
|
2358
2356
|
N,
|
|
2359
2357
|
G,
|
|
2360
2358
|
Pe,
|
|
2361
|
-
|
|
2362
|
-
|
|
2359
|
+
Ut,
|
|
2360
|
+
Ie,
|
|
2363
2361
|
I,
|
|
2364
2362
|
U,
|
|
2365
|
-
|
|
2363
|
+
et,
|
|
2366
2364
|
ce,
|
|
2367
2365
|
fe,
|
|
2368
2366
|
Te,
|
|
2369
2367
|
Qi,
|
|
2370
|
-
|
|
2371
|
-
|
|
2368
|
+
jt,
|
|
2369
|
+
Yi,
|
|
2370
|
+
wt,
|
|
2372
2371
|
Et,
|
|
2373
|
-
_t,
|
|
2374
2372
|
u,
|
|
2375
2373
|
c,
|
|
2376
2374
|
l,
|
|
@@ -2385,31 +2383,31 @@ function br(n, e, t) {
|
|
|
2385
2383
|
S,
|
|
2386
2384
|
x,
|
|
2387
2385
|
O,
|
|
2388
|
-
|
|
2386
|
+
k,
|
|
2389
2387
|
te,
|
|
2390
2388
|
ye,
|
|
2389
|
+
ht,
|
|
2390
|
+
Ke,
|
|
2391
|
+
Ne,
|
|
2391
2392
|
gt,
|
|
2392
2393
|
Xe,
|
|
2393
|
-
Ne,
|
|
2394
|
-
mt,
|
|
2395
2394
|
Je,
|
|
2396
|
-
|
|
2397
|
-
$e,
|
|
2395
|
+
mt,
|
|
2398
2396
|
yt,
|
|
2399
2397
|
vt,
|
|
2400
|
-
|
|
2398
|
+
Fi,
|
|
2401
2399
|
Gi,
|
|
2400
|
+
Ft,
|
|
2402
2401
|
ji,
|
|
2403
|
-
Gt,
|
|
2404
2402
|
qi,
|
|
2405
|
-
|
|
2406
|
-
Z,
|
|
2403
|
+
Q,
|
|
2407
2404
|
T,
|
|
2408
2405
|
re,
|
|
2409
|
-
|
|
2406
|
+
pt,
|
|
2410
2407
|
i,
|
|
2411
2408
|
o,
|
|
2412
2409
|
r,
|
|
2410
|
+
Ki,
|
|
2413
2411
|
Xi,
|
|
2414
2412
|
Ji,
|
|
2415
2413
|
$i,
|
|
@@ -2421,17 +2419,16 @@ function br(n, e, t) {
|
|
|
2421
2419
|
sn,
|
|
2422
2420
|
ln,
|
|
2423
2421
|
un,
|
|
2424
|
-
an
|
|
2425
|
-
cn
|
|
2422
|
+
an
|
|
2426
2423
|
];
|
|
2427
2424
|
}
|
|
2428
|
-
let
|
|
2425
|
+
let br = class extends ke {
|
|
2429
2426
|
constructor(e) {
|
|
2430
2427
|
super(), Me(
|
|
2431
2428
|
this,
|
|
2432
2429
|
e,
|
|
2433
|
-
br,
|
|
2434
2430
|
pr,
|
|
2431
|
+
vr,
|
|
2435
2432
|
xe,
|
|
2436
2433
|
{
|
|
2437
2434
|
ZOOM_DEFAULTS: 25,
|
|
@@ -2458,7 +2455,7 @@ let wr = class extends Ce {
|
|
|
2458
2455
|
reverseActive: 0,
|
|
2459
2456
|
reverseButtonTitle: 9,
|
|
2460
2457
|
searchValue: 1,
|
|
2461
|
-
|
|
2458
|
+
pickedResultStyle: 39,
|
|
2462
2459
|
showPlaceType: 10,
|
|
2463
2460
|
showResultsWhileTyping: 40,
|
|
2464
2461
|
autocompleteTimeout: 41,
|
|
@@ -2469,16 +2466,15 @@ let wr = class extends Ce {
|
|
|
2469
2466
|
exhaustiveReverseGeocoding: 45,
|
|
2470
2467
|
excludeTypes: 46,
|
|
2471
2468
|
zoom: 47,
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
fetchParameters: 50,
|
|
2469
|
+
apiUrl: 48,
|
|
2470
|
+
fetchParameters: 49,
|
|
2475
2471
|
iconsBaseUrl: 12,
|
|
2476
|
-
adjustUrlQuery:
|
|
2477
|
-
focus:
|
|
2478
|
-
blur:
|
|
2479
|
-
setQuery:
|
|
2480
|
-
clearList:
|
|
2481
|
-
clearMap:
|
|
2472
|
+
adjustUrlQuery: 50,
|
|
2473
|
+
focus: 51,
|
|
2474
|
+
blur: 52,
|
|
2475
|
+
setQuery: 53,
|
|
2476
|
+
clearList: 54,
|
|
2477
|
+
clearMap: 55
|
|
2482
2478
|
},
|
|
2483
2479
|
null,
|
|
2484
2480
|
[-1, -1, -1]
|
|
@@ -2488,26 +2484,26 @@ let wr = class extends Ce {
|
|
|
2488
2484
|
return this.$$.ctx[25];
|
|
2489
2485
|
}
|
|
2490
2486
|
get focus() {
|
|
2491
|
-
return this.$$.ctx[
|
|
2487
|
+
return this.$$.ctx[51];
|
|
2492
2488
|
}
|
|
2493
2489
|
get blur() {
|
|
2494
|
-
return this.$$.ctx[
|
|
2490
|
+
return this.$$.ctx[52];
|
|
2495
2491
|
}
|
|
2496
2492
|
get setQuery() {
|
|
2497
|
-
return this.$$.ctx[
|
|
2493
|
+
return this.$$.ctx[53];
|
|
2498
2494
|
}
|
|
2499
2495
|
get clearList() {
|
|
2500
|
-
return this.$$.ctx[
|
|
2496
|
+
return this.$$.ctx[54];
|
|
2501
2497
|
}
|
|
2502
2498
|
get clearMap() {
|
|
2503
|
-
return this.$$.ctx[
|
|
2499
|
+
return this.$$.ctx[55];
|
|
2504
2500
|
}
|
|
2505
2501
|
};
|
|
2506
|
-
function
|
|
2502
|
+
function Ze(n, e, t = {}) {
|
|
2507
2503
|
const i = { type: "Feature" };
|
|
2508
2504
|
return (t.id === 0 || t.id) && (i.id = t.id), t.bbox && (i.bbox = t.bbox), i.properties = e || {}, i.geometry = n, i;
|
|
2509
2505
|
}
|
|
2510
|
-
function
|
|
2506
|
+
function zt(n, e, t = {}) {
|
|
2511
2507
|
for (const r of n) {
|
|
2512
2508
|
if (r.length < 4)
|
|
2513
2509
|
throw new Error(
|
|
@@ -2519,17 +2515,17 @@ function Bt(n, e, t = {}) {
|
|
|
2519
2515
|
if (r[r.length - 1][o] !== r[0][o])
|
|
2520
2516
|
throw new Error("First and last Position are not equivalent.");
|
|
2521
2517
|
}
|
|
2522
|
-
return
|
|
2518
|
+
return Ze({
|
|
2523
2519
|
type: "Polygon",
|
|
2524
2520
|
coordinates: n
|
|
2525
2521
|
}, e, t);
|
|
2526
2522
|
}
|
|
2527
|
-
function
|
|
2523
|
+
function He(n, e = {}) {
|
|
2528
2524
|
const t = { type: "FeatureCollection" };
|
|
2529
2525
|
return e.id && (t.id = e.id), e.bbox && (t.bbox = e.bbox), t.features = n, t;
|
|
2530
2526
|
}
|
|
2531
|
-
function
|
|
2532
|
-
return
|
|
2527
|
+
function Wi(n, e, t = {}) {
|
|
2528
|
+
return Ze({
|
|
2533
2529
|
type: "MultiPolygon",
|
|
2534
2530
|
coordinates: n
|
|
2535
2531
|
}, e, t);
|
|
@@ -2556,7 +2552,7 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
|
2556
2552
|
See the Apache Version 2.0 License for specific language governing permissions
|
|
2557
2553
|
and limitations under the License.
|
|
2558
2554
|
***************************************************************************** */
|
|
2559
|
-
function
|
|
2555
|
+
function wr(n, e) {
|
|
2560
2556
|
var t = { label: 0, sent: function() {
|
|
2561
2557
|
if (o[0] & 1) throw o[1];
|
|
2562
2558
|
return o[1];
|
|
@@ -2625,7 +2621,7 @@ var Se = (
|
|
|
2625
2621
|
return n;
|
|
2626
2622
|
}()
|
|
2627
2623
|
);
|
|
2628
|
-
function
|
|
2624
|
+
function Er(n, e) {
|
|
2629
2625
|
return n > e ? 1 : n < e ? -1 : 0;
|
|
2630
2626
|
}
|
|
2631
2627
|
function be(n, e, t) {
|
|
@@ -2654,7 +2650,7 @@ function be(n, e, t) {
|
|
|
2654
2650
|
}
|
|
2655
2651
|
return r.right = e.left, o.left = e.right, e.left = i.right, e.right = i.left, e;
|
|
2656
2652
|
}
|
|
2657
|
-
function
|
|
2653
|
+
function Mt(n, e, t, i) {
|
|
2658
2654
|
var r = new Se(n, e);
|
|
2659
2655
|
if (t === null)
|
|
2660
2656
|
return r.left = r.right = null, r;
|
|
@@ -2662,7 +2658,7 @@ function Ct(n, e, t, i) {
|
|
|
2662
2658
|
var o = i(n, t.key);
|
|
2663
2659
|
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;
|
|
2664
2660
|
}
|
|
2665
|
-
function
|
|
2661
|
+
function fi(n, e, t) {
|
|
2666
2662
|
var i = null, r = null;
|
|
2667
2663
|
if (e) {
|
|
2668
2664
|
e = be(n, e, t);
|
|
@@ -2671,25 +2667,25 @@ function di(n, e, t) {
|
|
|
2671
2667
|
}
|
|
2672
2668
|
return { left: i, right: r };
|
|
2673
2669
|
}
|
|
2674
|
-
function
|
|
2670
|
+
function _r(n, e, t) {
|
|
2675
2671
|
return e === null ? n : (n === null || (e = be(n.key, e, t), e.left = n), e);
|
|
2676
2672
|
}
|
|
2677
|
-
function
|
|
2673
|
+
function Rt(n, e, t, i, r) {
|
|
2678
2674
|
if (n) {
|
|
2679
2675
|
i("" + e + (t ? "└── " : "├── ") + r(n) + `
|
|
2680
2676
|
`);
|
|
2681
2677
|
var o = e + (t ? " " : "│ ");
|
|
2682
|
-
n.left &&
|
|
2678
|
+
n.left && Rt(n.left, o, !1, i, r), n.right && Rt(n.right, o, !0, i, r);
|
|
2683
2679
|
}
|
|
2684
2680
|
}
|
|
2685
|
-
var
|
|
2681
|
+
var Bt = (
|
|
2686
2682
|
/** @class */
|
|
2687
2683
|
function() {
|
|
2688
2684
|
function n(e) {
|
|
2689
|
-
e === void 0 && (e =
|
|
2685
|
+
e === void 0 && (e = Er), this._root = null, this._size = 0, this._comparator = e;
|
|
2690
2686
|
}
|
|
2691
2687
|
return n.prototype.insert = function(e, t) {
|
|
2692
|
-
return this._size++, this._root =
|
|
2688
|
+
return this._size++, this._root = Mt(e, t, this._root, this._comparator);
|
|
2693
2689
|
}, n.prototype.add = function(e, t) {
|
|
2694
2690
|
var i = new Se(e, t);
|
|
2695
2691
|
this._root === null && (i.left = i.right = null, this._size++, this._root = i);
|
|
@@ -2814,15 +2810,15 @@ var Dt = (
|
|
|
2814
2810
|
}, n.prototype.clear = function() {
|
|
2815
2811
|
return this._root = null, this._size = 0, this;
|
|
2816
2812
|
}, n.prototype.toList = function() {
|
|
2817
|
-
return
|
|
2813
|
+
return Sr(this._root);
|
|
2818
2814
|
}, n.prototype.load = function(e, t, i) {
|
|
2819
2815
|
t === void 0 && (t = []), i === void 0 && (i = !1);
|
|
2820
2816
|
var r = e.length, o = this._comparator;
|
|
2821
|
-
if (i &&
|
|
2822
|
-
this._root =
|
|
2817
|
+
if (i && Ot(e, t, 0, r - 1, o), this._root === null)
|
|
2818
|
+
this._root = Pt(e, t, 0, r), this._size = r;
|
|
2823
2819
|
else {
|
|
2824
|
-
var u =
|
|
2825
|
-
r = this._size + r, this._root =
|
|
2820
|
+
var u = xr(this.toList(), Lr(e, t), o);
|
|
2821
|
+
r = this._size + r, this._root = It({ head: u }, 0, r);
|
|
2826
2822
|
}
|
|
2827
2823
|
return this;
|
|
2828
2824
|
}, n.prototype.isEmpty = function() {
|
|
@@ -2844,17 +2840,17 @@ var Dt = (
|
|
|
2844
2840
|
return String(i.key);
|
|
2845
2841
|
});
|
|
2846
2842
|
var t = [];
|
|
2847
|
-
return
|
|
2843
|
+
return Rt(this._root, "", !0, function(i) {
|
|
2848
2844
|
return t.push(i);
|
|
2849
2845
|
}, e), t.join("");
|
|
2850
2846
|
}, n.prototype.update = function(e, t, i) {
|
|
2851
|
-
var r = this._comparator, o =
|
|
2852
|
-
r(e, t) < 0 ? s =
|
|
2847
|
+
var r = this._comparator, o = fi(e, this._root, r), u = o.left, s = o.right;
|
|
2848
|
+
r(e, t) < 0 ? s = Mt(t, i, s, r) : u = Mt(t, i, u, r), this._root = _r(u, s, r);
|
|
2853
2849
|
}, n.prototype.split = function(e) {
|
|
2854
|
-
return
|
|
2850
|
+
return fi(e, this._root, this._comparator);
|
|
2855
2851
|
}, n.prototype[Symbol.iterator] = function() {
|
|
2856
2852
|
var e, t, i;
|
|
2857
|
-
return
|
|
2853
|
+
return wr(this, function(r) {
|
|
2858
2854
|
switch (r.label) {
|
|
2859
2855
|
case 0:
|
|
2860
2856
|
e = this._root, t = [], i = !1, r.label = 1;
|
|
@@ -2878,38 +2874,38 @@ var Dt = (
|
|
|
2878
2874
|
}, n;
|
|
2879
2875
|
}()
|
|
2880
2876
|
);
|
|
2881
|
-
function
|
|
2877
|
+
function Pt(n, e, t, i) {
|
|
2882
2878
|
var r = i - t;
|
|
2883
2879
|
if (r > 0) {
|
|
2884
2880
|
var o = t + Math.floor(r / 2), u = n[o], s = e[o], c = new Se(u, s);
|
|
2885
|
-
return c.left =
|
|
2881
|
+
return c.left = Pt(n, e, t, o), c.right = Pt(n, e, o + 1, i), c;
|
|
2886
2882
|
}
|
|
2887
2883
|
return null;
|
|
2888
2884
|
}
|
|
2889
|
-
function
|
|
2885
|
+
function Lr(n, e) {
|
|
2890
2886
|
for (var t = new Se(null, null), i = t, r = 0; r < n.length; r++)
|
|
2891
2887
|
i = i.next = new Se(n[r], e[r]);
|
|
2892
2888
|
return i.next = null, t.next;
|
|
2893
2889
|
}
|
|
2894
|
-
function
|
|
2890
|
+
function Sr(n) {
|
|
2895
2891
|
for (var e = n, t = [], i = !1, r = new Se(null, null), o = r; !i; )
|
|
2896
2892
|
e ? (t.push(e), e = e.left) : t.length > 0 ? (e = o = o.next = t.pop(), e = e.right) : i = !0;
|
|
2897
2893
|
return o.next = null, r.next;
|
|
2898
2894
|
}
|
|
2899
|
-
function
|
|
2895
|
+
function It(n, e, t) {
|
|
2900
2896
|
var i = t - e;
|
|
2901
2897
|
if (i > 0) {
|
|
2902
|
-
var r = e + Math.floor(i / 2), o =
|
|
2903
|
-
return u.left = o, n.head = n.head.next, u.right =
|
|
2898
|
+
var r = e + Math.floor(i / 2), o = It(n, e, r), u = n.head;
|
|
2899
|
+
return u.left = o, n.head = n.head.next, u.right = It(n, r + 1, t), u;
|
|
2904
2900
|
}
|
|
2905
2901
|
return null;
|
|
2906
2902
|
}
|
|
2907
|
-
function
|
|
2903
|
+
function xr(n, e, t) {
|
|
2908
2904
|
for (var i = new Se(null, null), r = i, o = n, u = e; o !== null && u !== null; )
|
|
2909
2905
|
t(o.key, u.key) < 0 ? (r.next = o, o = o.next) : (r.next = u, u = u.next), r = r.next;
|
|
2910
2906
|
return o !== null ? r.next = o : u !== null && (r.next = u), i.next;
|
|
2911
2907
|
}
|
|
2912
|
-
function
|
|
2908
|
+
function Ot(n, e, t, i, r) {
|
|
2913
2909
|
if (!(t >= i)) {
|
|
2914
2910
|
for (var o = n[t + i >> 1], u = t - 1, s = i + 1; ; ) {
|
|
2915
2911
|
do
|
|
@@ -2923,10 +2919,10 @@ function Wt(n, e, t, i, r) {
|
|
|
2923
2919
|
var c = n[u];
|
|
2924
2920
|
n[u] = n[s], n[s] = c, c = e[u], e[u] = e[s], e[s] = c;
|
|
2925
2921
|
}
|
|
2926
|
-
|
|
2922
|
+
Ot(n, e, t, s, r), Ot(n, e, s + 1, i, r);
|
|
2927
2923
|
}
|
|
2928
2924
|
}
|
|
2929
|
-
const de = 11102230246251565e-32, K = 134217729,
|
|
2925
|
+
const de = 11102230246251565e-32, K = 134217729, Mr = (3 + 8 * de) * de;
|
|
2930
2926
|
function kt(n, e, t, i, r) {
|
|
2931
2927
|
let o, u, s, c, l = e[0], d = i[0], a = 0, f = 0;
|
|
2932
2928
|
d > l == d > -l ? (o = l, l = e[++a]) : (o = d, d = i[++f]);
|
|
@@ -2945,29 +2941,29 @@ function kr(n, e) {
|
|
|
2945
2941
|
for (let i = 1; i < n; i++) t += e[i];
|
|
2946
2942
|
return t;
|
|
2947
2943
|
}
|
|
2948
|
-
function
|
|
2944
|
+
function Ye(n) {
|
|
2949
2945
|
return new Float64Array(n);
|
|
2950
2946
|
}
|
|
2951
|
-
const
|
|
2952
|
-
function
|
|
2947
|
+
const Cr = (3 + 16 * de) * de, Nr = (2 + 12 * de) * de, Tr = (9 + 64 * de) * de * de, Ae = Ye(4), di = Ye(8), hi = Ye(12), gi = Ye(16), J = Ye(4);
|
|
2948
|
+
function Rr(n, e, t, i, r, o, u) {
|
|
2953
2949
|
let s, c, l, d, a, f, g, v, w, E, h, m, b, L, M, S, x, _;
|
|
2954
|
-
const
|
|
2955
|
-
L =
|
|
2956
|
-
let
|
|
2957
|
-
if (
|
|
2950
|
+
const C = n - r, O = t - r, z = e - o, N = i - o;
|
|
2951
|
+
L = C * N, f = K * C, g = f - (f - C), v = C - g, f = K * N, w = f - (f - N), E = N - w, M = v * E - (L - g * w - v * w - g * E), S = z * O, f = K * z, g = f - (f - z), v = z - g, f = K * O, w = f - (f - O), E = O - w, x = v * E - (S - g * w - v * w - g * E), h = M - x, a = M - h, Ae[0] = M - (h + a) + (a - x), m = L + h, a = m - L, b = L - (m - a) + (h - a), h = b - S, a = b - h, Ae[1] = b - (h + a) + (a - S), _ = m + h, a = _ - m, Ae[2] = m - (_ - a) + (h - a), Ae[3] = _;
|
|
2952
|
+
let A = kr(4, Ae), k = Nr * u;
|
|
2953
|
+
if (A >= k || -A >= k || (a = n - C, s = n - (C + a) + (a - r), a = t - O, l = t - (O + a) + (a - r), a = e - z, c = e - (z + a) + (a - o), a = i - N, d = i - (N + a) + (a - o), s === 0 && c === 0 && l === 0 && d === 0) || (k = Tr * u + Mr * Math.abs(A), A += C * d + N * s - (z * l + O * c), A >= k || -A >= k)) return A;
|
|
2958
2954
|
L = s * N, f = K * s, g = f - (f - s), v = s - g, f = K * N, w = f - (f - N), E = N - w, M = v * E - (L - g * w - v * w - g * E), S = c * O, f = K * c, g = f - (f - c), v = c - g, f = K * O, w = f - (f - O), E = O - w, x = v * E - (S - g * w - v * w - g * E), h = M - x, a = M - h, J[0] = M - (h + a) + (a - x), m = L + h, a = m - L, b = L - (m - a) + (h - a), h = b - S, a = b - h, J[1] = b - (h + a) + (a - S), _ = m + h, a = _ - m, J[2] = m - (_ - a) + (h - a), J[3] = _;
|
|
2959
|
-
const G = kt(4, Ae, 4, J,
|
|
2960
|
-
L =
|
|
2961
|
-
const te = kt(G,
|
|
2955
|
+
const G = kt(4, Ae, 4, J, di);
|
|
2956
|
+
L = C * d, f = K * C, g = f - (f - C), v = C - g, f = K * d, w = f - (f - d), E = d - w, M = v * E - (L - g * w - v * w - g * E), S = z * l, f = K * z, g = f - (f - z), v = z - g, f = K * l, w = f - (f - l), E = l - w, x = v * E - (S - g * w - v * w - g * E), h = M - x, a = M - h, J[0] = M - (h + a) + (a - x), m = L + h, a = m - L, b = L - (m - a) + (h - a), h = b - S, a = b - h, J[1] = b - (h + a) + (a - S), _ = m + h, a = _ - m, J[2] = m - (_ - a) + (h - a), J[3] = _;
|
|
2957
|
+
const te = kt(G, di, 4, J, hi);
|
|
2962
2958
|
L = s * d, f = K * s, g = f - (f - s), v = s - g, f = K * d, w = f - (f - d), E = d - w, M = v * E - (L - g * w - v * w - g * E), S = c * l, f = K * c, g = f - (f - c), v = c - g, f = K * l, w = f - (f - l), E = l - w, x = v * E - (S - g * w - v * w - g * E), h = M - x, a = M - h, J[0] = M - (h + a) + (a - x), m = L + h, a = m - L, b = L - (m - a) + (h - a), h = b - S, a = b - h, J[1] = b - (h + a) + (a - S), _ = m + h, a = _ - m, J[2] = m - (_ - a) + (h - a), J[3] = _;
|
|
2963
|
-
const ye = kt(te,
|
|
2964
|
-
return
|
|
2959
|
+
const ye = kt(te, hi, 4, J, gi);
|
|
2960
|
+
return gi[ye - 1];
|
|
2965
2961
|
}
|
|
2966
|
-
function
|
|
2962
|
+
function Pr(n, e, t, i, r, o) {
|
|
2967
2963
|
const u = (e - o) * (t - r), s = (n - r) * (i - o), c = u - s, l = Math.abs(u + s);
|
|
2968
|
-
return Math.abs(c) >=
|
|
2964
|
+
return Math.abs(c) >= Cr * l ? c : -Rr(n, e, t, i, r, o, l);
|
|
2969
2965
|
}
|
|
2970
|
-
const
|
|
2966
|
+
const Ge = (n, e) => n.ll.x <= e.x && e.x <= n.ur.x && n.ll.y <= e.y && e.y <= n.ur.y, At = (n, e) => {
|
|
2971
2967
|
if (e.ur.x < n.ll.x || n.ur.x < e.ll.x || e.ur.y < n.ll.y || n.ur.y < e.ll.y) return null;
|
|
2972
2968
|
const t = n.ll.x < e.ll.x ? e.ll.x : n.ll.x, i = n.ur.x < e.ur.x ? n.ur.x : e.ur.x, r = n.ll.y < e.ll.y ? e.ll.y : n.ll.y, o = n.ur.y < e.ur.y ? n.ur.y : e.ur.y;
|
|
2973
2969
|
return {
|
|
@@ -2983,18 +2979,18 @@ const je = (n, e) => n.ll.x <= e.x && e.x <= n.ur.x && n.ll.y <= e.y && e.y <= n
|
|
|
2983
2979
|
};
|
|
2984
2980
|
let we = Number.EPSILON;
|
|
2985
2981
|
we === void 0 && (we = Math.pow(2, -52));
|
|
2986
|
-
const
|
|
2982
|
+
const Ir = we * we, mi = (n, e) => {
|
|
2987
2983
|
if (-we < n && n < we && -we < e && e < we)
|
|
2988
2984
|
return 0;
|
|
2989
2985
|
const t = n - e;
|
|
2990
|
-
return t * t <
|
|
2986
|
+
return t * t < Ir * n * e ? 0 : n < e ? -1 : 1;
|
|
2991
2987
|
};
|
|
2992
|
-
class
|
|
2988
|
+
class Or {
|
|
2993
2989
|
constructor() {
|
|
2994
2990
|
this.reset();
|
|
2995
2991
|
}
|
|
2996
2992
|
reset() {
|
|
2997
|
-
this.xRounder = new
|
|
2993
|
+
this.xRounder = new yi(), this.yRounder = new yi();
|
|
2998
2994
|
}
|
|
2999
2995
|
round(e, t) {
|
|
3000
2996
|
return {
|
|
@@ -3003,9 +2999,9 @@ class Wr {
|
|
|
3003
2999
|
};
|
|
3004
3000
|
}
|
|
3005
3001
|
}
|
|
3006
|
-
class
|
|
3002
|
+
class yi {
|
|
3007
3003
|
constructor() {
|
|
3008
|
-
this.tree = new
|
|
3004
|
+
this.tree = new Bt(), this.round(0);
|
|
3009
3005
|
}
|
|
3010
3006
|
// Note: this can rounds input values backwards or forwards.
|
|
3011
3007
|
// You might ask, why not restrict this to just rounding
|
|
@@ -3016,16 +3012,16 @@ class vi {
|
|
|
3016
3012
|
// angle for t-intersections).
|
|
3017
3013
|
round(e) {
|
|
3018
3014
|
const t = this.tree.add(e), i = this.tree.prev(t);
|
|
3019
|
-
if (i !== null &&
|
|
3015
|
+
if (i !== null && mi(t.key, i.key) === 0)
|
|
3020
3016
|
return this.tree.remove(e), i.key;
|
|
3021
3017
|
const r = this.tree.next(t);
|
|
3022
|
-
return r !== null &&
|
|
3018
|
+
return r !== null && mi(t.key, r.key) === 0 ? (this.tree.remove(e), r.key) : e;
|
|
3023
3019
|
}
|
|
3024
3020
|
}
|
|
3025
|
-
const
|
|
3026
|
-
const i =
|
|
3021
|
+
const Ve = new Or(), at = (n, e) => n.x * e.y - n.y * e.x, zi = (n, e) => n.x * e.x + n.y * e.y, vi = (n, e, t) => {
|
|
3022
|
+
const i = Pr(n.x, n.y, e.x, e.y, t.x, t.y);
|
|
3027
3023
|
return i > 0 ? -1 : i < 0 ? 1 : 0;
|
|
3028
|
-
},
|
|
3024
|
+
}, ft = (n) => Math.sqrt(zi(n, n)), Ar = (n, e, t) => {
|
|
3029
3025
|
const i = {
|
|
3030
3026
|
x: e.x - n.x,
|
|
3031
3027
|
y: e.y - n.y
|
|
@@ -3033,8 +3029,8 @@ const Ye = new Wr(), ct = (n, e) => n.x * e.y - n.y * e.x, Bi = (n, e) => n.x *
|
|
|
3033
3029
|
x: t.x - n.x,
|
|
3034
3030
|
y: t.y - n.y
|
|
3035
3031
|
};
|
|
3036
|
-
return
|
|
3037
|
-
},
|
|
3032
|
+
return at(r, i) / ft(r) / ft(i);
|
|
3033
|
+
}, Wr = (n, e, t) => {
|
|
3038
3034
|
const i = {
|
|
3039
3035
|
x: e.x - n.x,
|
|
3040
3036
|
y: e.y - n.y
|
|
@@ -3042,24 +3038,24 @@ const Ye = new Wr(), ct = (n, e) => n.x * e.y - n.y * e.x, Bi = (n, e) => n.x *
|
|
|
3042
3038
|
x: t.x - n.x,
|
|
3043
3039
|
y: t.y - n.y
|
|
3044
3040
|
};
|
|
3045
|
-
return
|
|
3046
|
-
},
|
|
3041
|
+
return zi(r, i) / ft(r) / ft(i);
|
|
3042
|
+
}, pi = (n, e, t) => e.y === 0 ? null : {
|
|
3047
3043
|
x: n.x + e.x / e.y * (t - n.y),
|
|
3048
3044
|
y: t
|
|
3049
|
-
},
|
|
3045
|
+
}, bi = (n, e, t) => e.x === 0 ? null : {
|
|
3050
3046
|
x: t,
|
|
3051
3047
|
y: n.y + e.y / e.x * (t - n.x)
|
|
3052
|
-
},
|
|
3053
|
-
if (e.x === 0) return
|
|
3054
|
-
if (i.x === 0) return
|
|
3055
|
-
if (e.y === 0) return
|
|
3056
|
-
if (i.y === 0) return
|
|
3057
|
-
const r =
|
|
3048
|
+
}, zr = (n, e, t, i) => {
|
|
3049
|
+
if (e.x === 0) return bi(t, i, n.x);
|
|
3050
|
+
if (i.x === 0) return bi(n, e, t.x);
|
|
3051
|
+
if (e.y === 0) return pi(t, i, n.y);
|
|
3052
|
+
if (i.y === 0) return pi(n, e, t.y);
|
|
3053
|
+
const r = at(e, i);
|
|
3058
3054
|
if (r == 0) return null;
|
|
3059
3055
|
const o = {
|
|
3060
3056
|
x: t.x - n.x,
|
|
3061
3057
|
y: t.y - n.y
|
|
3062
|
-
}, u =
|
|
3058
|
+
}, u = at(o, e) / r, s = at(o, i) / r, c = n.x + s * e.x, l = t.x + u * i.x, d = n.y + s * e.y, a = t.y + u * i.y, f = (c + l) / 2, g = (d + a) / 2;
|
|
3063
3059
|
return {
|
|
3064
3060
|
x: f,
|
|
3065
3061
|
y: g
|
|
@@ -3125,7 +3121,7 @@ class se {
|
|
|
3125
3121
|
const o = r.otherSE;
|
|
3126
3122
|
t.set(r, {
|
|
3127
3123
|
sine: Ar(this.point, e.point, o.point),
|
|
3128
|
-
cosine:
|
|
3124
|
+
cosine: Wr(this.point, e.point, o.point)
|
|
3129
3125
|
});
|
|
3130
3126
|
};
|
|
3131
3127
|
return (r, o) => {
|
|
@@ -3141,7 +3137,7 @@ class se {
|
|
|
3141
3137
|
};
|
|
3142
3138
|
}
|
|
3143
3139
|
}
|
|
3144
|
-
let
|
|
3140
|
+
let Br = 0;
|
|
3145
3141
|
class Ee {
|
|
3146
3142
|
/* This compare() function is for ordering segments in the sweep
|
|
3147
3143
|
* line tree, and does so according to the following criteria:
|
|
@@ -3199,7 +3195,7 @@ class Ee {
|
|
|
3199
3195
|
/* Warning: a reference to ringWindings input will be stored,
|
|
3200
3196
|
* and possibly will be later modified */
|
|
3201
3197
|
constructor(e, t, i, r) {
|
|
3202
|
-
this.id = ++
|
|
3198
|
+
this.id = ++Br, this.leftSE = e, e.segment = this, e.otherSE = t, this.rightSE = t, t.segment = this, t.otherSE = e, this.rings = i, this.windings = r;
|
|
3203
3199
|
}
|
|
3204
3200
|
static fromRing(e, t, i) {
|
|
3205
3201
|
let r, o, u;
|
|
@@ -3280,7 +3276,7 @@ class Ee {
|
|
|
3280
3276
|
getIntersection(e) {
|
|
3281
3277
|
const t = this.bbox(), i = e.bbox(), r = At(t, i);
|
|
3282
3278
|
if (r === null) return null;
|
|
3283
|
-
const o = this.leftSE.point, u = this.rightSE.point, s = e.leftSE.point, c = e.rightSE.point, l =
|
|
3279
|
+
const o = this.leftSE.point, u = this.rightSE.point, s = e.leftSE.point, c = e.rightSE.point, l = Ge(t, s) && this.comparePoint(s) === 0, d = Ge(i, o) && e.comparePoint(o) === 0, a = Ge(t, c) && this.comparePoint(c) === 0, f = Ge(i, u) && e.comparePoint(u) === 0;
|
|
3284
3280
|
if (d && l)
|
|
3285
3281
|
return f && !a ? u : !f && a ? c : null;
|
|
3286
3282
|
if (d)
|
|
@@ -3290,8 +3286,8 @@ class Ee {
|
|
|
3290
3286
|
if (f && a) return null;
|
|
3291
3287
|
if (f) return u;
|
|
3292
3288
|
if (a) return c;
|
|
3293
|
-
const g =
|
|
3294
|
-
return g === null || !
|
|
3289
|
+
const g = zr(o, this.vector(), s, e.vector());
|
|
3290
|
+
return g === null || !Ge(r, g) ? null : Ve.round(g.x, g.y);
|
|
3295
3291
|
}
|
|
3296
3292
|
/**
|
|
3297
3293
|
* Split the given segment into multiple segments on the given points.
|
|
@@ -3421,13 +3417,13 @@ class Ee {
|
|
|
3421
3417
|
return this._isInResult;
|
|
3422
3418
|
}
|
|
3423
3419
|
}
|
|
3424
|
-
class
|
|
3420
|
+
class wi {
|
|
3425
3421
|
constructor(e, t, i) {
|
|
3426
3422
|
if (!Array.isArray(e) || e.length === 0)
|
|
3427
3423
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
3428
3424
|
if (this.poly = t, this.isExterior = i, this.segments = [], typeof e[0][0] != "number" || typeof e[0][1] != "number")
|
|
3429
3425
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
3430
|
-
const r =
|
|
3426
|
+
const r = Ve.round(e[0][0], e[0][1]);
|
|
3431
3427
|
this.bbox = {
|
|
3432
3428
|
ll: {
|
|
3433
3429
|
x: r.x,
|
|
@@ -3442,7 +3438,7 @@ class Ei {
|
|
|
3442
3438
|
for (let u = 1, s = e.length; u < s; u++) {
|
|
3443
3439
|
if (typeof e[u][0] != "number" || typeof e[u][1] != "number")
|
|
3444
3440
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
3445
|
-
let c =
|
|
3441
|
+
let c = Ve.round(e[u][0], e[u][1]);
|
|
3446
3442
|
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);
|
|
3447
3443
|
}
|
|
3448
3444
|
(r.x !== o.x || r.y !== o.y) && this.segments.push(Ee.fromRing(o, r, this));
|
|
@@ -3456,11 +3452,11 @@ class Ei {
|
|
|
3456
3452
|
return e;
|
|
3457
3453
|
}
|
|
3458
3454
|
}
|
|
3459
|
-
class
|
|
3455
|
+
class Dr {
|
|
3460
3456
|
constructor(e, t) {
|
|
3461
3457
|
if (!Array.isArray(e))
|
|
3462
3458
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
3463
|
-
this.exteriorRing = new
|
|
3459
|
+
this.exteriorRing = new wi(e[0], this, !0), this.bbox = {
|
|
3464
3460
|
ll: {
|
|
3465
3461
|
x: this.exteriorRing.bbox.ll.x,
|
|
3466
3462
|
y: this.exteriorRing.bbox.ll.y
|
|
@@ -3471,7 +3467,7 @@ class Ur {
|
|
|
3471
3467
|
}
|
|
3472
3468
|
}, this.interiorRings = [];
|
|
3473
3469
|
for (let i = 1, r = e.length; i < r; i++) {
|
|
3474
|
-
const o = new
|
|
3470
|
+
const o = new wi(e[i], this, !1);
|
|
3475
3471
|
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);
|
|
3476
3472
|
}
|
|
3477
3473
|
this.multiPoly = t;
|
|
@@ -3486,7 +3482,7 @@ class Ur {
|
|
|
3486
3482
|
return e;
|
|
3487
3483
|
}
|
|
3488
3484
|
}
|
|
3489
|
-
class
|
|
3485
|
+
class Ei {
|
|
3490
3486
|
constructor(e, t) {
|
|
3491
3487
|
if (!Array.isArray(e))
|
|
3492
3488
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
@@ -3505,7 +3501,7 @@ class _i {
|
|
|
3505
3501
|
}
|
|
3506
3502
|
};
|
|
3507
3503
|
for (let i = 0, r = e.length; i < r; i++) {
|
|
3508
|
-
const o = new
|
|
3504
|
+
const o = new Dr(e[i], this);
|
|
3509
3505
|
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);
|
|
3510
3506
|
}
|
|
3511
3507
|
this.isSubject = t;
|
|
@@ -3520,7 +3516,7 @@ class _i {
|
|
|
3520
3516
|
return e;
|
|
3521
3517
|
}
|
|
3522
3518
|
}
|
|
3523
|
-
class
|
|
3519
|
+
class dt {
|
|
3524
3520
|
/* Given the segments from the sweep line pass, compute & return a series
|
|
3525
3521
|
* of closed rings from all the segments marked to be part of the result */
|
|
3526
3522
|
static factory(e) {
|
|
@@ -3549,7 +3545,7 @@ class ht {
|
|
|
3549
3545
|
}
|
|
3550
3546
|
if (g !== null) {
|
|
3551
3547
|
const w = a.splice(g)[0], E = l.splice(w.index);
|
|
3552
|
-
E.unshift(E[0].otherSE), t.push(new
|
|
3548
|
+
E.unshift(E[0].otherSE), t.push(new dt(E.reverse()));
|
|
3553
3549
|
continue;
|
|
3554
3550
|
}
|
|
3555
3551
|
a.push({
|
|
@@ -3560,7 +3556,7 @@ class ht {
|
|
|
3560
3556
|
c = f.sort(v)[0].otherSE;
|
|
3561
3557
|
break;
|
|
3562
3558
|
}
|
|
3563
|
-
t.push(new
|
|
3559
|
+
t.push(new dt(l));
|
|
3564
3560
|
}
|
|
3565
3561
|
return t;
|
|
3566
3562
|
}
|
|
@@ -3575,11 +3571,11 @@ class ht {
|
|
|
3575
3571
|
const t = [e];
|
|
3576
3572
|
for (let l = 1, d = this.events.length - 1; l < d; l++) {
|
|
3577
3573
|
const a = this.events[l].point, f = this.events[l + 1].point;
|
|
3578
|
-
|
|
3574
|
+
vi(a, e, f) !== 0 && (t.push(a), e = a);
|
|
3579
3575
|
}
|
|
3580
3576
|
if (t.length === 1) return null;
|
|
3581
3577
|
const i = t[0], r = t[1];
|
|
3582
|
-
|
|
3578
|
+
vi(i, e, r) === 0 && t.shift(), t.push(t[0]);
|
|
3583
3579
|
const o = this.isExteriorRing() ? 1 : -1, u = this.isExteriorRing() ? 0 : t.length - 1, s = this.isExteriorRing() ? t.length : -1, c = [];
|
|
3584
3580
|
for (let l = u; l != s; l += o) c.push([t[l].x, t[l].y]);
|
|
3585
3581
|
return c;
|
|
@@ -3611,7 +3607,7 @@ class ht {
|
|
|
3611
3607
|
}
|
|
3612
3608
|
}
|
|
3613
3609
|
}
|
|
3614
|
-
class
|
|
3610
|
+
class _i {
|
|
3615
3611
|
constructor(e) {
|
|
3616
3612
|
this.exteriorRing = e, e.poly = this, this.interiorRings = [];
|
|
3617
3613
|
}
|
|
@@ -3628,7 +3624,7 @@ class Li {
|
|
|
3628
3624
|
return e;
|
|
3629
3625
|
}
|
|
3630
3626
|
}
|
|
3631
|
-
class
|
|
3627
|
+
class Ur {
|
|
3632
3628
|
constructor(e) {
|
|
3633
3629
|
this.rings = e, this.polys = this._composePolys(e);
|
|
3634
3630
|
}
|
|
@@ -3645,19 +3641,19 @@ class Fr {
|
|
|
3645
3641
|
for (let i = 0, r = e.length; i < r; i++) {
|
|
3646
3642
|
const o = e[i];
|
|
3647
3643
|
if (!o.poly)
|
|
3648
|
-
if (o.isExteriorRing()) t.push(new
|
|
3644
|
+
if (o.isExteriorRing()) t.push(new _i(o));
|
|
3649
3645
|
else {
|
|
3650
3646
|
const u = o.enclosingRing();
|
|
3651
|
-
u.poly || t.push(new
|
|
3647
|
+
u.poly || t.push(new _i(u)), u.poly.addInterior(o);
|
|
3652
3648
|
}
|
|
3653
3649
|
}
|
|
3654
3650
|
return t;
|
|
3655
3651
|
}
|
|
3656
3652
|
}
|
|
3657
|
-
class
|
|
3653
|
+
class Fr {
|
|
3658
3654
|
constructor(e) {
|
|
3659
3655
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Ee.compare;
|
|
3660
|
-
this.queue = e, this.tree = new
|
|
3656
|
+
this.queue = e, this.tree = new Bt(t), this.segments = [];
|
|
3661
3657
|
}
|
|
3662
3658
|
process(e) {
|
|
3663
3659
|
const t = e.segment, i = [];
|
|
@@ -3727,13 +3723,13 @@ class Gr {
|
|
|
3727
3723
|
return r.push(i), e.consumedBy === void 0 && this.tree.add(e), r;
|
|
3728
3724
|
}
|
|
3729
3725
|
}
|
|
3730
|
-
const
|
|
3731
|
-
class
|
|
3726
|
+
const Li = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE || 1e6, Gr = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS || 1e6;
|
|
3727
|
+
class jr {
|
|
3732
3728
|
run(e, t, i) {
|
|
3733
|
-
ue.type = e,
|
|
3734
|
-
const r = [new
|
|
3729
|
+
ue.type = e, Ve.reset();
|
|
3730
|
+
const r = [new Ei(t, !0)];
|
|
3735
3731
|
for (let a = 0, f = i.length; a < f; a++)
|
|
3736
|
-
r.push(new
|
|
3732
|
+
r.push(new Ei(i[a], !1));
|
|
3737
3733
|
if (ue.numMultiPolys = r.length, ue.type === "difference") {
|
|
3738
3734
|
const a = r[0];
|
|
3739
3735
|
let f = 1;
|
|
@@ -3746,14 +3742,14 @@ class qr {
|
|
|
3746
3742
|
for (let v = a + 1, w = r.length; v < w; v++)
|
|
3747
3743
|
if (At(g.bbox, r[v].bbox) === null) return [];
|
|
3748
3744
|
}
|
|
3749
|
-
const o = new
|
|
3745
|
+
const o = new Bt(se.compare);
|
|
3750
3746
|
for (let a = 0, f = r.length; a < f; a++) {
|
|
3751
3747
|
const g = r[a].getSweepEvents();
|
|
3752
3748
|
for (let v = 0, w = g.length; v < w; v++)
|
|
3753
|
-
if (o.insert(g[v]), o.size >
|
|
3749
|
+
if (o.insert(g[v]), o.size > Li)
|
|
3754
3750
|
throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big).");
|
|
3755
3751
|
}
|
|
3756
|
-
const u = new
|
|
3752
|
+
const u = new Fr(o);
|
|
3757
3753
|
let s = o.size, c = o.pop();
|
|
3758
3754
|
for (; c; ) {
|
|
3759
3755
|
const a = c.key;
|
|
@@ -3761,9 +3757,9 @@ class qr {
|
|
|
3761
3757
|
const g = a.segment;
|
|
3762
3758
|
throw new Error(`Unable to pop() ${a.isLeft ? "left" : "right"} SweepEvent [${a.point.x}, ${a.point.y}] from segment #${g.id} [${g.leftSE.point.x}, ${g.leftSE.point.y}] -> [${g.rightSE.point.x}, ${g.rightSE.point.y}] from queue.`);
|
|
3763
3759
|
}
|
|
3764
|
-
if (o.size >
|
|
3760
|
+
if (o.size > Li)
|
|
3765
3761
|
throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big).");
|
|
3766
|
-
if (u.segments.length >
|
|
3762
|
+
if (u.segments.length > Gr)
|
|
3767
3763
|
throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments).");
|
|
3768
3764
|
const f = u.process(a);
|
|
3769
3765
|
for (let g = 0, v = f.length; g < v; g++) {
|
|
@@ -3772,12 +3768,12 @@ class qr {
|
|
|
3772
3768
|
}
|
|
3773
3769
|
s = o.size, c = o.pop();
|
|
3774
3770
|
}
|
|
3775
|
-
|
|
3776
|
-
const l =
|
|
3777
|
-
return new
|
|
3771
|
+
Ve.reset();
|
|
3772
|
+
const l = dt.factory(u.segments);
|
|
3773
|
+
return new Ur(l).getGeom();
|
|
3778
3774
|
}
|
|
3779
3775
|
}
|
|
3780
|
-
const ue = new
|
|
3776
|
+
const ue = new jr(), qr = function(n) {
|
|
3781
3777
|
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
|
|
3782
3778
|
t[i - 1] = arguments[i];
|
|
3783
3779
|
return ue.run("union", n, t);
|
|
@@ -3785,22 +3781,22 @@ const ue = new qr(), Zr = function(n) {
|
|
|
3785
3781
|
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
|
|
3786
3782
|
t[i - 1] = arguments[i];
|
|
3787
3783
|
return ue.run("intersection", n, t);
|
|
3788
|
-
},
|
|
3784
|
+
}, Zr = function(n) {
|
|
3789
3785
|
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
|
|
3790
3786
|
t[i - 1] = arguments[i];
|
|
3791
3787
|
return ue.run("xor", n, t);
|
|
3792
|
-
},
|
|
3788
|
+
}, Hr = function(n) {
|
|
3793
3789
|
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
|
|
3794
3790
|
t[i - 1] = arguments[i];
|
|
3795
3791
|
return ue.run("difference", n, t);
|
|
3796
3792
|
};
|
|
3797
|
-
var
|
|
3798
|
-
union:
|
|
3793
|
+
var Bi = {
|
|
3794
|
+
union: qr,
|
|
3799
3795
|
intersection: Qr,
|
|
3800
|
-
xor:
|
|
3801
|
-
difference:
|
|
3796
|
+
xor: Zr,
|
|
3797
|
+
difference: Hr
|
|
3802
3798
|
};
|
|
3803
|
-
function
|
|
3799
|
+
function Di(n, e, t) {
|
|
3804
3800
|
if (n !== null)
|
|
3805
3801
|
for (var i, r, o, u, s, c, l, d = 0, a = 0, f, g = n.type, v = g === "FeatureCollection", w = g === "Feature", E = v ? n.features.length : 1, h = 0; h < E; h++) {
|
|
3806
3802
|
l = v ? n.features[h].geometry : w ? n.geometry : n, f = l ? l.type === "GeometryCollection" : !1, s = f ? l.geometries.length : 1;
|
|
@@ -3877,7 +3873,7 @@ function Ui(n, e, t) {
|
|
|
3877
3873
|
break;
|
|
3878
3874
|
case "GeometryCollection":
|
|
3879
3875
|
for (i = 0; i < u.geometries.length; i++)
|
|
3880
|
-
if (
|
|
3876
|
+
if (Di(u.geometries[i], e) === !1)
|
|
3881
3877
|
return !1;
|
|
3882
3878
|
break;
|
|
3883
3879
|
default:
|
|
@@ -3887,7 +3883,7 @@ function Ui(n, e, t) {
|
|
|
3887
3883
|
}
|
|
3888
3884
|
}
|
|
3889
3885
|
}
|
|
3890
|
-
function
|
|
3886
|
+
function Dt(n, e) {
|
|
3891
3887
|
var t, i, r, o, u, s, c, l, d, a, f = 0, g = n.type === "FeatureCollection", v = n.type === "Feature", w = g ? n.features.length : 1;
|
|
3892
3888
|
for (t = 0; t < w; t++) {
|
|
3893
3889
|
for (s = g ? n.features[t].geometry : v ? n.geometry : n, l = g ? n.features[t].properties : v ? n.properties : {}, d = g ? n.features[t].bbox : v ? n.bbox : void 0, a = g ? n.features[t].id : v ? n.id : void 0, c = s ? s.type === "GeometryCollection" : !1, u = c ? s.geometries.length : 1, r = 0; r < u; r++) {
|
|
@@ -3938,8 +3934,8 @@ function Ut(n, e) {
|
|
|
3938
3934
|
f++;
|
|
3939
3935
|
}
|
|
3940
3936
|
}
|
|
3941
|
-
function
|
|
3942
|
-
|
|
3937
|
+
function Vr(n, e) {
|
|
3938
|
+
Dt(n, function(t, i, r, o, u) {
|
|
3943
3939
|
var s = t === null ? null : t.type;
|
|
3944
3940
|
switch (s) {
|
|
3945
3941
|
case null:
|
|
@@ -3947,7 +3943,7 @@ function Yr(n, e) {
|
|
|
3947
3943
|
case "LineString":
|
|
3948
3944
|
case "Polygon":
|
|
3949
3945
|
return e(
|
|
3950
|
-
|
|
3946
|
+
Ze(t, r, { bbox: o, id: u }),
|
|
3951
3947
|
i,
|
|
3952
3948
|
0
|
|
3953
3949
|
) === !1 ? !1 : void 0;
|
|
@@ -3969,53 +3965,53 @@ function Yr(n, e) {
|
|
|
3969
3965
|
type: c,
|
|
3970
3966
|
coordinates: d
|
|
3971
3967
|
};
|
|
3972
|
-
if (e(
|
|
3968
|
+
if (e(Ze(a, r), i, l) === !1)
|
|
3973
3969
|
return !1;
|
|
3974
3970
|
}
|
|
3975
3971
|
});
|
|
3976
3972
|
}
|
|
3977
|
-
function
|
|
3973
|
+
function Yr(n, e = {}) {
|
|
3978
3974
|
const t = [];
|
|
3979
|
-
if (
|
|
3975
|
+
if (Dt(n, (r) => {
|
|
3980
3976
|
t.push(r.coordinates);
|
|
3981
3977
|
}), t.length < 2)
|
|
3982
3978
|
throw new Error("Must have at least 2 geometries");
|
|
3983
|
-
const i =
|
|
3984
|
-
return i.length === 0 ? null : i.length === 1 ?
|
|
3979
|
+
const i = Bi.union(t[0], ...t.slice(1));
|
|
3980
|
+
return i.length === 0 ? null : i.length === 1 ? zt(i[0], e.properties) : Wi(i, e.properties);
|
|
3985
3981
|
}
|
|
3986
|
-
var
|
|
3987
|
-
function
|
|
3982
|
+
var Ui = Yr;
|
|
3983
|
+
function Kr(n, e = {}) {
|
|
3988
3984
|
if (n.bbox != null && e.recompute !== !0)
|
|
3989
3985
|
return n.bbox;
|
|
3990
3986
|
const t = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
|
|
3991
|
-
return
|
|
3987
|
+
return Di(n, (i) => {
|
|
3992
3988
|
t[0] > i[0] && (t[0] = i[0]), t[1] > i[1] && (t[1] = i[1]), t[2] < i[0] && (t[2] = i[0]), t[3] < i[1] && (t[3] = i[1]);
|
|
3993
3989
|
}), t;
|
|
3994
3990
|
}
|
|
3995
|
-
var
|
|
3996
|
-
function
|
|
3991
|
+
var Si = Kr;
|
|
3992
|
+
function Xr(n) {
|
|
3997
3993
|
const e = [];
|
|
3998
|
-
if (
|
|
3994
|
+
if (Dt(n, (r) => {
|
|
3999
3995
|
e.push(r.coordinates);
|
|
4000
3996
|
}), e.length < 2)
|
|
4001
3997
|
throw new Error("Must have at least two features");
|
|
4002
|
-
const t = n.features[0].properties || {}, i =
|
|
4003
|
-
return i.length === 0 ? null : i.length === 1 ?
|
|
3998
|
+
const t = n.features[0].properties || {}, i = Bi.difference(e[0], ...e.slice(1));
|
|
3999
|
+
return i.length === 0 ? null : i.length === 1 ? zt(i[0], t) : Wi(i, t);
|
|
4004
4000
|
}
|
|
4005
|
-
var
|
|
4006
|
-
function
|
|
4001
|
+
var Jr = Xr;
|
|
4002
|
+
function $r(n) {
|
|
4007
4003
|
if (!n)
|
|
4008
4004
|
throw new Error("geojson is required");
|
|
4009
4005
|
var e = [];
|
|
4010
|
-
return
|
|
4006
|
+
return Vr(n, function(t) {
|
|
4011
4007
|
e.push(t);
|
|
4012
|
-
}),
|
|
4008
|
+
}), He(e);
|
|
4013
4009
|
}
|
|
4014
|
-
var
|
|
4015
|
-
function
|
|
4016
|
-
const t =
|
|
4017
|
-
|
|
4018
|
-
|
|
4010
|
+
var eo = $r;
|
|
4011
|
+
function xi(n, e) {
|
|
4012
|
+
const t = Jr(
|
|
4013
|
+
He([
|
|
4014
|
+
zt([
|
|
4019
4015
|
[
|
|
4020
4016
|
[180, 90],
|
|
4021
4017
|
[-180, 90],
|
|
@@ -4030,10 +4026,10 @@ function Mi(n, e) {
|
|
|
4030
4026
|
if (!t)
|
|
4031
4027
|
return;
|
|
4032
4028
|
t.properties = { isMask: !0 };
|
|
4033
|
-
const i =
|
|
4029
|
+
const i = ct(Si(n)), r = (i[2] - i[0]) / 360 / 1e3, o = i[0] < -180, u = i[2] > 180, s = eo(n);
|
|
4034
4030
|
if (s.features.length > 1 && (o || u))
|
|
4035
4031
|
for (const c of s.features) {
|
|
4036
|
-
const l =
|
|
4032
|
+
const l = ct(Si(c));
|
|
4037
4033
|
if (u && l[0] < -180 + r)
|
|
4038
4034
|
for (const d of c.geometry.coordinates)
|
|
4039
4035
|
for (const a of d)
|
|
@@ -4044,13 +4040,13 @@ function Mi(n, e) {
|
|
|
4044
4040
|
a[0] -= 360 - r;
|
|
4045
4041
|
}
|
|
4046
4042
|
e(
|
|
4047
|
-
|
|
4048
|
-
s.features.length < 2 ? n :
|
|
4043
|
+
He([
|
|
4044
|
+
s.features.length < 2 ? n : Ui(s) ?? n,
|
|
4049
4045
|
t
|
|
4050
4046
|
])
|
|
4051
4047
|
);
|
|
4052
4048
|
}
|
|
4053
|
-
const
|
|
4049
|
+
const Mi = {
|
|
4054
4050
|
fill: {
|
|
4055
4051
|
paint: {
|
|
4056
4052
|
"fill-color": "#000",
|
|
@@ -4069,8 +4065,8 @@ const Ci = {
|
|
|
4069
4065
|
},
|
|
4070
4066
|
filter: ["!", ["has", "isMask"]]
|
|
4071
4067
|
}
|
|
4072
|
-
},
|
|
4073
|
-
function
|
|
4068
|
+
}, ot = "mtlr-gc-full-geom", ki = "mtlr-gc-full-geom-fill", Ci = "mtlr-gc-full-geom-line";
|
|
4069
|
+
function to(n, e, t = !0, i = !0, r = {}, o = {}, u = Mi, s = !1) {
|
|
4074
4070
|
let c;
|
|
4075
4071
|
const l = [];
|
|
4076
4072
|
let d, a, f;
|
|
@@ -4079,14 +4075,14 @@ function io(n, e, t = !0, i = !0, r = {}, o = {}, u = Ci, s = !1) {
|
|
|
4079
4075
|
n.once("load", g);
|
|
4080
4076
|
return;
|
|
4081
4077
|
}
|
|
4082
|
-
const h = u ? u === !0 ?
|
|
4078
|
+
const h = u ? u === !0 ? Mi : u : void 0;
|
|
4083
4079
|
if (!(h != null && h.fill) && !(h != null && h.line))
|
|
4084
4080
|
return;
|
|
4085
|
-
const m = n.getSource(
|
|
4081
|
+
const m = n.getSource(ot);
|
|
4086
4082
|
if (m)
|
|
4087
|
-
m.setData(f ??
|
|
4083
|
+
m.setData(f ?? He([]));
|
|
4088
4084
|
else if (f)
|
|
4089
|
-
n.addSource(
|
|
4085
|
+
n.addSource(ot, {
|
|
4090
4086
|
type: "geojson",
|
|
4091
4087
|
data: f
|
|
4092
4088
|
});
|
|
@@ -4096,12 +4092,12 @@ function io(n, e, t = !0, i = !0, r = {}, o = {}, u = Ci, s = !1) {
|
|
|
4096
4092
|
...h == null ? void 0 : h.fill,
|
|
4097
4093
|
id: ki,
|
|
4098
4094
|
type: "fill",
|
|
4099
|
-
source:
|
|
4100
|
-
}), !n.getLayer(
|
|
4095
|
+
source: ot
|
|
4096
|
+
}), !n.getLayer(Ci) && (h != null && h.line) && n.addLayer({
|
|
4101
4097
|
...h == null ? void 0 : h.line,
|
|
4102
|
-
id:
|
|
4098
|
+
id: Ci,
|
|
4103
4099
|
type: "line",
|
|
4104
|
-
source:
|
|
4100
|
+
source: ot
|
|
4105
4101
|
});
|
|
4106
4102
|
}
|
|
4107
4103
|
function v(h) {
|
|
@@ -4122,7 +4118,7 @@ function io(n, e, t = !0, i = !0, r = {}, o = {}, u = Ci, s = !1) {
|
|
|
4122
4118
|
if (!e)
|
|
4123
4119
|
throw new Error();
|
|
4124
4120
|
const m = document.createElement("div");
|
|
4125
|
-
return h && m.classList.add("marker-interactive"), new
|
|
4121
|
+
return h && m.classList.add("marker-interactive"), new Yn({
|
|
4126
4122
|
props: { displayIn: "maplibre" },
|
|
4127
4123
|
target: m
|
|
4128
4124
|
}), new e.Marker({ element: m, offset: [1, -13] });
|
|
@@ -4160,12 +4156,12 @@ function io(n, e, t = !0, i = !0, r = {}, o = {}, u = Ci, s = !1) {
|
|
|
4160
4156
|
(M) => M.type === "Polygon" || M.type === "MultiPolygon"
|
|
4161
4157
|
);
|
|
4162
4158
|
e: if (L.length > 0) {
|
|
4163
|
-
const M =
|
|
4164
|
-
|
|
4159
|
+
const M = Ui(
|
|
4160
|
+
He(L.map((S) => Ze(S)))
|
|
4165
4161
|
);
|
|
4166
4162
|
if (!M)
|
|
4167
4163
|
break e;
|
|
4168
|
-
|
|
4164
|
+
xi(
|
|
4169
4165
|
{
|
|
4170
4166
|
...m,
|
|
4171
4167
|
geometry: M.geometry
|
|
@@ -4184,7 +4180,7 @@ function io(n, e, t = !0, i = !0, r = {}, o = {}, u = Ci, s = !1) {
|
|
|
4184
4180
|
}
|
|
4185
4181
|
if (!b) {
|
|
4186
4182
|
if (m.geometry.type === "Polygon" || m.geometry.type === "MultiPolygon")
|
|
4187
|
-
|
|
4183
|
+
xi(m, v);
|
|
4188
4184
|
else if (m.geometry.type === "LineString" || m.geometry.type === "MultiLineString") {
|
|
4189
4185
|
v(m);
|
|
4190
4186
|
return;
|
|
@@ -4238,7 +4234,7 @@ function io(n, e, t = !0, i = !0, r = {}, o = {}, u = Ci, s = !1) {
|
|
|
4238
4234
|
}
|
|
4239
4235
|
};
|
|
4240
4236
|
}
|
|
4241
|
-
function
|
|
4237
|
+
function io(n, e, t) {
|
|
4242
4238
|
var v, w;
|
|
4243
4239
|
class i {
|
|
4244
4240
|
constructor(h, m) {
|
|
@@ -4307,9 +4303,9 @@ function no(n, e, t) {
|
|
|
4307
4303
|
class f extends n {
|
|
4308
4304
|
constructor(m = {}) {
|
|
4309
4305
|
super();
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4306
|
+
St(this, v);
|
|
4307
|
+
St(this, w);
|
|
4308
|
+
nt(this, w, m);
|
|
4313
4309
|
}
|
|
4314
4310
|
onAddInt(m) {
|
|
4315
4311
|
const b = document.createElement("div");
|
|
@@ -4320,16 +4316,16 @@ function no(n, e, t) {
|
|
|
4320
4316
|
flyTo: S,
|
|
4321
4317
|
fullGeometryStyle: x,
|
|
4322
4318
|
..._
|
|
4323
|
-
} = H(this, w),
|
|
4324
|
-
mapController:
|
|
4319
|
+
} = H(this, w), C = typeof S == "boolean" ? {} : S, z = {
|
|
4320
|
+
mapController: to(
|
|
4325
4321
|
m,
|
|
4326
4322
|
e,
|
|
4327
4323
|
L,
|
|
4328
4324
|
M,
|
|
4329
|
-
|
|
4330
|
-
|
|
4325
|
+
C,
|
|
4326
|
+
C,
|
|
4331
4327
|
x,
|
|
4332
|
-
_.
|
|
4328
|
+
_.pickedResultStyle === "full-geometry-including-polygon-center-marker"
|
|
4333
4329
|
),
|
|
4334
4330
|
flyTo: S === void 0 ? !0 : !!S,
|
|
4335
4331
|
apiKey: "",
|
|
@@ -4339,7 +4335,7 @@ function no(n, e, t) {
|
|
|
4339
4335
|
};
|
|
4340
4336
|
if (!z.apiKey)
|
|
4341
4337
|
throw new Error("no apiKey provided");
|
|
4342
|
-
return
|
|
4338
|
+
return nt(this, v, new br({ target: b, props: z })), H(this, v).$on("select", (N) => {
|
|
4343
4339
|
this.fire(new r(this, N.detail));
|
|
4344
4340
|
}), H(this, v).$on("pick", (N) => {
|
|
4345
4341
|
this.fire(new c(this, N.detail.feature));
|
|
@@ -4379,7 +4375,7 @@ function no(n, e, t) {
|
|
|
4379
4375
|
}
|
|
4380
4376
|
setOptions(m) {
|
|
4381
4377
|
var _;
|
|
4382
|
-
|
|
4378
|
+
nt(this, w, m);
|
|
4383
4379
|
const {
|
|
4384
4380
|
marker: b,
|
|
4385
4381
|
showResultMarkers: L,
|
|
@@ -4432,9 +4428,9 @@ function no(n, e, t) {
|
|
|
4432
4428
|
}
|
|
4433
4429
|
};
|
|
4434
4430
|
}
|
|
4435
|
-
const { MapLibreBasedGeocodingControl:
|
|
4436
|
-
|
|
4437
|
-
|
|
4431
|
+
const { MapLibreBasedGeocodingControl: no, events: Ce } = io(
|
|
4432
|
+
Zt.Evented,
|
|
4433
|
+
Zt,
|
|
4438
4434
|
(n, e) => {
|
|
4439
4435
|
const t = {};
|
|
4440
4436
|
if (!("getSdkConfig" in n && typeof n.getSdkConfig == "function"))
|
|
@@ -4445,22 +4441,22 @@ const { MapLibreBasedGeocodingControl: ro, events: ke } = no(
|
|
|
4445
4441
|
return o && (t.language = o[1]), e.className += " maptiler-ctrl", t;
|
|
4446
4442
|
}
|
|
4447
4443
|
);
|
|
4448
|
-
class
|
|
4444
|
+
class so extends no {
|
|
4449
4445
|
onAdd(e) {
|
|
4450
4446
|
return super.onAddInt(e);
|
|
4451
4447
|
}
|
|
4452
4448
|
}
|
|
4453
|
-
const
|
|
4449
|
+
const lo = Ce.SelectEvent, uo = Ce.FeaturesListedEvent, ao = Ce.FeaturesMarkedEvent, co = Ce.OptionsVisibilityChangeEvent, fo = Ce.PickEvent, ho = Ce.QueryChangeEvent, go = Ce.ResponseEvent, mo = Ce.ReverseToggleEvent;
|
|
4454
4450
|
export {
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4451
|
+
uo as FeaturesListedEvent,
|
|
4452
|
+
ao as FeaturesMarkedEvent,
|
|
4453
|
+
so as GeocodingControl,
|
|
4454
|
+
co as OptionsVisibilityChangeEvent,
|
|
4455
|
+
fo as PickEvent,
|
|
4456
|
+
ho as QueryChangeEvent,
|
|
4457
|
+
go as ResponseEvent,
|
|
4458
|
+
mo as ReverseToggleEvent,
|
|
4459
|
+
lo as SelectEvent,
|
|
4460
|
+
to as createMapLibreGlMapController
|
|
4465
4461
|
};
|
|
4466
4462
|
//# sourceMappingURL=maptilersdk.js.map
|