@carto/ps-react-maps 1.3.3-alpha.0 → 1.3.3-alpha.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/dist/index.js CHANGED
@@ -1,27 +1,28 @@
1
- import Je, { createContext as J, useContext as K, useCallback as M, useReducer as Ke, useRef as pe, useMemo as Yt } from "react";
2
- import { EditableGeoJsonLayer as Bt } from "@nebula.gl/layers";
3
- import { MeasureDistanceMode as Wt } from "@nebula.gl/edit-modes";
4
- import { EventManager as Ht } from "mjolnir.js";
5
- var zt = /* @__PURE__ */ ((t) => (t.Roadmap = "roadmap", t.Satellite = "satellite", t.Hybrid = "hybrid", t))(zt || {}), qt = /* @__PURE__ */ ((t) => (t.DarkMatter = "dark-matter", t.Positron = "positron", t.Voyager = "voyager", t))(qt || {});
6
- const de = {
1
+ import tt, { createContext as Q, useContext as ee, useCallback as M, useReducer as rt, useRef as se, useMemo as qt, useEffect as Gt } from "react";
2
+ import { EditableGeoJsonLayer as Kt } from "@nebula.gl/layers";
3
+ import { MeasureDistanceMode as Zt } from "@nebula.gl/edit-modes";
4
+ import { EventManager as Jt } from "mjolnir.js";
5
+ import Xt from "convert-units";
6
+ var Qt = /* @__PURE__ */ ((t) => (t.Roadmap = "roadmap", t.Satellite = "satellite", t.Hybrid = "hybrid", t))(Qt || {}), er = /* @__PURE__ */ ((t) => (t.DarkMatter = "dark-matter", t.Positron = "positron", t.Voyager = "voyager", t))(er || {});
7
+ const ge = {
7
8
  positron: "https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",
8
9
  voyager: "https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",
9
10
  "dark-matter": "https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json"
10
11
  };
11
- var Xe = /* @__PURE__ */ ((t) => (t.Maplibre = "maplibre", t.GoogleMaps = "google-maps", t))(Xe || {});
12
- const ve = {
12
+ var nt = /* @__PURE__ */ ((t) => (t.Maplibre = "maplibre", t.GoogleMaps = "google-maps", t))(nt || {});
13
+ const Ee = {
13
14
  positron: {
14
- url: de.positron,
15
+ url: ge.positron,
15
16
  type: "maplibre"
16
17
  /* Maplibre */
17
18
  },
18
19
  voyager: {
19
- url: de.voyager,
20
+ url: ge.voyager,
20
21
  type: "maplibre"
21
22
  /* Maplibre */
22
23
  },
23
24
  "dark-matter": {
24
- url: de[
25
+ url: ge[
25
26
  "dark-matter"
26
27
  /* DarkMatter */
27
28
  ],
@@ -40,9 +41,9 @@ const ve = {
40
41
  type: "google-maps"
41
42
  /* GoogleMaps */
42
43
  }
43
- }, Y = () => {
44
+ }, H = () => {
44
45
  throw new Error("You forgot to wrap your component in <MapProvider>.");
45
- }, q = {
46
+ }, Z = {
46
47
  state: {
47
48
  maps: {}
48
49
  // sync: false,
@@ -52,62 +53,62 @@ const ve = {
52
53
  },
53
54
  actions: {
54
55
  // toggleSync: stub,
55
- setViewState: Y,
56
- setBasemap: Y,
57
- setResize: Y,
58
- setZoom: Y,
59
- setLoaded: Y
56
+ setViewState: H,
57
+ setBasemap: H,
58
+ setResize: H,
59
+ setZoom: H,
60
+ setLoaded: H
60
61
  }
61
- }, Qe = J(
62
- q.state
63
- ), et = J(q.references), tt = J(
64
- q.actions
62
+ }, at = Q(
63
+ Z.state
64
+ ), ot = Q(Z.references), it = Q(
65
+ Z.actions
65
66
  );
66
- var F = /* @__PURE__ */ ((t) => (t.SetViewState = "SetViewState", t.SetBasemap = "SetBasemap", t.SetResize = "SetResize", t.SetZoom = "SetZoom", t.SetLoaded = "SetLoaded", t))(F || {});
67
- function Gt(t, { type: n, payload: a }) {
67
+ var L = /* @__PURE__ */ ((t) => (t.SetViewState = "SetViewState", t.SetBasemap = "SetBasemap", t.SetResize = "SetResize", t.SetZoom = "SetZoom", t.SetLoaded = "SetLoaded", t))(L || {});
68
+ function tr(t, { type: r, payload: a }) {
68
69
  return {
69
70
  SetViewState: () => {
70
- const { id: i, viewState: v } = a, l = { ...t.maps };
71
+ const { id: i, viewState: f } = a, l = { ...t.maps };
71
72
  return l[i] = {
72
73
  ...t.maps[i],
73
- viewState: v
74
+ viewState: f
74
75
  }, {
75
76
  ...t,
76
77
  maps: l
77
78
  };
78
79
  },
79
80
  SetResize: () => {
80
- const { id: i, width: v, height: l } = a, h = { ...t.maps };
81
- return h[i] = {
81
+ const { id: i, width: f, height: l } = a, E = { ...t.maps };
82
+ return E[i] = {
82
83
  ...t.maps[i],
83
84
  viewState: {
84
85
  ...t.maps[i].viewState,
85
- width: v,
86
+ width: f,
86
87
  height: l
87
88
  }
88
89
  }, {
89
90
  ...t,
90
- maps: h
91
+ maps: E
91
92
  };
92
93
  },
93
94
  SetBasemap: () => {
94
- const { id: i, basemap: v } = a, l = { ...t.maps }, { basemap: h } = l[i], u = ve[h]?.type, y = ve[v]?.type, E = u === y;
95
+ const { id: i, basemap: f } = a, l = { ...t.maps }, { basemap: E } = l[i], c = Ee[E]?.type, g = Ee[f]?.type, h = c === g;
95
96
  return l[i] = {
96
97
  ...t.maps[i],
97
- basemap: v,
98
- isLoaded: E
98
+ basemap: f,
99
+ isLoaded: h
99
100
  }, {
100
101
  ...t,
101
102
  maps: l
102
103
  };
103
104
  },
104
105
  SetZoom: () => {
105
- const { id: i, zoom: v } = a, l = { ...t.maps };
106
+ const { id: i, zoom: f } = a, l = { ...t.maps };
106
107
  return l[i] = {
107
108
  ...t.maps[i],
108
109
  viewState: {
109
110
  ...t.maps[i].viewState,
110
- zoom: v
111
+ zoom: f
111
112
  }
112
113
  }, {
113
114
  ...t,
@@ -115,74 +116,74 @@ function Gt(t, { type: n, payload: a }) {
115
116
  };
116
117
  },
117
118
  SetLoaded: () => {
118
- const { id: i, value: v } = a, l = { ...t.maps };
119
+ const { id: i, value: f } = a, l = { ...t.maps };
119
120
  return l[i] = {
120
121
  ...t.maps[i],
121
- isLoaded: v
122
+ isLoaded: f
122
123
  }, {
123
124
  ...t,
124
125
  maps: l
125
126
  };
126
127
  }
127
- }[n]?.() ?? t;
128
+ }[r]?.() ?? t;
128
129
  }
129
- function rt(t) {
130
- return K(Qe).maps[t];
130
+ function st(t) {
131
+ return ee(at).maps[t];
131
132
  }
132
- function ge(t) {
133
- const n = K(et), { instanceRef: a, overlayRef: c } = n.current[t], i = M(() => {
134
- const y = a?.current;
135
- return y?.deck || y?._deck;
136
- }, [a]), v = M(() => c?.current, [c]), l = M(() => i()._getViewState(), [i]), h = M(
137
- (y) => i()?.getViewports(y),
133
+ function Se(t) {
134
+ const r = ee(ot), { instanceRef: a, overlayRef: s } = r.current[t], i = M(() => {
135
+ const g = a?.current;
136
+ return g?.deck || g?._deck;
137
+ }, [a]), f = M(() => s?.current, [s]), l = M(() => i()._getViewState(), [i]), E = M(
138
+ (g) => i()?.getViewports(g),
138
139
  [i]
139
- ), u = M(
140
- (y = 0, E) => h(E)?.[y],
141
- [h]
140
+ ), c = M(
141
+ (g = 0, h) => E(h)?.[g],
142
+ [E]
142
143
  );
143
144
  return {
144
145
  instanceRef: a,
145
- overlayRef: c,
146
+ overlayRef: s,
146
147
  getDeckInstance: i,
147
- getOverlayInstance: v,
148
+ getOverlayInstance: f,
148
149
  getViewState: l,
149
- getViewport: u,
150
- getViewports: h
150
+ getViewport: c,
151
+ getViewports: E
151
152
  };
152
153
  }
153
- function Zt(t) {
154
- const { setBasemap: n, setResize: a, setViewState: c, setZoom: i, setLoaded: v } = K(tt), { getViewport: l } = ge(t);
154
+ function rr(t) {
155
+ const { setBasemap: r, setResize: a, setViewState: s, setZoom: i, setLoaded: f } = ee(it), { getViewport: l } = Se(t);
155
156
  return {
156
- setBasemap: (u) => n(u, t),
157
- setResize: (u) => a(u, t),
158
- setViewState: (u) => c(u, t),
159
- setZoom: (u) => i(u, t),
160
- setLoaded: (u) => v(u, t),
161
- fitBounds: (u, {
162
- boundsOptions: y,
163
- viewStateOptions: E
157
+ setBasemap: (c) => r(c, t),
158
+ setResize: (c) => a(c, t),
159
+ setViewState: (c) => s(c, t),
160
+ setZoom: (c) => i(c, t),
161
+ setLoaded: (c) => f(c, t),
162
+ fitBounds: (c, {
163
+ boundsOptions: g,
164
+ viewStateOptions: h
164
165
  } = {}) => {
165
- const _ = l(), { latitude: O, longitude: m, zoom: g } = _.fitBounds(
166
- u,
167
- y
166
+ const T = l(), { latitude: P, longitude: p, zoom: y } = T.fitBounds(
167
+ c,
168
+ g
168
169
  );
169
- c({ ...E, latitude: O, longitude: m, zoom: g }, t);
170
+ s({ ...h, latitude: P, longitude: p, zoom: y }, t);
170
171
  }
171
172
  };
172
173
  }
173
- function kr(t) {
174
- return rt(t);
174
+ function qr(t) {
175
+ return st(t);
175
176
  }
176
- function Lr(t) {
177
- return ge(t);
177
+ function Gr(t) {
178
+ return Se(t);
178
179
  }
179
- function Ir(t) {
180
- return Zt(t);
180
+ function Kr(t) {
181
+ return rr(t);
181
182
  }
182
- function Jt(t) {
183
+ function nr(t) {
183
184
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
184
185
  }
185
- var me = { exports: {} }, B = {};
186
+ var be = { exports: {} }, z = {};
186
187
  /**
187
188
  * @license React
188
189
  * react-jsx-runtime.development.js
@@ -192,91 +193,91 @@ var me = { exports: {} }, B = {};
192
193
  * This source code is licensed under the MIT license found in the
193
194
  * LICENSE file in the root directory of this source tree.
194
195
  */
195
- var Be;
196
- function Kt() {
197
- return Be || (Be = 1, process.env.NODE_ENV !== "production" && function() {
198
- var t = Je, n = Symbol.for("react.element"), a = Symbol.for("react.portal"), c = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), v = Symbol.for("react.profiler"), l = Symbol.for("react.provider"), h = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), y = Symbol.for("react.suspense"), E = Symbol.for("react.suspense_list"), _ = Symbol.for("react.memo"), O = Symbol.for("react.lazy"), m = Symbol.for("react.offscreen"), g = Symbol.iterator, x = "@@iterator";
199
- function T(e) {
196
+ var Ke;
197
+ function ar() {
198
+ return Ke || (Ke = 1, process.env.NODE_ENV !== "production" && function() {
199
+ var t = tt, r = Symbol.for("react.element"), a = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), f = Symbol.for("react.profiler"), l = Symbol.for("react.provider"), E = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), T = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), y = Symbol.iterator, j = "@@iterator";
200
+ function U(e) {
200
201
  if (e === null || typeof e != "object")
201
202
  return null;
202
- var r = g && e[g] || e[x];
203
- return typeof r == "function" ? r : null;
203
+ var n = y && e[y] || e[j];
204
+ return typeof n == "function" ? n : null;
204
205
  }
205
- var P = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
206
- function w(e) {
206
+ var x = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
207
+ function _(e) {
207
208
  {
208
- for (var r = arguments.length, o = new Array(r > 1 ? r - 1 : 0), s = 1; s < r; s++)
209
- o[s - 1] = arguments[s];
210
- ct("error", e, o);
209
+ for (var n = arguments.length, o = new Array(n > 1 ? n - 1 : 0), u = 1; u < n; u++)
210
+ o[u - 1] = arguments[u];
211
+ Te("error", e, o);
211
212
  }
212
213
  }
213
- function ct(e, r, o) {
214
+ function Te(e, n, o) {
214
215
  {
215
- var s = P.ReactDebugCurrentFrame, p = s.getStackAddendum();
216
- p !== "" && (r += "%s", o = o.concat([p]));
217
- var b = o.map(function(d) {
218
- return String(d);
216
+ var u = x.ReactDebugCurrentFrame, v = u.getStackAddendum();
217
+ v !== "" && (n += "%s", o = o.concat([v]));
218
+ var b = o.map(function(m) {
219
+ return String(m);
219
220
  });
220
- b.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, b);
221
+ b.unshift("Warning: " + n), Function.prototype.apply.call(console[e], console, b);
221
222
  }
222
223
  }
223
- var lt = !1, ft = !1, dt = !1, pt = !1, vt = !1, be;
224
- be = Symbol.for("react.module.reference");
225
- function mt(e) {
226
- return !!(typeof e == "string" || typeof e == "function" || e === c || e === v || vt || e === i || e === y || e === E || pt || e === m || lt || ft || dt || typeof e == "object" && e !== null && (e.$$typeof === O || e.$$typeof === _ || e.$$typeof === l || e.$$typeof === h || e.$$typeof === u || // This needs to include all possible module reference object
224
+ var F = !1, k = !1, yt = !1, ht = !1, Et = !1, Me;
225
+ Me = Symbol.for("react.module.reference");
226
+ function bt(e) {
227
+ return !!(typeof e == "string" || typeof e == "function" || e === s || e === f || Et || e === i || e === g || e === h || ht || e === p || F || k || yt || typeof e == "object" && e !== null && (e.$$typeof === P || e.$$typeof === T || e.$$typeof === l || e.$$typeof === E || e.$$typeof === c || // This needs to include all possible module reference object
227
228
  // types supported by any Flight configuration anywhere since
228
229
  // we don't know which Flight build this will end up being used
229
230
  // with.
230
- e.$$typeof === be || e.getModuleId !== void 0));
231
+ e.$$typeof === Me || e.getModuleId !== void 0));
231
232
  }
232
- function gt(e, r, o) {
233
- var s = e.displayName;
234
- if (s)
235
- return s;
236
- var p = r.displayName || r.name || "";
237
- return p !== "" ? o + "(" + p + ")" : o;
233
+ function _t(e, n, o) {
234
+ var u = e.displayName;
235
+ if (u)
236
+ return u;
237
+ var v = n.displayName || n.name || "";
238
+ return v !== "" ? o + "(" + v + ")" : o;
238
239
  }
239
- function he(e) {
240
+ function Pe(e) {
240
241
  return e.displayName || "Context";
241
242
  }
242
243
  function A(e) {
243
244
  if (e == null)
244
245
  return null;
245
- if (typeof e.tag == "number" && w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
246
+ if (typeof e.tag == "number" && _("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
246
247
  return e.displayName || e.name || null;
247
248
  if (typeof e == "string")
248
249
  return e;
249
250
  switch (e) {
250
- case c:
251
+ case s:
251
252
  return "Fragment";
252
253
  case a:
253
254
  return "Portal";
254
- case v:
255
+ case f:
255
256
  return "Profiler";
256
257
  case i:
257
258
  return "StrictMode";
258
- case y:
259
+ case g:
259
260
  return "Suspense";
260
- case E:
261
+ case h:
261
262
  return "SuspenseList";
262
263
  }
263
264
  if (typeof e == "object")
264
265
  switch (e.$$typeof) {
265
- case h:
266
- var r = e;
267
- return he(r) + ".Consumer";
266
+ case E:
267
+ var n = e;
268
+ return Pe(n) + ".Consumer";
268
269
  case l:
269
270
  var o = e;
270
- return he(o._context) + ".Provider";
271
- case u:
272
- return gt(e, e.render, "ForwardRef");
273
- case _:
274
- var s = e.displayName || null;
275
- return s !== null ? s : A(e.type) || "Memo";
276
- case O: {
277
- var p = e, b = p._payload, d = p._init;
271
+ return Pe(o._context) + ".Provider";
272
+ case c:
273
+ return _t(e, e.render, "ForwardRef");
274
+ case T:
275
+ var u = e.displayName || null;
276
+ return u !== null ? u : A(e.type) || "Memo";
277
+ case P: {
278
+ var v = e, b = v._payload, m = v._init;
278
279
  try {
279
- return A(d(b));
280
+ return A(m(b));
280
281
  } catch {
281
282
  return null;
282
283
  }
@@ -284,18 +285,18 @@ function Kt() {
284
285
  }
285
286
  return null;
286
287
  }
287
- var L = Object.assign, $ = 0, Re, Se, _e, Te, we, Me, Oe;
288
- function Pe() {
288
+ var I = Object.assign, B = 0, Ce, Oe, we, je, xe, Ae, De;
289
+ function Fe() {
289
290
  }
290
- Pe.__reactDisabledLog = !0;
291
- function yt() {
291
+ Fe.__reactDisabledLog = !0;
292
+ function St() {
292
293
  {
293
- if ($ === 0) {
294
- Re = console.log, Se = console.info, _e = console.warn, Te = console.error, we = console.group, Me = console.groupCollapsed, Oe = console.groupEnd;
294
+ if (B === 0) {
295
+ Ce = console.log, Oe = console.info, we = console.warn, je = console.error, xe = console.group, Ae = console.groupCollapsed, De = console.groupEnd;
295
296
  var e = {
296
297
  configurable: !0,
297
298
  enumerable: !0,
298
- value: Pe,
299
+ value: Fe,
299
300
  writable: !0
300
301
  };
301
302
  Object.defineProperties(console, {
@@ -308,254 +309,254 @@ function Kt() {
308
309
  groupEnd: e
309
310
  });
310
311
  }
311
- $++;
312
+ B++;
312
313
  }
313
314
  }
314
- function Et() {
315
+ function Rt() {
315
316
  {
316
- if ($--, $ === 0) {
317
+ if (B--, B === 0) {
317
318
  var e = {
318
319
  configurable: !0,
319
320
  enumerable: !0,
320
321
  writable: !0
321
322
  };
322
323
  Object.defineProperties(console, {
323
- log: L({}, e, {
324
- value: Re
324
+ log: I({}, e, {
325
+ value: Ce
325
326
  }),
326
- info: L({}, e, {
327
- value: Se
327
+ info: I({}, e, {
328
+ value: Oe
328
329
  }),
329
- warn: L({}, e, {
330
- value: _e
330
+ warn: I({}, e, {
331
+ value: we
331
332
  }),
332
- error: L({}, e, {
333
- value: Te
333
+ error: I({}, e, {
334
+ value: je
334
335
  }),
335
- group: L({}, e, {
336
- value: we
336
+ group: I({}, e, {
337
+ value: xe
337
338
  }),
338
- groupCollapsed: L({}, e, {
339
- value: Me
339
+ groupCollapsed: I({}, e, {
340
+ value: Ae
340
341
  }),
341
- groupEnd: L({}, e, {
342
- value: Oe
342
+ groupEnd: I({}, e, {
343
+ value: De
343
344
  })
344
345
  });
345
346
  }
346
- $ < 0 && w("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
347
+ B < 0 && _("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
347
348
  }
348
349
  }
349
- var ae = P.ReactCurrentDispatcher, oe;
350
- function X(e, r, o) {
350
+ var ce = x.ReactCurrentDispatcher, ue;
351
+ function te(e, n, o) {
351
352
  {
352
- if (oe === void 0)
353
+ if (ue === void 0)
353
354
  try {
354
355
  throw Error();
355
- } catch (p) {
356
- var s = p.stack.trim().match(/\n( *(at )?)/);
357
- oe = s && s[1] || "";
356
+ } catch (v) {
357
+ var u = v.stack.trim().match(/\n( *(at )?)/);
358
+ ue = u && u[1] || "";
358
359
  }
359
360
  return `
360
- ` + oe + e;
361
+ ` + ue + e;
361
362
  }
362
363
  }
363
- var ie = !1, Q;
364
+ var le = !1, re;
364
365
  {
365
- var bt = typeof WeakMap == "function" ? WeakMap : Map;
366
- Q = new bt();
366
+ var Tt = typeof WeakMap == "function" ? WeakMap : Map;
367
+ re = new Tt();
367
368
  }
368
- function Ce(e, r) {
369
- if (!e || ie)
369
+ function ke(e, n) {
370
+ if (!e || le)
370
371
  return "";
371
372
  {
372
- var o = Q.get(e);
373
+ var o = re.get(e);
373
374
  if (o !== void 0)
374
375
  return o;
375
376
  }
376
- var s;
377
- ie = !0;
378
- var p = Error.prepareStackTrace;
377
+ var u;
378
+ le = !0;
379
+ var v = Error.prepareStackTrace;
379
380
  Error.prepareStackTrace = void 0;
380
381
  var b;
381
- b = ae.current, ae.current = null, yt();
382
+ b = ce.current, ce.current = null, St();
382
383
  try {
383
- if (r) {
384
- var d = function() {
384
+ if (n) {
385
+ var m = function() {
385
386
  throw Error();
386
387
  };
387
- if (Object.defineProperty(d.prototype, "props", {
388
+ if (Object.defineProperty(m.prototype, "props", {
388
389
  set: function() {
389
390
  throw Error();
390
391
  }
391
392
  }), typeof Reflect == "object" && Reflect.construct) {
392
393
  try {
393
- Reflect.construct(d, []);
394
+ Reflect.construct(m, []);
394
395
  } catch (D) {
395
- s = D;
396
+ u = D;
396
397
  }
397
- Reflect.construct(e, [], d);
398
+ Reflect.construct(e, [], m);
398
399
  } else {
399
400
  try {
400
- d.call();
401
+ m.call();
401
402
  } catch (D) {
402
- s = D;
403
+ u = D;
403
404
  }
404
- e.call(d.prototype);
405
+ e.call(m.prototype);
405
406
  }
406
407
  } else {
407
408
  try {
408
409
  throw Error();
409
410
  } catch (D) {
410
- s = D;
411
+ u = D;
411
412
  }
412
413
  e();
413
414
  }
414
415
  } catch (D) {
415
- if (D && s && typeof D.stack == "string") {
416
- for (var f = D.stack.split(`
417
- `), C = s.stack.split(`
418
- `), R = f.length - 1, S = C.length - 1; R >= 1 && S >= 0 && f[R] !== C[S]; )
419
- S--;
420
- for (; R >= 1 && S >= 0; R--, S--)
421
- if (f[R] !== C[S]) {
422
- if (R !== 1 || S !== 1)
416
+ if (D && u && typeof D.stack == "string") {
417
+ for (var d = D.stack.split(`
418
+ `), C = u.stack.split(`
419
+ `), S = d.length - 1, R = C.length - 1; S >= 1 && R >= 0 && d[S] !== C[R]; )
420
+ R--;
421
+ for (; S >= 1 && R >= 0; S--, R--)
422
+ if (d[S] !== C[R]) {
423
+ if (S !== 1 || R !== 1)
423
424
  do
424
- if (R--, S--, S < 0 || f[R] !== C[S]) {
425
- var j = `
426
- ` + f[R].replace(" at new ", " at ");
427
- return e.displayName && j.includes("<anonymous>") && (j = j.replace("<anonymous>", e.displayName)), typeof e == "function" && Q.set(e, j), j;
425
+ if (S--, R--, R < 0 || d[S] !== C[R]) {
426
+ var w = `
427
+ ` + d[S].replace(" at new ", " at ");
428
+ return e.displayName && w.includes("<anonymous>") && (w = w.replace("<anonymous>", e.displayName)), typeof e == "function" && re.set(e, w), w;
428
429
  }
429
- while (R >= 1 && S >= 0);
430
+ while (S >= 1 && R >= 0);
430
431
  break;
431
432
  }
432
433
  }
433
434
  } finally {
434
- ie = !1, ae.current = b, Et(), Error.prepareStackTrace = p;
435
+ le = !1, ce.current = b, Rt(), Error.prepareStackTrace = v;
435
436
  }
436
- var N = e ? e.displayName || e.name : "", Ye = N ? X(N) : "";
437
- return typeof e == "function" && Q.set(e, Ye), Ye;
437
+ var $ = e ? e.displayName || e.name : "", Ge = $ ? te($) : "";
438
+ return typeof e == "function" && re.set(e, Ge), Ge;
438
439
  }
439
- function ht(e, r, o) {
440
- return Ce(e, !1);
440
+ function Mt(e, n, o) {
441
+ return ke(e, !1);
441
442
  }
442
- function Rt(e) {
443
- var r = e.prototype;
444
- return !!(r && r.isReactComponent);
443
+ function Pt(e) {
444
+ var n = e.prototype;
445
+ return !!(n && n.isReactComponent);
445
446
  }
446
- function ee(e, r, o) {
447
+ function ne(e, n, o) {
447
448
  if (e == null)
448
449
  return "";
449
450
  if (typeof e == "function")
450
- return Ce(e, Rt(e));
451
+ return ke(e, Pt(e));
451
452
  if (typeof e == "string")
452
- return X(e);
453
+ return te(e);
453
454
  switch (e) {
454
- case y:
455
- return X("Suspense");
456
- case E:
457
- return X("SuspenseList");
455
+ case g:
456
+ return te("Suspense");
457
+ case h:
458
+ return te("SuspenseList");
458
459
  }
459
460
  if (typeof e == "object")
460
461
  switch (e.$$typeof) {
461
- case u:
462
- return ht(e.render);
463
- case _:
464
- return ee(e.type, r, o);
465
- case O: {
466
- var s = e, p = s._payload, b = s._init;
462
+ case c:
463
+ return Mt(e.render);
464
+ case T:
465
+ return ne(e.type, n, o);
466
+ case P: {
467
+ var u = e, v = u._payload, b = u._init;
467
468
  try {
468
- return ee(b(p), r, o);
469
+ return ne(b(v), n, o);
469
470
  } catch {
470
471
  }
471
472
  }
472
473
  }
473
474
  return "";
474
475
  }
475
- var te = Object.prototype.hasOwnProperty, je = {}, xe = P.ReactDebugCurrentFrame;
476
- function re(e) {
476
+ var ae = Object.prototype.hasOwnProperty, Le = {}, Ne = x.ReactDebugCurrentFrame;
477
+ function oe(e) {
477
478
  if (e) {
478
- var r = e._owner, o = ee(e.type, e._source, r ? r.type : null);
479
- xe.setExtraStackFrame(o);
479
+ var n = e._owner, o = ne(e.type, e._source, n ? n.type : null);
480
+ Ne.setExtraStackFrame(o);
480
481
  } else
481
- xe.setExtraStackFrame(null);
482
+ Ne.setExtraStackFrame(null);
482
483
  }
483
- function St(e, r, o, s, p) {
484
+ function Ct(e, n, o, u, v) {
484
485
  {
485
- var b = Function.call.bind(te);
486
- for (var d in e)
487
- if (b(e, d)) {
488
- var f = void 0;
486
+ var b = Function.call.bind(ae);
487
+ for (var m in e)
488
+ if (b(e, m)) {
489
+ var d = void 0;
489
490
  try {
490
- if (typeof e[d] != "function") {
491
- var C = Error((s || "React class") + ": " + o + " type `" + d + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[d] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
491
+ if (typeof e[m] != "function") {
492
+ var C = Error((u || "React class") + ": " + o + " type `" + m + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[m] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
492
493
  throw C.name = "Invariant Violation", C;
493
494
  }
494
- f = e[d](r, d, s, o, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
495
- } catch (R) {
496
- f = R;
495
+ d = e[m](n, m, u, o, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
496
+ } catch (S) {
497
+ d = S;
497
498
  }
498
- f && !(f instanceof Error) && (re(p), w("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", s || "React class", o, d, typeof f), re(null)), f instanceof Error && !(f.message in je) && (je[f.message] = !0, re(p), w("Failed %s type: %s", o, f.message), re(null));
499
+ d && !(d instanceof Error) && (oe(v), _("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", u || "React class", o, m, typeof d), oe(null)), d instanceof Error && !(d.message in Le) && (Le[d.message] = !0, oe(v), _("Failed %s type: %s", o, d.message), oe(null));
499
500
  }
500
501
  }
501
502
  }
502
- var _t = Array.isArray;
503
- function se(e) {
504
- return _t(e);
503
+ var Ot = Array.isArray;
504
+ function fe(e) {
505
+ return Ot(e);
505
506
  }
506
- function Tt(e) {
507
+ function wt(e) {
507
508
  {
508
- var r = typeof Symbol == "function" && Symbol.toStringTag, o = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
509
+ var n = typeof Symbol == "function" && Symbol.toStringTag, o = n && e[Symbol.toStringTag] || e.constructor.name || "Object";
509
510
  return o;
510
511
  }
511
512
  }
512
- function wt(e) {
513
+ function jt(e) {
513
514
  try {
514
- return Ae(e), !1;
515
+ return Ie(e), !1;
515
516
  } catch {
516
517
  return !0;
517
518
  }
518
519
  }
519
- function Ae(e) {
520
+ function Ie(e) {
520
521
  return "" + e;
521
522
  }
522
- function De(e) {
523
- if (wt(e))
524
- return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Tt(e)), Ae(e);
523
+ function Ue(e) {
524
+ if (jt(e))
525
+ return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", wt(e)), Ie(e);
525
526
  }
526
- var V = P.ReactCurrentOwner, Mt = {
527
+ var W = x.ReactCurrentOwner, xt = {
527
528
  key: !0,
528
529
  ref: !0,
529
530
  __self: !0,
530
531
  __source: !0
531
- }, Fe, ke, ue;
532
- ue = {};
533
- function Ot(e) {
534
- if (te.call(e, "ref")) {
535
- var r = Object.getOwnPropertyDescriptor(e, "ref").get;
536
- if (r && r.isReactWarning)
532
+ }, Ve, $e, de;
533
+ de = {};
534
+ function At(e) {
535
+ if (ae.call(e, "ref")) {
536
+ var n = Object.getOwnPropertyDescriptor(e, "ref").get;
537
+ if (n && n.isReactWarning)
537
538
  return !1;
538
539
  }
539
540
  return e.ref !== void 0;
540
541
  }
541
- function Pt(e) {
542
- if (te.call(e, "key")) {
543
- var r = Object.getOwnPropertyDescriptor(e, "key").get;
544
- if (r && r.isReactWarning)
542
+ function Dt(e) {
543
+ if (ae.call(e, "key")) {
544
+ var n = Object.getOwnPropertyDescriptor(e, "key").get;
545
+ if (n && n.isReactWarning)
545
546
  return !1;
546
547
  }
547
548
  return e.key !== void 0;
548
549
  }
549
- function Ct(e, r) {
550
- if (typeof e.ref == "string" && V.current && r && V.current.stateNode !== r) {
551
- var o = A(V.current.type);
552
- ue[o] || (w('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', A(V.current.type), e.ref), ue[o] = !0);
550
+ function Ft(e, n) {
551
+ if (typeof e.ref == "string" && W.current && n && W.current.stateNode !== n) {
552
+ var o = A(W.current.type);
553
+ de[o] || (_('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', A(W.current.type), e.ref), de[o] = !0);
553
554
  }
554
555
  }
555
- function jt(e, r) {
556
+ function kt(e, n) {
556
557
  {
557
558
  var o = function() {
558
- Fe || (Fe = !0, w("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
559
+ Ve || (Ve = !0, _("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", n));
559
560
  };
560
561
  o.isReactWarning = !0, Object.defineProperty(e, "key", {
561
562
  get: o,
@@ -563,10 +564,10 @@ function Kt() {
563
564
  });
564
565
  }
565
566
  }
566
- function xt(e, r) {
567
+ function Lt(e, n) {
567
568
  {
568
569
  var o = function() {
569
- ke || (ke = !0, w("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
570
+ $e || ($e = !0, _("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", n));
570
571
  };
571
572
  o.isReactWarning = !0, Object.defineProperty(e, "ref", {
572
573
  get: o,
@@ -574,70 +575,70 @@ function Kt() {
574
575
  });
575
576
  }
576
577
  }
577
- var At = function(e, r, o, s, p, b, d) {
578
- var f = {
578
+ var Nt = function(e, n, o, u, v, b, m) {
579
+ var d = {
579
580
  // This tag allows us to uniquely identify this as a React Element
580
- $$typeof: n,
581
+ $$typeof: r,
581
582
  // Built-in properties that belong on the element
582
583
  type: e,
583
- key: r,
584
+ key: n,
584
585
  ref: o,
585
- props: d,
586
+ props: m,
586
587
  // Record the component responsible for creating this element.
587
588
  _owner: b
588
589
  };
589
- return f._store = {}, Object.defineProperty(f._store, "validated", {
590
+ return d._store = {}, Object.defineProperty(d._store, "validated", {
590
591
  configurable: !1,
591
592
  enumerable: !1,
592
593
  writable: !0,
593
594
  value: !1
594
- }), Object.defineProperty(f, "_self", {
595
+ }), Object.defineProperty(d, "_self", {
595
596
  configurable: !1,
596
597
  enumerable: !1,
597
598
  writable: !1,
598
- value: s
599
- }), Object.defineProperty(f, "_source", {
599
+ value: u
600
+ }), Object.defineProperty(d, "_source", {
600
601
  configurable: !1,
601
602
  enumerable: !1,
602
603
  writable: !1,
603
- value: p
604
- }), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
604
+ value: v
605
+ }), Object.freeze && (Object.freeze(d.props), Object.freeze(d)), d;
605
606
  };
606
- function Dt(e, r, o, s, p) {
607
+ function It(e, n, o, u, v) {
607
608
  {
608
- var b, d = {}, f = null, C = null;
609
- o !== void 0 && (De(o), f = "" + o), Pt(r) && (De(r.key), f = "" + r.key), Ot(r) && (C = r.ref, Ct(r, p));
610
- for (b in r)
611
- te.call(r, b) && !Mt.hasOwnProperty(b) && (d[b] = r[b]);
609
+ var b, m = {}, d = null, C = null;
610
+ o !== void 0 && (Ue(o), d = "" + o), Dt(n) && (Ue(n.key), d = "" + n.key), At(n) && (C = n.ref, Ft(n, v));
611
+ for (b in n)
612
+ ae.call(n, b) && !xt.hasOwnProperty(b) && (m[b] = n[b]);
612
613
  if (e && e.defaultProps) {
613
- var R = e.defaultProps;
614
- for (b in R)
615
- d[b] === void 0 && (d[b] = R[b]);
614
+ var S = e.defaultProps;
615
+ for (b in S)
616
+ m[b] === void 0 && (m[b] = S[b]);
616
617
  }
617
- if (f || C) {
618
- var S = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
619
- f && jt(d, S), C && xt(d, S);
618
+ if (d || C) {
619
+ var R = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
620
+ d && kt(m, R), C && Lt(m, R);
620
621
  }
621
- return At(e, f, C, p, s, V.current, d);
622
+ return Nt(e, d, C, v, u, W.current, m);
622
623
  }
623
624
  }
624
- var ce = P.ReactCurrentOwner, Le = P.ReactDebugCurrentFrame;
625
- function I(e) {
625
+ var me = x.ReactCurrentOwner, Ye = x.ReactDebugCurrentFrame;
626
+ function V(e) {
626
627
  if (e) {
627
- var r = e._owner, o = ee(e.type, e._source, r ? r.type : null);
628
- Le.setExtraStackFrame(o);
628
+ var n = e._owner, o = ne(e.type, e._source, n ? n.type : null);
629
+ Ye.setExtraStackFrame(o);
629
630
  } else
630
- Le.setExtraStackFrame(null);
631
+ Ye.setExtraStackFrame(null);
631
632
  }
632
- var le;
633
- le = !1;
634
- function fe(e) {
635
- return typeof e == "object" && e !== null && e.$$typeof === n;
633
+ var pe;
634
+ pe = !1;
635
+ function ve(e) {
636
+ return typeof e == "object" && e !== null && e.$$typeof === r;
636
637
  }
637
- function Ie() {
638
+ function Be() {
638
639
  {
639
- if (ce.current) {
640
- var e = A(ce.current.type);
640
+ if (me.current) {
641
+ var e = A(me.current.type);
641
642
  if (e)
642
643
  return `
643
644
 
@@ -646,140 +647,140 @@ Check the render method of \`` + e + "`.";
646
647
  return "";
647
648
  }
648
649
  }
649
- function Ft(e) {
650
+ function Ut(e) {
650
651
  {
651
652
  if (e !== void 0) {
652
- var r = e.fileName.replace(/^.*[\\\/]/, ""), o = e.lineNumber;
653
+ var n = e.fileName.replace(/^.*[\\\/]/, ""), o = e.lineNumber;
653
654
  return `
654
655
 
655
- Check your code at ` + r + ":" + o + ".";
656
+ Check your code at ` + n + ":" + o + ".";
656
657
  }
657
658
  return "";
658
659
  }
659
660
  }
660
- var Ne = {};
661
- function kt(e) {
661
+ var We = {};
662
+ function Vt(e) {
662
663
  {
663
- var r = Ie();
664
- if (!r) {
664
+ var n = Be();
665
+ if (!n) {
665
666
  var o = typeof e == "string" ? e : e.displayName || e.name;
666
- o && (r = `
667
+ o && (n = `
667
668
 
668
669
  Check the top-level render call using <` + o + ">.");
669
670
  }
670
- return r;
671
+ return n;
671
672
  }
672
673
  }
673
- function Ue(e, r) {
674
+ function He(e, n) {
674
675
  {
675
676
  if (!e._store || e._store.validated || e.key != null)
676
677
  return;
677
678
  e._store.validated = !0;
678
- var o = kt(r);
679
- if (Ne[o])
679
+ var o = Vt(n);
680
+ if (We[o])
680
681
  return;
681
- Ne[o] = !0;
682
- var s = "";
683
- e && e._owner && e._owner !== ce.current && (s = " It was passed a child from " + A(e._owner.type) + "."), I(e), w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', o, s), I(null);
682
+ We[o] = !0;
683
+ var u = "";
684
+ e && e._owner && e._owner !== me.current && (u = " It was passed a child from " + A(e._owner.type) + "."), V(e), _('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', o, u), V(null);
684
685
  }
685
686
  }
686
- function $e(e, r) {
687
+ function ze(e, n) {
687
688
  {
688
689
  if (typeof e != "object")
689
690
  return;
690
- if (se(e))
691
+ if (fe(e))
691
692
  for (var o = 0; o < e.length; o++) {
692
- var s = e[o];
693
- fe(s) && Ue(s, r);
693
+ var u = e[o];
694
+ ve(u) && He(u, n);
694
695
  }
695
- else if (fe(e))
696
+ else if (ve(e))
696
697
  e._store && (e._store.validated = !0);
697
698
  else if (e) {
698
- var p = T(e);
699
- if (typeof p == "function" && p !== e.entries)
700
- for (var b = p.call(e), d; !(d = b.next()).done; )
701
- fe(d.value) && Ue(d.value, r);
699
+ var v = U(e);
700
+ if (typeof v == "function" && v !== e.entries)
701
+ for (var b = v.call(e), m; !(m = b.next()).done; )
702
+ ve(m.value) && He(m.value, n);
702
703
  }
703
704
  }
704
705
  }
705
- function Lt(e) {
706
+ function $t(e) {
706
707
  {
707
- var r = e.type;
708
- if (r == null || typeof r == "string")
708
+ var n = e.type;
709
+ if (n == null || typeof n == "string")
709
710
  return;
710
711
  var o;
711
- if (typeof r == "function")
712
- o = r.propTypes;
713
- else if (typeof r == "object" && (r.$$typeof === u || // Note: Memo only checks outer props here.
712
+ if (typeof n == "function")
713
+ o = n.propTypes;
714
+ else if (typeof n == "object" && (n.$$typeof === c || // Note: Memo only checks outer props here.
714
715
  // Inner props are checked in the reconciler.
715
- r.$$typeof === _))
716
- o = r.propTypes;
716
+ n.$$typeof === T))
717
+ o = n.propTypes;
717
718
  else
718
719
  return;
719
720
  if (o) {
720
- var s = A(r);
721
- St(o, e.props, "prop", s, e);
722
- } else if (r.PropTypes !== void 0 && !le) {
723
- le = !0;
724
- var p = A(r);
725
- w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", p || "Unknown");
721
+ var u = A(n);
722
+ Ct(o, e.props, "prop", u, e);
723
+ } else if (n.PropTypes !== void 0 && !pe) {
724
+ pe = !0;
725
+ var v = A(n);
726
+ _("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", v || "Unknown");
726
727
  }
727
- typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
728
+ typeof n.getDefaultProps == "function" && !n.getDefaultProps.isReactClassApproved && _("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
728
729
  }
729
730
  }
730
- function It(e) {
731
+ function Yt(e) {
731
732
  {
732
- for (var r = Object.keys(e.props), o = 0; o < r.length; o++) {
733
- var s = r[o];
734
- if (s !== "children" && s !== "key") {
735
- I(e), w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", s), I(null);
733
+ for (var n = Object.keys(e.props), o = 0; o < n.length; o++) {
734
+ var u = n[o];
735
+ if (u !== "children" && u !== "key") {
736
+ V(e), _("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", u), V(null);
736
737
  break;
737
738
  }
738
739
  }
739
- e.ref !== null && (I(e), w("Invalid attribute `ref` supplied to `React.Fragment`."), I(null));
740
+ e.ref !== null && (V(e), _("Invalid attribute `ref` supplied to `React.Fragment`."), V(null));
740
741
  }
741
742
  }
742
- function Ve(e, r, o, s, p, b) {
743
+ function qe(e, n, o, u, v, b) {
743
744
  {
744
- var d = mt(e);
745
- if (!d) {
746
- var f = "";
747
- (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (f += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
748
- var C = Ft(p);
749
- C ? f += C : f += Ie();
750
- var R;
751
- e === null ? R = "null" : se(e) ? R = "array" : e !== void 0 && e.$$typeof === n ? (R = "<" + (A(e.type) || "Unknown") + " />", f = " Did you accidentally export a JSX literal instead of a component?") : R = typeof e, w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", R, f);
745
+ var m = bt(e);
746
+ if (!m) {
747
+ var d = "";
748
+ (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (d += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
749
+ var C = Ut(v);
750
+ C ? d += C : d += Be();
751
+ var S;
752
+ e === null ? S = "null" : fe(e) ? S = "array" : e !== void 0 && e.$$typeof === r ? (S = "<" + (A(e.type) || "Unknown") + " />", d = " Did you accidentally export a JSX literal instead of a component?") : S = typeof e, _("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", S, d);
752
753
  }
753
- var S = Dt(e, r, o, p, b);
754
- if (S == null)
755
- return S;
756
- if (d) {
757
- var j = r.children;
758
- if (j !== void 0)
759
- if (s)
760
- if (se(j)) {
761
- for (var N = 0; N < j.length; N++)
762
- $e(j[N], e);
763
- Object.freeze && Object.freeze(j);
754
+ var R = It(e, n, o, v, b);
755
+ if (R == null)
756
+ return R;
757
+ if (m) {
758
+ var w = n.children;
759
+ if (w !== void 0)
760
+ if (u)
761
+ if (fe(w)) {
762
+ for (var $ = 0; $ < w.length; $++)
763
+ ze(w[$], e);
764
+ Object.freeze && Object.freeze(w);
764
765
  } else
765
- w("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
766
+ _("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
766
767
  else
767
- $e(j, e);
768
+ ze(w, e);
768
769
  }
769
- return e === c ? It(S) : Lt(S), S;
770
+ return e === s ? Yt(R) : $t(R), R;
770
771
  }
771
772
  }
772
- function Nt(e, r, o) {
773
- return Ve(e, r, o, !0);
773
+ function Bt(e, n, o) {
774
+ return qe(e, n, o, !0);
774
775
  }
775
- function Ut(e, r, o) {
776
- return Ve(e, r, o, !1);
776
+ function Wt(e, n, o) {
777
+ return qe(e, n, o, !1);
777
778
  }
778
- var $t = Ut, Vt = Nt;
779
- B.Fragment = c, B.jsx = $t, B.jsxs = Vt;
780
- }()), B;
779
+ var Ht = Wt, zt = Bt;
780
+ z.Fragment = s, z.jsx = Ht, z.jsxs = zt;
781
+ }()), z;
781
782
  }
782
- var W = {};
783
+ var q = {};
783
784
  /**
784
785
  * @license React
785
786
  * react-jsx-runtime.production.min.js
@@ -789,173 +790,143 @@ var W = {};
789
790
  * This source code is licensed under the MIT license found in the
790
791
  * LICENSE file in the root directory of this source tree.
791
792
  */
792
- var We;
793
- function Xt() {
794
- if (We)
795
- return W;
796
- We = 1;
797
- var t = Je, n = Symbol.for("react.element"), a = Symbol.for("react.fragment"), c = Object.prototype.hasOwnProperty, i = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, v = { key: !0, ref: !0, __self: !0, __source: !0 };
798
- function l(h, u, y) {
799
- var E, _ = {}, O = null, m = null;
800
- y !== void 0 && (O = "" + y), u.key !== void 0 && (O = "" + u.key), u.ref !== void 0 && (m = u.ref);
801
- for (E in u)
802
- c.call(u, E) && !v.hasOwnProperty(E) && (_[E] = u[E]);
803
- if (h && h.defaultProps)
804
- for (E in u = h.defaultProps, u)
805
- _[E] === void 0 && (_[E] = u[E]);
806
- return { $$typeof: n, type: h, key: O, ref: m, props: _, _owner: i.current };
793
+ var Ze;
794
+ function or() {
795
+ if (Ze)
796
+ return q;
797
+ Ze = 1;
798
+ var t = tt, r = Symbol.for("react.element"), a = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, i = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, f = { key: !0, ref: !0, __self: !0, __source: !0 };
799
+ function l(E, c, g) {
800
+ var h, T = {}, P = null, p = null;
801
+ g !== void 0 && (P = "" + g), c.key !== void 0 && (P = "" + c.key), c.ref !== void 0 && (p = c.ref);
802
+ for (h in c)
803
+ s.call(c, h) && !f.hasOwnProperty(h) && (T[h] = c[h]);
804
+ if (E && E.defaultProps)
805
+ for (h in c = E.defaultProps, c)
806
+ T[h] === void 0 && (T[h] = c[h]);
807
+ return { $$typeof: r, type: E, key: P, ref: p, props: T, _owner: i.current };
807
808
  }
808
- return W.Fragment = a, W.jsx = l, W.jsxs = l, W;
809
+ return q.Fragment = a, q.jsx = l, q.jsxs = l, q;
809
810
  }
810
- process.env.NODE_ENV === "production" ? me.exports = Xt() : me.exports = Kt();
811
- var z = me.exports;
812
- function Nr({
811
+ process.env.NODE_ENV === "production" ? be.exports = or() : be.exports = ar();
812
+ var K = be.exports;
813
+ function Zr({
813
814
  children: t,
814
- maps: n,
815
+ maps: r,
815
816
  externalSync: a
816
817
  }) {
817
- const [c, i] = Ke(Gt, {
818
- ...q.state,
819
- maps: n.reduce((m, g) => (m[g.id] = {
820
- ...g,
818
+ const [s, i] = rt(tr, {
819
+ ...Z.state,
820
+ maps: r.reduce((p, y) => (p[y.id] = {
821
+ ...y,
821
822
  isLoaded: !1
822
- }, m), q.state.maps)
823
- }), v = pe(
824
- n.reduce((m, g) => (m[g.id] = {
823
+ }, p), Z.state.maps)
824
+ }), f = se(
825
+ r.reduce((p, y) => (p[y.id] = {
825
826
  instanceRef: {
826
827
  current: null
827
828
  },
828
829
  overlayRef: {
829
830
  current: null
830
831
  }
831
- }, m), {})
832
+ }, p), {})
832
833
  ), l = M(
833
- (m, g, x) => {
834
- n[0].id === m && a?.({
835
- type: g,
836
- payload: x
834
+ (p, y, j) => {
835
+ r[0].id === p && a?.({
836
+ type: y,
837
+ payload: j
837
838
  });
838
839
  },
839
- [a, n]
840
- ), h = M(
841
- (m, g) => {
840
+ [a, r]
841
+ ), E = M(
842
+ (p, y) => {
842
843
  i({
843
- type: F.SetViewState,
844
+ type: L.SetViewState,
844
845
  payload: {
845
- id: g,
846
- viewState: m
846
+ id: y,
847
+ viewState: p
847
848
  }
848
- }), l(g, F.SetViewState, m);
849
+ }), l(y, L.SetViewState, p);
849
850
  },
850
851
  [i, l]
851
- ), u = M(
852
- ({ height: m, width: g }, x) => {
852
+ ), c = M(
853
+ ({ height: p, width: y }, j) => {
853
854
  i({
854
- type: F.SetResize,
855
+ type: L.SetResize,
855
856
  payload: {
856
- id: x,
857
- height: m,
858
- width: g
857
+ id: j,
858
+ height: p,
859
+ width: y
859
860
  }
860
- }), l(x, F.SetResize, { height: m, width: g });
861
+ }), l(j, L.SetResize, { height: p, width: y });
861
862
  },
862
863
  [i, l]
863
- ), y = M(
864
- (m, g) => {
864
+ ), g = M(
865
+ (p, y) => {
865
866
  i({
866
- type: F.SetBasemap,
867
+ type: L.SetBasemap,
867
868
  payload: {
868
- id: g,
869
- basemap: m
869
+ id: y,
870
+ basemap: p
870
871
  }
871
872
  });
872
873
  },
873
874
  [i]
874
- ), E = M(
875
- (m, g) => {
875
+ ), h = M(
876
+ (p, y) => {
876
877
  i({
877
- type: F.SetZoom,
878
+ type: L.SetZoom,
878
879
  payload: {
879
- id: g,
880
- zoom: m
880
+ id: y,
881
+ zoom: p
881
882
  }
882
883
  });
883
884
  },
884
885
  [i]
885
- ), _ = M(
886
- (m, g) => {
886
+ ), T = M(
887
+ (p, y) => {
887
888
  i({
888
- type: F.SetLoaded,
889
+ type: L.SetLoaded,
889
890
  payload: {
890
- id: g,
891
- value: m
891
+ id: y,
892
+ value: p
892
893
  }
893
894
  });
894
895
  },
895
896
  [i]
896
- ), O = pe({
897
- setViewState: h,
898
- setBasemap: y,
899
- setResize: u,
900
- setZoom: E,
901
- setLoaded: _
897
+ ), P = se({
898
+ setViewState: E,
899
+ setBasemap: g,
900
+ setResize: c,
901
+ setZoom: h,
902
+ setLoaded: T
902
903
  });
903
- return /* @__PURE__ */ z.jsx(tt.Provider, { value: O.current, children: /* @__PURE__ */ z.jsx(et.Provider, { value: v, children: /* @__PURE__ */ z.jsx(Qe.Provider, { value: c, children: t }) }) });
904
- }
905
- var ye = /* @__PURE__ */ ((t) => (t.kilometer = "kilometer", t.mile = "mile", t))(ye || {}), Qt = /* @__PURE__ */ ((t) => (t.kilometer = "kilometers", t.mile = "miles", t))(Qt || {}), G = /* @__PURE__ */ ((t) => (t.AddPosition = "addPosition", t.Finish = "finish", t))(G || {});
906
- class er extends Wt {
907
- handleClick(n, a) {
908
- super.handleClick(n, a), a.onEdit({
909
- // data is the same
910
- updatedData: a.data,
911
- editType: G.AddPosition,
912
- editContext: {
913
- distance: this._currentDistance
914
- }
915
- });
916
- }
917
- handleKeyUp(n, a) {
918
- if (this._isMeasuringSessionFinished)
919
- return;
920
- n.stopPropagation();
921
- const { key: c } = n, i = this.getClickSequence().length;
922
- switch (c) {
923
- case "Enter":
924
- case "Escape":
925
- this._isMeasuringSessionFinished = !0, i === 1 && (this.resetClickSequence(), this._currentTooltips = []), a.onUpdateCursor("cell"), a.onEdit({
926
- updatedData: a.data,
927
- editType: G.Finish,
928
- editContext: {
929
- finished: this._isMeasuringSessionFinished
930
- }
931
- });
932
- break;
933
- }
934
- }
904
+ return /* @__PURE__ */ K.jsx(it.Provider, { value: P.current, children: /* @__PURE__ */ K.jsx(ot.Provider, { value: f, children: /* @__PURE__ */ K.jsx(at.Provider, { value: s, children: t }) }) });
935
905
  }
936
- const He = [
906
+ var O = /* @__PURE__ */ ((t) => (t.milimeter = "milimeter", t.centimeter = "centimeter", t.meter = "meter", t.kilometer = "kilometer", t.mile = "mile", t.feet = "feet", t))(O || {}), ir = /* @__PURE__ */ ((t) => (t.kilometer = "kilometers", t.mile = "miles", t))(ir || {}), J = /* @__PURE__ */ ((t) => (t.AddPosition = "addPosition", t.Finish = "finish", t))(J || {});
907
+ const Je = [
937
908
  "anyclick",
938
909
  "pointermove",
939
910
  "panstart",
940
911
  "panmove",
941
912
  "panend",
942
913
  "keyup"
943
- ], tr = "mapMeasureLayer", rr = {
944
- mode: er,
945
- id: tr,
946
- pickable: !0,
914
+ ], sr = "mapMeasureLayer", cr = {
915
+ id: sr,
916
+ pickable: !1,
947
917
  billboard: !1,
948
918
  editHandlePointRadiusUnits: "pixels",
949
- editHandlePointStrokeWidth: 2,
950
919
  editHandlePointRadiusMinPixels: 1,
951
920
  editHandlePointRadiusMaxPixels: 12,
921
+ lineWidthMinPixels: 2,
922
+ editHandlePointStrokeWidth: 3,
952
923
  getEditHandlePointRadius: 3,
953
924
  _subLayerProps: {
954
925
  tooltips: {
955
926
  fontFamily: "Open Sans, Inter, sans-serif",
956
927
  fontWeight: "lighter",
957
- getSize: 13,
958
- lineHeight: 0.85,
928
+ getSize: 11,
929
+ lineHeight: 1.4545,
959
930
  getPixelOffset: [0, 20],
960
931
  getTextAnchor: "middle",
961
932
  getAlignmentBaseline: "center",
@@ -966,30 +937,92 @@ const He = [
966
937
  getLineWidth: 2
967
938
  }
968
939
  }
940
+ }, _e = {
941
+ editing: [71, 219, 153, 255],
942
+ finished: [49, 153, 107, 255]
943
+ }, ye = {
944
+ locale: "en",
945
+ getColumnName: "<b>Total distance</b> ",
946
+ styles: {
947
+ colors: {
948
+ editing: _e.editing,
949
+ finished: _e.finished
950
+ }
951
+ }
952
+ }, Xe = {
953
+ [O.kilometer]: "km",
954
+ [O.centimeter]: "cm",
955
+ [O.milimeter]: "mm",
956
+ [O.mile]: "mi",
957
+ [O.meter]: "m",
958
+ [O.feet]: "ft"
959
+ }, ur = {
960
+ [O.kilometer]: "kilometer",
961
+ [O.centimeter]: "centimeter",
962
+ [O.milimeter]: "millimeter",
963
+ [O.mile]: "mile",
964
+ [O.meter]: "meter",
965
+ [O.feet]: "foot"
969
966
  };
970
- class nr extends Bt {
967
+ class lr extends Kt {
971
968
  eventManager;
972
- constructor(n) {
973
- super(n), this.eventManager = n.eventManager;
969
+ constructor(r) {
970
+ super(r), this.eventManager = r.eventManager;
974
971
  }
975
972
  _addEventHandlers() {
976
- const n = this._getEventManager(), { eventHandler: a } = this.state._editableLayerState;
977
- for (const c of He)
978
- n.on(c, a, {
973
+ const r = this._getEventManager(), { eventHandler: a } = this.state._editableLayerState;
974
+ for (const s of Je)
975
+ r.on(s, a, {
979
976
  // give nebula a higher priority so that it can stop propagation to deck.gl's map panning handlers
980
977
  priority: 100
981
978
  });
982
979
  }
983
- _removeEventHandlers(n = void 0) {
984
- const a = n || this._getEventManager(), { eventHandler: c } = this.state._editableLayerState;
985
- for (const i of He)
986
- a.off(i, c);
980
+ _removeEventHandlers(r = void 0) {
981
+ const a = r || this._getEventManager(), { eventHandler: s } = this.state._editableLayerState;
982
+ for (const i of Je)
983
+ a.off(i, s);
987
984
  }
988
985
  _getEventManager() {
989
986
  return this.eventManager || this.context.deck.eventManager;
990
987
  }
991
988
  }
992
- const nt = {
989
+ class fr extends Zt {
990
+ handleClick(r, a) {
991
+ super.handleClick(r, a), a.onEdit({
992
+ // data is the same
993
+ updatedData: a.data,
994
+ editType: J.AddPosition,
995
+ editContext: {
996
+ distance: this._currentDistance
997
+ }
998
+ });
999
+ }
1000
+ handleKeyUp(r, a) {
1001
+ if (this._isMeasuringSessionFinished)
1002
+ return;
1003
+ r.stopPropagation();
1004
+ const { key: s } = r, i = this.getClickSequence().length;
1005
+ switch (s) {
1006
+ case "Enter":
1007
+ case "Escape":
1008
+ this._isMeasuringSessionFinished = !0, i === 1 && (this.resetClickSequence(), this._currentTooltips = []), a.onUpdateCursor("cell"), a.onEdit({
1009
+ updatedData: a.data,
1010
+ editType: J.Finish,
1011
+ editContext: {
1012
+ finished: this._isMeasuringSessionFinished
1013
+ }
1014
+ });
1015
+ break;
1016
+ }
1017
+ }
1018
+ }
1019
+ function dr(t) {
1020
+ return Ee[t]?.type;
1021
+ }
1022
+ function mr(t) {
1023
+ return dr(t) === nt.GoogleMaps;
1024
+ }
1025
+ const ct = {
993
1026
  NUMBER: {
994
1027
  style: "decimal",
995
1028
  maximumFractionDigits: 1,
@@ -1011,204 +1044,321 @@ const nt = {
1011
1044
  day: "2-digit"
1012
1045
  }
1013
1046
  };
1014
- function at(t, n, a) {
1015
- return Intl.NumberFormat(n, a).format(t);
1047
+ function ut(t, r, a) {
1048
+ return Intl.NumberFormat(r, a).format(t);
1016
1049
  }
1017
- function ot(t, n, a = {}) {
1018
- return at(t, n, { ...nt.NUMBER, ...a });
1050
+ function lt(t, r, a = {}) {
1051
+ return ut(t, r, { ...ct.NUMBER, ...a });
1019
1052
  }
1020
- function ar(t, n, a = {}) {
1021
- return at(t, n, { ...nt.CURRENCY, ...a });
1053
+ function pr(t, r, a = {}) {
1054
+ return ut(t, r, { ...ct.CURRENCY, ...a });
1022
1055
  }
1023
- var k = /* @__PURE__ */ ((t) => (t.CURRENCY = "CURRENCY", t.DEFAULT = "DEFAULT", t.NUMBER = "NUMBER", t))(k || {});
1024
- const ze = {
1025
- [k.CURRENCY]: {
1026
- type: k.CURRENCY,
1027
- format: (t, n) => ar(t, n)
1056
+ var N = /* @__PURE__ */ ((t) => (t.CURRENCY = "CURRENCY", t.DEFAULT = "DEFAULT", t.NUMBER = "NUMBER", t))(N || {});
1057
+ const Qe = {
1058
+ [N.CURRENCY]: {
1059
+ type: N.CURRENCY,
1060
+ format: (t, r) => pr(t, r)
1028
1061
  },
1029
- [k.NUMBER]: {
1030
- type: k.NUMBER,
1031
- format: (t, n) => ot(t, n)
1062
+ [N.NUMBER]: {
1063
+ type: N.NUMBER,
1064
+ format: (t, r) => lt(t, r)
1032
1065
  },
1033
- [k.DEFAULT]: {
1034
- type: k.DEFAULT,
1066
+ [N.DEFAULT]: {
1067
+ type: N.DEFAULT,
1035
1068
  format: (t) => t.toLocaleString()
1036
1069
  }
1037
1070
  };
1038
- function or({
1071
+ function vr({
1039
1072
  properties: t,
1040
- formatters: n = {},
1073
+ formatters: r = {},
1041
1074
  includeColumns: a = Object.keys(t),
1042
- locale: c = "en-US",
1075
+ locale: s = "en-US",
1043
1076
  showColumnName: i = !0,
1044
- title: v,
1045
- getColumnName: l = lr,
1046
- getFieldHtml: h = sr,
1047
- getTitle: u = ir,
1048
- getValue: y = ur
1077
+ title: f,
1078
+ getColumnName: l = br,
1079
+ getFieldHtml: E = yr,
1080
+ getTitle: c = gr,
1081
+ getValue: g = hr
1049
1082
  }) {
1050
- const E = v ? u(v) : "", O = a.reduce((m, g) => {
1051
- const x = n[g], T = t[g], P = y(T, c, x), w = i ? l(g) : "";
1052
- return m + h(w, P);
1083
+ const h = f ? c(f) : "", P = a.reduce((p, y) => {
1084
+ const j = r[y], U = t[y], x = g(U, s, j), _ = i ? l(y) : "";
1085
+ return p + E(_, x);
1053
1086
  }, "");
1054
- return E + O;
1087
+ return h + P;
1055
1088
  }
1056
- function ir(t) {
1089
+ function gr(t) {
1057
1090
  return `<h3 style="margin: 0"><strong>${t}</strong></h3></br>`;
1058
1091
  }
1059
- function sr(t, n) {
1060
- return `${t}${n}</br>`;
1092
+ function yr(t, r) {
1093
+ return `${t}${r}</br>`;
1061
1094
  }
1062
- function ur(t, n, a) {
1095
+ function hr(t, r, a) {
1063
1096
  try {
1064
- return cr(a)(t, n);
1097
+ return Er(a)(t, r);
1065
1098
  } catch {
1066
1099
  return t;
1067
1100
  }
1068
1101
  }
1069
- function cr(t) {
1070
- return typeof t == "function" ? t : (t && ze[t] || ze[k.DEFAULT]).format;
1102
+ function Er(t) {
1103
+ return typeof t == "function" ? t : (t && Qe[t] || Qe[N.DEFAULT]).format;
1071
1104
  }
1072
- function lr(t) {
1105
+ function br(t) {
1073
1106
  return `<strong>${t}</strong>: `;
1074
1107
  }
1075
- var fr = function(n) {
1076
- return dr(n) && !pr(n);
1108
+ var _r = function(r) {
1109
+ return Sr(r) && !Rr(r);
1077
1110
  };
1078
- function dr(t) {
1111
+ function Sr(t) {
1079
1112
  return !!t && typeof t == "object";
1080
1113
  }
1081
- function pr(t) {
1082
- var n = Object.prototype.toString.call(t);
1083
- return n === "[object RegExp]" || n === "[object Date]" || gr(t);
1114
+ function Rr(t) {
1115
+ var r = Object.prototype.toString.call(t);
1116
+ return r === "[object RegExp]" || r === "[object Date]" || Pr(t);
1084
1117
  }
1085
- var vr = typeof Symbol == "function" && Symbol.for, mr = vr ? Symbol.for("react.element") : 60103;
1086
- function gr(t) {
1087
- return t.$$typeof === mr;
1118
+ var Tr = typeof Symbol == "function" && Symbol.for, Mr = Tr ? Symbol.for("react.element") : 60103;
1119
+ function Pr(t) {
1120
+ return t.$$typeof === Mr;
1088
1121
  }
1089
- function yr(t) {
1122
+ function Cr(t) {
1090
1123
  return Array.isArray(t) ? [] : {};
1091
1124
  }
1092
- function Z(t, n) {
1093
- return n.clone !== !1 && n.isMergeableObject(t) ? U(yr(t), t, n) : t;
1125
+ function X(t, r) {
1126
+ return r.clone !== !1 && r.isMergeableObject(t) ? Y(Cr(t), t, r) : t;
1094
1127
  }
1095
- function Er(t, n, a) {
1096
- return t.concat(n).map(function(c) {
1097
- return Z(c, a);
1128
+ function Or(t, r, a) {
1129
+ return t.concat(r).map(function(s) {
1130
+ return X(s, a);
1098
1131
  });
1099
1132
  }
1100
- function br(t, n) {
1101
- if (!n.customMerge)
1102
- return U;
1103
- var a = n.customMerge(t);
1104
- return typeof a == "function" ? a : U;
1133
+ function wr(t, r) {
1134
+ if (!r.customMerge)
1135
+ return Y;
1136
+ var a = r.customMerge(t);
1137
+ return typeof a == "function" ? a : Y;
1105
1138
  }
1106
- function hr(t) {
1107
- return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(t).filter(function(n) {
1108
- return Object.propertyIsEnumerable.call(t, n);
1139
+ function jr(t) {
1140
+ return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(t).filter(function(r) {
1141
+ return Object.propertyIsEnumerable.call(t, r);
1109
1142
  }) : [];
1110
1143
  }
1111
- function qe(t) {
1112
- return Object.keys(t).concat(hr(t));
1144
+ function et(t) {
1145
+ return Object.keys(t).concat(jr(t));
1113
1146
  }
1114
- function it(t, n) {
1147
+ function ft(t, r) {
1115
1148
  try {
1116
- return n in t;
1149
+ return r in t;
1117
1150
  } catch {
1118
1151
  return !1;
1119
1152
  }
1120
1153
  }
1121
- function Rr(t, n) {
1122
- return it(t, n) && !(Object.hasOwnProperty.call(t, n) && Object.propertyIsEnumerable.call(t, n));
1154
+ function xr(t, r) {
1155
+ return ft(t, r) && !(Object.hasOwnProperty.call(t, r) && Object.propertyIsEnumerable.call(t, r));
1123
1156
  }
1124
- function Sr(t, n, a) {
1125
- var c = {};
1126
- return a.isMergeableObject(t) && qe(t).forEach(function(i) {
1127
- c[i] = Z(t[i], a);
1128
- }), qe(n).forEach(function(i) {
1129
- Rr(t, i) || (it(t, i) && a.isMergeableObject(n[i]) ? c[i] = br(i, a)(t[i], n[i], a) : c[i] = Z(n[i], a));
1130
- }), c;
1157
+ function Ar(t, r, a) {
1158
+ var s = {};
1159
+ return a.isMergeableObject(t) && et(t).forEach(function(i) {
1160
+ s[i] = X(t[i], a);
1161
+ }), et(r).forEach(function(i) {
1162
+ xr(t, i) || (ft(t, i) && a.isMergeableObject(r[i]) ? s[i] = wr(i, a)(t[i], r[i], a) : s[i] = X(r[i], a));
1163
+ }), s;
1131
1164
  }
1132
- function U(t, n, a) {
1133
- a = a || {}, a.arrayMerge = a.arrayMerge || Er, a.isMergeableObject = a.isMergeableObject || fr, a.cloneUnlessOtherwiseSpecified = Z;
1134
- var c = Array.isArray(n), i = Array.isArray(t), v = c === i;
1135
- return v ? c ? a.arrayMerge(t, n, a) : Sr(t, n, a) : Z(n, a);
1165
+ function Y(t, r, a) {
1166
+ a = a || {}, a.arrayMerge = a.arrayMerge || Or, a.isMergeableObject = a.isMergeableObject || _r, a.cloneUnlessOtherwiseSpecified = X;
1167
+ var s = Array.isArray(r), i = Array.isArray(t), f = s === i;
1168
+ return f ? s ? a.arrayMerge(t, r, a) : Ar(t, r, a) : X(r, a);
1136
1169
  }
1137
- U.all = function(n, a) {
1138
- if (!Array.isArray(n))
1170
+ Y.all = function(r, a) {
1171
+ if (!Array.isArray(r))
1139
1172
  throw new Error("first argument should be an array");
1140
- return n.reduce(function(c, i) {
1141
- return U(c, i, a);
1173
+ return r.reduce(function(s, i) {
1174
+ return Y(s, i, a);
1142
1175
  }, {});
1143
1176
  };
1144
- var _r = U, Tr = _r;
1145
- const Ge = /* @__PURE__ */ Jt(Tr), ne = () => {
1177
+ var Dr = Y, Fr = Dr;
1178
+ const he = /* @__PURE__ */ nr(Fr), ie = () => {
1146
1179
  throw new Error(
1147
1180
  "You forgot to wrap your component in <MeasurementToolsProvider>."
1148
1181
  );
1149
- }, Ee = {
1182
+ }, Re = {
1150
1183
  state: {
1151
1184
  enable: !1,
1152
1185
  finished: !0,
1153
1186
  distance: 0,
1154
- unit: ye.kilometer
1187
+ unit: O.kilometer
1155
1188
  },
1156
1189
  actions: {
1157
- setEnable: ne,
1158
- setFinished: ne,
1159
- setUnit: ne,
1160
- setDistance: ne
1190
+ setEnable: ie,
1191
+ setFinished: ie,
1192
+ setUnit: ie,
1193
+ setDistance: ie
1161
1194
  }
1162
- }, st = J(Ee.state), ut = J(Ee.actions);
1163
- function wr() {
1164
- return K(
1165
- st
1195
+ }, dt = Q(Re.state), mt = Q(Re.actions);
1196
+ function pt() {
1197
+ return ee(
1198
+ dt
1166
1199
  );
1167
1200
  }
1168
- function Mr() {
1169
- return K(
1170
- ut
1201
+ function vt() {
1202
+ return ee(
1203
+ mt
1171
1204
  );
1172
1205
  }
1173
- function Or(t, n) {
1174
- const a = n === ye.kilometer ? 1 : 0.621371;
1175
- return t * a;
1206
+ const kr = {
1207
+ nm: {
1208
+ name: {
1209
+ singular: "Nanometer",
1210
+ plural: "Nanometers"
1211
+ },
1212
+ to_anchor: 1e-9
1213
+ },
1214
+ μm: {
1215
+ name: {
1216
+ singular: "Micrometer",
1217
+ plural: "Micrometers"
1218
+ },
1219
+ to_anchor: 1e-6
1220
+ },
1221
+ mm: {
1222
+ name: {
1223
+ singular: "Millimeter",
1224
+ plural: "Millimeters"
1225
+ },
1226
+ to_anchor: 1e-3
1227
+ },
1228
+ cm: {
1229
+ name: {
1230
+ singular: "Centimeter",
1231
+ plural: "Centimeters"
1232
+ },
1233
+ to_anchor: 0.01
1234
+ },
1235
+ m: {
1236
+ name: {
1237
+ singular: "Meter",
1238
+ plural: "Meters"
1239
+ },
1240
+ to_anchor: 1
1241
+ },
1242
+ km: {
1243
+ name: {
1244
+ singular: "Kilometer",
1245
+ plural: "Kilometers"
1246
+ },
1247
+ to_anchor: 1e3
1248
+ }
1249
+ }, Lr = {
1250
+ mil: {
1251
+ name: {
1252
+ singular: "Mil",
1253
+ plural: "Mils"
1254
+ },
1255
+ to_anchor: 1 / 12e3
1256
+ },
1257
+ in: {
1258
+ name: {
1259
+ singular: "Inch",
1260
+ plural: "Inches"
1261
+ },
1262
+ to_anchor: 1 / 12
1263
+ },
1264
+ yd: {
1265
+ name: {
1266
+ singular: "Yard",
1267
+ plural: "Yards"
1268
+ },
1269
+ to_anchor: 3
1270
+ },
1271
+ "ft-us": {
1272
+ name: {
1273
+ singular: "US Survey Foot",
1274
+ plural: "US Survey Feet"
1275
+ },
1276
+ to_anchor: 1.000002
1277
+ },
1278
+ ft: {
1279
+ name: {
1280
+ singular: "Foot",
1281
+ plural: "Feet"
1282
+ },
1283
+ to_anchor: 1
1284
+ },
1285
+ fathom: {
1286
+ name: {
1287
+ singular: "Fathom",
1288
+ plural: "Fathoms"
1289
+ },
1290
+ to_anchor: 6
1291
+ },
1292
+ mi: {
1293
+ name: {
1294
+ singular: "Mile",
1295
+ plural: "Miles"
1296
+ },
1297
+ to_anchor: 5280
1298
+ },
1299
+ nMi: {
1300
+ name: {
1301
+ singular: "Nautical Mile",
1302
+ plural: "Nautical Miles"
1303
+ },
1304
+ to_anchor: 6076.12
1305
+ }
1306
+ }, Nr = {
1307
+ systems: {
1308
+ metric: kr,
1309
+ imperial: Lr
1310
+ },
1311
+ anchors: {
1312
+ metric: {
1313
+ imperial: {
1314
+ ratio: 3.28084
1315
+ }
1316
+ },
1317
+ imperial: {
1318
+ metric: {
1319
+ ratio: 1 / 3.28084
1320
+ }
1321
+ }
1322
+ }
1323
+ }, Ir = Xt({
1324
+ length: Nr
1325
+ });
1326
+ function Ur(t, r) {
1327
+ return Ir(t).from(Xe[O.kilometer]).to(Xe[r]);
1176
1328
  }
1177
- function Ze({
1329
+ function gt({
1178
1330
  text: t,
1179
- unit: n,
1331
+ unit: r,
1180
1332
  locale: a
1181
1333
  }) {
1182
- return `${ot(Or(t, n), a, {
1334
+ return `${lt(Ur(t, r), a, {
1183
1335
  style: "unit",
1184
- unit: n
1336
+ unit: ur[r]
1185
1337
  })}`;
1186
1338
  }
1187
- function Pr(t) {
1188
- return ve[t]?.type;
1189
- }
1190
- function Cr(t) {
1191
- return Pr(t) === Xe.GoogleMaps;
1192
- }
1193
- function Ur({
1339
+ function Jr({
1194
1340
  mapId: t,
1195
- defaultProps: { locale: n = "en", getColumnName: a } = {
1196
- getColumnName: "<b>Total distance</b> "
1341
+ defaultProps: {
1342
+ locale: r = ye.locale,
1343
+ getColumnName: a,
1344
+ styles: s = ye.styles
1345
+ } = {
1346
+ getColumnName: ye.getColumnName
1197
1347
  },
1198
- layerProps: c = {}
1348
+ layerProps: i = {}
1199
1349
  }) {
1200
- const { distance: i, enable: v, unit: l } = wr(), { setDistance: h, setFinished: u } = Mr(), { isLoaded: y, basemap: E } = rt(t), { getOverlayInstance: _ } = ge(t), O = Yt(() => {
1201
- if (!y || !Cr(E))
1350
+ const { enable: f, unit: l, finished: E } = pt(), { setDistance: c, setFinished: g } = vt(), { isLoaded: h, basemap: T } = st(t), { getOverlayInstance: P } = Se(t), p = se(), y = qt(() => {
1351
+ if (!h || !mr(T))
1202
1352
  return null;
1203
- const T = _()?.getDiv();
1204
- return new Ht(T, {});
1205
- }, [y, _, E]), m = M(
1206
- (T, P) => {
1207
- T.html = or({
1353
+ const F = P()?.getDiv();
1354
+ return new Jt(F, {});
1355
+ }, [h, P, T]), j = E ? s.colors?.finished : s.colors?.editing, U = M(
1356
+ (F, k) => {
1357
+ F.html = vr({
1208
1358
  properties: {
1209
- distance: Ze({
1210
- text: P.distance,
1211
- locale: P.locale,
1359
+ distance: gt({
1360
+ text: k.distance,
1361
+ locale: k.locale,
1212
1362
  unit: l
1213
1363
  })
1214
1364
  },
@@ -1216,34 +1366,71 @@ function Ur({
1216
1366
  });
1217
1367
  },
1218
1368
  [a, l]
1369
+ ), x = M(
1370
+ ({ editType: F, editContext: k }) => {
1371
+ F === J.AddPosition ? c(k.distance) : F === J.Finish && g(k.finished);
1372
+ },
1373
+ [c, g]
1219
1374
  );
1220
- if (!v || !y)
1375
+ if (Gt(() => {
1376
+ f || (p.current = void 0);
1377
+ }, [f]), !f || !h)
1221
1378
  return null;
1222
- const g = Ge(c, {
1379
+ const _ = Vr(
1380
+ i,
1381
+ r,
1382
+ l,
1383
+ U,
1384
+ x,
1385
+ j || _e.guide
1386
+ );
1387
+ return !p.current && !_.mode && (p.current = new fr()), new lr({
1388
+ ..._,
1389
+ mode: _?.mode || p.current,
1390
+ eventManager: y
1391
+ });
1392
+ }
1393
+ function Vr(t, r, a, s, i, f) {
1394
+ const l = he(t, {
1223
1395
  modeConfig: {
1224
1396
  // We force distance due to conversion is addressed at feature getText level
1225
- formatTooltip: (T) => T
1226
- },
1227
- onHover: (T) => (c?.onHover || m)(T, { distance: i, locale: n, unit: l }),
1228
- onEdit: ({ editType: T, editContext: P }) => {
1229
- T === G.AddPosition && h(P.distance), T === G.Finish && u(!0);
1397
+ formatTooltip: (g) => g
1230
1398
  },
1399
+ onHover: s,
1400
+ onEdit: i,
1231
1401
  _subLayerProps: {
1232
1402
  tooltips: {
1233
- getText: (T) => Ze({ ...T, locale: n, unit: l }),
1403
+ getText: (g) => gt({ ...g, locale: r, unit: a }),
1234
1404
  updateTriggers: {
1235
- getText: [l, n]
1405
+ getText: [a, r]
1236
1406
  }
1237
1407
  }
1238
1408
  }
1239
- }), x = Ge(rr, g);
1240
- return new nr({
1241
- ...x,
1242
- eventManager: O
1409
+ }), E = he(cr, {
1410
+ _subLayerProps: {
1411
+ guides: {
1412
+ getLineColor: f,
1413
+ getFillColor: f
1414
+ }
1415
+ },
1416
+ getEditHandlePointColor: f,
1417
+ getEditHandlePointOutlineColor: f
1418
+ });
1419
+ return he(E, l);
1420
+ }
1421
+ function Xr({ children: t }) {
1422
+ const { distance: r, enable: a, unit: s } = pt(), { setDistance: i, setEnable: f } = vt();
1423
+ return t({
1424
+ enable: a,
1425
+ distance: r,
1426
+ unit: s,
1427
+ onToggleButton: () => {
1428
+ i(0), f(!a);
1429
+ }
1243
1430
  });
1244
1431
  }
1245
- var H = /* @__PURE__ */ ((t) => (t.SetEnable = "SET_ENABLE", t.SetFinished = "SET_FINISHED", t.SetDistance = "SET_DISTANCE", t.SetUnit = "SET_UNIT", t))(H || {});
1246
- function jr(t, { type: n, payload: a }) {
1432
+ var G = /* @__PURE__ */ ((t) => (t.SetEnable = "SET_ENABLE", t.SetFinished = "SET_FINISHED", t.SetDistance = "SET_DISTANCE", t.SetUnit = "SET_UNIT", t))(G || {});
1433
+ function $r(t, { type: r, payload: a }) {
1247
1434
  return {
1248
1435
  SET_ENABLE: () => ({
1249
1436
  ...t,
@@ -1262,74 +1449,79 @@ function jr(t, { type: n, payload: a }) {
1262
1449
  ...t,
1263
1450
  unit: a
1264
1451
  })
1265
- }[n]?.() ?? t;
1452
+ }[r]?.() ?? t;
1266
1453
  }
1267
- function $r({
1454
+ function Qr({
1268
1455
  children: t
1269
1456
  }) {
1270
- const [n, a] = Ke(jr, Ee.state), c = M(
1271
- (u) => {
1272
- a({ type: H.SetEnable, payload: u });
1457
+ const [r, a] = rt($r, Re.state), s = M(
1458
+ (c) => {
1459
+ a({ type: G.SetEnable, payload: c });
1273
1460
  },
1274
1461
  [a]
1275
1462
  ), i = M(
1276
- (u) => {
1277
- a({ type: H.SetFinished, payload: u });
1463
+ (c) => {
1464
+ a({ type: G.SetFinished, payload: c });
1278
1465
  },
1279
1466
  [a]
1280
- ), v = M(
1281
- (u) => {
1282
- a({ type: H.SetDistance, payload: u });
1467
+ ), f = M(
1468
+ (c) => {
1469
+ a({ type: G.SetDistance, payload: c });
1283
1470
  },
1284
1471
  [a]
1285
1472
  ), l = M(
1286
- (u) => {
1287
- a({ type: H.SetUnit, payload: u });
1473
+ (c) => {
1474
+ a({ type: G.SetUnit, payload: c });
1288
1475
  },
1289
1476
  [a]
1290
- ), h = pe({
1291
- setEnable: c,
1477
+ ), E = se({
1478
+ setEnable: s,
1292
1479
  setFinished: i,
1293
- setDistance: v,
1480
+ setDistance: f,
1294
1481
  setUnit: l
1295
1482
  });
1296
- return /* @__PURE__ */ z.jsx(ut.Provider, { value: h.current, children: /* @__PURE__ */ z.jsx(st.Provider, { value: n, children: t }) });
1483
+ return /* @__PURE__ */ K.jsx(mt.Provider, { value: E.current, children: /* @__PURE__ */ K.jsx(dt.Provider, { value: r, children: t }) });
1297
1484
  }
1298
1485
  export {
1299
- de as CartoBasemapURL,
1300
- qt as CartoBasemapsNames,
1301
- nr as CustomEditableGeojsonLayer,
1302
- er as CustomMeasureDistanceMode,
1303
- rr as DEFAULT_LAYER_PROPS,
1304
- He as EVENT_MANAGER_EVENT_TYPES,
1305
- G as EditType,
1306
- k as FormatterTypes,
1307
- zt as GMapsBasemap,
1308
- ve as MAPS_BASEMAP,
1309
- tr as MAP_MEASURE_LAYER_ID,
1310
- F as MapActions,
1311
- tt as MapActionsContext,
1312
- Qe as MapContext,
1313
- Ur as MapMeasurementToolsLayer,
1314
- $r as MapMeasurementToolsProvider,
1315
- ye as MapMeasurementUnit,
1316
- Qt as MapMeasurementUnitTurf,
1317
- Nr as MapProvider,
1318
- et as MapReferencesContext,
1319
- Xe as MapsTypes,
1320
- Or as convertKmTo,
1321
- Pr as getMapType,
1322
- Ze as getTextLayerFormattedDistance,
1323
- Cr as isGmaps,
1324
- or as objectToHtml,
1325
- Gt as reducer,
1326
- rt as useMap,
1327
- Zt as useMapActions,
1328
- Ir as useMapActionsByID,
1329
- kr as useMapByID,
1330
- wr as useMapMeasurementTools,
1331
- Mr as useMapMeasurementToolsActions,
1332
- ge as useMapRefences,
1333
- ge as useMapReferences,
1334
- Lr as useMapReferencesByID
1486
+ Xe as CONVERSIONS_UNITS,
1487
+ ge as CartoBasemapURL,
1488
+ er as CartoBasemapsNames,
1489
+ lr as CustomEditableGeojsonLayer,
1490
+ fr as CustomMeasureDistanceMode,
1491
+ _e as DEFAULT_COLORS,
1492
+ cr as DEFAULT_LAYER_PROPS,
1493
+ ye as DEFAULT_PROPS,
1494
+ Je as EVENT_MANAGER_EVENT_TYPES,
1495
+ J as EditType,
1496
+ N as FormatterTypes,
1497
+ Qt as GMapsBasemap,
1498
+ ur as INTL_UNITS,
1499
+ Ee as MAPS_BASEMAP,
1500
+ sr as MAP_MEASURE_LAYER_ID,
1501
+ L as MapActions,
1502
+ it as MapActionsContext,
1503
+ at as MapContext,
1504
+ Xr as MapMeasurementTools,
1505
+ Jr as MapMeasurementToolsLayer,
1506
+ Qr as MapMeasurementToolsProvider,
1507
+ O as MapMeasurementUnit,
1508
+ ir as MapMeasurementUnitTurf,
1509
+ Zr as MapProvider,
1510
+ ot as MapReferencesContext,
1511
+ nt as MapsTypes,
1512
+ Ur as convertKmTo,
1513
+ dr as getMapType,
1514
+ gt as getTextLayerFormattedDistance,
1515
+ mr as isGmaps,
1516
+ vr as objectToHtml,
1517
+ tr as reducer,
1518
+ st as useMap,
1519
+ rr as useMapActions,
1520
+ Kr as useMapActionsByID,
1521
+ qr as useMapByID,
1522
+ pt as useMapMeasurementTools,
1523
+ vt as useMapMeasurementToolsActions,
1524
+ Se as useMapRefences,
1525
+ Se as useMapReferences,
1526
+ Gr as useMapReferencesByID
1335
1527
  };