@carto/ps-react-ui 4.0.0-canary.2 → 4.0.0-canary.4
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/components.js +621 -649
- package/dist/components.js.map +1 -1
- package/package.json +1 -3
package/dist/components.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import { c as
|
3
|
-
import {
|
4
|
-
import { ArrowDropDown as
|
5
|
-
import { useMemo as
|
1
|
+
import { jsx as i, jsxs as D, Fragment as j } from "react/jsx-runtime";
|
2
|
+
import { c as R } from "react/compiler-runtime";
|
3
|
+
import { Chip as Ge, Tooltip as le, Paper as ve, Divider as K, Box as ee, IconButton as Q, Menu as Oe, MenuItem as re, ListItemIcon as Ie, SvgIcon as Me, ListItemText as ce, ToggleButton as ae, Typography as H, ToggleButtonGroup as Re, Button as ge, alpha as Fe, Dialog as ze, DialogTitle as He, DialogContent as Ne, FormControl as We, RadioGroup as Xe, FormControlLabel as qe, Radio as Ke, DialogActions as Ye, CircularProgress as Je, ListItem as Qe, List as et } from "@mui/material";
|
4
|
+
import { ArrowDropDown as Ze, MoreVertOutlined as tt, Close as ot, MyLocationOutlined as nt, LocationDisabledOutlined as it, CropFreeOutlined as lt, AddOutlined as rt, RemoveOutlined as ct } from "@mui/icons-material";
|
5
|
+
import { useMemo as be, useState as ie, useRef as at, useEffect as st } from "react";
|
6
6
|
const G = {
|
7
7
|
container: {
|
8
8
|
display: "flex",
|
@@ -136,24 +136,6 @@ const G = {
|
|
136
136
|
palette: t
|
137
137
|
}) => t.text.primary
|
138
138
|
},
|
139
|
-
tag: {
|
140
|
-
borderRadius: ({
|
141
|
-
spacing: t
|
142
|
-
}) => t(0.25),
|
143
|
-
border: "1px solid",
|
144
|
-
borderColor: ({
|
145
|
-
palette: t
|
146
|
-
}) => t.primary.main,
|
147
|
-
paddingX: ({
|
148
|
-
spacing: t
|
149
|
-
}) => t(0.5),
|
150
|
-
color: ({
|
151
|
-
palette: t
|
152
|
-
}) => t.primary.main,
|
153
|
-
backgroundColor: ({
|
154
|
-
palette: t
|
155
|
-
}) => Re(t.primary.main, 0.08)
|
156
|
-
},
|
157
139
|
more: {
|
158
140
|
width: ({
|
159
141
|
spacing: t
|
@@ -182,48 +164,43 @@ const G = {
|
|
182
164
|
marginRight: ({
|
183
165
|
spacing: t
|
184
166
|
}) => t(0.5)
|
185
|
-
},
|
186
|
-
disabled: {
|
187
|
-
opacity: ({
|
188
|
-
palette: t
|
189
|
-
}) => t.action.disabledOpacity
|
190
167
|
}
|
191
168
|
}
|
192
169
|
};
|
193
|
-
function
|
194
|
-
const e =
|
195
|
-
let
|
196
|
-
e[0] === Symbol.for("react.memo_cache_sentinel") ? (
|
170
|
+
function dt(t) {
|
171
|
+
const e = R(3);
|
172
|
+
let n;
|
173
|
+
e[0] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ i("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4 18a2 2 0 1 1 0 4 2 2 0 0 1 0-4Zm16 0a2 2 0 1 1 0 4 2 2 0 0 1 0-4Zm-2.829 1a2.996 2.996 0 0 0 0 2H6.829a2.995 2.995 0 0 0 0-2h10.342Zm-2.463-5.707 3.998 4a3.013 3.013 0 0 0-1.414 1.414l-4-3.999a3.014 3.014 0 0 0 1.31-1.214l.106-.201ZM2.998 6.829a2.995 2.995 0 0 0 2.002 0v10.342a2.993 2.993 0 0 0-2.002 0V6.83ZM12 10a2 2 0 1 1 0 4 2 2 0 0 1 0-4Zm1.84-3.919c.464.483 1.09.81 1.79.896l-1.47 2.94a2.992 2.992 0 0 0-1.79-.894l1.47-2.942ZM16 2a2 2 0 1 1 0 4 2 2 0 0 1 0-4ZM4 2a2 2 0 1 1 0 4 2 2 0 0 1 0-4Zm9.171.998a2.994 2.994 0 0 0 0 2.002H6.829a2.995 2.995 0 0 0 0-2.002h6.342Z", fill: "currentColor" }), e[0] = n) : n = e[0];
|
197
174
|
let o;
|
198
|
-
return e[1] !== t ? (o = /* @__PURE__ */
|
175
|
+
return e[1] !== t ? (o = /* @__PURE__ */ i("svg", { fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ...t, children: n }), e[1] = t, e[2] = o) : o = e[2], o;
|
199
176
|
}
|
200
|
-
function
|
201
|
-
const e =
|
202
|
-
let
|
203
|
-
e[0] === Symbol.for("react.memo_cache_sentinel") ? (
|
177
|
+
function ut(t) {
|
178
|
+
const e = R(3);
|
179
|
+
let n;
|
180
|
+
e[0] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ i("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4 18a2 2 0 1 1 0 4 2 2 0 0 1 0-4Zm16 0a2 2 0 1 1 0 4 2 2 0 0 1 0-4Zm-2.829 1a2.993 2.993 0 0 0-.17.974l-.001.052.007.183a3 3 0 0 0 .164.79H6.829a2.995 2.995 0 0 0 0-2h10.342ZM2.998 6.828a2.995 2.995 0 0 0 2.002 0V17.17a2.993 2.993 0 0 0-2.002 0V6.83Zm16.001 0a2.995 2.995 0 0 0 2 0V17.17a2.993 2.993 0 0 0-2 0V6.829ZM20 2a2 2 0 1 1 0 4 2 2 0 0 1 0-4ZM4 2a2 2 0 1 1 0 4 2 2 0 0 1 0-4Zm13.171.998a2.991 2.991 0 0 0-.17.976L17 4.026l.007.183a3 3 0 0 0 .164.79H6.829a2.995 2.995 0 0 0 0-2H17.17Z", fill: "currentColor" }), e[0] = n) : n = e[0];
|
204
181
|
let o;
|
205
|
-
return e[1] !== t ? (o = /* @__PURE__ */
|
182
|
+
return e[1] !== t ? (o = /* @__PURE__ */ i("svg", { fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ...t, children: n }), e[1] = t, e[2] = o) : o = e[2], o;
|
206
183
|
}
|
207
|
-
function
|
208
|
-
const e =
|
209
|
-
let
|
210
|
-
e[0] === Symbol.for("react.memo_cache_sentinel") ? (
|
184
|
+
function mt(t) {
|
185
|
+
const e = R(3);
|
186
|
+
let n;
|
187
|
+
e[0] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ i("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2Zm0 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm0 6a2 2 0 1 1 0 4 2 2 0 0 1 0-4Z", fill: "currentColor" }), e[0] = n) : n = e[0];
|
211
188
|
let o;
|
212
|
-
return e[1] !== t ? (o = /* @__PURE__ */
|
189
|
+
return e[1] !== t ? (o = /* @__PURE__ */ i("svg", { fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ...t, children: n }), e[1] = t, e[2] = o) : o = e[2], o;
|
213
190
|
}
|
214
|
-
function
|
215
|
-
const e =
|
216
|
-
let
|
217
|
-
e[0] === Symbol.for("react.memo_cache_sentinel") ? (
|
191
|
+
function ht(t) {
|
192
|
+
const e = R(3);
|
193
|
+
let n;
|
194
|
+
e[0] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ i("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12 3c4.935 0 9 3.736 9 9l-.002.343-.012.668c-.012.438-.033.86-.062 1.266l-.05.597C20.498 18.767 19.267 21 17 21c-1.192 0-1.971-.341-2.988-1.122l-.472-.375c-.401-.319-.64-.473-.888-.566a4.938 4.938 0 0 0-.415-.13l-.34-.085-.398-.086-.456-.086-.66-.111-1.708-.273a9.112 9.112 0 0 1-.952-.206C5.46 17.301 3 14.954 3 12.015c0-1.508.485-2.995 1.436-4.458.355.585.906 1.04 1.562 1.272C5.328 9.916 5 10.977 5 12.015c0 1.889 1.78 3.588 3.282 4.025l.085.023.345.076.517.092 1.619.257.583.1.518.098.237.05.433.103c.272.07.512.143.73.224.434.161.783.373 1.235.718l.457.362c.806.646 1.24.857 1.959.857.893 0 1.63-1.518 1.895-4.45l.045-.585c.013-.2.024-.407.033-.62l.02-.655c.005-.224.007-.454.007-.69 0-4.12-3.133-7-7-7a1 1 0 1 1 0-2ZM7 4a2 2 0 1 1 0 4 2 2 0 0 1 0-4Z", fill: "currentColor" }), e[0] = n) : n = e[0];
|
218
195
|
let o;
|
219
|
-
return e[1] !== t ? (o = /* @__PURE__ */
|
196
|
+
return e[1] !== t ? (o = /* @__PURE__ */ i("svg", { fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ...t, children: n }), e[1] = t, e[2] = o) : o = e[2], o;
|
220
197
|
}
|
221
|
-
function
|
222
|
-
const e =
|
223
|
-
let
|
224
|
-
e[0] === Symbol.for("react.memo_cache_sentinel") ? (
|
198
|
+
function ft(t) {
|
199
|
+
const e = R(3);
|
200
|
+
let n;
|
201
|
+
e[0] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ i("path", { fillRule: "evenodd", clipRule: "evenodd", d: "m10.083 19.394.057.113a1 1 0 0 0 1.72.007l2.869-4.786 4.786-2.87a1 1 0 0 0-.121-1.777l-14-6c-.83-.356-1.669.483-1.313 1.313l6.002 14ZM6.905 6.904l9.903 4.244-3.322 1.995-.102.069a1 1 0 0 0-.242.274l-1.992 3.321-4.245-9.903Z", fill: "currentColor" }), e[0] = n) : n = e[0];
|
225
202
|
let o;
|
226
|
-
return e[1] !== t ? (o = /* @__PURE__ */
|
203
|
+
return e[1] !== t ? (o = /* @__PURE__ */ i("svg", { fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ...t, children: n }), e[1] = t, e[2] = o) : o = e[2], o;
|
227
204
|
}
|
228
205
|
const E = {
|
229
206
|
action: {
|
@@ -261,261 +238,268 @@ const E = {
|
|
261
238
|
},
|
262
239
|
deleteAll: "Remove all"
|
263
240
|
}
|
264
|
-
},
|
241
|
+
}, Et = {
|
265
242
|
polygon: {
|
266
|
-
icon:
|
243
|
+
icon: dt
|
267
244
|
},
|
268
245
|
rectangle: {
|
269
|
-
icon:
|
246
|
+
icon: ut
|
270
247
|
},
|
271
248
|
circle: {
|
272
|
-
icon:
|
249
|
+
icon: mt
|
273
250
|
},
|
274
251
|
lasso: {
|
275
|
-
icon:
|
252
|
+
icon: ht
|
276
253
|
},
|
277
254
|
edit: {
|
278
|
-
icon:
|
255
|
+
icon: ft
|
279
256
|
}
|
280
257
|
};
|
281
|
-
function
|
258
|
+
function pt(t) {
|
282
259
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
283
260
|
}
|
284
|
-
var
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
}
|
294
|
-
var bt = typeof Symbol == "function" && Symbol.for, Mt = bt ? Symbol.for("react.element") : 60103;
|
295
|
-
function Ct(t) {
|
296
|
-
return t.$$typeof === Mt;
|
297
|
-
}
|
298
|
-
function Tt(t) {
|
299
|
-
return Array.isArray(t) ? [] : {};
|
300
|
-
}
|
301
|
-
function de(t, e) {
|
302
|
-
return e.clone !== !1 && e.isMergeableObject(t) ? le(Tt(t), t, e) : t;
|
303
|
-
}
|
304
|
-
function St(t, e, i) {
|
305
|
-
return t.concat(e).map(function(o) {
|
306
|
-
return de(o, i);
|
307
|
-
});
|
308
|
-
}
|
309
|
-
function At(t, e) {
|
310
|
-
if (!e.customMerge)
|
311
|
-
return le;
|
312
|
-
var i = e.customMerge(t);
|
313
|
-
return typeof i == "function" ? i : le;
|
314
|
-
}
|
315
|
-
function _t(t) {
|
316
|
-
return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(t).filter(function(e) {
|
317
|
-
return Object.propertyIsEnumerable.call(t, e);
|
318
|
-
}) : [];
|
319
|
-
}
|
320
|
-
function De(t) {
|
321
|
-
return Object.keys(t).concat(_t(t));
|
322
|
-
}
|
323
|
-
function Pe(t, e) {
|
324
|
-
try {
|
325
|
-
return e in t;
|
326
|
-
} catch {
|
327
|
-
return !1;
|
261
|
+
var we, _e;
|
262
|
+
function gt() {
|
263
|
+
if (_e) return we;
|
264
|
+
_e = 1;
|
265
|
+
var t = function(u) {
|
266
|
+
return e(u) && !n(u);
|
267
|
+
};
|
268
|
+
function e(a) {
|
269
|
+
return !!a && typeof a == "object";
|
328
270
|
}
|
271
|
+
function n(a) {
|
272
|
+
var u = Object.prototype.toString.call(a);
|
273
|
+
return u === "[object RegExp]" || u === "[object Date]" || d(a);
|
274
|
+
}
|
275
|
+
var o = typeof Symbol == "function" && Symbol.for, l = o ? Symbol.for("react.element") : 60103;
|
276
|
+
function d(a) {
|
277
|
+
return a.$$typeof === l;
|
278
|
+
}
|
279
|
+
function r(a) {
|
280
|
+
return Array.isArray(a) ? [] : {};
|
281
|
+
}
|
282
|
+
function s(a, u) {
|
283
|
+
return u.clone !== !1 && u.isMergeableObject(a) ? y(r(a), a, u) : a;
|
284
|
+
}
|
285
|
+
function c(a, u, g) {
|
286
|
+
return a.concat(u).map(function(C) {
|
287
|
+
return s(C, g);
|
288
|
+
});
|
289
|
+
}
|
290
|
+
function h(a, u) {
|
291
|
+
if (!u.customMerge)
|
292
|
+
return y;
|
293
|
+
var g = u.customMerge(a);
|
294
|
+
return typeof g == "function" ? g : y;
|
295
|
+
}
|
296
|
+
function m(a) {
|
297
|
+
return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(a).filter(function(u) {
|
298
|
+
return Object.propertyIsEnumerable.call(a, u);
|
299
|
+
}) : [];
|
300
|
+
}
|
301
|
+
function f(a) {
|
302
|
+
return Object.keys(a).concat(m(a));
|
303
|
+
}
|
304
|
+
function v(a, u) {
|
305
|
+
try {
|
306
|
+
return u in a;
|
307
|
+
} catch {
|
308
|
+
return !1;
|
309
|
+
}
|
310
|
+
}
|
311
|
+
function p(a, u) {
|
312
|
+
return v(a, u) && !(Object.hasOwnProperty.call(a, u) && Object.propertyIsEnumerable.call(a, u));
|
313
|
+
}
|
314
|
+
function A(a, u, g) {
|
315
|
+
var C = {};
|
316
|
+
return g.isMergeableObject(a) && f(a).forEach(function(x) {
|
317
|
+
C[x] = s(a[x], g);
|
318
|
+
}), f(u).forEach(function(x) {
|
319
|
+
p(a, x) || (v(a, x) && g.isMergeableObject(u[x]) ? C[x] = h(x, g)(a[x], u[x], g) : C[x] = s(u[x], g));
|
320
|
+
}), C;
|
321
|
+
}
|
322
|
+
function y(a, u, g) {
|
323
|
+
g = g || {}, g.arrayMerge = g.arrayMerge || c, g.isMergeableObject = g.isMergeableObject || t, g.cloneUnlessOtherwiseSpecified = s;
|
324
|
+
var C = Array.isArray(u), x = Array.isArray(a), _ = C === x;
|
325
|
+
return _ ? C ? g.arrayMerge(a, u, g) : A(a, u, g) : s(u, g);
|
326
|
+
}
|
327
|
+
y.all = function(u, g) {
|
328
|
+
if (!Array.isArray(u))
|
329
|
+
throw new Error("first argument should be an array");
|
330
|
+
return u.reduce(function(C, x) {
|
331
|
+
return y(C, x, g);
|
332
|
+
}, {});
|
333
|
+
};
|
334
|
+
var M = y;
|
335
|
+
return we = M, we;
|
329
336
|
}
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
o[n] = de(t[n], i);
|
337
|
-
}), De(e).forEach(function(n) {
|
338
|
-
Dt(t, n) || (Pe(t, n) && i.isMergeableObject(e[n]) ? o[n] = At(n, i)(t[n], e[n], i) : o[n] = de(e[n], i));
|
339
|
-
}), o;
|
340
|
-
}
|
341
|
-
function le(t, e, i) {
|
342
|
-
i = i || {}, i.arrayMerge = i.arrayMerge || St, i.isMergeableObject = i.isMergeableObject || yt, i.cloneUnlessOtherwiseSpecified = de;
|
343
|
-
var o = Array.isArray(e), n = Array.isArray(t), a = o === n;
|
344
|
-
return a ? o ? i.arrayMerge(t, e, i) : Lt(t, e, i) : de(e, i);
|
345
|
-
}
|
346
|
-
le.all = function(e, i) {
|
347
|
-
if (!Array.isArray(e))
|
348
|
-
throw new Error("first argument should be an array");
|
349
|
-
return e.reduce(function(o, n) {
|
350
|
-
return le(o, n, i);
|
351
|
-
}, {});
|
352
|
-
};
|
353
|
-
var Ot = le, Rt = Ot;
|
354
|
-
const Te = /* @__PURE__ */ vt(Rt);
|
355
|
-
function je(t) {
|
356
|
-
var b;
|
357
|
-
const e = I(18), {
|
358
|
-
chipProps: i,
|
337
|
+
var vt = gt();
|
338
|
+
const Ce = /* @__PURE__ */ pt(vt);
|
339
|
+
function ke(t) {
|
340
|
+
var a;
|
341
|
+
const e = R(18), {
|
342
|
+
chipProps: n,
|
359
343
|
value: o,
|
360
|
-
labels:
|
361
|
-
onChipToggle:
|
344
|
+
labels: l,
|
345
|
+
onChipToggle: d,
|
362
346
|
onDelete: r
|
363
|
-
} = t, s = o.visible ? "active" : "inactive", c = ((
|
364
|
-
let
|
365
|
-
e[0] === Symbol.for("react.memo_cache_sentinel") ? (
|
347
|
+
} = t, s = o.visible ? "active" : "inactive", c = ((a = l == null ? void 0 : l.tooltip) == null ? void 0 : a[s]) ?? E.chip.tooltip[s], h = n == null ? void 0 : n.TooltipProps;
|
348
|
+
let m;
|
349
|
+
e[0] === Symbol.for("react.memo_cache_sentinel") ? (m = {
|
366
350
|
...G.chip.chip
|
367
|
-
}, e[0] =
|
368
|
-
const
|
369
|
-
let
|
370
|
-
e[1] !== r || e[2] !== o.id ? (
|
371
|
-
let
|
372
|
-
e[4] !==
|
373
|
-
const
|
374
|
-
let
|
375
|
-
e[8] !==
|
376
|
-
let
|
377
|
-
return e[14] !== c || e[15] !==
|
351
|
+
}, e[0] = m) : m = e[0];
|
352
|
+
const f = o.visible ? "secondary" : "default";
|
353
|
+
let v;
|
354
|
+
e[1] !== r || e[2] !== o.id ? (v = () => r(o.id), e[1] = r, e[2] = o.id, e[3] = v) : v = e[3];
|
355
|
+
let p;
|
356
|
+
e[4] !== d || e[5] !== o.id || e[6] !== o.visible ? (p = () => d(o.id, !o.visible), e[4] = d, e[5] = o.id, e[6] = o.visible, e[7] = p) : p = e[7];
|
357
|
+
const A = n == null ? void 0 : n.ChipsProps;
|
358
|
+
let y;
|
359
|
+
e[8] !== f || e[9] !== v || e[10] !== p || e[11] !== A || e[12] !== o.label ? (y = /* @__PURE__ */ i(Ge, { sx: m, color: f, size: "small", onDelete: v, label: o.label, onClick: p, ...A }), e[8] = f, e[9] = v, e[10] = p, e[11] = A, e[12] = o.label, e[13] = y) : y = e[13];
|
360
|
+
let M;
|
361
|
+
return e[14] !== c || e[15] !== h || e[16] !== y ? (M = /* @__PURE__ */ i(le, { title: c, placement: "bottom", ...h, children: y }), e[14] = c, e[15] = h, e[16] = y, e[17] = M) : M = e[17], M;
|
378
362
|
}
|
379
|
-
function
|
363
|
+
function $t({
|
380
364
|
enabled: t,
|
381
365
|
values: e = [],
|
382
|
-
actionProps:
|
366
|
+
actionProps: n,
|
383
367
|
chipProps: o,
|
384
|
-
labels:
|
385
|
-
modes:
|
368
|
+
labels: l,
|
369
|
+
modes: d,
|
386
370
|
modesMapping: r,
|
387
371
|
modeSelected: s,
|
388
372
|
PaperProps: {
|
389
373
|
sx: c,
|
390
|
-
...
|
374
|
+
...h
|
391
375
|
} = {},
|
392
|
-
onActionToggle:
|
393
|
-
onChipToggle:
|
394
|
-
onDelete:
|
395
|
-
onChangeMode:
|
396
|
-
onAllChipToggle:
|
397
|
-
onAllDelete:
|
376
|
+
onActionToggle: m,
|
377
|
+
onChipToggle: f,
|
378
|
+
onDelete: v,
|
379
|
+
onChangeMode: p,
|
380
|
+
onAllChipToggle: A,
|
381
|
+
onAllDelete: y
|
398
382
|
}) {
|
399
|
-
const
|
400
|
-
edit:
|
401
|
-
...
|
402
|
-
} =
|
403
|
-
return /* @__PURE__ */
|
383
|
+
const M = be(() => Ce(d, r), [d, r]), {
|
384
|
+
edit: a,
|
385
|
+
...u
|
386
|
+
} = M, g = (b) => (m(!1), v(b)), C = (b) => m(b), x = (b) => p == null ? void 0 : p(b), T = (s ?? "") in d ? s : Object.keys(M)[0], w = M[T], S = Object.values(u);
|
387
|
+
return /* @__PURE__ */ D(ve, { sx: {
|
404
388
|
...G.container,
|
405
389
|
...c
|
406
|
-
}, ...
|
407
|
-
/* @__PURE__ */
|
408
|
-
/* @__PURE__ */
|
409
|
-
/* @__PURE__ */
|
410
|
-
!!
|
411
|
-
/* @__PURE__ */
|
412
|
-
/* @__PURE__ */
|
413
|
-
...
|
390
|
+
}, ...h, children: [
|
391
|
+
/* @__PURE__ */ i(yt, { actionProps: n, labels: l == null ? void 0 : l.action, enabled: t, onActionToggle: C, children: (w == null ? void 0 : w.icon) && /* @__PURE__ */ i(w.icon, {}) }),
|
392
|
+
/* @__PURE__ */ i(Be, { children: (b) => /* @__PURE__ */ D(j, { children: [
|
393
|
+
/* @__PURE__ */ i(wt, { data: S, labels: l == null ? void 0 : l.options, children: /* @__PURE__ */ i(De, { ...b, labels: l == null ? void 0 : l.options, data: S, modeSelected: T, onChangeMode: x }) }),
|
394
|
+
!!a && /* @__PURE__ */ D(j, { children: [
|
395
|
+
/* @__PURE__ */ i(K, {}),
|
396
|
+
/* @__PURE__ */ i(De, { ...b, labels: l == null ? void 0 : l.options, data: [{
|
397
|
+
...a,
|
414
398
|
disabled: !e.length
|
415
|
-
}], modeSelected:
|
399
|
+
}], modeSelected: T, onChangeMode: x })
|
416
400
|
] })
|
417
401
|
] }) }),
|
418
|
-
!!e.length && /* @__PURE__ */
|
419
|
-
/* @__PURE__ */
|
402
|
+
!!e.length && /* @__PURE__ */ i(ee, { sx: G.chip.container, children: e.map((b) => /* @__PURE__ */ i(ke, { value: b, labels: l == null ? void 0 : l.chip, chipProps: o, onDelete: g, onChipToggle: f }, b.id)) }),
|
403
|
+
/* @__PURE__ */ i(xt, { values: e, labels: l == null ? void 0 : l.actions, onAllChipToggle: A, onAllDelete: y })
|
420
404
|
] });
|
421
405
|
}
|
422
|
-
function
|
423
|
-
var
|
424
|
-
const e =
|
425
|
-
actionProps:
|
406
|
+
function yt(t) {
|
407
|
+
var p;
|
408
|
+
const e = R(12), {
|
409
|
+
actionProps: n,
|
426
410
|
labels: o,
|
427
|
-
enabled:
|
428
|
-
children:
|
411
|
+
enabled: l,
|
412
|
+
children: d,
|
429
413
|
onActionToggle: r
|
430
|
-
} = t, s =
|
431
|
-
let d;
|
432
|
-
e[0] !== n || e[1] !== r ? (d = () => r(!n), e[0] = n, e[1] = r, e[2] = d) : d = e[2];
|
414
|
+
} = t, s = l ? "active" : "inactive", c = ((p = o == null ? void 0 : o.tooltip) == null ? void 0 : p[s]) ?? E.action.tooltip[s], h = n == null ? void 0 : n.TooltipProps;
|
433
415
|
let m;
|
434
|
-
e[
|
416
|
+
e[0] !== l || e[1] !== r ? (m = () => r(!l), e[0] = l, e[1] = r, e[2] = m) : m = e[2];
|
435
417
|
let f;
|
436
|
-
|
418
|
+
e[3] !== c || e[4] !== d || e[5] !== l || e[6] !== m ? (f = /* @__PURE__ */ i(ae, { value: "toggle", sx: G.actions.icon, onClick: m, "aria-label": c, selected: l, children: d }), e[3] = c, e[4] = d, e[5] = l, e[6] = m, e[7] = f) : f = e[7];
|
419
|
+
let v;
|
420
|
+
return e[8] !== c || e[9] !== h || e[10] !== f ? (v = /* @__PURE__ */ i(le, { title: c, placement: "right", ...h, children: f }), e[8] = c, e[9] = h, e[10] = f, e[11] = v) : v = e[11], v;
|
437
421
|
}
|
438
|
-
function
|
422
|
+
function Be({
|
439
423
|
TriggerProps: {
|
440
|
-
Icon: t = /* @__PURE__ */
|
424
|
+
Icon: t = /* @__PURE__ */ i(Ze, {}),
|
441
425
|
sx: e
|
442
426
|
} = {},
|
443
|
-
MenuProps:
|
427
|
+
MenuProps: n,
|
444
428
|
children: o
|
445
429
|
}) {
|
446
|
-
const [
|
447
|
-
|
430
|
+
const [l, d] = ie(null), r = !!l, s = (h) => {
|
431
|
+
d(h.currentTarget);
|
448
432
|
}, c = () => {
|
449
|
-
|
433
|
+
d(null);
|
450
434
|
};
|
451
|
-
return /* @__PURE__ */
|
452
|
-
/* @__PURE__ */
|
435
|
+
return /* @__PURE__ */ D(j, { children: [
|
436
|
+
/* @__PURE__ */ i(Q, { sx: {
|
453
437
|
...G.options.icon,
|
454
438
|
...e
|
455
439
|
}, onClick: s, children: t }),
|
456
|
-
/* @__PURE__ */
|
440
|
+
/* @__PURE__ */ i(Oe, { id: "lasso-menu", anchorEl: l, open: r, onClose: c, MenuListProps: {
|
457
441
|
"aria-labelledby": "lasso-button",
|
458
442
|
sx: G.options.menu
|
459
|
-
}, ...
|
443
|
+
}, ...n, children: /* @__PURE__ */ i("div", { children: o({
|
460
444
|
onClose: c
|
461
445
|
}) }) })
|
462
446
|
] });
|
463
447
|
}
|
464
|
-
function
|
448
|
+
function wt(t) {
|
465
449
|
var c;
|
466
|
-
const e =
|
467
|
-
data:
|
450
|
+
const e = R(5), {
|
451
|
+
data: n,
|
468
452
|
labels: o,
|
469
|
-
children:
|
453
|
+
children: l
|
470
454
|
} = t;
|
471
|
-
if (
|
455
|
+
if (n.length <= 1)
|
472
456
|
return null;
|
473
|
-
const
|
457
|
+
const d = ((c = o == null ? void 0 : o.mode) == null ? void 0 : c.title) ?? E.options.mode.title;
|
474
458
|
let r;
|
475
|
-
e[0] !==
|
459
|
+
e[0] !== d ? (r = /* @__PURE__ */ i(H, { variant: "subtitle2", color: "text.secondary", sx: G.options.title, children: d }), e[0] = d, e[1] = r) : r = e[1];
|
476
460
|
let s;
|
477
|
-
return e[2] !==
|
461
|
+
return e[2] !== l || e[3] !== r ? (s = /* @__PURE__ */ D(j, { children: [
|
478
462
|
r,
|
479
|
-
|
480
|
-
] }), e[2] =
|
463
|
+
l
|
464
|
+
] }), e[2] = l, e[3] = r, e[4] = s) : s = e[4], s;
|
481
465
|
}
|
482
|
-
function
|
466
|
+
function De({
|
483
467
|
data: t,
|
484
468
|
modeSelected: e,
|
485
|
-
labels:
|
469
|
+
labels: n,
|
486
470
|
onChangeMode: o,
|
487
|
-
onClose:
|
471
|
+
onClose: l
|
488
472
|
}) {
|
489
|
-
const
|
490
|
-
r.preventDefault(), o == null || o(s),
|
473
|
+
const d = (r, s) => {
|
474
|
+
r.preventDefault(), o == null || o(s), l();
|
491
475
|
};
|
492
476
|
return t.map((r) => {
|
493
|
-
var
|
494
|
-
const c = (((
|
495
|
-
return /* @__PURE__ */
|
496
|
-
/* @__PURE__ */
|
497
|
-
/* @__PURE__ */
|
477
|
+
var h;
|
478
|
+
const c = (((h = n == null ? void 0 : n.mode) == null ? void 0 : h.options) ?? E.options.mode.options)[r.value];
|
479
|
+
return /* @__PURE__ */ D(re, { disabled: !!r.disabled, onClick: (m) => d(m, r.value), selected: r.value === e, children: [
|
480
|
+
/* @__PURE__ */ i(Ie, { sx: G.options.icons, children: /* @__PURE__ */ i(Me, { children: /* @__PURE__ */ i(r.icon, {}) }) }),
|
481
|
+
/* @__PURE__ */ i(ce, { children: c })
|
498
482
|
] }, r.value);
|
499
483
|
});
|
500
484
|
}
|
501
|
-
function
|
502
|
-
var
|
503
|
-
const e =
|
504
|
-
values:
|
485
|
+
function xt(t) {
|
486
|
+
var p, A;
|
487
|
+
const e = R(8), {
|
488
|
+
values: n,
|
505
489
|
labels: o,
|
506
|
-
onAllChipToggle:
|
507
|
-
onAllDelete:
|
490
|
+
onAllChipToggle: l,
|
491
|
+
onAllDelete: d
|
508
492
|
} = t;
|
509
|
-
if (
|
493
|
+
if (n.length <= 1)
|
510
494
|
return null;
|
511
|
-
const s =
|
512
|
-
let
|
513
|
-
e[0] === Symbol.for("react.memo_cache_sentinel") ? (
|
514
|
-
let
|
515
|
-
e[1] === Symbol.for("react.memo_cache_sentinel") ? (
|
516
|
-
Icon: /* @__PURE__ */
|
495
|
+
const s = n.some(Mt) ? ((p = o == null ? void 0 : o.toggleAll) == null ? void 0 : p.active) ?? E.actions.toggleAll.active : ((A = o == null ? void 0 : o.toggleAll) == null ? void 0 : A.inactive) ?? E.actions.toggleAll.inactive, c = (o == null ? void 0 : o.deleteAll) ?? E.actions.deleteAll;
|
496
|
+
let h;
|
497
|
+
e[0] === Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ i(K, { orientation: "vertical", flexItem: !0 }), e[0] = h) : h = e[0];
|
498
|
+
let m, f;
|
499
|
+
e[1] === Symbol.for("react.memo_cache_sentinel") ? (m = {
|
500
|
+
Icon: /* @__PURE__ */ i(tt, {}),
|
517
501
|
sx: G.options.more
|
518
|
-
},
|
502
|
+
}, f = {
|
519
503
|
anchorOrigin: {
|
520
504
|
vertical: "bottom",
|
521
505
|
horizontal: "right"
|
@@ -524,139 +508,139 @@ function kt(t) {
|
|
524
508
|
vertical: "top",
|
525
509
|
horizontal: "right"
|
526
510
|
}
|
527
|
-
}, e[1] =
|
528
|
-
let
|
529
|
-
return e[3] !== c || e[4] !==
|
530
|
-
|
531
|
-
/* @__PURE__ */
|
532
|
-
/* @__PURE__ */
|
533
|
-
|
511
|
+
}, e[1] = m, e[2] = f) : (m = e[1], f = e[2]);
|
512
|
+
let v;
|
513
|
+
return e[3] !== c || e[4] !== l || e[5] !== d || e[6] !== s ? (v = /* @__PURE__ */ D(j, { children: [
|
514
|
+
h,
|
515
|
+
/* @__PURE__ */ i(Be, { TriggerProps: m, MenuProps: f, children: (y) => /* @__PURE__ */ D(j, { children: [
|
516
|
+
/* @__PURE__ */ i(re, { color: "inherit", onClick: () => {
|
517
|
+
l(), y.onClose();
|
534
518
|
}, children: s }),
|
535
|
-
/* @__PURE__ */
|
536
|
-
/* @__PURE__ */
|
537
|
-
|
538
|
-
}, children: /* @__PURE__ */
|
519
|
+
/* @__PURE__ */ i(K, {}),
|
520
|
+
/* @__PURE__ */ i(re, { color: "error", onClick: () => {
|
521
|
+
d(), y.onClose();
|
522
|
+
}, children: /* @__PURE__ */ i(H, { variant: "body2", color: "error", children: c }) })
|
539
523
|
] }) })
|
540
|
-
] }), e[3] = c, e[4] =
|
524
|
+
] }), e[3] = c, e[4] = l, e[5] = d, e[6] = s, e[7] = v) : v = e[7], v;
|
541
525
|
}
|
542
|
-
function
|
526
|
+
function Mt(t) {
|
543
527
|
return t.visible;
|
544
528
|
}
|
545
|
-
function
|
529
|
+
function Ut({
|
546
530
|
enabled: t,
|
547
531
|
values: e = [],
|
548
|
-
chipProps:
|
532
|
+
chipProps: n,
|
549
533
|
labels: o,
|
550
|
-
modes:
|
551
|
-
modesMapping:
|
534
|
+
modes: l,
|
535
|
+
modesMapping: d,
|
552
536
|
modeSelected: r,
|
553
537
|
BoxProps: {
|
554
538
|
sx: s,
|
555
539
|
...c
|
556
540
|
} = {},
|
557
|
-
onChipToggle:
|
558
|
-
onDelete:
|
559
|
-
onChangeMode:
|
560
|
-
onAllChipToggle:
|
561
|
-
onAllDelete:
|
541
|
+
onChipToggle: h,
|
542
|
+
onDelete: m,
|
543
|
+
onChangeMode: f,
|
544
|
+
onAllChipToggle: v,
|
545
|
+
onAllDelete: p
|
562
546
|
}) {
|
563
|
-
const
|
564
|
-
edit:
|
565
|
-
...
|
566
|
-
} =
|
567
|
-
|
568
|
-
},
|
569
|
-
return /* @__PURE__ */
|
547
|
+
const A = be(() => Ce(l, d), [l, d]), {
|
548
|
+
edit: y,
|
549
|
+
...M
|
550
|
+
} = A, a = (T) => m(T), u = (T, w) => {
|
551
|
+
T.preventDefault(), f == null || f(w);
|
552
|
+
}, C = (r ?? "") in l ? r : Object.keys(A)[0], x = t ? A[C] : null, _ = Object.values(M);
|
553
|
+
return /* @__PURE__ */ D(ee, { sx: {
|
570
554
|
...G.container,
|
571
555
|
...s
|
572
556
|
}, ...c, className: "inline", children: [
|
573
|
-
/* @__PURE__ */
|
574
|
-
/* @__PURE__ */
|
575
|
-
!!
|
576
|
-
/* @__PURE__ */
|
577
|
-
/* @__PURE__ */
|
578
|
-
...
|
557
|
+
/* @__PURE__ */ i(bt, { data: _, labels: o == null ? void 0 : o.options, children: /* @__PURE__ */ D(Re, { value: x == null ? void 0 : x.value, exclusive: !0, className: "inline", sx: G.options.menu, onChange: u, children: [
|
558
|
+
/* @__PURE__ */ i(Le, { labels: o == null ? void 0 : o.options, data: _ }),
|
559
|
+
!!y && /* @__PURE__ */ D(j, { children: [
|
560
|
+
/* @__PURE__ */ i(K, { orientation: "vertical" }),
|
561
|
+
/* @__PURE__ */ i(Le, { labels: o == null ? void 0 : o.options, data: [{
|
562
|
+
...y,
|
579
563
|
disabled: !e.length
|
580
564
|
}] })
|
581
565
|
] })
|
582
566
|
] }) }),
|
583
|
-
/* @__PURE__ */
|
584
|
-
/* @__PURE__ */
|
585
|
-
!!e.length && /* @__PURE__ */
|
586
|
-
/* @__PURE__ */
|
567
|
+
/* @__PURE__ */ i(K, { flexItem: !0 }),
|
568
|
+
/* @__PURE__ */ i(Ct, { hasValues: !!e.length, labels: o == null ? void 0 : o.noData }),
|
569
|
+
!!e.length && /* @__PURE__ */ i(ee, { sx: G.chip.container, className: "inline", children: e.map((T) => /* @__PURE__ */ i(ke, { value: T, labels: o == null ? void 0 : o.chip, chipProps: n, onDelete: a, onChipToggle: h }, T.id)) }),
|
570
|
+
/* @__PURE__ */ i(Tt, { values: e, labels: o == null ? void 0 : o.actions, onAllChipToggle: v, onAllDelete: p })
|
587
571
|
] });
|
588
572
|
}
|
589
|
-
function
|
573
|
+
function bt(t) {
|
590
574
|
var c;
|
591
|
-
const e =
|
592
|
-
data:
|
575
|
+
const e = R(5), {
|
576
|
+
data: n,
|
593
577
|
labels: o,
|
594
|
-
children:
|
578
|
+
children: l
|
595
579
|
} = t;
|
596
|
-
if (
|
580
|
+
if (n.length <= 1)
|
597
581
|
return null;
|
598
|
-
const
|
582
|
+
const d = ((c = o == null ? void 0 : o.mode) == null ? void 0 : c.title) ?? E.options.mode.title;
|
599
583
|
let r;
|
600
|
-
e[0] !==
|
584
|
+
e[0] !== d ? (r = /* @__PURE__ */ i(H, { variant: "subtitle2", color: "text.secondary", sx: G.options.title, className: "inline", children: d }), e[0] = d, e[1] = r) : r = e[1];
|
601
585
|
let s;
|
602
|
-
return e[2] !==
|
586
|
+
return e[2] !== l || e[3] !== r ? (s = /* @__PURE__ */ D(j, { children: [
|
603
587
|
r,
|
604
|
-
|
605
|
-
] }), e[2] =
|
588
|
+
l
|
589
|
+
] }), e[2] = l, e[3] = r, e[4] = s) : s = e[4], s;
|
606
590
|
}
|
607
|
-
function
|
591
|
+
function Le({
|
608
592
|
data: t,
|
609
593
|
labels: e
|
610
594
|
}) {
|
611
|
-
return t.map((
|
612
|
-
var
|
613
|
-
const
|
614
|
-
return /* @__PURE__ */
|
595
|
+
return t.map((n) => {
|
596
|
+
var d;
|
597
|
+
const l = (((d = e == null ? void 0 : e.mode) == null ? void 0 : d.options) ?? E.options.mode.options)[n.value];
|
598
|
+
return /* @__PURE__ */ i(le, { title: l, placement: "bottom", children: /* @__PURE__ */ i(ae, { disabled: !!n.disabled, value: n.value, "aria-label": n.value, children: /* @__PURE__ */ i(Me, { children: /* @__PURE__ */ i(n.icon, {}) }) }) }, n.value);
|
615
599
|
});
|
616
600
|
}
|
617
|
-
function
|
618
|
-
const e =
|
619
|
-
hasValues:
|
601
|
+
function Ct(t) {
|
602
|
+
const e = R(7), {
|
603
|
+
hasValues: n,
|
620
604
|
labels: o
|
621
605
|
} = t;
|
622
|
-
if (
|
606
|
+
if (n)
|
623
607
|
return null;
|
624
|
-
const
|
608
|
+
const l = (o == null ? void 0 : o.title) ?? E.noData.title, d = (o == null ? void 0 : o.description) ?? E.noData.description;
|
625
609
|
let r;
|
626
|
-
e[0] !==
|
610
|
+
e[0] !== l ? (r = /* @__PURE__ */ i(H, { variant: "body1", color: "textSecondary", children: l }), e[0] = l, e[1] = r) : r = e[1];
|
627
611
|
let s;
|
628
|
-
e[2] !==
|
612
|
+
e[2] !== d ? (s = /* @__PURE__ */ i(H, { variant: "body2", color: "textSecondary", children: d }), e[2] = d, e[3] = s) : s = e[3];
|
629
613
|
let c;
|
630
|
-
return e[4] !== r || e[5] !== s ? (c = /* @__PURE__ */
|
614
|
+
return e[4] !== r || e[5] !== s ? (c = /* @__PURE__ */ D(j, { children: [
|
631
615
|
r,
|
632
616
|
s
|
633
617
|
] }), e[4] = r, e[5] = s, e[6] = c) : c = e[6], c;
|
634
618
|
}
|
635
|
-
function
|
636
|
-
var
|
637
|
-
const e =
|
638
|
-
values:
|
619
|
+
function Tt(t) {
|
620
|
+
var v, p;
|
621
|
+
const e = R(9), {
|
622
|
+
values: n,
|
639
623
|
labels: o,
|
640
|
-
onAllChipToggle:
|
641
|
-
onAllDelete:
|
624
|
+
onAllChipToggle: l,
|
625
|
+
onAllDelete: d
|
642
626
|
} = t;
|
643
|
-
if (
|
627
|
+
if (n.length <= 1)
|
644
628
|
return null;
|
645
|
-
const s =
|
646
|
-
let
|
647
|
-
e[0] !==
|
648
|
-
let d;
|
649
|
-
e[3] !== c || e[4] !== a ? (d = /* @__PURE__ */ l(ye, { color: "error", onClick: a, children: c }), e[3] = c, e[4] = a, e[5] = d) : d = e[5];
|
629
|
+
const s = n.some(St) ? ((v = o == null ? void 0 : o.toggleAll) == null ? void 0 : v.active) ?? E.actions.toggleAll.active : ((p = o == null ? void 0 : o.toggleAll) == null ? void 0 : p.inactive) ?? E.actions.toggleAll.inactive, c = (o == null ? void 0 : o.deleteAll) ?? E.actions.deleteAll;
|
630
|
+
let h;
|
631
|
+
e[0] !== l || e[1] !== s ? (h = /* @__PURE__ */ i(ge, { color: "inherit", onClick: l, children: s }), e[0] = l, e[1] = s, e[2] = h) : h = e[2];
|
650
632
|
let m;
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
633
|
+
e[3] !== c || e[4] !== d ? (m = /* @__PURE__ */ i(ge, { color: "error", onClick: d, children: c }), e[3] = c, e[4] = d, e[5] = m) : m = e[5];
|
634
|
+
let f;
|
635
|
+
return e[6] !== h || e[7] !== m ? (f = /* @__PURE__ */ D(ee, { children: [
|
636
|
+
h,
|
637
|
+
m
|
638
|
+
] }), e[6] = h, e[7] = m, e[8] = f) : f = e[8], f;
|
655
639
|
}
|
656
|
-
function
|
640
|
+
function St(t) {
|
657
641
|
return t.visible;
|
658
642
|
}
|
659
|
-
const
|
643
|
+
const Y = {
|
660
644
|
action: {
|
661
645
|
tooltip: {
|
662
646
|
active: "Click on the map to trace the line you want to measure",
|
@@ -708,7 +692,7 @@ const q = {
|
|
708
692
|
}
|
709
693
|
}
|
710
694
|
}
|
711
|
-
},
|
695
|
+
}, At = {
|
712
696
|
"m-km": {
|
713
697
|
short: "m-km"
|
714
698
|
},
|
@@ -737,29 +721,29 @@ const q = {
|
|
737
721
|
short: "ft"
|
738
722
|
}
|
739
723
|
};
|
740
|
-
function
|
741
|
-
const e =
|
742
|
-
let
|
743
|
-
e[0] === Symbol.for("react.memo_cache_sentinel") ? (
|
724
|
+
function Vt(t) {
|
725
|
+
const e = R(3);
|
726
|
+
let n;
|
727
|
+
e[0] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ i("path", { fill: "currentColor", d: "M3 13.5c-.413 0-.766-.147-1.06-.44A1.445 1.445 0 0 1 1.5 12V6c0-.412.147-.766.44-1.06.294-.293.647-.44 1.06-.44h12c.412 0 .766.147 1.06.44.293.294.44.647.44 1.06v6c0 .412-.147.766-.44 1.06-.294.293-.647.44-1.06.44H3ZM3 12h12V6h-2.25v3h-1.5V6h-1.5v3h-1.5V6h-1.5v3h-1.5V6H3v6Z" }), e[0] = n) : n = e[0];
|
744
728
|
let o;
|
745
|
-
return e[1] !== t ? (o = /* @__PURE__ */
|
729
|
+
return e[1] !== t ? (o = /* @__PURE__ */ i("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 18 18", fill: "currentColor", ...t, children: n }), e[1] = t, e[2] = o) : o = e[2], o;
|
746
730
|
}
|
747
|
-
function
|
748
|
-
const e =
|
749
|
-
let
|
750
|
-
e[0] === Symbol.for("react.memo_cache_sentinel") ? (
|
731
|
+
function Gt(t) {
|
732
|
+
const e = R(3);
|
733
|
+
let n;
|
734
|
+
e[0] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ i("path", { fill: "currentColor", fillRule: "evenodd", d: "M9 1.5a7.5 7.5 0 1 1 0 15 7.5 7.5 0 0 1 0-15ZM9 3a6 6 0 1 0 0 12A6 6 0 0 0 9 3Zm0 4.5a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Z", clipRule: "evenodd" }), e[0] = n) : n = e[0];
|
751
735
|
let o;
|
752
|
-
return e[1] !== t ? (o = /* @__PURE__ */
|
736
|
+
return e[1] !== t ? (o = /* @__PURE__ */ i("svg", { fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 18 18", ...t, children: n }), e[1] = t, e[2] = o) : o = e[2], o;
|
753
737
|
}
|
754
|
-
function
|
755
|
-
const e =
|
756
|
-
let
|
757
|
-
e[0] === Symbol.for("react.memo_cache_sentinel") ? (
|
758
|
-
let
|
759
|
-
return e[2] !== t ? (
|
760
|
-
|
738
|
+
function Ft(t) {
|
739
|
+
const e = R(4);
|
740
|
+
let n, o;
|
741
|
+
e[0] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ i("path", { fill: "currentColor", fillRule: "evenodd", d: "M4.5 13.5v-9h9v9h-9Zm.75-8.25h7.5v7.5h-7.5v-7.5Z", clipRule: "evenodd" }), o = /* @__PURE__ */ i("path", { fill: "#2C3032", fillRule: "evenodd", d: "M1.5 3A1.5 1.5 0 0 1 3 1.5h12A1.5 1.5 0 0 1 16.5 3v12a1.5 1.5 0 0 1-1.5 1.5H3A1.5 1.5 0 0 1 1.5 15V3ZM3 3h12v12H3V3Z", clipRule: "evenodd" }), e[0] = n, e[1] = o) : (n = e[0], o = e[1]);
|
742
|
+
let l;
|
743
|
+
return e[2] !== t ? (l = /* @__PURE__ */ D("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 18 18", ...t, children: [
|
744
|
+
n,
|
761
745
|
o
|
762
|
-
] }), e[2] = t, e[3] =
|
746
|
+
] }), e[2] = t, e[3] = l) : l = e[3], l;
|
763
747
|
}
|
764
748
|
const V = {
|
765
749
|
container: {
|
@@ -826,7 +810,7 @@ const V = {
|
|
826
810
|
}) => t.primary.main,
|
827
811
|
backgroundColor: ({
|
828
812
|
palette: t
|
829
|
-
}) =>
|
813
|
+
}) => Fe(t.primary.main, 0.08)
|
830
814
|
},
|
831
815
|
modal: {
|
832
816
|
toggle: {
|
@@ -891,294 +875,282 @@ const V = {
|
|
891
875
|
}) => t(2)
|
892
876
|
}
|
893
877
|
}
|
894
|
-
},
|
895
|
-
chip: {
|
896
|
-
chip: {
|
897
|
-
marginRight: ({
|
898
|
-
spacing: t
|
899
|
-
}) => t(0.5)
|
900
|
-
},
|
901
|
-
disabled: {
|
902
|
-
opacity: ({
|
903
|
-
palette: t
|
904
|
-
}) => t.action.disabledOpacity
|
905
|
-
}
|
906
878
|
}
|
907
879
|
};
|
908
|
-
function
|
909
|
-
const e =
|
910
|
-
enabled:
|
880
|
+
function zt(t) {
|
881
|
+
const e = R(46), {
|
882
|
+
enabled: n,
|
911
883
|
actionProps: o,
|
912
|
-
labels:
|
913
|
-
modes:
|
884
|
+
labels: l,
|
885
|
+
modes: d,
|
914
886
|
modesMapping: r,
|
915
887
|
unitsMapping: s,
|
916
888
|
modeSelected: c,
|
917
|
-
PaperProps:
|
918
|
-
units:
|
919
|
-
unitSelected:
|
920
|
-
onActionToggle:
|
921
|
-
onChangeMode:
|
922
|
-
onChangeUnit:
|
923
|
-
} = t,
|
924
|
-
let
|
925
|
-
e[0] !==
|
926
|
-
let
|
927
|
-
e[2] !==
|
928
|
-
sx:
|
929
|
-
...
|
930
|
-
} =
|
931
|
-
let
|
932
|
-
e[5] !==
|
933
|
-
const
|
934
|
-
let
|
935
|
-
e[7] !==
|
936
|
-
const
|
937
|
-
let
|
938
|
-
e[10] !==
|
939
|
-
const
|
940
|
-
let
|
941
|
-
const L =
|
889
|
+
PaperProps: h,
|
890
|
+
units: m,
|
891
|
+
unitSelected: f,
|
892
|
+
onActionToggle: v,
|
893
|
+
onChangeMode: p,
|
894
|
+
onChangeUnit: A
|
895
|
+
} = t, y = s === void 0 ? At : s;
|
896
|
+
let M;
|
897
|
+
e[0] !== h ? (M = h === void 0 ? {} : h, e[0] = h, e[1] = M) : M = e[1];
|
898
|
+
let a, u;
|
899
|
+
e[2] !== M ? ({
|
900
|
+
sx: u,
|
901
|
+
...a
|
902
|
+
} = M, e[2] = M, e[3] = a, e[4] = u) : (a = e[3], u = e[4]);
|
903
|
+
let g;
|
904
|
+
e[5] !== v ? (g = (z) => v(!!z), e[5] = v, e[6] = g) : g = e[6];
|
905
|
+
const C = g;
|
906
|
+
let x, _;
|
907
|
+
e[7] !== d || e[8] !== r ? (_ = Ce(d, r), e[7] = d, e[8] = r, e[9] = _) : _ = e[9], x = _;
|
908
|
+
const T = x, w = (c ?? "") in T;
|
909
|
+
let S;
|
910
|
+
e[10] !== T || e[11] !== w || e[12] !== c ? (S = w ? c : Object.keys(T)[0], e[10] = T, e[11] = w, e[12] = c, e[13] = S) : S = e[13];
|
911
|
+
const b = S, O = T[b];
|
912
|
+
let I;
|
913
|
+
const L = m[b];
|
942
914
|
let Z;
|
943
|
-
e[14] !==
|
944
|
-
[
|
945
|
-
}, e[14] =
|
946
|
-
const B = Z[
|
915
|
+
e[14] !== b || e[15] !== L || e[16] !== m ? (Z = Object.keys(m).length >= 1 ? m : {
|
916
|
+
[b]: L.slice(0, 1)
|
917
|
+
}, e[14] = b, e[15] = L, e[16] = m, e[17] = Z) : Z = e[17];
|
918
|
+
const B = Z[b];
|
947
919
|
let k;
|
948
|
-
if (e[18] !== B || e[19] !==
|
920
|
+
if (e[18] !== B || e[19] !== y) {
|
949
921
|
let z;
|
950
|
-
e[21] !==
|
951
|
-
...
|
952
|
-
...
|
953
|
-
}), e[21] =
|
922
|
+
e[21] !== y ? (z = (ye) => ({
|
923
|
+
...ye,
|
924
|
+
...y[ye.value]
|
925
|
+
}), e[21] = y, e[22] = z) : z = e[22], k = B.map(z), e[18] = B, e[19] = y, e[20] = k;
|
954
926
|
} else
|
955
927
|
k = e[20];
|
956
|
-
|
957
|
-
const F =
|
928
|
+
I = k;
|
929
|
+
const F = I;
|
958
930
|
let $;
|
959
|
-
e[23] !==
|
931
|
+
e[23] !== u ? ($ = {
|
960
932
|
...V.container,
|
961
|
-
...
|
962
|
-
}, e[23] =
|
963
|
-
const te =
|
933
|
+
...u
|
934
|
+
}, e[23] = u, e[24] = $) : $ = e[24];
|
935
|
+
const te = l == null ? void 0 : l.action, oe = O == null ? void 0 : O.icon;
|
964
936
|
let N;
|
965
|
-
e[25] !== o || e[26] !==
|
966
|
-
const
|
967
|
-
let X;
|
968
|
-
e[31] !== F || e[32] !== y || e[33] !== v || e[34] !== h || e[35] !== M || e[36] !== ie || e[37] !== m ? (X = /* @__PURE__ */ l(Gt, { labels: ie, modes: y, modeSelected: v, units: F, unitSelected: m, onChangeMode: h, onChangeUnit: M }), e[31] = F, e[32] = y, e[33] = v, e[34] = h, e[35] = M, e[36] = ie, e[37] = m, e[38] = X) : X = e[38];
|
937
|
+
e[25] !== o || e[26] !== n || e[27] !== C || e[28] !== te || e[29] !== oe ? (N = /* @__PURE__ */ i(_t, { actionProps: o, labels: te, enabled: n, onActionToggle: C, children: oe }), e[25] = o, e[26] = n, e[27] = C, e[28] = te, e[29] = oe, e[30] = N) : N = e[30];
|
938
|
+
const ne = l == null ? void 0 : l.options;
|
969
939
|
let W;
|
970
|
-
e[
|
940
|
+
e[31] !== F || e[32] !== T || e[33] !== b || e[34] !== p || e[35] !== A || e[36] !== ne || e[37] !== f ? (W = /* @__PURE__ */ i(Dt, { labels: ne, modes: T, modeSelected: b, units: F, unitSelected: f, onChangeMode: p, onChangeUnit: A }), e[31] = F, e[32] = T, e[33] = b, e[34] = p, e[35] = A, e[36] = ne, e[37] = f, e[38] = W) : W = e[38];
|
941
|
+
let X;
|
942
|
+
e[39] !== N || e[40] !== W ? (X = /* @__PURE__ */ D(ee, { children: [
|
971
943
|
N,
|
972
|
-
|
973
|
-
] }), e[39] = N, e[40] =
|
974
|
-
let
|
975
|
-
return e[42] !==
|
944
|
+
W
|
945
|
+
] }), e[39] = N, e[40] = W, e[41] = X) : X = e[41];
|
946
|
+
let q;
|
947
|
+
return e[42] !== a || e[43] !== $ || e[44] !== X ? (q = /* @__PURE__ */ i(ve, { sx: $, ...a, children: X }), e[42] = a, e[43] = $, e[44] = X, e[45] = q) : q = e[45], q;
|
976
948
|
}
|
977
|
-
function
|
978
|
-
var
|
979
|
-
const e =
|
980
|
-
actionProps:
|
949
|
+
function _t(t) {
|
950
|
+
var p;
|
951
|
+
const e = R(12), {
|
952
|
+
actionProps: n,
|
981
953
|
labels: o,
|
982
|
-
enabled:
|
983
|
-
children:
|
954
|
+
enabled: l,
|
955
|
+
children: d,
|
984
956
|
onActionToggle: r
|
985
|
-
} = t, s =
|
986
|
-
let d;
|
987
|
-
e[0] !== n || e[1] !== r ? (d = () => r(!n), e[0] = n, e[1] = r, e[2] = d) : d = e[2];
|
957
|
+
} = t, s = l ? "active" : "inactive", c = ((p = o == null ? void 0 : o.tooltip) == null ? void 0 : p[s]) ?? Y.action.tooltip[s], h = n == null ? void 0 : n.TooltipProps;
|
988
958
|
let m;
|
989
|
-
e[
|
959
|
+
e[0] !== l || e[1] !== r ? (m = () => r(!l), e[0] = l, e[1] = r, e[2] = m) : m = e[2];
|
990
960
|
let f;
|
991
|
-
|
961
|
+
e[3] !== c || e[4] !== d || e[5] !== l || e[6] !== m ? (f = /* @__PURE__ */ i(ae, { value: "toggle", sx: V.actions.icon, onClick: m, "aria-label": c, selected: l, children: d }), e[3] = c, e[4] = d, e[5] = l, e[6] = m, e[7] = f) : f = e[7];
|
962
|
+
let v;
|
963
|
+
return e[8] !== c || e[9] !== h || e[10] !== f ? (v = /* @__PURE__ */ i(le, { title: c, placement: "right", ...h, children: f }), e[8] = c, e[9] = h, e[10] = f, e[11] = v) : v = e[11], v;
|
992
964
|
}
|
993
|
-
function
|
994
|
-
var F, $, te, oe, N,
|
995
|
-
const e =
|
996
|
-
modes:
|
965
|
+
function Dt(t) {
|
966
|
+
var F, $, te, oe, N, ne, W, X;
|
967
|
+
const e = R(68), {
|
968
|
+
modes: n,
|
997
969
|
modeSelected: o,
|
998
|
-
units:
|
999
|
-
unitSelected:
|
970
|
+
units: l,
|
971
|
+
unitSelected: d,
|
1000
972
|
labels: r,
|
1001
973
|
onChangeMode: s,
|
1002
974
|
onChangeUnit: c
|
1003
|
-
} = t, [
|
1004
|
-
let
|
1005
|
-
if (e[0] !==
|
1006
|
-
|
975
|
+
} = t, [h, m] = ie(null), [f, v] = ie(!1);
|
976
|
+
let p, A, y, M, a, u, g, C, x, _, T, w, S, b, O, I;
|
977
|
+
if (e[0] !== h || e[1] !== ((F = r == null ? void 0 : r.mode) == null ? void 0 : F.options) || e[2] !== (($ = r == null ? void 0 : r.mode) == null ? void 0 : $.title) || e[3] !== ((te = r == null ? void 0 : r.units) == null ? void 0 : te.title) || e[4] !== o || e[5] !== n || e[6] !== s || e[7] !== c || e[8] !== d || e[9] !== l) {
|
978
|
+
S = Symbol.for("react.early_return_sentinel");
|
1007
979
|
e: {
|
1008
|
-
const
|
980
|
+
const q = Object.values(n);
|
1009
981
|
let z;
|
1010
|
-
if (e[26] !==
|
1011
|
-
|
982
|
+
if (e[26] !== l ? (z = Object.values(l), e[26] = l, e[27] = z) : z = e[27], I = z, !(q.length > 1 || I.length > 1)) {
|
983
|
+
S = null;
|
1012
984
|
break e;
|
1013
985
|
}
|
1014
|
-
const
|
986
|
+
const je = !!h;
|
987
|
+
let se;
|
988
|
+
e[28] === Symbol.for("react.memo_cache_sentinel") ? (se = (U) => {
|
989
|
+
m(U.currentTarget);
|
990
|
+
}, e[28] = se) : se = e[28];
|
991
|
+
const Pe = se;
|
992
|
+
let de;
|
993
|
+
e[29] === Symbol.for("react.memo_cache_sentinel") ? (de = () => {
|
994
|
+
m(null);
|
995
|
+
}, e[29] = de) : de = e[29];
|
996
|
+
const Te = de;
|
1015
997
|
let ue;
|
1016
|
-
e[
|
1017
|
-
|
1018
|
-
}, e[
|
1019
|
-
const
|
998
|
+
e[30] !== s ? (ue = (U, Se) => {
|
999
|
+
U.preventDefault(), s(Se.value), Te();
|
1000
|
+
}, e[30] = s, e[31] = ue) : ue = e[31];
|
1001
|
+
const Ee = ue;
|
1020
1002
|
let me;
|
1021
|
-
e[
|
1022
|
-
|
1023
|
-
}, e[
|
1024
|
-
const Se = me;
|
1003
|
+
e[32] === Symbol.for("react.memo_cache_sentinel") ? (me = () => {
|
1004
|
+
v(!0);
|
1005
|
+
}, e[32] = me) : me = e[32], y = me;
|
1025
1006
|
let he;
|
1026
|
-
e[
|
1027
|
-
|
1028
|
-
}, e[
|
1029
|
-
const Ve = he;
|
1007
|
+
e[33] === Symbol.for("react.memo_cache_sentinel") ? (he = () => {
|
1008
|
+
v(!1);
|
1009
|
+
}, e[33] = he) : he = e[33], M = he;
|
1030
1010
|
let fe;
|
1031
|
-
e[
|
1032
|
-
|
1033
|
-
}, e[
|
1011
|
+
e[34] !== c ? (fe = (U) => {
|
1012
|
+
M(), c(U);
|
1013
|
+
}, e[34] = c, e[35] = fe) : fe = e[35], A = fe;
|
1014
|
+
const $e = ((oe = r == null ? void 0 : r.mode) == null ? void 0 : oe.title) ?? Y.options.mode.title;
|
1015
|
+
O = ((N = r == null ? void 0 : r.units) == null ? void 0 : N.title) ?? Y.options.units.title, a = q.length > 1 && I.length > 1;
|
1034
1016
|
let pe;
|
1035
|
-
e[
|
1036
|
-
f(!1);
|
1037
|
-
}, e[33] = pe) : pe = e[33], w = pe;
|
1038
|
-
let ge;
|
1039
|
-
e[34] !== c ? (ge = (U) => {
|
1040
|
-
w(), c(U);
|
1041
|
-
}, e[34] = c, e[35] = ge) : ge = e[35], M = ge;
|
1042
|
-
const Ge = ((oe = r == null ? void 0 : r.mode) == null ? void 0 : oe.title) ?? q.options.mode.title;
|
1043
|
-
O = ((N = r == null ? void 0 : r.units) == null ? void 0 : N.title) ?? q.options.units.title, b = K.length > 1 && R.length > 1;
|
1044
|
-
let ve;
|
1045
|
-
e[36] !== a || e[37] !== n ? (ve = n.find((U) => U.value === a) ?? n[0], e[36] = a, e[37] = n, e[38] = ve) : ve = e[38], v = ve, e[39] === Symbol.for("react.memo_cache_sentinel") ? (p = /* @__PURE__ */ l(Q, { sx: V.options.icon, onClick: Ue, children: /* @__PURE__ */ l(Be, {}) }), e[39] = p) : p = e[39], h = Ie, D = "measurement-menu", S = u, A = $e, T = Se, e[40] === Symbol.for("react.memo_cache_sentinel") ? (y = {
|
1017
|
+
e[36] !== d || e[37] !== l ? (pe = l.find((U) => U.value === d) ?? l[0], e[36] = d, e[37] = l, e[38] = pe) : pe = e[38], b = pe, e[39] === Symbol.for("react.memo_cache_sentinel") ? (w = /* @__PURE__ */ i(Q, { sx: V.options.icon, onClick: Pe, children: /* @__PURE__ */ i(Ze, {}) }), e[39] = w) : w = e[39], p = Oe, g = "measurement-menu", C = h, x = je, _ = Te, e[40] === Symbol.for("react.memo_cache_sentinel") ? (T = {
|
1046
1018
|
"aria-labelledby": "basic-button",
|
1047
1019
|
sx: V.options.menu
|
1048
|
-
}, e[40] =
|
1049
|
-
/* @__PURE__ */
|
1050
|
-
|
1051
|
-
var
|
1052
|
-
const
|
1053
|
-
return /* @__PURE__ */
|
1054
|
-
/* @__PURE__ */
|
1055
|
-
/* @__PURE__ */
|
1020
|
+
}, e[40] = T) : T = e[40], u = q.length > 1 && /* @__PURE__ */ D(j, { children: [
|
1021
|
+
/* @__PURE__ */ i(H, { variant: "subtitle2", color: "text.secondary", sx: V.options.title, children: $e }),
|
1022
|
+
q.map((U) => {
|
1023
|
+
var Ae;
|
1024
|
+
const Ue = (((Ae = r == null ? void 0 : r.mode) == null ? void 0 : Ae.options) ?? Y.options.mode.options)[U.value];
|
1025
|
+
return /* @__PURE__ */ D(re, { onClick: (Ve) => Ee(Ve, U), selected: U.value === o, children: [
|
1026
|
+
/* @__PURE__ */ i(Ie, { sx: V.options.icons, children: /* @__PURE__ */ i(Me, { children: U.icon }) }),
|
1027
|
+
/* @__PURE__ */ i(ce, { children: Ue })
|
1056
1028
|
] }, U.value);
|
1057
1029
|
})
|
1058
1030
|
] });
|
1059
1031
|
}
|
1060
|
-
e[0] =
|
1032
|
+
e[0] = h, e[1] = (ne = r == null ? void 0 : r.mode) == null ? void 0 : ne.options, e[2] = (W = r == null ? void 0 : r.mode) == null ? void 0 : W.title, e[3] = (X = r == null ? void 0 : r.units) == null ? void 0 : X.title, e[4] = o, e[5] = n, e[6] = s, e[7] = c, e[8] = d, e[9] = l, e[10] = p, e[11] = A, e[12] = y, e[13] = M, e[14] = a, e[15] = u, e[16] = g, e[17] = C, e[18] = x, e[19] = _, e[20] = T, e[21] = w, e[22] = S, e[23] = b, e[24] = O, e[25] = I;
|
1061
1033
|
} else
|
1062
|
-
|
1063
|
-
if (
|
1064
|
-
return
|
1034
|
+
p = e[10], A = e[11], y = e[12], M = e[13], a = e[14], u = e[15], g = e[16], C = e[17], x = e[18], _ = e[19], T = e[20], w = e[21], S = e[22], b = e[23], O = e[24], I = e[25];
|
1035
|
+
if (S !== Symbol.for("react.early_return_sentinel"))
|
1036
|
+
return S;
|
1065
1037
|
let L;
|
1066
|
-
e[41] !==
|
1038
|
+
e[41] !== a ? (L = a && /* @__PURE__ */ i(K, {}), e[41] = a, e[42] = L) : L = e[42];
|
1067
1039
|
let Z;
|
1068
|
-
e[43] !==
|
1069
|
-
/* @__PURE__ */
|
1070
|
-
/* @__PURE__ */
|
1071
|
-
/* @__PURE__ */
|
1040
|
+
e[43] !== A || e[44] !== y || e[45] !== M || e[46] !== r || e[47] !== f || e[48] !== b || e[49] !== O || e[50] !== l || e[51] !== I.length ? (Z = I.length > 1 && /* @__PURE__ */ D(j, { children: [
|
1041
|
+
/* @__PURE__ */ D(re, { onClick: y, children: [
|
1042
|
+
/* @__PURE__ */ i(ce, { children: O }),
|
1043
|
+
/* @__PURE__ */ i(H, { variant: "caption", fontWeight: 500, sx: V.options.tag, children: b.short })
|
1072
1044
|
] }),
|
1073
|
-
/* @__PURE__ */
|
1074
|
-
] }), e[43] =
|
1075
|
-
let
|
1076
|
-
e[53] !==
|
1077
|
-
|
1045
|
+
/* @__PURE__ */ i(Lt, { open: f, labels: r, units: l, unitSelectedValue: b, onClose: M, onSubmit: A })
|
1046
|
+
] }), e[43] = A, e[44] = y, e[45] = M, e[46] = r, e[47] = f, e[48] = b, e[49] = O, e[50] = l, e[51] = I.length, e[52] = Z) : Z = e[52];
|
1047
|
+
let P;
|
1048
|
+
e[53] !== u || e[54] !== Z || e[55] !== L ? (P = /* @__PURE__ */ D("div", { children: [
|
1049
|
+
u,
|
1078
1050
|
L,
|
1079
1051
|
Z
|
1080
|
-
] }), e[53] =
|
1052
|
+
] }), e[53] = u, e[54] = Z, e[55] = L, e[56] = P) : P = e[56];
|
1081
1053
|
let B;
|
1082
|
-
e[57] !==
|
1054
|
+
e[57] !== p || e[58] !== P || e[59] !== g || e[60] !== C || e[61] !== x || e[62] !== _ || e[63] !== T ? (B = /* @__PURE__ */ i(p, { id: g, anchorEl: C, open: x, onClose: _, MenuListProps: T, children: P }), e[57] = p, e[58] = P, e[59] = g, e[60] = C, e[61] = x, e[62] = _, e[63] = T, e[64] = B) : B = e[64];
|
1083
1055
|
let k;
|
1084
|
-
return e[65] !== B || e[66] !==
|
1085
|
-
|
1056
|
+
return e[65] !== B || e[66] !== w ? (k = /* @__PURE__ */ D(j, { children: [
|
1057
|
+
w,
|
1086
1058
|
B
|
1087
|
-
] }), e[65] = B, e[66] =
|
1059
|
+
] }), e[65] = B, e[66] = w, e[67] = k) : k = e[67], k;
|
1088
1060
|
}
|
1089
|
-
function
|
1061
|
+
function Lt({
|
1090
1062
|
open: t,
|
1091
1063
|
labels: e,
|
1092
|
-
units:
|
1064
|
+
units: n,
|
1093
1065
|
unitSelectedValue: o,
|
1094
|
-
onClose:
|
1095
|
-
onSubmit:
|
1066
|
+
onClose: l,
|
1067
|
+
onSubmit: d
|
1096
1068
|
}) {
|
1097
|
-
var
|
1098
|
-
const [r, s] =
|
1099
|
-
s(
|
1100
|
-
},
|
1101
|
-
return /* @__PURE__ */
|
1069
|
+
var M, a, u, g, C, x, _, T;
|
1070
|
+
const [r, s] = ie("metric"), c = be(() => n.filter((w) => w.system === r), [r, n]), h = (w, S) => {
|
1071
|
+
s(S);
|
1072
|
+
}, m = ((a = (M = e == null ? void 0 : e.units) == null ? void 0 : M.modal) == null ? void 0 : a.options) ?? Y.options.units.modal.options, f = m[r].options, v = ((g = (u = e == null ? void 0 : e.units) == null ? void 0 : u.modal) == null ? void 0 : g.title) ?? Y.options.units.modal.title, p = ((x = (C = e == null ? void 0 : e.units) == null ? void 0 : C.modal) == null ? void 0 : x.subtitle) ?? Y.options.units.modal.subtitle, A = ((T = (_ = e == null ? void 0 : e.units) == null ? void 0 : _.modal) == null ? void 0 : T.apply) ?? Y.options.units.modal.apply, y = o.system === r ? o : c[0];
|
1073
|
+
return /* @__PURE__ */ D(ze, { open: t, component: ee, onClose: l, maxWidth: "xs", PaperProps: {
|
1102
1074
|
component: "form",
|
1103
|
-
onSubmit: (
|
1104
|
-
|
1105
|
-
const
|
1106
|
-
|
1075
|
+
onSubmit: (w) => {
|
1076
|
+
w.preventDefault();
|
1077
|
+
const S = new FormData(w.currentTarget);
|
1078
|
+
d(S.get("unit-value"));
|
1107
1079
|
}
|
1108
1080
|
}, children: [
|
1109
|
-
/* @__PURE__ */
|
1110
|
-
|
1111
|
-
/* @__PURE__ */
|
1081
|
+
/* @__PURE__ */ D(He, { sx: V.options.modal.title, children: [
|
1082
|
+
v,
|
1083
|
+
/* @__PURE__ */ i(Q, { onClick: l, children: /* @__PURE__ */ i(ot, {}) })
|
1112
1084
|
] }),
|
1113
|
-
/* @__PURE__ */
|
1114
|
-
/* @__PURE__ */
|
1115
|
-
/* @__PURE__ */
|
1116
|
-
/* @__PURE__ */
|
1117
|
-
/* @__PURE__ */
|
1085
|
+
/* @__PURE__ */ D(Ne, { sx: V.options.modal.content, children: [
|
1086
|
+
/* @__PURE__ */ i(H, { sx: V.options.modal.subtitle, children: p }),
|
1087
|
+
/* @__PURE__ */ D(Re, { color: "primary", value: r, exclusive: !0, fullWidth: !0, onChange: h, "aria-label": "system", sx: V.options.modal.toggle, children: [
|
1088
|
+
/* @__PURE__ */ i(ae, { value: "metric", children: m.metric.title }),
|
1089
|
+
/* @__PURE__ */ i(ae, { value: "imperial", children: m.imperial.title })
|
1118
1090
|
] }),
|
1119
|
-
/* @__PURE__ */
|
1120
|
-
const
|
1121
|
-
return /* @__PURE__ */
|
1122
|
-
}) }) },
|
1091
|
+
/* @__PURE__ */ i(We, { children: /* @__PURE__ */ i(Xe, { "aria-labelledby": "unit-value", defaultValue: y == null ? void 0 : y.value, name: "unit-value", sx: V.options.modal.optionsGroup, children: c.map((w) => {
|
1092
|
+
const S = f[w.value];
|
1093
|
+
return /* @__PURE__ */ i(qe, { value: w.value, control: /* @__PURE__ */ i(Ke, {}), label: S }, w.value);
|
1094
|
+
}) }) }, y == null ? void 0 : y.value)
|
1123
1095
|
] }),
|
1124
|
-
/* @__PURE__ */
|
1096
|
+
/* @__PURE__ */ i(Ye, { sx: V.options.modal.actions, children: /* @__PURE__ */ i(ge, { variant: "contained", type: "submit", children: A }) })
|
1125
1097
|
] });
|
1126
1098
|
}
|
1127
|
-
const
|
1099
|
+
const Ot = {
|
1128
1100
|
enabled: "Show your current location",
|
1129
1101
|
disabled: "Location unavailable"
|
1130
|
-
},
|
1131
|
-
function
|
1132
|
-
const e =
|
1133
|
-
disabled:
|
1102
|
+
}, It = "geolocation";
|
1103
|
+
function Ht(t) {
|
1104
|
+
const e = R(25), {
|
1105
|
+
disabled: n,
|
1134
1106
|
labels: o,
|
1135
|
-
PaperProps:
|
1136
|
-
TooltipProps:
|
1107
|
+
PaperProps: l,
|
1108
|
+
TooltipProps: d,
|
1137
1109
|
watch: r,
|
1138
1110
|
onChange: s,
|
1139
1111
|
onError: c
|
1140
|
-
} = t,
|
1141
|
-
let
|
1142
|
-
e[0] !== c ? (
|
1112
|
+
} = t, h = at(null), m = "geolocation" in navigator, [f, v] = ie(m);
|
1113
|
+
let p, A;
|
1114
|
+
e[0] !== c ? (p = () => (m && navigator.permissions.query({
|
1143
1115
|
name: "geolocation"
|
1144
1116
|
}).then((L) => {
|
1145
|
-
|
1146
|
-
|
1117
|
+
v(L.state === "granted"), L.onchange = () => {
|
1118
|
+
v(L.state === "granted");
|
1147
1119
|
};
|
1148
1120
|
}).catch((L) => {
|
1149
|
-
|
1121
|
+
v(!1), c == null || c(L);
|
1150
1122
|
}), () => {
|
1151
|
-
|
1152
|
-
}),
|
1153
|
-
let
|
1154
|
-
e[3] !== s ? (
|
1123
|
+
h.current && navigator.geolocation.clearWatch(h.current);
|
1124
|
+
}), A = [m, c], e[0] = c, e[1] = p, e[2] = A) : (p = e[1], A = e[2]), st(p, A);
|
1125
|
+
let y;
|
1126
|
+
e[3] !== s ? (y = (L) => {
|
1155
1127
|
s(L.coords);
|
1156
|
-
}, e[3] = s, e[4] =
|
1157
|
-
const
|
1158
|
-
let
|
1159
|
-
e[5] !== c ? (
|
1160
|
-
|
1161
|
-
}, e[5] = c, e[6] =
|
1162
|
-
const
|
1163
|
-
let
|
1164
|
-
e[7] !==
|
1165
|
-
if (
|
1166
|
-
|
1128
|
+
}, e[3] = s, e[4] = y) : y = e[4];
|
1129
|
+
const M = y;
|
1130
|
+
let a;
|
1131
|
+
e[5] !== c ? (a = (L) => {
|
1132
|
+
v(!1), c == null || c(L);
|
1133
|
+
}, e[5] = c, e[6] = a) : a = e[6];
|
1134
|
+
const u = a;
|
1135
|
+
let g;
|
1136
|
+
e[7] !== u || e[8] !== M || e[9] !== r ? (g = () => {
|
1137
|
+
if (h.current && navigator.geolocation.clearWatch(h.current), r) {
|
1138
|
+
h.current = navigator.geolocation.watchPosition(M, u);
|
1167
1139
|
return;
|
1168
1140
|
}
|
1169
|
-
navigator.geolocation.getCurrentPosition(
|
1170
|
-
}, e[7] =
|
1171
|
-
const
|
1172
|
-
let
|
1173
|
-
e[11] !==
|
1174
|
-
let
|
1175
|
-
e[13] !==
|
1141
|
+
navigator.geolocation.getCurrentPosition(M, u);
|
1142
|
+
}, e[7] = u, e[8] = M, e[9] = r, e[10] = g) : g = e[10];
|
1143
|
+
const C = g, _ = ((o == null ? void 0 : o.tooltip) ?? Ot)[f ? "enabled" : "disabled"], T = (o == null ? void 0 : o.ariaLabel) ?? It, w = !m || n;
|
1144
|
+
let S;
|
1145
|
+
e[11] !== f ? (S = f ? /* @__PURE__ */ i(nt, {}) : /* @__PURE__ */ i(it, {}), e[11] = f, e[12] = S) : S = e[12];
|
1146
|
+
let b;
|
1147
|
+
e[13] !== C || e[14] !== T || e[15] !== w || e[16] !== S ? (b = /* @__PURE__ */ i(Q, { onClick: C, "aria-label": T, disabled: w, children: S }), e[13] = C, e[14] = T, e[15] = w, e[16] = S, e[17] = b) : b = e[17];
|
1176
1148
|
let O;
|
1177
|
-
e[18] !==
|
1178
|
-
let
|
1179
|
-
return e[22] !==
|
1149
|
+
e[18] !== d || e[19] !== b || e[20] !== _ ? (O = /* @__PURE__ */ i(le, { arrow: !0, placement: "right", title: _, ...d, children: b }), e[18] = d, e[19] = b, e[20] = _, e[21] = O) : O = e[21];
|
1150
|
+
let I;
|
1151
|
+
return e[22] !== l || e[23] !== O ? (I = /* @__PURE__ */ i(ve, { ...l, children: O }), e[22] = l, e[23] = O, e[24] = I) : I = e[24], I;
|
1180
1152
|
}
|
1181
|
-
const
|
1153
|
+
const xe = {
|
1182
1154
|
zoom: {
|
1183
1155
|
position: "relative",
|
1184
1156
|
height: ({
|
@@ -1210,73 +1182,73 @@ const be = {
|
|
1210
1182
|
position: "absolute"
|
1211
1183
|
}
|
1212
1184
|
};
|
1213
|
-
function
|
1214
|
-
const e =
|
1215
|
-
zoom:
|
1185
|
+
function Nt(t) {
|
1186
|
+
const e = R(40), {
|
1187
|
+
zoom: n,
|
1216
1188
|
disabled: o,
|
1217
|
-
direction:
|
1218
|
-
isLoading:
|
1189
|
+
direction: l,
|
1190
|
+
isLoading: d,
|
1219
1191
|
maxZoom: r,
|
1220
1192
|
minZoom: s,
|
1221
1193
|
PaperProps: c,
|
1222
|
-
ResetViewProps:
|
1223
|
-
showZoom:
|
1224
|
-
onChange:
|
1225
|
-
onReset:
|
1226
|
-
} = t,
|
1227
|
-
let
|
1228
|
-
e[0] !==
|
1229
|
-
Icon:
|
1230
|
-
} :
|
1231
|
-
const
|
1232
|
-
let
|
1233
|
-
e[2] !==
|
1234
|
-
const $ = Math.min(
|
1235
|
-
|
1236
|
-
}, e[2] =
|
1237
|
-
const
|
1238
|
-
let
|
1239
|
-
e[6] !==
|
1240
|
-
const $ = Math.max(
|
1241
|
-
|
1242
|
-
}, e[6] =
|
1243
|
-
const
|
1244
|
-
let
|
1245
|
-
e[10] !==
|
1246
|
-
...
|
1247
|
-
flexDirection:
|
1248
|
-
}, e[10] =
|
1194
|
+
ResetViewProps: h,
|
1195
|
+
showZoom: m,
|
1196
|
+
onChange: f,
|
1197
|
+
onReset: v
|
1198
|
+
} = t, p = l === void 0 ? "vertical" : l, A = r === void 0 ? 24 : r, y = s === void 0 ? 0 : s;
|
1199
|
+
let M;
|
1200
|
+
e[0] !== h ? (M = h === void 0 ? {
|
1201
|
+
Icon: lt
|
1202
|
+
} : h, e[0] = h, e[1] = M) : M = e[1];
|
1203
|
+
const a = M, u = m === void 0 ? !0 : m;
|
1204
|
+
let g;
|
1205
|
+
e[2] !== A || e[3] !== f || e[4] !== n ? (g = () => {
|
1206
|
+
const $ = Math.min(A, n + 1);
|
1207
|
+
f($);
|
1208
|
+
}, e[2] = A, e[3] = f, e[4] = n, e[5] = g) : g = e[5];
|
1209
|
+
const C = g;
|
1210
|
+
let x;
|
1211
|
+
e[6] !== y || e[7] !== f || e[8] !== n ? (x = () => {
|
1212
|
+
const $ = Math.max(y, n - 1);
|
1213
|
+
f($);
|
1214
|
+
}, e[6] = y, e[7] = f, e[8] = n, e[9] = x) : x = e[9];
|
1215
|
+
const _ = x, T = Math.floor(n), w = p === "vertical" ? "horizontal" : "vertical", S = p === "vertical" ? "column" : "row";
|
1216
|
+
let b;
|
1217
|
+
e[10] !== S ? (b = {
|
1218
|
+
...xe.paper,
|
1219
|
+
flexDirection: S
|
1220
|
+
}, e[10] = S, e[11] = b) : b = e[11];
|
1249
1221
|
let O;
|
1250
|
-
e[12] !==
|
1251
|
-
/* @__PURE__ */
|
1252
|
-
/* @__PURE__ */
|
1253
|
-
] }), e[12] =
|
1254
|
-
let
|
1255
|
-
e[17] === Symbol.for("react.memo_cache_sentinel") ? (
|
1222
|
+
e[12] !== a || e[13] !== o || e[14] !== w || e[15] !== v ? (O = v && /* @__PURE__ */ D(j, { children: [
|
1223
|
+
/* @__PURE__ */ i(Q, { onClick: v, "aria-label": "Decrease zoom", disabled: o, children: /* @__PURE__ */ i(a.Icon, {}) }),
|
1224
|
+
/* @__PURE__ */ i(K, { orientation: w, flexItem: !0 })
|
1225
|
+
] }), e[12] = a, e[13] = o, e[14] = w, e[15] = v, e[16] = O) : O = e[16];
|
1226
|
+
let I;
|
1227
|
+
e[17] === Symbol.for("react.memo_cache_sentinel") ? (I = /* @__PURE__ */ i(rt, {}), e[17] = I) : I = e[17];
|
1256
1228
|
let L;
|
1257
|
-
e[18] !== o || e[19] !==
|
1229
|
+
e[18] !== o || e[19] !== C ? (L = /* @__PURE__ */ i(Q, { onClick: C, "aria-label": "Increase zoom", disabled: o, children: I }), e[18] = o, e[19] = C, e[20] = L) : L = e[20];
|
1258
1230
|
let Z;
|
1259
|
-
e[21] !==
|
1260
|
-
let
|
1261
|
-
e[23] !==
|
1262
|
-
/* @__PURE__ */
|
1263
|
-
/* @__PURE__ */
|
1264
|
-
|
1231
|
+
e[21] !== w ? (Z = /* @__PURE__ */ i(K, { orientation: w, flexItem: !0 }), e[21] = w, e[22] = Z) : Z = e[22];
|
1232
|
+
let P;
|
1233
|
+
e[23] !== T || e[24] !== w || e[25] !== d || e[26] !== u ? (P = u && /* @__PURE__ */ D(j, { children: [
|
1234
|
+
/* @__PURE__ */ D(ee, { sx: xe.zoom, children: [
|
1235
|
+
/* @__PURE__ */ i(H, { display: "block", align: "center", color: "textSecondary", variant: "overline", children: T }),
|
1236
|
+
d && /* @__PURE__ */ i(Je, { sx: xe.circularProgress, variant: "indeterminate", size: 24 })
|
1265
1237
|
] }),
|
1266
|
-
/* @__PURE__ */
|
1267
|
-
] }), e[23] =
|
1238
|
+
/* @__PURE__ */ i(K, { orientation: w, flexItem: !0 })
|
1239
|
+
] }), e[23] = T, e[24] = w, e[25] = d, e[26] = u, e[27] = P) : P = e[27];
|
1268
1240
|
let B;
|
1269
|
-
e[28] === Symbol.for("react.memo_cache_sentinel") ? (B = /* @__PURE__ */
|
1241
|
+
e[28] === Symbol.for("react.memo_cache_sentinel") ? (B = /* @__PURE__ */ i(ct, {}), e[28] = B) : B = e[28];
|
1270
1242
|
let k;
|
1271
|
-
e[29] !==
|
1243
|
+
e[29] !== _ || e[30] !== o ? (k = /* @__PURE__ */ i(Q, { onClick: _, "aria-label": "Decrease zoom", disabled: o, children: B }), e[29] = _, e[30] = o, e[31] = k) : k = e[31];
|
1272
1244
|
let F;
|
1273
|
-
return e[32] !== c || e[33] !==
|
1245
|
+
return e[32] !== c || e[33] !== b || e[34] !== O || e[35] !== L || e[36] !== Z || e[37] !== P || e[38] !== k ? (F = /* @__PURE__ */ D(ve, { sx: b, ...c, children: [
|
1274
1246
|
O,
|
1275
1247
|
L,
|
1276
1248
|
Z,
|
1277
|
-
|
1249
|
+
P,
|
1278
1250
|
k
|
1279
|
-
] }), e[32] = c, e[33] =
|
1251
|
+
] }), e[32] = c, e[33] = b, e[34] = O, e[35] = L, e[36] = Z, e[37] = P, e[38] = k, e[39] = F) : F = e[39], F;
|
1280
1252
|
}
|
1281
1253
|
const J = {
|
1282
1254
|
firstColumn: {
|
@@ -1319,77 +1291,77 @@ const J = {
|
|
1319
1291
|
opacity: 0.5,
|
1320
1292
|
cursor: "not-allowed"
|
1321
1293
|
}
|
1322
|
-
},
|
1294
|
+
}, Rt = {
|
1323
1295
|
showMore: "Show More",
|
1324
1296
|
showLess: "Show Less"
|
1325
1297
|
};
|
1326
|
-
function
|
1327
|
-
const e =
|
1328
|
-
data:
|
1298
|
+
function Wt(t) {
|
1299
|
+
const e = R(30), {
|
1300
|
+
data: n,
|
1329
1301
|
itemsToShow: o,
|
1330
|
-
labels:
|
1331
|
-
showDivider:
|
1302
|
+
labels: l,
|
1303
|
+
showDivider: d,
|
1332
1304
|
selectedItemId: r,
|
1333
1305
|
tooltipProps: s,
|
1334
1306
|
onExpand: c,
|
1335
|
-
onItemClick:
|
1336
|
-
} = t,
|
1337
|
-
let
|
1338
|
-
e[0] !==
|
1339
|
-
const
|
1340
|
-
let
|
1341
|
-
e[4] !== c || e[5] !==
|
1342
|
-
|
1343
|
-
}, e[4] = c, e[5] =
|
1344
|
-
const
|
1345
|
-
if (
|
1346
|
-
let
|
1347
|
-
return e[7] === Symbol.for("react.memo_cache_sentinel") ? (
|
1307
|
+
onItemClick: h
|
1308
|
+
} = t, m = o === void 0 ? 0 : o, f = l === void 0 ? Rt : l, v = d === void 0 ? !0 : d, [p, A] = ie(!1);
|
1309
|
+
let y, M;
|
1310
|
+
e[0] !== n || e[1] !== m || e[2] !== p ? (M = p || m === 0 ? n : n.slice(0, m), e[0] = n, e[1] = m, e[2] = p, e[3] = M) : M = e[3], y = M;
|
1311
|
+
const a = y;
|
1312
|
+
let u;
|
1313
|
+
e[4] !== c || e[5] !== p ? (u = () => {
|
1314
|
+
A(!p), c == null || c(p);
|
1315
|
+
}, e[4] = c, e[5] = p, e[6] = u) : u = e[6];
|
1316
|
+
const g = u;
|
1317
|
+
if (a.length === 0) {
|
1318
|
+
let w;
|
1319
|
+
return e[7] === Symbol.for("react.memo_cache_sentinel") ? (w = /* @__PURE__ */ i(H, { variant: "body1", children: "No data" }), e[7] = w) : w = e[7], w;
|
1348
1320
|
}
|
1349
|
-
let
|
1350
|
-
if (e[8] !==
|
1351
|
-
let
|
1352
|
-
e[14] !==
|
1353
|
-
...
|
1354
|
-
...
|
1355
|
-
...r ===
|
1356
|
-
...
|
1321
|
+
let C;
|
1322
|
+
if (e[8] !== a || e[9] !== h || e[10] !== r || e[11] !== v || e[12] !== s) {
|
1323
|
+
let w;
|
1324
|
+
e[14] !== h || e[15] !== r || e[16] !== v || e[17] !== s ? (w = (S, b) => /* @__PURE__ */ i(le, { followCursor: !1, placement: "top", arrow: !0, title: S.tooltipTitle, enterDelay: 10, ...s, children: /* @__PURE__ */ D(Qe, { sx: {
|
1325
|
+
...v && J.showDivider,
|
1326
|
+
...h && J.clickable,
|
1327
|
+
...r === S.id && J.selected,
|
1328
|
+
...S.disabled && J.disabled
|
1357
1329
|
}, onClick: () => {
|
1358
|
-
|
1330
|
+
S.disabled || h == null || h(S);
|
1359
1331
|
}, children: [
|
1360
|
-
/* @__PURE__ */
|
1361
|
-
/* @__PURE__ */
|
1362
|
-
] }) }, `list-item-${
|
1332
|
+
/* @__PURE__ */ i(ce, { primary: S.label, sx: J.firstColumn }),
|
1333
|
+
/* @__PURE__ */ i(ce, { primary: S.value, sx: J.secondColumn })
|
1334
|
+
] }) }, `list-item-${b}`), e[14] = h, e[15] = r, e[16] = v, e[17] = s, e[18] = w) : w = e[18], C = a.map(w), e[8] = a, e[9] = h, e[10] = r, e[11] = v, e[12] = s, e[13] = C;
|
1363
1335
|
} else
|
1364
|
-
|
1365
|
-
let
|
1366
|
-
e[19] !==
|
1336
|
+
C = e[13];
|
1337
|
+
let x;
|
1338
|
+
e[19] !== C ? (x = /* @__PURE__ */ i(et, { id: "expandable-list", children: C }), e[19] = C, e[20] = x) : x = e[20];
|
1339
|
+
let _;
|
1340
|
+
e[21] !== n.length || e[22] !== g || e[23] !== m || e[24] !== f || e[25] !== p ? (_ = n.length > m && /* @__PURE__ */ i(ge, { onClick: g, sx: J.button, variant: "text", color: "primary", "aria-expanded": p, "aria-controls": "expandable-list", children: p ? f.showLess : f.showMore }), e[21] = n.length, e[22] = g, e[23] = m, e[24] = f, e[25] = p, e[26] = _) : _ = e[26];
|
1367
1341
|
let T;
|
1368
|
-
|
1369
|
-
|
1370
|
-
|
1371
|
-
|
1372
|
-
T
|
1373
|
-
] }), e[27] = A, e[28] = T, e[29] = y) : y = e[29], y;
|
1342
|
+
return e[27] !== x || e[28] !== _ ? (T = /* @__PURE__ */ D(j, { children: [
|
1343
|
+
x,
|
1344
|
+
_
|
1345
|
+
] }), e[27] = x, e[28] = _, e[29] = T) : T = e[29], T;
|
1374
1346
|
}
|
1375
1347
|
export {
|
1376
|
-
|
1377
|
-
|
1378
|
-
|
1379
|
-
|
1380
|
-
|
1381
|
-
|
1382
|
-
|
1383
|
-
|
1384
|
-
|
1385
|
-
|
1348
|
+
Ft as AreaIcon,
|
1349
|
+
Gt as BufferIcon,
|
1350
|
+
Et as DEFAULT_LASSO_TOOLS_MODES_MAPPING,
|
1351
|
+
Y as DEFAULT_MEASUREMENT_TOOLS_LABELS,
|
1352
|
+
At as DEFAULT_MEASUREMENT_TOOLS_UNITS_MAPPING,
|
1353
|
+
mt as DrawCircleIcon,
|
1354
|
+
ht as DrawLassoIcon,
|
1355
|
+
dt as DrawPolygonIcon,
|
1356
|
+
ut as DrawSquareIcon,
|
1357
|
+
Ht as GeolocationControls,
|
1386
1358
|
E as LASSO_TOOLS_LABELS,
|
1387
|
-
|
1388
|
-
|
1389
|
-
|
1390
|
-
|
1391
|
-
|
1392
|
-
|
1393
|
-
|
1359
|
+
Ut as LassoToolsInlineUI,
|
1360
|
+
$t as LassoToolsUI,
|
1361
|
+
Wt as ListDataUI,
|
1362
|
+
zt as MeasurementToolsUI,
|
1363
|
+
Vt as RulerIcon,
|
1364
|
+
ft as SelectToolIcon,
|
1365
|
+
Nt as ZoomControlsUI
|
1394
1366
|
};
|
1395
1367
|
//# sourceMappingURL=components.js.map
|