@maptiler/geocoding-control 0.0.100-rc.2 → 1.0.0-rc.1
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 +1 -1
- package/leaflet.js.map +1 -1
- package/leaflet.umd.js +1 -1
- package/leaflet.umd.js.map +1 -1
- package/maplibregl.js +1 -1
- package/maplibregl.js.map +1 -1
- package/maplibregl.umd.js +1 -1
- package/maplibregl.umd.js.map +1 -1
- package/maptilersdk.js +1 -1
- package/maptilersdk.js.map +1 -1
- package/maptilersdk.umd.js +1 -1
- package/maptilersdk.umd.js.map +1 -1
- package/openlayers.js +1 -1
- package/openlayers.js.map +1 -1
- package/openlayers.umd.js +1 -1
- package/openlayers.umd.js.map +1 -1
- package/package.json +1 -1
- package/react.js +94 -94
- package/react.js.map +1 -1
- package/react.umd.js +1 -1
- package/react.umd.js.map +1 -1
- package/svelte/GeocodingControl.svelte +4 -2
- package/svelte/types.d.ts +1 -1
- package/types.d.ts +1 -1
- package/vanilla.js +1 -1
- package/vanilla.js.map +1 -1
- package/vanilla.umd.js +1 -1
- package/vanilla.umd.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maptiler/geocoding-control",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "1.0.0-rc.1",
|
|
4
4
|
"description": "The Javascript & TypeScript Map Control component for MapTiler Geocoding service. Easy to be integrated into any JavaScript mapping application.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": {
|
package/react.js
CHANGED
|
@@ -181,7 +181,7 @@ function Lt() {
|
|
|
181
181
|
try {
|
|
182
182
|
for (; ve < ke.length; ) {
|
|
183
183
|
const e = ke[ve];
|
|
184
|
-
ve++, Le(e),
|
|
184
|
+
ve++, Le(e), gn(e.$$);
|
|
185
185
|
}
|
|
186
186
|
} catch (e) {
|
|
187
187
|
throw ke.length = 0, ve = 0, e;
|
|
@@ -198,14 +198,14 @@ function Lt() {
|
|
|
198
198
|
at.pop()();
|
|
199
199
|
Je = !1, Ke.clear(), Le(n);
|
|
200
200
|
}
|
|
201
|
-
function
|
|
201
|
+
function gn(n) {
|
|
202
202
|
if (n.fragment !== null) {
|
|
203
203
|
n.update(), re(n.before_update);
|
|
204
204
|
const e = n.dirty;
|
|
205
205
|
n.dirty = [-1], n.fragment && n.fragment.p(n.ctx, e), n.after_update.forEach(Xe);
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
|
-
function
|
|
208
|
+
function _n(n) {
|
|
209
209
|
const e = [], t = [];
|
|
210
210
|
pe.forEach((r) => n.indexOf(r) === -1 ? e.push(r) : t.push(r)), t.forEach((r) => r()), pe = e;
|
|
211
211
|
}
|
|
@@ -244,26 +244,26 @@ function yn(n, e) {
|
|
|
244
244
|
});
|
|
245
245
|
}
|
|
246
246
|
function bn(n, e, t, r, l, u, s, f, h, c, m, v) {
|
|
247
|
-
let
|
|
247
|
+
let _ = n.length, L = u.length, I = _;
|
|
248
248
|
const T = {};
|
|
249
249
|
for (; I--; )
|
|
250
250
|
T[n[I].key] = I;
|
|
251
251
|
const M = [], U = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Map(), N = [];
|
|
252
252
|
for (I = L; I--; ) {
|
|
253
253
|
const B = v(l, u, I), R = t(B);
|
|
254
|
-
let
|
|
255
|
-
|
|
254
|
+
let g = s.get(R);
|
|
255
|
+
g ? r && N.push(() => g.p(B, e)) : (g = c(R, B), g.c()), U.set(R, M[I] = g), R in T && y.set(R, Math.abs(I - T[R]));
|
|
256
256
|
}
|
|
257
257
|
const F = /* @__PURE__ */ new Set(), d = /* @__PURE__ */ new Set();
|
|
258
258
|
function b(B) {
|
|
259
259
|
Z(B, 1), B.m(f, m), s.set(B.key, B), m = B.first, L--;
|
|
260
260
|
}
|
|
261
|
-
for (;
|
|
262
|
-
const B = M[L - 1], R = n[
|
|
263
|
-
B === R ? (m = B.first,
|
|
261
|
+
for (; _ && L; ) {
|
|
262
|
+
const B = M[L - 1], R = n[_ - 1], g = B.key, w = R.key;
|
|
263
|
+
B === R ? (m = B.first, _--, L--) : U.has(w) ? !s.has(g) || F.has(g) ? b(B) : d.has(w) ? _-- : y.get(g) > y.get(w) ? (d.add(g), b(B)) : (F.add(w), _--) : (h(R, s), _--);
|
|
264
264
|
}
|
|
265
|
-
for (;
|
|
266
|
-
const B = n[
|
|
265
|
+
for (; _--; ) {
|
|
266
|
+
const B = n[_];
|
|
267
267
|
U.has(B.key) || h(B, s);
|
|
268
268
|
}
|
|
269
269
|
for (; L; )
|
|
@@ -282,12 +282,12 @@ function te(n, e, t) {
|
|
|
282
282
|
}
|
|
283
283
|
function ne(n, e) {
|
|
284
284
|
const t = n.$$;
|
|
285
|
-
t.fragment !== null && (
|
|
285
|
+
t.fragment !== null && (_n(t.after_update), re(t.on_destroy), t.fragment && t.fragment.d(e), t.on_destroy = t.fragment = null, t.ctx = []);
|
|
286
286
|
}
|
|
287
287
|
function wn(n, e) {
|
|
288
288
|
n.$$.dirty[0] === -1 && (ke.push(n), mn(), n.$$.dirty.fill(0)), n.$$.dirty[e / 31 | 0] |= 1 << e % 31;
|
|
289
289
|
}
|
|
290
|
-
function
|
|
290
|
+
function ge(n, e, t, r, l, u, s = null, f = [-1]) {
|
|
291
291
|
const h = Re;
|
|
292
292
|
Le(n);
|
|
293
293
|
const c = n.$$ = {
|
|
@@ -313,9 +313,9 @@ function _e(n, e, t, r, l, u, s = null, f = [-1]) {
|
|
|
313
313
|
};
|
|
314
314
|
s && s(c.root);
|
|
315
315
|
let m = !1;
|
|
316
|
-
if (c.ctx = t ? t(n, e.props || {}, (v,
|
|
317
|
-
const I = L.length ? L[0] :
|
|
318
|
-
return c.ctx && l(c.ctx[v], c.ctx[v] = I) && (!c.skip_bound && c.bound[v] && c.bound[v](I), m && wn(n, v)),
|
|
316
|
+
if (c.ctx = t ? t(n, e.props || {}, (v, _, ...L) => {
|
|
317
|
+
const I = L.length ? L[0] : _;
|
|
318
|
+
return c.ctx && l(c.ctx[v], c.ctx[v] = I) && (!c.skip_bound && c.bound[v] && c.bound[v](I), m && wn(n, v)), _;
|
|
319
319
|
}) : [], c.update(), m = !0, re(c.before_update), c.fragment = r ? r(c.ctx) : !1, e.target) {
|
|
320
320
|
if (e.hydrate) {
|
|
321
321
|
const v = fn(e.target);
|
|
@@ -326,7 +326,7 @@ function _e(n, e, t, r, l, u, s = null, f = [-1]) {
|
|
|
326
326
|
}
|
|
327
327
|
Le(h);
|
|
328
328
|
}
|
|
329
|
-
class
|
|
329
|
+
class _e {
|
|
330
330
|
constructor() {
|
|
331
331
|
/**
|
|
332
332
|
* ### PRIVATE API
|
|
@@ -391,9 +391,9 @@ function kn(n) {
|
|
|
391
391
|
}
|
|
392
392
|
};
|
|
393
393
|
}
|
|
394
|
-
class Bt extends
|
|
394
|
+
class Bt extends _e {
|
|
395
395
|
constructor(e) {
|
|
396
|
-
super(),
|
|
396
|
+
super(), ge(this, e, null, kn, me, {});
|
|
397
397
|
}
|
|
398
398
|
}
|
|
399
399
|
function pn(n) {
|
|
@@ -413,9 +413,9 @@ function pn(n) {
|
|
|
413
413
|
}
|
|
414
414
|
};
|
|
415
415
|
}
|
|
416
|
-
class Rt extends
|
|
416
|
+
class Rt extends _e {
|
|
417
417
|
constructor(e) {
|
|
418
|
-
super(),
|
|
418
|
+
super(), ge(this, e, null, pn, me, {});
|
|
419
419
|
}
|
|
420
420
|
}
|
|
421
421
|
function Tn(n) {
|
|
@@ -670,7 +670,7 @@ function In(n) {
|
|
|
670
670
|
let e, t, r, l, u, s, f, h, c = (
|
|
671
671
|
/*feature*/
|
|
672
672
|
n[0].place_name.replace(/,.*/, "") + ""
|
|
673
|
-
), m, v,
|
|
673
|
+
), m, v, _ = (
|
|
674
674
|
/*showPlaceType*/
|
|
675
675
|
n[2] === "always" || /*showPlaceType*/
|
|
676
676
|
n[2] && !/*feature*/
|
|
@@ -685,25 +685,25 @@ function In(n) {
|
|
|
685
685
|
/*feature*/
|
|
686
686
|
n[0].place_name.replace(/[^,]*,?\s*/, "") + ""
|
|
687
687
|
), M, U, y;
|
|
688
|
-
function N(
|
|
688
|
+
function N(g, w) {
|
|
689
689
|
var X, a;
|
|
690
690
|
return w & /*feature*/
|
|
691
691
|
1 && (t = null), w & /*feature*/
|
|
692
692
|
1 && (r = null), w & /*feature*/
|
|
693
693
|
1 && (l = null), /*imageUrl*/
|
|
694
|
-
|
|
694
|
+
g[5] ? En : (
|
|
695
695
|
/*feature*/
|
|
696
|
-
|
|
696
|
+
g[0].address ? Cn : (
|
|
697
697
|
/*feature*/
|
|
698
|
-
((X =
|
|
699
|
-
((a =
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
698
|
+
((X = g[0].properties) == null ? void 0 : X.kind) === "road" || /*feature*/
|
|
699
|
+
((a = g[0].properties) == null ? void 0 : a.kind) === "road_relation" ? Rn : (t == null && (t = !!/*feature*/
|
|
700
|
+
g[0].id.startsWith("address.")), t ? Bn : (r == null && (r = !!/*feature*/
|
|
701
|
+
g[0].id.startsWith("postal_code.")), r ? Ln : (l == null && (l = !!/*feature*/
|
|
702
|
+
g[0].id.startsWith("poi.")), l ? Mn : Tn)))
|
|
703
703
|
)
|
|
704
704
|
);
|
|
705
705
|
}
|
|
706
|
-
let F = N(n, -1), d = F(n), b =
|
|
706
|
+
let F = N(n, -1), d = F(n), b = _ && ht(n);
|
|
707
707
|
return {
|
|
708
708
|
c() {
|
|
709
709
|
e = E("li"), d.c(), u = J(), s = E("span"), f = E("span"), h = E("span"), m = ce(c), v = J(), b && b.c(), L = J(), I = E("span"), M = ce(T), o(h, "class", "primary svelte-ltkwvy"), o(f, "class", "svelte-ltkwvy"), o(I, "class", "line2 svelte-ltkwvy"), o(s, "class", "texts svelte-ltkwvy"), o(e, "tabindex", "0"), o(
|
|
@@ -718,8 +718,8 @@ function In(n) {
|
|
|
718
718
|
n[1]
|
|
719
719
|
);
|
|
720
720
|
},
|
|
721
|
-
m(
|
|
722
|
-
A(
|
|
721
|
+
m(g, w) {
|
|
722
|
+
A(g, e, w), d.m(e, null), k(e, u), k(e, s), k(s, f), k(f, h), k(h, m), k(f, v), b && b.m(f, null), k(s, L), k(s, I), k(I, M), U || (y = [
|
|
723
723
|
D(
|
|
724
724
|
e,
|
|
725
725
|
"mouseenter",
|
|
@@ -734,40 +734,40 @@ function In(n) {
|
|
|
734
734
|
)
|
|
735
735
|
], U = !0);
|
|
736
736
|
},
|
|
737
|
-
p(
|
|
737
|
+
p(g, [w]) {
|
|
738
738
|
var X, a;
|
|
739
|
-
F === (F = N(
|
|
739
|
+
F === (F = N(g, w)) && d ? d.p(g, w) : (d.d(1), d = F(g), d && (d.c(), d.m(e, u))), w & /*feature*/
|
|
740
740
|
1 && c !== (c = /*feature*/
|
|
741
|
-
|
|
742
|
-
37 && (
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
((X =
|
|
747
|
-
((a =
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
741
|
+
g[0].place_name.replace(/,.*/, "") + "") && Be(m, c), w & /*showPlaceType, feature, imageUrl*/
|
|
742
|
+
37 && (_ = /*showPlaceType*/
|
|
743
|
+
g[2] === "always" || /*showPlaceType*/
|
|
744
|
+
g[2] && !/*feature*/
|
|
745
|
+
g[0].address && /*feature*/
|
|
746
|
+
((X = g[0].properties) == null ? void 0 : X.kind) !== "road" && /*feature*/
|
|
747
|
+
((a = g[0].properties) == null ? void 0 : a.kind) !== "road_relation" && !/*feature*/
|
|
748
|
+
g[0].id.startsWith("address.") && !/*feature*/
|
|
749
|
+
g[0].id.startsWith("postal_code.") && (!/*feature*/
|
|
750
|
+
g[0].id.startsWith("poi.") || !/*imageUrl*/
|
|
751
|
+
g[5])), _ ? b ? b.p(g, w) : (b = ht(g), b.c(), b.m(f, null)) : b && (b.d(1), b = null), w & /*feature*/
|
|
752
752
|
1 && T !== (T = /*feature*/
|
|
753
|
-
|
|
753
|
+
g[0].place_name.replace(/[^,]*,?\s*/, "") + "") && Be(M, T), w & /*selected*/
|
|
754
754
|
2 && o(
|
|
755
755
|
e,
|
|
756
756
|
"data-selected",
|
|
757
757
|
/*selected*/
|
|
758
|
-
|
|
758
|
+
g[1]
|
|
759
759
|
), w & /*selected*/
|
|
760
760
|
2 && se(
|
|
761
761
|
e,
|
|
762
762
|
"selected",
|
|
763
763
|
/*selected*/
|
|
764
|
-
|
|
764
|
+
g[1]
|
|
765
765
|
);
|
|
766
766
|
},
|
|
767
767
|
i: S,
|
|
768
768
|
o: S,
|
|
769
|
-
d(
|
|
770
|
-
|
|
769
|
+
d(g) {
|
|
770
|
+
g && z(e), d.d(), b && b.d(), U = !1, re(y);
|
|
771
771
|
}
|
|
772
772
|
};
|
|
773
773
|
}
|
|
@@ -775,9 +775,9 @@ function Sn(n, e, t) {
|
|
|
775
775
|
var U;
|
|
776
776
|
let r, l, { feature: u } = e, { selected: s = !1 } = e, { showPlaceType: f } = e, { missingIconsCache: h } = e, { iconsBaseUrl: c } = e;
|
|
777
777
|
const m = (U = u.properties) == null ? void 0 : U.categories;
|
|
778
|
-
let v,
|
|
778
|
+
let v, _;
|
|
779
779
|
function L(y) {
|
|
780
|
-
|
|
780
|
+
_ && h.add(_), t(9, r--, r);
|
|
781
781
|
}
|
|
782
782
|
function I(y) {
|
|
783
783
|
ut.call(this, n, y);
|
|
@@ -793,8 +793,8 @@ function Sn(n, e, t) {
|
|
|
793
793
|
if (n.$$.dirty & /*index, category, iconsBaseUrl, imageUrl, missingIconsCache*/
|
|
794
794
|
824)
|
|
795
795
|
do
|
|
796
|
-
t(9, r--, r), t(4, v = m == null ? void 0 : m[r]), t(5,
|
|
797
|
-
while (r > -1 && (!
|
|
796
|
+
t(9, r--, r), t(4, v = m == null ? void 0 : m[r]), t(5, _ = v ? c + v.replace(/ /g, "_") + ".svg" : void 0);
|
|
797
|
+
while (r > -1 && (!_ || h.has(_)));
|
|
798
798
|
n.$$.dirty & /*feature*/
|
|
799
799
|
1 && t(6, l = u.id.startsWith("poi.") ? (N = (y = u.properties) == null ? void 0 : y.categories) == null ? void 0 : N.join(", ") : ((d = (F = u.properties) == null ? void 0 : F.place_type_name) == null ? void 0 : d[0]) ?? u.place_type[0]);
|
|
800
800
|
}, t(9, r = (m == null ? void 0 : m.length) ?? 0), [
|
|
@@ -803,7 +803,7 @@ function Sn(n, e, t) {
|
|
|
803
803
|
f,
|
|
804
804
|
c,
|
|
805
805
|
v,
|
|
806
|
-
|
|
806
|
+
_,
|
|
807
807
|
l,
|
|
808
808
|
L,
|
|
809
809
|
h,
|
|
@@ -813,9 +813,9 @@ function Sn(n, e, t) {
|
|
|
813
813
|
M
|
|
814
814
|
];
|
|
815
815
|
}
|
|
816
|
-
class zn extends
|
|
816
|
+
class zn extends _e {
|
|
817
817
|
constructor(e) {
|
|
818
|
-
super(),
|
|
818
|
+
super(), ge(this, e, Sn, In, me, {
|
|
819
819
|
feature: 0,
|
|
820
820
|
selected: 1,
|
|
821
821
|
showPlaceType: 2,
|
|
@@ -841,9 +841,9 @@ function Pn(n) {
|
|
|
841
841
|
}
|
|
842
842
|
};
|
|
843
843
|
}
|
|
844
|
-
class An extends
|
|
844
|
+
class An extends _e {
|
|
845
845
|
constructor(e) {
|
|
846
|
-
super(),
|
|
846
|
+
super(), ge(this, e, null, Pn, me, {});
|
|
847
847
|
}
|
|
848
848
|
}
|
|
849
849
|
function Un(n) {
|
|
@@ -863,9 +863,9 @@ function Un(n) {
|
|
|
863
863
|
}
|
|
864
864
|
};
|
|
865
865
|
}
|
|
866
|
-
class jn extends
|
|
866
|
+
class jn extends _e {
|
|
867
867
|
constructor(e) {
|
|
868
|
-
super(),
|
|
868
|
+
super(), ge(this, e, null, Un, me, {});
|
|
869
869
|
}
|
|
870
870
|
}
|
|
871
871
|
function Wn(n) {
|
|
@@ -885,16 +885,16 @@ function Wn(n) {
|
|
|
885
885
|
}
|
|
886
886
|
};
|
|
887
887
|
}
|
|
888
|
-
class Zn extends
|
|
888
|
+
class Zn extends _e {
|
|
889
889
|
constructor(e) {
|
|
890
|
-
super(),
|
|
890
|
+
super(), ge(this, e, null, Wn, me, {});
|
|
891
891
|
}
|
|
892
892
|
}
|
|
893
893
|
function mt(n, e, t) {
|
|
894
894
|
const r = n.slice();
|
|
895
895
|
return r[76] = e[t], r[78] = t, r;
|
|
896
896
|
}
|
|
897
|
-
function
|
|
897
|
+
function gt(n) {
|
|
898
898
|
let e, t;
|
|
899
899
|
return e = new An({}), {
|
|
900
900
|
c() {
|
|
@@ -914,7 +914,7 @@ function _t(n) {
|
|
|
914
914
|
}
|
|
915
915
|
};
|
|
916
916
|
}
|
|
917
|
-
function
|
|
917
|
+
function _t(n) {
|
|
918
918
|
let e, t, r, l, u;
|
|
919
919
|
return t = new jn({}), {
|
|
920
920
|
c() {
|
|
@@ -1089,30 +1089,30 @@ function Gn(n) {
|
|
|
1089
1089
|
n[6]
|
|
1090
1090
|
), s = J(), f = E("button"), fe(h.$$.fragment), o(l, "class", "svelte-1r7dvt7"), o(f, "class", "svelte-1r7dvt7"), o(e, "class", "error svelte-1r7dvt7");
|
|
1091
1091
|
},
|
|
1092
|
-
m(
|
|
1093
|
-
A(
|
|
1092
|
+
m(_, L) {
|
|
1093
|
+
A(_, e, L), te(t, e, null), k(e, r), k(e, l), k(l, u), k(e, s), k(e, f), te(h, f, null), c = !0, m || (v = D(
|
|
1094
1094
|
f,
|
|
1095
1095
|
"click",
|
|
1096
1096
|
/*click_handler_3*/
|
|
1097
1097
|
n[62]
|
|
1098
1098
|
), m = !0);
|
|
1099
1099
|
},
|
|
1100
|
-
p(
|
|
1100
|
+
p(_, L) {
|
|
1101
1101
|
(!c || L[0] & /*errorMessage*/
|
|
1102
1102
|
64) && Be(
|
|
1103
1103
|
u,
|
|
1104
1104
|
/*errorMessage*/
|
|
1105
|
-
|
|
1105
|
+
_[6]
|
|
1106
1106
|
);
|
|
1107
1107
|
},
|
|
1108
|
-
i(
|
|
1109
|
-
c || (Z(t.$$.fragment,
|
|
1108
|
+
i(_) {
|
|
1109
|
+
c || (Z(t.$$.fragment, _), Z(h.$$.fragment, _), c = !0);
|
|
1110
1110
|
},
|
|
1111
|
-
o(
|
|
1112
|
-
O(t.$$.fragment,
|
|
1111
|
+
o(_) {
|
|
1112
|
+
O(t.$$.fragment, _), O(h.$$.fragment, _), c = !1;
|
|
1113
1113
|
},
|
|
1114
|
-
d(
|
|
1115
|
-
|
|
1114
|
+
d(_) {
|
|
1115
|
+
_ && z(e), ne(t), ne(h), m = !1, v();
|
|
1116
1116
|
}
|
|
1117
1117
|
};
|
|
1118
1118
|
}
|
|
@@ -1195,14 +1195,14 @@ function yt(n, e) {
|
|
|
1195
1195
|
};
|
|
1196
1196
|
}
|
|
1197
1197
|
function Qn(n) {
|
|
1198
|
-
let e, t, r, l, u, s, f, h, c, m, v,
|
|
1198
|
+
let e, t, r, l, u, s, f, h, c, m, v, _, L, I, T, M, U, y, N, F;
|
|
1199
1199
|
l = new Zn({}), m = new Bt({});
|
|
1200
1200
|
let d = (
|
|
1201
1201
|
/*abortController*/
|
|
1202
|
-
n[18] &&
|
|
1202
|
+
n[18] && gt()
|
|
1203
1203
|
), b = (
|
|
1204
1204
|
/*enableReverse*/
|
|
1205
|
-
n[5] === !0 &&
|
|
1205
|
+
n[5] === !0 && _t(n)
|
|
1206
1206
|
);
|
|
1207
1207
|
const B = (
|
|
1208
1208
|
/*#slots*/
|
|
@@ -1213,7 +1213,7 @@ function Qn(n) {
|
|
|
1213
1213
|
/*$$scope*/
|
|
1214
1214
|
n[52],
|
|
1215
1215
|
null
|
|
1216
|
-
),
|
|
1216
|
+
), g = [Gn, On, Fn, Nn], w = [];
|
|
1217
1217
|
function X(a, P) {
|
|
1218
1218
|
var ee, ue;
|
|
1219
1219
|
return (
|
|
@@ -1231,9 +1231,9 @@ function Qn(n) {
|
|
|
1231
1231
|
)
|
|
1232
1232
|
);
|
|
1233
1233
|
}
|
|
1234
|
-
return ~(T = X(n)) && (M = w[T] =
|
|
1234
|
+
return ~(T = X(n)) && (M = w[T] = g[T](n)), {
|
|
1235
1235
|
c() {
|
|
1236
|
-
e = E("form"), t = E("div"), r = E("button"), fe(l.$$.fragment), u = J(), s = E("input"), f = J(), h = E("div"), c = E("button"), fe(m.$$.fragment), v = J(), d && d.c(),
|
|
1236
|
+
e = E("form"), t = E("div"), r = E("button"), fe(l.$$.fragment), u = J(), s = E("input"), f = J(), h = E("div"), c = E("button"), fe(m.$$.fragment), v = J(), d && d.c(), _ = J(), b && b.c(), L = J(), R && R.c(), I = J(), M && M.c(), o(r, "class", "search-button svelte-1r7dvt7"), o(r, "type", "button"), o(
|
|
1237
1237
|
s,
|
|
1238
1238
|
"placeholder",
|
|
1239
1239
|
/*placeholder*/
|
|
@@ -1269,7 +1269,7 @@ function Qn(n) {
|
|
|
1269
1269
|
s,
|
|
1270
1270
|
/*searchValue*/
|
|
1271
1271
|
n[1]
|
|
1272
|
-
), k(t, f), k(t, h), k(h, c), te(m, c, null), k(h, v), d && d.m(h, null), k(t,
|
|
1272
|
+
), k(t, f), k(t, h), k(h, c), te(m, c, null), k(h, v), d && d.m(h, null), k(t, _), b && b.m(t, null), k(t, L), R && R.m(t, null), k(e, I), ~T && w[T].m(e, null), y = !0, N || (F = [
|
|
1273
1273
|
D(
|
|
1274
1274
|
r,
|
|
1275
1275
|
"click",
|
|
@@ -1345,7 +1345,7 @@ function Qn(n) {
|
|
|
1345
1345
|
a[3]
|
|
1346
1346
|
), /*abortController*/
|
|
1347
1347
|
a[18] ? d ? P[0] & /*abortController*/
|
|
1348
|
-
262144 && Z(d, 1) : (d =
|
|
1348
|
+
262144 && Z(d, 1) : (d = gt(), d.c(), Z(d, 1), d.m(h, null)) : d && (Ae(), O(d, 1, 1, () => {
|
|
1349
1349
|
d = null;
|
|
1350
1350
|
}), Ue()), (!y || P[0] & /*searchValue*/
|
|
1351
1351
|
2) && se(
|
|
@@ -1355,7 +1355,7 @@ function Qn(n) {
|
|
|
1355
1355
|
a[1] !== ""
|
|
1356
1356
|
), /*enableReverse*/
|
|
1357
1357
|
a[5] === !0 ? b ? (b.p(a, P), P[0] & /*enableReverse*/
|
|
1358
|
-
32 && Z(b, 1)) : (b =
|
|
1358
|
+
32 && Z(b, 1)) : (b = _t(a), b.c(), Z(b, 1), b.m(t, L)) : b && (Ae(), O(b, 1, 1, () => {
|
|
1359
1359
|
b = null;
|
|
1360
1360
|
}), Ue()), R && R.p && (!y || P[1] & /*$$scope*/
|
|
1361
1361
|
2097152) && ln(
|
|
@@ -1379,7 +1379,7 @@ function Qn(n) {
|
|
|
1379
1379
|
let ee = T;
|
|
1380
1380
|
T = X(a), T === ee ? ~T && w[T].p(a, P) : (M && (Ae(), O(w[ee], 1, 1, () => {
|
|
1381
1381
|
w[ee] = null;
|
|
1382
|
-
}), Ue()), ~T ? (M = w[T], M ? M.p(a, P) : (M = w[T] =
|
|
1382
|
+
}), Ue()), ~T ? (M = w[T], M ? M.p(a, P) : (M = w[T] = g[T](a), M.c()), Z(M, 1), M.m(e, null)) : M = null), (!y || P[0] & /*className*/
|
|
1383
1383
|
4 && U !== (U = ct(
|
|
1384
1384
|
/*className*/
|
|
1385
1385
|
a[2]
|
|
@@ -1412,7 +1412,7 @@ function bt(n) {
|
|
|
1412
1412
|
return e[2] < e[0] && (e[2] += 360), e;
|
|
1413
1413
|
}
|
|
1414
1414
|
function qn(n, e, t) {
|
|
1415
|
-
let r, { $$slots: l = {}, $$scope: u } = e, { class: s = void 0 } = e, { apiKey: f } = e, { bbox: h = void 0 } = e, { clearButtonTitle: c = "clear" } = e, { clearOnBlur: m = !1 } = e, { collapsed: v = !1 } = e, { country:
|
|
1415
|
+
let r, { $$slots: l = {}, $$scope: u } = e, { class: s = void 0 } = e, { apiKey: f } = e, { bbox: h = void 0 } = e, { clearButtonTitle: c = "clear" } = e, { clearOnBlur: m = !1 } = e, { collapsed: v = !1 } = e, { country: _ = void 0 } = e, { debounceSearch: L = 200 } = e, { enableReverse: I = !1 } = e, { errorMessage: T = "Something went wrong…" } = e, { filter: M = () => !0 } = e, { flyTo: U = !0 } = e, { fuzzyMatch: y = !0 } = e, { language: N = void 0 } = e, { limit: F = void 0 } = e, { mapController: d = void 0 } = e, { minLength: b = 2 } = e, { noResultsMessage: B = "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: R = "Search" } = e, { proximity: g = [{ type: "server-geolocation" }] } = e, { reverseActive: w = I === "always" } = e, { reverseButtonTitle: X = "toggle reverse geocoding" } = e, { searchValue: a = "" } = e, { showFullGeometry: P = !0 } = e, { showPlaceType: ee = "ifNeeded" } = e, { showResultsWhileTyping: ue = !0 } = e, { types: ae = void 0 } = e, { zoom: Ce = 16 } = e, { maxZoom: Te = 18 } = e, { apiUrl: je = "https://api.maptiler.com/geocoding" } = e, { fetchParameters: We = {} } = e, { iconsBaseUrl: Ye = "https://cdn.maptiler.com/maptiler-geocoding-control/v1.0.0-rc.1/icons/" } = e;
|
|
1416
1416
|
const xe = (i) => {
|
|
1417
1417
|
};
|
|
1418
1418
|
function Ct() {
|
|
@@ -1450,10 +1450,10 @@ function qn(n, e, t) {
|
|
|
1450
1450
|
t(18, de = ie);
|
|
1451
1451
|
try {
|
|
1452
1452
|
const H = nt(), q = new URLSearchParams();
|
|
1453
|
-
if (N != null && q.set("language", Array.isArray(N) ? N.join(",") : N), ae && q.set("types", ae.join(",")), h && q.set("bbox", h.map((Qe) => Qe.toFixed(6)).join(",")),
|
|
1453
|
+
if (N != null && q.set("language", Array.isArray(N) ? N.join(",") : N), ae && q.set("types", ae.join(",")), h && q.set("bbox", h.map((Qe) => Qe.toFixed(6)).join(",")), _ && q.set("country", Array.isArray(_) ? _.join(",") : _), !W && !H) {
|
|
1454
1454
|
async function Qe() {
|
|
1455
1455
|
const we = d == null ? void 0 : d.getCenterAndZoom();
|
|
1456
|
-
for (const K of
|
|
1456
|
+
for (const K of g ?? [])
|
|
1457
1457
|
if (!(we && (K.minZoom != null && K.minZoom > we[0] || K.maxZoom != null && K.maxZoom < we[0]))) {
|
|
1458
1458
|
if (K.type === "fixed")
|
|
1459
1459
|
return K.coordinates.join(",");
|
|
@@ -1568,7 +1568,7 @@ function qn(n, e, t) {
|
|
|
1568
1568
|
}, Ot = () => t(0, w = !w), Gt = () => t(17, x = void 0), Qt = (i) => t(14, j = i), Dt = (i) => Oe(i), qt = () => t(14, j = -1), Vt = () => {
|
|
1569
1569
|
};
|
|
1570
1570
|
return n.$$set = (i) => {
|
|
1571
|
-
"class" in i && t(2, s = i.class), "apiKey" in i && t(24, f = i.apiKey), "bbox" in i && t(25, h = i.bbox), "clearButtonTitle" in i && t(3, c = i.clearButtonTitle), "clearOnBlur" in i && t(26, m = i.clearOnBlur), "collapsed" in i && t(4, v = i.collapsed), "country" in i && t(27,
|
|
1571
|
+
"class" in i && t(2, s = i.class), "apiKey" in i && t(24, f = i.apiKey), "bbox" in i && t(25, h = i.bbox), "clearButtonTitle" in i && t(3, c = i.clearButtonTitle), "clearOnBlur" in i && t(26, m = i.clearOnBlur), "collapsed" in i && t(4, v = i.collapsed), "country" in i && t(27, _ = i.country), "debounceSearch" in i && t(28, L = i.debounceSearch), "enableReverse" in i && t(5, I = i.enableReverse), "errorMessage" in i && t(6, T = i.errorMessage), "filter" in i && t(29, M = i.filter), "flyTo" in i && t(30, U = i.flyTo), "fuzzyMatch" in i && t(31, y = i.fuzzyMatch), "language" in i && t(32, N = i.language), "limit" in i && t(33, F = i.limit), "mapController" in i && t(34, d = i.mapController), "minLength" in i && t(35, b = i.minLength), "noResultsMessage" in i && t(7, B = i.noResultsMessage), "placeholder" in i && t(8, R = i.placeholder), "proximity" in i && t(36, g = i.proximity), "reverseActive" in i && t(0, w = i.reverseActive), "reverseButtonTitle" in i && t(9, X = i.reverseButtonTitle), "searchValue" in i && t(1, a = i.searchValue), "showFullGeometry" in i && t(37, P = i.showFullGeometry), "showPlaceType" in i && t(10, ee = i.showPlaceType), "showResultsWhileTyping" in i && t(38, ue = i.showResultsWhileTyping), "types" in i && t(39, ae = i.types), "zoom" in i && t(40, Ce = i.zoom), "maxZoom" in i && t(41, Te = i.maxZoom), "apiUrl" in i && t(42, je = i.apiUrl), "fetchParameters" in i && t(43, We = i.fetchParameters), "iconsBaseUrl" in i && t(11, Ye = i.iconsBaseUrl), "$$scope" in i && t(52, u = i.$$scope);
|
|
1572
1572
|
}, n.$$.update = () => {
|
|
1573
1573
|
if (n.$$.dirty[0] & /*focused, clearOnBlur*/
|
|
1574
1574
|
67112960 && setTimeout(() => {
|
|
@@ -1649,7 +1649,7 @@ function qn(n, e, t) {
|
|
|
1649
1649
|
f,
|
|
1650
1650
|
h,
|
|
1651
1651
|
m,
|
|
1652
|
-
|
|
1652
|
+
_,
|
|
1653
1653
|
L,
|
|
1654
1654
|
M,
|
|
1655
1655
|
U,
|
|
@@ -1658,7 +1658,7 @@ function qn(n, e, t) {
|
|
|
1658
1658
|
F,
|
|
1659
1659
|
d,
|
|
1660
1660
|
b,
|
|
1661
|
-
|
|
1661
|
+
g,
|
|
1662
1662
|
P,
|
|
1663
1663
|
ue,
|
|
1664
1664
|
ae,
|
|
@@ -1691,9 +1691,9 @@ function qn(n, e, t) {
|
|
|
1691
1691
|
Vt
|
|
1692
1692
|
];
|
|
1693
1693
|
}
|
|
1694
|
-
class Vn extends
|
|
1694
|
+
class Vn extends _e {
|
|
1695
1695
|
constructor(e) {
|
|
1696
|
-
super(),
|
|
1696
|
+
super(), ge(
|
|
1697
1697
|
this,
|
|
1698
1698
|
e,
|
|
1699
1699
|
qn,
|