@maptiler/geocoding-control 2.1.4 → 2.1.6

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.
Files changed (50) hide show
  1. package/MapLibreBasedGeocodingControl.d.ts +51 -34
  2. package/leaflet-controller.js +1 -1
  3. package/leaflet-controller.js.map +1 -1
  4. package/leaflet-controller.umd.js +1 -1
  5. package/leaflet-controller.umd.js.map +1 -1
  6. package/leaflet.js +161 -161
  7. package/leaflet.js.map +1 -1
  8. package/leaflet.umd.js +2 -2
  9. package/leaflet.umd.js.map +1 -1
  10. package/maplibregl-controller.js +29 -29
  11. package/maplibregl-controller.js.map +1 -1
  12. package/maplibregl-controller.umd.js +1 -1
  13. package/maplibregl-controller.umd.js.map +1 -1
  14. package/maplibregl.d.ts +51 -34
  15. package/maplibregl.js +1198 -1196
  16. package/maplibregl.js.map +1 -1
  17. package/maplibregl.umd.js +5 -5
  18. package/maplibregl.umd.js.map +1 -1
  19. package/maptilersdk.d.ts +51 -34
  20. package/maptilersdk.js +1199 -1197
  21. package/maptilersdk.js.map +1 -1
  22. package/maptilersdk.umd.js +5 -5
  23. package/maptilersdk.umd.js.map +1 -1
  24. package/openlayers-controller.js +35 -35
  25. package/openlayers-controller.js.map +1 -1
  26. package/openlayers-controller.umd.js +1 -1
  27. package/openlayers-controller.umd.js.map +1 -1
  28. package/openlayers.js +3 -3
  29. package/openlayers.js.map +1 -1
  30. package/openlayers.umd.js +1 -1
  31. package/openlayers.umd.js.map +1 -1
  32. package/package.json +11 -11
  33. package/react.js +2 -2
  34. package/react.js.map +1 -1
  35. package/react.umd.js +1 -1
  36. package/react.umd.js.map +1 -1
  37. package/svelte/GeocodingControl.svelte +4 -2
  38. package/svelte/GeocodingControl.svelte.d.ts +1 -1
  39. package/svelte/MapLibreBasedGeocodingControl.d.ts +51 -34
  40. package/svelte/MapLibreBasedGeocodingControl.js +4 -0
  41. package/svelte/info.json +1 -1
  42. package/svelte/leaflet-controller.js +1 -1
  43. package/svelte/maplibregl-controller.js +1 -1
  44. package/svelte/maplibregl.d.ts +51 -34
  45. package/svelte/maptilersdk.d.ts +51 -34
  46. package/svelte/openlayers-controller.js +1 -1
  47. package/vanilla.js +2 -2
  48. package/vanilla.js.map +1 -1
  49. package/vanilla.umd.js +1 -1
  50. package/vanilla.umd.js.map +1 -1
@@ -50,8 +50,8 @@ function st(i, t, e) {
50
50
  var F = 0, B = 0;
51
51
  if (a = P ? d.geometries[S] : d, a !== null) {
52
52
  E = a.coordinates;
53
- var Y = a.type;
54
- switch (T = 0, Y) {
53
+ var W = a.type;
54
+ switch (T = 0, W) {
55
55
  case null:
56
56
  break;
57
57
  case "Point":
@@ -76,9 +76,9 @@ function st(i, t, e) {
76
76
  B
77
77
  ) === !1)
78
78
  return !1;
79
- b++, Y === "MultiPoint" && F++;
79
+ b++, W === "MultiPoint" && F++;
80
80
  }
81
- Y === "LineString" && F++;
81
+ W === "LineString" && F++;
82
82
  break;
83
83
  case "Polygon":
84
84
  case "MultiLineString":
@@ -94,9 +94,9 @@ function st(i, t, e) {
94
94
  return !1;
95
95
  b++;
96
96
  }
97
- Y === "MultiLineString" && F++, Y === "Polygon" && B++;
97
+ W === "MultiLineString" && F++, W === "Polygon" && B++;
98
98
  }
99
- Y === "Polygon" && F++;
99
+ W === "Polygon" && F++;
100
100
  break;
101
101
  case "MultiPolygon":
102
102
  for (n = 0; n < E.length; n++) {
@@ -224,7 +224,7 @@ function vt(i, t = {}) {
224
224
  e[0] > n[0] && (e[0] = n[0]), e[1] > n[1] && (e[1] = n[1]), e[2] < n[0] && (e[2] = n[0]), e[3] < n[1] && (e[3] = n[1]);
225
225
  }), e;
226
226
  }
