@factorialco/f0-react 8.17.0 → 8.19.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/{ChatPdfThumbnail-DOuDKXKf.js → ChatPdfThumbnail-QQ-DIFjX.js} +1 -1
- package/dist/{ChatPostComposerDialog-Cor8UXu-.js → ChatPostComposerDialog-B9ZkZBQ_.js} +3 -3
- package/dist/{DocumentToolbar-97n2nXUO.js → DocumentToolbar-CLOwkjWF.js} +2 -2
- package/dist/{DocxViewer-B3fLc2DK.js → DocxViewer-xQ1VGshu.js} +2 -2
- package/dist/{F0AiProcessingOverlay-CF4m9csf.js → F0AiProcessingOverlay-ChuNuaON.js} +1 -1
- package/dist/{F0CanvasPanel-CqwBZSlw.js → F0CanvasPanel-BEQLTZPB.js} +14912 -14887
- package/dist/{F0Map-F7WNYPHU.js → F0Map-DCamR9ck.js} +322 -319
- package/dist/{F0VideoPlayer-XnjKEpzT.js → F0VideoPlayer-BquSWbzr.js} +2 -2
- package/dist/{MapProvider--aDfTV7Z.js → MapProvider-84Qqrrlq.js} +2239 -2231
- package/dist/{SheetViewer-CzYl8GLG.js → SheetViewer-RF8QUteM.js} +2 -2
- package/dist/{TextViewer-B2jfln7v.js → TextViewer-BfSoMHHy.js} +2 -2
- package/dist/ai.d.ts +2 -0
- package/dist/ai.js +2 -2
- package/dist/component-status.js +1 -1
- package/dist/{experimental-DJufKxVG.js → experimental-C_P1vSrA.js} +4911 -4832
- package/dist/experimental.d.ts +21 -3
- package/dist/experimental.js +200 -199
- package/dist/f0.d.ts +2 -0
- package/dist/f0.js +10 -10
- package/dist/index-C3RxAkcX.js +4 -0
- package/dist/{index-BTZVSZUV.js → index-CE0LkHWA.js} +2 -2
- package/dist/{index-C6DiQWUC.js → index-CnQnZEqH.js} +3 -3
- package/dist/{index-QrmVaDiy.js → index-DbwzNe2F.js} +1 -1
- package/dist/{index-DagDcfjo.js → index-GMXyKXCE.js} +3 -3
- package/dist/{pdfWorker-D58h5D59.js → pdfWorker-CdLQgVnT.js} +2 -2
- package/dist/styles.css +1 -1
- package/icons/modules/Marketplace.js +1 -1
- package/icons/modules/Megaphone.d.ts +4 -0
- package/icons/modules/Megaphone.d.ts.map +1 -0
- package/icons/modules/Megaphone.js +5 -0
- package/icons/modules/index.d.ts +1 -0
- package/icons/modules/index.d.ts.map +1 -1
- package/icons/modules/index.js +1 -0
- package/package.json +2 -2
- package/dist/index-Cywo9_7S.js +0 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
2
|
-
import { forwardRef as re, useState as F, useEffect as N, useRef as M, useContext as Ca, createContext as Aa, useCallback as
|
|
3
|
-
import { a4 as Xt, u as se, a5 as le, y as Ce, a6 as Ea, a7 as $a, a8 as Oa, i as Ba, n as be, a9 as Wa, v as Yt, aa as Je, ab as tt, ac as Ie, ad as Da, ae as Ut, af as Ha, ag as Xa, ah as
|
|
4
|
-
import { c as Ua, d as Ga, e as Za } from "./MapProvider
|
|
1
|
+
import { jsx as o, jsxs as B, Fragment as Ee } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as re, useState as F, useEffect as N, useRef as M, useContext as Ca, createContext as Aa, useCallback as O, useMemo as et, useId as Ia, useImperativeHandle as Fa } from "react";
|
|
3
|
+
import { a4 as Xt, u as se, a5 as le, y as Ce, a6 as Ea, a7 as $a, a8 as Oa, i as Ba, n as be, a9 as Wa, v as Yt, aa as Je, ab as tt, ac as Ie, ad as Da, ae as Ut, af as Ha, ag as Xa, ah as _t, ai as Gt, aj as Ya } from "./F0CanvasPanel-BEQLTZPB.js";
|
|
4
|
+
import { c as Ua, d as Ga, e as Za } from "./MapProvider-84Qqrrlq.js";
|
|
5
5
|
import { d as W, f as Ka } from "./tooltip-CrXp1Uaz.js";
|
|
6
6
|
import { createPortal as qa } from "react-dom";
|
|
7
7
|
const Va = (e, t) => ({
|
|
@@ -40,13 +40,13 @@ const Va = (e, t) => ({
|
|
|
40
40
|
const s = e.cameraForCoordinates(t, { gutter: a });
|
|
41
41
|
if (!s)
|
|
42
42
|
return null;
|
|
43
|
-
const p = (
|
|
43
|
+
const p = (u, f, b) => u > 2 * a ? (u - f - b - 2 * a) / (u - 2 * a) : 1, g = Math.min(
|
|
44
44
|
p(l.width, n.left, n.right),
|
|
45
45
|
p(l.height, n.top, n.bottom)
|
|
46
|
-
),
|
|
46
|
+
), m = s.zoom ?? e.getZoom();
|
|
47
47
|
if (g <= 0)
|
|
48
|
-
return { center: s.center, zoom: Math.min(
|
|
49
|
-
const r = Math.min(
|
|
48
|
+
return { center: s.center, zoom: Math.min(m, i) };
|
|
49
|
+
const r = Math.min(m + Math.log2(g), i);
|
|
50
50
|
return { center: he(e, s.center, n, r), zoom: r };
|
|
51
51
|
}, Kt = {
|
|
52
52
|
background: "transparent",
|
|
@@ -78,8 +78,8 @@ const Va = (e, t) => ({
|
|
|
78
78
|
}
|
|
79
79
|
) }), Vt = re(
|
|
80
80
|
({ onZoomIn: e, onZoomOut: t, onFit: n, onLocate: l, labels: a, dataTestId: i }, s) => {
|
|
81
|
-
const p = se(), g = !!(l || n),
|
|
82
|
-
return /* @__PURE__ */ o(le, { dataTestId: i, children: /* @__PURE__ */
|
|
81
|
+
const p = se(), g = !!(l || n), m = !!(e || t), r = (u) => /* @__PURE__ */ o(lt, { children: u });
|
|
82
|
+
return /* @__PURE__ */ o(le, { dataTestId: i, children: /* @__PURE__ */ B(
|
|
83
83
|
"div",
|
|
84
84
|
{
|
|
85
85
|
ref: s,
|
|
@@ -89,7 +89,7 @@ const Va = (e, t) => ({
|
|
|
89
89
|
className: "flex flex-col items-center gap-2",
|
|
90
90
|
children: [
|
|
91
91
|
g ? r(
|
|
92
|
-
/* @__PURE__ */
|
|
92
|
+
/* @__PURE__ */ B(Ee, { children: [
|
|
93
93
|
n ? /* @__PURE__ */ o(
|
|
94
94
|
Ce,
|
|
95
95
|
{
|
|
@@ -114,8 +114,8 @@ const Va = (e, t) => ({
|
|
|
114
114
|
) : null
|
|
115
115
|
] })
|
|
116
116
|
) : null,
|
|
117
|
-
|
|
118
|
-
/* @__PURE__ */
|
|
117
|
+
m ? r(
|
|
118
|
+
/* @__PURE__ */ B(Ee, { children: [
|
|
119
119
|
e ? /* @__PURE__ */ o(
|
|
120
120
|
Ce,
|
|
121
121
|
{
|
|
@@ -169,14 +169,14 @@ const Qa = (e, t) => {
|
|
|
169
169
|
id: s,
|
|
170
170
|
dataTestId: p,
|
|
171
171
|
className: g
|
|
172
|
-
},
|
|
173
|
-
const r = se(),
|
|
174
|
-
return /* @__PURE__ */ o(le, { dataTestId: p, children: /* @__PURE__ */
|
|
172
|
+
}, m) {
|
|
173
|
+
const r = se(), u = i ?? r.map.listLabel;
|
|
174
|
+
return /* @__PURE__ */ o(le, { dataTestId: p, children: /* @__PURE__ */ B(
|
|
175
175
|
"nav",
|
|
176
176
|
{
|
|
177
|
-
ref:
|
|
177
|
+
ref: m,
|
|
178
178
|
id: s,
|
|
179
|
-
"aria-label":
|
|
179
|
+
"aria-label": u,
|
|
180
180
|
tabIndex: -1,
|
|
181
181
|
className: W(
|
|
182
182
|
"outline-none",
|
|
@@ -184,7 +184,7 @@ const Qa = (e, t) => {
|
|
|
184
184
|
g
|
|
185
185
|
),
|
|
186
186
|
children: [
|
|
187
|
-
a ? /* @__PURE__ */ o("h2", { className: "text-f1-foreground mb-2 text-base font-medium", children:
|
|
187
|
+
a ? /* @__PURE__ */ o("h2", { className: "text-f1-foreground mb-2 text-base font-medium", children: u }) : null,
|
|
188
188
|
/* @__PURE__ */ o("ul", { className: a ? "flex flex-col gap-0.5" : void 0, children: t.map((f) => /* @__PURE__ */ o("li", { children: /* @__PURE__ */ o(
|
|
189
189
|
"button",
|
|
190
190
|
{
|
|
@@ -222,37 +222,37 @@ const en = ({
|
|
|
222
222
|
}
|
|
223
223
|
let p = 0;
|
|
224
224
|
const g = () => {
|
|
225
|
-
const
|
|
225
|
+
const u = [];
|
|
226
226
|
for (const c of t) {
|
|
227
227
|
const k = e.project(c.coordinates);
|
|
228
228
|
if (!k)
|
|
229
229
|
return;
|
|
230
|
-
|
|
230
|
+
u.push(k);
|
|
231
231
|
}
|
|
232
|
-
const f = t.length,
|
|
233
|
-
const L =
|
|
232
|
+
const f = t.length, b = l * l, y = a * a, z = (c, k) => {
|
|
233
|
+
const L = u[c].x - u[k].x, P = u[c].y - u[k].y;
|
|
234
234
|
return L * L + P * P;
|
|
235
|
-
},
|
|
236
|
-
for (;
|
|
237
|
-
c =
|
|
235
|
+
}, x = Array.from({ length: f }, (c, k) => k), _ = (c) => {
|
|
236
|
+
for (; x[c] !== c; )
|
|
237
|
+
c = x[c] = x[x[c]];
|
|
238
238
|
return c;
|
|
239
|
-
},
|
|
240
|
-
const L =
|
|
241
|
-
L !== P && (
|
|
242
|
-
},
|
|
239
|
+
}, R = (c, k) => {
|
|
240
|
+
const L = _(c), P = _(k);
|
|
241
|
+
L !== P && (x[L] = P);
|
|
242
|
+
}, d = Array.from({ length: f }, () => !1);
|
|
243
243
|
for (let c = 0; c < f; c++)
|
|
244
244
|
for (let k = c + 1; k < f; k++)
|
|
245
|
-
|
|
245
|
+
z(c, k) <= b && (d[c] = d[k] = !0, R(c, k));
|
|
246
246
|
for (let c = 0; c < f; c++)
|
|
247
247
|
for (let k = c + 1; k < f; k++)
|
|
248
|
-
(
|
|
249
|
-
const
|
|
248
|
+
(d[c] || d[k]) && z(c, k) <= y && R(c, k);
|
|
249
|
+
const w = /* @__PURE__ */ new Map();
|
|
250
250
|
for (let c = 0; c < f; c++) {
|
|
251
|
-
const k =
|
|
252
|
-
L ? L.push(c) :
|
|
251
|
+
const k = _(c), L = w.get(k);
|
|
252
|
+
L ? L.push(c) : w.set(k, [c]);
|
|
253
253
|
}
|
|
254
254
|
const T = [], A = [];
|
|
255
|
-
for (const c of
|
|
255
|
+
for (const c of w.values()) {
|
|
256
256
|
if (c.length === 1) {
|
|
257
257
|
A.push(t[c[0]]);
|
|
258
258
|
continue;
|
|
@@ -275,17 +275,17 @@ const en = ({
|
|
|
275
275
|
});
|
|
276
276
|
}
|
|
277
277
|
s((c) => c.clusters.length === T.length && c.singles.length === A.length && c.clusters.every((L, P) => L.id === T[P].id) && c.singles.every((L, P) => L === A[P]) ? c : { clusters: T, singles: A });
|
|
278
|
-
},
|
|
278
|
+
}, m = () => {
|
|
279
279
|
cancelAnimationFrame(p), p = requestAnimationFrame(g);
|
|
280
280
|
};
|
|
281
|
-
|
|
281
|
+
m();
|
|
282
282
|
const r = [
|
|
283
|
-
e.on("move",
|
|
284
|
-
e.on("zoom",
|
|
285
|
-
e.on("resize",
|
|
283
|
+
e.on("move", m),
|
|
284
|
+
e.on("zoom", m),
|
|
285
|
+
e.on("resize", m)
|
|
286
286
|
];
|
|
287
287
|
return () => {
|
|
288
|
-
cancelAnimationFrame(p), r.forEach((
|
|
288
|
+
cancelAnimationFrame(p), r.forEach((u) => u());
|
|
289
289
|
};
|
|
290
290
|
}, [e, t, n, l, a]), i;
|
|
291
291
|
}, tn = [
|
|
@@ -395,23 +395,23 @@ const en = ({
|
|
|
395
395
|
label: s,
|
|
396
396
|
showLabel: p = !0,
|
|
397
397
|
labelPlacement: g = "right",
|
|
398
|
-
onClick:
|
|
398
|
+
onClick: m,
|
|
399
399
|
ariaLabel: r,
|
|
400
|
-
presentational:
|
|
400
|
+
presentational: u = !1,
|
|
401
401
|
dataTestId: f,
|
|
402
|
-
className:
|
|
403
|
-
} = t, y = t.variant ?? "color",
|
|
402
|
+
className: b
|
|
403
|
+
} = t, y = t.variant ?? "color", z = Fe[a ? "xl" : l], x = !!m, _ = y === "color" || y === "icon" || y === "letter", R = y === "person" && "firstName" in t ? t.firstName + t.lastName : (y === "team" || y === "company") && "name" in t ? t.name : null, d = _ ? t.color ?? "radical" : R ? y === "person" && "src" in t && t.src ? "grey" : Wa(R) ?? "grey" : "neutral", w = Ua(), T = a ? 32 : { xs: 12, sm: 16, md: 20, lg: 24 }[z.icon], A = { xs: 20, sm: 24, md: 32, lg: 40 }, c = Fe[l].avatar, k = a ? A[z.avatar] / A[c] : 1, L = (_e) => /* @__PURE__ */ o(
|
|
404
404
|
"span",
|
|
405
405
|
{
|
|
406
406
|
className: "flex shrink-0 items-center justify-center transition-transform duration-200 ease-out",
|
|
407
407
|
style: { transform: `scale(${k})` },
|
|
408
|
-
children:
|
|
408
|
+
children: _e
|
|
409
409
|
}
|
|
410
410
|
), P = y === "color" ? null : y === "icon" && "icon" in t ? /* @__PURE__ */ o(
|
|
411
411
|
Yt,
|
|
412
412
|
{
|
|
413
413
|
icon: t.icon,
|
|
414
|
-
size:
|
|
414
|
+
size: z.icon,
|
|
415
415
|
color: "#ffffff",
|
|
416
416
|
style: {
|
|
417
417
|
width: T,
|
|
@@ -476,20 +476,20 @@ const en = ({
|
|
|
476
476
|
{
|
|
477
477
|
className: "relative z-[1] flex shrink-0 items-center justify-center overflow-hidden border-solid transition-all duration-200 ease-out",
|
|
478
478
|
style: {
|
|
479
|
-
width:
|
|
480
|
-
height:
|
|
481
|
-
borderRadius: J ? Math.round(
|
|
482
|
-
borderWidth:
|
|
479
|
+
width: z.d,
|
|
480
|
+
height: z.d,
|
|
481
|
+
borderRadius: J ? Math.round(z.d * 0.3) : 9999,
|
|
482
|
+
borderWidth: z.border,
|
|
483
483
|
borderColor: V,
|
|
484
|
-
backgroundColor:
|
|
484
|
+
backgroundColor: _ ? Tt(d) : V
|
|
485
485
|
},
|
|
486
486
|
children: y === "color" ? /* @__PURE__ */ o(
|
|
487
487
|
"span",
|
|
488
488
|
{
|
|
489
489
|
className: "rounded-full transition-all duration-200 ease-out",
|
|
490
490
|
style: {
|
|
491
|
-
width:
|
|
492
|
-
height:
|
|
491
|
+
width: z.d * 0.36,
|
|
492
|
+
height: z.d * 0.36,
|
|
493
493
|
backgroundColor: V
|
|
494
494
|
}
|
|
495
495
|
}
|
|
@@ -498,14 +498,14 @@ const en = ({
|
|
|
498
498
|
), K = /* @__PURE__ */ o(tt, { children: a ? /* @__PURE__ */ o(
|
|
499
499
|
Ie.svg,
|
|
500
500
|
{
|
|
501
|
-
width:
|
|
502
|
-
height:
|
|
501
|
+
width: z.caretW,
|
|
502
|
+
height: z.caretH,
|
|
503
503
|
viewBox: "0 0 16 13",
|
|
504
504
|
"aria-hidden": !0,
|
|
505
505
|
className: "absolute left-1/2",
|
|
506
506
|
style: {
|
|
507
|
-
top:
|
|
508
|
-
marginLeft: -
|
|
507
|
+
top: z.d - z.caretOverlap - la,
|
|
508
|
+
marginLeft: -z.caretW / 2,
|
|
509
509
|
// The pin is always white (the head's tail); the dot below carries
|
|
510
510
|
// the color.
|
|
511
511
|
fill: V,
|
|
@@ -515,7 +515,7 @@ const en = ({
|
|
|
515
515
|
initial: { scaleY: 0, opacity: 0 },
|
|
516
516
|
animate: { scaleY: 1, opacity: 1 },
|
|
517
517
|
exit: { scaleY: 0, opacity: 0 },
|
|
518
|
-
transition:
|
|
518
|
+
transition: w ? { duration: 0 } : {
|
|
519
519
|
duration: 0.18,
|
|
520
520
|
ease: "easeOut",
|
|
521
521
|
opacity: { duration: 0.1 }
|
|
@@ -523,26 +523,26 @@ const en = ({
|
|
|
523
523
|
children: /* @__PURE__ */ o("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" })
|
|
524
524
|
},
|
|
525
525
|
"caret"
|
|
526
|
-
) : null }), Q = /* @__PURE__ */
|
|
526
|
+
) : null }), Q = /* @__PURE__ */ B(
|
|
527
527
|
"span",
|
|
528
528
|
{
|
|
529
529
|
className: "relative inline-flex",
|
|
530
530
|
style: {
|
|
531
|
-
filter: `drop-shadow(0 ${
|
|
531
|
+
filter: `drop-shadow(0 ${z.shadowY}px ${z.shadowBlur / 2}px hsl(${Nt} / 0.3))`
|
|
532
532
|
},
|
|
533
533
|
children: [
|
|
534
534
|
K,
|
|
535
535
|
Z
|
|
536
536
|
]
|
|
537
537
|
}
|
|
538
|
-
), I = Fe[l], oe =
|
|
538
|
+
), I = Fe[l], oe = z.d / 2, H = na, We = a ? oa() : -oe, xe = a ? "bottom" : g, we = `0 0 ${Math.max(2, Math.round(I.label * 0.28))}px ${V}`, De = [
|
|
539
539
|
we,
|
|
540
540
|
we,
|
|
541
541
|
`0 1px 2px ${V}`,
|
|
542
542
|
`0 -1px 2px ${V}`,
|
|
543
543
|
`1px 0 2px ${V}`,
|
|
544
544
|
`-1px 0 2px ${V}`
|
|
545
|
-
].join(","), Y = !a && (xe === "top" || xe === "bottom"), q = Y ? "line-clamp-4 text-center" : a ? "whitespace-nowrap text-center" : "whitespace-nowrap", ie = I.d / 2,
|
|
545
|
+
].join(","), Y = !a && (xe === "top" || xe === "bottom"), q = Y ? "line-clamp-4 text-center" : a ? "whitespace-nowrap text-center" : "whitespace-nowrap", ie = I.d / 2, j = {
|
|
546
546
|
right: {
|
|
547
547
|
transform: `translate(${ie}px, -50%)`,
|
|
548
548
|
style: { paddingLeft: I.gap }
|
|
@@ -567,16 +567,16 @@ const en = ({
|
|
|
567
567
|
q
|
|
568
568
|
),
|
|
569
569
|
style: {
|
|
570
|
-
color: `hsl(${ta[
|
|
570
|
+
color: `hsl(${ta[d]})`,
|
|
571
571
|
fontSize: I.label,
|
|
572
572
|
textShadow: De,
|
|
573
|
-
transform:
|
|
573
|
+
transform: j.transform,
|
|
574
574
|
maxWidth: Y ? I.maxLabelW : void 0,
|
|
575
|
-
...
|
|
575
|
+
...j.style
|
|
576
576
|
},
|
|
577
577
|
children: s
|
|
578
578
|
}
|
|
579
|
-
),
|
|
579
|
+
), Se = /* @__PURE__ */ o(
|
|
580
580
|
"span",
|
|
581
581
|
{
|
|
582
582
|
"aria-hidden": !0,
|
|
@@ -588,14 +588,14 @@ const en = ({
|
|
|
588
588
|
marginTop: -H,
|
|
589
589
|
borderWidth: 1.5,
|
|
590
590
|
borderColor: V,
|
|
591
|
-
backgroundColor: Tt(
|
|
591
|
+
backgroundColor: Tt(d),
|
|
592
592
|
boxShadow: `0 1px 2px hsl(${Nt} / 0.3)`,
|
|
593
593
|
transform: `scale(${a || i ? 1 : 0})`,
|
|
594
594
|
opacity: a || i ? 1 : 0
|
|
595
595
|
}
|
|
596
596
|
}
|
|
597
|
-
), G = /* @__PURE__ */
|
|
598
|
-
|
|
597
|
+
), G = /* @__PURE__ */ B(Ee, { children: [
|
|
598
|
+
Se,
|
|
599
599
|
/* @__PURE__ */ o(
|
|
600
600
|
"span",
|
|
601
601
|
{
|
|
@@ -609,19 +609,19 @@ const en = ({
|
|
|
609
609
|
),
|
|
610
610
|
U
|
|
611
611
|
] });
|
|
612
|
-
return /* @__PURE__ */ o(le, { dataTestId: f, children:
|
|
612
|
+
return /* @__PURE__ */ o(le, { dataTestId: f, children: x ? /* @__PURE__ */ o(
|
|
613
613
|
"button",
|
|
614
614
|
{
|
|
615
615
|
ref: n,
|
|
616
616
|
type: "button",
|
|
617
|
-
...
|
|
618
|
-
onClick:
|
|
617
|
+
...u ? { tabIndex: -1, "aria-hidden": !0 } : { "aria-label": r, "aria-pressed": a },
|
|
618
|
+
onClick: m,
|
|
619
619
|
className: W(
|
|
620
620
|
// Hover grows from the center (transform-only, no extra layout).
|
|
621
621
|
"relative inline-flex cursor-pointer border-0 bg-transparent p-0",
|
|
622
622
|
"transition-transform duration-150 hover:scale-[1.05]",
|
|
623
623
|
Ka("rounded-full"),
|
|
624
|
-
|
|
624
|
+
b
|
|
625
625
|
),
|
|
626
626
|
children: G
|
|
627
627
|
}
|
|
@@ -630,7 +630,7 @@ const en = ({
|
|
|
630
630
|
{
|
|
631
631
|
role: "img",
|
|
632
632
|
"aria-label": r,
|
|
633
|
-
className: W("relative inline-flex",
|
|
633
|
+
className: W("relative inline-flex", b),
|
|
634
634
|
children: G
|
|
635
635
|
}
|
|
636
636
|
) });
|
|
@@ -642,10 +642,10 @@ let ke = null;
|
|
|
642
642
|
const ra = (e, t) => (!ke && typeof document < "u" && (ke = document.createElement("canvas").getContext("2d")), ke ? (ke.font = `600 ${t}px Inter, system-ui, sans-serif`, ke.measureText(e).width) : e.length * t * 0.55), sn = ({ placement: e, cx: t, cy: n, point: l, size: a }) => {
|
|
643
643
|
const i = Oe(a), s = ra(l.label ?? "", i.label) + 2, p = i.d / 2;
|
|
644
644
|
if (e === "right" || e === "left") {
|
|
645
|
-
const
|
|
646
|
-
return { x: e === "right" ? t + p + i.gap : t - p - i.gap -
|
|
645
|
+
const b = s, y = i.lineH;
|
|
646
|
+
return { x: e === "right" ? t + p + i.gap : t - p - i.gap - b, y: n - y / 2, w: b, h: y };
|
|
647
647
|
}
|
|
648
|
-
const g = Math.min(s, i.maxLabelW), r = Math.min(Math.ceil(s / i.maxLabelW), ln) * i.lineH,
|
|
648
|
+
const g = Math.min(s, i.maxLabelW), r = Math.min(Math.ceil(s / i.maxLabelW), ln) * i.lineH, u = i.gap + nn, f = e === "bottom" ? n + p + u : n - p - i.gap - r;
|
|
649
649
|
return { x: t - g / 2, y: f, w: g, h: r };
|
|
650
650
|
}, cn = (e, t, n = "md") => {
|
|
651
651
|
const [l, a] = F({});
|
|
@@ -656,50 +656,50 @@ const ra = (e, t) => (!ke && typeof document < "u" && (ke = document.createEleme
|
|
|
656
656
|
}
|
|
657
657
|
let i = 0;
|
|
658
658
|
const s = () => {
|
|
659
|
-
const
|
|
660
|
-
for (const
|
|
661
|
-
const
|
|
662
|
-
if (!
|
|
659
|
+
const m = Oe(n).d, r = [], u = [];
|
|
660
|
+
for (const d of t) {
|
|
661
|
+
const w = e.project(d.coordinates);
|
|
662
|
+
if (!w)
|
|
663
663
|
return;
|
|
664
|
-
r.push({ x:
|
|
665
|
-
}
|
|
666
|
-
const f = t.length,
|
|
667
|
-
for (;
|
|
668
|
-
|
|
669
|
-
return
|
|
670
|
-
},
|
|
671
|
-
for (let
|
|
672
|
-
for (let
|
|
673
|
-
const T =
|
|
674
|
-
if (T * T + A * A <=
|
|
675
|
-
const c = y(
|
|
676
|
-
c !== k && (
|
|
664
|
+
r.push({ x: w.x - m / 2, y: w.y - m / 2, w: m, h: m }), u.push({ x: w.x, y: w.y });
|
|
665
|
+
}
|
|
666
|
+
const f = t.length, b = Array.from({ length: f }, (d, w) => w), y = (d) => {
|
|
667
|
+
for (; b[d] !== d; )
|
|
668
|
+
d = b[d] = b[b[d]];
|
|
669
|
+
return d;
|
|
670
|
+
}, z = (m * rn) ** 2;
|
|
671
|
+
for (let d = 0; d < f; d++)
|
|
672
|
+
for (let w = d + 1; w < f; w++) {
|
|
673
|
+
const T = u[d].x - u[w].x, A = u[d].y - u[w].y;
|
|
674
|
+
if (T * T + A * A <= z) {
|
|
675
|
+
const c = y(d), k = y(w);
|
|
676
|
+
c !== k && (b[c] = k);
|
|
677
677
|
}
|
|
678
678
|
}
|
|
679
|
-
const
|
|
680
|
-
for (let
|
|
681
|
-
const
|
|
682
|
-
if (!
|
|
679
|
+
const x = {}, _ = [];
|
|
680
|
+
for (let d = 0; d < f; d++) {
|
|
681
|
+
const w = t[d];
|
|
682
|
+
if (!w.label)
|
|
683
683
|
continue;
|
|
684
|
-
const T =
|
|
684
|
+
const T = u[d], A = "right", c = [A, ...on.filter((L) => L !== A)];
|
|
685
685
|
let k = null;
|
|
686
686
|
for (const L of c) {
|
|
687
|
-
const P = sn({ placement: L, cx: T.x, cy: T.y, point:
|
|
687
|
+
const P = sn({ placement: L, cx: T.x, cy: T.y, point: w, size: n }), J = r.some((K) => Be(P, K)), Z = _.some((K) => Be(P, K));
|
|
688
688
|
if (!J && !Z) {
|
|
689
|
-
k = L,
|
|
689
|
+
k = L, _.push(P);
|
|
690
690
|
break;
|
|
691
691
|
}
|
|
692
692
|
}
|
|
693
|
-
|
|
694
|
-
}
|
|
695
|
-
const
|
|
696
|
-
for (let
|
|
697
|
-
t[
|
|
698
|
-
for (let
|
|
699
|
-
t[
|
|
700
|
-
a((
|
|
701
|
-
const
|
|
702
|
-
return
|
|
693
|
+
x[w.id] = k;
|
|
694
|
+
}
|
|
695
|
+
const R = /* @__PURE__ */ new Set();
|
|
696
|
+
for (let d = 0; d < f; d++)
|
|
697
|
+
t[d].label && x[t[d].id] === null && R.add(y(d));
|
|
698
|
+
for (let d = 0; d < f; d++)
|
|
699
|
+
t[d].label && R.has(y(d)) && (x[t[d].id] = null);
|
|
700
|
+
a((d) => {
|
|
701
|
+
const w = Object.keys(x);
|
|
702
|
+
return w.length === Object.keys(d).length && w.every((A) => d[A] === x[A]) ? d : x;
|
|
703
703
|
});
|
|
704
704
|
}, p = () => {
|
|
705
705
|
cancelAnimationFrame(i), i = requestAnimationFrame(s);
|
|
@@ -711,7 +711,7 @@ const ra = (e, t) => (!ke && typeof document < "u" && (ke = document.createEleme
|
|
|
711
711
|
e.on("resize", p)
|
|
712
712
|
];
|
|
713
713
|
return () => {
|
|
714
|
-
cancelAnimationFrame(i), g.forEach((
|
|
714
|
+
cancelAnimationFrame(i), g.forEach((m) => m());
|
|
715
715
|
};
|
|
716
716
|
}, [e, t, n]), l;
|
|
717
717
|
}, pn = (e, t) => {
|
|
@@ -804,17 +804,17 @@ const ca = sa, jt = 4, Rt = 3, yn = 1.3, fn = 1.08, Pt = "cubic-bezier(0.16, 1,
|
|
|
804
804
|
]
|
|
805
805
|
}, pa = re(
|
|
806
806
|
function({ count: t, members: n, onClick: l, ariaLabel: a, dataTestId: i, className: s }, p) {
|
|
807
|
-
const g = se(), [
|
|
807
|
+
const g = se(), [m, r] = F(!1), u = n.slice(
|
|
808
808
|
0,
|
|
809
809
|
t <= jt ? jt : Rt
|
|
810
|
-
), f = Math.max(0, t -
|
|
811
|
-
const [T, A] =
|
|
810
|
+
), f = Math.max(0, t - u.length), b = f > 0, y = f > 99 ? "+99" : `+${f}`, z = u.length + (b ? 1 : 0), x = Ct[z] ?? Ct[4], _ = m ? yn : 1, R = m ? fn : 1, d = (w) => {
|
|
811
|
+
const [T, A] = x[w] ?? [0, 0];
|
|
812
812
|
return {
|
|
813
|
-
transform: `translate(${T *
|
|
813
|
+
transform: `translate(${T * _}px, ${A * _}px) scale(${R})`,
|
|
814
814
|
transition: `transform 240ms ${Pt}`
|
|
815
815
|
};
|
|
816
816
|
};
|
|
817
|
-
return /* @__PURE__ */ o(le, { dataTestId: i, children: /* @__PURE__ */
|
|
817
|
+
return /* @__PURE__ */ o(le, { dataTestId: i, children: /* @__PURE__ */ B(
|
|
818
818
|
"div",
|
|
819
819
|
{
|
|
820
820
|
ref: p,
|
|
@@ -822,8 +822,8 @@ const ca = sa, jt = 4, Rt = 3, yn = 1.3, fn = 1.08, Pt = "cubic-bezier(0.16, 1,
|
|
|
822
822
|
tabIndex: 0,
|
|
823
823
|
"aria-label": a ?? g.t("map.cluster", { count: t }),
|
|
824
824
|
onClick: l,
|
|
825
|
-
onKeyDown: (
|
|
826
|
-
(
|
|
825
|
+
onKeyDown: (w) => {
|
|
826
|
+
(w.key === "Enter" || w.key === " ") && (w.preventDefault(), l?.());
|
|
827
827
|
},
|
|
828
828
|
onPointerEnter: () => r(!0),
|
|
829
829
|
onPointerLeave: () => r(!1),
|
|
@@ -842,18 +842,18 @@ const ca = sa, jt = 4, Rt = 3, yn = 1.3, fn = 1.08, Pt = "cubic-bezier(0.16, 1,
|
|
|
842
842
|
style: { left: -Ae / 2, top: -Ae / 2, width: Ae, height: Ae }
|
|
843
843
|
}
|
|
844
844
|
),
|
|
845
|
-
|
|
845
|
+
u.map((w, T) => /* @__PURE__ */ o(
|
|
846
846
|
"span",
|
|
847
847
|
{
|
|
848
848
|
className: "absolute left-0 top-0 flex leading-none",
|
|
849
|
-
style: { zIndex: T, ...
|
|
850
|
-
children: /* @__PURE__ */ o(ca, { ...
|
|
849
|
+
style: { zIndex: T, ...d(T) },
|
|
850
|
+
children: /* @__PURE__ */ o(ca, { ...w, showLabel: !1 })
|
|
851
851
|
},
|
|
852
852
|
T
|
|
853
853
|
)),
|
|
854
|
-
|
|
855
|
-
const [
|
|
856
|
-
return /* @__PURE__ */
|
|
854
|
+
b ? (() => {
|
|
855
|
+
const [w, T] = x[u.length] ?? [0, 0];
|
|
856
|
+
return /* @__PURE__ */ B(
|
|
857
857
|
"span",
|
|
858
858
|
{
|
|
859
859
|
className: W(
|
|
@@ -865,7 +865,7 @@ const ca = sa, jt = 4, Rt = 3, yn = 1.3, fn = 1.08, Pt = "cubic-bezier(0.16, 1,
|
|
|
865
865
|
style: {
|
|
866
866
|
zIndex: Rt,
|
|
867
867
|
backgroundColor: "hsl(var(--white-90))",
|
|
868
|
-
transform: `translate(${
|
|
868
|
+
transform: `translate(${w * _}px, ${T * _}px) translate(-50%, -50%) scale(${R})`,
|
|
869
869
|
transition: `transform 240ms ${Pt}`
|
|
870
870
|
},
|
|
871
871
|
children: [
|
|
@@ -891,18 +891,18 @@ const gn = pa, hn = 16, bn = (e, t, n, l) => {
|
|
|
891
891
|
const a = e.project(t.coordinates);
|
|
892
892
|
if (!a)
|
|
893
893
|
return null;
|
|
894
|
-
const i = Oe("xl"), s = Oe(l), p = a.y + oa(), g = { x: a.x - i.d / 2, y: p, w: i.d, h: i.d },
|
|
895
|
-
x: a.x -
|
|
894
|
+
const i = Oe("xl"), s = Oe(l), p = a.y + oa(), g = { x: a.x - i.d / 2, y: p, w: i.d, h: i.d }, m = t.label ? ra(t.label, s.label) : 0, r = {
|
|
895
|
+
x: a.x - m / 2,
|
|
896
896
|
y: a.y + na,
|
|
897
|
-
w:
|
|
897
|
+
w: m,
|
|
898
898
|
h: s.lineH
|
|
899
|
-
},
|
|
900
|
-
for (const
|
|
901
|
-
const y = e.project(
|
|
899
|
+
}, u = s.d, f = /* @__PURE__ */ new Set();
|
|
900
|
+
for (const b of n) {
|
|
901
|
+
const y = e.project(b.coordinates);
|
|
902
902
|
if (!y)
|
|
903
903
|
return null;
|
|
904
|
-
const
|
|
905
|
-
(Be(
|
|
904
|
+
const z = { x: y.x - u / 2, y: y.y - u / 2, w: u, h: u };
|
|
905
|
+
(Be(z, g) || m > 0 && Be(z, r)) && f.add(b.id);
|
|
906
906
|
}
|
|
907
907
|
return f;
|
|
908
908
|
}, xn = (e, t, n, l) => {
|
|
@@ -917,17 +917,17 @@ const gn = pa, hn = 16, bn = (e, t, n, l) => {
|
|
|
917
917
|
const r = bn(
|
|
918
918
|
e,
|
|
919
919
|
t,
|
|
920
|
-
n.filter((
|
|
920
|
+
n.filter((u) => u.id !== t.id),
|
|
921
921
|
l
|
|
922
922
|
);
|
|
923
|
-
r && i((
|
|
923
|
+
r && i((u) => u !== null && u.size === r.size && [...r].every((b) => u.has(b)) ? u : r);
|
|
924
924
|
}, g = () => {
|
|
925
925
|
cancelAnimationFrame(s), s = requestAnimationFrame(p);
|
|
926
926
|
};
|
|
927
927
|
g();
|
|
928
|
-
const
|
|
928
|
+
const m = [e.on("zoom", g), e.on("resize", g)];
|
|
929
929
|
return () => {
|
|
930
|
-
cancelAnimationFrame(s),
|
|
930
|
+
cancelAnimationFrame(s), m.forEach((r) => r());
|
|
931
931
|
};
|
|
932
932
|
}, [e, t, n, l]), a;
|
|
933
933
|
}, At = (e) => {
|
|
@@ -965,7 +965,7 @@ const gn = pa, hn = 16, bn = (e, t, n, l) => {
|
|
|
965
965
|
onSelect: a,
|
|
966
966
|
onClusterExpand: i
|
|
967
967
|
}) => {
|
|
968
|
-
const s = se(), { clusters: p, singles: g } = en({ adapter: e, points: t, enabled: !0 }), r = pn(e, hn) ? "lg" : "md",
|
|
968
|
+
const s = se(), { clusters: p, singles: g } = en({ adapter: e, points: t, enabled: !0 }), r = pn(e, hn) ? "lg" : "md", u = cn(e, g, r), f = new Map(t.map((x) => [x.id, x])), b = p.length > 0, y = n ? f.get(n) : void 0, z = xn(
|
|
969
969
|
e,
|
|
970
970
|
y,
|
|
971
971
|
g,
|
|
@@ -974,12 +974,12 @@ const gn = pa, hn = 16, bn = (e, t, n, l) => {
|
|
|
974
974
|
return (
|
|
975
975
|
// One AnimatePresence over both lists so a single leaving (becoming a
|
|
976
976
|
// cluster) fades out while the cluster fades in - a soft crossfade.
|
|
977
|
-
/* @__PURE__ */
|
|
978
|
-
p.map((
|
|
977
|
+
/* @__PURE__ */ B(tt, { children: [
|
|
978
|
+
p.map((x) => /* @__PURE__ */ o(
|
|
979
979
|
It,
|
|
980
980
|
{
|
|
981
981
|
adapter: e,
|
|
982
|
-
coordinates:
|
|
982
|
+
coordinates: x.coordinates,
|
|
983
983
|
selected: !1,
|
|
984
984
|
children: /* @__PURE__ */ o(
|
|
985
985
|
Ie.span,
|
|
@@ -992,24 +992,24 @@ const gn = pa, hn = 16, bn = (e, t, n, l) => {
|
|
|
992
992
|
children: /* @__PURE__ */ o(
|
|
993
993
|
gn,
|
|
994
994
|
{
|
|
995
|
-
count:
|
|
996
|
-
members:
|
|
997
|
-
onClick: () => i(
|
|
995
|
+
count: x.count,
|
|
996
|
+
members: x.pointIds.map((_) => f.get(_)).filter((_) => !!_).map(At),
|
|
997
|
+
onClick: () => i(x.bounds)
|
|
998
998
|
}
|
|
999
999
|
)
|
|
1000
1000
|
}
|
|
1001
1001
|
)
|
|
1002
1002
|
},
|
|
1003
|
-
|
|
1003
|
+
x.id
|
|
1004
1004
|
)),
|
|
1005
|
-
g.map((
|
|
1006
|
-
const
|
|
1005
|
+
g.map((x) => {
|
|
1006
|
+
const _ = u[x.id], R = z?.has(x.id) ?? !1, d = l === x.id;
|
|
1007
1007
|
return /* @__PURE__ */ o(
|
|
1008
1008
|
It,
|
|
1009
1009
|
{
|
|
1010
1010
|
adapter: e,
|
|
1011
|
-
coordinates:
|
|
1012
|
-
selected: n ===
|
|
1011
|
+
coordinates: x.coordinates,
|
|
1012
|
+
selected: n === x.id || d,
|
|
1013
1013
|
children: /* @__PURE__ */ o(
|
|
1014
1014
|
Ie.span,
|
|
1015
1015
|
{
|
|
@@ -1032,16 +1032,16 @@ const gn = pa, hn = 16, bn = (e, t, n, l) => {
|
|
|
1032
1032
|
children: /* @__PURE__ */ o(
|
|
1033
1033
|
ca,
|
|
1034
1034
|
{
|
|
1035
|
-
...At(
|
|
1035
|
+
...At(x),
|
|
1036
1036
|
size: r,
|
|
1037
|
-
label:
|
|
1038
|
-
showLabel: n ===
|
|
1039
|
-
labelPlacement:
|
|
1040
|
-
selected: n ===
|
|
1041
|
-
collapsed:
|
|
1042
|
-
onClick: () => a(
|
|
1037
|
+
label: x.label,
|
|
1038
|
+
showLabel: n === x.id || d || !b && _ !== null,
|
|
1039
|
+
labelPlacement: _ ?? "right",
|
|
1040
|
+
selected: n === x.id,
|
|
1041
|
+
collapsed: R,
|
|
1042
|
+
onClick: () => a(x.id),
|
|
1043
1043
|
presentational: !0,
|
|
1044
|
-
ariaLabel:
|
|
1044
|
+
ariaLabel: x.label ?? s.map.unnamedLocation
|
|
1045
1045
|
}
|
|
1046
1046
|
)
|
|
1047
1047
|
},
|
|
@@ -1050,7 +1050,7 @@ const gn = pa, hn = 16, bn = (e, t, n, l) => {
|
|
|
1050
1050
|
}
|
|
1051
1051
|
)
|
|
1052
1052
|
},
|
|
1053
|
-
|
|
1053
|
+
x.id
|
|
1054
1054
|
);
|
|
1055
1055
|
})
|
|
1056
1056
|
] })
|
|
@@ -1065,12 +1065,12 @@ const gn = pa, hn = 16, bn = (e, t, n, l) => {
|
|
|
1065
1065
|
headerStart: s,
|
|
1066
1066
|
headerEnd: p,
|
|
1067
1067
|
ariaLabel: g,
|
|
1068
|
-
dataTestId:
|
|
1068
|
+
dataTestId: m
|
|
1069
1069
|
}) => {
|
|
1070
|
-
const r = se(),
|
|
1071
|
-
y.current.to !==
|
|
1072
|
-
const
|
|
1073
|
-
return /* @__PURE__ */ o(le, { dataTestId:
|
|
1070
|
+
const r = se(), u = Ut(), f = t ? ne.enter : ne.exit, b = n - C.inset, y = M({ from: b, to: b });
|
|
1071
|
+
y.current.to !== b && (y.current = { from: y.current.to, to: b });
|
|
1072
|
+
const z = b > y.current.from ? ne.enter : ne.exit, x = i === "grow" ? "translateX(-10%) scale(0.97)" : `translateX(calc(-100% - ${C.inset}px))`;
|
|
1073
|
+
return /* @__PURE__ */ o(le, { dataTestId: m, children: /* @__PURE__ */ o(
|
|
1074
1074
|
"div",
|
|
1075
1075
|
{
|
|
1076
1076
|
className: "pointer-events-none absolute bottom-2 z-10",
|
|
@@ -1078,18 +1078,18 @@ const gn = pa, hn = 16, bn = (e, t, n, l) => {
|
|
|
1078
1078
|
left: C.inset,
|
|
1079
1079
|
top: l,
|
|
1080
1080
|
width: a,
|
|
1081
|
-
transform: `translateX(${
|
|
1082
|
-
transitionProperty:
|
|
1083
|
-
transitionDuration:
|
|
1084
|
-
transitionTimingFunction:
|
|
1081
|
+
transform: `translateX(${b}px)`,
|
|
1082
|
+
transitionProperty: u ? "none" : "transform, top",
|
|
1083
|
+
transitionDuration: z.duration,
|
|
1084
|
+
transitionTimingFunction: z.easing
|
|
1085
1085
|
},
|
|
1086
1086
|
children: /* @__PURE__ */ o(
|
|
1087
1087
|
"div",
|
|
1088
1088
|
{
|
|
1089
1089
|
role: "complementary",
|
|
1090
1090
|
"aria-label": g ?? r.map.panel,
|
|
1091
|
-
ref: (
|
|
1092
|
-
t ?
|
|
1091
|
+
ref: (_) => {
|
|
1092
|
+
t ? _?.removeAttribute("inert") : _?.setAttribute("inert", "");
|
|
1093
1093
|
},
|
|
1094
1094
|
className: W(
|
|
1095
1095
|
// Back to the app's base size: `.maplibregl-map` sets 12px.
|
|
@@ -1098,9 +1098,9 @@ const gn = pa, hn = 16, bn = (e, t, n, l) => {
|
|
|
1098
1098
|
t ? "pointer-events-auto" : "opacity-0"
|
|
1099
1099
|
),
|
|
1100
1100
|
style: {
|
|
1101
|
-
transform: t ||
|
|
1101
|
+
transform: t || u ? "translateX(0px) scale(1)" : x,
|
|
1102
1102
|
transformOrigin: i === "grow" ? "left center" : void 0,
|
|
1103
|
-
transitionProperty:
|
|
1103
|
+
transitionProperty: u ? "opacity" : "transform, opacity",
|
|
1104
1104
|
transitionDuration: f.duration,
|
|
1105
1105
|
transitionTimingFunction: f.easing
|
|
1106
1106
|
},
|
|
@@ -1111,8 +1111,8 @@ const gn = pa, hn = 16, bn = (e, t, n, l) => {
|
|
|
1111
1111
|
borderRadius: $e.panel,
|
|
1112
1112
|
padding: "none",
|
|
1113
1113
|
height: "full",
|
|
1114
|
-
children: /* @__PURE__ */
|
|
1115
|
-
s || p ? /* @__PURE__ */
|
|
1114
|
+
children: /* @__PURE__ */ B("div", { className: "flex h-full flex-col", children: [
|
|
1115
|
+
s || p ? /* @__PURE__ */ B("div", { className: "flex shrink-0 items-center justify-between gap-1 p-0.5", children: [
|
|
1116
1116
|
/* @__PURE__ */ o("div", { className: "flex min-w-0 flex-1 justify-start", children: s }),
|
|
1117
1117
|
p
|
|
1118
1118
|
] }) : null,
|
|
@@ -1134,6 +1134,8 @@ function zn() {
|
|
|
1134
1134
|
sidebarState: "locked",
|
|
1135
1135
|
toggleSidebar: () => {
|
|
1136
1136
|
},
|
|
1137
|
+
hideSidebar: () => {
|
|
1138
|
+
},
|
|
1137
1139
|
setForceFloat: () => {
|
|
1138
1140
|
},
|
|
1139
1141
|
railWidth: 0,
|
|
@@ -1143,52 +1145,53 @@ function zn() {
|
|
|
1143
1145
|
} : e;
|
|
1144
1146
|
}
|
|
1145
1147
|
function rl({ children: e }) {
|
|
1146
|
-
const { currentPath: t } = Ha(), [n, l] = F(!1), [a, i] = F(0), [s, p] = F(!1), g = n ?
|
|
1148
|
+
const { currentPath: t } = Ha(), [n, l] = F(!1), [a, i] = F(0), [s, p] = F(!1), g = n ? _t.xl : _t.md, m = Xa(`(max-width: ${g}px)`, {
|
|
1147
1149
|
initializeWithValue: !0
|
|
1148
|
-
}), [r,
|
|
1149
|
-
const
|
|
1150
|
-
return
|
|
1151
|
-
}), [f,
|
|
1150
|
+
}), [r, u] = F(() => {
|
|
1151
|
+
const w = localStorage.getItem(Et);
|
|
1152
|
+
return w !== null ? !!w : !0;
|
|
1153
|
+
}), [f, b] = F(!1), [y, z] = F(
|
|
1152
1154
|
null
|
|
1153
|
-
), b =
|
|
1154
|
-
({ isInvokedByUser:
|
|
1155
|
+
), x = O(() => b(!1), []), _ = O(
|
|
1156
|
+
({ isInvokedByUser: w } = {
|
|
1155
1157
|
isInvokedByUser: !0
|
|
1156
1158
|
}) => {
|
|
1157
|
-
p(
|
|
1159
|
+
p(w ?? !0), m && b(!f), u(!r);
|
|
1158
1160
|
},
|
|
1159
|
-
[
|
|
1160
|
-
),
|
|
1161
|
-
(
|
|
1162
|
-
|
|
1161
|
+
[m, f, r, u, b]
|
|
1162
|
+
), R = O(
|
|
1163
|
+
(w) => {
|
|
1164
|
+
m || (w.clientX >= a && w.clientX < a + 32 && b(!0), w.clientX > a + 280 && b(!1));
|
|
1163
1165
|
},
|
|
1164
|
-
[
|
|
1165
|
-
),
|
|
1166
|
+
[m, b, a]
|
|
1167
|
+
), d = et(() => m ? f ? "unlocked" : "hidden" : !r && !f ? "hidden" : !r && f ? "unlocked" : "locked", [m, f, r]);
|
|
1166
1168
|
return N(() => {
|
|
1167
|
-
|
|
1169
|
+
b(!1);
|
|
1168
1170
|
}, [t]), N(() => {
|
|
1169
1171
|
s && localStorage.setItem(Et, r ? "1" : "");
|
|
1170
1172
|
}, [r, s]), N(() => () => {
|
|
1171
|
-
|
|
1172
|
-
}, [
|
|
1173
|
+
z(d);
|
|
1174
|
+
}, [d]), /* @__PURE__ */ o(
|
|
1173
1175
|
ua.Provider,
|
|
1174
1176
|
{
|
|
1175
1177
|
value: {
|
|
1176
|
-
isSmallScreen:
|
|
1178
|
+
isSmallScreen: m,
|
|
1177
1179
|
isLastToggleInvokedByUser: s,
|
|
1178
|
-
sidebarState:
|
|
1179
|
-
|
|
1180
|
+
sidebarState: d,
|
|
1181
|
+
hideSidebar: x,
|
|
1182
|
+
toggleSidebar: _,
|
|
1180
1183
|
prevSidebarState: y,
|
|
1181
1184
|
setForceFloat: l,
|
|
1182
1185
|
railWidth: a,
|
|
1183
1186
|
hasRail: a > 0,
|
|
1184
1187
|
setRailWidth: i
|
|
1185
1188
|
},
|
|
1186
|
-
children: /* @__PURE__ */ o("div", { onPointerMove:
|
|
1189
|
+
children: /* @__PURE__ */ o("div", { onPointerMove: R, className: "h-screen w-screen", children: e })
|
|
1187
1190
|
}
|
|
1188
1191
|
);
|
|
1189
1192
|
}
|
|
1190
1193
|
function ma({ isExpanded: e }) {
|
|
1191
|
-
return /* @__PURE__ */
|
|
1194
|
+
return /* @__PURE__ */ B(
|
|
1192
1195
|
"svg",
|
|
1193
1196
|
{
|
|
1194
1197
|
width: "20",
|
|
@@ -1246,7 +1249,7 @@ function sl() {
|
|
|
1246
1249
|
const { prevSidebarState: e, sidebarState: t, toggleSidebar: n, isSmallScreen: l } = zn(), a = M(null);
|
|
1247
1250
|
return N(() => {
|
|
1248
1251
|
e === "hidden" && t === "locked" && a.current?.focus();
|
|
1249
|
-
}, [e, t]), /* @__PURE__ */
|
|
1252
|
+
}, [e, t]), /* @__PURE__ */ B(
|
|
1250
1253
|
Gt,
|
|
1251
1254
|
{
|
|
1252
1255
|
variant: "ghost",
|
|
@@ -1284,13 +1287,13 @@ const nt = re(({ expanded: e, onToggle: t, label: n, bare: l = !1, dataTestId: a
|
|
|
1284
1287
|
});
|
|
1285
1288
|
nt.displayName = "F0MapSidebarToggle";
|
|
1286
1289
|
const vn = (e, t, n = 0.3, l = 64) => {
|
|
1287
|
-
const [a, i] = e, [s, p] = t, g = (a + s) / 2,
|
|
1288
|
-
for (let
|
|
1289
|
-
const y =
|
|
1290
|
-
f.push([
|
|
1290
|
+
const [a, i] = e, [s, p] = t, g = (a + s) / 2, m = (i + p) / 2, r = g - (p - i) * n, u = m + (s - a) * n, f = [];
|
|
1291
|
+
for (let b = 0; b <= l; b++) {
|
|
1292
|
+
const y = b / l, z = 1 - y, x = z * z, _ = 2 * z * y, R = y * y;
|
|
1293
|
+
f.push([x * a + _ * r + R * s, x * i + _ * u + R * p]);
|
|
1291
1294
|
}
|
|
1292
1295
|
return f;
|
|
1293
|
-
}, da = (e) => `hsl(${e.replace(/ /g, ", ")})`, kn = (e, t) => e.color ?? da(aa(e.variant ?? "radical", t)),
|
|
1296
|
+
}, da = (e) => `hsl(${e.replace(/ /g, ", ")})`, kn = (e, t) => e.color ?? da(aa(e.variant ?? "radical", t)), Sn = (e, t) => e.color ?? da(aa(e.variant ?? "radical", !t)), $t = ({
|
|
1294
1297
|
id: e,
|
|
1295
1298
|
kind: t,
|
|
1296
1299
|
coordinates: n,
|
|
@@ -1305,9 +1308,9 @@ const vn = (e, t, n = 0.3, l = 64) => {
|
|
|
1305
1308
|
width: i,
|
|
1306
1309
|
opacity: l.opacity ?? 1,
|
|
1307
1310
|
dashed: l.dashed ?? !1,
|
|
1308
|
-
hover: t === "route" ? { width: i * 1.6, opacity: 1 } : { color:
|
|
1311
|
+
hover: t === "route" ? { width: i * 1.6, opacity: 1 } : { color: Sn(l, a), opacity: 1 }
|
|
1309
1312
|
};
|
|
1310
|
-
},
|
|
1313
|
+
}, _n = ({
|
|
1311
1314
|
adapter: e,
|
|
1312
1315
|
routes: t,
|
|
1313
1316
|
arcs: n,
|
|
@@ -1345,22 +1348,22 @@ const vn = (e, t, n = 0.3, l = 64) => {
|
|
|
1345
1348
|
[t, n]
|
|
1346
1349
|
), g = M({ onRouteClick: a, onArcClick: i, kinds: p });
|
|
1347
1350
|
g.current = { onRouteClick: a, onArcClick: i, kinds: p };
|
|
1348
|
-
const
|
|
1351
|
+
const m = !!(a || i);
|
|
1349
1352
|
return N(() => {
|
|
1350
1353
|
e.setLines(
|
|
1351
1354
|
s,
|
|
1352
|
-
|
|
1355
|
+
m ? {
|
|
1353
1356
|
onClick: (r) => {
|
|
1354
1357
|
const {
|
|
1355
|
-
onRouteClick:
|
|
1358
|
+
onRouteClick: u,
|
|
1356
1359
|
onArcClick: f,
|
|
1357
|
-
kinds:
|
|
1360
|
+
kinds: b
|
|
1358
1361
|
} = g.current;
|
|
1359
|
-
|
|
1362
|
+
b.get(r) === "arc" ? f?.(r) : u?.(r);
|
|
1360
1363
|
}
|
|
1361
1364
|
} : void 0
|
|
1362
1365
|
);
|
|
1363
|
-
}, [e, s,
|
|
1366
|
+
}, [e, s, m]), N(() => () => e.setLines([]), [e]), null;
|
|
1364
1367
|
}, ya = ({
|
|
1365
1368
|
adapter: e,
|
|
1366
1369
|
coords: t
|
|
@@ -1386,7 +1389,7 @@ const cl = {
|
|
|
1386
1389
|
)
|
|
1387
1390
|
}
|
|
1388
1391
|
) }), Mn = (e) => {
|
|
1389
|
-
const [t, n] = F(null), l =
|
|
1392
|
+
const [t, n] = F(null), l = O(
|
|
1390
1393
|
(a) => {
|
|
1391
1394
|
e && (typeof navigator > "u" || !navigator.geolocation || navigator.geolocation.getCurrentPosition(
|
|
1392
1395
|
(i) => {
|
|
@@ -1410,7 +1413,7 @@ const cl = {
|
|
|
1410
1413
|
});
|
|
1411
1414
|
}, [e, t, l]), { coords: t, request: l };
|
|
1412
1415
|
}, Tn = () => {
|
|
1413
|
-
const [e, t] = F(!1), n = M(null), l =
|
|
1416
|
+
const [e, t] = F(!1), n = M(null), l = O((a) => {
|
|
1414
1417
|
if (n.current?.disconnect(), n.current = null, !a)
|
|
1415
1418
|
return;
|
|
1416
1419
|
const i = () => t(a.closest(".dark") !== null);
|
|
@@ -1425,11 +1428,11 @@ const cl = {
|
|
|
1425
1428
|
}, []);
|
|
1426
1429
|
return N(() => () => n.current?.disconnect(), []), { containerRef: l, isDark: e };
|
|
1427
1430
|
}, Nn = {
|
|
1428
|
-
maplibre: () => import("./index-
|
|
1431
|
+
maplibre: () => import("./index-CE0LkHWA.js").then((e) => e.createMaplibreAdapter),
|
|
1429
1432
|
// Google needs its script in the page before a map can be constructed, so the
|
|
1430
1433
|
// loader resolves only once the API is up - which is what keeps the factory
|
|
1431
1434
|
// itself synchronous for every engine.
|
|
1432
|
-
google: (e) => import("./index-
|
|
1435
|
+
google: (e) => import("./index-DbwzNe2F.js").then((t) => t.loadGoogleAdapter(e))
|
|
1433
1436
|
}, Qe = /* @__PURE__ */ new Map(), jn = (e, t) => {
|
|
1434
1437
|
const n = Qe.get(e);
|
|
1435
1438
|
if (n)
|
|
@@ -2051,7 +2054,7 @@ const cl = {
|
|
|
2051
2054
|
e.fitCoordinates(g, { gutter: i, maxZoom: 15, animate: n });
|
|
2052
2055
|
return;
|
|
2053
2056
|
}
|
|
2054
|
-
const
|
|
2057
|
+
const m = g.length === 1 ? { center: he(e, g[0], s, 14), zoom: 14 } : Zt({
|
|
2055
2058
|
adapter: e,
|
|
2056
2059
|
coordinates: g,
|
|
2057
2060
|
inset: s,
|
|
@@ -2059,7 +2062,7 @@ const cl = {
|
|
|
2059
2062
|
gutter: i,
|
|
2060
2063
|
maxZoom: 15
|
|
2061
2064
|
});
|
|
2062
|
-
|
|
2065
|
+
m && (n ? e.easeTo(m, { animate: n }) : e.jumpTo(m, { animate: n }));
|
|
2063
2066
|
}, Qn = (e) => `${e.top},${e.right},${e.bottom},${e.left}`, fa = re(function({
|
|
2064
2067
|
markers: t = [],
|
|
2065
2068
|
routes: n = [],
|
|
@@ -2069,18 +2072,18 @@ const cl = {
|
|
|
2069
2072
|
selectedMarkerId: s,
|
|
2070
2073
|
defaultSelectedMarkerId: p = null,
|
|
2071
2074
|
onMarkerSelect: g,
|
|
2072
|
-
highlightedId:
|
|
2075
|
+
highlightedId: m = null,
|
|
2073
2076
|
viewportInset: r,
|
|
2074
|
-
centerOnMarkerClick:
|
|
2077
|
+
centerOnMarkerClick: u = !1,
|
|
2075
2078
|
fitToMarkers: f,
|
|
2076
|
-
initialViewport:
|
|
2079
|
+
initialViewport: b,
|
|
2077
2080
|
mapStyle: y,
|
|
2078
|
-
interactive:
|
|
2079
|
-
gestureHandling:
|
|
2080
|
-
minZoom:
|
|
2081
|
-
maxZoom:
|
|
2082
|
-
showControls:
|
|
2083
|
-
controlLabels:
|
|
2081
|
+
interactive: z = !0,
|
|
2082
|
+
gestureHandling: x = "cooperative",
|
|
2083
|
+
minZoom: _,
|
|
2084
|
+
maxZoom: R = 18,
|
|
2085
|
+
showControls: d = !0,
|
|
2086
|
+
controlLabels: w,
|
|
2084
2087
|
showCurrentLocation: T = !1,
|
|
2085
2088
|
fullScreen: A = !1,
|
|
2086
2089
|
onSidebarToggle: c,
|
|
@@ -2098,9 +2101,9 @@ const cl = {
|
|
|
2098
2101
|
dataTestId: xe,
|
|
2099
2102
|
className: we
|
|
2100
2103
|
}, De) {
|
|
2101
|
-
const Y = se(), q = Ga(oe), ie = Za(), ce = M(null),
|
|
2104
|
+
const Y = se(), q = Ga(oe), ie = Za(), ce = M(null), j = M(null), [U, Se] = F(
|
|
2102
2105
|
null
|
|
2103
|
-
), [G,
|
|
2106
|
+
), [G, _e] = F(!1), [ga, Le] = F(!1), [ha, ba] = F(0), ot = Ia(), D = Ut(), { containerRef: it, isDark: xa } = Tn(), wa = O(
|
|
2104
2107
|
(h) => {
|
|
2105
2108
|
ce.current = h, it(h);
|
|
2106
2109
|
},
|
|
@@ -2113,7 +2116,7 @@ const cl = {
|
|
|
2113
2116
|
}, [Xe, y?.provider, q]);
|
|
2114
2117
|
const [za, va] = F(
|
|
2115
2118
|
p
|
|
2116
|
-
), ue = s !== void 0 ? s : za, Me =
|
|
2119
|
+
), ue = s !== void 0 ? s : za, Me = O(
|
|
2117
2120
|
(h) => {
|
|
2118
2121
|
s === void 0 && va(h), g?.(h);
|
|
2119
2122
|
},
|
|
@@ -2136,18 +2139,18 @@ const cl = {
|
|
|
2136
2139
|
Ke.current = Ye;
|
|
2137
2140
|
const ut = M(Q);
|
|
2138
2141
|
ut.current = Q;
|
|
2139
|
-
const ae = M(null), mt = f ??
|
|
2142
|
+
const ae = M(null), mt = f ?? b === void 0, X = O(() => {
|
|
2140
2143
|
const h = {
|
|
2141
2144
|
width: ce.current?.clientWidth ?? 0,
|
|
2142
2145
|
height: ce.current?.clientHeight ?? 0
|
|
2143
2146
|
};
|
|
2144
2147
|
return { inset: Lt(Ke.current, h), size: h };
|
|
2145
|
-
}, []), de =
|
|
2146
|
-
(h,
|
|
2148
|
+
}, []), de = O(
|
|
2149
|
+
(h, v) => {
|
|
2147
2150
|
ae.current = { kind: "fit" }, Ht({
|
|
2148
2151
|
adapter: h,
|
|
2149
2152
|
points: te.current,
|
|
2150
|
-
animate:
|
|
2153
|
+
animate: v,
|
|
2151
2154
|
routes: Ue.current,
|
|
2152
2155
|
arcs: Ge.current,
|
|
2153
2156
|
...X()
|
|
@@ -2156,97 +2159,97 @@ const cl = {
|
|
|
2156
2159
|
[X]
|
|
2157
2160
|
), dt = M(de);
|
|
2158
2161
|
dt.current = de;
|
|
2159
|
-
const ye =
|
|
2160
|
-
(h,
|
|
2161
|
-
const
|
|
2162
|
-
ae.current = { kind: "flight", zoom:
|
|
2162
|
+
const ye = O(
|
|
2163
|
+
(h, v) => {
|
|
2164
|
+
const S = Math.max(h.getZoom(), 15);
|
|
2165
|
+
ae.current = { kind: "flight", zoom: S };
|
|
2163
2166
|
const { inset: E } = X();
|
|
2164
2167
|
h.easeTo(
|
|
2165
2168
|
{
|
|
2166
|
-
center: he(h,
|
|
2167
|
-
zoom:
|
|
2169
|
+
center: he(h, v.coordinates, E, S),
|
|
2170
|
+
zoom: S
|
|
2168
2171
|
},
|
|
2169
2172
|
{ animate: !D }
|
|
2170
2173
|
);
|
|
2171
2174
|
},
|
|
2172
2175
|
[X, D]
|
|
2173
|
-
),
|
|
2176
|
+
), Sa = O(
|
|
2174
2177
|
(h) => {
|
|
2175
|
-
const
|
|
2176
|
-
if (ae.current = null,
|
|
2178
|
+
const v = j.current, S = te.current.find((E) => E.id === h);
|
|
2179
|
+
if (ae.current = null, u && v && S) {
|
|
2177
2180
|
const { inset: E } = X();
|
|
2178
|
-
|
|
2179
|
-
{ center: he(
|
|
2181
|
+
v.easeTo(
|
|
2182
|
+
{ center: he(v, S.coordinates, E) },
|
|
2180
2183
|
{ animate: !D }
|
|
2181
2184
|
);
|
|
2182
2185
|
}
|
|
2183
2186
|
me.current(h);
|
|
2184
2187
|
},
|
|
2185
|
-
[
|
|
2188
|
+
[u, X, D]
|
|
2186
2189
|
), yt = M(!1);
|
|
2187
2190
|
N(() => {
|
|
2188
2191
|
yt.current || t.length <= Ot || (yt.current = !0, console.warn(
|
|
2189
2192
|
`F0Map: ${t.length} markers exceeds the recommended maximum of ${Ot}. Markers are DOM elements - pan/zoom will degrade. Aggregate or filter the data, or wait for a GL clustering path.`
|
|
2190
2193
|
));
|
|
2191
2194
|
}, [t.length]);
|
|
2192
|
-
const { coords: ft, request: gt } = Mn(T),
|
|
2193
|
-
ae.current = null,
|
|
2194
|
-
}, []), La =
|
|
2195
|
-
ae.current = null,
|
|
2196
|
-
}, []), Ma =
|
|
2197
|
-
|
|
2198
|
-
}, [de, D]), Ta =
|
|
2195
|
+
const { coords: ft, request: gt } = Mn(T), _a = O(() => {
|
|
2196
|
+
ae.current = null, j.current?.zoomIn();
|
|
2197
|
+
}, []), La = O(() => {
|
|
2198
|
+
ae.current = null, j.current?.zoomOut();
|
|
2199
|
+
}, []), Ma = O(() => {
|
|
2200
|
+
j.current && de(j.current, !D);
|
|
2201
|
+
}, [de, D]), Ta = O(() => {
|
|
2199
2202
|
gt((h) => {
|
|
2200
|
-
const
|
|
2201
|
-
if (!
|
|
2203
|
+
const v = j.current;
|
|
2204
|
+
if (!v)
|
|
2202
2205
|
return;
|
|
2203
2206
|
ae.current = null;
|
|
2204
|
-
const
|
|
2205
|
-
|
|
2206
|
-
{ center: he(
|
|
2207
|
+
const S = Math.max(v.getZoom(), 13), { inset: E } = X();
|
|
2208
|
+
v.flyTo(
|
|
2209
|
+
{ center: he(v, h, E, S), zoom: S },
|
|
2207
2210
|
{ animate: !D }
|
|
2208
2211
|
);
|
|
2209
2212
|
});
|
|
2210
|
-
}, [gt, X, D]), Na =
|
|
2213
|
+
}, [gt, X, D]), Na = O(
|
|
2211
2214
|
(h) => {
|
|
2212
|
-
const
|
|
2213
|
-
if (!
|
|
2215
|
+
const v = j.current;
|
|
2216
|
+
if (!v)
|
|
2214
2217
|
return;
|
|
2215
2218
|
ae.current = null;
|
|
2216
|
-
const
|
|
2217
|
-
adapter:
|
|
2219
|
+
const S = Zt({
|
|
2220
|
+
adapter: v,
|
|
2218
2221
|
coordinates: h,
|
|
2219
2222
|
...X(),
|
|
2220
2223
|
gutter: 64,
|
|
2221
2224
|
maxZoom: 16
|
|
2222
2225
|
});
|
|
2223
|
-
|
|
2226
|
+
S && (D ? v.jumpTo(S, { animate: !1 }) : v.flyTo(S));
|
|
2224
2227
|
},
|
|
2225
2228
|
[X, D]
|
|
2226
|
-
), ja =
|
|
2229
|
+
), ja = O(
|
|
2227
2230
|
(h) => {
|
|
2228
|
-
const
|
|
2229
|
-
|
|
2231
|
+
const v = j.current, S = te.current.find((E) => E.id === h);
|
|
2232
|
+
v && S && ye(v, S), Me(h);
|
|
2230
2233
|
},
|
|
2231
2234
|
[ye, Me]
|
|
2232
2235
|
);
|
|
2233
2236
|
N(() => {
|
|
2234
2237
|
if (!Te || ue === null)
|
|
2235
2238
|
return;
|
|
2236
|
-
const h = (
|
|
2237
|
-
|
|
2238
|
-
},
|
|
2239
|
-
return
|
|
2239
|
+
const h = (S) => {
|
|
2240
|
+
S.key !== "Escape" || S.defaultPrevented || (S.preventDefault(), me.current(null));
|
|
2241
|
+
}, v = ce.current?.ownerDocument ?? document;
|
|
2242
|
+
return v.addEventListener("keydown", h), () => v.removeEventListener("keydown", h);
|
|
2240
2243
|
}, [Te, ue]), Fa(
|
|
2241
2244
|
De,
|
|
2242
2245
|
() => ({
|
|
2243
|
-
getNativeMap: () =>
|
|
2246
|
+
getNativeMap: () => j.current?.native() ?? null,
|
|
2244
2247
|
focusMarker: (h) => {
|
|
2245
|
-
const
|
|
2246
|
-
!
|
|
2248
|
+
const v = j.current, S = te.current.find((E) => E.id === h);
|
|
2249
|
+
!v || !S || (ye(v, S), me.current(h));
|
|
2247
2250
|
},
|
|
2248
2251
|
fitToMarkers: () => {
|
|
2249
|
-
|
|
2252
|
+
j.current && de(j.current, !D);
|
|
2250
2253
|
},
|
|
2251
2254
|
clearSelection: () => me.current(null)
|
|
2252
2255
|
}),
|
|
@@ -2256,7 +2259,7 @@ const cl = {
|
|
|
2256
2259
|
je.current = pe;
|
|
2257
2260
|
const ht = M(ie);
|
|
2258
2261
|
ht.current = ie;
|
|
2259
|
-
const qe = M(null), Ra = M(
|
|
2262
|
+
const qe = M(null), Ra = M(b ?? Dt);
|
|
2260
2263
|
N(() => {
|
|
2261
2264
|
if (H)
|
|
2262
2265
|
return;
|
|
@@ -2264,35 +2267,35 @@ const cl = {
|
|
|
2264
2267
|
if (!h)
|
|
2265
2268
|
return;
|
|
2266
2269
|
qe.current = je.current;
|
|
2267
|
-
const
|
|
2268
|
-
let
|
|
2270
|
+
const v = Ra.current;
|
|
2271
|
+
let S = null, E = !1;
|
|
2269
2272
|
const ge = [];
|
|
2270
2273
|
return jn(q, ht.current).then(($) => {
|
|
2271
2274
|
if (!E) {
|
|
2272
2275
|
try {
|
|
2273
|
-
|
|
2276
|
+
S = $({
|
|
2274
2277
|
container: h,
|
|
2275
2278
|
style: je.current,
|
|
2276
|
-
center:
|
|
2277
|
-
zoom:
|
|
2278
|
-
minZoom:
|
|
2279
|
-
maxZoom:
|
|
2280
|
-
interactive:
|
|
2281
|
-
cooperativeGestures:
|
|
2279
|
+
center: v.center,
|
|
2280
|
+
zoom: v.zoom ?? Dt.zoom,
|
|
2281
|
+
minZoom: _,
|
|
2282
|
+
maxZoom: R,
|
|
2283
|
+
interactive: z,
|
|
2284
|
+
cooperativeGestures: x === "cooperative"
|
|
2282
2285
|
});
|
|
2283
2286
|
} catch {
|
|
2284
|
-
|
|
2287
|
+
_e(!0);
|
|
2285
2288
|
return;
|
|
2286
2289
|
}
|
|
2287
|
-
ze(
|
|
2290
|
+
ze(S);
|
|
2288
2291
|
}
|
|
2289
2292
|
}).catch(($) => {
|
|
2290
2293
|
console.error("[F0Map] could not load the map engine", $), E || Le(!0);
|
|
2291
2294
|
}), () => {
|
|
2292
|
-
E = !0, ge.forEach(($) => $()),
|
|
2295
|
+
E = !0, ge.forEach(($) => $()), S && (j.current = null, Se(null), S.destroy());
|
|
2293
2296
|
};
|
|
2294
2297
|
function ze($) {
|
|
2295
|
-
|
|
2298
|
+
j.current = $, Se($), _e(!1);
|
|
2296
2299
|
let ve = !1;
|
|
2297
2300
|
ge.push(
|
|
2298
2301
|
Wt($, "ready", () => {
|
|
@@ -2317,45 +2320,45 @@ const cl = {
|
|
|
2317
2320
|
}
|
|
2318
2321
|
}, [
|
|
2319
2322
|
H,
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2323
|
+
z,
|
|
2324
|
+
x,
|
|
2325
|
+
_,
|
|
2326
|
+
R,
|
|
2324
2327
|
mt,
|
|
2325
2328
|
q,
|
|
2326
2329
|
ha
|
|
2327
2330
|
]), N(() => {
|
|
2328
|
-
const h =
|
|
2331
|
+
const h = j.current;
|
|
2329
2332
|
!h || qe.current === pe || (qe.current = pe, h.applyStyle(pe), Wt(
|
|
2330
2333
|
h,
|
|
2331
2334
|
"styled",
|
|
2332
2335
|
() => h.setGlobeProjection(Ze.current === "globe")
|
|
2333
2336
|
));
|
|
2334
2337
|
}, [pe]), N(() => {
|
|
2335
|
-
|
|
2338
|
+
j.current?.setGlobeProjection(I === "globe");
|
|
2336
2339
|
}, [I]);
|
|
2337
2340
|
const bt = M(ye);
|
|
2338
2341
|
bt.current = ye, N(() => {
|
|
2339
|
-
if (!
|
|
2342
|
+
if (!m)
|
|
2340
2343
|
return;
|
|
2341
|
-
const h =
|
|
2342
|
-
h &&
|
|
2343
|
-
}, [
|
|
2344
|
+
const h = j.current, v = te.current.find((S) => S.id === m);
|
|
2345
|
+
h && v && bt.current(h, v);
|
|
2346
|
+
}, [m]);
|
|
2344
2347
|
const Pa = Qn(Ye), xt = M(null);
|
|
2345
2348
|
N(() => {
|
|
2346
2349
|
const h = xt.current;
|
|
2347
2350
|
xt.current = Ke.current;
|
|
2348
|
-
const
|
|
2349
|
-
if (!h || !
|
|
2351
|
+
const v = j.current;
|
|
2352
|
+
if (!h || !v)
|
|
2350
2353
|
return;
|
|
2351
|
-
const { inset:
|
|
2354
|
+
const { inset: S, size: E } = X(), ge = ae.current, ze = !D, $ = te.current.find(
|
|
2352
2355
|
(Pe) => Pe.id === pt.current
|
|
2353
2356
|
);
|
|
2354
2357
|
if ($) {
|
|
2355
2358
|
const Pe = ge?.kind === "flight" ? ge.zoom : void 0;
|
|
2356
|
-
|
|
2359
|
+
v.easeTo(
|
|
2357
2360
|
{
|
|
2358
|
-
center: he(
|
|
2361
|
+
center: he(v, $.coordinates, S, Pe),
|
|
2359
2362
|
zoom: Pe
|
|
2360
2363
|
},
|
|
2361
2364
|
{ animate: ze }
|
|
@@ -2363,19 +2366,19 @@ const cl = {
|
|
|
2363
2366
|
return;
|
|
2364
2367
|
}
|
|
2365
2368
|
if (ge?.kind === "fit") {
|
|
2366
|
-
dt.current(
|
|
2369
|
+
dt.current(v, ze);
|
|
2367
2370
|
return;
|
|
2368
2371
|
}
|
|
2369
|
-
const ve = at(Lt(h, E)), kt = at(
|
|
2372
|
+
const ve = at(Lt(h, E)), kt = at(S), Ve = v.project(v.getCenter()), St = Ve && v.unproject({
|
|
2370
2373
|
x: Ve.x + ve.x - kt.x,
|
|
2371
2374
|
y: Ve.y + ve.y - kt.y
|
|
2372
2375
|
});
|
|
2373
|
-
|
|
2376
|
+
St && v.easeTo({ center: St }, { animate: ze });
|
|
2374
2377
|
}, [Pa, X]);
|
|
2375
2378
|
const wt = n.length > 0 || l.length > 0, fe = Ne === null ? 0 : Ne + C.gap - C.inset, Re = M({ from: fe, to: fe });
|
|
2376
2379
|
Re.current.to !== fe && (Re.current = { from: Re.current.to, to: fe });
|
|
2377
2380
|
const zt = fe > Re.current.from ? ne.enter : ne.exit, vt = ee ? ne.enter : ne.exit;
|
|
2378
|
-
return /* @__PURE__ */ o(le, { dataTestId: xe, children: H ? /* @__PURE__ */ o(Ln, { className: we }) : /* @__PURE__ */
|
|
2381
|
+
return /* @__PURE__ */ o(le, { dataTestId: xe, children: H ? /* @__PURE__ */ o(Ln, { className: we }) : /* @__PURE__ */ B(
|
|
2379
2382
|
"div",
|
|
2380
2383
|
{
|
|
2381
2384
|
ref: wa,
|
|
@@ -2401,7 +2404,7 @@ const cl = {
|
|
|
2401
2404
|
}
|
|
2402
2405
|
),
|
|
2403
2406
|
/* @__PURE__ */ o("div", { role: "status", "aria-live": "polite", className: "sr-only", children: `${t.length} ${t.length === 1 ? Y.map.location : Y.map.locations}` }),
|
|
2404
|
-
!G && U && ft ? /* @__PURE__ */
|
|
2407
|
+
!G && U && ft ? /* @__PURE__ */ B(Ee, { children: [
|
|
2405
2408
|
/* @__PURE__ */ o(
|
|
2406
2409
|
ya,
|
|
2407
2410
|
{
|
|
@@ -2412,7 +2415,7 @@ const cl = {
|
|
|
2412
2415
|
/* @__PURE__ */ o("span", { className: "sr-only", children: Y.map.currentLocation })
|
|
2413
2416
|
] }) : null,
|
|
2414
2417
|
!G && U && wt ? /* @__PURE__ */ o(
|
|
2415
|
-
|
|
2418
|
+
_n,
|
|
2416
2419
|
{
|
|
2417
2420
|
adapter: U,
|
|
2418
2421
|
routes: n,
|
|
@@ -2428,8 +2431,8 @@ const cl = {
|
|
|
2428
2431
|
adapter: U,
|
|
2429
2432
|
points: t,
|
|
2430
2433
|
selectedId: ue,
|
|
2431
|
-
highlightedId:
|
|
2432
|
-
onSelect:
|
|
2434
|
+
highlightedId: m,
|
|
2435
|
+
onSelect: Sa,
|
|
2433
2436
|
onClusterExpand: Na
|
|
2434
2437
|
}
|
|
2435
2438
|
) : null,
|
|
@@ -2457,7 +2460,7 @@ const cl = {
|
|
|
2457
2460
|
transitionDuration: vt.duration,
|
|
2458
2461
|
transitionTimingFunction: vt.easing
|
|
2459
2462
|
},
|
|
2460
|
-
children: /* @__PURE__ */
|
|
2463
|
+
children: /* @__PURE__ */ B(
|
|
2461
2464
|
"div",
|
|
2462
2465
|
{
|
|
2463
2466
|
className: "flex items-start gap-2",
|
|
@@ -2498,7 +2501,7 @@ const cl = {
|
|
|
2498
2501
|
children: J
|
|
2499
2502
|
}
|
|
2500
2503
|
) : null,
|
|
2501
|
-
!G && U &&
|
|
2504
|
+
!G && U && d && z ? /* @__PURE__ */ o(
|
|
2502
2505
|
"div",
|
|
2503
2506
|
{
|
|
2504
2507
|
className: W(
|
|
@@ -2514,16 +2517,16 @@ const cl = {
|
|
|
2514
2517
|
children: /* @__PURE__ */ o(
|
|
2515
2518
|
Vt,
|
|
2516
2519
|
{
|
|
2517
|
-
onZoomIn:
|
|
2520
|
+
onZoomIn: _a,
|
|
2518
2521
|
onZoomOut: La,
|
|
2519
2522
|
onFit: t.length > 0 || wt ? Ma : void 0,
|
|
2520
2523
|
onLocate: Ta,
|
|
2521
|
-
labels:
|
|
2524
|
+
labels: w
|
|
2522
2525
|
}
|
|
2523
2526
|
)
|
|
2524
2527
|
}
|
|
2525
2528
|
) : null,
|
|
2526
|
-
ga && !G ? /* @__PURE__ */
|
|
2529
|
+
ga && !G ? /* @__PURE__ */ B("div", { 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", children: [
|
|
2527
2530
|
/* @__PURE__ */ o("span", { children: Y.map.loadError }),
|
|
2528
2531
|
/* @__PURE__ */ o(
|
|
2529
2532
|
"button",
|
|
@@ -2531,12 +2534,12 @@ const cl = {
|
|
|
2531
2534
|
type: "button",
|
|
2532
2535
|
onClick: () => {
|
|
2533
2536
|
Le(!1);
|
|
2534
|
-
const h =
|
|
2537
|
+
const h = j.current;
|
|
2535
2538
|
if (h) {
|
|
2536
2539
|
h.applyStyle(je.current);
|
|
2537
2540
|
return;
|
|
2538
2541
|
}
|
|
2539
|
-
ba((
|
|
2542
|
+
ba((v) => v + 1);
|
|
2540
2543
|
},
|
|
2541
2544
|
className: "font-medium underline",
|
|
2542
2545
|
children: Y.map.retry
|