@macrostrat/map-interface 1.0.8 → 1.0.9

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/main.cjs ADDED
@@ -0,0 +1,1917 @@
1
+ require("./main.css");
2
+ var $9B3TU$react = require("react");
3
+ var $9B3TU$blueprintjscore = require("@blueprintjs/core");
4
+ var $9B3TU$macrostrathyper = require("@macrostrat/hyper");
5
+ var $9B3TU$macrostratmapboxreact = require("@macrostrat/mapbox-react");
6
+ var $9B3TU$classnames = require("classnames");
7
+ var $9B3TU$macrostratuicomponents = require("@macrostrat/ui-components");
8
+ var $9B3TU$macrostratmapboxutils = require("@macrostrat/mapbox-utils");
9
+ var $9B3TU$d3format = require("d3-format");
10
+ var $9B3TU$mapboxgl = require("mapbox-gl");
11
+ var $9B3TU$macrostratcolorutils = require("@macrostrat/color-utils");
12
+ var $9B3TU$transitionhook = require("transition-hook");
13
+ var $9B3TU$underscore = require("underscore");
14
+ var $9B3TU$useresizeobserver = require("use-resize-observer");
15
+ require("mapbox-gl/dist/mapbox-gl.css");
16
+ var $9B3TU$mapboxtilebelt = require("@mapbox/tilebelt");
17
+ var $9B3TU$d3array = require("d3-array");
18
+
19
+
20
+ function $parcel$exportWildcard(dest, source) {
21
+ Object.keys(source).forEach(function(key) {
22
+ if (key === 'default' || key === '__esModule' || Object.prototype.hasOwnProperty.call(dest, key)) {
23
+ return;
24
+ }
25
+
26
+ Object.defineProperty(dest, key, {
27
+ enumerable: true,
28
+ get: function get() {
29
+ return source[key];
30
+ }
31
+ });
32
+ });
33
+
34
+ return dest;
35
+ }
36
+
37
+ function $parcel$interopDefault(a) {
38
+ return a && a.__esModule ? a.default : a;
39
+ }
40
+
41
+ function $parcel$export(e, n, v, s) {
42
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
43
+ }
44
+ var $fce5fc950d1fe35b$exports = {};
45
+
46
+ $parcel$export($fce5fc950d1fe35b$exports, "LoadingButton", () => $fce5fc950d1fe35b$export$4ec83e90d030b2f3);
47
+ $parcel$export($fce5fc950d1fe35b$exports, "MapLoadingButton", () => $fce5fc950d1fe35b$export$9e3bae3c08bde368);
48
+ $parcel$export($fce5fc950d1fe35b$exports, "FloatingNavbar", () => $fce5fc950d1fe35b$export$a8cc0062d02a3841);
49
+
50
+
51
+
52
+ var $7a1b0f72a2e7f87d$exports = {};
53
+
54
+ $parcel$export($7a1b0f72a2e7f87d$exports, "loading-button", () => $7a1b0f72a2e7f87d$export$fcaa8d3bc8e9cf1e, (v) => $7a1b0f72a2e7f87d$export$fcaa8d3bc8e9cf1e = v);
55
+ $parcel$export($7a1b0f72a2e7f87d$exports, "navbar-holder", () => $7a1b0f72a2e7f87d$export$d8779dd86528d602, (v) => $7a1b0f72a2e7f87d$export$d8779dd86528d602 = v);
56
+ $parcel$export($7a1b0f72a2e7f87d$exports, "searchbar", () => $7a1b0f72a2e7f87d$export$2ac23befe9d406ee, (v) => $7a1b0f72a2e7f87d$export$2ac23befe9d406ee = v);
57
+ $parcel$export($7a1b0f72a2e7f87d$exports, "searchbar-holder", () => $7a1b0f72a2e7f87d$export$3a39e67bbbcbd4ae, (v) => $7a1b0f72a2e7f87d$export$3a39e67bbbcbd4ae = v);
58
+ $parcel$export($7a1b0f72a2e7f87d$exports, "status-tongue", () => $7a1b0f72a2e7f87d$export$764ade2d69041360, (v) => $7a1b0f72a2e7f87d$export$764ade2d69041360 = v);
59
+ var $7a1b0f72a2e7f87d$export$fcaa8d3bc8e9cf1e;
60
+ var $7a1b0f72a2e7f87d$export$d8779dd86528d602;
61
+ var $7a1b0f72a2e7f87d$export$2ac23befe9d406ee;
62
+ var $7a1b0f72a2e7f87d$export$3a39e67bbbcbd4ae;
63
+ var $7a1b0f72a2e7f87d$export$764ade2d69041360;
64
+ $7a1b0f72a2e7f87d$export$fcaa8d3bc8e9cf1e = `_8hZKsW_loading-button`;
65
+ $7a1b0f72a2e7f87d$export$d8779dd86528d602 = `_8hZKsW_navbar-holder`;
66
+ $7a1b0f72a2e7f87d$export$2ac23befe9d406ee = `_8hZKsW_searchbar`;
67
+ $7a1b0f72a2e7f87d$export$3a39e67bbbcbd4ae = `_8hZKsW_searchbar-holder`;
68
+ $7a1b0f72a2e7f87d$export$764ade2d69041360 = `_8hZKsW_status-tongue`;
69
+
70
+
71
+
72
+ const $fce5fc950d1fe35b$var$h = (0, ($parcel$interopDefault($9B3TU$macrostrathyper))).styled((0, (/*@__PURE__*/$parcel$interopDefault($7a1b0f72a2e7f87d$exports))));
73
+ const $fce5fc950d1fe35b$var$spinnerElement = $fce5fc950d1fe35b$var$h((0, $9B3TU$blueprintjscore.Spinner), {
74
+ size: 16
75
+ });
76
+ function $fce5fc950d1fe35b$export$4ec83e90d030b2f3({ isLoading: isLoading = false, onClick: onClick, active: active = false, icon: icon = "menu" }) {
77
+ return $fce5fc950d1fe35b$var$h((0, $9B3TU$blueprintjscore.Button), {
78
+ className: "loading-button",
79
+ icon: isLoading ? $fce5fc950d1fe35b$var$spinnerElement : icon,
80
+ large: false,
81
+ minimal: true,
82
+ onClick: onClick,
83
+ active: active && !isLoading
84
+ });
85
+ }
86
+ function $fce5fc950d1fe35b$export$9e3bae3c08bde368(props) {
87
+ const { isLoading: isLoading } = (0, $9B3TU$macrostratmapboxreact.useMapStatus)();
88
+ const mapIsLoading = (0, $9B3TU$react.useMemo)(()=>isLoading, [
89
+ isLoading
90
+ ]);
91
+ return $fce5fc950d1fe35b$var$h($fce5fc950d1fe35b$export$4ec83e90d030b2f3, {
92
+ ...props,
93
+ isLoading: mapIsLoading
94
+ });
95
+ }
96
+ function $fce5fc950d1fe35b$export$a8cc0062d02a3841({ className: className, children: children, statusElement: statusElement = null }) {
97
+ return $fce5fc950d1fe35b$var$h("div.searchbar-holder", {
98
+ className: className
99
+ }, [
100
+ $fce5fc950d1fe35b$var$h("div.navbar-holder", [
101
+ $fce5fc950d1fe35b$var$h((0, $9B3TU$blueprintjscore.Navbar), {
102
+ className: "searchbar panel"
103
+ }, children)
104
+ ]),
105
+ $fce5fc950d1fe35b$var$h.if(statusElement != null)((0, $9B3TU$blueprintjscore.Card), {
106
+ className: "status-tongue"
107
+ }, statusElement)
108
+ ]);
109
+ }
110
+
111
+
112
+ var $2bc7c1e4e7da7fdf$exports = {};
113
+
114
+ $parcel$export($2bc7c1e4e7da7fdf$exports, "InfoDrawerContainer", () => $2bc7c1e4e7da7fdf$export$83f9a19cf91c2d06);
115
+ $parcel$export($2bc7c1e4e7da7fdf$exports, "BaseInfoDrawer", () => $2bc7c1e4e7da7fdf$export$a5ddcc2a88716895);
116
+ $parcel$export($2bc7c1e4e7da7fdf$exports, "LocationPanel", () => $2bc7c1e4e7da7fdf$export$aa4baff5242ea6e1);
117
+
118
+
119
+
120
+
121
+ var $a8d7c4c397e52cf6$exports = {};
122
+
123
+ $parcel$export($a8d7c4c397e52cf6$exports, "copy-link-button", () => $a8d7c4c397e52cf6$export$d1352d0c31a65024, (v) => $a8d7c4c397e52cf6$export$d1352d0c31a65024 = v);
124
+ $parcel$export($a8d7c4c397e52cf6$exports, "infodrawer", () => $a8d7c4c397e52cf6$export$b5017f7ff265217d, (v) => $a8d7c4c397e52cf6$export$b5017f7ff265217d = v);
125
+ $parcel$export($a8d7c4c397e52cf6$exports, "infodrawer-body", () => $a8d7c4c397e52cf6$export$310e8f86a84c074f, (v) => $a8d7c4c397e52cf6$export$310e8f86a84c074f = v);
126
+ $parcel$export($a8d7c4c397e52cf6$exports, "infodrawer-contents", () => $a8d7c4c397e52cf6$export$69ed3ba502fbf15b, (v) => $a8d7c4c397e52cf6$export$69ed3ba502fbf15b = v);
127
+ $parcel$export($a8d7c4c397e52cf6$exports, "infodrawer-header-item", () => $a8d7c4c397e52cf6$export$333d72514239bce8, (v) => $a8d7c4c397e52cf6$export$333d72514239bce8 = v);
128
+ $parcel$export($a8d7c4c397e52cf6$exports, "left-icon", () => $a8d7c4c397e52cf6$export$f750577db09821ce, (v) => $a8d7c4c397e52cf6$export$f750577db09821ce = v);
129
+ $parcel$export($a8d7c4c397e52cf6$exports, "loading", () => $a8d7c4c397e52cf6$export$46c1c92549715335, (v) => $a8d7c4c397e52cf6$export$46c1c92549715335 = v);
130
+ $parcel$export($a8d7c4c397e52cf6$exports, "location-panel-header", () => $a8d7c4c397e52cf6$export$d821beb98a87c6d7, (v) => $a8d7c4c397e52cf6$export$d821beb98a87c6d7 = v);
131
+ $parcel$export($a8d7c4c397e52cf6$exports, "position-controls", () => $a8d7c4c397e52cf6$export$dfae07a3bf0fbd6, (v) => $a8d7c4c397e52cf6$export$dfae07a3bf0fbd6 = v);
132
+ $parcel$export($a8d7c4c397e52cf6$exports, "spacer", () => $a8d7c4c397e52cf6$export$8cc075c801fd6817, (v) => $a8d7c4c397e52cf6$export$8cc075c801fd6817 = v);
133
+ var $a8d7c4c397e52cf6$export$d1352d0c31a65024;
134
+ var $a8d7c4c397e52cf6$export$b5017f7ff265217d;
135
+ var $a8d7c4c397e52cf6$export$310e8f86a84c074f;
136
+ var $a8d7c4c397e52cf6$export$69ed3ba502fbf15b;
137
+ var $a8d7c4c397e52cf6$export$333d72514239bce8;
138
+ var $a8d7c4c397e52cf6$export$f750577db09821ce;
139
+ var $a8d7c4c397e52cf6$export$46c1c92549715335;
140
+ var $a8d7c4c397e52cf6$export$d821beb98a87c6d7;
141
+ var $a8d7c4c397e52cf6$export$dfae07a3bf0fbd6;
142
+ var $a8d7c4c397e52cf6$export$8cc075c801fd6817;
143
+ $a8d7c4c397e52cf6$export$d1352d0c31a65024 = `VPa3-W_copy-link-button`;
144
+ $a8d7c4c397e52cf6$export$b5017f7ff265217d = `VPa3-W_infodrawer`;
145
+ $a8d7c4c397e52cf6$export$310e8f86a84c074f = `VPa3-W_infodrawer-body`;
146
+ $a8d7c4c397e52cf6$export$69ed3ba502fbf15b = `VPa3-W_infodrawer-contents`;
147
+ $a8d7c4c397e52cf6$export$333d72514239bce8 = `VPa3-W_infodrawer-header-item`;
148
+ $a8d7c4c397e52cf6$export$f750577db09821ce = `VPa3-W_left-icon`;
149
+ $a8d7c4c397e52cf6$export$46c1c92549715335 = `VPa3-W_loading`;
150
+ $a8d7c4c397e52cf6$export$d821beb98a87c6d7 = `VPa3-W_location-panel-header`;
151
+ $a8d7c4c397e52cf6$export$dfae07a3bf0fbd6 = `VPa3-W_position-controls`;
152
+ $a8d7c4c397e52cf6$export$8cc075c801fd6817 = `VPa3-W_spacer`;
153
+
154
+
155
+
156
+ var $860d9939f7032c69$exports = {};
157
+
158
+ $parcel$export($860d9939f7032c69$exports, "ValueWithUnit", () => $860d9939f7032c69$export$716098b85fd0efdf);
159
+ $parcel$export($860d9939f7032c69$exports, "DegreeCoord", () => $860d9939f7032c69$export$af8082af0bea3eb1);
160
+ $parcel$export($860d9939f7032c69$exports, "LngLatCoords", () => $860d9939f7032c69$export$f195b3550849e560);
161
+ $parcel$export($860d9939f7032c69$exports, "Elevation", () => $860d9939f7032c69$export$58bfb4f6ec5aa58d);
162
+
163
+
164
+
165
+ const $bf943af2b72f182b$export$97c1b10e131a836d = (0, $9B3TU$d3format.format)(".4~f");
166
+ const $bf943af2b72f182b$export$b1cb0f7fb990b3ea = (0, $9B3TU$d3format.format)(".3~f");
167
+ const $bf943af2b72f182b$export$4c173b1b2f78faf7 = (0, $9B3TU$d3format.format)(".2~f");
168
+ const $bf943af2b72f182b$export$e54bbd2c33d17485 = (0, $9B3TU$d3format.format)(".1~f");
169
+ const $bf943af2b72f182b$export$bc135f63e2f56fd4 = (0, $9B3TU$d3format.format)(".0f");
170
+ function $bf943af2b72f182b$export$7c4d25c0c3217d8c(val, precision = 0) {
171
+ switch(precision){
172
+ case 4:
173
+ return $bf943af2b72f182b$export$97c1b10e131a836d(val);
174
+ case 3:
175
+ return $bf943af2b72f182b$export$b1cb0f7fb990b3ea(val);
176
+ case 2:
177
+ return $bf943af2b72f182b$export$4c173b1b2f78faf7(val);
178
+ case 1:
179
+ return $bf943af2b72f182b$export$e54bbd2c33d17485(val);
180
+ case 0:
181
+ return $bf943af2b72f182b$export$bc135f63e2f56fd4(val);
182
+ default:
183
+ return $bf943af2b72f182b$export$97c1b10e131a836d(val);
184
+ }
185
+ }
186
+
187
+
188
+ var $370ea7ef3413c03a$exports = {};
189
+
190
+ $parcel$export($370ea7ef3413c03a$exports, "applyMapPositionToHash", () => $370ea7ef3413c03a$export$8391d1abb505ffb3);
191
+ $parcel$export($370ea7ef3413c03a$exports, "getMapPositionForHash", () => $370ea7ef3413c03a$export$80abf1cbcc3918e4);
192
+
193
+
194
+ function $370ea7ef3413c03a$export$8391d1abb505ffb3(args, mapPosition) {
195
+ const pos = mapPosition?.camera;
196
+ if (pos == null) return;
197
+ const zoom = mapPosition.target?.zoom;
198
+ args.x = (0, $9B3TU$macrostratmapboxutils.formatCoordForZoomLevel)(pos.lng, zoom);
199
+ args.y = (0, $9B3TU$macrostratmapboxutils.formatCoordForZoomLevel)(pos.lat, zoom);
200
+ if (pos.bearing == 0 && pos.pitch == 0 && zoom != null) args.z = (0, $bf943af2b72f182b$export$e54bbd2c33d17485)(zoom);
201
+ else if (pos.altitude != null) {
202
+ if (pos.altitude > 5000) args.z = (0, $bf943af2b72f182b$export$4c173b1b2f78faf7)(pos.altitude / 1000) + "km";
203
+ else args.z = (0, $bf943af2b72f182b$export$bc135f63e2f56fd4)(pos.altitude) + "m";
204
+ }
205
+ if (pos.bearing != 0) {
206
+ let az = pos.bearing;
207
+ if (az < 0) az += 360;
208
+ args.a = (0, $bf943af2b72f182b$export$bc135f63e2f56fd4)(az);
209
+ }
210
+ if (pos.pitch != 0) args.e = (0, $bf943af2b72f182b$export$bc135f63e2f56fd4)(pos.pitch);
211
+ }
212
+ function $370ea7ef3413c03a$var$_fmt(x) {
213
+ if (Array.isArray(x)) x = x[0];
214
+ return parseFloat(x.toString());
215
+ }
216
+ function $370ea7ef3413c03a$export$80abf1cbcc3918e4(hashData, centerPosition) {
217
+ const { x: x = centerPosition?.lng ?? 0, y: y = centerPosition?.lat ?? 0, z: // Different default for zoom depending on whether we have a marker
218
+ z = centerPosition != null ? 7 : 2, a: a = 0, e: e = 0 } = hashData;
219
+ const lng = $370ea7ef3413c03a$var$_fmt(x);
220
+ const lat = $370ea7ef3413c03a$var$_fmt(y);
221
+ let altitude = null;
222
+ let zoom = null;
223
+ const _z = z.toString();
224
+ if (_z.endsWith("km")) altitude = $370ea7ef3413c03a$var$_fmt(_z.substring(0, _z.length - 2)) * 1000;
225
+ else if (_z.endsWith("m")) altitude = $370ea7ef3413c03a$var$_fmt(_z.substring(0, _z.length - 1));
226
+ else zoom = $370ea7ef3413c03a$var$_fmt(z);
227
+ const bearing = $370ea7ef3413c03a$var$_fmt(a);
228
+ const pitch = $370ea7ef3413c03a$var$_fmt(e);
229
+ let target = undefined;
230
+ if (bearing == 0 && pitch == 0 && zoom != null) target = {
231
+ lat: lat,
232
+ lng: lng,
233
+ zoom: zoom
234
+ };
235
+ return {
236
+ camera: {
237
+ lng: $370ea7ef3413c03a$var$_fmt(x),
238
+ lat: $370ea7ef3413c03a$var$_fmt(y),
239
+ altitude: altitude,
240
+ bearing: $370ea7ef3413c03a$var$_fmt(a),
241
+ pitch: $370ea7ef3413c03a$var$_fmt(e)
242
+ },
243
+ target: target
244
+ };
245
+ }
246
+
247
+
248
+ function $860d9939f7032c69$export$716098b85fd0efdf(props) {
249
+ const { value: value, unit: unit } = props;
250
+ return (0, ($parcel$interopDefault($9B3TU$macrostrathyper)))("span.value-with-unit", [
251
+ (0, ($parcel$interopDefault($9B3TU$macrostrathyper)))("span.value", [
252
+ value
253
+ ]),
254
+ (0, ($parcel$interopDefault($9B3TU$macrostrathyper)))("span.spacer", [
255
+ " "
256
+ ]),
257
+ (0, ($parcel$interopDefault($9B3TU$macrostrathyper)))("span.unit", [
258
+ unit
259
+ ])
260
+ ]);
261
+ }
262
+ function $860d9939f7032c69$export$af8082af0bea3eb1(props) {
263
+ const { value: value, labels: labels, precision: precision = 3, format: format = (0, $bf943af2b72f182b$export$7c4d25c0c3217d8c) } = props;
264
+ const direction = value < 0 ? labels[1] : labels[0];
265
+ return (0, ($parcel$interopDefault($9B3TU$macrostrathyper)))($860d9939f7032c69$export$716098b85fd0efdf, {
266
+ value: format(Math.abs(value), precision) + "\xb0",
267
+ unit: direction
268
+ });
269
+ }
270
+ function $860d9939f7032c69$export$f195b3550849e560(props) {
271
+ /** Formatted geographic coordinates */ const { position: position, className: className, precision: precision, zoom: zoom } = props;
272
+ let { format: format } = props;
273
+ if (position == null) return null;
274
+ let lat, lng;
275
+ if (Array.isArray(position)) [lng, lat] = position;
276
+ else ({ lat: lat, lng: lng } = position);
277
+ if (zoom != null && format == null && precision == null) format = (val, _)=>(0, $9B3TU$macrostratmapboxutils.formatCoordForZoomLevel)(val, zoom);
278
+ return (0, ($parcel$interopDefault($9B3TU$macrostrathyper)))("div.lnglat-container", {
279
+ className: className
280
+ }, [
281
+ (0, ($parcel$interopDefault($9B3TU$macrostrathyper)))("span.lnglat", [
282
+ (0, ($parcel$interopDefault($9B3TU$macrostrathyper)))($860d9939f7032c69$export$af8082af0bea3eb1, {
283
+ value: lat,
284
+ labels: [
285
+ "N",
286
+ "S"
287
+ ],
288
+ precision: precision,
289
+ format: format
290
+ }),
291
+ ", ",
292
+ (0, ($parcel$interopDefault($9B3TU$macrostrathyper)))($860d9939f7032c69$export$af8082af0bea3eb1, {
293
+ value: (0, $9B3TU$macrostratmapboxutils.normalizeLng)(lng),
294
+ labels: [
295
+ "E",
296
+ "W"
297
+ ],
298
+ precision: precision,
299
+ format: format
300
+ })
301
+ ])
302
+ ]);
303
+ }
304
+ function $860d9939f7032c69$export$58bfb4f6ec5aa58d(props) {
305
+ /** Renders an elevation value in meters and a parenthetical conversion to feet. */ const { elevation: elevation, className: className, includeFeet: includeFeet = true } = props;
306
+ if (elevation == null) return null;
307
+ return (0, ($parcel$interopDefault($9B3TU$macrostrathyper)))("div.elevation", {
308
+ className: className
309
+ }, [
310
+ (0, ($parcel$interopDefault($9B3TU$macrostrathyper)))($860d9939f7032c69$export$716098b85fd0efdf, {
311
+ value: elevation,
312
+ unit: "m"
313
+ }),
314
+ (0, ($parcel$interopDefault($9B3TU$macrostrathyper))).if(includeFeet)("span.secondary", [
315
+ " (",
316
+ (0, ($parcel$interopDefault($9B3TU$macrostrathyper)))($860d9939f7032c69$export$716098b85fd0efdf, {
317
+ value: (0, $9B3TU$macrostratmapboxutils.metersToFeet)(elevation),
318
+ unit: "ft"
319
+ }),
320
+ ")"
321
+ ])
322
+ ]);
323
+ }
324
+ $parcel$exportWildcard($860d9939f7032c69$exports, $370ea7ef3413c03a$exports);
325
+
326
+
327
+
328
+ const $548387e5996cdbbd$var$h = (0, ($parcel$interopDefault($9B3TU$macrostrathyper))).styled((0, (/*@__PURE__*/$parcel$interopDefault($a8d7c4c397e52cf6$exports))));
329
+ function $548387e5996cdbbd$var$PositionButton({ position: position, showCopyLink: showCopyLink = false }) {
330
+ const focusState = (0, $9B3TU$macrostratmapboxreact.useFocusState)(position);
331
+ const copyLinkIsVisible = (0, $9B3TU$macrostratmapboxreact.isCentered)(focusState) && showCopyLink;
332
+ return $548387e5996cdbbd$var$h("div.position-controls", [
333
+ $548387e5996cdbbd$var$h((0, $9B3TU$macrostratmapboxreact.LocationFocusButton), {
334
+ location: position,
335
+ focusState: focusState
336
+ }, []),
337
+ $548387e5996cdbbd$var$h.if(copyLinkIsVisible)($548387e5996cdbbd$var$CopyLinkButton, {
338
+ itemName: "position"
339
+ })
340
+ ]);
341
+ }
342
+ function $548387e5996cdbbd$var$CopyLinkButton({ itemName: itemName, children: children, onClick: onClick, ...rest }) {
343
+ const toaster = (0, $9B3TU$macrostratuicomponents.useToaster)();
344
+ let message = `Copied link`;
345
+ if (itemName != null) message += ` to ${itemName}`;
346
+ message += "!";
347
+ return $548387e5996cdbbd$var$h((0, $9B3TU$blueprintjscore.Button), {
348
+ className: "copy-link-button",
349
+ rightIcon: $548387e5996cdbbd$var$h((0, $9B3TU$blueprintjscore.Icon), {
350
+ icon: "link",
351
+ size: 12
352
+ }),
353
+ minimal: true,
354
+ small: true,
355
+ onClick () {
356
+ navigator.clipboard.writeText(window.location.href).then(()=>{
357
+ toaster?.show({
358
+ message: message,
359
+ intent: "success",
360
+ icon: "clipboard",
361
+ timeout: 1000
362
+ });
363
+ onClick?.();
364
+ }, ()=>{
365
+ toaster?.show({
366
+ message: "Failed to copy link",
367
+ intent: "danger",
368
+ icon: "error",
369
+ timeout: 1000
370
+ });
371
+ });
372
+ },
373
+ ...rest
374
+ }, children ?? "Copy link");
375
+ }
376
+ function $548387e5996cdbbd$export$e9ff14c4822c2e8c(props) {
377
+ const { onClose: onClose, position: position, zoom: zoom = 7, elevation: elevation, showCopyPositionButton: showCopyPositionButton } = props;
378
+ return $548387e5996cdbbd$var$h("header.location-panel-header", [
379
+ $548387e5996cdbbd$var$h($548387e5996cdbbd$var$PositionButton, {
380
+ position: position,
381
+ showCopyLink: showCopyPositionButton
382
+ }),
383
+ $548387e5996cdbbd$var$h("div.spacer"),
384
+ $548387e5996cdbbd$var$h((0, $860d9939f7032c69$export$f195b3550849e560), {
385
+ position: position,
386
+ zoom: zoom,
387
+ className: "infodrawer-header-item"
388
+ }),
389
+ $548387e5996cdbbd$var$h.if(elevation != null)((0, $860d9939f7032c69$export$58bfb4f6ec5aa58d), {
390
+ elevation: elevation,
391
+ className: "infodrawer-header-item"
392
+ }),
393
+ $548387e5996cdbbd$var$h((0, $9B3TU$blueprintjscore.Button), {
394
+ minimal: true,
395
+ icon: "cross",
396
+ onClick: onClose
397
+ })
398
+ ]);
399
+ }
400
+
401
+
402
+
403
+
404
+
405
+ const $2bc7c1e4e7da7fdf$var$h = (0, ($parcel$interopDefault($9B3TU$macrostrathyper))).styled((0, (/*@__PURE__*/$parcel$interopDefault($a8d7c4c397e52cf6$exports))));
406
+ function $2bc7c1e4e7da7fdf$export$83f9a19cf91c2d06(props) {
407
+ const className = (0, ($parcel$interopDefault($9B3TU$classnames)))("infodrawer", props.className);
408
+ return $2bc7c1e4e7da7fdf$var$h((0, $9B3TU$blueprintjscore.Card), {
409
+ ...props,
410
+ className: className
411
+ });
412
+ }
413
+ function $2bc7c1e4e7da7fdf$export$a5ddcc2a88716895(props) {
414
+ const { className: className, headerElement: headerElement = null, title: title, onClose: onClose, children: children, ...rest } = props;
415
+ const header = headerElement ?? $2bc7c1e4e7da7fdf$var$h((0, $548387e5996cdbbd$export$e9ff14c4822c2e8c), {
416
+ onClose: onClose,
417
+ ...rest
418
+ }, [
419
+ title == null ? null : $2bc7c1e4e7da7fdf$var$h("h3", [
420
+ title
421
+ ])
422
+ ]);
423
+ return $2bc7c1e4e7da7fdf$var$h($2bc7c1e4e7da7fdf$export$83f9a19cf91c2d06, {
424
+ className: className
425
+ }, [
426
+ header,
427
+ $2bc7c1e4e7da7fdf$var$h("div.infodrawer-body", $2bc7c1e4e7da7fdf$var$h("div.infodrawer-contents", $2bc7c1e4e7da7fdf$var$h((0, $9B3TU$macrostratuicomponents.ErrorBoundary), null, children)))
428
+ ]);
429
+ }
430
+ function $2bc7c1e4e7da7fdf$export$aa4baff5242ea6e1(props) {
431
+ const { children: children, className: className, loading: loading = false, ...rest } = props;
432
+ const cls = (0, ($parcel$interopDefault($9B3TU$classnames)))("location-panel", className, {
433
+ loading: loading
434
+ });
435
+ return $2bc7c1e4e7da7fdf$var$h($2bc7c1e4e7da7fdf$export$a5ddcc2a88716895, {
436
+ className: cls,
437
+ ...rest
438
+ }, children);
439
+ }
440
+
441
+
442
+ var $9acbb47bf7cb7660$exports = {};
443
+ var $6f5ca387ac26c0b5$exports = {};
444
+
445
+ $parcel$export($6f5ca387ac26c0b5$exports, "h", () => $6f5ca387ac26c0b5$export$dda1d9f60106f0e9);
446
+ $parcel$export($6f5ca387ac26c0b5$exports, "MapInspector", () => $6f5ca387ac26c0b5$export$c5febf3ae8816972);
447
+ $parcel$export($6f5ca387ac26c0b5$exports, "DevMapPage", () => $6f5ca387ac26c0b5$export$2391061fbdfb71ef);
448
+ // Import other components
449
+
450
+
451
+
452
+
453
+
454
+ var $8646508ae99a5857$exports = {};
455
+
456
+ $parcel$export($8646508ae99a5857$exports, "buildXRayStyle", () => $8646508ae99a5857$export$eff5fb2e10d05b1d);
457
+ $parcel$export($8646508ae99a5857$exports, "buildInspectorStyle", () => $8646508ae99a5857$export$e739dc8dfc0db9a6);
458
+
459
+
460
+ async function $8646508ae99a5857$export$eff5fb2e10d05b1d(baseStyle, params = null) {
461
+ const { inDarkMode: inDarkMode = false, color: color = "rgb(74, 242, 161)", mapboxToken: mapboxToken, xRaySources: xRaySources } = params;
462
+ const style = await (0, $9B3TU$macrostratmapboxutils.getMapboxStyle)(baseStyle, {
463
+ access_token: mapboxToken
464
+ });
465
+ const sources = xRaySources ?? Object.keys(style.sources);
466
+ let layers = [];
467
+ for (let layer of style.layers){
468
+ if (!sources.includes(layer.source)) {
469
+ layers.push(layer);
470
+ continue;
471
+ }
472
+ let newLayer = $8646508ae99a5857$var$transformMapboxLayer(layer, color, inDarkMode);
473
+ if (newLayer != null) layers.push(newLayer);
474
+ }
475
+ return {
476
+ ...style,
477
+ layers: layers
478
+ };
479
+ }
480
+ function $8646508ae99a5857$var$transformMapboxLayer(layer, color, inDarkMode) {
481
+ const c = (0, $9B3TU$macrostratcolorutils.asChromaColor)(color);
482
+ const xRayColor = (opacity = 1, darken = 0)=>{
483
+ if (!inDarkMode) return (0, $9B3TU$macrostratcolorutils.toRGBAString)(c.darken(2 - darken).alpha(opacity));
484
+ return (0, $9B3TU$macrostratcolorutils.toRGBAString)(c.alpha(opacity).darken(darken));
485
+ };
486
+ if (layer.type == "background") return null;
487
+ let newLayer = {
488
+ ...layer
489
+ };
490
+ console.log(xRayColor(0.5));
491
+ if (layer.type == "fill") newLayer.paint = {
492
+ "fill-color": xRayColor(0.1),
493
+ "fill-outline-color": xRayColor(0.5)
494
+ };
495
+ else if (layer.type == "line") newLayer.paint = {
496
+ "line-color": xRayColor(0.5, 0),
497
+ "line-width": 1.5
498
+ };
499
+ else if (layer.type == "symbol") newLayer.paint = {
500
+ "text-color": xRayColor(1, -0.5),
501
+ "text-halo-color": "#000"
502
+ };
503
+ else if (layer.type == "circle") newLayer.paint = {
504
+ "circle-color": xRayColor(0.5, 0),
505
+ "circle-stroke-color": xRayColor(0.5, 1),
506
+ "circle-radius": 2
507
+ };
508
+ return newLayer;
509
+ }
510
+ async function $8646508ae99a5857$export$e739dc8dfc0db9a6(baseStyle, overlayStyle = null, params = {}) {
511
+ const { mapboxToken: mapboxToken, xRay: xRay = false, xRaySources: _xRaySources, ...rest } = params;
512
+ let xRaySources = _xRaySources;
513
+ let style = await (0, $9B3TU$macrostratmapboxutils.getMapboxStyle)(baseStyle, {
514
+ access_token: mapboxToken
515
+ });
516
+ if (overlayStyle != null) {
517
+ const overlay = await (0, $9B3TU$macrostratmapboxutils.getMapboxStyle)(overlayStyle, {
518
+ access_token: mapboxToken
519
+ });
520
+ style = (0, $9B3TU$macrostratmapboxutils.mergeStyles)(style, overlay);
521
+ xRaySources ??= Object.keys(overlay.sources);
522
+ }
523
+ if (xRay) {
524
+ // If we haven't specified sources, then we'll use all of them
525
+ xRaySources ??= Object.keys(style.sources);
526
+ style = await $8646508ae99a5857$export$eff5fb2e10d05b1d(style, {
527
+ ...rest,
528
+ mapboxToken: mapboxToken,
529
+ xRaySources: xRaySources
530
+ });
531
+ }
532
+ return style;
533
+ }
534
+
535
+
536
+ var $c3311f59335df34d$exports = {};
537
+
538
+ $parcel$export($c3311f59335df34d$exports, "PanelCard", () => $c3311f59335df34d$export$ec68dd77edbe678b);
539
+ $parcel$export($c3311f59335df34d$exports, "DetailPanelStyle", () => $c3311f59335df34d$export$612ca936d3ed4784);
540
+ $parcel$export($c3311f59335df34d$exports, "MapStyledContainer", () => $c3311f59335df34d$export$fa395a37c3898ae3);
541
+ $parcel$export($c3311f59335df34d$exports, "MapAreaContainer", () => $c3311f59335df34d$export$9fa5da0bcfd0a290);
542
+
543
+ var $35f1bc0112883d51$exports = {};
544
+
545
+ $parcel$export($35f1bc0112883d51$exports, "map-container", () => $35f1bc0112883d51$export$d7f2c44afcf5df56, (v) => $35f1bc0112883d51$export$d7f2c44afcf5df56 = v);
546
+ $parcel$export($35f1bc0112883d51$exports, "show-panel-outlines", () => $35f1bc0112883d51$export$e163bcc0a29d66c, (v) => $35f1bc0112883d51$export$e163bcc0a29d66c = v);
547
+ $parcel$export($35f1bc0112883d51$exports, "map-view-container", () => $35f1bc0112883d51$export$11aa7dc57218208d, (v) => $35f1bc0112883d51$export$11aa7dc57218208d = v);
548
+ $parcel$export($35f1bc0112883d51$exports, "fit-viewport", () => $35f1bc0112883d51$export$2a73fca7b70dce31, (v) => $35f1bc0112883d51$export$2a73fca7b70dce31 = v);
549
+ $parcel$export($35f1bc0112883d51$exports, "compass-control", () => $35f1bc0112883d51$export$cc73204c64cc0950, (v) => $35f1bc0112883d51$export$cc73204c64cc0950 = v);
550
+ $parcel$export($35f1bc0112883d51$exports, "map-is-rotated", () => $35f1bc0112883d51$export$d2972e7dfac51dc2, (v) => $35f1bc0112883d51$export$d2972e7dfac51dc2 = v);
551
+ $parcel$export($35f1bc0112883d51$exports, "map-3d-control", () => $35f1bc0112883d51$export$142b9410c523ef40, (v) => $35f1bc0112883d51$export$142b9410c523ef40 = v);
552
+ $parcel$export($35f1bc0112883d51$exports, "map-3d-available", () => $35f1bc0112883d51$export$6bc2d6545947abbc, (v) => $35f1bc0112883d51$export$6bc2d6545947abbc = v);
553
+ $parcel$export($35f1bc0112883d51$exports, "globe-control", () => $35f1bc0112883d51$export$b06313b17bd37b68, (v) => $35f1bc0112883d51$export$b06313b17bd37b68 = v);
554
+ $parcel$export($35f1bc0112883d51$exports, "map-is-global", () => $35f1bc0112883d51$export$ea9cfbb56edd0e47, (v) => $35f1bc0112883d51$export$ea9cfbb56edd0e47 = v);
555
+ $parcel$export($35f1bc0112883d51$exports, "detail-panel-open", () => $35f1bc0112883d51$export$62a60ea2feb29c53, (v) => $35f1bc0112883d51$export$62a60ea2feb29c53 = v);
556
+ $parcel$export($35f1bc0112883d51$exports, "zoom-control", () => $35f1bc0112883d51$export$61e54aa1efb913ad, (v) => $35f1bc0112883d51$export$61e54aa1efb913ad = v);
557
+ $parcel$export($35f1bc0112883d51$exports, "detail-panel-fixed", () => $35f1bc0112883d51$export$4a4f34b86d8e6504, (v) => $35f1bc0112883d51$export$4a4f34b86d8e6504 = v);
558
+ $parcel$export($35f1bc0112883d51$exports, "detail-panel-holder", () => $35f1bc0112883d51$export$f553ebb4e6df6c5f, (v) => $35f1bc0112883d51$export$f553ebb4e6df6c5f = v);
559
+ $parcel$export($35f1bc0112883d51$exports, "map-control-stack", () => $35f1bc0112883d51$export$c163dab1f00a51cb, (v) => $35f1bc0112883d51$export$c163dab1f00a51cb = v);
560
+ $parcel$export($35f1bc0112883d51$exports, "main-row", () => $35f1bc0112883d51$export$bc4885f800420ea3, (v) => $35f1bc0112883d51$export$bc4885f800420ea3 = v);
561
+ $parcel$export($35f1bc0112883d51$exports, "map-ui", () => $35f1bc0112883d51$export$7d4a718201bc0bd1, (v) => $35f1bc0112883d51$export$7d4a718201bc0bd1 = v);
562
+ $parcel$export($35f1bc0112883d51$exports, "mapbox-map", () => $35f1bc0112883d51$export$d0dcaf774d09fc4c, (v) => $35f1bc0112883d51$export$d0dcaf774d09fc4c = v);
563
+ $parcel$export($35f1bc0112883d51$exports, "panel-card", () => $35f1bc0112883d51$export$8eff531ff0f1cffe, (v) => $35f1bc0112883d51$export$8eff531ff0f1cffe = v);
564
+ $parcel$export($35f1bc0112883d51$exports, "context-stack", () => $35f1bc0112883d51$export$a15c1c170cdda69a, (v) => $35f1bc0112883d51$export$a15c1c170cdda69a = v);
565
+ $parcel$export($35f1bc0112883d51$exports, "searchbar", () => $35f1bc0112883d51$export$2ac23befe9d406ee, (v) => $35f1bc0112883d51$export$2ac23befe9d406ee = v);
566
+ $parcel$export($35f1bc0112883d51$exports, "detail-stack", () => $35f1bc0112883d51$export$bb1d4538b98f1621, (v) => $35f1bc0112883d51$export$bb1d4538b98f1621 = v);
567
+ $parcel$export($35f1bc0112883d51$exports, "panel-container", () => $35f1bc0112883d51$export$9dd9a0eceddf6af6, (v) => $35f1bc0112883d51$export$9dd9a0eceddf6af6 = v);
568
+ $parcel$export($35f1bc0112883d51$exports, "panel-title", () => $35f1bc0112883d51$export$9672a0c48c9048ad, (v) => $35f1bc0112883d51$export$9672a0c48c9048ad = v);
569
+ $parcel$export($35f1bc0112883d51$exports, "spacer", () => $35f1bc0112883d51$export$8cc075c801fd6817, (v) => $35f1bc0112883d51$export$8cc075c801fd6817 = v);
570
+ $parcel$export($35f1bc0112883d51$exports, "searchbar-holder", () => $35f1bc0112883d51$export$3a39e67bbbcbd4ae, (v) => $35f1bc0112883d51$export$3a39e67bbbcbd4ae = v);
571
+ $parcel$export($35f1bc0112883d51$exports, "right-panel", () => $35f1bc0112883d51$export$3332ecdf6c5467a, (v) => $35f1bc0112883d51$export$3332ecdf6c5467a = v);
572
+ $parcel$export($35f1bc0112883d51$exports, "buttons", () => $35f1bc0112883d51$export$bbea856fdb3e3c5f, (v) => $35f1bc0112883d51$export$bbea856fdb3e3c5f = v);
573
+ $parcel$export($35f1bc0112883d51$exports, "tab-button", () => $35f1bc0112883d51$export$76800529067ae833, (v) => $35f1bc0112883d51$export$76800529067ae833 = v);
574
+ $parcel$export($35f1bc0112883d51$exports, "menu-card", () => $35f1bc0112883d51$export$d94de0bab38fd59, (v) => $35f1bc0112883d51$export$d94de0bab38fd59 = v);
575
+ $parcel$export($35f1bc0112883d51$exports, "narrow-card", () => $35f1bc0112883d51$export$9769f988dc28baf, (v) => $35f1bc0112883d51$export$9769f988dc28baf = v);
576
+ $parcel$export($35f1bc0112883d51$exports, "panel-header", () => $35f1bc0112883d51$export$90b77e3be608e918, (v) => $35f1bc0112883d51$export$90b77e3be608e918 = v);
577
+ $parcel$export($35f1bc0112883d51$exports, "minimal", () => $35f1bc0112883d51$export$10c083462c34aef3, (v) => $35f1bc0112883d51$export$10c083462c34aef3 = v);
578
+ $parcel$export($35f1bc0112883d51$exports, "context-panel-leave", () => $35f1bc0112883d51$export$f3ad069e7751fe80, (v) => $35f1bc0112883d51$export$f3ad069e7751fe80 = v);
579
+ $parcel$export($35f1bc0112883d51$exports, "narrow-enter", () => $35f1bc0112883d51$export$c20b2d766062840f, (v) => $35f1bc0112883d51$export$c20b2d766062840f = v);
580
+ $parcel$export($35f1bc0112883d51$exports, "menu-group", () => $35f1bc0112883d51$export$3a4b737893473805, (v) => $35f1bc0112883d51$export$3a4b737893473805 = v);
581
+ $parcel$export($35f1bc0112883d51$exports, "menu-content", () => $35f1bc0112883d51$export$3eeb6f640f2fe17b, (v) => $35f1bc0112883d51$export$3eeb6f640f2fe17b = v);
582
+ $parcel$export($35f1bc0112883d51$exports, "bp5-button-group", () => $35f1bc0112883d51$export$6fe71a6d4f52db2a, (v) => $35f1bc0112883d51$export$6fe71a6d4f52db2a = v);
583
+ $parcel$export($35f1bc0112883d51$exports, "detail-panel-container", () => $35f1bc0112883d51$export$aa8359f513bf67ff, (v) => $35f1bc0112883d51$export$aa8359f513bf67ff = v);
584
+ $parcel$export($35f1bc0112883d51$exports, "map-right-controls", () => $35f1bc0112883d51$export$98a77ae0c82023e7, (v) => $35f1bc0112883d51$export$98a77ae0c82023e7 = v);
585
+ $parcel$export($35f1bc0112883d51$exports, "map-controls", () => $35f1bc0112883d51$export$802dc54769b48aa7, (v) => $35f1bc0112883d51$export$802dc54769b48aa7 = v);
586
+ $parcel$export($35f1bc0112883d51$exports, "map-scale-control", () => $35f1bc0112883d51$export$b56f659d649f0d92, (v) => $35f1bc0112883d51$export$b56f659d649f0d92 = v);
587
+ $parcel$export($35f1bc0112883d51$exports, "detail-panel-enter", () => $35f1bc0112883d51$export$e017ebf46ba443ed, (v) => $35f1bc0112883d51$export$e017ebf46ba443ed = v);
588
+ $parcel$export($35f1bc0112883d51$exports, "infodrawer-stack", () => $35f1bc0112883d51$export$69fa1b5d46c139b9, (v) => $35f1bc0112883d51$export$69fa1b5d46c139b9 = v);
589
+ $parcel$export($35f1bc0112883d51$exports, "detail-panel", () => $35f1bc0112883d51$export$c6930745f2610de0, (v) => $35f1bc0112883d51$export$c6930745f2610de0 = v);
590
+ $parcel$export($35f1bc0112883d51$exports, "adaptive-width", () => $35f1bc0112883d51$export$4db621d3143ef457, (v) => $35f1bc0112883d51$export$4db621d3143ef457 = v);
591
+ $parcel$export($35f1bc0112883d51$exports, "context-panel-holder", () => $35f1bc0112883d51$export$1113ec858cdbc244, (v) => $35f1bc0112883d51$export$1113ec858cdbc244 = v);
592
+ $parcel$export($35f1bc0112883d51$exports, "context-panel-from", () => $35f1bc0112883d51$export$90f42dafd5c24d2d, (v) => $35f1bc0112883d51$export$90f42dafd5c24d2d = v);
593
+ $parcel$export($35f1bc0112883d51$exports, "context-panel-enter", () => $35f1bc0112883d51$export$9ea3835d1b44cc08, (v) => $35f1bc0112883d51$export$9ea3835d1b44cc08 = v);
594
+ $parcel$export($35f1bc0112883d51$exports, "detail-panel-floating", () => $35f1bc0112883d51$export$50b37414f37debaa, (v) => $35f1bc0112883d51$export$50b37414f37debaa = v);
595
+ $parcel$export($35f1bc0112883d51$exports, "detail-panel-from", () => $35f1bc0112883d51$export$419647d5ce4279cb, (v) => $35f1bc0112883d51$export$419647d5ce4279cb = v);
596
+ $parcel$export($35f1bc0112883d51$exports, "detail-panel-leave", () => $35f1bc0112883d51$export$1d0f1d0b062c3bee, (v) => $35f1bc0112883d51$export$1d0f1d0b062c3bee = v);
597
+ $parcel$export($35f1bc0112883d51$exports, "context-panel", () => $35f1bc0112883d51$export$b4dbb67ffc3cc7a9, (v) => $35f1bc0112883d51$export$b4dbb67ffc3cc7a9 = v);
598
+ var $35f1bc0112883d51$export$d7f2c44afcf5df56;
599
+ var $35f1bc0112883d51$export$e163bcc0a29d66c;
600
+ var $35f1bc0112883d51$export$11aa7dc57218208d;
601
+ var $35f1bc0112883d51$export$2a73fca7b70dce31;
602
+ var $35f1bc0112883d51$export$cc73204c64cc0950;
603
+ var $35f1bc0112883d51$export$d2972e7dfac51dc2;
604
+ var $35f1bc0112883d51$export$142b9410c523ef40;
605
+ var $35f1bc0112883d51$export$6bc2d6545947abbc;
606
+ var $35f1bc0112883d51$export$b06313b17bd37b68;
607
+ var $35f1bc0112883d51$export$ea9cfbb56edd0e47;
608
+ var $35f1bc0112883d51$export$62a60ea2feb29c53;
609
+ var $35f1bc0112883d51$export$61e54aa1efb913ad;
610
+ var $35f1bc0112883d51$export$4a4f34b86d8e6504;
611
+ var $35f1bc0112883d51$export$f553ebb4e6df6c5f;
612
+ var $35f1bc0112883d51$export$c163dab1f00a51cb;
613
+ var $35f1bc0112883d51$export$bc4885f800420ea3;
614
+ var $35f1bc0112883d51$export$7d4a718201bc0bd1;
615
+ var $35f1bc0112883d51$export$d0dcaf774d09fc4c;
616
+ var $35f1bc0112883d51$export$8eff531ff0f1cffe;
617
+ var $35f1bc0112883d51$export$a15c1c170cdda69a;
618
+ var $35f1bc0112883d51$export$2ac23befe9d406ee;
619
+ var $35f1bc0112883d51$export$bb1d4538b98f1621;
620
+ var $35f1bc0112883d51$export$9dd9a0eceddf6af6;
621
+ var $35f1bc0112883d51$export$9672a0c48c9048ad;
622
+ var $35f1bc0112883d51$export$8cc075c801fd6817;
623
+ var $35f1bc0112883d51$export$3a39e67bbbcbd4ae;
624
+ var $35f1bc0112883d51$export$3332ecdf6c5467a;
625
+ var $35f1bc0112883d51$export$bbea856fdb3e3c5f;
626
+ var $35f1bc0112883d51$export$76800529067ae833;
627
+ var $35f1bc0112883d51$export$d94de0bab38fd59;
628
+ var $35f1bc0112883d51$export$9769f988dc28baf;
629
+ var $35f1bc0112883d51$export$90b77e3be608e918;
630
+ var $35f1bc0112883d51$export$10c083462c34aef3;
631
+ var $35f1bc0112883d51$export$f3ad069e7751fe80;
632
+ var $35f1bc0112883d51$export$c20b2d766062840f;
633
+ var $35f1bc0112883d51$export$3a4b737893473805;
634
+ var $35f1bc0112883d51$export$3eeb6f640f2fe17b;
635
+ var $35f1bc0112883d51$export$6fe71a6d4f52db2a;
636
+ var $35f1bc0112883d51$export$aa8359f513bf67ff;
637
+ var $35f1bc0112883d51$export$98a77ae0c82023e7;
638
+ var $35f1bc0112883d51$export$802dc54769b48aa7;
639
+ var $35f1bc0112883d51$export$b56f659d649f0d92;
640
+ var $35f1bc0112883d51$export$e017ebf46ba443ed;
641
+ var $35f1bc0112883d51$export$69fa1b5d46c139b9;
642
+ var $35f1bc0112883d51$export$c6930745f2610de0;
643
+ var $35f1bc0112883d51$export$4db621d3143ef457;
644
+ var $35f1bc0112883d51$export$1113ec858cdbc244;
645
+ var $35f1bc0112883d51$export$90f42dafd5c24d2d;
646
+ var $35f1bc0112883d51$export$9ea3835d1b44cc08;
647
+ var $35f1bc0112883d51$export$50b37414f37debaa;
648
+ var $35f1bc0112883d51$export$419647d5ce4279cb;
649
+ var $35f1bc0112883d51$export$1d0f1d0b062c3bee;
650
+ var $35f1bc0112883d51$export$b4dbb67ffc3cc7a9;
651
+ $35f1bc0112883d51$export$d7f2c44afcf5df56 = "map-container_4c0a66";
652
+ $35f1bc0112883d51$export$e163bcc0a29d66c = "show-panel-outlines_4c0a66";
653
+ $35f1bc0112883d51$export$11aa7dc57218208d = "map-view-container_4c0a66";
654
+ $35f1bc0112883d51$export$2a73fca7b70dce31 = "fit-viewport_4c0a66";
655
+ $35f1bc0112883d51$export$cc73204c64cc0950 = "compass-control_4c0a66";
656
+ $35f1bc0112883d51$export$d2972e7dfac51dc2 = "map-is-rotated_4c0a66";
657
+ $35f1bc0112883d51$export$142b9410c523ef40 = "map-3d-control_4c0a66";
658
+ $35f1bc0112883d51$export$6bc2d6545947abbc = "map-3d-available_4c0a66";
659
+ $35f1bc0112883d51$export$b06313b17bd37b68 = "globe-control_4c0a66";
660
+ $35f1bc0112883d51$export$ea9cfbb56edd0e47 = "map-is-global_4c0a66";
661
+ $35f1bc0112883d51$export$62a60ea2feb29c53 = "detail-panel-open_4c0a66";
662
+ $35f1bc0112883d51$export$61e54aa1efb913ad = "zoom-control_4c0a66";
663
+ $35f1bc0112883d51$export$4a4f34b86d8e6504 = "detail-panel-fixed_4c0a66";
664
+ $35f1bc0112883d51$export$f553ebb4e6df6c5f = "detail-panel-holder_4c0a66";
665
+ $35f1bc0112883d51$export$c163dab1f00a51cb = "map-control-stack_4c0a66";
666
+ $35f1bc0112883d51$export$bc4885f800420ea3 = "main-row_4c0a66";
667
+ $35f1bc0112883d51$export$7d4a718201bc0bd1 = "map-ui_4c0a66";
668
+ $35f1bc0112883d51$export$d0dcaf774d09fc4c = "mapbox-map_4c0a66";
669
+ $35f1bc0112883d51$export$8eff531ff0f1cffe = "panel-card_4c0a66";
670
+ $35f1bc0112883d51$export$a15c1c170cdda69a = "context-stack_4c0a66";
671
+ $35f1bc0112883d51$export$2ac23befe9d406ee = "searchbar_4c0a66";
672
+ $35f1bc0112883d51$export$bb1d4538b98f1621 = "detail-stack_4c0a66";
673
+ $35f1bc0112883d51$export$9dd9a0eceddf6af6 = "panel-container_4c0a66";
674
+ $35f1bc0112883d51$export$9672a0c48c9048ad = "panel-title_4c0a66";
675
+ $35f1bc0112883d51$export$8cc075c801fd6817 = "spacer_4c0a66";
676
+ $35f1bc0112883d51$export$3a39e67bbbcbd4ae = "searchbar-holder_4c0a66";
677
+ $35f1bc0112883d51$export$3332ecdf6c5467a = "right-panel_4c0a66";
678
+ $35f1bc0112883d51$export$bbea856fdb3e3c5f = "buttons_4c0a66";
679
+ $35f1bc0112883d51$export$76800529067ae833 = "tab-button_4c0a66";
680
+ $35f1bc0112883d51$export$d94de0bab38fd59 = "menu-card_4c0a66";
681
+ $35f1bc0112883d51$export$9769f988dc28baf = "narrow-card_4c0a66";
682
+ $35f1bc0112883d51$export$90b77e3be608e918 = "panel-header_4c0a66";
683
+ $35f1bc0112883d51$export$10c083462c34aef3 = "minimal_4c0a66";
684
+ $35f1bc0112883d51$export$f3ad069e7751fe80 = "context-panel-leave_4c0a66";
685
+ $35f1bc0112883d51$export$c20b2d766062840f = "narrow-enter_4c0a66";
686
+ $35f1bc0112883d51$export$3a4b737893473805 = "menu-group_4c0a66";
687
+ $35f1bc0112883d51$export$3eeb6f640f2fe17b = "menu-content_4c0a66";
688
+ $35f1bc0112883d51$export$6fe71a6d4f52db2a = "bp5-button-group_4c0a66";
689
+ $35f1bc0112883d51$export$aa8359f513bf67ff = "detail-panel-container_4c0a66";
690
+ $35f1bc0112883d51$export$98a77ae0c82023e7 = "map-right-controls_4c0a66";
691
+ $35f1bc0112883d51$export$802dc54769b48aa7 = "map-controls_4c0a66";
692
+ $35f1bc0112883d51$export$b56f659d649f0d92 = "map-scale-control_4c0a66";
693
+ $35f1bc0112883d51$export$e017ebf46ba443ed = "detail-panel-enter_4c0a66";
694
+ $35f1bc0112883d51$export$69fa1b5d46c139b9 = "infodrawer-stack_4c0a66";
695
+ $35f1bc0112883d51$export$c6930745f2610de0 = "detail-panel_4c0a66";
696
+ $35f1bc0112883d51$export$4db621d3143ef457 = "adaptive-width_4c0a66";
697
+ $35f1bc0112883d51$export$1113ec858cdbc244 = "context-panel-holder_4c0a66";
698
+ $35f1bc0112883d51$export$90f42dafd5c24d2d = "context-panel-from_4c0a66";
699
+ $35f1bc0112883d51$export$9ea3835d1b44cc08 = "context-panel-enter_4c0a66";
700
+ $35f1bc0112883d51$export$50b37414f37debaa = "detail-panel-floating_4c0a66";
701
+ $35f1bc0112883d51$export$419647d5ce4279cb = "detail-panel-from_4c0a66";
702
+ $35f1bc0112883d51$export$1d0f1d0b062c3bee = "detail-panel-leave_4c0a66";
703
+ $35f1bc0112883d51$export$b4dbb67ffc3cc7a9 = "context-panel_4c0a66";
704
+
705
+
706
+
707
+
708
+
709
+
710
+ var $f333fe6f49373ca9$exports = {};
711
+
712
+ $parcel$export($f333fe6f49373ca9$exports, "MapBottomControls", () => $f333fe6f49373ca9$export$db1a2e058a06fb5c);
713
+
714
+
715
+
716
+
717
+
718
+
719
+ const $f333fe6f49373ca9$var$h = (0, ($parcel$interopDefault($9B3TU$macrostrathyper))).styled((0, (/*@__PURE__*/$parcel$interopDefault($35f1bc0112883d51$exports))));
720
+ function $f333fe6f49373ca9$var$ScaleControl(props) {
721
+ const optionsRef = (0, $9B3TU$react.useRef)({
722
+ maxWidth: 200,
723
+ unit: "metric"
724
+ });
725
+ return $f333fe6f49373ca9$var$h((0, $9B3TU$macrostratmapboxreact.MapControlWrapper), {
726
+ className: "map-scale-control",
727
+ control: (0, $9B3TU$mapboxgl.ScaleControl),
728
+ options: optionsRef.current,
729
+ ...props
730
+ });
731
+ }
732
+ function $f333fe6f49373ca9$var$GeolocationControl(props) {
733
+ const optionsRef = (0, $9B3TU$react.useRef)({
734
+ showAccuracyCircle: true,
735
+ showUserLocation: true,
736
+ trackUserLocation: true,
737
+ positionOptions: {
738
+ enableHighAccuracy: true
739
+ }
740
+ });
741
+ return $f333fe6f49373ca9$var$h((0, $9B3TU$macrostratmapboxreact.MapControlWrapper), {
742
+ control: (0, $9B3TU$mapboxgl.GeolocateControl),
743
+ options: optionsRef.current,
744
+ ...props
745
+ });
746
+ }
747
+ function $f333fe6f49373ca9$export$db1a2e058a06fb5c({ children: children }) {
748
+ const { isInitialized: isInitialized } = (0, $9B3TU$macrostratmapboxreact.useMapStatus)();
749
+ if (!isInitialized) return null;
750
+ return $f333fe6f49373ca9$var$h("div.map-controls", [
751
+ $f333fe6f49373ca9$var$h($f333fe6f49373ca9$var$ScaleControl),
752
+ $f333fe6f49373ca9$var$h((0, $9B3TU$macrostratmapboxreact.ThreeDControl), {
753
+ className: "map-3d-control"
754
+ }),
755
+ $f333fe6f49373ca9$var$h((0, $9B3TU$macrostratmapboxreact.CompassControl), {
756
+ className: "compass-control"
757
+ }),
758
+ $f333fe6f49373ca9$var$h((0, $9B3TU$macrostratmapboxreact.GlobeControl), {
759
+ className: "globe-control"
760
+ }),
761
+ $f333fe6f49373ca9$var$h($f333fe6f49373ca9$var$GeolocationControl, {
762
+ className: "geolocation-control"
763
+ }),
764
+ // If we have global development tools enabled, show the button
765
+ $f333fe6f49373ca9$var$h((0, $9B3TU$macrostratuicomponents.DevToolsButtonSlot), {
766
+ className: "map-control"
767
+ }),
768
+ children
769
+ ]);
770
+ }
771
+
772
+
773
+
774
+
775
+ const $c3311f59335df34d$var$h = (0, ($parcel$interopDefault($9B3TU$macrostrathyper))).styled((0, (/*@__PURE__*/$parcel$interopDefault($35f1bc0112883d51$exports))));
776
+ const $c3311f59335df34d$export$ec68dd77edbe678b = (props)=>$c3311f59335df34d$var$h((0, $9B3TU$blueprintjscore.Card), {
777
+ ...props,
778
+ className: (0, ($parcel$interopDefault($9B3TU$classnames)))("panel-card", props.className)
779
+ });
780
+ var $c3311f59335df34d$export$612ca936d3ed4784;
781
+ (function(DetailPanelStyle) {
782
+ DetailPanelStyle["FIXED"] = "fixed";
783
+ DetailPanelStyle["FLOATING"] = "floating";
784
+ })($c3311f59335df34d$export$612ca936d3ed4784 || ($c3311f59335df34d$export$612ca936d3ed4784 = {}));
785
+ function $c3311f59335df34d$var$_MapAreaContainer({ children: children, className: className, navbar: navbar, contextPanel: contextPanel = null, detailPanel: detailPanel = null, detailPanelOpen: detailPanelOpen, contextPanelOpen: contextPanelOpen = true, bottomPanel: bottomPanel = null, mainPanel: mainPanel, mapControls: mapControls = $c3311f59335df34d$var$h((0, $f333fe6f49373ca9$export$db1a2e058a06fb5c)), contextStackProps: contextStackProps = null, detailStackProps: detailStackProps = null, detailPanelStyle: detailPanelStyle = "floating", fitViewport: fitViewport = true, showPanelOutlines: showPanelOutlines = false, preventMapInteraction: preventMapInteraction = false, ...rest }) {
786
+ const _detailPanelOpen = detailPanelOpen ?? detailPanel != null;
787
+ const contextPanelTrans = (0, $9B3TU$transitionhook.useTransition)(contextPanelOpen, 800);
788
+ const detailPanelTrans = (0, $9B3TU$transitionhook.useTransition)(_detailPanelOpen, 800);
789
+ /*- We apply a custom style to the panel container when we are interacting
790
+ with the search bar, so that we can block map interactions until search
791
+ bar focus is lost.
792
+ - We also apply a custom style when the infodrawer is open so we can hide
793
+ the search bar on mobile platforms
794
+ - These styles are doubly applied so we can have both namespaced and
795
+ outside-accessible styles for each case.
796
+ */ const mainUIClassNames = (0, ($parcel$interopDefault($9B3TU$classnames)))("map-container", className, `detail-panel-${detailPanelStyle}`, `context-panel-${contextPanelTrans.stage}`, `map-context-${contextPanelTrans.stage}`, `detail-panel-${detailPanelTrans.stage}`, `map-detail-${detailPanelTrans.stage}`, {
797
+ "detail-panel-open": _detailPanelOpen,
798
+ "map-context-open": contextPanelOpen,
799
+ "show-panel-outlines": showPanelOutlines,
800
+ "fit-viewport": fitViewport
801
+ });
802
+ const mapControlsExt = $c3311f59335df34d$var$h([
803
+ $c3311f59335df34d$var$h((0, $9B3TU$macrostratmapboxreact.ZoomControl), {
804
+ className: "zoom-control"
805
+ }),
806
+ $c3311f59335df34d$var$h("div.spacer"),
807
+ mapControls
808
+ ]);
809
+ const detailStackExt = $c3311f59335df34d$var$h("div.detail-stack.infodrawer-container", detailStackProps, [
810
+ $c3311f59335df34d$var$h("div.detail-panel-holder", null, detailPanel),
811
+ $c3311f59335df34d$var$h.if(detailPanelStyle == "floating")([
812
+ mapControlsExt
813
+ ])
814
+ ]);
815
+ return $c3311f59335df34d$var$h($c3311f59335df34d$export$fa395a37c3898ae3, {
816
+ className: mainUIClassNames
817
+ }, [
818
+ $c3311f59335df34d$var$h("div.main-row", [
819
+ $c3311f59335df34d$var$h("div.map-ui", {
820
+ ...rest
821
+ }, [
822
+ $c3311f59335df34d$var$h($c3311f59335df34d$var$ContextStack, {
823
+ navbar: navbar,
824
+ ...contextStackProps
825
+ }, [
826
+ $c3311f59335df34d$var$h.if(contextPanelTrans.shouldMount)([
827
+ contextPanel
828
+ ])
829
+ ]),
830
+ //h(MapView),
831
+ children ?? mainPanel,
832
+ $c3311f59335df34d$var$h.if(detailPanelStyle == "floating")([
833
+ detailStackExt
834
+ ]),
835
+ $c3311f59335df34d$var$h.if(detailPanelStyle == "fixed")("div.map-control-stack", mapControlsExt)
836
+ ]),
837
+ $c3311f59335df34d$var$h.if(detailPanelStyle == "fixed")([
838
+ detailStackExt
839
+ ])
840
+ ]),
841
+ $c3311f59335df34d$var$h("div.bottom", null, bottomPanel)
842
+ ]);
843
+ }
844
+ function $c3311f59335df34d$var$ContextStack(props) {
845
+ const { adaptiveWidth: adaptiveWidth, navbar: navbar, children: children, ...rest } = props;
846
+ const props1 = (0, $9B3TU$macrostrathyper.addClassNames)(rest, {
847
+ "adaptive-width": adaptiveWidth
848
+ });
849
+ return $c3311f59335df34d$var$h("div.context-stack", props1, [
850
+ navbar,
851
+ $c3311f59335df34d$var$h("div.context-panel-holder", null, children),
852
+ $c3311f59335df34d$var$h("div.spacer")
853
+ ]);
854
+ }
855
+ const $c3311f59335df34d$var$MapProviders = ({ children: children })=>$c3311f59335df34d$var$h((0, $9B3TU$macrostratuicomponents.ToasterContext), $c3311f59335df34d$var$h((0, $9B3TU$macrostratmapboxreact.MapboxMapProvider), children));
856
+ const $c3311f59335df34d$export$9fa5da0bcfd0a290 = (props)=>$c3311f59335df34d$var$h($c3311f59335df34d$var$MapProviders, $c3311f59335df34d$var$h($c3311f59335df34d$var$_MapAreaContainer, props));
857
+ function $c3311f59335df34d$export$fa395a37c3898ae3({ className: className, children: children }) {
858
+ const mapPosition = (0, $9B3TU$macrostratmapboxreact.useMapPosition)();
859
+ if (mapPosition != null) {
860
+ const { mapIsRotated: mapIsRotated, mapUse3D: mapUse3D, mapIsGlobal: mapIsGlobal } = (0, $9B3TU$macrostratmapboxutils.mapViewInfo)(mapPosition);
861
+ className = (0, ($parcel$interopDefault($9B3TU$classnames)))(className, {
862
+ "map-is-rotated": mapIsRotated,
863
+ "map-3d-available": mapUse3D,
864
+ "map-is-global": mapIsGlobal
865
+ });
866
+ }
867
+ return $c3311f59335df34d$var$h("div", {
868
+ className: className
869
+ }, children);
870
+ } //const _MapPage = compose(HotkeysProvider, MapPage);
871
+
872
+
873
+
874
+ var $2611a7b4364593e5$exports = {};
875
+
876
+ $parcel$export($2611a7b4364593e5$exports, "MapResizeManager", () => $2611a7b4364593e5$export$31b2e088aff2dc5d);
877
+ $parcel$export($2611a7b4364593e5$exports, "MapPaddingManager", () => $2611a7b4364593e5$export$2ab96428dea558d6);
878
+ $parcel$export($2611a7b4364593e5$exports, "MapMovedReporter", () => $2611a7b4364593e5$export$f6eeee399afc4e9a);
879
+ $parcel$export($2611a7b4364593e5$exports, "MapLoadingReporter", () => $2611a7b4364593e5$export$e57f9eaa51773f82);
880
+ $parcel$export($2611a7b4364593e5$exports, "MapMarker", () => $2611a7b4364593e5$export$5c90a91c7455938c);
881
+
882
+
883
+
884
+
885
+
886
+ var $3490fc4f4bda12f7$exports = {};
887
+
888
+ $parcel$export($3490fc4f4bda12f7$exports, "getMapPadding", () => $3490fc4f4bda12f7$export$bb78f9f01775eef1);
889
+ $parcel$export($3490fc4f4bda12f7$exports, "useMapMarker", () => $3490fc4f4bda12f7$export$278090850f6b3a9f);
890
+
891
+
892
+ function $3490fc4f4bda12f7$var$calcMapPadding(rect, childRect) {
893
+ return {
894
+ left: Math.max(rect.left - childRect.left, 0),
895
+ top: Math.max(rect.top - childRect.top, 0),
896
+ right: Math.max(childRect.right - rect.right, 0),
897
+ bottom: Math.max(childRect.bottom - rect.bottom, 0)
898
+ };
899
+ }
900
+ function $3490fc4f4bda12f7$export$bb78f9f01775eef1(ref, parentRef) {
901
+ const rect = parentRef.current?.getBoundingClientRect();
902
+ const childRect = ref.current?.getBoundingClientRect();
903
+ if (rect == null || childRect == null) return;
904
+ return $3490fc4f4bda12f7$var$calcMapPadding(rect, childRect);
905
+ }
906
+ function $3490fc4f4bda12f7$export$278090850f6b3a9f(mapRef, markerRef, markerPosition) {
907
+ (0, $9B3TU$react.useEffect)(()=>{
908
+ const map = mapRef.current;
909
+ if (map == null) return;
910
+ if (markerPosition == null) {
911
+ markerRef.current?.remove();
912
+ return;
913
+ }
914
+ const marker = markerRef.current ?? new (0, $9B3TU$mapboxgl.Marker)();
915
+ marker.setLngLat(markerPosition).addTo(map);
916
+ markerRef.current = marker;
917
+ return ()=>marker.remove();
918
+ }, [
919
+ mapRef.current,
920
+ markerPosition
921
+ ]);
922
+ }
923
+
924
+
925
+ function $2611a7b4364593e5$export$31b2e088aff2dc5d({ containerRef: containerRef }) {
926
+ const mapRef = (0, $9B3TU$macrostratmapboxreact.useMapRef)();
927
+ const debouncedResize = (0, $9B3TU$react.useRef)((0, $9B3TU$underscore.debounce)(()=>{
928
+ mapRef.current?.resize();
929
+ }, 100));
930
+ (0, ($parcel$interopDefault($9B3TU$useresizeobserver)))({
931
+ ref: containerRef,
932
+ onResize: debouncedResize.current
933
+ });
934
+ return null;
935
+ }
936
+ function $2611a7b4364593e5$export$2ab96428dea558d6({ containerRef: containerRef, parentRef: parentRef, infoMarkerPosition: infoMarkerPosition }) {
937
+ const mapRef = (0, $9B3TU$macrostratmapboxreact.useMapRef)();
938
+ const [padding, setPadding] = (0, $9B3TU$react.useState)((0, $3490fc4f4bda12f7$export$bb78f9f01775eef1)(containerRef, parentRef));
939
+ const updateMapPadding = (0, $9B3TU$react.useCallback)(()=>{
940
+ const newPadding = (0, $3490fc4f4bda12f7$export$bb78f9f01775eef1)(containerRef, parentRef);
941
+ setPadding(newPadding);
942
+ }, [
943
+ containerRef.current,
944
+ parentRef.current
945
+ ]);
946
+ (0, $9B3TU$react.useEffect)(()=>{
947
+ const map = mapRef.current;
948
+ if (map == null) return;
949
+ // Update map padding on load
950
+ updateMapPadding();
951
+ }, [
952
+ mapRef.current
953
+ ]);
954
+ (0, ($parcel$interopDefault($9B3TU$useresizeobserver)))({
955
+ ref: parentRef,
956
+ onResize (sz) {
957
+ updateMapPadding();
958
+ }
959
+ });
960
+ // Ideally, we would not have to do this when we know the infobox is loaded
961
+ (0, $9B3TU$macrostratmapboxreact.useMapEaseTo)({
962
+ center: infoMarkerPosition,
963
+ padding: padding
964
+ });
965
+ return null;
966
+ }
967
+ function $2611a7b4364593e5$export$f6eeee399afc4e9a({ onMapMoved: onMapMoved = null }) {
968
+ const mapRef = (0, $9B3TU$macrostratmapboxreact.useMapRef)();
969
+ const dispatch = (0, $9B3TU$macrostratmapboxreact.useMapDispatch)();
970
+ const mapMovedCallback = (0, $9B3TU$react.useCallback)(()=>{
971
+ const map = mapRef.current;
972
+ if (map == null) return;
973
+ const mapPosition = (0, $9B3TU$macrostratmapboxutils.getMapPosition)(map);
974
+ dispatch({
975
+ type: "map-moved",
976
+ payload: mapPosition
977
+ });
978
+ onMapMoved?.(mapPosition, map);
979
+ }, [
980
+ mapRef.current,
981
+ onMapMoved,
982
+ dispatch
983
+ ]);
984
+ (0, $9B3TU$react.useEffect)(()=>{
985
+ // Get the current value of the map. Useful for gradually moving away
986
+ // from class component
987
+ const map = mapRef.current;
988
+ if (map == null) return;
989
+ // Update the URI when the map moves
990
+ mapMovedCallback();
991
+ const cb = (0, $9B3TU$underscore.debounce)(mapMovedCallback, 100);
992
+ map.on("moveend", cb);
993
+ return ()=>{
994
+ map?.off("moveend", cb);
995
+ };
996
+ }, [
997
+ mapMovedCallback
998
+ ]);
999
+ return null;
1000
+ }
1001
+ function $2611a7b4364593e5$export$e57f9eaa51773f82({ ignoredSources: ignoredSources, onMapLoading: onMapLoading = null, onMapIdle: onMapIdle = null, mapIsLoading: mapIsLoading }) {
1002
+ const mapRef = (0, $9B3TU$macrostratmapboxreact.useMapRef)();
1003
+ const loadingRef = (0, $9B3TU$react.useRef)(false);
1004
+ const dispatch = (0, $9B3TU$macrostratmapboxreact.useMapDispatch)();
1005
+ (0, $9B3TU$react.useEffect)(()=>{
1006
+ const map = mapRef.current;
1007
+ const mapIsLoading = loadingRef.current;
1008
+ if (map == null) return;
1009
+ let didSendLoading = false;
1010
+ const loadingCallback = (evt)=>{
1011
+ if (ignoredSources.includes(evt.sourceId) || mapIsLoading) return;
1012
+ if (didSendLoading) return;
1013
+ onMapLoading?.(evt);
1014
+ dispatch({
1015
+ type: "set-loading",
1016
+ payload: true
1017
+ });
1018
+ loadingRef.current = true;
1019
+ didSendLoading = true;
1020
+ };
1021
+ const idleCallback = (evt)=>{
1022
+ if (!mapIsLoading) return;
1023
+ dispatch({
1024
+ type: "set-loading",
1025
+ payload: false
1026
+ });
1027
+ loadingRef.current = false;
1028
+ onMapIdle?.(evt);
1029
+ };
1030
+ map.on("sourcedataloading", loadingCallback);
1031
+ map.on("idle", idleCallback);
1032
+ return ()=>{
1033
+ map?.off("sourcedataloading", loadingCallback);
1034
+ map?.off("idle", idleCallback);
1035
+ };
1036
+ }, [
1037
+ ignoredSources,
1038
+ mapRef.current,
1039
+ mapIsLoading
1040
+ ]);
1041
+ return null;
1042
+ }
1043
+ function $2611a7b4364593e5$export$5c90a91c7455938c({ position: position, setPosition: setPosition, centerMarker: centerMarker = true }) {
1044
+ const mapRef = (0, $9B3TU$macrostratmapboxreact.useMapRef)();
1045
+ const markerRef = (0, $9B3TU$react.useRef)(null);
1046
+ (0, $3490fc4f4bda12f7$export$278090850f6b3a9f)(mapRef, markerRef, position);
1047
+ const handleMapClick = (0, $9B3TU$react.useCallback)((event)=>{
1048
+ setPosition(event.lngLat, event, mapRef.current);
1049
+ // We should integrate this with the "easeToCenter" hook
1050
+ if (centerMarker) mapRef.current?.flyTo({
1051
+ center: event.lngLat,
1052
+ duration: 800
1053
+ });
1054
+ }, [
1055
+ mapRef.current,
1056
+ setPosition
1057
+ ]);
1058
+ (0, $9B3TU$react.useEffect)(()=>{
1059
+ const map = mapRef.current;
1060
+ if (map != null && setPosition != null) map.on("click", handleMapClick);
1061
+ return ()=>{
1062
+ map?.off("click", handleMapClick);
1063
+ };
1064
+ }, [
1065
+ mapRef.current,
1066
+ setPosition
1067
+ ]);
1068
+ return null;
1069
+ }
1070
+
1071
+
1072
+
1073
+ var $12b6032029db16d4$exports = {};
1074
+
1075
+ $parcel$export($12b6032029db16d4$exports, "MapView", () => $12b6032029db16d4$export$ab1e7a67d6ec5ad8);
1076
+ $parcel$export($12b6032029db16d4$exports, "MapTerrainManager", () => $12b6032029db16d4$export$cee395a8a2a00b29);
1077
+
1078
+
1079
+
1080
+
1081
+
1082
+
1083
+
1084
+ // We should merge this with code in @macrostrat/mapbox-react/src/terrain.ts:
1085
+ function $ecfbeec2ae4211a4$export$b730542ee281c4b1(map, shouldEnable, sourceID = null) {
1086
+ if (!map.style?._loaded) {
1087
+ map.once("style.load", ()=>{
1088
+ $ecfbeec2ae4211a4$export$b730542ee281c4b1(map, shouldEnable, sourceID);
1089
+ });
1090
+ return;
1091
+ }
1092
+ const currentTerrainSource = $ecfbeec2ae4211a4$var$getTerrainSourceID(map);
1093
+ let demSourceID = sourceID ?? currentTerrainSource ?? "mapbox-dem";
1094
+ console.log("Enabling 3D terrain with source", demSourceID);
1095
+ // Enable or disable terrain depending on our current desires...
1096
+ const currentTerrain = map.getTerrain();
1097
+ if (!shouldEnable) {
1098
+ if (currentTerrain != null) map.setTerrain(null);
1099
+ return;
1100
+ }
1101
+ if (currentTerrain != null) return;
1102
+ // Add a DEM source if one is not found already.
1103
+ if (map.getSource(demSourceID) == null) map.addSource(demSourceID, {
1104
+ type: "raster-dem",
1105
+ url: "mapbox://mapbox.mapbox-terrain-dem-v1",
1106
+ tileSize: 512,
1107
+ maxzoom: 14
1108
+ });
1109
+ // add a sky layer that will show when the map is highly pitched
1110
+ if (map.getLayer("sky") == null) map.addLayer({
1111
+ id: "sky",
1112
+ type: "sky",
1113
+ paint: {
1114
+ "sky-type": "atmosphere",
1115
+ "sky-atmosphere-sun": [
1116
+ 0.0,
1117
+ 0.0
1118
+ ],
1119
+ "sky-atmosphere-sun-intensity": 15
1120
+ }
1121
+ });
1122
+ map.setTerrain({
1123
+ source: demSourceID,
1124
+ exaggeration: 1
1125
+ });
1126
+ console.log(map.getTerrain());
1127
+ }
1128
+ function $ecfbeec2ae4211a4$var$getTerrainSourceID(map) {
1129
+ for (const [key, source] of Object.entries(map.getStyle().sources)){
1130
+ if (source.type == "raster-dem") return key;
1131
+ }
1132
+ return null;
1133
+ }
1134
+
1135
+
1136
+
1137
+
1138
+
1139
+ const $12b6032029db16d4$var$h = (0, ($parcel$interopDefault($9B3TU$macrostrathyper))).styled((0, (/*@__PURE__*/$parcel$interopDefault($35f1bc0112883d51$exports))));
1140
+ function $12b6032029db16d4$var$defaultInitializeMap(container, args = {}) {
1141
+ const { mapPosition: mapPosition, ...rest } = args;
1142
+ console.log("Initializing map (default)", args);
1143
+ const map = new (0, ($parcel$interopDefault($9B3TU$mapboxgl))).Map({
1144
+ container: container,
1145
+ maxZoom: 18,
1146
+ //maxTileCacheSize: 0,
1147
+ logoPosition: "bottom-left",
1148
+ trackResize: true,
1149
+ antialias: true,
1150
+ optimizeForTerrain: true,
1151
+ ...rest
1152
+ });
1153
+ // set initial map position
1154
+ if (mapPosition != null) (0, $9B3TU$macrostratmapboxutils.setMapPosition)(map, mapPosition);
1155
+ //setMapPosition(map, mapPosition);
1156
+ return map;
1157
+ }
1158
+ const $12b6032029db16d4$var$defaultMapPosition = {
1159
+ camera: {
1160
+ lat: 34,
1161
+ lng: -120,
1162
+ altitude: 300000
1163
+ }
1164
+ };
1165
+ function $12b6032029db16d4$export$ab1e7a67d6ec5ad8(props) {
1166
+ let { terrainSourceID: terrainSourceID } = props;
1167
+ const { enableTerrain: enableTerrain = true, style: style, mapPosition: mapPosition = $12b6032029db16d4$var$defaultMapPosition, initializeMap: initializeMap = $12b6032029db16d4$var$defaultInitializeMap, children: children, mapboxToken: mapboxToken, accessToken: // Deprecated
1168
+ accessToken, infoMarkerPosition: infoMarkerPosition, transformRequest: transformRequest, projection: projection, onMapLoaded: onMapLoaded = null, onStyleLoaded: onStyleLoaded = null, onMapMoved: onMapMoved = null, ...rest } = props;
1169
+ if (enableTerrain) terrainSourceID ??= "mapbox-3d-dem";
1170
+ const _mapboxToken = mapboxToken ?? accessToken;
1171
+ if (_mapboxToken != null) (0, ($parcel$interopDefault($9B3TU$mapboxgl))).accessToken = _mapboxToken;
1172
+ const dispatch = (0, $9B3TU$macrostratmapboxreact.useMapDispatch)();
1173
+ let mapRef = (0, $9B3TU$macrostratmapboxreact.useMapRef)();
1174
+ const ref = (0, $9B3TU$react.useRef)();
1175
+ const parentRef = (0, $9B3TU$react.useRef)();
1176
+ // Keep track of map position for reloads
1177
+ (0, $9B3TU$react.useEffect)(()=>{
1178
+ console.log("Map updated", mapRef.current);
1179
+ }, [
1180
+ mapRef.current
1181
+ ]);
1182
+ (0, $9B3TU$react.useEffect)(()=>{
1183
+ if (style == null) return;
1184
+ if (mapRef.current != null) {
1185
+ console.log("Setting style", style);
1186
+ mapRef.current.setStyle(style);
1187
+ return;
1188
+ }
1189
+ const map = initializeMap(ref.current, {
1190
+ style: style,
1191
+ projection: projection,
1192
+ mapPosition: mapPosition,
1193
+ ...rest
1194
+ });
1195
+ map.setPadding((0, $3490fc4f4bda12f7$export$bb78f9f01775eef1)(ref, parentRef), {
1196
+ animate: false
1197
+ });
1198
+ map.on("style.load", ()=>{
1199
+ onStyleLoaded?.(map);
1200
+ dispatch({
1201
+ type: "set-style-loaded",
1202
+ payload: true
1203
+ });
1204
+ });
1205
+ onMapLoaded?.(map);
1206
+ dispatch({
1207
+ type: "set-map",
1208
+ payload: map
1209
+ });
1210
+ }, [
1211
+ style
1212
+ ]);
1213
+ // Map style updating
1214
+ // useEffect(() => {
1215
+ // if (mapRef?.current == null || style == null) return;
1216
+ // mapRef?.current?.setStyle(style);
1217
+ // }, [mapRef.current, style]);
1218
+ // Set map position if it changes
1219
+ // useEffect(() => {
1220
+ // const map = mapRef.current;
1221
+ // if (map == null || mapPosition == null) return;
1222
+ // setMapPosition(map, mapPosition);
1223
+ // }, [mapPosition]);
1224
+ const _computedMapPosition = (0, $9B3TU$macrostratmapboxreact.useMapPosition)();
1225
+ const { mapUse3D: mapUse3D, mapIsRotated: mapIsRotated } = (0, $9B3TU$macrostratmapboxutils.mapViewInfo)(_computedMapPosition);
1226
+ // Get map projection
1227
+ const _projection = mapRef.current?.getProjection()?.name ?? "mercator";
1228
+ const className = (0, ($parcel$interopDefault($9B3TU$classnames)))({
1229
+ "is-rotated": mapIsRotated ?? false,
1230
+ "is-3d-available": mapUse3D ?? false
1231
+ }, `${_projection}-projection`);
1232
+ return $12b6032029db16d4$var$h("div.map-view-container.main-view", {
1233
+ ref: parentRef
1234
+ }, [
1235
+ $12b6032029db16d4$var$h("div.mapbox-map#map", {
1236
+ ref: ref,
1237
+ className: className
1238
+ }),
1239
+ $12b6032029db16d4$var$h((0, $2611a7b4364593e5$export$e57f9eaa51773f82), {
1240
+ ignoredSources: [
1241
+ "elevationMarker",
1242
+ "crossSectionEndpoints"
1243
+ ]
1244
+ }),
1245
+ $12b6032029db16d4$var$h((0, $2611a7b4364593e5$export$f6eeee399afc4e9a), {
1246
+ onMapMoved: onMapMoved
1247
+ }),
1248
+ $12b6032029db16d4$var$h((0, $2611a7b4364593e5$export$31b2e088aff2dc5d), {
1249
+ containerRef: ref
1250
+ }),
1251
+ $12b6032029db16d4$var$h((0, $2611a7b4364593e5$export$2ab96428dea558d6), {
1252
+ containerRef: ref,
1253
+ parentRef: parentRef,
1254
+ infoMarkerPosition: infoMarkerPosition
1255
+ }),
1256
+ $12b6032029db16d4$var$h($12b6032029db16d4$export$cee395a8a2a00b29, {
1257
+ mapUse3D: mapUse3D,
1258
+ terrainSourceID: terrainSourceID
1259
+ }),
1260
+ children
1261
+ ]);
1262
+ }
1263
+ function $12b6032029db16d4$export$cee395a8a2a00b29({ mapUse3D: mapUse3D, terrainSourceID: terrainSourceID }) {
1264
+ const mapRef = (0, $9B3TU$macrostratmapboxreact.useMapRef)();
1265
+ (0, $9B3TU$react.useEffect)(()=>{
1266
+ const map = mapRef.current;
1267
+ if (map == null) return;
1268
+ (0, $ecfbeec2ae4211a4$export$b730542ee281c4b1)(map, mapUse3D, terrainSourceID);
1269
+ }, [
1270
+ mapRef.current,
1271
+ mapUse3D
1272
+ ]);
1273
+ return null;
1274
+ }
1275
+
1276
+
1277
+ var $33088e8384af337c$exports = {};
1278
+
1279
+ $parcel$export($33088e8384af337c$exports, "feature-panel", () => $33088e8384af337c$export$d27ce8c17b289f33, (v) => $33088e8384af337c$export$d27ce8c17b289f33 = v);
1280
+ $parcel$export($33088e8384af337c$exports, "key-value", () => $33088e8384af337c$export$6025d8aaa4edba3b, (v) => $33088e8384af337c$export$6025d8aaa4edba3b = v);
1281
+ $parcel$export($33088e8384af337c$exports, "key", () => $33088e8384af337c$export$df61b30b684217c0, (v) => $33088e8384af337c$export$df61b30b684217c0 = v);
1282
+ $parcel$export($33088e8384af337c$exports, "value", () => $33088e8384af337c$export$2ab9a8f9f1186f14, (v) => $33088e8384af337c$export$2ab9a8f9f1186f14 = v);
1283
+ $parcel$export($33088e8384af337c$exports, "feature-properties", () => $33088e8384af337c$export$4f7f4a0a9b87a0a1, (v) => $33088e8384af337c$export$4f7f4a0a9b87a0a1 = v);
1284
+ $parcel$export($33088e8384af337c$exports, "feature-header", () => $33088e8384af337c$export$435bd1864bef6e22, (v) => $33088e8384af337c$export$435bd1864bef6e22 = v);
1285
+ $parcel$export($33088e8384af337c$exports, "feature-group", () => $33088e8384af337c$export$a1386d43b662271, (v) => $33088e8384af337c$export$a1386d43b662271 = v);
1286
+ $parcel$export($33088e8384af337c$exports, "tile-info", () => $33088e8384af337c$export$1ea80fe0e5d4f6be, (v) => $33088e8384af337c$export$1ea80fe0e5d4f6be = v);
1287
+ $parcel$export($33088e8384af337c$exports, "opacity-slider", () => $33088e8384af337c$export$802c81ec652235aa, (v) => $33088e8384af337c$export$802c81ec652235aa = v);
1288
+ $parcel$export($33088e8384af337c$exports, "unit-number", () => $33088e8384af337c$export$ce32b714ddd6b59, (v) => $33088e8384af337c$export$ce32b714ddd6b59 = v);
1289
+ $parcel$export($33088e8384af337c$exports, "unit", () => $33088e8384af337c$export$523c0b569236b342, (v) => $33088e8384af337c$export$523c0b569236b342 = v);
1290
+ $parcel$export($33088e8384af337c$exports, "page", () => $33088e8384af337c$export$523fb3936f49e028, (v) => $33088e8384af337c$export$523fb3936f49e028 = v);
1291
+ $parcel$export($33088e8384af337c$exports, "dev-index-page", () => $33088e8384af337c$export$ee954d6f5e1b21cc, (v) => $33088e8384af337c$export$ee954d6f5e1b21cc = v);
1292
+ var $33088e8384af337c$export$d27ce8c17b289f33;
1293
+ var $33088e8384af337c$export$6025d8aaa4edba3b;
1294
+ var $33088e8384af337c$export$df61b30b684217c0;
1295
+ var $33088e8384af337c$export$2ab9a8f9f1186f14;
1296
+ var $33088e8384af337c$export$4f7f4a0a9b87a0a1;
1297
+ var $33088e8384af337c$export$435bd1864bef6e22;
1298
+ var $33088e8384af337c$export$a1386d43b662271;
1299
+ var $33088e8384af337c$export$1ea80fe0e5d4f6be;
1300
+ var $33088e8384af337c$export$802c81ec652235aa;
1301
+ var $33088e8384af337c$export$ce32b714ddd6b59;
1302
+ var $33088e8384af337c$export$523c0b569236b342;
1303
+ var $33088e8384af337c$export$523fb3936f49e028;
1304
+ var $33088e8384af337c$export$ee954d6f5e1b21cc;
1305
+ $33088e8384af337c$export$d27ce8c17b289f33 = "feature-panel_48e225";
1306
+ $33088e8384af337c$export$6025d8aaa4edba3b = "key-value_48e225";
1307
+ $33088e8384af337c$export$df61b30b684217c0 = "key_48e225";
1308
+ $33088e8384af337c$export$2ab9a8f9f1186f14 = "value_48e225";
1309
+ $33088e8384af337c$export$4f7f4a0a9b87a0a1 = "feature-properties_48e225";
1310
+ $33088e8384af337c$export$435bd1864bef6e22 = "feature-header_48e225";
1311
+ $33088e8384af337c$export$a1386d43b662271 = "feature-group_48e225";
1312
+ $33088e8384af337c$export$1ea80fe0e5d4f6be = "tile-info_48e225";
1313
+ $33088e8384af337c$export$802c81ec652235aa = "opacity-slider_48e225";
1314
+ $33088e8384af337c$export$ce32b714ddd6b59 = "unit-number_48e225";
1315
+ $33088e8384af337c$export$523c0b569236b342 = "unit_48e225";
1316
+ $33088e8384af337c$export$523fb3936f49e028 = "page_48e225";
1317
+ $33088e8384af337c$export$ee954d6f5e1b21cc = "dev-index-page_48e225";
1318
+
1319
+
1320
+ var $abbe8d0af34cbbed$exports = {};
1321
+
1322
+ $parcel$export($abbe8d0af34cbbed$exports, "TileExtentLayer", () => $abbe8d0af34cbbed$export$86c09739b12f23cd);
1323
+
1324
+
1325
+
1326
+ function $abbe8d0af34cbbed$export$86c09739b12f23cd({ tile: tile, color: color = "red" }) {
1327
+ const styleCallback = (0, $9B3TU$react.useCallback)((map, val)=>{
1328
+ const style = map.getStyle();
1329
+ if (style.layers == null) return;
1330
+ style.layers = style.layers.filter((l)=>l.id != "tile-extent");
1331
+ if (val == null) return map.setStyle(style);
1332
+ const { x: x, y: y, z: z } = val;
1333
+ const extent = (0, $9B3TU$mapboxtilebelt.tileToGeoJSON)([
1334
+ x,
1335
+ y,
1336
+ z
1337
+ ]);
1338
+ const source = {
1339
+ type: "geojson",
1340
+ data: extent
1341
+ };
1342
+ const layer = {
1343
+ id: "tile-extent",
1344
+ type: "line",
1345
+ source: "tile-extent",
1346
+ paint: {
1347
+ "line-color": color,
1348
+ "line-width": 2
1349
+ }
1350
+ };
1351
+ style.sources["tile-extent"] = source;
1352
+ style.layers.push(layer);
1353
+ map.setStyle(style);
1354
+ }, [
1355
+ color
1356
+ ]);
1357
+ const map = (0, $9B3TU$macrostratmapboxreact.useMapRef)();
1358
+ (0, $9B3TU$macrostratmapboxreact.useMapConditionalStyle)(map, tile, styleCallback);
1359
+ return null;
1360
+ }
1361
+
1362
+
1363
+ var $db14eb7a5c07abdb$exports = {};
1364
+
1365
+ $parcel$export($db14eb7a5c07abdb$exports, "FeatureProperties", () => $db14eb7a5c07abdb$export$2906e7f4b228efe9);
1366
+ $parcel$export($db14eb7a5c07abdb$exports, "FeatureRecord", () => $db14eb7a5c07abdb$export$dc87b4d46cea200d);
1367
+ $parcel$export($db14eb7a5c07abdb$exports, "FeatureSelectionHandler", () => $db14eb7a5c07abdb$export$214daccdda0f4ac6);
1368
+ $parcel$export($db14eb7a5c07abdb$exports, "Features", () => $db14eb7a5c07abdb$export$617d79dae526d2cf);
1369
+ $parcel$export($db14eb7a5c07abdb$exports, "TileInfo", () => $db14eb7a5c07abdb$export$43c75dec9d0b96c);
1370
+ $parcel$export($db14eb7a5c07abdb$exports, "FeaturePanel", () => $db14eb7a5c07abdb$export$43277c51a01761c1);
1371
+
1372
+
1373
+
1374
+
1375
+
1376
+
1377
+
1378
+ var $750d69d73bfbdc9a$exports = {};
1379
+
1380
+ $parcel$export($750d69d73bfbdc9a$exports, "ExpansionPanelSummary", () => $750d69d73bfbdc9a$export$cea00a9d724d5a32);
1381
+ $parcel$export($750d69d73bfbdc9a$exports, "InfoPanelSection", () => $750d69d73bfbdc9a$export$39c134eb0b07cf0e);
1382
+ $parcel$export($750d69d73bfbdc9a$exports, "ExpansionPanel", () => $750d69d73bfbdc9a$export$40e646e38e6ed100);
1383
+ $parcel$export($750d69d73bfbdc9a$exports, "SubExpansionPanel", () => $750d69d73bfbdc9a$export$d7160281aff7c3b8);
1384
+ $parcel$export($750d69d73bfbdc9a$exports, "ExpandableDetailsPanel", () => $750d69d73bfbdc9a$export$44ad9ff780615135);
1385
+ $parcel$export($750d69d73bfbdc9a$exports, "ExpansionBody", () => $750d69d73bfbdc9a$export$263416b670b3f129);
1386
+ $parcel$export($750d69d73bfbdc9a$exports, "PanelSubhead", () => $a0970d22776f9f4c$export$ed081779ec3709aa);
1387
+
1388
+
1389
+
1390
+ var $b1c160aff794b8f5$exports = {};
1391
+
1392
+ $parcel$export($b1c160aff794b8f5$exports, "panel-subhead", () => $b1c160aff794b8f5$export$bb6008c7ec506dc5, (v) => $b1c160aff794b8f5$export$bb6008c7ec506dc5 = v);
1393
+ $parcel$export($b1c160aff794b8f5$exports, "title", () => $b1c160aff794b8f5$export$fb184b623420d9be, (v) => $b1c160aff794b8f5$export$fb184b623420d9be = v);
1394
+ $parcel$export($b1c160aff794b8f5$exports, "info-panel-section", () => $b1c160aff794b8f5$export$198bd65f1c7a5309, (v) => $b1c160aff794b8f5$export$198bd65f1c7a5309 = v);
1395
+ $parcel$export($b1c160aff794b8f5$exports, "expansion-panel", () => $b1c160aff794b8f5$export$1db06abc8684077f, (v) => $b1c160aff794b8f5$export$1db06abc8684077f = v);
1396
+ $parcel$export($b1c160aff794b8f5$exports, "sub-expansion-panel", () => $b1c160aff794b8f5$export$e1943f56d410f24c, (v) => $b1c160aff794b8f5$export$e1943f56d410f24c = v);
1397
+ $parcel$export($b1c160aff794b8f5$exports, "expansion-panel-header", () => $b1c160aff794b8f5$export$771f363b9f663d2c, (v) => $b1c160aff794b8f5$export$771f363b9f663d2c = v);
1398
+ $parcel$export($b1c160aff794b8f5$exports, "expansion-summary-title-help", () => $b1c160aff794b8f5$export$47b2fa26e88e0093, (v) => $b1c160aff794b8f5$export$47b2fa26e88e0093 = v);
1399
+ $parcel$export($b1c160aff794b8f5$exports, "expansion-children", () => $b1c160aff794b8f5$export$d8457cb7ae0c47fd, (v) => $b1c160aff794b8f5$export$d8457cb7ae0c47fd = v);
1400
+ $parcel$export($b1c160aff794b8f5$exports, "expansion-panel-subtext", () => $b1c160aff794b8f5$export$f3447611ed163f53, (v) => $b1c160aff794b8f5$export$f3447611ed163f53 = v);
1401
+ $parcel$export($b1c160aff794b8f5$exports, "expandable-details-main", () => $b1c160aff794b8f5$export$561f0c2134cd9732, (v) => $b1c160aff794b8f5$export$561f0c2134cd9732 = v);
1402
+ $parcel$export($b1c160aff794b8f5$exports, "expandable-details-header", () => $b1c160aff794b8f5$export$ec357a59e90ee7ee, (v) => $b1c160aff794b8f5$export$ec357a59e90ee7ee = v);
1403
+ $parcel$export($b1c160aff794b8f5$exports, "expandable-details-children", () => $b1c160aff794b8f5$export$ae8d16cb87fbdc31, (v) => $b1c160aff794b8f5$export$ae8d16cb87fbdc31 = v);
1404
+ $parcel$export($b1c160aff794b8f5$exports, "expandable-details-toggle", () => $b1c160aff794b8f5$export$1089a6d45649b54c, (v) => $b1c160aff794b8f5$export$1089a6d45649b54c = v);
1405
+ $parcel$export($b1c160aff794b8f5$exports, "expandable-details", () => $b1c160aff794b8f5$export$20a01d7b55fba18b, (v) => $b1c160aff794b8f5$export$20a01d7b55fba18b = v);
1406
+ $parcel$export($b1c160aff794b8f5$exports, "macrostrat-unit", () => $b1c160aff794b8f5$export$fcdb9e479e3129ed, (v) => $b1c160aff794b8f5$export$fcdb9e479e3129ed = v);
1407
+ $parcel$export($b1c160aff794b8f5$exports, "expansion-body", () => $b1c160aff794b8f5$export$2d112e83849a3cf7, (v) => $b1c160aff794b8f5$export$2d112e83849a3cf7 = v);
1408
+ $parcel$export($b1c160aff794b8f5$exports, "expansion-panel-detail-header", () => $b1c160aff794b8f5$export$854d9fad3b5263eb, (v) => $b1c160aff794b8f5$export$854d9fad3b5263eb = v);
1409
+ $parcel$export($b1c160aff794b8f5$exports, "expansion-panel-detail-body", () => $b1c160aff794b8f5$export$494f9067c39d24ef, (v) => $b1c160aff794b8f5$export$494f9067c39d24ef = v);
1410
+ var $b1c160aff794b8f5$export$bb6008c7ec506dc5;
1411
+ var $b1c160aff794b8f5$export$fb184b623420d9be;
1412
+ var $b1c160aff794b8f5$export$198bd65f1c7a5309;
1413
+ var $b1c160aff794b8f5$export$1db06abc8684077f;
1414
+ var $b1c160aff794b8f5$export$e1943f56d410f24c;
1415
+ var $b1c160aff794b8f5$export$771f363b9f663d2c;
1416
+ var $b1c160aff794b8f5$export$47b2fa26e88e0093;
1417
+ var $b1c160aff794b8f5$export$d8457cb7ae0c47fd;
1418
+ var $b1c160aff794b8f5$export$f3447611ed163f53;
1419
+ var $b1c160aff794b8f5$export$561f0c2134cd9732;
1420
+ var $b1c160aff794b8f5$export$ec357a59e90ee7ee;
1421
+ var $b1c160aff794b8f5$export$ae8d16cb87fbdc31;
1422
+ var $b1c160aff794b8f5$export$1089a6d45649b54c;
1423
+ var $b1c160aff794b8f5$export$20a01d7b55fba18b;
1424
+ var $b1c160aff794b8f5$export$fcdb9e479e3129ed;
1425
+ var $b1c160aff794b8f5$export$2d112e83849a3cf7;
1426
+ var $b1c160aff794b8f5$export$854d9fad3b5263eb;
1427
+ var $b1c160aff794b8f5$export$494f9067c39d24ef;
1428
+ $b1c160aff794b8f5$export$bb6008c7ec506dc5 = "panel-subhead_1340c8";
1429
+ $b1c160aff794b8f5$export$fb184b623420d9be = "title_1340c8";
1430
+ $b1c160aff794b8f5$export$198bd65f1c7a5309 = "info-panel-section_1340c8";
1431
+ $b1c160aff794b8f5$export$1db06abc8684077f = "expansion-panel_1340c8";
1432
+ $b1c160aff794b8f5$export$e1943f56d410f24c = "sub-expansion-panel_1340c8";
1433
+ $b1c160aff794b8f5$export$771f363b9f663d2c = "expansion-panel-header_1340c8";
1434
+ $b1c160aff794b8f5$export$47b2fa26e88e0093 = "expansion-summary-title-help_1340c8";
1435
+ $b1c160aff794b8f5$export$d8457cb7ae0c47fd = "expansion-children_1340c8";
1436
+ $b1c160aff794b8f5$export$f3447611ed163f53 = "expansion-panel-subtext_1340c8";
1437
+ $b1c160aff794b8f5$export$561f0c2134cd9732 = "expandable-details-main_1340c8";
1438
+ $b1c160aff794b8f5$export$ec357a59e90ee7ee = "expandable-details-header_1340c8";
1439
+ $b1c160aff794b8f5$export$ae8d16cb87fbdc31 = "expandable-details-children_1340c8";
1440
+ $b1c160aff794b8f5$export$1089a6d45649b54c = "expandable-details-toggle_1340c8";
1441
+ $b1c160aff794b8f5$export$20a01d7b55fba18b = "expandable-details_1340c8";
1442
+ $b1c160aff794b8f5$export$fcdb9e479e3129ed = "macrostrat-unit_1340c8";
1443
+ $b1c160aff794b8f5$export$2d112e83849a3cf7 = "expansion-body_1340c8";
1444
+ $b1c160aff794b8f5$export$854d9fad3b5263eb = "expansion-panel-detail-header_1340c8";
1445
+ $b1c160aff794b8f5$export$494f9067c39d24ef = "expansion-panel-detail-body_1340c8";
1446
+
1447
+
1448
+
1449
+
1450
+
1451
+ const $a0970d22776f9f4c$var$h = (0, ($parcel$interopDefault($9B3TU$macrostrathyper))).styled((0, (/*@__PURE__*/$parcel$interopDefault($b1c160aff794b8f5$exports))));
1452
+ function $a0970d22776f9f4c$export$ed081779ec3709aa(props) {
1453
+ const { title: title, component: component = "h3", children: children, ...rest } = props;
1454
+ return $a0970d22776f9f4c$var$h("div.panel-subhead", rest, [
1455
+ $a0970d22776f9f4c$var$h(component, {
1456
+ className: "title"
1457
+ }, title),
1458
+ children
1459
+ ]);
1460
+ }
1461
+
1462
+
1463
+ const $750d69d73bfbdc9a$var$h = (0, ($parcel$interopDefault($9B3TU$macrostrathyper))).styled((0, (/*@__PURE__*/$parcel$interopDefault($b1c160aff794b8f5$exports))));
1464
+ function $750d69d73bfbdc9a$export$cea00a9d724d5a32(props) {
1465
+ const { expanded: expanded, children: children, onChange: onChange, className: className, title: title, titleComponent: titleComponent } = props;
1466
+ const icon = expanded ? "chevron-up" : "chevron-down";
1467
+ return $750d69d73bfbdc9a$var$h((0, $a0970d22776f9f4c$export$ed081779ec3709aa), {
1468
+ className: (0, ($parcel$interopDefault($9B3TU$classnames)))("expansion-panel-header", className),
1469
+ onClick: onChange,
1470
+ title: title,
1471
+ component: titleComponent
1472
+ }, [
1473
+ children,
1474
+ $750d69d73bfbdc9a$var$h((0, $9B3TU$blueprintjscore.Icon), {
1475
+ icon: icon
1476
+ })
1477
+ ]);
1478
+ }
1479
+ function $750d69d73bfbdc9a$var$ExpansionPanelBase(props) {
1480
+ let { title: title, titleComponent: titleComponent = "h3", children: children, expanded: expanded, helpText: helpText, onChange: onChange = ()=>{}, sideComponent: sideComponent = null, className: className } = props;
1481
+ const [isOpen, setOpen] = (0, $9B3TU$react.useState)(expanded || false);
1482
+ const onChange_ = ()=>{
1483
+ onChange();
1484
+ setOpen(!isOpen);
1485
+ };
1486
+ return $750d69d73bfbdc9a$var$h("div.expansion-panel-base", {
1487
+ className: (0, ($parcel$interopDefault($9B3TU$classnames)))(className, {
1488
+ expanded: isOpen,
1489
+ collapsed: !isOpen
1490
+ })
1491
+ }, [
1492
+ $750d69d73bfbdc9a$var$h($750d69d73bfbdc9a$export$cea00a9d724d5a32, {
1493
+ onChange: onChange_,
1494
+ expanded: isOpen,
1495
+ title: title,
1496
+ titleComponent: titleComponent
1497
+ }, $750d69d73bfbdc9a$var$h("div.expansion-summary-title-help", [
1498
+ $750d69d73bfbdc9a$var$h("span.expansion-panel-subtext", helpText),
1499
+ " ",
1500
+ sideComponent
1501
+ ])),
1502
+ $750d69d73bfbdc9a$var$h((0, $9B3TU$blueprintjscore.Collapse), {
1503
+ isOpen: isOpen
1504
+ }, $750d69d73bfbdc9a$var$h("div.expansion-children", null, children))
1505
+ ]);
1506
+ }
1507
+ function $750d69d73bfbdc9a$export$39c134eb0b07cf0e(props) {
1508
+ let { title: title, children: children, className: className, headerElement: headerElement = null } = props;
1509
+ return $750d69d73bfbdc9a$var$h("div.info-panel-section", {
1510
+ className: className
1511
+ }, [
1512
+ $750d69d73bfbdc9a$var$h("div.panel-subhead", null, headerElement ?? $750d69d73bfbdc9a$var$h("h3", title)),
1513
+ $750d69d73bfbdc9a$var$h("div.panel-content", null, children)
1514
+ ]);
1515
+ }
1516
+ function $750d69d73bfbdc9a$export$40e646e38e6ed100(props) {
1517
+ return $750d69d73bfbdc9a$var$h($750d69d73bfbdc9a$var$ExpansionPanelBase, {
1518
+ ...props,
1519
+ className: "expansion-panel"
1520
+ });
1521
+ }
1522
+ function $750d69d73bfbdc9a$export$d7160281aff7c3b8(props) {
1523
+ return $750d69d73bfbdc9a$var$h($750d69d73bfbdc9a$var$ExpansionPanelBase, {
1524
+ ...props,
1525
+ className: "expansion-panel sub-expansion-panel",
1526
+ titleComponent: "h4"
1527
+ });
1528
+ }
1529
+ function $750d69d73bfbdc9a$export$44ad9ff780615135(props) {
1530
+ let { title: title, children: children, value: value, headerElement: headerElement, className: className } = props;
1531
+ const [isOpen, setIsOpen] = (0, $9B3TU$react.useState)(false);
1532
+ headerElement ??= $750d69d73bfbdc9a$var$h([
1533
+ $750d69d73bfbdc9a$var$h("div.title", title),
1534
+ value
1535
+ ]);
1536
+ return $750d69d73bfbdc9a$var$h("div.expandable-details", {
1537
+ className: className
1538
+ }, [
1539
+ $750d69d73bfbdc9a$var$h("div.expandable-details-main", [
1540
+ $750d69d73bfbdc9a$var$h("div.expandable-details-header", headerElement),
1541
+ $750d69d73bfbdc9a$var$h("div.expandable-details-toggle", [
1542
+ $750d69d73bfbdc9a$var$h((0, $9B3TU$blueprintjscore.Button), {
1543
+ small: true,
1544
+ minimal: true,
1545
+ active: isOpen,
1546
+ onClick: ()=>setIsOpen(!isOpen),
1547
+ icon: "more"
1548
+ })
1549
+ ])
1550
+ ]),
1551
+ $750d69d73bfbdc9a$var$h((0, $9B3TU$blueprintjscore.Collapse), {
1552
+ isOpen: isOpen
1553
+ }, $750d69d73bfbdc9a$var$h("div.expandable-details-children", null, children))
1554
+ ]);
1555
+ }
1556
+ function $750d69d73bfbdc9a$export$263416b670b3f129({ title: title, className: className, children: children }) {
1557
+ return $750d69d73bfbdc9a$var$h("div.expansion-body", {
1558
+ className: className
1559
+ }, [
1560
+ $750d69d73bfbdc9a$var$h("div.expansion-panel-detail-header", title),
1561
+ $750d69d73bfbdc9a$var$h("div.expansion-panel-detail-body", null, children)
1562
+ ]);
1563
+ }
1564
+
1565
+
1566
+ const $db14eb7a5c07abdb$var$h = (0, ($parcel$interopDefault($9B3TU$macrostrathyper))).styled((0, (/*@__PURE__*/$parcel$interopDefault($33088e8384af337c$exports))));
1567
+ function $db14eb7a5c07abdb$export$2906e7f4b228efe9({ data: data, ...rest }) {
1568
+ return $db14eb7a5c07abdb$var$h("div.feature-properties", [
1569
+ $db14eb7a5c07abdb$var$h((0, $9B3TU$macrostratuicomponents.JSONView), {
1570
+ data: data,
1571
+ hideRoot: true,
1572
+ ...rest
1573
+ })
1574
+ ]);
1575
+ }
1576
+ function $db14eb7a5c07abdb$export$dc87b4d46cea200d({ feature: feature }) {
1577
+ const props = feature.properties;
1578
+ return $db14eb7a5c07abdb$var$h("div.feature-record", [
1579
+ $db14eb7a5c07abdb$var$h.if(Object.keys(props).length > 0)($db14eb7a5c07abdb$export$2906e7f4b228efe9, {
1580
+ data: props
1581
+ })
1582
+ ]);
1583
+ }
1584
+ function $db14eb7a5c07abdb$export$214daccdda0f4ac6({ selectedLocation: selectedLocation, setFeatures: setFeatures, radius: radius = 2 }) {
1585
+ const mapRef = (0, $9B3TU$macrostratmapboxreact.useMapRef)();
1586
+ const { isLoading: isLoading } = (0, $9B3TU$macrostratmapboxreact.useMapStatus)();
1587
+ const prevLocation = (0, $9B3TU$macrostratuicomponents.usePrevious)(selectedLocation);
1588
+ (0, $9B3TU$react.useEffect)(()=>{
1589
+ const map = mapRef?.current;
1590
+ if (map == null) return;
1591
+ if (selectedLocation == null) {
1592
+ setFeatures(null);
1593
+ return;
1594
+ }
1595
+ // Don't update if the location hasn't changed
1596
+ if (selectedLocation == prevLocation) return;
1597
+ const r = radius;
1598
+ const pt = map.project(selectedLocation);
1599
+ const bbox = [
1600
+ [
1601
+ pt.x - r,
1602
+ pt.y - r
1603
+ ],
1604
+ [
1605
+ pt.x + r,
1606
+ pt.y + r
1607
+ ]
1608
+ ];
1609
+ const features = map.queryRenderedFeatures(bbox);
1610
+ setFeatures(features);
1611
+ }, [
1612
+ mapRef.current,
1613
+ prevLocation?.current,
1614
+ selectedLocation,
1615
+ isLoading
1616
+ ]);
1617
+ return null;
1618
+ }
1619
+ function $db14eb7a5c07abdb$var$FeatureHeader({ feature: feature }) {
1620
+ return $db14eb7a5c07abdb$var$h("div.feature-header", [
1621
+ $db14eb7a5c07abdb$var$h("h3", [
1622
+ $db14eb7a5c07abdb$var$h($db14eb7a5c07abdb$var$KeyValue, {
1623
+ label: "Source",
1624
+ value: feature.source
1625
+ }),
1626
+ $db14eb7a5c07abdb$var$h($db14eb7a5c07abdb$var$KeyValue, {
1627
+ label: "Source layer",
1628
+ value: feature.sourceLayer
1629
+ })
1630
+ ])
1631
+ ]);
1632
+ }
1633
+ function $db14eb7a5c07abdb$var$KeyValue({ label: label, value: value }) {
1634
+ return $db14eb7a5c07abdb$var$h("span.key-value", [
1635
+ $db14eb7a5c07abdb$var$h("span.key", label),
1636
+ $db14eb7a5c07abdb$var$h("code.value", value)
1637
+ ]);
1638
+ }
1639
+ function $db14eb7a5c07abdb$var$LoadingAwareFeatureSet({ features: features, sourceID: sourceID }) {
1640
+ const map = (0, $9B3TU$macrostratmapboxreact.useMapRef)();
1641
+ if (map?.current == null) return null;
1642
+ const [isLoaded, setIsLoaded] = (0, $9B3TU$react.useState)(false);
1643
+ const sourceFeatures = features.filter((d)=>d.source == "burwell");
1644
+ (0, $9B3TU$react.useEffect)(()=>{
1645
+ if (sourceFeatures.length > 0) {
1646
+ setIsLoaded(true);
1647
+ return;
1648
+ }
1649
+ const isLoaded = map.current.isSourceLoaded(sourceID);
1650
+ setIsLoaded(isLoaded);
1651
+ if (!isLoaded) map.current.once("sourcedata", (e)=>{
1652
+ if (e.sourceId == sourceID) setIsLoaded(true);
1653
+ });
1654
+ }, [
1655
+ map.current,
1656
+ sourceID,
1657
+ sourceFeatures.length
1658
+ ]);
1659
+ if (!isLoaded) return $db14eb7a5c07abdb$var$h((0, $9B3TU$blueprintjscore.Spinner));
1660
+ return $db14eb7a5c07abdb$var$h($db14eb7a5c07abdb$export$617d79dae526d2cf, {
1661
+ features: sourceFeatures
1662
+ });
1663
+ }
1664
+ function $db14eb7a5c07abdb$export$43c75dec9d0b96c({ feature: feature, showExtent: showExtent, setShowExtent: setShowExtent }) {
1665
+ if (feature == null) return null;
1666
+ const size = feature._vectorTileFeature._pbf.length;
1667
+ return $db14eb7a5c07abdb$var$h("div.tile-info", [
1668
+ $db14eb7a5c07abdb$var$h("h3", "Tile"),
1669
+ $db14eb7a5c07abdb$var$h("div.tile-index", [
1670
+ $db14eb7a5c07abdb$var$h($db14eb7a5c07abdb$var$KeyValue, {
1671
+ label: "x",
1672
+ value: feature._x
1673
+ }),
1674
+ $db14eb7a5c07abdb$var$h($db14eb7a5c07abdb$var$KeyValue, {
1675
+ label: "y",
1676
+ value: feature._y
1677
+ }),
1678
+ $db14eb7a5c07abdb$var$h($db14eb7a5c07abdb$var$KeyValue, {
1679
+ label: "z",
1680
+ value: feature._z
1681
+ })
1682
+ ]),
1683
+ $db14eb7a5c07abdb$var$h("div.spacer"),
1684
+ $db14eb7a5c07abdb$var$h($db14eb7a5c07abdb$var$KeyValue, {
1685
+ label: "Size",
1686
+ value: $db14eb7a5c07abdb$var$formatSize(size)
1687
+ }),
1688
+ $db14eb7a5c07abdb$var$h((0, $9B3TU$blueprintjscore.Switch), {
1689
+ label: "Show extent",
1690
+ alignIndicator: "right",
1691
+ checked: showExtent,
1692
+ onChange () {
1693
+ setShowExtent(!showExtent);
1694
+ }
1695
+ })
1696
+ ]);
1697
+ }
1698
+ function $db14eb7a5c07abdb$var$formatSize(size) {
1699
+ if (size > 1000000) return $db14eb7a5c07abdb$var$h($db14eb7a5c07abdb$var$UnitNumber, {
1700
+ value: size / 1000000,
1701
+ unit: "Mb"
1702
+ });
1703
+ if (size > 1000) return $db14eb7a5c07abdb$var$h($db14eb7a5c07abdb$var$UnitNumber, {
1704
+ value: size / 1000,
1705
+ unit: "Kb"
1706
+ });
1707
+ return `${size} bytes`;
1708
+ }
1709
+ function $db14eb7a5c07abdb$var$UnitNumber({ value: value, unit: unit, precision: precision = 1 }) {
1710
+ return $db14eb7a5c07abdb$var$h("span.unit-number", [
1711
+ $db14eb7a5c07abdb$var$h("span.number", value.toFixed(precision)),
1712
+ $db14eb7a5c07abdb$var$h("span.unit", unit)
1713
+ ]);
1714
+ }
1715
+ function $db14eb7a5c07abdb$export$43277c51a01761c1({ features: features, focusedSource: focusedSource = null, focusedSourceTitle: focusedSourceTitle = null }) {
1716
+ if (features == null) return null;
1717
+ let focusedSourcePanel = null;
1718
+ let filteredFeatures = features;
1719
+ let title = "Features";
1720
+ if (focusedSource != null) {
1721
+ title = "Basemap features";
1722
+ focusedSourcePanel = $db14eb7a5c07abdb$var$h((0, $750d69d73bfbdc9a$export$40e646e38e6ed100), {
1723
+ title: "Macrostrat features",
1724
+ className: "macrostrat-features",
1725
+ expanded: true
1726
+ }, [
1727
+ $db14eb7a5c07abdb$var$h($db14eb7a5c07abdb$var$LoadingAwareFeatureSet, {
1728
+ features: features,
1729
+ sourceID: focusedSource
1730
+ })
1731
+ ]);
1732
+ filteredFeatures = features.filter((d)=>d.source != focusedSource);
1733
+ }
1734
+ return $db14eb7a5c07abdb$var$h("div.feature-panel", [
1735
+ focusedSourcePanel,
1736
+ $db14eb7a5c07abdb$var$h((0, $750d69d73bfbdc9a$export$40e646e38e6ed100), {
1737
+ title: title,
1738
+ className: "basemap-features",
1739
+ expanded: focusedSource == null
1740
+ }, [
1741
+ $db14eb7a5c07abdb$var$h($db14eb7a5c07abdb$var$FeatureGroups, {
1742
+ features: filteredFeatures
1743
+ })
1744
+ ])
1745
+ ]);
1746
+ }
1747
+ function $db14eb7a5c07abdb$var$FeatureGroups({ features: features }) {
1748
+ /** Group features by source and sourceLayer */ if (features == null) return null;
1749
+ const groups = (0, $9B3TU$d3array.group)(features, (d)=>`${d.source} - ${d.sourceLayer}`);
1750
+ return $db14eb7a5c07abdb$var$h("div.feature-groups", Array.from(groups).map(([key, features])=>{
1751
+ return $db14eb7a5c07abdb$var$h("div.feature-group", [
1752
+ $db14eb7a5c07abdb$var$h($db14eb7a5c07abdb$var$FeatureHeader, {
1753
+ feature: features[0]
1754
+ }),
1755
+ $db14eb7a5c07abdb$var$h($db14eb7a5c07abdb$export$617d79dae526d2cf, {
1756
+ features: features
1757
+ })
1758
+ ]);
1759
+ }));
1760
+ }
1761
+ function $db14eb7a5c07abdb$export$617d79dae526d2cf({ features: features }) {
1762
+ return $db14eb7a5c07abdb$var$h("div.features", features.map((feature, i)=>$db14eb7a5c07abdb$var$h($db14eb7a5c07abdb$export$dc87b4d46cea200d, {
1763
+ key: i,
1764
+ feature: feature
1765
+ })));
1766
+ }
1767
+
1768
+
1769
+ const $6f5ca387ac26c0b5$export$dda1d9f60106f0e9 = (0, ($parcel$interopDefault($9B3TU$macrostrathyper))).styled((0, (/*@__PURE__*/$parcel$interopDefault($33088e8384af337c$exports))));
1770
+ function $6f5ca387ac26c0b5$export$c5febf3ae8816972({ title: title = "Map inspector", headerElement: headerElement = null, transformRequest: transformRequest = null, mapPosition: mapPosition = null, mapboxToken: mapboxToken = null, overlayStyle: overlayStyle = null, children: children, style: style, focusedSource: focusedSource = null, focusedSourceTitle: focusedSourceTitle = null, fitViewport: fitViewport = true, projection: projection = null }) {
1771
+ /* We apply a custom style to the panel container when we are interacting
1772
+ with the search bar, so that we can block map interactions until search
1773
+ bar focus is lost.
1774
+ We also apply a custom style when the infodrawer is open so we can hide
1775
+ the search bar on mobile platforms
1776
+ */ const dark = (0, $9B3TU$macrostratuicomponents.useDarkMode)();
1777
+ const isEnabled = dark?.isEnabled;
1778
+ if (mapboxToken != null) (0, ($parcel$interopDefault($9B3TU$mapboxgl))).accessToken = mapboxToken;
1779
+ style ??= isEnabled ? "mapbox://styles/mapbox/dark-v10" : "mapbox://styles/mapbox/light-v10";
1780
+ const [isOpen, setOpen] = (0, $9B3TU$react.useState)(false);
1781
+ const [state, setState] = (0, $9B3TU$macrostratuicomponents.useStoredState)("macrostrat:dev-map-page", {
1782
+ showTileExtent: false,
1783
+ xRay: false
1784
+ });
1785
+ const { showTileExtent: showTileExtent, xRay: xRay } = state;
1786
+ const [actualStyle, setActualStyle] = (0, $9B3TU$react.useState)(style);
1787
+ console.log("actualStyle", actualStyle);
1788
+ (0, $9B3TU$react.useEffect)(()=>{
1789
+ (0, $8646508ae99a5857$export$e739dc8dfc0db9a6)(style, overlayStyle, {
1790
+ mapboxToken: mapboxToken,
1791
+ inDarkMode: isEnabled,
1792
+ xRay: xRay
1793
+ }).then(setActualStyle);
1794
+ }, [
1795
+ style,
1796
+ xRay,
1797
+ mapboxToken,
1798
+ isEnabled,
1799
+ overlayStyle
1800
+ ]);
1801
+ const [inspectPosition, setInspectPosition] = (0, $9B3TU$react.useState)(null);
1802
+ const [data, setData] = (0, $9B3TU$react.useState)(null);
1803
+ const onSelectPosition = (0, $9B3TU$react.useCallback)((position)=>{
1804
+ setInspectPosition(position);
1805
+ }, []);
1806
+ let detailElement = null;
1807
+ if (inspectPosition != null) detailElement = $6f5ca387ac26c0b5$export$dda1d9f60106f0e9((0, $2bc7c1e4e7da7fdf$export$aa4baff5242ea6e1), {
1808
+ onClose () {
1809
+ setInspectPosition(null);
1810
+ },
1811
+ position: inspectPosition
1812
+ }, [
1813
+ $6f5ca387ac26c0b5$export$dda1d9f60106f0e9((0, $db14eb7a5c07abdb$export$43c75dec9d0b96c), {
1814
+ feature: data?.[0] ?? null,
1815
+ showExtent: showTileExtent,
1816
+ setShowExtent () {
1817
+ setState({
1818
+ ...state,
1819
+ showTileExtent: !showTileExtent
1820
+ });
1821
+ }
1822
+ }),
1823
+ $6f5ca387ac26c0b5$export$dda1d9f60106f0e9((0, $db14eb7a5c07abdb$export$43277c51a01761c1), {
1824
+ features: data,
1825
+ focusedSource: focusedSource,
1826
+ focusedSourceTitle: focusedSourceTitle
1827
+ })
1828
+ ]);
1829
+ let tile = null;
1830
+ if (showTileExtent && data?.[0] != null) {
1831
+ let f = data[0];
1832
+ tile = {
1833
+ x: f._x,
1834
+ y: f._y,
1835
+ z: f._z
1836
+ };
1837
+ }
1838
+ return $6f5ca387ac26c0b5$export$dda1d9f60106f0e9((0, $c3311f59335df34d$export$9fa5da0bcfd0a290), {
1839
+ navbar: $6f5ca387ac26c0b5$export$dda1d9f60106f0e9((0, $fce5fc950d1fe35b$export$a8cc0062d02a3841), [
1840
+ headerElement ?? $6f5ca387ac26c0b5$export$dda1d9f60106f0e9("h2", title),
1841
+ $6f5ca387ac26c0b5$export$dda1d9f60106f0e9((0, $9B3TU$macrostratuicomponents.Spacer)),
1842
+ $6f5ca387ac26c0b5$export$dda1d9f60106f0e9((0, $fce5fc950d1fe35b$export$9e3bae3c08bde368), {
1843
+ active: isOpen,
1844
+ onClick: ()=>setOpen(!isOpen)
1845
+ })
1846
+ ]),
1847
+ contextPanel: $6f5ca387ac26c0b5$export$dda1d9f60106f0e9((0, $c3311f59335df34d$export$ec68dd77edbe678b), [
1848
+ $6f5ca387ac26c0b5$export$dda1d9f60106f0e9((0, $9B3TU$blueprintjscore.Switch), {
1849
+ checked: xRay,
1850
+ label: "X-ray mode",
1851
+ onChange () {
1852
+ setState({
1853
+ ...state,
1854
+ xRay: !xRay
1855
+ });
1856
+ }
1857
+ }),
1858
+ children
1859
+ ]),
1860
+ detailPanel: detailElement,
1861
+ contextPanelOpen: isOpen,
1862
+ fitViewport: fitViewport
1863
+ }, $6f5ca387ac26c0b5$export$dda1d9f60106f0e9((0, $12b6032029db16d4$export$ab1e7a67d6ec5ad8), {
1864
+ style: actualStyle,
1865
+ transformRequest: transformRequest,
1866
+ mapPosition: mapPosition,
1867
+ projection: {
1868
+ name: "globe"
1869
+ },
1870
+ mapboxToken: mapboxToken
1871
+ }, [
1872
+ $6f5ca387ac26c0b5$export$dda1d9f60106f0e9((0, $db14eb7a5c07abdb$export$214daccdda0f4ac6), {
1873
+ selectedLocation: inspectPosition,
1874
+ setFeatures: setData
1875
+ }),
1876
+ $6f5ca387ac26c0b5$export$dda1d9f60106f0e9((0, $2611a7b4364593e5$export$5c90a91c7455938c), {
1877
+ position: inspectPosition,
1878
+ setPosition: onSelectPosition
1879
+ }),
1880
+ $6f5ca387ac26c0b5$export$dda1d9f60106f0e9((0, $abbe8d0af34cbbed$export$86c09739b12f23cd), {
1881
+ tile: tile,
1882
+ color: isEnabled ? "white" : "black"
1883
+ })
1884
+ ]));
1885
+ }
1886
+ const $6f5ca387ac26c0b5$export$2391061fbdfb71ef = $6f5ca387ac26c0b5$export$c5febf3ae8816972;
1887
+
1888
+
1889
+
1890
+
1891
+
1892
+ $parcel$exportWildcard($9acbb47bf7cb7660$exports, $6f5ca387ac26c0b5$exports);
1893
+ $parcel$exportWildcard($9acbb47bf7cb7660$exports, $abbe8d0af34cbbed$exports);
1894
+ $parcel$exportWildcard($9acbb47bf7cb7660$exports, $db14eb7a5c07abdb$exports);
1895
+ $parcel$exportWildcard($9acbb47bf7cb7660$exports, $8646508ae99a5857$exports);
1896
+
1897
+
1898
+
1899
+
1900
+
1901
+
1902
+
1903
+
1904
+
1905
+ $parcel$exportWildcard(module.exports, $fce5fc950d1fe35b$exports);
1906
+ $parcel$exportWildcard(module.exports, $2bc7c1e4e7da7fdf$exports);
1907
+ $parcel$exportWildcard(module.exports, $9acbb47bf7cb7660$exports);
1908
+ $parcel$exportWildcard(module.exports, $c3311f59335df34d$exports);
1909
+ $parcel$exportWildcard(module.exports, $12b6032029db16d4$exports);
1910
+ $parcel$exportWildcard(module.exports, $f333fe6f49373ca9$exports);
1911
+ $parcel$exportWildcard(module.exports, $2611a7b4364593e5$exports);
1912
+ $parcel$exportWildcard(module.exports, $3490fc4f4bda12f7$exports);
1913
+ $parcel$exportWildcard(module.exports, $860d9939f7032c69$exports);
1914
+ $parcel$exportWildcard(module.exports, $750d69d73bfbdc9a$exports);
1915
+
1916
+
1917
+ //# sourceMappingURL=main.cjs.map