@carto/ps-react-maps 4.2.6 → 4.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1404 -1363
- package/dist/index.js.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/providers/map/types.d.ts +6 -1
- package/dist/types/utils/geometry/get-centroid.d.ts +20 -0
- package/dist/types/utils/geometry/get-centroid.test.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { jsx as G, jsxs as
|
|
2
|
-
import { c as
|
|
3
|
-
import { useImperativeHandle as Ie, useEffect as J, useState as ue, createContext as
|
|
4
|
-
import { MapProvider as
|
|
1
|
+
import { jsx as G, jsxs as yt } from "react/jsx-runtime";
|
|
2
|
+
import { c as j } from "react/compiler-runtime";
|
|
3
|
+
import { useImperativeHandle as Ie, useEffect as J, useState as ue, createContext as He, useContext as Ne, useMemo as ge, useCallback as re, useRef as ke } from "react";
|
|
4
|
+
import { MapProvider as Vt, Map as qt, useMap as jt } from "react-map-gl/maplibre";
|
|
5
5
|
import Bt from "@deck.gl/react";
|
|
6
|
-
import { useMap as
|
|
6
|
+
import { useMap as ht, Map as It, APIProvider as Ht } from "@vis.gl/react-google-maps";
|
|
7
7
|
import { GoogleMapsOverlay as Nt } from "@deck.gl/google-maps";
|
|
8
|
-
import { createStore as Ze, useStore as ze, create as
|
|
9
|
-
import { FlyToInterpolator as
|
|
10
|
-
import { CompositeMode as
|
|
11
|
-
import { DataFilterExtension as
|
|
12
|
-
import { Pan as
|
|
13
|
-
import { GeoJsonLayer as
|
|
14
|
-
import { useShallow as
|
|
15
|
-
import { area as
|
|
16
|
-
import { formatNumber as
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import { useQuery as
|
|
21
|
-
import { removeFilter as
|
|
22
|
-
import { devtools as
|
|
23
|
-
import
|
|
24
|
-
const
|
|
8
|
+
import { createStore as Ze, useStore as ze, create as gt } from "zustand";
|
|
9
|
+
import { FlyToInterpolator as Zt, WebMercatorViewport as bt } from "@deck.gl/core";
|
|
10
|
+
import { CompositeMode as zt, TranslateMode as Gt, ModifyMode as Wt, DrawPolygonByDraggingMode as Kt, DrawCircleFromCenterMode as St, DrawRectangleMode as Yt, DrawPolygonMode as Jt, EditableGeoJsonLayer as Qt, MeasureAreaMode as Xt, getPickedEditHandle as en, MeasureDistanceMode as tn, ViewMode as nn } from "@deck.gl-community/editable-layers";
|
|
11
|
+
import { DataFilterExtension as rn, MaskExtension as sn } from "@deck.gl/extensions";
|
|
12
|
+
import { Pan as Qe, InputDirection as on, EventManager as an, Tap as Xe, Pinch as ln } from "mjolnir.js";
|
|
13
|
+
import { GeoJsonLayer as cn } from "@deck.gl/layers";
|
|
14
|
+
import { useShallow as vt } from "zustand/shallow";
|
|
15
|
+
import { area as et, centroid as wt, lineIntersect as un, multiPolygon as Ge, multiLineString as dn, multiPoint as fn, polygon as pn, lineString as mn, point as yn } from "@turf/turf";
|
|
16
|
+
import { formatNumber as Mt, formatCurrency as hn } from "@carto/ps-utils";
|
|
17
|
+
import _t from "convert-units";
|
|
18
|
+
import gn from "convert-units/definitions/length";
|
|
19
|
+
import bn from "convert-units/definitions/area";
|
|
20
|
+
import { useQuery as Et } from "@tanstack/react-query";
|
|
21
|
+
import { removeFilter as Sn, addFilter as We, WidgetRasterSource as vn, WidgetTilesetSource as wn, TileFormat as Mn, WidgetTableSource as _n, WidgetQuerySource as En, createViewportSpatialFilter as Tn, vectorTilesetSource as Ln } from "@carto/api-client";
|
|
22
|
+
import { devtools as kn } from "zustand/middleware";
|
|
23
|
+
import Cn from "html2canvas";
|
|
24
|
+
const De = {
|
|
25
25
|
roadmap: "roadmap",
|
|
26
26
|
satellite: "satellite",
|
|
27
27
|
hybrid: "hybrid"
|
|
@@ -29,7 +29,7 @@ const Re = {
|
|
|
29
29
|
darkMatter: "darkMatter",
|
|
30
30
|
positron: "positron",
|
|
31
31
|
voyager: "voyager"
|
|
32
|
-
},
|
|
32
|
+
}, Re = {
|
|
33
33
|
[ae.positron]: "https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",
|
|
34
34
|
[ae.voyager]: "https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",
|
|
35
35
|
[ae.darkMatter]: "https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json"
|
|
@@ -38,144 +38,144 @@ const Re = {
|
|
|
38
38
|
googleMaps: "google-maps"
|
|
39
39
|
}, we = {
|
|
40
40
|
[ae.positron]: {
|
|
41
|
-
url:
|
|
41
|
+
url: Re[ae.positron],
|
|
42
42
|
type: ce.maplibre
|
|
43
43
|
},
|
|
44
44
|
[ae.voyager]: {
|
|
45
|
-
url:
|
|
45
|
+
url: Re[ae.voyager],
|
|
46
46
|
type: ce.maplibre
|
|
47
47
|
},
|
|
48
48
|
[ae.darkMatter]: {
|
|
49
|
-
url:
|
|
49
|
+
url: Re[ae.darkMatter],
|
|
50
50
|
type: ce.maplibre,
|
|
51
51
|
dark: !0
|
|
52
52
|
},
|
|
53
|
-
[
|
|
53
|
+
[De.roadmap]: {
|
|
54
54
|
type: ce.googleMaps
|
|
55
55
|
},
|
|
56
|
-
[
|
|
56
|
+
[De.satellite]: {
|
|
57
57
|
type: ce.googleMaps
|
|
58
58
|
},
|
|
59
|
-
[
|
|
59
|
+
[De.hybrid]: {
|
|
60
60
|
type: ce.googleMaps
|
|
61
61
|
}
|
|
62
62
|
};
|
|
63
|
-
function
|
|
64
|
-
isDragging:
|
|
63
|
+
function Pn({
|
|
64
|
+
isDragging: n,
|
|
65
65
|
isHovering: e
|
|
66
66
|
}) {
|
|
67
|
-
return
|
|
67
|
+
return n ? "grabbing" : e ? "pointer" : "grab";
|
|
68
68
|
}
|
|
69
|
-
function
|
|
70
|
-
return
|
|
71
|
-
html: `<div class='map-tooltip__content'>${
|
|
69
|
+
function On(n) {
|
|
70
|
+
return n.html ? {
|
|
71
|
+
html: `<div class='map-tooltip__content'>${n.html}</div>`,
|
|
72
72
|
style: {
|
|
73
73
|
padding: "0",
|
|
74
74
|
background: "none"
|
|
75
75
|
}
|
|
76
76
|
} : null;
|
|
77
77
|
}
|
|
78
|
-
function
|
|
79
|
-
const e =
|
|
80
|
-
let t,
|
|
81
|
-
e[0] !==
|
|
78
|
+
function An(n) {
|
|
79
|
+
const e = j(39);
|
|
80
|
+
let t, r, s, o, i, a, l, d, p, h, b, f;
|
|
81
|
+
e[0] !== n ? ({
|
|
82
82
|
instanceRef: i,
|
|
83
|
-
overlayRef:
|
|
83
|
+
overlayRef: h,
|
|
84
84
|
controller: t,
|
|
85
85
|
id: o,
|
|
86
86
|
layers: a,
|
|
87
87
|
mapStyle: l,
|
|
88
88
|
parameters: b,
|
|
89
|
-
getCursor:
|
|
89
|
+
getCursor: r,
|
|
90
90
|
getTooltip: s,
|
|
91
91
|
onLoad: d,
|
|
92
|
-
onViewStateChange:
|
|
92
|
+
onViewStateChange: p,
|
|
93
93
|
...f
|
|
94
|
-
} =
|
|
94
|
+
} = n, e[0] = n, e[1] = t, e[2] = r, e[3] = s, e[4] = o, e[5] = i, e[6] = a, e[7] = l, e[8] = d, e[9] = p, e[10] = h, e[11] = b, e[12] = f) : (t = e[1], r = e[2], s = e[3], o = e[4], i = e[5], a = e[6], l = e[7], d = e[8], p = e[9], h = e[10], b = e[11], f = e[12]);
|
|
95
95
|
let M;
|
|
96
|
-
e[13] !== a ? (M = a.filter(
|
|
96
|
+
e[13] !== a ? (M = a.filter(Rn).map(Dn), e[13] = a, e[14] = M) : M = e[14];
|
|
97
97
|
const S = M, L = i;
|
|
98
98
|
let u;
|
|
99
99
|
e[15] !== d ? (u = () => d({
|
|
100
100
|
type: "deckgl",
|
|
101
101
|
value: !0
|
|
102
102
|
}), e[15] = d, e[16] = u) : u = e[16];
|
|
103
|
-
let
|
|
104
|
-
e[17] !== b ? (
|
|
103
|
+
let m;
|
|
104
|
+
e[17] !== b ? (m = {
|
|
105
105
|
depthTest: !1,
|
|
106
106
|
...b
|
|
107
|
-
}, e[17] = b, e[18] =
|
|
108
|
-
let
|
|
109
|
-
e[19] !==
|
|
107
|
+
}, e[17] = b, e[18] = m) : m = e[18];
|
|
108
|
+
let g;
|
|
109
|
+
e[19] !== h ? (g = /* @__PURE__ */ G(xn, { overlayRef: h }), e[19] = h, e[20] = g) : g = e[20];
|
|
110
110
|
let w;
|
|
111
111
|
e[21] !== d ? (w = () => d({
|
|
112
112
|
type: "load",
|
|
113
113
|
value: !0
|
|
114
114
|
}), e[21] = d, e[22] = w) : w = e[22];
|
|
115
115
|
let v;
|
|
116
|
-
e[23] !== l || e[24] !== w ? (v = /* @__PURE__ */ G(
|
|
116
|
+
e[23] !== l || e[24] !== w ? (v = /* @__PURE__ */ G(qt, { reuseMaps: !1, mapStyle: l, onLoad: w, onRender: Fn }), e[23] = l, e[24] = w, e[25] = v) : v = e[25];
|
|
117
117
|
let k;
|
|
118
|
-
return e[26] !== S || e[27] !== t || e[28] !==
|
|
119
|
-
|
|
118
|
+
return e[26] !== S || e[27] !== t || e[28] !== r || e[29] !== s || e[30] !== o || e[31] !== p || e[32] !== f || e[33] !== L || e[34] !== u || e[35] !== m || e[36] !== g || e[37] !== v ? (k = /* @__PURE__ */ G(Vt, { children: /* @__PURE__ */ G("div", { className: "deckgl-map", children: /* @__PURE__ */ yt(Bt, { controller: t, id: o, ref: L, layers: S, getCursor: r, getTooltip: s, onLoad: u, onViewStateChange: p, parameters: m, ...f, children: [
|
|
119
|
+
g,
|
|
120
120
|
v
|
|
121
|
-
] }) }) }), e[26] = S, e[27] = t, e[28] =
|
|
121
|
+
] }) }) }), e[26] = S, e[27] = t, e[28] = r, e[29] = s, e[30] = o, e[31] = p, e[32] = f, e[33] = L, e[34] = u, e[35] = m, e[36] = g, e[37] = v, e[38] = k) : k = e[38], k;
|
|
122
122
|
}
|
|
123
|
-
function
|
|
123
|
+
function Fn() {
|
|
124
124
|
document.querySelector(".maplibregl-compact-show")?.classList.remove("maplibregl-compact-show");
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function Dn(n) {
|
|
127
127
|
const {
|
|
128
128
|
type: e,
|
|
129
129
|
props: t
|
|
130
|
-
} =
|
|
130
|
+
} = n;
|
|
131
131
|
return new e(t);
|
|
132
132
|
}
|
|
133
|
-
function
|
|
134
|
-
return !!
|
|
133
|
+
function Rn(n) {
|
|
134
|
+
return !!n?.type;
|
|
135
135
|
}
|
|
136
|
-
function
|
|
137
|
-
const e =
|
|
136
|
+
function xn(n) {
|
|
137
|
+
const e = j(3), {
|
|
138
138
|
overlayRef: t
|
|
139
|
-
} =
|
|
140
|
-
default:
|
|
141
|
-
} =
|
|
139
|
+
} = n, {
|
|
140
|
+
default: r
|
|
141
|
+
} = jt();
|
|
142
142
|
let s, o;
|
|
143
|
-
return e[0] !==
|
|
143
|
+
return e[0] !== r ? (s = () => r, o = [r], e[0] = r, e[1] = s, e[2] = o) : (s = e[1], o = e[2]), Ie(t, s, o), null;
|
|
144
144
|
}
|
|
145
|
-
const
|
|
146
|
-
const e =
|
|
145
|
+
const $n = (n) => {
|
|
146
|
+
const e = j(9);
|
|
147
147
|
let t;
|
|
148
148
|
e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = new Nt({
|
|
149
149
|
interleaved: !0
|
|
150
150
|
}), e[0] = t) : t = e[0];
|
|
151
|
-
const
|
|
151
|
+
const r = t, s = ht();
|
|
152
152
|
let o, i;
|
|
153
|
-
e[1] === Symbol.for("react.memo_cache_sentinel") ? (o = () =>
|
|
153
|
+
e[1] === Symbol.for("react.memo_cache_sentinel") ? (o = () => r, i = [r], e[1] = o, e[2] = i) : (o = e[1], i = e[2]), Ie(n.instanceRef, o, i);
|
|
154
154
|
let a, l;
|
|
155
|
-
e[3] !== s ? (a = () => (
|
|
156
|
-
|
|
157
|
-
}), l = [
|
|
158
|
-
let d,
|
|
159
|
-
return e[6] !==
|
|
160
|
-
|
|
161
|
-
},
|
|
155
|
+
e[3] !== s ? (a = () => (r.setMap(s), () => {
|
|
156
|
+
r.finalize();
|
|
157
|
+
}), l = [r, s], e[3] = s, e[4] = a, e[5] = l) : (a = e[4], l = e[5]), J(a, l);
|
|
158
|
+
let d, p;
|
|
159
|
+
return e[6] !== n ? (d = () => {
|
|
160
|
+
r.setProps(n);
|
|
161
|
+
}, p = [r, n], e[6] = n, e[7] = d, e[8] = p) : (d = e[7], p = e[8]), J(d, p), null;
|
|
162
162
|
};
|
|
163
|
-
function
|
|
164
|
-
const e =
|
|
165
|
-
let t,
|
|
166
|
-
e[0] !==
|
|
163
|
+
function Un(n) {
|
|
164
|
+
const e = j(77);
|
|
165
|
+
let t, r, s, o, i, a, l, d, p, h, b;
|
|
166
|
+
e[0] !== n ? ({
|
|
167
167
|
id: s,
|
|
168
168
|
instanceRef: o,
|
|
169
169
|
basemap: t,
|
|
170
170
|
layers: i,
|
|
171
171
|
gmapsProps: b,
|
|
172
172
|
overlayRef: d,
|
|
173
|
-
parameters:
|
|
174
|
-
controller:
|
|
173
|
+
parameters: p,
|
|
174
|
+
controller: r,
|
|
175
175
|
onLoad: a,
|
|
176
176
|
onViewStateChange: l,
|
|
177
|
-
...
|
|
178
|
-
} =
|
|
177
|
+
...h
|
|
178
|
+
} = n, e[0] = n, e[1] = t, e[2] = r, e[3] = s, e[4] = o, e[5] = i, e[6] = a, e[7] = l, e[8] = d, e[9] = p, e[10] = h, e[11] = b) : (t = e[1], r = e[2], s = e[3], o = e[4], i = e[5], a = e[6], l = e[7], d = e[8], p = e[9], h = e[10], b = e[11]);
|
|
179
179
|
let f;
|
|
180
180
|
e[12] !== b ? (f = b === void 0 ? {
|
|
181
181
|
apiKey: ""
|
|
@@ -188,16 +188,16 @@ function Fn(r) {
|
|
|
188
188
|
} = f, e[14] = f, e[15] = M, e[16] = S, e[17] = L) : (M = e[15], S = e[16], L = e[17]);
|
|
189
189
|
let u;
|
|
190
190
|
e: {
|
|
191
|
-
if (typeof
|
|
191
|
+
if (typeof r == "boolean") {
|
|
192
192
|
let ie;
|
|
193
|
-
e[18] !==
|
|
194
|
-
dragPan:
|
|
195
|
-
doubleClickZoom:
|
|
196
|
-
scrollZoom:
|
|
197
|
-
}, e[18] =
|
|
193
|
+
e[18] !== r ? (ie = {
|
|
194
|
+
dragPan: r,
|
|
195
|
+
doubleClickZoom: r,
|
|
196
|
+
scrollZoom: r
|
|
197
|
+
}, e[18] = r, e[19] = ie) : ie = e[19], u = ie;
|
|
198
198
|
break e;
|
|
199
199
|
}
|
|
200
|
-
const X =
|
|
200
|
+
const X = r, te = X?.dragPan ?? !0, Y = X?.doubleClickZoom ?? !0, W = X?.scrollZoom ?? !0;
|
|
201
201
|
let ee;
|
|
202
202
|
e[20] !== te || e[21] !== Y || e[22] !== W ? (ee = {
|
|
203
203
|
dragPan: te,
|
|
@@ -205,12 +205,12 @@ function Fn(r) {
|
|
|
205
205
|
scrollZoom: W
|
|
206
206
|
}, e[20] = te, e[21] = Y, e[22] = W, e[23] = ee) : ee = e[23], u = ee;
|
|
207
207
|
}
|
|
208
|
-
const
|
|
209
|
-
let
|
|
210
|
-
e[24] !== i ? (
|
|
211
|
-
const w =
|
|
208
|
+
const m = u;
|
|
209
|
+
let g;
|
|
210
|
+
e[24] !== i ? (g = i.filter(qn).map(Vn), e[24] = i, e[25] = g) : g = e[25];
|
|
211
|
+
const w = g;
|
|
212
212
|
let v;
|
|
213
|
-
e[26] !==
|
|
213
|
+
e[26] !== h.initialViewState?.maxZoom || e[27] !== h.initialViewState?.minZoom ? (v = (X) => {
|
|
214
214
|
const {
|
|
215
215
|
detail: te
|
|
216
216
|
} = X, {
|
|
@@ -220,15 +220,15 @@ function Fn(r) {
|
|
|
220
220
|
tilt: ie
|
|
221
221
|
} = te;
|
|
222
222
|
return {
|
|
223
|
-
maxZoom:
|
|
224
|
-
minZoom:
|
|
223
|
+
maxZoom: h.initialViewState?.maxZoom,
|
|
224
|
+
minZoom: h.initialViewState?.minZoom,
|
|
225
225
|
latitude: Y.lat,
|
|
226
226
|
longitude: Y.lng,
|
|
227
227
|
zoom: W - 1,
|
|
228
228
|
bearing: ee,
|
|
229
229
|
pitch: ie
|
|
230
230
|
};
|
|
231
|
-
}, e[26] =
|
|
231
|
+
}, e[26] = h.initialViewState?.maxZoom, e[27] = h.initialViewState?.minZoom, e[28] = v) : v = e[28], h.initialViewState?.maxZoom, h.initialViewState?.minZoom;
|
|
232
232
|
const k = v;
|
|
233
233
|
let F;
|
|
234
234
|
e[29] !== o || e[30] !== l ? (F = (X) => {
|
|
@@ -258,23 +258,23 @@ function Fn(r) {
|
|
|
258
258
|
const te = k(X);
|
|
259
259
|
V(te);
|
|
260
260
|
}, e[32] = V, e[33] = k, e[34] = A) : A = e[34];
|
|
261
|
-
const $ = A, q =
|
|
261
|
+
const $ = A, q = h.initialViewState?.latitude ?? 0, D = h.initialViewState?.longitude ?? 0;
|
|
262
262
|
let _;
|
|
263
|
-
e[35] !== q || e[36] !==
|
|
263
|
+
e[35] !== q || e[36] !== D ? (_ = {
|
|
264
264
|
lat: q,
|
|
265
|
-
lng:
|
|
266
|
-
}, e[35] = q, e[36] =
|
|
267
|
-
const
|
|
265
|
+
lng: D
|
|
266
|
+
}, e[35] = q, e[36] = D, e[37] = _) : _ = e[37];
|
|
267
|
+
const O = (h.initialViewState?.zoom ?? 0) + 1, c = (h.initialViewState?.maxZoom ?? 23) + 1, y = (h.initialViewState?.minZoom ?? 0) + 1, T = h.initialViewState?.pitch, P = h.initialViewState?.bearing;
|
|
268
268
|
let C;
|
|
269
|
-
e[38] !== V || e[39] !== a || e[40] !==
|
|
269
|
+
e[38] !== V || e[39] !== a || e[40] !== h.initialViewState ? (C = () => {
|
|
270
270
|
a({
|
|
271
271
|
type: "load",
|
|
272
272
|
value: !0
|
|
273
|
-
}), V(
|
|
274
|
-
}, e[38] = V, e[39] = a, e[40] =
|
|
275
|
-
const E = typeof
|
|
276
|
-
let
|
|
277
|
-
e[42] !== s || e[43] !== d ? (
|
|
273
|
+
}), V(h.initialViewState);
|
|
274
|
+
}, e[38] = V, e[39] = a, e[40] = h.initialViewState, e[41] = C) : C = e[41];
|
|
275
|
+
const E = typeof m.scrollZoom == "boolean" ? m.scrollZoom : !!m.scrollZoom, B = m.dragPan ? "greedy" : "none", I = !m.doubleClickZoom;
|
|
276
|
+
let H;
|
|
277
|
+
e[42] !== s || e[43] !== d ? (H = /* @__PURE__ */ G(jn, { id: s, overlayRef: d }), e[42] = s, e[43] = d, e[44] = H) : H = e[44];
|
|
278
278
|
let U;
|
|
279
279
|
e[45] !== a ? (U = () => {
|
|
280
280
|
a({
|
|
@@ -283,73 +283,73 @@ function Fn(r) {
|
|
|
283
283
|
});
|
|
284
284
|
}, e[45] = a, e[46] = U) : U = e[46];
|
|
285
285
|
let Z;
|
|
286
|
-
e[47] !==
|
|
286
|
+
e[47] !== p ? (Z = {
|
|
287
287
|
depthTest: !1,
|
|
288
|
-
...
|
|
289
|
-
}, e[47] =
|
|
288
|
+
...p
|
|
289
|
+
}, e[47] = p, e[48] = Z) : Z = e[48];
|
|
290
290
|
let oe;
|
|
291
|
-
e[49] !== w || e[50] !== s || e[51] !== o || e[52] !==
|
|
291
|
+
e[49] !== w || e[50] !== s || e[51] !== o || e[52] !== h || e[53] !== U || e[54] !== Z ? (oe = /* @__PURE__ */ G($n, { id: s, instanceRef: o, layers: w, onLoad: U, parameters: Z, ...h }), e[49] = w, e[50] = s, e[51] = o, e[52] = h, e[53] = U, e[54] = Z, e[55] = oe) : oe = e[55];
|
|
292
292
|
let Q;
|
|
293
|
-
e[56] !== S || e[57] !== t || e[58] !== $ || e[59] !== s || e[60] !== _ || e[61] !==
|
|
294
|
-
|
|
293
|
+
e[56] !== S || e[57] !== t || e[58] !== $ || e[59] !== s || e[60] !== _ || e[61] !== O || e[62] !== c || e[63] !== y || e[64] !== T || e[65] !== P || e[66] !== C || e[67] !== E || e[68] !== B || e[69] !== I || e[70] !== H || e[71] !== oe ? (Q = /* @__PURE__ */ G("div", { className: "deckgl-map", children: /* @__PURE__ */ yt(It, { id: s, mapTypeId: t, disableDefaultUI: !0, ...S, center: _, zoom: O, maxZoom: c, minZoom: y, tilt: T, heading: P, onTilesLoaded: C, onBoundsChanged: $, onZoomChanged: $, scrollwheel: E, gestureHandling: B, disableDoubleClickZoom: I, children: [
|
|
294
|
+
H,
|
|
295
295
|
oe
|
|
296
|
-
] }) }), e[56] = S, e[57] = t, e[58] = $, e[59] = s, e[60] = _, e[61] =
|
|
296
|
+
] }) }), e[56] = S, e[57] = t, e[58] = $, e[59] = s, e[60] = _, e[61] = O, e[62] = c, e[63] = y, e[64] = T, e[65] = P, e[66] = C, e[67] = E, e[68] = B, e[69] = I, e[70] = H, e[71] = oe, e[72] = Q) : Q = e[72];
|
|
297
297
|
let le;
|
|
298
|
-
return e[73] !== M || e[74] !== L || e[75] !== Q ? (le = /* @__PURE__ */ G(
|
|
298
|
+
return e[73] !== M || e[74] !== L || e[75] !== Q ? (le = /* @__PURE__ */ G(Ht, { apiKey: L, ...M, children: Q }), e[73] = M, e[74] = L, e[75] = Q, e[76] = le) : le = e[76], le;
|
|
299
299
|
}
|
|
300
|
-
function
|
|
300
|
+
function Vn(n) {
|
|
301
301
|
const {
|
|
302
302
|
type: e,
|
|
303
303
|
props: t
|
|
304
|
-
} =
|
|
304
|
+
} = n;
|
|
305
305
|
return new e(t);
|
|
306
306
|
}
|
|
307
|
-
function
|
|
308
|
-
return !!
|
|
307
|
+
function qn(n) {
|
|
308
|
+
return !!n?.type;
|
|
309
309
|
}
|
|
310
|
-
function
|
|
311
|
-
const e =
|
|
310
|
+
function jn(n) {
|
|
311
|
+
const e = j(3), {
|
|
312
312
|
id: t,
|
|
313
|
-
overlayRef:
|
|
314
|
-
} =
|
|
313
|
+
overlayRef: r
|
|
314
|
+
} = n, s = ht(t);
|
|
315
315
|
let o, i;
|
|
316
|
-
return e[0] !== s ? (o = () => s, i = [s], e[0] = s, e[1] = o, e[2] = i) : (o = e[1], i = e[2]), Ie(
|
|
316
|
+
return e[0] !== s ? (o = () => s, i = [s], e[0] = s, e[1] = o, e[2] = i) : (o = e[1], i = e[2]), Ie(r, o, i), null;
|
|
317
317
|
}
|
|
318
|
-
function
|
|
319
|
-
const e =
|
|
320
|
-
let t,
|
|
321
|
-
e[0] !==
|
|
322
|
-
instanceRef:
|
|
318
|
+
function Bn(n) {
|
|
319
|
+
const e = j(46);
|
|
320
|
+
let t, r, s, o, i, a, l, d, p, h, b, f;
|
|
321
|
+
e[0] !== n ? ({
|
|
322
|
+
instanceRef: r,
|
|
323
323
|
overlayRef: o,
|
|
324
324
|
basemap: a,
|
|
325
325
|
controller: l,
|
|
326
326
|
id: d,
|
|
327
|
-
layers:
|
|
327
|
+
layers: p,
|
|
328
328
|
gmapsProps: t,
|
|
329
|
-
getCursor:
|
|
329
|
+
getCursor: h,
|
|
330
330
|
getTooltip: b,
|
|
331
331
|
onLoad: s,
|
|
332
332
|
onViewStateChange: f,
|
|
333
333
|
...i
|
|
334
|
-
} =
|
|
334
|
+
} = n, e[0] = n, e[1] = t, e[2] = r, e[3] = s, e[4] = o, e[5] = i, e[6] = a, e[7] = l, e[8] = d, e[9] = p, e[10] = h, e[11] = b, e[12] = f) : (t = e[1], r = e[2], s = e[3], o = e[4], i = e[5], a = e[6], l = e[7], d = e[8], p = e[9], h = e[10], b = e[11], f = e[12]);
|
|
335
335
|
const M = a === void 0 ? ae.positron : a, S = l === void 0 ? !0 : l, L = d === void 0 ? "deck-gl-map" : d;
|
|
336
336
|
let u;
|
|
337
|
-
e[13] !==
|
|
338
|
-
const
|
|
337
|
+
e[13] !== p ? (u = p === void 0 ? [] : p, e[13] = p, e[14] = u) : u = e[14];
|
|
338
|
+
const m = u, g = h === void 0 ? Pn : h, w = b === void 0 ? On : b, v = f === void 0 ? Hn : f;
|
|
339
339
|
let k;
|
|
340
340
|
e[15] === Symbol.for("react.memo_cache_sentinel") ? (k = [!1, !1], e[15] = k) : k = e[15];
|
|
341
341
|
const [F, V] = ue(k), {
|
|
342
342
|
url: A,
|
|
343
343
|
type: $
|
|
344
344
|
} = we[M], q = $ === ce.googleMaps;
|
|
345
|
-
let
|
|
346
|
-
e[16] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
345
|
+
let D;
|
|
346
|
+
e[16] === Symbol.for("react.memo_cache_sentinel") ? (D = (C) => {
|
|
347
347
|
const E = C.type === "deckgl" ? 0 : 1;
|
|
348
|
-
V((
|
|
349
|
-
}, e[16] =
|
|
350
|
-
const _ =
|
|
351
|
-
let
|
|
352
|
-
e[17] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
348
|
+
V((B) => B.map((I, H) => H === E ? C.value : I));
|
|
349
|
+
}, e[16] = D) : D = e[16];
|
|
350
|
+
const _ = D;
|
|
351
|
+
let O, c;
|
|
352
|
+
e[17] === Symbol.for("react.memo_cache_sentinel") ? (O = () => () => {
|
|
353
353
|
_({
|
|
354
354
|
type: "load",
|
|
355
355
|
value: !1
|
|
@@ -357,117 +357,117 @@ function $n(r) {
|
|
|
357
357
|
type: "deckgl",
|
|
358
358
|
value: !1
|
|
359
359
|
});
|
|
360
|
-
}, c = [_], e[17] =
|
|
360
|
+
}, c = [_], e[17] = O, e[18] = c) : (O = e[17], c = e[18]), J(O, c);
|
|
361
361
|
let y, T;
|
|
362
362
|
if (e[19] !== F || e[20] !== s ? (y = () => {
|
|
363
|
-
const C = F.every(
|
|
363
|
+
const C = F.every(In);
|
|
364
364
|
s?.(C);
|
|
365
365
|
}, T = [F, s], e[19] = F, e[20] = s, e[21] = y, e[22] = T) : (y = e[21], T = e[22]), J(y, T), q) {
|
|
366
366
|
let C;
|
|
367
|
-
return e[23] !== M || e[24] !== S || e[25] !==
|
|
367
|
+
return e[23] !== M || e[24] !== S || e[25] !== g || e[26] !== w || e[27] !== t || e[28] !== L || e[29] !== r || e[30] !== m || e[31] !== v || e[32] !== o || e[33] !== i ? (C = /* @__PURE__ */ G(Un, { instanceRef: r, overlayRef: o, controller: S, id: L, basemap: M, layers: m, gmapsProps: t, getCursor: g, getTooltip: w, onLoad: _, onViewStateChange: v, ...i }), e[23] = M, e[24] = S, e[25] = g, e[26] = w, e[27] = t, e[28] = L, e[29] = r, e[30] = m, e[31] = v, e[32] = o, e[33] = i, e[34] = C) : C = e[34], C;
|
|
368
368
|
}
|
|
369
|
-
let
|
|
370
|
-
return e[35] !== S || e[36] !==
|
|
369
|
+
let P;
|
|
370
|
+
return e[35] !== S || e[36] !== g || e[37] !== w || e[38] !== L || e[39] !== r || e[40] !== m || e[41] !== A || e[42] !== v || e[43] !== o || e[44] !== i ? (P = /* @__PURE__ */ G(An, { instanceRef: r, overlayRef: o, controller: S, id: L, layers: m, mapStyle: A, getCursor: g, getTooltip: w, onLoad: _, onViewStateChange: v, ...i }), e[35] = S, e[36] = g, e[37] = w, e[38] = L, e[39] = r, e[40] = m, e[41] = A, e[42] = v, e[43] = o, e[44] = i, e[45] = P) : P = e[45], P;
|
|
371
371
|
}
|
|
372
|
-
function
|
|
373
|
-
return
|
|
372
|
+
function In(n) {
|
|
373
|
+
return n;
|
|
374
374
|
}
|
|
375
|
-
function
|
|
375
|
+
function Hn() {
|
|
376
376
|
return null;
|
|
377
377
|
}
|
|
378
|
-
const
|
|
378
|
+
const Nn = {
|
|
379
379
|
transitionDuration: "auto",
|
|
380
|
-
transitionInterpolator: new
|
|
380
|
+
transitionInterpolator: new Zt({
|
|
381
381
|
curve: 2
|
|
382
382
|
})
|
|
383
383
|
};
|
|
384
384
|
var Ee = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
385
|
-
function
|
|
386
|
-
return
|
|
387
|
-
}
|
|
388
|
-
var xe,
|
|
389
|
-
function
|
|
390
|
-
if (
|
|
391
|
-
|
|
392
|
-
var
|
|
393
|
-
return e(
|
|
385
|
+
function Tt(n) {
|
|
386
|
+
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
|
387
|
+
}
|
|
388
|
+
var xe, tt;
|
|
389
|
+
function Zn() {
|
|
390
|
+
if (tt) return xe;
|
|
391
|
+
tt = 1;
|
|
392
|
+
var n = function(m) {
|
|
393
|
+
return e(m) && !t(m);
|
|
394
394
|
};
|
|
395
395
|
function e(u) {
|
|
396
396
|
return !!u && typeof u == "object";
|
|
397
397
|
}
|
|
398
398
|
function t(u) {
|
|
399
|
-
var
|
|
400
|
-
return
|
|
399
|
+
var m = Object.prototype.toString.call(u);
|
|
400
|
+
return m === "[object RegExp]" || m === "[object Date]" || o(u);
|
|
401
401
|
}
|
|
402
|
-
var
|
|
402
|
+
var r = typeof Symbol == "function" && Symbol.for, s = r ? Symbol.for("react.element") : 60103;
|
|
403
403
|
function o(u) {
|
|
404
404
|
return u.$$typeof === s;
|
|
405
405
|
}
|
|
406
406
|
function i(u) {
|
|
407
407
|
return Array.isArray(u) ? [] : {};
|
|
408
408
|
}
|
|
409
|
-
function a(u,
|
|
410
|
-
return
|
|
409
|
+
function a(u, m) {
|
|
410
|
+
return m.clone !== !1 && m.isMergeableObject(u) ? S(i(u), u, m) : u;
|
|
411
411
|
}
|
|
412
|
-
function l(u,
|
|
413
|
-
return u.concat(
|
|
414
|
-
return a(w,
|
|
412
|
+
function l(u, m, g) {
|
|
413
|
+
return u.concat(m).map(function(w) {
|
|
414
|
+
return a(w, g);
|
|
415
415
|
});
|
|
416
416
|
}
|
|
417
|
-
function d(u,
|
|
418
|
-
if (!
|
|
417
|
+
function d(u, m) {
|
|
418
|
+
if (!m.customMerge)
|
|
419
419
|
return S;
|
|
420
|
-
var
|
|
421
|
-
return typeof
|
|
420
|
+
var g = m.customMerge(u);
|
|
421
|
+
return typeof g == "function" ? g : S;
|
|
422
422
|
}
|
|
423
|
-
function
|
|
424
|
-
return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(u).filter(function(
|
|
425
|
-
return Object.propertyIsEnumerable.call(u,
|
|
423
|
+
function p(u) {
|
|
424
|
+
return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(u).filter(function(m) {
|
|
425
|
+
return Object.propertyIsEnumerable.call(u, m);
|
|
426
426
|
}) : [];
|
|
427
427
|
}
|
|
428
|
-
function
|
|
429
|
-
return Object.keys(u).concat(
|
|
428
|
+
function h(u) {
|
|
429
|
+
return Object.keys(u).concat(p(u));
|
|
430
430
|
}
|
|
431
|
-
function b(u,
|
|
431
|
+
function b(u, m) {
|
|
432
432
|
try {
|
|
433
|
-
return
|
|
433
|
+
return m in u;
|
|
434
434
|
} catch {
|
|
435
435
|
return !1;
|
|
436
436
|
}
|
|
437
437
|
}
|
|
438
|
-
function f(u,
|
|
439
|
-
return b(u,
|
|
438
|
+
function f(u, m) {
|
|
439
|
+
return b(u, m) && !(Object.hasOwnProperty.call(u, m) && Object.propertyIsEnumerable.call(u, m));
|
|
440
440
|
}
|
|
441
|
-
function M(u,
|
|
441
|
+
function M(u, m, g) {
|
|
442
442
|
var w = {};
|
|
443
|
-
return
|
|
444
|
-
w[v] = a(u[v],
|
|
445
|
-
}),
|
|
446
|
-
f(u, v) || (b(u, v) &&
|
|
443
|
+
return g.isMergeableObject(u) && h(u).forEach(function(v) {
|
|
444
|
+
w[v] = a(u[v], g);
|
|
445
|
+
}), h(m).forEach(function(v) {
|
|
446
|
+
f(u, v) || (b(u, v) && g.isMergeableObject(m[v]) ? w[v] = d(v, g)(u[v], m[v], g) : w[v] = a(m[v], g));
|
|
447
447
|
}), w;
|
|
448
448
|
}
|
|
449
|
-
function S(u,
|
|
450
|
-
|
|
451
|
-
var w = Array.isArray(
|
|
452
|
-
return k ? w ?
|
|
449
|
+
function S(u, m, g) {
|
|
450
|
+
g = g || {}, g.arrayMerge = g.arrayMerge || l, g.isMergeableObject = g.isMergeableObject || n, g.cloneUnlessOtherwiseSpecified = a;
|
|
451
|
+
var w = Array.isArray(m), v = Array.isArray(u), k = w === v;
|
|
452
|
+
return k ? w ? g.arrayMerge(u, m, g) : M(u, m, g) : a(m, g);
|
|
453
453
|
}
|
|
454
|
-
S.all = function(
|
|
455
|
-
if (!Array.isArray(
|
|
454
|
+
S.all = function(m, g) {
|
|
455
|
+
if (!Array.isArray(m))
|
|
456
456
|
throw new Error("first argument should be an array");
|
|
457
|
-
return
|
|
458
|
-
return S(w, v,
|
|
457
|
+
return m.reduce(function(w, v) {
|
|
458
|
+
return S(w, v, g);
|
|
459
459
|
}, {});
|
|
460
460
|
};
|
|
461
461
|
var L = S;
|
|
462
462
|
return xe = L, xe;
|
|
463
463
|
}
|
|
464
|
-
var
|
|
465
|
-
const me = /* @__PURE__ */
|
|
466
|
-
const e =
|
|
464
|
+
var zn = Zn();
|
|
465
|
+
const me = /* @__PURE__ */ Tt(zn), Gn = (n) => {
|
|
466
|
+
const e = n.reduce((t, r) => {
|
|
467
467
|
const {
|
|
468
468
|
id: s,
|
|
469
469
|
basemap: o
|
|
470
|
-
} =
|
|
470
|
+
} = r;
|
|
471
471
|
return t[s] = {
|
|
472
472
|
isLoaded: !1,
|
|
473
473
|
basemap: o,
|
|
@@ -477,11 +477,11 @@ const me = /* @__PURE__ */ Et(jn), In = (r) => {
|
|
|
477
477
|
overlayRef: {
|
|
478
478
|
current: null
|
|
479
479
|
},
|
|
480
|
-
layers:
|
|
481
|
-
controller:
|
|
480
|
+
layers: r.layers ?? [],
|
|
481
|
+
controller: r.controller ?? !0
|
|
482
482
|
}, t;
|
|
483
483
|
}, {});
|
|
484
|
-
return ((t,
|
|
484
|
+
return ((t, r) => ({
|
|
485
485
|
maps: e,
|
|
486
486
|
setBasemap: (s, o) => t((i) => {
|
|
487
487
|
const {
|
|
@@ -509,16 +509,16 @@ const me = /* @__PURE__ */ Et(jn), In = (r) => {
|
|
|
509
509
|
}
|
|
510
510
|
}
|
|
511
511
|
})),
|
|
512
|
-
getOverlayInstance: (s) =>
|
|
512
|
+
getOverlayInstance: (s) => r().maps[s]?.overlayRef?.current,
|
|
513
513
|
getDeckInstance: (s) => {
|
|
514
|
-
const i =
|
|
514
|
+
const i = r().maps[s]?.instanceRef?.current;
|
|
515
515
|
return (
|
|
516
516
|
// @ts-expect-error accessing protected props
|
|
517
517
|
i?.deck ?? i?._deck
|
|
518
518
|
);
|
|
519
519
|
},
|
|
520
520
|
getViewState: (s) => {
|
|
521
|
-
const i =
|
|
521
|
+
const i = r().getDeckInstance(s);
|
|
522
522
|
if (!i?.viewState) return;
|
|
523
523
|
const {
|
|
524
524
|
width: a = 0,
|
|
@@ -533,18 +533,18 @@ const me = /* @__PURE__ */ Et(jn), In = (r) => {
|
|
|
533
533
|
height: i.viewState.height ?? l
|
|
534
534
|
};
|
|
535
535
|
},
|
|
536
|
-
getViewports: (s, o) =>
|
|
537
|
-
getViewport: (s, o = 0, i) =>
|
|
536
|
+
getViewports: (s, o) => r().getDeckInstance(s)?.getViewports(o),
|
|
537
|
+
getViewport: (s, o = 0, i) => r().getDeckInstance(s)?.getViewports(i)?.[o],
|
|
538
538
|
getBounds: (s, o, i) => {
|
|
539
|
-
const a =
|
|
539
|
+
const a = r();
|
|
540
540
|
if (!a.maps?.[s]?.isLoaded) return;
|
|
541
541
|
const l = a.getViewState(s);
|
|
542
542
|
if (!l) return;
|
|
543
|
-
const
|
|
543
|
+
const p = new bt(l).fitBounds(o, i?.boundsOptions);
|
|
544
544
|
return {
|
|
545
|
-
latitude:
|
|
546
|
-
longitude:
|
|
547
|
-
zoom:
|
|
545
|
+
latitude: p.latitude,
|
|
546
|
+
longitude: p.longitude,
|
|
547
|
+
zoom: p.zoom,
|
|
548
548
|
...i?.viewStateOptions
|
|
549
549
|
};
|
|
550
550
|
},
|
|
@@ -583,40 +583,40 @@ const me = /* @__PURE__ */ Et(jn), In = (r) => {
|
|
|
583
583
|
};
|
|
584
584
|
})
|
|
585
585
|
}));
|
|
586
|
-
},
|
|
587
|
-
const e =
|
|
586
|
+
}, Wn = (n) => {
|
|
587
|
+
const e = n.reduce((t, r) => {
|
|
588
588
|
const {
|
|
589
589
|
id: s
|
|
590
|
-
} =
|
|
590
|
+
} = r;
|
|
591
591
|
return t[s] = !1, t;
|
|
592
592
|
}, {});
|
|
593
593
|
return ((t) => ({
|
|
594
594
|
areLayersLoaded: e,
|
|
595
|
-
setLayersLoad: (
|
|
595
|
+
setLayersLoad: (r, s) => t((o) => ({
|
|
596
596
|
areLayersLoaded: {
|
|
597
597
|
...o.areLayersLoaded,
|
|
598
|
-
[
|
|
598
|
+
[r]: s
|
|
599
599
|
}
|
|
600
600
|
}))
|
|
601
601
|
}));
|
|
602
|
-
},
|
|
603
|
-
const e =
|
|
604
|
-
const s =
|
|
605
|
-
return t.initialViewStates[
|
|
602
|
+
}, Kn = (n) => {
|
|
603
|
+
const e = n.reduce((t, r) => {
|
|
604
|
+
const s = r.initialViewState ?? r.viewState;
|
|
605
|
+
return t.initialViewStates[r.id] = s, t.viewStates[r.id] = s, t.viewports[r.id] = null, t;
|
|
606
606
|
}, {
|
|
607
607
|
viewStates: {},
|
|
608
608
|
viewports: {},
|
|
609
609
|
initialViewStates: {}
|
|
610
610
|
});
|
|
611
|
-
return ((t,
|
|
611
|
+
return ((t, r) => ({
|
|
612
612
|
viewports: e.viewports,
|
|
613
613
|
initialViewStates: e.initialViewStates,
|
|
614
614
|
updateViewPort: (s) => {
|
|
615
|
-
const o =
|
|
615
|
+
const o = r();
|
|
616
616
|
if (!o.maps[s]?.isLoaded) return;
|
|
617
617
|
const i = o.getViewState(s);
|
|
618
618
|
if (!i) return;
|
|
619
|
-
const a = new
|
|
619
|
+
const a = new bt(i);
|
|
620
620
|
t((l) => ({
|
|
621
621
|
viewports: {
|
|
622
622
|
...l.viewports,
|
|
@@ -668,93 +668,120 @@ const me = /* @__PURE__ */ Et(jn), In = (r) => {
|
|
|
668
668
|
}
|
|
669
669
|
}))
|
|
670
670
|
}));
|
|
671
|
-
},
|
|
672
|
-
fitBounds: (t,
|
|
673
|
-
const o = e(), i = o.getBounds(t,
|
|
671
|
+
}, Yn = ((n, e) => ({
|
|
672
|
+
fitBounds: (t, r, s) => {
|
|
673
|
+
const o = e(), i = o.getBounds(t, r, s);
|
|
674
674
|
i && (o.setViewState(t, i), o.updateViewPort(t));
|
|
675
675
|
},
|
|
676
|
-
flyTo: (t,
|
|
676
|
+
flyTo: (t, r, s = {}) => {
|
|
677
677
|
const o = e(), i = {
|
|
678
|
-
...
|
|
678
|
+
...Nn,
|
|
679
679
|
...s?.viewStateOptions
|
|
680
680
|
}, a = {
|
|
681
|
-
...
|
|
681
|
+
...r,
|
|
682
682
|
...i
|
|
683
683
|
};
|
|
684
684
|
o.setViewState(t, a), o.updateViewPort(t);
|
|
685
685
|
},
|
|
686
|
-
loadInitialViewState: (t,
|
|
686
|
+
loadInitialViewState: (t, r) => {
|
|
687
687
|
const s = e();
|
|
688
|
-
s.setInitialViewState(t,
|
|
688
|
+
s.setInitialViewState(t, r), s.flyTo(t, r, {
|
|
689
689
|
viewStateOptions: {
|
|
690
690
|
transitionDuration: 0
|
|
691
691
|
}
|
|
692
692
|
});
|
|
693
693
|
},
|
|
694
694
|
resetViewState: (t) => {
|
|
695
|
-
const
|
|
696
|
-
s[t] &&
|
|
695
|
+
const r = e(), s = r.initialViewStates;
|
|
696
|
+
s[t] && r.flyTo(t, s[t]);
|
|
697
697
|
}
|
|
698
|
-
})),
|
|
699
|
-
const e =
|
|
698
|
+
})), Jn = (n) => {
|
|
699
|
+
const e = n.reduce((t, r) => (t[r.id] = r.spatialFilter ?? {}, t), {});
|
|
700
700
|
return ((t) => ({
|
|
701
701
|
spatialFilter: e,
|
|
702
|
-
setSpatialFilter: (
|
|
702
|
+
setSpatialFilter: (r, s, o) => {
|
|
703
703
|
t((i) => {
|
|
704
704
|
const a = structuredClone(i.spatialFilter);
|
|
705
|
-
return a[
|
|
706
|
-
...a[
|
|
705
|
+
return a[r] = {
|
|
706
|
+
...a[r],
|
|
707
707
|
[s]: o
|
|
708
708
|
}, {
|
|
709
709
|
spatialFilter: a
|
|
710
710
|
};
|
|
711
711
|
});
|
|
712
712
|
},
|
|
713
|
-
removeSpatialFilter: (
|
|
713
|
+
removeSpatialFilter: (r, s) => {
|
|
714
714
|
t((o) => {
|
|
715
715
|
const i = structuredClone(o.spatialFilter);
|
|
716
|
-
return i[
|
|
716
|
+
return i[r] && delete i[r][s], {
|
|
717
717
|
spatialFilter: i
|
|
718
718
|
};
|
|
719
719
|
});
|
|
720
720
|
}
|
|
721
721
|
}));
|
|
722
|
-
},
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
722
|
+
}, Qn = ((n, e) => ({
|
|
723
|
+
setLayerHover: (t, r, s) => {
|
|
724
|
+
const o = e(), i = o.getDeckInstance(t), a = o.getViewport(t), l = i?.widgetManager;
|
|
725
|
+
if (!l || !a) return;
|
|
726
|
+
const [d, p] = a.project(s);
|
|
727
|
+
if (d == null || p == null || isNaN(d) || isNaN(p)) return;
|
|
728
|
+
const h = i.pickObject({
|
|
729
|
+
x: d,
|
|
730
|
+
y: p,
|
|
731
|
+
radius: 5,
|
|
732
|
+
layerIds: [r]
|
|
733
|
+
});
|
|
734
|
+
if (!h) return;
|
|
735
|
+
const b = {
|
|
736
|
+
...h,
|
|
737
|
+
x: d,
|
|
738
|
+
y: p
|
|
739
|
+
}, f = new MouseEvent("mouseenter");
|
|
740
|
+
h.layer?.onHover?.(b, f), l.onHover?.(b, f);
|
|
741
|
+
},
|
|
742
|
+
clearLayersHover: (t) => {
|
|
743
|
+
const o = e().getDeckInstance(t)?.widgetManager;
|
|
744
|
+
if (!o) return;
|
|
745
|
+
const i = new MouseEvent("mouseleave");
|
|
746
|
+
o.onHover?.({}, i);
|
|
747
|
+
}
|
|
748
|
+
})), Xn = (n) => Ze()((...e) => ({
|
|
749
|
+
...Gn(n)(...e),
|
|
750
|
+
...Wn(n)(...e),
|
|
751
|
+
...Kn(n)(...e),
|
|
752
|
+
...Jn(n)(...e),
|
|
753
|
+
...Yn(...e),
|
|
754
|
+
...Qn(...e)
|
|
755
|
+
})), Lt = He({});
|
|
756
|
+
function er(n) {
|
|
757
|
+
const e = j(5), {
|
|
731
758
|
children: t,
|
|
732
|
-
values:
|
|
733
|
-
} =
|
|
759
|
+
values: r
|
|
760
|
+
} = n;
|
|
734
761
|
let s;
|
|
735
|
-
e[0] !==
|
|
762
|
+
e[0] !== r ? (s = Xn(r), e[0] = r, e[1] = s) : s = e[1];
|
|
736
763
|
const [o] = ue(s);
|
|
737
764
|
let i;
|
|
738
|
-
return e[2] !== t || e[3] !== o ? (i = /* @__PURE__ */ G(
|
|
765
|
+
return e[2] !== t || e[3] !== o ? (i = /* @__PURE__ */ G(Lt.Provider, { value: o, children: t }), e[2] = t, e[3] = o, e[4] = i) : i = e[4], i;
|
|
739
766
|
}
|
|
740
|
-
function x(
|
|
741
|
-
const e =
|
|
767
|
+
function x(n) {
|
|
768
|
+
const e = Ne(Lt);
|
|
742
769
|
if (!Object.keys(e).length)
|
|
743
770
|
throw new Error("Missing MapProvider in the tree");
|
|
744
|
-
return ze(e,
|
|
771
|
+
return ze(e, n);
|
|
745
772
|
}
|
|
746
|
-
function
|
|
747
|
-
const e =
|
|
773
|
+
function go(n) {
|
|
774
|
+
const e = j(9), {
|
|
748
775
|
children: t,
|
|
749
|
-
mapId:
|
|
750
|
-
} =
|
|
776
|
+
mapId: r
|
|
777
|
+
} = n;
|
|
751
778
|
let s;
|
|
752
|
-
e[0] !==
|
|
779
|
+
e[0] !== r ? (s = (p) => p.maps[r], e[0] = r, e[1] = s) : s = e[1];
|
|
753
780
|
const {
|
|
754
781
|
basemap: o
|
|
755
|
-
} = x(s), i = x(
|
|
782
|
+
} = x(s), i = x(tr);
|
|
756
783
|
let a;
|
|
757
|
-
e[2] !==
|
|
784
|
+
e[2] !== r || e[3] !== i ? (a = (p) => i(r, p), e[2] = r, e[3] = i, e[4] = a) : a = e[4];
|
|
758
785
|
const l = a;
|
|
759
786
|
let d;
|
|
760
787
|
return e[5] !== o || e[6] !== t || e[7] !== l ? (d = t({
|
|
@@ -762,8 +789,8 @@ function co(r) {
|
|
|
762
789
|
setBasemap: l
|
|
763
790
|
}), e[5] = o, e[6] = t, e[7] = l, e[8] = d) : d = e[8], d;
|
|
764
791
|
}
|
|
765
|
-
function
|
|
766
|
-
return
|
|
792
|
+
function tr(n) {
|
|
793
|
+
return n.setBasemap;
|
|
767
794
|
}
|
|
768
795
|
const se = {
|
|
769
796
|
addFeature: "addFeature",
|
|
@@ -773,9 +800,9 @@ const se = {
|
|
|
773
800
|
finish: "finish",
|
|
774
801
|
addPosition: "addPosition"
|
|
775
802
|
};
|
|
776
|
-
class
|
|
803
|
+
class nr extends zt {
|
|
777
804
|
constructor() {
|
|
778
|
-
super([new
|
|
805
|
+
super([new Gt(), new Wt()]);
|
|
779
806
|
}
|
|
780
807
|
handleKeyUp(e, t) {
|
|
781
808
|
super.handleKeyUp(e, t), e.key === "Enter" && (this.resetClickSequence(), t.onEdit({
|
|
@@ -785,7 +812,7 @@ class Yn extends Zt {
|
|
|
785
812
|
}));
|
|
786
813
|
}
|
|
787
814
|
}
|
|
788
|
-
const he = "lassoLayer",
|
|
815
|
+
const he = "lassoLayer", Oe = "maskLayer", rr = {
|
|
789
816
|
id: he,
|
|
790
817
|
billboard: !1,
|
|
791
818
|
editHandlePointRadiusUnits: "pixels",
|
|
@@ -798,7 +825,7 @@ const he = "lassoLayer", Pe = "maskLayer", Jn = {
|
|
|
798
825
|
lineWidthUnits: "pixels",
|
|
799
826
|
getLineWidth: 2,
|
|
800
827
|
lineWidthMinPixels: 2
|
|
801
|
-
},
|
|
828
|
+
}, nt = {
|
|
802
829
|
editing: {
|
|
803
830
|
border: [3, 111, 226, 255],
|
|
804
831
|
fill: [3, 111, 226, 20.4],
|
|
@@ -811,52 +838,52 @@ const he = "lassoLayer", Pe = "maskLayer", Jn = {
|
|
|
811
838
|
}, $e = {
|
|
812
839
|
styles: {
|
|
813
840
|
colors: {
|
|
814
|
-
editing:
|
|
815
|
-
finished:
|
|
841
|
+
editing: nt.editing,
|
|
842
|
+
finished: nt.finished
|
|
816
843
|
}
|
|
817
844
|
},
|
|
818
845
|
labels: {
|
|
819
846
|
mask: "Mask"
|
|
820
847
|
}
|
|
821
|
-
},
|
|
848
|
+
}, sr = [new rn({
|
|
822
849
|
filterSize: 1
|
|
823
850
|
})], Te = {
|
|
824
|
-
id:
|
|
851
|
+
id: Oe,
|
|
825
852
|
operation: "mask",
|
|
826
853
|
pickable: !1,
|
|
827
854
|
visible: !0,
|
|
828
|
-
extensions:
|
|
855
|
+
extensions: sr,
|
|
829
856
|
filterRange: [1, 1]
|
|
830
857
|
}, Ue = {
|
|
831
858
|
polygon: {
|
|
832
859
|
value: "polygon",
|
|
833
|
-
mode:
|
|
860
|
+
mode: Jt
|
|
834
861
|
},
|
|
835
862
|
rectangle: {
|
|
836
863
|
value: "rectangle",
|
|
837
|
-
mode:
|
|
864
|
+
mode: Yt
|
|
838
865
|
},
|
|
839
866
|
circle: {
|
|
840
867
|
value: "circle",
|
|
841
|
-
mode:
|
|
868
|
+
mode: St
|
|
842
869
|
},
|
|
843
870
|
lasso: {
|
|
844
871
|
value: "lasso",
|
|
845
|
-
mode:
|
|
872
|
+
mode: Kt
|
|
846
873
|
},
|
|
847
874
|
edit: {
|
|
848
875
|
value: "edit",
|
|
849
|
-
mode:
|
|
876
|
+
mode: nr
|
|
850
877
|
}
|
|
851
|
-
}, Se =
|
|
878
|
+
}, Se = gt((n) => ({
|
|
852
879
|
layers: {},
|
|
853
|
-
setLayer: (e, t) =>
|
|
880
|
+
setLayer: (e, t) => n((r) => {
|
|
854
881
|
const s = {
|
|
855
|
-
...
|
|
882
|
+
...r.layers
|
|
856
883
|
}, o = s[e] ?? {
|
|
857
884
|
type: null,
|
|
858
885
|
props: {}
|
|
859
|
-
}, i = [...o.props.extensions ?? [], ...t.props?.extensions ?? []].reduce((l, d) => (l.some((
|
|
886
|
+
}, i = [...o.props.extensions ?? [], ...t.props?.extensions ?? []].reduce((l, d) => (l.some((p) => p.equals(d)) || l.push(d), l), []), a = o.legend || t.legend ? {
|
|
860
887
|
...o.legend,
|
|
861
888
|
...t.legend
|
|
862
889
|
} : void 0;
|
|
@@ -878,90 +905,90 @@ const he = "lassoLayer", Pe = "maskLayer", Jn = {
|
|
|
878
905
|
layers: s
|
|
879
906
|
};
|
|
880
907
|
}),
|
|
881
|
-
removeLayer: (e) =>
|
|
882
|
-
const
|
|
908
|
+
removeLayer: (e) => n((t) => {
|
|
909
|
+
const r = {
|
|
883
910
|
...t.layers
|
|
884
911
|
};
|
|
885
|
-
return delete
|
|
886
|
-
layers:
|
|
912
|
+
return delete r[e], {
|
|
913
|
+
layers: r
|
|
887
914
|
};
|
|
888
915
|
})
|
|
889
|
-
})),
|
|
890
|
-
multipan: [
|
|
916
|
+
})), rt = ["click", "dblclick", "keyup", "panstart", "panmove", "panend", "pointermove"], kt = {
|
|
917
|
+
multipan: [Qe, {
|
|
891
918
|
threshold: 10,
|
|
892
|
-
direction:
|
|
919
|
+
direction: on.Vertical,
|
|
893
920
|
pointers: 2
|
|
894
921
|
}],
|
|
895
|
-
pinch: [
|
|
896
|
-
click: [
|
|
922
|
+
pinch: [ln, {}, null, ["multipan"]],
|
|
923
|
+
click: [Xe, {
|
|
897
924
|
event: "click"
|
|
898
925
|
}, null, ["dblclick"]],
|
|
899
|
-
dblclick: [
|
|
926
|
+
dblclick: [Xe, {
|
|
900
927
|
event: "dblclick",
|
|
901
928
|
taps: 2
|
|
902
929
|
}],
|
|
903
|
-
pan: [
|
|
930
|
+
pan: [Qe, {
|
|
904
931
|
threshold: 1
|
|
905
932
|
}, ["pinch"], ["multipan"]]
|
|
906
933
|
};
|
|
907
|
-
function
|
|
908
|
-
const e =
|
|
934
|
+
function Ct(n) {
|
|
935
|
+
const e = j(13), {
|
|
909
936
|
mapId: t,
|
|
910
|
-
layerId:
|
|
911
|
-
} =
|
|
937
|
+
layerId: r
|
|
938
|
+
} = n;
|
|
912
939
|
let s;
|
|
913
940
|
e[0] !== t ? (s = (S) => S.maps[t]?.basemap, e[0] = t, e[1] = s) : s = e[1];
|
|
914
941
|
const o = x(s);
|
|
915
942
|
let i;
|
|
916
943
|
e[2] !== t ? (i = (S) => S.maps[t]?.isLoaded, e[2] = t, e[3] = i) : i = e[3];
|
|
917
|
-
const a = x(i), l = x(
|
|
918
|
-
type:
|
|
919
|
-
} = we[o], b =
|
|
944
|
+
const a = x(i), l = x(lr), d = x(ar), p = Se(ir), {
|
|
945
|
+
type: h
|
|
946
|
+
} = we[o], b = h === ce.googleMaps;
|
|
920
947
|
let f, M;
|
|
921
|
-
e[4] !== l || e[5] !== d || e[6] !== b || e[7] !== a || e[8] !==
|
|
948
|
+
e[4] !== l || e[5] !== d || e[6] !== b || e[7] !== a || e[8] !== r || e[9] !== t || e[10] !== p ? (f = () => {
|
|
922
949
|
if (!a)
|
|
923
950
|
return;
|
|
924
951
|
let S, L;
|
|
925
|
-
b ? L = d(t)?.getDiv() ?? null : L = l(t)?.getCanvas() ?? null, L && (S = new
|
|
926
|
-
recognizers: Object.keys(
|
|
927
|
-
}),
|
|
952
|
+
b ? L = d(t)?.getDiv() ?? null : L = l(t)?.getCanvas() ?? null, L && (S = new an(L, {
|
|
953
|
+
recognizers: Object.keys(kt).map(or)
|
|
954
|
+
}), p(r, {
|
|
928
955
|
props: {
|
|
929
956
|
eventManager: S
|
|
930
957
|
}
|
|
931
958
|
}));
|
|
932
|
-
}, M = [d, b, a, l,
|
|
959
|
+
}, M = [d, b, a, l, r, t, p], e[4] = l, e[5] = d, e[6] = b, e[7] = a, e[8] = r, e[9] = t, e[10] = p, e[11] = f, e[12] = M) : (f = e[11], M = e[12]), J(f, M);
|
|
933
960
|
}
|
|
934
|
-
function
|
|
935
|
-
const [e, t,
|
|
961
|
+
function or(n) {
|
|
962
|
+
const [e, t, r, s] = kt[n], o = {
|
|
936
963
|
...t,
|
|
937
|
-
event:
|
|
964
|
+
event: n
|
|
938
965
|
};
|
|
939
966
|
return {
|
|
940
967
|
recognizer: new e(o),
|
|
941
|
-
recognizeWith:
|
|
968
|
+
recognizeWith: r,
|
|
942
969
|
requestFailure: s
|
|
943
970
|
};
|
|
944
971
|
}
|
|
945
|
-
function
|
|
946
|
-
return
|
|
972
|
+
function ir(n) {
|
|
973
|
+
return n.setLayer;
|
|
947
974
|
}
|
|
948
|
-
function
|
|
949
|
-
return
|
|
975
|
+
function ar(n) {
|
|
976
|
+
return n.getOverlayInstance;
|
|
950
977
|
}
|
|
951
|
-
function
|
|
952
|
-
return
|
|
978
|
+
function lr(n) {
|
|
979
|
+
return n.getDeckInstance;
|
|
953
980
|
}
|
|
954
|
-
class
|
|
981
|
+
class Pt extends Qt {
|
|
955
982
|
updateState({
|
|
956
983
|
props: e,
|
|
957
984
|
oldProps: t,
|
|
958
|
-
context:
|
|
985
|
+
context: r,
|
|
959
986
|
changeFlags: s
|
|
960
987
|
}) {
|
|
961
988
|
e.eventManager !== t.eventManager && (this._removeEventHandlers(e.eventManager), this._removeEventHandlers(t.eventManager), this._addEventHandlers()), super.updateState({
|
|
962
989
|
props: e,
|
|
963
990
|
oldProps: t,
|
|
964
|
-
context:
|
|
991
|
+
context: r,
|
|
965
992
|
changeFlags: s
|
|
966
993
|
});
|
|
967
994
|
}
|
|
@@ -969,42 +996,42 @@ class Ct extends Jt {
|
|
|
969
996
|
const e = this._getEventManager(), {
|
|
970
997
|
eventHandler: t
|
|
971
998
|
} = this.state._editableLayerState;
|
|
972
|
-
for (const
|
|
973
|
-
e.on(
|
|
999
|
+
for (const r of rt)
|
|
1000
|
+
e.on(r, t);
|
|
974
1001
|
}
|
|
975
1002
|
_removeEventHandlers(e) {
|
|
976
1003
|
const t = e ?? this._getEventManager(), {
|
|
977
|
-
eventHandler:
|
|
1004
|
+
eventHandler: r
|
|
978
1005
|
} = this.state._editableLayerState;
|
|
979
|
-
for (const s of
|
|
980
|
-
t.off(s,
|
|
1006
|
+
for (const s of rt)
|
|
1007
|
+
t.off(s, r);
|
|
981
1008
|
}
|
|
982
1009
|
_getEventManager() {
|
|
983
1010
|
return this.props.eventManager ?? // @ts-expect-error accessing protected props
|
|
984
1011
|
this.context.deck.eventManager;
|
|
985
1012
|
}
|
|
986
1013
|
}
|
|
987
|
-
function
|
|
988
|
-
mode:
|
|
1014
|
+
function cr({
|
|
1015
|
+
mode: n,
|
|
989
1016
|
...e
|
|
990
1017
|
}) {
|
|
991
|
-
const t =
|
|
1018
|
+
const t = ur(e);
|
|
992
1019
|
return {
|
|
993
|
-
type:
|
|
1020
|
+
type: Pt,
|
|
994
1021
|
props: {
|
|
995
1022
|
...t,
|
|
996
|
-
mode:
|
|
1023
|
+
mode: n
|
|
997
1024
|
}
|
|
998
1025
|
};
|
|
999
1026
|
}
|
|
1000
|
-
function
|
|
1001
|
-
layerProps:
|
|
1027
|
+
function ur({
|
|
1028
|
+
layerProps: n,
|
|
1002
1029
|
onEdit: e,
|
|
1003
1030
|
getLineColor: t,
|
|
1004
|
-
getFillColor:
|
|
1031
|
+
getFillColor: r,
|
|
1005
1032
|
pointColor: s
|
|
1006
1033
|
}) {
|
|
1007
|
-
const o = me(
|
|
1034
|
+
const o = me(n, {
|
|
1008
1035
|
modeConfig: {
|
|
1009
1036
|
// // We force distance due to conversion is addressed at feature getText level
|
|
1010
1037
|
// formatTooltip: (_distance: number) => {
|
|
@@ -1013,51 +1040,51 @@ function sr({
|
|
|
1013
1040
|
preventOverlappingLines: !0
|
|
1014
1041
|
},
|
|
1015
1042
|
onEdit: e
|
|
1016
|
-
}), i = me(
|
|
1043
|
+
}), i = me(rr, {
|
|
1017
1044
|
getTentativeLineColor: t,
|
|
1018
|
-
getTentativeFillColor:
|
|
1045
|
+
getTentativeFillColor: r,
|
|
1019
1046
|
getLineColor: t,
|
|
1020
|
-
getFillColor:
|
|
1047
|
+
getFillColor: r,
|
|
1021
1048
|
getEditHandlePointColor: s.fill,
|
|
1022
1049
|
getEditHandlePointOutlineColor: s.outline,
|
|
1023
1050
|
dataComparator: (l, d) => l.features[0] === d.features[0]
|
|
1024
1051
|
});
|
|
1025
1052
|
return me(i, o);
|
|
1026
1053
|
}
|
|
1027
|
-
const
|
|
1028
|
-
data:
|
|
1054
|
+
const dr = (n) => Ze()((e) => ({
|
|
1055
|
+
data: n.reduce((r, s) => {
|
|
1029
1056
|
const {
|
|
1030
1057
|
enabled: o = !1,
|
|
1031
1058
|
mapId: i,
|
|
1032
1059
|
modeInstance: a = new Ue.polygon.mode(),
|
|
1033
1060
|
modes: l = Ue,
|
|
1034
1061
|
modeSelected: d = Ue.polygon.value,
|
|
1035
|
-
values:
|
|
1062
|
+
values: p = {}
|
|
1036
1063
|
} = s;
|
|
1037
|
-
return
|
|
1064
|
+
return r[i] = {
|
|
1038
1065
|
enabled: o,
|
|
1039
1066
|
modeInstance: a,
|
|
1040
1067
|
modes: l,
|
|
1041
1068
|
modeSelected: d,
|
|
1042
|
-
values:
|
|
1043
|
-
},
|
|
1069
|
+
values: p
|
|
1070
|
+
}, r;
|
|
1044
1071
|
}, {}),
|
|
1045
|
-
setEnabled: (
|
|
1072
|
+
setEnabled: (r, s) => {
|
|
1046
1073
|
e((o) => ({
|
|
1047
1074
|
data: {
|
|
1048
1075
|
...o.data,
|
|
1049
|
-
[
|
|
1050
|
-
...o.data[
|
|
1076
|
+
[r]: {
|
|
1077
|
+
...o.data[r],
|
|
1051
1078
|
enabled: s,
|
|
1052
1079
|
visible: s
|
|
1053
1080
|
}
|
|
1054
1081
|
}
|
|
1055
1082
|
}));
|
|
1056
1083
|
},
|
|
1057
|
-
setValue: (
|
|
1084
|
+
setValue: (r, s, o) => {
|
|
1058
1085
|
e((i) => {
|
|
1059
1086
|
const a = {
|
|
1060
|
-
...i.data[
|
|
1087
|
+
...i.data[r].values
|
|
1061
1088
|
}, l = a[s] ?? {
|
|
1062
1089
|
type: "mask"
|
|
1063
1090
|
};
|
|
@@ -1068,24 +1095,24 @@ const or = (r) => Ze()((e) => ({
|
|
|
1068
1095
|
}, o || delete a[s], {
|
|
1069
1096
|
data: {
|
|
1070
1097
|
...i.data,
|
|
1071
|
-
[
|
|
1072
|
-
...i.data[
|
|
1098
|
+
[r]: {
|
|
1099
|
+
...i.data[r],
|
|
1073
1100
|
values: a
|
|
1074
1101
|
}
|
|
1075
1102
|
}
|
|
1076
1103
|
};
|
|
1077
1104
|
});
|
|
1078
1105
|
},
|
|
1079
|
-
setVisibility: (
|
|
1106
|
+
setVisibility: (r, s, o) => {
|
|
1080
1107
|
e((i) => {
|
|
1081
1108
|
const a = {
|
|
1082
|
-
...i.data[
|
|
1109
|
+
...i.data[r].values
|
|
1083
1110
|
}, l = a[s] ?? {};
|
|
1084
1111
|
return l.properties.visible = o, {
|
|
1085
1112
|
data: {
|
|
1086
1113
|
...i.data,
|
|
1087
|
-
[
|
|
1088
|
-
...i.data[
|
|
1114
|
+
[r]: {
|
|
1115
|
+
...i.data[r],
|
|
1089
1116
|
values: {
|
|
1090
1117
|
...a,
|
|
1091
1118
|
[s]: l
|
|
@@ -1095,60 +1122,60 @@ const or = (r) => Ze()((e) => ({
|
|
|
1095
1122
|
};
|
|
1096
1123
|
});
|
|
1097
1124
|
},
|
|
1098
|
-
setModeSelected: (
|
|
1125
|
+
setModeSelected: (r, s) => {
|
|
1099
1126
|
e((o) => ({
|
|
1100
1127
|
data: {
|
|
1101
1128
|
...o.data,
|
|
1102
|
-
[
|
|
1103
|
-
...o.data[
|
|
1129
|
+
[r]: {
|
|
1130
|
+
...o.data[r],
|
|
1104
1131
|
modeSelected: s
|
|
1105
1132
|
}
|
|
1106
1133
|
}
|
|
1107
1134
|
}));
|
|
1108
1135
|
},
|
|
1109
|
-
setModeInstance: (
|
|
1136
|
+
setModeInstance: (r, s) => {
|
|
1110
1137
|
e((o) => ({
|
|
1111
1138
|
data: {
|
|
1112
1139
|
...o.data,
|
|
1113
|
-
[
|
|
1114
|
-
...o.data[
|
|
1140
|
+
[r]: {
|
|
1141
|
+
...o.data[r],
|
|
1115
1142
|
modeInstance: s
|
|
1116
1143
|
}
|
|
1117
1144
|
}
|
|
1118
1145
|
}));
|
|
1119
1146
|
}
|
|
1120
|
-
})), Ot =
|
|
1121
|
-
function
|
|
1122
|
-
const e =
|
|
1147
|
+
})), Ot = He({});
|
|
1148
|
+
function fr(n) {
|
|
1149
|
+
const e = j(5), {
|
|
1123
1150
|
children: t,
|
|
1124
|
-
values:
|
|
1125
|
-
} =
|
|
1151
|
+
values: r
|
|
1152
|
+
} = n;
|
|
1126
1153
|
let s;
|
|
1127
|
-
e[0] !==
|
|
1154
|
+
e[0] !== r ? (s = () => dr(r), e[0] = r, e[1] = s) : s = e[1];
|
|
1128
1155
|
const [o] = ue(s);
|
|
1129
1156
|
let i;
|
|
1130
1157
|
return e[2] !== t || e[3] !== o ? (i = /* @__PURE__ */ G(Ot.Provider, { value: o, children: t }), e[2] = t, e[3] = o, e[4] = i) : i = e[4], i;
|
|
1131
1158
|
}
|
|
1132
|
-
function K(
|
|
1133
|
-
const e =
|
|
1159
|
+
function K(n) {
|
|
1160
|
+
const e = Ne(Ot);
|
|
1134
1161
|
if (!Object.keys(e).length)
|
|
1135
1162
|
throw new Error("Missing LassoToolsProvider in the tree");
|
|
1136
|
-
return ze(e,
|
|
1163
|
+
return ze(e, n);
|
|
1137
1164
|
}
|
|
1138
|
-
function
|
|
1139
|
-
mapId:
|
|
1165
|
+
function pr({
|
|
1166
|
+
mapId: n,
|
|
1140
1167
|
children: e
|
|
1141
1168
|
}) {
|
|
1142
|
-
const t = K((f) => f.data[
|
|
1169
|
+
const t = K((f) => f.data[n]?.enabled), r = K((f) => f.setEnabled), s = K((f) => f.data[n]?.values), o = K((f) => f.setValue), i = K((f) => f.setVisibility), a = K((f) => f.data[n]?.modeSelected), l = K((f) => f.setModeSelected), d = K((f) => f.data[n]?.modes), p = K((f) => f.setModeInstance);
|
|
1143
1170
|
J(() => {
|
|
1144
1171
|
const f = d[a];
|
|
1145
1172
|
if (f && t) {
|
|
1146
1173
|
const M = f.mode;
|
|
1147
|
-
|
|
1174
|
+
p(n, new M());
|
|
1148
1175
|
}
|
|
1149
|
-
}, [t,
|
|
1176
|
+
}, [t, n, a, d, p]);
|
|
1150
1177
|
const [
|
|
1151
|
-
|
|
1178
|
+
h
|
|
1152
1179
|
// , draw
|
|
1153
1180
|
] = ge(() => {
|
|
1154
1181
|
const f = (L) => ({
|
|
@@ -1162,79 +1189,79 @@ function ar({
|
|
|
1162
1189
|
// , draw
|
|
1163
1190
|
];
|
|
1164
1191
|
}, [s]), b = re((f) => {
|
|
1165
|
-
n
|
|
1166
|
-
}, [
|
|
1192
|
+
r(n, !!f), l(n, f);
|
|
1193
|
+
}, [n, r, l]);
|
|
1167
1194
|
return e({
|
|
1168
|
-
mapId:
|
|
1195
|
+
mapId: n,
|
|
1169
1196
|
enabled: t,
|
|
1170
1197
|
modes: d,
|
|
1171
1198
|
modeSelected: a,
|
|
1172
1199
|
values: {
|
|
1173
|
-
mask:
|
|
1200
|
+
mask: h
|
|
1174
1201
|
// draw,
|
|
1175
1202
|
},
|
|
1176
|
-
setValue: re((f, M) => o(
|
|
1177
|
-
setEnabled: re((f) => n
|
|
1178
|
-
setVisibility: re((f, M) => i(
|
|
1203
|
+
setValue: re((f, M) => o(n, f, M), [n, o]),
|
|
1204
|
+
setEnabled: re((f) => r(n, f), [n, r]),
|
|
1205
|
+
setVisibility: re((f, M) => i(n, f, M), [n, i]),
|
|
1179
1206
|
setModeSelected: b
|
|
1180
1207
|
});
|
|
1181
1208
|
}
|
|
1182
|
-
function
|
|
1183
|
-
values:
|
|
1209
|
+
function At({
|
|
1210
|
+
values: n
|
|
1184
1211
|
}) {
|
|
1185
|
-
return Object.values(
|
|
1212
|
+
return Object.values(n ?? {}).filter((e) => e.type === "mask");
|
|
1186
1213
|
}
|
|
1187
|
-
const
|
|
1188
|
-
length:
|
|
1189
|
-
}),
|
|
1190
|
-
area:
|
|
1214
|
+
const mr = _t({
|
|
1215
|
+
length: gn
|
|
1216
|
+
}), yr = _t({
|
|
1217
|
+
area: bn
|
|
1191
1218
|
});
|
|
1192
|
-
function
|
|
1193
|
-
if (!(
|
|
1219
|
+
function hr(n) {
|
|
1220
|
+
if (!(n in Ce)) {
|
|
1194
1221
|
const e = Object.keys(Ce);
|
|
1195
|
-
throw new Error(`Unit "${
|
|
1222
|
+
throw new Error(`Unit "${n}" cannot be converted to area. Valid units are: ${e.join(", ")}`);
|
|
1196
1223
|
}
|
|
1197
1224
|
}
|
|
1198
|
-
function
|
|
1225
|
+
function st(n, e, t) {
|
|
1199
1226
|
switch (t) {
|
|
1200
1227
|
case "length": {
|
|
1201
|
-
const
|
|
1202
|
-
return
|
|
1228
|
+
const r = at[N.meter], s = at[e];
|
|
1229
|
+
return mr(n).from(r).to(s);
|
|
1203
1230
|
}
|
|
1204
1231
|
case "area": {
|
|
1205
|
-
|
|
1206
|
-
const
|
|
1207
|
-
return
|
|
1232
|
+
hr(e);
|
|
1233
|
+
const r = lt[Ce[N.meter]], s = lt[Ce[e]];
|
|
1234
|
+
return yr(n).from(r).to(s);
|
|
1208
1235
|
}
|
|
1209
1236
|
default:
|
|
1210
1237
|
throw new Error(`Invalid dimension: ${t}, valid dimensions are: length, area`);
|
|
1211
1238
|
}
|
|
1212
1239
|
}
|
|
1213
|
-
const
|
|
1240
|
+
const ot = 1e4;
|
|
1214
1241
|
function Ae({
|
|
1215
|
-
meters:
|
|
1242
|
+
meters: n,
|
|
1216
1243
|
unit: e,
|
|
1217
1244
|
locale: t,
|
|
1218
1245
|
options: {
|
|
1219
|
-
autoSplitNumber:
|
|
1246
|
+
autoSplitNumber: r,
|
|
1220
1247
|
customFormatter: s,
|
|
1221
1248
|
...o
|
|
1222
1249
|
} = {
|
|
1223
|
-
autoSplitNumber:
|
|
1250
|
+
autoSplitNumber: ot
|
|
1224
1251
|
},
|
|
1225
1252
|
dimension: i = "length"
|
|
1226
1253
|
}) {
|
|
1227
|
-
const a = e ===
|
|
1228
|
-
let
|
|
1254
|
+
const a = e === Be["m-km"], l = e === Be["ft-mi"], d = a || l;
|
|
1255
|
+
let p, h;
|
|
1229
1256
|
if (d) {
|
|
1230
|
-
const f =
|
|
1231
|
-
let M = f ?
|
|
1232
|
-
|
|
1257
|
+
const f = n < (r ?? ot);
|
|
1258
|
+
let M = f ? N.meter : N.kilometer;
|
|
1259
|
+
p = f ? ve.meter : ve.kilometer, l && (p = f ? ve.feet : ve.mile, M = f ? N.feet : N.mile), h = st(n, M, i);
|
|
1233
1260
|
} else
|
|
1234
|
-
|
|
1235
|
-
let b = `${
|
|
1261
|
+
p = ve[e], h = st(n, e, i);
|
|
1262
|
+
let b = `${Mt(h, t, {
|
|
1236
1263
|
style: "unit",
|
|
1237
|
-
unit:
|
|
1264
|
+
unit: p,
|
|
1238
1265
|
unitDisplay: "short",
|
|
1239
1266
|
notation: "standard",
|
|
1240
1267
|
minimumFractionDigits: 2,
|
|
@@ -1243,20 +1270,20 @@ function Ae({
|
|
|
1243
1270
|
})}`;
|
|
1244
1271
|
return i === "area" && (b += "2"), s ? s(b) : b;
|
|
1245
1272
|
}
|
|
1246
|
-
function
|
|
1273
|
+
function bo(n, {
|
|
1247
1274
|
hasDoubleClickZoom: e
|
|
1248
1275
|
}) {
|
|
1249
|
-
return typeof
|
|
1276
|
+
return typeof n == "boolean" ? {
|
|
1250
1277
|
doubleClickZoom: e
|
|
1251
1278
|
} : {
|
|
1252
|
-
...
|
|
1279
|
+
...n,
|
|
1253
1280
|
doubleClickZoom: e
|
|
1254
1281
|
};
|
|
1255
1282
|
}
|
|
1256
|
-
function
|
|
1257
|
-
if (
|
|
1283
|
+
function Ft(n, e, t) {
|
|
1284
|
+
if (n > 0) {
|
|
1258
1285
|
const {
|
|
1259
|
-
formatTooltip:
|
|
1286
|
+
formatTooltip: r,
|
|
1260
1287
|
turfOptions: s
|
|
1261
1288
|
} = t ?? {
|
|
1262
1289
|
turfOptions: {
|
|
@@ -1264,18 +1291,18 @@ function At(r, e, t) {
|
|
|
1264
1291
|
}
|
|
1265
1292
|
}, o = s?.units;
|
|
1266
1293
|
let i;
|
|
1267
|
-
|
|
1294
|
+
r ? i = r(n) : i = `${parseFloat(n.toString()).toFixed(2)} ${o}`;
|
|
1268
1295
|
const {
|
|
1269
1296
|
measurementCallback: a
|
|
1270
1297
|
} = t;
|
|
1271
|
-
return a && a(
|
|
1298
|
+
return a && a(n), [{
|
|
1272
1299
|
position: e,
|
|
1273
1300
|
text: i
|
|
1274
1301
|
}];
|
|
1275
1302
|
}
|
|
1276
1303
|
return [];
|
|
1277
1304
|
}
|
|
1278
|
-
class
|
|
1305
|
+
class gr extends Xt {
|
|
1279
1306
|
_isMeasuringSessionFinished = !1;
|
|
1280
1307
|
area = 0;
|
|
1281
1308
|
tooltips = [];
|
|
@@ -1286,12 +1313,12 @@ class dr extends Qt {
|
|
|
1286
1313
|
handleClick(e, t) {
|
|
1287
1314
|
this._isMeasuringSessionFinished && (this._isMeasuringSessionFinished = !1, this.resetClickSequence(), this.area = 0);
|
|
1288
1315
|
const {
|
|
1289
|
-
picks:
|
|
1290
|
-
} = e, s =
|
|
1316
|
+
picks: r
|
|
1317
|
+
} = e, s = en(r), o = this.getClickSequence();
|
|
1291
1318
|
let i = !1;
|
|
1292
1319
|
!s && !this.allowOverlapping(t) && (this.addClickSequence(e), i = !0);
|
|
1293
1320
|
const a = this.getClickSequence(), l = [...a, a[0]];
|
|
1294
|
-
this.area =
|
|
1321
|
+
this.area = et({
|
|
1295
1322
|
type: "Polygon",
|
|
1296
1323
|
coordinates: [l]
|
|
1297
1324
|
}), this.isFinalizedEdition(o, s) ? this.finalizeEdition(t) : i && t.onEdit({
|
|
@@ -1307,15 +1334,15 @@ class dr extends Qt {
|
|
|
1307
1334
|
e.key === "Enter" ? this.getClickSequence().length > 2 ? this.finalizeEdition(t) : this.resetEdition(t) : e.key === "Escape" && this.resetEdition(t);
|
|
1308
1335
|
}
|
|
1309
1336
|
updateTooltip(e, t) {
|
|
1310
|
-
const
|
|
1311
|
-
this.area =
|
|
1337
|
+
const r = wt(e);
|
|
1338
|
+
this.area = et(e), this.tooltips = Ft(this.area, r.geometry.coordinates, t.modeConfig);
|
|
1312
1339
|
}
|
|
1313
1340
|
handlePointerMove(e, t) {
|
|
1314
1341
|
if (this._isMeasuringSessionFinished)
|
|
1315
1342
|
return;
|
|
1316
1343
|
super.handlePointerMove(e, t);
|
|
1317
|
-
const
|
|
1318
|
-
|
|
1344
|
+
const r = this.getTentativeGuide(t);
|
|
1345
|
+
r && r.geometry.type === "Polygon" && this.updateTooltip(r, t);
|
|
1319
1346
|
}
|
|
1320
1347
|
resetClickSequence() {
|
|
1321
1348
|
super.resetClickSequence(), this.tooltips = [], this._isMeasuringSessionFinished = !1, this.area = 0;
|
|
@@ -1328,30 +1355,30 @@ class dr extends Qt {
|
|
|
1328
1355
|
}
|
|
1329
1356
|
isFinalizedEdition(e, t) {
|
|
1330
1357
|
const {
|
|
1331
|
-
positionIndexes:
|
|
1358
|
+
positionIndexes: r
|
|
1332
1359
|
} = t?.properties ?? {
|
|
1333
1360
|
positionIndexes: []
|
|
1334
1361
|
};
|
|
1335
|
-
return e.length > 2 && t !== void 0 && (
|
|
1362
|
+
return e.length > 2 && t !== void 0 && (r[0] === 0 || r[0] === e.length - 1);
|
|
1336
1363
|
}
|
|
1337
1364
|
allowOverlapping(e) {
|
|
1338
1365
|
let t = !1;
|
|
1339
|
-
const
|
|
1340
|
-
if (
|
|
1366
|
+
const r = this.getClickSequence();
|
|
1367
|
+
if (r.length > 2 && // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
1341
1368
|
e.modeConfig?.preventOverlappingLines) {
|
|
1342
1369
|
const s = {
|
|
1343
1370
|
type: "LineString",
|
|
1344
|
-
coordinates: [...
|
|
1371
|
+
coordinates: [...r, r[0]]
|
|
1345
1372
|
}, o = {
|
|
1346
1373
|
type: "LineString",
|
|
1347
|
-
coordinates: [...
|
|
1374
|
+
coordinates: [...r.slice(0, r.length - 1)]
|
|
1348
1375
|
};
|
|
1349
1376
|
un(s, o).features.length > 0 && (t = !0);
|
|
1350
1377
|
}
|
|
1351
1378
|
return t;
|
|
1352
1379
|
}
|
|
1353
1380
|
finalizeEdition(e) {
|
|
1354
|
-
const t = this.getClickSequence(),
|
|
1381
|
+
const t = this.getClickSequence(), r = {
|
|
1355
1382
|
type: "Polygon",
|
|
1356
1383
|
coordinates: [[...t, t[0]]]
|
|
1357
1384
|
};
|
|
@@ -1359,7 +1386,7 @@ class dr extends Qt {
|
|
|
1359
1386
|
type: "FeatureCollection",
|
|
1360
1387
|
features: []
|
|
1361
1388
|
};
|
|
1362
|
-
const s = this.getAddFeatureOrBooleanPolygonAction(
|
|
1389
|
+
const s = this.getAddFeatureOrBooleanPolygonAction(r, e);
|
|
1363
1390
|
this._isMeasuringSessionFinished = !0, s && (this.resultPolygon = s.updatedData, e.onEdit({
|
|
1364
1391
|
...s,
|
|
1365
1392
|
editType: se.addPosition,
|
|
@@ -1369,7 +1396,7 @@ class dr extends Qt {
|
|
|
1369
1396
|
positions: this.getClickSequence(),
|
|
1370
1397
|
finished: this._isMeasuringSessionFinished
|
|
1371
1398
|
}
|
|
1372
|
-
})), this.updateTooltip(
|
|
1399
|
+
})), this.updateTooltip(r, e);
|
|
1373
1400
|
}
|
|
1374
1401
|
resetEdition(e) {
|
|
1375
1402
|
this.resetClickSequence(), e.onEdit({
|
|
@@ -1382,19 +1409,19 @@ class dr extends Qt {
|
|
|
1382
1409
|
getTooltipText({
|
|
1383
1410
|
meters: e,
|
|
1384
1411
|
locale: t,
|
|
1385
|
-
unit:
|
|
1412
|
+
unit: r,
|
|
1386
1413
|
options: s
|
|
1387
1414
|
}) {
|
|
1388
1415
|
return Ae({
|
|
1389
1416
|
meters: e,
|
|
1390
1417
|
locale: t,
|
|
1391
|
-
unit:
|
|
1418
|
+
unit: r,
|
|
1392
1419
|
options: s,
|
|
1393
1420
|
dimension: "area"
|
|
1394
1421
|
});
|
|
1395
1422
|
}
|
|
1396
1423
|
}
|
|
1397
|
-
class
|
|
1424
|
+
class br extends St {
|
|
1398
1425
|
_isMeasuringSessionFinished = !1;
|
|
1399
1426
|
_currentArea = 0;
|
|
1400
1427
|
resultPolygon = {
|
|
@@ -1406,11 +1433,11 @@ class fr extends bt {
|
|
|
1406
1433
|
this._isMeasuringSessionFinished && (this._isMeasuringSessionFinished = !1, this.resetClickSequence(), this._currentArea = 0), super.handleClick(e, t);
|
|
1407
1434
|
}
|
|
1408
1435
|
handlePointerMove(e, t) {
|
|
1409
|
-
this._isMeasuringSessionFinished || (super.handlePointerMove(e, t), this.tooltips =
|
|
1436
|
+
this._isMeasuringSessionFinished || (super.handlePointerMove(e, t), this.tooltips = Ft(this.areaCircle, this.position, t.modeConfig));
|
|
1410
1437
|
}
|
|
1411
1438
|
checkAndFinishPolygon(e) {
|
|
1412
|
-
const t = this.getClickSequence(),
|
|
1413
|
-
this.isFinalizedEdition(t,
|
|
1439
|
+
const t = this.getClickSequence(), r = this.getTentativeGuide(e);
|
|
1440
|
+
this.isFinalizedEdition(t, r) && this.finalizeEdition(e);
|
|
1414
1441
|
}
|
|
1415
1442
|
handleKeyUp(e, t) {
|
|
1416
1443
|
e.key === "Enter" ? this.finalizeEdition(t) : e.key === "Escape" && this.resetEdition(t);
|
|
@@ -1427,12 +1454,12 @@ class fr extends bt {
|
|
|
1427
1454
|
type: "FeatureCollection",
|
|
1428
1455
|
features: []
|
|
1429
1456
|
};
|
|
1430
|
-
const
|
|
1431
|
-
this._isMeasuringSessionFinished = !0, e.onUpdateCursor("cell"),
|
|
1432
|
-
...
|
|
1457
|
+
const r = this.getAddFeatureOrBooleanPolygonAction(t, e);
|
|
1458
|
+
this._isMeasuringSessionFinished = !0, e.onUpdateCursor("cell"), r && (this.resultPolygon = r.updatedData, e.onEdit({
|
|
1459
|
+
...r,
|
|
1433
1460
|
editType: se.addPosition,
|
|
1434
1461
|
editContext: {
|
|
1435
|
-
...
|
|
1462
|
+
...r.editContext,
|
|
1436
1463
|
distance: this._currentArea,
|
|
1437
1464
|
positions: this.getClickSequence(),
|
|
1438
1465
|
finished: this._isMeasuringSessionFinished
|
|
@@ -1456,19 +1483,19 @@ class fr extends bt {
|
|
|
1456
1483
|
getTooltipText({
|
|
1457
1484
|
meters: e,
|
|
1458
1485
|
locale: t,
|
|
1459
|
-
unit:
|
|
1486
|
+
unit: r,
|
|
1460
1487
|
options: s
|
|
1461
1488
|
}) {
|
|
1462
1489
|
return Ae({
|
|
1463
1490
|
meters: e,
|
|
1464
1491
|
locale: t,
|
|
1465
|
-
unit:
|
|
1492
|
+
unit: r,
|
|
1466
1493
|
options: s,
|
|
1467
1494
|
dimension: "area"
|
|
1468
1495
|
});
|
|
1469
1496
|
}
|
|
1470
1497
|
}
|
|
1471
|
-
class
|
|
1498
|
+
class Dt extends tn {
|
|
1472
1499
|
handleClick(e, t) {
|
|
1473
1500
|
super.handleClick(e, t), t.onEdit({
|
|
1474
1501
|
// data is the same
|
|
@@ -1485,10 +1512,10 @@ class Ft extends en {
|
|
|
1485
1512
|
if (this._isMeasuringSessionFinished) return;
|
|
1486
1513
|
e.stopPropagation();
|
|
1487
1514
|
const {
|
|
1488
|
-
key:
|
|
1515
|
+
key: r
|
|
1489
1516
|
} = e, s = this.getClickSequence().length;
|
|
1490
1517
|
let o = se.finish;
|
|
1491
|
-
switch (
|
|
1518
|
+
switch (r) {
|
|
1492
1519
|
case "Escape":
|
|
1493
1520
|
t.onEdit({
|
|
1494
1521
|
updatedData: {
|
|
@@ -1516,18 +1543,18 @@ class Ft extends en {
|
|
|
1516
1543
|
getTooltipText({
|
|
1517
1544
|
meters: e,
|
|
1518
1545
|
locale: t,
|
|
1519
|
-
unit:
|
|
1546
|
+
unit: r,
|
|
1520
1547
|
options: s
|
|
1521
1548
|
}) {
|
|
1522
1549
|
return Ae({
|
|
1523
1550
|
meters: e,
|
|
1524
1551
|
locale: t,
|
|
1525
|
-
unit:
|
|
1552
|
+
unit: r,
|
|
1526
1553
|
options: s
|
|
1527
1554
|
});
|
|
1528
1555
|
}
|
|
1529
1556
|
}
|
|
1530
|
-
const fe = "mapMeasureLayer",
|
|
1557
|
+
const fe = "mapMeasureLayer", Sr = {
|
|
1531
1558
|
id: fe,
|
|
1532
1559
|
pickable: !1,
|
|
1533
1560
|
billboard: !1,
|
|
@@ -1556,7 +1583,7 @@ const fe = "mapMeasureLayer", pr = {
|
|
|
1556
1583
|
editing: [23, 102, 214, 255],
|
|
1557
1584
|
finished: [71, 219, 153, 255],
|
|
1558
1585
|
point: [255, 255, 255, 255]
|
|
1559
|
-
},
|
|
1586
|
+
}, it = {
|
|
1560
1587
|
styles: {
|
|
1561
1588
|
colors: {
|
|
1562
1589
|
editing: Ve.editing,
|
|
@@ -1564,7 +1591,7 @@ const fe = "mapMeasureLayer", pr = {
|
|
|
1564
1591
|
point: Ve.point
|
|
1565
1592
|
}
|
|
1566
1593
|
}
|
|
1567
|
-
},
|
|
1594
|
+
}, N = {
|
|
1568
1595
|
kilometer: "kilometer",
|
|
1569
1596
|
meter: "meter",
|
|
1570
1597
|
centimeter: "centimeter",
|
|
@@ -1577,40 +1604,40 @@ const fe = "mapMeasureLayer", pr = {
|
|
|
1577
1604
|
squareKilometer: "squareKilometer",
|
|
1578
1605
|
squareMile: "squareMile",
|
|
1579
1606
|
squareFeet: "squareFeet"
|
|
1580
|
-
},
|
|
1607
|
+
}, Be = {
|
|
1581
1608
|
"m-km": "m-km",
|
|
1582
1609
|
"ft-mi": "ft-mi",
|
|
1583
|
-
...
|
|
1584
|
-
},
|
|
1610
|
+
...N
|
|
1611
|
+
}, vr = {
|
|
1585
1612
|
meters: "meters",
|
|
1586
1613
|
kilometer: "kilometers",
|
|
1587
1614
|
mile: "miles"
|
|
1588
|
-
}, it = {
|
|
1589
|
-
[H.kilometer]: "km",
|
|
1590
|
-
[H.meter]: "m",
|
|
1591
|
-
[H.centimeter]: "cm",
|
|
1592
|
-
[H.milimeter]: "mm",
|
|
1593
|
-
[H.mile]: "mi",
|
|
1594
|
-
[H.yard]: "yd",
|
|
1595
|
-
[H.feet]: "ft"
|
|
1596
1615
|
}, at = {
|
|
1616
|
+
[N.kilometer]: "km",
|
|
1617
|
+
[N.meter]: "m",
|
|
1618
|
+
[N.centimeter]: "cm",
|
|
1619
|
+
[N.milimeter]: "mm",
|
|
1620
|
+
[N.mile]: "mi",
|
|
1621
|
+
[N.yard]: "yd",
|
|
1622
|
+
[N.feet]: "ft"
|
|
1623
|
+
}, lt = {
|
|
1597
1624
|
[pe.squareMeter]: "m2",
|
|
1598
1625
|
[pe.squareKilometer]: "km2",
|
|
1599
1626
|
[pe.squareMile]: "mi2",
|
|
1600
1627
|
[pe.squareFeet]: "ft2"
|
|
1601
1628
|
}, Ce = {
|
|
1602
|
-
[
|
|
1603
|
-
[
|
|
1604
|
-
[
|
|
1605
|
-
[
|
|
1629
|
+
[N.meter]: pe.squareMeter,
|
|
1630
|
+
[N.kilometer]: pe.squareKilometer,
|
|
1631
|
+
[N.mile]: pe.squareMile,
|
|
1632
|
+
[N.feet]: pe.squareFeet
|
|
1606
1633
|
}, ve = {
|
|
1607
|
-
[
|
|
1608
|
-
[
|
|
1609
|
-
[
|
|
1610
|
-
[
|
|
1611
|
-
[
|
|
1612
|
-
[
|
|
1613
|
-
[
|
|
1634
|
+
[N.kilometer]: "kilometer",
|
|
1635
|
+
[N.meter]: "meter",
|
|
1636
|
+
[N.centimeter]: "centimeter",
|
|
1637
|
+
[N.milimeter]: "millimeter",
|
|
1638
|
+
[N.mile]: "mile",
|
|
1639
|
+
[N.yard]: "yard",
|
|
1640
|
+
[N.feet]: "foot"
|
|
1614
1641
|
}, ne = {
|
|
1615
1642
|
"m-km": {
|
|
1616
1643
|
value: "m-km",
|
|
@@ -1648,30 +1675,30 @@ const fe = "mapMeasureLayer", pr = {
|
|
|
1648
1675
|
value: "feet",
|
|
1649
1676
|
system: "imperial"
|
|
1650
1677
|
}
|
|
1651
|
-
},
|
|
1678
|
+
}, ct = [ne["m-km"], ne.kilometer, ne.meter, ne["ft-mi"], ne.mile, ne.feet], wr = [ne["m-km"], ne.kilometer, ne.meter, ne["ft-mi"], ne.mile, ne.feet], Mr = {
|
|
1652
1679
|
distance: {
|
|
1653
1680
|
value: "distance",
|
|
1654
|
-
mode:
|
|
1681
|
+
mode: Dt
|
|
1655
1682
|
},
|
|
1656
1683
|
buffer: {
|
|
1657
1684
|
value: "buffer",
|
|
1658
|
-
mode:
|
|
1685
|
+
mode: br
|
|
1659
1686
|
},
|
|
1660
1687
|
area: {
|
|
1661
1688
|
value: "area",
|
|
1662
|
-
mode:
|
|
1663
|
-
}
|
|
1664
|
-
},
|
|
1665
|
-
distance:
|
|
1666
|
-
buffer:
|
|
1667
|
-
area:
|
|
1668
|
-
},
|
|
1669
|
-
function
|
|
1670
|
-
children:
|
|
1689
|
+
mode: gr
|
|
1690
|
+
}
|
|
1691
|
+
}, _r = {
|
|
1692
|
+
distance: ct,
|
|
1693
|
+
buffer: ct,
|
|
1694
|
+
area: wr
|
|
1695
|
+
}, Er = [he, Oe, fe];
|
|
1696
|
+
function Tr({
|
|
1697
|
+
children: n,
|
|
1671
1698
|
mapId: e,
|
|
1672
1699
|
defaultProps: {
|
|
1673
1700
|
styles: t = $e.styles,
|
|
1674
|
-
labels:
|
|
1701
|
+
labels: r
|
|
1675
1702
|
} = {
|
|
1676
1703
|
styles: $e.styles,
|
|
1677
1704
|
labels: $e.labels
|
|
@@ -1679,47 +1706,47 @@ function Sr({
|
|
|
1679
1706
|
layerProps: s = {},
|
|
1680
1707
|
defaultType: o = "mask"
|
|
1681
1708
|
}) {
|
|
1682
|
-
const i = K((_) => _.data[e]?.enabled), a = K((_) => _.setEnabled), l = K((_) => _.data[e]?.values), d = K((_) => _.setValue),
|
|
1683
|
-
|
|
1709
|
+
const i = K((_) => _.data[e]?.enabled), a = K((_) => _.setEnabled), l = K((_) => _.data[e]?.values), d = K((_) => _.setValue), p = K((_) => _.data[e]?.modeInstance), h = K((_) => _.data[e]?.modeSelected), b = Se((_) => _.setLayer), f = x((_) => _.addLayers), M = x((_) => _.removeLayers), S = x(vt((_) => _.maps[e]?.layers.filter((O) => !Er.includes(O)))), L = x((_) => _.getDeckInstance), u = ke({});
|
|
1710
|
+
Ct({
|
|
1684
1711
|
mapId: e,
|
|
1685
1712
|
layerId: he
|
|
1686
1713
|
});
|
|
1687
|
-
const
|
|
1714
|
+
const m = ge(() => At({
|
|
1688
1715
|
values: l
|
|
1689
|
-
}), [l]),
|
|
1716
|
+
}), [l]), g = ge(() => ({
|
|
1690
1717
|
type: "FeatureCollection",
|
|
1691
|
-
features:
|
|
1718
|
+
features: m.map((_) => ({
|
|
1692
1719
|
type: "Feature",
|
|
1693
1720
|
geometry: _.geometry,
|
|
1694
1721
|
properties: _.properties,
|
|
1695
1722
|
id: _.id
|
|
1696
1723
|
}))
|
|
1697
|
-
}), [
|
|
1724
|
+
}), [m]), w = ge(() => m.filter((_) => _.properties.visible).map((_) => _.id), [m]), [v, k] = ue(g), [F, V] = ue([]), A = re(() => {
|
|
1698
1725
|
const _ = {
|
|
1699
|
-
...
|
|
1700
|
-
features:
|
|
1726
|
+
...g,
|
|
1727
|
+
features: g.features.filter((O) => O.properties?.visible)
|
|
1701
1728
|
};
|
|
1702
1729
|
k(_);
|
|
1703
|
-
}, [
|
|
1730
|
+
}, [g]);
|
|
1704
1731
|
J(() => {
|
|
1705
1732
|
A();
|
|
1706
1733
|
}, [A]);
|
|
1707
|
-
const $ = ke(
|
|
1734
|
+
const $ = ke(m.length);
|
|
1708
1735
|
J(() => (f(e, [he]), () => {
|
|
1709
1736
|
M(e, [he]);
|
|
1710
1737
|
}), [f, e, M]);
|
|
1711
1738
|
const q = re(() => {
|
|
1712
1739
|
A(), V([]), a(e, !1);
|
|
1713
|
-
}, [e, A, a]),
|
|
1740
|
+
}, [e, A, a]), D = re(({
|
|
1714
1741
|
editType: _,
|
|
1715
|
-
updatedData:
|
|
1742
|
+
updatedData: O
|
|
1716
1743
|
}) => {
|
|
1717
1744
|
if (_ === se.cancel) {
|
|
1718
1745
|
q();
|
|
1719
1746
|
return;
|
|
1720
1747
|
}
|
|
1721
|
-
k(
|
|
1722
|
-
c.properties.label ??= `${
|
|
1748
|
+
k(O), _ !== se.updateTentativeFeature && _ === se.addFeature && (h !== "edit" && ($.current = $.current + 1), O.features.forEach((c, y) => {
|
|
1749
|
+
c.properties.label ??= `${r?.mask} ${$.current}`, c.properties.index = y, c.properties.visible = c.properties.visible ?? !0;
|
|
1723
1750
|
const T = c.id ?? crypto.randomUUID();
|
|
1724
1751
|
d(e, T, {
|
|
1725
1752
|
geometry: c.geometry,
|
|
@@ -1728,16 +1755,16 @@ function Sr({
|
|
|
1728
1755
|
type: o
|
|
1729
1756
|
});
|
|
1730
1757
|
}), q());
|
|
1731
|
-
}, [o, q,
|
|
1758
|
+
}, [o, q, r?.mask, e, h, d]);
|
|
1732
1759
|
return J(() => {
|
|
1733
1760
|
const _ = i, {
|
|
1734
|
-
border:
|
|
1761
|
+
border: O,
|
|
1735
1762
|
point: c,
|
|
1736
1763
|
fill: y
|
|
1737
1764
|
} = t.colors.editing, {
|
|
1738
1765
|
border: T,
|
|
1739
|
-
fill:
|
|
1740
|
-
} = t.colors.finished, C =
|
|
1766
|
+
fill: P
|
|
1767
|
+
} = t.colors.finished, C = cr({
|
|
1741
1768
|
layerProps: {
|
|
1742
1769
|
...s.mask,
|
|
1743
1770
|
pickable: _,
|
|
@@ -1747,74 +1774,74 @@ function Sr({
|
|
|
1747
1774
|
getFilterValue: w
|
|
1748
1775
|
},
|
|
1749
1776
|
onClick: (E) => {
|
|
1750
|
-
const
|
|
1751
|
-
|
|
1777
|
+
const B = E;
|
|
1778
|
+
B.isGuide || V([B.index]);
|
|
1752
1779
|
}
|
|
1753
1780
|
},
|
|
1754
|
-
getLineColor: (E) => F[0] === E.properties.index ?
|
|
1755
|
-
getFillColor: (E) => F[0] === E.properties.index ? y :
|
|
1781
|
+
getLineColor: (E) => F[0] === E.properties.index ? O : T,
|
|
1782
|
+
getFillColor: (E) => F[0] === E.properties.index ? y : P,
|
|
1756
1783
|
pointColor: {
|
|
1757
1784
|
fill: c,
|
|
1758
|
-
outline:
|
|
1785
|
+
outline: O
|
|
1759
1786
|
},
|
|
1760
|
-
onEdit:
|
|
1761
|
-
mode: _ ?
|
|
1787
|
+
onEdit: D,
|
|
1788
|
+
mode: _ ? p : new nn()
|
|
1762
1789
|
});
|
|
1763
1790
|
b(he, C);
|
|
1764
|
-
}, [v, i, s.mask, w,
|
|
1791
|
+
}, [v, i, s.mask, w, p, D, F, b, t.colors.editing, t.colors.finished]), J(() => {
|
|
1765
1792
|
const _ = {
|
|
1766
1793
|
...Te,
|
|
1767
|
-
data:
|
|
1768
|
-
getFilterValue: (
|
|
1794
|
+
data: g,
|
|
1795
|
+
getFilterValue: (O) => Number(w.includes(O.id)),
|
|
1769
1796
|
updateTriggers: {
|
|
1770
1797
|
getFilterValue: w
|
|
1771
1798
|
}
|
|
1772
1799
|
};
|
|
1773
1800
|
return b(Te.id, {
|
|
1774
|
-
type:
|
|
1801
|
+
type: cn,
|
|
1775
1802
|
props: _
|
|
1776
1803
|
}), f(e, [Te.id]), () => {
|
|
1777
1804
|
M(e, [Te.id]);
|
|
1778
1805
|
};
|
|
1779
|
-
}, [f, e,
|
|
1806
|
+
}, [f, e, g, w, M, b]), J(() => {
|
|
1780
1807
|
S?.forEach((_) => {
|
|
1781
|
-
const
|
|
1782
|
-
if (!
|
|
1783
|
-
i && (u.current[_] =
|
|
1784
|
-
const c = !i && (u.current[_] ??
|
|
1808
|
+
const O = L(e)?.props.layers.find((y) => y.props.id === _);
|
|
1809
|
+
if (!O) return;
|
|
1810
|
+
i && (u.current[_] = O?.props.pickable);
|
|
1811
|
+
const c = !i && (u.current[_] ?? O?.props.pickable);
|
|
1785
1812
|
b(_, {
|
|
1786
1813
|
props: {
|
|
1787
1814
|
pickable: c,
|
|
1788
|
-
extensions: [new
|
|
1789
|
-
maskId: !i && w.length ?
|
|
1815
|
+
extensions: [new sn()],
|
|
1816
|
+
maskId: !i && w.length ? Oe : void 0
|
|
1790
1817
|
}
|
|
1791
1818
|
});
|
|
1792
1819
|
});
|
|
1793
|
-
}, [i, L, e, S, w.length, b]),
|
|
1820
|
+
}, [i, L, e, S, w.length, b]), n;
|
|
1794
1821
|
}
|
|
1795
|
-
|
|
1796
|
-
function
|
|
1797
|
-
mode:
|
|
1822
|
+
Tr.Controls = pr;
|
|
1823
|
+
function Lr({
|
|
1824
|
+
mode: n,
|
|
1798
1825
|
...e
|
|
1799
1826
|
}) {
|
|
1800
|
-
const t =
|
|
1801
|
-
mode:
|
|
1827
|
+
const t = kr({
|
|
1828
|
+
mode: n,
|
|
1802
1829
|
...e
|
|
1803
1830
|
});
|
|
1804
1831
|
return {
|
|
1805
|
-
type:
|
|
1832
|
+
type: Pt,
|
|
1806
1833
|
props: {
|
|
1807
1834
|
...t,
|
|
1808
|
-
mode:
|
|
1835
|
+
mode: n,
|
|
1809
1836
|
data: []
|
|
1810
1837
|
}
|
|
1811
1838
|
};
|
|
1812
1839
|
}
|
|
1813
|
-
function
|
|
1814
|
-
mode:
|
|
1840
|
+
function kr({
|
|
1841
|
+
mode: n,
|
|
1815
1842
|
layerProps: e,
|
|
1816
1843
|
locale: t,
|
|
1817
|
-
enabled:
|
|
1844
|
+
enabled: r,
|
|
1818
1845
|
unit: s,
|
|
1819
1846
|
onEdit: o,
|
|
1820
1847
|
guideColor: i,
|
|
@@ -1822,16 +1849,16 @@ function wr({
|
|
|
1822
1849
|
textOptions: l
|
|
1823
1850
|
}) {
|
|
1824
1851
|
const d = me(e, {
|
|
1825
|
-
visible:
|
|
1826
|
-
pickable:
|
|
1852
|
+
visible: r,
|
|
1853
|
+
pickable: r,
|
|
1827
1854
|
modeConfig: {
|
|
1828
1855
|
// We force distance due to conversion is addressed at feature getText level
|
|
1829
1856
|
formatTooltip: (b) => b,
|
|
1830
1857
|
turfOptions: {
|
|
1831
|
-
units:
|
|
1858
|
+
units: vr.meters
|
|
1832
1859
|
}
|
|
1833
1860
|
},
|
|
1834
|
-
...
|
|
1861
|
+
...r && {
|
|
1835
1862
|
onEdit: o
|
|
1836
1863
|
},
|
|
1837
1864
|
_subLayerProps: {
|
|
@@ -1843,7 +1870,7 @@ function wr({
|
|
|
1843
1870
|
// needed for the outlineWidth and outlineColor attributes to be effective
|
|
1844
1871
|
smoothing: 0.2
|
|
1845
1872
|
},
|
|
1846
|
-
getText: (b) =>
|
|
1873
|
+
getText: (b) => n?.getTooltipText?.({
|
|
1847
1874
|
meters: b.text,
|
|
1848
1875
|
locale: t,
|
|
1849
1876
|
unit: s,
|
|
@@ -1854,7 +1881,7 @@ function wr({
|
|
|
1854
1881
|
}
|
|
1855
1882
|
}
|
|
1856
1883
|
}
|
|
1857
|
-
}),
|
|
1884
|
+
}), p = me(Sr, {
|
|
1858
1885
|
_subLayerProps: {
|
|
1859
1886
|
guides: {
|
|
1860
1887
|
getLineColor: i,
|
|
@@ -1864,205 +1891,205 @@ function wr({
|
|
|
1864
1891
|
getEditHandlePointColor: a,
|
|
1865
1892
|
getEditHandlePointOutlineColor: i
|
|
1866
1893
|
});
|
|
1867
|
-
return me(
|
|
1894
|
+
return me(p, d);
|
|
1868
1895
|
}
|
|
1869
|
-
const
|
|
1870
|
-
measurements:
|
|
1896
|
+
const Cr = (n) => Ze()((e) => ({
|
|
1897
|
+
measurements: n.reduce((r, s) => {
|
|
1871
1898
|
const {
|
|
1872
1899
|
mapId: o,
|
|
1873
1900
|
modeSelected: i,
|
|
1874
|
-
modes: a =
|
|
1875
|
-
units: l =
|
|
1901
|
+
modes: a = Mr,
|
|
1902
|
+
units: l = _r,
|
|
1876
1903
|
distance: d = 0,
|
|
1877
|
-
finished:
|
|
1878
|
-
locale:
|
|
1904
|
+
finished: p = !1,
|
|
1905
|
+
locale: h = "en",
|
|
1879
1906
|
positions: b = [],
|
|
1880
1907
|
clearLayerOnStart: f = !1,
|
|
1881
|
-
unit: M =
|
|
1908
|
+
unit: M = Be["m-km"],
|
|
1882
1909
|
enabled: S = !1
|
|
1883
1910
|
} = s;
|
|
1884
|
-
return
|
|
1911
|
+
return r[o] = {
|
|
1885
1912
|
modes: a,
|
|
1886
1913
|
units: l,
|
|
1887
1914
|
modeSelected: i,
|
|
1888
1915
|
distance: d,
|
|
1889
|
-
finished:
|
|
1890
|
-
locale:
|
|
1916
|
+
finished: p,
|
|
1917
|
+
locale: h,
|
|
1891
1918
|
positions: b,
|
|
1892
1919
|
unit: M,
|
|
1893
1920
|
clearLayerOnStart: f,
|
|
1894
1921
|
enabled: S
|
|
1895
|
-
},
|
|
1922
|
+
}, r;
|
|
1896
1923
|
}, {}),
|
|
1897
|
-
mode:
|
|
1898
|
-
setModeInstance: (
|
|
1924
|
+
mode: Dt,
|
|
1925
|
+
setModeInstance: (r, s) => {
|
|
1899
1926
|
e((o) => ({
|
|
1900
1927
|
measurements: {
|
|
1901
1928
|
...o.measurements,
|
|
1902
|
-
[
|
|
1903
|
-
...o.measurements[
|
|
1929
|
+
[r]: {
|
|
1930
|
+
...o.measurements[r],
|
|
1904
1931
|
modeInstance: s
|
|
1905
1932
|
}
|
|
1906
1933
|
}
|
|
1907
1934
|
}));
|
|
1908
1935
|
},
|
|
1909
|
-
setModeSelected: (
|
|
1936
|
+
setModeSelected: (r, s) => {
|
|
1910
1937
|
e((o) => ({
|
|
1911
1938
|
measurements: {
|
|
1912
1939
|
...o.measurements,
|
|
1913
|
-
[
|
|
1914
|
-
...o.measurements[
|
|
1940
|
+
[r]: {
|
|
1941
|
+
...o.measurements[r],
|
|
1915
1942
|
modeSelected: s
|
|
1916
1943
|
}
|
|
1917
1944
|
}
|
|
1918
1945
|
}));
|
|
1919
1946
|
},
|
|
1920
|
-
setFinished: (
|
|
1947
|
+
setFinished: (r, s) => {
|
|
1921
1948
|
e((o) => ({
|
|
1922
1949
|
measurements: {
|
|
1923
1950
|
...o.measurements,
|
|
1924
|
-
[
|
|
1925
|
-
...o.measurements[
|
|
1951
|
+
[r]: {
|
|
1952
|
+
...o.measurements[r],
|
|
1926
1953
|
finished: s
|
|
1927
1954
|
}
|
|
1928
1955
|
}
|
|
1929
1956
|
}));
|
|
1930
1957
|
},
|
|
1931
|
-
setDistance: (
|
|
1958
|
+
setDistance: (r, s) => {
|
|
1932
1959
|
e((o) => ({
|
|
1933
1960
|
measurements: {
|
|
1934
1961
|
...o.measurements,
|
|
1935
|
-
[
|
|
1936
|
-
...o.measurements[
|
|
1962
|
+
[r]: {
|
|
1963
|
+
...o.measurements[r],
|
|
1937
1964
|
distance: s
|
|
1938
1965
|
}
|
|
1939
1966
|
}
|
|
1940
1967
|
}));
|
|
1941
1968
|
},
|
|
1942
|
-
setUnit: (
|
|
1969
|
+
setUnit: (r, s) => {
|
|
1943
1970
|
e((o) => ({
|
|
1944
1971
|
measurements: {
|
|
1945
1972
|
...o.measurements,
|
|
1946
|
-
[
|
|
1947
|
-
...o.measurements[
|
|
1973
|
+
[r]: {
|
|
1974
|
+
...o.measurements[r],
|
|
1948
1975
|
unit: s
|
|
1949
1976
|
}
|
|
1950
1977
|
}
|
|
1951
1978
|
}));
|
|
1952
1979
|
},
|
|
1953
|
-
setLocale: (
|
|
1980
|
+
setLocale: (r, s) => {
|
|
1954
1981
|
e((o) => ({
|
|
1955
1982
|
measurements: {
|
|
1956
1983
|
...o.measurements,
|
|
1957
|
-
[
|
|
1958
|
-
...o.measurements[
|
|
1984
|
+
[r]: {
|
|
1985
|
+
...o.measurements[r],
|
|
1959
1986
|
locale: s
|
|
1960
1987
|
}
|
|
1961
1988
|
}
|
|
1962
1989
|
}));
|
|
1963
1990
|
},
|
|
1964
|
-
setPositions: (
|
|
1991
|
+
setPositions: (r, s) => {
|
|
1965
1992
|
e((o) => ({
|
|
1966
1993
|
measurements: {
|
|
1967
1994
|
...o.measurements,
|
|
1968
|
-
[
|
|
1969
|
-
...o.measurements[
|
|
1995
|
+
[r]: {
|
|
1996
|
+
...o.measurements[r],
|
|
1970
1997
|
positions: [...s]
|
|
1971
1998
|
}
|
|
1972
1999
|
}
|
|
1973
2000
|
}));
|
|
1974
2001
|
},
|
|
1975
|
-
setEnabled: (
|
|
2002
|
+
setEnabled: (r, s) => {
|
|
1976
2003
|
e((o) => ({
|
|
1977
2004
|
measurements: {
|
|
1978
2005
|
...o.measurements,
|
|
1979
|
-
[
|
|
1980
|
-
...o.measurements[
|
|
2006
|
+
[r]: {
|
|
2007
|
+
...o.measurements[r],
|
|
1981
2008
|
enabled: s
|
|
1982
2009
|
}
|
|
1983
2010
|
}
|
|
1984
2011
|
}));
|
|
1985
2012
|
}
|
|
1986
|
-
})), Rt =
|
|
1987
|
-
function
|
|
1988
|
-
const e =
|
|
2013
|
+
})), Rt = He({});
|
|
2014
|
+
function Pr(n) {
|
|
2015
|
+
const e = j(5), {
|
|
1989
2016
|
children: t,
|
|
1990
|
-
values:
|
|
1991
|
-
} =
|
|
2017
|
+
values: r
|
|
2018
|
+
} = n;
|
|
1992
2019
|
let s;
|
|
1993
|
-
e[0] !==
|
|
2020
|
+
e[0] !== r ? (s = Cr(r), e[0] = r, e[1] = s) : s = e[1];
|
|
1994
2021
|
const [o] = ue(s);
|
|
1995
2022
|
let i;
|
|
1996
2023
|
return e[2] !== t || e[3] !== o ? (i = /* @__PURE__ */ G(Rt.Provider, { value: o, children: t }), e[2] = t, e[3] = o, e[4] = i) : i = e[4], i;
|
|
1997
2024
|
}
|
|
1998
|
-
function z(
|
|
1999
|
-
const e =
|
|
2025
|
+
function z(n) {
|
|
2026
|
+
const e = Ne(Rt);
|
|
2000
2027
|
if (!Object.keys(e).length)
|
|
2001
2028
|
throw new Error("Missing MeasurementToolsProvider in the tree");
|
|
2002
|
-
return ze(e,
|
|
2029
|
+
return ze(e, n);
|
|
2003
2030
|
}
|
|
2004
|
-
function
|
|
2005
|
-
const e =
|
|
2031
|
+
function xt(n) {
|
|
2032
|
+
const e = j(74), {
|
|
2006
2033
|
mapId: t
|
|
2007
|
-
} =
|
|
2008
|
-
let
|
|
2009
|
-
e[0] !== t ? (
|
|
2010
|
-
const s = z(
|
|
2034
|
+
} = n;
|
|
2035
|
+
let r;
|
|
2036
|
+
e[0] !== t ? (r = (R) => R.measurements[t].modes, e[0] = t, e[1] = r) : r = e[1];
|
|
2037
|
+
const s = z(r);
|
|
2011
2038
|
let o;
|
|
2012
|
-
e[2] !== t ? (o = (
|
|
2039
|
+
e[2] !== t ? (o = (R) => R.measurements[t].units, e[2] = t, e[3] = o) : o = e[3];
|
|
2013
2040
|
const i = z(o);
|
|
2014
2041
|
let a;
|
|
2015
|
-
e[4] !== t ? (a = (
|
|
2016
|
-
const l = z(a), d = z(
|
|
2017
|
-
let
|
|
2018
|
-
e[6] !== d || e[7] !== t ? (
|
|
2019
|
-
const
|
|
2042
|
+
e[4] !== t ? (a = (R) => R.measurements[t].distance, e[4] = t, e[5] = a) : a = e[5];
|
|
2043
|
+
const l = z(a), d = z(Ur);
|
|
2044
|
+
let p;
|
|
2045
|
+
e[6] !== d || e[7] !== t ? (p = (R) => d(t, R), e[6] = d, e[7] = t, e[8] = p) : p = e[8];
|
|
2046
|
+
const h = p;
|
|
2020
2047
|
let b;
|
|
2021
|
-
e[9] !== t ? (b = (
|
|
2048
|
+
e[9] !== t ? (b = (R) => R.measurements[t].clearLayerOnStart, e[9] = t, e[10] = b) : b = e[10];
|
|
2022
2049
|
const f = z(b);
|
|
2023
2050
|
let M;
|
|
2024
|
-
e[11] !== t ? (M = (
|
|
2025
|
-
const S = z(M), L = z(
|
|
2051
|
+
e[11] !== t ? (M = (R) => R.measurements[t].enabled, e[11] = t, e[12] = M) : M = e[12];
|
|
2052
|
+
const S = z(M), L = z($r);
|
|
2026
2053
|
let u;
|
|
2027
|
-
e[13] !== L || e[14] !== t ? (u = (
|
|
2028
|
-
const
|
|
2029
|
-
let
|
|
2030
|
-
e[16] !== t ? (
|
|
2031
|
-
const w = z(
|
|
2054
|
+
e[13] !== L || e[14] !== t ? (u = (R) => L(t, R), e[13] = L, e[14] = t, e[15] = u) : u = e[15];
|
|
2055
|
+
const m = u;
|
|
2056
|
+
let g;
|
|
2057
|
+
e[16] !== t ? (g = (R) => R.measurements[t].modeSelected, e[16] = t, e[17] = g) : g = e[17];
|
|
2058
|
+
const w = z(g), v = z(xr);
|
|
2032
2059
|
let k;
|
|
2033
|
-
e[18] !== v || e[19] !== t || e[20] !==
|
|
2034
|
-
|
|
2035
|
-
}, e[18] = v, e[19] = t, e[20] =
|
|
2060
|
+
e[18] !== v || e[19] !== t || e[20] !== m ? (k = (R) => {
|
|
2061
|
+
m(!!R), v(t, R);
|
|
2062
|
+
}, e[18] = v, e[19] = t, e[20] = m, e[21] = k) : k = e[21];
|
|
2036
2063
|
const F = k;
|
|
2037
2064
|
let V;
|
|
2038
|
-
e[22] !== t ? (V = (
|
|
2039
|
-
const A = z(V), $ = z(
|
|
2065
|
+
e[22] !== t ? (V = (R) => R.measurements[t].finished, e[22] = t, e[23] = V) : V = e[23];
|
|
2066
|
+
const A = z(V), $ = z(Rr);
|
|
2040
2067
|
let q;
|
|
2041
|
-
e[24] !== $ || e[25] !== t ? (q = (
|
|
2042
|
-
const
|
|
2068
|
+
e[24] !== $ || e[25] !== t ? (q = (R) => $(t, R), e[24] = $, e[25] = t, e[26] = q) : q = e[26];
|
|
2069
|
+
const D = q;
|
|
2043
2070
|
let _;
|
|
2044
|
-
e[27] !== t ? (_ = (
|
|
2045
|
-
const
|
|
2071
|
+
e[27] !== t ? (_ = (R) => R.measurements[t].locale, e[27] = t, e[28] = _) : _ = e[28];
|
|
2072
|
+
const O = z(_), c = z(Dr);
|
|
2046
2073
|
let y;
|
|
2047
|
-
e[29] !== c || e[30] !== t ? (y = (
|
|
2074
|
+
e[29] !== c || e[30] !== t ? (y = (R) => c(t, R), e[29] = c, e[30] = t, e[31] = y) : y = e[31];
|
|
2048
2075
|
const T = y;
|
|
2049
|
-
let
|
|
2050
|
-
e[32] !== t ? (
|
|
2051
|
-
const C = z(
|
|
2052
|
-
let
|
|
2053
|
-
e[34] !== E || e[35] !== t ? (
|
|
2054
|
-
const I =
|
|
2055
|
-
let
|
|
2056
|
-
e[37] !== t ? (
|
|
2057
|
-
const U = z(
|
|
2076
|
+
let P;
|
|
2077
|
+
e[32] !== t ? (P = (R) => R.measurements[t].modeInstance, e[32] = t, e[33] = P) : P = e[33];
|
|
2078
|
+
const C = z(P), E = z(Fr);
|
|
2079
|
+
let B;
|
|
2080
|
+
e[34] !== E || e[35] !== t ? (B = (R) => E(t, R), e[34] = E, e[35] = t, e[36] = B) : B = e[36];
|
|
2081
|
+
const I = B;
|
|
2082
|
+
let H;
|
|
2083
|
+
e[37] !== t ? (H = (R) => R.measurements[t].positions, e[37] = t, e[38] = H) : H = e[38];
|
|
2084
|
+
const U = z(H), Z = z(Ar);
|
|
2058
2085
|
let oe;
|
|
2059
|
-
e[39] !== Z || e[40] !== t ? (oe = (
|
|
2086
|
+
e[39] !== Z || e[40] !== t ? (oe = (R) => Z(t, R), e[39] = Z, e[40] = t, e[41] = oe) : oe = e[41];
|
|
2060
2087
|
const Q = oe;
|
|
2061
2088
|
let le;
|
|
2062
|
-
e[42] !== t ? (le = (
|
|
2063
|
-
const X = z(le), te = z(
|
|
2089
|
+
e[42] !== t ? (le = (R) => R.measurements[t].unit, e[42] = t, e[43] = le) : le = e[43];
|
|
2090
|
+
const X = z(le), te = z(Or);
|
|
2064
2091
|
let Y;
|
|
2065
|
-
e[44] !== te || e[45] !== t ? (Y = (
|
|
2092
|
+
e[44] !== te || e[45] !== t ? (Y = (R) => te(t, R), e[44] = te, e[45] = t, e[46] = Y) : Y = e[46];
|
|
2066
2093
|
const W = Y;
|
|
2067
2094
|
let ee;
|
|
2068
2095
|
e[47] !== C || e[48] !== Q ? (ee = () => {
|
|
@@ -2070,12 +2097,12 @@ function Dt(r) {
|
|
|
2070
2097
|
}, e[47] = C, e[48] = Q, e[49] = ee) : ee = e[49];
|
|
2071
2098
|
const ie = ee;
|
|
2072
2099
|
let Me;
|
|
2073
|
-
e[50] !==
|
|
2074
|
-
|
|
2075
|
-
}, e[50] =
|
|
2100
|
+
e[50] !== m ? (Me = (R) => {
|
|
2101
|
+
m(R);
|
|
2102
|
+
}, e[50] = m, e[51] = Me) : Me = e[51];
|
|
2076
2103
|
const Fe = Me;
|
|
2077
2104
|
let _e;
|
|
2078
|
-
return e[52] !== ie || e[53] !== f || e[54] !== l || e[55] !== S || e[56] !== A || e[57] !==
|
|
2105
|
+
return e[52] !== ie || e[53] !== f || e[54] !== l || e[55] !== S || e[56] !== A || e[57] !== O || e[58] !== C || e[59] !== w || e[60] !== s || e[61] !== U || e[62] !== h || e[63] !== m || e[64] !== D || e[65] !== T || e[66] !== I || e[67] !== F || e[68] !== Q || e[69] !== W || e[70] !== Fe || e[71] !== X || e[72] !== i ? (_e = {
|
|
2079
2106
|
modes: s,
|
|
2080
2107
|
units: i,
|
|
2081
2108
|
distance: l,
|
|
@@ -2083,52 +2110,52 @@ function Dt(r) {
|
|
|
2083
2110
|
modeSelected: w,
|
|
2084
2111
|
enabled: S,
|
|
2085
2112
|
finished: A,
|
|
2086
|
-
locale:
|
|
2113
|
+
locale: O,
|
|
2087
2114
|
modeInstance: C,
|
|
2088
2115
|
positions: U,
|
|
2089
2116
|
unit: X,
|
|
2090
|
-
setDistance:
|
|
2117
|
+
setDistance: h,
|
|
2091
2118
|
setModeSelected: F,
|
|
2092
|
-
setFinished:
|
|
2119
|
+
setFinished: D,
|
|
2093
2120
|
setLocale: T,
|
|
2094
2121
|
setPositions: Q,
|
|
2095
2122
|
setUnit: W,
|
|
2096
|
-
setEnabled:
|
|
2123
|
+
setEnabled: m,
|
|
2097
2124
|
toggleLayer: Fe,
|
|
2098
2125
|
clearLayer: ie,
|
|
2099
2126
|
setModeInstance: I
|
|
2100
|
-
}, e[52] = ie, e[53] = f, e[54] = l, e[55] = S, e[56] = A, e[57] =
|
|
2127
|
+
}, e[52] = ie, e[53] = f, e[54] = l, e[55] = S, e[56] = A, e[57] = O, e[58] = C, e[59] = w, e[60] = s, e[61] = U, e[62] = h, e[63] = m, e[64] = D, e[65] = T, e[66] = I, e[67] = F, e[68] = Q, e[69] = W, e[70] = Fe, e[71] = X, e[72] = i, e[73] = _e) : _e = e[73], _e;
|
|
2101
2128
|
}
|
|
2102
|
-
function
|
|
2103
|
-
return
|
|
2129
|
+
function Or(n) {
|
|
2130
|
+
return n.setUnit;
|
|
2104
2131
|
}
|
|
2105
|
-
function
|
|
2106
|
-
return
|
|
2132
|
+
function Ar(n) {
|
|
2133
|
+
return n.setPositions;
|
|
2107
2134
|
}
|
|
2108
|
-
function
|
|
2109
|
-
return
|
|
2135
|
+
function Fr(n) {
|
|
2136
|
+
return n.setModeInstance;
|
|
2110
2137
|
}
|
|
2111
|
-
function
|
|
2112
|
-
return
|
|
2138
|
+
function Dr(n) {
|
|
2139
|
+
return n.setLocale;
|
|
2113
2140
|
}
|
|
2114
|
-
function
|
|
2115
|
-
return
|
|
2141
|
+
function Rr(n) {
|
|
2142
|
+
return n.setFinished;
|
|
2116
2143
|
}
|
|
2117
|
-
function
|
|
2118
|
-
return
|
|
2144
|
+
function xr(n) {
|
|
2145
|
+
return n.setModeSelected;
|
|
2119
2146
|
}
|
|
2120
|
-
function
|
|
2121
|
-
return
|
|
2147
|
+
function $r(n) {
|
|
2148
|
+
return n.setEnabled;
|
|
2122
2149
|
}
|
|
2123
|
-
function
|
|
2124
|
-
return
|
|
2150
|
+
function Ur(n) {
|
|
2151
|
+
return n.setDistance;
|
|
2125
2152
|
}
|
|
2126
|
-
function
|
|
2127
|
-
const e =
|
|
2153
|
+
function Vr(n) {
|
|
2154
|
+
const e = j(42), {
|
|
2128
2155
|
mapId: t,
|
|
2129
|
-
textOptions:
|
|
2156
|
+
textOptions: r,
|
|
2130
2157
|
children: s
|
|
2131
|
-
} =
|
|
2158
|
+
} = n;
|
|
2132
2159
|
let o;
|
|
2133
2160
|
e[0] !== t ? (o = {
|
|
2134
2161
|
mapId: t
|
|
@@ -2138,16 +2165,16 @@ function Fr(r) {
|
|
|
2138
2165
|
units: a,
|
|
2139
2166
|
distance: l,
|
|
2140
2167
|
setDistance: d,
|
|
2141
|
-
clearLayerOnStart:
|
|
2142
|
-
modeSelected:
|
|
2168
|
+
clearLayerOnStart: p,
|
|
2169
|
+
modeSelected: h,
|
|
2143
2170
|
setModeSelected: b,
|
|
2144
2171
|
enabled: f,
|
|
2145
2172
|
setEnabled: M,
|
|
2146
2173
|
finished: S,
|
|
2147
2174
|
setFinished: L,
|
|
2148
2175
|
locale: u,
|
|
2149
|
-
setLocale:
|
|
2150
|
-
modeInstance:
|
|
2176
|
+
setLocale: m,
|
|
2177
|
+
modeInstance: g,
|
|
2151
2178
|
setModeInstance: w,
|
|
2152
2179
|
positions: v,
|
|
2153
2180
|
setPositions: k,
|
|
@@ -2155,26 +2182,26 @@ function Fr(r) {
|
|
|
2155
2182
|
setUnit: V,
|
|
2156
2183
|
clearLayer: A,
|
|
2157
2184
|
toggleLayer: $
|
|
2158
|
-
} =
|
|
2185
|
+
} = xt(o);
|
|
2159
2186
|
let q;
|
|
2160
|
-
e[2] !==
|
|
2161
|
-
if (
|
|
2162
|
-
const T = i[
|
|
2187
|
+
e[2] !== h || e[3] !== i || e[4] !== w || e[5] !== k ? (q = () => {
|
|
2188
|
+
if (h && i[h]) {
|
|
2189
|
+
const T = i[h].mode;
|
|
2163
2190
|
w(new T());
|
|
2164
2191
|
}
|
|
2165
2192
|
return () => {
|
|
2166
2193
|
k([]);
|
|
2167
2194
|
};
|
|
2168
|
-
}, e[2] =
|
|
2169
|
-
let
|
|
2170
|
-
e[7] !==
|
|
2195
|
+
}, e[2] = h, e[3] = i, e[4] = w, e[5] = k, e[6] = q) : q = e[6];
|
|
2196
|
+
let D;
|
|
2197
|
+
e[7] !== h || e[8] !== i || e[9] !== M || e[10] !== w || e[11] !== k ? (D = [i, h, k, w, M], e[7] = h, e[8] = i, e[9] = M, e[10] = w, e[11] = k, e[12] = D) : D = e[12], J(q, D);
|
|
2171
2198
|
let _;
|
|
2172
|
-
e[13] !== $ || e[14] !== A || e[15] !==
|
|
2173
|
-
T && (
|
|
2174
|
-
}, e[13] = $, e[14] = A, e[15] =
|
|
2175
|
-
const
|
|
2199
|
+
e[13] !== $ || e[14] !== A || e[15] !== p || e[16] !== S ? (_ = (T) => {
|
|
2200
|
+
T && (p || !S) && A(), $(T);
|
|
2201
|
+
}, e[13] = $, e[14] = A, e[15] = p, e[16] = S, e[17] = _) : _ = e[17];
|
|
2202
|
+
const O = _, c = !!p;
|
|
2176
2203
|
let y;
|
|
2177
|
-
return e[18] !== s || e[19] !== A || e[20] !== l || e[21] !== f || e[22] !== S || e[23] !== u || e[24] !== t || e[25] !==
|
|
2204
|
+
return e[18] !== s || e[19] !== A || e[20] !== l || e[21] !== f || e[22] !== S || e[23] !== u || e[24] !== t || e[25] !== g || e[26] !== h || e[27] !== i || e[28] !== v || e[29] !== d || e[30] !== M || e[31] !== L || e[32] !== m || e[33] !== b || e[34] !== k || e[35] !== V || e[36] !== c || e[37] !== r || e[38] !== O || e[39] !== F || e[40] !== a ? (y = s({
|
|
2178
2205
|
mapId: t,
|
|
2179
2206
|
distance: l,
|
|
2180
2207
|
enabled: f,
|
|
@@ -2183,263 +2210,263 @@ function Fr(r) {
|
|
|
2183
2210
|
positions: v,
|
|
2184
2211
|
unit: F,
|
|
2185
2212
|
clearLayerOnStart: c,
|
|
2186
|
-
modeSelected:
|
|
2213
|
+
modeSelected: h,
|
|
2187
2214
|
modes: i,
|
|
2188
2215
|
units: a,
|
|
2189
2216
|
value: Ae({
|
|
2190
2217
|
meters: l,
|
|
2191
2218
|
unit: F,
|
|
2192
2219
|
locale: u,
|
|
2193
|
-
options:
|
|
2220
|
+
options: r
|
|
2194
2221
|
}),
|
|
2195
|
-
modeInstance:
|
|
2222
|
+
modeInstance: g,
|
|
2196
2223
|
setModeSelected: b,
|
|
2197
2224
|
setDistance: d,
|
|
2198
2225
|
setFinished: L,
|
|
2199
|
-
setLocale:
|
|
2226
|
+
setLocale: m,
|
|
2200
2227
|
setPositions: k,
|
|
2201
2228
|
setUnit: V,
|
|
2202
2229
|
setEnabled: M,
|
|
2203
|
-
toggleLayer:
|
|
2230
|
+
toggleLayer: O,
|
|
2204
2231
|
clearLayer: A
|
|
2205
|
-
}), e[18] = s, e[19] = A, e[20] = l, e[21] = f, e[22] = S, e[23] = u, e[24] = t, e[25] =
|
|
2232
|
+
}), e[18] = s, e[19] = A, e[20] = l, e[21] = f, e[22] = S, e[23] = u, e[24] = t, e[25] = g, e[26] = h, e[27] = i, e[28] = v, e[29] = d, e[30] = M, e[31] = L, e[32] = m, e[33] = b, e[34] = k, e[35] = V, e[36] = c, e[37] = r, e[38] = O, e[39] = F, e[40] = a, e[41] = y) : y = e[41], y;
|
|
2206
2233
|
}
|
|
2207
|
-
const
|
|
2208
|
-
function
|
|
2209
|
-
const e =
|
|
2234
|
+
const qr = [fe];
|
|
2235
|
+
function jr(n) {
|
|
2236
|
+
const e = j(50), {
|
|
2210
2237
|
children: t,
|
|
2211
|
-
mapId:
|
|
2238
|
+
mapId: r,
|
|
2212
2239
|
defaultProps: s,
|
|
2213
2240
|
layerProps: o,
|
|
2214
2241
|
textOptions: i
|
|
2215
|
-
} =
|
|
2242
|
+
} = n;
|
|
2216
2243
|
let a;
|
|
2217
2244
|
e[0] !== s ? (a = s === void 0 ? {
|
|
2218
|
-
styles:
|
|
2245
|
+
styles: it.styles
|
|
2219
2246
|
} : s, e[0] = s, e[1] = a) : a = e[1];
|
|
2220
2247
|
const {
|
|
2221
2248
|
styles: l
|
|
2222
|
-
} = a, d = l === void 0 ?
|
|
2223
|
-
let
|
|
2224
|
-
e[2] !==
|
|
2225
|
-
mapId:
|
|
2226
|
-
}, e[2] =
|
|
2249
|
+
} = a, d = l === void 0 ? it.styles : l;
|
|
2250
|
+
let p;
|
|
2251
|
+
e[2] !== r ? (p = {
|
|
2252
|
+
mapId: r
|
|
2253
|
+
}, e[2] = r, e[3] = p) : p = e[3];
|
|
2227
2254
|
const {
|
|
2228
|
-
setDistance:
|
|
2255
|
+
setDistance: h,
|
|
2229
2256
|
clearLayerOnStart: b,
|
|
2230
2257
|
enabled: f,
|
|
2231
2258
|
finished: M,
|
|
2232
2259
|
setFinished: S,
|
|
2233
2260
|
locale: L,
|
|
2234
2261
|
setPositions: u,
|
|
2235
|
-
unit:
|
|
2236
|
-
modeInstance:
|
|
2237
|
-
} =
|
|
2262
|
+
unit: m,
|
|
2263
|
+
modeInstance: g
|
|
2264
|
+
} = xt(p), w = Se(zr), v = x(Zr), k = x(Nr), F = x(Hr);
|
|
2238
2265
|
let V;
|
|
2239
|
-
e[4] !==
|
|
2240
|
-
const A = x(
|
|
2266
|
+
e[4] !== r ? (V = (I) => I.maps[r]?.layers.filter(Ir), e[4] = r, e[5] = V) : V = e[5];
|
|
2267
|
+
const A = x(vt(V)), $ = x(Br);
|
|
2241
2268
|
let q;
|
|
2242
2269
|
e[6] === Symbol.for("react.memo_cache_sentinel") ? (q = {}, e[6] = q) : q = e[6];
|
|
2243
|
-
const
|
|
2270
|
+
const D = ke(q);
|
|
2244
2271
|
let _;
|
|
2245
|
-
e[7] !==
|
|
2246
|
-
mapId:
|
|
2272
|
+
e[7] !== r ? (_ = {
|
|
2273
|
+
mapId: r,
|
|
2247
2274
|
layerId: fe
|
|
2248
|
-
}, e[7] =
|
|
2249
|
-
let
|
|
2250
|
-
e[9] !== k || e[10] !== f || e[11] !== $ || e[12] !==
|
|
2251
|
-
const I = $(
|
|
2252
|
-
return f && (k(
|
|
2275
|
+
}, e[7] = r, e[8] = _) : _ = e[8], Ct(_);
|
|
2276
|
+
let O;
|
|
2277
|
+
e[9] !== k || e[10] !== f || e[11] !== $ || e[12] !== r || e[13] !== F || e[14] !== v ? (O = () => {
|
|
2278
|
+
const I = $(r)?.props.controller;
|
|
2279
|
+
return f && (k(r, [fe]), v(r, {
|
|
2253
2280
|
doubleClickZoom: !1
|
|
2254
2281
|
})), () => {
|
|
2255
|
-
F(
|
|
2282
|
+
F(r, [fe]), v(r, I);
|
|
2256
2283
|
};
|
|
2257
|
-
}, e[9] = k, e[10] = f, e[11] = $, e[12] =
|
|
2284
|
+
}, e[9] = k, e[10] = f, e[11] = $, e[12] = r, e[13] = F, e[14] = v, e[15] = O) : O = e[15];
|
|
2258
2285
|
let c;
|
|
2259
|
-
e[16] !== k || e[17] !== b || e[18] !== f || e[19] !== $ || e[20] !==
|
|
2286
|
+
e[16] !== k || e[17] !== b || e[18] !== f || e[19] !== $ || e[20] !== r || e[21] !== F || e[22] !== v ? (c = [k, b, r, F, f, $, v], e[16] = k, e[17] = b, e[18] = f, e[19] = $, e[20] = r, e[21] = F, e[22] = v, e[23] = c) : c = e[23], J(O, c);
|
|
2260
2287
|
let y, T;
|
|
2261
|
-
e[24] !== f || e[25] !== $ || e[26] !==
|
|
2288
|
+
e[24] !== f || e[25] !== $ || e[26] !== r || e[27] !== A || e[28] !== w ? (y = () => {
|
|
2262
2289
|
A?.forEach((I) => {
|
|
2263
|
-
const
|
|
2264
|
-
if (!
|
|
2290
|
+
const H = $(r)?.props.layers.find((Z) => Z.props.id === I);
|
|
2291
|
+
if (!H)
|
|
2265
2292
|
return;
|
|
2266
|
-
f && (
|
|
2267
|
-
const U = !f && (
|
|
2293
|
+
f && (D.current[I] = H?.props.pickable);
|
|
2294
|
+
const U = !f && (D.current[I] ?? H?.props.pickable);
|
|
2268
2295
|
w(I, {
|
|
2269
2296
|
props: {
|
|
2270
2297
|
pickable: U
|
|
2271
2298
|
}
|
|
2272
2299
|
});
|
|
2273
2300
|
});
|
|
2274
|
-
}, T = [f, $,
|
|
2275
|
-
let
|
|
2276
|
-
e[31] !==
|
|
2301
|
+
}, T = [f, $, r, A, w], e[24] = f, e[25] = $, e[26] = r, e[27] = A, e[28] = w, e[29] = y, e[30] = T) : (y = e[29], T = e[30]), J(y, T);
|
|
2302
|
+
let P;
|
|
2303
|
+
e[31] !== g || e[32] !== h || e[33] !== S || e[34] !== u ? (P = (I) => {
|
|
2277
2304
|
const {
|
|
2278
|
-
editType:
|
|
2305
|
+
editType: H,
|
|
2279
2306
|
editContext: U
|
|
2280
2307
|
} = I;
|
|
2281
|
-
if (
|
|
2282
|
-
|
|
2308
|
+
if (H === se.cancel) {
|
|
2309
|
+
g.resetClickSequence();
|
|
2283
2310
|
return;
|
|
2284
2311
|
}
|
|
2285
|
-
|
|
2312
|
+
H === se.addPosition && h(U.distance), S(!!U.finished);
|
|
2286
2313
|
const Z = U.positions;
|
|
2287
2314
|
Z?.length && u(Z);
|
|
2288
|
-
}, e[31] =
|
|
2289
|
-
const C =
|
|
2290
|
-
let E,
|
|
2291
|
-
return e[36] !== f || e[37] !== M || e[38] !== o || e[39] !== L || e[40] !==
|
|
2292
|
-
const I = M ? d.colors.finished : d.colors.editing,
|
|
2315
|
+
}, e[31] = g, e[32] = h, e[33] = S, e[34] = u, e[35] = P) : P = e[35];
|
|
2316
|
+
const C = P;
|
|
2317
|
+
let E, B;
|
|
2318
|
+
return e[36] !== f || e[37] !== M || e[38] !== o || e[39] !== L || e[40] !== g || e[41] !== C || e[42] !== w || e[43] !== d.colors.editing || e[44] !== d.colors.finished || e[45] !== d.colors.point || e[46] !== i || e[47] !== m ? (E = () => {
|
|
2319
|
+
const I = M ? d.colors.finished : d.colors.editing, H = M ? d.colors.finished : d.colors.point, U = Lr({
|
|
2293
2320
|
layerProps: {
|
|
2294
2321
|
...o,
|
|
2295
2322
|
pickable: o?.pickable ?? !M
|
|
2296
2323
|
},
|
|
2297
2324
|
enabled: f,
|
|
2298
2325
|
guideColor: I,
|
|
2299
|
-
pointColor:
|
|
2326
|
+
pointColor: H,
|
|
2300
2327
|
locale: L,
|
|
2301
2328
|
onEdit: C,
|
|
2302
|
-
unit:
|
|
2303
|
-
mode:
|
|
2329
|
+
unit: m,
|
|
2330
|
+
mode: g,
|
|
2304
2331
|
textOptions: i
|
|
2305
2332
|
});
|
|
2306
2333
|
w(fe, U);
|
|
2307
|
-
},
|
|
2334
|
+
}, B = [M, g, o, L, C, w, d.colors.editing, d.colors.finished, d.colors.point, i, m, f], e[36] = f, e[37] = M, e[38] = o, e[39] = L, e[40] = g, e[41] = C, e[42] = w, e[43] = d.colors.editing, e[44] = d.colors.finished, e[45] = d.colors.point, e[46] = i, e[47] = m, e[48] = E, e[49] = B) : (E = e[48], B = e[49]), J(E, B), t;
|
|
2308
2335
|
}
|
|
2309
|
-
function
|
|
2310
|
-
return
|
|
2336
|
+
function Br(n) {
|
|
2337
|
+
return n.getDeckInstance;
|
|
2311
2338
|
}
|
|
2312
|
-
function
|
|
2313
|
-
return !
|
|
2339
|
+
function Ir(n) {
|
|
2340
|
+
return !qr.includes(n);
|
|
2314
2341
|
}
|
|
2315
|
-
function
|
|
2316
|
-
return
|
|
2342
|
+
function Hr(n) {
|
|
2343
|
+
return n.removeLayers;
|
|
2317
2344
|
}
|
|
2318
|
-
function
|
|
2319
|
-
return
|
|
2345
|
+
function Nr(n) {
|
|
2346
|
+
return n.addLayers;
|
|
2320
2347
|
}
|
|
2321
|
-
function
|
|
2322
|
-
return
|
|
2348
|
+
function Zr(n) {
|
|
2349
|
+
return n.setController;
|
|
2323
2350
|
}
|
|
2324
|
-
function
|
|
2325
|
-
return
|
|
2351
|
+
function zr(n) {
|
|
2352
|
+
return n.setLayer;
|
|
2326
2353
|
}
|
|
2327
|
-
|
|
2328
|
-
function
|
|
2329
|
-
const e =
|
|
2354
|
+
jr.Controls = Vr;
|
|
2355
|
+
function Gr(n) {
|
|
2356
|
+
const e = j(7), {
|
|
2330
2357
|
mapId: t
|
|
2331
|
-
} =
|
|
2332
|
-
let
|
|
2333
|
-
e[0] !== t ? (
|
|
2358
|
+
} = n;
|
|
2359
|
+
let r;
|
|
2360
|
+
e[0] !== t ? (r = (l) => l.maps[t], e[0] = t, e[1] = r) : r = e[1];
|
|
2334
2361
|
const {
|
|
2335
2362
|
layers: s
|
|
2336
|
-
} = x(
|
|
2363
|
+
} = x(r), o = Se(Kr);
|
|
2337
2364
|
let i;
|
|
2338
2365
|
if (e[2] !== o || e[3] !== s) {
|
|
2339
2366
|
let l;
|
|
2340
|
-
e[5] !== o ? (l = (d) => o[d], e[5] = o, e[6] = l) : l = e[6], i = s.map(l).filter(
|
|
2367
|
+
e[5] !== o ? (l = (d) => o[d], e[5] = o, e[6] = l) : l = e[6], i = s.map(l).filter(Wr), e[2] = o, e[3] = s, e[4] = i;
|
|
2341
2368
|
} else
|
|
2342
2369
|
i = e[4];
|
|
2343
2370
|
return i;
|
|
2344
2371
|
}
|
|
2345
|
-
function
|
|
2346
|
-
return !!
|
|
2372
|
+
function Wr(n) {
|
|
2373
|
+
return !!n;
|
|
2347
2374
|
}
|
|
2348
|
-
function
|
|
2349
|
-
return
|
|
2375
|
+
function Kr(n) {
|
|
2376
|
+
return n.layers;
|
|
2350
2377
|
}
|
|
2351
|
-
const
|
|
2352
|
-
function
|
|
2353
|
-
const e =
|
|
2378
|
+
const ut = [Oe, he, fe];
|
|
2379
|
+
function $t(n) {
|
|
2380
|
+
const e = n.filter((r) => !ut.includes(r.props.id)).sort((r, s) => (r.order ?? 1 / 0) - (s.order ?? 1 / 0)), t = ut.map((r) => n.find((s) => s.props.id === r)).filter((r) => !!r);
|
|
2354
2381
|
return [...e, ...t];
|
|
2355
2382
|
}
|
|
2356
|
-
const
|
|
2357
|
-
function
|
|
2358
|
-
const e =
|
|
2359
|
-
let t,
|
|
2360
|
-
e[0] !==
|
|
2383
|
+
const Yr = 200;
|
|
2384
|
+
function So(n) {
|
|
2385
|
+
const e = j(51);
|
|
2386
|
+
let t, r, s, o;
|
|
2387
|
+
e[0] !== n ? ({
|
|
2361
2388
|
id: t,
|
|
2362
|
-
onLoad:
|
|
2389
|
+
onLoad: r,
|
|
2363
2390
|
onViewStateChange: s,
|
|
2364
2391
|
...o
|
|
2365
|
-
} =
|
|
2392
|
+
} = n, e[0] = n, e[1] = t, e[2] = r, e[3] = s, e[4] = o) : (t = e[1], r = e[2], s = e[3], o = e[4]);
|
|
2366
2393
|
let i;
|
|
2367
2394
|
e[5] !== t ? (i = (E) => E.maps[t].basemap, e[5] = t, e[6] = i) : i = e[6];
|
|
2368
2395
|
const a = x(i);
|
|
2369
2396
|
let l;
|
|
2370
2397
|
e[7] !== t ? (l = (E) => E.maps[t].instanceRef, e[7] = t, e[8] = l) : l = e[8];
|
|
2371
2398
|
const d = x(l);
|
|
2372
|
-
let
|
|
2373
|
-
e[9] !== t ? (
|
|
2374
|
-
const
|
|
2399
|
+
let p;
|
|
2400
|
+
e[9] !== t ? (p = (E) => E.maps[t].overlayRef, e[9] = t, e[10] = p) : p = e[10];
|
|
2401
|
+
const h = x(p), b = ke(null);
|
|
2375
2402
|
let f;
|
|
2376
2403
|
e[11] !== t ? (f = (E) => E.viewStates[t], e[11] = t, e[12] = f) : f = e[12];
|
|
2377
2404
|
const M = x(f);
|
|
2378
2405
|
let S;
|
|
2379
2406
|
e[13] !== t ? (S = (E) => E.maps[t].controller, e[13] = t, e[14] = S) : S = e[14];
|
|
2380
|
-
const L = x(S), u = x(
|
|
2407
|
+
const L = x(S), u = x(ns), m = x(ts), g = x(es), w = x(Xr), v = x(Qr);
|
|
2381
2408
|
let k;
|
|
2382
2409
|
e[15] !== t ? (k = {
|
|
2383
2410
|
mapId: t
|
|
2384
2411
|
}, e[15] = t, e[16] = k) : k = e[16];
|
|
2385
|
-
const F =
|
|
2412
|
+
const F = Gr(k);
|
|
2386
2413
|
let V;
|
|
2387
|
-
e[17] !== F ? (V =
|
|
2414
|
+
e[17] !== F ? (V = $t(F), e[17] = F, e[18] = V) : V = e[18];
|
|
2388
2415
|
const A = V;
|
|
2389
2416
|
let $;
|
|
2390
|
-
e[19] !== t || e[20] !== s || e[21] !==
|
|
2391
|
-
const
|
|
2417
|
+
e[19] !== t || e[20] !== s || e[21] !== m || e[22] !== v ? ($ = (E) => {
|
|
2418
|
+
const B = m;
|
|
2392
2419
|
if (b.current && clearInterval(b.current), b.current = setTimeout(() => {
|
|
2393
2420
|
v(t);
|
|
2394
|
-
},
|
|
2395
|
-
s(E,
|
|
2421
|
+
}, Yr), s) {
|
|
2422
|
+
s(E, B);
|
|
2396
2423
|
return;
|
|
2397
2424
|
}
|
|
2398
|
-
|
|
2399
|
-
}, e[19] = t, e[20] = s, e[21] =
|
|
2425
|
+
B(t, E.viewState);
|
|
2426
|
+
}, e[19] = t, e[20] = s, e[21] = m, e[22] = v, e[23] = $) : $ = e[23];
|
|
2400
2427
|
const q = $;
|
|
2401
|
-
let
|
|
2402
|
-
e[24] !== t || e[25] !==
|
|
2403
|
-
|
|
2404
|
-
}, e[24] = t, e[25] =
|
|
2405
|
-
const _ =
|
|
2406
|
-
let
|
|
2407
|
-
e[29] !== u || e[30] !== t || e[31] !== o || e[32] !== w ? (
|
|
2408
|
-
const I = !!u(t)?.props.layers?.every(
|
|
2428
|
+
let D;
|
|
2429
|
+
e[24] !== t || e[25] !== r || e[26] !== g || e[27] !== v ? (D = (E) => {
|
|
2430
|
+
g(t, E), r?.(E), v(t);
|
|
2431
|
+
}, e[24] = t, e[25] = r, e[26] = g, e[27] = v, e[28] = D) : D = e[28];
|
|
2432
|
+
const _ = D;
|
|
2433
|
+
let O;
|
|
2434
|
+
e[29] !== u || e[30] !== t || e[31] !== o || e[32] !== w ? (O = (E) => {
|
|
2435
|
+
const I = !!u(t)?.props.layers?.every(Jr);
|
|
2409
2436
|
w(t, I), o.onAfterRender?.(E);
|
|
2410
|
-
}, e[29] = u, e[30] = t, e[31] = o, e[32] = w, e[33] =
|
|
2411
|
-
const c =
|
|
2437
|
+
}, e[29] = u, e[30] = t, e[31] = o, e[32] = w, e[33] = O) : O = e[33];
|
|
2438
|
+
const c = O, y = o.onDragEnd;
|
|
2412
2439
|
let T;
|
|
2413
2440
|
e[34] !== y || e[35] !== t || e[36] !== v ? (T = (...E) => {
|
|
2414
|
-
const
|
|
2415
|
-
v(t), y && y(...
|
|
2441
|
+
const B = E;
|
|
2442
|
+
v(t), y && y(...B);
|
|
2416
2443
|
}, e[34] = y, e[35] = t, e[36] = v, e[37] = T) : T = e[37];
|
|
2417
|
-
const
|
|
2444
|
+
const P = T;
|
|
2418
2445
|
let C;
|
|
2419
|
-
return e[38] !== a || e[39] !== A || e[40] !== L || e[41] !== c || e[42] !==
|
|
2446
|
+
return e[38] !== a || e[39] !== A || e[40] !== L || e[41] !== c || e[42] !== P || e[43] !== _ || e[44] !== q || e[45] !== t || e[46] !== d || e[47] !== h || e[48] !== o || e[49] !== M ? (C = /* @__PURE__ */ G(Bn, { ...o, controller: L, id: t, layers: A, instanceRef: d, overlayRef: h, basemap: a, initialViewState: M, onLoad: _, onViewStateChange: q, onAfterRender: c, onDragEnd: P }), e[38] = a, e[39] = A, e[40] = L, e[41] = c, e[42] = P, e[43] = _, e[44] = q, e[45] = t, e[46] = d, e[47] = h, e[48] = o, e[49] = M, e[50] = C) : C = e[50], C;
|
|
2420
2447
|
}
|
|
2421
|
-
function
|
|
2422
|
-
return
|
|
2448
|
+
function Jr(n) {
|
|
2449
|
+
return n?.isLoaded;
|
|
2423
2450
|
}
|
|
2424
|
-
function
|
|
2425
|
-
return
|
|
2451
|
+
function Qr(n) {
|
|
2452
|
+
return n.updateViewPort;
|
|
2426
2453
|
}
|
|
2427
|
-
function
|
|
2428
|
-
return
|
|
2454
|
+
function Xr(n) {
|
|
2455
|
+
return n.setLayersLoad;
|
|
2429
2456
|
}
|
|
2430
|
-
function
|
|
2431
|
-
return
|
|
2457
|
+
function es(n) {
|
|
2458
|
+
return n.setLoad;
|
|
2432
2459
|
}
|
|
2433
|
-
function
|
|
2434
|
-
return
|
|
2460
|
+
function ts(n) {
|
|
2461
|
+
return n.setViewState;
|
|
2435
2462
|
}
|
|
2436
|
-
function
|
|
2437
|
-
return
|
|
2463
|
+
function ns(n) {
|
|
2464
|
+
return n.getDeckInstance;
|
|
2438
2465
|
}
|
|
2439
|
-
var Le = { exports: {} },
|
|
2440
|
-
function
|
|
2441
|
-
return
|
|
2442
|
-
var t = typeof globalThis < "u" && globalThis || typeof self < "u" && self || typeof Ee < "u" && Ee,
|
|
2466
|
+
var Le = { exports: {} }, dt;
|
|
2467
|
+
function rs() {
|
|
2468
|
+
return dt || (dt = 1, (function(n, e) {
|
|
2469
|
+
var t = typeof globalThis < "u" && globalThis || typeof self < "u" && self || typeof Ee < "u" && Ee, r = (function() {
|
|
2443
2470
|
function o() {
|
|
2444
2471
|
this.fetch = !1, this.DOMException = t.DOMException;
|
|
2445
2472
|
}
|
|
@@ -2465,7 +2492,7 @@ function Jr() {
|
|
|
2465
2492
|
return c && DataView.prototype.isPrototypeOf(c);
|
|
2466
2493
|
}
|
|
2467
2494
|
if (l.arrayBuffer)
|
|
2468
|
-
var
|
|
2495
|
+
var p = [
|
|
2469
2496
|
"[object Int8Array]",
|
|
2470
2497
|
"[object Uint8Array]",
|
|
2471
2498
|
"[object Uint8ClampedArray]",
|
|
@@ -2475,8 +2502,8 @@ function Jr() {
|
|
|
2475
2502
|
"[object Uint32Array]",
|
|
2476
2503
|
"[object Float32Array]",
|
|
2477
2504
|
"[object Float64Array]"
|
|
2478
|
-
],
|
|
2479
|
-
return c &&
|
|
2505
|
+
], h = ArrayBuffer.isView || function(c) {
|
|
2506
|
+
return c && p.indexOf(Object.prototype.toString.call(c)) > -1;
|
|
2480
2507
|
};
|
|
2481
2508
|
function b(c) {
|
|
2482
2509
|
if (typeof c != "string" && (c = String(c)), /[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(c) || c === "")
|
|
@@ -2555,17 +2582,17 @@ function Jr() {
|
|
|
2555
2582
|
};
|
|
2556
2583
|
});
|
|
2557
2584
|
}
|
|
2558
|
-
function
|
|
2585
|
+
function m(c) {
|
|
2559
2586
|
var y = new FileReader(), T = u(y);
|
|
2560
2587
|
return y.readAsArrayBuffer(c), T;
|
|
2561
2588
|
}
|
|
2562
|
-
function
|
|
2563
|
-
var y = new FileReader(), T = u(y),
|
|
2589
|
+
function g(c) {
|
|
2590
|
+
var y = new FileReader(), T = u(y), P = /charset=([A-Za-z0-9_-]+)/.exec(c.type), C = P ? P[1] : "utf-8";
|
|
2564
2591
|
return y.readAsText(c, C), T;
|
|
2565
2592
|
}
|
|
2566
2593
|
function w(c) {
|
|
2567
|
-
for (var y = new Uint8Array(c), T = new Array(y.length),
|
|
2568
|
-
T[
|
|
2594
|
+
for (var y = new Uint8Array(c), T = new Array(y.length), P = 0; P < y.length; P++)
|
|
2595
|
+
T[P] = String.fromCharCode(y[P]);
|
|
2569
2596
|
return T.join("");
|
|
2570
2597
|
}
|
|
2571
2598
|
function v(c) {
|
|
@@ -2576,7 +2603,7 @@ function Jr() {
|
|
|
2576
2603
|
}
|
|
2577
2604
|
function k() {
|
|
2578
2605
|
return this.bodyUsed = !1, this._initBody = function(c) {
|
|
2579
|
-
this.bodyUsed = this.bodyUsed, this._bodyInit = c, c ? typeof c == "string" ? this._bodyText = c : l.blob && Blob.prototype.isPrototypeOf(c) ? this._bodyBlob = c : l.formData && FormData.prototype.isPrototypeOf(c) ? this._bodyFormData = c : l.searchParams && URLSearchParams.prototype.isPrototypeOf(c) ? this._bodyText = c.toString() : l.arrayBuffer && l.blob && d(c) ? (this._bodyArrayBuffer = v(c.buffer), this._bodyInit = new Blob([this._bodyArrayBuffer])) : l.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(c) ||
|
|
2606
|
+
this.bodyUsed = this.bodyUsed, this._bodyInit = c, c ? typeof c == "string" ? this._bodyText = c : l.blob && Blob.prototype.isPrototypeOf(c) ? this._bodyBlob = c : l.formData && FormData.prototype.isPrototypeOf(c) ? this._bodyFormData = c : l.searchParams && URLSearchParams.prototype.isPrototypeOf(c) ? this._bodyText = c.toString() : l.arrayBuffer && l.blob && d(c) ? (this._bodyArrayBuffer = v(c.buffer), this._bodyInit = new Blob([this._bodyArrayBuffer])) : l.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(c) || h(c)) ? this._bodyArrayBuffer = v(c) : this._bodyText = c = Object.prototype.toString.call(c) : (this._noBody = !0, this._bodyText = ""), this.headers.get("content-type") || (typeof c == "string" ? this.headers.set("content-type", "text/plain;charset=UTF-8") : this._bodyBlob && this._bodyBlob.type ? this.headers.set("content-type", this._bodyBlob.type) : l.searchParams && URLSearchParams.prototype.isPrototypeOf(c) && this.headers.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8"));
|
|
2580
2607
|
}, l.blob && (this.blob = function() {
|
|
2581
2608
|
var c = L(this);
|
|
2582
2609
|
if (c)
|
|
@@ -2599,7 +2626,7 @@ function Jr() {
|
|
|
2599
2626
|
) : Promise.resolve(this._bodyArrayBuffer));
|
|
2600
2627
|
} else {
|
|
2601
2628
|
if (l.blob)
|
|
2602
|
-
return this.blob().then(
|
|
2629
|
+
return this.blob().then(m);
|
|
2603
2630
|
throw new Error("could not read as ArrayBuffer");
|
|
2604
2631
|
}
|
|
2605
2632
|
}, this.text = function() {
|
|
@@ -2607,7 +2634,7 @@ function Jr() {
|
|
|
2607
2634
|
if (c)
|
|
2608
2635
|
return c;
|
|
2609
2636
|
if (this._bodyBlob)
|
|
2610
|
-
return
|
|
2637
|
+
return g(this._bodyBlob);
|
|
2611
2638
|
if (this._bodyArrayBuffer)
|
|
2612
2639
|
return Promise.resolve(w(this._bodyArrayBuffer));
|
|
2613
2640
|
if (this._bodyFormData)
|
|
@@ -2643,9 +2670,9 @@ function Jr() {
|
|
|
2643
2670
|
})(), this.referrer = null, (this.method === "GET" || this.method === "HEAD") && T)
|
|
2644
2671
|
throw new TypeError("Body not allowed for GET or HEAD requests");
|
|
2645
2672
|
if (this._initBody(T), (this.method === "GET" || this.method === "HEAD") && (y.cache === "no-store" || y.cache === "no-cache")) {
|
|
2646
|
-
var
|
|
2647
|
-
if (
|
|
2648
|
-
this.url = this.url.replace(
|
|
2673
|
+
var P = /([?&])_=[^&]*/;
|
|
2674
|
+
if (P.test(this.url))
|
|
2675
|
+
this.url = this.url.replace(P, "$1_=" + (/* @__PURE__ */ new Date()).getTime());
|
|
2649
2676
|
else {
|
|
2650
2677
|
var C = /\?/;
|
|
2651
2678
|
this.url += (C.test(this.url) ? "&" : "?") + "_=" + (/* @__PURE__ */ new Date()).getTime();
|
|
@@ -2659,22 +2686,22 @@ function Jr() {
|
|
|
2659
2686
|
var y = new FormData();
|
|
2660
2687
|
return c.trim().split("&").forEach(function(T) {
|
|
2661
2688
|
if (T) {
|
|
2662
|
-
var
|
|
2689
|
+
var P = T.split("="), C = P.shift().replace(/\+/g, " "), E = P.join("=").replace(/\+/g, " ");
|
|
2663
2690
|
y.append(decodeURIComponent(C), decodeURIComponent(E));
|
|
2664
2691
|
}
|
|
2665
2692
|
}), y;
|
|
2666
2693
|
}
|
|
2667
2694
|
function q(c) {
|
|
2668
2695
|
var y = new S(), T = c.replace(/\r?\n[\t ]+/g, " ");
|
|
2669
|
-
return T.split("\r").map(function(
|
|
2670
|
-
return
|
|
2671
|
-
`) === 0 ?
|
|
2672
|
-
}).forEach(function(
|
|
2673
|
-
var C =
|
|
2696
|
+
return T.split("\r").map(function(P) {
|
|
2697
|
+
return P.indexOf(`
|
|
2698
|
+
`) === 0 ? P.substr(1, P.length) : P;
|
|
2699
|
+
}).forEach(function(P) {
|
|
2700
|
+
var C = P.split(":"), E = C.shift().trim();
|
|
2674
2701
|
if (E) {
|
|
2675
|
-
var
|
|
2702
|
+
var B = C.join(":").trim();
|
|
2676
2703
|
try {
|
|
2677
|
-
y.append(E,
|
|
2704
|
+
y.append(E, B);
|
|
2678
2705
|
} catch (I) {
|
|
2679
2706
|
console.warn("Response " + I.message);
|
|
2680
2707
|
}
|
|
@@ -2682,46 +2709,46 @@ function Jr() {
|
|
|
2682
2709
|
}), y;
|
|
2683
2710
|
}
|
|
2684
2711
|
k.call(A.prototype);
|
|
2685
|
-
function
|
|
2686
|
-
if (!(this instanceof
|
|
2712
|
+
function D(c, y) {
|
|
2713
|
+
if (!(this instanceof D))
|
|
2687
2714
|
throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');
|
|
2688
2715
|
if (y || (y = {}), this.type = "default", this.status = y.status === void 0 ? 200 : y.status, this.status < 200 || this.status > 599)
|
|
2689
2716
|
throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");
|
|
2690
2717
|
this.ok = this.status >= 200 && this.status < 300, this.statusText = y.statusText === void 0 ? "" : "" + y.statusText, this.headers = new S(y.headers), this.url = y.url || "", this._initBody(c);
|
|
2691
2718
|
}
|
|
2692
|
-
k.call(
|
|
2693
|
-
return new
|
|
2719
|
+
k.call(D.prototype), D.prototype.clone = function() {
|
|
2720
|
+
return new D(this._bodyInit, {
|
|
2694
2721
|
status: this.status,
|
|
2695
2722
|
statusText: this.statusText,
|
|
2696
2723
|
headers: new S(this.headers),
|
|
2697
2724
|
url: this.url
|
|
2698
2725
|
});
|
|
2699
|
-
},
|
|
2700
|
-
var c = new
|
|
2726
|
+
}, D.error = function() {
|
|
2727
|
+
var c = new D(null, { status: 200, statusText: "" });
|
|
2701
2728
|
return c.ok = !1, c.status = 0, c.type = "error", c;
|
|
2702
2729
|
};
|
|
2703
2730
|
var _ = [301, 302, 303, 307, 308];
|
|
2704
|
-
|
|
2731
|
+
D.redirect = function(c, y) {
|
|
2705
2732
|
if (_.indexOf(y) === -1)
|
|
2706
2733
|
throw new RangeError("Invalid status code");
|
|
2707
|
-
return new
|
|
2734
|
+
return new D(null, { status: y, headers: { location: c } });
|
|
2708
2735
|
}, i.DOMException = a.DOMException;
|
|
2709
2736
|
try {
|
|
2710
2737
|
new i.DOMException();
|
|
2711
2738
|
} catch {
|
|
2712
2739
|
i.DOMException = function(y, T) {
|
|
2713
2740
|
this.message = y, this.name = T;
|
|
2714
|
-
var
|
|
2715
|
-
this.stack =
|
|
2741
|
+
var P = Error(y);
|
|
2742
|
+
this.stack = P.stack;
|
|
2716
2743
|
}, i.DOMException.prototype = Object.create(Error.prototype), i.DOMException.prototype.constructor = i.DOMException;
|
|
2717
2744
|
}
|
|
2718
|
-
function
|
|
2719
|
-
return new Promise(function(T,
|
|
2745
|
+
function O(c, y) {
|
|
2746
|
+
return new Promise(function(T, P) {
|
|
2720
2747
|
var C = new A(c, y);
|
|
2721
2748
|
if (C.signal && C.signal.aborted)
|
|
2722
|
-
return
|
|
2749
|
+
return P(new i.DOMException("Aborted", "AbortError"));
|
|
2723
2750
|
var E = new XMLHttpRequest();
|
|
2724
|
-
function
|
|
2751
|
+
function B() {
|
|
2725
2752
|
E.abort();
|
|
2726
2753
|
}
|
|
2727
2754
|
E.onload = function() {
|
|
@@ -2732,19 +2759,19 @@ function Jr() {
|
|
|
2732
2759
|
C.url.indexOf("file://") === 0 && (E.status < 200 || E.status > 599) ? U.status = 200 : U.status = E.status, U.url = "responseURL" in E ? E.responseURL : U.headers.get("X-Request-URL");
|
|
2733
2760
|
var Z = "response" in E ? E.response : E.responseText;
|
|
2734
2761
|
setTimeout(function() {
|
|
2735
|
-
T(new
|
|
2762
|
+
T(new D(Z, U));
|
|
2736
2763
|
}, 0);
|
|
2737
2764
|
}, E.onerror = function() {
|
|
2738
2765
|
setTimeout(function() {
|
|
2739
|
-
|
|
2766
|
+
P(new TypeError("Network request failed"));
|
|
2740
2767
|
}, 0);
|
|
2741
2768
|
}, E.ontimeout = function() {
|
|
2742
2769
|
setTimeout(function() {
|
|
2743
|
-
|
|
2770
|
+
P(new TypeError("Network request timed out"));
|
|
2744
2771
|
}, 0);
|
|
2745
2772
|
}, E.onabort = function() {
|
|
2746
2773
|
setTimeout(function() {
|
|
2747
|
-
|
|
2774
|
+
P(new i.DOMException("Aborted", "AbortError"));
|
|
2748
2775
|
}, 0);
|
|
2749
2776
|
};
|
|
2750
2777
|
function I(U) {
|
|
@@ -2755,230 +2782,230 @@ function Jr() {
|
|
|
2755
2782
|
}
|
|
2756
2783
|
}
|
|
2757
2784
|
if (E.open(C.method, I(C.url), !0), C.credentials === "include" ? E.withCredentials = !0 : C.credentials === "omit" && (E.withCredentials = !1), "responseType" in E && (l.blob ? E.responseType = "blob" : l.arrayBuffer && (E.responseType = "arraybuffer")), y && typeof y.headers == "object" && !(y.headers instanceof S || a.Headers && y.headers instanceof a.Headers)) {
|
|
2758
|
-
var
|
|
2785
|
+
var H = [];
|
|
2759
2786
|
Object.getOwnPropertyNames(y.headers).forEach(function(U) {
|
|
2760
|
-
|
|
2787
|
+
H.push(b(U)), E.setRequestHeader(U, f(y.headers[U]));
|
|
2761
2788
|
}), C.headers.forEach(function(U, Z) {
|
|
2762
|
-
|
|
2789
|
+
H.indexOf(Z) === -1 && E.setRequestHeader(Z, U);
|
|
2763
2790
|
});
|
|
2764
2791
|
} else
|
|
2765
2792
|
C.headers.forEach(function(U, Z) {
|
|
2766
2793
|
E.setRequestHeader(Z, U);
|
|
2767
2794
|
});
|
|
2768
|
-
C.signal && (C.signal.addEventListener("abort",
|
|
2769
|
-
E.readyState === 4 && C.signal.removeEventListener("abort",
|
|
2795
|
+
C.signal && (C.signal.addEventListener("abort", B), E.onreadystatechange = function() {
|
|
2796
|
+
E.readyState === 4 && C.signal.removeEventListener("abort", B);
|
|
2770
2797
|
}), E.send(typeof C._bodyInit > "u" ? null : C._bodyInit);
|
|
2771
2798
|
});
|
|
2772
2799
|
}
|
|
2773
|
-
return
|
|
2800
|
+
return O.polyfill = !0, a.fetch || (a.fetch = O, a.Headers = S, a.Request = A, a.Response = D), i.Headers = S, i.Request = A, i.Response = D, i.fetch = O, i;
|
|
2774
2801
|
})({});
|
|
2775
|
-
})(
|
|
2776
|
-
var s = t.fetch ? t :
|
|
2777
|
-
e = s.fetch, e.default = s.fetch, e.fetch = s.fetch, e.Headers = s.Headers, e.Request = s.Request, e.Response = s.Response,
|
|
2802
|
+
})(r), r.fetch.ponyfill = !0, delete r.fetch.polyfill;
|
|
2803
|
+
var s = t.fetch ? t : r;
|
|
2804
|
+
e = s.fetch, e.default = s.fetch, e.fetch = s.fetch, e.Headers = s.Headers, e.Request = s.Request, e.Response = s.Response, n.exports = e;
|
|
2778
2805
|
})(Le, Le.exports)), Le.exports;
|
|
2779
2806
|
}
|
|
2780
|
-
var
|
|
2781
|
-
const
|
|
2807
|
+
var ss = rs();
|
|
2808
|
+
const os = /* @__PURE__ */ Tt(ss), Ke = "https://gcp-us-east1.api.carto.com", Ye = "v3", is = "ps", be = {
|
|
2782
2809
|
get: "GET",
|
|
2783
2810
|
post: "POST"
|
|
2784
2811
|
};
|
|
2785
|
-
function
|
|
2786
|
-
return Array.isArray(e) ? `${
|
|
2812
|
+
function as(n, e) {
|
|
2813
|
+
return Array.isArray(e) ? `${n}=${encodeURIComponent(JSON.stringify(e))}` : e == null || e === "" ? "" : typeof e == "object" ? `${n}=${encodeURIComponent(JSON.stringify(e))}` : `${n}=${encodeURIComponent(e)}`;
|
|
2787
2814
|
}
|
|
2788
|
-
function
|
|
2789
|
-
params:
|
|
2815
|
+
function ls({
|
|
2816
|
+
params: n,
|
|
2790
2817
|
url: e
|
|
2791
2818
|
}) {
|
|
2792
|
-
if (!
|
|
2793
|
-
const t = Object.entries(
|
|
2819
|
+
if (!n) return e;
|
|
2820
|
+
const t = Object.entries(n).map(([r, s]) => as(r, s));
|
|
2794
2821
|
return `${e}?${t.filter(Boolean).join("&")}`;
|
|
2795
2822
|
}
|
|
2796
|
-
function
|
|
2797
|
-
return
|
|
2823
|
+
function cs(n) {
|
|
2824
|
+
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
|
2798
2825
|
}
|
|
2799
|
-
var qe,
|
|
2800
|
-
function
|
|
2801
|
-
if (
|
|
2802
|
-
|
|
2803
|
-
var
|
|
2826
|
+
var qe, ft;
|
|
2827
|
+
function us() {
|
|
2828
|
+
if (ft) return qe;
|
|
2829
|
+
ft = 1;
|
|
2830
|
+
var n = function(u) {
|
|
2804
2831
|
return e(u) && !t(u);
|
|
2805
2832
|
};
|
|
2806
2833
|
function e(u) {
|
|
2807
2834
|
return !!u && typeof u == "object";
|
|
2808
2835
|
}
|
|
2809
2836
|
function t(u) {
|
|
2810
|
-
var
|
|
2811
|
-
return
|
|
2837
|
+
var m = Object.prototype.toString.call(u);
|
|
2838
|
+
return m === "[object RegExp]" || m === "[object Date]" || o(u);
|
|
2812
2839
|
}
|
|
2813
|
-
var
|
|
2840
|
+
var r = typeof Symbol == "function" && Symbol.for, s = r ? Symbol.for("react.element") : 60103;
|
|
2814
2841
|
function o(u) {
|
|
2815
2842
|
return u.$$typeof === s;
|
|
2816
2843
|
}
|
|
2817
2844
|
function i(u) {
|
|
2818
2845
|
return Array.isArray(u) ? [] : {};
|
|
2819
2846
|
}
|
|
2820
|
-
function a(u,
|
|
2821
|
-
return
|
|
2847
|
+
function a(u, m) {
|
|
2848
|
+
return m.clone !== !1 && m.isMergeableObject(u) ? S(i(u), u, m) : u;
|
|
2822
2849
|
}
|
|
2823
|
-
function l(u,
|
|
2824
|
-
return u.concat(
|
|
2825
|
-
return a(w,
|
|
2850
|
+
function l(u, m, g) {
|
|
2851
|
+
return u.concat(m).map(function(w) {
|
|
2852
|
+
return a(w, g);
|
|
2826
2853
|
});
|
|
2827
2854
|
}
|
|
2828
|
-
function d(u,
|
|
2829
|
-
if (!
|
|
2830
|
-
var
|
|
2831
|
-
return typeof
|
|
2855
|
+
function d(u, m) {
|
|
2856
|
+
if (!m.customMerge) return S;
|
|
2857
|
+
var g = m.customMerge(u);
|
|
2858
|
+
return typeof g == "function" ? g : S;
|
|
2832
2859
|
}
|
|
2833
|
-
function
|
|
2834
|
-
return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(u).filter(function(
|
|
2835
|
-
return Object.propertyIsEnumerable.call(u,
|
|
2860
|
+
function p(u) {
|
|
2861
|
+
return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(u).filter(function(m) {
|
|
2862
|
+
return Object.propertyIsEnumerable.call(u, m);
|
|
2836
2863
|
}) : [];
|
|
2837
2864
|
}
|
|
2838
|
-
function
|
|
2839
|
-
return Object.keys(u).concat(
|
|
2865
|
+
function h(u) {
|
|
2866
|
+
return Object.keys(u).concat(p(u));
|
|
2840
2867
|
}
|
|
2841
|
-
function b(u,
|
|
2868
|
+
function b(u, m) {
|
|
2842
2869
|
try {
|
|
2843
|
-
return
|
|
2870
|
+
return m in u;
|
|
2844
2871
|
} catch {
|
|
2845
2872
|
return !1;
|
|
2846
2873
|
}
|
|
2847
2874
|
}
|
|
2848
|
-
function f(u,
|
|
2849
|
-
return b(u,
|
|
2875
|
+
function f(u, m) {
|
|
2876
|
+
return b(u, m) && !(Object.hasOwnProperty.call(u, m) && Object.propertyIsEnumerable.call(u, m));
|
|
2850
2877
|
}
|
|
2851
|
-
function M(u,
|
|
2878
|
+
function M(u, m, g) {
|
|
2852
2879
|
var w = {};
|
|
2853
|
-
return
|
|
2854
|
-
w[v] = a(u[v],
|
|
2855
|
-
}),
|
|
2856
|
-
f(u, v) || (b(u, v) &&
|
|
2880
|
+
return g.isMergeableObject(u) && h(u).forEach(function(v) {
|
|
2881
|
+
w[v] = a(u[v], g);
|
|
2882
|
+
}), h(m).forEach(function(v) {
|
|
2883
|
+
f(u, v) || (b(u, v) && g.isMergeableObject(m[v]) ? w[v] = d(v, g)(u[v], m[v], g) : w[v] = a(m[v], g));
|
|
2857
2884
|
}), w;
|
|
2858
2885
|
}
|
|
2859
|
-
function S(u,
|
|
2860
|
-
|
|
2861
|
-
var w = Array.isArray(
|
|
2862
|
-
return k ? w ?
|
|
2886
|
+
function S(u, m, g) {
|
|
2887
|
+
g = g || {}, g.arrayMerge = g.arrayMerge || l, g.isMergeableObject = g.isMergeableObject || n, g.cloneUnlessOtherwiseSpecified = a;
|
|
2888
|
+
var w = Array.isArray(m), v = Array.isArray(u), k = w === v;
|
|
2889
|
+
return k ? w ? g.arrayMerge(u, m, g) : M(u, m, g) : a(m, g);
|
|
2863
2890
|
}
|
|
2864
|
-
S.all = function(u,
|
|
2891
|
+
S.all = function(u, m) {
|
|
2865
2892
|
if (!Array.isArray(u)) throw new Error("first argument should be an array");
|
|
2866
|
-
return u.reduce(function(
|
|
2867
|
-
return S(
|
|
2893
|
+
return u.reduce(function(g, w) {
|
|
2894
|
+
return S(g, w, m);
|
|
2868
2895
|
}, {});
|
|
2869
2896
|
};
|
|
2870
2897
|
var L = S;
|
|
2871
2898
|
return qe = L, qe;
|
|
2872
2899
|
}
|
|
2873
|
-
var
|
|
2874
|
-
const
|
|
2875
|
-
function
|
|
2876
|
-
return
|
|
2900
|
+
var ds = us();
|
|
2901
|
+
const Je = /* @__PURE__ */ cs(ds);
|
|
2902
|
+
function pt(n) {
|
|
2903
|
+
return Je({
|
|
2877
2904
|
method: be.get,
|
|
2878
2905
|
headers: {
|
|
2879
2906
|
Accept: "application/json"
|
|
2880
2907
|
}
|
|
2881
|
-
},
|
|
2908
|
+
}, n);
|
|
2882
2909
|
}
|
|
2883
|
-
function
|
|
2884
|
-
return
|
|
2910
|
+
function je(n, e) {
|
|
2911
|
+
return Je({
|
|
2885
2912
|
method: be.post,
|
|
2886
2913
|
headers: {
|
|
2887
2914
|
Accept: "application/json",
|
|
2888
2915
|
"Content-Type": "application/json"
|
|
2889
2916
|
},
|
|
2890
2917
|
body: JSON.stringify(e)
|
|
2891
|
-
},
|
|
2892
|
-
}
|
|
2893
|
-
const
|
|
2894
|
-
GET:
|
|
2895
|
-
POST:
|
|
2896
|
-
PUT:
|
|
2897
|
-
PATCH:
|
|
2898
|
-
DELETE:
|
|
2918
|
+
}, n);
|
|
2919
|
+
}
|
|
2920
|
+
const fs = {
|
|
2921
|
+
GET: pt,
|
|
2922
|
+
POST: je,
|
|
2923
|
+
PUT: je,
|
|
2924
|
+
PATCH: je,
|
|
2925
|
+
DELETE: pt
|
|
2899
2926
|
};
|
|
2900
|
-
function
|
|
2901
|
-
body:
|
|
2927
|
+
function ps({
|
|
2928
|
+
body: n,
|
|
2902
2929
|
accessToken: e,
|
|
2903
2930
|
method: t,
|
|
2904
|
-
...
|
|
2931
|
+
...r
|
|
2905
2932
|
}) {
|
|
2906
2933
|
let s = e;
|
|
2907
|
-
return s && !s.includes("Bearer") && (s = "Bearer " + s),
|
|
2934
|
+
return s && !s.includes("Bearer") && (s = "Bearer " + s), fs[t](Je({
|
|
2908
2935
|
method: t,
|
|
2909
2936
|
headers: {
|
|
2910
2937
|
...!!s && {
|
|
2911
2938
|
authorization: s
|
|
2912
2939
|
}
|
|
2913
2940
|
}
|
|
2914
|
-
},
|
|
2941
|
+
}, r), n);
|
|
2915
2942
|
}
|
|
2916
|
-
const
|
|
2917
|
-
async function
|
|
2918
|
-
signal:
|
|
2943
|
+
const ms = 6144;
|
|
2944
|
+
async function Ut({
|
|
2945
|
+
signal: n,
|
|
2919
2946
|
body: e,
|
|
2920
2947
|
accessToken: t,
|
|
2921
|
-
credentials:
|
|
2948
|
+
credentials: r,
|
|
2922
2949
|
method: s = be.get,
|
|
2923
2950
|
params: o,
|
|
2924
2951
|
url: i,
|
|
2925
2952
|
requestOptions: {
|
|
2926
2953
|
getMaxUrlLength: a
|
|
2927
2954
|
} = {
|
|
2928
|
-
getMaxUrlLength:
|
|
2955
|
+
getMaxUrlLength: ms
|
|
2929
2956
|
},
|
|
2930
2957
|
...l
|
|
2931
2958
|
}) {
|
|
2932
|
-
let d =
|
|
2959
|
+
let d = ls({
|
|
2933
2960
|
url: i,
|
|
2934
2961
|
params: o
|
|
2935
|
-
}),
|
|
2936
|
-
s === be.get && d.length > a && (
|
|
2937
|
-
const b =
|
|
2938
|
-
body:
|
|
2939
|
-
accessToken: t ??
|
|
2940
|
-
method:
|
|
2962
|
+
}), p = e, h = s;
|
|
2963
|
+
s === be.get && d.length > a && (p = o, h = be.post, d = i);
|
|
2964
|
+
const b = ps({
|
|
2965
|
+
body: p,
|
|
2966
|
+
accessToken: t ?? r?.accessToken,
|
|
2967
|
+
method: h,
|
|
2941
2968
|
...l
|
|
2942
2969
|
});
|
|
2943
|
-
|
|
2944
|
-
const f = await
|
|
2970
|
+
n && (b.signal = n);
|
|
2971
|
+
const f = await os(d, b);
|
|
2945
2972
|
if (!f.ok) {
|
|
2946
2973
|
const M = await f.text();
|
|
2947
2974
|
throw new Error(M);
|
|
2948
2975
|
}
|
|
2949
2976
|
return f.status === 204 ? Promise.resolve() : await f.json();
|
|
2950
2977
|
}
|
|
2951
|
-
const
|
|
2978
|
+
const Pe = gt()(kn((n, e) => ({
|
|
2952
2979
|
sources: {},
|
|
2953
2980
|
filters: {},
|
|
2954
|
-
setSource: (t,
|
|
2981
|
+
setSource: (t, r) => n((s) => {
|
|
2955
2982
|
const o = {
|
|
2956
2983
|
...s.sources
|
|
2957
2984
|
}, i = o[t]?.widgets;
|
|
2958
2985
|
i && (i.destroy(), delete o[t].widgets);
|
|
2959
2986
|
const a = o[t], l = {
|
|
2960
|
-
apiBaseUrl:
|
|
2961
|
-
clientId:
|
|
2962
|
-
apiVersion:
|
|
2987
|
+
apiBaseUrl: Ke,
|
|
2988
|
+
clientId: is,
|
|
2989
|
+
apiVersion: Ye,
|
|
2963
2990
|
...a,
|
|
2964
|
-
...
|
|
2991
|
+
...r
|
|
2965
2992
|
};
|
|
2966
|
-
return l.widgets =
|
|
2993
|
+
return l.widgets = bs({
|
|
2967
2994
|
source: l
|
|
2968
2995
|
}), o[t] = l, {
|
|
2969
2996
|
sources: o
|
|
2970
2997
|
};
|
|
2971
2998
|
}, void 0, "setSource"),
|
|
2972
|
-
removeSource: (t) =>
|
|
2999
|
+
removeSource: (t) => n((r) => {
|
|
2973
3000
|
const s = {
|
|
2974
|
-
...
|
|
3001
|
+
...r.sources
|
|
2975
3002
|
}, o = s[t]?.widgets;
|
|
2976
3003
|
return o && (o.destroy(), delete s[t].widgets), delete s[t], {
|
|
2977
3004
|
sources: s
|
|
2978
3005
|
};
|
|
2979
3006
|
}, void 0, "removeSource"),
|
|
2980
|
-
setFilters: (t,
|
|
2981
|
-
const o = s.filters[t] ?? {}, i =
|
|
3007
|
+
setFilters: (t, r) => n((s) => {
|
|
3008
|
+
const o = s.filters[t] ?? {}, i = r.reduce((a, l) => We(a, l), o);
|
|
2982
3009
|
return {
|
|
2983
3010
|
filters: {
|
|
2984
3011
|
...s.filters,
|
|
@@ -2989,13 +3016,13 @@ const Oe = ht()(Mn((r, e) => ({
|
|
|
2989
3016
|
}
|
|
2990
3017
|
};
|
|
2991
3018
|
}, void 0, "setFilters"),
|
|
2992
|
-
removeFilters: (t,
|
|
3019
|
+
removeFilters: (t, r, s) => n((o) => {
|
|
2993
3020
|
const i = o.filters[t] ?? {};
|
|
2994
3021
|
if (!i)
|
|
2995
3022
|
return o;
|
|
2996
3023
|
let a = {};
|
|
2997
|
-
return
|
|
2998
|
-
column:
|
|
3024
|
+
return r && (a = Sn(i, {
|
|
3025
|
+
column: r,
|
|
2999
3026
|
owner: s
|
|
3000
3027
|
})), {
|
|
3001
3028
|
filters: {
|
|
@@ -3008,7 +3035,7 @@ const Oe = ht()(Mn((r, e) => ({
|
|
|
3008
3035
|
};
|
|
3009
3036
|
}, void 0, "removeFilters"),
|
|
3010
3037
|
invalidateSourcesCache: (t, {
|
|
3011
|
-
timeout:
|
|
3038
|
+
timeout: r = 500,
|
|
3012
3039
|
maxAge: s = 10
|
|
3013
3040
|
} = {}) => {
|
|
3014
3041
|
t.forEach((o) => {
|
|
@@ -3022,66 +3049,66 @@ const Oe = ht()(Mn((r, e) => ({
|
|
|
3022
3049
|
const i = e().sources[o];
|
|
3023
3050
|
i && (delete i.headers, e().setSource(o, i));
|
|
3024
3051
|
});
|
|
3025
|
-
},
|
|
3052
|
+
}, r);
|
|
3026
3053
|
}
|
|
3027
3054
|
})));
|
|
3028
|
-
function
|
|
3029
|
-
const e =
|
|
3055
|
+
function ys(n) {
|
|
3056
|
+
const e = j(2);
|
|
3030
3057
|
let t;
|
|
3031
|
-
return e[0] !==
|
|
3058
|
+
return e[0] !== n ? (t = (r) => r.sources[n], e[0] = n, e[1] = t) : t = e[1], Pe(t);
|
|
3032
3059
|
}
|
|
3033
|
-
function
|
|
3034
|
-
const e =
|
|
3060
|
+
function hs(n) {
|
|
3061
|
+
const e = j(2);
|
|
3035
3062
|
let t;
|
|
3036
|
-
return e[0] !==
|
|
3063
|
+
return e[0] !== n ? (t = (r) => r.filters[n], e[0] = n, e[1] = t) : t = e[1], Pe(t);
|
|
3037
3064
|
}
|
|
3038
|
-
function
|
|
3039
|
-
const e =
|
|
3065
|
+
function vo(n) {
|
|
3066
|
+
const e = j(9);
|
|
3040
3067
|
let t;
|
|
3041
|
-
e[0] !==
|
|
3042
|
-
const
|
|
3068
|
+
e[0] !== n ? (t = (a) => a.sources[n], e[0] = n, e[1] = t) : t = e[1];
|
|
3069
|
+
const r = Pe(t);
|
|
3043
3070
|
let s;
|
|
3044
|
-
e[2] !==
|
|
3045
|
-
const o =
|
|
3071
|
+
e[2] !== n ? (s = (a) => a.filters[n], e[2] = n, e[3] = s) : s = e[3];
|
|
3072
|
+
const o = Pe(s);
|
|
3046
3073
|
let i;
|
|
3047
3074
|
e: {
|
|
3048
|
-
if (!
|
|
3075
|
+
if (!r) {
|
|
3049
3076
|
i = void 0;
|
|
3050
3077
|
break e;
|
|
3051
3078
|
}
|
|
3052
3079
|
let a;
|
|
3053
3080
|
e[4] !== o ? (a = o ?? {}, e[4] = o, e[5] = a) : a = e[5];
|
|
3054
3081
|
let l;
|
|
3055
|
-
e[6] !==
|
|
3056
|
-
...
|
|
3082
|
+
e[6] !== r || e[7] !== a ? (l = {
|
|
3083
|
+
...r,
|
|
3057
3084
|
filters: a
|
|
3058
|
-
}, e[6] =
|
|
3085
|
+
}, e[6] = r, e[7] = a, e[8] = l) : l = e[8], i = l;
|
|
3059
3086
|
}
|
|
3060
3087
|
return i;
|
|
3061
3088
|
}
|
|
3062
|
-
function
|
|
3089
|
+
function wo(n, {
|
|
3063
3090
|
column: e,
|
|
3064
3091
|
type: t
|
|
3065
3092
|
}) {
|
|
3066
|
-
return
|
|
3093
|
+
return n?.[e]?.[t]?.values ?? [];
|
|
3067
3094
|
}
|
|
3068
|
-
function
|
|
3069
|
-
const [, e] =
|
|
3095
|
+
function gs(n) {
|
|
3096
|
+
const [, e] = n.type.split("+", 2);
|
|
3070
3097
|
return {
|
|
3071
|
-
spatialDataType:
|
|
3072
|
-
spatialDataColumn:
|
|
3098
|
+
spatialDataType: n.spatialDataType ?? e ?? "geo",
|
|
3099
|
+
spatialDataColumn: n.spatialDataColumn ?? e ?? "geom"
|
|
3073
3100
|
};
|
|
3074
3101
|
}
|
|
3075
|
-
function
|
|
3076
|
-
source:
|
|
3102
|
+
function bs({
|
|
3103
|
+
source: n
|
|
3077
3104
|
}) {
|
|
3078
3105
|
const {
|
|
3079
3106
|
spatialDataType: e,
|
|
3080
3107
|
spatialDataColumn: t
|
|
3081
|
-
} =
|
|
3108
|
+
} = gs(n), r = {
|
|
3082
3109
|
query: () => {
|
|
3083
|
-
const i =
|
|
3084
|
-
return new
|
|
3110
|
+
const i = n;
|
|
3111
|
+
return new En({
|
|
3085
3112
|
...i,
|
|
3086
3113
|
accessToken: "",
|
|
3087
3114
|
sqlQuery: i.data,
|
|
@@ -3090,8 +3117,8 @@ function fs({
|
|
|
3090
3117
|
});
|
|
3091
3118
|
},
|
|
3092
3119
|
table: () => {
|
|
3093
|
-
const i =
|
|
3094
|
-
return new
|
|
3120
|
+
const i = n;
|
|
3121
|
+
return new _n({
|
|
3095
3122
|
...i,
|
|
3096
3123
|
accessToken: "",
|
|
3097
3124
|
tableName: i.data,
|
|
@@ -3100,20 +3127,20 @@ function fs({
|
|
|
3100
3127
|
});
|
|
3101
3128
|
},
|
|
3102
3129
|
tileset: () => {
|
|
3103
|
-
const i =
|
|
3104
|
-
return i.spatialDataBounds ? new
|
|
3130
|
+
const i = n;
|
|
3131
|
+
return i.spatialDataBounds ? new wn({
|
|
3105
3132
|
...i,
|
|
3106
3133
|
accessToken: "",
|
|
3107
3134
|
tableName: i.data,
|
|
3108
|
-
tileFormat: i.tileFormat ??
|
|
3135
|
+
tileFormat: i.tileFormat ?? Mn.BINARY,
|
|
3109
3136
|
spatialDataType: e,
|
|
3110
3137
|
spatialDataColumn: t,
|
|
3111
3138
|
spatialDataBounds: i.spatialDataBounds
|
|
3112
3139
|
}) : null;
|
|
3113
3140
|
},
|
|
3114
3141
|
raster: () => {
|
|
3115
|
-
const i =
|
|
3116
|
-
return !i.rasterMetadata || !i.spatialDataBounds ? null : new
|
|
3142
|
+
const i = n;
|
|
3143
|
+
return !i.rasterMetadata || !i.spatialDataBounds ? null : new vn({
|
|
3117
3144
|
...i,
|
|
3118
3145
|
accessToken: "",
|
|
3119
3146
|
tableName: i.data,
|
|
@@ -3123,100 +3150,100 @@ function fs({
|
|
|
3123
3150
|
spatialDataBounds: i.spatialDataBounds
|
|
3124
3151
|
});
|
|
3125
3152
|
}
|
|
3126
|
-
}, s =
|
|
3153
|
+
}, s = n.type.split("+")[0], o = r[s];
|
|
3127
3154
|
return o?.();
|
|
3128
3155
|
}
|
|
3129
|
-
function
|
|
3130
|
-
const t =
|
|
3156
|
+
function Ss(n, e) {
|
|
3157
|
+
const t = j(5), r = hs(n);
|
|
3131
3158
|
let s;
|
|
3132
3159
|
e: {
|
|
3133
3160
|
if (!e?.length) {
|
|
3134
|
-
s =
|
|
3161
|
+
s = r;
|
|
3135
3162
|
break e;
|
|
3136
3163
|
}
|
|
3137
|
-
if (!
|
|
3164
|
+
if (!r) {
|
|
3138
3165
|
let i;
|
|
3139
|
-
t[0] !== e ? (i = e.reduce(
|
|
3166
|
+
t[0] !== e ? (i = e.reduce(ws, {}), t[0] = e, t[1] = i) : i = t[1], s = i;
|
|
3140
3167
|
break e;
|
|
3141
3168
|
}
|
|
3142
3169
|
let o;
|
|
3143
|
-
if (t[2] !== e || t[3] !==
|
|
3144
|
-
const i = e.reduce(
|
|
3145
|
-
o = me(
|
|
3170
|
+
if (t[2] !== e || t[3] !== r) {
|
|
3171
|
+
const i = e.reduce(vs, {});
|
|
3172
|
+
o = me(r, i), t[2] = e, t[3] = r, t[4] = o;
|
|
3146
3173
|
} else
|
|
3147
3174
|
o = t[4];
|
|
3148
3175
|
s = o;
|
|
3149
3176
|
}
|
|
3150
3177
|
return s;
|
|
3151
3178
|
}
|
|
3152
|
-
function
|
|
3153
|
-
return
|
|
3179
|
+
function vs(n, e) {
|
|
3180
|
+
return We(n, e);
|
|
3154
3181
|
}
|
|
3155
|
-
function
|
|
3156
|
-
return
|
|
3182
|
+
function ws(n, e) {
|
|
3183
|
+
return We(n, e);
|
|
3157
3184
|
}
|
|
3158
|
-
function
|
|
3159
|
-
const t =
|
|
3185
|
+
function Ms(n, e) {
|
|
3186
|
+
const t = ys(e);
|
|
3160
3187
|
return ge(() => {
|
|
3161
|
-
const
|
|
3162
|
-
return !
|
|
3163
|
-
}, [
|
|
3188
|
+
const r = t?.widgets;
|
|
3189
|
+
return !r || !n ? null : (r.props.accessToken = n, r);
|
|
3190
|
+
}, [n, t]);
|
|
3164
3191
|
}
|
|
3165
|
-
const
|
|
3166
|
-
function
|
|
3167
|
-
if (!
|
|
3192
|
+
const _s = ["authorization", "cache-control"];
|
|
3193
|
+
function Es(n) {
|
|
3194
|
+
if (!n || typeof n != "object")
|
|
3168
3195
|
return "";
|
|
3169
3196
|
const e = {};
|
|
3170
|
-
for (const [t,
|
|
3197
|
+
for (const [t, r] of Object.entries(n)) {
|
|
3171
3198
|
const s = t.toLowerCase();
|
|
3172
|
-
|
|
3199
|
+
_s.includes(s) && (e[s] = r);
|
|
3173
3200
|
}
|
|
3174
3201
|
return Object.keys(e).length > 0 ? JSON.stringify(e) : "";
|
|
3175
3202
|
}
|
|
3176
|
-
function
|
|
3177
|
-
const e =
|
|
3203
|
+
function Ts(n) {
|
|
3204
|
+
const e = j(12), {
|
|
3178
3205
|
accessToken: t,
|
|
3179
|
-
sourceId:
|
|
3206
|
+
sourceId: r,
|
|
3180
3207
|
widgetProps: s,
|
|
3181
3208
|
additionalFilter: o
|
|
3182
|
-
} =
|
|
3209
|
+
} = n, i = Ss(r, o), a = Ms(t, r);
|
|
3183
3210
|
let l;
|
|
3184
|
-
if (e[0] !== t || e[1] !== i || e[2] !==
|
|
3185
|
-
l = [
|
|
3186
|
-
const
|
|
3211
|
+
if (e[0] !== t || e[1] !== i || e[2] !== r || e[3] !== a || e[4] !== s) {
|
|
3212
|
+
l = [r, s], a?.props && "queryParameters" in a.props && a.props.queryParameters && l.push(a.props.queryParameters), i && l.push(i);
|
|
3213
|
+
const h = a?.props.headers;
|
|
3187
3214
|
let b;
|
|
3188
|
-
e[6] !==
|
|
3215
|
+
e[6] !== h ? (b = Es(h), e[6] = h, e[7] = b) : b = e[7];
|
|
3189
3216
|
const f = b;
|
|
3190
|
-
f && l.push(f), l.push(t), e[0] = t, e[1] = i, e[2] =
|
|
3217
|
+
f && l.push(f), l.push(t), e[0] = t, e[1] = i, e[2] = r, e[3] = a, e[4] = s, e[5] = l;
|
|
3191
3218
|
} else
|
|
3192
3219
|
l = e[5];
|
|
3193
3220
|
const d = l;
|
|
3194
|
-
let
|
|
3195
|
-
return e[8] !== i || e[9] !== d || e[10] !== a ? (
|
|
3221
|
+
let p;
|
|
3222
|
+
return e[8] !== i || e[9] !== d || e[10] !== a ? (p = {
|
|
3196
3223
|
mergedFilters: i,
|
|
3197
3224
|
widgetModel: a,
|
|
3198
3225
|
queryKey: d
|
|
3199
|
-
}, e[8] = i, e[9] = d, e[10] = a, e[11] =
|
|
3226
|
+
}, e[8] = i, e[9] = d, e[10] = a, e[11] = p) : p = e[11], p;
|
|
3200
3227
|
}
|
|
3201
3228
|
function de({
|
|
3202
|
-
queryKeyPrefix:
|
|
3229
|
+
queryKeyPrefix: n,
|
|
3203
3230
|
getWidgetMethod: e
|
|
3204
3231
|
}) {
|
|
3205
3232
|
const t = (s) => {
|
|
3206
|
-
const o =
|
|
3233
|
+
const o = j(21), {
|
|
3207
3234
|
accessToken: i,
|
|
3208
3235
|
sourceId: a,
|
|
3209
3236
|
widgetProps: l,
|
|
3210
3237
|
additionalFilter: d,
|
|
3211
|
-
useQueryProps:
|
|
3238
|
+
useQueryProps: p
|
|
3212
3239
|
} = s;
|
|
3213
|
-
let
|
|
3214
|
-
o[0] !==
|
|
3240
|
+
let h;
|
|
3241
|
+
o[0] !== p ? (h = p === void 0 ? {} : p, o[0] = p, o[1] = h) : h = o[1];
|
|
3215
3242
|
let b, f;
|
|
3216
|
-
o[2] !==
|
|
3243
|
+
o[2] !== h ? ({
|
|
3217
3244
|
enabled: b,
|
|
3218
3245
|
...f
|
|
3219
|
-
} =
|
|
3246
|
+
} = h, o[2] = h, o[3] = b, o[4] = f) : (b = o[3], f = o[4]);
|
|
3220
3247
|
const M = b === void 0 ? !0 : b;
|
|
3221
3248
|
let S;
|
|
3222
3249
|
o[5] !== i || o[6] !== d || o[7] !== a || o[8] !== l ? (S = {
|
|
@@ -3228,36 +3255,36 @@ function de({
|
|
|
3228
3255
|
const {
|
|
3229
3256
|
mergedFilters: L,
|
|
3230
3257
|
queryKey: u,
|
|
3231
|
-
widgetModel:
|
|
3232
|
-
} =
|
|
3233
|
-
let
|
|
3234
|
-
o[10] !== u ? (
|
|
3258
|
+
widgetModel: m
|
|
3259
|
+
} = Ts(S);
|
|
3260
|
+
let g;
|
|
3261
|
+
o[10] !== u ? (g = [...n, ...u], o[10] = u, o[11] = g) : g = o[11];
|
|
3235
3262
|
let w;
|
|
3236
|
-
o[12] !== L || o[13] !==
|
|
3263
|
+
o[12] !== L || o[13] !== m || o[14] !== l ? (w = (F) => {
|
|
3237
3264
|
const {
|
|
3238
3265
|
signal: V
|
|
3239
3266
|
} = F;
|
|
3240
|
-
if (!
|
|
3267
|
+
if (!m)
|
|
3241
3268
|
throw new Error("widgetModel is not available");
|
|
3242
|
-
return e(
|
|
3269
|
+
return e(m)({
|
|
3243
3270
|
...l,
|
|
3244
3271
|
filters: L,
|
|
3245
3272
|
signal: V
|
|
3246
3273
|
});
|
|
3247
|
-
}, o[12] = L, o[13] =
|
|
3248
|
-
const v = !!
|
|
3274
|
+
}, o[12] = L, o[13] = m, o[14] = l, o[15] = w) : w = o[15];
|
|
3275
|
+
const v = !!m && M;
|
|
3249
3276
|
let k;
|
|
3250
|
-
return o[16] !==
|
|
3251
|
-
queryKey:
|
|
3277
|
+
return o[16] !== g || o[17] !== w || o[18] !== v || o[19] !== f ? (k = {
|
|
3278
|
+
queryKey: g,
|
|
3252
3279
|
queryFn: w,
|
|
3253
3280
|
enabled: v,
|
|
3254
3281
|
...f
|
|
3255
|
-
}, o[16] =
|
|
3282
|
+
}, o[16] = g, o[17] = w, o[18] = v, o[19] = f, o[20] = k) : k = o[20], Et(k);
|
|
3256
3283
|
};
|
|
3257
3284
|
return {
|
|
3258
3285
|
useModelHook: t,
|
|
3259
3286
|
ModelComponent: (s) => {
|
|
3260
|
-
const o =
|
|
3287
|
+
const o = j(6);
|
|
3261
3288
|
let i, a;
|
|
3262
3289
|
o[0] !== s ? ({
|
|
3263
3290
|
children: i,
|
|
@@ -3270,30 +3297,30 @@ function de({
|
|
|
3270
3297
|
};
|
|
3271
3298
|
}
|
|
3272
3299
|
const {
|
|
3273
|
-
useModelHook:
|
|
3274
|
-
ModelComponent:
|
|
3300
|
+
useModelHook: Mo,
|
|
3301
|
+
ModelComponent: _o
|
|
3275
3302
|
} = de({
|
|
3276
3303
|
queryKeyPrefix: ["aggregations"],
|
|
3277
|
-
getWidgetMethod: (
|
|
3304
|
+
getWidgetMethod: (n) => (e) => {
|
|
3278
3305
|
let t = e.aggregations.filter((s) => s.operation !== "custom");
|
|
3279
|
-
e.aggregations.some((s) => s.operation === "custom") && (t =
|
|
3280
|
-
const
|
|
3306
|
+
e.aggregations.some((s) => s.operation === "custom") && (t = Ls(e.aggregations).join(","));
|
|
3307
|
+
const r = {
|
|
3281
3308
|
...e,
|
|
3282
3309
|
aggregations: t
|
|
3283
3310
|
};
|
|
3284
|
-
return
|
|
3311
|
+
return n.getAggregations(r);
|
|
3285
3312
|
}
|
|
3286
3313
|
});
|
|
3287
|
-
function
|
|
3288
|
-
return
|
|
3314
|
+
function Ls(n) {
|
|
3315
|
+
return n.map((e) => {
|
|
3289
3316
|
if (e.operation === "custom")
|
|
3290
3317
|
return `${e.aggregationExp} AS ${e.alias}`;
|
|
3291
3318
|
const {
|
|
3292
3319
|
column: t,
|
|
3293
|
-
operation:
|
|
3320
|
+
operation: r,
|
|
3294
3321
|
alias: s
|
|
3295
3322
|
} = e;
|
|
3296
|
-
switch (
|
|
3323
|
+
switch (r) {
|
|
3297
3324
|
case "count":
|
|
3298
3325
|
return `COUNT(${t}) AS ${s}`;
|
|
3299
3326
|
case "sum":
|
|
@@ -3305,110 +3332,110 @@ function vs(r) {
|
|
|
3305
3332
|
case "max":
|
|
3306
3333
|
return `MAX(${t}) AS ${s}`;
|
|
3307
3334
|
default:
|
|
3308
|
-
throw new Error(`Unsupported aggregation operation: ${String(
|
|
3335
|
+
throw new Error(`Unsupported aggregation operation: ${String(r)}`);
|
|
3309
3336
|
}
|
|
3310
3337
|
});
|
|
3311
3338
|
}
|
|
3312
3339
|
const {
|
|
3313
|
-
useModelHook:
|
|
3314
|
-
ModelComponent:
|
|
3340
|
+
useModelHook: Eo,
|
|
3341
|
+
ModelComponent: To
|
|
3315
3342
|
} = de({
|
|
3316
3343
|
queryKeyPrefix: ["categories"],
|
|
3317
|
-
getWidgetMethod: (
|
|
3344
|
+
getWidgetMethod: (n) => n.getCategories.bind(n)
|
|
3318
3345
|
}), {
|
|
3319
|
-
useModelHook:
|
|
3320
|
-
ModelComponent:
|
|
3346
|
+
useModelHook: Lo,
|
|
3347
|
+
ModelComponent: ko
|
|
3321
3348
|
} = de({
|
|
3322
3349
|
queryKeyPrefix: ["features"],
|
|
3323
|
-
getWidgetMethod: (
|
|
3350
|
+
getWidgetMethod: (n) => n.getFeatures.bind(n)
|
|
3324
3351
|
}), {
|
|
3325
|
-
useModelHook:
|
|
3326
|
-
ModelComponent:
|
|
3352
|
+
useModelHook: Co,
|
|
3353
|
+
ModelComponent: Po
|
|
3327
3354
|
} = de({
|
|
3328
3355
|
queryKeyPrefix: ["formula"],
|
|
3329
|
-
getWidgetMethod: (
|
|
3356
|
+
getWidgetMethod: (n) => n.getFormula.bind(n)
|
|
3330
3357
|
}), {
|
|
3331
|
-
useModelHook:
|
|
3332
|
-
ModelComponent:
|
|
3358
|
+
useModelHook: Oo,
|
|
3359
|
+
ModelComponent: Ao
|
|
3333
3360
|
} = de({
|
|
3334
3361
|
queryKeyPrefix: ["histogram"],
|
|
3335
|
-
getWidgetMethod: (
|
|
3362
|
+
getWidgetMethod: (n) => n.getHistogram.bind(n)
|
|
3336
3363
|
}), {
|
|
3337
|
-
useModelHook:
|
|
3338
|
-
ModelComponent:
|
|
3364
|
+
useModelHook: Fo,
|
|
3365
|
+
ModelComponent: Do
|
|
3339
3366
|
} = de({
|
|
3340
3367
|
queryKeyPrefix: ["range"],
|
|
3341
|
-
getWidgetMethod: (
|
|
3368
|
+
getWidgetMethod: (n) => n.getRange.bind(n)
|
|
3342
3369
|
}), {
|
|
3343
|
-
useModelHook:
|
|
3344
|
-
ModelComponent:
|
|
3370
|
+
useModelHook: Ro,
|
|
3371
|
+
ModelComponent: xo
|
|
3345
3372
|
} = de({
|
|
3346
3373
|
queryKeyPrefix: ["scatter"],
|
|
3347
|
-
getWidgetMethod: (
|
|
3374
|
+
getWidgetMethod: (n) => n.getScatter.bind(n)
|
|
3348
3375
|
}), {
|
|
3349
|
-
useModelHook:
|
|
3350
|
-
ModelComponent:
|
|
3376
|
+
useModelHook: $o,
|
|
3377
|
+
ModelComponent: Uo
|
|
3351
3378
|
} = de({
|
|
3352
3379
|
queryKeyPrefix: ["table"],
|
|
3353
|
-
getWidgetMethod: (
|
|
3380
|
+
getWidgetMethod: (n) => n.getTable.bind(n)
|
|
3354
3381
|
}), {
|
|
3355
|
-
useModelHook:
|
|
3356
|
-
ModelComponent:
|
|
3382
|
+
useModelHook: Vo,
|
|
3383
|
+
ModelComponent: qo
|
|
3357
3384
|
} = de({
|
|
3358
3385
|
queryKeyPrefix: ["timeSeries"],
|
|
3359
|
-
getWidgetMethod: (
|
|
3360
|
-
}),
|
|
3361
|
-
function
|
|
3362
|
-
const e =
|
|
3386
|
+
getWidgetMethod: (n) => n.getTimeSeries.bind(n)
|
|
3387
|
+
}), jo = "ps";
|
|
3388
|
+
function Bo(n) {
|
|
3389
|
+
const e = j(13), {
|
|
3363
3390
|
children: t,
|
|
3364
|
-
maps:
|
|
3391
|
+
maps: r,
|
|
3365
3392
|
lassoTools: s,
|
|
3366
3393
|
measureTools: o
|
|
3367
|
-
} =
|
|
3394
|
+
} = n;
|
|
3368
3395
|
let i;
|
|
3369
3396
|
e[0] !== s ? (i = s === void 0 ? [] : s, e[0] = s, e[1] = i) : i = e[1];
|
|
3370
3397
|
const a = i;
|
|
3371
3398
|
let l;
|
|
3372
3399
|
e[2] !== o ? (l = o === void 0 ? [] : o, e[2] = o, e[3] = l) : l = e[3];
|
|
3373
3400
|
const d = l;
|
|
3374
|
-
let
|
|
3375
|
-
e[4] !== t || e[5] !== d ? (
|
|
3376
|
-
let
|
|
3377
|
-
e[7] !== a || e[8] !==
|
|
3401
|
+
let p;
|
|
3402
|
+
e[4] !== t || e[5] !== d ? (p = /* @__PURE__ */ G(Pr, { values: d, children: t }), e[4] = t, e[5] = d, e[6] = p) : p = e[6];
|
|
3403
|
+
let h;
|
|
3404
|
+
e[7] !== a || e[8] !== p ? (h = /* @__PURE__ */ G(fr, { values: a, children: p }), e[7] = a, e[8] = p, e[9] = h) : h = e[9];
|
|
3378
3405
|
let b;
|
|
3379
|
-
return e[10] !==
|
|
3406
|
+
return e[10] !== r || e[11] !== h ? (b = /* @__PURE__ */ G(er, { values: r, children: h }), e[10] = r, e[11] = h, e[12] = b) : b = e[12], b;
|
|
3380
3407
|
}
|
|
3381
|
-
function
|
|
3382
|
-
const t = Se((d) => d.layers),
|
|
3408
|
+
function Io(n, e) {
|
|
3409
|
+
const t = Se((d) => d.layers), r = Se((d) => d.setLayer), s = ge(() => $t(n.map((d) => t[d]).filter((d) => !!d?.legend)).toReversed(), [t, n]), o = ge(() => s.map(e), [e, s]), i = re(({
|
|
3383
3410
|
id: d,
|
|
3384
|
-
visible:
|
|
3385
|
-
...
|
|
3411
|
+
visible: p,
|
|
3412
|
+
...h
|
|
3386
3413
|
}) => {
|
|
3387
|
-
|
|
3414
|
+
r(d, {
|
|
3388
3415
|
props: {
|
|
3389
|
-
visible:
|
|
3416
|
+
visible: p
|
|
3390
3417
|
},
|
|
3391
|
-
legend:
|
|
3418
|
+
legend: h
|
|
3392
3419
|
});
|
|
3393
|
-
}, [
|
|
3420
|
+
}, [r]), a = re(({
|
|
3394
3421
|
id: d,
|
|
3395
|
-
collapsed:
|
|
3422
|
+
collapsed: p
|
|
3396
3423
|
}) => {
|
|
3397
|
-
|
|
3424
|
+
r(d, {
|
|
3398
3425
|
legend: {
|
|
3399
|
-
collapsed:
|
|
3426
|
+
collapsed: p
|
|
3400
3427
|
}
|
|
3401
3428
|
});
|
|
3402
|
-
}, [
|
|
3429
|
+
}, [r]), l = re(({
|
|
3403
3430
|
id: d,
|
|
3404
|
-
opacity:
|
|
3431
|
+
opacity: p
|
|
3405
3432
|
}) => {
|
|
3406
|
-
|
|
3433
|
+
r(d, {
|
|
3407
3434
|
props: {
|
|
3408
|
-
opacity:
|
|
3435
|
+
opacity: p
|
|
3409
3436
|
}
|
|
3410
3437
|
});
|
|
3411
|
-
}, [
|
|
3438
|
+
}, [r]);
|
|
3412
3439
|
return {
|
|
3413
3440
|
legend: o,
|
|
3414
3441
|
onChangeVisibility: i,
|
|
@@ -3416,81 +3443,81 @@ function xo(r, e) {
|
|
|
3416
3443
|
onChangeRowCollapse: a
|
|
3417
3444
|
};
|
|
3418
3445
|
}
|
|
3419
|
-
function
|
|
3420
|
-
mapId:
|
|
3446
|
+
function Ho({
|
|
3447
|
+
mapId: n
|
|
3421
3448
|
}) {
|
|
3422
|
-
const [e, t] = ue(void 0), [
|
|
3449
|
+
const [e, t] = ue(void 0), [r, s] = ue(!1), [o, i] = ue(void 0), a = x((u) => u.maps[n]?.basemap), l = x((u) => u.getDeckInstance), d = x((u) => u.getOverlayInstance), p = x((u) => u.areLayersLoaded[n]), b = x((u) => u.maps[n]?.isLoaded) && p, {
|
|
3423
3450
|
type: f
|
|
3424
3451
|
} = we[a], M = f === ce.googleMaps, S = re(async () => {
|
|
3425
|
-
const u = l(
|
|
3452
|
+
const u = l(n), m = d(n);
|
|
3426
3453
|
try {
|
|
3427
|
-
const
|
|
3428
|
-
|
|
3429
|
-
const w =
|
|
3454
|
+
const g = document.createElement("canvas");
|
|
3455
|
+
g.width = u.width ?? 0, g.height = u.height ?? 0;
|
|
3456
|
+
const w = g.getContext("2d");
|
|
3430
3457
|
if (M) {
|
|
3431
|
-
const k =
|
|
3458
|
+
const k = m;
|
|
3432
3459
|
if (k.getRenderingType() !== "RASTER")
|
|
3433
3460
|
throw new Error("Only raster type is supported for Google Maps");
|
|
3434
|
-
const F = await
|
|
3461
|
+
const F = await Cn(k.getDiv(), {
|
|
3435
3462
|
useCORS: !0
|
|
3436
3463
|
});
|
|
3437
3464
|
w?.drawImage(F, 0, 0, u.width, u.height);
|
|
3438
3465
|
} else {
|
|
3439
|
-
const k =
|
|
3466
|
+
const k = m;
|
|
3440
3467
|
k.redraw(), w?.drawImage(k.getMap().getCanvas(), 0, 0, u.width, u.height);
|
|
3441
3468
|
}
|
|
3442
3469
|
u?.redraw("screenshot"), w?.drawImage(u.getCanvas(), 0, 0, u.width, u.height);
|
|
3443
|
-
const v =
|
|
3470
|
+
const v = g.toDataURL();
|
|
3444
3471
|
t(v);
|
|
3445
|
-
} catch (
|
|
3446
|
-
i(
|
|
3472
|
+
} catch (g) {
|
|
3473
|
+
i(g), console.error(g);
|
|
3447
3474
|
} finally {
|
|
3448
3475
|
s(!1);
|
|
3449
3476
|
}
|
|
3450
|
-
}, [l, M,
|
|
3477
|
+
}, [l, M, n, d]);
|
|
3451
3478
|
return {
|
|
3452
3479
|
takeScreenshot: re(() => {
|
|
3453
3480
|
i(void 0), s(!0), b && S();
|
|
3454
3481
|
}, [S, b]),
|
|
3455
|
-
isLoading:
|
|
3482
|
+
isLoading: r,
|
|
3456
3483
|
screenshot: e,
|
|
3457
3484
|
error: o
|
|
3458
3485
|
};
|
|
3459
3486
|
}
|
|
3460
|
-
function
|
|
3461
|
-
const e =
|
|
3487
|
+
function No(n) {
|
|
3488
|
+
const e = j(11), {
|
|
3462
3489
|
mapId: t
|
|
3463
|
-
} =
|
|
3464
|
-
let
|
|
3465
|
-
e[0] !== t ? (
|
|
3490
|
+
} = n;
|
|
3491
|
+
let r;
|
|
3492
|
+
e[0] !== t ? (r = {
|
|
3466
3493
|
mapId: t
|
|
3467
|
-
}, e[0] = t, e[1] =
|
|
3468
|
-
const s =
|
|
3494
|
+
}, e[0] = t, e[1] = r) : r = e[1];
|
|
3495
|
+
const s = ks(r);
|
|
3469
3496
|
let o;
|
|
3470
3497
|
e[2] !== t ? (o = {
|
|
3471
3498
|
mapId: t
|
|
3472
3499
|
}, e[2] = t, e[3] = o) : o = e[3];
|
|
3473
|
-
const i =
|
|
3500
|
+
const i = Cs(o);
|
|
3474
3501
|
let a;
|
|
3475
3502
|
e[4] !== t ? (a = {
|
|
3476
3503
|
mapId: t
|
|
3477
3504
|
}, e[4] = t, e[5] = a) : a = e[5];
|
|
3478
|
-
const l =
|
|
3479
|
-
let
|
|
3480
|
-
return e[6] !== i || e[7] !== l || e[8] !== d || e[9] !== s ? (
|
|
3505
|
+
const l = As(a), d = i ?? l ?? s;
|
|
3506
|
+
let p;
|
|
3507
|
+
return e[6] !== i || e[7] !== l || e[8] !== d || e[9] !== s ? (p = {
|
|
3481
3508
|
spatialFilter: d,
|
|
3482
3509
|
staticSpatialFilter: l,
|
|
3483
3510
|
lassoToolsSpatialFilter: i,
|
|
3484
3511
|
viewportSpatialFilter: s
|
|
3485
|
-
}, e[6] = i, e[7] = l, e[8] = d, e[9] = s, e[10] =
|
|
3512
|
+
}, e[6] = i, e[7] = l, e[8] = d, e[9] = s, e[10] = p) : p = e[10], p;
|
|
3486
3513
|
}
|
|
3487
|
-
function
|
|
3488
|
-
const e =
|
|
3514
|
+
function ks(n) {
|
|
3515
|
+
const e = j(4), {
|
|
3489
3516
|
mapId: t
|
|
3490
|
-
} =
|
|
3491
|
-
let
|
|
3492
|
-
e[0] !== t ? (
|
|
3493
|
-
const s = x(
|
|
3517
|
+
} = n;
|
|
3518
|
+
let r;
|
|
3519
|
+
e[0] !== t ? (r = (i) => i.viewports[t], e[0] = t, e[1] = r) : r = e[1];
|
|
3520
|
+
const s = x(r);
|
|
3494
3521
|
let o;
|
|
3495
3522
|
e: {
|
|
3496
3523
|
if (!s) {
|
|
@@ -3498,48 +3525,48 @@ function ws(r) {
|
|
|
3498
3525
|
break e;
|
|
3499
3526
|
}
|
|
3500
3527
|
let i;
|
|
3501
|
-
e[2] !== s ? (i =
|
|
3528
|
+
e[2] !== s ? (i = Tn(s.getBounds()), e[2] = s, e[3] = i) : i = e[3], o = i;
|
|
3502
3529
|
}
|
|
3503
3530
|
return o;
|
|
3504
3531
|
}
|
|
3505
|
-
function
|
|
3506
|
-
const e =
|
|
3532
|
+
function Cs(n) {
|
|
3533
|
+
const e = j(5), {
|
|
3507
3534
|
mapId: t
|
|
3508
|
-
} =
|
|
3509
|
-
let
|
|
3510
|
-
e[0] !== t ? (
|
|
3511
|
-
const s = K(
|
|
3535
|
+
} = n;
|
|
3536
|
+
let r;
|
|
3537
|
+
e[0] !== t ? (r = (i) => i.data[t]?.values, e[0] = t, e[1] = r) : r = e[1];
|
|
3538
|
+
const s = K(r);
|
|
3512
3539
|
let o;
|
|
3513
3540
|
e: {
|
|
3514
3541
|
let i;
|
|
3515
3542
|
if (e[2] !== s) {
|
|
3516
|
-
const a =
|
|
3543
|
+
const a = At({
|
|
3517
3544
|
values: s
|
|
3518
|
-
}).filter(
|
|
3545
|
+
}).filter(Os);
|
|
3519
3546
|
if (!a?.length) {
|
|
3520
3547
|
o = void 0;
|
|
3521
3548
|
break e;
|
|
3522
3549
|
}
|
|
3523
|
-
i =
|
|
3550
|
+
i = Ge(a.map(Ps)), e[2] = s, e[3] = i, e[4] = o;
|
|
3524
3551
|
} else
|
|
3525
3552
|
i = e[3], o = e[4];
|
|
3526
3553
|
o = i.geometry;
|
|
3527
3554
|
}
|
|
3528
3555
|
return o;
|
|
3529
3556
|
}
|
|
3530
|
-
function
|
|
3531
|
-
return
|
|
3557
|
+
function Ps(n) {
|
|
3558
|
+
return n.geometry.coordinates;
|
|
3532
3559
|
}
|
|
3533
|
-
function
|
|
3534
|
-
return
|
|
3560
|
+
function Os(n) {
|
|
3561
|
+
return n.properties.visible;
|
|
3535
3562
|
}
|
|
3536
|
-
function
|
|
3537
|
-
const e =
|
|
3563
|
+
function As(n) {
|
|
3564
|
+
const e = j(4), {
|
|
3538
3565
|
mapId: t
|
|
3539
|
-
} =
|
|
3540
|
-
let
|
|
3541
|
-
e[0] !== t ? (
|
|
3542
|
-
const s = x(
|
|
3566
|
+
} = n;
|
|
3567
|
+
let r;
|
|
3568
|
+
e[0] !== t ? (r = (i) => i.spatialFilter[t], e[0] = t, e[1] = r) : r = e[1];
|
|
3569
|
+
const s = x(r);
|
|
3543
3570
|
let o;
|
|
3544
3571
|
e: {
|
|
3545
3572
|
if (!s || !Object.keys(s).length) {
|
|
@@ -3548,140 +3575,153 @@ function Ts(r) {
|
|
|
3548
3575
|
}
|
|
3549
3576
|
let i;
|
|
3550
3577
|
if (e[2] !== s) {
|
|
3551
|
-
const a = Object.values(s).filter(
|
|
3552
|
-
i =
|
|
3578
|
+
const a = Object.values(s).filter(Ds).flatMap(Fs);
|
|
3579
|
+
i = Ge(a), e[2] = s, e[3] = i;
|
|
3553
3580
|
} else
|
|
3554
3581
|
i = e[3];
|
|
3555
3582
|
o = i.geometry;
|
|
3556
3583
|
}
|
|
3557
3584
|
return o;
|
|
3558
3585
|
}
|
|
3559
|
-
function
|
|
3560
|
-
return
|
|
3586
|
+
function Fs(n) {
|
|
3587
|
+
return n.type === "Polygon" ? [n.coordinates] : n.coordinates;
|
|
3561
3588
|
}
|
|
3562
|
-
function
|
|
3563
|
-
return
|
|
3589
|
+
function Ds(n) {
|
|
3590
|
+
return n != null;
|
|
3564
3591
|
}
|
|
3565
3592
|
const ye = {
|
|
3566
3593
|
currency: "CURRENCY",
|
|
3567
3594
|
default: "DEFAULT",
|
|
3568
3595
|
number: "NUMBER"
|
|
3569
|
-
},
|
|
3596
|
+
}, mt = {
|
|
3570
3597
|
[ye.currency]: {
|
|
3571
3598
|
type: ye.currency,
|
|
3572
|
-
format: (
|
|
3599
|
+
format: (n, e) => hn(n, e)
|
|
3573
3600
|
},
|
|
3574
3601
|
[ye.number]: {
|
|
3575
3602
|
type: ye.number,
|
|
3576
|
-
format: (
|
|
3603
|
+
format: (n, e) => Mt(n, e)
|
|
3577
3604
|
},
|
|
3578
3605
|
[ye.default]: {
|
|
3579
3606
|
type: ye.default,
|
|
3580
|
-
format: (
|
|
3607
|
+
format: (n) => n.toLocaleString()
|
|
3581
3608
|
}
|
|
3582
3609
|
};
|
|
3583
|
-
function
|
|
3584
|
-
properties:
|
|
3610
|
+
function Zo({
|
|
3611
|
+
properties: n,
|
|
3585
3612
|
formatters: e = {},
|
|
3586
|
-
includeColumns: t = Object.keys(
|
|
3587
|
-
locale:
|
|
3613
|
+
includeColumns: t = Object.keys(n),
|
|
3614
|
+
locale: r = "en-US",
|
|
3588
3615
|
showColumnName: s = !0,
|
|
3589
3616
|
title: o,
|
|
3590
|
-
getColumnName: i =
|
|
3591
|
-
getFieldHtml: a =
|
|
3592
|
-
getTitle: l =
|
|
3593
|
-
getValue: d =
|
|
3617
|
+
getColumnName: i = Vs,
|
|
3618
|
+
getFieldHtml: a = xs,
|
|
3619
|
+
getTitle: l = Rs,
|
|
3620
|
+
getValue: d = $s
|
|
3594
3621
|
}) {
|
|
3595
|
-
const
|
|
3596
|
-
const S = e[M], L =
|
|
3597
|
-
return f + a(
|
|
3622
|
+
const p = o ? l(o) : "", b = t.reduce((f, M) => {
|
|
3623
|
+
const S = e[M], L = n[M], u = d(L, r, S), m = s ? i(M) : "";
|
|
3624
|
+
return f + a(m, u);
|
|
3598
3625
|
}, "");
|
|
3599
|
-
return
|
|
3626
|
+
return p + b;
|
|
3600
3627
|
}
|
|
3601
|
-
function
|
|
3602
|
-
return `<h3 style="margin: 0"><strong>${
|
|
3628
|
+
function Rs(n) {
|
|
3629
|
+
return `<h3 style="margin: 0"><strong>${n}</strong></h3></br>`;
|
|
3603
3630
|
}
|
|
3604
|
-
function
|
|
3605
|
-
return `${
|
|
3631
|
+
function xs(n, e) {
|
|
3632
|
+
return `${n}${e}</br>`;
|
|
3606
3633
|
}
|
|
3607
|
-
function
|
|
3634
|
+
function $s(n, e, t) {
|
|
3608
3635
|
try {
|
|
3609
|
-
return
|
|
3636
|
+
return Us(t)(n, e);
|
|
3610
3637
|
} catch {
|
|
3611
|
-
return
|
|
3638
|
+
return n;
|
|
3612
3639
|
}
|
|
3613
3640
|
}
|
|
3614
|
-
function
|
|
3615
|
-
return typeof
|
|
3641
|
+
function Us(n) {
|
|
3642
|
+
return typeof n == "function" ? n : ((n && mt[n]) ?? mt[ye.default]).format;
|
|
3616
3643
|
}
|
|
3617
|
-
function
|
|
3618
|
-
return `<strong>${
|
|
3644
|
+
function Vs(n) {
|
|
3645
|
+
return `<strong>${n}</strong>: `;
|
|
3619
3646
|
}
|
|
3620
|
-
function
|
|
3647
|
+
function zo(n) {
|
|
3621
3648
|
return {
|
|
3622
|
-
collapsed:
|
|
3623
|
-
collapsible:
|
|
3624
|
-
helperText:
|
|
3625
|
-
id:
|
|
3626
|
-
legend:
|
|
3627
|
-
maxZoom:
|
|
3628
|
-
minZoom:
|
|
3629
|
-
opacity:
|
|
3630
|
-
showOpacityControl:
|
|
3631
|
-
switchable:
|
|
3632
|
-
title:
|
|
3633
|
-
visible:
|
|
3649
|
+
collapsed: n.legend?.collapsed,
|
|
3650
|
+
collapsible: n.legend?.collapsible,
|
|
3651
|
+
helperText: n.legend?.helperText,
|
|
3652
|
+
id: n.props.id,
|
|
3653
|
+
legend: n.legend?.variables,
|
|
3654
|
+
maxZoom: n.legend?.maxZoom,
|
|
3655
|
+
minZoom: n.legend?.minZoom,
|
|
3656
|
+
opacity: n.props.opacity ?? 1,
|
|
3657
|
+
showOpacityControl: n.legend?.opacityControl,
|
|
3658
|
+
switchable: n.legend?.switchable,
|
|
3659
|
+
title: n.name,
|
|
3660
|
+
visible: n.props.visible ?? !0
|
|
3634
3661
|
};
|
|
3635
3662
|
}
|
|
3636
|
-
|
|
3637
|
-
|
|
3663
|
+
const qs = {
|
|
3664
|
+
Point: (n) => yn(n.coordinates),
|
|
3665
|
+
LineString: (n) => mn(n.coordinates),
|
|
3666
|
+
Polygon: (n) => pn(n.coordinates),
|
|
3667
|
+
MultiPoint: (n) => fn(n.coordinates),
|
|
3668
|
+
MultiLineString: (n) => dn(n.coordinates),
|
|
3669
|
+
MultiPolygon: (n) => Ge(n.coordinates)
|
|
3670
|
+
};
|
|
3671
|
+
function Go(n) {
|
|
3672
|
+
const e = qs[n.type], t = e?.(n);
|
|
3673
|
+
if (t)
|
|
3674
|
+
return wt(t).geometry.coordinates;
|
|
3675
|
+
}
|
|
3676
|
+
function Wo(n) {
|
|
3677
|
+
const e = j(22), {
|
|
3638
3678
|
children: t,
|
|
3639
|
-
mapId:
|
|
3640
|
-
} =
|
|
3679
|
+
mapId: r
|
|
3680
|
+
} = n;
|
|
3641
3681
|
let s;
|
|
3642
|
-
e[0] !==
|
|
3682
|
+
e[0] !== r ? (s = (v) => v.viewStates[r], e[0] = r, e[1] = s) : s = e[1];
|
|
3643
3683
|
const {
|
|
3644
3684
|
zoom: o,
|
|
3645
3685
|
maxZoom: i,
|
|
3646
3686
|
minZoom: a
|
|
3647
3687
|
} = x(s);
|
|
3648
3688
|
let l;
|
|
3649
|
-
e[2] !==
|
|
3650
|
-
const d = x(l),
|
|
3689
|
+
e[2] !== r ? (l = (v) => v.areLayersLoaded[r], e[2] = r, e[3] = l) : l = e[3];
|
|
3690
|
+
const d = x(l), p = x(Is), h = x(Bs), b = x(js), f = !d;
|
|
3651
3691
|
let M;
|
|
3652
|
-
e[4] !==
|
|
3692
|
+
e[4] !== r || e[5] !== p ? (M = (v) => p(r, v), e[4] = r, e[5] = p, e[6] = M) : M = e[6];
|
|
3653
3693
|
const S = M;
|
|
3654
3694
|
let L;
|
|
3655
|
-
e[7] !==
|
|
3695
|
+
e[7] !== h || e[8] !== r ? (L = (v) => h(r, v), e[7] = h, e[8] = r, e[9] = L) : L = e[9];
|
|
3656
3696
|
const u = L;
|
|
3657
|
-
let
|
|
3658
|
-
e[10] !==
|
|
3659
|
-
const
|
|
3697
|
+
let m;
|
|
3698
|
+
e[10] !== r || e[11] !== b ? (m = () => b(r), e[10] = r, e[11] = b, e[12] = m) : m = e[12];
|
|
3699
|
+
const g = m;
|
|
3660
3700
|
let w;
|
|
3661
|
-
return e[13] !== t || e[14] !== i || e[15] !== a || e[16] !== f || e[17] !== S || e[18] !== u || e[19] !==
|
|
3701
|
+
return e[13] !== t || e[14] !== i || e[15] !== a || e[16] !== f || e[17] !== S || e[18] !== u || e[19] !== g || e[20] !== o ? (w = t({
|
|
3662
3702
|
zoom: o,
|
|
3663
3703
|
maxZoom: i,
|
|
3664
3704
|
minZoom: a,
|
|
3665
3705
|
isLoading: f,
|
|
3666
3706
|
setZoom: S,
|
|
3667
3707
|
flyTo: u,
|
|
3668
|
-
resetViewState:
|
|
3669
|
-
}), e[13] = t, e[14] = i, e[15] = a, e[16] = f, e[17] = S, e[18] = u, e[19] =
|
|
3708
|
+
resetViewState: g
|
|
3709
|
+
}), e[13] = t, e[14] = i, e[15] = a, e[16] = f, e[17] = S, e[18] = u, e[19] = g, e[20] = o, e[21] = w) : w = e[21], w;
|
|
3670
3710
|
}
|
|
3671
|
-
function
|
|
3672
|
-
return
|
|
3711
|
+
function js(n) {
|
|
3712
|
+
return n.resetViewState;
|
|
3673
3713
|
}
|
|
3674
|
-
function
|
|
3675
|
-
return
|
|
3714
|
+
function Bs(n) {
|
|
3715
|
+
return n.flyTo;
|
|
3676
3716
|
}
|
|
3677
|
-
function
|
|
3678
|
-
return
|
|
3717
|
+
function Is(n) {
|
|
3718
|
+
return n.setZoom;
|
|
3679
3719
|
}
|
|
3680
|
-
async function
|
|
3681
|
-
baseUrl:
|
|
3720
|
+
async function Hs({
|
|
3721
|
+
baseUrl: n = Ke,
|
|
3682
3722
|
connection: e,
|
|
3683
3723
|
accessToken: t,
|
|
3684
|
-
query:
|
|
3724
|
+
query: r,
|
|
3685
3725
|
attribute: s,
|
|
3686
3726
|
fetcherOptions: {
|
|
3687
3727
|
signal: o,
|
|
@@ -3689,37 +3729,37 @@ async function $s({
|
|
|
3689
3729
|
} = {},
|
|
3690
3730
|
queryParameters: a,
|
|
3691
3731
|
params: l,
|
|
3692
|
-
apiVersion: d =
|
|
3732
|
+
apiVersion: d = Ye
|
|
3693
3733
|
}) {
|
|
3694
|
-
const
|
|
3695
|
-
return
|
|
3734
|
+
const p = `${n}/${d}/stats/${e}/${s}`;
|
|
3735
|
+
return Ut({
|
|
3696
3736
|
accessToken: t,
|
|
3697
3737
|
signal: o,
|
|
3698
|
-
url:
|
|
3738
|
+
url: p,
|
|
3699
3739
|
method: be.get,
|
|
3700
3740
|
params: {
|
|
3701
|
-
q:
|
|
3741
|
+
q: r,
|
|
3702
3742
|
...a,
|
|
3703
3743
|
...l
|
|
3704
3744
|
},
|
|
3705
3745
|
...i
|
|
3706
3746
|
});
|
|
3707
3747
|
}
|
|
3708
|
-
async function
|
|
3709
|
-
baseUrl:
|
|
3748
|
+
async function Ns({
|
|
3749
|
+
baseUrl: n = Ke,
|
|
3710
3750
|
connection: e,
|
|
3711
3751
|
accessToken: t,
|
|
3712
|
-
table:
|
|
3752
|
+
table: r,
|
|
3713
3753
|
attribute: s,
|
|
3714
3754
|
params: o,
|
|
3715
3755
|
fetcherOptions: {
|
|
3716
3756
|
signal: i,
|
|
3717
3757
|
...a
|
|
3718
3758
|
} = {},
|
|
3719
|
-
apiVersion: l =
|
|
3759
|
+
apiVersion: l = Ye
|
|
3720
3760
|
}) {
|
|
3721
|
-
const d = `${
|
|
3722
|
-
return
|
|
3761
|
+
const d = `${n}/${l}/stats/${e}/${r}/${s}`;
|
|
3762
|
+
return Ut({
|
|
3723
3763
|
accessToken: t,
|
|
3724
3764
|
signal: i,
|
|
3725
3765
|
url: d,
|
|
@@ -3730,35 +3770,35 @@ async function Us({
|
|
|
3730
3770
|
...a
|
|
3731
3771
|
});
|
|
3732
3772
|
}
|
|
3733
|
-
function
|
|
3734
|
-
const e =
|
|
3773
|
+
function Ko(n) {
|
|
3774
|
+
const e = j(20), {
|
|
3735
3775
|
source: t,
|
|
3736
|
-
attribute:
|
|
3776
|
+
attribute: r,
|
|
3737
3777
|
accessToken: s,
|
|
3738
3778
|
params: o,
|
|
3739
3779
|
fetcherOptions: i,
|
|
3740
3780
|
useQueryProps: a
|
|
3741
|
-
} =
|
|
3781
|
+
} = n;
|
|
3742
3782
|
let l;
|
|
3743
3783
|
e[0] !== a ? (l = a === void 0 ? {} : a, e[0] = a, e[1] = l) : l = e[1];
|
|
3744
|
-
let d,
|
|
3784
|
+
let d, p;
|
|
3745
3785
|
e[2] !== l ? ({
|
|
3746
3786
|
enabled: d,
|
|
3747
|
-
...
|
|
3748
|
-
} = l, e[2] = l, e[3] = d, e[4] =
|
|
3749
|
-
const
|
|
3787
|
+
...p
|
|
3788
|
+
} = l, e[2] = l, e[3] = d, e[4] = p) : (d = e[3], p = e[4]);
|
|
3789
|
+
const h = d === void 0 ? !0 : d;
|
|
3750
3790
|
let b;
|
|
3751
|
-
e[5] !==
|
|
3791
|
+
e[5] !== r || e[6] !== t ? (b = [t, r], e[5] = r, e[6] = t, e[7] = b) : b = e[7];
|
|
3752
3792
|
let f;
|
|
3753
|
-
e[8] !== s || e[9] !==
|
|
3793
|
+
e[8] !== s || e[9] !== r || e[10] !== i || e[11] !== o || e[12] !== t ? (f = () => Zs({
|
|
3754
3794
|
source: t,
|
|
3755
3795
|
params: o,
|
|
3756
|
-
attribute:
|
|
3796
|
+
attribute: r,
|
|
3757
3797
|
accessToken: s,
|
|
3758
3798
|
fetcherOptions: i
|
|
3759
|
-
}), e[8] = s, e[9] =
|
|
3799
|
+
}), e[8] = s, e[9] = r, e[10] = i, e[11] = o, e[12] = t, e[13] = f) : f = e[13];
|
|
3760
3800
|
let M;
|
|
3761
|
-
return e[14] !==
|
|
3801
|
+
return e[14] !== h || e[15] !== t || e[16] !== b || e[17] !== f || e[18] !== p ? (M = {
|
|
3762
3802
|
queryKey: b,
|
|
3763
3803
|
queryFn: f,
|
|
3764
3804
|
select(S) {
|
|
@@ -3767,160 +3807,161 @@ function jo(r) {
|
|
|
3767
3807
|
type: S.type.toLowerCase()
|
|
3768
3808
|
};
|
|
3769
3809
|
},
|
|
3770
|
-
enabled: !!t &&
|
|
3771
|
-
...
|
|
3772
|
-
}, e[14] =
|
|
3810
|
+
enabled: !!t && h,
|
|
3811
|
+
...p
|
|
3812
|
+
}, e[14] = h, e[15] = t, e[16] = b, e[17] = f, e[18] = p, e[19] = M) : M = e[19], Et(M);
|
|
3773
3813
|
}
|
|
3774
|
-
function
|
|
3775
|
-
source:
|
|
3814
|
+
function Zs({
|
|
3815
|
+
source: n,
|
|
3776
3816
|
params: e,
|
|
3777
3817
|
attribute: t,
|
|
3778
|
-
accessToken:
|
|
3818
|
+
accessToken: r,
|
|
3779
3819
|
fetcherOptions: s
|
|
3780
3820
|
}) {
|
|
3781
|
-
if (
|
|
3782
|
-
return
|
|
3783
|
-
connection:
|
|
3784
|
-
baseUrl:
|
|
3785
|
-
apiVersion:
|
|
3786
|
-
accessToken:
|
|
3821
|
+
if (n.type.startsWith("query"))
|
|
3822
|
+
return Hs({
|
|
3823
|
+
connection: n.connectionName,
|
|
3824
|
+
baseUrl: n.apiBaseUrl,
|
|
3825
|
+
apiVersion: n.apiVersion,
|
|
3826
|
+
accessToken: r,
|
|
3787
3827
|
params: e,
|
|
3788
|
-
query:
|
|
3789
|
-
queryParameters:
|
|
3828
|
+
query: n.data,
|
|
3829
|
+
queryParameters: n.queryParameters,
|
|
3790
3830
|
attribute: t,
|
|
3791
3831
|
fetcherOptions: s
|
|
3792
3832
|
});
|
|
3793
|
-
if (
|
|
3794
|
-
return
|
|
3795
|
-
connection:
|
|
3796
|
-
baseUrl:
|
|
3797
|
-
apiVersion:
|
|
3833
|
+
if (n.type.startsWith("table"))
|
|
3834
|
+
return Ns({
|
|
3835
|
+
connection: n.connectionName,
|
|
3836
|
+
baseUrl: n.apiBaseUrl,
|
|
3837
|
+
apiVersion: n.apiVersion,
|
|
3798
3838
|
params: e,
|
|
3799
|
-
accessToken:
|
|
3800
|
-
table:
|
|
3839
|
+
accessToken: r,
|
|
3840
|
+
table: n.data,
|
|
3801
3841
|
attribute: t,
|
|
3802
3842
|
fetcherOptions: s
|
|
3803
3843
|
});
|
|
3804
|
-
if (
|
|
3805
|
-
return
|
|
3806
|
-
source:
|
|
3807
|
-
accessToken:
|
|
3808
|
-
target:
|
|
3844
|
+
if (n.type.startsWith("tileset"))
|
|
3845
|
+
return zs({
|
|
3846
|
+
source: n,
|
|
3847
|
+
accessToken: r,
|
|
3848
|
+
target: n.data,
|
|
3809
3849
|
attribute: t
|
|
3810
3850
|
});
|
|
3811
|
-
throw new Error(`Unsupported source type: ${
|
|
3851
|
+
throw new Error(`Unsupported source type: ${n.type}`);
|
|
3812
3852
|
}
|
|
3813
|
-
async function
|
|
3814
|
-
source:
|
|
3853
|
+
async function zs({
|
|
3854
|
+
source: n,
|
|
3815
3855
|
accessToken: e,
|
|
3816
3856
|
target: t,
|
|
3817
|
-
attribute:
|
|
3857
|
+
attribute: r
|
|
3818
3858
|
}) {
|
|
3819
|
-
const s = await
|
|
3820
|
-
connectionName:
|
|
3821
|
-
apiBaseUrl:
|
|
3859
|
+
const s = await Ln({
|
|
3860
|
+
connectionName: n.connectionName,
|
|
3861
|
+
apiBaseUrl: n.apiBaseUrl,
|
|
3822
3862
|
accessToken: e,
|
|
3823
|
-
clientId:
|
|
3863
|
+
clientId: n.clientId,
|
|
3824
3864
|
tableName: t
|
|
3825
3865
|
});
|
|
3826
3866
|
if (!s?.tilestats?.layers?.[0]?.attributes)
|
|
3827
|
-
throw new Error(`${
|
|
3828
|
-
const i = s.tilestats.layers[0].attributes.find((a) => a.attribute ===
|
|
3867
|
+
throw new Error(`${r} not found in tileset attributes`);
|
|
3868
|
+
const i = s.tilestats.layers[0].attributes.find((a) => a.attribute === r);
|
|
3829
3869
|
if (!i)
|
|
3830
|
-
throw new Error(`${
|
|
3870
|
+
throw new Error(`${r} not found in tileset attributes`);
|
|
3831
3871
|
return i;
|
|
3832
3872
|
}
|
|
3833
3873
|
export {
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3874
|
+
_o as AggregationsModel,
|
|
3875
|
+
go as BasemapsControls,
|
|
3876
|
+
at as CONVERSIONS_UNITS,
|
|
3877
|
+
Re as CartoBasemapURL,
|
|
3838
3878
|
ae as CartoBasemaps,
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3879
|
+
To as CategoriesModel,
|
|
3880
|
+
nr as CustomCompositeEditMode,
|
|
3881
|
+
Pt as CustomEditableGeojsonLayer,
|
|
3882
|
+
gr as CustomMeasureAreaMode,
|
|
3883
|
+
br as CustomMeasureBufferMode,
|
|
3884
|
+
Dt as CustomMeasureDistanceMode,
|
|
3885
|
+
nt as DEFAULT_LASSO_TOOLS_COLORS,
|
|
3886
|
+
rr as DEFAULT_LASSO_TOOLS_LAYER_PROPS,
|
|
3847
3887
|
Ue as DEFAULT_LASSO_TOOLS_MODES,
|
|
3848
3888
|
$e as DEFAULT_LASSO_TOOLS_PROPS,
|
|
3849
3889
|
Te as DEFAULT_MASK_LAYER_PROPS,
|
|
3850
|
-
|
|
3851
|
-
|
|
3890
|
+
Mr as DEFAULT_MEASUREMENT_TOOLS_MODES,
|
|
3891
|
+
_r as DEFAULT_MEASUREMENT_TOOLS_UNITS,
|
|
3852
3892
|
Ve as DEFAULT_MEASURE_COLORS,
|
|
3853
|
-
|
|
3893
|
+
Bn as DeckGLComponent,
|
|
3854
3894
|
se as EditableEditType,
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3895
|
+
ko as FeaturesModel,
|
|
3896
|
+
Po as FormulaModel,
|
|
3897
|
+
De as GmapsBasemap,
|
|
3898
|
+
Ao as HistogramModel,
|
|
3859
3899
|
ve as INTL_UNITS,
|
|
3860
|
-
|
|
3861
|
-
|
|
3900
|
+
Tr as LassoTools,
|
|
3901
|
+
fr as LassoToolsProvider,
|
|
3862
3902
|
we as MAPS_BASEMAP,
|
|
3863
3903
|
he as MAP_LASSO_TOOLS_LAYER_ID,
|
|
3864
|
-
|
|
3904
|
+
Oe as MAP_MASK_LAYER_ID,
|
|
3865
3905
|
fe as MAP_MEASURE_LAYER_ID,
|
|
3866
|
-
|
|
3867
|
-
|
|
3906
|
+
wr as MEASUREMENT_TOOLS_UNITS_AREA,
|
|
3907
|
+
ct as MEASUREMENT_TOOLS_UNITS_DISTANCE,
|
|
3868
3908
|
ne as MEASUREMENT_TOOLS_UNITS_DISTANCE_VALUES,
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3909
|
+
So as MapComponent,
|
|
3910
|
+
Be as MapMeasurementUnitAuto,
|
|
3911
|
+
vr as MapMeasurementUnitTurf,
|
|
3912
|
+
er as MapProvider,
|
|
3913
|
+
Bo as MapsProvider,
|
|
3874
3914
|
ce as MapsTypes,
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3915
|
+
jr as MeasurementTools,
|
|
3916
|
+
Pr as MeasurementToolsProvider,
|
|
3917
|
+
Do as RangeModel,
|
|
3918
|
+
xo as ScatterModel,
|
|
3919
|
+
Uo as TableModel,
|
|
3920
|
+
qo as TimeSeriesModel,
|
|
3921
|
+
Wo as ZoomControls,
|
|
3922
|
+
jo as clientID,
|
|
3923
|
+
st as convertMetersTo,
|
|
3924
|
+
dr as createLassoToolsStore,
|
|
3925
|
+
Xn as createMapStore,
|
|
3926
|
+
Cr as createMeasurementToolsStore,
|
|
3887
3927
|
ye as formatterTypes,
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3928
|
+
Go as getCentroid,
|
|
3929
|
+
Pn as getCursorDefault,
|
|
3930
|
+
bo as getDeckController,
|
|
3931
|
+
wo as getFilterValues,
|
|
3932
|
+
cr as getLassoToolsLayer,
|
|
3933
|
+
Lr as getMeasurementToolsLayer,
|
|
3893
3934
|
Ae as getTextLayerFormattedDistance,
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3935
|
+
On as getTooltipDefault,
|
|
3936
|
+
zo as mappingLegendMeridian,
|
|
3937
|
+
Zo as objectToHtml,
|
|
3938
|
+
$t as sortLayers,
|
|
3939
|
+
Nn as transitionFlyConfig,
|
|
3940
|
+
Mo as useAggregations,
|
|
3941
|
+
Eo as useCategories,
|
|
3942
|
+
Ct as useEventManager,
|
|
3943
|
+
Lo as useFeatures,
|
|
3944
|
+
hs as useFilters,
|
|
3945
|
+
Co as useFormula,
|
|
3946
|
+
Oo as useHistogram,
|
|
3947
|
+
Cs as useLassoToolsSpatialFilter,
|
|
3907
3948
|
K as useLassoToolsState,
|
|
3908
3949
|
Se as useLayerStore,
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3950
|
+
Gr as useLayers,
|
|
3951
|
+
Io as useLegend,
|
|
3952
|
+
Ho as useMapScreenshot,
|
|
3912
3953
|
x as useMapStore,
|
|
3913
3954
|
z as useMeasurementToolsState,
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3955
|
+
Fo as useRange,
|
|
3956
|
+
Ro as useScatter,
|
|
3957
|
+
ys as useSource,
|
|
3958
|
+
Pe as useSourceStore,
|
|
3959
|
+
vo as useSourceWithFilters,
|
|
3960
|
+
No as useSpatialFilter,
|
|
3961
|
+
Ko as useStats,
|
|
3962
|
+
$o as useTable,
|
|
3963
|
+
Vo as useTimeSeries,
|
|
3964
|
+
ks as useViewportSpatialFilter,
|
|
3965
|
+
Ms as useWidgetModel
|
|
3925
3966
|
};
|
|
3926
3967
|
//# sourceMappingURL=index.js.map
|