@maptiler/geocoding-control 1.4.2-dev.1 → 1.4.2-dev.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/leaflet.js +316 -316
- package/leaflet.js.map +1 -1
- package/leaflet.umd.js +2 -2
- package/leaflet.umd.js.map +1 -1
- package/maplibregl.js +213 -213
- package/maplibregl.js.map +1 -1
- package/maplibregl.umd.js +2 -2
- package/maplibregl.umd.js.map +1 -1
- package/maptilersdk.js +213 -213
- package/maptilersdk.js.map +1 -1
- package/maptilersdk.umd.js +2 -2
- package/maptilersdk.umd.js.map +1 -1
- package/openlayers.js +461 -461
- package/openlayers.js.map +1 -1
- package/openlayers.umd.js +2 -2
- package/openlayers.umd.js.map +1 -1
- package/package.json +9 -9
- package/react.js +474 -474
- package/react.js.map +1 -1
- package/react.umd.js +1 -1
- package/react.umd.js.map +1 -1
- package/style.css +1 -1
- package/svelte/GeocodingControl.svelte +4 -3
- package/svelte/types.d.ts +2 -2
- package/types.d.ts +2 -2
- package/vanilla.js +227 -227
- package/vanilla.js.map +1 -1
- package/vanilla.umd.js +1 -1
- package/vanilla.umd.js.map +1 -1
package/maptilersdk.js
CHANGED
|
@@ -3,8 +3,8 @@ var Ft = (n) => {
|
|
|
3
3
|
throw TypeError(n);
|
|
4
4
|
};
|
|
5
5
|
var rn = (n, e, t) => e in n ? nn(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
6
|
-
var wt = (n, e, t) => rn(n, typeof e != "symbol" ? e + "" : e, t),
|
|
7
|
-
var
|
|
6
|
+
var wt = (n, e, t) => rn(n, typeof e != "symbol" ? e + "" : e, t), jt = (n, e, t) => e.has(n) || Ft("Cannot " + t);
|
|
7
|
+
var ne = (n, e, t) => (jt(n, e, "read from private field"), t ? t.call(n) : e.get(n)), _t = (n, e, t) => e.has(n) ? Ft("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(n) : e.set(n, t), et = (n, e, t, i) => (jt(n, e, "write to private field"), i ? i.call(n, t) : e.set(n, t), t);
|
|
8
8
|
import * as on from "@maptiler/sdk";
|
|
9
9
|
function A() {
|
|
10
10
|
}
|
|
@@ -18,7 +18,7 @@ function sn(n, e) {
|
|
|
18
18
|
function Li(n) {
|
|
19
19
|
return n();
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function Zt() {
|
|
22
22
|
return /* @__PURE__ */ Object.create(null);
|
|
23
23
|
}
|
|
24
24
|
function me(n) {
|
|
@@ -76,7 +76,7 @@ function fn(n) {
|
|
|
76
76
|
}
|
|
77
77
|
return -1;
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function qt(n) {
|
|
80
80
|
return n ?? "";
|
|
81
81
|
}
|
|
82
82
|
function P(n, e) {
|
|
@@ -117,21 +117,21 @@ function v(n, e, t) {
|
|
|
117
117
|
function gn(n) {
|
|
118
118
|
return Array.from(n.childNodes);
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function Fe(n, e) {
|
|
121
121
|
e = "" + e, n.data !== e && (n.data = /** @type {string} */
|
|
122
122
|
e);
|
|
123
123
|
}
|
|
124
124
|
function Gt(n, e) {
|
|
125
125
|
n.value = e ?? "";
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function oe(n, e, t) {
|
|
128
128
|
n.classList.toggle(e, !!t);
|
|
129
129
|
}
|
|
130
130
|
function mn(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 je;
|
|
134
|
-
function
|
|
134
|
+
function ze(n) {
|
|
135
135
|
je = n;
|
|
136
136
|
}
|
|
137
137
|
function Mi() {
|
|
@@ -163,41 +163,41 @@ function Qt(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
|
|
166
|
+
const Oe = [], St = [];
|
|
167
|
+
let We = [];
|
|
168
168
|
const Ht = [], yn = /* @__PURE__ */ Promise.resolve();
|
|
169
169
|
let Mt = !1;
|
|
170
170
|
function bn() {
|
|
171
171
|
Mt || (Mt = !0, yn.then(ki));
|
|
172
172
|
}
|
|
173
173
|
function kt(n) {
|
|
174
|
-
|
|
174
|
+
We.push(n);
|
|
175
175
|
}
|
|
176
176
|
const Et = /* @__PURE__ */ new Set();
|
|
177
|
-
let
|
|
177
|
+
let Re = 0;
|
|
178
178
|
function ki() {
|
|
179
|
-
if (
|
|
179
|
+
if (Re !== 0)
|
|
180
180
|
return;
|
|
181
181
|
const n = je;
|
|
182
182
|
do {
|
|
183
183
|
try {
|
|
184
|
-
for (;
|
|
185
|
-
const e =
|
|
186
|
-
|
|
184
|
+
for (; Re < Oe.length; ) {
|
|
185
|
+
const e = Oe[Re];
|
|
186
|
+
Re++, ze(e), wn(e.$$);
|
|
187
187
|
}
|
|
188
188
|
} catch (e) {
|
|
189
|
-
throw
|
|
189
|
+
throw Oe.length = 0, Re = 0, e;
|
|
190
190
|
}
|
|
191
|
-
for (
|
|
192
|
-
for (let e = 0; e <
|
|
193
|
-
const t =
|
|
191
|
+
for (ze(null), Oe.length = 0, Re = 0; St.length; ) St.pop()();
|
|
192
|
+
for (let e = 0; e < We.length; e += 1) {
|
|
193
|
+
const t = We[e];
|
|
194
194
|
Et.has(t) || (Et.add(t), t());
|
|
195
195
|
}
|
|
196
|
-
|
|
197
|
-
} while (
|
|
196
|
+
We.length = 0;
|
|
197
|
+
} while (Oe.length);
|
|
198
198
|
for (; Ht.length; )
|
|
199
199
|
Ht.pop()();
|
|
200
|
-
Mt = !1, Et.clear(),
|
|
200
|
+
Mt = !1, Et.clear(), ze(n);
|
|
201
201
|
}
|
|
202
202
|
function wn(n) {
|
|
203
203
|
if (n.fragment !== null) {
|
|
@@ -208,28 +208,28 @@ function wn(n) {
|
|
|
208
208
|
}
|
|
209
209
|
function _n(n) {
|
|
210
210
|
const e = [], t = [];
|
|
211
|
-
|
|
211
|
+
We.forEach((i) => n.indexOf(i) === -1 ? e.push(i) : t.push(i)), t.forEach((i) => i()), We = e;
|
|
212
212
|
}
|
|
213
213
|
const it = /* @__PURE__ */ new Set();
|
|
214
|
-
let
|
|
214
|
+
let ke;
|
|
215
215
|
function nt() {
|
|
216
|
-
|
|
216
|
+
ke = {
|
|
217
217
|
r: 0,
|
|
218
218
|
c: [],
|
|
219
|
-
p:
|
|
219
|
+
p: ke
|
|
220
220
|
// parent group
|
|
221
221
|
};
|
|
222
222
|
}
|
|
223
223
|
function rt() {
|
|
224
|
-
|
|
224
|
+
ke.r || me(ke.c), ke = ke.p;
|
|
225
225
|
}
|
|
226
|
-
function
|
|
226
|
+
function q(n, e) {
|
|
227
227
|
n && n.i && (it.delete(n), n.i(e));
|
|
228
228
|
}
|
|
229
229
|
function V(n, e, t, i) {
|
|
230
230
|
if (n && n.o) {
|
|
231
231
|
if (it.has(n)) return;
|
|
232
|
-
it.add(n),
|
|
232
|
+
it.add(n), ke.c.push(() => {
|
|
233
233
|
it.delete(n), i && (t && n.d(1), i());
|
|
234
234
|
}), n.o(e);
|
|
235
235
|
} else i && i();
|
|
@@ -254,7 +254,7 @@ function Ln(n, e, t, i, r, o, l, s, c, u, d, a) {
|
|
|
254
254
|
}
|
|
255
255
|
const _ = /* @__PURE__ */ new Set(), k = /* @__PURE__ */ new Set();
|
|
256
256
|
function x(L) {
|
|
257
|
-
|
|
257
|
+
q(L, 1), L.m(s, d), l.set(L.key, L), d = L.first, h--;
|
|
258
258
|
}
|
|
259
259
|
for (; f && h; ) {
|
|
260
260
|
const L = p[h - 1], w = n[f - 1], C = L.key, I = w.key;
|
|
@@ -282,11 +282,11 @@ function ge(n, e) {
|
|
|
282
282
|
t.fragment !== null && (_n(t.after_update), me(t.on_destroy), t.fragment && t.fragment.d(e), t.on_destroy = t.fragment = null, t.ctx = []);
|
|
283
283
|
}
|
|
284
284
|
function xn(n, e) {
|
|
285
|
-
n.$$.dirty[0] === -1 && (
|
|
285
|
+
n.$$.dirty[0] === -1 && (Oe.push(n), bn(), n.$$.dirty.fill(0)), n.$$.dirty[e / 31 | 0] |= 1 << e % 31;
|
|
286
286
|
}
|
|
287
287
|
function xe(n, e, t, i, r, o, l = null, s = [-1]) {
|
|
288
288
|
const c = je;
|
|
289
|
-
|
|
289
|
+
ze(n);
|
|
290
290
|
const u = n.$$ = {
|
|
291
291
|
fragment: null,
|
|
292
292
|
ctx: [],
|
|
@@ -294,7 +294,7 @@ function xe(n, e, t, i, r, o, l = null, s = [-1]) {
|
|
|
294
294
|
props: o,
|
|
295
295
|
update: A,
|
|
296
296
|
not_equal: r,
|
|
297
|
-
bound:
|
|
297
|
+
bound: Zt(),
|
|
298
298
|
// lifecycle
|
|
299
299
|
on_mount: [],
|
|
300
300
|
on_destroy: [],
|
|
@@ -303,7 +303,7 @@ function xe(n, e, t, i, r, o, l = null, s = [-1]) {
|
|
|
303
303
|
after_update: [],
|
|
304
304
|
context: new Map(e.context || (c ? c.$$.context : [])),
|
|
305
305
|
// everything else
|
|
306
|
-
callbacks:
|
|
306
|
+
callbacks: Zt(),
|
|
307
307
|
dirty: s,
|
|
308
308
|
skip_bound: !1,
|
|
309
309
|
root: e.target || c.$$.root
|
|
@@ -319,9 +319,9 @@ function xe(n, e, t, i, r, o, l = null, s = [-1]) {
|
|
|
319
319
|
u.fragment && u.fragment.l(a), a.forEach(B);
|
|
320
320
|
} else
|
|
321
321
|
u.fragment && u.fragment.c();
|
|
322
|
-
e.intro &&
|
|
322
|
+
e.intro && q(n.$$.fragment), he(n, e.target, e.anchor), ki();
|
|
323
323
|
}
|
|
324
|
-
|
|
324
|
+
ze(c);
|
|
325
325
|
}
|
|
326
326
|
class Se {
|
|
327
327
|
constructor() {
|
|
@@ -682,7 +682,7 @@ function Yt(n) {
|
|
|
682
682
|
},
|
|
683
683
|
p(i, r) {
|
|
684
684
|
r & /*placeType*/
|
|
685
|
-
64 &&
|
|
685
|
+
64 && Fe(
|
|
686
686
|
t,
|
|
687
687
|
/*placeType*/
|
|
688
688
|
i[6]
|
|
@@ -747,7 +747,7 @@ function An(n) {
|
|
|
747
747
|
"data-selected",
|
|
748
748
|
/*selected*/
|
|
749
749
|
n[1]
|
|
750
|
-
), v(e, "class", "svelte-ltkwvy"),
|
|
750
|
+
), v(e, "class", "svelte-ltkwvy"), oe(
|
|
751
751
|
e,
|
|
752
752
|
"selected",
|
|
753
753
|
/*selected*/
|
|
@@ -779,7 +779,7 @@ function An(n) {
|
|
|
779
779
|
) : (
|
|
780
780
|
/*feature*/
|
|
781
781
|
w[0].place_name.replace(/,.*/, "")
|
|
782
|
-
)) + "") &&
|
|
782
|
+
)) + "") && Fe(a, d), C & /*showPlaceType, feature, imageUrl*/
|
|
783
783
|
37 && (h = /*showPlaceType*/
|
|
784
784
|
w[2] === "always" || /*showPlaceType*/
|
|
785
785
|
w[2] && !/*feature*/
|
|
@@ -794,14 +794,14 @@ function An(n) {
|
|
|
794
794
|
(w[7] ? "" : (
|
|
795
795
|
/*feature*/
|
|
796
796
|
w[0].place_name.replace(/[^,]*,?\s*/, "")
|
|
797
|
-
)) + "") &&
|
|
797
|
+
)) + "") && Fe(m, p), C & /*selected*/
|
|
798
798
|
2 && v(
|
|
799
799
|
e,
|
|
800
800
|
"data-selected",
|
|
801
801
|
/*selected*/
|
|
802
802
|
w[1]
|
|
803
803
|
), C & /*selected*/
|
|
804
|
-
2 &&
|
|
804
|
+
2 && oe(
|
|
805
805
|
e,
|
|
806
806
|
"selected",
|
|
807
807
|
/*selected*/
|
|
@@ -897,12 +897,12 @@ function Fn(n) {
|
|
|
897
897
|
return {
|
|
898
898
|
c() {
|
|
899
899
|
e = ue("svg"), t = ue("path"), v(t, "stroke-width", "4"), v(t, "d", "M 5,33.103579 C 5,17.607779 18.457,5 35,5 C 51.543,5 65,17.607779 65,33.103579 C 65,56.388679 40.4668,76.048179 36.6112,79.137779 C 36.3714,79.329879 36.2116,79.457979 36.1427,79.518879 C 35.8203,79.800879 35.4102,79.942779 35,79.942779 C 34.5899,79.942779 34.1797,79.800879 33.8575,79.518879 C 33.7886,79.457979 33.6289,79.330079 33.3893,79.138079 C 29.5346,76.049279 5,56.389379 5,33.103579 Z M 35.0001,49.386379 C 43.1917,49.386379 49.8323,42.646079 49.8323,34.331379 C 49.8323,26.016779 43.1917,19.276479 35.0001,19.276479 C 26.8085,19.276479 20.1679,26.016779 20.1679,34.331379 C 20.1679,42.646079 26.8085,49.386379 35.0001,49.386379 Z"), v(t, "class", "svelte-gzo3ar"), v(e, "width", i = /*displayIn*/
|
|
900
|
-
n[0] === "list" ? 20 : void 0), v(e, "viewBox", "0 0 70 85"), v(e, "fill", "none"), v(e, "class", "svelte-gzo3ar"),
|
|
900
|
+
n[0] === "list" ? 20 : void 0), v(e, "viewBox", "0 0 70 85"), v(e, "fill", "none"), v(e, "class", "svelte-gzo3ar"), oe(
|
|
901
901
|
e,
|
|
902
902
|
"in-map",
|
|
903
903
|
/*displayIn*/
|
|
904
904
|
n[0] !== "list"
|
|
905
|
-
),
|
|
905
|
+
), oe(
|
|
906
906
|
e,
|
|
907
907
|
"list-icon",
|
|
908
908
|
/*displayIn*/
|
|
@@ -916,13 +916,13 @@ function Fn(n) {
|
|
|
916
916
|
o & /*displayIn*/
|
|
917
917
|
1 && i !== (i = /*displayIn*/
|
|
918
918
|
r[0] === "list" ? 20 : void 0) && v(e, "width", i), o & /*displayIn*/
|
|
919
|
-
1 &&
|
|
919
|
+
1 && oe(
|
|
920
920
|
e,
|
|
921
921
|
"in-map",
|
|
922
922
|
/*displayIn*/
|
|
923
923
|
r[0] !== "list"
|
|
924
924
|
), o & /*displayIn*/
|
|
925
|
-
1 &&
|
|
925
|
+
1 && oe(
|
|
926
926
|
e,
|
|
927
927
|
"list-icon",
|
|
928
928
|
/*displayIn*/
|
|
@@ -936,18 +936,18 @@ function Fn(n) {
|
|
|
936
936
|
}
|
|
937
937
|
};
|
|
938
938
|
}
|
|
939
|
-
function
|
|
939
|
+
function jn(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 Zn extends Se {
|
|
946
946
|
constructor(e) {
|
|
947
|
-
super(), xe(this, e,
|
|
947
|
+
super(), xe(this, e, jn, Fn, Le, { displayIn: 0 });
|
|
948
948
|
}
|
|
949
949
|
}
|
|
950
|
-
function
|
|
950
|
+
function qn(n) {
|
|
951
951
|
let e, t;
|
|
952
952
|
return {
|
|
953
953
|
c() {
|
|
@@ -966,7 +966,7 @@ function Zn(n) {
|
|
|
966
966
|
}
|
|
967
967
|
class Gn extends Se {
|
|
968
968
|
constructor(e) {
|
|
969
|
-
super(), xe(this, e, null,
|
|
969
|
+
super(), xe(this, e, null, qn, Le, {});
|
|
970
970
|
}
|
|
971
971
|
}
|
|
972
972
|
function Qn(n) {
|
|
@@ -999,7 +999,7 @@ function st(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
|
|
1002
|
+
let Be;
|
|
1003
1003
|
async function Yn(n, e, t) {
|
|
1004
1004
|
const i = n == null ? void 0 : n.getCenterAndZoom();
|
|
1005
1005
|
for (const r of e ?? [])
|
|
@@ -1007,10 +1007,10 @@ async function Yn(n, e, t) {
|
|
|
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 (Be && r.cachedLocationExpiry && Be.time + r.cachedLocationExpiry > Date.now()) {
|
|
1011
|
+
if (!Be.coords)
|
|
1012
1012
|
break e;
|
|
1013
|
-
return
|
|
1013
|
+
return Be.coords;
|
|
1014
1014
|
}
|
|
1015
1015
|
let o;
|
|
1016
1016
|
try {
|
|
@@ -1031,7 +1031,7 @@ async function Yn(n, e, t) {
|
|
|
1031
1031
|
}), o;
|
|
1032
1032
|
} catch {
|
|
1033
1033
|
} finally {
|
|
1034
|
-
r.cachedLocationExpiry && (
|
|
1034
|
+
r.cachedLocationExpiry && (Be = {
|
|
1035
1035
|
time: Date.now(),
|
|
1036
1036
|
coords: o
|
|
1037
1037
|
});
|
|
@@ -1078,12 +1078,12 @@ function It(n, e) {
|
|
|
1078
1078
|
if (Kn.test(n))
|
|
1079
1079
|
throw new Error("invalid coordinate value");
|
|
1080
1080
|
if (Kt.test(n))
|
|
1081
|
-
if (s = Kt.exec(n), c =
|
|
1081
|
+
if (s = Kt.exec(n), c = De(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), l = "DM";
|
|
1083
1083
|
else
|
|
1084
1084
|
throw new Error("invalid coordinate format");
|
|
1085
1085
|
else if (Xt.test(n))
|
|
1086
|
-
if (s = Xt.exec(n), c =
|
|
1086
|
+
if (s = Xt.exec(n), c = De(s), c) {
|
|
1087
1087
|
if (t = s[2], i = s[6], t.includes(",") && (t = t.replace(",", ".")), i.includes(",") && (i = i.replace(",", ".")), l = "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))
|
|
@@ -1092,17 +1092,17 @@ function It(n, e) {
|
|
|
1092
1092
|
} else
|
|
1093
1093
|
throw new Error("invalid decimal coordinate format");
|
|
1094
1094
|
else if (Jt.test(n))
|
|
1095
|
-
if (s = Jt.exec(n), c =
|
|
1095
|
+
if (s = Jt.exec(n), c = De(s), c)
|
|
1096
1096
|
t = Math.abs(parseInt(s[2])), s[4] && (t += s[4] / 60, l = "DM"), s[6] && (t += s[6].replace(",", ".") / 3600, l = "DMS"), parseInt(s[2]) < 0 && (t = -1 * t), 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
1099
|
else if ($t.test(n))
|
|
1100
|
-
if (s = $t.exec(n), c =
|
|
1100
|
+
if (s = $t.exec(n), c = De(s), c)
|
|
1101
1101
|
t = Math.abs(parseInt(s[2])), s[4] && (t += s[4] / 60, l = "DM"), s[6] && (t += s[6] / 3600, l = "DMS"), parseInt(s[2]) < 0 && (t = -1 * t), 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
1104
|
else if (ei.test(n)) {
|
|
1105
|
-
if (s = ei.exec(n), c =
|
|
1105
|
+
if (s = ei.exec(n), c = De(s), s.filter((u) => u).length <= 5)
|
|
1106
1106
|
throw new Error("invalid coordinates format");
|
|
1107
1107
|
if (c)
|
|
1108
1108
|
t = Math.abs(parseInt(s[2])), s[4] && (t += s[4].replace(",", ".") / 60, l = "DM"), s[6] && (t += s[6].replace(",", ".") / 3600, l = "DMS"), parseInt(s[2]) < 0 && (t = -1 * t), 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]);
|
|
@@ -1162,7 +1162,7 @@ function It(n, e) {
|
|
|
1162
1162
|
} else
|
|
1163
1163
|
throw new Error("coordinates pattern match failed");
|
|
1164
1164
|
}
|
|
1165
|
-
function
|
|
1165
|
+
function De(n) {
|
|
1166
1166
|
if (!isNaN(n[0]))
|
|
1167
1167
|
return !1;
|
|
1168
1168
|
const e = [...n];
|
|
@@ -1589,7 +1589,7 @@ function ri(n) {
|
|
|
1589
1589
|
he(e, i, r), t = !0;
|
|
1590
1590
|
},
|
|
1591
1591
|
i(i) {
|
|
1592
|
-
t || (
|
|
1592
|
+
t || (q(e.$$.fragment, i), t = !0);
|
|
1593
1593
|
},
|
|
1594
1594
|
o(i) {
|
|
1595
1595
|
V(e.$$.fragment, i), t = !1;
|
|
@@ -1608,7 +1608,7 @@ function oi(n) {
|
|
|
1608
1608
|
"title",
|
|
1609
1609
|
/*reverseButtonTitle*/
|
|
1610
1610
|
n[9]
|
|
1611
|
-
), v(e, "class", "svelte-
|
|
1611
|
+
), v(e, "class", "svelte-1uvos7g"), oe(
|
|
1612
1612
|
e,
|
|
1613
1613
|
"active",
|
|
1614
1614
|
/*reverseActive*/
|
|
@@ -1631,7 +1631,7 @@ function oi(n) {
|
|
|
1631
1631
|
/*reverseButtonTitle*/
|
|
1632
1632
|
l[9]
|
|
1633
1633
|
), (!i || s[0] & /*reverseActive*/
|
|
1634
|
-
1) &&
|
|
1634
|
+
1) && oe(
|
|
1635
1635
|
e,
|
|
1636
1636
|
"active",
|
|
1637
1637
|
/*reverseActive*/
|
|
@@ -1639,7 +1639,7 @@ function oi(n) {
|
|
|
1639
1639
|
);
|
|
1640
1640
|
},
|
|
1641
1641
|
i(l) {
|
|
1642
|
-
i || (
|
|
1642
|
+
i || (q(t.$$.fragment, l), i = !0);
|
|
1643
1643
|
},
|
|
1644
1644
|
o(l) {
|
|
1645
1645
|
V(t.$$.fragment, l), i = !1;
|
|
@@ -1669,7 +1669,7 @@ function lr(n) {
|
|
|
1669
1669
|
e = W("ul");
|
|
1670
1670
|
for (let u = 0; u < t.length; u += 1)
|
|
1671
1671
|
t[u].c();
|
|
1672
|
-
v(e, "class", "svelte-
|
|
1672
|
+
v(e, "class", "svelte-1uvos7g");
|
|
1673
1673
|
},
|
|
1674
1674
|
m(u, d) {
|
|
1675
1675
|
z(u, e, d);
|
|
@@ -1700,7 +1700,7 @@ function lr(n) {
|
|
|
1700
1700
|
i(u) {
|
|
1701
1701
|
if (!r) {
|
|
1702
1702
|
for (let d = 0; d < s.length; d += 1)
|
|
1703
|
-
|
|
1703
|
+
q(t[d]);
|
|
1704
1704
|
r = !0;
|
|
1705
1705
|
}
|
|
1706
1706
|
},
|
|
@@ -1724,21 +1724,21 @@ function ur(n) {
|
|
|
1724
1724
|
e = W("div"), _e(t.$$.fragment), i = ie(), r = W("div"), o = we(
|
|
1725
1725
|
/*noResultsMessage*/
|
|
1726
1726
|
n[7]
|
|
1727
|
-
), v(r, "class", "svelte-
|
|
1727
|
+
), v(r, "class", "svelte-1uvos7g"), v(e, "class", "no-results svelte-1uvos7g");
|
|
1728
1728
|
},
|
|
1729
1729
|
m(s, c) {
|
|
1730
1730
|
z(s, e, c), he(t, e, null), P(e, i), P(e, r), P(r, o), l = !0;
|
|
1731
1731
|
},
|
|
1732
1732
|
p(s, c) {
|
|
1733
1733
|
(!l || c[0] & /*noResultsMessage*/
|
|
1734
|
-
128) &&
|
|
1734
|
+
128) && Fe(
|
|
1735
1735
|
o,
|
|
1736
1736
|
/*noResultsMessage*/
|
|
1737
1737
|
s[7]
|
|
1738
1738
|
);
|
|
1739
1739
|
},
|
|
1740
1740
|
i(s) {
|
|
1741
|
-
l || (
|
|
1741
|
+
l || (q(t.$$.fragment, s), l = !0);
|
|
1742
1742
|
},
|
|
1743
1743
|
o(s) {
|
|
1744
1744
|
V(t.$$.fragment, s), l = !1;
|
|
@@ -1772,7 +1772,7 @@ function cr(n) {
|
|
|
1772
1772
|
e = W("div"), _e(t.$$.fragment), i = ie(), r = W("div"), o = we(
|
|
1773
1773
|
/*errorMessage*/
|
|
1774
1774
|
n[6]
|
|
1775
|
-
), l = ie(), s = W("button"), _e(c.$$.fragment), v(r, "class", "svelte-
|
|
1775
|
+
), l = ie(), s = W("button"), _e(c.$$.fragment), v(r, "class", "svelte-1uvos7g"), v(s, "class", "svelte-1uvos7g"), v(e, "class", "error svelte-1uvos7g");
|
|
1776
1776
|
},
|
|
1777
1777
|
m(f, h) {
|
|
1778
1778
|
z(f, e, h), he(t, e, null), P(e, i), P(e, r), P(r, o), P(e, l), P(e, s), he(c, s, null), u = !0, d || (a = J(
|
|
@@ -1784,14 +1784,14 @@ function cr(n) {
|
|
|
1784
1784
|
},
|
|
1785
1785
|
p(f, h) {
|
|
1786
1786
|
(!u || h[0] & /*errorMessage*/
|
|
1787
|
-
64) &&
|
|
1787
|
+
64) && Fe(
|
|
1788
1788
|
o,
|
|
1789
1789
|
/*errorMessage*/
|
|
1790
1790
|
f[6]
|
|
1791
1791
|
);
|
|
1792
1792
|
},
|
|
1793
1793
|
i(f) {
|
|
1794
|
-
u || (
|
|
1794
|
+
u || (q(t.$$.fragment, f), q(c.$$.fragment, f), u = !0);
|
|
1795
1795
|
},
|
|
1796
1796
|
o(f) {
|
|
1797
1797
|
V(t.$$.fragment, f), V(c.$$.fragment, f), u = !1;
|
|
@@ -1869,7 +1869,7 @@ function si(n, e) {
|
|
|
1869
1869
|
e[12]), i.$set(u);
|
|
1870
1870
|
},
|
|
1871
1871
|
i(s) {
|
|
1872
|
-
r || (
|
|
1872
|
+
r || (q(i.$$.fragment, s), r = !0);
|
|
1873
1873
|
},
|
|
1874
1874
|
o(s) {
|
|
1875
1875
|
V(i.$$.fragment, s), r = !1;
|
|
@@ -1899,8 +1899,8 @@ function fr(n) {
|
|
|
1899
1899
|
n[59],
|
|
1900
1900
|
null
|
|
1901
1901
|
), D = [cr, ar, ur, lr], F = [];
|
|
1902
|
-
function O(M,
|
|
1903
|
-
var $,
|
|
1902
|
+
function O(M, j) {
|
|
1903
|
+
var $, se;
|
|
1904
1904
|
return (
|
|
1905
1905
|
/*error*/
|
|
1906
1906
|
M[18] ? 0 : (
|
|
@@ -1910,7 +1910,7 @@ function fr(n) {
|
|
|
1910
1910
|
(($ = M[14]) == null ? void 0 : $.length) === 0 ? 2 : (
|
|
1911
1911
|
/*focusedDelayed*/
|
|
1912
1912
|
M[16] && /*listFeatures*/
|
|
1913
|
-
((
|
|
1913
|
+
((se = M[14]) != null && se.length) ? 3 : -1
|
|
1914
1914
|
)
|
|
1915
1915
|
) : 1
|
|
1916
1916
|
)
|
|
@@ -1918,7 +1918,7 @@ function fr(n) {
|
|
|
1918
1918
|
}
|
|
1919
1919
|
return ~(p = O(n)) && (m = F[p] = D[p](n)), {
|
|
1920
1920
|
c() {
|
|
1921
|
-
e = ie(), t = W("form"), i = W("div"), r = W("button"), _e(o.$$.fragment), l = ie(), s = W("input"), c = ie(), u = W("div"), d = W("button"), _e(a.$$.fragment), f = ie(), L && L.c(), h = ie(), w && w.c(), y = ie(), I && I.c(), b = ie(), m && m.c(), v(r, "class", "search-button svelte-
|
|
1921
|
+
e = ie(), t = W("form"), i = W("div"), r = W("button"), _e(o.$$.fragment), l = ie(), s = W("input"), c = ie(), u = W("div"), d = W("button"), _e(a.$$.fragment), f = ie(), L && L.c(), h = ie(), w && w.c(), y = ie(), I && I.c(), b = ie(), m && m.c(), v(r, "class", "search-button svelte-1uvos7g"), v(r, "type", "button"), v(
|
|
1922
1922
|
s,
|
|
1923
1923
|
"placeholder",
|
|
1924
1924
|
/*placeholder*/
|
|
@@ -1928,20 +1928,20 @@ function fr(n) {
|
|
|
1928
1928
|
"aria-label",
|
|
1929
1929
|
/*placeholder*/
|
|
1930
1930
|
n[8]
|
|
1931
|
-
), v(s, "class", "svelte-
|
|
1931
|
+
), v(s, "class", "svelte-1uvos7g"), v(d, "type", "button"), v(
|
|
1932
1932
|
d,
|
|
1933
1933
|
"title",
|
|
1934
1934
|
/*clearButtonTitle*/
|
|
1935
1935
|
n[3]
|
|
1936
|
-
), v(d, "class", "svelte-
|
|
1936
|
+
), v(d, "class", "svelte-1uvos7g"), v(u, "class", "clear-button-container svelte-1uvos7g"), oe(
|
|
1937
1937
|
u,
|
|
1938
1938
|
"displayable",
|
|
1939
1939
|
/*searchValue*/
|
|
1940
1940
|
n[1] !== ""
|
|
1941
|
-
), v(i, "class", "input-group svelte-
|
|
1941
|
+
), v(i, "class", "input-group svelte-1uvos7g"), v(t, "tabindex", "0"), v(t, "class", E = qt(
|
|
1942
1942
|
/*className*/
|
|
1943
1943
|
n[2]
|
|
1944
|
-
) + " svelte-
|
|
1944
|
+
) + " svelte-1uvos7g"), oe(
|
|
1945
1945
|
t,
|
|
1946
1946
|
"can-collapse",
|
|
1947
1947
|
/*collapsed*/
|
|
@@ -1949,8 +1949,8 @@ function fr(n) {
|
|
|
1949
1949
|
n[1] === ""
|
|
1950
1950
|
);
|
|
1951
1951
|
},
|
|
1952
|
-
m(M,
|
|
1953
|
-
z(M, e,
|
|
1952
|
+
m(M, j) {
|
|
1953
|
+
z(M, e, j), z(M, t, j), P(t, i), P(i, r), he(o, r, null), P(i, l), P(i, s), n[62](s), Gt(
|
|
1954
1954
|
s,
|
|
1955
1955
|
/*searchValue*/
|
|
1956
1956
|
n[1]
|
|
@@ -2003,46 +2003,46 @@ function fr(n) {
|
|
|
2003
2003
|
))
|
|
2004
2004
|
], _ = !0);
|
|
2005
2005
|
},
|
|
2006
|
-
p(M,
|
|
2007
|
-
(!S ||
|
|
2006
|
+
p(M, j) {
|
|
2007
|
+
(!S || j[0] & /*placeholder*/
|
|
2008
2008
|
256) && v(
|
|
2009
2009
|
s,
|
|
2010
2010
|
"placeholder",
|
|
2011
2011
|
/*placeholder*/
|
|
2012
2012
|
M[8]
|
|
2013
|
-
), (!S ||
|
|
2013
|
+
), (!S || j[0] & /*placeholder*/
|
|
2014
2014
|
256) && v(
|
|
2015
2015
|
s,
|
|
2016
2016
|
"aria-label",
|
|
2017
2017
|
/*placeholder*/
|
|
2018
2018
|
M[8]
|
|
2019
|
-
),
|
|
2019
|
+
), j[0] & /*searchValue*/
|
|
2020
2020
|
2 && s.value !== /*searchValue*/
|
|
2021
2021
|
M[1] && Gt(
|
|
2022
2022
|
s,
|
|
2023
2023
|
/*searchValue*/
|
|
2024
2024
|
M[1]
|
|
2025
|
-
), (!S ||
|
|
2025
|
+
), (!S || j[0] & /*clearButtonTitle*/
|
|
2026
2026
|
8) && v(
|
|
2027
2027
|
d,
|
|
2028
2028
|
"title",
|
|
2029
2029
|
/*clearButtonTitle*/
|
|
2030
2030
|
M[3]
|
|
2031
2031
|
), /*abortController*/
|
|
2032
|
-
M[19] ? L ?
|
|
2033
|
-
524288 &&
|
|
2032
|
+
M[19] ? L ? j[0] & /*abortController*/
|
|
2033
|
+
524288 && q(L, 1) : (L = ri(), L.c(), q(L, 1), L.m(u, null)) : L && (nt(), V(L, 1, 1, () => {
|
|
2034
2034
|
L = null;
|
|
2035
|
-
}), rt()), (!S ||
|
|
2036
|
-
2) &&
|
|
2035
|
+
}), rt()), (!S || j[0] & /*searchValue*/
|
|
2036
|
+
2) && oe(
|
|
2037
2037
|
u,
|
|
2038
2038
|
"displayable",
|
|
2039
2039
|
/*searchValue*/
|
|
2040
2040
|
M[1] !== ""
|
|
2041
2041
|
), /*enableReverse*/
|
|
2042
|
-
M[5] === !0 ? w ? (w.p(M,
|
|
2043
|
-
32 &&
|
|
2042
|
+
M[5] === !0 ? w ? (w.p(M, j), j[0] & /*enableReverse*/
|
|
2043
|
+
32 && q(w, 1)) : (w = oi(M), w.c(), q(w, 1), w.m(i, y)) : w && (nt(), V(w, 1, 1, () => {
|
|
2044
2044
|
w = null;
|
|
2045
|
-
}), rt()), I && I.p && (!S ||
|
|
2045
|
+
}), rt()), I && I.p && (!S || j[1] & /*$$scope*/
|
|
2046
2046
|
268435456) && cn(
|
|
2047
2047
|
I,
|
|
2048
2048
|
C,
|
|
@@ -2053,7 +2053,7 @@ function fr(n) {
|
|
|
2053
2053
|
C,
|
|
2054
2054
|
/*$$scope*/
|
|
2055
2055
|
M[59],
|
|
2056
|
-
|
|
2056
|
+
j,
|
|
2057
2057
|
null
|
|
2058
2058
|
) : fn(
|
|
2059
2059
|
/*$$scope*/
|
|
@@ -2062,14 +2062,14 @@ function fr(n) {
|
|
|
2062
2062
|
null
|
|
2063
2063
|
);
|
|
2064
2064
|
let $ = p;
|
|
2065
|
-
p = O(M), p === $ ? ~p && F[p].p(M,
|
|
2065
|
+
p = O(M), p === $ ? ~p && F[p].p(M, j) : (m && (nt(), V(F[$], 1, 1, () => {
|
|
2066
2066
|
F[$] = null;
|
|
2067
|
-
}), rt()), ~p ? (m = F[p], m ? m.p(M,
|
|
2068
|
-
4 && E !== (E =
|
|
2067
|
+
}), rt()), ~p ? (m = F[p], m ? m.p(M, j) : (m = F[p] = D[p](M), m.c()), q(m, 1), m.m(t, null)) : m = null), (!S || j[0] & /*className*/
|
|
2068
|
+
4 && E !== (E = qt(
|
|
2069
2069
|
/*className*/
|
|
2070
2070
|
M[2]
|
|
2071
|
-
) + " svelte-
|
|
2072
|
-
22) &&
|
|
2071
|
+
) + " svelte-1uvos7g")) && v(t, "class", E), (!S || j[0] & /*className, collapsed, searchValue*/
|
|
2072
|
+
22) && oe(
|
|
2073
2073
|
t,
|
|
2074
2074
|
"can-collapse",
|
|
2075
2075
|
/*collapsed*/
|
|
@@ -2078,7 +2078,7 @@ function fr(n) {
|
|
|
2078
2078
|
);
|
|
2079
2079
|
},
|
|
2080
2080
|
i(M) {
|
|
2081
|
-
S || (
|
|
2081
|
+
S || (q(x), q(o.$$.fragment, M), q(a.$$.fragment, M), q(L), q(w), q(I, M), q(m), S = !0);
|
|
2082
2082
|
},
|
|
2083
2083
|
o(M) {
|
|
2084
2084
|
V(x), V(o.$$.fragment, M), V(a.$$.fragment, M), V(L), V(w), V(I, M), V(m), S = !1;
|
|
@@ -2114,7 +2114,7 @@ function dr(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: u = void 0 } = e, { clearButtonTitle: d = "clear" } = e, { clearOnBlur: a = !1 } = e, { collapsed: f = !1 } = e, { country: h = void 0 } = e, { debounceSearch: y = 200 } = e, { enableReverse: b = !1 } = e, { errorMessage: p = "Something went wrong…" } = e, { filter: m = () => !0 } = e, { flyTo: E = !0 } = e, { fuzzyMatch: S = !0 } = e, { language: _ = void 0 } = e, { limit: k = void 0 } = e, { mapController: x = void 0 } = e, { minLength: L = 2 } = e, { noResultsMessage: w = "Oops! Looks like you're trying to predict something that's not quite right. We can't seem to find what you're looking for. Maybe try double-checking your spelling or try a different search term. Keep on typing - we'll do our best to get you where you need to go!" } = e, { placeholder: C = "Search" } = e, { proximity: I = [{ type: "server-geolocation" }] } = e, { reverseActive: D = b === "always" } = e, { reverseButtonTitle: F = "toggle reverse geocoding" } = e, { searchValue: O = "" } = e, { showFullGeometry: M = !0 } = e, { showPlaceType:
|
|
2117
|
+
let { class: s = void 0 } = e, { apiKey: c } = e, { bbox: u = void 0 } = e, { clearButtonTitle: d = "clear" } = e, { clearOnBlur: a = !1 } = e, { collapsed: f = !1 } = e, { country: h = void 0 } = e, { debounceSearch: y = 200 } = e, { enableReverse: b = !1 } = e, { errorMessage: p = "Something went wrong…" } = e, { filter: m = () => !0 } = e, { flyTo: E = !0 } = e, { fuzzyMatch: S = !0 } = e, { language: _ = void 0 } = e, { limit: k = void 0 } = e, { mapController: x = void 0 } = e, { minLength: L = 2 } = e, { noResultsMessage: w = "Oops! Looks like you're trying to predict something that's not quite right. We can't seem to find what you're looking for. Maybe try double-checking your spelling or try a different search term. Keep on typing - we'll do our best to get you where you need to go!" } = e, { placeholder: C = "Search" } = e, { proximity: I = [{ type: "server-geolocation" }] } = e, { reverseActive: D = b === "always" } = e, { reverseButtonTitle: F = "toggle reverse geocoding" } = e, { searchValue: O = "" } = e, { showFullGeometry: M = !0 } = e, { showPlaceType: j = "ifNeeded" } = e, { showResultsWhileTyping: $ = !0 } = e, { selectFirst: se = !0 } = e, { flyToSelected: at = !1 } = e, { markerOnSelected: He = !0 } = e, { types: Ve = void 0 } = e, { excludeTypes: Ye = !1 } = e, { zoom: Ne = l } = e, { maxZoom: Ke = void 0 } = e, { apiUrl: ct = "https://api.maptiler.com/geocoding" } = e, { fetchParameters: ft = {} } = e, { iconsBaseUrl: Bt = "https://cdn.maptiler.com/maptiler-geocoding-control/v1.4.2-dev.2/icons/" } = e, { adjustUrlQuery: dt = () => {
|
|
2118
2118
|
} } = e;
|
|
2119
2119
|
function Wi() {
|
|
2120
2120
|
ae.focus();
|
|
@@ -2122,8 +2122,8 @@ function dr(n, e, t) {
|
|
|
2122
2122
|
function Ai() {
|
|
2123
2123
|
ae.blur();
|
|
2124
2124
|
}
|
|
2125
|
-
function Dt(g,
|
|
2126
|
-
t(1, O = g),
|
|
2125
|
+
function Dt(g, Z = !0, H = !1) {
|
|
2126
|
+
t(1, O = g), Z ? (t(15, U = -1), zt()) : (pt(!H, H), setTimeout(() => {
|
|
2127
2127
|
ae.focus(), ae.select();
|
|
2128
2128
|
}));
|
|
2129
2129
|
}
|
|
@@ -2133,18 +2133,18 @@ function dr(n, e, t) {
|
|
|
2133
2133
|
function Di() {
|
|
2134
2134
|
t(55, G = []), t(56, N = void 0);
|
|
2135
2135
|
}
|
|
2136
|
-
let
|
|
2136
|
+
let Te = !1, R, G, N, Ut = "", ae, U = -1, ce, Xe = [], Me, Pe, Je, ht;
|
|
2137
2137
|
const Ui = /* @__PURE__ */ new Set(), pe = vn();
|
|
2138
2138
|
pn(() => {
|
|
2139
2139
|
x && (x.setEventHandler(void 0), x.indicateReverse(!1), x.setSelectedMarker(-1), x.setMarkers(void 0, void 0));
|
|
2140
2140
|
});
|
|
2141
2141
|
function zt(g) {
|
|
2142
|
-
if (
|
|
2142
|
+
if (Pe && (clearTimeout(Pe), Pe = void 0), U > -1 && R)
|
|
2143
2143
|
t(56, N = R[U]), t(1, O = N.place_type[0] === "reverse" ? N.place_name : N.place_name.replace(/,.*/, "")), t(18, ce = void 0), t(55, G = void 0), t(15, U = -1);
|
|
2144
2144
|
else if (O) {
|
|
2145
|
-
const
|
|
2145
|
+
const Z = g || !gt(O);
|
|
2146
2146
|
mt(O, { exact: !0 }).then(() => {
|
|
2147
|
-
t(55, G = R), t(56, N = void 0),
|
|
2147
|
+
t(55, G = R), t(56, N = void 0), Z && zi();
|
|
2148
2148
|
}).catch((H) => t(18, ce = H));
|
|
2149
2149
|
}
|
|
2150
2150
|
}
|
|
@@ -2155,20 +2155,20 @@ function dr(n, e, t) {
|
|
|
2155
2155
|
return !1;
|
|
2156
2156
|
}
|
|
2157
2157
|
}
|
|
2158
|
-
async function mt(g, { byId:
|
|
2159
|
-
t(18, ce = void 0),
|
|
2158
|
+
async function mt(g, { byId: Z = !1, exact: H = !1 } = {}) {
|
|
2159
|
+
t(18, ce = void 0), Me == null || Me.abort();
|
|
2160
2160
|
const ee = new AbortController();
|
|
2161
|
-
t(19,
|
|
2161
|
+
t(19, Me = ee);
|
|
2162
2162
|
try {
|
|
2163
2163
|
const T = gt(g), Q = new URLSearchParams();
|
|
2164
|
-
if (_ !== void 0 && Q.set("language", Array.isArray(_) ? _.join(",") : _ ?? ""),
|
|
2164
|
+
if (_ !== void 0 && Q.set("language", Array.isArray(_) ? _.join(",") : _ ?? ""), Ve && Q.set("types", Ve.join(",")), Ye && Q.set("excludeTypes", String(Ye)), u && Q.set("bbox", u.map(($e) => $e.toFixed(6)).join(",")), h && Q.set("country", Array.isArray(h) ? h.join(",") : h), !Z && !T) {
|
|
2165
2165
|
const $e = await Yn(x, I, ee);
|
|
2166
2166
|
$e && Q.set("proximity", $e), (H || !$) && Q.set("autocomplete", "false"), Q.set("fuzzyMatch", String(S));
|
|
2167
2167
|
}
|
|
2168
|
-
k !== void 0 &&
|
|
2168
|
+
k !== void 0 && Q.set("limit", String(k)), Q.set("key", c), dt(Q);
|
|
2169
2169
|
const fe = ct + "/" + encodeURIComponent(T ? T.decimalLongitude + "," + T.decimalLatitude : g) + ".json?" + Q.toString();
|
|
2170
2170
|
if (fe === Ut) {
|
|
2171
|
-
|
|
2171
|
+
Z ? (t(14, R = void 0), t(56, N = Xe[0])) : t(14, R = Xe);
|
|
2172
2172
|
return;
|
|
2173
2173
|
}
|
|
2174
2174
|
Ut = fe;
|
|
@@ -2176,7 +2176,7 @@ function dr(n, e, t) {
|
|
|
2176
2176
|
if (!yt.ok)
|
|
2177
2177
|
throw new Error(await yt.text());
|
|
2178
2178
|
const bt = await yt.json();
|
|
2179
|
-
pe("response", { url: fe, featureCollection: bt }),
|
|
2179
|
+
pe("response", { url: fe, featureCollection: bt }), Z ? (t(14, R = void 0), t(56, N = bt.features[0]), Xe = [N]) : (t(14, R = bt.features.filter(m)), T && R.unshift({
|
|
2180
2180
|
type: "Feature",
|
|
2181
2181
|
properties: {},
|
|
2182
2182
|
id: "reverse_" + T.decimalLongitude + "_" + T.decimalLatitude,
|
|
@@ -2200,53 +2200,53 @@ function dr(n, e, t) {
|
|
|
2200
2200
|
return;
|
|
2201
2201
|
throw T;
|
|
2202
2202
|
} finally {
|
|
2203
|
-
ee ===
|
|
2203
|
+
ee === Me && t(19, Me = void 0);
|
|
2204
2204
|
}
|
|
2205
2205
|
}
|
|
2206
2206
|
function zi() {
|
|
2207
2207
|
var ee;
|
|
2208
2208
|
if (!(G != null && G.length) || !E)
|
|
2209
2209
|
return;
|
|
2210
|
-
const g = [180, 90, -180, -90],
|
|
2210
|
+
const g = [180, 90, -180, -90], Z = !G.some((T) => !T.matching_text);
|
|
2211
2211
|
let H;
|
|
2212
2212
|
for (const T of G) {
|
|
2213
|
-
const Q =
|
|
2214
|
-
if (H = Ke ?? (H === void 0 ? Q : Q === void 0 ? H : Math.max(H, Q)),
|
|
2213
|
+
const Q = Ae(T);
|
|
2214
|
+
if (H = Ke ?? (H === void 0 ? Q : Q === void 0 ? H : Math.max(H, Q)), Z || !T.matching_text)
|
|
2215
2215
|
for (const fe of [0, 1, 2, 3])
|
|
2216
2216
|
g[fe] = Math[fe < 2 ? "min" : "max"](g[fe], ((ee = T.bbox) == null ? void 0 : ee[fe]) ?? T.center[fe % 2]);
|
|
2217
2217
|
}
|
|
2218
|
-
x && G.length > 0 && (N && g[0] === g[2] && g[1] === g[3] ? x.flyTo(N.center,
|
|
2218
|
+
x && G.length > 0 && (N && g[0] === g[2] && g[1] === g[3] ? x.flyTo(N.center, Ae(N)) : x.fitBounds(st(g), 50, H));
|
|
2219
2219
|
}
|
|
2220
|
-
function
|
|
2220
|
+
function Ae(g) {
|
|
2221
2221
|
var H;
|
|
2222
2222
|
if (!g.bbox || g.bbox[0] !== g.bbox[2] && g.bbox[1] !== g.bbox[3])
|
|
2223
2223
|
return;
|
|
2224
|
-
if (typeof
|
|
2225
|
-
return g.id.startsWith("poi.") || g.id.startsWith("address.") ? Ke :
|
|
2226
|
-
const
|
|
2224
|
+
if (typeof Ne == "number")
|
|
2225
|
+
return g.id.startsWith("poi.") || g.id.startsWith("address.") ? Ke : Ne;
|
|
2226
|
+
const Z = g.id.replace(/\..*/, "");
|
|
2227
2227
|
return (Array.isArray((H = g.properties) == null ? void 0 : H.categories) ? g.properties.categories.reduce(
|
|
2228
2228
|
(ee, T) => {
|
|
2229
|
-
const Q =
|
|
2229
|
+
const Q = Ne[Z + "." + T];
|
|
2230
2230
|
return ee === void 0 ? Q : Q === void 0 ? ee : Math.max(ee, Q);
|
|
2231
2231
|
},
|
|
2232
2232
|
void 0
|
|
2233
|
-
) : void 0) ??
|
|
2233
|
+
) : void 0) ?? Ne[Z];
|
|
2234
2234
|
}
|
|
2235
2235
|
function Fi(g) {
|
|
2236
2236
|
t(0, D = b === "always"), t(14, R = void 0), t(56, N = void 0), t(15, U = -1), Dt(g[1].toFixed(6) + ", " + Vn(g[0], [-180, 180], !0).toFixed(6), !1, !0);
|
|
2237
2237
|
}
|
|
2238
|
-
function
|
|
2238
|
+
function ji(g) {
|
|
2239
2239
|
if (!R)
|
|
2240
2240
|
return;
|
|
2241
|
-
let
|
|
2242
|
-
|
|
2241
|
+
let Z = g.key === "ArrowDown" ? 1 : g.key === "ArrowUp" ? -1 : 0;
|
|
2242
|
+
Z && (U === (se ? 0 : -1) && Z === -1 && t(15, U = R.length), t(15, U += Z), U >= R.length && t(15, U = -1), U < 0 && se && t(15, U = 0), g.preventDefault());
|
|
2243
2243
|
}
|
|
2244
|
-
function pt(g = !0,
|
|
2245
|
-
if (t(18, ce = void 0), $ ||
|
|
2246
|
-
if (
|
|
2244
|
+
function pt(g = !0, Z = !1) {
|
|
2245
|
+
if (t(18, ce = void 0), $ || Z) {
|
|
2246
|
+
if (Pe && clearTimeout(Pe), O.length < L)
|
|
2247
2247
|
return;
|
|
2248
2248
|
const H = O;
|
|
2249
|
-
|
|
2249
|
+
Pe = window.setTimeout(
|
|
2250
2250
|
() => {
|
|
2251
2251
|
mt(H).catch((ee) => t(18, ce = ee));
|
|
2252
2252
|
},
|
|
@@ -2258,35 +2258,35 @@ function dr(n, e, t) {
|
|
|
2258
2258
|
function vt(g) {
|
|
2259
2259
|
t(56, N = g), t(1, O = g.place_name), t(15, U = -1);
|
|
2260
2260
|
}
|
|
2261
|
-
const
|
|
2262
|
-
function
|
|
2261
|
+
const Zi = () => ae.focus();
|
|
2262
|
+
function qi(g) {
|
|
2263
2263
|
St[g ? "unshift" : "push"](() => {
|
|
2264
2264
|
ae = g, t(17, ae);
|
|
2265
2265
|
});
|
|
2266
2266
|
}
|
|
2267
2267
|
function Gi() {
|
|
2268
|
-
O = this.value, t(1, O), t(13,
|
|
2268
|
+
O = this.value, t(1, O), t(13, Te), t(28, a);
|
|
2269
2269
|
}
|
|
2270
|
-
const Qi = () => t(13,
|
|
2270
|
+
const Qi = () => t(13, Te = !0), Hi = () => t(13, Te = !1), Vi = () => pt(), Yi = () => {
|
|
2271
2271
|
t(1, O = ""), ae.focus();
|
|
2272
2272
|
}, Ki = () => t(0, D = !D), Xi = () => t(18, ce = void 0), Ji = (g) => t(15, U = g), $i = (g) => vt(g), en = () => {
|
|
2273
|
-
|
|
2273
|
+
se || t(15, U = -1);
|
|
2274
2274
|
}, tn = () => {
|
|
2275
2275
|
};
|
|
2276
2276
|
return n.$$set = (g) => {
|
|
2277
|
-
"class" in g && t(2, s = g.class), "apiKey" in g && t(26, c = g.apiKey), "bbox" in g && t(27, u = g.bbox), "clearButtonTitle" in g && t(3, d = g.clearButtonTitle), "clearOnBlur" in g && t(28, a = g.clearOnBlur), "collapsed" in g && t(4, f = g.collapsed), "country" in g && t(29, h = g.country), "debounceSearch" in g && t(30, y = g.debounceSearch), "enableReverse" in g && t(5, b = g.enableReverse), "errorMessage" in g && t(6, p = g.errorMessage), "filter" in g && t(31, m = g.filter), "flyTo" in g && t(32, E = g.flyTo), "fuzzyMatch" in g && t(33, S = g.fuzzyMatch), "language" in g && t(34, _ = g.language), "limit" in g && t(35, k = g.limit), "mapController" in g && t(36, x = g.mapController), "minLength" in g && t(37, L = g.minLength), "noResultsMessage" in g && t(7, w = g.noResultsMessage), "placeholder" in g && t(8, C = g.placeholder), "proximity" in g && t(38, I = g.proximity), "reverseActive" in g && t(0, D = g.reverseActive), "reverseButtonTitle" in g && t(9, F = g.reverseButtonTitle), "searchValue" in g && t(1, O = g.searchValue), "showFullGeometry" in g && t(39, M = g.showFullGeometry), "showPlaceType" in g && t(10,
|
|
2277
|
+
"class" in g && t(2, s = g.class), "apiKey" in g && t(26, c = g.apiKey), "bbox" in g && t(27, u = g.bbox), "clearButtonTitle" in g && t(3, d = g.clearButtonTitle), "clearOnBlur" in g && t(28, a = g.clearOnBlur), "collapsed" in g && t(4, f = g.collapsed), "country" in g && t(29, h = g.country), "debounceSearch" in g && t(30, y = g.debounceSearch), "enableReverse" in g && t(5, b = g.enableReverse), "errorMessage" in g && t(6, p = g.errorMessage), "filter" in g && t(31, m = g.filter), "flyTo" in g && t(32, E = g.flyTo), "fuzzyMatch" in g && t(33, S = g.fuzzyMatch), "language" in g && t(34, _ = g.language), "limit" in g && t(35, k = g.limit), "mapController" in g && t(36, x = g.mapController), "minLength" in g && t(37, L = g.minLength), "noResultsMessage" in g && t(7, w = g.noResultsMessage), "placeholder" in g && t(8, C = g.placeholder), "proximity" in g && t(38, I = g.proximity), "reverseActive" in g && t(0, D = g.reverseActive), "reverseButtonTitle" in g && t(9, F = g.reverseButtonTitle), "searchValue" in g && t(1, O = g.searchValue), "showFullGeometry" in g && t(39, M = g.showFullGeometry), "showPlaceType" in g && t(10, j = g.showPlaceType), "showResultsWhileTyping" in g && t(40, $ = g.showResultsWhileTyping), "selectFirst" in g && t(11, se = g.selectFirst), "flyToSelected" in g && t(41, at = g.flyToSelected), "markerOnSelected" in g && t(42, He = g.markerOnSelected), "types" in g && t(43, Ve = g.types), "excludeTypes" in g && t(44, Ye = g.excludeTypes), "zoom" in g && t(45, Ne = g.zoom), "maxZoom" in g && t(46, Ke = g.maxZoom), "apiUrl" in g && t(47, ct = g.apiUrl), "fetchParameters" in g && t(48, ft = g.fetchParameters), "iconsBaseUrl" in g && t(12, Bt = g.iconsBaseUrl), "adjustUrlQuery" in g && t(49, dt = g.adjustUrlQuery), "$$scope" in g && t(59, o = g.$$scope);
|
|
2278
2278
|
}, n.$$.update = () => {
|
|
2279
2279
|
if (n.$$.dirty[0] & /*enableReverse*/
|
|
2280
2280
|
32 && t(0, D = b === "always"), n.$$.dirty[0] & /*focused, clearOnBlur*/
|
|
2281
2281
|
268443648 && setTimeout(() => {
|
|
2282
|
-
t(16, Je =
|
|
2282
|
+
t(16, Je = Te), a && !Te && t(1, O = "");
|
|
2283
2283
|
}), n.$$.dirty[0] & /*searchValue, listFeatures*/
|
|
2284
2284
|
16386 | n.$$.dirty[1] & /*minLength*/
|
|
2285
2285
|
64 && O.length < L && (t(56, N = void 0), t(14, R = void 0), t(18, ce = void 0), t(55, G = R)), n.$$.dirty[1] & /*showFullGeometry, picked*/
|
|
2286
2286
|
33554688 && M && N && !N.address && N.geometry.type === "Point" && N.place_type[0] !== "reverse" && mt(N.id, { byId: !0 }).catch((g) => t(18, ce = g)), n.$$.dirty[1] & /*mapController, picked, prevIdToFly, flyTo*/
|
|
2287
|
-
100663330 && (x && N && N.id !== ht && E && (!N.bbox || N.bbox[0] === N.bbox[2] && N.bbox[1] === N.bbox[3] ? x.flyTo(N.center,
|
|
2288
|
-
18432 &&
|
|
2289
|
-
|
|
2287
|
+
100663330 && (x && N && N.id !== ht && E && (!N.bbox || N.bbox[0] === N.bbox[2] && N.bbox[1] === N.bbox[3] ? x.flyTo(N.center, Ae(N)) : x.fitBounds(st(N.bbox), 50, Ae(N)), t(14, R = void 0), t(55, G = void 0), t(15, U = -1)), t(57, ht = N == null ? void 0 : N.id)), n.$$.dirty[0] & /*selectFirst, listFeatures*/
|
|
2288
|
+
18432 && se && R != null && R.length && t(15, U = 0), n.$$.dirty[0] & /*searchValue*/
|
|
2289
|
+
2 && t(15, U = -1), n.$$.dirty[0] & /*listFeatures*/
|
|
2290
2290
|
16384 | n.$$.dirty[1] & /*markedFeatures*/
|
|
2291
2291
|
16777216 && G !== R && t(55, G = void 0), n.$$.dirty[0] & /*reverseActive, listFeatures, focusedDelayed*/
|
|
2292
2292
|
81921 | n.$$.dirty[1] & /*mapController, markedFeatures*/
|
|
@@ -2297,12 +2297,12 @@ function dr(n, e, t) {
|
|
|
2297
2297
|
break;
|
|
2298
2298
|
case "markerClick":
|
|
2299
2299
|
{
|
|
2300
|
-
const
|
|
2301
|
-
|
|
2300
|
+
const Z = R == null ? void 0 : R.find((H) => H.id === g.id);
|
|
2301
|
+
Z && vt(Z);
|
|
2302
2302
|
}
|
|
2303
2303
|
break;
|
|
2304
2304
|
case "markerMouseEnter":
|
|
2305
|
-
G && t(15, U = Je ? (R == null ? void 0 : R.findIndex((
|
|
2305
|
+
G && t(15, U = Je ? (R == null ? void 0 : R.findIndex((Z) => Z.id === g.id)) ?? -1 : -1);
|
|
2306
2306
|
break;
|
|
2307
2307
|
case "markerMouseLeave":
|
|
2308
2308
|
G && t(15, U = -1);
|
|
@@ -2310,9 +2310,9 @@ function dr(n, e, t) {
|
|
|
2310
2310
|
}
|
|
2311
2311
|
}), n.$$.dirty[0] & /*listFeatures, selectedItemIndex*/
|
|
2312
2312
|
49152 && t(58, i = R == null ? void 0 : R[U]), n.$$.dirty[1] & /*mapController, selected, flyTo, flyToSelected*/
|
|
2313
|
-
134218786 && x && i && E && at && x.flyTo(i.center,
|
|
2314
|
-
2080 && (
|
|
2315
|
-
150997024 && x &&
|
|
2313
|
+
134218786 && x && i && E && at && x.flyTo(i.center, Ae(i)), n.$$.dirty[1] & /*markerOnSelected, mapController*/
|
|
2314
|
+
2080 && (He || x == null || x.setMarkers(void 0, void 0)), n.$$.dirty[1] & /*mapController, markerOnSelected, markedFeatures, selected*/
|
|
2315
|
+
150997024 && x && He && !G && (x.setMarkers(i ? [i] : void 0, void 0), x.setSelectedMarker(i ? 0 : -1)), n.$$.dirty[1] & /*mapController, markedFeatures, picked*/
|
|
2316
2316
|
50331680 && x && x.setMarkers(G, N), n.$$.dirty[0] & /*selectedItemIndex*/
|
|
2317
2317
|
32768 | n.$$.dirty[1] & /*markedFeatures, mapController*/
|
|
2318
2318
|
16777248 && G && x && x.setSelectedMarker(U), n.$$.dirty[0] & /*searchValue*/
|
|
@@ -2342,19 +2342,19 @@ function dr(n, e, t) {
|
|
|
2342
2342
|
w,
|
|
2343
2343
|
C,
|
|
2344
2344
|
F,
|
|
2345
|
-
|
|
2346
|
-
|
|
2345
|
+
j,
|
|
2346
|
+
se,
|
|
2347
2347
|
Bt,
|
|
2348
|
-
|
|
2348
|
+
Te,
|
|
2349
2349
|
R,
|
|
2350
2350
|
U,
|
|
2351
2351
|
Je,
|
|
2352
2352
|
ae,
|
|
2353
2353
|
ce,
|
|
2354
|
-
|
|
2354
|
+
Me,
|
|
2355
2355
|
Ui,
|
|
2356
2356
|
zt,
|
|
2357
|
-
|
|
2357
|
+
ji,
|
|
2358
2358
|
pt,
|
|
2359
2359
|
vt,
|
|
2360
2360
|
l,
|
|
@@ -2374,10 +2374,10 @@ function dr(n, e, t) {
|
|
|
2374
2374
|
M,
|
|
2375
2375
|
$,
|
|
2376
2376
|
at,
|
|
2377
|
+
He,
|
|
2377
2378
|
Ve,
|
|
2378
|
-
Me,
|
|
2379
2379
|
Ye,
|
|
2380
|
-
|
|
2380
|
+
Ne,
|
|
2381
2381
|
Ke,
|
|
2382
2382
|
ct,
|
|
2383
2383
|
ft,
|
|
@@ -2393,8 +2393,8 @@ function dr(n, e, t) {
|
|
|
2393
2393
|
i,
|
|
2394
2394
|
o,
|
|
2395
2395
|
r,
|
|
2396
|
-
ji,
|
|
2397
2396
|
Zi,
|
|
2397
|
+
qi,
|
|
2398
2398
|
Gi,
|
|
2399
2399
|
Qi,
|
|
2400
2400
|
Hi,
|
|
@@ -2505,7 +2505,7 @@ function Ot(n, e, t = {}) {
|
|
|
2505
2505
|
coordinates: n
|
|
2506
2506
|
}, e, t);
|
|
2507
2507
|
}
|
|
2508
|
-
function
|
|
2508
|
+
function qe(n, e = {}) {
|
|
2509
2509
|
const t = { type: "FeatureCollection" };
|
|
2510
2510
|
return e.id && (t.id = e.id), e.bbox && (t.bbox = e.bbox), t.features = n, t;
|
|
2511
2511
|
}
|
|
@@ -2926,29 +2926,29 @@ function _r(n, e) {
|
|
|
2926
2926
|
for (let i = 1; i < n; i++) t += e[i];
|
|
2927
2927
|
return t;
|
|
2928
2928
|
}
|
|
2929
|
-
function
|
|
2929
|
+
function Qe(n) {
|
|
2930
2930
|
return new Float64Array(n);
|
|
2931
2931
|
}
|
|
2932
|
-
const Er = (3 + 16 * de) * de, Lr = (2 + 12 * de) * de, xr = (9 + 64 * de) * de * de,
|
|
2932
|
+
const Er = (3 + 16 * de) * de, Lr = (2 + 12 * de) * de, xr = (9 + 64 * de) * de * de, Ie = Qe(4), ui = Qe(8), ai = Qe(12), ci = Qe(16), X = Qe(4);
|
|
2933
2933
|
function Sr(n, e, t, i, r, o, l) {
|
|
2934
2934
|
let s, c, u, d, a, f, h, y, b, p, m, E, S, _, k, x, L, w;
|
|
2935
2935
|
const C = n - r, I = t - r, D = e - o, F = i - o;
|
|
2936
|
-
_ = C * F, f = Y * C, h = f - (f - C), y = C - h, f = Y * F, b = f - (f - F), p = F - b, k = y * p - (_ - h * b - y * b - h * p), x = D * I, f = Y * D, h = f - (f - D), y = D - h, f = Y * I, b = f - (f - I), p = I - b, L = y * p - (x - h * b - y * b - h * p), m = k - L, a = k - m,
|
|
2937
|
-
let O = _r(4,
|
|
2936
|
+
_ = C * F, f = Y * C, h = f - (f - C), y = C - h, f = Y * F, b = f - (f - F), p = F - b, k = y * p - (_ - h * b - y * b - h * p), x = D * I, f = Y * D, h = f - (f - D), y = D - h, f = Y * I, b = f - (f - I), p = I - b, L = y * p - (x - h * b - y * b - h * p), m = k - L, a = k - m, Ie[0] = k - (m + a) + (a - L), E = _ + m, a = E - _, S = _ - (E - a) + (m - a), m = S - x, a = S - m, Ie[1] = S - (m + a) + (a - x), w = E + m, a = w - E, Ie[2] = E - (w - a) + (m - a), Ie[3] = w;
|
|
2937
|
+
let O = _r(4, Ie), M = Lr * l;
|
|
2938
2938
|
if (O >= M || -O >= M || (a = n - C, s = n - (C + a) + (a - r), a = t - I, u = t - (I + a) + (a - r), a = e - D, c = e - (D + a) + (a - o), a = i - F, d = i - (F + a) + (a - o), s === 0 && c === 0 && u === 0 && d === 0) || (M = xr * l + wr * Math.abs(O), O += C * d + F * s - (D * u + I * c), O >= M || -O >= M)) return O;
|
|
2939
2939
|
_ = s * F, f = Y * s, h = f - (f - s), y = s - h, f = Y * F, b = f - (f - F), p = F - b, k = y * p - (_ - h * b - y * b - h * p), x = c * I, f = Y * c, h = f - (f - c), y = c - h, f = Y * I, b = f - (f - I), p = I - b, L = y * p - (x - h * b - y * b - h * p), m = k - L, a = k - m, X[0] = k - (m + a) + (a - L), E = _ + m, a = E - _, S = _ - (E - a) + (m - a), m = S - x, a = S - m, X[1] = S - (m + a) + (a - x), w = E + m, a = w - E, X[2] = E - (w - a) + (m - a), X[3] = w;
|
|
2940
|
-
const
|
|
2940
|
+
const j = xt(4, Ie, 4, X, ui);
|
|
2941
2941
|
_ = C * d, f = Y * C, h = f - (f - C), y = C - h, f = Y * d, b = f - (f - d), p = d - b, k = y * p - (_ - h * b - y * b - h * p), x = D * u, f = Y * D, h = f - (f - D), y = D - h, f = Y * u, b = f - (f - u), p = u - b, L = y * p - (x - h * b - y * b - h * p), m = k - L, a = k - m, X[0] = k - (m + a) + (a - L), E = _ + m, a = E - _, S = _ - (E - a) + (m - a), m = S - x, a = S - m, X[1] = S - (m + a) + (a - x), w = E + m, a = w - E, X[2] = E - (w - a) + (m - a), X[3] = w;
|
|
2942
|
-
const $ = xt(
|
|
2942
|
+
const $ = xt(j, ui, 4, X, ai);
|
|
2943
2943
|
_ = s * d, f = Y * s, h = f - (f - s), y = s - h, f = Y * d, b = f - (f - d), p = d - b, k = y * p - (_ - h * b - y * b - h * p), x = c * u, f = Y * c, h = f - (f - c), y = c - h, f = Y * u, b = f - (f - u), p = u - b, L = y * p - (x - h * b - y * b - h * p), m = k - L, a = k - m, X[0] = k - (m + a) + (a - L), E = _ + m, a = E - _, S = _ - (E - a) + (m - a), m = S - x, a = S - m, X[1] = S - (m + a) + (a - x), w = E + m, a = w - E, X[2] = E - (w - a) + (m - a), X[3] = w;
|
|
2944
|
-
const
|
|
2945
|
-
return ci[
|
|
2944
|
+
const se = xt($, ai, 4, X, ci);
|
|
2945
|
+
return ci[se - 1];
|
|
2946
2946
|
}
|
|
2947
2947
|
function Mr(n, e, t, i, r, o) {
|
|
2948
2948
|
const l = (e - o) * (t - r), s = (n - r) * (i - o), c = l - s, u = Math.abs(l + s);
|
|
2949
2949
|
return Math.abs(c) >= Er * u ? c : -Sr(n, e, t, i, r, o, u);
|
|
2950
2950
|
}
|
|
2951
|
-
const
|
|
2951
|
+
const Ue = (n, e) => n.ll.x <= e.x && e.x <= n.ur.x && n.ll.y <= e.y && e.y <= n.ur.y, Rt = (n, e) => {
|
|
2952
2952
|
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;
|
|
2953
2953
|
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;
|
|
2954
2954
|
return {
|
|
@@ -3003,7 +3003,7 @@ class di {
|
|
|
3003
3003
|
return r !== null && fi(t.key, r.key) === 0 ? (this.tree.remove(e), r.key) : e;
|
|
3004
3004
|
}
|
|
3005
3005
|
}
|
|
3006
|
-
const
|
|
3006
|
+
const Ge = new Cr(), ot = (n, e) => n.x * e.y - n.y * e.x, Pi = (n, e) => n.x * e.x + n.y * e.y, hi = (n, e, t) => {
|
|
3007
3007
|
const i = Mr(n.x, n.y, e.x, e.y, t.x, t.y);
|
|
3008
3008
|
return i > 0 ? -1 : i < 0 ? 1 : 0;
|
|
3009
3009
|
}, lt = (n) => Math.sqrt(Pi(n, n)), Nr = (n, e, t) => {
|
|
@@ -3046,10 +3046,10 @@ const Qe = new Cr(), ot = (n, e) => n.x * e.y - n.y * e.x, Pi = (n, e) => n.x *
|
|
|
3046
3046
|
y: h
|
|
3047
3047
|
};
|
|
3048
3048
|
};
|
|
3049
|
-
class
|
|
3049
|
+
class re {
|
|
3050
3050
|
// for ordering sweep events in the sweep event queue
|
|
3051
3051
|
static compare(e, t) {
|
|
3052
|
-
const i =
|
|
3052
|
+
const i = re.comparePoints(e.point, t.point);
|
|
3053
3053
|
return i !== 0 ? i : (e.point !== t.point && e.link(t), e.isLeft !== t.isLeft ? e.isLeft ? 1 : -1 : be.compare(e.segment, t.segment));
|
|
3054
3054
|
}
|
|
3055
3055
|
// for ordering points in sweep line order
|
|
@@ -3184,13 +3184,13 @@ class be {
|
|
|
3184
3184
|
}
|
|
3185
3185
|
static fromRing(e, t, i) {
|
|
3186
3186
|
let r, o, l;
|
|
3187
|
-
const s =
|
|
3187
|
+
const s = re.comparePoints(e, t);
|
|
3188
3188
|
if (s < 0)
|
|
3189
3189
|
r = e, o = t, l = 1;
|
|
3190
3190
|
else if (s > 0)
|
|
3191
3191
|
r = t, o = e, l = -1;
|
|
3192
3192
|
else throw new Error(`Tried to create degenerate segment at [${e.x}, ${e.y}]`);
|
|
3193
|
-
const c = new
|
|
3193
|
+
const c = new re(r, !0), u = new re(o, !1);
|
|
3194
3194
|
return new be(c, u, [i], [l]);
|
|
3195
3195
|
}
|
|
3196
3196
|
/* When a segment is split, the rightSE is replaced with a new sweep event */
|
|
@@ -3261,7 +3261,7 @@ class be {
|
|
|
3261
3261
|
getIntersection(e) {
|
|
3262
3262
|
const t = this.bbox(), i = e.bbox(), r = Rt(t, i);
|
|
3263
3263
|
if (r === null) return null;
|
|
3264
|
-
const o = this.leftSE.point, l = this.rightSE.point, s = e.leftSE.point, c = e.rightSE.point, u =
|
|
3264
|
+
const o = this.leftSE.point, l = this.rightSE.point, s = e.leftSE.point, c = e.rightSE.point, u = Ue(t, s) && this.comparePoint(s) === 0, d = Ue(i, o) && e.comparePoint(o) === 0, a = Ue(t, c) && this.comparePoint(c) === 0, f = Ue(i, l) && e.comparePoint(l) === 0;
|
|
3265
3265
|
if (d && u)
|
|
3266
3266
|
return f && !a ? l : !f && a ? c : null;
|
|
3267
3267
|
if (d)
|
|
@@ -3272,7 +3272,7 @@ class be {
|
|
|
3272
3272
|
if (f) return l;
|
|
3273
3273
|
if (a) return c;
|
|
3274
3274
|
const h = Pr(o, this.vector(), s, e.vector());
|
|
3275
|
-
return h === null || !
|
|
3275
|
+
return h === null || !Ue(r, h) ? null : Ge.round(h.x, h.y);
|
|
3276
3276
|
}
|
|
3277
3277
|
/**
|
|
3278
3278
|
* Split the given segment into multiple segments on the given points.
|
|
@@ -3287,10 +3287,10 @@ class be {
|
|
|
3287
3287
|
* Warning: input array of points is modified
|
|
3288
3288
|
*/
|
|
3289
3289
|
split(e) {
|
|
3290
|
-
const t = [], i = e.events !== void 0, r = new
|
|
3290
|
+
const t = [], i = e.events !== void 0, r = new re(e, !0), o = new re(e, !1), l = this.rightSE;
|
|
3291
3291
|
this.replaceRightSE(o), t.push(o), t.push(r);
|
|
3292
3292
|
const s = new be(r, l, this.rings.slice(), this.windings.slice());
|
|
3293
|
-
return
|
|
3293
|
+
return re.comparePoints(s.leftSE.point, s.rightSE.point) > 0 && s.swapEvents(), re.comparePoints(this.leftSE.point, this.rightSE.point) > 0 && this.swapEvents(), i && (r.checkForConsuming(), o.checkForConsuming()), t;
|
|
3294
3294
|
}
|
|
3295
3295
|
/* Swap which event is left and right */
|
|
3296
3296
|
swapEvents() {
|
|
@@ -3408,7 +3408,7 @@ class pi {
|
|
|
3408
3408
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
3409
3409
|
if (this.poly = t, this.isExterior = i, this.segments = [], typeof e[0][0] != "number" || typeof e[0][1] != "number")
|
|
3410
3410
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
3411
|
-
const r =
|
|
3411
|
+
const r = Ge.round(e[0][0], e[0][1]);
|
|
3412
3412
|
this.bbox = {
|
|
3413
3413
|
ll: {
|
|
3414
3414
|
x: r.x,
|
|
@@ -3423,7 +3423,7 @@ class pi {
|
|
|
3423
3423
|
for (let l = 1, s = e.length; l < s; l++) {
|
|
3424
3424
|
if (typeof e[l][0] != "number" || typeof e[l][1] != "number")
|
|
3425
3425
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
3426
|
-
let c =
|
|
3426
|
+
let c = Ge.round(e[l][0], e[l][1]);
|
|
3427
3427
|
c.x === o.x && c.y === o.y || (this.segments.push(be.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);
|
|
3428
3428
|
}
|
|
3429
3429
|
(r.x !== o.x || r.y !== o.y) && this.segments.push(be.fromRing(o, r, this));
|
|
@@ -3580,7 +3580,7 @@ class ut {
|
|
|
3580
3580
|
let e = this.events[0];
|
|
3581
3581
|
for (let r = 1, o = this.events.length; r < o; r++) {
|
|
3582
3582
|
const l = this.events[r];
|
|
3583
|
-
|
|
3583
|
+
re.compare(e, l) > 0 && (e = l);
|
|
3584
3584
|
}
|
|
3585
3585
|
let t = e.segment.prevInResult(), i = t ? t.prevInResult() : null;
|
|
3586
3586
|
for (; ; ) {
|
|
@@ -3672,7 +3672,7 @@ class Wr {
|
|
|
3672
3672
|
}
|
|
3673
3673
|
if (u !== null || d !== null) {
|
|
3674
3674
|
let a = null;
|
|
3675
|
-
u === null ? a = d : d === null ? a = u : a =
|
|
3675
|
+
u === null ? a = d : d === null ? a = u : a = re.comparePoints(u, d) <= 0 ? u : d, this.queue.remove(t.rightSE), i.push(t.rightSE);
|
|
3676
3676
|
const f = t.split(a);
|
|
3677
3677
|
for (let h = 0, y = f.length; h < y; h++)
|
|
3678
3678
|
i.push(f[h]);
|
|
@@ -3711,7 +3711,7 @@ class Wr {
|
|
|
3711
3711
|
const bi = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE || 1e6, Ar = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS || 1e6;
|
|
3712
3712
|
class Br {
|
|
3713
3713
|
run(e, t, i) {
|
|
3714
|
-
le.type = e,
|
|
3714
|
+
le.type = e, Ge.reset();
|
|
3715
3715
|
const r = [new vi(t, !0)];
|
|
3716
3716
|
for (let a = 0, f = i.length; a < f; a++)
|
|
3717
3717
|
r.push(new vi(i[a], !1));
|
|
@@ -3727,7 +3727,7 @@ class Br {
|
|
|
3727
3727
|
for (let y = a + 1, b = r.length; y < b; y++)
|
|
3728
3728
|
if (Rt(h.bbox, r[y].bbox) === null) return [];
|
|
3729
3729
|
}
|
|
3730
|
-
const o = new Wt(
|
|
3730
|
+
const o = new Wt(re.compare);
|
|
3731
3731
|
for (let a = 0, f = r.length; a < f; a++) {
|
|
3732
3732
|
const h = r[a].getSweepEvents();
|
|
3733
3733
|
for (let y = 0, b = h.length; y < b; y++)
|
|
@@ -3753,7 +3753,7 @@ class Br {
|
|
|
3753
3753
|
}
|
|
3754
3754
|
s = o.size, c = o.pop();
|
|
3755
3755
|
}
|
|
3756
|
-
|
|
3756
|
+
Ge.reset();
|
|
3757
3757
|
const u = ut.factory(l.segments);
|
|
3758
3758
|
return new Or(u).getGeom();
|
|
3759
3759
|
}
|
|
@@ -3919,7 +3919,7 @@ function At(n, e) {
|
|
|
3919
3919
|
f++;
|
|
3920
3920
|
}
|
|
3921
3921
|
}
|
|
3922
|
-
function
|
|
3922
|
+
function jr(n, e) {
|
|
3923
3923
|
At(n, function(t, i, r, o, l) {
|
|
3924
3924
|
var s = t === null ? null : t.type;
|
|
3925
3925
|
switch (s) {
|
|
@@ -3955,7 +3955,7 @@ function qr(n, e) {
|
|
|
3955
3955
|
}
|
|
3956
3956
|
});
|
|
3957
3957
|
}
|
|
3958
|
-
function
|
|
3958
|
+
function Zr(n, e = {}) {
|
|
3959
3959
|
const t = [];
|
|
3960
3960
|
if (At(n, (r) => {
|
|
3961
3961
|
t.push(r.coordinates);
|
|
@@ -3964,8 +3964,8 @@ function jr(n, e = {}) {
|
|
|
3964
3964
|
const i = Ri.union(t[0], ...t.slice(1));
|
|
3965
3965
|
return i.length === 0 ? null : i.length === 1 ? Ot(i[0], e.properties) : Ti(i, e.properties);
|
|
3966
3966
|
}
|
|
3967
|
-
var Oi =
|
|
3968
|
-
function
|
|
3967
|
+
var Oi = Zr;
|
|
3968
|
+
function qr(n, e = {}) {
|
|
3969
3969
|
if (n.bbox != null && e.recompute !== !0)
|
|
3970
3970
|
return n.bbox;
|
|
3971
3971
|
const t = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
|
|
@@ -3973,7 +3973,7 @@ function Zr(n, e = {}) {
|
|
|
3973
3973
|
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]);
|
|
3974
3974
|
}), t;
|
|
3975
3975
|
}
|
|
3976
|
-
var wi =
|
|
3976
|
+
var wi = qr;
|
|
3977
3977
|
function Gr(n) {
|
|
3978
3978
|
const e = [];
|
|
3979
3979
|
if (At(n, (r) => {
|
|
@@ -3988,14 +3988,14 @@ function Hr(n) {
|
|
|
3988
3988
|
if (!n)
|
|
3989
3989
|
throw new Error("geojson is required");
|
|
3990
3990
|
var e = [];
|
|
3991
|
-
return
|
|
3991
|
+
return jr(n, function(t) {
|
|
3992
3992
|
e.push(t);
|
|
3993
|
-
}),
|
|
3993
|
+
}), qe(e);
|
|
3994
3994
|
}
|
|
3995
3995
|
var Vr = Hr;
|
|
3996
3996
|
function _i(n, e) {
|
|
3997
3997
|
const t = Qr(
|
|
3998
|
-
|
|
3998
|
+
qe([
|
|
3999
3999
|
Ot([
|
|
4000
4000
|
[
|
|
4001
4001
|
[180, 90],
|
|
@@ -4025,13 +4025,13 @@ function _i(n, e) {
|
|
|
4025
4025
|
a[0] -= 360 - r;
|
|
4026
4026
|
}
|
|
4027
4027
|
e(
|
|
4028
|
-
|
|
4028
|
+
qe([
|
|
4029
4029
|
s.features.length < 2 ? n : Oi(s) ?? n,
|
|
4030
4030
|
t
|
|
4031
4031
|
])
|
|
4032
4032
|
);
|
|
4033
4033
|
}
|
|
4034
|
-
const Ei =
|
|
4034
|
+
const Ei = qe([]);
|
|
4035
4035
|
function Yr(n, e, t = !0, i = !0, r = {}, o = {}, l = {
|
|
4036
4036
|
fill: {
|
|
4037
4037
|
paint: {
|
|
@@ -4086,7 +4086,7 @@ function Yr(n, e, t = !0, i = !0, r = {}, o = {}, l = {
|
|
|
4086
4086
|
if (!e)
|
|
4087
4087
|
throw new Error();
|
|
4088
4088
|
const m = document.createElement("div");
|
|
4089
|
-
return p && m.classList.add("marker-interactive"), new
|
|
4089
|
+
return p && m.classList.add("marker-interactive"), new Zn({
|
|
4090
4090
|
props: { displayIn: "maplibre" },
|
|
4091
4091
|
target: m
|
|
4092
4092
|
}), new e.Marker({ element: m, offset: [1, -13] });
|
|
@@ -4130,7 +4130,7 @@ function Yr(n, e, t = !0, i = !0, r = {}, o = {}, l = {
|
|
|
4130
4130
|
);
|
|
4131
4131
|
e: if (S.length > 0) {
|
|
4132
4132
|
const _ = Oi(
|
|
4133
|
-
|
|
4133
|
+
qe(S.map((k) => Ze(k)))
|
|
4134
4134
|
);
|
|
4135
4135
|
if (!_)
|
|
4136
4136
|
break e;
|
|
@@ -4197,13 +4197,13 @@ function Yr(n, e, t = !0, i = !0, r = {}, o = {}, l = {
|
|
|
4197
4197
|
}
|
|
4198
4198
|
};
|
|
4199
4199
|
}
|
|
4200
|
-
var te,
|
|
4200
|
+
var te, Ce;
|
|
4201
4201
|
class Kr extends EventTarget {
|
|
4202
4202
|
constructor(t = {}) {
|
|
4203
4203
|
super();
|
|
4204
4204
|
_t(this, te);
|
|
4205
|
-
_t(this,
|
|
4206
|
-
et(this,
|
|
4205
|
+
_t(this, Ce);
|
|
4206
|
+
et(this, Ce, t);
|
|
4207
4207
|
}
|
|
4208
4208
|
onAddInt(t) {
|
|
4209
4209
|
const i = document.createElement("div");
|
|
@@ -4214,7 +4214,7 @@ class Kr extends EventTarget {
|
|
|
4214
4214
|
flyTo: l,
|
|
4215
4215
|
fullGeometryStyle: s,
|
|
4216
4216
|
...c
|
|
4217
|
-
} =
|
|
4217
|
+
} = ne(this, Ce), u = typeof l == "boolean" ? {} : l, d = this.getExtraProps(t, i), f = {
|
|
4218
4218
|
mapController: Yr(
|
|
4219
4219
|
t,
|
|
4220
4220
|
this.getMapLibreGl(),
|
|
@@ -4243,51 +4243,51 @@ class Kr extends EventTarget {
|
|
|
4243
4243
|
"reverseToggle",
|
|
4244
4244
|
"queryChange"
|
|
4245
4245
|
])
|
|
4246
|
-
|
|
4246
|
+
ne(this, te).$on(h, (y) => this.dispatchEvent(y));
|
|
4247
4247
|
return i;
|
|
4248
4248
|
}
|
|
4249
4249
|
setOptions(t) {
|
|
4250
4250
|
var c;
|
|
4251
|
-
et(this,
|
|
4251
|
+
et(this, Ce, t);
|
|
4252
4252
|
const {
|
|
4253
4253
|
marker: i,
|
|
4254
4254
|
showResultMarkers: r,
|
|
4255
4255
|
flyTo: o,
|
|
4256
4256
|
fullGeometryStyle: l,
|
|
4257
4257
|
...s
|
|
4258
|
-
} =
|
|
4259
|
-
(c =
|
|
4258
|
+
} = ne(this, Ce);
|
|
4259
|
+
(c = ne(this, te)) == null || c.$set(s);
|
|
4260
4260
|
}
|
|
4261
4261
|
setQuery(t, i = !0) {
|
|
4262
4262
|
var r;
|
|
4263
|
-
(r =
|
|
4263
|
+
(r = ne(this, te)) == null || r.setQuery(t, i);
|
|
4264
4264
|
}
|
|
4265
4265
|
clearMap() {
|
|
4266
4266
|
var t;
|
|
4267
|
-
(t =
|
|
4267
|
+
(t = ne(this, te)) == null || t.clearMap();
|
|
4268
4268
|
}
|
|
4269
4269
|
clearList() {
|
|
4270
4270
|
var t;
|
|
4271
|
-
(t =
|
|
4271
|
+
(t = ne(this, te)) == null || t.clearList();
|
|
4272
4272
|
}
|
|
4273
4273
|
setReverseMode(t) {
|
|
4274
4274
|
var i;
|
|
4275
|
-
(i =
|
|
4275
|
+
(i = ne(this, te)) == null || i.$set({ reverseActive: t });
|
|
4276
4276
|
}
|
|
4277
4277
|
focus() {
|
|
4278
4278
|
var t;
|
|
4279
|
-
(t =
|
|
4279
|
+
(t = ne(this, te)) == null || t.focus();
|
|
4280
4280
|
}
|
|
4281
4281
|
blur() {
|
|
4282
4282
|
var t;
|
|
4283
|
-
(t =
|
|
4283
|
+
(t = ne(this, te)) == null || t.blur();
|
|
4284
4284
|
}
|
|
4285
4285
|
onRemove() {
|
|
4286
4286
|
var t;
|
|
4287
|
-
(t =
|
|
4287
|
+
(t = ne(this, te)) == null || t.$destroy();
|
|
4288
4288
|
}
|
|
4289
4289
|
}
|
|
4290
|
-
te = new WeakMap(),
|
|
4290
|
+
te = new WeakMap(), Ce = new WeakMap();
|
|
4291
4291
|
class $r extends Kr {
|
|
4292
4292
|
getMapLibreGl() {
|
|
4293
4293
|
return on;
|