@local-logic/maps 0.0.21 → 0.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index-B85VZGVP.js +56 -0
- package/dist/index-BRD3rjLE.js +138 -0
- package/dist/index-BpFpg_5A.js +78 -0
- package/dist/index-BrxP9NHZ.js +56 -0
- package/dist/{index-AcZakyxd.js → index-CN_dNOir.js} +168 -172
- package/dist/index-CRdDPWou.js +34 -0
- package/dist/{index-Dz1XJJEv.js → index-CSVsF1EQ.js} +28 -28
- package/dist/index-CceEGv05.js +104 -0
- package/dist/{index-DdYanSGw.js → index-CiWKwaC4.js} +2 -2
- package/dist/{index-6JzOJU8O.js → index-CmajMf1d.js} +21 -21
- package/dist/index-D5kHxP9H.js +43 -0
- package/dist/{index-29Y5fJR0.js → index-DNNz78Rc.js} +2 -2
- package/dist/index-Db33Ugg9.js +34 -0
- package/dist/index-DfhwDiOS.js +155 -0
- package/dist/index-arkRlpaR.js +80 -0
- package/dist/index-ufLC1PLO.js +57 -0
- package/dist/{index-Dxh7aMoG.js → index-vHMPqmOL.js} +2 -2
- package/dist/index.es.js +1 -1
- package/dist/{index.modern-fpUBOYPT.js → index.modern-B-ChKejQ.js} +9 -9
- package/dist/index.umd.js +115 -115
- package/dist/{logo-control-C5ZdRec5.js → logo-control-VgN6MEKI.js} +186 -206
- package/dist/{mapbox-gl-D6JObe4m.js → mapbox-gl-C6frO4Gl.js} +1877 -1877
- package/dist/{maplibre-gl-DDfJU6SR.js → maplibre-gl-DkDrZ6rP.js} +1230 -1228
- package/dist/{scale-control-Cflgzbvb.js → scale-control-jBKptTbw.js} +234 -252
- package/dist/style.css +1 -1
- package/dist/{styles-B8oT_wcC.js → styles-BR85tnqI.js} +16 -17
- package/package.json +2 -2
- package/dist/index-CHSsiFtN.js +0 -139
- package/dist/index-CqUTGwL0.js +0 -34
- package/dist/index-Cwn0dgP_.js +0 -56
- package/dist/index-D--WdzK4.js +0 -79
- package/dist/index-D1Phs0fA.js +0 -57
- package/dist/index-D1vI6Ww_.js +0 -43
- package/dist/index-DHHG0vNa.js +0 -157
- package/dist/index-DKFcZs0A.js +0 -81
- package/dist/index-DZTFM839.js +0 -105
- package/dist/index-_8n5sl1B.js +0 -56
- package/dist/index-_n1FGHXc.js +0 -34
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { useContext as
|
|
3
|
-
import { createPortal as
|
|
4
|
-
const
|
|
5
|
-
function
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
return M(() => ({ ...e, current: t == null ? void 0 : t.map }), [e, t]);
|
|
1
|
+
import * as v from "react";
|
|
2
|
+
import { useContext as S, useMemo as E, useLayoutEffect as q, useEffect as d, useState as B, useRef as M, useImperativeHandle as F, memo as b, forwardRef as N } from "react";
|
|
3
|
+
import { createPortal as j } from "react-dom";
|
|
4
|
+
const $ = v.createContext(null);
|
|
5
|
+
function ve() {
|
|
6
|
+
const e = S($)?.maps, t = S(T);
|
|
7
|
+
return E(() => ({ ...e, current: t?.map }), [e, t]);
|
|
9
8
|
}
|
|
10
|
-
function
|
|
9
|
+
function I(e) {
|
|
11
10
|
return {
|
|
12
11
|
longitude: e.center.lng,
|
|
13
12
|
latitude: e.center.lat,
|
|
@@ -18,62 +17,62 @@ function Q(e) {
|
|
|
18
17
|
elevation: e._centerAltitude
|
|
19
18
|
};
|
|
20
19
|
}
|
|
21
|
-
function
|
|
20
|
+
function G(e) {
|
|
22
21
|
return Number.isFinite(e.longitude) || Number.isFinite(e.latitude) || Number.isFinite(e.zoom) || Number.isFinite(e.pitch) || Number.isFinite(e.bearing);
|
|
23
22
|
}
|
|
24
|
-
function
|
|
23
|
+
function Q(e, t) {
|
|
25
24
|
return !!(Number.isFinite(t.longitude) && e.center.lng !== t.longitude || Number.isFinite(t.latitude) && e.center.lat !== t.latitude || Number.isFinite(t.bearing) && e.bearing !== t.bearing || Number.isFinite(t.pitch) && e.pitch !== t.pitch || Number.isFinite(t.zoom) && (e._seaLevelZoom ?? e.zoom) !== t.zoom || t.padding && !e.isPaddingEqual(t.padding));
|
|
26
25
|
}
|
|
27
|
-
function
|
|
26
|
+
function k() {
|
|
28
27
|
}
|
|
29
|
-
function
|
|
28
|
+
function K(e, t) {
|
|
30
29
|
const o = e._constrain, i = e._calcMatrices;
|
|
31
|
-
if (e._constrain =
|
|
30
|
+
if (e._constrain = k, e._calcMatrices = k, Number.isFinite(t.bearing) && (e.bearing = t.bearing), Number.isFinite(t.pitch) && (e.pitch = t.pitch), t.padding && !e.isPaddingEqual(t.padding) && (e.padding = t.padding), Number.isFinite(t.longitude) || Number.isFinite(t.latitude)) {
|
|
32
31
|
const n = e.center;
|
|
33
32
|
e._center = new n.constructor(t.longitude ?? n.lng, t.latitude ?? n.lat);
|
|
34
33
|
}
|
|
35
34
|
if (Number.isFinite(t.zoom))
|
|
36
35
|
if (e._centerAltitude = t.elevation ?? 0, e.elevation) {
|
|
37
36
|
e._seaLevelZoom = t.zoom;
|
|
38
|
-
const n = e.pixelsPerMeter / e.worldSize * e._centerAltitude, r = e._mercatorZfromZoom(t.zoom),
|
|
39
|
-
e._setZoom(e._zoomFromMercatorZ(
|
|
37
|
+
const n = e.pixelsPerMeter / e.worldSize * e._centerAltitude, r = e._mercatorZfromZoom(t.zoom), s = e._mercatorZfromZoom(e._maxZoom), a = Math.max(r - n, s);
|
|
38
|
+
e._setZoom(e._zoomFromMercatorZ(a));
|
|
40
39
|
} else
|
|
41
40
|
e._seaLevelZoom = null, e.zoom = t.zoom;
|
|
42
41
|
e._constrain = o, e._calcMatrices = i, e._unmodified || (e._constrain(), e._calcMatrices());
|
|
43
42
|
}
|
|
44
|
-
const
|
|
43
|
+
const J = /* @__PURE__ */ new Set([
|
|
45
44
|
"_calcMatrices",
|
|
46
45
|
"_calcFogMatrices",
|
|
47
46
|
"_updateCameraState",
|
|
48
47
|
"_updateSeaLevelZoom"
|
|
49
48
|
]);
|
|
50
|
-
function
|
|
49
|
+
function Y(e) {
|
|
51
50
|
let t = !1, o = {};
|
|
52
51
|
const i = e;
|
|
53
52
|
let n = null;
|
|
54
53
|
const r = {
|
|
55
|
-
get(
|
|
56
|
-
return
|
|
57
|
-
t &&
|
|
58
|
-
} : (t &&
|
|
59
|
-
n
|
|
60
|
-
} : t && n ? n[
|
|
54
|
+
get(s, a) {
|
|
55
|
+
return a === "$reactViewState" ? o : a === "$proposedTransform" ? n : a === "$internalUpdate" ? t : a === "_setZoom" ? (c) => {
|
|
56
|
+
t && n?.[a](c), Number.isFinite(o.zoom) || i[a](c);
|
|
57
|
+
} : (t && a === "_translateCameraConstrained" && G(o) && (n = n || i.clone()), J.has(a) ? function(...c) {
|
|
58
|
+
n?.[a](...c), i[a](...c);
|
|
59
|
+
} : t && n ? n[a] : i[a]);
|
|
61
60
|
},
|
|
62
|
-
set(
|
|
63
|
-
if (
|
|
64
|
-
return o = c,
|
|
65
|
-
if (
|
|
61
|
+
set(s, a, c) {
|
|
62
|
+
if (a === "$reactViewState")
|
|
63
|
+
return o = c, K(i, o), !0;
|
|
64
|
+
if (a === "$proposedTransform")
|
|
66
65
|
return n = c, !0;
|
|
67
|
-
if (
|
|
66
|
+
if (a === "$internalUpdate")
|
|
68
67
|
return t = c, !0;
|
|
69
68
|
let l = c;
|
|
70
|
-
return
|
|
69
|
+
return a === "center" || a === "_center" ? (Number.isFinite(o.longitude) || Number.isFinite(o.latitude)) && (l = new c.constructor(o.longitude ?? c.lng, o.latitude ?? c.lat)) : a === "zoom" || a === "_zoom" || a === "_seaLevelZoom" ? Number.isFinite(o.zoom) && (l = i[a]) : a === "_centerAltitude" ? Number.isFinite(o.elevation) && (l = i[a]) : a === "pitch" || a === "_pitch" ? Number.isFinite(o.pitch) && (l = i[a]) : (a === "bearing" || a === "rotation" || a === "angle") && Number.isFinite(o.bearing) && (l = i[a]), t && l !== c && (n = n || i.clone()), t && n && (n[a] = c), i[a] = l, !0;
|
|
71
70
|
}
|
|
72
71
|
};
|
|
73
72
|
return new Proxy(e, r);
|
|
74
73
|
}
|
|
75
|
-
const
|
|
76
|
-
function
|
|
74
|
+
const X = ["type", "source", "source-layer", "minzoom", "maxzoom", "filter", "layout"];
|
|
75
|
+
function A(e) {
|
|
77
76
|
if (!e)
|
|
78
77
|
return null;
|
|
79
78
|
if (typeof e == "string" || ("toJS" in e && (e = e.toJS()), !e.layers))
|
|
@@ -87,18 +86,18 @@ function Z(e) {
|
|
|
87
86
|
const r = t[i.ref];
|
|
88
87
|
if (r) {
|
|
89
88
|
n = n || Object.assign({}, i), delete n.ref;
|
|
90
|
-
for (const
|
|
91
|
-
|
|
89
|
+
for (const s of X)
|
|
90
|
+
s in r && (n[s] = r[s]);
|
|
92
91
|
}
|
|
93
92
|
return n || i;
|
|
94
93
|
});
|
|
95
94
|
return { ...e, layers: o };
|
|
96
95
|
}
|
|
97
|
-
function
|
|
96
|
+
function ee(e, t) {
|
|
98
97
|
const o = Array.isArray(e) ? e[0] : e ? e.x : 0, i = Array.isArray(e) ? e[1] : e ? e.y : 0, n = Array.isArray(t) ? t[0] : t ? t.x : 0, r = Array.isArray(t) ? t[1] : t ? t.y : 0;
|
|
99
98
|
return o === n && i === r;
|
|
100
99
|
}
|
|
101
|
-
function
|
|
100
|
+
function y(e, t) {
|
|
102
101
|
if (e === t)
|
|
103
102
|
return !0;
|
|
104
103
|
if (!e || !t)
|
|
@@ -107,7 +106,7 @@ function v(e, t) {
|
|
|
107
106
|
if (!Array.isArray(t) || e.length !== t.length)
|
|
108
107
|
return !1;
|
|
109
108
|
for (let o = 0; o < e.length; o++)
|
|
110
|
-
if (!
|
|
109
|
+
if (!y(e[o], t[o]))
|
|
111
110
|
return !1;
|
|
112
111
|
return !0;
|
|
113
112
|
} else if (Array.isArray(t))
|
|
@@ -117,13 +116,13 @@ function v(e, t) {
|
|
|
117
116
|
if (o.length !== i.length)
|
|
118
117
|
return !1;
|
|
119
118
|
for (const n of o)
|
|
120
|
-
if (!t.hasOwnProperty(n) || !
|
|
119
|
+
if (!t.hasOwnProperty(n) || !y(e[n], t[n]))
|
|
121
120
|
return !1;
|
|
122
121
|
return !0;
|
|
123
122
|
}
|
|
124
123
|
return !1;
|
|
125
124
|
}
|
|
126
|
-
const
|
|
125
|
+
const P = { version: 8, sources: {}, layers: [] }, Z = {
|
|
127
126
|
mousedown: "onMouseDown",
|
|
128
127
|
mouseup: "onMouseUp",
|
|
129
128
|
mouseover: "onMouseOver",
|
|
@@ -138,7 +137,7 @@ const O = { version: 8, sources: {}, layers: [] }, U = {
|
|
|
138
137
|
touchend: "onTouchEnd",
|
|
139
138
|
touchmove: "onTouchMove",
|
|
140
139
|
touchcancel: "onTouchCancel"
|
|
141
|
-
},
|
|
140
|
+
}, O = {
|
|
142
141
|
movestart: "onMoveStart",
|
|
143
142
|
move: "onMove",
|
|
144
143
|
moveend: "onMoveEnd",
|
|
@@ -154,7 +153,7 @@ const O = { version: 8, sources: {}, layers: [] }, U = {
|
|
|
154
153
|
pitchstart: "onPitchStart",
|
|
155
154
|
pitch: "onPitch",
|
|
156
155
|
pitchend: "onPitchEnd"
|
|
157
|
-
},
|
|
156
|
+
}, U = {
|
|
158
157
|
wheel: "onWheel",
|
|
159
158
|
boxzoomstart: "onBoxZoomStart",
|
|
160
159
|
boxzoomend: "onBoxZoomEnd",
|
|
@@ -168,7 +167,7 @@ const O = { version: 8, sources: {}, layers: [] }, U = {
|
|
|
168
167
|
styledata: "onStyleData",
|
|
169
168
|
sourcedata: "onSourceData",
|
|
170
169
|
error: "onError"
|
|
171
|
-
},
|
|
170
|
+
}, te = [
|
|
172
171
|
"minZoom",
|
|
173
172
|
"maxZoom",
|
|
174
173
|
"minPitch",
|
|
@@ -176,7 +175,7 @@ const O = { version: 8, sources: {}, layers: [] }, U = {
|
|
|
176
175
|
"maxBounds",
|
|
177
176
|
"projection",
|
|
178
177
|
"renderWorldCopies"
|
|
179
|
-
],
|
|
178
|
+
], ne = [
|
|
180
179
|
"scrollZoom",
|
|
181
180
|
"boxZoom",
|
|
182
181
|
"dragRotate",
|
|
@@ -186,7 +185,7 @@ const O = { version: 8, sources: {}, layers: [] }, U = {
|
|
|
186
185
|
"touchZoomRotate",
|
|
187
186
|
"touchPitch"
|
|
188
187
|
];
|
|
189
|
-
class
|
|
188
|
+
class L {
|
|
190
189
|
constructor(t, o, i) {
|
|
191
190
|
this._map = null, this._internalUpdate = !1, this._inRender = !1, this._hoveredFeatures = null, this._deferredEvents = {
|
|
192
191
|
move: !1,
|
|
@@ -194,16 +193,16 @@ class x {
|
|
|
194
193
|
pitch: !1,
|
|
195
194
|
rotate: !1
|
|
196
195
|
}, this._onEvent = (n) => {
|
|
197
|
-
const r = this.props[
|
|
196
|
+
const r = this.props[U[n.type]];
|
|
198
197
|
r ? r(n) : n.type === "error" && console.error(n.error);
|
|
199
198
|
}, this._onPointerEvent = (n) => {
|
|
200
199
|
(n.type === "mousemove" || n.type === "mouseout") && this._updateHover(n);
|
|
201
|
-
const r = this.props[
|
|
200
|
+
const r = this.props[Z[n.type]];
|
|
202
201
|
r && (this.props.interactiveLayerIds && n.type !== "mouseover" && n.type !== "mouseout" && (n.features = this._hoveredFeatures || this._queryRenderedFeatures(n.point)), r(n), delete n.features);
|
|
203
202
|
}, this._onCameraEvent = (n) => {
|
|
204
203
|
if (!this._internalUpdate) {
|
|
205
|
-
const r = this.props[
|
|
206
|
-
r && (n.viewState =
|
|
204
|
+
const r = this.props[O[n.type]], s = this._proxyTransform;
|
|
205
|
+
r && (n.viewState = I(s.$proposedTransform ?? s), r(n)), n.type === "moveend" && (s.$proposedTransform = null);
|
|
207
206
|
}
|
|
208
207
|
n.type in this._deferredEvents && (this._deferredEvents[n.type] = !1);
|
|
209
208
|
}, this._MapClass = t, this.props = o, this._initialize(i);
|
|
@@ -223,24 +222,24 @@ class x {
|
|
|
223
222
|
this._updateStyle(t, o), this._updateStyleComponents(t, o), this._updateHandlers(t, o), (i || n || r && !this._map.isMoving()) && this.redraw();
|
|
224
223
|
}
|
|
225
224
|
static reuse(t, o) {
|
|
226
|
-
const i =
|
|
225
|
+
const i = L.savedMaps.pop();
|
|
227
226
|
if (!i)
|
|
228
227
|
return null;
|
|
229
228
|
const n = i.map, r = n.getContainer();
|
|
230
229
|
for (o.className = r.className; r.childNodes.length > 0; )
|
|
231
230
|
o.appendChild(r.childNodes[0]);
|
|
232
231
|
n._container = o, i.setProps({ ...t, styleDiffing: !1 }), n.resize();
|
|
233
|
-
const { initialViewState:
|
|
234
|
-
return
|
|
232
|
+
const { initialViewState: s } = t;
|
|
233
|
+
return s && (s.bounds ? n.fitBounds(s.bounds, { ...s.fitBoundsOptions, duration: 0 }) : i._updateViewState(s, !1)), n.isStyleLoaded() ? n.fire("load") : n.once("styledata", () => n.fire("load")), n._update(), i;
|
|
235
234
|
}
|
|
236
235
|
/* eslint-disable complexity,max-statements */
|
|
237
236
|
_initialize(t) {
|
|
238
|
-
const { props: o } = this, { mapStyle: i =
|
|
237
|
+
const { props: o } = this, { mapStyle: i = P } = o, n = {
|
|
239
238
|
...o,
|
|
240
239
|
...o.initialViewState,
|
|
241
|
-
accessToken: o.mapboxAccessToken ||
|
|
240
|
+
accessToken: o.mapboxAccessToken || oe() || null,
|
|
242
241
|
container: t,
|
|
243
|
-
style:
|
|
242
|
+
style: A(i)
|
|
244
243
|
}, r = n.initialViewState || n.viewState || n;
|
|
245
244
|
if (Object.assign(n, {
|
|
246
245
|
center: [r.longitude || 0, r.latitude || 0],
|
|
@@ -251,36 +250,35 @@ class x {
|
|
|
251
250
|
const u = HTMLCanvasElement.prototype.getContext;
|
|
252
251
|
HTMLCanvasElement.prototype.getContext = () => (HTMLCanvasElement.prototype.getContext = u, o.gl);
|
|
253
252
|
}
|
|
254
|
-
const
|
|
255
|
-
r.padding &&
|
|
256
|
-
const
|
|
257
|
-
|
|
258
|
-
this._inRender = !0,
|
|
253
|
+
const s = new this._MapClass(n);
|
|
254
|
+
r.padding && s.setPadding(r.padding), o.cursor && (s.getCanvas().style.cursor = o.cursor), this._createProxyTransform(s);
|
|
255
|
+
const a = s._render;
|
|
256
|
+
s._render = (u) => {
|
|
257
|
+
this._inRender = !0, a.call(s, u), this._inRender = !1;
|
|
259
258
|
};
|
|
260
|
-
const c =
|
|
261
|
-
|
|
262
|
-
this._proxyTransform.$internalUpdate = !0, c.call(
|
|
259
|
+
const c = s._renderTaskQueue.run;
|
|
260
|
+
s._renderTaskQueue.run = (u) => {
|
|
261
|
+
this._proxyTransform.$internalUpdate = !0, c.call(s._renderTaskQueue, u), this._proxyTransform.$internalUpdate = !1, this._fireDefferedEvents();
|
|
263
262
|
};
|
|
264
|
-
const l =
|
|
265
|
-
|
|
266
|
-
const
|
|
267
|
-
|
|
263
|
+
const l = s.jumpTo;
|
|
264
|
+
s.jumpTo = (...u) => (this._proxyTransform.$internalUpdate = !0, l.apply(s, u), this._proxyTransform.$internalUpdate = !1, s);
|
|
265
|
+
const p = s.fire;
|
|
266
|
+
s.fire = this._fireEvent.bind(this, p), s.on("styledata", () => {
|
|
268
267
|
this._updateStyleComponents(this.props, {});
|
|
269
|
-
}),
|
|
268
|
+
}), s.on("sourcedata", () => {
|
|
270
269
|
this._updateStyleComponents(this.props, {});
|
|
271
270
|
});
|
|
271
|
+
for (const u in Z)
|
|
272
|
+
s.on(u, this._onPointerEvent);
|
|
273
|
+
for (const u in O)
|
|
274
|
+
s.on(u, this._onCameraEvent);
|
|
272
275
|
for (const u in U)
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
a.on(u, this._onCameraEvent);
|
|
276
|
-
for (const u in j)
|
|
277
|
-
a.on(u, this._onEvent);
|
|
278
|
-
this._map = a;
|
|
276
|
+
s.on(u, this._onEvent);
|
|
277
|
+
this._map = s;
|
|
279
278
|
}
|
|
280
279
|
/* eslint-enable complexity,max-statements */
|
|
281
280
|
recycle() {
|
|
282
|
-
|
|
283
|
-
o == null || o.remove(), x.savedMaps.push(this);
|
|
281
|
+
this.map.getContainer().querySelector("[mapboxgl-children]")?.remove(), L.savedMaps.push(this);
|
|
284
282
|
}
|
|
285
283
|
destroy() {
|
|
286
284
|
this._map.remove();
|
|
@@ -293,7 +291,7 @@ class x {
|
|
|
293
291
|
!this._inRender && t.style && (t._frame && (t._frame.cancel(), t._frame = null), t._render());
|
|
294
292
|
}
|
|
295
293
|
_createProxyTransform(t) {
|
|
296
|
-
const o =
|
|
294
|
+
const o = Y(t.transform);
|
|
297
295
|
t.transform = o, t.painter.transform = o, this._proxyTransform = o;
|
|
298
296
|
}
|
|
299
297
|
/* Trigger map resize if size is controlled
|
|
@@ -316,10 +314,10 @@ class x {
|
|
|
316
314
|
@returns {bool} true if anything is changed
|
|
317
315
|
*/
|
|
318
316
|
_updateViewState(t, o) {
|
|
319
|
-
const i = t.viewState || t, n = this._proxyTransform, { zoom: r, pitch:
|
|
317
|
+
const i = t.viewState || t, n = this._proxyTransform, { zoom: r, pitch: s, bearing: a } = n, c = Q(this._proxyTransform, i);
|
|
320
318
|
if (n.$reactViewState = i, c && o) {
|
|
321
319
|
const l = this._deferredEvents;
|
|
322
|
-
l.move = !0, l.zoom || (l.zoom = r !== n.zoom), l.rotate || (l.rotate =
|
|
320
|
+
l.move = !0, l.zoom || (l.zoom = r !== n.zoom), l.rotate || (l.rotate = a !== n.bearing), l.pitch || (l.pitch = s !== n.pitch);
|
|
323
321
|
}
|
|
324
322
|
return c;
|
|
325
323
|
}
|
|
@@ -331,12 +329,8 @@ class x {
|
|
|
331
329
|
_updateSettings(t, o) {
|
|
332
330
|
const i = this._map;
|
|
333
331
|
let n = !1;
|
|
334
|
-
for (const r of
|
|
335
|
-
|
|
336
|
-
n = !0;
|
|
337
|
-
const a = i[`set${r[0].toUpperCase()}${r.slice(1)}`];
|
|
338
|
-
a == null || a.call(i, t[r]);
|
|
339
|
-
}
|
|
332
|
+
for (const r of te)
|
|
333
|
+
r in t && !y(t[r], o[r]) && (n = !0, i[`set${r[0].toUpperCase()}${r.slice(1)}`]?.call(i, t[r]));
|
|
340
334
|
return n;
|
|
341
335
|
}
|
|
342
336
|
/* Update map style to match props
|
|
@@ -346,10 +340,10 @@ class x {
|
|
|
346
340
|
*/
|
|
347
341
|
_updateStyle(t, o) {
|
|
348
342
|
if (t.cursor !== o.cursor && (this._map.getCanvas().style.cursor = t.cursor || ""), t.mapStyle !== o.mapStyle) {
|
|
349
|
-
const { mapStyle: i =
|
|
343
|
+
const { mapStyle: i = P, styleDiffing: n = !0 } = t, r = {
|
|
350
344
|
diff: n
|
|
351
345
|
};
|
|
352
|
-
return "localIdeographFontFamily" in t && (r.localIdeographFontFamily = t.localIdeographFontFamily), this._map.setStyle(
|
|
346
|
+
return "localIdeographFontFamily" in t && (r.localIdeographFontFamily = t.localIdeographFontFamily), this._map.setStyle(A(i), r), !0;
|
|
353
347
|
}
|
|
354
348
|
return !1;
|
|
355
349
|
}
|
|
@@ -361,7 +355,7 @@ class x {
|
|
|
361
355
|
_updateStyleComponents(t, o) {
|
|
362
356
|
const i = this._map;
|
|
363
357
|
let n = !1;
|
|
364
|
-
return i.isStyleLoaded() && ("light" in t && i.setLight && !
|
|
358
|
+
return i.isStyleLoaded() && ("light" in t && i.setLight && !y(t.light, o.light) && (n = !0, i.setLight(t.light)), "fog" in t && i.setFog && !y(t.fog, o.fog) && (n = !0, i.setFog(t.fog)), "terrain" in t && i.setTerrain && !y(t.terrain, o.terrain) && (!t.terrain || i.getSource(t.terrain.source)) && (n = !0, i.setTerrain(t.terrain))), n;
|
|
365
359
|
}
|
|
366
360
|
/* Update interaction handlers to match props
|
|
367
361
|
@param {object} nextProps
|
|
@@ -371,9 +365,9 @@ class x {
|
|
|
371
365
|
_updateHandlers(t, o) {
|
|
372
366
|
const i = this._map;
|
|
373
367
|
let n = !1;
|
|
374
|
-
for (const r of
|
|
375
|
-
const
|
|
376
|
-
|
|
368
|
+
for (const r of ne) {
|
|
369
|
+
const s = t[r] ?? !0, a = o[r] ?? !0;
|
|
370
|
+
y(s, a) || (n = !0, s ? i[r].enable(s) : i[r].disable());
|
|
377
371
|
}
|
|
378
372
|
return n;
|
|
379
373
|
}
|
|
@@ -388,20 +382,19 @@ class x {
|
|
|
388
382
|
}
|
|
389
383
|
}
|
|
390
384
|
_updateHover(t) {
|
|
391
|
-
var n;
|
|
392
385
|
const { props: o } = this;
|
|
393
386
|
if (o.interactiveLayerIds && (o.onMouseMove || o.onMouseEnter || o.onMouseLeave)) {
|
|
394
|
-
const
|
|
395
|
-
!
|
|
387
|
+
const n = t.type, r = this._hoveredFeatures?.length > 0, s = this._queryRenderedFeatures(t.point), a = s.length > 0;
|
|
388
|
+
!a && r && (t.type = "mouseleave", this._onPointerEvent(t)), this._hoveredFeatures = s, a && !r && (t.type = "mouseenter", this._onPointerEvent(t)), t.type = n;
|
|
396
389
|
} else
|
|
397
390
|
this._hoveredFeatures = null;
|
|
398
391
|
}
|
|
399
392
|
_fireEvent(t, o, i) {
|
|
400
|
-
const n = this._map, r = this._proxyTransform,
|
|
393
|
+
const n = this._map, r = this._proxyTransform, s = r.$internalUpdate;
|
|
401
394
|
try {
|
|
402
395
|
r.$internalUpdate = !1, t.call(n, o, i);
|
|
403
396
|
} finally {
|
|
404
|
-
r.$internalUpdate =
|
|
397
|
+
r.$internalUpdate = s;
|
|
405
398
|
}
|
|
406
399
|
return n;
|
|
407
400
|
}
|
|
@@ -414,8 +407,8 @@ class x {
|
|
|
414
407
|
this._internalUpdate = !1;
|
|
415
408
|
}
|
|
416
409
|
}
|
|
417
|
-
|
|
418
|
-
function
|
|
410
|
+
L.savedMaps = [];
|
|
411
|
+
function oe() {
|
|
419
412
|
let e = null;
|
|
420
413
|
if (typeof location < "u") {
|
|
421
414
|
const t = /access_token=([^&\/]*)/.exec(location.search);
|
|
@@ -431,7 +424,7 @@ function ie() {
|
|
|
431
424
|
}
|
|
432
425
|
return e;
|
|
433
426
|
}
|
|
434
|
-
const
|
|
427
|
+
const re = [
|
|
435
428
|
"setMaxBounds",
|
|
436
429
|
"setMinZoom",
|
|
437
430
|
"setMaxZoom",
|
|
@@ -453,7 +446,7 @@ const ae = [
|
|
|
453
446
|
"setFog",
|
|
454
447
|
"remove"
|
|
455
448
|
];
|
|
456
|
-
function
|
|
449
|
+
function ie(e) {
|
|
457
450
|
if (!e)
|
|
458
451
|
return null;
|
|
459
452
|
const t = e.map, o = {
|
|
@@ -481,21 +474,21 @@ function se(e) {
|
|
|
481
474
|
queryTerrainElevation: (i, n) => {
|
|
482
475
|
const r = t.transform;
|
|
483
476
|
t.transform = e.transform;
|
|
484
|
-
const
|
|
485
|
-
return t.transform = r,
|
|
477
|
+
const s = t.queryTerrainElevation(i, n);
|
|
478
|
+
return t.transform = r, s;
|
|
486
479
|
},
|
|
487
480
|
queryRenderedFeatures: (i, n) => {
|
|
488
481
|
const r = t.transform;
|
|
489
482
|
t.transform = e.transform;
|
|
490
|
-
const
|
|
491
|
-
return t.transform = r,
|
|
483
|
+
const s = t.queryRenderedFeatures(i, n);
|
|
484
|
+
return t.transform = r, s;
|
|
492
485
|
}
|
|
493
486
|
};
|
|
494
|
-
for (const i of
|
|
495
|
-
!(i in o) && !
|
|
487
|
+
for (const i of se(t))
|
|
488
|
+
!(i in o) && !re.includes(i) && (o[i] = t[i].bind(t));
|
|
496
489
|
return o;
|
|
497
490
|
}
|
|
498
|
-
function
|
|
491
|
+
function se(e) {
|
|
499
492
|
const t = /* @__PURE__ */ new Set();
|
|
500
493
|
let o = e;
|
|
501
494
|
for (; o; ) {
|
|
@@ -505,50 +498,50 @@ function ce(e) {
|
|
|
505
498
|
}
|
|
506
499
|
return Array.from(t);
|
|
507
500
|
}
|
|
508
|
-
const
|
|
501
|
+
const ae = typeof document < "u" ? q : d, ce = [
|
|
509
502
|
"baseApiUrl",
|
|
510
503
|
"maxParallelImageRequests",
|
|
511
504
|
"workerClass",
|
|
512
505
|
"workerCount",
|
|
513
506
|
"workerUrl"
|
|
514
507
|
];
|
|
515
|
-
function
|
|
516
|
-
for (const i of
|
|
508
|
+
function le(e, t) {
|
|
509
|
+
for (const i of ce)
|
|
517
510
|
i in t && (e[i] = t[i]);
|
|
518
511
|
const { RTLTextPlugin: o = "https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.2.3/mapbox-gl-rtl-text.js" } = t;
|
|
519
512
|
o && e.getRTLTextPluginStatus && e.getRTLTextPluginStatus() === "unavailable" && e.setRTLTextPlugin(o, (i) => {
|
|
520
513
|
i && console.error(i);
|
|
521
514
|
}, !0);
|
|
522
515
|
}
|
|
523
|
-
const
|
|
524
|
-
function
|
|
525
|
-
const o =
|
|
526
|
-
|
|
516
|
+
const T = v.createContext(null);
|
|
517
|
+
function ue(e, t) {
|
|
518
|
+
const o = S($), [i, n] = B(null), r = M(), { current: s } = M({ mapLib: null, map: null });
|
|
519
|
+
d(() => {
|
|
527
520
|
const l = e.mapLib;
|
|
528
|
-
let
|
|
529
|
-
return Promise.resolve(l || import("./mapbox-gl-
|
|
530
|
-
if (!
|
|
521
|
+
let p = !0, u;
|
|
522
|
+
return Promise.resolve(l || import("./mapbox-gl-C6frO4Gl.js").then((f) => f.m)).then((f) => {
|
|
523
|
+
if (!p)
|
|
531
524
|
return;
|
|
532
|
-
if (!
|
|
525
|
+
if (!f)
|
|
533
526
|
throw new Error("Invalid mapLib");
|
|
534
|
-
const
|
|
535
|
-
if (!
|
|
527
|
+
const m = "Map" in f ? f : f.default;
|
|
528
|
+
if (!m.Map)
|
|
536
529
|
throw new Error("Invalid mapLib");
|
|
537
|
-
|
|
538
|
-
}).catch((
|
|
539
|
-
const { onError:
|
|
540
|
-
|
|
530
|
+
le(m, e), e.reuseMaps && (u = L.reuse(e, r.current)), u || (u = new L(m.Map, e, r.current)), s.map = ie(u), s.mapLib = m, n(u), o?.onMapMount(s.map, e.id);
|
|
531
|
+
}).catch((f) => {
|
|
532
|
+
const { onError: m } = e;
|
|
533
|
+
m ? m({
|
|
541
534
|
type: "error",
|
|
542
535
|
target: null,
|
|
543
|
-
error:
|
|
544
|
-
}) : console.error(
|
|
536
|
+
error: f
|
|
537
|
+
}) : console.error(f);
|
|
545
538
|
}), () => {
|
|
546
|
-
|
|
539
|
+
p = !1, u && (o?.onMapUnmount(e.id), e.reuseMaps ? u.recycle() : u.destroy());
|
|
547
540
|
};
|
|
548
|
-
}, []),
|
|
541
|
+
}, []), ae(() => {
|
|
549
542
|
i && i.setProps(e);
|
|
550
|
-
}),
|
|
551
|
-
const
|
|
543
|
+
}), F(t, () => s.map, [i]);
|
|
544
|
+
const a = E(() => ({
|
|
552
545
|
position: "relative",
|
|
553
546
|
width: "100%",
|
|
554
547
|
height: "100%",
|
|
@@ -556,189 +549,178 @@ function de(e, t) {
|
|
|
556
549
|
}), [e.style]), c = {
|
|
557
550
|
height: "100%"
|
|
558
551
|
};
|
|
559
|
-
return
|
|
560
|
-
|
|
561
|
-
{ value:
|
|
562
|
-
|
|
552
|
+
return v.createElement("div", { id: e.id, ref: r, style: a }, i && v.createElement(
|
|
553
|
+
T.Provider,
|
|
554
|
+
{ value: s },
|
|
555
|
+
v.createElement("div", { "mapboxgl-children": "", style: c }, e.children)
|
|
563
556
|
));
|
|
564
557
|
}
|
|
565
|
-
const
|
|
566
|
-
function
|
|
558
|
+
const be = v.forwardRef(ue), fe = /box|flex|grid|column|lineHeight|fontWeight|opacity|order|tabSize|zIndex/;
|
|
559
|
+
function C(e, t) {
|
|
567
560
|
if (!e || !t)
|
|
568
561
|
return;
|
|
569
562
|
const o = e.style;
|
|
570
563
|
for (const i in t) {
|
|
571
564
|
const n = t[i];
|
|
572
|
-
Number.isFinite(n) && !
|
|
565
|
+
Number.isFinite(n) && !fe.test(i) ? o[i] = `${n}px` : o[i] = n;
|
|
573
566
|
}
|
|
574
567
|
}
|
|
575
|
-
function
|
|
568
|
+
function V(e, t) {
|
|
576
569
|
if (e === t)
|
|
577
570
|
return null;
|
|
578
|
-
const o =
|
|
571
|
+
const o = D(e), i = D(t), n = [];
|
|
579
572
|
for (const r of i)
|
|
580
573
|
o.has(r) || n.push(r);
|
|
581
574
|
for (const r of o)
|
|
582
575
|
i.has(r) || n.push(r);
|
|
583
576
|
return n.length === 0 ? null : n;
|
|
584
577
|
}
|
|
585
|
-
function
|
|
578
|
+
function D(e) {
|
|
586
579
|
return new Set(e ? e.trim().split(/\s+/) : []);
|
|
587
580
|
}
|
|
588
|
-
const
|
|
589
|
-
const { map: o, mapLib: i } =
|
|
590
|
-
let
|
|
591
|
-
|
|
592
|
-
|
|
581
|
+
const Ce = b(N((e, t) => {
|
|
582
|
+
const { map: o, mapLib: i } = S(T), n = M({ props: e }), r = E(() => {
|
|
583
|
+
let w = !1;
|
|
584
|
+
v.Children.forEach(e.children, (h) => {
|
|
585
|
+
h && (w = !0);
|
|
593
586
|
});
|
|
594
|
-
const
|
|
587
|
+
const H = {
|
|
595
588
|
...e,
|
|
596
|
-
element:
|
|
597
|
-
},
|
|
598
|
-
return
|
|
599
|
-
|
|
600
|
-
(g = (h = n.current.props).onClick) == null || g.call(h, {
|
|
589
|
+
element: w ? document.createElement("div") : null
|
|
590
|
+
}, _ = new i.Marker(H);
|
|
591
|
+
return _.setLngLat([e.longitude, e.latitude]), _.getElement().addEventListener("click", (h) => {
|
|
592
|
+
n.current.props.onClick?.({
|
|
601
593
|
type: "click",
|
|
602
|
-
target:
|
|
603
|
-
originalEvent:
|
|
594
|
+
target: _,
|
|
595
|
+
originalEvent: h
|
|
604
596
|
});
|
|
605
|
-
}),
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
const h = _;
|
|
616
|
-
h.lngLat = r.getLngLat(), (p = (g = n.current.props).onDragEnd) == null || p.call(g, h);
|
|
617
|
-
}), b;
|
|
597
|
+
}), _.on("dragstart", (h) => {
|
|
598
|
+
const g = h;
|
|
599
|
+
g.lngLat = r.getLngLat(), n.current.props.onDragStart?.(g);
|
|
600
|
+
}), _.on("drag", (h) => {
|
|
601
|
+
const g = h;
|
|
602
|
+
g.lngLat = r.getLngLat(), n.current.props.onDrag?.(g);
|
|
603
|
+
}), _.on("dragend", (h) => {
|
|
604
|
+
const g = h;
|
|
605
|
+
g.lngLat = r.getLngLat(), n.current.props.onDragEnd?.(g);
|
|
606
|
+
}), _;
|
|
618
607
|
}, []);
|
|
619
|
-
|
|
608
|
+
d(() => (r.addTo(o.getMap()), () => {
|
|
620
609
|
r.remove();
|
|
621
610
|
}), []);
|
|
622
|
-
const { longitude:
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
}, [l]),
|
|
626
|
-
const
|
|
627
|
-
(r.getLngLat().lng !==
|
|
628
|
-
const
|
|
629
|
-
if (
|
|
630
|
-
for (const
|
|
631
|
-
r.toggleClassName(
|
|
632
|
-
return n.current.props = e,
|
|
633
|
-
})),
|
|
634
|
-
const { map: o, mapLib: i } =
|
|
635
|
-
const
|
|
611
|
+
const { longitude: s, latitude: a, offset: c, style: l, draggable: p = !1, popup: u = null, rotation: f = 0, rotationAlignment: m = "auto", pitchAlignment: z = "auto" } = e;
|
|
612
|
+
d(() => {
|
|
613
|
+
C(r.getElement(), l);
|
|
614
|
+
}, [l]), F(t, () => r, []);
|
|
615
|
+
const W = n.current.props;
|
|
616
|
+
(r.getLngLat().lng !== s || r.getLngLat().lat !== a) && r.setLngLat([s, a]), c && !ee(r.getOffset(), c) && r.setOffset(c), r.isDraggable() !== p && r.setDraggable(p), r.getRotation() !== f && r.setRotation(f), r.getRotationAlignment() !== m && r.setRotationAlignment(m), r.getPitchAlignment() !== z && r.setPitchAlignment(z), r.getPopup() !== u && r.setPopup(u);
|
|
617
|
+
const R = V(W.className, e.className);
|
|
618
|
+
if (R)
|
|
619
|
+
for (const w of R)
|
|
620
|
+
r.toggleClassName(w);
|
|
621
|
+
return n.current.props = e, j(e.children, r.getElement());
|
|
622
|
+
})), Se = b(N((e, t) => {
|
|
623
|
+
const { map: o, mapLib: i } = S(T), n = E(() => document.createElement("div"), []), r = M({ props: e }), s = E(() => {
|
|
624
|
+
const a = { ...e }, c = new i.Popup(a);
|
|
636
625
|
return c.setLngLat([e.longitude, e.latitude]), c.once("open", (l) => {
|
|
637
|
-
|
|
638
|
-
(u = (f = r.current.props).onOpen) == null || u.call(f, l);
|
|
626
|
+
r.current.props.onOpen?.(l);
|
|
639
627
|
}), c;
|
|
640
628
|
}, []);
|
|
641
|
-
if (
|
|
642
|
-
const
|
|
643
|
-
|
|
644
|
-
(f = (l = r.current.props).onClose) == null || f.call(l, c);
|
|
629
|
+
if (d(() => {
|
|
630
|
+
const a = (c) => {
|
|
631
|
+
r.current.props.onClose?.(c);
|
|
645
632
|
};
|
|
646
|
-
return
|
|
647
|
-
|
|
633
|
+
return s.on("close", a), s.setDOMContent(n).addTo(o.getMap()), () => {
|
|
634
|
+
s.off("close", a), s.isOpen() && s.remove();
|
|
648
635
|
};
|
|
649
|
-
}, []),
|
|
650
|
-
|
|
651
|
-
}, [e.style]),
|
|
652
|
-
const
|
|
653
|
-
(
|
|
654
|
-
const c =
|
|
636
|
+
}, []), d(() => {
|
|
637
|
+
C(s.getElement(), e.style);
|
|
638
|
+
}, [e.style]), F(t, () => s, []), s.isOpen()) {
|
|
639
|
+
const a = r.current.props;
|
|
640
|
+
(s.getLngLat().lng !== e.longitude || s.getLngLat().lat !== e.latitude) && s.setLngLat([e.longitude, e.latitude]), e.offset && !y(a.offset, e.offset) && (s.options.anchor = e.anchor, s.setOffset(e.offset)), (a.anchor !== e.anchor || a.maxWidth !== e.maxWidth) && s.setMaxWidth(e.maxWidth);
|
|
641
|
+
const c = V(a.className, e.className);
|
|
655
642
|
if (c)
|
|
656
643
|
for (const l of c)
|
|
657
|
-
|
|
644
|
+
s.toggleClassName(l);
|
|
658
645
|
r.current.props = e;
|
|
659
646
|
}
|
|
660
|
-
return
|
|
647
|
+
return j(e.children, n);
|
|
661
648
|
}));
|
|
662
|
-
function
|
|
663
|
-
const n =
|
|
664
|
-
return
|
|
665
|
-
const
|
|
666
|
-
return l.hasControl(r) || (l.addControl(r,
|
|
649
|
+
function x(e, t, o, i) {
|
|
650
|
+
const n = S(T), r = E(() => e(n), []);
|
|
651
|
+
return d(() => {
|
|
652
|
+
const s = t, a = null, c = typeof t == "function" ? t : null, { map: l } = n;
|
|
653
|
+
return l.hasControl(r) || (l.addControl(r, s?.position), a && a(n)), () => {
|
|
667
654
|
c && c(n), l.hasControl(r) && l.removeControl(r);
|
|
668
655
|
};
|
|
669
656
|
}, []), r;
|
|
670
657
|
}
|
|
671
|
-
function
|
|
672
|
-
const t =
|
|
658
|
+
function de(e) {
|
|
659
|
+
const t = x(({ mapLib: o }) => new o.AttributionControl(e), {
|
|
673
660
|
position: e.position
|
|
674
661
|
});
|
|
675
|
-
return
|
|
676
|
-
|
|
662
|
+
return d(() => {
|
|
663
|
+
C(t._container, e.style);
|
|
677
664
|
}, [e.style]), null;
|
|
678
665
|
}
|
|
679
|
-
|
|
680
|
-
function
|
|
681
|
-
const t =
|
|
666
|
+
b(de);
|
|
667
|
+
function me(e) {
|
|
668
|
+
const t = x(({ mapLib: o }) => new o.FullscreenControl({
|
|
682
669
|
container: e.containerId && document.getElementById(e.containerId)
|
|
683
670
|
}), { position: e.position });
|
|
684
|
-
return
|
|
685
|
-
|
|
671
|
+
return d(() => {
|
|
672
|
+
C(t._controlContainer, e.style);
|
|
686
673
|
}, [e.style]), null;
|
|
687
674
|
}
|
|
688
|
-
|
|
689
|
-
function
|
|
690
|
-
const o =
|
|
691
|
-
const r = new n.GeolocateControl(e),
|
|
692
|
-
return r._setupUI = (
|
|
693
|
-
r._container.hasChildNodes() || a
|
|
694
|
-
}, r.on("geolocate", (
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
}), r.on("
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
var c, l;
|
|
705
|
-
(l = (c = o.current.props).onTrackUserLocationStart) == null || l.call(c, s);
|
|
706
|
-
}), r.on("trackuserlocationend", (s) => {
|
|
707
|
-
var c, l;
|
|
708
|
-
(l = (c = o.current.props).onTrackUserLocationEnd) == null || l.call(c, s);
|
|
675
|
+
b(me);
|
|
676
|
+
function he(e, t) {
|
|
677
|
+
const o = M({ props: e }), i = x(({ mapLib: n }) => {
|
|
678
|
+
const r = new n.GeolocateControl(e), s = r._setupUI.bind(r);
|
|
679
|
+
return r._setupUI = (a) => {
|
|
680
|
+
r._container.hasChildNodes() || s(a);
|
|
681
|
+
}, r.on("geolocate", (a) => {
|
|
682
|
+
o.current.props.onGeolocate?.(a);
|
|
683
|
+
}), r.on("error", (a) => {
|
|
684
|
+
o.current.props.onError?.(a);
|
|
685
|
+
}), r.on("outofmaxbounds", (a) => {
|
|
686
|
+
o.current.props.onOutOfMaxBounds?.(a);
|
|
687
|
+
}), r.on("trackuserlocationstart", (a) => {
|
|
688
|
+
o.current.props.onTrackUserLocationStart?.(a);
|
|
689
|
+
}), r.on("trackuserlocationend", (a) => {
|
|
690
|
+
o.current.props.onTrackUserLocationEnd?.(a);
|
|
709
691
|
}), r;
|
|
710
692
|
}, { position: e.position });
|
|
711
|
-
return o.current.props = e,
|
|
712
|
-
|
|
693
|
+
return o.current.props = e, F(t, () => i, []), d(() => {
|
|
694
|
+
C(i._container, e.style);
|
|
713
695
|
}, [e.style]), null;
|
|
714
696
|
}
|
|
715
|
-
|
|
716
|
-
function
|
|
717
|
-
const t =
|
|
697
|
+
b(N(he));
|
|
698
|
+
function ge(e) {
|
|
699
|
+
const t = x(({ mapLib: o }) => new o.NavigationControl(e), {
|
|
718
700
|
position: e.position
|
|
719
701
|
});
|
|
720
|
-
return
|
|
721
|
-
|
|
702
|
+
return d(() => {
|
|
703
|
+
C(t._container, e.style);
|
|
722
704
|
}, [e.style]), null;
|
|
723
705
|
}
|
|
724
|
-
const
|
|
725
|
-
function
|
|
726
|
-
const t =
|
|
706
|
+
const Ee = b(ge);
|
|
707
|
+
function ye(e) {
|
|
708
|
+
const t = x(({ mapLib: r }) => new r.ScaleControl(e), {
|
|
727
709
|
position: e.position
|
|
728
|
-
}), o =
|
|
710
|
+
}), o = M(e), i = o.current;
|
|
729
711
|
o.current = e;
|
|
730
712
|
const { style: n } = e;
|
|
731
|
-
return e.maxWidth !== void 0 && e.maxWidth !== i.maxWidth && (t.options.maxWidth = e.maxWidth), e.unit !== void 0 && e.unit !== i.unit && t.setUnit(e.unit),
|
|
732
|
-
|
|
713
|
+
return e.maxWidth !== void 0 && e.maxWidth !== i.maxWidth && (t.options.maxWidth = e.maxWidth), e.unit !== void 0 && e.unit !== i.unit && t.setUnit(e.unit), d(() => {
|
|
714
|
+
C(t._container, n);
|
|
733
715
|
}, [n]), null;
|
|
734
716
|
}
|
|
735
|
-
|
|
717
|
+
b(ye);
|
|
736
718
|
export {
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
719
|
+
be as M,
|
|
720
|
+
Ee as N,
|
|
721
|
+
Se as P,
|
|
722
|
+
Ce as a,
|
|
723
|
+
T as b,
|
|
724
|
+
y as d,
|
|
725
|
+
ve as u
|
|
744
726
|
};
|