@factorialco/f0-react 12.10.0 → 12.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ArchiveThumbnail-b34U-zTc.js +70 -0
- package/dist/ArchiveViewer-BpmryW7A.js +172 -0
- package/dist/{ChatPostComposerDialog-DcmLrQk6.js → ChatPostComposerDialog-Cr207fXs.js} +4 -4
- package/dist/{CoachmarkProvider-XfLjB3dH.js → CoachmarkProvider-CsytVD-X.js} +29764 -29935
- package/dist/CodeThumbnail-8NiQ3uzU.js +31 -0
- package/dist/CodeViewer-BNZqt-5s.js +98 -0
- package/dist/DocumentToolbar-DUe9R1rU.js +74 -0
- package/dist/{DocxThumbnail-kHTNnwW0.js → DocxThumbnail-CK9vFoTB.js} +2 -2
- package/dist/{DocxViewer-CqHgSExq.js → DocxViewer-BUMy2iL7.js} +25 -23
- package/dist/ExternalLink-RdKU698E.js +22 -0
- package/dist/{F0AiProcessingOverlay-H23WHd7F.js → F0AiProcessingOverlay-CiUTeBwG.js} +1388 -1384
- package/dist/F0Alert-Ca8sBfXN.js +102 -0
- package/dist/F0AudioPlayer-BefDLQA2.js +1083 -0
- package/dist/F0AudioPlayer-CNb4kXOk.js +3 -0
- package/dist/{popover-BjrPOMeQ.js → F0Button-d91IgOnc.js} +3164 -8587
- package/dist/{F0CanvasPanel--hLKeQvg.js → F0CanvasPanel-BOo_mxBl.js} +10286 -9593
- package/dist/F0DocumentViewer-CaYAO9ok.js +3 -0
- package/dist/F0DocumentViewer-h0XY5tgT.js +90 -0
- package/dist/F0Icon-DmCBV0gK.js +202 -0
- package/dist/{F0Map-hvgCUGk8.js → F0Map-b1uYlF_H.js} +614 -613
- package/dist/F0SegmentedControl-DXoAzTmH.js +103 -0
- package/dist/{F0Select-B-ZxVjXG.js → F0Select-BZ20yXKy.js} +9172 -9251
- package/dist/{F0VideoPlayer-CNp5hXgp.js → F0VideoPlayer-D85XCpqh.js} +390 -430
- package/dist/F0VideoPlayer-_zLFiEIp.js +1 -0
- package/dist/HtmlThumbnail-BJuJkuvu.js +60 -0
- package/dist/HtmlViewer-DxOnMV30.js +208 -0
- package/dist/LayoutGroup-BGb5jMxE.js +57 -0
- package/dist/LockLocked-gdodYvT_.js +41 -0
- package/dist/{Map-eIXVKc1x.js → Map-BOMgctnS.js} +55 -52
- package/dist/{PdfThumbnail-CCSmwxQU.js → PdfThumbnail-98PDy4ud.js} +5 -5
- package/dist/PdfViewer-nBnKrTYD.js +296 -0
- package/dist/SandboxedHtmlFrame-B95lWsIP.js +309 -0
- package/dist/{SheetViewer-BN5UYkEZ.js → SheetViewer-CD9SHbXJ.js} +36 -26
- package/dist/TextThumbnail-DKNxh344.js +15 -0
- package/dist/{TextViewer-Bt0_dYB-.js → TextViewer-DxRBCXzV.js} +44 -41
- package/dist/ai.d.ts +3 -3
- package/dist/ai.js +5 -5
- package/dist/bash-BcZBmoDA.js +169 -0
- package/dist/c-Dv-5_kUQ.js +187 -0
- package/dist/component-status.js +2 -2
- package/dist/core-C0MCmPil.js +842 -0
- package/dist/cpp-CMQhucZt.js +236 -0
- package/dist/csharp-CuDKSCf2.js +260 -0
- package/dist/css-Dta7Q4Li.js +145 -0
- package/dist/dart-po7Eq73d.js +134 -0
- package/dist/diff-IgsQP-8T.js +39 -0
- package/dist/dist-CFY0KELA.js +55 -0
- package/dist/dist-DtILhk4w.js +253 -0
- package/dist/dist-zvwuNflP.js +59 -0
- package/dist/dockerfile-B4Bz9I5u.js +34 -0
- package/dist/dos-1TcyLtUq.js +57 -0
- package/dist/elixir-BnEjyLGa.js +189 -0
- package/dist/erlang-tgri7ZSv.js +218 -0
- package/dist/experimental.d.ts +24 -4
- package/dist/experimental.js +5957 -5752
- package/dist/{exports-BByQBwpi.d.ts → exports-cxvNeHfV.d.ts} +1 -1
- package/dist/f0.d.ts +130 -8
- package/dist/f0.js +1969 -3034
- package/dist/fetchText-o_GOtiv3.js +54 -0
- package/dist/go-CEVmppuo.js +144 -0
- package/dist/graphql-BWwc-u8d.js +67 -0
- package/dist/groovy-BELuqtd6.js +127 -0
- package/dist/haskell-Cxh7aaFM.js +138 -0
- package/dist/highlight-CqFL-_MG.js +114 -0
- package/dist/i18n-provider-Bdgo-LeP.js +150 -0
- package/dist/{i18n-provider-defaults-p0UGTA_k.js → i18n-provider-defaults-B9vdZZeS.js} +35 -1
- package/dist/{i18n-provider-defaults-DQxuUMpU.d.ts → i18n-provider-defaults-DyPn8R7T.d.ts} +34 -0
- package/dist/i18n-provider-defaults.d.ts +1 -1
- package/dist/i18n-provider-defaults.js +1 -1
- package/dist/{index-D3nEDg8x.d.ts → index-DF8ubeg6.d.ts} +1 -1
- package/dist/ini-DA-F0rRr.js +88 -0
- package/dist/java-Bujnoc_f.js +174 -0
- package/dist/javascript-BeEhpXRE.js +431 -0
- package/dist/json-CxvE7tEw.js +42 -0
- package/dist/kotlin-DOwDGI_m.js +206 -0
- package/dist/less-DWlR-e-o.js +196 -0
- package/dist/localized-BrUgGMzm.js +46 -0
- package/dist/lua-BlZiakwh.js +46 -0
- package/dist/makefile-D3841Yg4.js +57 -0
- package/dist/{maplibre-Bywi9z2G.js → maplibre-Ip4Qe9dM.js} +1 -1
- package/dist/markdown-D1wNG79U.js +178 -0
- package/dist/objectivec-DxtRzTBy.js +117 -0
- package/dist/ownValue-D4uSXt0d.js +4 -0
- package/dist/{pdfWorker-CKgxOaCl.js → pdfWorker-DMjHHAyP.js} +12 -9
- package/dist/pdfWorkerConfig-BwllKt1K.js +8 -0
- package/dist/perl-BWRmkuyz.js +192 -0
- package/dist/php-CjwybYSP.js +300 -0
- package/dist/popover-ics24JxK.js +4486 -0
- package/dist/{posts-DGtDUrKT.js → posts-BHRBUAYJ.js} +2 -0
- package/dist/powershell-CgKcNA5Q.js +188 -0
- package/dist/properties-Bc45MTzW.js +38 -0
- package/dist/protobuf-Bv_xSUaI.js +61 -0
- package/dist/purify.es-ZpfdAuNV.js +545 -0
- package/dist/python-D8PdGjgy.js +238 -0
- package/dist/r-DA-9ZIdU.js +140 -0
- package/dist/{renderDocx-_UmnE-yc.js → renderDocx-BW-uDyaZ.js} +2 -0
- package/dist/ruby-Bqr16BpN.js +262 -0
- package/dist/rust-BCvJMwk8.js +182 -0
- package/dist/scala-Du8mOD2z.js +162 -0
- package/dist/scrollarea-cxaFAWG5.js +691 -0
- package/dist/scss-AMxHqh46.js +155 -0
- package/dist/skeleton-AC0Fb8zj.js +72 -0
- package/dist/sql-BbYSgcOA.js +118 -0
- package/dist/styles.css +1 -1
- package/dist/swift-DRKtalPn.js +575 -0
- package/dist/toolbarStyles-lTj_42zD.js +52 -0
- package/dist/{types-UMYBr8Mi.d.ts → types-geibVrTM.d.ts} +3 -95
- package/dist/typescript-Bv8uKU6V.js +516 -0
- package/dist/{useData-B7LYSzh0.js → useData-BYkiGUHX.js} +4734 -5375
- package/dist/useFetchedText-BR3_KLXx.js +38 -0
- package/dist/useThumbnailText-DwXQvLIe.js +22 -0
- package/dist/xml-BVpP05uE.js +162 -0
- package/dist/yaml-BNe2WG-i.js +144 -0
- package/dist/zipTree-B2zUYl6b.js +247 -0
- package/package.json +2 -1
- package/dist/DocumentToolbar-CqbY6eID.js +0 -70
- package/dist/F0DocumentViewer-BN-2IVgz.js +0 -400
- package/dist/F0DocumentViewer-D1G3M2J_.js +0 -3
- package/dist/F0Text-D92NWQRd.js +0 -81
- package/dist/F0VideoPlayer-D4bZBBLK.js +0 -1
- package/dist/TextThumbnail-X04JgaNI.js +0 -26
- package/dist/dist-DvxtFKDL.js +0 -78
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { a as e, o as t,
|
|
2
|
-
import {
|
|
3
|
-
import { L as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
1
|
+
import { a as e, o as t, ui as n } from "./CoachmarkProvider-CsytVD-X.js";
|
|
2
|
+
import { i as r, r as i } from "./i18n-provider-Bdgo-LeP.js";
|
|
3
|
+
import { L as a, R as o } from "./tooltip-BX4dSfeL.js";
|
|
4
|
+
import { H as s, T as c, U as l, b as u, h as d, t as f, wt as p } from "./F0Button-d91IgOnc.js";
|
|
5
|
+
import { Ls as m, Z as h, bs as g, co as _, zo as v } from "./F0CanvasPanel-BOo_mxBl.js";
|
|
6
|
+
import { t as y } from "./F0Icon-DmCBV0gK.js";
|
|
7
|
+
import { N as b, T as x, U as S, f as C, z as w } from "./useData-BYkiGUHX.js";
|
|
8
|
+
import { a as T, n as E, o as ee, s as te, t as D } from "./dist-Cuwaibqg.js";
|
|
9
|
+
import { createContext as O, forwardRef as k, useCallback as A, useContext as j, useEffect as M, useId as ne, useImperativeHandle as re, useLayoutEffect as ie, useMemo as N, useRef as P, useState as F } from "react";
|
|
10
|
+
import { Fragment as ae, jsx as I, jsxs as L } from "react/jsx-runtime";
|
|
11
|
+
import { createPortal as oe } from "react-dom";
|
|
11
12
|
//#region src/addons/map/F0Map/camera.ts
|
|
12
|
-
var
|
|
13
|
+
var se = (e, t) => ({
|
|
13
14
|
top: Math.max(e?.top ?? 0, t?.top ?? 0),
|
|
14
15
|
right: Math.max(e?.right ?? 0, t?.right ?? 0),
|
|
15
16
|
bottom: Math.max(e?.bottom ?? 0, t?.bottom ?? 0),
|
|
16
17
|
left: Math.max(e?.left ?? 0, t?.left ?? 0)
|
|
17
|
-
}),
|
|
18
|
+
}), ce = (e, { width: t, height: n }) => {
|
|
18
19
|
let r = t > 0 && e.left + e.right >= t, i = n > 0 && e.top + e.bottom >= n;
|
|
19
20
|
return {
|
|
20
21
|
top: i ? 0 : e.top,
|
|
@@ -22,18 +23,18 @@ var ce = (e, t) => ({
|
|
|
22
23
|
left: r ? 0 : e.left,
|
|
23
24
|
right: r ? 0 : e.right
|
|
24
25
|
};
|
|
25
|
-
},
|
|
26
|
+
}, le = (e) => ({
|
|
26
27
|
x: (e.left - e.right) / 2,
|
|
27
28
|
y: (e.top - e.bottom) / 2
|
|
28
|
-
}),
|
|
29
|
-
let i =
|
|
29
|
+
}), ue = (e, t, n, r = e.getZoom()) => {
|
|
30
|
+
let i = le(n), a = e.project(t);
|
|
30
31
|
if (!a || i.x === 0 && i.y === 0) return t;
|
|
31
32
|
let o = 2 ** (e.getZoom() - r);
|
|
32
33
|
return e.unproject({
|
|
33
34
|
x: a.x - i.x * o,
|
|
34
35
|
y: a.y - i.y * o
|
|
35
36
|
}) ?? t;
|
|
36
|
-
},
|
|
37
|
+
}, de = ({ adapter: e, coordinates: t, inset: n, size: r, gutter: i, maxZoom: a }) => {
|
|
37
38
|
let o = e.cameraForCoordinates(t, { gutter: i });
|
|
38
39
|
if (!o) return null;
|
|
39
40
|
let s = (e, t, n) => e > 2 * i ? (e - t - n - 2 * i) / (e - 2 * i) : 1, c = Math.min(s(r.width, n.left, n.right), s(r.height, n.top, n.bottom)), l = o.zoom ?? e.getZoom();
|
|
@@ -43,17 +44,17 @@ var ce = (e, t) => ({
|
|
|
43
44
|
};
|
|
44
45
|
let u = Math.min(l + Math.log2(c), a);
|
|
45
46
|
return {
|
|
46
|
-
center:
|
|
47
|
+
center: ue(e, o.center, n, u),
|
|
47
48
|
zoom: u
|
|
48
49
|
};
|
|
49
|
-
},
|
|
50
|
-
let [r, i] = e, a =
|
|
50
|
+
}, fe = 6371008.8, pe = (e) => e * Math.PI / 180, me = (e) => e * 180 / Math.PI, he = (e, t, n = 64) => {
|
|
51
|
+
let [r, i] = e, a = pe(i), o = pe(r), s = Math.max(t, 0) / fe, c = [];
|
|
51
52
|
for (let e = 0; e < n; e++) {
|
|
52
53
|
let t = 2 * Math.PI * e / n, r = Math.asin(Math.sin(a) * Math.cos(s) + Math.cos(a) * Math.sin(s) * Math.cos(t)), i = o + Math.atan2(Math.sin(t) * Math.sin(s) * Math.cos(a), Math.cos(s) - Math.sin(a) * Math.sin(r));
|
|
53
|
-
c.push([
|
|
54
|
+
c.push([me(i), me(r)]);
|
|
54
55
|
}
|
|
55
56
|
return c.push(c[0]), c;
|
|
56
|
-
},
|
|
57
|
+
}, ge = [
|
|
57
58
|
"neutral",
|
|
58
59
|
"grey",
|
|
59
60
|
"radical",
|
|
@@ -71,15 +72,15 @@ var ce = (e, t) => ({
|
|
|
71
72
|
"army",
|
|
72
73
|
"smoke",
|
|
73
74
|
"barbie"
|
|
74
|
-
].filter((e) => e !== "neutral" && e !== "grey"),
|
|
75
|
-
neutral:
|
|
76
|
-
grey:
|
|
77
|
-
...Object.fromEntries(
|
|
78
|
-
},
|
|
79
|
-
neutral:
|
|
75
|
+
].filter((e) => e !== "neutral" && e !== "grey"), _e = {
|
|
76
|
+
neutral: D.grey[100],
|
|
77
|
+
grey: D.grey.solid[50],
|
|
78
|
+
...Object.fromEntries(ge.map((e) => [e, D[e][50]]))
|
|
79
|
+
}, ve = (e) => `hsl(${_e[e]})`, ye = {
|
|
80
|
+
neutral: D.grey[100],
|
|
80
81
|
grey: "218 14% 30%",
|
|
81
|
-
...Object.fromEntries(
|
|
82
|
-
},
|
|
82
|
+
...Object.fromEntries(ge.map((e) => [e, D[e][70]]))
|
|
83
|
+
}, be = (e, t) => t ? ye[e] : _e[e], xe = D.grey[100], Se = {
|
|
83
84
|
sm: {
|
|
84
85
|
d: 16,
|
|
85
86
|
border: 1.5,
|
|
@@ -140,96 +141,96 @@ var ce = (e, t) => ({
|
|
|
140
141
|
icon: "lg",
|
|
141
142
|
avatar: "lg"
|
|
142
143
|
}
|
|
143
|
-
},
|
|
144
|
-
let e =
|
|
145
|
-
return -(e.d - e.caretOverlap + e.caretH +
|
|
146
|
-
},
|
|
147
|
-
let { size:
|
|
144
|
+
}, R = (e) => Se[e], z = 5.6, Ce = 1.5, we = () => {
|
|
145
|
+
let e = Se.xl;
|
|
146
|
+
return -(e.d - e.caretOverlap + e.caretH + z + Ce) + 3;
|
|
147
|
+
}, B = "hsl(var(--white-100))", V = k(function(e, t) {
|
|
148
|
+
let { size: i = "md", selected: s = !1, collapsed: c = !1, label: u, showLabel: d = !0, labelPlacement: f = "right", onClick: m, ariaLabel: h, presentational: g = !1, dataTestId: _, className: v } = e, b = e.variant ?? "color", S = Se[s ? "xl" : i], w = !!m, T = b === "color" || b === "icon" || b === "letter", E = b === "person" && "firstName" in e ? e.firstName + e.lastName : (b === "team" || b === "company") && "name" in e ? e.name : null, ee = T ? e.color ?? "radical" : E ? b === "person" && "src" in e && e.src ? "grey" : x(E) ?? "grey" : "neutral", te = n(), D = s ? 32 : {
|
|
148
149
|
xs: 12,
|
|
149
150
|
sm: 16,
|
|
150
151
|
md: 20,
|
|
151
152
|
lg: 24
|
|
152
|
-
}[
|
|
153
|
+
}[S.icon], O = {
|
|
153
154
|
xs: 20,
|
|
154
155
|
sm: 24,
|
|
155
156
|
md: 32,
|
|
156
157
|
lg: 40
|
|
157
|
-
},
|
|
158
|
+
}, k = Se[i].avatar, A = s ? O[S.avatar] / O[k] : 1, j = (e) => /* @__PURE__ */ I("span", {
|
|
158
159
|
className: "flex shrink-0 items-center justify-center transition-transform duration-200 ease-out",
|
|
159
|
-
style: { transform: `scale(${
|
|
160
|
+
style: { transform: `scale(${A})` },
|
|
160
161
|
children: e
|
|
161
|
-
}),
|
|
162
|
+
}), M = b === "color" ? null : b === "icon" && "icon" in e ? /* @__PURE__ */ I(y, {
|
|
162
163
|
icon: e.icon,
|
|
163
|
-
size:
|
|
164
|
+
size: S.icon,
|
|
164
165
|
color: "#ffffff",
|
|
165
166
|
style: {
|
|
166
|
-
width:
|
|
167
|
-
height:
|
|
167
|
+
width: D,
|
|
168
|
+
height: D,
|
|
168
169
|
transition: "width 200ms ease-out, height 200ms ease-out"
|
|
169
170
|
}
|
|
170
|
-
}) : b === "letter" && "letter" in e ? /* @__PURE__ */
|
|
171
|
+
}) : b === "letter" && "letter" in e ? /* @__PURE__ */ I("span", {
|
|
171
172
|
"aria-hidden": !0,
|
|
172
173
|
className: "font-semibold leading-none",
|
|
173
174
|
style: {
|
|
174
|
-
color:
|
|
175
|
-
fontSize: Math.round(
|
|
175
|
+
color: B,
|
|
176
|
+
fontSize: Math.round(D * .78),
|
|
176
177
|
transition: "font-size 200ms ease-out"
|
|
177
178
|
},
|
|
178
179
|
children: e.letter.charAt(0).toUpperCase()
|
|
179
|
-
}) : b === "person" && "firstName" in e ?
|
|
180
|
+
}) : b === "person" && "firstName" in e ? j(/* @__PURE__ */ I(C, {
|
|
180
181
|
avatar: {
|
|
181
182
|
type: "person",
|
|
182
183
|
firstName: e.firstName,
|
|
183
184
|
lastName: e.lastName,
|
|
184
185
|
src: e.src
|
|
185
186
|
},
|
|
186
|
-
size:
|
|
187
|
-
})) : b === "team" && "name" in e ?
|
|
187
|
+
size: k
|
|
188
|
+
})) : b === "team" && "name" in e ? j(/* @__PURE__ */ I(C, {
|
|
188
189
|
avatar: {
|
|
189
190
|
type: "team",
|
|
190
191
|
name: e.name,
|
|
191
192
|
src: e.src
|
|
192
193
|
},
|
|
193
|
-
size:
|
|
194
|
-
})) : b === "company" && "name" in e ?
|
|
194
|
+
size: k
|
|
195
|
+
})) : b === "company" && "name" in e ? j(/* @__PURE__ */ I(C, {
|
|
195
196
|
avatar: {
|
|
196
197
|
type: "company",
|
|
197
198
|
name: e.name,
|
|
198
199
|
src: e.src
|
|
199
200
|
},
|
|
200
|
-
size:
|
|
201
|
-
})) : b === "image" && "src" in e ? /* @__PURE__ */
|
|
201
|
+
size: k
|
|
202
|
+
})) : b === "image" && "src" in e ? /* @__PURE__ */ I("img", {
|
|
202
203
|
src: e.src,
|
|
203
204
|
alt: "alt" in e ? e.alt ?? "" : "",
|
|
204
205
|
className: "h-full w-full object-cover"
|
|
205
|
-
}) : null,
|
|
206
|
+
}) : null, ne = b === "team" || b === "company" || b === "icon", re = /* @__PURE__ */ I("span", {
|
|
206
207
|
className: "relative z-[1] flex shrink-0 items-center justify-center overflow-hidden border-solid transition-all duration-200 ease-out",
|
|
207
208
|
style: {
|
|
208
|
-
width:
|
|
209
|
-
height:
|
|
210
|
-
borderRadius:
|
|
211
|
-
borderWidth:
|
|
212
|
-
borderColor:
|
|
213
|
-
backgroundColor:
|
|
214
|
-
},
|
|
215
|
-
children: b === "color" ? /* @__PURE__ */
|
|
209
|
+
width: S.d,
|
|
210
|
+
height: S.d,
|
|
211
|
+
borderRadius: ne ? Math.round(S.d * .3) : 9999,
|
|
212
|
+
borderWidth: S.border,
|
|
213
|
+
borderColor: B,
|
|
214
|
+
backgroundColor: T ? ve(ee) : B
|
|
215
|
+
},
|
|
216
|
+
children: b === "color" ? /* @__PURE__ */ I("span", {
|
|
216
217
|
className: "rounded-full transition-all duration-200 ease-out",
|
|
217
218
|
style: {
|
|
218
|
-
width:
|
|
219
|
-
height:
|
|
220
|
-
backgroundColor:
|
|
221
|
-
}
|
|
222
|
-
}) :
|
|
223
|
-
}),
|
|
224
|
-
width:
|
|
225
|
-
height:
|
|
219
|
+
width: S.d * .36,
|
|
220
|
+
height: S.d * .36,
|
|
221
|
+
backgroundColor: B
|
|
222
|
+
}
|
|
223
|
+
}) : M
|
|
224
|
+
}), ie = /* @__PURE__ */ I(p, { children: s ? /* @__PURE__ */ I(l.svg, {
|
|
225
|
+
width: S.caretW,
|
|
226
|
+
height: S.caretH,
|
|
226
227
|
viewBox: "0 0 16 13",
|
|
227
228
|
"aria-hidden": !0,
|
|
228
229
|
className: "absolute left-1/2",
|
|
229
230
|
style: {
|
|
230
|
-
top:
|
|
231
|
-
marginLeft: -
|
|
232
|
-
fill:
|
|
231
|
+
top: S.d - S.caretOverlap - 3,
|
|
232
|
+
marginLeft: -S.caretW / 2,
|
|
233
|
+
fill: B,
|
|
233
234
|
transformOrigin: "50% 0%"
|
|
234
235
|
},
|
|
235
236
|
initial: {
|
|
@@ -244,201 +245,201 @@ var ce = (e, t) => ({
|
|
|
244
245
|
scaleY: 0,
|
|
245
246
|
opacity: 0
|
|
246
247
|
},
|
|
247
|
-
transition:
|
|
248
|
+
transition: te ? { duration: 0 } : {
|
|
248
249
|
duration: .18,
|
|
249
250
|
ease: "easeOut",
|
|
250
251
|
opacity: { duration: .1 }
|
|
251
252
|
},
|
|
252
|
-
children: /* @__PURE__ */
|
|
253
|
-
}, "caret") : null }),
|
|
253
|
+
children: /* @__PURE__ */ I("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 }), N = /* @__PURE__ */ L("span", {
|
|
254
255
|
className: "relative inline-flex",
|
|
255
|
-
style: { filter: `drop-shadow(0 ${
|
|
256
|
-
children: [
|
|
257
|
-
}),
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
`0 1px 2px ${
|
|
261
|
-
`0 -1px 2px ${
|
|
262
|
-
`1px 0 2px ${
|
|
263
|
-
`-1px 0 2px ${
|
|
264
|
-
].join(","),
|
|
256
|
+
style: { filter: `drop-shadow(0 ${S.shadowY}px ${S.shadowBlur / 2}px hsl(${xe} / 0.3))` },
|
|
257
|
+
children: [ie, re]
|
|
258
|
+
}), P = Se[i], F = S.d / 2, oe = z, se = s ? we() : -F, ce = s ? "bottom" : f, le = `0 0 ${Math.max(2, Math.round(P.label * .28))}px ${B}`, ue = [
|
|
259
|
+
le,
|
|
260
|
+
le,
|
|
261
|
+
`0 1px 2px ${B}`,
|
|
262
|
+
`0 -1px 2px ${B}`,
|
|
263
|
+
`1px 0 2px ${B}`,
|
|
264
|
+
`-1px 0 2px ${B}`
|
|
265
|
+
].join(","), de = !s && (ce === "top" || ce === "bottom"), fe = de ? "line-clamp-4 text-center" : s ? "whitespace-nowrap text-center" : "whitespace-nowrap", pe = P.d / 2, me = {
|
|
265
266
|
right: {
|
|
266
|
-
transform: `translate(${
|
|
267
|
-
style: { paddingLeft:
|
|
267
|
+
transform: `translate(${pe}px, -50%)`,
|
|
268
|
+
style: { paddingLeft: P.gap }
|
|
268
269
|
},
|
|
269
270
|
left: {
|
|
270
|
-
transform: `translate(calc(-100% - ${
|
|
271
|
+
transform: `translate(calc(-100% - ${pe}px), -50%)`,
|
|
271
272
|
style: {
|
|
272
|
-
paddingRight:
|
|
273
|
+
paddingRight: P.gap,
|
|
273
274
|
textAlign: "right"
|
|
274
275
|
}
|
|
275
276
|
},
|
|
276
277
|
top: {
|
|
277
|
-
transform: `translate(-50%, calc(-100% - ${
|
|
278
|
-
style: { paddingBottom:
|
|
278
|
+
transform: `translate(-50%, calc(-100% - ${pe}px))`,
|
|
279
|
+
style: { paddingBottom: P.gap }
|
|
279
280
|
},
|
|
280
281
|
bottom: {
|
|
281
|
-
transform: `translate(-50%, ${
|
|
282
|
-
style: { paddingTop:
|
|
282
|
+
transform: `translate(-50%, ${s ? oe : pe}px)`,
|
|
283
|
+
style: { paddingTop: P.gap + (s ? 4 : 0) }
|
|
283
284
|
}
|
|
284
|
-
}[
|
|
285
|
-
className:
|
|
285
|
+
}[ce], he = u && d && !c && /* @__PURE__ */ I("span", {
|
|
286
|
+
className: a("absolute left-0 top-0 font-semibold leading-tight transition-all duration-200 ease-out", fe),
|
|
286
287
|
style: {
|
|
287
|
-
color: `hsl(${
|
|
288
|
-
fontSize:
|
|
289
|
-
textShadow:
|
|
290
|
-
transform:
|
|
291
|
-
maxWidth:
|
|
292
|
-
...
|
|
293
|
-
},
|
|
294
|
-
children:
|
|
295
|
-
}),
|
|
288
|
+
color: `hsl(${ye[ee]})`,
|
|
289
|
+
fontSize: P.label,
|
|
290
|
+
textShadow: ue,
|
|
291
|
+
transform: me.transform,
|
|
292
|
+
maxWidth: de ? P.maxLabelW : void 0,
|
|
293
|
+
...me.style
|
|
294
|
+
},
|
|
295
|
+
children: u
|
|
296
|
+
}), ge = /* @__PURE__ */ I("span", {
|
|
296
297
|
"aria-hidden": !0,
|
|
297
298
|
className: "absolute left-0 top-0 rounded-full border-solid transition-all duration-200 ease-out",
|
|
298
299
|
style: {
|
|
299
|
-
width:
|
|
300
|
-
height:
|
|
300
|
+
width: oe * 2,
|
|
301
|
+
height: oe * 2,
|
|
301
302
|
marginLeft: -5.6,
|
|
302
303
|
marginTop: -5.6,
|
|
303
304
|
borderWidth: 1.5,
|
|
304
|
-
borderColor:
|
|
305
|
-
backgroundColor:
|
|
306
|
-
boxShadow: `0 1px 2px hsl(${
|
|
307
|
-
transform: `scale(${
|
|
308
|
-
opacity:
|
|
305
|
+
borderColor: B,
|
|
306
|
+
backgroundColor: ve(ee),
|
|
307
|
+
boxShadow: `0 1px 2px hsl(${xe} / 0.3)`,
|
|
308
|
+
transform: `scale(${s || c ? 1 : 0})`,
|
|
309
|
+
opacity: s || c ? 1 : 0
|
|
309
310
|
}
|
|
310
|
-
}),
|
|
311
|
-
|
|
312
|
-
/* @__PURE__ */
|
|
311
|
+
}), _e = /* @__PURE__ */ L(ae, { children: [
|
|
312
|
+
ge,
|
|
313
|
+
/* @__PURE__ */ I("span", {
|
|
313
314
|
className: "absolute left-0 top-0 transition-all duration-200 ease-out",
|
|
314
315
|
style: {
|
|
315
|
-
transform: `translate(-50%, ${
|
|
316
|
-
opacity: +!
|
|
316
|
+
transform: `translate(-50%, ${se}px) scale(${+!c})`,
|
|
317
|
+
opacity: +!c
|
|
317
318
|
},
|
|
318
|
-
children:
|
|
319
|
+
children: N
|
|
319
320
|
}),
|
|
320
|
-
|
|
321
|
+
he
|
|
321
322
|
] });
|
|
322
|
-
return /* @__PURE__ */
|
|
323
|
-
dataTestId:
|
|
324
|
-
children:
|
|
323
|
+
return /* @__PURE__ */ I(r, {
|
|
324
|
+
dataTestId: _,
|
|
325
|
+
children: w ? /* @__PURE__ */ I("button", {
|
|
325
326
|
ref: t,
|
|
326
327
|
type: "button",
|
|
327
|
-
...
|
|
328
|
+
...g ? {
|
|
328
329
|
tabIndex: -1,
|
|
329
330
|
"aria-hidden": !0
|
|
330
331
|
} : {
|
|
331
|
-
"aria-label":
|
|
332
|
-
"aria-pressed":
|
|
332
|
+
"aria-label": h,
|
|
333
|
+
"aria-pressed": s
|
|
333
334
|
},
|
|
334
|
-
onClick:
|
|
335
|
-
className:
|
|
336
|
-
children:
|
|
337
|
-
}) : /* @__PURE__ */
|
|
335
|
+
onClick: m,
|
|
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: _e
|
|
338
|
+
}) : /* @__PURE__ */ I("span", {
|
|
338
339
|
role: "img",
|
|
339
|
-
"aria-label":
|
|
340
|
-
className:
|
|
341
|
-
children:
|
|
340
|
+
"aria-label": h,
|
|
341
|
+
className: a("relative inline-flex", v),
|
|
342
|
+
children: _e
|
|
342
343
|
})
|
|
343
344
|
});
|
|
344
345
|
});
|
|
345
|
-
|
|
346
|
-
var
|
|
346
|
+
V.displayName = "BaseMapMarker";
|
|
347
|
+
var Te = V, H = (e, t) => `hsl(${be(e, t).replace(/ /g, ", ")})`, Ee = (e, t) => ({
|
|
347
348
|
id: e.id,
|
|
348
|
-
ring:
|
|
349
|
-
color: e.color ??
|
|
349
|
+
ring: he(e.center, e.radiusMeters),
|
|
350
|
+
color: e.color ?? H(e.variant ?? "malibu", t),
|
|
350
351
|
fillOpacity: .15,
|
|
351
352
|
strokeWidth: 2
|
|
352
|
-
}),
|
|
353
|
-
let r =
|
|
354
|
-
return
|
|
353
|
+
}), De = ({ adapter: e, areas: t, isDark: n }) => {
|
|
354
|
+
let r = N(() => t.map((e) => Ee(e, n)), [t, n]);
|
|
355
|
+
return M(function() {
|
|
355
356
|
e.setAreas(r);
|
|
356
|
-
}, [e, r]),
|
|
357
|
+
}, [e, r]), M(function() {
|
|
357
358
|
return () => e.setAreas([]);
|
|
358
359
|
}, [e]), null;
|
|
359
|
-
},
|
|
360
|
+
}, Oe = {
|
|
360
361
|
background: "transparent",
|
|
361
362
|
border: "default",
|
|
362
363
|
borderStyle: "solid",
|
|
363
364
|
borderColor: "secondary"
|
|
364
|
-
},
|
|
365
|
+
}, U = {
|
|
365
366
|
control: "md",
|
|
366
367
|
panel: "xl"
|
|
367
|
-
},
|
|
368
|
+
}, ke = {
|
|
368
369
|
md: "rounded-md backdrop-blur-md bg-f1-background-inverse-secondary dark:bg-f1-background-tertiary",
|
|
369
370
|
xl: "rounded-xl backdrop-blur-md bg-f1-background-inverse-secondary dark:bg-f1-background-tertiary"
|
|
370
|
-
},
|
|
371
|
+
}, Ae = (e) => ke[e], W = {
|
|
371
372
|
inset: 8,
|
|
372
373
|
gap: 8,
|
|
373
374
|
listWidth: 214,
|
|
374
375
|
detailWidth: 344,
|
|
375
376
|
toggleSize: 38
|
|
376
|
-
},
|
|
377
|
+
}, je = "cubic-bezier(0.77, 0, 0.175, 1)", G = {
|
|
377
378
|
enter: {
|
|
378
379
|
duration: "175ms",
|
|
379
|
-
easing:
|
|
380
|
+
easing: je
|
|
380
381
|
},
|
|
381
382
|
exit: {
|
|
382
383
|
duration: "250ms",
|
|
383
|
-
easing:
|
|
384
|
+
easing: je
|
|
384
385
|
}
|
|
385
|
-
},
|
|
386
|
-
className:
|
|
387
|
-
children: /* @__PURE__ */
|
|
388
|
-
...
|
|
389
|
-
borderRadius:
|
|
386
|
+
}, Me = ({ children: e }) => /* @__PURE__ */ I("div", {
|
|
387
|
+
className: Ae(U.control),
|
|
388
|
+
children: /* @__PURE__ */ I(b, {
|
|
389
|
+
...Oe,
|
|
390
|
+
borderRadius: U.control,
|
|
390
391
|
padding: "none",
|
|
391
|
-
children: /* @__PURE__ */
|
|
392
|
+
children: /* @__PURE__ */ I("div", {
|
|
392
393
|
className: "flex flex-col items-center gap-1 p-0.5",
|
|
393
394
|
children: e
|
|
394
395
|
})
|
|
395
396
|
})
|
|
396
|
-
}),
|
|
397
|
-
let
|
|
398
|
-
return /* @__PURE__ */
|
|
399
|
-
dataTestId:
|
|
400
|
-
children: /* @__PURE__ */
|
|
401
|
-
ref:
|
|
397
|
+
}), Ne = k(({ onZoomIn: e, onZoomOut: t, onFit: n, onLocate: a, labels: o, dataTestId: s }, c) => {
|
|
398
|
+
let l = i(), u = !!(a || n), d = !!(e || t), p = (e) => /* @__PURE__ */ I(Me, { children: e });
|
|
399
|
+
return /* @__PURE__ */ I(r, {
|
|
400
|
+
dataTestId: s,
|
|
401
|
+
children: /* @__PURE__ */ L("div", {
|
|
402
|
+
ref: c,
|
|
402
403
|
role: "toolbar",
|
|
403
404
|
"aria-orientation": "vertical",
|
|
404
|
-
"aria-label":
|
|
405
|
+
"aria-label": l.map.navigation,
|
|
405
406
|
className: "flex flex-col items-center gap-2",
|
|
406
|
-
children: [
|
|
407
|
+
children: [u ? p(/* @__PURE__ */ L(ae, { children: [n ? /* @__PURE__ */ I(f, {
|
|
407
408
|
variant: "ghost",
|
|
408
409
|
size: "md",
|
|
409
|
-
label:
|
|
410
|
-
icon:
|
|
410
|
+
label: o?.fit ?? l.map.controls.fit,
|
|
411
|
+
icon: g,
|
|
411
412
|
hideLabel: !0,
|
|
412
413
|
onClick: n
|
|
413
|
-
}) : null,
|
|
414
|
+
}) : null, a ? /* @__PURE__ */ I(f, {
|
|
414
415
|
variant: "ghost",
|
|
415
416
|
size: "md",
|
|
416
|
-
label:
|
|
417
|
-
icon:
|
|
417
|
+
label: o?.locate ?? l.map.controls.locate,
|
|
418
|
+
icon: _,
|
|
418
419
|
hideLabel: !0,
|
|
419
|
-
onClick:
|
|
420
|
-
}) : null] })) : null, d ? p(/* @__PURE__ */
|
|
420
|
+
onClick: a
|
|
421
|
+
}) : null] })) : null, d ? p(/* @__PURE__ */ L(ae, { children: [e ? /* @__PURE__ */ I(f, {
|
|
421
422
|
variant: "ghost",
|
|
422
423
|
size: "md",
|
|
423
|
-
label:
|
|
424
|
-
icon:
|
|
424
|
+
label: o?.zoomIn ?? l.map.controls.zoomIn,
|
|
425
|
+
icon: S,
|
|
425
426
|
hideLabel: !0,
|
|
426
427
|
onClick: e
|
|
427
|
-
}) : null, t ? /* @__PURE__ */
|
|
428
|
+
}) : null, t ? /* @__PURE__ */ I(f, {
|
|
428
429
|
variant: "ghost",
|
|
429
430
|
size: "md",
|
|
430
|
-
label:
|
|
431
|
-
icon:
|
|
431
|
+
label: o?.zoomOut ?? l.map.controls.zoomOut,
|
|
432
|
+
icon: w,
|
|
432
433
|
hideLabel: !0,
|
|
433
434
|
onClick: t
|
|
434
435
|
}) : null] })) : null]
|
|
435
436
|
})
|
|
436
437
|
});
|
|
437
438
|
});
|
|
438
|
-
|
|
439
|
+
Ne.displayName = "F0MapControls";
|
|
439
440
|
//#endregion
|
|
440
441
|
//#region src/addons/map/F0Map/components/F0MapList/F0MapList.tsx
|
|
441
|
-
var
|
|
442
|
+
var K = (e, t) => {
|
|
442
443
|
if (e.label) return e.label;
|
|
443
444
|
switch (e.variant) {
|
|
444
445
|
case "employee": return `${e.firstName} ${e.lastName}`.trim();
|
|
@@ -446,41 +447,41 @@ var G = (e, t) => {
|
|
|
446
447
|
case "stop": return e.letter.charAt(0).toUpperCase();
|
|
447
448
|
default: return t;
|
|
448
449
|
}
|
|
449
|
-
},
|
|
450
|
-
let
|
|
451
|
-
return /* @__PURE__ */
|
|
452
|
-
dataTestId:
|
|
453
|
-
children: /* @__PURE__ */
|
|
454
|
-
ref:
|
|
455
|
-
id:
|
|
456
|
-
"aria-label":
|
|
450
|
+
}, Pe = k(function({ points: e, selectedId: t, onSelect: n, visible: o = !1, label: s, id: c, dataTestId: l, className: u }, d) {
|
|
451
|
+
let f = i(), p = s ?? f.map.listLabel;
|
|
452
|
+
return /* @__PURE__ */ I(r, {
|
|
453
|
+
dataTestId: l,
|
|
454
|
+
children: /* @__PURE__ */ L("nav", {
|
|
455
|
+
ref: d,
|
|
456
|
+
id: c,
|
|
457
|
+
"aria-label": p,
|
|
457
458
|
tabIndex: -1,
|
|
458
|
-
className:
|
|
459
|
-
children: [
|
|
459
|
+
className: a("outline-none", o ? "absolute inset-0 z-20 overflow-auto bg-f1-background p-4" : "sr-only", u),
|
|
460
|
+
children: [o ? /* @__PURE__ */ I("h2", {
|
|
460
461
|
className: "text-f1-foreground mb-2 text-base font-medium",
|
|
461
|
-
children:
|
|
462
|
-
}) : null, /* @__PURE__ */
|
|
463
|
-
className:
|
|
464
|
-
children: e.map((e) => /* @__PURE__ */
|
|
462
|
+
children: p
|
|
463
|
+
}) : null, /* @__PURE__ */ I("ul", {
|
|
464
|
+
className: o ? "flex flex-col gap-0.5" : void 0,
|
|
465
|
+
children: e.map((e) => /* @__PURE__ */ I("li", { children: /* @__PURE__ */ I("button", {
|
|
465
466
|
type: "button",
|
|
466
467
|
"aria-current": e.id === t || void 0,
|
|
467
468
|
onClick: () => n(e.id),
|
|
468
|
-
className:
|
|
469
|
-
children:
|
|
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: K(e, f.map.unnamedLocation)
|
|
470
471
|
}) }, e.id))
|
|
471
472
|
})]
|
|
472
473
|
})
|
|
473
474
|
});
|
|
474
475
|
});
|
|
475
|
-
|
|
476
|
+
Pe.displayName = "F0MapList";
|
|
476
477
|
//#endregion
|
|
477
478
|
//#region src/addons/map/F0Map/hooks/useClusters.ts
|
|
478
|
-
var
|
|
479
|
-
let [a, o] =
|
|
479
|
+
var Fe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i = 164 }) => {
|
|
480
|
+
let [a, o] = F({
|
|
480
481
|
clusters: [],
|
|
481
482
|
singles: t
|
|
482
483
|
});
|
|
483
|
-
return
|
|
484
|
+
return M(() => {
|
|
484
485
|
if (!e || !n) {
|
|
485
486
|
o({
|
|
486
487
|
clusters: [],
|
|
@@ -555,13 +556,13 @@ var Ie = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
555
556
|
r,
|
|
556
557
|
i
|
|
557
558
|
]), a;
|
|
558
|
-
},
|
|
559
|
+
}, Ie = 4, Le = 4, Re = [
|
|
559
560
|
"right",
|
|
560
561
|
"bottom",
|
|
561
562
|
"left",
|
|
562
563
|
"top"
|
|
563
|
-
],
|
|
564
|
-
let a =
|
|
564
|
+
], ze = 1.7, Be = (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, q = null, Ve = (e, t) => (!q && typeof document < "u" && (q = document.createElement("canvas").getContext("2d")), q ? (q.font = `600 ${t}px Inter, system-ui, sans-serif`, q.measureText(e).width) : e.length * t * .55), He = ({ placement: e, cx: t, cy: n, point: r, size: i }) => {
|
|
565
|
+
let a = R(i), o = Ve(r.label ?? "", a.label) + 2, s = a.d / 2;
|
|
565
566
|
if (e === "right" || e === "left") {
|
|
566
567
|
let r = o, i = a.lineH;
|
|
567
568
|
return {
|
|
@@ -571,22 +572,22 @@ var Ie = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
571
572
|
h: i
|
|
572
573
|
};
|
|
573
574
|
}
|
|
574
|
-
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;
|
|
575
576
|
return {
|
|
576
577
|
x: t - c / 2,
|
|
577
578
|
y: d,
|
|
578
579
|
w: c,
|
|
579
580
|
h: l
|
|
580
581
|
};
|
|
581
|
-
},
|
|
582
|
-
let [r, i] =
|
|
583
|
-
return
|
|
582
|
+
}, Ue = (e, t, n = "md") => {
|
|
583
|
+
let [r, i] = F({});
|
|
584
|
+
return M(() => {
|
|
584
585
|
if (!e) {
|
|
585
586
|
i({});
|
|
586
587
|
return;
|
|
587
588
|
}
|
|
588
589
|
let r = 0, a = () => {
|
|
589
|
-
let r =
|
|
590
|
+
let r = R(n).d, a = [], o = [];
|
|
590
591
|
for (let n of t) {
|
|
591
592
|
let t = e.project(n.coordinates);
|
|
592
593
|
if (!t) return;
|
|
@@ -603,7 +604,7 @@ var Ie = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
603
604
|
let s = t.length, c = Array.from({ length: s }, (e, t) => t), l = (e) => {
|
|
604
605
|
for (; c[e] !== e;) e = c[e] = c[c[e]];
|
|
605
606
|
return e;
|
|
606
|
-
}, u = (r *
|
|
607
|
+
}, u = (r * ze) ** 2;
|
|
607
608
|
for (let e = 0; e < s; e++) for (let t = e + 1; t < s; t++) {
|
|
608
609
|
let n = o[e].x - o[t].x, r = o[e].y - o[t].y;
|
|
609
610
|
if (n * n + r * r <= u) {
|
|
@@ -615,15 +616,15 @@ var Ie = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
615
616
|
for (let e = 0; e < s; e++) {
|
|
616
617
|
let r = t[e];
|
|
617
618
|
if (!r.label) continue;
|
|
618
|
-
let i = o[e], s = "right", c = [s, ...
|
|
619
|
+
let i = o[e], s = "right", c = [s, ...Re.filter((e) => e !== s)], l = null;
|
|
619
620
|
for (let e of c) {
|
|
620
|
-
let t =
|
|
621
|
+
let t = He({
|
|
621
622
|
placement: e,
|
|
622
623
|
cx: i.x,
|
|
623
624
|
cy: i.y,
|
|
624
625
|
point: r,
|
|
625
626
|
size: n
|
|
626
|
-
}), o = a.some((e) =>
|
|
627
|
+
}), o = a.some((e) => Be(t, e)), s = f.some((e) => Be(t, e));
|
|
627
628
|
if (!o && !s) {
|
|
628
629
|
l = e, f.push(t);
|
|
629
630
|
break;
|
|
@@ -655,19 +656,19 @@ var Ie = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
655
656
|
t,
|
|
656
657
|
n
|
|
657
658
|
]), r;
|
|
658
|
-
},
|
|
659
|
-
let a =
|
|
659
|
+
}, We = 3, Ge = ({ adapter: e, el: t, markerRef: n, coordinates: r, drag: i }) => {
|
|
660
|
+
let a = P({
|
|
660
661
|
coordinates: r,
|
|
661
662
|
drag: i
|
|
662
663
|
});
|
|
663
|
-
|
|
664
|
+
ie(function() {
|
|
664
665
|
a.current = {
|
|
665
666
|
coordinates: r,
|
|
666
667
|
drag: i
|
|
667
668
|
};
|
|
668
669
|
});
|
|
669
670
|
let o = !!i;
|
|
670
|
-
|
|
671
|
+
M(function() {
|
|
671
672
|
if (!o) return;
|
|
672
673
|
let r = null, i = !1, s = null, c = (t) => r ? e.unproject({
|
|
673
674
|
x: r.at.x + t.clientX - r.x,
|
|
@@ -682,7 +683,7 @@ var Ie = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
682
683
|
}, u = (e) => {
|
|
683
684
|
if (!r) return;
|
|
684
685
|
let t = Math.hypot(e.clientX - r.x, e.clientY - r.y);
|
|
685
|
-
!i && t <
|
|
686
|
+
!i && t < We || (i = !0, s = c(e), s && (n.current?.setPosition(s), a.current.drag?.onDrag?.(s)));
|
|
686
687
|
}, d = (e) => {
|
|
687
688
|
t.releasePointerCapture?.(e.pointerId), t.style.setProperty("cursor", "grab"), r = null;
|
|
688
689
|
}, f = () => n.current?.setPosition(a.current.coordinates), p = (e) => {
|
|
@@ -702,8 +703,8 @@ var Ie = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
702
703
|
o
|
|
703
704
|
]);
|
|
704
705
|
}, J = (e, t) => {
|
|
705
|
-
let [n, r] =
|
|
706
|
-
return
|
|
706
|
+
let [n, r] = F(() => e ? e.getZoom() >= t : !1);
|
|
707
|
+
return M(() => {
|
|
707
708
|
if (!e) {
|
|
708
709
|
r(!1);
|
|
709
710
|
return;
|
|
@@ -733,7 +734,7 @@ var Ie = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
733
734
|
case "workplace": return {
|
|
734
735
|
variant: {
|
|
735
736
|
variant: "icon",
|
|
736
|
-
icon:
|
|
737
|
+
icon: v
|
|
737
738
|
},
|
|
738
739
|
color: qe
|
|
739
740
|
};
|
|
@@ -746,9 +747,9 @@ var Ie = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
746
747
|
};
|
|
747
748
|
default: return { variant: { variant: "color" } };
|
|
748
749
|
}
|
|
749
|
-
}, Xe =
|
|
750
|
+
}, Xe = k(function(e, t) {
|
|
750
751
|
let { variant: n, color: r } = Ye(e);
|
|
751
|
-
return /* @__PURE__ */
|
|
752
|
+
return /* @__PURE__ */ I(Te, {
|
|
752
753
|
ref: t,
|
|
753
754
|
...n,
|
|
754
755
|
color: r,
|
|
@@ -780,32 +781,32 @@ var Y = Xe, Ze = 4, Qe = 3, $e = 1.3, et = 1.08, X = "cubic-bezier(0.16, 1, 0.3,
|
|
|
780
781
|
[-8, 8],
|
|
781
782
|
[8, 8]
|
|
782
783
|
]
|
|
783
|
-
}, rt =
|
|
784
|
-
let
|
|
784
|
+
}, rt = k(function({ count: e, members: t, onClick: n, ariaLabel: o, dataTestId: s, className: c }, l) {
|
|
785
|
+
let u = i(), [d, f] = F(!1), p = t.slice(0, e <= Ze ? Ze : Qe), m = Math.max(0, e - p.length), h = m > 0, g = m > 99 ? "+99" : `+${m}`, _ = nt[p.length + +!!h] ?? nt[4], v = d ? $e : 1, y = d ? et : 1, b = (e) => {
|
|
785
786
|
let [t, n] = _[e] ?? [0, 0];
|
|
786
787
|
return {
|
|
787
788
|
transform: `translate(${t * v}px, ${n * v}px) scale(${y})`,
|
|
788
789
|
transition: `transform 240ms ${X}`
|
|
789
790
|
};
|
|
790
791
|
};
|
|
791
|
-
return /* @__PURE__ */
|
|
792
|
-
dataTestId:
|
|
793
|
-
children: /* @__PURE__ */
|
|
794
|
-
ref:
|
|
792
|
+
return /* @__PURE__ */ I(r, {
|
|
793
|
+
dataTestId: s,
|
|
794
|
+
children: /* @__PURE__ */ L("div", {
|
|
795
|
+
ref: l,
|
|
795
796
|
role: "button",
|
|
796
797
|
tabIndex: 0,
|
|
797
|
-
"aria-label":
|
|
798
|
+
"aria-label": o ?? u.t("map.cluster", { count: e }),
|
|
798
799
|
onClick: n,
|
|
799
800
|
onKeyDown: (e) => {
|
|
800
801
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), n?.());
|
|
801
802
|
},
|
|
802
|
-
onPointerEnter: () =>
|
|
803
|
-
onPointerLeave: () =>
|
|
804
|
-
onFocus: () =>
|
|
805
|
-
onBlur: () =>
|
|
806
|
-
className:
|
|
803
|
+
onPointerEnter: () => f(!0),
|
|
804
|
+
onPointerLeave: () => f(!1),
|
|
805
|
+
onFocus: () => f(!0),
|
|
806
|
+
onBlur: () => f(!1),
|
|
807
|
+
className: a("group relative h-0 w-0 cursor-pointer outline-none", c),
|
|
807
808
|
children: [
|
|
808
|
-
/* @__PURE__ */
|
|
809
|
+
/* @__PURE__ */ I("span", {
|
|
809
810
|
"aria-hidden": !0,
|
|
810
811
|
className: "absolute rounded-lg group-focus-visible:ring-1 group-focus-visible:ring-f1-special-ring group-focus-visible:ring-offset-1",
|
|
811
812
|
style: {
|
|
@@ -815,31 +816,31 @@ var Y = Xe, Ze = 4, Qe = 3, $e = 1.3, et = 1.08, X = "cubic-bezier(0.16, 1, 0.3,
|
|
|
815
816
|
height: tt
|
|
816
817
|
}
|
|
817
818
|
}),
|
|
818
|
-
|
|
819
|
+
p.map((e, t) => /* @__PURE__ */ I("span", {
|
|
819
820
|
className: "absolute left-0 top-0 flex leading-none",
|
|
820
821
|
style: {
|
|
821
822
|
zIndex: t,
|
|
822
823
|
...b(t)
|
|
823
824
|
},
|
|
824
|
-
children: /* @__PURE__ */
|
|
825
|
+
children: /* @__PURE__ */ I(Y, {
|
|
825
826
|
...e,
|
|
826
827
|
showLabel: !1
|
|
827
828
|
})
|
|
828
829
|
}, t)),
|
|
829
830
|
h ? (() => {
|
|
830
|
-
let [e, t] = _[
|
|
831
|
-
return /* @__PURE__ */
|
|
832
|
-
className:
|
|
831
|
+
let [e, t] = _[p.length] ?? [0, 0];
|
|
832
|
+
return /* @__PURE__ */ L("span", {
|
|
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"),
|
|
833
834
|
style: {
|
|
834
835
|
zIndex: Qe,
|
|
835
836
|
backgroundColor: "hsl(var(--white-90))",
|
|
836
837
|
transform: `translate(${e * v}px, ${t * v}px) translate(-50%, -50%) scale(${y})`,
|
|
837
838
|
transition: `transform 240ms ${X}`
|
|
838
839
|
},
|
|
839
|
-
children: [/* @__PURE__ */
|
|
840
|
+
children: [/* @__PURE__ */ I("span", {
|
|
840
841
|
"aria-hidden": !0,
|
|
841
842
|
className: "absolute inset-0 bg-f1-background-hover"
|
|
842
|
-
}), /* @__PURE__ */
|
|
843
|
+
}), /* @__PURE__ */ I("span", {
|
|
843
844
|
className: "relative",
|
|
844
845
|
children: g
|
|
845
846
|
})]
|
|
@@ -853,14 +854,14 @@ rt.displayName = "F0MapCluster";
|
|
|
853
854
|
var Z = rt, it = 16, Q = (e, t, n, r) => {
|
|
854
855
|
let i = e.project(t.coordinates);
|
|
855
856
|
if (!i) return null;
|
|
856
|
-
let a =
|
|
857
|
+
let a = R("xl"), o = R(r), s = i.y + we(), c = {
|
|
857
858
|
x: i.x - a.d / 2,
|
|
858
859
|
y: s,
|
|
859
860
|
w: a.d,
|
|
860
861
|
h: a.d
|
|
861
|
-
}, l = t.label ?
|
|
862
|
+
}, l = t.label ? Ve(t.label, o.label) : 0, u = {
|
|
862
863
|
x: i.x - l / 2,
|
|
863
|
-
y: i.y +
|
|
864
|
+
y: i.y + z,
|
|
864
865
|
w: l,
|
|
865
866
|
h: o.lineH
|
|
866
867
|
}, d = o.d, f = /* @__PURE__ */ new Set();
|
|
@@ -873,12 +874,12 @@ var Z = rt, it = 16, Q = (e, t, n, r) => {
|
|
|
873
874
|
w: d,
|
|
874
875
|
h: d
|
|
875
876
|
};
|
|
876
|
-
(
|
|
877
|
+
(Be(r, c) || l > 0 && Be(r, u)) && f.add(t.id);
|
|
877
878
|
}
|
|
878
879
|
return f;
|
|
879
880
|
}, at = (e, t, n, r) => {
|
|
880
|
-
let [i, a] =
|
|
881
|
-
return
|
|
881
|
+
let [i, a] = F(null);
|
|
882
|
+
return M(() => {
|
|
882
883
|
if (!t || !n.some((e) => e.id === t.id)) {
|
|
883
884
|
a(null);
|
|
884
885
|
return;
|
|
@@ -904,15 +905,15 @@ var Z = rt, it = 16, Q = (e, t, n, r) => {
|
|
|
904
905
|
let { id: t, coordinates: n, label: r, draggable: i, ...a } = e;
|
|
905
906
|
return a;
|
|
906
907
|
}, $ = ({ adapter: e, coordinates: t, selected: n, drag: r, children: i }) => {
|
|
907
|
-
let [a] =
|
|
908
|
-
return
|
|
908
|
+
let [a] = F(() => document.createElement("div")), o = P(null);
|
|
909
|
+
return M(() => {
|
|
909
910
|
let n = (e) => e.stopPropagation();
|
|
910
911
|
a.style.cursor = "pointer", a.addEventListener("click", n);
|
|
911
912
|
let r = e.addDomMarker(a, t);
|
|
912
913
|
return o.current = r, () => {
|
|
913
914
|
a.removeEventListener("click", n), r.remove(), o.current = null;
|
|
914
915
|
};
|
|
915
|
-
}, [e, a]),
|
|
916
|
+
}, [e, a]), M(() => {
|
|
916
917
|
o.current?.setPosition(t);
|
|
917
918
|
}, [t]), Ge({
|
|
918
919
|
adapter: e,
|
|
@@ -920,28 +921,28 @@ var Z = rt, it = 16, Q = (e, t, n, r) => {
|
|
|
920
921
|
markerRef: o,
|
|
921
922
|
coordinates: t,
|
|
922
923
|
drag: r
|
|
923
|
-
}),
|
|
924
|
+
}), M(() => {
|
|
924
925
|
a.style.zIndex = n ? "2" : "";
|
|
925
|
-
}, [a, n]),
|
|
926
|
-
}, st = ({ adapter: e, points: t, selectedId: n, highlightedId: r, onSelect:
|
|
927
|
-
let u =
|
|
926
|
+
}, [a, n]), oe(i, a);
|
|
927
|
+
}, st = ({ adapter: e, points: t, selectedId: n, highlightedId: r, onSelect: a, onMarkerDrag: o, onMarkerDragEnd: s, onClusterExpand: c }) => {
|
|
928
|
+
let u = i(), d = !!s, f = N(() => d ? t.filter((e) => !e.draggable) : t, [t, d]), m = Fe({
|
|
928
929
|
adapter: e,
|
|
929
|
-
points:
|
|
930
|
+
points: f,
|
|
930
931
|
enabled: !0
|
|
931
|
-
}), { clusters: h } = m, g =
|
|
932
|
-
if (
|
|
932
|
+
}), { clusters: h } = m, g = N(() => {
|
|
933
|
+
if (f === t) return m.singles;
|
|
933
934
|
let e = new Set(m.singles);
|
|
934
935
|
return t.filter((t) => t.draggable || e.has(t));
|
|
935
936
|
}, [
|
|
936
937
|
m.singles,
|
|
937
|
-
|
|
938
|
+
f,
|
|
938
939
|
t
|
|
939
|
-
]), _ = J(e, it) ? "lg" : "md", v =
|
|
940
|
-
return /* @__PURE__ */
|
|
940
|
+
]), _ = J(e, it) ? "lg" : "md", v = Ue(e, g, _), y = new Map(t.map((e) => [e.id, e])), b = h.length > 0, x = at(e, n ? y.get(n) : void 0, g, _);
|
|
941
|
+
return /* @__PURE__ */ L(p, { children: [h.map((t) => /* @__PURE__ */ I($, {
|
|
941
942
|
adapter: e,
|
|
942
943
|
coordinates: t.coordinates,
|
|
943
944
|
selected: !1,
|
|
944
|
-
children: /* @__PURE__ */
|
|
945
|
+
children: /* @__PURE__ */ I(l.span, {
|
|
945
946
|
initial: {
|
|
946
947
|
scale: .8,
|
|
947
948
|
opacity: 0
|
|
@@ -965,23 +966,23 @@ var Z = rt, it = 16, Q = (e, t, n, r) => {
|
|
|
965
966
|
]
|
|
966
967
|
},
|
|
967
968
|
className: "absolute left-0 top-0 flex leading-none",
|
|
968
|
-
children: /* @__PURE__ */
|
|
969
|
+
children: /* @__PURE__ */ I(Z, {
|
|
969
970
|
count: t.count,
|
|
970
971
|
members: t.pointIds.map((e) => y.get(e)).filter((e) => !!e).map(ot),
|
|
971
|
-
onClick: () =>
|
|
972
|
+
onClick: () => c(t.bounds)
|
|
972
973
|
})
|
|
973
974
|
})
|
|
974
975
|
}, t.id)), g.map((t) => {
|
|
975
|
-
let
|
|
976
|
-
return /* @__PURE__ */
|
|
976
|
+
let i = v[t.id], c = x?.has(t.id) ?? !1, d = r === t.id;
|
|
977
|
+
return /* @__PURE__ */ I($, {
|
|
977
978
|
adapter: e,
|
|
978
979
|
coordinates: t.coordinates,
|
|
979
|
-
selected: n === t.id ||
|
|
980
|
+
selected: n === t.id || d,
|
|
980
981
|
drag: t.draggable && s ? {
|
|
981
|
-
onDrag:
|
|
982
|
+
onDrag: o && ((e) => o(t.id, e)),
|
|
982
983
|
onDragEnd: (e) => s(t.id, e)
|
|
983
984
|
} : void 0,
|
|
984
|
-
children: /* @__PURE__ */
|
|
985
|
+
children: /* @__PURE__ */ I(l.span, {
|
|
985
986
|
initial: { opacity: 0 },
|
|
986
987
|
animate: { opacity: 1 },
|
|
987
988
|
exit: {
|
|
@@ -996,9 +997,9 @@ var Z = rt, it = 16, Q = (e, t, n, r) => {
|
|
|
996
997
|
ease: "easeOut"
|
|
997
998
|
},
|
|
998
999
|
className: "absolute left-0 top-0",
|
|
999
|
-
children: /* @__PURE__ */
|
|
1000
|
+
children: /* @__PURE__ */ I(p, {
|
|
1000
1001
|
initial: !1,
|
|
1001
|
-
children: /* @__PURE__ */
|
|
1002
|
+
children: /* @__PURE__ */ I(l.span, {
|
|
1002
1003
|
initial: { opacity: 0 },
|
|
1003
1004
|
animate: { opacity: 1 },
|
|
1004
1005
|
exit: { opacity: 0 },
|
|
@@ -1007,15 +1008,15 @@ var Z = rt, it = 16, Q = (e, t, n, r) => {
|
|
|
1007
1008
|
ease: "easeOut"
|
|
1008
1009
|
},
|
|
1009
1010
|
className: "absolute left-0 top-0 flex leading-none",
|
|
1010
|
-
children: /* @__PURE__ */
|
|
1011
|
+
children: /* @__PURE__ */ I(Y, {
|
|
1011
1012
|
...ot(t),
|
|
1012
1013
|
size: _,
|
|
1013
1014
|
label: t.label,
|
|
1014
|
-
showLabel: n === t.id ||
|
|
1015
|
-
labelPlacement:
|
|
1015
|
+
showLabel: n === t.id || d || !b && i !== null,
|
|
1016
|
+
labelPlacement: i ?? "right",
|
|
1016
1017
|
selected: n === t.id,
|
|
1017
|
-
collapsed:
|
|
1018
|
-
onClick: () =>
|
|
1018
|
+
collapsed: c,
|
|
1019
|
+
onClick: () => a(t.id),
|
|
1019
1020
|
presentational: !0,
|
|
1020
1021
|
ariaLabel: t.label ?? u.map.unnamedLocation
|
|
1021
1022
|
})
|
|
@@ -1024,8 +1025,8 @@ var Z = rt, it = 16, Q = (e, t, n, r) => {
|
|
|
1024
1025
|
})
|
|
1025
1026
|
}, t.id);
|
|
1026
1027
|
})] });
|
|
1027
|
-
}, ct = ({ children: e, open: t, offsetX: n, offsetY:
|
|
1028
|
-
let m =
|
|
1028
|
+
}, ct = ({ children: e, open: t, offsetX: n, offsetY: o = W.inset, width: s, entrance: c = "slide", headerStart: l, headerEnd: u, ariaLabel: f, dataTestId: p }) => {
|
|
1029
|
+
let m = i(), h = d(), g = t ? G.enter : G.exit, _ = n - W.inset, v = P({
|
|
1029
1030
|
from: _,
|
|
1030
1031
|
to: _
|
|
1031
1032
|
});
|
|
@@ -1033,48 +1034,48 @@ var Z = rt, it = 16, Q = (e, t, n, r) => {
|
|
|
1033
1034
|
from: v.current.to,
|
|
1034
1035
|
to: _
|
|
1035
1036
|
});
|
|
1036
|
-
let y = _ > v.current.from ?
|
|
1037
|
-
return /* @__PURE__ */
|
|
1038
|
-
dataTestId:
|
|
1039
|
-
children: /* @__PURE__ */
|
|
1037
|
+
let y = _ > v.current.from ? G.enter : G.exit, x = c === "grow" ? "translateX(-10%) scale(0.97)" : `translateX(calc(-100% - ${W.inset}px))`;
|
|
1038
|
+
return /* @__PURE__ */ I(r, {
|
|
1039
|
+
dataTestId: p,
|
|
1040
|
+
children: /* @__PURE__ */ I("div", {
|
|
1040
1041
|
className: "pointer-events-none absolute bottom-2 z-10",
|
|
1041
1042
|
style: {
|
|
1042
|
-
left:
|
|
1043
|
-
top:
|
|
1044
|
-
width:
|
|
1043
|
+
left: W.inset,
|
|
1044
|
+
top: o,
|
|
1045
|
+
width: s,
|
|
1045
1046
|
transform: `translateX(${_}px)`,
|
|
1046
1047
|
transitionProperty: h ? "none" : "transform, top",
|
|
1047
1048
|
transitionDuration: y.duration,
|
|
1048
1049
|
transitionTimingFunction: y.easing
|
|
1049
1050
|
},
|
|
1050
|
-
children: /* @__PURE__ */
|
|
1051
|
+
children: /* @__PURE__ */ I("div", {
|
|
1051
1052
|
role: "complementary",
|
|
1052
|
-
"aria-label":
|
|
1053
|
+
"aria-label": f ?? m.map.panel,
|
|
1053
1054
|
ref: (e) => {
|
|
1054
1055
|
t ? e?.removeAttribute("inert") : e?.setAttribute("inert", "");
|
|
1055
1056
|
},
|
|
1056
|
-
className:
|
|
1057
|
+
className: a("relative h-full overflow-hidden text-base", Ae(U.panel), t ? "pointer-events-auto" : "opacity-0"),
|
|
1057
1058
|
style: {
|
|
1058
1059
|
transform: t || h ? "translateX(0px) scale(1)" : x,
|
|
1059
|
-
transformOrigin:
|
|
1060
|
+
transformOrigin: c === "grow" ? "left center" : void 0,
|
|
1060
1061
|
transitionProperty: h ? "opacity" : "transform, opacity",
|
|
1061
1062
|
transitionDuration: g.duration,
|
|
1062
1063
|
transitionTimingFunction: g.easing
|
|
1063
1064
|
},
|
|
1064
|
-
children: /* @__PURE__ */
|
|
1065
|
-
...
|
|
1066
|
-
borderRadius:
|
|
1065
|
+
children: /* @__PURE__ */ I(b, {
|
|
1066
|
+
...Oe,
|
|
1067
|
+
borderRadius: U.panel,
|
|
1067
1068
|
padding: "none",
|
|
1068
1069
|
height: "full",
|
|
1069
|
-
children: /* @__PURE__ */
|
|
1070
|
+
children: /* @__PURE__ */ L("div", {
|
|
1070
1071
|
className: "flex h-full flex-col",
|
|
1071
|
-
children: [
|
|
1072
|
+
children: [l || u ? /* @__PURE__ */ L("div", {
|
|
1072
1073
|
className: "flex shrink-0 items-center justify-between gap-1 p-0.5",
|
|
1073
|
-
children: [/* @__PURE__ */
|
|
1074
|
+
children: [/* @__PURE__ */ I("div", {
|
|
1074
1075
|
className: "flex min-w-0 flex-1 justify-start",
|
|
1075
|
-
children:
|
|
1076
|
-
}),
|
|
1077
|
-
}) : null, /* @__PURE__ */
|
|
1076
|
+
children: l
|
|
1077
|
+
}), u]
|
|
1078
|
+
}) : null, /* @__PURE__ */ I("div", {
|
|
1078
1079
|
className: "min-h-0 flex-1",
|
|
1079
1080
|
children: e
|
|
1080
1081
|
})]
|
|
@@ -1083,16 +1084,16 @@ var Z = rt, it = 16, Q = (e, t, n, r) => {
|
|
|
1083
1084
|
})
|
|
1084
1085
|
})
|
|
1085
1086
|
});
|
|
1086
|
-
}, lt = (e, t, n = 320) => Math.max(216, Math.min(n, e - t -
|
|
1087
|
+
}, lt = (e, t, n = 320) => Math.max(216, Math.min(n, e - t - ee.mainHardMin)), ut = (e, t = 320) => Math.min(t, Math.max(216, Math.round(e))), dt = 500, ft = "f0-secondary-sidebar-width", pt = (e) => e === null || typeof e == "number" && Number.isFinite(e), mt = O(null), ht = () => j(mt);
|
|
1087
1088
|
function gt() {
|
|
1088
|
-
let [e, t] =
|
|
1089
|
+
let [e, t] = F(!1), n = P(0), r = A(function() {
|
|
1089
1090
|
t(!0), cancelAnimationFrame(n.current), n.current = requestAnimationFrame(function() {
|
|
1090
1091
|
n.current = requestAnimationFrame(function() {
|
|
1091
1092
|
t(!1);
|
|
1092
1093
|
});
|
|
1093
1094
|
});
|
|
1094
1095
|
}, []);
|
|
1095
|
-
return
|
|
1096
|
+
return M(function() {
|
|
1096
1097
|
return () => cancelAnimationFrame(n.current);
|
|
1097
1098
|
}, []), {
|
|
1098
1099
|
isInstant: e,
|
|
@@ -1100,130 +1101,130 @@ function gt() {
|
|
|
1100
1101
|
};
|
|
1101
1102
|
}
|
|
1102
1103
|
function _t() {
|
|
1103
|
-
let [e, t] =
|
|
1104
|
-
return
|
|
1104
|
+
let [e, t] = F(() => window.innerWidth);
|
|
1105
|
+
return M(function() {
|
|
1105
1106
|
let e = () => t(window.innerWidth);
|
|
1106
1107
|
return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
|
|
1107
1108
|
}, []), e;
|
|
1108
1109
|
}
|
|
1109
1110
|
function vt({ enabled: e, children: t, ...n }) {
|
|
1110
|
-
return e ? /* @__PURE__ */
|
|
1111
|
+
return e ? /* @__PURE__ */ I(yt, {
|
|
1111
1112
|
...n,
|
|
1112
1113
|
children: t
|
|
1113
|
-
}) : /* @__PURE__ */
|
|
1114
|
+
}) : /* @__PURE__ */ I(mt.Provider, {
|
|
1114
1115
|
value: null,
|
|
1115
1116
|
children: t
|
|
1116
1117
|
});
|
|
1117
1118
|
}
|
|
1118
1119
|
function yt({ hasSecondarySidebar: e, topBarHeight: t, children: n }) {
|
|
1119
|
-
let { isInstant: r, landInstantly:
|
|
1120
|
+
let { isInstant: r, landInstantly: i } = gt(), a = _t(), [o, s] = F(te.primary), [c, l] = F(te.panel), [d, f] = h({
|
|
1120
1121
|
key: ft,
|
|
1121
1122
|
fallback: null,
|
|
1122
1123
|
validate: pt,
|
|
1123
1124
|
debounceMs: 200
|
|
1124
|
-
}), p = lt(
|
|
1125
|
-
|
|
1126
|
-
}, []), v =
|
|
1127
|
-
e !== v.current && (v.current = e,
|
|
1128
|
-
}, [
|
|
1129
|
-
|
|
1130
|
-
}, [
|
|
1131
|
-
|
|
1132
|
-
}, [
|
|
1133
|
-
|
|
1125
|
+
}), p = lt(a, o, Math.max(320, c)), m = Math.min(c, p), g = d === null ? m : ut(d, p), _ = A(function(e) {
|
|
1126
|
+
s(e);
|
|
1127
|
+
}, []), v = P(c), y = A(function(e) {
|
|
1128
|
+
e !== v.current && (v.current = e, i(), l(e));
|
|
1129
|
+
}, [i]), b = A(function(e) {
|
|
1130
|
+
i(), f(e);
|
|
1131
|
+
}, [i, f]), x = A(function() {
|
|
1132
|
+
i(), f(null);
|
|
1133
|
+
}, [i, f]), S = u(`(max-width: ${o + (e ? m : te.panel) + ee.mainMin - 1}px)`, { initializeWithValue: !0 }) ? "overlay" : "docked", [C, w] = F(!1), T = P(0), E = A(function() {
|
|
1134
|
+
w(!1);
|
|
1134
1135
|
}, []);
|
|
1135
|
-
|
|
1136
|
-
|
|
1136
|
+
ie(function() {
|
|
1137
|
+
i(), S === "docked" && E();
|
|
1137
1138
|
}, [
|
|
1138
1139
|
S,
|
|
1139
|
-
|
|
1140
|
-
|
|
1140
|
+
i,
|
|
1141
|
+
E
|
|
1141
1142
|
]);
|
|
1142
|
-
let
|
|
1143
|
-
|
|
1144
|
-
|
|
1143
|
+
let D = S === "overlay" && C && e;
|
|
1144
|
+
ie(function() {
|
|
1145
|
+
i(), e || E();
|
|
1145
1146
|
}, [
|
|
1146
1147
|
e,
|
|
1147
|
-
|
|
1148
|
-
|
|
1148
|
+
i,
|
|
1149
|
+
E
|
|
1149
1150
|
]);
|
|
1150
|
-
let
|
|
1151
|
-
|
|
1152
|
-
|
|
1151
|
+
let O = P(e);
|
|
1152
|
+
ie(function() {
|
|
1153
|
+
O.current = e;
|
|
1153
1154
|
});
|
|
1154
|
-
let
|
|
1155
|
-
|
|
1155
|
+
let k = P(null);
|
|
1156
|
+
M(function() {
|
|
1156
1157
|
return () => {
|
|
1157
|
-
|
|
1158
|
+
k.current && clearTimeout(k.current);
|
|
1158
1159
|
};
|
|
1159
1160
|
}, []);
|
|
1160
|
-
let
|
|
1161
|
-
S !== "docked" && (
|
|
1162
|
-
|
|
1161
|
+
let j = A(function() {
|
|
1162
|
+
S !== "docked" && (T.current = Date.now(), w(!0), k.current && clearTimeout(k.current), k.current = setTimeout(function() {
|
|
1163
|
+
O.current || w(!1);
|
|
1163
1164
|
}, dt));
|
|
1164
|
-
}, [S]),
|
|
1165
|
-
|
|
1166
|
-
}, [
|
|
1167
|
-
|
|
1168
|
-
if (!
|
|
1165
|
+
}, [S]), ne = E, re = A(function() {
|
|
1166
|
+
D || (T.current = Date.now()), w(!D);
|
|
1167
|
+
}, [D]);
|
|
1168
|
+
M(function() {
|
|
1169
|
+
if (!D) return;
|
|
1169
1170
|
let e = (e) => {
|
|
1170
|
-
e.key === "Escape" && !e.defaultPrevented &&
|
|
1171
|
+
e.key === "Escape" && !e.defaultPrevented && w(!1);
|
|
1171
1172
|
};
|
|
1172
1173
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
1173
|
-
}, [
|
|
1174
|
-
let
|
|
1175
|
-
Date.now() -
|
|
1176
|
-
}, []),
|
|
1174
|
+
}, [D]);
|
|
1175
|
+
let ae = A(function() {
|
|
1176
|
+
Date.now() - T.current < dt || w(!1);
|
|
1177
|
+
}, []), L = N(function() {
|
|
1177
1178
|
return {
|
|
1178
|
-
primarySidebarWidth:
|
|
1179
|
-
reportPrimarySidebarWidth:
|
|
1179
|
+
primarySidebarWidth: o,
|
|
1180
|
+
reportPrimarySidebarWidth: _,
|
|
1180
1181
|
hasSecondarySidebar: e,
|
|
1181
|
-
secondarySidebarWidth:
|
|
1182
|
+
secondarySidebarWidth: g,
|
|
1182
1183
|
secondarySidebarMaxWidth: p,
|
|
1183
1184
|
declareSecondarySidebarWidth: y,
|
|
1184
1185
|
resizeSecondarySidebar: b,
|
|
1185
1186
|
resetSecondarySidebarWidth: x,
|
|
1186
1187
|
navigationMode: S,
|
|
1187
|
-
isOpenOverPage:
|
|
1188
|
-
openOverPage:
|
|
1189
|
-
toggleOverPage:
|
|
1190
|
-
closeOverPage:
|
|
1191
|
-
closeOverPageAfterRouteChange:
|
|
1188
|
+
isOpenOverPage: D,
|
|
1189
|
+
openOverPage: j,
|
|
1190
|
+
toggleOverPage: re,
|
|
1191
|
+
closeOverPage: ne,
|
|
1192
|
+
closeOverPageAfterRouteChange: ae,
|
|
1192
1193
|
topBarHeight: t,
|
|
1193
1194
|
isInstant: r,
|
|
1194
|
-
landInstantly:
|
|
1195
|
+
landInstantly: i
|
|
1195
1196
|
};
|
|
1196
1197
|
}, [
|
|
1197
|
-
|
|
1198
|
-
|
|
1198
|
+
o,
|
|
1199
|
+
_,
|
|
1199
1200
|
e,
|
|
1200
|
-
|
|
1201
|
+
g,
|
|
1201
1202
|
p,
|
|
1202
1203
|
y,
|
|
1203
1204
|
b,
|
|
1204
1205
|
x,
|
|
1205
1206
|
S,
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
ie,
|
|
1207
|
+
D,
|
|
1208
|
+
j,
|
|
1209
1209
|
re,
|
|
1210
|
-
|
|
1210
|
+
ne,
|
|
1211
|
+
ae,
|
|
1211
1212
|
t,
|
|
1212
1213
|
r,
|
|
1213
|
-
|
|
1214
|
+
i
|
|
1214
1215
|
]);
|
|
1215
|
-
return /* @__PURE__ */
|
|
1216
|
-
value:
|
|
1216
|
+
return /* @__PURE__ */ I(mt.Provider, {
|
|
1217
|
+
value: L,
|
|
1217
1218
|
children: n
|
|
1218
1219
|
});
|
|
1219
1220
|
}
|
|
1220
1221
|
//#endregion
|
|
1221
1222
|
//#region src/blocks/ApplicationFrame/FrameProvider.tsx
|
|
1222
|
-
var bt = "one_sidebar_locked", xt =
|
|
1223
|
+
var bt = "one_sidebar_locked", xt = O(void 0), St = /* @__PURE__ */ new WeakSet(), Ct = (e) => {
|
|
1223
1224
|
St.add(e.nativeEvent);
|
|
1224
1225
|
};
|
|
1225
1226
|
function wt() {
|
|
1226
|
-
let e =
|
|
1227
|
+
let e = j(xt);
|
|
1227
1228
|
return e === void 0 ? {
|
|
1228
1229
|
isSmallScreen: !1,
|
|
1229
1230
|
isLastToggleInvokedByUser: !0,
|
|
@@ -1237,53 +1238,53 @@ function wt() {
|
|
|
1237
1238
|
}
|
|
1238
1239
|
var Tt = (e, t) => e.navigationMode === "overlay" ? e.isOpenOverPage ? "unlocked" : "hidden" : t ? "locked" : "hidden", Et = (e, t, n) => e || !t ? n ? "unlocked" : "hidden" : "locked";
|
|
1239
1240
|
function Dt({ children: e }) {
|
|
1240
|
-
let { currentPath: t } =
|
|
1241
|
+
let { currentPath: t } = s(), n = ht(), [r, i] = F(!1), [a, o] = F(!1), c = r ? E.xl : E.md, l = u(`(max-width: ${c}px)`, { initializeWithValue: !0 }), [d, f] = F(() => {
|
|
1241
1242
|
let e = localStorage.getItem(bt);
|
|
1242
1243
|
return e === null || !!e;
|
|
1243
|
-
}), [p, m] =
|
|
1244
|
+
}), [p, m] = F(!1), [h, g] = F(null), _ = A(function() {
|
|
1244
1245
|
n ? n.closeOverPage() : m(!1);
|
|
1245
|
-
}, [n]), v =
|
|
1246
|
-
n?.navigationMode === "overlay" ? n.toggleOverPage() : (
|
|
1246
|
+
}, [n]), v = A(function({ isInvokedByUser: e } = { isInvokedByUser: !0 }) {
|
|
1247
|
+
n?.navigationMode === "overlay" ? n.toggleOverPage() : (o(e ?? !0), l && !n && m(!p), f(!d));
|
|
1247
1248
|
}, [
|
|
1248
1249
|
n,
|
|
1249
1250
|
l,
|
|
1250
1251
|
p,
|
|
1251
|
-
|
|
1252
|
-
]), y =
|
|
1252
|
+
d
|
|
1253
|
+
]), y = A(function(e) {
|
|
1253
1254
|
l || n || St.has(e.nativeEvent) || (e.clientX < 32 && m(!0), e.clientX > 280 && m(!1));
|
|
1254
|
-
}, [l, n]), b = n ? Tt(n,
|
|
1255
|
-
|
|
1255
|
+
}, [l, n]), b = n ? Tt(n, d) : Et(l, d, p), x = n?.closeOverPageAfterRouteChange;
|
|
1256
|
+
M(function() {
|
|
1256
1257
|
m(!1), x?.();
|
|
1257
|
-
}, [t, x]),
|
|
1258
|
-
|
|
1259
|
-
}, [
|
|
1258
|
+
}, [t, x]), M(function() {
|
|
1259
|
+
a && localStorage.setItem(bt, d ? "1" : "");
|
|
1260
|
+
}, [d, a]), M(function() {
|
|
1260
1261
|
return () => {
|
|
1261
1262
|
g(b);
|
|
1262
1263
|
};
|
|
1263
1264
|
}, [b]);
|
|
1264
|
-
let S = n !== null,
|
|
1265
|
+
let S = n !== null, C = N(function() {
|
|
1265
1266
|
return {
|
|
1266
1267
|
isSmallScreen: l,
|
|
1267
|
-
isLastToggleInvokedByUser:
|
|
1268
|
+
isLastToggleInvokedByUser: a,
|
|
1268
1269
|
sidebarState: b,
|
|
1269
1270
|
hideSidebar: _,
|
|
1270
1271
|
toggleSidebar: v,
|
|
1271
1272
|
prevSidebarState: h,
|
|
1272
|
-
setForceFloat:
|
|
1273
|
+
setForceFloat: i,
|
|
1273
1274
|
hasPrimarySidebar: S
|
|
1274
1275
|
};
|
|
1275
1276
|
}, [
|
|
1276
1277
|
l,
|
|
1277
|
-
|
|
1278
|
+
a,
|
|
1278
1279
|
b,
|
|
1279
1280
|
_,
|
|
1280
1281
|
v,
|
|
1281
1282
|
h,
|
|
1282
1283
|
S
|
|
1283
1284
|
]);
|
|
1284
|
-
return /* @__PURE__ */
|
|
1285
|
-
value:
|
|
1286
|
-
children: /* @__PURE__ */
|
|
1285
|
+
return /* @__PURE__ */ I(xt.Provider, {
|
|
1286
|
+
value: C,
|
|
1287
|
+
children: /* @__PURE__ */ I("div", {
|
|
1287
1288
|
onPointerMove: y,
|
|
1288
1289
|
className: "h-screen w-screen",
|
|
1289
1290
|
children: e
|
|
@@ -1292,7 +1293,7 @@ function Dt({ children: e }) {
|
|
|
1292
1293
|
}
|
|
1293
1294
|
//#endregion
|
|
1294
1295
|
//#region src/blocks/ApplicationFrame/layoutTransition.ts
|
|
1295
|
-
var { duration: Ot, ease: kt, settleMs: At } =
|
|
1296
|
+
var { duration: Ot, ease: kt, settleMs: At } = T, jt = At, Mt = {
|
|
1296
1297
|
duration: Ot.base,
|
|
1297
1298
|
ease: kt.outSwift
|
|
1298
1299
|
}, Nt = {
|
|
@@ -1305,7 +1306,7 @@ var { duration: Ot, ease: kt, settleMs: At } = w, jt = At, Mt = {
|
|
|
1305
1306
|
]
|
|
1306
1307
|
};
|
|
1307
1308
|
Ot.fast, kt.outSwift;
|
|
1308
|
-
var Pt = { duration: 0 }, Ft = (e, t = !1) => e || t ? Pt : Mt, It = (e, t, n = !1) => e || n ? Pt : t ? Nt : Mt, Lt = ({ coversFrame: e, isFullscreen: t, isClosingFromFullscreen: n, isActivePanel: r, reservedWidth: i }) => e || (t || n) && r ? "100%" : i, Rt = "duration-base ease-out-swift motion-reduce:transition-none", zt =
|
|
1309
|
+
var Pt = { duration: 0 }, Ft = (e, t = !1) => e || t ? Pt : Mt, It = (e, t, n = !1) => e || n ? Pt : t ? Nt : Mt, Lt = ({ coversFrame: e, isFullscreen: t, isClosingFromFullscreen: n, isActivePanel: r, reservedWidth: i }) => e || (t || n) && r ? "100%" : i, Rt = "duration-base ease-out-swift motion-reduce:transition-none", zt = O("classic"), Bt = zt.Provider, Vt = () => j(zt), Ht = "M10.417 10L14.167 10M10.417 10L12.0837 8.33337M10.417 10L12.0837 11.6667", Ut = {
|
|
1309
1310
|
open: {
|
|
1310
1311
|
rest: {
|
|
1311
1312
|
arrow: "opacity-0 translate-x-0",
|
|
@@ -1329,7 +1330,7 @@ var Pt = { duration: 0 }, Ft = (e, t = !1) => e || t ? Pt : Mt, It = (e, t, n =
|
|
|
1329
1330
|
}, Wt = "[transform-box:view-box] transition-[transform,opacity]";
|
|
1330
1331
|
function Gt({ isExpanded: e, isHovered: t = !1 }) {
|
|
1331
1332
|
let n = Ut[e ? "open" : "closed"][t ? "hover" : "rest"];
|
|
1332
|
-
return /* @__PURE__ */
|
|
1333
|
+
return /* @__PURE__ */ L("svg", {
|
|
1333
1334
|
width: "20",
|
|
1334
1335
|
height: "20",
|
|
1335
1336
|
viewBox: "0 0 20 20",
|
|
@@ -1337,7 +1338,7 @@ function Gt({ isExpanded: e, isHovered: t = !1 }) {
|
|
|
1337
1338
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1338
1339
|
className: "text-f1-icon-bold",
|
|
1339
1340
|
children: [
|
|
1340
|
-
/* @__PURE__ */
|
|
1341
|
+
/* @__PURE__ */ I("rect", {
|
|
1341
1342
|
id: "container",
|
|
1342
1343
|
x: "3.33325",
|
|
1343
1344
|
y: "5",
|
|
@@ -1347,54 +1348,54 @@ function Gt({ isExpanded: e, isHovered: t = !1 }) {
|
|
|
1347
1348
|
strokeWidth: "1.3",
|
|
1348
1349
|
className: "stroke-current"
|
|
1349
1350
|
}),
|
|
1350
|
-
/* @__PURE__ */
|
|
1351
|
+
/* @__PURE__ */ I("path", {
|
|
1351
1352
|
id: "arrow",
|
|
1352
1353
|
d: Ht,
|
|
1353
1354
|
strokeWidth: "1.3",
|
|
1354
1355
|
strokeLinecap: "round",
|
|
1355
1356
|
strokeLinejoin: "round",
|
|
1356
|
-
className:
|
|
1357
|
+
className: a("stroke-current", Wt, Rt, "origin-[10.5835px_10px]", e ? "scale-x-100" : "-scale-x-100", n.arrow)
|
|
1357
1358
|
}),
|
|
1358
|
-
/* @__PURE__ */
|
|
1359
|
+
/* @__PURE__ */ I("path", {
|
|
1359
1360
|
id: "line",
|
|
1360
1361
|
d: "M7.5 5L7.5 15",
|
|
1361
1362
|
strokeWidth: "1.3",
|
|
1362
1363
|
strokeLinecap: "round",
|
|
1363
|
-
className:
|
|
1364
|
+
className: a("stroke-current", Wt, Rt, n.line)
|
|
1364
1365
|
})
|
|
1365
1366
|
]
|
|
1366
1367
|
});
|
|
1367
1368
|
}
|
|
1368
1369
|
function Kt() {
|
|
1369
|
-
let { prevSidebarState: e, sidebarState: t, toggleSidebar: n } = wt(),
|
|
1370
|
-
|
|
1371
|
-
s && e === "hidden" && t !== "hidden" &&
|
|
1370
|
+
let { prevSidebarState: e, sidebarState: t, toggleSidebar: n } = wt(), r = P(null), [a, o] = F(!1), s = Vt() === "two-level";
|
|
1371
|
+
M(function() {
|
|
1372
|
+
s && e === "hidden" && t !== "hidden" && r.current?.focus();
|
|
1372
1373
|
}, [
|
|
1373
1374
|
s,
|
|
1374
1375
|
e,
|
|
1375
1376
|
t
|
|
1376
1377
|
]);
|
|
1377
|
-
let
|
|
1378
|
-
return /* @__PURE__ */
|
|
1378
|
+
let l = i(), u = t !== "hidden", d = u ? l.navigation.sidebar.closePanel : l.navigation.sidebar.openPanel;
|
|
1379
|
+
return /* @__PURE__ */ I(c, {
|
|
1379
1380
|
variant: "ghost",
|
|
1380
1381
|
size: "md",
|
|
1381
1382
|
onClick: () => n(),
|
|
1382
1383
|
className: "hover:bg-f1-background-hover",
|
|
1383
|
-
title:
|
|
1384
|
-
ref:
|
|
1384
|
+
title: d,
|
|
1385
|
+
ref: r,
|
|
1385
1386
|
compact: !0,
|
|
1386
|
-
"aria-label":
|
|
1387
|
-
"aria-expanded":
|
|
1387
|
+
"aria-label": d,
|
|
1388
|
+
"aria-expanded": u,
|
|
1388
1389
|
onMouseEnter: () => o(!0),
|
|
1389
1390
|
onMouseLeave: () => o(!1),
|
|
1390
|
-
children: /* @__PURE__ */
|
|
1391
|
-
isExpanded:
|
|
1391
|
+
children: /* @__PURE__ */ I(Gt, {
|
|
1392
|
+
isExpanded: u,
|
|
1392
1393
|
isHovered: a
|
|
1393
1394
|
})
|
|
1394
1395
|
});
|
|
1395
1396
|
}
|
|
1396
1397
|
function qt({ isExpanded: e }) {
|
|
1397
|
-
return /* @__PURE__ */
|
|
1398
|
+
return /* @__PURE__ */ L("svg", {
|
|
1398
1399
|
width: "20",
|
|
1399
1400
|
height: "20",
|
|
1400
1401
|
viewBox: "0 0 20 20",
|
|
@@ -1402,7 +1403,7 @@ function qt({ isExpanded: e }) {
|
|
|
1402
1403
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1403
1404
|
className: "text-f1-icon-bold",
|
|
1404
1405
|
children: [
|
|
1405
|
-
/* @__PURE__ */
|
|
1406
|
+
/* @__PURE__ */ I("rect", {
|
|
1406
1407
|
id: "container",
|
|
1407
1408
|
x: "3.33325",
|
|
1408
1409
|
y: "5",
|
|
@@ -1412,44 +1413,44 @@ function qt({ isExpanded: e }) {
|
|
|
1412
1413
|
strokeWidth: "1.3",
|
|
1413
1414
|
className: "stroke-current"
|
|
1414
1415
|
}),
|
|
1415
|
-
/* @__PURE__ */
|
|
1416
|
+
/* @__PURE__ */ I("path", {
|
|
1416
1417
|
id: "arrow",
|
|
1417
1418
|
d: e ? "M10.417 10L14.167 10M10.417 10L12.0837 8.33337M10.417 10L12.0837 11.6667" : "M10.75 10L7 10M10.75 10L9.08333 8.33337M10.75 10L9.08333 11.6667",
|
|
1418
1419
|
strokeWidth: "1.3",
|
|
1419
1420
|
strokeLinecap: "round",
|
|
1420
1421
|
strokeLinejoin: "round",
|
|
1421
|
-
className:
|
|
1422
|
+
className: a("translate-x-0 stroke-current transition-all duration-200 ease-out motion-reduce:transition-none", e ? "opacity-0 group-hover:-translate-x-1 group-hover:opacity-100" : "opacity-1 group-hover:translate-x-[3px]")
|
|
1422
1423
|
}),
|
|
1423
|
-
/* @__PURE__ */
|
|
1424
|
+
/* @__PURE__ */ I("path", {
|
|
1424
1425
|
id: "line",
|
|
1425
1426
|
d: "M7.5 5L7.5 15",
|
|
1426
1427
|
strokeWidth: "1.3",
|
|
1427
1428
|
strokeLinecap: "round",
|
|
1428
|
-
className:
|
|
1429
|
+
className: a("stroke-current transition-all duration-200 ease-out motion-reduce:transition-none", e ? "translate-x-0 opacity-100 group-hover:-translate-x-0.5 group-hover:opacity-0" : "-translate-x-0.5 opacity-0 group-hover:translate-x-0 group-hover:opacity-100")
|
|
1429
1430
|
})
|
|
1430
1431
|
]
|
|
1431
1432
|
});
|
|
1432
1433
|
}
|
|
1433
1434
|
function Jt() {
|
|
1434
|
-
let { prevSidebarState: e, sidebarState: t, toggleSidebar: n, isSmallScreen:
|
|
1435
|
-
return
|
|
1436
|
-
e === "hidden" && t === "locked" &&
|
|
1437
|
-
}, [e, t]), /* @__PURE__ */
|
|
1435
|
+
let { prevSidebarState: e, sidebarState: t, toggleSidebar: n, isSmallScreen: r } = wt(), i = P(null);
|
|
1436
|
+
return M(() => {
|
|
1437
|
+
e === "hidden" && t === "locked" && i.current?.focus();
|
|
1438
|
+
}, [e, t]), /* @__PURE__ */ L(c, {
|
|
1438
1439
|
variant: "ghost",
|
|
1439
1440
|
size: "md",
|
|
1440
1441
|
onClick: () => n(),
|
|
1441
1442
|
className: "group hover:bg-f1-background-hover",
|
|
1442
1443
|
title: "Close Sidebar",
|
|
1443
|
-
ref:
|
|
1444
|
+
ref: i,
|
|
1444
1445
|
compact: !0,
|
|
1445
1446
|
"aria-label": "Close Sidebar",
|
|
1446
|
-
children: [/* @__PURE__ */
|
|
1447
|
-
className:
|
|
1448
|
-
children: /* @__PURE__ */
|
|
1449
|
-
}), /* @__PURE__ */
|
|
1450
|
-
className:
|
|
1451
|
-
children: /* @__PURE__ */
|
|
1452
|
-
icon:
|
|
1447
|
+
children: [/* @__PURE__ */ I("div", {
|
|
1448
|
+
className: a("hidden", { flex: !r }),
|
|
1449
|
+
children: /* @__PURE__ */ I(qt, { isExpanded: t === "locked" })
|
|
1450
|
+
}), /* @__PURE__ */ I("div", {
|
|
1451
|
+
className: a("hidden", { flex: r }),
|
|
1452
|
+
children: /* @__PURE__ */ I(y, {
|
|
1453
|
+
icon: m,
|
|
1453
1454
|
size: "md"
|
|
1454
1455
|
})
|
|
1455
1456
|
})]
|
|
@@ -1457,26 +1458,26 @@ function Jt() {
|
|
|
1457
1458
|
}
|
|
1458
1459
|
function Yt() {
|
|
1459
1460
|
let { hasPrimarySidebar: e } = wt();
|
|
1460
|
-
return
|
|
1461
|
+
return I(e ? Kt : Jt, {});
|
|
1461
1462
|
}
|
|
1462
1463
|
//#endregion
|
|
1463
1464
|
//#region src/addons/map/F0Map/components/F0MapSidebarToggle/F0MapSidebarToggle.tsx
|
|
1464
|
-
var Xt =
|
|
1465
|
-
let
|
|
1466
|
-
ref:
|
|
1465
|
+
var Xt = k(({ expanded: e, onToggle: t, label: n, bare: a = !1, dataTestId: o }, s) => {
|
|
1466
|
+
let l = i(), u = n ?? (e ? l.map.controls.hidePanel : l.map.controls.showPanel), d = /* @__PURE__ */ I(c, {
|
|
1467
|
+
ref: s,
|
|
1467
1468
|
variant: "ghost",
|
|
1468
1469
|
size: "md",
|
|
1469
1470
|
compact: !0,
|
|
1470
1471
|
className: "group",
|
|
1471
1472
|
onClick: t,
|
|
1472
|
-
title:
|
|
1473
|
-
"aria-label":
|
|
1473
|
+
title: u,
|
|
1474
|
+
"aria-label": u,
|
|
1474
1475
|
"aria-expanded": e,
|
|
1475
|
-
children: /* @__PURE__ */
|
|
1476
|
+
children: /* @__PURE__ */ I(qt, { isExpanded: e })
|
|
1476
1477
|
});
|
|
1477
|
-
return /* @__PURE__ */
|
|
1478
|
-
dataTestId:
|
|
1479
|
-
children:
|
|
1478
|
+
return /* @__PURE__ */ I(r, {
|
|
1479
|
+
dataTestId: o,
|
|
1480
|
+
children: a ? d : /* @__PURE__ */ I(Me, { children: d })
|
|
1480
1481
|
});
|
|
1481
1482
|
});
|
|
1482
1483
|
Xt.displayName = "F0MapSidebarToggle";
|
|
@@ -1489,7 +1490,7 @@ var Zt = (e, t, n = .3, r = 64) => {
|
|
|
1489
1490
|
f.push([c * i + l * u + p * o, c * a + l * d + p * s]);
|
|
1490
1491
|
}
|
|
1491
1492
|
return f;
|
|
1492
|
-
}, Qt = (e, t) => e.color ??
|
|
1493
|
+
}, Qt = (e, t) => e.color ?? H(e.variant ?? "radical", t), $t = (e, t) => e.color ?? H(e.variant ?? "radical", !t), en = ({ id: e, kind: t, coordinates: n, style: r, isDark: i }) => {
|
|
1493
1494
|
let a = r.width ?? 3;
|
|
1494
1495
|
return {
|
|
1495
1496
|
id: e,
|
|
@@ -1507,7 +1508,7 @@ var Zt = (e, t, n = .3, r = 64) => {
|
|
|
1507
1508
|
}
|
|
1508
1509
|
};
|
|
1509
1510
|
}, tn = ({ adapter: e, routes: t, arcs: n, isDark: r, onRouteClick: i, onArcClick: a }) => {
|
|
1510
|
-
let o =
|
|
1511
|
+
let o = N(() => [...t.map((e) => en({
|
|
1511
1512
|
id: e.id,
|
|
1512
1513
|
kind: "route",
|
|
1513
1514
|
coordinates: e.coordinates,
|
|
@@ -1523,7 +1524,7 @@ var Zt = (e, t, n = .3, r = 64) => {
|
|
|
1523
1524
|
t,
|
|
1524
1525
|
n,
|
|
1525
1526
|
r
|
|
1526
|
-
]), s =
|
|
1527
|
+
]), s = N(() => new Map([...t.map((e) => [e.id, "route"]), ...n.map((e) => [e.id, "arc"])]), [t, n]), c = P({
|
|
1527
1528
|
onRouteClick: i,
|
|
1528
1529
|
onArcClick: a,
|
|
1529
1530
|
kinds: s
|
|
@@ -1534,7 +1535,7 @@ var Zt = (e, t, n = .3, r = 64) => {
|
|
|
1534
1535
|
kinds: s
|
|
1535
1536
|
};
|
|
1536
1537
|
let l = !!(i || a);
|
|
1537
|
-
return
|
|
1538
|
+
return M(() => {
|
|
1538
1539
|
e.setLines(o, l ? { onClick: (e) => {
|
|
1539
1540
|
let { onRouteClick: t, onArcClick: n, kinds: r } = c.current;
|
|
1540
1541
|
r.get(e) === "arc" ? n?.(e) : t?.(e);
|
|
@@ -1543,25 +1544,25 @@ var Zt = (e, t, n = .3, r = 64) => {
|
|
|
1543
1544
|
e,
|
|
1544
1545
|
o,
|
|
1545
1546
|
l
|
|
1546
|
-
]),
|
|
1547
|
-
}, nn = ({ adapter: e, coords: t }) => (
|
|
1547
|
+
]), M(() => () => e.setLines([]), [e]), null;
|
|
1548
|
+
}, nn = ({ adapter: e, coords: t }) => (M(() => {
|
|
1548
1549
|
e.setCurrentLocation(t);
|
|
1549
|
-
}, [e, t]),
|
|
1550
|
+
}, [e, t]), M(() => () => e.setCurrentLocation(null), [e]), null);
|
|
1550
1551
|
nn.displayName = "CurrentLocationLayer";
|
|
1551
1552
|
//#endregion
|
|
1552
1553
|
//#region src/addons/map/F0Map/constants.ts
|
|
1553
1554
|
var rn = {
|
|
1554
1555
|
curve: 1.42,
|
|
1555
1556
|
duration: 1400
|
|
1556
|
-
}, an = 200, on = ({ dataTestId: e, className: t }) => /* @__PURE__ */
|
|
1557
|
+
}, an = 200, on = ({ dataTestId: e, className: t }) => /* @__PURE__ */ I(r, {
|
|
1557
1558
|
dataTestId: e,
|
|
1558
|
-
children: /* @__PURE__ */
|
|
1559
|
+
children: /* @__PURE__ */ I("div", {
|
|
1559
1560
|
"aria-busy": "true",
|
|
1560
1561
|
"aria-live": "polite",
|
|
1561
|
-
className:
|
|
1562
|
+
className: a("h-full w-full animate-pulse bg-f1-background-secondary", t)
|
|
1562
1563
|
})
|
|
1563
1564
|
}), sn = (e) => {
|
|
1564
|
-
let [t, n] =
|
|
1565
|
+
let [t, n] = F(null), r = A((t) => {
|
|
1565
1566
|
e && typeof navigator < "u" && navigator.geolocation && navigator.geolocation.getCurrentPosition((e) => {
|
|
1566
1567
|
let r = [e.coords.longitude, e.coords.latitude];
|
|
1567
1568
|
n(r), t?.(r);
|
|
@@ -1571,7 +1572,7 @@ var rn = {
|
|
|
1571
1572
|
maximumAge: 6e4
|
|
1572
1573
|
});
|
|
1573
1574
|
}, [e]);
|
|
1574
|
-
return
|
|
1575
|
+
return M(() => {
|
|
1575
1576
|
e && !t && typeof navigator < "u" && navigator.permissions?.query({ name: "geolocation" }).then((e) => {
|
|
1576
1577
|
e.state === "granted" && r();
|
|
1577
1578
|
}).catch(() => {});
|
|
@@ -1584,7 +1585,7 @@ var rn = {
|
|
|
1584
1585
|
request: r
|
|
1585
1586
|
};
|
|
1586
1587
|
}, cn = () => {
|
|
1587
|
-
let [e, t] =
|
|
1588
|
+
let [e, t] = F(!1), n = P(null), r = A((e) => {
|
|
1588
1589
|
if (n.current?.disconnect(), n.current = null, !e) return;
|
|
1589
1590
|
let r = () => t(e.closest(".dark") !== null);
|
|
1590
1591
|
r();
|
|
@@ -1595,12 +1596,12 @@ var rn = {
|
|
|
1595
1596
|
});
|
|
1596
1597
|
n.current = i;
|
|
1597
1598
|
}, []);
|
|
1598
|
-
return
|
|
1599
|
+
return M(() => () => n.current?.disconnect(), []), {
|
|
1599
1600
|
containerRef: r,
|
|
1600
1601
|
isDark: e
|
|
1601
1602
|
};
|
|
1602
1603
|
}, ln = {
|
|
1603
|
-
maplibre: async () => (await import("./maplibre-
|
|
1604
|
+
maplibre: async () => (await import("./maplibre-Ip4Qe9dM.js")).createMaplibreAdapter,
|
|
1604
1605
|
google: async (e) => (await import("./google-D1V0swd7.js")).loadGoogleAdapter(e)
|
|
1605
1606
|
}, un = /* @__PURE__ */ new Map(), dn = (e, t) => {
|
|
1606
1607
|
let n = un.get(e);
|
|
@@ -11729,7 +11730,7 @@ var rn = {
|
|
|
11729
11730
|
...e.map((e) => e.coordinates),
|
|
11730
11731
|
...t.flatMap((e) => e.coordinates),
|
|
11731
11732
|
...n.flatMap((e) => [e.from, e.to]),
|
|
11732
|
-
...r.flatMap((e) =>
|
|
11733
|
+
...r.flatMap((e) => he(e.center, e.radiusMeters))
|
|
11733
11734
|
], Tn = (e) => e.top === 0 && e.right === 0 && e.bottom === 0 && e.left === 0, En = ({ adapter: e, points: t, animate: n, routes: r = [], arcs: i = [], areas: a = [], gutter: o = 64, inset: s, size: c }) => {
|
|
11734
11735
|
let l = wn(t, r, i, a);
|
|
11735
11736
|
if (l.length === 0) return;
|
|
@@ -11743,9 +11744,9 @@ var rn = {
|
|
|
11743
11744
|
return;
|
|
11744
11745
|
}
|
|
11745
11746
|
let d = l.length === 1 ? {
|
|
11746
|
-
center:
|
|
11747
|
+
center: ue(e, l[0], s, 14),
|
|
11747
11748
|
zoom: 14
|
|
11748
|
-
} :
|
|
11749
|
+
} : de({
|
|
11749
11750
|
adapter: e,
|
|
11750
11751
|
coordinates: l,
|
|
11751
11752
|
inset: s,
|
|
@@ -11754,47 +11755,47 @@ var rn = {
|
|
|
11754
11755
|
maxZoom: u
|
|
11755
11756
|
});
|
|
11756
11757
|
d && (n ? e.easeTo(d, { animate: n }) : e.jumpTo(d, { animate: n }));
|
|
11757
|
-
}, Dn = (e) => `${e.top},${e.right},${e.bottom},${e.left}`, On =
|
|
11758
|
-
let
|
|
11759
|
-
|
|
11760
|
-
}, [
|
|
11761
|
-
|
|
11762
|
-
|
|
11758
|
+
}, Dn = (e) => `${e.top},${e.right},${e.bottom},${e.left}`, On = k(function({ markers: n = [], 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: ee = !0, controlLabels: te, showCurrentLocation: D = !1, fullScreen: O = !1, onSidebarToggle: k, sidebarExpanded: j = !1, sidebarToggleAddon: ie, sidebarHeaderStart: N, sidebar: oe, detail: fe, detailOpen: pe = !1, clearSelectionOnBackgroundClick: me = !0, projection: he = "mercator", provider: ge, loading: _e = !1, ariaLabel: ve, dataTestId: ye, className: be }, xe) {
|
|
11759
|
+
let Se = w ?? (O ? "greedy" : "cooperative"), R = i(), z = e(ge), Ce = t(), we = P(null), B = P(null), [V, Te] = F(null), [H, Ee] = F(!1), [Oe, U] = F(!1), [ke, Ae] = F(0), je = ne(), K = d(), { containerRef: Fe, isDark: Ie } = cn(), Le = A((e) => {
|
|
11760
|
+
we.current = e, Fe(e);
|
|
11761
|
+
}, [Fe]), Re = Ie, ze = !S || S.provider === z, Be = ze ? S ?? xn(z) : xn(z), q = Re ? Be.dark : Be.light, Ve = P(!1);
|
|
11762
|
+
M(() => {
|
|
11763
|
+
ze || Ve.current || (Ve.current = !0, console.warn(`F0Map: ignoring a "${S?.provider}" mapStyle on the "${z}" engine - the shapes are not interchangeable. Pass a "${z}" style, or none for its default look.`));
|
|
11763
11764
|
}, [
|
|
11764
|
-
|
|
11765
|
+
ze,
|
|
11765
11766
|
S?.provider,
|
|
11766
|
-
|
|
11767
|
+
z
|
|
11767
11768
|
]);
|
|
11768
|
-
let [
|
|
11769
|
-
|
|
11770
|
-
}, [
|
|
11769
|
+
let [He, Ue] = F(p), We = f === void 0 ? He : f, Ge = A((e) => {
|
|
11770
|
+
f === void 0 && Ue(e), m?.(e);
|
|
11771
|
+
}, [f, m]), J = j && !!k, Ke = pe && !!fe, qe = J ? W.inset + W.listWidth + W.gap : W.inset, Je = J ? W.inset : W.inset + W.toggleSize + W.gap, Ye = Ke ? qe + W.detailWidth : J ? W.inset + W.listWidth : null, Xe = se(v, { left: Ye === null ? 0 : Ye + W.gap }), Y = P(n);
|
|
11771
11772
|
Y.current = n;
|
|
11772
|
-
let Ze =
|
|
11773
|
-
Ze.current =
|
|
11774
|
-
let Qe =
|
|
11775
|
-
Qe.current =
|
|
11776
|
-
let $e =
|
|
11777
|
-
$e.current =
|
|
11778
|
-
let et =
|
|
11779
|
-
et.current =
|
|
11780
|
-
let X =
|
|
11773
|
+
let Ze = P(o);
|
|
11774
|
+
Ze.current = o;
|
|
11775
|
+
let Qe = P(s);
|
|
11776
|
+
Qe.current = s;
|
|
11777
|
+
let $e = P(c);
|
|
11778
|
+
$e.current = c;
|
|
11779
|
+
let et = P(he);
|
|
11780
|
+
et.current = he;
|
|
11781
|
+
let X = P(Ge);
|
|
11781
11782
|
X.current = Ge;
|
|
11782
|
-
let tt =
|
|
11783
|
-
tt.current =
|
|
11784
|
-
let nt =
|
|
11783
|
+
let tt = P(We);
|
|
11784
|
+
tt.current = We;
|
|
11785
|
+
let nt = P(Xe);
|
|
11785
11786
|
nt.current = Xe;
|
|
11786
|
-
let rt =
|
|
11787
|
-
rt.current =
|
|
11788
|
-
let Z =
|
|
11787
|
+
let rt = P(me);
|
|
11788
|
+
rt.current = me;
|
|
11789
|
+
let Z = P(null), it = b ?? x === void 0, Q = A(() => {
|
|
11789
11790
|
let e = {
|
|
11790
|
-
width:
|
|
11791
|
-
height:
|
|
11791
|
+
width: we.current?.clientWidth ?? 0,
|
|
11792
|
+
height: we.current?.clientHeight ?? 0
|
|
11792
11793
|
};
|
|
11793
11794
|
return {
|
|
11794
|
-
inset:
|
|
11795
|
+
inset: ce(nt.current, e),
|
|
11795
11796
|
size: e
|
|
11796
11797
|
};
|
|
11797
|
-
}, []), at =
|
|
11798
|
+
}, []), at = A((e, t) => {
|
|
11798
11799
|
Z.current = { kind: "fit" }, En({
|
|
11799
11800
|
adapter: e,
|
|
11800
11801
|
points: Y.current,
|
|
@@ -11804,9 +11805,9 @@ var rn = {
|
|
|
11804
11805
|
areas: $e.current,
|
|
11805
11806
|
...Q()
|
|
11806
11807
|
});
|
|
11807
|
-
}, [Q]), ot =
|
|
11808
|
+
}, [Q]), ot = P(at);
|
|
11808
11809
|
ot.current = at;
|
|
11809
|
-
let $ =
|
|
11810
|
+
let $ = A((e, t) => {
|
|
11810
11811
|
let n = Math.max(e.getZoom(), 15);
|
|
11811
11812
|
Z.current = {
|
|
11812
11813
|
kind: "flight",
|
|
@@ -11814,94 +11815,94 @@ var rn = {
|
|
|
11814
11815
|
};
|
|
11815
11816
|
let { inset: r } = Q();
|
|
11816
11817
|
e.easeTo({
|
|
11817
|
-
center:
|
|
11818
|
+
center: ue(e, t.coordinates, r, n),
|
|
11818
11819
|
zoom: n
|
|
11819
|
-
}, { animate: !
|
|
11820
|
-
}, [Q,
|
|
11821
|
-
let t =
|
|
11820
|
+
}, { animate: !K });
|
|
11821
|
+
}, [Q, K]), lt = A((e) => {
|
|
11822
|
+
let t = B.current, n = Y.current.find((t) => t.id === e);
|
|
11822
11823
|
if (Z.current = null, y && t && n) {
|
|
11823
11824
|
let { inset: e } = Q();
|
|
11824
|
-
t.easeTo({ center:
|
|
11825
|
+
t.easeTo({ center: ue(t, n.coordinates, e) }, { animate: !K });
|
|
11825
11826
|
}
|
|
11826
11827
|
X.current(e);
|
|
11827
11828
|
}, [
|
|
11828
11829
|
y,
|
|
11829
11830
|
Q,
|
|
11830
|
-
|
|
11831
|
-
]), ut =
|
|
11832
|
-
|
|
11831
|
+
K
|
|
11832
|
+
]), ut = P(!1);
|
|
11833
|
+
M(() => {
|
|
11833
11834
|
ut.current || n.length <= 200 || (ut.current = !0, console.warn(`F0Map: ${n.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.`));
|
|
11834
11835
|
}, [n.length]);
|
|
11835
|
-
let { coords: dt, request: ft } = sn(
|
|
11836
|
-
Z.current = null,
|
|
11837
|
-
}, []), mt =
|
|
11838
|
-
Z.current = null,
|
|
11839
|
-
}, []), ht =
|
|
11840
|
-
|
|
11841
|
-
}, [at,
|
|
11836
|
+
let { coords: dt, request: ft } = sn(D), pt = A(() => {
|
|
11837
|
+
Z.current = null, B.current?.zoomIn();
|
|
11838
|
+
}, []), mt = A(() => {
|
|
11839
|
+
Z.current = null, B.current?.zoomOut();
|
|
11840
|
+
}, []), ht = A(() => {
|
|
11841
|
+
B.current && at(B.current, !K);
|
|
11842
|
+
}, [at, K]), gt = A(() => {
|
|
11842
11843
|
ft((e) => {
|
|
11843
|
-
let t =
|
|
11844
|
+
let t = B.current;
|
|
11844
11845
|
if (!t) return;
|
|
11845
11846
|
Z.current = null;
|
|
11846
11847
|
let n = Math.max(t.getZoom(), 13), { inset: r } = Q();
|
|
11847
11848
|
t.flyTo({
|
|
11848
|
-
center:
|
|
11849
|
+
center: ue(t, e, r, n),
|
|
11849
11850
|
zoom: n
|
|
11850
|
-
}, { animate: !
|
|
11851
|
+
}, { animate: !K });
|
|
11851
11852
|
});
|
|
11852
11853
|
}, [
|
|
11853
11854
|
ft,
|
|
11854
11855
|
Q,
|
|
11855
|
-
|
|
11856
|
-
]), _t =
|
|
11857
|
-
let t =
|
|
11856
|
+
K
|
|
11857
|
+
]), _t = A((e) => {
|
|
11858
|
+
let t = B.current;
|
|
11858
11859
|
if (!t) return;
|
|
11859
11860
|
Z.current = null;
|
|
11860
|
-
let n =
|
|
11861
|
+
let n = de({
|
|
11861
11862
|
adapter: t,
|
|
11862
11863
|
coordinates: e,
|
|
11863
11864
|
...Q(),
|
|
11864
11865
|
gutter: 64,
|
|
11865
11866
|
maxZoom: 16
|
|
11866
11867
|
});
|
|
11867
|
-
n && (
|
|
11868
|
-
}, [Q,
|
|
11869
|
-
let t =
|
|
11868
|
+
n && (K ? t.jumpTo(n, { animate: !1 }) : t.flyTo(n));
|
|
11869
|
+
}, [Q, K]), vt = A((e) => {
|
|
11870
|
+
let t = B.current, n = Y.current.find((t) => t.id === e);
|
|
11870
11871
|
t && n && $(t, n), Ge(e);
|
|
11871
11872
|
}, [$, Ge]);
|
|
11872
|
-
|
|
11873
|
-
if (!Ke ||
|
|
11873
|
+
M(() => {
|
|
11874
|
+
if (!Ke || We === null) return;
|
|
11874
11875
|
let e = (e) => {
|
|
11875
11876
|
e.key !== "Escape" || e.defaultPrevented || (e.preventDefault(), X.current(null));
|
|
11876
|
-
}, t =
|
|
11877
|
+
}, t = we.current?.ownerDocument ?? document;
|
|
11877
11878
|
return t.addEventListener("keydown", e), () => t.removeEventListener("keydown", e);
|
|
11878
|
-
}, [Ke,
|
|
11879
|
-
getNativeMap: () =>
|
|
11879
|
+
}, [Ke, We]), re(xe, () => ({
|
|
11880
|
+
getNativeMap: () => B.current?.native() ?? null,
|
|
11880
11881
|
focusMarker: (e) => {
|
|
11881
|
-
let t =
|
|
11882
|
+
let t = B.current, n = Y.current.find((t) => t.id === e);
|
|
11882
11883
|
t && n && ($(t, n), X.current(e));
|
|
11883
11884
|
},
|
|
11884
11885
|
fitToMarkers: () => {
|
|
11885
|
-
|
|
11886
|
+
B.current && at(B.current, !K);
|
|
11886
11887
|
},
|
|
11887
11888
|
clearSelection: () => X.current(null)
|
|
11888
11889
|
}), [
|
|
11889
11890
|
at,
|
|
11890
11891
|
$,
|
|
11891
|
-
|
|
11892
|
+
K
|
|
11892
11893
|
]);
|
|
11893
|
-
let yt =
|
|
11894
|
-
yt.current =
|
|
11895
|
-
let bt =
|
|
11896
|
-
bt.current =
|
|
11897
|
-
let xt =
|
|
11898
|
-
|
|
11899
|
-
if (
|
|
11900
|
-
let e =
|
|
11894
|
+
let yt = P(q);
|
|
11895
|
+
yt.current = q;
|
|
11896
|
+
let bt = P(Ce);
|
|
11897
|
+
bt.current = Ce;
|
|
11898
|
+
let xt = P(null), St = P(x ?? Cn);
|
|
11899
|
+
M(() => {
|
|
11900
|
+
if (_e) return;
|
|
11901
|
+
let e = we.current;
|
|
11901
11902
|
if (!e) return;
|
|
11902
11903
|
xt.current = yt.current;
|
|
11903
11904
|
let t = St.current, n = null, r = !1, i = [];
|
|
11904
|
-
return dn(
|
|
11905
|
+
return dn(z, bt.current).then((i) => {
|
|
11905
11906
|
if (!r) {
|
|
11906
11907
|
try {
|
|
11907
11908
|
n = i({
|
|
@@ -11909,27 +11910,27 @@ var rn = {
|
|
|
11909
11910
|
style: yt.current,
|
|
11910
11911
|
center: t.center,
|
|
11911
11912
|
zoom: t.zoom ?? Cn.zoom,
|
|
11912
|
-
minZoom:
|
|
11913
|
-
maxZoom:
|
|
11914
|
-
interactive:
|
|
11915
|
-
cooperativeGestures:
|
|
11913
|
+
minZoom: T,
|
|
11914
|
+
maxZoom: E,
|
|
11915
|
+
interactive: C,
|
|
11916
|
+
cooperativeGestures: Se === "cooperative"
|
|
11916
11917
|
});
|
|
11917
11918
|
} catch {
|
|
11918
|
-
|
|
11919
|
+
Ee(!0);
|
|
11919
11920
|
return;
|
|
11920
11921
|
}
|
|
11921
11922
|
a(n);
|
|
11922
11923
|
}
|
|
11923
11924
|
}).catch((e) => {
|
|
11924
|
-
console.error("[F0Map] could not load the map engine", e), r ||
|
|
11925
|
+
console.error("[F0Map] could not load the map engine", e), r || U(!0);
|
|
11925
11926
|
}), () => {
|
|
11926
|
-
r = !0, i.forEach((e) => e()), n && (
|
|
11927
|
+
r = !0, i.forEach((e) => e()), n && (B.current = null, Te(null), n.destroy());
|
|
11927
11928
|
};
|
|
11928
11929
|
function a(e) {
|
|
11929
|
-
|
|
11930
|
+
B.current = e, Te(e), Ee(!1);
|
|
11930
11931
|
let t = !1;
|
|
11931
11932
|
i.push(Sn(e, "ready", () => {
|
|
11932
|
-
t = !0,
|
|
11933
|
+
t = !0, U(!1), e.resize(), it && En({
|
|
11933
11934
|
adapter: e,
|
|
11934
11935
|
points: Y.current,
|
|
11935
11936
|
animate: !1,
|
|
@@ -11939,43 +11940,43 @@ var rn = {
|
|
|
11939
11940
|
...Q()
|
|
11940
11941
|
}), e.setGlobeProjection(et.current === "globe");
|
|
11941
11942
|
}), e.on("error", () => {
|
|
11942
|
-
t ||
|
|
11943
|
+
t || U(!0);
|
|
11943
11944
|
}), e.on("click", () => {
|
|
11944
11945
|
rt.current && X.current(null);
|
|
11945
11946
|
}));
|
|
11946
11947
|
}
|
|
11947
11948
|
}, [
|
|
11948
|
-
|
|
11949
|
-
|
|
11950
|
-
|
|
11951
|
-
w,
|
|
11949
|
+
_e,
|
|
11950
|
+
C,
|
|
11951
|
+
Se,
|
|
11952
11952
|
T,
|
|
11953
|
+
E,
|
|
11953
11954
|
it,
|
|
11954
|
-
|
|
11955
|
-
|
|
11956
|
-
]),
|
|
11957
|
-
let e =
|
|
11958
|
-
e && xt.current !==
|
|
11959
|
-
}, [
|
|
11960
|
-
|
|
11961
|
-
}, [
|
|
11962
|
-
let Ct =
|
|
11963
|
-
Ct.current = $,
|
|
11955
|
+
z,
|
|
11956
|
+
ke
|
|
11957
|
+
]), M(() => {
|
|
11958
|
+
let e = B.current;
|
|
11959
|
+
e && xt.current !== q && (xt.current = q, e.applyStyle(q), Sn(e, "styled", () => e.setGlobeProjection(et.current === "globe")));
|
|
11960
|
+
}, [q]), M(() => {
|
|
11961
|
+
B.current?.setGlobeProjection(he === "globe");
|
|
11962
|
+
}, [he]);
|
|
11963
|
+
let Ct = P($);
|
|
11964
|
+
Ct.current = $, M(() => {
|
|
11964
11965
|
if (!_) return;
|
|
11965
|
-
let e =
|
|
11966
|
+
let e = B.current, t = Y.current.find((e) => e.id === _);
|
|
11966
11967
|
e && t && Ct.current(e, t);
|
|
11967
11968
|
}, [_]);
|
|
11968
|
-
let wt = Dn(Xe), Tt =
|
|
11969
|
-
|
|
11969
|
+
let wt = Dn(Xe), Tt = P(null);
|
|
11970
|
+
M(() => {
|
|
11970
11971
|
let e = Tt.current;
|
|
11971
11972
|
Tt.current = nt.current;
|
|
11972
|
-
let t =
|
|
11973
|
+
let t = B.current;
|
|
11973
11974
|
if (!e || !t) return;
|
|
11974
|
-
let { inset: n, size: r } = Q(), i = Z.current, a = !
|
|
11975
|
+
let { inset: n, size: r } = Q(), i = Z.current, a = !K, o = Y.current.find((e) => e.id === tt.current);
|
|
11975
11976
|
if (o) {
|
|
11976
11977
|
let e = i?.kind === "flight" ? i.zoom : void 0;
|
|
11977
11978
|
t.easeTo({
|
|
11978
|
-
center:
|
|
11979
|
+
center: ue(t, o.coordinates, n, e),
|
|
11979
11980
|
zoom: e
|
|
11980
11981
|
}, { animate: a });
|
|
11981
11982
|
return;
|
|
@@ -11984,13 +11985,13 @@ var rn = {
|
|
|
11984
11985
|
ot.current(t, a);
|
|
11985
11986
|
return;
|
|
11986
11987
|
}
|
|
11987
|
-
let s =
|
|
11988
|
+
let s = le(ce(e, r)), c = le(n), l = t.project(t.getCenter()), u = l && t.unproject({
|
|
11988
11989
|
x: l.x + s.x - c.x,
|
|
11989
11990
|
y: l.y + s.y - c.y
|
|
11990
11991
|
});
|
|
11991
11992
|
u && t.easeTo({ center: u }, { animate: a });
|
|
11992
11993
|
}, [wt, Q]);
|
|
11993
|
-
let Et =
|
|
11994
|
+
let Et = o.length > 0 || s.length > 0, Dt = Ye === null ? 0 : Ye + W.gap - W.inset, Ot = P({
|
|
11994
11995
|
from: Dt,
|
|
11995
11996
|
to: Dt
|
|
11996
11997
|
});
|
|
@@ -11998,133 +11999,133 @@ var rn = {
|
|
|
11998
11999
|
from: Ot.current.to,
|
|
11999
12000
|
to: Dt
|
|
12000
12001
|
});
|
|
12001
|
-
let kt = Dt > Ot.current.from ?
|
|
12002
|
-
return /* @__PURE__ */
|
|
12003
|
-
dataTestId:
|
|
12004
|
-
children:
|
|
12005
|
-
ref:
|
|
12002
|
+
let kt = Dt > Ot.current.from ? G.enter : G.exit, At = J ? G.enter : G.exit;
|
|
12003
|
+
return /* @__PURE__ */ I(r, {
|
|
12004
|
+
dataTestId: ye,
|
|
12005
|
+
children: _e ? /* @__PURE__ */ I(on, { className: be }) : /* @__PURE__ */ L("div", {
|
|
12006
|
+
ref: Le,
|
|
12006
12007
|
role: "region",
|
|
12007
|
-
"aria-label":
|
|
12008
|
-
className:
|
|
12008
|
+
"aria-label": ve ?? R.map.region,
|
|
12009
|
+
className: a("f0-map relative h-full w-full overflow-hidden", Re && "dark", !O && "rounded-2xl border border-solid border-f1-border-secondary", be),
|
|
12009
12010
|
children: [
|
|
12010
|
-
/* @__PURE__ */
|
|
12011
|
-
href: `#${
|
|
12011
|
+
/* @__PURE__ */ I("a", {
|
|
12012
|
+
href: `#${je}`,
|
|
12012
12013
|
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",
|
|
12013
|
-
children:
|
|
12014
|
+
children: R.map.skipToList
|
|
12014
12015
|
}),
|
|
12015
|
-
/* @__PURE__ */
|
|
12016
|
+
/* @__PURE__ */ I("div", {
|
|
12016
12017
|
role: "status",
|
|
12017
12018
|
"aria-live": "polite",
|
|
12018
12019
|
className: "sr-only",
|
|
12019
|
-
children: `${n.length} ${n.length === 1 ?
|
|
12020
|
+
children: `${n.length} ${n.length === 1 ? R.map.location : R.map.locations}`
|
|
12020
12021
|
}),
|
|
12021
|
-
!
|
|
12022
|
-
adapter:
|
|
12023
|
-
areas:
|
|
12024
|
-
isDark:
|
|
12022
|
+
!H && V && c.length > 0 ? /* @__PURE__ */ I(De, {
|
|
12023
|
+
adapter: V,
|
|
12024
|
+
areas: c,
|
|
12025
|
+
isDark: Re
|
|
12025
12026
|
}) : null,
|
|
12026
|
-
!
|
|
12027
|
-
adapter:
|
|
12027
|
+
!H && V && dt ? /* @__PURE__ */ L(ae, { children: [/* @__PURE__ */ I(nn, {
|
|
12028
|
+
adapter: V,
|
|
12028
12029
|
coords: dt
|
|
12029
|
-
}), /* @__PURE__ */
|
|
12030
|
+
}), /* @__PURE__ */ I("span", {
|
|
12030
12031
|
className: "sr-only",
|
|
12031
|
-
children:
|
|
12032
|
+
children: R.map.currentLocation
|
|
12032
12033
|
})] }) : null,
|
|
12033
|
-
!
|
|
12034
|
-
adapter:
|
|
12035
|
-
routes:
|
|
12036
|
-
arcs:
|
|
12037
|
-
isDark:
|
|
12038
|
-
onRouteClick:
|
|
12039
|
-
onArcClick:
|
|
12034
|
+
!H && V && Et ? /* @__PURE__ */ I(tn, {
|
|
12035
|
+
adapter: V,
|
|
12036
|
+
routes: o,
|
|
12037
|
+
arcs: s,
|
|
12038
|
+
isDark: Re,
|
|
12039
|
+
onRouteClick: l,
|
|
12040
|
+
onArcClick: u
|
|
12040
12041
|
}) : null,
|
|
12041
|
-
!
|
|
12042
|
-
adapter:
|
|
12042
|
+
!H && V && n.length > 0 ? /* @__PURE__ */ I(st, {
|
|
12043
|
+
adapter: V,
|
|
12043
12044
|
points: n,
|
|
12044
|
-
selectedId:
|
|
12045
|
+
selectedId: We,
|
|
12045
12046
|
highlightedId: _,
|
|
12046
12047
|
onSelect: lt,
|
|
12047
12048
|
onMarkerDrag: h,
|
|
12048
12049
|
onMarkerDragEnd: g,
|
|
12049
12050
|
onClusterExpand: _t
|
|
12050
12051
|
}) : null,
|
|
12051
|
-
!
|
|
12052
|
+
!H && V && fe ? /* @__PURE__ */ I(ct, {
|
|
12052
12053
|
open: Ke,
|
|
12053
12054
|
offsetX: qe,
|
|
12054
12055
|
offsetY: Je,
|
|
12055
|
-
width:
|
|
12056
|
+
width: W.detailWidth,
|
|
12056
12057
|
entrance: "grow",
|
|
12057
|
-
ariaLabel:
|
|
12058
|
-
children:
|
|
12058
|
+
ariaLabel: R.map.detailPanel,
|
|
12059
|
+
children: fe
|
|
12059
12060
|
}) : null,
|
|
12060
|
-
!
|
|
12061
|
-
className:
|
|
12061
|
+
!H && V && k ? /* @__PURE__ */ I("div", {
|
|
12062
|
+
className: a("absolute left-2 top-2 z-10", J && "opacity-0"),
|
|
12062
12063
|
style: {
|
|
12063
|
-
transitionProperty:
|
|
12064
|
+
transitionProperty: K ? "none" : "opacity",
|
|
12064
12065
|
transitionDuration: At.duration,
|
|
12065
12066
|
transitionTimingFunction: At.easing
|
|
12066
12067
|
},
|
|
12067
|
-
children: /* @__PURE__ */
|
|
12068
|
+
children: /* @__PURE__ */ L("div", {
|
|
12068
12069
|
className: "flex items-start gap-2",
|
|
12069
12070
|
"aria-hidden": J || void 0,
|
|
12070
12071
|
ref: (e) => {
|
|
12071
12072
|
J ? e?.setAttribute("inert", "") : e?.removeAttribute("inert");
|
|
12072
12073
|
},
|
|
12073
|
-
children: [/* @__PURE__ */
|
|
12074
|
+
children: [/* @__PURE__ */ I(Xt, {
|
|
12074
12075
|
expanded: !1,
|
|
12075
|
-
onToggle:
|
|
12076
|
-
}),
|
|
12076
|
+
onToggle: k
|
|
12077
|
+
}), ie ? /* @__PURE__ */ I(Me, { children: ie }) : null]
|
|
12077
12078
|
})
|
|
12078
12079
|
}) : null,
|
|
12079
|
-
!
|
|
12080
|
+
!H && V && k ? /* @__PURE__ */ I(ct, {
|
|
12080
12081
|
open: J,
|
|
12081
|
-
offsetX:
|
|
12082
|
-
width:
|
|
12083
|
-
headerStart:
|
|
12084
|
-
headerEnd: /* @__PURE__ */
|
|
12082
|
+
offsetX: W.inset,
|
|
12083
|
+
width: W.listWidth,
|
|
12084
|
+
headerStart: N,
|
|
12085
|
+
headerEnd: /* @__PURE__ */ I(Xt, {
|
|
12085
12086
|
expanded: !0,
|
|
12086
|
-
onToggle:
|
|
12087
|
+
onToggle: k,
|
|
12087
12088
|
bare: !0,
|
|
12088
12089
|
dataTestId: "map-panel-toggle-open"
|
|
12089
12090
|
}),
|
|
12090
|
-
children:
|
|
12091
|
+
children: oe
|
|
12091
12092
|
}) : null,
|
|
12092
|
-
!
|
|
12093
|
-
className:
|
|
12093
|
+
!H && V && ee && C ? /* @__PURE__ */ I("div", {
|
|
12094
|
+
className: a("absolute left-2 z-10", z === "google" ? "bottom-8" : "bottom-2"),
|
|
12094
12095
|
style: {
|
|
12095
12096
|
transform: `translateX(${Dt}px)`,
|
|
12096
|
-
transitionProperty:
|
|
12097
|
+
transitionProperty: K ? "none" : "transform",
|
|
12097
12098
|
transitionDuration: kt.duration,
|
|
12098
12099
|
transitionTimingFunction: kt.easing
|
|
12099
12100
|
},
|
|
12100
|
-
children: /* @__PURE__ */
|
|
12101
|
+
children: /* @__PURE__ */ I(Ne, {
|
|
12101
12102
|
onZoomIn: pt,
|
|
12102
12103
|
onZoomOut: mt,
|
|
12103
|
-
onFit: n.length > 0 || Et ||
|
|
12104
|
+
onFit: n.length > 0 || Et || c.length > 0 ? ht : void 0,
|
|
12104
12105
|
onLocate: gt,
|
|
12105
|
-
labels:
|
|
12106
|
+
labels: te
|
|
12106
12107
|
})
|
|
12107
12108
|
}) : null,
|
|
12108
|
-
|
|
12109
|
+
Oe && !H ? /* @__PURE__ */ L("div", {
|
|
12109
12110
|
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",
|
|
12110
|
-
children: [/* @__PURE__ */
|
|
12111
|
+
children: [/* @__PURE__ */ I("span", { children: R.map.loadError }), /* @__PURE__ */ I("button", {
|
|
12111
12112
|
type: "button",
|
|
12112
12113
|
onClick: () => {
|
|
12113
|
-
|
|
12114
|
-
let e =
|
|
12115
|
-
e ? e.applyStyle(yt.current) :
|
|
12114
|
+
U(!1);
|
|
12115
|
+
let e = B.current;
|
|
12116
|
+
e ? e.applyStyle(yt.current) : Ae((e) => e + 1);
|
|
12116
12117
|
},
|
|
12117
12118
|
className: "font-medium underline",
|
|
12118
|
-
children:
|
|
12119
|
+
children: R.map.retry
|
|
12119
12120
|
})]
|
|
12120
12121
|
}) : null,
|
|
12121
|
-
/* @__PURE__ */
|
|
12122
|
-
id:
|
|
12123
|
-
label:
|
|
12122
|
+
/* @__PURE__ */ I(Pe, {
|
|
12123
|
+
id: je,
|
|
12124
|
+
label: R.map.listLabel,
|
|
12124
12125
|
points: n,
|
|
12125
|
-
selectedId:
|
|
12126
|
+
selectedId: We,
|
|
12126
12127
|
onSelect: vt,
|
|
12127
|
-
visible:
|
|
12128
|
+
visible: H
|
|
12128
12129
|
})
|
|
12129
12130
|
]
|
|
12130
12131
|
})
|
|
@@ -12133,4 +12134,4 @@ var rn = {
|
|
|
12133
12134
|
On.displayName = "F0Map";
|
|
12134
12135
|
var kn = On;
|
|
12135
12136
|
//#endregion
|
|
12136
|
-
export {
|
|
12137
|
+
export { Ne as A, Ct as C, ct as D, ht as E, Ke as O, Dt as S, vt as T, Rt as _, bn as a, It as b, an as c, qt as d, Bt as f, jt as g, Pt as h, _n as i, Pe as k, Xt as l, Mt as m, xn as n, on as o, Vt as p, gn as r, rn as s, kn as t, Yt as u, Nt as v, wt as w, Lt as x, Ft as y };
|