@map-colonies/react-components 4.3.0 → 4.4.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 +1367 -1268
- package/dist/@map-colonies/react-components.umd.js +12 -3
- package/dist/cesium-map/index.d.ts +1 -0
- package/dist/cesium-map/map.css +4 -0
- package/dist/cesium-map/map.d.ts +1 -0
- package/dist/cesium-map/tools/index.d.ts +8 -0
- package/dist/cesium-map/tools/inspector.tool.d.ts +4 -0
- package/dist/cesium-map/tools/terranian-height.tool.d.ts +4 -0
- package/package.json +3 -3
|
@@ -1,53 +1,54 @@
|
|
|
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}.distance-legend-label{text-align:center}.distance-legend-scale-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}.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
|
|
3
|
-
var
|
|
4
|
-
var Z = (e, n, t) => (
|
|
5
|
-
import { jsx as l, jsxs as
|
|
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
|
|
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}.distance-legend-label{text-align:center}.distance-legend-scale-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}.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 an = Object.defineProperty;
|
|
3
|
+
var ln = (e, n, t) => n in e ? an(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
|
|
4
|
+
var Z = (e, n, t) => (ln(e, typeof n != "symbol" ? n + "" : n, t), t);
|
|
5
|
+
import { jsx as l, jsxs as N, Fragment as te } from "react/jsx-runtime";
|
|
6
|
+
import * as Ot from "react";
|
|
7
|
+
import ve, { useState as A, useEffect as I, useMemo as $e, forwardRef as cn, createContext as Ie, useRef as be, useContext as xe, useCallback as me, useLayoutEffect as dn } from "react";
|
|
8
|
+
import { isValid as _e, isBefore as un, format as pt, endOfDay as hn, isSameDay as gt } from "date-fns";
|
|
9
|
+
import { he as Rt, enUS as Nt } from "date-fns/locale";
|
|
10
|
+
import { MuiPickersUtilsProvider as Bt, KeyboardDateTimePicker as Qe, KeyboardDatePicker as mn } from "@material-ui/pickers";
|
|
11
|
+
import Ft from "@date-io/date-fns";
|
|
12
|
+
import { createTheme as pn, makeStyles as ke, createStyles as We } from "@material-ui/core/styles";
|
|
13
|
+
import { Box as gn, ThemeProvider as Ht, Popover as fn, Paper as et, TableRow as He, TableCell as Me, TableSortLabel as yn, IconButton as vn, Collapse as En, TableContainer as Cn, Table as wn, TableBody as bn, Typography as Tn, TablePagination as _n } from "@material-ui/core";
|
|
14
|
+
import { useTheme as Gt, ThemeProvider as Ln, Button as Ae, TextField as Ge, Tooltip as tt, Menu as Sn, MenuItem as je, Icon as Pe, Dialog as Mn, DialogTitle as Pn, DialogContent as Dn, Drawer as An, DrawerHeader as In, DrawerTitle as xn, DrawerContent as kn, LinearProgress as On } from "@map-colonies/react-core";
|
|
15
|
+
import { default as js } from "@material-ui/core/useMediaQuery";
|
|
16
|
+
import Rn, { registerLocale as Nn } from "react-datepicker";
|
|
17
|
+
import Bn from "date-fns/locale/he";
|
|
18
|
+
import Le from "moment";
|
|
19
|
+
import Fn from "@turf/rewind";
|
|
20
|
+
import { Map as Hn, View as Gn } 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 ft } from "ol/coordinate";
|
|
23
|
+
import { defaults as Vn, FullScreen as yt } from "ol/control";
|
|
24
|
+
import qe from "ol/control/MousePosition";
|
|
25
|
+
import { transform as zn } from "ol/proj";
|
|
26
|
+
import { Tile as $n, Vector as Wn } from "ol/layer";
|
|
27
|
+
import { Vector as Un, OSM as Kn } from "ol/source";
|
|
28
|
+
import { GeoJSON as Vt } from "ol/format";
|
|
29
|
+
import { Draw as jn } from "ol/interaction";
|
|
30
|
+
import { createBox as qn } from "ol/interaction/Draw";
|
|
31
|
+
import Yn from "@material-ui/core/TableHead";
|
|
32
|
+
import { createSvgIcon as zt } from "@material-ui/core/utils";
|
|
33
|
+
import Xn from "@material-ui/core/CssBaseline";
|
|
34
|
+
import Zn from "@material-ui/core/ScopedCssBaseline";
|
|
35
|
+
import { createPortal as Jn } from "react-dom";
|
|
36
|
+
import { Viewer as Qn, Cesium3DTileset as ei, GeoJsonDataSource as ti, ImageryLayer as ni, Entity as ii, EntityDescription as $t, PolygonGraphics as ri, RectangleGraphics as oi, CustomDataSource as si, PolylineGraphics as ai } from "resium";
|
|
37
37
|
import * as p from "cesium";
|
|
38
|
-
import { ScreenSpaceEventType as
|
|
39
|
-
import { Math as
|
|
40
|
-
import { get as
|
|
41
|
-
import
|
|
42
|
-
import
|
|
43
|
-
import
|
|
44
|
-
import
|
|
45
|
-
import
|
|
46
|
-
import
|
|
47
|
-
import
|
|
48
|
-
import {
|
|
49
|
-
import
|
|
50
|
-
|
|
38
|
+
import { ScreenSpaceEventType as li, Cartesian3 as pe, Math as ce, WebMercatorProjection as ci, SceneMode as we, Cartesian2 as Ee, Cartographic as Oe, EventHelper as di, EllipsoidGeodesic as ui, UrlTemplateImageryProvider as lt, WebMapServiceImageryProvider as ct, WebMapTileServiceImageryProvider as dt, Event as hi, SingleTileImageryProvider as mi, Rectangle as Se, Viewer as pi, Matrix4 as gi, OpenStreetMapImageryProvider as fi, Color as nt, PolygonHierarchy as yi, PolylineDashMaterialProperty as vi, ConstantProperty as Ei, ConstantPositionProperty as Ci, BoundingSphere as wi, Ellipsoid as Wt, GeographicTilingScheme as bi, Resource as Ti, EllipsoidTerrainProvider as _i, CesiumTerrainProvider as Li, VerticalOrigin as it, LabelStyle as Ut, viewerCesiumInspectorMixin as Si, sampleTerrainMostDetailed as Mi } from "cesium";
|
|
39
|
+
import { Math as Ys, sampleTerrainMostDetailed as Xs } from "cesium";
|
|
40
|
+
import { get as ee, isNumber as Ve, isEmpty as rt, isArray as Pi, find as vt } from "lodash";
|
|
41
|
+
import Di from "@turf/boolean-point-in-polygon";
|
|
42
|
+
import "@map-colonies/react-core/dist/linear-progress/styles";
|
|
43
|
+
import * as Kt from "@turf/helpers";
|
|
44
|
+
import jt from "@turf/bbox";
|
|
45
|
+
import qt from "@turf/bbox-polygon";
|
|
46
|
+
import Ai from "textarea-caret";
|
|
47
|
+
import Ii, { setCaretPosition as xi } from "get-input-selection";
|
|
48
|
+
import { ChonkyActions as G, FileHelper as Yt, setChonkyDefaults as ki, FullFileBrowser as Oi } from "chonky";
|
|
49
|
+
import { ChonkyIconFA as Ri } from "chonky-icon-fontawesome";
|
|
50
|
+
import Ni from "filesize";
|
|
51
|
+
var se = /* @__PURE__ */ ((e) => (e.BOX = "BOX", e.POLYGON = "POLYGON", e.UNKNOWN = "UNKNOWN", e))(se || {}), de = /* @__PURE__ */ ((e) => (e.HE = "he", e.EN = "en", e.RU = "ru", e))(de || {}), ot = /* @__PURE__ */ ((e) => (e.TOP_RIGHT = "TOP_RIGHT", e.BOTTOM_LEFT = "BOTTOM_LEFT", e))(ot || {});
|
|
51
52
|
const J = {
|
|
52
53
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
53
54
|
DATE_PICKER: {
|
|
@@ -55,7 +56,7 @@ const J = {
|
|
|
55
56
|
local: {
|
|
56
57
|
setText: "set",
|
|
57
58
|
placeHolderText: "Enter the Date",
|
|
58
|
-
calendarLocale:
|
|
59
|
+
calendarLocale: de.EN
|
|
59
60
|
},
|
|
60
61
|
disableFuture: !0,
|
|
61
62
|
showTime: !1,
|
|
@@ -69,7 +70,7 @@ const J = {
|
|
|
69
70
|
setText: "set",
|
|
70
71
|
startPlaceHolderText: "Start of time",
|
|
71
72
|
endPlaceHolderText: "End of time",
|
|
72
|
-
calendarLocale:
|
|
73
|
+
calendarLocale: de.EN
|
|
73
74
|
},
|
|
74
75
|
renderAsButton: !0,
|
|
75
76
|
offset: 0,
|
|
@@ -77,11 +78,11 @@ const J = {
|
|
|
77
78
|
}
|
|
78
79
|
}, ae = (e) => {
|
|
79
80
|
const { children: n, ...t } = e;
|
|
80
|
-
return /* @__PURE__ */ l(
|
|
81
|
-
},
|
|
81
|
+
return /* @__PURE__ */ l(gn, { ...t, children: n });
|
|
82
|
+
}, Xt = (e) => {
|
|
82
83
|
const n = e.type === "dark";
|
|
83
|
-
return
|
|
84
|
-
},
|
|
84
|
+
return ve.useMemo(() => Bi(e, n), [n, e]);
|
|
85
|
+
}, Bi = (e, n = !1) => pn({
|
|
85
86
|
palette: {
|
|
86
87
|
type: n ? "dark" : "light",
|
|
87
88
|
primary: {
|
|
@@ -103,127 +104,127 @@ const J = {
|
|
|
103
104
|
}
|
|
104
105
|
}
|
|
105
106
|
});
|
|
106
|
-
const
|
|
107
|
-
(e) =>
|
|
107
|
+
const Fi = 2, Hi = 0.5, Gi = ke(
|
|
108
|
+
(e) => We({
|
|
108
109
|
container: {
|
|
109
|
-
padding: e.spacing(
|
|
110
|
+
padding: e.spacing(Fi),
|
|
110
111
|
alignItems: "center"
|
|
111
112
|
},
|
|
112
113
|
setButton: {
|
|
113
114
|
marginTop: e.spacing(1)
|
|
114
115
|
},
|
|
115
116
|
margin: {
|
|
116
|
-
marginLeft: e.spacing(
|
|
117
|
+
marginLeft: e.spacing(Hi)
|
|
117
118
|
}
|
|
118
119
|
})
|
|
119
|
-
),
|
|
120
|
-
var
|
|
121
|
-
const n =
|
|
122
|
-
|
|
120
|
+
), Vi = (e) => {
|
|
121
|
+
var K, x, W, O;
|
|
122
|
+
const n = Gi(), t = Gt(), i = Xt(t), [o, r] = A(null), [d, u] = A(null), [h, E] = A(J.DATE_RANGE_PICKER.dateFormat), C = e.controlsLayout ?? J.DATE_RANGE_PICKER.controlsLayout, L = e.disableFuture ?? J.DATE_RANGE_PICKER.disableFuture, b = ((K = e.local) == null ? void 0 : K.startPlaceHolderText) ?? J.DATE_RANGE_PICKER.local.startPlaceHolderText, P = ((x = e.local) == null ? void 0 : x.endPlaceHolderText) ?? J.DATE_RANGE_PICKER.local.endPlaceHolderText, B = ((W = e.local) == null ? void 0 : W.setText) ?? J.DATE_RANGE_PICKER.local.setText, q = (((O = e.local) == null ? void 0 : O.calendarLocale) ?? J.DATE_RANGE_PICKER.local.calendarLocale) === de.HE ? Rt : Nt;
|
|
123
|
+
I(() => {
|
|
123
124
|
r(e.from ?? null);
|
|
124
|
-
}, [e.from]),
|
|
125
|
+
}, [e.from]), I(() => {
|
|
125
126
|
u(e.to ?? null);
|
|
126
|
-
}, [e.to]),
|
|
127
|
+
}, [e.to]), I(() => {
|
|
127
128
|
E(e.dateFormat ?? J.DATE_RANGE_PICKER.dateFormat);
|
|
128
129
|
}, [e.dateFormat]);
|
|
129
|
-
const
|
|
130
|
-
|
|
130
|
+
const H = Boolean(
|
|
131
|
+
_e(o) && !d || _e(d) && !o || o && d && _e(o) && _e(d) && un(o, d)
|
|
131
132
|
), Y = () => {
|
|
132
133
|
e.onChange({
|
|
133
|
-
from: o &&
|
|
134
|
-
to: d &&
|
|
134
|
+
from: o && _e(o) ? o : void 0,
|
|
135
|
+
to: d && _e(d) ? d : void 0
|
|
135
136
|
});
|
|
136
137
|
};
|
|
137
|
-
return /* @__PURE__ */ l(
|
|
138
|
+
return /* @__PURE__ */ l(Ht, { theme: i, children: /* @__PURE__ */ l(
|
|
138
139
|
ae,
|
|
139
140
|
{
|
|
140
141
|
className: `${n.container} drpContainer`,
|
|
141
142
|
display: "flex",
|
|
142
|
-
flexDirection:
|
|
143
|
-
width:
|
|
144
|
-
children: /* @__PURE__ */
|
|
143
|
+
flexDirection: C,
|
|
144
|
+
width: C === "column" ? e.contentWidth : "unset",
|
|
145
|
+
children: /* @__PURE__ */ N(Bt, { utils: Ft, locale: q, children: [
|
|
145
146
|
/* @__PURE__ */ l(
|
|
146
|
-
|
|
147
|
+
Qe,
|
|
147
148
|
{
|
|
148
149
|
variant: "inline",
|
|
149
|
-
placeholder:
|
|
150
|
+
placeholder: b,
|
|
150
151
|
onChange: (V) => r(V),
|
|
151
152
|
value: o,
|
|
152
|
-
disableFuture:
|
|
153
|
-
format:
|
|
153
|
+
disableFuture: L,
|
|
154
|
+
format: h,
|
|
154
155
|
maxDate: e.maxDate,
|
|
155
156
|
minDate: e.minDate
|
|
156
157
|
}
|
|
157
158
|
),
|
|
158
159
|
/* @__PURE__ */ l(
|
|
159
|
-
|
|
160
|
+
Qe,
|
|
160
161
|
{
|
|
161
162
|
variant: "inline",
|
|
162
|
-
placeholder:
|
|
163
|
+
placeholder: P,
|
|
163
164
|
className: n.margin,
|
|
164
165
|
onChange: (V) => u(V),
|
|
165
166
|
value: d,
|
|
166
|
-
disableFuture:
|
|
167
|
-
format:
|
|
167
|
+
disableFuture: L,
|
|
168
|
+
format: h,
|
|
168
169
|
maxDate: e.maxDate,
|
|
169
170
|
minDate: e.minDate
|
|
170
171
|
}
|
|
171
172
|
),
|
|
172
|
-
/* @__PURE__ */ l(
|
|
173
|
-
|
|
173
|
+
/* @__PURE__ */ l(Ln, { options: t, children: /* @__PURE__ */ l(
|
|
174
|
+
Ae,
|
|
174
175
|
{
|
|
175
176
|
className: `${n.setButton} ${n.margin}`,
|
|
176
177
|
raised: !0,
|
|
177
178
|
onClick: Y,
|
|
178
|
-
disabled: !
|
|
179
|
-
children:
|
|
179
|
+
disabled: !H,
|
|
180
|
+
children: B
|
|
180
181
|
}
|
|
181
182
|
) })
|
|
182
183
|
] })
|
|
183
184
|
}
|
|
184
185
|
) });
|
|
185
|
-
},
|
|
186
|
+
}, zi = (e) => {
|
|
186
187
|
const { children: n, ...t } = e;
|
|
187
|
-
return /* @__PURE__ */ l(
|
|
188
|
+
return /* @__PURE__ */ l(fn, { ...t, children: n });
|
|
188
189
|
};
|
|
189
|
-
const
|
|
190
|
-
var x,
|
|
191
|
-
const [n, t] = A(null), [i, o] = A(null), [r, d] = A(J.DATE_RANGE_PICKER.dateFormat), [u,
|
|
192
|
-
|
|
193
|
-
},
|
|
194
|
-
|
|
195
|
-
},
|
|
196
|
-
|
|
197
|
-
},
|
|
198
|
-
|
|
190
|
+
const os = (e) => {
|
|
191
|
+
var x, W;
|
|
192
|
+
const [n, t] = A(null), [i, o] = A(null), [r, d] = A(J.DATE_RANGE_PICKER.dateFormat), [u, h] = ve.useState(null), E = (O) => {
|
|
193
|
+
h(O.currentTarget);
|
|
194
|
+
}, C = (O) => {
|
|
195
|
+
O.currentTarget.tagName === "I" ? h(O.currentTarget.previousElementSibling) : h(O.currentTarget);
|
|
196
|
+
}, L = () => {
|
|
197
|
+
h(null);
|
|
198
|
+
}, b = Boolean(u), P = e.controlsLayout ?? "column";
|
|
199
|
+
I(() => {
|
|
199
200
|
t(e.from ?? null);
|
|
200
|
-
}, [e.from]),
|
|
201
|
+
}, [e.from]), I(() => {
|
|
201
202
|
o(e.to ?? null);
|
|
202
|
-
}, [e.to]),
|
|
203
|
+
}, [e.to]), I(() => {
|
|
203
204
|
d(e.dateFormat ?? J.DATE_RANGE_PICKER.dateFormat);
|
|
204
205
|
}, [e.dateFormat]);
|
|
205
|
-
const
|
|
206
|
-
return /* @__PURE__ */
|
|
207
|
-
|
|
208
|
-
|
|
206
|
+
const B = ((x = e.local) == null ? void 0 : x.startPlaceHolderText) ?? J.DATE_RANGE_PICKER.local.startPlaceHolderText, $ = ((W = e.local) == null ? void 0 : W.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, Y = e.disableFuture === void 0 ? J.DATE_RANGE_PICKER.disableFuture : e.disableFuture, K = $e(() => `${n ? pt(n, r) : B} - ${i ? pt(i, r) : $}`, [n, i, r, B, $]);
|
|
207
|
+
return /* @__PURE__ */ N(te, { children: [
|
|
208
|
+
q ? /* @__PURE__ */ l(Ae, { style: { width: e.width }, raised: !0, onClick: E, className: "drpOpener", children: K }) : /* @__PURE__ */ l(
|
|
209
|
+
Ge,
|
|
209
210
|
{
|
|
210
211
|
className: "drpOpener",
|
|
211
212
|
readOnly: !0,
|
|
212
213
|
style: { width: e.width },
|
|
213
|
-
value:
|
|
214
|
-
onClick:
|
|
214
|
+
value: K,
|
|
215
|
+
onClick: C,
|
|
215
216
|
trailingIcon: {
|
|
216
217
|
icon: "date_range",
|
|
217
218
|
tabIndex: 0,
|
|
218
|
-
onClick:
|
|
219
|
+
onClick: C
|
|
219
220
|
}
|
|
220
221
|
}
|
|
221
222
|
),
|
|
222
|
-
/* @__PURE__ */ l(
|
|
223
|
-
|
|
223
|
+
/* @__PURE__ */ l(zi, { open: b, anchorEl: u, onClose: L, anchorOrigin: { vertical: "bottom", horizontal: "left" }, keepMounted: !0, children: /* @__PURE__ */ l(
|
|
224
|
+
Vi,
|
|
224
225
|
{
|
|
225
|
-
controlsLayout:
|
|
226
|
-
contentWidth: ((u == null ? void 0 : u.clientWidth) ?? 0) -
|
|
226
|
+
controlsLayout: P,
|
|
227
|
+
contentWidth: ((u == null ? void 0 : u.clientWidth) ?? 0) - H,
|
|
227
228
|
dateFormat: r,
|
|
228
229
|
disableFuture: Y,
|
|
229
230
|
minDate: e.minDate,
|
|
@@ -231,13 +232,13 @@ const Qo = (e) => {
|
|
|
231
232
|
local: e.local,
|
|
232
233
|
from: n ?? void 0,
|
|
233
234
|
to: i ?? void 0,
|
|
234
|
-
onChange: ({ from:
|
|
235
|
-
t(
|
|
235
|
+
onChange: ({ from: O, to: V }) => {
|
|
236
|
+
t(O ?? null), o(V ?? null), e.onChange({ from: O, to: V }), L();
|
|
236
237
|
}
|
|
237
238
|
}
|
|
238
239
|
) })
|
|
239
240
|
] });
|
|
240
|
-
},
|
|
241
|
+
}, Ye = (e) => typeof e < "u" && e !== null && "startDate" in e && "endDate" in e, ss = ({
|
|
241
242
|
endDate: e,
|
|
242
243
|
startDate: n,
|
|
243
244
|
setEndDate: t = () => {
|
|
@@ -248,49 +249,49 @@ const Qo = (e) => {
|
|
|
248
249
|
endTimeLabel: r = "",
|
|
249
250
|
endTimeWrapperClassName: d = "",
|
|
250
251
|
timeRangeInputsWrapperClassName: u = "",
|
|
251
|
-
startTimeInputClassName:
|
|
252
|
+
startTimeInputClassName: h = "",
|
|
252
253
|
startTimeLabel: E = "",
|
|
253
|
-
startTimeWrapperClassName:
|
|
254
|
-
}) => /* @__PURE__ */
|
|
255
|
-
/* @__PURE__ */ l("div", { className: `startTimeWrapper ${
|
|
256
|
-
|
|
254
|
+
startTimeWrapperClassName: C = ""
|
|
255
|
+
}) => /* @__PURE__ */ N("div", { className: `timeRangeWrapper ${u}`, children: [
|
|
256
|
+
/* @__PURE__ */ l("div", { className: `startTimeWrapper ${C}`, children: /* @__PURE__ */ l(
|
|
257
|
+
Ge,
|
|
257
258
|
{
|
|
258
259
|
label: E,
|
|
259
260
|
disabled: n === null,
|
|
260
|
-
className: `timeRangeInput ${
|
|
261
|
+
className: `timeRangeInput ${h}`,
|
|
261
262
|
name: "start-time",
|
|
262
263
|
type: "time",
|
|
263
|
-
value:
|
|
264
|
-
onChange: (
|
|
265
|
-
const
|
|
266
|
-
hours:
|
|
267
|
-
minutes:
|
|
264
|
+
value: Le(n).format("HH:mm"),
|
|
265
|
+
onChange: (L) => {
|
|
266
|
+
const b = Le(n), P = Le(L.currentTarget.value, "HH:mm"), B = b.set({
|
|
267
|
+
hours: P.get("hours"),
|
|
268
|
+
minutes: P.get("minutes")
|
|
268
269
|
});
|
|
269
|
-
i(
|
|
270
|
+
i(B.toDate());
|
|
270
271
|
}
|
|
271
272
|
}
|
|
272
273
|
) }),
|
|
273
274
|
/* @__PURE__ */ l("div", { className: `endTimeWrapper ${d}`, children: /* @__PURE__ */ l(
|
|
274
|
-
|
|
275
|
+
Ge,
|
|
275
276
|
{
|
|
276
277
|
label: r,
|
|
277
278
|
disabled: e === null,
|
|
278
279
|
className: `timeRangeInput ${o}`,
|
|
279
280
|
name: "end-time",
|
|
280
281
|
type: "time",
|
|
281
|
-
value:
|
|
282
|
-
onChange: (
|
|
283
|
-
const
|
|
284
|
-
hours:
|
|
285
|
-
minutes:
|
|
282
|
+
value: Le(e).format("HH:mm"),
|
|
283
|
+
onChange: (L) => {
|
|
284
|
+
const b = Le(e), P = Le(L.currentTarget.value, "HH:mm"), B = b.set({
|
|
285
|
+
hours: P.get("hours"),
|
|
286
|
+
minutes: P.get("minutes")
|
|
286
287
|
});
|
|
287
|
-
t(
|
|
288
|
+
t(B.toDate());
|
|
288
289
|
}
|
|
289
290
|
}
|
|
290
291
|
) })
|
|
291
|
-
] }),
|
|
292
|
+
] }), $i = cn(
|
|
292
293
|
({ value: e, onClick: n, onInputClick: t, ...i }, o) => /* @__PURE__ */ l(
|
|
293
|
-
|
|
294
|
+
Ge,
|
|
294
295
|
{
|
|
295
296
|
...i,
|
|
296
297
|
className: "dateRangeCustomInput",
|
|
@@ -302,37 +303,37 @@ const Qo = (e) => {
|
|
|
302
303
|
value: e
|
|
303
304
|
}
|
|
304
305
|
)
|
|
305
|
-
),
|
|
306
|
+
), Wi = ({ setStartDate: e = () => {
|
|
306
307
|
}, setEndDate: n = () => {
|
|
307
308
|
}, shortcuts: t, dateRange: i, onShortcut: o }) => {
|
|
308
|
-
const [r, d] = A(), u =
|
|
309
|
-
() => t.map((
|
|
309
|
+
const [r, d] = A(), u = $e(
|
|
310
|
+
() => t.map((h) => h instanceof Function ? h() : h),
|
|
310
311
|
[t]
|
|
311
312
|
);
|
|
312
|
-
return
|
|
313
|
-
for (const
|
|
314
|
-
const E = i.startDate && i.endDate &&
|
|
315
|
-
r ?
|
|
313
|
+
return I(() => {
|
|
314
|
+
for (const h of u) {
|
|
315
|
+
const E = i.startDate && i.endDate && gt(h.startDate, i.startDate) && gt(h.endDate, i.endDate);
|
|
316
|
+
r ? h.id === r && (E || d(void 0)) : E && d(h.id);
|
|
316
317
|
}
|
|
317
|
-
}, [i, r, u]), /* @__PURE__ */ l("div", { className: "shortcutsContainer", children: u.map((
|
|
318
|
-
const
|
|
319
|
-
e(
|
|
318
|
+
}, [i, r, u]), /* @__PURE__ */ l("div", { className: "shortcutsContainer", children: u.map((h, E) => {
|
|
319
|
+
const C = () => {
|
|
320
|
+
e(h.startDate), n(h.endDate);
|
|
320
321
|
};
|
|
321
322
|
return /* @__PURE__ */ l(
|
|
322
|
-
|
|
323
|
+
Ae,
|
|
323
324
|
{
|
|
324
325
|
type: "button",
|
|
325
|
-
className: `shortcut ${r ===
|
|
326
|
-
onClick: (
|
|
327
|
-
|
|
326
|
+
className: `shortcut ${r === h.id ? "selected" : ""}`,
|
|
327
|
+
onClick: (L) => {
|
|
328
|
+
C(), o == null || o({ startDate: h.startDate, endDate: h.endDate });
|
|
328
329
|
},
|
|
329
330
|
outlined: !0,
|
|
330
|
-
children:
|
|
331
|
+
children: h.label
|
|
331
332
|
},
|
|
332
|
-
|
|
333
|
+
h.id + E
|
|
333
334
|
);
|
|
334
335
|
}) });
|
|
335
|
-
},
|
|
336
|
+
}, as = ve.forwardRef((e, n) => {
|
|
336
337
|
const {
|
|
337
338
|
// Time range input props
|
|
338
339
|
// endTimeInputClassName,
|
|
@@ -349,147 +350,147 @@ const Qo = (e) => {
|
|
|
349
350
|
selectsRange: r,
|
|
350
351
|
onChange: d,
|
|
351
352
|
inputName: u,
|
|
352
|
-
showMonthYearDropdown:
|
|
353
|
+
showMonthYearDropdown: h,
|
|
353
354
|
// withTimeRange,
|
|
354
355
|
withShortcuts: E,
|
|
355
|
-
locale:
|
|
356
|
-
} = e, [
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
}, [
|
|
360
|
-
var x,
|
|
361
|
-
((x = e.startDate) == null ? void 0 : x.toString()) !== (
|
|
362
|
-
}, [e.startDate, e.endDate,
|
|
363
|
-
const Y =
|
|
364
|
-
let x = "pickerContainer" + (
|
|
356
|
+
locale: C = "en"
|
|
357
|
+
} = e, [L, b] = A(null), [P, B] = A(null), [$, q] = A(!1), H = r ? { startDate: L, endDate: P } : L;
|
|
358
|
+
I(() => {
|
|
359
|
+
C === "he" && Nn("he", Bn);
|
|
360
|
+
}, [C]), I(() => {
|
|
361
|
+
var x, W;
|
|
362
|
+
((x = e.startDate) == null ? void 0 : x.toString()) !== (L == null ? void 0 : L.toString()) && b(e.startDate), ((W = e.endDate) == null ? void 0 : W.toString()) !== (P == null ? void 0 : P.toString()) && B(e.endDate);
|
|
363
|
+
}, [e.startDate, e.endDate, L, P]);
|
|
364
|
+
const Y = $e(() => {
|
|
365
|
+
let x = "pickerContainer" + (C === "he" ? " pickerContainer-rtl" : "");
|
|
365
366
|
return E && r && (x += " pickerContainer-withShortcuts"), x;
|
|
366
|
-
}, [
|
|
367
|
+
}, [C, E, r]), K = h ? {
|
|
367
368
|
showMonthDropdown: !0,
|
|
368
369
|
showYearDropdown: !0,
|
|
369
370
|
dropdownMode: "select"
|
|
370
371
|
} : {};
|
|
371
|
-
return /* @__PURE__ */ l("div", { className: Y, style: { direction:
|
|
372
|
-
|
|
372
|
+
return /* @__PURE__ */ l("div", { className: Y, style: { direction: C === "he" ? "rtl" : "ltr" }, children: /* @__PURE__ */ l(
|
|
373
|
+
Rn,
|
|
373
374
|
{
|
|
374
375
|
...e,
|
|
375
376
|
ref: n,
|
|
376
|
-
onClickOutside: () =>
|
|
377
|
-
open:
|
|
378
|
-
startDate:
|
|
379
|
-
selected:
|
|
380
|
-
endDate:
|
|
377
|
+
onClickOutside: () => q(!1),
|
|
378
|
+
open: $,
|
|
379
|
+
startDate: Ye(H) ? L : void 0,
|
|
380
|
+
selected: L,
|
|
381
|
+
endDate: Ye(H) ? P : void 0,
|
|
381
382
|
monthsShown: e.monthsShown ?? 2,
|
|
382
383
|
calendarClassName: `pickerCalendar ${t}`,
|
|
383
384
|
weekDayClassName: (x) => `pickerWeek ${(i == null ? void 0 : i(x)) ?? ""}`,
|
|
384
385
|
dayClassName: (x) => `pickerDay ${(i == null ? void 0 : i(x)) ?? ""}`,
|
|
385
386
|
monthClassName: (x) => `pickerMonth ${(o == null ? void 0 : o(x)) ?? ""}`,
|
|
386
|
-
onChange: (x,
|
|
387
|
+
onChange: (x, W) => {
|
|
387
388
|
if (Array.isArray(x)) {
|
|
388
|
-
const [
|
|
389
|
-
|
|
389
|
+
const [O, V] = x;
|
|
390
|
+
b(O), B(V), d == null || d({ startDate: O, endDate: V && hn(V) }, W);
|
|
390
391
|
} else
|
|
391
|
-
|
|
392
|
+
b(x), d == null || d(x, W);
|
|
392
393
|
},
|
|
393
|
-
customInput: /* @__PURE__ */ l(
|
|
394
|
-
|
|
394
|
+
customInput: /* @__PURE__ */ l($i, { name: u, onInputClick: () => {
|
|
395
|
+
q(!0);
|
|
395
396
|
} }),
|
|
396
397
|
showTimeInput: !!(E && r),
|
|
397
398
|
timeInputLabel: "",
|
|
398
|
-
customTimeInput: E &&
|
|
399
|
-
d == null || d(x),
|
|
400
|
-
}, shortcuts: E, setEndDate:
|
|
399
|
+
customTimeInput: E && Ye(H) && /* @__PURE__ */ l(Wi, { onShortcut: (x) => {
|
|
400
|
+
d == null || d(x), q(!1);
|
|
401
|
+
}, shortcuts: E, setEndDate: B, setStartDate: b, dateRange: H }),
|
|
401
402
|
showMonthYearDropdown: void 0,
|
|
402
|
-
...
|
|
403
|
+
...K
|
|
403
404
|
}
|
|
404
405
|
) });
|
|
405
406
|
});
|
|
406
|
-
const
|
|
407
|
-
const n =
|
|
407
|
+
const ls = (e) => {
|
|
408
|
+
const n = Gt(), t = Xt(n), [i, o] = A(e.value), {
|
|
408
409
|
format: r = J.DATE_PICKER.dateFormat,
|
|
409
410
|
variant: d = J.DATE_PICKER.variant,
|
|
410
411
|
disableFuture: u = J.DATE_PICKER.disableFuture,
|
|
411
|
-
local:
|
|
412
|
+
local: h,
|
|
412
413
|
onChange: E,
|
|
413
|
-
showTime:
|
|
414
|
-
value:
|
|
415
|
-
...
|
|
416
|
-
} = e, { placeHolderText:
|
|
414
|
+
showTime: C = J.DATE_PICKER.showTime,
|
|
415
|
+
value: L,
|
|
416
|
+
...b
|
|
417
|
+
} = e, { placeHolderText: P = J.DATE_PICKER.local.placeHolderText, calendarLocale: B } = h ?? {
|
|
417
418
|
placeHolderText: J.DATE_PICKER.local.placeHolderText,
|
|
418
|
-
calendarLocale:
|
|
419
|
-
},
|
|
420
|
-
o(
|
|
419
|
+
calendarLocale: de.EN
|
|
420
|
+
}, $ = B === de.HE ? Rt : Nt, q = (H) => {
|
|
421
|
+
o(H), E(H);
|
|
421
422
|
};
|
|
422
|
-
return /* @__PURE__ */ l(
|
|
423
|
-
|
|
424
|
-
|
|
423
|
+
return /* @__PURE__ */ l(Ht, { theme: t, children: /* @__PURE__ */ N(Bt, { utils: Ft, locale: $, children: [
|
|
424
|
+
C && /* @__PURE__ */ l(
|
|
425
|
+
Qe,
|
|
425
426
|
{
|
|
426
427
|
variant: d,
|
|
427
|
-
placeholder:
|
|
428
|
-
onChange:
|
|
428
|
+
placeholder: P,
|
|
429
|
+
onChange: q,
|
|
429
430
|
value: i,
|
|
430
431
|
disableFuture: u,
|
|
431
432
|
format: r,
|
|
432
|
-
...
|
|
433
|
+
...b
|
|
433
434
|
}
|
|
434
435
|
),
|
|
435
|
-
!
|
|
436
|
-
|
|
436
|
+
!C && /* @__PURE__ */ l(
|
|
437
|
+
mn,
|
|
437
438
|
{
|
|
438
439
|
variant: d,
|
|
439
|
-
placeholder:
|
|
440
|
-
onChange:
|
|
440
|
+
placeholder: P,
|
|
441
|
+
onChange: q,
|
|
441
442
|
value: i,
|
|
442
443
|
disableFuture: u,
|
|
443
444
|
format: r,
|
|
444
|
-
...
|
|
445
|
+
...b
|
|
445
446
|
}
|
|
446
447
|
)
|
|
447
448
|
] }) });
|
|
448
|
-
},
|
|
449
|
-
(e) =>
|
|
449
|
+
}, Ui = 18, Ki = ke(
|
|
450
|
+
(e) => We({
|
|
450
451
|
drawingButton: {
|
|
451
|
-
width: e.spacing(
|
|
452
|
+
width: e.spacing(Ui)
|
|
452
453
|
},
|
|
453
454
|
fullWidth: {
|
|
454
455
|
width: "100%",
|
|
455
456
|
marginTop: "36px"
|
|
456
457
|
}
|
|
457
458
|
})
|
|
458
|
-
),
|
|
459
|
-
const n =
|
|
460
|
-
i(
|
|
459
|
+
), ji = (e) => {
|
|
460
|
+
const n = Ki(), [t, i] = ve.useState(null), { isSelectionEnabled: o, onCancelDraw: r, onStartDraw: d, onReset: u } = e, h = (C) => {
|
|
461
|
+
i(C.currentTarget);
|
|
461
462
|
}, E = () => {
|
|
462
463
|
i(null);
|
|
463
464
|
};
|
|
464
|
-
return o ? /* @__PURE__ */ l(
|
|
465
|
-
/* @__PURE__ */ l(
|
|
466
|
-
/* @__PURE__ */
|
|
467
|
-
|
|
465
|
+
return o ? /* @__PURE__ */ l(tt, { content: "Cancel the ongoing draw", align: "bottomLeft", children: /* @__PURE__ */ l(Ae, { className: n.drawingButton, raised: !0, onClick: r, children: "Cancel Draw" }) }) : /* @__PURE__ */ N(ae, { position: "relative", children: [
|
|
466
|
+
/* @__PURE__ */ l(tt, { content: "draw an Area of interest to limit the search", align: "bottomLeft", children: /* @__PURE__ */ l(Ae, { className: n.drawingButton, raised: !0, onClick: h, children: "Draw AOI" }) }),
|
|
467
|
+
/* @__PURE__ */ N(
|
|
468
|
+
Sn,
|
|
468
469
|
{
|
|
469
470
|
className: n.fullWidth,
|
|
470
471
|
open: Boolean(t),
|
|
471
472
|
onClose: E,
|
|
472
473
|
children: [
|
|
473
474
|
/* @__PURE__ */ l(
|
|
474
|
-
|
|
475
|
+
je,
|
|
475
476
|
{
|
|
476
477
|
onClick: () => {
|
|
477
|
-
d(
|
|
478
|
+
d(se.POLYGON), E();
|
|
478
479
|
},
|
|
479
480
|
children: "Polygon"
|
|
480
481
|
}
|
|
481
482
|
),
|
|
482
483
|
/* @__PURE__ */ l(
|
|
483
|
-
|
|
484
|
+
je,
|
|
484
485
|
{
|
|
485
486
|
onClick: () => {
|
|
486
|
-
d(
|
|
487
|
+
d(se.BOX), E();
|
|
487
488
|
},
|
|
488
489
|
children: "Box"
|
|
489
490
|
}
|
|
490
491
|
),
|
|
491
492
|
/* @__PURE__ */ l(
|
|
492
|
-
|
|
493
|
+
je,
|
|
493
494
|
{
|
|
494
495
|
onClick: () => {
|
|
495
496
|
u(), E();
|
|
@@ -503,137 +504,137 @@ const ns = (e) => {
|
|
|
503
504
|
] });
|
|
504
505
|
};
|
|
505
506
|
var he = /* @__PURE__ */ ((e) => (e.WGS84 = "EPSG:4326", e.WEB_MERCATOR = "EPSG:3857", e))(he || {});
|
|
506
|
-
const
|
|
507
|
+
const st = 5, at = 2, Zt = Ie(null), qi = Zt.Provider, Et = 35, Ct = 32, Yi = 10, Xi = (e) => e !== void 0 && e !== he.WGS84 ? zn([Et, Ct], he.WGS84, e) : [Et, Ct], Zi = (e) => {
|
|
507
508
|
switch (e) {
|
|
508
509
|
case he.WEB_MERCATOR:
|
|
509
|
-
return (n) =>
|
|
510
|
+
return (n) => ft(n, "Mercator: {y}m, {x}m", at);
|
|
510
511
|
case he.WGS84:
|
|
511
|
-
return (n) =>
|
|
512
|
+
return (n) => ft(n, "WGS84: {y}°N {x}°E", st);
|
|
512
513
|
default:
|
|
513
514
|
return (n) => "";
|
|
514
515
|
}
|
|
515
|
-
},
|
|
516
|
-
const e =
|
|
516
|
+
}, ut = () => {
|
|
517
|
+
const e = xe(Zt);
|
|
517
518
|
if (e === null)
|
|
518
519
|
throw new Error("map context is null, please check the provider");
|
|
519
520
|
return e;
|
|
520
|
-
},
|
|
521
|
-
const n =
|
|
522
|
-
new
|
|
523
|
-
view: new
|
|
521
|
+
}, Ji = (e) => {
|
|
522
|
+
const n = be(null), { allowFullScreen: t, showMousePosition: i, projection: o } = e, [r] = A(
|
|
523
|
+
new Hn({
|
|
524
|
+
view: new Gn({
|
|
524
525
|
projection: o ?? he.WGS84
|
|
525
526
|
}),
|
|
526
|
-
controls:
|
|
527
|
+
controls: Vn()
|
|
527
528
|
})
|
|
528
529
|
);
|
|
529
|
-
|
|
530
|
-
r.getView().setCenter(e.center ??
|
|
531
|
-
}, [r, e.center, e.projection]),
|
|
532
|
-
r.getView().setZoom(e.zoom ??
|
|
530
|
+
I(() => {
|
|
531
|
+
r.getView().setCenter(e.center ?? Xi(e.projection));
|
|
532
|
+
}, [r, e.center, e.projection]), I(() => {
|
|
533
|
+
r.getView().setZoom(e.zoom ?? Yi);
|
|
533
534
|
}, [r, e.zoom, e.projection]);
|
|
534
|
-
const d = (u,
|
|
535
|
-
|
|
536
|
-
|
|
535
|
+
const d = (u, h) => {
|
|
536
|
+
h.getControls().forEach((C) => {
|
|
537
|
+
C instanceof u && h.removeControl(C);
|
|
537
538
|
});
|
|
538
539
|
};
|
|
539
|
-
return
|
|
540
|
-
r.setTarget(n.current), t !== void 0 && t ? r.addControl(new
|
|
541
|
-
}, [r, t]),
|
|
542
|
-
i !== void 0 && i ? (d(
|
|
543
|
-
new
|
|
544
|
-
coordinateFormat:
|
|
540
|
+
return I(() => {
|
|
541
|
+
r.setTarget(n.current), t !== void 0 && t ? r.addControl(new yt()) : d(yt, r);
|
|
542
|
+
}, [r, t]), I(() => {
|
|
543
|
+
i !== void 0 && i ? (d(qe, r), r.addControl(
|
|
544
|
+
new qe({
|
|
545
|
+
coordinateFormat: Zi(o ?? he.WGS84),
|
|
545
546
|
projection: o ?? he.WGS84,
|
|
546
547
|
undefinedHTML: " "
|
|
547
548
|
})
|
|
548
|
-
)) : d(
|
|
549
|
-
}, [r, i, o]), /* @__PURE__ */
|
|
549
|
+
)) : d(qe, r);
|
|
550
|
+
}, [r, i, o]), /* @__PURE__ */ N(qi, { value: r, children: [
|
|
550
551
|
/* @__PURE__ */ l("div", { className: "map", ref: n }),
|
|
551
552
|
e.children
|
|
552
553
|
] });
|
|
553
|
-
},
|
|
554
|
-
const e =
|
|
554
|
+
}, Jt = Ie(null), Qi = Jt.Provider, er = () => {
|
|
555
|
+
const e = xe(Jt);
|
|
555
556
|
if (e === null)
|
|
556
557
|
throw new Error("tile layer context is null, please check the provider");
|
|
557
558
|
return e;
|
|
558
|
-
},
|
|
559
|
-
const t =
|
|
560
|
-
return
|
|
559
|
+
}, tr = ({ options: e, children: n }) => {
|
|
560
|
+
const t = ut(), [i] = A(new $n(e));
|
|
561
|
+
return I(() => (t.addLayer(i), () => {
|
|
561
562
|
t.removeLayer(i);
|
|
562
|
-
}), [t, i]), /* @__PURE__ */ l(
|
|
563
|
-
},
|
|
564
|
-
const e =
|
|
563
|
+
}), [t, i]), /* @__PURE__ */ l(Qi, { value: i, children: n });
|
|
564
|
+
}, Qt = Ie(null), nr = Qt.Provider, ir = () => {
|
|
565
|
+
const e = xe(Qt);
|
|
565
566
|
if (e === null)
|
|
566
567
|
throw new Error("vector layer context is null, please check the provider");
|
|
567
568
|
return e;
|
|
568
|
-
},
|
|
569
|
-
const n =
|
|
570
|
-
return
|
|
569
|
+
}, rr = ({ children: e }) => {
|
|
570
|
+
const n = ut(), [t] = A(new Wn());
|
|
571
|
+
return I(() => (n.addLayer(t), () => {
|
|
571
572
|
n.removeLayer(t);
|
|
572
|
-
}), [n, t]), /* @__PURE__ */ l(
|
|
573
|
-
},
|
|
574
|
-
const e =
|
|
573
|
+
}), [n, t]), /* @__PURE__ */ l(nr, { value: t, children: e });
|
|
574
|
+
}, en = Ie(null), or = en.Provider, sr = () => {
|
|
575
|
+
const e = xe(en);
|
|
575
576
|
if (e === null)
|
|
576
577
|
throw new Error("vector source context is null, please check the provider");
|
|
577
578
|
return e;
|
|
578
|
-
},
|
|
579
|
-
const n =
|
|
580
|
-
return
|
|
579
|
+
}, ar = ({ children: e }) => {
|
|
580
|
+
const n = ir(), [t] = A(new Un());
|
|
581
|
+
return I(() => {
|
|
581
582
|
n.setSource(t);
|
|
582
|
-
}, [t, n]), /* @__PURE__ */ l(
|
|
583
|
-
},
|
|
584
|
-
const n =
|
|
585
|
-
return
|
|
586
|
-
const i = new
|
|
583
|
+
}, [t, n]), /* @__PURE__ */ l(or, { value: t, children: e });
|
|
584
|
+
}, lr = ({ geometry: e }) => {
|
|
585
|
+
const n = sr();
|
|
586
|
+
return I(() => {
|
|
587
|
+
const i = new Vt().readFeature(e);
|
|
587
588
|
return n.addFeature(i), () => {
|
|
588
589
|
n.removeFeature(i);
|
|
589
590
|
};
|
|
590
591
|
}, [e, n]), null;
|
|
591
|
-
},
|
|
592
|
-
const n =
|
|
593
|
-
return
|
|
594
|
-
n.setSource(new
|
|
592
|
+
}, cr = (e) => {
|
|
593
|
+
const n = er();
|
|
594
|
+
return I(() => {
|
|
595
|
+
n.setSource(new Kn());
|
|
595
596
|
}, [n]), null;
|
|
596
|
-
},
|
|
597
|
-
const t =
|
|
598
|
-
return
|
|
597
|
+
}, dr = ({ drawType: e, onPolygonSelected: n }) => {
|
|
598
|
+
const t = ut();
|
|
599
|
+
return I(() => {
|
|
599
600
|
const i = {
|
|
600
601
|
type: "Circle"
|
|
601
602
|
/* CIRCLE */
|
|
602
603
|
};
|
|
603
604
|
switch (e) {
|
|
604
|
-
case
|
|
605
|
-
i.geometryFunction =
|
|
605
|
+
case se.BOX:
|
|
606
|
+
i.geometryFunction = qn();
|
|
606
607
|
break;
|
|
607
|
-
case
|
|
608
|
+
case se.POLYGON:
|
|
608
609
|
i.type = "Polygon";
|
|
609
610
|
break;
|
|
610
611
|
default:
|
|
611
612
|
return;
|
|
612
613
|
}
|
|
613
|
-
const o = new
|
|
614
|
+
const o = new jn(i);
|
|
614
615
|
t.addInteraction(o);
|
|
615
616
|
const r = (d) => {
|
|
616
|
-
const
|
|
617
|
-
n == null || n(
|
|
617
|
+
const h = new Vt().writeGeometryObject(d.feature.getGeometry());
|
|
618
|
+
n == null || n(h);
|
|
618
619
|
};
|
|
619
620
|
return o.on("drawend", r), () => {
|
|
620
621
|
o.un("drawend", r), t.removeInteraction(o);
|
|
621
622
|
};
|
|
622
623
|
}, [n, e, t]), null;
|
|
623
624
|
};
|
|
624
|
-
const
|
|
625
|
+
const ur = (e) => {
|
|
625
626
|
const n = (t) => {
|
|
626
|
-
const i =
|
|
627
|
+
const i = Fn(t);
|
|
627
628
|
e.onPolygonSelection(i);
|
|
628
629
|
};
|
|
629
|
-
return /* @__PURE__ */
|
|
630
|
-
/* @__PURE__ */ l(
|
|
631
|
-
e.selectionPolygon && /* @__PURE__ */ l(
|
|
630
|
+
return /* @__PURE__ */ N(Ji, { allowFullScreen: !0, showMousePosition: !0, children: [
|
|
631
|
+
/* @__PURE__ */ l(tr, { children: /* @__PURE__ */ l(cr, {}) }),
|
|
632
|
+
e.selectionPolygon && /* @__PURE__ */ l(rr, { children: /* @__PURE__ */ l(ar, { children: /* @__PURE__ */ l(lr, { geometry: e.selectionPolygon }) }) }),
|
|
632
633
|
e.children,
|
|
633
|
-
e.drawType !== void 0 && /* @__PURE__ */ l(
|
|
634
|
+
e.drawType !== void 0 && /* @__PURE__ */ l(dr, { drawType: e.drawType, onPolygonSelected: n })
|
|
634
635
|
] });
|
|
635
|
-
},
|
|
636
|
-
(e) =>
|
|
636
|
+
}, Xe = 1.5, hr = 80, mr = ke(
|
|
637
|
+
(e) => We({
|
|
637
638
|
map: {
|
|
638
639
|
height: "100%",
|
|
639
640
|
width: "100%",
|
|
@@ -642,12 +643,12 @@ const ar = (e) => {
|
|
|
642
643
|
absolute: {
|
|
643
644
|
position: "absolute",
|
|
644
645
|
zIndex: 1e3,
|
|
645
|
-
left: e.spacing(
|
|
646
|
-
top: e.spacing(
|
|
646
|
+
left: e.spacing(Xe),
|
|
647
|
+
top: e.spacing(Xe)
|
|
647
648
|
},
|
|
648
649
|
contentContainer: {
|
|
649
|
-
marginTop: e.spacing(
|
|
650
|
-
width: e.spacing(
|
|
650
|
+
marginTop: e.spacing(Xe),
|
|
651
|
+
width: e.spacing(hr)
|
|
651
652
|
},
|
|
652
653
|
filtersContainer: {
|
|
653
654
|
display: "flex",
|
|
@@ -657,18 +658,18 @@ const ar = (e) => {
|
|
|
657
658
|
marginLeft: e.spacing(1)
|
|
658
659
|
}
|
|
659
660
|
})
|
|
660
|
-
),
|
|
661
|
-
var
|
|
662
|
-
const [n, t] = A(), [i, o] = A(), r =
|
|
661
|
+
), cs = (e) => {
|
|
662
|
+
var h;
|
|
663
|
+
const [n, t] = A(), [i, o] = A(), r = mr(), d = (E) => {
|
|
663
664
|
o(E), t(void 0), e.handlePolygonSelected(E);
|
|
664
665
|
}, u = () => {
|
|
665
666
|
o(void 0), e.handlePolygonReset();
|
|
666
667
|
};
|
|
667
|
-
return /* @__PURE__ */
|
|
668
|
-
/* @__PURE__ */
|
|
669
|
-
/* @__PURE__ */
|
|
668
|
+
return /* @__PURE__ */ N("div", { className: r.map, children: [
|
|
669
|
+
/* @__PURE__ */ N("div", { className: `${r.absolute}`, children: [
|
|
670
|
+
/* @__PURE__ */ N(et, { className: r.filtersContainer, children: [
|
|
670
671
|
/* @__PURE__ */ l(
|
|
671
|
-
|
|
672
|
+
ji,
|
|
672
673
|
{
|
|
673
674
|
onCancelDraw: () => t(void 0),
|
|
674
675
|
onReset: u,
|
|
@@ -676,27 +677,27 @@ const ar = (e) => {
|
|
|
676
677
|
isSelectionEnabled: n !== void 0
|
|
677
678
|
}
|
|
678
679
|
),
|
|
679
|
-
(
|
|
680
|
+
(h = e.filters) == null ? void 0 : h.map((E, C) => /* @__PURE__ */ l("div", { className: r.filtersMargin, children: E }, C))
|
|
680
681
|
] }),
|
|
681
|
-
/* @__PURE__ */ l(
|
|
682
|
+
/* @__PURE__ */ l(et, { color: "red", className: `${r.contentContainer}`, children: e.children })
|
|
682
683
|
] }),
|
|
683
|
-
/* @__PURE__ */ l(
|
|
684
|
+
/* @__PURE__ */ l(ur, { children: e.mapContent, onPolygonSelection: d, drawType: n, selectionPolygon: i })
|
|
684
685
|
] });
|
|
685
686
|
};
|
|
686
|
-
function
|
|
687
|
-
const { headCells: n, order: t, orderBy: i, onRequestSort: o, isCollapseable: r } = e, d = (u) => (
|
|
688
|
-
o(
|
|
687
|
+
function pr(e) {
|
|
688
|
+
const { headCells: n, order: t, orderBy: i, onRequestSort: o, isCollapseable: r } = e, d = (u) => (h) => {
|
|
689
|
+
o(h, u);
|
|
689
690
|
};
|
|
690
|
-
return /* @__PURE__ */ l(
|
|
691
|
-
r && /* @__PURE__ */ l(
|
|
691
|
+
return /* @__PURE__ */ l(Yn, { children: /* @__PURE__ */ N(He, { children: [
|
|
692
|
+
r && /* @__PURE__ */ l(Me, {}),
|
|
692
693
|
n.map((u) => /* @__PURE__ */ l(
|
|
693
|
-
|
|
694
|
+
Me,
|
|
694
695
|
{
|
|
695
696
|
align: u.numeric ? "right" : "left",
|
|
696
697
|
padding: u.disablePadding ? "none" : "default",
|
|
697
698
|
sortDirection: i === u.id ? t : !1,
|
|
698
699
|
children: /* @__PURE__ */ l(
|
|
699
|
-
|
|
700
|
+
yn,
|
|
700
701
|
{
|
|
701
702
|
active: i === u.id,
|
|
702
703
|
direction: i === u.id ? t : "asc",
|
|
@@ -709,155 +710,184 @@ function dr(e) {
|
|
|
709
710
|
))
|
|
710
711
|
] }) });
|
|
711
712
|
}
|
|
712
|
-
const
|
|
713
|
-
/* @__PURE__ */
|
|
713
|
+
const gr = zt(
|
|
714
|
+
/* @__PURE__ */ Ot.createElement("path", {
|
|
714
715
|
d: "M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"
|
|
715
716
|
}),
|
|
716
717
|
"KeyboardArrowDown"
|
|
717
|
-
),
|
|
718
|
-
/* @__PURE__ */
|
|
718
|
+
), fr = zt(
|
|
719
|
+
/* @__PURE__ */ Ot.createElement("path", {
|
|
719
720
|
d: "M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"
|
|
720
721
|
}),
|
|
721
722
|
"KeyboardArrowUp"
|
|
722
723
|
);
|
|
723
|
-
function
|
|
724
|
-
const { cellsMetadata: n, isRowSelected: t, item: i, onRowSelected: o, rowIndex: r, isCollapseable: d, collapsedElement: u } = e, [
|
|
725
|
-
return /* @__PURE__ */
|
|
726
|
-
/* @__PURE__ */
|
|
724
|
+
function yr(e) {
|
|
725
|
+
const { cellsMetadata: n, isRowSelected: t, item: i, onRowSelected: o, rowIndex: r, isCollapseable: d, collapsedElement: u } = e, [h, E] = A(!1), C = n.length;
|
|
726
|
+
return /* @__PURE__ */ N(te, { children: [
|
|
727
|
+
/* @__PURE__ */ N(He, { hover: !0, selected: t, onClick: () => {
|
|
727
728
|
o == null || o(r);
|
|
728
729
|
}, children: [
|
|
729
|
-
d && /* @__PURE__ */ l(
|
|
730
|
-
|
|
730
|
+
d && /* @__PURE__ */ l(Me, { padding: "checkbox", children: /* @__PURE__ */ l(
|
|
731
|
+
vn,
|
|
731
732
|
{
|
|
732
733
|
"aria-label": "expand row",
|
|
733
734
|
size: "small",
|
|
734
|
-
onClick: (
|
|
735
|
-
|
|
735
|
+
onClick: (b) => {
|
|
736
|
+
b.stopPropagation(), E(!h);
|
|
736
737
|
},
|
|
737
|
-
children:
|
|
738
|
+
children: h ? /* @__PURE__ */ l(fr, {}) : /* @__PURE__ */ l(gr, {})
|
|
738
739
|
}
|
|
739
740
|
) }),
|
|
740
|
-
n.map((
|
|
741
|
-
|
|
741
|
+
n.map((b) => /* @__PURE__ */ l(
|
|
742
|
+
Me,
|
|
742
743
|
{
|
|
743
|
-
align:
|
|
744
|
-
padding:
|
|
745
|
-
children:
|
|
744
|
+
align: b.numeric ? "right" : "left",
|
|
745
|
+
padding: b.disablePadding ? "none" : "default",
|
|
746
|
+
children: b.transform ? b.transform(i[b.id]) : i[b.id]
|
|
746
747
|
},
|
|
747
|
-
|
|
748
|
+
b.id + r.toString()
|
|
748
749
|
))
|
|
749
750
|
] }),
|
|
750
|
-
d && /* @__PURE__ */ l(
|
|
751
|
+
d && /* @__PURE__ */ l(He, { children: /* @__PURE__ */ l(Me, { style: { paddingBottom: 0, paddingTop: 0 }, colSpan: C + 1, children: /* @__PURE__ */ l(En, { in: h, unmountOnExit: !0, timeout: "auto", children: u == null ? void 0 : u(i) }) }) })
|
|
751
752
|
] });
|
|
752
753
|
}
|
|
753
|
-
function
|
|
754
|
+
function ds(e) {
|
|
754
755
|
const [n, t] = A(""), [i, o] = A("asc"), {
|
|
755
756
|
cellsMetadata: r,
|
|
756
757
|
items: d,
|
|
757
758
|
onRequestSort: u,
|
|
758
|
-
onRowSelected:
|
|
759
|
+
onRowSelected: h,
|
|
759
760
|
isCollapseable: E,
|
|
760
|
-
collapsedElement:
|
|
761
|
-
isDense:
|
|
762
|
-
page:
|
|
763
|
-
rowsPerPage:
|
|
764
|
-
count:
|
|
765
|
-
handleChangePage:
|
|
766
|
-
handleChangeRowsPerPage:
|
|
761
|
+
collapsedElement: C,
|
|
762
|
+
isDense: L,
|
|
763
|
+
page: b,
|
|
764
|
+
rowsPerPage: P,
|
|
765
|
+
count: B,
|
|
766
|
+
handleChangePage: $,
|
|
767
|
+
handleChangeRowsPerPage: q
|
|
767
768
|
} = e;
|
|
768
|
-
return /* @__PURE__ */
|
|
769
|
-
/* @__PURE__ */
|
|
769
|
+
return /* @__PURE__ */ N(Cn, { component: et, children: [
|
|
770
|
+
/* @__PURE__ */ N(wn, { size: L ? "small" : "medium", children: [
|
|
770
771
|
/* @__PURE__ */ l(
|
|
771
|
-
|
|
772
|
+
pr,
|
|
772
773
|
{
|
|
773
774
|
headCells: r,
|
|
774
|
-
onRequestSort: (Y,
|
|
775
|
-
const x = n ===
|
|
776
|
-
o(x ? "desc" : "asc"), t(
|
|
775
|
+
onRequestSort: (Y, K) => {
|
|
776
|
+
const x = n === K && i === "asc";
|
|
777
|
+
o(x ? "desc" : "asc"), t(K), u(K, x ? "desc" : "asc");
|
|
777
778
|
},
|
|
778
779
|
order: i,
|
|
779
780
|
orderBy: n,
|
|
780
781
|
isCollapseable: E
|
|
781
782
|
}
|
|
782
783
|
),
|
|
783
|
-
/* @__PURE__ */
|
|
784
|
-
d.map((Y,
|
|
785
|
-
|
|
784
|
+
/* @__PURE__ */ N(bn, { children: [
|
|
785
|
+
d.map((Y, K) => /* @__PURE__ */ l(
|
|
786
|
+
yr,
|
|
786
787
|
{
|
|
787
788
|
item: Y,
|
|
788
|
-
rowIndex:
|
|
789
|
+
rowIndex: K,
|
|
789
790
|
isCollapseable: E,
|
|
790
791
|
cellsMetadata: r,
|
|
791
|
-
collapsedElement:
|
|
792
|
+
collapsedElement: C,
|
|
792
793
|
isRowSelected: !1,
|
|
793
|
-
onRowSelected:
|
|
794
|
+
onRowSelected: h
|
|
794
795
|
},
|
|
795
|
-
|
|
796
|
+
K
|
|
796
797
|
)),
|
|
797
|
-
(d.length === 0 ||
|
|
798
|
-
|
|
798
|
+
(d.length === 0 || P > d.length) && /* @__PURE__ */ l(
|
|
799
|
+
He,
|
|
799
800
|
{
|
|
800
801
|
style: {
|
|
801
|
-
height: (
|
|
802
|
+
height: (L ? 33 : 53) * (P - d.length)
|
|
802
803
|
},
|
|
803
|
-
children: /* @__PURE__ */ l(
|
|
804
|
+
children: /* @__PURE__ */ l(Me, { colSpan: E ? r.length + 1 : r.length, children: d.length === 0 && /* @__PURE__ */ l(Tn, { align: "center", children: "No results :(" }) })
|
|
804
805
|
}
|
|
805
806
|
)
|
|
806
807
|
] })
|
|
807
808
|
] }),
|
|
808
809
|
/* @__PURE__ */ l(
|
|
809
|
-
|
|
810
|
+
_n,
|
|
810
811
|
{
|
|
811
|
-
rowsPerPage:
|
|
812
|
+
rowsPerPage: P,
|
|
812
813
|
rowsPerPageOptions: [5, 10],
|
|
813
814
|
component: "div",
|
|
814
|
-
count:
|
|
815
|
-
page:
|
|
816
|
-
onPageChange:
|
|
817
|
-
onRowsPerPageChange:
|
|
815
|
+
count: B,
|
|
816
|
+
page: b,
|
|
817
|
+
onPageChange: $,
|
|
818
|
+
onRowsPerPageChange: q
|
|
818
819
|
}
|
|
819
820
|
)
|
|
820
821
|
] });
|
|
821
822
|
}
|
|
822
|
-
const
|
|
823
|
+
const us = (e) => {
|
|
823
824
|
const { children: n, ...t } = e;
|
|
824
|
-
return /* @__PURE__ */ l(
|
|
825
|
-
},
|
|
825
|
+
return /* @__PURE__ */ l(Xn, { ...t, children: n });
|
|
826
|
+
}, hs = (e) => {
|
|
826
827
|
const { children: n, ...t } = e;
|
|
827
|
-
return /* @__PURE__ */ l(
|
|
828
|
-
},
|
|
829
|
-
const
|
|
830
|
-
const n =
|
|
831
|
-
return
|
|
828
|
+
return /* @__PURE__ */ l(Zn, { ...t, children: n });
|
|
829
|
+
}, wt = (e) => e * Math.PI / 180, Be = (e) => e * (180 / Math.PI), vr = (e) => 0.05 * (5916575505e-1 / Math.pow(2, e - 1) / 2) * (Math.cos(wt(85.362 / 2)) / Math.sin(wt(85.362 / 2)));
|
|
830
|
+
const Er = (e) => {
|
|
831
|
+
const n = le(), t = be(null), [i, o] = A({ x: 0, y: 0 });
|
|
832
|
+
return I(() => {
|
|
832
833
|
n.screenSpaceEventHandler.setInputAction((r) => {
|
|
833
834
|
r != null && r.endPosition && o({ ...r.endPosition });
|
|
834
|
-
},
|
|
835
|
-
}, [t, n]),
|
|
836
|
-
const r = n.scene.globe.ellipsoid, d = n.camera.pickEllipsoid(new
|
|
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);
|
|
837
838
|
if (d) {
|
|
838
839
|
const u = r.cartesianToCartographic(d);
|
|
839
840
|
if (t.current) {
|
|
840
|
-
let
|
|
841
|
+
let h = "";
|
|
841
842
|
switch (e.projection) {
|
|
842
843
|
case he.WEB_MERCATOR: {
|
|
843
|
-
const
|
|
844
|
-
|
|
845
|
-
|
|
844
|
+
const C = new ci(r).project(u);
|
|
845
|
+
h = `Mercator: ${C.y.toFixed(at)}m, ${C.x.toFixed(
|
|
846
|
+
at
|
|
846
847
|
)}m`, t.current.style.width = "220px";
|
|
847
848
|
break;
|
|
848
849
|
}
|
|
849
850
|
case he.WGS84: {
|
|
850
|
-
const E =
|
|
851
|
-
|
|
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";
|
|
852
853
|
break;
|
|
853
854
|
}
|
|
854
855
|
}
|
|
855
|
-
t.current.innerHTML =
|
|
856
|
+
t.current.innerHTML = h;
|
|
856
857
|
}
|
|
857
858
|
}
|
|
858
859
|
}, [i, t, n, e.projection]), /* @__PURE__ */ l("div", { className: "trackerPosition", ref: t });
|
|
860
|
+
}, tn = (e, n, t) => {
|
|
861
|
+
let i;
|
|
862
|
+
if (e.scene.mode !== we.SCENE2D)
|
|
863
|
+
i = e.scene.pickPosition(new Ee(n, t));
|
|
864
|
+
else {
|
|
865
|
+
const o = e.scene.globe.ellipsoid;
|
|
866
|
+
i = e.camera.pickEllipsoid(new Ee(n, t), o);
|
|
867
|
+
}
|
|
868
|
+
return Oe.fromCartesian(i);
|
|
869
|
+
}, Cr = (e, n, t) => {
|
|
870
|
+
const i = tn(e, n, t);
|
|
871
|
+
return {
|
|
872
|
+
type: "Feature",
|
|
873
|
+
properties: {},
|
|
874
|
+
geometry: {
|
|
875
|
+
type: "Point",
|
|
876
|
+
coordinates: [ce.toDegrees(i.longitude), ce.toDegrees(i.latitude)]
|
|
877
|
+
}
|
|
878
|
+
};
|
|
879
|
+
}, wr = (e, n, t) => {
|
|
880
|
+
try {
|
|
881
|
+
const i = tn(e, n, t);
|
|
882
|
+
return {
|
|
883
|
+
longitude: ce.toDegrees(i.longitude),
|
|
884
|
+
latitude: ce.toDegrees(i.latitude)
|
|
885
|
+
};
|
|
886
|
+
} catch {
|
|
887
|
+
return;
|
|
888
|
+
}
|
|
859
889
|
};
|
|
860
|
-
const
|
|
890
|
+
const Ze = [
|
|
861
891
|
1,
|
|
862
892
|
2,
|
|
863
893
|
3,
|
|
@@ -890,51 +920,51 @@ const Ke = [
|
|
|
890
920
|
2e7,
|
|
891
921
|
3e7,
|
|
892
922
|
5e7
|
|
893
|
-
],
|
|
894
|
-
const o =
|
|
923
|
+
], br = (e, n, t, i) => {
|
|
924
|
+
const o = ee(i, "METERS_UNIT") ?? "m", r = ee(i, "KILOMETERS_UNIT") ?? "km", d = {
|
|
895
925
|
barWidth: void 0,
|
|
896
926
|
distanceLabel: void 0,
|
|
897
927
|
lastLegendUpdate: n.lastLegendUpdate
|
|
898
|
-
}, u = new
|
|
899
|
-
if (
|
|
928
|
+
}, u = new ui(), h = new Date().getTime();
|
|
929
|
+
if (h < d.lastLegendUpdate + 250)
|
|
900
930
|
return;
|
|
901
|
-
d.lastLegendUpdate =
|
|
902
|
-
const E = e.scene.canvas.clientWidth,
|
|
903
|
-
if (!
|
|
931
|
+
d.lastLegendUpdate = h;
|
|
932
|
+
const E = e.scene.canvas.clientWidth, C = e.scene.canvas.clientHeight, L = e.scene.camera.getPickRay(new Ee(E / 2 | 0, C - 1)), b = e.scene.camera.getPickRay(new Ee(1 + E / 2 | 0, C - 1)), P = e.scene.globe, B = P.pick(L, e.scene), $ = P.pick(b, e.scene);
|
|
933
|
+
if (!B || !$)
|
|
904
934
|
return;
|
|
905
|
-
const
|
|
906
|
-
u.setEndPoints(
|
|
907
|
-
const Y = u.surfaceDistance,
|
|
935
|
+
const q = P.ellipsoid.cartesianToCartographic(B), H = P.ellipsoid.cartesianToCartographic($);
|
|
936
|
+
u.setEndPoints(q, H);
|
|
937
|
+
const Y = u.surfaceDistance, K = 100;
|
|
908
938
|
let x;
|
|
909
|
-
for (let
|
|
910
|
-
|
|
911
|
-
if (
|
|
912
|
-
let
|
|
913
|
-
x >= 1e3 ?
|
|
939
|
+
for (let W = Ze.length - 1; !Ve(x) && W >= 0; --W)
|
|
940
|
+
Ze[W] / Y < K && (x = Ze[W]);
|
|
941
|
+
if (Ve(x)) {
|
|
942
|
+
let W = "";
|
|
943
|
+
x >= 1e3 ? W = `${(x / 1e3).toString()} ${r}` : W = `${x.toString()} ${o}`, d.barWidth = x / Y | 0, d.distanceLabel = W;
|
|
914
944
|
}
|
|
915
945
|
t(d);
|
|
916
|
-
},
|
|
917
|
-
const n =
|
|
946
|
+
}, Tr = (e) => {
|
|
947
|
+
const n = le(), [t, i] = A({
|
|
918
948
|
barWidth: void 0,
|
|
919
949
|
distanceLabel: void 0,
|
|
920
950
|
lastLegendUpdate: -1
|
|
921
951
|
});
|
|
922
|
-
|
|
923
|
-
const r = (
|
|
924
|
-
|
|
925
|
-
}, d = new
|
|
952
|
+
I(() => {
|
|
953
|
+
const r = (h) => {
|
|
954
|
+
br(n, t, i, e.locale);
|
|
955
|
+
}, d = new di(), u = (h) => {
|
|
926
956
|
n.scene.globe.tilesLoaded && (r(new MouseEvent("mouse")), d.removeAll());
|
|
927
957
|
};
|
|
928
958
|
return d.add(n.scene.globe.tileLoadProgressEvent, u), n.camera.moveEnd.addEventListener(r), () => {
|
|
929
959
|
try {
|
|
930
|
-
|
|
931
|
-
} catch (
|
|
932
|
-
console.log('CESIUM camera "moveEnd" remove listener failed',
|
|
960
|
+
ee(n, "_cesiumWidget") != null && n.camera.moveEnd.removeEventListener(r);
|
|
961
|
+
} catch (h) {
|
|
962
|
+
console.log('CESIUM camera "moveEnd" remove listener failed', h);
|
|
933
963
|
}
|
|
934
964
|
};
|
|
935
965
|
}, [n, e.locale, t]);
|
|
936
966
|
const o = (r) => 5 + (125 - r) / 2;
|
|
937
|
-
return /* @__PURE__ */ l("div", { className: "scalePosition", children:
|
|
967
|
+
return /* @__PURE__ */ l("div", { className: "scalePosition", children: Ve(t.barWidth) && /* @__PURE__ */ N(te, { children: [
|
|
938
968
|
/* @__PURE__ */ l("div", { className: "distance-legend-label", children: /* @__PURE__ */ l("bdi", { children: t.distanceLabel }) }),
|
|
939
969
|
/* @__PURE__ */ l(
|
|
940
970
|
"div",
|
|
@@ -948,30 +978,30 @@ const Ke = [
|
|
|
948
978
|
}
|
|
949
979
|
)
|
|
950
980
|
] }) });
|
|
951
|
-
},
|
|
952
|
-
MORPHING:
|
|
953
|
-
COLUMBUS_VIEW:
|
|
954
|
-
SCENE2D:
|
|
955
|
-
SCENE3D:
|
|
981
|
+
}, oe = {
|
|
982
|
+
MORPHING: we.MORPHING,
|
|
983
|
+
COLUMBUS_VIEW: we.COLUMBUS_VIEW,
|
|
984
|
+
SCENE2D: we.SCENE2D,
|
|
985
|
+
SCENE3D: we.SCENE3D
|
|
956
986
|
};
|
|
957
|
-
const
|
|
958
|
-
const i =
|
|
987
|
+
const bt = (e, n) => {
|
|
988
|
+
const i = ee(n.scene.globe, "_surface.tileProvider"), o = i._quadtree, r = n.canvas.height, d = ee(n.camera.frustum, "sseDenominator") ?? 1;
|
|
959
989
|
for (let u = 0; u <= 19; u++)
|
|
960
990
|
if (i.getLevelMaximumGeometricError(u) * r / (e * d) < o.maximumScreenSpaceError)
|
|
961
991
|
return u;
|
|
962
992
|
return null;
|
|
963
|
-
},
|
|
993
|
+
}, _r = (e, n) => {
|
|
964
994
|
e = e || 10;
|
|
965
995
|
const t = [];
|
|
966
996
|
let i = 1e5, o = 0;
|
|
967
997
|
for (let r = 1e8; r > i; r = r - i) {
|
|
968
|
-
const d =
|
|
998
|
+
const d = bt(r, n);
|
|
969
999
|
if (d === null)
|
|
970
1000
|
break;
|
|
971
1001
|
if (d !== o) {
|
|
972
|
-
let u = r,
|
|
973
|
-
for (;
|
|
974
|
-
r = u + (
|
|
1002
|
+
let u = r, h = r + i;
|
|
1003
|
+
for (; h - u > e; )
|
|
1004
|
+
r = u + (h - u) / 2, bt(r, n) === d ? u = r : h = r;
|
|
975
1005
|
t.push({
|
|
976
1006
|
level: d,
|
|
977
1007
|
height: Math.round(r)
|
|
@@ -979,102 +1009,102 @@ const yt = (e, n) => {
|
|
|
979
1009
|
}
|
|
980
1010
|
}
|
|
981
1011
|
return t;
|
|
982
|
-
},
|
|
983
|
-
const n =
|
|
984
|
-
return
|
|
1012
|
+
}, Lr = (e) => {
|
|
1013
|
+
const n = le(), [t, i] = A(1), o = _r(1, n);
|
|
1014
|
+
return I(() => {
|
|
985
1015
|
const r = () => {
|
|
986
1016
|
const d = n.camera, u = 0.5;
|
|
987
|
-
let
|
|
1017
|
+
let h = 0;
|
|
988
1018
|
switch (n.scene.mode) {
|
|
989
|
-
case
|
|
990
|
-
|
|
1019
|
+
case oe.SCENE3D:
|
|
1020
|
+
h = n.scene.mapProjection.ellipsoid.cartesianToCartographic(d.positionWC).height;
|
|
991
1021
|
break;
|
|
992
|
-
case
|
|
993
|
-
|
|
1022
|
+
case oe.SCENE2D:
|
|
1023
|
+
h = (d.frustum.right - d.frustum.left) * u;
|
|
994
1024
|
break;
|
|
995
|
-
case
|
|
996
|
-
|
|
1025
|
+
case oe.COLUMBUS_VIEW:
|
|
1026
|
+
h = d.position.z;
|
|
997
1027
|
break;
|
|
998
1028
|
default:
|
|
999
|
-
|
|
1029
|
+
h = 0;
|
|
1000
1030
|
break;
|
|
1001
1031
|
}
|
|
1002
1032
|
if (o.length > 0) {
|
|
1003
|
-
const E = o.reduce((
|
|
1033
|
+
const E = o.reduce((C, L) => Math.abs(L.height - h) < Math.abs(C.height - h) ? L : C);
|
|
1004
1034
|
i(E.level);
|
|
1005
1035
|
}
|
|
1006
1036
|
};
|
|
1007
1037
|
return n.camera.moveEnd.addEventListener(r), () => {
|
|
1008
1038
|
try {
|
|
1009
|
-
|
|
1039
|
+
ee(n, "_cesiumWidget") != null && n.camera.moveEnd.removeEventListener(r);
|
|
1010
1040
|
} catch (d) {
|
|
1011
1041
|
console.log('CESIUM camera "moveEnd"(from zoom tracker) remove listener failed', d);
|
|
1012
1042
|
}
|
|
1013
1043
|
};
|
|
1014
|
-
}, [n, o.length]), /* @__PURE__ */
|
|
1044
|
+
}, [n, o.length]), /* @__PURE__ */ N("div", { className: "zoomLevel", children: [
|
|
1015
1045
|
/* @__PURE__ */ l("div", { className: "zoomLevelValue", children: t }),
|
|
1016
|
-
/* @__PURE__ */ l("div", { className: "zoomLevelLabel", children:
|
|
1046
|
+
/* @__PURE__ */ l("div", { className: "zoomLevelLabel", children: ee(e.locale, "ZOOM_LABEL") ?? "zoom" })
|
|
1017
1047
|
] });
|
|
1018
1048
|
};
|
|
1019
|
-
const
|
|
1020
|
-
const n =
|
|
1021
|
-
return
|
|
1049
|
+
const Sr = -1, Mr = (e) => {
|
|
1050
|
+
const n = le(), [t, i] = A(), { sceneModes: o } = e, r = (d) => o.findIndex((u) => u === d) > Sr;
|
|
1051
|
+
return I(() => {
|
|
1022
1052
|
i(n.scene.mode);
|
|
1023
|
-
}, []), /* @__PURE__ */
|
|
1024
|
-
r(
|
|
1025
|
-
|
|
1053
|
+
}, []), /* @__PURE__ */ N(te, { children: [
|
|
1054
|
+
r(oe.SCENE3D) && /* @__PURE__ */ l(
|
|
1055
|
+
Pe,
|
|
1026
1056
|
{
|
|
1027
|
-
icon: /* @__PURE__ */ l("div", { className: `mapViewIcon ${t ===
|
|
1057
|
+
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" }) }) }),
|
|
1028
1058
|
onClick: () => {
|
|
1029
|
-
n.scene.morphTo3D(), i(
|
|
1059
|
+
n.scene.morphTo3D(), i(oe.SCENE3D);
|
|
1030
1060
|
}
|
|
1031
1061
|
}
|
|
1032
1062
|
),
|
|
1033
|
-
r(
|
|
1034
|
-
|
|
1063
|
+
r(oe.SCENE2D) && /* @__PURE__ */ l(
|
|
1064
|
+
Pe,
|
|
1035
1065
|
{
|
|
1036
|
-
icon: /* @__PURE__ */ l("div", { className: `mapViewIcon ${t ===
|
|
1066
|
+
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" }) }) }),
|
|
1037
1067
|
onClick: () => {
|
|
1038
|
-
n.scene.morphTo2D(), i(
|
|
1068
|
+
n.scene.morphTo2D(), i(oe.SCENE2D);
|
|
1039
1069
|
}
|
|
1040
1070
|
}
|
|
1041
1071
|
),
|
|
1042
|
-
r(
|
|
1043
|
-
|
|
1072
|
+
r(oe.COLUMBUS_VIEW) && /* @__PURE__ */ l(
|
|
1073
|
+
Pe,
|
|
1044
1074
|
{
|
|
1045
|
-
icon: /* @__PURE__ */ l("div", { className: `mapViewIcon ${t ===
|
|
1075
|
+
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" }) }) }),
|
|
1046
1076
|
onClick: () => {
|
|
1047
|
-
n.scene.morphToColumbusView(), i(
|
|
1077
|
+
n.scene.morphToColumbusView(), i(oe.COLUMBUS_VIEW);
|
|
1048
1078
|
}
|
|
1049
1079
|
}
|
|
1050
1080
|
)
|
|
1051
1081
|
] });
|
|
1052
1082
|
};
|
|
1053
|
-
const
|
|
1054
|
-
(e) =>
|
|
1083
|
+
const Pr = ke(
|
|
1084
|
+
(e) => We({
|
|
1055
1085
|
mapContainer: {
|
|
1056
1086
|
width: "60px",
|
|
1057
1087
|
height: "60px",
|
|
1058
1088
|
border: `${e.palette.background.paper} 2px solid`
|
|
1059
1089
|
}
|
|
1060
1090
|
})
|
|
1061
|
-
),
|
|
1062
|
-
const n =
|
|
1063
|
-
|
|
1064
|
-
const E = t == null ? void 0 : t.maps.find((
|
|
1091
|
+
), Dr = (e) => {
|
|
1092
|
+
const n = le(), { baseMaps: t } = e, [i, o] = A(" "), [r, d] = A(), u = Pr();
|
|
1093
|
+
I(() => {
|
|
1094
|
+
const E = t == null ? void 0 : t.maps.find((C) => C.isCurrent);
|
|
1065
1095
|
E && (d(E), o(E.title !== void 0 ? E.title : " "));
|
|
1066
1096
|
}, [t]);
|
|
1067
|
-
const
|
|
1068
|
-
var
|
|
1097
|
+
const h = (E) => {
|
|
1098
|
+
var C, L;
|
|
1069
1099
|
if (t) {
|
|
1070
|
-
(
|
|
1071
|
-
const
|
|
1072
|
-
|
|
1073
|
-
|
|
1100
|
+
(C = n.layersManager) == null || C.removeBaseMapLayers();
|
|
1101
|
+
const b = t.maps.find((P) => P.id === E);
|
|
1102
|
+
b && ((L = n.layersManager) == null || L.setBaseMapLayers(b), d(b), t.maps.forEach((P) => {
|
|
1103
|
+
P.isCurrent = b === P;
|
|
1074
1104
|
}));
|
|
1075
1105
|
}
|
|
1076
1106
|
};
|
|
1077
|
-
return /* @__PURE__ */
|
|
1107
|
+
return /* @__PURE__ */ N(te, { children: [
|
|
1078
1108
|
/* @__PURE__ */ l("label", { className: "mapLabel", children: i }),
|
|
1079
1109
|
/* @__PURE__ */ l("ul", { className: "mapSelector", children: t == null ? void 0 : t.maps.map((E) => /* @__PURE__ */ l("li", { className: `mapContainer ${u.mapContainer} ${E === r ? "mapContainerSelected" : ""}`, children: /* @__PURE__ */ l(
|
|
1080
1110
|
"img",
|
|
@@ -1089,48 +1119,48 @@ const br = Ie(
|
|
|
1089
1119
|
o((r == null ? void 0 : r.title) !== void 0 ? r.title : " ");
|
|
1090
1120
|
},
|
|
1091
1121
|
onClick: () => {
|
|
1092
|
-
|
|
1122
|
+
h(E.id);
|
|
1093
1123
|
}
|
|
1094
1124
|
}
|
|
1095
1125
|
) }, E.id)) })
|
|
1096
1126
|
] });
|
|
1097
1127
|
};
|
|
1098
|
-
const
|
|
1099
|
-
const [n, t] = A(!1), { sceneModes: i, baseMaps: o, locale: r } = e, d =
|
|
1100
|
-
return
|
|
1101
|
-
const
|
|
1102
|
-
var
|
|
1103
|
-
const
|
|
1104
|
-
|
|
1128
|
+
const Je = "ic_settings_24px", Ar = (e) => {
|
|
1129
|
+
const [n, t] = A(!1), { sceneModes: i, baseMaps: o, locale: r } = e, d = be(null), u = ee(r, "MAP_SETTINGS_DIALOG_TITLE") ?? "Map Settings", h = ee(r, "MAP_SETTINGS_SCENE_MODE_TITLE") ?? "Scene Mode", E = ee(r, "MAP_SETTINGS_BASE_MAP_TITLE") ?? "Base Map";
|
|
1130
|
+
return I(() => {
|
|
1131
|
+
const C = (L) => {
|
|
1132
|
+
var B;
|
|
1133
|
+
const b = L.target, P = ee(d, "current");
|
|
1134
|
+
P && !P.contains(b) && b.id !== Je && ((B = b.parentElement) == null ? void 0 : B.id) !== Je && (document.removeEventListener("click", C, !1), t(!1));
|
|
1105
1135
|
};
|
|
1106
|
-
return document.addEventListener("click",
|
|
1107
|
-
document.removeEventListener("click",
|
|
1136
|
+
return document.addEventListener("click", C, !1), () => {
|
|
1137
|
+
document.removeEventListener("click", C, !1);
|
|
1108
1138
|
};
|
|
1109
|
-
}), /* @__PURE__ */
|
|
1139
|
+
}), /* @__PURE__ */ N(te, { children: [
|
|
1110
1140
|
/* @__PURE__ */ l(
|
|
1111
|
-
|
|
1141
|
+
Pe,
|
|
1112
1142
|
{
|
|
1113
|
-
icon: /* @__PURE__ */ l("div", { className: "settingsIconContainer", children: /* @__PURE__ */ l("svg", { width: "100%", height: "100%", viewBox: "0 0 24 24", id:
|
|
1143
|
+
icon: /* @__PURE__ */ l("div", { className: "settingsIconContainer", children: /* @__PURE__ */ l("svg", { width: "100%", height: "100%", viewBox: "0 0 24 24", id: Je, 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" }) }) }),
|
|
1114
1144
|
onClick: () => {
|
|
1115
1145
|
t(!n);
|
|
1116
1146
|
}
|
|
1117
1147
|
}
|
|
1118
1148
|
),
|
|
1119
|
-
n && /* @__PURE__ */ l("div", { id: "dialog-portal-example", className: "settingsDialogPortal", ref: d, children: /* @__PURE__ */
|
|
1120
|
-
|
|
1149
|
+
n && /* @__PURE__ */ l("div", { id: "dialog-portal-example", className: "settingsDialogPortal", ref: d, children: /* @__PURE__ */ N(
|
|
1150
|
+
Mn,
|
|
1121
1151
|
{
|
|
1122
1152
|
open: n,
|
|
1123
1153
|
onClosed: () => {
|
|
1124
1154
|
t(!1);
|
|
1125
1155
|
},
|
|
1126
1156
|
children: [
|
|
1127
|
-
/* @__PURE__ */ l(
|
|
1128
|
-
/* @__PURE__ */
|
|
1129
|
-
/* @__PURE__ */ l("h4", { className: "sectionLabel", children:
|
|
1130
|
-
/* @__PURE__ */ l(ae, { className: "mapScenesContainer", children: /* @__PURE__ */ l(
|
|
1131
|
-
/* @__PURE__ */ l(ae, { className: "baseMapsContainer", children: o && /* @__PURE__ */
|
|
1157
|
+
/* @__PURE__ */ l(Pn, { children: u }),
|
|
1158
|
+
/* @__PURE__ */ N(Dn, { children: [
|
|
1159
|
+
/* @__PURE__ */ l("h4", { className: "sectionLabel", children: h }),
|
|
1160
|
+
/* @__PURE__ */ l(ae, { className: "mapScenesContainer", children: /* @__PURE__ */ l(Mr, { sceneModes: i }) }),
|
|
1161
|
+
/* @__PURE__ */ l(ae, { className: "baseMapsContainer", children: o && /* @__PURE__ */ N(te, { children: [
|
|
1132
1162
|
/* @__PURE__ */ l("h4", { className: "sectionLabel", children: E }),
|
|
1133
|
-
/* @__PURE__ */ l(
|
|
1163
|
+
/* @__PURE__ */ l(Dr, { baseMaps: o })
|
|
1134
1164
|
] }) })
|
|
1135
1165
|
] })
|
|
1136
1166
|
]
|
|
@@ -1138,169 +1168,140 @@ const qe = "ic_settings_24px", _r = (e) => {
|
|
|
1138
1168
|
) })
|
|
1139
1169
|
] });
|
|
1140
1170
|
};
|
|
1141
|
-
const
|
|
1171
|
+
const Ir = /* @__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: [
|
|
1142
1172
|
/* @__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" }),
|
|
1143
1173
|
/* @__PURE__ */ l("circle", { cx: "270.1", cy: "56.3", r: "56.3" })
|
|
1144
|
-
] }) }),
|
|
1145
|
-
const r =
|
|
1174
|
+
] }) }), xr = ({ onClick: e }) => /* @__PURE__ */ l(ae, { onClick: e, className: "mapLegendToggleContainer", children: /* @__PURE__ */ l(Pe, { icon: Ir, className: "mapLegendIcon" }) }), kr = ({ legend: { legendImg: e, legendDoc: n, layer: t }, docText: i, imgText: o }) => {
|
|
1175
|
+
const r = me(() => {
|
|
1146
1176
|
window.open(e, "_blank");
|
|
1147
1177
|
}, [e]);
|
|
1148
|
-
|
|
1178
|
+
me(() => {
|
|
1149
1179
|
window.open(n, "_blank");
|
|
1150
1180
|
}, [n]);
|
|
1151
|
-
const d =
|
|
1181
|
+
const d = me(() => {
|
|
1152
1182
|
const E = /* @__PURE__ */ l(ae, { className: "layerNameContainer", children: /* @__PURE__ */ l("h3", { style: { maxWidth: `${15}ch` }, className: "layerName", children: t }) });
|
|
1153
|
-
return (t ?? "").length > 15 ? /* @__PURE__ */ l(
|
|
1154
|
-
}, [t]), u =
|
|
1183
|
+
return (t ?? "").length > 15 ? /* @__PURE__ */ l(tt, { content: t, children: E }) : E;
|
|
1184
|
+
}, [t]), u = me(() => [
|
|
1155
1185
|
typeof e == "string" && /* @__PURE__ */ l("a", { className: "legendAction", href: e, target: "_blank", rel: "noreferrer", children: o }),
|
|
1156
1186
|
typeof n == "string" && /* @__PURE__ */ l("a", { className: "legendAction", href: n, target: "_blank", rel: "noreferrer", children: i })
|
|
1157
1187
|
], [e, o, n, i]);
|
|
1158
|
-
return /* @__PURE__ */
|
|
1188
|
+
return /* @__PURE__ */ N(ae, { className: "mapLegend", children: [
|
|
1159
1189
|
d(),
|
|
1160
1190
|
/* @__PURE__ */ l("img", { alt: "Map Legend", className: "legendImg", src: e, onClick: r }),
|
|
1161
1191
|
/* @__PURE__ */ l(ae, { className: "legendActionsContainer", children: u() })
|
|
1162
1192
|
] });
|
|
1163
|
-
},
|
|
1164
|
-
const o =
|
|
1193
|
+
}, Or = ({ legends: e, actionsTexts: { docText: n, imgText: t }, noLegendsText: i }) => {
|
|
1194
|
+
const o = me(() => /* @__PURE__ */ l(ae, { className: "noLegendsContainer", children: /* @__PURE__ */ l("h2", { className: "noLegendsMsg", children: i }) }), [i]), r = me(() => e.length ? e.map((d, u) => /* @__PURE__ */ l(kr, { legend: d, docText: n, imgText: t }, `${d.layer}_${u}`)) : o(), [e]);
|
|
1165
1195
|
return /* @__PURE__ */ l(ae, { className: "mapLegendsList", children: r() });
|
|
1166
|
-
},
|
|
1196
|
+
}, Rr = ({
|
|
1167
1197
|
isOpen: e,
|
|
1168
1198
|
toggleSidebar: n,
|
|
1169
1199
|
title: t = "Map Legends",
|
|
1170
1200
|
noLegendsText: i = "No legends to display...",
|
|
1171
1201
|
actionsTexts: o = { docText: "Docs", imgText: "View Image" },
|
|
1172
1202
|
legends: r = []
|
|
1173
|
-
}) => e ? /* @__PURE__ */
|
|
1174
|
-
/* @__PURE__ */ l(
|
|
1175
|
-
/* @__PURE__ */
|
|
1176
|
-
/* @__PURE__ */ l(
|
|
1177
|
-
/* @__PURE__ */ l(
|
|
1203
|
+
}) => e ? /* @__PURE__ */ N(An, { className: "mapLegendSidebarContainer", modal: !1, dismissible: !0, open: e, children: [
|
|
1204
|
+
/* @__PURE__ */ l(In, { className: "sidebarHeaderContainer", children: /* @__PURE__ */ l(xn, { className: "sidebarTitle", children: t }) }),
|
|
1205
|
+
/* @__PURE__ */ N(kn, { className: "sidebarContent", children: [
|
|
1206
|
+
/* @__PURE__ */ l(Pe, { onClick: n, className: "mapLegendCloseBtn", icon: { icon: "close", size: "small" } }),
|
|
1207
|
+
/* @__PURE__ */ l(Or, { noLegendsText: i, legends: r, actionsTexts: o })
|
|
1178
1208
|
] })
|
|
1179
|
-
] }) : null,
|
|
1180
|
-
let i;
|
|
1181
|
-
if (e.scene.mode !== ve.SCENE2D)
|
|
1182
|
-
i = e.scene.pickPosition(new Se(n, t));
|
|
1183
|
-
else {
|
|
1184
|
-
const o = e.scene.globe.ellipsoid;
|
|
1185
|
-
i = e.camera.pickEllipsoid(new Se(n, t), o);
|
|
1186
|
-
}
|
|
1187
|
-
return Ge.fromCartesian(i);
|
|
1188
|
-
}, Ir = (e, n, t) => {
|
|
1189
|
-
const i = Kt(e, n, t);
|
|
1190
|
-
return {
|
|
1191
|
-
type: "Feature",
|
|
1192
|
-
properties: {},
|
|
1193
|
-
geometry: {
|
|
1194
|
-
type: "Point",
|
|
1195
|
-
coordinates: [le.toDegrees(i.longitude), le.toDegrees(i.latitude)]
|
|
1196
|
-
}
|
|
1197
|
-
};
|
|
1198
|
-
}, Ar = (e, n, t) => {
|
|
1199
|
-
try {
|
|
1200
|
-
const i = Kt(e, n, t);
|
|
1201
|
-
return {
|
|
1202
|
-
longitude: le.toDegrees(i.longitude),
|
|
1203
|
-
latitude: le.toDegrees(i.latitude)
|
|
1204
|
-
};
|
|
1205
|
-
} catch {
|
|
1206
|
-
return;
|
|
1207
|
-
}
|
|
1208
|
-
}, ue = document.createElement("canvas"), te = ue.getContext("2d"), vt = (e) => {
|
|
1209
|
+
] }) : null, ue = document.createElement("canvas"), re = ue.getContext("2d"), Tt = (e) => {
|
|
1209
1210
|
const i = (e == null ? void 0 : e.data) ?? [];
|
|
1210
1211
|
for (let o = 3; o < i.length; o += 4)
|
|
1211
1212
|
if (i[o] < 255)
|
|
1212
1213
|
return !0;
|
|
1213
1214
|
return !1;
|
|
1214
|
-
},
|
|
1215
|
+
}, Nr = async (e, n) => (n && n.tileTransparencyCheckedCounter++, new Promise((t, i) => {
|
|
1215
1216
|
try {
|
|
1216
|
-
|
|
1217
|
+
re == null || re.clearRect(0, 0, ue.width, ue.height);
|
|
1217
1218
|
let o;
|
|
1218
1219
|
if (e instanceof HTMLImageElement)
|
|
1219
1220
|
o = e;
|
|
1220
1221
|
else if (e instanceof ImageBitmap) {
|
|
1221
|
-
ue.width = e.width, ue.height = e.height,
|
|
1222
|
-
const r =
|
|
1222
|
+
ue.width = e.width, ue.height = e.height, re == null || re.drawImage(e, 0, 0);
|
|
1223
|
+
const r = re == null ? void 0 : re.getImageData(0, 0, ue.width, ue.height), d = Tt(r);
|
|
1223
1224
|
d && n && (n.tileTransparencyCheckedCounter = n.maxTilesForTransparencyCheck), t(d);
|
|
1224
1225
|
return;
|
|
1225
1226
|
} else
|
|
1226
1227
|
o = new Image(), o.crossOrigin = "anonymous", o.src = e;
|
|
1227
1228
|
o.onload = () => {
|
|
1228
|
-
ue.width = o.width, ue.height = o.height,
|
|
1229
|
-
const r =
|
|
1230
|
-
|
|
1229
|
+
ue.width = o.width, ue.height = o.height, re == null || re.drawImage(o, 0, 0);
|
|
1230
|
+
const r = re == null ? void 0 : re.getImageData(0, 0, ue.width, ue.height);
|
|
1231
|
+
Tt(r) ? (n && (n.tileTransparencyCheckedCounter = n.maxTilesForTransparencyCheck), t(!0)) : t(!1);
|
|
1231
1232
|
};
|
|
1232
1233
|
} catch (o) {
|
|
1233
1234
|
console.error("Could not determine image transparency. Error => ", o), i(o);
|
|
1234
1235
|
}
|
|
1235
|
-
})),
|
|
1236
|
-
const { west: t, east: i, north: o, south: r } = e, { west: d, east: u, north:
|
|
1237
|
-
return t >= d && i <= u && o <=
|
|
1238
|
-
},
|
|
1239
|
-
function
|
|
1236
|
+
})), Fe = (e, n) => {
|
|
1237
|
+
const { west: t, east: i, north: o, south: r } = e, { west: d, east: u, north: h, south: E } = n;
|
|
1238
|
+
return t >= d && i <= u && o <= h && r >= E;
|
|
1239
|
+
}, Ue = 3, ze = "hasTransparency";
|
|
1240
|
+
function ht(e, n, t, i, o) {
|
|
1240
1241
|
return setTimeout(() => {
|
|
1241
1242
|
var u;
|
|
1242
1243
|
const r = (u = this.layerListInstance.find(
|
|
1243
1244
|
/* eslint-disable */
|
|
1244
|
-
(
|
|
1245
|
-
var E,
|
|
1246
|
-
return ((E =
|
|
1245
|
+
(h) => {
|
|
1246
|
+
var E, C;
|
|
1247
|
+
return ((E = h._imageryProvider._resource) == null ? void 0 : E._url) === ((C = this._resource) == null ? void 0 : C._url);
|
|
1247
1248
|
}
|
|
1248
1249
|
/* eslint-enable */
|
|
1249
|
-
)) == null ? void 0 : u.meta, d =
|
|
1250
|
-
this.tileTransparencyCheckedCounter <
|
|
1250
|
+
)) == null ? void 0 : u.meta, d = ee(r, ze) === !0;
|
|
1251
|
+
this.tileTransparencyCheckedCounter < Ue && !d && Nr(o == null ? void 0 : o.url, this).then((h) => {
|
|
1251
1252
|
var E;
|
|
1252
1253
|
(E = this.mapViewer.layersManager) == null || E.addMetaToLayer(
|
|
1253
|
-
{ [
|
|
1254
|
+
{ [ze]: h },
|
|
1254
1255
|
/* eslint-disable */
|
|
1255
|
-
(
|
|
1256
|
+
(C) => C._imageryProvider._resource._url === this._resource._url
|
|
1256
1257
|
);
|
|
1257
1258
|
});
|
|
1258
1259
|
}, 0), e(n, t, i, o);
|
|
1259
1260
|
}
|
|
1260
|
-
class
|
|
1261
|
+
class nn extends lt {
|
|
1261
1262
|
constructor(t, i) {
|
|
1262
1263
|
var o;
|
|
1263
1264
|
super(t);
|
|
1264
1265
|
Z(this, "layerListInstance");
|
|
1265
1266
|
Z(this, "mapViewer");
|
|
1266
|
-
Z(this, "maxTilesForTransparencyCheck",
|
|
1267
|
+
Z(this, "maxTilesForTransparencyCheck", Ue);
|
|
1267
1268
|
Z(this, "tileTransparencyCheckedCounter", 0);
|
|
1268
1269
|
this.layerListInstance = (o = i.layersManager) == null ? void 0 : o.layerList, this.mapViewer = i;
|
|
1269
1270
|
}
|
|
1270
1271
|
requestImage(t, i, o, r) {
|
|
1271
|
-
return
|
|
1272
|
+
return ht.call(this, super.requestImage.bind(this), t, i, o, r);
|
|
1272
1273
|
}
|
|
1273
1274
|
}
|
|
1274
|
-
class
|
|
1275
|
+
class rn extends ct {
|
|
1275
1276
|
constructor(t, i) {
|
|
1276
1277
|
var o;
|
|
1277
1278
|
super(t);
|
|
1278
1279
|
Z(this, "layerListInstance");
|
|
1279
1280
|
Z(this, "mapViewer");
|
|
1280
|
-
Z(this, "maxTilesForTransparencyCheck",
|
|
1281
|
+
Z(this, "maxTilesForTransparencyCheck", Ue);
|
|
1281
1282
|
Z(this, "tileTransparencyCheckedCounter", 0);
|
|
1282
1283
|
this.layerListInstance = (o = i.layersManager) == null ? void 0 : o.layerList, this.mapViewer = i;
|
|
1283
1284
|
}
|
|
1284
1285
|
requestImage(t, i, o, r) {
|
|
1285
|
-
return
|
|
1286
|
+
return ht.call(this, super.requestImage.bind(this), t, i, o, r);
|
|
1286
1287
|
}
|
|
1287
1288
|
}
|
|
1288
|
-
class
|
|
1289
|
+
class on extends dt {
|
|
1289
1290
|
constructor(t, i) {
|
|
1290
1291
|
var o;
|
|
1291
1292
|
super(t);
|
|
1292
1293
|
Z(this, "layerListInstance");
|
|
1293
1294
|
Z(this, "mapViewer");
|
|
1294
|
-
Z(this, "maxTilesForTransparencyCheck",
|
|
1295
|
+
Z(this, "maxTilesForTransparencyCheck", Ue);
|
|
1295
1296
|
Z(this, "tileTransparencyCheckedCounter", 0);
|
|
1296
1297
|
this.layerListInstance = (o = i.layersManager) == null ? void 0 : o.layerList, this.mapViewer = i;
|
|
1297
1298
|
}
|
|
1298
1299
|
requestImage(t, i, o, r) {
|
|
1299
|
-
return
|
|
1300
|
+
return ht.call(this, super.requestImage.bind(this), t, i, o, r);
|
|
1300
1301
|
}
|
|
1301
1302
|
}
|
|
1302
|
-
const
|
|
1303
|
-
class
|
|
1303
|
+
const Br = 1, Fr = -1, _t = "TRANSPARENT_BASE_LAYER";
|
|
1304
|
+
class Hr {
|
|
1304
1305
|
constructor(n, t, i, o) {
|
|
1305
1306
|
Z(this, "mapViewer");
|
|
1306
1307
|
Z(this, "legendsList");
|
|
@@ -1308,9 +1309,9 @@ class Rr {
|
|
|
1308
1309
|
Z(this, "layers");
|
|
1309
1310
|
Z(this, "legendsExtractor");
|
|
1310
1311
|
Z(this, "layerManagerFootprintMetaFieldPath");
|
|
1311
|
-
this.mapViewer = n, this.layers = this.mapViewer.imageryLayers._layers, this.legendsList = [], this.legendsExtractor = t, this.layerUpdated = new
|
|
1312
|
+
this.mapViewer = n, this.layers = this.mapViewer.imageryLayers._layers, this.legendsList = [], this.legendsExtractor = t, this.layerUpdated = new hi(), this.layerManagerFootprintMetaFieldPath = o, i && this.layerUpdated.addEventListener(i, this), this.mapViewer.shouldOptimizedTileRequests && (this.layerUpdated.addEventListener((r) => {
|
|
1312
1313
|
const d = Object.keys(r);
|
|
1313
|
-
d.length === 1 && d[0] ===
|
|
1314
|
+
d.length === 1 && d[0] === ze && (this.markRelevantLayersForExtent(), this.hideNonRelevantLayers());
|
|
1314
1315
|
}), this.mapViewer.imageryLayers.layerRemoved.addEventListener(() => {
|
|
1315
1316
|
this.setLegends(), this.markRelevantLayersForExtent(), this.hideNonRelevantLayers();
|
|
1316
1317
|
}), this.mapViewer.imageryLayers.layerMoved.addEventListener(() => {
|
|
@@ -1335,23 +1336,23 @@ class Rr {
|
|
|
1335
1336
|
setBaseMapLayers(n) {
|
|
1336
1337
|
n.baseRasteLayers.sort((i, o) => i.zIndex - o.zIndex).forEach((i, o) => {
|
|
1337
1338
|
this.addRasterLayer(i, o, n.id);
|
|
1338
|
-
}), this.mapViewer.shouldOptimizedTileRequests && (this.removeLayer(
|
|
1339
|
+
}), this.mapViewer.shouldOptimizedTileRequests && (this.removeLayer(_t), this.addTransparentImageryProvider());
|
|
1339
1340
|
}
|
|
1340
1341
|
addRasterLayer(n, t, i) {
|
|
1341
1342
|
let o;
|
|
1342
1343
|
switch (n.type) {
|
|
1343
1344
|
case "XYZ_LAYER": {
|
|
1344
|
-
const r = n.options, d = this.mapViewer.shouldOptimizedTileRequests ? new
|
|
1345
|
+
const r = n.options, d = this.mapViewer.shouldOptimizedTileRequests ? new nn(r, this.mapViewer) : new lt(r);
|
|
1345
1346
|
o = this.mapViewer.imageryLayers.addImageryProvider(d, t);
|
|
1346
1347
|
break;
|
|
1347
1348
|
}
|
|
1348
1349
|
case "WMS_LAYER": {
|
|
1349
|
-
const r = n.options, d = this.mapViewer.shouldOptimizedTileRequests ? new
|
|
1350
|
+
const r = n.options, d = this.mapViewer.shouldOptimizedTileRequests ? new rn(r, this.mapViewer) : new ct(r);
|
|
1350
1351
|
o = this.mapViewer.imageryLayers.addImageryProvider(d, t);
|
|
1351
1352
|
break;
|
|
1352
1353
|
}
|
|
1353
1354
|
case "WMTS_LAYER": {
|
|
1354
|
-
const r = n.options, d = this.mapViewer.shouldOptimizedTileRequests ? new
|
|
1355
|
+
const r = n.options, d = this.mapViewer.shouldOptimizedTileRequests ? new on(r, this.mapViewer) : new dt(r);
|
|
1355
1356
|
o = this.mapViewer.imageryLayers.addImageryProvider(d, t);
|
|
1356
1357
|
break;
|
|
1357
1358
|
}
|
|
@@ -1366,13 +1367,13 @@ class Rr {
|
|
|
1366
1367
|
t && this.mapViewer.imageryLayers.remove(t, !0);
|
|
1367
1368
|
}
|
|
1368
1369
|
removeBaseMapLayers() {
|
|
1369
|
-
this.layers.filter((t) => !!
|
|
1370
|
+
this.layers.filter((t) => !!ee(t.meta, "parentBasetMapId")).forEach((t) => {
|
|
1370
1371
|
this.mapViewer.imageryLayers.remove(t, !0);
|
|
1371
1372
|
});
|
|
1372
1373
|
}
|
|
1373
1374
|
// Remove all non base layers
|
|
1374
1375
|
removeNotBaseMapLayers() {
|
|
1375
|
-
this.layers.filter((t) => !
|
|
1376
|
+
this.layers.filter((t) => !ee(t.meta, "parentBasetMapId")).forEach((t) => {
|
|
1376
1377
|
this.mapViewer.imageryLayers.remove(t, !0);
|
|
1377
1378
|
});
|
|
1378
1379
|
}
|
|
@@ -1406,7 +1407,7 @@ class Rr {
|
|
|
1406
1407
|
i !== void 0 && (i.show = t);
|
|
1407
1408
|
}
|
|
1408
1409
|
showAllNotBase(n) {
|
|
1409
|
-
this.layers.filter((i) => !
|
|
1410
|
+
this.layers.filter((i) => !ee(i.meta, "parentBasetMapId")).forEach((i) => {
|
|
1410
1411
|
var o;
|
|
1411
1412
|
this.show((o = i.meta) == null ? void 0 : o.id, n);
|
|
1412
1413
|
});
|
|
@@ -1419,37 +1420,37 @@ class Rr {
|
|
|
1419
1420
|
var o;
|
|
1420
1421
|
const t = this.mapViewer.camera.getPickRay(n);
|
|
1421
1422
|
let i;
|
|
1422
|
-
return t && (i = (o = this.mapViewer.imageryLayers.pickImageryLayers(t, this.mapViewer.scene)) == null ? void 0 : o.filter((r) => !
|
|
1423
|
+
return t && (i = (o = this.mapViewer.imageryLayers.pickImageryLayers(t, this.mapViewer.scene)) == null ? void 0 : o.filter((r) => !ee(r.meta, "parentBasetMapId"))), i;
|
|
1423
1424
|
}
|
|
1424
1425
|
findLayerByPOI(n, t, i = !0) {
|
|
1425
1426
|
if (this.layerManagerFootprintMetaFieldPath) {
|
|
1426
|
-
const o =
|
|
1427
|
-
return this.layers.filter((u) => !
|
|
1428
|
-
const
|
|
1429
|
-
return
|
|
1427
|
+
const o = Cr(this.mapViewer, n, t);
|
|
1428
|
+
return this.layers.filter((u) => !ee(u.meta, "parentBasetMapId")).filter((u) => {
|
|
1429
|
+
const h = ee(u.meta, this.layerManagerFootprintMetaFieldPath);
|
|
1430
|
+
return h !== void 0 ? Di(o.geometry, {
|
|
1430
1431
|
type: "Feature",
|
|
1431
1432
|
properties: {},
|
|
1432
|
-
geometry:
|
|
1433
|
+
geometry: h
|
|
1433
1434
|
}) && (i ? u.show : !0) : (console.warn("[LayerManager] [findLayerByPOI] CesiumImageryLayer has no defined footprint", u.meta), !1);
|
|
1434
|
-
}).sort((u,
|
|
1435
|
-
var E,
|
|
1436
|
-
return ((E =
|
|
1435
|
+
}).sort((u, h) => {
|
|
1436
|
+
var E, C;
|
|
1437
|
+
return ((E = h.meta) == null ? void 0 : E.zIndex) - ((C = u.meta) == null ? void 0 : C.zIndex);
|
|
1437
1438
|
});
|
|
1438
1439
|
} else
|
|
1439
1440
|
return console.warn("[LayerManager] [findLayerByPOI]layerManagerFootprintMetaFieldPath is not defined"), [];
|
|
1440
1441
|
}
|
|
1441
1442
|
addTransparentImageryProvider() {
|
|
1442
1443
|
const n = this.mapViewer.imageryLayers.addImageryProvider(
|
|
1443
|
-
new
|
|
1444
|
+
new mi({
|
|
1444
1445
|
url: "./assets/img/transparent-tile.png",
|
|
1445
1446
|
/* eslint-disable @typescript-eslint/no-magic-numbers */
|
|
1446
|
-
rectangle: new
|
|
1447
|
+
rectangle: new Se(-3.141592653589793, -1.5707963267948966, 3.141592653589793, 1.5707963267948966)
|
|
1447
1448
|
/* eslint-enable @typescript-eslint/no-magic-numbers */
|
|
1448
1449
|
}),
|
|
1449
1450
|
0
|
|
1450
1451
|
);
|
|
1451
1452
|
n.meta = {
|
|
1452
|
-
id:
|
|
1453
|
+
id: _t,
|
|
1453
1454
|
skipRelevancyCheck: !0,
|
|
1454
1455
|
parentBasetMapId: "TRANSPARENT_LAYER"
|
|
1455
1456
|
};
|
|
@@ -1458,18 +1459,18 @@ class Rr {
|
|
|
1458
1459
|
typeof this.legendsExtractor < "u" && (this.legendsList = this.legendsExtractor(this.layers));
|
|
1459
1460
|
}
|
|
1460
1461
|
getBaseLayersCount() {
|
|
1461
|
-
return this.layers.filter((t) => !!
|
|
1462
|
+
return this.layers.filter((t) => !!ee(t.meta, "parentBasetMapId")).length;
|
|
1462
1463
|
}
|
|
1463
1464
|
findLayerById(n) {
|
|
1464
1465
|
return this.layers.find((t) => t.meta !== void 0 ? t.meta.id === n : !1);
|
|
1465
1466
|
}
|
|
1466
1467
|
updateLayersOrder(n, t, i) {
|
|
1467
|
-
const o = t > i ?
|
|
1468
|
+
const o = t > i ? Br : Fr, r = t < i ? t : i, d = t < i ? i : t;
|
|
1468
1469
|
this.layers.forEach((u) => {
|
|
1469
1470
|
var E;
|
|
1470
|
-
if (!
|
|
1471
|
-
const
|
|
1472
|
-
u.meta.zIndex =
|
|
1471
|
+
if (!ee(u.meta, "parentBasetMapId")) {
|
|
1472
|
+
const C = (E = u.meta) == null ? void 0 : E.zIndex;
|
|
1473
|
+
u.meta.zIndex = C >= r && C <= d && C !== t ? C + o : C === t ? i : C;
|
|
1473
1474
|
}
|
|
1474
1475
|
});
|
|
1475
1476
|
}
|
|
@@ -1483,17 +1484,17 @@ class Rr {
|
|
|
1483
1484
|
try {
|
|
1484
1485
|
const i = this.mapViewer.camera.computeViewRectangle();
|
|
1485
1486
|
for (let o = this.layers.length - 1; o >= 0; o--) {
|
|
1486
|
-
const r = this.layers[o], d = !
|
|
1487
|
+
const r = this.layers[o], d = !rt(i) && !rt(r.rectangle) && Se.intersection(i, r.rectangle);
|
|
1487
1488
|
for (let u = this.layers.length - 1; u >= o; u--) {
|
|
1488
1489
|
if (((n = r.meta) == null ? void 0 : n.skipRelevancyCheck) === !0) {
|
|
1489
1490
|
r.meta = { ...r.meta, relevantToExtent: !0 };
|
|
1490
1491
|
continue;
|
|
1491
1492
|
}
|
|
1492
|
-
const
|
|
1493
|
-
if (r !==
|
|
1494
|
-
if (d instanceof
|
|
1495
|
-
if (
|
|
1496
|
-
if (
|
|
1493
|
+
const h = this.layers[u], E = ((t = h.meta) == null ? void 0 : t[ze]) === !0;
|
|
1494
|
+
if (r !== h)
|
|
1495
|
+
if (d instanceof Se) {
|
|
1496
|
+
if (Fe(i, r.rectangle))
|
|
1497
|
+
if (Fe(i, h.rectangle) && !E) {
|
|
1497
1498
|
r.meta = {
|
|
1498
1499
|
...r.meta ?? {},
|
|
1499
1500
|
relevantToExtent: !1
|
|
@@ -1504,11 +1505,11 @@ class Rr {
|
|
|
1504
1505
|
...r.meta ?? {},
|
|
1505
1506
|
relevantToExtent: !0
|
|
1506
1507
|
};
|
|
1507
|
-
if (
|
|
1508
|
+
if (Fe(i, h.rectangle) && !E) {
|
|
1508
1509
|
r.meta = { ...r.meta ?? {}, relevantToExtent: !1 };
|
|
1509
1510
|
break;
|
|
1510
1511
|
}
|
|
1511
|
-
if (
|
|
1512
|
+
if (Fe(r.rectangle, h.rectangle)) {
|
|
1512
1513
|
if (r.meta = {
|
|
1513
1514
|
...r.meta ?? {},
|
|
1514
1515
|
relevantToExtent: E
|
|
@@ -1521,7 +1522,7 @@ class Rr {
|
|
|
1521
1522
|
else
|
|
1522
1523
|
o === this.layers.length - 1 && (r.meta = {
|
|
1523
1524
|
...r.meta ?? {},
|
|
1524
|
-
relevantToExtent: d instanceof
|
|
1525
|
+
relevantToExtent: d instanceof Se
|
|
1525
1526
|
});
|
|
1526
1527
|
}
|
|
1527
1528
|
}
|
|
@@ -1530,8 +1531,8 @@ class Rr {
|
|
|
1530
1531
|
}
|
|
1531
1532
|
}
|
|
1532
1533
|
}
|
|
1533
|
-
const
|
|
1534
|
-
class
|
|
1534
|
+
const Lt = 212, St = 260, Gr = 0;
|
|
1535
|
+
class ms extends pi {
|
|
1535
1536
|
constructor(t, i) {
|
|
1536
1537
|
super(t, i);
|
|
1537
1538
|
Z(this, "layersManager");
|
|
@@ -1544,14 +1545,14 @@ class as extends li {
|
|
|
1544
1545
|
this.useOptimizedTileRequests = t;
|
|
1545
1546
|
}
|
|
1546
1547
|
}
|
|
1547
|
-
const
|
|
1548
|
-
const e =
|
|
1548
|
+
const sn = Ie(null), Vr = sn.Provider, le = () => {
|
|
1549
|
+
const e = xe(sn);
|
|
1549
1550
|
if (e === null)
|
|
1550
1551
|
throw new Error("map context is null, please check the provider");
|
|
1551
1552
|
return e;
|
|
1552
|
-
},
|
|
1553
|
-
var
|
|
1554
|
-
const n =
|
|
1553
|
+
}, ps = (e) => {
|
|
1554
|
+
var D, U, X, R, z, Q, ie, ge;
|
|
1555
|
+
const n = be(null), [t, i] = A(), [o, r] = A(), [d, u] = A(), [h, E] = A(), [C, L] = A(), [b, P] = A(), [B, $] = A(!1), [q, H] = A(), Y = be(), [K, x] = A(), [W, O] = A([]), [V, ne] = A(), [s, a] = A(!1), y = be(), [c, f] = A(void 0), [m, v] = A(!1), [g, w] = A(), S = {
|
|
1555
1556
|
fullscreenButton: !0,
|
|
1556
1557
|
timeline: !1,
|
|
1557
1558
|
animation: !1,
|
|
@@ -1561,243 +1562,248 @@ const Zt = Pe(null), Br = Zt.Provider, me = () => {
|
|
|
1561
1562
|
homeButton: !1,
|
|
1562
1563
|
sceneModePicker: !1,
|
|
1563
1564
|
...e
|
|
1564
|
-
},
|
|
1565
|
-
const
|
|
1565
|
+
}, _ = (F, k, j, fe, Te) => {
|
|
1566
|
+
const ye = t.container, Re = ye.clientWidth, Ne = ye.clientHeight, De = fe + Te;
|
|
1566
1567
|
return {
|
|
1567
|
-
left: `${
|
|
1568
|
-
top: `${
|
|
1568
|
+
left: `${Re - F < j ? F - (j - (Re - F)) : F}px`,
|
|
1569
|
+
top: `${Ne - k < De ? k - (De - (Ne - k)) : k}px`
|
|
1569
1570
|
};
|
|
1570
|
-
},
|
|
1571
|
+
}, T = me((F) => {
|
|
1571
1572
|
if (n.current !== null) {
|
|
1572
|
-
const
|
|
1573
|
-
|
|
1573
|
+
const k = n.current.cesiumElement, j = { x: F.offsetX, y: F.offsetY };
|
|
1574
|
+
a(!1), f(j), w(wr(k, j.x, j.y)), a(!0), y.current = F;
|
|
1574
1575
|
}
|
|
1575
1576
|
}, [n]);
|
|
1576
|
-
|
|
1577
|
-
var
|
|
1577
|
+
I(() => {
|
|
1578
|
+
var F;
|
|
1578
1579
|
if (n.current !== null) {
|
|
1579
|
-
const
|
|
1580
|
-
e.imageryContextMenu && (
|
|
1580
|
+
const k = n.current.cesiumElement;
|
|
1581
|
+
e.imageryContextMenu && (k.scene.canvas.removeEventListener("contextmenu", T), k.scene.canvas.addEventListener("contextmenu", T));
|
|
1581
1582
|
}
|
|
1582
|
-
i((
|
|
1583
|
-
}, [n, e.imageryContextMenu]),
|
|
1584
|
-
var
|
|
1585
|
-
t && (t.shouldOptimizedTileRequests = e.useOptimizedTileRequests ?? !1, t.layersManager = new
|
|
1583
|
+
i((F = n.current) == null ? void 0 : F.cesiumElement);
|
|
1584
|
+
}, [n, e.imageryContextMenu]), I(() => {
|
|
1585
|
+
var F;
|
|
1586
|
+
t && (t.shouldOptimizedTileRequests = e.useOptimizedTileRequests ?? !1, t.layersManager = new Hr(
|
|
1586
1587
|
t,
|
|
1587
|
-
(
|
|
1588
|
+
(F = e.legends) == null ? void 0 : F.mapLegendsExtractor,
|
|
1588
1589
|
() => {
|
|
1589
|
-
var
|
|
1590
|
-
|
|
1590
|
+
var k;
|
|
1591
|
+
O((k = t.layersManager) == null ? void 0 : k.legendsList);
|
|
1591
1592
|
},
|
|
1592
1593
|
e.layerManagerFootprintMetaFieldPath
|
|
1593
1594
|
));
|
|
1594
|
-
}, [t]),
|
|
1595
|
+
}, [t]), I(() => {
|
|
1595
1596
|
t && (t.shouldOptimizedTileRequests = e.useOptimizedTileRequests ?? !1);
|
|
1596
|
-
}, [e.useOptimizedTileRequests, t]),
|
|
1597
|
-
|
|
1598
|
-
}, [e.sceneModes]),
|
|
1599
|
-
var
|
|
1600
|
-
|
|
1601
|
-
const
|
|
1602
|
-
|
|
1603
|
-
}, [e.baseMaps, t]),
|
|
1597
|
+
}, [e.useOptimizedTileRequests, t]), I(() => {
|
|
1598
|
+
x(e.sceneModes ?? [oe.SCENE2D, oe.SCENE3D, oe.COLUMBUS_VIEW]);
|
|
1599
|
+
}, [e.sceneModes]), I(() => {
|
|
1600
|
+
var k, j;
|
|
1601
|
+
ne(e.baseMaps);
|
|
1602
|
+
const F = (k = e.baseMaps) == null ? void 0 : k.maps.find((fe) => fe.isCurrent);
|
|
1603
|
+
F && t && ((j = t.layersManager) == null || j.setBaseMapLayers(F));
|
|
1604
|
+
}, [e.baseMaps, t]), I(() => {
|
|
1604
1605
|
r(e.projection ?? he.WGS84);
|
|
1605
|
-
}, [e.projection]),
|
|
1606
|
-
|
|
1607
|
-
}, [e.locale]),
|
|
1606
|
+
}, [e.projection]), I(() => {
|
|
1607
|
+
H(e.locale);
|
|
1608
|
+
}, [e.locale]), I(() => {
|
|
1608
1609
|
u(e.showMousePosition ?? !0);
|
|
1609
|
-
}, [e.showMousePosition]),
|
|
1610
|
+
}, [e.showMousePosition]), I(() => {
|
|
1610
1611
|
E(e.showZoomLevel ?? !0);
|
|
1611
|
-
}, [e.showZoomLevel]),
|
|
1612
|
-
|
|
1613
|
-
}, [e.showScale]),
|
|
1614
|
-
|
|
1612
|
+
}, [e.showZoomLevel]), I(() => {
|
|
1613
|
+
L(e.showScale ?? !0);
|
|
1614
|
+
}, [e.showScale]), I(() => {
|
|
1615
|
+
P(e.showLoadingProgress ?? !0);
|
|
1616
|
+
}, [e.showLoadingProgress]), I(() => {
|
|
1617
|
+
const F = () => {
|
|
1615
1618
|
if (t === void 0)
|
|
1616
1619
|
return {
|
|
1617
1620
|
longitude: 0,
|
|
1618
1621
|
latitude: 0,
|
|
1619
1622
|
height: 0
|
|
1620
1623
|
};
|
|
1621
|
-
const
|
|
1622
|
-
const
|
|
1624
|
+
const k = () => {
|
|
1625
|
+
const j = t.camera.positionCartographic;
|
|
1623
1626
|
return {
|
|
1624
|
-
longitude:
|
|
1625
|
-
latitude:
|
|
1626
|
-
height:
|
|
1627
|
+
longitude: Be(j.longitude),
|
|
1628
|
+
latitude: Be(j.latitude),
|
|
1629
|
+
height: j.height
|
|
1627
1630
|
};
|
|
1628
1631
|
};
|
|
1629
|
-
if (t.scene.mode ===
|
|
1630
|
-
const
|
|
1632
|
+
if (t.scene.mode === we.SCENE3D) {
|
|
1633
|
+
const j = new Ee(
|
|
1631
1634
|
// eslint-disable-next-line @typescript-eslint/no-magic-numbers
|
|
1632
1635
|
t.container.clientWidth / 2,
|
|
1633
1636
|
// eslint-disable-next-line @typescript-eslint/no-magic-numbers
|
|
1634
1637
|
t.container.clientHeight / 2
|
|
1635
|
-
),
|
|
1636
|
-
if (!
|
|
1638
|
+
), fe = t.scene.camera.getPickRay(j), Te = t.scene.globe.pick(fe, t.scene);
|
|
1639
|
+
if (!Te)
|
|
1637
1640
|
return {
|
|
1638
1641
|
longitude: 0,
|
|
1639
1642
|
latitude: 0,
|
|
1640
1643
|
height: 0
|
|
1641
1644
|
};
|
|
1642
|
-
const
|
|
1643
|
-
return
|
|
1644
|
-
longitude:
|
|
1645
|
-
latitude:
|
|
1645
|
+
const ye = t.scene.globe.ellipsoid.cartesianToCartographic(Te);
|
|
1646
|
+
return ye !== void 0 ? {
|
|
1647
|
+
longitude: Be(ye.longitude),
|
|
1648
|
+
latitude: Be(ye.latitude),
|
|
1646
1649
|
height: t.scene.camera.positionCartographic.height
|
|
1647
|
-
} :
|
|
1650
|
+
} : k();
|
|
1648
1651
|
} else
|
|
1649
|
-
return
|
|
1652
|
+
return k();
|
|
1650
1653
|
};
|
|
1651
|
-
t && t.camera.moveEnd.addEventListener(() => {
|
|
1652
|
-
if (t.scene.mode !==
|
|
1653
|
-
const
|
|
1654
|
-
position:
|
|
1655
|
-
direction:
|
|
1656
|
-
up:
|
|
1657
|
-
right:
|
|
1658
|
-
transform:
|
|
1659
|
-
frustum:
|
|
1654
|
+
t && (t.camera.moveEnd.addEventListener(() => {
|
|
1655
|
+
if (t.scene.mode !== we.MORPHING) {
|
|
1656
|
+
const k = t.camera, j = {
|
|
1657
|
+
position: F(),
|
|
1658
|
+
direction: k.direction.clone(),
|
|
1659
|
+
up: k.up.clone(),
|
|
1660
|
+
right: k.right.clone(),
|
|
1661
|
+
transform: k.transform.clone(),
|
|
1662
|
+
frustum: k.frustum.clone()
|
|
1660
1663
|
};
|
|
1661
|
-
|
|
1664
|
+
Y.current = j;
|
|
1662
1665
|
}
|
|
1663
|
-
})
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1666
|
+
}), b && t.scene.globe.tileLoadProgressEvent.addEventListener(function() {
|
|
1667
|
+
t.scene.globe.tilesLoaded === !0 ? $(!1) : $(!0);
|
|
1668
|
+
}));
|
|
1669
|
+
}, [t]), I(() => {
|
|
1670
|
+
const F = () => {
|
|
1671
|
+
if (t && Y.current) {
|
|
1672
|
+
const k = Y.current;
|
|
1668
1673
|
t.camera.flyTo({
|
|
1669
|
-
destination:
|
|
1674
|
+
destination: pe.fromDegrees(k.position.longitude, k.position.latitude, k.position.height),
|
|
1670
1675
|
duration: 0
|
|
1671
1676
|
});
|
|
1672
1677
|
}
|
|
1673
1678
|
};
|
|
1674
|
-
return t && t.scene.morphComplete.addEventListener(
|
|
1679
|
+
return t && t.scene.morphComplete.addEventListener(F), () => {
|
|
1675
1680
|
if (t)
|
|
1676
1681
|
try {
|
|
1677
|
-
t.scene.morphComplete.removeEventListener(
|
|
1682
|
+
t.scene.morphComplete.removeEventListener(F);
|
|
1678
1683
|
} catch {
|
|
1679
1684
|
console.error("morphCompleteHandler event not cleaned");
|
|
1680
1685
|
}
|
|
1681
1686
|
};
|
|
1682
|
-
}, [t]),
|
|
1683
|
-
const
|
|
1684
|
-
t &&
|
|
1685
|
-
destination:
|
|
1687
|
+
}, [t]), I(() => {
|
|
1688
|
+
const F = e.zoom, k = e.center;
|
|
1689
|
+
t && Ve(F) && Pi(k) && t.camera.flyTo({
|
|
1690
|
+
destination: pe.fromDegrees(k[0], k[1], vr(F)),
|
|
1686
1691
|
duration: 0
|
|
1687
1692
|
});
|
|
1688
1693
|
}, [e.zoom, e.center, t]);
|
|
1689
|
-
const
|
|
1690
|
-
/* @__PURE__ */
|
|
1691
|
-
/* @__PURE__ */
|
|
1692
|
-
|
|
1693
|
-
/* @__PURE__ */ l(
|
|
1694
|
+
const M = me(() => t && Jn(
|
|
1695
|
+
/* @__PURE__ */ N(te, { children: [
|
|
1696
|
+
b === !0 ? B && /* @__PURE__ */ l(On, { style: { position: "absolute", top: 0, height: "10px", zIndex: 4 } }) : /* @__PURE__ */ l(te, {}),
|
|
1697
|
+
/* @__PURE__ */ N(ae, { className: "sideToolsContainer", children: [
|
|
1698
|
+
/* @__PURE__ */ l(Ar, { sceneModes: K, baseMaps: V, locale: q }),
|
|
1699
|
+
/* @__PURE__ */ l(xr, { onClick: () => v(!m) })
|
|
1694
1700
|
] }),
|
|
1695
|
-
/* @__PURE__ */
|
|
1696
|
-
d === !0 ? /* @__PURE__ */ l(
|
|
1697
|
-
|
|
1698
|
-
|
|
1701
|
+
/* @__PURE__ */ N(ae, { className: "toolsContainer", children: [
|
|
1702
|
+
d === !0 ? /* @__PURE__ */ l(Er, { projection: o }) : /* @__PURE__ */ l(te, {}),
|
|
1703
|
+
h === !0 ? /* @__PURE__ */ l(Lr, { locale: q }) : /* @__PURE__ */ l(te, {}),
|
|
1704
|
+
C === !0 ? /* @__PURE__ */ l(Tr, { locale: q }) : /* @__PURE__ */ l(te, {})
|
|
1699
1705
|
] })
|
|
1700
1706
|
] }),
|
|
1701
1707
|
document.querySelector(".cesium-viewer")
|
|
1702
|
-
), [
|
|
1703
|
-
return /* @__PURE__ */ l(
|
|
1708
|
+
), [V, q, t, o, K, d, C, m, B]);
|
|
1709
|
+
return /* @__PURE__ */ l(Qn, { className: "viewer", full: !0, ref: n, ...S, children: /* @__PURE__ */ N(Vr, { value: t, children: [
|
|
1704
1710
|
/* @__PURE__ */ l(
|
|
1705
|
-
|
|
1711
|
+
Rr,
|
|
1706
1712
|
{
|
|
1707
|
-
title: (
|
|
1708
|
-
isOpen:
|
|
1709
|
-
toggleSidebar: () =>
|
|
1710
|
-
noLegendsText: (
|
|
1711
|
-
legends: ((
|
|
1712
|
-
actionsTexts: (
|
|
1713
|
+
title: (D = e.legends) == null ? void 0 : D.title,
|
|
1714
|
+
isOpen: m,
|
|
1715
|
+
toggleSidebar: () => v(!m),
|
|
1716
|
+
noLegendsText: (U = e.legends) == null ? void 0 : U.emptyText,
|
|
1717
|
+
legends: ((X = e.legends) == null ? void 0 : X.legendsList) ?? W,
|
|
1718
|
+
actionsTexts: (R = e.legends) == null ? void 0 : R.actionsTexts
|
|
1713
1719
|
}
|
|
1714
1720
|
),
|
|
1715
1721
|
e.children,
|
|
1716
|
-
|
|
1717
|
-
e.imageryContextMenu &&
|
|
1718
|
-
data: (
|
|
1722
|
+
M(),
|
|
1723
|
+
e.imageryContextMenu && s && c && g && ve.cloneElement(e.imageryContextMenu, {
|
|
1724
|
+
data: (z = t == null ? void 0 : t.layersManager) == null ? void 0 : z.findLayerByPOI(c.x, c.y, !1),
|
|
1719
1725
|
position: {
|
|
1720
|
-
x:
|
|
1721
|
-
y:
|
|
1726
|
+
x: c.x,
|
|
1727
|
+
y: c.y
|
|
1722
1728
|
},
|
|
1723
|
-
coordinates:
|
|
1724
|
-
style:
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
((
|
|
1728
|
-
((
|
|
1729
|
-
((
|
|
1729
|
+
coordinates: g,
|
|
1730
|
+
style: _(
|
|
1731
|
+
c.x,
|
|
1732
|
+
c.y,
|
|
1733
|
+
((Q = e.imageryContextMenuSize) == null ? void 0 : Q.width) ?? St,
|
|
1734
|
+
((ie = e.imageryContextMenuSize) == null ? void 0 : ie.height) ?? Lt,
|
|
1735
|
+
((ge = e.imageryContextMenuSize) == null ? void 0 : ge.dynamicHeightIncrement) ?? Gr
|
|
1730
1736
|
),
|
|
1731
1737
|
size: e.imageryContextMenuSize ?? {
|
|
1732
|
-
height:
|
|
1733
|
-
width:
|
|
1738
|
+
height: Lt,
|
|
1739
|
+
width: St
|
|
1734
1740
|
},
|
|
1735
1741
|
handleClose: () => {
|
|
1736
|
-
|
|
1742
|
+
a(!s);
|
|
1737
1743
|
},
|
|
1738
|
-
contextEvt:
|
|
1744
|
+
contextEvt: y.current
|
|
1739
1745
|
})
|
|
1740
1746
|
] }) });
|
|
1741
|
-
},
|
|
1742
|
-
const n =
|
|
1747
|
+
}, zr = 0, gs = (e) => {
|
|
1748
|
+
const n = le();
|
|
1743
1749
|
return /* @__PURE__ */ l(
|
|
1744
|
-
|
|
1750
|
+
ei,
|
|
1745
1751
|
{
|
|
1746
1752
|
...e,
|
|
1747
1753
|
onReady: (t) => {
|
|
1748
1754
|
e.isZoomTo === !0 && n.zoomTo(t);
|
|
1749
1755
|
const i = n.scene;
|
|
1750
1756
|
i.globe.depthTestAgainstTerrain = !0;
|
|
1751
|
-
const o =
|
|
1757
|
+
const o = Oe.fromCartesian(t.boundingSphere.center), r = e.heightFromGround ?? zr;
|
|
1752
1758
|
if (r) {
|
|
1753
|
-
const d =
|
|
1754
|
-
t.modelMatrix =
|
|
1759
|
+
const d = pe.fromRadians(o.longitude, o.latitude, o.height), u = pe.fromRadians(o.longitude, o.latitude, o.height + r), h = pe.subtract(u, d, new pe());
|
|
1760
|
+
t.modelMatrix = gi.fromTranslation(h);
|
|
1755
1761
|
}
|
|
1756
1762
|
}
|
|
1757
1763
|
}
|
|
1758
1764
|
);
|
|
1759
|
-
},
|
|
1760
|
-
Math.abs(e[0]) ===
|
|
1761
|
-
},
|
|
1765
|
+
}, Mt = 180, Pt = 1e-3, Dt = -1, At = (e) => Math.abs(e) / e, It = (e) => {
|
|
1766
|
+
Math.abs(e[0]) === Mt && (e[0] += Dt * At(e[0]) * Pt), Math.abs(e[1]) === Mt / 2 && (e[1] += Dt * At(e[1]) * Pt);
|
|
1767
|
+
}, xt = (e) => {
|
|
1762
1768
|
switch (e.type) {
|
|
1763
1769
|
case "LineString":
|
|
1764
1770
|
e.coordinates.forEach((n) => {
|
|
1765
|
-
|
|
1771
|
+
It(n);
|
|
1766
1772
|
});
|
|
1767
1773
|
break;
|
|
1768
1774
|
case "Polygon":
|
|
1769
1775
|
e.coordinates.forEach((n) => {
|
|
1770
1776
|
n.forEach((t) => {
|
|
1771
|
-
|
|
1777
|
+
It(t);
|
|
1772
1778
|
});
|
|
1773
1779
|
});
|
|
1774
1780
|
break;
|
|
1775
1781
|
}
|
|
1776
|
-
},
|
|
1782
|
+
}, fs = (e) => {
|
|
1777
1783
|
const { data: n, ...t } = e;
|
|
1778
1784
|
return n && (typeof n.features < "u" ? n.features.forEach((i) => {
|
|
1779
|
-
|
|
1780
|
-
}) :
|
|
1781
|
-
},
|
|
1782
|
-
const { meta: n, ...t } = e, i =
|
|
1783
|
-
return
|
|
1785
|
+
xt(i.geometry);
|
|
1786
|
+
}) : xt(n)), /* @__PURE__ */ l(ti, { data: n, ...t });
|
|
1787
|
+
}, Ke = (e) => {
|
|
1788
|
+
const { meta: n, ...t } = e, i = le();
|
|
1789
|
+
return dn(() => {
|
|
1784
1790
|
var o;
|
|
1785
1791
|
(o = i.layersManager) == null || o.addMetaToLayer(n, n.searchLayerPredicate);
|
|
1786
|
-
}, [n, i]), /* @__PURE__ */ l(
|
|
1787
|
-
},
|
|
1788
|
-
const { options: n, ...t } = e, i =
|
|
1789
|
-
return /* @__PURE__ */ l(
|
|
1790
|
-
},
|
|
1791
|
-
const { options: n, ...t } = e, i =
|
|
1792
|
-
return /* @__PURE__ */ l(
|
|
1793
|
-
},
|
|
1794
|
-
const { options: n, ...t } = e, i =
|
|
1795
|
-
return /* @__PURE__ */ l(
|
|
1796
|
-
},
|
|
1792
|
+
}, [n, i]), /* @__PURE__ */ l(ni, { ...t });
|
|
1793
|
+
}, ys = (e) => {
|
|
1794
|
+
const { options: n, ...t } = e, i = le(), o = i.shouldOptimizedTileRequests ? new rn(n, i) : new ct(n);
|
|
1795
|
+
return /* @__PURE__ */ l(Ke, { ...t, imageryProvider: o });
|
|
1796
|
+
}, vs = (e) => {
|
|
1797
|
+
const { options: n, ...t } = e, i = le(), o = i.shouldOptimizedTileRequests ? new on(n, i) : new dt(n);
|
|
1798
|
+
return /* @__PURE__ */ l(Ke, { ...t, imageryProvider: o });
|
|
1799
|
+
}, Es = (e) => {
|
|
1800
|
+
const { options: n, ...t } = e, i = le(), o = i.shouldOptimizedTileRequests ? new nn(n, i) : new lt(n);
|
|
1801
|
+
return /* @__PURE__ */ l(Ke, { ...t, imageryProvider: o });
|
|
1802
|
+
}, Cs = (e) => {
|
|
1797
1803
|
const { options: n, ...t } = e;
|
|
1798
|
-
return /* @__PURE__ */ l(
|
|
1799
|
-
},
|
|
1800
|
-
var
|
|
1804
|
+
return /* @__PURE__ */ l(Ke, { ...t, imageryProvider: new fi(n) });
|
|
1805
|
+
}, $r = (e) => /* @__PURE__ */ l(ii, { ...e }), ws = (e) => /* @__PURE__ */ l($t, { ...e }), Wr = (e) => /* @__PURE__ */ l($t, { ...e }), Ur = (e) => /* @__PURE__ */ l(ri, { ...e }), Kr = (e) => /* @__PURE__ */ l(oi, { ...e }), jr = (e) => /* @__PURE__ */ l(si, { ...e }), qr = (e) => /* @__PURE__ */ l(ai, { ...e });
|
|
1806
|
+
var Ce = function() {
|
|
1801
1807
|
var e = p.Ellipsoid.WGS84, n, t = p.Material.fromType(p.Material.ColorType);
|
|
1802
1808
|
function i(s, a = new p.Color(1, 1, 0, 0.5), y = new p.Color(1, 1, 1, 1)) {
|
|
1803
1809
|
this._scene = s.scene, t.uniforms.color = a, n = y, this._tooltip = {
|
|
@@ -1809,27 +1815,27 @@ var ye = function() {
|
|
|
1809
1815
|
}
|
|
1810
1816
|
i.prototype.initialiseHandlers = function() {
|
|
1811
1817
|
var s = this._scene, a = this, y = new p.ScreenSpaceEventHandler(s.canvas);
|
|
1812
|
-
function c(
|
|
1818
|
+
function c(m, v) {
|
|
1813
1819
|
if (a._handlersMuted != !0) {
|
|
1814
1820
|
var g = s.pick(v);
|
|
1815
|
-
g && g.primitive && g.primitive[
|
|
1821
|
+
g && g.primitive && g.primitive[m] && g.primitive[m](v);
|
|
1816
1822
|
}
|
|
1817
1823
|
}
|
|
1818
|
-
y.setInputAction(function(
|
|
1819
|
-
c("leftClick",
|
|
1820
|
-
}, p.ScreenSpaceEventType.LEFT_CLICK), y.setInputAction(function(
|
|
1821
|
-
c("leftDoubleClick",
|
|
1824
|
+
y.setInputAction(function(m) {
|
|
1825
|
+
c("leftClick", m.position);
|
|
1826
|
+
}, p.ScreenSpaceEventType.LEFT_CLICK), y.setInputAction(function(m) {
|
|
1827
|
+
c("leftDoubleClick", m.position);
|
|
1822
1828
|
}, p.ScreenSpaceEventType.LEFT_DOUBLE_CLICK);
|
|
1823
1829
|
var f;
|
|
1824
|
-
y.setInputAction(function(
|
|
1830
|
+
y.setInputAction(function(m) {
|
|
1825
1831
|
if (a._handlersMuted != !0) {
|
|
1826
|
-
var v = s.pick(
|
|
1827
|
-
f && (!v || f != v.primitive) && (!(f.isDestroyed && f.isDestroyed()) && f.mouseOut(
|
|
1832
|
+
var v = s.pick(m.endPosition);
|
|
1833
|
+
f && (!v || f != v.primitive) && (!(f.isDestroyed && f.isDestroyed()) && f.mouseOut(m.endPosition), f = null), v && v.primitive && (v = v.primitive, v.mouseOut && (f = v), v.mouseMove && v.mouseMove(m.endPosition));
|
|
1828
1834
|
}
|
|
1829
|
-
}, p.ScreenSpaceEventType.MOUSE_MOVE), y.setInputAction(function(
|
|
1830
|
-
c("leftUp",
|
|
1831
|
-
}, p.ScreenSpaceEventType.LEFT_UP), y.setInputAction(function(
|
|
1832
|
-
c("leftDown",
|
|
1835
|
+
}, p.ScreenSpaceEventType.MOUSE_MOVE), y.setInputAction(function(m) {
|
|
1836
|
+
c("leftUp", m.position);
|
|
1837
|
+
}, p.ScreenSpaceEventType.LEFT_UP), y.setInputAction(function(m) {
|
|
1838
|
+
c("leftDown", m.position);
|
|
1833
1839
|
}, p.ScreenSpaceEventType.LEFT_DOWN);
|
|
1834
1840
|
}, i.prototype.setListener = function(s, a, y) {
|
|
1835
1841
|
s[a] = y;
|
|
@@ -1864,15 +1870,15 @@ var ye = function() {
|
|
|
1864
1870
|
asynchronous: !0,
|
|
1865
1871
|
show: !0,
|
|
1866
1872
|
debugShowBoundingVolume: !1
|
|
1867
|
-
}, r =
|
|
1873
|
+
}, r = O(o, {
|
|
1868
1874
|
appearance: new p.EllipsoidSurfaceAppearance({
|
|
1869
1875
|
aboveGround: !1
|
|
1870
1876
|
}),
|
|
1871
1877
|
material: t,
|
|
1872
1878
|
granularity: Math.PI / 180
|
|
1873
|
-
}), d =
|
|
1879
|
+
}), d = O(o, {}), u = O(o, {}), h = O(o, {}), E = O(r, {
|
|
1874
1880
|
rotation: 0
|
|
1875
|
-
}),
|
|
1881
|
+
}), C = O(o, {
|
|
1876
1882
|
width: 5,
|
|
1877
1883
|
geodesic: !0,
|
|
1878
1884
|
granularity: 1e4,
|
|
@@ -1880,11 +1886,11 @@ var ye = function() {
|
|
|
1880
1886
|
aboveGround: !1
|
|
1881
1887
|
}),
|
|
1882
1888
|
material: t
|
|
1883
|
-
}),
|
|
1889
|
+
}), L = function() {
|
|
1884
1890
|
function s() {
|
|
1885
1891
|
}
|
|
1886
1892
|
return s.prototype.initialiseOptions = function(a) {
|
|
1887
|
-
|
|
1893
|
+
W(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;
|
|
1888
1894
|
}, s.prototype.setAttribute = function(a, y) {
|
|
1889
1895
|
this[a] = y, this._createPrimitive = !0;
|
|
1890
1896
|
}, s.prototype.getAttribute = function(a) {
|
|
@@ -1929,8 +1935,8 @@ var ye = function() {
|
|
|
1929
1935
|
})
|
|
1930
1936
|
}));
|
|
1931
1937
|
}
|
|
1932
|
-
var
|
|
1933
|
-
|
|
1938
|
+
var m = this._primitive;
|
|
1939
|
+
m.appearance.material = this.material, m.debugShowBoundingVolume = this.debugShowBoundingVolume, m.update(a, y, c), this._outlinePolygon && this._outlinePolygon.update(a, y, c);
|
|
1934
1940
|
}
|
|
1935
1941
|
}, s.prototype.isDestroyed = function() {
|
|
1936
1942
|
return !1;
|
|
@@ -1944,9 +1950,9 @@ var ye = function() {
|
|
|
1944
1950
|
function s(a) {
|
|
1945
1951
|
if (!p.defined(a.extent))
|
|
1946
1952
|
throw new p.DeveloperError("Extent is required");
|
|
1947
|
-
a =
|
|
1953
|
+
a = O(a, r), this.initialiseOptions(a), this.setExtent(a.extent);
|
|
1948
1954
|
}
|
|
1949
|
-
return s.prototype = new
|
|
1955
|
+
return s.prototype = new L(), s.prototype.setExtent = function(a) {
|
|
1950
1956
|
this.setAttribute("extent", a);
|
|
1951
1957
|
}, s.prototype.getExtent = function() {
|
|
1952
1958
|
return this.getAttribute("extent");
|
|
@@ -1967,9 +1973,9 @@ var ye = function() {
|
|
|
1967
1973
|
}, s;
|
|
1968
1974
|
}(), i.PolygonPrimitive = function() {
|
|
1969
1975
|
function s(a) {
|
|
1970
|
-
a =
|
|
1976
|
+
a = O(a, r), this.initialiseOptions(a), this.isPolygon = !0;
|
|
1971
1977
|
}
|
|
1972
|
-
return s.prototype = new
|
|
1978
|
+
return s.prototype = new L(), s.prototype.setPositions = function(a) {
|
|
1973
1979
|
this.setAttribute("positions", a);
|
|
1974
1980
|
}, s.prototype.getPositions = function() {
|
|
1975
1981
|
return this.getAttribute("positions");
|
|
@@ -1992,9 +1998,9 @@ var ye = function() {
|
|
|
1992
1998
|
function s(a) {
|
|
1993
1999
|
if (!(p.defined(a.center) && p.defined(a.radius)))
|
|
1994
2000
|
throw new p.DeveloperError("Center and radius are required");
|
|
1995
|
-
a =
|
|
2001
|
+
a = O(a, r), this.initialiseOptions(a), this.setRadius(a.radius);
|
|
1996
2002
|
}
|
|
1997
|
-
return s.prototype = new
|
|
2003
|
+
return s.prototype = new L(), s.prototype.setCenter = function(a) {
|
|
1998
2004
|
this.setAttribute("center", a);
|
|
1999
2005
|
}, s.prototype.setRadius = function(a) {
|
|
2000
2006
|
this.setAttribute("radius", Math.max(0.1, a));
|
|
@@ -2023,9 +2029,9 @@ var ye = function() {
|
|
|
2023
2029
|
function s(a) {
|
|
2024
2030
|
if (!(p.defined(a.center) && p.defined(a.semiMajorAxis) && p.defined(a.semiMinorAxis)))
|
|
2025
2031
|
throw new p.DeveloperError("Center and semi major and semi minor axis are required");
|
|
2026
|
-
a =
|
|
2032
|
+
a = O(a, E), this.initialiseOptions(a);
|
|
2027
2033
|
}
|
|
2028
|
-
return s.prototype = new
|
|
2034
|
+
return s.prototype = new L(), s.prototype.setCenter = function(a) {
|
|
2029
2035
|
this.setAttribute("center", a);
|
|
2030
2036
|
}, s.prototype.setSemiMajorAxis = function(a) {
|
|
2031
2037
|
a < this.getSemiMinorAxis() || this.setAttribute("semiMajorAxis", a);
|
|
@@ -2064,9 +2070,9 @@ var ye = function() {
|
|
|
2064
2070
|
}, s;
|
|
2065
2071
|
}(), i.PolylinePrimitive = function() {
|
|
2066
2072
|
function s(a) {
|
|
2067
|
-
a =
|
|
2073
|
+
a = O(a, C), this.initialiseOptions(a);
|
|
2068
2074
|
}
|
|
2069
|
-
return s.prototype = new
|
|
2075
|
+
return s.prototype = new L(), s.prototype.setPositions = function(a) {
|
|
2070
2076
|
this.setAttribute("positions", a);
|
|
2071
2077
|
}, s.prototype.setWidth = function(a) {
|
|
2072
2078
|
this.setAttribute("width", a);
|
|
@@ -2089,15 +2095,15 @@ var ye = function() {
|
|
|
2089
2095
|
});
|
|
2090
2096
|
}, s;
|
|
2091
2097
|
}();
|
|
2092
|
-
var
|
|
2098
|
+
var b = {
|
|
2093
2099
|
iconUrl: "./assets/img/dragIcon.png",
|
|
2094
2100
|
shiftX: 0,
|
|
2095
2101
|
shiftY: 0
|
|
2096
|
-
},
|
|
2102
|
+
}, P = {
|
|
2097
2103
|
iconUrl: "./assets/img/dragIcon.png",
|
|
2098
2104
|
shiftX: 0,
|
|
2099
2105
|
shiftY: 0
|
|
2100
|
-
},
|
|
2106
|
+
}, B = {
|
|
2101
2107
|
iconUrl: "./assets/img/dragIconLight.png",
|
|
2102
2108
|
shiftX: 0,
|
|
2103
2109
|
shiftY: 0
|
|
@@ -2106,7 +2112,7 @@ var ye = function() {
|
|
|
2106
2112
|
var c = new i.BillboardGroup(this, a);
|
|
2107
2113
|
return c.addBillboards(s, y), c;
|
|
2108
2114
|
}, i.BillboardGroup = function(s, a) {
|
|
2109
|
-
this._drawHelper = s, this._scene = s._scene, this._options =
|
|
2115
|
+
this._drawHelper = s, this._scene = s._scene, this._options = O(a, b);
|
|
2110
2116
|
var y = new p.BillboardCollection();
|
|
2111
2117
|
this._scene.primitives.add(y), this._billboards = y, this._orderedBillboards = [];
|
|
2112
2118
|
}, i.BillboardGroup.prototype.createBillboard = function(s, a) {
|
|
@@ -2122,33 +2128,33 @@ var ye = function() {
|
|
|
2122
2128
|
color: n
|
|
2123
2129
|
});
|
|
2124
2130
|
if (a) {
|
|
2125
|
-
let
|
|
2131
|
+
let m = function(g) {
|
|
2126
2132
|
f.enableRotate = g;
|
|
2127
2133
|
}, v = function() {
|
|
2128
|
-
for (var g = 0,
|
|
2134
|
+
for (var g = 0, w = c._orderedBillboards.length; g < w && c._orderedBillboards[g] != y; ++g)
|
|
2129
2135
|
;
|
|
2130
2136
|
return g;
|
|
2131
2137
|
};
|
|
2132
2138
|
var c = this, f = this._scene.screenSpaceCameraController;
|
|
2133
2139
|
if (a.dragHandlers) {
|
|
2134
2140
|
var c = this;
|
|
2135
|
-
V(y, "leftDown", function(
|
|
2136
|
-
function S(
|
|
2137
|
-
y.position =
|
|
2138
|
-
for (var
|
|
2141
|
+
V(y, "leftDown", function(w) {
|
|
2142
|
+
function S(M) {
|
|
2143
|
+
y.position = M;
|
|
2144
|
+
for (var D = 0, U = c._orderedBillboards.length; D < U && c._orderedBillboards[D] != y; ++D)
|
|
2139
2145
|
;
|
|
2140
|
-
a.dragHandlers.onDrag && a.dragHandlers.onDrag(v(),
|
|
2146
|
+
a.dragHandlers.onDrag && a.dragHandlers.onDrag(v(), M);
|
|
2141
2147
|
}
|
|
2142
|
-
function _(
|
|
2143
|
-
|
|
2148
|
+
function _(M) {
|
|
2149
|
+
T.destroy(), m(!0), a.dragHandlers.onDragEnd && a.dragHandlers.onDragEnd(v(), M);
|
|
2144
2150
|
}
|
|
2145
|
-
var
|
|
2146
|
-
|
|
2147
|
-
var
|
|
2148
|
-
|
|
2149
|
-
}, p.ScreenSpaceEventType.MOUSE_MOVE),
|
|
2150
|
-
_(c._scene.camera.pickEllipsoid(
|
|
2151
|
-
}, p.ScreenSpaceEventType.LEFT_UP),
|
|
2151
|
+
var T = new p.ScreenSpaceEventHandler(c._scene.canvas);
|
|
2152
|
+
T.setInputAction(function(M) {
|
|
2153
|
+
var D = c._scene.camera.pickEllipsoid(M.endPosition, e);
|
|
2154
|
+
D ? S(D) : _(D);
|
|
2155
|
+
}, p.ScreenSpaceEventType.MOUSE_MOVE), T.setInputAction(function(M) {
|
|
2156
|
+
_(c._scene.camera.pickEllipsoid(M.position, e));
|
|
2157
|
+
}, p.ScreenSpaceEventType.LEFT_UP), m(!1), a.dragHandlers.onDragStart && a.dragHandlers.onDragStart(v(), c._scene.camera.pickEllipsoid(w, e));
|
|
2152
2158
|
});
|
|
2153
2159
|
}
|
|
2154
2160
|
a.onDoubleClick && V(y, "leftDoubleClick", function(g) {
|
|
@@ -2183,69 +2189,69 @@ var ye = function() {
|
|
|
2183
2189
|
}, i.BillboardGroup.prototype.setOnTop = function() {
|
|
2184
2190
|
this._scene.primitives.raiseToTop(this._billboards);
|
|
2185
2191
|
}, i.prototype.startDrawingMarker = function(a) {
|
|
2186
|
-
var a =
|
|
2192
|
+
var a = O(a, b);
|
|
2187
2193
|
this.startDrawing(function() {
|
|
2188
|
-
|
|
2194
|
+
m.remove(), v.destroy(), f.setVisible(!1);
|
|
2189
2195
|
});
|
|
2190
2196
|
var y = this, c = this._scene;
|
|
2191
2197
|
c.primitives;
|
|
2192
|
-
var f = this._tooltip,
|
|
2198
|
+
var f = this._tooltip, m = new i.BillboardGroup(this, a), v = new p.ScreenSpaceEventHandler(c.canvas);
|
|
2193
2199
|
v.setInputAction(function(g) {
|
|
2194
2200
|
if (g.position != null) {
|
|
2195
|
-
var
|
|
2196
|
-
|
|
2201
|
+
var w = c.camera.pickEllipsoid(g.position, e);
|
|
2202
|
+
w && (m.addBillboard(w), y.stopDrawing(), a.callback(w));
|
|
2197
2203
|
}
|
|
2198
2204
|
}, p.ScreenSpaceEventType.LEFT_CLICK), v.setInputAction(function(g) {
|
|
2199
|
-
var
|
|
2200
|
-
if (
|
|
2201
|
-
var S = c.camera.pickEllipsoid(
|
|
2205
|
+
var w = g.endPosition;
|
|
2206
|
+
if (w != null) {
|
|
2207
|
+
var S = c.camera.pickEllipsoid(w, e);
|
|
2202
2208
|
S ? f.showAt(
|
|
2203
|
-
|
|
2204
|
-
"<p>Click to add your marker. Position is: </p>" +
|
|
2205
|
-
) : f.showAt(
|
|
2209
|
+
w,
|
|
2210
|
+
"<p>Click to add your marker. Position is: </p>" + K(e.cartesianToCartographic(S))
|
|
2211
|
+
) : f.showAt(w, "<p>Click on the globe to add your marker.</p>");
|
|
2206
2212
|
}
|
|
2207
2213
|
}, p.ScreenSpaceEventType.MOUSE_MOVE);
|
|
2208
2214
|
}, i.prototype.startDrawingPolygon = function(a) {
|
|
2209
|
-
var a =
|
|
2215
|
+
var a = O(a, r);
|
|
2210
2216
|
this.startDrawingPolyshape(!0, a);
|
|
2211
2217
|
}, i.prototype.startDrawingPolyline = function(a) {
|
|
2212
|
-
var a =
|
|
2218
|
+
var a = O(a, C);
|
|
2213
2219
|
this.startDrawingPolyshape(!1, a);
|
|
2214
2220
|
}, i.prototype.startDrawingPolyshape = function(s, a) {
|
|
2215
2221
|
this.startDrawing(function() {
|
|
2216
|
-
f.remove(g), S.remove(), _.destroy(),
|
|
2222
|
+
f.remove(g), S.remove(), _.destroy(), m.setVisible(!1), H(c);
|
|
2217
2223
|
});
|
|
2218
|
-
var y = this, c = this._scene, f = c.primitives,
|
|
2219
|
-
s ? g = new
|
|
2220
|
-
var
|
|
2221
|
-
|
|
2222
|
-
if (
|
|
2223
|
-
var
|
|
2224
|
-
|
|
2224
|
+
var y = this, c = this._scene, f = c.primitives, m = this._tooltip, v = s ? 3 : 2, g;
|
|
2225
|
+
s ? g = new Ce.PolygonPrimitive(a) : g = new Ce.PolylinePrimitive(a), g.asynchronous = !1, f.add(g);
|
|
2226
|
+
var w = [], S = new i.BillboardGroup(this, b), _ = new p.ScreenSpaceEventHandler(c.canvas);
|
|
2227
|
+
q(c), _.setInputAction(function(T) {
|
|
2228
|
+
if (T.position != null) {
|
|
2229
|
+
var M = c.camera.pickEllipsoid(T.position, e);
|
|
2230
|
+
M && (w.length == 0 && (w.push(M.clone()), S.addBillboard(w[0])), w.length >= v && (g.positions = w, g._createPrimitive = !0), w.push(M), S.addBillboard(M));
|
|
2225
2231
|
}
|
|
2226
|
-
}, p.ScreenSpaceEventType.LEFT_CLICK), _.setInputAction(function(
|
|
2227
|
-
var
|
|
2228
|
-
if (
|
|
2229
|
-
if (
|
|
2230
|
-
|
|
2232
|
+
}, p.ScreenSpaceEventType.LEFT_CLICK), _.setInputAction(function(T) {
|
|
2233
|
+
var M = T.endPosition;
|
|
2234
|
+
if (M != null)
|
|
2235
|
+
if (w.length == 0)
|
|
2236
|
+
m.showAt(M, "<p>Click to add first point</p>");
|
|
2231
2237
|
else {
|
|
2232
|
-
var
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
"<p>Click to add new point (" +
|
|
2238
|
+
var D = c.camera.pickEllipsoid(M, e);
|
|
2239
|
+
D && (w.pop(), D.y += 1 + Math.random(), w.push(D), w.length >= v && (g.positions = w, g._createPrimitive = !0), S.getBillboard(w.length - 1).position = D, m.showAt(
|
|
2240
|
+
M,
|
|
2241
|
+
"<p>Click to add new point (" + w.length + ")</p>" + (w.length > v ? "<p>Double click to finish drawing</p>" : "")
|
|
2236
2242
|
));
|
|
2237
2243
|
}
|
|
2238
|
-
}, p.ScreenSpaceEventType.MOUSE_MOVE), _.setInputAction(function(
|
|
2239
|
-
var
|
|
2240
|
-
if (
|
|
2241
|
-
if (
|
|
2244
|
+
}, p.ScreenSpaceEventType.MOUSE_MOVE), _.setInputAction(function(T) {
|
|
2245
|
+
var M = T.position;
|
|
2246
|
+
if (M != null) {
|
|
2247
|
+
if (w.length < v + 2)
|
|
2242
2248
|
return;
|
|
2243
|
-
var
|
|
2244
|
-
|
|
2249
|
+
var D = c.camera.pickEllipsoid(M, e);
|
|
2250
|
+
D && (H(c), y.stopDrawing(), typeof a.callback == "function" && (w.length - 1, a.callback(w)));
|
|
2245
2251
|
}
|
|
2246
2252
|
}, p.ScreenSpaceEventType.LEFT_DOUBLE_CLICK);
|
|
2247
2253
|
};
|
|
2248
|
-
function
|
|
2254
|
+
function $(s) {
|
|
2249
2255
|
return e.cartographicArrayToCartesianArray([
|
|
2250
2256
|
p.Rectangle.northwest(s),
|
|
2251
2257
|
p.Rectangle.northeast(s),
|
|
@@ -2253,58 +2259,58 @@ var ye = function() {
|
|
|
2253
2259
|
p.Rectangle.southwest(s)
|
|
2254
2260
|
]);
|
|
2255
2261
|
}
|
|
2256
|
-
function
|
|
2262
|
+
function q(s) {
|
|
2257
2263
|
s && (s.canvas.style.cursor = "crosshair");
|
|
2258
2264
|
}
|
|
2259
|
-
function
|
|
2265
|
+
function H(s) {
|
|
2260
2266
|
s && (s.canvas.style.cursor = "");
|
|
2261
2267
|
}
|
|
2262
2268
|
i.prototype.startDrawingExtent = function(a) {
|
|
2263
|
-
var a =
|
|
2269
|
+
var a = O(a, r);
|
|
2264
2270
|
this.startDrawing(function() {
|
|
2265
|
-
g != null && f.remove(g),
|
|
2271
|
+
g != null && f.remove(g), w != null && w.remove(), S.destroy(), m.setVisible(!1), H(c);
|
|
2266
2272
|
});
|
|
2267
|
-
var y = this, c = this._scene, f = this._scene.primitives,
|
|
2268
|
-
|
|
2269
|
-
function _(
|
|
2270
|
-
g == null && (g = new
|
|
2271
|
-
extent:
|
|
2273
|
+
var y = this, c = this._scene, f = this._scene.primitives, m = this._tooltip, v = null, g = null, w = null, S = new p.ScreenSpaceEventHandler(c.canvas);
|
|
2274
|
+
q(c);
|
|
2275
|
+
function _(T) {
|
|
2276
|
+
g == null && (g = new Ce.ExtentPrimitive({
|
|
2277
|
+
extent: T,
|
|
2272
2278
|
material: a.material
|
|
2273
|
-
}), g.asynchronous = !1, f.add(g)), g.setExtent(
|
|
2274
|
-
var
|
|
2275
|
-
|
|
2279
|
+
}), g.asynchronous = !1, f.add(g)), g.setExtent(T);
|
|
2280
|
+
var M = $(T);
|
|
2281
|
+
w == null ? (w = new i.BillboardGroup(y, b), w.addBillboards(M)) : w.updateBillboardsPositions(M);
|
|
2276
2282
|
}
|
|
2277
|
-
S.setInputAction(function(
|
|
2278
|
-
if (
|
|
2279
|
-
var
|
|
2280
|
-
if (
|
|
2283
|
+
S.setInputAction(function(T) {
|
|
2284
|
+
if (T.position != null) {
|
|
2285
|
+
var M = c.camera.pickEllipsoid(T.position, e);
|
|
2286
|
+
if (M)
|
|
2281
2287
|
if (g == null) {
|
|
2282
|
-
v = e.cartesianToCartographic(
|
|
2283
|
-
var
|
|
2284
|
-
_(
|
|
2288
|
+
v = e.cartesianToCartographic(M);
|
|
2289
|
+
var D = Y(v, v);
|
|
2290
|
+
_(D);
|
|
2285
2291
|
} else
|
|
2286
|
-
y.stopDrawing(), typeof a.callback == "function" && a.callback(Y(v, e.cartesianToCartographic(
|
|
2292
|
+
y.stopDrawing(), typeof a.callback == "function" && a.callback(Y(v, e.cartesianToCartographic(M)));
|
|
2287
2293
|
}
|
|
2288
|
-
}, p.ScreenSpaceEventType.LEFT_DOWN), S.setInputAction(function(
|
|
2289
|
-
var
|
|
2290
|
-
if (
|
|
2294
|
+
}, p.ScreenSpaceEventType.LEFT_DOWN), S.setInputAction(function(T) {
|
|
2295
|
+
var M = T.endPosition;
|
|
2296
|
+
if (M != null)
|
|
2291
2297
|
if (g == null)
|
|
2292
|
-
|
|
2298
|
+
m.showAt(M, "<p>Click to start drawing rectangle</p>");
|
|
2293
2299
|
else {
|
|
2294
|
-
var
|
|
2295
|
-
if (
|
|
2296
|
-
var
|
|
2297
|
-
_(
|
|
2300
|
+
var D = c.camera.pickEllipsoid(M, e);
|
|
2301
|
+
if (D) {
|
|
2302
|
+
var U = Y(v, e.cartesianToCartographic(D));
|
|
2303
|
+
_(U), m.showAt(M, "<p>Drag to change rectangle extent</p><p>Click again to finish drawing</p>");
|
|
2298
2304
|
}
|
|
2299
2305
|
}
|
|
2300
2306
|
}, p.ScreenSpaceEventType.MOUSE_MOVE);
|
|
2301
2307
|
}, i.prototype.startDrawingCircle = function(a) {
|
|
2302
|
-
var a =
|
|
2308
|
+
var a = O(a, r);
|
|
2303
2309
|
this.startDrawing(function() {
|
|
2304
|
-
v != null && f.remove(v), g.remove(),
|
|
2310
|
+
v != null && f.remove(v), g.remove(), w.destroy(), m.setVisible(!1);
|
|
2305
2311
|
});
|
|
2306
|
-
var y = this, c = this._scene, f = this._scene.primitives,
|
|
2307
|
-
|
|
2312
|
+
var y = this, c = this._scene, f = this._scene.primitives, m = this._tooltip, v = null, g = null, w = new p.ScreenSpaceEventHandler(c.canvas);
|
|
2313
|
+
w.setInputAction(function(S) {
|
|
2308
2314
|
if (S.position != null) {
|
|
2309
2315
|
var _ = c.camera.pickEllipsoid(S.position, e);
|
|
2310
2316
|
_ && (v == null ? (v = new i.CirclePrimitive({
|
|
@@ -2312,16 +2318,16 @@ var ye = function() {
|
|
|
2312
2318
|
radius: 0,
|
|
2313
2319
|
asynchronous: !1,
|
|
2314
2320
|
material: a.material
|
|
2315
|
-
}), f.add(v), g = new i.BillboardGroup(y,
|
|
2321
|
+
}), f.add(v), g = new i.BillboardGroup(y, b), g.addBillboards([_])) : (typeof a.callback == "function" && a.callback(v.getCenter(), v.getRadius()), y.stopDrawing()));
|
|
2316
2322
|
}
|
|
2317
|
-
}, p.ScreenSpaceEventType.LEFT_DOWN),
|
|
2323
|
+
}, p.ScreenSpaceEventType.LEFT_DOWN), w.setInputAction(function(S) {
|
|
2318
2324
|
var _ = S.endPosition;
|
|
2319
2325
|
if (_ != null)
|
|
2320
2326
|
if (v == null)
|
|
2321
|
-
|
|
2327
|
+
m.showAt(_, "<p>Click to start drawing the circle</p>");
|
|
2322
2328
|
else {
|
|
2323
|
-
var
|
|
2324
|
-
|
|
2329
|
+
var T = c.camera.pickEllipsoid(_, e);
|
|
2330
|
+
T && (v.setRadius(p.Cartesian3.distance(v.getCenter(), T)), g.updateBillboardsPositions(T), m.showAt(_, "<p>Move mouse to change circle radius</p><p>Click again to finish drawing</p>"));
|
|
2325
2331
|
}
|
|
2326
2332
|
}, p.ScreenSpaceEventType.MOUSE_MOVE);
|
|
2327
2333
|
}, i.prototype.enhancePrimitives = function() {
|
|
@@ -2331,24 +2337,24 @@ var ye = function() {
|
|
|
2331
2337
|
return;
|
|
2332
2338
|
this._editable = !0;
|
|
2333
2339
|
var c = this, f = this;
|
|
2334
|
-
function
|
|
2340
|
+
function m(v) {
|
|
2335
2341
|
s._scene.screenSpaceCameraController.enableRotate = v;
|
|
2336
2342
|
}
|
|
2337
2343
|
V(c, "leftDown", function(v) {
|
|
2338
2344
|
function g(_) {
|
|
2339
2345
|
c.position = _, f.executeListeners({ name: "drag", positions: _ });
|
|
2340
2346
|
}
|
|
2341
|
-
function
|
|
2342
|
-
S.destroy(),
|
|
2347
|
+
function w(_) {
|
|
2348
|
+
S.destroy(), m(!0), f.executeListeners({ name: "dragEnd", positions: _ });
|
|
2343
2349
|
}
|
|
2344
2350
|
var S = new p.ScreenSpaceEventHandler(s._scene.canvas);
|
|
2345
2351
|
S.setInputAction(function(_) {
|
|
2346
|
-
var
|
|
2347
|
-
|
|
2352
|
+
var T = s._scene.camera.pickEllipsoid(_.endPosition, e);
|
|
2353
|
+
T ? g(T) : w(T);
|
|
2348
2354
|
}, p.ScreenSpaceEventType.MOUSE_MOVE), S.setInputAction(function(_) {
|
|
2349
|
-
|
|
2350
|
-
}, p.ScreenSpaceEventType.LEFT_UP),
|
|
2351
|
-
}),
|
|
2355
|
+
w(s._scene.camera.pickEllipsoid(_.position, e));
|
|
2356
|
+
}, p.ScreenSpaceEventType.LEFT_UP), m(!1);
|
|
2357
|
+
}), ne(c);
|
|
2352
2358
|
};
|
|
2353
2359
|
function a(c) {
|
|
2354
2360
|
s._scene, !(this._highlighted && this._highlighted == c) && this._editMode !== !0 && (this._highlighted = c, c ? (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));
|
|
@@ -2357,112 +2363,112 @@ var ye = function() {
|
|
|
2357
2363
|
if (this._editMode != c)
|
|
2358
2364
|
if (s.disableAllHighlights(), c) {
|
|
2359
2365
|
s.setEdited(this);
|
|
2360
|
-
var f = s._scene,
|
|
2366
|
+
var f = s._scene, m = this;
|
|
2361
2367
|
if (this._markers == null) {
|
|
2362
|
-
let
|
|
2363
|
-
var
|
|
2364
|
-
|
|
2365
|
-
},
|
|
2366
|
-
|
|
2368
|
+
let D = function(R, z) {
|
|
2369
|
+
var Q = R - 1 < 0 ? z.length - 1 : R - 1;
|
|
2370
|
+
Q < g.countBillboards() && (g.getBillboard(Q).position = X(Q)), Q = R, Q < g.countBillboards() && (g.getBillboard(Q).position = X(Q));
|
|
2371
|
+
}, U = function() {
|
|
2372
|
+
m.executeListeners({
|
|
2367
2373
|
name: "onEdited",
|
|
2368
|
-
positions:
|
|
2374
|
+
positions: m.positions
|
|
2369
2375
|
});
|
|
2370
|
-
},
|
|
2371
|
-
var
|
|
2376
|
+
}, X = function(R) {
|
|
2377
|
+
var z = m.positions;
|
|
2372
2378
|
return e.cartographicToCartesian(
|
|
2373
2379
|
new p.EllipsoidGeodesic(
|
|
2374
|
-
e.cartesianToCartographic(
|
|
2375
|
-
e.cartesianToCartographic(
|
|
2380
|
+
e.cartesianToCartographic(z[R]),
|
|
2381
|
+
e.cartesianToCartographic(z[R < z.length - 1 ? R + 1 : 0])
|
|
2376
2382
|
).interpolateUsingFraction(0.5)
|
|
2377
2383
|
);
|
|
2378
2384
|
};
|
|
2379
|
-
var v = new i.BillboardGroup(s,
|
|
2385
|
+
var v = new i.BillboardGroup(s, P), g = new i.BillboardGroup(s, B), w = {
|
|
2380
2386
|
dragHandlers: {
|
|
2381
|
-
onDrag: function(
|
|
2382
|
-
|
|
2387
|
+
onDrag: function(R, z) {
|
|
2388
|
+
m.positions[R] = z, D(R, m.positions), m._createPrimitive = !0;
|
|
2383
2389
|
},
|
|
2384
|
-
onDragEnd: function(
|
|
2385
|
-
|
|
2390
|
+
onDragEnd: function(R, z) {
|
|
2391
|
+
m._createPrimitive = !0, U();
|
|
2386
2392
|
}
|
|
2387
2393
|
},
|
|
2388
|
-
onDoubleClick: function(
|
|
2389
|
-
|
|
2394
|
+
onDoubleClick: function(R) {
|
|
2395
|
+
m.positions.length < 4 || (m.positions.splice(R, 1), m._createPrimitive = !0, v.removeBillboard(R), g.removeBillboard(R), D(R, m.positions), U());
|
|
2390
2396
|
},
|
|
2391
2397
|
tooltip: function() {
|
|
2392
|
-
if (
|
|
2398
|
+
if (m.positions.length > 3)
|
|
2393
2399
|
return "Double click to remove this point";
|
|
2394
2400
|
}
|
|
2395
2401
|
};
|
|
2396
|
-
v.addBillboards(
|
|
2397
|
-
for (var S = [], _ = 0,
|
|
2398
|
-
S.push(
|
|
2399
|
-
var
|
|
2402
|
+
v.addBillboards(m.positions, w), this._markers = v;
|
|
2403
|
+
for (var S = [], _ = 0, T = m.positions.length + (this.isPolygon ? 0 : -1); _ < T; _++)
|
|
2404
|
+
S.push(X(_));
|
|
2405
|
+
var M = {
|
|
2400
2406
|
dragHandlers: {
|
|
2401
|
-
onDragStart: function(
|
|
2402
|
-
this.index =
|
|
2407
|
+
onDragStart: function(R, z) {
|
|
2408
|
+
this.index = R + 1, m.positions.splice(this.index, 0, z), m._createPrimitive = !0;
|
|
2403
2409
|
},
|
|
2404
|
-
onDrag: function(
|
|
2405
|
-
|
|
2410
|
+
onDrag: function(R, z) {
|
|
2411
|
+
m.positions[this.index] = z, m._createPrimitive = !0;
|
|
2406
2412
|
},
|
|
2407
|
-
onDragEnd: function(
|
|
2408
|
-
v.insertBillboard(this.index,
|
|
2413
|
+
onDragEnd: function(R, z) {
|
|
2414
|
+
v.insertBillboard(this.index, z, w), g.getBillboard(this.index - 1).position = X(this.index - 1), g.insertBillboard(this.index, X(this.index), M), m._createPrimitive = !0, U();
|
|
2409
2415
|
}
|
|
2410
2416
|
},
|
|
2411
2417
|
tooltip: function() {
|
|
2412
2418
|
return "Drag to create a new point";
|
|
2413
2419
|
}
|
|
2414
2420
|
};
|
|
2415
|
-
g.addBillboards(S,
|
|
2416
|
-
var
|
|
2417
|
-
|
|
2421
|
+
g.addBillboards(S, M), this._editMarkers = g, this._globeClickhandler = new p.ScreenSpaceEventHandler(f.canvas), this._globeClickhandler.setInputAction(function(R) {
|
|
2422
|
+
var z = f.pick(R.position);
|
|
2423
|
+
z && z.primitive || m.setEditMode(!1);
|
|
2418
2424
|
}, p.ScreenSpaceEventType.LEFT_CLICK), v.setOnTop(), g.setOnTop();
|
|
2419
2425
|
}
|
|
2420
2426
|
this._editMode = !0;
|
|
2421
2427
|
} else
|
|
2422
2428
|
this._markers != null && (this._markers.remove(), this._editMarkers.remove(), this._markers = null, this._editMarkers = null, this._globeClickhandler.destroy()), this._editMode = !1;
|
|
2423
2429
|
}
|
|
2424
|
-
|
|
2430
|
+
Ce.PolylinePrimitive.prototype.setEditable = function() {
|
|
2425
2431
|
if (!this.setEditMode) {
|
|
2426
2432
|
var c = this;
|
|
2427
2433
|
c.isPolygon = !1, c.asynchronous = !1, s.registerEditableShape(c), c.setEditMode = y;
|
|
2428
2434
|
var f = this.width;
|
|
2429
|
-
c.setHighlighted = function(
|
|
2430
|
-
this._editMode !== !0 && (
|
|
2435
|
+
c.setHighlighted = function(m) {
|
|
2436
|
+
this._editMode !== !0 && (m ? (s.setHighlighted(this), this.setWidth(f * 2)) : this.setWidth(f));
|
|
2431
2437
|
}, c.getExtent = function() {
|
|
2432
2438
|
return p.Rectangle.fromCartographicArray(e.cartesianArrayToCartographicArray(this.positions));
|
|
2433
|
-
},
|
|
2439
|
+
}, ne(c), c.setEditMode(!1);
|
|
2434
2440
|
}
|
|
2435
|
-
},
|
|
2441
|
+
}, Ce.PolygonPrimitive.prototype.setEditable = function() {
|
|
2436
2442
|
var c = this;
|
|
2437
|
-
c.asynchronous = !1, s._scene, s.registerEditableShape(c), c.setEditMode = y, c.setHighlighted = a,
|
|
2438
|
-
},
|
|
2443
|
+
c.asynchronous = !1, s._scene, s.registerEditableShape(c), c.setEditMode = y, c.setHighlighted = a, ne(c), c.setEditMode(!1);
|
|
2444
|
+
}, Ce.ExtentPrimitive.prototype.setEditable = function() {
|
|
2439
2445
|
if (!this.setEditMode) {
|
|
2440
2446
|
var c = this, f = s._scene;
|
|
2441
|
-
s.registerEditableShape(c), c.asynchronous = !1, c.setEditMode = function(
|
|
2442
|
-
if (this._editMode !=
|
|
2443
|
-
if (s.disableAllHighlights(),
|
|
2447
|
+
s.registerEditableShape(c), c.asynchronous = !1, c.setEditMode = function(m) {
|
|
2448
|
+
if (this._editMode != m)
|
|
2449
|
+
if (s.disableAllHighlights(), m) {
|
|
2444
2450
|
if (s.setEdited(this), this._markers == null) {
|
|
2445
|
-
let
|
|
2451
|
+
let w = function() {
|
|
2446
2452
|
c.executeListeners({
|
|
2447
2453
|
name: "onEdited",
|
|
2448
2454
|
extent: c.extent
|
|
2449
2455
|
});
|
|
2450
2456
|
};
|
|
2451
|
-
var v = new i.BillboardGroup(s,
|
|
2457
|
+
var v = new i.BillboardGroup(s, P), g = {
|
|
2452
2458
|
dragHandlers: {
|
|
2453
2459
|
onDrag: function(S, _) {
|
|
2454
|
-
var
|
|
2455
|
-
c.setExtent(Y(e.cartesianToCartographic(
|
|
2460
|
+
var T = v.getBillboard((S + 2) % 4).position;
|
|
2461
|
+
c.setExtent(Y(e.cartesianToCartographic(T), e.cartesianToCartographic(_))), v.updateBillboardsPositions($(c.extent));
|
|
2456
2462
|
},
|
|
2457
2463
|
onDragEnd: function(S, _) {
|
|
2458
|
-
|
|
2464
|
+
w();
|
|
2459
2465
|
}
|
|
2460
2466
|
},
|
|
2461
2467
|
tooltip: function() {
|
|
2462
2468
|
return "Drag to change the corners of this extent";
|
|
2463
2469
|
}
|
|
2464
2470
|
};
|
|
2465
|
-
v.addBillboards(
|
|
2471
|
+
v.addBillboards($(c.extent), g), this._markers = v, this._globeClickhandler = new p.ScreenSpaceEventHandler(f.canvas), this._globeClickhandler.setInputAction(function(S) {
|
|
2466
2472
|
var _ = f.pick(S.position);
|
|
2467
2473
|
_ && !_.isDestroyed() && _.primitive || c.setEditMode(!1);
|
|
2468
2474
|
}, p.ScreenSpaceEventType.LEFT_CLICK), v.setOnTop();
|
|
@@ -2470,14 +2476,14 @@ var ye = function() {
|
|
|
2470
2476
|
this._editMode = !0;
|
|
2471
2477
|
} else
|
|
2472
2478
|
this._markers != null && (this._markers.remove(), this._markers = null, this._globeClickhandler.destroy()), this._editMode = !1;
|
|
2473
|
-
}, c.setHighlighted = a,
|
|
2479
|
+
}, c.setHighlighted = a, ne(c), c.setEditMode(!1);
|
|
2474
2480
|
}
|
|
2475
2481
|
}, i.EllipsePrimitive.prototype.setEditable = function() {
|
|
2476
2482
|
if (!this.setEditMode) {
|
|
2477
2483
|
var c = this, f = s._scene;
|
|
2478
|
-
c.asynchronous = !1, s.registerEditableShape(c), c.setEditMode = function(
|
|
2479
|
-
if (this._editMode !=
|
|
2480
|
-
if (s.disableAllHighlights(),
|
|
2484
|
+
c.asynchronous = !1, s.registerEditableShape(c), c.setEditMode = function(m) {
|
|
2485
|
+
if (this._editMode != m)
|
|
2486
|
+
if (s.disableAllHighlights(), m) {
|
|
2481
2487
|
s.setEdited(this);
|
|
2482
2488
|
var v = this;
|
|
2483
2489
|
if (this._markers == null) {
|
|
@@ -2499,13 +2505,13 @@ var ye = function() {
|
|
|
2499
2505
|
rotation: 0
|
|
2500
2506
|
});
|
|
2501
2507
|
};
|
|
2502
|
-
var g = new i.BillboardGroup(s,
|
|
2508
|
+
var g = new i.BillboardGroup(s, P), w = {
|
|
2503
2509
|
dragHandlers: {
|
|
2504
|
-
onDrag: function(
|
|
2505
|
-
var
|
|
2506
|
-
|
|
2510
|
+
onDrag: function(T, M) {
|
|
2511
|
+
var D = p.Cartesian3.distance(c.getCenter(), M);
|
|
2512
|
+
T % 2 == 0 ? c.setSemiMajorAxis(D) : c.setSemiMinorAxis(D), g.updateBillboardsPositions(S());
|
|
2507
2513
|
},
|
|
2508
|
-
onDragEnd: function(
|
|
2514
|
+
onDragEnd: function(T, M) {
|
|
2509
2515
|
_();
|
|
2510
2516
|
}
|
|
2511
2517
|
},
|
|
@@ -2513,15 +2519,15 @@ var ye = function() {
|
|
|
2513
2519
|
return "Drag to change the excentricity and radius";
|
|
2514
2520
|
}
|
|
2515
2521
|
};
|
|
2516
|
-
g.addBillboards(S(),
|
|
2517
|
-
var
|
|
2518
|
-
|
|
2522
|
+
g.addBillboards(S(), w), this._markers = g, this._globeClickhandler = new p.ScreenSpaceEventHandler(f.canvas), this._globeClickhandler.setInputAction(function(T) {
|
|
2523
|
+
var M = f.pick(T.position);
|
|
2524
|
+
M && M.primitive || v.setEditMode(!1);
|
|
2519
2525
|
}, p.ScreenSpaceEventType.LEFT_CLICK), g.setOnTop();
|
|
2520
2526
|
}
|
|
2521
2527
|
this._editMode = !0;
|
|
2522
2528
|
} else
|
|
2523
2529
|
this._markers != null && (this._markers.remove(), this._markers = null, this._globeClickhandler.destroy()), this._editMode = !1;
|
|
2524
|
-
}, c.setHighlighted = a,
|
|
2530
|
+
}, c.setHighlighted = a, ne(c), c.setEditMode(!1);
|
|
2525
2531
|
}
|
|
2526
2532
|
}, i.CirclePrimitive.prototype.getCircleCartesianCoordinates = function(c) {
|
|
2527
2533
|
for (var f = p.CircleOutlineGeometry.createGeometry(
|
|
@@ -2531,15 +2537,15 @@ var ye = function() {
|
|
|
2531
2537
|
radius: this.getRadius(),
|
|
2532
2538
|
granularity: c
|
|
2533
2539
|
})
|
|
2534
|
-
),
|
|
2535
|
-
v = f.attributes.position.values, g.push(new p.Cartesian3(v[
|
|
2540
|
+
), m = 0, v, g = []; m < f.attributes.position.values.length; m += 3)
|
|
2541
|
+
v = f.attributes.position.values, g.push(new p.Cartesian3(v[m], v[m + 1], v[m + 2]));
|
|
2536
2542
|
return g;
|
|
2537
2543
|
}, i.CirclePrimitive.prototype.setEditable = function() {
|
|
2538
2544
|
if (!this.setEditMode) {
|
|
2539
2545
|
var c = this, f = s._scene;
|
|
2540
|
-
c.asynchronous = !1, s.registerEditableShape(c), c.setEditMode = function(
|
|
2541
|
-
if (this._editMode !=
|
|
2542
|
-
if (s.disableAllHighlights(),
|
|
2546
|
+
c.asynchronous = !1, s.registerEditableShape(c), c.setEditMode = function(m) {
|
|
2547
|
+
if (this._editMode != m)
|
|
2548
|
+
if (s.disableAllHighlights(), m) {
|
|
2543
2549
|
s.setEdited(this);
|
|
2544
2550
|
var v = this;
|
|
2545
2551
|
if (this._markers == null) {
|
|
@@ -2552,12 +2558,12 @@ var ye = function() {
|
|
|
2552
2558
|
radius: c.getRadius()
|
|
2553
2559
|
});
|
|
2554
2560
|
};
|
|
2555
|
-
var g = new i.BillboardGroup(s,
|
|
2561
|
+
var g = new i.BillboardGroup(s, P), w = {
|
|
2556
2562
|
dragHandlers: {
|
|
2557
|
-
onDrag: function(
|
|
2558
|
-
c.setRadius(p.Cartesian3.distance(c.getCenter(),
|
|
2563
|
+
onDrag: function(T, M) {
|
|
2564
|
+
c.setRadius(p.Cartesian3.distance(c.getCenter(), M)), g.updateBillboardsPositions(S());
|
|
2559
2565
|
},
|
|
2560
|
-
onDragEnd: function(
|
|
2566
|
+
onDragEnd: function(T, M) {
|
|
2561
2567
|
_();
|
|
2562
2568
|
}
|
|
2563
2569
|
},
|
|
@@ -2565,15 +2571,15 @@ var ye = function() {
|
|
|
2565
2571
|
return "Drag to change the radius";
|
|
2566
2572
|
}
|
|
2567
2573
|
};
|
|
2568
|
-
g.addBillboards(S(),
|
|
2569
|
-
var
|
|
2570
|
-
|
|
2574
|
+
g.addBillboards(S(), w), this._markers = g, this._globeClickhandler = new p.ScreenSpaceEventHandler(f.canvas), this._globeClickhandler.setInputAction(function(T) {
|
|
2575
|
+
var M = f.pick(T.position);
|
|
2576
|
+
M && M.primitive || v.setEditMode(!1);
|
|
2571
2577
|
}, p.ScreenSpaceEventType.LEFT_CLICK), g.setOnTop();
|
|
2572
2578
|
}
|
|
2573
2579
|
this._editMode = !0;
|
|
2574
2580
|
} else
|
|
2575
2581
|
this._markers != null && (this._markers.remove(), this._markers = null, this._globeClickhandler.destroy()), this._editMode = !1;
|
|
2576
|
-
}, c.setHighlighted = a,
|
|
2582
|
+
}, c.setHighlighted = a, ne(c), c.setEditMode(!1);
|
|
2577
2583
|
}
|
|
2578
2584
|
};
|
|
2579
2585
|
}, i.DrawHelperWidget = function() {
|
|
@@ -2587,21 +2593,21 @@ var ye = function() {
|
|
|
2587
2593
|
circleIcon: "./assets/img/glyphicons_095_vector_path_circle.png",
|
|
2588
2594
|
extentIcon: "./assets/img/glyphicons_094_vector_path_square.png",
|
|
2589
2595
|
clearIcon: "./assets/img/glyphicons_067_cleaning.png",
|
|
2590
|
-
polylineDrawingOptions:
|
|
2596
|
+
polylineDrawingOptions: C,
|
|
2591
2597
|
polygonDrawingOptions: d,
|
|
2592
2598
|
extentDrawingOptions: u,
|
|
2593
|
-
circleDrawingOptions:
|
|
2599
|
+
circleDrawingOptions: h
|
|
2594
2600
|
};
|
|
2595
|
-
|
|
2596
|
-
var f = this,
|
|
2597
|
-
|
|
2598
|
-
function v(S, _,
|
|
2599
|
-
var
|
|
2600
|
-
|
|
2601
|
-
var
|
|
2602
|
-
|
|
2603
|
-
var
|
|
2604
|
-
return
|
|
2601
|
+
W(y, c);
|
|
2602
|
+
var f = this, m = document.createElement("DIV");
|
|
2603
|
+
m.className = "toolbar", y.container.appendChild(m);
|
|
2604
|
+
function v(S, _, T, M) {
|
|
2605
|
+
var D = document.createElement("DIV");
|
|
2606
|
+
D.className = "button", D.title = T, m.appendChild(D), D.onclick = M;
|
|
2607
|
+
var U = document.createElement("SPAN");
|
|
2608
|
+
D.appendChild(U);
|
|
2609
|
+
var X = document.createElement("IMG");
|
|
2610
|
+
return X.src = _, U.appendChild(X), D;
|
|
2605
2611
|
}
|
|
2606
2612
|
var g = a._scene;
|
|
2607
2613
|
v("marker", y.markerIcon, "Click to start drawing a 2D marker", function() {
|
|
@@ -2648,14 +2654,14 @@ var ye = function() {
|
|
|
2648
2654
|
}
|
|
2649
2655
|
});
|
|
2650
2656
|
});
|
|
2651
|
-
var
|
|
2652
|
-
|
|
2657
|
+
var w = document.createElement("DIV");
|
|
2658
|
+
w.className = "divider", m.appendChild(w), v("clear", y.clearIcon, "Remove all primitives", function() {
|
|
2653
2659
|
g.primitives.removeAll();
|
|
2654
|
-
}),
|
|
2660
|
+
}), ne(this);
|
|
2655
2661
|
}
|
|
2656
2662
|
return s;
|
|
2657
2663
|
}(), i.prototype.addToolbar = function(s, a) {
|
|
2658
|
-
return a =
|
|
2664
|
+
return a = O(a, { container: s }), new i.DrawHelperWidget(this, a);
|
|
2659
2665
|
};
|
|
2660
2666
|
function Y(s, a) {
|
|
2661
2667
|
var y = new p.Rectangle();
|
|
@@ -2663,7 +2669,7 @@ var ye = function() {
|
|
|
2663
2669
|
var c = p.Math.EPSILON7;
|
|
2664
2670
|
return y.east - y.west < c && (y.east += c * 2), y.north - y.south < c && (y.north += c * 2), y;
|
|
2665
2671
|
}
|
|
2666
|
-
function
|
|
2672
|
+
function K(s, a) {
|
|
2667
2673
|
return s.longitude.toFixed(a || 3) + ", " + s.latitude.toFixed(a || 3);
|
|
2668
2674
|
}
|
|
2669
2675
|
function x(s, a) {
|
|
@@ -2676,13 +2682,13 @@ var ye = function() {
|
|
|
2676
2682
|
a[y] = typeof a[y] > "u" ? x(s[y], null) : a[y];
|
|
2677
2683
|
return a;
|
|
2678
2684
|
}
|
|
2679
|
-
function
|
|
2685
|
+
function W(s, a) {
|
|
2680
2686
|
s = s || {};
|
|
2681
2687
|
var y;
|
|
2682
2688
|
for (y in a)
|
|
2683
2689
|
s[y] === void 0 && (s[y] = x(a[y]));
|
|
2684
2690
|
}
|
|
2685
|
-
function
|
|
2691
|
+
function O(s, a) {
|
|
2686
2692
|
var y = x(s), c;
|
|
2687
2693
|
for (c in a)
|
|
2688
2694
|
y[c] === void 0 && (y[c] = x(a[c]));
|
|
@@ -2691,7 +2697,7 @@ var ye = function() {
|
|
|
2691
2697
|
function V(s, a, y) {
|
|
2692
2698
|
s[a] = y;
|
|
2693
2699
|
}
|
|
2694
|
-
function
|
|
2700
|
+
function ne(s) {
|
|
2695
2701
|
s._listeners = {}, s.addListener = function(a, y) {
|
|
2696
2702
|
return this._listeners[a] = this._listeners[a] || [], this._listeners[a].push(y), this._listeners[a].length;
|
|
2697
2703
|
}, s.executeListeners = function(a, y) {
|
|
@@ -2704,22 +2710,22 @@ var ye = function() {
|
|
|
2704
2710
|
}
|
|
2705
2711
|
return i;
|
|
2706
2712
|
}();
|
|
2707
|
-
const
|
|
2713
|
+
const Yr = 2, Xr = (e, n) => {
|
|
2708
2714
|
switch (e) {
|
|
2709
|
-
case
|
|
2710
|
-
if (n.features.length !==
|
|
2715
|
+
case se.BOX: {
|
|
2716
|
+
if (n.features.length !== Yr)
|
|
2711
2717
|
throw new Error(`${e} must have 2 points`);
|
|
2712
|
-
const t =
|
|
2718
|
+
const t = vt(n.features, (o) => {
|
|
2713
2719
|
var r;
|
|
2714
|
-
return ((r = o.properties) == null ? void 0 : r.type) ===
|
|
2715
|
-
}), i =
|
|
2720
|
+
return ((r = o.properties) == null ? void 0 : r.type) === ot.BOTTOM_LEFT;
|
|
2721
|
+
}), i = vt(n.features, (o) => {
|
|
2716
2722
|
var r;
|
|
2717
|
-
return ((r = o.properties) == null ? void 0 : r.type) ===
|
|
2723
|
+
return ((r = o.properties) == null ? void 0 : r.type) === ot.TOP_RIGHT;
|
|
2718
2724
|
});
|
|
2719
2725
|
if (i && t) {
|
|
2720
2726
|
if (t.geometry.coordinates[0] === i.geometry.coordinates[0] && t.geometry.coordinates[1] === i.geometry.coordinates[1])
|
|
2721
2727
|
throw new Error(`${e} must define BOTTOM_LEFT and TOP_RIGHT different points`);
|
|
2722
|
-
return
|
|
2728
|
+
return Se.fromDegrees(
|
|
2723
2729
|
t.geometry.coordinates[0],
|
|
2724
2730
|
t.geometry.coordinates[1],
|
|
2725
2731
|
i.geometry.coordinates[0],
|
|
@@ -2731,10 +2737,10 @@ const Ur = 2, jr = (e, n) => {
|
|
|
2731
2737
|
default:
|
|
2732
2738
|
throw new Error(`${e} type geoJSON still not supported`);
|
|
2733
2739
|
}
|
|
2734
|
-
},
|
|
2740
|
+
}, Zr = (e) => {
|
|
2735
2741
|
const n = e.map((t) => {
|
|
2736
|
-
const i =
|
|
2737
|
-
return [
|
|
2742
|
+
const i = Oe.fromCartesian(t);
|
|
2743
|
+
return [ce.toDegrees(i.longitude), ce.toDegrees(i.latitude)];
|
|
2738
2744
|
});
|
|
2739
2745
|
return n.push(n[0]), {
|
|
2740
2746
|
type: "Feature",
|
|
@@ -2744,51 +2750,51 @@ const Ur = 2, jr = (e, n) => {
|
|
|
2744
2750
|
coordinates: [n]
|
|
2745
2751
|
}
|
|
2746
2752
|
};
|
|
2747
|
-
},
|
|
2748
|
-
const n =
|
|
2749
|
-
[
|
|
2750
|
-
[
|
|
2753
|
+
}, Jr = (e) => {
|
|
2754
|
+
const n = Kt.lineString([
|
|
2755
|
+
[ce.toDegrees(e.west), ce.toDegrees(e.south)],
|
|
2756
|
+
[ce.toDegrees(e.east), ce.toDegrees(e.north)]
|
|
2751
2757
|
]);
|
|
2752
|
-
return
|
|
2753
|
-
},
|
|
2754
|
-
const n =
|
|
2758
|
+
return qt(jt(n));
|
|
2759
|
+
}, Qr = (e) => {
|
|
2760
|
+
const n = Kt.lineString([
|
|
2755
2761
|
[e.west, e.south],
|
|
2756
2762
|
[e.east, e.north]
|
|
2757
2763
|
]);
|
|
2758
|
-
return
|
|
2764
|
+
return qt(jt(n)).geometry.coordinates[0].map((i) => pe.fromRadiansArray(i)[0]);
|
|
2759
2765
|
};
|
|
2760
|
-
class
|
|
2766
|
+
class bs extends nt {
|
|
2761
2767
|
}
|
|
2762
|
-
const
|
|
2763
|
-
const { drawState: n, drawingMaterial: t, drawingVertexColor: i, material: o, hollow: r, outlineWidth: d } = e, u =
|
|
2764
|
-
|
|
2768
|
+
const Ts = (e) => {
|
|
2769
|
+
const { drawState: n, drawingMaterial: t, drawingVertexColor: i, material: o, hollow: r, outlineWidth: d } = e, u = le(), [h, E] = A();
|
|
2770
|
+
I(() => {
|
|
2765
2771
|
E(
|
|
2766
2772
|
// eslint-disable-next-line
|
|
2767
|
-
new
|
|
2773
|
+
new Ce(u, t, i)
|
|
2768
2774
|
);
|
|
2769
|
-
}, []),
|
|
2770
|
-
if (
|
|
2771
|
-
const
|
|
2775
|
+
}, []), I(() => {
|
|
2776
|
+
if (h) {
|
|
2777
|
+
const L = h;
|
|
2772
2778
|
if (n.drawing)
|
|
2773
2779
|
switch (n.type) {
|
|
2774
|
-
case
|
|
2775
|
-
u.scene.globe.depthTestAgainstTerrain = !1,
|
|
2776
|
-
callback: (
|
|
2780
|
+
case se.POLYGON:
|
|
2781
|
+
u.scene.globe.depthTestAgainstTerrain = !1, L.startDrawingPolygon({
|
|
2782
|
+
callback: (b) => {
|
|
2777
2783
|
n.handler({
|
|
2778
|
-
primitive:
|
|
2779
|
-
type:
|
|
2780
|
-
geojson:
|
|
2784
|
+
primitive: b,
|
|
2785
|
+
type: se.POLYGON,
|
|
2786
|
+
geojson: Zr(b)
|
|
2781
2787
|
});
|
|
2782
2788
|
}
|
|
2783
2789
|
});
|
|
2784
2790
|
break;
|
|
2785
|
-
case
|
|
2786
|
-
u.scene.globe.depthTestAgainstTerrain = !1,
|
|
2787
|
-
callback: (
|
|
2791
|
+
case se.BOX:
|
|
2792
|
+
u.scene.globe.depthTestAgainstTerrain = !1, L.startDrawingExtent({
|
|
2793
|
+
callback: (b) => {
|
|
2788
2794
|
n.handler({
|
|
2789
|
-
primitive:
|
|
2790
|
-
type:
|
|
2791
|
-
geojson:
|
|
2795
|
+
primitive: b,
|
|
2796
|
+
type: se.BOX,
|
|
2797
|
+
geojson: Jr(b)
|
|
2792
2798
|
});
|
|
2793
2799
|
}
|
|
2794
2800
|
});
|
|
@@ -2797,77 +2803,161 @@ const ys = (e) => {
|
|
|
2797
2803
|
throw new Error(`[CESIUM DRAW]: ${n.type} unrecognized primitive to draw.`);
|
|
2798
2804
|
}
|
|
2799
2805
|
else
|
|
2800
|
-
|
|
2806
|
+
L.stopDrawing(), u.scene.globe.depthTestAgainstTerrain = !0;
|
|
2801
2807
|
}
|
|
2802
|
-
}, [n,
|
|
2803
|
-
const
|
|
2808
|
+
}, [n, h]);
|
|
2809
|
+
const C = (L) => {
|
|
2804
2810
|
try {
|
|
2805
|
-
let
|
|
2811
|
+
let b = L.coordinates !== void 0 ? L.coordinates : Xr(L.type, L.geojson);
|
|
2806
2812
|
if (r !== !0)
|
|
2807
|
-
switch (
|
|
2808
|
-
case
|
|
2809
|
-
return /* @__PURE__ */ l(
|
|
2810
|
-
case
|
|
2811
|
-
return /* @__PURE__ */ l(
|
|
2813
|
+
switch (L.type) {
|
|
2814
|
+
case se.BOX:
|
|
2815
|
+
return /* @__PURE__ */ l(Kr, { coordinates: b, material: o ?? t });
|
|
2816
|
+
case se.POLYGON:
|
|
2817
|
+
return /* @__PURE__ */ l(Ur, { hierarchy: new yi(b), material: o ?? t });
|
|
2812
2818
|
default:
|
|
2813
|
-
return /* @__PURE__ */ l(
|
|
2819
|
+
return /* @__PURE__ */ l(te, {});
|
|
2814
2820
|
}
|
|
2815
2821
|
else {
|
|
2816
|
-
switch (
|
|
2817
|
-
case
|
|
2818
|
-
|
|
2822
|
+
switch (L.type) {
|
|
2823
|
+
case se.BOX:
|
|
2824
|
+
b = Qr(b);
|
|
2819
2825
|
break;
|
|
2820
|
-
case
|
|
2821
|
-
|
|
2826
|
+
case se.POLYGON:
|
|
2827
|
+
b = [...b, b[0]];
|
|
2822
2828
|
break;
|
|
2823
2829
|
default:
|
|
2824
|
-
return /* @__PURE__ */ l(
|
|
2830
|
+
return /* @__PURE__ */ l(te, {});
|
|
2825
2831
|
}
|
|
2826
|
-
return /* @__PURE__ */ l(
|
|
2832
|
+
return /* @__PURE__ */ l(qr, { clampToGround: !0, positions: b, width: d ?? 1, material: o ?? t });
|
|
2827
2833
|
}
|
|
2828
|
-
} catch (
|
|
2829
|
-
return console.error(
|
|
2834
|
+
} catch (b) {
|
|
2835
|
+
return console.error(b), /* @__PURE__ */ l(te, {});
|
|
2830
2836
|
}
|
|
2831
2837
|
};
|
|
2832
|
-
return /* @__PURE__ */ l(
|
|
2833
|
-
/* @__PURE__ */
|
|
2834
|
-
/* @__PURE__ */
|
|
2838
|
+
return /* @__PURE__ */ l(jr, { ...e, children: e.drawings.map((L, b) => /* @__PURE__ */ N($r, { name: L.name, children: [
|
|
2839
|
+
/* @__PURE__ */ N(Wr, { children: [
|
|
2840
|
+
/* @__PURE__ */ N("h1", { children: [
|
|
2835
2841
|
"Drawed Entity ",
|
|
2836
|
-
|
|
2842
|
+
L.name
|
|
2837
2843
|
] }),
|
|
2838
2844
|
/* @__PURE__ */ l("p", { children: "This is description of drawed entity" })
|
|
2839
2845
|
] }),
|
|
2840
|
-
|
|
2841
|
-
] },
|
|
2846
|
+
C(L)
|
|
2847
|
+
] }, L.id)) });
|
|
2842
2848
|
};
|
|
2843
|
-
class
|
|
2849
|
+
class _s extends vi {
|
|
2844
2850
|
}
|
|
2845
|
-
class
|
|
2851
|
+
class Ls extends Ei {
|
|
2846
2852
|
}
|
|
2847
|
-
class
|
|
2853
|
+
class Ss extends Ci {
|
|
2848
2854
|
}
|
|
2849
|
-
class
|
|
2855
|
+
class Ms extends Ee {
|
|
2850
2856
|
}
|
|
2851
|
-
class
|
|
2857
|
+
class Ps extends pe {
|
|
2852
2858
|
}
|
|
2853
|
-
class
|
|
2859
|
+
class Ds extends Oe {
|
|
2854
2860
|
}
|
|
2855
|
-
class
|
|
2861
|
+
class As extends wi {
|
|
2856
2862
|
}
|
|
2857
|
-
class
|
|
2863
|
+
class Is extends Wt {
|
|
2858
2864
|
}
|
|
2859
|
-
class
|
|
2865
|
+
class xs extends bi {
|
|
2860
2866
|
}
|
|
2861
|
-
class
|
|
2867
|
+
class ks extends Se {
|
|
2862
2868
|
}
|
|
2863
|
-
class
|
|
2869
|
+
class Os extends Ti {
|
|
2864
2870
|
}
|
|
2865
|
-
class
|
|
2871
|
+
class Rs extends _i {
|
|
2866
2872
|
}
|
|
2867
|
-
class
|
|
2873
|
+
class Ns extends Li {
|
|
2868
2874
|
}
|
|
2869
|
-
const
|
|
2870
|
-
const
|
|
2875
|
+
const Bs = it, Fs = Ut, Hs = (e) => {
|
|
2876
|
+
const n = le();
|
|
2877
|
+
return I(() => {
|
|
2878
|
+
n.extend(Si);
|
|
2879
|
+
}, [n]), /* @__PURE__ */ l(te, {});
|
|
2880
|
+
}, eo = -25, kt = 2, Gs = (e) => {
|
|
2881
|
+
const n = le(), t = (r, d = ",") => r.slice(r.indexOf(`
|
|
2882
|
+
`) + 1).split(`
|
|
2883
|
+
`).map((E) => {
|
|
2884
|
+
const C = E.split(d);
|
|
2885
|
+
return {
|
|
2886
|
+
cartographic: Oe.fromDegrees(parseFloat(C[0]), parseFloat(C[1])),
|
|
2887
|
+
cartesian: new Ee(parseFloat(C[0]), parseFloat(C[1]))
|
|
2888
|
+
};
|
|
2889
|
+
}), i = (r) => {
|
|
2890
|
+
var u;
|
|
2891
|
+
r.preventDefault(), r.persist();
|
|
2892
|
+
const d = new FileReader();
|
|
2893
|
+
d.onload = (h) => {
|
|
2894
|
+
var b;
|
|
2895
|
+
const E = (b = h.target) == null ? void 0 : b.result, C = t(E), L = Wt.WGS84;
|
|
2896
|
+
console.log(`Loaded CSV content:
|
|
2897
|
+
`, E), Mi(
|
|
2898
|
+
n.terrainProvider,
|
|
2899
|
+
C.map((P) => P.cartographic)
|
|
2900
|
+
).then(
|
|
2901
|
+
(P) => {
|
|
2902
|
+
console.log(P), P = P.slice(0, P.length - 1), n.scene.globe.depthTestAgainstTerrain = !0, n.entities.suspendEvents(), n.entities.removeAll(), P.forEach((B, $) => {
|
|
2903
|
+
n.entities.add({
|
|
2904
|
+
name: ($ + kt).toString(),
|
|
2905
|
+
position: L.cartographicToCartesian(B),
|
|
2906
|
+
billboard: {
|
|
2907
|
+
verticalOrigin: it.BOTTOM,
|
|
2908
|
+
scale: 0.7,
|
|
2909
|
+
image: "assets/img/map-marker.gif"
|
|
2910
|
+
},
|
|
2911
|
+
label: {
|
|
2912
|
+
text: ($ + kt).toString(),
|
|
2913
|
+
font: "14pt monospace",
|
|
2914
|
+
fillColor: nt.BLACK,
|
|
2915
|
+
style: Ut.FILL_AND_OUTLINE,
|
|
2916
|
+
outlineWidth: 4,
|
|
2917
|
+
outlineColor: nt.BLACK,
|
|
2918
|
+
verticalOrigin: it.BOTTOM,
|
|
2919
|
+
pixelOffset: new Ee(0, eo)
|
|
2920
|
+
},
|
|
2921
|
+
description: `
|
|
2922
|
+
Long: ${C[$].cartesian.x} </br>
|
|
2923
|
+
Lat: ${C[$].cartesian.y} </br>
|
|
2924
|
+
Height(m): <span style="font-weight: 500">${B.height}</span>
|
|
2925
|
+
`
|
|
2926
|
+
});
|
|
2927
|
+
}), n.entities.resumeEvents(), r.target.files !== null && (o(`terranian_heights_${r.target.files[0].name}`, C), r.target.value = ""), console.log("Pinned point count is ", n.entities.values.length);
|
|
2928
|
+
},
|
|
2929
|
+
(P) => {
|
|
2930
|
+
console.error("ERROR while sampleTerrainMostDetailed:", P);
|
|
2931
|
+
}
|
|
2932
|
+
);
|
|
2933
|
+
}, (u = r.target.files) != null && u[0] && d.readAsText(r.target.files[0]);
|
|
2934
|
+
}, o = (r, d) => {
|
|
2935
|
+
const u = (b) => {
|
|
2936
|
+
let P = "";
|
|
2937
|
+
return P += b.cartesian.x.toString() + ",", P += b.cartesian.y.toString() + ",", P += b.cartographic.height.toString(), P + `
|
|
2938
|
+
`;
|
|
2939
|
+
};
|
|
2940
|
+
let h = `long,lat,height
|
|
2941
|
+
`;
|
|
2942
|
+
d.forEach((b) => {
|
|
2943
|
+
h += u(b);
|
|
2944
|
+
});
|
|
2945
|
+
const E = new Blob([h], { type: "text/csv;charset=utf-8;" }), C = document.createElement("a"), L = URL.createObjectURL(E);
|
|
2946
|
+
C.setAttribute("href", L), C.setAttribute("download", r), C.style.visibility = "hidden", document.body.appendChild(C), C.click(), document.body.removeChild(C);
|
|
2947
|
+
};
|
|
2948
|
+
return /* @__PURE__ */ l(te, { children: /* @__PURE__ */ l(
|
|
2949
|
+
"input",
|
|
2950
|
+
{
|
|
2951
|
+
type: "file",
|
|
2952
|
+
id: "csvFile",
|
|
2953
|
+
accept: ".csv",
|
|
2954
|
+
onChange: (r) => {
|
|
2955
|
+
i(r);
|
|
2956
|
+
}
|
|
2957
|
+
}
|
|
2958
|
+
) });
|
|
2959
|
+
};
|
|
2960
|
+
const to = 38, no = 40, io = 13, ro = 14, oo = 27, so = 9, ao = 10, lo = 100, co = (e) => {
|
|
2871
2961
|
const [n, t] = A(e.defaultValue ?? ""), [i, o] = A(!1), [r, d] = A({
|
|
2872
2962
|
helperVisible: !1,
|
|
2873
2963
|
left: 0,
|
|
@@ -2881,242 +2971,242 @@ const Xr = 38, Zr = 40, Jr = 13, Qr = 14, eo = 27, to = 9, no = 10, io = 100, ro
|
|
|
2881
2971
|
value: "",
|
|
2882
2972
|
caret: 0,
|
|
2883
2973
|
width: "unset"
|
|
2884
|
-
}), u =
|
|
2885
|
-
|
|
2974
|
+
}), u = be(null);
|
|
2975
|
+
I(() => (window.addEventListener("resize", B), () => {
|
|
2886
2976
|
try {
|
|
2887
|
-
window.removeEventListener("resize",
|
|
2977
|
+
window.removeEventListener("resize", B);
|
|
2888
2978
|
} catch (f) {
|
|
2889
2979
|
console.log('WINDOW "resize" remove listener failed', f);
|
|
2890
2980
|
}
|
|
2891
|
-
}), []),
|
|
2981
|
+
}), []), I(() => {
|
|
2892
2982
|
typeof e.value < "u" && t(e.value), typeof e.defaultValue < "u" && t(e.defaultValue);
|
|
2893
|
-
}, [e.value, e.defaultValue]),
|
|
2894
|
-
const { options: f } = e, { caret:
|
|
2895
|
-
Y(n,
|
|
2983
|
+
}, [e.value, e.defaultValue]), I(() => {
|
|
2984
|
+
const { options: f } = e, { caret: m } = r;
|
|
2985
|
+
Y(n, m, f);
|
|
2896
2986
|
}, [e]);
|
|
2897
|
-
const
|
|
2898
|
-
const { trigger: g, matchAny:
|
|
2899
|
-
let
|
|
2900
|
-
Array.isArray(
|
|
2901
|
-
const
|
|
2902
|
-
Array.isArray(v) &&
|
|
2903
|
-
|
|
2987
|
+
const h = (f, m, v) => {
|
|
2988
|
+
const { trigger: g, matchAny: w, regex: S } = e, _ = new RegExp(S);
|
|
2989
|
+
let T = g;
|
|
2990
|
+
Array.isArray(T) || (T = new Array(g)), T.sort();
|
|
2991
|
+
const M = {};
|
|
2992
|
+
Array.isArray(v) && T.forEach((X) => {
|
|
2993
|
+
M[X] = v;
|
|
2904
2994
|
});
|
|
2905
|
-
const
|
|
2906
|
-
let
|
|
2907
|
-
for (let
|
|
2908
|
-
const { triggerStr:
|
|
2909
|
-
for (let
|
|
2910
|
-
const
|
|
2911
|
-
let
|
|
2912
|
-
if (
|
|
2913
|
-
const
|
|
2914
|
-
if (
|
|
2995
|
+
const D = E(T, _);
|
|
2996
|
+
let U = {};
|
|
2997
|
+
for (let X = 0; X < D.length; X++) {
|
|
2998
|
+
const { triggerStr: R, triggerMatch: z, triggerLength: Q } = D[X];
|
|
2999
|
+
for (let ie = m - 1; ie >= 0; --ie) {
|
|
3000
|
+
const F = f.substring(ie, m).match(_);
|
|
3001
|
+
let k = -1;
|
|
3002
|
+
if (Q > 0) {
|
|
3003
|
+
const j = z ? ie : ie - Q + 1;
|
|
3004
|
+
if (j < 0 || (C(R, f, j) && (k = j + Q), !F && k < 0))
|
|
2915
3005
|
break;
|
|
2916
3006
|
} else {
|
|
2917
|
-
if (
|
|
3007
|
+
if (F && ie > 0)
|
|
2918
3008
|
continue;
|
|
2919
|
-
if (
|
|
3009
|
+
if (k = ie === 0 && F ? 0 : ie + 1, m - k === 0)
|
|
2920
3010
|
break;
|
|
2921
3011
|
}
|
|
2922
|
-
if (
|
|
2923
|
-
const
|
|
2924
|
-
if (!Array.isArray(
|
|
3012
|
+
if (k >= 0) {
|
|
3013
|
+
const j = M[R];
|
|
3014
|
+
if (!Array.isArray(j))
|
|
2925
3015
|
continue;
|
|
2926
|
-
const
|
|
2927
|
-
const
|
|
2928
|
-
return
|
|
2929
|
-
}),
|
|
2930
|
-
|
|
2931
|
-
...
|
|
2932
|
-
trigger:
|
|
2933
|
-
matchStart:
|
|
2934
|
-
matchLength:
|
|
2935
|
-
options:
|
|
3016
|
+
const fe = f.substring(k, m), Te = j.filter((Ne) => {
|
|
3017
|
+
const De = Ne.toLowerCase().indexOf(fe.toLowerCase());
|
|
3018
|
+
return De !== -1 && (w || De === 0);
|
|
3019
|
+
}), ye = R, Re = fe.length;
|
|
3020
|
+
U = {
|
|
3021
|
+
...U,
|
|
3022
|
+
trigger: ye,
|
|
3023
|
+
matchStart: k,
|
|
3024
|
+
matchLength: Re,
|
|
3025
|
+
options: Te
|
|
2936
3026
|
};
|
|
2937
3027
|
}
|
|
2938
3028
|
}
|
|
2939
3029
|
}
|
|
2940
|
-
return
|
|
2941
|
-
}, E = (f,
|
|
3030
|
+
return U;
|
|
3031
|
+
}, E = (f, m) => f.map((g) => ({
|
|
2942
3032
|
triggerStr: g,
|
|
2943
|
-
triggerMatch: g.match(
|
|
3033
|
+
triggerMatch: g.match(m),
|
|
2944
3034
|
triggerLength: g.length
|
|
2945
|
-
})),
|
|
2946
|
-
const { onChange:
|
|
2947
|
-
if (
|
|
3035
|
+
})), C = (f, m, v) => !f || !f.length || m.substr(v, f.length) === f, L = (f) => {
|
|
3036
|
+
const { onChange: m, options: v, spaceRemovers: g, spacer: w, value: S } = e, _ = n, T = f.target.value, M = Ii(b(f.target)).end;
|
|
3037
|
+
if (T.length || H({
|
|
2948
3038
|
...r,
|
|
2949
3039
|
helperVisible: !1
|
|
2950
|
-
}), t(
|
|
3040
|
+
}), t(T), H({
|
|
2951
3041
|
...r,
|
|
2952
|
-
caret:
|
|
3042
|
+
caret: M,
|
|
2953
3043
|
value: f.target.value
|
|
2954
|
-
}), !
|
|
2955
|
-
return
|
|
2956
|
-
if (i && g.length &&
|
|
2957
|
-
for (let
|
|
2958
|
-
if (_[
|
|
2959
|
-
if (
|
|
2960
|
-
const
|
|
2961
|
-
return
|
|
3044
|
+
}), !T.length || !M)
|
|
3045
|
+
return m(f.target.value);
|
|
3046
|
+
if (i && g.length && T.length > 2 && w.length) {
|
|
3047
|
+
for (let D = 0; D < Math.max(_.length, T.length); ++D)
|
|
3048
|
+
if (_[D] !== T[D]) {
|
|
3049
|
+
if (D >= 2 && T[D - 1] === w && g.indexOf(T[D - 2]) === -1 && g.indexOf(T[D]) !== -1 && !rt(h(T.substring(0, D - 2), M - 3, v))) {
|
|
3050
|
+
const U = `${T.slice(0, D - 1)}${T.slice(D, D + 1)}${T.slice(D - 1, D)}${T.slice(D + 1)}`;
|
|
3051
|
+
return q(D + 1), u.current !== null && (u.current.value = U), S || H({
|
|
2962
3052
|
...r,
|
|
2963
|
-
value:
|
|
2964
|
-
}),
|
|
3053
|
+
value: U
|
|
3054
|
+
}), m(U);
|
|
2965
3055
|
}
|
|
2966
3056
|
break;
|
|
2967
3057
|
}
|
|
2968
3058
|
o(!1);
|
|
2969
3059
|
}
|
|
2970
|
-
return Y(
|
|
2971
|
-
},
|
|
3060
|
+
return Y(T, M, v), m(f.target.value);
|
|
3061
|
+
}, b = (f) => {
|
|
2972
3062
|
if (f !== void 0)
|
|
2973
3063
|
if (f.children.length > 0) {
|
|
2974
|
-
const
|
|
2975
|
-
if (
|
|
2976
|
-
return
|
|
3064
|
+
const m = f.getElementsByTagName("textarea");
|
|
3065
|
+
if (m.length > 0)
|
|
3066
|
+
return m[0];
|
|
2977
3067
|
const v = f.getElementsByTagName("input");
|
|
2978
3068
|
if (v.length > 0)
|
|
2979
3069
|
return v[0];
|
|
2980
3070
|
} else
|
|
2981
3071
|
return f;
|
|
2982
|
-
},
|
|
2983
|
-
const { helperVisible:
|
|
2984
|
-
if (
|
|
3072
|
+
}, P = (f) => {
|
|
3073
|
+
const { helperVisible: m, options: v, selection: g } = r, { onKeyDown: w, passThroughEnter: S } = e;
|
|
3074
|
+
if (m)
|
|
2985
3075
|
switch (f.keyCode) {
|
|
2986
|
-
case
|
|
2987
|
-
f.preventDefault(),
|
|
3076
|
+
case oo:
|
|
3077
|
+
f.preventDefault(), K();
|
|
2988
3078
|
break;
|
|
2989
|
-
case
|
|
2990
|
-
f.preventDefault(),
|
|
3079
|
+
case to:
|
|
3080
|
+
f.preventDefault(), H({
|
|
2991
3081
|
...r,
|
|
2992
3082
|
selection: (v.length + g - 1) % v.length
|
|
2993
3083
|
});
|
|
2994
3084
|
break;
|
|
2995
|
-
case
|
|
2996
|
-
f.preventDefault(),
|
|
3085
|
+
case no:
|
|
3086
|
+
f.preventDefault(), H({
|
|
2997
3087
|
...r,
|
|
2998
3088
|
selection: (g + 1) % v.length
|
|
2999
3089
|
});
|
|
3000
3090
|
break;
|
|
3001
|
-
case
|
|
3002
|
-
case
|
|
3003
|
-
S || f.preventDefault(),
|
|
3091
|
+
case ro:
|
|
3092
|
+
case io:
|
|
3093
|
+
S || f.preventDefault(), $(g);
|
|
3004
3094
|
break;
|
|
3005
|
-
case
|
|
3006
|
-
|
|
3095
|
+
case so:
|
|
3096
|
+
$(g);
|
|
3007
3097
|
break;
|
|
3008
3098
|
default:
|
|
3009
|
-
|
|
3099
|
+
w(f);
|
|
3010
3100
|
break;
|
|
3011
3101
|
}
|
|
3012
3102
|
else
|
|
3013
|
-
|
|
3014
|
-
},
|
|
3015
|
-
|
|
3103
|
+
w(f);
|
|
3104
|
+
}, B = () => {
|
|
3105
|
+
H({
|
|
3016
3106
|
...r,
|
|
3017
3107
|
helperVisible: !1
|
|
3018
3108
|
});
|
|
3019
|
-
},
|
|
3020
|
-
const { spacer:
|
|
3021
|
-
|
|
3022
|
-
},
|
|
3023
|
-
|
|
3109
|
+
}, $ = (f) => {
|
|
3110
|
+
const { spacer: m, onSelect: v, changeOnSelect: g } = e, { matchStart: w, matchLength: S, options: _, trigger: T } = r, M = _[f], D = n, U = D.substring(0, w - T.length), X = D.substring(w + S), R = { target: u.current }, z = g(T, M);
|
|
3111
|
+
R.target !== null && (R.target.value = `${U}${z}${m}${X}`), L(R), R.target !== null && v(R.target.value), K(), q(U.length + z.length + 1), o(!0);
|
|
3112
|
+
}, q = (f) => {
|
|
3113
|
+
H({
|
|
3024
3114
|
...r,
|
|
3025
3115
|
caret: f
|
|
3026
3116
|
});
|
|
3027
|
-
const
|
|
3028
|
-
|
|
3029
|
-
},
|
|
3117
|
+
const m = b(u.current);
|
|
3118
|
+
xi(m, f);
|
|
3119
|
+
}, H = (f) => {
|
|
3030
3120
|
setTimeout(() => {
|
|
3031
3121
|
d({
|
|
3032
3122
|
...f
|
|
3033
3123
|
});
|
|
3034
3124
|
}, 0);
|
|
3035
|
-
}, Y = (f,
|
|
3125
|
+
}, Y = (f, m, v) => {
|
|
3036
3126
|
const g = u.current;
|
|
3037
3127
|
if (u.current === null)
|
|
3038
3128
|
return;
|
|
3039
|
-
const
|
|
3040
|
-
if (
|
|
3129
|
+
const w = b(g);
|
|
3130
|
+
if (w === void 0)
|
|
3041
3131
|
return;
|
|
3042
|
-
const S = g.getBoundingClientRect(), _ =
|
|
3043
|
-
if (Object.keys(_).length > 0 &&
|
|
3044
|
-
const
|
|
3045
|
-
let
|
|
3046
|
-
|
|
3132
|
+
const S = g.getBoundingClientRect(), _ = h(f, m, v);
|
|
3133
|
+
if (Object.keys(_).length > 0 && w !== null) {
|
|
3134
|
+
const T = Ai(w, m), M = w.getBoundingClientRect(), { minChars: D, onRequestOptions: U, requestOnlyIfNoOptions: X, mode: R } = e;
|
|
3135
|
+
let z, Q, ie, ge = "unset";
|
|
3136
|
+
R === "assist" ? (z = g === w ? T.top + w.offsetTop : T.top + S.top, Q = Math.min(T.left + w.offsetLeft - ao, w.offsetLeft + M.width - lo)) : (z = S.top + g.offsetHeight, Q = g.offsetLeft, ie = g.offsetLeft - g.offsetWidth, ge = `${S.width}px`), _.matchLength >= D && (_.options.length > 1 || _.options.length === 1 && _.options[0].length !== _.matchLength) ? H({
|
|
3047
3137
|
...r,
|
|
3048
3138
|
value: f,
|
|
3049
3139
|
helperVisible: !0,
|
|
3050
|
-
top:
|
|
3051
|
-
left:
|
|
3052
|
-
right:
|
|
3053
|
-
width:
|
|
3140
|
+
top: z,
|
|
3141
|
+
left: Q,
|
|
3142
|
+
right: ie,
|
|
3143
|
+
width: ge,
|
|
3054
3144
|
..._
|
|
3055
|
-
}) : ((!
|
|
3145
|
+
}) : ((!X || !_.options.length) && U(f.substr(_.matchStart, _.matchLength)), K());
|
|
3056
3146
|
} else
|
|
3057
|
-
|
|
3058
|
-
},
|
|
3147
|
+
K();
|
|
3148
|
+
}, K = () => {
|
|
3059
3149
|
setTimeout(() => {
|
|
3060
|
-
|
|
3150
|
+
H({
|
|
3061
3151
|
...r,
|
|
3062
3152
|
helperVisible: !1,
|
|
3063
3153
|
selection: 0
|
|
3064
3154
|
});
|
|
3065
3155
|
}, 100);
|
|
3066
3156
|
}, x = () => {
|
|
3067
|
-
const { helperVisible: f, left:
|
|
3157
|
+
const { helperVisible: f, left: m, right: v, matchStart: g, matchLength: w, options: S, selection: _, top: T, value: M, width: D } = r;
|
|
3068
3158
|
if (!f)
|
|
3069
3159
|
return null;
|
|
3070
|
-
const { maxOptions:
|
|
3160
|
+
const { maxOptions: U, offsetX: X, offsetY: R, direction: z } = e;
|
|
3071
3161
|
if (S.length === 0)
|
|
3072
3162
|
return null;
|
|
3073
3163
|
if (_ >= S.length)
|
|
3074
|
-
return
|
|
3164
|
+
return H({
|
|
3075
3165
|
...r,
|
|
3076
3166
|
selection: 0
|
|
3077
3167
|
}), null;
|
|
3078
|
-
const
|
|
3079
|
-
const
|
|
3080
|
-
return /* @__PURE__ */
|
|
3168
|
+
const Q = U === 0 ? S.length : U, ie = S.slice(0, Q).map((F, k) => {
|
|
3169
|
+
const j = F.toLowerCase().indexOf(M.substr(g, w).toLowerCase());
|
|
3170
|
+
return /* @__PURE__ */ N(
|
|
3081
3171
|
"li",
|
|
3082
3172
|
{
|
|
3083
|
-
className:
|
|
3173
|
+
className: k === _ ? "active" : void 0,
|
|
3084
3174
|
onClick: () => {
|
|
3085
|
-
|
|
3175
|
+
$(k);
|
|
3086
3176
|
},
|
|
3087
3177
|
onMouseEnter: () => {
|
|
3088
|
-
|
|
3178
|
+
H({
|
|
3089
3179
|
...r,
|
|
3090
|
-
selection:
|
|
3180
|
+
selection: k
|
|
3091
3181
|
});
|
|
3092
3182
|
},
|
|
3093
3183
|
children: [
|
|
3094
|
-
|
|
3095
|
-
/* @__PURE__ */ l("strong", { children:
|
|
3096
|
-
|
|
3184
|
+
F.slice(0, j),
|
|
3185
|
+
/* @__PURE__ */ l("strong", { children: F.substr(j, w) }),
|
|
3186
|
+
F.slice(j + w)
|
|
3097
3187
|
]
|
|
3098
3188
|
},
|
|
3099
|
-
|
|
3189
|
+
F
|
|
3100
3190
|
);
|
|
3101
|
-
}),
|
|
3102
|
-
return /* @__PURE__ */ l("ul", { className: "react-autocomplete-input", style: { ...
|
|
3103
|
-
}, { Component:
|
|
3191
|
+
}), ge = z === "ltr" ? { left: m + X } : { right: v + X };
|
|
3192
|
+
return /* @__PURE__ */ l("ul", { className: "react-autocomplete-input", style: { ...ge, top: T + R, width: D }, children: ie });
|
|
3193
|
+
}, { Component: W, ComponentProps: O, defaultValue: V, disabled: ne, onBlur: s, value: a, ...y } = e, c = Object.assign({}, y);
|
|
3104
3194
|
return Object.keys(e).forEach((f) => {
|
|
3105
3195
|
delete c[f];
|
|
3106
|
-
}), /* @__PURE__ */
|
|
3107
|
-
|
|
3108
|
-
disabled:
|
|
3196
|
+
}), /* @__PURE__ */ N(te, { children: [
|
|
3197
|
+
ve.cloneElement(W, {
|
|
3198
|
+
disabled: ne,
|
|
3109
3199
|
onBlur: s,
|
|
3110
|
-
onChange:
|
|
3111
|
-
onKeyDown:
|
|
3200
|
+
onChange: L,
|
|
3201
|
+
onKeyDown: P,
|
|
3112
3202
|
ref: u,
|
|
3113
3203
|
value: n,
|
|
3114
3204
|
...c,
|
|
3115
|
-
...
|
|
3205
|
+
...O
|
|
3116
3206
|
}),
|
|
3117
3207
|
x()
|
|
3118
3208
|
] });
|
|
3119
|
-
},
|
|
3209
|
+
}, uo = {
|
|
3120
3210
|
Component: /* @__PURE__ */ l("textarea", {}),
|
|
3121
3211
|
ComponentProps: {},
|
|
3122
3212
|
defaultValue: void 0,
|
|
@@ -3147,9 +3237,9 @@ const Xr = 38, Zr = 40, Jr = 13, Qr = 14, eo = 27, to = 9, no = 10, io = 100, ro
|
|
|
3147
3237
|
passThroughEnter: !1,
|
|
3148
3238
|
mode: "assist",
|
|
3149
3239
|
direction: "ltr"
|
|
3150
|
-
},
|
|
3240
|
+
}, Vs = (e) => {
|
|
3151
3241
|
let n = {
|
|
3152
|
-
...
|
|
3242
|
+
...uo,
|
|
3153
3243
|
...e
|
|
3154
3244
|
};
|
|
3155
3245
|
return e.mode === "autocomplete" && (n = {
|
|
@@ -3157,10 +3247,10 @@ const Xr = 38, Zr = 40, Jr = 13, Qr = 14, eo = 27, to = 9, no = 10, io = 100, ro
|
|
|
3157
3247
|
trigger: "",
|
|
3158
3248
|
regex: ".",
|
|
3159
3249
|
spacer: ""
|
|
3160
|
-
}), /* @__PURE__ */ l(
|
|
3161
|
-
},
|
|
3250
|
+
}), /* @__PURE__ */ l(co, { ...n });
|
|
3251
|
+
}, mt = {
|
|
3162
3252
|
formatFileModDate: (e, n) => {
|
|
3163
|
-
const t =
|
|
3253
|
+
const t = Yt.getModDate(n);
|
|
3164
3254
|
return t ? e.formatDate(t, {
|
|
3165
3255
|
dateStyle: "short",
|
|
3166
3256
|
timeStyle: "short"
|
|
@@ -3169,18 +3259,18 @@ const Xr = 38, Zr = 40, Jr = 13, Qr = 14, eo = 27, to = 9, no = 10, io = 100, ro
|
|
|
3169
3259
|
formatFileSize: (e, n) => {
|
|
3170
3260
|
if (!n || typeof n.size != "number")
|
|
3171
3261
|
return null;
|
|
3172
|
-
const t = n.size, i =
|
|
3262
|
+
const t = n.size, i = Ni(t, {
|
|
3173
3263
|
bits: !1,
|
|
3174
3264
|
output: "object"
|
|
3175
3265
|
});
|
|
3176
3266
|
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()}`;
|
|
3177
3267
|
}
|
|
3178
|
-
},
|
|
3179
|
-
locale:
|
|
3180
|
-
formatters: { ...
|
|
3181
|
-
},
|
|
3182
|
-
locale:
|
|
3183
|
-
formatters: { ...
|
|
3268
|
+
}, ho = {
|
|
3269
|
+
locale: de.EN,
|
|
3270
|
+
formatters: { ...mt }
|
|
3271
|
+
}, mo = {
|
|
3272
|
+
locale: de.RU,
|
|
3273
|
+
formatters: { ...mt },
|
|
3184
3274
|
messages: {
|
|
3185
3275
|
"chonky.toolbar.searchPlaceholder": "Поиск",
|
|
3186
3276
|
"chonky.toolbar.visibleFileCount": `{fileCount, plural,
|
|
@@ -3218,9 +3308,9 @@ const Xr = 38, Zr = 40, Jr = 13, Qr = 14, eo = 27, to = 9, no = 10, io = 100, ro
|
|
|
3218
3308
|
[`chonky.actions.${G.ToggleHiddenFiles.id}.button.name`]: "Скрытые файлы",
|
|
3219
3309
|
[`chonky.actions.${G.ToggleShowFoldersFirst.id}.button.name`]: "Папки в начале"
|
|
3220
3310
|
}
|
|
3221
|
-
},
|
|
3222
|
-
locale:
|
|
3223
|
-
formatters: { ...
|
|
3311
|
+
}, po = {
|
|
3312
|
+
locale: de.HE,
|
|
3313
|
+
formatters: { ...mt },
|
|
3224
3314
|
messages: {
|
|
3225
3315
|
"chonky.toolbar.searchPlaceholder": "חיפוש",
|
|
3226
3316
|
"chonky.toolbar.visibleFileCount": `{fileCount, plural,
|
|
@@ -3257,37 +3347,37 @@ const Xr = 38, Zr = 40, Jr = 13, Qr = 14, eo = 27, to = 9, no = 10, io = 100, ro
|
|
|
3257
3347
|
[`chonky.actions.${G.ToggleHiddenFiles.id}.button.name`]: "קבצים נסתרים",
|
|
3258
3348
|
[`chonky.actions.${G.ToggleShowFoldersFirst.id}.button.name`]: "הצגת תיקיות בראש הרשימה"
|
|
3259
3349
|
}
|
|
3260
|
-
},
|
|
3261
|
-
[
|
|
3262
|
-
[
|
|
3263
|
-
[
|
|
3350
|
+
}, go = {
|
|
3351
|
+
[de.EN]: ho,
|
|
3352
|
+
[de.RU]: mo,
|
|
3353
|
+
[de.HE]: po
|
|
3264
3354
|
};
|
|
3265
|
-
class
|
|
3355
|
+
class zs extends Yt {
|
|
3266
3356
|
}
|
|
3267
|
-
const
|
|
3357
|
+
const $s = G, fo = {
|
|
3268
3358
|
listView: G.EnableListView.id,
|
|
3269
3359
|
gridView: G.EnableGridView.id
|
|
3270
3360
|
};
|
|
3271
|
-
|
|
3272
|
-
const
|
|
3273
|
-
|
|
3361
|
+
ki({ iconComponent: Ri });
|
|
3362
|
+
const Ws = ve.memo(
|
|
3363
|
+
ve.forwardRef(
|
|
3274
3364
|
({
|
|
3275
3365
|
theme: e,
|
|
3276
3366
|
styles: n = { height: "100%", minWidth: "600px" },
|
|
3277
|
-
defaultView: t =
|
|
3367
|
+
defaultView: t = fo.listView,
|
|
3278
3368
|
readOnlyMode: i = !1,
|
|
3279
3369
|
locale: o,
|
|
3280
3370
|
files: r,
|
|
3281
3371
|
folderChain: d,
|
|
3282
3372
|
onFileAction: u,
|
|
3283
|
-
...
|
|
3373
|
+
...h
|
|
3284
3374
|
}, E) => {
|
|
3285
|
-
const
|
|
3375
|
+
const C = me(
|
|
3286
3376
|
(V) => null,
|
|
3287
3377
|
// file.thumbnailUrl ? `https://chonky.io${file.thumbnailUrl}` : null,
|
|
3288
3378
|
[]
|
|
3289
3379
|
);
|
|
3290
|
-
|
|
3380
|
+
ke({
|
|
3291
3381
|
"@global": {
|
|
3292
3382
|
".chonky-dropdownList": {
|
|
3293
3383
|
backgroundColor: `${e == null ? void 0 : e.surface} !important`
|
|
@@ -3297,21 +3387,21 @@ const Ns = fe.memo(
|
|
|
3297
3387
|
}
|
|
3298
3388
|
}
|
|
3299
3389
|
})();
|
|
3300
|
-
const
|
|
3390
|
+
const L = (V) => V.replace(/([A-Z])/g, (ne) => "-" + ne.toLowerCase()), b = $e(() => e !== void 0 ? Object.keys(e).reduce((ne, s) => {
|
|
3301
3391
|
const a = e[s];
|
|
3302
|
-
return s = s.startsWith("--") ? s : `--fp-theme-${
|
|
3303
|
-
}, {}) : {}, [e]), [
|
|
3304
|
-
return
|
|
3305
|
-
e &&
|
|
3392
|
+
return s = s.startsWith("--") ? s : `--fp-theme-${L(s)}`, ne[s] = a, ne;
|
|
3393
|
+
}, {}) : {}, [e]), [P, B] = A(!1), [$, q] = A(), [H, Y] = A(!1), [K, x] = A(), [W, O] = A();
|
|
3394
|
+
return I(() => {
|
|
3395
|
+
e && B(!0), q(t), i ? Y(!0) : x([G.CreateFolder, G.DeleteFiles]), o !== void 0 && O(go[o]);
|
|
3306
3396
|
}, [e, t, i, o]), /* @__PURE__ */ l(
|
|
3307
3397
|
ae,
|
|
3308
3398
|
{
|
|
3309
3399
|
style: {
|
|
3310
3400
|
...n,
|
|
3311
|
-
...
|
|
3401
|
+
...b
|
|
3312
3402
|
},
|
|
3313
3403
|
children: /* @__PURE__ */ l(
|
|
3314
|
-
|
|
3404
|
+
Oi,
|
|
3315
3405
|
{
|
|
3316
3406
|
ref: E,
|
|
3317
3407
|
files: r ?? [],
|
|
@@ -3319,13 +3409,13 @@ const Ns = fe.memo(
|
|
|
3319
3409
|
onFileAction: (V) => {
|
|
3320
3410
|
typeof u == "function" && u(V);
|
|
3321
3411
|
},
|
|
3322
|
-
thumbnailGenerator:
|
|
3323
|
-
defaultFileViewActionId:
|
|
3324
|
-
disableDragAndDrop:
|
|
3325
|
-
fileActions:
|
|
3326
|
-
darkMode:
|
|
3327
|
-
i18n:
|
|
3328
|
-
...
|
|
3412
|
+
thumbnailGenerator: C,
|
|
3413
|
+
defaultFileViewActionId: $,
|
|
3414
|
+
disableDragAndDrop: H,
|
|
3415
|
+
fileActions: K,
|
|
3416
|
+
darkMode: P,
|
|
3417
|
+
i18n: W,
|
|
3418
|
+
...h
|
|
3329
3419
|
}
|
|
3330
3420
|
)
|
|
3331
3421
|
}
|
|
@@ -3334,67 +3424,76 @@ const Ns = fe.memo(
|
|
|
3334
3424
|
)
|
|
3335
3425
|
);
|
|
3336
3426
|
export {
|
|
3337
|
-
|
|
3338
|
-
|
|
3427
|
+
Vs as Autocomplete,
|
|
3428
|
+
ot as BboxCorner,
|
|
3339
3429
|
ae as Box,
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3430
|
+
at as COORDINATES_MERCATOR_FRACTION_DIGITS,
|
|
3431
|
+
st as COORDINATES_WGS_FRACTION_DIGITS,
|
|
3432
|
+
gs as Cesium3DTileset,
|
|
3433
|
+
As as CesiumBoundingSphere,
|
|
3434
|
+
Ms as CesiumCartesian2,
|
|
3435
|
+
Ps as CesiumCartesian3,
|
|
3436
|
+
Ds as CesiumCartographic,
|
|
3437
|
+
Ns as CesiumCesiumTerrainProvider,
|
|
3438
|
+
bs as CesiumColor,
|
|
3439
|
+
Ss as CesiumConstantPositionProperty,
|
|
3440
|
+
Ls as CesiumConstantProperty,
|
|
3441
|
+
jr as CesiumCustomDataSource,
|
|
3442
|
+
Ts as CesiumDrawingsDataSource,
|
|
3443
|
+
Is as CesiumEllipsoid,
|
|
3444
|
+
Rs as CesiumEllipsoidTerrainProvider,
|
|
3445
|
+
$r as CesiumEntity,
|
|
3446
|
+
ws as CesiumEntityDescription,
|
|
3447
|
+
Wr as CesiumEntityStaticDescription,
|
|
3448
|
+
xs as CesiumGeographicTilingScheme,
|
|
3449
|
+
fs as CesiumGeojsonLayer,
|
|
3450
|
+
Ke as CesiumImageryLayer,
|
|
3451
|
+
Fs as CesiumLabelStyle,
|
|
3452
|
+
ps as CesiumMap,
|
|
3453
|
+
Ys as CesiumMath,
|
|
3454
|
+
Cs as CesiumOSMLayer,
|
|
3455
|
+
Ur as CesiumPolygonGraphics,
|
|
3456
|
+
_s as CesiumPolylineDashMaterialProperty,
|
|
3457
|
+
ks as CesiumRectangle,
|
|
3458
|
+
Kr as CesiumRectangleGraphics,
|
|
3459
|
+
Os as CesiumResource,
|
|
3460
|
+
oe as CesiumSceneMode,
|
|
3461
|
+
Bs as CesiumVerticalOrigin,
|
|
3462
|
+
ms as CesiumViewer,
|
|
3463
|
+
ys as CesiumWMSLayer,
|
|
3464
|
+
vs as CesiumWMTSLayer,
|
|
3465
|
+
Es as CesiumXYZLayer,
|
|
3466
|
+
Er as CoordinatesTrackerTool,
|
|
3467
|
+
us as CssBaseline,
|
|
3468
|
+
as as DateRangePicker,
|
|
3469
|
+
ls as DateTimePicker,
|
|
3470
|
+
Vi as DateTimeRangePicker,
|
|
3471
|
+
os as DateTimeRangePickerFormControl,
|
|
3472
|
+
Ce as DrawHelper,
|
|
3473
|
+
se as DrawType,
|
|
3474
|
+
zs as FileHelper,
|
|
3475
|
+
Ws as FilePicker,
|
|
3476
|
+
$s as FilePickerActions,
|
|
3477
|
+
fo as FilePickerViewObj,
|
|
3478
|
+
Hs as InspectorTool,
|
|
3479
|
+
cs as MapFilterContainer,
|
|
3480
|
+
zi as Popover,
|
|
3388
3481
|
he as Proj,
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3482
|
+
Tr as ScaleTrackerTool,
|
|
3483
|
+
hs as ScopedCssBaseline,
|
|
3484
|
+
ds as SmartTable,
|
|
3485
|
+
de as SupportedLocales,
|
|
3486
|
+
Gs as TerrainianHeightTool,
|
|
3487
|
+
ss as TimeRangeInput,
|
|
3488
|
+
Lr as ZoomLevelTrackerTool,
|
|
3489
|
+
Xs as cesiumSampleTerrainMostDetailed,
|
|
3490
|
+
mt as defaultFormatters,
|
|
3491
|
+
Ye as isDateRange,
|
|
3492
|
+
Bi as mapMcToMuiTheme,
|
|
3493
|
+
Zr as polygonToGeoJSON,
|
|
3494
|
+
Jr as rectangleToGeoJSON,
|
|
3495
|
+
Qr as rectangleToPositions,
|
|
3496
|
+
le as useCesiumMap,
|
|
3497
|
+
Xt as useMappedMuiTheme,
|
|
3498
|
+
js as useMediaQuery
|
|
3400
3499
|
};
|