@expofp/floorplan 3.46.0 → 3.47.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/{Button-CJtSs2s5.js → Button-DyqVe4xL.js} +5 -5
- package/dist/browser/{CookieConsent-C4fi9Tyh.js → CookieConsent-Dne5UXwi.js} +7 -7
- package/dist/browser/{Debug-Cd610X28.js → Debug-CSY6FmRs.js} +7 -7
- package/dist/browser/{DebugTools-D9g4_7Cc.js → DebugTools-CSGF0Uqi.js} +6 -6
- package/dist/browser/{Demo-CryvOcgl.js → Demo-AI-22qbf.js} +9 -9
- package/dist/browser/{Free-CJXdChTu.js → Free-BmItczwV.js} +10 -10
- package/dist/browser/{GalleryContainer-DJEByROk.js → GalleryContainer-Do5QXu8h.js} +11 -11
- package/dist/browser/{GpsLoader-DSsG-xT8.js → GpsLoader-D6boL0AQ.js} +14 -14
- package/dist/browser/{KioskStore-DOB-av5O.js → KioskStore-DodjzUdk.js} +19 -19
- package/dist/browser/{LayerStore-CRZuLMs5.js → LayerStore-DCg-juRT.js} +289 -270
- package/dist/browser/{MaplibreAdapter-C_5hoa-Y.js → MaplibreAdapter-D838jbrB.js} +148 -148
- package/dist/browser/{ModalContainer-Ch8bqPHR.js → ModalContainer-DAh3OT88.js} +10 -10
- package/dist/browser/{PermissionNotice-CiR8SfU0.js → PermissionNotice-D9dFiy8Z.js} +6 -6
- package/dist/browser/{RouteStore-D5yYhhPl.js → RouteStore-B82dztUW.js} +342 -327
- package/dist/browser/{SetKioskMode-PiwwpWpN.js → SetKioskMode-DcQFm_UG.js} +12 -12
- package/dist/browser/{ShowKiosk-uWNhreCd.js → ShowKiosk-BnuT9vM-.js} +11 -11
- package/dist/browser/{UIState-Bi4-Ri9M.js → UIState-Dd6fvko0.js} +97 -97
- package/dist/browser/{ViewerMenuPanel-B3vtTFpG.js → ViewerMenuPanel-C3B3OmlN.js} +11 -11
- package/dist/browser/{add-debug-secret-listener-Db76vB7o.js → add-debug-secret-listener-BJu3pH2x.js} +1 -1
- package/dist/browser/{adopt-global-settings-67S2v_mo.js → adopt-global-settings-BerG23m2.js} +9 -9
- package/dist/browser/{boolean-editor-B1nYYAEd.js → boolean-editor-C1i1ID8g.js} +9 -9
- package/dist/browser/{bootIntercom-BQDnVlyT.js → bootIntercom-C3tqD4Ct.js} +2 -2
- package/dist/browser/bundle.json +87 -87
- package/dist/browser/{camera-events-dIlK_9kU.js → camera-events-DzSywgw0.js} +1 -1
- package/dist/browser/{classnames-CnT6VKND.js → classnames-CQMYVTW5.js} +2 -2
- package/dist/browser/{client-iKoOfnTw.js → client-DbQnuxsE.js} +5 -5
- package/dist/browser/{components-CEmFE-HF.js → components-CzNKFauU.js} +2211 -2160
- package/dist/browser/{create-live-plan-VYe8zgCt.js → create-live-plan-D17jzmnD.js} +505 -439
- package/dist/browser/{debug-context-SM4t83oS.js → debug-context-CLE9u3W1.js} +6 -6
- package/dist/browser/{debug-overlay-BLs-zKon.js → debug-overlay-CqyQd6Tu.js} +10 -10
- package/dist/browser/{debug-ui-COzdQWZH.js → debug-ui-CopIbPwZ.js} +6 -6
- package/dist/browser/{dist-Dxs4B_bo.js → dist-CXSdtHNF.js} +6 -6
- package/dist/browser/{dist-B-cTdqLW.js → dist-DrhAFaXl.js} +5 -5
- package/dist/browser/{dist-C7DmTDRb.js → dist-mSjAoqZa.js} +3 -3
- package/dist/browser/{efp-debug-init-B_S1vuGu.js → efp-debug-init-D3gNE8Zq.js} +3 -3
- package/dist/browser/{enum-editor-CNXjKr2S.js → enum-editor-DfEZj9xj.js} +4 -4
- package/dist/browser/{es5-DXybUgTP.js → es5-CRZbJ3RK.js} +2 -2
- package/dist/browser/{event-head-ClLbm9Br.js → event-head-C5Pqy8aE.js} +1 -1
- package/dist/browser/{event-not-found-DH79zTW9.js → event-not-found-y-baKtlx.js} +3 -3
- package/dist/browser/{event-scoped-cache-DpaRX7uc.js → event-scoped-cache-CUHa0QyF.js} +3 -3
- package/dist/browser/{expofpUrl-n296mHS4.js → expofpUrl-CUIqO5kL.js} +1 -1
- package/dist/browser/{exports-lzdhlipZ.js → exports-CnYQMV4a.js} +1 -1
- package/dist/browser/{favicon-DIM65QuL.js → favicon-DtPw8IL3.js} +1 -1
- package/dist/browser/{fetch-retry.umd-vSI4xMC_.js → fetch-retry.umd-DjnZ3Ut9.js} +2 -2
- package/dist/browser/{flex-BAVIARsK.js → flex-C5mQXGq5.js} +5 -5
- package/dist/browser/{floorplan.loader-eMUdl6jt.js → floorplan.loader-DEaS-fgT.js} +12 -12
- package/dist/browser/{floorplan.ready-1Txw5bTb.js → floorplan.ready-BOnFLVHj.js} +269 -243
- package/dist/browser/{framing-rect-BTpvle_p.js → framing-rect-BIpsCqTB.js} +426 -351
- package/dist/browser/{freeBanner-F3TTYS8Q.js → freeBanner-BQ-1hI0V.js} +2 -2
- package/dist/browser/{fuse-CaTg1KbU.js → fuse-jVBfzHic.js} +2 -2
- package/dist/browser/{i18n-C_4TK-u4.js → i18n-DlquqKCP.js} +333 -318
- package/dist/browser/index.js +33 -33
- package/dist/browser/{index.module-DRBCPeTj.js → index.module-CN0EtZcO.js} +4 -4
- package/dist/browser/{init-ui-BYGB5Nye.js → init-ui-BQ7d5hKB.js} +19 -19
- package/dist/browser/{integrateKiosk-BYXxa3GA.js → integrateKiosk-CumGPvbc.js} +6 -6
- package/dist/browser/{is-debug-D3IYeseH.js → is-debug-IkNSAGo8.js} +4 -4
- package/dist/browser/{is-own-domain-Sd0Gyaz6.js → is-own-domain-yrTLx04R.js} +1 -1
- package/dist/browser/{is-webview-DkUEFd5j.js → is-webview-DA6FLdme.js} +1 -1
- package/dist/browser/{jsx-runtime-Z0-uGdH1.js → jsx-runtime-BzLvm2y2.js} +2 -2
- package/dist/browser/{kiosk-mode-D9JdlNtc.js → kiosk-mode-zD8K_fUT.js} +3 -3
- package/dist/browser/{kiosk-record-U7MDU1j1.js → kiosk-record-Ckxa0L0B.js} +1 -1
- package/dist/browser/{kioskApi-CZmWdnyx.js → kioskApi-CG3QGuUx.js} +7 -7
- package/dist/browser/{ktx2-DBt1EdxU.js → ktx2-Dx_h97CR.js} +2 -2
- package/dist/browser/{lib-Bpc7qOXg.js → lib-5KOc2jVl.js} +3 -3
- package/dist/browser/{loadImage-Dy1_5knL.js → loadImage-iqS2KHgN.js} +1 -1
- package/dist/browser/{logDeviceInfo-DFiuu0JW.js → logDeviceInfo-DhvfxT2K.js} +9 -9
- package/dist/browser/{mobx-NvAhKUmy.js → mobx-CUFHrL57.js} +4 -4
- package/dist/browser/{mobx.module-Bv5V3v5d.js → mobx.module-BTnTbXnp.js} +1 -1
- package/dist/browser/{optional-boolean-editor-BEOwiXCN.js → optional-boolean-editor-C3k-DXeF.js} +3 -3
- package/dist/browser/{optional-enum-editor-C6KjlpRA.js → optional-enum-editor-CeY1nCnF.js} +4 -4
- package/dist/browser/{optional-string-editor-CFrCSmMd.js → optional-string-editor-DrVHjvsL.js} +4 -4
- package/dist/browser/{particles.min-C2A0DA4i.js → particles.min-BPS1Hdpf.js} +2 -2
- package/dist/browser/{react-CabZjr3N.js → react-XuvSZP7j.js} +2 -2
- package/dist/browser/{react-dom-RP6YFh3Z.js → react-dom-Cg1Pcvni.js} +3 -3
- package/dist/browser/{rolldown-runtime-fogUk23q.js → rolldown-runtime-5rOLGCTp.js} +1 -1
- package/dist/browser/{scene-DuvbPaPD.js → scene-CeKqMicD.js} +10 -10
- package/dist/browser/{scheduler-k2rbX-LJ.js → scheduler-D5sEY0Dn.js} +2 -2
- package/dist/browser/{select-DDC9fvlH.js → select-Cbv7ufJV.js} +10 -10
- package/dist/browser/{settings-BozBuwXD.js → settings-DgySPhLO.js} +2 -2
- package/dist/browser/{settings-item-D4rlEKz6.js → settings-item-e3YLYS4G.js} +6 -6
- package/dist/browser/{store-CbRrBMLs.js → store-DTvNQcN7.js} +2 -2
- package/dist/browser/{string-editor-CExhbakJ.js → string-editor-Dbv6xI9s.js} +4 -4
- package/dist/browser/{text-field-BV3Vp6cI.js → text-field-Cg5awwlh.js} +5 -5
- package/dist/browser/{theme-E8keDBEa.js → theme-BRoMMdQq.js} +8 -8
- package/dist/browser/{three.core-C_nLFu2C.js → three.core-DvpRLNmt.js} +1 -1
- package/dist/browser/{ui-CgHs1m5h.js → ui-DNMlY_VB.js} +8 -8
- package/dist/browser/{useRenderTarget-D7wRx7QW.js → useRenderTarget-C__MnkX7.js} +4 -4
- package/dist/browser/{viewport-BH6xyD06.js → viewport-DBuFXrrj.js} +3 -3
- package/dist/browser/{wayfinding-BiZuXF9Q.js → wayfinding-BUQns13Y.js} +516 -510
- package/dist/esm/components/BaseFilterModal.d.ts +4 -2
- package/dist/esm/components/BaseFilterModal.js +1 -1
- package/dist/esm/components/CategoryFilterModal.js +1 -1
- package/dist/esm/components/Map/drawing/config/booth-badge-anchor.d.ts +57 -5
- package/dist/esm/components/Map/drawing/config/booth-badge-anchor.js +1 -1
- package/dist/esm/components/Map/drawing/config/booth-fill-color.d.ts +16 -0
- package/dist/esm/components/Map/drawing/config/booth-fill-color.js +1 -0
- package/dist/esm/components/Map/drawing/config/config-booth-badge.js +1 -1
- package/dist/esm/components/Map/drawing/config/config-booth-bg.js +1 -1
- package/dist/esm/components/SearchButtons/SearchButton.d.ts +1 -0
- package/dist/esm/components/SearchButtons/SearchButton.js +1 -1
- package/dist/esm/floorplan.ready.js +1 -1
- package/dist/esm/services/URLFilterManager.d.ts +8 -0
- package/dist/esm/services/URLFilterManager.js +1 -1
- package/dist/esm/store/CategoryFilterStore.d.ts +33 -1
- package/dist/esm/store/CategoryFilterStore.js +1 -1
- package/dist/esm/store/RootStore.js +1 -1
- package/dist/esm/store/RouteStore.d.ts +9 -1
- package/dist/esm/store/RouteStore.js +1 -1
- package/dist/esm/store/SearchStore.js +1 -1
- package/dist/esm/store/providers/SearchShortcutProvider.js +1 -1
- package/dist/esm/store/search-buttons/SearchButtonsActions.d.ts +7 -0
- package/dist/esm/store/search-buttons/SearchButtonsActions.js +1 -1
- package/dist/esm/store/search-buttons/SearchButtonsFactory.d.ts +2 -2
- package/dist/esm/store/search-buttons/SearchButtonsFactory.js +1 -1
- package/dist/esm/store/search-buttons/SearchButtonsFilters.d.ts +2 -2
- package/dist/esm/store/search-buttons/SearchButtonsFilters.js +1 -1
- package/dist/esm/store/search-buttons/constants.d.ts +0 -3
- package/dist/esm/store/search-buttons/constants.js +1 -1
- package/dist/esm/store/search-buttons/utils.d.ts +23 -2
- package/dist/esm/store/search-buttons/utils.js +1 -1
- package/dist/esm/store/types.d.ts +5 -0
- package/dist/esm/test/store-harness.js +1 -1
- package/dist/esm/utils/filter-groups.d.ts +9 -0
- package/dist/esm/utils/filter-groups.js +1 -0
- package/dist/esm/utils/gps.d.ts +5 -1
- package/dist/esm/utils/gps.js +1 -1
- package/package.json +10 -10
|
@@ -1,38 +1,38 @@
|
|
|
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.47.0" };
|
|
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] = "60580d2c-c701-4a3e-85e9-b8bfd3ef6bdc", e._sentryDebugIdIdentifier = "sentry-dbid-60580d2c-c701-4a3e-85e9-b8bfd3ef6bdc");
|
|
7
7
|
} catch {}
|
|
8
8
|
})();
|
|
9
|
-
import { r as e, t } from "./rolldown-runtime-
|
|
10
|
-
import { o as n } from "./is-debug-
|
|
11
|
-
import { i as r, l as i } from "./mobx.module-
|
|
12
|
-
import {
|
|
9
|
+
import { r as e, t } from "./rolldown-runtime-5rOLGCTp.js";
|
|
10
|
+
import { o as n } from "./is-debug-IkNSAGo8.js";
|
|
11
|
+
import { i as r, l as i } from "./mobx.module-BTnTbXnp.js";
|
|
12
|
+
import { $t as a, At as o, Dt as s, Et as c, Kt as l, St as u, an as d, bt as f, cn as p, dn as m, ht as h, in as g, it as _, jt as v, kt as y, ln as b, nn as x, on as S, qt as C, un as ee, wt as w, xt as T } from "./LayerStore-DCg-juRT.js";
|
|
13
13
|
//#region ../geometry/src/lib/geo.ts
|
|
14
|
-
var
|
|
15
|
-
function
|
|
16
|
-
let n =
|
|
17
|
-
return
|
|
14
|
+
var E = 6371e3;
|
|
15
|
+
function D(e, t) {
|
|
16
|
+
let n = p(e.lat), r = p(t.lat), i = p(t.lat - e.lat), a = p(t.lng - e.lng), o = Math.sin(i / 2) * Math.sin(i / 2) + Math.cos(n) * Math.cos(r) * Math.sin(a / 2) * Math.sin(a / 2);
|
|
17
|
+
return E * (2 * Math.atan2(Math.sqrt(o), Math.sqrt(1 - o)));
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
let n =
|
|
21
|
-
return (
|
|
19
|
+
function O(e, t) {
|
|
20
|
+
let n = p(e.lat), r = p(t.lat), i = p(t.lng - e.lng), a = Math.sin(i) * Math.cos(r), o = Math.cos(n) * Math.sin(r) - Math.sin(n) * Math.cos(r) * Math.cos(i);
|
|
21
|
+
return (m(Math.atan2(a, o)) + 360) % 360;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
24
|
-
let r = t /
|
|
23
|
+
function k(e, t, n) {
|
|
24
|
+
let r = t / E, i = p(n), a = p(e.lat), o = p(e.lng), s = Math.asin(Math.sin(a) * Math.cos(r) + Math.cos(a) * Math.sin(r) * Math.cos(i)), c = o + Math.atan2(Math.sin(i) * Math.sin(r) * Math.cos(a), Math.cos(r) - Math.sin(a) * Math.sin(s));
|
|
25
25
|
return {
|
|
26
|
-
lat:
|
|
27
|
-
lng:
|
|
26
|
+
lat: m(s),
|
|
27
|
+
lng: m(ee(c))
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
-
function
|
|
31
|
-
let r = n.local.x - t.local.x, i = n.local.y - t.local.y, a = Math.sqrt(r * r + i * i), o = e.x - t.local.x, s = e.y - t.local.y, c = Math.sqrt(o * o + s * s), l =
|
|
32
|
-
return
|
|
30
|
+
function A(e, t, n) {
|
|
31
|
+
let r = n.local.x - t.local.x, i = n.local.y - t.local.y, a = Math.sqrt(r * r + i * i), o = e.x - t.local.x, s = e.y - t.local.y, c = Math.sqrt(o * o + s * s), l = m(Math.atan2(i, r)), u = m(Math.atan2(s, o)) - l, d = (a === 0 ? 0 : c / a) * D(t.geo, n.geo), f = O(t.geo, n.geo);
|
|
32
|
+
return k(t.geo, d, f + u);
|
|
33
33
|
}
|
|
34
|
-
function
|
|
35
|
-
let r =
|
|
34
|
+
function te(e, t, n) {
|
|
35
|
+
let r = D(t.geo, n.geo), i = O(t.geo, n.geo), a = D(t.geo, e), o = O(t.geo, e) - i, s = r === 0 ? 0 : a / r, c = n.local.x - t.local.x, l = n.local.y - t.local.y, u = Math.sqrt(c * c + l * l), d = Math.atan2(l, c), f = b(u * s, d + p(o));
|
|
36
36
|
return {
|
|
37
37
|
x: t.local.x + f.x,
|
|
38
38
|
y: t.local.y + f.y
|
|
@@ -40,46 +40,46 @@ function ee(e, t, n) {
|
|
|
40
40
|
}
|
|
41
41
|
//#endregion
|
|
42
42
|
//#region ../geometry/src/lib/line.ts
|
|
43
|
-
function
|
|
44
|
-
return
|
|
43
|
+
function ne(e) {
|
|
44
|
+
return d(e.p0, e.p1);
|
|
45
45
|
}
|
|
46
|
-
function
|
|
47
|
-
return
|
|
46
|
+
function j(e, t) {
|
|
47
|
+
return S(e.p0, e.p1, .5, t);
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function M(e, t) {
|
|
50
50
|
return Math.atan2(t.y - e.y, t.x - e.x);
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function re(e, t, n) {
|
|
53
53
|
var r;
|
|
54
|
-
let i = e.p0.x, a = e.p0.y, o = e.p1.x, s = e.p1.y, c = t.x, l = t.y, u = o - i,
|
|
55
|
-
|
|
56
|
-
let
|
|
54
|
+
let i = e.p0.x, a = e.p0.y, o = e.p1.x, s = e.p1.y, c = t.x, l = t.y, u = o - i, f = s - a, p = u * u + f * f, m;
|
|
55
|
+
p === 0 ? m = 0 : (m = ((c - i) * u + (l - a) * f) / p, m = m < 0 ? 0 : m > 1 ? 1 : m);
|
|
56
|
+
let h = (n == null ? new g() : n).set(i + u * m, a + f * m, (r = e.elevation) == null ? 0 : r), _ = d({
|
|
57
57
|
x: c,
|
|
58
58
|
y: l
|
|
59
|
-
},
|
|
59
|
+
}, h);
|
|
60
60
|
return {
|
|
61
|
-
projected:
|
|
62
|
-
t:
|
|
63
|
-
distance:
|
|
61
|
+
projected: h,
|
|
62
|
+
t: m,
|
|
63
|
+
distance: _
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
66
|
//#endregion
|
|
67
67
|
//#region src/data/fpGeo.ts
|
|
68
|
-
function
|
|
69
|
-
return
|
|
68
|
+
function N() {
|
|
69
|
+
return l().__fpGeo;
|
|
70
70
|
}
|
|
71
71
|
//#endregion
|
|
72
72
|
//#region src/utils/planBearing.ts
|
|
73
|
-
function
|
|
73
|
+
function ie(e) {
|
|
74
74
|
return (180 - 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + e * Math.PI / 360))) / 360;
|
|
75
75
|
}
|
|
76
|
-
function
|
|
77
|
-
let n = (Math.atan2(
|
|
76
|
+
function ae(e, t) {
|
|
77
|
+
let n = (Math.atan2(ie(t.lat) - ie(e.lat), (t.lng - e.lng) / 360) - Math.atan2(t.y - e.y, t.x - e.x)) * 180 / Math.PI % 360;
|
|
78
78
|
return Number.isFinite(n) ? (n + 360) % 360 : NaN;
|
|
79
79
|
}
|
|
80
80
|
//#endregion
|
|
81
81
|
//#region src/utils/gps.ts
|
|
82
|
-
function
|
|
82
|
+
function P(e) {
|
|
83
83
|
return [{
|
|
84
84
|
local: {
|
|
85
85
|
x: e.p0.x,
|
|
@@ -100,47 +100,53 @@ function I(e) {
|
|
|
100
100
|
}
|
|
101
101
|
}];
|
|
102
102
|
}
|
|
103
|
-
function
|
|
103
|
+
function F(e) {
|
|
104
104
|
return typeof e == "number" && Number.isFinite(e);
|
|
105
105
|
}
|
|
106
|
-
function
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
106
|
+
function oe(e) {
|
|
107
|
+
return typeof e == "string" ? Number(e.replace(",", ".")) : e;
|
|
108
|
+
}
|
|
109
|
+
function se(e) {
|
|
110
|
+
return typeof e == "string" ? e.trim() !== "" && F(oe(e)) : F(e);
|
|
111
|
+
}
|
|
112
|
+
function ce({ lat: e, lng: t, angle: r }, i) {
|
|
113
|
+
if (!(F(e) && F(t))) return null;
|
|
114
|
+
let { p0: a, p2: o } = i, s = D(a, o);
|
|
115
|
+
if (!F(s) || s <= 0) return n.warn("Invalid GPS config: zero or negative distance", {
|
|
110
116
|
fullGpsDistance: s,
|
|
111
117
|
p0: a,
|
|
112
118
|
p2: o
|
|
113
119
|
}), null;
|
|
114
|
-
let [c, l] =
|
|
120
|
+
let [c, l] = P(i), u = te({
|
|
115
121
|
lat: e,
|
|
116
122
|
lng: t
|
|
117
123
|
}, c, l);
|
|
118
|
-
return
|
|
124
|
+
return ne({
|
|
119
125
|
p0: u,
|
|
120
|
-
p1:
|
|
126
|
+
p1: j({
|
|
121
127
|
p0: a,
|
|
122
128
|
p1: o
|
|
123
129
|
})
|
|
124
|
-
}) > 5 *
|
|
130
|
+
}) > 5 * d(a, o) ? (n.warn("Current position too far"), null) : {
|
|
125
131
|
...u,
|
|
126
132
|
angle: r
|
|
127
133
|
};
|
|
128
134
|
}
|
|
129
|
-
function
|
|
130
|
-
let [r, i] =
|
|
135
|
+
function le(e, t, n) {
|
|
136
|
+
let [r, i] = P(n), { lat: a, lng: o } = A({
|
|
131
137
|
x: e,
|
|
132
138
|
y: t
|
|
133
139
|
}, r, i);
|
|
134
140
|
return [o, a];
|
|
135
141
|
}
|
|
136
|
-
function
|
|
137
|
-
var t, n;
|
|
138
|
-
let
|
|
139
|
-
return (e == null ? void 0 : e.angle) === null ? 0 : (((e.angle -
|
|
142
|
+
function ue(e) {
|
|
143
|
+
var t, n, r;
|
|
144
|
+
let i = (t = N()) == null || (t = t.properties) == null ? void 0 : t.config, a = i ? ae(i.p0, i.p2) : NaN, o = Number.isFinite(a) ? a : (n = i == null ? void 0 : i.bearing) == null ? 0 : n;
|
|
145
|
+
return (e == null ? void 0 : e.angle) === null ? 0 : (((((r = e.angle) == null ? NaN : r) - o) % 360 + 360) % 360 - 90 + 360) % 360;
|
|
140
146
|
}
|
|
141
147
|
//#endregion
|
|
142
148
|
//#region ../wayfinding/src/core/graph/buildGraph.ts
|
|
143
|
-
function
|
|
149
|
+
function de(e, t, n) {
|
|
144
150
|
var r, i;
|
|
145
151
|
return t.build(e.getLines(), {
|
|
146
152
|
oriented: (r = n.oriented) == null || r,
|
|
@@ -153,7 +159,7 @@ function se(e, t, n) {
|
|
|
153
159
|
}
|
|
154
160
|
//#endregion
|
|
155
161
|
//#region ../../node_modules/.pnpm/ngraph.events@1.4.0/node_modules/ngraph.events/dist/ngraph.events.cjs
|
|
156
|
-
var
|
|
162
|
+
var fe = /* @__PURE__ */ t(((e, t) => {
|
|
157
163
|
function n(e) {
|
|
158
164
|
i(e);
|
|
159
165
|
let t = r(e);
|
|
@@ -202,38 +208,38 @@ var ce = /* @__PURE__ */ t(((e, t) => {
|
|
|
202
208
|
for (let n = 0; n < t.length; ++n) if (e.hasOwnProperty(t[n])) throw Error("Subject cannot be eventified, since it already has property '" + t[n] + "'");
|
|
203
209
|
}
|
|
204
210
|
t.exports = n;
|
|
205
|
-
})),
|
|
211
|
+
})), pe = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
206
212
|
t.exports = r;
|
|
207
|
-
var n =
|
|
213
|
+
var n = fe();
|
|
208
214
|
function r(e) {
|
|
209
215
|
if (e = e || {}, "uniqueLinkId" in e && (console.warn("ngraph.graph: Starting from version 0.14 `uniqueLinkId` is deprecated.\nUse `multigraph` option instead\n", "\n", "Note: there is also change in default behavior: From now on each graph\nis considered to be not a multigraph by default (each edge is unique)."), e.multigraph = e.uniqueLinkId), e.multigraph === void 0 && (e.multigraph = !1), typeof Map != "function") throw Error("ngraph.graph requires `Map` to be defined. Please polyfill it before using ngraph");
|
|
210
|
-
var t = /* @__PURE__ */ new Map(), r = [], l = {}, u = 0, d = e.multigraph ?
|
|
216
|
+
var t = /* @__PURE__ */ new Map(), r = [], l = {}, u = 0, d = e.multigraph ? T : w, f = [], p = N, m = N, h = N, g = N, _ = {
|
|
211
217
|
addNode: x,
|
|
212
|
-
addLink:
|
|
213
|
-
removeLink:
|
|
218
|
+
addLink: ee,
|
|
219
|
+
removeLink: k,
|
|
214
220
|
removeNode: C,
|
|
215
221
|
getNode: S,
|
|
216
|
-
getNodeCount:
|
|
217
|
-
getLinkCount:
|
|
218
|
-
getLinksCount:
|
|
219
|
-
getNodesCount:
|
|
220
|
-
getLinks:
|
|
221
|
-
forEachNode:
|
|
222
|
-
forEachLinkedNode:
|
|
223
|
-
forEachLink:
|
|
222
|
+
getNodeCount: E,
|
|
223
|
+
getLinkCount: D,
|
|
224
|
+
getLinksCount: D,
|
|
225
|
+
getNodesCount: E,
|
|
226
|
+
getLinks: O,
|
|
227
|
+
forEachNode: P,
|
|
228
|
+
forEachLinkedNode: j,
|
|
229
|
+
forEachLink: ne,
|
|
224
230
|
beginUpdate: h,
|
|
225
231
|
endUpdate: g,
|
|
226
|
-
clear:
|
|
227
|
-
hasLink:
|
|
232
|
+
clear: te,
|
|
233
|
+
hasLink: A,
|
|
228
234
|
hasNode: S,
|
|
229
|
-
getLink:
|
|
235
|
+
getLink: A
|
|
230
236
|
};
|
|
231
237
|
return n(_), v(), _;
|
|
232
238
|
function v() {
|
|
233
239
|
var e = _.on;
|
|
234
240
|
_.on = t;
|
|
235
241
|
function t() {
|
|
236
|
-
return _.beginUpdate = h =
|
|
242
|
+
return _.beginUpdate = h = ie, _.endUpdate = g = ae, p = y, m = b, _.on = e, e.apply(_, arguments);
|
|
237
243
|
}
|
|
238
244
|
}
|
|
239
245
|
function y(e, t) {
|
|
@@ -264,38 +270,38 @@ var ce = /* @__PURE__ */ t(((e, t) => {
|
|
|
264
270
|
var r = n.links;
|
|
265
271
|
if (r) {
|
|
266
272
|
n.links = null;
|
|
267
|
-
for (var i = 0; i < r.length; ++i)
|
|
273
|
+
for (var i = 0; i < r.length; ++i) k(r[i]);
|
|
268
274
|
}
|
|
269
275
|
return t.delete(e), m(n, "remove"), g(), !0;
|
|
270
276
|
}
|
|
271
|
-
function
|
|
277
|
+
function ee(e, t, n) {
|
|
272
278
|
h();
|
|
273
279
|
var i = S(e) || x(e), a = S(t) || x(t), s = d(e, t, n);
|
|
274
280
|
return r.push(s), o(i, s), e !== t && o(a, s), p(s, "add"), g(), s;
|
|
275
281
|
}
|
|
276
|
-
function
|
|
282
|
+
function w(e, t, n) {
|
|
277
283
|
return new s(e, t, n, c(e, t));
|
|
278
284
|
}
|
|
279
|
-
function
|
|
285
|
+
function T(e, t, n) {
|
|
280
286
|
var r = c(e, t), i = l.hasOwnProperty(r);
|
|
281
|
-
if (i ||
|
|
287
|
+
if (i || A(e, t)) {
|
|
282
288
|
i || (l[r] = 0);
|
|
283
289
|
var a = "@" + ++l[r];
|
|
284
290
|
r = c(e + a, t + a);
|
|
285
291
|
}
|
|
286
292
|
return new s(e, t, n, r);
|
|
287
293
|
}
|
|
288
|
-
function
|
|
294
|
+
function E() {
|
|
289
295
|
return t.size;
|
|
290
296
|
}
|
|
291
|
-
function
|
|
297
|
+
function D() {
|
|
292
298
|
return r.length;
|
|
293
299
|
}
|
|
294
|
-
function
|
|
300
|
+
function O(e) {
|
|
295
301
|
var t = S(e);
|
|
296
302
|
return t ? t.links : null;
|
|
297
303
|
}
|
|
298
|
-
function
|
|
304
|
+
function k(e) {
|
|
299
305
|
if (!e) return !1;
|
|
300
306
|
var t = i(e, r);
|
|
301
307
|
if (t < 0) return !1;
|
|
@@ -303,7 +309,7 @@ var ce = /* @__PURE__ */ t(((e, t) => {
|
|
|
303
309
|
var n = S(e.fromId), a = S(e.toId);
|
|
304
310
|
return n && (t = i(e, n.links), t >= 0 && n.links.splice(t, 1)), a && (t = i(e, a.links), t >= 0 && a.links.splice(t, 1)), p(e, "remove"), g(), !0;
|
|
305
311
|
}
|
|
306
|
-
function
|
|
312
|
+
function A(e, t) {
|
|
307
313
|
var n = S(e), r;
|
|
308
314
|
if (!n || !n.links) return null;
|
|
309
315
|
for (r = 0; r < n.links.length; ++r) {
|
|
@@ -312,39 +318,39 @@ var ce = /* @__PURE__ */ t(((e, t) => {
|
|
|
312
318
|
}
|
|
313
319
|
return null;
|
|
314
320
|
}
|
|
315
|
-
function
|
|
316
|
-
h(),
|
|
321
|
+
function te() {
|
|
322
|
+
h(), P(function(e) {
|
|
317
323
|
C(e.id);
|
|
318
324
|
}), g();
|
|
319
325
|
}
|
|
320
|
-
function
|
|
326
|
+
function ne(e) {
|
|
321
327
|
var t, n;
|
|
322
328
|
if (typeof e == "function") for (t = 0, n = r.length; t < n; ++t) e(r[t]);
|
|
323
329
|
}
|
|
324
|
-
function
|
|
330
|
+
function j(e, t, n) {
|
|
325
331
|
var r = S(e);
|
|
326
|
-
if (r && r.links && typeof t == "function") return n ?
|
|
332
|
+
if (r && r.links && typeof t == "function") return n ? re(r.links, e, t) : M(r.links, e, t);
|
|
327
333
|
}
|
|
328
|
-
function
|
|
334
|
+
function M(e, n, r) {
|
|
329
335
|
for (var i, a = 0; a < e.length; ++a) {
|
|
330
336
|
var o = e[a], s = o.fromId === n ? o.toId : o.fromId;
|
|
331
337
|
if (i = r(t.get(s), o), i) return !0;
|
|
332
338
|
}
|
|
333
339
|
}
|
|
334
|
-
function
|
|
340
|
+
function re(e, n, r) {
|
|
335
341
|
for (var i, a = 0; a < e.length; ++a) {
|
|
336
342
|
var o = e[a];
|
|
337
343
|
if (o.fromId === n && (i = r(t.get(o.toId), o), i)) return !0;
|
|
338
344
|
}
|
|
339
345
|
}
|
|
340
|
-
function
|
|
341
|
-
function
|
|
346
|
+
function N() {}
|
|
347
|
+
function ie() {
|
|
342
348
|
u += 1;
|
|
343
349
|
}
|
|
344
|
-
function
|
|
350
|
+
function ae() {
|
|
345
351
|
--u, u === 0 && f.length > 0 && (_.fire("changed", f), f.length = 0);
|
|
346
352
|
}
|
|
347
|
-
function
|
|
353
|
+
function P(e) {
|
|
348
354
|
if (typeof e != "function") throw Error("Function is expected to iterate over graph nodes. You passed " + e);
|
|
349
355
|
for (var n = t.values(), r = n.next(); !r.done;) {
|
|
350
356
|
if (e(r.value)) return !0;
|
|
@@ -371,28 +377,28 @@ var ce = /* @__PURE__ */ t(((e, t) => {
|
|
|
371
377
|
function c(e, t) {
|
|
372
378
|
return e.toString() + "👉 " + t.toString();
|
|
373
379
|
}
|
|
374
|
-
})))(), 1),
|
|
380
|
+
})))(), 1), I = (e) => {
|
|
375
381
|
var t;
|
|
376
382
|
return `${(t = e.layer) == null ? "" : t}_${e.x}_${e.y}`;
|
|
377
|
-
},
|
|
383
|
+
}, me = 1, L = (e, t) => {
|
|
378
384
|
var n, r;
|
|
379
|
-
return ((n = e.layer) == null ? "" : n) === ((r = t.layer) == null ? "" : r) &&
|
|
380
|
-
},
|
|
381
|
-
function
|
|
382
|
-
return e.find((e) =>
|
|
385
|
+
return ((n = e.layer) == null ? "" : n) === ((r = t.layer) == null ? "" : r) && d(e, t) <= me;
|
|
386
|
+
}, he = (e, t, n) => L(e.p0, t) && L(e.p1, n) || L(e.p0, n) && L(e.p1, t);
|
|
387
|
+
function ge(e, t, n) {
|
|
388
|
+
return e.find((e) => he(e, t, n));
|
|
383
389
|
}
|
|
384
|
-
var
|
|
385
|
-
function
|
|
390
|
+
var _e = p(5);
|
|
391
|
+
function ve(e, t) {
|
|
386
392
|
if (e.virtual !== t.virtual) return !1;
|
|
387
|
-
let n =
|
|
388
|
-
return i > Math.PI && (i = 2 * Math.PI - i), i <=
|
|
393
|
+
let n = M(e.p0, e.p1), r = M(t.p0, t.p1), i = Math.abs(r - n);
|
|
394
|
+
return i > Math.PI && (i = 2 * Math.PI - i), i <= _e;
|
|
389
395
|
}
|
|
390
|
-
function
|
|
396
|
+
function ye(e, t) {
|
|
391
397
|
let n = [];
|
|
392
398
|
for (let r = 1; r < e.length; r++) {
|
|
393
|
-
let i = e[r - 1], a = e[r], o =
|
|
399
|
+
let i = e[r - 1], a = e[r], o = ge(t, i, a);
|
|
394
400
|
if (!o) {
|
|
395
|
-
console.warn(`WF: buildRouteSegments — no line found between ${
|
|
401
|
+
console.warn(`WF: buildRouteSegments — no line found between ${I(i)} and ${I(a)}`);
|
|
396
402
|
continue;
|
|
397
403
|
}
|
|
398
404
|
let s = {
|
|
@@ -400,7 +406,7 @@ function he(e, t) {
|
|
|
400
406
|
p1: a,
|
|
401
407
|
virtual: o.virtual
|
|
402
408
|
}, c = n[n.length - 1];
|
|
403
|
-
c &&
|
|
409
|
+
c && ve(c, s) ? n[n.length - 1] = {
|
|
404
410
|
...c,
|
|
405
411
|
p1: s.p1
|
|
406
412
|
} : n.push(s);
|
|
@@ -409,79 +415,79 @@ function he(e, t) {
|
|
|
409
415
|
}
|
|
410
416
|
//#endregion
|
|
411
417
|
//#region ../wayfinding/src/core/graph/constants.ts
|
|
412
|
-
var
|
|
418
|
+
var be = 1e4, xe = 1.01;
|
|
413
419
|
//#endregion
|
|
414
420
|
//#region ../wayfinding/src/core/graph/linkCost.ts
|
|
415
|
-
function
|
|
416
|
-
return
|
|
421
|
+
function Se(e) {
|
|
422
|
+
return d(e.p0, e.p1) / (e.weight || 4);
|
|
417
423
|
}
|
|
418
|
-
function
|
|
424
|
+
function Ce(e) {
|
|
419
425
|
var t, n;
|
|
420
426
|
return ((t = e.p0.layer) == null ? "" : t) !== ((n = e.p1.layer) == null ? "" : n);
|
|
421
427
|
}
|
|
422
|
-
function
|
|
423
|
-
return e.virtual ? e.virtualLength == null ?
|
|
428
|
+
function we(e) {
|
|
429
|
+
return e.virtual ? e.virtualLength == null ? Ce(e) ? be : 0 : e.virtualLength : Se(e);
|
|
424
430
|
}
|
|
425
431
|
//#endregion
|
|
426
432
|
//#region ../wayfinding/src/core/graph/buildNGraph.ts
|
|
427
|
-
function
|
|
428
|
-
let { oriented: n, onlyAccessible: r } = t, i = (0,
|
|
433
|
+
function Te(e, t) {
|
|
434
|
+
let { oriented: n, onlyAccessible: r } = t, i = (0, pe.default)();
|
|
429
435
|
for (let t of e) {
|
|
430
436
|
if (r && t.unaccessible) continue;
|
|
431
|
-
let e =
|
|
437
|
+
let e = I(t.p0), a = I(t.p1), o = we(t);
|
|
432
438
|
i.addLink(e, a, { distance: o }), n && !t.unidirection && i.addLink(a, e, { distance: o });
|
|
433
439
|
}
|
|
434
440
|
return i;
|
|
435
441
|
}
|
|
436
442
|
//#endregion
|
|
437
443
|
//#region ../wayfinding/src/core/graph/utils/a-star/defaultSettings.js
|
|
438
|
-
var
|
|
439
|
-
typeof Object.freeze == "function" && Object.freeze(
|
|
440
|
-
var
|
|
441
|
-
heuristic:
|
|
442
|
-
distance:
|
|
443
|
-
blocked:
|
|
444
|
-
compareFScore:
|
|
445
|
-
NO_PATH:
|
|
446
|
-
setHeapIndex:
|
|
447
|
-
setH1:
|
|
448
|
-
setH2:
|
|
449
|
-
compareF1Score:
|
|
450
|
-
compareF2Score:
|
|
444
|
+
var Ee = [];
|
|
445
|
+
typeof Object.freeze == "function" && Object.freeze(Ee);
|
|
446
|
+
var R = {
|
|
447
|
+
heuristic: De,
|
|
448
|
+
distance: Oe,
|
|
449
|
+
blocked: ke,
|
|
450
|
+
compareFScore: Ae,
|
|
451
|
+
NO_PATH: Ee,
|
|
452
|
+
setHeapIndex: je,
|
|
453
|
+
setH1: Pe,
|
|
454
|
+
setH2: Fe,
|
|
455
|
+
compareF1Score: Me,
|
|
456
|
+
compareF2Score: Ne
|
|
451
457
|
};
|
|
452
|
-
function
|
|
458
|
+
function De() {
|
|
453
459
|
return 0;
|
|
454
460
|
}
|
|
455
|
-
function
|
|
461
|
+
function Oe() {
|
|
456
462
|
return 1;
|
|
457
463
|
}
|
|
458
|
-
function
|
|
464
|
+
function ke() {
|
|
459
465
|
return !1;
|
|
460
466
|
}
|
|
461
|
-
function
|
|
467
|
+
function Ae(e, t) {
|
|
462
468
|
return e.fScore - t.fScore;
|
|
463
469
|
}
|
|
464
|
-
function
|
|
470
|
+
function je(e, t) {
|
|
465
471
|
e.heapIndex = t;
|
|
466
472
|
}
|
|
467
|
-
function
|
|
473
|
+
function Me(e, t) {
|
|
468
474
|
return e.f1 - t.f1;
|
|
469
475
|
}
|
|
470
|
-
function
|
|
476
|
+
function Ne(e, t) {
|
|
471
477
|
return e.f2 - t.f2;
|
|
472
478
|
}
|
|
473
|
-
function
|
|
479
|
+
function Pe(e, t) {
|
|
474
480
|
e.h1 = t;
|
|
475
481
|
}
|
|
476
|
-
function
|
|
482
|
+
function Fe(e, t) {
|
|
477
483
|
e.h2 = t;
|
|
478
484
|
}
|
|
479
485
|
//#endregion
|
|
480
486
|
//#region ../wayfinding/src/core/graph/utils/a-star/makeSearchStatePool.js
|
|
481
|
-
function
|
|
487
|
+
function Ie(e) {
|
|
482
488
|
this.node = e, this.parent = null, this.closed = !1, this.open = 0, this.distanceToSource = Infinity, this.fScore = Infinity, this.heapIndex = -1;
|
|
483
489
|
}
|
|
484
|
-
function
|
|
490
|
+
function Le() {
|
|
485
491
|
let e = 0, t = [];
|
|
486
492
|
return {
|
|
487
493
|
createNewState: r,
|
|
@@ -492,21 +498,21 @@ function Ne() {
|
|
|
492
498
|
}
|
|
493
499
|
function r(n) {
|
|
494
500
|
let r = t[e];
|
|
495
|
-
return r ? (r.node = n, r.parent = null, r.closed = !1, r.open = 0, r.distanceToSource = Infinity, r.fScore = Infinity, r.heapIndex = -1) : (r = new
|
|
501
|
+
return r ? (r.node = n, r.parent = null, r.closed = !1, r.open = 0, r.distanceToSource = Infinity, r.fScore = Infinity, r.heapIndex = -1) : (r = new Ie(n), t[e] = r), e++, r;
|
|
496
502
|
}
|
|
497
503
|
}
|
|
498
504
|
//#endregion
|
|
499
505
|
//#region ../wayfinding/src/core/graph/utils/a-star/NodeHeap.js
|
|
500
|
-
function
|
|
501
|
-
if (!(this instanceof
|
|
502
|
-
if (Array.isArray(e) || (t = e, e = []), t = t || {}, this.data = e || [], this.length = this.data.length, this.compare = t.compare ||
|
|
506
|
+
function z(e, t) {
|
|
507
|
+
if (!(this instanceof z)) return new z(e, t);
|
|
508
|
+
if (Array.isArray(e) || (t = e, e = []), t = t || {}, this.data = e || [], this.length = this.data.length, this.compare = t.compare || ze, this.setNodeId = t.setNodeId || Re, this.length > 0) for (let e = this.length >> 1; e >= 0; e--) this._down(e);
|
|
503
509
|
if (t.setNodeId) for (let e = 0; e < this.length; ++e) this.setNodeId(this.data[e], e);
|
|
504
510
|
}
|
|
505
|
-
function
|
|
506
|
-
function
|
|
511
|
+
function Re() {}
|
|
512
|
+
function ze(e, t) {
|
|
507
513
|
return e - t;
|
|
508
514
|
}
|
|
509
|
-
|
|
515
|
+
z.prototype = {
|
|
510
516
|
push: function(e) {
|
|
511
517
|
this.data.push(e), this.setNodeId(e, this.length), this.length++, this._up(this.length - 1);
|
|
512
518
|
},
|
|
@@ -542,16 +548,16 @@ V.prototype = {
|
|
|
542
548
|
};
|
|
543
549
|
//#endregion
|
|
544
550
|
//#region ../wayfinding/src/core/graph/utils/a-star/a-star.js
|
|
545
|
-
var
|
|
546
|
-
function
|
|
551
|
+
var Be = R.NO_PATH;
|
|
552
|
+
function Ve(e, t) {
|
|
547
553
|
t = t || {};
|
|
548
554
|
let n = t.oriented, r = t.blocked;
|
|
549
|
-
r || (r =
|
|
555
|
+
r || (r = R.blocked);
|
|
550
556
|
let i = t.heuristic;
|
|
551
|
-
i || (i =
|
|
557
|
+
i || (i = R.heuristic);
|
|
552
558
|
let a = t.distance;
|
|
553
|
-
a || (a =
|
|
554
|
-
let o =
|
|
559
|
+
a || (a = R.distance);
|
|
560
|
+
let o = Le();
|
|
555
561
|
return { find: s };
|
|
556
562
|
function s(t, s) {
|
|
557
563
|
let c = e.getNode(t);
|
|
@@ -559,17 +565,17 @@ function Le(e, t) {
|
|
|
559
565
|
let l = e.getNode(s);
|
|
560
566
|
if (!l) throw Error("toId is not defined in this graph: " + s);
|
|
561
567
|
o.reset();
|
|
562
|
-
let u = /* @__PURE__ */ new Map(), d = new
|
|
563
|
-
compare:
|
|
564
|
-
setNodeId:
|
|
568
|
+
let u = /* @__PURE__ */ new Map(), d = new z({
|
|
569
|
+
compare: R.compareFScore,
|
|
570
|
+
setNodeId: R.setHeapIndex
|
|
565
571
|
}), f = o.createNewState(c);
|
|
566
572
|
u.set(t, f), f.fScore = i(c, l), f.distanceToSource = 0, d.push(f), f.open = 1;
|
|
567
573
|
let p;
|
|
568
574
|
for (; d.length > 0;) {
|
|
569
|
-
if (p = d.pop(),
|
|
575
|
+
if (p = d.pop(), He(p, l)) return Ue(p);
|
|
570
576
|
p.closed = !0, e.forEachLinkedNode(p.node.id, m, n);
|
|
571
577
|
}
|
|
572
|
-
return
|
|
578
|
+
return Be;
|
|
573
579
|
function m(e, t) {
|
|
574
580
|
let n = u.get(e.id);
|
|
575
581
|
if (n || (n = o.createNewState(e), u.set(e.id, n)), n.closed || (n.open === 0 && (d.push(n), n.open = 1), r(e, p.node, t))) return;
|
|
@@ -578,17 +584,17 @@ function Le(e, t) {
|
|
|
578
584
|
}
|
|
579
585
|
}
|
|
580
586
|
}
|
|
581
|
-
function
|
|
587
|
+
function He(e, t) {
|
|
582
588
|
return e.node === t;
|
|
583
589
|
}
|
|
584
|
-
function
|
|
590
|
+
function Ue(e) {
|
|
585
591
|
let t = [e.node], n = e.parent;
|
|
586
592
|
for (; n;) t.push(n.node), n = n.parent;
|
|
587
593
|
return t;
|
|
588
594
|
}
|
|
589
595
|
//#endregion
|
|
590
596
|
//#region ../wayfinding/src/core/graph/pathfinder/parseNodeId.ts
|
|
591
|
-
function
|
|
597
|
+
function B(e) {
|
|
592
598
|
let t = e.lastIndexOf("_"), n = e.lastIndexOf("_", t - 1);
|
|
593
599
|
if (n === -1) throw Error(`WF: invalid node ID format "${e}", expected "{layer}_{x}_{y}"`);
|
|
594
600
|
return [
|
|
@@ -599,35 +605,35 @@ function H(e) {
|
|
|
599
605
|
}
|
|
600
606
|
//#endregion
|
|
601
607
|
//#region ../wayfinding/src/core/graph/pathfinder/aStarPathFinder.ts
|
|
602
|
-
function
|
|
608
|
+
function We() {
|
|
603
609
|
return function(e, t, n) {
|
|
604
610
|
let r = 1;
|
|
605
611
|
if (t.parent) {
|
|
606
|
-
let [, n, i] =
|
|
607
|
-
|
|
612
|
+
let [, n, i] = B(t.parent.node.id), [, a, o] = B(t.node.id), [, s, c] = B(e.id);
|
|
613
|
+
M({
|
|
608
614
|
x: n,
|
|
609
615
|
y: i
|
|
610
616
|
}, {
|
|
611
617
|
x: a,
|
|
612
618
|
y: o
|
|
613
|
-
}) !==
|
|
619
|
+
}) !== M({
|
|
614
620
|
x: a,
|
|
615
621
|
y: o
|
|
616
622
|
}, {
|
|
617
623
|
x: s,
|
|
618
624
|
y: c
|
|
619
|
-
}) && (r =
|
|
625
|
+
}) && (r = xe);
|
|
620
626
|
}
|
|
621
627
|
return r * n.data.distance;
|
|
622
628
|
};
|
|
623
629
|
}
|
|
624
|
-
function
|
|
630
|
+
function Ge() {
|
|
625
631
|
let e = null, t = null;
|
|
626
632
|
return {
|
|
627
633
|
build(n, r) {
|
|
628
|
-
t =
|
|
634
|
+
t = Te(n, r), e = Ve(t, {
|
|
629
635
|
oriented: r.oriented,
|
|
630
|
-
distance:
|
|
636
|
+
distance: We()
|
|
631
637
|
});
|
|
632
638
|
},
|
|
633
639
|
hasNode(e) {
|
|
@@ -637,7 +643,7 @@ function Ve() {
|
|
|
637
643
|
if (!e) return [];
|
|
638
644
|
let r = e.find(t, n);
|
|
639
645
|
return r.length ? r.map((e) => {
|
|
640
|
-
let [t, n, r] =
|
|
646
|
+
let [t, n, r] = B(e.id);
|
|
641
647
|
return {
|
|
642
648
|
id: e.id,
|
|
643
649
|
layer: t,
|
|
@@ -650,10 +656,10 @@ function Ve() {
|
|
|
650
656
|
}
|
|
651
657
|
//#endregion
|
|
652
658
|
//#region ../wayfinding/src/core/graph/graphCache.ts
|
|
653
|
-
function
|
|
659
|
+
function Ke() {
|
|
654
660
|
let e = null, t = !1;
|
|
655
661
|
return { getOrBuild(n, r) {
|
|
656
|
-
return e && t === r ? e : (e =
|
|
662
|
+
return e && t === r ? e : (e = de(n, Ge(), {
|
|
657
663
|
oriented: !0,
|
|
658
664
|
onlyAccessible: r
|
|
659
665
|
}), t = r, e);
|
|
@@ -661,71 +667,71 @@ function He() {
|
|
|
661
667
|
}
|
|
662
668
|
//#endregion
|
|
663
669
|
//#region ../wayfinding/src/core/routing/getRouteLength.ts
|
|
664
|
-
function
|
|
665
|
-
return e.reduce((e, t) => e +
|
|
670
|
+
function V(e) {
|
|
671
|
+
return e.reduce((e, t) => e + d(t.p0, t.p1), 0);
|
|
666
672
|
}
|
|
667
673
|
//#endregion
|
|
668
674
|
//#region ../wayfinding/src/core/graph/findShortestPath.ts
|
|
669
|
-
function
|
|
675
|
+
function qe(e, t, n) {
|
|
670
676
|
return {
|
|
671
677
|
layer: e,
|
|
672
678
|
x: t,
|
|
673
679
|
y: n
|
|
674
680
|
};
|
|
675
681
|
}
|
|
676
|
-
function
|
|
682
|
+
function Je(e, t) {
|
|
677
683
|
let n = 0;
|
|
678
684
|
for (let r = 1; r < e.length; r++) {
|
|
679
|
-
let i =
|
|
680
|
-
i && (n +=
|
|
685
|
+
let i = ge(t, e[r - 1], e[r]);
|
|
686
|
+
i && (n += we(i));
|
|
681
687
|
}
|
|
682
688
|
return n;
|
|
683
689
|
}
|
|
684
|
-
function
|
|
690
|
+
function Ye(e, t, n) {
|
|
685
691
|
let r = e.dataSource.getLines(), i = null, a = Infinity;
|
|
686
692
|
for (let o of t) for (let t of n) {
|
|
687
|
-
let n =
|
|
693
|
+
let n = I(o), s = I(t);
|
|
688
694
|
if (!e.finder.hasNode(n) || !e.finder.hasNode(s)) {
|
|
689
695
|
console.debug(`WF. findShortestPath: node not in graph, skipping pair ${n} → ${s}`);
|
|
690
696
|
continue;
|
|
691
697
|
}
|
|
692
698
|
let c = e.finder.find(n, s);
|
|
693
699
|
if (!c.length) continue;
|
|
694
|
-
let l = c.map((e) =>
|
|
700
|
+
let l = c.map((e) => qe(e.layer, e.x, e.y)), u = ye(l, r);
|
|
695
701
|
if (!u.length) continue;
|
|
696
|
-
let d =
|
|
702
|
+
let d = Je(l, r);
|
|
697
703
|
d < a && (a = d, i = {
|
|
698
704
|
lines: u,
|
|
699
|
-
distance:
|
|
705
|
+
distance: V(u)
|
|
700
706
|
});
|
|
701
707
|
}
|
|
702
708
|
return i;
|
|
703
709
|
}
|
|
704
710
|
//#endregion
|
|
705
711
|
//#region ../wayfinding/src/core/routing/routeResult.ts
|
|
706
|
-
var
|
|
712
|
+
var H = () => ({
|
|
707
713
|
lines: [],
|
|
708
714
|
totalDistance: 0
|
|
709
715
|
});
|
|
710
716
|
//#endregion
|
|
711
717
|
//#region ../wayfinding/src/core/routing/buildRoute.ts
|
|
712
|
-
function
|
|
713
|
-
if (!t.length || !n.length) return
|
|
714
|
-
let r =
|
|
718
|
+
function Xe(e, t, n) {
|
|
719
|
+
if (!t.length || !n.length) return H();
|
|
720
|
+
let r = Ye(e, t, n);
|
|
715
721
|
return r ? {
|
|
716
722
|
lines: r.lines,
|
|
717
723
|
totalDistance: r.distance
|
|
718
|
-
} :
|
|
724
|
+
} : H();
|
|
719
725
|
}
|
|
720
726
|
//#endregion
|
|
721
727
|
//#region ../wayfinding/src/core/routing/buildMultiPointRoute.ts
|
|
722
|
-
function
|
|
723
|
-
if (t.length < 2) return
|
|
728
|
+
function Ze(e, t) {
|
|
729
|
+
if (t.length < 2) return H();
|
|
724
730
|
let n = t.filter((e, n) => n === 0 || n === t.length - 1 || e.length > 0);
|
|
725
|
-
if (n.length < 2) return
|
|
726
|
-
if (n.length === 2) return
|
|
731
|
+
if (n.length < 2) return H();
|
|
732
|
+
if (n.length === 2) return Xe(e, n[0], n[1]);
|
|
727
733
|
let r = [];
|
|
728
|
-
for (let t = 0; t < n.length - 1; t++) r.push(
|
|
734
|
+
for (let t = 0; t < n.length - 1; t++) r.push(Xe(e, n[t], n[t + 1]));
|
|
729
735
|
return {
|
|
730
736
|
lines: r.flatMap((e) => e.lines),
|
|
731
737
|
totalDistance: r.reduce((e, t) => e + t.totalDistance, 0)
|
|
@@ -733,26 +739,26 @@ function qe(e, t) {
|
|
|
733
739
|
}
|
|
734
740
|
//#endregion
|
|
735
741
|
//#region ../wayfinding/src/core/routing/optimizeWaypointOrder.ts
|
|
736
|
-
var
|
|
737
|
-
function
|
|
742
|
+
var Qe = 100, $e = -.01;
|
|
743
|
+
function et(e) {
|
|
738
744
|
let t = new Map(e), n = Array.from(t.keys());
|
|
739
745
|
if (n.length <= 2) return n;
|
|
740
|
-
let r =
|
|
741
|
-
return r.length < 4 ? r :
|
|
746
|
+
let r = nt(n, t);
|
|
747
|
+
return r.length < 4 ? r : rt(r, t);
|
|
742
748
|
}
|
|
743
|
-
function
|
|
749
|
+
function tt(e) {
|
|
744
750
|
if (e.length <= 3) return e;
|
|
745
751
|
let t = e[0], n = e[e.length - 1], r = e.slice(1, -1);
|
|
746
752
|
return [
|
|
747
753
|
t,
|
|
748
|
-
...
|
|
754
|
+
...et(r.map((e, t) => [String(t), {
|
|
749
755
|
x: e.x,
|
|
750
756
|
y: e.y
|
|
751
757
|
}])).map((e) => r[Number(e)]),
|
|
752
758
|
n
|
|
753
759
|
];
|
|
754
760
|
}
|
|
755
|
-
function
|
|
761
|
+
function nt(e, t) {
|
|
756
762
|
let n = [e[0]], r = new Set(e), i = e[0];
|
|
757
763
|
for (r.delete(e[0]); r.size > 0;) {
|
|
758
764
|
let e = t.get(i), a = "", o = Infinity;
|
|
@@ -765,13 +771,13 @@ function Qe(e, t) {
|
|
|
765
771
|
}
|
|
766
772
|
return n;
|
|
767
773
|
}
|
|
768
|
-
function
|
|
774
|
+
function rt(e, t) {
|
|
769
775
|
let n = [...e], r = !0;
|
|
770
|
-
for (let e = 0; r && e <
|
|
776
|
+
for (let e = 0; r && e < Qe; e++) {
|
|
771
777
|
r = !1;
|
|
772
778
|
scan: for (let e = 1; e < n.length - 2; e++) for (let i = e + 1; i < n.length - 1; i++) {
|
|
773
779
|
let a = t.get(n[e - 1]), o = t.get(n[e]), s = t.get(n[i]), c = t.get(n[i + 1]);
|
|
774
|
-
if (Math.abs(a.x - s.x) + Math.abs(a.y - s.y) + Math.abs(o.x - c.x) + Math.abs(o.y - c.y) - (Math.abs(a.x - o.x) + Math.abs(a.y - o.y)) - (Math.abs(s.x - c.x) + Math.abs(s.y - c.y)) <
|
|
780
|
+
if (Math.abs(a.x - s.x) + Math.abs(a.y - s.y) + Math.abs(o.x - c.x) + Math.abs(o.y - c.y) - (Math.abs(a.x - o.x) + Math.abs(a.y - o.y)) - (Math.abs(s.x - c.x) + Math.abs(s.y - c.y)) < $e) {
|
|
775
781
|
for (let t = e, r = i; t < r; t++, r--) [n[t], n[r]] = [n[r], n[t]];
|
|
776
782
|
r = !0;
|
|
777
783
|
break scan;
|
|
@@ -782,8 +788,8 @@ function $e(e, t) {
|
|
|
782
788
|
}
|
|
783
789
|
//#endregion
|
|
784
790
|
//#region ../wayfinding/src/core/geometry/projectPointOnSegment.ts
|
|
785
|
-
function
|
|
786
|
-
let { projected: r, distance: i, t: a } =
|
|
791
|
+
function it(e, t, n) {
|
|
792
|
+
let { projected: r, distance: i, t: a } = re({
|
|
787
793
|
p0: t,
|
|
788
794
|
p1: n
|
|
789
795
|
}, e);
|
|
@@ -798,40 +804,40 @@ function et(e, t, n) {
|
|
|
798
804
|
}
|
|
799
805
|
//#endregion
|
|
800
806
|
//#region ../wayfinding/src/core/geometry/pointInPolygon.ts
|
|
801
|
-
var
|
|
802
|
-
function
|
|
807
|
+
var at = .01;
|
|
808
|
+
function ot(e, t, n) {
|
|
803
809
|
return Math.abs(.5 * (e.x * (t.y - n.y) + t.x * (n.y - e.y) + n.x * (e.y - t.y)));
|
|
804
810
|
}
|
|
805
|
-
function
|
|
811
|
+
function st(e) {
|
|
806
812
|
if (e.length < 3) return 0;
|
|
807
813
|
let t = 0;
|
|
808
|
-
for (let n = 1; n < e.length - 1; n++) t +=
|
|
814
|
+
for (let n = 1; n < e.length - 1; n++) t += ot(e[0], e[n], e[n + 1]);
|
|
809
815
|
return t;
|
|
810
816
|
}
|
|
811
|
-
function
|
|
817
|
+
function ct(e, t, n = st(t)) {
|
|
812
818
|
if (n === 0) return !1;
|
|
813
819
|
let r = 0;
|
|
814
|
-
for (let n = 0, i = t.length - 1; n < t.length; i = n++) r +=
|
|
815
|
-
return Math.abs(n - r) < n *
|
|
820
|
+
for (let n = 0, i = t.length - 1; n < t.length; i = n++) r += ot(e, t[i], t[n]);
|
|
821
|
+
return Math.abs(n - r) < n * at;
|
|
816
822
|
}
|
|
817
823
|
//#endregion
|
|
818
824
|
//#region ../wayfinding/src/core/routing/graphPointResolvers.ts
|
|
819
|
-
function
|
|
820
|
-
let r =
|
|
821
|
-
return e.getLineEnds().filter((e) => (!n || e.layer === n) &&
|
|
825
|
+
function lt(e, t, n) {
|
|
826
|
+
let r = st(t);
|
|
827
|
+
return e.getLineEnds().filter((e) => (!n || e.layer === n) && ct(e, t, r));
|
|
822
828
|
}
|
|
823
829
|
//#endregion
|
|
824
830
|
//#region ../wayfinding/src/core/routing/resolveWaypointCandidates.ts
|
|
825
|
-
function
|
|
831
|
+
function U(e, t) {
|
|
826
832
|
var n;
|
|
827
833
|
if ((n = t.bounds) != null && n.length) return {
|
|
828
|
-
candidates:
|
|
834
|
+
candidates: lt(e.dataSource, t.bounds, t.layer),
|
|
829
835
|
offGraphEntry: null
|
|
830
836
|
};
|
|
831
837
|
let r = null, i = Infinity;
|
|
832
838
|
for (let n of e.dataSource.getLines()) {
|
|
833
839
|
if (n.virtual || t.layer && n.p0.layer !== t.layer || n.p0.x === n.p1.x && n.p0.y === n.p1.y) continue;
|
|
834
|
-
let e =
|
|
840
|
+
let e = it(t, n.p0, n.p1);
|
|
835
841
|
e.distance < i && (i = e.distance, r = {
|
|
836
842
|
segment: n,
|
|
837
843
|
proj: e
|
|
@@ -862,11 +868,11 @@ function ot(e, t) {
|
|
|
862
868
|
}
|
|
863
869
|
//#endregion
|
|
864
870
|
//#region ../wayfinding/src/core/createWayfindingEngine.ts
|
|
865
|
-
var
|
|
866
|
-
function
|
|
871
|
+
var ut = 1e-6, W = (e, t) => e.layer === t.layer && Math.abs(e.x - t.x) < ut && Math.abs(e.y - t.y) < ut;
|
|
872
|
+
function dt(e, t) {
|
|
867
873
|
if (!e.length) return e;
|
|
868
|
-
let n = e[0], r = n.p0, i =
|
|
869
|
-
return
|
|
874
|
+
let n = e[0], r = n.p0, i = W(t.segment.p0, r) ? t.segment.p1 : t.segment.p0;
|
|
875
|
+
return W(n.p1, i) ? [{
|
|
870
876
|
...n,
|
|
871
877
|
p0: t.projection
|
|
872
878
|
}, ...e.slice(1)] : [{
|
|
@@ -875,10 +881,10 @@ function ct(e, t) {
|
|
|
875
881
|
p1: r
|
|
876
882
|
}, ...e];
|
|
877
883
|
}
|
|
878
|
-
function
|
|
884
|
+
function ft(e, t) {
|
|
879
885
|
if (!e.length) return e;
|
|
880
|
-
let n = e[e.length - 1], r = n.p1, i =
|
|
881
|
-
return
|
|
886
|
+
let n = e[e.length - 1], r = n.p1, i = W(t.segment.p0, r) ? t.segment.p1 : t.segment.p0;
|
|
887
|
+
return W(n.p0, i) ? [...e.slice(0, -1), {
|
|
882
888
|
...n,
|
|
883
889
|
p1: t.projection
|
|
884
890
|
}] : [...e, {
|
|
@@ -887,19 +893,19 @@ function lt(e, t) {
|
|
|
887
893
|
p1: t.projection
|
|
888
894
|
}];
|
|
889
895
|
}
|
|
890
|
-
function
|
|
896
|
+
function pt(e, t, n) {
|
|
891
897
|
let r = e;
|
|
892
|
-
return t && (r =
|
|
898
|
+
return t && (r = dt(r, t)), n && (r = ft(r, n)), r;
|
|
893
899
|
}
|
|
894
|
-
function
|
|
895
|
-
let t =
|
|
900
|
+
function mt(e) {
|
|
901
|
+
let t = Ke();
|
|
896
902
|
return {
|
|
897
903
|
buildRoute(n, r, i) {
|
|
898
904
|
var a;
|
|
899
|
-
let o = t.getOrBuild(e, (a = i == null ? void 0 : i.accessible) != null && a), s =
|
|
905
|
+
let o = t.getOrBuild(e, (a = i == null ? void 0 : i.accessible) != null && a), s = U(o, n), c = U(o, r), l = Xe(o, s.candidates, c.candidates), u = !!s.offGraphEntry || !!c.offGraphEntry, d = pt(l.lines, s.offGraphEntry, c.offGraphEntry);
|
|
900
906
|
return {
|
|
901
907
|
lines: d,
|
|
902
|
-
distance: u ?
|
|
908
|
+
distance: u ? V(d) : l.totalDistance
|
|
903
909
|
};
|
|
904
910
|
},
|
|
905
911
|
buildWaypointsRoute(n, r) {
|
|
@@ -908,19 +914,19 @@ function dt(e) {
|
|
|
908
914
|
lines: [],
|
|
909
915
|
distance: 0
|
|
910
916
|
};
|
|
911
|
-
let a = t.getOrBuild(e, (i = r == null ? void 0 : r.accessible) != null && i), o = (r != null && r.fastest ?
|
|
917
|
+
let a = t.getOrBuild(e, (i = r == null ? void 0 : r.accessible) != null && i), o = (r != null && r.fastest ? tt(n) : n).map((e) => U(a, e)), s = Ze(a, o.map((e) => e.candidates)), c = o[0].offGraphEntry, l = o[o.length - 1].offGraphEntry, u = !!c || !!l, d = pt(s.lines, c, l);
|
|
912
918
|
return {
|
|
913
919
|
lines: d,
|
|
914
|
-
distance: u ?
|
|
920
|
+
distance: u ? V(d) : s.totalDistance
|
|
915
921
|
};
|
|
916
922
|
}
|
|
917
923
|
};
|
|
918
924
|
}
|
|
919
925
|
//#endregion
|
|
920
926
|
//#region ../wayfinding/src/core/rendering/computeTrailPoints.ts
|
|
921
|
-
var
|
|
922
|
-
function
|
|
923
|
-
let i =
|
|
927
|
+
var ht = .4, gt = 8;
|
|
928
|
+
function _t(e, t, n = gt, r = ht) {
|
|
929
|
+
let i = d(t, e);
|
|
924
930
|
if (i === 0 || n <= 0) return [];
|
|
925
931
|
let a = Math.max(Math.ceil(i / n) + 1, 2), o = {
|
|
926
932
|
x: (e.x + t.x) / 2,
|
|
@@ -928,11 +934,11 @@ function mt(e, t, n = pt, r = ft) {
|
|
|
928
934
|
}, s = [];
|
|
929
935
|
for (let n = 0; n < a; n++) {
|
|
930
936
|
let r = n / (a - 1);
|
|
931
|
-
s.push(
|
|
937
|
+
s.push(vt(e, o, t, r));
|
|
932
938
|
}
|
|
933
939
|
return s;
|
|
934
940
|
}
|
|
935
|
-
function
|
|
941
|
+
function vt(e, t, n, r) {
|
|
936
942
|
let i = 1 - r;
|
|
937
943
|
return {
|
|
938
944
|
x: i * i * e.x + 2 * i * r * t.x + r * r * n.x,
|
|
@@ -941,36 +947,36 @@ function ht(e, t, n, r) {
|
|
|
941
947
|
}
|
|
942
948
|
//#endregion
|
|
943
949
|
//#region ../wayfinding/src/core/rendering/computeTransitionPoints.ts
|
|
944
|
-
function
|
|
950
|
+
function G(e, t) {
|
|
945
951
|
return e.toLowerCase() === t.toLowerCase();
|
|
946
952
|
}
|
|
947
|
-
function
|
|
948
|
-
return e.findIndex((e) =>
|
|
953
|
+
function yt(e, t) {
|
|
954
|
+
return e.findIndex((e) => G(e, t));
|
|
949
955
|
}
|
|
950
|
-
function
|
|
951
|
-
let r =
|
|
956
|
+
function bt(e, t, n) {
|
|
957
|
+
let r = yt(e, t), i = yt(e, n);
|
|
952
958
|
return r === -1 || i === -1 ? "neutral" : i > r ? "up" : "down";
|
|
953
959
|
}
|
|
954
|
-
function
|
|
955
|
-
return e.find((e) =>
|
|
960
|
+
function xt(e, t, n) {
|
|
961
|
+
return e.find((e) => G(e.p0.layer, t) ? !n.has(e.p1.layer.toLowerCase()) : G(e.p1.layer, t) ? !n.has(e.p0.layer.toLowerCase()) : !1);
|
|
956
962
|
}
|
|
957
|
-
function
|
|
963
|
+
function St(e, t, n, r) {
|
|
958
964
|
if (t.has(r.toLowerCase())) return r;
|
|
959
|
-
let i = r, a = /* @__PURE__ */ new Set([n.toLowerCase(), i.toLowerCase()]), o =
|
|
960
|
-
for (; o && (i =
|
|
965
|
+
let i = r, a = /* @__PURE__ */ new Set([n.toLowerCase(), i.toLowerCase()]), o = xt(e, i, a);
|
|
966
|
+
for (; o && (i = G(o.p0.layer, i) ? o.p1.layer : o.p0.layer, !t.has(i.toLowerCase()));) a.add(i.toLowerCase()), o = xt(e, i, a);
|
|
961
967
|
return i;
|
|
962
968
|
}
|
|
963
|
-
function
|
|
964
|
-
let { routeLines: t, currentLayerName: n, floorOrder: r } = e, i = t.filter((e) => e.virtual && !
|
|
969
|
+
function Ct(e) {
|
|
970
|
+
let { routeLines: t, currentLayerName: n, floorOrder: r } = e, i = t.filter((e) => e.virtual && !G(e.p0.layer, e.p1.layer)), a = /* @__PURE__ */ new Set();
|
|
965
971
|
for (let e of t) e.virtual || (a.add(e.p0.layer.toLowerCase()), a.add(e.p1.layer.toLowerCase()));
|
|
966
|
-
let o = (n ? i.filter((e) =>
|
|
967
|
-
let t = !n ||
|
|
972
|
+
let o = (n ? i.filter((e) => G(e.p0.layer, n) || G(e.p1.layer, n)) : i).map((e) => {
|
|
973
|
+
let t = !n || G(e.p0.layer, n), o = t ? e.p0 : e.p1, s = t ? e.p1 : e.p0, c = St(i, a, o.layer, s.layer);
|
|
968
974
|
return {
|
|
969
975
|
x: o.x,
|
|
970
976
|
y: o.y,
|
|
971
977
|
layer: o.layer,
|
|
972
978
|
targetLayer: c,
|
|
973
|
-
direction:
|
|
979
|
+
direction: bt(r, o.layer, c),
|
|
974
980
|
role: n ? t ? "exit" : "entry" : "exit"
|
|
975
981
|
};
|
|
976
982
|
}), s = new Set(o.filter((e) => e.role === "exit").map((e) => `${e.x}:${e.y}`)), c = /* @__PURE__ */ new Set();
|
|
@@ -981,99 +987,99 @@ function bt(e) {
|
|
|
981
987
|
}
|
|
982
988
|
//#endregion
|
|
983
989
|
//#region ../wayfinding/src/core/rendering/routeGeometry.ts
|
|
984
|
-
function
|
|
985
|
-
return
|
|
990
|
+
function wt(e) {
|
|
991
|
+
return a.fromPoints(e);
|
|
986
992
|
}
|
|
987
993
|
//#endregion
|
|
988
994
|
//#region ../wayfinding/src/core/position/gpsThreshold.ts
|
|
989
|
-
var
|
|
990
|
-
function
|
|
991
|
-
let { p0: n, p2: r } = t, i =
|
|
995
|
+
var Tt = 7.5, Et = 15, Dt = 20;
|
|
996
|
+
function Ot(e, t) {
|
|
997
|
+
let { p0: n, p2: r } = t, i = D(n, r), a = d(n, r);
|
|
992
998
|
return !i || !a ? 0 : a / i * e;
|
|
993
999
|
}
|
|
994
|
-
var
|
|
1000
|
+
var kt = (e) => {
|
|
995
1001
|
if (typeof e == "number" && Number.isFinite(e)) return e;
|
|
996
|
-
},
|
|
997
|
-
let n =
|
|
1002
|
+
}, At = (e, t) => {
|
|
1003
|
+
let n = kt(e);
|
|
998
1004
|
return n === void 0 || n === 0 ? t : n;
|
|
999
1005
|
};
|
|
1000
|
-
function
|
|
1006
|
+
function jt({ thresholdInMeters: e, gpsConfig: t }) {
|
|
1001
1007
|
let n = 0;
|
|
1002
|
-
return e && t && (n =
|
|
1008
|
+
return e && t && (n = Ot(e, t)), n || (n = Dt), n;
|
|
1003
1009
|
}
|
|
1004
|
-
function
|
|
1005
|
-
return
|
|
1006
|
-
thresholdInMeters:
|
|
1010
|
+
function Mt(e) {
|
|
1011
|
+
return jt({
|
|
1012
|
+
thresholdInMeters: At(e == null ? void 0 : e.rerouteThreshold, Et),
|
|
1007
1013
|
gpsConfig: e
|
|
1008
1014
|
});
|
|
1009
1015
|
}
|
|
1010
1016
|
//#endregion
|
|
1011
1017
|
//#region ../wayfinding/src/core/position/distanceToRoute.ts
|
|
1012
|
-
function
|
|
1018
|
+
function Nt(e, t, n, r, i, a) {
|
|
1013
1019
|
let o = i - n, s = a - r, c = e - n, l = t - r, u = o * o + s * s;
|
|
1014
|
-
if (u === 0) return
|
|
1020
|
+
if (u === 0) return d({
|
|
1015
1021
|
x: e,
|
|
1016
1022
|
y: t
|
|
1017
1023
|
}, {
|
|
1018
1024
|
x: n,
|
|
1019
1025
|
y: r
|
|
1020
1026
|
});
|
|
1021
|
-
let
|
|
1022
|
-
|
|
1023
|
-
let
|
|
1024
|
-
return
|
|
1027
|
+
let f = (c * o + l * s) / u;
|
|
1028
|
+
f < 0 ? f = 0 : f > 1 && (f = 1);
|
|
1029
|
+
let p = n + f * o, m = r + f * s;
|
|
1030
|
+
return d({
|
|
1025
1031
|
x: e,
|
|
1026
1032
|
y: t
|
|
1027
1033
|
}, {
|
|
1028
|
-
x:
|
|
1029
|
-
y:
|
|
1034
|
+
x: p,
|
|
1035
|
+
y: m
|
|
1030
1036
|
});
|
|
1031
1037
|
}
|
|
1032
|
-
function
|
|
1038
|
+
function Pt(e, t) {
|
|
1033
1039
|
let n = Infinity;
|
|
1034
1040
|
for (let r of t) {
|
|
1035
1041
|
if (e.layer && (r.p0.layer !== e.layer || r.p1.layer !== e.layer)) continue;
|
|
1036
|
-
let t =
|
|
1042
|
+
let t = Nt(e.x, e.y, r.p0.x, r.p0.y, r.p1.x, r.p1.y);
|
|
1037
1043
|
t < n && (n = t);
|
|
1038
1044
|
}
|
|
1039
1045
|
return n;
|
|
1040
1046
|
}
|
|
1041
1047
|
//#endregion
|
|
1042
1048
|
//#region ../wayfinding/src/core/position/rerouteController.ts
|
|
1043
|
-
function
|
|
1049
|
+
function Ft(e) {
|
|
1044
1050
|
return { shouldReroute(t, n) {
|
|
1045
1051
|
if (!n.length) return !1;
|
|
1046
1052
|
let r = t.layer;
|
|
1047
|
-
return r && !n.some((e) => e.p0.layer === r && e.p1.layer === r) ? !0 :
|
|
1053
|
+
return r && !n.some((e) => e.p0.layer === r && e.p1.layer === r) ? !0 : Pt(t, n) > e;
|
|
1048
1054
|
} };
|
|
1049
1055
|
}
|
|
1050
1056
|
//#endregion
|
|
1051
1057
|
//#region ../wayfinding/src/core/position/snapToRoute.ts
|
|
1052
|
-
function
|
|
1058
|
+
function It(e, t, { snapThreshold: n }) {
|
|
1053
1059
|
let r = t.length;
|
|
1054
1060
|
if (!r) return { snapped: !1 };
|
|
1055
1061
|
let i = e.layer || null, a = Infinity, o = null, s = 0, c = i == null;
|
|
1056
1062
|
for (let n = 0; n < r; n++) {
|
|
1057
|
-
let r = t[n], { p0: l, p1: u } = r,
|
|
1058
|
-
if (
|
|
1063
|
+
let r = t[n], { p0: l, p1: u } = r, f = d(l, u);
|
|
1064
|
+
if (f === 0) continue;
|
|
1059
1065
|
if (i != null && String(l.layer) !== i) {
|
|
1060
|
-
s +=
|
|
1066
|
+
s += f;
|
|
1061
1067
|
continue;
|
|
1062
1068
|
}
|
|
1063
1069
|
c = !0;
|
|
1064
|
-
let
|
|
1070
|
+
let p = it({
|
|
1065
1071
|
x: e.x,
|
|
1066
1072
|
y: e.y
|
|
1067
1073
|
}, l, u);
|
|
1068
|
-
|
|
1074
|
+
p.distance < a && (a = p.distance, o = {
|
|
1069
1075
|
point: {
|
|
1070
1076
|
layer: l.layer,
|
|
1071
|
-
x:
|
|
1072
|
-
y:
|
|
1077
|
+
x: p.projected.x,
|
|
1078
|
+
y: p.projected.y
|
|
1073
1079
|
},
|
|
1074
1080
|
line: r,
|
|
1075
|
-
fromStart: s +
|
|
1076
|
-
}), s +=
|
|
1081
|
+
fromStart: s + f * p.t
|
|
1082
|
+
}), s += f;
|
|
1077
1083
|
}
|
|
1078
1084
|
return i != null && !c || !o || a > n ? { snapped: !1 } : {
|
|
1079
1085
|
snapped: !0,
|
|
@@ -1084,7 +1090,7 @@ function Nt(e, t, { snapThreshold: n }) {
|
|
|
1084
1090
|
}
|
|
1085
1091
|
//#endregion
|
|
1086
1092
|
//#region ../wayfinding/src/core/position/splitRouteByPoint.ts
|
|
1087
|
-
function
|
|
1093
|
+
function Lt(e, t) {
|
|
1088
1094
|
let n = 1e-6, r = -1, i = 0, a = Infinity;
|
|
1089
1095
|
for (let n = 0; n < e.length; n++) {
|
|
1090
1096
|
let o = e[n];
|
|
@@ -1126,7 +1132,7 @@ function Pt(e, t) {
|
|
|
1126
1132
|
}
|
|
1127
1133
|
//#endregion
|
|
1128
1134
|
//#region ../wayfinding/src/renderer/iconManager.ts
|
|
1129
|
-
function
|
|
1135
|
+
function Rt(e, t, n) {
|
|
1130
1136
|
var r, i, a, o;
|
|
1131
1137
|
let s = t == null ? parseFloat((r = (i = e.style) == null ? void 0 : i.width) == null ? "" : r) : t, c = n == null ? parseFloat((a = (o = e.style) == null ? void 0 : o.height) == null ? "" : a) : n;
|
|
1132
1138
|
if (!(s > 0) || !(c > 0)) throw Error(`renderer: canvas "${e.id}" has no CSS size: pass width and height, or draw it on a canvas whose style records one`);
|
|
@@ -1135,11 +1141,11 @@ function Ft(e, t, n) {
|
|
|
1135
1141
|
height: c
|
|
1136
1142
|
};
|
|
1137
1143
|
}
|
|
1138
|
-
function
|
|
1144
|
+
function zt(e, t, n) {
|
|
1139
1145
|
let r = e.bounds, i = t.width * n, a = t.height * n;
|
|
1140
1146
|
if (!(r.size.x === i && r.size.y === a)) return r.set(r.center.x, r.center.y, i, a, r.rotation, r.elevation), [e];
|
|
1141
1147
|
}
|
|
1142
|
-
function
|
|
1148
|
+
function Bt(e, t, n, r = !1) {
|
|
1143
1149
|
let i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map();
|
|
1144
1150
|
function c(e) {
|
|
1145
1151
|
return e.onTop ? n.currentPosition : n.icons;
|
|
@@ -1159,20 +1165,20 @@ function Lt(e, t, n, r = !1) {
|
|
|
1159
1165
|
}
|
|
1160
1166
|
function f(n, a, o, l = o.rotation) {
|
|
1161
1167
|
var d, f, p;
|
|
1162
|
-
let m = c(o), h =
|
|
1168
|
+
let m = c(o), h = Rt(o.canvas, o.width, o.height), g = (d = o.screenSpace) == null ? r : d;
|
|
1163
1169
|
e.touchLayer(m);
|
|
1164
1170
|
let _ = {
|
|
1165
1171
|
source: o.canvas,
|
|
1166
|
-
bounds: new
|
|
1172
|
+
bounds: new x({
|
|
1167
1173
|
x: o.x,
|
|
1168
1174
|
y: o.y
|
|
1169
|
-
},
|
|
1175
|
+
}, Vt, l),
|
|
1170
1176
|
hidden: (f = o.hidden) != null && f,
|
|
1171
1177
|
dim: +!!o.dimmed,
|
|
1172
1178
|
origin: o.origin,
|
|
1173
1179
|
screenSpace: g
|
|
1174
1180
|
};
|
|
1175
|
-
o.cardinalSnap && !g && t.attachCardinalSnap(_), _.onScale = ({ pixelSize: e }) =>
|
|
1181
|
+
o.cardinalSnap && !g && t.attachCardinalSnap(_), _.onScale = ({ pixelSize: e }) => zt(_, h, e), m.children.push(_);
|
|
1176
1182
|
let v = {
|
|
1177
1183
|
imageDef: _,
|
|
1178
1184
|
layer: m,
|
|
@@ -1239,13 +1245,13 @@ function Lt(e, t, n, r = !1) {
|
|
|
1239
1245
|
}
|
|
1240
1246
|
};
|
|
1241
1247
|
}
|
|
1242
|
-
var
|
|
1248
|
+
var Vt = {
|
|
1243
1249
|
x: 0,
|
|
1244
1250
|
y: 0
|
|
1245
1251
|
};
|
|
1246
1252
|
//#endregion
|
|
1247
1253
|
//#region ../wayfinding/src/renderer/layerManager.ts
|
|
1248
|
-
function
|
|
1254
|
+
function Ht(e) {
|
|
1249
1255
|
let t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set();
|
|
1250
1256
|
return {
|
|
1251
1257
|
touchLayer(e) {
|
|
@@ -1267,8 +1273,8 @@ function zt(e) {
|
|
|
1267
1273
|
}
|
|
1268
1274
|
//#endregion
|
|
1269
1275
|
//#region ../wayfinding/src/renderer/lineAnimation.ts
|
|
1270
|
-
var
|
|
1271
|
-
function
|
|
1276
|
+
var K = 1, Ut = 0;
|
|
1277
|
+
function Wt(e, t, n, r = 0) {
|
|
1272
1278
|
let i = 0, a = 0, o = null, s = null;
|
|
1273
1279
|
if (!e.length) return;
|
|
1274
1280
|
let c = e.map((e) => ({
|
|
@@ -1284,7 +1290,7 @@ function Vt(e, t, n, r = 0) {
|
|
|
1284
1290
|
})), l = c.map((e) => {
|
|
1285
1291
|
let t = e.p1.x - e.p0.x, n = e.p1.y - e.p0.y;
|
|
1286
1292
|
return Math.sqrt(t * t + n * n);
|
|
1287
|
-
}), u = e.map((e) => e.hidden ?
|
|
1293
|
+
}), u = e.map((e) => e.hidden ? Ut : -1), d = [], f = l.reduce((e, t) => e + t, 0);
|
|
1288
1294
|
if (!f) return;
|
|
1289
1295
|
let p = Math.max(20, Math.min(f / 2, 300));
|
|
1290
1296
|
function m(e) {
|
|
@@ -1302,9 +1308,9 @@ function Vt(e, t, n, r = 0) {
|
|
|
1302
1308
|
if (u[t] === n) return;
|
|
1303
1309
|
u[t] = n;
|
|
1304
1310
|
let r = e[t], i = c[t];
|
|
1305
|
-
if (r.hidden = n <=
|
|
1311
|
+
if (r.hidden = n <= Ut, !r.hidden) {
|
|
1306
1312
|
let { p0: e, p1: t } = i;
|
|
1307
|
-
r.points = n >=
|
|
1313
|
+
r.points = n >= K ? i : {
|
|
1308
1314
|
p0: e,
|
|
1309
1315
|
p1: {
|
|
1310
1316
|
x: e.x + (t.x - e.x) * n,
|
|
@@ -1318,10 +1324,10 @@ function Vt(e, t, n, r = 0) {
|
|
|
1318
1324
|
function g() {
|
|
1319
1325
|
d.length = 0;
|
|
1320
1326
|
let n = i;
|
|
1321
|
-
for (let e = 0; e < n; e++) h(e,
|
|
1327
|
+
for (let e = 0; e < n; e++) h(e, K);
|
|
1322
1328
|
let r = l[n];
|
|
1323
|
-
h(n, r ? Math.min(a / r,
|
|
1324
|
-
for (let t = n + 1; t < e.length; t++) h(t,
|
|
1329
|
+
h(n, r ? Math.min(a / r, K) : K);
|
|
1330
|
+
for (let t = n + 1; t < e.length; t++) h(t, Ut);
|
|
1325
1331
|
d.length && t(d);
|
|
1326
1332
|
}
|
|
1327
1333
|
function _(t) {
|
|
@@ -1361,7 +1367,7 @@ function Vt(e, t, n, r = 0) {
|
|
|
1361
1367
|
}
|
|
1362
1368
|
//#endregion
|
|
1363
1369
|
//#region ../wayfinding/src/renderer/routeLineManager.ts
|
|
1364
|
-
function
|
|
1370
|
+
function Gt({ p0: e, p1: t }, n) {
|
|
1365
1371
|
return {
|
|
1366
1372
|
points: {
|
|
1367
1373
|
p0: {
|
|
@@ -1377,10 +1383,10 @@ function Ht({ p0: e, p1: t }, n) {
|
|
|
1377
1383
|
width: 10
|
|
1378
1384
|
};
|
|
1379
1385
|
}
|
|
1380
|
-
function
|
|
1386
|
+
function Kt(e, t) {
|
|
1381
1387
|
return e.points.p0.x === t.p0.x && e.points.p0.y === t.p0.y && e.points.p1.x === t.p1.x && e.points.p1.y === t.p1.y;
|
|
1382
1388
|
}
|
|
1383
|
-
function
|
|
1389
|
+
function qt(e, t, n, r) {
|
|
1384
1390
|
let i = r.lines, a = r.linesAnimated, o = null, s = 1;
|
|
1385
1391
|
function c(e) {
|
|
1386
1392
|
s = e;
|
|
@@ -1393,7 +1399,7 @@ function Wt(e, t, n, r) {
|
|
|
1393
1399
|
}
|
|
1394
1400
|
function d(e, t) {
|
|
1395
1401
|
let n = i.children;
|
|
1396
|
-
return n.length !== e.length + t.length || a.children.length !== t.length ? !1 : e.every((e, t) =>
|
|
1402
|
+
return n.length !== e.length + t.length || a.children.length !== t.length ? !1 : e.every((e, t) => Kt(n[t], e)) && t.every((t, r) => Kt(n[e.length + r], t));
|
|
1397
1403
|
}
|
|
1398
1404
|
return {
|
|
1399
1405
|
setRouteLines(r, l, f) {
|
|
@@ -1403,16 +1409,16 @@ function Wt(e, t, n, r) {
|
|
|
1403
1409
|
e.touchLayer(i), e.touchLayer(a), a.onScale = ({ pixelSize: e }) => c(e);
|
|
1404
1410
|
let g = 0;
|
|
1405
1411
|
o && (h || (g = o.getProgress()), o.stop(), o = null), u(i), u(a);
|
|
1406
|
-
let _ = r.map((e) =>
|
|
1412
|
+
let _ = r.map((e) => Gt(e, t.passed)), v = l.map((e) => Gt(e, t.remaining));
|
|
1407
1413
|
if (i.children = [..._, ...v], !v.length) {
|
|
1408
1414
|
a.children = [];
|
|
1409
1415
|
return;
|
|
1410
1416
|
}
|
|
1411
1417
|
let y = l.map((e) => ({
|
|
1412
|
-
...
|
|
1418
|
+
...Gt(e, t.active),
|
|
1413
1419
|
hidden: !0
|
|
1414
1420
|
}));
|
|
1415
|
-
a.children = y, o = (m =
|
|
1421
|
+
a.children = y, o = (m = Wt(y, (e) => n.update(...e), () => s, g)) == null ? null : m;
|
|
1416
1422
|
},
|
|
1417
1423
|
clearLines() {
|
|
1418
1424
|
o && (o.stop(), o = null), l(i), l(a);
|
|
@@ -1424,8 +1430,8 @@ function Wt(e, t, n, r) {
|
|
|
1424
1430
|
}
|
|
1425
1431
|
//#endregion
|
|
1426
1432
|
//#region ../wayfinding/src/renderer/trailManager.ts
|
|
1427
|
-
var
|
|
1428
|
-
function
|
|
1433
|
+
var Jt = 40;
|
|
1434
|
+
function Yt(e, t) {
|
|
1429
1435
|
let n = /* @__PURE__ */ new Map(), r = 1, i = !1;
|
|
1430
1436
|
function a(e) {
|
|
1431
1437
|
r = e;
|
|
@@ -1447,7 +1453,7 @@ function Kt(e, t) {
|
|
|
1447
1453
|
}
|
|
1448
1454
|
function c(n) {
|
|
1449
1455
|
s();
|
|
1450
|
-
let i =
|
|
1456
|
+
let i = Jt * r, a = _t(n.from, n.to, i), c = n.canvas, l = {
|
|
1451
1457
|
x: n.width * r,
|
|
1452
1458
|
y: n.height * r
|
|
1453
1459
|
}, u = n.dotDefs, d = Math.min(u.length, a.length), f = [];
|
|
@@ -1458,7 +1464,7 @@ function Kt(e, t) {
|
|
|
1458
1464
|
if (a.length > d) {
|
|
1459
1465
|
let n = a.slice(d).map((e) => ({
|
|
1460
1466
|
source: c,
|
|
1461
|
-
bounds: new
|
|
1467
|
+
bounds: new x({
|
|
1462
1468
|
x: e.x,
|
|
1463
1469
|
y: e.y
|
|
1464
1470
|
}, l)
|
|
@@ -1504,7 +1510,7 @@ function Kt(e, t) {
|
|
|
1504
1510
|
a.from = t, a.to = r, u(c(a));
|
|
1505
1511
|
return;
|
|
1506
1512
|
}
|
|
1507
|
-
let { width: o, height: s } =
|
|
1513
|
+
let { width: o, height: s } = Rt(i.canvas, i.width, i.height), d = {
|
|
1508
1514
|
from: t,
|
|
1509
1515
|
to: r,
|
|
1510
1516
|
canvas: i.canvas,
|
|
@@ -1522,16 +1528,16 @@ function Kt(e, t) {
|
|
|
1522
1528
|
}
|
|
1523
1529
|
//#endregion
|
|
1524
1530
|
//#region ../wayfinding/src/renderer/createWayfindingRenderer.ts
|
|
1525
|
-
var
|
|
1531
|
+
var Xt = {
|
|
1526
1532
|
passed: "#B5B7BC",
|
|
1527
1533
|
remaining: "#A4CCE2",
|
|
1528
1534
|
active: "#0794EA"
|
|
1529
1535
|
};
|
|
1530
|
-
function
|
|
1536
|
+
function Zt(e, t, n = {}) {
|
|
1531
1537
|
let r = {
|
|
1532
|
-
...
|
|
1538
|
+
...Xt,
|
|
1533
1539
|
...n.colors
|
|
1534
|
-
}, i =
|
|
1540
|
+
}, i = Ht(e), a = Bt(i, e, t, n.screenSpaceIcons), o = Yt(i, t.trail), s = qt(i, r, e, t), c = {
|
|
1535
1541
|
setIcon: (...e) => a.setIcon(...e),
|
|
1536
1542
|
clearIcons: (...e) => a.clearIcons(...e),
|
|
1537
1543
|
setTrail: (...e) => o.setTrail(...e),
|
|
@@ -1550,29 +1556,29 @@ function Jt(e, t, n = {}) {
|
|
|
1550
1556
|
}
|
|
1551
1557
|
//#endregion
|
|
1552
1558
|
//#region ../wayfinding/src/renderer/layers.ts
|
|
1553
|
-
var
|
|
1554
|
-
function
|
|
1559
|
+
var Qt = "wayfinding", $t = "wf-trail-points", en = "wf-lines", tn = "wf-lines-animated", nn = "wf-points", rn = "wf-current-position";
|
|
1560
|
+
function an(e = {}) {
|
|
1555
1561
|
return {
|
|
1556
|
-
name:
|
|
1562
|
+
name: Qt,
|
|
1557
1563
|
children: [
|
|
1558
1564
|
{
|
|
1559
|
-
name:
|
|
1565
|
+
name: $t,
|
|
1560
1566
|
children: []
|
|
1561
1567
|
},
|
|
1562
1568
|
{
|
|
1563
|
-
name:
|
|
1569
|
+
name: en,
|
|
1564
1570
|
children: []
|
|
1565
1571
|
},
|
|
1566
1572
|
{
|
|
1567
|
-
name:
|
|
1573
|
+
name: tn,
|
|
1568
1574
|
children: []
|
|
1569
1575
|
},
|
|
1570
1576
|
{
|
|
1571
|
-
name:
|
|
1577
|
+
name: nn,
|
|
1572
1578
|
children: []
|
|
1573
1579
|
},
|
|
1574
1580
|
{
|
|
1575
|
-
name:
|
|
1581
|
+
name: rn,
|
|
1576
1582
|
children: []
|
|
1577
1583
|
}
|
|
1578
1584
|
],
|
|
@@ -1580,8 +1586,8 @@ function tn(e = {}) {
|
|
|
1580
1586
|
overlay: e.overlay
|
|
1581
1587
|
};
|
|
1582
1588
|
}
|
|
1583
|
-
function
|
|
1584
|
-
let t = e.children.find((e) => "name" in e && e.name ===
|
|
1589
|
+
function on(e) {
|
|
1590
|
+
let t = e.children.find((e) => "name" in e && e.name === Qt && "children" in e);
|
|
1585
1591
|
if (!t) throw Error("The scene holds no wayfinding block — mount `root` first.");
|
|
1586
1592
|
let n = new Map(t.children.map((e) => [e.name, e]));
|
|
1587
1593
|
function r(e) {
|
|
@@ -1590,21 +1596,21 @@ function nn(e) {
|
|
|
1590
1596
|
return t;
|
|
1591
1597
|
}
|
|
1592
1598
|
return {
|
|
1593
|
-
trail: r(
|
|
1594
|
-
lines: r(
|
|
1595
|
-
linesAnimated: r(
|
|
1596
|
-
icons: r(
|
|
1597
|
-
currentPosition: r(
|
|
1599
|
+
trail: r($t),
|
|
1600
|
+
lines: r(en),
|
|
1601
|
+
linesAnimated: r(tn),
|
|
1602
|
+
icons: r(nn),
|
|
1603
|
+
currentPosition: r(rn)
|
|
1598
1604
|
};
|
|
1599
1605
|
}
|
|
1600
1606
|
//#endregion
|
|
1601
1607
|
//#region ../wayfinding/src/runtime/positionView.ts
|
|
1602
|
-
var
|
|
1603
|
-
function
|
|
1608
|
+
var sn = "current-position", cn = "position";
|
|
1609
|
+
function ln({ renderer: e, iconProvider: t }) {
|
|
1604
1610
|
return {
|
|
1605
1611
|
place(n, r) {
|
|
1606
|
-
let i = Number.isFinite(n.heading), a = i ? "current_arrow" : "current", o = i ?
|
|
1607
|
-
e.setIcon(
|
|
1612
|
+
let i = Number.isFinite(n.heading), a = i ? "current_arrow" : "current", o = i ? p(n.heading) : void 0, s = t.getIcon(a);
|
|
1613
|
+
e.setIcon(cn, {
|
|
1608
1614
|
canvas: s.canvas,
|
|
1609
1615
|
width: s.width,
|
|
1610
1616
|
height: s.height,
|
|
@@ -1619,16 +1625,16 @@ function on({ renderer: e, iconProvider: t }) {
|
|
|
1619
1625
|
});
|
|
1620
1626
|
},
|
|
1621
1627
|
hide() {
|
|
1622
|
-
e.setIcon(
|
|
1628
|
+
e.setIcon(cn, null);
|
|
1623
1629
|
}
|
|
1624
1630
|
};
|
|
1625
1631
|
}
|
|
1626
1632
|
//#endregion
|
|
1627
1633
|
//#region ../wayfinding/src/runtime/endpointView.ts
|
|
1628
|
-
function
|
|
1634
|
+
function un(e, t) {
|
|
1629
1635
|
return !t || !e.bounds && e.id !== "current-position";
|
|
1630
1636
|
}
|
|
1631
|
-
function
|
|
1637
|
+
function dn({ renderer: e, iconProvider: t, floorContext: n }) {
|
|
1632
1638
|
return {
|
|
1633
1639
|
place(r, i, a, o) {
|
|
1634
1640
|
if (!a.length) return;
|
|
@@ -1639,7 +1645,7 @@ function cn({ renderer: e, iconProvider: t, floorContext: n }) {
|
|
|
1639
1645
|
height: f.height,
|
|
1640
1646
|
x: l.x,
|
|
1641
1647
|
y: l.y,
|
|
1642
|
-
hidden:
|
|
1648
|
+
hidden: un(r, s),
|
|
1643
1649
|
dimmed: !s,
|
|
1644
1650
|
cardinalSnap: !0
|
|
1645
1651
|
}), e.setIcon("destination", {
|
|
@@ -1660,7 +1666,7 @@ function cn({ renderer: e, iconProvider: t, floorContext: n }) {
|
|
|
1660
1666
|
}
|
|
1661
1667
|
//#endregion
|
|
1662
1668
|
//#region ../wayfinding/src/runtime/getRouteLines.ts
|
|
1663
|
-
function
|
|
1669
|
+
function fn({ engine: e, from: t, to: n, waypoints: r, accessible: i }) {
|
|
1664
1670
|
return r != null && r.length ? e.buildWaypointsRoute([
|
|
1665
1671
|
t,
|
|
1666
1672
|
...r,
|
|
@@ -1669,27 +1675,27 @@ function ln({ engine: e, from: t, to: n, waypoints: r, accessible: i }) {
|
|
|
1669
1675
|
}
|
|
1670
1676
|
//#endregion
|
|
1671
1677
|
//#region ../wayfinding/src/runtime/snapPositionToRoute.ts
|
|
1672
|
-
function
|
|
1678
|
+
function pn(e, t, n) {
|
|
1673
1679
|
if (!(t != null && t.bounds)) return !1;
|
|
1674
|
-
let r = n == null || !t.layer || t.layer === n, i =
|
|
1680
|
+
let r = n == null || !t.layer || t.layer === n, i = ct({
|
|
1675
1681
|
x: e.x,
|
|
1676
1682
|
y: e.y
|
|
1677
1683
|
}, t.bounds);
|
|
1678
1684
|
return r && i;
|
|
1679
1685
|
}
|
|
1680
|
-
function
|
|
1686
|
+
function mn(e, t, n, r, i) {
|
|
1681
1687
|
if (!t.length) return { snapped: !1 };
|
|
1682
1688
|
let a = e.layer || null;
|
|
1683
|
-
if (
|
|
1689
|
+
if (pn(e, n, a)) {
|
|
1684
1690
|
let e = t[0];
|
|
1685
1691
|
return {
|
|
1686
1692
|
snapped: !0,
|
|
1687
1693
|
snappedPoint: e.p0,
|
|
1688
1694
|
snappedLine: e,
|
|
1689
|
-
distance:
|
|
1695
|
+
distance: V(t)
|
|
1690
1696
|
};
|
|
1691
1697
|
}
|
|
1692
|
-
if (
|
|
1698
|
+
if (pn(e, r, a)) {
|
|
1693
1699
|
let e = t[t.length - 1];
|
|
1694
1700
|
return {
|
|
1695
1701
|
snapped: !0,
|
|
@@ -1698,13 +1704,13 @@ function dn(e, t, n, r, i) {
|
|
|
1698
1704
|
distance: 0
|
|
1699
1705
|
};
|
|
1700
1706
|
}
|
|
1701
|
-
return
|
|
1707
|
+
return It(e, t, { snapThreshold: i });
|
|
1702
1708
|
}
|
|
1703
1709
|
//#endregion
|
|
1704
1710
|
//#region ../wayfinding/src/runtime/positionTrailView.ts
|
|
1705
|
-
var
|
|
1706
|
-
function
|
|
1707
|
-
let a =
|
|
1711
|
+
var hn = "trail";
|
|
1712
|
+
function gn({ renderer: e, iconProvider: t, floorContext: n, trails: r, snapThreshold: i }) {
|
|
1713
|
+
let a = ln({
|
|
1708
1714
|
renderer: e,
|
|
1709
1715
|
iconProvider: t
|
|
1710
1716
|
});
|
|
@@ -1717,7 +1723,7 @@ function pn({ renderer: e, iconProvider: t, floorContext: n, trails: r, snapThre
|
|
|
1717
1723
|
a.hide();
|
|
1718
1724
|
},
|
|
1719
1725
|
applyToRoute(e, t, r) {
|
|
1720
|
-
let o =
|
|
1726
|
+
let o = mn(e, r, t.from, t.to, i), s = !n.isLayerVisible(e.layer);
|
|
1721
1727
|
return o.snapped ? a.place({
|
|
1722
1728
|
...e,
|
|
1723
1729
|
x: o.snappedPoint.x,
|
|
@@ -1725,16 +1731,16 @@ function pn({ renderer: e, iconProvider: t, floorContext: n, trails: r, snapThre
|
|
|
1725
1731
|
}, s) : a.place(e, s), o;
|
|
1726
1732
|
},
|
|
1727
1733
|
setTrail(e, t) {
|
|
1728
|
-
e && t ? r.place(
|
|
1734
|
+
e && t ? r.place(hn, e, t) : r.clear(hn);
|
|
1729
1735
|
},
|
|
1730
1736
|
clearTrail() {
|
|
1731
|
-
r.clear(
|
|
1737
|
+
r.clear(hn);
|
|
1732
1738
|
}
|
|
1733
1739
|
};
|
|
1734
1740
|
}
|
|
1735
1741
|
//#endregion
|
|
1736
1742
|
//#region ../wayfinding/src/runtime/routeLinesView.ts
|
|
1737
|
-
function
|
|
1743
|
+
function _n({ renderer: e }) {
|
|
1738
1744
|
return {
|
|
1739
1745
|
draw({ passed: t, remaining: n }, r = !1) {
|
|
1740
1746
|
e.setRouteLines(t, n, { resetAnimation: !r });
|
|
@@ -1746,14 +1752,14 @@ function mn({ renderer: e }) {
|
|
|
1746
1752
|
}
|
|
1747
1753
|
//#endregion
|
|
1748
1754
|
//#region ../wayfinding/src/runtime/routeRenderData.ts
|
|
1749
|
-
function
|
|
1755
|
+
function vn({ routeLines: e, currentRouteLayer: t, snap: n }) {
|
|
1750
1756
|
let r = e.filter((e) => !e.virtual), i = (e) => t === null ? e : e.filter((e) => e.p0.layer === t);
|
|
1751
1757
|
if (!(n != null && n.snapped)) return {
|
|
1752
1758
|
passed: [],
|
|
1753
1759
|
remaining: i(r),
|
|
1754
|
-
distance:
|
|
1760
|
+
distance: V(r)
|
|
1755
1761
|
};
|
|
1756
|
-
let { passed: a, remaining: o } =
|
|
1762
|
+
let { passed: a, remaining: o } = Lt(r, n.snappedPoint), s = o !== r && o.length > 0 && o[0].p0.layer === n.snappedPoint.layer ? [{
|
|
1757
1763
|
...o[0],
|
|
1758
1764
|
p0: n.snappedPoint
|
|
1759
1765
|
}, ...o.slice(1)] : o;
|
|
@@ -1765,15 +1771,15 @@ function hn({ routeLines: e, currentRouteLayer: t, snap: n }) {
|
|
|
1765
1771
|
}
|
|
1766
1772
|
//#endregion
|
|
1767
1773
|
//#region ../wayfinding/src/runtime/routeUpdate.ts
|
|
1768
|
-
function
|
|
1774
|
+
function yn(e, t) {
|
|
1769
1775
|
return {
|
|
1770
1776
|
lines: e.filter((e) => !e.virtual),
|
|
1771
|
-
bounds:
|
|
1777
|
+
bounds: wt(t.flatMap((e) => [e.p0, e.p1]))
|
|
1772
1778
|
};
|
|
1773
1779
|
}
|
|
1774
1780
|
//#endregion
|
|
1775
1781
|
//#region ../wayfinding/src/runtime/trailView.ts
|
|
1776
|
-
function
|
|
1782
|
+
function bn({ renderer: e, iconProvider: t, floorContext: n }) {
|
|
1777
1783
|
let r = /* @__PURE__ */ new Set();
|
|
1778
1784
|
function i(e, t) {
|
|
1779
1785
|
if (n.showAllFloors()) return !0;
|
|
@@ -1807,11 +1813,11 @@ function _n({ renderer: e, iconProvider: t, floorContext: n }) {
|
|
|
1807
1813
|
}
|
|
1808
1814
|
//#endregion
|
|
1809
1815
|
//#region ../wayfinding/src/runtime/transitionView.ts
|
|
1810
|
-
var
|
|
1811
|
-
function
|
|
1816
|
+
var xn = "transition";
|
|
1817
|
+
function Sn({ renderer: e, iconProvider: t, floorContext: n, onTransitionClick: r }) {
|
|
1812
1818
|
return {
|
|
1813
1819
|
place(i) {
|
|
1814
|
-
e.clearIcons(
|
|
1820
|
+
e.clearIcons(xn);
|
|
1815
1821
|
let a;
|
|
1816
1822
|
if (n.showAllFloors()) a = null;
|
|
1817
1823
|
else {
|
|
@@ -1819,14 +1825,14 @@ function yn({ renderer: e, iconProvider: t, floorContext: n, onTransitionClick:
|
|
|
1819
1825
|
if (!e) return;
|
|
1820
1826
|
a = e;
|
|
1821
1827
|
}
|
|
1822
|
-
let o =
|
|
1828
|
+
let o = Ct({
|
|
1823
1829
|
routeLines: i,
|
|
1824
1830
|
currentLayerName: a,
|
|
1825
1831
|
floorOrder: n.getFloorOrder()
|
|
1826
1832
|
});
|
|
1827
1833
|
for (let [n, i] of o.entries()) {
|
|
1828
|
-
let a = t.getIcon(
|
|
1829
|
-
e.setIcon(
|
|
1834
|
+
let a = t.getIcon(Cn(i.role, i.direction));
|
|
1835
|
+
e.setIcon(xn, {
|
|
1830
1836
|
canvas: a.canvas,
|
|
1831
1837
|
width: a.width,
|
|
1832
1838
|
height: a.height,
|
|
@@ -1838,37 +1844,37 @@ function yn({ renderer: e, iconProvider: t, floorContext: n, onTransitionClick:
|
|
|
1838
1844
|
}
|
|
1839
1845
|
},
|
|
1840
1846
|
clear() {
|
|
1841
|
-
e.clearIcons(
|
|
1847
|
+
e.clearIcons(xn);
|
|
1842
1848
|
}
|
|
1843
1849
|
};
|
|
1844
1850
|
}
|
|
1845
|
-
function
|
|
1851
|
+
function Cn(e, t) {
|
|
1846
1852
|
return e === "entry" ? "transition_entry" : t === "up" ? "transition_up" : t === "down" ? "transition_down" : "transition";
|
|
1847
1853
|
}
|
|
1848
1854
|
//#endregion
|
|
1849
1855
|
//#region ../wayfinding/src/runtime/createWayfindingRuntime.ts
|
|
1850
|
-
var
|
|
1851
|
-
function
|
|
1852
|
-
let
|
|
1856
|
+
var wn = (e) => e.flatMap((e) => [e.p0, e.p1]);
|
|
1857
|
+
function Tn({ engine: e, renderer: t, iconProvider: n, floorContext: r, snapThreshold: i, rerouteThreshold: o, onTransitionClick: s, onRouteUpdate: c, onRouteDistance: l }) {
|
|
1858
|
+
let u = Ft(o), d = dn({
|
|
1853
1859
|
renderer: t,
|
|
1854
1860
|
iconProvider: n,
|
|
1855
1861
|
floorContext: r
|
|
1856
|
-
}), f =
|
|
1862
|
+
}), f = Sn({
|
|
1857
1863
|
renderer: t,
|
|
1858
1864
|
iconProvider: n,
|
|
1859
1865
|
floorContext: r,
|
|
1860
|
-
onTransitionClick:
|
|
1861
|
-
}), p =
|
|
1866
|
+
onTransitionClick: s
|
|
1867
|
+
}), p = gn({
|
|
1862
1868
|
renderer: t,
|
|
1863
1869
|
iconProvider: n,
|
|
1864
1870
|
floorContext: r,
|
|
1865
|
-
trails:
|
|
1871
|
+
trails: bn({
|
|
1866
1872
|
renderer: t,
|
|
1867
1873
|
iconProvider: n,
|
|
1868
1874
|
floorContext: r
|
|
1869
1875
|
}),
|
|
1870
1876
|
snapThreshold: i
|
|
1871
|
-
}), m =
|
|
1877
|
+
}), m = _n({ renderer: t }), h = [], g = null, _ = null, v = null, y = 0, b = !1, x = !1;
|
|
1872
1878
|
function S() {
|
|
1873
1879
|
return r.showAllFloors() ? null : r.getActiveFloor();
|
|
1874
1880
|
}
|
|
@@ -1876,30 +1882,30 @@ function Sn({ engine: e, renderer: t, iconProvider: n, floorContext: r, snapThre
|
|
|
1876
1882
|
let e = S();
|
|
1877
1883
|
return e === null ? h.filter((e) => !e.virtual) : h.filter((t) => t.p0.layer === e && !t.virtual);
|
|
1878
1884
|
}
|
|
1879
|
-
function
|
|
1880
|
-
return
|
|
1885
|
+
function ee(e) {
|
|
1886
|
+
return u.shouldReroute(e, h.filter((e) => !e.virtual));
|
|
1881
1887
|
}
|
|
1882
|
-
function
|
|
1888
|
+
function w() {
|
|
1883
1889
|
if (!g || !_) return null;
|
|
1884
1890
|
let e = C();
|
|
1885
1891
|
return e.length ? {
|
|
1886
1892
|
from: g,
|
|
1887
1893
|
to: _,
|
|
1888
|
-
routePoints:
|
|
1894
|
+
routePoints: wn(e),
|
|
1889
1895
|
visibleLines: e
|
|
1890
1896
|
} : null;
|
|
1891
1897
|
}
|
|
1892
|
-
function
|
|
1898
|
+
function T(e = null, t = !1) {
|
|
1893
1899
|
if (!g || !_) return;
|
|
1894
|
-
let n =
|
|
1900
|
+
let n = vn({
|
|
1895
1901
|
routeLines: h,
|
|
1896
1902
|
currentRouteLayer: S(),
|
|
1897
1903
|
snap: e
|
|
1898
1904
|
});
|
|
1899
1905
|
m.draw(n, t), y = n.distance;
|
|
1900
1906
|
}
|
|
1901
|
-
function
|
|
1902
|
-
let t =
|
|
1907
|
+
function E(e) {
|
|
1908
|
+
let t = w();
|
|
1903
1909
|
if (!t) {
|
|
1904
1910
|
p.setTrail(null, null);
|
|
1905
1911
|
return;
|
|
@@ -1915,87 +1921,87 @@ function Sn({ engine: e, renderer: t, iconProvider: n, floorContext: r, snapThre
|
|
|
1915
1921
|
let a = r(t.to);
|
|
1916
1922
|
p.setTrail(a ? t.routePoints[t.routePoints.length - 1] : null, a);
|
|
1917
1923
|
}
|
|
1918
|
-
function
|
|
1924
|
+
function D() {
|
|
1919
1925
|
if (!g || !_) return;
|
|
1920
|
-
let e =
|
|
1926
|
+
let e = w();
|
|
1921
1927
|
if (!e) {
|
|
1922
|
-
|
|
1928
|
+
d.hide(), f.clear(), p.clearTrail(), T();
|
|
1923
1929
|
return;
|
|
1924
1930
|
}
|
|
1925
|
-
|
|
1931
|
+
d.place(g, _, e.routePoints, x), f.place(h), T(), E(null);
|
|
1926
1932
|
}
|
|
1927
|
-
function
|
|
1933
|
+
function O() {
|
|
1928
1934
|
if (!g || !_) return;
|
|
1929
|
-
let e =
|
|
1930
|
-
e &&
|
|
1935
|
+
let e = w();
|
|
1936
|
+
e && d.place(g, _, e.routePoints, x);
|
|
1931
1937
|
}
|
|
1932
|
-
function
|
|
1938
|
+
function k() {
|
|
1933
1939
|
if (x = !1, !v || !g || !_) return null;
|
|
1934
1940
|
let e = h.filter((e) => !e.virtual);
|
|
1935
1941
|
if (!e.length) return null;
|
|
1936
|
-
let t =
|
|
1942
|
+
let t = w(), n = t ? p.applyToRoute(v, t, e) : mn(v, e, g, _, i);
|
|
1937
1943
|
return n.snapped && (b = !0), x = n.snapped, n;
|
|
1938
1944
|
}
|
|
1939
|
-
function
|
|
1940
|
-
let e =
|
|
1941
|
-
return
|
|
1945
|
+
function A() {
|
|
1946
|
+
let e = yn(h, C());
|
|
1947
|
+
return c(e.lines, e.bounds), e;
|
|
1942
1948
|
}
|
|
1943
|
-
function
|
|
1944
|
-
let o =
|
|
1949
|
+
function te({ from: n, to: r, waypoints: i, accessible: a }) {
|
|
1950
|
+
let o = fn({
|
|
1945
1951
|
engine: e,
|
|
1946
1952
|
from: n,
|
|
1947
1953
|
to: r,
|
|
1948
1954
|
waypoints: i,
|
|
1949
1955
|
accessible: a
|
|
1950
1956
|
});
|
|
1951
|
-
if (!o.length) return
|
|
1952
|
-
b = !1, g = n, _ = r, h = o,
|
|
1953
|
-
let { lines: s } =
|
|
1954
|
-
return
|
|
1957
|
+
if (!o.length) return M(), !1;
|
|
1958
|
+
b = !1, g = n, _ = r, h = o, D();
|
|
1959
|
+
let { lines: s } = A(), c = k();
|
|
1960
|
+
return O(), E(c), c && T(c, !0), l(c ? y : V(s)), t.flush(), !0;
|
|
1955
1961
|
}
|
|
1956
|
-
function
|
|
1962
|
+
function ne(e) {
|
|
1957
1963
|
let n = v !== null;
|
|
1958
1964
|
if (v = e, !e) {
|
|
1959
|
-
x = !1, p.hideIcon(),
|
|
1965
|
+
x = !1, p.hideIcon(), E(null), n && O(), T(), l(y), t.flush();
|
|
1960
1966
|
return;
|
|
1961
1967
|
}
|
|
1962
1968
|
p.placeIcon(e);
|
|
1963
|
-
let r =
|
|
1964
|
-
|
|
1969
|
+
let r = k();
|
|
1970
|
+
O(), E(r), r && T(r, !0), l(y), t.flush();
|
|
1965
1971
|
}
|
|
1966
|
-
function
|
|
1967
|
-
|
|
1968
|
-
let e =
|
|
1969
|
-
|
|
1972
|
+
function j() {
|
|
1973
|
+
D();
|
|
1974
|
+
let e = k();
|
|
1975
|
+
O(), E(e), e && T(e, !0), h.length && A(), l(y), t.flush();
|
|
1970
1976
|
}
|
|
1971
|
-
function
|
|
1972
|
-
b = !1, h = [], g = null, _ = null, y = 0,
|
|
1977
|
+
function M() {
|
|
1978
|
+
b = !1, h = [], g = null, _ = null, y = 0, d.hide(), f.clear(), p.clearTrail(), m.clear(), c([], new a()), l(0), t.flush();
|
|
1973
1979
|
}
|
|
1974
|
-
function
|
|
1975
|
-
|
|
1980
|
+
function re() {
|
|
1981
|
+
M(), v = null, t.destroy();
|
|
1976
1982
|
}
|
|
1977
1983
|
return {
|
|
1978
|
-
setRoute:
|
|
1979
|
-
onPositionChanged:
|
|
1980
|
-
onFloorChanged:
|
|
1981
|
-
shouldReroute:
|
|
1982
|
-
clearRoute:
|
|
1983
|
-
destroy:
|
|
1984
|
+
setRoute: te,
|
|
1985
|
+
onPositionChanged: ne,
|
|
1986
|
+
onFloorChanged: j,
|
|
1987
|
+
shouldReroute: ee,
|
|
1988
|
+
clearRoute: M,
|
|
1989
|
+
destroy: re
|
|
1984
1990
|
};
|
|
1985
1991
|
}
|
|
1986
1992
|
//#endregion
|
|
1987
1993
|
//#region ../wayfinding/src/createWayfinding.ts
|
|
1988
|
-
function
|
|
1989
|
-
let { dataSource: t, renderer: n, iconProvider: r, floorContext: i, layers: a, gpsConfig: o } = e, s =
|
|
1994
|
+
function En(e) {
|
|
1995
|
+
let { dataSource: t, renderer: n, iconProvider: r, floorContext: i, layers: a, gpsConfig: o } = e, s = mt(t), c = Zt(n, a, { screenSpaceIcons: e.screenSpaceIcons }), l = Tn({
|
|
1990
1996
|
engine: s,
|
|
1991
1997
|
renderer: c,
|
|
1992
1998
|
iconProvider: r,
|
|
1993
1999
|
floorContext: i,
|
|
1994
|
-
snapThreshold:
|
|
1995
|
-
thresholdInMeters:
|
|
2000
|
+
snapThreshold: jt({
|
|
2001
|
+
thresholdInMeters: At(o == null ? void 0 : o.snapThreshold, Tt),
|
|
1996
2002
|
gpsConfig: o
|
|
1997
2003
|
}),
|
|
1998
|
-
rerouteThreshold:
|
|
2004
|
+
rerouteThreshold: Mt(o),
|
|
1999
2005
|
onTransitionClick: (t) => {
|
|
2000
2006
|
var n;
|
|
2001
2007
|
return (n = e.onTransitionClick) == null ? void 0 : n.call(e, t);
|
|
@@ -2028,8 +2034,8 @@ function Cn(e) {
|
|
|
2028
2034
|
}
|
|
2029
2035
|
//#endregion
|
|
2030
2036
|
//#region src/wayfinding/adapters/arbitraryPoint.ts
|
|
2031
|
-
var
|
|
2032
|
-
function
|
|
2037
|
+
var Dn = "Your Location", On = "kiosk-anchor";
|
|
2038
|
+
function kn(e, t, n) {
|
|
2033
2039
|
return {
|
|
2034
2040
|
id: n,
|
|
2035
2041
|
x: e.x,
|
|
@@ -2040,9 +2046,9 @@ function En(e, t, n) {
|
|
|
2040
2046
|
}
|
|
2041
2047
|
//#endregion
|
|
2042
2048
|
//#region src/wayfinding/adapters/boothToEndpoint.ts
|
|
2043
|
-
function
|
|
2049
|
+
function An(e) {
|
|
2044
2050
|
var t, n;
|
|
2045
|
-
let r = e.rect, i =
|
|
2051
|
+
let r = e.rect, i = x.fromMinMax(r.min, r.max, e.rotate).corners();
|
|
2046
2052
|
return {
|
|
2047
2053
|
x: r.center.x,
|
|
2048
2054
|
y: r.center.y,
|
|
@@ -2052,41 +2058,41 @@ function Dn(e) {
|
|
|
2052
2058
|
}
|
|
2053
2059
|
//#endregion
|
|
2054
2060
|
//#region src/wayfinding/adapters/canvasIconProvider.ts
|
|
2055
|
-
var
|
|
2061
|
+
var jn = "#00A2FF", Mn = "#FF9F06", q = 34, J = 4, Nn = 56;
|
|
2056
2062
|
function Y(e, t, n, r, i, a) {
|
|
2057
2063
|
let o = e.get(t);
|
|
2058
2064
|
return o ? (o.id = t, s(o, n, r, i)) : a();
|
|
2059
2065
|
}
|
|
2060
|
-
function X(e, t =
|
|
2066
|
+
function X(e, t = v(e)) {
|
|
2061
2067
|
return {
|
|
2062
2068
|
canvas: e,
|
|
2063
2069
|
width: t.width,
|
|
2064
2070
|
height: t.height
|
|
2065
2071
|
};
|
|
2066
2072
|
}
|
|
2067
|
-
function
|
|
2073
|
+
function Pn(e) {
|
|
2068
2074
|
var t, n;
|
|
2069
|
-
let { iconMap: r, pixelRatio: i } = e, a = (t = e.sourceColor) == null ?
|
|
2070
|
-
|
|
2071
|
-
let l =
|
|
2072
|
-
l.id = "current-location",
|
|
2073
|
-
let d = Y(r, "transition",
|
|
2074
|
-
return
|
|
2075
|
-
width:
|
|
2076
|
-
height:
|
|
2075
|
+
let { iconMap: r, pixelRatio: i } = e, a = (t = e.sourceColor) == null ? jn : t, o = (n = e.destinationColor) == null ? Mn : n, s = /* @__PURE__ */ new Map();
|
|
2076
|
+
s.set("destination", X(Y(r, "destination", q, q, i, () => y(i, o)))), s.set("source", X(Y(r, "departure", q, q, i, () => c(i, a)))), s.set("source_inactive", X(Y(r, "departure_inactive", q, q, i, () => c(i, a))));
|
|
2077
|
+
let l = c(i, a);
|
|
2078
|
+
l.id = "current-location", s.set("current", X(l));
|
|
2079
|
+
let d = Y(r, "transition", q, q, i, () => c(i, a));
|
|
2080
|
+
return s.set("transition", X(d)), s.set("transition_up", X(Y(r, "transition_up", Nn, q, i, () => d))), s.set("transition_down", X(Y(r, "transition_down", Nn, q, i, () => d))), s.set("transition_entry", X(Y(r, "departure", q, q, i, () => c(i, a)))), s.set("current_arrow", X(Y(r, "direction", q, q, i, () => u(i, a)))), s.set("trail", X(w(J, "#b5b7bc"), {
|
|
2081
|
+
width: T(J),
|
|
2082
|
+
height: T(J)
|
|
2077
2083
|
})), { getIcon(e) {
|
|
2078
|
-
let t =
|
|
2084
|
+
let t = s.get(e);
|
|
2079
2085
|
if (!t) throw Error(`Unknown icon: ${e}`);
|
|
2080
2086
|
return t;
|
|
2081
2087
|
} };
|
|
2082
2088
|
}
|
|
2083
2089
|
//#endregion
|
|
2084
2090
|
//#region src/wayfinding/adapters/floorContext.ts
|
|
2085
|
-
var
|
|
2086
|
-
function
|
|
2091
|
+
var Fn = 0;
|
|
2092
|
+
function In(e, t) {
|
|
2087
2093
|
return {
|
|
2088
2094
|
showAllFloors() {
|
|
2089
|
-
return e.mode ===
|
|
2095
|
+
return e.mode === Fn;
|
|
2090
2096
|
},
|
|
2091
2097
|
getActiveFloor() {
|
|
2092
2098
|
var n;
|
|
@@ -2104,39 +2110,39 @@ function Pn(e, t) {
|
|
|
2104
2110
|
}
|
|
2105
2111
|
//#endregion
|
|
2106
2112
|
//#region src/wayfinding/adapters/graphDataSource.ts
|
|
2107
|
-
function
|
|
2113
|
+
function Ln() {
|
|
2108
2114
|
return {
|
|
2109
2115
|
getLines: () => {
|
|
2110
2116
|
var e, t;
|
|
2111
|
-
return (e = (t =
|
|
2117
|
+
return (e = (t = C()) == null ? void 0 : t.lines) == null ? [] : e;
|
|
2112
2118
|
},
|
|
2113
2119
|
getLineEnds: () => {
|
|
2114
2120
|
var e, t;
|
|
2115
|
-
return (e = (t =
|
|
2121
|
+
return (e = (t = C()) == null ? void 0 : t.lineEnds) == null ? [] : e;
|
|
2116
2122
|
}
|
|
2117
2123
|
};
|
|
2118
2124
|
}
|
|
2119
2125
|
//#endregion
|
|
2120
2126
|
//#region src/utils/math.ts
|
|
2121
|
-
var
|
|
2127
|
+
var Rn = /* @__PURE__ */ e(f(), 1);
|
|
2122
2128
|
function Z(e, t) {
|
|
2123
2129
|
return e * (1 - t / 100);
|
|
2124
2130
|
}
|
|
2125
2131
|
//#endregion
|
|
2126
2132
|
//#region src/wayfinding/adapters/kioskCanvas.ts
|
|
2127
|
-
var
|
|
2128
|
-
function
|
|
2133
|
+
var zn = 199, Bn = 152, Vn = 55, Hn = "#ee4422";
|
|
2134
|
+
function Un(e, t) {
|
|
2129
2135
|
let n = devicePixelRatio, r = e == null ? void 0 : e.get("kiosk");
|
|
2130
2136
|
if (r) {
|
|
2131
2137
|
r.id = "kiosk";
|
|
2132
2138
|
let e = t ? t / 100 : 1;
|
|
2133
|
-
return s(r, Z(
|
|
2139
|
+
return s(r, Z(zn * e, Vn), Z(Bn * e, Vn), n);
|
|
2134
2140
|
}
|
|
2135
|
-
return
|
|
2141
|
+
return u(n, (0, Rn.default)(Hn).hex());
|
|
2136
2142
|
}
|
|
2137
2143
|
//#endregion
|
|
2138
2144
|
//#region src/wayfinding/adapters/positionInput.ts
|
|
2139
|
-
function
|
|
2145
|
+
function Wn(e) {
|
|
2140
2146
|
return {
|
|
2141
2147
|
x: e.x,
|
|
2142
2148
|
y: e.y,
|
|
@@ -2146,12 +2152,12 @@ function Hn(e) {
|
|
|
2146
2152
|
}
|
|
2147
2153
|
//#endregion
|
|
2148
2154
|
//#region src/wayfinding/bindMobxReactions.ts
|
|
2149
|
-
var
|
|
2150
|
-
function
|
|
2155
|
+
var Gn = (e) => "rect" in e ? An(e) : e;
|
|
2156
|
+
function Kn({ wayfinding: e, kioskHandler: t, yahHandler: n, stores: { routeStore: a, uiState: o, layerStore: s } }) {
|
|
2151
2157
|
let c = [];
|
|
2152
2158
|
function l() {
|
|
2153
2159
|
var t;
|
|
2154
|
-
let n = o.selectedRoute, r = n != null && n.from ?
|
|
2160
|
+
let n = o.selectedRoute, r = n != null && n.from ? Gn(n.from) : null, i = n != null && n.to ? Gn(n.to) : null;
|
|
2155
2161
|
if (!r || !i) {
|
|
2156
2162
|
e.clearRoute();
|
|
2157
2163
|
return;
|
|
@@ -2159,7 +2165,7 @@ function Wn({ wayfinding: e, kioskHandler: t, yahHandler: n, stores: { routeStor
|
|
|
2159
2165
|
e.setRoute({
|
|
2160
2166
|
from: r,
|
|
2161
2167
|
to: i,
|
|
2162
|
-
waypoints: n == null || (t = n.waypoints) == null ? void 0 : t.map(
|
|
2168
|
+
waypoints: n == null || (t = n.waypoints) == null ? void 0 : t.map(An),
|
|
2163
2169
|
accessible: a.onlyAccessible
|
|
2164
2170
|
}) === !1 && console.error(/* @__PURE__ */ Error(`Route not found: (${r.x},${r.y}) → (${i.x},${i.y})`));
|
|
2165
2171
|
}
|
|
@@ -2169,7 +2175,7 @@ function Wn({ wayfinding: e, kioskHandler: t, yahHandler: n, stores: { routeStor
|
|
|
2169
2175
|
e.setPosition(null), n(null);
|
|
2170
2176
|
return;
|
|
2171
2177
|
}
|
|
2172
|
-
let l =
|
|
2178
|
+
let l = Wn(t);
|
|
2173
2179
|
c ? (e.setPosition(null), n({
|
|
2174
2180
|
x: l.x,
|
|
2175
2181
|
y: l.y,
|
|
@@ -2180,8 +2186,8 @@ function Wn({ wayfinding: e, kioskHandler: t, yahHandler: n, stores: { routeStor
|
|
|
2180
2186
|
var t;
|
|
2181
2187
|
let n = a.currentPosition, r = o.selectedRoute;
|
|
2182
2188
|
if (!n || !(r != null && r.to)) return;
|
|
2183
|
-
let i = !r.from, s = ((t = r.from) == null ? void 0 : t.id) === "current-position" && e.shouldReroute(
|
|
2184
|
-
!i && !s || a.rebuildRouteFromPosition(
|
|
2189
|
+
let i = !r.from, s = ((t = r.from) == null ? void 0 : t.id) === "current-position" && e.shouldReroute(Wn(n));
|
|
2190
|
+
!i && !s || a.rebuildRouteFromPosition(kn(n, Dn, sn));
|
|
2185
2191
|
}
|
|
2186
2192
|
function f() {
|
|
2187
2193
|
var e, n;
|
|
@@ -2193,7 +2199,7 @@ function Wn({ wayfinding: e, kioskHandler: t, yahHandler: n, stores: { routeStor
|
|
|
2193
2199
|
let t = o.selectedRoute, n = a.currentPosition;
|
|
2194
2200
|
if (!(t != null && t.to) || !n || ((e = t.from) == null ? void 0 : e.id) !== "current-position" || a.routeLines.length > 0) return;
|
|
2195
2201
|
let r = n.z == null ? "" : String(n.z);
|
|
2196
|
-
t.from.x === n.x && t.from.y === n.y && t.from.layer === r || a.rebuildRouteFromPosition(
|
|
2202
|
+
t.from.x === n.x && t.from.y === n.y && t.from.layer === r || a.rebuildRouteFromPosition(kn(n, Dn, sn));
|
|
2197
2203
|
}
|
|
2198
2204
|
c.push(i(() => s.layersLoaded, () => {
|
|
2199
2205
|
l(), u();
|
|
@@ -2234,44 +2240,44 @@ function Wn({ wayfinding: e, kioskHandler: t, yahHandler: n, stores: { routeStor
|
|
|
2234
2240
|
}
|
|
2235
2241
|
//#endregion
|
|
2236
2242
|
//#region src/wayfinding/handlers/kioskHandler.ts
|
|
2237
|
-
var
|
|
2238
|
-
function
|
|
2243
|
+
var qn = "kiosk", Jn = 0;
|
|
2244
|
+
function Yn({ wayfinding: e, kioskIconMap: t }) {
|
|
2239
2245
|
let n = /* @__PURE__ */ new Map(), r = (e) => {
|
|
2240
2246
|
let r = e == null ? 100 : e, i = n.get(r);
|
|
2241
2247
|
if (i) return i;
|
|
2242
|
-
let a =
|
|
2248
|
+
let a = Un(t, e);
|
|
2243
2249
|
return n.set(r, a), a;
|
|
2244
2250
|
};
|
|
2245
2251
|
return (t, n, i) => {
|
|
2246
|
-
var
|
|
2252
|
+
var a;
|
|
2247
2253
|
if (!t) {
|
|
2248
|
-
e.setIcon(
|
|
2254
|
+
e.setIcon(qn, null), e.flush();
|
|
2249
2255
|
return;
|
|
2250
2256
|
}
|
|
2251
|
-
if (i !==
|
|
2252
|
-
e.setIcon(
|
|
2257
|
+
if (i !== Jn && t.z && n && t.z !== n) {
|
|
2258
|
+
e.setIcon(qn, null), e.flush();
|
|
2253
2259
|
return;
|
|
2254
2260
|
}
|
|
2255
|
-
let
|
|
2256
|
-
e.setIcon(
|
|
2257
|
-
canvas:
|
|
2258
|
-
...
|
|
2261
|
+
let o = r(t.iconSizePercent);
|
|
2262
|
+
e.setIcon(qn, {
|
|
2263
|
+
canvas: o,
|
|
2264
|
+
...v(o),
|
|
2259
2265
|
x: t.x,
|
|
2260
2266
|
y: t.y,
|
|
2261
|
-
rotation:
|
|
2267
|
+
rotation: p((a = t.heading) == null ? 0 : a),
|
|
2262
2268
|
screenSpace: !1
|
|
2263
2269
|
}), e.flush();
|
|
2264
2270
|
};
|
|
2265
2271
|
}
|
|
2266
2272
|
//#endregion
|
|
2267
2273
|
//#region src/wayfinding/handlers/yahHandler.ts
|
|
2268
|
-
var Q = "yah",
|
|
2269
|
-
function
|
|
2274
|
+
var Q = "yah", Xn = "#ff4343", Zn = 64, Qn = 90, $n = 32;
|
|
2275
|
+
function er(e, t) {
|
|
2270
2276
|
let n = e.get(Q);
|
|
2271
|
-
return n ? (n.id = Q, s(n, Z(
|
|
2277
|
+
return n ? (n.id = Q, s(n, Z(Zn, $n), Z(Qn, $n), t)) : o(t, Xn);
|
|
2272
2278
|
}
|
|
2273
|
-
function
|
|
2274
|
-
let i =
|
|
2279
|
+
function tr({ wayfinding: e, iconMap: t, pixelRatio: n, floorContext: r }) {
|
|
2280
|
+
let i = er(t, n);
|
|
2275
2281
|
return i.id = "current-location-2", (t) => {
|
|
2276
2282
|
if (!t) {
|
|
2277
2283
|
e.setIcon(Q, null), e.flush();
|
|
@@ -2280,7 +2286,7 @@ function $n({ wayfinding: e, iconMap: t, pixelRatio: n, floorContext: r }) {
|
|
|
2280
2286
|
let n = r.isLayerVisible(t.layer);
|
|
2281
2287
|
e.setIcon(Q, {
|
|
2282
2288
|
canvas: i,
|
|
2283
|
-
...
|
|
2289
|
+
...v(i),
|
|
2284
2290
|
x: t.x,
|
|
2285
2291
|
y: t.y,
|
|
2286
2292
|
hidden: !n,
|
|
@@ -2292,37 +2298,37 @@ function $n({ wayfinding: e, iconMap: t, pixelRatio: n, floorContext: r }) {
|
|
|
2292
2298
|
//#endregion
|
|
2293
2299
|
//#region src/wayfinding/createWayfinding.ts
|
|
2294
2300
|
var $ = null;
|
|
2295
|
-
function
|
|
2301
|
+
function nr() {
|
|
2296
2302
|
return $ !== null;
|
|
2297
2303
|
}
|
|
2298
|
-
function
|
|
2304
|
+
function rr() {
|
|
2299
2305
|
if (!$) throw Error("Wayfinding is not initialized — call createWayfinding() first.");
|
|
2300
2306
|
return $;
|
|
2301
2307
|
}
|
|
2302
|
-
function
|
|
2303
|
-
return
|
|
2308
|
+
function ir(e, t, n) {
|
|
2309
|
+
return rr().wayfinding.buildRoute(e, t, n);
|
|
2304
2310
|
}
|
|
2305
|
-
function
|
|
2306
|
-
let { scene: t, store: n, canvas: r } = e, i =
|
|
2307
|
-
attachCardinalSnap:
|
|
2308
|
-
update:
|
|
2311
|
+
function ar(e) {
|
|
2312
|
+
let { scene: t, store: n, canvas: r } = e, i = on(t.rootLayer), { wayfinding: a, dispose: o } = or(n, i, {
|
|
2313
|
+
attachCardinalSnap: _,
|
|
2314
|
+
update: h
|
|
2309
2315
|
}), s = i.icons;
|
|
2310
|
-
return s.onClick = (e) =>
|
|
2311
|
-
s.onClick = void 0, s.onPointerMove = void 0, s.onPointerOut = void 0, r.current && (r.current.style.cursor = ""),
|
|
2316
|
+
return s.onClick = (e) => cr(a, e), s.onPointerMove = (e) => lr(a, r, e), s.onPointerOut = () => lr(a, r), h(s), () => {
|
|
2317
|
+
s.onClick = void 0, s.onPointerMove = void 0, s.onPointerOut = void 0, r.current && (r.current.style.cursor = ""), h(s), o();
|
|
2312
2318
|
};
|
|
2313
2319
|
}
|
|
2314
|
-
function
|
|
2320
|
+
function or(e, t, n) {
|
|
2315
2321
|
var r;
|
|
2316
|
-
let i =
|
|
2322
|
+
let i = Ln(), a = Pn({
|
|
2317
2323
|
iconMap: e.fp.icons,
|
|
2318
2324
|
pixelRatio: devicePixelRatio
|
|
2319
|
-
}), o =
|
|
2325
|
+
}), o = In(e.layerStore, e.routeStore), s = En({
|
|
2320
2326
|
dataSource: i,
|
|
2321
2327
|
renderer: n,
|
|
2322
2328
|
iconProvider: a,
|
|
2323
2329
|
floorContext: o,
|
|
2324
2330
|
layers: t,
|
|
2325
|
-
gpsConfig: (r =
|
|
2331
|
+
gpsConfig: (r = N()) == null || (r = r.properties) == null ? void 0 : r.config,
|
|
2326
2332
|
screenSpaceIcons: e.uiState.is3DView,
|
|
2327
2333
|
onTransitionClick: (t) => {
|
|
2328
2334
|
t.role === "exit" && e.layerStore.updateVisibility(t.targetLayer, !0);
|
|
@@ -2331,13 +2337,13 @@ function ir(e, t, n) {
|
|
|
2331
2337
|
e.routeStore.updateRoute([...t]), n.isEmpty() || (e.uiState.moveToRect = n);
|
|
2332
2338
|
},
|
|
2333
2339
|
onRouteDistance: (t) => e.routeStore.updateRouteDistance(t)
|
|
2334
|
-
}), c =
|
|
2340
|
+
}), c = Kn({
|
|
2335
2341
|
wayfinding: s,
|
|
2336
|
-
kioskHandler:
|
|
2342
|
+
kioskHandler: Yn({
|
|
2337
2343
|
wayfinding: s,
|
|
2338
2344
|
kioskIconMap: e.fp.icons
|
|
2339
2345
|
}),
|
|
2340
|
-
yahHandler:
|
|
2346
|
+
yahHandler: tr({
|
|
2341
2347
|
wayfinding: s,
|
|
2342
2348
|
iconMap: e.fp.icons,
|
|
2343
2349
|
pixelRatio: devicePixelRatio,
|
|
@@ -2354,21 +2360,21 @@ function ir(e, t, n) {
|
|
|
2354
2360
|
return $ = l, s.flush(), {
|
|
2355
2361
|
wayfinding: s,
|
|
2356
2362
|
dispose() {
|
|
2357
|
-
|
|
2363
|
+
sr(l) && ($ = null, e.routeStore.showAccessible = !1), c(), s.destroy();
|
|
2358
2364
|
}
|
|
2359
2365
|
};
|
|
2360
2366
|
}
|
|
2361
|
-
function
|
|
2367
|
+
function sr(e) {
|
|
2362
2368
|
return $ === e;
|
|
2363
2369
|
}
|
|
2364
|
-
function
|
|
2370
|
+
function cr(e, t) {
|
|
2365
2371
|
e.handleClick([t.def]) && t.stopPropagation();
|
|
2366
2372
|
}
|
|
2367
|
-
function
|
|
2373
|
+
function lr(e, t, n) {
|
|
2368
2374
|
let r = t.current;
|
|
2369
2375
|
if (!r) return;
|
|
2370
2376
|
let i = n ? e.handleHover([n.def]) : !1;
|
|
2371
2377
|
r.style.cursor = i ? "pointer" : "";
|
|
2372
2378
|
}
|
|
2373
2379
|
//#endregion
|
|
2374
|
-
export {
|
|
2380
|
+
export { ae as _, Dn as a, D as b, sn as c, ue as d, ce as f, oe as g, F as h, An as i, an as l, se as m, ar as n, On as o, le as p, nr as r, kn as s, ir as t, et as u, N as v, M as y };
|