@map-colonies/react-components 4.13.0 → 4.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4,7 +4,7 @@ var hi = (e, t, n) => t in e ? ui(e, t, { enumerable: !0, configurable: !0, writ
|
|
|
4
4
|
var ue = (e, t, n) => (hi(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
5
5
|
import { jsx as s, jsxs as z, Fragment as ge } from "react/jsx-runtime";
|
|
6
6
|
import * as Rn from "react";
|
|
7
|
-
import ke, { useState as O, useEffect as
|
|
7
|
+
import ke, { useState as O, useEffect as k, useMemo as ae, forwardRef as mi, createContext as ze, useContext as Ve, useRef as Se, useLayoutEffect as Dn, useCallback as Le } from "react";
|
|
8
8
|
import { isValid as $e, isBefore as pi, format as It, endOfDay as gi, isSameDay as on } from "date-fns";
|
|
9
9
|
import { he as On, enUS as kn } from "date-fns/locale";
|
|
10
10
|
import { MuiPickersUtilsProvider as Nn, KeyboardDateTimePicker as Pt, KeyboardDatePicker as fi } from "@material-ui/pickers";
|
|
@@ -156,14 +156,14 @@ const fo = 2, yo = 0.5, vo = ct(
|
|
|
156
156
|
}
|
|
157
157
|
})
|
|
158
158
|
), wo = (e) => {
|
|
159
|
-
var j,
|
|
160
|
-
const t = vo(), n = lt(), i = Zt(n), [o, r] = O(null), [l, d] = O(null), [h,
|
|
161
|
-
|
|
159
|
+
var j, B, Z, V;
|
|
160
|
+
const t = vo(), n = lt(), i = Zt(n), [o, r] = O(null), [l, d] = O(null), [h, g] = O(me.DATE_RANGE_PICKER.dateFormat), C = e.controlsLayout ?? me.DATE_RANGE_PICKER.controlsLayout, L = e.disableFuture ?? me.DATE_RANGE_PICKER.disableFuture, u = ((j = e.local) == null ? void 0 : j.startPlaceHolderText) ?? me.DATE_RANGE_PICKER.local.startPlaceHolderText, f = ((B = e.local) == null ? void 0 : B.endPlaceHolderText) ?? me.DATE_RANGE_PICKER.local.endPlaceHolderText, _ = ((Z = e.local) == null ? void 0 : Z.setText) ?? me.DATE_RANGE_PICKER.local.setText, N = (((V = e.local) == null ? void 0 : V.calendarLocale) ?? me.DATE_RANGE_PICKER.local.calendarLocale) === Me.HE ? On : kn;
|
|
161
|
+
k(() => {
|
|
162
162
|
r(e.from ?? null);
|
|
163
|
-
}, [e.from]),
|
|
163
|
+
}, [e.from]), k(() => {
|
|
164
164
|
d(e.to ?? null);
|
|
165
|
-
}, [e.to]),
|
|
166
|
-
|
|
165
|
+
}, [e.to]), k(() => {
|
|
166
|
+
g(e.dateFormat ?? me.DATE_RANGE_PICKER.dateFormat);
|
|
167
167
|
}, [e.dateFormat]);
|
|
168
168
|
const G = Boolean(
|
|
169
169
|
$e(o) && !l || $e(l) && !o || o && l && $e(o) && $e(l) && pi(o, l)
|
|
@@ -180,7 +180,7 @@ const fo = 2, yo = 0.5, vo = ct(
|
|
|
180
180
|
display: "flex",
|
|
181
181
|
flexDirection: C,
|
|
182
182
|
width: C === "column" ? e.contentWidth : "unset",
|
|
183
|
-
children: /* @__PURE__ */ z(Nn, { utils: Bn, locale:
|
|
183
|
+
children: /* @__PURE__ */ z(Nn, { utils: Bn, locale: N, children: [
|
|
184
184
|
/* @__PURE__ */ s(
|
|
185
185
|
Pt,
|
|
186
186
|
{
|
|
@@ -198,7 +198,7 @@ const fo = 2, yo = 0.5, vo = ct(
|
|
|
198
198
|
Pt,
|
|
199
199
|
{
|
|
200
200
|
variant: "inline",
|
|
201
|
-
placeholder:
|
|
201
|
+
placeholder: f,
|
|
202
202
|
className: t.margin,
|
|
203
203
|
onChange: (Y) => d(Y),
|
|
204
204
|
value: l,
|
|
@@ -226,24 +226,24 @@ const fo = 2, yo = 0.5, vo = ct(
|
|
|
226
226
|
return /* @__PURE__ */ s(wi, { ...n, children: t });
|
|
227
227
|
};
|
|
228
228
|
const Oc = (e) => {
|
|
229
|
-
var
|
|
230
|
-
const [t, n] = O(null), [i, o] = O(null), [r, l] = O(me.DATE_RANGE_PICKER.dateFormat), [d, h] = ke.useState(null),
|
|
229
|
+
var B, Z;
|
|
230
|
+
const [t, n] = O(null), [i, o] = O(null), [r, l] = O(me.DATE_RANGE_PICKER.dateFormat), [d, h] = ke.useState(null), g = (V) => {
|
|
231
231
|
h(V.currentTarget);
|
|
232
232
|
}, C = (V) => {
|
|
233
233
|
V.currentTarget.tagName === "I" ? h(V.currentTarget.previousElementSibling) : h(V.currentTarget);
|
|
234
234
|
}, L = () => {
|
|
235
235
|
h(null);
|
|
236
|
-
}, u = Boolean(d),
|
|
237
|
-
|
|
236
|
+
}, u = Boolean(d), f = e.controlsLayout ?? "column";
|
|
237
|
+
k(() => {
|
|
238
238
|
n(e.from ?? null);
|
|
239
|
-
}, [e.from]),
|
|
239
|
+
}, [e.from]), k(() => {
|
|
240
240
|
o(e.to ?? null);
|
|
241
|
-
}, [e.to]),
|
|
241
|
+
}, [e.to]), k(() => {
|
|
242
242
|
l(e.dateFormat ?? me.DATE_RANGE_PICKER.dateFormat);
|
|
243
243
|
}, [e.dateFormat]);
|
|
244
|
-
const _ = ((
|
|
244
|
+
const _ = ((B = e.local) == null ? void 0 : B.startPlaceHolderText) ?? me.DATE_RANGE_PICKER.local.startPlaceHolderText, v = ((Z = e.local) == null ? void 0 : Z.endPlaceHolderText) ?? me.DATE_RANGE_PICKER.local.endPlaceHolderText, N = e.renderAsButton === void 0 ? me.DATE_RANGE_PICKER.renderAsButton : e.renderAsButton, G = e.offset === void 0 ? me.DATE_RANGE_PICKER.offset : e.offset, $ = e.disableFuture === void 0 ? me.DATE_RANGE_PICKER.disableFuture : e.disableFuture, j = ae(() => `${t ? It(t, r) : _} - ${i ? It(i, r) : v}`, [t, i, r, _, v]);
|
|
245
245
|
return /* @__PURE__ */ z(ge, { children: [
|
|
246
|
-
|
|
246
|
+
N ? /* @__PURE__ */ s(Je, { style: { width: e.width }, raised: !0, onClick: g, className: "drpOpener", children: j }) : /* @__PURE__ */ s(
|
|
247
247
|
Qe,
|
|
248
248
|
{
|
|
249
249
|
className: "drpOpener",
|
|
@@ -261,7 +261,7 @@ const Oc = (e) => {
|
|
|
261
261
|
/* @__PURE__ */ s(Eo, { open: u, anchorEl: d, onClose: L, anchorOrigin: { vertical: "bottom", horizontal: "left" }, keepMounted: !0, children: /* @__PURE__ */ s(
|
|
262
262
|
wo,
|
|
263
263
|
{
|
|
264
|
-
controlsLayout:
|
|
264
|
+
controlsLayout: f,
|
|
265
265
|
contentWidth: ((d == null ? void 0 : d.clientWidth) ?? 0) - G,
|
|
266
266
|
dateFormat: r,
|
|
267
267
|
disableFuture: $,
|
|
@@ -288,22 +288,22 @@ const Oc = (e) => {
|
|
|
288
288
|
endTimeWrapperClassName: l = "",
|
|
289
289
|
timeRangeInputsWrapperClassName: d = "",
|
|
290
290
|
startTimeInputClassName: h = "",
|
|
291
|
-
startTimeLabel:
|
|
291
|
+
startTimeLabel: g = "",
|
|
292
292
|
startTimeWrapperClassName: C = ""
|
|
293
293
|
}) => /* @__PURE__ */ z("div", { className: `timeRangeWrapper ${d}`, children: [
|
|
294
294
|
/* @__PURE__ */ s("div", { className: `startTimeWrapper ${C}`, children: /* @__PURE__ */ s(
|
|
295
295
|
Qe,
|
|
296
296
|
{
|
|
297
|
-
label:
|
|
297
|
+
label: g,
|
|
298
298
|
disabled: t === null,
|
|
299
299
|
className: `timeRangeInput ${h}`,
|
|
300
300
|
name: "start-time",
|
|
301
301
|
type: "time",
|
|
302
302
|
value: je(t).format("HH:mm"),
|
|
303
303
|
onChange: (L) => {
|
|
304
|
-
const u = je(t),
|
|
305
|
-
hours:
|
|
306
|
-
minutes:
|
|
304
|
+
const u = je(t), f = je(L.currentTarget.value, "HH:mm"), _ = u.set({
|
|
305
|
+
hours: f.get("hours"),
|
|
306
|
+
minutes: f.get("minutes")
|
|
307
307
|
});
|
|
308
308
|
i(_.toDate());
|
|
309
309
|
}
|
|
@@ -319,9 +319,9 @@ const Oc = (e) => {
|
|
|
319
319
|
type: "time",
|
|
320
320
|
value: je(e).format("HH:mm"),
|
|
321
321
|
onChange: (L) => {
|
|
322
|
-
const u = je(e),
|
|
323
|
-
hours:
|
|
324
|
-
minutes:
|
|
322
|
+
const u = je(e), f = je(L.currentTarget.value, "HH:mm"), _ = u.set({
|
|
323
|
+
hours: f.get("hours"),
|
|
324
|
+
minutes: f.get("minutes")
|
|
325
325
|
});
|
|
326
326
|
n(_.toDate());
|
|
327
327
|
}
|
|
@@ -348,12 +348,12 @@ const Oc = (e) => {
|
|
|
348
348
|
() => n.map((h) => h instanceof Function ? h() : h),
|
|
349
349
|
[n]
|
|
350
350
|
);
|
|
351
|
-
return
|
|
351
|
+
return k(() => {
|
|
352
352
|
for (const h of d) {
|
|
353
|
-
const
|
|
354
|
-
r ? h.id === r && (
|
|
353
|
+
const g = i.startDate && i.endDate && on(h.startDate, i.startDate) && on(h.endDate, i.endDate);
|
|
354
|
+
r ? h.id === r && (g || l(void 0)) : g && l(h.id);
|
|
355
355
|
}
|
|
356
|
-
}, [i, r, d]), /* @__PURE__ */ s("div", { className: "shortcutsContainer", children: d.map((h,
|
|
356
|
+
}, [i, r, d]), /* @__PURE__ */ s("div", { className: "shortcutsContainer", children: d.map((h, g) => {
|
|
357
357
|
const C = () => {
|
|
358
358
|
e(h.startDate), t(h.endDate);
|
|
359
359
|
};
|
|
@@ -368,7 +368,7 @@ const Oc = (e) => {
|
|
|
368
368
|
outlined: !0,
|
|
369
369
|
children: h.label
|
|
370
370
|
},
|
|
371
|
-
h.id +
|
|
371
|
+
h.id + g
|
|
372
372
|
);
|
|
373
373
|
}) });
|
|
374
374
|
}, Nc = ke.forwardRef((e, t) => {
|
|
@@ -390,19 +390,19 @@ const Oc = (e) => {
|
|
|
390
390
|
inputName: d,
|
|
391
391
|
showMonthYearDropdown: h,
|
|
392
392
|
// withTimeRange,
|
|
393
|
-
withShortcuts:
|
|
393
|
+
withShortcuts: g,
|
|
394
394
|
locale: C = "en"
|
|
395
|
-
} = e, [L, u] = O(null), [
|
|
396
|
-
|
|
395
|
+
} = e, [L, u] = O(null), [f, _] = O(null), [v, N] = O(!1), G = r ? { startDate: L, endDate: f } : L;
|
|
396
|
+
k(() => {
|
|
397
397
|
C === "he" && Fi("he", Gi);
|
|
398
|
-
}, [C]),
|
|
399
|
-
var
|
|
400
|
-
((
|
|
401
|
-
}, [e.startDate, e.endDate, L,
|
|
398
|
+
}, [C]), k(() => {
|
|
399
|
+
var B, Z;
|
|
400
|
+
((B = e.startDate) == null ? void 0 : B.toString()) !== (L == null ? void 0 : L.toString()) && u(e.startDate), ((Z = e.endDate) == null ? void 0 : Z.toString()) !== (f == null ? void 0 : f.toString()) && _(e.endDate);
|
|
401
|
+
}, [e.startDate, e.endDate, L, f]);
|
|
402
402
|
const $ = ae(() => {
|
|
403
|
-
let
|
|
404
|
-
return
|
|
405
|
-
}, [C,
|
|
403
|
+
let B = "pickerContainer" + (C === "he" ? " pickerContainer-rtl" : "");
|
|
404
|
+
return g && r && (B += " pickerContainer-withShortcuts"), B;
|
|
405
|
+
}, [C, g, r]), j = h ? {
|
|
406
406
|
showMonthDropdown: !0,
|
|
407
407
|
showYearDropdown: !0,
|
|
408
408
|
dropdownMode: "select"
|
|
@@ -412,31 +412,31 @@ const Oc = (e) => {
|
|
|
412
412
|
{
|
|
413
413
|
...e,
|
|
414
414
|
ref: t,
|
|
415
|
-
onClickOutside: () =>
|
|
415
|
+
onClickOutside: () => N(!1),
|
|
416
416
|
open: v,
|
|
417
417
|
startDate: Lt(G) ? L : void 0,
|
|
418
418
|
selected: L,
|
|
419
|
-
endDate: Lt(G) ?
|
|
419
|
+
endDate: Lt(G) ? f : void 0,
|
|
420
420
|
monthsShown: e.monthsShown ?? 2,
|
|
421
421
|
calendarClassName: `pickerCalendar ${n}`,
|
|
422
|
-
weekDayClassName: (
|
|
423
|
-
dayClassName: (
|
|
424
|
-
monthClassName: (
|
|
425
|
-
onChange: (
|
|
426
|
-
if (Array.isArray(
|
|
427
|
-
const [V, Y] =
|
|
422
|
+
weekDayClassName: (B) => `pickerWeek ${(i == null ? void 0 : i(B)) ?? ""}`,
|
|
423
|
+
dayClassName: (B) => `pickerDay ${(i == null ? void 0 : i(B)) ?? ""}`,
|
|
424
|
+
monthClassName: (B) => `pickerMonth ${(o == null ? void 0 : o(B)) ?? ""}`,
|
|
425
|
+
onChange: (B, Z) => {
|
|
426
|
+
if (Array.isArray(B)) {
|
|
427
|
+
const [V, Y] = B;
|
|
428
428
|
u(V), _(Y), l == null || l({ startDate: V, endDate: Y && gi(Y) }, Z);
|
|
429
429
|
} else
|
|
430
|
-
u(
|
|
430
|
+
u(B), l == null || l(B, Z);
|
|
431
431
|
},
|
|
432
432
|
customInput: /* @__PURE__ */ s(Lo, { name: d, onInputClick: () => {
|
|
433
|
-
|
|
433
|
+
N(!0);
|
|
434
434
|
} }),
|
|
435
|
-
showTimeInput: !!(
|
|
435
|
+
showTimeInput: !!(g && r),
|
|
436
436
|
timeInputLabel: "",
|
|
437
|
-
customTimeInput:
|
|
438
|
-
l == null || l(
|
|
439
|
-
}, shortcuts:
|
|
437
|
+
customTimeInput: g && Lt(G) && /* @__PURE__ */ s(Co, { onShortcut: (B) => {
|
|
438
|
+
l == null || l(B), N(!1);
|
|
439
|
+
}, shortcuts: g, setEndDate: _, setStartDate: u, dateRange: G }),
|
|
440
440
|
showMonthYearDropdown: void 0,
|
|
441
441
|
...j
|
|
442
442
|
}
|
|
@@ -450,22 +450,22 @@ const Bc = (e) => {
|
|
|
450
450
|
local: l,
|
|
451
451
|
onChange: d,
|
|
452
452
|
showTime: h = me.DATE_PICKER.showTime,
|
|
453
|
-
value:
|
|
453
|
+
value: g,
|
|
454
454
|
...C
|
|
455
455
|
} = e, { placeHolderText: L = me.DATE_PICKER.local.placeHolderText, calendarLocale: u } = l ?? {
|
|
456
456
|
placeHolderText: me.DATE_PICKER.local.placeHolderText,
|
|
457
457
|
calendarLocale: Me.EN
|
|
458
|
-
},
|
|
458
|
+
}, f = u === Me.HE ? On : kn, _ = (v) => {
|
|
459
459
|
d(v);
|
|
460
460
|
};
|
|
461
|
-
return /* @__PURE__ */ s(Wt, { theme: n, children: /* @__PURE__ */ z(Nn, { utils: Bn, locale:
|
|
461
|
+
return /* @__PURE__ */ s(Wt, { theme: n, children: /* @__PURE__ */ z(Nn, { utils: Bn, locale: f, children: [
|
|
462
462
|
h && /* @__PURE__ */ s(
|
|
463
463
|
Pt,
|
|
464
464
|
{
|
|
465
465
|
variant: o,
|
|
466
466
|
placeholder: L,
|
|
467
467
|
onChange: _,
|
|
468
|
-
value:
|
|
468
|
+
value: g,
|
|
469
469
|
disableFuture: r,
|
|
470
470
|
format: i,
|
|
471
471
|
...C
|
|
@@ -477,7 +477,7 @@ const Bc = (e) => {
|
|
|
477
477
|
variant: o,
|
|
478
478
|
placeholder: L,
|
|
479
479
|
onChange: _,
|
|
480
|
-
value:
|
|
480
|
+
value: g,
|
|
481
481
|
disableFuture: r,
|
|
482
482
|
format: i,
|
|
483
483
|
...C
|
|
@@ -497,7 +497,7 @@ const Bc = (e) => {
|
|
|
497
497
|
), So = (e) => {
|
|
498
498
|
const t = To(), [n, i] = ke.useState(null), { isSelectionEnabled: o, onCancelDraw: r, onStartDraw: l, onReset: d } = e, h = (C) => {
|
|
499
499
|
i(C.currentTarget);
|
|
500
|
-
},
|
|
500
|
+
}, g = () => {
|
|
501
501
|
i(null);
|
|
502
502
|
};
|
|
503
503
|
return o ? /* @__PURE__ */ s(We, { content: "Cancel the ongoing draw", align: "bottomLeft", children: /* @__PURE__ */ s(Je, { className: t.drawingButton, raised: !0, onClick: r, children: "Cancel Draw" }) }) : /* @__PURE__ */ z(K, { position: "relative", children: [
|
|
@@ -507,13 +507,13 @@ const Bc = (e) => {
|
|
|
507
507
|
{
|
|
508
508
|
className: t.fullWidth,
|
|
509
509
|
open: Boolean(n),
|
|
510
|
-
onClose:
|
|
510
|
+
onClose: g,
|
|
511
511
|
children: [
|
|
512
512
|
/* @__PURE__ */ s(
|
|
513
513
|
ft,
|
|
514
514
|
{
|
|
515
515
|
onClick: () => {
|
|
516
|
-
l(be.POLYGON),
|
|
516
|
+
l(be.POLYGON), g();
|
|
517
517
|
},
|
|
518
518
|
children: "Polygon"
|
|
519
519
|
}
|
|
@@ -522,7 +522,7 @@ const Bc = (e) => {
|
|
|
522
522
|
ft,
|
|
523
523
|
{
|
|
524
524
|
onClick: () => {
|
|
525
|
-
l(be.BOX),
|
|
525
|
+
l(be.BOX), g();
|
|
526
526
|
},
|
|
527
527
|
children: "Box"
|
|
528
528
|
}
|
|
@@ -531,7 +531,7 @@ const Bc = (e) => {
|
|
|
531
531
|
ft,
|
|
532
532
|
{
|
|
533
533
|
onClick: () => {
|
|
534
|
-
d(),
|
|
534
|
+
d(), g();
|
|
535
535
|
},
|
|
536
536
|
children: "Clear"
|
|
537
537
|
}
|
|
@@ -565,9 +565,9 @@ const Gt = 5, Vt = 2, Kn = ze(null), _o = Kn.Provider, gn = 35, fn = 32, Mo = 10
|
|
|
565
565
|
controls: zi()
|
|
566
566
|
})
|
|
567
567
|
);
|
|
568
|
-
|
|
568
|
+
k(() => {
|
|
569
569
|
r.getView().setCenter(e.center ?? Io(e.projection));
|
|
570
|
-
}, [r, e.center, e.projection]),
|
|
570
|
+
}, [r, e.center, e.projection]), k(() => {
|
|
571
571
|
r.getView().setZoom(e.zoom ?? Mo);
|
|
572
572
|
}, [r, e.zoom, e.projection]);
|
|
573
573
|
const l = (d, h) => {
|
|
@@ -575,9 +575,9 @@ const Gt = 5, Vt = 2, Kn = ze(null), _o = Kn.Provider, gn = 35, fn = 32, Mo = 10
|
|
|
575
575
|
C instanceof d && h.removeControl(C);
|
|
576
576
|
});
|
|
577
577
|
};
|
|
578
|
-
return
|
|
578
|
+
return k(() => {
|
|
579
579
|
r.setTarget(t.current), n !== void 0 && n ? r.addControl(new an()) : l(an, r);
|
|
580
|
-
}, [r, n]),
|
|
580
|
+
}, [r, n]), k(() => {
|
|
581
581
|
i !== void 0 && i ? (l(vt, r), r.addControl(
|
|
582
582
|
new vt({
|
|
583
583
|
coordinateFormat: Po(o ?? Re.WGS84),
|
|
@@ -596,7 +596,7 @@ const Gt = 5, Vt = 2, Kn = ze(null), _o = Kn.Provider, gn = 35, fn = 32, Mo = 10
|
|
|
596
596
|
return e;
|
|
597
597
|
}, Ro = ({ options: e, children: t }) => {
|
|
598
598
|
const n = Xe(), [i] = O(new ji(e));
|
|
599
|
-
return
|
|
599
|
+
return k(() => (n.addLayer(i), () => {
|
|
600
600
|
n.removeLayer(i);
|
|
601
601
|
}), [n, i]), /* @__PURE__ */ s(Ao, { value: i, children: t });
|
|
602
602
|
}, Qn = ze(null), Do = Qn.Provider, Oo = () => {
|
|
@@ -606,7 +606,7 @@ const Gt = 5, Vt = 2, Kn = ze(null), _o = Kn.Provider, gn = 35, fn = 32, Mo = 10
|
|
|
606
606
|
return e;
|
|
607
607
|
}, ko = ({ children: e }) => {
|
|
608
608
|
const t = Xe(), [n] = O(new Yi());
|
|
609
|
-
return
|
|
609
|
+
return k(() => (t.addLayer(n), () => {
|
|
610
610
|
t.removeLayer(n);
|
|
611
611
|
}), [t, n]), /* @__PURE__ */ s(Do, { value: n, children: e });
|
|
612
612
|
}, ei = ze(null), No = ei.Provider, Bo = () => {
|
|
@@ -616,7 +616,7 @@ const Gt = 5, Vt = 2, Kn = ze(null), _o = Kn.Provider, gn = 35, fn = 32, Mo = 10
|
|
|
616
616
|
return e;
|
|
617
617
|
}, Fo = ({ children: e }) => {
|
|
618
618
|
const t = Oo(), [n] = O(new Zi());
|
|
619
|
-
return
|
|
619
|
+
return k(() => {
|
|
620
620
|
t.setSource(n);
|
|
621
621
|
}, [n, t]), /* @__PURE__ */ s(No, { value: n, children: e });
|
|
622
622
|
}, Go = ({ geometry: e, fitOptions: t, fit: n, featureStyle: i }) => {
|
|
@@ -631,12 +631,12 @@ const Gt = 5, Vt = 2, Kn = ze(null), _o = Kn.Provider, gn = 35, fn = 32, Mo = 10
|
|
|
631
631
|
}, [e, o, n]), null;
|
|
632
632
|
}, Vo = (e) => {
|
|
633
633
|
const t = ht();
|
|
634
|
-
return
|
|
634
|
+
return k(() => {
|
|
635
635
|
t.setSource(new Xi());
|
|
636
636
|
}, [t]), null;
|
|
637
637
|
}, Ho = ({ drawType: e, onPolygonSelected: t }) => {
|
|
638
638
|
const n = Xe();
|
|
639
|
-
return
|
|
639
|
+
return k(() => {
|
|
640
640
|
const i = {
|
|
641
641
|
type: "Circle"
|
|
642
642
|
/* CIRCLE */
|
|
@@ -700,8 +700,8 @@ const Wo = (e) => {
|
|
|
700
700
|
})
|
|
701
701
|
), Fc = (e) => {
|
|
702
702
|
var h;
|
|
703
|
-
const [t, n] = O(), [i, o] = O(), r = Uo(), l = (
|
|
704
|
-
o(
|
|
703
|
+
const [t, n] = O(), [i, o] = O(), r = Uo(), l = (g) => {
|
|
704
|
+
o(g), n(void 0), e.handlePolygonSelected(g);
|
|
705
705
|
}, d = () => {
|
|
706
706
|
o(void 0), e.handlePolygonReset();
|
|
707
707
|
};
|
|
@@ -717,7 +717,7 @@ const Wo = (e) => {
|
|
|
717
717
|
isSelectionEnabled: t !== void 0
|
|
718
718
|
}
|
|
719
719
|
),
|
|
720
|
-
(h = e.filters) == null ? void 0 : h.map((
|
|
720
|
+
(h = e.filters) == null ? void 0 : h.map((g, C) => /* @__PURE__ */ s("div", { className: r.filtersMargin, children: g }, C))
|
|
721
721
|
] }),
|
|
722
722
|
/* @__PURE__ */ s(xt, { color: "red", className: `${r.contentContainer}`, children: e.children })
|
|
723
723
|
] }),
|
|
@@ -750,15 +750,15 @@ const Wo = (e) => {
|
|
|
750
750
|
style: n || wn
|
|
751
751
|
})
|
|
752
752
|
);
|
|
753
|
-
return
|
|
753
|
+
return k(() => (i.addLayer(o), () => {
|
|
754
754
|
i.removeLayer(o);
|
|
755
|
-
}), [i, o]),
|
|
755
|
+
}), [i, o]), k(() => {
|
|
756
756
|
o.setStyle(n || wn);
|
|
757
757
|
}, [o, n]), /* @__PURE__ */ s($o, { value: o, children: e });
|
|
758
758
|
}, bt = 20, Yo = 256, Zo = 2, Xo = 2, qo = "REST", Vc = (e) => {
|
|
759
759
|
const t = $i(e.projection), n = t.getExtent(), i = new Array(bt), o = new Array(bt), r = sr(n) / Yo, l = e.heightWidthRatio !== void 0 ? e.heightWidthRatio : Xo, d = e.requestEncoding !== void 0 ? e.requestEncoding : qo;
|
|
760
|
-
for (let
|
|
761
|
-
i[
|
|
760
|
+
for (let g = 0; g < bt; ++g)
|
|
761
|
+
i[g] = r / Math.pow(Zo, g) / l, o[g] = g.toString();
|
|
762
762
|
return {
|
|
763
763
|
attributions: e.attributions,
|
|
764
764
|
url: e.url,
|
|
@@ -777,7 +777,7 @@ const Wo = (e) => {
|
|
|
777
777
|
};
|
|
778
778
|
}, Hc = (e) => {
|
|
779
779
|
const t = ht(), { options: n } = e;
|
|
780
|
-
return
|
|
780
|
+
return k(() => {
|
|
781
781
|
t.setSource(new qi(n));
|
|
782
782
|
}, [t, n]), null;
|
|
783
783
|
}, Wc = (e) => {
|
|
@@ -791,7 +791,7 @@ const Wo = (e) => {
|
|
|
791
791
|
};
|
|
792
792
|
}, zc = (e) => {
|
|
793
793
|
const t = ht(), { options: n } = e;
|
|
794
|
-
return
|
|
794
|
+
return k(() => {
|
|
795
795
|
t.setSource(new cr(n));
|
|
796
796
|
}, [t, n]), null;
|
|
797
797
|
}, Uc = (e) => {
|
|
@@ -802,7 +802,7 @@ const Wo = (e) => {
|
|
|
802
802
|
};
|
|
803
803
|
}, $c = (e) => {
|
|
804
804
|
const t = ht(), { options: n } = e;
|
|
805
|
-
return
|
|
805
|
+
return k(() => {
|
|
806
806
|
t.setSource(new lr(n));
|
|
807
807
|
}, [t, n]), null;
|
|
808
808
|
}, Ko = ze(null), jc = () => {
|
|
@@ -818,12 +818,12 @@ const Wo = (e) => {
|
|
|
818
818
|
};
|
|
819
819
|
}, Zc = ({ children: e, options: t }) => {
|
|
820
820
|
const n = jo();
|
|
821
|
-
return
|
|
821
|
+
return k(() => {
|
|
822
822
|
n.setSource(new dr(t));
|
|
823
823
|
}, [t, n]), null;
|
|
824
824
|
}, Xc = ({ legendItems: e, title: t, isCollapsed: n }) => {
|
|
825
825
|
const i = Xe();
|
|
826
|
-
return
|
|
826
|
+
return k(() => {
|
|
827
827
|
const o = new cn({
|
|
828
828
|
title: t ?? "",
|
|
829
829
|
margin: 5,
|
|
@@ -883,7 +883,7 @@ const Qo = Hn(
|
|
|
883
883
|
"KeyboardArrowUp"
|
|
884
884
|
);
|
|
885
885
|
function ts(e) {
|
|
886
|
-
const { cellsMetadata: t, isRowSelected: n, item: i, onRowSelected: o, rowIndex: r, isCollapseable: l, collapsedElement: d } = e, [h,
|
|
886
|
+
const { cellsMetadata: t, isRowSelected: n, item: i, onRowSelected: o, rowIndex: r, isCollapseable: l, collapsedElement: d } = e, [h, g] = O(!1), C = t.length;
|
|
887
887
|
return /* @__PURE__ */ z(ge, { children: [
|
|
888
888
|
/* @__PURE__ */ z(ot, { hover: !0, selected: n, onClick: () => {
|
|
889
889
|
o == null || o(r);
|
|
@@ -894,7 +894,7 @@ function ts(e) {
|
|
|
894
894
|
"aria-label": "expand row",
|
|
895
895
|
size: "small",
|
|
896
896
|
onClick: (u) => {
|
|
897
|
-
u.stopPropagation(),
|
|
897
|
+
u.stopPropagation(), g(!h);
|
|
898
898
|
},
|
|
899
899
|
children: h ? /* @__PURE__ */ s(es, {}) : /* @__PURE__ */ s(Qo, {})
|
|
900
900
|
}
|
|
@@ -918,14 +918,14 @@ function qc(e) {
|
|
|
918
918
|
items: l,
|
|
919
919
|
onRequestSort: d,
|
|
920
920
|
onRowSelected: h,
|
|
921
|
-
isCollapseable:
|
|
921
|
+
isCollapseable: g,
|
|
922
922
|
collapsedElement: C,
|
|
923
923
|
isDense: L,
|
|
924
924
|
page: u,
|
|
925
|
-
rowsPerPage:
|
|
925
|
+
rowsPerPage: f,
|
|
926
926
|
count: _,
|
|
927
927
|
handleChangePage: v,
|
|
928
|
-
handleChangeRowsPerPage:
|
|
928
|
+
handleChangeRowsPerPage: N
|
|
929
929
|
} = e;
|
|
930
930
|
return /* @__PURE__ */ z(bi, { component: xt, children: [
|
|
931
931
|
/* @__PURE__ */ z(Ti, { size: L ? "small" : "medium", children: [
|
|
@@ -934,12 +934,12 @@ function qc(e) {
|
|
|
934
934
|
{
|
|
935
935
|
headCells: r,
|
|
936
936
|
onRequestSort: ($, j) => {
|
|
937
|
-
const
|
|
938
|
-
o(
|
|
937
|
+
const B = t === j && i === "asc";
|
|
938
|
+
o(B ? "desc" : "asc"), n(j), d(j, B ? "desc" : "asc");
|
|
939
939
|
},
|
|
940
940
|
order: i,
|
|
941
941
|
orderBy: t,
|
|
942
|
-
isCollapseable:
|
|
942
|
+
isCollapseable: g
|
|
943
943
|
}
|
|
944
944
|
),
|
|
945
945
|
/* @__PURE__ */ z(Si, { children: [
|
|
@@ -948,7 +948,7 @@ function qc(e) {
|
|
|
948
948
|
{
|
|
949
949
|
item: $,
|
|
950
950
|
rowIndex: j,
|
|
951
|
-
isCollapseable:
|
|
951
|
+
isCollapseable: g,
|
|
952
952
|
cellsMetadata: r,
|
|
953
953
|
collapsedElement: C,
|
|
954
954
|
isRowSelected: !1,
|
|
@@ -956,13 +956,13 @@ function qc(e) {
|
|
|
956
956
|
},
|
|
957
957
|
j
|
|
958
958
|
)),
|
|
959
|
-
(l.length === 0 ||
|
|
959
|
+
(l.length === 0 || f > l.length) && /* @__PURE__ */ s(
|
|
960
960
|
ot,
|
|
961
961
|
{
|
|
962
962
|
style: {
|
|
963
|
-
height: (L ? 33 : 53) * (
|
|
963
|
+
height: (L ? 33 : 53) * (f - l.length)
|
|
964
964
|
},
|
|
965
|
-
children: /* @__PURE__ */ s(Ze, { colSpan:
|
|
965
|
+
children: /* @__PURE__ */ s(Ze, { colSpan: g ? r.length + 1 : r.length, children: l.length === 0 && /* @__PURE__ */ s(_i, { align: "center", children: "No results :(" }) })
|
|
966
966
|
}
|
|
967
967
|
)
|
|
968
968
|
] })
|
|
@@ -970,13 +970,13 @@ function qc(e) {
|
|
|
970
970
|
/* @__PURE__ */ s(
|
|
971
971
|
Mi,
|
|
972
972
|
{
|
|
973
|
-
rowsPerPage:
|
|
973
|
+
rowsPerPage: f,
|
|
974
974
|
rowsPerPageOptions: [5, 10],
|
|
975
975
|
component: "div",
|
|
976
976
|
count: _,
|
|
977
977
|
page: u,
|
|
978
978
|
onPageChange: v,
|
|
979
|
-
onRowsPerPageChange:
|
|
979
|
+
onRowsPerPageChange: N
|
|
980
980
|
}
|
|
981
981
|
)
|
|
982
982
|
] });
|
|
@@ -993,28 +993,28 @@ const Kc = (e) => {
|
|
|
993
993
|
] });
|
|
994
994
|
const Tt = "Imagery", St = "Data", os = ({ locale: e }) => {
|
|
995
995
|
var L, u;
|
|
996
|
-
const t = ve(), [n, i] = O([{ id: Tt, values: [] }, { id: St, values: [] }]), [o, r] = O({}), l = (
|
|
996
|
+
const t = ve(), [n, i] = O([{ id: Tt, values: [] }, { id: St, values: [] }]), [o, r] = O({}), l = (f) => Q(e, f.toUpperCase()) ?? f, d = () => t.imageryLayers ? Array.from({ length: t.imageryLayers.length }, (f, _) => {
|
|
997
997
|
var G;
|
|
998
|
-
const v = t.imageryLayers.get(_),
|
|
998
|
+
const v = t.imageryLayers.get(_), N = v.meta;
|
|
999
999
|
return {
|
|
1000
|
-
id:
|
|
1001
|
-
name: Q(
|
|
1000
|
+
id: N == null ? void 0 : N.id,
|
|
1001
|
+
name: Q(N, "layerRecord.productName") ?? (N == null ? void 0 : N.id),
|
|
1002
1002
|
rect: v.rectangle,
|
|
1003
|
-
isBaseMap: (G = t.layersManager) == null ? void 0 : G.isBaseMapLayer(
|
|
1003
|
+
isBaseMap: (G = t.layersManager) == null ? void 0 : G.isBaseMapLayer(N)
|
|
1004
1004
|
};
|
|
1005
1005
|
}) : [], h = () => {
|
|
1006
|
-
var
|
|
1007
|
-
return ((
|
|
1008
|
-
var v,
|
|
1006
|
+
var f;
|
|
1007
|
+
return ((f = t.layersManager) == null ? void 0 : f.dataLayerList.map((_) => {
|
|
1008
|
+
var v, N;
|
|
1009
1009
|
return {
|
|
1010
1010
|
id: (v = _.meta) == null ? void 0 : v.id,
|
|
1011
1011
|
name: Q(_.meta, "featureStructure.aliasLayerName") ?? _.meta.productName,
|
|
1012
|
-
rect: Be.fromDegrees(...dt((
|
|
1012
|
+
rect: Be.fromDegrees(...dt((N = _.meta) == null ? void 0 : N.footprint)),
|
|
1013
1013
|
isBaseMap: !1
|
|
1014
1014
|
};
|
|
1015
1015
|
})) || [];
|
|
1016
1016
|
};
|
|
1017
|
-
|
|
1017
|
+
k(() => {
|
|
1018
1018
|
(() => {
|
|
1019
1019
|
const _ = [
|
|
1020
1020
|
{
|
|
@@ -1026,12 +1026,12 @@ const Tt = "Imagery", St = "Data", os = ({ locale: e }) => {
|
|
|
1026
1026
|
values: h()
|
|
1027
1027
|
}
|
|
1028
1028
|
];
|
|
1029
|
-
i(_), r(_.reduce((v,
|
|
1029
|
+
i(_), r(_.reduce((v, N) => ({ ...v, [N.id]: !0 }), {}));
|
|
1030
1030
|
})();
|
|
1031
|
-
}, []),
|
|
1031
|
+
}, []), k(() => {
|
|
1032
1032
|
if (!t.layersManager)
|
|
1033
1033
|
return;
|
|
1034
|
-
const
|
|
1034
|
+
const f = () => {
|
|
1035
1035
|
i(
|
|
1036
1036
|
(_) => _.map(
|
|
1037
1037
|
(v) => v.id === Tt ? {
|
|
@@ -1041,14 +1041,14 @@ const Tt = "Imagery", St = "Data", os = ({ locale: e }) => {
|
|
|
1041
1041
|
)
|
|
1042
1042
|
);
|
|
1043
1043
|
};
|
|
1044
|
-
return t.layersManager.addLayerUpdatedListener(
|
|
1044
|
+
return t.layersManager.addLayerUpdatedListener(f), t.imageryLayers.layerRemoved.addEventListener(f), () => {
|
|
1045
1045
|
var _;
|
|
1046
|
-
Q(t, "_cesiumWidget") !== void 0 && ((_ = t.layersManager) == null || _.removeLayerUpdatedListener(
|
|
1046
|
+
Q(t, "_cesiumWidget") !== void 0 && ((_ = t.layersManager) == null || _.removeLayerUpdatedListener(f), t.imageryLayers.layerRemoved.removeEventListener(f));
|
|
1047
1047
|
};
|
|
1048
|
-
}, [(L = t.layersManager) == null ? void 0 : L.layerList]),
|
|
1048
|
+
}, [(L = t.layersManager) == null ? void 0 : L.layerList]), k(() => {
|
|
1049
1049
|
if (!t.layersManager)
|
|
1050
1050
|
return;
|
|
1051
|
-
const
|
|
1051
|
+
const f = () => {
|
|
1052
1052
|
i(
|
|
1053
1053
|
(_) => _.map(
|
|
1054
1054
|
(v) => v.id === St ? {
|
|
@@ -1058,24 +1058,24 @@ const Tt = "Imagery", St = "Data", os = ({ locale: e }) => {
|
|
|
1058
1058
|
)
|
|
1059
1059
|
);
|
|
1060
1060
|
};
|
|
1061
|
-
return t.layersManager.addDataLayerUpdatedListener(
|
|
1061
|
+
return t.layersManager.addDataLayerUpdatedListener(f), () => {
|
|
1062
1062
|
var _;
|
|
1063
|
-
(_ = t.layersManager) == null || _.removeDataLayerUpdatedListener(
|
|
1063
|
+
(_ = t.layersManager) == null || _.removeDataLayerUpdatedListener(f);
|
|
1064
1064
|
};
|
|
1065
1065
|
}, [(u = t.layersManager) == null ? void 0 : u.dataLayerList]);
|
|
1066
|
-
const
|
|
1067
|
-
r((_) => ({ ..._, [
|
|
1068
|
-
}, C = (
|
|
1069
|
-
t.camera.flyTo({ destination:
|
|
1066
|
+
const g = (f) => {
|
|
1067
|
+
r((_) => ({ ..._, [f]: !_[f] }));
|
|
1068
|
+
}, C = (f) => {
|
|
1069
|
+
t.camera.flyTo({ destination: f });
|
|
1070
1070
|
};
|
|
1071
|
-
return /* @__PURE__ */ s(K, { className: "activeLayersPanel", children: n.filter((
|
|
1071
|
+
return /* @__PURE__ */ s(K, { className: "activeLayersPanel", children: n.filter((f) => f.values.length > 0).map((f) => /* @__PURE__ */ z(
|
|
1072
1072
|
K,
|
|
1073
1073
|
{
|
|
1074
|
-
className: `cesium-cesiumInspector-section ${o[
|
|
1075
|
-
onClick: () => f
|
|
1074
|
+
className: `cesium-cesiumInspector-section ${o[f.id] ? "cesium-cesiumInspector-section-collapsed" : ""}`,
|
|
1075
|
+
onClick: () => g(f.id),
|
|
1076
1076
|
children: [
|
|
1077
|
-
/* @__PURE__ */ s(At, { tag: "h3", className: "cesium-cesiumInspector-sectionHeader", children: l(
|
|
1078
|
-
/* @__PURE__ */ s(K, { className: "cesium-cesiumInspector-sectionContent", children:
|
|
1077
|
+
/* @__PURE__ */ s(At, { tag: "h3", className: "cesium-cesiumInspector-sectionHeader", children: l(f.id) }),
|
|
1078
|
+
/* @__PURE__ */ s(K, { className: "cesium-cesiumInspector-sectionContent", children: f.values.map((_) => /* @__PURE__ */ z(K, { className: "layer", children: [
|
|
1079
1079
|
/* @__PURE__ */ s(We, { content: _.name, children: /* @__PURE__ */ s(K, { className: `name ${_.isBaseMap ? "disabled" : ""}`, children: _.name }) }),
|
|
1080
1080
|
/* @__PURE__ */ s(K, { className: "icons", children: /* @__PURE__ */ s(We, { content: Q(e, "FLY_TO") ?? "Fly To", children: /* @__PURE__ */ s(K, { className: "icon", onClick: (v) => {
|
|
1081
1081
|
v.stopPropagation(), C(_.rect);
|
|
@@ -1086,7 +1086,7 @@ const Tt = "Imagery", St = "Data", os = ({ locale: e }) => {
|
|
|
1086
1086
|
] }, _.id)) })
|
|
1087
1087
|
]
|
|
1088
1088
|
},
|
|
1089
|
-
|
|
1089
|
+
f.id
|
|
1090
1090
|
)) });
|
|
1091
1091
|
}, ss = ({ locale: e }) => {
|
|
1092
1092
|
const [t, n] = O(!1), i = ae(() => Q(e, "ACTIVE_LAYERS_TITLE") ?? "Active Layers", [e]);
|
|
@@ -1107,13 +1107,13 @@ const Tt = "Imagery", St = "Data", os = ({ locale: e }) => {
|
|
|
1107
1107
|
}
|
|
1108
1108
|
), as = ({ title: e, baseMaps: t, setCurrent: n }) => {
|
|
1109
1109
|
const i = ve(), [o, r] = O();
|
|
1110
|
-
|
|
1110
|
+
k(() => {
|
|
1111
1111
|
const d = t.maps.find((h) => h.isCurrent);
|
|
1112
1112
|
d && (r(d), n(d));
|
|
1113
1113
|
}, [t]);
|
|
1114
1114
|
const l = (d) => {
|
|
1115
|
-
var
|
|
1116
|
-
(
|
|
1115
|
+
var g, C;
|
|
1116
|
+
(g = i.layersManager) == null || g.removeBaseMapLayers();
|
|
1117
1117
|
const h = t.maps.find((L) => L.id === d);
|
|
1118
1118
|
h && ((C = i.layersManager) == null || C.setBaseMapLayers(h), r(h), n(h), t.maps.forEach((L) => {
|
|
1119
1119
|
L.isCurrent = h === L;
|
|
@@ -1133,7 +1133,7 @@ const Tt = "Imagery", St = "Data", os = ({ locale: e }) => {
|
|
|
1133
1133
|
] });
|
|
1134
1134
|
}, cs = ({ title: e, terrains: t }) => {
|
|
1135
1135
|
const [n, i] = O(), o = ve();
|
|
1136
|
-
|
|
1136
|
+
k(() => {
|
|
1137
1137
|
const l = t.find((d) => d.isCurrent);
|
|
1138
1138
|
l && i(l);
|
|
1139
1139
|
}, [t]);
|
|
@@ -1158,7 +1158,7 @@ const Tt = "Imagery", St = "Data", os = ({ locale: e }) => {
|
|
|
1158
1158
|
}, ls = ({ baseMaps: e, terrains: t, locale: n }) => {
|
|
1159
1159
|
const [i, o] = O(!1), [r, l] = O(), d = ae(() => Q(n, "BASE_MAP_TITLE") ?? "Base Map", [n]), h = ae(() => Q(n, "TERRAIN_TITLE") ?? "Terrain", [n]);
|
|
1160
1160
|
return /* @__PURE__ */ z(ge, { children: [
|
|
1161
|
-
/* @__PURE__ */ s(mt, { onClick: () => o((
|
|
1161
|
+
/* @__PURE__ */ s(mt, { onClick: () => o((g) => !g), children: /* @__PURE__ */ s(
|
|
1162
1162
|
"img",
|
|
1163
1163
|
{
|
|
1164
1164
|
className: "cesium-baseLayerPicker-selected",
|
|
@@ -1174,7 +1174,7 @@ const Tt = "Imagery", St = "Data", os = ({ locale: e }) => {
|
|
|
1174
1174
|
] });
|
|
1175
1175
|
};
|
|
1176
1176
|
const ds = ({ featureTypes: e, locale: t }) => {
|
|
1177
|
-
const n = ae(() => Q(t, "WFS_TITLE") ?? "Data Layers", [t]), i = ae(() => Q(t, "WFS_CACHE") ?? "Cache", [t]), o = ae(() => Q(t, "WFS_EXTENT") ?? "Extent", [t]), r = ae(() => Q(t, "NO_DATA_LAYERS") ?? "No layers found", [t]), l = ae(() => /* @__PURE__ */ s(K, { className: "title", children: n }), [n]), d = ae(() => /* @__PURE__ */ s(ge, { children: e.length > 0 ? e.map((h,
|
|
1177
|
+
const n = ae(() => Q(t, "WFS_TITLE") ?? "Data Layers", [t]), i = ae(() => Q(t, "WFS_CACHE") ?? "Cache", [t]), o = ae(() => Q(t, "WFS_EXTENT") ?? "Extent", [t]), r = ae(() => Q(t, "NO_DATA_LAYERS") ?? "No layers found", [t]), l = ae(() => /* @__PURE__ */ s(K, { className: "title", children: n }), [n]), d = ae(() => /* @__PURE__ */ s(ge, { children: e.length > 0 ? e.map((h, g) => /* @__PURE__ */ z(K, { className: "featureType", children: [
|
|
1178
1178
|
/* @__PURE__ */ s(We, { content: `${h.featureStructure.aliasLayerName} ${h.id} (${String(h.zoomLevel)})`, children: /* @__PURE__ */ z(K, { className: `name ${h.currentZoomLevel < h.zoomLevel ? "warning blinking" : h.total === -1 ? "error blinking" : ""}`, children: [
|
|
1179
1179
|
h.featureStructure.aliasLayerName,
|
|
1180
1180
|
" (",
|
|
@@ -1195,7 +1195,7 @@ const ds = ({ featureTypes: e, locale: t }) => {
|
|
|
1195
1195
|
h.total
|
|
1196
1196
|
] })
|
|
1197
1197
|
] })
|
|
1198
|
-
] },
|
|
1198
|
+
] }, g)) : /* @__PURE__ */ s(K, { children: r }) }), [e]);
|
|
1199
1199
|
return /* @__PURE__ */ z(K, { className: "wfsContainer", children: [
|
|
1200
1200
|
l,
|
|
1201
1201
|
d
|
|
@@ -1203,33 +1203,33 @@ const ds = ({ featureTypes: e, locale: t }) => {
|
|
|
1203
1203
|
}, us = ({ locale: e }) => {
|
|
1204
1204
|
var d;
|
|
1205
1205
|
const [t, n] = O(!1), [i, o] = O([]), r = ae(() => Q(e, "DEBUG_PANEL_TITLE") ?? "Debugger Tool", [e]), l = ve();
|
|
1206
|
-
return
|
|
1206
|
+
return k(() => {
|
|
1207
1207
|
if (!l.layersManager)
|
|
1208
1208
|
return;
|
|
1209
|
-
const h = (
|
|
1209
|
+
const h = (g, C) => {
|
|
1210
1210
|
var u;
|
|
1211
|
-
|
|
1212
|
-
if (C !== void 0 && C !==
|
|
1211
|
+
g.forEach((f) => {
|
|
1212
|
+
if (C !== void 0 && C !== f.meta.id)
|
|
1213
1213
|
return;
|
|
1214
|
-
const { options: _, meta: v } =
|
|
1214
|
+
const { options: _, meta: v } = f, { zoomLevel: N } = _, { id: G, items: $, total: j, cache: B, currentZoomLevel: Z, featureStructure: V } = v;
|
|
1215
1215
|
o((Y) => {
|
|
1216
1216
|
const ee = Y.findIndex((a) => a.id === G);
|
|
1217
1217
|
if (ee >= 0) {
|
|
1218
|
-
if (JSON.stringify(Y[ee]) !== JSON.stringify({ id: G, items: $, total: j, cache:
|
|
1218
|
+
if (JSON.stringify(Y[ee]) !== JSON.stringify({ id: G, items: $, total: j, cache: B, currentZoomLevel: Z, featureStructure: V, zoomLevel: N })) {
|
|
1219
1219
|
const a = [...Y];
|
|
1220
|
-
return a[ee] = { id: G, items: $, total: j, cache:
|
|
1220
|
+
return a[ee] = { id: G, items: $, total: j, cache: B, currentZoomLevel: Z, featureStructure: V, zoomLevel: N }, a;
|
|
1221
1221
|
}
|
|
1222
1222
|
} else
|
|
1223
|
-
return [...Y, { id: G, items: $, total: j, cache:
|
|
1223
|
+
return [...Y, { id: G, items: $, total: j, cache: B, currentZoomLevel: Z, featureStructure: V, zoomLevel: N }];
|
|
1224
1224
|
return Y;
|
|
1225
1225
|
});
|
|
1226
1226
|
});
|
|
1227
|
-
const L = new Set((u = l.layersManager) == null ? void 0 : u.dataLayerList.map((
|
|
1228
|
-
o((
|
|
1227
|
+
const L = new Set((u = l.layersManager) == null ? void 0 : u.dataLayerList.map((f) => f.meta.id));
|
|
1228
|
+
o((f) => f.filter((_) => L.has(_.id)));
|
|
1229
1229
|
};
|
|
1230
1230
|
return l.layersManager.addDataLayerUpdatedListener(h), () => {
|
|
1231
|
-
var
|
|
1232
|
-
(
|
|
1231
|
+
var g;
|
|
1232
|
+
(g = l.layersManager) == null || g.removeDataLayerUpdatedListener(h);
|
|
1233
1233
|
};
|
|
1234
1234
|
}, [(d = l.layersManager) == null ? void 0 : d.dataLayerList]), /* @__PURE__ */ z(ge, { children: [
|
|
1235
1235
|
/* @__PURE__ */ s(mt, { onClick: () => n(!t), children: /* @__PURE__ */ s("svg", { width: "100%", height: "100%", viewBox: "0 0 24 24", children: /* @__PURE__ */ s("path", { d: "M11.99 18.54l-7.37-5.73L3 14.07l9 7 9-7-1.63-1.27-7.38 5.74zM12 16l7.36-5.73L21 9l-9-7-9 7 1.63 1.27L12 16z", fill: "orange" }) }) }),
|
|
@@ -1304,8 +1304,8 @@ const yl = st, vl = Rr, _t = Fe, wl = Yn, El = Ot, xe = document.createElement("
|
|
|
1304
1304
|
console.error("Could not determine image transparency. Error => ", o), i(o);
|
|
1305
1305
|
}
|
|
1306
1306
|
})), it = (e, t) => {
|
|
1307
|
-
const { west: n, east: i, north: o, south: r } = e, { west: l, east: d, north: h, south:
|
|
1308
|
-
return n >= l && i <= d && o <= h && r >=
|
|
1307
|
+
const { west: n, east: i, north: o, south: r } = e, { west: l, east: d, north: h, south: g } = t;
|
|
1308
|
+
return n >= l && i <= d && o <= h && r >= g;
|
|
1309
1309
|
}, gs = (e, t) => qr(e, ut(t)), fs = (e) => {
|
|
1310
1310
|
const t = (ne.toDegrees(e.west) + ne.toDegrees(e.east)) / 2, n = (ne.toDegrees(e.south) + ne.toDegrees(e.north)) / 2;
|
|
1311
1311
|
return Xr([t, n]);
|
|
@@ -1319,8 +1319,8 @@ const yl = st, vl = Rr, _t = Fe, wl = Yn, El = Ot, xe = document.createElement("
|
|
|
1319
1319
|
let i = e.camera.computeViewRectangle(t.globe.ellipsoid);
|
|
1320
1320
|
if (!kt(i) || !i) {
|
|
1321
1321
|
console.error("cesium native computeViewRectangle returned invalid rectangle, fallback to custom calculation ");
|
|
1322
|
-
const o = new Ie(0, 0), r = t.camera.pickEllipsoid(o, t.globe.ellipsoid), l = new Ie(t.canvas.width, t.canvas.height), d = t.camera.pickEllipsoid(l, t.globe.ellipsoid), h = t.globe.ellipsoid.cartesianToCartographic(r),
|
|
1323
|
-
i = new Be(h.longitude,
|
|
1322
|
+
const o = new Ie(0, 0), r = t.camera.pickEllipsoid(o, t.globe.ellipsoid), l = new Ie(t.canvas.width, t.canvas.height), d = t.camera.pickEllipsoid(l, t.globe.ellipsoid), h = t.globe.ellipsoid.cartesianToCartographic(r), g = t.globe.ellipsoid.cartesianToCartographic(d);
|
|
1323
|
+
i = new Be(h.longitude, g.latitude, g.longitude, h.latitude);
|
|
1324
1324
|
}
|
|
1325
1325
|
return i;
|
|
1326
1326
|
}, ys = (e, t = 100) => {
|
|
@@ -1341,21 +1341,21 @@ const yl = st, vl = Rr, _t = Fe, wl = Yn, El = Ot, xe = document.createElement("
|
|
|
1341
1341
|
console.error("Invalid latitude or longitude values.");
|
|
1342
1342
|
return;
|
|
1343
1343
|
}
|
|
1344
|
-
const
|
|
1345
|
-
let L = t /
|
|
1346
|
-
const
|
|
1347
|
-
|
|
1344
|
+
const g = 111320, C = 111320 * Math.cos(d);
|
|
1345
|
+
let L = t / g, u = t / C;
|
|
1346
|
+
const f = Te.magnitude(i.positionWC);
|
|
1347
|
+
f > 1e7 && (L = 10, u = 10);
|
|
1348
1348
|
const _ = i.frustum instanceof Dr ? i.frustum.fov : Math.PI / 3;
|
|
1349
1349
|
let v = 1;
|
|
1350
|
-
|
|
1351
|
-
const
|
|
1352
|
-
if (
|
|
1350
|
+
f < 5e5 ? v = 0.05 : f < 2e6 && (v = 0.1), L *= v * (_ / Math.PI), u *= v * (_ / Math.PI);
|
|
1351
|
+
const N = i.pitch;
|
|
1352
|
+
if (N === void 0)
|
|
1353
1353
|
return;
|
|
1354
|
-
const G = Math.PI / 4, $ = Math.max(0, 1 - Math.abs(
|
|
1354
|
+
const G = Math.PI / 4, $ = Math.max(0, 1 - Math.abs(N) / G);
|
|
1355
1355
|
L *= $, u *= $;
|
|
1356
1356
|
const j = 5e-4;
|
|
1357
1357
|
L = Math.max(L, j), u = Math.max(u, j);
|
|
1358
|
-
const
|
|
1358
|
+
const B = l.latitude - L, Z = l.latitude + L, V = l.longitude - u, Y = l.longitude + u, ee = ne.clamp(B, r.south, r.north), a = ne.clamp(Z, r.south, r.north), c = ne.clamp(V, r.west, r.east), b = ne.clamp(Y, r.west, r.east), p = Math.min(1, N / ne.PI_OVER_TWO), E = r.north - (r.north - r.south) * p, y = Math.min(a, E);
|
|
1359
1359
|
return new Be(
|
|
1360
1360
|
ne.negativePiToPi(c),
|
|
1361
1361
|
ne.clamp(ee, -ne.PI_OVER_TWO, ne.PI_OVER_TWO),
|
|
@@ -1364,12 +1364,12 @@ const yl = st, vl = Rr, _t = Fe, wl = Yn, El = Ot, xe = document.createElement("
|
|
|
1364
1364
|
);
|
|
1365
1365
|
}, oi = (e, t, n, i, o, r) => {
|
|
1366
1366
|
const l = e.scene.mode === Fe.SCENE2D, d = (u) => {
|
|
1367
|
-
var
|
|
1367
|
+
var f;
|
|
1368
1368
|
if (u.polygon)
|
|
1369
1369
|
return {
|
|
1370
1370
|
type: "Polygon",
|
|
1371
|
-
coordinates: [((
|
|
1372
|
-
const G = Oe.fromCartesian(
|
|
1371
|
+
coordinates: [((f = u.polygon.hierarchy) == null ? void 0 : f.getValue(Ye.now())).positions.map((N) => {
|
|
1372
|
+
const G = Oe.fromCartesian(N), $ = new Oe(
|
|
1373
1373
|
ne.toDegrees(G.longitude),
|
|
1374
1374
|
ne.toDegrees(G.latitude),
|
|
1375
1375
|
l ? 500 : void 0
|
|
@@ -1378,17 +1378,17 @@ const yl = st, vl = Rr, _t = Fe, wl = Yn, El = Ot, xe = document.createElement("
|
|
|
1378
1378
|
return [$.longitude, $.latitude, $.height];
|
|
1379
1379
|
})]
|
|
1380
1380
|
};
|
|
1381
|
-
}, h = (u,
|
|
1382
|
-
const
|
|
1383
|
-
if (!
|
|
1381
|
+
}, h = (u, f, _, v) => {
|
|
1382
|
+
const N = Zn.wgs84ToWindowCoordinates(u, f);
|
|
1383
|
+
if (!N)
|
|
1384
1384
|
return null;
|
|
1385
|
-
const G =
|
|
1385
|
+
const G = N.x + _, $ = N.y + v, j = new Ie(G, N.y), B = new Ie(N.x, $), Z = u.camera.pickEllipsoid(j, u.globe.ellipsoid), V = u.camera.pickEllipsoid(B, u.globe.ellipsoid);
|
|
1386
1386
|
if (!Z || !V)
|
|
1387
1387
|
return null;
|
|
1388
|
-
const Y = Te.distance(
|
|
1388
|
+
const Y = Te.distance(f, Z), ee = Te.distance(f, V);
|
|
1389
1389
|
return { widthMeters: Y, heightMeters: ee };
|
|
1390
|
-
},
|
|
1391
|
-
const v = zt.WGS84,
|
|
1390
|
+
}, g = (u, f, _) => {
|
|
1391
|
+
const v = zt.WGS84, N = u.latitude, G = u.longitude, $ = Math.PI / 180 * v.maximumRadius, j = Math.PI / 180 * v.maximumRadius, B = _ / 2 / $, Z = f / 2 / j, V = N + B, Y = N - B, ee = G + Z, a = G - Z;
|
|
1392
1392
|
return {
|
|
1393
1393
|
type: "Polygon",
|
|
1394
1394
|
coordinates: [
|
|
@@ -1402,23 +1402,23 @@ const yl = st, vl = Rr, _t = Fe, wl = Yn, El = Ot, xe = document.createElement("
|
|
|
1402
1402
|
]
|
|
1403
1403
|
]
|
|
1404
1404
|
};
|
|
1405
|
-
}, C = (u,
|
|
1405
|
+
}, C = (u, f) => hn(u) / hn(f);
|
|
1406
1406
|
if (!e.dataSources.getByName(t.name)[0])
|
|
1407
1407
|
return;
|
|
1408
1408
|
const L = [];
|
|
1409
1409
|
if (t == null || t.entities.values.forEach((u) => {
|
|
1410
|
-
var
|
|
1410
|
+
var f, _;
|
|
1411
1411
|
if (o && r && l)
|
|
1412
1412
|
try {
|
|
1413
|
-
const v = ut(o),
|
|
1414
|
-
if (
|
|
1415
|
-
const G = (
|
|
1413
|
+
const v = ut(o), N = mn(d(u), v);
|
|
1414
|
+
if (N) {
|
|
1415
|
+
const G = (f = u.properties) == null ? void 0 : f.label.getValue(Ye.now()), $ = Zr(N, {
|
|
1416
1416
|
properties: {
|
|
1417
1417
|
label: G
|
|
1418
1418
|
}
|
|
1419
|
-
}), j = { width: G.width, height: G.height }, [
|
|
1419
|
+
}), j = { width: G.width, height: G.height }, [B, Z, V = 0] = $.geometry.coordinates, Y = Te.fromDegrees(B, Z, V), ee = h(e.scene, Y, j.width, j.height);
|
|
1420
1420
|
if (ee) {
|
|
1421
|
-
const a =
|
|
1421
|
+
const a = g({ longitude: B, latitude: Z }, ee.widthMeters, ee.heightMeters), c = mn(N, {
|
|
1422
1422
|
type: "Feature",
|
|
1423
1423
|
properties: {},
|
|
1424
1424
|
geometry: a
|
|
@@ -1444,9 +1444,9 @@ const yl = st, vl = Rr, _t = Fe, wl = Yn, El = Ot, xe = document.createElement("
|
|
|
1444
1444
|
clampToGround: !0,
|
|
1445
1445
|
width: 4
|
|
1446
1446
|
})), u.billboard)) {
|
|
1447
|
-
const v = (_ = u.position) == null ? void 0 : _.getValue(Ye.now()),
|
|
1448
|
-
|
|
1449
|
-
|
|
1447
|
+
const v = (_ = u.position) == null ? void 0 : _.getValue(Ye.now()), N = Oe.fromCartesian(v), G = new Oe(
|
|
1448
|
+
N.longitude,
|
|
1449
|
+
N.latitude,
|
|
1450
1450
|
l ? 500 : e.scene.sampleHeight(Oe.fromCartesian(v))
|
|
1451
1451
|
), $ = Te.fromRadians(G.longitude, G.latitude, G.height), j = "#FFFF00";
|
|
1452
1452
|
u.position = $, u.billboard = new Dt({
|
|
@@ -1468,8 +1468,8 @@ const yl = st, vl = Rr, _t = Fe, wl = Yn, El = Ot, xe = document.createElement("
|
|
|
1468
1468
|
e.dataSources.add(u), u.load({
|
|
1469
1469
|
type: "FeatureCollection",
|
|
1470
1470
|
features: L
|
|
1471
|
-
}).then((
|
|
1472
|
-
|
|
1471
|
+
}).then((f) => {
|
|
1472
|
+
f == null || f.entities.values.forEach((_) => {
|
|
1473
1473
|
var v;
|
|
1474
1474
|
_.billboard = new Dt({
|
|
1475
1475
|
image: (v = _.properties) == null ? void 0 : v.label.getValue(Ye.now()).dataURL,
|
|
@@ -1483,17 +1483,17 @@ const yl = st, vl = Rr, _t = Fe, wl = Yn, El = Ot, xe = document.createElement("
|
|
|
1483
1483
|
}
|
|
1484
1484
|
}, vs = 0.2, ws = (e, t = vs) => e.width === 0 ? (e.east = e.east + 1e-4 * t, e.west = e.west - 1e-4 * t, e.south = e.south - 1e-4 * t, e.north = e.north + 1e-4 * t, e) : (e.east = e.east + e.width * t, e.west = e.west - e.width * t, e.south = e.south - e.height * t, e.north = e.north + e.height * t, e);
|
|
1485
1485
|
const Es = ({ options: e, isOpen: t, locale: n }) => {
|
|
1486
|
-
const i = ve(), o = Se(void 0), r = Se(null), [l, d] = O(""), [h,
|
|
1486
|
+
const i = ve(), o = Se(void 0), r = Se(null), [l, d] = O(""), [h, g] = O(!1), [C, L] = O(!0), [u, f] = O(), [_, v] = O(), N = ae(() => Q(n, "SHOW_FEATURE_ON_MAP") ?? "Show on map", [n]), G = ae(() => Q(n, "IN_MAP_EXTENT") ?? "Search in extent", [n]), $ = ae(() => Q(n, "SEARCH_PLACEHOLDER") ?? "Search...", [n]), j = ae(() => Q(n, "NO_RESULTS") ?? "No Results", [n]), B = ae(() => i.scene.mode === Fe.SCENE2D ? !1 : (g(!1), !0), [i.scene.mode]), Z = 300, V = /* @__PURE__ */ s("svg", { width: "16px", height: "16px", viewBox: "0 0 16 16", children: /* @__PURE__ */ s("rect", { x: "0", y: "0", width: 16, height: 16, rx: "2", ry: "2", fill: "white", stroke: "#ccc", strokeWidth: 1 }) }), Y = /* @__PURE__ */ z("svg", { width: "16px", height: "16px", viewBox: "0 0 16 16", children: [
|
|
1487
1487
|
/* @__PURE__ */ s("rect", { x: "0", y: "0", width: 16, height: 16, rx: "2", ry: "2", fill: "#1976d2", stroke: "#1976d2", strokeWidth: 1 }),
|
|
1488
1488
|
/* @__PURE__ */ s("path", { d: "M4 8l2 2 6-6", fill: "none", stroke: "white", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" })
|
|
1489
1489
|
] });
|
|
1490
|
-
|
|
1490
|
+
k(() => {
|
|
1491
1491
|
e.forEach((m) => {
|
|
1492
1492
|
m.baseUrl && m.endPoint && !m.url && (m.url = m.baseUrl + m.endPoint);
|
|
1493
1493
|
});
|
|
1494
|
-
}, [e]),
|
|
1494
|
+
}, [e]), k(() => {
|
|
1495
1495
|
t && r.current && r.current.focus();
|
|
1496
|
-
}, [t]),
|
|
1496
|
+
}, [t]), k(() => {
|
|
1497
1497
|
if (!i)
|
|
1498
1498
|
return;
|
|
1499
1499
|
if (!o.current) {
|
|
@@ -1551,7 +1551,7 @@ const Es = ({ options: e, isOpen: t, locale: n }) => {
|
|
|
1551
1551
|
[i]
|
|
1552
1552
|
), p = Le(async (m, w) => {
|
|
1553
1553
|
if (!m) {
|
|
1554
|
-
|
|
1554
|
+
f([]);
|
|
1555
1555
|
return;
|
|
1556
1556
|
}
|
|
1557
1557
|
const x = e.map(async (P) => {
|
|
@@ -1582,15 +1582,15 @@ const Es = ({ options: e, isOpen: t, locale: n }) => {
|
|
|
1582
1582
|
};
|
|
1583
1583
|
})
|
|
1584
1584
|
);
|
|
1585
|
-
|
|
1585
|
+
f(M);
|
|
1586
1586
|
}, [b, e]), E = ae(() => $r((m, w) => {
|
|
1587
1587
|
p(m, w);
|
|
1588
1588
|
}, Z), [p]);
|
|
1589
|
-
|
|
1589
|
+
k(() => () => E.cancel(), [E]);
|
|
1590
1590
|
const y = (m, w) => {
|
|
1591
1591
|
d(m), E(m, w);
|
|
1592
1592
|
};
|
|
1593
|
-
|
|
1593
|
+
k(() => {
|
|
1594
1594
|
p(l, h);
|
|
1595
1595
|
}, [h]);
|
|
1596
1596
|
const S = (m) => {
|
|
@@ -1631,7 +1631,7 @@ const Es = ({ options: e, isOpen: t, locale: n }) => {
|
|
|
1631
1631
|
Rt,
|
|
1632
1632
|
{
|
|
1633
1633
|
className: "checkboxElement",
|
|
1634
|
-
label:
|
|
1634
|
+
label: N,
|
|
1635
1635
|
icon: V,
|
|
1636
1636
|
checkedicon: Y,
|
|
1637
1637
|
checked: C,
|
|
@@ -1644,13 +1644,13 @@ const Es = ({ options: e, isOpen: t, locale: n }) => {
|
|
|
1644
1644
|
Rt,
|
|
1645
1645
|
{
|
|
1646
1646
|
className: "checkboxElement",
|
|
1647
|
-
label: /* @__PURE__ */ s(At, { tag: "span", className:
|
|
1647
|
+
label: /* @__PURE__ */ s(At, { tag: "span", className: B ? "disabled" : "", children: G }),
|
|
1648
1648
|
checked: h,
|
|
1649
1649
|
icon: V,
|
|
1650
1650
|
checkedicon: Y,
|
|
1651
|
-
disabled:
|
|
1651
|
+
disabled: B,
|
|
1652
1652
|
onClick: () => {
|
|
1653
|
-
|
|
1653
|
+
g(!h);
|
|
1654
1654
|
}
|
|
1655
1655
|
}
|
|
1656
1656
|
)
|
|
@@ -1750,14 +1750,14 @@ function Kt(e, t, n, i, o) {
|
|
|
1750
1750
|
const r = (d = this.layerListInstance.find(
|
|
1751
1751
|
/* eslint-disable */
|
|
1752
1752
|
(h) => {
|
|
1753
|
-
var
|
|
1754
|
-
return ((
|
|
1753
|
+
var g, C;
|
|
1754
|
+
return ((g = h._imageryProvider._resource) == null ? void 0 : g._url) === ((C = this._resource) == null ? void 0 : C._url);
|
|
1755
1755
|
}
|
|
1756
1756
|
/* eslint-enable */
|
|
1757
1757
|
)) == null ? void 0 : d.meta, l = Q(r, at) === !0;
|
|
1758
1758
|
this.tileTransparencyCheckedCounter < pt && !l && ps(o == null ? void 0 : o.url, this).then((h) => {
|
|
1759
|
-
var
|
|
1760
|
-
(
|
|
1759
|
+
var g;
|
|
1760
|
+
(g = this.mapViewer.layersManager) == null || g.addMetaToLayer(
|
|
1761
1761
|
{ [at]: h },
|
|
1762
1762
|
/* eslint-disable */
|
|
1763
1763
|
(C) => C._imageryProvider._resource._url === this._resource._url
|
|
@@ -1962,8 +1962,8 @@ class Is {
|
|
|
1962
1962
|
geometry: h
|
|
1963
1963
|
}) && (i ? d.show : !0) : (console.warn("[LayerManager] [findLayerByPOI] CesiumImageryLayer has no defined footprint", d.meta), !1);
|
|
1964
1964
|
}).sort((d, h) => {
|
|
1965
|
-
var
|
|
1966
|
-
return ((
|
|
1965
|
+
var g, C;
|
|
1966
|
+
return ((g = h.meta) == null ? void 0 : g.zIndex) - ((C = d.meta) == null ? void 0 : C.zIndex);
|
|
1967
1967
|
});
|
|
1968
1968
|
} else
|
|
1969
1969
|
return console.warn("[LayerManager] [findLayerByPOI]layerManagerFootprintMetaFieldPath is not defined"), [];
|
|
@@ -2011,9 +2011,9 @@ class Is {
|
|
|
2011
2011
|
updateLayersOrder(t, n, i) {
|
|
2012
2012
|
const o = n > i ? _s : Ms, r = n < i ? n : i, l = n < i ? i : n;
|
|
2013
2013
|
this.layers.forEach((d) => {
|
|
2014
|
-
var
|
|
2014
|
+
var g;
|
|
2015
2015
|
if (!Q(d.meta, "parentBasetMapId")) {
|
|
2016
|
-
const C = (
|
|
2016
|
+
const C = (g = d.meta) == null ? void 0 : g.zIndex;
|
|
2017
2017
|
d.meta.zIndex = C >= r && C <= l && C !== n ? C + o : C === n ? i : C;
|
|
2018
2018
|
}
|
|
2019
2019
|
});
|
|
@@ -2034,11 +2034,11 @@ class Is {
|
|
|
2034
2034
|
r.meta = { ...r.meta, relevantToExtent: !0 };
|
|
2035
2035
|
continue;
|
|
2036
2036
|
}
|
|
2037
|
-
const h = this.layers[d],
|
|
2037
|
+
const h = this.layers[d], g = ((n = h.meta) == null ? void 0 : n[at]) === !0;
|
|
2038
2038
|
if (r !== h)
|
|
2039
2039
|
if (l instanceof Be) {
|
|
2040
2040
|
if (it(i, r.rectangle))
|
|
2041
|
-
if (it(i, h.rectangle) && !
|
|
2041
|
+
if (it(i, h.rectangle) && !g) {
|
|
2042
2042
|
r.meta = {
|
|
2043
2043
|
...r.meta ?? {},
|
|
2044
2044
|
relevantToExtent: !1
|
|
@@ -2049,15 +2049,15 @@ class Is {
|
|
|
2049
2049
|
...r.meta ?? {},
|
|
2050
2050
|
relevantToExtent: !0
|
|
2051
2051
|
};
|
|
2052
|
-
if (it(i, h.rectangle) && !
|
|
2052
|
+
if (it(i, h.rectangle) && !g) {
|
|
2053
2053
|
r.meta = { ...r.meta ?? {}, relevantToExtent: !1 };
|
|
2054
2054
|
break;
|
|
2055
2055
|
}
|
|
2056
2056
|
if (it(r.rectangle, h.rectangle)) {
|
|
2057
2057
|
if (r.meta = {
|
|
2058
2058
|
...r.meta ?? {},
|
|
2059
|
-
relevantToExtent:
|
|
2060
|
-
}, !
|
|
2059
|
+
relevantToExtent: g
|
|
2060
|
+
}, !g)
|
|
2061
2061
|
break;
|
|
2062
2062
|
} else
|
|
2063
2063
|
r.meta = { ...r.meta ?? {}, relevantToExtent: !0 };
|
|
@@ -2083,8 +2083,8 @@ const Ps = ({ legend: { legendImg: e, legendDoc: t, layer: n }, docText: i, imgT
|
|
|
2083
2083
|
window.open(t, "_blank");
|
|
2084
2084
|
}, [t]);
|
|
2085
2085
|
const l = Le(() => {
|
|
2086
|
-
const
|
|
2087
|
-
return (n ?? "").length > 15 ? /* @__PURE__ */ s(We, { content: n, children:
|
|
2086
|
+
const g = /* @__PURE__ */ s(K, { className: "layerNameContainer", children: /* @__PURE__ */ s("h3", { style: { maxWidth: `${15}ch` }, className: "layerName", children: n }) });
|
|
2087
|
+
return (n ?? "").length > 15 ? /* @__PURE__ */ s(We, { content: n, children: g }) : g;
|
|
2088
2088
|
}, [n]), d = Le(() => [
|
|
2089
2089
|
typeof e == "string" && /* @__PURE__ */ s("a", { className: "legendAction", href: e, target: "_blank", rel: "noreferrer", children: o }),
|
|
2090
2090
|
typeof t == "string" && /* @__PURE__ */ s("a", { className: "legendAction", href: t, target: "_blank", rel: "noreferrer", children: i })
|
|
@@ -2117,7 +2117,7 @@ const Ps = ({ legend: { legendImg: e, legendDoc: t, layer: n }, docText: i, imgT
|
|
|
2117
2117
|
] }) }) });
|
|
2118
2118
|
const Ds = (e) => {
|
|
2119
2119
|
const t = ve(), { enableCompass: n = !0, enableZoomControls: i = !1, lockCompassNavigation: o = !1, locale: r = { DIRECTION: "ltr" } } = e;
|
|
2120
|
-
return
|
|
2120
|
+
return k(() => {
|
|
2121
2121
|
if (typeof Q(t, "cesiumNavigation") > "u") {
|
|
2122
2122
|
t.extend(Jr, {
|
|
2123
2123
|
enableCompass: n,
|
|
@@ -2131,14 +2131,14 @@ const Ds = (e) => {
|
|
|
2131
2131
|
};
|
|
2132
2132
|
const Os = (e) => {
|
|
2133
2133
|
const t = ve(), n = Se(null), [i, o] = O({ x: 0, y: 0 });
|
|
2134
|
-
return
|
|
2134
|
+
return k(() => {
|
|
2135
2135
|
t.screenSpaceEventHandler.setInputAction((r) => {
|
|
2136
2136
|
if (r != null && r.endPosition) {
|
|
2137
2137
|
const l = { ...r.endPosition };
|
|
2138
2138
|
l.x = Math.ceil(l.x), l.y = Math.ceil(l.y), o(l);
|
|
2139
2139
|
}
|
|
2140
2140
|
}, Nt.MOUSE_MOVE);
|
|
2141
|
-
}, [n, t]),
|
|
2141
|
+
}, [n, t]), k(() => {
|
|
2142
2142
|
const r = t.scene.globe.ellipsoid;
|
|
2143
2143
|
if (i) {
|
|
2144
2144
|
const l = ai(t, i.x, i.y);
|
|
@@ -2155,8 +2155,8 @@ const Os = (e) => {
|
|
|
2155
2155
|
break;
|
|
2156
2156
|
}
|
|
2157
2157
|
case Re.WGS84: {
|
|
2158
|
-
const
|
|
2159
|
-
h = `WGS84: ${d.latitude.toFixed(Gt)}°N ${
|
|
2158
|
+
const g = d.longitude.toFixed(Gt);
|
|
2159
|
+
h = `WGS84: ${d.latitude.toFixed(Gt)}°N ${g}°E`, n.current.style.width = "200px";
|
|
2160
2160
|
break;
|
|
2161
2161
|
}
|
|
2162
2162
|
}
|
|
@@ -2208,18 +2208,18 @@ const Mt = [
|
|
|
2208
2208
|
if (h < l.lastLegendUpdate + 250)
|
|
2209
2209
|
return;
|
|
2210
2210
|
l.lastLegendUpdate = h;
|
|
2211
|
-
const
|
|
2211
|
+
const g = e.scene.canvas.clientWidth, C = e.scene.canvas.clientHeight, L = e.scene.camera.getPickRay(new Ie(g / 2 | 0, C - 1)), u = e.scene.camera.getPickRay(new Ie(1 + g / 2 | 0, C - 1)), f = e.scene.globe, _ = f.pick(L, e.scene), v = f.pick(u, e.scene);
|
|
2212
2212
|
if (!_ || !v)
|
|
2213
2213
|
return;
|
|
2214
|
-
const
|
|
2215
|
-
d.setEndPoints(
|
|
2214
|
+
const N = f.ellipsoid.cartesianToCartographic(_), G = f.ellipsoid.cartesianToCartographic(v);
|
|
2215
|
+
d.setEndPoints(N, G);
|
|
2216
2216
|
const $ = d.surfaceDistance, j = 100;
|
|
2217
|
-
let
|
|
2218
|
-
for (let Z = Mt.length - 1; !et(
|
|
2219
|
-
Mt[Z] / $ < j && (
|
|
2220
|
-
if (et(
|
|
2217
|
+
let B;
|
|
2218
|
+
for (let Z = Mt.length - 1; !et(B) && Z >= 0; --Z)
|
|
2219
|
+
Mt[Z] / $ < j && (B = Mt[Z]);
|
|
2220
|
+
if (et(B)) {
|
|
2221
2221
|
let Z = "";
|
|
2222
|
-
|
|
2222
|
+
B >= 1e3 ? Z = `${(B / 1e3).toString()} ${r}` : Z = `${B.toString()} ${o}`, l.barWidth = B / $ | 0, l.distanceLabel = Z;
|
|
2223
2223
|
}
|
|
2224
2224
|
n(l);
|
|
2225
2225
|
}, Ns = (e) => {
|
|
@@ -2228,7 +2228,7 @@ const Mt = [
|
|
|
2228
2228
|
distanceLabel: void 0,
|
|
2229
2229
|
lastLegendUpdate: -1
|
|
2230
2230
|
});
|
|
2231
|
-
|
|
2231
|
+
k(() => {
|
|
2232
2232
|
const r = (h) => {
|
|
2233
2233
|
ks(t, n, i, e.locale);
|
|
2234
2234
|
}, l = new Br(), d = (h) => {
|
|
@@ -2313,23 +2313,23 @@ const bn = (e, t) => {
|
|
|
2313
2313
|
}, Gs = ({ locale: e = void 0, valueBy: t = "RENDERED_TILES" }) => {
|
|
2314
2314
|
const n = ve(), i = tt(), [o, r] = O(1), l = Fs(1, n), d = Le(() => {
|
|
2315
2315
|
const L = n.camera, u = 0.5;
|
|
2316
|
-
let
|
|
2316
|
+
let f = 0;
|
|
2317
2317
|
switch (n.scene.mode) {
|
|
2318
2318
|
case _t.SCENE3D:
|
|
2319
|
-
|
|
2319
|
+
f = n.scene.mapProjection.ellipsoid.cartesianToCartographic(L.positionWC).height;
|
|
2320
2320
|
break;
|
|
2321
2321
|
case _t.SCENE2D:
|
|
2322
|
-
|
|
2322
|
+
f = (L.frustum.right - L.frustum.left) * u;
|
|
2323
2323
|
break;
|
|
2324
2324
|
case _t.COLUMBUS_VIEW:
|
|
2325
|
-
|
|
2325
|
+
f = L.position.z;
|
|
2326
2326
|
break;
|
|
2327
2327
|
default:
|
|
2328
|
-
|
|
2328
|
+
f = 0;
|
|
2329
2329
|
break;
|
|
2330
2330
|
}
|
|
2331
2331
|
if (l.length > 0) {
|
|
2332
|
-
const _ = l.reduce((v,
|
|
2332
|
+
const _ = l.reduce((v, N) => Math.abs(N.height - f) < Math.abs(v.height - f) ? N : v);
|
|
2333
2333
|
r(_.level), i.setViewState && i.setViewState((v) => ({ ...v, currentZoomLevel: _.level }));
|
|
2334
2334
|
}
|
|
2335
2335
|
}, [n, l]), h = Le(() => {
|
|
@@ -2341,7 +2341,7 @@ const bn = (e, t) => {
|
|
|
2341
2341
|
CALCULATION: d,
|
|
2342
2342
|
RENDERED_TILES: h
|
|
2343
2343
|
}), [d, h])[t];
|
|
2344
|
-
return
|
|
2344
|
+
return k(() => {
|
|
2345
2345
|
const L = n.scene.globe.tileLoadProgressEvent.addEventListener(function() {
|
|
2346
2346
|
n.scene.globe.tilesLoaded && C();
|
|
2347
2347
|
});
|
|
@@ -2376,8 +2376,8 @@ const Jt = ze(null), Hs = Jt.Provider, ve = () => {
|
|
|
2376
2376
|
return t;
|
|
2377
2377
|
}, Cl = (e) => {
|
|
2378
2378
|
var fe, ye, Pe, Ue, qe, en, tn, nn;
|
|
2379
|
-
const t = Se(null), [n, i] = O(), [o, r] = O(), [l, d] = O(), [h,
|
|
2380
|
-
|
|
2379
|
+
const t = Se(null), [n, i] = O(), [o, r] = O(), [l, d] = O(), [h, g] = O(), [C, L] = O(), [u, f] = O(), [_, v] = O(), [N, G] = O(), [$, j] = O(), [B, Z] = O(), [V, Y] = O(!1), [ee, a] = O(!1), c = Se(), [b, p] = O([]), [E, y] = O(), [S, m] = O(), [w, x] = O(!1), R = Se(), [M, P] = O(void 0), [D, J] = O(!1), [te, U] = O(), [q, re] = O(), he = lt(), we = go(he), oe = ae(() => V || ee, [V, ee]);
|
|
2380
|
+
k(() => {
|
|
2381
2381
|
re({
|
|
2382
2382
|
currentZoomLevel: -1,
|
|
2383
2383
|
shouldOptimizedTileRequests: e.useOptimizedTileRequests ?? !1
|
|
@@ -2409,7 +2409,7 @@ const Jt = ze(null), Hs = Jt.Provider, ve = () => {
|
|
|
2409
2409
|
},
|
|
2410
2410
|
[t]
|
|
2411
2411
|
);
|
|
2412
|
-
|
|
2412
|
+
k(() => {
|
|
2413
2413
|
var se;
|
|
2414
2414
|
if (t.current !== null) {
|
|
2415
2415
|
const de = t.current.cesiumElement;
|
|
@@ -2437,12 +2437,12 @@ const Jt = ze(null), Hs = Jt.Provider, ve = () => {
|
|
|
2437
2437
|
setViewState: re
|
|
2438
2438
|
};
|
|
2439
2439
|
}, [e.useOptimizedTileRequests, e.legends, e.layerManagerFootprintMetaFieldPath, n, q]);
|
|
2440
|
-
|
|
2440
|
+
k(() => {
|
|
2441
2441
|
var de, ce;
|
|
2442
2442
|
y(e.baseMaps);
|
|
2443
2443
|
const se = (de = e.baseMaps) == null ? void 0 : de.maps.find((Ee) => Ee.isCurrent);
|
|
2444
2444
|
se && n && ((ce = n.layersManager) == null || ce.setBaseMapLayers(se));
|
|
2445
|
-
}, [e.baseMaps, n]),
|
|
2445
|
+
}, [e.baseMaps, n]), k(() => {
|
|
2446
2446
|
const se = e.terrains || (n && n.terrainProvider ? [{
|
|
2447
2447
|
id: "1",
|
|
2448
2448
|
url: Ts,
|
|
@@ -2452,23 +2452,23 @@ const Jt = ze(null), Hs = Jt.Provider, ve = () => {
|
|
|
2452
2452
|
terrainProvider: n.terrainProvider
|
|
2453
2453
|
}] : void 0);
|
|
2454
2454
|
m(se);
|
|
2455
|
-
}, [e.terrains, n]),
|
|
2455
|
+
}, [e.terrains, n]), k(() => {
|
|
2456
2456
|
d(e.projection ?? Re.WGS84);
|
|
2457
|
-
}, [e.projection]),
|
|
2457
|
+
}, [e.projection]), k(() => {
|
|
2458
2458
|
r(e.locale);
|
|
2459
|
-
}, [e.locale]),
|
|
2460
|
-
|
|
2461
|
-
}, [e.showMousePosition]),
|
|
2459
|
+
}, [e.locale]), k(() => {
|
|
2460
|
+
g(e.showMousePosition ?? !0);
|
|
2461
|
+
}, [e.showMousePosition]), k(() => {
|
|
2462
2462
|
L(e.showZoomLevel ?? !0);
|
|
2463
|
-
}, [e.showZoomLevel]),
|
|
2464
|
-
|
|
2465
|
-
}, [e.showScale]),
|
|
2463
|
+
}, [e.showZoomLevel]), k(() => {
|
|
2464
|
+
f(e.showScale ?? !0);
|
|
2465
|
+
}, [e.showScale]), k(() => {
|
|
2466
2466
|
v(e.showCompass ?? !0);
|
|
2467
|
-
}, [e.showCompass]),
|
|
2467
|
+
}, [e.showCompass]), k(() => {
|
|
2468
2468
|
Z(e.showLoadingProgress ?? !0);
|
|
2469
|
-
}, [e.showLoadingProgress]),
|
|
2469
|
+
}, [e.showLoadingProgress]), k(() => {
|
|
2470
2470
|
j(e.showActiveLayersTool ?? !0);
|
|
2471
|
-
}, [e.showActiveLayersTool]),
|
|
2471
|
+
}, [e.showActiveLayersTool]), k(() => {
|
|
2472
2472
|
var de;
|
|
2473
2473
|
const se = () => {
|
|
2474
2474
|
if (n === void 0)
|
|
@@ -2517,7 +2517,7 @@ const Jt = ze(null), Hs = Jt.Provider, ve = () => {
|
|
|
2517
2517
|
};
|
|
2518
2518
|
c.current = Ee;
|
|
2519
2519
|
}
|
|
2520
|
-
}),
|
|
2520
|
+
}), B && (n.scene.globe.tileLoadProgressEvent.addEventListener(function() {
|
|
2521
2521
|
n.scene.globe.tilesLoaded ? Y(!1) : Y(!0);
|
|
2522
2522
|
}), (de = n.layersManager) == null || de.addDataLayerUpdatedListener(() => {
|
|
2523
2523
|
var Ee;
|
|
@@ -2529,7 +2529,7 @@ const Jt = ze(null), Hs = Jt.Provider, ve = () => {
|
|
|
2529
2529
|
}
|
|
2530
2530
|
}), a(ce);
|
|
2531
2531
|
})));
|
|
2532
|
-
}, [n]),
|
|
2532
|
+
}, [n]), k(() => {
|
|
2533
2533
|
const se = () => {
|
|
2534
2534
|
if (n && c.current) {
|
|
2535
2535
|
const de = c.current;
|
|
@@ -2547,7 +2547,7 @@ const Jt = ze(null), Hs = Jt.Provider, ve = () => {
|
|
|
2547
2547
|
console.error("morphCompleteHandler event not cleaned");
|
|
2548
2548
|
}
|
|
2549
2549
|
};
|
|
2550
|
-
}, [n]),
|
|
2550
|
+
}, [n]), k(() => {
|
|
2551
2551
|
const se = e.zoom, de = e.center;
|
|
2552
2552
|
if (n && et(se) && dn(de)) {
|
|
2553
2553
|
const ce = de[0], Ee = de[1], _e = ns(se);
|
|
@@ -2570,21 +2570,21 @@ const Jt = ze(null), Hs = Jt.Provider, ve = () => {
|
|
|
2570
2570
|
}
|
|
2571
2571
|
};
|
|
2572
2572
|
}
|
|
2573
|
-
}, [e.zoom, e.center, n]),
|
|
2573
|
+
}, [e.zoom, e.center, n]), k(() => {
|
|
2574
2574
|
G(e.showZoomButtons ?? !0);
|
|
2575
2575
|
}, [e.showZoomButtons]);
|
|
2576
2576
|
const H = () => {
|
|
2577
2577
|
J((se) => !se);
|
|
2578
2578
|
}, W = Le(() => n && wt(
|
|
2579
2579
|
/* @__PURE__ */ z(ge, { children: [
|
|
2580
|
-
|
|
2580
|
+
B && oe && /* @__PURE__ */ s(Ni, { style: { position: "absolute", top: 0, height: "10px", zIndex: 4 } }),
|
|
2581
2581
|
_ && /* @__PURE__ */ s(Ds, { locale: o }),
|
|
2582
2582
|
/* @__PURE__ */ z(K, { className: "bottomToolsContainer", children: [
|
|
2583
2583
|
h && /* @__PURE__ */ s(Os, { projection: l }),
|
|
2584
2584
|
C && /* @__PURE__ */ s(Gs, { locale: o, valueBy: "RENDERED_TILES" }),
|
|
2585
2585
|
u && /* @__PURE__ */ s(Ns, { locale: o })
|
|
2586
2586
|
] }),
|
|
2587
|
-
|
|
2587
|
+
N && /* @__PURE__ */ s(Bs, {})
|
|
2588
2588
|
] }),
|
|
2589
2589
|
document.querySelector(".cesium-viewer")
|
|
2590
2590
|
), [n, o, l, h, u, oe]), X = Le(() => n && wt(
|
|
@@ -2702,10 +2702,10 @@ const Jt = ze(null), Hs = Jt.Provider, ve = () => {
|
|
|
2702
2702
|
const { options: t, ...n } = e;
|
|
2703
2703
|
return /* @__PURE__ */ s(gt, { ...n, imageryProvider: new Hr(t) });
|
|
2704
2704
|
}, Pl = (e) => {
|
|
2705
|
-
const { options: t, meta: n, visualizationHandler: i, withGeometryValidation: o = !1 } = e, { url: r, featureType: l, style: d, pageSize: h, zoomLevel:
|
|
2706
|
-
|
|
2707
|
-
G.current =
|
|
2708
|
-
}, [
|
|
2705
|
+
const { options: t, meta: n, visualizationHandler: i, withGeometryValidation: o = !1 } = e, { url: r, featureType: l, style: d, pageSize: h, zoomLevel: g, maxCacheSize: C, keyField: L, labeling: u } = t, { color: f, hover: _ } = d, v = ve(), N = tt(), G = Se(N.viewState), $ = Se(/* @__PURE__ */ new Map()), j = Se(/* @__PURE__ */ new Set()), B = Se(0), [Z, V] = O(n), Y = ae(() => Ge.fromCssColorString(_ ?? "#24AEE9").withAlpha(0.5), [_]), ee = ae(() => `wfs_${l}_${pn()}`, [l]), a = Se(!1);
|
|
2706
|
+
k(() => {
|
|
2707
|
+
G.current = N.viewState;
|
|
2708
|
+
}, [N.viewState]);
|
|
2709
2709
|
const c = new Ut(ee), b = (I) => {
|
|
2710
2710
|
const A = [], F = n.featureStructure;
|
|
2711
2711
|
if (F && F.fields)
|
|
@@ -2777,7 +2777,7 @@ const Jt = ze(null), Hs = Jt.Provider, ve = () => {
|
|
|
2777
2777
|
}));
|
|
2778
2778
|
}, x = () => {
|
|
2779
2779
|
if (c.entities && c.entities.values.length > 0) {
|
|
2780
|
-
c.show = !1,
|
|
2780
|
+
c.show = !1, B.current = 0;
|
|
2781
2781
|
const I = v.dataSources.getByName(`${u == null ? void 0 : u.dataSourcePrefix}${c.name}`)[0];
|
|
2782
2782
|
I && (I.show = !1, v.dataSources.remove(I));
|
|
2783
2783
|
}
|
|
@@ -2893,7 +2893,7 @@ const Jt = ze(null), Hs = Jt.Provider, ve = () => {
|
|
|
2893
2893
|
timestamp: I.timeStamp,
|
|
2894
2894
|
items: le.length
|
|
2895
2895
|
})), w(I.numberReturned !== 0 ? F + I.numberReturned : I.numberMatched, I.numberMatched), le.length === 0) {
|
|
2896
|
-
I.numberReturned && I.numberReturned !== 0 ? we(++
|
|
2896
|
+
I.numberReturned && I.numberReturned !== 0 ? we(++B.current * h) : (B.current = 0, pe(
|
|
2897
2897
|
v,
|
|
2898
2898
|
c,
|
|
2899
2899
|
c.entities.values.map((ye) => ye.id),
|
|
@@ -2911,17 +2911,17 @@ const Jt = ze(null), Hs = Jt.Provider, ve = () => {
|
|
|
2911
2911
|
c,
|
|
2912
2912
|
le.map((ye) => ye.id),
|
|
2913
2913
|
A
|
|
2914
|
-
), I.numberReturned && I.numberReturned !== 0 ? we(++
|
|
2914
|
+
), I.numberReturned && I.numberReturned !== 0 ? we(++B.current * h) : B.current = 0;
|
|
2915
2915
|
}, we = Le(async (I = 0) => {
|
|
2916
2916
|
if (!v || v.scene.mode === Fe.MORPHING)
|
|
2917
2917
|
return;
|
|
2918
2918
|
const A = ys(v);
|
|
2919
2919
|
if (A) {
|
|
2920
|
-
if (await oe(), G.current.currentZoomLevel > 0 && G.current.currentZoomLevel <
|
|
2920
|
+
if (await oe(), G.current.currentZoomLevel > 0 && G.current.currentZoomLevel < g && (c == null ? void 0 : c.entities.values.length) > 0) {
|
|
2921
2921
|
x();
|
|
2922
2922
|
return;
|
|
2923
2923
|
}
|
|
2924
|
-
if (G.current.currentZoomLevel >=
|
|
2924
|
+
if (G.current.currentZoomLevel >= g) {
|
|
2925
2925
|
c.show = !0;
|
|
2926
2926
|
const F = ii(A), H = fs(A);
|
|
2927
2927
|
try {
|
|
@@ -2942,17 +2942,17 @@ const Jt = ze(null), Hs = Jt.Provider, ve = () => {
|
|
|
2942
2942
|
v.scene.globe.tilesLoaded && (clearInterval(A), I());
|
|
2943
2943
|
}, 100);
|
|
2944
2944
|
}), pe = (I, A, F, H) => {
|
|
2945
|
-
i ? i(I, A, F, H) : oi(I, A, F,
|
|
2945
|
+
i ? i(I, A, F, H) : oi(I, A, F, f, H, u);
|
|
2946
2946
|
};
|
|
2947
|
-
return
|
|
2947
|
+
return k(() => {
|
|
2948
2948
|
const I = v.dataSources.getByName(ee)[0];
|
|
2949
2949
|
I && pe(v, I, [], void 0);
|
|
2950
|
-
}, [v.scene.mode]),
|
|
2950
|
+
}, [v.scene.mode]), k(() => {
|
|
2951
2951
|
v.layersManager && v.layersManager.dataLayerList.length > 0 && v.layersManager.findDataLayerById(n.id) !== void 0 && v.layersManager.addMetaToDataLayer(Z);
|
|
2952
|
-
}, [Z]),
|
|
2952
|
+
}, [Z]), k(() => {
|
|
2953
2953
|
var I;
|
|
2954
2954
|
(I = v.layersManager) == null || I.addDataLayer({ options: t, meta: { ...Z }, visualizationHandler: i });
|
|
2955
|
-
}, [v.layersManager]),
|
|
2955
|
+
}, [v.layersManager]), k(() => {
|
|
2956
2956
|
v.dataSources.add(c);
|
|
2957
2957
|
const I = () => {
|
|
2958
2958
|
we();
|
|
@@ -3038,7 +3038,7 @@ var He = function() {
|
|
|
3038
3038
|
}),
|
|
3039
3039
|
material: n,
|
|
3040
3040
|
granularity: Math.PI / 180
|
|
3041
|
-
}), l = V(o, {}), d = V(o, {}), h = V(o, {}),
|
|
3041
|
+
}), l = V(o, {}), d = V(o, {}), h = V(o, {}), g = V(r, {
|
|
3042
3042
|
rotation: 0
|
|
3043
3043
|
}), C = V(o, {
|
|
3044
3044
|
width: 5,
|
|
@@ -3191,7 +3191,7 @@ var He = function() {
|
|
|
3191
3191
|
function a(c) {
|
|
3192
3192
|
if (!(T.defined(c.center) && T.defined(c.semiMajorAxis) && T.defined(c.semiMinorAxis)))
|
|
3193
3193
|
throw new T.DeveloperError("Center and semi major and semi minor axis are required");
|
|
3194
|
-
c = V(c,
|
|
3194
|
+
c = V(c, g), this.initialiseOptions(c);
|
|
3195
3195
|
}
|
|
3196
3196
|
return a.prototype = new L(), a.prototype.setCenter = function(c) {
|
|
3197
3197
|
this.setAttribute("center", c);
|
|
@@ -3261,7 +3261,7 @@ var He = function() {
|
|
|
3261
3261
|
iconUrl: "./assets/img/dragIcon.png",
|
|
3262
3262
|
shiftX: 0,
|
|
3263
3263
|
shiftY: 0
|
|
3264
|
-
},
|
|
3264
|
+
}, f = {
|
|
3265
3265
|
iconUrl: "./assets/img/dragIcon.png",
|
|
3266
3266
|
shiftX: 0,
|
|
3267
3267
|
shiftY: 0
|
|
@@ -3386,7 +3386,7 @@ var He = function() {
|
|
|
3386
3386
|
var b = this, p = this._scene, E = p.primitives, y = this._tooltip, S = a ? 3 : 2, m;
|
|
3387
3387
|
a ? m = new He.PolygonPrimitive(c) : m = new He.PolylinePrimitive(c), m.asynchronous = !1, E.add(m);
|
|
3388
3388
|
var w = [], x = new i.BillboardGroup(this, u), R = new T.ScreenSpaceEventHandler(p.canvas);
|
|
3389
|
-
|
|
3389
|
+
N(p), R.setInputAction(function(M) {
|
|
3390
3390
|
if (M.position != null) {
|
|
3391
3391
|
var P = p.camera.pickEllipsoid(M.position, e);
|
|
3392
3392
|
P && (w.length == 0 && (w.push(P.clone()), x.addBillboard(w[0])), w.length >= S && (m.positions = w, m._createPrimitive = !0), w.push(P), x.addBillboard(P));
|
|
@@ -3421,7 +3421,7 @@ var He = function() {
|
|
|
3421
3421
|
T.Rectangle.southwest(a)
|
|
3422
3422
|
]);
|
|
3423
3423
|
}
|
|
3424
|
-
function
|
|
3424
|
+
function N(a) {
|
|
3425
3425
|
a && (a.canvas.style.cursor = "crosshair");
|
|
3426
3426
|
}
|
|
3427
3427
|
function G(a) {
|
|
@@ -3433,7 +3433,7 @@ var He = function() {
|
|
|
3433
3433
|
m != null && E.remove(m), w != null && w.remove(), x.destroy(), y.setVisible(!1), G(p);
|
|
3434
3434
|
});
|
|
3435
3435
|
var b = this, p = this._scene, E = this._scene.primitives, y = this._tooltip, S = null, m = null, w = null, x = new T.ScreenSpaceEventHandler(p.canvas);
|
|
3436
|
-
|
|
3436
|
+
N(p);
|
|
3437
3437
|
function R(M) {
|
|
3438
3438
|
m == null && (m = new He.ExtentPrimitive({
|
|
3439
3439
|
extent: M,
|
|
@@ -3544,7 +3544,7 @@ var He = function() {
|
|
|
3544
3544
|
).interpolateUsingFraction(0.5)
|
|
3545
3545
|
);
|
|
3546
3546
|
};
|
|
3547
|
-
var S = new i.BillboardGroup(a,
|
|
3547
|
+
var S = new i.BillboardGroup(a, f), m = new i.BillboardGroup(a, _), w = {
|
|
3548
3548
|
dragHandlers: {
|
|
3549
3549
|
onDrag: function(U, q) {
|
|
3550
3550
|
y.positions[U] = q, D(U, y.positions), y._createPrimitive = !0;
|
|
@@ -3616,7 +3616,7 @@ var He = function() {
|
|
|
3616
3616
|
extent: p.extent
|
|
3617
3617
|
});
|
|
3618
3618
|
};
|
|
3619
|
-
var S = new i.BillboardGroup(a,
|
|
3619
|
+
var S = new i.BillboardGroup(a, f), m = {
|
|
3620
3620
|
dragHandlers: {
|
|
3621
3621
|
onDrag: function(x, R) {
|
|
3622
3622
|
var M = S.getBillboard((x + 2) % 4).position;
|
|
@@ -3667,7 +3667,7 @@ var He = function() {
|
|
|
3667
3667
|
rotation: 0
|
|
3668
3668
|
});
|
|
3669
3669
|
};
|
|
3670
|
-
var m = new i.BillboardGroup(a,
|
|
3670
|
+
var m = new i.BillboardGroup(a, f), w = {
|
|
3671
3671
|
dragHandlers: {
|
|
3672
3672
|
onDrag: function(M, P) {
|
|
3673
3673
|
var D = T.Cartesian3.distance(p.getCenter(), P);
|
|
@@ -3720,7 +3720,7 @@ var He = function() {
|
|
|
3720
3720
|
radius: p.getRadius()
|
|
3721
3721
|
});
|
|
3722
3722
|
};
|
|
3723
|
-
var m = new i.BillboardGroup(a,
|
|
3723
|
+
var m = new i.BillboardGroup(a, f), w = {
|
|
3724
3724
|
dragHandlers: {
|
|
3725
3725
|
onDrag: function(M, P) {
|
|
3726
3726
|
p.setRadius(T.Cartesian3.distance(p.getCenter(), P)), m.updateBillboardsPositions(x());
|
|
@@ -3834,26 +3834,26 @@ var He = function() {
|
|
|
3834
3834
|
function j(a, c) {
|
|
3835
3835
|
return a.longitude.toFixed(c || 3) + ", " + a.latitude.toFixed(c || 3);
|
|
3836
3836
|
}
|
|
3837
|
-
function
|
|
3837
|
+
function B(a, c) {
|
|
3838
3838
|
if (a == null || typeof a != "object" || a.constructor != Object && a.constructor != Array)
|
|
3839
3839
|
return a;
|
|
3840
3840
|
if (a.constructor == Date || a.constructor == RegExp || a.constructor == Function || a.constructor == String || a.constructor == Number || a.constructor == Boolean)
|
|
3841
3841
|
return new a.constructor(a);
|
|
3842
3842
|
c = c || new a.constructor();
|
|
3843
3843
|
for (var b in a)
|
|
3844
|
-
c[b] = typeof c[b] > "u" ?
|
|
3844
|
+
c[b] = typeof c[b] > "u" ? B(a[b], null) : c[b];
|
|
3845
3845
|
return c;
|
|
3846
3846
|
}
|
|
3847
3847
|
function Z(a, c) {
|
|
3848
3848
|
a = a || {};
|
|
3849
3849
|
var b;
|
|
3850
3850
|
for (b in c)
|
|
3851
|
-
a[b] === void 0 && (a[b] =
|
|
3851
|
+
a[b] === void 0 && (a[b] = B(c[b]));
|
|
3852
3852
|
}
|
|
3853
3853
|
function V(a, c) {
|
|
3854
|
-
var b =
|
|
3854
|
+
var b = B(a), p;
|
|
3855
3855
|
for (p in c)
|
|
3856
|
-
b[p] === void 0 && (b[p] =
|
|
3856
|
+
b[p] === void 0 && (b[p] = B(c[p]));
|
|
3857
3857
|
return b;
|
|
3858
3858
|
}
|
|
3859
3859
|
function Y(a, c, b) {
|
|
@@ -3925,13 +3925,13 @@ const Xs = (e) => {
|
|
|
3925
3925
|
]);
|
|
3926
3926
|
return ut(dt(t)).geometry.coordinates[0].map((i) => Te.fromRadiansArray(i)[0]);
|
|
3927
3927
|
}, Al = (e) => {
|
|
3928
|
-
const { drawState: t, drawingMaterial: n, drawingVertexColor: i, material: o, hollow: r, outlineWidth: l } = e, d = ve(), [h,
|
|
3929
|
-
|
|
3930
|
-
|
|
3928
|
+
const { drawState: t, drawingMaterial: n, drawingVertexColor: i, material: o, hollow: r, outlineWidth: l } = e, d = ve(), [h, g] = O();
|
|
3929
|
+
k(() => {
|
|
3930
|
+
g(
|
|
3931
3931
|
// eslint-disable-next-line
|
|
3932
3932
|
new He(d, n, i)
|
|
3933
3933
|
);
|
|
3934
|
-
}, []),
|
|
3934
|
+
}, []), k(() => {
|
|
3935
3935
|
if (h) {
|
|
3936
3936
|
const L = h;
|
|
3937
3937
|
if (t.drawing)
|
|
@@ -4006,14 +4006,14 @@ const Xs = (e) => {
|
|
|
4006
4006
|
] }, L.id)) });
|
|
4007
4007
|
}, Rl = () => {
|
|
4008
4008
|
const e = ve();
|
|
4009
|
-
return
|
|
4009
|
+
return k(() => {
|
|
4010
4010
|
e.extend(zr);
|
|
4011
4011
|
}, [e]), null;
|
|
4012
4012
|
}, ea = -25, An = 2, Dl = (e) => {
|
|
4013
4013
|
const t = ve(), n = (r, l = ",") => r.slice(r.indexOf(`
|
|
4014
4014
|
`) + 1).split(`
|
|
4015
|
-
`).map((
|
|
4016
|
-
const C =
|
|
4015
|
+
`).map((g) => {
|
|
4016
|
+
const C = g.split(l);
|
|
4017
4017
|
return {
|
|
4018
4018
|
cartographic: Oe.fromDegrees(parseFloat(C[0]), parseFloat(C[1])),
|
|
4019
4019
|
cartesian: new Ie(parseFloat(C[0]), parseFloat(C[1]))
|
|
@@ -4024,14 +4024,14 @@ const Xs = (e) => {
|
|
|
4024
4024
|
const l = new FileReader();
|
|
4025
4025
|
l.onload = (h) => {
|
|
4026
4026
|
var u;
|
|
4027
|
-
const
|
|
4027
|
+
const g = (u = h.target) == null ? void 0 : u.result, C = n(g), L = zt.WGS84;
|
|
4028
4028
|
console.log(`Loaded CSV content:
|
|
4029
|
-
`,
|
|
4029
|
+
`, g), Ur(
|
|
4030
4030
|
t.terrainProvider,
|
|
4031
|
-
C.map((
|
|
4031
|
+
C.map((f) => f.cartographic)
|
|
4032
4032
|
).then(
|
|
4033
|
-
(
|
|
4034
|
-
console.log(
|
|
4033
|
+
(f) => {
|
|
4034
|
+
console.log(f), f = f.slice(0, f.length - 1), t.scene.globe.depthTestAgainstTerrain = !0, t.entities.suspendEvents(), t.entities.removeAll(), f.forEach((_, v) => {
|
|
4035
4035
|
t.entities.add({
|
|
4036
4036
|
name: (v + An).toString(),
|
|
4037
4037
|
position: L.cartographicToCartesian(_),
|
|
@@ -4058,15 +4058,15 @@ const Xs = (e) => {
|
|
|
4058
4058
|
});
|
|
4059
4059
|
}), t.entities.resumeEvents(), r.target.files !== null && (o(`terranian_heights_${r.target.files[0].name}`, C), r.target.value = ""), console.log("Pinned point count is ", t.entities.values.length);
|
|
4060
4060
|
},
|
|
4061
|
-
(
|
|
4062
|
-
console.error("ERROR while sampleTerrainMostDetailed:",
|
|
4061
|
+
(f) => {
|
|
4062
|
+
console.error("ERROR while sampleTerrainMostDetailed:", f);
|
|
4063
4063
|
}
|
|
4064
4064
|
);
|
|
4065
4065
|
}, (d = r.target.files) != null && d[0] && l.readAsText(r.target.files[0]);
|
|
4066
4066
|
}, o = (r, l) => {
|
|
4067
4067
|
const d = (u) => {
|
|
4068
|
-
let
|
|
4069
|
-
return
|
|
4068
|
+
let f = "";
|
|
4069
|
+
return f += u.cartesian.x.toString() + ",", f += u.cartesian.y.toString() + ",", f += u.cartographic.height.toString(), f + `
|
|
4070
4070
|
`;
|
|
4071
4071
|
};
|
|
4072
4072
|
let h = `long,lat,height
|
|
@@ -4074,7 +4074,7 @@ const Xs = (e) => {
|
|
|
4074
4074
|
l.forEach((u) => {
|
|
4075
4075
|
h += d(u);
|
|
4076
4076
|
});
|
|
4077
|
-
const
|
|
4077
|
+
const g = new Blob([h], { type: "text/csv;charset=utf-8;" }), C = document.createElement("a"), L = URL.createObjectURL(g);
|
|
4078
4078
|
C.setAttribute("href", L), C.setAttribute("download", r), C.style.visibility = "hidden", document.body.appendChild(C), C.click(), document.body.removeChild(C);
|
|
4079
4079
|
};
|
|
4080
4080
|
return /* @__PURE__ */ s(ge, { children: /* @__PURE__ */ s(
|
|
@@ -4104,15 +4104,15 @@ const ta = 38, na = 40, ia = 13, ra = 14, oa = 27, sa = 9, aa = 10, ca = 100, la
|
|
|
4104
4104
|
caret: 0,
|
|
4105
4105
|
width: "unset"
|
|
4106
4106
|
}), d = Se(null);
|
|
4107
|
-
|
|
4107
|
+
k(() => (window.addEventListener("resize", _), () => {
|
|
4108
4108
|
try {
|
|
4109
4109
|
window.removeEventListener("resize", _);
|
|
4110
4110
|
} catch (E) {
|
|
4111
4111
|
console.log('WINDOW "resize" remove listener failed', E);
|
|
4112
4112
|
}
|
|
4113
|
-
}), []),
|
|
4113
|
+
}), []), k(() => {
|
|
4114
4114
|
typeof e.value < "u" && n(e.value), typeof e.defaultValue < "u" && n(e.defaultValue);
|
|
4115
|
-
}, [e.value, e.defaultValue]),
|
|
4115
|
+
}, [e.value, e.defaultValue]), k(() => {
|
|
4116
4116
|
const { options: E } = e, { caret: y } = r;
|
|
4117
4117
|
$(t, y, E);
|
|
4118
4118
|
}, [e]);
|
|
@@ -4124,7 +4124,7 @@ const ta = 38, na = 40, ia = 13, ra = 14, oa = 27, sa = 9, aa = 10, ca = 100, la
|
|
|
4124
4124
|
Array.isArray(S) && M.forEach((te) => {
|
|
4125
4125
|
P[te] = S;
|
|
4126
4126
|
});
|
|
4127
|
-
const D =
|
|
4127
|
+
const D = g(M, R);
|
|
4128
4128
|
let J = {};
|
|
4129
4129
|
for (let te = 0; te < D.length; te++) {
|
|
4130
4130
|
const { triggerStr: U, triggerMatch: q, triggerLength: re } = D[te];
|
|
@@ -4160,7 +4160,7 @@ const ta = 38, na = 40, ia = 13, ra = 14, oa = 27, sa = 9, aa = 10, ca = 100, la
|
|
|
4160
4160
|
}
|
|
4161
4161
|
}
|
|
4162
4162
|
return J;
|
|
4163
|
-
},
|
|
4163
|
+
}, g = (E, y) => E.map((m) => ({
|
|
4164
4164
|
triggerStr: m,
|
|
4165
4165
|
triggerMatch: m.match(y),
|
|
4166
4166
|
triggerLength: m.length
|
|
@@ -4180,7 +4180,7 @@ const ta = 38, na = 40, ia = 13, ra = 14, oa = 27, sa = 9, aa = 10, ca = 100, la
|
|
|
4180
4180
|
if (R[D] !== M[D]) {
|
|
4181
4181
|
if (D >= 2 && M[D - 1] === w && m.indexOf(M[D - 2]) === -1 && m.indexOf(M[D]) !== -1 && !Bt(h(M.substring(0, D - 2), P - 3, S))) {
|
|
4182
4182
|
const J = `${M.slice(0, D - 1)}${M.slice(D, D + 1)}${M.slice(D - 1, D)}${M.slice(D + 1)}`;
|
|
4183
|
-
return
|
|
4183
|
+
return N(D + 1), d.current !== null && (d.current.value = J), x || G({
|
|
4184
4184
|
...r,
|
|
4185
4185
|
value: J
|
|
4186
4186
|
}), y(J);
|
|
@@ -4201,7 +4201,7 @@ const ta = 38, na = 40, ia = 13, ra = 14, oa = 27, sa = 9, aa = 10, ca = 100, la
|
|
|
4201
4201
|
return S[0];
|
|
4202
4202
|
} else
|
|
4203
4203
|
return E;
|
|
4204
|
-
},
|
|
4204
|
+
}, f = (E) => {
|
|
4205
4205
|
const { helperVisible: y, options: S, selection: m } = r, { onKeyDown: w, passThroughEnter: x } = e;
|
|
4206
4206
|
if (y)
|
|
4207
4207
|
switch (E.keyCode) {
|
|
@@ -4240,8 +4240,8 @@ const ta = 38, na = 40, ia = 13, ra = 14, oa = 27, sa = 9, aa = 10, ca = 100, la
|
|
|
4240
4240
|
});
|
|
4241
4241
|
}, v = (E) => {
|
|
4242
4242
|
const { spacer: y, onSelect: S, changeOnSelect: m } = e, { matchStart: w, matchLength: x, options: R, trigger: M } = r, P = R[E], D = t, J = D.substring(0, w - M.length), te = D.substring(w + x), U = { target: d.current }, q = m(M, P);
|
|
4243
|
-
U.target !== null && (U.target.value = `${J}${q}${y}${te}`), L(U), U.target !== null && S(U.target.value), j(),
|
|
4244
|
-
},
|
|
4243
|
+
U.target !== null && (U.target.value = `${J}${q}${y}${te}`), L(U), U.target !== null && S(U.target.value), j(), N(J.length + q.length + 1), o(!0);
|
|
4244
|
+
}, N = (E) => {
|
|
4245
4245
|
G({
|
|
4246
4246
|
...r,
|
|
4247
4247
|
caret: E
|
|
@@ -4285,7 +4285,7 @@ const ta = 38, na = 40, ia = 13, ra = 14, oa = 27, sa = 9, aa = 10, ca = 100, la
|
|
|
4285
4285
|
selection: 0
|
|
4286
4286
|
});
|
|
4287
4287
|
}, 100);
|
|
4288
|
-
},
|
|
4288
|
+
}, B = () => {
|
|
4289
4289
|
const { helperVisible: E, left: y, right: S, matchStart: m, matchLength: w, options: x, selection: R, top: M, value: P, width: D } = r;
|
|
4290
4290
|
if (!E)
|
|
4291
4291
|
return null;
|
|
@@ -4330,13 +4330,13 @@ const ta = 38, na = 40, ia = 13, ra = 14, oa = 27, sa = 9, aa = 10, ca = 100, la
|
|
|
4330
4330
|
disabled: ee,
|
|
4331
4331
|
onBlur: a,
|
|
4332
4332
|
onChange: L,
|
|
4333
|
-
onKeyDown:
|
|
4333
|
+
onKeyDown: f,
|
|
4334
4334
|
ref: d,
|
|
4335
4335
|
value: t,
|
|
4336
4336
|
...p,
|
|
4337
4337
|
...V
|
|
4338
4338
|
}),
|
|
4339
|
-
|
|
4339
|
+
B()
|
|
4340
4340
|
] });
|
|
4341
4341
|
}, da = {
|
|
4342
4342
|
Component: /* @__PURE__ */ s("textarea", {}),
|
|
@@ -4503,7 +4503,7 @@ const Bl = ke.memo(
|
|
|
4503
4503
|
folderChain: l,
|
|
4504
4504
|
onFileAction: d,
|
|
4505
4505
|
...h
|
|
4506
|
-
},
|
|
4506
|
+
}, g) => {
|
|
4507
4507
|
const C = Le(
|
|
4508
4508
|
(Y) => null,
|
|
4509
4509
|
// file.thumbnailUrl ? `https://chonky.io${file.thumbnailUrl}` : null,
|
|
@@ -4522,9 +4522,9 @@ const Bl = ke.memo(
|
|
|
4522
4522
|
const L = (Y) => Y.replace(/([A-Z])/g, (ee) => "-" + ee.toLowerCase()), u = ae(() => e !== void 0 ? Object.keys(e).reduce((ee, a) => {
|
|
4523
4523
|
const c = e[a];
|
|
4524
4524
|
return a = a.startsWith("--") ? a : `--fp-theme-${L(a)}`, ee[a] = c, ee;
|
|
4525
|
-
}, {}) : {}, [e]), [
|
|
4526
|
-
return
|
|
4527
|
-
e && _(!0),
|
|
4525
|
+
}, {}) : {}, [e]), [f, _] = O(!1), [v, N] = O(), [G, $] = O(!1), [j, B] = O(), [Z, V] = O();
|
|
4526
|
+
return k(() => {
|
|
4527
|
+
e && _(!0), N(n), i ? $(!0) : B([ie.CreateFolder, ie.DeleteFiles]), o !== void 0 && V(pa[o]);
|
|
4528
4528
|
}, [e, n, i, o]), /* @__PURE__ */ s(
|
|
4529
4529
|
K,
|
|
4530
4530
|
{
|
|
@@ -4535,7 +4535,7 @@ const Bl = ke.memo(
|
|
|
4535
4535
|
children: /* @__PURE__ */ s(
|
|
4536
4536
|
ro,
|
|
4537
4537
|
{
|
|
4538
|
-
ref:
|
|
4538
|
+
ref: g,
|
|
4539
4539
|
files: r ?? [],
|
|
4540
4540
|
folderChain: l,
|
|
4541
4541
|
onFileAction: (Y) => {
|
|
@@ -4545,7 +4545,7 @@ const Bl = ke.memo(
|
|
|
4545
4545
|
defaultFileViewActionId: v,
|
|
4546
4546
|
disableDragAndDrop: G,
|
|
4547
4547
|
fileActions: j,
|
|
4548
|
-
darkMode:
|
|
4548
|
+
darkMode: f,
|
|
4549
4549
|
i18n: Z,
|
|
4550
4550
|
...h
|
|
4551
4551
|
}
|
|
@@ -4558,8 +4558,10 @@ const Bl = ke.memo(
|
|
|
4558
4558
|
const { styles: t } = e;
|
|
4559
4559
|
return /* @__PURE__ */ s(ao, { isMulti: !0, components: { Option: fa }, styles: t, isClearable: !0, hideSelectedOptions: !1, closeMenuOnSelect: !1, ...e });
|
|
4560
4560
|
}, Fl = (e) => {
|
|
4561
|
-
const { values: t, options: n, onChange: i, placeholder: o, styles: r } = e, l = lt(), d = Zt(l), [h,
|
|
4562
|
-
return
|
|
4561
|
+
const { values: t, options: n, onChange: i, placeholder: o, styles: r } = e, l = lt(), d = Zt(l), [h, g] = O(t);
|
|
4562
|
+
return k(() => {
|
|
4563
|
+
g(t ?? []);
|
|
4564
|
+
}, [t]), /* @__PURE__ */ s(Wt, { theme: d, children: /* @__PURE__ */ s(
|
|
4563
4565
|
Ii,
|
|
4564
4566
|
{
|
|
4565
4567
|
multiline: !0,
|
|
@@ -4568,7 +4570,7 @@ const Bl = ke.memo(
|
|
|
4568
4570
|
inputComponent: ya,
|
|
4569
4571
|
value: h,
|
|
4570
4572
|
onChange: (L) => {
|
|
4571
|
-
|
|
4573
|
+
g(L), i && i(L);
|
|
4572
4574
|
},
|
|
4573
4575
|
placeholder: o,
|
|
4574
4576
|
id: "react-select-single",
|
|
@@ -4589,7 +4591,7 @@ const Bl = ke.memo(
|
|
|
4589
4591
|
counterClockwise: d = !1,
|
|
4590
4592
|
circleRatio: h = 1
|
|
4591
4593
|
}) => {
|
|
4592
|
-
const
|
|
4594
|
+
const g = {
|
|
4593
4595
|
value: e,
|
|
4594
4596
|
strokeWidth: i,
|
|
4595
4597
|
background: r,
|
|
@@ -4600,10 +4602,10 @@ const Bl = ke.memo(
|
|
|
4600
4602
|
...o
|
|
4601
4603
|
})
|
|
4602
4604
|
};
|
|
4603
|
-
return n ? /* @__PURE__ */ s(uo, { ...
|
|
4605
|
+
return n ? /* @__PURE__ */ s(uo, { ...g, children: n }) : /* @__PURE__ */ s(
|
|
4604
4606
|
ho,
|
|
4605
4607
|
{
|
|
4606
|
-
...
|
|
4608
|
+
...g,
|
|
4607
4609
|
text: t
|
|
4608
4610
|
}
|
|
4609
4611
|
);
|
|
@@ -4617,9 +4619,9 @@ const Bl = ke.memo(
|
|
|
4617
4619
|
repeat: l,
|
|
4618
4620
|
children: d
|
|
4619
4621
|
}) => {
|
|
4620
|
-
const [h,
|
|
4621
|
-
return
|
|
4622
|
-
if (
|
|
4622
|
+
const [h, g] = O(0), [C, L] = O(t), u = ke.useRef(void 0), f = e === void 0 && n !== void 0;
|
|
4623
|
+
return k(() => {
|
|
4624
|
+
if (f)
|
|
4623
4625
|
return l ? u.current = window.setInterval(() => {
|
|
4624
4626
|
L((_) => _ === t ? n : t);
|
|
4625
4627
|
}, i ? i * 1e3 : 1e3) : L(n || t), () => {
|
|
@@ -4627,9 +4629,9 @@ const Bl = ke.memo(
|
|
|
4627
4629
|
};
|
|
4628
4630
|
if (e)
|
|
4629
4631
|
return u.current = window.setInterval(() => {
|
|
4630
|
-
|
|
4632
|
+
g((_) => (_ + 1) % e.length), L(e[h]);
|
|
4631
4633
|
}, o), () => clearInterval(u.current);
|
|
4632
|
-
}, [e, n, i, o, l, h]),
|
|
4634
|
+
}, [e, n, i, o, l, h]), f ? /* @__PURE__ */ s(
|
|
4633
4635
|
mo,
|
|
4634
4636
|
{
|
|
4635
4637
|
start: () => ({
|