@carto/ps-react-maps 3.0.1 → 3.1.0-canary.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1760 -1478
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/editable/custom-editable-geojson-layer.d.ts +12 -0
- package/dist/types/editable/lasso-tools/layer.d.ts +4 -1
- package/dist/types/editable/measurement-tools/layer.d.ts +4 -1
- package/dist/types/index.d.ts +4 -2
- package/dist/types/maps/deck-overlay.d.ts +9 -0
- package/dist/types/maps/deckgl.d.ts +2 -0
- package/dist/types/maps/google-maps.d.ts +7 -0
- package/dist/types/maps/map-libre.d.ts +8 -0
- package/dist/types/{map.d.ts → maps/map.d.ts} +1 -1
- package/dist/types/models/use-widget-model.d.ts +1 -1
- package/dist/types/providers/map/types.d.ts +5 -3
- package/dist/types/providers/sources/types.d.ts +10 -2
- package/dist/types/types.d.ts +2 -1
- package/dist/types/use-event-manager.d.ts +5 -0
- package/package.json +5 -3
- package/dist/types/deckgl.d.ts +0 -2
package/dist/index.js
CHANGED
|
@@ -1,209 +1,326 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { jsx as
|
|
5
|
-
import { c as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
1
|
+
var pt = Object.defineProperty;
|
|
2
|
+
var gt = (r, e, t) => e in r ? pt(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
3
|
+
var W = (r, e, t) => gt(r, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { jsx as N, jsxs as Xe } from "react/jsx-runtime";
|
|
5
|
+
import { c as F } from "react/compiler-runtime";
|
|
6
|
+
import { useEffect as B, useImperativeHandle as xe, useMemo as J, useCallback as G, useState as ee, createContext as Ue, useContext as qe, useRef as ve } from "react";
|
|
7
|
+
import { MapProvider as yt, Map as ht, useMap as St } from "react-map-gl/maplibre";
|
|
8
|
+
import vt from "@deck.gl/react";
|
|
9
|
+
import { useMap as Je, APIProvider as bt, Map as Mt } from "@vis.gl/react-google-maps";
|
|
10
|
+
import { GoogleMapsOverlay as _t } from "@deck.gl/google-maps";
|
|
11
|
+
import { CompositeMode as Lt, TranslateMode as Tt, ModifyMode as Et, DrawPolygonByDraggingMode as kt, DrawCircleFromCenterMode as et, DrawRectangleMode as Pt, DrawPolygonMode as Ct, EditableGeoJsonLayer as wt, MeasureAreaMode as Ft, getPickedEditHandle as Ot, MeasureDistanceMode as Dt, ViewMode as At } from "@deck.gl-community/editable-layers";
|
|
12
|
+
import { DataFilterExtension as Rt, MaskExtension as $t } from "@deck.gl/extensions";
|
|
13
|
+
import { create as tt, createStore as Ve, useStore as je } from "zustand";
|
|
14
|
+
import { FlyToInterpolator as xt, WebMercatorViewport as Ut } from "@deck.gl/core";
|
|
15
|
+
import { EventManager as qt } from "mjolnir.js";
|
|
16
|
+
import { GeoJsonLayer as Vt } from "@deck.gl/layers";
|
|
17
|
+
import { useShallow as st } from "zustand/shallow";
|
|
18
|
+
import { area as Ne, centroid as jt, lineIntersect as Nt } from "@turf/turf";
|
|
19
|
+
import { formatNumber as nt, formatCurrency as It } from "@carto/ps-utils";
|
|
20
|
+
import Ht from "convert-units";
|
|
21
|
+
import Bt from "convert-units/definitions/length";
|
|
22
|
+
import { removeFilter as Gt, addFilter as zt, WidgetRasterSource as Qt, WidgetTilesetSource as Zt, TileFormat as Kt, WidgetTableSource as Wt, WidgetQuerySource as Yt, createViewportSpatialFilter as Xt } from "@carto/api-client";
|
|
23
|
+
import { useQuery as te } from "@tanstack/react-query";
|
|
22
24
|
import Jt from "html2canvas";
|
|
23
25
|
import { multiPolygon as es } from "@turf/helpers";
|
|
24
|
-
const
|
|
26
|
+
const we = {
|
|
25
27
|
roadmap: "roadmap",
|
|
26
28
|
satellite: "satellite",
|
|
27
29
|
hybrid: "hybrid"
|
|
28
|
-
},
|
|
30
|
+
}, K = {
|
|
29
31
|
darkMatter: "darkMatter",
|
|
30
32
|
positron: "positron",
|
|
31
33
|
voyager: "voyager"
|
|
32
|
-
},
|
|
33
|
-
[
|
|
34
|
-
[
|
|
35
|
-
[
|
|
36
|
-
},
|
|
34
|
+
}, Fe = {
|
|
35
|
+
[K.positron]: "https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",
|
|
36
|
+
[K.voyager]: "https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",
|
|
37
|
+
[K.darkMatter]: "https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json"
|
|
38
|
+
}, Y = {
|
|
37
39
|
maplibre: "maplibre",
|
|
38
40
|
googleMaps: "google-maps"
|
|
39
|
-
},
|
|
40
|
-
[
|
|
41
|
-
url:
|
|
42
|
-
type:
|
|
41
|
+
}, ue = {
|
|
42
|
+
[K.positron]: {
|
|
43
|
+
url: Fe[K.positron],
|
|
44
|
+
type: Y.maplibre
|
|
43
45
|
},
|
|
44
|
-
[
|
|
45
|
-
url:
|
|
46
|
-
type:
|
|
46
|
+
[K.voyager]: {
|
|
47
|
+
url: Fe[K.voyager],
|
|
48
|
+
type: Y.maplibre
|
|
47
49
|
},
|
|
48
|
-
[
|
|
49
|
-
url:
|
|
50
|
-
type:
|
|
50
|
+
[K.darkMatter]: {
|
|
51
|
+
url: Fe[K.darkMatter],
|
|
52
|
+
type: Y.maplibre,
|
|
51
53
|
dark: !0
|
|
52
54
|
},
|
|
53
|
-
[
|
|
54
|
-
type:
|
|
55
|
+
[we.roadmap]: {
|
|
56
|
+
type: Y.googleMaps
|
|
55
57
|
},
|
|
56
|
-
[
|
|
57
|
-
type:
|
|
58
|
+
[we.satellite]: {
|
|
59
|
+
type: Y.googleMaps
|
|
58
60
|
},
|
|
59
|
-
[
|
|
60
|
-
type:
|
|
61
|
+
[we.hybrid]: {
|
|
62
|
+
type: Y.googleMaps
|
|
61
63
|
}
|
|
62
64
|
};
|
|
63
65
|
function ts({
|
|
64
|
-
isDragging:
|
|
66
|
+
isDragging: r,
|
|
65
67
|
isHovering: e
|
|
66
68
|
}) {
|
|
67
|
-
return
|
|
69
|
+
return r ? "grabbing" : e ? "pointer" : "grab";
|
|
68
70
|
}
|
|
69
|
-
function ss(
|
|
70
|
-
return
|
|
71
|
-
html: `<div class='map-tooltip__content'>${
|
|
71
|
+
function ss(r) {
|
|
72
|
+
return r.html ? {
|
|
73
|
+
html: `<div class='map-tooltip__content'>${r.html}</div>`,
|
|
72
74
|
style: {
|
|
73
75
|
padding: "0",
|
|
74
76
|
background: "none"
|
|
75
77
|
}
|
|
76
78
|
} : null;
|
|
77
79
|
}
|
|
78
|
-
function ns(
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
80
|
+
function ns(r) {
|
|
81
|
+
const e = F(42);
|
|
82
|
+
let t, n, s, o, i, a, c, d, l, p, f, u;
|
|
83
|
+
e[0] !== r ? ({
|
|
84
|
+
instanceRef: i,
|
|
85
|
+
overlayRef: p,
|
|
86
|
+
controller: t,
|
|
87
|
+
id: o,
|
|
88
|
+
layers: a,
|
|
89
|
+
mapStyle: c,
|
|
90
|
+
parameters: f,
|
|
91
|
+
getCursor: n,
|
|
92
|
+
getTooltip: s,
|
|
93
|
+
onLoad: d,
|
|
94
|
+
onViewStateChange: l,
|
|
95
|
+
...u
|
|
96
|
+
} = r, e[0] = r, e[1] = t, e[2] = n, e[3] = s, e[4] = o, e[5] = i, e[6] = a, e[7] = c, e[8] = d, e[9] = l, e[10] = p, e[11] = f, e[12] = u) : (t = e[1], n = e[2], s = e[3], o = e[4], i = e[5], a = e[6], c = e[7], d = e[8], l = e[9], p = e[10], f = e[11], u = e[12]);
|
|
97
|
+
let y, m;
|
|
98
|
+
e[13] !== d ? (y = () => {
|
|
99
|
+
d({
|
|
100
|
+
type: "load",
|
|
101
|
+
value: !1
|
|
102
|
+
}), d({
|
|
103
|
+
type: "deckgl",
|
|
104
|
+
value: !1
|
|
105
|
+
});
|
|
106
|
+
}, m = [d], e[13] = d, e[14] = y, e[15] = m) : (y = e[14], m = e[15]), B(y, m);
|
|
107
|
+
let L, h;
|
|
108
|
+
e[16] !== a ? (h = a.filter(is).map(rs), e[16] = a, e[17] = h) : h = e[17], L = h;
|
|
109
|
+
const g = L, S = i;
|
|
102
110
|
let v;
|
|
103
|
-
e[
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
APIProviderProps: L,
|
|
110
|
-
...E
|
|
111
|
-
} = v, e[19] = v, e[20] = L, e[21] = E, e[22] = F) : (L = e[20], E = e[21], F = e[22]);
|
|
112
|
-
const O = u === void 0 ? ts : u, D = g === void 0 ? ss : g, U = f === void 0 ? ls : f;
|
|
113
|
-
let V;
|
|
114
|
-
e[23] === Symbol.for("react.memo_cache_sentinel") ? (V = [!1, !1], e[23] = V) : V = e[23];
|
|
115
|
-
const [b, P] = fe(V);
|
|
116
|
-
let C;
|
|
117
|
-
e[24] !== b ? (C = b.every(as), e[24] = b, e[25] = C) : C = e[25];
|
|
118
|
-
const A = C;
|
|
119
|
-
let x;
|
|
120
|
-
e[26] !== s ? (x = (he) => {
|
|
121
|
-
s == null || s(he);
|
|
122
|
-
}, e[26] = s, e[27] = x) : x = e[27];
|
|
123
|
-
const B = x, {
|
|
124
|
-
url: N,
|
|
125
|
-
type: G
|
|
126
|
-
} = nt[M], I = G === ue.googleMaps;
|
|
127
|
-
let be, te;
|
|
128
|
-
e[28] !== S ? (te = S.filter(rs).map(is), e[28] = S, e[29] = te) : te = e[29], be = te;
|
|
129
|
-
const ge = be;
|
|
130
|
-
let oe;
|
|
131
|
-
e[30] !== I || e[31] !== U ? (oe = (he) => {
|
|
132
|
-
const we = I ? {
|
|
133
|
-
...he,
|
|
134
|
-
viewState: Pt(he)
|
|
135
|
-
} : he;
|
|
136
|
-
U(we);
|
|
137
|
-
}, e[30] = I, e[31] = U, e[32] = oe) : oe = e[32];
|
|
138
|
-
const ie = oe;
|
|
139
|
-
let Z;
|
|
140
|
-
e[33] === Symbol.for("react.memo_cache_sentinel") ? (Z = (he) => {
|
|
141
|
-
const we = he.type === "deckgl" ? 0 : 1;
|
|
142
|
-
P((ft) => ft.map((mt, pt) => pt === we ? !0 : mt));
|
|
143
|
-
}, e[33] = Z) : Z = e[33];
|
|
144
|
-
const re = Z;
|
|
145
|
-
let ae, le;
|
|
146
|
-
e[34] !== A || e[35] !== n ? (ae = () => {
|
|
147
|
-
n == null || n(A);
|
|
148
|
-
}, le = [A, n], e[34] = A, e[35] = n, e[36] = ae, e[37] = le) : (ae = e[36], le = e[37]), Y(ae, le);
|
|
149
|
-
let se;
|
|
150
|
-
e[38] === Symbol.for("react.memo_cache_sentinel") ? (se = () => re({
|
|
151
|
-
type: "deckgl"
|
|
152
|
-
}), e[38] = se) : se = e[38];
|
|
153
|
-
let X;
|
|
154
|
-
e[39] !== r ? (X = {
|
|
111
|
+
e[18] !== d ? (v = () => d({
|
|
112
|
+
type: "deckgl",
|
|
113
|
+
value: !0
|
|
114
|
+
}), e[18] = d, e[19] = v) : v = e[19];
|
|
115
|
+
let b;
|
|
116
|
+
e[20] !== f ? (b = {
|
|
155
117
|
depthTest: !1,
|
|
156
|
-
...
|
|
157
|
-
}, e[
|
|
158
|
-
let
|
|
159
|
-
e[
|
|
160
|
-
let
|
|
161
|
-
e[
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
},
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
J
|
|
173
|
-
] }) }) }), e[49] = ge, e[50] = h, e[51] = O, e[52] = D, e[53] = B, e[54] = ie, e[55] = y, e[56] = t, e[57] = a, e[58] = X, e[59] = z, e[60] = J, e[61] = W) : W = e[61];
|
|
174
|
-
let ce;
|
|
175
|
-
return e[62] !== L || e[63] !== F || e[64] !== W ? (ce = /* @__PURE__ */ H(_t, { apiKey: F, ...L, children: W }), e[62] = L, e[63] = F, e[64] = W, e[65] = ce) : ce = e[65], ce;
|
|
118
|
+
...f
|
|
119
|
+
}, e[20] = f, e[21] = b) : b = e[21];
|
|
120
|
+
let _;
|
|
121
|
+
e[22] !== p ? (_ = /* @__PURE__ */ N(as, { overlayRef: p }), e[22] = p, e[23] = _) : _ = e[23];
|
|
122
|
+
let E;
|
|
123
|
+
e[24] !== d ? (E = () => d({
|
|
124
|
+
type: "load",
|
|
125
|
+
value: !0
|
|
126
|
+
}), e[24] = d, e[25] = E) : E = e[25];
|
|
127
|
+
let P;
|
|
128
|
+
e[26] !== c || e[27] !== E ? (P = /* @__PURE__ */ N(ht, { reuseMaps: !0, mapStyle: c, onLoad: E, onRender: os }), e[26] = c, e[27] = E, e[28] = P) : P = e[28];
|
|
129
|
+
let O;
|
|
130
|
+
return e[29] !== g || e[30] !== t || e[31] !== n || e[32] !== s || e[33] !== o || e[34] !== l || e[35] !== u || e[36] !== P || e[37] !== S || e[38] !== v || e[39] !== b || e[40] !== _ ? (O = /* @__PURE__ */ N(yt, { children: /* @__PURE__ */ N("div", { className: "deckgl-map", children: /* @__PURE__ */ Xe(vt, { controller: t, id: o, ref: S, layers: g, getCursor: n, getTooltip: s, onLoad: v, onViewStateChange: l, parameters: b, ...u, children: [
|
|
131
|
+
_,
|
|
132
|
+
P
|
|
133
|
+
] }) }) }), e[29] = g, e[30] = t, e[31] = n, e[32] = s, e[33] = o, e[34] = l, e[35] = u, e[36] = P, e[37] = S, e[38] = v, e[39] = b, e[40] = _, e[41] = O) : O = e[41], O;
|
|
176
134
|
}
|
|
177
135
|
function os() {
|
|
178
|
-
const
|
|
179
|
-
|
|
136
|
+
const r = document.querySelector(".maplibregl-compact-show");
|
|
137
|
+
r == null || r.classList.remove("maplibregl-compact-show");
|
|
180
138
|
}
|
|
181
|
-
function
|
|
139
|
+
function rs(r) {
|
|
182
140
|
const {
|
|
183
141
|
type: e,
|
|
184
142
|
props: t
|
|
185
|
-
} =
|
|
143
|
+
} = r;
|
|
186
144
|
return new e(t);
|
|
187
145
|
}
|
|
188
|
-
function
|
|
189
|
-
return !!(
|
|
190
|
-
}
|
|
191
|
-
function as(o) {
|
|
192
|
-
return o;
|
|
146
|
+
function is(r) {
|
|
147
|
+
return !!(r != null && r.type);
|
|
193
148
|
}
|
|
194
|
-
function
|
|
195
|
-
|
|
196
|
-
}
|
|
197
|
-
function cs(o) {
|
|
198
|
-
const e = k(4), {
|
|
149
|
+
function as(r) {
|
|
150
|
+
const e = F(3), {
|
|
199
151
|
overlayRef: t
|
|
200
|
-
} =
|
|
152
|
+
} = r, {
|
|
201
153
|
default: n
|
|
202
|
-
} =
|
|
203
|
-
let
|
|
204
|
-
return e[0] !==
|
|
154
|
+
} = St();
|
|
155
|
+
let s, o;
|
|
156
|
+
return e[0] !== n ? (s = () => n, o = [n], e[0] = n, e[1] = s, e[2] = o) : (s = e[1], o = e[2]), xe(t, s, o), null;
|
|
157
|
+
}
|
|
158
|
+
const ls = (r) => {
|
|
159
|
+
const e = F(9);
|
|
160
|
+
let t, n;
|
|
161
|
+
e[0] === Symbol.for("react.memo_cache_sentinel") ? (n = new _t({
|
|
162
|
+
interleaved: !0
|
|
163
|
+
}), e[0] = n) : n = e[0], t = n;
|
|
164
|
+
const s = t, o = Je();
|
|
165
|
+
let i, a;
|
|
166
|
+
e[1] === Symbol.for("react.memo_cache_sentinel") ? (i = () => s, a = [s], e[1] = i, e[2] = a) : (i = e[1], a = e[2]), xe(r.instanceRef, i, a);
|
|
167
|
+
let c, d;
|
|
168
|
+
e[3] !== o ? (c = () => (s.setMap(o), () => {
|
|
169
|
+
s.finalize();
|
|
170
|
+
}), d = [s, o], e[3] = o, e[4] = c, e[5] = d) : (c = e[4], d = e[5]), B(c, d);
|
|
171
|
+
let l, p;
|
|
172
|
+
return e[6] !== r ? (l = () => {
|
|
173
|
+
s.setProps(r);
|
|
174
|
+
}, p = [s, r], e[6] = r, e[7] = l, e[8] = p) : (l = e[7], p = e[8]), B(l, p), null;
|
|
175
|
+
};
|
|
176
|
+
function cs({
|
|
177
|
+
id: r,
|
|
178
|
+
instanceRef: e,
|
|
179
|
+
basemap: t,
|
|
180
|
+
layers: n,
|
|
181
|
+
gmapsProps: {
|
|
182
|
+
apiKey: s,
|
|
183
|
+
APIProviderProps: o,
|
|
184
|
+
...i
|
|
185
|
+
} = {
|
|
186
|
+
apiKey: ""
|
|
187
|
+
},
|
|
188
|
+
overlayRef: a,
|
|
189
|
+
parameters: c,
|
|
190
|
+
onLoad: d,
|
|
191
|
+
onViewStateChange: l,
|
|
192
|
+
...p
|
|
193
|
+
}) {
|
|
194
|
+
var m, L, h;
|
|
195
|
+
B(() => {
|
|
196
|
+
d({
|
|
197
|
+
type: "load",
|
|
198
|
+
value: !1
|
|
199
|
+
}), d({
|
|
200
|
+
type: "deckgl",
|
|
201
|
+
value: !1
|
|
202
|
+
});
|
|
203
|
+
}, [d]);
|
|
204
|
+
const f = J(() => n.filter((g) => !!(g != null && g.type)).map(({
|
|
205
|
+
type: g,
|
|
206
|
+
props: S
|
|
207
|
+
}) => new g(S)), [n]), u = G(({
|
|
208
|
+
detail: {
|
|
209
|
+
center: g,
|
|
210
|
+
zoom: S,
|
|
211
|
+
heading: v,
|
|
212
|
+
tilt: b
|
|
213
|
+
}
|
|
214
|
+
}) => ({
|
|
215
|
+
latitude: g.lat,
|
|
216
|
+
longitude: g.lng,
|
|
217
|
+
zoom: S - 1,
|
|
218
|
+
bearing: v,
|
|
219
|
+
pitch: b
|
|
220
|
+
}), []), y = G((g) => {
|
|
221
|
+
const S = e == null ? void 0 : e.current, v = S == null ? void 0 : S._deck, b = {
|
|
222
|
+
// @ts-expect-error accessing protected props
|
|
223
|
+
...v == null ? void 0 : v.viewState,
|
|
224
|
+
...g
|
|
225
|
+
}, _ = {
|
|
226
|
+
latitude: b.latitude,
|
|
227
|
+
longitude: b.longitude,
|
|
228
|
+
zoom: b.zoom,
|
|
229
|
+
pitch: b.pitch,
|
|
230
|
+
bearing: b.bearing,
|
|
231
|
+
// @ts-expect-error - `width` and `height` is not in the types
|
|
232
|
+
width: v == null ? void 0 : v.width,
|
|
233
|
+
height: v == null ? void 0 : v.height
|
|
234
|
+
};
|
|
235
|
+
l == null || l({
|
|
236
|
+
viewState: _,
|
|
237
|
+
interactionState: {
|
|
238
|
+
isZooming: !0
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
}, [e, l]);
|
|
242
|
+
return /* @__PURE__ */ N(bt, { apiKey: s, ...o, children: /* @__PURE__ */ N("div", { className: "deckgl-map", children: /* @__PURE__ */ Xe(Mt, { mapTypeId: t, disableDefaultUI: !0, gestureHandling: "greedy", ...i, defaultCenter: {
|
|
243
|
+
lat: ((m = p.initialViewState) == null ? void 0 : m.latitude) ?? 0,
|
|
244
|
+
lng: ((L = p.initialViewState) == null ? void 0 : L.longitude) ?? 0
|
|
245
|
+
}, defaultZoom: (((h = p.initialViewState) == null ? void 0 : h.zoom) ?? 0) + 1, onTilesLoaded: () => {
|
|
246
|
+
d({
|
|
247
|
+
type: "load",
|
|
248
|
+
value: !0
|
|
249
|
+
}), y(p.initialViewState);
|
|
250
|
+
}, onBoundsChanged: (g) => y(u(g)), onZoomChanged: (g) => y(u(g)), children: [
|
|
251
|
+
/* @__PURE__ */ N(us, { overlayRef: a }),
|
|
252
|
+
/* @__PURE__ */ N(ls, { id: r, instanceRef: e, layers: f, onLoad: () => {
|
|
253
|
+
d({
|
|
254
|
+
type: "deckgl",
|
|
255
|
+
value: !0
|
|
256
|
+
});
|
|
257
|
+
}, parameters: {
|
|
258
|
+
// @ts-expect-error - `depthTest` is not in the types
|
|
259
|
+
depthTest: !1,
|
|
260
|
+
...c
|
|
261
|
+
}, ...p })
|
|
262
|
+
] }) }) });
|
|
263
|
+
}
|
|
264
|
+
function us(r) {
|
|
265
|
+
const e = F(3), {
|
|
266
|
+
overlayRef: t
|
|
267
|
+
} = r, n = Je();
|
|
268
|
+
let s, o;
|
|
269
|
+
return e[0] !== n ? (s = () => n, o = [n], e[0] = n, e[1] = s, e[2] = o) : (s = e[1], o = e[2]), xe(t, s, o), null;
|
|
270
|
+
}
|
|
271
|
+
function ds(r) {
|
|
272
|
+
const e = F(46);
|
|
273
|
+
let t, n, s, o, i, a, c, d, l, p, f, u;
|
|
274
|
+
e[0] !== r ? ({
|
|
275
|
+
instanceRef: n,
|
|
276
|
+
overlayRef: o,
|
|
277
|
+
basemap: a,
|
|
278
|
+
controller: c,
|
|
279
|
+
id: d,
|
|
280
|
+
layers: l,
|
|
281
|
+
gmapsProps: t,
|
|
282
|
+
getCursor: p,
|
|
283
|
+
getTooltip: f,
|
|
284
|
+
onLoad: s,
|
|
285
|
+
onViewStateChange: u,
|
|
286
|
+
...i
|
|
287
|
+
} = r, e[0] = r, e[1] = t, e[2] = n, e[3] = s, e[4] = o, e[5] = i, e[6] = a, e[7] = c, e[8] = d, e[9] = l, e[10] = p, e[11] = f, e[12] = u) : (t = e[1], n = e[2], s = e[3], o = e[4], i = e[5], a = e[6], c = e[7], d = e[8], l = e[9], p = e[10], f = e[11], u = e[12]);
|
|
288
|
+
const y = a === void 0 ? K.positron : a, m = c === void 0 ? !0 : c, L = d === void 0 ? "deck-gl-map" : d;
|
|
289
|
+
let h;
|
|
290
|
+
e[13] !== l ? (h = l === void 0 ? [] : l, e[13] = l, e[14] = h) : h = e[14];
|
|
291
|
+
const g = h, S = p === void 0 ? ts : p, v = f === void 0 ? ss : f, b = u === void 0 ? ms : u;
|
|
292
|
+
let _;
|
|
293
|
+
e[15] === Symbol.for("react.memo_cache_sentinel") ? (_ = [!1, !1], e[15] = _) : _ = e[15];
|
|
294
|
+
const [E, P] = ee(_);
|
|
295
|
+
let O;
|
|
296
|
+
e[16] !== E ? (O = E.every(fs), e[16] = E, e[17] = O) : O = e[17];
|
|
297
|
+
const R = O, {
|
|
298
|
+
url: x,
|
|
299
|
+
type: j
|
|
300
|
+
} = ue[y], q = j === Y.googleMaps;
|
|
301
|
+
let M;
|
|
302
|
+
e[18] === Symbol.for("react.memo_cache_sentinel") ? (M = ($) => {
|
|
303
|
+
const Z = $.type === "deckgl" ? 0 : 1;
|
|
304
|
+
P((H) => H.map((X, re) => re === Z ? $.value : X));
|
|
305
|
+
}, e[18] = M) : M = e[18];
|
|
306
|
+
const T = M;
|
|
307
|
+
let C, w;
|
|
308
|
+
if (e[19] !== R || e[20] !== s ? (C = () => {
|
|
309
|
+
s == null || s(R);
|
|
310
|
+
}, w = [R, s], e[19] = R, e[20] = s, e[21] = C, e[22] = w) : (C = e[21], w = e[22]), B(C, w), q) {
|
|
311
|
+
let $;
|
|
312
|
+
return e[23] !== y || e[24] !== m || e[25] !== S || e[26] !== v || e[27] !== t || e[28] !== L || e[29] !== n || e[30] !== g || e[31] !== b || e[32] !== o || e[33] !== i ? ($ = /* @__PURE__ */ N(cs, { instanceRef: n, overlayRef: o, controller: m, id: L, basemap: y, layers: g, gmapsProps: t, getCursor: S, getTooltip: v, onLoad: T, onViewStateChange: b, ...i }), e[23] = y, e[24] = m, e[25] = S, e[26] = v, e[27] = t, e[28] = L, e[29] = n, e[30] = g, e[31] = b, e[32] = o, e[33] = i, e[34] = $) : $ = e[34], $;
|
|
313
|
+
}
|
|
314
|
+
let A;
|
|
315
|
+
return e[35] !== m || e[36] !== S || e[37] !== v || e[38] !== L || e[39] !== n || e[40] !== g || e[41] !== x || e[42] !== b || e[43] !== o || e[44] !== i ? (A = /* @__PURE__ */ N(ns, { instanceRef: n, overlayRef: o, controller: m, id: L, layers: g, mapStyle: x, getCursor: S, getTooltip: v, onLoad: T, onViewStateChange: b, ...i }), e[35] = m, e[36] = S, e[37] = v, e[38] = L, e[39] = n, e[40] = g, e[41] = x, e[42] = b, e[43] = o, e[44] = i, e[45] = A) : A = e[45], A;
|
|
316
|
+
}
|
|
317
|
+
function fs(r) {
|
|
318
|
+
return r;
|
|
205
319
|
}
|
|
206
|
-
|
|
320
|
+
function ms() {
|
|
321
|
+
return null;
|
|
322
|
+
}
|
|
323
|
+
const Q = {
|
|
207
324
|
addFeature: "addFeature",
|
|
208
325
|
addTentativePosition: "addTentativePosition",
|
|
209
326
|
updateTentativeFeature: "updateTentativeFeature",
|
|
@@ -211,20 +328,20 @@ const K = {
|
|
|
211
328
|
finish: "finish",
|
|
212
329
|
addPosition: "addPosition"
|
|
213
330
|
};
|
|
214
|
-
class
|
|
331
|
+
class ps extends Lt {
|
|
215
332
|
constructor() {
|
|
216
|
-
super([new
|
|
333
|
+
super([new Tt(), new Et()]);
|
|
217
334
|
}
|
|
218
335
|
handleKeyUp(e, t) {
|
|
219
336
|
super.handleKeyUp(e, t), e.key === "Enter" && (this.resetClickSequence(), t.onEdit({
|
|
220
337
|
updatedData: t.data,
|
|
221
|
-
editType:
|
|
338
|
+
editType: Q.addFeature,
|
|
222
339
|
editContext: {}
|
|
223
340
|
}));
|
|
224
341
|
}
|
|
225
342
|
}
|
|
226
|
-
const
|
|
227
|
-
id:
|
|
343
|
+
const ae = "lassoLayer", be = "maskLayer", gs = {
|
|
344
|
+
id: ae,
|
|
228
345
|
billboard: !1,
|
|
229
346
|
editHandlePointRadiusUnits: "pixels",
|
|
230
347
|
editHandlePointRadiusMinPixels: 1,
|
|
@@ -236,7 +353,7 @@ const Te = "lassoLayer", ke = "maskLayer", ds = {
|
|
|
236
353
|
lineWidthUnits: "pixels",
|
|
237
354
|
getLineWidth: 2,
|
|
238
355
|
lineWidthMinPixels: 2
|
|
239
|
-
},
|
|
356
|
+
}, Ie = {
|
|
240
357
|
editing: {
|
|
241
358
|
border: [3, 111, 226, 255],
|
|
242
359
|
fill: [3, 111, 226, 20.4],
|
|
@@ -246,49 +363,49 @@ const Te = "lassoLayer", ke = "maskLayer", ds = {
|
|
|
246
363
|
border: [71, 219, 153, 255],
|
|
247
364
|
fill: [71, 219, 153, 0]
|
|
248
365
|
}
|
|
249
|
-
},
|
|
366
|
+
}, Oe = {
|
|
250
367
|
styles: {
|
|
251
368
|
colors: {
|
|
252
|
-
editing:
|
|
253
|
-
finished:
|
|
369
|
+
editing: Ie.editing,
|
|
370
|
+
finished: Ie.finished
|
|
254
371
|
}
|
|
255
372
|
},
|
|
256
373
|
labels: {
|
|
257
374
|
mask: "Mask"
|
|
258
375
|
}
|
|
259
|
-
},
|
|
376
|
+
}, ys = [new Rt({
|
|
260
377
|
filterSize: 1
|
|
261
|
-
})],
|
|
262
|
-
id:
|
|
378
|
+
})], Se = {
|
|
379
|
+
id: be,
|
|
263
380
|
operation: "mask",
|
|
264
381
|
pickable: !1,
|
|
265
382
|
visible: !0,
|
|
266
|
-
extensions:
|
|
383
|
+
extensions: ys,
|
|
267
384
|
filterRange: [1, 1]
|
|
268
|
-
},
|
|
385
|
+
}, De = {
|
|
269
386
|
polygon: {
|
|
270
387
|
value: "polygon",
|
|
271
|
-
mode:
|
|
388
|
+
mode: Ct
|
|
272
389
|
},
|
|
273
390
|
rectangle: {
|
|
274
391
|
value: "rectangle",
|
|
275
|
-
mode:
|
|
392
|
+
mode: Pt
|
|
276
393
|
},
|
|
277
394
|
circle: {
|
|
278
395
|
value: "circle",
|
|
279
|
-
mode:
|
|
396
|
+
mode: et
|
|
280
397
|
},
|
|
281
398
|
lasso: {
|
|
282
399
|
value: "lasso",
|
|
283
|
-
mode:
|
|
400
|
+
mode: kt
|
|
284
401
|
},
|
|
285
402
|
edit: {
|
|
286
403
|
value: "edit",
|
|
287
|
-
mode:
|
|
404
|
+
mode: ps
|
|
288
405
|
}
|
|
289
|
-
},
|
|
406
|
+
}, de = tt((r) => ({
|
|
290
407
|
layers: {},
|
|
291
|
-
setLayer: (e, t) =>
|
|
408
|
+
setLayer: (e, t) => r((n) => {
|
|
292
409
|
var a;
|
|
293
410
|
const s = {
|
|
294
411
|
...n.layers
|
|
@@ -297,42 +414,41 @@ const Te = "lassoLayer", ke = "maskLayer", ds = {
|
|
|
297
414
|
return delete s[e], {
|
|
298
415
|
layers: s
|
|
299
416
|
};
|
|
300
|
-
const
|
|
417
|
+
const o = s[e] ?? {
|
|
301
418
|
type: null,
|
|
302
419
|
props: {}
|
|
303
|
-
},
|
|
420
|
+
}, i = [...o.props.extensions ?? [], ...((a = t.props) == null ? void 0 : a.extensions) ?? []].reduce((c, d) => (c.some((l) => l.equals(d)) || c.push(d), c), []);
|
|
304
421
|
return s[e] = {
|
|
305
|
-
...
|
|
422
|
+
...o,
|
|
306
423
|
...t,
|
|
307
424
|
props: {
|
|
308
425
|
id: e,
|
|
309
|
-
...
|
|
426
|
+
...o.props,
|
|
310
427
|
...t.props,
|
|
311
|
-
extensions:
|
|
428
|
+
extensions: i
|
|
312
429
|
},
|
|
313
430
|
legend: {
|
|
314
|
-
...
|
|
431
|
+
...o.legend,
|
|
315
432
|
...t.legend
|
|
316
433
|
}
|
|
317
434
|
}, {
|
|
318
435
|
layers: s
|
|
319
436
|
};
|
|
320
437
|
})
|
|
321
|
-
})),
|
|
438
|
+
})), hs = {
|
|
322
439
|
transitionDuration: "auto",
|
|
323
|
-
transitionInterpolator: new
|
|
440
|
+
transitionInterpolator: new xt({
|
|
324
441
|
curve: 2
|
|
325
442
|
})
|
|
326
|
-
},
|
|
327
|
-
const e =
|
|
443
|
+
}, Ss = (r) => {
|
|
444
|
+
const e = r.reduce((t, n) => {
|
|
328
445
|
const {
|
|
329
446
|
id: s,
|
|
330
|
-
basemap:
|
|
447
|
+
basemap: o
|
|
331
448
|
} = n;
|
|
332
449
|
return t[s] = {
|
|
333
450
|
isLoaded: !1,
|
|
334
|
-
|
|
335
|
-
basemap: i,
|
|
451
|
+
basemap: o,
|
|
336
452
|
instanceRef: {
|
|
337
453
|
current: {}
|
|
338
454
|
},
|
|
@@ -344,81 +460,101 @@ const Te = "lassoLayer", ke = "maskLayer", ds = {
|
|
|
344
460
|
}, {});
|
|
345
461
|
return (t, n) => ({
|
|
346
462
|
maps: e,
|
|
347
|
-
setBasemap: (s,
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
463
|
+
setBasemap: (s, o) => t((i) => {
|
|
464
|
+
var l;
|
|
465
|
+
const {
|
|
466
|
+
type: a
|
|
467
|
+
} = ue[i.maps[s].basemap], {
|
|
468
|
+
type: c
|
|
469
|
+
} = ue[o], d = a === c && !!((l = i.maps[s]) != null && l.isLoaded);
|
|
470
|
+
return {
|
|
471
|
+
maps: {
|
|
472
|
+
...i.maps,
|
|
473
|
+
[s]: {
|
|
474
|
+
...i.maps[s],
|
|
475
|
+
isLoaded: d,
|
|
476
|
+
basemap: o
|
|
477
|
+
}
|
|
362
478
|
}
|
|
363
|
-
}
|
|
364
|
-
})
|
|
365
|
-
|
|
479
|
+
};
|
|
480
|
+
}),
|
|
481
|
+
setLoad: (s, o) => t((i) => ({
|
|
366
482
|
maps: {
|
|
367
|
-
...
|
|
483
|
+
...i.maps,
|
|
368
484
|
[s]: {
|
|
369
|
-
...
|
|
370
|
-
|
|
485
|
+
...i.maps[s],
|
|
486
|
+
isLoaded: o
|
|
371
487
|
}
|
|
372
488
|
}
|
|
373
489
|
})),
|
|
374
490
|
getOverlayInstance: (s) => {
|
|
375
|
-
var
|
|
376
|
-
return (a = (
|
|
491
|
+
var i, a;
|
|
492
|
+
return (a = (i = n().maps[s]) == null ? void 0 : i.overlayRef) == null ? void 0 : a.current;
|
|
377
493
|
},
|
|
378
494
|
getDeckInstance: (s) => {
|
|
379
|
-
var
|
|
380
|
-
|
|
495
|
+
var a, c;
|
|
496
|
+
const i = (c = (a = n().maps[s]) == null ? void 0 : a.instanceRef) == null ? void 0 : c.current;
|
|
497
|
+
return (
|
|
498
|
+
// @ts-expect-error accessing protected props
|
|
499
|
+
(i == null ? void 0 : i.deck) ?? i._deck
|
|
500
|
+
);
|
|
381
501
|
},
|
|
382
502
|
getViewState: (s) => {
|
|
383
|
-
const
|
|
384
|
-
return
|
|
503
|
+
const i = n().getDeckInstance(s);
|
|
504
|
+
return i == null ? void 0 : i.viewState;
|
|
385
505
|
},
|
|
386
|
-
getViewports: (s,
|
|
506
|
+
getViewports: (s, o) => {
|
|
387
507
|
const a = n().getDeckInstance(s);
|
|
388
|
-
return a == null ? void 0 : a.getViewports(
|
|
508
|
+
return a == null ? void 0 : a.getViewports(o);
|
|
389
509
|
},
|
|
390
|
-
getViewport: (s,
|
|
391
|
-
var
|
|
392
|
-
const
|
|
393
|
-
return (
|
|
510
|
+
getViewport: (s, o = 0, i) => {
|
|
511
|
+
var d;
|
|
512
|
+
const c = n().getDeckInstance(s);
|
|
513
|
+
return (d = c == null ? void 0 : c.getViewports(i)) == null ? void 0 : d[o];
|
|
394
514
|
},
|
|
395
|
-
addLayers: (s,
|
|
396
|
-
var
|
|
515
|
+
addLayers: (s, o) => t((i) => {
|
|
516
|
+
var l;
|
|
397
517
|
const a = {
|
|
398
|
-
...
|
|
399
|
-
},
|
|
518
|
+
...i.maps
|
|
519
|
+
}, c = ((l = a[s]) == null ? void 0 : l.layers) ?? [], d = /* @__PURE__ */ new Set([...c, ...o]);
|
|
400
520
|
return a[s] = {
|
|
401
521
|
...a[s],
|
|
402
|
-
layers: [...
|
|
522
|
+
layers: [...d]
|
|
403
523
|
}, {
|
|
404
524
|
maps: a
|
|
405
525
|
};
|
|
406
526
|
}),
|
|
407
|
-
removeLayers: (s,
|
|
408
|
-
var
|
|
527
|
+
removeLayers: (s, o) => t((i) => {
|
|
528
|
+
var d;
|
|
409
529
|
const a = {
|
|
410
|
-
...
|
|
411
|
-
},
|
|
530
|
+
...i.maps
|
|
531
|
+
}, c = ((d = a[s]) == null ? void 0 : d.layers) ?? [];
|
|
412
532
|
return a[s] = {
|
|
413
533
|
...a[s],
|
|
414
|
-
layers:
|
|
534
|
+
layers: c.filter((l) => !o.includes(l))
|
|
415
535
|
}, {
|
|
416
536
|
maps: a
|
|
417
537
|
};
|
|
418
538
|
})
|
|
419
539
|
});
|
|
420
|
-
},
|
|
421
|
-
const e =
|
|
540
|
+
}, vs = (r) => {
|
|
541
|
+
const e = r.reduce((t, n) => {
|
|
542
|
+
const {
|
|
543
|
+
id: s
|
|
544
|
+
} = n;
|
|
545
|
+
return t[s] = !1, t;
|
|
546
|
+
}, {});
|
|
547
|
+
return (t) => ({
|
|
548
|
+
areLayersLoaded: e,
|
|
549
|
+
setLayersLoad: (n, s) => t((o) => ({
|
|
550
|
+
areLayersLoaded: {
|
|
551
|
+
...o.areLayersLoaded,
|
|
552
|
+
[n]: s
|
|
553
|
+
}
|
|
554
|
+
}))
|
|
555
|
+
});
|
|
556
|
+
}, bs = (r) => {
|
|
557
|
+
const e = r.reduce((t, n) => (n.viewState && (t.viewStates[n.id] = n.viewState, t.viewports[n.id] = null), t), {
|
|
422
558
|
viewStates: {},
|
|
423
559
|
viewports: {}
|
|
424
560
|
});
|
|
@@ -426,200 +562,239 @@ const Te = "lassoLayer", ke = "maskLayer", ds = {
|
|
|
426
562
|
viewports: e.viewports,
|
|
427
563
|
updateViewPort: (s) => {
|
|
428
564
|
var a;
|
|
429
|
-
const
|
|
430
|
-
if (!((a =
|
|
431
|
-
const
|
|
432
|
-
t((
|
|
565
|
+
const o = n();
|
|
566
|
+
if (!((a = o.maps[s]) != null && a.isLoaded)) return;
|
|
567
|
+
const i = new Ut(o.viewStates[s]);
|
|
568
|
+
t((c) => ({
|
|
433
569
|
viewports: {
|
|
434
|
-
...
|
|
435
|
-
[s]:
|
|
570
|
+
...c.viewports,
|
|
571
|
+
[s]: i
|
|
436
572
|
}
|
|
437
573
|
}));
|
|
438
574
|
},
|
|
439
575
|
viewStates: e.viewStates,
|
|
440
|
-
setViewState: (s,
|
|
576
|
+
setViewState: (s, o) => t((i) => ({
|
|
441
577
|
viewStates: {
|
|
442
|
-
...
|
|
578
|
+
...i.viewStates,
|
|
443
579
|
[s]: {
|
|
444
|
-
...
|
|
445
|
-
...
|
|
580
|
+
...i.viewStates[s],
|
|
581
|
+
...o
|
|
446
582
|
}
|
|
447
583
|
}
|
|
448
584
|
})),
|
|
449
|
-
setZoom: (s,
|
|
585
|
+
setZoom: (s, o) => t((i) => ({
|
|
450
586
|
viewStates: {
|
|
451
|
-
...
|
|
587
|
+
...i.viewStates,
|
|
452
588
|
[s]: {
|
|
453
|
-
...
|
|
454
|
-
zoom:
|
|
589
|
+
...i.viewStates[s],
|
|
590
|
+
zoom: o
|
|
455
591
|
}
|
|
456
592
|
}
|
|
457
593
|
})),
|
|
458
|
-
setMinZoom: (s,
|
|
594
|
+
setMinZoom: (s, o) => t((i) => ({
|
|
459
595
|
viewStates: {
|
|
460
|
-
...
|
|
596
|
+
...i.viewStates,
|
|
461
597
|
[s]: {
|
|
462
|
-
...
|
|
463
|
-
minZoom:
|
|
598
|
+
...i.viewStates[s],
|
|
599
|
+
minZoom: o
|
|
464
600
|
}
|
|
465
601
|
}
|
|
466
602
|
})),
|
|
467
|
-
setMaxZoom: (s,
|
|
603
|
+
setMaxZoom: (s, o) => t((i) => ({
|
|
468
604
|
viewStates: {
|
|
469
|
-
...
|
|
605
|
+
...i.viewStates,
|
|
470
606
|
[s]: {
|
|
471
|
-
...
|
|
472
|
-
maxZoom:
|
|
607
|
+
...i.viewStates[s],
|
|
608
|
+
maxZoom: o
|
|
473
609
|
}
|
|
474
610
|
}
|
|
475
611
|
}))
|
|
476
612
|
});
|
|
477
|
-
},
|
|
613
|
+
}, Ms = (r, e) => ({
|
|
478
614
|
fitBounds: (t, n, s) => {
|
|
479
|
-
const
|
|
480
|
-
if (!
|
|
481
|
-
const
|
|
482
|
-
...
|
|
615
|
+
const o = e(), i = o.getViewport(t);
|
|
616
|
+
if (!i) return;
|
|
617
|
+
const c = {
|
|
618
|
+
...i == null ? void 0 : i.fitBounds(n, s == null ? void 0 : s.boundsOptions),
|
|
483
619
|
...s == null ? void 0 : s.viewStateOptions
|
|
484
620
|
};
|
|
485
|
-
|
|
621
|
+
o.setViewState(t, c);
|
|
486
622
|
},
|
|
487
623
|
flyTo: (t, n, s = {}) => {
|
|
488
|
-
const
|
|
489
|
-
if (!
|
|
624
|
+
const o = e();
|
|
625
|
+
if (!o.getViewport(t)) return;
|
|
490
626
|
const a = {
|
|
491
|
-
...
|
|
627
|
+
...hs,
|
|
492
628
|
...s == null ? void 0 : s.viewStateOptions
|
|
493
|
-
},
|
|
629
|
+
}, c = {
|
|
494
630
|
...n,
|
|
495
631
|
...a
|
|
496
632
|
};
|
|
497
|
-
|
|
633
|
+
o.setViewState(t, c);
|
|
498
634
|
}
|
|
499
|
-
}),
|
|
500
|
-
...
|
|
501
|
-
...
|
|
502
|
-
...
|
|
635
|
+
}), _s = (r) => Ve()((...e) => ({
|
|
636
|
+
...Ss(r)(...e),
|
|
637
|
+
...vs(r)(...e),
|
|
638
|
+
...bs(r)(...e),
|
|
639
|
+
...Ms(...e)
|
|
503
640
|
})), ot = Ue({});
|
|
504
|
-
function
|
|
505
|
-
const e =
|
|
641
|
+
function Ls(r) {
|
|
642
|
+
const e = F(5), {
|
|
506
643
|
children: t,
|
|
507
644
|
values: n
|
|
508
|
-
} =
|
|
645
|
+
} = r;
|
|
509
646
|
let s;
|
|
510
|
-
e[0] !== n ? (s =
|
|
511
|
-
const [
|
|
512
|
-
let
|
|
513
|
-
return e[2] !== t || e[3] !==
|
|
647
|
+
e[0] !== n ? (s = _s(n), e[0] = n, e[1] = s) : s = e[1];
|
|
648
|
+
const [o] = ee(s);
|
|
649
|
+
let i;
|
|
650
|
+
return e[2] !== t || e[3] !== o ? (i = /* @__PURE__ */ N(ot.Provider, { value: o, children: t }), e[2] = t, e[3] = o, e[4] = i) : i = e[4], i;
|
|
514
651
|
}
|
|
515
|
-
function
|
|
516
|
-
const e =
|
|
652
|
+
function D(r) {
|
|
653
|
+
const e = qe(ot);
|
|
517
654
|
if (!Object.keys(e).length)
|
|
518
655
|
throw new Error("Missing MapProvider in the tree");
|
|
519
|
-
return je(e,
|
|
656
|
+
return je(e, r);
|
|
520
657
|
}
|
|
521
|
-
function
|
|
522
|
-
return
|
|
658
|
+
function Ts(r) {
|
|
659
|
+
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
523
660
|
}
|
|
524
|
-
var
|
|
525
|
-
function
|
|
526
|
-
if (He) return
|
|
661
|
+
var Ae, He;
|
|
662
|
+
function Es() {
|
|
663
|
+
if (He) return Ae;
|
|
527
664
|
He = 1;
|
|
528
|
-
var
|
|
529
|
-
return e(
|
|
665
|
+
var r = function(g) {
|
|
666
|
+
return e(g) && !t(g);
|
|
530
667
|
};
|
|
531
668
|
function e(h) {
|
|
532
669
|
return !!h && typeof h == "object";
|
|
533
670
|
}
|
|
534
671
|
function t(h) {
|
|
535
|
-
var
|
|
536
|
-
return
|
|
672
|
+
var g = Object.prototype.toString.call(h);
|
|
673
|
+
return g === "[object RegExp]" || g === "[object Date]" || o(h);
|
|
537
674
|
}
|
|
538
675
|
var n = typeof Symbol == "function" && Symbol.for, s = n ? Symbol.for("react.element") : 60103;
|
|
539
|
-
function
|
|
676
|
+
function o(h) {
|
|
540
677
|
return h.$$typeof === s;
|
|
541
678
|
}
|
|
542
|
-
function
|
|
679
|
+
function i(h) {
|
|
543
680
|
return Array.isArray(h) ? [] : {};
|
|
544
681
|
}
|
|
545
|
-
function a(h,
|
|
546
|
-
return
|
|
682
|
+
function a(h, g) {
|
|
683
|
+
return g.clone !== !1 && g.isMergeableObject(h) ? m(i(h), h, g) : h;
|
|
547
684
|
}
|
|
548
|
-
function
|
|
549
|
-
return h.concat(
|
|
550
|
-
return a(
|
|
685
|
+
function c(h, g, S) {
|
|
686
|
+
return h.concat(g).map(function(v) {
|
|
687
|
+
return a(v, S);
|
|
551
688
|
});
|
|
552
689
|
}
|
|
553
|
-
function
|
|
554
|
-
if (!
|
|
555
|
-
return
|
|
556
|
-
var
|
|
557
|
-
return typeof
|
|
690
|
+
function d(h, g) {
|
|
691
|
+
if (!g.customMerge)
|
|
692
|
+
return m;
|
|
693
|
+
var S = g.customMerge(h);
|
|
694
|
+
return typeof S == "function" ? S : m;
|
|
558
695
|
}
|
|
559
|
-
function
|
|
560
|
-
return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(h).filter(function(
|
|
561
|
-
return Object.propertyIsEnumerable.call(h,
|
|
696
|
+
function l(h) {
|
|
697
|
+
return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(h).filter(function(g) {
|
|
698
|
+
return Object.propertyIsEnumerable.call(h, g);
|
|
562
699
|
}) : [];
|
|
563
700
|
}
|
|
564
701
|
function p(h) {
|
|
565
|
-
return Object.keys(h).concat(
|
|
702
|
+
return Object.keys(h).concat(l(h));
|
|
566
703
|
}
|
|
567
|
-
function
|
|
704
|
+
function f(h, g) {
|
|
568
705
|
try {
|
|
569
|
-
return
|
|
706
|
+
return g in h;
|
|
570
707
|
} catch {
|
|
571
708
|
return !1;
|
|
572
709
|
}
|
|
573
710
|
}
|
|
574
|
-
function u(h,
|
|
575
|
-
return
|
|
711
|
+
function u(h, g) {
|
|
712
|
+
return f(h, g) && !(Object.hasOwnProperty.call(h, g) && Object.propertyIsEnumerable.call(h, g));
|
|
576
713
|
}
|
|
577
|
-
function
|
|
578
|
-
var
|
|
579
|
-
return
|
|
580
|
-
|
|
581
|
-
}), p(
|
|
582
|
-
u(h,
|
|
583
|
-
}),
|
|
714
|
+
function y(h, g, S) {
|
|
715
|
+
var v = {};
|
|
716
|
+
return S.isMergeableObject(h) && p(h).forEach(function(b) {
|
|
717
|
+
v[b] = a(h[b], S);
|
|
718
|
+
}), p(g).forEach(function(b) {
|
|
719
|
+
u(h, b) || (f(h, b) && S.isMergeableObject(g[b]) ? v[b] = d(b, S)(h[b], g[b], S) : v[b] = a(g[b], S));
|
|
720
|
+
}), v;
|
|
584
721
|
}
|
|
585
|
-
function
|
|
586
|
-
|
|
587
|
-
var
|
|
588
|
-
return
|
|
722
|
+
function m(h, g, S) {
|
|
723
|
+
S = S || {}, S.arrayMerge = S.arrayMerge || c, S.isMergeableObject = S.isMergeableObject || r, S.cloneUnlessOtherwiseSpecified = a;
|
|
724
|
+
var v = Array.isArray(g), b = Array.isArray(h), _ = v === b;
|
|
725
|
+
return _ ? v ? S.arrayMerge(h, g, S) : y(h, g, S) : a(g, S);
|
|
589
726
|
}
|
|
590
|
-
|
|
591
|
-
if (!Array.isArray(
|
|
727
|
+
m.all = function(g, S) {
|
|
728
|
+
if (!Array.isArray(g))
|
|
592
729
|
throw new Error("first argument should be an array");
|
|
593
|
-
return
|
|
594
|
-
return
|
|
730
|
+
return g.reduce(function(v, b) {
|
|
731
|
+
return m(v, b, S);
|
|
595
732
|
}, {});
|
|
596
733
|
};
|
|
597
|
-
var
|
|
598
|
-
return
|
|
599
|
-
}
|
|
600
|
-
var
|
|
601
|
-
const
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
734
|
+
var L = m;
|
|
735
|
+
return Ae = L, Ae;
|
|
736
|
+
}
|
|
737
|
+
var ks = Es();
|
|
738
|
+
const le = /* @__PURE__ */ Ts(ks), Be = ["anyclick", "pointermove", "panstart", "panmove", "panend", "keyup"];
|
|
739
|
+
class rt extends wt {
|
|
740
|
+
updateState({
|
|
741
|
+
props: e,
|
|
742
|
+
oldProps: t,
|
|
743
|
+
context: n,
|
|
744
|
+
changeFlags: s
|
|
745
|
+
}) {
|
|
746
|
+
e.eventManager !== t.eventManager && (this._removeEventHandlers(e.eventManager), this._removeEventHandlers(t.eventManager), this._addEventHandlers()), super.updateState({
|
|
747
|
+
props: e,
|
|
748
|
+
oldProps: t,
|
|
749
|
+
context: n,
|
|
750
|
+
changeFlags: s
|
|
751
|
+
});
|
|
752
|
+
}
|
|
753
|
+
_addEventHandlers() {
|
|
754
|
+
const e = this._getEventManager(), {
|
|
755
|
+
eventHandler: t
|
|
756
|
+
} = this.state._editableLayerState;
|
|
757
|
+
for (const n of Be)
|
|
758
|
+
e.on(n, t, {
|
|
759
|
+
// give nebula a higher priority so that it can stop propagation to deck.gl's map panning handlers
|
|
760
|
+
priority: 100
|
|
761
|
+
});
|
|
762
|
+
}
|
|
763
|
+
_removeEventHandlers(e) {
|
|
764
|
+
const t = e ?? this._getEventManager(), {
|
|
765
|
+
eventHandler: n
|
|
766
|
+
} = this.state._editableLayerState;
|
|
767
|
+
for (const s of Be)
|
|
768
|
+
t.off(s, n);
|
|
769
|
+
}
|
|
770
|
+
_getEventManager() {
|
|
771
|
+
return this.props.eventManager ?? // @ts-expect-error accessing protected props
|
|
772
|
+
this.context.deck.eventManager;
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
function Ps({
|
|
776
|
+
mode: r,
|
|
777
|
+
eventManager: e,
|
|
778
|
+
...t
|
|
605
779
|
}) {
|
|
606
|
-
const
|
|
780
|
+
const n = Cs(t);
|
|
607
781
|
return {
|
|
608
|
-
type:
|
|
782
|
+
type: rt,
|
|
609
783
|
props: {
|
|
610
|
-
...
|
|
611
|
-
|
|
784
|
+
...n,
|
|
785
|
+
eventManager: e,
|
|
786
|
+
mode: r
|
|
612
787
|
}
|
|
613
788
|
};
|
|
614
789
|
}
|
|
615
|
-
function
|
|
616
|
-
layerProps:
|
|
790
|
+
function Cs({
|
|
791
|
+
layerProps: r,
|
|
617
792
|
onEdit: e,
|
|
618
793
|
getLineColor: t,
|
|
619
794
|
getFillColor: n,
|
|
620
795
|
pointColor: s
|
|
621
796
|
}) {
|
|
622
|
-
const
|
|
797
|
+
const o = le(r, {
|
|
623
798
|
modeConfig: {
|
|
624
799
|
// // We force distance due to conversion is addressed at feature getText level
|
|
625
800
|
// formatTooltip: (_distance: number) => {
|
|
@@ -628,82 +803,82 @@ function Ls({
|
|
|
628
803
|
preventOverlappingLines: !0
|
|
629
804
|
},
|
|
630
805
|
onEdit: e
|
|
631
|
-
}),
|
|
806
|
+
}), i = le(gs, {
|
|
632
807
|
getTentativeLineColor: t,
|
|
633
808
|
getTentativeFillColor: n,
|
|
634
809
|
getLineColor: t,
|
|
635
810
|
getFillColor: n,
|
|
636
811
|
getEditHandlePointColor: s.fill,
|
|
637
812
|
getEditHandlePointOutlineColor: s.outline,
|
|
638
|
-
dataComparator: (
|
|
813
|
+
dataComparator: (c, d) => c.features[0] === d.features[0]
|
|
639
814
|
});
|
|
640
|
-
return
|
|
815
|
+
return le(i, o);
|
|
641
816
|
}
|
|
642
|
-
const
|
|
643
|
-
data:
|
|
817
|
+
const ws = (r) => Ve()((e) => ({
|
|
818
|
+
data: r.reduce((n, s) => {
|
|
644
819
|
const {
|
|
645
|
-
enabled:
|
|
646
|
-
mapId:
|
|
647
|
-
modeInstance: a = new
|
|
648
|
-
modes:
|
|
649
|
-
modeSelected:
|
|
650
|
-
values:
|
|
820
|
+
enabled: o = !1,
|
|
821
|
+
mapId: i,
|
|
822
|
+
modeInstance: a = new De.polygon.mode(),
|
|
823
|
+
modes: c = De,
|
|
824
|
+
modeSelected: d = De.polygon.value,
|
|
825
|
+
values: l = {}
|
|
651
826
|
} = s;
|
|
652
|
-
return n[
|
|
653
|
-
enabled:
|
|
827
|
+
return n[i] = {
|
|
828
|
+
enabled: o,
|
|
654
829
|
modeInstance: a,
|
|
655
|
-
modes:
|
|
656
|
-
modeSelected:
|
|
657
|
-
values:
|
|
830
|
+
modes: c,
|
|
831
|
+
modeSelected: d,
|
|
832
|
+
values: l
|
|
658
833
|
}, n;
|
|
659
834
|
}, {}),
|
|
660
835
|
setEnabled: (n, s) => {
|
|
661
|
-
e((
|
|
836
|
+
e((o) => ({
|
|
662
837
|
data: {
|
|
663
|
-
...
|
|
838
|
+
...o.data,
|
|
664
839
|
[n]: {
|
|
665
|
-
...
|
|
840
|
+
...o.data[n],
|
|
666
841
|
enabled: s,
|
|
667
842
|
visible: s
|
|
668
843
|
}
|
|
669
844
|
}
|
|
670
845
|
}));
|
|
671
846
|
},
|
|
672
|
-
setValue: (n, s,
|
|
673
|
-
e((
|
|
847
|
+
setValue: (n, s, o) => {
|
|
848
|
+
e((i) => {
|
|
674
849
|
const a = {
|
|
675
|
-
...
|
|
676
|
-
},
|
|
850
|
+
...i.data[n].values
|
|
851
|
+
}, c = a[s] ?? {
|
|
677
852
|
type: "mask"
|
|
678
853
|
};
|
|
679
854
|
return a[s] = {
|
|
680
|
-
...
|
|
681
|
-
...
|
|
855
|
+
...c,
|
|
856
|
+
...o,
|
|
682
857
|
id: s
|
|
683
|
-
},
|
|
858
|
+
}, o || delete a[s], {
|
|
684
859
|
data: {
|
|
685
|
-
...
|
|
860
|
+
...i.data,
|
|
686
861
|
[n]: {
|
|
687
|
-
...
|
|
862
|
+
...i.data[n],
|
|
688
863
|
values: a
|
|
689
864
|
}
|
|
690
865
|
}
|
|
691
866
|
};
|
|
692
867
|
});
|
|
693
868
|
},
|
|
694
|
-
setVisibility: (n, s,
|
|
695
|
-
e((
|
|
869
|
+
setVisibility: (n, s, o) => {
|
|
870
|
+
e((i) => {
|
|
696
871
|
const a = {
|
|
697
|
-
...
|
|
698
|
-
},
|
|
699
|
-
return
|
|
872
|
+
...i.data[n].values
|
|
873
|
+
}, c = a[s] ?? {};
|
|
874
|
+
return c.properties.visible = o, {
|
|
700
875
|
data: {
|
|
701
|
-
...
|
|
876
|
+
...i.data,
|
|
702
877
|
[n]: {
|
|
703
|
-
...
|
|
878
|
+
...i.data[n],
|
|
704
879
|
values: {
|
|
705
880
|
...a,
|
|
706
|
-
[s]:
|
|
881
|
+
[s]: c
|
|
707
882
|
}
|
|
708
883
|
}
|
|
709
884
|
}
|
|
@@ -711,137 +886,137 @@ const _s = (o) => Ve()((e) => ({
|
|
|
711
886
|
});
|
|
712
887
|
},
|
|
713
888
|
setModeSelected: (n, s) => {
|
|
714
|
-
e((
|
|
889
|
+
e((o) => ({
|
|
715
890
|
data: {
|
|
716
|
-
...
|
|
891
|
+
...o.data,
|
|
717
892
|
[n]: {
|
|
718
|
-
...
|
|
893
|
+
...o.data[n],
|
|
719
894
|
modeSelected: s
|
|
720
895
|
}
|
|
721
896
|
}
|
|
722
897
|
}));
|
|
723
898
|
},
|
|
724
899
|
setModeInstance: (n, s) => {
|
|
725
|
-
e((
|
|
900
|
+
e((o) => ({
|
|
726
901
|
data: {
|
|
727
|
-
...
|
|
902
|
+
...o.data,
|
|
728
903
|
[n]: {
|
|
729
|
-
...
|
|
904
|
+
...o.data[n],
|
|
730
905
|
modeInstance: s
|
|
731
906
|
}
|
|
732
907
|
}
|
|
733
908
|
}));
|
|
734
909
|
}
|
|
735
910
|
})), it = Ue({});
|
|
736
|
-
function
|
|
737
|
-
const e =
|
|
911
|
+
function Fs(r) {
|
|
912
|
+
const e = F(5), {
|
|
738
913
|
children: t,
|
|
739
914
|
values: n
|
|
740
|
-
} =
|
|
915
|
+
} = r;
|
|
741
916
|
let s;
|
|
742
|
-
e[0] !== n ? (s = () =>
|
|
743
|
-
const [
|
|
744
|
-
let
|
|
745
|
-
return e[2] !== t || e[3] !==
|
|
917
|
+
e[0] !== n ? (s = () => ws(n), e[0] = n, e[1] = s) : s = e[1];
|
|
918
|
+
const [o] = ee(s);
|
|
919
|
+
let i;
|
|
920
|
+
return e[2] !== t || e[3] !== o ? (i = /* @__PURE__ */ N(it.Provider, { value: o, children: t }), e[2] = t, e[3] = o, e[4] = i) : i = e[4], i;
|
|
746
921
|
}
|
|
747
|
-
function
|
|
748
|
-
const e =
|
|
922
|
+
function I(r) {
|
|
923
|
+
const e = qe(it);
|
|
749
924
|
if (!Object.keys(e).length)
|
|
750
925
|
throw new Error("Missing LassoToolsProvider in the tree");
|
|
751
|
-
return je(e,
|
|
926
|
+
return je(e, r);
|
|
752
927
|
}
|
|
753
|
-
function
|
|
754
|
-
mapId:
|
|
928
|
+
function Os({
|
|
929
|
+
mapId: r,
|
|
755
930
|
children: e
|
|
756
931
|
}) {
|
|
757
|
-
const t =
|
|
758
|
-
var
|
|
759
|
-
return (
|
|
760
|
-
}), n =
|
|
761
|
-
var
|
|
762
|
-
return (
|
|
763
|
-
}),
|
|
764
|
-
var
|
|
765
|
-
return (
|
|
766
|
-
}),
|
|
767
|
-
var
|
|
768
|
-
return (
|
|
769
|
-
}),
|
|
770
|
-
|
|
771
|
-
const u =
|
|
932
|
+
const t = I((u) => {
|
|
933
|
+
var y;
|
|
934
|
+
return (y = u.data[r]) == null ? void 0 : y.enabled;
|
|
935
|
+
}), n = I((u) => u.setEnabled), s = I((u) => {
|
|
936
|
+
var y;
|
|
937
|
+
return (y = u.data[r]) == null ? void 0 : y.values;
|
|
938
|
+
}), o = I((u) => u.setValue), i = I((u) => u.setVisibility), a = I((u) => {
|
|
939
|
+
var y;
|
|
940
|
+
return (y = u.data[r]) == null ? void 0 : y.modeSelected;
|
|
941
|
+
}), c = I((u) => u.setModeSelected), d = I((u) => {
|
|
942
|
+
var y;
|
|
943
|
+
return (y = u.data[r]) == null ? void 0 : y.modes;
|
|
944
|
+
}), l = I((u) => u.setModeInstance);
|
|
945
|
+
B(() => {
|
|
946
|
+
const u = d[a];
|
|
772
947
|
if (u && t) {
|
|
773
|
-
const
|
|
774
|
-
|
|
948
|
+
const y = u.mode;
|
|
949
|
+
l(r, new y());
|
|
775
950
|
}
|
|
776
|
-
}, [t,
|
|
951
|
+
}, [t, r, a, d, l]);
|
|
777
952
|
const [
|
|
778
953
|
p
|
|
779
954
|
// , draw
|
|
780
|
-
] =
|
|
781
|
-
const u = (
|
|
955
|
+
] = J(() => {
|
|
956
|
+
const u = (L) => {
|
|
782
957
|
var h;
|
|
783
958
|
return {
|
|
784
|
-
id:
|
|
785
|
-
visible:
|
|
786
|
-
label: (h =
|
|
959
|
+
id: L.id,
|
|
960
|
+
visible: L.properties.visible,
|
|
961
|
+
label: (h = L.properties) == null ? void 0 : h.label
|
|
787
962
|
};
|
|
788
963
|
};
|
|
789
964
|
return [
|
|
790
|
-
Object.values(s).filter((
|
|
965
|
+
Object.values(s).filter((L) => L.type === "mask").map(u)
|
|
791
966
|
// , draw
|
|
792
967
|
];
|
|
793
|
-
}, [s]),
|
|
794
|
-
n(
|
|
795
|
-
}, [
|
|
968
|
+
}, [s]), f = G((u) => {
|
|
969
|
+
n(r, !!u), c(r, u);
|
|
970
|
+
}, [r, n, c]);
|
|
796
971
|
return e({
|
|
797
|
-
mapId:
|
|
972
|
+
mapId: r,
|
|
798
973
|
enabled: t,
|
|
799
|
-
modes:
|
|
974
|
+
modes: d,
|
|
800
975
|
modeSelected: a,
|
|
801
976
|
values: {
|
|
802
977
|
mask: p
|
|
803
978
|
// draw,
|
|
804
979
|
},
|
|
805
|
-
setValue:
|
|
806
|
-
setEnabled:
|
|
807
|
-
setVisibility:
|
|
808
|
-
setModeSelected:
|
|
980
|
+
setValue: G((u) => o(r, u), [r, o]),
|
|
981
|
+
setEnabled: G((u) => n(r, u), [r, n]),
|
|
982
|
+
setVisibility: G((u, y) => i(r, u, y), [r, i]),
|
|
983
|
+
setModeSelected: f
|
|
809
984
|
});
|
|
810
985
|
}
|
|
811
|
-
function
|
|
812
|
-
values:
|
|
986
|
+
function at({
|
|
987
|
+
values: r
|
|
813
988
|
}) {
|
|
814
|
-
return Object.values(
|
|
989
|
+
return Object.values(r ?? {}).filter((e) => e.type === "mask");
|
|
815
990
|
}
|
|
816
|
-
const
|
|
817
|
-
length:
|
|
991
|
+
const Ds = Ht({
|
|
992
|
+
length: Bt
|
|
818
993
|
});
|
|
819
|
-
function
|
|
820
|
-
return
|
|
994
|
+
function Ge(r, e) {
|
|
995
|
+
return Ds(r).from(Ze[U.meter]).to(Ze[e]);
|
|
821
996
|
}
|
|
822
|
-
const
|
|
823
|
-
function
|
|
824
|
-
meters:
|
|
997
|
+
const ze = 1e4;
|
|
998
|
+
function Me({
|
|
999
|
+
meters: r,
|
|
825
1000
|
unit: e,
|
|
826
1001
|
locale: t,
|
|
827
1002
|
options: {
|
|
828
1003
|
autoSplitNumber: n,
|
|
829
1004
|
...s
|
|
830
1005
|
} = {
|
|
831
|
-
autoSplitNumber:
|
|
1006
|
+
autoSplitNumber: ze
|
|
832
1007
|
}
|
|
833
1008
|
}) {
|
|
834
|
-
const
|
|
835
|
-
let
|
|
1009
|
+
const o = e === $e["m-km"], i = e === $e["ft-mi"], a = o || i;
|
|
1010
|
+
let c, d;
|
|
836
1011
|
if (a) {
|
|
837
|
-
const
|
|
838
|
-
let p =
|
|
839
|
-
|
|
1012
|
+
const l = r < (n ?? ze);
|
|
1013
|
+
let p = l ? U.meter : U.kilometer;
|
|
1014
|
+
c = l ? ce.meter : ce.kilometer, i && (c = l ? ce.feet : ce.mile, p = l ? U.feet : U.mile), d = Ge(r, p);
|
|
840
1015
|
} else
|
|
841
|
-
|
|
842
|
-
return `${
|
|
1016
|
+
c = ce[e], d = Ge(r, e);
|
|
1017
|
+
return `${nt(d, t, {
|
|
843
1018
|
style: "unit",
|
|
844
|
-
unit:
|
|
1019
|
+
unit: c,
|
|
845
1020
|
unitDisplay: "short",
|
|
846
1021
|
notation: "standard",
|
|
847
1022
|
minimumFractionDigits: 2,
|
|
@@ -849,18 +1024,18 @@ function Ce({
|
|
|
849
1024
|
...s
|
|
850
1025
|
})}`;
|
|
851
1026
|
}
|
|
852
|
-
function
|
|
1027
|
+
function lo(r, {
|
|
853
1028
|
hasDoubleClickZoom: e
|
|
854
1029
|
}) {
|
|
855
|
-
return typeof
|
|
1030
|
+
return typeof r == "boolean" ? {
|
|
856
1031
|
doubleClickZoom: e
|
|
857
1032
|
} : {
|
|
858
|
-
...
|
|
1033
|
+
...r,
|
|
859
1034
|
doubleClickZoom: e
|
|
860
1035
|
};
|
|
861
1036
|
}
|
|
862
|
-
function
|
|
863
|
-
if (
|
|
1037
|
+
function lt(r, e, t) {
|
|
1038
|
+
if (r > 0) {
|
|
864
1039
|
const {
|
|
865
1040
|
formatTooltip: n,
|
|
866
1041
|
turfOptions: s
|
|
@@ -868,26 +1043,26 @@ function at(o, e, t) {
|
|
|
868
1043
|
turfOptions: {
|
|
869
1044
|
units: "kilometers"
|
|
870
1045
|
}
|
|
871
|
-
},
|
|
872
|
-
let
|
|
873
|
-
n ?
|
|
1046
|
+
}, o = s == null ? void 0 : s.units;
|
|
1047
|
+
let i;
|
|
1048
|
+
n ? i = n(r) : i = `${parseFloat(r.toString()).toFixed(2)} ${o}`;
|
|
874
1049
|
const {
|
|
875
1050
|
measurementCallback: a
|
|
876
1051
|
} = t;
|
|
877
|
-
return a && a(
|
|
1052
|
+
return a && a(r), [{
|
|
878
1053
|
position: e,
|
|
879
|
-
text:
|
|
1054
|
+
text: i
|
|
880
1055
|
}];
|
|
881
1056
|
}
|
|
882
1057
|
return [];
|
|
883
1058
|
}
|
|
884
|
-
class
|
|
1059
|
+
class As extends Ft {
|
|
885
1060
|
constructor() {
|
|
886
1061
|
super(...arguments);
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
1062
|
+
W(this, "_isMeasuringSessionFinished", !1);
|
|
1063
|
+
W(this, "area", 0);
|
|
1064
|
+
W(this, "tooltips", []);
|
|
1065
|
+
W(this, "resultPolygon", {
|
|
891
1066
|
type: "FeatureCollection",
|
|
892
1067
|
features: []
|
|
893
1068
|
});
|
|
@@ -896,12 +1071,12 @@ class Cs extends Rt {
|
|
|
896
1071
|
this._isMeasuringSessionFinished && (this._isMeasuringSessionFinished = !1, this.resetClickSequence(), this.area = 0);
|
|
897
1072
|
const {
|
|
898
1073
|
picks: s
|
|
899
|
-
} = t,
|
|
1074
|
+
} = t, o = Ot(s), i = this.getClickSequence();
|
|
900
1075
|
let a = !1;
|
|
901
|
-
!
|
|
1076
|
+
!o && !this.allowOverlapping(n) && (this.addClickSequence(t), a = !0), this.area = Ne({
|
|
902
1077
|
type: "Polygon",
|
|
903
1078
|
coordinates: [this.getClickSequence()]
|
|
904
|
-
}), this.isFinalizedEdition(
|
|
1079
|
+
}), this.isFinalizedEdition(i, o) ? this.finalizeEdition(n) : a && n.onEdit({
|
|
905
1080
|
// data is the same
|
|
906
1081
|
updatedData: n.data,
|
|
907
1082
|
editType: "addTentativePosition",
|
|
@@ -919,8 +1094,8 @@ class Cs extends Rt {
|
|
|
919
1094
|
super.handlePointerMove(t, n);
|
|
920
1095
|
const s = this.getTentativeGuide(n);
|
|
921
1096
|
if (s && s.geometry.type === "Polygon") {
|
|
922
|
-
const
|
|
923
|
-
this.area =
|
|
1097
|
+
const o = jt(s);
|
|
1098
|
+
this.area = Ne(s), this.tooltips = lt(this.area, o.geometry.coordinates, n.modeConfig);
|
|
924
1099
|
}
|
|
925
1100
|
}
|
|
926
1101
|
resetClickSequence() {
|
|
@@ -941,19 +1116,19 @@ class Cs extends Rt {
|
|
|
941
1116
|
return t.length > 2 && n !== void 0 && (s[0] === 0 || s[0] === t.length - 1);
|
|
942
1117
|
}
|
|
943
1118
|
allowOverlapping(t) {
|
|
944
|
-
var
|
|
1119
|
+
var o;
|
|
945
1120
|
let n = !1;
|
|
946
1121
|
const s = this.getClickSequence();
|
|
947
1122
|
if (s.length > 2 && // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
948
|
-
((
|
|
949
|
-
const
|
|
1123
|
+
((o = t.modeConfig) != null && o.preventOverlappingLines)) {
|
|
1124
|
+
const i = {
|
|
950
1125
|
type: "LineString",
|
|
951
1126
|
coordinates: [...s, s[0]]
|
|
952
1127
|
}, a = {
|
|
953
1128
|
type: "LineString",
|
|
954
1129
|
coordinates: [...s.slice(0, s.length - 1)]
|
|
955
1130
|
};
|
|
956
|
-
|
|
1131
|
+
Nt(i, a).features.length > 0 && (n = !0);
|
|
957
1132
|
}
|
|
958
1133
|
return n;
|
|
959
1134
|
}
|
|
@@ -966,12 +1141,12 @@ class Cs extends Rt {
|
|
|
966
1141
|
type: "FeatureCollection",
|
|
967
1142
|
features: []
|
|
968
1143
|
};
|
|
969
|
-
const
|
|
970
|
-
this._isMeasuringSessionFinished = !0,
|
|
971
|
-
...
|
|
972
|
-
editType:
|
|
1144
|
+
const o = this.getAddFeatureOrBooleanPolygonAction(s, t);
|
|
1145
|
+
this._isMeasuringSessionFinished = !0, o && (this.resultPolygon = o.updatedData, t.onEdit({
|
|
1146
|
+
...o,
|
|
1147
|
+
editType: Q.addPosition,
|
|
973
1148
|
editContext: {
|
|
974
|
-
...
|
|
1149
|
+
...o.editContext,
|
|
975
1150
|
distance: this.area,
|
|
976
1151
|
positions: this.getClickSequence(),
|
|
977
1152
|
finished: this._isMeasuringSessionFinished
|
|
@@ -990,32 +1165,32 @@ class Cs extends Rt {
|
|
|
990
1165
|
meters: t,
|
|
991
1166
|
locale: n,
|
|
992
1167
|
unit: s,
|
|
993
|
-
options:
|
|
1168
|
+
options: o
|
|
994
1169
|
}) {
|
|
995
|
-
return
|
|
1170
|
+
return Me({
|
|
996
1171
|
meters: t,
|
|
997
1172
|
locale: n,
|
|
998
1173
|
unit: s,
|
|
999
|
-
options:
|
|
1174
|
+
options: o
|
|
1000
1175
|
}) + "2";
|
|
1001
1176
|
}
|
|
1002
1177
|
}
|
|
1003
|
-
class
|
|
1178
|
+
class Rs extends et {
|
|
1004
1179
|
constructor() {
|
|
1005
1180
|
super(...arguments);
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1181
|
+
W(this, "_isMeasuringSessionFinished", !1);
|
|
1182
|
+
W(this, "_currentArea", 0);
|
|
1183
|
+
W(this, "resultPolygon", {
|
|
1009
1184
|
type: "FeatureCollection",
|
|
1010
1185
|
features: []
|
|
1011
1186
|
});
|
|
1012
|
-
|
|
1187
|
+
W(this, "tooltips", []);
|
|
1013
1188
|
}
|
|
1014
1189
|
handleClick(t, n) {
|
|
1015
1190
|
this._isMeasuringSessionFinished && (this._isMeasuringSessionFinished = !1, this.resetClickSequence(), this._currentArea = 0), super.handleClick(t, n);
|
|
1016
1191
|
}
|
|
1017
1192
|
handlePointerMove(t, n) {
|
|
1018
|
-
this._isMeasuringSessionFinished || (super.handlePointerMove(t, n), this.tooltips =
|
|
1193
|
+
this._isMeasuringSessionFinished || (super.handlePointerMove(t, n), this.tooltips = lt(this.areaCircle, this.position, n.modeConfig));
|
|
1019
1194
|
}
|
|
1020
1195
|
checkAndFinishPolygon(t) {
|
|
1021
1196
|
const n = this.getClickSequence(), s = this.getTentativeGuide(t);
|
|
@@ -1039,7 +1214,7 @@ class ws extends Xe {
|
|
|
1039
1214
|
const s = this.getAddFeatureOrBooleanPolygonAction(n, t);
|
|
1040
1215
|
this._isMeasuringSessionFinished = !0, t.onUpdateCursor("cell"), s && (this.resultPolygon = s.updatedData, t.onEdit({
|
|
1041
1216
|
...s,
|
|
1042
|
-
editType:
|
|
1217
|
+
editType: Q.addPosition,
|
|
1043
1218
|
editContext: {
|
|
1044
1219
|
...s.editContext,
|
|
1045
1220
|
distance: this._currentArea,
|
|
@@ -1066,22 +1241,22 @@ class ws extends Xe {
|
|
|
1066
1241
|
meters: t,
|
|
1067
1242
|
locale: n,
|
|
1068
1243
|
unit: s,
|
|
1069
|
-
options:
|
|
1244
|
+
options: o
|
|
1070
1245
|
}) {
|
|
1071
|
-
return
|
|
1246
|
+
return Me({
|
|
1072
1247
|
meters: t,
|
|
1073
1248
|
locale: n,
|
|
1074
1249
|
unit: s,
|
|
1075
|
-
options:
|
|
1250
|
+
options: o
|
|
1076
1251
|
}) + "2";
|
|
1077
1252
|
}
|
|
1078
1253
|
}
|
|
1079
|
-
class
|
|
1254
|
+
class ct extends Dt {
|
|
1080
1255
|
handleClick(e, t) {
|
|
1081
1256
|
super.handleClick(e, t), t.onEdit({
|
|
1082
1257
|
// data is the same
|
|
1083
1258
|
updatedData: t.data,
|
|
1084
|
-
editType:
|
|
1259
|
+
editType: Q.addPosition,
|
|
1085
1260
|
editContext: {
|
|
1086
1261
|
distance: this._currentDistance,
|
|
1087
1262
|
finished: this._isMeasuringSessionFinished,
|
|
@@ -1095,7 +1270,7 @@ class lt extends xt {
|
|
|
1095
1270
|
const {
|
|
1096
1271
|
key: n
|
|
1097
1272
|
} = e, s = this.getClickSequence().length;
|
|
1098
|
-
let
|
|
1273
|
+
let o = Q.finish;
|
|
1099
1274
|
switch (n) {
|
|
1100
1275
|
case "Escape":
|
|
1101
1276
|
t.onEdit({
|
|
@@ -1103,14 +1278,14 @@ class lt extends xt {
|
|
|
1103
1278
|
type: "FeatureCollection",
|
|
1104
1279
|
features: []
|
|
1105
1280
|
},
|
|
1106
|
-
editType:
|
|
1281
|
+
editType: Q.cancel,
|
|
1107
1282
|
editContext: {}
|
|
1108
1283
|
});
|
|
1109
1284
|
break;
|
|
1110
1285
|
case "Enter":
|
|
1111
|
-
this._isMeasuringSessionFinished = !0, s === 1 && (this.resetClickSequence(),
|
|
1286
|
+
this._isMeasuringSessionFinished = !0, s === 1 && (this.resetClickSequence(), o = Q.cancel), t.onUpdateCursor("cell"), t.onEdit({
|
|
1112
1287
|
updatedData: t.data,
|
|
1113
|
-
editType:
|
|
1288
|
+
editType: o,
|
|
1114
1289
|
editContext: {
|
|
1115
1290
|
finished: this._isMeasuringSessionFinished
|
|
1116
1291
|
}
|
|
@@ -1127,7 +1302,7 @@ class lt extends xt {
|
|
|
1127
1302
|
unit: n,
|
|
1128
1303
|
options: s
|
|
1129
1304
|
}) {
|
|
1130
|
-
return
|
|
1305
|
+
return Me({
|
|
1131
1306
|
meters: e,
|
|
1132
1307
|
locale: t,
|
|
1133
1308
|
unit: n,
|
|
@@ -1135,8 +1310,8 @@ class lt extends xt {
|
|
|
1135
1310
|
});
|
|
1136
1311
|
}
|
|
1137
1312
|
}
|
|
1138
|
-
const
|
|
1139
|
-
id:
|
|
1313
|
+
const oe = "mapMeasureLayer", $s = {
|
|
1314
|
+
id: oe,
|
|
1140
1315
|
pickable: !1,
|
|
1141
1316
|
billboard: !1,
|
|
1142
1317
|
editHandlePointRadiusUnits: "pixels",
|
|
@@ -1160,19 +1335,19 @@ const ve = "mapMeasureLayer", Fs = {
|
|
|
1160
1335
|
getLineWidth: 2
|
|
1161
1336
|
}
|
|
1162
1337
|
}
|
|
1163
|
-
},
|
|
1338
|
+
}, Re = {
|
|
1164
1339
|
editing: [23, 102, 214, 255],
|
|
1165
1340
|
finished: [71, 219, 153, 255],
|
|
1166
1341
|
point: [255, 255, 255, 255]
|
|
1167
|
-
},
|
|
1342
|
+
}, Qe = {
|
|
1168
1343
|
styles: {
|
|
1169
1344
|
colors: {
|
|
1170
|
-
editing:
|
|
1171
|
-
finished:
|
|
1172
|
-
point:
|
|
1345
|
+
editing: Re.editing,
|
|
1346
|
+
finished: Re.finished,
|
|
1347
|
+
point: Re.point
|
|
1173
1348
|
}
|
|
1174
1349
|
}
|
|
1175
|
-
},
|
|
1350
|
+
}, U = {
|
|
1176
1351
|
kilometer: "kilometer",
|
|
1177
1352
|
meter: "meter",
|
|
1178
1353
|
centimeter: "centimeter",
|
|
@@ -1180,31 +1355,31 @@ const ve = "mapMeasureLayer", Fs = {
|
|
|
1180
1355
|
mile: "mile",
|
|
1181
1356
|
yard: "yard",
|
|
1182
1357
|
feet: "feet"
|
|
1183
|
-
},
|
|
1358
|
+
}, $e = {
|
|
1184
1359
|
"m-km": "m-km",
|
|
1185
1360
|
"ft-mi": "ft-mi",
|
|
1186
|
-
...
|
|
1187
|
-
},
|
|
1361
|
+
...U
|
|
1362
|
+
}, xs = {
|
|
1188
1363
|
meters: "meters",
|
|
1189
1364
|
kilometer: "kilometers",
|
|
1190
1365
|
mile: "miles"
|
|
1191
1366
|
}, Ze = {
|
|
1192
|
-
[
|
|
1193
|
-
[
|
|
1194
|
-
[
|
|
1195
|
-
[
|
|
1196
|
-
[
|
|
1197
|
-
[
|
|
1198
|
-
[
|
|
1199
|
-
},
|
|
1200
|
-
[
|
|
1201
|
-
[
|
|
1202
|
-
[
|
|
1203
|
-
[
|
|
1204
|
-
[
|
|
1205
|
-
[
|
|
1206
|
-
[
|
|
1207
|
-
},
|
|
1367
|
+
[U.kilometer]: "km",
|
|
1368
|
+
[U.meter]: "m",
|
|
1369
|
+
[U.centimeter]: "cm",
|
|
1370
|
+
[U.milimeter]: "mm",
|
|
1371
|
+
[U.mile]: "mi",
|
|
1372
|
+
[U.yard]: "yd",
|
|
1373
|
+
[U.feet]: "ft"
|
|
1374
|
+
}, ce = {
|
|
1375
|
+
[U.kilometer]: "kilometer",
|
|
1376
|
+
[U.meter]: "meter",
|
|
1377
|
+
[U.centimeter]: "centimeter",
|
|
1378
|
+
[U.milimeter]: "millimeter",
|
|
1379
|
+
[U.mile]: "mile",
|
|
1380
|
+
[U.yard]: "yard",
|
|
1381
|
+
[U.feet]: "foot"
|
|
1382
|
+
}, z = {
|
|
1208
1383
|
"m-km": {
|
|
1209
1384
|
value: "m-km",
|
|
1210
1385
|
system: "metric"
|
|
@@ -1241,205 +1416,248 @@ const ve = "mapMeasureLayer", Fs = {
|
|
|
1241
1416
|
value: "feet",
|
|
1242
1417
|
system: "imperial"
|
|
1243
1418
|
}
|
|
1244
|
-
},
|
|
1419
|
+
}, Ke = [z["m-km"], z.kilometer, z.meter, z["ft-mi"], z.mile, z.feet], Us = [z["m-km"], z.kilometer, z.meter, z["ft-mi"], z.mile, z.feet], qs = {
|
|
1245
1420
|
distance: {
|
|
1246
1421
|
value: "distance",
|
|
1247
|
-
mode:
|
|
1422
|
+
mode: ct
|
|
1248
1423
|
},
|
|
1249
1424
|
buffer: {
|
|
1250
1425
|
value: "buffer",
|
|
1251
|
-
mode:
|
|
1426
|
+
mode: Rs
|
|
1252
1427
|
},
|
|
1253
1428
|
area: {
|
|
1254
1429
|
value: "area",
|
|
1255
|
-
mode:
|
|
1256
|
-
}
|
|
1257
|
-
},
|
|
1258
|
-
distance:
|
|
1259
|
-
buffer:
|
|
1260
|
-
area:
|
|
1261
|
-
}
|
|
1262
|
-
function
|
|
1263
|
-
|
|
1430
|
+
mode: As
|
|
1431
|
+
}
|
|
1432
|
+
}, Vs = {
|
|
1433
|
+
distance: Ke,
|
|
1434
|
+
buffer: Ke,
|
|
1435
|
+
area: Us
|
|
1436
|
+
};
|
|
1437
|
+
function ut(r) {
|
|
1438
|
+
const e = F(7), {
|
|
1439
|
+
mapId: t
|
|
1440
|
+
} = r;
|
|
1441
|
+
let n;
|
|
1442
|
+
e[0] !== t ? (n = (f) => {
|
|
1443
|
+
var u;
|
|
1444
|
+
return (u = f.maps[t]) == null ? void 0 : u.basemap;
|
|
1445
|
+
}, e[0] = t, e[1] = n) : n = e[1];
|
|
1446
|
+
const s = D(n);
|
|
1447
|
+
let o;
|
|
1448
|
+
e[2] !== t ? (o = (f) => {
|
|
1449
|
+
var u;
|
|
1450
|
+
return (u = f.maps[t]) == null ? void 0 : u.isLoaded;
|
|
1451
|
+
}, e[2] = t, e[3] = o) : o = e[3];
|
|
1452
|
+
const i = D(o), a = D(js), {
|
|
1453
|
+
type: c
|
|
1454
|
+
} = ue[s], d = c === Y.googleMaps;
|
|
1455
|
+
let l;
|
|
1456
|
+
e: {
|
|
1457
|
+
if (!d || !i) {
|
|
1458
|
+
l = null;
|
|
1459
|
+
break e;
|
|
1460
|
+
}
|
|
1461
|
+
let f;
|
|
1462
|
+
if (e[4] !== a || e[5] !== t) {
|
|
1463
|
+
const y = a(t);
|
|
1464
|
+
f = new qt(y.getDiv(), {}), e[4] = a, e[5] = t, e[6] = f;
|
|
1465
|
+
} else
|
|
1466
|
+
f = e[6];
|
|
1467
|
+
l = f;
|
|
1468
|
+
}
|
|
1469
|
+
return l;
|
|
1470
|
+
}
|
|
1471
|
+
function js(r) {
|
|
1472
|
+
return r.getOverlayInstance;
|
|
1473
|
+
}
|
|
1474
|
+
const Ns = [ae, be, oe];
|
|
1475
|
+
function Is({
|
|
1476
|
+
children: r,
|
|
1264
1477
|
mapId: e,
|
|
1265
1478
|
defaultProps: {
|
|
1266
|
-
styles: t =
|
|
1479
|
+
styles: t = Oe.styles,
|
|
1267
1480
|
labels: n
|
|
1268
1481
|
} = {
|
|
1269
|
-
styles:
|
|
1270
|
-
labels:
|
|
1482
|
+
styles: Oe.styles,
|
|
1483
|
+
labels: Oe.labels
|
|
1271
1484
|
},
|
|
1272
1485
|
layerProps: s = {},
|
|
1273
|
-
defaultType:
|
|
1486
|
+
defaultType: o = "mask"
|
|
1274
1487
|
}) {
|
|
1275
|
-
const
|
|
1276
|
-
var
|
|
1277
|
-
return (
|
|
1278
|
-
}), a =
|
|
1279
|
-
var
|
|
1280
|
-
return (
|
|
1281
|
-
}),
|
|
1282
|
-
var
|
|
1283
|
-
return (
|
|
1284
|
-
}), p =
|
|
1285
|
-
var
|
|
1286
|
-
return (
|
|
1287
|
-
}),
|
|
1288
|
-
var
|
|
1289
|
-
return (
|
|
1290
|
-
})),
|
|
1291
|
-
|
|
1292
|
-
}),
|
|
1488
|
+
const i = I((M) => {
|
|
1489
|
+
var T;
|
|
1490
|
+
return (T = M.data[e]) == null ? void 0 : T.enabled;
|
|
1491
|
+
}), a = I((M) => M.setEnabled), c = I((M) => {
|
|
1492
|
+
var T;
|
|
1493
|
+
return (T = M.data[e]) == null ? void 0 : T.values;
|
|
1494
|
+
}), d = I((M) => M.setValue), l = I((M) => {
|
|
1495
|
+
var T;
|
|
1496
|
+
return (T = M.data[e]) == null ? void 0 : T.modeInstance;
|
|
1497
|
+
}), p = I((M) => {
|
|
1498
|
+
var T;
|
|
1499
|
+
return (T = M.data[e]) == null ? void 0 : T.modeSelected;
|
|
1500
|
+
}), f = de((M) => M.setLayer), u = D((M) => M.addLayers), y = D((M) => M.removeLayers), m = D(st((M) => {
|
|
1501
|
+
var T;
|
|
1502
|
+
return (T = M.maps[e]) == null ? void 0 : T.layers.filter((C) => !Ns.includes(C));
|
|
1503
|
+
})), L = D((M) => M.getDeckInstance), h = ve({}), g = ut({
|
|
1504
|
+
mapId: e
|
|
1505
|
+
}), S = J(() => at({
|
|
1506
|
+
values: c
|
|
1507
|
+
}), [c]), v = J(() => ({
|
|
1293
1508
|
type: "FeatureCollection",
|
|
1294
|
-
features:
|
|
1509
|
+
features: S.map((M) => ({
|
|
1295
1510
|
type: "Feature",
|
|
1296
|
-
geometry:
|
|
1297
|
-
properties:
|
|
1298
|
-
id:
|
|
1511
|
+
geometry: M.geometry,
|
|
1512
|
+
properties: M.properties,
|
|
1513
|
+
id: M.id
|
|
1299
1514
|
}))
|
|
1300
|
-
}), [
|
|
1301
|
-
const
|
|
1302
|
-
...
|
|
1303
|
-
features:
|
|
1515
|
+
}), [S]), b = J(() => S.filter((M) => M.properties.visible).map((M) => M.id), [S]), [_, E] = ee(v), [P, O] = ee([]), R = G(() => {
|
|
1516
|
+
const M = {
|
|
1517
|
+
...v,
|
|
1518
|
+
features: v.features.filter((T) => {
|
|
1304
1519
|
var C;
|
|
1305
|
-
return (C =
|
|
1520
|
+
return (C = T.properties) == null ? void 0 : C.visible;
|
|
1306
1521
|
})
|
|
1307
1522
|
};
|
|
1308
|
-
|
|
1309
|
-
}, [
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
}, [
|
|
1313
|
-
const
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
}), [u, e,
|
|
1317
|
-
const
|
|
1318
|
-
|
|
1319
|
-
}, [e,
|
|
1320
|
-
editType:
|
|
1321
|
-
updatedData:
|
|
1523
|
+
E(M);
|
|
1524
|
+
}, [v]);
|
|
1525
|
+
B(() => {
|
|
1526
|
+
R();
|
|
1527
|
+
}, [R]);
|
|
1528
|
+
const x = ve(S.length);
|
|
1529
|
+
B(() => (u(e, [ae]), () => {
|
|
1530
|
+
y(e, [ae]);
|
|
1531
|
+
}), [u, e, y]);
|
|
1532
|
+
const j = G(() => {
|
|
1533
|
+
R(), O([]), a(e, !1);
|
|
1534
|
+
}, [e, R, a]), q = G(({
|
|
1535
|
+
editType: M,
|
|
1536
|
+
updatedData: T
|
|
1322
1537
|
}) => {
|
|
1323
|
-
if (
|
|
1324
|
-
|
|
1538
|
+
if (M === Q.cancel) {
|
|
1539
|
+
j();
|
|
1325
1540
|
return;
|
|
1326
1541
|
}
|
|
1327
|
-
|
|
1328
|
-
var
|
|
1329
|
-
(
|
|
1330
|
-
const
|
|
1331
|
-
|
|
1542
|
+
E(T), M !== Q.updateTentativeFeature && M === Q.addFeature && (p !== "edit" && (x.current = x.current + 1), T.features.forEach((C, w) => {
|
|
1543
|
+
var $;
|
|
1544
|
+
($ = C.properties).label ?? ($.label = `${n == null ? void 0 : n.mask} ${x.current}`), C.properties.index = w, C.properties.visible = C.properties.visible ?? !0;
|
|
1545
|
+
const A = C.id ?? crypto.randomUUID();
|
|
1546
|
+
d(e, A, {
|
|
1332
1547
|
geometry: C.geometry,
|
|
1333
1548
|
properties: C.properties,
|
|
1334
1549
|
// visible: true,
|
|
1335
|
-
type:
|
|
1550
|
+
type: o
|
|
1336
1551
|
});
|
|
1337
|
-
}),
|
|
1338
|
-
}, [
|
|
1339
|
-
return
|
|
1340
|
-
const
|
|
1341
|
-
border:
|
|
1552
|
+
}), j());
|
|
1553
|
+
}, [o, j, n == null ? void 0 : n.mask, e, p, d]);
|
|
1554
|
+
return B(() => {
|
|
1555
|
+
const M = i, {
|
|
1556
|
+
border: T,
|
|
1342
1557
|
point: C,
|
|
1343
|
-
fill:
|
|
1558
|
+
fill: w
|
|
1344
1559
|
} = t.colors.editing, {
|
|
1345
|
-
border:
|
|
1346
|
-
fill:
|
|
1347
|
-
} = t.colors.finished,
|
|
1560
|
+
border: A,
|
|
1561
|
+
fill: $
|
|
1562
|
+
} = t.colors.finished, Z = Ps({
|
|
1348
1563
|
layerProps: {
|
|
1349
1564
|
...s.mask,
|
|
1350
|
-
pickable:
|
|
1351
|
-
data:
|
|
1352
|
-
selectedFeatureIndexes:
|
|
1565
|
+
pickable: M,
|
|
1566
|
+
data: _,
|
|
1567
|
+
selectedFeatureIndexes: P,
|
|
1353
1568
|
updateTriggers: {
|
|
1354
|
-
getFilterValue:
|
|
1569
|
+
getFilterValue: b
|
|
1355
1570
|
},
|
|
1356
|
-
onClick: (
|
|
1357
|
-
const
|
|
1358
|
-
|
|
1571
|
+
onClick: (H) => {
|
|
1572
|
+
const X = H;
|
|
1573
|
+
X.isGuide || O([X.index]);
|
|
1359
1574
|
}
|
|
1360
1575
|
},
|
|
1361
|
-
getLineColor: (
|
|
1362
|
-
getFillColor: (
|
|
1576
|
+
getLineColor: (H) => P[0] === H.properties.index ? T : A,
|
|
1577
|
+
getFillColor: (H) => P[0] === H.properties.index ? w : $,
|
|
1363
1578
|
pointColor: {
|
|
1364
1579
|
fill: C,
|
|
1365
|
-
outline:
|
|
1580
|
+
outline: T
|
|
1366
1581
|
},
|
|
1367
|
-
|
|
1368
|
-
|
|
1582
|
+
eventManager: g,
|
|
1583
|
+
onEdit: q,
|
|
1584
|
+
mode: M ? l : new At()
|
|
1369
1585
|
});
|
|
1370
|
-
|
|
1371
|
-
}, [
|
|
1372
|
-
const
|
|
1373
|
-
...
|
|
1374
|
-
data:
|
|
1375
|
-
getFilterValue: (
|
|
1586
|
+
f(ae, Z);
|
|
1587
|
+
}, [_, i, s.mask, b, l, q, P, f, t.colors.editing, t.colors.finished, g]), B(() => {
|
|
1588
|
+
const M = {
|
|
1589
|
+
...Se,
|
|
1590
|
+
data: v,
|
|
1591
|
+
getFilterValue: (T) => Number(b.includes(T.id)),
|
|
1376
1592
|
updateTriggers: {
|
|
1377
|
-
getFilterValue:
|
|
1593
|
+
getFilterValue: b
|
|
1378
1594
|
}
|
|
1379
1595
|
};
|
|
1380
|
-
return
|
|
1381
|
-
type:
|
|
1382
|
-
props:
|
|
1383
|
-
}), u(e, [
|
|
1384
|
-
|
|
1596
|
+
return f(Se.id, {
|
|
1597
|
+
type: Vt,
|
|
1598
|
+
props: M
|
|
1599
|
+
}), u(e, [Se.id]), () => {
|
|
1600
|
+
y(e, [Se.id]);
|
|
1385
1601
|
};
|
|
1386
|
-
}, [u, e,
|
|
1387
|
-
|
|
1388
|
-
var
|
|
1389
|
-
const
|
|
1390
|
-
|
|
1391
|
-
const C = !
|
|
1392
|
-
|
|
1602
|
+
}, [u, e, v, b, y, f]), B(() => {
|
|
1603
|
+
m == null || m.forEach((M) => {
|
|
1604
|
+
var w;
|
|
1605
|
+
const T = (w = L(e)) == null ? void 0 : w.props.layers.find((A) => A.props.id === M);
|
|
1606
|
+
i && (h.current[M] = T == null ? void 0 : T.props.pickable);
|
|
1607
|
+
const C = !i && (h.current[M] ?? (T == null ? void 0 : T.props.pickable));
|
|
1608
|
+
f(M, {
|
|
1393
1609
|
props: {
|
|
1394
1610
|
pickable: C,
|
|
1395
1611
|
extensions: [new $t()],
|
|
1396
|
-
maskId: !
|
|
1612
|
+
maskId: !i && b.length ? be : void 0
|
|
1397
1613
|
}
|
|
1398
1614
|
});
|
|
1399
1615
|
});
|
|
1400
|
-
}, [
|
|
1616
|
+
}, [i, L, e, m, b.length, f]), r;
|
|
1401
1617
|
}
|
|
1402
|
-
|
|
1403
|
-
function
|
|
1404
|
-
mode:
|
|
1405
|
-
|
|
1618
|
+
Is.Controls = Os;
|
|
1619
|
+
function Hs({
|
|
1620
|
+
mode: r,
|
|
1621
|
+
eventManager: e,
|
|
1622
|
+
...t
|
|
1406
1623
|
}) {
|
|
1407
|
-
const
|
|
1408
|
-
mode:
|
|
1409
|
-
...
|
|
1624
|
+
const n = Bs({
|
|
1625
|
+
mode: r,
|
|
1626
|
+
...t
|
|
1410
1627
|
});
|
|
1411
1628
|
return {
|
|
1412
|
-
type:
|
|
1629
|
+
type: rt,
|
|
1413
1630
|
props: {
|
|
1414
|
-
...
|
|
1415
|
-
|
|
1631
|
+
...n,
|
|
1632
|
+
eventManager: e,
|
|
1633
|
+
mode: r,
|
|
1416
1634
|
data: []
|
|
1417
1635
|
}
|
|
1418
1636
|
};
|
|
1419
1637
|
}
|
|
1420
|
-
function
|
|
1421
|
-
mode:
|
|
1638
|
+
function Bs({
|
|
1639
|
+
mode: r,
|
|
1422
1640
|
layerProps: e,
|
|
1423
1641
|
locale: t,
|
|
1424
1642
|
enabled: n,
|
|
1425
1643
|
unit: s,
|
|
1426
|
-
onEdit:
|
|
1427
|
-
guideColor:
|
|
1644
|
+
onEdit: o,
|
|
1645
|
+
guideColor: i,
|
|
1428
1646
|
pointColor: a,
|
|
1429
|
-
textOptions:
|
|
1647
|
+
textOptions: c
|
|
1430
1648
|
}) {
|
|
1431
|
-
const
|
|
1649
|
+
const d = le(e, {
|
|
1432
1650
|
visible: n,
|
|
1433
1651
|
pickable: n,
|
|
1434
1652
|
modeConfig: {
|
|
1435
1653
|
// We force distance due to conversion is addressed at feature getText level
|
|
1436
|
-
formatTooltip: (
|
|
1654
|
+
formatTooltip: (f) => f,
|
|
1437
1655
|
turfOptions: {
|
|
1438
|
-
units:
|
|
1656
|
+
units: xs.meters
|
|
1439
1657
|
}
|
|
1440
1658
|
},
|
|
1441
1659
|
...n && {
|
|
1442
|
-
onEdit:
|
|
1660
|
+
onEdit: o
|
|
1443
1661
|
},
|
|
1444
1662
|
_subLayerProps: {
|
|
1445
1663
|
tooltips: {
|
|
@@ -1450,508 +1668,557 @@ function $s({
|
|
|
1450
1668
|
// needed for the outlineWidth and outlineColor attributes to be effective
|
|
1451
1669
|
smoothing: 0.2
|
|
1452
1670
|
},
|
|
1453
|
-
getText: (
|
|
1671
|
+
getText: (f) => {
|
|
1454
1672
|
var u;
|
|
1455
|
-
return (u =
|
|
1456
|
-
meters:
|
|
1673
|
+
return (u = r == null ? void 0 : r.getTooltipText) == null ? void 0 : u.call(r, {
|
|
1674
|
+
meters: f.text,
|
|
1457
1675
|
locale: t,
|
|
1458
1676
|
unit: s,
|
|
1459
|
-
options:
|
|
1677
|
+
options: c
|
|
1460
1678
|
});
|
|
1461
1679
|
},
|
|
1462
1680
|
updateTriggers: {
|
|
1463
|
-
getText: [s, t,
|
|
1681
|
+
getText: [s, t, c]
|
|
1464
1682
|
}
|
|
1465
1683
|
}
|
|
1466
1684
|
}
|
|
1467
|
-
}),
|
|
1685
|
+
}), l = le($s, {
|
|
1468
1686
|
_subLayerProps: {
|
|
1469
1687
|
guides: {
|
|
1470
|
-
getLineColor:
|
|
1471
|
-
getFillColor:
|
|
1688
|
+
getLineColor: i,
|
|
1689
|
+
getFillColor: i.with(3, 20)
|
|
1472
1690
|
}
|
|
1473
1691
|
},
|
|
1474
1692
|
getEditHandlePointColor: a,
|
|
1475
|
-
getEditHandlePointOutlineColor:
|
|
1693
|
+
getEditHandlePointOutlineColor: i
|
|
1476
1694
|
});
|
|
1477
|
-
return
|
|
1695
|
+
return le(l, d);
|
|
1478
1696
|
}
|
|
1479
|
-
const
|
|
1480
|
-
measurements:
|
|
1697
|
+
const Gs = (r) => Ve()((e) => ({
|
|
1698
|
+
measurements: r.reduce((n, s) => {
|
|
1481
1699
|
const {
|
|
1482
|
-
mapId:
|
|
1483
|
-
modeSelected:
|
|
1484
|
-
modes: a =
|
|
1485
|
-
units:
|
|
1486
|
-
distance:
|
|
1487
|
-
finished:
|
|
1700
|
+
mapId: o,
|
|
1701
|
+
modeSelected: i,
|
|
1702
|
+
modes: a = qs,
|
|
1703
|
+
units: c = Vs,
|
|
1704
|
+
distance: d = 0,
|
|
1705
|
+
finished: l = !1,
|
|
1488
1706
|
locale: p = "en",
|
|
1489
|
-
positions:
|
|
1707
|
+
positions: f = [],
|
|
1490
1708
|
clearLayerOnStart: u = !1,
|
|
1491
|
-
unit:
|
|
1492
|
-
enabled:
|
|
1709
|
+
unit: y = $e["m-km"],
|
|
1710
|
+
enabled: m = !1
|
|
1493
1711
|
} = s;
|
|
1494
|
-
return n[
|
|
1712
|
+
return n[o] = {
|
|
1495
1713
|
modes: a,
|
|
1496
|
-
units:
|
|
1497
|
-
modeSelected:
|
|
1498
|
-
distance:
|
|
1499
|
-
finished:
|
|
1714
|
+
units: c,
|
|
1715
|
+
modeSelected: i,
|
|
1716
|
+
distance: d,
|
|
1717
|
+
finished: l,
|
|
1500
1718
|
locale: p,
|
|
1501
|
-
positions:
|
|
1502
|
-
unit:
|
|
1719
|
+
positions: f,
|
|
1720
|
+
unit: y,
|
|
1503
1721
|
clearLayerOnStart: u,
|
|
1504
|
-
enabled:
|
|
1722
|
+
enabled: m
|
|
1505
1723
|
}, n;
|
|
1506
1724
|
}, {}),
|
|
1507
|
-
mode:
|
|
1725
|
+
mode: ct,
|
|
1508
1726
|
setModeInstance: (n, s) => {
|
|
1509
|
-
e((
|
|
1727
|
+
e((o) => ({
|
|
1510
1728
|
measurements: {
|
|
1511
|
-
...
|
|
1729
|
+
...o.measurements,
|
|
1512
1730
|
[n]: {
|
|
1513
|
-
...
|
|
1731
|
+
...o.measurements[n],
|
|
1514
1732
|
modeInstance: s
|
|
1515
1733
|
}
|
|
1516
1734
|
}
|
|
1517
1735
|
}));
|
|
1518
1736
|
},
|
|
1519
1737
|
setModeSelected: (n, s) => {
|
|
1520
|
-
e((
|
|
1738
|
+
e((o) => ({
|
|
1521
1739
|
measurements: {
|
|
1522
|
-
...
|
|
1740
|
+
...o.measurements,
|
|
1523
1741
|
[n]: {
|
|
1524
|
-
...
|
|
1742
|
+
...o.measurements[n],
|
|
1525
1743
|
modeSelected: s
|
|
1526
1744
|
}
|
|
1527
1745
|
}
|
|
1528
1746
|
}));
|
|
1529
1747
|
},
|
|
1530
1748
|
setFinished: (n, s) => {
|
|
1531
|
-
e((
|
|
1749
|
+
e((o) => ({
|
|
1532
1750
|
measurements: {
|
|
1533
|
-
...
|
|
1751
|
+
...o.measurements,
|
|
1534
1752
|
[n]: {
|
|
1535
|
-
...
|
|
1753
|
+
...o.measurements[n],
|
|
1536
1754
|
finished: s
|
|
1537
1755
|
}
|
|
1538
1756
|
}
|
|
1539
1757
|
}));
|
|
1540
1758
|
},
|
|
1541
1759
|
setDistance: (n, s) => {
|
|
1542
|
-
e((
|
|
1760
|
+
e((o) => ({
|
|
1543
1761
|
measurements: {
|
|
1544
|
-
...
|
|
1762
|
+
...o.measurements,
|
|
1545
1763
|
[n]: {
|
|
1546
|
-
...
|
|
1764
|
+
...o.measurements[n],
|
|
1547
1765
|
distance: s
|
|
1548
1766
|
}
|
|
1549
1767
|
}
|
|
1550
1768
|
}));
|
|
1551
1769
|
},
|
|
1552
1770
|
setUnit: (n, s) => {
|
|
1553
|
-
e((
|
|
1771
|
+
e((o) => ({
|
|
1554
1772
|
measurements: {
|
|
1555
|
-
...
|
|
1773
|
+
...o.measurements,
|
|
1556
1774
|
[n]: {
|
|
1557
|
-
...
|
|
1775
|
+
...o.measurements[n],
|
|
1558
1776
|
unit: s
|
|
1559
1777
|
}
|
|
1560
1778
|
}
|
|
1561
1779
|
}));
|
|
1562
1780
|
},
|
|
1563
1781
|
setLocale: (n, s) => {
|
|
1564
|
-
e((
|
|
1782
|
+
e((o) => ({
|
|
1565
1783
|
measurements: {
|
|
1566
|
-
...
|
|
1784
|
+
...o.measurements,
|
|
1567
1785
|
[n]: {
|
|
1568
|
-
...
|
|
1786
|
+
...o.measurements[n],
|
|
1569
1787
|
locale: s
|
|
1570
1788
|
}
|
|
1571
1789
|
}
|
|
1572
1790
|
}));
|
|
1573
1791
|
},
|
|
1574
1792
|
setPositions: (n, s) => {
|
|
1575
|
-
e((
|
|
1793
|
+
e((o) => ({
|
|
1576
1794
|
measurements: {
|
|
1577
|
-
...
|
|
1795
|
+
...o.measurements,
|
|
1578
1796
|
[n]: {
|
|
1579
|
-
...
|
|
1797
|
+
...o.measurements[n],
|
|
1580
1798
|
positions: [...s]
|
|
1581
1799
|
}
|
|
1582
1800
|
}
|
|
1583
1801
|
}));
|
|
1584
1802
|
},
|
|
1585
1803
|
setEnabled: (n, s) => {
|
|
1586
|
-
e((
|
|
1804
|
+
e((o) => ({
|
|
1587
1805
|
measurements: {
|
|
1588
|
-
...
|
|
1806
|
+
...o.measurements,
|
|
1589
1807
|
[n]: {
|
|
1590
|
-
...
|
|
1808
|
+
...o.measurements[n],
|
|
1591
1809
|
enabled: s
|
|
1592
1810
|
}
|
|
1593
1811
|
}
|
|
1594
1812
|
}));
|
|
1595
1813
|
}
|
|
1596
|
-
})),
|
|
1597
|
-
function
|
|
1598
|
-
const e =
|
|
1814
|
+
})), dt = Ue({});
|
|
1815
|
+
function zs(r) {
|
|
1816
|
+
const e = F(5), {
|
|
1599
1817
|
children: t,
|
|
1600
1818
|
values: n
|
|
1601
|
-
} =
|
|
1819
|
+
} = r;
|
|
1602
1820
|
let s;
|
|
1603
|
-
e[0] !== n ? (s =
|
|
1604
|
-
const [
|
|
1605
|
-
let
|
|
1606
|
-
return e[2] !== t || e[3] !==
|
|
1821
|
+
e[0] !== n ? (s = Gs(n), e[0] = n, e[1] = s) : s = e[1];
|
|
1822
|
+
const [o] = ee(s);
|
|
1823
|
+
let i;
|
|
1824
|
+
return e[2] !== t || e[3] !== o ? (i = /* @__PURE__ */ N(dt.Provider, { value: o, children: t }), e[2] = t, e[3] = o, e[4] = i) : i = e[4], i;
|
|
1607
1825
|
}
|
|
1608
|
-
function
|
|
1609
|
-
const e =
|
|
1826
|
+
function V(r) {
|
|
1827
|
+
const e = qe(dt);
|
|
1610
1828
|
if (!Object.keys(e).length)
|
|
1611
1829
|
throw new Error("Missing MeasurementToolsProvider in the tree");
|
|
1612
|
-
return je(e,
|
|
1830
|
+
return je(e, r);
|
|
1613
1831
|
}
|
|
1614
|
-
function
|
|
1615
|
-
const e =
|
|
1832
|
+
function ft(r) {
|
|
1833
|
+
const e = F(74), {
|
|
1616
1834
|
mapId: t
|
|
1617
|
-
} =
|
|
1835
|
+
} = r;
|
|
1618
1836
|
let n;
|
|
1619
|
-
e[0] !== t ? (n = (
|
|
1620
|
-
const s =
|
|
1621
|
-
let
|
|
1622
|
-
e[2] !== t ? (
|
|
1623
|
-
const
|
|
1837
|
+
e[0] !== t ? (n = (k) => k.measurements[t].modes, e[0] = t, e[1] = n) : n = e[1];
|
|
1838
|
+
const s = V(n);
|
|
1839
|
+
let o;
|
|
1840
|
+
e[2] !== t ? (o = (k) => k.measurements[t].units, e[2] = t, e[3] = o) : o = e[3];
|
|
1841
|
+
const i = V(o);
|
|
1624
1842
|
let a;
|
|
1625
|
-
e[4] !== t ? (a = (
|
|
1626
|
-
const
|
|
1627
|
-
let
|
|
1628
|
-
e[6] !==
|
|
1629
|
-
const p =
|
|
1630
|
-
let
|
|
1631
|
-
e[9] !== t ? (
|
|
1632
|
-
const u =
|
|
1633
|
-
let
|
|
1634
|
-
e[11] !== t ? (
|
|
1635
|
-
const
|
|
1843
|
+
e[4] !== t ? (a = (k) => k.measurements[t].distance, e[4] = t, e[5] = a) : a = e[5];
|
|
1844
|
+
const c = V(a), d = V(en);
|
|
1845
|
+
let l;
|
|
1846
|
+
e[6] !== d || e[7] !== t ? (l = (k) => d(t, k), e[6] = d, e[7] = t, e[8] = l) : l = e[8];
|
|
1847
|
+
const p = l;
|
|
1848
|
+
let f;
|
|
1849
|
+
e[9] !== t ? (f = (k) => k.measurements[t].clearLayerOnStart, e[9] = t, e[10] = f) : f = e[10];
|
|
1850
|
+
const u = V(f);
|
|
1851
|
+
let y;
|
|
1852
|
+
e[11] !== t ? (y = (k) => k.measurements[t].enabled, e[11] = t, e[12] = y) : y = e[12];
|
|
1853
|
+
const m = V(y), L = V(Js);
|
|
1636
1854
|
let h;
|
|
1637
|
-
e[13] !==
|
|
1638
|
-
const
|
|
1639
|
-
let
|
|
1640
|
-
e[16] !== t ? (
|
|
1641
|
-
const
|
|
1642
|
-
let
|
|
1643
|
-
e[18] !==
|
|
1644
|
-
|
|
1645
|
-
}, e[18] =
|
|
1646
|
-
const E =
|
|
1647
|
-
let
|
|
1648
|
-
e[22] !== t ? (
|
|
1649
|
-
const O =
|
|
1650
|
-
let
|
|
1651
|
-
e[24] !==
|
|
1652
|
-
const
|
|
1653
|
-
let
|
|
1654
|
-
e[27] !== t ? (
|
|
1655
|
-
const
|
|
1855
|
+
e[13] !== L || e[14] !== t ? (h = (k) => L(t, k), e[13] = L, e[14] = t, e[15] = h) : h = e[15];
|
|
1856
|
+
const g = h;
|
|
1857
|
+
let S;
|
|
1858
|
+
e[16] !== t ? (S = (k) => k.measurements[t].modeSelected, e[16] = t, e[17] = S) : S = e[17];
|
|
1859
|
+
const v = V(S), b = V(Xs);
|
|
1860
|
+
let _;
|
|
1861
|
+
e[18] !== b || e[19] !== t || e[20] !== g ? (_ = (k) => {
|
|
1862
|
+
g(!!k), b(t, k);
|
|
1863
|
+
}, e[18] = b, e[19] = t, e[20] = g, e[21] = _) : _ = e[21];
|
|
1864
|
+
const E = _;
|
|
1865
|
+
let P;
|
|
1866
|
+
e[22] !== t ? (P = (k) => k.measurements[t].finished, e[22] = t, e[23] = P) : P = e[23];
|
|
1867
|
+
const O = V(P), R = V(Ys);
|
|
1868
|
+
let x;
|
|
1869
|
+
e[24] !== R || e[25] !== t ? (x = (k) => R(t, k), e[24] = R, e[25] = t, e[26] = x) : x = e[26];
|
|
1870
|
+
const j = x;
|
|
1871
|
+
let q;
|
|
1872
|
+
e[27] !== t ? (q = (k) => k.measurements[t].locale, e[27] = t, e[28] = q) : q = e[28];
|
|
1873
|
+
const M = V(q), T = V(Ws);
|
|
1874
|
+
let C;
|
|
1875
|
+
e[29] !== T || e[30] !== t ? (C = (k) => T(t, k), e[29] = T, e[30] = t, e[31] = C) : C = e[31];
|
|
1876
|
+
const w = C;
|
|
1656
1877
|
let A;
|
|
1657
|
-
e[
|
|
1658
|
-
const
|
|
1659
|
-
let
|
|
1660
|
-
e[
|
|
1661
|
-
const
|
|
1662
|
-
let I;
|
|
1663
|
-
e[34] !== G || e[35] !== t ? (I = (_) => G(t, _), e[34] = G, e[35] = t, e[36] = I) : I = e[36];
|
|
1664
|
-
const be = I;
|
|
1665
|
-
let te;
|
|
1666
|
-
e[37] !== t ? (te = (_) => _.measurements[t].positions, e[37] = t, e[38] = te) : te = e[38];
|
|
1667
|
-
const ge = q(te), oe = q(Is);
|
|
1668
|
-
let ie;
|
|
1669
|
-
e[39] !== oe || e[40] !== t ? (ie = (_) => oe(t, _), e[39] = oe, e[40] = t, e[41] = ie) : ie = e[41];
|
|
1670
|
-
const Z = ie;
|
|
1878
|
+
e[32] !== t ? (A = (k) => k.measurements[t].modeInstance, e[32] = t, e[33] = A) : A = e[33];
|
|
1879
|
+
const $ = V(A), Z = V(Ks);
|
|
1880
|
+
let H;
|
|
1881
|
+
e[34] !== Z || e[35] !== t ? (H = (k) => Z(t, k), e[34] = Z, e[35] = t, e[36] = H) : H = e[36];
|
|
1882
|
+
const X = H;
|
|
1671
1883
|
let re;
|
|
1672
|
-
e[
|
|
1673
|
-
const
|
|
1674
|
-
let
|
|
1675
|
-
e[
|
|
1676
|
-
const
|
|
1677
|
-
let
|
|
1678
|
-
e[
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1884
|
+
e[37] !== t ? (re = (k) => k.measurements[t].positions, e[37] = t, e[38] = re) : re = e[38];
|
|
1885
|
+
const _e = V(re), Le = V(Zs);
|
|
1886
|
+
let fe;
|
|
1887
|
+
e[39] !== Le || e[40] !== t ? (fe = (k) => Le(t, k), e[39] = Le, e[40] = t, e[41] = fe) : fe = e[41];
|
|
1888
|
+
const ie = fe;
|
|
1889
|
+
let me;
|
|
1890
|
+
e[42] !== t ? (me = (k) => k.measurements[t].unit, e[42] = t, e[43] = me) : me = e[43];
|
|
1891
|
+
const Te = V(me), Ee = V(Qs);
|
|
1892
|
+
let pe;
|
|
1893
|
+
e[44] !== Ee || e[45] !== t ? (pe = (k) => Ee(t, k), e[44] = Ee, e[45] = t, e[46] = pe) : pe = e[46];
|
|
1894
|
+
const ke = pe;
|
|
1895
|
+
let ge;
|
|
1896
|
+
e[47] !== $ || e[48] !== ie ? (ge = () => {
|
|
1897
|
+
$ == null || $.resetClickSequence(), ie([]);
|
|
1898
|
+
}, e[47] = $, e[48] = ie, e[49] = ge) : ge = e[49];
|
|
1899
|
+
const Pe = ge;
|
|
1687
1900
|
let ye;
|
|
1688
|
-
|
|
1901
|
+
e[50] !== g ? (ye = (k) => {
|
|
1902
|
+
g(k);
|
|
1903
|
+
}, e[50] = g, e[51] = ye) : ye = e[51];
|
|
1904
|
+
const Ce = ye;
|
|
1905
|
+
let he;
|
|
1906
|
+
return e[52] !== Pe || e[53] !== u || e[54] !== c || e[55] !== m || e[56] !== O || e[57] !== M || e[58] !== $ || e[59] !== v || e[60] !== s || e[61] !== _e || e[62] !== p || e[63] !== g || e[64] !== j || e[65] !== w || e[66] !== X || e[67] !== E || e[68] !== ie || e[69] !== ke || e[70] !== Ce || e[71] !== Te || e[72] !== i ? (he = {
|
|
1689
1907
|
modes: s,
|
|
1690
|
-
units:
|
|
1691
|
-
distance:
|
|
1908
|
+
units: i,
|
|
1909
|
+
distance: c,
|
|
1692
1910
|
clearLayerOnStart: u,
|
|
1693
|
-
modeSelected:
|
|
1694
|
-
enabled:
|
|
1911
|
+
modeSelected: v,
|
|
1912
|
+
enabled: m,
|
|
1695
1913
|
finished: O,
|
|
1696
|
-
locale:
|
|
1697
|
-
modeInstance:
|
|
1698
|
-
positions:
|
|
1699
|
-
unit:
|
|
1914
|
+
locale: M,
|
|
1915
|
+
modeInstance: $,
|
|
1916
|
+
positions: _e,
|
|
1917
|
+
unit: Te,
|
|
1700
1918
|
setDistance: p,
|
|
1701
1919
|
setModeSelected: E,
|
|
1702
|
-
setFinished:
|
|
1703
|
-
setLocale:
|
|
1704
|
-
setPositions:
|
|
1705
|
-
setUnit:
|
|
1706
|
-
setEnabled:
|
|
1707
|
-
toggleLayer:
|
|
1708
|
-
clearLayer:
|
|
1709
|
-
setModeInstance:
|
|
1710
|
-
}, e[52] =
|
|
1920
|
+
setFinished: j,
|
|
1921
|
+
setLocale: w,
|
|
1922
|
+
setPositions: ie,
|
|
1923
|
+
setUnit: ke,
|
|
1924
|
+
setEnabled: g,
|
|
1925
|
+
toggleLayer: Ce,
|
|
1926
|
+
clearLayer: Pe,
|
|
1927
|
+
setModeInstance: X
|
|
1928
|
+
}, e[52] = Pe, e[53] = u, e[54] = c, e[55] = m, e[56] = O, e[57] = M, e[58] = $, e[59] = v, e[60] = s, e[61] = _e, e[62] = p, e[63] = g, e[64] = j, e[65] = w, e[66] = X, e[67] = E, e[68] = ie, e[69] = ke, e[70] = Ce, e[71] = Te, e[72] = i, e[73] = he) : he = e[73], he;
|
|
1711
1929
|
}
|
|
1712
|
-
function
|
|
1713
|
-
return
|
|
1930
|
+
function Qs(r) {
|
|
1931
|
+
return r.setUnit;
|
|
1714
1932
|
}
|
|
1715
|
-
function
|
|
1716
|
-
return
|
|
1933
|
+
function Zs(r) {
|
|
1934
|
+
return r.setPositions;
|
|
1717
1935
|
}
|
|
1718
|
-
function
|
|
1719
|
-
return
|
|
1936
|
+
function Ks(r) {
|
|
1937
|
+
return r.setModeInstance;
|
|
1720
1938
|
}
|
|
1721
|
-
function
|
|
1722
|
-
return
|
|
1939
|
+
function Ws(r) {
|
|
1940
|
+
return r.setLocale;
|
|
1723
1941
|
}
|
|
1724
|
-
function
|
|
1725
|
-
return
|
|
1942
|
+
function Ys(r) {
|
|
1943
|
+
return r.setFinished;
|
|
1726
1944
|
}
|
|
1727
|
-
function
|
|
1728
|
-
return
|
|
1945
|
+
function Xs(r) {
|
|
1946
|
+
return r.setModeSelected;
|
|
1729
1947
|
}
|
|
1730
|
-
function
|
|
1731
|
-
return
|
|
1948
|
+
function Js(r) {
|
|
1949
|
+
return r.setEnabled;
|
|
1732
1950
|
}
|
|
1733
|
-
function
|
|
1734
|
-
return
|
|
1951
|
+
function en(r) {
|
|
1952
|
+
return r.setDistance;
|
|
1735
1953
|
}
|
|
1736
|
-
function
|
|
1737
|
-
const e =
|
|
1954
|
+
function tn(r) {
|
|
1955
|
+
const e = F(42), {
|
|
1738
1956
|
mapId: t,
|
|
1739
1957
|
textOptions: n,
|
|
1740
1958
|
children: s
|
|
1741
|
-
} =
|
|
1742
|
-
let
|
|
1743
|
-
e[0] !== t ? (
|
|
1959
|
+
} = r;
|
|
1960
|
+
let o;
|
|
1961
|
+
e[0] !== t ? (o = {
|
|
1744
1962
|
mapId: t
|
|
1745
|
-
}, e[0] = t, e[1] =
|
|
1963
|
+
}, e[0] = t, e[1] = o) : o = e[1];
|
|
1746
1964
|
const {
|
|
1747
|
-
modes:
|
|
1965
|
+
modes: i,
|
|
1748
1966
|
units: a,
|
|
1749
|
-
distance:
|
|
1750
|
-
setDistance:
|
|
1751
|
-
clearLayerOnStart:
|
|
1967
|
+
distance: c,
|
|
1968
|
+
setDistance: d,
|
|
1969
|
+
clearLayerOnStart: l,
|
|
1752
1970
|
modeSelected: p,
|
|
1753
|
-
setModeSelected:
|
|
1971
|
+
setModeSelected: f,
|
|
1754
1972
|
enabled: u,
|
|
1755
|
-
setEnabled:
|
|
1756
|
-
finished:
|
|
1757
|
-
setFinished:
|
|
1973
|
+
setEnabled: y,
|
|
1974
|
+
finished: m,
|
|
1975
|
+
setFinished: L,
|
|
1758
1976
|
locale: h,
|
|
1759
|
-
setLocale:
|
|
1760
|
-
modeInstance:
|
|
1761
|
-
setModeInstance:
|
|
1762
|
-
positions:
|
|
1763
|
-
setPositions:
|
|
1977
|
+
setLocale: g,
|
|
1978
|
+
modeInstance: S,
|
|
1979
|
+
setModeInstance: v,
|
|
1980
|
+
positions: b,
|
|
1981
|
+
setPositions: _,
|
|
1764
1982
|
unit: E,
|
|
1765
|
-
setUnit:
|
|
1983
|
+
setUnit: P,
|
|
1766
1984
|
clearLayer: O,
|
|
1767
|
-
toggleLayer:
|
|
1768
|
-
} =
|
|
1769
|
-
let
|
|
1770
|
-
e[2] !== p || e[3] !==
|
|
1771
|
-
if (p &&
|
|
1772
|
-
const
|
|
1773
|
-
|
|
1985
|
+
toggleLayer: R
|
|
1986
|
+
} = ft(o);
|
|
1987
|
+
let x;
|
|
1988
|
+
e[2] !== p || e[3] !== i || e[4] !== v || e[5] !== _ ? (x = () => {
|
|
1989
|
+
if (p && i[p]) {
|
|
1990
|
+
const w = i[p].mode;
|
|
1991
|
+
v(new w());
|
|
1774
1992
|
}
|
|
1775
1993
|
return () => {
|
|
1776
|
-
|
|
1994
|
+
_([]);
|
|
1777
1995
|
};
|
|
1778
|
-
}, e[2] = p, e[3] =
|
|
1779
|
-
let
|
|
1780
|
-
e[7] !== p || e[8] !==
|
|
1781
|
-
let
|
|
1782
|
-
e[13] !==
|
|
1783
|
-
|
|
1784
|
-
}, e[13] =
|
|
1785
|
-
const
|
|
1786
|
-
let
|
|
1787
|
-
return e[18] !== s || e[19] !== O || e[20] !==
|
|
1996
|
+
}, e[2] = p, e[3] = i, e[4] = v, e[5] = _, e[6] = x) : x = e[6];
|
|
1997
|
+
let j;
|
|
1998
|
+
e[7] !== p || e[8] !== i || e[9] !== y || e[10] !== v || e[11] !== _ ? (j = [i, p, _, v, y], e[7] = p, e[8] = i, e[9] = y, e[10] = v, e[11] = _, e[12] = j) : j = e[12], B(x, j);
|
|
1999
|
+
let q;
|
|
2000
|
+
e[13] !== R || e[14] !== O || e[15] !== l || e[16] !== m ? (q = (w) => {
|
|
2001
|
+
w && (l || !m) && O(), R(w);
|
|
2002
|
+
}, e[13] = R, e[14] = O, e[15] = l, e[16] = m, e[17] = q) : q = e[17];
|
|
2003
|
+
const M = q, T = !!l;
|
|
2004
|
+
let C;
|
|
2005
|
+
return e[18] !== s || e[19] !== O || e[20] !== c || e[21] !== u || e[22] !== m || e[23] !== h || e[24] !== t || e[25] !== S || e[26] !== p || e[27] !== i || e[28] !== b || e[29] !== d || e[30] !== y || e[31] !== L || e[32] !== g || e[33] !== f || e[34] !== _ || e[35] !== P || e[36] !== T || e[37] !== n || e[38] !== M || e[39] !== E || e[40] !== a ? (C = s({
|
|
1788
2006
|
mapId: t,
|
|
1789
|
-
distance:
|
|
2007
|
+
distance: c,
|
|
1790
2008
|
enabled: u,
|
|
1791
|
-
finished:
|
|
2009
|
+
finished: m,
|
|
1792
2010
|
locale: h,
|
|
1793
|
-
positions:
|
|
2011
|
+
positions: b,
|
|
1794
2012
|
unit: E,
|
|
1795
|
-
clearLayerOnStart:
|
|
2013
|
+
clearLayerOnStart: T,
|
|
1796
2014
|
modeSelected: p,
|
|
1797
|
-
modes:
|
|
2015
|
+
modes: i,
|
|
1798
2016
|
units: a,
|
|
1799
|
-
value:
|
|
1800
|
-
meters:
|
|
2017
|
+
value: Me({
|
|
2018
|
+
meters: c,
|
|
1801
2019
|
unit: E,
|
|
1802
2020
|
locale: h,
|
|
1803
2021
|
options: n
|
|
1804
2022
|
}),
|
|
1805
|
-
modeInstance:
|
|
1806
|
-
setModeSelected:
|
|
1807
|
-
setDistance:
|
|
1808
|
-
setFinished:
|
|
1809
|
-
setLocale:
|
|
1810
|
-
setPositions:
|
|
1811
|
-
setUnit:
|
|
1812
|
-
setEnabled:
|
|
1813
|
-
toggleLayer:
|
|
2023
|
+
modeInstance: S,
|
|
2024
|
+
setModeSelected: f,
|
|
2025
|
+
setDistance: d,
|
|
2026
|
+
setFinished: L,
|
|
2027
|
+
setLocale: g,
|
|
2028
|
+
setPositions: _,
|
|
2029
|
+
setUnit: P,
|
|
2030
|
+
setEnabled: y,
|
|
2031
|
+
toggleLayer: M,
|
|
1814
2032
|
clearLayer: O
|
|
1815
|
-
}), e[18] = s, e[19] = O, e[20] =
|
|
2033
|
+
}), e[18] = s, e[19] = O, e[20] = c, e[21] = u, e[22] = m, e[23] = h, e[24] = t, e[25] = S, e[26] = p, e[27] = i, e[28] = b, e[29] = d, e[30] = y, e[31] = L, e[32] = g, e[33] = f, e[34] = _, e[35] = P, e[36] = T, e[37] = n, e[38] = M, e[39] = E, e[40] = a, e[41] = C) : C = e[41], C;
|
|
1816
2034
|
}
|
|
1817
|
-
const
|
|
1818
|
-
function
|
|
1819
|
-
children:
|
|
2035
|
+
const sn = [oe];
|
|
2036
|
+
function nn({
|
|
2037
|
+
children: r,
|
|
1820
2038
|
mapId: e,
|
|
1821
2039
|
defaultProps: {
|
|
1822
|
-
styles: t =
|
|
2040
|
+
styles: t = Qe.styles
|
|
1823
2041
|
} = {
|
|
1824
|
-
styles:
|
|
2042
|
+
styles: Qe.styles
|
|
1825
2043
|
},
|
|
1826
2044
|
layerProps: n = {},
|
|
1827
2045
|
textOptions: s
|
|
1828
2046
|
}) {
|
|
1829
2047
|
const {
|
|
1830
|
-
setDistance:
|
|
1831
|
-
clearLayerOnStart:
|
|
2048
|
+
setDistance: o,
|
|
2049
|
+
clearLayerOnStart: i,
|
|
1832
2050
|
enabled: a,
|
|
1833
|
-
finished:
|
|
1834
|
-
setFinished:
|
|
1835
|
-
locale:
|
|
2051
|
+
finished: c,
|
|
2052
|
+
setFinished: d,
|
|
2053
|
+
locale: l,
|
|
1836
2054
|
setPositions: p,
|
|
1837
|
-
unit:
|
|
2055
|
+
unit: f,
|
|
1838
2056
|
modeInstance: u
|
|
1839
|
-
} =
|
|
2057
|
+
} = ft({
|
|
1840
2058
|
mapId: e
|
|
1841
|
-
}),
|
|
1842
|
-
var
|
|
1843
|
-
return (
|
|
1844
|
-
})),
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
const E =
|
|
1853
|
-
|
|
2059
|
+
}), y = de((_) => _.setLayer), m = D((_) => _.addLayers), L = D((_) => _.removeLayers), h = D(st((_) => {
|
|
2060
|
+
var E;
|
|
2061
|
+
return (E = _.maps[e]) == null ? void 0 : E.layers.filter((P) => !sn.includes(P));
|
|
2062
|
+
})), g = D((_) => _.getDeckInstance), S = ve({}), v = ut({
|
|
2063
|
+
mapId: e
|
|
2064
|
+
});
|
|
2065
|
+
B(() => (a && m(e, [oe]), () => {
|
|
2066
|
+
L(e, [oe]);
|
|
2067
|
+
}), [m, i, e, L, a]), B(() => {
|
|
2068
|
+
h == null || h.forEach((_) => {
|
|
2069
|
+
var O;
|
|
2070
|
+
const E = (O = g(e)) == null ? void 0 : O.props.layers.find((R) => R.props.id === _);
|
|
2071
|
+
a && (S.current[_] = E == null ? void 0 : E.props.pickable);
|
|
2072
|
+
const P = !a && (S.current[_] ?? (E == null ? void 0 : E.props.pickable));
|
|
2073
|
+
y(_, {
|
|
1854
2074
|
props: {
|
|
1855
|
-
pickable:
|
|
2075
|
+
pickable: P
|
|
1856
2076
|
}
|
|
1857
2077
|
});
|
|
1858
2078
|
});
|
|
1859
|
-
}, [a,
|
|
1860
|
-
const
|
|
1861
|
-
editType:
|
|
1862
|
-
editContext:
|
|
2079
|
+
}, [a, g, e, h, y]);
|
|
2080
|
+
const b = G(({
|
|
2081
|
+
editType: _,
|
|
2082
|
+
editContext: E
|
|
1863
2083
|
}) => {
|
|
1864
|
-
if (
|
|
2084
|
+
if (_ === Q.cancel) {
|
|
1865
2085
|
u.resetClickSequence();
|
|
1866
2086
|
return;
|
|
1867
2087
|
}
|
|
1868
|
-
|
|
1869
|
-
const
|
|
1870
|
-
|
|
1871
|
-
}, [u,
|
|
1872
|
-
return
|
|
1873
|
-
const
|
|
2088
|
+
_ === Q.addPosition && o(E.distance), d(!!E.finished);
|
|
2089
|
+
const P = E.positions;
|
|
2090
|
+
P != null && P.length && p(P);
|
|
2091
|
+
}, [u, o, d, p]);
|
|
2092
|
+
return B(() => {
|
|
2093
|
+
const _ = c ? t.colors.finished : t.colors.editing, E = c ? t.colors.finished : t.colors.point, P = Hs({
|
|
1874
2094
|
layerProps: {
|
|
1875
2095
|
...n,
|
|
1876
|
-
pickable: n.pickable ?? !
|
|
2096
|
+
pickable: n.pickable ?? !c
|
|
1877
2097
|
},
|
|
1878
2098
|
enabled: a,
|
|
1879
|
-
guideColor:
|
|
1880
|
-
pointColor:
|
|
1881
|
-
locale:
|
|
1882
|
-
onEdit:
|
|
1883
|
-
unit:
|
|
2099
|
+
guideColor: _,
|
|
2100
|
+
pointColor: E,
|
|
2101
|
+
locale: l,
|
|
2102
|
+
onEdit: b,
|
|
2103
|
+
unit: f,
|
|
1884
2104
|
mode: u,
|
|
1885
|
-
textOptions: s
|
|
2105
|
+
textOptions: s,
|
|
2106
|
+
eventManager: v
|
|
1886
2107
|
});
|
|
1887
|
-
|
|
1888
|
-
}, [
|
|
2108
|
+
y(oe, P);
|
|
2109
|
+
}, [c, u, n, l, b, y, t.colors.editing, t.colors.finished, t.colors.point, s, f, a, v]), r;
|
|
1889
2110
|
}
|
|
1890
|
-
|
|
1891
|
-
function
|
|
1892
|
-
const e =
|
|
2111
|
+
nn.Controls = tn;
|
|
2112
|
+
function on(r) {
|
|
2113
|
+
const e = F(7), {
|
|
1893
2114
|
mapId: t
|
|
1894
|
-
} =
|
|
2115
|
+
} = r;
|
|
1895
2116
|
let n;
|
|
1896
|
-
e[0] !== t ? (n = (
|
|
2117
|
+
e[0] !== t ? (n = (d) => d.maps[t], e[0] = t, e[1] = n) : n = e[1];
|
|
1897
2118
|
const {
|
|
1898
2119
|
layers: s
|
|
1899
|
-
} =
|
|
1900
|
-
let
|
|
1901
|
-
if (e[2] !==
|
|
1902
|
-
let
|
|
1903
|
-
e[5] !==
|
|
2120
|
+
} = D(n), o = de(an);
|
|
2121
|
+
let i, a;
|
|
2122
|
+
if (e[2] !== o || e[3] !== s) {
|
|
2123
|
+
let d;
|
|
2124
|
+
e[5] !== o ? (d = (l) => o[l], e[5] = o, e[6] = d) : d = e[6], a = s.map(d).filter(rn), e[2] = o, e[3] = s, e[4] = a;
|
|
1904
2125
|
} else
|
|
1905
2126
|
a = e[4];
|
|
1906
|
-
return
|
|
2127
|
+
return i = a, i;
|
|
1907
2128
|
}
|
|
1908
|
-
function
|
|
1909
|
-
return !!
|
|
2129
|
+
function rn(r) {
|
|
2130
|
+
return !!r;
|
|
1910
2131
|
}
|
|
1911
|
-
function
|
|
1912
|
-
return
|
|
2132
|
+
function an(r) {
|
|
2133
|
+
return r.layers;
|
|
1913
2134
|
}
|
|
1914
|
-
const We = [
|
|
1915
|
-
function
|
|
1916
|
-
const e =
|
|
2135
|
+
const We = [be, ae, oe];
|
|
2136
|
+
function mt(r) {
|
|
2137
|
+
const e = r.filter((n) => !We.includes(n.props.id)).sort((n, s) => (n.order ?? 1 / 0) - (s.order ?? 1 / 0)), t = We.map((n) => r.find((s) => s.props.id === n)).filter((n) => !!n);
|
|
1917
2138
|
return [...e, ...t];
|
|
1918
2139
|
}
|
|
1919
|
-
const
|
|
1920
|
-
function
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
2140
|
+
const ln = 200;
|
|
2141
|
+
function co(r) {
|
|
2142
|
+
const e = F(44);
|
|
2143
|
+
let t, n, s, o;
|
|
2144
|
+
e[0] !== r ? ({
|
|
2145
|
+
id: t,
|
|
2146
|
+
onLoad: n,
|
|
2147
|
+
onViewStateChange: s,
|
|
2148
|
+
...o
|
|
2149
|
+
} = r, e[0] = r, e[1] = t, e[2] = n, e[3] = s, e[4] = o) : (t = e[1], n = e[2], s = e[3], o = e[4]);
|
|
2150
|
+
let i;
|
|
2151
|
+
e[5] !== t ? (i = (w) => w.maps[t], e[5] = t, e[6] = i) : i = e[6];
|
|
1926
2152
|
const {
|
|
1927
|
-
basemap:
|
|
1928
|
-
instanceRef:
|
|
1929
|
-
overlayRef:
|
|
1930
|
-
} =
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
2153
|
+
basemap: a,
|
|
2154
|
+
instanceRef: c,
|
|
2155
|
+
overlayRef: d
|
|
2156
|
+
} = D(i), l = ve(null);
|
|
2157
|
+
let p;
|
|
2158
|
+
e[7] !== t ? (p = (w) => w.viewStates[t], e[7] = t, e[8] = p) : p = e[8];
|
|
2159
|
+
const f = D(p), u = D(pn), y = D(mn), m = D(fn), L = D(dn), h = D(un);
|
|
2160
|
+
let g;
|
|
2161
|
+
e[9] !== t ? (g = {
|
|
2162
|
+
mapId: t
|
|
2163
|
+
}, e[9] = t, e[10] = g) : g = e[10];
|
|
2164
|
+
const S = on(g);
|
|
2165
|
+
let v, b;
|
|
2166
|
+
e[11] !== S ? (b = mt(S), e[11] = S, e[12] = b) : b = e[12], v = b;
|
|
2167
|
+
const _ = v;
|
|
2168
|
+
let E;
|
|
2169
|
+
e[13] !== t || e[14] !== s || e[15] !== y || e[16] !== h ? (E = (w) => {
|
|
2170
|
+
const A = y;
|
|
2171
|
+
if (w.interactionState.isZooming && (l.current && clearInterval(l.current), l.current = setTimeout(() => {
|
|
2172
|
+
h(t);
|
|
2173
|
+
}, ln)), s) {
|
|
2174
|
+
s(w, A);
|
|
1938
2175
|
return;
|
|
1939
2176
|
}
|
|
1940
|
-
|
|
1941
|
-
}, [
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
2177
|
+
A(t, w.viewState);
|
|
2178
|
+
}, e[13] = t, e[14] = s, e[15] = y, e[16] = h, e[17] = E) : E = e[17];
|
|
2179
|
+
const P = E;
|
|
2180
|
+
let O;
|
|
2181
|
+
e[18] !== t || e[19] !== n || e[20] !== m || e[21] !== h ? (O = (w) => {
|
|
2182
|
+
m(t, w), n == null || n(w), h(t);
|
|
2183
|
+
}, e[18] = t, e[19] = n, e[20] = m, e[21] = h, e[22] = O) : O = e[22];
|
|
2184
|
+
const R = O;
|
|
2185
|
+
let x;
|
|
2186
|
+
e[23] !== u || e[24] !== t || e[25] !== o || e[26] !== L ? (x = (w) => {
|
|
2187
|
+
var Z, H;
|
|
2188
|
+
const A = (Z = u(t)) == null ? void 0 : Z.props.layers, $ = !!(A != null && A.every(cn));
|
|
2189
|
+
L(t, $), (H = o.onAfterRender) == null || H.call(o, w);
|
|
2190
|
+
}, e[23] = u, e[24] = t, e[25] = o, e[26] = L, e[27] = x) : x = e[27];
|
|
2191
|
+
const j = x, q = o.onDragEnd;
|
|
2192
|
+
let M;
|
|
2193
|
+
e[28] !== q || e[29] !== t || e[30] !== h ? (M = (...w) => {
|
|
2194
|
+
const A = w;
|
|
2195
|
+
h(t), q && q(...A);
|
|
2196
|
+
}, e[28] = q, e[29] = t, e[30] = h, e[31] = M) : M = e[31];
|
|
2197
|
+
const T = M;
|
|
2198
|
+
let C;
|
|
2199
|
+
return e[32] !== a || e[33] !== _ || e[34] !== j || e[35] !== T || e[36] !== R || e[37] !== P || e[38] !== t || e[39] !== c || e[40] !== d || e[41] !== o || e[42] !== f ? (C = /* @__PURE__ */ N(ds, { ...o, id: t, layers: _, instanceRef: c, overlayRef: d, basemap: a, initialViewState: f, onLoad: R, onViewStateChange: P, onAfterRender: j, onDragEnd: T }), e[32] = a, e[33] = _, e[34] = j, e[35] = T, e[36] = R, e[37] = P, e[38] = t, e[39] = c, e[40] = d, e[41] = o, e[42] = f, e[43] = C) : C = e[43], C;
|
|
2200
|
+
}
|
|
2201
|
+
function cn(r) {
|
|
2202
|
+
return r == null ? void 0 : r.isLoaded;
|
|
2203
|
+
}
|
|
2204
|
+
function un(r) {
|
|
2205
|
+
return r.updateViewPort;
|
|
2206
|
+
}
|
|
2207
|
+
function dn(r) {
|
|
2208
|
+
return r.setLayersLoad;
|
|
2209
|
+
}
|
|
2210
|
+
function fn(r) {
|
|
2211
|
+
return r.setLoad;
|
|
2212
|
+
}
|
|
2213
|
+
function mn(r) {
|
|
2214
|
+
return r.setViewState;
|
|
2215
|
+
}
|
|
2216
|
+
function pn(r) {
|
|
2217
|
+
return r.getDeckInstance;
|
|
2218
|
+
}
|
|
2219
|
+
const gn = "https://gcp-us-east1.api.carto.com", yn = "ps", hn = tt((r) => ({
|
|
1953
2220
|
sources: {},
|
|
1954
|
-
setSource: (e, t) =>
|
|
2221
|
+
setSource: (e, t) => r((n) => {
|
|
1955
2222
|
const s = {
|
|
1956
2223
|
...n.sources
|
|
1957
2224
|
};
|
|
@@ -1959,31 +2226,47 @@ const sn = "https://gcp-us-east1.api.carto.com", nn = "ps", on = et((o) => ({
|
|
|
1959
2226
|
return delete s[e], {
|
|
1960
2227
|
sources: s
|
|
1961
2228
|
};
|
|
1962
|
-
const
|
|
2229
|
+
const o = {
|
|
1963
2230
|
...s[e] ?? {
|
|
1964
|
-
apiBaseUrl:
|
|
1965
|
-
clientId:
|
|
2231
|
+
apiBaseUrl: gn,
|
|
2232
|
+
clientId: yn
|
|
1966
2233
|
},
|
|
1967
2234
|
...t
|
|
1968
|
-
},
|
|
1969
|
-
source:
|
|
2235
|
+
}, i = vn({
|
|
2236
|
+
source: o
|
|
1970
2237
|
});
|
|
1971
|
-
return
|
|
2238
|
+
return o.widgets = i, s[e] = o, {
|
|
1972
2239
|
sources: s
|
|
1973
2240
|
};
|
|
2241
|
+
}),
|
|
2242
|
+
setFilters: (e, t) => r((n) => {
|
|
2243
|
+
let s = {};
|
|
2244
|
+
const o = n.sources[e] ?? {};
|
|
2245
|
+
return t.length !== 0 && (s = t.reduce((i, a) => {
|
|
2246
|
+
var c;
|
|
2247
|
+
return !("values" in a) || !((c = a.values) != null && c.length) ? (i = Gt(i, a), i) : (i = zt(i, a), i);
|
|
2248
|
+
}, (o == null ? void 0 : o.filters) ?? {})), {
|
|
2249
|
+
sources: {
|
|
2250
|
+
...n.sources,
|
|
2251
|
+
[e]: {
|
|
2252
|
+
...o,
|
|
2253
|
+
filters: s
|
|
2254
|
+
}
|
|
2255
|
+
}
|
|
2256
|
+
};
|
|
1974
2257
|
})
|
|
1975
2258
|
}));
|
|
1976
|
-
function
|
|
1977
|
-
const e =
|
|
2259
|
+
function Sn(r) {
|
|
2260
|
+
const e = F(2);
|
|
1978
2261
|
let t;
|
|
1979
|
-
return e[0] !==
|
|
2262
|
+
return e[0] !== r ? (t = (n) => n.sources[r], e[0] = r, e[1] = t) : t = e[1], hn(t);
|
|
1980
2263
|
}
|
|
1981
|
-
function
|
|
1982
|
-
source:
|
|
2264
|
+
function vn({
|
|
2265
|
+
source: r
|
|
1983
2266
|
}) {
|
|
1984
2267
|
const e = {
|
|
1985
2268
|
query: () => {
|
|
1986
|
-
const s =
|
|
2269
|
+
const s = r;
|
|
1987
2270
|
return new Yt({
|
|
1988
2271
|
...s,
|
|
1989
2272
|
accessToken: "",
|
|
@@ -1992,7 +2275,7 @@ function an({
|
|
|
1992
2275
|
});
|
|
1993
2276
|
},
|
|
1994
2277
|
table: () => {
|
|
1995
|
-
const s =
|
|
2278
|
+
const s = r;
|
|
1996
2279
|
return new Wt({
|
|
1997
2280
|
...s,
|
|
1998
2281
|
accessToken: "",
|
|
@@ -2001,18 +2284,18 @@ function an({
|
|
|
2001
2284
|
});
|
|
2002
2285
|
},
|
|
2003
2286
|
tileset: () => {
|
|
2004
|
-
const s =
|
|
2287
|
+
const s = r;
|
|
2005
2288
|
return new Zt({
|
|
2006
2289
|
...s,
|
|
2007
2290
|
accessToken: "",
|
|
2008
2291
|
tableName: s.data,
|
|
2009
|
-
tileFormat: s.tileFormat ??
|
|
2292
|
+
tileFormat: s.tileFormat ?? Kt.BINARY,
|
|
2010
2293
|
spatialDataType: s.spatialDataType ?? "geo"
|
|
2011
2294
|
});
|
|
2012
2295
|
},
|
|
2013
2296
|
raster: () => {
|
|
2014
|
-
const s =
|
|
2015
|
-
return s.rasterMetadata ? new
|
|
2297
|
+
const s = r;
|
|
2298
|
+
return s.rasterMetadata ? new Qt({
|
|
2016
2299
|
...s,
|
|
2017
2300
|
accessToken: "",
|
|
2018
2301
|
tableName: s.data,
|
|
@@ -2020,699 +2303,698 @@ function an({
|
|
|
2020
2303
|
rasterMetadata: s.rasterMetadata
|
|
2021
2304
|
}) : null;
|
|
2022
2305
|
}
|
|
2023
|
-
}, t =
|
|
2306
|
+
}, t = r.type.split("+")[0], n = e[t];
|
|
2024
2307
|
return n == null ? void 0 : n();
|
|
2025
2308
|
}
|
|
2026
|
-
function
|
|
2027
|
-
const t =
|
|
2028
|
-
return
|
|
2309
|
+
function se(r, e) {
|
|
2310
|
+
const t = Sn(e);
|
|
2311
|
+
return J(() => {
|
|
2029
2312
|
const n = t == null ? void 0 : t.widgets;
|
|
2030
|
-
return !n || !
|
|
2031
|
-
}, [
|
|
2313
|
+
return !n || !r ? null : (n.props.accessToken = r, n);
|
|
2314
|
+
}, [r, t]);
|
|
2032
2315
|
}
|
|
2033
|
-
function
|
|
2034
|
-
const e =
|
|
2316
|
+
function bn(r) {
|
|
2317
|
+
const e = F(18), {
|
|
2035
2318
|
accessToken: t,
|
|
2036
2319
|
sourceId: n,
|
|
2037
2320
|
widgetProps: s,
|
|
2038
|
-
useQueryProps:
|
|
2039
|
-
} =
|
|
2040
|
-
let
|
|
2041
|
-
e[0] !==
|
|
2042
|
-
let a,
|
|
2043
|
-
e[2] !==
|
|
2321
|
+
useQueryProps: o
|
|
2322
|
+
} = r;
|
|
2323
|
+
let i;
|
|
2324
|
+
e[0] !== o ? (i = o === void 0 ? {} : o, e[0] = o, e[1] = i) : i = e[1];
|
|
2325
|
+
let a, c;
|
|
2326
|
+
e[2] !== i ? ({
|
|
2044
2327
|
enabled: a,
|
|
2045
|
-
...
|
|
2046
|
-
} =
|
|
2047
|
-
const
|
|
2048
|
-
let d;
|
|
2049
|
-
e[5] !== t || e[6] !== n || e[7] !== p || e[8] !== s ? (d = ["categories", n, t, s, p], e[5] = t, e[6] = n, e[7] = p, e[8] = s, e[9] = d) : d = e[9];
|
|
2050
|
-
let u;
|
|
2051
|
-
e[10] !== c || e[11] !== s ? (u = () => c == null ? void 0 : c.getCategories(s), e[10] = c, e[11] = s, e[12] = u) : u = e[12];
|
|
2052
|
-
const g = !!c && m;
|
|
2328
|
+
...c
|
|
2329
|
+
} = i, e[2] = i, e[3] = a, e[4] = c) : (a = e[3], c = e[4]);
|
|
2330
|
+
const d = a === void 0 ? !0 : a, l = se(t, n), p = l == null ? void 0 : l.props.filters;
|
|
2053
2331
|
let f;
|
|
2054
|
-
|
|
2055
|
-
|
|
2332
|
+
e[5] !== t || e[6] !== n || e[7] !== p || e[8] !== s ? (f = ["categories", n, t, s, p], e[5] = t, e[6] = n, e[7] = p, e[8] = s, e[9] = f) : f = e[9];
|
|
2333
|
+
let u;
|
|
2334
|
+
e[10] !== l || e[11] !== s ? (u = () => l == null ? void 0 : l.getCategories(s), e[10] = l, e[11] = s, e[12] = u) : u = e[12];
|
|
2335
|
+
const y = !!l && d;
|
|
2336
|
+
let m;
|
|
2337
|
+
return e[13] !== f || e[14] !== u || e[15] !== y || e[16] !== c ? (m = {
|
|
2338
|
+
queryKey: f,
|
|
2056
2339
|
queryFn: u,
|
|
2057
|
-
enabled:
|
|
2058
|
-
...
|
|
2059
|
-
}, e[13] =
|
|
2340
|
+
enabled: y,
|
|
2341
|
+
...c
|
|
2342
|
+
}, e[13] = f, e[14] = u, e[15] = y, e[16] = c, e[17] = m) : m = e[17], te(m);
|
|
2060
2343
|
}
|
|
2061
|
-
function
|
|
2062
|
-
const e =
|
|
2344
|
+
function uo(r) {
|
|
2345
|
+
const e = F(6);
|
|
2063
2346
|
let t, n;
|
|
2064
|
-
e[0] !==
|
|
2347
|
+
e[0] !== r ? ({
|
|
2065
2348
|
children: t,
|
|
2066
2349
|
...n
|
|
2067
|
-
} =
|
|
2068
|
-
const s =
|
|
2069
|
-
let
|
|
2070
|
-
return e[3] !== t || e[4] !== s ? (
|
|
2350
|
+
} = r, e[0] = r, e[1] = t, e[2] = n) : (t = e[1], n = e[2]);
|
|
2351
|
+
const s = bn(n);
|
|
2352
|
+
let o;
|
|
2353
|
+
return e[3] !== t || e[4] !== s ? (o = t(s), e[3] = t, e[4] = s, e[5] = o) : o = e[5], o;
|
|
2071
2354
|
}
|
|
2072
|
-
function
|
|
2073
|
-
const e =
|
|
2355
|
+
function Mn(r) {
|
|
2356
|
+
const e = F(18), {
|
|
2074
2357
|
accessToken: t,
|
|
2075
2358
|
sourceId: n,
|
|
2076
2359
|
widgetProps: s,
|
|
2077
|
-
useQueryProps:
|
|
2078
|
-
} =
|
|
2079
|
-
let
|
|
2080
|
-
e[0] !==
|
|
2081
|
-
let a,
|
|
2082
|
-
e[2] !==
|
|
2360
|
+
useQueryProps: o
|
|
2361
|
+
} = r;
|
|
2362
|
+
let i;
|
|
2363
|
+
e[0] !== o ? (i = o === void 0 ? {} : o, e[0] = o, e[1] = i) : i = e[1];
|
|
2364
|
+
let a, c;
|
|
2365
|
+
e[2] !== i ? ({
|
|
2083
2366
|
enabled: a,
|
|
2084
|
-
...
|
|
2085
|
-
} =
|
|
2086
|
-
const
|
|
2087
|
-
let d;
|
|
2088
|
-
e[5] !== t || e[6] !== n || e[7] !== p || e[8] !== s ? (d = ["features", n, t, s, p], e[5] = t, e[6] = n, e[7] = p, e[8] = s, e[9] = d) : d = e[9];
|
|
2089
|
-
let u;
|
|
2090
|
-
e[10] !== c || e[11] !== s ? (u = () => c == null ? void 0 : c.getFeatures(s), e[10] = c, e[11] = s, e[12] = u) : u = e[12];
|
|
2091
|
-
const g = !!c && m;
|
|
2367
|
+
...c
|
|
2368
|
+
} = i, e[2] = i, e[3] = a, e[4] = c) : (a = e[3], c = e[4]);
|
|
2369
|
+
const d = a === void 0 ? !0 : a, l = se(t, n), p = l == null ? void 0 : l.props.filters;
|
|
2092
2370
|
let f;
|
|
2093
|
-
|
|
2094
|
-
|
|
2371
|
+
e[5] !== t || e[6] !== n || e[7] !== p || e[8] !== s ? (f = ["features", n, t, s, p], e[5] = t, e[6] = n, e[7] = p, e[8] = s, e[9] = f) : f = e[9];
|
|
2372
|
+
let u;
|
|
2373
|
+
e[10] !== l || e[11] !== s ? (u = () => l == null ? void 0 : l.getFeatures(s), e[10] = l, e[11] = s, e[12] = u) : u = e[12];
|
|
2374
|
+
const y = !!l && d;
|
|
2375
|
+
let m;
|
|
2376
|
+
return e[13] !== f || e[14] !== u || e[15] !== y || e[16] !== c ? (m = {
|
|
2377
|
+
queryKey: f,
|
|
2095
2378
|
queryFn: u,
|
|
2096
|
-
enabled:
|
|
2097
|
-
...
|
|
2098
|
-
}, e[13] =
|
|
2379
|
+
enabled: y,
|
|
2380
|
+
...c
|
|
2381
|
+
}, e[13] = f, e[14] = u, e[15] = y, e[16] = c, e[17] = m) : m = e[17], te(m);
|
|
2099
2382
|
}
|
|
2100
|
-
function
|
|
2101
|
-
const e =
|
|
2383
|
+
function fo(r) {
|
|
2384
|
+
const e = F(6);
|
|
2102
2385
|
let t, n;
|
|
2103
|
-
e[0] !==
|
|
2386
|
+
e[0] !== r ? ({
|
|
2104
2387
|
children: t,
|
|
2105
2388
|
...n
|
|
2106
|
-
} =
|
|
2107
|
-
const s =
|
|
2108
|
-
let
|
|
2109
|
-
return e[3] !== t || e[4] !== s ? (
|
|
2389
|
+
} = r, e[0] = r, e[1] = t, e[2] = n) : (t = e[1], n = e[2]);
|
|
2390
|
+
const s = Mn(n);
|
|
2391
|
+
let o;
|
|
2392
|
+
return e[3] !== t || e[4] !== s ? (o = t(s), e[3] = t, e[4] = s, e[5] = o) : o = e[5], o;
|
|
2110
2393
|
}
|
|
2111
|
-
function
|
|
2112
|
-
const e =
|
|
2394
|
+
function _n(r) {
|
|
2395
|
+
const e = F(18), {
|
|
2113
2396
|
accessToken: t,
|
|
2114
2397
|
sourceId: n,
|
|
2115
2398
|
widgetProps: s,
|
|
2116
|
-
useQueryProps:
|
|
2117
|
-
} =
|
|
2118
|
-
let
|
|
2119
|
-
e[0] !==
|
|
2120
|
-
let a,
|
|
2121
|
-
e[2] !==
|
|
2399
|
+
useQueryProps: o
|
|
2400
|
+
} = r;
|
|
2401
|
+
let i;
|
|
2402
|
+
e[0] !== o ? (i = o === void 0 ? {} : o, e[0] = o, e[1] = i) : i = e[1];
|
|
2403
|
+
let a, c;
|
|
2404
|
+
e[2] !== i ? ({
|
|
2122
2405
|
enabled: a,
|
|
2123
|
-
...
|
|
2124
|
-
} =
|
|
2125
|
-
const
|
|
2126
|
-
let d;
|
|
2127
|
-
e[5] !== t || e[6] !== n || e[7] !== p || e[8] !== s ? (d = ["formula", n, t, s, p], e[5] = t, e[6] = n, e[7] = p, e[8] = s, e[9] = d) : d = e[9];
|
|
2128
|
-
let u;
|
|
2129
|
-
e[10] !== c || e[11] !== s ? (u = () => c == null ? void 0 : c.getFormula(s), e[10] = c, e[11] = s, e[12] = u) : u = e[12];
|
|
2130
|
-
const g = !!c && m;
|
|
2406
|
+
...c
|
|
2407
|
+
} = i, e[2] = i, e[3] = a, e[4] = c) : (a = e[3], c = e[4]);
|
|
2408
|
+
const d = a === void 0 ? !0 : a, l = se(t, n), p = l == null ? void 0 : l.props.filters;
|
|
2131
2409
|
let f;
|
|
2132
|
-
|
|
2133
|
-
|
|
2410
|
+
e[5] !== t || e[6] !== n || e[7] !== p || e[8] !== s ? (f = ["formula", n, t, s, p], e[5] = t, e[6] = n, e[7] = p, e[8] = s, e[9] = f) : f = e[9];
|
|
2411
|
+
let u;
|
|
2412
|
+
e[10] !== l || e[11] !== s ? (u = () => l == null ? void 0 : l.getFormula(s), e[10] = l, e[11] = s, e[12] = u) : u = e[12];
|
|
2413
|
+
const y = !!l && d;
|
|
2414
|
+
let m;
|
|
2415
|
+
return e[13] !== f || e[14] !== u || e[15] !== y || e[16] !== c ? (m = {
|
|
2416
|
+
queryKey: f,
|
|
2134
2417
|
queryFn: u,
|
|
2135
|
-
enabled:
|
|
2136
|
-
...
|
|
2137
|
-
}, e[13] =
|
|
2418
|
+
enabled: y,
|
|
2419
|
+
...c
|
|
2420
|
+
}, e[13] = f, e[14] = u, e[15] = y, e[16] = c, e[17] = m) : m = e[17], te(m);
|
|
2138
2421
|
}
|
|
2139
|
-
function
|
|
2140
|
-
const e =
|
|
2422
|
+
function mo(r) {
|
|
2423
|
+
const e = F(6);
|
|
2141
2424
|
let t, n;
|
|
2142
|
-
e[0] !==
|
|
2425
|
+
e[0] !== r ? ({
|
|
2143
2426
|
children: t,
|
|
2144
2427
|
...n
|
|
2145
|
-
} =
|
|
2146
|
-
const s =
|
|
2147
|
-
let
|
|
2148
|
-
return e[3] !== t || e[4] !== s ? (
|
|
2428
|
+
} = r, e[0] = r, e[1] = t, e[2] = n) : (t = e[1], n = e[2]);
|
|
2429
|
+
const s = _n(n);
|
|
2430
|
+
let o;
|
|
2431
|
+
return e[3] !== t || e[4] !== s ? (o = t(s), e[3] = t, e[4] = s, e[5] = o) : o = e[5], o;
|
|
2149
2432
|
}
|
|
2150
|
-
function
|
|
2151
|
-
const e =
|
|
2433
|
+
function Ln(r) {
|
|
2434
|
+
const e = F(18), {
|
|
2152
2435
|
accessToken: t,
|
|
2153
2436
|
sourceId: n,
|
|
2154
2437
|
widgetProps: s,
|
|
2155
|
-
useQueryProps:
|
|
2156
|
-
} =
|
|
2157
|
-
let
|
|
2158
|
-
e[0] !==
|
|
2159
|
-
let a,
|
|
2160
|
-
e[2] !==
|
|
2438
|
+
useQueryProps: o
|
|
2439
|
+
} = r;
|
|
2440
|
+
let i;
|
|
2441
|
+
e[0] !== o ? (i = o === void 0 ? {} : o, e[0] = o, e[1] = i) : i = e[1];
|
|
2442
|
+
let a, c;
|
|
2443
|
+
e[2] !== i ? ({
|
|
2161
2444
|
enabled: a,
|
|
2162
|
-
...
|
|
2163
|
-
} =
|
|
2164
|
-
const
|
|
2165
|
-
let d;
|
|
2166
|
-
e[5] !== t || e[6] !== n || e[7] !== p || e[8] !== s ? (d = ["histogram", n, t, s, p], e[5] = t, e[6] = n, e[7] = p, e[8] = s, e[9] = d) : d = e[9];
|
|
2167
|
-
let u;
|
|
2168
|
-
e[10] !== c || e[11] !== s ? (u = () => c == null ? void 0 : c.getHistogram(s), e[10] = c, e[11] = s, e[12] = u) : u = e[12];
|
|
2169
|
-
const g = !!c && m;
|
|
2445
|
+
...c
|
|
2446
|
+
} = i, e[2] = i, e[3] = a, e[4] = c) : (a = e[3], c = e[4]);
|
|
2447
|
+
const d = a === void 0 ? !0 : a, l = se(t, n), p = l == null ? void 0 : l.props.filters;
|
|
2170
2448
|
let f;
|
|
2171
|
-
|
|
2172
|
-
|
|
2449
|
+
e[5] !== t || e[6] !== n || e[7] !== p || e[8] !== s ? (f = ["histogram", n, t, s, p], e[5] = t, e[6] = n, e[7] = p, e[8] = s, e[9] = f) : f = e[9];
|
|
2450
|
+
let u;
|
|
2451
|
+
e[10] !== l || e[11] !== s ? (u = () => l == null ? void 0 : l.getHistogram(s), e[10] = l, e[11] = s, e[12] = u) : u = e[12];
|
|
2452
|
+
const y = !!l && d;
|
|
2453
|
+
let m;
|
|
2454
|
+
return e[13] !== f || e[14] !== u || e[15] !== y || e[16] !== c ? (m = {
|
|
2455
|
+
queryKey: f,
|
|
2173
2456
|
queryFn: u,
|
|
2174
|
-
enabled:
|
|
2175
|
-
...
|
|
2176
|
-
}, e[13] =
|
|
2457
|
+
enabled: y,
|
|
2458
|
+
...c
|
|
2459
|
+
}, e[13] = f, e[14] = u, e[15] = y, e[16] = c, e[17] = m) : m = e[17], te(m);
|
|
2177
2460
|
}
|
|
2178
|
-
function
|
|
2179
|
-
const e =
|
|
2461
|
+
function po(r) {
|
|
2462
|
+
const e = F(6);
|
|
2180
2463
|
let t, n;
|
|
2181
|
-
e[0] !==
|
|
2464
|
+
e[0] !== r ? ({
|
|
2182
2465
|
children: t,
|
|
2183
2466
|
...n
|
|
2184
|
-
} =
|
|
2185
|
-
const s =
|
|
2186
|
-
let
|
|
2187
|
-
return e[3] !== t || e[4] !== s ? (
|
|
2467
|
+
} = r, e[0] = r, e[1] = t, e[2] = n) : (t = e[1], n = e[2]);
|
|
2468
|
+
const s = Ln(n);
|
|
2469
|
+
let o;
|
|
2470
|
+
return e[3] !== t || e[4] !== s ? (o = t(s), e[3] = t, e[4] = s, e[5] = o) : o = e[5], o;
|
|
2188
2471
|
}
|
|
2189
|
-
function
|
|
2190
|
-
const e =
|
|
2472
|
+
function Tn(r) {
|
|
2473
|
+
const e = F(18), {
|
|
2191
2474
|
accessToken: t,
|
|
2192
2475
|
sourceId: n,
|
|
2193
2476
|
widgetProps: s,
|
|
2194
|
-
useQueryProps:
|
|
2195
|
-
} =
|
|
2196
|
-
let
|
|
2197
|
-
e[0] !==
|
|
2198
|
-
let a,
|
|
2199
|
-
e[2] !==
|
|
2477
|
+
useQueryProps: o
|
|
2478
|
+
} = r;
|
|
2479
|
+
let i;
|
|
2480
|
+
e[0] !== o ? (i = o === void 0 ? {} : o, e[0] = o, e[1] = i) : i = e[1];
|
|
2481
|
+
let a, c;
|
|
2482
|
+
e[2] !== i ? ({
|
|
2200
2483
|
enabled: a,
|
|
2201
|
-
...
|
|
2202
|
-
} =
|
|
2203
|
-
const
|
|
2204
|
-
let d;
|
|
2205
|
-
e[5] !== t || e[6] !== n || e[7] !== p || e[8] !== s ? (d = ["range", n, t, s, p], e[5] = t, e[6] = n, e[7] = p, e[8] = s, e[9] = d) : d = e[9];
|
|
2206
|
-
let u;
|
|
2207
|
-
e[10] !== c || e[11] !== s ? (u = () => c == null ? void 0 : c.getRange(s), e[10] = c, e[11] = s, e[12] = u) : u = e[12];
|
|
2208
|
-
const g = !!c && m;
|
|
2484
|
+
...c
|
|
2485
|
+
} = i, e[2] = i, e[3] = a, e[4] = c) : (a = e[3], c = e[4]);
|
|
2486
|
+
const d = a === void 0 ? !0 : a, l = se(t, n), p = l == null ? void 0 : l.props.filters;
|
|
2209
2487
|
let f;
|
|
2210
|
-
|
|
2211
|
-
|
|
2488
|
+
e[5] !== t || e[6] !== n || e[7] !== p || e[8] !== s ? (f = ["range", n, t, s, p], e[5] = t, e[6] = n, e[7] = p, e[8] = s, e[9] = f) : f = e[9];
|
|
2489
|
+
let u;
|
|
2490
|
+
e[10] !== l || e[11] !== s ? (u = () => l == null ? void 0 : l.getRange(s), e[10] = l, e[11] = s, e[12] = u) : u = e[12];
|
|
2491
|
+
const y = !!l && d;
|
|
2492
|
+
let m;
|
|
2493
|
+
return e[13] !== f || e[14] !== u || e[15] !== y || e[16] !== c ? (m = {
|
|
2494
|
+
queryKey: f,
|
|
2212
2495
|
queryFn: u,
|
|
2213
|
-
enabled:
|
|
2214
|
-
...
|
|
2215
|
-
}, e[13] =
|
|
2496
|
+
enabled: y,
|
|
2497
|
+
...c
|
|
2498
|
+
}, e[13] = f, e[14] = u, e[15] = y, e[16] = c, e[17] = m) : m = e[17], te(m);
|
|
2216
2499
|
}
|
|
2217
|
-
function
|
|
2218
|
-
const e =
|
|
2500
|
+
function go(r) {
|
|
2501
|
+
const e = F(6);
|
|
2219
2502
|
let t, n;
|
|
2220
|
-
e[0] !==
|
|
2503
|
+
e[0] !== r ? ({
|
|
2221
2504
|
children: t,
|
|
2222
2505
|
...n
|
|
2223
|
-
} =
|
|
2224
|
-
const s =
|
|
2225
|
-
let
|
|
2226
|
-
return e[3] !== t || e[4] !== s ? (
|
|
2506
|
+
} = r, e[0] = r, e[1] = t, e[2] = n) : (t = e[1], n = e[2]);
|
|
2507
|
+
const s = Tn(n);
|
|
2508
|
+
let o;
|
|
2509
|
+
return e[3] !== t || e[4] !== s ? (o = t(s), e[3] = t, e[4] = s, e[5] = o) : o = e[5], o;
|
|
2227
2510
|
}
|
|
2228
|
-
function
|
|
2229
|
-
const e =
|
|
2511
|
+
function En(r) {
|
|
2512
|
+
const e = F(18), {
|
|
2230
2513
|
accessToken: t,
|
|
2231
2514
|
sourceId: n,
|
|
2232
2515
|
widgetProps: s,
|
|
2233
|
-
useQueryProps:
|
|
2234
|
-
} =
|
|
2235
|
-
let
|
|
2236
|
-
e[0] !==
|
|
2237
|
-
let a,
|
|
2238
|
-
e[2] !==
|
|
2516
|
+
useQueryProps: o
|
|
2517
|
+
} = r;
|
|
2518
|
+
let i;
|
|
2519
|
+
e[0] !== o ? (i = o === void 0 ? {} : o, e[0] = o, e[1] = i) : i = e[1];
|
|
2520
|
+
let a, c;
|
|
2521
|
+
e[2] !== i ? ({
|
|
2239
2522
|
enabled: a,
|
|
2240
|
-
...
|
|
2241
|
-
} =
|
|
2242
|
-
const
|
|
2243
|
-
let d;
|
|
2244
|
-
e[5] !== t || e[6] !== n || e[7] !== p || e[8] !== s ? (d = ["scatter", n, t, s, p], e[5] = t, e[6] = n, e[7] = p, e[8] = s, e[9] = d) : d = e[9];
|
|
2245
|
-
let u;
|
|
2246
|
-
e[10] !== c || e[11] !== s ? (u = () => c == null ? void 0 : c.getScatter(s), e[10] = c, e[11] = s, e[12] = u) : u = e[12];
|
|
2247
|
-
const g = !!c && m;
|
|
2523
|
+
...c
|
|
2524
|
+
} = i, e[2] = i, e[3] = a, e[4] = c) : (a = e[3], c = e[4]);
|
|
2525
|
+
const d = a === void 0 ? !0 : a, l = se(t, n), p = l == null ? void 0 : l.props.filters;
|
|
2248
2526
|
let f;
|
|
2249
|
-
|
|
2250
|
-
|
|
2527
|
+
e[5] !== t || e[6] !== n || e[7] !== p || e[8] !== s ? (f = ["scatter", n, t, s, p], e[5] = t, e[6] = n, e[7] = p, e[8] = s, e[9] = f) : f = e[9];
|
|
2528
|
+
let u;
|
|
2529
|
+
e[10] !== l || e[11] !== s ? (u = () => l == null ? void 0 : l.getScatter(s), e[10] = l, e[11] = s, e[12] = u) : u = e[12];
|
|
2530
|
+
const y = !!l && d;
|
|
2531
|
+
let m;
|
|
2532
|
+
return e[13] !== f || e[14] !== u || e[15] !== y || e[16] !== c ? (m = {
|
|
2533
|
+
queryKey: f,
|
|
2251
2534
|
queryFn: u,
|
|
2252
|
-
enabled:
|
|
2253
|
-
...
|
|
2254
|
-
}, e[13] =
|
|
2535
|
+
enabled: y,
|
|
2536
|
+
...c
|
|
2537
|
+
}, e[13] = f, e[14] = u, e[15] = y, e[16] = c, e[17] = m) : m = e[17], te(m);
|
|
2255
2538
|
}
|
|
2256
|
-
function
|
|
2257
|
-
const e =
|
|
2539
|
+
function yo(r) {
|
|
2540
|
+
const e = F(6);
|
|
2258
2541
|
let t, n;
|
|
2259
|
-
e[0] !==
|
|
2542
|
+
e[0] !== r ? ({
|
|
2260
2543
|
children: t,
|
|
2261
2544
|
...n
|
|
2262
|
-
} =
|
|
2263
|
-
const s =
|
|
2264
|
-
let
|
|
2265
|
-
return e[3] !== t || e[4] !== s ? (
|
|
2545
|
+
} = r, e[0] = r, e[1] = t, e[2] = n) : (t = e[1], n = e[2]);
|
|
2546
|
+
const s = En(n);
|
|
2547
|
+
let o;
|
|
2548
|
+
return e[3] !== t || e[4] !== s ? (o = t(s), e[3] = t, e[4] = s, e[5] = o) : o = e[5], o;
|
|
2266
2549
|
}
|
|
2267
|
-
function
|
|
2268
|
-
const e =
|
|
2550
|
+
function kn(r) {
|
|
2551
|
+
const e = F(18), {
|
|
2269
2552
|
accessToken: t,
|
|
2270
2553
|
sourceId: n,
|
|
2271
2554
|
widgetProps: s,
|
|
2272
|
-
useQueryProps:
|
|
2273
|
-
} =
|
|
2274
|
-
let
|
|
2275
|
-
e[0] !==
|
|
2276
|
-
let a,
|
|
2277
|
-
e[2] !==
|
|
2555
|
+
useQueryProps: o
|
|
2556
|
+
} = r;
|
|
2557
|
+
let i;
|
|
2558
|
+
e[0] !== o ? (i = o === void 0 ? {} : o, e[0] = o, e[1] = i) : i = e[1];
|
|
2559
|
+
let a, c;
|
|
2560
|
+
e[2] !== i ? ({
|
|
2278
2561
|
enabled: a,
|
|
2279
|
-
...
|
|
2280
|
-
} =
|
|
2281
|
-
const
|
|
2282
|
-
let d;
|
|
2283
|
-
e[5] !== t || e[6] !== n || e[7] !== p || e[8] !== s ? (d = ["table", n, t, s, p], e[5] = t, e[6] = n, e[7] = p, e[8] = s, e[9] = d) : d = e[9];
|
|
2284
|
-
let u;
|
|
2285
|
-
e[10] !== c || e[11] !== s ? (u = () => c == null ? void 0 : c.getTable(s), e[10] = c, e[11] = s, e[12] = u) : u = e[12];
|
|
2286
|
-
const g = !!c && m;
|
|
2562
|
+
...c
|
|
2563
|
+
} = i, e[2] = i, e[3] = a, e[4] = c) : (a = e[3], c = e[4]);
|
|
2564
|
+
const d = a === void 0 ? !0 : a, l = se(t, n), p = l == null ? void 0 : l.props.filters;
|
|
2287
2565
|
let f;
|
|
2288
|
-
|
|
2289
|
-
|
|
2566
|
+
e[5] !== t || e[6] !== n || e[7] !== p || e[8] !== s ? (f = ["table", n, t, s, p], e[5] = t, e[6] = n, e[7] = p, e[8] = s, e[9] = f) : f = e[9];
|
|
2567
|
+
let u;
|
|
2568
|
+
e[10] !== l || e[11] !== s ? (u = () => l == null ? void 0 : l.getTable(s), e[10] = l, e[11] = s, e[12] = u) : u = e[12];
|
|
2569
|
+
const y = !!l && d;
|
|
2570
|
+
let m;
|
|
2571
|
+
return e[13] !== f || e[14] !== u || e[15] !== y || e[16] !== c ? (m = {
|
|
2572
|
+
queryKey: f,
|
|
2290
2573
|
queryFn: u,
|
|
2291
|
-
enabled:
|
|
2292
|
-
...
|
|
2293
|
-
}, e[13] =
|
|
2574
|
+
enabled: y,
|
|
2575
|
+
...c
|
|
2576
|
+
}, e[13] = f, e[14] = u, e[15] = y, e[16] = c, e[17] = m) : m = e[17], te(m);
|
|
2294
2577
|
}
|
|
2295
|
-
function
|
|
2296
|
-
const e =
|
|
2578
|
+
function ho(r) {
|
|
2579
|
+
const e = F(6);
|
|
2297
2580
|
let t, n;
|
|
2298
|
-
e[0] !==
|
|
2581
|
+
e[0] !== r ? ({
|
|
2299
2582
|
children: t,
|
|
2300
2583
|
...n
|
|
2301
|
-
} =
|
|
2302
|
-
const s =
|
|
2303
|
-
let
|
|
2304
|
-
return e[3] !== t || e[4] !== s ? (
|
|
2584
|
+
} = r, e[0] = r, e[1] = t, e[2] = n) : (t = e[1], n = e[2]);
|
|
2585
|
+
const s = kn(n);
|
|
2586
|
+
let o;
|
|
2587
|
+
return e[3] !== t || e[4] !== s ? (o = t(s), e[3] = t, e[4] = s, e[5] = o) : o = e[5], o;
|
|
2305
2588
|
}
|
|
2306
|
-
function
|
|
2307
|
-
const e =
|
|
2589
|
+
function Pn(r) {
|
|
2590
|
+
const e = F(18), {
|
|
2308
2591
|
accessToken: t,
|
|
2309
2592
|
sourceId: n,
|
|
2310
2593
|
widgetProps: s,
|
|
2311
|
-
useQueryProps:
|
|
2312
|
-
} =
|
|
2313
|
-
let
|
|
2314
|
-
e[0] !==
|
|
2315
|
-
let a,
|
|
2316
|
-
e[2] !==
|
|
2594
|
+
useQueryProps: o
|
|
2595
|
+
} = r;
|
|
2596
|
+
let i;
|
|
2597
|
+
e[0] !== o ? (i = o === void 0 ? {} : o, e[0] = o, e[1] = i) : i = e[1];
|
|
2598
|
+
let a, c;
|
|
2599
|
+
e[2] !== i ? ({
|
|
2317
2600
|
enabled: a,
|
|
2318
|
-
...
|
|
2319
|
-
} =
|
|
2320
|
-
const
|
|
2321
|
-
let d;
|
|
2322
|
-
e[5] !== t || e[6] !== n || e[7] !== p || e[8] !== s ? (d = ["time-series", n, t, s, p], e[5] = t, e[6] = n, e[7] = p, e[8] = s, e[9] = d) : d = e[9];
|
|
2323
|
-
let u;
|
|
2324
|
-
e[10] !== c || e[11] !== s ? (u = () => c == null ? void 0 : c.getTimeSeries(s), e[10] = c, e[11] = s, e[12] = u) : u = e[12];
|
|
2325
|
-
const g = !!c && m;
|
|
2601
|
+
...c
|
|
2602
|
+
} = i, e[2] = i, e[3] = a, e[4] = c) : (a = e[3], c = e[4]);
|
|
2603
|
+
const d = a === void 0 ? !0 : a, l = se(t, n), p = l == null ? void 0 : l.props.filters;
|
|
2326
2604
|
let f;
|
|
2327
|
-
|
|
2328
|
-
|
|
2605
|
+
e[5] !== t || e[6] !== n || e[7] !== p || e[8] !== s ? (f = ["time-series", n, t, s, p], e[5] = t, e[6] = n, e[7] = p, e[8] = s, e[9] = f) : f = e[9];
|
|
2606
|
+
let u;
|
|
2607
|
+
e[10] !== l || e[11] !== s ? (u = () => l == null ? void 0 : l.getTimeSeries(s), e[10] = l, e[11] = s, e[12] = u) : u = e[12];
|
|
2608
|
+
const y = !!l && d;
|
|
2609
|
+
let m;
|
|
2610
|
+
return e[13] !== f || e[14] !== u || e[15] !== y || e[16] !== c ? (m = {
|
|
2611
|
+
queryKey: f,
|
|
2329
2612
|
queryFn: u,
|
|
2330
|
-
enabled:
|
|
2331
|
-
...
|
|
2332
|
-
}, e[13] =
|
|
2613
|
+
enabled: y,
|
|
2614
|
+
...c
|
|
2615
|
+
}, e[13] = f, e[14] = u, e[15] = y, e[16] = c, e[17] = m) : m = e[17], te(m);
|
|
2333
2616
|
}
|
|
2334
|
-
function
|
|
2335
|
-
const e =
|
|
2617
|
+
function So(r) {
|
|
2618
|
+
const e = F(6);
|
|
2336
2619
|
let t, n;
|
|
2337
|
-
e[0] !==
|
|
2620
|
+
e[0] !== r ? ({
|
|
2338
2621
|
children: t,
|
|
2339
2622
|
...n
|
|
2340
|
-
} =
|
|
2341
|
-
const s =
|
|
2342
|
-
let
|
|
2343
|
-
return e[3] !== t || e[4] !== s ? (
|
|
2623
|
+
} = r, e[0] = r, e[1] = t, e[2] = n) : (t = e[1], n = e[2]);
|
|
2624
|
+
const s = Pn(n);
|
|
2625
|
+
let o;
|
|
2626
|
+
return e[3] !== t || e[4] !== s ? (o = t(s), e[3] = t, e[4] = s, e[5] = o) : o = e[5], o;
|
|
2344
2627
|
}
|
|
2345
|
-
function
|
|
2346
|
-
const e =
|
|
2628
|
+
function vo(r) {
|
|
2629
|
+
const e = F(13), {
|
|
2347
2630
|
children: t,
|
|
2348
2631
|
maps: n,
|
|
2349
2632
|
lassoTools: s,
|
|
2350
|
-
measureTools:
|
|
2351
|
-
} =
|
|
2352
|
-
let
|
|
2353
|
-
e[0] !== s ? (
|
|
2354
|
-
const a =
|
|
2355
|
-
let l;
|
|
2356
|
-
e[2] !== i ? (l = i === void 0 ? [] : i, e[2] = i, e[3] = l) : l = e[3];
|
|
2357
|
-
const m = l;
|
|
2633
|
+
measureTools: o
|
|
2634
|
+
} = r;
|
|
2635
|
+
let i;
|
|
2636
|
+
e[0] !== s ? (i = s === void 0 ? [] : s, e[0] = s, e[1] = i) : i = e[1];
|
|
2637
|
+
const a = i;
|
|
2358
2638
|
let c;
|
|
2359
|
-
e[
|
|
2639
|
+
e[2] !== o ? (c = o === void 0 ? [] : o, e[2] = o, e[3] = c) : c = e[3];
|
|
2640
|
+
const d = c;
|
|
2641
|
+
let l;
|
|
2642
|
+
e[4] !== t || e[5] !== d ? (l = /* @__PURE__ */ N(zs, { values: d, children: t }), e[4] = t, e[5] = d, e[6] = l) : l = e[6];
|
|
2360
2643
|
let p;
|
|
2361
|
-
e[7] !== a || e[8] !==
|
|
2362
|
-
let
|
|
2363
|
-
return e[10] !== n || e[11] !== p ? (
|
|
2364
|
-
}
|
|
2365
|
-
function
|
|
2366
|
-
const t =
|
|
2367
|
-
id:
|
|
2368
|
-
visible:
|
|
2644
|
+
e[7] !== a || e[8] !== l ? (p = /* @__PURE__ */ N(Fs, { values: a, children: l }), e[7] = a, e[8] = l, e[9] = p) : p = e[9];
|
|
2645
|
+
let f;
|
|
2646
|
+
return e[10] !== n || e[11] !== p ? (f = /* @__PURE__ */ N(Ls, { values: n, children: p }), e[10] = n, e[11] = p, e[12] = f) : f = e[12], f;
|
|
2647
|
+
}
|
|
2648
|
+
function bo(r, e) {
|
|
2649
|
+
const t = de((d) => d.layers), n = de((d) => d.setLayer), s = J(() => mt(r.map((d) => t[d]).filter((d) => !!d)), [t, r]), o = J(() => s.map(e), [e, s]), i = G(({
|
|
2650
|
+
id: d,
|
|
2651
|
+
visible: l,
|
|
2369
2652
|
...p
|
|
2370
2653
|
}) => {
|
|
2371
|
-
n(
|
|
2654
|
+
n(d, {
|
|
2372
2655
|
props: {
|
|
2373
|
-
visible:
|
|
2656
|
+
visible: l
|
|
2374
2657
|
},
|
|
2375
2658
|
legend: p
|
|
2376
2659
|
});
|
|
2377
|
-
}, [n]), a =
|
|
2378
|
-
id:
|
|
2379
|
-
collapsed:
|
|
2660
|
+
}, [n]), a = G(({
|
|
2661
|
+
id: d,
|
|
2662
|
+
collapsed: l
|
|
2380
2663
|
}) => {
|
|
2381
|
-
n(
|
|
2664
|
+
n(d, {
|
|
2382
2665
|
legend: {
|
|
2383
|
-
collapsed:
|
|
2666
|
+
collapsed: l
|
|
2384
2667
|
}
|
|
2385
2668
|
});
|
|
2386
|
-
}, [n]),
|
|
2387
|
-
id:
|
|
2388
|
-
opacity:
|
|
2669
|
+
}, [n]), c = G(({
|
|
2670
|
+
id: d,
|
|
2671
|
+
opacity: l
|
|
2389
2672
|
}) => {
|
|
2390
|
-
n(
|
|
2673
|
+
n(d, {
|
|
2391
2674
|
props: {
|
|
2392
|
-
opacity:
|
|
2675
|
+
opacity: l
|
|
2393
2676
|
}
|
|
2394
2677
|
});
|
|
2395
2678
|
}, [n]);
|
|
2396
2679
|
return {
|
|
2397
|
-
legend:
|
|
2398
|
-
onChangeVisibility:
|
|
2399
|
-
onChangeOpacity:
|
|
2680
|
+
legend: o,
|
|
2681
|
+
onChangeVisibility: i,
|
|
2682
|
+
onChangeOpacity: c,
|
|
2400
2683
|
onChangRowCollapsed: a
|
|
2401
2684
|
};
|
|
2402
2685
|
}
|
|
2403
|
-
function
|
|
2404
|
-
mapId:
|
|
2686
|
+
function Mo({
|
|
2687
|
+
mapId: r
|
|
2405
2688
|
}) {
|
|
2406
|
-
const [e, t] =
|
|
2407
|
-
var
|
|
2408
|
-
return (
|
|
2409
|
-
}),
|
|
2410
|
-
var
|
|
2411
|
-
return (
|
|
2412
|
-
})
|
|
2413
|
-
var M;
|
|
2414
|
-
return (M = f.maps[o]) == null ? void 0 : M.isLoaded;
|
|
2415
|
-
}) && l, {
|
|
2689
|
+
const [e, t] = ee(void 0), [n, s] = ee(!1), o = D((m) => {
|
|
2690
|
+
var L;
|
|
2691
|
+
return (L = m.maps[r]) == null ? void 0 : L.basemap;
|
|
2692
|
+
}), i = D((m) => m.getDeckInstance), a = D((m) => m.getOverlayInstance), c = D((m) => m.areLayersLoaded[r]), l = D((m) => {
|
|
2693
|
+
var L;
|
|
2694
|
+
return (L = m.maps[r]) == null ? void 0 : L.isLoaded;
|
|
2695
|
+
}) && c, {
|
|
2416
2696
|
type: p
|
|
2417
|
-
} =
|
|
2418
|
-
const
|
|
2697
|
+
} = ue[o], f = p === Y.googleMaps, u = G(async () => {
|
|
2698
|
+
const m = i(r), L = a(r);
|
|
2419
2699
|
try {
|
|
2420
2700
|
const h = document.createElement("canvas");
|
|
2421
|
-
h.width =
|
|
2422
|
-
const
|
|
2423
|
-
if (
|
|
2424
|
-
const
|
|
2425
|
-
if (
|
|
2701
|
+
h.width = m.width ?? 0, h.height = m.height ?? 0;
|
|
2702
|
+
const g = h.getContext("2d");
|
|
2703
|
+
if (f) {
|
|
2704
|
+
const v = L;
|
|
2705
|
+
if (v.getRenderingType() !== "RASTER")
|
|
2426
2706
|
throw new Error("Only raster type is supported for Google Maps");
|
|
2427
|
-
const
|
|
2707
|
+
const b = await Jt(v.getDiv(), {
|
|
2428
2708
|
useCORS: !0
|
|
2429
2709
|
});
|
|
2430
|
-
|
|
2710
|
+
g == null || g.drawImage(b, 0, 0, m.width, m.height);
|
|
2431
2711
|
} else {
|
|
2432
|
-
const
|
|
2433
|
-
|
|
2712
|
+
const v = L;
|
|
2713
|
+
v.redraw(), g == null || g.drawImage(v.getMap().getCanvas(), 0, 0, m.width, m.height);
|
|
2434
2714
|
}
|
|
2435
|
-
|
|
2436
|
-
const
|
|
2437
|
-
t(
|
|
2715
|
+
m == null || m.redraw("screenshot"), g == null || g.drawImage(m.getCanvas(), 0, 0, m.width, m.height);
|
|
2716
|
+
const S = h.toDataURL();
|
|
2717
|
+
t(S);
|
|
2438
2718
|
} catch (h) {
|
|
2439
2719
|
console.error(h);
|
|
2440
2720
|
} finally {
|
|
2441
2721
|
s(!1);
|
|
2442
2722
|
}
|
|
2443
|
-
}, [
|
|
2723
|
+
}, [i, f, r, a]);
|
|
2444
2724
|
return {
|
|
2445
|
-
takeScreenshot:
|
|
2446
|
-
s(!0),
|
|
2447
|
-
}, [u,
|
|
2725
|
+
takeScreenshot: G(() => {
|
|
2726
|
+
s(!0), l && u();
|
|
2727
|
+
}, [u, l]),
|
|
2448
2728
|
isLoading: n,
|
|
2449
2729
|
screenshot: e
|
|
2450
2730
|
};
|
|
2451
2731
|
}
|
|
2452
|
-
function
|
|
2453
|
-
const e =
|
|
2732
|
+
function _o(r) {
|
|
2733
|
+
const e = F(8), {
|
|
2454
2734
|
mapId: t
|
|
2455
|
-
} =
|
|
2735
|
+
} = r;
|
|
2456
2736
|
let n;
|
|
2457
2737
|
e[0] !== t ? (n = {
|
|
2458
2738
|
mapId: t
|
|
2459
2739
|
}, e[0] = t, e[1] = n) : n = e[1];
|
|
2460
|
-
const s =
|
|
2461
|
-
let
|
|
2462
|
-
e[2] !== t ? (
|
|
2740
|
+
const s = Cn(n);
|
|
2741
|
+
let o;
|
|
2742
|
+
e[2] !== t ? (o = {
|
|
2463
2743
|
mapId: t
|
|
2464
|
-
}, e[2] = t, e[3] =
|
|
2465
|
-
const
|
|
2466
|
-
let
|
|
2467
|
-
return e[4] !==
|
|
2744
|
+
}, e[2] = t, e[3] = o) : o = e[3];
|
|
2745
|
+
const i = wn(o), a = i ?? s;
|
|
2746
|
+
let c;
|
|
2747
|
+
return e[4] !== i || e[5] !== a || e[6] !== s ? (c = {
|
|
2468
2748
|
spatialFilter: a,
|
|
2469
|
-
lassoToolsSpatialFilter:
|
|
2749
|
+
lassoToolsSpatialFilter: i,
|
|
2470
2750
|
viewportSpatialFilter: s
|
|
2471
|
-
}, e[4] =
|
|
2751
|
+
}, e[4] = i, e[5] = a, e[6] = s, e[7] = c) : c = e[7], c;
|
|
2472
2752
|
}
|
|
2473
|
-
function
|
|
2474
|
-
const e =
|
|
2753
|
+
function Cn(r) {
|
|
2754
|
+
const e = F(4), {
|
|
2475
2755
|
mapId: t
|
|
2476
|
-
} =
|
|
2756
|
+
} = r;
|
|
2477
2757
|
let n;
|
|
2478
|
-
e[0] !== t ? (n = (
|
|
2479
|
-
const s =
|
|
2480
|
-
let
|
|
2758
|
+
e[0] !== t ? (n = (i) => i.viewports[t], e[0] = t, e[1] = n) : n = e[1];
|
|
2759
|
+
const s = D(n);
|
|
2760
|
+
let o;
|
|
2481
2761
|
e: {
|
|
2482
2762
|
if (!s) {
|
|
2483
|
-
|
|
2763
|
+
o = void 0;
|
|
2484
2764
|
break e;
|
|
2485
2765
|
}
|
|
2486
|
-
let
|
|
2487
|
-
e[2] !== s ? (
|
|
2766
|
+
let i;
|
|
2767
|
+
e[2] !== s ? (i = Xt(s.getBounds()), e[2] = s, e[3] = i) : i = e[3], o = i;
|
|
2488
2768
|
}
|
|
2489
|
-
return
|
|
2769
|
+
return o;
|
|
2490
2770
|
}
|
|
2491
|
-
function
|
|
2492
|
-
const e =
|
|
2771
|
+
function wn(r) {
|
|
2772
|
+
const e = F(5), {
|
|
2493
2773
|
mapId: t
|
|
2494
|
-
} =
|
|
2774
|
+
} = r;
|
|
2495
2775
|
let n;
|
|
2496
|
-
e[0] !== t ? (n = (
|
|
2776
|
+
e[0] !== t ? (n = (i) => {
|
|
2497
2777
|
var a;
|
|
2498
|
-
return (a =
|
|
2778
|
+
return (a = i.data[t]) == null ? void 0 : a.values;
|
|
2499
2779
|
}, e[0] = t, e[1] = n) : n = e[1];
|
|
2500
|
-
const s =
|
|
2501
|
-
let
|
|
2780
|
+
const s = I(n);
|
|
2781
|
+
let o;
|
|
2502
2782
|
e: {
|
|
2503
|
-
let
|
|
2783
|
+
let i;
|
|
2504
2784
|
if (e[2] !== s) {
|
|
2505
|
-
const a =
|
|
2785
|
+
const a = at({
|
|
2506
2786
|
values: s
|
|
2507
|
-
}).filter(
|
|
2787
|
+
}).filter(On);
|
|
2508
2788
|
if (!(a != null && a.length)) {
|
|
2509
|
-
|
|
2789
|
+
o = void 0;
|
|
2510
2790
|
break e;
|
|
2511
2791
|
}
|
|
2512
|
-
|
|
2792
|
+
i = es(a.map(Fn)), e[2] = s, e[3] = i, e[4] = o;
|
|
2513
2793
|
} else
|
|
2514
|
-
|
|
2515
|
-
|
|
2794
|
+
i = e[3], o = e[4];
|
|
2795
|
+
o = i.geometry;
|
|
2516
2796
|
}
|
|
2517
|
-
return
|
|
2797
|
+
return o;
|
|
2518
2798
|
}
|
|
2519
|
-
function
|
|
2520
|
-
return
|
|
2799
|
+
function Fn(r) {
|
|
2800
|
+
return r.geometry.coordinates;
|
|
2521
2801
|
}
|
|
2522
|
-
function
|
|
2523
|
-
return
|
|
2802
|
+
function On(r) {
|
|
2803
|
+
return r.properties.visible;
|
|
2524
2804
|
}
|
|
2525
|
-
const
|
|
2805
|
+
const ne = {
|
|
2526
2806
|
currency: "CURRENCY",
|
|
2527
2807
|
default: "DEFAULT",
|
|
2528
2808
|
number: "NUMBER"
|
|
2529
2809
|
}, Ye = {
|
|
2530
|
-
[
|
|
2531
|
-
type:
|
|
2532
|
-
format: (
|
|
2810
|
+
[ne.currency]: {
|
|
2811
|
+
type: ne.currency,
|
|
2812
|
+
format: (r, e) => It(r, e)
|
|
2533
2813
|
},
|
|
2534
|
-
[
|
|
2535
|
-
type:
|
|
2536
|
-
format: (
|
|
2814
|
+
[ne.number]: {
|
|
2815
|
+
type: ne.number,
|
|
2816
|
+
format: (r, e) => nt(r, e)
|
|
2537
2817
|
},
|
|
2538
|
-
[
|
|
2539
|
-
type:
|
|
2540
|
-
format: (
|
|
2818
|
+
[ne.default]: {
|
|
2819
|
+
type: ne.default,
|
|
2820
|
+
format: (r) => r.toLocaleString()
|
|
2541
2821
|
}
|
|
2542
2822
|
};
|
|
2543
|
-
function
|
|
2544
|
-
properties:
|
|
2823
|
+
function Lo({
|
|
2824
|
+
properties: r,
|
|
2545
2825
|
formatters: e = {},
|
|
2546
|
-
includeColumns: t = Object.keys(
|
|
2826
|
+
includeColumns: t = Object.keys(r),
|
|
2547
2827
|
locale: n = "en-US",
|
|
2548
2828
|
showColumnName: s = !0,
|
|
2549
|
-
title:
|
|
2550
|
-
getColumnName:
|
|
2551
|
-
getFieldHtml: a =
|
|
2552
|
-
getTitle:
|
|
2553
|
-
getValue:
|
|
2829
|
+
title: o,
|
|
2830
|
+
getColumnName: i = xn,
|
|
2831
|
+
getFieldHtml: a = An,
|
|
2832
|
+
getTitle: c = Dn,
|
|
2833
|
+
getValue: d = Rn
|
|
2554
2834
|
}) {
|
|
2555
|
-
const
|
|
2556
|
-
const
|
|
2557
|
-
return u + a(
|
|
2835
|
+
const l = o ? c(o) : "", f = t.reduce((u, y) => {
|
|
2836
|
+
const m = e[y], L = r[y], h = d(L, n, m), g = s ? i(y) : "";
|
|
2837
|
+
return u + a(g, h);
|
|
2558
2838
|
}, "");
|
|
2559
|
-
return
|
|
2839
|
+
return l + f;
|
|
2560
2840
|
}
|
|
2561
|
-
function
|
|
2562
|
-
return `<h3 style="margin: 0"><strong>${
|
|
2841
|
+
function Dn(r) {
|
|
2842
|
+
return `<h3 style="margin: 0"><strong>${r}</strong></h3></br>`;
|
|
2563
2843
|
}
|
|
2564
|
-
function
|
|
2565
|
-
return `${
|
|
2844
|
+
function An(r, e) {
|
|
2845
|
+
return `${r}${e}</br>`;
|
|
2566
2846
|
}
|
|
2567
|
-
function
|
|
2847
|
+
function Rn(r, e, t) {
|
|
2568
2848
|
try {
|
|
2569
|
-
return
|
|
2849
|
+
return $n(t)(r, e);
|
|
2570
2850
|
} catch {
|
|
2571
|
-
return
|
|
2851
|
+
return r;
|
|
2572
2852
|
}
|
|
2573
2853
|
}
|
|
2574
|
-
function
|
|
2575
|
-
return typeof
|
|
2854
|
+
function $n(r) {
|
|
2855
|
+
return typeof r == "function" ? r : ((r && Ye[r]) ?? Ye[ne.default]).format;
|
|
2576
2856
|
}
|
|
2577
|
-
function
|
|
2578
|
-
return `<strong>${
|
|
2857
|
+
function xn(r) {
|
|
2858
|
+
return `<strong>${r}</strong>: `;
|
|
2579
2859
|
}
|
|
2580
|
-
function
|
|
2581
|
-
var e, t, n, s,
|
|
2860
|
+
function To(r) {
|
|
2861
|
+
var e, t, n, s, o, i, a, c;
|
|
2582
2862
|
return {
|
|
2583
|
-
collapsed: (e =
|
|
2584
|
-
collapsible: (t =
|
|
2585
|
-
helperText: (n =
|
|
2586
|
-
id:
|
|
2587
|
-
legend: (s =
|
|
2588
|
-
maxZoom: (
|
|
2589
|
-
minZoom: (
|
|
2590
|
-
opacity:
|
|
2591
|
-
showOpacityControl: (a =
|
|
2592
|
-
switchable: (
|
|
2593
|
-
title:
|
|
2594
|
-
visible:
|
|
2863
|
+
collapsed: (e = r.legend) == null ? void 0 : e.collapsed,
|
|
2864
|
+
collapsible: (t = r.legend) == null ? void 0 : t.collapsible,
|
|
2865
|
+
helperText: (n = r.legend) == null ? void 0 : n.helperText,
|
|
2866
|
+
id: r.props.id,
|
|
2867
|
+
legend: (s = r.legend) == null ? void 0 : s.variables,
|
|
2868
|
+
maxZoom: (o = r.legend) == null ? void 0 : o.maxZoom,
|
|
2869
|
+
minZoom: (i = r.legend) == null ? void 0 : i.minZoom,
|
|
2870
|
+
opacity: r.props.opacity ?? 1,
|
|
2871
|
+
showOpacityControl: (a = r.legend) == null ? void 0 : a.opacityControl,
|
|
2872
|
+
switchable: (c = r.legend) == null ? void 0 : c.switchable,
|
|
2873
|
+
title: r.name,
|
|
2874
|
+
visible: r.props.visible ?? !0
|
|
2595
2875
|
};
|
|
2596
2876
|
}
|
|
2597
|
-
function
|
|
2598
|
-
const e =
|
|
2877
|
+
function Eo(r) {
|
|
2878
|
+
const e = F(18), {
|
|
2599
2879
|
children: t,
|
|
2600
2880
|
mapId: n
|
|
2601
|
-
} =
|
|
2881
|
+
} = r;
|
|
2602
2882
|
let s;
|
|
2603
|
-
e[0] !== n ? (s = (
|
|
2883
|
+
e[0] !== n ? (s = (g) => g.viewStates[n], e[0] = n, e[1] = s) : s = e[1];
|
|
2604
2884
|
const {
|
|
2605
|
-
zoom:
|
|
2606
|
-
maxZoom:
|
|
2885
|
+
zoom: o,
|
|
2886
|
+
maxZoom: i,
|
|
2607
2887
|
minZoom: a
|
|
2608
|
-
} =
|
|
2609
|
-
let
|
|
2610
|
-
e[2] !== n ? (
|
|
2611
|
-
const
|
|
2888
|
+
} = D(s);
|
|
2889
|
+
let c;
|
|
2890
|
+
e[2] !== n ? (c = (g) => g.areLayersLoaded[n], e[2] = n, e[3] = c) : c = e[3];
|
|
2891
|
+
const d = D(c), l = D(qn), p = D(Un), f = !d;
|
|
2612
2892
|
let u;
|
|
2613
|
-
e[4] !== n || e[5] !==
|
|
2614
|
-
const
|
|
2615
|
-
let
|
|
2616
|
-
e[7] !== p || e[8] !== n ? (
|
|
2617
|
-
const
|
|
2893
|
+
e[4] !== n || e[5] !== l ? (u = (g) => l(n, g), e[4] = n, e[5] = l, e[6] = u) : u = e[6];
|
|
2894
|
+
const y = u;
|
|
2895
|
+
let m;
|
|
2896
|
+
e[7] !== p || e[8] !== n ? (m = (g) => p(n, g), e[7] = p, e[8] = n, e[9] = m) : m = e[9];
|
|
2897
|
+
const L = m;
|
|
2618
2898
|
let h;
|
|
2619
|
-
return e[10] !== t || e[11] !==
|
|
2620
|
-
zoom:
|
|
2621
|
-
maxZoom:
|
|
2899
|
+
return e[10] !== t || e[11] !== i || e[12] !== a || e[13] !== f || e[14] !== y || e[15] !== L || e[16] !== o ? (h = t({
|
|
2900
|
+
zoom: o,
|
|
2901
|
+
maxZoom: i,
|
|
2622
2902
|
minZoom: a,
|
|
2623
|
-
isLoading:
|
|
2624
|
-
setZoom:
|
|
2625
|
-
flyTo:
|
|
2626
|
-
}), e[10] = t, e[11] =
|
|
2903
|
+
isLoading: f,
|
|
2904
|
+
setZoom: y,
|
|
2905
|
+
flyTo: L
|
|
2906
|
+
}), e[10] = t, e[11] = i, e[12] = a, e[13] = f, e[14] = y, e[15] = L, e[16] = o, e[17] = h) : h = e[17], h;
|
|
2627
2907
|
}
|
|
2628
|
-
function
|
|
2629
|
-
return
|
|
2908
|
+
function Un(r) {
|
|
2909
|
+
return r.flyTo;
|
|
2630
2910
|
}
|
|
2631
|
-
function
|
|
2632
|
-
return
|
|
2911
|
+
function qn(r) {
|
|
2912
|
+
return r.setZoom;
|
|
2633
2913
|
}
|
|
2634
2914
|
export {
|
|
2635
|
-
|
|
2915
|
+
gn as ApiBaseUrl,
|
|
2636
2916
|
Ze as CONVERSIONS_UNITS,
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2917
|
+
Fe as CartoBasemapURL,
|
|
2918
|
+
K as CartoBasemaps,
|
|
2919
|
+
uo as CategoriesModel,
|
|
2920
|
+
ps as CustomCompositeEditMode,
|
|
2921
|
+
rt as CustomEditableGeojsonLayer,
|
|
2922
|
+
As as CustomMeasureAreaMode,
|
|
2923
|
+
Rs as CustomMeasureBufferMode,
|
|
2924
|
+
ct as CustomMeasureDistanceMode,
|
|
2925
|
+
Ie as DEFAULT_LASSO_TOOLS_COLORS,
|
|
2926
|
+
gs as DEFAULT_LASSO_TOOLS_LAYER_PROPS,
|
|
2927
|
+
De as DEFAULT_LASSO_TOOLS_MODES,
|
|
2928
|
+
Oe as DEFAULT_LASSO_TOOLS_PROPS,
|
|
2929
|
+
Se as DEFAULT_MASK_LAYER_PROPS,
|
|
2930
|
+
qs as DEFAULT_MEASUREMENT_TOOLS_MODES,
|
|
2931
|
+
Vs as DEFAULT_MEASUREMENT_TOOLS_UNITS,
|
|
2932
|
+
Re as DEFAULT_MEASURE_COLORS,
|
|
2933
|
+
ds as DeckGLComponent,
|
|
2934
|
+
Q as EditableEditType,
|
|
2935
|
+
fo as FeaturesModel,
|
|
2936
|
+
mo as FormulaModel,
|
|
2937
|
+
we as GmapsBasemap,
|
|
2938
|
+
po as HistogramModel,
|
|
2939
|
+
ce as INTL_UNITS,
|
|
2940
|
+
Is as LassoTools,
|
|
2941
|
+
Fs as LassoToolsProvider,
|
|
2942
|
+
ue as MAPS_BASEMAP,
|
|
2943
|
+
ae as MAP_LASSO_TOOLS_LAYER_ID,
|
|
2944
|
+
be as MAP_MASK_LAYER_ID,
|
|
2945
|
+
oe as MAP_MEASURE_LAYER_ID,
|
|
2946
|
+
Us as MEASUREMENT_TOOLS_UNITS_AREA,
|
|
2947
|
+
Ke as MEASUREMENT_TOOLS_UNITS_DISTANCE,
|
|
2948
|
+
z as MEASUREMENT_TOOLS_UNITS_DISTANCE_VALUES,
|
|
2949
|
+
co as MapComponent,
|
|
2950
|
+
$e as MapMeasurementUnitAuto,
|
|
2951
|
+
xs as MapMeasurementUnitTurf,
|
|
2952
|
+
Ls as MapProvider,
|
|
2953
|
+
vo as MapsProvider,
|
|
2954
|
+
Y as MapsTypes,
|
|
2955
|
+
nn as MeasurementTools,
|
|
2956
|
+
zs as MeasurementToolsProvider,
|
|
2957
|
+
go as RangeModel,
|
|
2958
|
+
yo as ScatterModel,
|
|
2959
|
+
ho as TableModel,
|
|
2960
|
+
So as TimeSeriesModel,
|
|
2961
|
+
Eo as ZoomControls,
|
|
2962
|
+
yn as clientID,
|
|
2963
|
+
Ge as convertMetersTo,
|
|
2964
|
+
ws as createLassoToolsStore,
|
|
2965
|
+
_s as createMapStore,
|
|
2966
|
+
Gs as createMeasurementToolsStore,
|
|
2967
|
+
ne as formatterTypes,
|
|
2687
2968
|
ts as getCursorDefault,
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2969
|
+
lo as getDeckController,
|
|
2970
|
+
Ps as getLassoToolsLayer,
|
|
2971
|
+
Hs as getMeasurementToolsLayer,
|
|
2972
|
+
Me as getTextLayerFormattedDistance,
|
|
2692
2973
|
ss as getTooltipDefault,
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2974
|
+
To as mappingLegendMeridian,
|
|
2975
|
+
Lo as objectToHtml,
|
|
2976
|
+
mt as sortLayers,
|
|
2977
|
+
hs as transitionFlyConfig,
|
|
2978
|
+
bn as useCategories,
|
|
2979
|
+
ut as useEventManager,
|
|
2980
|
+
Mn as useFeatures,
|
|
2981
|
+
_n as useFormula,
|
|
2982
|
+
Ln as useHistogram,
|
|
2983
|
+
wn as useLassoToolsSpatialFilter,
|
|
2984
|
+
I as useLassoToolsState,
|
|
2985
|
+
de as useLayerStore,
|
|
2986
|
+
on as useLayers,
|
|
2987
|
+
bo as useLegend,
|
|
2988
|
+
Mo as useMapScreenshot,
|
|
2989
|
+
D as useMapStore,
|
|
2990
|
+
V as useMeasurementToolsState,
|
|
2991
|
+
Tn as useRange,
|
|
2992
|
+
En as useScatter,
|
|
2993
|
+
hn as useSourceStore,
|
|
2994
|
+
_o as useSpatialFilter,
|
|
2995
|
+
kn as useTable,
|
|
2996
|
+
Pn as useTimeSeries,
|
|
2997
|
+
Cn as useViewportSpatialFilter,
|
|
2998
|
+
se as useWidgetModel
|
|
2717
2999
|
};
|
|
2718
3000
|
//# sourceMappingURL=index.js.map
|