@yappkit/front-module-map 0.1.0 → 0.1.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.
@@ -3,6 +3,6 @@ function l(e) {
3
3
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
4
4
  }
5
5
  export {
6
- o as c,
7
- l as g
6
+ o as commonjsGlobal,
7
+ l as getDefaultExportFromCjs
8
8
  };
package/lib/mapbox-gl.js CHANGED
@@ -1,4 +1,4 @@
1
- import { g as yA, c as xA } from "./_commonjsHelpers.js";
1
+ import { getDefaultExportFromCjs as yA, commonjsGlobal as xA } from "./_commonjsHelpers.js";
2
2
  function vA(Cs, oh) {
3
3
  for (var qr = 0; qr < oh.length; qr++) {
4
4
  const fr = oh[qr];
@@ -30196,5 +30196,8 @@ const bA = /* @__PURE__ */ yA(J1), TA = /* @__PURE__ */ vA({
30196
30196
  default: bA
30197
30197
  }, [J1]);
30198
30198
  export {
30199
- TA as m
30199
+ TA as mapboxGl
30200
+ };
30201
+ export {
30202
+ TA as default
30200
30203
  };
@@ -1,4 +1,4 @@
1
- import { c as T } from "../_commonjsHelpers.js";
1
+ import { commonjsGlobal as T } from "../_commonjsHelpers.js";
2
2
  var z = W, J = Object.prototype.hasOwnProperty;
3
3
  function W() {
4
4
  for (var r = {}, e = 0; e < arguments.length; e++) {
@@ -78,7 +78,7 @@ function ee(r) {
78
78
  function _(r, e) {
79
79
  return Object.prototype.hasOwnProperty.call(r, e);
80
80
  }
81
- var F = Y, M = { exports: {} };
81
+ var U = Y, F = { exports: {} };
82
82
  (function(r) {
83
83
  var e = Object.prototype.hasOwnProperty, t = "~";
84
84
  function n() {
@@ -188,19 +188,19 @@ var F = Y, M = { exports: {} };
188
188
  var f;
189
189
  return c ? (f = t ? t + c : c, this._events[f] && p(this, f)) : (this._events = new n(), this._eventsCount = 0), this;
190
190
  }, d.prototype.off = d.prototype.removeListener, d.prototype.addListener = d.prototype.on, d.prefixed = t, d.EventEmitter = d, r.exports = d;
191
- })(M);
192
- var re = M.exports;
191
+ })(F);
192
+ var re = F.exports;
193
193
  function te(r) {
194
194
  return r.map(encodeURIComponent).join(",");
195
195
  }
196
- function U(r) {
196
+ function M(r) {
197
197
  return Array.isArray(r) ? te(r) : encodeURIComponent(String(r));
198
198
  }
199
199
  function j(r, e, t) {
200
200
  if (t === !1 || t === null)
201
201
  return r;
202
202
  var n = /\?/.test(r) ? "&" : "?", a = encodeURIComponent(e);
203
- return t !== void 0 && t !== "" && t !== !0 && (a += "=" + U(t)), "" + r + n + a;
203
+ return t !== void 0 && t !== "" && t !== !0 && (a += "=" + M(t)), "" + r + n + a;
204
204
  }
205
205
  function ne(r, e) {
206
206
  if (!e)
@@ -224,7 +224,7 @@ function se(r, e) {
224
224
  var a = e[n];
225
225
  if (a === void 0)
226
226
  throw new Error("Unspecified route parameter " + n);
227
- var u = U(a);
227
+ var u = M(a);
228
228
  return "/" + u;
229
229
  }) : r;
230
230
  }
@@ -241,7 +241,7 @@ var oe = {
241
241
  EVENT_RESPONSE: "response",
242
242
  ERROR_HTTP: "HttpError",
243
243
  ERROR_REQUEST_ABORTED: "RequestAbortedError"
244
- }, ie = F, q = z, ue = re, O = oe, N = C, ce = 1;
244
+ }, ie = U, q = z, ue = re, O = oe, N = C, ce = 1;
245
245
  function m(r, e) {
246
246
  if (!r)
247
247
  throw new Error("MapiRequest requires a client");
@@ -311,7 +311,7 @@ m.prototype._extend = function(e) {
311
311
  var t = q(this._options, e);
312
312
  return new m(this.client, t);
313
313
  };
314
- var fe = m, le = F, pe = fe, he = C;
314
+ var fe = m, le = U, pe = fe, he = C;
315
315
  function V(r) {
316
316
  if (!r || !r.accessToken)
317
317
  throw new Error("Cannot create a client without an access token");
@@ -493,8 +493,8 @@ function qe(r) {
493
493
  }
494
494
  var Ne = qe;
495
495
  export {
496
- Ne as b,
497
- z as i,
498
- de as m,
499
- oe as u
496
+ Ne as browserClient,
497
+ z as immutable,
498
+ de as mapiClient,
499
+ oe as urlUtils
500
500
  };
@@ -1,5 +1,5 @@
1
- import { c as m } from "../_commonjsHelpers.js";
2
- import { i as h, m as V, b as N } from "./browser-client.js";
1
+ import { commonjsGlobal as m } from "../_commonjsHelpers.js";
2
+ import { immutable as h, mapiClient as V, browserClient as N } from "./browser-client.js";
3
3
  var R = Object.prototype.toString, _ = function(r) {
4
4
  var e;
5
5
  return R.call(r) === "[object Object]" && (e = Object.getPrototypeOf(r), e === null || e === Object.getPrototypeOf({}));
@@ -231,7 +231,7 @@ function J(r) {
231
231
  }
232
232
  var Y = J;
233
233
  export {
234
- Y as c,
235
- X as p,
236
- Q as v
234
+ Y as createServiceFactory_1,
235
+ X as pick_1,
236
+ Q as validator
237
237
  };
@@ -1,5 +1,5 @@
1
- import { g as p } from "../_commonjsHelpers.js";
2
- import { c as h, v as c, p as I } from "./create-service-factory.js";
1
+ import { getDefaultExportFromCjs as p } from "../_commonjsHelpers.js";
2
+ import { createServiceFactory_1 as h, validator as c, pick_1 as I } from "./create-service-factory.js";
3
3
  function m(t, n) {
4
4
  for (var i = 0; i < n.length; i++) {
5
5
  const s = n[i];
@@ -119,5 +119,5 @@ const l = /* @__PURE__ */ p(o), y = /* @__PURE__ */ m({
119
119
  default: l
120
120
  }, [o]);
121
121
  export {
122
- y as d
122
+ y as datasets
123
123
  };
@@ -1,7 +1,7 @@
1
- import { g as c } from "../_commonjsHelpers.js";
2
- import { c as u, v } from "./create-service-factory.js";
3
- import { o as g } from "./object-clean.js";
4
- import { s as m } from "./stringify-booleans.js";
1
+ import { getDefaultExportFromCjs as c } from "../_commonjsHelpers.js";
2
+ import { createServiceFactory_1 as u, validator as v } from "./create-service-factory.js";
3
+ import { objectClean_1 as g } from "./object-clean.js";
4
+ import { stringifyBooleans as m } from "./stringify-booleans.js";
5
5
  function d(r, a) {
6
6
  for (var o = 0; o < a.length; o++) {
7
7
  const i = a[o];
@@ -151,5 +151,5 @@ const b = /* @__PURE__ */ c(_), O = /* @__PURE__ */ d({
151
151
  default: b
152
152
  }, [_]);
153
153
  export {
154
- O as d
154
+ O as directions
155
155
  };
@@ -1,15 +1,15 @@
1
- import { g as m } from "../_commonjsHelpers.js";
2
- import { i as p } from "./browser-client.js";
3
- import { c as y, v as b, p as v } from "./create-service-factory.js";
4
- import { s as f } from "./stringify-booleans.js";
1
+ import { getDefaultExportFromCjs as m } from "../_commonjsHelpers.js";
2
+ import { immutable as p } from "./browser-client.js";
3
+ import { createServiceFactory_1 as y, validator as b, pick_1 as f } from "./create-service-factory.js";
4
+ import { stringifyBooleans as v } from "./stringify-booleans.js";
5
5
  function h(r, t) {
6
6
  for (var n = 0; n < t.length; n++) {
7
7
  const o = t[n];
8
8
  if (typeof o != "string" && !Array.isArray(o)) {
9
9
  for (const a in o)
10
10
  if (a !== "default" && !(a in r)) {
11
- const s = Object.getOwnPropertyDescriptor(o, a);
12
- s && Object.defineProperty(r, a, s.get ? s : {
11
+ const i = Object.getOwnPropertyDescriptor(o, a);
12
+ i && Object.defineProperty(r, a, i.get ? i : {
13
13
  enumerable: !0,
14
14
  get: () => o[a]
15
15
  });
@@ -18,7 +18,7 @@ function h(r, t) {
18
18
  }
19
19
  return Object.freeze(Object.defineProperty(r, Symbol.toStringTag, { value: "Module" }));
20
20
  }
21
- var i = p, e = b, d = v, l = f, O = y, u = {}, c = [
21
+ var s = p, e = b, d = f, l = v, O = y, u = {}, c = [
22
22
  "street",
23
23
  "country",
24
24
  "region",
@@ -31,7 +31,7 @@ var i = p, e = b, d = v, l = f, O = y, u = {}, c = [
31
31
  ];
32
32
  u.forwardGeocode = function(r) {
33
33
  r.mode = r.mode || "standard", e.assertShape(
34
- i(r.mode === "standard" ? { query: e.required(e.string) } : {}, {
34
+ s(r.mode === "standard" ? { query: e.required(e.string) } : {}, {
35
35
  mode: e.oneOf("standard", "structured"),
36
36
  countries: r.mode === "standard" ? e.arrayOf(e.string) : e.string,
37
37
  proximity: e.oneOf(e.coordinates, "ip"),
@@ -56,7 +56,7 @@ u.forwardGeocode = function(r) {
56
56
  })
57
57
  )(r);
58
58
  var t = l(
59
- i(
59
+ s(
60
60
  r.mode === "standard" ? { q: r.query } : d(r, [
61
61
  "address_line1",
62
62
  "address_number",
@@ -100,7 +100,7 @@ u.reverseGeocode = function(r) {
100
100
  permanent: e.boolean
101
101
  })(r);
102
102
  var t = l(
103
- i(
103
+ s(
104
104
  { country: r.countries },
105
105
  d(r, [
106
106
  "longitude",
@@ -125,5 +125,5 @@ const q = /* @__PURE__ */ m(g), S = /* @__PURE__ */ h({
125
125
  default: q
126
126
  }, [g]);
127
127
  export {
128
- S as g
128
+ S as geocodingV6
129
129
  };
@@ -1,7 +1,7 @@
1
- import { g as l } from "../_commonjsHelpers.js";
2
- import { i as y } from "./browser-client.js";
3
- import { c as g, v as b, p as f } from "./create-service-factory.js";
4
- import { s as v } from "./stringify-booleans.js";
1
+ import { getDefaultExportFromCjs as l } from "../_commonjsHelpers.js";
2
+ import { immutable as y } from "./browser-client.js";
3
+ import { createServiceFactory_1 as g, validator as b, pick_1 as f } from "./create-service-factory.js";
4
+ import { stringifyBooleans as v } from "./stringify-booleans.js";
5
5
  function O(r, o) {
6
6
  for (var i = 0; i < o.length; i++) {
7
7
  const t = o[i];
@@ -18,7 +18,7 @@ function O(r, o) {
18
18
  }
19
19
  return Object.freeze(Object.defineProperty(r, Symbol.toStringTag, { value: "Module" }));
20
20
  }
21
- var c = y, e = b, n = f, p = v, x = g, u = {}, m = [
21
+ var c = y, e = b, n = f, m = v, x = g, u = {}, p = [
22
22
  "country",
23
23
  "region",
24
24
  "postcode",
@@ -36,7 +36,7 @@ u.forwardGeocode = function(r) {
36
36
  mode: e.oneOf("mapbox.places", "mapbox.places-permanent"),
37
37
  countries: e.arrayOf(e.string),
38
38
  proximity: e.oneOf(e.coordinates, "ip"),
39
- types: e.arrayOf(e.oneOf(m)),
39
+ types: e.arrayOf(e.oneOf(p)),
40
40
  autocomplete: e.boolean,
41
41
  bbox: e.arrayOf(e.number),
42
42
  limit: e.number,
@@ -45,7 +45,7 @@ u.forwardGeocode = function(r) {
45
45
  fuzzyMatch: e.boolean,
46
46
  worldview: e.string
47
47
  })(r), r.mode = r.mode || "mapbox.places";
48
- var o = p(
48
+ var o = m(
49
49
  c(
50
50
  { country: r.countries },
51
51
  n(r, [
@@ -73,7 +73,7 @@ u.reverseGeocode = function(r) {
73
73
  query: e.required(e.coordinates),
74
74
  mode: e.oneOf("mapbox.places", "mapbox.places-permanent"),
75
75
  countries: e.arrayOf(e.string),
76
- types: e.arrayOf(e.oneOf(m)),
76
+ types: e.arrayOf(e.oneOf(p)),
77
77
  bbox: e.arrayOf(e.number),
78
78
  limit: e.number,
79
79
  language: e.arrayOf(e.string),
@@ -81,7 +81,7 @@ u.reverseGeocode = function(r) {
81
81
  routing: e.boolean,
82
82
  worldview: e.string
83
83
  })(r), r.mode = r.mode || "mapbox.places";
84
- var o = p(
84
+ var o = m(
85
85
  c(
86
86
  { country: r.countries },
87
87
  n(r, [
@@ -109,5 +109,5 @@ const q = /* @__PURE__ */ l(d), S = /* @__PURE__ */ O({
109
109
  default: q
110
110
  }, [d]);
111
111
  export {
112
- S as g
112
+ S as geocoding
113
113
  };
@@ -1,7 +1,7 @@
1
- import { g as m } from "../_commonjsHelpers.js";
2
- import { c as d, v as c } from "./create-service-factory.js";
3
- import { o as p } from "./object-clean.js";
4
- import { s as v } from "./stringify-booleans.js";
1
+ import { getDefaultExportFromCjs as m } from "../_commonjsHelpers.js";
2
+ import { createServiceFactory_1 as d, validator as c } from "./create-service-factory.js";
3
+ import { objectClean_1 as p } from "./object-clean.js";
4
+ import { stringifyBooleans as v } from "./stringify-booleans.js";
5
5
  function h(e, a) {
6
6
  for (var s = 0; s < a.length; s++) {
7
7
  const t = a[s];
@@ -18,7 +18,7 @@ function h(e, a) {
18
18
  }
19
19
  return Object.freeze(Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }));
20
20
  }
21
- var r = c, b = p, y = v, f = d, u = {};
21
+ var r = c, y = p, b = v, f = d, u = {};
22
22
  u.getContours = function(e) {
23
23
  if (r.assertShape({
24
24
  profile: r.oneOf("driving", "driving-traffic", "walking", "cycling"),
@@ -54,7 +54,7 @@ u.getContours = function(e) {
54
54
  e.colors && (e.colors = e.colors.map(function(n) {
55
55
  return n[0] === "#" ? n.substring(1) : n;
56
56
  }));
57
- var i = y({
57
+ var i = b({
58
58
  contours_minutes: e.minutes ? e.minutes.join(",") : null,
59
59
  contours_meters: e.meters ? e.meters.join(",") : null,
60
60
  contours_colors: e.colors ? e.colors.join(",") : null,
@@ -69,7 +69,7 @@ u.getContours = function(e) {
69
69
  profile: e.profile,
70
70
  coordinates: e.coordinates.join(",")
71
71
  },
72
- query: b(i)
72
+ query: y(i)
73
73
  });
74
74
  };
75
75
  var l = f(u);
@@ -78,5 +78,5 @@ const w = /* @__PURE__ */ m(l), z = /* @__PURE__ */ h({
78
78
  default: w
79
79
  }, [l]);
80
80
  export {
81
- z as i
81
+ z as isochrone
82
82
  };
@@ -1,8 +1,8 @@
1
- import { g as u } from "../_commonjsHelpers.js";
2
- import { c as l, v as c } from "./create-service-factory.js";
3
- import { o as m } from "./object-clean.js";
4
- import { u as y } from "./browser-client.js";
5
- import { s as d } from "./stringify-booleans.js";
1
+ import { getDefaultExportFromCjs as l } from "../_commonjsHelpers.js";
2
+ import { createServiceFactory_1 as u, validator as c } from "./create-service-factory.js";
3
+ import { objectClean_1 as m } from "./object-clean.js";
4
+ import { urlUtils as y } from "./browser-client.js";
5
+ import { stringifyBooleans as d } from "./stringify-booleans.js";
6
6
  function f(i, o) {
7
7
  for (var t = 0; t < o.length; t++) {
8
8
  const n = o[t];
@@ -19,7 +19,7 @@ function f(i, o) {
19
19
  }
20
20
  return Object.freeze(Object.defineProperty(i, Symbol.toStringTag, { value: "Module" }));
21
21
  }
22
- var a = c, h = l, g = m, v = y, w = d, s = {};
22
+ var a = c, h = u, g = m, v = y, w = d, s = {};
23
23
  s.getMatch = function(i) {
24
24
  a.assertShape({
25
25
  points: a.required(
@@ -101,10 +101,10 @@ s.getMatch = function(i) {
101
101
  });
102
102
  };
103
103
  var p = h(s);
104
- const O = /* @__PURE__ */ u(p), N = /* @__PURE__ */ f({
104
+ const O = /* @__PURE__ */ l(p), N = /* @__PURE__ */ f({
105
105
  __proto__: null,
106
106
  default: O
107
107
  }, [p]);
108
108
  export {
109
- N as m
109
+ N as mapMatching
110
110
  };
@@ -1,6 +1,6 @@
1
- import { g as c } from "../_commonjsHelpers.js";
2
- import { c as u, v as l } from "./create-service-factory.js";
3
- import { o as d } from "./object-clean.js";
1
+ import { getDefaultExportFromCjs as c } from "../_commonjsHelpers.js";
2
+ import { createServiceFactory_1 as u, validator as l } from "./create-service-factory.js";
3
+ import { objectClean_1 as d } from "./object-clean.js";
4
4
  function f(r, n) {
5
5
  for (var a = 0; a < n.length; a++) {
6
6
  const o = n[a];
@@ -68,5 +68,5 @@ const m = /* @__PURE__ */ c(p), b = /* @__PURE__ */ f({
68
68
  default: m
69
69
  }, [p]);
70
70
  export {
71
- b as m
71
+ b as matrix
72
72
  };
@@ -1,11 +1,11 @@
1
- import { p as o } from "./create-service-factory.js";
2
- var t = o;
3
- function e(n) {
4
- return t(n, function(a, r) {
1
+ import { pick_1 as t } from "./create-service-factory.js";
2
+ var e = t;
3
+ function o(n) {
4
+ return e(n, function(c, r) {
5
5
  return r != null;
6
6
  });
7
7
  }
8
- var i = e;
8
+ var u = o;
9
9
  export {
10
- i as o
10
+ u as objectClean_1
11
11
  };
@@ -1,24 +1,24 @@
1
- import { g as d } from "../_commonjsHelpers.js";
2
- import { c, v as f } from "./create-service-factory.js";
3
- import { o as l } from "./object-clean.js";
4
- import { s as p } from "./stringify-booleans.js";
1
+ import { getDefaultExportFromCjs as d } from "../_commonjsHelpers.js";
2
+ import { createServiceFactory_1 as f, validator as c } from "./create-service-factory.js";
3
+ import { objectClean_1 as l } from "./object-clean.js";
4
+ import { stringifyBooleans as p } from "./stringify-booleans.js";
5
5
  function m(i, t) {
6
6
  for (var n = 0; n < t.length; n++) {
7
- const o = t[n];
8
- if (typeof o != "string" && !Array.isArray(o)) {
9
- for (const r in o)
7
+ const a = t[n];
8
+ if (typeof a != "string" && !Array.isArray(a)) {
9
+ for (const r in a)
10
10
  if (r !== "default" && !(r in i)) {
11
- const a = Object.getOwnPropertyDescriptor(o, r);
12
- a && Object.defineProperty(i, r, a.get ? a : {
11
+ const o = Object.getOwnPropertyDescriptor(a, r);
12
+ o && Object.defineProperty(i, r, o.get ? o : {
13
13
  enumerable: !0,
14
- get: () => o[r]
14
+ get: () => a[r]
15
15
  });
16
16
  }
17
17
  }
18
18
  }
19
19
  return Object.freeze(Object.defineProperty(i, Symbol.toStringTag, { value: "Module" }));
20
20
  }
21
- var e = f, b = c, h = l, v = p, s = {};
21
+ var e = c, b = f, h = l, g = p, s = {};
22
22
  s.getOptimization = function(i) {
23
23
  e.assertShape({
24
24
  profile: e.oneOf("driving", "driving-traffic", "walking", "cycling"),
@@ -61,19 +61,19 @@ s.getOptimization = function(i) {
61
61
  i.waypoints.forEach(function(r) {
62
62
  t.coordinates.push(
63
63
  r.coordinates[0] + "," + r.coordinates[1]
64
- ), ["bearing"].forEach(function(a) {
65
- r.hasOwnProperty(a) && r[a] != null && (r[a] = r[a].join(","));
66
- }), ["approach", "bearing", "radius"].forEach(function(a) {
67
- r.hasOwnProperty(a) && r[a] != null ? t[a].push(r[a]) : t[a].push("");
64
+ ), ["bearing"].forEach(function(o) {
65
+ r.hasOwnProperty(o) && r[o] != null && (r[o] = r[o].join(","));
66
+ }), ["approach", "bearing", "radius"].forEach(function(o) {
67
+ r.hasOwnProperty(o) && r[o] != null ? t[o].push(r[o]) : t[o].push("");
68
68
  });
69
69
  }), i.distributions && i.distributions.forEach(function(r) {
70
70
  t.distributions.push(r.pickup + "," + r.dropoff);
71
71
  }), ["approach", "bearing", "radius", "distributions"].forEach(function(r) {
72
- t[r].every(function(a) {
73
- return a === "";
72
+ t[r].every(function(o) {
73
+ return o === "";
74
74
  }) ? delete t[r] : t[r] = t[r].join(";");
75
75
  });
76
- var o = v({
76
+ var a = g({
77
77
  geometries: i.geometries,
78
78
  language: i.language,
79
79
  overview: i.overview,
@@ -93,14 +93,14 @@ s.getOptimization = function(i) {
93
93
  profile: i.profile || "driving",
94
94
  coordinates: t.coordinates.join(";")
95
95
  },
96
- query: h(o)
96
+ query: h(a)
97
97
  });
98
98
  };
99
99
  var u = b(s);
100
- const g = /* @__PURE__ */ d(u), E = /* @__PURE__ */ m({
100
+ const v = /* @__PURE__ */ d(u), E = /* @__PURE__ */ m({
101
101
  __proto__: null,
102
- default: g
102
+ default: v
103
103
  }, [u]);
104
104
  export {
105
- E as o
105
+ E as optimization
106
106
  };
@@ -1,5 +1,5 @@
1
- import { g as C } from "../_commonjsHelpers.js";
2
- import { c as S, v as x, p as _ } from "./create-service-factory.js";
1
+ import { getDefaultExportFromCjs as C } from "../_commonjsHelpers.js";
2
+ import { createServiceFactory_1 as S, validator as x, pick_1 as _ } from "./create-service-factory.js";
3
3
  function k(e, n) {
4
4
  for (var s = 0; s < n.length; s++) {
5
5
  const d = n[s];
@@ -193,5 +193,5 @@ const R = /* @__PURE__ */ C(w), L = /* @__PURE__ */ k({
193
193
  default: R
194
194
  }, [w]);
195
195
  export {
196
- L as _
196
+ L as _static
197
197
  };
@@ -4,12 +4,12 @@ function e(t, o) {
4
4
  }, {});
5
5
  }
6
6
  var i = e, c = i;
7
- function a(t) {
7
+ function f(t) {
8
8
  return c(t, function(o, n) {
9
9
  return typeof n == "boolean" ? JSON.stringify(n) : n;
10
10
  });
11
11
  }
12
- var f = a;
12
+ var a = f;
13
13
  export {
14
- f as s
14
+ a as stringifyBooleans
15
15
  };
@@ -1,14 +1,14 @@
1
- import { g as y } from "../_commonjsHelpers.js";
2
- import { i as p } from "./browser-client.js";
3
- import { c as m, v as h, p as I } from "./create-service-factory.js";
1
+ import { getDefaultExportFromCjs as y } from "../_commonjsHelpers.js";
2
+ import { immutable as p } from "./browser-client.js";
3
+ import { createServiceFactory_1 as m, validator as h, pick_1 as I } from "./create-service-factory.js";
4
4
  function f(t, r) {
5
5
  for (var a = 0; a < r.length; a++) {
6
6
  const d = r[a];
7
7
  if (typeof d != "string" && !Array.isArray(d)) {
8
8
  for (const o in d)
9
9
  if (o !== "default" && !(o in t)) {
10
- const i = Object.getOwnPropertyDescriptor(d, o);
11
- i && Object.defineProperty(t, o, i.get ? i : {
10
+ const l = Object.getOwnPropertyDescriptor(d, o);
11
+ l && Object.defineProperty(t, o, l.get ? l : {
12
12
  enumerable: !0,
13
13
  get: () => d[o]
14
14
  });
@@ -17,7 +17,7 @@ function f(t, r) {
17
17
  }
18
18
  return Object.freeze(Object.defineProperty(t, Symbol.toStringTag, { value: "Module" }));
19
19
  }
20
- var l = p, e = h, n = I, b = m, s = {};
20
+ var i = p, e = h, n = I, b = m, s = {};
21
21
  s.getStyle = function(t) {
22
22
  e.assertShape({
23
23
  styleId: e.required(e.string),
@@ -123,7 +123,7 @@ s.getStyleSprite = function(t) {
123
123
  })(t);
124
124
  var r = t.format || "json", a = "/sprite" + (t.highRes ? "@2x" : "") + "." + r, d = {};
125
125
  return t.fresh && (d.fresh = "true"), this.client.createRequest(
126
- l(
126
+ i(
127
127
  {
128
128
  method: "GET",
129
129
  path: "/styles/v1/:ownerId/:styleId" + (t.draft ? "/draft" : "") + a,
@@ -145,7 +145,7 @@ s.getFontGlyphRange = function(t) {
145
145
  return this.client.createRequest({
146
146
  method: "GET",
147
147
  path: "/fonts/v1/:ownerId/:fontList/:fileName",
148
- params: l(n(t, ["ownerId"]), {
148
+ params: i(n(t, ["ownerId"]), {
149
149
  fontList: [].concat(t.fonts),
150
150
  fileName: r
151
151
  }),
@@ -172,10 +172,10 @@ s.getEmbeddableHtml = function(t) {
172
172
  });
173
173
  };
174
174
  var u = b(s);
175
- const c = /* @__PURE__ */ y(u), q = /* @__PURE__ */ f({
175
+ const c = /* @__PURE__ */ y(u), v = /* @__PURE__ */ f({
176
176
  __proto__: null,
177
177
  default: c
178
178
  }, [u]);
179
179
  export {
180
- q as s
180
+ v as styles
181
181
  };
@@ -1,5 +1,5 @@
1
- import { g as c } from "../_commonjsHelpers.js";
2
- import { c as d, v as l, p } from "./create-service-factory.js";
1
+ import { getDefaultExportFromCjs as l } from "../_commonjsHelpers.js";
2
+ import { createServiceFactory_1 as c, validator as d, pick_1 as p } from "./create-service-factory.js";
3
3
  function y(r, s) {
4
4
  for (var o = 0; o < s.length; o++) {
5
5
  const t = s[o];
@@ -16,7 +16,7 @@ function y(r, s) {
16
16
  }
17
17
  return Object.freeze(Object.defineProperty(r, Symbol.toStringTag, { value: "Module" }));
18
18
  }
19
- var e = l, m = p, f = d, n = {};
19
+ var e = d, m = p, f = c, n = {};
20
20
  n.listFeatures = function(r) {
21
21
  return e.assertShape({
22
22
  mapIds: e.required(e.arrayOf(e.string)),
@@ -37,10 +37,10 @@ n.listFeatures = function(r) {
37
37
  });
38
38
  };
39
39
  var u = f(n);
40
- const g = /* @__PURE__ */ c(u), b = /* @__PURE__ */ y({
40
+ const g = /* @__PURE__ */ l(u), b = /* @__PURE__ */ y({
41
41
  __proto__: null,
42
42
  default: g
43
43
  }, [u]);
44
44
  export {
45
- b as t
45
+ b as tilequery
46
46
  };
@@ -1,5 +1,5 @@
1
- import { g as p } from "../_commonjsHelpers.js";
2
- import { c as o, v as c, p as h } from "./create-service-factory.js";
1
+ import { getDefaultExportFromCjs as p } from "../_commonjsHelpers.js";
2
+ import { createServiceFactory_1 as o, validator as c, pick_1 as h } from "./create-service-factory.js";
3
3
  function m(t, l) {
4
4
  for (var n = 0; n < l.length; n++) {
5
5
  const i = l[n];
@@ -210,5 +210,5 @@ const q = /* @__PURE__ */ p(u), T = /* @__PURE__ */ m({
210
210
  default: q
211
211
  }, [u]);
212
212
  export {
213
- T as t
213
+ T as tilesets
214
214
  };
@@ -1,5 +1,5 @@
1
- import { g as i } from "../_commonjsHelpers.js";
2
- import { c as u, v as c, p as w } from "./create-service-factory.js";
1
+ import { getDefaultExportFromCjs as i } from "../_commonjsHelpers.js";
2
+ import { createServiceFactory_1 as u, validator as c, pick_1 as w } from "./create-service-factory.js";
3
3
  function h(e, t) {
4
4
  for (var l = 0; l < t.length; l++) {
5
5
  const a = t[l];
@@ -107,5 +107,5 @@ const y = /* @__PURE__ */ i(p), I = /* @__PURE__ */ h({
107
107
  default: y
108
108
  }, [p]);
109
109
  export {
110
- I as t
110
+ I as tokens
111
111
  };
@@ -1,5 +1,5 @@
1
- import { g as i } from "../_commonjsHelpers.js";
2
- import { c as n, v as u, p as m } from "./create-service-factory.js";
1
+ import { getDefaultExportFromCjs as i } from "../_commonjsHelpers.js";
2
+ import { createServiceFactory_1 as n, validator as u, pick_1 as m } from "./create-service-factory.js";
3
3
  function c(e, l) {
4
4
  for (var o = 0; o < l.length; o++) {
5
5
  const a = l[o];
@@ -73,5 +73,5 @@ const I = /* @__PURE__ */ i(p), b = /* @__PURE__ */ c({
73
73
  default: I
74
74
  }, [p]);
75
75
  export {
76
- b as u
76
+ b as uploads
77
77
  };
package/lib/mapbox-sdk.js CHANGED
@@ -1,8 +1,8 @@
1
- import { g as f } from "./_commonjsHelpers.js";
2
- import { b as s } from "./mapbox-sdk/browser-client.js";
3
- function c(t, a) {
4
- for (var o = 0; o < a.length; o++) {
5
- const e = a[o];
1
+ import { getDefaultExportFromCjs as f } from "./_commonjsHelpers.js";
2
+ import { browserClient as c } from "./mapbox-sdk/browser-client.js";
3
+ function s(t, i) {
4
+ for (var o = 0; o < i.length; o++) {
5
+ const e = i[o];
6
6
  if (typeof e != "string" && !Array.isArray(e)) {
7
7
  for (const r in e)
8
8
  if (r !== "default" && !(r in t)) {
@@ -16,11 +16,14 @@ function c(t, a) {
16
16
  }
17
17
  return Object.freeze(Object.defineProperty(t, Symbol.toStringTag, { value: "Module" }));
18
18
  }
19
- var l = s, i = l;
20
- const p = /* @__PURE__ */ f(i), b = /* @__PURE__ */ c({
19
+ var l = c, a = l;
20
+ const p = /* @__PURE__ */ f(a), g = /* @__PURE__ */ s({
21
21
  __proto__: null,
22
22
  default: p
23
- }, [i]);
23
+ }, [a]);
24
24
  export {
25
- b as i
25
+ g as index
26
+ };
27
+ export {
28
+ g as default
26
29
  };
@@ -120,29 +120,29 @@ class D {
120
120
  );
121
121
  }
122
122
  async loadMapbox() {
123
- const e = await import("../mapbox-gl.js").then((s) => s.m);
123
+ const e = await import("../mapbox-gl.js").then((s) => s.mapboxGl);
124
124
  this.mapboxgl = e;
125
125
  }
126
126
  get servicesLoader() {
127
127
  return {
128
- datasets: () => import("../mapbox-sdk/datasets.js").then((e) => e.d),
129
- directions: () => import("../mapbox-sdk/directions.js").then((e) => e.d),
130
- geocoding: () => import("../mapbox-sdk/geocoding.js").then((e) => e.g),
131
- geocodingV6: () => import("../mapbox-sdk/geocoding-v6.js").then((e) => e.g),
132
- mapMatching: () => import("../mapbox-sdk/map-matching.js").then((e) => e.m),
133
- matrix: () => import("../mapbox-sdk/matrix.js").then((e) => e.m),
134
- optimization: () => import("../mapbox-sdk/optimization.js").then((e) => e.o),
135
- static: () => import("../mapbox-sdk/static.js").then((e) => e._),
136
- styles: () => import("../mapbox-sdk/styles.js").then((e) => e.s),
137
- tilequery: () => import("../mapbox-sdk/tilequery.js").then((e) => e.t),
138
- tilesets: () => import("../mapbox-sdk/tilesets.js").then((e) => e.t),
139
- tokens: () => import("../mapbox-sdk/tokens.js").then((e) => e.t),
140
- uploads: () => import("../mapbox-sdk/uploads.js").then((e) => e.u),
141
- isochrone: () => import("../mapbox-sdk/isochrone.js").then((e) => e.i)
128
+ datasets: () => import("../mapbox-sdk/datasets.js").then((e) => e.datasets),
129
+ directions: () => import("../mapbox-sdk/directions.js").then((e) => e.directions),
130
+ geocoding: () => import("../mapbox-sdk/geocoding.js").then((e) => e.geocoding),
131
+ geocodingV6: () => import("../mapbox-sdk/geocoding-v6.js").then((e) => e.geocodingV6),
132
+ mapMatching: () => import("../mapbox-sdk/map-matching.js").then((e) => e.mapMatching),
133
+ matrix: () => import("../mapbox-sdk/matrix.js").then((e) => e.matrix),
134
+ optimization: () => import("../mapbox-sdk/optimization.js").then((e) => e.optimization),
135
+ static: () => import("../mapbox-sdk/static.js").then((e) => e._static),
136
+ styles: () => import("../mapbox-sdk/styles.js").then((e) => e.styles),
137
+ tilequery: () => import("../mapbox-sdk/tilequery.js").then((e) => e.tilequery),
138
+ tilesets: () => import("../mapbox-sdk/tilesets.js").then((e) => e.tilesets),
139
+ tokens: () => import("../mapbox-sdk/tokens.js").then((e) => e.tokens),
140
+ uploads: () => import("../mapbox-sdk/uploads.js").then((e) => e.uploads),
141
+ isochrone: () => import("../mapbox-sdk/isochrone.js").then((e) => e.isochrone)
142
142
  };
143
143
  }
144
144
  async loadMapboxSDK() {
145
- const s = (await import("../mapbox-sdk.js").then((o) => o.i)).default({ accessToken: this.apiKey }), a = await Promise.all(this.services.map((o) => this.servicesLoader[o]().then((r) => r.default(s))));
145
+ const s = (await import("../mapbox-sdk.js").then((o) => o.index)).default({ accessToken: this.apiKey }), a = await Promise.all(this.services.map((o) => this.servicesLoader[o]().then((r) => r.default(s))));
146
146
  for (const [o, r] of this.services.entries())
147
147
  this.sdk[r] = a[o];
148
148
  }
@@ -120,29 +120,29 @@ class O {
120
120
  );
121
121
  }
122
122
  async loadMapbox() {
123
- const e = await import("../mapbox-gl.js").then((s) => s.m);
123
+ const e = await import("../mapbox-gl.js").then((s) => s.mapboxGl);
124
124
  this.mapboxgl = e;
125
125
  }
126
126
  get servicesLoader() {
127
127
  return {
128
- datasets: () => import("../mapbox-sdk/datasets.js").then((e) => e.d),
129
- directions: () => import("../mapbox-sdk/directions.js").then((e) => e.d),
130
- geocoding: () => import("../mapbox-sdk/geocoding.js").then((e) => e.g),
131
- geocodingV6: () => import("../mapbox-sdk/geocoding-v6.js").then((e) => e.g),
132
- mapMatching: () => import("../mapbox-sdk/map-matching.js").then((e) => e.m),
133
- matrix: () => import("../mapbox-sdk/matrix.js").then((e) => e.m),
134
- optimization: () => import("../mapbox-sdk/optimization.js").then((e) => e.o),
135
- static: () => import("../mapbox-sdk/static.js").then((e) => e._),
136
- styles: () => import("../mapbox-sdk/styles.js").then((e) => e.s),
137
- tilequery: () => import("../mapbox-sdk/tilequery.js").then((e) => e.t),
138
- tilesets: () => import("../mapbox-sdk/tilesets.js").then((e) => e.t),
139
- tokens: () => import("../mapbox-sdk/tokens.js").then((e) => e.t),
140
- uploads: () => import("../mapbox-sdk/uploads.js").then((e) => e.u),
141
- isochrone: () => import("../mapbox-sdk/isochrone.js").then((e) => e.i)
128
+ datasets: () => import("../mapbox-sdk/datasets.js").then((e) => e.datasets),
129
+ directions: () => import("../mapbox-sdk/directions.js").then((e) => e.directions),
130
+ geocoding: () => import("../mapbox-sdk/geocoding.js").then((e) => e.geocoding),
131
+ geocodingV6: () => import("../mapbox-sdk/geocoding-v6.js").then((e) => e.geocodingV6),
132
+ mapMatching: () => import("../mapbox-sdk/map-matching.js").then((e) => e.mapMatching),
133
+ matrix: () => import("../mapbox-sdk/matrix.js").then((e) => e.matrix),
134
+ optimization: () => import("../mapbox-sdk/optimization.js").then((e) => e.optimization),
135
+ static: () => import("../mapbox-sdk/static.js").then((e) => e._static),
136
+ styles: () => import("../mapbox-sdk/styles.js").then((e) => e.styles),
137
+ tilequery: () => import("../mapbox-sdk/tilequery.js").then((e) => e.tilequery),
138
+ tilesets: () => import("../mapbox-sdk/tilesets.js").then((e) => e.tilesets),
139
+ tokens: () => import("../mapbox-sdk/tokens.js").then((e) => e.tokens),
140
+ uploads: () => import("../mapbox-sdk/uploads.js").then((e) => e.uploads),
141
+ isochrone: () => import("../mapbox-sdk/isochrone.js").then((e) => e.isochrone)
142
142
  };
143
143
  }
144
144
  async loadMapboxSDK() {
145
- const s = (await import("../mapbox-sdk.js").then((o) => o.i)).default({ accessToken: this.apiKey }), a = await Promise.all(this.services.map((o) => this.servicesLoader[o]().then((r) => r.default(s))));
145
+ const s = (await import("../mapbox-sdk.js").then((o) => o.index)).default({ accessToken: this.apiKey }), a = await Promise.all(this.services.map((o) => this.servicesLoader[o]().then((r) => r.default(s))));
146
146
  for (const [o, r] of this.services.entries())
147
147
  this.sdk[r] = a[o];
148
148
  }
package/lib/searoute.js CHANGED
@@ -1,4 +1,4 @@
1
- import { lineString as d, length as g, featureEach as u, pointToLineDistance as m, coordEach as F, rhumbDistance as S, point as L, distance as f } from "@turf/turf";
1
+ import { featureEach as u, lineString as d, length as g, distance as m, pointToLineDistance as F, coordEach as S, rhumbDistance as L, point as f } from "@turf/turf";
2
2
  import l from "geojson-path-finder";
3
3
  const h = "FeatureCollection", w = "marnet_densified_", x = {
4
4
  type: "name",
@@ -77404,7 +77404,7 @@ function E() {
77404
77404
  }
77405
77405
  function M(e, t) {
77406
77406
  const r = e[0], p = t[0];
77407
- return r === 180 && p === -180 || r === -180 && p === 180 ? 1 : f(e, t);
77407
+ return r === 180 && p === -180 || r === -180 && p === 180 ? 1 : m(e, t);
77408
77408
  }
77409
77409
  const T = new l(y, { weight: M });
77410
77410
  function I(e, t, r = "nm") {
@@ -77422,15 +77422,15 @@ function c(e) {
77422
77422
  u(y, function(n, i) {
77423
77423
  const s = n.geometry.coordinates;
77424
77424
  if (!k(s[0], s[1])) {
77425
- const a = m(e, n, { units: "kilometers" });
77425
+ const a = F(e, n, { units: "kilometers" });
77426
77426
  a < r && (r = a, t = i);
77427
77427
  }
77428
77428
  });
77429
77429
  let p = null, o = null;
77430
- return F(y.features[t], function(n) {
77431
- const i = S(e, n);
77430
+ return S(y.features[t], function(n) {
77431
+ const i = L(e, n);
77432
77432
  p ? i < p && (p = i, o = n) : (p = i, o = n);
77433
- }), L(o);
77433
+ }), f(o);
77434
77434
  }
77435
77435
  export {
77436
77436
  I as default
@@ -121,29 +121,29 @@ class A {
121
121
  );
122
122
  }
123
123
  async loadMapbox() {
124
- const e = await import("./mapbox-gl.js").then((a) => a.m);
124
+ const e = await import("./mapbox-gl.js").then((a) => a.mapboxGl);
125
125
  this.mapboxgl = e;
126
126
  }
127
127
  get servicesLoader() {
128
128
  return {
129
- datasets: () => import("./mapbox-sdk/datasets.js").then((e) => e.d),
130
- directions: () => import("./mapbox-sdk/directions.js").then((e) => e.d),
131
- geocoding: () => import("./mapbox-sdk/geocoding.js").then((e) => e.g),
132
- geocodingV6: () => import("./mapbox-sdk/geocoding-v6.js").then((e) => e.g),
133
- mapMatching: () => import("./mapbox-sdk/map-matching.js").then((e) => e.m),
134
- matrix: () => import("./mapbox-sdk/matrix.js").then((e) => e.m),
135
- optimization: () => import("./mapbox-sdk/optimization.js").then((e) => e.o),
136
- static: () => import("./mapbox-sdk/static.js").then((e) => e._),
137
- styles: () => import("./mapbox-sdk/styles.js").then((e) => e.s),
138
- tilequery: () => import("./mapbox-sdk/tilequery.js").then((e) => e.t),
139
- tilesets: () => import("./mapbox-sdk/tilesets.js").then((e) => e.t),
140
- tokens: () => import("./mapbox-sdk/tokens.js").then((e) => e.t),
141
- uploads: () => import("./mapbox-sdk/uploads.js").then((e) => e.u),
142
- isochrone: () => import("./mapbox-sdk/isochrone.js").then((e) => e.i)
129
+ datasets: () => import("./mapbox-sdk/datasets.js").then((e) => e.datasets),
130
+ directions: () => import("./mapbox-sdk/directions.js").then((e) => e.directions),
131
+ geocoding: () => import("./mapbox-sdk/geocoding.js").then((e) => e.geocoding),
132
+ geocodingV6: () => import("./mapbox-sdk/geocoding-v6.js").then((e) => e.geocodingV6),
133
+ mapMatching: () => import("./mapbox-sdk/map-matching.js").then((e) => e.mapMatching),
134
+ matrix: () => import("./mapbox-sdk/matrix.js").then((e) => e.matrix),
135
+ optimization: () => import("./mapbox-sdk/optimization.js").then((e) => e.optimization),
136
+ static: () => import("./mapbox-sdk/static.js").then((e) => e._static),
137
+ styles: () => import("./mapbox-sdk/styles.js").then((e) => e.styles),
138
+ tilequery: () => import("./mapbox-sdk/tilequery.js").then((e) => e.tilequery),
139
+ tilesets: () => import("./mapbox-sdk/tilesets.js").then((e) => e.tilesets),
140
+ tokens: () => import("./mapbox-sdk/tokens.js").then((e) => e.tokens),
141
+ uploads: () => import("./mapbox-sdk/uploads.js").then((e) => e.uploads),
142
+ isochrone: () => import("./mapbox-sdk/isochrone.js").then((e) => e.isochrone)
143
143
  };
144
144
  }
145
145
  async loadMapboxSDK() {
146
- const a = (await import("./mapbox-sdk.js").then((s) => s.i)).default({ accessToken: this.apiKey }), t = await Promise.all(this.services.map((s) => this.servicesLoader[s]().then((r) => r.default(a))));
146
+ const a = (await import("./mapbox-sdk.js").then((s) => s.index)).default({ accessToken: this.apiKey }), t = await Promise.all(this.services.map((s) => this.servicesLoader[s]().then((r) => r.default(a))));
147
147
  for (const [s, r] of this.services.entries())
148
148
  this.sdk[r] = t[s];
149
149
  }
@@ -200,7 +200,7 @@ class R {
200
200
  return t.overlay = new a(e), t.overlay.setMap(this.map), t;
201
201
  }
202
202
  }
203
- class O {
203
+ class x {
204
204
  constructor(e) {
205
205
  if (this.apiKey = e.apiKey, !this.apiKey)
206
206
  throw new Error("apiKey is required");
@@ -355,7 +355,7 @@ class V {
355
355
  }, a);
356
356
  }
357
357
  }
358
- class x {
358
+ class O {
359
359
  constructor(e) {
360
360
  this.deckgl = null;
361
361
  }
@@ -434,16 +434,15 @@ async function I({ origin: l, destination: e, includeBoundaries: a = !1 }) {
434
434
  return a && (s.geometry.coordinates.unshift(l), s.geometry.coordinates.push(e)), s.geometry.coordinates = b(s.geometry.coordinates), s;
435
435
  }
436
436
  const U = {
437
- searoute: async (...l) => (await import("./searoute.js")).default(...l),
438
437
  getAirRoute: F,
439
438
  getWaterRoute: I,
440
439
  normalizeRoute: b
441
440
  }, q = {
442
441
  mapbox: A,
443
- google: O,
444
- "google-maps": O,
445
- deckgl: x,
446
- "deck-gl": x
442
+ google: x,
443
+ "google-maps": x,
444
+ deckgl: O,
445
+ "deck-gl": O
447
446
  };
448
447
  class z {
449
448
  constructor(e = {}) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yappkit/front-module-map",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "@yappkit/front module for map",
5
5
  "module": "./lib/yappkit-map.js",
6
6
  "main": "./lib/yappkit-map.js",
@@ -18,6 +18,9 @@
18
18
  "./mapboxsdk": {
19
19
  "import": "./lib/mapbox-sdk.js"
20
20
  },
21
+ "./searoute": {
22
+ "import": "./lib/searoute.js"
23
+ },
21
24
  "./deckgl": {
22
25
  "import": "./lib/providers/deckgl.js"
23
26
  },