@carto/ps-react-maps 1.3.3-alpha.2 → 1.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/dist/index.cjs +15 -15
  2. package/dist/index.js +547 -1071
  3. package/dist/types/index.d.ts +0 -1
  4. package/dist/types/map-provider/map-provider.context.d.ts +0 -1
  5. package/dist/types/utils/index.d.ts +0 -1
  6. package/package.json +2 -11
  7. package/dist/types/assets/icons/ruler.d.ts +0 -2
  8. package/dist/types/common-stories/maps/deckgl-maps.component.d.ts +0 -2
  9. package/dist/types/common-stories/maps/google-maps.component.d.ts +0 -3
  10. package/dist/types/common-stories/maps/map-container.component.d.ts +0 -4
  11. package/dist/types/common-stories/maps/map.component.d.ts +0 -2
  12. package/dist/types/map-measurement-tool/custom-editable-geojson-layer.class.d.ts +0 -10
  13. package/dist/types/map-measurement-tool/custom-measurement-distance-mode.class.d.ts +0 -6
  14. package/dist/types/map-measurement-tool/index.d.ts +0 -9
  15. package/dist/types/map-measurement-tool/map-measurement-tool.component.d.ts +0 -6
  16. package/dist/types/map-measurement-tool/map-measurement-tool.const.d.ts +0 -43
  17. package/dist/types/map-measurement-tool/map-measurement-tool.context.d.ts +0 -5
  18. package/dist/types/map-measurement-tool/map-measurement-tool.hook.d.ts +0 -2
  19. package/dist/types/map-measurement-tool/map-measurement-tool.layer.d.ts +0 -3
  20. package/dist/types/map-measurement-tool/map-measurement-tool.provider.d.ts +0 -2
  21. package/dist/types/map-measurement-tool/map-measurement-tool.reducer.d.ts +0 -13
  22. package/dist/types/map-measurement-tool/map-measurement-tool.styles.d.ts +0 -28
  23. package/dist/types/map-measurement-tool/map-measurement-tool.types.d.ts +0 -79
  24. package/dist/types/map-measurement-tool/map-measurement-tool.util.d.ts +0 -7
  25. package/dist/types/utils/get-map-type/get-map-type.d.ts +0 -1
  26. package/dist/types/utils/get-map-type/index.d.ts +0 -2
  27. package/dist/types/utils/get-map-type/is-gmaps.d.ts +0 -1
