@map-colonies/react-components 4.4.1 → 4.5.0
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/@map-colonies/react-components.es.js +1477 -1439
- package/dist/@map-colonies/react-components.umd.js +11 -11
- package/dist/cesium-map/map.d.ts +1 -0
- package/dist/cesium-map/tools/cesium-compass.tool.css +9 -0
- package/dist/cesium-map/tools/cesium-compass.tool.d.ts +11 -0
- package/dist/cesium-map/tools/scale-tracker.tool.css +2 -2
- package/dist/cesium-map/tools/zoom_level-tracker.tool.d.ts +3 -0
- package/package.json +3 -2
|
@@ -1,54 +1,56 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('body[dir=rtl] .drpOpener .mdc-text-field{direction:ltr}body[dir=rtl] .drpContainer .MuiInputLabel-formControl{right:0px;left:unset}body[dir=rtl] .drpContainer .MuiInputBase-input{direction:ltr;text-align:end}.map{height:100%;width:100%}.ol-mouse-position{top:auto!important;right:auto!important;bottom:8px;left:8px;background-color:#fff;opacity:.7;font-size:12px;padding:2px;border-radius:2px}.ol-zoom{top:2.5em;right:.5em;left:unset}.trackerPosition{background-color:var(--mdc-theme-surface);z-index:2000;padding:2px;border-radius:2px;font-size:12px;height:24px;text-align:center;line-height:20px;white-space:nowrap}.scalePosition{background-color:var(--mdc-theme-surface);padding:1px;border-radius:2px;font-size:12px;width:110px}.
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('body[dir=rtl] .drpOpener .mdc-text-field{direction:ltr}body[dir=rtl] .drpContainer .MuiInputLabel-formControl{right:0px;left:unset}body[dir=rtl] .drpContainer .MuiInputBase-input{direction:ltr;text-align:end}.map{height:100%;width:100%}.ol-mouse-position{top:auto!important;right:auto!important;bottom:8px;left:8px;background-color:#fff;opacity:.7;font-size:12px;padding:2px;border-radius:2px}.ol-zoom{top:2.5em;right:.5em;left:unset}.trackerPosition{background-color:var(--mdc-theme-surface);z-index:2000;padding:2px;border-radius:2px;font-size:12px;height:24px;text-align:center;line-height:20px;white-space:nowrap}.scalePosition{background-color:var(--mdc-theme-surface);padding:1px;border-radius:2px;font-size:12px;width:110px}.scale-tracker-label{text-align:center}.scale-tracker-bar{background:var(--mdc-theme-on-surface);margin:0 auto;display:block;transition:all .5s ease-in-out}.zoomLevel{z-index:2000;background-color:var(--mdc-theme-surface);border-radius:2px;padding:2px;height:24px}.zoomLevelValue{margin:2px;font-size:14px;line-height:10px;text-align:center}.zoomLevelLabel{font-size:8px;line-height:8px}.mapViewIcon{fill:#fff;width:40px;height:40px;background:#303336;border:1px solid #444;border-radius:4px}.mapViewIcon:hover{background:#48b;border-color:#aef}.mapViewCurrent{fill:#aef;border:1px solid #aef;border-radius:4px}.mapSelector{width:260px;list-style:none;padding-left:0;display:flex;flex-wrap:wrap;grid-gap:4px;min-height:140px;margin-block-start:0px;padding-inline-start:0px}.mapContainerSelected{border:blueviolet 2px solid!important;border-radius:2px}.mapContainer:hover{border:tomato 2px solid;border-radius:2px}.mapContainerImg{width:100%;height:100%}.mapLabel{font-size:12px}.mapLabel:before{content:"\\a0"}.mapScenesContainer{display:flex;gap:8px}.settingsIconContainer,.mapLegendToggleContainer{fill:#fff;width:40px;height:40px;background:#303336;border:1px solid #444;border-radius:4px}.settingsIconContainer:hover,.mapLegendToggleContainer:hover{background:#48b;border-color:#aef}.baseMapsContainer{margin-top:12px;min-height:58%}.settingsDialogPortal{transform:translateZ(0);height:calc(100vh - 220px);max-height:460px;width:280px;position:absolute;top:40px;right:80px}.settingsDialogPortal .mdc-dialog__container{align-items:unset}.settingsDialogPortal .mdc-dialog .mdc-dialog__surface{max-height:unset}body[dir=rtl] .settingsDialogPortal{left:80px;right:unset}.sectionLabel{margin-block-end:.5em}.mapLegendSidebarContainer{width:340px;height:100%;position:relative;overflow-y:auto;overflow-x:hidden;font-size:16px}.mapLegendSidebarContainer.mdc-drawer--animate{transform:translate(0)!important;transition:none!important}.mapLegendSidebarContainer.mdc-drawer--dismissible{position:relative}div.MuiPaper-root{transition:none!important}.mapLegendCloseBtn{position:absolute;top:0;right:0;cursor:pointer;width:50px;height:50px;padding:20px;font-size:24px}body[dir=rtl] .mapLegendCloseBtn{right:unset;left:0}.mapLegendToggleContainer{display:flex;align-items:center;justify-content:center}.mapLegendIcon{width:2rem;height:2rem;transform:translate(8%,8%)}.sidebarHeaderContainer{text-align:center;margin-top:40px}.sidebarTitle{font-size:1.5rem;font-weight:700}.mapLegend{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:10px 14px}.layerNameContainer{width:90%;display:flex;justify-content:center;align-items:center}.layerName{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.legendImg{width:90%;height:150px;border:1px solid black;border-radius:5px;object-fit:cover;cursor:pointer}.legendActionsContainer{display:flex;flex-direction:row;align-self:center}.legendAction:not(:last-child):after{content:"|";margin:0 4px}.mapLegendsList{display:flex;flex-direction:column;padding:20px 0;width:100%;height:90%}.legendAction{text-decoration:underline;cursor:pointer;font-size:1.1rem;transition:all .1s ease-in-out;width:max-content}.legendAction:hover{filter:brightness(1.2)}.noLegendsContainer{width:100%;height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center}.noLegendsMsg{text-align:center}.cesium-widget-credits{display:none!important}.cesium-viewer-fullscreenContainer{bottom:8px;right:8px;left:unset}body[dir=rtl] .cesium-viewer-fullscreenContainer{left:8px;right:unset}body[dir=rtl] .cesium-viewer-toolbar{left:5px;right:unset}.cesium-button.cesium-fullscreenButton{border-radius:14%}.toolsContainer{color:var(--mdc-theme-on-surface);display:flex;gap:8px;z-index:2000;position:absolute;bottom:12px;right:40px;opacity:.7}body[dir=rtl] .toolsContainer{left:40px;right:unset}.sideToolsContainer{display:flex;flex-direction:row;gap:8px;z-index:2000;position:absolute;top:12px;right:40px}body[dir=rtl] .sideToolsContainer{left:40px;right:unset}.viewer{display:flex;flex-direction:row}.viewer .mdc-linear-progress__bar-inner{border-top-width:10px}.compass.rtl{right:unset;left:20px}.compass.ltr{left:unset;right:20px}.twipsy{display:block;position:absolute;visibility:visible;max-width:200px;min-width:100px;padding:5px;font-size:11px;z-index:1000;opacity:.8;-khtml-opacity:.8;-moz-opacity:.8;filter:alpha(opacity=80)}.twipsy.left .twipsy-arrow{top:50%;right:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid #000000}.twipsy.right .twipsy-arrow{top:50%;left:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-right:5px solid #000000}.twipsy-inner{padding:3px 8px;background-color:#000;color:#fff;text-align:center;max-width:200px;text-decoration:none;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.twipsy-arrow{position:absolute;width:0;height:0}.toolbar{margin:0;padding:0;background:white}.toolbar>.button{margin:5px;padding:5px;border:1px solid #eee;cursor:pointer}.toolbar>.button:hover{background:#eee}.infoWindow{position:absolute;min-width:100px;max-width:300px}.infoWindow #frame{padding:10px;border:1px solid black;background:white}.infoWindow #close{float:right;margin:5px 2px;font-size:small;color:gray;cursor:pointer}.infoWindow #arrow{position:absolute;bottom:-8px;left:50%;margin-left:-10px;border-right:10px solid transparent;border-left:10px solid transparent;border-top:10px solid white}.react-autocomplete-input{background-clip:padding-box;background-color:#fff;bottom:auto;box-shadow:0 6px 12px #0000002d;display:block;font-size:14px;list-style:none;padding:1px;position:absolute;z-index:20000;margin-block-start:unset;margin-block-end:unset}.react-autocomplete-input>li{cursor:pointer;padding:10px;min-width:100px}.react-autocomplete-input>li.active{background-color:#337ab7;color:#fff}body[dir=rtl] .chonky-fileListWrapper [class^=listContainer-]{direction:rtl!important}body[dir=rtl] .chonky-fileEntryClickableWrapper [class^=listFileEntryProperty-],body[dir=rtl] .chonky-navbarContainer{direction:ltr!important}body[dir=rtl] .chonky-chonkyRoot{text-align:right}body[dir=rtl] .chonky-infoText{margin-left:unset;margin-right:12px}body[dir=rtl] .chonky-contextMenuList .MuiListItemText-root,body[dir=rtl] .chonky-dropdownList .MuiListItemText-root{text-align:right}body[dir=rtl] .chonky-icon{margin-right:unset;margin-left:8px}.chonky-chonkyRoot div[class^=folderBackSide]{box-shadow:unset}.chonky-chonkyRoot div[class^=folderBackSide]:after{border-color:var(--fp-theme-background, #fff) var(--fp-theme-background, #fff) transparent transparent}.chonky-chonkyRoot div[class^=listFileEntryIcon-]{color:#d5d5d5}.chonky-chonkyRoot div[class*=previewFile-d]{background-color:#d5d5d5}.chonky-chonkyRoot div[class^=selectionIndicator-]{background:var(--fp-theme-selection-background, #455570)}.chonky-chonkyRoot{background-color:var(--fp-theme-background, #fff)!important}.chonky-contextMenuList{background-color:var(--fp-theme-surface, #fff)!important}button[class*=chonky-activeButton],.chonky-selectionSizeText{color:var(--fp-theme-primary, #24aee9)!important}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
+
var cn = Object.defineProperty;
|
|
3
|
+
var dn = (e, n, t) => n in e ? cn(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
|
|
4
|
+
var X = (e, n, t) => (dn(e, typeof n != "symbol" ? n + "" : n, t), t);
|
|
5
5
|
import { jsx as l, jsxs as N, Fragment as te } from "react/jsx-runtime";
|
|
6
|
-
import * as
|
|
7
|
-
import
|
|
8
|
-
import { isValid as
|
|
9
|
-
import { he as
|
|
10
|
-
import { MuiPickersUtilsProvider as
|
|
11
|
-
import
|
|
12
|
-
import { createTheme as
|
|
13
|
-
import { Box as
|
|
14
|
-
import { useTheme as
|
|
15
|
-
import { default as
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import { Map as
|
|
6
|
+
import * as Rt from "react";
|
|
7
|
+
import Ee, { useState as I, useEffect as x, useMemo as ke, forwardRef as un, createContext as Oe, useRef as _e, useContext as Re, useCallback as me, useLayoutEffect as hn } from "react";
|
|
8
|
+
import { isValid as Se, isBefore as mn, format as yt, endOfDay as pn, isSameDay as vt } from "date-fns";
|
|
9
|
+
import { he as Nt, enUS as Bt } from "date-fns/locale";
|
|
10
|
+
import { MuiPickersUtilsProvider as Ft, KeyboardDateTimePicker as et, KeyboardDatePicker as gn } from "@material-ui/pickers";
|
|
11
|
+
import Ht from "@date-io/date-fns";
|
|
12
|
+
import { createTheme as fn, makeStyles as Ne, createStyles as Ue } from "@material-ui/core/styles";
|
|
13
|
+
import { Box as yn, ThemeProvider as Gt, Popover as vn, Paper as tt, TableRow as Ve, TableCell as De, TableSortLabel as En, IconButton as Cn, Collapse as wn, TableContainer as bn, Table as Tn, TableBody as _n, Typography as Ln, TablePagination as Sn } from "@material-ui/core";
|
|
14
|
+
import { useTheme as Vt, ThemeProvider as Mn, Button as Ae, TextField as ze, Tooltip as nt, Menu as Pn, MenuItem as qe, Icon as Ie, Dialog as Dn, DialogTitle as In, DialogContent as xn, Drawer as An, DrawerHeader as kn, DrawerTitle as On, DrawerContent as Rn, LinearProgress as Nn } from "@map-colonies/react-core";
|
|
15
|
+
import { default as Qs } from "@material-ui/core/useMediaQuery";
|
|
16
|
+
import Bn, { registerLocale as Fn } from "react-datepicker";
|
|
17
|
+
import Hn from "date-fns/locale/he";
|
|
18
|
+
import Me from "moment";
|
|
19
|
+
import Gn from "@turf/rewind";
|
|
20
|
+
import { Map as Vn, View as zn } from "ol";
|
|
21
21
|
import "ol/ol.css";
|
|
22
|
-
import { format as
|
|
23
|
-
import { defaults as
|
|
24
|
-
import
|
|
25
|
-
import { transform as
|
|
26
|
-
import { Tile as
|
|
27
|
-
import { Vector as
|
|
28
|
-
import { GeoJSON as
|
|
29
|
-
import { Draw as
|
|
30
|
-
import { createBox as
|
|
31
|
-
import
|
|
32
|
-
import { createSvgIcon as
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
import { createPortal as
|
|
36
|
-
import { Viewer as
|
|
22
|
+
import { format as Et } from "ol/coordinate";
|
|
23
|
+
import { defaults as $n, FullScreen as Ct } from "ol/control";
|
|
24
|
+
import Ye from "ol/control/MousePosition";
|
|
25
|
+
import { transform as Wn } from "ol/proj";
|
|
26
|
+
import { Tile as Un, Vector as Kn } from "ol/layer";
|
|
27
|
+
import { Vector as jn, OSM as qn } from "ol/source";
|
|
28
|
+
import { GeoJSON as zt } from "ol/format";
|
|
29
|
+
import { Draw as Yn } from "ol/interaction";
|
|
30
|
+
import { createBox as Xn } from "ol/interaction/Draw";
|
|
31
|
+
import Zn from "@material-ui/core/TableHead";
|
|
32
|
+
import { createSvgIcon as $t } from "@material-ui/core/utils";
|
|
33
|
+
import Jn from "@material-ui/core/CssBaseline";
|
|
34
|
+
import Qn from "@material-ui/core/ScopedCssBaseline";
|
|
35
|
+
import { createPortal as ei } from "react-dom";
|
|
36
|
+
import { Viewer as ti, Cesium3DTileset as ni, GeoJsonDataSource as ii, ImageryLayer as ri, Entity as oi, EntityDescription as Wt, PolygonGraphics as si, RectangleGraphics as ai, CustomDataSource as li, PolylineGraphics as ci } from "resium";
|
|
37
37
|
import * as p from "cesium";
|
|
38
|
-
import {
|
|
39
|
-
import { Math as
|
|
40
|
-
import { get as
|
|
41
|
-
import
|
|
38
|
+
import { Math as ge, SceneMode as Te, Cartesian2 as Ce, Cartographic as Be, PolylineDashMaterialProperty as di, ConstantProperty as ui, ConstantPositionProperty as hi, Cartesian3 as ve, BoundingSphere as mi, Ellipsoid as Ut, GeographicTilingScheme as pi, Rectangle as Pe, Resource as gi, EllipsoidTerrainProvider as fi, CesiumTerrainProvider as yi, VerticalOrigin as it, LabelStyle as Kt, ScreenSpaceEventType as vi, WebMercatorProjection as Ei, EventHelper as Ci, EllipsoidGeodesic as wi, UrlTemplateImageryProvider as ct, WebMapServiceImageryProvider as dt, WebMapTileServiceImageryProvider as ut, Event as bi, SingleTileImageryProvider as Ti, Viewer as _i, Matrix4 as Li, OpenStreetMapImageryProvider as Si, Color as rt, PolygonHierarchy as Mi, viewerCesiumInspectorMixin as Pi, sampleTerrainMostDetailed as Di } from "cesium";
|
|
39
|
+
import { Math as ta, sampleTerrainMostDetailed as na } from "cesium";
|
|
40
|
+
import { get as Z, isNumber as $e, isEmpty as ot, isArray as Ii, cloneDeep as xi, find as wt } from "lodash";
|
|
41
|
+
import Ai from "@turf/boolean-point-in-polygon";
|
|
42
42
|
import "@map-colonies/react-core/dist/linear-progress/styles";
|
|
43
|
-
import
|
|
44
|
-
import
|
|
45
|
-
import
|
|
46
|
-
import
|
|
47
|
-
import
|
|
48
|
-
import
|
|
49
|
-
import {
|
|
50
|
-
import
|
|
51
|
-
|
|
43
|
+
import ki from "@cmcleese/cesium-navigation";
|
|
44
|
+
import "@cmcleese/cesium-navigation/dist/index.css";
|
|
45
|
+
import * as jt from "@turf/helpers";
|
|
46
|
+
import qt from "@turf/bbox";
|
|
47
|
+
import Yt from "@turf/bbox-polygon";
|
|
48
|
+
import Oi from "textarea-caret";
|
|
49
|
+
import Ri, { setCaretPosition as Ni } from "get-input-selection";
|
|
50
|
+
import { ChonkyActions as G, FileHelper as Xt, setChonkyDefaults as Bi, FullFileBrowser as Fi } from "chonky";
|
|
51
|
+
import { ChonkyIconFA as Hi } from "chonky-icon-fontawesome";
|
|
52
|
+
import Gi from "filesize";
|
|
53
|
+
var ae = /* @__PURE__ */ ((e) => (e.BOX = "BOX", e.POLYGON = "POLYGON", e.UNKNOWN = "UNKNOWN", e))(ae || {}), ue = /* @__PURE__ */ ((e) => (e.HE = "he", e.EN = "en", e.RU = "ru", e))(ue || {}), st = /* @__PURE__ */ ((e) => (e.TOP_RIGHT = "TOP_RIGHT", e.BOTTOM_LEFT = "BOTTOM_LEFT", e))(st || {});
|
|
52
54
|
const J = {
|
|
53
55
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
54
56
|
DATE_PICKER: {
|
|
@@ -56,7 +58,7 @@ const J = {
|
|
|
56
58
|
local: {
|
|
57
59
|
setText: "set",
|
|
58
60
|
placeHolderText: "Enter the Date",
|
|
59
|
-
calendarLocale:
|
|
61
|
+
calendarLocale: ue.EN
|
|
60
62
|
},
|
|
61
63
|
disableFuture: !0,
|
|
62
64
|
showTime: !1,
|
|
@@ -70,19 +72,19 @@ const J = {
|
|
|
70
72
|
setText: "set",
|
|
71
73
|
startPlaceHolderText: "Start of time",
|
|
72
74
|
endPlaceHolderText: "End of time",
|
|
73
|
-
calendarLocale:
|
|
75
|
+
calendarLocale: ue.EN
|
|
74
76
|
},
|
|
75
77
|
renderAsButton: !0,
|
|
76
78
|
offset: 0,
|
|
77
79
|
disableFuture: !0
|
|
78
80
|
}
|
|
79
|
-
},
|
|
81
|
+
}, ce = (e) => {
|
|
80
82
|
const { children: n, ...t } = e;
|
|
81
|
-
return /* @__PURE__ */ l(
|
|
82
|
-
},
|
|
83
|
+
return /* @__PURE__ */ l(yn, { ...t, children: n });
|
|
84
|
+
}, Zt = (e) => {
|
|
83
85
|
const n = e.type === "dark";
|
|
84
|
-
return
|
|
85
|
-
},
|
|
86
|
+
return Ee.useMemo(() => Vi(e, n), [n, e]);
|
|
87
|
+
}, Vi = (e, n = !1) => fn({
|
|
86
88
|
palette: {
|
|
87
89
|
type: n ? "dark" : "light",
|
|
88
90
|
primary: {
|
|
@@ -104,141 +106,141 @@ const J = {
|
|
|
104
106
|
}
|
|
105
107
|
}
|
|
106
108
|
});
|
|
107
|
-
const
|
|
108
|
-
(e) =>
|
|
109
|
+
const zi = 2, $i = 0.5, Wi = Ne(
|
|
110
|
+
(e) => Ue({
|
|
109
111
|
container: {
|
|
110
|
-
padding: e.spacing(
|
|
112
|
+
padding: e.spacing(zi),
|
|
111
113
|
alignItems: "center"
|
|
112
114
|
},
|
|
113
115
|
setButton: {
|
|
114
116
|
marginTop: e.spacing(1)
|
|
115
117
|
},
|
|
116
118
|
margin: {
|
|
117
|
-
marginLeft: e.spacing(
|
|
119
|
+
marginLeft: e.spacing($i)
|
|
118
120
|
}
|
|
119
121
|
})
|
|
120
|
-
),
|
|
121
|
-
var
|
|
122
|
-
const n =
|
|
123
|
-
|
|
122
|
+
), Ui = (e) => {
|
|
123
|
+
var j, A, $, k;
|
|
124
|
+
const n = Wi(), t = Vt(), i = Zt(t), [o, r] = I(null), [c, u] = I(null), [m, v] = I(J.DATE_RANGE_PICKER.dateFormat), E = e.controlsLayout ?? J.DATE_RANGE_PICKER.controlsLayout, _ = e.disableFuture ?? J.DATE_RANGE_PICKER.disableFuture, w = ((j = e.local) == null ? void 0 : j.startPlaceHolderText) ?? J.DATE_RANGE_PICKER.local.startPlaceHolderText, P = ((A = e.local) == null ? void 0 : A.endPlaceHolderText) ?? J.DATE_RANGE_PICKER.local.endPlaceHolderText, R = (($ = e.local) == null ? void 0 : $.setText) ?? J.DATE_RANGE_PICKER.local.setText, q = (((k = e.local) == null ? void 0 : k.calendarLocale) ?? J.DATE_RANGE_PICKER.local.calendarLocale) === ue.HE ? Nt : Bt;
|
|
125
|
+
x(() => {
|
|
124
126
|
r(e.from ?? null);
|
|
125
|
-
}, [e.from]),
|
|
127
|
+
}, [e.from]), x(() => {
|
|
126
128
|
u(e.to ?? null);
|
|
127
|
-
}, [e.to]),
|
|
128
|
-
|
|
129
|
+
}, [e.to]), x(() => {
|
|
130
|
+
v(e.dateFormat ?? J.DATE_RANGE_PICKER.dateFormat);
|
|
129
131
|
}, [e.dateFormat]);
|
|
130
132
|
const H = Boolean(
|
|
131
|
-
|
|
132
|
-
),
|
|
133
|
+
Se(o) && !c || Se(c) && !o || o && c && Se(o) && Se(c) && mn(o, c)
|
|
134
|
+
), K = () => {
|
|
133
135
|
e.onChange({
|
|
134
|
-
from: o &&
|
|
135
|
-
to:
|
|
136
|
+
from: o && Se(o) ? o : void 0,
|
|
137
|
+
to: c && Se(c) ? c : void 0
|
|
136
138
|
});
|
|
137
139
|
};
|
|
138
|
-
return /* @__PURE__ */ l(
|
|
139
|
-
|
|
140
|
+
return /* @__PURE__ */ l(Gt, { theme: i, children: /* @__PURE__ */ l(
|
|
141
|
+
ce,
|
|
140
142
|
{
|
|
141
143
|
className: `${n.container} drpContainer`,
|
|
142
144
|
display: "flex",
|
|
143
|
-
flexDirection:
|
|
144
|
-
width:
|
|
145
|
-
children: /* @__PURE__ */ N(
|
|
145
|
+
flexDirection: E,
|
|
146
|
+
width: E === "column" ? e.contentWidth : "unset",
|
|
147
|
+
children: /* @__PURE__ */ N(Ft, { utils: Ht, locale: q, children: [
|
|
146
148
|
/* @__PURE__ */ l(
|
|
147
|
-
|
|
149
|
+
et,
|
|
148
150
|
{
|
|
149
151
|
variant: "inline",
|
|
150
|
-
placeholder:
|
|
151
|
-
onChange: (
|
|
152
|
+
placeholder: w,
|
|
153
|
+
onChange: (W) => r(W),
|
|
152
154
|
value: o,
|
|
153
|
-
disableFuture:
|
|
154
|
-
format:
|
|
155
|
+
disableFuture: _,
|
|
156
|
+
format: m,
|
|
155
157
|
maxDate: e.maxDate,
|
|
156
158
|
minDate: e.minDate
|
|
157
159
|
}
|
|
158
160
|
),
|
|
159
161
|
/* @__PURE__ */ l(
|
|
160
|
-
|
|
162
|
+
et,
|
|
161
163
|
{
|
|
162
164
|
variant: "inline",
|
|
163
165
|
placeholder: P,
|
|
164
166
|
className: n.margin,
|
|
165
|
-
onChange: (
|
|
166
|
-
value:
|
|
167
|
-
disableFuture:
|
|
168
|
-
format:
|
|
167
|
+
onChange: (W) => u(W),
|
|
168
|
+
value: c,
|
|
169
|
+
disableFuture: _,
|
|
170
|
+
format: m,
|
|
169
171
|
maxDate: e.maxDate,
|
|
170
172
|
minDate: e.minDate
|
|
171
173
|
}
|
|
172
174
|
),
|
|
173
|
-
/* @__PURE__ */ l(
|
|
175
|
+
/* @__PURE__ */ l(Mn, { options: t, children: /* @__PURE__ */ l(
|
|
174
176
|
Ae,
|
|
175
177
|
{
|
|
176
178
|
className: `${n.setButton} ${n.margin}`,
|
|
177
179
|
raised: !0,
|
|
178
|
-
onClick:
|
|
180
|
+
onClick: K,
|
|
179
181
|
disabled: !H,
|
|
180
|
-
children:
|
|
182
|
+
children: R
|
|
181
183
|
}
|
|
182
184
|
) })
|
|
183
185
|
] })
|
|
184
186
|
}
|
|
185
187
|
) });
|
|
186
|
-
},
|
|
188
|
+
}, Ki = (e) => {
|
|
187
189
|
const { children: n, ...t } = e;
|
|
188
|
-
return /* @__PURE__ */ l(
|
|
190
|
+
return /* @__PURE__ */ l(vn, { ...t, children: n });
|
|
189
191
|
};
|
|
190
|
-
const
|
|
191
|
-
var
|
|
192
|
-
const [n, t] =
|
|
193
|
-
|
|
194
|
-
},
|
|
195
|
-
|
|
196
|
-
},
|
|
197
|
-
|
|
198
|
-
},
|
|
199
|
-
|
|
192
|
+
const hs = (e) => {
|
|
193
|
+
var A, $;
|
|
194
|
+
const [n, t] = I(null), [i, o] = I(null), [r, c] = I(J.DATE_RANGE_PICKER.dateFormat), [u, m] = Ee.useState(null), v = (k) => {
|
|
195
|
+
m(k.currentTarget);
|
|
196
|
+
}, E = (k) => {
|
|
197
|
+
k.currentTarget.tagName === "I" ? m(k.currentTarget.previousElementSibling) : m(k.currentTarget);
|
|
198
|
+
}, _ = () => {
|
|
199
|
+
m(null);
|
|
200
|
+
}, w = Boolean(u), P = e.controlsLayout ?? "column";
|
|
201
|
+
x(() => {
|
|
200
202
|
t(e.from ?? null);
|
|
201
|
-
}, [e.from]),
|
|
203
|
+
}, [e.from]), x(() => {
|
|
202
204
|
o(e.to ?? null);
|
|
203
|
-
}, [e.to]),
|
|
204
|
-
|
|
205
|
+
}, [e.to]), x(() => {
|
|
206
|
+
c(e.dateFormat ?? J.DATE_RANGE_PICKER.dateFormat);
|
|
205
207
|
}, [e.dateFormat]);
|
|
206
|
-
const
|
|
208
|
+
const R = ((A = e.local) == null ? void 0 : A.startPlaceHolderText) ?? J.DATE_RANGE_PICKER.local.startPlaceHolderText, V = (($ = e.local) == null ? void 0 : $.endPlaceHolderText) ?? J.DATE_RANGE_PICKER.local.endPlaceHolderText, q = e.renderAsButton === void 0 ? J.DATE_RANGE_PICKER.renderAsButton : e.renderAsButton, H = e.offset === void 0 ? J.DATE_RANGE_PICKER.offset : e.offset, K = e.disableFuture === void 0 ? J.DATE_RANGE_PICKER.disableFuture : e.disableFuture, j = ke(() => `${n ? yt(n, r) : R} - ${i ? yt(i, r) : V}`, [n, i, r, R, V]);
|
|
207
209
|
return /* @__PURE__ */ N(te, { children: [
|
|
208
|
-
q ? /* @__PURE__ */ l(Ae, { style: { width: e.width }, raised: !0, onClick:
|
|
209
|
-
|
|
210
|
+
q ? /* @__PURE__ */ l(Ae, { style: { width: e.width }, raised: !0, onClick: v, className: "drpOpener", children: j }) : /* @__PURE__ */ l(
|
|
211
|
+
ze,
|
|
210
212
|
{
|
|
211
213
|
className: "drpOpener",
|
|
212
214
|
readOnly: !0,
|
|
213
215
|
style: { width: e.width },
|
|
214
|
-
value:
|
|
215
|
-
onClick:
|
|
216
|
+
value: j,
|
|
217
|
+
onClick: E,
|
|
216
218
|
trailingIcon: {
|
|
217
219
|
icon: "date_range",
|
|
218
220
|
tabIndex: 0,
|
|
219
|
-
onClick:
|
|
221
|
+
onClick: E
|
|
220
222
|
}
|
|
221
223
|
}
|
|
222
224
|
),
|
|
223
|
-
/* @__PURE__ */ l(
|
|
224
|
-
|
|
225
|
+
/* @__PURE__ */ l(Ki, { open: w, anchorEl: u, onClose: _, anchorOrigin: { vertical: "bottom", horizontal: "left" }, keepMounted: !0, children: /* @__PURE__ */ l(
|
|
226
|
+
Ui,
|
|
225
227
|
{
|
|
226
228
|
controlsLayout: P,
|
|
227
229
|
contentWidth: ((u == null ? void 0 : u.clientWidth) ?? 0) - H,
|
|
228
230
|
dateFormat: r,
|
|
229
|
-
disableFuture:
|
|
231
|
+
disableFuture: K,
|
|
230
232
|
minDate: e.minDate,
|
|
231
233
|
maxDate: e.maxDate,
|
|
232
234
|
local: e.local,
|
|
233
235
|
from: n ?? void 0,
|
|
234
236
|
to: i ?? void 0,
|
|
235
|
-
onChange: ({ from:
|
|
236
|
-
t(
|
|
237
|
+
onChange: ({ from: k, to: W }) => {
|
|
238
|
+
t(k ?? null), o(W ?? null), e.onChange({ from: k, to: W }), _();
|
|
237
239
|
}
|
|
238
240
|
}
|
|
239
241
|
) })
|
|
240
242
|
] });
|
|
241
|
-
},
|
|
243
|
+
}, Xe = (e) => typeof e < "u" && e !== null && "startDate" in e && "endDate" in e, ms = ({
|
|
242
244
|
endDate: e,
|
|
243
245
|
startDate: n,
|
|
244
246
|
setEndDate: t = () => {
|
|
@@ -247,51 +249,51 @@ const os = (e) => {
|
|
|
247
249
|
},
|
|
248
250
|
endTimeInputClassName: o = "",
|
|
249
251
|
endTimeLabel: r = "",
|
|
250
|
-
endTimeWrapperClassName:
|
|
252
|
+
endTimeWrapperClassName: c = "",
|
|
251
253
|
timeRangeInputsWrapperClassName: u = "",
|
|
252
|
-
startTimeInputClassName:
|
|
253
|
-
startTimeLabel:
|
|
254
|
-
startTimeWrapperClassName:
|
|
254
|
+
startTimeInputClassName: m = "",
|
|
255
|
+
startTimeLabel: v = "",
|
|
256
|
+
startTimeWrapperClassName: E = ""
|
|
255
257
|
}) => /* @__PURE__ */ N("div", { className: `timeRangeWrapper ${u}`, children: [
|
|
256
|
-
/* @__PURE__ */ l("div", { className: `startTimeWrapper ${
|
|
257
|
-
|
|
258
|
+
/* @__PURE__ */ l("div", { className: `startTimeWrapper ${E}`, children: /* @__PURE__ */ l(
|
|
259
|
+
ze,
|
|
258
260
|
{
|
|
259
|
-
label:
|
|
261
|
+
label: v,
|
|
260
262
|
disabled: n === null,
|
|
261
|
-
className: `timeRangeInput ${
|
|
263
|
+
className: `timeRangeInput ${m}`,
|
|
262
264
|
name: "start-time",
|
|
263
265
|
type: "time",
|
|
264
|
-
value:
|
|
265
|
-
onChange: (
|
|
266
|
-
const
|
|
266
|
+
value: Me(n).format("HH:mm"),
|
|
267
|
+
onChange: (_) => {
|
|
268
|
+
const w = Me(n), P = Me(_.currentTarget.value, "HH:mm"), R = w.set({
|
|
267
269
|
hours: P.get("hours"),
|
|
268
270
|
minutes: P.get("minutes")
|
|
269
271
|
});
|
|
270
|
-
i(
|
|
272
|
+
i(R.toDate());
|
|
271
273
|
}
|
|
272
274
|
}
|
|
273
275
|
) }),
|
|
274
|
-
/* @__PURE__ */ l("div", { className: `endTimeWrapper ${
|
|
275
|
-
|
|
276
|
+
/* @__PURE__ */ l("div", { className: `endTimeWrapper ${c}`, children: /* @__PURE__ */ l(
|
|
277
|
+
ze,
|
|
276
278
|
{
|
|
277
279
|
label: r,
|
|
278
280
|
disabled: e === null,
|
|
279
281
|
className: `timeRangeInput ${o}`,
|
|
280
282
|
name: "end-time",
|
|
281
283
|
type: "time",
|
|
282
|
-
value:
|
|
283
|
-
onChange: (
|
|
284
|
-
const
|
|
284
|
+
value: Me(e).format("HH:mm"),
|
|
285
|
+
onChange: (_) => {
|
|
286
|
+
const w = Me(e), P = Me(_.currentTarget.value, "HH:mm"), R = w.set({
|
|
285
287
|
hours: P.get("hours"),
|
|
286
288
|
minutes: P.get("minutes")
|
|
287
289
|
});
|
|
288
|
-
t(
|
|
290
|
+
t(R.toDate());
|
|
289
291
|
}
|
|
290
292
|
}
|
|
291
293
|
) })
|
|
292
|
-
] }),
|
|
294
|
+
] }), ji = un(
|
|
293
295
|
({ value: e, onClick: n, onInputClick: t, ...i }, o) => /* @__PURE__ */ l(
|
|
294
|
-
|
|
296
|
+
ze,
|
|
295
297
|
{
|
|
296
298
|
...i,
|
|
297
299
|
className: "dateRangeCustomInput",
|
|
@@ -303,37 +305,37 @@ const os = (e) => {
|
|
|
303
305
|
value: e
|
|
304
306
|
}
|
|
305
307
|
)
|
|
306
|
-
),
|
|
308
|
+
), qi = ({ setStartDate: e = () => {
|
|
307
309
|
}, setEndDate: n = () => {
|
|
308
310
|
}, shortcuts: t, dateRange: i, onShortcut: o }) => {
|
|
309
|
-
const [r,
|
|
310
|
-
() => t.map((
|
|
311
|
+
const [r, c] = I(), u = ke(
|
|
312
|
+
() => t.map((m) => m instanceof Function ? m() : m),
|
|
311
313
|
[t]
|
|
312
314
|
);
|
|
313
|
-
return
|
|
314
|
-
for (const
|
|
315
|
-
const
|
|
316
|
-
r ?
|
|
315
|
+
return x(() => {
|
|
316
|
+
for (const m of u) {
|
|
317
|
+
const v = i.startDate && i.endDate && vt(m.startDate, i.startDate) && vt(m.endDate, i.endDate);
|
|
318
|
+
r ? m.id === r && (v || c(void 0)) : v && c(m.id);
|
|
317
319
|
}
|
|
318
|
-
}, [i, r, u]), /* @__PURE__ */ l("div", { className: "shortcutsContainer", children: u.map((
|
|
319
|
-
const
|
|
320
|
-
e(
|
|
320
|
+
}, [i, r, u]), /* @__PURE__ */ l("div", { className: "shortcutsContainer", children: u.map((m, v) => {
|
|
321
|
+
const E = () => {
|
|
322
|
+
e(m.startDate), n(m.endDate);
|
|
321
323
|
};
|
|
322
324
|
return /* @__PURE__ */ l(
|
|
323
325
|
Ae,
|
|
324
326
|
{
|
|
325
327
|
type: "button",
|
|
326
|
-
className: `shortcut ${r ===
|
|
327
|
-
onClick: (
|
|
328
|
-
|
|
328
|
+
className: `shortcut ${r === m.id ? "selected" : ""}`,
|
|
329
|
+
onClick: (_) => {
|
|
330
|
+
E(), o == null || o({ startDate: m.startDate, endDate: m.endDate });
|
|
329
331
|
},
|
|
330
332
|
outlined: !0,
|
|
331
|
-
children:
|
|
333
|
+
children: m.label
|
|
332
334
|
},
|
|
333
|
-
|
|
335
|
+
m.id + v
|
|
334
336
|
);
|
|
335
337
|
}) });
|
|
336
|
-
},
|
|
338
|
+
}, ps = Ee.forwardRef((e, n) => {
|
|
337
339
|
const {
|
|
338
340
|
// Time range input props
|
|
339
341
|
// endTimeInputClassName,
|
|
@@ -348,152 +350,152 @@ const os = (e) => {
|
|
|
348
350
|
dayClassName: i,
|
|
349
351
|
monthClassName: o,
|
|
350
352
|
selectsRange: r,
|
|
351
|
-
onChange:
|
|
353
|
+
onChange: c,
|
|
352
354
|
inputName: u,
|
|
353
|
-
showMonthYearDropdown:
|
|
355
|
+
showMonthYearDropdown: m,
|
|
354
356
|
// withTimeRange,
|
|
355
|
-
withShortcuts:
|
|
356
|
-
locale:
|
|
357
|
-
} = e, [
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
}, [
|
|
361
|
-
var
|
|
362
|
-
((
|
|
363
|
-
}, [e.startDate, e.endDate,
|
|
364
|
-
const
|
|
365
|
-
let
|
|
366
|
-
return
|
|
367
|
-
}, [
|
|
357
|
+
withShortcuts: v,
|
|
358
|
+
locale: E = "en"
|
|
359
|
+
} = e, [_, w] = I(null), [P, R] = I(null), [V, q] = I(!1), H = r ? { startDate: _, endDate: P } : _;
|
|
360
|
+
x(() => {
|
|
361
|
+
E === "he" && Fn("he", Hn);
|
|
362
|
+
}, [E]), x(() => {
|
|
363
|
+
var A, $;
|
|
364
|
+
((A = e.startDate) == null ? void 0 : A.toString()) !== (_ == null ? void 0 : _.toString()) && w(e.startDate), (($ = e.endDate) == null ? void 0 : $.toString()) !== (P == null ? void 0 : P.toString()) && R(e.endDate);
|
|
365
|
+
}, [e.startDate, e.endDate, _, P]);
|
|
366
|
+
const K = ke(() => {
|
|
367
|
+
let A = "pickerContainer" + (E === "he" ? " pickerContainer-rtl" : "");
|
|
368
|
+
return v && r && (A += " pickerContainer-withShortcuts"), A;
|
|
369
|
+
}, [E, v, r]), j = m ? {
|
|
368
370
|
showMonthDropdown: !0,
|
|
369
371
|
showYearDropdown: !0,
|
|
370
372
|
dropdownMode: "select"
|
|
371
373
|
} : {};
|
|
372
|
-
return /* @__PURE__ */ l("div", { className:
|
|
373
|
-
|
|
374
|
+
return /* @__PURE__ */ l("div", { className: K, style: { direction: E === "he" ? "rtl" : "ltr" }, children: /* @__PURE__ */ l(
|
|
375
|
+
Bn,
|
|
374
376
|
{
|
|
375
377
|
...e,
|
|
376
378
|
ref: n,
|
|
377
379
|
onClickOutside: () => q(!1),
|
|
378
|
-
open:
|
|
379
|
-
startDate:
|
|
380
|
-
selected:
|
|
381
|
-
endDate:
|
|
380
|
+
open: V,
|
|
381
|
+
startDate: Xe(H) ? _ : void 0,
|
|
382
|
+
selected: _,
|
|
383
|
+
endDate: Xe(H) ? P : void 0,
|
|
382
384
|
monthsShown: e.monthsShown ?? 2,
|
|
383
385
|
calendarClassName: `pickerCalendar ${t}`,
|
|
384
|
-
weekDayClassName: (
|
|
385
|
-
dayClassName: (
|
|
386
|
-
monthClassName: (
|
|
387
|
-
onChange: (
|
|
388
|
-
if (Array.isArray(
|
|
389
|
-
const [
|
|
390
|
-
|
|
386
|
+
weekDayClassName: (A) => `pickerWeek ${(i == null ? void 0 : i(A)) ?? ""}`,
|
|
387
|
+
dayClassName: (A) => `pickerDay ${(i == null ? void 0 : i(A)) ?? ""}`,
|
|
388
|
+
monthClassName: (A) => `pickerMonth ${(o == null ? void 0 : o(A)) ?? ""}`,
|
|
389
|
+
onChange: (A, $) => {
|
|
390
|
+
if (Array.isArray(A)) {
|
|
391
|
+
const [k, W] = A;
|
|
392
|
+
w(k), R(W), c == null || c({ startDate: k, endDate: W && pn(W) }, $);
|
|
391
393
|
} else
|
|
392
|
-
|
|
394
|
+
w(A), c == null || c(A, $);
|
|
393
395
|
},
|
|
394
|
-
customInput: /* @__PURE__ */ l(
|
|
396
|
+
customInput: /* @__PURE__ */ l(ji, { name: u, onInputClick: () => {
|
|
395
397
|
q(!0);
|
|
396
398
|
} }),
|
|
397
|
-
showTimeInput: !!(
|
|
399
|
+
showTimeInput: !!(v && r),
|
|
398
400
|
timeInputLabel: "",
|
|
399
|
-
customTimeInput:
|
|
400
|
-
|
|
401
|
-
}, shortcuts:
|
|
401
|
+
customTimeInput: v && Xe(H) && /* @__PURE__ */ l(qi, { onShortcut: (A) => {
|
|
402
|
+
c == null || c(A), q(!1);
|
|
403
|
+
}, shortcuts: v, setEndDate: R, setStartDate: w, dateRange: H }),
|
|
402
404
|
showMonthYearDropdown: void 0,
|
|
403
|
-
...
|
|
405
|
+
...j
|
|
404
406
|
}
|
|
405
407
|
) });
|
|
406
408
|
});
|
|
407
|
-
const
|
|
408
|
-
const n =
|
|
409
|
+
const gs = (e) => {
|
|
410
|
+
const n = Vt(), t = Zt(n), [i, o] = I(e.value), {
|
|
409
411
|
format: r = J.DATE_PICKER.dateFormat,
|
|
410
|
-
variant:
|
|
412
|
+
variant: c = J.DATE_PICKER.variant,
|
|
411
413
|
disableFuture: u = J.DATE_PICKER.disableFuture,
|
|
412
|
-
local:
|
|
413
|
-
onChange:
|
|
414
|
-
showTime:
|
|
415
|
-
value:
|
|
416
|
-
...
|
|
417
|
-
} = e, { placeHolderText: P = J.DATE_PICKER.local.placeHolderText, calendarLocale:
|
|
414
|
+
local: m,
|
|
415
|
+
onChange: v,
|
|
416
|
+
showTime: E = J.DATE_PICKER.showTime,
|
|
417
|
+
value: _,
|
|
418
|
+
...w
|
|
419
|
+
} = e, { placeHolderText: P = J.DATE_PICKER.local.placeHolderText, calendarLocale: R } = m ?? {
|
|
418
420
|
placeHolderText: J.DATE_PICKER.local.placeHolderText,
|
|
419
|
-
calendarLocale:
|
|
420
|
-
},
|
|
421
|
-
o(H),
|
|
421
|
+
calendarLocale: ue.EN
|
|
422
|
+
}, V = R === ue.HE ? Nt : Bt, q = (H) => {
|
|
423
|
+
o(H), v(H);
|
|
422
424
|
};
|
|
423
|
-
return /* @__PURE__ */ l(
|
|
424
|
-
|
|
425
|
-
|
|
425
|
+
return /* @__PURE__ */ l(Gt, { theme: t, children: /* @__PURE__ */ N(Ft, { utils: Ht, locale: V, children: [
|
|
426
|
+
E && /* @__PURE__ */ l(
|
|
427
|
+
et,
|
|
426
428
|
{
|
|
427
|
-
variant:
|
|
429
|
+
variant: c,
|
|
428
430
|
placeholder: P,
|
|
429
431
|
onChange: q,
|
|
430
432
|
value: i,
|
|
431
433
|
disableFuture: u,
|
|
432
434
|
format: r,
|
|
433
|
-
...
|
|
435
|
+
...w
|
|
434
436
|
}
|
|
435
437
|
),
|
|
436
|
-
!
|
|
437
|
-
|
|
438
|
+
!E && /* @__PURE__ */ l(
|
|
439
|
+
gn,
|
|
438
440
|
{
|
|
439
|
-
variant:
|
|
441
|
+
variant: c,
|
|
440
442
|
placeholder: P,
|
|
441
443
|
onChange: q,
|
|
442
444
|
value: i,
|
|
443
445
|
disableFuture: u,
|
|
444
446
|
format: r,
|
|
445
|
-
...
|
|
447
|
+
...w
|
|
446
448
|
}
|
|
447
449
|
)
|
|
448
450
|
] }) });
|
|
449
|
-
},
|
|
450
|
-
(e) =>
|
|
451
|
+
}, Yi = 18, Xi = Ne(
|
|
452
|
+
(e) => Ue({
|
|
451
453
|
drawingButton: {
|
|
452
|
-
width: e.spacing(
|
|
454
|
+
width: e.spacing(Yi)
|
|
453
455
|
},
|
|
454
456
|
fullWidth: {
|
|
455
457
|
width: "100%",
|
|
456
458
|
marginTop: "36px"
|
|
457
459
|
}
|
|
458
460
|
})
|
|
459
|
-
),
|
|
460
|
-
const n =
|
|
461
|
-
i(
|
|
462
|
-
},
|
|
461
|
+
), Zi = (e) => {
|
|
462
|
+
const n = Xi(), [t, i] = Ee.useState(null), { isSelectionEnabled: o, onCancelDraw: r, onStartDraw: c, onReset: u } = e, m = (E) => {
|
|
463
|
+
i(E.currentTarget);
|
|
464
|
+
}, v = () => {
|
|
463
465
|
i(null);
|
|
464
466
|
};
|
|
465
|
-
return o ? /* @__PURE__ */ l(
|
|
466
|
-
/* @__PURE__ */ l(
|
|
467
|
+
return o ? /* @__PURE__ */ l(nt, { content: "Cancel the ongoing draw", align: "bottomLeft", children: /* @__PURE__ */ l(Ae, { className: n.drawingButton, raised: !0, onClick: r, children: "Cancel Draw" }) }) : /* @__PURE__ */ N(ce, { position: "relative", children: [
|
|
468
|
+
/* @__PURE__ */ l(nt, { content: "draw an Area of interest to limit the search", align: "bottomLeft", children: /* @__PURE__ */ l(Ae, { className: n.drawingButton, raised: !0, onClick: m, children: "Draw AOI" }) }),
|
|
467
469
|
/* @__PURE__ */ N(
|
|
468
|
-
|
|
470
|
+
Pn,
|
|
469
471
|
{
|
|
470
472
|
className: n.fullWidth,
|
|
471
473
|
open: Boolean(t),
|
|
472
|
-
onClose:
|
|
474
|
+
onClose: v,
|
|
473
475
|
children: [
|
|
474
476
|
/* @__PURE__ */ l(
|
|
475
|
-
|
|
477
|
+
qe,
|
|
476
478
|
{
|
|
477
479
|
onClick: () => {
|
|
478
|
-
|
|
480
|
+
c(ae.POLYGON), v();
|
|
479
481
|
},
|
|
480
482
|
children: "Polygon"
|
|
481
483
|
}
|
|
482
484
|
),
|
|
483
485
|
/* @__PURE__ */ l(
|
|
484
|
-
|
|
486
|
+
qe,
|
|
485
487
|
{
|
|
486
488
|
onClick: () => {
|
|
487
|
-
|
|
489
|
+
c(ae.BOX), v();
|
|
488
490
|
},
|
|
489
491
|
children: "Box"
|
|
490
492
|
}
|
|
491
493
|
),
|
|
492
494
|
/* @__PURE__ */ l(
|
|
493
|
-
|
|
495
|
+
qe,
|
|
494
496
|
{
|
|
495
497
|
onClick: () => {
|
|
496
|
-
u(),
|
|
498
|
+
u(), v();
|
|
497
499
|
},
|
|
498
500
|
children: "Clear"
|
|
499
501
|
}
|
|
@@ -503,138 +505,138 @@ const ls = (e) => {
|
|
|
503
505
|
)
|
|
504
506
|
] });
|
|
505
507
|
};
|
|
506
|
-
var
|
|
507
|
-
const
|
|
508
|
+
var pe = /* @__PURE__ */ ((e) => (e.WGS84 = "EPSG:4326", e.WEB_MERCATOR = "EPSG:3857", e))(pe || {});
|
|
509
|
+
const at = 5, lt = 2, Jt = Oe(null), Ji = Jt.Provider, bt = 35, Tt = 32, Qi = 10, er = (e) => e !== void 0 && e !== pe.WGS84 ? Wn([bt, Tt], pe.WGS84, e) : [bt, Tt], tr = (e) => {
|
|
508
510
|
switch (e) {
|
|
509
|
-
case
|
|
510
|
-
return (n) =>
|
|
511
|
-
case
|
|
512
|
-
return (n) =>
|
|
511
|
+
case pe.WEB_MERCATOR:
|
|
512
|
+
return (n) => Et(n, "Mercator: {y}m, {x}m", lt);
|
|
513
|
+
case pe.WGS84:
|
|
514
|
+
return (n) => Et(n, "WGS84: {y}°N {x}°E", at);
|
|
513
515
|
default:
|
|
514
516
|
return (n) => "";
|
|
515
517
|
}
|
|
516
|
-
},
|
|
517
|
-
const e =
|
|
518
|
+
}, ht = () => {
|
|
519
|
+
const e = Re(Jt);
|
|
518
520
|
if (e === null)
|
|
519
521
|
throw new Error("map context is null, please check the provider");
|
|
520
522
|
return e;
|
|
521
|
-
},
|
|
522
|
-
const n =
|
|
523
|
-
new
|
|
524
|
-
view: new
|
|
525
|
-
projection: o ??
|
|
523
|
+
}, nr = (e) => {
|
|
524
|
+
const n = _e(null), { allowFullScreen: t, showMousePosition: i, projection: o } = e, [r] = I(
|
|
525
|
+
new Vn({
|
|
526
|
+
view: new zn({
|
|
527
|
+
projection: o ?? pe.WGS84
|
|
526
528
|
}),
|
|
527
|
-
controls:
|
|
529
|
+
controls: $n()
|
|
528
530
|
})
|
|
529
531
|
);
|
|
530
|
-
|
|
531
|
-
r.getView().setCenter(e.center ??
|
|
532
|
-
}, [r, e.center, e.projection]),
|
|
533
|
-
r.getView().setZoom(e.zoom ??
|
|
532
|
+
x(() => {
|
|
533
|
+
r.getView().setCenter(e.center ?? er(e.projection));
|
|
534
|
+
}, [r, e.center, e.projection]), x(() => {
|
|
535
|
+
r.getView().setZoom(e.zoom ?? Qi);
|
|
534
536
|
}, [r, e.zoom, e.projection]);
|
|
535
|
-
const
|
|
536
|
-
|
|
537
|
-
|
|
537
|
+
const c = (u, m) => {
|
|
538
|
+
m.getControls().forEach((E) => {
|
|
539
|
+
E instanceof u && m.removeControl(E);
|
|
538
540
|
});
|
|
539
541
|
};
|
|
540
|
-
return
|
|
541
|
-
r.setTarget(n.current), t !== void 0 && t ? r.addControl(new
|
|
542
|
-
}, [r, t]),
|
|
543
|
-
i !== void 0 && i ? (
|
|
544
|
-
new
|
|
545
|
-
coordinateFormat:
|
|
546
|
-
projection: o ??
|
|
542
|
+
return x(() => {
|
|
543
|
+
r.setTarget(n.current), t !== void 0 && t ? r.addControl(new Ct()) : c(Ct, r);
|
|
544
|
+
}, [r, t]), x(() => {
|
|
545
|
+
i !== void 0 && i ? (c(Ye, r), r.addControl(
|
|
546
|
+
new Ye({
|
|
547
|
+
coordinateFormat: tr(o ?? pe.WGS84),
|
|
548
|
+
projection: o ?? pe.WGS84,
|
|
547
549
|
undefinedHTML: " "
|
|
548
550
|
})
|
|
549
|
-
)) :
|
|
550
|
-
}, [r, i, o]), /* @__PURE__ */ N(
|
|
551
|
+
)) : c(Ye, r);
|
|
552
|
+
}, [r, i, o]), /* @__PURE__ */ N(Ji, { value: r, children: [
|
|
551
553
|
/* @__PURE__ */ l("div", { className: "map", ref: n }),
|
|
552
554
|
e.children
|
|
553
555
|
] });
|
|
554
|
-
},
|
|
555
|
-
const e =
|
|
556
|
+
}, Qt = Oe(null), ir = Qt.Provider, rr = () => {
|
|
557
|
+
const e = Re(Qt);
|
|
556
558
|
if (e === null)
|
|
557
559
|
throw new Error("tile layer context is null, please check the provider");
|
|
558
560
|
return e;
|
|
559
|
-
},
|
|
560
|
-
const t =
|
|
561
|
-
return
|
|
561
|
+
}, or = ({ options: e, children: n }) => {
|
|
562
|
+
const t = ht(), [i] = I(new Un(e));
|
|
563
|
+
return x(() => (t.addLayer(i), () => {
|
|
562
564
|
t.removeLayer(i);
|
|
563
|
-
}), [t, i]), /* @__PURE__ */ l(
|
|
564
|
-
},
|
|
565
|
-
const e =
|
|
565
|
+
}), [t, i]), /* @__PURE__ */ l(ir, { value: i, children: n });
|
|
566
|
+
}, en = Oe(null), sr = en.Provider, ar = () => {
|
|
567
|
+
const e = Re(en);
|
|
566
568
|
if (e === null)
|
|
567
569
|
throw new Error("vector layer context is null, please check the provider");
|
|
568
570
|
return e;
|
|
569
|
-
},
|
|
570
|
-
const n =
|
|
571
|
-
return
|
|
571
|
+
}, lr = ({ children: e }) => {
|
|
572
|
+
const n = ht(), [t] = I(new Kn());
|
|
573
|
+
return x(() => (n.addLayer(t), () => {
|
|
572
574
|
n.removeLayer(t);
|
|
573
|
-
}), [n, t]), /* @__PURE__ */ l(
|
|
574
|
-
},
|
|
575
|
-
const e =
|
|
575
|
+
}), [n, t]), /* @__PURE__ */ l(sr, { value: t, children: e });
|
|
576
|
+
}, tn = Oe(null), cr = tn.Provider, dr = () => {
|
|
577
|
+
const e = Re(tn);
|
|
576
578
|
if (e === null)
|
|
577
579
|
throw new Error("vector source context is null, please check the provider");
|
|
578
580
|
return e;
|
|
579
|
-
},
|
|
580
|
-
const n =
|
|
581
|
-
return
|
|
581
|
+
}, ur = ({ children: e }) => {
|
|
582
|
+
const n = ar(), [t] = I(new jn());
|
|
583
|
+
return x(() => {
|
|
582
584
|
n.setSource(t);
|
|
583
|
-
}, [t, n]), /* @__PURE__ */ l(
|
|
584
|
-
},
|
|
585
|
-
const n =
|
|
586
|
-
return
|
|
587
|
-
const i = new
|
|
585
|
+
}, [t, n]), /* @__PURE__ */ l(cr, { value: t, children: e });
|
|
586
|
+
}, hr = ({ geometry: e }) => {
|
|
587
|
+
const n = dr();
|
|
588
|
+
return x(() => {
|
|
589
|
+
const i = new zt().readFeature(e);
|
|
588
590
|
return n.addFeature(i), () => {
|
|
589
591
|
n.removeFeature(i);
|
|
590
592
|
};
|
|
591
593
|
}, [e, n]), null;
|
|
592
|
-
},
|
|
593
|
-
const n =
|
|
594
|
-
return
|
|
595
|
-
n.setSource(new
|
|
594
|
+
}, mr = (e) => {
|
|
595
|
+
const n = rr();
|
|
596
|
+
return x(() => {
|
|
597
|
+
n.setSource(new qn());
|
|
596
598
|
}, [n]), null;
|
|
597
|
-
},
|
|
598
|
-
const t =
|
|
599
|
-
return
|
|
599
|
+
}, pr = ({ drawType: e, onPolygonSelected: n }) => {
|
|
600
|
+
const t = ht();
|
|
601
|
+
return x(() => {
|
|
600
602
|
const i = {
|
|
601
603
|
type: "Circle"
|
|
602
604
|
/* CIRCLE */
|
|
603
605
|
};
|
|
604
606
|
switch (e) {
|
|
605
|
-
case
|
|
606
|
-
i.geometryFunction =
|
|
607
|
+
case ae.BOX:
|
|
608
|
+
i.geometryFunction = Xn();
|
|
607
609
|
break;
|
|
608
|
-
case
|
|
610
|
+
case ae.POLYGON:
|
|
609
611
|
i.type = "Polygon";
|
|
610
612
|
break;
|
|
611
613
|
default:
|
|
612
614
|
return;
|
|
613
615
|
}
|
|
614
|
-
const o = new
|
|
616
|
+
const o = new Yn(i);
|
|
615
617
|
t.addInteraction(o);
|
|
616
|
-
const r = (
|
|
617
|
-
const
|
|
618
|
-
n == null || n(
|
|
618
|
+
const r = (c) => {
|
|
619
|
+
const m = new zt().writeGeometryObject(c.feature.getGeometry());
|
|
620
|
+
n == null || n(m);
|
|
619
621
|
};
|
|
620
622
|
return o.on("drawend", r), () => {
|
|
621
623
|
o.un("drawend", r), t.removeInteraction(o);
|
|
622
624
|
};
|
|
623
625
|
}, [n, e, t]), null;
|
|
624
626
|
};
|
|
625
|
-
const
|
|
627
|
+
const gr = (e) => {
|
|
626
628
|
const n = (t) => {
|
|
627
|
-
const i =
|
|
629
|
+
const i = Gn(t);
|
|
628
630
|
e.onPolygonSelection(i);
|
|
629
631
|
};
|
|
630
|
-
return /* @__PURE__ */ N(
|
|
631
|
-
/* @__PURE__ */ l(
|
|
632
|
-
e.selectionPolygon && /* @__PURE__ */ l(
|
|
632
|
+
return /* @__PURE__ */ N(nr, { allowFullScreen: !0, showMousePosition: !0, children: [
|
|
633
|
+
/* @__PURE__ */ l(or, { children: /* @__PURE__ */ l(mr, {}) }),
|
|
634
|
+
e.selectionPolygon && /* @__PURE__ */ l(lr, { children: /* @__PURE__ */ l(ur, { children: /* @__PURE__ */ l(hr, { geometry: e.selectionPolygon }) }) }),
|
|
633
635
|
e.children,
|
|
634
|
-
e.drawType !== void 0 && /* @__PURE__ */ l(
|
|
636
|
+
e.drawType !== void 0 && /* @__PURE__ */ l(pr, { drawType: e.drawType, onPolygonSelected: n })
|
|
635
637
|
] });
|
|
636
|
-
},
|
|
637
|
-
(e) =>
|
|
638
|
+
}, Ze = 1.5, fr = 80, yr = Ne(
|
|
639
|
+
(e) => Ue({
|
|
638
640
|
map: {
|
|
639
641
|
height: "100%",
|
|
640
642
|
width: "100%",
|
|
@@ -643,12 +645,12 @@ const ur = (e) => {
|
|
|
643
645
|
absolute: {
|
|
644
646
|
position: "absolute",
|
|
645
647
|
zIndex: 1e3,
|
|
646
|
-
left: e.spacing(
|
|
647
|
-
top: e.spacing(
|
|
648
|
+
left: e.spacing(Ze),
|
|
649
|
+
top: e.spacing(Ze)
|
|
648
650
|
},
|
|
649
651
|
contentContainer: {
|
|
650
|
-
marginTop: e.spacing(
|
|
651
|
-
width: e.spacing(
|
|
652
|
+
marginTop: e.spacing(Ze),
|
|
653
|
+
width: e.spacing(fr)
|
|
652
654
|
},
|
|
653
655
|
filtersContainer: {
|
|
654
656
|
display: "flex",
|
|
@@ -658,18 +660,18 @@ const ur = (e) => {
|
|
|
658
660
|
marginLeft: e.spacing(1)
|
|
659
661
|
}
|
|
660
662
|
})
|
|
661
|
-
),
|
|
662
|
-
var
|
|
663
|
-
const [n, t] =
|
|
664
|
-
o(
|
|
663
|
+
), fs = (e) => {
|
|
664
|
+
var m;
|
|
665
|
+
const [n, t] = I(), [i, o] = I(), r = yr(), c = (v) => {
|
|
666
|
+
o(v), t(void 0), e.handlePolygonSelected(v);
|
|
665
667
|
}, u = () => {
|
|
666
668
|
o(void 0), e.handlePolygonReset();
|
|
667
669
|
};
|
|
668
670
|
return /* @__PURE__ */ N("div", { className: r.map, children: [
|
|
669
671
|
/* @__PURE__ */ N("div", { className: `${r.absolute}`, children: [
|
|
670
|
-
/* @__PURE__ */ N(
|
|
672
|
+
/* @__PURE__ */ N(tt, { className: r.filtersContainer, children: [
|
|
671
673
|
/* @__PURE__ */ l(
|
|
672
|
-
|
|
674
|
+
Zi,
|
|
673
675
|
{
|
|
674
676
|
onCancelDraw: () => t(void 0),
|
|
675
677
|
onReset: u,
|
|
@@ -677,31 +679,31 @@ const ur = (e) => {
|
|
|
677
679
|
isSelectionEnabled: n !== void 0
|
|
678
680
|
}
|
|
679
681
|
),
|
|
680
|
-
(
|
|
682
|
+
(m = e.filters) == null ? void 0 : m.map((v, E) => /* @__PURE__ */ l("div", { className: r.filtersMargin, children: v }, E))
|
|
681
683
|
] }),
|
|
682
|
-
/* @__PURE__ */ l(
|
|
684
|
+
/* @__PURE__ */ l(tt, { color: "red", className: `${r.contentContainer}`, children: e.children })
|
|
683
685
|
] }),
|
|
684
|
-
/* @__PURE__ */ l(
|
|
686
|
+
/* @__PURE__ */ l(gr, { children: e.mapContent, onPolygonSelection: c, drawType: n, selectionPolygon: i })
|
|
685
687
|
] });
|
|
686
688
|
};
|
|
687
|
-
function
|
|
688
|
-
const { headCells: n, order: t, orderBy: i, onRequestSort: o, isCollapseable: r } = e,
|
|
689
|
-
o(
|
|
689
|
+
function vr(e) {
|
|
690
|
+
const { headCells: n, order: t, orderBy: i, onRequestSort: o, isCollapseable: r } = e, c = (u) => (m) => {
|
|
691
|
+
o(m, u);
|
|
690
692
|
};
|
|
691
|
-
return /* @__PURE__ */ l(
|
|
692
|
-
r && /* @__PURE__ */ l(
|
|
693
|
+
return /* @__PURE__ */ l(Zn, { children: /* @__PURE__ */ N(Ve, { children: [
|
|
694
|
+
r && /* @__PURE__ */ l(De, {}),
|
|
693
695
|
n.map((u) => /* @__PURE__ */ l(
|
|
694
|
-
|
|
696
|
+
De,
|
|
695
697
|
{
|
|
696
698
|
align: u.numeric ? "right" : "left",
|
|
697
699
|
padding: u.disablePadding ? "none" : "default",
|
|
698
700
|
sortDirection: i === u.id ? t : !1,
|
|
699
701
|
children: /* @__PURE__ */ l(
|
|
700
|
-
|
|
702
|
+
En,
|
|
701
703
|
{
|
|
702
704
|
active: i === u.id,
|
|
703
705
|
direction: i === u.id ? t : "asc",
|
|
704
|
-
onClick:
|
|
706
|
+
onClick: c(u.id),
|
|
705
707
|
children: u.label
|
|
706
708
|
}
|
|
707
709
|
)
|
|
@@ -710,184 +712,217 @@ function pr(e) {
|
|
|
710
712
|
))
|
|
711
713
|
] }) });
|
|
712
714
|
}
|
|
713
|
-
const
|
|
714
|
-
/* @__PURE__ */
|
|
715
|
+
const Er = $t(
|
|
716
|
+
/* @__PURE__ */ Rt.createElement("path", {
|
|
715
717
|
d: "M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"
|
|
716
718
|
}),
|
|
717
719
|
"KeyboardArrowDown"
|
|
718
|
-
),
|
|
719
|
-
/* @__PURE__ */
|
|
720
|
+
), Cr = $t(
|
|
721
|
+
/* @__PURE__ */ Rt.createElement("path", {
|
|
720
722
|
d: "M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"
|
|
721
723
|
}),
|
|
722
724
|
"KeyboardArrowUp"
|
|
723
725
|
);
|
|
724
|
-
function
|
|
725
|
-
const { cellsMetadata: n, isRowSelected: t, item: i, onRowSelected: o, rowIndex: r, isCollapseable:
|
|
726
|
+
function wr(e) {
|
|
727
|
+
const { cellsMetadata: n, isRowSelected: t, item: i, onRowSelected: o, rowIndex: r, isCollapseable: c, collapsedElement: u } = e, [m, v] = I(!1), E = n.length;
|
|
726
728
|
return /* @__PURE__ */ N(te, { children: [
|
|
727
|
-
/* @__PURE__ */ N(
|
|
729
|
+
/* @__PURE__ */ N(Ve, { hover: !0, selected: t, onClick: () => {
|
|
728
730
|
o == null || o(r);
|
|
729
731
|
}, children: [
|
|
730
|
-
|
|
731
|
-
|
|
732
|
+
c && /* @__PURE__ */ l(De, { padding: "checkbox", children: /* @__PURE__ */ l(
|
|
733
|
+
Cn,
|
|
732
734
|
{
|
|
733
735
|
"aria-label": "expand row",
|
|
734
736
|
size: "small",
|
|
735
|
-
onClick: (
|
|
736
|
-
|
|
737
|
+
onClick: (w) => {
|
|
738
|
+
w.stopPropagation(), v(!m);
|
|
737
739
|
},
|
|
738
|
-
children:
|
|
740
|
+
children: m ? /* @__PURE__ */ l(Cr, {}) : /* @__PURE__ */ l(Er, {})
|
|
739
741
|
}
|
|
740
742
|
) }),
|
|
741
|
-
n.map((
|
|
742
|
-
|
|
743
|
+
n.map((w) => /* @__PURE__ */ l(
|
|
744
|
+
De,
|
|
743
745
|
{
|
|
744
|
-
align:
|
|
745
|
-
padding:
|
|
746
|
-
children:
|
|
746
|
+
align: w.numeric ? "right" : "left",
|
|
747
|
+
padding: w.disablePadding ? "none" : "default",
|
|
748
|
+
children: w.transform ? w.transform(i[w.id]) : i[w.id]
|
|
747
749
|
},
|
|
748
|
-
|
|
750
|
+
w.id + r.toString()
|
|
749
751
|
))
|
|
750
752
|
] }),
|
|
751
|
-
|
|
753
|
+
c && /* @__PURE__ */ l(Ve, { children: /* @__PURE__ */ l(De, { style: { paddingBottom: 0, paddingTop: 0 }, colSpan: E + 1, children: /* @__PURE__ */ l(wn, { in: m, unmountOnExit: !0, timeout: "auto", children: u == null ? void 0 : u(i) }) }) })
|
|
752
754
|
] });
|
|
753
755
|
}
|
|
754
|
-
function
|
|
755
|
-
const [n, t] =
|
|
756
|
+
function ys(e) {
|
|
757
|
+
const [n, t] = I(""), [i, o] = I("asc"), {
|
|
756
758
|
cellsMetadata: r,
|
|
757
|
-
items:
|
|
759
|
+
items: c,
|
|
758
760
|
onRequestSort: u,
|
|
759
|
-
onRowSelected:
|
|
760
|
-
isCollapseable:
|
|
761
|
-
collapsedElement:
|
|
762
|
-
isDense:
|
|
763
|
-
page:
|
|
761
|
+
onRowSelected: m,
|
|
762
|
+
isCollapseable: v,
|
|
763
|
+
collapsedElement: E,
|
|
764
|
+
isDense: _,
|
|
765
|
+
page: w,
|
|
764
766
|
rowsPerPage: P,
|
|
765
|
-
count:
|
|
766
|
-
handleChangePage:
|
|
767
|
+
count: R,
|
|
768
|
+
handleChangePage: V,
|
|
767
769
|
handleChangeRowsPerPage: q
|
|
768
770
|
} = e;
|
|
769
|
-
return /* @__PURE__ */ N(
|
|
770
|
-
/* @__PURE__ */ N(
|
|
771
|
+
return /* @__PURE__ */ N(bn, { component: tt, children: [
|
|
772
|
+
/* @__PURE__ */ N(Tn, { size: _ ? "small" : "medium", children: [
|
|
771
773
|
/* @__PURE__ */ l(
|
|
772
|
-
|
|
774
|
+
vr,
|
|
773
775
|
{
|
|
774
776
|
headCells: r,
|
|
775
|
-
onRequestSort: (
|
|
776
|
-
const
|
|
777
|
-
o(
|
|
777
|
+
onRequestSort: (K, j) => {
|
|
778
|
+
const A = n === j && i === "asc";
|
|
779
|
+
o(A ? "desc" : "asc"), t(j), u(j, A ? "desc" : "asc");
|
|
778
780
|
},
|
|
779
781
|
order: i,
|
|
780
782
|
orderBy: n,
|
|
781
|
-
isCollapseable:
|
|
783
|
+
isCollapseable: v
|
|
782
784
|
}
|
|
783
785
|
),
|
|
784
|
-
/* @__PURE__ */ N(
|
|
785
|
-
|
|
786
|
-
|
|
786
|
+
/* @__PURE__ */ N(_n, { children: [
|
|
787
|
+
c.map((K, j) => /* @__PURE__ */ l(
|
|
788
|
+
wr,
|
|
787
789
|
{
|
|
788
|
-
item:
|
|
789
|
-
rowIndex:
|
|
790
|
-
isCollapseable:
|
|
790
|
+
item: K,
|
|
791
|
+
rowIndex: j,
|
|
792
|
+
isCollapseable: v,
|
|
791
793
|
cellsMetadata: r,
|
|
792
|
-
collapsedElement:
|
|
794
|
+
collapsedElement: E,
|
|
793
795
|
isRowSelected: !1,
|
|
794
|
-
onRowSelected:
|
|
796
|
+
onRowSelected: m
|
|
795
797
|
},
|
|
796
|
-
|
|
798
|
+
j
|
|
797
799
|
)),
|
|
798
|
-
(
|
|
799
|
-
|
|
800
|
+
(c.length === 0 || P > c.length) && /* @__PURE__ */ l(
|
|
801
|
+
Ve,
|
|
800
802
|
{
|
|
801
803
|
style: {
|
|
802
|
-
height: (
|
|
804
|
+
height: (_ ? 33 : 53) * (P - c.length)
|
|
803
805
|
},
|
|
804
|
-
children: /* @__PURE__ */ l(
|
|
806
|
+
children: /* @__PURE__ */ l(De, { colSpan: v ? r.length + 1 : r.length, children: c.length === 0 && /* @__PURE__ */ l(Ln, { align: "center", children: "No results :(" }) })
|
|
805
807
|
}
|
|
806
808
|
)
|
|
807
809
|
] })
|
|
808
810
|
] }),
|
|
809
811
|
/* @__PURE__ */ l(
|
|
810
|
-
|
|
812
|
+
Sn,
|
|
811
813
|
{
|
|
812
814
|
rowsPerPage: P,
|
|
813
815
|
rowsPerPageOptions: [5, 10],
|
|
814
816
|
component: "div",
|
|
815
|
-
count:
|
|
816
|
-
page:
|
|
817
|
-
onPageChange:
|
|
817
|
+
count: R,
|
|
818
|
+
page: w,
|
|
819
|
+
onPageChange: V,
|
|
818
820
|
onRowsPerPageChange: q
|
|
819
821
|
}
|
|
820
822
|
)
|
|
821
823
|
] });
|
|
822
824
|
}
|
|
823
|
-
const
|
|
825
|
+
const vs = (e) => {
|
|
824
826
|
const { children: n, ...t } = e;
|
|
825
|
-
return /* @__PURE__ */ l(
|
|
826
|
-
},
|
|
827
|
+
return /* @__PURE__ */ l(Jn, { ...t, children: n });
|
|
828
|
+
}, Es = (e) => {
|
|
827
829
|
const { children: n, ...t } = e;
|
|
828
|
-
return /* @__PURE__ */ l(
|
|
829
|
-
},
|
|
830
|
-
const
|
|
831
|
-
const n = le(), t = be(null), [i, o] = A({ x: 0, y: 0 });
|
|
832
|
-
return I(() => {
|
|
833
|
-
n.screenSpaceEventHandler.setInputAction((r) => {
|
|
834
|
-
r != null && r.endPosition && o({ ...r.endPosition });
|
|
835
|
-
}, li.MOUSE_MOVE);
|
|
836
|
-
}, [t, n]), I(() => {
|
|
837
|
-
const r = n.scene.globe.ellipsoid, d = n.camera.pickEllipsoid(new pe(i.x, i.y), r);
|
|
838
|
-
if (d) {
|
|
839
|
-
const u = r.cartesianToCartographic(d);
|
|
840
|
-
if (t.current) {
|
|
841
|
-
let h = "";
|
|
842
|
-
switch (e.projection) {
|
|
843
|
-
case he.WEB_MERCATOR: {
|
|
844
|
-
const C = new ci(r).project(u);
|
|
845
|
-
h = `Mercator: ${C.y.toFixed(at)}m, ${C.x.toFixed(
|
|
846
|
-
at
|
|
847
|
-
)}m`, t.current.style.width = "220px";
|
|
848
|
-
break;
|
|
849
|
-
}
|
|
850
|
-
case he.WGS84: {
|
|
851
|
-
const E = ce.toDegrees(u.longitude).toFixed(st);
|
|
852
|
-
h = `WGS84: ${ce.toDegrees(u.latitude).toFixed(st)}°N ${E}°E`, t.current.style.width = "200px";
|
|
853
|
-
break;
|
|
854
|
-
}
|
|
855
|
-
}
|
|
856
|
-
t.current.innerHTML = h;
|
|
857
|
-
}
|
|
858
|
-
}
|
|
859
|
-
}, [i, t, n, e.projection]), /* @__PURE__ */ l("div", { className: "trackerPosition", ref: t });
|
|
860
|
-
}, tn = (e, n, t) => {
|
|
830
|
+
return /* @__PURE__ */ l(Qn, { ...t, children: n });
|
|
831
|
+
}, _t = (e) => e * Math.PI / 180, Fe = (e) => e * (180 / Math.PI), br = (e) => 0.05 * (5916575505e-1 / Math.pow(2, e - 1) / 2) * (Math.cos(_t(85.362 / 2)) / Math.sin(_t(85.362 / 2)));
|
|
832
|
+
const nn = (e, n, t) => {
|
|
861
833
|
let i;
|
|
862
|
-
if (e.scene.mode !==
|
|
863
|
-
i = e.scene.pickPosition(new
|
|
834
|
+
if (e.scene.mode !== Te.SCENE2D)
|
|
835
|
+
i = e.scene.pickPosition(new Ce(n, t));
|
|
864
836
|
else {
|
|
865
837
|
const o = e.scene.globe.ellipsoid;
|
|
866
|
-
i = e.camera.pickEllipsoid(new
|
|
838
|
+
i = e.camera.pickEllipsoid(new Ce(n, t), o);
|
|
867
839
|
}
|
|
868
|
-
return
|
|
869
|
-
},
|
|
870
|
-
const i =
|
|
840
|
+
return Be.fromCartesian(i);
|
|
841
|
+
}, Tr = (e, n, t) => {
|
|
842
|
+
const i = nn(e, n, t);
|
|
871
843
|
return {
|
|
872
844
|
type: "Feature",
|
|
873
845
|
properties: {},
|
|
874
846
|
geometry: {
|
|
875
847
|
type: "Point",
|
|
876
|
-
coordinates: [
|
|
848
|
+
coordinates: [ge.toDegrees(i.longitude), ge.toDegrees(i.latitude)]
|
|
877
849
|
}
|
|
878
850
|
};
|
|
879
|
-
},
|
|
851
|
+
}, rn = (e, n, t) => {
|
|
880
852
|
try {
|
|
881
|
-
const i =
|
|
853
|
+
const i = nn(e, n, t);
|
|
882
854
|
return {
|
|
883
|
-
longitude:
|
|
884
|
-
latitude:
|
|
855
|
+
longitude: ge.toDegrees(i.longitude),
|
|
856
|
+
latitude: ge.toDegrees(i.latitude)
|
|
885
857
|
};
|
|
886
858
|
} catch {
|
|
887
859
|
return;
|
|
888
860
|
}
|
|
889
861
|
};
|
|
890
|
-
|
|
862
|
+
class Cs extends di {
|
|
863
|
+
}
|
|
864
|
+
class ws extends ui {
|
|
865
|
+
}
|
|
866
|
+
class bs extends hi {
|
|
867
|
+
}
|
|
868
|
+
class Ts extends Ce {
|
|
869
|
+
}
|
|
870
|
+
class _s extends ve {
|
|
871
|
+
}
|
|
872
|
+
class _r extends Be {
|
|
873
|
+
}
|
|
874
|
+
class Ls extends mi {
|
|
875
|
+
}
|
|
876
|
+
class Ss extends Ut {
|
|
877
|
+
}
|
|
878
|
+
class Ms extends pi {
|
|
879
|
+
}
|
|
880
|
+
class Ps extends Pe {
|
|
881
|
+
}
|
|
882
|
+
class Ds extends gi {
|
|
883
|
+
}
|
|
884
|
+
class Is extends fi {
|
|
885
|
+
}
|
|
886
|
+
class xs extends yi {
|
|
887
|
+
}
|
|
888
|
+
const As = it, ks = Kt, Lr = (e) => {
|
|
889
|
+
const n = le(), t = _e(null), [i, o] = I({ x: 0, y: 0 });
|
|
890
|
+
return x(() => {
|
|
891
|
+
n.screenSpaceEventHandler.setInputAction((r) => {
|
|
892
|
+
if (r != null && r.endPosition) {
|
|
893
|
+
const c = { ...r.endPosition };
|
|
894
|
+
c.x = Math.ceil(c.x), c.y = Math.ceil(c.y), o(c);
|
|
895
|
+
}
|
|
896
|
+
}, vi.MOUSE_MOVE);
|
|
897
|
+
}, [t, n]), x(() => {
|
|
898
|
+
const r = n.scene.globe.ellipsoid;
|
|
899
|
+
if (i) {
|
|
900
|
+
const c = rn(n, i.x, i.y);
|
|
901
|
+
if (c) {
|
|
902
|
+
const u = new _r(c.longitude, c.latitude);
|
|
903
|
+
if (t.current) {
|
|
904
|
+
let m = "";
|
|
905
|
+
switch (e.projection) {
|
|
906
|
+
case pe.WEB_MERCATOR: {
|
|
907
|
+
const E = new Ei(r).project(u);
|
|
908
|
+
m = `Mercator: ${E.y.toFixed(lt)}m, ${E.x.toFixed(
|
|
909
|
+
lt
|
|
910
|
+
)}m`, t.current.style.width = "220px";
|
|
911
|
+
break;
|
|
912
|
+
}
|
|
913
|
+
case pe.WGS84: {
|
|
914
|
+
const v = u.longitude.toFixed(at);
|
|
915
|
+
m = `WGS84: ${u.latitude.toFixed(at)}°N ${v}°E`, t.current.style.width = "200px";
|
|
916
|
+
break;
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
t.current.innerHTML = m;
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
}, [i, t, n, e.projection]), /* @__PURE__ */ l("div", { className: "trackerPosition", ref: t });
|
|
924
|
+
};
|
|
925
|
+
const Je = [
|
|
891
926
|
1,
|
|
892
927
|
2,
|
|
893
928
|
3,
|
|
@@ -920,56 +955,56 @@ const Ze = [
|
|
|
920
955
|
2e7,
|
|
921
956
|
3e7,
|
|
922
957
|
5e7
|
|
923
|
-
],
|
|
924
|
-
const o =
|
|
958
|
+
], Sr = (e, n, t, i) => {
|
|
959
|
+
const o = Z(i, "METERS_UNIT") ?? "m", r = Z(i, "KILOMETERS_UNIT") ?? "km", c = {
|
|
925
960
|
barWidth: void 0,
|
|
926
961
|
distanceLabel: void 0,
|
|
927
962
|
lastLegendUpdate: n.lastLegendUpdate
|
|
928
|
-
}, u = new
|
|
929
|
-
if (
|
|
963
|
+
}, u = new wi(), m = new Date().getTime();
|
|
964
|
+
if (m < c.lastLegendUpdate + 250)
|
|
930
965
|
return;
|
|
931
|
-
|
|
932
|
-
const
|
|
933
|
-
if (!
|
|
966
|
+
c.lastLegendUpdate = m;
|
|
967
|
+
const v = e.scene.canvas.clientWidth, E = e.scene.canvas.clientHeight, _ = e.scene.camera.getPickRay(new Ce(v / 2 | 0, E - 1)), w = e.scene.camera.getPickRay(new Ce(1 + v / 2 | 0, E - 1)), P = e.scene.globe, R = P.pick(_, e.scene), V = P.pick(w, e.scene);
|
|
968
|
+
if (!R || !V)
|
|
934
969
|
return;
|
|
935
|
-
const q = P.ellipsoid.cartesianToCartographic(
|
|
970
|
+
const q = P.ellipsoid.cartesianToCartographic(R), H = P.ellipsoid.cartesianToCartographic(V);
|
|
936
971
|
u.setEndPoints(q, H);
|
|
937
|
-
const
|
|
938
|
-
let
|
|
939
|
-
for (let
|
|
940
|
-
|
|
941
|
-
if (
|
|
942
|
-
let
|
|
943
|
-
|
|
972
|
+
const K = u.surfaceDistance, j = 100;
|
|
973
|
+
let A;
|
|
974
|
+
for (let $ = Je.length - 1; !$e(A) && $ >= 0; --$)
|
|
975
|
+
Je[$] / K < j && (A = Je[$]);
|
|
976
|
+
if ($e(A)) {
|
|
977
|
+
let $ = "";
|
|
978
|
+
A >= 1e3 ? $ = `${(A / 1e3).toString()} ${r}` : $ = `${A.toString()} ${o}`, c.barWidth = A / K | 0, c.distanceLabel = $;
|
|
944
979
|
}
|
|
945
|
-
t(
|
|
946
|
-
},
|
|
947
|
-
const n = le(), [t, i] =
|
|
980
|
+
t(c);
|
|
981
|
+
}, Mr = (e) => {
|
|
982
|
+
const n = le(), [t, i] = I({
|
|
948
983
|
barWidth: void 0,
|
|
949
984
|
distanceLabel: void 0,
|
|
950
985
|
lastLegendUpdate: -1
|
|
951
986
|
});
|
|
952
|
-
|
|
953
|
-
const r = (
|
|
954
|
-
|
|
955
|
-
},
|
|
956
|
-
n.scene.globe.tilesLoaded && (r(new MouseEvent("mouse")),
|
|
987
|
+
x(() => {
|
|
988
|
+
const r = (m) => {
|
|
989
|
+
Sr(n, t, i, e.locale);
|
|
990
|
+
}, c = new Ci(), u = (m) => {
|
|
991
|
+
n.scene.globe.tilesLoaded && (r(new MouseEvent("mouse")), c.removeAll());
|
|
957
992
|
};
|
|
958
|
-
return
|
|
993
|
+
return c.add(n.scene.globe.tileLoadProgressEvent, u), n.camera.moveEnd.addEventListener(r), () => {
|
|
959
994
|
try {
|
|
960
|
-
|
|
961
|
-
} catch (
|
|
962
|
-
console.log('CESIUM camera "moveEnd" remove listener failed',
|
|
995
|
+
Z(n, "_cesiumWidget") != null && n.camera.moveEnd.removeEventListener(r);
|
|
996
|
+
} catch (m) {
|
|
997
|
+
console.log('CESIUM camera "moveEnd" remove listener failed', m);
|
|
963
998
|
}
|
|
964
999
|
};
|
|
965
1000
|
}, [n, e.locale, t]);
|
|
966
1001
|
const o = (r) => 5 + (125 - r) / 2;
|
|
967
|
-
return /* @__PURE__ */ l("div", { className: "scalePosition", children:
|
|
968
|
-
/* @__PURE__ */ l("div", { className: "
|
|
1002
|
+
return /* @__PURE__ */ l("div", { className: "scalePosition", children: $e(t.barWidth) && /* @__PURE__ */ N(te, { children: [
|
|
1003
|
+
/* @__PURE__ */ l("div", { className: "scale-tracker-label", children: /* @__PURE__ */ l("bdi", { children: t.distanceLabel }) }),
|
|
969
1004
|
/* @__PURE__ */ l(
|
|
970
1005
|
"div",
|
|
971
1006
|
{
|
|
972
|
-
className: "
|
|
1007
|
+
className: "scale-tracker-bar",
|
|
973
1008
|
style: {
|
|
974
1009
|
height: "2px",
|
|
975
1010
|
width: `${t.barWidth.toString()}px`,
|
|
@@ -979,80 +1014,90 @@ const Ze = [
|
|
|
979
1014
|
)
|
|
980
1015
|
] }) });
|
|
981
1016
|
}, oe = {
|
|
982
|
-
MORPHING:
|
|
983
|
-
COLUMBUS_VIEW:
|
|
984
|
-
SCENE2D:
|
|
985
|
-
SCENE3D:
|
|
1017
|
+
MORPHING: Te.MORPHING,
|
|
1018
|
+
COLUMBUS_VIEW: Te.COLUMBUS_VIEW,
|
|
1019
|
+
SCENE2D: Te.SCENE2D,
|
|
1020
|
+
SCENE3D: Te.SCENE3D
|
|
986
1021
|
};
|
|
987
|
-
const
|
|
988
|
-
const i =
|
|
1022
|
+
const Lt = (e, n) => {
|
|
1023
|
+
const i = Z(n.scene.globe, "_surface.tileProvider"), o = i._quadtree, r = n.canvas.height, c = Z(n.camera.frustum, "sseDenominator") ?? 1;
|
|
989
1024
|
for (let u = 0; u <= 19; u++)
|
|
990
|
-
if (i.getLevelMaximumGeometricError(u) * r / (e *
|
|
1025
|
+
if (i.getLevelMaximumGeometricError(u) * r / (e * c) < o.maximumScreenSpaceError)
|
|
991
1026
|
return u;
|
|
992
1027
|
return null;
|
|
993
|
-
},
|
|
1028
|
+
}, Pr = (e, n) => {
|
|
994
1029
|
e = e || 10;
|
|
995
1030
|
const t = [];
|
|
996
1031
|
let i = 1e5, o = 0;
|
|
997
1032
|
for (let r = 1e8; r > i; r = r - i) {
|
|
998
|
-
const
|
|
999
|
-
if (
|
|
1033
|
+
const c = Lt(r, n);
|
|
1034
|
+
if (c === null)
|
|
1000
1035
|
break;
|
|
1001
|
-
if (
|
|
1002
|
-
let u = r,
|
|
1003
|
-
for (;
|
|
1004
|
-
r = u + (
|
|
1036
|
+
if (c !== o) {
|
|
1037
|
+
let u = r, m = r + i;
|
|
1038
|
+
for (; m - u > e; )
|
|
1039
|
+
r = u + (m - u) / 2, Lt(r, n) === c ? u = r : m = r;
|
|
1005
1040
|
t.push({
|
|
1006
|
-
level:
|
|
1041
|
+
level: c,
|
|
1007
1042
|
height: Math.round(r)
|
|
1008
|
-
}), o =
|
|
1043
|
+
}), o = c, t.length >= 2 && (i = (t[t.length - 2].height - r) / 1e3);
|
|
1009
1044
|
}
|
|
1010
1045
|
}
|
|
1011
1046
|
return t;
|
|
1012
|
-
},
|
|
1013
|
-
const
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1047
|
+
}, Dr = ({ locale: e = void 0, valueBy: n = "RENDERED_TILES" }) => {
|
|
1048
|
+
const t = le(), [i, o] = I(1), r = Pr(1, t), c = me(() => {
|
|
1049
|
+
const E = t.camera, _ = 0.5;
|
|
1050
|
+
let w = 0;
|
|
1051
|
+
switch (t.scene.mode) {
|
|
1052
|
+
case oe.SCENE3D:
|
|
1053
|
+
w = t.scene.mapProjection.ellipsoid.cartesianToCartographic(E.positionWC).height;
|
|
1054
|
+
break;
|
|
1055
|
+
case oe.SCENE2D:
|
|
1056
|
+
w = (E.frustum.right - E.frustum.left) * _;
|
|
1057
|
+
break;
|
|
1058
|
+
case oe.COLUMBUS_VIEW:
|
|
1059
|
+
w = E.position.z;
|
|
1060
|
+
break;
|
|
1061
|
+
default:
|
|
1062
|
+
w = 0;
|
|
1063
|
+
break;
|
|
1064
|
+
}
|
|
1065
|
+
if (r.length > 0) {
|
|
1066
|
+
const P = r.reduce((R, V) => Math.abs(V.height - w) < Math.abs(R.height - w) ? V : R);
|
|
1067
|
+
o(P.level);
|
|
1068
|
+
}
|
|
1069
|
+
}, [t, r]), u = me(() => {
|
|
1070
|
+
let E = 0;
|
|
1071
|
+
t.scene.globe._surface.forEachRenderedTile(function(_) {
|
|
1072
|
+
E = Math.max(E, _.level);
|
|
1073
|
+
}), o(E);
|
|
1074
|
+
}, [t]), v = ke(() => ({
|
|
1075
|
+
CALCULATION: c,
|
|
1076
|
+
RENDERED_TILES: u
|
|
1077
|
+
}), [c, u])[n];
|
|
1078
|
+
return x(() => {
|
|
1079
|
+
const E = t.scene.globe.tileLoadProgressEvent.addEventListener(function() {
|
|
1080
|
+
t.scene.globe.tilesLoaded && v();
|
|
1081
|
+
});
|
|
1082
|
+
return t.camera.moveEnd.addEventListener(v), () => {
|
|
1038
1083
|
try {
|
|
1039
|
-
|
|
1040
|
-
} catch (
|
|
1041
|
-
console.log('CESIUM camera "moveEnd"(from zoom tracker) remove listener failed',
|
|
1084
|
+
typeof Z(t, "_cesiumWidget") < "u" && (t.camera.moveEnd.removeEventListener(v), E());
|
|
1085
|
+
} catch (_) {
|
|
1086
|
+
console.log('CESIUM camera "moveEnd"(from zoom tracker) remove listener failed', _);
|
|
1042
1087
|
}
|
|
1043
1088
|
};
|
|
1044
|
-
}, [
|
|
1045
|
-
/* @__PURE__ */ l("div", { className: "zoomLevelValue", children:
|
|
1046
|
-
/* @__PURE__ */ l("div", { className: "zoomLevelLabel", children:
|
|
1089
|
+
}, [t, v]), /* @__PURE__ */ N("div", { className: "zoomLevel", children: [
|
|
1090
|
+
/* @__PURE__ */ l("div", { className: "zoomLevelValue", children: i }),
|
|
1091
|
+
/* @__PURE__ */ l("div", { className: "zoomLevelLabel", children: Z(e, "ZOOM_LABEL") ?? "zoom" })
|
|
1047
1092
|
] });
|
|
1048
1093
|
};
|
|
1049
|
-
const
|
|
1050
|
-
const n = le(), [t, i] =
|
|
1051
|
-
return
|
|
1094
|
+
const Ir = -1, xr = (e) => {
|
|
1095
|
+
const n = le(), [t, i] = I(), { sceneModes: o } = e, r = (c) => o.findIndex((u) => u === c) > Ir;
|
|
1096
|
+
return x(() => {
|
|
1052
1097
|
i(n.scene.mode);
|
|
1053
1098
|
}, []), /* @__PURE__ */ N(te, { children: [
|
|
1054
1099
|
r(oe.SCENE3D) && /* @__PURE__ */ l(
|
|
1055
|
-
|
|
1100
|
+
Ie,
|
|
1056
1101
|
{
|
|
1057
1102
|
icon: /* @__PURE__ */ l("div", { className: `mapViewIcon ${t === oe.SCENE3D ? "mapViewCurrent" : ""}`, children: /* @__PURE__ */ l("svg", { width: "100%", height: "100%", viewBox: "0 0 64 64", children: /* @__PURE__ */ l("path", { d: "m 32.401392,4.9330437 c -7.087603,0 -14.096095,2.884602 -19.10793,7.8946843 -5.0118352,5.010083 -7.9296167,11.987468 -7.9296167,19.072999 0,7.085531 2.9177815,14.097848 7.9296167,19.107931 4.837653,4.835961 11.541408,7.631372 18.374354,7.82482 0.05712,0.01231 0.454119,0.139729 0.454119,0.139729 l 0.03493,-0.104797 c 0.08246,7.84e-4 0.162033,0.03493 0.244525,0.03493 0.08304,0 0.161515,-0.03414 0.244526,-0.03493 l 0.03493,0.104797 c 0,0 0.309474,-0.129487 0.349323,-0.139729 6.867765,-0.168094 13.582903,-2.965206 18.444218,-7.82482 2.558195,-2.5573 4.551081,-5.638134 5.903547,-8.977584 1.297191,-3.202966 2.02607,-6.661489 2.02607,-10.130347 0,-6.237309 -2.366261,-12.31219 -6.322734,-17.116794 -0.0034,-0.02316 0.0049,-0.04488 0,-0.06986 -0.01733,-0.08745 -0.104529,-0.278855 -0.104797,-0.279458 -5.31e-4,-0.0012 -0.522988,-0.628147 -0.523984,-0.62878 -3.47e-4,-2.2e-4 -0.133444,-0.03532 -0.244525,-0.06987 C 51.944299,13.447603 51.751076,13.104317 51.474391,12.827728 46.462556,7.8176457 39.488996,4.9330437 32.401392,4.9330437 z m -2.130866,3.5281554 0.104797,9.6762289 c -4.111695,-0.08361 -7.109829,-0.423664 -9.257041,-0.943171 1.198093,-2.269271 2.524531,-4.124404 3.91241,-5.414496 2.167498,-2.0147811 3.950145,-2.8540169 5.239834,-3.3185619 z m 2.794579,0 c 1.280302,0.4754953 3.022186,1.3285948 5.065173,3.2486979 1.424667,1.338973 2.788862,3.303645 3.982275,5.728886 -2.29082,0.403367 -5.381258,0.621049 -8.942651,0.698645 L 33.065105,8.4611991 z m 5.728886,0.2445256 c 4.004072,1.1230822 7.793098,3.1481363 10.724195,6.0782083 0.03468,0.03466 0.07033,0.06991 0.104797,0.104797 -0.45375,0.313891 -0.923054,0.663002 -1.956205,1.082899 -0.647388,0.263114 -1.906242,0.477396 -2.829511,0.733577 -1.382296,-2.988132 -3.027146,-5.368585 -4.785716,-7.0213781 -0.422866,-0.397432 -0.835818,-0.6453247 -1.25756,-0.9781032 z m -15.33525,0.7685092 c -0.106753,0.09503 -0.207753,0.145402 -0.31439,0.244526 -1.684973,1.5662541 -3.298068,3.8232211 -4.680919,6.5672591 -0.343797,-0.14942 -1.035052,-0.273198 -1.292493,-0.419186 -0.956528,-0.542427 -1.362964,-1.022024 -1.537018,-1.292493 -0.0241,-0.03745 -0.01868,-0.0401 -0.03493,-0.06986 2.250095,-2.163342 4.948824,-3.869984 7.859752,-5.0302421 z m -9.641296,7.0912431 c 0.464973,0.571618 0.937729,1.169056 1.956205,1.746612 0.349907,0.198425 1.107143,0.335404 1.537018,0.523983 -1.20166,3.172984 -1.998037,7.051901 -2.165798,11.772162 C 14.256557,30.361384 12.934823,30.161483 12.280427,29.90959 10.644437,29.279855 9.6888882,28.674891 9.1714586,28.267775 8.6540289,27.860658 8.6474751,27.778724 8.6474751,27.778724 l -0.069864,0.03493 C 9.3100294,23.691285 11.163248,19.798527 13.817445,16.565477 z m 37.552149,0.523984 c 2.548924,3.289983 4.265057,7.202594 4.890513,11.318043 -0.650428,0.410896 -1.756876,1.001936 -3.563088,1.606882 -1.171552,0.392383 -3.163859,0.759153 -4.960377,1.117832 -0.04367,-4.752703 -0.784809,-8.591423 -1.88634,-11.807094 0.917574,-0.263678 2.170552,-0.486495 2.864443,-0.76851 1.274693,-0.518066 2.003942,-1.001558 2.654849,-1.467153 z m -31.439008,2.619917 c 2.487341,0.672766 5.775813,1.137775 10.479669,1.222628 l 0.104797,10.689263 0,0.03493 0,0.733577 c -5.435005,-0.09059 -9.512219,-0.519044 -12.610536,-1.117831 0.106127,-4.776683 0.879334,-8.55791 2.02607,-11.562569 z m 23.264866,0.31439 c 1.073459,3.067541 1.833795,6.821314 1.816476,11.702298 -3.054474,0.423245 -7.062018,0.648559 -11.702298,0.698644 l 0,-0.838373 -0.104796,-10.654331 c 4.082416,-0.0864 7.404468,-0.403886 9.990618,-0.908238 z M 8.2632205,30.922625 c 0.7558676,0.510548 1.5529563,1.013339 3.0041715,1.57195 0.937518,0.360875 2.612202,0.647642 3.91241,0.978102 0.112814,3.85566 0.703989,7.107756 1.606883,9.920754 -1.147172,-0.324262 -2.644553,-0.640648 -3.423359,-0.978102 -1.516688,-0.657177 -2.386627,-1.287332 -2.864443,-1.71168 -0.477816,-0.424347 -0.489051,-0.489051 -0.489051,-0.489051 L 9.8002387,40.319395 C 8.791691,37.621767 8.1584238,34.769583 8.1584238,31.900727 c 0,-0.330153 0.090589,-0.648169 0.1047967,-0.978102 z m 48.2763445,0.419186 c 0.0047,0.188973 0.06986,0.36991 0.06986,0.558916 0,2.938869 -0.620228,5.873558 -1.676747,8.628261 -0.07435,0.07583 -0.06552,0.07411 -0.454119,0.349323 -0.606965,0.429857 -1.631665,1.042044 -3.318562,1.676747 -1.208528,0.454713 -3.204964,0.850894 -5.135038,1.25756 0.84593,-2.765726 1.41808,-6.005357 1.606883,-9.815957 2.232369,-0.413371 4.483758,-0.840201 5.938479,-1.327425 1.410632,-0.472457 2.153108,-0.89469 2.96924,-1.327425 z m -38.530252,2.864443 c 3.208141,0.56697 7.372279,0.898588 12.575603,0.978103 l 0.174662,9.885821 c -4.392517,-0.06139 -8.106722,-0.320566 -10.863925,-0.803441 -1.051954,-2.664695 -1.692909,-6.043794 -1.88634,-10.060483 z m 26.793022,0.31439 c -0.246298,3.923551 -0.877762,7.263679 -1.816476,9.885822 -2.561957,0.361954 -5.766249,0.560708 -9.431703,0.62878 l -0.174661,-9.815957 c 4.491734,-0.04969 8.334769,-0.293032 11.42284,-0.698645 z M 12.035901,44.860585 c 0.09977,0.04523 0.105535,0.09465 0.209594,0.139729 1.337656,0.579602 3.441099,1.058072 5.589157,1.537018 1.545042,3.399208 3.548524,5.969402 5.589157,7.789888 -3.034411,-1.215537 -5.871615,-3.007978 -8.174142,-5.309699 -1.245911,-1.245475 -2.271794,-2.662961 -3.213766,-4.156936 z m 40.69605,0 c -0.941972,1.493975 -1.967855,2.911461 -3.213765,4.156936 -2.74253,2.741571 -6.244106,4.696717 -9.955686,5.868615 0.261347,-0.241079 0.507495,-0.394491 0.768509,-0.663713 1.674841,-1.727516 3.320792,-4.181056 4.645987,-7.265904 2.962447,-0.503021 5.408965,-1.122293 7.161107,-1.781544 0.284034,-0.106865 0.337297,-0.207323 0.593848,-0.31439 z m -31.404076,2.305527 c 2.645807,0.376448 5.701178,0.649995 9.466635,0.698645 l 0.139729,7.789888 c -1.38739,-0.480844 -3.316218,-1.29837 -5.659022,-3.388427 -1.388822,-1.238993 -2.743668,-3.0113 -3.947342,-5.100106 z m 20.365491,0.104797 c -1.04872,2.041937 -2.174337,3.779068 -3.353494,4.995309 -1.853177,1.911459 -3.425515,2.82679 -4.611055,3.353494 l -0.139729,-7.789887 c 3.13091,-0.05714 5.728238,-0.278725 8.104278,-0.558916 z" }) }) }),
|
|
1058
1103
|
onClick: () => {
|
|
@@ -1061,7 +1106,7 @@ const Sr = -1, Mr = (e) => {
|
|
|
1061
1106
|
}
|
|
1062
1107
|
),
|
|
1063
1108
|
r(oe.SCENE2D) && /* @__PURE__ */ l(
|
|
1064
|
-
|
|
1109
|
+
Ie,
|
|
1065
1110
|
{
|
|
1066
1111
|
icon: /* @__PURE__ */ l("div", { className: `mapViewIcon ${t === oe.SCENE2D ? "mapViewCurrent" : ""}`, children: /* @__PURE__ */ l("svg", { width: "100%", height: "100%", viewBox: "0 0 64 64", children: /* @__PURE__ */ l("path", { d: "m 2.9825053,17.550598 0,1.368113 0,26.267766 0,1.368113 1.36811,0 54.9981397,0 1.36811,0 0,-1.368113 0,-26.267766 0,-1.368113 -1.36811,0 -54.9981397,0 -1.36811,0 z m 2.73623,2.736226 10.3292497,0 0,10.466063 -10.3292497,0 0,-10.466063 z m 13.0654697,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 10.32926,0 0,10.466063 -10.32926,0 0,-10.466063 z m -41.9326497,13.202288 10.3292497,0 0,10.329252 -10.3292497,0 0,-10.329252 z m 13.0654697,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 10.32926,0 0,10.329252 -10.32926,0 0,-10.329252 z" }) }) }),
|
|
1067
1112
|
onClick: () => {
|
|
@@ -1070,7 +1115,7 @@ const Sr = -1, Mr = (e) => {
|
|
|
1070
1115
|
}
|
|
1071
1116
|
),
|
|
1072
1117
|
r(oe.COLUMBUS_VIEW) && /* @__PURE__ */ l(
|
|
1073
|
-
|
|
1118
|
+
Ie,
|
|
1074
1119
|
{
|
|
1075
1120
|
icon: /* @__PURE__ */ l("div", { className: `mapViewIcon ${t === oe.COLUMBUS_VIEW ? "mapViewCurrent" : ""}`, children: /* @__PURE__ */ l("svg", { width: "100%", height: "100%", viewBox: "0 0 64 64", children: /* @__PURE__ */ l("path", { d: "m 14.723969,17.675598 -0.340489,0.817175 -11.1680536,26.183638 -0.817175,1.872692 2.076986,0 54.7506996,0 2.07698,0 -0.81717,-1.872692 -11.16805,-26.183638 -0.34049,-0.817175 -0.91933,0 -32.414586,0 -0.919322,0 z m 1.838643,2.723916 6.196908,0 -2.928209,10.418977 -7.729111,0 4.460412,-10.418977 z m 9.02297,0 4.903049,0 0,10.418977 -7.831258,0 2.928209,-10.418977 z m 7.626964,0 5.584031,0 2.62176,10.418977 -8.205791,0 0,-10.418977 z m 8.410081,0 5.51593,0 4.46042,10.418977 -7.38863,0 -2.58772,-10.418977 z m -30.678091,13.142892 8.103649,0 -2.89416,10.282782 -9.6018026,0 4.3923136,-10.282782 z m 10.929711,0 8.614384,0 0,10.282782 -11.508544,0 2.89416,-10.282782 z m 11.338299,0 8.852721,0 2.58772,10.282782 -11.440441,0 0,-10.282782 z m 11.678781,0 7.86531,0 4.39231,10.282782 -9.6699,0 -2.58772,-10.282782 z" }) }) }),
|
|
1076
1121
|
onClick: () => {
|
|
@@ -1080,87 +1125,87 @@ const Sr = -1, Mr = (e) => {
|
|
|
1080
1125
|
)
|
|
1081
1126
|
] });
|
|
1082
1127
|
};
|
|
1083
|
-
const
|
|
1084
|
-
(e) =>
|
|
1128
|
+
const Ar = Ne(
|
|
1129
|
+
(e) => Ue({
|
|
1085
1130
|
mapContainer: {
|
|
1086
1131
|
width: "60px",
|
|
1087
1132
|
height: "60px",
|
|
1088
1133
|
border: `${e.palette.background.paper} 2px solid`
|
|
1089
1134
|
}
|
|
1090
1135
|
})
|
|
1091
|
-
),
|
|
1092
|
-
const n = le(), { baseMaps: t } = e, [i, o] =
|
|
1093
|
-
|
|
1094
|
-
const
|
|
1095
|
-
|
|
1136
|
+
), kr = (e) => {
|
|
1137
|
+
const n = le(), { baseMaps: t } = e, [i, o] = I(" "), [r, c] = I(), u = Ar();
|
|
1138
|
+
x(() => {
|
|
1139
|
+
const v = t == null ? void 0 : t.maps.find((E) => E.isCurrent);
|
|
1140
|
+
v && (c(v), o(v.title !== void 0 ? v.title : " "));
|
|
1096
1141
|
}, [t]);
|
|
1097
|
-
const
|
|
1098
|
-
var
|
|
1142
|
+
const m = (v) => {
|
|
1143
|
+
var E, _;
|
|
1099
1144
|
if (t) {
|
|
1100
|
-
(
|
|
1101
|
-
const
|
|
1102
|
-
|
|
1103
|
-
P.isCurrent =
|
|
1145
|
+
(E = n.layersManager) == null || E.removeBaseMapLayers();
|
|
1146
|
+
const w = t.maps.find((P) => P.id === v);
|
|
1147
|
+
w && ((_ = n.layersManager) == null || _.setBaseMapLayers(w), c(w), t.maps.forEach((P) => {
|
|
1148
|
+
P.isCurrent = w === P;
|
|
1104
1149
|
}));
|
|
1105
1150
|
}
|
|
1106
1151
|
};
|
|
1107
1152
|
return /* @__PURE__ */ N(te, { children: [
|
|
1108
1153
|
/* @__PURE__ */ l("label", { className: "mapLabel", children: i }),
|
|
1109
|
-
/* @__PURE__ */ l("ul", { className: "mapSelector", children: t == null ? void 0 : t.maps.map((
|
|
1154
|
+
/* @__PURE__ */ l("ul", { className: "mapSelector", children: t == null ? void 0 : t.maps.map((v) => /* @__PURE__ */ l("li", { className: `mapContainer ${u.mapContainer} ${v === r ? "mapContainerSelected" : ""}`, children: /* @__PURE__ */ l(
|
|
1110
1155
|
"img",
|
|
1111
1156
|
{
|
|
1112
1157
|
alt: "",
|
|
1113
1158
|
className: "mapContainerImg",
|
|
1114
|
-
src:
|
|
1159
|
+
src: v.thumbnail,
|
|
1115
1160
|
onMouseOver: () => {
|
|
1116
|
-
o(
|
|
1161
|
+
o(v.title);
|
|
1117
1162
|
},
|
|
1118
1163
|
onMouseOut: () => {
|
|
1119
1164
|
o((r == null ? void 0 : r.title) !== void 0 ? r.title : " ");
|
|
1120
1165
|
},
|
|
1121
1166
|
onClick: () => {
|
|
1122
|
-
|
|
1167
|
+
m(v.id);
|
|
1123
1168
|
}
|
|
1124
1169
|
}
|
|
1125
|
-
) },
|
|
1170
|
+
) }, v.id)) })
|
|
1126
1171
|
] });
|
|
1127
1172
|
};
|
|
1128
|
-
const
|
|
1129
|
-
const [n, t] =
|
|
1130
|
-
return
|
|
1131
|
-
const
|
|
1132
|
-
var
|
|
1133
|
-
const
|
|
1134
|
-
P && !P.contains(
|
|
1173
|
+
const Qe = "ic_settings_24px", Or = (e) => {
|
|
1174
|
+
const [n, t] = I(!1), { sceneModes: i, baseMaps: o, locale: r } = e, c = _e(null), u = Z(r, "MAP_SETTINGS_DIALOG_TITLE") ?? "Map Settings", m = Z(r, "MAP_SETTINGS_SCENE_MODE_TITLE") ?? "Scene Mode", v = Z(r, "MAP_SETTINGS_BASE_MAP_TITLE") ?? "Base Map";
|
|
1175
|
+
return x(() => {
|
|
1176
|
+
const E = (_) => {
|
|
1177
|
+
var R;
|
|
1178
|
+
const w = _.target, P = Z(c, "current");
|
|
1179
|
+
P && !P.contains(w) && w.id !== Qe && ((R = w.parentElement) == null ? void 0 : R.id) !== Qe && (document.removeEventListener("click", E, !1), t(!1));
|
|
1135
1180
|
};
|
|
1136
|
-
return document.addEventListener("click",
|
|
1137
|
-
document.removeEventListener("click",
|
|
1181
|
+
return document.addEventListener("click", E, !1), () => {
|
|
1182
|
+
document.removeEventListener("click", E, !1);
|
|
1138
1183
|
};
|
|
1139
1184
|
}), /* @__PURE__ */ N(te, { children: [
|
|
1140
1185
|
/* @__PURE__ */ l(
|
|
1141
|
-
|
|
1186
|
+
Ie,
|
|
1142
1187
|
{
|
|
1143
|
-
icon: /* @__PURE__ */ l("div", { className: "settingsIconContainer", children: /* @__PURE__ */ l("svg", { width: "100%", height: "100%", viewBox: "0 0 24 24", id:
|
|
1188
|
+
icon: /* @__PURE__ */ l("div", { className: "settingsIconContainer", children: /* @__PURE__ */ l("svg", { width: "100%", height: "100%", viewBox: "0 0 24 24", id: Qe, x: "288", y: "24", children: /* @__PURE__ */ l("path", { d: "M19.43 12.98c.04-.32.07-.64.07-.98s-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.39-.3-.61-.22l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65A.488.488 0 0 0 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.23-.09-.49 0-.61.22l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98s.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.12.22.39.3.61.22l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.23.09.49 0 .61-.22l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.65zM12 15.5c-1.93 0-3.5-1.57-3.5-3.5s1.57-3.5 3.5-3.5 3.5 1.57 3.5 3.5-1.57 3.5-3.5 3.5z" }) }) }),
|
|
1144
1189
|
onClick: () => {
|
|
1145
1190
|
t(!n);
|
|
1146
1191
|
}
|
|
1147
1192
|
}
|
|
1148
1193
|
),
|
|
1149
|
-
n && /* @__PURE__ */ l("div", { id: "dialog-portal-example", className: "settingsDialogPortal", ref:
|
|
1150
|
-
|
|
1194
|
+
n && /* @__PURE__ */ l("div", { id: "dialog-portal-example", className: "settingsDialogPortal", ref: c, children: /* @__PURE__ */ N(
|
|
1195
|
+
Dn,
|
|
1151
1196
|
{
|
|
1152
1197
|
open: n,
|
|
1153
1198
|
onClosed: () => {
|
|
1154
1199
|
t(!1);
|
|
1155
1200
|
},
|
|
1156
1201
|
children: [
|
|
1157
|
-
/* @__PURE__ */ l(
|
|
1158
|
-
/* @__PURE__ */ N(
|
|
1159
|
-
/* @__PURE__ */ l("h4", { className: "sectionLabel", children:
|
|
1160
|
-
/* @__PURE__ */ l(
|
|
1161
|
-
/* @__PURE__ */ l(
|
|
1162
|
-
/* @__PURE__ */ l("h4", { className: "sectionLabel", children:
|
|
1163
|
-
/* @__PURE__ */ l(
|
|
1202
|
+
/* @__PURE__ */ l(In, { children: u }),
|
|
1203
|
+
/* @__PURE__ */ N(xn, { children: [
|
|
1204
|
+
/* @__PURE__ */ l("h4", { className: "sectionLabel", children: m }),
|
|
1205
|
+
/* @__PURE__ */ l(ce, { className: "mapScenesContainer", children: /* @__PURE__ */ l(xr, { sceneModes: i }) }),
|
|
1206
|
+
/* @__PURE__ */ l(ce, { className: "baseMapsContainer", children: o && /* @__PURE__ */ N(te, { children: [
|
|
1207
|
+
/* @__PURE__ */ l("h4", { className: "sectionLabel", children: v }),
|
|
1208
|
+
/* @__PURE__ */ l(kr, { baseMaps: o })
|
|
1164
1209
|
] }) })
|
|
1165
1210
|
] })
|
|
1166
1211
|
]
|
|
@@ -1168,32 +1213,32 @@ const Je = "ic_settings_24px", Ar = (e) => {
|
|
|
1168
1213
|
) })
|
|
1169
1214
|
] });
|
|
1170
1215
|
};
|
|
1171
|
-
const
|
|
1216
|
+
const Rr = /* @__PURE__ */ l("svg", { xmlns: "http://www.w3.org/2000/svg", enableBackground: "new 0 0 24 24", height: "24", width: "24", viewBox: "0 0 612 612", children: /* @__PURE__ */ N("g", { xmlns: "http://www.w3.org/2000/svg", children: [
|
|
1172
1217
|
/* @__PURE__ */ l("path", { d: "M322.4,173.9l-129,16.2l-4.6,21.4l25.3,4.7c16.5,3.9,19.8,9.9,16.2,26.4l-41.5,195.3c-10.9,50.5,5.9,74.3,45.5,74.3 c30.7,0,66.3-14.2,82.5-33.6l4.9-23.4c-11.3,9.9-27.7,13.9-38.6,13.9c-15.5,0-21.1-10.9-17.1-30L322.4,173.9z" }),
|
|
1173
1218
|
/* @__PURE__ */ l("circle", { cx: "270.1", cy: "56.3", r: "56.3" })
|
|
1174
|
-
] }) }),
|
|
1219
|
+
] }) }), Nr = ({ onClick: e }) => /* @__PURE__ */ l(ce, { onClick: e, className: "mapLegendToggleContainer", children: /* @__PURE__ */ l(Ie, { icon: Rr, className: "mapLegendIcon" }) }), Br = ({ legend: { legendImg: e, legendDoc: n, layer: t }, docText: i, imgText: o }) => {
|
|
1175
1220
|
const r = me(() => {
|
|
1176
1221
|
window.open(e, "_blank");
|
|
1177
1222
|
}, [e]);
|
|
1178
1223
|
me(() => {
|
|
1179
1224
|
window.open(n, "_blank");
|
|
1180
1225
|
}, [n]);
|
|
1181
|
-
const
|
|
1182
|
-
const
|
|
1183
|
-
return (t ?? "").length > 15 ? /* @__PURE__ */ l(
|
|
1226
|
+
const c = me(() => {
|
|
1227
|
+
const v = /* @__PURE__ */ l(ce, { className: "layerNameContainer", children: /* @__PURE__ */ l("h3", { style: { maxWidth: `${15}ch` }, className: "layerName", children: t }) });
|
|
1228
|
+
return (t ?? "").length > 15 ? /* @__PURE__ */ l(nt, { content: t, children: v }) : v;
|
|
1184
1229
|
}, [t]), u = me(() => [
|
|
1185
1230
|
typeof e == "string" && /* @__PURE__ */ l("a", { className: "legendAction", href: e, target: "_blank", rel: "noreferrer", children: o }),
|
|
1186
1231
|
typeof n == "string" && /* @__PURE__ */ l("a", { className: "legendAction", href: n, target: "_blank", rel: "noreferrer", children: i })
|
|
1187
1232
|
], [e, o, n, i]);
|
|
1188
|
-
return /* @__PURE__ */ N(
|
|
1189
|
-
|
|
1233
|
+
return /* @__PURE__ */ N(ce, { className: "mapLegend", children: [
|
|
1234
|
+
c(),
|
|
1190
1235
|
/* @__PURE__ */ l("img", { alt: "Map Legend", className: "legendImg", src: e, onClick: r }),
|
|
1191
|
-
/* @__PURE__ */ l(
|
|
1236
|
+
/* @__PURE__ */ l(ce, { className: "legendActionsContainer", children: u() })
|
|
1192
1237
|
] });
|
|
1193
|
-
},
|
|
1194
|
-
const o = me(() => /* @__PURE__ */ l(
|
|
1195
|
-
return /* @__PURE__ */ l(
|
|
1196
|
-
},
|
|
1238
|
+
}, Fr = ({ legends: e, actionsTexts: { docText: n, imgText: t }, noLegendsText: i }) => {
|
|
1239
|
+
const o = me(() => /* @__PURE__ */ l(ce, { className: "noLegendsContainer", children: /* @__PURE__ */ l("h2", { className: "noLegendsMsg", children: i }) }), [i]), r = me(() => e.length ? e.map((c, u) => /* @__PURE__ */ l(Br, { legend: c, docText: n, imgText: t }, `${c.layer}_${u}`)) : o(), [e]);
|
|
1240
|
+
return /* @__PURE__ */ l(ce, { className: "mapLegendsList", children: r() });
|
|
1241
|
+
}, Hr = ({
|
|
1197
1242
|
isOpen: e,
|
|
1198
1243
|
toggleSidebar: n,
|
|
1199
1244
|
title: t = "Map Legends",
|
|
@@ -1201,117 +1246,117 @@ const Ir = /* @__PURE__ */ l("svg", { xmlns: "http://www.w3.org/2000/svg", enabl
|
|
|
1201
1246
|
actionsTexts: o = { docText: "Docs", imgText: "View Image" },
|
|
1202
1247
|
legends: r = []
|
|
1203
1248
|
}) => e ? /* @__PURE__ */ N(An, { className: "mapLegendSidebarContainer", modal: !1, dismissible: !0, open: e, children: [
|
|
1204
|
-
/* @__PURE__ */ l(
|
|
1205
|
-
/* @__PURE__ */ N(
|
|
1206
|
-
/* @__PURE__ */ l(
|
|
1207
|
-
/* @__PURE__ */ l(
|
|
1249
|
+
/* @__PURE__ */ l(kn, { className: "sidebarHeaderContainer", children: /* @__PURE__ */ l(On, { className: "sidebarTitle", children: t }) }),
|
|
1250
|
+
/* @__PURE__ */ N(Rn, { className: "sidebarContent", children: [
|
|
1251
|
+
/* @__PURE__ */ l(Ie, { onClick: n, className: "mapLegendCloseBtn", icon: { icon: "close", size: "small" } }),
|
|
1252
|
+
/* @__PURE__ */ l(Fr, { noLegendsText: i, legends: r, actionsTexts: o })
|
|
1208
1253
|
] })
|
|
1209
|
-
] }) : null,
|
|
1254
|
+
] }) : null, he = document.createElement("canvas"), re = he.getContext("2d"), St = (e) => {
|
|
1210
1255
|
const i = (e == null ? void 0 : e.data) ?? [];
|
|
1211
1256
|
for (let o = 3; o < i.length; o += 4)
|
|
1212
1257
|
if (i[o] < 255)
|
|
1213
1258
|
return !0;
|
|
1214
1259
|
return !1;
|
|
1215
|
-
},
|
|
1260
|
+
}, Gr = async (e, n) => (n && n.tileTransparencyCheckedCounter++, new Promise((t, i) => {
|
|
1216
1261
|
try {
|
|
1217
|
-
re == null || re.clearRect(0, 0,
|
|
1262
|
+
re == null || re.clearRect(0, 0, he.width, he.height);
|
|
1218
1263
|
let o;
|
|
1219
1264
|
if (e instanceof HTMLImageElement)
|
|
1220
1265
|
o = e;
|
|
1221
1266
|
else if (e instanceof ImageBitmap) {
|
|
1222
|
-
|
|
1223
|
-
const r = re == null ? void 0 : re.getImageData(0, 0,
|
|
1224
|
-
|
|
1267
|
+
he.width = e.width, he.height = e.height, re == null || re.drawImage(e, 0, 0);
|
|
1268
|
+
const r = re == null ? void 0 : re.getImageData(0, 0, he.width, he.height), c = St(r);
|
|
1269
|
+
c && n && (n.tileTransparencyCheckedCounter = n.maxTilesForTransparencyCheck), t(c);
|
|
1225
1270
|
return;
|
|
1226
1271
|
} else
|
|
1227
1272
|
o = new Image(), o.crossOrigin = "anonymous", o.src = e;
|
|
1228
1273
|
o.onload = () => {
|
|
1229
|
-
|
|
1230
|
-
const r = re == null ? void 0 : re.getImageData(0, 0,
|
|
1231
|
-
|
|
1274
|
+
he.width = o.width, he.height = o.height, re == null || re.drawImage(o, 0, 0);
|
|
1275
|
+
const r = re == null ? void 0 : re.getImageData(0, 0, he.width, he.height);
|
|
1276
|
+
St(r) ? (n && (n.tileTransparencyCheckedCounter = n.maxTilesForTransparencyCheck), t(!0)) : t(!1);
|
|
1232
1277
|
};
|
|
1233
1278
|
} catch (o) {
|
|
1234
1279
|
console.error("Could not determine image transparency. Error => ", o), i(o);
|
|
1235
1280
|
}
|
|
1236
|
-
})),
|
|
1237
|
-
const { west: t, east: i, north: o, south: r } = e, { west:
|
|
1238
|
-
return t >=
|
|
1239
|
-
},
|
|
1240
|
-
function
|
|
1281
|
+
})), He = (e, n) => {
|
|
1282
|
+
const { west: t, east: i, north: o, south: r } = e, { west: c, east: u, north: m, south: v } = n;
|
|
1283
|
+
return t >= c && i <= u && o <= m && r >= v;
|
|
1284
|
+
}, Ke = 3, We = "hasTransparency";
|
|
1285
|
+
function mt(e, n, t, i, o) {
|
|
1241
1286
|
return setTimeout(() => {
|
|
1242
1287
|
var u;
|
|
1243
1288
|
const r = (u = this.layerListInstance.find(
|
|
1244
1289
|
/* eslint-disable */
|
|
1245
|
-
(
|
|
1246
|
-
var
|
|
1247
|
-
return ((
|
|
1290
|
+
(m) => {
|
|
1291
|
+
var v, E;
|
|
1292
|
+
return ((v = m._imageryProvider._resource) == null ? void 0 : v._url) === ((E = this._resource) == null ? void 0 : E._url);
|
|
1248
1293
|
}
|
|
1249
1294
|
/* eslint-enable */
|
|
1250
|
-
)) == null ? void 0 : u.meta,
|
|
1251
|
-
this.tileTransparencyCheckedCounter <
|
|
1252
|
-
var
|
|
1253
|
-
(
|
|
1254
|
-
{ [
|
|
1295
|
+
)) == null ? void 0 : u.meta, c = Z(r, We) === !0;
|
|
1296
|
+
this.tileTransparencyCheckedCounter < Ke && !c && Gr(o == null ? void 0 : o.url, this).then((m) => {
|
|
1297
|
+
var v;
|
|
1298
|
+
(v = this.mapViewer.layersManager) == null || v.addMetaToLayer(
|
|
1299
|
+
{ [We]: m },
|
|
1255
1300
|
/* eslint-disable */
|
|
1256
|
-
(
|
|
1301
|
+
(E) => E._imageryProvider._resource._url === this._resource._url
|
|
1257
1302
|
);
|
|
1258
1303
|
});
|
|
1259
1304
|
}, 0), e(n, t, i, o);
|
|
1260
1305
|
}
|
|
1261
|
-
class
|
|
1306
|
+
class on extends ct {
|
|
1262
1307
|
constructor(t, i) {
|
|
1263
1308
|
var o;
|
|
1264
1309
|
super(t);
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1310
|
+
X(this, "layerListInstance");
|
|
1311
|
+
X(this, "mapViewer");
|
|
1312
|
+
X(this, "maxTilesForTransparencyCheck", Ke);
|
|
1313
|
+
X(this, "tileTransparencyCheckedCounter", 0);
|
|
1269
1314
|
this.layerListInstance = (o = i.layersManager) == null ? void 0 : o.layerList, this.mapViewer = i;
|
|
1270
1315
|
}
|
|
1271
1316
|
requestImage(t, i, o, r) {
|
|
1272
|
-
return
|
|
1317
|
+
return mt.call(this, super.requestImage.bind(this), t, i, o, r);
|
|
1273
1318
|
}
|
|
1274
1319
|
}
|
|
1275
|
-
class
|
|
1320
|
+
class sn extends dt {
|
|
1276
1321
|
constructor(t, i) {
|
|
1277
1322
|
var o;
|
|
1278
1323
|
super(t);
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1324
|
+
X(this, "layerListInstance");
|
|
1325
|
+
X(this, "mapViewer");
|
|
1326
|
+
X(this, "maxTilesForTransparencyCheck", Ke);
|
|
1327
|
+
X(this, "tileTransparencyCheckedCounter", 0);
|
|
1283
1328
|
this.layerListInstance = (o = i.layersManager) == null ? void 0 : o.layerList, this.mapViewer = i;
|
|
1284
1329
|
}
|
|
1285
1330
|
requestImage(t, i, o, r) {
|
|
1286
|
-
return
|
|
1331
|
+
return mt.call(this, super.requestImage.bind(this), t, i, o, r);
|
|
1287
1332
|
}
|
|
1288
1333
|
}
|
|
1289
|
-
class
|
|
1334
|
+
class an extends ut {
|
|
1290
1335
|
constructor(t, i) {
|
|
1291
1336
|
var o;
|
|
1292
1337
|
super(t);
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1338
|
+
X(this, "layerListInstance");
|
|
1339
|
+
X(this, "mapViewer");
|
|
1340
|
+
X(this, "maxTilesForTransparencyCheck", Ke);
|
|
1341
|
+
X(this, "tileTransparencyCheckedCounter", 0);
|
|
1297
1342
|
this.layerListInstance = (o = i.layersManager) == null ? void 0 : o.layerList, this.mapViewer = i;
|
|
1298
1343
|
}
|
|
1299
1344
|
requestImage(t, i, o, r) {
|
|
1300
|
-
return
|
|
1345
|
+
return mt.call(this, super.requestImage.bind(this), t, i, o, r);
|
|
1301
1346
|
}
|
|
1302
1347
|
}
|
|
1303
|
-
const
|
|
1304
|
-
class
|
|
1348
|
+
const Vr = 1, zr = -1, Mt = "TRANSPARENT_BASE_LAYER";
|
|
1349
|
+
class $r {
|
|
1305
1350
|
constructor(n, t, i, o) {
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
this.mapViewer = n, this.layers = this.mapViewer.imageryLayers._layers, this.legendsList = [], this.legendsExtractor = t, this.layerUpdated = new
|
|
1313
|
-
const
|
|
1314
|
-
|
|
1351
|
+
X(this, "mapViewer");
|
|
1352
|
+
X(this, "legendsList");
|
|
1353
|
+
X(this, "layerUpdated");
|
|
1354
|
+
X(this, "layers");
|
|
1355
|
+
X(this, "legendsExtractor");
|
|
1356
|
+
X(this, "layerManagerFootprintMetaFieldPath");
|
|
1357
|
+
this.mapViewer = n, this.layers = this.mapViewer.imageryLayers._layers, this.legendsList = [], this.legendsExtractor = t, this.layerUpdated = new bi(), this.layerManagerFootprintMetaFieldPath = o, i && this.layerUpdated.addEventListener(i, this), this.mapViewer.shouldOptimizedTileRequests && (this.layerUpdated.addEventListener((r) => {
|
|
1358
|
+
const c = Object.keys(r);
|
|
1359
|
+
c.length === 1 && c[0] === We && (this.markRelevantLayersForExtent(), this.hideNonRelevantLayers());
|
|
1315
1360
|
}), this.mapViewer.imageryLayers.layerRemoved.addEventListener(() => {
|
|
1316
1361
|
this.setLegends(), this.markRelevantLayersForExtent(), this.hideNonRelevantLayers();
|
|
1317
1362
|
}), this.mapViewer.imageryLayers.layerMoved.addEventListener(() => {
|
|
@@ -1336,24 +1381,24 @@ class Hr {
|
|
|
1336
1381
|
setBaseMapLayers(n) {
|
|
1337
1382
|
n.baseRasteLayers.sort((i, o) => i.zIndex - o.zIndex).forEach((i, o) => {
|
|
1338
1383
|
this.addRasterLayer(i, o, n.id);
|
|
1339
|
-
}), this.mapViewer.shouldOptimizedTileRequests && (this.removeLayer(
|
|
1384
|
+
}), this.mapViewer.shouldOptimizedTileRequests && (this.removeLayer(Mt), this.addTransparentImageryProvider());
|
|
1340
1385
|
}
|
|
1341
1386
|
addRasterLayer(n, t, i) {
|
|
1342
1387
|
let o;
|
|
1343
1388
|
switch (n.type) {
|
|
1344
1389
|
case "XYZ_LAYER": {
|
|
1345
|
-
const r = n.options,
|
|
1346
|
-
o = this.mapViewer.imageryLayers.addImageryProvider(
|
|
1390
|
+
const r = n.options, c = this.mapViewer.shouldOptimizedTileRequests ? new on(r, this.mapViewer) : new ct(r);
|
|
1391
|
+
o = this.mapViewer.imageryLayers.addImageryProvider(c, t);
|
|
1347
1392
|
break;
|
|
1348
1393
|
}
|
|
1349
1394
|
case "WMS_LAYER": {
|
|
1350
|
-
const r = n.options,
|
|
1351
|
-
o = this.mapViewer.imageryLayers.addImageryProvider(
|
|
1395
|
+
const r = n.options, c = this.mapViewer.shouldOptimizedTileRequests ? new sn(r, this.mapViewer) : new dt(r);
|
|
1396
|
+
o = this.mapViewer.imageryLayers.addImageryProvider(c, t);
|
|
1352
1397
|
break;
|
|
1353
1398
|
}
|
|
1354
1399
|
case "WMTS_LAYER": {
|
|
1355
|
-
const r = n.options,
|
|
1356
|
-
o = this.mapViewer.imageryLayers.addImageryProvider(
|
|
1400
|
+
const r = n.options, c = this.mapViewer.shouldOptimizedTileRequests ? new an(r, this.mapViewer) : new ut(r);
|
|
1401
|
+
o = this.mapViewer.imageryLayers.addImageryProvider(c, t);
|
|
1357
1402
|
break;
|
|
1358
1403
|
}
|
|
1359
1404
|
}
|
|
@@ -1367,13 +1412,13 @@ class Hr {
|
|
|
1367
1412
|
t && this.mapViewer.imageryLayers.remove(t, !0);
|
|
1368
1413
|
}
|
|
1369
1414
|
removeBaseMapLayers() {
|
|
1370
|
-
this.layers.filter((t) => !!
|
|
1415
|
+
this.layers.filter((t) => !!Z(t.meta, "parentBasetMapId")).forEach((t) => {
|
|
1371
1416
|
this.mapViewer.imageryLayers.remove(t, !0);
|
|
1372
1417
|
});
|
|
1373
1418
|
}
|
|
1374
1419
|
// Remove all non base layers
|
|
1375
1420
|
removeNotBaseMapLayers() {
|
|
1376
|
-
this.layers.filter((t) => !
|
|
1421
|
+
this.layers.filter((t) => !Z(t.meta, "parentBasetMapId")).forEach((t) => {
|
|
1377
1422
|
this.mapViewer.imageryLayers.remove(t, !0);
|
|
1378
1423
|
});
|
|
1379
1424
|
}
|
|
@@ -1385,8 +1430,8 @@ class Hr {
|
|
|
1385
1430
|
this.updateLayersOrder(n, o, o + t);
|
|
1386
1431
|
}
|
|
1387
1432
|
lower(n, t = 1) {
|
|
1388
|
-
const i = this.findLayerById(n), o = (i == null ? void 0 : i.meta).zIndex, r = this.getBaseLayersCount(),
|
|
1389
|
-
if (
|
|
1433
|
+
const i = this.findLayerById(n), o = (i == null ? void 0 : i.meta).zIndex, r = this.getBaseLayersCount(), c = this.mapViewer.imageryLayers.indexOf(i);
|
|
1434
|
+
if (c - t <= r && (t = c - r), i)
|
|
1390
1435
|
for (let u = 0; u < t; u++)
|
|
1391
1436
|
this.mapViewer.imageryLayers.lower(i);
|
|
1392
1437
|
this.updateLayersOrder(n, o, o - t);
|
|
@@ -1407,7 +1452,7 @@ class Hr {
|
|
|
1407
1452
|
i !== void 0 && (i.show = t);
|
|
1408
1453
|
}
|
|
1409
1454
|
showAllNotBase(n) {
|
|
1410
|
-
this.layers.filter((i) => !
|
|
1455
|
+
this.layers.filter((i) => !Z(i.meta, "parentBasetMapId")).forEach((i) => {
|
|
1411
1456
|
var o;
|
|
1412
1457
|
this.show((o = i.meta) == null ? void 0 : o.id, n);
|
|
1413
1458
|
});
|
|
@@ -1420,37 +1465,37 @@ class Hr {
|
|
|
1420
1465
|
var o;
|
|
1421
1466
|
const t = this.mapViewer.camera.getPickRay(n);
|
|
1422
1467
|
let i;
|
|
1423
|
-
return t && (i = (o = this.mapViewer.imageryLayers.pickImageryLayers(t, this.mapViewer.scene)) == null ? void 0 : o.filter((r) => !
|
|
1468
|
+
return t && (i = (o = this.mapViewer.imageryLayers.pickImageryLayers(t, this.mapViewer.scene)) == null ? void 0 : o.filter((r) => !Z(r.meta, "parentBasetMapId"))), i;
|
|
1424
1469
|
}
|
|
1425
1470
|
findLayerByPOI(n, t, i = !0) {
|
|
1426
1471
|
if (this.layerManagerFootprintMetaFieldPath) {
|
|
1427
|
-
const o =
|
|
1428
|
-
return this.layers.filter((u) => !
|
|
1429
|
-
const
|
|
1430
|
-
return
|
|
1472
|
+
const o = Tr(this.mapViewer, n, t);
|
|
1473
|
+
return this.layers.filter((u) => !Z(u.meta, "parentBasetMapId")).filter((u) => {
|
|
1474
|
+
const m = Z(u.meta, this.layerManagerFootprintMetaFieldPath);
|
|
1475
|
+
return m !== void 0 ? Ai(o.geometry, {
|
|
1431
1476
|
type: "Feature",
|
|
1432
1477
|
properties: {},
|
|
1433
|
-
geometry:
|
|
1478
|
+
geometry: m
|
|
1434
1479
|
}) && (i ? u.show : !0) : (console.warn("[LayerManager] [findLayerByPOI] CesiumImageryLayer has no defined footprint", u.meta), !1);
|
|
1435
|
-
}).sort((u,
|
|
1436
|
-
var
|
|
1437
|
-
return ((
|
|
1480
|
+
}).sort((u, m) => {
|
|
1481
|
+
var v, E;
|
|
1482
|
+
return ((v = m.meta) == null ? void 0 : v.zIndex) - ((E = u.meta) == null ? void 0 : E.zIndex);
|
|
1438
1483
|
});
|
|
1439
1484
|
} else
|
|
1440
1485
|
return console.warn("[LayerManager] [findLayerByPOI]layerManagerFootprintMetaFieldPath is not defined"), [];
|
|
1441
1486
|
}
|
|
1442
1487
|
addTransparentImageryProvider() {
|
|
1443
1488
|
const n = this.mapViewer.imageryLayers.addImageryProvider(
|
|
1444
|
-
new
|
|
1489
|
+
new Ti({
|
|
1445
1490
|
url: "./assets/img/transparent-tile.png",
|
|
1446
1491
|
/* eslint-disable @typescript-eslint/no-magic-numbers */
|
|
1447
|
-
rectangle: new
|
|
1492
|
+
rectangle: new Pe(-3.141592653589793, -1.5707963267948966, 3.141592653589793, 1.5707963267948966)
|
|
1448
1493
|
/* eslint-enable @typescript-eslint/no-magic-numbers */
|
|
1449
1494
|
}),
|
|
1450
1495
|
0
|
|
1451
1496
|
);
|
|
1452
1497
|
n.meta = {
|
|
1453
|
-
id:
|
|
1498
|
+
id: Mt,
|
|
1454
1499
|
skipRelevancyCheck: !0,
|
|
1455
1500
|
parentBasetMapId: "TRANSPARENT_LAYER"
|
|
1456
1501
|
};
|
|
@@ -1459,18 +1504,18 @@ class Hr {
|
|
|
1459
1504
|
typeof this.legendsExtractor < "u" && (this.legendsList = this.legendsExtractor(this.layers));
|
|
1460
1505
|
}
|
|
1461
1506
|
getBaseLayersCount() {
|
|
1462
|
-
return this.layers.filter((t) => !!
|
|
1507
|
+
return this.layers.filter((t) => !!Z(t.meta, "parentBasetMapId")).length;
|
|
1463
1508
|
}
|
|
1464
1509
|
findLayerById(n) {
|
|
1465
1510
|
return this.layers.find((t) => t.meta !== void 0 ? t.meta.id === n : !1);
|
|
1466
1511
|
}
|
|
1467
1512
|
updateLayersOrder(n, t, i) {
|
|
1468
|
-
const o = t > i ?
|
|
1513
|
+
const o = t > i ? Vr : zr, r = t < i ? t : i, c = t < i ? i : t;
|
|
1469
1514
|
this.layers.forEach((u) => {
|
|
1470
|
-
var
|
|
1471
|
-
if (!
|
|
1472
|
-
const
|
|
1473
|
-
u.meta.zIndex =
|
|
1515
|
+
var v;
|
|
1516
|
+
if (!Z(u.meta, "parentBasetMapId")) {
|
|
1517
|
+
const E = (v = u.meta) == null ? void 0 : v.zIndex;
|
|
1518
|
+
u.meta.zIndex = E >= r && E <= c && E !== t ? E + o : E === t ? i : E;
|
|
1474
1519
|
}
|
|
1475
1520
|
});
|
|
1476
1521
|
}
|
|
@@ -1484,17 +1529,17 @@ class Hr {
|
|
|
1484
1529
|
try {
|
|
1485
1530
|
const i = this.mapViewer.camera.computeViewRectangle();
|
|
1486
1531
|
for (let o = this.layers.length - 1; o >= 0; o--) {
|
|
1487
|
-
const r = this.layers[o],
|
|
1532
|
+
const r = this.layers[o], c = !ot(i) && !ot(r.rectangle) && Pe.intersection(i, r.rectangle);
|
|
1488
1533
|
for (let u = this.layers.length - 1; u >= o; u--) {
|
|
1489
1534
|
if (((n = r.meta) == null ? void 0 : n.skipRelevancyCheck) === !0) {
|
|
1490
1535
|
r.meta = { ...r.meta, relevantToExtent: !0 };
|
|
1491
1536
|
continue;
|
|
1492
1537
|
}
|
|
1493
|
-
const
|
|
1494
|
-
if (r !==
|
|
1495
|
-
if (
|
|
1496
|
-
if (
|
|
1497
|
-
if (
|
|
1538
|
+
const m = this.layers[u], v = ((t = m.meta) == null ? void 0 : t[We]) === !0;
|
|
1539
|
+
if (r !== m)
|
|
1540
|
+
if (c instanceof Pe) {
|
|
1541
|
+
if (He(i, r.rectangle))
|
|
1542
|
+
if (He(i, m.rectangle) && !v) {
|
|
1498
1543
|
r.meta = {
|
|
1499
1544
|
...r.meta ?? {},
|
|
1500
1545
|
relevantToExtent: !1
|
|
@@ -1505,15 +1550,15 @@ class Hr {
|
|
|
1505
1550
|
...r.meta ?? {},
|
|
1506
1551
|
relevantToExtent: !0
|
|
1507
1552
|
};
|
|
1508
|
-
if (
|
|
1553
|
+
if (He(i, m.rectangle) && !v) {
|
|
1509
1554
|
r.meta = { ...r.meta ?? {}, relevantToExtent: !1 };
|
|
1510
1555
|
break;
|
|
1511
1556
|
}
|
|
1512
|
-
if (
|
|
1557
|
+
if (He(r.rectangle, m.rectangle)) {
|
|
1513
1558
|
if (r.meta = {
|
|
1514
1559
|
...r.meta ?? {},
|
|
1515
|
-
relevantToExtent:
|
|
1516
|
-
}, !
|
|
1560
|
+
relevantToExtent: v
|
|
1561
|
+
}, !v)
|
|
1517
1562
|
break;
|
|
1518
1563
|
} else
|
|
1519
1564
|
r.meta = { ...r.meta ?? {}, relevantToExtent: !0 };
|
|
@@ -1522,7 +1567,7 @@ class Hr {
|
|
|
1522
1567
|
else
|
|
1523
1568
|
o === this.layers.length - 1 && (r.meta = {
|
|
1524
1569
|
...r.meta ?? {},
|
|
1525
|
-
relevantToExtent:
|
|
1570
|
+
relevantToExtent: c instanceof Pe
|
|
1526
1571
|
});
|
|
1527
1572
|
}
|
|
1528
1573
|
}
|
|
@@ -1531,12 +1576,29 @@ class Hr {
|
|
|
1531
1576
|
}
|
|
1532
1577
|
}
|
|
1533
1578
|
}
|
|
1534
|
-
const
|
|
1535
|
-
|
|
1579
|
+
const Wr = (e) => {
|
|
1580
|
+
const n = le(), { enableCompass: t = !0, enableZoomControls: i = !1, lockCompassNavigation: o = !1, locale: r = { DIRECTION: "ltr" } } = e;
|
|
1581
|
+
return x(() => {
|
|
1582
|
+
if (typeof Z(n, "cesiumNavigation") > "u") {
|
|
1583
|
+
n.extend(ki, {
|
|
1584
|
+
enableCompass: t,
|
|
1585
|
+
enableZoomControls: i,
|
|
1586
|
+
enableDistanceLegend: !1
|
|
1587
|
+
}), n.cesiumNavigation.setNavigationLocked(o);
|
|
1588
|
+
const c = document.querySelector(".compass");
|
|
1589
|
+
c && r.DIRECTION && c.classList.add(r.DIRECTION);
|
|
1590
|
+
}
|
|
1591
|
+
return () => {
|
|
1592
|
+
var c;
|
|
1593
|
+
(c = n.cesiumNavigation) == null || c.destroy();
|
|
1594
|
+
};
|
|
1595
|
+
}, [n, t, i, r.DIRECTION, o]), null;
|
|
1596
|
+
}, Pt = 212, Dt = 260, Ur = 0;
|
|
1597
|
+
class Os extends _i {
|
|
1536
1598
|
constructor(t, i) {
|
|
1537
1599
|
super(t, i);
|
|
1538
|
-
|
|
1539
|
-
|
|
1600
|
+
X(this, "layersManager");
|
|
1601
|
+
X(this, "useOptimizedTileRequests");
|
|
1540
1602
|
}
|
|
1541
1603
|
get shouldOptimizedTileRequests() {
|
|
1542
1604
|
return this.useOptimizedTileRequests ?? !1;
|
|
@@ -1545,14 +1607,14 @@ class ms extends pi {
|
|
|
1545
1607
|
this.useOptimizedTileRequests = t;
|
|
1546
1608
|
}
|
|
1547
1609
|
}
|
|
1548
|
-
const
|
|
1549
|
-
const e =
|
|
1610
|
+
const ln = Oe(null), Kr = ln.Provider, le = () => {
|
|
1611
|
+
const e = Re(ln);
|
|
1550
1612
|
if (e === null)
|
|
1551
1613
|
throw new Error("map context is null, please check the provider");
|
|
1552
1614
|
return e;
|
|
1553
|
-
},
|
|
1554
|
-
var
|
|
1555
|
-
const n =
|
|
1615
|
+
}, Rs = (e) => {
|
|
1616
|
+
var Y, O, z, Q, ie, fe, de, se;
|
|
1617
|
+
const n = _e(null), [t, i] = I(), [o, r] = I(), [c, u] = I(), [m, v] = I(), [E, _] = I(), [w, P] = I(), [R, V] = I(), [q, H] = I(!1), [K, j] = I(), A = _e(), [$, k] = I(), [W, ne] = I([]), [s, a] = I(), [y, d] = I(!1), f = _e(), [h, C] = I(void 0), [g, b] = I(!1), [S, L] = I(), T = {
|
|
1556
1618
|
fullscreenButton: !0,
|
|
1557
1619
|
timeline: !1,
|
|
1558
1620
|
animation: !1,
|
|
@@ -1563,248 +1625,251 @@ const sn = Ie(null), Vr = sn.Provider, le = () => {
|
|
|
1563
1625
|
sceneModePicker: !1,
|
|
1564
1626
|
imageryProvider: !1,
|
|
1565
1627
|
...e
|
|
1566
|
-
},
|
|
1567
|
-
const ye = t.container,
|
|
1628
|
+
}, M = (B, F, ee, we, Le) => {
|
|
1629
|
+
const ye = t.container, xe = ye.clientWidth, gt = ye.clientHeight, ft = we + Le;
|
|
1568
1630
|
return {
|
|
1569
|
-
left: `${
|
|
1570
|
-
top: `${
|
|
1631
|
+
left: `${xe - B < ee ? B - (ee - (xe - B)) : B}px`,
|
|
1632
|
+
top: `${gt - F < ft ? F - (ft - (gt - F)) : F}px`
|
|
1571
1633
|
};
|
|
1572
|
-
},
|
|
1634
|
+
}, D = me((B) => {
|
|
1573
1635
|
if (n.current !== null) {
|
|
1574
|
-
const
|
|
1575
|
-
|
|
1636
|
+
const F = n.current.cesiumElement, ee = { x: B.offsetX, y: B.offsetY };
|
|
1637
|
+
d(!1), C(ee), L(rn(F, ee.x, ee.y)), d(!0), f.current = B;
|
|
1576
1638
|
}
|
|
1577
1639
|
}, [n]);
|
|
1578
|
-
|
|
1579
|
-
var
|
|
1640
|
+
x(() => {
|
|
1641
|
+
var B;
|
|
1580
1642
|
if (n.current !== null) {
|
|
1581
|
-
const
|
|
1582
|
-
e.imageryContextMenu && (
|
|
1643
|
+
const F = n.current.cesiumElement;
|
|
1644
|
+
e.imageryContextMenu && (F.scene.canvas.removeEventListener("contextmenu", D), F.scene.canvas.addEventListener("contextmenu", D));
|
|
1583
1645
|
}
|
|
1584
|
-
i((
|
|
1585
|
-
}, [n, e.imageryContextMenu]),
|
|
1586
|
-
var
|
|
1587
|
-
t && (t.shouldOptimizedTileRequests = e.useOptimizedTileRequests ?? !1, t.layersManager = new
|
|
1646
|
+
i((B = n.current) == null ? void 0 : B.cesiumElement);
|
|
1647
|
+
}, [n, e.imageryContextMenu]), x(() => {
|
|
1648
|
+
var B;
|
|
1649
|
+
t && (t.shouldOptimizedTileRequests = e.useOptimizedTileRequests ?? !1, t.layersManager = new $r(
|
|
1588
1650
|
t,
|
|
1589
|
-
(
|
|
1651
|
+
(B = e.legends) == null ? void 0 : B.mapLegendsExtractor,
|
|
1590
1652
|
() => {
|
|
1591
|
-
var
|
|
1592
|
-
|
|
1653
|
+
var F;
|
|
1654
|
+
ne((F = t.layersManager) == null ? void 0 : F.legendsList);
|
|
1593
1655
|
},
|
|
1594
1656
|
e.layerManagerFootprintMetaFieldPath
|
|
1595
1657
|
));
|
|
1596
|
-
}, [t]),
|
|
1658
|
+
}, [t]), x(() => {
|
|
1597
1659
|
t && (t.shouldOptimizedTileRequests = e.useOptimizedTileRequests ?? !1);
|
|
1598
|
-
}, [e.useOptimizedTileRequests, t]),
|
|
1599
|
-
|
|
1600
|
-
}, [e.sceneModes]),
|
|
1601
|
-
var
|
|
1602
|
-
|
|
1603
|
-
const
|
|
1604
|
-
|
|
1605
|
-
}, [e.baseMaps, t]),
|
|
1606
|
-
r(e.projection ??
|
|
1607
|
-
}, [e.projection]),
|
|
1608
|
-
|
|
1609
|
-
}, [e.locale]),
|
|
1660
|
+
}, [e.useOptimizedTileRequests, t]), x(() => {
|
|
1661
|
+
k(e.sceneModes ?? [oe.SCENE2D, oe.SCENE3D, oe.COLUMBUS_VIEW]);
|
|
1662
|
+
}, [e.sceneModes]), x(() => {
|
|
1663
|
+
var F, ee;
|
|
1664
|
+
a(e.baseMaps);
|
|
1665
|
+
const B = (F = e.baseMaps) == null ? void 0 : F.maps.find((we) => we.isCurrent);
|
|
1666
|
+
B && t && ((ee = t.layersManager) == null || ee.setBaseMapLayers(B));
|
|
1667
|
+
}, [e.baseMaps, t]), x(() => {
|
|
1668
|
+
r(e.projection ?? pe.WGS84);
|
|
1669
|
+
}, [e.projection]), x(() => {
|
|
1670
|
+
j(e.locale);
|
|
1671
|
+
}, [e.locale]), x(() => {
|
|
1610
1672
|
u(e.showMousePosition ?? !0);
|
|
1611
|
-
}, [e.showMousePosition]),
|
|
1612
|
-
|
|
1613
|
-
}, [e.showZoomLevel]),
|
|
1614
|
-
|
|
1615
|
-
}, [e.showScale]),
|
|
1616
|
-
P(e.
|
|
1617
|
-
}, [e.
|
|
1618
|
-
|
|
1673
|
+
}, [e.showMousePosition]), x(() => {
|
|
1674
|
+
v(e.showZoomLevel ?? !0);
|
|
1675
|
+
}, [e.showZoomLevel]), x(() => {
|
|
1676
|
+
_(e.showScale ?? !0);
|
|
1677
|
+
}, [e.showScale]), x(() => {
|
|
1678
|
+
P(e.showCompass ?? !0);
|
|
1679
|
+
}, [e.showCompass]), x(() => {
|
|
1680
|
+
V(e.showLoadingProgress ?? !0);
|
|
1681
|
+
}, [e.showLoadingProgress]), x(() => {
|
|
1682
|
+
const B = () => {
|
|
1619
1683
|
if (t === void 0)
|
|
1620
1684
|
return {
|
|
1621
1685
|
longitude: 0,
|
|
1622
1686
|
latitude: 0,
|
|
1623
1687
|
height: 0
|
|
1624
1688
|
};
|
|
1625
|
-
const
|
|
1626
|
-
const
|
|
1689
|
+
const F = () => {
|
|
1690
|
+
const ee = t.camera.positionCartographic;
|
|
1627
1691
|
return {
|
|
1628
|
-
longitude:
|
|
1629
|
-
latitude:
|
|
1630
|
-
height:
|
|
1692
|
+
longitude: Fe(ee.longitude),
|
|
1693
|
+
latitude: Fe(ee.latitude),
|
|
1694
|
+
height: ee.height
|
|
1631
1695
|
};
|
|
1632
1696
|
};
|
|
1633
|
-
if (t.scene.mode ===
|
|
1634
|
-
const
|
|
1697
|
+
if (t.scene.mode === Te.SCENE3D) {
|
|
1698
|
+
const ee = new Ce(
|
|
1635
1699
|
// eslint-disable-next-line @typescript-eslint/no-magic-numbers
|
|
1636
1700
|
t.container.clientWidth / 2,
|
|
1637
1701
|
// eslint-disable-next-line @typescript-eslint/no-magic-numbers
|
|
1638
1702
|
t.container.clientHeight / 2
|
|
1639
|
-
),
|
|
1640
|
-
if (!
|
|
1703
|
+
), we = t.scene.camera.getPickRay(ee), Le = t.scene.globe.pick(we, t.scene);
|
|
1704
|
+
if (!Le)
|
|
1641
1705
|
return {
|
|
1642
1706
|
longitude: 0,
|
|
1643
1707
|
latitude: 0,
|
|
1644
1708
|
height: 0
|
|
1645
1709
|
};
|
|
1646
|
-
const ye = t.scene.globe.ellipsoid.cartesianToCartographic(
|
|
1710
|
+
const ye = t.scene.globe.ellipsoid.cartesianToCartographic(Le);
|
|
1647
1711
|
return ye !== void 0 ? {
|
|
1648
|
-
longitude:
|
|
1649
|
-
latitude:
|
|
1712
|
+
longitude: Fe(ye.longitude),
|
|
1713
|
+
latitude: Fe(ye.latitude),
|
|
1650
1714
|
height: t.scene.camera.positionCartographic.height
|
|
1651
|
-
} :
|
|
1715
|
+
} : F();
|
|
1652
1716
|
} else
|
|
1653
|
-
return
|
|
1717
|
+
return F();
|
|
1654
1718
|
};
|
|
1655
1719
|
t && (t.camera.moveEnd.addEventListener(() => {
|
|
1656
|
-
if (t.scene.mode !==
|
|
1657
|
-
const
|
|
1658
|
-
position:
|
|
1659
|
-
direction:
|
|
1660
|
-
up:
|
|
1661
|
-
right:
|
|
1662
|
-
transform:
|
|
1663
|
-
frustum:
|
|
1720
|
+
if (t.scene.mode !== Te.MORPHING) {
|
|
1721
|
+
const F = t.camera, ee = {
|
|
1722
|
+
position: B(),
|
|
1723
|
+
direction: F.direction.clone(),
|
|
1724
|
+
up: F.up.clone(),
|
|
1725
|
+
right: F.right.clone(),
|
|
1726
|
+
transform: F.transform.clone(),
|
|
1727
|
+
frustum: F.frustum.clone()
|
|
1664
1728
|
};
|
|
1665
|
-
|
|
1729
|
+
A.current = ee;
|
|
1666
1730
|
}
|
|
1667
|
-
}),
|
|
1668
|
-
t.scene.globe.tilesLoaded === !0 ?
|
|
1731
|
+
}), R && t.scene.globe.tileLoadProgressEvent.addEventListener(function() {
|
|
1732
|
+
t.scene.globe.tilesLoaded === !0 ? H(!1) : H(!0);
|
|
1669
1733
|
}));
|
|
1670
|
-
}, [t]),
|
|
1671
|
-
const
|
|
1672
|
-
if (t &&
|
|
1673
|
-
const
|
|
1734
|
+
}, [t]), x(() => {
|
|
1735
|
+
const B = () => {
|
|
1736
|
+
if (t && A.current) {
|
|
1737
|
+
const F = A.current;
|
|
1674
1738
|
t.camera.flyTo({
|
|
1675
|
-
destination:
|
|
1739
|
+
destination: ve.fromDegrees(F.position.longitude, F.position.latitude, F.position.height),
|
|
1676
1740
|
duration: 0
|
|
1677
1741
|
});
|
|
1678
1742
|
}
|
|
1679
1743
|
};
|
|
1680
|
-
return t && t.scene.morphComplete.addEventListener(
|
|
1744
|
+
return t && t.scene.morphComplete.addEventListener(B), () => {
|
|
1681
1745
|
if (t)
|
|
1682
1746
|
try {
|
|
1683
|
-
t.scene.morphComplete.removeEventListener(
|
|
1747
|
+
t.scene.morphComplete.removeEventListener(B);
|
|
1684
1748
|
} catch {
|
|
1685
1749
|
console.error("morphCompleteHandler event not cleaned");
|
|
1686
1750
|
}
|
|
1687
1751
|
};
|
|
1688
|
-
}, [t]),
|
|
1689
|
-
const
|
|
1690
|
-
t &&
|
|
1691
|
-
destination:
|
|
1752
|
+
}, [t]), x(() => {
|
|
1753
|
+
const B = e.zoom, F = e.center;
|
|
1754
|
+
t && $e(B) && Ii(F) && t.camera.flyTo({
|
|
1755
|
+
destination: ve.fromDegrees(F[0], F[1], br(B)),
|
|
1692
1756
|
duration: 0
|
|
1693
1757
|
});
|
|
1694
1758
|
}, [e.zoom, e.center, t]);
|
|
1695
|
-
const
|
|
1759
|
+
const U = me(() => t && ei(
|
|
1696
1760
|
/* @__PURE__ */ N(te, { children: [
|
|
1697
|
-
|
|
1698
|
-
/* @__PURE__ */ N(
|
|
1699
|
-
/* @__PURE__ */ l(
|
|
1700
|
-
/* @__PURE__ */ l(
|
|
1761
|
+
R === !0 ? q && /* @__PURE__ */ l(Nn, { style: { position: "absolute", top: 0, height: "10px", zIndex: 4 } }) : /* @__PURE__ */ l(te, {}),
|
|
1762
|
+
/* @__PURE__ */ N(ce, { className: "sideToolsContainer", children: [
|
|
1763
|
+
/* @__PURE__ */ l(Or, { sceneModes: $, baseMaps: s, locale: K }),
|
|
1764
|
+
/* @__PURE__ */ l(Nr, { onClick: () => b(!g) })
|
|
1701
1765
|
] }),
|
|
1702
|
-
/* @__PURE__ */ N(
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1766
|
+
/* @__PURE__ */ N(ce, { className: "toolsContainer", children: [
|
|
1767
|
+
c === !0 ? /* @__PURE__ */ l(Lr, { projection: o }) : /* @__PURE__ */ l(te, {}),
|
|
1768
|
+
m === !0 ? /* @__PURE__ */ l(Dr, { locale: K, valueBy: "RENDERED_TILES" }) : /* @__PURE__ */ l(te, {}),
|
|
1769
|
+
E === !0 ? /* @__PURE__ */ l(Mr, { locale: K }) : /* @__PURE__ */ l(te, {}),
|
|
1770
|
+
w === !0 ? /* @__PURE__ */ l(Wr, { locale: K }) : /* @__PURE__ */ l(te, {})
|
|
1706
1771
|
] })
|
|
1707
1772
|
] }),
|
|
1708
1773
|
document.querySelector(".cesium-viewer")
|
|
1709
|
-
), [
|
|
1710
|
-
return /* @__PURE__ */ l(
|
|
1774
|
+
), [s, K, t, o, $, c, E, g, q]);
|
|
1775
|
+
return /* @__PURE__ */ l(ti, { className: "viewer", full: !0, ref: n, ...T, children: /* @__PURE__ */ N(Kr, { value: t, children: [
|
|
1711
1776
|
/* @__PURE__ */ l(
|
|
1712
|
-
|
|
1777
|
+
Hr,
|
|
1713
1778
|
{
|
|
1714
|
-
title: (
|
|
1715
|
-
isOpen:
|
|
1716
|
-
toggleSidebar: () =>
|
|
1717
|
-
noLegendsText: (
|
|
1718
|
-
legends: ((
|
|
1719
|
-
actionsTexts: (
|
|
1779
|
+
title: (Y = e.legends) == null ? void 0 : Y.title,
|
|
1780
|
+
isOpen: g,
|
|
1781
|
+
toggleSidebar: () => b(!g),
|
|
1782
|
+
noLegendsText: (O = e.legends) == null ? void 0 : O.emptyText,
|
|
1783
|
+
legends: ((z = e.legends) == null ? void 0 : z.legendsList) ?? W,
|
|
1784
|
+
actionsTexts: (Q = e.legends) == null ? void 0 : Q.actionsTexts
|
|
1720
1785
|
}
|
|
1721
1786
|
),
|
|
1722
1787
|
e.children,
|
|
1723
|
-
|
|
1724
|
-
e.imageryContextMenu &&
|
|
1725
|
-
data: (
|
|
1788
|
+
U(),
|
|
1789
|
+
e.imageryContextMenu && y && h && S && Ee.cloneElement(e.imageryContextMenu, {
|
|
1790
|
+
data: (ie = t == null ? void 0 : t.layersManager) == null ? void 0 : ie.findLayerByPOI(h.x, h.y, !1),
|
|
1726
1791
|
position: {
|
|
1727
|
-
x:
|
|
1728
|
-
y:
|
|
1792
|
+
x: h.x,
|
|
1793
|
+
y: h.y
|
|
1729
1794
|
},
|
|
1730
|
-
coordinates:
|
|
1731
|
-
style:
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
((
|
|
1735
|
-
((
|
|
1736
|
-
((
|
|
1795
|
+
coordinates: S,
|
|
1796
|
+
style: M(
|
|
1797
|
+
h.x,
|
|
1798
|
+
h.y,
|
|
1799
|
+
((fe = e.imageryContextMenuSize) == null ? void 0 : fe.width) ?? Dt,
|
|
1800
|
+
((de = e.imageryContextMenuSize) == null ? void 0 : de.height) ?? Pt,
|
|
1801
|
+
((se = e.imageryContextMenuSize) == null ? void 0 : se.dynamicHeightIncrement) ?? Ur
|
|
1737
1802
|
),
|
|
1738
1803
|
size: e.imageryContextMenuSize ?? {
|
|
1739
|
-
height:
|
|
1740
|
-
width:
|
|
1804
|
+
height: Pt,
|
|
1805
|
+
width: Dt
|
|
1741
1806
|
},
|
|
1742
1807
|
handleClose: () => {
|
|
1743
|
-
|
|
1808
|
+
d(!y);
|
|
1744
1809
|
},
|
|
1745
|
-
contextEvt:
|
|
1810
|
+
contextEvt: f.current
|
|
1746
1811
|
})
|
|
1747
1812
|
] }) });
|
|
1748
|
-
},
|
|
1813
|
+
}, jr = 0, Ns = (e) => {
|
|
1749
1814
|
const n = le();
|
|
1750
1815
|
return /* @__PURE__ */ l(
|
|
1751
|
-
|
|
1816
|
+
ni,
|
|
1752
1817
|
{
|
|
1753
1818
|
...e,
|
|
1754
1819
|
onReady: (t) => {
|
|
1755
1820
|
e.isZoomTo === !0 && n.zoomTo(t);
|
|
1756
1821
|
const i = n.scene;
|
|
1757
1822
|
i.globe.depthTestAgainstTerrain = !0;
|
|
1758
|
-
const o =
|
|
1823
|
+
const o = Be.fromCartesian(t.boundingSphere.center), r = e.heightFromGround ?? jr;
|
|
1759
1824
|
if (r) {
|
|
1760
|
-
const
|
|
1761
|
-
t.modelMatrix =
|
|
1825
|
+
const c = ve.fromRadians(o.longitude, o.latitude, o.height), u = ve.fromRadians(o.longitude, o.latitude, o.height + r), m = ve.subtract(u, c, new ve());
|
|
1826
|
+
t.modelMatrix = Li.fromTranslation(m);
|
|
1762
1827
|
}
|
|
1763
1828
|
}
|
|
1764
1829
|
}
|
|
1765
1830
|
);
|
|
1766
|
-
},
|
|
1767
|
-
Math.abs(e[0])
|
|
1768
|
-
},
|
|
1831
|
+
}, Ge = 180, It = 1e-3, xt = (e) => Math.abs(e) / e, At = (e) => {
|
|
1832
|
+
Ge - Math.abs(e[0]) < It && (e[0] = xt(e[0]) * (Ge - 1)), Ge / 2 - Math.abs(e[1]) < It && (e[1] = xt(e[1]) * (Ge / 2 - 1));
|
|
1833
|
+
}, kt = (e) => {
|
|
1769
1834
|
switch (e.type) {
|
|
1770
1835
|
case "LineString":
|
|
1771
1836
|
e.coordinates.forEach((n) => {
|
|
1772
|
-
|
|
1837
|
+
At(n);
|
|
1773
1838
|
});
|
|
1774
1839
|
break;
|
|
1775
1840
|
case "Polygon":
|
|
1776
1841
|
e.coordinates.forEach((n) => {
|
|
1777
1842
|
n.forEach((t) => {
|
|
1778
|
-
|
|
1843
|
+
At(t);
|
|
1779
1844
|
});
|
|
1780
1845
|
});
|
|
1781
1846
|
break;
|
|
1782
1847
|
}
|
|
1783
|
-
},
|
|
1784
|
-
const { data: n, ...t } = e;
|
|
1785
|
-
return
|
|
1786
|
-
|
|
1787
|
-
}) :
|
|
1788
|
-
},
|
|
1848
|
+
}, Bs = (e) => {
|
|
1849
|
+
const { data: n, ...t } = e, i = xi(n);
|
|
1850
|
+
return i && (typeof i.features < "u" ? i.features.forEach((o) => {
|
|
1851
|
+
kt(o.geometry);
|
|
1852
|
+
}) : kt(i)), /* @__PURE__ */ l(ii, { data: i, ...t });
|
|
1853
|
+
}, je = (e) => {
|
|
1789
1854
|
const { meta: n, ...t } = e, i = le();
|
|
1790
|
-
return
|
|
1855
|
+
return hn(() => {
|
|
1791
1856
|
var o;
|
|
1792
1857
|
(o = i.layersManager) == null || o.addMetaToLayer(n, n.searchLayerPredicate);
|
|
1793
|
-
}, [n, i]), /* @__PURE__ */ l(
|
|
1794
|
-
},
|
|
1795
|
-
const { options: n, ...t } = e, i = le(), o = i.shouldOptimizedTileRequests ? new
|
|
1796
|
-
return /* @__PURE__ */ l(
|
|
1797
|
-
},
|
|
1798
|
-
const { options: n, ...t } = e, i = le(), o = i.shouldOptimizedTileRequests ? new
|
|
1799
|
-
return /* @__PURE__ */ l(
|
|
1800
|
-
},
|
|
1801
|
-
const { options: n, ...t } = e, i = le(), o = i.shouldOptimizedTileRequests ? new
|
|
1802
|
-
return /* @__PURE__ */ l(
|
|
1803
|
-
},
|
|
1858
|
+
}, [n, i]), /* @__PURE__ */ l(ri, { ...t });
|
|
1859
|
+
}, Fs = (e) => {
|
|
1860
|
+
const { options: n, ...t } = e, i = le(), o = i.shouldOptimizedTileRequests ? new sn(n, i) : new dt(n);
|
|
1861
|
+
return /* @__PURE__ */ l(je, { ...t, imageryProvider: o });
|
|
1862
|
+
}, Hs = (e) => {
|
|
1863
|
+
const { options: n, ...t } = e, i = le(), o = i.shouldOptimizedTileRequests ? new an(n, i) : new ut(n);
|
|
1864
|
+
return /* @__PURE__ */ l(je, { ...t, imageryProvider: o });
|
|
1865
|
+
}, Gs = (e) => {
|
|
1866
|
+
const { options: n, ...t } = e, i = le(), o = i.shouldOptimizedTileRequests ? new on(n, i) : new ct(n);
|
|
1867
|
+
return /* @__PURE__ */ l(je, { ...t, imageryProvider: o });
|
|
1868
|
+
}, Vs = (e) => {
|
|
1804
1869
|
const { options: n, ...t } = e;
|
|
1805
|
-
return /* @__PURE__ */ l(
|
|
1806
|
-
},
|
|
1807
|
-
var
|
|
1870
|
+
return /* @__PURE__ */ l(je, { ...t, imageryProvider: new Si(n) });
|
|
1871
|
+
}, qr = (e) => /* @__PURE__ */ l(oi, { ...e }), zs = (e) => /* @__PURE__ */ l(Wt, { ...e }), Yr = (e) => /* @__PURE__ */ l(Wt, { ...e }), Xr = (e) => /* @__PURE__ */ l(si, { ...e }), Zr = (e) => /* @__PURE__ */ l(ai, { ...e }), Jr = (e) => /* @__PURE__ */ l(li, { ...e }), Qr = (e) => /* @__PURE__ */ l(ci, { ...e });
|
|
1872
|
+
var be = function() {
|
|
1808
1873
|
var e = p.Ellipsoid.WGS84, n, t = p.Material.fromType(p.Material.ColorType);
|
|
1809
1874
|
function i(s, a = new p.Color(1, 1, 0, 0.5), y = new p.Color(1, 1, 1, 1)) {
|
|
1810
1875
|
this._scene = s.scene, t.uniforms.color = a, n = y, this._tooltip = {
|
|
@@ -1816,27 +1881,27 @@ var Ce = function() {
|
|
|
1816
1881
|
}
|
|
1817
1882
|
i.prototype.initialiseHandlers = function() {
|
|
1818
1883
|
var s = this._scene, a = this, y = new p.ScreenSpaceEventHandler(s.canvas);
|
|
1819
|
-
function
|
|
1884
|
+
function d(h, C) {
|
|
1820
1885
|
if (a._handlersMuted != !0) {
|
|
1821
|
-
var g = s.pick(
|
|
1822
|
-
g && g.primitive && g.primitive[
|
|
1886
|
+
var g = s.pick(C);
|
|
1887
|
+
g && g.primitive && g.primitive[h] && g.primitive[h](C);
|
|
1823
1888
|
}
|
|
1824
1889
|
}
|
|
1825
|
-
y.setInputAction(function(
|
|
1826
|
-
|
|
1827
|
-
}, p.ScreenSpaceEventType.LEFT_CLICK), y.setInputAction(function(
|
|
1828
|
-
|
|
1890
|
+
y.setInputAction(function(h) {
|
|
1891
|
+
d("leftClick", h.position);
|
|
1892
|
+
}, p.ScreenSpaceEventType.LEFT_CLICK), y.setInputAction(function(h) {
|
|
1893
|
+
d("leftDoubleClick", h.position);
|
|
1829
1894
|
}, p.ScreenSpaceEventType.LEFT_DOUBLE_CLICK);
|
|
1830
1895
|
var f;
|
|
1831
|
-
y.setInputAction(function(
|
|
1896
|
+
y.setInputAction(function(h) {
|
|
1832
1897
|
if (a._handlersMuted != !0) {
|
|
1833
|
-
var
|
|
1834
|
-
f && (!
|
|
1898
|
+
var C = s.pick(h.endPosition);
|
|
1899
|
+
f && (!C || f != C.primitive) && (!(f.isDestroyed && f.isDestroyed()) && f.mouseOut(h.endPosition), f = null), C && C.primitive && (C = C.primitive, C.mouseOut && (f = C), C.mouseMove && C.mouseMove(h.endPosition));
|
|
1835
1900
|
}
|
|
1836
|
-
}, p.ScreenSpaceEventType.MOUSE_MOVE), y.setInputAction(function(
|
|
1837
|
-
|
|
1838
|
-
}, p.ScreenSpaceEventType.LEFT_UP), y.setInputAction(function(
|
|
1839
|
-
|
|
1901
|
+
}, p.ScreenSpaceEventType.MOUSE_MOVE), y.setInputAction(function(h) {
|
|
1902
|
+
d("leftUp", h.position);
|
|
1903
|
+
}, p.ScreenSpaceEventType.LEFT_UP), y.setInputAction(function(h) {
|
|
1904
|
+
d("leftDown", h.position);
|
|
1840
1905
|
}, p.ScreenSpaceEventType.LEFT_DOWN);
|
|
1841
1906
|
}, i.prototype.setListener = function(s, a, y) {
|
|
1842
1907
|
s[a] = y;
|
|
@@ -1844,11 +1909,11 @@ var Ce = function() {
|
|
|
1844
1909
|
this._handlersMuted = s;
|
|
1845
1910
|
}, i.prototype.registerEditableShape = function(s) {
|
|
1846
1911
|
var a = this;
|
|
1847
|
-
|
|
1912
|
+
W(s, "mouseMove", function(y) {
|
|
1848
1913
|
s.setHighlighted(!0), s._editMode || a._tooltip.showAt(y, "Click to edit this shape");
|
|
1849
|
-
}),
|
|
1914
|
+
}), W(s, "mouseOut", function(y) {
|
|
1850
1915
|
s.setHighlighted(!1), a._tooltip.setVisible(!1);
|
|
1851
|
-
}),
|
|
1916
|
+
}), W(s, "leftClick", function(y) {
|
|
1852
1917
|
s.setEditMode(!0);
|
|
1853
1918
|
});
|
|
1854
1919
|
}, i.prototype.startDrawing = function(s) {
|
|
@@ -1871,15 +1936,15 @@ var Ce = function() {
|
|
|
1871
1936
|
asynchronous: !0,
|
|
1872
1937
|
show: !0,
|
|
1873
1938
|
debugShowBoundingVolume: !1
|
|
1874
|
-
}, r =
|
|
1939
|
+
}, r = k(o, {
|
|
1875
1940
|
appearance: new p.EllipsoidSurfaceAppearance({
|
|
1876
1941
|
aboveGround: !1
|
|
1877
1942
|
}),
|
|
1878
1943
|
material: t,
|
|
1879
1944
|
granularity: Math.PI / 180
|
|
1880
|
-
}),
|
|
1945
|
+
}), c = k(o, {}), u = k(o, {}), m = k(o, {}), v = k(r, {
|
|
1881
1946
|
rotation: 0
|
|
1882
|
-
}),
|
|
1947
|
+
}), E = k(o, {
|
|
1883
1948
|
width: 5,
|
|
1884
1949
|
geodesic: !0,
|
|
1885
1950
|
granularity: 1e4,
|
|
@@ -1887,16 +1952,16 @@ var Ce = function() {
|
|
|
1887
1952
|
aboveGround: !1
|
|
1888
1953
|
}),
|
|
1889
1954
|
material: t
|
|
1890
|
-
}),
|
|
1955
|
+
}), _ = function() {
|
|
1891
1956
|
function s() {
|
|
1892
1957
|
}
|
|
1893
1958
|
return s.prototype.initialiseOptions = function(a) {
|
|
1894
|
-
|
|
1959
|
+
$(this, a), this._ellipsoid = void 0, this._granularity = void 0, this._height = void 0, this._textureRotationAngle = void 0, this._id = void 0, this._createPrimitive = !0, this._primitive = void 0, this._outlinePolygon = void 0;
|
|
1895
1960
|
}, s.prototype.setAttribute = function(a, y) {
|
|
1896
1961
|
this[a] = y, this._createPrimitive = !0;
|
|
1897
1962
|
}, s.prototype.getAttribute = function(a) {
|
|
1898
1963
|
return this[a];
|
|
1899
|
-
}, s.prototype.update = function(a, y,
|
|
1964
|
+
}, s.prototype.update = function(a, y, d) {
|
|
1900
1965
|
if (!p.defined(this.ellipsoid))
|
|
1901
1966
|
throw new p.DeveloperError("this.ellipsoid must be defined.");
|
|
1902
1967
|
if (!p.defined(this.appearance))
|
|
@@ -1936,8 +2001,8 @@ var Ce = function() {
|
|
|
1936
2001
|
})
|
|
1937
2002
|
}));
|
|
1938
2003
|
}
|
|
1939
|
-
var
|
|
1940
|
-
|
|
2004
|
+
var h = this._primitive;
|
|
2005
|
+
h.appearance.material = this.material, h.debugShowBoundingVolume = this.debugShowBoundingVolume, h.update(a, y, d), this._outlinePolygon && this._outlinePolygon.update(a, y, d);
|
|
1941
2006
|
}
|
|
1942
2007
|
}, s.prototype.isDestroyed = function() {
|
|
1943
2008
|
return !1;
|
|
@@ -1951,9 +2016,9 @@ var Ce = function() {
|
|
|
1951
2016
|
function s(a) {
|
|
1952
2017
|
if (!p.defined(a.extent))
|
|
1953
2018
|
throw new p.DeveloperError("Extent is required");
|
|
1954
|
-
a =
|
|
2019
|
+
a = k(a, r), this.initialiseOptions(a), this.setExtent(a.extent);
|
|
1955
2020
|
}
|
|
1956
|
-
return s.prototype = new
|
|
2021
|
+
return s.prototype = new _(), s.prototype.setExtent = function(a) {
|
|
1957
2022
|
this.setAttribute("extent", a);
|
|
1958
2023
|
}, s.prototype.getExtent = function() {
|
|
1959
2024
|
return this.getAttribute("extent");
|
|
@@ -1974,9 +2039,9 @@ var Ce = function() {
|
|
|
1974
2039
|
}, s;
|
|
1975
2040
|
}(), i.PolygonPrimitive = function() {
|
|
1976
2041
|
function s(a) {
|
|
1977
|
-
a =
|
|
2042
|
+
a = k(a, r), this.initialiseOptions(a), this.isPolygon = !0;
|
|
1978
2043
|
}
|
|
1979
|
-
return s.prototype = new
|
|
2044
|
+
return s.prototype = new _(), s.prototype.setPositions = function(a) {
|
|
1980
2045
|
this.setAttribute("positions", a);
|
|
1981
2046
|
}, s.prototype.getPositions = function() {
|
|
1982
2047
|
return this.getAttribute("positions");
|
|
@@ -1999,9 +2064,9 @@ var Ce = function() {
|
|
|
1999
2064
|
function s(a) {
|
|
2000
2065
|
if (!(p.defined(a.center) && p.defined(a.radius)))
|
|
2001
2066
|
throw new p.DeveloperError("Center and radius are required");
|
|
2002
|
-
a =
|
|
2067
|
+
a = k(a, r), this.initialiseOptions(a), this.setRadius(a.radius);
|
|
2003
2068
|
}
|
|
2004
|
-
return s.prototype = new
|
|
2069
|
+
return s.prototype = new _(), s.prototype.setCenter = function(a) {
|
|
2005
2070
|
this.setAttribute("center", a);
|
|
2006
2071
|
}, s.prototype.setRadius = function(a) {
|
|
2007
2072
|
this.setAttribute("radius", Math.max(0.1, a));
|
|
@@ -2030,9 +2095,9 @@ var Ce = function() {
|
|
|
2030
2095
|
function s(a) {
|
|
2031
2096
|
if (!(p.defined(a.center) && p.defined(a.semiMajorAxis) && p.defined(a.semiMinorAxis)))
|
|
2032
2097
|
throw new p.DeveloperError("Center and semi major and semi minor axis are required");
|
|
2033
|
-
a =
|
|
2098
|
+
a = k(a, v), this.initialiseOptions(a);
|
|
2034
2099
|
}
|
|
2035
|
-
return s.prototype = new
|
|
2100
|
+
return s.prototype = new _(), s.prototype.setCenter = function(a) {
|
|
2036
2101
|
this.setAttribute("center", a);
|
|
2037
2102
|
}, s.prototype.setSemiMajorAxis = function(a) {
|
|
2038
2103
|
a < this.getSemiMinorAxis() || this.setAttribute("semiMajorAxis", a);
|
|
@@ -2071,9 +2136,9 @@ var Ce = function() {
|
|
|
2071
2136
|
}, s;
|
|
2072
2137
|
}(), i.PolylinePrimitive = function() {
|
|
2073
2138
|
function s(a) {
|
|
2074
|
-
a =
|
|
2139
|
+
a = k(a, E), this.initialiseOptions(a);
|
|
2075
2140
|
}
|
|
2076
|
-
return s.prototype = new
|
|
2141
|
+
return s.prototype = new _(), s.prototype.setPositions = function(a) {
|
|
2077
2142
|
this.setAttribute("positions", a);
|
|
2078
2143
|
}, s.prototype.setWidth = function(a) {
|
|
2079
2144
|
this.setAttribute("width", a);
|
|
@@ -2096,7 +2161,7 @@ var Ce = function() {
|
|
|
2096
2161
|
});
|
|
2097
2162
|
}, s;
|
|
2098
2163
|
}();
|
|
2099
|
-
var
|
|
2164
|
+
var w = {
|
|
2100
2165
|
iconUrl: "./assets/img/dragIcon.png",
|
|
2101
2166
|
shiftX: 0,
|
|
2102
2167
|
shiftY: 0
|
|
@@ -2104,16 +2169,16 @@ var Ce = function() {
|
|
|
2104
2169
|
iconUrl: "./assets/img/dragIcon.png",
|
|
2105
2170
|
shiftX: 0,
|
|
2106
2171
|
shiftY: 0
|
|
2107
|
-
},
|
|
2172
|
+
}, R = {
|
|
2108
2173
|
iconUrl: "./assets/img/dragIconLight.png",
|
|
2109
2174
|
shiftX: 0,
|
|
2110
2175
|
shiftY: 0
|
|
2111
2176
|
};
|
|
2112
2177
|
i.prototype.createBillboardGroup = function(s, a, y) {
|
|
2113
|
-
var
|
|
2114
|
-
return
|
|
2178
|
+
var d = new i.BillboardGroup(this, a);
|
|
2179
|
+
return d.addBillboards(s, y), d;
|
|
2115
2180
|
}, i.BillboardGroup = function(s, a) {
|
|
2116
|
-
this._drawHelper = s, this._scene = s._scene, this._options =
|
|
2181
|
+
this._drawHelper = s, this._scene = s._scene, this._options = k(a, w);
|
|
2117
2182
|
var y = new p.BillboardCollection();
|
|
2118
2183
|
this._scene.primitives.add(y), this._billboards = y, this._orderedBillboards = [];
|
|
2119
2184
|
}, i.BillboardGroup.prototype.createBillboard = function(s, a) {
|
|
@@ -2129,43 +2194,43 @@ var Ce = function() {
|
|
|
2129
2194
|
color: n
|
|
2130
2195
|
});
|
|
2131
2196
|
if (a) {
|
|
2132
|
-
let
|
|
2197
|
+
let h = function(g) {
|
|
2133
2198
|
f.enableRotate = g;
|
|
2134
|
-
},
|
|
2135
|
-
for (var g = 0,
|
|
2199
|
+
}, C = function() {
|
|
2200
|
+
for (var g = 0, b = d._orderedBillboards.length; g < b && d._orderedBillboards[g] != y; ++g)
|
|
2136
2201
|
;
|
|
2137
2202
|
return g;
|
|
2138
2203
|
};
|
|
2139
|
-
var
|
|
2204
|
+
var d = this, f = this._scene.screenSpaceCameraController;
|
|
2140
2205
|
if (a.dragHandlers) {
|
|
2141
|
-
var
|
|
2142
|
-
|
|
2206
|
+
var d = this;
|
|
2207
|
+
W(y, "leftDown", function(b) {
|
|
2143
2208
|
function S(M) {
|
|
2144
2209
|
y.position = M;
|
|
2145
|
-
for (var D = 0, U =
|
|
2210
|
+
for (var D = 0, U = d._orderedBillboards.length; D < U && d._orderedBillboards[D] != y; ++D)
|
|
2146
2211
|
;
|
|
2147
|
-
a.dragHandlers.onDrag && a.dragHandlers.onDrag(
|
|
2212
|
+
a.dragHandlers.onDrag && a.dragHandlers.onDrag(C(), M);
|
|
2148
2213
|
}
|
|
2149
|
-
function
|
|
2150
|
-
T.destroy(),
|
|
2214
|
+
function L(M) {
|
|
2215
|
+
T.destroy(), h(!0), a.dragHandlers.onDragEnd && a.dragHandlers.onDragEnd(C(), M);
|
|
2151
2216
|
}
|
|
2152
|
-
var T = new p.ScreenSpaceEventHandler(
|
|
2217
|
+
var T = new p.ScreenSpaceEventHandler(d._scene.canvas);
|
|
2153
2218
|
T.setInputAction(function(M) {
|
|
2154
|
-
var D =
|
|
2155
|
-
D ? S(D) :
|
|
2219
|
+
var D = d._scene.camera.pickEllipsoid(M.endPosition, e);
|
|
2220
|
+
D ? S(D) : L(D);
|
|
2156
2221
|
}, p.ScreenSpaceEventType.MOUSE_MOVE), T.setInputAction(function(M) {
|
|
2157
|
-
|
|
2158
|
-
}, p.ScreenSpaceEventType.LEFT_UP),
|
|
2222
|
+
L(d._scene.camera.pickEllipsoid(M.position, e));
|
|
2223
|
+
}, p.ScreenSpaceEventType.LEFT_UP), h(!1), a.dragHandlers.onDragStart && a.dragHandlers.onDragStart(C(), d._scene.camera.pickEllipsoid(b, e));
|
|
2159
2224
|
});
|
|
2160
2225
|
}
|
|
2161
|
-
a.onDoubleClick &&
|
|
2162
|
-
a.onDoubleClick(
|
|
2163
|
-
}), a.onClick &&
|
|
2164
|
-
a.onClick(
|
|
2165
|
-
}), a.tooltip && (
|
|
2166
|
-
|
|
2167
|
-
}),
|
|
2168
|
-
|
|
2226
|
+
a.onDoubleClick && W(y, "leftDoubleClick", function(g) {
|
|
2227
|
+
a.onDoubleClick(C());
|
|
2228
|
+
}), a.onClick && W(y, "leftClick", function(g) {
|
|
2229
|
+
a.onClick(C());
|
|
2230
|
+
}), a.tooltip && (W(y, "mouseMove", function(g) {
|
|
2231
|
+
d._drawHelper._tooltip.showAt(g, a.tooltip());
|
|
2232
|
+
}), W(y, "mouseOut", function(g) {
|
|
2233
|
+
d._drawHelper._tooltip.setVisible(!1);
|
|
2169
2234
|
}));
|
|
2170
2235
|
}
|
|
2171
2236
|
return y;
|
|
@@ -2190,69 +2255,69 @@ var Ce = function() {
|
|
|
2190
2255
|
}, i.BillboardGroup.prototype.setOnTop = function() {
|
|
2191
2256
|
this._scene.primitives.raiseToTop(this._billboards);
|
|
2192
2257
|
}, i.prototype.startDrawingMarker = function(a) {
|
|
2193
|
-
var a =
|
|
2258
|
+
var a = k(a, w);
|
|
2194
2259
|
this.startDrawing(function() {
|
|
2195
|
-
|
|
2260
|
+
h.remove(), C.destroy(), f.setVisible(!1);
|
|
2196
2261
|
});
|
|
2197
|
-
var y = this,
|
|
2198
|
-
|
|
2199
|
-
var f = this._tooltip,
|
|
2200
|
-
|
|
2262
|
+
var y = this, d = this._scene;
|
|
2263
|
+
d.primitives;
|
|
2264
|
+
var f = this._tooltip, h = new i.BillboardGroup(this, a), C = new p.ScreenSpaceEventHandler(d.canvas);
|
|
2265
|
+
C.setInputAction(function(g) {
|
|
2201
2266
|
if (g.position != null) {
|
|
2202
|
-
var
|
|
2203
|
-
|
|
2267
|
+
var b = d.camera.pickEllipsoid(g.position, e);
|
|
2268
|
+
b && (h.addBillboard(b), y.stopDrawing(), a.callback(b));
|
|
2204
2269
|
}
|
|
2205
|
-
}, p.ScreenSpaceEventType.LEFT_CLICK),
|
|
2206
|
-
var
|
|
2207
|
-
if (
|
|
2208
|
-
var S =
|
|
2270
|
+
}, p.ScreenSpaceEventType.LEFT_CLICK), C.setInputAction(function(g) {
|
|
2271
|
+
var b = g.endPosition;
|
|
2272
|
+
if (b != null) {
|
|
2273
|
+
var S = d.camera.pickEllipsoid(b, e);
|
|
2209
2274
|
S ? f.showAt(
|
|
2210
|
-
|
|
2211
|
-
"<p>Click to add your marker. Position is: </p>" +
|
|
2212
|
-
) : f.showAt(
|
|
2275
|
+
b,
|
|
2276
|
+
"<p>Click to add your marker. Position is: </p>" + j(e.cartesianToCartographic(S))
|
|
2277
|
+
) : f.showAt(b, "<p>Click on the globe to add your marker.</p>");
|
|
2213
2278
|
}
|
|
2214
2279
|
}, p.ScreenSpaceEventType.MOUSE_MOVE);
|
|
2215
2280
|
}, i.prototype.startDrawingPolygon = function(a) {
|
|
2216
|
-
var a =
|
|
2281
|
+
var a = k(a, r);
|
|
2217
2282
|
this.startDrawingPolyshape(!0, a);
|
|
2218
2283
|
}, i.prototype.startDrawingPolyline = function(a) {
|
|
2219
|
-
var a =
|
|
2284
|
+
var a = k(a, E);
|
|
2220
2285
|
this.startDrawingPolyshape(!1, a);
|
|
2221
2286
|
}, i.prototype.startDrawingPolyshape = function(s, a) {
|
|
2222
2287
|
this.startDrawing(function() {
|
|
2223
|
-
f.remove(g), S.remove(),
|
|
2288
|
+
f.remove(g), S.remove(), L.destroy(), h.setVisible(!1), H(d);
|
|
2224
2289
|
});
|
|
2225
|
-
var y = this,
|
|
2226
|
-
s ? g = new
|
|
2227
|
-
var
|
|
2228
|
-
q(
|
|
2290
|
+
var y = this, d = this._scene, f = d.primitives, h = this._tooltip, C = s ? 3 : 2, g;
|
|
2291
|
+
s ? g = new be.PolygonPrimitive(a) : g = new be.PolylinePrimitive(a), g.asynchronous = !1, f.add(g);
|
|
2292
|
+
var b = [], S = new i.BillboardGroup(this, w), L = new p.ScreenSpaceEventHandler(d.canvas);
|
|
2293
|
+
q(d), L.setInputAction(function(T) {
|
|
2229
2294
|
if (T.position != null) {
|
|
2230
|
-
var M =
|
|
2231
|
-
M && (
|
|
2295
|
+
var M = d.camera.pickEllipsoid(T.position, e);
|
|
2296
|
+
M && (b.length == 0 && (b.push(M.clone()), S.addBillboard(b[0])), b.length >= C && (g.positions = b, g._createPrimitive = !0), b.push(M), S.addBillboard(M));
|
|
2232
2297
|
}
|
|
2233
|
-
}, p.ScreenSpaceEventType.LEFT_CLICK),
|
|
2298
|
+
}, p.ScreenSpaceEventType.LEFT_CLICK), L.setInputAction(function(T) {
|
|
2234
2299
|
var M = T.endPosition;
|
|
2235
2300
|
if (M != null)
|
|
2236
|
-
if (
|
|
2237
|
-
|
|
2301
|
+
if (b.length == 0)
|
|
2302
|
+
h.showAt(M, "<p>Click to add first point</p>");
|
|
2238
2303
|
else {
|
|
2239
|
-
var D =
|
|
2240
|
-
D && (
|
|
2304
|
+
var D = d.camera.pickEllipsoid(M, e);
|
|
2305
|
+
D && (b.pop(), D.y += 1 + Math.random(), b.push(D), b.length >= C && (g.positions = b, g._createPrimitive = !0), S.getBillboard(b.length - 1).position = D, h.showAt(
|
|
2241
2306
|
M,
|
|
2242
|
-
"<p>Click to add new point (" +
|
|
2307
|
+
"<p>Click to add new point (" + b.length + ")</p>" + (b.length > C ? "<p>Double click to finish drawing</p>" : "")
|
|
2243
2308
|
));
|
|
2244
2309
|
}
|
|
2245
|
-
}, p.ScreenSpaceEventType.MOUSE_MOVE),
|
|
2310
|
+
}, p.ScreenSpaceEventType.MOUSE_MOVE), L.setInputAction(function(T) {
|
|
2246
2311
|
var M = T.position;
|
|
2247
2312
|
if (M != null) {
|
|
2248
|
-
if (
|
|
2313
|
+
if (b.length < C + 2)
|
|
2249
2314
|
return;
|
|
2250
|
-
var D =
|
|
2251
|
-
D && (H(
|
|
2315
|
+
var D = d.camera.pickEllipsoid(M, e);
|
|
2316
|
+
D && (H(d), y.stopDrawing(), typeof a.callback == "function" && (b.length - 1, a.callback(b)));
|
|
2252
2317
|
}
|
|
2253
2318
|
}, p.ScreenSpaceEventType.LEFT_DOUBLE_CLICK);
|
|
2254
2319
|
};
|
|
2255
|
-
function
|
|
2320
|
+
function V(s) {
|
|
2256
2321
|
return e.cartographicArrayToCartesianArray([
|
|
2257
2322
|
p.Rectangle.northwest(s),
|
|
2258
2323
|
p.Rectangle.northeast(s),
|
|
@@ -2267,68 +2332,68 @@ var Ce = function() {
|
|
|
2267
2332
|
s && (s.canvas.style.cursor = "");
|
|
2268
2333
|
}
|
|
2269
2334
|
i.prototype.startDrawingExtent = function(a) {
|
|
2270
|
-
var a =
|
|
2335
|
+
var a = k(a, r);
|
|
2271
2336
|
this.startDrawing(function() {
|
|
2272
|
-
g != null && f.remove(g),
|
|
2337
|
+
g != null && f.remove(g), b != null && b.remove(), S.destroy(), h.setVisible(!1), H(d);
|
|
2273
2338
|
});
|
|
2274
|
-
var y = this,
|
|
2275
|
-
q(
|
|
2276
|
-
function
|
|
2277
|
-
g == null && (g = new
|
|
2339
|
+
var y = this, d = this._scene, f = this._scene.primitives, h = this._tooltip, C = null, g = null, b = null, S = new p.ScreenSpaceEventHandler(d.canvas);
|
|
2340
|
+
q(d);
|
|
2341
|
+
function L(T) {
|
|
2342
|
+
g == null && (g = new be.ExtentPrimitive({
|
|
2278
2343
|
extent: T,
|
|
2279
2344
|
material: a.material
|
|
2280
2345
|
}), g.asynchronous = !1, f.add(g)), g.setExtent(T);
|
|
2281
|
-
var M =
|
|
2282
|
-
|
|
2346
|
+
var M = V(T);
|
|
2347
|
+
b == null ? (b = new i.BillboardGroup(y, w), b.addBillboards(M)) : b.updateBillboardsPositions(M);
|
|
2283
2348
|
}
|
|
2284
2349
|
S.setInputAction(function(T) {
|
|
2285
2350
|
if (T.position != null) {
|
|
2286
|
-
var M =
|
|
2351
|
+
var M = d.camera.pickEllipsoid(T.position, e);
|
|
2287
2352
|
if (M)
|
|
2288
2353
|
if (g == null) {
|
|
2289
|
-
|
|
2290
|
-
var D =
|
|
2291
|
-
|
|
2354
|
+
C = e.cartesianToCartographic(M);
|
|
2355
|
+
var D = K(C, C);
|
|
2356
|
+
L(D);
|
|
2292
2357
|
} else
|
|
2293
|
-
y.stopDrawing(), typeof a.callback == "function" && a.callback(
|
|
2358
|
+
y.stopDrawing(), typeof a.callback == "function" && a.callback(K(C, e.cartesianToCartographic(M)));
|
|
2294
2359
|
}
|
|
2295
2360
|
}, p.ScreenSpaceEventType.LEFT_DOWN), S.setInputAction(function(T) {
|
|
2296
2361
|
var M = T.endPosition;
|
|
2297
2362
|
if (M != null)
|
|
2298
2363
|
if (g == null)
|
|
2299
|
-
|
|
2364
|
+
h.showAt(M, "<p>Click to start drawing rectangle</p>");
|
|
2300
2365
|
else {
|
|
2301
|
-
var D =
|
|
2366
|
+
var D = d.camera.pickEllipsoid(M, e);
|
|
2302
2367
|
if (D) {
|
|
2303
|
-
var U =
|
|
2304
|
-
|
|
2368
|
+
var U = K(C, e.cartesianToCartographic(D));
|
|
2369
|
+
L(U), h.showAt(M, "<p>Drag to change rectangle extent</p><p>Click again to finish drawing</p>");
|
|
2305
2370
|
}
|
|
2306
2371
|
}
|
|
2307
2372
|
}, p.ScreenSpaceEventType.MOUSE_MOVE);
|
|
2308
2373
|
}, i.prototype.startDrawingCircle = function(a) {
|
|
2309
|
-
var a =
|
|
2374
|
+
var a = k(a, r);
|
|
2310
2375
|
this.startDrawing(function() {
|
|
2311
|
-
|
|
2376
|
+
C != null && f.remove(C), g.remove(), b.destroy(), h.setVisible(!1);
|
|
2312
2377
|
});
|
|
2313
|
-
var y = this,
|
|
2314
|
-
|
|
2378
|
+
var y = this, d = this._scene, f = this._scene.primitives, h = this._tooltip, C = null, g = null, b = new p.ScreenSpaceEventHandler(d.canvas);
|
|
2379
|
+
b.setInputAction(function(S) {
|
|
2315
2380
|
if (S.position != null) {
|
|
2316
|
-
var
|
|
2317
|
-
|
|
2318
|
-
center:
|
|
2381
|
+
var L = d.camera.pickEllipsoid(S.position, e);
|
|
2382
|
+
L && (C == null ? (C = new i.CirclePrimitive({
|
|
2383
|
+
center: L,
|
|
2319
2384
|
radius: 0,
|
|
2320
2385
|
asynchronous: !1,
|
|
2321
2386
|
material: a.material
|
|
2322
|
-
}), f.add(
|
|
2387
|
+
}), f.add(C), g = new i.BillboardGroup(y, w), g.addBillboards([L])) : (typeof a.callback == "function" && a.callback(C.getCenter(), C.getRadius()), y.stopDrawing()));
|
|
2323
2388
|
}
|
|
2324
|
-
}, p.ScreenSpaceEventType.LEFT_DOWN),
|
|
2325
|
-
var
|
|
2326
|
-
if (
|
|
2327
|
-
if (
|
|
2328
|
-
|
|
2389
|
+
}, p.ScreenSpaceEventType.LEFT_DOWN), b.setInputAction(function(S) {
|
|
2390
|
+
var L = S.endPosition;
|
|
2391
|
+
if (L != null)
|
|
2392
|
+
if (C == null)
|
|
2393
|
+
h.showAt(L, "<p>Click to start drawing the circle</p>");
|
|
2329
2394
|
else {
|
|
2330
|
-
var T =
|
|
2331
|
-
T && (
|
|
2395
|
+
var T = d.camera.pickEllipsoid(L, e);
|
|
2396
|
+
T && (C.setRadius(p.Cartesian3.distance(C.getCenter(), T)), g.updateBillboardsPositions(T), h.showAt(L, "<p>Move mouse to change circle radius</p><p>Click again to finish drawing</p>"));
|
|
2332
2397
|
}
|
|
2333
2398
|
}, p.ScreenSpaceEventType.MOUSE_MOVE);
|
|
2334
2399
|
}, i.prototype.enhancePrimitives = function() {
|
|
@@ -2337,281 +2402,281 @@ var Ce = function() {
|
|
|
2337
2402
|
if (this._editable)
|
|
2338
2403
|
return;
|
|
2339
2404
|
this._editable = !0;
|
|
2340
|
-
var
|
|
2341
|
-
function
|
|
2342
|
-
s._scene.screenSpaceCameraController.enableRotate =
|
|
2405
|
+
var d = this, f = this;
|
|
2406
|
+
function h(C) {
|
|
2407
|
+
s._scene.screenSpaceCameraController.enableRotate = C;
|
|
2343
2408
|
}
|
|
2344
|
-
|
|
2345
|
-
function g(
|
|
2346
|
-
|
|
2409
|
+
W(d, "leftDown", function(C) {
|
|
2410
|
+
function g(L) {
|
|
2411
|
+
d.position = L, f.executeListeners({ name: "drag", positions: L });
|
|
2347
2412
|
}
|
|
2348
|
-
function
|
|
2349
|
-
S.destroy(),
|
|
2413
|
+
function b(L) {
|
|
2414
|
+
S.destroy(), h(!0), f.executeListeners({ name: "dragEnd", positions: L });
|
|
2350
2415
|
}
|
|
2351
2416
|
var S = new p.ScreenSpaceEventHandler(s._scene.canvas);
|
|
2352
|
-
S.setInputAction(function(
|
|
2353
|
-
var T = s._scene.camera.pickEllipsoid(
|
|
2354
|
-
T ? g(T) :
|
|
2355
|
-
}, p.ScreenSpaceEventType.MOUSE_MOVE), S.setInputAction(function(
|
|
2356
|
-
|
|
2357
|
-
}, p.ScreenSpaceEventType.LEFT_UP),
|
|
2358
|
-
}), ne(
|
|
2417
|
+
S.setInputAction(function(L) {
|
|
2418
|
+
var T = s._scene.camera.pickEllipsoid(L.endPosition, e);
|
|
2419
|
+
T ? g(T) : b(T);
|
|
2420
|
+
}, p.ScreenSpaceEventType.MOUSE_MOVE), S.setInputAction(function(L) {
|
|
2421
|
+
b(s._scene.camera.pickEllipsoid(L.position, e));
|
|
2422
|
+
}, p.ScreenSpaceEventType.LEFT_UP), h(!1);
|
|
2423
|
+
}), ne(d);
|
|
2359
2424
|
};
|
|
2360
|
-
function a(
|
|
2361
|
-
s._scene, !(this._highlighted && this._highlighted ==
|
|
2425
|
+
function a(d) {
|
|
2426
|
+
s._scene, !(this._highlighted && this._highlighted == d) && this._editMode !== !0 && (this._highlighted = d, d ? (s.setHighlighted(this), this._strokeColor = this.strokeColor, this.setStrokeStyle(p.Color.fromCssColorString("white"), this.strokeWidth)) : this._strokeColor ? this.setStrokeStyle(this._strokeColor, this.strokeWidth) : this.setStrokeStyle(void 0, void 0));
|
|
2362
2427
|
}
|
|
2363
|
-
function y(
|
|
2364
|
-
if (this._editMode !=
|
|
2365
|
-
if (s.disableAllHighlights(),
|
|
2428
|
+
function y(d) {
|
|
2429
|
+
if (this._editMode != d)
|
|
2430
|
+
if (s.disableAllHighlights(), d) {
|
|
2366
2431
|
s.setEdited(this);
|
|
2367
|
-
var f = s._scene,
|
|
2432
|
+
var f = s._scene, h = this;
|
|
2368
2433
|
if (this._markers == null) {
|
|
2369
|
-
let D = function(
|
|
2370
|
-
var Q =
|
|
2371
|
-
Q < g.countBillboards() && (g.getBillboard(Q).position =
|
|
2434
|
+
let D = function(O, z) {
|
|
2435
|
+
var Q = O - 1 < 0 ? z.length - 1 : O - 1;
|
|
2436
|
+
Q < g.countBillboards() && (g.getBillboard(Q).position = Y(Q)), Q = O, Q < g.countBillboards() && (g.getBillboard(Q).position = Y(Q));
|
|
2372
2437
|
}, U = function() {
|
|
2373
|
-
|
|
2438
|
+
h.executeListeners({
|
|
2374
2439
|
name: "onEdited",
|
|
2375
|
-
positions:
|
|
2440
|
+
positions: h.positions
|
|
2376
2441
|
});
|
|
2377
|
-
},
|
|
2378
|
-
var z =
|
|
2442
|
+
}, Y = function(O) {
|
|
2443
|
+
var z = h.positions;
|
|
2379
2444
|
return e.cartographicToCartesian(
|
|
2380
2445
|
new p.EllipsoidGeodesic(
|
|
2381
|
-
e.cartesianToCartographic(z[
|
|
2382
|
-
e.cartesianToCartographic(z[
|
|
2446
|
+
e.cartesianToCartographic(z[O]),
|
|
2447
|
+
e.cartesianToCartographic(z[O < z.length - 1 ? O + 1 : 0])
|
|
2383
2448
|
).interpolateUsingFraction(0.5)
|
|
2384
2449
|
);
|
|
2385
2450
|
};
|
|
2386
|
-
var
|
|
2451
|
+
var C = new i.BillboardGroup(s, P), g = new i.BillboardGroup(s, R), b = {
|
|
2387
2452
|
dragHandlers: {
|
|
2388
|
-
onDrag: function(
|
|
2389
|
-
|
|
2453
|
+
onDrag: function(O, z) {
|
|
2454
|
+
h.positions[O] = z, D(O, h.positions), h._createPrimitive = !0;
|
|
2390
2455
|
},
|
|
2391
|
-
onDragEnd: function(
|
|
2392
|
-
|
|
2456
|
+
onDragEnd: function(O, z) {
|
|
2457
|
+
h._createPrimitive = !0, U();
|
|
2393
2458
|
}
|
|
2394
2459
|
},
|
|
2395
|
-
onDoubleClick: function(
|
|
2396
|
-
|
|
2460
|
+
onDoubleClick: function(O) {
|
|
2461
|
+
h.positions.length < 4 || (h.positions.splice(O, 1), h._createPrimitive = !0, C.removeBillboard(O), g.removeBillboard(O), D(O, h.positions), U());
|
|
2397
2462
|
},
|
|
2398
2463
|
tooltip: function() {
|
|
2399
|
-
if (
|
|
2464
|
+
if (h.positions.length > 3)
|
|
2400
2465
|
return "Double click to remove this point";
|
|
2401
2466
|
}
|
|
2402
2467
|
};
|
|
2403
|
-
|
|
2404
|
-
for (var S = [],
|
|
2405
|
-
S.push(
|
|
2468
|
+
C.addBillboards(h.positions, b), this._markers = C;
|
|
2469
|
+
for (var S = [], L = 0, T = h.positions.length + (this.isPolygon ? 0 : -1); L < T; L++)
|
|
2470
|
+
S.push(Y(L));
|
|
2406
2471
|
var M = {
|
|
2407
2472
|
dragHandlers: {
|
|
2408
|
-
onDragStart: function(
|
|
2409
|
-
this.index =
|
|
2473
|
+
onDragStart: function(O, z) {
|
|
2474
|
+
this.index = O + 1, h.positions.splice(this.index, 0, z), h._createPrimitive = !0;
|
|
2410
2475
|
},
|
|
2411
|
-
onDrag: function(
|
|
2412
|
-
|
|
2476
|
+
onDrag: function(O, z) {
|
|
2477
|
+
h.positions[this.index] = z, h._createPrimitive = !0;
|
|
2413
2478
|
},
|
|
2414
|
-
onDragEnd: function(
|
|
2415
|
-
|
|
2479
|
+
onDragEnd: function(O, z) {
|
|
2480
|
+
C.insertBillboard(this.index, z, b), g.getBillboard(this.index - 1).position = Y(this.index - 1), g.insertBillboard(this.index, Y(this.index), M), h._createPrimitive = !0, U();
|
|
2416
2481
|
}
|
|
2417
2482
|
},
|
|
2418
2483
|
tooltip: function() {
|
|
2419
2484
|
return "Drag to create a new point";
|
|
2420
2485
|
}
|
|
2421
2486
|
};
|
|
2422
|
-
g.addBillboards(S, M), this._editMarkers = g, this._globeClickhandler = new p.ScreenSpaceEventHandler(f.canvas), this._globeClickhandler.setInputAction(function(
|
|
2423
|
-
var z = f.pick(
|
|
2424
|
-
z && z.primitive ||
|
|
2425
|
-
}, p.ScreenSpaceEventType.LEFT_CLICK),
|
|
2487
|
+
g.addBillboards(S, M), this._editMarkers = g, this._globeClickhandler = new p.ScreenSpaceEventHandler(f.canvas), this._globeClickhandler.setInputAction(function(O) {
|
|
2488
|
+
var z = f.pick(O.position);
|
|
2489
|
+
z && z.primitive || h.setEditMode(!1);
|
|
2490
|
+
}, p.ScreenSpaceEventType.LEFT_CLICK), C.setOnTop(), g.setOnTop();
|
|
2426
2491
|
}
|
|
2427
2492
|
this._editMode = !0;
|
|
2428
2493
|
} else
|
|
2429
2494
|
this._markers != null && (this._markers.remove(), this._editMarkers.remove(), this._markers = null, this._editMarkers = null, this._globeClickhandler.destroy()), this._editMode = !1;
|
|
2430
2495
|
}
|
|
2431
|
-
|
|
2496
|
+
be.PolylinePrimitive.prototype.setEditable = function() {
|
|
2432
2497
|
if (!this.setEditMode) {
|
|
2433
|
-
var
|
|
2434
|
-
|
|
2498
|
+
var d = this;
|
|
2499
|
+
d.isPolygon = !1, d.asynchronous = !1, s.registerEditableShape(d), d.setEditMode = y;
|
|
2435
2500
|
var f = this.width;
|
|
2436
|
-
|
|
2437
|
-
this._editMode !== !0 && (
|
|
2438
|
-
},
|
|
2501
|
+
d.setHighlighted = function(h) {
|
|
2502
|
+
this._editMode !== !0 && (h ? (s.setHighlighted(this), this.setWidth(f * 2)) : this.setWidth(f));
|
|
2503
|
+
}, d.getExtent = function() {
|
|
2439
2504
|
return p.Rectangle.fromCartographicArray(e.cartesianArrayToCartographicArray(this.positions));
|
|
2440
|
-
}, ne(
|
|
2505
|
+
}, ne(d), d.setEditMode(!1);
|
|
2441
2506
|
}
|
|
2442
|
-
},
|
|
2443
|
-
var
|
|
2444
|
-
|
|
2445
|
-
},
|
|
2507
|
+
}, be.PolygonPrimitive.prototype.setEditable = function() {
|
|
2508
|
+
var d = this;
|
|
2509
|
+
d.asynchronous = !1, s._scene, s.registerEditableShape(d), d.setEditMode = y, d.setHighlighted = a, ne(d), d.setEditMode(!1);
|
|
2510
|
+
}, be.ExtentPrimitive.prototype.setEditable = function() {
|
|
2446
2511
|
if (!this.setEditMode) {
|
|
2447
|
-
var
|
|
2448
|
-
s.registerEditableShape(
|
|
2449
|
-
if (this._editMode !=
|
|
2450
|
-
if (s.disableAllHighlights(),
|
|
2512
|
+
var d = this, f = s._scene;
|
|
2513
|
+
s.registerEditableShape(d), d.asynchronous = !1, d.setEditMode = function(h) {
|
|
2514
|
+
if (this._editMode != h)
|
|
2515
|
+
if (s.disableAllHighlights(), h) {
|
|
2451
2516
|
if (s.setEdited(this), this._markers == null) {
|
|
2452
|
-
let
|
|
2453
|
-
|
|
2517
|
+
let b = function() {
|
|
2518
|
+
d.executeListeners({
|
|
2454
2519
|
name: "onEdited",
|
|
2455
|
-
extent:
|
|
2520
|
+
extent: d.extent
|
|
2456
2521
|
});
|
|
2457
2522
|
};
|
|
2458
|
-
var
|
|
2523
|
+
var C = new i.BillboardGroup(s, P), g = {
|
|
2459
2524
|
dragHandlers: {
|
|
2460
|
-
onDrag: function(S,
|
|
2461
|
-
var T =
|
|
2462
|
-
|
|
2525
|
+
onDrag: function(S, L) {
|
|
2526
|
+
var T = C.getBillboard((S + 2) % 4).position;
|
|
2527
|
+
d.setExtent(K(e.cartesianToCartographic(T), e.cartesianToCartographic(L))), C.updateBillboardsPositions(V(d.extent));
|
|
2463
2528
|
},
|
|
2464
|
-
onDragEnd: function(S,
|
|
2465
|
-
|
|
2529
|
+
onDragEnd: function(S, L) {
|
|
2530
|
+
b();
|
|
2466
2531
|
}
|
|
2467
2532
|
},
|
|
2468
2533
|
tooltip: function() {
|
|
2469
2534
|
return "Drag to change the corners of this extent";
|
|
2470
2535
|
}
|
|
2471
2536
|
};
|
|
2472
|
-
|
|
2473
|
-
var
|
|
2474
|
-
|
|
2475
|
-
}, p.ScreenSpaceEventType.LEFT_CLICK),
|
|
2537
|
+
C.addBillboards(V(d.extent), g), this._markers = C, this._globeClickhandler = new p.ScreenSpaceEventHandler(f.canvas), this._globeClickhandler.setInputAction(function(S) {
|
|
2538
|
+
var L = f.pick(S.position);
|
|
2539
|
+
L && !L.isDestroyed() && L.primitive || d.setEditMode(!1);
|
|
2540
|
+
}, p.ScreenSpaceEventType.LEFT_CLICK), C.setOnTop();
|
|
2476
2541
|
}
|
|
2477
2542
|
this._editMode = !0;
|
|
2478
2543
|
} else
|
|
2479
2544
|
this._markers != null && (this._markers.remove(), this._markers = null, this._globeClickhandler.destroy()), this._editMode = !1;
|
|
2480
|
-
},
|
|
2545
|
+
}, d.setHighlighted = a, ne(d), d.setEditMode(!1);
|
|
2481
2546
|
}
|
|
2482
2547
|
}, i.EllipsePrimitive.prototype.setEditable = function() {
|
|
2483
2548
|
if (!this.setEditMode) {
|
|
2484
|
-
var
|
|
2485
|
-
|
|
2486
|
-
if (this._editMode !=
|
|
2487
|
-
if (s.disableAllHighlights(),
|
|
2549
|
+
var d = this, f = s._scene;
|
|
2550
|
+
d.asynchronous = !1, s.registerEditableShape(d), d.setEditMode = function(h) {
|
|
2551
|
+
if (this._editMode != h)
|
|
2552
|
+
if (s.disableAllHighlights(), h) {
|
|
2488
2553
|
s.setEdited(this);
|
|
2489
|
-
var
|
|
2554
|
+
var C = this;
|
|
2490
2555
|
if (this._markers == null) {
|
|
2491
2556
|
let S = function() {
|
|
2492
2557
|
return p.EllipseOutlineGeometry(
|
|
2493
2558
|
e,
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2559
|
+
d.getCenter(),
|
|
2560
|
+
d.getSemiMajorAxis(),
|
|
2561
|
+
d.getSemiMinorAxis(),
|
|
2562
|
+
d.getRotation() + Math.PI / 2,
|
|
2498
2563
|
Math.PI / 2
|
|
2499
2564
|
).splice(0, 4);
|
|
2500
|
-
},
|
|
2501
|
-
|
|
2565
|
+
}, L = function() {
|
|
2566
|
+
d.executeListeners({
|
|
2502
2567
|
name: "onEdited",
|
|
2503
|
-
center:
|
|
2504
|
-
semiMajorAxis:
|
|
2505
|
-
semiMinorAxis:
|
|
2568
|
+
center: d.getCenter(),
|
|
2569
|
+
semiMajorAxis: d.getSemiMajorAxis(),
|
|
2570
|
+
semiMinorAxis: d.getSemiMinorAxis(),
|
|
2506
2571
|
rotation: 0
|
|
2507
2572
|
});
|
|
2508
2573
|
};
|
|
2509
|
-
var g = new i.BillboardGroup(s, P),
|
|
2574
|
+
var g = new i.BillboardGroup(s, P), b = {
|
|
2510
2575
|
dragHandlers: {
|
|
2511
2576
|
onDrag: function(T, M) {
|
|
2512
|
-
var D = p.Cartesian3.distance(
|
|
2513
|
-
T % 2 == 0 ?
|
|
2577
|
+
var D = p.Cartesian3.distance(d.getCenter(), M);
|
|
2578
|
+
T % 2 == 0 ? d.setSemiMajorAxis(D) : d.setSemiMinorAxis(D), g.updateBillboardsPositions(S());
|
|
2514
2579
|
},
|
|
2515
2580
|
onDragEnd: function(T, M) {
|
|
2516
|
-
|
|
2581
|
+
L();
|
|
2517
2582
|
}
|
|
2518
2583
|
},
|
|
2519
2584
|
tooltip: function() {
|
|
2520
2585
|
return "Drag to change the excentricity and radius";
|
|
2521
2586
|
}
|
|
2522
2587
|
};
|
|
2523
|
-
g.addBillboards(S(),
|
|
2588
|
+
g.addBillboards(S(), b), this._markers = g, this._globeClickhandler = new p.ScreenSpaceEventHandler(f.canvas), this._globeClickhandler.setInputAction(function(T) {
|
|
2524
2589
|
var M = f.pick(T.position);
|
|
2525
|
-
M && M.primitive ||
|
|
2590
|
+
M && M.primitive || C.setEditMode(!1);
|
|
2526
2591
|
}, p.ScreenSpaceEventType.LEFT_CLICK), g.setOnTop();
|
|
2527
2592
|
}
|
|
2528
2593
|
this._editMode = !0;
|
|
2529
2594
|
} else
|
|
2530
2595
|
this._markers != null && (this._markers.remove(), this._markers = null, this._globeClickhandler.destroy()), this._editMode = !1;
|
|
2531
|
-
},
|
|
2596
|
+
}, d.setHighlighted = a, ne(d), d.setEditMode(!1);
|
|
2532
2597
|
}
|
|
2533
|
-
}, i.CirclePrimitive.prototype.getCircleCartesianCoordinates = function(
|
|
2598
|
+
}, i.CirclePrimitive.prototype.getCircleCartesianCoordinates = function(d) {
|
|
2534
2599
|
for (var f = p.CircleOutlineGeometry.createGeometry(
|
|
2535
2600
|
new p.CircleOutlineGeometry({
|
|
2536
2601
|
ellipsoid: e,
|
|
2537
2602
|
center: this.getCenter(),
|
|
2538
2603
|
radius: this.getRadius(),
|
|
2539
|
-
granularity:
|
|
2604
|
+
granularity: d
|
|
2540
2605
|
})
|
|
2541
|
-
),
|
|
2542
|
-
|
|
2606
|
+
), h = 0, C, g = []; h < f.attributes.position.values.length; h += 3)
|
|
2607
|
+
C = f.attributes.position.values, g.push(new p.Cartesian3(C[h], C[h + 1], C[h + 2]));
|
|
2543
2608
|
return g;
|
|
2544
2609
|
}, i.CirclePrimitive.prototype.setEditable = function() {
|
|
2545
2610
|
if (!this.setEditMode) {
|
|
2546
|
-
var
|
|
2547
|
-
|
|
2548
|
-
if (this._editMode !=
|
|
2549
|
-
if (s.disableAllHighlights(),
|
|
2611
|
+
var d = this, f = s._scene;
|
|
2612
|
+
d.asynchronous = !1, s.registerEditableShape(d), d.setEditMode = function(h) {
|
|
2613
|
+
if (this._editMode != h)
|
|
2614
|
+
if (s.disableAllHighlights(), h) {
|
|
2550
2615
|
s.setEdited(this);
|
|
2551
|
-
var
|
|
2616
|
+
var C = this;
|
|
2552
2617
|
if (this._markers == null) {
|
|
2553
2618
|
let S = function() {
|
|
2554
|
-
return
|
|
2555
|
-
},
|
|
2556
|
-
|
|
2619
|
+
return C.getCircleCartesianCoordinates(p.Math.PI_OVER_TWO);
|
|
2620
|
+
}, L = function() {
|
|
2621
|
+
d.executeListeners({
|
|
2557
2622
|
name: "onEdited",
|
|
2558
|
-
center:
|
|
2559
|
-
radius:
|
|
2623
|
+
center: d.getCenter(),
|
|
2624
|
+
radius: d.getRadius()
|
|
2560
2625
|
});
|
|
2561
2626
|
};
|
|
2562
|
-
var g = new i.BillboardGroup(s, P),
|
|
2627
|
+
var g = new i.BillboardGroup(s, P), b = {
|
|
2563
2628
|
dragHandlers: {
|
|
2564
2629
|
onDrag: function(T, M) {
|
|
2565
|
-
|
|
2630
|
+
d.setRadius(p.Cartesian3.distance(d.getCenter(), M)), g.updateBillboardsPositions(S());
|
|
2566
2631
|
},
|
|
2567
2632
|
onDragEnd: function(T, M) {
|
|
2568
|
-
|
|
2633
|
+
L();
|
|
2569
2634
|
}
|
|
2570
2635
|
},
|
|
2571
2636
|
tooltip: function() {
|
|
2572
2637
|
return "Drag to change the radius";
|
|
2573
2638
|
}
|
|
2574
2639
|
};
|
|
2575
|
-
g.addBillboards(S(),
|
|
2640
|
+
g.addBillboards(S(), b), this._markers = g, this._globeClickhandler = new p.ScreenSpaceEventHandler(f.canvas), this._globeClickhandler.setInputAction(function(T) {
|
|
2576
2641
|
var M = f.pick(T.position);
|
|
2577
|
-
M && M.primitive ||
|
|
2642
|
+
M && M.primitive || C.setEditMode(!1);
|
|
2578
2643
|
}, p.ScreenSpaceEventType.LEFT_CLICK), g.setOnTop();
|
|
2579
2644
|
}
|
|
2580
2645
|
this._editMode = !0;
|
|
2581
2646
|
} else
|
|
2582
2647
|
this._markers != null && (this._markers.remove(), this._markers = null, this._globeClickhandler.destroy()), this._editMode = !1;
|
|
2583
|
-
},
|
|
2648
|
+
}, d.setHighlighted = a, ne(d), d.setEditMode(!1);
|
|
2584
2649
|
}
|
|
2585
2650
|
};
|
|
2586
2651
|
}, i.DrawHelperWidget = function() {
|
|
2587
2652
|
function s(a, y) {
|
|
2588
2653
|
if (!p.defined(y.container))
|
|
2589
2654
|
throw new p.DeveloperError("Container is required");
|
|
2590
|
-
var
|
|
2655
|
+
var d = {
|
|
2591
2656
|
markerIcon: "./assets/img/glyphicons_242_google_maps.png",
|
|
2592
2657
|
polylineIcon: "./assets/img/glyphicons_097_vector_path_line.png",
|
|
2593
2658
|
polygonIcon: "./assets/img/glyphicons_096_vector_path_polygon.png",
|
|
2594
2659
|
circleIcon: "./assets/img/glyphicons_095_vector_path_circle.png",
|
|
2595
2660
|
extentIcon: "./assets/img/glyphicons_094_vector_path_square.png",
|
|
2596
2661
|
clearIcon: "./assets/img/glyphicons_067_cleaning.png",
|
|
2597
|
-
polylineDrawingOptions:
|
|
2598
|
-
polygonDrawingOptions:
|
|
2662
|
+
polylineDrawingOptions: E,
|
|
2663
|
+
polygonDrawingOptions: c,
|
|
2599
2664
|
extentDrawingOptions: u,
|
|
2600
|
-
circleDrawingOptions:
|
|
2665
|
+
circleDrawingOptions: m
|
|
2601
2666
|
};
|
|
2602
|
-
|
|
2603
|
-
var f = this,
|
|
2604
|
-
|
|
2605
|
-
function
|
|
2667
|
+
$(y, d);
|
|
2668
|
+
var f = this, h = document.createElement("DIV");
|
|
2669
|
+
h.className = "toolbar", y.container.appendChild(h);
|
|
2670
|
+
function C(S, L, T, M) {
|
|
2606
2671
|
var D = document.createElement("DIV");
|
|
2607
|
-
D.className = "button", D.title = T,
|
|
2672
|
+
D.className = "button", D.title = T, h.appendChild(D), D.onclick = M;
|
|
2608
2673
|
var U = document.createElement("SPAN");
|
|
2609
2674
|
D.appendChild(U);
|
|
2610
|
-
var
|
|
2611
|
-
return
|
|
2675
|
+
var Y = document.createElement("IMG");
|
|
2676
|
+
return Y.src = L, U.appendChild(Y), D;
|
|
2612
2677
|
}
|
|
2613
2678
|
var g = a._scene;
|
|
2614
|
-
|
|
2679
|
+
C("marker", y.markerIcon, "Click to start drawing a 2D marker", function() {
|
|
2615
2680
|
a.startDrawingMarker({
|
|
2616
2681
|
callback: function(S) {
|
|
2617
2682
|
f.executeListeners({
|
|
@@ -2620,7 +2685,7 @@ var Ce = function() {
|
|
|
2620
2685
|
});
|
|
2621
2686
|
}
|
|
2622
2687
|
});
|
|
2623
|
-
}),
|
|
2688
|
+
}), C("polyline", y.polylineIcon, "Click to start drawing a 2D polyline", function() {
|
|
2624
2689
|
a.startDrawingPolyline({
|
|
2625
2690
|
callback: function(S) {
|
|
2626
2691
|
f.executeListeners({
|
|
@@ -2629,7 +2694,7 @@ var Ce = function() {
|
|
|
2629
2694
|
});
|
|
2630
2695
|
}
|
|
2631
2696
|
});
|
|
2632
|
-
}),
|
|
2697
|
+
}), C("polygon", y.polygonIcon, "Click to start drawing a 2D polygon", function() {
|
|
2633
2698
|
a.startDrawingPolygon({
|
|
2634
2699
|
callback: function(S) {
|
|
2635
2700
|
f.executeListeners({
|
|
@@ -2638,64 +2703,64 @@ var Ce = function() {
|
|
|
2638
2703
|
});
|
|
2639
2704
|
}
|
|
2640
2705
|
});
|
|
2641
|
-
}),
|
|
2706
|
+
}), C("extent", y.extentIcon, "Click to start drawing an Extent", function() {
|
|
2642
2707
|
a.startDrawingExtent({
|
|
2643
2708
|
callback: function(S) {
|
|
2644
2709
|
f.executeListeners({ name: "extentCreated", extent: S });
|
|
2645
2710
|
}
|
|
2646
2711
|
});
|
|
2647
|
-
}),
|
|
2712
|
+
}), C("circle", y.circleIcon, "Click to start drawing a Circle", function() {
|
|
2648
2713
|
a.startDrawingCircle({
|
|
2649
|
-
callback: function(S,
|
|
2714
|
+
callback: function(S, L) {
|
|
2650
2715
|
f.executeListeners({
|
|
2651
2716
|
name: "circleCreated",
|
|
2652
2717
|
center: S,
|
|
2653
|
-
radius:
|
|
2718
|
+
radius: L
|
|
2654
2719
|
});
|
|
2655
2720
|
}
|
|
2656
2721
|
});
|
|
2657
2722
|
});
|
|
2658
|
-
var
|
|
2659
|
-
|
|
2723
|
+
var b = document.createElement("DIV");
|
|
2724
|
+
b.className = "divider", h.appendChild(b), C("clear", y.clearIcon, "Remove all primitives", function() {
|
|
2660
2725
|
g.primitives.removeAll();
|
|
2661
2726
|
}), ne(this);
|
|
2662
2727
|
}
|
|
2663
2728
|
return s;
|
|
2664
2729
|
}(), i.prototype.addToolbar = function(s, a) {
|
|
2665
|
-
return a =
|
|
2730
|
+
return a = k(a, { container: s }), new i.DrawHelperWidget(this, a);
|
|
2666
2731
|
};
|
|
2667
|
-
function
|
|
2732
|
+
function K(s, a) {
|
|
2668
2733
|
var y = new p.Rectangle();
|
|
2669
2734
|
y.west = Math.min(s.longitude, a.longitude), y.east = Math.max(s.longitude, a.longitude), y.south = Math.min(s.latitude, a.latitude), y.north = Math.max(s.latitude, a.latitude);
|
|
2670
|
-
var
|
|
2671
|
-
return y.east - y.west <
|
|
2735
|
+
var d = p.Math.EPSILON7;
|
|
2736
|
+
return y.east - y.west < d && (y.east += d * 2), y.north - y.south < d && (y.north += d * 2), y;
|
|
2672
2737
|
}
|
|
2673
|
-
function
|
|
2738
|
+
function j(s, a) {
|
|
2674
2739
|
return s.longitude.toFixed(a || 3) + ", " + s.latitude.toFixed(a || 3);
|
|
2675
2740
|
}
|
|
2676
|
-
function
|
|
2741
|
+
function A(s, a) {
|
|
2677
2742
|
if (s == null || typeof s != "object" || s.constructor != Object && s.constructor != Array)
|
|
2678
2743
|
return s;
|
|
2679
2744
|
if (s.constructor == Date || s.constructor == RegExp || s.constructor == Function || s.constructor == String || s.constructor == Number || s.constructor == Boolean)
|
|
2680
2745
|
return new s.constructor(s);
|
|
2681
2746
|
a = a || new s.constructor();
|
|
2682
2747
|
for (var y in s)
|
|
2683
|
-
a[y] = typeof a[y] > "u" ?
|
|
2748
|
+
a[y] = typeof a[y] > "u" ? A(s[y], null) : a[y];
|
|
2684
2749
|
return a;
|
|
2685
2750
|
}
|
|
2686
|
-
function
|
|
2751
|
+
function $(s, a) {
|
|
2687
2752
|
s = s || {};
|
|
2688
2753
|
var y;
|
|
2689
2754
|
for (y in a)
|
|
2690
|
-
s[y] === void 0 && (s[y] =
|
|
2755
|
+
s[y] === void 0 && (s[y] = A(a[y]));
|
|
2691
2756
|
}
|
|
2692
|
-
function
|
|
2693
|
-
var y =
|
|
2694
|
-
for (
|
|
2695
|
-
y[
|
|
2757
|
+
function k(s, a) {
|
|
2758
|
+
var y = A(s), d;
|
|
2759
|
+
for (d in a)
|
|
2760
|
+
y[d] === void 0 && (y[d] = A(a[d]));
|
|
2696
2761
|
return y;
|
|
2697
2762
|
}
|
|
2698
|
-
function
|
|
2763
|
+
function W(s, a, y) {
|
|
2699
2764
|
s[a] = y;
|
|
2700
2765
|
}
|
|
2701
2766
|
function ne(s) {
|
|
@@ -2703,30 +2768,30 @@ var Ce = function() {
|
|
|
2703
2768
|
return this._listeners[a] = this._listeners[a] || [], this._listeners[a].push(y), this._listeners[a].length;
|
|
2704
2769
|
}, s.executeListeners = function(a, y) {
|
|
2705
2770
|
if (this._listeners[a.name] && this._listeners[a.name].length > 0)
|
|
2706
|
-
for (var
|
|
2707
|
-
this._listeners[a.name][
|
|
2771
|
+
for (var d = 0; d < this._listeners[a.name].length; d++)
|
|
2772
|
+
this._listeners[a.name][d](a);
|
|
2708
2773
|
else
|
|
2709
2774
|
y && y(a);
|
|
2710
2775
|
};
|
|
2711
2776
|
}
|
|
2712
2777
|
return i;
|
|
2713
2778
|
}();
|
|
2714
|
-
const
|
|
2779
|
+
const eo = 2, to = (e, n) => {
|
|
2715
2780
|
switch (e) {
|
|
2716
|
-
case
|
|
2717
|
-
if (n.features.length !==
|
|
2781
|
+
case ae.BOX: {
|
|
2782
|
+
if (n.features.length !== eo)
|
|
2718
2783
|
throw new Error(`${e} must have 2 points`);
|
|
2719
|
-
const t =
|
|
2784
|
+
const t = wt(n.features, (o) => {
|
|
2720
2785
|
var r;
|
|
2721
|
-
return ((r = o.properties) == null ? void 0 : r.type) ===
|
|
2722
|
-
}), i =
|
|
2786
|
+
return ((r = o.properties) == null ? void 0 : r.type) === st.BOTTOM_LEFT;
|
|
2787
|
+
}), i = wt(n.features, (o) => {
|
|
2723
2788
|
var r;
|
|
2724
|
-
return ((r = o.properties) == null ? void 0 : r.type) ===
|
|
2789
|
+
return ((r = o.properties) == null ? void 0 : r.type) === st.TOP_RIGHT;
|
|
2725
2790
|
});
|
|
2726
2791
|
if (i && t) {
|
|
2727
2792
|
if (t.geometry.coordinates[0] === i.geometry.coordinates[0] && t.geometry.coordinates[1] === i.geometry.coordinates[1])
|
|
2728
2793
|
throw new Error(`${e} must define BOTTOM_LEFT and TOP_RIGHT different points`);
|
|
2729
|
-
return
|
|
2794
|
+
return Pe.fromDegrees(
|
|
2730
2795
|
t.geometry.coordinates[0],
|
|
2731
2796
|
t.geometry.coordinates[1],
|
|
2732
2797
|
i.geometry.coordinates[0],
|
|
@@ -2738,10 +2803,10 @@ const Yr = 2, Xr = (e, n) => {
|
|
|
2738
2803
|
default:
|
|
2739
2804
|
throw new Error(`${e} type geoJSON still not supported`);
|
|
2740
2805
|
}
|
|
2741
|
-
},
|
|
2806
|
+
}, no = (e) => {
|
|
2742
2807
|
const n = e.map((t) => {
|
|
2743
|
-
const i =
|
|
2744
|
-
return [
|
|
2808
|
+
const i = Be.fromCartesian(t);
|
|
2809
|
+
return [ge.toDegrees(i.longitude), ge.toDegrees(i.latitude)];
|
|
2745
2810
|
});
|
|
2746
2811
|
return n.push(n[0]), {
|
|
2747
2812
|
type: "Feature",
|
|
@@ -2751,51 +2816,51 @@ const Yr = 2, Xr = (e, n) => {
|
|
|
2751
2816
|
coordinates: [n]
|
|
2752
2817
|
}
|
|
2753
2818
|
};
|
|
2754
|
-
},
|
|
2755
|
-
const n =
|
|
2756
|
-
[
|
|
2757
|
-
[
|
|
2819
|
+
}, io = (e) => {
|
|
2820
|
+
const n = jt.lineString([
|
|
2821
|
+
[ge.toDegrees(e.west), ge.toDegrees(e.south)],
|
|
2822
|
+
[ge.toDegrees(e.east), ge.toDegrees(e.north)]
|
|
2758
2823
|
]);
|
|
2759
|
-
return qt(
|
|
2760
|
-
},
|
|
2761
|
-
const n =
|
|
2824
|
+
return Yt(qt(n));
|
|
2825
|
+
}, ro = (e) => {
|
|
2826
|
+
const n = jt.lineString([
|
|
2762
2827
|
[e.west, e.south],
|
|
2763
2828
|
[e.east, e.north]
|
|
2764
2829
|
]);
|
|
2765
|
-
return qt(
|
|
2830
|
+
return Yt(qt(n)).geometry.coordinates[0].map((i) => ve.fromRadiansArray(i)[0]);
|
|
2766
2831
|
};
|
|
2767
|
-
class
|
|
2832
|
+
class $s extends rt {
|
|
2768
2833
|
}
|
|
2769
|
-
const
|
|
2770
|
-
const { drawState: n, drawingMaterial: t, drawingVertexColor: i, material: o, hollow: r, outlineWidth:
|
|
2771
|
-
|
|
2772
|
-
|
|
2834
|
+
const Ws = (e) => {
|
|
2835
|
+
const { drawState: n, drawingMaterial: t, drawingVertexColor: i, material: o, hollow: r, outlineWidth: c } = e, u = le(), [m, v] = I();
|
|
2836
|
+
x(() => {
|
|
2837
|
+
v(
|
|
2773
2838
|
// eslint-disable-next-line
|
|
2774
|
-
new
|
|
2839
|
+
new be(u, t, i)
|
|
2775
2840
|
);
|
|
2776
|
-
}, []),
|
|
2777
|
-
if (
|
|
2778
|
-
const
|
|
2841
|
+
}, []), x(() => {
|
|
2842
|
+
if (m) {
|
|
2843
|
+
const _ = m;
|
|
2779
2844
|
if (n.drawing)
|
|
2780
2845
|
switch (n.type) {
|
|
2781
|
-
case
|
|
2782
|
-
u.scene.globe.depthTestAgainstTerrain = !1,
|
|
2783
|
-
callback: (
|
|
2846
|
+
case ae.POLYGON:
|
|
2847
|
+
u.scene.globe.depthTestAgainstTerrain = !1, _.startDrawingPolygon({
|
|
2848
|
+
callback: (w) => {
|
|
2784
2849
|
n.handler({
|
|
2785
|
-
primitive:
|
|
2786
|
-
type:
|
|
2787
|
-
geojson:
|
|
2850
|
+
primitive: w,
|
|
2851
|
+
type: ae.POLYGON,
|
|
2852
|
+
geojson: no(w)
|
|
2788
2853
|
});
|
|
2789
2854
|
}
|
|
2790
2855
|
});
|
|
2791
2856
|
break;
|
|
2792
|
-
case
|
|
2793
|
-
u.scene.globe.depthTestAgainstTerrain = !1,
|
|
2794
|
-
callback: (
|
|
2857
|
+
case ae.BOX:
|
|
2858
|
+
u.scene.globe.depthTestAgainstTerrain = !1, _.startDrawingExtent({
|
|
2859
|
+
callback: (w) => {
|
|
2795
2860
|
n.handler({
|
|
2796
|
-
primitive:
|
|
2797
|
-
type:
|
|
2798
|
-
geojson:
|
|
2861
|
+
primitive: w,
|
|
2862
|
+
type: ae.BOX,
|
|
2863
|
+
geojson: io(w)
|
|
2799
2864
|
});
|
|
2800
2865
|
}
|
|
2801
2866
|
});
|
|
@@ -2804,147 +2869,120 @@ const Ts = (e) => {
|
|
|
2804
2869
|
throw new Error(`[CESIUM DRAW]: ${n.type} unrecognized primitive to draw.`);
|
|
2805
2870
|
}
|
|
2806
2871
|
else
|
|
2807
|
-
|
|
2872
|
+
_.stopDrawing(), u.scene.globe.depthTestAgainstTerrain = !0;
|
|
2808
2873
|
}
|
|
2809
|
-
}, [n,
|
|
2810
|
-
const
|
|
2874
|
+
}, [n, m]);
|
|
2875
|
+
const E = (_) => {
|
|
2811
2876
|
try {
|
|
2812
|
-
let
|
|
2877
|
+
let w = _.coordinates !== void 0 ? _.coordinates : to(_.type, _.geojson);
|
|
2813
2878
|
if (r !== !0)
|
|
2814
|
-
switch (
|
|
2815
|
-
case
|
|
2816
|
-
return /* @__PURE__ */ l(
|
|
2817
|
-
case
|
|
2818
|
-
return /* @__PURE__ */ l(
|
|
2879
|
+
switch (_.type) {
|
|
2880
|
+
case ae.BOX:
|
|
2881
|
+
return /* @__PURE__ */ l(Zr, { coordinates: w, material: o ?? t });
|
|
2882
|
+
case ae.POLYGON:
|
|
2883
|
+
return /* @__PURE__ */ l(Xr, { hierarchy: new Mi(w), material: o ?? t });
|
|
2819
2884
|
default:
|
|
2820
2885
|
return /* @__PURE__ */ l(te, {});
|
|
2821
2886
|
}
|
|
2822
2887
|
else {
|
|
2823
|
-
switch (
|
|
2824
|
-
case
|
|
2825
|
-
|
|
2888
|
+
switch (_.type) {
|
|
2889
|
+
case ae.BOX:
|
|
2890
|
+
w = ro(w);
|
|
2826
2891
|
break;
|
|
2827
|
-
case
|
|
2828
|
-
|
|
2892
|
+
case ae.POLYGON:
|
|
2893
|
+
w = [...w, w[0]];
|
|
2829
2894
|
break;
|
|
2830
2895
|
default:
|
|
2831
2896
|
return /* @__PURE__ */ l(te, {});
|
|
2832
2897
|
}
|
|
2833
|
-
return /* @__PURE__ */ l(
|
|
2898
|
+
return /* @__PURE__ */ l(Qr, { clampToGround: !0, positions: w, width: c ?? 1, material: o ?? t });
|
|
2834
2899
|
}
|
|
2835
|
-
} catch (
|
|
2836
|
-
return console.error(
|
|
2900
|
+
} catch (w) {
|
|
2901
|
+
return console.error(w), /* @__PURE__ */ l(te, {});
|
|
2837
2902
|
}
|
|
2838
2903
|
};
|
|
2839
|
-
return /* @__PURE__ */ l(
|
|
2840
|
-
/* @__PURE__ */ N(
|
|
2904
|
+
return /* @__PURE__ */ l(Jr, { ...e, children: e.drawings.map((_, w) => /* @__PURE__ */ N(qr, { name: _.name, children: [
|
|
2905
|
+
/* @__PURE__ */ N(Yr, { children: [
|
|
2841
2906
|
/* @__PURE__ */ N("h1", { children: [
|
|
2842
2907
|
"Drawed Entity ",
|
|
2843
|
-
|
|
2908
|
+
_.name
|
|
2844
2909
|
] }),
|
|
2845
2910
|
/* @__PURE__ */ l("p", { children: "This is description of drawed entity" })
|
|
2846
2911
|
] }),
|
|
2847
|
-
|
|
2848
|
-
] },
|
|
2849
|
-
}
|
|
2850
|
-
class _s extends vi {
|
|
2851
|
-
}
|
|
2852
|
-
class Ls extends Ei {
|
|
2853
|
-
}
|
|
2854
|
-
class Ss extends Ci {
|
|
2855
|
-
}
|
|
2856
|
-
class Ms extends Ee {
|
|
2857
|
-
}
|
|
2858
|
-
class Ps extends pe {
|
|
2859
|
-
}
|
|
2860
|
-
class Ds extends Oe {
|
|
2861
|
-
}
|
|
2862
|
-
class As extends wi {
|
|
2863
|
-
}
|
|
2864
|
-
class Is extends Wt {
|
|
2865
|
-
}
|
|
2866
|
-
class xs extends bi {
|
|
2867
|
-
}
|
|
2868
|
-
class ks extends Se {
|
|
2869
|
-
}
|
|
2870
|
-
class Os extends Ti {
|
|
2871
|
-
}
|
|
2872
|
-
class Rs extends _i {
|
|
2873
|
-
}
|
|
2874
|
-
class Ns extends Li {
|
|
2875
|
-
}
|
|
2876
|
-
const Bs = it, Fs = Ut, Hs = (e) => {
|
|
2912
|
+
E(_)
|
|
2913
|
+
] }, _.id)) });
|
|
2914
|
+
}, Us = (e) => {
|
|
2877
2915
|
const n = le();
|
|
2878
|
-
return
|
|
2879
|
-
n.extend(
|
|
2916
|
+
return x(() => {
|
|
2917
|
+
n.extend(Pi);
|
|
2880
2918
|
}, [n]), /* @__PURE__ */ l(te, {});
|
|
2881
|
-
},
|
|
2882
|
-
const n = le(), t = (r,
|
|
2919
|
+
}, oo = -25, Ot = 2, Ks = (e) => {
|
|
2920
|
+
const n = le(), t = (r, c = ",") => r.slice(r.indexOf(`
|
|
2883
2921
|
`) + 1).split(`
|
|
2884
|
-
`).map((
|
|
2885
|
-
const
|
|
2922
|
+
`).map((v) => {
|
|
2923
|
+
const E = v.split(c);
|
|
2886
2924
|
return {
|
|
2887
|
-
cartographic:
|
|
2888
|
-
cartesian: new
|
|
2925
|
+
cartographic: Be.fromDegrees(parseFloat(E[0]), parseFloat(E[1])),
|
|
2926
|
+
cartesian: new Ce(parseFloat(E[0]), parseFloat(E[1]))
|
|
2889
2927
|
};
|
|
2890
2928
|
}), i = (r) => {
|
|
2891
2929
|
var u;
|
|
2892
2930
|
r.preventDefault(), r.persist();
|
|
2893
|
-
const
|
|
2894
|
-
|
|
2895
|
-
var
|
|
2896
|
-
const
|
|
2931
|
+
const c = new FileReader();
|
|
2932
|
+
c.onload = (m) => {
|
|
2933
|
+
var w;
|
|
2934
|
+
const v = (w = m.target) == null ? void 0 : w.result, E = t(v), _ = Ut.WGS84;
|
|
2897
2935
|
console.log(`Loaded CSV content:
|
|
2898
|
-
`,
|
|
2936
|
+
`, v), Di(
|
|
2899
2937
|
n.terrainProvider,
|
|
2900
|
-
|
|
2938
|
+
E.map((P) => P.cartographic)
|
|
2901
2939
|
).then(
|
|
2902
2940
|
(P) => {
|
|
2903
|
-
console.log(P), P = P.slice(0, P.length - 1), n.scene.globe.depthTestAgainstTerrain = !0, n.entities.suspendEvents(), n.entities.removeAll(), P.forEach((
|
|
2941
|
+
console.log(P), P = P.slice(0, P.length - 1), n.scene.globe.depthTestAgainstTerrain = !0, n.entities.suspendEvents(), n.entities.removeAll(), P.forEach((R, V) => {
|
|
2904
2942
|
n.entities.add({
|
|
2905
|
-
name: (
|
|
2906
|
-
position:
|
|
2943
|
+
name: (V + Ot).toString(),
|
|
2944
|
+
position: _.cartographicToCartesian(R),
|
|
2907
2945
|
billboard: {
|
|
2908
2946
|
verticalOrigin: it.BOTTOM,
|
|
2909
2947
|
scale: 0.7,
|
|
2910
2948
|
image: "assets/img/map-marker.gif"
|
|
2911
2949
|
},
|
|
2912
2950
|
label: {
|
|
2913
|
-
text: (
|
|
2951
|
+
text: (V + Ot).toString(),
|
|
2914
2952
|
font: "14pt monospace",
|
|
2915
|
-
fillColor:
|
|
2916
|
-
style:
|
|
2953
|
+
fillColor: rt.BLACK,
|
|
2954
|
+
style: Kt.FILL_AND_OUTLINE,
|
|
2917
2955
|
outlineWidth: 4,
|
|
2918
|
-
outlineColor:
|
|
2956
|
+
outlineColor: rt.BLACK,
|
|
2919
2957
|
verticalOrigin: it.BOTTOM,
|
|
2920
|
-
pixelOffset: new
|
|
2958
|
+
pixelOffset: new Ce(0, oo)
|
|
2921
2959
|
},
|
|
2922
2960
|
description: `
|
|
2923
|
-
Long: ${
|
|
2924
|
-
Lat: ${
|
|
2925
|
-
Height(m): <span style="font-weight: 500">${
|
|
2961
|
+
Long: ${E[V].cartesian.x} </br>
|
|
2962
|
+
Lat: ${E[V].cartesian.y} </br>
|
|
2963
|
+
Height(m): <span style="font-weight: 500">${R.height}</span>
|
|
2926
2964
|
`
|
|
2927
2965
|
});
|
|
2928
|
-
}), n.entities.resumeEvents(), r.target.files !== null && (o(`terranian_heights_${r.target.files[0].name}`,
|
|
2966
|
+
}), n.entities.resumeEvents(), r.target.files !== null && (o(`terranian_heights_${r.target.files[0].name}`, E), r.target.value = ""), console.log("Pinned point count is ", n.entities.values.length);
|
|
2929
2967
|
},
|
|
2930
2968
|
(P) => {
|
|
2931
2969
|
console.error("ERROR while sampleTerrainMostDetailed:", P);
|
|
2932
2970
|
}
|
|
2933
2971
|
);
|
|
2934
|
-
}, (u = r.target.files) != null && u[0] &&
|
|
2935
|
-
}, o = (r,
|
|
2936
|
-
const u = (
|
|
2972
|
+
}, (u = r.target.files) != null && u[0] && c.readAsText(r.target.files[0]);
|
|
2973
|
+
}, o = (r, c) => {
|
|
2974
|
+
const u = (w) => {
|
|
2937
2975
|
let P = "";
|
|
2938
|
-
return P +=
|
|
2976
|
+
return P += w.cartesian.x.toString() + ",", P += w.cartesian.y.toString() + ",", P += w.cartographic.height.toString(), P + `
|
|
2939
2977
|
`;
|
|
2940
2978
|
};
|
|
2941
|
-
let
|
|
2979
|
+
let m = `long,lat,height
|
|
2942
2980
|
`;
|
|
2943
|
-
|
|
2944
|
-
|
|
2981
|
+
c.forEach((w) => {
|
|
2982
|
+
m += u(w);
|
|
2945
2983
|
});
|
|
2946
|
-
const
|
|
2947
|
-
|
|
2984
|
+
const v = new Blob([m], { type: "text/csv;charset=utf-8;" }), E = document.createElement("a"), _ = URL.createObjectURL(v);
|
|
2985
|
+
E.setAttribute("href", _), E.setAttribute("download", r), E.style.visibility = "hidden", document.body.appendChild(E), E.click(), document.body.removeChild(E);
|
|
2948
2986
|
};
|
|
2949
2987
|
return /* @__PURE__ */ l(te, { children: /* @__PURE__ */ l(
|
|
2950
2988
|
"input",
|
|
@@ -2958,8 +2996,8 @@ const Bs = it, Fs = Ut, Hs = (e) => {
|
|
|
2958
2996
|
}
|
|
2959
2997
|
) });
|
|
2960
2998
|
};
|
|
2961
|
-
const
|
|
2962
|
-
const [n, t] =
|
|
2999
|
+
const so = 38, ao = 40, lo = 13, co = 14, uo = 27, ho = 9, mo = 10, po = 100, go = (e) => {
|
|
3000
|
+
const [n, t] = I(e.defaultValue ?? ""), [i, o] = I(!1), [r, c] = I({
|
|
2963
3001
|
helperVisible: !1,
|
|
2964
3002
|
left: 0,
|
|
2965
3003
|
right: 0,
|
|
@@ -2972,69 +3010,69 @@ const to = 38, no = 40, io = 13, ro = 14, oo = 27, so = 9, ao = 10, lo = 100, co
|
|
|
2972
3010
|
value: "",
|
|
2973
3011
|
caret: 0,
|
|
2974
3012
|
width: "unset"
|
|
2975
|
-
}), u =
|
|
2976
|
-
|
|
3013
|
+
}), u = _e(null);
|
|
3014
|
+
x(() => (window.addEventListener("resize", R), () => {
|
|
2977
3015
|
try {
|
|
2978
|
-
window.removeEventListener("resize",
|
|
3016
|
+
window.removeEventListener("resize", R);
|
|
2979
3017
|
} catch (f) {
|
|
2980
3018
|
console.log('WINDOW "resize" remove listener failed', f);
|
|
2981
3019
|
}
|
|
2982
|
-
}), []),
|
|
3020
|
+
}), []), x(() => {
|
|
2983
3021
|
typeof e.value < "u" && t(e.value), typeof e.defaultValue < "u" && t(e.defaultValue);
|
|
2984
|
-
}, [e.value, e.defaultValue]),
|
|
2985
|
-
const { options: f } = e, { caret:
|
|
2986
|
-
|
|
3022
|
+
}, [e.value, e.defaultValue]), x(() => {
|
|
3023
|
+
const { options: f } = e, { caret: h } = r;
|
|
3024
|
+
K(n, h, f);
|
|
2987
3025
|
}, [e]);
|
|
2988
|
-
const
|
|
2989
|
-
const { trigger: g, matchAny:
|
|
3026
|
+
const m = (f, h, C) => {
|
|
3027
|
+
const { trigger: g, matchAny: b, regex: S } = e, L = new RegExp(S);
|
|
2990
3028
|
let T = g;
|
|
2991
3029
|
Array.isArray(T) || (T = new Array(g)), T.sort();
|
|
2992
3030
|
const M = {};
|
|
2993
|
-
Array.isArray(
|
|
2994
|
-
M[
|
|
3031
|
+
Array.isArray(C) && T.forEach((Y) => {
|
|
3032
|
+
M[Y] = C;
|
|
2995
3033
|
});
|
|
2996
|
-
const D =
|
|
3034
|
+
const D = v(T, L);
|
|
2997
3035
|
let U = {};
|
|
2998
|
-
for (let
|
|
2999
|
-
const { triggerStr:
|
|
3000
|
-
for (let ie =
|
|
3001
|
-
const
|
|
3002
|
-
let
|
|
3036
|
+
for (let Y = 0; Y < D.length; Y++) {
|
|
3037
|
+
const { triggerStr: O, triggerMatch: z, triggerLength: Q } = D[Y];
|
|
3038
|
+
for (let ie = h - 1; ie >= 0; --ie) {
|
|
3039
|
+
const de = f.substring(ie, h).match(L);
|
|
3040
|
+
let se = -1;
|
|
3003
3041
|
if (Q > 0) {
|
|
3004
|
-
const
|
|
3005
|
-
if (
|
|
3042
|
+
const B = z ? ie : ie - Q + 1;
|
|
3043
|
+
if (B < 0 || (E(O, f, B) && (se = B + Q), !de && se < 0))
|
|
3006
3044
|
break;
|
|
3007
3045
|
} else {
|
|
3008
|
-
if (
|
|
3046
|
+
if (de && ie > 0)
|
|
3009
3047
|
continue;
|
|
3010
|
-
if (
|
|
3048
|
+
if (se = ie === 0 && de ? 0 : ie + 1, h - se === 0)
|
|
3011
3049
|
break;
|
|
3012
3050
|
}
|
|
3013
|
-
if (
|
|
3014
|
-
const
|
|
3015
|
-
if (!Array.isArray(
|
|
3051
|
+
if (se >= 0) {
|
|
3052
|
+
const B = M[O];
|
|
3053
|
+
if (!Array.isArray(B))
|
|
3016
3054
|
continue;
|
|
3017
|
-
const
|
|
3018
|
-
const
|
|
3019
|
-
return
|
|
3020
|
-
}),
|
|
3055
|
+
const F = f.substring(se, h), ee = B.filter((ye) => {
|
|
3056
|
+
const xe = ye.toLowerCase().indexOf(F.toLowerCase());
|
|
3057
|
+
return xe !== -1 && (b || xe === 0);
|
|
3058
|
+
}), we = O, Le = F.length;
|
|
3021
3059
|
U = {
|
|
3022
3060
|
...U,
|
|
3023
|
-
trigger:
|
|
3024
|
-
matchStart:
|
|
3025
|
-
matchLength:
|
|
3026
|
-
options:
|
|
3061
|
+
trigger: we,
|
|
3062
|
+
matchStart: se,
|
|
3063
|
+
matchLength: Le,
|
|
3064
|
+
options: ee
|
|
3027
3065
|
};
|
|
3028
3066
|
}
|
|
3029
3067
|
}
|
|
3030
3068
|
}
|
|
3031
3069
|
return U;
|
|
3032
|
-
},
|
|
3070
|
+
}, v = (f, h) => f.map((g) => ({
|
|
3033
3071
|
triggerStr: g,
|
|
3034
|
-
triggerMatch: g.match(
|
|
3072
|
+
triggerMatch: g.match(h),
|
|
3035
3073
|
triggerLength: g.length
|
|
3036
|
-
})),
|
|
3037
|
-
const { onChange:
|
|
3074
|
+
})), E = (f, h, C) => !f || !f.length || h.substr(C, f.length) === f, _ = (f) => {
|
|
3075
|
+
const { onChange: h, options: C, spaceRemovers: g, spacer: b, value: S } = e, L = n, T = f.target.value, M = Ri(w(f.target)).end;
|
|
3038
3076
|
if (T.length || H({
|
|
3039
3077
|
...r,
|
|
3040
3078
|
helperVisible: !1
|
|
@@ -3043,110 +3081,110 @@ const to = 38, no = 40, io = 13, ro = 14, oo = 27, so = 9, ao = 10, lo = 100, co
|
|
|
3043
3081
|
caret: M,
|
|
3044
3082
|
value: f.target.value
|
|
3045
3083
|
}), !T.length || !M)
|
|
3046
|
-
return
|
|
3047
|
-
if (i && g.length && T.length > 2 &&
|
|
3048
|
-
for (let D = 0; D < Math.max(
|
|
3049
|
-
if (
|
|
3050
|
-
if (D >= 2 && T[D - 1] ===
|
|
3084
|
+
return h(f.target.value);
|
|
3085
|
+
if (i && g.length && T.length > 2 && b.length) {
|
|
3086
|
+
for (let D = 0; D < Math.max(L.length, T.length); ++D)
|
|
3087
|
+
if (L[D] !== T[D]) {
|
|
3088
|
+
if (D >= 2 && T[D - 1] === b && g.indexOf(T[D - 2]) === -1 && g.indexOf(T[D]) !== -1 && !ot(m(T.substring(0, D - 2), M - 3, C))) {
|
|
3051
3089
|
const U = `${T.slice(0, D - 1)}${T.slice(D, D + 1)}${T.slice(D - 1, D)}${T.slice(D + 1)}`;
|
|
3052
3090
|
return q(D + 1), u.current !== null && (u.current.value = U), S || H({
|
|
3053
3091
|
...r,
|
|
3054
3092
|
value: U
|
|
3055
|
-
}),
|
|
3093
|
+
}), h(U);
|
|
3056
3094
|
}
|
|
3057
3095
|
break;
|
|
3058
3096
|
}
|
|
3059
3097
|
o(!1);
|
|
3060
3098
|
}
|
|
3061
|
-
return
|
|
3062
|
-
},
|
|
3099
|
+
return K(T, M, C), h(f.target.value);
|
|
3100
|
+
}, w = (f) => {
|
|
3063
3101
|
if (f !== void 0)
|
|
3064
3102
|
if (f.children.length > 0) {
|
|
3065
|
-
const
|
|
3066
|
-
if (
|
|
3067
|
-
return
|
|
3068
|
-
const
|
|
3069
|
-
if (
|
|
3070
|
-
return
|
|
3103
|
+
const h = f.getElementsByTagName("textarea");
|
|
3104
|
+
if (h.length > 0)
|
|
3105
|
+
return h[0];
|
|
3106
|
+
const C = f.getElementsByTagName("input");
|
|
3107
|
+
if (C.length > 0)
|
|
3108
|
+
return C[0];
|
|
3071
3109
|
} else
|
|
3072
3110
|
return f;
|
|
3073
3111
|
}, P = (f) => {
|
|
3074
|
-
const { helperVisible:
|
|
3075
|
-
if (
|
|
3112
|
+
const { helperVisible: h, options: C, selection: g } = r, { onKeyDown: b, passThroughEnter: S } = e;
|
|
3113
|
+
if (h)
|
|
3076
3114
|
switch (f.keyCode) {
|
|
3077
|
-
case
|
|
3078
|
-
f.preventDefault(),
|
|
3115
|
+
case uo:
|
|
3116
|
+
f.preventDefault(), j();
|
|
3079
3117
|
break;
|
|
3080
|
-
case
|
|
3118
|
+
case so:
|
|
3081
3119
|
f.preventDefault(), H({
|
|
3082
3120
|
...r,
|
|
3083
|
-
selection: (
|
|
3121
|
+
selection: (C.length + g - 1) % C.length
|
|
3084
3122
|
});
|
|
3085
3123
|
break;
|
|
3086
|
-
case
|
|
3124
|
+
case ao:
|
|
3087
3125
|
f.preventDefault(), H({
|
|
3088
3126
|
...r,
|
|
3089
|
-
selection: (g + 1) %
|
|
3127
|
+
selection: (g + 1) % C.length
|
|
3090
3128
|
});
|
|
3091
3129
|
break;
|
|
3092
|
-
case
|
|
3093
|
-
case
|
|
3094
|
-
S || f.preventDefault(),
|
|
3130
|
+
case co:
|
|
3131
|
+
case lo:
|
|
3132
|
+
S || f.preventDefault(), V(g);
|
|
3095
3133
|
break;
|
|
3096
|
-
case
|
|
3097
|
-
|
|
3134
|
+
case ho:
|
|
3135
|
+
V(g);
|
|
3098
3136
|
break;
|
|
3099
3137
|
default:
|
|
3100
|
-
|
|
3138
|
+
b(f);
|
|
3101
3139
|
break;
|
|
3102
3140
|
}
|
|
3103
3141
|
else
|
|
3104
|
-
|
|
3105
|
-
},
|
|
3142
|
+
b(f);
|
|
3143
|
+
}, R = () => {
|
|
3106
3144
|
H({
|
|
3107
3145
|
...r,
|
|
3108
3146
|
helperVisible: !1
|
|
3109
3147
|
});
|
|
3110
|
-
},
|
|
3111
|
-
const { spacer:
|
|
3112
|
-
|
|
3148
|
+
}, V = (f) => {
|
|
3149
|
+
const { spacer: h, onSelect: C, changeOnSelect: g } = e, { matchStart: b, matchLength: S, options: L, trigger: T } = r, M = L[f], D = n, U = D.substring(0, b - T.length), Y = D.substring(b + S), O = { target: u.current }, z = g(T, M);
|
|
3150
|
+
O.target !== null && (O.target.value = `${U}${z}${h}${Y}`), _(O), O.target !== null && C(O.target.value), j(), q(U.length + z.length + 1), o(!0);
|
|
3113
3151
|
}, q = (f) => {
|
|
3114
3152
|
H({
|
|
3115
3153
|
...r,
|
|
3116
3154
|
caret: f
|
|
3117
3155
|
});
|
|
3118
|
-
const
|
|
3119
|
-
|
|
3156
|
+
const h = w(u.current);
|
|
3157
|
+
Ni(h, f);
|
|
3120
3158
|
}, H = (f) => {
|
|
3121
3159
|
setTimeout(() => {
|
|
3122
|
-
|
|
3160
|
+
c({
|
|
3123
3161
|
...f
|
|
3124
3162
|
});
|
|
3125
3163
|
}, 0);
|
|
3126
|
-
},
|
|
3164
|
+
}, K = (f, h, C) => {
|
|
3127
3165
|
const g = u.current;
|
|
3128
3166
|
if (u.current === null)
|
|
3129
3167
|
return;
|
|
3130
|
-
const
|
|
3131
|
-
if (
|
|
3168
|
+
const b = w(g);
|
|
3169
|
+
if (b === void 0)
|
|
3132
3170
|
return;
|
|
3133
|
-
const S = g.getBoundingClientRect(),
|
|
3134
|
-
if (Object.keys(
|
|
3135
|
-
const T =
|
|
3136
|
-
let z, Q, ie,
|
|
3137
|
-
|
|
3171
|
+
const S = g.getBoundingClientRect(), L = m(f, h, C);
|
|
3172
|
+
if (Object.keys(L).length > 0 && b !== null) {
|
|
3173
|
+
const T = Oi(b, h), M = b.getBoundingClientRect(), { minChars: D, onRequestOptions: U, requestOnlyIfNoOptions: Y, mode: O } = e;
|
|
3174
|
+
let z, Q, ie, fe = "unset";
|
|
3175
|
+
O === "assist" ? (z = g === b ? T.top + b.offsetTop : T.top + S.top, Q = Math.min(T.left + b.offsetLeft - mo, b.offsetLeft + M.width - po)) : (z = S.top + g.offsetHeight, Q = g.offsetLeft, ie = g.offsetLeft - g.offsetWidth, fe = `${S.width}px`), L.matchLength >= D && (L.options.length > 1 || L.options.length === 1 && L.options[0].length !== L.matchLength) ? H({
|
|
3138
3176
|
...r,
|
|
3139
3177
|
value: f,
|
|
3140
3178
|
helperVisible: !0,
|
|
3141
3179
|
top: z,
|
|
3142
3180
|
left: Q,
|
|
3143
3181
|
right: ie,
|
|
3144
|
-
width:
|
|
3145
|
-
...
|
|
3146
|
-
}) : ((!
|
|
3182
|
+
width: fe,
|
|
3183
|
+
...L
|
|
3184
|
+
}) : ((!Y || !L.options.length) && U(f.substr(L.matchStart, L.matchLength)), j());
|
|
3147
3185
|
} else
|
|
3148
|
-
|
|
3149
|
-
},
|
|
3186
|
+
j();
|
|
3187
|
+
}, j = () => {
|
|
3150
3188
|
setTimeout(() => {
|
|
3151
3189
|
H({
|
|
3152
3190
|
...r,
|
|
@@ -3154,60 +3192,60 @@ const to = 38, no = 40, io = 13, ro = 14, oo = 27, so = 9, ao = 10, lo = 100, co
|
|
|
3154
3192
|
selection: 0
|
|
3155
3193
|
});
|
|
3156
3194
|
}, 100);
|
|
3157
|
-
},
|
|
3158
|
-
const { helperVisible: f, left:
|
|
3195
|
+
}, A = () => {
|
|
3196
|
+
const { helperVisible: f, left: h, right: C, matchStart: g, matchLength: b, options: S, selection: L, top: T, value: M, width: D } = r;
|
|
3159
3197
|
if (!f)
|
|
3160
3198
|
return null;
|
|
3161
|
-
const { maxOptions: U, offsetX:
|
|
3199
|
+
const { maxOptions: U, offsetX: Y, offsetY: O, direction: z } = e;
|
|
3162
3200
|
if (S.length === 0)
|
|
3163
3201
|
return null;
|
|
3164
|
-
if (
|
|
3202
|
+
if (L >= S.length)
|
|
3165
3203
|
return H({
|
|
3166
3204
|
...r,
|
|
3167
3205
|
selection: 0
|
|
3168
3206
|
}), null;
|
|
3169
|
-
const Q = U === 0 ? S.length : U, ie = S.slice(0, Q).map((
|
|
3170
|
-
const
|
|
3207
|
+
const Q = U === 0 ? S.length : U, ie = S.slice(0, Q).map((de, se) => {
|
|
3208
|
+
const B = de.toLowerCase().indexOf(M.substr(g, b).toLowerCase());
|
|
3171
3209
|
return /* @__PURE__ */ N(
|
|
3172
3210
|
"li",
|
|
3173
3211
|
{
|
|
3174
|
-
className:
|
|
3212
|
+
className: se === L ? "active" : void 0,
|
|
3175
3213
|
onClick: () => {
|
|
3176
|
-
|
|
3214
|
+
V(se);
|
|
3177
3215
|
},
|
|
3178
3216
|
onMouseEnter: () => {
|
|
3179
3217
|
H({
|
|
3180
3218
|
...r,
|
|
3181
|
-
selection:
|
|
3219
|
+
selection: se
|
|
3182
3220
|
});
|
|
3183
3221
|
},
|
|
3184
3222
|
children: [
|
|
3185
|
-
|
|
3186
|
-
/* @__PURE__ */ l("strong", { children:
|
|
3187
|
-
|
|
3223
|
+
de.slice(0, B),
|
|
3224
|
+
/* @__PURE__ */ l("strong", { children: de.substr(B, b) }),
|
|
3225
|
+
de.slice(B + b)
|
|
3188
3226
|
]
|
|
3189
3227
|
},
|
|
3190
|
-
|
|
3228
|
+
de
|
|
3191
3229
|
);
|
|
3192
|
-
}),
|
|
3193
|
-
return /* @__PURE__ */ l("ul", { className: "react-autocomplete-input", style: { ...
|
|
3194
|
-
}, { Component:
|
|
3230
|
+
}), fe = z === "ltr" ? { left: h + Y } : { right: C + Y };
|
|
3231
|
+
return /* @__PURE__ */ l("ul", { className: "react-autocomplete-input", style: { ...fe, top: T + O, width: D }, children: ie });
|
|
3232
|
+
}, { Component: $, ComponentProps: k, defaultValue: W, disabled: ne, onBlur: s, value: a, ...y } = e, d = Object.assign({}, y);
|
|
3195
3233
|
return Object.keys(e).forEach((f) => {
|
|
3196
|
-
delete
|
|
3234
|
+
delete d[f];
|
|
3197
3235
|
}), /* @__PURE__ */ N(te, { children: [
|
|
3198
|
-
|
|
3236
|
+
Ee.cloneElement($, {
|
|
3199
3237
|
disabled: ne,
|
|
3200
3238
|
onBlur: s,
|
|
3201
|
-
onChange:
|
|
3239
|
+
onChange: _,
|
|
3202
3240
|
onKeyDown: P,
|
|
3203
3241
|
ref: u,
|
|
3204
3242
|
value: n,
|
|
3205
|
-
...
|
|
3206
|
-
...
|
|
3243
|
+
...d,
|
|
3244
|
+
...k
|
|
3207
3245
|
}),
|
|
3208
|
-
|
|
3246
|
+
A()
|
|
3209
3247
|
] });
|
|
3210
|
-
},
|
|
3248
|
+
}, fo = {
|
|
3211
3249
|
Component: /* @__PURE__ */ l("textarea", {}),
|
|
3212
3250
|
ComponentProps: {},
|
|
3213
3251
|
defaultValue: void 0,
|
|
@@ -3238,9 +3276,9 @@ const to = 38, no = 40, io = 13, ro = 14, oo = 27, so = 9, ao = 10, lo = 100, co
|
|
|
3238
3276
|
passThroughEnter: !1,
|
|
3239
3277
|
mode: "assist",
|
|
3240
3278
|
direction: "ltr"
|
|
3241
|
-
},
|
|
3279
|
+
}, js = (e) => {
|
|
3242
3280
|
let n = {
|
|
3243
|
-
...
|
|
3281
|
+
...fo,
|
|
3244
3282
|
...e
|
|
3245
3283
|
};
|
|
3246
3284
|
return e.mode === "autocomplete" && (n = {
|
|
@@ -3248,10 +3286,10 @@ const to = 38, no = 40, io = 13, ro = 14, oo = 27, so = 9, ao = 10, lo = 100, co
|
|
|
3248
3286
|
trigger: "",
|
|
3249
3287
|
regex: ".",
|
|
3250
3288
|
spacer: ""
|
|
3251
|
-
}), /* @__PURE__ */ l(
|
|
3252
|
-
},
|
|
3289
|
+
}), /* @__PURE__ */ l(go, { ...n });
|
|
3290
|
+
}, pt = {
|
|
3253
3291
|
formatFileModDate: (e, n) => {
|
|
3254
|
-
const t =
|
|
3292
|
+
const t = Xt.getModDate(n);
|
|
3255
3293
|
return t ? e.formatDate(t, {
|
|
3256
3294
|
dateStyle: "short",
|
|
3257
3295
|
timeStyle: "short"
|
|
@@ -3260,18 +3298,18 @@ const to = 38, no = 40, io = 13, ro = 14, oo = 27, so = 9, ao = 10, lo = 100, co
|
|
|
3260
3298
|
formatFileSize: (e, n) => {
|
|
3261
3299
|
if (!n || typeof n.size != "number")
|
|
3262
3300
|
return null;
|
|
3263
|
-
const t = n.size, i =
|
|
3301
|
+
const t = n.size, i = Gi(t, {
|
|
3264
3302
|
bits: !1,
|
|
3265
3303
|
output: "object"
|
|
3266
3304
|
});
|
|
3267
3305
|
return i.symbol === "B" ? `${Math.round(i.value / 10) / 100} KB` : i.symbol === "KB" ? `${Math.round(i.value)} ${i.symbol}` : `${i.value} ${i.symbol.toUpperCase()}`;
|
|
3268
3306
|
}
|
|
3269
|
-
},
|
|
3270
|
-
locale:
|
|
3271
|
-
formatters: { ...
|
|
3272
|
-
},
|
|
3273
|
-
locale:
|
|
3274
|
-
formatters: { ...
|
|
3307
|
+
}, yo = {
|
|
3308
|
+
locale: ue.EN,
|
|
3309
|
+
formatters: { ...pt }
|
|
3310
|
+
}, vo = {
|
|
3311
|
+
locale: ue.RU,
|
|
3312
|
+
formatters: { ...pt },
|
|
3275
3313
|
messages: {
|
|
3276
3314
|
"chonky.toolbar.searchPlaceholder": "Поиск",
|
|
3277
3315
|
"chonky.toolbar.visibleFileCount": `{fileCount, plural,
|
|
@@ -3309,9 +3347,9 @@ const to = 38, no = 40, io = 13, ro = 14, oo = 27, so = 9, ao = 10, lo = 100, co
|
|
|
3309
3347
|
[`chonky.actions.${G.ToggleHiddenFiles.id}.button.name`]: "Скрытые файлы",
|
|
3310
3348
|
[`chonky.actions.${G.ToggleShowFoldersFirst.id}.button.name`]: "Папки в начале"
|
|
3311
3349
|
}
|
|
3312
|
-
},
|
|
3313
|
-
locale:
|
|
3314
|
-
formatters: { ...
|
|
3350
|
+
}, Eo = {
|
|
3351
|
+
locale: ue.HE,
|
|
3352
|
+
formatters: { ...pt },
|
|
3315
3353
|
messages: {
|
|
3316
3354
|
"chonky.toolbar.searchPlaceholder": "חיפוש",
|
|
3317
3355
|
"chonky.toolbar.visibleFileCount": `{fileCount, plural,
|
|
@@ -3348,37 +3386,37 @@ const to = 38, no = 40, io = 13, ro = 14, oo = 27, so = 9, ao = 10, lo = 100, co
|
|
|
3348
3386
|
[`chonky.actions.${G.ToggleHiddenFiles.id}.button.name`]: "קבצים נסתרים",
|
|
3349
3387
|
[`chonky.actions.${G.ToggleShowFoldersFirst.id}.button.name`]: "הצגת תיקיות בראש הרשימה"
|
|
3350
3388
|
}
|
|
3351
|
-
},
|
|
3352
|
-
[
|
|
3353
|
-
[
|
|
3354
|
-
[
|
|
3389
|
+
}, Co = {
|
|
3390
|
+
[ue.EN]: yo,
|
|
3391
|
+
[ue.RU]: vo,
|
|
3392
|
+
[ue.HE]: Eo
|
|
3355
3393
|
};
|
|
3356
|
-
class
|
|
3394
|
+
class qs extends Xt {
|
|
3357
3395
|
}
|
|
3358
|
-
const
|
|
3396
|
+
const Ys = G, wo = {
|
|
3359
3397
|
listView: G.EnableListView.id,
|
|
3360
3398
|
gridView: G.EnableGridView.id
|
|
3361
3399
|
};
|
|
3362
|
-
|
|
3363
|
-
const
|
|
3364
|
-
|
|
3400
|
+
Bi({ iconComponent: Hi });
|
|
3401
|
+
const Xs = Ee.memo(
|
|
3402
|
+
Ee.forwardRef(
|
|
3365
3403
|
({
|
|
3366
3404
|
theme: e,
|
|
3367
3405
|
styles: n = { height: "100%", minWidth: "600px" },
|
|
3368
|
-
defaultView: t =
|
|
3406
|
+
defaultView: t = wo.listView,
|
|
3369
3407
|
readOnlyMode: i = !1,
|
|
3370
3408
|
locale: o,
|
|
3371
3409
|
files: r,
|
|
3372
|
-
folderChain:
|
|
3410
|
+
folderChain: c,
|
|
3373
3411
|
onFileAction: u,
|
|
3374
|
-
...
|
|
3375
|
-
},
|
|
3376
|
-
const
|
|
3377
|
-
(
|
|
3412
|
+
...m
|
|
3413
|
+
}, v) => {
|
|
3414
|
+
const E = me(
|
|
3415
|
+
(W) => null,
|
|
3378
3416
|
// file.thumbnailUrl ? `https://chonky.io${file.thumbnailUrl}` : null,
|
|
3379
3417
|
[]
|
|
3380
3418
|
);
|
|
3381
|
-
|
|
3419
|
+
Ne({
|
|
3382
3420
|
"@global": {
|
|
3383
3421
|
".chonky-dropdownList": {
|
|
3384
3422
|
backgroundColor: `${e == null ? void 0 : e.surface} !important`
|
|
@@ -3388,35 +3426,35 @@ const Ws = ve.memo(
|
|
|
3388
3426
|
}
|
|
3389
3427
|
}
|
|
3390
3428
|
})();
|
|
3391
|
-
const
|
|
3429
|
+
const _ = (W) => W.replace(/([A-Z])/g, (ne) => "-" + ne.toLowerCase()), w = ke(() => e !== void 0 ? Object.keys(e).reduce((ne, s) => {
|
|
3392
3430
|
const a = e[s];
|
|
3393
|
-
return s = s.startsWith("--") ? s : `--fp-theme-${
|
|
3394
|
-
}, {}) : {}, [e]), [P,
|
|
3395
|
-
return
|
|
3396
|
-
e &&
|
|
3431
|
+
return s = s.startsWith("--") ? s : `--fp-theme-${_(s)}`, ne[s] = a, ne;
|
|
3432
|
+
}, {}) : {}, [e]), [P, R] = I(!1), [V, q] = I(), [H, K] = I(!1), [j, A] = I(), [$, k] = I();
|
|
3433
|
+
return x(() => {
|
|
3434
|
+
e && R(!0), q(t), i ? K(!0) : A([G.CreateFolder, G.DeleteFiles]), o !== void 0 && k(Co[o]);
|
|
3397
3435
|
}, [e, t, i, o]), /* @__PURE__ */ l(
|
|
3398
|
-
|
|
3436
|
+
ce,
|
|
3399
3437
|
{
|
|
3400
3438
|
style: {
|
|
3401
3439
|
...n,
|
|
3402
|
-
...
|
|
3440
|
+
...w
|
|
3403
3441
|
},
|
|
3404
3442
|
children: /* @__PURE__ */ l(
|
|
3405
|
-
|
|
3443
|
+
Fi,
|
|
3406
3444
|
{
|
|
3407
|
-
ref:
|
|
3445
|
+
ref: v,
|
|
3408
3446
|
files: r ?? [],
|
|
3409
|
-
folderChain:
|
|
3410
|
-
onFileAction: (
|
|
3411
|
-
typeof u == "function" && u(
|
|
3447
|
+
folderChain: c,
|
|
3448
|
+
onFileAction: (W) => {
|
|
3449
|
+
typeof u == "function" && u(W);
|
|
3412
3450
|
},
|
|
3413
|
-
thumbnailGenerator:
|
|
3414
|
-
defaultFileViewActionId:
|
|
3451
|
+
thumbnailGenerator: E,
|
|
3452
|
+
defaultFileViewActionId: V,
|
|
3415
3453
|
disableDragAndDrop: H,
|
|
3416
|
-
fileActions:
|
|
3454
|
+
fileActions: j,
|
|
3417
3455
|
darkMode: P,
|
|
3418
|
-
i18n:
|
|
3419
|
-
...
|
|
3456
|
+
i18n: $,
|
|
3457
|
+
...m
|
|
3420
3458
|
}
|
|
3421
3459
|
)
|
|
3422
3460
|
}
|
|
@@ -3425,76 +3463,76 @@ const Ws = ve.memo(
|
|
|
3425
3463
|
)
|
|
3426
3464
|
);
|
|
3427
3465
|
export {
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3466
|
+
js as Autocomplete,
|
|
3467
|
+
st as BboxCorner,
|
|
3468
|
+
ce as Box,
|
|
3469
|
+
lt as COORDINATES_MERCATOR_FRACTION_DIGITS,
|
|
3470
|
+
at as COORDINATES_WGS_FRACTION_DIGITS,
|
|
3471
|
+
Ns as Cesium3DTileset,
|
|
3472
|
+
Ls as CesiumBoundingSphere,
|
|
3473
|
+
Ts as CesiumCartesian2,
|
|
3474
|
+
_s as CesiumCartesian3,
|
|
3475
|
+
_r as CesiumCartographic,
|
|
3476
|
+
xs as CesiumCesiumTerrainProvider,
|
|
3477
|
+
$s as CesiumColor,
|
|
3478
|
+
bs as CesiumConstantPositionProperty,
|
|
3479
|
+
ws as CesiumConstantProperty,
|
|
3480
|
+
Jr as CesiumCustomDataSource,
|
|
3481
|
+
Ws as CesiumDrawingsDataSource,
|
|
3482
|
+
Ss as CesiumEllipsoid,
|
|
3483
|
+
Is as CesiumEllipsoidTerrainProvider,
|
|
3484
|
+
qr as CesiumEntity,
|
|
3485
|
+
zs as CesiumEntityDescription,
|
|
3486
|
+
Yr as CesiumEntityStaticDescription,
|
|
3487
|
+
Ms as CesiumGeographicTilingScheme,
|
|
3488
|
+
Bs as CesiumGeojsonLayer,
|
|
3489
|
+
je as CesiumImageryLayer,
|
|
3490
|
+
ks as CesiumLabelStyle,
|
|
3491
|
+
Rs as CesiumMap,
|
|
3492
|
+
ta as CesiumMath,
|
|
3493
|
+
Vs as CesiumOSMLayer,
|
|
3494
|
+
Xr as CesiumPolygonGraphics,
|
|
3495
|
+
Cs as CesiumPolylineDashMaterialProperty,
|
|
3496
|
+
Ps as CesiumRectangle,
|
|
3497
|
+
Zr as CesiumRectangleGraphics,
|
|
3498
|
+
Ds as CesiumResource,
|
|
3461
3499
|
oe as CesiumSceneMode,
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3500
|
+
As as CesiumVerticalOrigin,
|
|
3501
|
+
Os as CesiumViewer,
|
|
3502
|
+
Fs as CesiumWMSLayer,
|
|
3503
|
+
Hs as CesiumWMTSLayer,
|
|
3504
|
+
Gs as CesiumXYZLayer,
|
|
3505
|
+
Lr as CoordinatesTrackerTool,
|
|
3506
|
+
vs as CssBaseline,
|
|
3507
|
+
ps as DateRangePicker,
|
|
3508
|
+
gs as DateTimePicker,
|
|
3509
|
+
Ui as DateTimeRangePicker,
|
|
3510
|
+
hs as DateTimeRangePickerFormControl,
|
|
3511
|
+
be as DrawHelper,
|
|
3512
|
+
ae as DrawType,
|
|
3513
|
+
qs as FileHelper,
|
|
3514
|
+
Xs as FilePicker,
|
|
3515
|
+
Ys as FilePickerActions,
|
|
3516
|
+
wo as FilePickerViewObj,
|
|
3517
|
+
Us as InspectorTool,
|
|
3518
|
+
fs as MapFilterContainer,
|
|
3519
|
+
Ki as Popover,
|
|
3520
|
+
pe as Proj,
|
|
3521
|
+
Mr as ScaleTrackerTool,
|
|
3522
|
+
Es as ScopedCssBaseline,
|
|
3523
|
+
ys as SmartTable,
|
|
3524
|
+
ue as SupportedLocales,
|
|
3525
|
+
Ks as TerrainianHeightTool,
|
|
3526
|
+
ms as TimeRangeInput,
|
|
3527
|
+
Dr as ZoomLevelTrackerTool,
|
|
3528
|
+
na as cesiumSampleTerrainMostDetailed,
|
|
3529
|
+
pt as defaultFormatters,
|
|
3530
|
+
Xe as isDateRange,
|
|
3531
|
+
Vi as mapMcToMuiTheme,
|
|
3532
|
+
no as polygonToGeoJSON,
|
|
3533
|
+
io as rectangleToGeoJSON,
|
|
3534
|
+
ro as rectangleToPositions,
|
|
3497
3535
|
le as useCesiumMap,
|
|
3498
|
-
|
|
3499
|
-
|
|
3536
|
+
Zt as useMappedMuiTheme,
|
|
3537
|
+
Qs as useMediaQuery
|
|
3500
3538
|
};
|