@eyeon/map 2.0.4 → 2.0.6
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/chunks/MapViewer.js +357 -355
- package/dist/chunks/MapViewer.js.map +1 -1
- package/dist/chunks/stacking.js +83 -93
- package/dist/chunks/stacking.js.map +1 -1
- package/dist/chunks/wheelZoom.js +5 -5
- package/dist/chunks/wheelZoom.js.map +1 -1
- package/dist/core/assignment.d.ts +20 -8
- package/dist/core/assignment.d.ts.map +1 -1
- package/dist/core/import/index.d.ts.map +1 -1
- package/dist/core/layerStyles.d.ts +3 -4
- package/dist/core/layerStyles.d.ts.map +1 -1
- package/dist/core/outdoorDecoration.d.ts +2 -1
- package/dist/core/outdoorDecoration.d.ts.map +1 -1
- package/dist/core/publish/index.d.ts +3 -1
- package/dist/core/publish/index.d.ts.map +1 -1
- package/dist/core/types.d.ts +3 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/editor/canvas/EditorCanvas.d.ts.map +1 -1
- package/dist/editor/canvas/OutdoorSvgUnderlay.d.ts +2 -1
- package/dist/editor/canvas/OutdoorSvgUnderlay.d.ts.map +1 -1
- package/dist/editor/index.js +380 -370
- package/dist/editor/index.js.map +1 -1
- package/dist/editor/panels/AssignForm.d.ts.map +1 -1
- package/dist/editor/railListCopy.d.ts.map +1 -1
- package/dist/viewer/ui/MapControls.d.ts.map +1 -1
- package/package.json +2 -1
package/dist/editor/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as k, jsx as l, Fragment as Je } from "react/jsx-runtime";
|
|
2
|
-
import Qi, { useState as K, useMemo as me, useEffect as ae, useRef as ie, useImperativeHandle as
|
|
3
|
-
import { a4 as
|
|
4
|
-
import { c as Vl, d as Ul, e as Hl, f as Xl, g as zn, h as
|
|
2
|
+
import Qi, { useState as K, useMemo as me, useEffect as ae, useRef as ie, useImperativeHandle as ul, useLayoutEffect as pl, useCallback as fn, useId as hl, Suspense as fl } from "react";
|
|
3
|
+
import { a4 as ml, ae as wr, b1 as dt, t as es, a6 as gn, bi as yl, P as ns, d as Nt, af as wn, ao as Ao, E as gl, V as xo, W as kl, b7 as _l, g as Oo, b4 as vl, bk as Il, bh as bl, a as xt, aN as Cr, aD as xl, aE as wl, ag as Cl, aM as Nl, aT as Jn, J as Sl, aA as Mn, L as Ll, T as St, Z as El, v as cr, a7 as $t, x as ts, _ as os, b9 as rs, c as Al, X as Ol, bg as Tl, n as Rl, aC as Ml, b as wo, Q as Pl, D as li, $ as Dl, aI as $l, aL as Fl, bo as zl, M as Bl, ah as Wl, p as Kl, H as Wo } from "../chunks/stacking.js";
|
|
4
|
+
import { c as Vl, d as Ul, e as Hl, f as Xl, g as zn, h as is, i as jl, j as Yl, k as Gl, l as Zl, b as Jl, M as ql } from "../chunks/MapViewer.js";
|
|
5
5
|
import { n as Ql, o as ec, r as nc } from "../chunks/wheelZoom.js";
|
|
6
6
|
import { createPortal as Nr } from "react-dom";
|
|
7
7
|
function bo(e) {
|
|
@@ -11,26 +11,26 @@ function tc(e, n) {
|
|
|
11
11
|
return e === "PORTAL" && !bo(n) ? "viewer" : "editor";
|
|
12
12
|
}
|
|
13
13
|
function oc(e) {
|
|
14
|
-
return
|
|
14
|
+
return wr(e);
|
|
15
15
|
}
|
|
16
16
|
function rc(e) {
|
|
17
17
|
const n = e.filter((t) => t.kind === "outdoor");
|
|
18
|
-
return [...
|
|
18
|
+
return [...wr(e), ...n];
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function ss(e) {
|
|
21
21
|
var n;
|
|
22
|
-
return ((n =
|
|
22
|
+
return ((n = wr(e).at(-1)) == null ? void 0 : n.id) ?? null;
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function Ko(e) {
|
|
25
25
|
var n;
|
|
26
|
-
return
|
|
26
|
+
return ss(e) ?? ((n = e.find((t) => t.kind === "outdoor")) == null ? void 0 : n.id) ?? null;
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function Vo(e) {
|
|
29
29
|
var n;
|
|
30
|
-
return
|
|
30
|
+
return ss(e) ?? ((n = e.find((t) => t.kind === "outdoor")) == null ? void 0 : n.id) ?? null;
|
|
31
31
|
}
|
|
32
|
-
function
|
|
33
|
-
return
|
|
32
|
+
function Uo(e) {
|
|
33
|
+
return ml(e);
|
|
34
34
|
}
|
|
35
35
|
function ci(e, n) {
|
|
36
36
|
return (e === "wayfinding" ? oc(n) : rc(n)).map((o) => ({
|
|
@@ -80,7 +80,7 @@ function lc(e, n) {
|
|
|
80
80
|
restored: Ft(t)
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function ar(e) {
|
|
84
84
|
if (e == null || typeof e != "object") return !1;
|
|
85
85
|
const n = e, t = n.tagName;
|
|
86
86
|
return t === "INPUT" || t === "TEXTAREA" || t === "SELECT" ? !0 : !!n.isContentEditable;
|
|
@@ -93,7 +93,7 @@ function ac(e) {
|
|
|
93
93
|
const n = e.key.toLowerCase();
|
|
94
94
|
return n === "z" && e.shiftKey ? !0 : n === "y" && !e.shiftKey;
|
|
95
95
|
}
|
|
96
|
-
const
|
|
96
|
+
const Ho = [
|
|
97
97
|
{ id: "select", label: "Select", group: "map" },
|
|
98
98
|
{ id: "pan", label: "Pan", group: "map" },
|
|
99
99
|
{ id: "draw-unit", label: "Draw rectangle", draw: !0, group: "map" },
|
|
@@ -462,7 +462,7 @@ const Sc = {
|
|
|
462
462
|
"create-route": xc,
|
|
463
463
|
"create-route-multi": wc
|
|
464
464
|
};
|
|
465
|
-
function
|
|
465
|
+
function Xo(e) {
|
|
466
466
|
return e === "select" || e === "curve" || e === "split-join";
|
|
467
467
|
}
|
|
468
468
|
function kt(e) {
|
|
@@ -474,10 +474,10 @@ function Pt(e) {
|
|
|
474
474
|
function Dt(e) {
|
|
475
475
|
return e === "draw-circle" || e === "draw-void-circle";
|
|
476
476
|
}
|
|
477
|
-
function
|
|
477
|
+
function dr(e) {
|
|
478
478
|
return e === "draw-unit" || e === "draw-polygon" || e === "draw-circle" || e === "draw-void" || e === "draw-void-circle";
|
|
479
479
|
}
|
|
480
|
-
function
|
|
480
|
+
function ur(e) {
|
|
481
481
|
return e === "draw-text" || e === "draw-entrance";
|
|
482
482
|
}
|
|
483
483
|
function _t(e) {
|
|
@@ -546,9 +546,9 @@ function Ec({
|
|
|
546
546
|
canEdit: t,
|
|
547
547
|
group: o
|
|
548
548
|
}) {
|
|
549
|
-
const i =
|
|
549
|
+
const i = Ho.filter((p) => p.group !== "route"), r = Ho.filter(
|
|
550
550
|
(p) => p.group === "route" && p.id !== "draw-route"
|
|
551
|
-
), s = o !== "route", c = o !== "map", d =
|
|
551
|
+
), s = o !== "route", c = o !== "map", d = Ho.find((p) => p.id === "select"), u = o === "route" && d ? [d, ...r] : r, h = (p) => {
|
|
552
552
|
const y = Sc[p.id];
|
|
553
553
|
return /* @__PURE__ */ k(
|
|
554
554
|
"button",
|
|
@@ -621,10 +621,10 @@ function le(e) {
|
|
|
621
621
|
function mn(e, n) {
|
|
622
622
|
return { x: e.x + n.x, y: e.y + n.y };
|
|
623
623
|
}
|
|
624
|
-
function
|
|
624
|
+
function pr(e, n) {
|
|
625
625
|
return { x: e.x - n.x, y: e.y - n.y };
|
|
626
626
|
}
|
|
627
|
-
function
|
|
627
|
+
function jo(e, n) {
|
|
628
628
|
return { x: e.x * n, y: e.y * n };
|
|
629
629
|
}
|
|
630
630
|
function Zn(e, n, t) {
|
|
@@ -659,11 +659,11 @@ function pi(e, n, t) {
|
|
|
659
659
|
c2: Zn(t, n, 2 / 3)
|
|
660
660
|
};
|
|
661
661
|
}
|
|
662
|
-
function
|
|
663
|
-
const o = Zn(e, n, 0.5), i =
|
|
662
|
+
function ls(e, n, t) {
|
|
663
|
+
const o = Zn(e, n, 0.5), i = jo(pr(t, o), 4 / 3), r = pr(n, e);
|
|
664
664
|
return {
|
|
665
|
-
c1: mn(mn(e,
|
|
666
|
-
c2: mn(mn(e,
|
|
665
|
+
c1: mn(mn(e, jo(r, 1 / 3)), i),
|
|
666
|
+
c2: mn(mn(e, jo(r, 2 / 3)), i)
|
|
667
667
|
};
|
|
668
668
|
}
|
|
669
669
|
function Tc(e, n, t, o, i) {
|
|
@@ -673,7 +673,7 @@ function Tc(e, n, t, o, i) {
|
|
|
673
673
|
y: r * r * r * e.y + 3 * r * r * i * n.y + 3 * r * i * i * t.y + i * i * i * o.y
|
|
674
674
|
};
|
|
675
675
|
}
|
|
676
|
-
function
|
|
676
|
+
function hr(e, n, t, o, i) {
|
|
677
677
|
const r = Zn(e, n, i), s = Zn(n, t, i), c = Zn(t, o, i), d = Zn(r, s, i), u = Zn(s, c, i), h = Zn(d, u, i);
|
|
678
678
|
return {
|
|
679
679
|
left: { c1: r, c2: d, to: h },
|
|
@@ -718,7 +718,7 @@ function Rc(e, n, t, o, i, r, s) {
|
|
|
718
718
|
return Ye.length > 0 && (Ye[Ye.length - 1].to = le(s)), Ye;
|
|
719
719
|
}
|
|
720
720
|
function Mc(e) {
|
|
721
|
-
const n =
|
|
721
|
+
const n = yl(e), t = [];
|
|
722
722
|
let o = [], i = [], r = 0, s = 0, c = 0, d = 0, u = null, h = 0, p = "", y = !1;
|
|
723
723
|
const m = () => Number(n[h++]), E = (A) => {
|
|
724
724
|
A && o.length > 1 && Bn(o[0], o[o.length - 1]) && o.pop();
|
|
@@ -821,7 +821,7 @@ function Mc(e) {
|
|
|
821
821
|
}
|
|
822
822
|
return y && E(!1), t;
|
|
823
823
|
}
|
|
824
|
-
function
|
|
824
|
+
function cs(e) {
|
|
825
825
|
if (e.anchors.length === 0) return "";
|
|
826
826
|
const n = e.anchors[0];
|
|
827
827
|
let t = `M ${$n(n.x)} ${$n(n.y)}`;
|
|
@@ -833,7 +833,7 @@ function ls(e) {
|
|
|
833
833
|
return e.closed && (t += " Z"), t;
|
|
834
834
|
}
|
|
835
835
|
function Cn(e) {
|
|
836
|
-
const n = e.filter((o) => o.anchors.length >= 2).map(
|
|
836
|
+
const n = e.filter((o) => o.anchors.length >= 2).map(cs).filter(Boolean);
|
|
837
837
|
if (n.length === 0)
|
|
838
838
|
return { paths: [], polygons: [] };
|
|
839
839
|
const t = ns(n);
|
|
@@ -844,13 +844,13 @@ function Cn(e) {
|
|
|
844
844
|
)
|
|
845
845
|
};
|
|
846
846
|
}
|
|
847
|
-
const
|
|
848
|
-
function
|
|
847
|
+
const as = 28 * Math.PI / 180, ds = 4, Pc = 3, Dc = 0.035, us = 0.65;
|
|
848
|
+
function ps(e, n, t) {
|
|
849
849
|
const o = n.x - e.x, i = n.y - e.y, r = t.x - n.x, s = t.y - n.y;
|
|
850
850
|
return Math.atan2(o * s - i * r, o * r + i * s);
|
|
851
851
|
}
|
|
852
852
|
function $c(e) {
|
|
853
|
-
if (e.length <
|
|
853
|
+
if (e.length < ds) return !1;
|
|
854
854
|
const n = e[0], t = e[e.length - 1], o = gn(n, t);
|
|
855
855
|
if (o < Co) return !1;
|
|
856
856
|
let i = 0, r = 0;
|
|
@@ -865,10 +865,10 @@ function $c(e) {
|
|
|
865
865
|
else if (d !== r) return !1;
|
|
866
866
|
}
|
|
867
867
|
}
|
|
868
|
-
if (i < Math.max(Pc, o * Dc) || i > o *
|
|
868
|
+
if (i < Math.max(Pc, o * Dc) || i > o * us)
|
|
869
869
|
return !1;
|
|
870
870
|
for (let s = 1; s < e.length - 1; s++)
|
|
871
|
-
if (Math.abs(
|
|
871
|
+
if (Math.abs(ps(e[s - 1], e[s], e[s + 1])) > as)
|
|
872
872
|
return !1;
|
|
873
873
|
return !0;
|
|
874
874
|
}
|
|
@@ -879,7 +879,7 @@ function Fc(e) {
|
|
|
879
879
|
const d = dt(e[c], n, t).distance;
|
|
880
880
|
d > i && (i = d, o = e[c]);
|
|
881
881
|
}
|
|
882
|
-
const { c1: r, c2: s } =
|
|
882
|
+
const { c1: r, c2: s } = ls(n, t, o);
|
|
883
883
|
return { kind: "cubic", c1: r, c2: s };
|
|
884
884
|
}
|
|
885
885
|
function zc(e, n, t, o) {
|
|
@@ -891,7 +891,7 @@ function zc(e, n, t, o) {
|
|
|
891
891
|
}
|
|
892
892
|
function Bc(e, n, t, o) {
|
|
893
893
|
const i = gn(e, o), r = zc(e, n, t, o);
|
|
894
|
-
return i < Co ? r > Co : r > i *
|
|
894
|
+
return i < Co ? r > Co : r > i * us;
|
|
895
895
|
}
|
|
896
896
|
function Wc(e) {
|
|
897
897
|
const n = Pn(e);
|
|
@@ -901,12 +901,12 @@ function Wc(e) {
|
|
|
901
901
|
}
|
|
902
902
|
function Kc(e) {
|
|
903
903
|
const n = e.anchors.length;
|
|
904
|
-
if (n <
|
|
904
|
+
if (n < ds) return e;
|
|
905
905
|
const t = (m) => (m % n + n) % n, o = (m) => e.closed ? e.edges[t(m - 1)] : m > 0 ? e.edges[m - 1] : void 0, i = (m) => e.closed || m < n - 1 ? e.edges[m] : void 0, r = (m) => {
|
|
906
906
|
var E, x;
|
|
907
907
|
return !e.closed && (m === 0 || m === n - 1) || ((E = o(m)) == null ? void 0 : E.kind) === "cubic" || ((x = i(m)) == null ? void 0 : x.kind) === "cubic" ? !0 : Math.abs(
|
|
908
|
-
|
|
909
|
-
) >
|
|
908
|
+
ps(e.anchors[t(m - 1)], e.anchors[m], e.anchors[t(m + 1)])
|
|
909
|
+
) > as;
|
|
910
910
|
};
|
|
911
911
|
let s = 0;
|
|
912
912
|
if (e.closed) {
|
|
@@ -981,7 +981,7 @@ function so(e) {
|
|
|
981
981
|
function ut(e) {
|
|
982
982
|
return Cn(e);
|
|
983
983
|
}
|
|
984
|
-
function
|
|
984
|
+
function hs(e, n) {
|
|
985
985
|
return e.closed ? (n - 1 + e.anchors.length) % e.anchors.length : n > 0 ? n - 1 : null;
|
|
986
986
|
}
|
|
987
987
|
function Sr(e, n) {
|
|
@@ -1015,7 +1015,7 @@ function Hc(e, n, t, o) {
|
|
|
1015
1015
|
r.anchors[s] = mn(r.anchors[s], o), r.anchors[c] = mn(r.anchors[c], o);
|
|
1016
1016
|
const d = r.edges[t];
|
|
1017
1017
|
(d == null ? void 0 : d.kind) === "cubic" && (d.c1 = mn(d.c1, o), d.c2 = mn(d.c2, o));
|
|
1018
|
-
const u =
|
|
1018
|
+
const u = hs(r, s);
|
|
1019
1019
|
if (u != null && u !== t) {
|
|
1020
1020
|
const p = r.edges[u];
|
|
1021
1021
|
(p == null ? void 0 : p.kind) === "cubic" && (p.c2 = mn(p.c2, o));
|
|
@@ -1031,9 +1031,9 @@ function Xc(e, n, t, o) {
|
|
|
1031
1031
|
const i = Ae(e), r = i[n];
|
|
1032
1032
|
if (!r || t < 0 || t >= r.anchors.length)
|
|
1033
1033
|
return e;
|
|
1034
|
-
const s = r.anchors[t], c =
|
|
1034
|
+
const s = r.anchors[t], c = pr(o, s);
|
|
1035
1035
|
r.anchors[t] = le(o);
|
|
1036
|
-
const d =
|
|
1036
|
+
const d = hs(r, t), u = Sr(r, t);
|
|
1037
1037
|
if (d != null) {
|
|
1038
1038
|
const h = r.edges[d];
|
|
1039
1039
|
(h == null ? void 0 : h.kind) === "cubic" && (h.c2 = mn(h.c2, c));
|
|
@@ -1055,7 +1055,7 @@ function mi(e, n, t) {
|
|
|
1055
1055
|
function Yc(e, n, t, o) {
|
|
1056
1056
|
const i = Ae(e), r = i[n];
|
|
1057
1057
|
if (!r || t < 0 || t >= Pn(r)) return e;
|
|
1058
|
-
const s = Nn(r, t), c = In(r, t), { c1: d, c2: u } =
|
|
1058
|
+
const s = Nn(r, t), c = In(r, t), { c1: d, c2: u } = ls(s, c, o);
|
|
1059
1059
|
return r.edges[t] = { kind: "cubic", c1: d, c2: u }, ut(i);
|
|
1060
1060
|
}
|
|
1061
1061
|
function Gc(e, n, t, o) {
|
|
@@ -1066,7 +1066,7 @@ function Gc(e, n, t, o) {
|
|
|
1066
1066
|
if (s == null) return e;
|
|
1067
1067
|
const c = r.edges[s] ?? { kind: "line" }, d = Nn(r, s), u = In(r, s);
|
|
1068
1068
|
if (c.kind === "cubic") {
|
|
1069
|
-
const { t: h } = ao(o, d, c.c1, c.c2, u), p = Math.min(0.95, Math.max(0.05, h)), y =
|
|
1069
|
+
const { t: h } = ao(o, d, c.c1, c.c2, u), p = Math.min(0.95, Math.max(0.05, h)), y = hr(d, c.c1, c.c2, u, p);
|
|
1070
1070
|
r.anchors.splice(t + 1, 0, le(y.left.to)), r.edges.splice(s, 1, { kind: "cubic", c1: y.left.c1, c2: y.left.c2 }, {
|
|
1071
1071
|
kind: "cubic",
|
|
1072
1072
|
c1: y.right.c1,
|
|
@@ -1089,7 +1089,7 @@ function yi(e, n, t) {
|
|
|
1089
1089
|
} else t === 0 ? (i.anchors.splice(0, 1), i.edges.splice(0, 1)) : t === s - 1 ? (i.anchors.pop(), i.edges.pop()) : (i.anchors.splice(t, 1), i.edges.splice(t, 1), i.edges[t - 1] = { kind: "line" });
|
|
1090
1090
|
return ut(o);
|
|
1091
1091
|
}
|
|
1092
|
-
function
|
|
1092
|
+
function Yo(e, n, t) {
|
|
1093
1093
|
let o = null;
|
|
1094
1094
|
return Ae(e).forEach((i, r) => {
|
|
1095
1095
|
i.anchors.forEach((s, c) => {
|
|
@@ -1117,7 +1117,7 @@ function Zc(e, n, t) {
|
|
|
1117
1117
|
}
|
|
1118
1118
|
}), o;
|
|
1119
1119
|
}
|
|
1120
|
-
function
|
|
1120
|
+
function fs(e, n, t, o) {
|
|
1121
1121
|
let i = null;
|
|
1122
1122
|
return Ae(e).forEach((r, s) => {
|
|
1123
1123
|
const c = Pn(r);
|
|
@@ -1144,10 +1144,10 @@ function hs(e, n, t, o) {
|
|
|
1144
1144
|
}), i;
|
|
1145
1145
|
}
|
|
1146
1146
|
function Jc(e, n, t) {
|
|
1147
|
-
return
|
|
1147
|
+
return fs(e, n, t, !0);
|
|
1148
1148
|
}
|
|
1149
|
-
function
|
|
1150
|
-
return
|
|
1149
|
+
function ms(e, n, t) {
|
|
1150
|
+
return fs(e, n, t, !1);
|
|
1151
1151
|
}
|
|
1152
1152
|
const qc = 4;
|
|
1153
1153
|
function gi(e) {
|
|
@@ -1176,7 +1176,7 @@ function ki(e) {
|
|
|
1176
1176
|
edges: e.edges.map(on).reverse().map(Qc)
|
|
1177
1177
|
};
|
|
1178
1178
|
}
|
|
1179
|
-
function
|
|
1179
|
+
function ys(e, n) {
|
|
1180
1180
|
if (e.closed || e.anchors.length < 3) return e;
|
|
1181
1181
|
const t = e.anchors[0], o = e.anchors[e.anchors.length - 1];
|
|
1182
1182
|
if (!Bn(t, o, n)) return e;
|
|
@@ -1205,17 +1205,17 @@ function ea(e, n, t) {
|
|
|
1205
1205
|
const o = Nn(e, n), i = In(e, n), r = e.edges[n] ?? { kind: "line" };
|
|
1206
1206
|
return r.kind === "cubic" ? ao(t, o, r.c1, r.c2, i).distance : dt(t, o, i).distance;
|
|
1207
1207
|
}
|
|
1208
|
-
function
|
|
1208
|
+
function Go(e, n, t) {
|
|
1209
1209
|
const o = Pn(n);
|
|
1210
1210
|
for (let i = 0; i < o; i++)
|
|
1211
1211
|
if (ea(n, i, e) <= t) return !0;
|
|
1212
1212
|
return !1;
|
|
1213
1213
|
}
|
|
1214
|
-
function
|
|
1214
|
+
function gs(e, n, t, o = qc) {
|
|
1215
1215
|
const i = { x: (e.x + n.x) / 2, y: (e.y + n.y) / 2 };
|
|
1216
1216
|
for (const r of t) {
|
|
1217
1217
|
if (Ae(r.geometry).some(
|
|
1218
|
-
(u) =>
|
|
1218
|
+
(u) => Go(e, u, o) && Go(n, u, o) && Go(i, u, o)
|
|
1219
1219
|
)) return !0;
|
|
1220
1220
|
const d = lo(r.geometry);
|
|
1221
1221
|
if (d.length >= 2) {
|
|
@@ -1225,7 +1225,7 @@ function ys(e, n, t, o = qc) {
|
|
|
1225
1225
|
}
|
|
1226
1226
|
return !1;
|
|
1227
1227
|
}
|
|
1228
|
-
function
|
|
1228
|
+
function ks(e, n, t, o) {
|
|
1229
1229
|
const i = n.x - e.x, r = n.y - e.y, s = Math.hypot(i, r);
|
|
1230
1230
|
if (s < 1e-6) return null;
|
|
1231
1231
|
const c = Math.min(Math.max(o, 0.35) / 2, s * 0.2);
|
|
@@ -1237,10 +1237,10 @@ function gs(e, n, t, o) {
|
|
|
1237
1237
|
p2: { x: e.x + d * (p + c), y: e.y + u * (p + c) }
|
|
1238
1238
|
};
|
|
1239
1239
|
}
|
|
1240
|
-
function
|
|
1240
|
+
function _s(e, n, t, o, i) {
|
|
1241
1241
|
const { t: r } = ao(o, e, n.c1, n.c2, t), s = Math.hypot(t.x - e.x, t.y - e.y), c = s > 1e-6 ? Math.min(0.04, Math.max(6e-3, i / (2 * s))) : 0.015, d = Math.min(0.92, Math.max(0.04, r - c)), u = Math.min(0.96, Math.max(d + 0.012, r + c));
|
|
1242
1242
|
if (u - d < 0.01) return null;
|
|
1243
|
-
const h =
|
|
1243
|
+
const h = hr(e, n.c1, n.c2, t, d), p = (u - d) / Math.max(1e-6, 1 - d), y = hr(
|
|
1244
1244
|
h.left.to,
|
|
1245
1245
|
h.right.c1,
|
|
1246
1246
|
h.right.c2,
|
|
@@ -1278,7 +1278,7 @@ function ta(e, n, t, o, i, r) {
|
|
|
1278
1278
|
};
|
|
1279
1279
|
return [d, u].filter((h) => h.anchors.length >= 2);
|
|
1280
1280
|
}
|
|
1281
|
-
function
|
|
1281
|
+
function fr(e, n, t) {
|
|
1282
1282
|
const o = Ae(e).map(at), i = o[n];
|
|
1283
1283
|
if (!i || t < 0 || t >= Pn(i)) return e;
|
|
1284
1284
|
if (i.closed) {
|
|
@@ -1313,12 +1313,12 @@ function oa(e, n, t, o, i) {
|
|
|
1313
1313
|
const c = Nn(s, t), d = In(s, t), u = s.edges[t] ?? { kind: "line" };
|
|
1314
1314
|
let h, p, y, m;
|
|
1315
1315
|
if (u.kind === "cubic") {
|
|
1316
|
-
const x =
|
|
1317
|
-
if (!x) return
|
|
1316
|
+
const x = _s(c, u, d, o, i);
|
|
1317
|
+
if (!x) return fr(e, n, t);
|
|
1318
1318
|
h = x.p1, p = x.p2, y = x.leftEdge, m = x.rightEdge;
|
|
1319
1319
|
} else {
|
|
1320
|
-
const x =
|
|
1321
|
-
if (!x) return
|
|
1320
|
+
const x = ks(c, d, o, i);
|
|
1321
|
+
if (!x) return fr(e, n, t);
|
|
1322
1322
|
h = x.p1, p = x.p2, y = { kind: "line" }, m = { kind: "line" };
|
|
1323
1323
|
}
|
|
1324
1324
|
if (s.closed)
|
|
@@ -1342,14 +1342,14 @@ function oa(e, n, t, o, i) {
|
|
|
1342
1342
|
}
|
|
1343
1343
|
function ra(e, n, t) {
|
|
1344
1344
|
const o = e.anchors[e.anchors.length - 1], i = n.anchors[0], r = Bn(o, i, t), s = r ? [...e.anchors.map(le), ...n.anchors.slice(1).map(le)] : [...e.anchors.map(le), ...n.anchors.map(le)], c = r ? [...e.edges.map(on), ...n.edges.map(on)] : [...e.edges.map(on), { kind: "line" }, ...n.edges.map(on)];
|
|
1345
|
-
return
|
|
1345
|
+
return ys({ closed: !1, anchors: s, edges: c }, t);
|
|
1346
1346
|
}
|
|
1347
1347
|
function ia(e, n) {
|
|
1348
1348
|
return Bn(
|
|
1349
1349
|
e.anchors[0],
|
|
1350
1350
|
e.anchors[e.anchors.length - 1],
|
|
1351
1351
|
n
|
|
1352
|
-
) ?
|
|
1352
|
+
) ? ys(e, n) : {
|
|
1353
1353
|
closed: !0,
|
|
1354
1354
|
anchors: e.anchors.map(le),
|
|
1355
1355
|
edges: [...e.edges.map(on), { kind: "line" }]
|
|
@@ -1363,7 +1363,7 @@ function _i(e, n, t, o = Nt) {
|
|
|
1363
1363
|
const c = n.end === "end" ? at(r) : ki(r), d = t.end === "start" ? at(s) : ki(s), u = ra(c, d, o), h = Math.min(n.ringIndex, t.ringIndex), p = Math.max(n.ringIndex, t.ringIndex);
|
|
1364
1364
|
return i[h] = u, i.splice(p, 1), Cn(i);
|
|
1365
1365
|
}
|
|
1366
|
-
function
|
|
1366
|
+
function vs(e, n, t, o) {
|
|
1367
1367
|
const i = e.findIndex((y) => y.id === n.shapeId), r = e.findIndex((y) => y.id === t.shapeId);
|
|
1368
1368
|
if (i < 0 || r < 0) return { shapes: e, deleteIds: [] };
|
|
1369
1369
|
if (n.shapeId === t.shapeId) {
|
|
@@ -1404,7 +1404,7 @@ function sa(e, n = Nt) {
|
|
|
1404
1404
|
y <= m && (!s || y < s.dist) && (s = { a: h, b: p, dist: y });
|
|
1405
1405
|
}
|
|
1406
1406
|
if (!s) break;
|
|
1407
|
-
const c =
|
|
1407
|
+
const c = vs(t, s.a, s.b, n);
|
|
1408
1408
|
t = c.shapes, o.push(...c.deleteIds);
|
|
1409
1409
|
}
|
|
1410
1410
|
return { shapes: t, deleteIds: o };
|
|
@@ -1419,7 +1419,7 @@ function la(e) {
|
|
|
1419
1419
|
extras: t.slice(1).map((i) => Cn([i]))
|
|
1420
1420
|
};
|
|
1421
1421
|
}
|
|
1422
|
-
function
|
|
1422
|
+
function Is(e, n, t) {
|
|
1423
1423
|
const o = sa(n), i = /* @__PURE__ */ new Set([...t, ...o.deleteIds]), r = [], s = [];
|
|
1424
1424
|
for (const u of o.shapes) {
|
|
1425
1425
|
if (i.has(u.id)) continue;
|
|
@@ -1458,15 +1458,15 @@ function ca(e, n, t) {
|
|
|
1458
1458
|
if (!o) return [];
|
|
1459
1459
|
const i = e.filter((y) => y.id !== n.shapeId), s = Ae(o.geometry)[n.ringIndex];
|
|
1460
1460
|
if (!s) return [];
|
|
1461
|
-
const c = Nn(s, n.edgeIndex), d = In(s, n.edgeIndex), h =
|
|
1461
|
+
const c = Nn(s, n.edgeIndex), d = In(s, n.edgeIndex), h = gs(c, d, i) ? fr(o.geometry, n.ringIndex, n.edgeIndex) : oa(o.geometry, n.ringIndex, n.edgeIndex, n.point, t), p = e.map(
|
|
1462
1462
|
(y) => y.id === n.shapeId ? { ...y, geometry: h } : y
|
|
1463
1463
|
);
|
|
1464
|
-
return
|
|
1464
|
+
return Is(e, p, []);
|
|
1465
1465
|
}
|
|
1466
1466
|
function aa(e, n, t) {
|
|
1467
1467
|
if (ro(n, t)) return [];
|
|
1468
|
-
const o =
|
|
1469
|
-
return
|
|
1468
|
+
const o = vs(e, n, t, Nt);
|
|
1469
|
+
return Is(e, o.shapes, o.deleteIds);
|
|
1470
1470
|
}
|
|
1471
1471
|
function ko(e, n, t, o) {
|
|
1472
1472
|
let i = null;
|
|
@@ -1488,7 +1488,7 @@ function ko(e, n, t, o) {
|
|
|
1488
1488
|
function vi(e, n, t) {
|
|
1489
1489
|
let o = null;
|
|
1490
1490
|
for (const i of e) {
|
|
1491
|
-
const r =
|
|
1491
|
+
const r = ms(i.geometry, n, t);
|
|
1492
1492
|
if (r && (!o || r.distance < o.distance)) {
|
|
1493
1493
|
const c = Ae(i.geometry)[r.polygonIndex], d = c ? Nn(c, r.afterVertexIndex) : n, u = c ? In(c, r.afterVertexIndex) : n;
|
|
1494
1494
|
o = {
|
|
@@ -1496,7 +1496,7 @@ function vi(e, n, t) {
|
|
|
1496
1496
|
ringIndex: r.polygonIndex,
|
|
1497
1497
|
edgeIndex: r.afterVertexIndex,
|
|
1498
1498
|
point: r.point,
|
|
1499
|
-
shared:
|
|
1499
|
+
shared: gs(
|
|
1500
1500
|
d,
|
|
1501
1501
|
u,
|
|
1502
1502
|
e.filter((h) => h.id !== i.id)
|
|
@@ -1512,10 +1512,10 @@ function da(e, n, t, o, i) {
|
|
|
1512
1512
|
if (!s) return null;
|
|
1513
1513
|
const c = Nn(s, t), d = In(s, t), u = s.edges[t] ?? { kind: "line" };
|
|
1514
1514
|
if (u.kind === "cubic") {
|
|
1515
|
-
const h =
|
|
1515
|
+
const h = _s(c, u, d, o, i);
|
|
1516
1516
|
return h ? { p1: h.p1, p2: h.p2 } : null;
|
|
1517
1517
|
}
|
|
1518
|
-
return
|
|
1518
|
+
return ks(c, d, o, i);
|
|
1519
1519
|
}
|
|
1520
1520
|
function ua(e, n, t) {
|
|
1521
1521
|
let o = null;
|
|
@@ -1528,7 +1528,7 @@ function ua(e, n, t) {
|
|
|
1528
1528
|
function Ii(e, n, t = 1e-4) {
|
|
1529
1529
|
return !e || !n ? !1 : Math.abs(e.x - n.x) <= t && Math.abs(e.y - n.y) <= t;
|
|
1530
1530
|
}
|
|
1531
|
-
function
|
|
1531
|
+
function bs(e, n, t = !1) {
|
|
1532
1532
|
let o = n.x, i = n.y;
|
|
1533
1533
|
if (t) {
|
|
1534
1534
|
const c = n.x - e.x, d = n.y - e.y, u = Math.max(Math.abs(c), Math.abs(d)), h = c === 0 ? d === 0 ? 1 : Math.sign(d) : Math.sign(c), p = d === 0 ? c === 0 ? 1 : Math.sign(c) : Math.sign(d);
|
|
@@ -1548,18 +1548,18 @@ function pa(e) {
|
|
|
1548
1548
|
}
|
|
1549
1549
|
function ha(e, n, t = !1) {
|
|
1550
1550
|
return ns([
|
|
1551
|
-
pa(
|
|
1551
|
+
pa(bs(e, n, t))
|
|
1552
1552
|
]);
|
|
1553
1553
|
}
|
|
1554
|
-
const zt = "Text", co = 48,
|
|
1555
|
-
function
|
|
1554
|
+
const zt = "Text", co = 48, xs = Vl, ws = Ul, fa = 0.5;
|
|
1555
|
+
function mr(e) {
|
|
1556
1556
|
var n, t;
|
|
1557
1557
|
return e.kind === "label" && !!((t = (n = e.label) == null ? void 0 : n.text) != null && t.trim());
|
|
1558
1558
|
}
|
|
1559
1559
|
function bi(e) {
|
|
1560
1560
|
return co;
|
|
1561
1561
|
}
|
|
1562
|
-
function
|
|
1562
|
+
function Cs(e) {
|
|
1563
1563
|
return (e.replace(/\r\n/g, `
|
|
1564
1564
|
`).trim() || zt).split(`
|
|
1565
1565
|
`);
|
|
@@ -1569,21 +1569,21 @@ function ma() {
|
|
|
1569
1569
|
return Qt !== void 0 ? Qt : typeof document > "u" ? (Qt = null, null) : (Qt = document.createElement("canvas").getContext("2d"), Qt);
|
|
1570
1570
|
}
|
|
1571
1571
|
function ya(e, n) {
|
|
1572
|
-
const t =
|
|
1572
|
+
const t = Cs(e), o = ma();
|
|
1573
1573
|
let i = 0;
|
|
1574
1574
|
if (o) {
|
|
1575
|
-
o.font = `${n}px ${
|
|
1575
|
+
o.font = `${n}px ${xs}`;
|
|
1576
1576
|
for (const r of t)
|
|
1577
1577
|
i = Math.max(i, o.measureText(r || " ").width);
|
|
1578
1578
|
} else
|
|
1579
1579
|
i = t.reduce((s, c) => Math.max(s, c.length), 1) * n * fa;
|
|
1580
1580
|
return {
|
|
1581
1581
|
width: Math.max(i, n * 0.2),
|
|
1582
|
-
height: Math.max(t.length, 1) * n *
|
|
1582
|
+
height: Math.max(t.length, 1) * n * ws,
|
|
1583
1583
|
lines: t
|
|
1584
1584
|
};
|
|
1585
1585
|
}
|
|
1586
|
-
function
|
|
1586
|
+
function yr(e) {
|
|
1587
1587
|
return { x: (e.minX + e.maxX) / 2, y: (e.minY + e.maxY) / 2 };
|
|
1588
1588
|
}
|
|
1589
1589
|
function ga(e, n, t) {
|
|
@@ -1595,7 +1595,7 @@ function ga(e, n, t) {
|
|
|
1595
1595
|
{ x: e.x, y: e.y }
|
|
1596
1596
|
];
|
|
1597
1597
|
}
|
|
1598
|
-
function
|
|
1598
|
+
function Ns(e, n, t) {
|
|
1599
1599
|
return so([ga(e, n, t)]);
|
|
1600
1600
|
}
|
|
1601
1601
|
function ka(e, n, t) {
|
|
@@ -1608,14 +1608,14 @@ function ka(e, n, t) {
|
|
|
1608
1608
|
}
|
|
1609
1609
|
function _a(e, n, t) {
|
|
1610
1610
|
const o = wn(e);
|
|
1611
|
-
return
|
|
1611
|
+
return Ns({ x: o.minX, y: o.maxY }, n, t);
|
|
1612
1612
|
}
|
|
1613
1613
|
function io(e) {
|
|
1614
|
-
return
|
|
1614
|
+
return mr(e) || Ao(e);
|
|
1615
1615
|
}
|
|
1616
1616
|
function va(e, n) {
|
|
1617
1617
|
return {
|
|
1618
|
-
imageKey:
|
|
1618
|
+
imageKey: gl,
|
|
1619
1619
|
size: xo(e),
|
|
1620
1620
|
color: n,
|
|
1621
1621
|
rotate: 0
|
|
@@ -1630,11 +1630,11 @@ function Ia(e, n) {
|
|
|
1630
1630
|
{ x: e.x - t, y: e.y + t }
|
|
1631
1631
|
];
|
|
1632
1632
|
}
|
|
1633
|
-
function
|
|
1633
|
+
function Ss(e, n) {
|
|
1634
1634
|
return so([Ia(e, n)]);
|
|
1635
1635
|
}
|
|
1636
1636
|
function ba(e, n) {
|
|
1637
|
-
return
|
|
1637
|
+
return Ss(yr(wn(e)), n);
|
|
1638
1638
|
}
|
|
1639
1639
|
function xa(e, n, t) {
|
|
1640
1640
|
const o = e.a * e.d - e.b * e.c;
|
|
@@ -1659,7 +1659,7 @@ function Ca(e, n) {
|
|
|
1659
1659
|
const t = n.width > 0 ? n.width : Math.max(e.width, 1), o = n.height > 0 ? n.height : Math.max(e.height, 1), i = Math.min(e.width / t, e.height / o);
|
|
1660
1660
|
return i > 0 && Number.isFinite(i) ? i : 1;
|
|
1661
1661
|
}
|
|
1662
|
-
function
|
|
1662
|
+
function Ls(e) {
|
|
1663
1663
|
var i;
|
|
1664
1664
|
const n = (i = e.viewBox) == null ? void 0 : i.baseVal;
|
|
1665
1665
|
if (n && n.width > 0 && n.height > 0)
|
|
@@ -1670,33 +1670,33 @@ function Ss(e) {
|
|
|
1670
1670
|
return o.length !== 4 || o.some((r) => !Number.isFinite(r)) || o[2] <= 0 || o[3] <= 0 ? null : { x: o[0], y: o[1], width: o[2], height: o[3] };
|
|
1671
1671
|
}
|
|
1672
1672
|
function vt(e, n, t) {
|
|
1673
|
-
const o =
|
|
1673
|
+
const o = Ls(e);
|
|
1674
1674
|
if (o)
|
|
1675
1675
|
return wa(e.getBoundingClientRect(), o, n, t);
|
|
1676
1676
|
const i = e.getScreenCTM();
|
|
1677
1677
|
return i ? xa(i, n, t) : { x: 0, y: 0 };
|
|
1678
1678
|
}
|
|
1679
1679
|
function Na(e) {
|
|
1680
|
-
const n =
|
|
1680
|
+
const n = Ls(e);
|
|
1681
1681
|
if (n) return Ca(e.getBoundingClientRect(), n);
|
|
1682
1682
|
const t = e.getScreenCTM();
|
|
1683
1683
|
return t ? La(t) : 1;
|
|
1684
1684
|
}
|
|
1685
|
-
function
|
|
1685
|
+
function gr(e, n, t) {
|
|
1686
1686
|
const o = t === 0 ? 1 : t;
|
|
1687
1687
|
return {
|
|
1688
1688
|
x: (e.x - n.x) / o,
|
|
1689
1689
|
y: (e.y - n.y) / o
|
|
1690
1690
|
};
|
|
1691
1691
|
}
|
|
1692
|
-
const
|
|
1692
|
+
const Es = 0.2, As = 128;
|
|
1693
1693
|
function xi(e) {
|
|
1694
|
-
return Math.min(
|
|
1694
|
+
return Math.min(As, Math.max(Es, e));
|
|
1695
1695
|
}
|
|
1696
1696
|
function Sa(e, n) {
|
|
1697
1697
|
return Ql(e, n.deltaY, {
|
|
1698
|
-
min:
|
|
1699
|
-
max:
|
|
1698
|
+
min: Es,
|
|
1699
|
+
max: As
|
|
1700
1700
|
});
|
|
1701
1701
|
}
|
|
1702
1702
|
function La(e) {
|
|
@@ -1707,7 +1707,7 @@ function Ea(e, n, t) {
|
|
|
1707
1707
|
return e / (i * o);
|
|
1708
1708
|
}
|
|
1709
1709
|
function wi(e, n, t, o) {
|
|
1710
|
-
const i =
|
|
1710
|
+
const i = gr(e, n, t);
|
|
1711
1711
|
return {
|
|
1712
1712
|
x: e.x - o * i.x,
|
|
1713
1713
|
y: e.y - o * i.y
|
|
@@ -1723,33 +1723,33 @@ const Oa = 240;
|
|
|
1723
1723
|
function Ta(e) {
|
|
1724
1724
|
return 1 - (1 - Math.min(1, Math.max(0, e))) ** 3;
|
|
1725
1725
|
}
|
|
1726
|
-
function
|
|
1726
|
+
function Zo(e, n, t) {
|
|
1727
1727
|
return e + (n - e) * t;
|
|
1728
1728
|
}
|
|
1729
1729
|
function Ra(e, n, t) {
|
|
1730
1730
|
const o = Ta(t);
|
|
1731
1731
|
return {
|
|
1732
1732
|
pan: {
|
|
1733
|
-
x:
|
|
1734
|
-
y:
|
|
1733
|
+
x: Zo(e.pan.x, n.pan.x, o),
|
|
1734
|
+
y: Zo(e.pan.y, n.pan.y, o)
|
|
1735
1735
|
},
|
|
1736
|
-
zoom:
|
|
1736
|
+
zoom: Zo(e.zoom, n.zoom, o)
|
|
1737
1737
|
};
|
|
1738
1738
|
}
|
|
1739
1739
|
function Ma(e) {
|
|
1740
1740
|
return e === "void" ? 0.22 : e === "amenity" ? 0.15 : e === "unit" || e === "parking_zone" ? 0.38 : 0.3;
|
|
1741
1741
|
}
|
|
1742
|
-
function
|
|
1742
|
+
function Jo(e, n, t) {
|
|
1743
1743
|
var o, i;
|
|
1744
|
-
return e.kind === "walkable" ?
|
|
1744
|
+
return e.kind === "walkable" ? kl : e.kind === "void" ? ((o = e.style) == null ? void 0 : o.fill) ?? "#94a3b8" : e.kind === "unit" ? _l(t, n.STORE_DEFAULT_COLOR) : ((i = e.style) == null ? void 0 : i.fill) ?? "#cbd5e1";
|
|
1745
1745
|
}
|
|
1746
|
-
function
|
|
1747
|
-
return
|
|
1746
|
+
function Os(e) {
|
|
1747
|
+
return Oo.includes(e) || e === "label" || e === "void";
|
|
1748
1748
|
}
|
|
1749
1749
|
function Pa(e) {
|
|
1750
1750
|
if (e.dragging) return "grabbing";
|
|
1751
|
-
if (
|
|
1752
|
-
if (
|
|
1751
|
+
if (dr(e.tool) || e.wayfinding && e.highlightable) return "cell";
|
|
1752
|
+
if (ur(e.tool) && (e.textLabel || e.entranceIcon))
|
|
1753
1753
|
return "pointer";
|
|
1754
1754
|
if (e.tool === "curve" || e.tool === "split-join")
|
|
1755
1755
|
return e.selected ? void 0 : e.highlightable ? "pointer" : void 0;
|
|
@@ -1759,7 +1759,7 @@ function Pa(e) {
|
|
|
1759
1759
|
}
|
|
1760
1760
|
}
|
|
1761
1761
|
function Da(e, n, t) {
|
|
1762
|
-
return !t || !
|
|
1762
|
+
return !t || !Os(e) ? n : Math.min(0.72, n + 0.24);
|
|
1763
1763
|
}
|
|
1764
1764
|
function $a({
|
|
1765
1765
|
url: e,
|
|
@@ -1773,7 +1773,7 @@ function $a({
|
|
|
1773
1773
|
);
|
|
1774
1774
|
ae(() => {
|
|
1775
1775
|
let d = !1;
|
|
1776
|
-
const u = new AbortController(), h =
|
|
1776
|
+
const u = new AbortController(), h = vl(e, n);
|
|
1777
1777
|
return fetch(h, { signal: u.signal }).then((p) => {
|
|
1778
1778
|
if (!p.ok) throw new Error(`SVG fetch ${p.status}`);
|
|
1779
1779
|
return p.text();
|
|
@@ -1806,7 +1806,7 @@ function $a({
|
|
|
1806
1806
|
)) });
|
|
1807
1807
|
}
|
|
1808
1808
|
function Fa(e) {
|
|
1809
|
-
return
|
|
1809
|
+
return Oo.includes(e);
|
|
1810
1810
|
}
|
|
1811
1811
|
function Ci(e) {
|
|
1812
1812
|
return !io(e);
|
|
@@ -1815,7 +1815,7 @@ function za(e) {
|
|
|
1815
1815
|
return e === "unit" || e === "parking_zone" ? "Outdoor store — click to switch to Outdoor and edit" : e === "amenity" ? "Outdoor amenity — click to switch to Outdoor and edit" : e === "kiosk_screen" ? "Outdoor kiosk — click to switch to Outdoor and edit" : "Outdoor item — click to switch to Outdoor and edit";
|
|
1816
1816
|
}
|
|
1817
1817
|
const Ni = 28, It = 10;
|
|
1818
|
-
function
|
|
1818
|
+
function Ts(e, n = !1) {
|
|
1819
1819
|
return e === "draw-route" || e === "create-route" || e === "create-route-multi" ? !0 : n && e === "select";
|
|
1820
1820
|
}
|
|
1821
1821
|
function Ba(e) {
|
|
@@ -1824,16 +1824,16 @@ function Ba(e) {
|
|
|
1824
1824
|
function Wa(e, n) {
|
|
1825
1825
|
return e ? { nextDraft: null, start: e, end: n } : { nextDraft: n, start: null, end: null };
|
|
1826
1826
|
}
|
|
1827
|
-
function
|
|
1827
|
+
function qo(e, n) {
|
|
1828
1828
|
return !e || !n || gn(e, n) <= 0.01 ? null : { from: e, to: n };
|
|
1829
1829
|
}
|
|
1830
1830
|
function Si(e) {
|
|
1831
|
-
return
|
|
1831
|
+
return Oo.includes(e);
|
|
1832
1832
|
}
|
|
1833
1833
|
function Li(e) {
|
|
1834
1834
|
return (e == null ? void 0 : e.kind) !== "outdoor";
|
|
1835
1835
|
}
|
|
1836
|
-
function
|
|
1836
|
+
function Rs(e) {
|
|
1837
1837
|
return nc(e);
|
|
1838
1838
|
}
|
|
1839
1839
|
function Ka(e) {
|
|
@@ -1844,7 +1844,7 @@ function Ka(e) {
|
|
|
1844
1844
|
y: (n.minY + n.maxY) / 2
|
|
1845
1845
|
} : ((o = e.geometry.polygons[0]) == null ? void 0 : o[0]) ?? { x: 0, y: 0 };
|
|
1846
1846
|
}
|
|
1847
|
-
function
|
|
1847
|
+
function To(e, n, t) {
|
|
1848
1848
|
return e.some(
|
|
1849
1849
|
(o) => o.fromAnchorId === n && o.toAnchorId === t || o.fromAnchorId === t && o.toAnchorId === n
|
|
1850
1850
|
);
|
|
@@ -1911,7 +1911,7 @@ function Ua(e) {
|
|
|
1911
1911
|
id: o(),
|
|
1912
1912
|
levelId: n.levelId,
|
|
1913
1913
|
shapeId: n.id,
|
|
1914
|
-
kind:
|
|
1914
|
+
kind: Rs(n.kind),
|
|
1915
1915
|
x: i.x,
|
|
1916
1916
|
y: i.y,
|
|
1917
1917
|
connectorId: null
|
|
@@ -1927,7 +1927,7 @@ function Ha(e) {
|
|
|
1927
1927
|
id: d(),
|
|
1928
1928
|
levelId: n.levelId,
|
|
1929
1929
|
shapeId: n.id,
|
|
1930
|
-
kind:
|
|
1930
|
+
kind: Rs(n.kind),
|
|
1931
1931
|
x: r.x,
|
|
1932
1932
|
y: r.y,
|
|
1933
1933
|
connectorId: null
|
|
@@ -1962,7 +1962,7 @@ function Ha(e) {
|
|
|
1962
1962
|
const A = wt(d(), i, x.fromAnchorId, y, x.kind), S = wt(d(), i, y, x.toAnchorId, x.kind);
|
|
1963
1963
|
u.push({ op: "upsert_edge", edge: A }), u.push({ op: "upsert_edge", edge: S }), m.push(A, S);
|
|
1964
1964
|
}
|
|
1965
|
-
if (
|
|
1965
|
+
if (To(m, h.id, y)) return u;
|
|
1966
1966
|
const E = h.kind === "entrance" ? "entrance_link" : "unit_link";
|
|
1967
1967
|
return u.push({
|
|
1968
1968
|
op: "upsert_edge",
|
|
@@ -1970,7 +1970,7 @@ function Ha(e) {
|
|
|
1970
1970
|
}), u;
|
|
1971
1971
|
}
|
|
1972
1972
|
function Xa(e, n, t, o, i) {
|
|
1973
|
-
return n === t ||
|
|
1973
|
+
return n === t || To(o, n, t) ? null : {
|
|
1974
1974
|
op: "upsert_edge",
|
|
1975
1975
|
edge: wt(i(), e, n, t)
|
|
1976
1976
|
};
|
|
@@ -2017,12 +2017,12 @@ function Ya(e, n, t, o) {
|
|
|
2017
2017
|
)
|
|
2018
2018
|
)
|
|
2019
2019
|
];
|
|
2020
|
-
return s.length === 2 && !
|
|
2020
|
+
return s.length === 2 && !To(t, s[0], s[1]) && r.push({
|
|
2021
2021
|
op: "upsert_edge",
|
|
2022
2022
|
edge: wt(o(), n, s[0], s[1])
|
|
2023
2023
|
}), r.push({ op: "delete_anchor", anchorId: e }), r;
|
|
2024
2024
|
}
|
|
2025
|
-
const
|
|
2025
|
+
const Qo = 9, Ei = 11, Ai = 16, er = 2, Ga = "#ea580c", no = 7, Oi = 9, lt = 14, Yn = 2, Ti = 5, Ri = 6, to = 12, Mi = 2.25, Pi = 4, nr = 4, Za = 4, Di = 7, Gn = 16;
|
|
2026
2026
|
function Ja(e, n) {
|
|
2027
2027
|
return [
|
|
2028
2028
|
{ x: e.x, y: e.y },
|
|
@@ -2078,7 +2078,7 @@ function Fn({
|
|
|
2078
2078
|
}
|
|
2079
2079
|
);
|
|
2080
2080
|
}
|
|
2081
|
-
function
|
|
2081
|
+
function tr(e) {
|
|
2082
2082
|
return e.map((n) => {
|
|
2083
2083
|
if (n.length === 0) return "";
|
|
2084
2084
|
let t = `M ${n[0].x} ${n[0].y}`;
|
|
@@ -2087,9 +2087,9 @@ function or(e) {
|
|
|
2087
2087
|
}).join(" ");
|
|
2088
2088
|
}
|
|
2089
2089
|
function qa(e, n) {
|
|
2090
|
-
return e.orphanedAt ? !1 : io(e) || !n ? !0 :
|
|
2090
|
+
return e.orphanedAt ? !1 : io(e) || !n ? !0 : Oo.includes(e.kind);
|
|
2091
2091
|
}
|
|
2092
|
-
const
|
|
2092
|
+
const Ms = Qi.forwardRef(
|
|
2093
2093
|
function({
|
|
2094
2094
|
level: n,
|
|
2095
2095
|
shapes: t,
|
|
@@ -2131,7 +2131,7 @@ const Rs = Qi.forwardRef(
|
|
|
2131
2131
|
onToolChange: ee
|
|
2132
2132
|
}, de) {
|
|
2133
2133
|
Hl();
|
|
2134
|
-
const se =
|
|
2134
|
+
const se = Ts(c, w), he = ie(null), $e = ie(null), rn = ie(null), [un, Ve] = K({ x: 0, y: 0 }), [ue, ne] = K(1), fe = ie({ pan: { x: 0, y: 0 }, zoom: 1 }), _e = ie(null), Fe = ie(null), ve = ie(null), Xe = ie(null), [qn, Sn] = K(1), Ue = ie(/* @__PURE__ */ new Map()), Re = ie(null), [O, Ce] = K([]), [pn, ye] = K(!1), [Me, He] = K([]), [R, Z] = K(null), [oe, C] = K(null), [L, $] = K(null), [X, T] = K(null), [Q, ze] = K(null), [Ge, Be] = K(null), [ge, yn] = K(
|
|
2135
2135
|
null
|
|
2136
2136
|
), [en, Ln] = K(
|
|
2137
2137
|
null
|
|
@@ -2145,7 +2145,7 @@ const Rs = Qi.forwardRef(
|
|
|
2145
2145
|
}, [F, X]), ae(() => {
|
|
2146
2146
|
L != null && (o.some((a) => a.id === L) || ($(null), Be(null)));
|
|
2147
2147
|
}, [o, L]);
|
|
2148
|
-
const [Le, Et] = K(null), [qe, ht] = K(null), [Kn, ft] = K({ x: 0, y: 0 }), [kn, sn] = K(null), [_n, hn] = K(null), [ln, nn] = K(null), [Ze, vn] = K(null), [Ee, nt] = K(null), [mt, Vn] = K(null), [
|
|
2148
|
+
const [Le, Et] = K(null), [qe, ht] = K(null), [Kn, ft] = K({ x: 0, y: 0 }), [kn, sn] = K(null), [_n, hn] = K(null), [ln, nn] = K(null), [Ze, vn] = K(null), [Ee, nt] = K(null), [mt, Vn] = K(null), [Ro, g] = K(null), [I, v] = K(null), U = (I == null ? void 0 : I.type) === "edge" ? { edgeId: I.edgeId, point: I.point } : null, [J, xe] = K(null), Ie = ie(null), [Un, Hn] = K(!1), P = (a) => Ea(a, fe.current.zoom, qn), At = (a, f) => {
|
|
2149
2149
|
yt(), fe.current = { pan: a, zoom: f }, Ve(a), ne(f);
|
|
2150
2150
|
}, uo = () => {
|
|
2151
2151
|
var _;
|
|
@@ -2192,7 +2192,7 @@ const Rs = Qi.forwardRef(
|
|
|
2192
2192
|
), { pan: N, zoom: M } = fe.current, re = xi(M * a);
|
|
2193
2193
|
re !== M && zr(wi(b, N, M, re), re);
|
|
2194
2194
|
};
|
|
2195
|
-
|
|
2195
|
+
ul(de, () => ({
|
|
2196
2196
|
consumeRouteUndo: () => {
|
|
2197
2197
|
const a = Ba({
|
|
2198
2198
|
routeDraftPoint: X,
|
|
@@ -2211,17 +2211,17 @@ const Rs = Qi.forwardRef(
|
|
|
2211
2211
|
), ae(() => {
|
|
2212
2212
|
Ce([]), ye(!1), He([]), $(null), T(null), ze(null), Be(null), Et(null), Vn(null), g(null), ht(null), sn(null), Z(null), C(null), nn(null), vn(null), ve.current != null && (cancelAnimationFrame(ve.current), ve.current = null), Xe.current = null, v(null), nt(null), Ln(null), _t(c) || (yn(null), En(null)), Qn(null), ft({ x: 0, y: 0 });
|
|
2213
2213
|
}, [c]), ae(() => {
|
|
2214
|
-
hn(null), nn(null), vn(null), nt(null),
|
|
2214
|
+
hn(null), nn(null), vn(null), nt(null), xe(null), Vn(null), ht(null), sn(null), ft({ x: 0, y: 0 });
|
|
2215
2215
|
}, [d]), ae(() => {
|
|
2216
|
-
et(), Et(null), v(null),
|
|
2216
|
+
et(), Et(null), v(null), xe(null), Vn(null), g(null);
|
|
2217
2217
|
}, [n == null ? void 0 : n.id]);
|
|
2218
|
-
const tt =
|
|
2219
|
-
() =>
|
|
2218
|
+
const tt = Il(n == null ? void 0 : n.sourceViewbox, p), Wr = y ?? E ?? ((n == null ? void 0 : n.kind) === "outdoor" ? h : null), Gs = me(
|
|
2219
|
+
() => bl([...x, ...t], {
|
|
2220
2220
|
omitStaticLayers: S
|
|
2221
2221
|
}),
|
|
2222
2222
|
[x, t, S]
|
|
2223
2223
|
);
|
|
2224
|
-
|
|
2224
|
+
pl(() => {
|
|
2225
2225
|
const a = he.current;
|
|
2226
2226
|
if (!a) return;
|
|
2227
2227
|
const f = () => {
|
|
@@ -2235,10 +2235,10 @@ const Rs = Qi.forwardRef(
|
|
|
2235
2235
|
const ot = me(
|
|
2236
2236
|
() => t.filter((a) => qa(a, S)),
|
|
2237
2237
|
[t, S]
|
|
2238
|
-
),
|
|
2238
|
+
), Mo = me(
|
|
2239
2239
|
() => ot.filter((a) => a.kind === "void"),
|
|
2240
2240
|
[ot]
|
|
2241
|
-
), Kr = `eyeon-opening-clip-${(n == null ? void 0 : n.id) ?? "none"}`,
|
|
2241
|
+
), Kr = `eyeon-opening-clip-${(n == null ? void 0 : n.id) ?? "none"}`, Po = `eyeon-opening-hatch-${(n == null ? void 0 : n.id) ?? "none"}`, G = ot.find((a) => a.id === d) ?? null, je = me(() => G ? qe && qe.shapeId === G.id ? fi(qe.originGeometry, Kn.x, Kn.y) : G.geometry : null, [G, qe, Kn]), xn = me(
|
|
2242
2242
|
() => ot.filter((a) => gi(a.kind) && !io(a)).map((a) => ({
|
|
2243
2243
|
id: a.id,
|
|
2244
2244
|
kind: a.kind,
|
|
@@ -2246,7 +2246,7 @@ const Rs = Qi.forwardRef(
|
|
|
2246
2246
|
geometry: a.geometry
|
|
2247
2247
|
})),
|
|
2248
2248
|
[ot]
|
|
2249
|
-
),
|
|
2249
|
+
), Zs = me(() => {
|
|
2250
2250
|
const a = [];
|
|
2251
2251
|
for (const f of ot)
|
|
2252
2252
|
if (!io(f))
|
|
@@ -2254,12 +2254,12 @@ const Rs = Qi.forwardRef(
|
|
|
2254
2254
|
a.push(..._.anchors);
|
|
2255
2255
|
return a;
|
|
2256
2256
|
}, [ot]), Vt = (a, f) => ko(xn, a, f) ? !0 : xn.some(
|
|
2257
|
-
(_) =>
|
|
2257
|
+
(_) => Yo(_.geometry, a, f) != null
|
|
2258
2258
|
), Vr = (a) => {
|
|
2259
2259
|
const f = Me.length >= 3 ? [Me[0]] : [];
|
|
2260
2260
|
return ua(
|
|
2261
2261
|
a,
|
|
2262
|
-
[...f, ...
|
|
2262
|
+
[...f, ...Zs],
|
|
2263
2263
|
P(Gn)
|
|
2264
2264
|
);
|
|
2265
2265
|
}, Ur = (a) => {
|
|
@@ -2276,7 +2276,7 @@ const Rs = Qi.forwardRef(
|
|
|
2276
2276
|
if (!_t(c) || z) return !1;
|
|
2277
2277
|
const f = pt ?? ko(xn, a, P(Gn), ge);
|
|
2278
2278
|
return f ? ge ? ro(ge, f) ? (yn(null), En(null), !0) : (Ur(aa(xn, ge, f)), yn(null), Ln(null), En(null), !0) : (yn(f), q(f.shapeId), kt(c) && (ee == null || ee("select")), !0) : !1;
|
|
2279
|
-
},
|
|
2279
|
+
}, Do = (a) => {
|
|
2280
2280
|
if (po(a)) return !0;
|
|
2281
2281
|
if (!kt(c) || z) return !1;
|
|
2282
2282
|
const f = P(Gn), _ = P(lt), b = vi(xn, a, _);
|
|
@@ -2287,7 +2287,7 @@ const Rs = Qi.forwardRef(
|
|
|
2287
2287
|
const _ = he.current;
|
|
2288
2288
|
if (!_) return { x: 0, y: 0 };
|
|
2289
2289
|
const { pan: b, zoom: N } = fe.current;
|
|
2290
|
-
return
|
|
2290
|
+
return gr(
|
|
2291
2291
|
vt(_, a, f),
|
|
2292
2292
|
b,
|
|
2293
2293
|
N
|
|
@@ -2295,12 +2295,12 @@ const Rs = Qi.forwardRef(
|
|
|
2295
2295
|
}, Hr = (a, f) => {
|
|
2296
2296
|
var b;
|
|
2297
2297
|
const _ = (b = rn.current) == null ? void 0 : b.getBoundingClientRect();
|
|
2298
|
-
_ &&
|
|
2298
|
+
_ && xe({
|
|
2299
2299
|
x: a.clientX - _.left,
|
|
2300
2300
|
y: a.clientY - _.top,
|
|
2301
2301
|
text: za(f)
|
|
2302
2302
|
});
|
|
2303
|
-
},
|
|
2303
|
+
}, Js = (a, f, _, b) => {
|
|
2304
2304
|
const N = Gc(a.geometry, f, _, b);
|
|
2305
2305
|
Ke(a.id, N), hn({
|
|
2306
2306
|
polygonIndex: f,
|
|
@@ -2326,7 +2326,7 @@ const Rs = Qi.forwardRef(
|
|
|
2326
2326
|
}, jr = (a, f) => {
|
|
2327
2327
|
var b, N;
|
|
2328
2328
|
if (!G || !je) return !1;
|
|
2329
|
-
const _ =
|
|
2329
|
+
const _ = Yo(
|
|
2330
2330
|
je,
|
|
2331
2331
|
a,
|
|
2332
2332
|
P(lt)
|
|
@@ -2361,7 +2361,7 @@ const Rs = Qi.forwardRef(
|
|
|
2361
2361
|
if (!a) return An;
|
|
2362
2362
|
const f = new Map(An);
|
|
2363
2363
|
return f.set(R, { ...a, ...oe }), f;
|
|
2364
|
-
}, [An, R, oe]),
|
|
2364
|
+
}, [An, R, oe]), qs = me(() => {
|
|
2365
2365
|
const a = /* @__PURE__ */ new Set();
|
|
2366
2366
|
return i.forEach((f) => {
|
|
2367
2367
|
a.add(f.fromAnchorId), a.add(f.toAnchorId);
|
|
@@ -2372,12 +2372,12 @@ const Rs = Qi.forwardRef(
|
|
|
2372
2372
|
return f && _ ? `M ${f.x} ${f.y} L ${_.x} ${_.y}` : "";
|
|
2373
2373
|
}).filter(Boolean).join(" "),
|
|
2374
2374
|
[Tt, i]
|
|
2375
|
-
),
|
|
2375
|
+
), $o = me(
|
|
2376
2376
|
() => new Map(r.map((a) => [a.shapeId, a])),
|
|
2377
2377
|
[r]
|
|
2378
2378
|
), Zr = () => {
|
|
2379
2379
|
ve.current != null && (cancelAnimationFrame(ve.current), ve.current = null), Xe.current = null;
|
|
2380
|
-
},
|
|
2380
|
+
}, Qs = (a, f) => {
|
|
2381
2381
|
Xe.current = { x: a, y: f }, ve.current == null && (ve.current = requestAnimationFrame(() => {
|
|
2382
2382
|
ve.current = null;
|
|
2383
2383
|
const _ = Xe.current;
|
|
@@ -2416,11 +2416,11 @@ const Rs = Qi.forwardRef(
|
|
|
2416
2416
|
};
|
|
2417
2417
|
}, [c]), ae(() => {
|
|
2418
2418
|
const a = (f) => {
|
|
2419
|
-
if (Pt(c) && (f.key === "Enter" ? (f.preventDefault(), Jr()) : f.key === "Escape" && (He([]), Be(null), Qn(null))), f.key === "Escape" && !
|
|
2419
|
+
if (Pt(c) && (f.key === "Enter" ? (f.preventDefault(), Jr()) : f.key === "Escape" && (He([]), Be(null), Qn(null))), f.key === "Escape" && !ar(f.target) && ge != null) {
|
|
2420
2420
|
f.preventDefault(), yn(null), Ln(null), En(null);
|
|
2421
2421
|
return;
|
|
2422
2422
|
}
|
|
2423
|
-
if (f.key === "Escape" && !
|
|
2423
|
+
if (f.key === "Escape" && !ar(f.target) && (Tn(c) || Q != null || X != null || L != null) && (f.preventDefault(), Te == null || Te()), (f.key === "Backspace" || f.key === "Delete") && G && qt(c) && _n) {
|
|
2424
2424
|
f.preventDefault();
|
|
2425
2425
|
const _ = yi(
|
|
2426
2426
|
G.geometry,
|
|
@@ -2469,7 +2469,7 @@ const Rs = Qi.forwardRef(
|
|
|
2469
2469
|
yt(), a.removeEventListener("wheel", f, { capture: !0 });
|
|
2470
2470
|
};
|
|
2471
2471
|
}, [!!n]);
|
|
2472
|
-
const
|
|
2472
|
+
const el = () => {
|
|
2473
2473
|
yt(), Kt();
|
|
2474
2474
|
const a = he.current, f = [...Ue.current.values()];
|
|
2475
2475
|
if (!a || f.length < 2) return;
|
|
@@ -2477,11 +2477,11 @@ const Rs = Qi.forwardRef(
|
|
|
2477
2477
|
Re.current = {
|
|
2478
2478
|
startDist: Math.max(1, Math.hypot(f[1].x - f[0].x, f[1].y - f[0].y)),
|
|
2479
2479
|
startZoom: M,
|
|
2480
|
-
world:
|
|
2480
|
+
world: gr(b, N, M)
|
|
2481
2481
|
}, Ie.current = null, Hn(!1), Ce([]), ht(null), sn(null), Z(null), C(null);
|
|
2482
|
-
}, el = (a) => {
|
|
2483
|
-
Ue.current.set(a.pointerId, { x: a.clientX, y: a.clientY }), !(Ue.current.size < 2) && (a.preventDefault(), a.stopPropagation(), Qs());
|
|
2484
2482
|
}, nl = (a) => {
|
|
2483
|
+
Ue.current.set(a.pointerId, { x: a.clientX, y: a.clientY }), !(Ue.current.size < 2) && (a.preventDefault(), a.stopPropagation(), el());
|
|
2484
|
+
}, tl = (a) => {
|
|
2485
2485
|
if (Ue.current.has(a.pointerId) && Ue.current.set(a.pointerId, { x: a.clientX, y: a.clientY }), !Re.current || Ue.current.size < 2) return;
|
|
2486
2486
|
const f = he.current;
|
|
2487
2487
|
if (!f) return;
|
|
@@ -2511,7 +2511,7 @@ const Rs = Qi.forwardRef(
|
|
|
2511
2511
|
Tn(c) && typeof _ == "number" && (X ? (D(X, _), T(null), $(it(c, _))) : L != null && L !== _ ? (j == null || j(L, _), $(it(c, _))) : $(_)), W(typeof _ == "number" ? [_] : []);
|
|
2512
2512
|
}, ei = (a) => {
|
|
2513
2513
|
z || !se || (We(a), $((f) => f === a ? null : f), Z(null), C(null), ze(null), T(null), Be(null), g((f) => f === a ? null : f));
|
|
2514
|
-
},
|
|
2514
|
+
}, ol = (a) => {
|
|
2515
2515
|
var _, b, N, M, re, ce, pe, tn;
|
|
2516
2516
|
if (Re.current) return;
|
|
2517
2517
|
if (z || c === "pan" || a.button === 1) {
|
|
@@ -2520,7 +2520,7 @@ const Rs = Qi.forwardRef(
|
|
|
2520
2520
|
}
|
|
2521
2521
|
const f = Qe(a.clientX, a.clientY);
|
|
2522
2522
|
if (kt(c)) {
|
|
2523
|
-
if (jr(f, a) ||
|
|
2523
|
+
if (jr(f, a) || Do(f)) return;
|
|
2524
2524
|
fo(a, !0);
|
|
2525
2525
|
return;
|
|
2526
2526
|
}
|
|
@@ -2564,14 +2564,24 @@ const Rs = Qi.forwardRef(
|
|
|
2564
2564
|
}
|
|
2565
2565
|
if (Tn(c)) {
|
|
2566
2566
|
if (L != null) {
|
|
2567
|
-
const
|
|
2568
|
-
$(
|
|
2567
|
+
const be = D(f, L);
|
|
2568
|
+
$(
|
|
2569
|
+
it(
|
|
2570
|
+
c,
|
|
2571
|
+
typeof be == "number" ? be : null
|
|
2572
|
+
)
|
|
2573
|
+
), Be(f);
|
|
2569
2574
|
return;
|
|
2570
2575
|
}
|
|
2571
2576
|
const Ne = Wa(X, f);
|
|
2572
2577
|
if (T(Ne.nextDraft), Be(f), Ne.start && Ne.end) {
|
|
2573
|
-
const
|
|
2574
|
-
$(
|
|
2578
|
+
const be = te(Ne.start, Ne.end);
|
|
2579
|
+
$(
|
|
2580
|
+
it(
|
|
2581
|
+
c,
|
|
2582
|
+
typeof be == "number" ? be : null
|
|
2583
|
+
)
|
|
2584
|
+
);
|
|
2575
2585
|
}
|
|
2576
2586
|
return;
|
|
2577
2587
|
}
|
|
@@ -2582,7 +2592,7 @@ const Rs = Qi.forwardRef(
|
|
|
2582
2592
|
const Y = bi();
|
|
2583
2593
|
ke(
|
|
2584
2594
|
"label",
|
|
2585
|
-
|
|
2595
|
+
Ns(f, zt, Y),
|
|
2586
2596
|
{ label: ka(zt, Y, s.STORE_TEXT_COLOR) }
|
|
2587
2597
|
);
|
|
2588
2598
|
return;
|
|
@@ -2590,7 +2600,7 @@ const Rs = Qi.forwardRef(
|
|
|
2590
2600
|
if (c === "draw-entrance") {
|
|
2591
2601
|
ke(
|
|
2592
2602
|
"entrance",
|
|
2593
|
-
|
|
2603
|
+
Ss(f, xt),
|
|
2594
2604
|
{ label: va(xt, s.STORE_TEXT_COLOR) }
|
|
2595
2605
|
);
|
|
2596
2606
|
return;
|
|
@@ -2636,7 +2646,7 @@ const Rs = Qi.forwardRef(
|
|
|
2636
2646
|
}
|
|
2637
2647
|
if (!(_t(c) && po(f))) {
|
|
2638
2648
|
if (qt(c) && G && je) {
|
|
2639
|
-
const Y = P(lt), H =
|
|
2649
|
+
const Y = P(lt), H = Yo(je, f, Y);
|
|
2640
2650
|
if (H) {
|
|
2641
2651
|
if (a.detail >= 2) {
|
|
2642
2652
|
ho(H.polygonIndex, H.vertexIndex);
|
|
@@ -2655,7 +2665,7 @@ const Rs = Qi.forwardRef(
|
|
|
2655
2665
|
}
|
|
2656
2666
|
}
|
|
2657
2667
|
if (c === "select" && G && je) {
|
|
2658
|
-
const Y =
|
|
2668
|
+
const Y = ms(je, f, P(lt));
|
|
2659
2669
|
if (Y) {
|
|
2660
2670
|
Xr(
|
|
2661
2671
|
Y.polygonIndex,
|
|
@@ -2668,7 +2678,7 @@ const Rs = Qi.forwardRef(
|
|
|
2668
2678
|
}
|
|
2669
2679
|
di(c) && fo(a, c === "select");
|
|
2670
2680
|
}
|
|
2671
|
-
},
|
|
2681
|
+
}, rl = (a) => {
|
|
2672
2682
|
var f, _;
|
|
2673
2683
|
if (!Re.current) {
|
|
2674
2684
|
if (Ie.current) {
|
|
@@ -2747,7 +2757,7 @@ const Rs = Qi.forwardRef(
|
|
|
2747
2757
|
const b = Qe(a.clientX, a.clientY), N = Vr(b);
|
|
2748
2758
|
Qn(N), Be(N ?? b);
|
|
2749
2759
|
}
|
|
2750
|
-
if (se && !Le && R == null &&
|
|
2760
|
+
if (se && !Le && R == null && Qs(a.clientX, a.clientY), _t(c) && !z) {
|
|
2751
2761
|
const b = Qe(a.clientX, a.clientY), N = P(Gn), M = ko(
|
|
2752
2762
|
xn,
|
|
2753
2763
|
b,
|
|
@@ -2759,7 +2769,7 @@ const Rs = Qi.forwardRef(
|
|
|
2759
2769
|
));
|
|
2760
2770
|
}
|
|
2761
2771
|
}
|
|
2762
|
-
},
|
|
2772
|
+
}, il = () => {
|
|
2763
2773
|
if (O.length < 2) {
|
|
2764
2774
|
Ce([]);
|
|
2765
2775
|
return;
|
|
@@ -2771,7 +2781,7 @@ const Rs = Qi.forwardRef(
|
|
|
2771
2781
|
}
|
|
2772
2782
|
const _ = Ja(a, f);
|
|
2773
2783
|
ke("unit", so([_])), Ce([]), ye(!1);
|
|
2774
|
-
},
|
|
2784
|
+
}, sl = (a) => {
|
|
2775
2785
|
if (O.length < 2) {
|
|
2776
2786
|
Ce([]), ye(!1);
|
|
2777
2787
|
return;
|
|
@@ -2809,7 +2819,7 @@ const Rs = Qi.forwardRef(
|
|
|
2809
2819
|
return;
|
|
2810
2820
|
}
|
|
2811
2821
|
if (Ee) {
|
|
2812
|
-
!Ee.dragging && G &&
|
|
2822
|
+
!Ee.dragging && G && Js(
|
|
2813
2823
|
G,
|
|
2814
2824
|
Ee.ringIndex,
|
|
2815
2825
|
Ee.edgeIndex,
|
|
@@ -2840,25 +2850,25 @@ const Rs = Qi.forwardRef(
|
|
|
2840
2850
|
Z(null), C(null);
|
|
2841
2851
|
return;
|
|
2842
2852
|
}
|
|
2843
|
-
c === "draw-unit" &&
|
|
2853
|
+
c === "draw-unit" && il(), Dt(c) && sl(a.shiftKey);
|
|
2844
2854
|
}, ti = (a) => {
|
|
2845
2855
|
const f = Ae(a);
|
|
2846
|
-
return f.length > 0 ? f.map(
|
|
2847
|
-
}, mo = (a) => d === a.id && je && (qe == null ? void 0 : qe.shapeId) === a.id ? ti(je) : ti(a.geometry),
|
|
2856
|
+
return f.length > 0 ? f.map(cs).join(" ") : a.paths.map((_) => _.d).join(" ") || tr(a.polygons);
|
|
2857
|
+
}, mo = (a) => d === a.id && je && (qe == null ? void 0 : qe.shapeId) === a.id ? ti(je) : ti(a.geometry), Fo = Le ? eo(o, Le) : Q ? eo(o, Q) : null, cn = Le && Fo ? oo(
|
|
2848
2858
|
Le.cursor,
|
|
2849
2859
|
o,
|
|
2850
2860
|
i,
|
|
2851
|
-
|
|
2861
|
+
Fo,
|
|
2852
2862
|
P(Ni),
|
|
2853
2863
|
An
|
|
2854
|
-
) : Q && Ge &&
|
|
2864
|
+
) : Q && Ge && Fo ? I : null, zo = L != null ? An.get(L) : void 0, Bo = !Le && !Q && Ge && (X || Tn(c) && L != null) ? I : null, oi = (U == null ? void 0 : U.edgeId) ?? ((cn == null ? void 0 : cn.type) === "edge" ? cn.edgeId : null), yo = oi == null ? null : i.find((a) => a.id === oi) ?? null, Ht = yo ? Tt.get(yo.fromAnchorId) : null, Xt = yo ? Tt.get(yo.toAnchorId) : null, On = (U == null ? void 0 : U.point) ?? ((cn == null ? void 0 : cn.type) === "edge" ? cn.point : null), ll = (Le == null ? void 0 : Le.origin) ?? (Q == null ? void 0 : Q.origin) ?? X ?? (Tn(c) && zo ? { x: zo.x, y: zo.y } : null), cl = Le != null ? (cn == null ? void 0 : cn.point) ?? Le.cursor : (cn == null ? void 0 : cn.point) ?? (Bo == null ? void 0 : Bo.point) ?? (U == null ? void 0 : U.point) ?? Ge, gt = Le != null || Q != null || X != null || Tn(c) && L != null && Ge != null ? qo(ll, cl) : null, jt = Pt(c) && Me.length > 0 ? qo(Me[Me.length - 1], Ge) : null, Yt = Pt(c) && Me.length >= 2 ? qo(Ge, Me[0]) : null;
|
|
2855
2865
|
return n ? /* @__PURE__ */ k(
|
|
2856
2866
|
"div",
|
|
2857
2867
|
{
|
|
2858
2868
|
ref: rn,
|
|
2859
2869
|
className: `eyeon-map-canvas${V ? " eyeon-map-canvas--grid" : ""}`,
|
|
2860
|
-
onPointerDownCapture:
|
|
2861
|
-
onPointerMoveCapture:
|
|
2870
|
+
onPointerDownCapture: nl,
|
|
2871
|
+
onPointerMoveCapture: tl,
|
|
2862
2872
|
onPointerUpCapture: qr,
|
|
2863
2873
|
onPointerCancelCapture: qr,
|
|
2864
2874
|
children: [
|
|
@@ -2870,10 +2880,10 @@ const Rs = Qi.forwardRef(
|
|
|
2870
2880
|
viewBox: `${tt.x} ${tt.y} ${tt.width} ${tt.height}`,
|
|
2871
2881
|
preserveAspectRatio: "xMidYMid meet",
|
|
2872
2882
|
style: {
|
|
2873
|
-
cursor: U && !Le ? "none" : R != null || Le || Ee != null && Ee.dragging ? "grabbing" : Ze ? "none" : c === "draw-text" ? "text" : c === "draw-entrance" ? "cell" : Un || qe ? "grabbing" : di(c) ? "grab" :
|
|
2883
|
+
cursor: U && !Le ? "none" : R != null || Le || Ee != null && Ee.dragging ? "grabbing" : Ze ? "none" : c === "draw-text" ? "text" : c === "draw-entrance" ? "cell" : Un || qe ? "grabbing" : di(c) ? "grab" : dr(c) && !z ? "cell" : void 0
|
|
2874
2884
|
},
|
|
2875
|
-
onPointerDown:
|
|
2876
|
-
onPointerMove:
|
|
2885
|
+
onPointerDown: ol,
|
|
2886
|
+
onPointerMove: rl,
|
|
2877
2887
|
onPointerUp: ni,
|
|
2878
2888
|
onPointerCancel: ni,
|
|
2879
2889
|
onPointerLeave: () => {
|
|
@@ -2897,7 +2907,7 @@ const Rs = Qi.forwardRef(
|
|
|
2897
2907
|
/* @__PURE__ */ k(
|
|
2898
2908
|
"pattern",
|
|
2899
2909
|
{
|
|
2900
|
-
id:
|
|
2910
|
+
id: Po,
|
|
2901
2911
|
patternUnits: "userSpaceOnUse",
|
|
2902
2912
|
width: 14,
|
|
2903
2913
|
height: 14,
|
|
@@ -2907,14 +2917,14 @@ const Rs = Qi.forwardRef(
|
|
|
2907
2917
|
]
|
|
2908
2918
|
}
|
|
2909
2919
|
),
|
|
2910
|
-
|
|
2920
|
+
Mo.length > 0 ? /* @__PURE__ */ l("clipPath", { id: Kr, children: Mo.map((a) => /* @__PURE__ */ l("path", { d: mo(a) }, a.id)) }) : null
|
|
2911
2921
|
] }),
|
|
2912
2922
|
Wr ? /* @__PURE__ */ l(
|
|
2913
2923
|
$a,
|
|
2914
2924
|
{
|
|
2915
2925
|
url: Wr,
|
|
2916
2926
|
imageProxyUrl: m,
|
|
2917
|
-
suppressIds:
|
|
2927
|
+
suppressIds: Gs,
|
|
2918
2928
|
theme: s
|
|
2919
2929
|
}
|
|
2920
2930
|
) : null,
|
|
@@ -2923,11 +2933,11 @@ const Rs = Qi.forwardRef(
|
|
|
2923
2933
|
return /* @__PURE__ */ l(
|
|
2924
2934
|
"path",
|
|
2925
2935
|
{
|
|
2926
|
-
d: a.geometry.paths.map((b) => b.d).join(" ") ||
|
|
2927
|
-
fill:
|
|
2936
|
+
d: a.geometry.paths.map((b) => b.d).join(" ") || tr(a.geometry.polygons),
|
|
2937
|
+
fill: Jo(
|
|
2928
2938
|
a,
|
|
2929
2939
|
s,
|
|
2930
|
-
|
|
2940
|
+
$o.get(a.id)
|
|
2931
2941
|
),
|
|
2932
2942
|
fillOpacity: _ ? 0.4 : f ? 0.22 : 0.32,
|
|
2933
2943
|
stroke: _ ? s.ACCENT_COLOR : "#94a3b8",
|
|
@@ -2940,23 +2950,23 @@ const Rs = Qi.forwardRef(
|
|
|
2940
2950
|
} : void 0,
|
|
2941
2951
|
onPointerMove: f ? (b) => Hr(b, a.kind) : void 0,
|
|
2942
2952
|
onPointerLeave: f ? () => {
|
|
2943
|
-
Vn((b) => b === a.id ? null : b),
|
|
2953
|
+
Vn((b) => b === a.id ? null : b), xe(null);
|
|
2944
2954
|
} : void 0,
|
|
2945
2955
|
onPointerDown: f ? (b) => {
|
|
2946
|
-
b.stopPropagation(),
|
|
2956
|
+
b.stopPropagation(), xe(null), q(a.id);
|
|
2947
2957
|
} : void 0
|
|
2948
2958
|
},
|
|
2949
2959
|
`base-${a.id}`
|
|
2950
2960
|
);
|
|
2951
2961
|
}),
|
|
2952
|
-
|
|
2962
|
+
Mo.length > 0 && A.length > 0 ? /* @__PURE__ */ l("g", { clipPath: `url(#${Kr})`, pointerEvents: "none", children: A.filter(Ci).map((a) => /* @__PURE__ */ l(
|
|
2953
2963
|
"path",
|
|
2954
2964
|
{
|
|
2955
|
-
d: a.geometry.paths.map((f) => f.d).join(" ") ||
|
|
2956
|
-
fill:
|
|
2965
|
+
d: a.geometry.paths.map((f) => f.d).join(" ") || tr(a.geometry.polygons),
|
|
2966
|
+
fill: Jo(
|
|
2957
2967
|
a,
|
|
2958
2968
|
s,
|
|
2959
|
-
|
|
2969
|
+
$o.get(a.id)
|
|
2960
2970
|
),
|
|
2961
2971
|
fillOpacity: 0.55,
|
|
2962
2972
|
stroke: "#94a3b8",
|
|
@@ -2965,7 +2975,7 @@ const Rs = Qi.forwardRef(
|
|
|
2965
2975
|
`below-${a.id}`
|
|
2966
2976
|
)) }) : null,
|
|
2967
2977
|
ot.map((a) => {
|
|
2968
|
-
const f =
|
|
2978
|
+
const f = Os(a.kind), _ = d === a.id, b = f && mt === a.id && !_, N = (qe == null ? void 0 : qe.shapeId) === a.id, M = mr(a), re = Ao(a), ce = M || re, pe = Pa({
|
|
2969
2979
|
tool: c,
|
|
2970
2980
|
selected: _,
|
|
2971
2981
|
highlightable: f,
|
|
@@ -2973,42 +2983,42 @@ const Rs = Qi.forwardRef(
|
|
|
2973
2983
|
wayfinding: se && !z && Si(a.kind) && !ce,
|
|
2974
2984
|
textLabel: M,
|
|
2975
2985
|
entranceIcon: re
|
|
2976
|
-
}) ?? (
|
|
2986
|
+
}) ?? (ur(c) || Xo(c) && !z ? void 0 : dr(c) ? "cell" : "default"), tn = (be) => {
|
|
2977
2987
|
var rt, Zt;
|
|
2978
2988
|
if (z || Q) return;
|
|
2979
2989
|
if (se && Li(n) && Si(a.kind) && !ce) {
|
|
2980
|
-
|
|
2981
|
-
const Jt = Qe(
|
|
2990
|
+
be.stopPropagation();
|
|
2991
|
+
const Jt = Qe(be.clientX, be.clientY);
|
|
2982
2992
|
De(a.id, Jt), T(null), $(null), ze({ shapeId: a.id, origin: Jt }), Be(Jt);
|
|
2983
2993
|
return;
|
|
2984
2994
|
}
|
|
2985
|
-
if (ce &&
|
|
2986
|
-
|
|
2995
|
+
if (ce && ur(c)) {
|
|
2996
|
+
be.stopPropagation(), q(a.id), ee == null || ee("select");
|
|
2987
2997
|
return;
|
|
2988
2998
|
}
|
|
2989
|
-
if (!
|
|
2990
|
-
|
|
2991
|
-
const an = Qe(
|
|
2999
|
+
if (!Xo(c)) return;
|
|
3000
|
+
be.stopPropagation();
|
|
3001
|
+
const an = Qe(be.clientX, be.clientY);
|
|
2992
3002
|
if (kt(c)) {
|
|
2993
|
-
if (jr(an,
|
|
2994
|
-
(!gi(a.kind) ||
|
|
3003
|
+
if (jr(an, be)) return;
|
|
3004
|
+
(!gi(a.kind) || !Do(an)) && q(a.id);
|
|
2995
3005
|
return;
|
|
2996
3006
|
}
|
|
2997
3007
|
if (po(an) || (q(a.id), c !== "select") || !(_ || f)) return;
|
|
2998
|
-
const Mt = Qe(
|
|
3008
|
+
const Mt = Qe(be.clientX, be.clientY), Gt = _ && je ? je : a.geometry;
|
|
2999
3009
|
ht({
|
|
3000
3010
|
shapeId: a.id,
|
|
3001
3011
|
start: Mt,
|
|
3002
3012
|
originGeometry: Gt
|
|
3003
|
-
}), ft({ x: 0, y: 0 }), (Zt = (rt =
|
|
3013
|
+
}), ft({ x: 0, y: 0 }), (Zt = (rt = be.currentTarget).setPointerCapture) == null || Zt.call(rt, be.pointerId);
|
|
3004
3014
|
}, Y = f ? {
|
|
3005
3015
|
onPointerEnter: () => Vn(a.id),
|
|
3006
|
-
onPointerLeave: () => Vn((
|
|
3016
|
+
onPointerLeave: () => Vn((be) => be === a.id ? null : be)
|
|
3007
3017
|
} : void 0;
|
|
3008
3018
|
if (re) {
|
|
3009
|
-
const
|
|
3019
|
+
const be = _ && je ? je : a.geometry, an = wn(be);
|
|
3010
3020
|
a.label.size ?? xt;
|
|
3011
|
-
const Rt = a.label.rotate ?? 0, { x: Mt, y: Gt } =
|
|
3021
|
+
const Rt = a.label.rotate ?? 0, { x: Mt, y: Gt } = yr(an), rt = Xl(
|
|
3012
3022
|
a.label.color ?? s.STORE_TEXT_COLOR
|
|
3013
3023
|
);
|
|
3014
3024
|
return /* @__PURE__ */ k(
|
|
@@ -3021,7 +3031,7 @@ const Rs = Qi.forwardRef(
|
|
|
3021
3031
|
/* @__PURE__ */ l(
|
|
3022
3032
|
"path",
|
|
3023
3033
|
{
|
|
3024
|
-
d: mo({ ...a, geometry:
|
|
3034
|
+
d: mo({ ...a, geometry: be }),
|
|
3025
3035
|
fill: "transparent",
|
|
3026
3036
|
stroke: _ || b ? s.ACCENT_COLOR : "transparent",
|
|
3027
3037
|
strokeWidth: _ || b ? 1.5 / ue : 0,
|
|
@@ -3044,8 +3054,8 @@ const Rs = Qi.forwardRef(
|
|
|
3044
3054
|
a.id
|
|
3045
3055
|
);
|
|
3046
3056
|
}
|
|
3047
|
-
if (
|
|
3048
|
-
const
|
|
3057
|
+
if (mr(a)) {
|
|
3058
|
+
const be = _ && je ? je : a.geometry, an = wn(be), Rt = a.label.size ?? bi(), Mt = a.label.rotate ?? 0, { x: Gt, y: rt } = yr(an), Zt = Cr(a.label.align), Jt = xl(an, Zt), ri = Cs(a.label.text ?? ""), ii = Rt * ws, al = ri.length * ii;
|
|
3049
3059
|
return /* @__PURE__ */ k(
|
|
3050
3060
|
"g",
|
|
3051
3061
|
{
|
|
@@ -3056,7 +3066,7 @@ const Rs = Qi.forwardRef(
|
|
|
3056
3066
|
/* @__PURE__ */ l(
|
|
3057
3067
|
"path",
|
|
3058
3068
|
{
|
|
3059
|
-
d: mo({ ...a, geometry:
|
|
3069
|
+
d: mo({ ...a, geometry: be }),
|
|
3060
3070
|
fill: "transparent",
|
|
3061
3071
|
stroke: _ || b ? s.ACCENT_COLOR : "transparent",
|
|
3062
3072
|
strokeWidth: _ || b ? 1.5 / ue : 0,
|
|
@@ -3066,19 +3076,19 @@ const Rs = Qi.forwardRef(
|
|
|
3066
3076
|
/* @__PURE__ */ l(
|
|
3067
3077
|
"text",
|
|
3068
3078
|
{
|
|
3069
|
-
fontFamily:
|
|
3079
|
+
fontFamily: xs,
|
|
3070
3080
|
fontSize: Rt,
|
|
3071
3081
|
fill: a.label.color ?? s.STORE_TEXT_COLOR,
|
|
3072
|
-
textAnchor:
|
|
3082
|
+
textAnchor: wl(Zt),
|
|
3073
3083
|
style: { userSelect: "none", cursor: pe ?? "pointer" },
|
|
3074
3084
|
onPointerDown: tn,
|
|
3075
|
-
children: ri.map((
|
|
3085
|
+
children: ri.map((dl, si) => /* @__PURE__ */ l(
|
|
3076
3086
|
"tspan",
|
|
3077
3087
|
{
|
|
3078
3088
|
x: Jt,
|
|
3079
|
-
y: rt -
|
|
3089
|
+
y: rt - al / 2 + (si + 0.5) * ii,
|
|
3080
3090
|
dominantBaseline: "central",
|
|
3081
|
-
children:
|
|
3091
|
+
children: dl || " "
|
|
3082
3092
|
},
|
|
3083
3093
|
si
|
|
3084
3094
|
))
|
|
@@ -3094,10 +3104,10 @@ const Rs = Qi.forwardRef(
|
|
|
3094
3104
|
"path",
|
|
3095
3105
|
{
|
|
3096
3106
|
d: mo(a),
|
|
3097
|
-
fill: Ne ? `url(#${
|
|
3107
|
+
fill: Ne ? `url(#${Po})` : Jo(
|
|
3098
3108
|
a,
|
|
3099
3109
|
s,
|
|
3100
|
-
|
|
3110
|
+
$o.get(a.id)
|
|
3101
3111
|
),
|
|
3102
3112
|
fillOpacity: Ne ? 1 : Da(
|
|
3103
3113
|
a.kind,
|
|
@@ -3114,7 +3124,7 @@ const Rs = Qi.forwardRef(
|
|
|
3114
3124
|
a.id
|
|
3115
3125
|
);
|
|
3116
3126
|
}),
|
|
3117
|
-
|
|
3127
|
+
Xo(c) && G && !io(G) && Ae(je ?? G.geometry).map(
|
|
3118
3128
|
(a, f) => {
|
|
3119
3129
|
const _ = Pn(a), b = [];
|
|
3120
3130
|
for (let N = 0; N < _; N++) {
|
|
@@ -3357,20 +3367,20 @@ const Rs = Qi.forwardRef(
|
|
|
3357
3367
|
{
|
|
3358
3368
|
cx: Y.x,
|
|
3359
3369
|
cy: Y.y,
|
|
3360
|
-
r: P(
|
|
3370
|
+
r: P(nr),
|
|
3361
3371
|
hitR: P(to),
|
|
3362
3372
|
fill: "#fff",
|
|
3363
3373
|
stroke: s.ACCENT_COLOR,
|
|
3364
3374
|
strokeWidth: P(Yn),
|
|
3365
3375
|
cursor: "grab",
|
|
3366
3376
|
onPointerDown: (H) => {
|
|
3367
|
-
var Ne,
|
|
3377
|
+
var Ne, be;
|
|
3368
3378
|
st(c) && (H.stopPropagation(), hn(null), nn(null), vn(null), sn({
|
|
3369
3379
|
type: "bend",
|
|
3370
3380
|
shapeId: G.id,
|
|
3371
3381
|
ringIndex: f,
|
|
3372
3382
|
edgeIndex: N
|
|
3373
|
-
}), (
|
|
3383
|
+
}), (be = (Ne = H.currentTarget).setPointerCapture) == null || be.call(Ne, H.pointerId));
|
|
3374
3384
|
}
|
|
3375
3385
|
},
|
|
3376
3386
|
`bend-${G.id}-${f}-${N}`
|
|
@@ -3499,12 +3509,12 @@ const Rs = Qi.forwardRef(
|
|
|
3499
3509
|
{
|
|
3500
3510
|
cx: gt.to.x,
|
|
3501
3511
|
cy: gt.to.y,
|
|
3502
|
-
r: P(cn ? Ei :
|
|
3512
|
+
r: P(cn ? Ei : Qo),
|
|
3503
3513
|
hitR: P(Ai),
|
|
3504
3514
|
fill: cn ? "#22c55e" : s.ACCENT_COLOR,
|
|
3505
3515
|
fillOpacity: 0.85,
|
|
3506
3516
|
stroke: "#fff",
|
|
3507
|
-
strokeWidth: P(
|
|
3517
|
+
strokeWidth: P(er),
|
|
3508
3518
|
cursor: "grabbing"
|
|
3509
3519
|
}
|
|
3510
3520
|
)
|
|
@@ -3514,24 +3524,24 @@ const Rs = Qi.forwardRef(
|
|
|
3514
3524
|
{
|
|
3515
3525
|
cx: X.x,
|
|
3516
3526
|
cy: X.y,
|
|
3517
|
-
r: P(
|
|
3527
|
+
r: P(Qo),
|
|
3518
3528
|
hitR: P(Ai),
|
|
3519
3529
|
fill: "#0f172a",
|
|
3520
3530
|
fillOpacity: 1,
|
|
3521
3531
|
stroke: "#fff",
|
|
3522
|
-
strokeWidth: P(
|
|
3532
|
+
strokeWidth: P(er),
|
|
3523
3533
|
cursor: "default"
|
|
3524
3534
|
}
|
|
3525
3535
|
),
|
|
3526
3536
|
se && o.filter((a) => Li(n) || a.shapeId == null).map((a) => {
|
|
3527
|
-
const f = u.includes(a.id), _ =
|
|
3537
|
+
const f = u.includes(a.id), _ = Ro === a.id, b = a.shapeId != null, N = qs.has(a.id), M = Tt.get(a.id) ?? a, re = f && u.some((pe) => {
|
|
3528
3538
|
if (pe === a.id) return !1;
|
|
3529
3539
|
const tn = An.get(pe);
|
|
3530
3540
|
return tn && Math.hypot(
|
|
3531
3541
|
tn.x - M.x,
|
|
3532
3542
|
tn.y - M.y
|
|
3533
3543
|
) <= 2.5;
|
|
3534
|
-
}), ce = f || b ? Ei :
|
|
3544
|
+
}), ce = f || b ? Ei : Qo;
|
|
3535
3545
|
return /* @__PURE__ */ l("g", { children: /* @__PURE__ */ l(
|
|
3536
3546
|
Fn,
|
|
3537
3547
|
{
|
|
@@ -3542,7 +3552,7 @@ const Rs = Qi.forwardRef(
|
|
|
3542
3552
|
fill: re ? "#22c55e" : b ? _ ? "#f97316" : Ga : f ? _ ? "#3b82f6" : s.ACCENT_COLOR : _ ? "#334155" : "#0f172a",
|
|
3543
3553
|
fillOpacity: 1,
|
|
3544
3554
|
stroke: f && b ? s.ACCENT_COLOR : "#fff",
|
|
3545
|
-
strokeWidth: P(
|
|
3555
|
+
strokeWidth: P(er),
|
|
3546
3556
|
cursor: z ? "default" : R === a.id ? "grabbing" : "pointer",
|
|
3547
3557
|
onPointerEnter: () => {
|
|
3548
3558
|
z || g(a.id);
|
|
@@ -3552,7 +3562,7 @@ const Rs = Qi.forwardRef(
|
|
|
3552
3562
|
pe.stopPropagation(), pe.preventDefault(), ei(a.id);
|
|
3553
3563
|
},
|
|
3554
3564
|
onPointerDown: (pe) => {
|
|
3555
|
-
var Ne,
|
|
3565
|
+
var Ne, be;
|
|
3556
3566
|
if (pe.stopPropagation(), z || !se) return;
|
|
3557
3567
|
if (pe.detail >= 2) {
|
|
3558
3568
|
ei(a.id);
|
|
@@ -3611,7 +3621,7 @@ const Rs = Qi.forwardRef(
|
|
|
3611
3621
|
), Z(a.id), C({
|
|
3612
3622
|
x: M.x,
|
|
3613
3623
|
y: M.y
|
|
3614
|
-
}), (
|
|
3624
|
+
}), (be = (Ne = pe.currentTarget).setPointerCapture) == null || be.call(Ne, pe.pointerId);
|
|
3615
3625
|
}
|
|
3616
3626
|
}
|
|
3617
3627
|
) }, a.id);
|
|
@@ -3637,7 +3647,7 @@ const Rs = Qi.forwardRef(
|
|
|
3637
3647
|
(pe) => (pe == null ? void 0 : pe.shapeId) === a.id && pe.ringIndex === N && pe.edgeIndex === re ? null : pe
|
|
3638
3648
|
),
|
|
3639
3649
|
onPointerDown: (pe) => {
|
|
3640
|
-
pe.stopPropagation(),
|
|
3650
|
+
pe.stopPropagation(), Do(Qe(pe.clientX, pe.clientY));
|
|
3641
3651
|
}
|
|
3642
3652
|
},
|
|
3643
3653
|
`sj-hit-${a.id}-${N}-${re}`
|
|
@@ -3691,7 +3701,7 @@ const Rs = Qi.forwardRef(
|
|
|
3691
3701
|
{
|
|
3692
3702
|
cx: f.p1.x,
|
|
3693
3703
|
cy: f.p1.y,
|
|
3694
|
-
r: P(
|
|
3704
|
+
r: P(nr),
|
|
3695
3705
|
fill: "#fff",
|
|
3696
3706
|
stroke: s.ACCENT_COLOR,
|
|
3697
3707
|
strokeWidth: P(Yn)
|
|
@@ -3702,7 +3712,7 @@ const Rs = Qi.forwardRef(
|
|
|
3702
3712
|
{
|
|
3703
3713
|
cx: f.p2.x,
|
|
3704
3714
|
cy: f.p2.y,
|
|
3705
|
-
r: P(
|
|
3715
|
+
r: P(nr),
|
|
3706
3716
|
fill: "#fff",
|
|
3707
3717
|
stroke: s.ACCENT_COLOR,
|
|
3708
3718
|
strokeWidth: P(Yn)
|
|
@@ -3735,7 +3745,7 @@ const Rs = Qi.forwardRef(
|
|
|
3735
3745
|
);
|
|
3736
3746
|
})(),
|
|
3737
3747
|
O.length > 1 && Dt(c) && (() => {
|
|
3738
|
-
const a =
|
|
3748
|
+
const a = bs(
|
|
3739
3749
|
O[0],
|
|
3740
3750
|
O[O.length - 1],
|
|
3741
3751
|
pn
|
|
@@ -3747,7 +3757,7 @@ const Rs = Qi.forwardRef(
|
|
|
3747
3757
|
cy: a.cy,
|
|
3748
3758
|
rx: Math.max(a.rx, 0),
|
|
3749
3759
|
ry: Math.max(a.ry, 0),
|
|
3750
|
-
fill: c === "draw-void-circle" ? `url(#${
|
|
3760
|
+
fill: c === "draw-void-circle" ? `url(#${Po})` : s.STORE_DEFAULT_COLOR,
|
|
3751
3761
|
fillOpacity: c === "draw-void-circle" ? 1 : 0.2,
|
|
3752
3762
|
stroke: s.ACCENT_COLOR,
|
|
3753
3763
|
strokeWidth: 2 / ue,
|
|
@@ -3858,7 +3868,7 @@ const Rs = Qi.forwardRef(
|
|
|
3858
3868
|
) : /* @__PURE__ */ l("div", { className: `eyeon-map-canvas${V ? " eyeon-map-canvas--grid" : ""}`, children: /* @__PURE__ */ l("div", { className: "eyeon-map-canvas__empty", children: B }) });
|
|
3859
3869
|
}
|
|
3860
3870
|
);
|
|
3861
|
-
|
|
3871
|
+
Ms.displayName = "EditorCanvas";
|
|
3862
3872
|
const Qa = [
|
|
3863
3873
|
{ prefix: "escalator", family: "escalator" },
|
|
3864
3874
|
{ prefix: "elevator", family: "elevator" },
|
|
@@ -3914,13 +3924,13 @@ function nd(e, n) {
|
|
|
3914
3924
|
}
|
|
3915
3925
|
function td(e) {
|
|
3916
3926
|
var o;
|
|
3917
|
-
const n =
|
|
3927
|
+
const n = Cl(e.geometry);
|
|
3918
3928
|
return Number.isFinite(n.x) && Number.isFinite(n.y) ? n : ((o = e.geometry.polygons[0]) == null ? void 0 : o[0]) ?? { x: 0, y: 0 };
|
|
3919
3929
|
}
|
|
3920
3930
|
function od(e, n, t) {
|
|
3921
3931
|
return t || (n > e ? "up" : n < e ? "down" : "both");
|
|
3922
3932
|
}
|
|
3923
|
-
function
|
|
3933
|
+
function Ps(e, n) {
|
|
3924
3934
|
for (const t of n) {
|
|
3925
3935
|
const o = Rn(t.sourceSvgId) ?? Rn(t.key);
|
|
3926
3936
|
if (o) {
|
|
@@ -3955,7 +3965,7 @@ function Bi(e, n) {
|
|
|
3955
3965
|
const t = new Set(e.map((o) => o.levelId));
|
|
3956
3966
|
return n.filter((o) => t.has(o.id)).slice().sort((o, i) => o.ordering - i.ordering || o.levelIndex - i.levelIndex);
|
|
3957
3967
|
}
|
|
3958
|
-
function
|
|
3968
|
+
function Ds(e, n, t, o) {
|
|
3959
3969
|
const i = n.filter((p) => p.connectorId === e), r = new Set(i.map((p) => p.id)), s = t.find(
|
|
3960
3970
|
(p) => p.kind === "connector" && p.directed && r.has(p.fromAnchorId) && r.has(p.toAnchorId)
|
|
3961
3971
|
);
|
|
@@ -3963,18 +3973,18 @@ function Ps(e, n, t, o) {
|
|
|
3963
3973
|
const c = n.find((p) => p.id === s.fromAnchorId), d = n.find((p) => p.id === s.toAnchorId), u = o.find((p) => p.id === (c == null ? void 0 : c.shapeId)), h = o.find((p) => p.id === (d == null ? void 0 : d.shapeId));
|
|
3964
3974
|
return !u || !h ? null : { from: u, to: h };
|
|
3965
3975
|
}
|
|
3966
|
-
function
|
|
3976
|
+
function kr(e, n) {
|
|
3967
3977
|
var t;
|
|
3968
3978
|
return ((t = n.find((o) => o.id === e)) == null ? void 0 : t.name) ?? "Floor";
|
|
3969
3979
|
}
|
|
3970
3980
|
function id(e, n) {
|
|
3971
|
-
return `${
|
|
3981
|
+
return `${kr(e.levelId, n)} · ${e.key}`;
|
|
3972
3982
|
}
|
|
3973
3983
|
function sd(e, n, t, o) {
|
|
3974
3984
|
const i = [];
|
|
3975
3985
|
for (const r of e) {
|
|
3976
3986
|
if (r.kind !== "escalator") continue;
|
|
3977
|
-
const s =
|
|
3987
|
+
const s = Ds(r.id, n, t, o);
|
|
3978
3988
|
if (s) {
|
|
3979
3989
|
i.push({ connectorId: r.id, from: s.from, to: s.to });
|
|
3980
3990
|
continue;
|
|
@@ -3989,12 +3999,12 @@ function ld(e, n) {
|
|
|
3989
3999
|
{
|
|
3990
4000
|
shapeId: e.from.id,
|
|
3991
4001
|
key: e.from.key,
|
|
3992
|
-
levelName:
|
|
4002
|
+
levelName: kr(e.from.levelId, n)
|
|
3993
4003
|
},
|
|
3994
4004
|
{
|
|
3995
4005
|
shapeId: e.to.id,
|
|
3996
4006
|
key: e.to.key,
|
|
3997
|
-
levelName:
|
|
4007
|
+
levelName: kr(e.to.levelId, n)
|
|
3998
4008
|
}
|
|
3999
4009
|
];
|
|
4000
4010
|
}
|
|
@@ -4002,7 +4012,7 @@ function cd(e, n, t, o, i, r = []) {
|
|
|
4002
4012
|
const s = Ct(e.id, n, o);
|
|
4003
4013
|
if (!s) return null;
|
|
4004
4014
|
if (s.kind === "escalator") {
|
|
4005
|
-
const h =
|
|
4015
|
+
const h = Ds(s.id, n, t, i);
|
|
4006
4016
|
if (h)
|
|
4007
4017
|
return `${h.from.key} → ${h.to.key}`;
|
|
4008
4018
|
const p = zi(e.id, n, o, i);
|
|
@@ -4021,12 +4031,12 @@ function cd(e, n, t, o, i, r = []) {
|
|
|
4021
4031
|
return y - m;
|
|
4022
4032
|
}).map((h) => id(h, r)).join(" ↔ ");
|
|
4023
4033
|
}
|
|
4024
|
-
function
|
|
4034
|
+
function $s(e, n) {
|
|
4025
4035
|
return e.filter(
|
|
4026
4036
|
(t) => t.kind === "connector" && n.has(t.fromAnchorId) && n.has(t.toAnchorId)
|
|
4027
4037
|
);
|
|
4028
4038
|
}
|
|
4029
|
-
function
|
|
4039
|
+
function _r(e, n, t, o) {
|
|
4030
4040
|
const i = nd(n.id, e.anchors), r = i ? { x: i.x, y: i.y } : td(n);
|
|
4031
4041
|
if (i) {
|
|
4032
4042
|
if (i.connectorId !== t || i.kind !== "connector") {
|
|
@@ -4050,7 +4060,7 @@ function vr(e, n, t, o) {
|
|
|
4050
4060
|
};
|
|
4051
4061
|
return o.push({ op: "upsert_anchor", anchor: s }), e.anchors = [...e.anchors, s], s;
|
|
4052
4062
|
}
|
|
4053
|
-
function
|
|
4063
|
+
function vr(e, n, t) {
|
|
4054
4064
|
const o = rd(e.anchors, n.levelId, n, /* @__PURE__ */ new Set([n.id]));
|
|
4055
4065
|
if (!o || e.edges.some(
|
|
4056
4066
|
(s) => s.fromAnchorId === n.id && s.toAnchorId === o.id || s.fromAnchorId === o.id && s.toAnchorId === n.id
|
|
@@ -4069,7 +4079,7 @@ function Ir(e, n, t) {
|
|
|
4069
4079
|
}
|
|
4070
4080
|
function Ar(e, n) {
|
|
4071
4081
|
const t = e.anchors.filter((r) => r.connectorId === n), o = new Set(t.map((r) => r.id)), i = [];
|
|
4072
|
-
for (const r of
|
|
4082
|
+
for (const r of $s(e.edges, o))
|
|
4073
4083
|
i.push({ op: "delete_edge", edgeId: r.id });
|
|
4074
4084
|
e.edges = e.edges.filter(
|
|
4075
4085
|
(r) => !(r.kind === "connector" && o.has(r.fromAnchorId) && o.has(r.toAnchorId))
|
|
@@ -4095,7 +4105,7 @@ function dd(e, n, t, o) {
|
|
|
4095
4105
|
(i == null ? void 0 : i.levelIndex) ?? 0,
|
|
4096
4106
|
(r == null ? void 0 : r.levelIndex) ?? 0,
|
|
4097
4107
|
((A = Rn(n.sourceSvgId)) == null ? void 0 : A.direction) ?? ((S = Rn(t.sourceSvgId)) == null ? void 0 : S.direction)
|
|
4098
|
-
), c =
|
|
4108
|
+
), c = Ps("escalator", [n, t]), d = Bt(n.id, e.anchors), u = Bt(t.id, e.anchors), h = [], p = {
|
|
4099
4109
|
...e,
|
|
4100
4110
|
anchors: e.anchors.slice(),
|
|
4101
4111
|
edges: e.edges.slice(),
|
|
@@ -4112,8 +4122,8 @@ function dd(e, n, t, o) {
|
|
|
4112
4122
|
accessible: !1
|
|
4113
4123
|
};
|
|
4114
4124
|
h.push({ op: "upsert_connector", connector: m }), p.connectors = [...p.connectors, m];
|
|
4115
|
-
const E =
|
|
4116
|
-
return
|
|
4125
|
+
const E = _r(p, n, y, h), x = _r(p, t, y, h);
|
|
4126
|
+
return vr(p, E, h), vr(p, x, h), h.push({
|
|
4117
4127
|
op: "upsert_edge",
|
|
4118
4128
|
edge: {
|
|
4119
4129
|
id: p.allocId(),
|
|
@@ -4141,7 +4151,7 @@ function ud(e, n, t) {
|
|
|
4141
4151
|
for (const y of c) {
|
|
4142
4152
|
if (y === d) {
|
|
4143
4153
|
const m = s.anchors.filter((x) => x.connectorId === y), E = new Set(m.map((x) => x.id));
|
|
4144
|
-
for (const x of
|
|
4154
|
+
for (const x of $s(s.edges, E))
|
|
4145
4155
|
r.push({ op: "delete_edge", edgeId: x.id }), s.edges = s.edges.filter((A) => A.id !== x.id);
|
|
4146
4156
|
continue;
|
|
4147
4157
|
}
|
|
@@ -4151,13 +4161,13 @@ function ud(e, n, t) {
|
|
|
4151
4161
|
id: u,
|
|
4152
4162
|
mapId: s.mapId,
|
|
4153
4163
|
kind: "elevator",
|
|
4154
|
-
name: (t == null ? void 0 : t.name) ??
|
|
4164
|
+
name: (t == null ? void 0 : t.name) ?? Ps("elevator", i),
|
|
4155
4165
|
direction: "both",
|
|
4156
4166
|
accessible: (t == null ? void 0 : t.accessible) ?? !0
|
|
4157
4167
|
};
|
|
4158
4168
|
r.push({ op: "upsert_connector", connector: h });
|
|
4159
|
-
const p = i.map((y) =>
|
|
4160
|
-
for (const y of p)
|
|
4169
|
+
const p = i.map((y) => _r(s, y, u, r));
|
|
4170
|
+
for (const y of p) vr(s, y, r);
|
|
4161
4171
|
for (let y = 0; y < p.length; y++)
|
|
4162
4172
|
for (let m = y + 1; m < p.length; m++)
|
|
4163
4173
|
r.push({
|
|
@@ -4202,7 +4212,7 @@ function pd(e, n, t) {
|
|
|
4202
4212
|
}
|
|
4203
4213
|
function Ki(e) {
|
|
4204
4214
|
const n = ((e == null ? void 0 : e.polygons) ?? []).flat();
|
|
4205
|
-
return
|
|
4215
|
+
return Sl(n);
|
|
4206
4216
|
}
|
|
4207
4217
|
function Vi(e, n, t, o) {
|
|
4208
4218
|
return e.some(
|
|
@@ -4368,7 +4378,7 @@ function md(e, n) {
|
|
|
4368
4378
|
function yd(e) {
|
|
4369
4379
|
let n = !1;
|
|
4370
4380
|
const t = e.shapes.map((o) => {
|
|
4371
|
-
const i =
|
|
4381
|
+
const i = Nl(o.geometry);
|
|
4372
4382
|
return i === o.geometry ? o : (n = !0, { ...o, geometry: i, bbox: wn(i) });
|
|
4373
4383
|
});
|
|
4374
4384
|
return n ? { ...e, shapes: t } : e;
|
|
@@ -4499,7 +4509,7 @@ function Lt(e) {
|
|
|
4499
4509
|
let t = n[1].toLowerCase();
|
|
4500
4510
|
return t.length === 3 && (t = t.split("").map((o) => o + o).join("")), `#${t}`;
|
|
4501
4511
|
}
|
|
4502
|
-
function
|
|
4512
|
+
function or(e) {
|
|
4503
4513
|
return Lt(e) ?? "#000000";
|
|
4504
4514
|
}
|
|
4505
4515
|
function Hi(e, n) {
|
|
@@ -4523,7 +4533,7 @@ function ct({
|
|
|
4523
4533
|
(!h.current || p.current) && (u(String(n)), p.current = !1);
|
|
4524
4534
|
}, [n]);
|
|
4525
4535
|
const y = (m, E) => {
|
|
4526
|
-
const x = E ?
|
|
4536
|
+
const x = E ? El(m) : { display: m, render: cr(m).render };
|
|
4527
4537
|
u(x.display), i(x.render);
|
|
4528
4538
|
};
|
|
4529
4539
|
return /* @__PURE__ */ k("div", { className: "eyeon-map-assign__row", children: [
|
|
@@ -4597,7 +4607,7 @@ function Tr({
|
|
|
4597
4607
|
onPick: d
|
|
4598
4608
|
}) {
|
|
4599
4609
|
const [u, h] = K(!1), p = ie(null), y = ie(null), m = ie(null), E = ie(
|
|
4600
|
-
|
|
4610
|
+
or(o || t)
|
|
4601
4611
|
), x = Mn(t) || r && !n.trim(), [A, S] = K(null);
|
|
4602
4612
|
ae(() => {
|
|
4603
4613
|
const w = Lt(t);
|
|
@@ -4615,7 +4625,7 @@ function Tr({
|
|
|
4615
4625
|
document.removeEventListener("pointerdown", w), document.removeEventListener("keydown", z), document.removeEventListener("scroll", B, !0);
|
|
4616
4626
|
};
|
|
4617
4627
|
}, [u]);
|
|
4618
|
-
const V =
|
|
4628
|
+
const V = or(x ? E.current : t);
|
|
4619
4629
|
return /* @__PURE__ */ k("div", { className: "eyeon-map-assign__swatch", ref: p, children: [
|
|
4620
4630
|
/* @__PURE__ */ l(
|
|
4621
4631
|
"input",
|
|
@@ -4641,7 +4651,7 @@ function Tr({
|
|
|
4641
4651
|
"aria-label": e,
|
|
4642
4652
|
"aria-expanded": u,
|
|
4643
4653
|
"aria-haspopup": "dialog",
|
|
4644
|
-
style: x ? void 0 : { backgroundColor:
|
|
4654
|
+
style: x ? void 0 : { backgroundColor: or(t) },
|
|
4645
4655
|
onClick: (w) => {
|
|
4646
4656
|
if (u) {
|
|
4647
4657
|
h(!1);
|
|
@@ -4798,7 +4808,7 @@ const xd = {
|
|
|
4798
4808
|
center: /* @__PURE__ */ l(Id, {}),
|
|
4799
4809
|
right: /* @__PURE__ */ l(bd, {})
|
|
4800
4810
|
};
|
|
4801
|
-
function
|
|
4811
|
+
function Fs({
|
|
4802
4812
|
value: e,
|
|
4803
4813
|
disabled: n,
|
|
4804
4814
|
onChange: t
|
|
@@ -4806,7 +4816,7 @@ function $s({
|
|
|
4806
4816
|
const o = Cr(e);
|
|
4807
4817
|
return /* @__PURE__ */ k("div", { className: "eyeon-map-assign__row", children: [
|
|
4808
4818
|
/* @__PURE__ */ l("span", { className: "eyeon-map-assign__label", children: "Alignment" }),
|
|
4809
|
-
/* @__PURE__ */ l("div", { className: "eyeon-map-assign__align", role: "group", "aria-label": "Alignment", children:
|
|
4819
|
+
/* @__PURE__ */ l("div", { className: "eyeon-map-assign__align", role: "group", "aria-label": "Alignment", children: Ll.map((i) => /* @__PURE__ */ l(
|
|
4810
4820
|
"button",
|
|
4811
4821
|
{
|
|
4812
4822
|
type: "button",
|
|
@@ -4848,7 +4858,7 @@ function Mr(e) {
|
|
|
4848
4858
|
function Lo(e, n) {
|
|
4849
4859
|
return Number.isFinite(e) ? n > 0 ? Math.floor(e) + n : Number.isInteger(e) ? e + n : Math.floor(e) : n;
|
|
4850
4860
|
}
|
|
4851
|
-
function
|
|
4861
|
+
function zs({
|
|
4852
4862
|
form: e,
|
|
4853
4863
|
canEdit: n,
|
|
4854
4864
|
storeDefaultColor: t,
|
|
@@ -4960,7 +4970,7 @@ function Fs({
|
|
|
4960
4970
|
) : null
|
|
4961
4971
|
] });
|
|
4962
4972
|
}
|
|
4963
|
-
function
|
|
4973
|
+
function rr(e, n) {
|
|
4964
4974
|
return {
|
|
4965
4975
|
...n ? Jn(n, "connector") : $t(e.id, "connector"),
|
|
4966
4976
|
shapeId: e.id,
|
|
@@ -4987,14 +4997,14 @@ function wd({
|
|
|
4987
4997
|
), [A, S] = K(
|
|
4988
4998
|
m ? String(m.levelId) : ""
|
|
4989
4999
|
), [V, w] = K(m ? String(m.id) : ""), [z, B] = K(""), [q, W] = K(
|
|
4990
|
-
() =>
|
|
5000
|
+
() => rr(e, i)
|
|
4991
5001
|
), D = ie(q);
|
|
4992
5002
|
D.current = q, ae(() => {
|
|
4993
|
-
W(
|
|
5003
|
+
W(rr(e, i));
|
|
4994
5004
|
}, [e, i]);
|
|
4995
5005
|
const te = fn(
|
|
4996
5006
|
(F) => {
|
|
4997
|
-
const ee =
|
|
5007
|
+
const ee = rr(e, {
|
|
4998
5008
|
...D.current,
|
|
4999
5009
|
...F,
|
|
5000
5010
|
shapeId: e.id
|
|
@@ -5035,7 +5045,7 @@ function wd({
|
|
|
5035
5045
|
value: String(de.id),
|
|
5036
5046
|
label: de.key,
|
|
5037
5047
|
hint: se ? "Linked" : void 0,
|
|
5038
|
-
iconUrl:
|
|
5048
|
+
iconUrl: is(ee, se),
|
|
5039
5049
|
iconMuted: !se
|
|
5040
5050
|
};
|
|
5041
5051
|
});
|
|
@@ -5182,7 +5192,7 @@ function wd({
|
|
|
5182
5192
|
d ? /* @__PURE__ */ k("div", { className: "eyeon-map-assign", children: [
|
|
5183
5193
|
/* @__PURE__ */ l("div", { className: "eyeon-map-inspector__heading", children: "Design" }),
|
|
5184
5194
|
/* @__PURE__ */ l(
|
|
5185
|
-
|
|
5195
|
+
zs,
|
|
5186
5196
|
{
|
|
5187
5197
|
form: q,
|
|
5188
5198
|
canEdit: o,
|
|
@@ -5195,7 +5205,7 @@ function wd({
|
|
|
5195
5205
|
] }) : null
|
|
5196
5206
|
] });
|
|
5197
5207
|
}
|
|
5198
|
-
const
|
|
5208
|
+
const Bs = {
|
|
5199
5209
|
unit: "Store",
|
|
5200
5210
|
amenity: "Amenity",
|
|
5201
5211
|
kiosk_screen: "Kiosk",
|
|
@@ -5213,21 +5223,21 @@ const zs = {
|
|
|
5213
5223
|
green_area: "Green area",
|
|
5214
5224
|
water: "Water",
|
|
5215
5225
|
parking_icon: "Parking icon"
|
|
5216
|
-
},
|
|
5226
|
+
}, ir = [
|
|
5217
5227
|
"unit",
|
|
5218
5228
|
"amenity",
|
|
5219
5229
|
"kiosk_screen",
|
|
5220
5230
|
"connector",
|
|
5221
5231
|
"void"
|
|
5222
5232
|
], Cd = ["label", "wall"];
|
|
5223
|
-
function
|
|
5233
|
+
function Ws(e) {
|
|
5224
5234
|
return !Cd.includes(e);
|
|
5225
5235
|
}
|
|
5226
5236
|
function Nd(e) {
|
|
5227
|
-
return e && !
|
|
5237
|
+
return e && !ir.includes(e) && Ws(e) ? [...ir, e] : ir;
|
|
5228
5238
|
}
|
|
5229
5239
|
function Sd(e) {
|
|
5230
|
-
return
|
|
5240
|
+
return Bs[e] ?? e;
|
|
5231
5241
|
}
|
|
5232
5242
|
const Ld = [
|
|
5233
5243
|
"unit",
|
|
@@ -5255,11 +5265,11 @@ function Td(e) {
|
|
|
5255
5265
|
function Rd(e) {
|
|
5256
5266
|
return ts(e);
|
|
5257
5267
|
}
|
|
5258
|
-
function
|
|
5268
|
+
function Ks(e) {
|
|
5259
5269
|
return new Map(e.map((n) => [n.shapeId, n]));
|
|
5260
5270
|
}
|
|
5261
5271
|
function Md(e, n) {
|
|
5262
|
-
const t =
|
|
5272
|
+
const t = Ks(n), o = [], i = [], r = [], s = [], c = [], d = [], u = [];
|
|
5263
5273
|
for (const h of e) {
|
|
5264
5274
|
if (h.orphanedAt) continue;
|
|
5265
5275
|
const p = t.get(h.id) ?? null;
|
|
@@ -5275,11 +5285,11 @@ function Md(e, n) {
|
|
|
5275
5285
|
unassigned: u
|
|
5276
5286
|
};
|
|
5277
5287
|
}
|
|
5278
|
-
function
|
|
5288
|
+
function Vs(e) {
|
|
5279
5289
|
return e === "kiosk_screen";
|
|
5280
5290
|
}
|
|
5281
5291
|
function Pd(e) {
|
|
5282
|
-
return e.filter((n) =>
|
|
5292
|
+
return e.filter((n) => Vs(n.kind) && !n.orphanedAt);
|
|
5283
5293
|
}
|
|
5284
5294
|
function Dd(e) {
|
|
5285
5295
|
return Pd(e).map((n) => ({
|
|
@@ -5323,13 +5333,13 @@ function Wd(e) {
|
|
|
5323
5333
|
function Kd(e, n) {
|
|
5324
5334
|
return Wd(e) && n > 0;
|
|
5325
5335
|
}
|
|
5326
|
-
function
|
|
5327
|
-
const n = e.filter((o) => o.kind === "outdoor"), t =
|
|
5336
|
+
function Us(e) {
|
|
5337
|
+
const n = e.filter((o) => o.kind === "outdoor"), t = e.filter((o) => o.kind === "floor").slice().sort(os).reverse();
|
|
5328
5338
|
return [...n, ...t];
|
|
5329
5339
|
}
|
|
5330
5340
|
function Vd(e, n) {
|
|
5331
5341
|
const t = new Map(
|
|
5332
|
-
|
|
5342
|
+
Us(n).map((o, i) => [o.id, i])
|
|
5333
5343
|
);
|
|
5334
5344
|
return e.slice().sort((o, i) => {
|
|
5335
5345
|
const r = t.get(o.levelId) ?? Number.POSITIVE_INFINITY, s = t.get(i.levelId) ?? Number.POSITIVE_INFINITY;
|
|
@@ -5361,7 +5371,7 @@ function jd(e, n, t, o) {
|
|
|
5361
5371
|
function Yd(e, n, t, o) {
|
|
5362
5372
|
return e < 0 || n === e || t <= 0 ? null : n < e ? n * t : n * t + o;
|
|
5363
5373
|
}
|
|
5364
|
-
function
|
|
5374
|
+
function sr(e, n) {
|
|
5365
5375
|
return e.length === n.length && e.every((t, o) => t === n[o]);
|
|
5366
5376
|
}
|
|
5367
5377
|
function vo(e) {
|
|
@@ -5432,7 +5442,7 @@ function qd({
|
|
|
5432
5442
|
() => e.find((R) => R.kind === "outdoor") ?? null,
|
|
5433
5443
|
[e]
|
|
5434
5444
|
), $e = !!(he != null && he.sourceSvgKey || he != null && he.sourceSvgUrl), rn = (R) => (t == null ? void 0 : t[R]) ?? 0, un = me(
|
|
5435
|
-
() => e.filter((R) => R.kind === "floor").slice().sort(
|
|
5445
|
+
() => e.filter((R) => R.kind === "floor").slice().sort(os),
|
|
5436
5446
|
[e]
|
|
5437
5447
|
), Ve = me(
|
|
5438
5448
|
() => un.map((R) => R.id),
|
|
@@ -5457,7 +5467,7 @@ function qd({
|
|
|
5457
5467
|
const R = URL.createObjectURL(y);
|
|
5458
5468
|
return Oe(R), Ke(!1), () => URL.revokeObjectURL(R);
|
|
5459
5469
|
}, [y]), de.current = De, se.current = j, ae(() => {
|
|
5460
|
-
j != null || De == null ||
|
|
5470
|
+
j != null || De == null || sr(Ve, De) && Se(null);
|
|
5461
5471
|
}, [Ve, j, De]);
|
|
5462
5472
|
const ve = (R) => {
|
|
5463
5473
|
if (R) {
|
|
@@ -5604,11 +5614,11 @@ function qd({
|
|
|
5604
5614
|
);
|
|
5605
5615
|
Z.dropIndex !== oe && (Z.dropIndex = oe, we(oe));
|
|
5606
5616
|
const C = Xd(Z.originIds, Z.id, oe), L = de.current ?? Z.originIds;
|
|
5607
|
-
|
|
5617
|
+
sr(L, C) || Se(C);
|
|
5608
5618
|
}, pn = async () => {
|
|
5609
5619
|
const R = de.current;
|
|
5610
5620
|
if (!(!u || R == null)) {
|
|
5611
|
-
if (
|
|
5621
|
+
if (sr(R, Ve)) {
|
|
5612
5622
|
Se(null);
|
|
5613
5623
|
return;
|
|
5614
5624
|
}
|
|
@@ -6141,7 +6151,7 @@ function lu() {
|
|
|
6141
6151
|
)
|
|
6142
6152
|
] });
|
|
6143
6153
|
}
|
|
6144
|
-
function
|
|
6154
|
+
function Hs() {
|
|
6145
6155
|
return /* @__PURE__ */ k("svg", { ...Wn, viewBox: "0 0 24 24", children: [
|
|
6146
6156
|
/* @__PURE__ */ l("circle", { cx: "12", cy: "12", r: "3", stroke: "currentColor", strokeWidth: "1.8" }),
|
|
6147
6157
|
/* @__PURE__ */ l(
|
|
@@ -6170,7 +6180,7 @@ function cu() {
|
|
|
6170
6180
|
}
|
|
6171
6181
|
) });
|
|
6172
6182
|
}
|
|
6173
|
-
function
|
|
6183
|
+
function Xs() {
|
|
6174
6184
|
return /* @__PURE__ */ k("svg", { ...Wn, children: [
|
|
6175
6185
|
/* @__PURE__ */ l(
|
|
6176
6186
|
"rect",
|
|
@@ -6195,7 +6205,7 @@ function Hs() {
|
|
|
6195
6205
|
)
|
|
6196
6206
|
] });
|
|
6197
6207
|
}
|
|
6198
|
-
function
|
|
6208
|
+
function js() {
|
|
6199
6209
|
return /* @__PURE__ */ k("svg", { ...Wn, children: [
|
|
6200
6210
|
/* @__PURE__ */ l(
|
|
6201
6211
|
"path",
|
|
@@ -6218,10 +6228,10 @@ const au = {
|
|
|
6218
6228
|
kiosks: iu,
|
|
6219
6229
|
escalators: su,
|
|
6220
6230
|
elevators: lu,
|
|
6221
|
-
style:
|
|
6231
|
+
style: Hs,
|
|
6222
6232
|
unassigned: cu,
|
|
6223
|
-
"edit-map":
|
|
6224
|
-
wayfinding:
|
|
6233
|
+
"edit-map": Xs,
|
|
6234
|
+
wayfinding: js
|
|
6225
6235
|
}, du = Tl(), uu = [
|
|
6226
6236
|
["GREEN_AREA_COLOR", "Green Areas"],
|
|
6227
6237
|
["WATER_COLOR", "Water"],
|
|
@@ -6229,7 +6239,7 @@ const au = {
|
|
|
6229
6239
|
["PARKING_LANE_COLOR", "Parking Lanes"],
|
|
6230
6240
|
["PARKING_ICON_COLOR", "Parking Icons"]
|
|
6231
6241
|
];
|
|
6232
|
-
function
|
|
6242
|
+
function Ys({
|
|
6233
6243
|
label: e,
|
|
6234
6244
|
onReset: n,
|
|
6235
6245
|
children: t
|
|
@@ -6265,7 +6275,7 @@ function Gi({
|
|
|
6265
6275
|
}
|
|
6266
6276
|
c(h), h !== n.toLowerCase() && h !== n && o(h);
|
|
6267
6277
|
};
|
|
6268
|
-
return /* @__PURE__ */ l(
|
|
6278
|
+
return /* @__PURE__ */ l(Ys, { label: e, onReset: i, children: /* @__PURE__ */ l(
|
|
6269
6279
|
Tr,
|
|
6270
6280
|
{
|
|
6271
6281
|
label: e,
|
|
@@ -6329,7 +6339,7 @@ function pu({
|
|
|
6329
6339
|
t.edges,
|
|
6330
6340
|
de
|
|
6331
6341
|
), L = new Map(
|
|
6332
|
-
|
|
6342
|
+
Us(t.levels).map(($, X) => [$.id, X])
|
|
6333
6343
|
);
|
|
6334
6344
|
return C.slice().sort(($, X) => {
|
|
6335
6345
|
const T = L.get($.from.levelId) ?? Number.POSITIVE_INFINITY, Q = L.get(X.from.levelId) ?? Number.POSITIVE_INFINITY;
|
|
@@ -6340,7 +6350,7 @@ function pu({
|
|
|
6340
6350
|
), un = se.filter(
|
|
6341
6351
|
(C) => !Ct(C.id, t.anchors, ee)
|
|
6342
6352
|
), Ve = me(
|
|
6343
|
-
() =>
|
|
6353
|
+
() => Ks(t.assignments),
|
|
6344
6354
|
[t.assignments]
|
|
6345
6355
|
), ue = me(() => {
|
|
6346
6356
|
const C = /* @__PURE__ */ new Map();
|
|
@@ -6353,7 +6363,7 @@ function pu({
|
|
|
6353
6363
|
const $ = (C.get(L.name.trim().toLowerCase()) ?? 0) > 1;
|
|
6354
6364
|
return [
|
|
6355
6365
|
L.id,
|
|
6356
|
-
|
|
6366
|
+
rs(L, $)
|
|
6357
6367
|
];
|
|
6358
6368
|
})
|
|
6359
6369
|
);
|
|
@@ -6427,7 +6437,7 @@ function pu({
|
|
|
6427
6437
|
levelName: Xe(X.levelId),
|
|
6428
6438
|
assignedName: _e(X),
|
|
6429
6439
|
showKindTag: $ == null ? void 0 : $.showKindTag
|
|
6430
|
-
}), Q = $ != null && $.connectorIcon ?
|
|
6440
|
+
}), Q = $ != null && $.connectorIcon ? is(
|
|
6431
6441
|
$.connectorIcon,
|
|
6432
6442
|
!!$.connectorAssigned
|
|
6433
6443
|
) : void 0;
|
|
@@ -6572,7 +6582,7 @@ function pu({
|
|
|
6572
6582
|
className: "eyeon-map-rail__nav-item",
|
|
6573
6583
|
onClick: () => n("edit-map"),
|
|
6574
6584
|
children: [
|
|
6575
|
-
/* @__PURE__ */ l("span", { className: "eyeon-map-rail__nav-icon", children: /* @__PURE__ */ l(
|
|
6585
|
+
/* @__PURE__ */ l("span", { className: "eyeon-map-rail__nav-icon", children: /* @__PURE__ */ l(Xs, {}) }),
|
|
6576
6586
|
/* @__PURE__ */ k("span", { className: "eyeon-map-rail__nav-copy", children: [
|
|
6577
6587
|
/* @__PURE__ */ l("span", { className: "eyeon-map-rail__nav-title", children: "Edit Map" }),
|
|
6578
6588
|
/* @__PURE__ */ l("span", { className: "eyeon-map-rail__nav-desc", children: "Draw and reshape stores, text, and lines" })
|
|
@@ -6588,7 +6598,7 @@ function pu({
|
|
|
6588
6598
|
className: "eyeon-map-rail__nav-item",
|
|
6589
6599
|
onClick: () => n("wayfinding"),
|
|
6590
6600
|
children: [
|
|
6591
|
-
/* @__PURE__ */ l("span", { className: "eyeon-map-rail__nav-icon", children: /* @__PURE__ */ l(
|
|
6601
|
+
/* @__PURE__ */ l("span", { className: "eyeon-map-rail__nav-icon", children: /* @__PURE__ */ l(js, {}) }),
|
|
6592
6602
|
/* @__PURE__ */ k("span", { className: "eyeon-map-rail__nav-copy", children: [
|
|
6593
6603
|
/* @__PURE__ */ l("span", { className: "eyeon-map-rail__nav-title", children: "Wayfinding" }),
|
|
6594
6604
|
/* @__PURE__ */ l("span", { className: "eyeon-map-rail__nav-desc", children: "Walking paths and route anchors" })
|
|
@@ -6605,7 +6615,7 @@ function pu({
|
|
|
6605
6615
|
className: "eyeon-map-rail__nav-item",
|
|
6606
6616
|
onClick: () => n("style"),
|
|
6607
6617
|
children: [
|
|
6608
|
-
/* @__PURE__ */ l("span", { className: "eyeon-map-rail__nav-icon", children: /* @__PURE__ */ l(
|
|
6618
|
+
/* @__PURE__ */ l("span", { className: "eyeon-map-rail__nav-icon", children: /* @__PURE__ */ l(Hs, {}) }),
|
|
6609
6619
|
/* @__PURE__ */ k("span", { className: "eyeon-map-rail__nav-copy", children: [
|
|
6610
6620
|
/* @__PURE__ */ l("span", { className: "eyeon-map-rail__nav-title", children: "Settings" }),
|
|
6611
6621
|
/* @__PURE__ */ l("span", { className: "eyeon-map-rail__nav-desc", children: "Colors and map look" })
|
|
@@ -6747,7 +6757,7 @@ function pu({
|
|
|
6747
6757
|
C
|
|
6748
6758
|
);
|
|
6749
6759
|
}),
|
|
6750
|
-
/* @__PURE__ */ l(
|
|
6760
|
+
/* @__PURE__ */ l(Ys, { label: "Stores Radius", children: /* @__PURE__ */ l(
|
|
6751
6761
|
"input",
|
|
6752
6762
|
{
|
|
6753
6763
|
className: "eyeon-map-rail__number-sm",
|
|
@@ -6858,13 +6868,13 @@ function gu(e = mu) {
|
|
|
6858
6868
|
t += Zi[n[o] % Zi.length];
|
|
6859
6869
|
return t;
|
|
6860
6870
|
}
|
|
6861
|
-
function
|
|
6871
|
+
function Ir(e, n) {
|
|
6862
6872
|
return e.filter((t) => t.levelId === n && !t.orphanedAt).map((t) => t.key);
|
|
6863
6873
|
}
|
|
6864
6874
|
function ku(e, n) {
|
|
6865
6875
|
return e.filter((t) => t.id !== n);
|
|
6866
6876
|
}
|
|
6867
|
-
function
|
|
6877
|
+
function br(e, n, t = gu) {
|
|
6868
6878
|
const o = yu(e), i = n instanceof Set ? n : new Set(n);
|
|
6869
6879
|
for (let s = 0; s < 24; s++) {
|
|
6870
6880
|
const c = `${o}-${t()}`;
|
|
@@ -6885,7 +6895,7 @@ function _u(e) {
|
|
|
6885
6895
|
function vu(e) {
|
|
6886
6896
|
const { shape: n, targetLevelId: t } = e;
|
|
6887
6897
|
if (t === n.levelId) return null;
|
|
6888
|
-
const o =
|
|
6898
|
+
const o = Ir(e.shapes, t), i = e.allocId(), r = (e.allocKey ?? br)(n.kind, o), s = [
|
|
6889
6899
|
{
|
|
6890
6900
|
op: "upsert_shape",
|
|
6891
6901
|
shape: {
|
|
@@ -6957,7 +6967,7 @@ function bu({
|
|
|
6957
6967
|
const te = (A.get(D.name.trim().toLowerCase()) ?? 0) > 1;
|
|
6958
6968
|
return {
|
|
6959
6969
|
value: String(D.id),
|
|
6960
|
-
label:
|
|
6970
|
+
label: rs(D, te)
|
|
6961
6971
|
};
|
|
6962
6972
|
}),
|
|
6963
6973
|
[A, o]
|
|
@@ -6992,7 +7002,7 @@ function bu({
|
|
|
6992
7002
|
unitStatus: te ? "occupied" : "vacant",
|
|
6993
7003
|
layerType: Pe,
|
|
6994
7004
|
customLabel: Pe === "retail_name" ? (j == null ? void 0 : j.name) ?? null : p.customLabel,
|
|
6995
|
-
customImageKey: Pe === "retail_logo" ? (j == null ? void 0 : j.
|
|
7005
|
+
customImageKey: Pe === "retail_logo" ? (j == null ? void 0 : j.logoKey) ?? p.customImageKey : p.customImageKey
|
|
6996
7006
|
});
|
|
6997
7007
|
}
|
|
6998
7008
|
}
|
|
@@ -7028,7 +7038,7 @@ function bu({
|
|
|
7028
7038
|
);
|
|
7029
7039
|
x({
|
|
7030
7040
|
layerType: "retail_logo",
|
|
7031
|
-
customImageKey: (D == null ? void 0 : D.
|
|
7041
|
+
customImageKey: (D == null ? void 0 : D.logoKey) ?? p.customImageKey
|
|
7032
7042
|
});
|
|
7033
7043
|
},
|
|
7034
7044
|
children: "Retail Logo"
|
|
@@ -7064,7 +7074,7 @@ function bu({
|
|
|
7064
7074
|
)
|
|
7065
7075
|
] }),
|
|
7066
7076
|
/* @__PURE__ */ l(
|
|
7067
|
-
|
|
7077
|
+
Fs,
|
|
7068
7078
|
{
|
|
7069
7079
|
value: p.align ?? e.label.align ?? wo,
|
|
7070
7080
|
disabled: !r,
|
|
@@ -7114,7 +7124,7 @@ function bu({
|
|
|
7114
7124
|
}
|
|
7115
7125
|
) : null,
|
|
7116
7126
|
/* @__PURE__ */ l(
|
|
7117
|
-
|
|
7127
|
+
zs,
|
|
7118
7128
|
{
|
|
7119
7129
|
form: p,
|
|
7120
7130
|
canEdit: r,
|
|
@@ -7225,7 +7235,7 @@ function Cu({
|
|
|
7225
7235
|
i("");
|
|
7226
7236
|
return;
|
|
7227
7237
|
}
|
|
7228
|
-
const h =
|
|
7238
|
+
const h = cr(d);
|
|
7229
7239
|
if (!h.complete) {
|
|
7230
7240
|
i(d);
|
|
7231
7241
|
return;
|
|
@@ -7269,7 +7279,7 @@ function Cu({
|
|
|
7269
7279
|
return;
|
|
7270
7280
|
}
|
|
7271
7281
|
if (d.key !== "ArrowUp" && d.key !== "ArrowDown" || (d.preventDefault(), n)) return;
|
|
7272
|
-
const u = d.key === "ArrowUp" ? 1 : -1, h =
|
|
7282
|
+
const u = d.key === "ArrowUp" ? 1 : -1, h = cr(o), y = (h.complete ? h.render : e === "" ? li : e) + u;
|
|
7273
7283
|
i(String(y)), t(y);
|
|
7274
7284
|
}
|
|
7275
7285
|
}
|
|
@@ -7367,7 +7377,7 @@ function Su({
|
|
|
7367
7377
|
disabled: n = !1,
|
|
7368
7378
|
onCopyToLevel: t
|
|
7369
7379
|
}) {
|
|
7370
|
-
const o =
|
|
7380
|
+
const o = hl(), i = ie(null), r = ie(null), [s, c] = K(!1), [d, u] = K(null), [h, p] = K(null), y = fn(() => {
|
|
7371
7381
|
c(!1), p(null);
|
|
7372
7382
|
}, []), m = fn(() => {
|
|
7373
7383
|
const A = i.current;
|
|
@@ -7551,7 +7561,7 @@ function Eu({
|
|
|
7551
7561
|
)
|
|
7552
7562
|
] });
|
|
7553
7563
|
}
|
|
7554
|
-
const
|
|
7564
|
+
const lr = 8;
|
|
7555
7565
|
function Au({
|
|
7556
7566
|
label: e,
|
|
7557
7567
|
canEdit: n,
|
|
@@ -7574,7 +7584,7 @@ function Au({
|
|
|
7574
7584
|
const E = fn(
|
|
7575
7585
|
(w, z) => {
|
|
7576
7586
|
if (!n) return;
|
|
7577
|
-
const B = Math.max(
|
|
7587
|
+
const B = Math.max(lr, w.size ?? h.current), q = w.rotate ?? p.current;
|
|
7578
7588
|
w.size != null && (c(B), h.current = B), w.rotate != null && (u(q), p.current = q);
|
|
7579
7589
|
const W = w.text === void 0 ? i : w.text === "" ? e.text ?? zt : w.text;
|
|
7580
7590
|
o(
|
|
@@ -7592,7 +7602,7 @@ function Au({
|
|
|
7592
7602
|
), x = (w, z) => {
|
|
7593
7603
|
if (w === "size") {
|
|
7594
7604
|
E({
|
|
7595
|
-
size: Math.max(
|
|
7605
|
+
size: Math.max(lr, Lo(h.current, z))
|
|
7596
7606
|
});
|
|
7597
7607
|
return;
|
|
7598
7608
|
}
|
|
@@ -7631,7 +7641,7 @@ function Au({
|
|
|
7631
7641
|
)
|
|
7632
7642
|
] }),
|
|
7633
7643
|
/* @__PURE__ */ l(
|
|
7634
|
-
|
|
7644
|
+
Fs,
|
|
7635
7645
|
{
|
|
7636
7646
|
value: e.align,
|
|
7637
7647
|
disabled: !n,
|
|
@@ -7644,7 +7654,7 @@ function Au({
|
|
|
7644
7654
|
label: "Font size",
|
|
7645
7655
|
value: s,
|
|
7646
7656
|
disabled: !n,
|
|
7647
|
-
onChange: (w) => E({ size: Math.max(
|
|
7657
|
+
onChange: (w) => E({ size: Math.max(lr, w) }),
|
|
7648
7658
|
onStep: (w) => x("size", w),
|
|
7649
7659
|
onHoldStart: (w) => S("size", w),
|
|
7650
7660
|
onHoldEnd: () => A("size")
|
|
@@ -7765,7 +7775,7 @@ function Ou({
|
|
|
7765
7775
|
}
|
|
7766
7776
|
) : Se ? /* @__PURE__ */ l("div", { className: "eyeon-map-assign__actions", children: Se }) : null
|
|
7767
7777
|
] }) : /* @__PURE__ */ k("div", { className: "eyeon-map-inspector", children: [
|
|
7768
|
-
|
|
7778
|
+
Ao(e) ? S ? /* @__PURE__ */ l(
|
|
7769
7779
|
Eu,
|
|
7770
7780
|
{
|
|
7771
7781
|
label: e.label,
|
|
@@ -7798,7 +7808,7 @@ function Ou({
|
|
|
7798
7808
|
)
|
|
7799
7809
|
] }),
|
|
7800
7810
|
te ? /* @__PURE__ */ l("p", { className: "eyeon-map-rail__hint", style: { color: "#b91c1c" }, children: te }) : null,
|
|
7801
|
-
|
|
7811
|
+
Ws(e.kind) ? /* @__PURE__ */ k("label", { className: "eyeon-map-rail__field", children: [
|
|
7802
7812
|
"Type",
|
|
7803
7813
|
/* @__PURE__ */ l(
|
|
7804
7814
|
zn,
|
|
@@ -7809,7 +7819,7 @@ function Ou({
|
|
|
7809
7819
|
searchable: !1,
|
|
7810
7820
|
options: Nd(e.kind).map((ke) => ({
|
|
7811
7821
|
value: ke,
|
|
7812
|
-
label:
|
|
7822
|
+
label: Bs[ke]
|
|
7813
7823
|
})),
|
|
7814
7824
|
onChange: (ke) => h(ke)
|
|
7815
7825
|
}
|
|
@@ -7866,7 +7876,7 @@ function Tu({
|
|
|
7866
7876
|
routeOnSelect: u,
|
|
7867
7877
|
imageProxyUrl: h
|
|
7868
7878
|
}) {
|
|
7869
|
-
return /* @__PURE__ */ l("div", { className: "eyeon-map-preview", children: /* @__PURE__ */ l(
|
|
7879
|
+
return /* @__PURE__ */ l("div", { className: "eyeon-map-preview", children: /* @__PURE__ */ l(fl, { fallback: /* @__PURE__ */ l("div", { className: "eyeon-map-preview__loading", children: "Loading preview…" }), children: /* @__PURE__ */ l(
|
|
7870
7880
|
Jl,
|
|
7871
7881
|
{
|
|
7872
7882
|
document: e,
|
|
@@ -7952,9 +7962,9 @@ function zu(e) {
|
|
|
7952
7962
|
function Bu(e) {
|
|
7953
7963
|
var o;
|
|
7954
7964
|
const n = ((o = Fr()) == null ? void 0 : o.getItem($r(e))) === "1", t = Dr.has(e) || n;
|
|
7955
|
-
return
|
|
7965
|
+
return xr(e), t;
|
|
7956
7966
|
}
|
|
7957
|
-
function
|
|
7967
|
+
function xr(e) {
|
|
7958
7968
|
var n;
|
|
7959
7969
|
Dr.delete(e), (n = Fr()) == null || n.removeItem($r(e));
|
|
7960
7970
|
}
|
|
@@ -7987,7 +7997,7 @@ function Yu({
|
|
|
7987
7997
|
}), [W, D] = K(() => {
|
|
7988
7998
|
var I;
|
|
7989
7999
|
const g = (I = qi(n.mapId)) == null ? void 0 : I.levelId;
|
|
7990
|
-
return g != null && n.levels.some((v) => v.id === g) ? g :
|
|
8000
|
+
return g != null && n.levels.some((v) => v.id === g) ? g : Vo(n.levels);
|
|
7991
8001
|
}), [te, j] = K([]), [Pe, We] = K(null), we = te[0] ?? null, [De, Se] = K(null), [ke, Ke] = K(0), [Ye, Oe] = K([]), [Te, F] = K("select"), [ee, de] = K(0), [se, he] = K(!1), [$e, rn] = K(!1), [un, Ve] = K(jn), [ue, ne] = K(!1), fe = ie(null), _e = ie(un), Fe = ie([]), ve = ie(-1), Xe = ie(!1);
|
|
7992
8002
|
_e.current = un;
|
|
7993
8003
|
const qn = e === "PORTAL", Sn = tc(e, B), Ue = Sn === "editor", Re = ie({
|
|
@@ -8006,14 +8016,14 @@ function Yu({
|
|
|
8006
8016
|
}, [W, n.mapId, B]), ae(() => {
|
|
8007
8017
|
if (!n.levels.some((U) => U.id === W)) {
|
|
8008
8018
|
D(
|
|
8009
|
-
B === "wayfinding" ?
|
|
8019
|
+
B === "wayfinding" ? Ko(n.levels) : bo(B) ? Vo(n.levels) : Uo(n.levels)
|
|
8010
8020
|
);
|
|
8011
8021
|
return;
|
|
8012
8022
|
}
|
|
8013
8023
|
if (B === "edit-map") return;
|
|
8014
8024
|
const I = n.levels.find((U) => U.id === W);
|
|
8015
8025
|
if ((I == null ? void 0 : I.kind) !== "outdoor") return;
|
|
8016
|
-
const v = B === "wayfinding" ?
|
|
8026
|
+
const v = B === "wayfinding" ? Ko(n.levels) : Uo(n.levels);
|
|
8017
8027
|
v != null && v !== W && D(v);
|
|
8018
8028
|
}, [n.levels, W, B]);
|
|
8019
8029
|
const O = me(
|
|
@@ -8130,7 +8140,7 @@ function Yu({
|
|
|
8130
8140
|
}
|
|
8131
8141
|
}, [t, pn, c, $e]), bn = fn(
|
|
8132
8142
|
(g) => {
|
|
8133
|
-
j([]), We(null), Oe([]), Se(null), bo(B) && !bo(g) ? (F("select"), Xe.current = !1, _e.current = jn(), Ve(jn()), D(
|
|
8143
|
+
j([]), We(null), Oe([]), Se(null), bo(B) && !bo(g) ? (F("select"), Xe.current = !1, _e.current = jn(), Ve(jn()), D(Uo(n.levels))) : g === "edit-map" ? (F("select"), D(Vo(n.levels))) : g === "wayfinding" && (F("select"), D(Ko(n.levels))), q(g);
|
|
8134
8144
|
},
|
|
8135
8145
|
[n.levels, B]
|
|
8136
8146
|
), Qn = (g) => {
|
|
@@ -8142,7 +8152,7 @@ function Yu({
|
|
|
8142
8152
|
ae(() => {
|
|
8143
8153
|
if (!Ue || !t) return;
|
|
8144
8154
|
const g = (I) => {
|
|
8145
|
-
if (!
|
|
8155
|
+
if (!ar(I.target)) {
|
|
8146
8156
|
if (cc(I)) {
|
|
8147
8157
|
I.preventDefault(), en();
|
|
8148
8158
|
return;
|
|
@@ -8167,8 +8177,8 @@ function Yu({
|
|
|
8167
8177
|
U || q((J) => {
|
|
8168
8178
|
if (J === "edit-map" || J === "wayfinding" || J === "unassigned" || J === "escalators" || J === "elevators")
|
|
8169
8179
|
return J;
|
|
8170
|
-
const
|
|
8171
|
-
return
|
|
8180
|
+
const xe = v ? No(v, O.anchors, O.connectors) : null;
|
|
8181
|
+
return xe === "escalator" ? "escalators" : xe === "elevator" ? "elevators" : (v == null ? void 0 : v.kind) === "unit" || (v == null ? void 0 : v.kind) === "parking_zone" ? "stores" : (v == null ? void 0 : v.kind) === "amenity" ? "amenities" : (v == null ? void 0 : v.kind) === "kiosk_screen" ? "kiosks" : "selection";
|
|
8172
8182
|
});
|
|
8173
8183
|
}
|
|
8174
8184
|
},
|
|
@@ -8182,7 +8192,7 @@ function Yu({
|
|
|
8182
8192
|
]
|
|
8183
8193
|
), Le = (g) => {
|
|
8184
8194
|
const I = Lc(Te, g);
|
|
8185
|
-
F(I),
|
|
8195
|
+
F(I), Ts(I, B === "wayfinding") || Oe([]);
|
|
8186
8196
|
}, Et = (g) => {
|
|
8187
8197
|
!T || !t || Vi(
|
|
8188
8198
|
O.shapes,
|
|
@@ -8264,13 +8274,13 @@ function Yu({
|
|
|
8264
8274
|
);
|
|
8265
8275
|
}, kn = (g, I) => {
|
|
8266
8276
|
if (!T || !t) return;
|
|
8267
|
-
if (
|
|
8268
|
-
const
|
|
8269
|
-
if (
|
|
8277
|
+
if (Ao(T)) {
|
|
8278
|
+
const xe = g.size ?? T.label.size ?? xt;
|
|
8279
|
+
if (xe === (T.label.size ?? xt) && (g.rotate ?? 0) === (T.label.rotate ?? 0) && (g.color ?? "") === (T.label.color ?? "") && (g.imageKey ?? "") === (T.label.imageKey ?? "")) {
|
|
8270
8280
|
I != null && I.live || yn();
|
|
8271
8281
|
return;
|
|
8272
8282
|
}
|
|
8273
|
-
const Un = ba(T.geometry,
|
|
8283
|
+
const Un = ba(T.geometry, xe);
|
|
8274
8284
|
ge(
|
|
8275
8285
|
{
|
|
8276
8286
|
op: "upsert_shape",
|
|
@@ -8325,7 +8335,7 @@ function Yu({
|
|
|
8325
8335
|
});
|
|
8326
8336
|
}, _n = (g) => {
|
|
8327
8337
|
if (!T || !t) return;
|
|
8328
|
-
const I = x.find((U) => U.id === g.retailerId), v =
|
|
8338
|
+
const I = x.find((U) => U.id === g.retailerId), v = Wo(T, g, I);
|
|
8329
8339
|
ge({ op: "upsert_assignment", assignment: g }), ge(
|
|
8330
8340
|
{
|
|
8331
8341
|
op: "upsert_shape",
|
|
@@ -8370,7 +8380,7 @@ function Yu({
|
|
|
8370
8380
|
const v = A.find((Dn) => Dn.id === g), U = Eo(
|
|
8371
8381
|
g,
|
|
8372
8382
|
O.assignments
|
|
8373
|
-
), J = [],
|
|
8383
|
+
), J = [], xe = (Dn) => {
|
|
8374
8384
|
const Xn = O.shapes.find((yt) => yt.id === Dn);
|
|
8375
8385
|
Xn && (J.push({ op: "delete_assignment", shapeId: Dn }), J.push({
|
|
8376
8386
|
op: "upsert_shape",
|
|
@@ -8393,12 +8403,12 @@ function Yu({
|
|
|
8393
8403
|
}
|
|
8394
8404
|
}));
|
|
8395
8405
|
};
|
|
8396
|
-
if (U != null && U !== I &&
|
|
8406
|
+
if (U != null && U !== I && xe(U), I == null) {
|
|
8397
8407
|
J.length && Ze(J);
|
|
8398
8408
|
return;
|
|
8399
8409
|
}
|
|
8400
8410
|
const Ie = O.shapes.find((Dn) => Dn.id === I);
|
|
8401
|
-
if (!Ie || !
|
|
8411
|
+
if (!Ie || !Vs(Ie.kind)) return;
|
|
8402
8412
|
const Un = O.assignments.find((Dn) => Dn.shapeId === I), Hn = Un ? Jn(Un, Ie.kind) : $t(Ie.id, Ie.kind), P = Jn(
|
|
8403
8413
|
{
|
|
8404
8414
|
...Hn,
|
|
@@ -8410,7 +8420,7 @@ function Yu({
|
|
|
8410
8420
|
layerType: "kiosk"
|
|
8411
8421
|
},
|
|
8412
8422
|
Ie.kind
|
|
8413
|
-
), At =
|
|
8423
|
+
), At = Wo(Ie, P);
|
|
8414
8424
|
J.push({ op: "upsert_assignment", assignment: P }), J.push({
|
|
8415
8425
|
op: "upsert_shape",
|
|
8416
8426
|
shape: {
|
|
@@ -8428,7 +8438,7 @@ function Yu({
|
|
|
8428
8438
|
for (const v of te) {
|
|
8429
8439
|
const U = O.shapes.find((P) => P.id === v);
|
|
8430
8440
|
if (!U || !Wt(U.kind)) continue;
|
|
8431
|
-
const J = O.assignments.find((P) => P.shapeId === v),
|
|
8441
|
+
const J = O.assignments.find((P) => P.shapeId === v), xe = J ? Jn(J, U.kind) : $t(v, U.kind), Ie = Kl(xe, g), Un = x.find((P) => P.id === Ie.retailerId), Hn = Wo(U, Ie, Un);
|
|
8432
8442
|
I.push({ op: "upsert_assignment", assignment: Ie }), I.push({
|
|
8433
8443
|
op: "upsert_shape",
|
|
8434
8444
|
shape: {
|
|
@@ -8511,7 +8521,7 @@ function Yu({
|
|
|
8511
8521
|
canEdit: t,
|
|
8512
8522
|
onAssign: (g) => ln(mt.id, g)
|
|
8513
8523
|
}
|
|
8514
|
-
) : null,
|
|
8524
|
+
) : null, Ro = B === "wayfinding" ? "route" : B === "edit-map" ? "map" : void 0;
|
|
8515
8525
|
return /* @__PURE__ */ k("div", { className: `eyeon-map-editor eyeon-map-editor--${e} ${V ?? ""}`, children: [
|
|
8516
8526
|
qn ? /* @__PURE__ */ l(
|
|
8517
8527
|
pu,
|
|
@@ -8536,9 +8546,9 @@ function Yu({
|
|
|
8536
8546
|
zu(n.mapId);
|
|
8537
8547
|
try {
|
|
8538
8548
|
const I = await u(g);
|
|
8539
|
-
return q("floors"),
|
|
8549
|
+
return q("floors"), xr(n.mapId), I;
|
|
8540
8550
|
} catch (I) {
|
|
8541
|
-
throw
|
|
8551
|
+
throw xr(n.mapId), I;
|
|
8542
8552
|
}
|
|
8543
8553
|
} : void 0,
|
|
8544
8554
|
onUpdateLevel: h,
|
|
@@ -8582,7 +8592,7 @@ function Yu({
|
|
|
8582
8592
|
tool: Te,
|
|
8583
8593
|
onToolChange: Le,
|
|
8584
8594
|
canEdit: He,
|
|
8585
|
-
group:
|
|
8595
|
+
group: Ro
|
|
8586
8596
|
}
|
|
8587
8597
|
) : null }),
|
|
8588
8598
|
/* @__PURE__ */ k("div", { className: "eyeon-map-editor__actions", children: [
|
|
@@ -8640,7 +8650,7 @@ function Yu({
|
|
|
8640
8650
|
}
|
|
8641
8651
|
) : /* @__PURE__ */ l(Je, { children: /* @__PURE__ */ k("div", { className: "eyeon-map-editor__canvas-wrap", children: [
|
|
8642
8652
|
/* @__PURE__ */ l(
|
|
8643
|
-
|
|
8653
|
+
Ms,
|
|
8644
8654
|
{
|
|
8645
8655
|
ref: fe,
|
|
8646
8656
|
level: ye,
|
|
@@ -8714,7 +8724,7 @@ function Yu({
|
|
|
8714
8724
|
kind: "junction"
|
|
8715
8725
|
}
|
|
8716
8726
|
});
|
|
8717
|
-
return v != null && I != null && !
|
|
8727
|
+
return v != null && I != null && !To(X, I, v) && ge(
|
|
8718
8728
|
{
|
|
8719
8729
|
op: "upsert_edge",
|
|
8720
8730
|
edge: {
|
|
@@ -8740,7 +8750,7 @@ function Yu({
|
|
|
8740
8750
|
},
|
|
8741
8751
|
onInsertRouteJunction: (g, I) => {
|
|
8742
8752
|
if (!He || !ye) return null;
|
|
8743
|
-
const v = X.find((
|
|
8753
|
+
const v = X.find((xe) => xe.id === g);
|
|
8744
8754
|
if (!v) return null;
|
|
8745
8755
|
const { ops: U, junctionId: J } = ja({
|
|
8746
8756
|
levelId: ye.id,
|
|
@@ -8765,7 +8775,7 @@ function Yu({
|
|
|
8765
8775
|
},
|
|
8766
8776
|
onEnsureShapeAnchor: (g, I) => {
|
|
8767
8777
|
if (!He) return null;
|
|
8768
|
-
const v = oe.find((
|
|
8778
|
+
const v = oe.find((xe) => xe.id === g);
|
|
8769
8779
|
if (!v) return null;
|
|
8770
8780
|
const { ops: U, anchorId: J } = Ua({
|
|
8771
8781
|
shape: v,
|
|
@@ -8779,7 +8789,7 @@ function Yu({
|
|
|
8779
8789
|
if (!He) return;
|
|
8780
8790
|
const J = oe.find((Ie) => Ie.id === g);
|
|
8781
8791
|
if (!J) return;
|
|
8782
|
-
const
|
|
8792
|
+
const xe = Ha({
|
|
8783
8793
|
shape: J,
|
|
8784
8794
|
anchors: $,
|
|
8785
8795
|
edges: X,
|
|
@@ -8789,7 +8799,7 @@ function Yu({
|
|
|
8789
8799
|
maxDist: U,
|
|
8790
8800
|
allocId: () => ve.current--
|
|
8791
8801
|
});
|
|
8792
|
-
|
|
8802
|
+
xe.length && Ze(xe);
|
|
8793
8803
|
},
|
|
8794
8804
|
onHistoryGestureEnd: yn,
|
|
8795
8805
|
onMoveAnchor: (g, I, v) => {
|
|
@@ -8805,9 +8815,9 @@ function Yu({
|
|
|
8805
8815
|
},
|
|
8806
8816
|
onCreateShape: (g, I, v) => {
|
|
8807
8817
|
if (!ye || !He) return;
|
|
8808
|
-
const U =
|
|
8818
|
+
const U = br(
|
|
8809
8819
|
g,
|
|
8810
|
-
|
|
8820
|
+
Ir(O.shapes, ye.id)
|
|
8811
8821
|
), J = ge({
|
|
8812
8822
|
op: "upsert_shape",
|
|
8813
8823
|
shape: {
|
|
@@ -8830,21 +8840,21 @@ function Yu({
|
|
|
8830
8840
|
const I = [];
|
|
8831
8841
|
let v = !1;
|
|
8832
8842
|
const U = new Set(
|
|
8833
|
-
|
|
8843
|
+
Ir(O.shapes, ye.id)
|
|
8834
8844
|
);
|
|
8835
8845
|
if (g.forEach((J) => {
|
|
8836
8846
|
if (J.action === "update") {
|
|
8837
|
-
const
|
|
8847
|
+
const xe = O.shapes.find(
|
|
8838
8848
|
(Ie) => Ie.id === J.shapeId
|
|
8839
8849
|
);
|
|
8840
|
-
if (!
|
|
8850
|
+
if (!xe) return;
|
|
8841
8851
|
I.push({
|
|
8842
8852
|
op: "upsert_shape",
|
|
8843
8853
|
shape: {
|
|
8844
|
-
id:
|
|
8845
|
-
levelId:
|
|
8846
|
-
key:
|
|
8847
|
-
kind:
|
|
8854
|
+
id: xe.id,
|
|
8855
|
+
levelId: xe.levelId,
|
|
8856
|
+
key: xe.key,
|
|
8857
|
+
kind: xe.kind,
|
|
8848
8858
|
geometry: J.geometry,
|
|
8849
8859
|
bbox: wn(J.geometry),
|
|
8850
8860
|
geometryLocked: !0
|
|
@@ -8853,7 +8863,7 @@ function Yu({
|
|
|
8853
8863
|
return;
|
|
8854
8864
|
}
|
|
8855
8865
|
if (J.action === "create") {
|
|
8856
|
-
const
|
|
8866
|
+
const xe = J.style, Ie = br(J.kind, U);
|
|
8857
8867
|
U.add(Ie), I.push({
|
|
8858
8868
|
op: "upsert_shape",
|
|
8859
8869
|
shape: {
|
|
@@ -8862,7 +8872,7 @@ function Yu({
|
|
|
8862
8872
|
kind: J.kind,
|
|
8863
8873
|
geometry: J.geometry,
|
|
8864
8874
|
bbox: wn(J.geometry),
|
|
8865
|
-
style:
|
|
8875
|
+
style: xe,
|
|
8866
8876
|
origin: "manual",
|
|
8867
8877
|
geometryLocked: !0
|
|
8868
8878
|
}
|
|
@@ -8871,7 +8881,7 @@ function Yu({
|
|
|
8871
8881
|
}
|
|
8872
8882
|
J.shapeId === we && (v = !0), I.push({ op: "delete_shape", shapeId: J.shapeId });
|
|
8873
8883
|
}), I.length && Ze(I), v) {
|
|
8874
|
-
const J = g.find((
|
|
8884
|
+
const J = g.find((xe) => xe.action === "update");
|
|
8875
8885
|
et(
|
|
8876
8886
|
J && J.action === "update" ? J.shapeId : null
|
|
8877
8887
|
);
|
|
@@ -9028,14 +9038,14 @@ function Gu({
|
|
|
9028
9038
|
}
|
|
9029
9039
|
export {
|
|
9030
9040
|
bu as AssignForm,
|
|
9031
|
-
|
|
9041
|
+
Ms as EditorCanvas,
|
|
9032
9042
|
qd as FloorsPanel,
|
|
9033
9043
|
Gu as ImportReviewPanel,
|
|
9034
9044
|
Ou as Inspector,
|
|
9035
9045
|
pu as LeftRail,
|
|
9036
9046
|
Yu as MapEditor,
|
|
9037
9047
|
Ud as floorsScreenTitle,
|
|
9038
|
-
|
|
9048
|
+
Yo as hitTestVertex,
|
|
9039
9049
|
Gc as insertVertex,
|
|
9040
9050
|
bo as isEditorSection,
|
|
9041
9051
|
Xc as moveVertex,
|