@factorialco/f0-react 16.30.0 → 16.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ArchiveThumbnail-DKhjfBQx.js → ArchiveThumbnail-snnCL51c.js} +1 -1
- package/dist/{ArchiveViewer-CLfFm7xN.js → ArchiveViewer-qrPGzl45.js} +2 -2
- package/dist/{ChatPostComposerDialog-DgRCi517.js → ChatPostComposerDialog-C7FQ5zej.js} +2 -2
- package/dist/{CoachmarkProvider-Dv3HGlQn.js → CoachmarkProvider-CqkPfWAF.js} +3 -3
- package/dist/{CodeThumbnail-B7i69yiG.js → CodeThumbnail-jrNjbGFK.js} +1 -1
- package/dist/{CodeViewer-CfJEGONX.js → CodeViewer-rskCF-XU.js} +3 -3
- package/dist/{DocumentToolbar-CFSYNRPK.js → DocumentToolbar-C7f4MplQ.js} +1 -1
- package/dist/{DocxViewer-CwbEk_um.js → DocxViewer-Md9lijeE.js} +1 -1
- package/dist/{F0AiProcessingOverlay-e45V7jnO.js → F0AiProcessingOverlay-Bz5bf3ZA.js} +1 -1
- package/dist/{F0Alert-DIj-yBaJ.js → F0Alert-Ctib1gD6.js} +1 -1
- package/dist/F0AudioPlayer-B4YvRRgo.js +2 -0
- package/dist/{F0CanvasPanel-BimlvEaL.js → F0CanvasPanel-CZKTFPP7.js} +4062 -4059
- package/dist/{F0DocumentViewer-Bb-bIqhH.js → F0DocumentViewer-BgIPKW21.js} +1 -1
- package/dist/{F0DocumentViewer-By0aD22O.js → F0DocumentViewer-D9HXGXr_.js} +2 -2
- package/dist/{F0Map-DvW_ce3p.js → F0Map-C4p4mly7.js} +637 -621
- package/dist/{F0VideoPlayer-Cz90LvIr.js → F0VideoPlayer-D6cgKhcQ.js} +1 -1
- package/dist/F0VideoPlayer-DV84zT9b.js +1 -0
- package/dist/{HtmlViewer-cxPEUYXY.js → HtmlViewer-BVitdvD6.js} +3 -3
- package/dist/{Map-BIUj3dSn.js → Map-ZXcjPt4S.js} +3 -3
- package/dist/{PdfThumbnail-CZJ17k0R.js → PdfThumbnail-CwkqbqHx.js} +1 -1
- package/dist/{PdfViewer-C-nwVTI1.js → PdfViewer-Cytnm1Ks.js} +2 -2
- package/dist/{SheetViewer-7y-xBDPP.js → SheetViewer-DFLeOh69.js} +2 -2
- package/dist/{TextViewer-DV3kRMRF.js → TextViewer-C9Ds2dE7.js} +1 -1
- package/dist/ai.js +2 -2
- package/dist/component-status.js +1 -1
- package/dist/experimental.js +6567 -6538
- package/dist/f0.js +6 -6
- package/dist/{highlight-DbFt_sj2.js → highlight-CT0Gl0kj.js} +1 -1
- package/dist/{maplibre-B3Z_BvY7.js → maplibre-B3l6Byv4.js} +1 -1
- package/dist/{pdfWorker-ODowmc3U.js → pdfWorker-BwmWYP-K.js} +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/dist/F0AudioPlayer-SEqjyVEi.js +0 -2
- package/dist/F0VideoPlayer-BtgCaxi2.js +0 -1
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { Ci as e, a as t, o as n } from "./CoachmarkProvider-
|
|
1
|
+
import { Ci as e, a as t, o as n } from "./CoachmarkProvider-CqkPfWAF.js";
|
|
2
2
|
import { i as r, r as i } from "./i18n-provider-kdMqj3iD.js";
|
|
3
3
|
import { L as a, R as o } from "./tooltip-NXXT56H4.js";
|
|
4
4
|
import { D as s, G as c, K as l, Y as u, h as d, t as f, x as p } from "./F0Button-DVbQTicD.js";
|
|
5
|
-
import { Ps as m, Wc as h, cl as g,
|
|
6
|
-
import { a as
|
|
7
|
-
import { B as
|
|
8
|
-
import { n as
|
|
9
|
-
import { createContext as
|
|
10
|
-
import { Fragment as
|
|
11
|
-
import { createPortal as
|
|
5
|
+
import { Ps as m, Wc as h, cl as g, cn as _, m as v, nn as y, r as b, uc as x } from "./F0CanvasPanel-CZKTFPP7.js";
|
|
6
|
+
import { a as S } from "./createIcon-B-z7hPQg.js";
|
|
7
|
+
import { B as C, E as w, P as T, W as E, m as D } from "./useData-XExWuz7o.js";
|
|
8
|
+
import { n as ee, o as O, s as k, t as A } from "./dist-DMTFO2gF.js";
|
|
9
|
+
import { createContext as j, forwardRef as M, useCallback as N, useContext as te, useEffect as P, useId as ne, useImperativeHandle as re, useLayoutEffect as F, useMemo as I, useRef as L, useState as R } from "react";
|
|
10
|
+
import { Fragment as ie, jsx as z, jsxs as B } from "react/jsx-runtime";
|
|
11
|
+
import { createPortal as ae } from "react-dom";
|
|
12
12
|
//#region src/addons/map/F0Map/camera.ts
|
|
13
|
-
var
|
|
13
|
+
var oe = (e, t) => ({
|
|
14
14
|
top: Math.max(e?.top ?? 0, t?.top ?? 0),
|
|
15
15
|
right: Math.max(e?.right ?? 0, t?.right ?? 0),
|
|
16
16
|
bottom: Math.max(e?.bottom ?? 0, t?.bottom ?? 0),
|
|
17
17
|
left: Math.max(e?.left ?? 0, t?.left ?? 0)
|
|
18
|
-
}),
|
|
18
|
+
}), se = (e, { width: t, height: n }) => {
|
|
19
19
|
let r = t > 0 && e.left + e.right >= t, i = n > 0 && e.top + e.bottom >= n;
|
|
20
20
|
return {
|
|
21
21
|
top: i ? 0 : e.top,
|
|
@@ -23,11 +23,11 @@ var se = (e, t) => ({
|
|
|
23
23
|
left: r ? 0 : e.left,
|
|
24
24
|
right: r ? 0 : e.right
|
|
25
25
|
};
|
|
26
|
-
},
|
|
26
|
+
}, ce = (e) => ({
|
|
27
27
|
x: (e.left - e.right) / 2,
|
|
28
28
|
y: (e.top - e.bottom) / 2
|
|
29
|
-
}),
|
|
30
|
-
let i =
|
|
29
|
+
}), le = (e, t, n, r = e.getZoom()) => {
|
|
30
|
+
let i = ce(n), a = e.project(t);
|
|
31
31
|
if (!a || i.x === 0 && i.y === 0) return t;
|
|
32
32
|
let o = 2 ** (e.getZoom() - r);
|
|
33
33
|
return e.unproject({
|
|
@@ -44,7 +44,7 @@ var se = (e, t) => ({
|
|
|
44
44
|
};
|
|
45
45
|
let u = Math.min(l + Math.log2(c), a);
|
|
46
46
|
return {
|
|
47
|
-
center:
|
|
47
|
+
center: le(e, o.center, n, u),
|
|
48
48
|
zoom: u
|
|
49
49
|
};
|
|
50
50
|
}, de = 6371008.8, fe = (e) => e * Math.PI / 180, pe = (e) => e * 180 / Math.PI, me = (e, t, n = 64) => {
|
|
@@ -73,14 +73,14 @@ var se = (e, t) => ({
|
|
|
73
73
|
"smoke",
|
|
74
74
|
"barbie"
|
|
75
75
|
].filter((e) => e !== "neutral" && e !== "grey"), ge = {
|
|
76
|
-
neutral:
|
|
77
|
-
grey:
|
|
78
|
-
...Object.fromEntries(he.map((e) => [e,
|
|
76
|
+
neutral: A.grey[100],
|
|
77
|
+
grey: A.grey.solid[50],
|
|
78
|
+
...Object.fromEntries(he.map((e) => [e, A[e][50]]))
|
|
79
79
|
}, _e = (e) => `hsl(${ge[e]})`, ve = {
|
|
80
|
-
neutral:
|
|
80
|
+
neutral: A.grey[100],
|
|
81
81
|
grey: "218 14% 30%",
|
|
82
|
-
...Object.fromEntries(he.map((e) => [e,
|
|
83
|
-
}, ye = (e, t) => t ? ve[e] : ge[e],
|
|
82
|
+
...Object.fromEntries(he.map((e) => [e, A[e][70]]))
|
|
83
|
+
}, ye = (e, t) => t ? ve[e] : ge[e], V = A.grey[100], H = {
|
|
84
84
|
sm: {
|
|
85
85
|
d: 16,
|
|
86
86
|
border: 1.5,
|
|
@@ -141,11 +141,11 @@ var se = (e, t) => ({
|
|
|
141
141
|
icon: "lg",
|
|
142
142
|
avatar: "lg"
|
|
143
143
|
}
|
|
144
|
-
},
|
|
145
|
-
let e =
|
|
146
|
-
return -(e.d - e.caretOverlap + e.caretH +
|
|
147
|
-
},
|
|
148
|
-
let { size: i = "md", selected: s = !1, collapsed: c = !1, label: d, showLabel: f = !0, labelPlacement: p = "right", onClick: m, ariaLabel: h, presentational: g = !1, dataTestId: _, className: v } = t, y = t.variant ?? "color", b =
|
|
144
|
+
}, be = (e) => H[e], U = 5.6, W = 1.5, G = () => {
|
|
145
|
+
let e = H.xl;
|
|
146
|
+
return -(e.d - e.caretOverlap + e.caretH + U + W) + 3;
|
|
147
|
+
}, K = "hsl(var(--white-100))", q = M(function(t, n) {
|
|
148
|
+
let { size: i = "md", selected: s = !1, collapsed: c = !1, label: d, showLabel: f = !0, labelPlacement: p = "right", onClick: m, ariaLabel: h, presentational: g = !1, dataTestId: _, className: v } = t, y = t.variant ?? "color", b = H[s ? "xl" : i], x = !!m, C = y === "color" || y === "icon" || y === "letter", T = y === "person" && "firstName" in t ? t.firstName + t.lastName : (y === "team" || y === "company") && "name" in t ? t.name : null, E = C ? t.color ?? "radical" : T ? y === "person" && "src" in t && t.src ? "grey" : w(T) ?? "grey" : "neutral", ee = e(), O = s ? 32 : {
|
|
149
149
|
xs: 12,
|
|
150
150
|
sm: 16,
|
|
151
151
|
md: 20,
|
|
@@ -155,11 +155,11 @@ var se = (e, t) => ({
|
|
|
155
155
|
sm: 24,
|
|
156
156
|
md: 32,
|
|
157
157
|
lg: 40
|
|
158
|
-
}, A =
|
|
158
|
+
}, A = H[i].avatar, j = s ? k[b.avatar] / k[A] : 1, M = (e) => /* @__PURE__ */ z("span", {
|
|
159
159
|
className: "flex shrink-0 items-center justify-center transition-transform duration-200 ease-out",
|
|
160
160
|
style: { transform: `scale(${j})` },
|
|
161
161
|
children: e
|
|
162
|
-
}),
|
|
162
|
+
}), N = y === "color" ? null : y === "icon" && "icon" in t ? /* @__PURE__ */ z(S, {
|
|
163
163
|
icon: t.icon,
|
|
164
164
|
size: b.icon,
|
|
165
165
|
color: "#ffffff",
|
|
@@ -168,16 +168,16 @@ var se = (e, t) => ({
|
|
|
168
168
|
height: O,
|
|
169
169
|
transition: "width 200ms ease-out, height 200ms ease-out"
|
|
170
170
|
}
|
|
171
|
-
}) : y === "letter" && "letter" in t ? /* @__PURE__ */
|
|
171
|
+
}) : y === "letter" && "letter" in t ? /* @__PURE__ */ z("span", {
|
|
172
172
|
"aria-hidden": !0,
|
|
173
173
|
className: "font-semibold leading-none",
|
|
174
174
|
style: {
|
|
175
|
-
color:
|
|
175
|
+
color: K,
|
|
176
176
|
fontSize: Math.round(O * .78),
|
|
177
177
|
transition: "font-size 200ms ease-out"
|
|
178
178
|
},
|
|
179
179
|
children: t.letter.charAt(0).toUpperCase()
|
|
180
|
-
}) : y === "person" && "firstName" in t ? M(/* @__PURE__ */
|
|
180
|
+
}) : y === "person" && "firstName" in t ? M(/* @__PURE__ */ z(D, {
|
|
181
181
|
avatar: {
|
|
182
182
|
type: "person",
|
|
183
183
|
firstName: t.firstName,
|
|
@@ -185,43 +185,43 @@ var se = (e, t) => ({
|
|
|
185
185
|
src: t.src
|
|
186
186
|
},
|
|
187
187
|
size: A
|
|
188
|
-
})) : y === "team" && "name" in t ? M(/* @__PURE__ */
|
|
188
|
+
})) : y === "team" && "name" in t ? M(/* @__PURE__ */ z(D, {
|
|
189
189
|
avatar: {
|
|
190
190
|
type: "team",
|
|
191
191
|
name: t.name,
|
|
192
192
|
src: t.src
|
|
193
193
|
},
|
|
194
194
|
size: A
|
|
195
|
-
})) : y === "company" && "name" in t ? M(/* @__PURE__ */
|
|
195
|
+
})) : y === "company" && "name" in t ? M(/* @__PURE__ */ z(D, {
|
|
196
196
|
avatar: {
|
|
197
197
|
type: "company",
|
|
198
198
|
name: t.name,
|
|
199
199
|
src: t.src
|
|
200
200
|
},
|
|
201
201
|
size: A
|
|
202
|
-
})) : y === "image" && "src" in t ? /* @__PURE__ */
|
|
202
|
+
})) : y === "image" && "src" in t ? /* @__PURE__ */ z("img", {
|
|
203
203
|
src: t.src,
|
|
204
204
|
alt: "alt" in t ? t.alt ?? "" : "",
|
|
205
205
|
className: "h-full w-full object-cover"
|
|
206
|
-
}) : null,
|
|
206
|
+
}) : null, te = y === "team" || y === "company" || y === "icon", P = /* @__PURE__ */ z("span", {
|
|
207
207
|
className: "relative z-[1] flex shrink-0 items-center justify-center overflow-hidden border-solid transition-all duration-200 ease-out",
|
|
208
208
|
style: {
|
|
209
209
|
width: b.d,
|
|
210
210
|
height: b.d,
|
|
211
|
-
borderRadius:
|
|
211
|
+
borderRadius: te ? Math.round(b.d * .3) : 9999,
|
|
212
212
|
borderWidth: b.border,
|
|
213
|
-
borderColor:
|
|
214
|
-
backgroundColor:
|
|
213
|
+
borderColor: K,
|
|
214
|
+
backgroundColor: C ? _e(E) : K
|
|
215
215
|
},
|
|
216
|
-
children: y === "color" ? /* @__PURE__ */
|
|
216
|
+
children: y === "color" ? /* @__PURE__ */ z("span", {
|
|
217
217
|
className: "rounded-full transition-all duration-200 ease-out",
|
|
218
218
|
style: {
|
|
219
219
|
width: b.d * .36,
|
|
220
220
|
height: b.d * .36,
|
|
221
|
-
backgroundColor:
|
|
221
|
+
backgroundColor: K
|
|
222
222
|
}
|
|
223
|
-
}) :
|
|
224
|
-
}),
|
|
223
|
+
}) : N
|
|
224
|
+
}), ne = /* @__PURE__ */ z(u, { children: s ? /* @__PURE__ */ z(l.svg, {
|
|
225
225
|
width: b.caretW,
|
|
226
226
|
height: b.caretH,
|
|
227
227
|
viewBox: "0 0 16 13",
|
|
@@ -230,7 +230,7 @@ var se = (e, t) => ({
|
|
|
230
230
|
style: {
|
|
231
231
|
top: b.d - b.caretOverlap - 3,
|
|
232
232
|
marginLeft: -b.caretW / 2,
|
|
233
|
-
fill:
|
|
233
|
+
fill: K,
|
|
234
234
|
transformOrigin: "50% 0%"
|
|
235
235
|
},
|
|
236
236
|
initial: {
|
|
@@ -250,79 +250,79 @@ var se = (e, t) => ({
|
|
|
250
250
|
ease: "easeOut",
|
|
251
251
|
opacity: { duration: .1 }
|
|
252
252
|
},
|
|
253
|
-
children: /* @__PURE__ */
|
|
254
|
-
}, "caret") : null }),
|
|
253
|
+
children: /* @__PURE__ */ z("path", { d: "M0 0h16c-4.2 3-6.6 6.9-7.4 11.7a0.62 0.62 0 0 1-1.2 0C6.6 6.9 4.2 3 0 0Z" })
|
|
254
|
+
}, "caret") : null }), re = /* @__PURE__ */ B("span", {
|
|
255
255
|
className: "relative inline-flex",
|
|
256
|
-
style: { filter: `drop-shadow(0 ${b.shadowY}px ${b.shadowBlur / 2}px hsl(${
|
|
257
|
-
children: [
|
|
258
|
-
}),
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
`0 1px 2px ${
|
|
262
|
-
`0 -1px 2px ${
|
|
263
|
-
`1px 0 2px ${
|
|
264
|
-
`-1px 0 2px ${
|
|
265
|
-
].join(","),
|
|
256
|
+
style: { filter: `drop-shadow(0 ${b.shadowY}px ${b.shadowBlur / 2}px hsl(${V} / 0.3))` },
|
|
257
|
+
children: [ne, P]
|
|
258
|
+
}), F = H[i], I = b.d / 2, L = U, R = s ? G() : -I, ae = s ? "bottom" : p, oe = `0 0 ${Math.max(2, Math.round(F.label * .28))}px ${K}`, se = [
|
|
259
|
+
oe,
|
|
260
|
+
oe,
|
|
261
|
+
`0 1px 2px ${K}`,
|
|
262
|
+
`0 -1px 2px ${K}`,
|
|
263
|
+
`1px 0 2px ${K}`,
|
|
264
|
+
`-1px 0 2px ${K}`
|
|
265
|
+
].join(","), ce = !s && (ae === "top" || ae === "bottom"), le = ce ? "line-clamp-4 text-center" : s ? "whitespace-nowrap text-center" : "whitespace-nowrap", ue = F.d / 2, de = {
|
|
266
266
|
right: {
|
|
267
|
-
transform: `translate(${
|
|
268
|
-
style: { paddingLeft:
|
|
267
|
+
transform: `translate(${ue}px, -50%)`,
|
|
268
|
+
style: { paddingLeft: F.gap }
|
|
269
269
|
},
|
|
270
270
|
left: {
|
|
271
|
-
transform: `translate(calc(-100% - ${
|
|
271
|
+
transform: `translate(calc(-100% - ${ue}px), -50%)`,
|
|
272
272
|
style: {
|
|
273
|
-
paddingRight:
|
|
273
|
+
paddingRight: F.gap,
|
|
274
274
|
textAlign: "right"
|
|
275
275
|
}
|
|
276
276
|
},
|
|
277
277
|
top: {
|
|
278
|
-
transform: `translate(-50%, calc(-100% - ${
|
|
279
|
-
style: { paddingBottom:
|
|
278
|
+
transform: `translate(-50%, calc(-100% - ${ue}px))`,
|
|
279
|
+
style: { paddingBottom: F.gap }
|
|
280
280
|
},
|
|
281
281
|
bottom: {
|
|
282
|
-
transform: `translate(-50%, ${s ?
|
|
283
|
-
style: { paddingTop:
|
|
282
|
+
transform: `translate(-50%, ${s ? L : ue}px)`,
|
|
283
|
+
style: { paddingTop: F.gap + (s ? 4 : 0) }
|
|
284
284
|
}
|
|
285
|
-
}[
|
|
286
|
-
className: a("absolute left-0 top-0 font-semibold leading-tight transition-all duration-200 ease-out",
|
|
285
|
+
}[ae], fe = d && f && !c && /* @__PURE__ */ z("span", {
|
|
286
|
+
className: a("absolute left-0 top-0 font-semibold leading-tight transition-all duration-200 ease-out", le),
|
|
287
287
|
style: {
|
|
288
|
-
color: `hsl(${ve[
|
|
289
|
-
fontSize:
|
|
290
|
-
textShadow:
|
|
291
|
-
transform:
|
|
292
|
-
maxWidth:
|
|
293
|
-
...
|
|
288
|
+
color: `hsl(${ve[E]})`,
|
|
289
|
+
fontSize: F.label,
|
|
290
|
+
textShadow: se,
|
|
291
|
+
transform: de.transform,
|
|
292
|
+
maxWidth: ce ? F.maxLabelW : void 0,
|
|
293
|
+
...de.style
|
|
294
294
|
},
|
|
295
295
|
children: d
|
|
296
|
-
}),
|
|
296
|
+
}), pe = /* @__PURE__ */ z("span", {
|
|
297
297
|
"aria-hidden": !0,
|
|
298
298
|
className: "absolute left-0 top-0 rounded-full border-solid transition-all duration-200 ease-out",
|
|
299
299
|
style: {
|
|
300
|
-
width:
|
|
301
|
-
height:
|
|
300
|
+
width: L * 2,
|
|
301
|
+
height: L * 2,
|
|
302
302
|
marginLeft: -5.6,
|
|
303
303
|
marginTop: -5.6,
|
|
304
304
|
borderWidth: 1.5,
|
|
305
|
-
borderColor:
|
|
306
|
-
backgroundColor: _e(
|
|
307
|
-
boxShadow: `0 1px 2px hsl(${
|
|
305
|
+
borderColor: K,
|
|
306
|
+
backgroundColor: _e(E),
|
|
307
|
+
boxShadow: `0 1px 2px hsl(${V} / 0.3)`,
|
|
308
308
|
transform: `scale(${s || c ? 1 : 0})`,
|
|
309
309
|
opacity: s || c ? 1 : 0
|
|
310
310
|
}
|
|
311
|
-
}),
|
|
312
|
-
|
|
313
|
-
/* @__PURE__ */
|
|
311
|
+
}), me = /* @__PURE__ */ B(ie, { children: [
|
|
312
|
+
pe,
|
|
313
|
+
/* @__PURE__ */ z("span", {
|
|
314
314
|
className: "absolute left-0 top-0 transition-all duration-200 ease-out",
|
|
315
315
|
style: {
|
|
316
|
-
transform: `translate(-50%, ${
|
|
316
|
+
transform: `translate(-50%, ${R}px) scale(${+!c})`,
|
|
317
317
|
opacity: +!c
|
|
318
318
|
},
|
|
319
|
-
children:
|
|
319
|
+
children: re
|
|
320
320
|
}),
|
|
321
|
-
|
|
321
|
+
fe
|
|
322
322
|
] });
|
|
323
|
-
return /* @__PURE__ */
|
|
323
|
+
return /* @__PURE__ */ z(r, {
|
|
324
324
|
dataTestId: _,
|
|
325
|
-
children:
|
|
325
|
+
children: x ? /* @__PURE__ */ z("button", {
|
|
326
326
|
ref: n,
|
|
327
327
|
type: "button",
|
|
328
328
|
...g ? {
|
|
@@ -334,112 +334,112 @@ var se = (e, t) => ({
|
|
|
334
334
|
},
|
|
335
335
|
onClick: m,
|
|
336
336
|
className: a("relative inline-flex cursor-pointer border-0 bg-transparent p-0", "transition-transform duration-150 hover:scale-[1.05]", o("rounded-full"), v),
|
|
337
|
-
children:
|
|
338
|
-
}) : /* @__PURE__ */
|
|
337
|
+
children: me
|
|
338
|
+
}) : /* @__PURE__ */ z("span", {
|
|
339
339
|
role: "img",
|
|
340
340
|
"aria-label": h,
|
|
341
341
|
className: a("relative inline-flex", v),
|
|
342
|
-
children:
|
|
342
|
+
children: me
|
|
343
343
|
})
|
|
344
344
|
});
|
|
345
345
|
});
|
|
346
|
-
|
|
347
|
-
var
|
|
346
|
+
q.displayName = "BaseMapMarker";
|
|
347
|
+
var xe = q, Se = (e, t) => `hsl(${ye(e, t).replace(/ /g, ", ")})`, Ce = (e, t) => ({
|
|
348
348
|
id: e.id,
|
|
349
349
|
ring: me(e.center, e.radiusMeters),
|
|
350
|
-
color: e.color ??
|
|
350
|
+
color: e.color ?? Se(e.variant ?? "malibu", t),
|
|
351
351
|
fillOpacity: .15,
|
|
352
352
|
strokeWidth: 2
|
|
353
|
-
}),
|
|
354
|
-
let r =
|
|
355
|
-
return
|
|
353
|
+
}), we = ({ adapter: e, areas: t, isDark: n }) => {
|
|
354
|
+
let r = I(() => t.map((e) => Ce(e, n)), [t, n]);
|
|
355
|
+
return P(function() {
|
|
356
356
|
e.setAreas(r);
|
|
357
|
-
}, [e, r]),
|
|
357
|
+
}, [e, r]), P(function() {
|
|
358
358
|
return () => e.setAreas([]);
|
|
359
359
|
}, [e]), null;
|
|
360
|
-
},
|
|
360
|
+
}, Te = {
|
|
361
361
|
background: "transparent",
|
|
362
362
|
border: "default",
|
|
363
363
|
borderStyle: "solid",
|
|
364
364
|
borderColor: "secondary"
|
|
365
|
-
},
|
|
365
|
+
}, Ee = {
|
|
366
366
|
control: "md",
|
|
367
367
|
panel: "xl"
|
|
368
|
-
},
|
|
368
|
+
}, De = {
|
|
369
369
|
md: "rounded-md backdrop-blur-md bg-f1-background-inverse-secondary dark:bg-f1-background-tertiary",
|
|
370
370
|
xl: "rounded-xl backdrop-blur-md bg-f1-background-inverse-secondary dark:bg-f1-background-tertiary"
|
|
371
|
-
},
|
|
371
|
+
}, J = (e) => De[e], Y = {
|
|
372
372
|
inset: 8,
|
|
373
373
|
gap: 8,
|
|
374
374
|
listWidth: 214,
|
|
375
375
|
detailWidth: 344,
|
|
376
376
|
toggleSize: 38
|
|
377
|
-
},
|
|
377
|
+
}, Oe = "cubic-bezier(0.77, 0, 0.175, 1)", ke = {
|
|
378
378
|
enter: {
|
|
379
379
|
duration: "175ms",
|
|
380
|
-
easing:
|
|
380
|
+
easing: Oe
|
|
381
381
|
},
|
|
382
382
|
exit: {
|
|
383
383
|
duration: "250ms",
|
|
384
|
-
easing:
|
|
384
|
+
easing: Oe
|
|
385
385
|
}
|
|
386
|
-
},
|
|
387
|
-
className:
|
|
388
|
-
children: /* @__PURE__ */
|
|
389
|
-
...
|
|
390
|
-
borderRadius:
|
|
386
|
+
}, Ae = ({ children: e }) => /* @__PURE__ */ z("div", {
|
|
387
|
+
className: J(Ee.control),
|
|
388
|
+
children: /* @__PURE__ */ z(T, {
|
|
389
|
+
...Te,
|
|
390
|
+
borderRadius: Ee.control,
|
|
391
391
|
padding: "none",
|
|
392
|
-
children: /* @__PURE__ */
|
|
392
|
+
children: /* @__PURE__ */ z("div", {
|
|
393
393
|
className: "flex flex-col items-center gap-1 p-0.5",
|
|
394
394
|
children: e
|
|
395
395
|
})
|
|
396
396
|
})
|
|
397
|
-
}),
|
|
398
|
-
let l = i(), u = !!(a || n), d = !!(e || t), p = (e) => /* @__PURE__ */
|
|
399
|
-
return /* @__PURE__ */
|
|
397
|
+
}), je = M(({ onZoomIn: e, onZoomOut: t, onFit: n, onLocate: a, labels: o, dataTestId: s }, c) => {
|
|
398
|
+
let l = i(), u = !!(a || n), d = !!(e || t), p = (e) => /* @__PURE__ */ z(Ae, { children: e });
|
|
399
|
+
return /* @__PURE__ */ z(r, {
|
|
400
400
|
dataTestId: s,
|
|
401
|
-
children: /* @__PURE__ */
|
|
401
|
+
children: /* @__PURE__ */ B("div", {
|
|
402
402
|
ref: c,
|
|
403
403
|
role: "toolbar",
|
|
404
404
|
"aria-orientation": "vertical",
|
|
405
405
|
"aria-label": l.map.navigation,
|
|
406
406
|
className: "flex flex-col items-center gap-2",
|
|
407
|
-
children: [u ? p(/* @__PURE__ */
|
|
407
|
+
children: [u ? p(/* @__PURE__ */ B(ie, { children: [n ? /* @__PURE__ */ z(f, {
|
|
408
408
|
variant: "ghost",
|
|
409
409
|
size: "md",
|
|
410
410
|
label: o?.fit ?? l.map.controls.fit,
|
|
411
411
|
icon: h,
|
|
412
412
|
hideLabel: !0,
|
|
413
413
|
onClick: n
|
|
414
|
-
}) : null, a ? /* @__PURE__ */
|
|
414
|
+
}) : null, a ? /* @__PURE__ */ z(f, {
|
|
415
415
|
variant: "ghost",
|
|
416
416
|
size: "md",
|
|
417
417
|
label: o?.locate ?? l.map.controls.locate,
|
|
418
418
|
icon: m,
|
|
419
419
|
hideLabel: !0,
|
|
420
420
|
onClick: a
|
|
421
|
-
}) : null] })) : null, d ? p(/* @__PURE__ */
|
|
421
|
+
}) : null] })) : null, d ? p(/* @__PURE__ */ B(ie, { children: [e ? /* @__PURE__ */ z(f, {
|
|
422
422
|
variant: "ghost",
|
|
423
423
|
size: "md",
|
|
424
424
|
label: o?.zoomIn ?? l.map.controls.zoomIn,
|
|
425
|
-
icon:
|
|
425
|
+
icon: E,
|
|
426
426
|
hideLabel: !0,
|
|
427
427
|
onClick: e
|
|
428
|
-
}) : null, t ? /* @__PURE__ */
|
|
428
|
+
}) : null, t ? /* @__PURE__ */ z(f, {
|
|
429
429
|
variant: "ghost",
|
|
430
430
|
size: "md",
|
|
431
431
|
label: o?.zoomOut ?? l.map.controls.zoomOut,
|
|
432
|
-
icon:
|
|
432
|
+
icon: C,
|
|
433
433
|
hideLabel: !0,
|
|
434
434
|
onClick: t
|
|
435
435
|
}) : null] })) : null]
|
|
436
436
|
})
|
|
437
437
|
});
|
|
438
438
|
});
|
|
439
|
-
|
|
439
|
+
je.displayName = "F0MapControls";
|
|
440
440
|
//#endregion
|
|
441
441
|
//#region src/addons/map/F0Map/components/F0MapList/F0MapList.tsx
|
|
442
|
-
var
|
|
442
|
+
var Me = (e, t) => {
|
|
443
443
|
if (e.label) return e.label;
|
|
444
444
|
switch (e.variant) {
|
|
445
445
|
case "employee": return `${e.firstName} ${e.lastName}`.trim();
|
|
@@ -447,41 +447,41 @@ var Ne = (e, t) => {
|
|
|
447
447
|
case "stop": return e.letter.charAt(0).toUpperCase();
|
|
448
448
|
default: return t;
|
|
449
449
|
}
|
|
450
|
-
},
|
|
450
|
+
}, Ne = M(function({ points: e, selectedId: t, onSelect: n, visible: o = !1, label: s, id: c, dataTestId: l, className: u }, d) {
|
|
451
451
|
let f = i(), p = s ?? f.map.listLabel;
|
|
452
|
-
return /* @__PURE__ */
|
|
452
|
+
return /* @__PURE__ */ z(r, {
|
|
453
453
|
dataTestId: l,
|
|
454
|
-
children: /* @__PURE__ */
|
|
454
|
+
children: /* @__PURE__ */ B("nav", {
|
|
455
455
|
ref: d,
|
|
456
456
|
id: c,
|
|
457
457
|
"aria-label": p,
|
|
458
458
|
tabIndex: -1,
|
|
459
459
|
className: a("outline-none", o ? "absolute inset-0 z-20 overflow-auto bg-f1-background p-4" : "sr-only", u),
|
|
460
|
-
children: [o ? /* @__PURE__ */
|
|
460
|
+
children: [o ? /* @__PURE__ */ z("h2", {
|
|
461
461
|
className: "text-f1-foreground mb-2 text-base font-medium",
|
|
462
462
|
children: p
|
|
463
|
-
}) : null, /* @__PURE__ */
|
|
463
|
+
}) : null, /* @__PURE__ */ z("ul", {
|
|
464
464
|
className: o ? "flex flex-col gap-0.5" : void 0,
|
|
465
|
-
children: e.map((e) => /* @__PURE__ */
|
|
465
|
+
children: e.map((e) => /* @__PURE__ */ z("li", { children: /* @__PURE__ */ z("button", {
|
|
466
466
|
type: "button",
|
|
467
467
|
"aria-current": e.id === t || void 0,
|
|
468
468
|
onClick: () => n(e.id),
|
|
469
469
|
className: a("w-full text-left", o && "text-f1-foreground hover:bg-f1-background-hover aria-[current=true]:bg-f1-background-selected rounded-md px-3 py-2 text-sm"),
|
|
470
|
-
children:
|
|
470
|
+
children: Me(e, f.map.unnamedLocation)
|
|
471
471
|
}) }, e.id))
|
|
472
472
|
})]
|
|
473
473
|
})
|
|
474
474
|
});
|
|
475
475
|
});
|
|
476
|
-
|
|
476
|
+
Ne.displayName = "F0MapList";
|
|
477
477
|
//#endregion
|
|
478
478
|
//#region src/addons/map/F0Map/hooks/useClusters.ts
|
|
479
|
-
var
|
|
480
|
-
let [a, o] =
|
|
479
|
+
var Pe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i = 164 }) => {
|
|
480
|
+
let [a, o] = R({
|
|
481
481
|
clusters: [],
|
|
482
482
|
singles: t
|
|
483
483
|
});
|
|
484
|
-
return
|
|
484
|
+
return P(() => {
|
|
485
485
|
if (!e || !n) {
|
|
486
486
|
o({
|
|
487
487
|
clusters: [],
|
|
@@ -556,13 +556,13 @@ var Fe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
556
556
|
r,
|
|
557
557
|
i
|
|
558
558
|
]), a;
|
|
559
|
-
},
|
|
559
|
+
}, Fe = 4, Ie = 4, Le = [
|
|
560
560
|
"right",
|
|
561
561
|
"bottom",
|
|
562
562
|
"left",
|
|
563
563
|
"top"
|
|
564
|
-
],
|
|
565
|
-
let a =
|
|
564
|
+
], Re = 1.7, ze = (e, t) => e.x < t.x + t.w && e.x + e.w > t.x && e.y < t.y + t.h && e.y + e.h > t.y, Be = null, Ve = (e, t) => (!Be && typeof document < "u" && (Be = document.createElement("canvas").getContext("2d")), Be ? (Be.font = `600 ${t}px Inter, system-ui, sans-serif`, Be.measureText(e).width) : e.length * t * .55), He = ({ placement: e, cx: t, cy: n, point: r, size: i }) => {
|
|
565
|
+
let a = be(i), o = Ve(r.label ?? "", a.label) + 2, s = a.d / 2;
|
|
566
566
|
if (e === "right" || e === "left") {
|
|
567
567
|
let r = o, i = a.lineH;
|
|
568
568
|
return {
|
|
@@ -572,7 +572,7 @@ var Fe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
572
572
|
h: i
|
|
573
573
|
};
|
|
574
574
|
}
|
|
575
|
-
let c = Math.min(o, a.maxLabelW), l = Math.min(Math.ceil(o / a.maxLabelW),
|
|
575
|
+
let c = Math.min(o, a.maxLabelW), l = Math.min(Math.ceil(o / a.maxLabelW), Ie) * a.lineH, u = a.gap + Fe, d = e === "bottom" ? n + s + u : n - s - a.gap - l;
|
|
576
576
|
return {
|
|
577
577
|
x: t - c / 2,
|
|
578
578
|
y: d,
|
|
@@ -580,14 +580,14 @@ var Fe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
580
580
|
h: l
|
|
581
581
|
};
|
|
582
582
|
}, Ue = (e, t, n = "md") => {
|
|
583
|
-
let [r, i] =
|
|
584
|
-
return
|
|
583
|
+
let [r, i] = R({});
|
|
584
|
+
return P(() => {
|
|
585
585
|
if (!e) {
|
|
586
586
|
i({});
|
|
587
587
|
return;
|
|
588
588
|
}
|
|
589
589
|
let r = 0, a = () => {
|
|
590
|
-
let r =
|
|
590
|
+
let r = be(n).d, a = [], o = [];
|
|
591
591
|
for (let n of t) {
|
|
592
592
|
let t = e.project(n.coordinates);
|
|
593
593
|
if (!t) return;
|
|
@@ -604,7 +604,7 @@ var Fe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
604
604
|
let s = t.length, c = Array.from({ length: s }, (e, t) => t), l = (e) => {
|
|
605
605
|
for (; c[e] !== e;) e = c[e] = c[c[e]];
|
|
606
606
|
return e;
|
|
607
|
-
}, u = (r *
|
|
607
|
+
}, u = (r * Re) ** 2;
|
|
608
608
|
for (let e = 0; e < s; e++) for (let t = e + 1; t < s; t++) {
|
|
609
609
|
let n = o[e].x - o[t].x, r = o[e].y - o[t].y;
|
|
610
610
|
if (n * n + r * r <= u) {
|
|
@@ -616,7 +616,7 @@ var Fe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
616
616
|
for (let e = 0; e < s; e++) {
|
|
617
617
|
let r = t[e];
|
|
618
618
|
if (!r.label) continue;
|
|
619
|
-
let i = o[e], s = "right", c = [s, ...
|
|
619
|
+
let i = o[e], s = "right", c = [s, ...Le.filter((e) => e !== s)], l = null;
|
|
620
620
|
for (let e of c) {
|
|
621
621
|
let t = He({
|
|
622
622
|
placement: e,
|
|
@@ -624,7 +624,7 @@ var Fe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
624
624
|
cy: i.y,
|
|
625
625
|
point: r,
|
|
626
626
|
size: n
|
|
627
|
-
}), o = a.some((e) =>
|
|
627
|
+
}), o = a.some((e) => ze(t, e)), s = f.some((e) => ze(t, e));
|
|
628
628
|
if (!o && !s) {
|
|
629
629
|
l = e, f.push(t);
|
|
630
630
|
break;
|
|
@@ -656,19 +656,19 @@ var Fe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
656
656
|
t,
|
|
657
657
|
n
|
|
658
658
|
]), r;
|
|
659
|
-
},
|
|
660
|
-
let a =
|
|
659
|
+
}, X = 3, We = ({ adapter: e, el: t, markerRef: n, coordinates: r, drag: i }) => {
|
|
660
|
+
let a = L({
|
|
661
661
|
coordinates: r,
|
|
662
662
|
drag: i
|
|
663
663
|
});
|
|
664
|
-
|
|
664
|
+
F(function() {
|
|
665
665
|
a.current = {
|
|
666
666
|
coordinates: r,
|
|
667
667
|
drag: i
|
|
668
668
|
};
|
|
669
669
|
});
|
|
670
670
|
let o = !!i;
|
|
671
|
-
|
|
671
|
+
P(function() {
|
|
672
672
|
if (!o) return;
|
|
673
673
|
let r = null, i = !1, s = null, c = (t) => r ? e.unproject({
|
|
674
674
|
x: r.at.x + t.clientX - r.x,
|
|
@@ -683,7 +683,7 @@ var Fe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
683
683
|
}, u = (e) => {
|
|
684
684
|
if (!r) return;
|
|
685
685
|
let t = Math.hypot(e.clientX - r.x, e.clientY - r.y);
|
|
686
|
-
!i && t <
|
|
686
|
+
!i && t < X || (i = !0, s = c(e), s && (n.current?.setPosition(s), a.current.drag?.onDrag?.(s)));
|
|
687
687
|
}, d = (e) => {
|
|
688
688
|
t.releasePointerCapture?.(e.pointerId), t.style.setProperty("cursor", "grab"), r = null;
|
|
689
689
|
}, f = () => n.current?.setPosition(a.current.coordinates), p = (e) => {
|
|
@@ -703,8 +703,8 @@ var Fe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
703
703
|
o
|
|
704
704
|
]);
|
|
705
705
|
}, Ge = (e, t) => {
|
|
706
|
-
let [n, r] =
|
|
707
|
-
return
|
|
706
|
+
let [n, r] = R(() => e ? e.getZoom() >= t : !1);
|
|
707
|
+
return P(() => {
|
|
708
708
|
if (!e) {
|
|
709
709
|
r(!1);
|
|
710
710
|
return;
|
|
@@ -718,7 +718,7 @@ var Fe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
718
718
|
"employee",
|
|
719
719
|
"company",
|
|
720
720
|
"stop"
|
|
721
|
-
], qe = "malibu", Je = "radical",
|
|
721
|
+
], qe = "malibu", Je = "radical", Z = (e) => {
|
|
722
722
|
switch (e.variant) {
|
|
723
723
|
case "employee": return { variant: {
|
|
724
724
|
variant: "person",
|
|
@@ -734,7 +734,7 @@ var Fe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
734
734
|
case "workplace": return {
|
|
735
735
|
variant: {
|
|
736
736
|
variant: "icon",
|
|
737
|
-
icon:
|
|
737
|
+
icon: x
|
|
738
738
|
},
|
|
739
739
|
color: qe
|
|
740
740
|
};
|
|
@@ -747,9 +747,9 @@ var Fe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
747
747
|
};
|
|
748
748
|
default: return { variant: { variant: "color" } };
|
|
749
749
|
}
|
|
750
|
-
},
|
|
751
|
-
let { variant: n, color: r } =
|
|
752
|
-
return /* @__PURE__ */
|
|
750
|
+
}, Ye = M(function(e, t) {
|
|
751
|
+
let { variant: n, color: r } = Z(e);
|
|
752
|
+
return /* @__PURE__ */ z(xe, {
|
|
753
753
|
ref: t,
|
|
754
754
|
...n,
|
|
755
755
|
color: r,
|
|
@@ -766,8 +766,8 @@ var Fe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
766
766
|
className: e.className
|
|
767
767
|
});
|
|
768
768
|
});
|
|
769
|
-
|
|
770
|
-
var Xe =
|
|
769
|
+
Ye.displayName = "F0MapMarker";
|
|
770
|
+
var Xe = Ye, Ze = 4, Qe = 3, $e = 1.3, et = 1.08, tt = "cubic-bezier(0.16, 1, 0.3, 1)", nt = 72, Q = {
|
|
771
771
|
1: [[0, 0]],
|
|
772
772
|
2: [[-8, 0], [8, 0]],
|
|
773
773
|
3: [
|
|
@@ -781,17 +781,17 @@ var Xe = X, Ze = 4, Qe = 3, $e = 1.3, et = 1.08, tt = "cubic-bezier(0.16, 1, 0.3
|
|
|
781
781
|
[-8, 8],
|
|
782
782
|
[8, 8]
|
|
783
783
|
]
|
|
784
|
-
},
|
|
785
|
-
let u = i(), [d, f] =
|
|
784
|
+
}, rt = M(function({ count: e, members: t, onClick: n, ariaLabel: o, dataTestId: s, className: c }, l) {
|
|
785
|
+
let u = i(), [d, f] = R(!1), p = t.slice(0, e <= Ze ? Ze : Qe), m = Math.max(0, e - p.length), h = m > 0, g = m > 99 ? "+99" : `+${m}`, _ = Q[p.length + +!!h] ?? Q[4], v = d ? $e : 1, y = d ? et : 1, b = (e) => {
|
|
786
786
|
let [t, n] = _[e] ?? [0, 0];
|
|
787
787
|
return {
|
|
788
788
|
transform: `translate(${t * v}px, ${n * v}px) scale(${y})`,
|
|
789
789
|
transition: `transform 240ms ${tt}`
|
|
790
790
|
};
|
|
791
791
|
};
|
|
792
|
-
return /* @__PURE__ */
|
|
792
|
+
return /* @__PURE__ */ z(r, {
|
|
793
793
|
dataTestId: s,
|
|
794
|
-
children: /* @__PURE__ */
|
|
794
|
+
children: /* @__PURE__ */ B("div", {
|
|
795
795
|
ref: l,
|
|
796
796
|
role: "button",
|
|
797
797
|
tabIndex: 0,
|
|
@@ -806,7 +806,7 @@ var Xe = X, Ze = 4, Qe = 3, $e = 1.3, et = 1.08, tt = "cubic-bezier(0.16, 1, 0.3
|
|
|
806
806
|
onBlur: () => f(!1),
|
|
807
807
|
className: a("group relative h-0 w-0 cursor-pointer outline-none", c),
|
|
808
808
|
children: [
|
|
809
|
-
/* @__PURE__ */
|
|
809
|
+
/* @__PURE__ */ z("span", {
|
|
810
810
|
"aria-hidden": !0,
|
|
811
811
|
className: "absolute rounded-lg group-focus-visible:ring-1 group-focus-visible:ring-f1-special-ring group-focus-visible:ring-offset-1",
|
|
812
812
|
style: {
|
|
@@ -816,20 +816,20 @@ var Xe = X, Ze = 4, Qe = 3, $e = 1.3, et = 1.08, tt = "cubic-bezier(0.16, 1, 0.3
|
|
|
816
816
|
height: nt
|
|
817
817
|
}
|
|
818
818
|
}),
|
|
819
|
-
p.map((e, t) => /* @__PURE__ */
|
|
819
|
+
p.map((e, t) => /* @__PURE__ */ z("span", {
|
|
820
820
|
className: "absolute left-0 top-0 flex leading-none",
|
|
821
821
|
style: {
|
|
822
822
|
zIndex: t,
|
|
823
823
|
...b(t)
|
|
824
824
|
},
|
|
825
|
-
children: /* @__PURE__ */
|
|
825
|
+
children: /* @__PURE__ */ z(Xe, {
|
|
826
826
|
...e,
|
|
827
827
|
showLabel: !1
|
|
828
828
|
})
|
|
829
829
|
}, t)),
|
|
830
830
|
h ? (() => {
|
|
831
831
|
let [e, t] = _[p.length] ?? [0, 0];
|
|
832
|
-
return /* @__PURE__ */
|
|
832
|
+
return /* @__PURE__ */ B("span", {
|
|
833
833
|
className: a("absolute left-0 top-0 flex h-6 min-w-6 items-center justify-center overflow-hidden rounded-full px-1.5", "border border-solid border-f1-border-secondary", "text-f1-foreground-secondary text-sm font-medium leading-none"),
|
|
834
834
|
style: {
|
|
835
835
|
zIndex: Qe,
|
|
@@ -837,10 +837,10 @@ var Xe = X, Ze = 4, Qe = 3, $e = 1.3, et = 1.08, tt = "cubic-bezier(0.16, 1, 0.3
|
|
|
837
837
|
transform: `translate(${e * v}px, ${t * v}px) translate(-50%, -50%) scale(${y})`,
|
|
838
838
|
transition: `transform 240ms ${tt}`
|
|
839
839
|
},
|
|
840
|
-
children: [/* @__PURE__ */
|
|
840
|
+
children: [/* @__PURE__ */ z("span", {
|
|
841
841
|
"aria-hidden": !0,
|
|
842
842
|
className: "absolute inset-0 bg-f1-background-hover"
|
|
843
|
-
}), /* @__PURE__ */
|
|
843
|
+
}), /* @__PURE__ */ z("span", {
|
|
844
844
|
className: "relative",
|
|
845
845
|
children: g
|
|
846
846
|
})]
|
|
@@ -850,18 +850,18 @@ var Xe = X, Ze = 4, Qe = 3, $e = 1.3, et = 1.08, tt = "cubic-bezier(0.16, 1, 0.3
|
|
|
850
850
|
})
|
|
851
851
|
});
|
|
852
852
|
});
|
|
853
|
-
|
|
854
|
-
var
|
|
853
|
+
rt.displayName = "F0MapCluster";
|
|
854
|
+
var $ = rt, it = 16, at = (e, t, n, r) => {
|
|
855
855
|
let i = e.project(t.coordinates);
|
|
856
856
|
if (!i) return null;
|
|
857
|
-
let a =
|
|
857
|
+
let a = be("xl"), o = be(r), s = i.y + G(), c = {
|
|
858
858
|
x: i.x - a.d / 2,
|
|
859
859
|
y: s,
|
|
860
860
|
w: a.d,
|
|
861
861
|
h: a.d
|
|
862
862
|
}, l = t.label ? Ve(t.label, o.label) : 0, u = {
|
|
863
863
|
x: i.x - l / 2,
|
|
864
|
-
y: i.y +
|
|
864
|
+
y: i.y + U,
|
|
865
865
|
w: l,
|
|
866
866
|
h: o.lineH
|
|
867
867
|
}, d = o.d, f = /* @__PURE__ */ new Set();
|
|
@@ -874,12 +874,12 @@ var it = Z, Q = 16, at = (e, t, n, r) => {
|
|
|
874
874
|
w: d,
|
|
875
875
|
h: d
|
|
876
876
|
};
|
|
877
|
-
(
|
|
877
|
+
(ze(r, c) || l > 0 && ze(r, u)) && f.add(t.id);
|
|
878
878
|
}
|
|
879
879
|
return f;
|
|
880
880
|
}, ot = (e, t, n, r) => {
|
|
881
|
-
let [i, a] =
|
|
882
|
-
return
|
|
881
|
+
let [i, a] = R(null);
|
|
882
|
+
return P(() => {
|
|
883
883
|
if (!t || !n.some((e) => e.id === t.id)) {
|
|
884
884
|
a(null);
|
|
885
885
|
return;
|
|
@@ -901,35 +901,35 @@ var it = Z, Q = 16, at = (e, t, n, r) => {
|
|
|
901
901
|
n,
|
|
902
902
|
r
|
|
903
903
|
]), i;
|
|
904
|
-
},
|
|
904
|
+
}, st = (e) => {
|
|
905
905
|
let { id: t, coordinates: n, label: r, draggable: i, ...a } = e;
|
|
906
906
|
return a;
|
|
907
|
-
},
|
|
908
|
-
let [a] =
|
|
909
|
-
return
|
|
907
|
+
}, ct = ({ adapter: e, coordinates: t, selected: n, drag: r, children: i }) => {
|
|
908
|
+
let [a] = R(() => document.createElement("div")), o = L(null);
|
|
909
|
+
return P(() => {
|
|
910
910
|
let n = (e) => e.stopPropagation();
|
|
911
911
|
a.style.cursor = "pointer", a.addEventListener("click", n);
|
|
912
912
|
let r = e.addDomMarker(a, t);
|
|
913
913
|
return o.current = r, () => {
|
|
914
914
|
a.removeEventListener("click", n), r.remove(), o.current = null;
|
|
915
915
|
};
|
|
916
|
-
}, [e, a]),
|
|
916
|
+
}, [e, a]), P(() => {
|
|
917
917
|
o.current?.setPosition(t);
|
|
918
|
-
}, [t]),
|
|
918
|
+
}, [t]), We({
|
|
919
919
|
adapter: e,
|
|
920
920
|
el: a,
|
|
921
921
|
markerRef: o,
|
|
922
922
|
coordinates: t,
|
|
923
923
|
drag: r
|
|
924
|
-
}),
|
|
924
|
+
}), P(() => {
|
|
925
925
|
a.style.zIndex = n ? "2" : "";
|
|
926
|
-
}, [a, n]),
|
|
927
|
-
},
|
|
928
|
-
let d = i(), f = !!s, p =
|
|
926
|
+
}, [a, n]), ae(i, a);
|
|
927
|
+
}, lt = ({ adapter: e, points: t, selectedId: n, highlightedId: r, onSelect: a, onMarkerDrag: o, onMarkerDragEnd: s, onClusterExpand: c }) => {
|
|
928
|
+
let d = i(), f = !!s, p = I(() => f ? t.filter((e) => !e.draggable) : t, [t, f]), m = Pe({
|
|
929
929
|
adapter: e,
|
|
930
930
|
points: p,
|
|
931
931
|
enabled: !0
|
|
932
|
-
}), { clusters: h } = m, g =
|
|
932
|
+
}), { clusters: h } = m, g = I(() => {
|
|
933
933
|
if (p === t) return m.singles;
|
|
934
934
|
let e = new Set(m.singles);
|
|
935
935
|
return t.filter((t) => t.draggable || e.has(t));
|
|
@@ -937,12 +937,12 @@ var it = Z, Q = 16, at = (e, t, n, r) => {
|
|
|
937
937
|
m.singles,
|
|
938
938
|
p,
|
|
939
939
|
t
|
|
940
|
-
]), _ = Ge(e,
|
|
941
|
-
return /* @__PURE__ */
|
|
940
|
+
]), _ = Ge(e, it) ? "lg" : "md", v = Ue(e, g, _), y = new Map(t.map((e) => [e.id, e])), b = h.length > 0, x = ot(e, n ? y.get(n) : void 0, g, _);
|
|
941
|
+
return /* @__PURE__ */ B(u, { children: [h.map((t) => /* @__PURE__ */ z(ct, {
|
|
942
942
|
adapter: e,
|
|
943
943
|
coordinates: t.coordinates,
|
|
944
944
|
selected: !1,
|
|
945
|
-
children: /* @__PURE__ */
|
|
945
|
+
children: /* @__PURE__ */ z(l.span, {
|
|
946
946
|
initial: {
|
|
947
947
|
scale: .8,
|
|
948
948
|
opacity: 0
|
|
@@ -966,15 +966,15 @@ var it = Z, Q = 16, at = (e, t, n, r) => {
|
|
|
966
966
|
]
|
|
967
967
|
},
|
|
968
968
|
className: "absolute left-0 top-0 flex leading-none",
|
|
969
|
-
children: /* @__PURE__ */
|
|
969
|
+
children: /* @__PURE__ */ z($, {
|
|
970
970
|
count: t.count,
|
|
971
|
-
members: t.pointIds.map((e) => y.get(e)).filter((e) => !!e).map(
|
|
971
|
+
members: t.pointIds.map((e) => y.get(e)).filter((e) => !!e).map(st),
|
|
972
972
|
onClick: () => c(t.bounds)
|
|
973
973
|
})
|
|
974
974
|
})
|
|
975
975
|
}, t.id)), g.map((t) => {
|
|
976
976
|
let i = v[t.id], c = x?.has(t.id) ?? !1, f = r === t.id;
|
|
977
|
-
return /* @__PURE__ */
|
|
977
|
+
return /* @__PURE__ */ z(ct, {
|
|
978
978
|
adapter: e,
|
|
979
979
|
coordinates: t.coordinates,
|
|
980
980
|
selected: n === t.id || f,
|
|
@@ -982,7 +982,7 @@ var it = Z, Q = 16, at = (e, t, n, r) => {
|
|
|
982
982
|
onDrag: o && ((e) => o(t.id, e)),
|
|
983
983
|
onDragEnd: (e) => s(t.id, e)
|
|
984
984
|
} : void 0,
|
|
985
|
-
children: /* @__PURE__ */
|
|
985
|
+
children: /* @__PURE__ */ z(l.span, {
|
|
986
986
|
initial: { opacity: 0 },
|
|
987
987
|
animate: { opacity: 1 },
|
|
988
988
|
exit: {
|
|
@@ -997,9 +997,9 @@ var it = Z, Q = 16, at = (e, t, n, r) => {
|
|
|
997
997
|
ease: "easeOut"
|
|
998
998
|
},
|
|
999
999
|
className: "absolute left-0 top-0",
|
|
1000
|
-
children: /* @__PURE__ */
|
|
1000
|
+
children: /* @__PURE__ */ z(u, {
|
|
1001
1001
|
initial: !1,
|
|
1002
|
-
children: /* @__PURE__ */
|
|
1002
|
+
children: /* @__PURE__ */ z(l.span, {
|
|
1003
1003
|
initial: { opacity: 0 },
|
|
1004
1004
|
animate: { opacity: 1 },
|
|
1005
1005
|
exit: { opacity: 0 },
|
|
@@ -1008,8 +1008,8 @@ var it = Z, Q = 16, at = (e, t, n, r) => {
|
|
|
1008
1008
|
ease: "easeOut"
|
|
1009
1009
|
},
|
|
1010
1010
|
className: "absolute left-0 top-0 flex leading-none",
|
|
1011
|
-
children: /* @__PURE__ */
|
|
1012
|
-
|
|
1011
|
+
children: /* @__PURE__ */ z(Xe, {
|
|
1012
|
+
...st(t),
|
|
1013
1013
|
size: _,
|
|
1014
1014
|
label: t.label,
|
|
1015
1015
|
showLabel: n === t.id || f || !b && i !== null,
|
|
@@ -1025,8 +1025,8 @@ var it = Z, Q = 16, at = (e, t, n, r) => {
|
|
|
1025
1025
|
})
|
|
1026
1026
|
}, t.id);
|
|
1027
1027
|
})] });
|
|
1028
|
-
},
|
|
1029
|
-
let m = i(), h = d(), g = t ?
|
|
1028
|
+
}, ut = ({ children: e, open: t, offsetX: n, offsetY: o = Y.inset, width: s, entrance: c = "slide", headerStart: l, headerEnd: u, ariaLabel: f, dataTestId: p }) => {
|
|
1029
|
+
let m = i(), h = d(), g = t ? ke.enter : ke.exit, _ = n - Y.inset, v = L({
|
|
1030
1030
|
from: _,
|
|
1031
1031
|
to: _
|
|
1032
1032
|
});
|
|
@@ -1034,13 +1034,13 @@ var it = Z, Q = 16, at = (e, t, n, r) => {
|
|
|
1034
1034
|
from: v.current.to,
|
|
1035
1035
|
to: _
|
|
1036
1036
|
});
|
|
1037
|
-
let y = _ > v.current.from ?
|
|
1038
|
-
return /* @__PURE__ */
|
|
1037
|
+
let y = _ > v.current.from ? ke.enter : ke.exit, b = c === "grow" ? "translateX(-10%) scale(0.97)" : `translateX(calc(-100% - ${Y.inset}px))`;
|
|
1038
|
+
return /* @__PURE__ */ z(r, {
|
|
1039
1039
|
dataTestId: p,
|
|
1040
|
-
children: /* @__PURE__ */
|
|
1040
|
+
children: /* @__PURE__ */ z("div", {
|
|
1041
1041
|
className: "pointer-events-none absolute bottom-2 z-10",
|
|
1042
1042
|
style: {
|
|
1043
|
-
left:
|
|
1043
|
+
left: Y.inset,
|
|
1044
1044
|
top: o,
|
|
1045
1045
|
width: s,
|
|
1046
1046
|
transform: `translateX(${_}px)`,
|
|
@@ -1048,13 +1048,13 @@ var it = Z, Q = 16, at = (e, t, n, r) => {
|
|
|
1048
1048
|
transitionDuration: y.duration,
|
|
1049
1049
|
transitionTimingFunction: y.easing
|
|
1050
1050
|
},
|
|
1051
|
-
children: /* @__PURE__ */
|
|
1051
|
+
children: /* @__PURE__ */ z("div", {
|
|
1052
1052
|
role: "complementary",
|
|
1053
1053
|
"aria-label": f ?? m.map.panel,
|
|
1054
1054
|
ref: (e) => {
|
|
1055
1055
|
t ? e?.removeAttribute("inert") : e?.setAttribute("inert", "");
|
|
1056
1056
|
},
|
|
1057
|
-
className: a("relative h-full overflow-hidden text-base",
|
|
1057
|
+
className: a("relative h-full overflow-hidden text-base", J(Ee.panel), t ? "pointer-events-auto" : "opacity-0"),
|
|
1058
1058
|
style: {
|
|
1059
1059
|
transform: t || h ? "translateX(0px) scale(1)" : b,
|
|
1060
1060
|
transformOrigin: c === "grow" ? "left center" : void 0,
|
|
@@ -1062,20 +1062,20 @@ var it = Z, Q = 16, at = (e, t, n, r) => {
|
|
|
1062
1062
|
transitionDuration: g.duration,
|
|
1063
1063
|
transitionTimingFunction: g.easing
|
|
1064
1064
|
},
|
|
1065
|
-
children: /* @__PURE__ */
|
|
1066
|
-
...
|
|
1067
|
-
borderRadius:
|
|
1065
|
+
children: /* @__PURE__ */ z(T, {
|
|
1066
|
+
...Te,
|
|
1067
|
+
borderRadius: Ee.panel,
|
|
1068
1068
|
padding: "none",
|
|
1069
1069
|
height: "full",
|
|
1070
|
-
children: /* @__PURE__ */
|
|
1070
|
+
children: /* @__PURE__ */ B("div", {
|
|
1071
1071
|
className: "flex h-full flex-col",
|
|
1072
|
-
children: [l || u ? /* @__PURE__ */
|
|
1072
|
+
children: [l || u ? /* @__PURE__ */ B("div", {
|
|
1073
1073
|
className: "flex shrink-0 items-center justify-between gap-1 p-0.5",
|
|
1074
|
-
children: [/* @__PURE__ */
|
|
1074
|
+
children: [/* @__PURE__ */ z("div", {
|
|
1075
1075
|
className: "flex min-w-0 flex-1 justify-start",
|
|
1076
1076
|
children: l
|
|
1077
1077
|
}), u]
|
|
1078
|
-
}) : null, /* @__PURE__ */
|
|
1078
|
+
}) : null, /* @__PURE__ */ z("div", {
|
|
1079
1079
|
className: "min-h-0 flex-1",
|
|
1080
1080
|
children: e
|
|
1081
1081
|
})]
|
|
@@ -1084,108 +1084,108 @@ var it = Z, Q = 16, at = (e, t, n, r) => {
|
|
|
1084
1084
|
})
|
|
1085
1085
|
})
|
|
1086
1086
|
});
|
|
1087
|
-
},
|
|
1088
|
-
function
|
|
1089
|
-
let [e, t] =
|
|
1087
|
+
}, dt = (e, t, n = 320) => Math.max(216, Math.min(n, e - t - O.mainHardMin)), ft = (e, t = 320) => Math.min(t, Math.max(216, Math.round(e))), pt = 500, mt = "f0-secondary-sidebar-width", ht = k.primaryCompact, gt = (e) => e === null || typeof e == "number" && Number.isFinite(e), _t = j(null), vt = () => te(_t);
|
|
1088
|
+
function yt() {
|
|
1089
|
+
let [e, t] = R(!1), n = L(0), r = N(function() {
|
|
1090
1090
|
t(!0), cancelAnimationFrame(n.current), n.current = requestAnimationFrame(function() {
|
|
1091
1091
|
n.current = requestAnimationFrame(function() {
|
|
1092
1092
|
t(!1);
|
|
1093
1093
|
});
|
|
1094
1094
|
});
|
|
1095
1095
|
}, []);
|
|
1096
|
-
return
|
|
1096
|
+
return P(function() {
|
|
1097
1097
|
return () => cancelAnimationFrame(n.current);
|
|
1098
1098
|
}, []), {
|
|
1099
1099
|
isInstant: e,
|
|
1100
1100
|
landInstantly: r
|
|
1101
1101
|
};
|
|
1102
1102
|
}
|
|
1103
|
-
function
|
|
1104
|
-
let [e, t] =
|
|
1105
|
-
return
|
|
1103
|
+
function bt() {
|
|
1104
|
+
let [e, t] = R(() => window.innerWidth);
|
|
1105
|
+
return P(function() {
|
|
1106
1106
|
let e = () => t(window.innerWidth);
|
|
1107
1107
|
return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
|
|
1108
1108
|
}, []), e;
|
|
1109
1109
|
}
|
|
1110
|
-
function
|
|
1111
|
-
return e ? /* @__PURE__ */
|
|
1110
|
+
function xt({ enabled: e, children: t, ...n }) {
|
|
1111
|
+
return e ? /* @__PURE__ */ z(St, {
|
|
1112
1112
|
...n,
|
|
1113
1113
|
children: t
|
|
1114
|
-
}) : /* @__PURE__ */
|
|
1114
|
+
}) : /* @__PURE__ */ z(_t.Provider, {
|
|
1115
1115
|
value: null,
|
|
1116
1116
|
children: t
|
|
1117
1117
|
});
|
|
1118
1118
|
}
|
|
1119
|
-
function
|
|
1120
|
-
let { isInstant: r, landInstantly: i } =
|
|
1121
|
-
key:
|
|
1119
|
+
function St({ hasSecondarySidebar: e, topBarHeight: t, children: n }) {
|
|
1120
|
+
let { isInstant: r, landInstantly: i } = yt(), a = bt(), [o, s] = R(k.panel), [c, l] = y({
|
|
1121
|
+
key: mt,
|
|
1122
1122
|
fallback: null,
|
|
1123
|
-
validate:
|
|
1123
|
+
validate: gt,
|
|
1124
1124
|
debounceMs: 200
|
|
1125
|
-
}), u =
|
|
1125
|
+
}), u = dt(a, ht, Math.max(320, o)), d = Math.min(o, u), f = c === null ? d : ft(c, u), m = L(o), h = N(function(e) {
|
|
1126
1126
|
e !== m.current && (m.current = e, i(), s(e));
|
|
1127
|
-
}, [i]), g =
|
|
1127
|
+
}, [i]), g = N(function(e) {
|
|
1128
1128
|
i(), l(e);
|
|
1129
|
-
}, [i, l]), _ =
|
|
1129
|
+
}, [i, l]), _ = N(function() {
|
|
1130
1130
|
i(), l(null);
|
|
1131
|
-
}, [i, l]),
|
|
1131
|
+
}, [i, l]), v = p(`(max-width: ${ht + (e ? d : k.panel) + O.mainMin - 1}px)`, { initializeWithValue: !0 }) ? "overlay" : "docked", [b, x] = R(!1), S = L(0), C = N(function() {
|
|
1132
1132
|
x(!1);
|
|
1133
1133
|
}, []);
|
|
1134
|
-
|
|
1135
|
-
i(),
|
|
1134
|
+
F(function() {
|
|
1135
|
+
i(), v === "docked" && C();
|
|
1136
1136
|
}, [
|
|
1137
|
-
|
|
1137
|
+
v,
|
|
1138
1138
|
i,
|
|
1139
1139
|
C
|
|
1140
1140
|
]);
|
|
1141
|
-
let w =
|
|
1142
|
-
|
|
1141
|
+
let w = v === "overlay" && b && e;
|
|
1142
|
+
F(function() {
|
|
1143
1143
|
i(), e || C();
|
|
1144
1144
|
}, [
|
|
1145
1145
|
e,
|
|
1146
1146
|
i,
|
|
1147
1147
|
C
|
|
1148
1148
|
]);
|
|
1149
|
-
let T =
|
|
1150
|
-
|
|
1149
|
+
let T = L(e);
|
|
1150
|
+
F(function() {
|
|
1151
1151
|
T.current = e;
|
|
1152
1152
|
});
|
|
1153
|
-
let E =
|
|
1154
|
-
|
|
1153
|
+
let E = L(null);
|
|
1154
|
+
P(function() {
|
|
1155
1155
|
return () => {
|
|
1156
1156
|
E.current && clearTimeout(E.current);
|
|
1157
1157
|
};
|
|
1158
1158
|
}, []);
|
|
1159
|
-
let D =
|
|
1160
|
-
|
|
1159
|
+
let D = N(function() {
|
|
1160
|
+
v !== "docked" && (S.current = Date.now(), x(!0), E.current && clearTimeout(E.current), E.current = setTimeout(function() {
|
|
1161
1161
|
T.current || x(!1);
|
|
1162
|
-
},
|
|
1163
|
-
}, [
|
|
1162
|
+
}, pt));
|
|
1163
|
+
}, [v]), ee = C, A = N(function() {
|
|
1164
1164
|
w || (S.current = Date.now()), x(!w);
|
|
1165
1165
|
}, [w]);
|
|
1166
|
-
|
|
1166
|
+
P(function() {
|
|
1167
1167
|
if (!w) return;
|
|
1168
1168
|
let e = (e) => {
|
|
1169
1169
|
e.key === "Escape" && !e.defaultPrevented && x(!1);
|
|
1170
1170
|
};
|
|
1171
1171
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
1172
1172
|
}, [w]);
|
|
1173
|
-
let j =
|
|
1174
|
-
Date.now() - S.current <
|
|
1175
|
-
}, []),
|
|
1173
|
+
let j = N(function() {
|
|
1174
|
+
Date.now() - S.current < pt || x(!1);
|
|
1175
|
+
}, []), M = I(function() {
|
|
1176
1176
|
return {
|
|
1177
|
-
primarySidebarWidth:
|
|
1177
|
+
primarySidebarWidth: ht,
|
|
1178
1178
|
hasSecondarySidebar: e,
|
|
1179
1179
|
secondarySidebarWidth: f,
|
|
1180
1180
|
secondarySidebarMaxWidth: u,
|
|
1181
1181
|
declareSecondarySidebarWidth: h,
|
|
1182
1182
|
resizeSecondarySidebar: g,
|
|
1183
1183
|
resetSecondarySidebarWidth: _,
|
|
1184
|
-
navigationMode:
|
|
1184
|
+
navigationMode: v,
|
|
1185
1185
|
isOpenOverPage: w,
|
|
1186
1186
|
openOverPage: D,
|
|
1187
1187
|
toggleOverPage: A,
|
|
1188
|
-
closeOverPage:
|
|
1188
|
+
closeOverPage: ee,
|
|
1189
1189
|
closeOverPageAfterRouteChange: j,
|
|
1190
1190
|
topBarHeight: t,
|
|
1191
1191
|
isInstant: r,
|
|
@@ -1198,28 +1198,31 @@ function xt({ hasSecondarySidebar: e, topBarHeight: t, children: n }) {
|
|
|
1198
1198
|
h,
|
|
1199
1199
|
g,
|
|
1200
1200
|
_,
|
|
1201
|
-
|
|
1201
|
+
v,
|
|
1202
1202
|
w,
|
|
1203
1203
|
D,
|
|
1204
1204
|
A,
|
|
1205
|
-
|
|
1205
|
+
ee,
|
|
1206
1206
|
j,
|
|
1207
1207
|
t,
|
|
1208
1208
|
r,
|
|
1209
1209
|
i
|
|
1210
1210
|
]);
|
|
1211
|
-
return /* @__PURE__ */
|
|
1212
|
-
value:
|
|
1211
|
+
return /* @__PURE__ */ z(_t.Provider, {
|
|
1212
|
+
value: M,
|
|
1213
1213
|
children: n
|
|
1214
1214
|
});
|
|
1215
1215
|
}
|
|
1216
1216
|
//#endregion
|
|
1217
1217
|
//#region src/blocks/ApplicationFrame/FrameProvider.tsx
|
|
1218
|
-
var
|
|
1219
|
-
|
|
1218
|
+
var Ct = "one_sidebar_locked", wt = 32, Tt = 180, Et = 280, Dt = 300, Ot = j(void 0), kt = j({
|
|
1219
|
+
steppedAsideFor: null,
|
|
1220
|
+
takeCard: () => {}
|
|
1221
|
+
}), At = () => te(kt), jt = /* @__PURE__ */ new WeakSet(), Mt = (e) => {
|
|
1222
|
+
jt.add(e.nativeEvent);
|
|
1220
1223
|
};
|
|
1221
|
-
function
|
|
1222
|
-
let e = te(
|
|
1224
|
+
function Nt() {
|
|
1225
|
+
let e = te(Ot);
|
|
1223
1226
|
return e === void 0 ? {
|
|
1224
1227
|
isSmallScreen: !1,
|
|
1225
1228
|
isLastToggleInvokedByUser: !0,
|
|
@@ -1233,93 +1236,105 @@ function At() {
|
|
|
1233
1236
|
hasPrimarySidebar: !1
|
|
1234
1237
|
} : e;
|
|
1235
1238
|
}
|
|
1236
|
-
var
|
|
1237
|
-
function
|
|
1238
|
-
let { currentPath: t } = c(), n =
|
|
1239
|
-
let e = localStorage.getItem(
|
|
1239
|
+
var Pt = (e, t) => e.navigationMode === "overlay" ? e.isOpenOverPage ? "unlocked" : "hidden" : t ? "locked" : "hidden", Ft = (e, t, n) => e || !t ? n ? "unlocked" : "hidden" : "locked";
|
|
1240
|
+
function It({ children: e }) {
|
|
1241
|
+
let { currentPath: t } = c(), n = vt(), [r, i] = R(!1), [a, o] = R(!1), s = p(`(max-width: ${ee.md}px)`, { initializeWithValue: !0 }), l = p(`(max-width: ${ee.xl}px)`, { initializeWithValue: !0 }), u = r ? l : s, [d, f] = R(() => {
|
|
1242
|
+
let e = localStorage.getItem(Ct);
|
|
1240
1243
|
return e === null || !!e;
|
|
1241
|
-
}), [m, h] =
|
|
1242
|
-
|
|
1243
|
-
}, []),
|
|
1244
|
-
|
|
1245
|
-
|
|
1244
|
+
}), [m, h] = R(!1), g = _(), [v, y] = R(null), [b, x] = R(null), S = g && n?.hasSecondarySidebar === !0 && n.navigationMode === "docked" && d && b !== v ? v : null, C = N(function(e) {
|
|
1245
|
+
y(e), o(!1);
|
|
1246
|
+
}, []), [w, T] = R(null), E = L(null), D = L(null), O = N(function() {
|
|
1247
|
+
E.current && clearTimeout(E.current), E.current = null, D.current = null;
|
|
1248
|
+
}, []), k = N(function(e, t) {
|
|
1249
|
+
D.current !== e && (O(), D.current = e, E.current = setTimeout(() => {
|
|
1250
|
+
E.current = null, D.current = null, h(e);
|
|
1246
1251
|
}, t));
|
|
1247
|
-
}, [
|
|
1248
|
-
|
|
1249
|
-
let
|
|
1250
|
-
n ? n.closeOverPage() : (
|
|
1251
|
-
}, [n,
|
|
1252
|
-
n?.navigationMode === "overlay" ? n.toggleOverPage() : (o(e ?? !0), u && !n && h(!m), f(!d));
|
|
1252
|
+
}, [O]);
|
|
1253
|
+
P(() => O, [O]);
|
|
1254
|
+
let A = N(function() {
|
|
1255
|
+
n ? n.closeOverPage() : (O(), h(!1));
|
|
1256
|
+
}, [n, O]), j = N(function({ isInvokedByUser: e } = { isInvokedByUser: !0 }) {
|
|
1257
|
+
n?.navigationMode === "overlay" ? n.toggleOverPage() : (o(e ?? !0), x(v), !S && (u && !n && h(!m), f(!d)));
|
|
1253
1258
|
}, [
|
|
1254
1259
|
n,
|
|
1255
1260
|
u,
|
|
1256
1261
|
m,
|
|
1257
|
-
d
|
|
1258
|
-
|
|
1259
|
-
|
|
1262
|
+
d,
|
|
1263
|
+
v,
|
|
1264
|
+
S
|
|
1265
|
+
]), M = N(function(e) {
|
|
1266
|
+
u || n || d || (jt.has(e.nativeEvent) ? O() : !m && e.clientX < wt ? k(!0, Tt) : m && e.clientX > Et ? k(!1, Dt) : O());
|
|
1260
1267
|
}, [
|
|
1261
1268
|
u,
|
|
1262
1269
|
n,
|
|
1263
1270
|
d,
|
|
1264
1271
|
m,
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
]),
|
|
1268
|
-
|
|
1269
|
-
}, [
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
+
k,
|
|
1273
|
+
O
|
|
1274
|
+
]), te = N(function() {
|
|
1275
|
+
D.current && O();
|
|
1276
|
+
}, [O]), ne = n ? Pt(n, d && S === null) : Ft(u, d, m), re = n?.closeOverPageAfterRouteChange;
|
|
1277
|
+
P(function() {
|
|
1278
|
+
O(), h(!1), re?.();
|
|
1272
1279
|
}, [
|
|
1273
1280
|
t,
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
]),
|
|
1277
|
-
a && localStorage.setItem(
|
|
1278
|
-
}, [d, a]),
|
|
1281
|
+
re,
|
|
1282
|
+
O
|
|
1283
|
+
]), P(function() {
|
|
1284
|
+
a && localStorage.setItem(Ct, d ? "1" : "");
|
|
1285
|
+
}, [d, a]), P(function() {
|
|
1279
1286
|
return () => {
|
|
1280
|
-
|
|
1281
|
-
sidebarState:
|
|
1287
|
+
T({
|
|
1288
|
+
sidebarState: ne,
|
|
1282
1289
|
locked: d
|
|
1283
1290
|
});
|
|
1284
1291
|
};
|
|
1285
|
-
}, [
|
|
1286
|
-
let
|
|
1292
|
+
}, [ne, d]);
|
|
1293
|
+
let F = w?.sidebarState ?? null, ie = a && w?.sidebarState === "hidden" && !w.locked && ne === "locked", B = n !== null, ae = !B && l, oe = I(function() {
|
|
1287
1294
|
return {
|
|
1288
1295
|
isSmallScreen: u,
|
|
1289
1296
|
isLastToggleInvokedByUser: a,
|
|
1290
|
-
sidebarState:
|
|
1291
|
-
hideSidebar:
|
|
1292
|
-
toggleSidebar:
|
|
1293
|
-
prevSidebarState:
|
|
1294
|
-
isDockedByUser:
|
|
1297
|
+
sidebarState: ne,
|
|
1298
|
+
hideSidebar: A,
|
|
1299
|
+
toggleSidebar: j,
|
|
1300
|
+
prevSidebarState: F,
|
|
1301
|
+
isDockedByUser: ie,
|
|
1295
1302
|
setForceFloat: i,
|
|
1296
|
-
floatsWhenForced:
|
|
1297
|
-
hasPrimarySidebar:
|
|
1303
|
+
floatsWhenForced: ae,
|
|
1304
|
+
hasPrimarySidebar: B
|
|
1298
1305
|
};
|
|
1299
1306
|
}, [
|
|
1300
1307
|
u,
|
|
1301
1308
|
a,
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
C,
|
|
1305
|
-
O,
|
|
1306
|
-
k,
|
|
1309
|
+
ne,
|
|
1310
|
+
A,
|
|
1307
1311
|
j,
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1312
|
+
F,
|
|
1313
|
+
ie,
|
|
1314
|
+
ae,
|
|
1315
|
+
B
|
|
1316
|
+
]), se = I(function() {
|
|
1317
|
+
return {
|
|
1318
|
+
steppedAsideFor: S,
|
|
1319
|
+
takeCard: C
|
|
1320
|
+
};
|
|
1321
|
+
}, [S, C]);
|
|
1322
|
+
return /* @__PURE__ */ z(Ot.Provider, {
|
|
1323
|
+
value: oe,
|
|
1324
|
+
children: /* @__PURE__ */ z(kt.Provider, {
|
|
1325
|
+
value: se,
|
|
1326
|
+
children: /* @__PURE__ */ z("div", {
|
|
1327
|
+
onPointerMove: M,
|
|
1328
|
+
onPointerLeave: te,
|
|
1329
|
+
className: "h-screen w-screen",
|
|
1330
|
+
children: e
|
|
1331
|
+
})
|
|
1317
1332
|
})
|
|
1318
1333
|
});
|
|
1319
1334
|
}
|
|
1320
1335
|
//#endregion
|
|
1321
1336
|
//#region src/blocks/Navigation/Sidebar/Icon/Icon.tsx
|
|
1322
|
-
var
|
|
1337
|
+
var Lt = "M10.417 10L14.167 10M10.417 10L12.0837 8.33337M10.417 10L12.0837 11.6667", Rt = {
|
|
1323
1338
|
open: {
|
|
1324
1339
|
rest: {
|
|
1325
1340
|
arrow: "opacity-0 translate-x-0",
|
|
@@ -1340,10 +1355,10 @@ var Pt = "M10.417 10L14.167 10M10.417 10L12.0837 8.33337M10.417 10L12.0837 11.66
|
|
|
1340
1355
|
line: "opacity-100 translate-x-0"
|
|
1341
1356
|
}
|
|
1342
1357
|
}
|
|
1343
|
-
},
|
|
1344
|
-
function
|
|
1345
|
-
let n =
|
|
1346
|
-
return /* @__PURE__ */
|
|
1358
|
+
}, zt = "[transform-box:view-box] transition-[transform,opacity]";
|
|
1359
|
+
function Bt({ isExpanded: e, isHovered: t = !1 }) {
|
|
1360
|
+
let n = Rt[e ? "open" : "closed"][t ? "hover" : "rest"];
|
|
1361
|
+
return /* @__PURE__ */ B("svg", {
|
|
1347
1362
|
width: "20",
|
|
1348
1363
|
height: "20",
|
|
1349
1364
|
viewBox: "0 0 20 20",
|
|
@@ -1351,7 +1366,7 @@ function Lt({ isExpanded: e, isHovered: t = !1 }) {
|
|
|
1351
1366
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1352
1367
|
className: "text-f1-icon-bold",
|
|
1353
1368
|
children: [
|
|
1354
|
-
/* @__PURE__ */
|
|
1369
|
+
/* @__PURE__ */ z("rect", {
|
|
1355
1370
|
id: "container",
|
|
1356
1371
|
x: "3.33325",
|
|
1357
1372
|
y: "5",
|
|
@@ -1361,54 +1376,55 @@ function Lt({ isExpanded: e, isHovered: t = !1 }) {
|
|
|
1361
1376
|
strokeWidth: "1.3",
|
|
1362
1377
|
className: "stroke-current"
|
|
1363
1378
|
}),
|
|
1364
|
-
/* @__PURE__ */
|
|
1379
|
+
/* @__PURE__ */ z("path", {
|
|
1365
1380
|
id: "arrow",
|
|
1366
|
-
d:
|
|
1381
|
+
d: Lt,
|
|
1367
1382
|
strokeWidth: "1.3",
|
|
1368
1383
|
strokeLinecap: "round",
|
|
1369
1384
|
strokeLinejoin: "round",
|
|
1370
|
-
className: a("stroke-current",
|
|
1385
|
+
className: a("stroke-current", zt, v, "origin-[10.5835px_10px]", e ? "scale-x-100" : "-scale-x-100", n.arrow)
|
|
1371
1386
|
}),
|
|
1372
|
-
/* @__PURE__ */
|
|
1387
|
+
/* @__PURE__ */ z("path", {
|
|
1373
1388
|
id: "line",
|
|
1374
1389
|
d: "M7.5 5L7.5 15",
|
|
1375
1390
|
strokeWidth: "1.3",
|
|
1376
1391
|
strokeLinecap: "round",
|
|
1377
|
-
className: a("stroke-current",
|
|
1392
|
+
className: a("stroke-current", zt, v, n.line)
|
|
1378
1393
|
})
|
|
1379
1394
|
]
|
|
1380
1395
|
});
|
|
1381
1396
|
}
|
|
1382
|
-
function
|
|
1383
|
-
let { prevSidebarState: e, sidebarState: t, toggleSidebar: n } =
|
|
1384
|
-
|
|
1385
|
-
|
|
1397
|
+
function Vt() {
|
|
1398
|
+
let { prevSidebarState: e, sidebarState: t, toggleSidebar: n, isLastToggleInvokedByUser: r } = Nt(), a = L(null), [o, c] = R(!1), l = b() === "two-level";
|
|
1399
|
+
P(function() {
|
|
1400
|
+
l && e === "hidden" && (t === "unlocked" || t === "locked" && r) && a.current?.focus();
|
|
1386
1401
|
}, [
|
|
1387
|
-
|
|
1402
|
+
l,
|
|
1388
1403
|
e,
|
|
1389
|
-
t
|
|
1404
|
+
t,
|
|
1405
|
+
r
|
|
1390
1406
|
]);
|
|
1391
|
-
let
|
|
1392
|
-
return /* @__PURE__ */
|
|
1407
|
+
let u = i(), d = t !== "hidden", f = d ? u.navigation.sidebar.closePanel : u.navigation.sidebar.openPanel;
|
|
1408
|
+
return /* @__PURE__ */ z(s, {
|
|
1393
1409
|
variant: "ghost",
|
|
1394
1410
|
size: "md",
|
|
1395
1411
|
onClick: () => n(),
|
|
1396
1412
|
className: "hover:bg-f1-background-hover",
|
|
1397
|
-
title:
|
|
1398
|
-
ref:
|
|
1413
|
+
title: f,
|
|
1414
|
+
ref: a,
|
|
1399
1415
|
compact: !0,
|
|
1400
|
-
"aria-label":
|
|
1401
|
-
"aria-expanded":
|
|
1402
|
-
onMouseEnter: () =>
|
|
1403
|
-
onMouseLeave: () =>
|
|
1404
|
-
children: /* @__PURE__ */
|
|
1405
|
-
isExpanded:
|
|
1406
|
-
isHovered:
|
|
1416
|
+
"aria-label": f,
|
|
1417
|
+
"aria-expanded": d,
|
|
1418
|
+
onMouseEnter: () => c(!0),
|
|
1419
|
+
onMouseLeave: () => c(!1),
|
|
1420
|
+
children: /* @__PURE__ */ z(Bt, {
|
|
1421
|
+
isExpanded: d,
|
|
1422
|
+
isHovered: o
|
|
1407
1423
|
})
|
|
1408
1424
|
});
|
|
1409
1425
|
}
|
|
1410
|
-
function
|
|
1411
|
-
return /* @__PURE__ */
|
|
1426
|
+
function Ht({ isExpanded: e }) {
|
|
1427
|
+
return /* @__PURE__ */ B("svg", {
|
|
1412
1428
|
width: "20",
|
|
1413
1429
|
height: "20",
|
|
1414
1430
|
viewBox: "0 0 20 20",
|
|
@@ -1416,7 +1432,7 @@ function zt({ isExpanded: e }) {
|
|
|
1416
1432
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1417
1433
|
className: "text-f1-icon-bold",
|
|
1418
1434
|
children: [
|
|
1419
|
-
/* @__PURE__ */
|
|
1435
|
+
/* @__PURE__ */ z("rect", {
|
|
1420
1436
|
id: "container",
|
|
1421
1437
|
x: "3.33325",
|
|
1422
1438
|
y: "5",
|
|
@@ -1426,7 +1442,7 @@ function zt({ isExpanded: e }) {
|
|
|
1426
1442
|
strokeWidth: "1.3",
|
|
1427
1443
|
className: "stroke-current"
|
|
1428
1444
|
}),
|
|
1429
|
-
/* @__PURE__ */
|
|
1445
|
+
/* @__PURE__ */ z("path", {
|
|
1430
1446
|
id: "arrow",
|
|
1431
1447
|
d: e ? "M10.417 10L14.167 10M10.417 10L12.0837 8.33337M10.417 10L12.0837 11.6667" : "M10.75 10L7 10M10.75 10L9.08333 8.33337M10.75 10L9.08333 11.6667",
|
|
1432
1448
|
strokeWidth: "1.3",
|
|
@@ -1434,7 +1450,7 @@ function zt({ isExpanded: e }) {
|
|
|
1434
1450
|
strokeLinejoin: "round",
|
|
1435
1451
|
className: a("translate-x-0 stroke-current transition-all duration-200 ease-out motion-reduce:transition-none", e ? "opacity-0 group-hover:-translate-x-1 group-hover:opacity-100" : "opacity-1 group-hover:translate-x-[3px]")
|
|
1436
1452
|
}),
|
|
1437
|
-
/* @__PURE__ */
|
|
1453
|
+
/* @__PURE__ */ z("path", {
|
|
1438
1454
|
id: "line",
|
|
1439
1455
|
d: "M7.5 5L7.5 15",
|
|
1440
1456
|
strokeWidth: "1.3",
|
|
@@ -1444,11 +1460,11 @@ function zt({ isExpanded: e }) {
|
|
|
1444
1460
|
]
|
|
1445
1461
|
});
|
|
1446
1462
|
}
|
|
1447
|
-
function
|
|
1448
|
-
let { isDockedByUser: e, sidebarState: t, toggleSidebar: n, isSmallScreen: r } =
|
|
1449
|
-
return
|
|
1463
|
+
function Ut() {
|
|
1464
|
+
let { isDockedByUser: e, sidebarState: t, toggleSidebar: n, isSmallScreen: r } = Nt(), i = L(null);
|
|
1465
|
+
return P(() => {
|
|
1450
1466
|
e && i.current?.focus();
|
|
1451
|
-
}, [e]), /* @__PURE__ */
|
|
1467
|
+
}, [e]), /* @__PURE__ */ B(s, {
|
|
1452
1468
|
variant: "ghost",
|
|
1453
1469
|
size: "md",
|
|
1454
1470
|
onClick: () => n(),
|
|
@@ -1457,26 +1473,26 @@ function Bt() {
|
|
|
1457
1473
|
ref: i,
|
|
1458
1474
|
compact: !0,
|
|
1459
1475
|
"aria-label": "Close Sidebar",
|
|
1460
|
-
children: [/* @__PURE__ */
|
|
1476
|
+
children: [/* @__PURE__ */ z("div", {
|
|
1461
1477
|
className: a("hidden", { flex: !r }),
|
|
1462
|
-
children: /* @__PURE__ */
|
|
1463
|
-
}), /* @__PURE__ */
|
|
1478
|
+
children: /* @__PURE__ */ z(Ht, { isExpanded: t === "locked" })
|
|
1479
|
+
}), /* @__PURE__ */ z("div", {
|
|
1464
1480
|
className: a("hidden", { flex: r }),
|
|
1465
|
-
children: /* @__PURE__ */
|
|
1481
|
+
children: /* @__PURE__ */ z(S, {
|
|
1466
1482
|
icon: g,
|
|
1467
1483
|
size: "md"
|
|
1468
1484
|
})
|
|
1469
1485
|
})]
|
|
1470
1486
|
});
|
|
1471
1487
|
}
|
|
1472
|
-
function
|
|
1473
|
-
let { hasPrimarySidebar: e } =
|
|
1474
|
-
return
|
|
1488
|
+
function Wt() {
|
|
1489
|
+
let { hasPrimarySidebar: e } = Nt();
|
|
1490
|
+
return z(e ? Vt : Ut, {});
|
|
1475
1491
|
}
|
|
1476
1492
|
//#endregion
|
|
1477
1493
|
//#region src/addons/map/F0Map/components/F0MapSidebarToggle/F0MapSidebarToggle.tsx
|
|
1478
|
-
var
|
|
1479
|
-
let l = i(), u = n ?? (e ? l.map.controls.hidePanel : l.map.controls.showPanel), d = /* @__PURE__ */
|
|
1494
|
+
var Gt = M(({ expanded: e, onToggle: t, label: n, bare: a = !1, dataTestId: o }, c) => {
|
|
1495
|
+
let l = i(), u = n ?? (e ? l.map.controls.hidePanel : l.map.controls.showPanel), d = /* @__PURE__ */ z(s, {
|
|
1480
1496
|
ref: c,
|
|
1481
1497
|
variant: "ghost",
|
|
1482
1498
|
size: "md",
|
|
@@ -1486,29 +1502,29 @@ var Ht = j(({ expanded: e, onToggle: t, label: n, bare: a = !1, dataTestId: o },
|
|
|
1486
1502
|
title: u,
|
|
1487
1503
|
"aria-label": u,
|
|
1488
1504
|
"aria-expanded": e,
|
|
1489
|
-
children: /* @__PURE__ */
|
|
1505
|
+
children: /* @__PURE__ */ z(Ht, { isExpanded: e })
|
|
1490
1506
|
});
|
|
1491
|
-
return /* @__PURE__ */
|
|
1507
|
+
return /* @__PURE__ */ z(r, {
|
|
1492
1508
|
dataTestId: o,
|
|
1493
|
-
children: a ? d : /* @__PURE__ */
|
|
1509
|
+
children: a ? d : /* @__PURE__ */ z(Ae, { children: d })
|
|
1494
1510
|
});
|
|
1495
1511
|
});
|
|
1496
|
-
|
|
1512
|
+
Gt.displayName = "F0MapSidebarToggle";
|
|
1497
1513
|
//#endregion
|
|
1498
1514
|
//#region src/addons/map/F0Map/utils/arc.ts
|
|
1499
|
-
var
|
|
1515
|
+
var Kt = (e, t, n = .3, r = 64) => {
|
|
1500
1516
|
let [i, a] = e, [o, s] = t, c = (i + o) / 2, l = (a + s) / 2, u = c - (s - a) * n, d = l + (o - i) * n, f = [];
|
|
1501
1517
|
for (let e = 0; e <= r; e++) {
|
|
1502
1518
|
let t = e / r, n = 1 - t, c = n * n, l = 2 * n * t, p = t * t;
|
|
1503
1519
|
f.push([c * i + l * u + p * o, c * a + l * d + p * s]);
|
|
1504
1520
|
}
|
|
1505
1521
|
return f;
|
|
1506
|
-
},
|
|
1522
|
+
}, qt = (e, t) => e.color ?? Se(e.variant ?? "radical", t), Jt = (e, t) => e.color ?? Se(e.variant ?? "radical", !t), Yt = ({ id: e, kind: t, coordinates: n, style: r, isDark: i }) => {
|
|
1507
1523
|
let a = r.width ?? 3;
|
|
1508
1524
|
return {
|
|
1509
1525
|
id: e,
|
|
1510
1526
|
coordinates: n,
|
|
1511
|
-
color:
|
|
1527
|
+
color: qt(r, i),
|
|
1512
1528
|
width: a,
|
|
1513
1529
|
opacity: r.opacity ?? 1,
|
|
1514
1530
|
dashed: r.dashed ?? !1,
|
|
@@ -1516,28 +1532,28 @@ var Ut = (e, t, n = .3, r = 64) => {
|
|
|
1516
1532
|
width: a * 1.6,
|
|
1517
1533
|
opacity: 1
|
|
1518
1534
|
} : {
|
|
1519
|
-
color:
|
|
1535
|
+
color: Jt(r, i),
|
|
1520
1536
|
opacity: 1
|
|
1521
1537
|
}
|
|
1522
1538
|
};
|
|
1523
|
-
},
|
|
1524
|
-
let o =
|
|
1539
|
+
}, Xt = ({ adapter: e, routes: t, arcs: n, isDark: r, onRouteClick: i, onArcClick: a }) => {
|
|
1540
|
+
let o = I(() => [...t.map((e) => Yt({
|
|
1525
1541
|
id: e.id,
|
|
1526
1542
|
kind: "route",
|
|
1527
1543
|
coordinates: e.coordinates,
|
|
1528
1544
|
style: e,
|
|
1529
1545
|
isDark: r
|
|
1530
|
-
})), ...n.map((e) =>
|
|
1546
|
+
})), ...n.map((e) => Yt({
|
|
1531
1547
|
id: e.id,
|
|
1532
1548
|
kind: "arc",
|
|
1533
|
-
coordinates:
|
|
1549
|
+
coordinates: Kt(e.from, e.to, e.curvature),
|
|
1534
1550
|
style: e,
|
|
1535
1551
|
isDark: r
|
|
1536
1552
|
}))], [
|
|
1537
1553
|
t,
|
|
1538
1554
|
n,
|
|
1539
1555
|
r
|
|
1540
|
-
]), s =
|
|
1556
|
+
]), s = I(() => new Map([...t.map((e) => [e.id, "route"]), ...n.map((e) => [e.id, "arc"])]), [t, n]), c = L({
|
|
1541
1557
|
onRouteClick: i,
|
|
1542
1558
|
onArcClick: a,
|
|
1543
1559
|
kinds: s
|
|
@@ -1548,7 +1564,7 @@ var Ut = (e, t, n = .3, r = 64) => {
|
|
|
1548
1564
|
kinds: s
|
|
1549
1565
|
};
|
|
1550
1566
|
let l = !!(i || a);
|
|
1551
|
-
return
|
|
1567
|
+
return P(() => {
|
|
1552
1568
|
e.setLines(o, l ? { onClick: (e) => {
|
|
1553
1569
|
let { onRouteClick: t, onArcClick: n, kinds: r } = c.current;
|
|
1554
1570
|
r.get(e) === "arc" ? n?.(e) : t?.(e);
|
|
@@ -1557,25 +1573,25 @@ var Ut = (e, t, n = .3, r = 64) => {
|
|
|
1557
1573
|
e,
|
|
1558
1574
|
o,
|
|
1559
1575
|
l
|
|
1560
|
-
]),
|
|
1561
|
-
},
|
|
1576
|
+
]), P(() => () => e.setLines([]), [e]), null;
|
|
1577
|
+
}, Zt = ({ adapter: e, coords: t }) => (P(() => {
|
|
1562
1578
|
e.setCurrentLocation(t);
|
|
1563
|
-
}, [e, t]),
|
|
1564
|
-
|
|
1579
|
+
}, [e, t]), P(() => () => e.setCurrentLocation(null), [e]), null);
|
|
1580
|
+
Zt.displayName = "CurrentLocationLayer";
|
|
1565
1581
|
//#endregion
|
|
1566
1582
|
//#region src/addons/map/F0Map/constants.ts
|
|
1567
|
-
var
|
|
1583
|
+
var Qt = {
|
|
1568
1584
|
curve: 1.42,
|
|
1569
1585
|
duration: 1400
|
|
1570
|
-
},
|
|
1586
|
+
}, $t = 200, en = ({ dataTestId: e, className: t }) => /* @__PURE__ */ z(r, {
|
|
1571
1587
|
dataTestId: e,
|
|
1572
|
-
children: /* @__PURE__ */
|
|
1588
|
+
children: /* @__PURE__ */ z("div", {
|
|
1573
1589
|
"aria-busy": "true",
|
|
1574
1590
|
"aria-live": "polite",
|
|
1575
1591
|
className: a("h-full w-full animate-pulse bg-f1-background-secondary", t)
|
|
1576
1592
|
})
|
|
1577
|
-
}),
|
|
1578
|
-
let [t, n] =
|
|
1593
|
+
}), tn = (e) => {
|
|
1594
|
+
let [t, n] = R(null), r = N((t) => {
|
|
1579
1595
|
e && typeof navigator < "u" && navigator.geolocation && navigator.geolocation.getCurrentPosition((e) => {
|
|
1580
1596
|
let r = [e.coords.longitude, e.coords.latitude];
|
|
1581
1597
|
n(r), t?.(r);
|
|
@@ -1585,7 +1601,7 @@ var Yt = {
|
|
|
1585
1601
|
maximumAge: 6e4
|
|
1586
1602
|
});
|
|
1587
1603
|
}, [e]);
|
|
1588
|
-
return
|
|
1604
|
+
return P(() => {
|
|
1589
1605
|
e && !t && typeof navigator < "u" && navigator.permissions?.query({ name: "geolocation" }).then((e) => {
|
|
1590
1606
|
e.state === "granted" && r();
|
|
1591
1607
|
}).catch(() => {});
|
|
@@ -1597,8 +1613,8 @@ var Yt = {
|
|
|
1597
1613
|
coords: t,
|
|
1598
1614
|
request: r
|
|
1599
1615
|
};
|
|
1600
|
-
},
|
|
1601
|
-
let [e, t] =
|
|
1616
|
+
}, nn = () => {
|
|
1617
|
+
let [e, t] = R(!1), n = L(null), r = N((e) => {
|
|
1602
1618
|
if (n.current?.disconnect(), n.current = null, !e) return;
|
|
1603
1619
|
let r = () => t(e.closest(".dark") !== null);
|
|
1604
1620
|
r();
|
|
@@ -1609,21 +1625,21 @@ var Yt = {
|
|
|
1609
1625
|
});
|
|
1610
1626
|
n.current = i;
|
|
1611
1627
|
}, []);
|
|
1612
|
-
return
|
|
1628
|
+
return P(() => () => n.current?.disconnect(), []), {
|
|
1613
1629
|
containerRef: r,
|
|
1614
1630
|
isDark: e
|
|
1615
1631
|
};
|
|
1616
|
-
},
|
|
1617
|
-
maplibre: async () => (await import("./maplibre-
|
|
1632
|
+
}, rn = {
|
|
1633
|
+
maplibre: async () => (await import("./maplibre-B3l6Byv4.js")).createMaplibreAdapter,
|
|
1618
1634
|
google: async (e) => (await import("./google-DDQ7XfPD.js")).loadGoogleAdapter(e)
|
|
1619
|
-
},
|
|
1620
|
-
let n =
|
|
1635
|
+
}, an = /* @__PURE__ */ new Map(), on = (e, t) => {
|
|
1636
|
+
let n = an.get(e);
|
|
1621
1637
|
if (n) return n;
|
|
1622
|
-
let r =
|
|
1623
|
-
throw
|
|
1638
|
+
let r = rn[e](t).catch((t) => {
|
|
1639
|
+
throw an.delete(e), t;
|
|
1624
1640
|
});
|
|
1625
|
-
return
|
|
1626
|
-
},
|
|
1641
|
+
return an.set(e, r), r;
|
|
1642
|
+
}, sn = {
|
|
1627
1643
|
version: 8,
|
|
1628
1644
|
sources: { openmaptiles: {
|
|
1629
1645
|
type: "vector",
|
|
@@ -6511,7 +6527,7 @@ var Yt = {
|
|
|
6511
6527
|
],
|
|
6512
6528
|
name: "f0-dark",
|
|
6513
6529
|
metadata: { "f0:generated": !0 }
|
|
6514
|
-
},
|
|
6530
|
+
}, cn = {
|
|
6515
6531
|
version: 8,
|
|
6516
6532
|
sources: { openmaptiles: {
|
|
6517
6533
|
type: "vector",
|
|
@@ -11399,7 +11415,7 @@ var Yt = {
|
|
|
11399
11415
|
],
|
|
11400
11416
|
name: "f0-light",
|
|
11401
11417
|
metadata: { "f0:generated": !0 }
|
|
11402
|
-
},
|
|
11418
|
+
}, ln = [
|
|
11403
11419
|
{
|
|
11404
11420
|
featureType: "landscape",
|
|
11405
11421
|
elementType: "geometry.fill",
|
|
@@ -11555,7 +11571,7 @@ var Yt = {
|
|
|
11555
11571
|
elementType: "labels.icon",
|
|
11556
11572
|
stylers: [{ visibility: "off" }]
|
|
11557
11573
|
}
|
|
11558
|
-
],
|
|
11574
|
+
], un = [
|
|
11559
11575
|
{
|
|
11560
11576
|
featureType: "landscape",
|
|
11561
11577
|
elementType: "geometry.fill",
|
|
@@ -11711,44 +11727,44 @@ var Yt = {
|
|
|
11711
11727
|
elementType: "labels.icon",
|
|
11712
11728
|
stylers: [{ visibility: "off" }]
|
|
11713
11729
|
}
|
|
11714
|
-
],
|
|
11730
|
+
], dn = {
|
|
11715
11731
|
provider: "maplibre",
|
|
11716
|
-
light:
|
|
11717
|
-
dark:
|
|
11718
|
-
},
|
|
11732
|
+
light: cn,
|
|
11733
|
+
dark: sn
|
|
11734
|
+
}, fn = {
|
|
11719
11735
|
provider: "google",
|
|
11720
|
-
light:
|
|
11721
|
-
dark:
|
|
11722
|
-
},
|
|
11736
|
+
light: un,
|
|
11737
|
+
dark: ln
|
|
11738
|
+
}, pn = (e, t) => ({
|
|
11723
11739
|
featureType: e,
|
|
11724
11740
|
elementType: t,
|
|
11725
11741
|
stylers: [{ visibility: "off" }]
|
|
11726
|
-
}),
|
|
11727
|
-
|
|
11728
|
-
|
|
11729
|
-
|
|
11730
|
-
],
|
|
11742
|
+
}), mn = [
|
|
11743
|
+
pn("poi", "labels"),
|
|
11744
|
+
pn("transit", "labels"),
|
|
11745
|
+
pn("road", "labels.icon")
|
|
11746
|
+
], hn = {
|
|
11731
11747
|
provider: "google",
|
|
11732
|
-
light:
|
|
11733
|
-
dark:
|
|
11734
|
-
},
|
|
11748
|
+
light: mn,
|
|
11749
|
+
dark: mn
|
|
11750
|
+
}, gn = (e) => e === "google" ? hn : dn, _n = (e, t, n) => {
|
|
11735
11751
|
let r = e.on(t, () => {
|
|
11736
11752
|
r(), n();
|
|
11737
11753
|
});
|
|
11738
11754
|
return r;
|
|
11739
|
-
},
|
|
11755
|
+
}, vn = {
|
|
11740
11756
|
center: [2.154, 41.39],
|
|
11741
11757
|
zoom: 11
|
|
11742
|
-
},
|
|
11758
|
+
}, yn = (e, t, n, r) => [
|
|
11743
11759
|
...e.map((e) => e.coordinates),
|
|
11744
11760
|
...t.flatMap((e) => e.coordinates),
|
|
11745
11761
|
...n.flatMap((e) => [e.from, e.to]),
|
|
11746
11762
|
...r.flatMap((e) => me(e.center, e.radiusMeters))
|
|
11747
|
-
],
|
|
11748
|
-
let l =
|
|
11763
|
+
], bn = (e) => e.top === 0 && e.right === 0 && e.bottom === 0 && e.left === 0, xn = ({ adapter: e, points: t, animate: n, routes: r = [], arcs: i = [], areas: a = [], gutter: o = 64, inset: s, size: c }) => {
|
|
11764
|
+
let l = yn(t, r, i, a);
|
|
11749
11765
|
if (l.length === 0) return;
|
|
11750
11766
|
let u = a.length > 0 ? 17 : 15;
|
|
11751
|
-
if (l.length > 1 &&
|
|
11767
|
+
if (l.length > 1 && bn(s)) {
|
|
11752
11768
|
e.fitCoordinates(l, {
|
|
11753
11769
|
gutter: o,
|
|
11754
11770
|
maxZoom: u,
|
|
@@ -11757,7 +11773,7 @@ var Yt = {
|
|
|
11757
11773
|
return;
|
|
11758
11774
|
}
|
|
11759
11775
|
let d = l.length === 1 ? {
|
|
11760
|
-
center:
|
|
11776
|
+
center: le(e, l[0], s, 14),
|
|
11761
11777
|
zoom: 14
|
|
11762
11778
|
} : ue({
|
|
11763
11779
|
adapter: e,
|
|
@@ -11768,243 +11784,243 @@ var Yt = {
|
|
|
11768
11784
|
maxZoom: u
|
|
11769
11785
|
});
|
|
11770
11786
|
d && (n ? e.easeTo(d, { animate: n }) : e.jumpTo(d, { animate: n }));
|
|
11771
|
-
},
|
|
11772
|
-
let
|
|
11773
|
-
|
|
11774
|
-
}, [
|
|
11775
|
-
|
|
11776
|
-
|
|
11787
|
+
}, Sn = (e) => `${e.top},${e.right},${e.bottom},${e.left}`, Cn = M(function({ markers: e = [], routes: o = [], arcs: s = [], areas: c = [], onRouteClick: l, onArcClick: u, selectedMarkerId: f, defaultSelectedMarkerId: p = null, onMarkerSelect: m, onMarkerDrag: h, onMarkerDragEnd: g, highlightedId: _ = null, viewportInset: v, centerOnMarkerClick: y = !1, fitToMarkers: b, initialViewport: x, mapStyle: S, interactive: C = !0, gestureHandling: w, minZoom: T, maxZoom: E = 18, showControls: D = !0, controlLabels: ee, showCurrentLocation: O = !1, fullScreen: k = !1, onSidebarToggle: A, sidebarExpanded: j = !1, sidebarToggleAddon: M, sidebarHeaderStart: te, sidebar: F, detail: I, detailOpen: ae = !1, clearSelectionOnBackgroundClick: de = !0, projection: fe = "mercator", provider: pe, loading: me = !1, ariaLabel: he, dataTestId: ge, className: _e }, ve) {
|
|
11788
|
+
let ye = w ?? (k ? "greedy" : "cooperative"), V = i(), H = t(pe), be = n(), U = L(null), W = L(null), [G, K] = R(null), [q, xe] = R(!1), [Se, Ce] = R(!1), [Te, Ee] = R(0), De = ne(), J = d(), { containerRef: Oe, isDark: Me } = nn(), Pe = N((e) => {
|
|
11789
|
+
U.current = e, Oe(e);
|
|
11790
|
+
}, [Oe]), Fe = Me, Ie = !S || S.provider === H, Le = Ie ? S ?? gn(H) : gn(H), Re = Fe ? Le.dark : Le.light, ze = L(!1);
|
|
11791
|
+
P(() => {
|
|
11792
|
+
Ie || ze.current || (ze.current = !0, console.warn(`F0Map: ignoring a "${S?.provider}" mapStyle on the "${H}" engine - the shapes are not interchangeable. Pass a "${H}" style, or none for its default look.`));
|
|
11777
11793
|
}, [
|
|
11778
|
-
|
|
11794
|
+
Ie,
|
|
11779
11795
|
S?.provider,
|
|
11780
|
-
|
|
11796
|
+
H
|
|
11781
11797
|
]);
|
|
11782
|
-
let [
|
|
11783
|
-
f === void 0 &&
|
|
11784
|
-
}, [f, m]),
|
|
11785
|
-
|
|
11786
|
-
let
|
|
11787
|
-
|
|
11788
|
-
let
|
|
11789
|
-
|
|
11790
|
-
let
|
|
11791
|
-
|
|
11792
|
-
let
|
|
11793
|
-
|
|
11794
|
-
let
|
|
11795
|
-
|
|
11796
|
-
let
|
|
11797
|
-
|
|
11798
|
-
let
|
|
11799
|
-
|
|
11800
|
-
let
|
|
11801
|
-
|
|
11802
|
-
let
|
|
11798
|
+
let [Be, Ve] = R(p), He = f === void 0 ? Be : f, Ue = N((e) => {
|
|
11799
|
+
f === void 0 && Ve(e), m?.(e);
|
|
11800
|
+
}, [f, m]), X = j && !!A, We = ae && !!I, Ge = X ? Y.inset + Y.listWidth + Y.gap : Y.inset, Ke = X ? Y.inset : Y.inset + Y.toggleSize + Y.gap, qe = We ? Ge + Y.detailWidth : X ? Y.inset + Y.listWidth : null, Je = oe(v, { left: qe === null ? 0 : qe + Y.gap }), Z = L(e);
|
|
11801
|
+
Z.current = e;
|
|
11802
|
+
let Ye = L(o);
|
|
11803
|
+
Ye.current = o;
|
|
11804
|
+
let Xe = L(s);
|
|
11805
|
+
Xe.current = s;
|
|
11806
|
+
let Ze = L(c);
|
|
11807
|
+
Ze.current = c;
|
|
11808
|
+
let Qe = L(fe);
|
|
11809
|
+
Qe.current = fe;
|
|
11810
|
+
let $e = L(Ue);
|
|
11811
|
+
$e.current = Ue;
|
|
11812
|
+
let et = L(He);
|
|
11813
|
+
et.current = He;
|
|
11814
|
+
let tt = L(Je);
|
|
11815
|
+
tt.current = Je;
|
|
11816
|
+
let nt = L(de);
|
|
11817
|
+
nt.current = de;
|
|
11818
|
+
let Q = L(null), rt = b ?? x === void 0, $ = N(() => {
|
|
11803
11819
|
let e = {
|
|
11804
|
-
width:
|
|
11805
|
-
height:
|
|
11820
|
+
width: U.current?.clientWidth ?? 0,
|
|
11821
|
+
height: U.current?.clientHeight ?? 0
|
|
11806
11822
|
};
|
|
11807
11823
|
return {
|
|
11808
|
-
inset:
|
|
11824
|
+
inset: se(tt.current, e),
|
|
11809
11825
|
size: e
|
|
11810
11826
|
};
|
|
11811
|
-
}, []),
|
|
11812
|
-
|
|
11827
|
+
}, []), it = N((e, t) => {
|
|
11828
|
+
Q.current = { kind: "fit" }, xn({
|
|
11813
11829
|
adapter: e,
|
|
11814
|
-
points:
|
|
11830
|
+
points: Z.current,
|
|
11815
11831
|
animate: t,
|
|
11816
|
-
routes:
|
|
11817
|
-
arcs:
|
|
11818
|
-
areas:
|
|
11819
|
-
|
|
11832
|
+
routes: Ye.current,
|
|
11833
|
+
arcs: Xe.current,
|
|
11834
|
+
areas: Ze.current,
|
|
11835
|
+
...$()
|
|
11820
11836
|
});
|
|
11821
|
-
}, [
|
|
11822
|
-
|
|
11823
|
-
let
|
|
11837
|
+
}, [$]), at = L(it);
|
|
11838
|
+
at.current = it;
|
|
11839
|
+
let ot = N((e, t) => {
|
|
11824
11840
|
let n = Math.max(e.getZoom(), 15);
|
|
11825
|
-
|
|
11841
|
+
Q.current = {
|
|
11826
11842
|
kind: "flight",
|
|
11827
11843
|
zoom: n
|
|
11828
11844
|
};
|
|
11829
|
-
let { inset: r } =
|
|
11845
|
+
let { inset: r } = $();
|
|
11830
11846
|
e.easeTo({
|
|
11831
|
-
center:
|
|
11847
|
+
center: le(e, t.coordinates, r, n),
|
|
11832
11848
|
zoom: n
|
|
11833
|
-
}, { animate: !
|
|
11834
|
-
}, [
|
|
11835
|
-
let t =
|
|
11836
|
-
if (
|
|
11837
|
-
let { inset: e } =
|
|
11838
|
-
t.easeTo({ center:
|
|
11849
|
+
}, { animate: !J });
|
|
11850
|
+
}, [$, J]), st = N((e) => {
|
|
11851
|
+
let t = W.current, n = Z.current.find((t) => t.id === e);
|
|
11852
|
+
if (Q.current = null, y && t && n) {
|
|
11853
|
+
let { inset: e } = $();
|
|
11854
|
+
t.easeTo({ center: le(t, n.coordinates, e) }, { animate: !J });
|
|
11839
11855
|
}
|
|
11840
|
-
|
|
11856
|
+
$e.current(e);
|
|
11841
11857
|
}, [
|
|
11842
11858
|
y,
|
|
11843
|
-
|
|
11844
|
-
|
|
11845
|
-
]),
|
|
11846
|
-
|
|
11847
|
-
|
|
11859
|
+
$,
|
|
11860
|
+
J
|
|
11861
|
+
]), ct = L(!1);
|
|
11862
|
+
P(() => {
|
|
11863
|
+
ct.current || e.length <= 200 || (ct.current = !0, console.warn(`F0Map: ${e.length} markers exceeds the recommended maximum of 200. Markers are DOM elements - pan/zoom will degrade. Aggregate or filter the data, or wait for a GL clustering path.`));
|
|
11848
11864
|
}, [e.length]);
|
|
11849
|
-
let { coords: dt, request: ft } =
|
|
11850
|
-
|
|
11851
|
-
}, []), mt =
|
|
11852
|
-
|
|
11853
|
-
}, []), ht =
|
|
11854
|
-
|
|
11855
|
-
}, [
|
|
11865
|
+
let { coords: dt, request: ft } = tn(O), pt = N(() => {
|
|
11866
|
+
Q.current = null, W.current?.zoomIn();
|
|
11867
|
+
}, []), mt = N(() => {
|
|
11868
|
+
Q.current = null, W.current?.zoomOut();
|
|
11869
|
+
}, []), ht = N(() => {
|
|
11870
|
+
W.current && it(W.current, !J);
|
|
11871
|
+
}, [it, J]), gt = N(() => {
|
|
11856
11872
|
ft((e) => {
|
|
11857
|
-
let t =
|
|
11873
|
+
let t = W.current;
|
|
11858
11874
|
if (!t) return;
|
|
11859
|
-
|
|
11860
|
-
let n = Math.max(t.getZoom(), 13), { inset: r } =
|
|
11875
|
+
Q.current = null;
|
|
11876
|
+
let n = Math.max(t.getZoom(), 13), { inset: r } = $();
|
|
11861
11877
|
t.flyTo({
|
|
11862
|
-
center:
|
|
11878
|
+
center: le(t, e, r, n),
|
|
11863
11879
|
zoom: n
|
|
11864
|
-
}, { animate: !
|
|
11880
|
+
}, { animate: !J });
|
|
11865
11881
|
});
|
|
11866
11882
|
}, [
|
|
11867
11883
|
ft,
|
|
11868
|
-
|
|
11869
|
-
|
|
11870
|
-
]), _t =
|
|
11871
|
-
let t =
|
|
11884
|
+
$,
|
|
11885
|
+
J
|
|
11886
|
+
]), _t = N((e) => {
|
|
11887
|
+
let t = W.current;
|
|
11872
11888
|
if (!t) return;
|
|
11873
|
-
|
|
11889
|
+
Q.current = null;
|
|
11874
11890
|
let n = ue({
|
|
11875
11891
|
adapter: t,
|
|
11876
11892
|
coordinates: e,
|
|
11877
|
-
|
|
11893
|
+
...$(),
|
|
11878
11894
|
gutter: 64,
|
|
11879
11895
|
maxZoom: 16
|
|
11880
11896
|
});
|
|
11881
|
-
n && (
|
|
11882
|
-
}, [
|
|
11883
|
-
let t =
|
|
11884
|
-
t && n &&
|
|
11885
|
-
}, [
|
|
11886
|
-
|
|
11887
|
-
if (!
|
|
11897
|
+
n && (J ? t.jumpTo(n, { animate: !1 }) : t.flyTo(n));
|
|
11898
|
+
}, [$, J]), vt = N((e) => {
|
|
11899
|
+
let t = W.current, n = Z.current.find((t) => t.id === e);
|
|
11900
|
+
t && n && ot(t, n), Ue(e);
|
|
11901
|
+
}, [ot, Ue]);
|
|
11902
|
+
P(() => {
|
|
11903
|
+
if (!We || He === null) return;
|
|
11888
11904
|
let e = (e) => {
|
|
11889
|
-
e.key !== "Escape" || e.defaultPrevented || (e.preventDefault(),
|
|
11890
|
-
}, t =
|
|
11905
|
+
e.key !== "Escape" || e.defaultPrevented || (e.preventDefault(), $e.current(null));
|
|
11906
|
+
}, t = U.current?.ownerDocument ?? document;
|
|
11891
11907
|
return t.addEventListener("keydown", e), () => t.removeEventListener("keydown", e);
|
|
11892
|
-
}, [
|
|
11893
|
-
getNativeMap: () =>
|
|
11908
|
+
}, [We, He]), re(ve, () => ({
|
|
11909
|
+
getNativeMap: () => W.current?.native() ?? null,
|
|
11894
11910
|
focusMarker: (e) => {
|
|
11895
|
-
let t =
|
|
11896
|
-
t && n && (
|
|
11911
|
+
let t = W.current, n = Z.current.find((t) => t.id === e);
|
|
11912
|
+
t && n && (ot(t, n), $e.current(e));
|
|
11897
11913
|
},
|
|
11898
11914
|
fitToMarkers: () => {
|
|
11899
|
-
|
|
11915
|
+
W.current && it(W.current, !J);
|
|
11900
11916
|
},
|
|
11901
|
-
clearSelection: () =>
|
|
11917
|
+
clearSelection: () => $e.current(null)
|
|
11902
11918
|
}), [
|
|
11903
|
-
|
|
11904
|
-
|
|
11905
|
-
|
|
11919
|
+
it,
|
|
11920
|
+
ot,
|
|
11921
|
+
J
|
|
11906
11922
|
]);
|
|
11907
|
-
let yt =
|
|
11908
|
-
yt.current =
|
|
11909
|
-
let bt =
|
|
11910
|
-
bt.current =
|
|
11911
|
-
let xt =
|
|
11912
|
-
|
|
11913
|
-
if (
|
|
11914
|
-
let e =
|
|
11923
|
+
let yt = L(Re);
|
|
11924
|
+
yt.current = Re;
|
|
11925
|
+
let bt = L(be);
|
|
11926
|
+
bt.current = be;
|
|
11927
|
+
let xt = L(null), St = L(x ?? vn);
|
|
11928
|
+
P(() => {
|
|
11929
|
+
if (me) return;
|
|
11930
|
+
let e = U.current;
|
|
11915
11931
|
if (!e) return;
|
|
11916
11932
|
xt.current = yt.current;
|
|
11917
11933
|
let t = St.current, n = null, r = !1, i = [];
|
|
11918
|
-
return
|
|
11934
|
+
return on(H, bt.current).then((i) => {
|
|
11919
11935
|
if (!r) {
|
|
11920
11936
|
try {
|
|
11921
11937
|
n = i({
|
|
11922
11938
|
container: e,
|
|
11923
11939
|
style: yt.current,
|
|
11924
11940
|
center: t.center,
|
|
11925
|
-
zoom: t.zoom ??
|
|
11941
|
+
zoom: t.zoom ?? vn.zoom,
|
|
11926
11942
|
minZoom: T,
|
|
11927
11943
|
maxZoom: E,
|
|
11928
11944
|
interactive: C,
|
|
11929
|
-
cooperativeGestures:
|
|
11945
|
+
cooperativeGestures: ye === "cooperative"
|
|
11930
11946
|
});
|
|
11931
11947
|
} catch {
|
|
11932
|
-
|
|
11948
|
+
xe(!0);
|
|
11933
11949
|
return;
|
|
11934
11950
|
}
|
|
11935
11951
|
a(n);
|
|
11936
11952
|
}
|
|
11937
11953
|
}).catch((e) => {
|
|
11938
|
-
console.error("[F0Map] could not load the map engine", e), r ||
|
|
11954
|
+
console.error("[F0Map] could not load the map engine", e), r || Ce(!0);
|
|
11939
11955
|
}), () => {
|
|
11940
|
-
r = !0, i.forEach((e) => e()), n && (
|
|
11956
|
+
r = !0, i.forEach((e) => e()), n && (W.current = null, K(null), n.destroy());
|
|
11941
11957
|
};
|
|
11942
11958
|
function a(e) {
|
|
11943
|
-
|
|
11959
|
+
W.current = e, K(e), xe(!1);
|
|
11944
11960
|
let t = !1;
|
|
11945
|
-
i.push(
|
|
11946
|
-
t = !0,
|
|
11961
|
+
i.push(_n(e, "ready", () => {
|
|
11962
|
+
t = !0, Ce(!1), e.resize(), rt && xn({
|
|
11947
11963
|
adapter: e,
|
|
11948
|
-
points:
|
|
11964
|
+
points: Z.current,
|
|
11949
11965
|
animate: !1,
|
|
11950
|
-
routes:
|
|
11951
|
-
arcs:
|
|
11952
|
-
areas:
|
|
11953
|
-
|
|
11954
|
-
}), e.setGlobeProjection(
|
|
11966
|
+
routes: Ye.current,
|
|
11967
|
+
arcs: Xe.current,
|
|
11968
|
+
areas: Ze.current,
|
|
11969
|
+
...$()
|
|
11970
|
+
}), e.setGlobeProjection(Qe.current === "globe");
|
|
11955
11971
|
}), e.on("error", () => {
|
|
11956
|
-
t ||
|
|
11972
|
+
t || Ce(!0);
|
|
11957
11973
|
}), e.on("click", () => {
|
|
11958
|
-
|
|
11974
|
+
nt.current && $e.current(null);
|
|
11959
11975
|
}));
|
|
11960
11976
|
}
|
|
11961
11977
|
}, [
|
|
11962
|
-
|
|
11978
|
+
me,
|
|
11963
11979
|
C,
|
|
11964
|
-
|
|
11980
|
+
ye,
|
|
11965
11981
|
T,
|
|
11966
11982
|
E,
|
|
11967
|
-
|
|
11968
|
-
|
|
11969
|
-
|
|
11970
|
-
]),
|
|
11971
|
-
let e =
|
|
11972
|
-
e && xt.current !==
|
|
11973
|
-
}, [
|
|
11974
|
-
|
|
11975
|
-
}, [
|
|
11976
|
-
let Ct =
|
|
11977
|
-
Ct.current =
|
|
11983
|
+
rt,
|
|
11984
|
+
H,
|
|
11985
|
+
Te
|
|
11986
|
+
]), P(() => {
|
|
11987
|
+
let e = W.current;
|
|
11988
|
+
e && xt.current !== Re && (xt.current = Re, e.applyStyle(Re), _n(e, "styled", () => e.setGlobeProjection(Qe.current === "globe")));
|
|
11989
|
+
}, [Re]), P(() => {
|
|
11990
|
+
W.current?.setGlobeProjection(fe === "globe");
|
|
11991
|
+
}, [fe]);
|
|
11992
|
+
let Ct = L(ot);
|
|
11993
|
+
Ct.current = ot, P(() => {
|
|
11978
11994
|
if (!_) return;
|
|
11979
|
-
let e =
|
|
11995
|
+
let e = W.current, t = Z.current.find((e) => e.id === _);
|
|
11980
11996
|
e && t && Ct.current(e, t);
|
|
11981
11997
|
}, [_]);
|
|
11982
|
-
let wt =
|
|
11983
|
-
|
|
11998
|
+
let wt = Sn(Je), Tt = L(null);
|
|
11999
|
+
P(() => {
|
|
11984
12000
|
let e = Tt.current;
|
|
11985
|
-
Tt.current =
|
|
11986
|
-
let t =
|
|
12001
|
+
Tt.current = tt.current;
|
|
12002
|
+
let t = W.current;
|
|
11987
12003
|
if (!e || !t) return;
|
|
11988
|
-
let { inset: n, size: r } =
|
|
12004
|
+
let { inset: n, size: r } = $(), i = Q.current, a = !J, o = Z.current.find((e) => e.id === et.current);
|
|
11989
12005
|
if (o) {
|
|
11990
12006
|
let e = i?.kind === "flight" ? i.zoom : void 0;
|
|
11991
12007
|
t.easeTo({
|
|
11992
|
-
center:
|
|
12008
|
+
center: le(t, o.coordinates, n, e),
|
|
11993
12009
|
zoom: e
|
|
11994
12010
|
}, { animate: a });
|
|
11995
12011
|
return;
|
|
11996
12012
|
}
|
|
11997
12013
|
if (i?.kind === "fit") {
|
|
11998
|
-
|
|
12014
|
+
at.current(t, a);
|
|
11999
12015
|
return;
|
|
12000
12016
|
}
|
|
12001
|
-
let s =
|
|
12017
|
+
let s = ce(se(e, r)), c = ce(n), l = t.project(t.getCenter()), u = l && t.unproject({
|
|
12002
12018
|
x: l.x + s.x - c.x,
|
|
12003
12019
|
y: l.y + s.y - c.y
|
|
12004
12020
|
});
|
|
12005
12021
|
u && t.easeTo({ center: u }, { animate: a });
|
|
12006
|
-
}, [wt,
|
|
12007
|
-
let Et = o.length > 0 || s.length > 0, Dt =
|
|
12022
|
+
}, [wt, $]);
|
|
12023
|
+
let Et = o.length > 0 || s.length > 0, Dt = qe === null ? 0 : qe + Y.gap - Y.inset, Ot = L({
|
|
12008
12024
|
from: Dt,
|
|
12009
12025
|
to: Dt
|
|
12010
12026
|
});
|
|
@@ -12012,106 +12028,106 @@ var Yt = {
|
|
|
12012
12028
|
from: Ot.current.to,
|
|
12013
12029
|
to: Dt
|
|
12014
12030
|
});
|
|
12015
|
-
let kt = Dt > Ot.current.from ?
|
|
12016
|
-
return /* @__PURE__ */
|
|
12017
|
-
dataTestId:
|
|
12018
|
-
children:
|
|
12019
|
-
ref:
|
|
12031
|
+
let kt = Dt > Ot.current.from ? ke.enter : ke.exit, At = X ? ke.enter : ke.exit;
|
|
12032
|
+
return /* @__PURE__ */ z(r, {
|
|
12033
|
+
dataTestId: ge,
|
|
12034
|
+
children: me ? /* @__PURE__ */ z(en, { className: _e }) : /* @__PURE__ */ B("div", {
|
|
12035
|
+
ref: Pe,
|
|
12020
12036
|
role: "region",
|
|
12021
|
-
"aria-label":
|
|
12022
|
-
className: a("f0-map relative h-full w-full overflow-hidden",
|
|
12037
|
+
"aria-label": he ?? V.map.region,
|
|
12038
|
+
className: a("f0-map relative h-full w-full overflow-hidden", Fe && "dark", !k && "rounded-2xl border border-solid border-f1-border-secondary", _e),
|
|
12023
12039
|
children: [
|
|
12024
|
-
/* @__PURE__ */
|
|
12025
|
-
href: `#${
|
|
12040
|
+
/* @__PURE__ */ z("a", {
|
|
12041
|
+
href: `#${De}`,
|
|
12026
12042
|
className: "sr-only rounded-md focus:not-sr-only focus:absolute focus:left-2 focus:top-2 focus:z-30 focus:bg-f1-background focus:px-3 focus:py-2 focus:text-sm focus:text-f1-foreground focus:shadow-md focus:outline-none focus:ring-1 focus:ring-f1-special-ring",
|
|
12027
|
-
children:
|
|
12043
|
+
children: V.map.skipToList
|
|
12028
12044
|
}),
|
|
12029
|
-
/* @__PURE__ */
|
|
12045
|
+
/* @__PURE__ */ z("div", {
|
|
12030
12046
|
role: "status",
|
|
12031
12047
|
"aria-live": "polite",
|
|
12032
12048
|
className: "sr-only",
|
|
12033
|
-
children: `${e.length} ${e.length === 1 ?
|
|
12049
|
+
children: `${e.length} ${e.length === 1 ? V.map.location : V.map.locations}`
|
|
12034
12050
|
}),
|
|
12035
|
-
!
|
|
12036
|
-
adapter:
|
|
12051
|
+
!q && G && c.length > 0 ? /* @__PURE__ */ z(we, {
|
|
12052
|
+
adapter: G,
|
|
12037
12053
|
areas: c,
|
|
12038
|
-
isDark:
|
|
12054
|
+
isDark: Fe
|
|
12039
12055
|
}) : null,
|
|
12040
|
-
!
|
|
12041
|
-
adapter:
|
|
12056
|
+
!q && G && dt ? /* @__PURE__ */ B(ie, { children: [/* @__PURE__ */ z(Zt, {
|
|
12057
|
+
adapter: G,
|
|
12042
12058
|
coords: dt
|
|
12043
|
-
}), /* @__PURE__ */
|
|
12059
|
+
}), /* @__PURE__ */ z("span", {
|
|
12044
12060
|
className: "sr-only",
|
|
12045
|
-
children:
|
|
12061
|
+
children: V.map.currentLocation
|
|
12046
12062
|
})] }) : null,
|
|
12047
|
-
!
|
|
12048
|
-
adapter:
|
|
12063
|
+
!q && G && Et ? /* @__PURE__ */ z(Xt, {
|
|
12064
|
+
adapter: G,
|
|
12049
12065
|
routes: o,
|
|
12050
12066
|
arcs: s,
|
|
12051
|
-
isDark:
|
|
12067
|
+
isDark: Fe,
|
|
12052
12068
|
onRouteClick: l,
|
|
12053
12069
|
onArcClick: u
|
|
12054
12070
|
}) : null,
|
|
12055
|
-
!
|
|
12056
|
-
adapter:
|
|
12071
|
+
!q && G && e.length > 0 ? /* @__PURE__ */ z(lt, {
|
|
12072
|
+
adapter: G,
|
|
12057
12073
|
points: e,
|
|
12058
|
-
selectedId:
|
|
12074
|
+
selectedId: He,
|
|
12059
12075
|
highlightedId: _,
|
|
12060
12076
|
onSelect: st,
|
|
12061
12077
|
onMarkerDrag: h,
|
|
12062
12078
|
onMarkerDragEnd: g,
|
|
12063
12079
|
onClusterExpand: _t
|
|
12064
12080
|
}) : null,
|
|
12065
|
-
!
|
|
12066
|
-
open:
|
|
12067
|
-
offsetX:
|
|
12068
|
-
offsetY:
|
|
12069
|
-
width:
|
|
12081
|
+
!q && G && I ? /* @__PURE__ */ z(ut, {
|
|
12082
|
+
open: We,
|
|
12083
|
+
offsetX: Ge,
|
|
12084
|
+
offsetY: Ke,
|
|
12085
|
+
width: Y.detailWidth,
|
|
12070
12086
|
entrance: "grow",
|
|
12071
|
-
ariaLabel:
|
|
12072
|
-
children:
|
|
12087
|
+
ariaLabel: V.map.detailPanel,
|
|
12088
|
+
children: I
|
|
12073
12089
|
}) : null,
|
|
12074
|
-
!
|
|
12075
|
-
className: a("absolute left-2 top-2 z-10",
|
|
12090
|
+
!q && G && A ? /* @__PURE__ */ z("div", {
|
|
12091
|
+
className: a("absolute left-2 top-2 z-10", X && "opacity-0"),
|
|
12076
12092
|
style: {
|
|
12077
|
-
transitionProperty:
|
|
12093
|
+
transitionProperty: J ? "none" : "opacity",
|
|
12078
12094
|
transitionDuration: At.duration,
|
|
12079
12095
|
transitionTimingFunction: At.easing
|
|
12080
12096
|
},
|
|
12081
|
-
children: /* @__PURE__ */
|
|
12097
|
+
children: /* @__PURE__ */ B("div", {
|
|
12082
12098
|
className: "flex items-start gap-2",
|
|
12083
|
-
"aria-hidden":
|
|
12099
|
+
"aria-hidden": X || void 0,
|
|
12084
12100
|
ref: (e) => {
|
|
12085
|
-
|
|
12101
|
+
X ? e?.setAttribute("inert", "") : e?.removeAttribute("inert");
|
|
12086
12102
|
},
|
|
12087
|
-
children: [/* @__PURE__ */
|
|
12103
|
+
children: [/* @__PURE__ */ z(Gt, {
|
|
12088
12104
|
expanded: !1,
|
|
12089
12105
|
onToggle: A
|
|
12090
|
-
}),
|
|
12106
|
+
}), M ? /* @__PURE__ */ z(Ae, { children: M }) : null]
|
|
12091
12107
|
})
|
|
12092
12108
|
}) : null,
|
|
12093
|
-
!
|
|
12094
|
-
open:
|
|
12095
|
-
offsetX:
|
|
12096
|
-
width:
|
|
12097
|
-
headerStart:
|
|
12098
|
-
headerEnd: /* @__PURE__ */
|
|
12109
|
+
!q && G && A ? /* @__PURE__ */ z(ut, {
|
|
12110
|
+
open: X,
|
|
12111
|
+
offsetX: Y.inset,
|
|
12112
|
+
width: Y.listWidth,
|
|
12113
|
+
headerStart: te,
|
|
12114
|
+
headerEnd: /* @__PURE__ */ z(Gt, {
|
|
12099
12115
|
expanded: !0,
|
|
12100
12116
|
onToggle: A,
|
|
12101
12117
|
bare: !0,
|
|
12102
12118
|
dataTestId: "map-panel-toggle-open"
|
|
12103
12119
|
}),
|
|
12104
|
-
children:
|
|
12120
|
+
children: F
|
|
12105
12121
|
}) : null,
|
|
12106
|
-
!
|
|
12107
|
-
className: a("absolute left-2 z-10",
|
|
12122
|
+
!q && G && D && C ? /* @__PURE__ */ z("div", {
|
|
12123
|
+
className: a("absolute left-2 z-10", H === "google" ? "bottom-8" : "bottom-2"),
|
|
12108
12124
|
style: {
|
|
12109
12125
|
transform: `translateX(${Dt}px)`,
|
|
12110
|
-
transitionProperty:
|
|
12126
|
+
transitionProperty: J ? "none" : "transform",
|
|
12111
12127
|
transitionDuration: kt.duration,
|
|
12112
12128
|
transitionTimingFunction: kt.easing
|
|
12113
12129
|
},
|
|
12114
|
-
children: /* @__PURE__ */
|
|
12130
|
+
children: /* @__PURE__ */ z(je, {
|
|
12115
12131
|
onZoomIn: pt,
|
|
12116
12132
|
onZoomOut: mt,
|
|
12117
12133
|
onFit: e.length > 0 || Et || c.length > 0 ? ht : void 0,
|
|
@@ -12119,32 +12135,32 @@ var Yt = {
|
|
|
12119
12135
|
labels: ee
|
|
12120
12136
|
})
|
|
12121
12137
|
}) : null,
|
|
12122
|
-
|
|
12138
|
+
Se && !q ? /* @__PURE__ */ B("div", {
|
|
12123
12139
|
className: "absolute inset-x-0 top-0 z-30 flex items-center justify-between gap-3 border-b border-solid border-f1-border-secondary bg-f1-background px-4 py-2 text-sm text-f1-foreground",
|
|
12124
|
-
children: [/* @__PURE__ */
|
|
12140
|
+
children: [/* @__PURE__ */ z("span", { children: V.map.loadError }), /* @__PURE__ */ z("button", {
|
|
12125
12141
|
type: "button",
|
|
12126
12142
|
onClick: () => {
|
|
12127
|
-
|
|
12128
|
-
let e =
|
|
12129
|
-
e ? e.applyStyle(yt.current) :
|
|
12143
|
+
Ce(!1);
|
|
12144
|
+
let e = W.current;
|
|
12145
|
+
e ? e.applyStyle(yt.current) : Ee((e) => e + 1);
|
|
12130
12146
|
},
|
|
12131
12147
|
className: "font-medium underline",
|
|
12132
|
-
children:
|
|
12148
|
+
children: V.map.retry
|
|
12133
12149
|
})]
|
|
12134
12150
|
}) : null,
|
|
12135
|
-
/* @__PURE__ */
|
|
12136
|
-
id:
|
|
12137
|
-
label:
|
|
12151
|
+
/* @__PURE__ */ z(Ne, {
|
|
12152
|
+
id: De,
|
|
12153
|
+
label: V.map.listLabel,
|
|
12138
12154
|
points: e,
|
|
12139
|
-
selectedId:
|
|
12155
|
+
selectedId: He,
|
|
12140
12156
|
onSelect: vt,
|
|
12141
|
-
visible:
|
|
12157
|
+
visible: q
|
|
12142
12158
|
})
|
|
12143
12159
|
]
|
|
12144
12160
|
})
|
|
12145
12161
|
});
|
|
12146
12162
|
});
|
|
12147
|
-
|
|
12148
|
-
var
|
|
12163
|
+
Cn.displayName = "F0Map";
|
|
12164
|
+
var wn = Cn;
|
|
12149
12165
|
//#endregion
|
|
12150
|
-
export {
|
|
12166
|
+
export { vt as _, hn as a, Ne as b, $t as c, Ht as d, It as f, xt as g, Nt as h, fn as i, Gt as l, At as m, gn as n, en as o, Mt as p, dn as r, Qt as s, wn as t, Wt as u, ut as v, je as x, Ke as y };
|