@carto/ps-react-maps 1.3.3-alpha.1 → 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 w, useReducer as Ke, useRef as pe, useMemo as Wt } from "react";
2
- import { EditableGeoJsonLayer as Ht } from "@nebula.gl/layers";
3
- import { MeasureDistanceMode as zt } from "@nebula.gl/edit-modes";
4
- import { EventManager as qt } from "mjolnir.js";
5
- var Gt = /* @__PURE__ */ ((t) => (t.Roadmap = "roadmap", t.Satellite = "satellite", t.Hybrid = "hybrid", t))(Gt || {}), Zt = /* @__PURE__ */ ((t) => (t.DarkMatter = "dark-matter", t.Positron = "positron", t.Voyager = "voyager", t))(Zt || {});
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 Jt(t, { type: r, 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: p } = 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: p
74
+ viewState: f
74
75
  }, {
75
76
  ...t,
76
77
  maps: l
77
78
  };
78
79
  },
79
80
  SetResize: () => {
80
- const { id: i, width: p, 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: p,
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: p } = a, l = { ...t.maps }, { basemap: h } = l[i], c = ve[h]?.type, y = ve[p]?.type, b = c === 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: p,
98
- isLoaded: b
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: p } = 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: p
111
+ zoom: f
111
112
  }
112
113
  }, {
113
114
  ...t,
@@ -115,10 +116,10 @@ function Jt(t, { type: r, payload: a }) {
115
116
  };
116
117
  },
