@factorialco/f0-react 16.16.0 → 16.17.1
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-BGrUEFW6.js → ArchiveThumbnail-CAzO9emN.js} +1 -1
- package/dist/{ArchiveViewer-DLj2GP7S.js → ArchiveViewer-BkqvVOz0.js} +2 -2
- package/dist/{ChatPostComposerDialog-rrK3A0-M.js → ChatPostComposerDialog-Cl7UiCec.js} +2 -2
- package/dist/{CoachmarkProvider-CFD6rQHM.js → CoachmarkProvider-CVvKOMks.js} +14200 -14200
- package/dist/{CodeThumbnail-CX5BJQ0p.js → CodeThumbnail-D-gb6TUF.js} +1 -1
- package/dist/{CodeViewer-DAJFjwLS.js → CodeViewer-SI7TC_K2.js} +5 -5
- package/dist/{DocumentToolbar-D4Auk27r.js → DocumentToolbar-DGyD9SN0.js} +1 -1
- package/dist/{DocxViewer-Bdf-VLsp.js → DocxViewer-kDcXxo0v.js} +1 -1
- package/dist/{F0AiProcessingOverlay-Bl3wsErS.js → F0AiProcessingOverlay-OhgXIPB4.js} +1275 -1275
- package/dist/{F0Alert-gumBhGUI.js → F0Alert-TC2esFmC.js} +1 -1
- package/dist/F0AudioPlayer-GshtwrMI.js +2 -0
- package/dist/{F0CanvasPanel-DZDN_8N-.js → F0CanvasPanel-CwuS7Fc_.js} +3908 -3908
- package/dist/{F0DocumentViewer-HzA7GnQg.js → F0DocumentViewer-CNQvQsnx.js} +1 -1
- package/dist/{F0DocumentViewer-CXedsRTN.js → F0DocumentViewer-DIFsg5pY.js} +2 -2
- package/dist/{F0Map-CV43Bw0H.js → F0Map-DCdwhVeF.js} +439 -439
- package/dist/{F0VideoPlayer-BSI5JL0i.js → F0VideoPlayer-CfY8KJ7I.js} +72 -72
- package/dist/F0VideoPlayer-HzLnLN2W.js +1 -0
- package/dist/{HtmlViewer-BNS3kuVG.js → HtmlViewer-DRfrtuKN.js} +3 -3
- package/dist/{Map-C6YOZxRE.js → Map-DS3oUWbK.js} +5 -5
- package/dist/{PdfThumbnail-B3xLjRLZ.js → PdfThumbnail-Ue08FfiS.js} +1 -1
- package/dist/{PdfViewer-BgMp7MCk.js → PdfViewer-V3C2gmbs.js} +4 -4
- package/dist/{SheetViewer-6EaMzQRl.js → SheetViewer-ByBIMFf1.js} +11 -11
- package/dist/{TextViewer-BX79baRv.js → TextViewer-CR4-k8HR.js} +1 -1
- package/dist/ai.js +3 -3
- package/dist/component-status.js +1 -1
- package/dist/experimental.js +945 -935
- package/dist/f0.js +170 -170
- package/dist/{highlight-DO8gPTSC.js → highlight-D7BcbXP5.js} +6 -6
- package/dist/{maplibre-ifBRwrCX.js → maplibre-BjtWSbUZ.js} +1 -1
- package/dist/{pdfWorker-DdSJgmMr.js → pdfWorker-csDGfjpV.js} +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/dist/F0AudioPlayer-CGelgsq6.js +0 -2
- package/dist/F0VideoPlayer-BDY4HZ5r.js +0 -1
|
@@ -1,21 +1,21 @@
|
|
|
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-CVvKOMks.js";
|
|
2
2
|
import { i as r, r as i } from "./i18n-provider-B3-kjPXK.js";
|
|
3
3
|
import { L as a, R as o } from "./tooltip-NXXT56H4.js";
|
|
4
4
|
import { D as s, G as c, K as l, Y as u, h as d, t as f, x as p } from "./F0Button-BPjCHo83.js";
|
|
5
|
-
import {
|
|
6
|
-
import { t as
|
|
7
|
-
import { N as
|
|
8
|
-
import { n as
|
|
9
|
-
import { createContext as
|
|
10
|
-
import { Fragment as
|
|
11
|
-
import { createPortal as
|
|
5
|
+
import { Ms as m, Uc as h, cc as g, m as _, r as v, rn as y, sl as b } from "./F0CanvasPanel-CwuS7Fc_.js";
|
|
6
|
+
import { t as x } from "./F0Icon-BWIoBqUz.js";
|
|
7
|
+
import { N as S, T as C, U as w, p as T, z as E } from "./useData-0FR__MaY.js";
|
|
8
|
+
import { n as D, o as ee, s as O, t as k } from "./dist-BCNVh6y5.js";
|
|
9
|
+
import { createContext as A, forwardRef as j, useCallback as M, useContext as te, useEffect as N, useId as ne, useImperativeHandle as re, useLayoutEffect as ie, useMemo as P, useRef as F, useState as I } from "react";
|
|
10
|
+
import { Fragment as ae, jsx as L, jsxs as R } from "react/jsx-runtime";
|
|
11
|
+
import { createPortal as oe } from "react-dom";
|
|
12
12
|
//#region src/addons/map/F0Map/camera.ts
|
|
13
|
-
var
|
|
13
|
+
var se = (e, t) => ({
|
|
14
14
|
top: Math.max(e?.top ?? 0, t?.top ?? 0),
|
|
15
15
|
right: Math.max(e?.right ?? 0, t?.right ?? 0),
|
|
16
16
|
bottom: Math.max(e?.bottom ?? 0, t?.bottom ?? 0),
|
|
17
17
|
left: Math.max(e?.left ?? 0, t?.left ?? 0)
|
|
18
|
-
}),
|
|
18
|
+
}), ce = (e, { width: t, height: n }) => {
|
|
19
19
|
let r = t > 0 && e.left + e.right >= t, i = n > 0 && e.top + e.bottom >= n;
|
|
20
20
|
return {
|
|
21
21
|
top: i ? 0 : e.top,
|
|
@@ -23,11 +23,11 @@ var oe = (e, t) => ({
|
|
|
23
23
|
left: r ? 0 : e.left,
|
|
24
24
|
right: r ? 0 : e.right
|
|
25
25
|
};
|
|
26
|
-
},
|
|
26
|
+
}, le = (e) => ({
|
|
27
27
|
x: (e.left - e.right) / 2,
|
|
28
28
|
y: (e.top - e.bottom) / 2
|
|
29
|
-
}),
|
|
30
|
-
let i =
|
|
29
|
+
}), z = (e, t, n, r = e.getZoom()) => {
|
|
30
|
+
let i = le(n), a = e.project(t);
|
|
31
31
|
if (!a || i.x === 0 && i.y === 0) return t;
|
|
32
32
|
let o = 2 ** (e.getZoom() - r);
|
|
33
33
|
return e.unproject({
|
|
@@ -44,7 +44,7 @@ var oe = (e, t) => ({
|
|
|
44
44
|
};
|
|
45
45
|
let u = Math.min(l + Math.log2(c), a);
|
|
46
46
|
return {
|
|
47
|
-
center:
|
|
47
|
+
center: z(e, o.center, n, u),
|
|
48
48
|
zoom: u
|
|
49
49
|
};
|
|
50
50
|
}, de = 6371008.8, fe = (e) => e * Math.PI / 180, pe = (e) => e * 180 / Math.PI, me = (e, t, n = 64) => {
|
|
@@ -73,14 +73,14 @@ var oe = (e, t) => ({
|
|
|
73
73
|
"smoke",
|
|
74
74
|
"barbie"
|
|
75
75
|
].filter((e) => e !== "neutral" && e !== "grey"), ge = {
|
|
76
|
-
neutral:
|
|
77
|
-
grey:
|
|
78
|
-
...Object.fromEntries(he.map((e) => [e,
|
|
76
|
+
neutral: k.grey[100],
|
|
77
|
+
grey: k.grey.solid[50],
|
|
78
|
+
...Object.fromEntries(he.map((e) => [e, k[e][50]]))
|
|
79
79
|
}, _e = (e) => `hsl(${ge[e]})`, ve = {
|
|
80
|
-
neutral:
|
|
80
|
+
neutral: k.grey[100],
|
|
81
81
|
grey: "218 14% 30%",
|
|
82
|
-
...Object.fromEntries(he.map((e) => [e,
|
|
83
|
-
}, ye = (e, t) => t ? ve[e] : ge[e], be =
|
|
82
|
+
...Object.fromEntries(he.map((e) => [e, k[e][70]]))
|
|
83
|
+
}, ye = (e, t) => t ? ve[e] : ge[e], be = k.grey[100], B = {
|
|
84
84
|
sm: {
|
|
85
85
|
d: 16,
|
|
86
86
|
border: 1.5,
|
|
@@ -141,27 +141,27 @@ var oe = (e, t) => ({
|
|
|
141
141
|
icon: "lg",
|
|
142
142
|
avatar: "lg"
|
|
143
143
|
}
|
|
144
|
-
},
|
|
145
|
-
let e =
|
|
146
|
-
return -(e.d - e.caretOverlap + e.caretH +
|
|
147
|
-
},
|
|
148
|
-
let { size: i = "md", selected: s = !1, collapsed: c = !1, label: d, showLabel: f = !0, labelPlacement: p = "right", onClick: m, ariaLabel: h, presentational: g = !1, dataTestId: _, className: v } = t, y = t.variant ?? "color",
|
|
144
|
+
}, V = (e) => B[e], xe = 5.6, Se = 1.5, H = () => {
|
|
145
|
+
let e = B.xl;
|
|
146
|
+
return -(e.d - e.caretOverlap + e.caretH + xe + Se) + 3;
|
|
147
|
+
}, U = "hsl(var(--white-100))", Ce = j(function(t, n) {
|
|
148
|
+
let { size: i = "md", selected: s = !1, collapsed: c = !1, label: d, showLabel: f = !0, labelPlacement: p = "right", onClick: m, ariaLabel: h, presentational: g = !1, dataTestId: _, className: v } = t, y = t.variant ?? "color", b = B[s ? "xl" : i], S = !!m, w = y === "color" || y === "icon" || y === "letter", E = y === "person" && "firstName" in t ? t.firstName + t.lastName : (y === "team" || y === "company") && "name" in t ? t.name : null, D = w ? t.color ?? "radical" : E ? y === "person" && "src" in t && t.src ? "grey" : C(E) ?? "grey" : "neutral", ee = e(), O = s ? 32 : {
|
|
149
149
|
xs: 12,
|
|
150
150
|
sm: 16,
|
|
151
151
|
md: 20,
|
|
152
152
|
lg: 24
|
|
153
|
-
}[
|
|
153
|
+
}[b.icon], k = {
|
|
154
154
|
xs: 20,
|
|
155
155
|
sm: 24,
|
|
156
156
|
md: 32,
|
|
157
157
|
lg: 40
|
|
158
|
-
}, A =
|
|
158
|
+
}, A = B[i].avatar, j = s ? k[b.avatar] / k[A] : 1, M = (e) => /* @__PURE__ */ L("span", {
|
|
159
159
|
className: "flex shrink-0 items-center justify-center transition-transform duration-200 ease-out",
|
|
160
160
|
style: { transform: `scale(${j})` },
|
|
161
161
|
children: e
|
|
162
|
-
}),
|
|
162
|
+
}), te = y === "color" ? null : y === "icon" && "icon" in t ? /* @__PURE__ */ L(x, {
|
|
163
163
|
icon: t.icon,
|
|
164
|
-
size:
|
|
164
|
+
size: b.icon,
|
|
165
165
|
color: "#ffffff",
|
|
166
166
|
style: {
|
|
167
167
|
width: O,
|
|
@@ -172,12 +172,12 @@ var oe = (e, t) => ({
|
|
|
172
172
|
"aria-hidden": !0,
|
|
173
173
|
className: "font-semibold leading-none",
|
|
174
174
|
style: {
|
|
175
|
-
color:
|
|
175
|
+
color: U,
|
|
176
176
|
fontSize: Math.round(O * .78),
|
|
177
177
|
transition: "font-size 200ms ease-out"
|
|
178
178
|
},
|
|
179
179
|
children: t.letter.charAt(0).toUpperCase()
|
|
180
|
-
}) : y === "person" && "firstName" in t ? M(/* @__PURE__ */ L(
|
|
180
|
+
}) : y === "person" && "firstName" in t ? M(/* @__PURE__ */ L(T, {
|
|
181
181
|
avatar: {
|
|
182
182
|
type: "person",
|
|
183
183
|
firstName: t.firstName,
|
|
@@ -185,14 +185,14 @@ var oe = (e, t) => ({
|
|
|
185
185
|
src: t.src
|
|
186
186
|
},
|
|
187
187
|
size: A
|
|
188
|
-
})) : y === "team" && "name" in t ? M(/* @__PURE__ */ L(
|
|
188
|
+
})) : y === "team" && "name" in t ? M(/* @__PURE__ */ L(T, {
|
|
189
189
|
avatar: {
|
|
190
190
|
type: "team",
|
|
191
191
|
name: t.name,
|
|
192
192
|
src: t.src
|
|
193
193
|
},
|
|
194
194
|
size: A
|
|
195
|
-
})) : y === "company" && "name" in t ? M(/* @__PURE__ */ L(
|
|
195
|
+
})) : y === "company" && "name" in t ? M(/* @__PURE__ */ L(T, {
|
|
196
196
|
avatar: {
|
|
197
197
|
type: "company",
|
|
198
198
|
name: t.name,
|
|
@@ -203,34 +203,34 @@ var oe = (e, t) => ({
|
|
|
203
203
|
src: t.src,
|
|
204
204
|
alt: "alt" in t ? t.alt ?? "" : "",
|
|
205
205
|
className: "h-full w-full object-cover"
|
|
206
|
-
}) : null,
|
|
206
|
+
}) : null, N = y === "team" || y === "company" || y === "icon", ne = /* @__PURE__ */ L("span", {
|
|
207
207
|
className: "relative z-[1] flex shrink-0 items-center justify-center overflow-hidden border-solid transition-all duration-200 ease-out",
|
|
208
208
|
style: {
|
|
209
|
-
width:
|
|
210
|
-
height:
|
|
211
|
-
borderRadius:
|
|
212
|
-
borderWidth:
|
|
213
|
-
borderColor:
|
|
214
|
-
backgroundColor:
|
|
209
|
+
width: b.d,
|
|
210
|
+
height: b.d,
|
|
211
|
+
borderRadius: N ? Math.round(b.d * .3) : 9999,
|
|
212
|
+
borderWidth: b.border,
|
|
213
|
+
borderColor: U,
|
|
214
|
+
backgroundColor: w ? _e(D) : U
|
|
215
215
|
},
|
|
216
216
|
children: y === "color" ? /* @__PURE__ */ L("span", {
|
|
217
217
|
className: "rounded-full transition-all duration-200 ease-out",
|
|
218
218
|
style: {
|
|
219
|
-
width:
|
|
220
|
-
height:
|
|
221
|
-
backgroundColor:
|
|
219
|
+
width: b.d * .36,
|
|
220
|
+
height: b.d * .36,
|
|
221
|
+
backgroundColor: U
|
|
222
222
|
}
|
|
223
|
-
}) :
|
|
223
|
+
}) : te
|
|
224
224
|
}), re = /* @__PURE__ */ L(u, { children: s ? /* @__PURE__ */ L(l.svg, {
|
|
225
|
-
width:
|
|
226
|
-
height:
|
|
225
|
+
width: b.caretW,
|
|
226
|
+
height: b.caretH,
|
|
227
227
|
viewBox: "0 0 16 13",
|
|
228
228
|
"aria-hidden": !0,
|
|
229
229
|
className: "absolute left-1/2",
|
|
230
230
|
style: {
|
|
231
|
-
top:
|
|
232
|
-
marginLeft: -
|
|
233
|
-
fill:
|
|
231
|
+
top: b.d - b.caretOverlap - 3,
|
|
232
|
+
marginLeft: -b.caretW / 2,
|
|
233
|
+
fill: U,
|
|
234
234
|
transformOrigin: "50% 0%"
|
|
235
235
|
},
|
|
236
236
|
initial: {
|
|
@@ -251,78 +251,78 @@ var oe = (e, t) => ({
|
|
|
251
251
|
opacity: { duration: .1 }
|
|
252
252
|
},
|
|
253
253
|
children: /* @__PURE__ */ L("path", { d: "M0 0h16c-4.2 3-6.6 6.9-7.4 11.7a0.62 0.62 0 0 1-1.2 0C6.6 6.9 4.2 3 0 0Z" })
|
|
254
|
-
}, "caret") : null }),
|
|
254
|
+
}, "caret") : null }), ie = /* @__PURE__ */ R("span", {
|
|
255
255
|
className: "relative inline-flex",
|
|
256
|
-
style: { filter: `drop-shadow(0 ${
|
|
256
|
+
style: { filter: `drop-shadow(0 ${b.shadowY}px ${b.shadowBlur / 2}px hsl(${be} / 0.3))` },
|
|
257
257
|
children: [re, ne]
|
|
258
|
-
}),
|
|
258
|
+
}), P = B[i], F = b.d / 2, I = xe, oe = s ? H() : -F, se = s ? "bottom" : p, ce = `0 0 ${Math.max(2, Math.round(P.label * .28))}px ${U}`, le = [
|
|
259
259
|
ce,
|
|
260
260
|
ce,
|
|
261
|
-
`0 1px 2px ${
|
|
262
|
-
`0 -1px 2px ${
|
|
263
|
-
`1px 0 2px ${
|
|
264
|
-
`-1px 0 2px ${
|
|
265
|
-
].join(","),
|
|
261
|
+
`0 1px 2px ${U}`,
|
|
262
|
+
`0 -1px 2px ${U}`,
|
|
263
|
+
`1px 0 2px ${U}`,
|
|
264
|
+
`-1px 0 2px ${U}`
|
|
265
|
+
].join(","), z = !s && (se === "top" || se === "bottom"), ue = z ? "line-clamp-4 text-center" : s ? "whitespace-nowrap text-center" : "whitespace-nowrap", de = P.d / 2, fe = {
|
|
266
266
|
right: {
|
|
267
|
-
transform: `translate(${
|
|
268
|
-
style: { paddingLeft:
|
|
267
|
+
transform: `translate(${de}px, -50%)`,
|
|
268
|
+
style: { paddingLeft: P.gap }
|
|
269
269
|
},
|
|
270
270
|
left: {
|
|
271
|
-
transform: `translate(calc(-100% - ${
|
|
271
|
+
transform: `translate(calc(-100% - ${de}px), -50%)`,
|
|
272
272
|
style: {
|
|
273
|
-
paddingRight:
|
|
273
|
+
paddingRight: P.gap,
|
|
274
274
|
textAlign: "right"
|
|
275
275
|
}
|
|
276
276
|
},
|
|
277
277
|
top: {
|
|
278
|
-
transform: `translate(-50%, calc(-100% - ${
|
|
279
|
-
style: { paddingBottom:
|
|
278
|
+
transform: `translate(-50%, calc(-100% - ${de}px))`,
|
|
279
|
+
style: { paddingBottom: P.gap }
|
|
280
280
|
},
|
|
281
281
|
bottom: {
|
|
282
|
-
transform: `translate(-50%, ${s ?
|
|
283
|
-
style: { paddingTop:
|
|
282
|
+
transform: `translate(-50%, ${s ? I : de}px)`,
|
|
283
|
+
style: { paddingTop: P.gap + (s ? 4 : 0) }
|
|
284
284
|
}
|
|
285
|
-
}[se],
|
|
286
|
-
className: a("absolute left-0 top-0 font-semibold leading-tight transition-all duration-200 ease-out",
|
|
285
|
+
}[se], pe = d && f && !c && /* @__PURE__ */ L("span", {
|
|
286
|
+
className: a("absolute left-0 top-0 font-semibold leading-tight transition-all duration-200 ease-out", ue),
|
|
287
287
|
style: {
|
|
288
288
|
color: `hsl(${ve[D]})`,
|
|
289
|
-
fontSize:
|
|
289
|
+
fontSize: P.label,
|
|
290
290
|
textShadow: le,
|
|
291
|
-
transform:
|
|
292
|
-
maxWidth:
|
|
293
|
-
...
|
|
291
|
+
transform: fe.transform,
|
|
292
|
+
maxWidth: z ? P.maxLabelW : void 0,
|
|
293
|
+
...fe.style
|
|
294
294
|
},
|
|
295
295
|
children: d
|
|
296
|
-
}),
|
|
296
|
+
}), me = /* @__PURE__ */ L("span", {
|
|
297
297
|
"aria-hidden": !0,
|
|
298
298
|
className: "absolute left-0 top-0 rounded-full border-solid transition-all duration-200 ease-out",
|
|
299
299
|
style: {
|
|
300
|
-
width:
|
|
301
|
-
height:
|
|
300
|
+
width: I * 2,
|
|
301
|
+
height: I * 2,
|
|
302
302
|
marginLeft: -5.6,
|
|
303
303
|
marginTop: -5.6,
|
|
304
304
|
borderWidth: 1.5,
|
|
305
|
-
borderColor:
|
|
305
|
+
borderColor: U,
|
|
306
306
|
backgroundColor: _e(D),
|
|
307
307
|
boxShadow: `0 1px 2px hsl(${be} / 0.3)`,
|
|
308
308
|
transform: `scale(${s || c ? 1 : 0})`,
|
|
309
309
|
opacity: s || c ? 1 : 0
|
|
310
310
|
}
|
|
311
|
-
}),
|
|
312
|
-
|
|
311
|
+
}), he = /* @__PURE__ */ R(ae, { children: [
|
|
312
|
+
me,
|
|
313
313
|
/* @__PURE__ */ L("span", {
|
|
314
314
|
className: "absolute left-0 top-0 transition-all duration-200 ease-out",
|
|
315
315
|
style: {
|
|
316
316
|
transform: `translate(-50%, ${oe}px) scale(${+!c})`,
|
|
317
317
|
opacity: +!c
|
|
318
318
|
},
|
|
319
|
-
children:
|
|
319
|
+
children: ie
|
|
320
320
|
}),
|
|
321
|
-
|
|
321
|
+
pe
|
|
322
322
|
] });
|
|
323
323
|
return /* @__PURE__ */ L(r, {
|
|
324
324
|
dataTestId: _,
|
|
325
|
-
children:
|
|
325
|
+
children: S ? /* @__PURE__ */ L("button", {
|
|
326
326
|
ref: n,
|
|
327
327
|
type: "button",
|
|
328
328
|
...g ? {
|
|
@@ -334,20 +334,20 @@ var oe = (e, t) => ({
|
|
|
334
334
|
},
|
|
335
335
|
onClick: m,
|
|
336
336
|
className: a("relative inline-flex cursor-pointer border-0 bg-transparent p-0", "transition-transform duration-150 hover:scale-[1.05]", o("rounded-full"), v),
|
|
337
|
-
children:
|
|
337
|
+
children: he
|
|
338
338
|
}) : /* @__PURE__ */ L("span", {
|
|
339
339
|
role: "img",
|
|
340
340
|
"aria-label": h,
|
|
341
341
|
className: a("relative inline-flex", v),
|
|
342
|
-
children:
|
|
342
|
+
children: he
|
|
343
343
|
})
|
|
344
344
|
});
|
|
345
345
|
});
|
|
346
|
-
|
|
347
|
-
var
|
|
346
|
+
Ce.displayName = "BaseMapMarker";
|
|
347
|
+
var W = Ce, we = (e, t) => `hsl(${ye(e, t).replace(/ /g, ", ")})`, Te = (e, t) => ({
|
|
348
348
|
id: e.id,
|
|
349
349
|
ring: me(e.center, e.radiusMeters),
|
|
350
|
-
color: e.color ??
|
|
350
|
+
color: e.color ?? we(e.variant ?? "malibu", t),
|
|
351
351
|
fillOpacity: .15,
|
|
352
352
|
strokeWidth: 2
|
|
353
353
|
}), Ee = ({ adapter: e, areas: t, isDark: n }) => {
|
|
@@ -362,39 +362,39 @@ var we = H, U = (e, t) => `hsl(${ye(e, t).replace(/ /g, ", ")})`, Te = (e, t) =>
|
|
|
362
362
|
border: "default",
|
|
363
363
|
borderStyle: "solid",
|
|
364
364
|
borderColor: "secondary"
|
|
365
|
-
},
|
|
365
|
+
}, Oe = {
|
|
366
366
|
control: "md",
|
|
367
367
|
panel: "xl"
|
|
368
|
-
},
|
|
368
|
+
}, ke = {
|
|
369
369
|
md: "rounded-md backdrop-blur-md bg-f1-background-inverse-secondary dark:bg-f1-background-tertiary",
|
|
370
370
|
xl: "rounded-xl backdrop-blur-md bg-f1-background-inverse-secondary dark:bg-f1-background-tertiary"
|
|
371
|
-
},
|
|
371
|
+
}, Ae = (e) => ke[e], G = {
|
|
372
372
|
inset: 8,
|
|
373
373
|
gap: 8,
|
|
374
374
|
listWidth: 214,
|
|
375
375
|
detailWidth: 344,
|
|
376
376
|
toggleSize: 38
|
|
377
|
-
},
|
|
377
|
+
}, K = "cubic-bezier(0.77, 0, 0.175, 1)", q = {
|
|
378
378
|
enter: {
|
|
379
379
|
duration: "175ms",
|
|
380
|
-
easing:
|
|
380
|
+
easing: K
|
|
381
381
|
},
|
|
382
382
|
exit: {
|
|
383
383
|
duration: "250ms",
|
|
384
|
-
easing:
|
|
384
|
+
easing: K
|
|
385
385
|
}
|
|
386
386
|
}, je = ({ children: e }) => /* @__PURE__ */ L("div", {
|
|
387
|
-
className:
|
|
388
|
-
children: /* @__PURE__ */ L(
|
|
387
|
+
className: Ae(Oe.control),
|
|
388
|
+
children: /* @__PURE__ */ L(S, {
|
|
389
389
|
...De,
|
|
390
|
-
borderRadius:
|
|
390
|
+
borderRadius: Oe.control,
|
|
391
391
|
padding: "none",
|
|
392
392
|
children: /* @__PURE__ */ L("div", {
|
|
393
393
|
className: "flex flex-col items-center gap-1 p-0.5",
|
|
394
394
|
children: e
|
|
395
395
|
})
|
|
396
396
|
})
|
|
397
|
-
}), Me =
|
|
397
|
+
}), Me = j(({ onZoomIn: e, onZoomOut: t, onFit: n, onLocate: a, labels: o, dataTestId: s }, c) => {
|
|
398
398
|
let l = i(), u = !!(a || n), d = !!(e || t), p = (e) => /* @__PURE__ */ L(je, { children: e });
|
|
399
399
|
return /* @__PURE__ */ L(r, {
|
|
400
400
|
dataTestId: s,
|
|
@@ -404,7 +404,7 @@ var we = H, U = (e, t) => `hsl(${ye(e, t).replace(/ /g, ", ")})`, Te = (e, t) =>
|
|
|
404
404
|
"aria-orientation": "vertical",
|
|
405
405
|
"aria-label": l.map.navigation,
|
|
406
406
|
className: "flex flex-col items-center gap-2",
|
|
407
|
-
children: [u ? p(/* @__PURE__ */ R(
|
|
407
|
+
children: [u ? p(/* @__PURE__ */ R(ae, { children: [n ? /* @__PURE__ */ L(f, {
|
|
408
408
|
variant: "ghost",
|
|
409
409
|
size: "md",
|
|
410
410
|
label: o?.fit ?? l.map.controls.fit,
|
|
@@ -418,18 +418,18 @@ var we = H, U = (e, t) => `hsl(${ye(e, t).replace(/ /g, ", ")})`, Te = (e, t) =>
|
|
|
418
418
|
icon: m,
|
|
419
419
|
hideLabel: !0,
|
|
420
420
|
onClick: a
|
|
421
|
-
}) : null] })) : null, d ? p(/* @__PURE__ */ R(
|
|
421
|
+
}) : null] })) : null, d ? p(/* @__PURE__ */ R(ae, { children: [e ? /* @__PURE__ */ L(f, {
|
|
422
422
|
variant: "ghost",
|
|
423
423
|
size: "md",
|
|
424
424
|
label: o?.zoomIn ?? l.map.controls.zoomIn,
|
|
425
|
-
icon:
|
|
425
|
+
icon: w,
|
|
426
426
|
hideLabel: !0,
|
|
427
427
|
onClick: e
|
|
428
428
|
}) : null, t ? /* @__PURE__ */ L(f, {
|
|
429
429
|
variant: "ghost",
|
|
430
430
|
size: "md",
|
|
431
431
|
label: o?.zoomOut ?? l.map.controls.zoomOut,
|
|
432
|
-
icon:
|
|
432
|
+
icon: E,
|
|
433
433
|
hideLabel: !0,
|
|
434
434
|
onClick: t
|
|
435
435
|
}) : null] })) : null]
|
|
@@ -439,7 +439,7 @@ var we = H, U = (e, t) => `hsl(${ye(e, t).replace(/ /g, ", ")})`, Te = (e, t) =>
|
|
|
439
439
|
Me.displayName = "F0MapControls";
|
|
440
440
|
//#endregion
|
|
441
441
|
//#region src/addons/map/F0Map/components/F0MapList/F0MapList.tsx
|
|
442
|
-
var
|
|
442
|
+
var Ne = (e, t) => {
|
|
443
443
|
if (e.label) return e.label;
|
|
444
444
|
switch (e.variant) {
|
|
445
445
|
case "employee": return `${e.firstName} ${e.lastName}`.trim();
|
|
@@ -447,7 +447,7 @@ var q = (e, t) => {
|
|
|
447
447
|
case "stop": return e.letter.charAt(0).toUpperCase();
|
|
448
448
|
default: return t;
|
|
449
449
|
}
|
|
450
|
-
},
|
|
450
|
+
}, Pe = j(function({ points: e, selectedId: t, onSelect: n, visible: o = !1, label: s, id: c, dataTestId: l, className: u }, d) {
|
|
451
451
|
let f = i(), p = s ?? f.map.listLabel;
|
|
452
452
|
return /* @__PURE__ */ L(r, {
|
|
453
453
|
dataTestId: l,
|
|
@@ -467,16 +467,16 @@ var q = (e, t) => {
|
|
|
467
467
|
"aria-current": e.id === t || void 0,
|
|
468
468
|
onClick: () => n(e.id),
|
|
469
469
|
className: a("w-full text-left", o && "text-f1-foreground hover:bg-f1-background-hover aria-[current=true]:bg-f1-background-selected rounded-md px-3 py-2 text-sm"),
|
|
470
|
-
children:
|
|
470
|
+
children: Ne(e, f.map.unnamedLocation)
|
|
471
471
|
}) }, e.id))
|
|
472
472
|
})]
|
|
473
473
|
})
|
|
474
474
|
});
|
|
475
475
|
});
|
|
476
|
-
|
|
476
|
+
Pe.displayName = "F0MapList";
|
|
477
477
|
//#endregion
|
|
478
478
|
//#region src/addons/map/F0Map/hooks/useClusters.ts
|
|
479
|
-
var
|
|
479
|
+
var Fe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i = 164 }) => {
|
|
480
480
|
let [a, o] = I({
|
|
481
481
|
clusters: [],
|
|
482
482
|
singles: t
|
|
@@ -556,13 +556,13 @@ var Pe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
556
556
|
r,
|
|
557
557
|
i
|
|
558
558
|
]), a;
|
|
559
|
-
},
|
|
559
|
+
}, Ie = 4, Le = 4, Re = [
|
|
560
560
|
"right",
|
|
561
561
|
"bottom",
|
|
562
562
|
"left",
|
|
563
563
|
"top"
|
|
564
|
-
],
|
|
565
|
-
let a =
|
|
564
|
+
], ze = 1.7, J = (e, t) => e.x < t.x + t.w && e.x + e.w > t.x && e.y < t.y + t.h && e.y + e.h > t.y, Be = null, Ve = (e, t) => (!Be && typeof document < "u" && (Be = document.createElement("canvas").getContext("2d")), Be ? (Be.font = `600 ${t}px Inter, system-ui, sans-serif`, Be.measureText(e).width) : e.length * t * .55), He = ({ placement: e, cx: t, cy: n, point: r, size: i }) => {
|
|
565
|
+
let a = V(i), o = Ve(r.label ?? "", a.label) + 2, s = a.d / 2;
|
|
566
566
|
if (e === "right" || e === "left") {
|
|
567
567
|
let r = o, i = a.lineH;
|
|
568
568
|
return {
|
|
@@ -572,14 +572,14 @@ var Pe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
572
572
|
h: i
|
|
573
573
|
};
|
|
574
574
|
}
|
|
575
|
-
let c = Math.min(o, a.maxLabelW), l = Math.min(Math.ceil(o / a.maxLabelW),
|
|
575
|
+
let c = Math.min(o, a.maxLabelW), l = Math.min(Math.ceil(o / a.maxLabelW), Le) * a.lineH, u = a.gap + Ie, d = e === "bottom" ? n + s + u : n - s - a.gap - l;
|
|
576
576
|
return {
|
|
577
577
|
x: t - c / 2,
|
|
578
578
|
y: d,
|
|
579
579
|
w: c,
|
|
580
580
|
h: l
|
|
581
581
|
};
|
|
582
|
-
},
|
|
582
|
+
}, Ue = (e, t, n = "md") => {
|
|
583
583
|
let [r, i] = I({});
|
|
584
584
|
return N(() => {
|
|
585
585
|
if (!e) {
|
|
@@ -587,7 +587,7 @@ var Pe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
587
587
|
return;
|
|
588
588
|
}
|
|
589
589
|
let r = 0, a = () => {
|
|
590
|
-
let r =
|
|
590
|
+
let r = V(n).d, a = [], o = [];
|
|
591
591
|
for (let n of t) {
|
|
592
592
|
let t = e.project(n.coordinates);
|
|
593
593
|
if (!t) return;
|
|
@@ -604,7 +604,7 @@ var Pe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
604
604
|
let s = t.length, c = Array.from({ length: s }, (e, t) => t), l = (e) => {
|
|
605
605
|
for (; c[e] !== e;) e = c[e] = c[c[e]];
|
|
606
606
|
return e;
|
|
607
|
-
}, u = (r *
|
|
607
|
+
}, u = (r * ze) ** 2;
|
|
608
608
|
for (let e = 0; e < s; e++) for (let t = e + 1; t < s; t++) {
|
|
609
609
|
let n = o[e].x - o[t].x, r = o[e].y - o[t].y;
|
|
610
610
|
if (n * n + r * r <= u) {
|
|
@@ -616,15 +616,15 @@ var Pe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
616
616
|
for (let e = 0; e < s; e++) {
|
|
617
617
|
let r = t[e];
|
|
618
618
|
if (!r.label) continue;
|
|
619
|
-
let i = o[e], s = "right", c = [s, ...
|
|
619
|
+
let i = o[e], s = "right", c = [s, ...Re.filter((e) => e !== s)], l = null;
|
|
620
620
|
for (let e of c) {
|
|
621
|
-
let t =
|
|
621
|
+
let t = He({
|
|
622
622
|
placement: e,
|
|
623
623
|
cx: i.x,
|
|
624
624
|
cy: i.y,
|
|
625
625
|
point: r,
|
|
626
626
|
size: n
|
|
627
|
-
}), o = a.some((e) =>
|
|
627
|
+
}), o = a.some((e) => J(t, e)), s = f.some((e) => J(t, e));
|
|
628
628
|
if (!o && !s) {
|
|
629
629
|
l = e, f.push(t);
|
|
630
630
|
break;
|
|
@@ -656,12 +656,12 @@ var Pe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
656
656
|
t,
|
|
657
657
|
n
|
|
658
658
|
]), r;
|
|
659
|
-
},
|
|
659
|
+
}, We = 3, Y = ({ adapter: e, el: t, markerRef: n, coordinates: r, drag: i }) => {
|
|
660
660
|
let a = F({
|
|
661
661
|
coordinates: r,
|
|
662
662
|
drag: i
|
|
663
663
|
});
|
|
664
|
-
|
|
664
|
+
ie(function() {
|
|
665
665
|
a.current = {
|
|
666
666
|
coordinates: r,
|
|
667
667
|
drag: i
|
|
@@ -683,7 +683,7 @@ var Pe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
683
683
|
}, u = (e) => {
|
|
684
684
|
if (!r) return;
|
|
685
685
|
let t = Math.hypot(e.clientX - r.x, e.clientY - r.y);
|
|
686
|
-
!i && t <
|
|
686
|
+
!i && t < We || (i = !0, s = c(e), s && (n.current?.setPosition(s), a.current.drag?.onDrag?.(s)));
|
|
687
687
|
}, d = (e) => {
|
|
688
688
|
t.releasePointerCapture?.(e.pointerId), t.style.setProperty("cursor", "grab"), r = null;
|
|
689
689
|
}, f = () => n.current?.setPosition(a.current.coordinates), p = (e) => {
|
|
@@ -702,7 +702,7 @@ var Pe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
702
702
|
n,
|
|
703
703
|
o
|
|
704
704
|
]);
|
|
705
|
-
},
|
|
705
|
+
}, Ge = (e, t) => {
|
|
706
706
|
let [n, r] = I(() => e ? e.getZoom() >= t : !1);
|
|
707
707
|
return N(() => {
|
|
708
708
|
if (!e) {
|
|
@@ -712,13 +712,13 @@ var Pe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
712
712
|
let n = () => r(e.getZoom() >= t);
|
|
713
713
|
return n(), e.on("zoom", n);
|
|
714
714
|
}, [e, t]), n;
|
|
715
|
-
},
|
|
715
|
+
}, Ke = [
|
|
716
716
|
"default",
|
|
717
717
|
"workplace",
|
|
718
718
|
"employee",
|
|
719
719
|
"company",
|
|
720
720
|
"stop"
|
|
721
|
-
],
|
|
721
|
+
], qe = "malibu", Je = "radical", Ye = (e) => {
|
|
722
722
|
switch (e.variant) {
|
|
723
723
|
case "employee": return { variant: {
|
|
724
724
|
variant: "person",
|
|
@@ -734,22 +734,22 @@ var Pe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
734
734
|
case "workplace": return {
|
|
735
735
|
variant: {
|
|
736
736
|
variant: "icon",
|
|
737
|
-
icon:
|
|
737
|
+
icon: g
|
|
738
738
|
},
|
|
739
|
-
color:
|
|
739
|
+
color: qe
|
|
740
740
|
};
|
|
741
741
|
case "stop": return {
|
|
742
742
|
variant: {
|
|
743
743
|
variant: "letter",
|
|
744
744
|
letter: e.letter
|
|
745
745
|
},
|
|
746
|
-
color:
|
|
746
|
+
color: Je
|
|
747
747
|
};
|
|
748
748
|
default: return { variant: { variant: "color" } };
|
|
749
749
|
}
|
|
750
|
-
},
|
|
751
|
-
let { variant: n, color: r } =
|
|
752
|
-
return /* @__PURE__ */ L(
|
|
750
|
+
}, X = j(function(e, t) {
|
|
751
|
+
let { variant: n, color: r } = Ye(e);
|
|
752
|
+
return /* @__PURE__ */ L(W, {
|
|
753
753
|
ref: t,
|
|
754
754
|
...n,
|
|
755
755
|
color: r,
|
|
@@ -766,8 +766,8 @@ var Pe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
766
766
|
className: e.className
|
|
767
767
|
});
|
|
768
768
|
});
|
|
769
|
-
|
|
770
|
-
var
|
|
769
|
+
X.displayName = "F0MapMarker";
|
|
770
|
+
var Xe = X, Ze = 4, Qe = 3, $e = 1.3, et = 1.08, tt = "cubic-bezier(0.16, 1, 0.3, 1)", nt = 72, rt = {
|
|
771
771
|
1: [[0, 0]],
|
|
772
772
|
2: [[-8, 0], [8, 0]],
|
|
773
773
|
3: [
|
|
@@ -781,12 +781,12 @@ var X = Ye, Xe = 4, Ze = 3, Qe = 1.3, $e = 1.08, Z = "cubic-bezier(0.16, 1, 0.3,
|
|
|
781
781
|
[-8, 8],
|
|
782
782
|
[8, 8]
|
|
783
783
|
]
|
|
784
|
-
},
|
|
785
|
-
let u = i(), [d, f] = I(!1), p = t.slice(0, e <=
|
|
784
|
+
}, Z = j(function({ count: e, members: t, onClick: n, ariaLabel: o, dataTestId: s, className: c }, l) {
|
|
785
|
+
let u = i(), [d, f] = I(!1), p = t.slice(0, e <= Ze ? Ze : Qe), m = Math.max(0, e - p.length), h = m > 0, g = m > 99 ? "+99" : `+${m}`, _ = rt[p.length + +!!h] ?? rt[4], v = d ? $e : 1, y = d ? et : 1, b = (e) => {
|
|
786
786
|
let [t, n] = _[e] ?? [0, 0];
|
|
787
787
|
return {
|
|
788
788
|
transform: `translate(${t * v}px, ${n * v}px) scale(${y})`,
|
|
789
|
-
transition: `transform 240ms ${
|
|
789
|
+
transition: `transform 240ms ${tt}`
|
|
790
790
|
};
|
|
791
791
|
};
|
|
792
792
|
return /* @__PURE__ */ L(r, {
|
|
@@ -812,8 +812,8 @@ var X = Ye, Xe = 4, Ze = 3, Qe = 1.3, $e = 1.08, Z = "cubic-bezier(0.16, 1, 0.3,
|
|
|
812
812
|
style: {
|
|
813
813
|
left: -36,
|
|
814
814
|
top: -36,
|
|
815
|
-
width:
|
|
816
|
-
height:
|
|
815
|
+
width: nt,
|
|
816
|
+
height: nt
|
|
817
817
|
}
|
|
818
818
|
}),
|
|
819
819
|
p.map((e, t) => /* @__PURE__ */ L("span", {
|
|
@@ -822,7 +822,7 @@ var X = Ye, Xe = 4, Ze = 3, Qe = 1.3, $e = 1.08, Z = "cubic-bezier(0.16, 1, 0.3,
|
|
|
822
822
|
zIndex: t,
|
|
823
823
|
...b(t)
|
|
824
824
|
},
|
|
825
|
-
children: /* @__PURE__ */ L(
|
|
825
|
+
children: /* @__PURE__ */ L(Xe, {
|
|
826
826
|
...e,
|
|
827
827
|
showLabel: !1
|
|
828
828
|
})
|
|
@@ -832,10 +832,10 @@ var X = Ye, Xe = 4, Ze = 3, Qe = 1.3, $e = 1.08, Z = "cubic-bezier(0.16, 1, 0.3,
|
|
|
832
832
|
return /* @__PURE__ */ R("span", {
|
|
833
833
|
className: a("absolute left-0 top-0 flex h-6 min-w-6 items-center justify-center overflow-hidden rounded-full px-1.5", "border border-solid border-f1-border-secondary", "text-f1-foreground-secondary text-sm font-medium leading-none"),
|
|
834
834
|
style: {
|
|
835
|
-
zIndex:
|
|
835
|
+
zIndex: Qe,
|
|
836
836
|
backgroundColor: "hsl(var(--white-90))",
|
|
837
837
|
transform: `translate(${e * v}px, ${t * v}px) translate(-50%, -50%) scale(${y})`,
|
|
838
|
-
transition: `transform 240ms ${
|
|
838
|
+
transition: `transform 240ms ${tt}`
|
|
839
839
|
},
|
|
840
840
|
children: [/* @__PURE__ */ L("span", {
|
|
841
841
|
"aria-hidden": !0,
|
|
@@ -850,18 +850,18 @@ var X = Ye, Xe = 4, Ze = 3, Qe = 1.3, $e = 1.08, Z = "cubic-bezier(0.16, 1, 0.3,
|
|
|
850
850
|
})
|
|
851
851
|
});
|
|
852
852
|
});
|
|
853
|
-
|
|
854
|
-
var
|
|
853
|
+
Z.displayName = "F0MapCluster";
|
|
854
|
+
var it = Z, Q = 16, at = (e, t, n, r) => {
|
|
855
855
|
let i = e.project(t.coordinates);
|
|
856
856
|
if (!i) return null;
|
|
857
|
-
let a =
|
|
857
|
+
let a = V("xl"), o = V(r), s = i.y + H(), c = {
|
|
858
858
|
x: i.x - a.d / 2,
|
|
859
859
|
y: s,
|
|
860
860
|
w: a.d,
|
|
861
861
|
h: a.d
|
|
862
|
-
}, l = t.label ?
|
|
862
|
+
}, l = t.label ? Ve(t.label, o.label) : 0, u = {
|
|
863
863
|
x: i.x - l / 2,
|
|
864
|
-
y: i.y +
|
|
864
|
+
y: i.y + xe,
|
|
865
865
|
w: l,
|
|
866
866
|
h: o.lineH
|
|
867
867
|
}, d = o.d, f = /* @__PURE__ */ new Set();
|
|
@@ -874,10 +874,10 @@ var Q = nt, rt = 16, $ = (e, t, n, r) => {
|
|
|
874
874
|
w: d,
|
|
875
875
|
h: d
|
|
876
876
|
};
|
|
877
|
-
(
|
|
877
|
+
(J(r, c) || l > 0 && J(r, u)) && f.add(t.id);
|
|
878
878
|
}
|
|
879
879
|
return f;
|
|
880
|
-
},
|
|
880
|
+
}, ot = (e, t, n, r) => {
|
|
881
881
|
let [i, a] = I(null);
|
|
882
882
|
return N(() => {
|
|
883
883
|
if (!t || !n.some((e) => e.id === t.id)) {
|
|
@@ -885,7 +885,7 @@ var Q = nt, rt = 16, $ = (e, t, n, r) => {
|
|
|
885
885
|
return;
|
|
886
886
|
}
|
|
887
887
|
let i = 0, o = () => {
|
|
888
|
-
let i =
|
|
888
|
+
let i = at(e, t, n.filter((e) => e.id !== t.id), r);
|
|
889
889
|
i && a((e) => e !== null && e.size === i.size && [...i].every((t) => e.has(t)) ? e : i);
|
|
890
890
|
}, s = () => {
|
|
891
891
|
cancelAnimationFrame(i), i = requestAnimationFrame(o);
|
|
@@ -901,10 +901,10 @@ var Q = nt, rt = 16, $ = (e, t, n, r) => {
|
|
|
901
901
|
n,
|
|
902
902
|
r
|
|
903
903
|
]), i;
|
|
904
|
-
},
|
|
904
|
+
}, $ = (e) => {
|
|
905
905
|
let { id: t, coordinates: n, label: r, draggable: i, ...a } = e;
|
|
906
906
|
return a;
|
|
907
|
-
},
|
|
907
|
+
}, st = ({ adapter: e, coordinates: t, selected: n, drag: r, children: i }) => {
|
|
908
908
|
let [a] = I(() => document.createElement("div")), o = F(null);
|
|
909
909
|
return N(() => {
|
|
910
910
|
let n = (e) => e.stopPropagation();
|
|
@@ -915,7 +915,7 @@ var Q = nt, rt = 16, $ = (e, t, n, r) => {
|
|
|
915
915
|
};
|
|
916
916
|
}, [e, a]), N(() => {
|
|
917
917
|
o.current?.setPosition(t);
|
|
918
|
-
}, [t]),
|
|
918
|
+
}, [t]), Y({
|
|
919
919
|
adapter: e,
|
|
920
920
|
el: a,
|
|
921
921
|
markerRef: o,
|
|
@@ -923,9 +923,9 @@ var Q = nt, rt = 16, $ = (e, t, n, r) => {
|
|
|
923
923
|
drag: r
|
|
924
924
|
}), N(() => {
|
|
925
925
|
a.style.zIndex = n ? "2" : "";
|
|
926
|
-
}, [a, n]),
|
|
927
|
-
},
|
|
928
|
-
let d = i(), f = !!s, p = P(() => f ? t.filter((e) => !e.draggable) : t, [t, f]), m =
|
|
926
|
+
}, [a, n]), oe(i, a);
|
|
927
|
+
}, ct = ({ adapter: e, points: t, selectedId: n, highlightedId: r, onSelect: a, onMarkerDrag: o, onMarkerDragEnd: s, onClusterExpand: c }) => {
|
|
928
|
+
let d = i(), f = !!s, p = P(() => f ? t.filter((e) => !e.draggable) : t, [t, f]), m = Fe({
|
|
929
929
|
adapter: e,
|
|
930
930
|
points: p,
|
|
931
931
|
enabled: !0
|
|
@@ -937,8 +937,8 @@ var Q = nt, rt = 16, $ = (e, t, n, r) => {
|
|
|
937
937
|
m.singles,
|
|
938
938
|
p,
|
|
939
939
|
t
|
|
940
|
-
]), _ =
|
|
941
|
-
return /* @__PURE__ */ R(u, { children: [h.map((t) => /* @__PURE__ */ L(
|
|
940
|
+
]), _ = Ge(e, Q) ? "lg" : "md", v = Ue(e, g, _), y = new Map(t.map((e) => [e.id, e])), b = h.length > 0, x = ot(e, n ? y.get(n) : void 0, g, _);
|
|
941
|
+
return /* @__PURE__ */ R(u, { children: [h.map((t) => /* @__PURE__ */ L(st, {
|
|
942
942
|
adapter: e,
|
|
943
943
|
coordinates: t.coordinates,
|
|
944
944
|
selected: !1,
|
|
@@ -966,15 +966,15 @@ var Q = nt, rt = 16, $ = (e, t, n, r) => {
|
|
|
966
966
|
]
|
|
967
967
|
},
|
|
968
968
|
className: "absolute left-0 top-0 flex leading-none",
|
|
969
|
-
children: /* @__PURE__ */ L(
|
|
969
|
+
children: /* @__PURE__ */ L(it, {
|
|
970
970
|
count: t.count,
|
|
971
|
-
members: t.pointIds.map((e) => y.get(e)).filter((e) => !!e).map(
|
|
971
|
+
members: t.pointIds.map((e) => y.get(e)).filter((e) => !!e).map($),
|
|
972
972
|
onClick: () => c(t.bounds)
|
|
973
973
|
})
|
|
974
974
|
})
|
|
975
975
|
}, t.id)), g.map((t) => {
|
|
976
976
|
let i = v[t.id], c = x?.has(t.id) ?? !1, f = r === t.id;
|
|
977
|
-
return /* @__PURE__ */ L(
|
|
977
|
+
return /* @__PURE__ */ L(st, {
|
|
978
978
|
adapter: e,
|
|
979
979
|
coordinates: t.coordinates,
|
|
980
980
|
selected: n === t.id || f,
|
|
@@ -1008,8 +1008,8 @@ var Q = nt, rt = 16, $ = (e, t, n, r) => {
|
|
|
1008
1008
|
ease: "easeOut"
|
|
1009
1009
|
},
|
|
1010
1010
|
className: "absolute left-0 top-0 flex leading-none",
|
|
1011
|
-
children: /* @__PURE__ */ L(
|
|
1012
|
-
|
|
1011
|
+
children: /* @__PURE__ */ L(Xe, {
|
|
1012
|
+
...$(t),
|
|
1013
1013
|
size: _,
|
|
1014
1014
|
label: t.label,
|
|
1015
1015
|
showLabel: n === t.id || f || !b && i !== null,
|
|
@@ -1025,8 +1025,8 @@ var Q = nt, rt = 16, $ = (e, t, n, r) => {
|
|
|
1025
1025
|
})
|
|
1026
1026
|
}, t.id);
|
|
1027
1027
|
})] });
|
|
1028
|
-
},
|
|
1029
|
-
let m = i(), h = d(), g = t ?
|
|
1028
|
+
}, lt = ({ children: e, open: t, offsetX: n, offsetY: o = G.inset, width: s, entrance: c = "slide", headerStart: l, headerEnd: u, ariaLabel: f, dataTestId: p }) => {
|
|
1029
|
+
let m = i(), h = d(), g = t ? q.enter : q.exit, _ = n - G.inset, v = F({
|
|
1030
1030
|
from: _,
|
|
1031
1031
|
to: _
|
|
1032
1032
|
});
|
|
@@ -1034,7 +1034,7 @@ var Q = nt, rt = 16, $ = (e, t, n, r) => {
|
|
|
1034
1034
|
from: v.current.to,
|
|
1035
1035
|
to: _
|
|
1036
1036
|
});
|
|
1037
|
-
let y = _ > v.current.from ?
|
|
1037
|
+
let y = _ > v.current.from ? q.enter : q.exit, b = c === "grow" ? "translateX(-10%) scale(0.97)" : `translateX(calc(-100% - ${G.inset}px))`;
|
|
1038
1038
|
return /* @__PURE__ */ L(r, {
|
|
1039
1039
|
dataTestId: p,
|
|
1040
1040
|
children: /* @__PURE__ */ L("div", {
|
|
@@ -1054,7 +1054,7 @@ var Q = nt, rt = 16, $ = (e, t, n, r) => {
|
|
|
1054
1054
|
ref: (e) => {
|
|
1055
1055
|
t ? e?.removeAttribute("inert") : e?.setAttribute("inert", "");
|
|
1056
1056
|
},
|
|
1057
|
-
className: a("relative h-full overflow-hidden text-base",
|
|
1057
|
+
className: a("relative h-full overflow-hidden text-base", Ae(Oe.panel), t ? "pointer-events-auto" : "opacity-0"),
|
|
1058
1058
|
style: {
|
|
1059
1059
|
transform: t || h ? "translateX(0px) scale(1)" : b,
|
|
1060
1060
|
transformOrigin: c === "grow" ? "left center" : void 0,
|
|
@@ -1062,9 +1062,9 @@ var Q = nt, rt = 16, $ = (e, t, n, r) => {
|
|
|
1062
1062
|
transitionDuration: g.duration,
|
|
1063
1063
|
transitionTimingFunction: g.easing
|
|
1064
1064
|
},
|
|
1065
|
-
children: /* @__PURE__ */ L(
|
|
1065
|
+
children: /* @__PURE__ */ L(S, {
|
|
1066
1066
|
...De,
|
|
1067
|
-
borderRadius:
|
|
1067
|
+
borderRadius: Oe.panel,
|
|
1068
1068
|
padding: "none",
|
|
1069
1069
|
height: "full",
|
|
1070
1070
|
children: /* @__PURE__ */ R("div", {
|
|
@@ -1084,9 +1084,9 @@ var Q = nt, rt = 16, $ = (e, t, n, r) => {
|
|
|
1084
1084
|
})
|
|
1085
1085
|
})
|
|
1086
1086
|
});
|
|
1087
|
-
},
|
|
1088
|
-
function
|
|
1089
|
-
let [e, t] = I(!1), n = F(0), r =
|
|
1087
|
+
}, ut = (e, t, n = 320) => Math.max(216, Math.min(n, e - t - ee.mainHardMin)), dt = (e, t = 320) => Math.min(t, Math.max(216, Math.round(e))), ft = 500, pt = "f0-secondary-sidebar-width", mt = O.primaryCompact, ht = (e) => e === null || typeof e == "number" && Number.isFinite(e), gt = A(null), _t = () => te(gt);
|
|
1088
|
+
function vt() {
|
|
1089
|
+
let [e, t] = I(!1), n = F(0), r = M(function() {
|
|
1090
1090
|
t(!0), cancelAnimationFrame(n.current), n.current = requestAnimationFrame(function() {
|
|
1091
1091
|
n.current = requestAnimationFrame(function() {
|
|
1092
1092
|
t(!1);
|
|
@@ -1100,38 +1100,38 @@ function _t() {
|
|
|
1100
1100
|
landInstantly: r
|
|
1101
1101
|
};
|
|
1102
1102
|
}
|
|
1103
|
-
function
|
|
1103
|
+
function yt() {
|
|
1104
1104
|
let [e, t] = I(() => window.innerWidth);
|
|
1105
1105
|
return N(function() {
|
|
1106
1106
|
let e = () => t(window.innerWidth);
|
|
1107
1107
|
return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
|
|
1108
1108
|
}, []), e;
|
|
1109
1109
|
}
|
|
1110
|
-
function
|
|
1111
|
-
return e ? /* @__PURE__ */ L(
|
|
1110
|
+
function bt({ enabled: e, children: t, ...n }) {
|
|
1111
|
+
return e ? /* @__PURE__ */ L(xt, {
|
|
1112
1112
|
...n,
|
|
1113
1113
|
children: t
|
|
1114
|
-
}) : /* @__PURE__ */ L(
|
|
1114
|
+
}) : /* @__PURE__ */ L(gt.Provider, {
|
|
1115
1115
|
value: null,
|
|
1116
1116
|
children: t
|
|
1117
1117
|
});
|
|
1118
1118
|
}
|
|
1119
|
-
function
|
|
1120
|
-
let { isInstant: r, landInstantly: i } =
|
|
1121
|
-
key:
|
|
1119
|
+
function xt({ hasSecondarySidebar: e, topBarHeight: t, children: n }) {
|
|
1120
|
+
let { isInstant: r, landInstantly: i } = vt(), a = yt(), [o, s] = I(O.panel), [c, l] = y({
|
|
1121
|
+
key: pt,
|
|
1122
1122
|
fallback: null,
|
|
1123
|
-
validate:
|
|
1123
|
+
validate: ht,
|
|
1124
1124
|
debounceMs: 200
|
|
1125
|
-
}), u =
|
|
1125
|
+
}), u = ut(a, mt, Math.max(320, o)), d = Math.min(o, u), f = c === null ? d : dt(c, u), m = F(o), h = M(function(e) {
|
|
1126
1126
|
e !== m.current && (m.current = e, i(), s(e));
|
|
1127
|
-
}, [i]), g =
|
|
1127
|
+
}, [i]), g = M(function(e) {
|
|
1128
1128
|
i(), l(e);
|
|
1129
|
-
}, [i, l]), _ =
|
|
1129
|
+
}, [i, l]), _ = M(function() {
|
|
1130
1130
|
i(), l(null);
|
|
1131
|
-
}, [i, l]), v = p(`(max-width: ${
|
|
1131
|
+
}, [i, l]), v = p(`(max-width: ${mt + (e ? d : O.panel) + ee.mainMin - 1}px)`, { initializeWithValue: !0 }) ? "overlay" : "docked", [b, x] = I(!1), S = F(0), C = M(function() {
|
|
1132
1132
|
x(!1);
|
|
1133
1133
|
}, []);
|
|
1134
|
-
|
|
1134
|
+
ie(function() {
|
|
1135
1135
|
i(), v === "docked" && C();
|
|
1136
1136
|
}, [
|
|
1137
1137
|
v,
|
|
@@ -1139,7 +1139,7 @@ function bt({ hasSecondarySidebar: e, topBarHeight: t, children: n }) {
|
|
|
1139
1139
|
C
|
|
1140
1140
|
]);
|
|
1141
1141
|
let w = v === "overlay" && b && e;
|
|
1142
|
-
|
|
1142
|
+
ie(function() {
|
|
1143
1143
|
i(), e || C();
|
|
1144
1144
|
}, [
|
|
1145
1145
|
e,
|
|
@@ -1147,7 +1147,7 @@ function bt({ hasSecondarySidebar: e, topBarHeight: t, children: n }) {
|
|
|
1147
1147
|
C
|
|
1148
1148
|
]);
|
|
1149
1149
|
let T = F(e);
|
|
1150
|
-
|
|
1150
|
+
ie(function() {
|
|
1151
1151
|
T.current = e;
|
|
1152
1152
|
});
|
|
1153
1153
|
let E = F(null);
|
|
@@ -1156,11 +1156,11 @@ function bt({ hasSecondarySidebar: e, topBarHeight: t, children: n }) {
|
|
|
1156
1156
|
E.current && clearTimeout(E.current);
|
|
1157
1157
|
};
|
|
1158
1158
|
}, []);
|
|
1159
|
-
let
|
|
1159
|
+
let D = M(function() {
|
|
1160
1160
|
v !== "docked" && (S.current = Date.now(), x(!0), E.current && clearTimeout(E.current), E.current = setTimeout(function() {
|
|
1161
1161
|
T.current || x(!1);
|
|
1162
|
-
},
|
|
1163
|
-
}, [v]), k = C, A =
|
|
1162
|
+
}, ft));
|
|
1163
|
+
}, [v]), k = C, A = M(function() {
|
|
1164
1164
|
w || (S.current = Date.now()), x(!w);
|
|
1165
1165
|
}, [w]);
|
|
1166
1166
|
N(function() {
|
|
@@ -1170,11 +1170,11 @@ function bt({ hasSecondarySidebar: e, topBarHeight: t, children: n }) {
|
|
|
1170
1170
|
};
|
|
1171
1171
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
1172
1172
|
}, [w]);
|
|
1173
|
-
let
|
|
1174
|
-
Date.now() - S.current <
|
|
1173
|
+
let j = M(function() {
|
|
1174
|
+
Date.now() - S.current < ft || x(!1);
|
|
1175
1175
|
}, []), te = P(function() {
|
|
1176
1176
|
return {
|
|
1177
|
-
primarySidebarWidth:
|
|
1177
|
+
primarySidebarWidth: mt,
|
|
1178
1178
|
hasSecondarySidebar: e,
|
|
1179
1179
|
secondarySidebarWidth: f,
|
|
1180
1180
|
secondarySidebarMaxWidth: u,
|
|
@@ -1183,10 +1183,10 @@ function bt({ hasSecondarySidebar: e, topBarHeight: t, children: n }) {
|
|
|
1183
1183
|
resetSecondarySidebarWidth: _,
|
|
1184
1184
|
navigationMode: v,
|
|
1185
1185
|
isOpenOverPage: w,
|
|
1186
|
-
openOverPage:
|
|
1186
|
+
openOverPage: D,
|
|
1187
1187
|
toggleOverPage: A,
|
|
1188
1188
|
closeOverPage: k,
|
|
1189
|
-
closeOverPageAfterRouteChange:
|
|
1189
|
+
closeOverPageAfterRouteChange: j,
|
|
1190
1190
|
topBarHeight: t,
|
|
1191
1191
|
isInstant: r,
|
|
1192
1192
|
landInstantly: i
|
|
@@ -1200,26 +1200,26 @@ function bt({ hasSecondarySidebar: e, topBarHeight: t, children: n }) {
|
|
|
1200
1200
|
_,
|
|
1201
1201
|
v,
|
|
1202
1202
|
w,
|
|
1203
|
-
|
|
1203
|
+
D,
|
|
1204
1204
|
A,
|
|
1205
1205
|
k,
|
|
1206
|
-
|
|
1206
|
+
j,
|
|
1207
1207
|
t,
|
|
1208
1208
|
r,
|
|
1209
1209
|
i
|
|
1210
1210
|
]);
|
|
1211
|
-
return /* @__PURE__ */ L(
|
|
1211
|
+
return /* @__PURE__ */ L(gt.Provider, {
|
|
1212
1212
|
value: te,
|
|
1213
1213
|
children: n
|
|
1214
1214
|
});
|
|
1215
1215
|
}
|
|
1216
1216
|
//#endregion
|
|
1217
1217
|
//#region src/blocks/ApplicationFrame/FrameProvider.tsx
|
|
1218
|
-
var
|
|
1219
|
-
|
|
1218
|
+
var St = "one_sidebar_locked", Ct = 32, wt = 180, Tt = 280, Et = 300, Dt = A(void 0), Ot = /* @__PURE__ */ new WeakSet(), kt = (e) => {
|
|
1219
|
+
Ot.add(e.nativeEvent);
|
|
1220
1220
|
};
|
|
1221
|
-
function
|
|
1222
|
-
let e =
|
|
1221
|
+
function At() {
|
|
1222
|
+
let e = te(Dt);
|
|
1223
1223
|
return e === void 0 ? {
|
|
1224
1224
|
isSmallScreen: !1,
|
|
1225
1225
|
isLastToggleInvokedByUser: !0,
|
|
@@ -1233,30 +1233,30 @@ function kt() {
|
|
|
1233
1233
|
hasPrimarySidebar: !1
|
|
1234
1234
|
} : e;
|
|
1235
1235
|
}
|
|
1236
|
-
var
|
|
1237
|
-
function
|
|
1238
|
-
let { currentPath: t } = c(), n =
|
|
1239
|
-
let e = localStorage.getItem(
|
|
1236
|
+
var jt = (e, t) => e.navigationMode === "overlay" ? e.isOpenOverPage ? "unlocked" : "hidden" : t ? "locked" : "hidden", Mt = (e, t, n) => e || !t ? n ? "unlocked" : "hidden" : "locked";
|
|
1237
|
+
function Nt({ children: e }) {
|
|
1238
|
+
let { currentPath: t } = c(), n = _t(), [r, i] = I(!1), [a, o] = I(!1), s = p(`(max-width: ${D.md}px)`, { initializeWithValue: !0 }), l = p(`(max-width: ${D.xl}px)`, { initializeWithValue: !0 }), u = r ? l : s, [d, f] = I(() => {
|
|
1239
|
+
let e = localStorage.getItem(St);
|
|
1240
1240
|
return e === null || !!e;
|
|
1241
|
-
}), [m, h] = I(!1), [g, _] = I(null), v = F(null), y = F(null), b =
|
|
1241
|
+
}), [m, h] = I(!1), [g, _] = I(null), v = F(null), y = F(null), b = M(function() {
|
|
1242
1242
|
v.current && clearTimeout(v.current), v.current = null, y.current = null;
|
|
1243
|
-
}, []), x =
|
|
1243
|
+
}, []), x = M(function(e, t) {
|
|
1244
1244
|
y.current !== e && (b(), y.current = e, v.current = setTimeout(() => {
|
|
1245
1245
|
v.current = null, y.current = null, h(e);
|
|
1246
1246
|
}, t));
|
|
1247
1247
|
}, [b]);
|
|
1248
1248
|
N(() => b, [b]);
|
|
1249
|
-
let S =
|
|
1249
|
+
let S = M(function() {
|
|
1250
1250
|
n ? n.closeOverPage() : (b(), h(!1));
|
|
1251
|
-
}, [n, b]), C =
|
|
1251
|
+
}, [n, b]), C = M(function({ isInvokedByUser: e } = { isInvokedByUser: !0 }) {
|
|
1252
1252
|
n?.navigationMode === "overlay" ? n.toggleOverPage() : (o(e ?? !0), u && !n && h(!m), f(!d));
|
|
1253
1253
|
}, [
|
|
1254
1254
|
n,
|
|
1255
1255
|
u,
|
|
1256
1256
|
m,
|
|
1257
1257
|
d
|
|
1258
|
-
]), w =
|
|
1259
|
-
u || n || d || (
|
|
1258
|
+
]), w = M(function(e) {
|
|
1259
|
+
u || n || d || (Ot.has(e.nativeEvent) ? b() : !m && e.clientX < Ct ? x(!0, wt) : m && e.clientX > Tt ? x(!1, Et) : b());
|
|
1260
1260
|
}, [
|
|
1261
1261
|
u,
|
|
1262
1262
|
n,
|
|
@@ -1264,9 +1264,9 @@ function Mt({ children: e }) {
|
|
|
1264
1264
|
m,
|
|
1265
1265
|
x,
|
|
1266
1266
|
b
|
|
1267
|
-
]), T =
|
|
1267
|
+
]), T = M(function() {
|
|
1268
1268
|
y.current && b();
|
|
1269
|
-
}, [b]),
|
|
1269
|
+
}, [b]), E = n ? jt(n, d) : Mt(u, d, m), ee = n?.closeOverPageAfterRouteChange;
|
|
1270
1270
|
N(function() {
|
|
1271
1271
|
b(), h(!1), ee?.();
|
|
1272
1272
|
}, [
|
|
@@ -1274,40 +1274,40 @@ function Mt({ children: e }) {
|
|
|
1274
1274
|
ee,
|
|
1275
1275
|
b
|
|
1276
1276
|
]), N(function() {
|
|
1277
|
-
a && localStorage.setItem(
|
|
1277
|
+
a && localStorage.setItem(St, d ? "1" : "");
|
|
1278
1278
|
}, [d, a]), N(function() {
|
|
1279
1279
|
return () => {
|
|
1280
1280
|
_({
|
|
1281
|
-
sidebarState:
|
|
1281
|
+
sidebarState: E,
|
|
1282
1282
|
locked: d
|
|
1283
1283
|
});
|
|
1284
1284
|
};
|
|
1285
|
-
}, [
|
|
1286
|
-
let O = g?.sidebarState ?? null, k = a && g?.sidebarState === "hidden" && !g.locked &&
|
|
1285
|
+
}, [E, d]);
|
|
1286
|
+
let O = g?.sidebarState ?? null, k = a && g?.sidebarState === "hidden" && !g.locked && E === "locked", A = n !== null, j = !A && l, te = P(function() {
|
|
1287
1287
|
return {
|
|
1288
1288
|
isSmallScreen: u,
|
|
1289
1289
|
isLastToggleInvokedByUser: a,
|
|
1290
|
-
sidebarState:
|
|
1290
|
+
sidebarState: E,
|
|
1291
1291
|
hideSidebar: S,
|
|
1292
1292
|
toggleSidebar: C,
|
|
1293
1293
|
prevSidebarState: O,
|
|
1294
1294
|
isDockedByUser: k,
|
|
1295
1295
|
setForceFloat: i,
|
|
1296
|
-
floatsWhenForced:
|
|
1296
|
+
floatsWhenForced: j,
|
|
1297
1297
|
hasPrimarySidebar: A
|
|
1298
1298
|
};
|
|
1299
1299
|
}, [
|
|
1300
1300
|
u,
|
|
1301
1301
|
a,
|
|
1302
|
-
|
|
1302
|
+
E,
|
|
1303
1303
|
S,
|
|
1304
1304
|
C,
|
|
1305
1305
|
O,
|
|
1306
1306
|
k,
|
|
1307
|
-
|
|
1307
|
+
j,
|
|
1308
1308
|
A
|
|
1309
1309
|
]);
|
|
1310
|
-
return /* @__PURE__ */ L(
|
|
1310
|
+
return /* @__PURE__ */ L(Dt.Provider, {
|
|
1311
1311
|
value: te,
|
|
1312
1312
|
children: /* @__PURE__ */ L("div", {
|
|
1313
1313
|
onPointerMove: w,
|
|
@@ -1318,8 +1318,8 @@ function Mt({ children: e }) {
|
|
|
1318
1318
|
});
|
|
1319
1319
|
}
|
|
1320
1320
|
//#endregion
|
|
1321
|
-
//#region src/blocks/Navigation/Sidebar/
|
|
1322
|
-
var
|
|
1321
|
+
//#region src/blocks/Navigation/Sidebar/Icon/Icon.tsx
|
|
1322
|
+
var Pt = "M10.417 10L14.167 10M10.417 10L12.0837 8.33337M10.417 10L12.0837 11.6667", Ft = {
|
|
1323
1323
|
open: {
|
|
1324
1324
|
rest: {
|
|
1325
1325
|
arrow: "opacity-0 translate-x-0",
|
|
@@ -1340,9 +1340,9 @@ var Nt = k("classic"), Pt = Nt.Provider, Ft = () => M(Nt), It = "M10.417 10L14.1
|
|
|
1340
1340
|
line: "opacity-100 translate-x-0"
|
|
1341
1341
|
}
|
|
1342
1342
|
}
|
|
1343
|
-
},
|
|
1344
|
-
function
|
|
1345
|
-
let n =
|
|
1343
|
+
}, It = "[transform-box:view-box] transition-[transform,opacity]";
|
|
1344
|
+
function Lt({ isExpanded: e, isHovered: t = !1 }) {
|
|
1345
|
+
let n = Ft[e ? "open" : "closed"][t ? "hover" : "rest"];
|
|
1346
1346
|
return /* @__PURE__ */ R("svg", {
|
|
1347
1347
|
width: "20",
|
|
1348
1348
|
height: "20",
|
|
@@ -1363,24 +1363,24 @@ function zt({ isExpanded: e, isHovered: t = !1 }) {
|
|
|
1363
1363
|
}),
|
|
1364
1364
|
/* @__PURE__ */ L("path", {
|
|
1365
1365
|
id: "arrow",
|
|
1366
|
-
d:
|
|
1366
|
+
d: Pt,
|
|
1367
1367
|
strokeWidth: "1.3",
|
|
1368
1368
|
strokeLinecap: "round",
|
|
1369
1369
|
strokeLinejoin: "round",
|
|
1370
|
-
className: a("stroke-current",
|
|
1370
|
+
className: a("stroke-current", It, _, "origin-[10.5835px_10px]", e ? "scale-x-100" : "-scale-x-100", n.arrow)
|
|
1371
1371
|
}),
|
|
1372
1372
|
/* @__PURE__ */ L("path", {
|
|
1373
1373
|
id: "line",
|
|
1374
1374
|
d: "M7.5 5L7.5 15",
|
|
1375
1375
|
strokeWidth: "1.3",
|
|
1376
1376
|
strokeLinecap: "round",
|
|
1377
|
-
className: a("stroke-current",
|
|
1377
|
+
className: a("stroke-current", It, _, n.line)
|
|
1378
1378
|
})
|
|
1379
1379
|
]
|
|
1380
1380
|
});
|
|
1381
1381
|
}
|
|
1382
|
-
function
|
|
1383
|
-
let { prevSidebarState: e, sidebarState: t, toggleSidebar: n } =
|
|
1382
|
+
function Rt() {
|
|
1383
|
+
let { prevSidebarState: e, sidebarState: t, toggleSidebar: n } = At(), r = F(null), [a, o] = I(!1), c = v() === "two-level";
|
|
1384
1384
|
N(function() {
|
|
1385
1385
|
c && e === "hidden" && t !== "hidden" && r.current?.focus();
|
|
1386
1386
|
}, [
|
|
@@ -1401,13 +1401,13 @@ function Bt() {
|
|
|
1401
1401
|
"aria-expanded": u,
|
|
1402
1402
|
onMouseEnter: () => o(!0),
|
|
1403
1403
|
onMouseLeave: () => o(!1),
|
|
1404
|
-
children: /* @__PURE__ */ L(
|
|
1404
|
+
children: /* @__PURE__ */ L(Lt, {
|
|
1405
1405
|
isExpanded: u,
|
|
1406
1406
|
isHovered: a
|
|
1407
1407
|
})
|
|
1408
1408
|
});
|
|
1409
1409
|
}
|
|
1410
|
-
function
|
|
1410
|
+
function zt({ isExpanded: e }) {
|
|
1411
1411
|
return /* @__PURE__ */ R("svg", {
|
|
1412
1412
|
width: "20",
|
|
1413
1413
|
height: "20",
|
|
@@ -1444,8 +1444,8 @@ function Vt({ isExpanded: e }) {
|
|
|
1444
1444
|
]
|
|
1445
1445
|
});
|
|
1446
1446
|
}
|
|
1447
|
-
function
|
|
1448
|
-
let { isDockedByUser: e, sidebarState: t, toggleSidebar: n, isSmallScreen: r } =
|
|
1447
|
+
function Bt() {
|
|
1448
|
+
let { isDockedByUser: e, sidebarState: t, toggleSidebar: n, isSmallScreen: r } = At(), i = F(null);
|
|
1449
1449
|
return N(() => {
|
|
1450
1450
|
e && i.current?.focus();
|
|
1451
1451
|
}, [e]), /* @__PURE__ */ R(s, {
|
|
@@ -1459,23 +1459,23 @@ function Ht() {
|
|
|
1459
1459
|
"aria-label": "Close Sidebar",
|
|
1460
1460
|
children: [/* @__PURE__ */ L("div", {
|
|
1461
1461
|
className: a("hidden", { flex: !r }),
|
|
1462
|
-
children: /* @__PURE__ */ L(
|
|
1462
|
+
children: /* @__PURE__ */ L(zt, { isExpanded: t === "locked" })
|
|
1463
1463
|
}), /* @__PURE__ */ L("div", {
|
|
1464
1464
|
className: a("hidden", { flex: r }),
|
|
1465
|
-
children: /* @__PURE__ */ L(
|
|
1466
|
-
icon:
|
|
1465
|
+
children: /* @__PURE__ */ L(x, {
|
|
1466
|
+
icon: b,
|
|
1467
1467
|
size: "md"
|
|
1468
1468
|
})
|
|
1469
1469
|
})]
|
|
1470
1470
|
});
|
|
1471
1471
|
}
|
|
1472
|
-
function
|
|
1473
|
-
let { hasPrimarySidebar: e } =
|
|
1474
|
-
return L(e ?
|
|
1472
|
+
function Vt() {
|
|
1473
|
+
let { hasPrimarySidebar: e } = At();
|
|
1474
|
+
return L(e ? Rt : Bt, {});
|
|
1475
1475
|
}
|
|
1476
1476
|
//#endregion
|
|
1477
1477
|
//#region src/addons/map/F0Map/components/F0MapSidebarToggle/F0MapSidebarToggle.tsx
|
|
1478
|
-
var
|
|
1478
|
+
var Ht = j(({ expanded: e, onToggle: t, label: n, bare: a = !1, dataTestId: o }, c) => {
|
|
1479
1479
|
let l = i(), u = n ?? (e ? l.map.controls.hidePanel : l.map.controls.showPanel), d = /* @__PURE__ */ L(s, {
|
|
1480
1480
|
ref: c,
|
|
1481
1481
|
variant: "ghost",
|
|
@@ -1486,29 +1486,29 @@ var Wt = A(({ expanded: e, onToggle: t, label: n, bare: a = !1, dataTestId: o },
|
|
|
1486
1486
|
title: u,
|
|
1487
1487
|
"aria-label": u,
|
|
1488
1488
|
"aria-expanded": e,
|
|
1489
|
-
children: /* @__PURE__ */ L(
|
|
1489
|
+
children: /* @__PURE__ */ L(zt, { isExpanded: e })
|
|
1490
1490
|
});
|
|
1491
1491
|
return /* @__PURE__ */ L(r, {
|
|
1492
1492
|
dataTestId: o,
|
|
1493
1493
|
children: a ? d : /* @__PURE__ */ L(je, { children: d })
|
|
1494
1494
|
});
|
|
1495
1495
|
});
|
|
1496
|
-
|
|
1496
|
+
Ht.displayName = "F0MapSidebarToggle";
|
|
1497
1497
|
//#endregion
|
|
1498
1498
|
//#region src/addons/map/F0Map/utils/arc.ts
|
|
1499
|
-
var
|
|
1499
|
+
var Ut = (e, t, n = .3, r = 64) => {
|
|
1500
1500
|
let [i, a] = e, [o, s] = t, c = (i + o) / 2, l = (a + s) / 2, u = c - (s - a) * n, d = l + (o - i) * n, f = [];
|
|
1501
1501
|
for (let e = 0; e <= r; e++) {
|
|
1502
1502
|
let t = e / r, n = 1 - t, c = n * n, l = 2 * n * t, p = t * t;
|
|
1503
1503
|
f.push([c * i + l * u + p * o, c * a + l * d + p * s]);
|
|
1504
1504
|
}
|
|
1505
1505
|
return f;
|
|
1506
|
-
},
|
|
1506
|
+
}, Wt = (e, t) => e.color ?? we(e.variant ?? "radical", t), Gt = (e, t) => e.color ?? we(e.variant ?? "radical", !t), Kt = ({ id: e, kind: t, coordinates: n, style: r, isDark: i }) => {
|
|
1507
1507
|
let a = r.width ?? 3;
|
|
1508
1508
|
return {
|
|
1509
1509
|
id: e,
|
|
1510
1510
|
coordinates: n,
|
|
1511
|
-
color:
|
|
1511
|
+
color: Wt(r, i),
|
|
1512
1512
|
width: a,
|
|
1513
1513
|
opacity: r.opacity ?? 1,
|
|
1514
1514
|
dashed: r.dashed ?? !1,
|
|
@@ -1516,21 +1516,21 @@ var Gt = (e, t, n = .3, r = 64) => {
|
|
|
1516
1516
|
width: a * 1.6,
|
|
1517
1517
|
opacity: 1
|
|
1518
1518
|
} : {
|
|
1519
|
-
color:
|
|
1519
|
+
color: Gt(r, i),
|
|
1520
1520
|
opacity: 1
|
|
1521
1521
|
}
|
|
1522
1522
|
};
|
|
1523
|
-
},
|
|
1524
|
-
let o = P(() => [...t.map((e) =>
|
|
1523
|
+
}, qt = ({ adapter: e, routes: t, arcs: n, isDark: r, onRouteClick: i, onArcClick: a }) => {
|
|
1524
|
+
let o = P(() => [...t.map((e) => Kt({
|
|
1525
1525
|
id: e.id,
|
|
1526
1526
|
kind: "route",
|
|
1527
1527
|
coordinates: e.coordinates,
|
|
1528
1528
|
style: e,
|
|
1529
1529
|
isDark: r
|
|
1530
|
-
})), ...n.map((e) =>
|
|
1530
|
+
})), ...n.map((e) => Kt({
|
|
1531
1531
|
id: e.id,
|
|
1532
1532
|
kind: "arc",
|
|
1533
|
-
coordinates:
|
|
1533
|
+
coordinates: Ut(e.from, e.to, e.curvature),
|
|
1534
1534
|
style: e,
|
|
1535
1535
|
isDark: r
|
|
1536
1536
|
}))], [
|
|
@@ -1558,24 +1558,24 @@ var Gt = (e, t, n = .3, r = 64) => {
|
|
|
1558
1558
|
o,
|
|
1559
1559
|
l
|
|
1560
1560
|
]), N(() => () => e.setLines([]), [e]), null;
|
|
1561
|
-
},
|
|
1561
|
+
}, Jt = ({ adapter: e, coords: t }) => (N(() => {
|
|
1562
1562
|
e.setCurrentLocation(t);
|
|
1563
1563
|
}, [e, t]), N(() => () => e.setCurrentLocation(null), [e]), null);
|
|
1564
|
-
|
|
1564
|
+
Jt.displayName = "CurrentLocationLayer";
|
|
1565
1565
|
//#endregion
|
|
1566
1566
|
//#region src/addons/map/F0Map/constants.ts
|
|
1567
|
-
var
|
|
1567
|
+
var Yt = {
|
|
1568
1568
|
curve: 1.42,
|
|
1569
1569
|
duration: 1400
|
|
1570
|
-
},
|
|
1570
|
+
}, Xt = 200, Zt = ({ dataTestId: e, className: t }) => /* @__PURE__ */ L(r, {
|
|
1571
1571
|
dataTestId: e,
|
|
1572
1572
|
children: /* @__PURE__ */ L("div", {
|
|
1573
1573
|
"aria-busy": "true",
|
|
1574
1574
|
"aria-live": "polite",
|
|
1575
1575
|
className: a("h-full w-full animate-pulse bg-f1-background-secondary", t)
|
|
1576
1576
|
})
|
|
1577
|
-
}),
|
|
1578
|
-
let [t, n] = I(null), r =
|
|
1577
|
+
}), Qt = (e) => {
|
|
1578
|
+
let [t, n] = I(null), r = M((t) => {
|
|
1579
1579
|
e && typeof navigator < "u" && navigator.geolocation && navigator.geolocation.getCurrentPosition((e) => {
|
|
1580
1580
|
let r = [e.coords.longitude, e.coords.latitude];
|
|
1581
1581
|
n(r), t?.(r);
|
|
@@ -1597,8 +1597,8 @@ var Zt = {
|
|
|
1597
1597
|
coords: t,
|
|
1598
1598
|
request: r
|
|
1599
1599
|
};
|
|
1600
|
-
},
|
|
1601
|
-
let [e, t] = I(!1), n = F(null), r =
|
|
1600
|
+
}, $t = () => {
|
|
1601
|
+
let [e, t] = I(!1), n = F(null), r = M((e) => {
|
|
1602
1602
|
if (n.current?.disconnect(), n.current = null, !e) return;
|
|
1603
1603
|
let r = () => t(e.closest(".dark") !== null);
|
|
1604
1604
|
r();
|
|
@@ -1613,17 +1613,17 @@ var Zt = {
|
|
|
1613
1613
|
containerRef: r,
|
|
1614
1614
|
isDark: e
|
|
1615
1615
|
};
|
|
1616
|
-
},
|
|
1617
|
-
maplibre: async () => (await import("./maplibre-
|
|
1616
|
+
}, en = {
|
|
1617
|
+
maplibre: async () => (await import("./maplibre-BjtWSbUZ.js")).createMaplibreAdapter,
|
|
1618
1618
|
google: async (e) => (await import("./google-CG30Y63J.js")).loadGoogleAdapter(e)
|
|
1619
|
-
},
|
|
1620
|
-
let n =
|
|
1619
|
+
}, tn = /* @__PURE__ */ new Map(), nn = (e, t) => {
|
|
1620
|
+
let n = tn.get(e);
|
|
1621
1621
|
if (n) return n;
|
|
1622
|
-
let r =
|
|
1623
|
-
throw
|
|
1622
|
+
let r = en[e](t).catch((t) => {
|
|
1623
|
+
throw tn.delete(e), t;
|
|
1624
1624
|
});
|
|
1625
|
-
return
|
|
1626
|
-
},
|
|
1625
|
+
return tn.set(e, r), r;
|
|
1626
|
+
}, rn = {
|
|
1627
1627
|
version: 8,
|
|
1628
1628
|
sources: { openmaptiles: {
|
|
1629
1629
|
type: "vector",
|
|
@@ -6511,7 +6511,7 @@ var Zt = {
|
|
|
6511
6511
|
],
|
|
6512
6512
|
name: "f0-dark",
|
|
6513
6513
|
metadata: { "f0:generated": !0 }
|
|
6514
|
-
},
|
|
6514
|
+
}, an = {
|
|
6515
6515
|
version: 8,
|
|
6516
6516
|
sources: { openmaptiles: {
|
|
6517
6517
|
type: "vector",
|
|
@@ -11399,7 +11399,7 @@ var Zt = {
|
|
|
11399
11399
|
],
|
|
11400
11400
|
name: "f0-light",
|
|
11401
11401
|
metadata: { "f0:generated": !0 }
|
|
11402
|
-
},
|
|
11402
|
+
}, on = [
|
|
11403
11403
|
{
|
|
11404
11404
|
featureType: "landscape",
|
|
11405
11405
|
elementType: "geometry.fill",
|
|
@@ -11555,7 +11555,7 @@ var Zt = {
|
|
|
11555
11555
|
elementType: "labels.icon",
|
|
11556
11556
|
stylers: [{ visibility: "off" }]
|
|
11557
11557
|
}
|
|
11558
|
-
],
|
|
11558
|
+
], sn = [
|
|
11559
11559
|
{
|
|
11560
11560
|
featureType: "landscape",
|
|
11561
11561
|
elementType: "geometry.fill",
|
|
@@ -11711,44 +11711,44 @@ var Zt = {
|
|
|
11711
11711
|
elementType: "labels.icon",
|
|
11712
11712
|
stylers: [{ visibility: "off" }]
|
|
11713
11713
|
}
|
|
11714
|
-
],
|
|
11714
|
+
], cn = {
|
|
11715
11715
|
provider: "maplibre",
|
|
11716
|
+
light: an,
|
|
11717
|
+
dark: rn
|
|
11718
|
+
}, ln = {
|
|
11719
|
+
provider: "google",
|
|
11716
11720
|
light: sn,
|
|
11717
11721
|
dark: on
|
|
11718
|
-
},
|
|
11719
|
-
provider: "google",
|
|
11720
|
-
light: ln,
|
|
11721
|
-
dark: cn
|
|
11722
|
-
}, fn = (e, t) => ({
|
|
11722
|
+
}, un = (e, t) => ({
|
|
11723
11723
|
featureType: e,
|
|
11724
11724
|
elementType: t,
|
|
11725
11725
|
stylers: [{ visibility: "off" }]
|
|
11726
|
-
}),
|
|
11727
|
-
|
|
11728
|
-
|
|
11729
|
-
|
|
11730
|
-
],
|
|
11726
|
+
}), dn = [
|
|
11727
|
+
un("poi", "labels"),
|
|
11728
|
+
un("transit", "labels"),
|
|
11729
|
+
un("road", "labels.icon")
|
|
11730
|
+
], fn = {
|
|
11731
11731
|
provider: "google",
|
|
11732
|
-
light:
|
|
11733
|
-
dark:
|
|
11734
|
-
},
|
|
11732
|
+
light: dn,
|
|
11733
|
+
dark: dn
|
|
11734
|
+
}, pn = (e) => e === "google" ? fn : cn, mn = (e, t, n) => {
|
|
11735
11735
|
let r = e.on(t, () => {
|
|
11736
11736
|
r(), n();
|
|
11737
11737
|
});
|
|
11738
11738
|
return r;
|
|
11739
|
-
},
|
|
11739
|
+
}, hn = {
|
|
11740
11740
|
center: [2.154, 41.39],
|
|
11741
11741
|
zoom: 11
|
|
11742
|
-
},
|
|
11742
|
+
}, gn = (e, t, n, r) => [
|
|
11743
11743
|
...e.map((e) => e.coordinates),
|
|
11744
11744
|
...t.flatMap((e) => e.coordinates),
|
|
11745
11745
|
...n.flatMap((e) => [e.from, e.to]),
|
|
11746
11746
|
...r.flatMap((e) => me(e.center, e.radiusMeters))
|
|
11747
|
-
],
|
|
11748
|
-
let l =
|
|
11747
|
+
], _n = (e) => e.top === 0 && e.right === 0 && e.bottom === 0 && e.left === 0, vn = ({ adapter: e, points: t, animate: n, routes: r = [], arcs: i = [], areas: a = [], gutter: o = 64, inset: s, size: c }) => {
|
|
11748
|
+
let l = gn(t, r, i, a);
|
|
11749
11749
|
if (l.length === 0) return;
|
|
11750
11750
|
let u = a.length > 0 ? 17 : 15;
|
|
11751
|
-
if (l.length > 1 &&
|
|
11751
|
+
if (l.length > 1 && _n(s)) {
|
|
11752
11752
|
e.fitCoordinates(l, {
|
|
11753
11753
|
gutter: o,
|
|
11754
11754
|
maxZoom: u,
|
|
@@ -11757,7 +11757,7 @@ var Zt = {
|
|
|
11757
11757
|
return;
|
|
11758
11758
|
}
|
|
11759
11759
|
let d = l.length === 1 ? {
|
|
11760
|
-
center:
|
|
11760
|
+
center: z(e, l[0], s, 14),
|
|
11761
11761
|
zoom: 14
|
|
11762
11762
|
} : ue({
|
|
11763
11763
|
adapter: e,
|
|
@@ -11768,20 +11768,20 @@ var Zt = {
|
|
|
11768
11768
|
maxZoom: u
|
|
11769
11769
|
});
|
|
11770
11770
|
d && (n ? e.easeTo(d, { animate: n }) : e.jumpTo(d, { animate: n }));
|
|
11771
|
-
},
|
|
11772
|
-
let
|
|
11773
|
-
|
|
11774
|
-
}, [
|
|
11771
|
+
}, yn = (e) => `${e.top},${e.right},${e.bottom},${e.left}`, bn = j(function({ markers: e = [], routes: o = [], arcs: s = [], areas: c = [], onRouteClick: l, onArcClick: u, selectedMarkerId: f, defaultSelectedMarkerId: p = null, onMarkerSelect: m, onMarkerDrag: h, onMarkerDragEnd: g, highlightedId: _ = null, viewportInset: v, centerOnMarkerClick: y = !1, fitToMarkers: b, initialViewport: x, mapStyle: S, interactive: C = !0, gestureHandling: w, minZoom: T, maxZoom: E = 18, showControls: D = !0, controlLabels: ee, showCurrentLocation: O = !1, fullScreen: k = !1, onSidebarToggle: A, sidebarExpanded: j = !1, sidebarToggleAddon: te, sidebarHeaderStart: ie, sidebar: P, detail: oe, detailOpen: de = !1, clearSelectionOnBackgroundClick: fe = !0, projection: pe = "mercator", provider: me, loading: he = !1, ariaLabel: ge, dataTestId: _e, className: ve }, ye) {
|
|
11772
|
+
let be = w ?? (k ? "greedy" : "cooperative"), B = i(), V = t(me), xe = n(), Se = F(null), H = F(null), [U, Ce] = I(null), [W, we] = I(!1), [Te, De] = I(!1), [Oe, ke] = I(0), Ae = ne(), K = d(), { containerRef: Ne, isDark: Fe } = $t(), Ie = M((e) => {
|
|
11773
|
+
Se.current = e, Ne(e);
|
|
11774
|
+
}, [Ne]), Le = Fe, Re = !S || S.provider === V, ze = Re ? S ?? pn(V) : pn(V), J = Le ? ze.dark : ze.light, Be = F(!1);
|
|
11775
11775
|
N(() => {
|
|
11776
|
-
Re || Be.current || (Be.current = !0, console.warn(`F0Map: ignoring a "${S?.provider}" mapStyle on the "${
|
|
11776
|
+
Re || Be.current || (Be.current = !0, console.warn(`F0Map: ignoring a "${S?.provider}" mapStyle on the "${V}" engine - the shapes are not interchangeable. Pass a "${V}" style, or none for its default look.`));
|
|
11777
11777
|
}, [
|
|
11778
11778
|
Re,
|
|
11779
11779
|
S?.provider,
|
|
11780
|
-
|
|
11780
|
+
V
|
|
11781
11781
|
]);
|
|
11782
|
-
let [Ve, He] = I(p), Ue = f === void 0 ? Ve : f, We =
|
|
11782
|
+
let [Ve, He] = I(p), Ue = f === void 0 ? Ve : f, We = M((e) => {
|
|
11783
11783
|
f === void 0 && He(e), m?.(e);
|
|
11784
|
-
}, [f, m]), Y =
|
|
11784
|
+
}, [f, m]), Y = j && !!A, Ge = de && !!oe, Ke = Y ? G.inset + G.listWidth + G.gap : G.inset, qe = Y ? G.inset : G.inset + G.toggleSize + G.gap, Je = Ge ? Ke + G.detailWidth : Y ? G.inset + G.listWidth : null, Ye = se(v, { left: Je === null ? 0 : Je + G.gap }), X = F(e);
|
|
11785
11785
|
X.current = e;
|
|
11786
11786
|
let Xe = F(o);
|
|
11787
11787
|
Xe.current = o;
|
|
@@ -11789,221 +11789,221 @@ var Zt = {
|
|
|
11789
11789
|
Ze.current = s;
|
|
11790
11790
|
let Qe = F(c);
|
|
11791
11791
|
Qe.current = c;
|
|
11792
|
-
let $e = F(
|
|
11793
|
-
$e.current =
|
|
11794
|
-
let
|
|
11795
|
-
|
|
11796
|
-
let
|
|
11797
|
-
|
|
11798
|
-
let
|
|
11799
|
-
|
|
11800
|
-
let
|
|
11801
|
-
|
|
11802
|
-
let
|
|
11792
|
+
let $e = F(pe);
|
|
11793
|
+
$e.current = pe;
|
|
11794
|
+
let et = F(We);
|
|
11795
|
+
et.current = We;
|
|
11796
|
+
let tt = F(Ue);
|
|
11797
|
+
tt.current = Ue;
|
|
11798
|
+
let nt = F(Ye);
|
|
11799
|
+
nt.current = Ye;
|
|
11800
|
+
let rt = F(fe);
|
|
11801
|
+
rt.current = fe;
|
|
11802
|
+
let Z = F(null), it = b ?? x === void 0, Q = M(() => {
|
|
11803
11803
|
let e = {
|
|
11804
|
-
width:
|
|
11805
|
-
height:
|
|
11804
|
+
width: Se.current?.clientWidth ?? 0,
|
|
11805
|
+
height: Se.current?.clientHeight ?? 0
|
|
11806
11806
|
};
|
|
11807
11807
|
return {
|
|
11808
|
-
inset:
|
|
11808
|
+
inset: ce(nt.current, e),
|
|
11809
11809
|
size: e
|
|
11810
11810
|
};
|
|
11811
|
-
}, []),
|
|
11812
|
-
|
|
11811
|
+
}, []), at = M((e, t) => {
|
|
11812
|
+
Z.current = { kind: "fit" }, vn({
|
|
11813
11813
|
adapter: e,
|
|
11814
11814
|
points: X.current,
|
|
11815
11815
|
animate: t,
|
|
11816
11816
|
routes: Xe.current,
|
|
11817
11817
|
arcs: Ze.current,
|
|
11818
11818
|
areas: Qe.current,
|
|
11819
|
-
|
|
11819
|
+
...Q()
|
|
11820
11820
|
});
|
|
11821
|
-
}, [
|
|
11822
|
-
|
|
11823
|
-
let
|
|
11821
|
+
}, [Q]), ot = F(at);
|
|
11822
|
+
ot.current = at;
|
|
11823
|
+
let $ = M((e, t) => {
|
|
11824
11824
|
let n = Math.max(e.getZoom(), 15);
|
|
11825
|
-
|
|
11825
|
+
Z.current = {
|
|
11826
11826
|
kind: "flight",
|
|
11827
11827
|
zoom: n
|
|
11828
11828
|
};
|
|
11829
|
-
let { inset: r } =
|
|
11829
|
+
let { inset: r } = Q();
|
|
11830
11830
|
e.easeTo({
|
|
11831
|
-
center:
|
|
11831
|
+
center: z(e, t.coordinates, r, n),
|
|
11832
11832
|
zoom: n
|
|
11833
|
-
}, { animate: !
|
|
11834
|
-
}, [
|
|
11835
|
-
let t =
|
|
11836
|
-
if (
|
|
11837
|
-
let { inset: e } =
|
|
11838
|
-
t.easeTo({ center:
|
|
11833
|
+
}, { animate: !K });
|
|
11834
|
+
}, [Q, K]), st = M((e) => {
|
|
11835
|
+
let t = H.current, n = X.current.find((t) => t.id === e);
|
|
11836
|
+
if (Z.current = null, y && t && n) {
|
|
11837
|
+
let { inset: e } = Q();
|
|
11838
|
+
t.easeTo({ center: z(t, n.coordinates, e) }, { animate: !K });
|
|
11839
11839
|
}
|
|
11840
|
-
|
|
11840
|
+
et.current(e);
|
|
11841
11841
|
}, [
|
|
11842
11842
|
y,
|
|
11843
|
-
|
|
11844
|
-
|
|
11843
|
+
Q,
|
|
11844
|
+
K
|
|
11845
11845
|
]), ut = F(!1);
|
|
11846
11846
|
N(() => {
|
|
11847
11847
|
ut.current || e.length <= 200 || (ut.current = !0, console.warn(`F0Map: ${e.length} markers exceeds the recommended maximum of 200. Markers are DOM elements - pan/zoom will degrade. Aggregate or filter the data, or wait for a GL clustering path.`));
|
|
11848
11848
|
}, [e.length]);
|
|
11849
|
-
let { coords: dt, request: ft } =
|
|
11850
|
-
|
|
11851
|
-
}, []), mt =
|
|
11852
|
-
|
|
11853
|
-
}, []), ht =
|
|
11854
|
-
|
|
11855
|
-
}, [
|
|
11849
|
+
let { coords: dt, request: ft } = Qt(O), pt = M(() => {
|
|
11850
|
+
Z.current = null, H.current?.zoomIn();
|
|
11851
|
+
}, []), mt = M(() => {
|
|
11852
|
+
Z.current = null, H.current?.zoomOut();
|
|
11853
|
+
}, []), ht = M(() => {
|
|
11854
|
+
H.current && at(H.current, !K);
|
|
11855
|
+
}, [at, K]), gt = M(() => {
|
|
11856
11856
|
ft((e) => {
|
|
11857
|
-
let t =
|
|
11857
|
+
let t = H.current;
|
|
11858
11858
|
if (!t) return;
|
|
11859
|
-
|
|
11860
|
-
let n = Math.max(t.getZoom(), 13), { inset: r } =
|
|
11859
|
+
Z.current = null;
|
|
11860
|
+
let n = Math.max(t.getZoom(), 13), { inset: r } = Q();
|
|
11861
11861
|
t.flyTo({
|
|
11862
|
-
center:
|
|
11862
|
+
center: z(t, e, r, n),
|
|
11863
11863
|
zoom: n
|
|
11864
|
-
}, { animate: !
|
|
11864
|
+
}, { animate: !K });
|
|
11865
11865
|
});
|
|
11866
11866
|
}, [
|
|
11867
11867
|
ft,
|
|
11868
|
-
|
|
11869
|
-
|
|
11870
|
-
]), _t =
|
|
11871
|
-
let t =
|
|
11868
|
+
Q,
|
|
11869
|
+
K
|
|
11870
|
+
]), _t = M((e) => {
|
|
11871
|
+
let t = H.current;
|
|
11872
11872
|
if (!t) return;
|
|
11873
|
-
|
|
11873
|
+
Z.current = null;
|
|
11874
11874
|
let n = ue({
|
|
11875
11875
|
adapter: t,
|
|
11876
11876
|
coordinates: e,
|
|
11877
|
-
|
|
11877
|
+
...Q(),
|
|
11878
11878
|
gutter: 64,
|
|
11879
11879
|
maxZoom: 16
|
|
11880
11880
|
});
|
|
11881
|
-
n && (
|
|
11882
|
-
}, [
|
|
11883
|
-
let t =
|
|
11884
|
-
t && n &&
|
|
11885
|
-
}, [
|
|
11881
|
+
n && (K ? t.jumpTo(n, { animate: !1 }) : t.flyTo(n));
|
|
11882
|
+
}, [Q, K]), vt = M((e) => {
|
|
11883
|
+
let t = H.current, n = X.current.find((t) => t.id === e);
|
|
11884
|
+
t && n && $(t, n), We(e);
|
|
11885
|
+
}, [$, We]);
|
|
11886
11886
|
N(() => {
|
|
11887
11887
|
if (!Ge || Ue === null) return;
|
|
11888
11888
|
let e = (e) => {
|
|
11889
|
-
e.key !== "Escape" || e.defaultPrevented || (e.preventDefault(),
|
|
11890
|
-
}, t =
|
|
11889
|
+
e.key !== "Escape" || e.defaultPrevented || (e.preventDefault(), et.current(null));
|
|
11890
|
+
}, t = Se.current?.ownerDocument ?? document;
|
|
11891
11891
|
return t.addEventListener("keydown", e), () => t.removeEventListener("keydown", e);
|
|
11892
|
-
}, [Ge, Ue]),
|
|
11893
|
-
getNativeMap: () =>
|
|
11892
|
+
}, [Ge, Ue]), re(ye, () => ({
|
|
11893
|
+
getNativeMap: () => H.current?.native() ?? null,
|
|
11894
11894
|
focusMarker: (e) => {
|
|
11895
|
-
let t =
|
|
11896
|
-
t && n && (
|
|
11895
|
+
let t = H.current, n = X.current.find((t) => t.id === e);
|
|
11896
|
+
t && n && ($(t, n), et.current(e));
|
|
11897
11897
|
},
|
|
11898
11898
|
fitToMarkers: () => {
|
|
11899
|
-
|
|
11899
|
+
H.current && at(H.current, !K);
|
|
11900
11900
|
},
|
|
11901
|
-
clearSelection: () =>
|
|
11901
|
+
clearSelection: () => et.current(null)
|
|
11902
11902
|
}), [
|
|
11903
|
-
|
|
11904
|
-
|
|
11905
|
-
|
|
11903
|
+
at,
|
|
11904
|
+
$,
|
|
11905
|
+
K
|
|
11906
11906
|
]);
|
|
11907
11907
|
let yt = F(J);
|
|
11908
11908
|
yt.current = J;
|
|
11909
|
-
let bt = F(
|
|
11910
|
-
bt.current =
|
|
11911
|
-
let xt = F(null), St = F(x ??
|
|
11909
|
+
let bt = F(xe);
|
|
11910
|
+
bt.current = xe;
|
|
11911
|
+
let xt = F(null), St = F(x ?? hn);
|
|
11912
11912
|
N(() => {
|
|
11913
|
-
if (
|
|
11914
|
-
let e =
|
|
11913
|
+
if (he) return;
|
|
11914
|
+
let e = Se.current;
|
|
11915
11915
|
if (!e) return;
|
|
11916
11916
|
xt.current = yt.current;
|
|
11917
11917
|
let t = St.current, n = null, r = !1, i = [];
|
|
11918
|
-
return
|
|
11918
|
+
return nn(V, bt.current).then((i) => {
|
|
11919
11919
|
if (!r) {
|
|
11920
11920
|
try {
|
|
11921
11921
|
n = i({
|
|
11922
11922
|
container: e,
|
|
11923
11923
|
style: yt.current,
|
|
11924
11924
|
center: t.center,
|
|
11925
|
-
zoom: t.zoom ??
|
|
11925
|
+
zoom: t.zoom ?? hn.zoom,
|
|
11926
11926
|
minZoom: T,
|
|
11927
11927
|
maxZoom: E,
|
|
11928
11928
|
interactive: C,
|
|
11929
|
-
cooperativeGestures:
|
|
11929
|
+
cooperativeGestures: be === "cooperative"
|
|
11930
11930
|
});
|
|
11931
11931
|
} catch {
|
|
11932
|
-
|
|
11932
|
+
we(!0);
|
|
11933
11933
|
return;
|
|
11934
11934
|
}
|
|
11935
11935
|
a(n);
|
|
11936
11936
|
}
|
|
11937
11937
|
}).catch((e) => {
|
|
11938
|
-
console.error("[F0Map] could not load the map engine", e), r ||
|
|
11938
|
+
console.error("[F0Map] could not load the map engine", e), r || De(!0);
|
|
11939
11939
|
}), () => {
|
|
11940
|
-
r = !0, i.forEach((e) => e()), n && (
|
|
11940
|
+
r = !0, i.forEach((e) => e()), n && (H.current = null, Ce(null), n.destroy());
|
|
11941
11941
|
};
|
|
11942
11942
|
function a(e) {
|
|
11943
|
-
|
|
11943
|
+
H.current = e, Ce(e), we(!1);
|
|
11944
11944
|
let t = !1;
|
|
11945
|
-
i.push(
|
|
11946
|
-
t = !0,
|
|
11945
|
+
i.push(mn(e, "ready", () => {
|
|
11946
|
+
t = !0, De(!1), e.resize(), it && vn({
|
|
11947
11947
|
adapter: e,
|
|
11948
11948
|
points: X.current,
|
|
11949
11949
|
animate: !1,
|
|
11950
11950
|
routes: Xe.current,
|
|
11951
11951
|
arcs: Ze.current,
|
|
11952
11952
|
areas: Qe.current,
|
|
11953
|
-
|
|
11953
|
+
...Q()
|
|
11954
11954
|
}), e.setGlobeProjection($e.current === "globe");
|
|
11955
11955
|
}), e.on("error", () => {
|
|
11956
|
-
t ||
|
|
11956
|
+
t || De(!0);
|
|
11957
11957
|
}), e.on("click", () => {
|
|
11958
|
-
|
|
11958
|
+
rt.current && et.current(null);
|
|
11959
11959
|
}));
|
|
11960
11960
|
}
|
|
11961
11961
|
}, [
|
|
11962
|
-
|
|
11962
|
+
he,
|
|
11963
11963
|
C,
|
|
11964
|
-
|
|
11964
|
+
be,
|
|
11965
11965
|
T,
|
|
11966
11966
|
E,
|
|
11967
|
-
|
|
11968
|
-
|
|
11967
|
+
it,
|
|
11968
|
+
V,
|
|
11969
11969
|
Oe
|
|
11970
11970
|
]), N(() => {
|
|
11971
|
-
let e =
|
|
11972
|
-
e && xt.current !== J && (xt.current = J, e.applyStyle(J),
|
|
11971
|
+
let e = H.current;
|
|
11972
|
+
e && xt.current !== J && (xt.current = J, e.applyStyle(J), mn(e, "styled", () => e.setGlobeProjection($e.current === "globe")));
|
|
11973
11973
|
}, [J]), N(() => {
|
|
11974
|
-
|
|
11975
|
-
}, [
|
|
11976
|
-
let Ct = F(
|
|
11977
|
-
Ct.current =
|
|
11974
|
+
H.current?.setGlobeProjection(pe === "globe");
|
|
11975
|
+
}, [pe]);
|
|
11976
|
+
let Ct = F($);
|
|
11977
|
+
Ct.current = $, N(() => {
|
|
11978
11978
|
if (!_) return;
|
|
11979
|
-
let e =
|
|
11979
|
+
let e = H.current, t = X.current.find((e) => e.id === _);
|
|
11980
11980
|
e && t && Ct.current(e, t);
|
|
11981
11981
|
}, [_]);
|
|
11982
|
-
let wt =
|
|
11982
|
+
let wt = yn(Ye), Tt = F(null);
|
|
11983
11983
|
N(() => {
|
|
11984
11984
|
let e = Tt.current;
|
|
11985
|
-
Tt.current =
|
|
11986
|
-
let t =
|
|
11985
|
+
Tt.current = nt.current;
|
|
11986
|
+
let t = H.current;
|
|
11987
11987
|
if (!e || !t) return;
|
|
11988
|
-
let { inset: n, size: r } =
|
|
11988
|
+
let { inset: n, size: r } = Q(), i = Z.current, a = !K, o = X.current.find((e) => e.id === tt.current);
|
|
11989
11989
|
if (o) {
|
|
11990
11990
|
let e = i?.kind === "flight" ? i.zoom : void 0;
|
|
11991
11991
|
t.easeTo({
|
|
11992
|
-
center:
|
|
11992
|
+
center: z(t, o.coordinates, n, e),
|
|
11993
11993
|
zoom: e
|
|
11994
11994
|
}, { animate: a });
|
|
11995
11995
|
return;
|
|
11996
11996
|
}
|
|
11997
11997
|
if (i?.kind === "fit") {
|
|
11998
|
-
|
|
11998
|
+
ot.current(t, a);
|
|
11999
11999
|
return;
|
|
12000
12000
|
}
|
|
12001
|
-
let s = ce(
|
|
12001
|
+
let s = le(ce(e, r)), c = le(n), l = t.project(t.getCenter()), u = l && t.unproject({
|
|
12002
12002
|
x: l.x + s.x - c.x,
|
|
12003
12003
|
y: l.y + s.y - c.y
|
|
12004
12004
|
});
|
|
12005
12005
|
u && t.easeTo({ center: u }, { animate: a });
|
|
12006
|
-
}, [wt,
|
|
12006
|
+
}, [wt, Q]);
|
|
12007
12007
|
let Et = o.length > 0 || s.length > 0, Dt = Je === null ? 0 : Je + G.gap - G.inset, Ot = F({
|
|
12008
12008
|
from: Dt,
|
|
12009
12009
|
to: Dt
|
|
@@ -12012,69 +12012,69 @@ var Zt = {
|
|
|
12012
12012
|
from: Ot.current.to,
|
|
12013
12013
|
to: Dt
|
|
12014
12014
|
});
|
|
12015
|
-
let kt = Dt > Ot.current.from ?
|
|
12015
|
+
let kt = Dt > Ot.current.from ? q.enter : q.exit, At = Y ? q.enter : q.exit;
|
|
12016
12016
|
return /* @__PURE__ */ L(r, {
|
|
12017
|
-
dataTestId:
|
|
12018
|
-
children:
|
|
12017
|
+
dataTestId: _e,
|
|
12018
|
+
children: he ? /* @__PURE__ */ L(Zt, { className: ve }) : /* @__PURE__ */ R("div", {
|
|
12019
12019
|
ref: Ie,
|
|
12020
12020
|
role: "region",
|
|
12021
|
-
"aria-label":
|
|
12022
|
-
className: a("f0-map relative h-full w-full overflow-hidden", Le && "dark", !k && "rounded-2xl border border-solid border-f1-border-secondary",
|
|
12021
|
+
"aria-label": ge ?? B.map.region,
|
|
12022
|
+
className: a("f0-map relative h-full w-full overflow-hidden", Le && "dark", !k && "rounded-2xl border border-solid border-f1-border-secondary", ve),
|
|
12023
12023
|
children: [
|
|
12024
12024
|
/* @__PURE__ */ L("a", {
|
|
12025
12025
|
href: `#${Ae}`,
|
|
12026
12026
|
className: "sr-only rounded-md focus:not-sr-only focus:absolute focus:left-2 focus:top-2 focus:z-30 focus:bg-f1-background focus:px-3 focus:py-2 focus:text-sm focus:text-f1-foreground focus:shadow-md focus:outline-none focus:ring-1 focus:ring-f1-special-ring",
|
|
12027
|
-
children:
|
|
12027
|
+
children: B.map.skipToList
|
|
12028
12028
|
}),
|
|
12029
12029
|
/* @__PURE__ */ L("div", {
|
|
12030
12030
|
role: "status",
|
|
12031
12031
|
"aria-live": "polite",
|
|
12032
12032
|
className: "sr-only",
|
|
12033
|
-
children: `${e.length} ${e.length === 1 ?
|
|
12033
|
+
children: `${e.length} ${e.length === 1 ? B.map.location : B.map.locations}`
|
|
12034
12034
|
}),
|
|
12035
|
-
!
|
|
12036
|
-
adapter:
|
|
12035
|
+
!W && U && c.length > 0 ? /* @__PURE__ */ L(Ee, {
|
|
12036
|
+
adapter: U,
|
|
12037
12037
|
areas: c,
|
|
12038
12038
|
isDark: Le
|
|
12039
12039
|
}) : null,
|
|
12040
|
-
!
|
|
12041
|
-
adapter:
|
|
12040
|
+
!W && U && dt ? /* @__PURE__ */ R(ae, { children: [/* @__PURE__ */ L(Jt, {
|
|
12041
|
+
adapter: U,
|
|
12042
12042
|
coords: dt
|
|
12043
12043
|
}), /* @__PURE__ */ L("span", {
|
|
12044
12044
|
className: "sr-only",
|
|
12045
|
-
children:
|
|
12045
|
+
children: B.map.currentLocation
|
|
12046
12046
|
})] }) : null,
|
|
12047
|
-
!
|
|
12048
|
-
adapter:
|
|
12047
|
+
!W && U && Et ? /* @__PURE__ */ L(qt, {
|
|
12048
|
+
adapter: U,
|
|
12049
12049
|
routes: o,
|
|
12050
12050
|
arcs: s,
|
|
12051
12051
|
isDark: Le,
|
|
12052
12052
|
onRouteClick: l,
|
|
12053
12053
|
onArcClick: u
|
|
12054
12054
|
}) : null,
|
|
12055
|
-
!
|
|
12056
|
-
adapter:
|
|
12055
|
+
!W && U && e.length > 0 ? /* @__PURE__ */ L(ct, {
|
|
12056
|
+
adapter: U,
|
|
12057
12057
|
points: e,
|
|
12058
12058
|
selectedId: Ue,
|
|
12059
12059
|
highlightedId: _,
|
|
12060
|
-
onSelect:
|
|
12060
|
+
onSelect: st,
|
|
12061
12061
|
onMarkerDrag: h,
|
|
12062
12062
|
onMarkerDragEnd: g,
|
|
12063
12063
|
onClusterExpand: _t
|
|
12064
12064
|
}) : null,
|
|
12065
|
-
!
|
|
12065
|
+
!W && U && oe ? /* @__PURE__ */ L(lt, {
|
|
12066
12066
|
open: Ge,
|
|
12067
12067
|
offsetX: Ke,
|
|
12068
12068
|
offsetY: qe,
|
|
12069
12069
|
width: G.detailWidth,
|
|
12070
12070
|
entrance: "grow",
|
|
12071
|
-
ariaLabel:
|
|
12072
|
-
children:
|
|
12071
|
+
ariaLabel: B.map.detailPanel,
|
|
12072
|
+
children: oe
|
|
12073
12073
|
}) : null,
|
|
12074
|
-
!
|
|
12074
|
+
!W && U && A ? /* @__PURE__ */ L("div", {
|
|
12075
12075
|
className: a("absolute left-2 top-2 z-10", Y && "opacity-0"),
|
|
12076
12076
|
style: {
|
|
12077
|
-
transitionProperty:
|
|
12077
|
+
transitionProperty: K ? "none" : "opacity",
|
|
12078
12078
|
transitionDuration: At.duration,
|
|
12079
12079
|
transitionTimingFunction: At.easing
|
|
12080
12080
|
},
|
|
@@ -12084,30 +12084,30 @@ var Zt = {
|
|
|
12084
12084
|
ref: (e) => {
|
|
12085
12085
|
Y ? e?.setAttribute("inert", "") : e?.removeAttribute("inert");
|
|
12086
12086
|
},
|
|
12087
|
-
children: [/* @__PURE__ */ L(
|
|
12087
|
+
children: [/* @__PURE__ */ L(Ht, {
|
|
12088
12088
|
expanded: !1,
|
|
12089
12089
|
onToggle: A
|
|
12090
|
-
}),
|
|
12090
|
+
}), te ? /* @__PURE__ */ L(je, { children: te }) : null]
|
|
12091
12091
|
})
|
|
12092
12092
|
}) : null,
|
|
12093
|
-
!
|
|
12093
|
+
!W && U && A ? /* @__PURE__ */ L(lt, {
|
|
12094
12094
|
open: Y,
|
|
12095
12095
|
offsetX: G.inset,
|
|
12096
12096
|
width: G.listWidth,
|
|
12097
|
-
headerStart:
|
|
12098
|
-
headerEnd: /* @__PURE__ */ L(
|
|
12097
|
+
headerStart: ie,
|
|
12098
|
+
headerEnd: /* @__PURE__ */ L(Ht, {
|
|
12099
12099
|
expanded: !0,
|
|
12100
12100
|
onToggle: A,
|
|
12101
12101
|
bare: !0,
|
|
12102
12102
|
dataTestId: "map-panel-toggle-open"
|
|
12103
12103
|
}),
|
|
12104
|
-
children:
|
|
12104
|
+
children: P
|
|
12105
12105
|
}) : null,
|
|
12106
|
-
!
|
|
12107
|
-
className: a("absolute left-2 z-10",
|
|
12106
|
+
!W && U && D && C ? /* @__PURE__ */ L("div", {
|
|
12107
|
+
className: a("absolute left-2 z-10", V === "google" ? "bottom-8" : "bottom-2"),
|
|
12108
12108
|
style: {
|
|
12109
12109
|
transform: `translateX(${Dt}px)`,
|
|
12110
|
-
transitionProperty:
|
|
12110
|
+
transitionProperty: K ? "none" : "transform",
|
|
12111
12111
|
transitionDuration: kt.duration,
|
|
12112
12112
|
transitionTimingFunction: kt.easing
|
|
12113
12113
|
},
|
|
@@ -12119,32 +12119,32 @@ var Zt = {
|
|
|
12119
12119
|
labels: ee
|
|
12120
12120
|
})
|
|
12121
12121
|
}) : null,
|
|
12122
|
-
|
|
12122
|
+
Te && !W ? /* @__PURE__ */ R("div", {
|
|
12123
12123
|
className: "absolute inset-x-0 top-0 z-30 flex items-center justify-between gap-3 border-b border-solid border-f1-border-secondary bg-f1-background px-4 py-2 text-sm text-f1-foreground",
|
|
12124
|
-
children: [/* @__PURE__ */ L("span", { children:
|
|
12124
|
+
children: [/* @__PURE__ */ L("span", { children: B.map.loadError }), /* @__PURE__ */ L("button", {
|
|
12125
12125
|
type: "button",
|
|
12126
12126
|
onClick: () => {
|
|
12127
|
-
|
|
12128
|
-
let e =
|
|
12127
|
+
De(!1);
|
|
12128
|
+
let e = H.current;
|
|
12129
12129
|
e ? e.applyStyle(yt.current) : ke((e) => e + 1);
|
|
12130
12130
|
},
|
|
12131
12131
|
className: "font-medium underline",
|
|
12132
|
-
children:
|
|
12132
|
+
children: B.map.retry
|
|
12133
12133
|
})]
|
|
12134
12134
|
}) : null,
|
|
12135
|
-
/* @__PURE__ */ L(
|
|
12135
|
+
/* @__PURE__ */ L(Pe, {
|
|
12136
12136
|
id: Ae,
|
|
12137
|
-
label:
|
|
12137
|
+
label: B.map.listLabel,
|
|
12138
12138
|
points: e,
|
|
12139
12139
|
selectedId: Ue,
|
|
12140
12140
|
onSelect: vt,
|
|
12141
|
-
visible:
|
|
12141
|
+
visible: W
|
|
12142
12142
|
})
|
|
12143
12143
|
]
|
|
12144
12144
|
})
|
|
12145
12145
|
});
|
|
12146
12146
|
});
|
|
12147
|
-
|
|
12148
|
-
var
|
|
12147
|
+
bn.displayName = "F0Map";
|
|
12148
|
+
var xn = bn;
|
|
12149
12149
|
//#endregion
|
|
12150
|
-
export {
|
|
12150
|
+
export { lt as _, fn as a, Me as b, Xt as c, zt as d, Nt as f, _t as g, bt as h, ln as i, Ht as l, At as m, pn as n, Zt as o, kt as p, cn as r, Yt as s, xn as t, Vt as u, Ke as v, Pe as y };
|