@expofp/floorplan 3.5.2 → 3.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/{CookieConsent-SW2eXIC8.js → CookieConsent-7RHQNfPi.js} +8 -8
- package/dist/browser/{Debug-t7OzIN-8.js → Debug-DSE0G1X0.js} +7 -7
- package/dist/browser/{Demo-DJ98mlUr.js → Demo-CGLXtx_J.js} +11 -11
- package/dist/browser/{Free-B9JCPcnr.js → Free-BUwTP1Pf.js} +11 -11
- package/dist/browser/{Gallery-CPBGS9q7.js → Gallery-DOvcwDSP.js} +10 -10
- package/dist/browser/{GpsLoader-vcgurCKn.js → GpsLoader-CaxnWRT4.js} +42 -42
- package/dist/browser/{KioskStore-DzLhE0fK.js → KioskStore-n7sNyISt.js} +36 -36
- package/dist/browser/{MaplibreAdapter-CAGVMAol.js → MaplibreAdapter-DRETosPg.js} +98 -98
- package/dist/browser/{Modal-DBVl72uz.js → Modal-jkCNhc5W.js} +10 -10
- package/dist/browser/{PermissionNotice-BDny4W7h.js → PermissionNotice-CUfYOzWa.js} +7 -7
- package/dist/browser/{SetKioskMode-CjKFTXwj.js → SetKioskMode-BTMes6Qv.js} +11 -11
- package/dist/browser/{ShowKiosk-bwEsTLSP.js → ShowKiosk-f-dRGxyO.js} +10 -10
- package/dist/browser/{TouchHand-DFPQ2vE8.js → TouchHand-CCDAq3if.js} +4 -4
- package/dist/browser/{ViewerMenuPanel-DK-DJHgD.js → ViewerMenuPanel-O7HHZhKd.js} +12 -12
- package/dist/browser/{add-debug-secret-listener-ND2YIuwE.js → add-debug-secret-listener-BpT8IiY7.js} +1 -1
- package/dist/browser/{boolean-editor-BXVL077p.js → boolean-editor-CDMX2vVS.js} +9 -9
- package/dist/browser/{bootIntercom-DLTAHEbT.js → bootIntercom-D_XUSIsZ.js} +2 -2
- package/dist/browser/{browser-V3D46fyx.js → browser-C2T1Beyd.js} +2 -2
- package/dist/browser/bundle.json +59 -56
- package/dist/browser/{classnames-Dxv3Iqu-.js → classnames-bu9CKQ9B.js} +2 -2
- package/dist/browser/{client-C1kJisHy.js → client-CRHe4rvq.js} +4 -4
- package/dist/browser/compat-helper.js +1 -0
- package/dist/browser/{components-B8Qifx-N.js → components-Bo47YnR8.js} +1522 -1514
- package/dist/browser/{createWayfinding-C8Pmd2H5.js → createWayfinding-BadUdVb3.js} +598 -614
- package/dist/browser/{debug-overlay-DWJkUc3u.js → debug-overlay-D1j-kvcX.js} +10 -10
- package/dist/browser/{debug-ui-jAj6--ux.js → debug-ui-DSlWZ4sC.js} +6 -6
- package/dist/browser/{dist-CPyShXna.js → dist-DfuOQuyQ.js} +5 -5
- package/dist/browser/{dist-BHV9ghY4.js → dist-DlacjPUu.js} +6 -6
- package/dist/browser/{dist-DUIasJnS.js → dist-DmKlo6QJ.js} +3 -3
- package/dist/browser/{efp-debug-init-AR3Fvs_0.js → efp-debug-init-Bm0MVP2h.js} +2 -2
- package/dist/browser/{enum-editor-FiZIrNXM.js → enum-editor-siCO7Xfo.js} +11 -11
- package/dist/browser/{event-not-found-BzPx68a_.js → event-not-found-D0nWb3qT.js} +1 -1
- package/dist/browser/{exports-DlEzkzSC.js → exports-B3z1iY3M.js} +1 -1
- package/dist/browser/{favicon-Dobo0b59.js → favicon-CwfYl17D.js} +1 -1
- package/dist/browser/{fetch-retry.umd-CXT8SYkm.js → fetch-retry.umd-0wqPcBus.js} +2 -2
- package/dist/browser/{flex-DGR_Loqd.js → flex-3cepd5kd.js} +5 -5
- package/dist/browser/{floorplan.loader-GMByEo0q.js → floorplan.loader-CMiIp9U5.js} +48 -47
- package/dist/browser/{floorplan.ready-DTwVRPUA.js → floorplan.ready-C1Ih8AXF.js} +232 -232
- package/dist/browser/{fuse-CoX8SCVF.js → fuse-1C6moGnL.js} +2 -2
- package/dist/browser/{i18n-CONnsQk4.js → i18n-s1qY7lAy.js} +570 -543
- package/dist/browser/icons/departure_inactive.svg +5 -0
- package/dist/browser/index.js +11 -11
- package/dist/browser/{jsx-runtime-iIXfJE8d.js → jsx-runtime-DkIKrO9X.js} +2 -2
- package/dist/browser/{lib-CAUtTowO.js → lib-CQEgphr9.js} +4 -4
- package/dist/browser/{main-5p-fstPx.js → main-CIw-sA9x.js} +1 -1
- package/dist/browser/{mobx-CP3094rF.js → mobx-BWVP8GMN.js} +8 -8
- package/dist/browser/{particles.min-BvP0Ecuj.js → particles.min-CGCC5E7s.js} +2 -2
- package/dist/browser/{prop-types-CtPkc8Dm.js → prop-types-BLMbF9Gx.js} +2 -2
- package/dist/browser/{react-DgvgFS2Z.js → react-DWv1jiJx.js} +2 -2
- package/dist/browser/{react-dom-Bi44rMnr.js → react-dom-B1kJrfKr.js} +3 -3
- package/dist/browser/{reset-all-settings-CB8d29KN.js → reset-all-settings-CBz-vDc5.js} +7 -7
- package/dist/browser/{rolldown-runtime-D0nkOxqx.js → rolldown-runtime-r-_hAitn.js} +1 -1
- package/dist/browser/{settings-CTPClT89.js → settings-CGEJf2_B.js} +2 -2
- package/dist/browser/{settings-item-DFxxEXOa.js → settings-item-BbG-b-eF.js} +6 -6
- package/dist/browser/{storage-DvQIEAC7.js → storage-CQsko9cP.js} +5 -5
- package/dist/browser/{store-BlZ4xT_G.js → store-CaZsJa12.js} +5746 -5681
- package/dist/browser/{string-editor-YIMEKgRw.js → string-editor-Baea8YX3.js} +7 -7
- package/dist/browser/{theme-Gip68cNV.js → theme-BHkNtMJn.js} +8 -8
- package/dist/browser/{ui-CZUswZut.js → ui-DmzqbuSF.js} +8 -8
- package/dist/browser/{useRenderTarget-DTeVFvZz.js → useRenderTarget-BGCa_TOt.js} +4 -4
- package/dist/esm/components/Kiosk/integrateKiosk.js +1 -1
- package/dist/esm/components/Map/Map.js +1 -1
- package/dist/esm/components/Map/drawing/config/config-all.js +1 -1
- package/dist/esm/components/Wayfinding.js +1 -1
- package/dist/esm/data/Flags.d.ts +9 -0
- package/dist/esm/services/routing.js +1 -1
- package/dist/esm/store/RootStore.js +1 -1
- package/dist/esm/store/RoutePlannerStore.js +1 -1
- package/dist/esm/store/RouteStore.d.ts +15 -6
- package/dist/esm/store/RouteStore.js +1 -1
- package/dist/esm/store/UIState.d.ts +1 -1
- package/dist/esm/store/UIState.js +1 -1
- package/dist/esm/types.d.ts +1 -1
- package/dist/esm/utils/loadIcons.js +1 -1
- package/dist/esm/wayfinding/adapters/arbitraryPoint.d.ts +28 -0
- package/dist/esm/wayfinding/adapters/arbitraryPoint.js +1 -0
- package/dist/esm/wayfinding/adapters/boothToEndpoint.d.ts +3 -3
- package/dist/esm/wayfinding/adapters/boothToEndpoint.js +1 -1
- package/dist/esm/wayfinding/adapters/canvasIconProvider.js +1 -1
- package/dist/esm/wayfinding/adapters/iconProvider.d.ts +1 -1
- package/dist/esm/wayfinding/adapters/index.d.ts +2 -0
- package/dist/esm/wayfinding/adapters/index.js +1 -1
- package/dist/esm/wayfinding/bindMobxReactions.d.ts +9 -1
- package/dist/esm/wayfinding/bindMobxReactions.js +1 -1
- package/dist/esm/wayfinding/core/createWayfindingEngine.js +1 -1
- package/dist/esm/wayfinding/core/geometry/projectPointOnSegment.d.ts +23 -0
- package/dist/esm/wayfinding/core/geometry/projectPointOnSegment.js +1 -0
- package/dist/esm/wayfinding/core/index.d.ts +6 -3
- package/dist/esm/wayfinding/core/index.js +1 -1
- package/dist/esm/wayfinding/core/position/gpsThreshold.d.ts +9 -0
- package/dist/esm/wayfinding/core/position/gpsThreshold.js +1 -1
- package/dist/esm/wayfinding/core/position/rerouteController.d.ts +10 -0
- package/dist/esm/wayfinding/core/position/rerouteController.js +1 -0
- package/dist/esm/wayfinding/core/position/snapToRoute.d.ts +2 -2
- package/dist/esm/wayfinding/core/position/snapToRoute.js +1 -1
- package/dist/esm/wayfinding/core/routing/{findNearestGraphPoint.d.ts → graphPointResolvers.d.ts} +1 -3
- package/dist/esm/wayfinding/core/routing/graphPointResolvers.js +1 -0
- package/dist/esm/wayfinding/core/routing/resolveWaypointCandidates.d.ts +17 -3
- package/dist/esm/wayfinding/core/routing/resolveWaypointCandidates.js +1 -1
- package/dist/esm/wayfinding/core/types.d.ts +5 -6
- package/dist/esm/wayfinding/createWayfinding.js +1 -1
- package/dist/esm/wayfinding/layers.d.ts +1 -0
- package/dist/esm/wayfinding/layers.js +1 -1
- package/dist/esm/wayfinding/runtime/createWayfindingRuntime.js +1 -1
- package/dist/esm/wayfinding/runtime/endpointView.d.ts +4 -1
- package/dist/esm/wayfinding/runtime/endpointView.js +1 -1
- package/dist/esm/wayfinding/runtime/positionTrailView.d.ts +14 -20
- package/dist/esm/wayfinding/runtime/positionTrailView.js +1 -1
- package/dist/esm/wayfinding/runtime/positionView.d.ts +1 -0
- package/dist/esm/wayfinding/runtime/positionView.js +1 -1
- package/dist/esm/wayfinding/runtime/routeRenderData.d.ts +1 -1
- package/dist/esm/wayfinding/runtime/types.d.ts +1 -0
- package/package.json +9 -3
- package/dist/esm/RouteCutIn.d.ts +0 -23
- package/dist/esm/RouteCutIn.js +0 -1
- package/dist/esm/wayfinding/core/position/shouldReroute.d.ts +0 -3
- package/dist/esm/wayfinding/core/position/shouldReroute.js +0 -1
- package/dist/esm/wayfinding/core/routing/findNearestGraphPoint.js +0 -1
- package/dist/esm/wayfinding/utils/findBoothInRadius.d.ts +0 -4
- package/dist/esm/wayfinding/utils/findBoothInRadius.js +0 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
(function() {
|
|
2
2
|
try {
|
|
3
3
|
var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
|
|
4
|
-
e.SENTRY_RELEASE = { id: "3.
|
|
4
|
+
e.SENTRY_RELEASE = { id: "3.6.1" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
|
-
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "
|
|
6
|
+
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "0868e146-c3fd-4723-85db-71df28e4210e", e._sentryDebugIdIdentifier = "sentry-dbid-0868e146-c3fd-4723-85db-71df28e4210e");
|
|
7
7
|
} catch {}
|
|
8
8
|
})();
|
|
9
|
-
import { r as e } from "./rolldown-runtime-
|
|
10
|
-
import { t } from "./react-
|
|
11
|
-
import { c as n } from "./storage-
|
|
12
|
-
import {
|
|
13
|
-
import { $
|
|
9
|
+
import { r as e } from "./rolldown-runtime-r-_hAitn.js";
|
|
10
|
+
import { t } from "./react-DWv1jiJx.js";
|
|
11
|
+
import { c as n } from "./storage-CQsko9cP.js";
|
|
12
|
+
import { _ as r, ct as i, f as a, j as o } from "./i18n-s1qY7lAy.js";
|
|
13
|
+
import { $ as s, At as c, B as l, Bt as u, Ct as d, F as f, Ft as p, G as m, Gt as h, H as g, I as _, It as v, J as y, K as b, Kt as x, Lt as S, Nt as C, Ot as w, Pt as T, Q as E, R as D, Tt as O, U as k, V as A, Vt as ee, W as j, X as M, Z as te, an as ne, at as re, bt as ie, c as ae, cn as oe, en as se, et as ce, gt as le, i as N, jt as ue, kt as P, nt as de, o as F, on as fe, q as pe, rn as me, rt as he, s as I, sn as L, t as R, tt as ge, ut as z, vt as _e, wt as ve, z as ye, zt as be } from "./store-CaZsJa12.js";
|
|
14
14
|
//#region src/wayfinding/layers.ts
|
|
15
|
-
var
|
|
16
|
-
function
|
|
17
|
-
let t = [], n = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = [], o = e.scene.rootLayer.children.find((e) => e.name ===
|
|
15
|
+
var xe = "wf-points", Se = "wf-trail-points", Ce = "wf-lines", we = "wf-lines-animated", Te = "wf-current-position", Ee = "_selected", De = "markers";
|
|
16
|
+
function Oe(e) {
|
|
17
|
+
let t = [], n = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = [], o = e.scene.rootLayer.children.find((e) => e.name === De);
|
|
18
18
|
async function s(e) {
|
|
19
19
|
let t = [];
|
|
20
20
|
e.forEach((e) => {
|
|
@@ -35,153 +35,153 @@ function xe(e) {
|
|
|
35
35
|
t.push(l), c.src = i, c.crossOrigin = "anonymous";
|
|
36
36
|
}), await Promise.all(t);
|
|
37
37
|
}
|
|
38
|
-
let c = (e) => `marker-ptScaleHandlers-${e.id}`, l = (e) => `marker-rollHandlers-${e.id}`,
|
|
38
|
+
let c = (e) => `marker-ptScaleHandlers-${e.id}`, l = (e) => `marker-rollHandlers-${e.id}`, f = (t, n) => {
|
|
39
39
|
e.onPtScale(n, (e) => {
|
|
40
40
|
let { center: n, rotation: r } = t.bounds, { width: i, height: a } = t.source;
|
|
41
|
-
return t.bounds =
|
|
41
|
+
return t.bounds = u(n.x, n.y, i, a, e, r), t;
|
|
42
42
|
});
|
|
43
|
-
},
|
|
43
|
+
}, p = (t, n) => {
|
|
44
44
|
e.onRoll(n, (e) => (t.bounds.rotation = e, t));
|
|
45
45
|
};
|
|
46
|
-
function
|
|
46
|
+
function m() {
|
|
47
47
|
let t = F.routeStore.markersData.markers;
|
|
48
48
|
if (!t.length) return;
|
|
49
49
|
a = [];
|
|
50
|
-
let r = e.scale, s =
|
|
50
|
+
let r = e.scale, s = d(e.angle);
|
|
51
51
|
t.forEach((e) => {
|
|
52
52
|
var t, o;
|
|
53
53
|
let c = n.get(e.icon);
|
|
54
54
|
if (!c) return;
|
|
55
|
-
let l = c.scale || window.devicePixelRatio,
|
|
56
|
-
if (!i.has(
|
|
57
|
-
let e =
|
|
58
|
-
i.set(
|
|
55
|
+
let l = c.scale || window.devicePixelRatio, d = e.icon;
|
|
56
|
+
if (!i.has(d)) {
|
|
57
|
+
let e = h(c.img, c.width, c.height, l);
|
|
58
|
+
i.set(d, e);
|
|
59
59
|
}
|
|
60
|
-
let
|
|
61
|
-
if (!i.has(
|
|
62
|
-
let e =
|
|
63
|
-
i.set(
|
|
60
|
+
let f = i.get(d), p = n.get(e.selectedIcon), m = e.selectedIcon;
|
|
61
|
+
if (!i.has(m)) {
|
|
62
|
+
let e = h(p.img, p.width, p.height, l);
|
|
63
|
+
i.set(m, e);
|
|
64
64
|
}
|
|
65
|
-
let
|
|
65
|
+
let g = i.get(m), _ = (t = (o = N.findLayer(e.z)) == null ? void 0 : o.visible) == null ? !0 : t, v = u(e.x, e.y, f.width, f.height, r, s), y = u(e.x, e.y, g.width, g.height, r, s), b;
|
|
66
66
|
switch (e.position) {
|
|
67
67
|
case "lefttop":
|
|
68
|
-
|
|
68
|
+
b = [0, 0];
|
|
69
69
|
break;
|
|
70
70
|
case "centertop":
|
|
71
|
-
|
|
71
|
+
b = [.5, 0];
|
|
72
72
|
break;
|
|
73
73
|
case "centerbottom":
|
|
74
|
-
|
|
74
|
+
b = [.5, 1];
|
|
75
75
|
break;
|
|
76
|
-
default:
|
|
76
|
+
default: b = [.5, .5];
|
|
77
77
|
}
|
|
78
|
-
let
|
|
79
|
-
...
|
|
80
|
-
hidden: !
|
|
81
|
-
origin:
|
|
78
|
+
let x = {
|
|
79
|
+
...P(f, v, {
|
|
80
|
+
hidden: !_,
|
|
81
|
+
origin: b
|
|
82
82
|
}),
|
|
83
83
|
id: e.id,
|
|
84
84
|
scale: l
|
|
85
|
-
},
|
|
86
|
-
...
|
|
87
|
-
hidden: !(
|
|
88
|
-
origin:
|
|
85
|
+
}, S = {
|
|
86
|
+
...P(g, y, {
|
|
87
|
+
hidden: !(_ && e.active),
|
|
88
|
+
origin: b
|
|
89
89
|
}),
|
|
90
|
-
id: `${e.id}${
|
|
90
|
+
id: `${e.id}${Ee}`,
|
|
91
91
|
scale: l
|
|
92
92
|
};
|
|
93
|
-
a.push(
|
|
93
|
+
a.push(x, S);
|
|
94
94
|
}), o.children = a, a.forEach((e) => {
|
|
95
|
-
|
|
95
|
+
f(e, c(e)), p(e, l(e));
|
|
96
96
|
});
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function g() {
|
|
99
99
|
a.forEach((t) => {
|
|
100
100
|
e.ptScaleRegistry.unregisterByName(c(t)), e.rollRegistry.unregisterByName(l(t));
|
|
101
101
|
}), o.children = [], a = [];
|
|
102
102
|
}
|
|
103
|
-
function
|
|
103
|
+
function _() {
|
|
104
104
|
let e = F.routeStore.markersData.markers;
|
|
105
105
|
e.length && e.forEach((e) => {
|
|
106
106
|
var t, n;
|
|
107
|
-
let r = a.find((t) => t.id === e.id), i = a.find((t) => t.id === `${e.id}${
|
|
107
|
+
let r = a.find((t) => t.id === e.id), i = a.find((t) => t.id === `${e.id}${Ee}`);
|
|
108
108
|
if (!r) return;
|
|
109
|
-
let o = (t = (n =
|
|
109
|
+
let o = (t = (n = N.findLayer(e.z)) == null ? void 0 : n.visible) == null ? !0 : t;
|
|
110
110
|
e.active ? (r.hidden = !0, i.hidden = !(o && e.active)) : (r.hidden = !o, i.hidden = !0);
|
|
111
111
|
});
|
|
112
112
|
}
|
|
113
113
|
return t.push(r(() => [F.routeStore.selectedMarkers, F.layerStore.visible], () => {
|
|
114
114
|
if (!F.routeStore.markersData.markers.length) {
|
|
115
|
-
|
|
115
|
+
g(), e.update(o);
|
|
116
116
|
return;
|
|
117
117
|
}
|
|
118
|
-
|
|
118
|
+
_(), e.update(...a);
|
|
119
119
|
})), t.push(r(() => F.routeStore.markersData.markers, () => {
|
|
120
120
|
s(F.routeStore.markersData.icons).then(() => {
|
|
121
|
-
|
|
121
|
+
m(), e.update(o);
|
|
122
122
|
});
|
|
123
123
|
}, { fireImmediately: !0 })), function() {
|
|
124
124
|
t.forEach((e) => e()), t.length = 0;
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function ke(e, t, n) {
|
|
128
128
|
for (let r of F.routeStore.markersData.markers) {
|
|
129
129
|
let i = F.routeStore.markersData.icons.find((e) => e.name === r.icon);
|
|
130
130
|
if (!i) continue;
|
|
131
131
|
let a = i.width * n * devicePixelRatio, o = i.height * n * devicePixelRatio;
|
|
132
|
-
if (
|
|
132
|
+
if (Ae(e, t, r.x, r.y, a, o)) {
|
|
133
133
|
let e = F.layerStore.findLayer(r.z);
|
|
134
134
|
if (!e || e && e.visible) return r;
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
return null;
|
|
138
138
|
}
|
|
139
|
-
function
|
|
139
|
+
function Ae(e, t, n, r, i, a) {
|
|
140
140
|
let o = e >= n - i && e <= n + i, s = t >= r - a && t <= r + a;
|
|
141
141
|
return o && s;
|
|
142
142
|
}
|
|
143
143
|
//#endregion
|
|
144
144
|
//#region src/components/Map/traffic/trafficLayers.ts
|
|
145
|
-
var
|
|
146
|
-
function
|
|
145
|
+
var je = "traffic_route", Me = "traffic_route_stop", Ne = "traffic_vehicles", Pe = "build_route_lines", Fe = "build_route_dots", Ie = 5;
|
|
146
|
+
function Le() {
|
|
147
147
|
let e = [];
|
|
148
|
-
for (let t = 0; t <
|
|
149
|
-
name:
|
|
148
|
+
for (let t = 0; t < Ie; t++) e.push({
|
|
149
|
+
name: Re(t),
|
|
150
150
|
children: []
|
|
151
151
|
}), e.push({
|
|
152
|
-
name:
|
|
152
|
+
name: ze(t),
|
|
153
153
|
children: [],
|
|
154
154
|
interactive: !0
|
|
155
155
|
});
|
|
156
156
|
return e.push({
|
|
157
|
-
name:
|
|
157
|
+
name: Ne,
|
|
158
158
|
children: [],
|
|
159
159
|
interactive: !0
|
|
160
160
|
}), e.push({
|
|
161
|
-
name:
|
|
161
|
+
name: Pe,
|
|
162
162
|
children: []
|
|
163
163
|
}), e.push({
|
|
164
|
-
name:
|
|
164
|
+
name: Fe,
|
|
165
165
|
children: [],
|
|
166
166
|
interactive: !0
|
|
167
167
|
}), e;
|
|
168
168
|
}
|
|
169
|
-
function
|
|
170
|
-
return `${
|
|
169
|
+
function Re(e) {
|
|
170
|
+
return `${je}_${e + 1}`;
|
|
171
171
|
}
|
|
172
|
-
function
|
|
173
|
-
return `${
|
|
172
|
+
function ze(e) {
|
|
173
|
+
return `${Me}_${e + 1}`;
|
|
174
174
|
}
|
|
175
|
-
function
|
|
176
|
-
return RegExp(`^${
|
|
175
|
+
function Be() {
|
|
176
|
+
return RegExp(`^${je}_\\d+$`);
|
|
177
177
|
}
|
|
178
|
-
function
|
|
179
|
-
return RegExp(`^${
|
|
178
|
+
function Ve() {
|
|
179
|
+
return RegExp(`^${Me}_\\d+$`);
|
|
180
180
|
}
|
|
181
181
|
//#endregion
|
|
182
182
|
//#region src/utils/geometry.ts
|
|
183
|
-
var
|
|
184
|
-
function
|
|
183
|
+
var He = /* @__PURE__ */ e(oe(), 1);
|
|
184
|
+
function Ue(e, t, n) {
|
|
185
185
|
let [r, i] = n[0], [a, o] = n[1], [s, c] = n[2], l = (o - c) * (r - s) + (s - a) * (i - c);
|
|
186
186
|
if (l === 0) return !1;
|
|
187
187
|
let u = ((o - c) * (e - s) + (s - a) * (t - c)) / l, d = ((c - i) * (e - s) + (r - s) * (t - c)) / l, f = 1 - u - d;
|
|
@@ -189,19 +189,19 @@ function Ie(e, t, n) {
|
|
|
189
189
|
}
|
|
190
190
|
//#endregion
|
|
191
191
|
//#region src/components/Map/drawing/config/config-booth-badge.ts
|
|
192
|
-
var
|
|
193
|
-
function
|
|
194
|
-
return e.length <=
|
|
192
|
+
var We = .5, Ge = .3, Ke = 15, qe = 24, Je = 30, Ye = 12, Xe = .8, Ze = document.createElement("canvas").getContext("2d");
|
|
193
|
+
function Qe(e) {
|
|
194
|
+
return e.length <= Ke ? e : e.slice(0, Ke - 1) + "…";
|
|
195
195
|
}
|
|
196
|
-
function
|
|
196
|
+
function $e(e) {
|
|
197
197
|
var t, n;
|
|
198
198
|
if (!((t = e.paths) != null && t.length)) return [];
|
|
199
199
|
let r = ((n = e.layer) == null ? void 0 : n.name) || "", i = [];
|
|
200
|
-
for (let t of e.paths) for (let e of
|
|
200
|
+
for (let t of e.paths) for (let e of me(t.index, r)) i.push(e);
|
|
201
201
|
return i;
|
|
202
202
|
}
|
|
203
|
-
function
|
|
204
|
-
let t =
|
|
203
|
+
function et(e) {
|
|
204
|
+
let t = $e(e);
|
|
205
205
|
if (!t.length) return null;
|
|
206
206
|
let n = Infinity, r = Infinity, i = -Infinity, a = -Infinity;
|
|
207
207
|
for (let e of t) for (let t of e) t[0] < n && (n = t[0]), t[1] < r && (r = t[1]), t[0] > i && (i = t[0]), t[1] > a && (a = t[1]);
|
|
@@ -212,25 +212,25 @@ function qe(e) {
|
|
|
212
212
|
h: a - r
|
|
213
213
|
} : null;
|
|
214
214
|
}
|
|
215
|
-
function
|
|
216
|
-
for (let r of n) if (
|
|
215
|
+
function B(e, t, n) {
|
|
216
|
+
for (let r of n) if (Ue(e, t, r)) return !0;
|
|
217
217
|
return !1;
|
|
218
218
|
}
|
|
219
|
-
function
|
|
220
|
-
if (!e.length || !
|
|
219
|
+
function tt(e, t, n, r, i, a) {
|
|
220
|
+
if (!e.length || !B(t, n, e)) return a;
|
|
221
221
|
let o = 0, s = a;
|
|
222
222
|
for (let a = 0; a < 10; a++) {
|
|
223
223
|
let a = (o + s) / 2, c = r * a, l = i * a;
|
|
224
|
-
|
|
224
|
+
B(t + c, n, e) && B(t, n + l, e) && B(t + c, n + l, e) ? o = a : s = a;
|
|
225
225
|
}
|
|
226
226
|
return o;
|
|
227
227
|
}
|
|
228
|
-
function
|
|
228
|
+
function nt(e) {
|
|
229
229
|
var t;
|
|
230
|
-
return (t =
|
|
230
|
+
return (t = et(e)) == null ? e.rect : t;
|
|
231
231
|
}
|
|
232
|
-
function
|
|
233
|
-
let i =
|
|
232
|
+
function rt(e, t, n, r) {
|
|
233
|
+
let i = nt(e);
|
|
234
234
|
if (t.length) {
|
|
235
235
|
let e = /* @__PURE__ */ new Set(), r = null, a = Infinity;
|
|
236
236
|
for (let o of t) for (let s of o) {
|
|
@@ -238,7 +238,7 @@ function Xe(e, t, n, r) {
|
|
|
238
238
|
if (e.has(o)) continue;
|
|
239
239
|
e.add(o);
|
|
240
240
|
let c = s[0] + n, l = s[1] + n;
|
|
241
|
-
if (
|
|
241
|
+
if (B(c, l, t)) {
|
|
242
242
|
let e = c - i.x1 + (l - i.y1);
|
|
243
243
|
e < a && (a = e, r = {
|
|
244
244
|
x: c,
|
|
@@ -259,57 +259,57 @@ function Xe(e, t, n, r) {
|
|
|
259
259
|
y: e.rect.cy + l * c + u * s
|
|
260
260
|
};
|
|
261
261
|
}
|
|
262
|
-
function
|
|
262
|
+
function V(e) {
|
|
263
263
|
return e && e !== "none" ? e : void 0;
|
|
264
264
|
}
|
|
265
|
-
function
|
|
265
|
+
function it(e) {
|
|
266
266
|
var t;
|
|
267
|
-
let n =
|
|
268
|
-
return ((t = e.paths) == null ? void 0 : t.length) > 1 &&
|
|
269
|
-
}
|
|
270
|
-
function
|
|
271
|
-
let n =
|
|
272
|
-
|
|
273
|
-
let c =
|
|
274
|
-
let n = e / 2, r = t / 2, i =
|
|
275
|
-
return new
|
|
267
|
+
let n = V(e.borderColor) || V(fe.boothBorderColor) || fe.colors.booths.default;
|
|
268
|
+
return ((t = e.paths) == null ? void 0 : t.length) > 1 && V(e.paths[e.paths.length - 1].color) || n;
|
|
269
|
+
}
|
|
270
|
+
function at(e, t) {
|
|
271
|
+
let n = Qe(t.title || t.name), i = it(t), a = ae((0, He.default)(i).hex()), o = window.devicePixelRatio || 1, s = ve();
|
|
272
|
+
Ze.font = x(Je, s);
|
|
273
|
+
let c = Ze.measureText(n).width, l = Math.ceil(c + Ye * 2), u = (t.borderWidth || R.borderWidth) / 2, d = l * Xe, f = 54 * Xe, m = t.rotate ? -t.rotate : 0, h = t.rect.w, g = t.rect.h, _ = Math.min(h > 0 ? h * We / d : Infinity, g > 0 ? g * Ge / f : Infinity), v = $e(t), { x: y, y: b } = rt(t, v, u, m), S = tt(v, y, b, d, f, _), w = Math.cos(m), E = Math.sin(m), D = (e, t) => {
|
|
274
|
+
let n = e / 2, r = t / 2, i = y + n * w - r * E, a = b + n * E + r * w;
|
|
275
|
+
return new ee({
|
|
276
276
|
x: i - n,
|
|
277
277
|
y: a - r
|
|
278
278
|
}, {
|
|
279
279
|
x: i + n,
|
|
280
280
|
y: a + r
|
|
281
|
-
},
|
|
282
|
-
},
|
|
283
|
-
let t = Math.min(e,
|
|
284
|
-
return D(
|
|
285
|
-
},
|
|
286
|
-
|
|
287
|
-
let
|
|
281
|
+
}, m);
|
|
282
|
+
}, k = (e) => {
|
|
283
|
+
let t = Math.min(e, S);
|
|
284
|
+
return D(d * t, f * t);
|
|
285
|
+
}, A = O(s, e.fontUrls), j = C(D(1, 1), i);
|
|
286
|
+
j.hidden = !0, j.dim = t.skipDim ? !1 : void 0;
|
|
287
|
+
let M = T(p([[n], []], a, 0, [A, A]), D(1, 1), [0, 0], {
|
|
288
288
|
horizontal: "center",
|
|
289
289
|
vertical: "center"
|
|
290
290
|
});
|
|
291
|
-
|
|
292
|
-
let
|
|
291
|
+
M.hidden = !0, M.dim = t.skipDim ? !1 : void 0;
|
|
292
|
+
let te = () => !!(t.layer && !t.layer.visible);
|
|
293
293
|
return r(() => t.skipDim, (t) => {
|
|
294
|
-
|
|
294
|
+
j.dim = t ? !1 : void 0, M.dim = t ? !1 : void 0, e.update(j, M);
|
|
295
295
|
}), r(() => {
|
|
296
296
|
var e, n;
|
|
297
297
|
return (e = (n = t.layer) == null ? void 0 : n.visible) == null ? !0 : e;
|
|
298
298
|
}, (t) => {
|
|
299
|
-
|
|
300
|
-
}), e.onPtScale(`badge-bg-${t.id}`, (e) => (
|
|
301
|
-
let t = Math.min(e,
|
|
302
|
-
return
|
|
299
|
+
j.hidden = !t, M.hidden = !t, e.update(j, M);
|
|
300
|
+
}), e.onPtScale(`badge-bg-${t.id}`, (e) => (j.shape = k(e), j.hidden = te(), j)), e.onPtScale(`badge-text-${t.id}`, (e) => {
|
|
301
|
+
let t = Math.min(e, S);
|
|
302
|
+
return M.lines[0].fontSize = qe / o * t, M.bounds = k(e), M.hidden = te(), M;
|
|
303
303
|
}), {
|
|
304
|
-
bg:
|
|
305
|
-
text:
|
|
304
|
+
bg: j,
|
|
305
|
+
text: M
|
|
306
306
|
};
|
|
307
307
|
}
|
|
308
|
-
function
|
|
309
|
-
if (
|
|
308
|
+
function ot(e, t, n) {
|
|
309
|
+
if (ne.hideExhibitorBoothNumber) return null;
|
|
310
310
|
let r = [], i = [];
|
|
311
|
-
for (let t of n) if (t instanceof
|
|
312
|
-
let { bg: n, text: a } =
|
|
311
|
+
for (let t of n) if (t instanceof se && t.noLabels && !I.hideLogoInBooth && t.exhibitors.some((e) => e.logoInBooth && e.logo)) {
|
|
312
|
+
let { bg: n, text: a } = at(e, t);
|
|
313
313
|
r.push(n), i.push(a);
|
|
314
314
|
}
|
|
315
315
|
return r.length ? {
|
|
@@ -325,36 +325,37 @@ function $e(e, t, n) {
|
|
|
325
325
|
}
|
|
326
326
|
//#endregion
|
|
327
327
|
//#region src/components/Map/drawing/config/config-all.ts
|
|
328
|
-
function
|
|
328
|
+
function st(e) {
|
|
329
329
|
let { layers: t, defaultLayer: n } = F.layerStore;
|
|
330
330
|
if (n) {
|
|
331
331
|
let e = [].concat(t), r = t.find((e) => e === n), i = t.indexOf(r);
|
|
332
332
|
e.splice(i, 1), t = [r].concat(e);
|
|
333
333
|
}
|
|
334
|
-
let r = t.filter((e) => !e.rootParent).map((t) =>
|
|
334
|
+
let r = t.filter((e) => !e.rootParent).map((t) => ie(t, e));
|
|
335
335
|
return Promise.all(r).then((t) => {
|
|
336
|
-
let n =
|
|
336
|
+
let n = c(xe, [], {
|
|
337
337
|
dim: !1,
|
|
338
338
|
interactive: !0
|
|
339
|
-
}), r =
|
|
340
|
-
for (let e of t.flat())
|
|
341
|
-
let
|
|
339
|
+
}), r = c(Ce, [], { dim: !1 }), i = c(De, []), a = c(Se, [], { dim: !1 }), o = c(we, [], { dim: !1 }), s = c(Te, [], { dim: !1 }), l = [], u = [];
|
|
340
|
+
for (let e of t.flat()) le(e.name) ? (e.dim = !1, u.push(e)) : l.push(e);
|
|
341
|
+
let d = ot(e, "root", F.boothStore.booths);
|
|
342
342
|
return [
|
|
343
|
-
...
|
|
344
|
-
...
|
|
345
|
-
...
|
|
346
|
-
...
|
|
343
|
+
...l,
|
|
344
|
+
...d ? [d] : [],
|
|
345
|
+
...u,
|
|
346
|
+
...Le(),
|
|
347
347
|
i,
|
|
348
348
|
a,
|
|
349
349
|
r,
|
|
350
350
|
o,
|
|
351
|
-
n
|
|
351
|
+
n,
|
|
352
|
+
s
|
|
352
353
|
];
|
|
353
354
|
});
|
|
354
355
|
}
|
|
355
356
|
//#endregion
|
|
356
357
|
//#region src/components/Map/traffic/UpdateQueue.ts
|
|
357
|
-
var
|
|
358
|
+
var H = /* @__PURE__ */ e(t(), 1), ct = class {
|
|
358
359
|
constructor() {
|
|
359
360
|
this.queue = [], this.isProcessing = !1, this.rafId = null, this.CHUNK_SIZE = 100, this.TIME_BUDGET = 4;
|
|
360
361
|
}
|
|
@@ -396,7 +397,7 @@ var V = /* @__PURE__ */ e(t(), 1), tt = class {
|
|
|
396
397
|
destroy() {
|
|
397
398
|
this.rafId !== null && (cancelAnimationFrame(this.rafId), this.rafId = null), this.queue = [], this.isProcessing = !1;
|
|
398
399
|
}
|
|
399
|
-
},
|
|
400
|
+
}, U = 49, lt = `hsl(257, 76%, ${U}%)`, ut = `hsl(339.903, 82%, ${U}%)`, dt = `hsl(257, 76%, ${Math.round(U * 1.82)}%)`, W = 4, ft = W, pt = "U", mt = "R", ht = "S", gt = "P", _t = class {
|
|
400
401
|
constructor() {
|
|
401
402
|
this._state = [[]], this.index = 0, this.pointHashSet = /* @__PURE__ */ new Set(), this.locked = !1, this.storageKey = "expofp_build_route_state", this._selected = 0;
|
|
402
403
|
}
|
|
@@ -435,10 +436,10 @@ var V = /* @__PURE__ */ e(t(), 1), tt = class {
|
|
|
435
436
|
instruct() {
|
|
436
437
|
this.log(`How to Build a Route:
|
|
437
438
|
Add Point: Click on the map.
|
|
438
|
-
Apply Smoothing: Press ${
|
|
439
|
-
Apply Simplification: Press ${
|
|
440
|
-
Undo: Press ${
|
|
441
|
-
Enable/Disable Preview: Press ${
|
|
439
|
+
Apply Smoothing: Press ${mt}.
|
|
440
|
+
Apply Simplification: Press ${ht}.
|
|
441
|
+
Undo: Press ${pt}.
|
|
442
|
+
Enable/Disable Preview: Press ${gt}.
|
|
442
443
|
`, 16);
|
|
443
444
|
}
|
|
444
445
|
applyChaikinSmoothing(e, t, n) {
|
|
@@ -532,96 +533,96 @@ Enable/Disable Preview: Press ${lt}.
|
|
|
532
533
|
this._selected = Math.max(0, Math.min(e, this.points.length - 1));
|
|
533
534
|
}
|
|
534
535
|
};
|
|
535
|
-
function
|
|
536
|
-
let n = (0,
|
|
536
|
+
function vt({ enabled: e, rendererService: t }) {
|
|
537
|
+
let n = (0, H.useRef)(!1), r = (0, H.useRef)(), i = (0, H.useMemo)(() => be(W, lt), []), a = (0, H.useMemo)(() => be(W, ut), []), o = (0, H.useMemo)(() => new _t(), []), s = (0, H.useRef)(new ct()), c = (0, H.useMemo)(() => {
|
|
537
538
|
if (!t.scene) return {};
|
|
538
539
|
let e = t.scene.rootLayer.children;
|
|
539
540
|
return {
|
|
540
|
-
linesLayer: e.find((e) => e.name ===
|
|
541
|
-
pointsLayer: e.find((e) => e.name ===
|
|
541
|
+
linesLayer: e.find((e) => e.name === Pe),
|
|
542
|
+
pointsLayer: e.find((e) => e.name === Fe)
|
|
542
543
|
};
|
|
543
|
-
}, [t.scene]),
|
|
544
|
-
if (!(t != null && t.renderer) || !
|
|
545
|
-
let { linesLayer: e, pointsLayer:
|
|
546
|
-
if (!e || !
|
|
547
|
-
let
|
|
548
|
-
|
|
544
|
+
}, [t.scene]), l = (0, H.useCallback)(() => {
|
|
545
|
+
if (!(t != null && t.renderer) || !c || !i || !a) return;
|
|
546
|
+
let { linesLayer: e, pointsLayer: l } = c;
|
|
547
|
+
if (!e || !l) return;
|
|
548
|
+
let d = o.points, f = n.current;
|
|
549
|
+
f ? l.children.length = 0 : l.children = d.map(({ x: e, y: t }, n) => {
|
|
549
550
|
let s = n == o.selected ? a : i;
|
|
550
551
|
return {
|
|
551
552
|
source: s,
|
|
552
|
-
bounds:
|
|
553
|
+
bounds: u(e, t, s.width, s.height, r.current)
|
|
553
554
|
};
|
|
554
555
|
});
|
|
555
|
-
let
|
|
556
|
-
for (let e = 1; e <
|
|
557
|
-
let t =
|
|
558
|
-
|
|
556
|
+
let p = [];
|
|
557
|
+
for (let e = 1; e < d.length; e++) {
|
|
558
|
+
let t = d[e - 1], n = d[e];
|
|
559
|
+
p.push({
|
|
559
560
|
points: [t, n],
|
|
560
|
-
color:
|
|
561
|
-
width:
|
|
561
|
+
color: f ? lt : dt,
|
|
562
|
+
width: ft
|
|
562
563
|
});
|
|
563
564
|
}
|
|
564
|
-
|
|
565
|
+
p.length ? e.children = p : e.children.length = 0, s.current.add(() => t.update(l, e)), o.instruct(), o.log(JSON.stringify(o.points));
|
|
565
566
|
}, [
|
|
566
567
|
t,
|
|
567
568
|
o,
|
|
568
|
-
|
|
569
|
+
c,
|
|
569
570
|
i,
|
|
570
571
|
a
|
|
571
|
-
]), d = (0,
|
|
572
|
+
]), d = (0, H.useCallback)((e) => {
|
|
572
573
|
let t = e.key.toUpperCase();
|
|
573
574
|
o.execute(() => {
|
|
574
575
|
switch (t) {
|
|
575
|
-
case
|
|
576
|
-
e.preventDefault(), o.undo(), n.current = !1,
|
|
576
|
+
case pt:
|
|
577
|
+
e.preventDefault(), o.undo(), n.current = !1, l();
|
|
577
578
|
break;
|
|
578
|
-
case
|
|
579
|
-
e.preventDefault(), o.applySmoothing(), n.current = !1,
|
|
579
|
+
case mt:
|
|
580
|
+
e.preventDefault(), o.applySmoothing(), n.current = !1, l();
|
|
580
581
|
break;
|
|
581
|
-
case
|
|
582
|
-
e.preventDefault(), o.applySimplification(), n.current = !1,
|
|
582
|
+
case ht:
|
|
583
|
+
e.preventDefault(), o.applySimplification(), n.current = !1, l();
|
|
583
584
|
break;
|
|
584
|
-
case
|
|
585
|
-
e.preventDefault(), n.current = !n.current,
|
|
585
|
+
case gt:
|
|
586
|
+
e.preventDefault(), n.current = !n.current, l();
|
|
586
587
|
break;
|
|
587
588
|
}
|
|
588
589
|
});
|
|
589
|
-
}, [o,
|
|
590
|
-
if (!
|
|
591
|
-
let { pointsLayer: i } =
|
|
590
|
+
}, [o, l]), f = (0, H.useCallback)(({ ptScale: e, sceneId: n }) => {
|
|
591
|
+
if (!v(n) || !(t != null && t.renderer) || !c) return;
|
|
592
|
+
let { pointsLayer: i } = c;
|
|
592
593
|
i && (r.current = e, o.execute(() => {
|
|
593
594
|
let e = i.children, n = [];
|
|
594
595
|
for (let t = 0; t < e.length; t++) {
|
|
595
596
|
let i = e[t];
|
|
596
|
-
i.bounds =
|
|
597
|
+
i.bounds = u(i.bounds.center.x, i.bounds.center.y, i.source.width, i.source.height, r.current), n.push(i);
|
|
597
598
|
}
|
|
598
|
-
|
|
599
|
+
s.current.add(() => t.update(...n));
|
|
599
600
|
}));
|
|
600
601
|
}, [
|
|
601
602
|
t,
|
|
602
|
-
|
|
603
|
+
c,
|
|
603
604
|
o
|
|
604
|
-
]), p = (0,
|
|
605
|
+
]), p = (0, H.useCallback)(({ data: e }) => {
|
|
605
606
|
o.execute(() => {
|
|
606
|
-
let { point: t } =
|
|
607
|
+
let { point: t } = S(e);
|
|
607
608
|
o.add({
|
|
608
609
|
x: t.x,
|
|
609
610
|
y: t.y
|
|
610
|
-
}), o.select(o.points.length - 1),
|
|
611
|
+
}), o.select(o.points.length - 1), l();
|
|
611
612
|
});
|
|
612
|
-
}, [o,
|
|
613
|
-
(0,
|
|
613
|
+
}, [o, l]);
|
|
614
|
+
(0, H.useEffect)(() => {
|
|
614
615
|
let n = t.renderer;
|
|
615
616
|
if (!(!e || !n)) return r.current = t.scale, o.execute(() => {
|
|
616
|
-
o.restore(),
|
|
617
|
+
o.restore(), l();
|
|
617
618
|
}), n.events.addEventListener("pointer:click", p), n.events.addEventListener("viewport:ptscale", f), window.addEventListener("keyup", d), () => {
|
|
618
|
-
window.removeEventListener("keyup", d), n.events.removeEventListener("pointer:click", p), n.events.removeEventListener("viewport:ptscale", f),
|
|
619
|
+
window.removeEventListener("keyup", d), n.events.removeEventListener("pointer:click", p), n.events.removeEventListener("viewport:ptscale", f), s.current.destroy();
|
|
619
620
|
};
|
|
620
621
|
}, [
|
|
621
622
|
e,
|
|
622
623
|
t,
|
|
623
624
|
o,
|
|
624
|
-
|
|
625
|
+
l,
|
|
625
626
|
p,
|
|
626
627
|
f,
|
|
627
628
|
d
|
|
@@ -629,12 +630,12 @@ function dt({ enabled: e, rendererService: t }) {
|
|
|
629
630
|
}
|
|
630
631
|
//#endregion
|
|
631
632
|
//#region src/components/Map/traffic/useManageTraffic.ts
|
|
632
|
-
var
|
|
633
|
-
function
|
|
634
|
-
let
|
|
635
|
-
(0,
|
|
636
|
-
let
|
|
637
|
-
async function
|
|
633
|
+
var G = 2, yt = G * 3.5, K = G * 12, bt = K * .7, xt = 8, St = "transport_locations", Ct = 150, q = "#a4aab6", wt = 1e3, Tt = 2e4, Et = 500;
|
|
634
|
+
function Dt({ permission: e, rendererService: t, dataJsonUrl: r, websocketUrl: i }) {
|
|
635
|
+
let a = (0, H.useRef)(window.devicePixelRatio), s = (0, H.useRef)(/* @__PURE__ */ new Map()), c = (0, H.useRef)(/* @__PURE__ */ new Map()), l = (0, H.useRef)(), d = (0, H.useRef)(), f = (0, H.useRef)(performance.now()), p = (0, H.useRef)(1), m = (0, H.useRef)(new ct()), g = (0, H.useRef)(/* @__PURE__ */ new Map()), _ = (0, H.useRef)(), y = (0, H.useRef)(wt), b = (0, H.useRef)(/* @__PURE__ */ new Map()), x = (0, H.useRef)();
|
|
636
|
+
(0, H.useEffect)(() => {
|
|
637
|
+
let S;
|
|
638
|
+
async function C() {
|
|
638
639
|
if (!(!e || !t.scene)) try {
|
|
639
640
|
let e;
|
|
640
641
|
try {
|
|
@@ -648,219 +649,219 @@ function bt({ permission: e, rendererService: t, dataJsonUrl: r, websocketUrl: a
|
|
|
648
649
|
console.warn("useManageTraffic failed to get JSON", e);
|
|
649
650
|
}
|
|
650
651
|
if (!e || e != null && e.disabled || e != null && e.error) return;
|
|
651
|
-
|
|
652
|
-
let
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
radius:
|
|
652
|
+
a.current = Ot(t.scale);
|
|
653
|
+
let i = new Map(e.routes.map(({ id: e, color: t }) => [e, t])), l = t.scene.rootLayer.children, y = /* @__PURE__ */ new Map();
|
|
654
|
+
i.forEach((e) => {
|
|
655
|
+
y.set(e, jt({
|
|
656
|
+
radius: yt,
|
|
656
657
|
color: e,
|
|
657
658
|
scale: window.devicePixelRatio
|
|
658
659
|
}));
|
|
659
660
|
});
|
|
660
|
-
let
|
|
661
|
-
e.routes.slice(0,
|
|
662
|
-
|
|
663
|
-
let c =
|
|
661
|
+
let x = Be(), C = l.filter((e) => x.test(e.name)), T = Ve(), D = l.filter((e) => T.test(e.name));
|
|
662
|
+
e.routes.slice(0, C.length).forEach(({ id: e, color: n, path: r, stops: i, hiddenPoints: o }, s) => {
|
|
663
|
+
g.current.set(e, r);
|
|
664
|
+
let c = C[s];
|
|
664
665
|
if (c) {
|
|
665
666
|
var l;
|
|
666
|
-
let e = new Map((l =
|
|
667
|
+
let e = new Map((l = o == null ? void 0 : o.map((e) => [zt(e), e])) == null ? [] : l);
|
|
667
668
|
for (let t = 1; t < r.length; t++) {
|
|
668
669
|
let i = r[t - 1], a = r[t];
|
|
669
|
-
e.has(
|
|
670
|
+
e.has(zt(i)) || e.has(zt(a)) || c.children.push({
|
|
670
671
|
points: [i, a],
|
|
671
672
|
color: n,
|
|
672
|
-
width:
|
|
673
|
+
width: G
|
|
673
674
|
});
|
|
674
675
|
}
|
|
675
|
-
c.children.length &&
|
|
676
|
+
c.children.length && m.current.add(() => t.update(c));
|
|
676
677
|
}
|
|
677
|
-
let
|
|
678
|
-
if (
|
|
679
|
-
let e =
|
|
678
|
+
let d = D[s];
|
|
679
|
+
if (d && i != null && i.length) {
|
|
680
|
+
let e = y.get(n);
|
|
680
681
|
i.forEach((t) => {
|
|
681
|
-
|
|
682
|
+
d.children.push({
|
|
682
683
|
source: e,
|
|
683
|
-
bounds:
|
|
684
|
+
bounds: u(t.x, t.y, e.width, e.height, a.current)
|
|
684
685
|
});
|
|
685
|
-
}),
|
|
686
|
+
}), d.children.length && m.current.add(() => t.update(d));
|
|
686
687
|
}
|
|
687
688
|
});
|
|
688
|
-
let
|
|
689
|
-
|
|
689
|
+
let O = l.find((e) => e.name === Ne), k = /* @__PURE__ */ new Map();
|
|
690
|
+
_.current = (e) => {
|
|
690
691
|
try {
|
|
691
|
-
let { ptScale: n, sceneId: r } =
|
|
692
|
-
if (!
|
|
693
|
-
|
|
692
|
+
let { ptScale: n, sceneId: r } = kt(e);
|
|
693
|
+
if (!v(r)) return;
|
|
694
|
+
a.current = Ot(n);
|
|
694
695
|
let i = [];
|
|
695
|
-
for (let e = 0; e <
|
|
696
|
-
let t =
|
|
696
|
+
for (let e = 0; e < D.length; e++) {
|
|
697
|
+
let t = D[e].children;
|
|
697
698
|
for (let e = 0; e < t.length; e++) {
|
|
698
699
|
let n = t[e];
|
|
699
|
-
n.bounds =
|
|
700
|
+
n.bounds = u(n.bounds.center.x, n.bounds.center.y, n.source.width, n.source.height, a.current, n.bounds.rotation), i.push(n);
|
|
700
701
|
}
|
|
701
702
|
}
|
|
702
|
-
let
|
|
703
|
-
for (let e = 0; e <
|
|
704
|
-
let t =
|
|
705
|
-
t.bounds =
|
|
703
|
+
let o = [...s.current.values()];
|
|
704
|
+
for (let e = 0; e < o.length; e++) {
|
|
705
|
+
let t = o[e];
|
|
706
|
+
t.bounds = u(t.bounds.center.x, t.bounds.center.y, t.source.width, t.source.height, a.current, t.bounds.rotation);
|
|
706
707
|
}
|
|
707
|
-
|
|
708
|
+
m.current.add(() => t.update(...i, ...o));
|
|
708
709
|
} catch (e) {
|
|
709
710
|
console.error("ptscale", e);
|
|
710
711
|
}
|
|
711
|
-
}, t.renderer.events.addEventListener("viewport:ptscale",
|
|
712
|
+
}, t.renderer.events.addEventListener("viewport:ptscale", _.current), S = requestAnimationFrame(() => {
|
|
712
713
|
var e;
|
|
713
|
-
(e =
|
|
714
|
-
}),
|
|
715
|
-
|
|
714
|
+
(e = _.current) == null || e.call(_, t.scale);
|
|
715
|
+
}), i.forEach((e, t) => {
|
|
716
|
+
k.set(t, Mt({
|
|
716
717
|
id: t,
|
|
717
|
-
width:
|
|
718
|
-
height:
|
|
718
|
+
width: K,
|
|
719
|
+
height: K,
|
|
719
720
|
color: e,
|
|
720
721
|
scale: window.devicePixelRatio
|
|
721
722
|
}));
|
|
722
|
-
}),
|
|
723
|
+
}), k.set(q, Mt({
|
|
723
724
|
id: "orphan",
|
|
724
|
-
width:
|
|
725
|
-
height:
|
|
726
|
-
color:
|
|
725
|
+
width: K,
|
|
726
|
+
height: K,
|
|
727
|
+
color: q,
|
|
727
728
|
scale: window.devicePixelRatio
|
|
728
729
|
}));
|
|
729
|
-
let
|
|
730
|
+
let A = null;
|
|
730
731
|
try {
|
|
731
|
-
|
|
732
|
+
A = h(await n(`${o}icons/bus-white.svg`), bt, bt, window.devicePixelRatio);
|
|
732
733
|
} catch (e) {
|
|
733
734
|
console.error(e);
|
|
734
735
|
}
|
|
735
|
-
|
|
736
|
+
d.current = (e) => {
|
|
736
737
|
try {
|
|
737
738
|
var n;
|
|
738
739
|
let r = JSON.parse(e.data);
|
|
739
|
-
if (r.type !==
|
|
740
|
+
if (r.type !== St) return;
|
|
740
741
|
let i = e.timeStamp || performance.now();
|
|
741
|
-
|
|
742
|
-
let
|
|
742
|
+
p.current = Math.round(i - f.current), f.current = i;
|
|
743
|
+
let o = Math.max((n = p.current) == null ? Et : n, Et), l = c.current, d = s.current, h = O.children, _ = m.current, v = !1;
|
|
743
744
|
r.data.forEach(({ id: e, x: n, y: r, route_id: i, hidden: s }) => {
|
|
744
745
|
if (l.has(e)) {
|
|
745
746
|
var c;
|
|
746
747
|
(c = l.get(e)) == null || c(), l.delete(e);
|
|
747
748
|
}
|
|
748
|
-
if (s &&
|
|
749
|
-
let n =
|
|
749
|
+
if (s && d.has(e) && d.has(J(e))) {
|
|
750
|
+
let n = d.get(e);
|
|
750
751
|
n.hidden = !0;
|
|
751
|
-
let r =
|
|
752
|
-
r.hidden = !0,
|
|
752
|
+
let r = d.get(J(e));
|
|
753
|
+
r.hidden = !0, _.add(() => t.update(n, r));
|
|
753
754
|
return;
|
|
754
755
|
}
|
|
755
|
-
if (
|
|
756
|
-
let t =
|
|
756
|
+
if (b.current.set(e, performance.now()), !d.has(e)) {
|
|
757
|
+
let t = k.get(i) || k.get(q), o = {
|
|
757
758
|
id: e,
|
|
758
759
|
source: t,
|
|
759
|
-
bounds:
|
|
760
|
+
bounds: u(n, r, t.width, t.height, a.current, 0)
|
|
760
761
|
};
|
|
761
|
-
if (
|
|
762
|
+
if (d.set(e, o), A) {
|
|
762
763
|
let t = J(e), i = {
|
|
763
764
|
id: t,
|
|
764
|
-
source:
|
|
765
|
-
bounds:
|
|
765
|
+
source: A,
|
|
766
|
+
bounds: u(n, r, A.width, A.height, a.current, 0)
|
|
766
767
|
};
|
|
767
|
-
|
|
768
|
-
} else h.push(
|
|
768
|
+
A.setAttribute("id", t), d.set(t, i), h.push(o, i);
|
|
769
|
+
} else h.push(o);
|
|
769
770
|
v = !0;
|
|
770
771
|
return;
|
|
771
772
|
}
|
|
772
|
-
let
|
|
773
|
+
let f = d.get(e), p = d.get(J(e)), m = f.bounds.center, y = Lt(m, {
|
|
773
774
|
x: n,
|
|
774
775
|
y: r
|
|
775
|
-
},
|
|
776
|
-
if (y.reduce((e, t, n) => n === 0 ? e : e +
|
|
776
|
+
}, g.current.get(i));
|
|
777
|
+
if (y.reduce((e, t, n) => n === 0 ? e : e + Nt(y[n - 1], t), 0) >= Ct || document.hidden) Pt({
|
|
777
778
|
rendererService: t,
|
|
778
|
-
updateQueue:
|
|
779
|
-
vehicle:
|
|
780
|
-
vehicleFinery:
|
|
779
|
+
updateQueue: _,
|
|
780
|
+
vehicle: f,
|
|
781
|
+
vehicleFinery: p,
|
|
781
782
|
x: n,
|
|
782
783
|
y: r,
|
|
783
|
-
scale:
|
|
784
|
-
angle:
|
|
784
|
+
scale: a.current,
|
|
785
|
+
angle: At(f.bounds.center, {
|
|
785
786
|
x: n,
|
|
786
787
|
y: r
|
|
787
788
|
})
|
|
788
789
|
});
|
|
789
790
|
else {
|
|
790
|
-
let n =
|
|
791
|
-
|
|
791
|
+
let n = Rt(y, o, (e) => {
|
|
792
|
+
Pt({
|
|
792
793
|
rendererService: t,
|
|
793
|
-
updateQueue:
|
|
794
|
-
vehicle:
|
|
795
|
-
vehicleFinery:
|
|
794
|
+
updateQueue: _,
|
|
795
|
+
vehicle: f,
|
|
796
|
+
vehicleFinery: p,
|
|
796
797
|
x: e.x,
|
|
797
798
|
y: e.y,
|
|
798
|
-
scale:
|
|
799
|
+
scale: a.current,
|
|
799
800
|
angle: e.angle
|
|
800
801
|
});
|
|
801
802
|
});
|
|
802
803
|
l.set(e, n);
|
|
803
804
|
}
|
|
804
|
-
}), v &&
|
|
805
|
+
}), v && _.add(() => t.update(O));
|
|
805
806
|
} catch (e) {
|
|
806
807
|
console.error("handleSocketMessage", e);
|
|
807
808
|
}
|
|
808
|
-
},
|
|
809
|
+
}, w(), E(e.config ? (Number(e.config.vehicle_inactive_interval) || 20) * 1e3 : Tt);
|
|
809
810
|
} catch (e) {
|
|
810
811
|
console.warn(e);
|
|
811
812
|
}
|
|
812
813
|
}
|
|
813
|
-
|
|
814
|
-
function
|
|
814
|
+
C();
|
|
815
|
+
function w() {
|
|
815
816
|
var e, t;
|
|
816
|
-
((e = l.current) == null ? void 0 : e.readyState) === WebSocket.OPEN || ((t = l.current) == null ? void 0 : t.readyState) === WebSocket.CONNECTING || (l.current = new WebSocket(
|
|
817
|
-
|
|
817
|
+
((e = l.current) == null ? void 0 : e.readyState) === WebSocket.OPEN || ((t = l.current) == null ? void 0 : t.readyState) === WebSocket.CONNECTING || (l.current = new WebSocket(i), l.current.onmessage = d.current, l.current.onopen = () => {
|
|
818
|
+
y.current = wt;
|
|
818
819
|
}, l.current.onclose = () => {
|
|
819
|
-
navigator.onLine && (setTimeout(
|
|
820
|
+
navigator.onLine && (setTimeout(w, y.current), y.current = Math.min(y.current * 2, 3e4));
|
|
820
821
|
});
|
|
821
822
|
}
|
|
822
|
-
function
|
|
823
|
-
|
|
823
|
+
function T() {
|
|
824
|
+
w();
|
|
824
825
|
}
|
|
825
|
-
window.addEventListener("online",
|
|
826
|
-
function
|
|
827
|
-
clearInterval(
|
|
826
|
+
window.addEventListener("online", T);
|
|
827
|
+
function E(e) {
|
|
828
|
+
clearInterval(x.current), x.current = window.setInterval(() => {
|
|
828
829
|
let n = performance.now(), r = [], i = [];
|
|
829
|
-
|
|
830
|
+
b.current.forEach((t, a) => {
|
|
830
831
|
if (n - t < e) return;
|
|
831
832
|
let o = s.current.get(a);
|
|
832
833
|
o && (o.hidden = !0, i.push(o), r.push(a));
|
|
833
834
|
let c = J(a), l = s.current.get(c);
|
|
834
835
|
l && (l.hidden = !0, i.push(l), r.push(c));
|
|
835
|
-
}), i.length &&
|
|
836
|
+
}), i.length && m.current.add(() => t.update(...i)), r.forEach((e) => b.current.delete(e));
|
|
836
837
|
}, e);
|
|
837
838
|
}
|
|
838
839
|
return () => {
|
|
839
|
-
|
|
840
|
+
_.current && t.renderer && t.renderer.events.removeEventListener("viewport:ptscale", _.current), S !== void 0 && cancelAnimationFrame(S), c.current.forEach((e) => e == null ? void 0 : e()), c.current.clear(), s.current.clear(), m.current.destroy(), window.removeEventListener("online", T), clearInterval(x.current);
|
|
840
841
|
};
|
|
841
842
|
}, [
|
|
842
843
|
e,
|
|
843
844
|
t,
|
|
844
845
|
r,
|
|
845
|
-
|
|
846
|
+
i
|
|
846
847
|
]);
|
|
847
848
|
}
|
|
848
|
-
function
|
|
849
|
-
return Math.min(e || window.devicePixelRatio,
|
|
849
|
+
function Ot(e) {
|
|
850
|
+
return Math.min(e || window.devicePixelRatio, xt);
|
|
850
851
|
}
|
|
851
|
-
function
|
|
852
|
+
function kt(e) {
|
|
852
853
|
return typeof e == "number" ? { ptScale: e } : e;
|
|
853
854
|
}
|
|
854
|
-
function
|
|
855
|
+
function At(e, t) {
|
|
855
856
|
return Math.atan2(t.y - e.y, t.x - e.x);
|
|
856
857
|
}
|
|
857
|
-
function
|
|
858
|
+
function jt({ radius: e, scale: t, color: n }) {
|
|
858
859
|
let r = document.createElement("canvas"), i = r.getContext("2d");
|
|
859
860
|
i.imageSmoothingEnabled = !1;
|
|
860
861
|
let a = Math.ceil(e * 2 * t), o = a / 2, s = e * .78, c = e * .33;
|
|
861
862
|
return r.width = a, r.height = a, i.translate(o, o), i.scale(t, t), i.beginPath(), i.arc(0, 0, e, 0, 2 * Math.PI), i.fillStyle = "#FFFFFF", i.fill(), i.beginPath(), i.arc(0, 0, s, 0, 2 * Math.PI), i.fillStyle = n, i.fill(), i.beginPath(), i.arc(0, 0, c, 0, 2 * Math.PI), i.fillStyle = "#FFFFFF", i.fill(), r;
|
|
862
863
|
}
|
|
863
|
-
function
|
|
864
|
+
function Mt({ id: e, width: t, height: n, color: r, scale: i }) {
|
|
864
865
|
let a = 2 * i, o = t / 2 * i, s = n * i, c = .01, l = s * .6, u = s, d = 8 * i, f = u + a + l / 2 + d * 2, p = o * 2 + l + a + d * 2, m = document.createElement("canvas");
|
|
865
866
|
m.setAttribute("id", e), m.width = f, m.height = p;
|
|
866
867
|
let h = m.getContext("2d"), g = f / 2, _ = p / 2;
|
|
@@ -868,14 +869,14 @@ function Tt({ id: e, width: t, height: n, color: r, scale: i }) {
|
|
|
868
869
|
let v = g, y = _ - u / 2 + o, b = y + l;
|
|
869
870
|
return h.shadowColor = "rgba(16, 24, 40, 0.2)", h.shadowBlur = d / 2, h.beginPath(), h.arc(v, y, o, Math.PI, 0, !1), h.bezierCurveTo(v + o, y + s * .3, v + c * o, b, v, b), h.bezierCurveTo(v - c * o, b, v - o, y + s * .3, v - o, y), h.closePath(), h.fillStyle = r, h.fill(), h.strokeStyle = "#FFFFFF", h.lineWidth = a, h.stroke(), h.restore(), m;
|
|
870
871
|
}
|
|
871
|
-
function
|
|
872
|
+
function Nt(e, t) {
|
|
872
873
|
return Math.hypot(e.x - t.x, e.y - t.y);
|
|
873
874
|
}
|
|
874
875
|
function J(e) {
|
|
875
876
|
return `${e}_finery`;
|
|
876
877
|
}
|
|
877
|
-
function
|
|
878
|
-
n.bounds =
|
|
878
|
+
function Pt({ rendererService: e, updateQueue: t, vehicle: n, vehicleFinery: r, x: i, y: a, scale: o, angle: s }) {
|
|
879
|
+
n.bounds = u(i, a, n.source.width, n.source.height, o, s), n.hidden = !1, r ? (r.bounds = u(i, a, r.source.width, r.source.height, o, d(e.angle)), r.hidden = !1, t.add(() => e.update(r, n))) : t.add(() => e.update(n));
|
|
879
880
|
}
|
|
880
881
|
function Y(e, t, n) {
|
|
881
882
|
return {
|
|
@@ -883,13 +884,13 @@ function Y(e, t, n) {
|
|
|
883
884
|
y: e.y + (t.y - e.y) * n
|
|
884
885
|
};
|
|
885
886
|
}
|
|
886
|
-
function
|
|
887
|
+
function Ft(e, t) {
|
|
887
888
|
let n = Infinity, r = {
|
|
888
889
|
index: 0,
|
|
889
890
|
t: 0
|
|
890
891
|
};
|
|
891
892
|
for (let i = 0; i < t.length - 1; i++) {
|
|
892
|
-
let a = t[i], o = t[i + 1], s = o.x - a.x, c = o.y - a.y, l = s * s + c * c, u = l ? ((e.x - a.x) * s + (e.y - a.y) * c) / l : 0, d = Math.max(0, Math.min(1, u)), f =
|
|
893
|
+
let a = t[i], o = t[i + 1], s = o.x - a.x, c = o.y - a.y, l = s * s + c * c, u = l ? ((e.x - a.x) * s + (e.y - a.y) * c) / l : 0, d = Math.max(0, Math.min(1, u)), f = Nt(e, Y(a, o, d));
|
|
893
894
|
f < n && (n = f, r = {
|
|
894
895
|
index: i,
|
|
895
896
|
t: d
|
|
@@ -897,8 +898,8 @@ function Dt(e, t) {
|
|
|
897
898
|
}
|
|
898
899
|
return r;
|
|
899
900
|
}
|
|
900
|
-
function
|
|
901
|
-
let r =
|
|
901
|
+
function It(e, t, n) {
|
|
902
|
+
let r = Nt(e, t), i = Math.max(2, Math.ceil(r / n) + 1), a = [];
|
|
902
903
|
for (let n = 0; n < i; n++) {
|
|
903
904
|
let r = Y(e, t, n / (i - 1));
|
|
904
905
|
a.push({
|
|
@@ -908,9 +909,9 @@ function Ot(e, t, n) {
|
|
|
908
909
|
}
|
|
909
910
|
return a;
|
|
910
911
|
}
|
|
911
|
-
function
|
|
912
|
-
if (!n || !n.length) return
|
|
913
|
-
let r =
|
|
912
|
+
function Lt(e, t, n) {
|
|
913
|
+
if (!n || !n.length) return It(e, t, 10);
|
|
914
|
+
let r = Ft(e, n), i = Ft(t, n), a = [], o = (e) => a.push({
|
|
914
915
|
x: e.x,
|
|
915
916
|
y: e.y
|
|
916
917
|
});
|
|
@@ -918,7 +919,7 @@ function kt(e, t, n) {
|
|
|
918
919
|
for (let e = r.index + 1; e <= i.index && e < n.length; e++) o(n[e]);
|
|
919
920
|
return i.index + 1 < n.length ? o(Y(n[i.index], n[i.index + 1], i.t)) : o(n[i.index]), a;
|
|
920
921
|
}
|
|
921
|
-
function
|
|
922
|
+
function Rt(e, t, n, r) {
|
|
922
923
|
if (e.length < 2) return () => {};
|
|
923
924
|
let i = null, a, o = [], s = 0;
|
|
924
925
|
for (let t = 0; t < e.length - 1; t++) {
|
|
@@ -941,19 +942,19 @@ function At(e, t, n, r) {
|
|
|
941
942
|
a && cancelAnimationFrame(a);
|
|
942
943
|
};
|
|
943
944
|
}
|
|
944
|
-
function
|
|
945
|
+
function zt(e) {
|
|
945
946
|
return `${e.x},${e.y}`;
|
|
946
947
|
}
|
|
947
948
|
//#endregion
|
|
948
949
|
//#region src/utils/dimming.ts
|
|
949
|
-
var
|
|
950
|
-
function
|
|
950
|
+
var Bt = .5, Vt = "cubic";
|
|
951
|
+
function Ht(e, t) {
|
|
951
952
|
let n = e.scene;
|
|
952
953
|
if (!n) return;
|
|
953
954
|
let r = n.rootLayer;
|
|
954
955
|
r.dim !== t && (r.dim = t, e.update(n.rootLayer));
|
|
955
956
|
}
|
|
956
|
-
function
|
|
957
|
+
function Ut(e, t = 300, n = Vt) {
|
|
957
958
|
let r = null, i = 0, a = 0, o = 0, s = 0, c = Math.max(t, 0);
|
|
958
959
|
function l() {
|
|
959
960
|
r === null || typeof cancelAnimationFrame != "function" || (cancelAnimationFrame(r), r = null);
|
|
@@ -962,7 +963,7 @@ function Pt(e, t = 300, n = Mt) {
|
|
|
962
963
|
l(), i = t, e(i);
|
|
963
964
|
}
|
|
964
965
|
function d(t) {
|
|
965
|
-
let l = t - s, u = Math.min(l / c, 1), f =
|
|
966
|
+
let l = t - s, u = Math.min(l / c, 1), f = Wt(u, n);
|
|
966
967
|
if (i = a + (o - a) * f, e(i), u < 1) {
|
|
967
968
|
r = requestAnimationFrame(d);
|
|
968
969
|
return;
|
|
@@ -988,127 +989,152 @@ function Pt(e, t = 300, n = Mt) {
|
|
|
988
989
|
}
|
|
989
990
|
};
|
|
990
991
|
}
|
|
991
|
-
function
|
|
992
|
-
return t === "linear" ? e :
|
|
992
|
+
function Wt(e, t) {
|
|
993
|
+
return t === "linear" ? e : Gt(e);
|
|
993
994
|
}
|
|
994
|
-
function
|
|
995
|
+
function Gt(e) {
|
|
995
996
|
return e < .5 ? 4 * e * e * e : 1 - (-2 * e + 2) ** 3 / 2;
|
|
996
997
|
}
|
|
997
998
|
//#endregion
|
|
998
999
|
//#region src/components/Map/booth-by-xy.ts
|
|
999
|
-
var
|
|
1000
|
-
function
|
|
1000
|
+
var Kt = /* @__PURE__ */ new Map(), qt = [], Jt = [], Yt = [], X = /* @__PURE__ */ new Map(), Z;
|
|
1001
|
+
function Xt() {
|
|
1001
1002
|
let e = R.booths.filter((e) => e.visible && e.rect && e.rect.w > 0 && e.rect.h > 0);
|
|
1002
|
-
if (
|
|
1003
|
-
|
|
1004
|
-
let t =
|
|
1003
|
+
if (Kt = /* @__PURE__ */ new Map(), qt = [], Yt = [], Z = null, X = /* @__PURE__ */ new Map(), !e.length) return;
|
|
1004
|
+
Jt = e.filter((e) => e.paths);
|
|
1005
|
+
let t = L.fromMultiple(e.map((e) => e.rect));
|
|
1005
1006
|
for (let t of e) {
|
|
1006
1007
|
let e = t.rect;
|
|
1007
|
-
Math.abs(t.rotate) === 90 * Math.PI / 180 && (e = e.getRotated90()),
|
|
1008
|
+
Math.abs(t.rotate) === 90 * Math.PI / 180 && (e = e.getRotated90()), qt.push(e), Kt.set(e, t);
|
|
1008
1009
|
}
|
|
1009
1010
|
let n = Math.ceil(t.w / 2), r = Math.ceil(t.h / 2);
|
|
1010
1011
|
for (let e = 0; e < 2; e++) for (let i = 0; i < 2; i++) {
|
|
1011
|
-
let a = t.x1 + e * n, o = t.y1 + i * r, s =
|
|
1012
|
-
|
|
1013
|
-
let c =
|
|
1014
|
-
|
|
1012
|
+
let a = t.x1 + e * n, o = t.y1 + i * r, s = L.fromXywh(a, o, n, r);
|
|
1013
|
+
Yt.push(s);
|
|
1014
|
+
let c = qt.filter((e) => s.intersects(e));
|
|
1015
|
+
X.set(s, c);
|
|
1015
1016
|
}
|
|
1016
|
-
|
|
1017
|
+
i.log("hover segmentToRects", X);
|
|
1017
1018
|
}
|
|
1018
1019
|
r(() => [
|
|
1019
1020
|
R.booths,
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
], () =>
|
|
1023
|
-
function
|
|
1021
|
+
N.loaded,
|
|
1022
|
+
N.visible
|
|
1023
|
+
], () => Xt());
|
|
1024
|
+
function Zt(e, t) {
|
|
1024
1025
|
let n;
|
|
1025
|
-
n =
|
|
1026
|
-
let r =
|
|
1026
|
+
n = Z && Z.containsPoint(e, t) ? Z : Yt.find((n) => n.containsPoint(e, t)), n && (Z = n);
|
|
1027
|
+
let r = X.get(n);
|
|
1027
1028
|
if (r) {
|
|
1028
1029
|
let n = r.filter((n) => n.containsPoint(e, t));
|
|
1029
1030
|
if (n.length) {
|
|
1030
1031
|
let e;
|
|
1031
1032
|
e = n.length > 1 ? n.sort((e, t) => e.w - t.w)[0] : n[0];
|
|
1032
|
-
let t =
|
|
1033
|
+
let t = Kt.get(e);
|
|
1033
1034
|
return t.visible ? t : null;
|
|
1034
1035
|
}
|
|
1035
1036
|
}
|
|
1036
|
-
for (let n of
|
|
1037
|
+
for (let n of Jt) for (let r of n.paths) for (let i of me(r.index, N.mode === _e.Default ? "" : n.layer.name)) if (Ue(e, t, i)) return n.visible ? n : null;
|
|
1037
1038
|
return null;
|
|
1038
1039
|
}
|
|
1039
|
-
function
|
|
1040
|
-
return
|
|
1040
|
+
function Qt(e, t) {
|
|
1041
|
+
return Zt(e, t);
|
|
1041
1042
|
}
|
|
1042
1043
|
//#endregion
|
|
1043
1044
|
//#region src/wayfinding/bindMobxReactions.ts
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1045
|
+
var $t = (e) => "rect" in e ? m(e) : e;
|
|
1046
|
+
function en({ runtime: e, kioskHandler: t, yahHandler: n, stores: { routeStore: i, uiState: o, layerStore: s }, rerouteThresholdSvg: c }) {
|
|
1047
|
+
let l = [], u = y(c);
|
|
1048
|
+
function d() {
|
|
1049
|
+
var t;
|
|
1050
|
+
let n = o.selectedRoute, r = n != null && n.from ? $t(n.from) : null, a = n != null && n.to ? $t(n.to) : null;
|
|
1051
|
+
if (!r || !a) {
|
|
1050
1052
|
e.clearRoute();
|
|
1051
1053
|
return;
|
|
1052
1054
|
}
|
|
1053
1055
|
e.setRoute({
|
|
1054
|
-
from:
|
|
1055
|
-
to:
|
|
1056
|
-
waypoints:
|
|
1056
|
+
from: r,
|
|
1057
|
+
to: a,
|
|
1058
|
+
waypoints: n == null || (t = n.waypoints) == null ? void 0 : t.map(m),
|
|
1057
1059
|
accessible: i.onlyAccessible
|
|
1058
|
-
}) === !1 && console.error(/* @__PURE__ */ Error(`Route not found: ${
|
|
1060
|
+
}) === !1 && console.error(/* @__PURE__ */ Error(`Route not found: (${r.x},${r.y}) → (${a.x},${a.y})`));
|
|
1059
1061
|
}
|
|
1060
|
-
function
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
if (!o) {
|
|
1062
|
+
function p() {
|
|
1063
|
+
let t = i.currentPosition, r = i.iconType !== 0, a = o.selectedRoute, s = !!(a != null && a.from && a != null && a.to), c = r && !s;
|
|
1064
|
+
if (!t) {
|
|
1064
1065
|
e.onPositionChanged(null), n(null);
|
|
1065
1066
|
return;
|
|
1066
1067
|
}
|
|
1067
|
-
let
|
|
1068
|
-
|
|
1069
|
-
x:
|
|
1070
|
-
y:
|
|
1071
|
-
layer:
|
|
1072
|
-
})) : (n(null), e.onPositionChanged(
|
|
1068
|
+
let l = f(t);
|
|
1069
|
+
c ? (e.onPositionChanged(null), n({
|
|
1070
|
+
x: l.x,
|
|
1071
|
+
y: l.y,
|
|
1072
|
+
layer: l.layer
|
|
1073
|
+
})) : (n(null), e.onPositionChanged(l));
|
|
1073
1074
|
}
|
|
1074
|
-
function
|
|
1075
|
+
function h() {
|
|
1076
|
+
var e;
|
|
1077
|
+
let t = i.currentPosition, n = o.selectedRoute;
|
|
1078
|
+
if (!t || !(n != null && n.to)) return;
|
|
1079
|
+
let r = !n.from, a = ((e = n.from) == null ? void 0 : e.id) === "current-position" && u.shouldReroute(f(t), i.routeLines);
|
|
1080
|
+
!r && !a || i.rebuildRouteFromPosition(D(t, _, ye));
|
|
1081
|
+
}
|
|
1082
|
+
function g() {
|
|
1075
1083
|
var e, n;
|
|
1076
|
-
let r = (e =
|
|
1077
|
-
t((n =
|
|
1078
|
-
}
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1084
|
+
let r = (e = s.floors.find((e) => e.active)) == null ? void 0 : e.name;
|
|
1085
|
+
t((n = o.kioskData) == null ? null : n, r, s.mode);
|
|
1086
|
+
}
|
|
1087
|
+
function v() {
|
|
1088
|
+
var e;
|
|
1089
|
+
let t = o.selectedRoute, n = i.currentPosition;
|
|
1090
|
+
if (!(t != null && t.to) || !n || ((e = t.from) == null ? void 0 : e.id) !== "current-position" || i.routeLines.length > 0) return;
|
|
1091
|
+
let r = n.z == null ? "" : String(n.z);
|
|
1092
|
+
t.from.x === n.x && t.from.y === n.y && t.from.layer === r || i.rebuildRouteFromPosition(D(n, _, ye));
|
|
1093
|
+
}
|
|
1094
|
+
l.push(r(() => s.layersLoaded, () => {
|
|
1095
|
+
d(), p();
|
|
1096
|
+
}), r(() => [o.selectedRoute, i.onlyAccessible], () => {
|
|
1097
|
+
d(), p();
|
|
1098
|
+
}), r(() => i.currentPosition, () => {
|
|
1099
|
+
p();
|
|
1100
|
+
}), r(() => {
|
|
1101
|
+
let e = i.currentPosition;
|
|
1102
|
+
return e ? {
|
|
1103
|
+
x: e.x,
|
|
1104
|
+
y: e.y,
|
|
1105
|
+
z: e.z
|
|
1106
|
+
} : null;
|
|
1107
|
+
}, () => {
|
|
1108
|
+
h(), v();
|
|
1109
|
+
}, { equals: a.structural }), r(() => [o.kioskData, s.floors.find((e) => e.active)], () => g()));
|
|
1110
|
+
let b = null, x = r(() => [i.currentRouteLayer, o.getRouteNextFloor], () => {
|
|
1111
|
+
s.layersLoaded && (b !== null && clearTimeout(b), b = setTimeout(() => {
|
|
1112
|
+
e.onFloorChanged(), p(), b = null;
|
|
1087
1113
|
}, 0));
|
|
1088
1114
|
});
|
|
1089
|
-
return
|
|
1090
|
-
|
|
1091
|
-
}),
|
|
1092
|
-
for (let e of
|
|
1093
|
-
|
|
1115
|
+
return l.push(() => {
|
|
1116
|
+
b !== null && clearTimeout(b), x();
|
|
1117
|
+
}), d(), p(), g(), () => {
|
|
1118
|
+
for (let e of l) e();
|
|
1119
|
+
l.length = 0;
|
|
1094
1120
|
};
|
|
1095
1121
|
}
|
|
1096
1122
|
//#endregion
|
|
1097
1123
|
//#region src/wayfinding/handlers/kioskHandler.ts
|
|
1098
|
-
var
|
|
1099
|
-
function
|
|
1124
|
+
var tn = "kiosk", nn = 0;
|
|
1125
|
+
function rn({ renderer: e, kioskIconMap: t, layer: n }) {
|
|
1100
1126
|
return (r, i, a) => {
|
|
1101
1127
|
var o;
|
|
1102
1128
|
if (!r) {
|
|
1103
|
-
e.setIcon(
|
|
1129
|
+
e.setIcon(tn, null), e.flush();
|
|
1104
1130
|
return;
|
|
1105
1131
|
}
|
|
1106
|
-
if (a !==
|
|
1107
|
-
e.setIcon(
|
|
1132
|
+
if (a !== nn && r.z && i && r.z !== i) {
|
|
1133
|
+
e.setIcon(tn, null), e.flush();
|
|
1108
1134
|
return;
|
|
1109
1135
|
}
|
|
1110
|
-
e.setIcon(
|
|
1111
|
-
canvas:
|
|
1136
|
+
e.setIcon(tn, {
|
|
1137
|
+
canvas: A(t, r.iconSizePercent),
|
|
1112
1138
|
layer: n,
|
|
1113
1139
|
x: r.x,
|
|
1114
1140
|
y: r.y,
|
|
@@ -1118,15 +1144,15 @@ function qt({ renderer: e, kioskIconMap: t, layer: n }) {
|
|
|
1118
1144
|
}
|
|
1119
1145
|
//#endregion
|
|
1120
1146
|
//#region src/wayfinding/handlers/yahHandler.ts
|
|
1121
|
-
var
|
|
1122
|
-
function
|
|
1147
|
+
var an = "yah";
|
|
1148
|
+
function on({ renderer: e, iconProvider: t, floorContext: n, layer: r }) {
|
|
1123
1149
|
return (i) => {
|
|
1124
1150
|
if (!i) {
|
|
1125
|
-
e.setIcon(
|
|
1151
|
+
e.setIcon(an, null), e.flush();
|
|
1126
1152
|
return;
|
|
1127
1153
|
}
|
|
1128
1154
|
let a = n.isLayerVisible(i.layer);
|
|
1129
|
-
e.setIcon(
|
|
1155
|
+
e.setIcon(an, {
|
|
1130
1156
|
canvas: t.getIcon("yah").canvas,
|
|
1131
1157
|
layer: r,
|
|
1132
1158
|
x: i.x,
|
|
@@ -1139,7 +1165,7 @@ function Yt({ renderer: e, iconProvider: t, floorContext: n, layer: r }) {
|
|
|
1139
1165
|
}
|
|
1140
1166
|
//#endregion
|
|
1141
1167
|
//#region src/wayfinding/runtime/getRouteLines.ts
|
|
1142
|
-
function
|
|
1168
|
+
function sn({ engine: e, from: t, to: n, waypoints: r, accessible: i }) {
|
|
1143
1169
|
return r != null && r.length ? e.buildWaypointsRoute([
|
|
1144
1170
|
t,
|
|
1145
1171
|
...r,
|
|
@@ -1148,26 +1174,29 @@ function Xt({ engine: e, from: t, to: n, waypoints: r, accessible: i }) {
|
|
|
1148
1174
|
}
|
|
1149
1175
|
//#endregion
|
|
1150
1176
|
//#region src/wayfinding/runtime/endpointView.ts
|
|
1151
|
-
function
|
|
1177
|
+
function cn(e, t) {
|
|
1178
|
+
return !t || !e.bounds && e.id !== "current-position";
|
|
1179
|
+
}
|
|
1180
|
+
function ln({ renderer: e, iconProvider: t, floorContext: n, layer: r }) {
|
|
1152
1181
|
return {
|
|
1153
|
-
place(i, a, o) {
|
|
1182
|
+
place(i, a, o, s) {
|
|
1154
1183
|
if (!o.length) return;
|
|
1155
|
-
let
|
|
1184
|
+
let c = n.isLayerVisible(i.layer), l = n.isLayerVisible(a.layer), u = o[o.length - 1], d = o[0], f = i.id === "current-position" && s;
|
|
1156
1185
|
e.setIcon("source", {
|
|
1157
|
-
canvas: t.getIcon("source").canvas,
|
|
1186
|
+
canvas: t.getIcon(f ? "source_inactive" : "source").canvas,
|
|
1158
1187
|
layer: r,
|
|
1159
|
-
x:
|
|
1160
|
-
y:
|
|
1161
|
-
hidden:
|
|
1162
|
-
dimmed: !
|
|
1188
|
+
x: u.x,
|
|
1189
|
+
y: u.y,
|
|
1190
|
+
hidden: cn(i, c),
|
|
1191
|
+
dimmed: !c,
|
|
1163
1192
|
cardinalSnap: !0
|
|
1164
1193
|
}), e.setIcon("destination", {
|
|
1165
1194
|
canvas: t.getIcon("destination").canvas,
|
|
1166
1195
|
layer: r,
|
|
1167
|
-
x:
|
|
1168
|
-
y:
|
|
1169
|
-
hidden: !
|
|
1170
|
-
dimmed: !
|
|
1196
|
+
x: d.x,
|
|
1197
|
+
y: d.y,
|
|
1198
|
+
hidden: !l || !a.bounds,
|
|
1199
|
+
dimmed: !l,
|
|
1171
1200
|
cardinalSnap: !0
|
|
1172
1201
|
});
|
|
1173
1202
|
},
|
|
@@ -1177,60 +1206,14 @@ function Zt({ renderer: e, iconProvider: t, floorContext: n, layer: r }) {
|
|
|
1177
1206
|
};
|
|
1178
1207
|
}
|
|
1179
1208
|
//#endregion
|
|
1180
|
-
//#region src/wayfinding/runtime/positionView.ts
|
|
1181
|
-
var Qt = "position";
|
|
1182
|
-
function $t({ renderer: e, iconProvider: t, layer: n }) {
|
|
1183
|
-
return {
|
|
1184
|
-
place(r, i) {
|
|
1185
|
-
let a = Number.isFinite(r.angle), o = a ? "current_arrow" : "current", s = a ? r.angle * Math.PI / 180 : void 0;
|
|
1186
|
-
e.setIcon(Qt, {
|
|
1187
|
-
canvas: t.getIcon(o).canvas,
|
|
1188
|
-
layer: n,
|
|
1189
|
-
x: r.x,
|
|
1190
|
-
y: r.y,
|
|
1191
|
-
rotation: s,
|
|
1192
|
-
hidden: i,
|
|
1193
|
-
dimmed: i,
|
|
1194
|
-
origin: [.5, .5]
|
|
1195
|
-
});
|
|
1196
|
-
},
|
|
1197
|
-
hide() {
|
|
1198
|
-
e.setIcon(Qt, null);
|
|
1199
|
-
}
|
|
1200
|
-
};
|
|
1201
|
-
}
|
|
1202
|
-
//#endregion
|
|
1203
1209
|
//#region src/wayfinding/runtime/positionTrailView.ts
|
|
1204
|
-
var
|
|
1205
|
-
function
|
|
1206
|
-
let o =
|
|
1210
|
+
var Q = "trail";
|
|
1211
|
+
function un({ renderer: e, iconProvider: t, floorContext: n, trails: r, iconLayer: i, snapThreshold: a }) {
|
|
1212
|
+
let o = l({
|
|
1207
1213
|
renderer: e,
|
|
1208
1214
|
iconProvider: t,
|
|
1209
1215
|
layer: i
|
|
1210
1216
|
});
|
|
1211
|
-
function s(e) {
|
|
1212
|
-
if (!e.routePoints.length) {
|
|
1213
|
-
r.clear($);
|
|
1214
|
-
return;
|
|
1215
|
-
}
|
|
1216
|
-
if (!e.from.bounds) {
|
|
1217
|
-
r.place($, e.routePoints[e.routePoints.length - 1], {
|
|
1218
|
-
x: e.from.x,
|
|
1219
|
-
y: e.from.y,
|
|
1220
|
-
layer: e.from.layer
|
|
1221
|
-
});
|
|
1222
|
-
return;
|
|
1223
|
-
}
|
|
1224
|
-
if (!e.to.bounds) {
|
|
1225
|
-
r.place($, e.routePoints[0], {
|
|
1226
|
-
x: e.to.x,
|
|
1227
|
-
y: e.to.y,
|
|
1228
|
-
layer: e.to.layer
|
|
1229
|
-
});
|
|
1230
|
-
return;
|
|
1231
|
-
}
|
|
1232
|
-
r.clear($);
|
|
1233
|
-
}
|
|
1234
1217
|
return {
|
|
1235
1218
|
placeIcon(e) {
|
|
1236
1219
|
let t = !n.isLayerVisible(e.layer);
|
|
@@ -1239,46 +1222,29 @@ function en({ renderer: e, iconProvider: t, floorContext: n, trails: r, iconLaye
|
|
|
1239
1222
|
hideIcon() {
|
|
1240
1223
|
o.hide();
|
|
1241
1224
|
},
|
|
1242
|
-
applyToRoute(e, t,
|
|
1243
|
-
let
|
|
1244
|
-
x: e.x,
|
|
1245
|
-
y: e.y,
|
|
1246
|
-
z: e.layer || null
|
|
1247
|
-
}, [...i], {
|
|
1225
|
+
applyToRoute(e, t, r) {
|
|
1226
|
+
let i = pe(e, [...r], {
|
|
1248
1227
|
snapThreshold: a,
|
|
1249
1228
|
from: t.from,
|
|
1250
1229
|
to: t.to
|
|
1251
|
-
});
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
x: c.snappedPoint.x,
|
|
1258
|
-
y: c.snappedPoint.y
|
|
1259
|
-
}, r), c;
|
|
1260
|
-
}
|
|
1261
|
-
return t.routePoints.length ? r.place($, {
|
|
1262
|
-
x: e.x,
|
|
1263
|
-
y: e.y,
|
|
1264
|
-
layer: e.layer
|
|
1265
|
-
}, t.routePoints[t.routePoints.length - 1]) : r.clear($), c;
|
|
1230
|
+
}), s = !n.isLayerVisible(e.layer);
|
|
1231
|
+
return i.snapped ? o.place({
|
|
1232
|
+
...e,
|
|
1233
|
+
x: i.snappedPoint.x,
|
|
1234
|
+
y: i.snappedPoint.y
|
|
1235
|
+
}, s) : o.place(e, s), i;
|
|
1266
1236
|
},
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
r.clear($);
|
|
1270
|
-
return;
|
|
1271
|
-
}
|
|
1272
|
-
s(e);
|
|
1237
|
+
setTrail(e, t) {
|
|
1238
|
+
e && t ? r.place(Q, e, t) : r.clear(Q);
|
|
1273
1239
|
},
|
|
1274
1240
|
clearTrail() {
|
|
1275
|
-
r.clear(
|
|
1241
|
+
r.clear(Q);
|
|
1276
1242
|
}
|
|
1277
1243
|
};
|
|
1278
1244
|
}
|
|
1279
1245
|
//#endregion
|
|
1280
1246
|
//#region src/wayfinding/runtime/routeLinesView.ts
|
|
1281
|
-
function
|
|
1247
|
+
function dn({ renderer: e, linesLayer: t, animatedLinesLayer: n }) {
|
|
1282
1248
|
return {
|
|
1283
1249
|
draw({ passed: r, remaining: i }, a = !1) {
|
|
1284
1250
|
e.setRouteLines(r, i, {
|
|
@@ -1298,27 +1264,27 @@ function tn({ renderer: e, linesLayer: t, animatedLinesLayer: n }) {
|
|
|
1298
1264
|
}
|
|
1299
1265
|
//#endregion
|
|
1300
1266
|
//#region src/wayfinding/runtime/routeRenderData.ts
|
|
1301
|
-
function
|
|
1302
|
-
let a =
|
|
1267
|
+
function fn({ routeLines: e, currentRouteLayer: t, from: n, to: r, snap: i }) {
|
|
1268
|
+
let a = s(e.filter((e) => !e.virtual), n, r), o = t === null ? a : a.filter((e) => e.p0.layer === t);
|
|
1303
1269
|
if (!(i != null && i.snapped)) return {
|
|
1304
1270
|
passed: [],
|
|
1305
1271
|
remaining: o,
|
|
1306
|
-
distance:
|
|
1272
|
+
distance: re(a)
|
|
1307
1273
|
};
|
|
1308
|
-
let { passed:
|
|
1274
|
+
let { passed: c, remaining: l } = b(o, i.snappedPoint);
|
|
1309
1275
|
return {
|
|
1310
|
-
passed:
|
|
1311
|
-
remaining:
|
|
1312
|
-
...
|
|
1276
|
+
passed: c,
|
|
1277
|
+
remaining: l !== o && l.length > 0 ? [{
|
|
1278
|
+
...l[0],
|
|
1313
1279
|
p0: i.snappedPoint
|
|
1314
|
-
}, ...
|
|
1280
|
+
}, ...l.slice(1)] : l,
|
|
1315
1281
|
distance: i.distance
|
|
1316
1282
|
};
|
|
1317
1283
|
}
|
|
1318
1284
|
//#endregion
|
|
1319
1285
|
//#region src/wayfinding/runtime/routeUpdate.ts
|
|
1320
|
-
function
|
|
1321
|
-
let n = e.filter((e) => !e.virtual), r =
|
|
1286
|
+
function pn(e, t) {
|
|
1287
|
+
let n = e.filter((e) => !e.virtual), r = ce(t.flatMap((e) => [e.p0, e.p1]));
|
|
1322
1288
|
return !r || r.x1 === r.x2 && r.y1 === r.y2 ? {
|
|
1323
1289
|
lines: n,
|
|
1324
1290
|
bounds: null
|
|
@@ -1329,7 +1295,7 @@ function rn(e, t) {
|
|
|
1329
1295
|
}
|
|
1330
1296
|
//#endregion
|
|
1331
1297
|
//#region src/wayfinding/runtime/trailView.ts
|
|
1332
|
-
function
|
|
1298
|
+
function mn({ renderer: e, iconProvider: t, floorContext: n, layer: r }) {
|
|
1333
1299
|
let i = /* @__PURE__ */ new Set();
|
|
1334
1300
|
function a(e, t) {
|
|
1335
1301
|
if (n.showAllFloors()) return !0;
|
|
@@ -1361,11 +1327,11 @@ function an({ renderer: e, iconProvider: t, floorContext: n, layer: r }) {
|
|
|
1361
1327
|
}
|
|
1362
1328
|
//#endregion
|
|
1363
1329
|
//#region src/wayfinding/runtime/transitionView.ts
|
|
1364
|
-
var
|
|
1365
|
-
function
|
|
1330
|
+
var $ = "transition";
|
|
1331
|
+
function hn({ renderer: e, iconProvider: t, floorContext: n, onTransitionClick: r, layer: i }) {
|
|
1366
1332
|
return {
|
|
1367
1333
|
place(a) {
|
|
1368
|
-
e.clearIcons(
|
|
1334
|
+
e.clearIcons($);
|
|
1369
1335
|
let o;
|
|
1370
1336
|
if (n.showAllFloors()) o = null;
|
|
1371
1337
|
else {
|
|
@@ -1373,13 +1339,13 @@ function sn({ renderer: e, iconProvider: t, floorContext: n, onTransitionClick:
|
|
|
1373
1339
|
if (!e) return;
|
|
1374
1340
|
o = e;
|
|
1375
1341
|
}
|
|
1376
|
-
let s =
|
|
1342
|
+
let s = de({
|
|
1377
1343
|
routeLines: a,
|
|
1378
1344
|
currentLayerName: o,
|
|
1379
1345
|
floorOrder: n.getFloorOrder()
|
|
1380
1346
|
});
|
|
1381
|
-
for (let [n, a] of s.entries()) e.setIcon(
|
|
1382
|
-
canvas: t.getIcon(
|
|
1347
|
+
for (let [n, a] of s.entries()) e.setIcon($, {
|
|
1348
|
+
canvas: t.getIcon(gn(a.role, a.direction)).canvas,
|
|
1383
1349
|
layer: i,
|
|
1384
1350
|
x: a.x,
|
|
1385
1351
|
y: a.y,
|
|
@@ -1388,145 +1354,164 @@ function sn({ renderer: e, iconProvider: t, floorContext: n, onTransitionClick:
|
|
|
1388
1354
|
}, n);
|
|
1389
1355
|
},
|
|
1390
1356
|
clear() {
|
|
1391
|
-
e.clearIcons(
|
|
1357
|
+
e.clearIcons($);
|
|
1392
1358
|
}
|
|
1393
1359
|
};
|
|
1394
1360
|
}
|
|
1395
|
-
function
|
|
1361
|
+
function gn(e, t) {
|
|
1396
1362
|
return e === "entry" ? "transition_entry" : t === "up" ? "transition_up" : t === "down" ? "transition_down" : "transition";
|
|
1397
1363
|
}
|
|
1398
1364
|
//#endregion
|
|
1399
1365
|
//#region src/wayfinding/runtime/createWayfindingRuntime.ts
|
|
1400
|
-
var
|
|
1401
|
-
function
|
|
1402
|
-
let l =
|
|
1366
|
+
var _n = (e) => e.flatMap((e) => [e.p0, e.p1]);
|
|
1367
|
+
function vn({ engine: e, renderer: t, iconProvider: n, floorContext: r, layers: i, snapThreshold: a, onTransitionClick: o, onRouteUpdate: s, onRouteDistance: c }) {
|
|
1368
|
+
let l = ln({
|
|
1403
1369
|
renderer: t,
|
|
1404
1370
|
iconProvider: n,
|
|
1405
1371
|
floorContext: r,
|
|
1406
1372
|
layer: i.points
|
|
1407
|
-
}), u =
|
|
1373
|
+
}), u = hn({
|
|
1408
1374
|
renderer: t,
|
|
1409
1375
|
iconProvider: n,
|
|
1410
1376
|
floorContext: r,
|
|
1411
1377
|
onTransitionClick: o,
|
|
1412
1378
|
layer: i.points
|
|
1413
|
-
}), d =
|
|
1379
|
+
}), d = un({
|
|
1414
1380
|
renderer: t,
|
|
1415
1381
|
iconProvider: n,
|
|
1416
1382
|
floorContext: r,
|
|
1417
|
-
trails:
|
|
1383
|
+
trails: mn({
|
|
1418
1384
|
renderer: t,
|
|
1419
1385
|
iconProvider: n,
|
|
1420
1386
|
floorContext: r,
|
|
1421
1387
|
layer: i.trail
|
|
1422
1388
|
}),
|
|
1423
|
-
iconLayer: i.
|
|
1389
|
+
iconLayer: i.currentPosition,
|
|
1424
1390
|
snapThreshold: a
|
|
1425
|
-
}), f =
|
|
1391
|
+
}), f = dn({
|
|
1426
1392
|
renderer: t,
|
|
1427
1393
|
linesLayer: i.lines,
|
|
1428
1394
|
animatedLinesLayer: i.linesAnimated
|
|
1429
|
-
}), p = [], h = null, g = null, _ =
|
|
1430
|
-
function y() {
|
|
1431
|
-
return r.showAllFloors() ? null : r.getActiveFloor();
|
|
1432
|
-
}
|
|
1395
|
+
}), p = [], m = null, h = null, g = null, _ = 0, v = !1, y = !1;
|
|
1433
1396
|
function b() {
|
|
1434
|
-
|
|
1435
|
-
return e === null ? p.filter((e) => !e.virtual) : p.filter((t) => t.p0.layer === e && !t.virtual);
|
|
1397
|
+
return r.showAllFloors() ? null : r.getActiveFloor();
|
|
1436
1398
|
}
|
|
1437
1399
|
function x() {
|
|
1438
|
-
if (!h || !g) return null;
|
|
1439
1400
|
let e = b();
|
|
1401
|
+
return e === null ? p.filter((e) => !e.virtual) : p.filter((t) => t.p0.layer === e && !t.virtual);
|
|
1402
|
+
}
|
|
1403
|
+
function S() {
|
|
1404
|
+
if (!m || !h) return null;
|
|
1405
|
+
let e = x();
|
|
1440
1406
|
return e.length ? {
|
|
1441
|
-
from:
|
|
1442
|
-
to:
|
|
1443
|
-
routePoints:
|
|
1407
|
+
from: m,
|
|
1408
|
+
to: h,
|
|
1409
|
+
routePoints: _n(e),
|
|
1444
1410
|
visibleLines: e
|
|
1445
1411
|
} : null;
|
|
1446
1412
|
}
|
|
1447
|
-
function
|
|
1448
|
-
if (!
|
|
1449
|
-
let n =
|
|
1413
|
+
function C(e = null, t = !1) {
|
|
1414
|
+
if (!m || !h) return;
|
|
1415
|
+
let n = fn({
|
|
1450
1416
|
routeLines: p,
|
|
1451
|
-
currentRouteLayer:
|
|
1452
|
-
from:
|
|
1453
|
-
to:
|
|
1417
|
+
currentRouteLayer: b(),
|
|
1418
|
+
from: m,
|
|
1419
|
+
to: h,
|
|
1454
1420
|
snap: e
|
|
1455
1421
|
});
|
|
1456
|
-
f.draw(n, t),
|
|
1422
|
+
f.draw(n, t), _ = n.distance;
|
|
1457
1423
|
}
|
|
1458
|
-
function w() {
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
l.hide(), u.clear(), d.refreshTrail(null), S();
|
|
1424
|
+
function w(e) {
|
|
1425
|
+
let t = S();
|
|
1426
|
+
if (!t) {
|
|
1427
|
+
d.setTrail(null, null);
|
|
1463
1428
|
return;
|
|
1464
1429
|
}
|
|
1465
|
-
|
|
1430
|
+
let n = g && e && !e.snapped ? g : null, r = (e) => {
|
|
1431
|
+
var t;
|
|
1432
|
+
return (t = e.bounds) != null && t.length ? null : e.id === "current-position" ? n : e;
|
|
1433
|
+
}, i = v ? null : r(t.from);
|
|
1434
|
+
if (i) {
|
|
1435
|
+
d.setTrail(t.routePoints[t.routePoints.length - 1], i);
|
|
1436
|
+
return;
|
|
1437
|
+
}
|
|
1438
|
+
let a = r(t.to);
|
|
1439
|
+
d.setTrail(a ? t.routePoints[0] : null, a);
|
|
1466
1440
|
}
|
|
1467
1441
|
function T() {
|
|
1468
|
-
if (!
|
|
1442
|
+
if (!m || !h) return;
|
|
1443
|
+
let e = S();
|
|
1444
|
+
if (!e) {
|
|
1445
|
+
l.hide(), u.clear(), d.clearTrail(), C();
|
|
1446
|
+
return;
|
|
1447
|
+
}
|
|
1448
|
+
l.place(m, h, e.routePoints, y), u.place(p), C(), w(null);
|
|
1449
|
+
}
|
|
1450
|
+
function E() {
|
|
1451
|
+
if (!m || !h) return;
|
|
1452
|
+
let e = S();
|
|
1453
|
+
e && l.place(m, h, e.routePoints, y);
|
|
1454
|
+
}
|
|
1455
|
+
function D() {
|
|
1456
|
+
if (y = !1, !g || !m || !h) return null;
|
|
1469
1457
|
let e = p.filter((e) => !e.virtual);
|
|
1470
|
-
if (!e.length) return;
|
|
1471
|
-
let t =
|
|
1472
|
-
return t ? d.applyToRoute(_, t, e) : (d.refreshTrail(null), m({
|
|
1473
|
-
x: _.x,
|
|
1474
|
-
y: _.y,
|
|
1475
|
-
z: _.layer || null
|
|
1476
|
-
}, e, {
|
|
1458
|
+
if (!e.length) return null;
|
|
1459
|
+
let t = S(), n = t ? d.applyToRoute(g, t, e) : pe(g, e, {
|
|
1477
1460
|
snapThreshold: a,
|
|
1478
|
-
from:
|
|
1479
|
-
to:
|
|
1480
|
-
})
|
|
1461
|
+
from: m,
|
|
1462
|
+
to: h
|
|
1463
|
+
});
|
|
1464
|
+
return n.snapped && (v = !0), y = n.snapped, n;
|
|
1481
1465
|
}
|
|
1482
|
-
function
|
|
1483
|
-
let e =
|
|
1466
|
+
function O() {
|
|
1467
|
+
let e = pn(p, x());
|
|
1484
1468
|
return s(e.lines, e.bounds), e;
|
|
1485
1469
|
}
|
|
1486
|
-
function
|
|
1487
|
-
let o =
|
|
1470
|
+
function k({ from: n, to: r, waypoints: i, accessible: a }) {
|
|
1471
|
+
let o = sn({
|
|
1488
1472
|
engine: e,
|
|
1489
1473
|
from: n,
|
|
1490
1474
|
to: r,
|
|
1491
1475
|
waypoints: i,
|
|
1492
1476
|
accessible: a
|
|
1493
1477
|
});
|
|
1494
|
-
if (!o.length) return
|
|
1495
|
-
|
|
1496
|
-
let { lines: s } =
|
|
1497
|
-
return l &&
|
|
1498
|
-
}
|
|
1499
|
-
function
|
|
1500
|
-
|
|
1501
|
-
|
|
1478
|
+
if (!o.length) return j(), !1;
|
|
1479
|
+
v = !1, m = n, h = r, p = o, T();
|
|
1480
|
+
let { lines: s } = O(), l = D();
|
|
1481
|
+
return E(), w(l), l && C(l, !0), c(l ? _ : re(s)), t.flush(), !0;
|
|
1482
|
+
}
|
|
1483
|
+
function A(e) {
|
|
1484
|
+
let n = g !== null;
|
|
1485
|
+
if (g = e, !e) {
|
|
1486
|
+
y = !1, d.hideIcon(), w(null), n && E(), C(), c(_), t.flush();
|
|
1502
1487
|
return;
|
|
1503
1488
|
}
|
|
1504
1489
|
d.placeIcon(e);
|
|
1505
|
-
let
|
|
1506
|
-
|
|
1490
|
+
let r = D();
|
|
1491
|
+
E(), w(r), r && C(r, !0), c(_), t.flush();
|
|
1507
1492
|
}
|
|
1508
|
-
function
|
|
1509
|
-
|
|
1510
|
-
let e =
|
|
1511
|
-
e &&
|
|
1512
|
-
}
|
|
1513
|
-
function A() {
|
|
1514
|
-
p = [], h = null, g = null, v = 0, l.hide(), u.clear(), d.clearTrail(), f.clear(), s([], null), c(0), t.flush();
|
|
1493
|
+
function ee() {
|
|
1494
|
+
T();
|
|
1495
|
+
let e = D();
|
|
1496
|
+
E(), w(e), e && C(e, !0), p.length && O(), c(_), t.flush();
|
|
1515
1497
|
}
|
|
1516
1498
|
function j() {
|
|
1517
|
-
|
|
1499
|
+
v = !1, p = [], m = null, h = null, _ = 0, l.hide(), u.clear(), d.clearTrail(), f.clear(), s([], null), c(0), t.flush();
|
|
1500
|
+
}
|
|
1501
|
+
function M() {
|
|
1502
|
+
j(), g = null, t.destroy();
|
|
1518
1503
|
}
|
|
1519
1504
|
return {
|
|
1520
|
-
setRoute:
|
|
1521
|
-
onPositionChanged:
|
|
1522
|
-
onFloorChanged:
|
|
1523
|
-
clearRoute:
|
|
1524
|
-
destroy:
|
|
1505
|
+
setRoute: k,
|
|
1506
|
+
onPositionChanged: A,
|
|
1507
|
+
onFloorChanged: ee,
|
|
1508
|
+
clearRoute: j,
|
|
1509
|
+
destroy: M
|
|
1525
1510
|
};
|
|
1526
1511
|
}
|
|
1527
1512
|
//#endregion
|
|
1528
1513
|
//#region src/wayfinding/renderer/layerManager.ts
|
|
1529
|
-
function
|
|
1514
|
+
function yn(e) {
|
|
1530
1515
|
let t = e.scene;
|
|
1531
1516
|
if (!t) throw Error("renderer: rendererService.scene is null — start RendererService before constructing renderer");
|
|
1532
1517
|
let n = t.rootLayer.children, r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
|
|
@@ -1556,7 +1541,7 @@ function dn(e) {
|
|
|
1556
1541
|
}
|
|
1557
1542
|
//#endregion
|
|
1558
1543
|
//#region src/wayfinding/renderer/iconManager.ts
|
|
1559
|
-
function
|
|
1544
|
+
function bn(e, t) {
|
|
1560
1545
|
let n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
|
|
1561
1546
|
function a(e, t) {
|
|
1562
1547
|
return t === void 0 ? e : `${e}#${t}`;
|
|
@@ -1565,47 +1550,47 @@ function fn(e, t) {
|
|
|
1565
1550
|
let n = r.get(e);
|
|
1566
1551
|
n || (n = /* @__PURE__ */ new Set(), r.set(e, n)), n.add(t), i.set(t, e);
|
|
1567
1552
|
}
|
|
1568
|
-
function
|
|
1553
|
+
function s(e) {
|
|
1569
1554
|
let t = i.get(e);
|
|
1570
1555
|
if (!t) return;
|
|
1571
1556
|
let n = r.get(t);
|
|
1572
1557
|
n && n.delete(e), i.delete(e);
|
|
1573
1558
|
}
|
|
1574
|
-
function
|
|
1559
|
+
function c(r, i, a) {
|
|
1575
1560
|
var s, c, l;
|
|
1576
|
-
let
|
|
1561
|
+
let d = e.touchLayer(a.layer), f = P(a.canvas, u(a.x, a.y, a.canvas.width, a.canvas.height, t.scale, a.rotation), {
|
|
1577
1562
|
hidden: (s = a.hidden) == null ? !1 : s,
|
|
1578
1563
|
dim: (c = a.dimmed) == null ? !1 : c,
|
|
1579
1564
|
origin: a.origin
|
|
1580
1565
|
});
|
|
1581
|
-
|
|
1566
|
+
d.children.push(f), t.onPtScale(r, (e) => {
|
|
1582
1567
|
let t = n.get(r);
|
|
1583
|
-
if (!(!t || t.imageDef.hidden)) return t.imageDef.bounds =
|
|
1568
|
+
if (!(!t || t.imageDef.hidden)) return t.imageDef.bounds = u(t.imageDef.bounds.center.x, t.imageDef.bounds.center.y, t.imageDef.source.width, t.imageDef.source.height, e, t.imageDef.bounds.rotation), t.imageDef;
|
|
1584
1569
|
}), a.cardinalSnap && t.onRoll(r, (e) => {
|
|
1585
1570
|
let t = n.get(r);
|
|
1586
1571
|
if (!t) return;
|
|
1587
|
-
let i =
|
|
1572
|
+
let i = w(e, t.imageDef.bounds.rotation);
|
|
1588
1573
|
if (i !== void 0) return t.imageDef.bounds.rotation += i, t.imageDef;
|
|
1589
1574
|
});
|
|
1590
|
-
let
|
|
1591
|
-
imageDef:
|
|
1575
|
+
let p = {
|
|
1576
|
+
imageDef: f,
|
|
1592
1577
|
layerName: a.layer,
|
|
1593
1578
|
callback: (l = a.onClick) == null ? null : l
|
|
1594
1579
|
};
|
|
1595
|
-
return n.set(r,
|
|
1580
|
+
return n.set(r, p), o(i, r), p;
|
|
1596
1581
|
}
|
|
1597
|
-
function
|
|
1598
|
-
let
|
|
1599
|
-
d >= 0 && u.splice(d, 1), e.touchedLayers.set(a.layerName,
|
|
1582
|
+
function l(r, i, a, o) {
|
|
1583
|
+
let l = e.resolveLayer(a.layerName), u = l.children, d = u.indexOf(a.imageDef);
|
|
1584
|
+
d >= 0 && u.splice(d, 1), e.touchedLayers.set(a.layerName, l), t.ptScaleRegistry.unregisterByName(r), t.rollRegistry.unregisterByName(r), n.delete(r), s(r), c(r, i, o);
|
|
1600
1585
|
}
|
|
1601
1586
|
function d(n, r, i, a) {
|
|
1602
1587
|
var o, s, c;
|
|
1603
1588
|
if (i.layerName !== a.layer) throw Error(`renderer: icon "${n}" cannot move between layers (was "${i.layerName}", got "${a.layer}")`);
|
|
1604
1589
|
if (i.imageDef.source !== a.canvas) {
|
|
1605
|
-
|
|
1590
|
+
l(n, r, i, a);
|
|
1606
1591
|
return;
|
|
1607
1592
|
}
|
|
1608
|
-
i.imageDef.bounds =
|
|
1593
|
+
i.imageDef.bounds = u(a.x, a.y, a.canvas.width, a.canvas.height, t.scale, a.rotation), i.imageDef.hidden = (o = a.hidden) == null ? !1 : o, i.imageDef.dim = (s = a.dimmed) == null ? !1 : s, i.callback = (c = a.onClick) == null ? null : c, e.touchLayer(a.layer);
|
|
1609
1594
|
}
|
|
1610
1595
|
return {
|
|
1611
1596
|
setIcon(t, r, i) {
|
|
@@ -1616,7 +1601,7 @@ function fn(e, t) {
|
|
|
1616
1601
|
return;
|
|
1617
1602
|
}
|
|
1618
1603
|
let s = n.get(o);
|
|
1619
|
-
s ? d(o, t, s, r) :
|
|
1604
|
+
s ? d(o, t, s, r) : c(o, t, r);
|
|
1620
1605
|
},
|
|
1621
1606
|
clearIcons(t) {
|
|
1622
1607
|
let i = typeof t == "string" ? [t] : t;
|
|
@@ -1636,7 +1621,7 @@ function fn(e, t) {
|
|
|
1636
1621
|
n.clear(), r.clear(), i.clear();
|
|
1637
1622
|
},
|
|
1638
1623
|
handleClick({ data: e }) {
|
|
1639
|
-
let { defs: t } =
|
|
1624
|
+
let { defs: t } = S(e);
|
|
1640
1625
|
for (let e of n.values()) if (e.callback && !e.imageDef.hidden && t.includes(e.imageDef)) {
|
|
1641
1626
|
e.callback();
|
|
1642
1627
|
return;
|
|
@@ -1645,7 +1630,7 @@ function fn(e, t) {
|
|
|
1645
1630
|
handleHover({ data: e }) {
|
|
1646
1631
|
let r = t.renderer;
|
|
1647
1632
|
if (!r) return;
|
|
1648
|
-
let { defs: i } =
|
|
1633
|
+
let { defs: i } = S(e), a = !1;
|
|
1649
1634
|
for (let e of n.values()) if (e.callback && !e.imageDef.hidden && i.includes(e.imageDef)) {
|
|
1650
1635
|
a = !0;
|
|
1651
1636
|
break;
|
|
@@ -1656,8 +1641,8 @@ function fn(e, t) {
|
|
|
1656
1641
|
}
|
|
1657
1642
|
//#endregion
|
|
1658
1643
|
//#region src/wayfinding/renderer/trailManager.ts
|
|
1659
|
-
var
|
|
1660
|
-
function
|
|
1644
|
+
var xn = 40;
|
|
1645
|
+
function Sn(e, t) {
|
|
1661
1646
|
let n = /* @__PURE__ */ new Map();
|
|
1662
1647
|
function r(e) {
|
|
1663
1648
|
return `trail#${e}`;
|
|
@@ -1668,7 +1653,7 @@ function mn(e, t) {
|
|
|
1668
1653
|
n.children = n.children.filter((e) => !r.has(e)), t.dotDefs = [];
|
|
1669
1654
|
}
|
|
1670
1655
|
function a(n) {
|
|
1671
|
-
let r = e.touchLayer(n.layerName), a = t.scale, o =
|
|
1656
|
+
let r = e.touchLayer(n.layerName), a = t.scale, o = xn * a, s = ge(n.from, n.to, o), c = n.canvas, l = s.map((e) => P(c, u(e.x, e.y, c.width, c.height, a)));
|
|
1672
1657
|
i(n), r.children.push(...l), n.dotDefs = l;
|
|
1673
1658
|
}
|
|
1674
1659
|
function o(e) {
|
|
@@ -1704,7 +1689,7 @@ function mn(e, t) {
|
|
|
1704
1689
|
}
|
|
1705
1690
|
//#endregion
|
|
1706
1691
|
//#region src/renderer/engine-core/animation.ts
|
|
1707
|
-
function
|
|
1692
|
+
function Cn(e, t, n, r = 0) {
|
|
1708
1693
|
let i = 0, a = 0, o = null, s = null;
|
|
1709
1694
|
if (!e.length) return;
|
|
1710
1695
|
let c = e.map((e) => {
|
|
@@ -1769,7 +1754,7 @@ function hn(e, t, n, r = 0) {
|
|
|
1769
1754
|
}
|
|
1770
1755
|
//#endregion
|
|
1771
1756
|
//#region src/wayfinding/renderer/routeLineManager.ts
|
|
1772
|
-
function
|
|
1757
|
+
function wn(e, t, n) {
|
|
1773
1758
|
let r = null, i = null, a = null;
|
|
1774
1759
|
return {
|
|
1775
1760
|
setRouteLines(o, s, c) {
|
|
@@ -1778,7 +1763,7 @@ function gn(e, t, n) {
|
|
|
1778
1763
|
i = d, a = f;
|
|
1779
1764
|
let p = (l = c.resetAnimation) == null ? !0 : l, m = 0;
|
|
1780
1765
|
r && (p || (m = r.getProgress()), r.stop(), r = null);
|
|
1781
|
-
let h = o.map((e) =>
|
|
1766
|
+
let h = o.map((e) => ue(e, n.passed)), g = s.map((e) => ue(e, n.remaining));
|
|
1782
1767
|
if (d.children = [...h, ...g], !g.length) {
|
|
1783
1768
|
f.children = [];
|
|
1784
1769
|
return;
|
|
@@ -1787,7 +1772,7 @@ function gn(e, t, n) {
|
|
|
1787
1772
|
...e,
|
|
1788
1773
|
color: n.active
|
|
1789
1774
|
}));
|
|
1790
|
-
r = (u =
|
|
1775
|
+
r = (u = Cn(_, (e, n, r) => {
|
|
1791
1776
|
f.children = r ? [] : [..._.slice(0, n), e], t.update(f);
|
|
1792
1777
|
}, () => t.scale, m)) == null ? null : u;
|
|
1793
1778
|
},
|
|
@@ -1801,16 +1786,16 @@ function gn(e, t, n) {
|
|
|
1801
1786
|
}
|
|
1802
1787
|
//#endregion
|
|
1803
1788
|
//#region src/wayfinding/renderer/createWayfindingRenderer.ts
|
|
1804
|
-
var
|
|
1789
|
+
var Tn = {
|
|
1805
1790
|
passed: "#B5B7BC",
|
|
1806
1791
|
remaining: "#A4CCE2",
|
|
1807
1792
|
active: "#0794EA"
|
|
1808
1793
|
};
|
|
1809
|
-
function
|
|
1794
|
+
function En(e, t = {}) {
|
|
1810
1795
|
let n = {
|
|
1811
|
-
...
|
|
1796
|
+
...Tn,
|
|
1812
1797
|
...t.colors
|
|
1813
|
-
}, r =
|
|
1798
|
+
}, r = yn(e), i = bn(r, e), a = Sn(r, e), o = wn(r, e, n), s = e.renderer;
|
|
1814
1799
|
if (!s) throw Error("renderer: rendererService.renderer is null — start RendererService before constructing renderer");
|
|
1815
1800
|
s.events.addEventListener("pointer:click", i.handleClick), s.events.addEventListener("pointer:move", i.handleHover);
|
|
1816
1801
|
let c = {
|
|
@@ -1832,58 +1817,57 @@ function vn(e, t = {}) {
|
|
|
1832
1817
|
}
|
|
1833
1818
|
//#endregion
|
|
1834
1819
|
//#region src/wayfinding/createWayfinding.ts
|
|
1835
|
-
function
|
|
1836
|
-
var t, n;
|
|
1837
|
-
let
|
|
1820
|
+
function Dn(e) {
|
|
1821
|
+
var t, n, r;
|
|
1822
|
+
let i = he(g), a = j({
|
|
1838
1823
|
iconMap: F.fp.icons,
|
|
1839
1824
|
pixelRatio: devicePixelRatio
|
|
1840
|
-
}),
|
|
1841
|
-
points:
|
|
1842
|
-
trail:
|
|
1843
|
-
lines:
|
|
1844
|
-
linesAnimated:
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1825
|
+
}), o = En(e), s = k(N, F.routeStore), c = {
|
|
1826
|
+
points: xe,
|
|
1827
|
+
trail: Se,
|
|
1828
|
+
lines: Ce,
|
|
1829
|
+
linesAnimated: we,
|
|
1830
|
+
currentPosition: Te
|
|
1831
|
+
}, l = vn({
|
|
1832
|
+
engine: i,
|
|
1833
|
+
renderer: o,
|
|
1834
|
+
iconProvider: a,
|
|
1835
|
+
floorContext: s,
|
|
1836
|
+
layers: c,
|
|
1837
|
+
snapThreshold: M({
|
|
1838
|
+
thresholdInMeters: te(z == null || (t = z.properties) == null || (t = t.config) == null ? void 0 : t.snapThreshold) || 7.5,
|
|
1839
|
+
gpsConfig: z == null || (n = z.properties) == null ? void 0 : n.config
|
|
1854
1840
|
}),
|
|
1855
1841
|
onTransitionClick: (e) => {
|
|
1856
|
-
e.role === "exit" &&
|
|
1842
|
+
e.role === "exit" && N.updateVisibility(e.targetLayer, !0);
|
|
1857
1843
|
},
|
|
1858
1844
|
onRouteUpdate: (e, t) => {
|
|
1859
|
-
|
|
1860
|
-
let e = t.x2 - t.x1, n = t.y2 - t.y1;
|
|
1861
|
-
L.moveToRect = N.fromX1y1x2y2(t.x1, t.y1, t.x2, t.y2).withPadding(e, n);
|
|
1862
|
-
}
|
|
1845
|
+
F.routeStore.updateRoute(e), t && (I.moveToRect = L.fromX1y1x2y2(t.x1, t.y1, t.x2, t.y2));
|
|
1863
1846
|
},
|
|
1864
1847
|
onRouteDistance: (e) => F.routeStore.updateRouteDistance(e)
|
|
1865
|
-
}),
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1848
|
+
}), u = rn({
|
|
1849
|
+
renderer: o,
|
|
1850
|
+
kioskIconMap: F.fp.icons,
|
|
1851
|
+
layer: c.points
|
|
1852
|
+
}), d = on({
|
|
1853
|
+
renderer: o,
|
|
1854
|
+
iconProvider: a,
|
|
1855
|
+
floorContext: s,
|
|
1856
|
+
layer: c.points
|
|
1857
|
+
}), f = E(z == null || (r = z.properties) == null ? void 0 : r.config), p = en({
|
|
1858
|
+
runtime: l,
|
|
1859
|
+
kioskHandler: u,
|
|
1860
|
+
yahHandler: d,
|
|
1878
1861
|
stores: {
|
|
1879
1862
|
routeStore: F.routeStore,
|
|
1880
|
-
uiState:
|
|
1881
|
-
layerStore:
|
|
1882
|
-
}
|
|
1863
|
+
uiState: I,
|
|
1864
|
+
layerStore: N
|
|
1865
|
+
},
|
|
1866
|
+
rerouteThresholdSvg: f
|
|
1883
1867
|
});
|
|
1884
|
-
return
|
|
1885
|
-
|
|
1868
|
+
return o.flush(), () => {
|
|
1869
|
+
p(), l.destroy();
|
|
1886
1870
|
};
|
|
1887
1871
|
}
|
|
1888
1872
|
//#endregion
|
|
1889
|
-
export {
|
|
1873
|
+
export { Ut as a, st as c, Ht as i, Oe as l, Qt as n, Dt as o, Bt as r, vt as s, Dn as t, ke as u };
|