@factorialco/f0-react 16.39.0 → 16.40.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-BuomQ0jm.js → ArchiveThumbnail-fx1k9zF5.js} +1 -1
- package/dist/{ArchiveViewer-Cb1a_yK5.js → ArchiveViewer-4mkxdXyf.js} +2 -2
- package/dist/{ChatPostComposerDialog-BgqLmmZS.js → ChatPostComposerDialog-ZGoAsax9.js} +2 -2
- package/dist/{CoachmarkProvider-DXJ3wMBS.js → CoachmarkProvider-BwLQ3v9f.js} +14173 -14157
- package/dist/{CodeThumbnail-bnwIB0Q2.js → CodeThumbnail-DIRVdTYf.js} +1 -1
- package/dist/{CodeViewer-DVL3P-jF.js → CodeViewer-BHA1Osng.js} +4 -4
- package/dist/{DocumentToolbar-7s9QNMWY.js → DocumentToolbar-C8_A4Bhd.js} +5 -5
- package/dist/{DocxViewer-Bn22Gst6.js → DocxViewer-C-UaGNXG.js} +1 -1
- package/dist/{F0AiProcessingOverlay-B6DLMrO7.js → F0AiProcessingOverlay-BQGg-wTQ.js} +502 -504
- package/dist/{F0Alert-m54uY33f.js → F0Alert-Cj4ufDl7.js} +3 -3
- package/dist/F0AudioPlayer-C5CokjE_.js +2 -0
- package/dist/{F0CanvasPanel-CfPdTW_o.js → F0CanvasPanel-D4PhLARb.js} +8987 -9185
- package/dist/{F0DocumentViewer-FuhnkhM-.js → F0DocumentViewer-382b-101.js} +1 -1
- package/dist/{F0DocumentViewer-C_E6pFUZ.js → F0DocumentViewer-De5STCB5.js} +2 -2
- package/dist/{F0Map-ByX3wxFv.js → F0Map-Dz_-4gAZ.js} +764 -697
- package/dist/{F0Select-BCUynP2p.js → F0Select-BQMaDPcg.js} +8266 -8522
- package/dist/{Ellipsis-Bxq1iUUk.js → F0Text-DmUg-CLb.js} +22 -14
- package/dist/F0VideoPlayer-AXw_DAL_.js +1 -0
- package/dist/{F0VideoPlayer-DGHxduSr.js → F0VideoPlayer-Dsna4Es9.js} +306 -307
- package/dist/{HtmlViewer-Q3xUMpkP.js → HtmlViewer-CIAxNnvP.js} +4 -4
- package/dist/{Map-FBPV6r6b.js → Map-DGd3Cl-3.js} +13 -13
- package/dist/{PdfThumbnail-QkmwtnOA.js → PdfThumbnail-BtzXcGHN.js} +1 -1
- package/dist/{PdfViewer-D4NjCixG.js → PdfViewer-BZVnaYKF.js} +6 -6
- package/dist/{SheetViewer-RsRTbw7A.js → SheetViewer-Bn3N9G4D.js} +3 -3
- package/dist/{TextViewer-BvwaMVDG.js → TextViewer-C9NBnJvl.js} +1 -1
- package/dist/ai.d.ts +2 -2
- package/dist/ai.js +2 -2
- package/dist/component-status.js +1 -1
- package/dist/{dist-CngBJJ6S.js → dist-CWrWx4g2.js} +4 -4
- package/dist/{dist-CUKjZKvr.js → dist-CZnQ15Wl.js} +1 -1
- package/dist/{dist-CGYo25BY.js → dist-DCb1475M.js} +151 -142
- package/dist/{dist-D83RDDAb.js → dist-DNltp03U.js} +6 -15
- package/dist/{dist-DDAe_kuu.js → dist-DxwodHyk.js} +1 -1
- package/dist/experimental.d.ts +2 -2
- package/dist/experimental.js +819 -821
- package/dist/{exports-DYl7Pf17.d.ts → exports-CbmGLzn6.d.ts} +1 -1
- package/dist/f0.d.ts +3 -3
- package/dist/f0.js +1556 -1513
- package/dist/{highlight-CJDVXMe_.js → highlight-u9A6kwy7.js} +1 -1
- package/dist/{index-C7sLtTlR.d.ts → index-CcbdFJRr.d.ts} +3 -2
- package/dist/{index-DOU2q_xI.d.ts → index-D0QIgPoz.d.ts} +7 -0
- package/dist/internal-CGrF2KLC.js +261 -0
- package/dist/{maplibre-Dgbj9gtn.js → maplibre-Dqb2AOHT.js} +12 -13
- package/dist/{pdfWorker-BlDYyNbC.js → pdfWorker-C_2eH-2_.js} +1 -1
- package/dist/{popover-BGv1b-fc.js → popover-Y2y9anVX.js} +1282 -1247
- package/dist/styles.css +1 -1
- package/dist/{useData-CmFkOA0P.js → useData-OLWBwcfd.js} +5129 -4873
- package/package.json +1 -1
- package/tailwind.config.ts +4 -0
- package/dist/Check-Cg2vvL5g.js +0 -39
- package/dist/F0AudioPlayer-Ck9Vyjrb.js +0 -2
- package/dist/F0Text-CnmiWNAg.js +0 -14
- package/dist/F0VideoPlayer-BshnHziC.js +0 -1
- package/dist/LayoutGroup-OcrcUDNP.js +0 -57
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import { Si as e, a as t, o as n } from "./CoachmarkProvider-
|
|
1
|
+
import { Si as e, a as t, o as n } from "./CoachmarkProvider-BwLQ3v9f.js";
|
|
2
2
|
import { i as r, r as i } from "./i18n-provider-Bx71VZQH.js";
|
|
3
3
|
import { L as a, R as o } from "./tooltip-NXXT56H4.js";
|
|
4
4
|
import { K as s, O as c, X as l, h as u, q as d, t as f, x as p } from "./F0Button-fMxOyyNk.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
5
|
+
import { Jc as m, Rs as h, fl as g, in as _, mc as v, p as y, r as b, un as x } from "./F0CanvasPanel-D4PhLARb.js";
|
|
6
|
+
import { n as S } from "./internal-CGrF2KLC.js";
|
|
7
|
+
import { a as C } from "./createIcon-iM5M-dE_.js";
|
|
8
|
+
import { I as w, O as ee, Q as T, g as E, q as D } from "./useData-OLWBwcfd.js";
|
|
9
|
+
import { n as te, o as ne, s as O, t as k } from "./dist-DMTFO2gF.js";
|
|
10
|
+
import { createContext as A, forwardRef as j, useCallback as M, useContext as N, useEffect as P, useId as re, useImperativeHandle as F, useLayoutEffect as I, useMemo as L, useRef as R, useState as z } from "react";
|
|
11
|
+
import { Fragment as ie, jsx as B, jsxs as V } from "react/jsx-runtime";
|
|
12
|
+
import { createPortal as ae } from "react-dom";
|
|
12
13
|
//#region src/addons/map/F0Map/camera.ts
|
|
13
|
-
var
|
|
14
|
+
var oe = (e, t) => ({
|
|
14
15
|
top: Math.max(e?.top ?? 0, t?.top ?? 0),
|
|
15
16
|
right: Math.max(e?.right ?? 0, t?.right ?? 0),
|
|
16
17
|
bottom: Math.max(e?.bottom ?? 0, t?.bottom ?? 0),
|
|
17
18
|
left: Math.max(e?.left ?? 0, t?.left ?? 0)
|
|
18
|
-
}),
|
|
19
|
+
}), se = (e, { width: t, height: n }) => {
|
|
19
20
|
let r = t > 0 && e.left + e.right >= t, i = n > 0 && e.top + e.bottom >= n;
|
|
20
21
|
return {
|
|
21
22
|
top: i ? 0 : e.top,
|
|
@@ -23,18 +24,18 @@ var se = (e, t) => ({
|
|
|
23
24
|
left: r ? 0 : e.left,
|
|
24
25
|
right: r ? 0 : e.right
|
|
25
26
|
};
|
|
26
|
-
},
|
|
27
|
+
}, ce = (e) => ({
|
|
27
28
|
x: (e.left - e.right) / 2,
|
|
28
29
|
y: (e.top - e.bottom) / 2
|
|
29
|
-
}),
|
|
30
|
-
let i =
|
|
30
|
+
}), H = (e, t, n, r = e.getZoom()) => {
|
|
31
|
+
let i = ce(n), a = e.project(t);
|
|
31
32
|
if (!a || i.x === 0 && i.y === 0) return t;
|
|
32
33
|
let o = 2 ** (e.getZoom() - r);
|
|
33
34
|
return e.unproject({
|
|
34
35
|
x: a.x - i.x * o,
|
|
35
36
|
y: a.y - i.y * o
|
|
36
37
|
}) ?? t;
|
|
37
|
-
},
|
|
38
|
+
}, le = ({ adapter: e, coordinates: t, inset: n, size: r, gutter: i, maxZoom: a }) => {
|
|
38
39
|
let o = e.cameraForCoordinates(t, { gutter: i });
|
|
39
40
|
if (!o) return null;
|
|
40
41
|
let s = (e, t, n) => e > 2 * i ? (e - t - n - 2 * i) / (e - 2 * i) : 1, c = Math.min(s(r.width, n.left, n.right), s(r.height, n.top, n.bottom)), l = o.zoom ?? e.getZoom();
|
|
@@ -44,17 +45,17 @@ var se = (e, t) => ({
|
|
|
44
45
|
};
|
|
45
46
|
let u = Math.min(l + Math.log2(c), a);
|
|
46
47
|
return {
|
|
47
|
-
center:
|
|
48
|
+
center: H(e, o.center, n, u),
|
|
48
49
|
zoom: u
|
|
49
50
|
};
|
|
50
|
-
},
|
|
51
|
-
let [r, i] = e, a =
|
|
51
|
+
}, ue = 6371008.8, de = (e) => e * Math.PI / 180, fe = (e) => e * 180 / Math.PI, pe = (e, t, n = 64) => {
|
|
52
|
+
let [r, i] = e, a = de(i), o = de(r), s = Math.max(t, 0) / ue, c = [];
|
|
52
53
|
for (let e = 0; e < n; e++) {
|
|
53
54
|
let t = 2 * Math.PI * e / n, r = Math.asin(Math.sin(a) * Math.cos(s) + Math.cos(a) * Math.sin(s) * Math.cos(t)), i = o + Math.atan2(Math.sin(t) * Math.sin(s) * Math.cos(a), Math.cos(s) - Math.sin(a) * Math.sin(r));
|
|
54
|
-
c.push([
|
|
55
|
+
c.push([fe(i), fe(r)]);
|
|
55
56
|
}
|
|
56
57
|
return c.push(c[0]), c;
|
|
57
|
-
},
|
|
58
|
+
}, me = [
|
|
58
59
|
"neutral",
|
|
59
60
|
"grey",
|
|
60
61
|
"radical",
|
|
@@ -72,15 +73,15 @@ var se = (e, t) => ({
|
|
|
72
73
|
"army",
|
|
73
74
|
"smoke",
|
|
74
75
|
"barbie"
|
|
75
|
-
].filter((e) => e !== "neutral" && e !== "grey"),
|
|
76
|
+
].filter((e) => e !== "neutral" && e !== "grey"), he = {
|
|
76
77
|
neutral: k.grey[100],
|
|
77
78
|
grey: k.grey.solid[50],
|
|
78
|
-
...Object.fromEntries(
|
|
79
|
-
},
|
|
79
|
+
...Object.fromEntries(me.map((e) => [e, k[e][50]]))
|
|
80
|
+
}, ge = (e) => `hsl(${he[e]})`, _e = {
|
|
80
81
|
neutral: k.grey[100],
|
|
81
82
|
grey: "218 14% 30%",
|
|
82
|
-
...Object.fromEntries(
|
|
83
|
-
},
|
|
83
|
+
...Object.fromEntries(me.map((e) => [e, k[e][70]]))
|
|
84
|
+
}, U = (e, t) => t ? _e[e] : he[e], W = k.grey[100], ve = {
|
|
84
85
|
sm: {
|
|
85
86
|
d: 16,
|
|
86
87
|
border: 1.5,
|
|
@@ -141,87 +142,87 @@ var se = (e, t) => ({
|
|
|
141
142
|
icon: "lg",
|
|
142
143
|
avatar: "lg"
|
|
143
144
|
}
|
|
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: u, showLabel: f = !0, labelPlacement: p = "right", onClick: m, ariaLabel: h, presentational: g = !1, dataTestId: _, className: v } = t, y = t.variant ?? "color", b =
|
|
145
|
+
}, ye = (e) => ve[e], G = 5.6, K = 1.5, be = () => {
|
|
146
|
+
let e = ve.xl;
|
|
147
|
+
return -(e.d - e.caretOverlap + e.caretH + G + K) + 3;
|
|
148
|
+
}, q = "hsl(var(--white-100))", xe = j(function(t, n) {
|
|
149
|
+
let { size: i = "md", selected: s = !1, collapsed: c = !1, label: u, showLabel: f = !0, labelPlacement: p = "right", onClick: m, ariaLabel: h, presentational: g = !1, dataTestId: _, className: v } = t, y = t.variant ?? "color", b = ve[s ? "xl" : i], x = !!m, S = y === "color" || y === "icon" || y === "letter", w = y === "person" && "firstName" in t ? t.firstName + t.lastName : (y === "team" || y === "company") && "name" in t ? t.name : null, T = S ? t.color ?? "radical" : w ? y === "person" && "src" in t && t.src ? "grey" : ee(w) ?? "grey" : "neutral", D = e(), te = s ? 32 : {
|
|
149
150
|
xs: 12,
|
|
150
151
|
sm: 16,
|
|
151
152
|
md: 20,
|
|
152
153
|
lg: 24
|
|
153
|
-
}[b.icon],
|
|
154
|
+
}[b.icon], ne = {
|
|
154
155
|
xs: 20,
|
|
155
156
|
sm: 24,
|
|
156
157
|
md: 32,
|
|
157
158
|
lg: 40
|
|
158
|
-
},
|
|
159
|
+
}, O = ve[i].avatar, k = s ? ne[b.avatar] / ne[O] : 1, A = (e) => /* @__PURE__ */ B("span", {
|
|
159
160
|
className: "flex shrink-0 items-center justify-center transition-transform duration-200 ease-out",
|
|
160
|
-
style: { transform: `scale(${
|
|
161
|
+
style: { transform: `scale(${k})` },
|
|
161
162
|
children: e
|
|
162
|
-
}),
|
|
163
|
+
}), j = y === "color" ? null : y === "icon" && "icon" in t ? /* @__PURE__ */ B(C, {
|
|
163
164
|
icon: t.icon,
|
|
164
165
|
size: b.icon,
|
|
165
166
|
color: "#ffffff",
|
|
166
167
|
style: {
|
|
167
|
-
width:
|
|
168
|
-
height:
|
|
168
|
+
width: te,
|
|
169
|
+
height: te,
|
|
169
170
|
transition: "width 200ms ease-out, height 200ms ease-out"
|
|
170
171
|
}
|
|
171
|
-
}) : y === "letter" && "letter" in t ? /* @__PURE__ */
|
|
172
|
+
}) : y === "letter" && "letter" in t ? /* @__PURE__ */ B("span", {
|
|
172
173
|
"aria-hidden": !0,
|
|
173
174
|
className: "font-semibold leading-none",
|
|
174
175
|
style: {
|
|
175
|
-
color:
|
|
176
|
-
fontSize: Math.round(
|
|
176
|
+
color: q,
|
|
177
|
+
fontSize: Math.round(te * .78),
|
|
177
178
|
transition: "font-size 200ms ease-out"
|
|
178
179
|
},
|
|
179
180
|
children: t.letter.charAt(0).toUpperCase()
|
|
180
|
-
}) : y === "person" && "firstName" in t ?
|
|
181
|
+
}) : y === "person" && "firstName" in t ? A(/* @__PURE__ */ B(E, {
|
|
181
182
|
avatar: {
|
|
182
183
|
type: "person",
|
|
183
184
|
firstName: t.firstName,
|
|
184
185
|
lastName: t.lastName,
|
|
185
186
|
src: t.src
|
|
186
187
|
},
|
|
187
|
-
size:
|
|
188
|
-
})) : y === "team" && "name" in t ?
|
|
188
|
+
size: O
|
|
189
|
+
})) : y === "team" && "name" in t ? A(/* @__PURE__ */ B(E, {
|
|
189
190
|
avatar: {
|
|
190
191
|
type: "team",
|
|
191
192
|
name: t.name,
|
|
192
193
|
src: t.src
|
|
193
194
|
},
|
|
194
|
-
size:
|
|
195
|
-
})) : y === "company" && "name" in t ?
|
|
195
|
+
size: O
|
|
196
|
+
})) : y === "company" && "name" in t ? A(/* @__PURE__ */ B(E, {
|
|
196
197
|
avatar: {
|
|
197
198
|
type: "company",
|
|
198
199
|
name: t.name,
|
|
199
200
|
src: t.src
|
|
200
201
|
},
|
|
201
|
-
size:
|
|
202
|
-
})) : y === "image" && "src" in t ? /* @__PURE__ */
|
|
202
|
+
size: O
|
|
203
|
+
})) : y === "image" && "src" in t ? /* @__PURE__ */ B("img", {
|
|
203
204
|
src: t.src,
|
|
204
205
|
alt: "alt" in t ? t.alt ?? "" : "",
|
|
205
206
|
className: "h-full w-full object-cover"
|
|
206
|
-
}) : null,
|
|
207
|
+
}) : null, M = y === "team" || y === "company" || y === "icon", N = /* @__PURE__ */ B("span", {
|
|
207
208
|
className: "relative z-[1] flex shrink-0 items-center justify-center overflow-hidden border-solid transition-all duration-200 ease-out",
|
|
208
209
|
style: {
|
|
209
210
|
width: b.d,
|
|
210
211
|
height: b.d,
|
|
211
|
-
borderRadius:
|
|
212
|
+
borderRadius: M ? Math.round(b.d * .3) : 9999,
|
|
212
213
|
borderWidth: b.border,
|
|
213
|
-
borderColor:
|
|
214
|
-
backgroundColor:
|
|
214
|
+
borderColor: q,
|
|
215
|
+
backgroundColor: S ? ge(T) : q
|
|
215
216
|
},
|
|
216
|
-
children: y === "color" ? /* @__PURE__ */
|
|
217
|
+
children: y === "color" ? /* @__PURE__ */ B("span", {
|
|
217
218
|
className: "rounded-full transition-all duration-200 ease-out",
|
|
218
219
|
style: {
|
|
219
220
|
width: b.d * .36,
|
|
220
221
|
height: b.d * .36,
|
|
221
|
-
backgroundColor:
|
|
222
|
+
backgroundColor: q
|
|
222
223
|
}
|
|
223
|
-
}) :
|
|
224
|
-
}),
|
|
224
|
+
}) : j
|
|
225
|
+
}), P = /* @__PURE__ */ B(l, { children: s ? /* @__PURE__ */ B(d.svg, {
|
|
225
226
|
width: b.caretW,
|
|
226
227
|
height: b.caretH,
|
|
227
228
|
viewBox: "0 0 16 13",
|
|
@@ -230,7 +231,7 @@ var se = (e, t) => ({
|
|
|
230
231
|
style: {
|
|
231
232
|
top: b.d - b.caretOverlap - 3,
|
|
232
233
|
marginLeft: -b.caretW / 2,
|
|
233
|
-
fill:
|
|
234
|
+
fill: q,
|
|
234
235
|
transformOrigin: "50% 0%"
|
|
235
236
|
},
|
|
236
237
|
initial: {
|
|
@@ -245,84 +246,84 @@ var se = (e, t) => ({
|
|
|
245
246
|
scaleY: 0,
|
|
246
247
|
opacity: 0
|
|
247
248
|
},
|
|
248
|
-
transition:
|
|
249
|
+
transition: D ? { duration: 0 } : {
|
|
249
250
|
duration: .18,
|
|
250
251
|
ease: "easeOut",
|
|
251
252
|
opacity: { duration: .1 }
|
|
252
253
|
},
|
|
253
|
-
children: /* @__PURE__ */
|
|
254
|
-
}, "caret") : null }),
|
|
254
|
+
children: /* @__PURE__ */ B("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" })
|
|
255
|
+
}, "caret") : null }), re = /* @__PURE__ */ V("span", {
|
|
255
256
|
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(","),
|
|
257
|
+
style: { filter: `drop-shadow(0 ${b.shadowY}px ${b.shadowBlur / 2}px hsl(${W} / 0.3))` },
|
|
258
|
+
children: [P, N]
|
|
259
|
+
}), F = ve[i], I = b.d / 2, L = G, R = s ? be() : -I, z = s ? "bottom" : p, ae = `0 0 ${Math.max(2, Math.round(F.label * .28))}px ${q}`, oe = [
|
|
260
|
+
ae,
|
|
261
|
+
ae,
|
|
262
|
+
`0 1px 2px ${q}`,
|
|
263
|
+
`0 -1px 2px ${q}`,
|
|
264
|
+
`1px 0 2px ${q}`,
|
|
265
|
+
`-1px 0 2px ${q}`
|
|
266
|
+
].join(","), se = !s && (z === "top" || z === "bottom"), ce = se ? "line-clamp-4 text-center" : s ? "whitespace-nowrap text-center" : "whitespace-nowrap", H = F.d / 2, le = {
|
|
266
267
|
right: {
|
|
267
|
-
transform: `translate(${
|
|
268
|
-
style: { paddingLeft:
|
|
268
|
+
transform: `translate(${H}px, -50%)`,
|
|
269
|
+
style: { paddingLeft: F.gap }
|
|
269
270
|
},
|
|
270
271
|
left: {
|
|
271
|
-
transform: `translate(calc(-100% - ${
|
|
272
|
+
transform: `translate(calc(-100% - ${H}px), -50%)`,
|
|
272
273
|
style: {
|
|
273
|
-
paddingRight:
|
|
274
|
+
paddingRight: F.gap,
|
|
274
275
|
textAlign: "right"
|
|
275
276
|
}
|
|
276
277
|
},
|
|
277
278
|
top: {
|
|
278
|
-
transform: `translate(-50%, calc(-100% - ${
|
|
279
|
-
style: { paddingBottom:
|
|
279
|
+
transform: `translate(-50%, calc(-100% - ${H}px))`,
|
|
280
|
+
style: { paddingBottom: F.gap }
|
|
280
281
|
},
|
|
281
282
|
bottom: {
|
|
282
|
-
transform: `translate(-50%, ${s ?
|
|
283
|
-
style: { paddingTop:
|
|
283
|
+
transform: `translate(-50%, ${s ? L : H}px)`,
|
|
284
|
+
style: { paddingTop: F.gap + (s ? 4 : 0) }
|
|
284
285
|
}
|
|
285
|
-
}[
|
|
286
|
-
className: a("absolute left-0 top-0 font-semibold leading-tight transition-all duration-200 ease-out",
|
|
286
|
+
}[z], ue = u && f && !c && /* @__PURE__ */ B("span", {
|
|
287
|
+
className: a("absolute left-0 top-0 font-semibold leading-tight transition-all duration-200 ease-out", ce),
|
|
287
288
|
style: {
|
|
288
|
-
color: `hsl(${
|
|
289
|
-
fontSize:
|
|
290
|
-
textShadow:
|
|
291
|
-
transform:
|
|
292
|
-
maxWidth:
|
|
293
|
-
...
|
|
289
|
+
color: `hsl(${_e[T]})`,
|
|
290
|
+
fontSize: F.label,
|
|
291
|
+
textShadow: oe,
|
|
292
|
+
transform: le.transform,
|
|
293
|
+
maxWidth: se ? F.maxLabelW : void 0,
|
|
294
|
+
...le.style
|
|
294
295
|
},
|
|
295
296
|
children: u
|
|
296
|
-
}),
|
|
297
|
+
}), de = /* @__PURE__ */ B("span", {
|
|
297
298
|
"aria-hidden": !0,
|
|
298
299
|
className: "absolute left-0 top-0 rounded-full border-solid transition-all duration-200 ease-out",
|
|
299
300
|
style: {
|
|
300
|
-
width:
|
|
301
|
-
height:
|
|
301
|
+
width: L * 2,
|
|
302
|
+
height: L * 2,
|
|
302
303
|
marginLeft: -5.6,
|
|
303
304
|
marginTop: -5.6,
|
|
304
305
|
borderWidth: 1.5,
|
|
305
|
-
borderColor:
|
|
306
|
-
backgroundColor:
|
|
307
|
-
boxShadow: `0 1px 2px hsl(${
|
|
306
|
+
borderColor: q,
|
|
307
|
+
backgroundColor: ge(T),
|
|
308
|
+
boxShadow: `0 1px 2px hsl(${W} / 0.3)`,
|
|
308
309
|
transform: `scale(${s || c ? 1 : 0})`,
|
|
309
310
|
opacity: s || c ? 1 : 0
|
|
310
311
|
}
|
|
311
|
-
}),
|
|
312
|
-
|
|
313
|
-
/* @__PURE__ */
|
|
312
|
+
}), fe = /* @__PURE__ */ V(ie, { children: [
|
|
313
|
+
de,
|
|
314
|
+
/* @__PURE__ */ B("span", {
|
|
314
315
|
className: "absolute left-0 top-0 transition-all duration-200 ease-out",
|
|
315
316
|
style: {
|
|
316
|
-
transform: `translate(-50%, ${
|
|
317
|
+
transform: `translate(-50%, ${R}px) scale(${+!c})`,
|
|
317
318
|
opacity: +!c
|
|
318
319
|
},
|
|
319
|
-
children:
|
|
320
|
+
children: re
|
|
320
321
|
}),
|
|
321
|
-
|
|
322
|
+
ue
|
|
322
323
|
] });
|
|
323
|
-
return /* @__PURE__ */
|
|
324
|
+
return /* @__PURE__ */ B(r, {
|
|
324
325
|
dataTestId: _,
|
|
325
|
-
children: x ? /* @__PURE__ */
|
|
326
|
+
children: x ? /* @__PURE__ */ B("button", {
|
|
326
327
|
ref: n,
|
|
327
328
|
type: "button",
|
|
328
329
|
...g ? {
|
|
@@ -334,27 +335,27 @@ var se = (e, t) => ({
|
|
|
334
335
|
},
|
|
335
336
|
onClick: m,
|
|
336
337
|
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__ */
|
|
338
|
+
children: fe
|
|
339
|
+
}) : /* @__PURE__ */ B("span", {
|
|
339
340
|
role: "img",
|
|
340
341
|
"aria-label": h,
|
|
341
342
|
className: a("relative inline-flex", v),
|
|
342
|
-
children:
|
|
343
|
+
children: fe
|
|
343
344
|
})
|
|
344
345
|
});
|
|
345
346
|
});
|
|
346
|
-
|
|
347
|
-
var Se =
|
|
347
|
+
xe.displayName = "BaseMapMarker";
|
|
348
|
+
var Se = xe, Ce = (e, t) => `hsl(${U(e, t).replace(/ /g, ", ")})`, we = (e, t) => ({
|
|
348
349
|
id: e.id,
|
|
349
|
-
ring:
|
|
350
|
+
ring: pe(e.center, e.radiusMeters),
|
|
350
351
|
color: e.color ?? Ce(e.variant ?? "malibu", t),
|
|
351
352
|
fillOpacity: .15,
|
|
352
353
|
strokeWidth: 2
|
|
353
354
|
}), Te = ({ adapter: e, areas: t, isDark: n }) => {
|
|
354
|
-
let r =
|
|
355
|
-
return
|
|
355
|
+
let r = L(() => t.map((e) => we(e, n)), [t, n]);
|
|
356
|
+
return P(function() {
|
|
356
357
|
e.setAreas(r);
|
|
357
|
-
}, [e, r]),
|
|
358
|
+
}, [e, r]), P(function() {
|
|
358
359
|
return () => e.setAreas([]);
|
|
359
360
|
}, [e]), null;
|
|
360
361
|
}, Ee = {
|
|
@@ -365,16 +366,16 @@ var Se = K, Ce = (e, t) => `hsl(${be(e, t).replace(/ /g, ", ")})`, we = (e, t) =
|
|
|
365
366
|
}, De = {
|
|
366
367
|
control: "md",
|
|
367
368
|
panel: "xl"
|
|
368
|
-
},
|
|
369
|
+
}, J = {
|
|
369
370
|
md: "rounded-md backdrop-blur-md bg-f1-background-inverse-secondary dark:bg-f1-background-tertiary",
|
|
370
371
|
xl: "rounded-xl backdrop-blur-md bg-f1-background-inverse-secondary dark:bg-f1-background-tertiary"
|
|
371
|
-
},
|
|
372
|
+
}, Oe = (e) => J[e], Y = {
|
|
372
373
|
inset: 8,
|
|
373
374
|
gap: 8,
|
|
374
375
|
listWidth: 214,
|
|
375
376
|
detailWidth: 344,
|
|
376
377
|
toggleSize: 38
|
|
377
|
-
}, ke = "cubic-bezier(0.77, 0, 0.175, 1)",
|
|
378
|
+
}, ke = "cubic-bezier(0.77, 0, 0.175, 1)", Ae = {
|
|
378
379
|
enter: {
|
|
379
380
|
duration: "175ms",
|
|
380
381
|
easing: ke
|
|
@@ -383,63 +384,63 @@ var Se = K, Ce = (e, t) => `hsl(${be(e, t).replace(/ /g, ", ")})`, we = (e, t) =
|
|
|
383
384
|
duration: "250ms",
|
|
384
385
|
easing: ke
|
|
385
386
|
}
|
|
386
|
-
},
|
|
387
|
-
className:
|
|
388
|
-
children: /* @__PURE__ */
|
|
387
|
+
}, je = ({ children: e }) => /* @__PURE__ */ B("div", {
|
|
388
|
+
className: Oe(De.control),
|
|
389
|
+
children: /* @__PURE__ */ B(w, {
|
|
389
390
|
...Ee,
|
|
390
391
|
borderRadius: De.control,
|
|
391
392
|
padding: "none",
|
|
392
|
-
children: /* @__PURE__ */
|
|
393
|
+
children: /* @__PURE__ */ B("div", {
|
|
393
394
|
className: "flex flex-col items-center gap-1 p-0.5",
|
|
394
395
|
children: e
|
|
395
396
|
})
|
|
396
397
|
})
|
|
397
|
-
}),
|
|
398
|
-
let l = i(), u = !!(a || n), d = !!(e || t), p = (e) => /* @__PURE__ */
|
|
399
|
-
return /* @__PURE__ */
|
|
398
|
+
}), Me = j(({ onZoomIn: e, onZoomOut: t, onFit: n, onLocate: a, labels: o, dataTestId: s }, c) => {
|
|
399
|
+
let l = i(), u = !!(a || n), d = !!(e || t), p = (e) => /* @__PURE__ */ B(je, { children: e });
|
|
400
|
+
return /* @__PURE__ */ B(r, {
|
|
400
401
|
dataTestId: s,
|
|
401
|
-
children: /* @__PURE__ */
|
|
402
|
+
children: /* @__PURE__ */ V("div", {
|
|
402
403
|
ref: c,
|
|
403
404
|
role: "toolbar",
|
|
404
405
|
"aria-orientation": "vertical",
|
|
405
406
|
"aria-label": l.map.navigation,
|
|
406
407
|
className: "flex flex-col items-center gap-2",
|
|
407
|
-
children: [u ? p(/* @__PURE__ */
|
|
408
|
+
children: [u ? p(/* @__PURE__ */ V(ie, { children: [n ? /* @__PURE__ */ B(f, {
|
|
408
409
|
variant: "ghost",
|
|
409
410
|
size: "md",
|
|
410
411
|
label: o?.fit ?? l.map.controls.fit,
|
|
411
|
-
icon:
|
|
412
|
+
icon: m,
|
|
412
413
|
hideLabel: !0,
|
|
413
414
|
onClick: n
|
|
414
|
-
}) : null, a ? /* @__PURE__ */
|
|
415
|
+
}) : null, a ? /* @__PURE__ */ B(f, {
|
|
415
416
|
variant: "ghost",
|
|
416
417
|
size: "md",
|
|
417
418
|
label: o?.locate ?? l.map.controls.locate,
|
|
418
|
-
icon:
|
|
419
|
+
icon: h,
|
|
419
420
|
hideLabel: !0,
|
|
420
421
|
onClick: a
|
|
421
|
-
}) : null] })) : null, d ? p(/* @__PURE__ */
|
|
422
|
+
}) : null] })) : null, d ? p(/* @__PURE__ */ V(ie, { children: [e ? /* @__PURE__ */ B(f, {
|
|
422
423
|
variant: "ghost",
|
|
423
424
|
size: "md",
|
|
424
425
|
label: o?.zoomIn ?? l.map.controls.zoomIn,
|
|
425
|
-
icon:
|
|
426
|
+
icon: T,
|
|
426
427
|
hideLabel: !0,
|
|
427
428
|
onClick: e
|
|
428
|
-
}) : null, t ? /* @__PURE__ */
|
|
429
|
+
}) : null, t ? /* @__PURE__ */ B(f, {
|
|
429
430
|
variant: "ghost",
|
|
430
431
|
size: "md",
|
|
431
432
|
label: o?.zoomOut ?? l.map.controls.zoomOut,
|
|
432
|
-
icon:
|
|
433
|
+
icon: D,
|
|
433
434
|
hideLabel: !0,
|
|
434
435
|
onClick: t
|
|
435
436
|
}) : null] })) : null]
|
|
436
437
|
})
|
|
437
438
|
});
|
|
438
439
|
});
|
|
439
|
-
|
|
440
|
+
Me.displayName = "F0MapControls";
|
|
440
441
|
//#endregion
|
|
441
|
-
//#region src/addons/map/F0Map/
|
|
442
|
-
var
|
|
442
|
+
//#region src/addons/map/F0Map/utils/pointLabel.ts
|
|
443
|
+
var Ne = (e, t) => {
|
|
443
444
|
if (e.label) return e.label;
|
|
444
445
|
switch (e.variant) {
|
|
445
446
|
case "employee": return `${e.firstName} ${e.lastName}`.trim();
|
|
@@ -447,74 +448,83 @@ var Me = (e, t) => {
|
|
|
447
448
|
case "stop": return e.letter.charAt(0).toUpperCase();
|
|
448
449
|
default: return t;
|
|
449
450
|
}
|
|
450
|
-
},
|
|
451
|
+
}, Pe = j(function({ points: e, selectedId: t, onSelect: n, visible: o = !1, label: s, id: c, dataTestId: l, className: u }, d) {
|
|
451
452
|
let f = i(), p = s ?? f.map.listLabel;
|
|
452
|
-
return /* @__PURE__ */
|
|
453
|
+
return /* @__PURE__ */ B(r, {
|
|
453
454
|
dataTestId: l,
|
|
454
|
-
children: /* @__PURE__ */
|
|
455
|
+
children: /* @__PURE__ */ V("nav", {
|
|
455
456
|
ref: d,
|
|
456
457
|
id: c,
|
|
457
458
|
"aria-label": p,
|
|
458
459
|
tabIndex: -1,
|
|
459
460
|
className: a("outline-none", o ? "absolute inset-0 z-20 overflow-auto bg-f1-background p-4" : "sr-only", u),
|
|
460
|
-
children: [o ? /* @__PURE__ */
|
|
461
|
+
children: [o ? /* @__PURE__ */ B("h2", {
|
|
461
462
|
className: "text-f1-foreground mb-2 text-base font-medium",
|
|
462
463
|
children: p
|
|
463
|
-
}) : null, /* @__PURE__ */
|
|
464
|
+
}) : null, /* @__PURE__ */ B("ul", {
|
|
464
465
|
className: o ? "flex flex-col gap-0.5" : void 0,
|
|
465
|
-
children: e.map((e) => /* @__PURE__ */
|
|
466
|
+
children: e.map((e) => /* @__PURE__ */ B("li", { children: /* @__PURE__ */ B("button", {
|
|
466
467
|
type: "button",
|
|
467
468
|
"aria-current": e.id === t || void 0,
|
|
468
469
|
onClick: () => n(e.id),
|
|
469
470
|
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:
|
|
471
|
+
children: Ne(e, f.map.unnamedLocation)
|
|
471
472
|
}) }, e.id))
|
|
472
473
|
})]
|
|
473
474
|
})
|
|
474
475
|
});
|
|
475
476
|
});
|
|
476
|
-
|
|
477
|
+
Pe.displayName = "F0MapList";
|
|
477
478
|
//#endregion
|
|
478
|
-
//#region src/addons/map/F0Map/hooks/
|
|
479
|
-
var
|
|
480
|
-
let [
|
|
479
|
+
//#region src/addons/map/F0Map/hooks/useClusterPicker.ts
|
|
480
|
+
var Fe = (e) => {
|
|
481
|
+
let [t, n] = z(null);
|
|
482
|
+
return P(() => e.on("zoom", () => n(null)), [e]), [t, n];
|
|
483
|
+
}, Ie = (e, t, n, r) => {
|
|
484
|
+
let i = Array.from({ length: e }, (e, t) => t), a = (e) => {
|
|
485
|
+
for (; i[e] !== e;) e = i[e] = i[i[e]];
|
|
486
|
+
return e;
|
|
487
|
+
}, o = (e, t) => {
|
|
488
|
+
let n = a(e), r = a(t);
|
|
489
|
+
n !== r && (i[n] = r);
|
|
490
|
+
}, s = Array.from({ length: e }, () => !1);
|
|
491
|
+
for (let r = 0; r < e; r++) for (let i = r + 1; i < e; i++) t(r, i) <= n && (s[r] = s[i] = !0, o(r, i));
|
|
492
|
+
for (let n = 0; n < e; n++) for (let i = n + 1; i < e; i++) (s[n] || s[i]) && t(n, i) <= r && o(n, i);
|
|
493
|
+
return Array.from({ length: e }, (e, t) => a(t));
|
|
494
|
+
}, Le = ({ adapter: e, points: t, enabled: n, expandZoom: r, radius: i = 12, clusterRadius: a = 164 }) => {
|
|
495
|
+
let [o, s] = z({
|
|
481
496
|
clusters: [],
|
|
482
497
|
singles: t
|
|
483
498
|
});
|
|
484
|
-
return
|
|
499
|
+
return P(() => {
|
|
485
500
|
if (!e || !n) {
|
|
486
|
-
|
|
501
|
+
s({
|
|
487
502
|
clusters: [],
|
|
488
503
|
singles: t
|
|
489
504
|
});
|
|
490
505
|
return;
|
|
491
506
|
}
|
|
492
|
-
let
|
|
507
|
+
let o = 0, c = () => {
|
|
493
508
|
let n = [];
|
|
494
509
|
for (let r of t) {
|
|
495
510
|
let t = e.project(r.coordinates);
|
|
496
511
|
if (!t) return;
|
|
497
512
|
n.push(t);
|
|
498
513
|
}
|
|
499
|
-
let
|
|
514
|
+
let o = t.length, c = i * i, l = a * a, u = (e, t) => {
|
|
500
515
|
let r = n[e].x - n[t].x, i = n[e].y - n[t].y;
|
|
501
516
|
return r * r + i * i;
|
|
502
|
-
},
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
for (let e
|
|
513
|
-
let t = d(e), n = m.get(t);
|
|
514
|
-
n ? n.push(e) : m.set(t, [e]);
|
|
515
|
-
}
|
|
516
|
-
let h = [], g = [];
|
|
517
|
-
for (let e of m.values()) {
|
|
517
|
+
}, d = Ie(o, u, c, l), f = /* @__PURE__ */ new Map();
|
|
518
|
+
for (let e = 0; e < o; e++) {
|
|
519
|
+
let t = f.get(d[e]);
|
|
520
|
+
t ? t.push(e) : f.set(d[e], [e]);
|
|
521
|
+
}
|
|
522
|
+
let p = 2 ** (r - e.getZoom()), m = (e) => {
|
|
523
|
+
if (p <= 1) return !1;
|
|
524
|
+
let t = Ie(e.length, (t, n) => u(e[t], e[n]) * p * p, c, l);
|
|
525
|
+
return t.some((e) => e !== t[0]);
|
|
526
|
+
}, h = [], g = [];
|
|
527
|
+
for (let e of f.values()) {
|
|
518
528
|
if (e.length === 1) {
|
|
519
529
|
g.push(t[e[0]]);
|
|
520
530
|
continue;
|
|
@@ -530,39 +540,41 @@ var Pe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
530
540
|
coordinates: [n / c, r / c],
|
|
531
541
|
count: c,
|
|
532
542
|
pointIds: e.map((e) => t[e].id),
|
|
533
|
-
bounds: [[i, a], [o, s]]
|
|
543
|
+
bounds: [[i, a], [o, s]],
|
|
544
|
+
splits: m(e)
|
|
534
545
|
});
|
|
535
546
|
}
|
|
536
|
-
|
|
547
|
+
s((e) => e.clusters.length === h.length && e.singles.length === g.length && e.clusters.every((e, t) => e.id === h[t].id && e.splits === h[t].splits) && e.singles.every((e, t) => e === g[t]) ? e : {
|
|
537
548
|
clusters: h,
|
|
538
549
|
singles: g
|
|
539
550
|
});
|
|
540
|
-
},
|
|
541
|
-
cancelAnimationFrame(
|
|
551
|
+
}, l = () => {
|
|
552
|
+
cancelAnimationFrame(o), o = requestAnimationFrame(c);
|
|
542
553
|
};
|
|
543
|
-
|
|
544
|
-
let
|
|
545
|
-
e.on("move",
|
|
546
|
-
e.on("zoom",
|
|
547
|
-
e.on("resize",
|
|
554
|
+
l();
|
|
555
|
+
let u = [
|
|
556
|
+
e.on("move", l),
|
|
557
|
+
e.on("zoom", l),
|
|
558
|
+
e.on("resize", l)
|
|
548
559
|
];
|
|
549
560
|
return () => {
|
|
550
|
-
cancelAnimationFrame(
|
|
561
|
+
cancelAnimationFrame(o), u.forEach((e) => e());
|
|
551
562
|
};
|
|
552
563
|
}, [
|
|
553
564
|
e,
|
|
554
565
|
t,
|
|
555
566
|
n,
|
|
556
567
|
r,
|
|
557
|
-
i
|
|
558
|
-
|
|
559
|
-
|
|
568
|
+
i,
|
|
569
|
+
a
|
|
570
|
+
]), o;
|
|
571
|
+
}, Re = 4, ze = 4, Be = [
|
|
560
572
|
"right",
|
|
561
573
|
"bottom",
|
|
562
574
|
"left",
|
|
563
575
|
"top"
|
|
564
|
-
],
|
|
565
|
-
let a =
|
|
576
|
+
], Ve = 1.7, X = (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, He = null, Z = (e, t) => (!He && typeof document < "u" && (He = document.createElement("canvas").getContext("2d")), He ? (He.font = `600 ${t}px Inter, system-ui, sans-serif`, He.measureText(e).width) : e.length * t * .55), Ue = ({ placement: e, cx: t, cy: n, point: r, size: i }) => {
|
|
577
|
+
let a = ye(i), o = Z(r.label ?? "", a.label) + 2, s = a.d / 2;
|
|
566
578
|
if (e === "right" || e === "left") {
|
|
567
579
|
let r = o, i = a.lineH;
|
|
568
580
|
return {
|
|
@@ -572,22 +584,22 @@ var Pe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
572
584
|
h: i
|
|
573
585
|
};
|
|
574
586
|
}
|
|
575
|
-
let c = Math.min(o, a.maxLabelW), l = Math.min(Math.ceil(o / a.maxLabelW),
|
|
587
|
+
let c = Math.min(o, a.maxLabelW), l = Math.min(Math.ceil(o / a.maxLabelW), ze) * a.lineH, u = a.gap + Re, d = e === "bottom" ? n + s + u : n - s - a.gap - l;
|
|
576
588
|
return {
|
|
577
589
|
x: t - c / 2,
|
|
578
590
|
y: d,
|
|
579
591
|
w: c,
|
|
580
592
|
h: l
|
|
581
593
|
};
|
|
582
|
-
},
|
|
583
|
-
let [r, i] =
|
|
584
|
-
return
|
|
594
|
+
}, We = (e, t, n = "md") => {
|
|
595
|
+
let [r, i] = z({});
|
|
596
|
+
return P(() => {
|
|
585
597
|
if (!e) {
|
|
586
598
|
i({});
|
|
587
599
|
return;
|
|
588
600
|
}
|
|
589
601
|
let r = 0, a = () => {
|
|
590
|
-
let r =
|
|
602
|
+
let r = ye(n).d, a = [], o = [];
|
|
591
603
|
for (let n of t) {
|
|
592
604
|
let t = e.project(n.coordinates);
|
|
593
605
|
if (!t) return;
|
|
@@ -604,7 +616,7 @@ var Pe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
604
616
|
let s = t.length, c = Array.from({ length: s }, (e, t) => t), l = (e) => {
|
|
605
617
|
for (; c[e] !== e;) e = c[e] = c[c[e]];
|
|
606
618
|
return e;
|
|
607
|
-
}, u = (r *
|
|
619
|
+
}, u = (r * Ve) ** 2;
|
|
608
620
|
for (let e = 0; e < s; e++) for (let t = e + 1; t < s; t++) {
|
|
609
621
|
let n = o[e].x - o[t].x, r = o[e].y - o[t].y;
|
|
610
622
|
if (n * n + r * r <= u) {
|
|
@@ -616,15 +628,15 @@ var Pe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
616
628
|
for (let e = 0; e < s; e++) {
|
|
617
629
|
let r = t[e];
|
|
618
630
|
if (!r.label) continue;
|
|
619
|
-
let i = o[e], s = "right", c = [s, ...
|
|
631
|
+
let i = o[e], s = "right", c = [s, ...Be.filter((e) => e !== s)], l = null;
|
|
620
632
|
for (let e of c) {
|
|
621
|
-
let t =
|
|
633
|
+
let t = Ue({
|
|
622
634
|
placement: e,
|
|
623
635
|
cx: i.x,
|
|
624
636
|
cy: i.y,
|
|
625
637
|
point: r,
|
|
626
638
|
size: n
|
|
627
|
-
}), o = a.some((e) =>
|
|
639
|
+
}), o = a.some((e) => X(t, e)), s = f.some((e) => X(t, e));
|
|
628
640
|
if (!o && !s) {
|
|
629
641
|
l = e, f.push(t);
|
|
630
642
|
break;
|
|
@@ -656,19 +668,19 @@ var Pe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
656
668
|
t,
|
|
657
669
|
n
|
|
658
670
|
]), r;
|
|
659
|
-
},
|
|
660
|
-
let a =
|
|
671
|
+
}, Ge = 3, Ke = ({ adapter: e, el: t, markerRef: n, coordinates: r, drag: i }) => {
|
|
672
|
+
let a = R({
|
|
661
673
|
coordinates: r,
|
|
662
674
|
drag: i
|
|
663
675
|
});
|
|
664
|
-
|
|
676
|
+
I(function() {
|
|
665
677
|
a.current = {
|
|
666
678
|
coordinates: r,
|
|
667
679
|
drag: i
|
|
668
680
|
};
|
|
669
681
|
});
|
|
670
682
|
let o = !!i;
|
|
671
|
-
|
|
683
|
+
P(function() {
|
|
672
684
|
if (!o) return;
|
|
673
685
|
let r = null, i = !1, s = null, c = (t) => r ? e.unproject({
|
|
674
686
|
x: r.at.x + t.clientX - r.x,
|
|
@@ -683,7 +695,7 @@ var Pe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
683
695
|
}, u = (e) => {
|
|
684
696
|
if (!r) return;
|
|
685
697
|
let t = Math.hypot(e.clientX - r.x, e.clientY - r.y);
|
|
686
|
-
!i && t <
|
|
698
|
+
!i && t < Ge || (i = !0, s = c(e), s && (n.current?.setPosition(s), a.current.drag?.onDrag?.(s)));
|
|
687
699
|
}, d = (e) => {
|
|
688
700
|
t.releasePointerCapture?.(e.pointerId), t.style.setProperty("cursor", "grab"), r = null;
|
|
689
701
|
}, f = () => n.current?.setPosition(a.current.coordinates), p = (e) => {
|
|
@@ -702,9 +714,9 @@ var Pe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
702
714
|
n,
|
|
703
715
|
o
|
|
704
716
|
]);
|
|
705
|
-
},
|
|
706
|
-
let [n, r] =
|
|
707
|
-
return
|
|
717
|
+
}, qe = (e, t) => {
|
|
718
|
+
let [n, r] = z(() => e ? e.getZoom() >= t : !1);
|
|
719
|
+
return P(() => {
|
|
708
720
|
if (!e) {
|
|
709
721
|
r(!1);
|
|
710
722
|
return;
|
|
@@ -712,13 +724,16 @@ var Pe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
712
724
|
let n = () => r(e.getZoom() >= t);
|
|
713
725
|
return n(), e.on("zoom", n);
|
|
714
726
|
}, [e, t]), n;
|
|
715
|
-
},
|
|
727
|
+
}, Q = (e) => {
|
|
728
|
+
let { id: t, coordinates: n, label: r, draggable: i, ...a } = e;
|
|
729
|
+
return a;
|
|
730
|
+
}, Je = [
|
|
716
731
|
"default",
|
|
717
732
|
"workplace",
|
|
718
733
|
"employee",
|
|
719
734
|
"company",
|
|
720
735
|
"stop"
|
|
721
|
-
],
|
|
736
|
+
], Ye = "malibu", Xe = "radical", Ze = (e) => {
|
|
722
737
|
switch (e.variant) {
|
|
723
738
|
case "employee": return { variant: {
|
|
724
739
|
variant: "person",
|
|
@@ -734,22 +749,22 @@ var Pe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
734
749
|
case "workplace": return {
|
|
735
750
|
variant: {
|
|
736
751
|
variant: "icon",
|
|
737
|
-
icon:
|
|
752
|
+
icon: v
|
|
738
753
|
},
|
|
739
|
-
color:
|
|
754
|
+
color: Ye
|
|
740
755
|
};
|
|
741
756
|
case "stop": return {
|
|
742
757
|
variant: {
|
|
743
758
|
variant: "letter",
|
|
744
759
|
letter: e.letter
|
|
745
760
|
},
|
|
746
|
-
color:
|
|
761
|
+
color: Xe
|
|
747
762
|
};
|
|
748
763
|
default: return { variant: { variant: "color" } };
|
|
749
764
|
}
|
|
750
|
-
},
|
|
751
|
-
let { variant: n, color: r } =
|
|
752
|
-
return /* @__PURE__ */
|
|
765
|
+
}, Qe = j(function(e, t) {
|
|
766
|
+
let { variant: n, color: r } = Ze(e);
|
|
767
|
+
return /* @__PURE__ */ B(Se, {
|
|
753
768
|
ref: t,
|
|
754
769
|
...n,
|
|
755
770
|
color: r,
|
|
@@ -766,8 +781,8 @@ var Pe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
766
781
|
className: e.className
|
|
767
782
|
});
|
|
768
783
|
});
|
|
769
|
-
|
|
770
|
-
var
|
|
784
|
+
Qe.displayName = "F0MapMarker";
|
|
785
|
+
var $e = Qe, et = 4, tt = 3, nt = 1.3, rt = 1.08, $ = "cubic-bezier(0.16, 1, 0.3, 1)", it = 72, at = {
|
|
771
786
|
1: [[0, 0]],
|
|
772
787
|
2: [[-8, 0], [8, 0]],
|
|
773
788
|
3: [
|
|
@@ -781,68 +796,69 @@ var Xe = Ye, Ze = 4, Qe = 3, $e = 1.3, et = 1.08, tt = "cubic-bezier(0.16, 1, 0.
|
|
|
781
796
|
[-8, 8],
|
|
782
797
|
[8, 8]
|
|
783
798
|
]
|
|
784
|
-
},
|
|
785
|
-
let
|
|
786
|
-
let [t, n] =
|
|
799
|
+
}, ot = j(function({ count: e, members: t, onClick: n, ariaLabel: o, dataTestId: s, className: c, ...l }, u) {
|
|
800
|
+
let d = i(), [f, p] = z(!1), m = t.slice(0, e <= et ? et : tt), h = Math.max(0, e - m.length), g = h > 0, _ = h > 99 ? "+99" : `+${h}`, v = at[m.length + +!!g] ?? at[4], y = f ? nt : 1, b = f ? rt : 1, x = (e) => {
|
|
801
|
+
let [t, n] = v[e] ?? [0, 0];
|
|
787
802
|
return {
|
|
788
|
-
transform: `translate(${t *
|
|
789
|
-
transition: `transform 240ms ${
|
|
803
|
+
transform: `translate(${t * y}px, ${n * y}px) scale(${b})`,
|
|
804
|
+
transition: `transform 240ms ${$}`
|
|
790
805
|
};
|
|
791
806
|
};
|
|
792
|
-
return /* @__PURE__ */
|
|
807
|
+
return /* @__PURE__ */ B(r, {
|
|
793
808
|
dataTestId: s,
|
|
794
|
-
children: /* @__PURE__ */
|
|
795
|
-
|
|
809
|
+
children: /* @__PURE__ */ V("div", {
|
|
810
|
+
...l,
|
|
811
|
+
ref: u,
|
|
796
812
|
role: "button",
|
|
797
813
|
tabIndex: 0,
|
|
798
|
-
"aria-label": o ??
|
|
814
|
+
"aria-label": o ?? d.t("map.cluster", { count: e }),
|
|
799
815
|
onClick: n,
|
|
800
816
|
onKeyDown: (e) => {
|
|
801
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), n?.());
|
|
817
|
+
l.onKeyDown?.(e), n && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), n?.());
|
|
802
818
|
},
|
|
803
|
-
onPointerEnter: () =>
|
|
804
|
-
onPointerLeave: () =>
|
|
805
|
-
onFocus: () =>
|
|
806
|
-
onBlur: () =>
|
|
819
|
+
onPointerEnter: () => p(!0),
|
|
820
|
+
onPointerLeave: () => p(!1),
|
|
821
|
+
onFocus: () => p(!0),
|
|
822
|
+
onBlur: () => p(!1),
|
|
807
823
|
className: a("group relative h-0 w-0 cursor-pointer outline-none", c),
|
|
808
824
|
children: [
|
|
809
|
-
/* @__PURE__ */
|
|
825
|
+
/* @__PURE__ */ B("span", {
|
|
810
826
|
"aria-hidden": !0,
|
|
811
827
|
className: "absolute rounded-lg group-focus-visible:ring-1 group-focus-visible:ring-f1-special-ring group-focus-visible:ring-offset-1",
|
|
812
828
|
style: {
|
|
813
829
|
left: -36,
|
|
814
830
|
top: -36,
|
|
815
|
-
width:
|
|
816
|
-
height:
|
|
831
|
+
width: it,
|
|
832
|
+
height: it
|
|
817
833
|
}
|
|
818
834
|
}),
|
|
819
|
-
|
|
835
|
+
m.map((e, t) => /* @__PURE__ */ B("span", {
|
|
820
836
|
className: "absolute left-0 top-0 flex leading-none",
|
|
821
837
|
style: {
|
|
822
838
|
zIndex: t,
|
|
823
|
-
...
|
|
839
|
+
...x(t)
|
|
824
840
|
},
|
|
825
|
-
children: /* @__PURE__ */
|
|
841
|
+
children: /* @__PURE__ */ B($e, {
|
|
826
842
|
...e,
|
|
827
843
|
showLabel: !1
|
|
828
844
|
})
|
|
829
845
|
}, t)),
|
|
830
|
-
|
|
831
|
-
let [e, t] =
|
|
832
|
-
return /* @__PURE__ */
|
|
846
|
+
g ? (() => {
|
|
847
|
+
let [e, t] = v[m.length] ?? [0, 0];
|
|
848
|
+
return /* @__PURE__ */ V("span", {
|
|
833
849
|
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
850
|
style: {
|
|
835
|
-
zIndex:
|
|
851
|
+
zIndex: tt,
|
|
836
852
|
backgroundColor: "hsl(var(--white-90))",
|
|
837
|
-
transform: `translate(${e *
|
|
838
|
-
transition: `transform 240ms ${
|
|
853
|
+
transform: `translate(${e * y}px, ${t * y}px) translate(-50%, -50%) scale(${b})`,
|
|
854
|
+
transition: `transform 240ms ${$}`
|
|
839
855
|
},
|
|
840
|
-
children: [/* @__PURE__ */
|
|
856
|
+
children: [/* @__PURE__ */ B("span", {
|
|
841
857
|
"aria-hidden": !0,
|
|
842
858
|
className: "absolute inset-0 bg-f1-background-hover"
|
|
843
|
-
}), /* @__PURE__ */
|
|
859
|
+
}), /* @__PURE__ */ B("span", {
|
|
844
860
|
className: "relative",
|
|
845
|
-
children:
|
|
861
|
+
children: _
|
|
846
862
|
})]
|
|
847
863
|
});
|
|
848
864
|
})() : null
|
|
@@ -850,18 +866,51 @@ var Xe = Ye, Ze = 4, Qe = 3, $e = 1.3, et = 1.08, tt = "cubic-bezier(0.16, 1, 0.
|
|
|
850
866
|
})
|
|
851
867
|
});
|
|
852
868
|
});
|
|
853
|
-
|
|
854
|
-
var
|
|
869
|
+
ot.displayName = "F0MapCluster";
|
|
870
|
+
var st = ot, ct = 28, lt = (e) => e.variant === "company" ? { avatar: {
|
|
871
|
+
type: "company",
|
|
872
|
+
name: e.name,
|
|
873
|
+
src: e.src
|
|
874
|
+
} } : e.variant === "employee" ? { avatar: {
|
|
875
|
+
type: "person",
|
|
876
|
+
firstName: e.firstName,
|
|
877
|
+
lastName: e.lastName,
|
|
878
|
+
src: e.src
|
|
879
|
+
} } : e.variant === "workplace" ? { icon: v } : {};
|
|
880
|
+
function ut({ members: e, splits: t, open: n, onOpenChange: r, onExpand: a, onSelect: o }) {
|
|
881
|
+
let s = i(), c = /* @__PURE__ */ B(st, {
|
|
882
|
+
count: e.length,
|
|
883
|
+
members: e.map(Q),
|
|
884
|
+
onClick: t ? a : void 0
|
|
885
|
+
});
|
|
886
|
+
return t ? c : /* @__PURE__ */ B(S, {
|
|
887
|
+
items: e.map((e) => ({
|
|
888
|
+
label: Ne(e, s.map.unnamedLocation),
|
|
889
|
+
...lt(e),
|
|
890
|
+
onClick: () => o(e.id)
|
|
891
|
+
})),
|
|
892
|
+
open: n,
|
|
893
|
+
onOpenChange: r,
|
|
894
|
+
side: "bottom",
|
|
895
|
+
sideOffset: ct,
|
|
896
|
+
align: "center",
|
|
897
|
+
scrollable: !0,
|
|
898
|
+
children: c
|
|
899
|
+
});
|
|
900
|
+
}
|
|
901
|
+
//#endregion
|
|
902
|
+
//#region src/addons/map/F0Map/components/F0MapMarkersLayer.tsx
|
|
903
|
+
var dt = 16, ft = (e, t, n, r) => {
|
|
855
904
|
let i = e.project(t.coordinates);
|
|
856
905
|
if (!i) return null;
|
|
857
|
-
let a =
|
|
906
|
+
let a = ye("xl"), o = ye(r), s = i.y + be(), c = {
|
|
858
907
|
x: i.x - a.d / 2,
|
|
859
908
|
y: s,
|
|
860
909
|
w: a.d,
|
|
861
910
|
h: a.d
|
|
862
|
-
}, l = t.label ?
|
|
911
|
+
}, l = t.label ? Z(t.label, o.label) : 0, u = {
|
|
863
912
|
x: i.x - l / 2,
|
|
864
|
-
y: i.y +
|
|
913
|
+
y: i.y + G,
|
|
865
914
|
w: l,
|
|
866
915
|
h: o.lineH
|
|
867
916
|
}, d = o.d, f = /* @__PURE__ */ new Set();
|
|
@@ -874,18 +923,18 @@ var $ = rt, it = 16, at = (e, t, n, r) => {
|
|
|
874
923
|
w: d,
|
|
875
924
|
h: d
|
|
876
925
|
};
|
|
877
|
-
(
|
|
926
|
+
(X(r, c) || l > 0 && X(r, u)) && f.add(t.id);
|
|
878
927
|
}
|
|
879
928
|
return f;
|
|
880
|
-
},
|
|
881
|
-
let [i, a] =
|
|
882
|
-
return
|
|
883
|
-
if (!t
|
|
929
|
+
}, pt = (e, t, n, r) => {
|
|
930
|
+
let [i, a] = z(null);
|
|
931
|
+
return P(() => {
|
|
932
|
+
if (!t) {
|
|
884
933
|
a(null);
|
|
885
934
|
return;
|
|
886
935
|
}
|
|
887
936
|
let i = 0, o = () => {
|
|
888
|
-
let i =
|
|
937
|
+
let i = ft(e, t, n.filter((e) => e.id !== t.id), r);
|
|
889
938
|
i && a((e) => e !== null && e.size === i.size && [...i].every((t) => e.has(t)) ? e : i);
|
|
890
939
|
}, s = () => {
|
|
891
940
|
cancelAnimationFrame(i), i = requestAnimationFrame(o);
|
|
@@ -901,48 +950,53 @@ var $ = rt, it = 16, at = (e, t, n, r) => {
|
|
|
901
950
|
n,
|
|
902
951
|
r
|
|
903
952
|
]), i;
|
|
904
|
-
},
|
|
905
|
-
let
|
|
906
|
-
return
|
|
907
|
-
}, ct = ({ adapter: e, coordinates: t, selected: n, drag: r, children: i }) => {
|
|
908
|
-
let [a] = L(() => document.createElement("div")), o = I(null);
|
|
909
|
-
return N(() => {
|
|
953
|
+
}, mt = ({ adapter: e, coordinates: t, selected: n, drag: r, children: i }) => {
|
|
954
|
+
let [a] = z(() => document.createElement("div")), o = R(null);
|
|
955
|
+
return P(() => {
|
|
910
956
|
let n = (e) => e.stopPropagation();
|
|
911
957
|
a.style.cursor = "pointer", a.addEventListener("click", n);
|
|
912
958
|
let r = e.addDomMarker(a, t);
|
|
913
959
|
return o.current = r, () => {
|
|
914
960
|
a.removeEventListener("click", n), r.remove(), o.current = null;
|
|
915
961
|
};
|
|
916
|
-
}, [e, a]),
|
|
962
|
+
}, [e, a]), P(() => {
|
|
917
963
|
o.current?.setPosition(t);
|
|
918
|
-
}, [t]),
|
|
964
|
+
}, [t]), Ke({
|
|
919
965
|
adapter: e,
|
|
920
966
|
el: a,
|
|
921
967
|
markerRef: o,
|
|
922
968
|
coordinates: t,
|
|
923
969
|
drag: r
|
|
924
|
-
}),
|
|
970
|
+
}), P(() => {
|
|
925
971
|
a.style.zIndex = n ? "2" : "";
|
|
926
|
-
}, [a, n]),
|
|
927
|
-
},
|
|
928
|
-
let
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
enabled: !0
|
|
932
|
-
}), { clusters: h } = m, g = F(() => {
|
|
933
|
-
if (p === t) return m.singles;
|
|
934
|
-
let e = new Set(m.singles);
|
|
935
|
-
return t.filter((t) => t.draggable || e.has(t));
|
|
972
|
+
}, [a, n]), ae(i, a);
|
|
973
|
+
}, ht = ({ adapter: e, points: t, selectedId: n, highlightedId: r, onSelect: a, onMarkerDrag: o, onMarkerDragEnd: s, onClusterExpand: c, expandZoom: u }) => {
|
|
974
|
+
let f = i(), p = !!s, m = L(() => {
|
|
975
|
+
let e = t.filter((e) => !(p && e.draggable) && e.id !== n);
|
|
976
|
+
return e.length === t.length ? t : e;
|
|
936
977
|
}, [
|
|
937
|
-
|
|
978
|
+
t,
|
|
938
979
|
p,
|
|
980
|
+
n
|
|
981
|
+
]), h = Le({
|
|
982
|
+
adapter: e,
|
|
983
|
+
points: m,
|
|
984
|
+
enabled: !0,
|
|
985
|
+
expandZoom: u
|
|
986
|
+
}), { clusters: g } = h, _ = L(() => {
|
|
987
|
+
if (m === t) return h.singles;
|
|
988
|
+
let e = new Set(h.singles);
|
|
989
|
+
return t.filter((t) => !m.includes(t) || e.has(t));
|
|
990
|
+
}, [
|
|
991
|
+
h.singles,
|
|
992
|
+
m,
|
|
939
993
|
t
|
|
940
|
-
]),
|
|
941
|
-
return /* @__PURE__ */
|
|
994
|
+
]), [v, y] = Fe(e), b = qe(e, dt) ? "lg" : "md", x = We(e, _, b), S = new Map(t.map((e) => [e.id, e])), C = g.length > 0, w = pt(e, n ? S.get(n) : void 0, _, b);
|
|
995
|
+
return /* @__PURE__ */ V(l, { children: [g.map((t) => /* @__PURE__ */ B(mt, {
|
|
942
996
|
adapter: e,
|
|
943
997
|
coordinates: t.coordinates,
|
|
944
|
-
selected:
|
|
945
|
-
children: /* @__PURE__ */
|
|
998
|
+
selected: v === t.id,
|
|
999
|
+
children: /* @__PURE__ */ B(d.span, {
|
|
946
1000
|
initial: {
|
|
947
1001
|
scale: .8,
|
|
948
1002
|
opacity: 0
|
|
@@ -966,23 +1020,26 @@ var $ = rt, it = 16, at = (e, t, n, r) => {
|
|
|
966
1020
|
]
|
|
967
1021
|
},
|
|
968
1022
|
className: "absolute left-0 top-0 flex leading-none",
|
|
969
|
-
children: /* @__PURE__ */
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
1023
|
+
children: /* @__PURE__ */ B(ut, {
|
|
1024
|
+
members: t.pointIds.map((e) => S.get(e)).filter((e) => !!e),
|
|
1025
|
+
splits: t.splits,
|
|
1026
|
+
open: v === t.id,
|
|
1027
|
+
onOpenChange: (e) => y(e ? t.id : null),
|
|
1028
|
+
onExpand: () => c(t.bounds),
|
|
1029
|
+
onSelect: a
|
|
973
1030
|
})
|
|
974
1031
|
})
|
|
975
|
-
}, t.id)),
|
|
976
|
-
let i =
|
|
977
|
-
return /* @__PURE__ */
|
|
1032
|
+
}, t.id)), _.map((t) => {
|
|
1033
|
+
let i = x[t.id], c = w?.has(t.id) ?? !1, u = r === t.id;
|
|
1034
|
+
return /* @__PURE__ */ B(mt, {
|
|
978
1035
|
adapter: e,
|
|
979
1036
|
coordinates: t.coordinates,
|
|
980
|
-
selected: n === t.id ||
|
|
1037
|
+
selected: n === t.id || u,
|
|
981
1038
|
drag: t.draggable && s ? {
|
|
982
1039
|
onDrag: o && ((e) => o(t.id, e)),
|
|
983
1040
|
onDragEnd: (e) => s(t.id, e)
|
|
984
1041
|
} : void 0,
|
|
985
|
-
children: /* @__PURE__ */
|
|
1042
|
+
children: /* @__PURE__ */ B(d.span, {
|
|
986
1043
|
initial: { opacity: 0 },
|
|
987
1044
|
animate: { opacity: 1 },
|
|
988
1045
|
exit: {
|
|
@@ -997,9 +1054,9 @@ var $ = rt, it = 16, at = (e, t, n, r) => {
|
|
|
997
1054
|
ease: "easeOut"
|
|
998
1055
|
},
|
|
999
1056
|
className: "absolute left-0 top-0",
|
|
1000
|
-
children: /* @__PURE__ */
|
|
1057
|
+
children: /* @__PURE__ */ B(l, {
|
|
1001
1058
|
initial: !1,
|
|
1002
|
-
children: /* @__PURE__ */
|
|
1059
|
+
children: /* @__PURE__ */ B(d.span, {
|
|
1003
1060
|
initial: { opacity: 0 },
|
|
1004
1061
|
animate: { opacity: 1 },
|
|
1005
1062
|
exit: { opacity: 0 },
|
|
@@ -1008,25 +1065,25 @@ var $ = rt, it = 16, at = (e, t, n, r) => {
|
|
|
1008
1065
|
ease: "easeOut"
|
|
1009
1066
|
},
|
|
1010
1067
|
className: "absolute left-0 top-0 flex leading-none",
|
|
1011
|
-
children: /* @__PURE__ */
|
|
1012
|
-
...
|
|
1013
|
-
size:
|
|
1068
|
+
children: /* @__PURE__ */ B($e, {
|
|
1069
|
+
...Q(t),
|
|
1070
|
+
size: b,
|
|
1014
1071
|
label: t.label,
|
|
1015
|
-
showLabel: n === t.id ||
|
|
1072
|
+
showLabel: n === t.id || u || !C && i !== null,
|
|
1016
1073
|
labelPlacement: i ?? "right",
|
|
1017
1074
|
selected: n === t.id,
|
|
1018
1075
|
collapsed: c,
|
|
1019
1076
|
onClick: () => a(t.id),
|
|
1020
1077
|
presentational: !0,
|
|
1021
|
-
ariaLabel: t.label ??
|
|
1078
|
+
ariaLabel: t.label ?? f.map.unnamedLocation
|
|
1022
1079
|
})
|
|
1023
|
-
},
|
|
1080
|
+
}, b)
|
|
1024
1081
|
})
|
|
1025
1082
|
})
|
|
1026
1083
|
}, t.id);
|
|
1027
1084
|
})] });
|
|
1028
|
-
},
|
|
1029
|
-
let m = i(), h = u(), g = t ?
|
|
1085
|
+
}, gt = ({ children: e, open: t, offsetX: n, offsetY: o = Y.inset, width: s, entrance: c = "slide", headerStart: l, headerEnd: d, ariaLabel: f, dataTestId: p }) => {
|
|
1086
|
+
let m = i(), h = u(), g = t ? Ae.enter : Ae.exit, _ = n - Y.inset, v = R({
|
|
1030
1087
|
from: _,
|
|
1031
1088
|
to: _
|
|
1032
1089
|
});
|
|
@@ -1034,13 +1091,13 @@ var $ = rt, it = 16, at = (e, t, n, r) => {
|
|
|
1034
1091
|
from: v.current.to,
|
|
1035
1092
|
to: _
|
|
1036
1093
|
});
|
|
1037
|
-
let y = _ > v.current.from ?
|
|
1038
|
-
return /* @__PURE__ */
|
|
1094
|
+
let y = _ > v.current.from ? Ae.enter : Ae.exit, b = c === "grow" ? "translateX(-10%) scale(0.97)" : `translateX(calc(-100% - ${Y.inset}px))`;
|
|
1095
|
+
return /* @__PURE__ */ B(r, {
|
|
1039
1096
|
dataTestId: p,
|
|
1040
|
-
children: /* @__PURE__ */
|
|
1097
|
+
children: /* @__PURE__ */ B("div", {
|
|
1041
1098
|
className: "pointer-events-none absolute bottom-2 z-10",
|
|
1042
1099
|
style: {
|
|
1043
|
-
left:
|
|
1100
|
+
left: Y.inset,
|
|
1044
1101
|
top: o,
|
|
1045
1102
|
width: s,
|
|
1046
1103
|
transform: `translateX(${_}px)`,
|
|
@@ -1048,13 +1105,13 @@ var $ = rt, it = 16, at = (e, t, n, r) => {
|
|
|
1048
1105
|
transitionDuration: y.duration,
|
|
1049
1106
|
transitionTimingFunction: y.easing
|
|
1050
1107
|
},
|
|
1051
|
-
children: /* @__PURE__ */
|
|
1108
|
+
children: /* @__PURE__ */ B("div", {
|
|
1052
1109
|
role: "complementary",
|
|
1053
1110
|
"aria-label": f ?? m.map.panel,
|
|
1054
1111
|
ref: (e) => {
|
|
1055
1112
|
t ? e?.removeAttribute("inert") : e?.setAttribute("inert", "");
|
|
1056
1113
|
},
|
|
1057
|
-
className: a("relative h-full overflow-hidden text-base",
|
|
1114
|
+
className: a("relative h-full overflow-hidden text-base", Oe(De.panel), t ? "pointer-events-auto" : "opacity-0"),
|
|
1058
1115
|
style: {
|
|
1059
1116
|
transform: t || h ? "translateX(0px) scale(1)" : b,
|
|
1060
1117
|
transformOrigin: c === "grow" ? "left center" : void 0,
|
|
@@ -1062,20 +1119,20 @@ var $ = rt, it = 16, at = (e, t, n, r) => {
|
|
|
1062
1119
|
transitionDuration: g.duration,
|
|
1063
1120
|
transitionTimingFunction: g.easing
|
|
1064
1121
|
},
|
|
1065
|
-
children: /* @__PURE__ */
|
|
1122
|
+
children: /* @__PURE__ */ B(w, {
|
|
1066
1123
|
...Ee,
|
|
1067
1124
|
borderRadius: De.panel,
|
|
1068
1125
|
padding: "none",
|
|
1069
1126
|
height: "full",
|
|
1070
|
-
children: /* @__PURE__ */
|
|
1127
|
+
children: /* @__PURE__ */ V("div", {
|
|
1071
1128
|
className: "flex h-full flex-col",
|
|
1072
|
-
children: [l || d ? /* @__PURE__ */
|
|
1129
|
+
children: [l || d ? /* @__PURE__ */ V("div", {
|
|
1073
1130
|
className: "flex shrink-0 items-center justify-between gap-1 p-0.5",
|
|
1074
|
-
children: [/* @__PURE__ */
|
|
1131
|
+
children: [/* @__PURE__ */ B("div", {
|
|
1075
1132
|
className: "flex min-w-0 flex-1 justify-start",
|
|
1076
1133
|
children: l
|
|
1077
1134
|
}), d]
|
|
1078
|
-
}) : null, /* @__PURE__ */
|
|
1135
|
+
}) : null, /* @__PURE__ */ B("div", {
|
|
1079
1136
|
className: "min-h-0 flex-1",
|
|
1080
1137
|
children: e
|
|
1081
1138
|
})]
|
|
@@ -1084,54 +1141,54 @@ var $ = rt, it = 16, at = (e, t, n, r) => {
|
|
|
1084
1141
|
})
|
|
1085
1142
|
})
|
|
1086
1143
|
});
|
|
1087
|
-
},
|
|
1088
|
-
function
|
|
1089
|
-
let [e, t] =
|
|
1144
|
+
}, _t = (e, t, n = 320) => Math.max(216, Math.min(n, e - t - ne.mainHardMin)), vt = (e, t = 320) => Math.min(t, Math.max(216, Math.round(e))), yt = 500, bt = "f0-secondary-sidebar-width", xt = O.primaryCompact, St = (e) => e === null || typeof e == "number" && Number.isFinite(e), Ct = A(null), wt = () => N(Ct);
|
|
1145
|
+
function Tt() {
|
|
1146
|
+
let [e, t] = z(!1), n = R(0), r = M(function() {
|
|
1090
1147
|
t(!0), cancelAnimationFrame(n.current), n.current = requestAnimationFrame(function() {
|
|
1091
1148
|
n.current = requestAnimationFrame(function() {
|
|
1092
1149
|
t(!1);
|
|
1093
1150
|
});
|
|
1094
1151
|
});
|
|
1095
1152
|
}, []);
|
|
1096
|
-
return
|
|
1153
|
+
return P(function() {
|
|
1097
1154
|
return () => cancelAnimationFrame(n.current);
|
|
1098
1155
|
}, []), {
|
|
1099
1156
|
isInstant: e,
|
|
1100
1157
|
landInstantly: r
|
|
1101
1158
|
};
|
|
1102
1159
|
}
|
|
1103
|
-
function
|
|
1104
|
-
let [e, t] =
|
|
1105
|
-
return
|
|
1160
|
+
function Et() {
|
|
1161
|
+
let [e, t] = z(() => window.innerWidth);
|
|
1162
|
+
return P(function() {
|
|
1106
1163
|
let e = () => t(window.innerWidth);
|
|
1107
1164
|
return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
|
|
1108
1165
|
}, []), e;
|
|
1109
1166
|
}
|
|
1110
|
-
function
|
|
1111
|
-
return e ? /* @__PURE__ */
|
|
1167
|
+
function Dt({ enabled: e, children: t, ...n }) {
|
|
1168
|
+
return e ? /* @__PURE__ */ B(Ot, {
|
|
1112
1169
|
...n,
|
|
1113
1170
|
children: t
|
|
1114
|
-
}) : /* @__PURE__ */
|
|
1171
|
+
}) : /* @__PURE__ */ B(Ct.Provider, {
|
|
1115
1172
|
value: null,
|
|
1116
1173
|
children: t
|
|
1117
1174
|
});
|
|
1118
1175
|
}
|
|
1119
|
-
function
|
|
1120
|
-
let { isInstant: r, landInstantly: i } =
|
|
1121
|
-
key:
|
|
1176
|
+
function Ot({ hasSecondarySidebar: e, topBarHeight: t, children: n }) {
|
|
1177
|
+
let { isInstant: r, landInstantly: i } = Tt(), a = Et(), [o, s] = z(O.panel), [c, l] = _({
|
|
1178
|
+
key: bt,
|
|
1122
1179
|
fallback: null,
|
|
1123
|
-
validate:
|
|
1180
|
+
validate: St,
|
|
1124
1181
|
debounceMs: 200
|
|
1125
|
-
}), u =
|
|
1182
|
+
}), u = _t(a, xt, Math.max(320, o)), d = Math.min(o, u), f = c === null ? d : vt(c, u), m = R(o), h = M(function(e) {
|
|
1126
1183
|
e !== m.current && (m.current = e, i(), s(e));
|
|
1127
1184
|
}, [i]), g = M(function(e) {
|
|
1128
1185
|
i(), l(e);
|
|
1129
|
-
}, [i, l]),
|
|
1186
|
+
}, [i, l]), v = M(function() {
|
|
1130
1187
|
i(), l(null);
|
|
1131
|
-
}, [i, l]), y = p(`(max-width: ${
|
|
1188
|
+
}, [i, l]), y = p(`(max-width: ${xt + (e ? d : O.panel) + ne.mainMin - 1}px)`, { initializeWithValue: !0 }) ? "overlay" : "docked", [b, x] = z(!1), S = R(0), C = M(function() {
|
|
1132
1189
|
x(!1);
|
|
1133
1190
|
}, []);
|
|
1134
|
-
|
|
1191
|
+
I(function() {
|
|
1135
1192
|
i(), y === "docked" && C();
|
|
1136
1193
|
}, [
|
|
1137
1194
|
y,
|
|
@@ -1139,19 +1196,19 @@ function St({ hasSecondarySidebar: e, topBarHeight: t, children: n }) {
|
|
|
1139
1196
|
C
|
|
1140
1197
|
]);
|
|
1141
1198
|
let w = y === "overlay" && b && e;
|
|
1142
|
-
|
|
1199
|
+
I(function() {
|
|
1143
1200
|
i(), e || C();
|
|
1144
1201
|
}, [
|
|
1145
1202
|
e,
|
|
1146
1203
|
i,
|
|
1147
1204
|
C
|
|
1148
1205
|
]);
|
|
1149
|
-
let ee =
|
|
1150
|
-
|
|
1206
|
+
let ee = R(e);
|
|
1207
|
+
I(function() {
|
|
1151
1208
|
ee.current = e;
|
|
1152
1209
|
});
|
|
1153
|
-
let T =
|
|
1154
|
-
|
|
1210
|
+
let T = R(null);
|
|
1211
|
+
P(function() {
|
|
1155
1212
|
return () => {
|
|
1156
1213
|
T.current && clearTimeout(T.current);
|
|
1157
1214
|
};
|
|
@@ -1159,34 +1216,34 @@ function St({ hasSecondarySidebar: e, topBarHeight: t, children: n }) {
|
|
|
1159
1216
|
let E = M(function() {
|
|
1160
1217
|
y !== "docked" && (S.current = Date.now(), x(!0), T.current && clearTimeout(T.current), T.current = setTimeout(function() {
|
|
1161
1218
|
ee.current || x(!1);
|
|
1162
|
-
},
|
|
1163
|
-
}, [y]),
|
|
1219
|
+
}, yt));
|
|
1220
|
+
}, [y]), D = C, te = M(function() {
|
|
1164
1221
|
w || (S.current = Date.now()), x(!w);
|
|
1165
1222
|
}, [w]);
|
|
1166
|
-
|
|
1223
|
+
P(function() {
|
|
1167
1224
|
if (!w) return;
|
|
1168
1225
|
let e = (e) => {
|
|
1169
1226
|
e.key === "Escape" && !e.defaultPrevented && x(!1);
|
|
1170
1227
|
};
|
|
1171
1228
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
1172
1229
|
}, [w]);
|
|
1173
|
-
let
|
|
1174
|
-
Date.now() - S.current <
|
|
1175
|
-
}, []),
|
|
1230
|
+
let k = M(function() {
|
|
1231
|
+
Date.now() - S.current < yt || x(!1);
|
|
1232
|
+
}, []), A = L(function() {
|
|
1176
1233
|
return {
|
|
1177
|
-
primarySidebarWidth:
|
|
1234
|
+
primarySidebarWidth: xt,
|
|
1178
1235
|
hasSecondarySidebar: e,
|
|
1179
1236
|
secondarySidebarWidth: f,
|
|
1180
1237
|
secondarySidebarMaxWidth: u,
|
|
1181
1238
|
declareSecondarySidebarWidth: h,
|
|
1182
1239
|
resizeSecondarySidebar: g,
|
|
1183
|
-
resetSecondarySidebarWidth:
|
|
1240
|
+
resetSecondarySidebarWidth: v,
|
|
1184
1241
|
navigationMode: y,
|
|
1185
1242
|
isOpenOverPage: w,
|
|
1186
1243
|
openOverPage: E,
|
|
1187
|
-
toggleOverPage:
|
|
1188
|
-
closeOverPage:
|
|
1189
|
-
closeOverPageAfterRouteChange:
|
|
1244
|
+
toggleOverPage: te,
|
|
1245
|
+
closeOverPage: D,
|
|
1246
|
+
closeOverPageAfterRouteChange: k,
|
|
1190
1247
|
topBarHeight: t,
|
|
1191
1248
|
isInstant: r,
|
|
1192
1249
|
landInstantly: i
|
|
@@ -1197,32 +1254,32 @@ function St({ hasSecondarySidebar: e, topBarHeight: t, children: n }) {
|
|
|
1197
1254
|
u,
|
|
1198
1255
|
h,
|
|
1199
1256
|
g,
|
|
1200
|
-
|
|
1257
|
+
v,
|
|
1201
1258
|
y,
|
|
1202
1259
|
w,
|
|
1203
1260
|
E,
|
|
1204
|
-
k,
|
|
1205
1261
|
te,
|
|
1206
|
-
|
|
1262
|
+
D,
|
|
1263
|
+
k,
|
|
1207
1264
|
t,
|
|
1208
1265
|
r,
|
|
1209
1266
|
i
|
|
1210
1267
|
]);
|
|
1211
|
-
return /* @__PURE__ */
|
|
1212
|
-
value:
|
|
1268
|
+
return /* @__PURE__ */ B(Ct.Provider, {
|
|
1269
|
+
value: A,
|
|
1213
1270
|
children: n
|
|
1214
1271
|
});
|
|
1215
1272
|
}
|
|
1216
1273
|
//#endregion
|
|
1217
1274
|
//#region src/blocks/ApplicationFrame/FrameProvider.tsx
|
|
1218
|
-
var
|
|
1275
|
+
var kt = "one_sidebar_locked", At = 32, jt = 180, Mt = 280, Nt = 300, Pt = A(void 0), Ft = A({
|
|
1219
1276
|
steppedAsideFor: null,
|
|
1220
1277
|
takeCard: () => {}
|
|
1221
|
-
}),
|
|
1222
|
-
|
|
1278
|
+
}), It = () => N(Ft), Lt = /* @__PURE__ */ new WeakSet(), Rt = (e) => {
|
|
1279
|
+
Lt.add(e.nativeEvent);
|
|
1223
1280
|
};
|
|
1224
|
-
function
|
|
1225
|
-
let e =
|
|
1281
|
+
function zt() {
|
|
1282
|
+
let e = N(Pt);
|
|
1226
1283
|
return e === void 0 ? {
|
|
1227
1284
|
isSmallScreen: !1,
|
|
1228
1285
|
isLastToggleInvokedByUser: !0,
|
|
@@ -1236,24 +1293,24 @@ function Nt() {
|
|
|
1236
1293
|
hasPrimarySidebar: !1
|
|
1237
1294
|
} : e;
|
|
1238
1295
|
}
|
|
1239
|
-
var
|
|
1240
|
-
function
|
|
1241
|
-
let { currentPath: t } = s(), n =
|
|
1242
|
-
let e = localStorage.getItem(
|
|
1296
|
+
var Bt = (e, t) => e.navigationMode === "overlay" ? e.isOpenOverPage ? "unlocked" : "hidden" : t ? "locked" : "hidden", Vt = (e, t, n) => e || !t ? n ? "unlocked" : "hidden" : "locked";
|
|
1297
|
+
function Ht({ children: e }) {
|
|
1298
|
+
let { currentPath: t } = s(), n = wt(), [r, i] = z(!1), [a, o] = z(!1), c = p(`(max-width: ${te.md}px)`, { initializeWithValue: !0 }), l = p(`(max-width: ${te.xl}px)`, { initializeWithValue: !0 }), u = r ? l : c, [d, f] = z(() => {
|
|
1299
|
+
let e = localStorage.getItem(kt);
|
|
1243
1300
|
return e === null || !!e;
|
|
1244
|
-
}), [m, h] =
|
|
1301
|
+
}), [m, h] = z(!1), g = x(), [_, v] = z(null), [y, b] = z(null), S = g && n?.hasSecondarySidebar === !0 && n.navigationMode === "docked" && d && y !== _ ? _ : null, C = M(function(e) {
|
|
1245
1302
|
v(e), o(!1);
|
|
1246
|
-
}, []), [w, ee] =
|
|
1303
|
+
}, []), [w, ee] = z(null), T = R(null), E = R(null), D = M(function() {
|
|
1247
1304
|
T.current && clearTimeout(T.current), T.current = null, E.current = null;
|
|
1248
|
-
}, []),
|
|
1305
|
+
}, []), ne = M(function(e, t) {
|
|
1249
1306
|
E.current !== e && (D(), E.current = e, T.current = setTimeout(() => {
|
|
1250
1307
|
T.current = null, E.current = null, h(e);
|
|
1251
1308
|
}, t));
|
|
1252
1309
|
}, [D]);
|
|
1253
|
-
|
|
1254
|
-
let
|
|
1310
|
+
P(() => D, [D]);
|
|
1311
|
+
let O = M(function() {
|
|
1255
1312
|
n ? n.closeOverPage() : (D(), h(!1));
|
|
1256
|
-
}, [n, D]),
|
|
1313
|
+
}, [n, D]), k = M(function({ isInvokedByUser: e } = { isInvokedByUser: !0 }) {
|
|
1257
1314
|
n?.navigationMode === "overlay" ? n.toggleOverPage() : (o(e ?? !0), b(_), !S && (u && !n && h(!m), f(!d)));
|
|
1258
1315
|
}, [
|
|
1259
1316
|
n,
|
|
@@ -1262,70 +1319,70 @@ function It({ children: e }) {
|
|
|
1262
1319
|
d,
|
|
1263
1320
|
_,
|
|
1264
1321
|
S
|
|
1265
|
-
]),
|
|
1266
|
-
u || n || d || (
|
|
1322
|
+
]), A = M(function(e) {
|
|
1323
|
+
u || n || d || (Lt.has(e.nativeEvent) ? D() : !m && e.clientX < At ? ne(!0, jt) : m && e.clientX > Mt ? ne(!1, Nt) : D());
|
|
1267
1324
|
}, [
|
|
1268
1325
|
u,
|
|
1269
1326
|
n,
|
|
1270
1327
|
d,
|
|
1271
1328
|
m,
|
|
1272
|
-
|
|
1329
|
+
ne,
|
|
1273
1330
|
D
|
|
1274
|
-
]),
|
|
1331
|
+
]), j = M(function() {
|
|
1275
1332
|
E.current && D();
|
|
1276
|
-
}, [D]),
|
|
1277
|
-
|
|
1278
|
-
D(), h(!1),
|
|
1333
|
+
}, [D]), N = n ? Bt(n, d && S === null) : Vt(u, d, m), re = n?.closeOverPageAfterRouteChange;
|
|
1334
|
+
P(function() {
|
|
1335
|
+
D(), h(!1), re?.();
|
|
1279
1336
|
}, [
|
|
1280
1337
|
t,
|
|
1281
|
-
|
|
1338
|
+
re,
|
|
1282
1339
|
D
|
|
1283
|
-
]),
|
|
1284
|
-
a && localStorage.setItem(
|
|
1285
|
-
}, [d, a]),
|
|
1340
|
+
]), P(function() {
|
|
1341
|
+
a && localStorage.setItem(kt, d ? "1" : "");
|
|
1342
|
+
}, [d, a]), P(function() {
|
|
1286
1343
|
return () => {
|
|
1287
1344
|
ee({
|
|
1288
|
-
sidebarState:
|
|
1345
|
+
sidebarState: N,
|
|
1289
1346
|
locked: d
|
|
1290
1347
|
});
|
|
1291
1348
|
};
|
|
1292
|
-
}, [
|
|
1293
|
-
let
|
|
1349
|
+
}, [N, d]);
|
|
1350
|
+
let F = w?.sidebarState ?? null, I = a && w?.sidebarState === "hidden" && !w.locked && N === "locked", ie = n !== null, V = !ie && l, ae = L(function() {
|
|
1294
1351
|
return {
|
|
1295
1352
|
isSmallScreen: u,
|
|
1296
1353
|
isLastToggleInvokedByUser: a,
|
|
1297
|
-
sidebarState:
|
|
1298
|
-
hideSidebar:
|
|
1299
|
-
toggleSidebar:
|
|
1300
|
-
prevSidebarState:
|
|
1301
|
-
isDockedByUser:
|
|
1354
|
+
sidebarState: N,
|
|
1355
|
+
hideSidebar: O,
|
|
1356
|
+
toggleSidebar: k,
|
|
1357
|
+
prevSidebarState: F,
|
|
1358
|
+
isDockedByUser: I,
|
|
1302
1359
|
setForceFloat: i,
|
|
1303
|
-
floatsWhenForced:
|
|
1304
|
-
hasPrimarySidebar:
|
|
1360
|
+
floatsWhenForced: V,
|
|
1361
|
+
hasPrimarySidebar: ie
|
|
1305
1362
|
};
|
|
1306
1363
|
}, [
|
|
1307
1364
|
u,
|
|
1308
1365
|
a,
|
|
1309
|
-
|
|
1366
|
+
N,
|
|
1367
|
+
O,
|
|
1310
1368
|
k,
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
]), ce = F(function() {
|
|
1369
|
+
F,
|
|
1370
|
+
I,
|
|
1371
|
+
V,
|
|
1372
|
+
ie
|
|
1373
|
+
]), oe = L(function() {
|
|
1317
1374
|
return {
|
|
1318
1375
|
steppedAsideFor: S,
|
|
1319
1376
|
takeCard: C
|
|
1320
1377
|
};
|
|
1321
1378
|
}, [S, C]);
|
|
1322
|
-
return /* @__PURE__ */
|
|
1323
|
-
value:
|
|
1324
|
-
children: /* @__PURE__ */
|
|
1325
|
-
value:
|
|
1326
|
-
children: /* @__PURE__ */
|
|
1327
|
-
onPointerMove:
|
|
1328
|
-
onPointerLeave:
|
|
1379
|
+
return /* @__PURE__ */ B(Pt.Provider, {
|
|
1380
|
+
value: ae,
|
|
1381
|
+
children: /* @__PURE__ */ B(Ft.Provider, {
|
|
1382
|
+
value: oe,
|
|
1383
|
+
children: /* @__PURE__ */ B("div", {
|
|
1384
|
+
onPointerMove: A,
|
|
1385
|
+
onPointerLeave: j,
|
|
1329
1386
|
className: "h-screen w-screen",
|
|
1330
1387
|
children: e
|
|
1331
1388
|
})
|
|
@@ -1334,7 +1391,7 @@ function It({ children: e }) {
|
|
|
1334
1391
|
}
|
|
1335
1392
|
//#endregion
|
|
1336
1393
|
//#region src/blocks/Navigation/Sidebar/Icon/Icon.tsx
|
|
1337
|
-
var
|
|
1394
|
+
var Ut = "M10.417 10L14.167 10M10.417 10L12.0837 8.33337M10.417 10L12.0837 11.6667", Wt = {
|
|
1338
1395
|
open: {
|
|
1339
1396
|
rest: {
|
|
1340
1397
|
arrow: "opacity-0 translate-x-0",
|
|
@@ -1355,10 +1412,10 @@ var Lt = "M10.417 10L14.167 10M10.417 10L12.0837 8.33337M10.417 10L12.0837 11.66
|
|
|
1355
1412
|
line: "opacity-100 translate-x-0"
|
|
1356
1413
|
}
|
|
1357
1414
|
}
|
|
1358
|
-
},
|
|
1359
|
-
function
|
|
1360
|
-
let n =
|
|
1361
|
-
return /* @__PURE__ */
|
|
1415
|
+
}, Gt = "[transform-box:view-box] transition-[transform,opacity]";
|
|
1416
|
+
function Kt({ isExpanded: e, isHovered: t = !1 }) {
|
|
1417
|
+
let n = Wt[e ? "open" : "closed"][t ? "hover" : "rest"];
|
|
1418
|
+
return /* @__PURE__ */ V("svg", {
|
|
1362
1419
|
width: "20",
|
|
1363
1420
|
height: "20",
|
|
1364
1421
|
viewBox: "0 0 20 20",
|
|
@@ -1366,7 +1423,7 @@ function Bt({ isExpanded: e, isHovered: t = !1 }) {
|
|
|
1366
1423
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1367
1424
|
className: "text-f1-icon-bold",
|
|
1368
1425
|
children: [
|
|
1369
|
-
/* @__PURE__ */
|
|
1426
|
+
/* @__PURE__ */ B("rect", {
|
|
1370
1427
|
id: "container",
|
|
1371
1428
|
x: "3.33325",
|
|
1372
1429
|
y: "5",
|
|
@@ -1376,27 +1433,27 @@ function Bt({ isExpanded: e, isHovered: t = !1 }) {
|
|
|
1376
1433
|
strokeWidth: "1.3",
|
|
1377
1434
|
className: "stroke-current"
|
|
1378
1435
|
}),
|
|
1379
|
-
/* @__PURE__ */
|
|
1436
|
+
/* @__PURE__ */ B("path", {
|
|
1380
1437
|
id: "arrow",
|
|
1381
|
-
d:
|
|
1438
|
+
d: Ut,
|
|
1382
1439
|
strokeWidth: "1.3",
|
|
1383
1440
|
strokeLinecap: "round",
|
|
1384
1441
|
strokeLinejoin: "round",
|
|
1385
|
-
className: a("stroke-current",
|
|
1442
|
+
className: a("stroke-current", Gt, y, "origin-[10.5835px_10px]", e ? "scale-x-100" : "-scale-x-100", n.arrow)
|
|
1386
1443
|
}),
|
|
1387
|
-
/* @__PURE__ */
|
|
1444
|
+
/* @__PURE__ */ B("path", {
|
|
1388
1445
|
id: "line",
|
|
1389
1446
|
d: "M7.5 5L7.5 15",
|
|
1390
1447
|
strokeWidth: "1.3",
|
|
1391
1448
|
strokeLinecap: "round",
|
|
1392
|
-
className: a("stroke-current",
|
|
1449
|
+
className: a("stroke-current", Gt, y, n.line)
|
|
1393
1450
|
})
|
|
1394
1451
|
]
|
|
1395
1452
|
});
|
|
1396
1453
|
}
|
|
1397
|
-
function
|
|
1398
|
-
let { prevSidebarState: e, sidebarState: t, toggleSidebar: n, isLastToggleInvokedByUser: r } =
|
|
1399
|
-
|
|
1454
|
+
function qt() {
|
|
1455
|
+
let { prevSidebarState: e, sidebarState: t, toggleSidebar: n, isLastToggleInvokedByUser: r } = zt(), a = R(null), [o, s] = z(!1), l = b() === "two-level";
|
|
1456
|
+
P(function() {
|
|
1400
1457
|
l && e === "hidden" && (t === "unlocked" || t === "locked" && r) && a.current?.focus();
|
|
1401
1458
|
}, [
|
|
1402
1459
|
l,
|
|
@@ -1405,7 +1462,7 @@ function Vt() {
|
|
|
1405
1462
|
r
|
|
1406
1463
|
]);
|
|
1407
1464
|
let u = i(), d = t !== "hidden", f = d ? u.navigation.sidebar.closePanel : u.navigation.sidebar.openPanel;
|
|
1408
|
-
return /* @__PURE__ */
|
|
1465
|
+
return /* @__PURE__ */ B(c, {
|
|
1409
1466
|
variant: "ghost",
|
|
1410
1467
|
size: "md",
|
|
1411
1468
|
onClick: () => n(),
|
|
@@ -1417,14 +1474,14 @@ function Vt() {
|
|
|
1417
1474
|
"aria-expanded": d,
|
|
1418
1475
|
onMouseEnter: () => s(!0),
|
|
1419
1476
|
onMouseLeave: () => s(!1),
|
|
1420
|
-
children: /* @__PURE__ */
|
|
1477
|
+
children: /* @__PURE__ */ B(Kt, {
|
|
1421
1478
|
isExpanded: d,
|
|
1422
1479
|
isHovered: o
|
|
1423
1480
|
})
|
|
1424
1481
|
});
|
|
1425
1482
|
}
|
|
1426
|
-
function
|
|
1427
|
-
return /* @__PURE__ */
|
|
1483
|
+
function Jt({ isExpanded: e }) {
|
|
1484
|
+
return /* @__PURE__ */ V("svg", {
|
|
1428
1485
|
width: "20",
|
|
1429
1486
|
height: "20",
|
|
1430
1487
|
viewBox: "0 0 20 20",
|
|
@@ -1432,7 +1489,7 @@ function Ht({ isExpanded: e }) {
|
|
|
1432
1489
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1433
1490
|
className: "text-f1-icon-bold",
|
|
1434
1491
|
children: [
|
|
1435
|
-
/* @__PURE__ */
|
|
1492
|
+
/* @__PURE__ */ B("rect", {
|
|
1436
1493
|
id: "container",
|
|
1437
1494
|
x: "3.33325",
|
|
1438
1495
|
y: "5",
|
|
@@ -1442,7 +1499,7 @@ function Ht({ isExpanded: e }) {
|
|
|
1442
1499
|
strokeWidth: "1.3",
|
|
1443
1500
|
className: "stroke-current"
|
|
1444
1501
|
}),
|
|
1445
|
-
/* @__PURE__ */
|
|
1502
|
+
/* @__PURE__ */ B("path", {
|
|
1446
1503
|
id: "arrow",
|
|
1447
1504
|
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",
|
|
1448
1505
|
strokeWidth: "1.3",
|
|
@@ -1450,7 +1507,7 @@ function Ht({ isExpanded: e }) {
|
|
|
1450
1507
|
strokeLinejoin: "round",
|
|
1451
1508
|
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]")
|
|
1452
1509
|
}),
|
|
1453
|
-
/* @__PURE__ */
|
|
1510
|
+
/* @__PURE__ */ B("path", {
|
|
1454
1511
|
id: "line",
|
|
1455
1512
|
d: "M7.5 5L7.5 15",
|
|
1456
1513
|
strokeWidth: "1.3",
|
|
@@ -1460,11 +1517,11 @@ function Ht({ isExpanded: e }) {
|
|
|
1460
1517
|
]
|
|
1461
1518
|
});
|
|
1462
1519
|
}
|
|
1463
|
-
function
|
|
1464
|
-
let { isDockedByUser: e, sidebarState: t, toggleSidebar: n, isSmallScreen: r } =
|
|
1465
|
-
return
|
|
1520
|
+
function Yt() {
|
|
1521
|
+
let { isDockedByUser: e, sidebarState: t, toggleSidebar: n, isSmallScreen: r } = zt(), i = R(null);
|
|
1522
|
+
return P(() => {
|
|
1466
1523
|
e && i.current?.focus();
|
|
1467
|
-
}, [e]), /* @__PURE__ */
|
|
1524
|
+
}, [e]), /* @__PURE__ */ V(c, {
|
|
1468
1525
|
variant: "ghost",
|
|
1469
1526
|
size: "md",
|
|
1470
1527
|
onClick: () => n(),
|
|
@@ -1473,26 +1530,26 @@ function Ut() {
|
|
|
1473
1530
|
ref: i,
|
|
1474
1531
|
compact: !0,
|
|
1475
1532
|
"aria-label": "Close Sidebar",
|
|
1476
|
-
children: [/* @__PURE__ */
|
|
1533
|
+
children: [/* @__PURE__ */ B("div", {
|
|
1477
1534
|
className: a("hidden", { flex: !r }),
|
|
1478
|
-
children: /* @__PURE__ */
|
|
1479
|
-
}), /* @__PURE__ */
|
|
1535
|
+
children: /* @__PURE__ */ B(Jt, { isExpanded: t === "locked" })
|
|
1536
|
+
}), /* @__PURE__ */ B("div", {
|
|
1480
1537
|
className: a("hidden", { flex: r }),
|
|
1481
|
-
children: /* @__PURE__ */
|
|
1482
|
-
icon:
|
|
1538
|
+
children: /* @__PURE__ */ B(C, {
|
|
1539
|
+
icon: g,
|
|
1483
1540
|
size: "md"
|
|
1484
1541
|
})
|
|
1485
1542
|
})]
|
|
1486
1543
|
});
|
|
1487
1544
|
}
|
|
1488
|
-
function
|
|
1489
|
-
let { hasPrimarySidebar: e } =
|
|
1490
|
-
return
|
|
1545
|
+
function Xt() {
|
|
1546
|
+
let { hasPrimarySidebar: e } = zt();
|
|
1547
|
+
return B(e ? qt : Yt, {});
|
|
1491
1548
|
}
|
|
1492
1549
|
//#endregion
|
|
1493
1550
|
//#region src/addons/map/F0Map/components/F0MapSidebarToggle/F0MapSidebarToggle.tsx
|
|
1494
|
-
var
|
|
1495
|
-
let l = i(), u = n ?? (e ? l.map.controls.hidePanel : l.map.controls.showPanel), d = /* @__PURE__ */
|
|
1551
|
+
var Zt = j(({ expanded: e, onToggle: t, label: n, bare: a = !1, dataTestId: o }, s) => {
|
|
1552
|
+
let l = i(), u = n ?? (e ? l.map.controls.hidePanel : l.map.controls.showPanel), d = /* @__PURE__ */ B(c, {
|
|
1496
1553
|
ref: s,
|
|
1497
1554
|
variant: "ghost",
|
|
1498
1555
|
size: "md",
|
|
@@ -1502,29 +1559,29 @@ var Gt = j(({ expanded: e, onToggle: t, label: n, bare: a = !1, dataTestId: o },
|
|
|
1502
1559
|
title: u,
|
|
1503
1560
|
"aria-label": u,
|
|
1504
1561
|
"aria-expanded": e,
|
|
1505
|
-
children: /* @__PURE__ */
|
|
1562
|
+
children: /* @__PURE__ */ B(Jt, { isExpanded: e })
|
|
1506
1563
|
});
|
|
1507
|
-
return /* @__PURE__ */
|
|
1564
|
+
return /* @__PURE__ */ B(r, {
|
|
1508
1565
|
dataTestId: o,
|
|
1509
|
-
children: a ? d : /* @__PURE__ */
|
|
1566
|
+
children: a ? d : /* @__PURE__ */ B(je, { children: d })
|
|
1510
1567
|
});
|
|
1511
1568
|
});
|
|
1512
|
-
|
|
1569
|
+
Zt.displayName = "F0MapSidebarToggle";
|
|
1513
1570
|
//#endregion
|
|
1514
1571
|
//#region src/addons/map/F0Map/utils/arc.ts
|
|
1515
|
-
var
|
|
1572
|
+
var Qt = (e, t, n = .3, r = 64) => {
|
|
1516
1573
|
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 = [];
|
|
1517
1574
|
for (let e = 0; e <= r; e++) {
|
|
1518
1575
|
let t = e / r, n = 1 - t, c = n * n, l = 2 * n * t, p = t * t;
|
|
1519
1576
|
f.push([c * i + l * u + p * o, c * a + l * d + p * s]);
|
|
1520
1577
|
}
|
|
1521
1578
|
return f;
|
|
1522
|
-
},
|
|
1579
|
+
}, $t = (e, t) => e.color ?? Ce(e.variant ?? "radical", t), en = (e, t) => e.color ?? Ce(e.variant ?? "radical", !t), tn = ({ id: e, kind: t, coordinates: n, style: r, isDark: i }) => {
|
|
1523
1580
|
let a = r.width ?? 3;
|
|
1524
1581
|
return {
|
|
1525
1582
|
id: e,
|
|
1526
1583
|
coordinates: n,
|
|
1527
|
-
color:
|
|
1584
|
+
color: $t(r, i),
|
|
1528
1585
|
width: a,
|
|
1529
1586
|
opacity: r.opacity ?? 1,
|
|
1530
1587
|
dashed: r.dashed ?? !1,
|
|
@@ -1532,28 +1589,28 @@ var Kt = (e, t, n = .3, r = 64) => {
|
|
|
1532
1589
|
width: a * 1.6,
|
|
1533
1590
|
opacity: 1
|
|
1534
1591
|
} : {
|
|
1535
|
-
color:
|
|
1592
|
+
color: en(r, i),
|
|
1536
1593
|
opacity: 1
|
|
1537
1594
|
}
|
|
1538
1595
|
};
|
|
1539
|
-
},
|
|
1540
|
-
let o =
|
|
1596
|
+
}, nn = ({ adapter: e, routes: t, arcs: n, isDark: r, onRouteClick: i, onArcClick: a }) => {
|
|
1597
|
+
let o = L(() => [...t.map((e) => tn({
|
|
1541
1598
|
id: e.id,
|
|
1542
1599
|
kind: "route",
|
|
1543
1600
|
coordinates: e.coordinates,
|
|
1544
1601
|
style: e,
|
|
1545
1602
|
isDark: r
|
|
1546
|
-
})), ...n.map((e) =>
|
|
1603
|
+
})), ...n.map((e) => tn({
|
|
1547
1604
|
id: e.id,
|
|
1548
1605
|
kind: "arc",
|
|
1549
|
-
coordinates:
|
|
1606
|
+
coordinates: Qt(e.from, e.to, e.curvature),
|
|
1550
1607
|
style: e,
|
|
1551
1608
|
isDark: r
|
|
1552
1609
|
}))], [
|
|
1553
1610
|
t,
|
|
1554
1611
|
n,
|
|
1555
1612
|
r
|
|
1556
|
-
]), s =
|
|
1613
|
+
]), s = L(() => new Map([...t.map((e) => [e.id, "route"]), ...n.map((e) => [e.id, "arc"])]), [t, n]), c = R({
|
|
1557
1614
|
onRouteClick: i,
|
|
1558
1615
|
onArcClick: a,
|
|
1559
1616
|
kinds: s
|
|
@@ -1564,7 +1621,7 @@ var Kt = (e, t, n = .3, r = 64) => {
|
|
|
1564
1621
|
kinds: s
|
|
1565
1622
|
};
|
|
1566
1623
|
let l = !!(i || a);
|
|
1567
|
-
return
|
|
1624
|
+
return P(() => {
|
|
1568
1625
|
e.setLines(o, l ? { onClick: (e) => {
|
|
1569
1626
|
let { onRouteClick: t, onArcClick: n, kinds: r } = c.current;
|
|
1570
1627
|
r.get(e) === "arc" ? n?.(e) : t?.(e);
|
|
@@ -1573,25 +1630,25 @@ var Kt = (e, t, n = .3, r = 64) => {
|
|
|
1573
1630
|
e,
|
|
1574
1631
|
o,
|
|
1575
1632
|
l
|
|
1576
|
-
]),
|
|
1577
|
-
},
|
|
1633
|
+
]), P(() => () => e.setLines([]), [e]), null;
|
|
1634
|
+
}, rn = ({ adapter: e, coords: t }) => (P(() => {
|
|
1578
1635
|
e.setCurrentLocation(t);
|
|
1579
|
-
}, [e, t]),
|
|
1580
|
-
|
|
1636
|
+
}, [e, t]), P(() => () => e.setCurrentLocation(null), [e]), null);
|
|
1637
|
+
rn.displayName = "CurrentLocationLayer";
|
|
1581
1638
|
//#endregion
|
|
1582
1639
|
//#region src/addons/map/F0Map/constants.ts
|
|
1583
|
-
var
|
|
1640
|
+
var an = {
|
|
1584
1641
|
curve: 1.42,
|
|
1585
1642
|
duration: 1400
|
|
1586
|
-
},
|
|
1643
|
+
}, on = 200, sn = ({ dataTestId: e, className: t }) => /* @__PURE__ */ B(r, {
|
|
1587
1644
|
dataTestId: e,
|
|
1588
|
-
children: /* @__PURE__ */
|
|
1645
|
+
children: /* @__PURE__ */ B("div", {
|
|
1589
1646
|
"aria-busy": "true",
|
|
1590
1647
|
"aria-live": "polite",
|
|
1591
1648
|
className: a("h-full w-full animate-pulse bg-f1-background-secondary", t)
|
|
1592
1649
|
})
|
|
1593
|
-
}),
|
|
1594
|
-
let [t, n] =
|
|
1650
|
+
}), cn = (e) => {
|
|
1651
|
+
let [t, n] = z(null), r = M((t) => {
|
|
1595
1652
|
e && typeof navigator < "u" && navigator.geolocation && navigator.geolocation.getCurrentPosition((e) => {
|
|
1596
1653
|
let r = [e.coords.longitude, e.coords.latitude];
|
|
1597
1654
|
n(r), t?.(r);
|
|
@@ -1601,7 +1658,7 @@ var Qt = {
|
|
|
1601
1658
|
maximumAge: 6e4
|
|
1602
1659
|
});
|
|
1603
1660
|
}, [e]);
|
|
1604
|
-
return
|
|
1661
|
+
return P(() => {
|
|
1605
1662
|
e && !t && typeof navigator < "u" && navigator.permissions?.query({ name: "geolocation" }).then((e) => {
|
|
1606
1663
|
e.state === "granted" && r();
|
|
1607
1664
|
}).catch(() => {});
|
|
@@ -1613,8 +1670,8 @@ var Qt = {
|
|
|
1613
1670
|
coords: t,
|
|
1614
1671
|
request: r
|
|
1615
1672
|
};
|
|
1616
|
-
},
|
|
1617
|
-
let [e, t] =
|
|
1673
|
+
}, ln = () => {
|
|
1674
|
+
let [e, t] = z(!1), n = R(null), r = M((e) => {
|
|
1618
1675
|
if (n.current?.disconnect(), n.current = null, !e) return;
|
|
1619
1676
|
let r = () => t(e.closest(".dark") !== null);
|
|
1620
1677
|
r();
|
|
@@ -1625,21 +1682,21 @@ var Qt = {
|
|
|
1625
1682
|
});
|
|
1626
1683
|
n.current = i;
|
|
1627
1684
|
}, []);
|
|
1628
|
-
return
|
|
1685
|
+
return P(() => () => n.current?.disconnect(), []), {
|
|
1629
1686
|
containerRef: r,
|
|
1630
1687
|
isDark: e
|
|
1631
1688
|
};
|
|
1632
|
-
},
|
|
1633
|
-
maplibre: async () => (await import("./maplibre-
|
|
1689
|
+
}, un = {
|
|
1690
|
+
maplibre: async () => (await import("./maplibre-Dqb2AOHT.js")).createMaplibreAdapter,
|
|
1634
1691
|
google: async (e) => (await import("./google-DDQ7XfPD.js")).loadGoogleAdapter(e)
|
|
1635
|
-
},
|
|
1636
|
-
let n =
|
|
1692
|
+
}, dn = /* @__PURE__ */ new Map(), fn = (e, t) => {
|
|
1693
|
+
let n = dn.get(e);
|
|
1637
1694
|
if (n) return n;
|
|
1638
|
-
let r =
|
|
1639
|
-
throw
|
|
1695
|
+
let r = un[e](t).catch((t) => {
|
|
1696
|
+
throw dn.delete(e), t;
|
|
1640
1697
|
});
|
|
1641
|
-
return
|
|
1642
|
-
},
|
|
1698
|
+
return dn.set(e, r), r;
|
|
1699
|
+
}, pn = {
|
|
1643
1700
|
version: 8,
|
|
1644
1701
|
sources: { openmaptiles: {
|
|
1645
1702
|
type: "vector",
|
|
@@ -6527,7 +6584,7 @@ var Qt = {
|
|
|
6527
6584
|
],
|
|
6528
6585
|
name: "f0-dark",
|
|
6529
6586
|
metadata: { "f0:generated": !0 }
|
|
6530
|
-
},
|
|
6587
|
+
}, mn = {
|
|
6531
6588
|
version: 8,
|
|
6532
6589
|
sources: { openmaptiles: {
|
|
6533
6590
|
type: "vector",
|
|
@@ -11415,7 +11472,7 @@ var Qt = {
|
|
|
11415
11472
|
],
|
|
11416
11473
|
name: "f0-light",
|
|
11417
11474
|
metadata: { "f0:generated": !0 }
|
|
11418
|
-
},
|
|
11475
|
+
}, hn = [
|
|
11419
11476
|
{
|
|
11420
11477
|
featureType: "landscape",
|
|
11421
11478
|
elementType: "geometry.fill",
|
|
@@ -11571,7 +11628,7 @@ var Qt = {
|
|
|
11571
11628
|
elementType: "labels.icon",
|
|
11572
11629
|
stylers: [{ visibility: "off" }]
|
|
11573
11630
|
}
|
|
11574
|
-
],
|
|
11631
|
+
], gn = [
|
|
11575
11632
|
{
|
|
11576
11633
|
featureType: "landscape",
|
|
11577
11634
|
elementType: "geometry.fill",
|
|
@@ -11727,44 +11784,44 @@ var Qt = {
|
|
|
11727
11784
|
elementType: "labels.icon",
|
|
11728
11785
|
stylers: [{ visibility: "off" }]
|
|
11729
11786
|
}
|
|
11730
|
-
],
|
|
11787
|
+
], _n = {
|
|
11731
11788
|
provider: "maplibre",
|
|
11732
|
-
light:
|
|
11733
|
-
dark:
|
|
11734
|
-
},
|
|
11789
|
+
light: mn,
|
|
11790
|
+
dark: pn
|
|
11791
|
+
}, vn = {
|
|
11735
11792
|
provider: "google",
|
|
11736
|
-
light:
|
|
11737
|
-
dark:
|
|
11738
|
-
},
|
|
11793
|
+
light: gn,
|
|
11794
|
+
dark: hn
|
|
11795
|
+
}, yn = (e, t) => ({
|
|
11739
11796
|
featureType: e,
|
|
11740
11797
|
elementType: t,
|
|
11741
11798
|
stylers: [{ visibility: "off" }]
|
|
11742
|
-
}),
|
|
11743
|
-
|
|
11744
|
-
|
|
11745
|
-
|
|
11746
|
-
],
|
|
11799
|
+
}), bn = [
|
|
11800
|
+
yn("poi", "labels"),
|
|
11801
|
+
yn("transit", "labels"),
|
|
11802
|
+
yn("road", "labels.icon")
|
|
11803
|
+
], xn = {
|
|
11747
11804
|
provider: "google",
|
|
11748
|
-
light:
|
|
11749
|
-
dark:
|
|
11750
|
-
},
|
|
11805
|
+
light: bn,
|
|
11806
|
+
dark: bn
|
|
11807
|
+
}, Sn = (e) => e === "google" ? xn : _n, Cn = (e, t, n) => {
|
|
11751
11808
|
let r = e.on(t, () => {
|
|
11752
11809
|
r(), n();
|
|
11753
11810
|
});
|
|
11754
11811
|
return r;
|
|
11755
|
-
},
|
|
11812
|
+
}, wn = {
|
|
11756
11813
|
center: [2.154, 41.39],
|
|
11757
11814
|
zoom: 11
|
|
11758
|
-
},
|
|
11815
|
+
}, Tn = (e, t, n, r) => [
|
|
11759
11816
|
...e.map((e) => e.coordinates),
|
|
11760
11817
|
...t.flatMap((e) => e.coordinates),
|
|
11761
11818
|
...n.flatMap((e) => [e.from, e.to]),
|
|
11762
|
-
...r.flatMap((e) =>
|
|
11763
|
-
],
|
|
11764
|
-
let l =
|
|
11819
|
+
...r.flatMap((e) => pe(e.center, e.radiusMeters))
|
|
11820
|
+
], En = (e) => e.top === 0 && e.right === 0 && e.bottom === 0 && e.left === 0, Dn = ({ adapter: e, points: t, animate: n, routes: r = [], arcs: i = [], areas: a = [], gutter: o = 64, inset: s, size: c }) => {
|
|
11821
|
+
let l = Tn(t, r, i, a);
|
|
11765
11822
|
if (l.length === 0) return;
|
|
11766
11823
|
let u = a.length > 0 ? 17 : 15;
|
|
11767
|
-
if (l.length > 1 &&
|
|
11824
|
+
if (l.length > 1 && En(s)) {
|
|
11768
11825
|
e.fitCoordinates(l, {
|
|
11769
11826
|
gutter: o,
|
|
11770
11827
|
maxZoom: u,
|
|
@@ -11773,9 +11830,9 @@ var Qt = {
|
|
|
11773
11830
|
return;
|
|
11774
11831
|
}
|
|
11775
11832
|
let d = l.length === 1 ? {
|
|
11776
|
-
center:
|
|
11833
|
+
center: H(e, l[0], s, 14),
|
|
11777
11834
|
zoom: 14
|
|
11778
|
-
} :
|
|
11835
|
+
} : le({
|
|
11779
11836
|
adapter: e,
|
|
11780
11837
|
coordinates: l,
|
|
11781
11838
|
inset: s,
|
|
@@ -11784,228 +11841,237 @@ var Qt = {
|
|
|
11784
11841
|
maxZoom: u
|
|
11785
11842
|
});
|
|
11786
11843
|
d && (n ? e.easeTo(d, { animate: n }) : e.jumpTo(d, { animate: n }));
|
|
11787
|
-
},
|
|
11788
|
-
let
|
|
11789
|
-
|
|
11790
|
-
}, [
|
|
11791
|
-
|
|
11792
|
-
Ie || ze.current || (ze.current = !0, console.warn(`F0Map: ignoring a "${S?.provider}" mapStyle on the "${
|
|
11844
|
+
}, On = (e) => `${e.top},${e.right},${e.bottom},${e.left}`, kn = j(function({ markers: e = [], routes: o = [], arcs: s = [], areas: c = [], onRouteClick: l, onArcClick: d, 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: ee, maxZoom: T = 18, showControls: E = !0, controlLabels: D, showCurrentLocation: te = !1, fullScreen: ne = !1, onSidebarToggle: O, sidebarExpanded: k = !1, sidebarToggleAddon: A, sidebarHeaderStart: j, sidebar: N, detail: I, detailOpen: L = !1, clearSelectionOnBackgroundClick: ae = !0, projection: ue = "mercator", provider: de, loading: fe = !1, ariaLabel: pe, dataTestId: me, className: he }, ge) {
|
|
11845
|
+
let _e = w ?? (ne ? "greedy" : "cooperative"), U = i(), W = t(de), ve = n(), ye = R(null), G = R(null), [K, be] = z(null), [q, xe] = z(!1), [Se, Ce] = z(!1), [we, Ee] = z(0), De = re(), J = u(), { containerRef: Oe, isDark: ke } = ln(), Ne = M((e) => {
|
|
11846
|
+
ye.current = e, Oe(e);
|
|
11847
|
+
}, [Oe]), Fe = ke, Ie = !S || S.provider === W, Le = Ie ? S ?? Sn(W) : Sn(W), Re = Fe ? Le.dark : Le.light, ze = R(!1);
|
|
11848
|
+
P(() => {
|
|
11849
|
+
Ie || ze.current || (ze.current = !0, console.warn(`F0Map: ignoring a "${S?.provider}" mapStyle on the "${W}" engine - the shapes are not interchangeable. Pass a "${W}" style, or none for its default look.`));
|
|
11793
11850
|
}, [
|
|
11794
11851
|
Ie,
|
|
11795
11852
|
S?.provider,
|
|
11796
|
-
|
|
11853
|
+
W
|
|
11797
11854
|
]);
|
|
11798
|
-
let [Be, Ve] =
|
|
11855
|
+
let [Be, Ve] = z(p), X = f === void 0 ? Be : f, He = M((e) => {
|
|
11799
11856
|
f === void 0 && Ve(e), m?.(e);
|
|
11800
|
-
}, [f, m]),
|
|
11801
|
-
|
|
11802
|
-
let
|
|
11803
|
-
|
|
11804
|
-
let
|
|
11805
|
-
|
|
11806
|
-
let
|
|
11807
|
-
|
|
11808
|
-
let
|
|
11809
|
-
|
|
11810
|
-
let
|
|
11811
|
-
|
|
11812
|
-
let
|
|
11813
|
-
|
|
11814
|
-
let
|
|
11815
|
-
|
|
11816
|
-
let
|
|
11817
|
-
|
|
11818
|
-
let
|
|
11857
|
+
}, [f, m]), Z = k && !!O, Ue = L && !!I, We = Z ? Y.inset + Y.listWidth + Y.gap : Y.inset, Ge = Z ? Y.inset : Y.inset + Y.toggleSize + Y.gap, Ke = Ue ? We + Y.detailWidth : Z ? Y.inset + Y.listWidth : null, qe = oe(v, { left: Ke === null ? 0 : Ke + Y.gap }), Q = R(e);
|
|
11858
|
+
Q.current = e;
|
|
11859
|
+
let Je = R(o);
|
|
11860
|
+
Je.current = o;
|
|
11861
|
+
let Ye = R(s);
|
|
11862
|
+
Ye.current = s;
|
|
11863
|
+
let Xe = R(c);
|
|
11864
|
+
Xe.current = c;
|
|
11865
|
+
let Ze = R(ue);
|
|
11866
|
+
Ze.current = ue;
|
|
11867
|
+
let Qe = R(He);
|
|
11868
|
+
Qe.current = He;
|
|
11869
|
+
let $e = R(X);
|
|
11870
|
+
$e.current = X;
|
|
11871
|
+
let et = R(qe);
|
|
11872
|
+
et.current = qe;
|
|
11873
|
+
let tt = R(ae);
|
|
11874
|
+
tt.current = ae;
|
|
11875
|
+
let nt = R(null), rt = b ?? x === void 0, $ = M(() => {
|
|
11819
11876
|
let e = {
|
|
11820
|
-
width:
|
|
11821
|
-
height:
|
|
11877
|
+
width: ye.current?.clientWidth ?? 0,
|
|
11878
|
+
height: ye.current?.clientHeight ?? 0
|
|
11822
11879
|
};
|
|
11823
11880
|
return {
|
|
11824
|
-
inset:
|
|
11881
|
+
inset: se(et.current, e),
|
|
11825
11882
|
size: e
|
|
11826
11883
|
};
|
|
11827
11884
|
}, []), it = M((e, t) => {
|
|
11828
|
-
|
|
11885
|
+
nt.current = { kind: "fit" }, Dn({
|
|
11829
11886
|
adapter: e,
|
|
11830
|
-
points:
|
|
11887
|
+
points: Q.current,
|
|
11831
11888
|
animate: t,
|
|
11832
|
-
routes:
|
|
11833
|
-
arcs:
|
|
11834
|
-
areas:
|
|
11889
|
+
routes: Je.current,
|
|
11890
|
+
arcs: Ye.current,
|
|
11891
|
+
areas: Xe.current,
|
|
11835
11892
|
...$()
|
|
11836
11893
|
});
|
|
11837
|
-
}, [$]), at =
|
|
11894
|
+
}, [$]), at = R(it);
|
|
11838
11895
|
at.current = it;
|
|
11839
11896
|
let ot = M((e, t) => {
|
|
11840
11897
|
let n = Math.max(e.getZoom(), 15);
|
|
11841
|
-
|
|
11898
|
+
nt.current = {
|
|
11842
11899
|
kind: "flight",
|
|
11843
11900
|
zoom: n
|
|
11844
11901
|
};
|
|
11845
11902
|
let { inset: r } = $();
|
|
11846
11903
|
e.easeTo({
|
|
11847
|
-
center:
|
|
11904
|
+
center: H(e, t.coordinates, r, n),
|
|
11848
11905
|
zoom: n
|
|
11849
|
-
}, { animate: !
|
|
11850
|
-
}, [$,
|
|
11851
|
-
let t =
|
|
11852
|
-
if (
|
|
11906
|
+
}, { animate: !J });
|
|
11907
|
+
}, [$, J]), st = M((e) => {
|
|
11908
|
+
let t = G.current, n = Q.current.find((t) => t.id === e);
|
|
11909
|
+
if (nt.current = null, y && t && n) {
|
|
11853
11910
|
let { inset: e } = $();
|
|
11854
|
-
t.easeTo({ center:
|
|
11911
|
+
t.easeTo({ center: H(t, n.coordinates, e) }, { animate: !J });
|
|
11855
11912
|
}
|
|
11856
|
-
|
|
11913
|
+
Qe.current(e);
|
|
11857
11914
|
}, [
|
|
11858
11915
|
y,
|
|
11859
11916
|
$,
|
|
11860
|
-
|
|
11861
|
-
]), ct =
|
|
11862
|
-
|
|
11917
|
+
J
|
|
11918
|
+
]), ct = R(!1);
|
|
11919
|
+
P(() => {
|
|
11863
11920
|
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.`));
|
|
11864
11921
|
}, [e.length]);
|
|
11865
|
-
let { coords:
|
|
11866
|
-
|
|
11867
|
-
}, []),
|
|
11868
|
-
|
|
11869
|
-
}, []),
|
|
11870
|
-
|
|
11871
|
-
}, [it,
|
|
11872
|
-
|
|
11873
|
-
let t =
|
|
11922
|
+
let { coords: lt, request: ut } = cn(te), dt = M(() => {
|
|
11923
|
+
nt.current = null, G.current?.zoomIn();
|
|
11924
|
+
}, []), ft = M(() => {
|
|
11925
|
+
nt.current = null, G.current?.zoomOut();
|
|
11926
|
+
}, []), pt = M(() => {
|
|
11927
|
+
G.current && it(G.current, !J);
|
|
11928
|
+
}, [it, J]), mt = M(() => {
|
|
11929
|
+
ut((e) => {
|
|
11930
|
+
let t = G.current;
|
|
11874
11931
|
if (!t) return;
|
|
11875
|
-
|
|
11932
|
+
nt.current = null;
|
|
11876
11933
|
let n = Math.max(t.getZoom(), 13), { inset: r } = $();
|
|
11877
11934
|
t.flyTo({
|
|
11878
|
-
center:
|
|
11935
|
+
center: H(t, e, r, n),
|
|
11879
11936
|
zoom: n
|
|
11880
|
-
}, { animate: !
|
|
11937
|
+
}, { animate: !J });
|
|
11881
11938
|
});
|
|
11882
11939
|
}, [
|
|
11883
|
-
|
|
11940
|
+
ut,
|
|
11884
11941
|
$,
|
|
11885
|
-
|
|
11886
|
-
]), _t = M((e) => {
|
|
11887
|
-
let t =
|
|
11942
|
+
J
|
|
11943
|
+
]), _t = Math.min(16, T), vt = M((e) => {
|
|
11944
|
+
let t = G.current;
|
|
11888
11945
|
if (!t) return;
|
|
11889
|
-
|
|
11890
|
-
let n =
|
|
11946
|
+
nt.current = null;
|
|
11947
|
+
let n = $(), r = le({
|
|
11891
11948
|
adapter: t,
|
|
11892
11949
|
coordinates: e,
|
|
11893
|
-
|
|
11950
|
+
...n,
|
|
11894
11951
|
gutter: 64,
|
|
11895
|
-
maxZoom:
|
|
11952
|
+
maxZoom: _t
|
|
11896
11953
|
});
|
|
11897
|
-
|
|
11898
|
-
|
|
11899
|
-
|
|
11900
|
-
|
|
11901
|
-
|
|
11902
|
-
|
|
11903
|
-
|
|
11954
|
+
if (!r) return;
|
|
11955
|
+
let i = Math.min(t.getZoom() + 1, _t), a = t.cameraForCoordinates(e, { gutter: 64 }), o = (r.zoom ?? 0) >= i || !a ? r : {
|
|
11956
|
+
center: H(t, a.center, n.inset, i),
|
|
11957
|
+
zoom: i
|
|
11958
|
+
};
|
|
11959
|
+
J ? t.jumpTo(o, { animate: !1 }) : t.flyTo(o);
|
|
11960
|
+
}, [
|
|
11961
|
+
$,
|
|
11962
|
+
J,
|
|
11963
|
+
_t
|
|
11964
|
+
]), yt = M((e) => {
|
|
11965
|
+
let t = G.current, n = Q.current.find((t) => t.id === e);
|
|
11966
|
+
t && n && ot(t, n), He(e);
|
|
11967
|
+
}, [ot, He]);
|
|
11968
|
+
P(() => {
|
|
11969
|
+
if (!Ue || X === null) return;
|
|
11904
11970
|
let e = (e) => {
|
|
11905
|
-
e.key !== "Escape" || e.defaultPrevented || (e.preventDefault(),
|
|
11906
|
-
}, t =
|
|
11971
|
+
e.key !== "Escape" || e.defaultPrevented || (e.preventDefault(), Qe.current(null));
|
|
11972
|
+
}, t = ye.current?.ownerDocument ?? document;
|
|
11907
11973
|
return t.addEventListener("keydown", e), () => t.removeEventListener("keydown", e);
|
|
11908
|
-
}, [
|
|
11909
|
-
getNativeMap: () =>
|
|
11974
|
+
}, [Ue, X]), F(ge, () => ({
|
|
11975
|
+
getNativeMap: () => G.current?.native() ?? null,
|
|
11910
11976
|
focusMarker: (e) => {
|
|
11911
|
-
let t =
|
|
11912
|
-
t && n && (ot(t, n),
|
|
11977
|
+
let t = G.current, n = Q.current.find((t) => t.id === e);
|
|
11978
|
+
t && n && (ot(t, n), Qe.current(e));
|
|
11913
11979
|
},
|
|
11914
11980
|
fitToMarkers: () => {
|
|
11915
|
-
|
|
11981
|
+
G.current && it(G.current, !J);
|
|
11916
11982
|
},
|
|
11917
|
-
clearSelection: () =>
|
|
11983
|
+
clearSelection: () => Qe.current(null)
|
|
11918
11984
|
}), [
|
|
11919
11985
|
it,
|
|
11920
11986
|
ot,
|
|
11921
|
-
|
|
11987
|
+
J
|
|
11922
11988
|
]);
|
|
11923
|
-
let
|
|
11924
|
-
|
|
11925
|
-
let
|
|
11926
|
-
|
|
11927
|
-
let
|
|
11928
|
-
|
|
11929
|
-
if (
|
|
11930
|
-
let e =
|
|
11989
|
+
let bt = R(Re);
|
|
11990
|
+
bt.current = Re;
|
|
11991
|
+
let xt = R(ve);
|
|
11992
|
+
xt.current = ve;
|
|
11993
|
+
let St = R(null), Ct = R(x ?? wn);
|
|
11994
|
+
P(() => {
|
|
11995
|
+
if (fe) return;
|
|
11996
|
+
let e = ye.current;
|
|
11931
11997
|
if (!e) return;
|
|
11932
|
-
|
|
11933
|
-
let t =
|
|
11934
|
-
return
|
|
11998
|
+
St.current = bt.current;
|
|
11999
|
+
let t = Ct.current, n = null, r = !1, i = [];
|
|
12000
|
+
return fn(W, xt.current).then((i) => {
|
|
11935
12001
|
if (!r) {
|
|
11936
12002
|
try {
|
|
11937
12003
|
n = i({
|
|
11938
12004
|
container: e,
|
|
11939
|
-
style:
|
|
12005
|
+
style: bt.current,
|
|
11940
12006
|
center: t.center,
|
|
11941
|
-
zoom: t.zoom ??
|
|
12007
|
+
zoom: t.zoom ?? wn.zoom,
|
|
11942
12008
|
minZoom: ee,
|
|
11943
12009
|
maxZoom: T,
|
|
11944
12010
|
interactive: C,
|
|
11945
|
-
cooperativeGestures:
|
|
12011
|
+
cooperativeGestures: _e === "cooperative"
|
|
11946
12012
|
});
|
|
11947
12013
|
} catch {
|
|
11948
|
-
|
|
12014
|
+
xe(!0);
|
|
11949
12015
|
return;
|
|
11950
12016
|
}
|
|
11951
12017
|
a(n);
|
|
11952
12018
|
}
|
|
11953
12019
|
}).catch((e) => {
|
|
11954
|
-
console.error("[F0Map] could not load the map engine", e), r ||
|
|
12020
|
+
console.error("[F0Map] could not load the map engine", e), r || Ce(!0);
|
|
11955
12021
|
}), () => {
|
|
11956
|
-
r = !0, i.forEach((e) => e()), n && (
|
|
12022
|
+
r = !0, i.forEach((e) => e()), n && (G.current = null, be(null), n.destroy());
|
|
11957
12023
|
};
|
|
11958
12024
|
function a(e) {
|
|
11959
|
-
|
|
12025
|
+
G.current = e, be(e), xe(!1);
|
|
11960
12026
|
let t = !1;
|
|
11961
|
-
i.push(
|
|
11962
|
-
t = !0,
|
|
12027
|
+
i.push(Cn(e, "ready", () => {
|
|
12028
|
+
t = !0, Ce(!1), e.resize(), rt && Dn({
|
|
11963
12029
|
adapter: e,
|
|
11964
|
-
points:
|
|
12030
|
+
points: Q.current,
|
|
11965
12031
|
animate: !1,
|
|
11966
|
-
routes:
|
|
11967
|
-
arcs:
|
|
11968
|
-
areas:
|
|
12032
|
+
routes: Je.current,
|
|
12033
|
+
arcs: Ye.current,
|
|
12034
|
+
areas: Xe.current,
|
|
11969
12035
|
...$()
|
|
11970
|
-
}), e.setGlobeProjection(
|
|
12036
|
+
}), e.setGlobeProjection(Ze.current === "globe");
|
|
11971
12037
|
}), e.on("error", () => {
|
|
11972
|
-
t ||
|
|
12038
|
+
t || Ce(!0);
|
|
11973
12039
|
}), e.on("click", () => {
|
|
11974
|
-
|
|
12040
|
+
tt.current && Qe.current(null);
|
|
11975
12041
|
}));
|
|
11976
12042
|
}
|
|
11977
12043
|
}, [
|
|
11978
|
-
|
|
12044
|
+
fe,
|
|
11979
12045
|
C,
|
|
11980
|
-
|
|
12046
|
+
_e,
|
|
11981
12047
|
ee,
|
|
11982
12048
|
T,
|
|
11983
12049
|
rt,
|
|
11984
|
-
|
|
11985
|
-
|
|
11986
|
-
]),
|
|
11987
|
-
let e =
|
|
11988
|
-
e &&
|
|
11989
|
-
}, [Re]),
|
|
11990
|
-
|
|
11991
|
-
}, [
|
|
11992
|
-
let
|
|
11993
|
-
|
|
12050
|
+
W,
|
|
12051
|
+
we
|
|
12052
|
+
]), P(() => {
|
|
12053
|
+
let e = G.current;
|
|
12054
|
+
e && St.current !== Re && (St.current = Re, e.applyStyle(Re), Cn(e, "styled", () => e.setGlobeProjection(Ze.current === "globe")));
|
|
12055
|
+
}, [Re]), P(() => {
|
|
12056
|
+
G.current?.setGlobeProjection(ue === "globe");
|
|
12057
|
+
}, [ue]);
|
|
12058
|
+
let wt = R(ot);
|
|
12059
|
+
wt.current = ot, P(() => {
|
|
11994
12060
|
if (!_) return;
|
|
11995
|
-
let e =
|
|
11996
|
-
e && t &&
|
|
12061
|
+
let e = G.current, t = Q.current.find((e) => e.id === _);
|
|
12062
|
+
e && t && wt.current(e, t);
|
|
11997
12063
|
}, [_]);
|
|
11998
|
-
let
|
|
11999
|
-
|
|
12000
|
-
let e =
|
|
12001
|
-
|
|
12002
|
-
let t =
|
|
12064
|
+
let Tt = On(qe), Et = R(null);
|
|
12065
|
+
P(() => {
|
|
12066
|
+
let e = Et.current;
|
|
12067
|
+
Et.current = et.current;
|
|
12068
|
+
let t = G.current;
|
|
12003
12069
|
if (!e || !t) return;
|
|
12004
|
-
let { inset: n, size: r } = $(), i =
|
|
12070
|
+
let { inset: n, size: r } = $(), i = nt.current, a = !J, o = Q.current.find((e) => e.id === $e.current);
|
|
12005
12071
|
if (o) {
|
|
12006
12072
|
let e = i?.kind === "flight" ? i.zoom : void 0;
|
|
12007
12073
|
t.easeTo({
|
|
12008
|
-
center:
|
|
12074
|
+
center: H(t, o.coordinates, n, e),
|
|
12009
12075
|
zoom: e
|
|
12010
12076
|
}, { animate: a });
|
|
12011
12077
|
return;
|
|
@@ -12014,153 +12080,154 @@ var Qt = {
|
|
|
12014
12080
|
at.current(t, a);
|
|
12015
12081
|
return;
|
|
12016
12082
|
}
|
|
12017
|
-
let s =
|
|
12083
|
+
let s = ce(se(e, r)), c = ce(n), l = t.project(t.getCenter()), u = l && t.unproject({
|
|
12018
12084
|
x: l.x + s.x - c.x,
|
|
12019
12085
|
y: l.y + s.y - c.y
|
|
12020
12086
|
});
|
|
12021
12087
|
u && t.easeTo({ center: u }, { animate: a });
|
|
12022
|
-
}, [
|
|
12023
|
-
let
|
|
12024
|
-
from:
|
|
12025
|
-
to:
|
|
12088
|
+
}, [Tt, $]);
|
|
12089
|
+
let Dt = o.length > 0 || s.length > 0, Ot = Ke === null ? 0 : Ke + Y.gap - Y.inset, kt = R({
|
|
12090
|
+
from: Ot,
|
|
12091
|
+
to: Ot
|
|
12026
12092
|
});
|
|
12027
|
-
|
|
12028
|
-
from:
|
|
12029
|
-
to:
|
|
12093
|
+
kt.current.to !== Ot && (kt.current = {
|
|
12094
|
+
from: kt.current.to,
|
|
12095
|
+
to: Ot
|
|
12030
12096
|
});
|
|
12031
|
-
let
|
|
12032
|
-
return /* @__PURE__ */
|
|
12033
|
-
dataTestId:
|
|
12034
|
-
children:
|
|
12035
|
-
ref:
|
|
12097
|
+
let At = Ot > kt.current.from ? Ae.enter : Ae.exit, jt = Z ? Ae.enter : Ae.exit;
|
|
12098
|
+
return /* @__PURE__ */ B(r, {
|
|
12099
|
+
dataTestId: me,
|
|
12100
|
+
children: fe ? /* @__PURE__ */ B(sn, { className: he }) : /* @__PURE__ */ V("div", {
|
|
12101
|
+
ref: Ne,
|
|
12036
12102
|
role: "region",
|
|
12037
|
-
"aria-label":
|
|
12038
|
-
className: a("f0-map relative h-full w-full overflow-hidden", Fe && "dark", !
|
|
12103
|
+
"aria-label": pe ?? U.map.region,
|
|
12104
|
+
className: a("f0-map relative h-full w-full overflow-hidden", Fe && "dark", !ne && "rounded-2xl border border-solid border-f1-border-secondary", he),
|
|
12039
12105
|
children: [
|
|
12040
|
-
/* @__PURE__ */
|
|
12041
|
-
href: `#${
|
|
12106
|
+
/* @__PURE__ */ B("a", {
|
|
12107
|
+
href: `#${De}`,
|
|
12042
12108
|
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",
|
|
12043
|
-
children:
|
|
12109
|
+
children: U.map.skipToList
|
|
12044
12110
|
}),
|
|
12045
|
-
/* @__PURE__ */
|
|
12111
|
+
/* @__PURE__ */ B("div", {
|
|
12046
12112
|
role: "status",
|
|
12047
12113
|
"aria-live": "polite",
|
|
12048
12114
|
className: "sr-only",
|
|
12049
|
-
children: `${e.length} ${e.length === 1 ?
|
|
12115
|
+
children: `${e.length} ${e.length === 1 ? U.map.location : U.map.locations}`
|
|
12050
12116
|
}),
|
|
12051
|
-
!
|
|
12052
|
-
adapter:
|
|
12117
|
+
!q && K && c.length > 0 ? /* @__PURE__ */ B(Te, {
|
|
12118
|
+
adapter: K,
|
|
12053
12119
|
areas: c,
|
|
12054
12120
|
isDark: Fe
|
|
12055
12121
|
}) : null,
|
|
12056
|
-
!
|
|
12057
|
-
adapter:
|
|
12058
|
-
coords:
|
|
12059
|
-
}), /* @__PURE__ */
|
|
12122
|
+
!q && K && lt ? /* @__PURE__ */ V(ie, { children: [/* @__PURE__ */ B(rn, {
|
|
12123
|
+
adapter: K,
|
|
12124
|
+
coords: lt
|
|
12125
|
+
}), /* @__PURE__ */ B("span", {
|
|
12060
12126
|
className: "sr-only",
|
|
12061
|
-
children:
|
|
12127
|
+
children: U.map.currentLocation
|
|
12062
12128
|
})] }) : null,
|
|
12063
|
-
!
|
|
12064
|
-
adapter:
|
|
12129
|
+
!q && K && Dt ? /* @__PURE__ */ B(nn, {
|
|
12130
|
+
adapter: K,
|
|
12065
12131
|
routes: o,
|
|
12066
12132
|
arcs: s,
|
|
12067
12133
|
isDark: Fe,
|
|
12068
12134
|
onRouteClick: l,
|
|
12069
12135
|
onArcClick: d
|
|
12070
12136
|
}) : null,
|
|
12071
|
-
!
|
|
12072
|
-
adapter:
|
|
12137
|
+
!q && K && e.length > 0 ? /* @__PURE__ */ B(ht, {
|
|
12138
|
+
adapter: K,
|
|
12073
12139
|
points: e,
|
|
12074
|
-
selectedId:
|
|
12140
|
+
selectedId: X,
|
|
12075
12141
|
highlightedId: _,
|
|
12076
12142
|
onSelect: st,
|
|
12077
12143
|
onMarkerDrag: h,
|
|
12078
12144
|
onMarkerDragEnd: g,
|
|
12079
|
-
onClusterExpand:
|
|
12145
|
+
onClusterExpand: vt,
|
|
12146
|
+
expandZoom: _t
|
|
12080
12147
|
}) : null,
|
|
12081
|
-
!
|
|
12082
|
-
open:
|
|
12083
|
-
offsetX:
|
|
12084
|
-
offsetY:
|
|
12085
|
-
width:
|
|
12148
|
+
!q && K && I ? /* @__PURE__ */ B(gt, {
|
|
12149
|
+
open: Ue,
|
|
12150
|
+
offsetX: We,
|
|
12151
|
+
offsetY: Ge,
|
|
12152
|
+
width: Y.detailWidth,
|
|
12086
12153
|
entrance: "grow",
|
|
12087
|
-
ariaLabel:
|
|
12088
|
-
children:
|
|
12154
|
+
ariaLabel: U.map.detailPanel,
|
|
12155
|
+
children: I
|
|
12089
12156
|
}) : null,
|
|
12090
|
-
!
|
|
12091
|
-
className: a("absolute left-2 top-2 z-10",
|
|
12157
|
+
!q && K && O ? /* @__PURE__ */ B("div", {
|
|
12158
|
+
className: a("absolute left-2 top-2 z-10", Z && "opacity-0"),
|
|
12092
12159
|
style: {
|
|
12093
|
-
transitionProperty:
|
|
12094
|
-
transitionDuration:
|
|
12095
|
-
transitionTimingFunction:
|
|
12160
|
+
transitionProperty: J ? "none" : "opacity",
|
|
12161
|
+
transitionDuration: jt.duration,
|
|
12162
|
+
transitionTimingFunction: jt.easing
|
|
12096
12163
|
},
|
|
12097
|
-
children: /* @__PURE__ */
|
|
12164
|
+
children: /* @__PURE__ */ V("div", {
|
|
12098
12165
|
className: "flex items-start gap-2",
|
|
12099
|
-
"aria-hidden":
|
|
12166
|
+
"aria-hidden": Z || void 0,
|
|
12100
12167
|
ref: (e) => {
|
|
12101
|
-
|
|
12168
|
+
Z ? e?.setAttribute("inert", "") : e?.removeAttribute("inert");
|
|
12102
12169
|
},
|
|
12103
|
-
children: [/* @__PURE__ */
|
|
12170
|
+
children: [/* @__PURE__ */ B(Zt, {
|
|
12104
12171
|
expanded: !1,
|
|
12105
|
-
onToggle:
|
|
12106
|
-
}),
|
|
12172
|
+
onToggle: O
|
|
12173
|
+
}), A ? /* @__PURE__ */ B(je, { children: A }) : null]
|
|
12107
12174
|
})
|
|
12108
12175
|
}) : null,
|
|
12109
|
-
!
|
|
12110
|
-
open:
|
|
12111
|
-
offsetX:
|
|
12112
|
-
width:
|
|
12113
|
-
headerStart:
|
|
12114
|
-
headerEnd: /* @__PURE__ */
|
|
12176
|
+
!q && K && O ? /* @__PURE__ */ B(gt, {
|
|
12177
|
+
open: Z,
|
|
12178
|
+
offsetX: Y.inset,
|
|
12179
|
+
width: Y.listWidth,
|
|
12180
|
+
headerStart: j,
|
|
12181
|
+
headerEnd: /* @__PURE__ */ B(Zt, {
|
|
12115
12182
|
expanded: !0,
|
|
12116
|
-
onToggle:
|
|
12183
|
+
onToggle: O,
|
|
12117
12184
|
bare: !0,
|
|
12118
12185
|
dataTestId: "map-panel-toggle-open"
|
|
12119
12186
|
}),
|
|
12120
|
-
children:
|
|
12187
|
+
children: N
|
|
12121
12188
|
}) : null,
|
|
12122
|
-
!
|
|
12123
|
-
className: a("absolute left-2 z-10",
|
|
12189
|
+
!q && K && E && C ? /* @__PURE__ */ B("div", {
|
|
12190
|
+
className: a("absolute left-2 z-10", W === "google" ? "bottom-8" : "bottom-2"),
|
|
12124
12191
|
style: {
|
|
12125
|
-
transform: `translateX(${
|
|
12126
|
-
transitionProperty:
|
|
12127
|
-
transitionDuration:
|
|
12128
|
-
transitionTimingFunction:
|
|
12192
|
+
transform: `translateX(${Ot}px)`,
|
|
12193
|
+
transitionProperty: J ? "none" : "transform",
|
|
12194
|
+
transitionDuration: At.duration,
|
|
12195
|
+
transitionTimingFunction: At.easing
|
|
12129
12196
|
},
|
|
12130
|
-
children: /* @__PURE__ */
|
|
12131
|
-
onZoomIn:
|
|
12132
|
-
onZoomOut:
|
|
12133
|
-
onFit: e.length > 0 ||
|
|
12134
|
-
onLocate:
|
|
12135
|
-
labels:
|
|
12197
|
+
children: /* @__PURE__ */ B(Me, {
|
|
12198
|
+
onZoomIn: dt,
|
|
12199
|
+
onZoomOut: ft,
|
|
12200
|
+
onFit: e.length > 0 || Dt || c.length > 0 ? pt : void 0,
|
|
12201
|
+
onLocate: mt,
|
|
12202
|
+
labels: D
|
|
12136
12203
|
})
|
|
12137
12204
|
}) : null,
|
|
12138
|
-
|
|
12205
|
+
Se && !q ? /* @__PURE__ */ V("div", {
|
|
12139
12206
|
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",
|
|
12140
|
-
children: [/* @__PURE__ */
|
|
12207
|
+
children: [/* @__PURE__ */ B("span", { children: U.map.loadError }), /* @__PURE__ */ B("button", {
|
|
12141
12208
|
type: "button",
|
|
12142
12209
|
onClick: () => {
|
|
12143
|
-
|
|
12144
|
-
let e =
|
|
12145
|
-
e ? e.applyStyle(
|
|
12210
|
+
Ce(!1);
|
|
12211
|
+
let e = G.current;
|
|
12212
|
+
e ? e.applyStyle(bt.current) : Ee((e) => e + 1);
|
|
12146
12213
|
},
|
|
12147
12214
|
className: "font-medium underline",
|
|
12148
|
-
children:
|
|
12215
|
+
children: U.map.retry
|
|
12149
12216
|
})]
|
|
12150
12217
|
}) : null,
|
|
12151
|
-
/* @__PURE__ */
|
|
12152
|
-
id:
|
|
12153
|
-
label:
|
|
12218
|
+
/* @__PURE__ */ B(Pe, {
|
|
12219
|
+
id: De,
|
|
12220
|
+
label: U.map.listLabel,
|
|
12154
12221
|
points: e,
|
|
12155
|
-
selectedId:
|
|
12156
|
-
onSelect:
|
|
12157
|
-
visible:
|
|
12222
|
+
selectedId: X,
|
|
12223
|
+
onSelect: yt,
|
|
12224
|
+
visible: q
|
|
12158
12225
|
})
|
|
12159
12226
|
]
|
|
12160
12227
|
})
|
|
12161
12228
|
});
|
|
12162
12229
|
});
|
|
12163
|
-
|
|
12164
|
-
var
|
|
12230
|
+
kn.displayName = "F0Map";
|
|
12231
|
+
var An = kn;
|
|
12165
12232
|
//#endregion
|
|
12166
|
-
export {
|
|
12233
|
+
export { wt as _, xn as a, Pe as b, on as c, Jt as d, Ht as f, Dt as g, zt as h, vn as i, Zt as l, It as m, Sn as n, sn as o, Rt as p, _n as r, an as s, An as t, Xt as u, gt as v, Me as x, Je as y };
|