227
- var Ke = vt, bt = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, _e = Math.ceil, j = Math.floor, X = "[BigNumber Error] ", Xe = X + "Number primitive has more than 15 significant digits: ", ee = 1e14, C = 14, Ye = 9007199254740991, Oe = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], ue = 1e7, W = 1e9;
227
+ var Ke = vt, bt = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, _e = Math.ceil, j = Math.floor, X = "[BigNumber Error] ", Xe = X + "Number primitive has more than 15 significant digits: ", ee = 1e14, C = 14, We = 9007199254740991, Oe = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], ue = 1e7, Y = 1e9;
228
228
  function ot(i) {
229
229
  var t, e, n, r = S.prototype = { constructor: S, toString: null, valueOf: null }, f = new S(1), a = 20, c = 4, E = -7, d = 21, T = -1e7, b = 1e7, P = !1, N = 1, _ = 0, L = {
230
230
  prefix: "",
@@ -284,7 +284,7 @@ function ot(i) {
284
284
  for (w = 0; x.charCodeAt(w) === 48; w++) ;
285
285
  for (p = x.length; x.charCodeAt(--p) === 48; ) ;
286
286
  if (x = x.slice(w, ++p)) {
287
- if (p -= w, u && S.DEBUG && p > 15 && (s > Ye || s !== j(s)))
287
+ if (p -= w, u && S.DEBUG && p > 15 && (s > We || s !== j(s)))
288
288
  throw Error(Xe + y.s * s);
289
289
  if ((g = g - w - 1) > b)
290
290
  y.c = y.e = null;
@@ -307,10 +307,10 @@ function ot(i) {
307
307
  var o, l;
308
308
  if (s != null)
309
309
  if (typeof s == "object") {
310
- if (s.hasOwnProperty(o = "DECIMAL_PLACES") && (l = s[o], q(l, 0, W, o), a = l), s.hasOwnProperty(o = "ROUNDING_MODE") && (l = s[o], q(l, 0, 8, o), c = l), s.hasOwnProperty(o = "EXPONENTIAL_AT") && (l = s[o], l && l.pop ? (q(l[0], -1e9, 0, o), q(l[1], 0, W, o), E = l[0], d = l[1]) : (q(l, -1e9, W, o), E = -(d = l < 0 ? -l : l))), s.hasOwnProperty(o = "RANGE"))
310
+ if (s.hasOwnProperty(o = "DECIMAL_PLACES") && (l = s[o], q(l, 0, Y, o), a = l), s.hasOwnProperty(o = "ROUNDING_MODE") && (l = s[o], q(l, 0, 8, o), c = l), s.hasOwnProperty(o = "EXPONENTIAL_AT") && (l = s[o], l && l.pop ? (q(l[0], -1e9, 0, o), q(l[1], 0, Y, o), E = l[0], d = l[1]) : (q(l, -1e9, Y, o), E = -(d = l < 0 ? -l : l))), s.hasOwnProperty(o = "RANGE"))
311
311
  if (l = s[o], l && l.pop)
312
- q(l[0], -1e9, -1, o), q(l[1], 1, W, o), T = l[0], b = l[1];
313
- else if (q(l, -1e9, W, o), l)
312
+ q(l[0], -1e9, -1, o), q(l[1], 1, Y, o), T = l[0], b = l[1];
313
+ else if (q(l, -1e9, Y, o), l)
314
314
  T = -(b = l < 0 ? -l : l);
315
315
  else
316
316
  throw Error(X + o + " cannot be zero: " + l);
@@ -325,7 +325,7 @@ function ot(i) {
325
325
  P = l;
326
326
  else
327
327
  throw Error(X + o + " not true or false: " + l);
328
- if (s.hasOwnProperty(o = "MODULO_MODE") && (l = s[o], q(l, 0, 9, o), N = l), s.hasOwnProperty(o = "POW_PRECISION") && (l = s[o], q(l, 0, W, o), _ = l), s.hasOwnProperty(o = "FORMAT"))
328
+ if (s.hasOwnProperty(o = "MODULO_MODE") && (l = s[o], q(l, 0, 9, o), N = l), s.hasOwnProperty(o = "POW_PRECISION") && (l = s[o], q(l, 0, Y, o), _ = l), s.hasOwnProperty(o = "FORMAT"))
329
329
  if (l = s[o], typeof l == "object") L = l;
330
330
  else throw Error(X + o + " not an object: " + l);
331
331
  if (s.hasOwnProperty(o = "ALPHABET"))
@@ -351,7 +351,7 @@ function ot(i) {
351
351
  if (!S.DEBUG) return !0;
352
352
  var o, l, m = s.c, h = s.e, g = s.s;
353
353
  e: if ({}.toString.call(m) == "[object Array]") {
354
- if ((g === 1 || g === -1) && h >= -1e9 && h <= W && h === j(h)) {
354
+ if ((g === 1 || g === -1) && h >= -1e9 && h <= Y && h === j(h)) {
355
355
  if (m[0] === 0) {
356
356
  if (h === 0 && m.length === 1) return !0;
357
357
  break e;
@@ -377,7 +377,7 @@ function ot(i) {
377
377
  };
378
378
  return function(l) {
379
379
  var m, h, g, w, u, p = 0, x = [], y = new S(f);
380
- if (l == null ? l = a : q(l, 0, W), w = _e(l / C), P)
380
+ if (l == null ? l = a : q(l, 0, Y), w = _e(l / C), P)
381
381
  if (crypto.getRandomValues) {
382
382
  for (m = crypto.getRandomValues(new Uint32Array(w *= 2)); p < w; )
383
383
  u = m[p] * 131072 + (m[p + 1] >>> 11), u >= 9e15 ? (h = crypto.getRandomValues(new Uint32Array(2)), m[p] = h[0], m[p + 1] = h[1]) : (x.push(u % 1e14), p += 2);
@@ -517,7 +517,7 @@ function ot(i) {
517
517
  m = new S(s[h]), (!m.s || (l = fe(g, m)) === o || l === 0 && g.s === o) && (g = m);
518
518
  return g;
519
519
  }
520
- function Y(s, o, l) {
520
+ function W(s, o, l) {
521
521
  for (var m = 1, h = o.length; !o[--h]; o.pop()) ;
522
522
  for (h = o[0]; h >= 10; h /= 10, m++) ;
523
523
  return (l = m + l * C - 1) > b ? s.c = s.e = null : l < T ? s.c = [s.e = 0] : (s.e = l, s.c = o), s;
@@ -592,7 +592,7 @@ function ot(i) {
592
592
  }, r.decimalPlaces = r.dp = function(s, o) {
593
593
  var l, m, h, g = this;
594
594
  if (s != null)
595
- return q(s, 0, W), o == null ? o = c : q(o, 0, 8), Z(new S(g), s + g.e + 1, o);
595
+ return q(s, 0, Y), o == null ? o = c : q(o, 0, 8), Z(new S(g), s + g.e + 1, o);
596
596
  if (!(l = g.c)) return null;
597
597
  if (m = ((h = l.length - 1) - Q(this.e / C)) * C, h = l[h]) for (; h % 10 == 0; h /= 10, m--) ;
598
598
  return m < 0 && (m = 0), m;
@@ -688,7 +688,7 @@ function ot(i) {
688
688
  y[m] -= v[m];
689
689
  }
690
690
  for (; y[0] == 0; y.splice(0, 1), --x) ;
691
- return y[0] ? Y(s, y, x) : (s.s = c == 3 ? -1 : 1, s.c = [s.e = 0], s);
691
+ return y[0] ? W(s, y, x) : (s.s = c == 3 ? -1 : 1, s.c = [s.e = 0], s);
692
692
  }, r.modulo = r.mod = function(s, o) {
693
693
  var l, m, h = this;
694
694
  return s = new S(s, o), !h.c || !s.s || s.c && !s.c[0] ? new S(NaN) : !s.c || h.c && !h.c[0] ? new S(h) : (N == 9 ? (m = s.s, s.s = 1, l = t(h, s, 0, 3), s.s = m, l.s *= m) : l = t(h, s, 0, N), s = h.minus(l.times(s)), !s.c[0] && N == 1 && (s.s = h.s), s);
@@ -702,7 +702,7 @@ function ot(i) {
702
702
  x = G[--w] % U, y = G[w] / U | 0, u = O * x + y * R, x = R * x + u % U * U + k[g] + l, l = (x / D | 0) + (u / U | 0) + O * y, k[g--] = x % D;
703
703
  k[g] = l;
704
704
  }
705
- return l ? ++m : k.splice(0, 1), Y(s, k, m);
705
+ return l ? ++m : k.splice(0, 1), W(s, k, m);
706
706
  }, r.negated = function() {
707
707
  var s = new S(this);
708
708
  return s.s = -s.s || null, s;
@@ -722,11 +722,11 @@ function ot(i) {
722
722
  }
723
723
  for (h = u.length, o = p.length, h - o < 0 && (l = p, p = u, u = l, o = h), h = 0; o; )
724
724
  h = (u[--o] = u[o] + p[o] + h) / ee | 0, u[o] = ee === u[o] ? 0 : u[o] % ee;
725
- return h && (u = [h].concat(u), ++w), Y(s, u, w);
725
+ return h && (u = [h].concat(u), ++w), W(s, u, w);
726
726
  }, r.precision = r.sd = function(s, o) {
727
727
  var l, m, h, g = this;
728
728
  if (s != null && s !== !!s)
729
- return q(s, 1, W), o == null ? o = c : q(o, 0, 8), Z(new S(g), s, o);
729
+ return q(s, 1, Y), o == null ? o = c : q(o, 0, 8), Z(new S(g), s, o);
730
730
  if (!(l = g.c)) return null;
731
731
  if (h = l.length - 1, m = h * C + 1, h = l[h]) {
732
732
  for (; h % 10 == 0; h /= 10, m--) ;
@@ -734,7 +734,7 @@ function ot(i) {
734
734
  }
735
735
  return s && g.e + 1 > m && (m = g.e + 1), m;
736
736
  }, r.shiftedBy = function(s) {
737
- return q(s, -9007199254740991, Ye), this.times("1e" + s);
737
+ return q(s, -9007199254740991, We), this.times("1e" + s);
738
738
  }, r.squareRoot = r.sqrt = function() {
739
739
  var s, o, l, m, h, g = this, w = g.c, u = g.s, p = g.e, x = a + 4, y = new S("0.5");
740
740
  if (u !== 1 || !w || !w[0])
@@ -755,9 +755,9 @@ function ot(i) {
755
755
  }
756
756
  return Z(l, l.e + a + 1, c, s);
757
757
  }, r.toExponential = function(s, o) {
758
- return s != null && (q(s, 0, W), s++), F(this, s, o, 1);
758
+ return s != null && (q(s, 0, Y), s++), F(this, s, o, 1);
759
759
  }, r.toFixed = function(s, o) {
760
- return s != null && (q(s, 0, W), s = s + this.e + 1), F(this, s, o);
760
+ return s != null && (q(s, 0, Y), s = s + this.e + 1), F(this, s, o);
761
761
  }, r.toFormat = function(s, o, l) {
762
762
  var m, h = this;
763
763
  if (l == null)
@@ -789,7 +789,7 @@ function ot(i) {
789
789
  }, r.toNumber = function() {
790
790
  return +re(this);
791
791
  }, r.toPrecision = function(s, o) {
792
- return s != null && q(s, 1, W), F(this, s, o, 2);
792
+ return s != null && q(s, 1, Y), F(this, s, o, 2);
793
793
  }, r.toString = function(s) {
794
794
  var o, l = this, m = l.s, h = l.e;
795
795
  return h === null ? m ? (o = "Infinity", m < 0 && (o = "-" + o)) : o = "NaN" : (s == null ? o = h <= E || h >= d ? xe(J(l.c), h) : oe(J(l.c), h, "0") : s === 10 && V ? (l = Z(new S(l), a + h + 1, c), o = oe(J(l.c), l.e, "0")) : (q(s, 2, A.length, "Base"), o = e(oe(J(l.c), h, "0"), 10, s, m, !0)), m < 0 && l.c[0] && (o = "-" + o)), o;
@@ -1188,11 +1188,11 @@ var _t = (i) => i, Ot = (i) => {
1188
1188
  }, Nt = (i, t, e) => {
1189
1189
  const n = { x: t.x.minus(i.x), y: t.y.minus(i.y) }, r = { x: e.x.minus(i.x), y: e.y.minus(i.y) };
1190
1190
  return ft(r, n).div(be(r)).div(be(n));
1191
- }, We = (i, t, e) => t.y.isZero() ? null : { x: i.x.plus(t.x.div(t.y).times(e.minus(i.y))), y: e }, Ze = (i, t, e) => t.x.isZero() ? null : { x: e, y: i.y.plus(t.y.div(t.x).times(e.minus(i.x))) }, At = (i, t, e, n) => {
1191
+ }, Ye = (i, t, e) => t.y.isZero() ? null : { x: i.x.plus(t.x.div(t.y).times(e.minus(i.y))), y: e }, Ze = (i, t, e) => t.x.isZero() ? null : { x: e, y: i.y.plus(t.y.div(t.x).times(e.minus(i.x))) }, At = (i, t, e, n) => {
1192
1192
  if (t.x.isZero()) return Ze(e, n, i.x);
1193
1193
  if (n.x.isZero()) return Ze(i, t, e.x);
1194
- if (t.y.isZero()) return We(e, n, i.y);
1195
- if (n.y.isZero()) return We(i, t, e.y);
1194
+ if (t.y.isZero()) return Ye(e, n, i.y);
1195
+ if (n.y.isZero()) return Ye(i, t, e.y);
1196
1196
  const r = we(t, n);
1197
1197
  if (r.isZero()) return null;
1198
1198
  const f = { x: e.x.minus(i.x), y: e.y.minus(i.y) }, a = we(f, t).div(r), c = we(f, n).div(r), E = i.x.plus(c.times(t.x)), d = e.x.plus(a.times(n.x)), T = i.y.plus(c.times(t.y)), b = e.y.plus(a.times(n.y)), P = E.plus(d).div(2), N = T.plus(b).div(2);
@@ -1938,7 +1938,7 @@ function Xt(i, t = {}) {
1938
1938
  const n = Dt(e[0], ...e.slice(1));
1939
1939
  return n.length === 0 ? null : n.length === 1 ? Be(n[0], t.properties) : rt(n, t.properties);
1940
1940
  }
1941
- var Yt = Xt;
1941
+ var Wt = Xt;
1942
1942
  function Qe(i) {
1943
1943
  const t = [...i];
1944
1944
  return t[2] < t[0] && (Math.abs((t[0] + t[2] + 360) / 2) > Math.abs((t[0] - 360 + t[2]) / 2) ? t[0] -= 360 : t[2] += 360), t;
@@ -1976,13 +1976,13 @@ function et(i, t) {
1976
1976
  }
1977
1977
  t(
1978
1978
  Ce([
1979
- c.features.length < 2 ? i : Yt(c) ?? i,
1979
+ c.features.length < 2 ? i : Wt(c) ?? i,
1980
1980
  e
1981
1981
  ])
1982
1982
  );
1983
1983
  }
1984
1984
  const tt = "EPSG:4326";
1985
- function Wt(i) {
1985
+ function Yt(i) {
1986
1986
  var f;
1987
1987
  const t = i.getProperties(), { isMask: e } = t, n = (f = i.getGeometry()) == null ? void 0 : f.getType(), r = e ? 0 : n === "LineString" || n === "MultiLineString" ? 3 : 2;
1988
1988
  return new wt({
@@ -2013,7 +2013,7 @@ function Wt(i) {
2013
2013
  }) : void 0
2014
2014
  });
2015
2015
  }
2016
- function oi(i, t = {}, e = {}, n = Wt) {
2016
+ function oi(i, t = {}, e = {}, n = Yt) {
2017
2017
  let r = -1, f, a, c, E = !1;
2018
2018
  const d = new gt({
2019
2019
  updateWhileAnimating: !0
@@ -2083,11 +2083,11 @@ function oi(i, t = {}, e = {}, n = Wt) {
2083
2083
  var F;
2084
2084
  if (S)
2085
2085
  for (const B of S.features) {
2086
- const Y = B.geometry.type === "Polygon" ? new Fe(B.geometry.coordinates) : B.geometry.type === "MultiPolygon" ? new qe(B.geometry.coordinates) : null;
2087
- Y && T.addFeature(
2086
+ const W = B.geometry.type === "Polygon" ? new Fe(B.geometry.coordinates) : B.geometry.type === "MultiPolygon" ? new qe(B.geometry.coordinates) : null;
2087
+ W && T.addFeature(
2088
2088
  new se({
2089
2089
  isMask: !!((F = B.properties) != null && F.isMask),
2090
- geometry: P(Y)
2090
+ geometry: P(W)
2091
2091
  })
2092
2092
  );
2093
2093
  }
@@ -2136,7 +2136,7 @@ function oi(i, t = {}, e = {}, n = Wt) {
2136
2136
  break e;
2137
2137
  }
2138
2138
  }
2139
- if (!A && L.geometry.type !== "Point")
2139
+ if (!A && !L.geometry.type.endsWith("Point"))
2140
2140
  break e;
2141
2141
  T.addFeature(new se(P(new Re(L.center))));
2142
2142
  }