117
118
  SetLoaded: () => {
118
- const { id: i, value: p } = 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: p
122
+ isLoaded: f
122
123
  }, {
123
124
  ...t,
124
125
  maps: l
@@ -126,63 +127,63 @@ function Jt(t, { type: r, payload: a }) {
126
127
  }
127
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 r = K(et), { instanceRef: a, overlayRef: s } = r.current[t], i = w(() => {
134
- const y = a?.current;
135
- return y?.deck || y?._deck;
136
- }, [a]), p = w(() => s?.current, [s]), l = w(() => i()._getViewState(), [i]), h = w(
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
- ), c = w(
140
- (y = 0, b) => h(b)?.[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
146
  overlayRef: s,
146
147
  getDeckInstance: i,
147
- getOverlayInstance: p,
148
+ getOverlayInstance: f,
148
149
  getViewState: l,
149
150
  getViewport: c,
150
- getViewports: h
151
+ getViewports: E
151
152
  };
152
153
  }
153
- function Kt(t) {
154
- const { setBasemap: r, setResize: a, setViewState: s, setZoom: i, setLoaded: p } = 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
157
  setBasemap: (c) => r(c, t),
157
158
  setResize: (c) => a(c, t),
158
159
  setViewState: (c) => s(c, t),
159
160
  setZoom: (c) => i(c, t),
160
- setLoaded: (c) => p(c, t),
161
+ setLoaded: (c) => f(c, t),
161
162
  fitBounds: (c, {
162
- boundsOptions: y,
163
- viewStateOptions: b
163
+ boundsOptions: g,
164
+ viewStateOptions: h
164
165
  } = {}) => {
165
- const _ = l(), { latitude: O, longitude: m, zoom: g } = _.fitBounds(
166
+ const T = l(), { latitude: P, longitude: p, zoom: y } = T.fitBounds(
166
167
  c,
167
- y
168
+ g
168
169
  );
169
- s({ ...b, 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 Kt(t);
180
+ function Kr(t) {
181
+ return rr(t);
181
182
  }
182
- function Xt(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,57 +193,57 @@ 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 Qt() {
197
- return Be || (Be = 1, process.env.NODE_ENV !== "production" && function() {
198
- var t = Je, r = Symbol.for("react.element"), a = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), p = Symbol.for("react.profiler"), l = Symbol.for("react.provider"), h = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), y = Symbol.for("react.suspense"), b = 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 n = g && e[g] || e[x];
203
+ var n = y && e[y] || e[j];
203
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 M(e) {
206
+ var x = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
207
+ function _(e) {
207
208
  {
208
209
  for (var n = arguments.length, o = new Array(n > 1 ? n - 1 : 0), u = 1; u < n; u++)
209
210
  o[u - 1] = arguments[u];
210
- ft("error", e, o);
211
+ Te("error", e, o);
211
212
  }
212
213
  }
213
- function ft(e, n, o) {
214
+ function Te(e, n, o) {
214
215
  {
215
- var u = P.ReactDebugCurrentFrame, v = u.getStackAddendum();
216
+ var u = x.ReactDebugCurrentFrame, v = u.getStackAddendum();
216
217
  v !== "" && (n += "%s", o = o.concat([v]));
217
- var E = o.map(function(d) {
218
- return String(d);
218
+ var b = o.map(function(m) {
219
+ return String(m);
219
220
  });
220
- E.unshift("Warning: " + n), Function.prototype.apply.call(console[e], console, E);
221
+ b.unshift("Warning: " + n), Function.prototype.apply.call(console[e], console, b);
221
222
  }
222
223
  }
223
- var dt = !1, pt = !1, vt = !1, mt = !1, gt = !1, Ee;
224
- Ee = Symbol.for("react.module.reference");
225
- function yt(e) {
226
- return !!(typeof e == "string" || typeof e == "function" || e === s || e === p || gt || e === i || e === y || e === b || mt || e === m || dt || pt || vt || typeof e == "object" && e !== null && (e.$$typeof === O || e.$$typeof === _ || e.$$typeof === l || e.$$typeof === h || e.$$typeof === c || // 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 === Ee || e.getModuleId !== void 0));
231
+ e.$$typeof === Me || e.getModuleId !== void 0));
231
232
  }
232
- function bt(e, n, o) {
233
+ function _t(e, n, o) {
233
234
  var u = e.displayName;
234
235
  if (u)
235
236
  return u;
236
237
  var v = n.displayName || n.name || "";
237
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" && M("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;
@@ -251,32 +252,32 @@ function Qt() {
251
252
  return "Fragment";
252
253
  case a:
253
254
  return "Portal";
254
- case p:
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 b:
261
+ case h:
261
262
  return "SuspenseList";
262
263
  }
263
264
  if (typeof e == "object")
264
265
  switch (e.$$typeof) {
265
- case h:
266
+ case E:
266
267
  var n = e;
267
- return he(n) + ".Consumer";
268
+ return Pe(n) + ".Consumer";
268
269
  case l:
269
270
  var o = e;
270
- return he(o._context) + ".Provider";
271
+ return Pe(o._context) + ".Provider";
271
272
  case c:
272
- return bt(e, e.render, "ForwardRef");
273
- case _:
273
+ return _t(e, e.render, "ForwardRef");
274
+ case T:
274
275
  var u = e.displayName || null;
275
276
  return u !== null ? u : A(e.type) || "Memo";
276
- case O: {
277
- var v = e, E = v._payload, d = v._init;
277
+ case P: {
278
+ var v = e, b = v._payload, m = v._init;
278
279
  try {
279
- return A(d(E));
280
+ return A(m(b));
280
281
  } catch {
281
282
  return null;
282
283
  }
@@ -284,18 +285,18 @@ function Qt() {
284
285
  }
285
286
  return null;
286
287
  }
287
- var L = Object.assign, $ = 0, Re, Se, _e, Te, Me, we, 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 Et() {
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, Me = console.group, we = 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,100 +309,100 @@ function Qt() {
308
309
  groupEnd: e
309
310
  });
310
311
  }
311
- $++;
312
+ B++;
312
313
  }
313
314
  }
314
- function ht() {
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: Me
336
+ group: I({}, e, {
337
+ value: xe
337
338
  }),
338
- groupCollapsed: L({}, e, {
339
- value: we
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 && M("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, n, 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
356
  } catch (v) {
356
357
  var u = v.stack.trim().match(/\n( *(at )?)/);
357
- oe = u && u[1] || "";
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 Rt = typeof WeakMap == "function" ? WeakMap : Map;
366
- Q = new Rt();
366
+ var Tt = typeof WeakMap == "function" ? WeakMap : Map;
367
+ re = new Tt();
367
368
  }
368
- function Ce(e, n) {
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
377
  var u;
377
- ie = !0;
378
+ le = !0;
378
379
  var v = Error.prepareStackTrace;
379
380
  Error.prepareStackTrace = void 0;
380
- var E;
381
- E = ae.current, ae.current = null, Et();
381
+ var b;
382
+ b = ce.current, ce.current = null, St();
382
383
  try {
383
384
  if (n) {
384
- var d = function() {
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
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
403
  u = D;
403
404
  }
404
- e.call(d.prototype);
405
+ e.call(m.prototype);
405
406
  }
406
407
  } else {
407
408
  try {
@@ -413,95 +414,95 @@ function Qt() {
413
414
  }
414
415
  } catch (D) {
415
416
  if (D && u && typeof D.stack == "string") {
416
- for (var f = D.stack.split(`
417
+ for (var d = D.stack.split(`
417
418
  `), C = u.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)
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 = E, ht(), Error.prepareStackTrace = v;
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 St(e, n, o) {
440
- return Ce(e, !1);
440
+ function Mt(e, n, o) {
441
+ return ke(e, !1);
441
442
  }
442
- function _t(e) {
443
+ function Pt(e) {
443
444
  var n = e.prototype;
444
445
  return !!(n && n.isReactComponent);
445
446
  }
446
- function ee(e, n, 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, _t(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 b:
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
462
  case c:
462
- return St(e.render);
463
- case _:
464
- return ee(e.type, n, o);
465
- case O: {
466
- var u = e, v = u._payload, E = u._init;
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(E(v), n, 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 n = e._owner, o = ee(e.type, e._source, n ? n.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 Tt(e, n, o, u, v) {
484
+ function Ct(e, n, o, u, v) {
484
485
  {
485
- var E = Function.call.bind(te);
486
- for (var d in e)
487
- if (E(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((u || "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](n, d, u, 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(v), M("%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, d, typeof f), re(null)), f instanceof Error && !(f.message in je) && (je[f.message] = !0, re(v), M("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 Mt = Array.isArray;
503
- function se(e) {
504
- return Mt(e);
503
+ var Ot = Array.isArray;
504
+ function fe(e) {
505
+ return Ot(e);
505
506
  }
506
507
  function wt(e) {
507
508
  {
@@ -509,53 +510,53 @@ function Qt() {
509
510
  return o;
510
511
  }
511
512
  }
512
- function Ot(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 (Ot(e))
524
- return M("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", wt(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, Pt = {
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 Ct(e) {
534
- if (te.call(e, "ref")) {
532
+ }, Ve, $e, de;
533
+ de = {};
534
+ function At(e) {
535
+ if (ae.call(e, "ref")) {
535
536
  var n = Object.getOwnPropertyDescriptor(e, "ref").get;
536
537
  if (n && n.isReactWarning)
537
538
  return !1;
538
539
  }
539
540
  return e.ref !== void 0;
540
541
  }
541
- function jt(e) {
542
- if (te.call(e, "key")) {
542
+ function Dt(e) {
543
+ if (ae.call(e, "key")) {
543
544
  var n = Object.getOwnPropertyDescriptor(e, "key").get;
544
545
  if (n && n.isReactWarning)
545
546
  return !1;
546
547
  }
547
548
  return e.key !== void 0;
548
549
  }
549
- function xt(e, n) {
550
- if (typeof e.ref == "string" && V.current && n && V.current.stateNode !== n) {
551
- var o = A(V.current.type);
552
- ue[o] || (M('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 At(e, n) {
556
+ function kt(e, n) {
556
557
  {
557
558
  var o = function() {
558
- Fe || (Fe = !0, M("%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
+ 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 Qt() {
563
564
  });
564
565
  }
565
566
  }
566
- function Dt(e, n) {
567
+ function Lt(e, n) {
567
568
  {
568
569
  var o = function() {
569
- ke || (ke = !0, M("%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
+ $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 Qt() {
574
575
  });
575
576
  }
576
577
  }
577
- var Ft = function(e, n, o, u, v, E, 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
581
  $$typeof: r,
581
582
  // Built-in properties that belong on the element
582
583
  type: e,
583
584
  key: n,
584
585
  ref: o,
585
- props: d,
586
+ props: m,
586
587
  // Record the component responsible for creating this element.
587
- _owner: E
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
599
  value: u
599
- }), Object.defineProperty(f, "_source", {
600
+ }), Object.defineProperty(d, "_source", {
600
601
  configurable: !1,
601
602
  enumerable: !1,
602
603
  writable: !1,
603
604
  value: v
604
- }), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
605
+ }), Object.freeze && (Object.freeze(d.props), Object.freeze(d)), d;
605
606
  };
606
- function kt(e, n, o, u, v) {
607
+ function It(e, n, o, u, v) {
607
608
  {
608
- var E, d = {}, f = null, C = null;
609
- o !== void 0 && (De(o), f = "" + o), jt(n) && (De(n.key), f = "" + n.key), Ct(n) && (C = n.ref, xt(n, v));
610
- for (E in n)
611
- te.call(n, E) && !Pt.hasOwnProperty(E) && (d[E] = n[E]);
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 (E in R)
615
- d[E] === void 0 && (d[E] = R[E]);
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 && At(d, S), C && Dt(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 Ft(e, f, C, v, u, 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 n = e._owner, o = ee(e.type, e._source, n ? n.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) {
633
+ var pe;
634
+ pe = !1;
635
+ function ve(e) {
635
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,7 +647,7 @@ Check the render method of \`` + e + "`.";
646
647
  return "";
647
648
  }
648
649
  }
649
- function Lt(e) {
650
+ function Ut(e) {
650
651
  {
651
652
  if (e !== void 0) {
652
653
  var n = e.fileName.replace(/^.*[\\\/]/, ""), o = e.lineNumber;
@@ -657,10 +658,10 @@ Check your code at ` + n + ":" + o + ".";
657
658
  return "";
658
659
  }
659
660
  }
660
- var Ne = {};
661
- function It(e) {
661
+ var We = {};
662
+ function Vt(e) {
662
663
  {
663
- var n = Ie();
664
+ var n = Be();
664
665
  if (!n) {
665
666
  var o = typeof e == "string" ? e : e.displayName || e.name;
666
667
  o && (n = `
@@ -670,39 +671,39 @@ Check the top-level render call using <` + o + ">.");
670
671
  return n;
671
672
  }
672
673
  }
673
- function Ue(e, n) {
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 = It(n);
679
- if (Ne[o])
679
+ var o = Vt(n);
680
+ if (We[o])
680
681
  return;
681
- Ne[o] = !0;
682
+ We[o] = !0;
682
683
  var u = "";
683
- e && e._owner && e._owner !== ce.current && (u = " It was passed a child from " + A(e._owner.type) + "."), I(e), M('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), I(null);
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, n) {
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
693
  var u = e[o];
693
- fe(u) && Ue(u, n);
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 v = T(e);
699
+ var v = U(e);
699
700
  if (typeof v == "function" && v !== e.entries)
700
- for (var E = v.call(e), d; !(d = E.next()).done; )
701
- fe(d.value) && Ue(d.value, n);
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 Nt(e) {
706
+ function $t(e) {
706
707
  {
707
708
  var n = e.type;
708
709
  if (n == null || typeof n == "string")
@@ -712,74 +713,74 @@ Check the top-level render call using <` + o + ">.");
712
713
  o = n.propTypes;
713
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
- n.$$typeof === _))
716
+ n.$$typeof === T))
716
717
  o = n.propTypes;
717
718
  else
718
719
  return;
719
720
  if (o) {
720
721
  var u = A(n);
721
- Tt(o, e.props, "prop", u, e);
722
- } else if (n.PropTypes !== void 0 && !le) {
723
- le = !0;
722
+ Ct(o, e.props, "prop", u, e);
723
+ } else if (n.PropTypes !== void 0 && !pe) {
724
+ pe = !0;
724
725
  var v = A(n);
725
- M("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", v || "Unknown");
726
+ _("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", v || "Unknown");
726
727
  }
727
- typeof n.getDefaultProps == "function" && !n.getDefaultProps.isReactClassApproved && M("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 Ut(e) {
731
+ function Yt(e) {
731
732
  {
732
733
  for (var n = Object.keys(e.props), o = 0; o < n.length; o++) {
733
734
  var u = n[o];
734
735
  if (u !== "children" && u !== "key") {
735
- I(e), M("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", u), I(null);
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), M("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, n, o, u, v, E) {
743
+ function qe(e, n, o, u, v, b) {
743
744
  {
744
- var d = yt(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 = Lt(v);
749
- C ? f += C : f += Ie();
750
- var R;
751
- e === null ? R = "null" : se(e) ? R = "array" : e !== void 0 && e.$$typeof === r ? (R = "<" + (A(e.type) || "Unknown") + " />", f = " Did you accidentally export a JSX literal instead of a component?") : R = typeof e, M("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 = kt(e, n, o, v, E);
754
- if (S == null)
755
- return S;
756
- if (d) {
757
- var j = n.children;
758
- if (j !== void 0)
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)
759
760
  if (u)
760
- if (se(j)) {
761
- for (var N = 0; N < j.length; N++)
762
- $e(j[N], e);
763
- Object.freeze && Object.freeze(j);
761
+ if (fe(w)) {
762
+ for (var $ = 0; $ < w.length; $++)
763
+ ze(w[$], e);
764
+ Object.freeze && Object.freeze(w);
764
765
  } else
765
- M("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 === s ? Ut(S) : Nt(S), S;
770
+ return e === s ? Yt(R) : $t(R), R;
770
771
  }
771
772
  }
772
- function $t(e, n, o) {
773
- return Ve(e, n, o, !0);
773
+ function Bt(e, n, o) {
774
+ return qe(e, n, o, !0);
774
775
  }
775
- function Vt(e, n, o) {
776
- return Ve(e, n, o, !1);
776
+ function Wt(e, n, o) {
777
+ return qe(e, n, o, !1);
777
778
  }
778
- var Yt = Vt, Bt = $t;
779
- B.Fragment = s, B.jsx = Yt, B.jsxs = Bt;
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 er() {
794
- if (We)
795
- return W;
796
- We = 1;
797
- var t = Je, 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, p = { key: !0, ref: !0, __self: !0, __source: !0 };
798
- function l(h, c, y) {
799
- var b, _ = {}, O = null, m = null;
800
- y !== void 0 && (O = "" + y), c.key !== void 0 && (O = "" + c.key), c.ref !== void 0 && (m = c.ref);
801
- for (b in c)
802
- s.call(c, b) && !p.hasOwnProperty(b) && (_[b] = c[b]);
803
- if (h && h.defaultProps)
804
- for (b in c = h.defaultProps, c)
805
- _[b] === void 0 && (_[b] = c[b]);
806
- return { $$typeof: r, 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 = er() : me.exports = Qt();
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
815
  maps: r,
815
816
  externalSync: a
816
817
  }) {
817
- const [s, i] = Ke(Jt, {
818
- ...q.state,
819
- maps: r.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
- }), p = pe(
824
- r.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
- ), l = w(
833
- (m, g, x) => {
834
- r[0].id === m && a?.({
835
- type: g,
836
- payload: x
832
+ }, p), {})
833
+ ), l = M(
834
+ (p, y, j) => {
835
+ r[0].id === p && a?.({
836
+ type: y,
837
+ payload: j
837
838
  });
838
839
  },
839
840
  [a, r]
840
- ), h = w(
841
- (m, g) => {
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
- ), c = w(
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 = w(
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
- ), b = w(
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
- ), _ = w(
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,
897
+ ), P = se({
898
+ setViewState: E,
899
+ setBasemap: g,
899
900
  setResize: c,
900
- setZoom: b,
901
- setLoaded: _
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: p, children: /* @__PURE__ */ z.jsx(Qe.Provider, { value: s, children: t }) }) });
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 }) }) });
904
905
  }
905
- var ye = /* @__PURE__ */ ((t) => (t.kilometer = "kilometer", t.mile = "mile", t))(ye || {}), tr = /* @__PURE__ */ ((t) => (t.kilometer = "kilometers", t.mile = "miles", t))(tr || {}), G = /* @__PURE__ */ ((t) => (t.AddPosition = "addPosition", t.Finish = "finish", t))(G || {});
906
- class rr extends zt {
907
- handleClick(r, a) {
908
- super.handleClick(r, 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(r, a) {
918
- if (this._isMeasuringSessionFinished)
919
- return;
920
- r.stopPropagation();
921
- const { key: s } = r, i = this.getClickSequence().length;
922
- switch (s) {
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
- }
935
- }
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
- ], nr = "mapMeasureLayer", ar = {
944
- mode: rr,
945
- id: nr,
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,15 +937,41 @@ 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 or extends Ht {
967
+ class lr extends Kt {
971
968
  eventManager;
972
969
  constructor(r) {
973
970
  super(r), this.eventManager = r.eventManager;
974
971
  }
975
972
  _addEventHandlers() {
976
973
  const r = this._getEventManager(), { eventHandler: a } = this.state._editableLayerState;
977
- for (const s of He)
974
+ for (const s of Je)
978
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
@@ -982,14 +979,50 @@ class or extends Ht {
982
979
  }
983
980
  _removeEventHandlers(r = void 0) {
984
981
  const a = r || this._getEventManager(), { eventHandler: s } = this.state._editableLayerState;
985
- for (const i of He)
982
+ for (const i of Je)
986
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, r, a) {
1047
+ function ut(t, r, a) {
1015
1048
  return Intl.NumberFormat(r, a).format(t);
1016
1049
  }
1017
- function ot(t, r, a = {}) {
1018
- return at(t, r, { ...nt.NUMBER, ...a });
1050
+ function lt(t, r, a = {}) {
1051
+ return ut(t, r, { ...ct.NUMBER, ...a });
1019
1052
  }
1020
- function ir(t, r, a = {}) {
1021
- return at(t, r, { ...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, r) => ir(t, r)
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, r) => ot(t, r)
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 sr({
1071
+ function vr({
1039
1072
  properties: t,
1040
1073
  formatters: r = {},
1041
1074
  includeColumns: a = Object.keys(t),
1042
1075
  locale: s = "en-US",
1043
1076
  showColumnName: i = !0,
1044
- title: p,
1045
- getColumnName: l = dr,
1046
- getFieldHtml: h = cr,
1047
- getTitle: c = ur,
1048
- getValue: y = lr
1077
+ title: f,
1078
+ getColumnName: l = br,
1079
+ getFieldHtml: E = yr,
1080
+ getTitle: c = gr,
1081
+ getValue: g = hr
1049
1082
  }) {
1050
- const b = p ? c(p) : "", O = a.reduce((m, g) => {
1051
- const x = r[g], T = t[g], P = y(T, s, x), M = i ? l(g) : "";
1052
- return m + h(M, 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 b + O;
1087
+ return h + P;
1055
1088
  }
1056
- function ur(t) {
1089
+ function gr(t) {
1057
1090
  return `<h3 style="margin: 0"><strong>${t}</strong></h3></br>`;
1058
1091
  }
1059
- function cr(t, r) {
1092
+ function yr(t, r) {
1060
1093
  return `${t}${r}</br>`;
1061
1094
  }
1062
- function lr(t, r, a) {
1095
+ function hr(t, r, a) {
1063
1096
  try {
1064
- return fr(a)(t, r);
1097
+ return Er(a)(t, r);
1065
1098
  } catch {
1066
1099
  return t;
1067
1100
  }
1068
1101
  }
1069
- function fr(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 dr(t) {
1105
+ function br(t) {
1073
1106
  return `<strong>${t}</strong>: `;
1074
1107
  }
1075
- var pr = function(r) {
1076
- return vr(r) && !mr(r);
1108
+ var _r = function(r) {
1109
+ return Sr(r) && !Rr(r);
1077
1110
  };
1078
- function vr(t) {
1111
+ function Sr(t) {
1079
1112
  return !!t && typeof t == "object";
1080
1113
  }
1081
- function mr(t) {
1114
+ function Rr(t) {
1082
1115
  var r = Object.prototype.toString.call(t);
1083
- return r === "[object RegExp]" || r === "[object Date]" || br(t);
1116
+ return r === "[object RegExp]" || r === "[object Date]" || Pr(t);
1084
1117
  }
1085
- var gr = typeof Symbol == "function" && Symbol.for, yr = gr ? Symbol.for("react.element") : 60103;
1086
- function br(t) {
1087
- return t.$$typeof === yr;
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 Er(t) {
1122
+ function Cr(t) {
1090
1123
  return Array.isArray(t) ? [] : {};
1091
1124
  }
1092
- function Z(t, r) {
1093
- return r.clone !== !1 && r.isMergeableObject(t) ? U(Er(t), t, r) : t;
1125
+ function X(t, r) {
1126
+ return r.clone !== !1 && r.isMergeableObject(t) ? Y(Cr(t), t, r) : t;
1094
1127
  }
1095
- function hr(t, r, a) {
1128
+ function Or(t, r, a) {
1096
1129
  return t.concat(r).map(function(s) {
1097
- return Z(s, a);
1130
+ return X(s, a);
1098
1131
  });
1099
1132
  }
1100
- function Rr(t, r) {
1133
+ function wr(t, r) {
1101
1134
  if (!r.customMerge)
1102
- return U;
1135
+ return Y;
1103
1136
  var a = r.customMerge(t);
1104
- return typeof a == "function" ? a : U;
1137
+ return typeof a == "function" ? a : Y;
1105
1138
  }
1106
- function Sr(t) {
1139
+ function jr(t) {
1107
1140
  return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(t).filter(function(r) {
1108
1141
  return Object.propertyIsEnumerable.call(t, r);
1109
1142
  }) : [];
1110
1143
  }
1111
- function qe(t) {
1112
- return Object.keys(t).concat(Sr(t));
1144
+ function et(t) {
1145
+ return Object.keys(t).concat(jr(t));
1113
1146
  }
1114
- function it(t, r) {
1147
+ function ft(t, r) {
1115
1148
  try {
1116
1149
  return r in t;
1117
1150
  } catch {
1118
1151
  return !1;
1119
1152
  }
1120
1153
  }
1121
- function _r(t, r) {
1122
- return it(t, r) && !(Object.hasOwnProperty.call(t, r) && Object.propertyIsEnumerable.call(t, r));
1154
+ function xr(t, r) {
1155
+ return ft(t, r) && !(Object.hasOwnProperty.call(t, r) && Object.propertyIsEnumerable.call(t, r));
1123
1156
  }
1124
- function Tr(t, r, a) {
1157
+ function Ar(t, r, a) {
1125
1158
  var s = {};
1126
- return a.isMergeableObject(t) && qe(t).forEach(function(i) {
1127
- s[i] = Z(t[i], a);
1128
- }), qe(r).forEach(function(i) {
1129
- _r(t, i) || (it(t, i) && a.isMergeableObject(r[i]) ? s[i] = Rr(i, a)(t[i], r[i], a) : s[i] = Z(r[i], a));
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));
1130
1163
  }), s;
1131
1164
  }
1132
- function U(t, r, a) {
1133
- a = a || {}, a.arrayMerge = a.arrayMerge || hr, a.isMergeableObject = a.isMergeableObject || pr, a.cloneUnlessOtherwiseSpecified = Z;
1134
- var s = Array.isArray(r), i = Array.isArray(t), p = s === i;
1135
- return p ? s ? a.arrayMerge(t, r, a) : Tr(t, r, a) : Z(r, 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(r, a) {
1170
+ Y.all = function(r, a) {
1138
1171
  if (!Array.isArray(r))
1139
1172
  throw new Error("first argument should be an array");
1140
1173
  return r.reduce(function(s, i) {
1141
- return U(s, i, a);
1174
+ return Y(s, i, a);
1142
1175
  }, {});
1143
1176
  };
1144
- var Mr = U, wr = Mr;
1145
- const Ge = /* @__PURE__ */ Xt(wr), 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
- }, be = {
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(be.state), ut = J(be.actions);
1163
- function ct() {
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 lt() {
1169
- return K(
1170
- ut
1201
+ function vt() {
1202
+ return ee(
1203
+ mt
1171
1204
  );
1172
1205
  }
1173
- function Or(t, r) {
1174
- const a = r === 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
1331
  unit: r,
1180
1332
  locale: a
1181
1333
  }) {
1182
- return `${ot(Or(t, r), a, {
1334
+ return `${lt(Ur(t, r), a, {
1183
1335
  style: "unit",
1184
- unit: r
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: r = "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: s = {}
1348
+ layerProps: i = {}
1199
1349
  }) {
1200
- const { distance: i, enable: p, unit: l } = ct(), { setDistance: h, setFinished: c } = lt(), { isLoaded: y, basemap: b } = rt(t), { getOverlayInstance: _ } = ge(t), O = Wt(() => {
1201
- if (!y || !Cr(b))
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 qt(T, {});
1205
- }, [y, _, b]), m = w(
1206
- (T, P) => {
1207
- T.html = sr({
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,45 +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 (!p || !y)
1375
+ if (Gt(() => {
1376
+ f || (p.current = void 0);
1377
+ }, [f]), !f || !h)
1221
1378
  return null;
1222
- const g = Ge(s, {
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) => (s?.onHover || m)(T, { distance: i, locale: r, unit: l }),
1228
- onEdit: ({ editType: T, editContext: P }) => {
1229
- T === G.AddPosition && h(P.distance), T === G.Finish && c(!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: r, unit: l }),
1403
+ getText: (g) => gt({ ...g, locale: r, unit: a }),
1234
1404
  updateTriggers: {
1235
- getText: [l, r]
1405
+ getText: [a, r]
1236
1406
  }
1237
1407
  }
1238
1408
  }
1239
- }), x = Ge(ar, g);
1240
- return new or({
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
1243
1418
  });
1419
+ return he(E, l);
1244
1420
  }
1245
- function $r({ children: t }) {
1246
- const { distance: r, enable: a, unit: s } = ct(), { setDistance: i, setEnable: p } = lt();
1421
+ function Xr({ children: t }) {
1422
+ const { distance: r, enable: a, unit: s } = pt(), { setDistance: i, setEnable: f } = vt();
1247
1423
  return t({
1248
1424
  enable: a,
1249
1425
  distance: r,
1250
1426
  unit: s,
1251
1427
  onToggleButton: () => {
1252
- i(0), p(!a);
1428
+ i(0), f(!a);
1253
1429
  }
1254
1430
  });
1255
1431
  }
1256
- var H = /* @__PURE__ */ ((t) => (t.SetEnable = "SET_ENABLE", t.SetFinished = "SET_FINISHED", t.SetDistance = "SET_DISTANCE", t.SetUnit = "SET_UNIT", t))(H || {});
1257
- function jr(t, { type: r, 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 }) {
1258
1434
  return {
1259
1435
  SET_ENABLE: () => ({
1260
1436
  ...t,
@@ -1275,73 +1451,77 @@ function jr(t, { type: r, payload: a }) {
1275
1451
  })
1276
1452
  }[r]?.() ?? t;
1277
1453
  }
1278
- function Vr({
1454
+ function Qr({
1279
1455
  children: t
1280
1456
  }) {
1281
- const [r, a] = Ke(jr, be.state), s = w(
1457
+ const [r, a] = rt($r, Re.state), s = M(
1282
1458
  (c) => {
1283
- a({ type: H.SetEnable, payload: c });
1459
+ a({ type: G.SetEnable, payload: c });
1284
1460
  },
1285
1461
  [a]
1286
- ), i = w(
1462
+ ), i = M(
1287
1463
  (c) => {
1288
- a({ type: H.SetFinished, payload: c });
1464
+ a({ type: G.SetFinished, payload: c });
1289
1465
  },
1290
1466
  [a]
1291
- ), p = w(
1467
+ ), f = M(
1292
1468
  (c) => {
1293
- a({ type: H.SetDistance, payload: c });
1469
+ a({ type: G.SetDistance, payload: c });
1294
1470
  },
1295
1471
  [a]
1296
- ), l = w(
1472
+ ), l = M(
1297
1473
  (c) => {
1298
- a({ type: H.SetUnit, payload: c });
1474
+ a({ type: G.SetUnit, payload: c });
1299
1475
  },
1300
1476
  [a]
1301
- ), h = pe({
1477
+ ), E = se({
1302
1478
  setEnable: s,
1303
1479
  setFinished: i,
1304
- setDistance: p,
1480
+ setDistance: f,
1305
1481
  setUnit: l
1306
1482
  });
1307
- return /* @__PURE__ */ z.jsx(ut.Provider, { value: h.current, children: /* @__PURE__ */ z.jsx(st.Provider, { value: r, children: t }) });
1483
+ return /* @__PURE__ */ K.jsx(mt.Provider, { value: E.current, children: /* @__PURE__ */ K.jsx(dt.Provider, { value: r, children: t }) });
1308
1484
  }
1309
1485
  export {
1310
- de as CartoBasemapURL,
1311
- Zt as CartoBasemapsNames,
1312
- or as CustomEditableGeojsonLayer,
1313
- rr as CustomMeasureDistanceMode,
1314
- ar as DEFAULT_LAYER_PROPS,
1315
- He as EVENT_MANAGER_EVENT_TYPES,
1316
- G as EditType,
1317
- k as FormatterTypes,
1318
- Gt as GMapsBasemap,
1319
- ve as MAPS_BASEMAP,
1320
- nr as MAP_MEASURE_LAYER_ID,
1321
- F as MapActions,
1322
- tt as MapActionsContext,
1323
- Qe as MapContext,
1324
- $r as MapMeasurementTools,
1325
- Ur as MapMeasurementToolsLayer,
1326
- Vr as MapMeasurementToolsProvider,
1327
- ye as MapMeasurementUnit,
1328
- tr as MapMeasurementUnitTurf,
1329
- Nr as MapProvider,
1330
- et as MapReferencesContext,
1331
- Xe as MapsTypes,
1332
- Or as convertKmTo,
1333
- Pr as getMapType,
1334
- Ze as getTextLayerFormattedDistance,
1335
- Cr as isGmaps,
1336
- sr as objectToHtml,
1337
- Jt as reducer,
1338
- rt as useMap,
1339
- Kt as useMapActions,
1340
- Ir as useMapActionsByID,
1341
- kr as useMapByID,
1342
- ct as useMapMeasurementTools,
1343
- lt as useMapMeasurementToolsActions,
1344
- ge as useMapRefences,
1345
- ge as useMapReferences,
1346
- 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
1347
1527
  };