package/dist/index.js CHANGED
@@ -1,28 +1,24 @@
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 = {
1
+ import Ue, { createContext as se, useContext as ue, useCallback as P, useReducer as Tr, useRef as Fe } from "react";
2
+ var wr = /* @__PURE__ */ ((r) => (r.Roadmap = "roadmap", r.Satellite = "satellite", r.Hybrid = "hybrid", r))(wr || {}), Cr = /* @__PURE__ */ ((r) => (r.DarkMatter = "dark-matter", r.Positron = "positron", r.Voyager = "voyager", r))(Cr || {});
3
+ const ae = {
8
4
  positron: "https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",
9
5
  voyager: "https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",
10
6
  "dark-matter": "https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json"
11
7
  };
12
- var nt = /* @__PURE__ */ ((t) => (t.Maplibre = "maplibre", t.GoogleMaps = "google-maps", t))(nt || {});
13
- const Ee = {
8
+ var Or = /* @__PURE__ */ ((r) => (r.Maplibre = "maplibre", r.GoogleMaps = "google-maps", r))(Or || {});
9
+ const Ae = {
14
10
  positron: {
15
- url: ge.positron,
11
+ url: ae.positron,
16
12
  type: "maplibre"
17
13
  /* Maplibre */
18
14
  },
19
15
  voyager: {
20
- url: ge.voyager,
16
+ url: ae.voyager,
21
17
  type: "maplibre"
22
18
  /* Maplibre */
23
19
  },
24
20
  "dark-matter": {
25
- url: ge[
21
+ url: ae[
26
22
  "dark-matter"
27
23
  /* DarkMatter */
28
24
  ],
@@ -41,9 +37,9 @@ const Ee = {
41
37
  type: "google-maps"
42
38
  /* GoogleMaps */
43
39
  }
44
- }, H = () => {
40
+ }, V = () => {
45
41
  throw new Error("You forgot to wrap your component in <MapProvider>.");
46
- }, Z = {
42
+ }, B = {
47
43
  state: {
48
44
  maps: {}
49
45
  // sync: false,
@@ -53,137 +49,162 @@ const Ee = {
53
49
  },
54
50
  actions: {
55
51
  // toggleSync: stub,
56
- setViewState: H,
57
- setBasemap: H,
58
- setResize: H,
59
- setZoom: H,
60
- setLoaded: H
52
+ setViewState: V,
53
+ setBasemap: V,
54
+ setResize: V,
55
+ setZoom: V,
56
+ setLoaded: V
61
57
  }
62
- }, at = Q(
63
- Z.state
64
- ), ot = Q(Z.references), it = Q(
65
- Z.actions
58
+ }, Ne = se(
59
+ B.state
60
+ ), Ve = se(B.references), Ye = se(
61
+ B.actions
66
62
  );
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 }) {
63
+ var F = /* @__PURE__ */ ((r) => (r.SetViewState = "SetViewState", r.SetBasemap = "SetBasemap", r.SetResize = "SetResize", r.SetZoom = "SetZoom", r.SetLoaded = "SetLoaded", r))(F || {});
64
+ function Pr(r, { type: u, payload: d }) {
69
65
  return {
70
66
  SetViewState: () => {
71
- const { id: i, viewState: f } = a, l = { ...t.maps };
72
- return l[i] = {
73
- ...t.maps[i],
74
- viewState: f
67
+ const { id: o, viewState: y } = d, l = { ...r.maps };
68
+ return l[o] = {
69
+ ...r.maps[o],
70
+ viewState: y
75
71
  }, {
76
- ...t,
72
+ ...r,
77
73
  maps: l
78
74
  };
79
75
  },
80
76
  SetResize: () => {
81
- const { id: i, width: f, height: l } = a, E = { ...t.maps };
82
- return E[i] = {
83
- ...t.maps[i],
77
+ const { id: o, width: y, height: l } = d, E = { ...r.maps };
78
+ return E[o] = {
79
+ ...r.maps[o],
84
80
  viewState: {
85
- ...t.maps[i].viewState,
86
- width: f,
81
+ ...r.maps[o].viewState,
82
+ width: y,
87
83
  height: l
88
84
  }
89
85
  }, {
90
- ...t,
86
+ ...r,
91
87
  maps: E
92
88
  };
93
89
  },
94
90
  SetBasemap: () => {
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;
96
- return l[i] = {
97
- ...t.maps[i],
98
- basemap: f,
99
- isLoaded: h
91
+ const { id: o, basemap: y } = d, l = { ...r.maps }, { basemap: E } = l[o], s = Ae[E]?.type, R = Ae[y]?.type, g = s === R;
92
+ return l[o] = {
93
+ ...r.maps[o],
94
+ basemap: y,
95
+ isLoaded: g
100
96
  }, {
101
- ...t,
97
+ ...r,
102
98
  maps: l
103
99
  };
104
100
  },
105
101
  SetZoom: () => {
106
- const { id: i, zoom: f } = a, l = { ...t.maps };
107
- return l[i] = {
108
- ...t.maps[i],
102
+ const { id: o, zoom: y } = d, l = { ...r.maps };
103
+ return l[o] = {
104
+ ...r.maps[o],
109
105
  viewState: {
110
- ...t.maps[i].viewState,
111
- zoom: f
106
+ ...r.maps[o].viewState,
107
+ zoom: y
112
108
  }
113
109
  }, {
114
- ...t,
110
+ ...r,
115
111
  maps: l
116
112
  };
117
113
  },
118
114
  SetLoaded: () => {
119
- const { id: i, value: f } = a, l = { ...t.maps };
120
- return l[i] = {
121
- ...t.maps[i],
122
- isLoaded: f
115
+ const { id: o, value: y } = d, l = { ...r.maps };
116
+ return l[o] = {
117
+ ...r.maps[o],
118
+ isLoaded: y
123
119
  }, {
124
- ...t,
120
+ ...r,
125
121
  maps: l
126
122
  };
127
123
  }
128
- }[r]?.() ?? t;
124
+ }[u]?.() ?? r;
129
125
  }
130
- function st(t) {
131
- return ee(at).maps[t];
126
+ function xr(r) {
127
+ return ue(Ne).maps[r];
132
128
  }
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),
139
- [i]
140
- ), c = M(
141
- (g = 0, h) => E(h)?.[g],
129
+ function $e(r) {
130
+ const u = ue(Ve), { instanceRef: d, overlayRef: h } = u.current[r], o = P(() => {
131
+ const R = d?.current;
132
+ return R?.deck || R?._deck;
133
+ }, [d]), y = P(() => h?.current, [h]), l = P(() => o()?._getViewState(), [o]), E = P(
134
+ (R) => o()?.getViewports(R),
135
+ [o]
136
+ ), s = P(
137
+ (R = 0, g) => E(g)?.[R],
142
138
  [E]
143
139
  );
144
140
  return {
145
- instanceRef: a,
146
- overlayRef: s,
147
- getDeckInstance: i,
148
- getOverlayInstance: f,
141
+ instanceRef: d,
142
+ overlayRef: h,
143
+ getDeckInstance: o,
144
+ getOverlayInstance: y,
149
145
  getViewState: l,
150
- getViewport: c,
146
+ getViewport: s,
151
147
  getViewports: E
152
148
  };
153
149
  }
154
- function rr(t) {
155
- const { setBasemap: r, setResize: a, setViewState: s, setZoom: i, setLoaded: f } = ee(it), { getViewport: l } = Se(t);
150
+ function jr(r) {
151
+ const { setBasemap: u, setResize: d, setViewState: h, setZoom: o, setLoaded: y } = ue(Ye), { getViewport: l } = $e(r);
156
152
  return {
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
153
+ setBasemap: (s) => u(s, r),
154
+ setResize: (s) => d(s, r),
155
+ setViewState: (s) => h(s, r),
156
+ setZoom: (s) => o(s, r),
157
+ setLoaded: (s) => y(s, r),
158
+ fitBounds: (s, {
159
+ boundsOptions: R,
160
+ viewStateOptions: g
165
161
  } = {}) => {
166
- const T = l(), { latitude: P, longitude: p, zoom: y } = T.fitBounds(
167
- c,
168
- g
162
+ const T = l(), { latitude: C, longitude: p, zoom: v } = T.fitBounds(
163
+ s,
164
+ R
169
165
  );
170
- s({ ...h, latitude: P, longitude: p, zoom: y }, t);
166
+ h({ ...g, latitude: C, longitude: p, zoom: v }, r);
171
167
  }
172
168
  };
173
169
  }
174
- function qr(t) {
175
- return st(t);
170
+ function Yr(r) {
171
+ return xr(r);
176
172
  }
177
- function Gr(t) {
178
- return Se(t);
173
+ function $r(r) {
174
+ return $e(r);
179
175
  }
180
- function Kr(t) {
181
- return rr(t);
176
+ function Br(r) {
177
+ return jr(r);
182
178
  }
183
- function nr(t) {
184
- return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
179
+ var ie = { exports: {} }, Y = {};
180
+ /**
181
+ * @license React
182
+ * react-jsx-runtime.production.min.js
183
+ *
184
+ * Copyright (c) Facebook, Inc. and its affiliates.
185
+ *
186
+ * This source code is licensed under the MIT license found in the
187
+ * LICENSE file in the root directory of this source tree.
188
+ */
189
+ var Me;
190
+ function kr() {
191
+ if (Me)
192
+ return Y;
193
+ Me = 1;
194
+ var r = Ue, u = Symbol.for("react.element"), d = Symbol.for("react.fragment"), h = Object.prototype.hasOwnProperty, o = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, y = { key: !0, ref: !0, __self: !0, __source: !0 };
195
+ function l(E, s, R) {
196
+ var g, T = {}, C = null, p = null;
197
+ R !== void 0 && (C = "" + R), s.key !== void 0 && (C = "" + s.key), s.ref !== void 0 && (p = s.ref);
198
+ for (g in s)
199
+ h.call(s, g) && !y.hasOwnProperty(g) && (T[g] = s[g]);
200
+ if (E && E.defaultProps)
201
+ for (g in s = E.defaultProps, s)
202
+ T[g] === void 0 && (T[g] = s[g]);
203
+ return { $$typeof: u, type: E, key: C, ref: p, props: T, _owner: o.current };
204
+ }
205
+ return Y.Fragment = d, Y.jsx = l, Y.jsxs = l, Y;
185
206
  }
186
- var be = { exports: {} }, z = {};
207
+ var $ = {};
187
208
  /**
188
209
  * @license React
189
210
  * react-jsx-runtime.development.js
@@ -193,91 +214,91 @@ var be = { exports: {} }, z = {};
193
214
  * This source code is licensed under the MIT license found in the
194
215
  * LICENSE file in the root directory of this source tree.
195
216
  */
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) {
217
+ var Le;
218
+ function Dr() {
219
+ return Le || (Le = 1, process.env.NODE_ENV !== "production" && function() {
220
+ var r = Ue, u = Symbol.for("react.element"), d = Symbol.for("react.portal"), h = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), y = Symbol.for("react.profiler"), l = Symbol.for("react.provider"), E = Symbol.for("react.context"), s = Symbol.for("react.forward_ref"), R = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), T = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), v = Symbol.iterator, k = "@@iterator";
221
+ function W(e) {
201
222
  if (e === null || typeof e != "object")
202
223
  return null;
203
- var n = y && e[y] || e[j];
204
- return typeof n == "function" ? n : null;
224
+ var t = v && e[v] || e[k];
225
+ return typeof t == "function" ? t : null;
205
226
  }
206
- var x = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
207
- function _(e) {
227
+ var D = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
228
+ function S(e) {
208
229
  {
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);
230
+ for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), a = 1; a < t; a++)
231
+ n[a - 1] = arguments[a];
232
+ ze("error", e, n);
212
233
  }
213
234
  }
214
- function Te(e, n, o) {
235
+ function ze(e, t, n) {
215
236
  {
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);
237
+ var a = D.ReactDebugCurrentFrame, f = a.getStackAddendum();
238
+ f !== "" && (t += "%s", n = n.concat([f]));
239
+ var m = n.map(function(c) {
240
+ return String(c);
220
241
  });
221
- b.unshift("Warning: " + n), Function.prototype.apply.call(console[e], console, b);
242
+ m.unshift("Warning: " + t), Function.prototype.apply.call(console[e], console, m);
222
243
  }
223
244
  }
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
245
+ var Ze = !1, qe = !1, He = !1, Je = !1, Ge = !1, ce;
246
+ ce = Symbol.for("react.module.reference");
247
+ function Ke(e) {
248
+ return !!(typeof e == "string" || typeof e == "function" || e === h || e === y || Ge || e === o || e === R || e === g || Je || e === p || Ze || qe || He || typeof e == "object" && e !== null && (e.$$typeof === C || e.$$typeof === T || e.$$typeof === l || e.$$typeof === E || e.$$typeof === s || // This needs to include all possible module reference object
228
249
  // types supported by any Flight configuration anywhere since
229
250
  // we don't know which Flight build this will end up being used
230
251
  // with.
231
- e.$$typeof === Me || e.getModuleId !== void 0));
252
+ e.$$typeof === ce || e.getModuleId !== void 0));
232
253
  }
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;
254
+ function Xe(e, t, n) {
255
+ var a = e.displayName;
256
+ if (a)
257
+ return a;
258
+ var f = t.displayName || t.name || "";
259
+ return f !== "" ? n + "(" + f + ")" : n;
239
260
  }
240
- function Pe(e) {
261
+ function le(e) {
241
262
  return e.displayName || "Context";
242
263
  }
243
- function A(e) {
264
+ function x(e) {
244
265
  if (e == null)
245
266
  return null;
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")
267
+ if (typeof e.tag == "number" && S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
247
268
  return e.displayName || e.name || null;
248
269
  if (typeof e == "string")
249
270
  return e;
250
271
  switch (e) {
251
- case s:
272
+ case h:
252
273
  return "Fragment";
253
- case a:
274
+ case d:
254
275
  return "Portal";
255
- case f:
276
+ case y:
256
277
  return "Profiler";
257
- case i:
278
+ case o:
258
279
  return "StrictMode";
259
- case g:
280
+ case R:
260
281
  return "Suspense";
261
- case h:
282
+ case g:
262
283
  return "SuspenseList";
263
284
  }
264
285
  if (typeof e == "object")
265
286
  switch (e.$$typeof) {
266
287
  case E:
267
- var n = e;
268
- return Pe(n) + ".Consumer";
288
+ var t = e;
289
+ return le(t) + ".Consumer";
269
290
  case l:
270
- var o = e;
271
- return Pe(o._context) + ".Provider";
272
- case c:
273
- return _t(e, e.render, "ForwardRef");
291
+ var n = e;
292
+ return le(n._context) + ".Provider";
293
+ case s:
294
+ return Xe(e, e.render, "ForwardRef");
274
295
  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;
296
+ var a = e.displayName || null;
297
+ return a !== null ? a : x(e.type) || "Memo";
298
+ case C: {
299
+ var f = e, m = f._payload, c = f._init;
279
300
  try {
280
- return A(m(b));
301
+ return x(c(m));
281
302
  } catch {
282
303
  return null;
283
304
  }
@@ -285,18 +306,18 @@ function ar() {
285
306
  }
286
307
  return null;
287
308
  }
288
- var I = Object.assign, B = 0, Ce, Oe, we, je, xe, Ae, De;
289
- function Fe() {
309
+ var M = Object.assign, U = 0, fe, de, pe, ve, me, ye, ge;
310
+ function Re() {
290
311
  }
291
- Fe.__reactDisabledLog = !0;
292
- function St() {
312
+ Re.__reactDisabledLog = !0;
313
+ function Qe() {
293
314
  {
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;
315
+ if (U === 0) {
316
+ fe = console.log, de = console.info, pe = console.warn, ve = console.error, me = console.group, ye = console.groupCollapsed, ge = console.groupEnd;
296
317
  var e = {
297
318
  configurable: !0,
298
319
  enumerable: !0,
299
- value: Fe,
320
+ value: Re,
300
321
  writable: !0
301
322
  };
302
323
  Object.defineProperties(console, {
@@ -309,336 +330,336 @@ function ar() {
309
330
  groupEnd: e
310
331
  });
311
332
  }
312
- B++;
333
+ U++;
313
334
  }
314
335
  }
315
- function Rt() {
336
+ function er() {
316
337
  {
317
- if (B--, B === 0) {
338
+ if (U--, U === 0) {
318
339
  var e = {
319
340
  configurable: !0,
320
341
  enumerable: !0,
321
342
  writable: !0
322
343
  };
323
344
  Object.defineProperties(console, {
324
- log: I({}, e, {
325
- value: Ce
345
+ log: M({}, e, {
346
+ value: fe
326
347
  }),
327
- info: I({}, e, {
328
- value: Oe
348
+ info: M({}, e, {
349
+ value: de
329
350
  }),
330
- warn: I({}, e, {
331
- value: we
351
+ warn: M({}, e, {
352
+ value: pe
332
353
  }),
333
- error: I({}, e, {
334
- value: je
354
+ error: M({}, e, {
355
+ value: ve
335
356
  }),
336
- group: I({}, e, {
337
- value: xe
357
+ group: M({}, e, {
358
+ value: me
338
359
  }),
339
- groupCollapsed: I({}, e, {
340
- value: Ae
360
+ groupCollapsed: M({}, e, {
361
+ value: ye
341
362
  }),
342
- groupEnd: I({}, e, {
343
- value: De
363
+ groupEnd: M({}, e, {
364
+ value: ge
344
365
  })
345
366
  });
346
367
  }
347
- B < 0 && _("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
368
+ U < 0 && S("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
348
369
  }
349
370
  }
350
- var ce = x.ReactCurrentDispatcher, ue;
351
- function te(e, n, o) {
371
+ var G = D.ReactCurrentDispatcher, K;
372
+ function z(e, t, n) {
352
373
  {
353
- if (ue === void 0)
374
+ if (K === void 0)
354
375
  try {
355
376
  throw Error();
356
- } catch (v) {
357
- var u = v.stack.trim().match(/\n( *(at )?)/);
358
- ue = u && u[1] || "";
377
+ } catch (f) {
378
+ var a = f.stack.trim().match(/\n( *(at )?)/);
379
+ K = a && a[1] || "";
359
380
  }
360
381
  return `
361
- ` + ue + e;
382
+ ` + K + e;
362
383
  }
363
384
  }
364
- var le = !1, re;
385
+ var X = !1, Z;
365
386
  {
366
- var Tt = typeof WeakMap == "function" ? WeakMap : Map;
367
- re = new Tt();
387
+ var rr = typeof WeakMap == "function" ? WeakMap : Map;
388
+ Z = new rr();
368
389
  }
369
- function ke(e, n) {
370
- if (!e || le)
390
+ function Ee(e, t) {
391
+ if (!e || X)
371
392
  return "";
372
393
  {
373
- var o = re.get(e);
374
- if (o !== void 0)
375
- return o;
394
+ var n = Z.get(e);
395
+ if (n !== void 0)
396
+ return n;
376
397
  }
377
- var u;
378
- le = !0;
379
- var v = Error.prepareStackTrace;
398
+ var a;
399
+ X = !0;
400
+ var f = Error.prepareStackTrace;
380
401
  Error.prepareStackTrace = void 0;
381
- var b;
382
- b = ce.current, ce.current = null, St();
402
+ var m;
403
+ m = G.current, G.current = null, Qe();
383
404
  try {
384
- if (n) {
385
- var m = function() {
405
+ if (t) {
406
+ var c = function() {
386
407
  throw Error();
387
408
  };
388
- if (Object.defineProperty(m.prototype, "props", {
409
+ if (Object.defineProperty(c.prototype, "props", {
389
410
  set: function() {
390
411
  throw Error();
391
412
  }
392
413
  }), typeof Reflect == "object" && Reflect.construct) {
393
414
  try {
394
- Reflect.construct(m, []);
395
- } catch (D) {
396
- u = D;
415
+ Reflect.construct(c, []);
416
+ } catch (j) {
417
+ a = j;
397
418
  }
398
- Reflect.construct(e, [], m);
419
+ Reflect.construct(e, [], c);
399
420
  } else {
400
421
  try {
401
- m.call();
402
- } catch (D) {
403
- u = D;
422
+ c.call();
423
+ } catch (j) {
424
+ a = j;
404
425
  }
405
- e.call(m.prototype);
426
+ e.call(c.prototype);
406
427
  }
407
428
  } else {
408
429
  try {
409
430
  throw Error();
410
- } catch (D) {
411
- u = D;
431
+ } catch (j) {
432
+ a = j;
412
433
  }
413
434
  e();
414
435
  }
415
- } catch (D) {
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)
436
+ } catch (j) {
437
+ if (j && a && typeof j.stack == "string") {
438
+ for (var i = j.stack.split(`
439
+ `), w = a.stack.split(`
440
+ `), b = i.length - 1, _ = w.length - 1; b >= 1 && _ >= 0 && i[b] !== w[_]; )
441
+ _--;
442
+ for (; b >= 1 && _ >= 0; b--, _--)
443
+ if (i[b] !== w[_]) {
444
+ if (b !== 1 || _ !== 1)
424
445
  do
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;
446
+ if (b--, _--, _ < 0 || i[b] !== w[_]) {
447
+ var O = `
448
+ ` + i[b].replace(" at new ", " at ");
449
+ return e.displayName && O.includes("<anonymous>") && (O = O.replace("<anonymous>", e.displayName)), typeof e == "function" && Z.set(e, O), O;
429
450
  }
430
- while (S >= 1 && R >= 0);
451
+ while (b >= 1 && _ >= 0);
431
452
  break;
432
453
  }
433
454
  }
434
455
  } finally {
435
- le = !1, ce.current = b, Rt(), Error.prepareStackTrace = v;
456
+ X = !1, G.current = m, er(), Error.prepareStackTrace = f;
436
457
  }
437
- var $ = e ? e.displayName || e.name : "", Ge = $ ? te($) : "";
438
- return typeof e == "function" && re.set(e, Ge), Ge;
458
+ var I = e ? e.displayName || e.name : "", De = I ? z(I) : "";
459
+ return typeof e == "function" && Z.set(e, De), De;
439
460
  }
440
- function Mt(e, n, o) {
441
- return ke(e, !1);
461
+ function tr(e, t, n) {
462
+ return Ee(e, !1);
442
463
  }
443
- function Pt(e) {
444
- var n = e.prototype;
445
- return !!(n && n.isReactComponent);
464
+ function nr(e) {
465
+ var t = e.prototype;
466
+ return !!(t && t.isReactComponent);
446
467
  }
447
- function ne(e, n, o) {
468
+ function q(e, t, n) {
448
469
  if (e == null)
449
470
  return "";
450
471
  if (typeof e == "function")
451
- return ke(e, Pt(e));
472
+ return Ee(e, nr(e));
452
473
  if (typeof e == "string")
453
- return te(e);
474
+ return z(e);
454
475
  switch (e) {
476
+ case R:
477
+ return z("Suspense");
455
478
  case g:
456
- return te("Suspense");
457
- case h:
458
- return te("SuspenseList");
479
+ return z("SuspenseList");
459
480
  }
460
481
  if (typeof e == "object")
461
482
  switch (e.$$typeof) {
462
- case c:
463
- return Mt(e.render);
483
+ case s:
484
+ return tr(e.render);
464
485
  case T:
465
- return ne(e.type, n, o);
466
- case P: {
467
- var u = e, v = u._payload, b = u._init;
486
+ return q(e.type, t, n);
487
+ case C: {
488
+ var a = e, f = a._payload, m = a._init;
468
489
  try {
469
- return ne(b(v), n, o);
490
+ return q(m(f), t, n);
470
491
  } catch {
471
492
  }
472
493
  }
473
494
  }
474
495
  return "";
475
496
  }
476
- var ae = Object.prototype.hasOwnProperty, Le = {}, Ne = x.ReactDebugCurrentFrame;
477
- function oe(e) {
497
+ var H = Object.prototype.hasOwnProperty, be = {}, he = D.ReactDebugCurrentFrame;
498
+ function J(e) {
478
499
  if (e) {
479
- var n = e._owner, o = ne(e.type, e._source, n ? n.type : null);
480
- Ne.setExtraStackFrame(o);
500
+ var t = e._owner, n = q(e.type, e._source, t ? t.type : null);
501
+ he.setExtraStackFrame(n);
481
502
  } else
482
- Ne.setExtraStackFrame(null);
503
+ he.setExtraStackFrame(null);
483
504
  }
484
- function Ct(e, n, o, u, v) {
505
+ function ar(e, t, n, a, f) {
485
506
  {
486
- var b = Function.call.bind(ae);
487
- for (var m in e)
488
- if (b(e, m)) {
489
- var d = void 0;
507
+ var m = Function.call.bind(H);
508
+ for (var c in e)
509
+ if (m(e, c)) {
510
+ var i = void 0;
490
511
  try {
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`.");
493
- throw C.name = "Invariant Violation", C;
512
+ if (typeof e[c] != "function") {
513
+ var w = Error((a || "React class") + ": " + n + " type `" + c + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[c] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
514
+ throw w.name = "Invariant Violation", w;
494
515
  }
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;
516
+ i = e[c](t, c, a, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
517
+ } catch (b) {
518
+ i = b;
498
519
  }
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));
520
+ i && !(i instanceof Error) && (J(f), S("%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).", a || "React class", n, c, typeof i), J(null)), i instanceof Error && !(i.message in be) && (be[i.message] = !0, J(f), S("Failed %s type: %s", n, i.message), J(null));
500
521
  }
501
522
  }
502
523
  }
503
- var Ot = Array.isArray;
504
- function fe(e) {
505
- return Ot(e);
524
+ var or = Array.isArray;
525
+ function Q(e) {
526
+ return or(e);
506
527
  }
507
- function wt(e) {
528
+ function ir(e) {
508
529
  {
509
- var n = typeof Symbol == "function" && Symbol.toStringTag, o = n && e[Symbol.toStringTag] || e.constructor.name || "Object";
510
- return o;
530
+ var t = typeof Symbol == "function" && Symbol.toStringTag, n = t && e[Symbol.toStringTag] || e.constructor.name || "Object";
531
+ return n;
511
532
  }
512
533
  }
513
- function jt(e) {
534
+ function sr(e) {
514
535
  try {
515
- return Ie(e), !1;
536
+ return _e(e), !1;
516
537
  } catch {
517
538
  return !0;
518
539
  }
519
540
  }
520
- function Ie(e) {
541
+ function _e(e) {
521
542
  return "" + e;
522
543
  }
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);
544
+ function Se(e) {
545
+ if (sr(e))
546
+ return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ir(e)), _e(e);
526
547
  }
527
- var W = x.ReactCurrentOwner, xt = {
548
+ var N = D.ReactCurrentOwner, ur = {
528
549
  key: !0,
529
550
  ref: !0,
530
551
  __self: !0,
531
552
  __source: !0
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)
553
+ }, Te, we, ee;
554
+ ee = {};
555
+ function cr(e) {
556
+ if (H.call(e, "ref")) {
557
+ var t = Object.getOwnPropertyDescriptor(e, "ref").get;
558
+ if (t && t.isReactWarning)
538
559
  return !1;
539
560
  }
540
561
  return e.ref !== void 0;
541
562
  }
542
- function Dt(e) {
543
- if (ae.call(e, "key")) {
544
- var n = Object.getOwnPropertyDescriptor(e, "key").get;
545
- if (n && n.isReactWarning)
563
+ function lr(e) {
564
+ if (H.call(e, "key")) {
565
+ var t = Object.getOwnPropertyDescriptor(e, "key").get;
566
+ if (t && t.isReactWarning)
546
567
  return !1;
547
568
  }
548
569
  return e.key !== void 0;
549
570
  }
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);
571
+ function fr(e, t) {
572
+ if (typeof e.ref == "string" && N.current && t && N.current.stateNode !== t) {
573
+ var n = x(N.current.type);
574
+ ee[n] || (S('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', x(N.current.type), e.ref), ee[n] = !0);
554
575
  }
555
576
  }
556
- function kt(e, n) {
577
+ function dr(e, t) {
557
578
  {
558
- var o = function() {
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));
579
+ var n = function() {
580
+ Te || (Te = !0, S("%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)", t));
560
581
  };
561
- o.isReactWarning = !0, Object.defineProperty(e, "key", {
562
- get: o,
582
+ n.isReactWarning = !0, Object.defineProperty(e, "key", {
583
+ get: n,
563
584
  configurable: !0
564
585
  });
565
586
  }
566
587
  }
567
- function Lt(e, n) {
588
+ function pr(e, t) {
568
589
  {
569
- var o = function() {
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));
590
+ var n = function() {
591
+ we || (we = !0, S("%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)", t));
571
592
  };
572
- o.isReactWarning = !0, Object.defineProperty(e, "ref", {
573
- get: o,
593
+ n.isReactWarning = !0, Object.defineProperty(e, "ref", {
594
+ get: n,
574
595
  configurable: !0
575
596
  });
576
597
  }
577
598
  }
578
- var Nt = function(e, n, o, u, v, b, m) {
579
- var d = {
599
+ var vr = function(e, t, n, a, f, m, c) {
600
+ var i = {
580
601
  // This tag allows us to uniquely identify this as a React Element
581
- $$typeof: r,
602
+ $$typeof: u,
582
603
  // Built-in properties that belong on the element
583
604
  type: e,
584
- key: n,
585
- ref: o,
586
- props: m,
605
+ key: t,
606
+ ref: n,
607
+ props: c,
587
608
  // Record the component responsible for creating this element.
588
- _owner: b
609
+ _owner: m
589
610
  };
590
- return d._store = {}, Object.defineProperty(d._store, "validated", {
611
+ return i._store = {}, Object.defineProperty(i._store, "validated", {
591
612
  configurable: !1,
592
613
  enumerable: !1,
593
614
  writable: !0,
594
615
  value: !1
595
- }), Object.defineProperty(d, "_self", {
616
+ }), Object.defineProperty(i, "_self", {
596
617
  configurable: !1,
597
618
  enumerable: !1,
598
619
  writable: !1,
599
- value: u
600
- }), Object.defineProperty(d, "_source", {
620
+ value: a
621
+ }), Object.defineProperty(i, "_source", {
601
622
  configurable: !1,
602
623
  enumerable: !1,
603
624
  writable: !1,
604
- value: v
605
- }), Object.freeze && (Object.freeze(d.props), Object.freeze(d)), d;
625
+ value: f
626
+ }), Object.freeze && (Object.freeze(i.props), Object.freeze(i)), i;
606
627
  };
607
- function It(e, n, o, u, v) {
628
+ function mr(e, t, n, a, f) {
608
629
  {
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]);
630
+ var m, c = {}, i = null, w = null;
631
+ n !== void 0 && (Se(n), i = "" + n), lr(t) && (Se(t.key), i = "" + t.key), cr(t) && (w = t.ref, fr(t, f));
632
+ for (m in t)
633
+ H.call(t, m) && !ur.hasOwnProperty(m) && (c[m] = t[m]);
613
634
  if (e && e.defaultProps) {
614
- var S = e.defaultProps;
615
- for (b in S)
616
- m[b] === void 0 && (m[b] = S[b]);
635
+ var b = e.defaultProps;
636
+ for (m in b)
637
+ c[m] === void 0 && (c[m] = b[m]);
617
638
  }
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);
639
+ if (i || w) {
640
+ var _ = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
641
+ i && dr(c, _), w && pr(c, _);
621
642
  }
622
- return Nt(e, d, C, v, u, W.current, m);
643
+ return vr(e, i, w, f, a, N.current, c);
623
644
  }
624
645
  }
625
- var me = x.ReactCurrentOwner, Ye = x.ReactDebugCurrentFrame;
626
- function V(e) {
646
+ var re = D.ReactCurrentOwner, Ce = D.ReactDebugCurrentFrame;
647
+ function L(e) {
627
648
  if (e) {
628
- var n = e._owner, o = ne(e.type, e._source, n ? n.type : null);
629
- Ye.setExtraStackFrame(o);
649
+ var t = e._owner, n = q(e.type, e._source, t ? t.type : null);
650
+ Ce.setExtraStackFrame(n);
630
651
  } else
631
- Ye.setExtraStackFrame(null);
652
+ Ce.setExtraStackFrame(null);
632
653
  }
633
- var pe;
634
- pe = !1;
635
- function ve(e) {
636
- return typeof e == "object" && e !== null && e.$$typeof === r;
654
+ var te;
655
+ te = !1;
656
+ function ne(e) {
657
+ return typeof e == "object" && e !== null && e.$$typeof === u;
637
658
  }
638
- function Be() {
659
+ function Oe() {
639
660
  {
640
- if (me.current) {
641
- var e = A(me.current.type);
661
+ if (re.current) {
662
+ var e = x(re.current.type);
642
663
  if (e)
643
664
  return `
644
665
 
@@ -647,182 +668,154 @@ Check the render method of \`` + e + "`.";
647
668
  return "";
648
669
  }
649
670
  }
650
- function Ut(e) {
671
+ function yr(e) {
651
672
  {
652
673
  if (e !== void 0) {
653
- var n = e.fileName.replace(/^.*[\\\/]/, ""), o = e.lineNumber;
674
+ var t = e.fileName.replace(/^.*[\\\/]/, ""), n = e.lineNumber;
654
675
  return `
655
676
 
656
- Check your code at ` + n + ":" + o + ".";
677
+ Check your code at ` + t + ":" + n + ".";
657
678
  }
658
679
  return "";
659
680
  }
660
681
  }
661
- var We = {};
662
- function Vt(e) {
682
+ var Pe = {};
683
+ function gr(e) {
663
684
  {
664
- var n = Be();
665
- if (!n) {
666
- var o = typeof e == "string" ? e : e.displayName || e.name;
667
- o && (n = `
685
+ var t = Oe();
686
+ if (!t) {
687
+ var n = typeof e == "string" ? e : e.displayName || e.name;
688
+ n && (t = `
668
689
 
669
- Check the top-level render call using <` + o + ">.");
690
+ Check the top-level render call using <` + n + ">.");
670
691
  }
671
- return n;
692
+ return t;
672
693
  }
673
694
  }
674
- function He(e, n) {
695
+ function xe(e, t) {
675
696
  {
676
697
  if (!e._store || e._store.validated || e.key != null)
677
698
  return;
678
699
  e._store.validated = !0;
679
- var o = Vt(n);
680
- if (We[o])
700
+ var n = gr(t);
701
+ if (Pe[n])
681
702
  return;
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);
703
+ Pe[n] = !0;
704
+ var a = "";
705
+ e && e._owner && e._owner !== re.current && (a = " It was passed a child from " + x(e._owner.type) + "."), L(e), S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, a), L(null);
685
706
  }
686
707
  }
687
- function ze(e, n) {
708
+ function je(e, t) {
688
709
  {
689
710
  if (typeof e != "object")
690
711
  return;
691
- if (fe(e))
692
- for (var o = 0; o < e.length; o++) {
693
- var u = e[o];
694
- ve(u) && He(u, n);
712
+ if (Q(e))
713
+ for (var n = 0; n < e.length; n++) {
714
+ var a = e[n];
715
+ ne(a) && xe(a, t);
695
716
  }
696
- else if (ve(e))
717
+ else if (ne(e))
697
718
  e._store && (e._store.validated = !0);
698
719
  else if (e) {
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);
720
+ var f = W(e);
721
+ if (typeof f == "function" && f !== e.entries)
722
+ for (var m = f.call(e), c; !(c = m.next()).done; )
723
+ ne(c.value) && xe(c.value, t);
703
724
  }
704
725
  }
705
726
  }
706
- function $t(e) {
727
+ function Rr(e) {
707
728
  {
708
- var n = e.type;
709
- if (n == null || typeof n == "string")
729
+ var t = e.type;
730
+ if (t == null || typeof t == "string")
710
731
  return;
711
- var o;
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.
732
+ var n;
733
+ if (typeof t == "function")
734
+ n = t.propTypes;
735
+ else if (typeof t == "object" && (t.$$typeof === s || // Note: Memo only checks outer props here.
715
736
  // Inner props are checked in the reconciler.
716
- n.$$typeof === T))
717
- o = n.propTypes;
737
+ t.$$typeof === T))
738
+ n = t.propTypes;
718
739
  else
719
740
  return;
720
- if (o) {
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");
741
+ if (n) {
742
+ var a = x(t);
743
+ ar(n, e.props, "prop", a, e);
744
+ } else if (t.PropTypes !== void 0 && !te) {
745
+ te = !0;
746
+ var f = x(t);
747
+ S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", f || "Unknown");
727
748
  }
728
- typeof n.getDefaultProps == "function" && !n.getDefaultProps.isReactClassApproved && _("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
749
+ typeof t.getDefaultProps == "function" && !t.getDefaultProps.isReactClassApproved && S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
729
750
  }
730
751
  }
731
- function Yt(e) {
752
+ function Er(e) {
732
753
  {
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);
754
+ for (var t = Object.keys(e.props), n = 0; n < t.length; n++) {
755
+ var a = t[n];
756
+ if (a !== "children" && a !== "key") {
757
+ L(e), S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", a), L(null);
737
758
  break;
738
759
  }
739
760
  }
740
- e.ref !== null && (V(e), _("Invalid attribute `ref` supplied to `React.Fragment`."), V(null));
761
+ e.ref !== null && (L(e), S("Invalid attribute `ref` supplied to `React.Fragment`."), L(null));
741
762
  }
742
763
  }
743
- function qe(e, n, o, u, v, b) {
764
+ function ke(e, t, n, a, f, m) {
744
765
  {
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);
766
+ var c = Ke(e);
767
+ if (!c) {
768
+ var i = "";
769
+ (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (i += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
770
+ var w = yr(f);
771
+ w ? i += w : i += Oe();
772
+ var b;
773
+ e === null ? b = "null" : Q(e) ? b = "array" : e !== void 0 && e.$$typeof === u ? (b = "<" + (x(e.type) || "Unknown") + " />", i = " Did you accidentally export a JSX literal instead of a component?") : b = typeof e, S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", b, i);
753
774
  }
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);
775
+ var _ = mr(e, t, n, f, m);
776
+ if (_ == null)
777
+ return _;
778
+ if (c) {
779
+ var O = t.children;
780
+ if (O !== void 0)
781
+ if (a)
782
+ if (Q(O)) {
783
+ for (var I = 0; I < O.length; I++)
784
+ je(O[I], e);
785
+ Object.freeze && Object.freeze(O);
765
786
  } else
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.");
787
+ S("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
767
788
  else
768
- ze(w, e);
789
+ je(O, e);
769
790
  }
770
- return e === s ? Yt(R) : $t(R), R;
791
+ return e === h ? Er(_) : Rr(_), _;
771
792
  }
772
793
  }
773
- function Bt(e, n, o) {
774
- return qe(e, n, o, !0);
794
+ function br(e, t, n) {
795
+ return ke(e, t, n, !0);
775
796
  }
776
- function Wt(e, n, o) {
777
- return qe(e, n, o, !1);
797
+ function hr(e, t, n) {
798
+ return ke(e, t, n, !1);
778
799
  }
779
- var Ht = Wt, zt = Bt;
780
- z.Fragment = s, z.jsx = Ht, z.jsxs = zt;
781
- }()), z;
800
+ var _r = hr, Sr = br;
801
+ $.Fragment = h, $.jsx = _r, $.jsxs = Sr;
802
+ }()), $;
782
803
  }
783
- var q = {};
784
- /**
785
- * @license React
786
- * react-jsx-runtime.production.min.js
787
- *
788
- * Copyright (c) Facebook, Inc. and its affiliates.
789
- *
790
- * This source code is licensed under the MIT license found in the
791
- * LICENSE file in the root directory of this source tree.
792
- */
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 };
808
- }
809
- return q.Fragment = a, q.jsx = l, q.jsxs = l, q;
810
- }
811
- process.env.NODE_ENV === "production" ? be.exports = or() : be.exports = ar();
812
- var K = be.exports;
813
- function Zr({
814
- children: t,
815
- maps: r,
816
- externalSync: a
804
+ process.env.NODE_ENV === "production" ? ie.exports = kr() : ie.exports = Dr();
805
+ var oe = ie.exports;
806
+ function Wr({
807
+ children: r,
808
+ maps: u,
809
+ externalSync: d
817
810
  }) {
818
- const [s, i] = rt(tr, {
819
- ...Z.state,
820
- maps: r.reduce((p, y) => (p[y.id] = {
821
- ...y,
811
+ const [h, o] = Tr(Pr, {
812
+ ...B.state,
813
+ maps: u.reduce((p, v) => (p[v.id] = {
814
+ ...v,
822
815
  isLoaded: !1
823
- }, p), Z.state.maps)
824
- }), f = se(
825
- r.reduce((p, y) => (p[y.id] = {
816
+ }, p), B.state.maps)
817
+ }), y = Fe(
818
+ u.reduce((p, v) => (p[v.id] = {
826
819
  instanceRef: {
827
820
  current: null
828
821
  },
@@ -830,199 +823,80 @@ function Zr({
830
823
  current: null
831
824
  }
832
825
  }, p), {})
833
- ), l = M(
834
- (p, y, j) => {
835
- r[0].id === p && a?.({
836
- type: y,
837
- payload: j
826
+ ), l = P(
827
+ (p, v, k) => {
828
+ u[0].id === p && d?.({
829
+ type: v,
830
+ payload: k
838
831
  });
839
832
  },
840
- [a, r]
841
- ), E = M(
842
- (p, y) => {
843
- i({
844
- type: L.SetViewState,
833
+ [d, u]
834
+ ), E = P(
835
+ (p, v) => {
836
+ o({
837
+ type: F.SetViewState,
845
838
  payload: {
846
- id: y,
839
+ id: v,
847
840
  viewState: p
848
841
  }
849
- }), l(y, L.SetViewState, p);
842
+ }), l(v, F.SetViewState, p);
850
843
  },
851
- [i, l]
852
- ), c = M(
853
- ({ height: p, width: y }, j) => {
854
- i({
855
- type: L.SetResize,
844
+ [o, l]
845
+ ), s = P(
846
+ ({ height: p, width: v }, k) => {
847
+ o({
848
+ type: F.SetResize,
856
849
  payload: {
857
- id: j,
850
+ id: k,
858
851
  height: p,
859
- width: y
852
+ width: v
860
853
  }
861
- }), l(j, L.SetResize, { height: p, width: y });
854
+ }), l(k, F.SetResize, { height: p, width: v });
862
855
  },
863
- [i, l]
864
- ), g = M(
865
- (p, y) => {
866
- i({
867
- type: L.SetBasemap,
856
+ [o, l]
857
+ ), R = P(
858
+ (p, v) => {
859
+ o({
860
+ type: F.SetBasemap,
868
861
  payload: {
869
- id: y,
862
+ id: v,
870
863
  basemap: p
871
864
  }
872
865
  });
873
866
  },
874
- [i]
875
- ), h = M(
876
- (p, y) => {
877
- i({
878
- type: L.SetZoom,
867
+ [o]
868
+ ), g = P(
869
+ (p, v) => {
870
+ o({
871
+ type: F.SetZoom,
879
872
  payload: {
880
- id: y,
873
+ id: v,
881
874
  zoom: p
882
875
  }
883
876
  });
884
877
  },
885
- [i]
886
- ), T = M(
887
- (p, y) => {
888
- i({
889
- type: L.SetLoaded,
878
+ [o]
879
+ ), T = P(
880
+ (p, v) => {
881
+ o({
882
+ type: F.SetLoaded,
890
883
  payload: {
891
- id: y,
884
+ id: v,
892
885
  value: p
893
886
  }
894
887
  });
895
888
  },
896
- [i]
897
- ), P = se({
889
+ [o]
890
+ ), C = Fe({
898
891
  setViewState: E,
899
- setBasemap: g,
900
- setResize: c,
901
- setZoom: h,
892
+ setBasemap: R,
893
+ setResize: s,
894
+ setZoom: g,
902
895
  setLoaded: T
903
896
  });
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 }) }) });
905
- }
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 = [
908
- "anyclick",
909
- "pointermove",
910
- "panstart",
911
- "panmove",
912
- "panend",
913
- "keyup"
914
- ], sr = "mapMeasureLayer", cr = {
915
- id: sr,
916
- pickable: !1,
917
- billboard: !1,
918
- editHandlePointRadiusUnits: "pixels",
919
- editHandlePointRadiusMinPixels: 1,
920
- editHandlePointRadiusMaxPixels: 12,
921
- lineWidthMinPixels: 2,
922
- editHandlePointStrokeWidth: 3,
923
- getEditHandlePointRadius: 3,
924
- _subLayerProps: {
925
- tooltips: {
926
- fontFamily: "Open Sans, Inter, sans-serif",
927
- fontWeight: "lighter",
928
- getSize: 11,
929
- lineHeight: 1.4545,
930
- getPixelOffset: [0, 20],
931
- getTextAnchor: "middle",
932
- getAlignmentBaseline: "center",
933
- updateTriggers: {}
934
- },
935
- guides: {
936
- // getLineColor: conditionalRgbColor,
937
- getLineWidth: 2
938
- }
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"
966
- };
967
- class lr extends Kt {
968
- eventManager;
969
- constructor(r) {
970
- super(r), this.eventManager = r.eventManager;
971
- }
972
- _addEventHandlers() {
973
- const r = this._getEventManager(), { eventHandler: a } = this.state._editableLayerState;
974
- for (const s of Je)
975
- r.on(s, a, {
976
- // give nebula a higher priority so that it can stop propagation to deck.gl's map panning handlers
977
- priority: 100
978
- });
979
- }
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);
984
- }
985
- _getEventManager() {
986
- return this.eventManager || this.context.deck.eventManager;
987
- }
897
+ return /* @__PURE__ */ oe.jsx(Ye.Provider, { value: C.current, children: /* @__PURE__ */ oe.jsx(Ve.Provider, { value: y, children: /* @__PURE__ */ oe.jsx(Ne.Provider, { value: h, children: r }) }) });
988
898
  }
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 = {
899
+ const Be = {
1026
900
  NUMBER: {
1027
901
  style: "decimal",
1028
902
  maximumFractionDigits: 1,
@@ -1044,484 +918,86 @@ const ct = {
1044
918
  day: "2-digit"
1045
919
  }
1046
920
  };
1047
- function ut(t, r, a) {
1048
- return Intl.NumberFormat(r, a).format(t);
921
+ function We(r, u, d) {
922
+ return Intl.NumberFormat(u, d).format(r);
1049
923
  }
1050
- function lt(t, r, a = {}) {
1051
- return ut(t, r, { ...ct.NUMBER, ...a });
924
+ function Fr(r, u, d = {}) {
925
+ return We(r, u, { ...Be.NUMBER, ...d });
1052
926
  }
1053
- function pr(t, r, a = {}) {
1054
- return ut(t, r, { ...ct.CURRENCY, ...a });
927
+ function Ar(r, u, d = {}) {
928
+ return We(r, u, { ...Be.CURRENCY, ...d });
1055
929
  }
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)
930
+ var A = /* @__PURE__ */ ((r) => (r.CURRENCY = "CURRENCY", r.DEFAULT = "DEFAULT", r.NUMBER = "NUMBER", r))(A || {});
931
+ const Ie = {
932
+ [A.CURRENCY]: {
933
+ type: A.CURRENCY,
934
+ format: (r, u) => Ar(r, u)
1061
935
  },
1062
- [N.NUMBER]: {
1063
- type: N.NUMBER,
1064
- format: (t, r) => lt(t, r)
936
+ [A.NUMBER]: {
937
+ type: A.NUMBER,
938
+ format: (r, u) => Fr(r, u)
1065
939
  },
1066
- [N.DEFAULT]: {
1067
- type: N.DEFAULT,
1068
- format: (t) => t.toLocaleString()
940
+ [A.DEFAULT]: {
941
+ type: A.DEFAULT,
942
+ format: (r) => r.toLocaleString()
1069
943
  }
1070
944
  };
1071
- function vr({
1072
- properties: t,
1073
- formatters: r = {},
1074
- includeColumns: a = Object.keys(t),
1075
- locale: s = "en-US",
1076
- showColumnName: i = !0,
1077
- title: f,
1078
- getColumnName: l = br,
1079
- getFieldHtml: E = yr,
1080
- getTitle: c = gr,
1081
- getValue: g = hr
945
+ function zr({
946
+ properties: r,
947
+ formatters: u = {},
948
+ includeColumns: d = Object.keys(r),
949
+ locale: h = "en-US",
950
+ showColumnName: o = !0,
951
+ title: y,
952
+ getColumnName: l = Nr,
953
+ getFieldHtml: E = Lr,
954
+ getTitle: s = Mr,
955
+ getValue: R = Ir
1082
956
  }) {
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);
957
+ const g = y ? s(y) : "", C = d.reduce((p, v) => {
958
+ const k = u[v], W = r[v], D = R(W, h, k), S = o ? l(v) : "";
959
+ return p + E(S, D);
1086
960
  }, "");
1087
- return h + P;
1088
- }
1089
- function gr(t) {
1090
- return `<h3 style="margin: 0"><strong>${t}</strong></h3></br>`;
961
+ return g + C;
1091
962
  }
1092
- function yr(t, r) {
1093
- return `${t}${r}</br>`;
963
+ function Mr(r) {
964
+ return `<h3 style="margin: 0"><strong>${r}</strong></h3></br>`;
1094
965
  }
1095
- function hr(t, r, a) {
1096
- try {
1097
- return Er(a)(t, r);
1098
- } catch {
1099
- return t;
1100
- }
1101
- }
1102
- function Er(t) {
1103
- return typeof t == "function" ? t : (t && Qe[t] || Qe[N.DEFAULT]).format;
1104
- }
1105
- function br(t) {
1106
- return `<strong>${t}</strong>: `;
1107
- }
1108
- var _r = function(r) {
1109
- return Sr(r) && !Rr(r);
1110
- };
1111
- function Sr(t) {
1112
- return !!t && typeof t == "object";
1113
- }
1114
- function Rr(t) {
1115
- var r = Object.prototype.toString.call(t);
1116
- return r === "[object RegExp]" || r === "[object Date]" || Pr(t);
1117
- }
1118
- var Tr = typeof Symbol == "function" && Symbol.for, Mr = Tr ? Symbol.for("react.element") : 60103;
1119
- function Pr(t) {
1120
- return t.$$typeof === Mr;
1121
- }
1122
- function Cr(t) {
1123
- return Array.isArray(t) ? [] : {};
966
+ function Lr(r, u) {
967
+ return `${r}${u}</br>`;
1124
968
  }
1125
- function X(t, r) {
1126
- return r.clone !== !1 && r.isMergeableObject(t) ? Y(Cr(t), t, r) : t;
1127
- }
1128
- function Or(t, r, a) {
1129
- return t.concat(r).map(function(s) {
1130
- return X(s, a);
1131
- });
1132
- }
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;
1138
- }
1139
- function jr(t) {
1140
- return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(t).filter(function(r) {
1141
- return Object.propertyIsEnumerable.call(t, r);
1142
- }) : [];
1143
- }
1144
- function et(t) {
1145
- return Object.keys(t).concat(jr(t));
1146
- }
1147
- function ft(t, r) {
969
+ function Ir(r, u, d) {
1148
970
  try {
1149
- return r in t;
971
+ return Ur(d)(r, u);
1150
972
  } catch {
1151
- return !1;
1152
- }
1153
- }
1154
- function xr(t, r) {
1155
- return ft(t, r) && !(Object.hasOwnProperty.call(t, r) && Object.propertyIsEnumerable.call(t, r));
1156
- }
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;
1164
- }
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);
1169
- }
1170
- Y.all = function(r, a) {
1171
- if (!Array.isArray(r))
1172
- throw new Error("first argument should be an array");
1173
- return r.reduce(function(s, i) {
1174
- return Y(s, i, a);
1175
- }, {});
1176
- };
1177
- var Dr = Y, Fr = Dr;
1178
- const he = /* @__PURE__ */ nr(Fr), ie = () => {
1179
- throw new Error(
1180
- "You forgot to wrap your component in <MeasurementToolsProvider>."
1181
- );
1182
- }, Re = {
1183
- state: {
1184
- enable: !1,
1185
- finished: !0,
1186
- distance: 0,
1187
- unit: O.kilometer
1188
- },
1189
- actions: {
1190
- setEnable: ie,
1191
- setFinished: ie,
1192
- setUnit: ie,
1193
- setDistance: ie
1194
- }
1195
- }, dt = Q(Re.state), mt = Q(Re.actions);
1196
- function pt() {
1197
- return ee(
1198
- dt
1199
- );
1200
- }
1201
- function vt() {
1202
- return ee(
1203
- mt
1204
- );
1205
- }
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
- }
973
+ return r;
1322
974
  }
1323
- }, Ir = Xt({
1324
- length: Nr
1325
- });
1326
- function Ur(t, r) {
1327
- return Ir(t).from(Xe[O.kilometer]).to(Xe[r]);
1328
- }
1329
- function gt({
1330
- text: t,
1331
- unit: r,
1332
- locale: a
1333
- }) {
1334
- return `${lt(Ur(t, r), a, {
1335
- style: "unit",
1336
- unit: ur[r]
1337
- })}`;
1338
- }
1339
- function Jr({
1340
- mapId: t,
1341
- defaultProps: {
1342
- locale: r = ye.locale,
1343
- getColumnName: a,
1344
- styles: s = ye.styles
1345
- } = {
1346
- getColumnName: ye.getColumnName
1347
- },
1348
- layerProps: i = {}
1349
- }) {
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))
1352
- return null;
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({
1358
- properties: {
1359
- distance: gt({
1360
- text: k.distance,
1361
- locale: k.locale,
1362
- unit: l
1363
- })
1364
- },
1365
- getColumnName: () => a
1366
- });
1367
- },
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]
1374
- );
1375
- if (Gt(() => {
1376
- f || (p.current = void 0);
1377
- }, [f]), !f || !h)
1378
- return null;
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
975
  }
1393
- function Vr(t, r, a, s, i, f) {
1394
- const l = he(t, {
1395
- modeConfig: {
1396
- // We force distance due to conversion is addressed at feature getText level
1397
- formatTooltip: (g) => g
1398
- },
1399
- onHover: s,
1400
- onEdit: i,
1401
- _subLayerProps: {
1402
- tooltips: {
1403
- getText: (g) => gt({ ...g, locale: r, unit: a }),
1404
- updateTriggers: {
1405
- getText: [a, r]
1406
- }
1407
- }
1408
- }
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);
976
+ function Ur(r) {
977
+ return typeof r == "function" ? r : (r && Ie[r] || Ie[A.DEFAULT]).format;
1420
978
  }
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
- }
1430
- });
1431
- }
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 }) {
1434
- return {
1435
- SET_ENABLE: () => ({
1436
- ...t,
1437
- enable: a,
1438
- finished: !1
1439
- }),
1440
- SET_FINISHED: () => ({
1441
- ...t,
1442
- finished: a
1443
- }),
1444
- SET_DISTANCE: () => ({
1445
- ...t,
1446
- distance: a
1447
- }),
1448
- SET_UNIT: () => ({
1449
- ...t,
1450
- unit: a
1451
- })
1452
- }[r]?.() ?? t;
1453
- }
1454
- function Qr({
1455
- children: t
1456
- }) {
1457
- const [r, a] = rt($r, Re.state), s = M(
1458
- (c) => {
1459
- a({ type: G.SetEnable, payload: c });
1460
- },
1461
- [a]
1462
- ), i = M(
1463
- (c) => {
1464
- a({ type: G.SetFinished, payload: c });
1465
- },
1466
- [a]
1467
- ), f = M(
1468
- (c) => {
1469
- a({ type: G.SetDistance, payload: c });
1470
- },
1471
- [a]
1472
- ), l = M(
1473
- (c) => {
1474
- a({ type: G.SetUnit, payload: c });
1475
- },
1476
- [a]
1477
- ), E = se({
1478
- setEnable: s,
1479
- setFinished: i,
1480
- setDistance: f,
1481
- setUnit: l
1482
- });
1483
- return /* @__PURE__ */ K.jsx(mt.Provider, { value: E.current, children: /* @__PURE__ */ K.jsx(dt.Provider, { value: r, children: t }) });
979
+ function Nr(r) {
980
+ return `<strong>${r}</strong>: `;
1484
981
  }
1485
982
  export {
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
983
+ ae as CartoBasemapURL,
984
+ Cr as CartoBasemapsNames,
985
+ A as FormatterTypes,
986
+ wr as GMapsBasemap,
987
+ Ae as MAPS_BASEMAP,
988
+ F as MapActions,
989
+ Ye as MapActionsContext,
990
+ Ne as MapContext,
991
+ Wr as MapProvider,
992
+ Ve as MapReferencesContext,
993
+ Or as MapsTypes,
994
+ zr as objectToHtml,
995
+ Pr as reducer,
996
+ xr as useMap,
997
+ jr as useMapActions,
998
+ Br as useMapActionsByID,
999
+ Yr as useMapByID,
1000
+ $e as useMapRefences,
1001
+ $e as useMapReferences,
1002
+ $r as useMapReferencesByID
1527
1003
  };