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