@expofp/floorplan 3.43.1 → 3.44.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-ChvBlyDe.js → Button-CwSuVEAs.js} +5 -5
- package/dist/browser/{CookieConsent-B79szHaS.js → CookieConsent-LG7LAwIi.js} +7 -7
- package/dist/browser/{Debug-BmtrxpLX.js → Debug-D12juOxd.js} +7 -7
- package/dist/browser/{DebugTools-D4NbQEtd.js → DebugTools-D1BlNP_l.js} +6 -6
- package/dist/browser/{Demo-C1jGPlTZ.js → Demo-Di_4yoXs.js} +9 -9
- package/dist/browser/{Free-CrPKA8NB.js → Free-Dsj_1w90.js} +10 -10
- package/dist/browser/{GalleryContainer-Byk_AjCO.js → GalleryContainer-BMp3iUri.js} +11 -11
- package/dist/browser/{GpsLoader-xcrMJQ3k.js → GpsLoader-CnesPHck.js} +13 -13
- package/dist/browser/{KioskStore-CCqEIeOE.js → KioskStore-lkbcjOnj.js} +10 -10
- package/dist/browser/{LayerStore-CfhO9JTt.js → LayerStore-XE8pPWIM.js} +37 -37
- package/dist/browser/{MaplibreAdapter-BkdCl4p0.js → MaplibreAdapter-4uBbmp4V.js} +16 -16
- package/dist/browser/{ModalContainer-CdqhG7DC.js → ModalContainer-BlMSfsCP.js} +10 -10
- package/dist/browser/{PermissionNotice-271evNUE.js → PermissionNotice-AJHe71hf.js} +6 -6
- package/dist/browser/{RouteStore-DYDocOLg.js → RouteStore--oPX6Jwa.js} +10 -10
- package/dist/browser/{SetKioskMode-DWceqgEp.js → SetKioskMode-Cc2jEf3F.js} +11 -11
- package/dist/browser/{ShowKiosk-D5DyThTi.js → ShowKiosk-Dxgv92Yi.js} +12 -12
- package/dist/browser/{UIState-Saj7Kjjr.js → UIState-BOAmBIjh.js} +11 -11
- package/dist/browser/{ViewerMenuPanel--NAIzyGt.js → ViewerMenuPanel--tRgf5Bd.js} +10 -10
- package/dist/browser/{add-debug-secret-listener-BqwoAVWZ.js → add-debug-secret-listener-D9NQY30D.js} +1 -1
- package/dist/browser/{adopt-global-settings-DvAJraFg.js → adopt-global-settings-C22a3Tvl.js} +9 -9
- package/dist/browser/{boolean-editor-Co1Ily6N.js → boolean-editor-C1V9siKu.js} +9 -9
- package/dist/browser/{bootIntercom-BxKpklX4.js → bootIntercom-CtK5Nlux.js} +2 -2
- package/dist/browser/bundle.json +84 -84
- package/dist/browser/{camera-events-BnYGheBl.js → camera-events-CTfl_AKk.js} +1 -1
- package/dist/browser/{classnames-NaSmbmqt.js → classnames-CmB5cw0K.js} +2 -2
- package/dist/browser/{client-CvZjZ5MY.js → client-D8KwRQSF.js} +5 -5
- package/dist/browser/{components-BC_4Rrtm.js → components-CcX6AOgl.js} +48 -48
- package/dist/browser/{create-live-plan-DdDxRVpo.js → create-live-plan-CFKu_O5z.js} +51 -52
- package/dist/browser/{debug-context-rb_t7BzM.js → debug-context-XwhOvpy2.js} +5 -5
- package/dist/browser/{debug-overlay-DX9d63U6.js → debug-overlay-BEwfNDTh.js} +10 -10
- package/dist/browser/{debug-ui-1zRSn-Pt.js → debug-ui-DGsyoqbw.js} +6 -6
- package/dist/browser/{dimming-D9erakE3.js → dimming-DlZmx-1K.js} +12 -12
- package/dist/browser/{dist-BupLuz7e.js → dist-BdDsviM_.js} +5 -5
- package/dist/browser/{dist-Dy4ATR13.js → dist-CdnJXgLQ.js} +6 -6
- package/dist/browser/{dist-Dy3X0upa.js → dist-rHD2Byh5.js} +3 -3
- package/dist/browser/{efp-debug-init-DTmBNC1u.js → efp-debug-init-BOZR-MZ8.js} +3 -3
- package/dist/browser/{enum-editor-DS9Mi20y.js → enum-editor-lL5xlKz3.js} +4 -4
- package/dist/browser/{es5-TGy8TG8S.js → es5-DhCgP5nL.js} +2 -2
- package/dist/browser/{event-head-ccloCQPA.js → event-head-CqYUdk7Q.js} +1 -1
- package/dist/browser/{event-not-found-B4UzwYx9.js → event-not-found-14u2uW72.js} +3 -3
- package/dist/browser/{event-scoped-cache-Bo8Pi1bU.js → event-scoped-cache-4VLNCR8H.js} +3 -3
- package/dist/browser/{exports-DkrDN44T.js → exports-DSXxErgQ.js} +1 -1
- package/dist/browser/{favicon-BO6r3JQD.js → favicon-D6whTHsj.js} +1 -1
- package/dist/browser/{fetch-retry.umd-CBKWHeDp.js → fetch-retry.umd-B3VIxtnt.js} +2 -2
- package/dist/browser/{flex-DK-UWQj-.js → flex-5okWJr1_.js} +5 -5
- package/dist/browser/{floorplan.loader-C3iy3aV0.js → floorplan.loader-CljYdPZA.js} +15 -12
- package/dist/browser/{floorplan.ready-Dfo1nWhu.js → floorplan.ready-DARneMOb.js} +391 -343
- package/dist/browser/{freeBanner-C7xKlqKw.js → freeBanner-BTsjq9J7.js} +1 -1
- package/dist/browser/{fuse-BQcpTy7r.js → fuse-CTd7VmiI.js} +2 -2
- package/dist/browser/{i18n-D6Lq_Buf.js → i18n-ty_wUWap.js} +1545 -1505
- package/dist/browser/index.js +30 -30
- package/dist/browser/{index.module-BSoufRTU.js → index.module-DVrFe1_-.js} +4 -4
- package/dist/browser/{init-ui-1FfbXJGw.js → init-ui-Bf_4BNtY.js} +9 -9
- package/dist/browser/{integrateKiosk-D9Q6DLBE.js → integrateKiosk-DL-FmrLd.js} +5 -5
- package/dist/browser/{is-debug-COmQqgiL.js → is-debug-Dg1f1qEg.js} +4 -4
- package/dist/browser/{is-own-domain-DJo0J_LD.js → is-own-domain-Bwua_-Cv.js} +1 -1
- package/dist/browser/{is-webview-BBchBwKM.js → is-webview-CHHZG248.js} +1 -1
- package/dist/browser/{jsx-runtime-DL-d6MrM.js → jsx-runtime-CPbVnOif.js} +2 -2
- package/dist/browser/{kiosk-mode-_np8_B-l.js → kiosk-mode-C6HL6ORn.js} +5 -5
- package/dist/browser/{kiosk-record-BmaguqBS.js → kiosk-record-E9OZ9fPO.js} +1 -1
- package/dist/browser/{kioskApi-C07lc5Lj.js → kioskApi-A0TQDiJv.js} +7 -7
- package/dist/browser/{lib-DrLsicOU.js → lib-D1IzU3kb.js} +3 -3
- package/dist/browser/{loadImage-gvajvqmr.js → loadImage-Fksp-Hh0.js} +1 -1
- package/dist/browser/{logDeviceInfo-Dp6nkPPj.js → logDeviceInfo-BEoxvnRS.js} +9 -9
- package/dist/browser/{mobx-Dfa_Tj0c.js → mobx-DzuATIn9.js} +4 -4
- package/dist/browser/{mobx.module-ionKiiCb.js → mobx.module-BelF27Pq.js} +1 -1
- package/dist/browser/{optional-boolean-editor-IDS6OcC1.js → optional-boolean-editor-DcnuOuET.js} +3 -3
- package/dist/browser/{optional-enum-editor-CmHeQhFh.js → optional-enum-editor-67L67NRT.js} +4 -4
- package/dist/browser/{optional-string-editor-5lm4OVVA.js → optional-string-editor-CnrUBI2g.js} +4 -4
- package/dist/browser/{particles.min-Djywwk9n.js → particles.min-DnBqNG2y.js} +2 -2
- package/dist/browser/{react-DATIS1Wg.js → react-BOPKvk47.js} +2 -2
- package/dist/browser/{react-dom-CZoP3ON8.js → react-dom-BD7ySMzC.js} +3 -3
- package/dist/browser/{rolldown-runtime-C54u_qRI.js → rolldown-runtime-BwI4NOn9.js} +1 -1
- package/dist/browser/{scene-CR4jNFce.js → scene-BSoAQB2d.js} +2 -2
- package/dist/browser/{scheduler-B2SwSUg3.js → scheduler-ZrpHkws_.js} +2 -2
- package/dist/browser/{select-BXuAa5Mm.js → select-BFRUF-hZ.js} +10 -10
- package/dist/browser/{settings-DWSfrYuK.js → settings-EqgfAdEi.js} +2 -2
- package/dist/browser/{settings-item-Bg1kzAE-.js → settings-item-BU9GQrBS.js} +6 -6
- package/dist/browser/{store-DKFByqxw.js → store-BUNzBIiF.js} +2 -2
- package/dist/browser/{string-editor-CHJTsfW0.js → string-editor-BuUK2ak_.js} +4 -4
- package/dist/browser/{text-field-Daedvncr.js → text-field-BQjwPLRu.js} +5 -5
- package/dist/browser/{theme-hSwmbdBg.js → theme-DjlUzAi7.js} +8 -8
- package/dist/browser/{ui-BIFt_vYU.js → ui-ByszMEEN.js} +8 -8
- package/dist/browser/{useRenderTarget-Cf0eV2dg.js → useRenderTarget-WsArUlnF.js} +4 -4
- package/dist/browser/{viewport-Dvo8x5tc.js → viewport-BcluI_jS.js} +3 -3
- package/dist/browser/{wayfinding-UIwKgl3o.js → wayfinding-5qj-tuc0.js} +5 -5
- package/dist/esm/floorplan.loader.d.ts +2 -1
- package/dist/esm/floorplan.loader.js +1 -1
- package/dist/esm/floorplan.ready.d.ts +7 -6
- package/dist/esm/floorplan.ready.js +1 -1
- package/dist/esm/services/url-dispatch.js +1 -1
- package/dist/esm/store/SessionsFilterStore.d.ts +3 -0
- package/dist/esm/store/SessionsFilterStore.js +1 -1
- package/dist/esm/store/providers/SessionsShortcutProvider.d.ts +2 -3
- package/dist/esm/store/providers/SessionsShortcutProvider.js +1 -1
- package/dist/esm/types.d.ts +6 -1
- package/package.json +10 -10
|
@@ -1,16 +1,16 @@
|
|
|
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.44.0" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
6
|
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "12edc63f-e6e7-4dfc-9a76-31666c53718c", e._sentryDebugIdIdentifier = "sentry-dbid-12edc63f-e6e7-4dfc-9a76-31666c53718c");
|
|
7
7
|
} catch {}
|
|
8
8
|
})();
|
|
9
|
-
import { r as e } from "./rolldown-runtime-
|
|
10
|
-
import { t } from "./react-
|
|
11
|
-
import { t as n } from "./jsx-runtime-
|
|
12
|
-
import { c as r, l as i, t as a, u as o, y as s } from "./flex-
|
|
13
|
-
import { t as c } from "./classnames-
|
|
9
|
+
import { r as e } from "./rolldown-runtime-BwI4NOn9.js";
|
|
10
|
+
import { t } from "./react-BOPKvk47.js";
|
|
11
|
+
import { t as n } from "./jsx-runtime-CPbVnOif.js";
|
|
12
|
+
import { c as r, l as i, t as a, u as o, y as s } from "./flex-5okWJr1_.js";
|
|
13
|
+
import { t as c } from "./classnames-CmB5cw0K.js";
|
|
14
14
|
//#region ../../node_modules/.pnpm/@radix-ui+themes@3.3.0_@types+react-dom@19.2.3_@types+react@19.2.17__@types+react@19.2._5ea800d4e947acedb1fa1275f1697b17/node_modules/@radix-ui/themes/dist/esm/components/separator.props.js
|
|
15
15
|
var l = /* @__PURE__ */ e(t()), u = /* @__PURE__ */ e(c()), d = {
|
|
16
16
|
orientation: {
|
|
@@ -1,12 +1,12 @@
|
|
|
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.44.0" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
6
|
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "6d823a43-fa42-42af-9c05-a4ee303c909d", e._sentryDebugIdIdentifier = "sentry-dbid-6d823a43-fa42-42af-9c05-a4ee303c909d");
|
|
7
7
|
} catch {}
|
|
8
8
|
})();
|
|
9
|
-
import { o as e } from "./mobx.module-
|
|
9
|
+
import { o as e } from "./mobx.module-BelF27Pq.js";
|
|
10
10
|
//#region src/utils/swappable-proxy.ts
|
|
11
11
|
function t(e, t) {
|
|
12
12
|
let n = () => {
|
|
@@ -1,14 +1,14 @@
|
|
|
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.44.0" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
6
|
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "bae75e1e-5013-4517-a846-519e3920f180", e._sentryDebugIdIdentifier = "sentry-dbid-bae75e1e-5013-4517-a846-519e3920f180");
|
|
7
7
|
} catch {}
|
|
8
8
|
})();
|
|
9
|
-
import { t as e } from "./jsx-runtime-
|
|
10
|
-
import { t } from "./settings-item-
|
|
11
|
-
import { t as n } from "./text-field-
|
|
9
|
+
import { t as e } from "./jsx-runtime-CPbVnOif.js";
|
|
10
|
+
import { t } from "./settings-item-BU9GQrBS.js";
|
|
11
|
+
import { t as n } from "./text-field-BQjwPLRu.js";
|
|
12
12
|
//#region ../debug/src/lib/ui/string-editor.tsx
|
|
13
13
|
var r = e(), i = (e) => {
|
|
14
14
|
var i;
|
|
@@ -1,15 +1,15 @@
|
|
|
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.44.0" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
6
|
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "7cff17ce-12f6-438a-9ef4-00cf6a0b1475", e._sentryDebugIdIdentifier = "sentry-dbid-7cff17ce-12f6-438a-9ef4-00cf6a0b1475");
|
|
7
7
|
} catch {}
|
|
8
8
|
})();
|
|
9
|
-
import { r as e } from "./rolldown-runtime-
|
|
10
|
-
import { t } from "./react-
|
|
11
|
-
import { D as n, i as r, l as i, n as a, s as o, u as s, y as c } from "./flex-
|
|
12
|
-
import { t as l } from "./classnames-
|
|
9
|
+
import { r as e } from "./rolldown-runtime-BwI4NOn9.js";
|
|
10
|
+
import { t } from "./react-BOPKvk47.js";
|
|
11
|
+
import { D as n, i as r, l as i, n as a, s as o, u as s, y as c } from "./flex-5okWJr1_.js";
|
|
12
|
+
import { t as l } from "./classnames-CmB5cw0K.js";
|
|
13
13
|
//#region ../../node_modules/.pnpm/@radix-ui+themes@3.3.0_@types+react-dom@19.2.3_@types+react@19.2.17__@types+react@19.2._5ea800d4e947acedb1fa1275f1697b17/node_modules/@radix-ui/themes/dist/esm/components/text-field.props.js
|
|
14
14
|
var u = /* @__PURE__ */ e(t()), d = /* @__PURE__ */ e(l()), f = {
|
|
15
15
|
size: {
|
|
@@ -1,18 +1,18 @@
|
|
|
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.44.0" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
6
|
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "507523b1-aa12-4507-b680-c254edab8300", e._sentryDebugIdIdentifier = "sentry-dbid-507523b1-aa12-4507-b680-c254edab8300");
|
|
7
7
|
} catch {}
|
|
8
8
|
})();
|
|
9
|
-
import { r as e } from "./rolldown-runtime-
|
|
10
|
-
import { t } from "./react-
|
|
11
|
-
import { t as n } from "./jsx-runtime-
|
|
12
|
-
import { t as r } from "./react-dom-
|
|
13
|
-
import { C as i, E as a, O as o, T as s, _ as c, o as l, v as u, w as d } from "./flex-
|
|
14
|
-
import { c as f, i as p, n as m, o as h, r as g, s as _, t as v } from "./dist-
|
|
15
|
-
import { t as y } from "./classnames-
|
|
9
|
+
import { r as e } from "./rolldown-runtime-BwI4NOn9.js";
|
|
10
|
+
import { t } from "./react-BOPKvk47.js";
|
|
11
|
+
import { t as n } from "./jsx-runtime-CPbVnOif.js";
|
|
12
|
+
import { t as r } from "./react-dom-BD7ySMzC.js";
|
|
13
|
+
import { C as i, E as a, O as o, T as s, _ as c, o as l, v as u, w as d } from "./flex-5okWJr1_.js";
|
|
14
|
+
import { c as f, i as p, n as m, o as h, r as g, s as _, t as v } from "./dist-CdnJXgLQ.js";
|
|
15
|
+
import { t as y } from "./classnames-CmB5cw0K.js";
|
|
16
16
|
//#region ../../node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.3_@types+react-dom@19.2.3_@types+react@19.2.17__@ty_cffccd7838985066e8e1d993b5cb6017/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
|
|
17
17
|
var b = /* @__PURE__ */ e(r(), 1), x = /* @__PURE__ */ e(t(), 1), S = n(), C = Object.freeze({
|
|
18
18
|
position: "absolute",
|
|
@@ -1,17 +1,17 @@
|
|
|
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.44.0" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
6
|
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "c331f3d0-af7b-4caa-8d8a-4bf8b2b6fc89", e._sentryDebugIdIdentifier = "sentry-dbid-c331f3d0-af7b-4caa-8d8a-4bf8b2b6fc89");
|
|
7
7
|
} catch {}
|
|
8
8
|
})();
|
|
9
|
-
import { r as e } from "./rolldown-runtime-
|
|
10
|
-
import { a as t, i as n, s as r } from "./efp-debug-init-
|
|
11
|
-
import { a as i, i as a } from "./adopt-global-settings-
|
|
12
|
-
import { t as o } from "./jsx-runtime-
|
|
13
|
-
import "./settings-
|
|
14
|
-
import { t as s } from "./add-debug-secret-listener-
|
|
9
|
+
import { r as e } from "./rolldown-runtime-BwI4NOn9.js";
|
|
10
|
+
import { a as t, i as n, s as r } from "./efp-debug-init-BOZR-MZ8.js";
|
|
11
|
+
import { a as i, i as a } from "./adopt-global-settings-C22a3Tvl.js";
|
|
12
|
+
import { t as o } from "./jsx-runtime-CPbVnOif.js";
|
|
13
|
+
import "./settings-EqgfAdEi.js";
|
|
14
|
+
import { t as s } from "./add-debug-secret-listener-D9NQY30D.js";
|
|
15
15
|
//#region ../debug/src/lib/ui/render-debug-ui.tsx
|
|
16
16
|
var c = /* @__PURE__ */ e(r(), 1), l = o(), u = !1;
|
|
17
17
|
function d() {
|
|
@@ -26,7 +26,7 @@ function d() {
|
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
28
|
let o = async (t) => {
|
|
29
|
-
let { DebugUi: n } = await import("./debug-ui-
|
|
29
|
+
let { DebugUi: n } = await import("./debug-ui-DGsyoqbw.js"), { createRoot: i } = await import("./client-D8KwRQSF.js").then((t) => /* @__PURE__ */ e(t.t(), 1)), a = document.createElement("div");
|
|
30
30
|
document.body.appendChild(a), i(a).render(/* @__PURE__ */ (0, l.jsx)(n, {
|
|
31
31
|
useDebugButtonState: r.useState,
|
|
32
32
|
open: t
|
|
@@ -1,14 +1,14 @@
|
|
|
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.44.0" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
6
|
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "1e89fc3a-fa3d-42bb-94d8-f0f786d433ec", e._sentryDebugIdIdentifier = "sentry-dbid-1e89fc3a-fa3d-42bb-94d8-f0f786d433ec");
|
|
7
7
|
} catch {}
|
|
8
8
|
})();
|
|
9
|
-
import { r as e } from "./rolldown-runtime-
|
|
10
|
-
import { t } from "./react-
|
|
11
|
-
import { u as n } from "./store-
|
|
9
|
+
import { r as e } from "./rolldown-runtime-BwI4NOn9.js";
|
|
10
|
+
import { t } from "./react-BOPKvk47.js";
|
|
11
|
+
import { u as n } from "./store-BUNzBIiF.js";
|
|
12
12
|
//#region ../ui/src/shared/activeElement.ts
|
|
13
13
|
var r = (e) => !!e && "activeElement" in e;
|
|
14
14
|
function i(e) {
|
|
@@ -1,13 +1,13 @@
|
|
|
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.44.0" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
6
|
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "7b7670aa-abfd-4bfe-be48-1566da5bbb44", e._sentryDebugIdIdentifier = "sentry-dbid-7b7670aa-abfd-4bfe-be48-1566da5bbb44");
|
|
7
7
|
} catch {}
|
|
8
8
|
})();
|
|
9
|
-
import { l as e } from "./store-
|
|
10
|
-
import { t } from "./LayerStore-
|
|
9
|
+
import { l as e } from "./store-BUNzBIiF.js";
|
|
10
|
+
import { t } from "./LayerStore-XE8pPWIM.js";
|
|
11
11
|
//#region src/components/Map/viewport.ts
|
|
12
12
|
function n(e) {
|
|
13
13
|
return {
|
|
@@ -1,15 +1,15 @@
|
|
|
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.44.0" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
6
|
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "d0fd9aca-06ea-42f4-8cae-70b74bc88ff4", e._sentryDebugIdIdentifier = "sentry-dbid-d0fd9aca-06ea-42f4-8cae-70b74bc88ff4");
|
|
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 { Bt as a, Ft as o, Gt as s, Ht as c, Kt as l, Ot as u, Rt as d, Vt as f, Wt as p, Z as m, _t as h, bt as g, ft as _, gt as v, ht as y, kt as b, pt as x, qt as S, st as C, yt as ee } from "./LayerStore-
|
|
9
|
+
import { r as e, t } from "./rolldown-runtime-BwI4NOn9.js";
|
|
10
|
+
import { o as n } from "./is-debug-Dg1f1qEg.js";
|
|
11
|
+
import { i as r, l as i } from "./mobx.module-BelF27Pq.js";
|
|
12
|
+
import { Bt as a, Ft as o, Gt as s, Ht as c, Kt as l, Ot as u, Rt as d, Vt as f, Wt as p, Z as m, _t as h, bt as g, ft as _, gt as v, ht as y, kt as b, pt as x, qt as S, st as C, yt as ee } from "./LayerStore-XE8pPWIM.js";
|
|
13
13
|
//#region ../geometry/src/lib/geo.ts
|
|
14
14
|
var w = 6371e3;
|
|
15
15
|
function T(e, t) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Consent } from '@expofp/config';
|
|
2
|
-
import { type Camera, type ListPanel, type PlannerOptions } from '@expofp/schema';
|
|
2
|
+
import { type Camera, type ListPanel, type PlannerOptions, type SessionsFilters } from '@expofp/schema';
|
|
3
3
|
import { type InternalSettings } from './internal-settings.js';
|
|
4
4
|
import type { CurrentPosition, Floor, FloorPlan, FloorPlanBookmarkClickEvent, FloorPlanBoothClickEvent, FloorPlanCategory, FloorPlanCustomButtonEvent, FloorPlanDetailsEvent, FloorPlanDirectionEvent, FloorPlanGetCoordsEvent, FloorPlanIcon, FloorPlanMarkerEvent, FloorPlanOptions, FloorPlanVisitedClickEvent, GeoConfig, MaplibreOptions, MarkersData, RouteInfo, RouteWaypoint, Visibility } from './types';
|
|
5
5
|
import { type Bounds, type POISelectors } from './types/sdk.types';
|
|
@@ -86,6 +86,7 @@ export default class FloorPlanLoader implements FloorPlan {
|
|
|
86
86
|
selectCategory(nameOrSlug?: string): void;
|
|
87
87
|
select(slugOrExternalId: string): void;
|
|
88
88
|
showList(list: ListPanel): void;
|
|
89
|
+
showSessions(filters?: SessionsFilters): void;
|
|
89
90
|
selectTour(tourId: string): void;
|
|
90
91
|
openPlanner(options?: PlannerOptions): void;
|
|
91
92
|
startBuildRoute(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getConfig as C}from"@expofp/config";import{PREVIEW_MODE_ATTRIBUTE as M}from"./constants";import{toInternalSettings as T}from"./internal-settings.js";import{disposePlan as A}from"./plan-lifecycle.js";import d from"./tools/base-runtime-url";import{loadCss as S,loadFont as p}from"./tools/loaders";import _ from"./tools/logger";import{resetGlobalVariables as V}from"./tools/reset";import{initSentry as H}from"./tools/sentry";import{parkRegisteredStyles as z}from"./tools/style-registry.js";import{heatmapEnabled as G}from"./utils/heatmap-enabled";import{initI18n as N}from"./utils/i18n";import Y from"./utils/is-debug";import Q from"./utils/is-localhost";import x from"./utils/is-webview";import{loadCustomCss as W}from"./utils/loadCustomCss";import{loadIcons as K}from"./utils/loadIcons";import E from"./utils/use-shadow";function e(){throw new Error("FloorPlan not ready")}export const DESTROYED_BEFORE_READY="FloorPlan destroyed before it finished loading";export default class ${get ready(){return this._ready}get previewMode(){return C().previewMode||this.element.hasAttribute(M)}get allowConsent(){return this.consent==="ask"?void 0:this.consent==="granted"}getInternalSettings(){return T(C())}selectBooth(t){e()}selectExhibitor(t){e()}selectRoute(t,s){e()}getOptimizedRoutes(t){e()}selectCurrentPosition(t,s,a){e()}setBookmarks(t){e()}setEntitiesBookmarks(t){e()}setEntitiesVisited(t){e()}setMarkers(t){e()}updateLayerVisibility(t,s){e()}getCenterCoordinates(){e()}applyParameters(t){e()}exhibitorsList(){e()}boothsList(){e()}categoriesList(){e()}selectCategory(t){e()}select(t){e()}showList(t){e()}selectTour(t){e()}openPlanner(t){e()}startBuildRoute(){e()}getVisibility(){e()}setVisibility(t){e()}findLocation(){e()}zoomIn(){e()}zoomOut(){e()}zoomTo(t,s){e()}switchView(){e()}setCamera(t){e()}getCamera(){e()}fitBounds(){e()}getBounds(t){e()}getBoothRect(t){e()}convertToGeo(t,s){e()}getGeoConfig(){e()}destroy(){if(!this.destroyed){this.destroyed=!0,this.rejectReady(new Error(DESTROYED_BEFORE_READY));try{this.releaseResources()}finally{A()}}}unstable_destroy(){this.destroy()}releaseResources(){for(window.removeEventListener("__efpStyleLoad",this.efpStyleLoadHandler),z();this.element.firstChild;)this.element.removeChild(this.element.firstChild);delete this.element.__expofp,V()}highlightExhibitors(t){e()}highlightBooths(t){e()}onCurrentPositionChanged(t){e()}search(t){e()}getFloors(){e()}onFloorActivated(t){e()}activateFloor(t){e()}showPathway(t,s){e()}showPathwayOnly(t,s){e()}hidePathways(){e()}showSearch(){e()}changeLanguage(t){e()}isGpsTrackingEnabled(){e()}setGpsTrackingEnabled(t){e()}deselectCurrentPosition(){e()}deselectRoute(){e()}reset(){e()}selectAccessibleRoute(t){e()}constructor(t,s){this.resolveReady=()=>{},this.rejectReady=()=>{},this.icons=new Map,this.enableRotation=!0,this.alwaysShowSidebar=!1,this.destroyed=!1;const a=C();this.noOverlay=!!a.noOverlay,this.offHistory=!!a.offHistory,this.ignoreQuery=a.ignoreQuery,this.consent=a.consent,this.consent==="ask"&&(x?this.consent="granted":Q&&!Y&&(this.consent="denied")),this.onBoothClick=t.onBoothClick,this.onBookmarkClick=t.onBookmarkClick,this.onVisitedClick=t.onVisitedClick,this.onCategoryClick=t.onCategoryClick,this.onDetails=t.onDetails,this.onExhibitorCustomButtonClick=t.onExhibitorCustomButtonClick,this.onGetCoordsClick=t.onGetCoordsClick,this.onMarkerClick=t.onMarkerClick,this.onFpConfigured=t.onFpConfigured,this.onDirection=t.onDirection,this.onInit=t.onInit,this.onCurrentPositionChanged=t.onCurrentPositionChanged,this.onFloorActivated=t.onFloorActivated,this.onLeaveEvent=t.onLeaveEvent,this.viewerMode=!!a.viewerMode,this.disableRuntimeAlerts=a.disableRuntimeAlerts,this.maplibre=a.maplibre,window.__efpMaplibre=a.maplibre,this._ready=new Promise((
|
|
1
|
+
import{getConfig as C}from"@expofp/config";import{PREVIEW_MODE_ATTRIBUTE as M}from"./constants";import{toInternalSettings as T}from"./internal-settings.js";import{disposePlan as A}from"./plan-lifecycle.js";import d from"./tools/base-runtime-url";import{loadCss as S,loadFont as p}from"./tools/loaders";import _ from"./tools/logger";import{resetGlobalVariables as V}from"./tools/reset";import{initSentry as H}from"./tools/sentry";import{parkRegisteredStyles as z}from"./tools/style-registry.js";import{heatmapEnabled as G}from"./utils/heatmap-enabled";import{initI18n as N}from"./utils/i18n";import Y from"./utils/is-debug";import Q from"./utils/is-localhost";import x from"./utils/is-webview";import{loadCustomCss as W}from"./utils/loadCustomCss";import{loadIcons as K}from"./utils/loadIcons";import E from"./utils/use-shadow";function e(){throw new Error("FloorPlan not ready")}export const DESTROYED_BEFORE_READY="FloorPlan destroyed before it finished loading";export default class ${get ready(){return this._ready}get previewMode(){return C().previewMode||this.element.hasAttribute(M)}get allowConsent(){return this.consent==="ask"?void 0:this.consent==="granted"}getInternalSettings(){return T(C())}selectBooth(t){e()}selectExhibitor(t){e()}selectRoute(t,s){e()}getOptimizedRoutes(t){e()}selectCurrentPosition(t,s,a){e()}setBookmarks(t){e()}setEntitiesBookmarks(t){e()}setEntitiesVisited(t){e()}setMarkers(t){e()}updateLayerVisibility(t,s){e()}getCenterCoordinates(){e()}applyParameters(t){e()}exhibitorsList(){e()}boothsList(){e()}categoriesList(){e()}selectCategory(t){e()}select(t){e()}showList(t){e()}showSessions(t){e()}selectTour(t){e()}openPlanner(t){e()}startBuildRoute(){e()}getVisibility(){e()}setVisibility(t){e()}findLocation(){e()}zoomIn(){e()}zoomOut(){e()}zoomTo(t,s){e()}switchView(){e()}setCamera(t){e()}getCamera(){e()}fitBounds(){e()}getBounds(t){e()}getBoothRect(t){e()}convertToGeo(t,s){e()}getGeoConfig(){e()}destroy(){if(!this.destroyed){this.destroyed=!0,this.rejectReady(new Error(DESTROYED_BEFORE_READY));try{this.releaseResources()}finally{A()}}}unstable_destroy(){this.destroy()}releaseResources(){for(window.removeEventListener("__efpStyleLoad",this.efpStyleLoadHandler),z();this.element.firstChild;)this.element.removeChild(this.element.firstChild);delete this.element.__expofp,V()}highlightExhibitors(t){e()}highlightBooths(t){e()}onCurrentPositionChanged(t){e()}search(t){e()}getFloors(){e()}onFloorActivated(t){e()}activateFloor(t){e()}showPathway(t,s){e()}showPathwayOnly(t,s){e()}hidePathways(){e()}showSearch(){e()}changeLanguage(t){e()}isGpsTrackingEnabled(){e()}setGpsTrackingEnabled(t){e()}deselectCurrentPosition(){e()}deselectRoute(){e()}reset(){e()}selectAccessibleRoute(t){e()}constructor(t,s){this.resolveReady=()=>{},this.rejectReady=()=>{},this.icons=new Map,this.enableRotation=!0,this.alwaysShowSidebar=!1,this.destroyed=!1;const a=C();this.noOverlay=!!a.noOverlay,this.offHistory=!!a.offHistory,this.ignoreQuery=a.ignoreQuery,this.consent=a.consent,this.consent==="ask"&&(x?this.consent="granted":Q&&!Y&&(this.consent="denied")),this.onBoothClick=t.onBoothClick,this.onBookmarkClick=t.onBookmarkClick,this.onVisitedClick=t.onVisitedClick,this.onCategoryClick=t.onCategoryClick,this.onDetails=t.onDetails,this.onExhibitorCustomButtonClick=t.onExhibitorCustomButtonClick,this.onGetCoordsClick=t.onGetCoordsClick,this.onMarkerClick=t.onMarkerClick,this.onFpConfigured=t.onFpConfigured,this.onDirection=t.onDirection,this.onInit=t.onInit,this.onCurrentPositionChanged=t.onCurrentPositionChanged,this.onFloorActivated=t.onFloorActivated,this.onLeaveEvent=t.onLeaveEvent,this.viewerMode=!!a.viewerMode,this.disableRuntimeAlerts=a.disableRuntimeAlerts,this.maplibre=a.maplibre,window.__efpMaplibre=a.maplibre,this._ready=new Promise((c,i)=>{this.resolveReady=c,this.rejectReady=i}),this._ready.catch(()=>{}),this.element=s;const R=s;if(R.__expofp)throw new Error("Element already in use");R.__expofp=this;const g=a.expo;H({eventId:g||"",isWebview:x}),this.eventId=g,window.__efpEvent=g,window.__efpElement=s;const w=document.createElement("div");w.style.height="100%",w.style.width="100%",s.appendChild(w);let n;if(E){n=w.attachShadow({mode:"open"});const c=n,i=document;c.createElement=(...r)=>i.createElement(...r),c.createElementNS=(...r)=>i.createElementNS(...r),c.createTextNode=(...r)=>i.createTextNode(...r)}else n=w;const y=document.createElement("div");y.style.height="100%",y.style.width="100%",n.appendChild(y),E&&Object.defineProperty(y,"ownerDocument",{value:n}),window.__efpShadowDOMStyleParent=E?n:void 0,this.renderTarget=y,_.log("Instantiating ExpoFP floorplan",s,g);let k=0;this.efpStyleLoadHandler=function(c){const i=window.__efpStyleElements??[];for(;k<i.length;){const r=i[k];n.appendChild(r),k++}},window.addEventListener("__efpStyleLoad",this.efpStyleLoadHandler),this.efpStyleLoadHandler();const h=this;(async function(){const i=C();if(await N(),h.destroyed)return;const r=new URLSearchParams(window.location.search);let m,f;if(i?.trackerUrl)try{m=new URL(i.trackerUrl),f=m.searchParams.get("expoId")}catch(o){console.error(o)}const I=async o=>{if(!m||!f)return Promise.reject(new Error("trackerUrl or expoId is missing"));const l=new URL(o.dataUrl,m.origin),u=await fetch(l.toString(),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({expoId:f,token:decodeURIComponent(r.get("t")??"")})});let b=[];u.ok&&(b=(await u.json()).map(o.dataMapper)),window.__heatmapDataYah={yah:b}},v=i?.heatmap??{},L=G(v)||r.get("heatmap")==="true",O=v.variant==="yah"||r.get("type")==="yah",U=v.kiosk===!0||r.get("subtype")==="kiosk";if(L)try{if(O)U?await I({dataUrl:"/api/kiosks/list/viewer",dataMapper:o=>({...o,id:o.key,name:`Kiosk ${o.key}`})}):await I({dataUrl:"/api/v1/you-are-here/qr-code/list/viewer",dataMapper:(o,l)=>({...o,name:`QR Code #${l+1}`})});else{if(!m||!f)throw new Error("trackerUrl or expoId is missing");const o=new URL("/api/fp-stats/get",m.origin);o.searchParams.set("expoId",f),o.searchParams.set("type","booview"),o.searchParams.set("t",decodeURIComponent(r.get("t")??""));const l=new URL("api/fp-stats/get",m.origin);l.searchParams.set("expoId",f),l.searchParams.set("type","exview"),l.searchParams.set("t",decodeURIComponent(r.get("t")??""));const[u,b]=await Promise.all([fetch(o.toString()),fetch(l.toString())]),[P,F]=await Promise.all([u.json(),b.json()]);window.__heatmapData={booths:P,exhibitors:F}}}catch(o){console.error("Heatmap: Initialization error",o)}const B=[S(d+"vendor/sanitize-css/sanitize.css",n),S(d+"vendor/perfect-scrollbar/css/perfect-scrollbar.css",n),p("Oswald",d+"fonts/oswald-v17-cyrillic_latin-300.woff",{weight:300}),p("Oswald",d+"fonts/oswald-v17-cyrillic_latin-500.woff",{weight:500}),p("Inter",d+"fonts/inter-400.woff2",{weight:400}),p("Inter",d+"fonts/inter-500.woff2",{weight:500}),p("Inter",d+"fonts/inter-600.woff2",{weight:600}),p("efp-symbols",d+"fonts/efp-symbols.woff",{weight:400}),W(i,n),K(h.icons)];if(await Promise.all(B),h.destroyed)return;h.enableRotation=i?.enableRotation??!1,h.alwaysShowSidebar=i?.alwaysShowSidebar??!1,_.log("Data loaded");const{createLivePlan:D}=await import("./store/create-live-plan.js"),{default:j}=await import("./floorplan.ready.js");if(h.destroyed)return;D(),Object.setPrototypeOf(h,j.prototype).init()})()}}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Box } from '@expofp/geometry';
|
|
2
|
-
import { type Camera, type ListPanel, type PlannerOptions } from '@expofp/schema';
|
|
2
|
+
import { type Camera, type ListPanel, type PlannerOptions, type SessionsFilters } from '@expofp/schema';
|
|
3
3
|
import { createRoot } from 'react-dom/client';
|
|
4
4
|
import FloorPlanLoader from './floorplan.loader';
|
|
5
|
-
import { CurrentPosition, MarkersData } from './store/RouteStore';
|
|
6
|
-
import { Visibility } from './store/types';
|
|
7
|
-
import type { GeoConfig } from './types';
|
|
8
|
-
import { Bounds, POISelectors } from './types/sdk.types';
|
|
5
|
+
import { type CurrentPosition, type MarkersData } from './store/RouteStore';
|
|
6
|
+
import { type Visibility } from './store/types';
|
|
7
|
+
import type { Floor, FloorPlanBooth, FloorPlanCategory, FloorPlanExhibitor, FloorPlanGetCoordsEvent, GeoConfig, RouteInfo, RouteWaypoint } from './types';
|
|
8
|
+
import { type Bounds, type POISelectors } from './types/sdk.types';
|
|
9
9
|
export default class FloorPlanReady extends FloorPlanLoader {
|
|
10
|
-
root
|
|
10
|
+
root?: ReturnType<typeof createRoot>;
|
|
11
11
|
protected init(): void;
|
|
12
12
|
selectBooth(nameOrExternalId: string | string[]): void;
|
|
13
13
|
selectExhibitor(nameOrExternalId: string | string[]): void;
|
|
@@ -51,6 +51,7 @@ export default class FloorPlanReady extends FloorPlanLoader {
|
|
|
51
51
|
selectCategory(nameOrSlug?: string): void;
|
|
52
52
|
select(slugOrExternalId: string): void;
|
|
53
53
|
showList(list: ListPanel): void;
|
|
54
|
+
showSessions(filters?: SessionsFilters): void;
|
|
54
55
|
selectTour(tourId: string): void;
|
|
55
56
|
openPlanner(options?: PlannerOptions): void;
|
|
56
57
|
startBuildRoute(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Fragment as T,jsx as x,jsxs as I}from"react/jsx-runtime";import{Box as P}from"@expofp/geometry";import{CameraSchema as M}from"@expofp/schema";import{optimizeWaypointOrder as R}from"@expofp/wayfinding";import{ErrorBoundary as $}from"@sentry/react";import V from"debug";import{reaction as z}from"mobx";import{createRoot as j}from"react-dom/client";import{install as G}from"resize-observer";import N from"./components/Layout";import{bindBoothHitTest as q}from"./components/Map/booth-by-xy.js";import{MAX_ROUTE_WAYPOINTS as d}from"./constants";import O from"./data";import{getFpGeo as w}from"./data/fpGeo.js";import D from"./floorplan.loader";import{shouldLoadIntercom as Y}from"./intercom";import{registerPlanDisposer as b}from"./plan-lifecycle.js";import{BoundsSchema as H,POISelectorsSchema as B,ZoomToOptionsSchema as k}from"./schemas/sdk.schemas";import{applyDeclarativeConfig as U,applyParameters as W,applyPathway as X,initUrlRouting as K}from"./services/url-dispatch";import r from"./store";import{bindDetailsEvents as Q}from"./store/details-events";import{bindRootElement as Z}from"./store/init/init-ui.js";import{findBooth as S,Route as v,separateExternalIds as F}from"./store/RouteStore";import{GaEventActions as C,initGtag as J,sendEventToGa as A,setConsentSettings as _}from"./tools/gtag.js";import ee from"./tools/track-event.js";import{cameraToMapSettings as te,mapSettingsToCamera as re}from"./utils/camera-map-settings";import{getStorage as L}from"./utils/entity-storage";import{getMostFrequent as oe}from"./utils/getMostFrequent";import{convertLocalToGps as ie,isValidPointCoords as y}from"./utils/gps";import{getLocales as se,hasLocale as ne,setLocale as ae}from"./utils/i18n";import{mapEntity as g}from"./utils/mapEntity";const p=V("efp:api");G();export default class he extends D{init(){J(),U(),this.ignoreQuery||K(this.offHistory),ee("load"),Z(r),r.fp=this,b(Q()),q(),_(this.consent),A(C.Load,""),this.root=j(this.renderTarget),this.root.render(x($,{children:x(N,{offHistory:this.offHistory,consent:this.consent})})),A(C.Rendered,""),b(z(()=>r.layerStore.layersLoaded,()=>{const t=this.renderTarget.getRootNode(),o=t instanceof ShadowRoot?t.host:this.renderTarget.parentElement;for(document.querySelectorAll(".expofp-floorplan-loader").forEach(s=>s.remove());o&&this.element.firstChild&&this.element.firstChild!==o;)this.element.removeChild(this.element.firstChild);this.resolveReady(),r.initialized||this.onInit?.(this),r.initialized=!0})),b(()=>clearTimeout(E));const e=Y(O);e&&import("./intercom/bootIntercom").then(({bootIntercom:t})=>t(e)).catch(()=>{})}selectBooth(e){if(typeof e!="string"&&!Array.isArray(e)){a("selectBooth","Parameter must be a string or an array of strings.","EFP000000");return}const t=r.boothStore.booths.filter(o=>typeof e=="string"?o.name===e||o.externalId===e:e.includes(o.name)||e.includes(o.externalId));r.selectBooth(t)}selectExhibitor(e){if(typeof e!="string"&&!Array.isArray(e)){a("selectExhibitor","Parameter must be a string or an array of strings.","EFP000100");return}if(!e?.length){r.uiState.menu=!1,r.searchStore.resetSearchBox(),r.uiState.details=null;return}const t=r.exhibitorStore.exhibitors.filter(n=>typeof e=="string"?n.name===e||n.externalId===e:e.includes(n.name)||e.includes(n.externalId));if(!t?.length)return;if(typeof e=="string"){r.selectExhibitor(t[0]),r.moveToList([t[0]]);return}const o=t.flatMap(n=>n.booths.map(i=>i.layer)),s=oe(o.map(n=>n.description));s&&r.layerStore.updateVisibility(s,!0),r.uiState.menu=!1,r.searchStore.resetSearchBox(),r.uiState.details=null,r.uiState.list={type:"filter",items:t,query:{key:"exhibitors",value:t.map(n=>n.name).join(",")}},r.moveToList()}highlightExhibitors(e){Array.isArray(e)||a("highlightExhibitors","Parameter must be an array of strings.","EFP000200"),r.boothStore.highlightedByExternalIds=[],r.exhibitorStore.highlightedByExternalIds=[...e]}highlightBooths(e){Array.isArray(e)||a("highlightBooths","Parameter must be an array of strings.","EFP000300"),r.exhibitorStore.highlightedByExternalIds=[],r.boothStore.highlightedByExternalIds=[...e]}highlightEntities(e){Array.isArray(e)||a("highlightEntities","Parameter must be an array of strings.","EFP000400");const{boothExternalIds:t,exhibitorExternalIds:o}=F(e);r.boothStore.highlightedByExternalIds=[...t],r.exhibitorStore.highlightedByExternalIds=[...o]}selectRoute(e,t){if(Array.isArray(e)){let o=[...e];const s=o.shift(),n=o.pop();if(o.length>d)throw new Error(`The maximum number of waypoints is ${d}.`);if(!s||!n){a("selectRoute","Invalid route format: When providing an array, it must include at least two points: a start and a destination.","EFP000401");return}r.routeStore.selectRoute(new v(m(s),m(n),o.map(m)));return}e||a("selectRoute","At a minimum, the starting point must be passed.","EFP000402"),r.routeStore.selectRoute(new v(m(e),m(t)))}getOptimizedRoutes(e){if(!Array.isArray(e))return a("getOptimizedRoutes","Parameter must be an array.","EFP000500"),[];if(e.length>d)throw new Error(`The maximum number of waypoints is ${d}.`);const t=e.map(m).filter(s=>!!s);if(!t.length)throw new Error("No booths found for the provided waypoints.");const o=new Map;for(const s of t){const n=s.layer?.name??"",i=o.get(n);i?i.push(s):o.set(n,[s])}return Array.from(o.values()).map(s=>({waypoints:R(s.map(n=>[n.name,{x:n.rect.center.x,y:n.rect.center.y}]))}))}selectCurrentPosition(e,t,o){const s=y(e.x)&&y(e.y),n=y(e.lng)&&y(e.lat);!s&&!n&&a("selectCurrentPosition","A point must be passed. Either (x,y) or (lat,lng) are required.","EFP000600"),r.routeStore.selectCurrentPosition(e,t,o),this.onCurrentPositionChanged?.(e)}setBookmarks(e){(!Array.isArray(e)||!e.length)&&a("setBookmarks","Parameter must be an array.","EFP000700"),e.forEach(t=>{const o=r.exhibitorStore.exhibitors.find(s=>s.name===t.name||s.externalId===t.externalId);o&&(o.bookmarked=t.bookmarked)})}setEntitiesBookmarks(e){if(!Array.isArray(e)||!e.length){a("setEntitiesBookmarks","Parameter must be an array.","EFP000701");return}const t=["exhibitor","event","speaker","booth"],o=e.find(i=>!i.type||!t.includes(i.type));if(o){a("setEntitiesBookmarks",`Invalid entity type: ${o.type}. Must be one of: ${t.join(", ")}.`,"EFP000702");return}const s=L("bookmarked"),n={exhibitor:{existingIds:new Set(s.exhibitors||[]),finder:i=>r.exhibitorStore.findExhibitor(i),replacer:i=>r.exhibitorStore.replaceBookmarked(i)},event:{existingIds:new Set(s.events||[]),finder:i=>r.eventStore.findByNameOrSlug(i),replacer:i=>r.eventStore.replaceBookmarked(i)},speaker:{existingIds:new Set(s.speakers||[]),finder:i=>r.speakerStore.speakers.find(h=>h.name===i||h.externalId===i||h.slug===i),replacer:i=>r.speakerStore.replaceBookmarked(i)},booth:{existingIds:new Set(s.booths||[]),finder:i=>{const h=r.boothStore.findBooth(i);return h?.exhibitors.length===0?h:void 0},replacer:i=>r.boothStore.replaceBookmarked(i)}};e.forEach(i=>{const h=n[i.type],u=i.name||i.externalId||"",c=h.finder(u);c?i.bookmarked?h.existingIds.add(c.id):h.existingIds.delete(c.id):console.warn(`Entity not found: ${i.type} with query "${u}"`)}),Object.values(n).forEach(i=>{i.replacer(Array.from(i.existingIds))})}setEntitiesVisited(e){if(!Array.isArray(e)||!e.length){a("setEntitiesVisited","Parameter must be an array.","EFP000703");return}const t=["exhibitor","event"],o=e.find(i=>!i.type||!t.includes(i.type));if(o){a("setEntitiesVisited",`Invalid entity type: ${o.type}. Must be one of: ${t.join(", ")}.`,"EFP000704");return}const s=L("visited"),n={exhibitor:{existingIds:new Set(s.exhibitors||[]),finder:i=>r.exhibitorStore.findExhibitor(i),replacer:i=>r.exhibitorStore.replaceVisited(i)},event:{existingIds:new Set(s.events||[]),finder:i=>r.eventStore.findByNameOrSlug(i),replacer:i=>r.eventStore.replaceVisited(i)}};e.forEach(i=>{const h=n[i.type],u=i.name||i.externalId||"",c=h.finder(u);c?i.visited?h.existingIds.add(c.id):h.existingIds.delete(c.id):console.warn(`Entity not found: ${i.type} with query "${u}"`)}),Object.values(n).forEach(i=>{i.replacer(Array.from(i.existingIds))})}setMarkers(e){if(!e||!Array.isArray(e.icons)||!Array.isArray(e.markers)){a("setMarkers","Invalid input.","EFP000800");return}r.routeStore.setMarkers(e)}selectMarker(e,t=!0){return typeof e!="string"&&a("selectMarker","The identifier must be passed.","EFP000900"),r.routeStore.selectMarker(e,t)}drawCircles(e){Array.isArray(e)||a("drawCircles","Invalid input.","EFP000A00"),r.uiState.debugCircles=e}checkRoutes(){r.routeStore.checkRoutes()}updateLayerVisibility(e,t){typeof e!="string"&&a("updateLayerVisibility","The layer name (string) must be passed.","EFP000B00"),t||a("updateLayerVisibility","Passing a false value to visible will have no effect.","EFP000B01"),r.layerStore.updateVisibility(e,t)}getCenterCoordinates(){return r.fp.getCenterCoordinates()}exhibitorsList(){return r.exhibitorStore.exhibitors.map(e=>g(e))}boothsList(){return r.boothStore.booths.map(e=>g(e))}categoriesList(){return r.categoryStore.categories.map(e=>g(e))}selectCategory(e){if(e==null||typeof e!="string"){r.searchStore.selectSearch();return}const t=e?.toLowerCase(),o=r.categoryStore.categories.find(({name:s,slug:n})=>s?.toLowerCase()===t||n?.toLowerCase()===t);if(!o){a("selectCategory",`Category ${e} not found.`,"EFP000C01");return}r.selectCategory(o)}select(e){if(typeof e!="string"){a("select","Parameter must be a string.","EFP001700");return}const t=e,o=t?.toLowerCase(),s=r.boothStore.booths.find(c=>c.slug?.toLowerCase()===o||c.externalId?.toLowerCase()===o||c.externalId?.toLowerCase()?.replace(/\s+/g,"")===o);if(s){setTimeout(()=>r.selectBooth(s),250);return}const n=r.eventStore.eventItems.find(c=>c.slug?.toLowerCase()===o||c.externalId?.toLowerCase()===o);if(n){r.selectEventItem(n,!0);return}const i=r.exhibitorStore.exhibitors.find(c=>c.slug?.toLowerCase()===o||c.externalId?.toLowerCase()===o);if(i){setTimeout(()=>r.clickExhibitor(i),250);return}const h=r.categoryStore.categories.find(c=>c.slug===t);if(h){r.selectCategory(h);return}const u=r.speakerStore.findBySlug(t);if(u){r.selectSpeaker(u,!0);return}t.includes("heatmap=true")||r.searchStore.selectSearch(t)}showList(e){const t={bookmarks:()=>r.selectBookmarks(),visited:()=>r.selectVisited(),sessions:()=>r.selectSessions(),exhibitors:()=>r.selectExhibitors(),speakers:()=>r.selectSpeakers(),tours:()=>r.selectTours(),language:()=>r.selectLanguage()},o=t[e];if(!o){a("showList",`Unknown list "${e}". Must be one of: ${Object.keys(t).join(", ")}.`,"EFP001800");return}o()}selectTour(e){if(typeof e!="string"||!e){a("selectTour","A tour id must be passed.","EFP001900");return}const t=r.toursStore.getTourById(e);t?r.toursStore.launchTour(t,t.name,t.description):(console.warn(`Route with id "${e}" not found`),r.selectTours())}openPlanner(e={}){if(typeof e!="object"||e===null){a("openPlanner","An options object must be passed.","EFP001A00");return}const t=e.from?S(e.from):null;e.fromBookmarks?r.routePlannerStore.launchFromBookmarks(t??void 0):r.routePlannerStore.launchFromSlugs(e.items??[],t??void 0)}startBuildRoute(){r.uiState.startBuildRoute()}applyParameters(e){typeof e!="string"&&a("applyParameters","A query string must be passed.","EFP000D00"),W(e)}getVisibility(){return r.uiState.visibility}setVisibility(e){(typeof e!="object"||!Object.keys(e).length)&&a("setVisibility","The parameter must be passed.","EFP000E00"),r.uiState.setVisibility(e)}findLocation(){r.routeStore.findLocation()}zoomIn(){r.uiState.zoomIn()}zoomOut(){r.uiState.zoomOut()}switchView(){r.maplibreStore.activateMaplibre()}setCamera(e){p("setCamera called with camera=%O",e);const t=M.safeParse(e);if(!t.success){a("setCamera",t.error.message,"EFP001B00");return}r.uiState.setMapSettings(te(t.data))}getCamera(){return re(r.uiState.mapSettings)}zoomTo(e,t){p("zoomTo called with selectors=%O options=%O",e,t);const o=B.safeParse(e);if(!o.success){a("zoomTo",o.error.message,"EFP001600");return}const s=k.safeParse(t);if(!s.success){a("zoomTo",s.error.message,"EFP001601");return}const n=this.getBounds(e);n&&this.fitBounds(n,t)}getBounds(e){p("getBounds called with selectors=%O",e);const t=B.safeParse(e);if(!t.success){a("getBounds",t.error.message,"EFP001400");return}const o=[];if(e.booths?.forEach(n=>{let i;n.externalId?i=r.boothStore.boothByExternalId.get(n.externalId):n.name&&(i=r.boothStore.boothByName.get(n.name.toLowerCase())),i?.rect&&o.push(i.rect)}),e.exhibitors?.forEach(n=>{let i;n.externalId?i=r.exhibitorStore.exhibitorByExternalId.get(n.externalId):n.name&&(i=r.exhibitorStore.exhibitorByName.get(n.name.toLowerCase())),i?.booths?.forEach(h=>{h.rect&&o.push(h.rect)})}),o.length===0)return;const s=P.fromUnion(...o);return{leftTop:{x:s.min.x,y:s.min.y},rightBottom:{x:s.max.x,y:s.max.y}}}fitBounds(e,t){if(p("fitBounds called with bounds=%O options=%O",e,t),!e){r.uiState.fitBounds();return}const o=H.safeParse(e);if(!o.success){a("fitBounds",o.error.message,"EFP001500");return}const s=k.safeParse(t);if(!s.success){a("fitBounds",s.error.message,"EFP001501");return}const n=P.fromMinMax({x:e.leftTop.x,y:e.leftTop.y},{x:e.rightBottom.x,y:e.rightBottom.y});r.uiState.moveToRect=t?.padding?n.expand(t.padding):n}getBoothRect(e){typeof e!="string"&&a("getBoothRect","A booth name must be passed.","EFP000F00");const t=S(e)?.rect;return t?l.fromBox(t):void 0}convertToGeo(e,t){const o=w()?.properties?.config;if(!o){a("convertToGeo","The coordinates cannot be converted because the GPS configuration is not defined.","EFP001000");return}if(!e||!t){a("convertToGeo","Both coordinates must be passed.","EFP001001");return}return ie(e,t,o)}getGeoConfig(){const e=w()?.properties?.config;return e?{bearing:e.bearing??0,p0:e.p0,p1:e.p1,p2:e.p2}:null}releaseResources(){r.maplibreStore.dispose(),this.root.unmount(),super.releaseResources()}search(e){return typeof e!="string"&&a("search","A search string must be passed.","EFP001100"),r.fuzzySearchEngineStore.loadEngine().then(()=>(r.searchStore.selectSearch(e),r.uiState.fuzzySearchItems.map(t=>({item:g(t.item),score:t.score}))))}getFloors(){return r.layerStore.floors.map(e=>({name:e.name,shortName:e.shortName,description:e.description,active:e.active,disabled:e.disabled,index:e.index}))}activateFloor(e){if(!e?.name&&e?.index==null){a("activateFloor","Invalid floorId. It must contain either a name or an index.","EFP001200");return}const t=this.getFloors();if(e.name){const o=t.find(s=>s.name===e.name||s.shortName===e.name);if(!o){a("activateFloor",`Floor with name "${e.name}" not found.`,"EFP001201");return}if(o.active)return;this.updateLayerVisibility(o.name,!0);return}if(e.index!==null){const o=t.find(n=>n.index===e.index),s=o?.name;if(!s){a("activateFloor",`Floor at index ${e.index} does not exist.`,"EFP001203");return}if(o.active)return;this.updateLayerVisibility(s,!0);return}}showPathway(e,t){const{boothExternalIds:o,exhibitorExternalIds:s}=t?.length?F(t):{boothExternalIds:[],exhibitorExternalIds:[]};X({pathwayId:e,boothIds:o,exhibitorIds:s})}showPathwayOnly(e,t){this.activateFloor({name:t}),r.layerStore.showPathWay(e),r.uiState.setPathwayOnlyMode(!0);const o=r.layerStore.findLayer(e),s=r.layerStore.findLayer(t),n=o?.rect||o?.viewbox?o:s;if(n?.rect||n?.viewbox){const i=n.viewbox??n.rect;r.uiState.moveToRect=i.clone()}}hidePathways(){this.highlightBooths([]),r.layerStore.hidePathways(),r.uiState.setPathwayOnlyMode(!1)}showSearch(){r.selectSearch("")}changeLanguage(e){const t=e?.toLowerCase?.();if(!ne(t)){a("changeLanguage",`Language "${e}" was not found. Available languages: ${se().map(o=>o.id).join(",")}`,"EFP001300");return}ae(t)}isGpsTrackingEnabled(){return r.routeStore.gpsEnabled}setGpsTrackingEnabled(e){r.routeStore.setGpsTrackingEnabled(e)}deselectCurrentPosition(){r.routeStore.selectCurrentPosition(null,!1)}deselectRoute(){r.routeStore.selectRoute(null),r.routeStore.setOnlyAccessible(!1)}reset(){this.selectBooth(""),this.selectExhibitor(""),this.selectCategory(),this.deselectCurrentPosition(),this.deselectRoute(),this.highlightEntities([]),r.uiState.kioskData&&r.resetCameraFn?r.resetCameraFn?.():this.fitBounds()}selectAccessibleRoute(e){r.routeStore.setOnlyAccessible(!0),this.selectRoute(e)}}function m(f){return typeof f=="string"?S(f):r.routeStore.getNearestBooth(f)}let E=0;function a(f,e,t){const o=`Error calling "${f}" SDK method.`,s=`${e.endsWith(".")?e:e+"."} More information at`;let n="https://js-sdk.expofp.com/api/packages";if(t&&(n+=`#error-${t}`),console.error(`${o} ${s} ${n}`),r.fp.disableRuntimeAlerts)return;r.uiState.setGlobalErrorMessage({title:o,body:I(T,{children:[s," ",x("a",{href:n,target:"_blank",rel:"noreferrer",children:n})]})}),clearTimeout(E);const i=8e3;E=window.setTimeout(()=>{const h=async()=>{r.uiState.globalErrorMessages.length>0&&(r.uiState.popGlobalErrorMessage(),await new Promise(u=>setTimeout(u,i/2)),h())};h()},i)}class l{get h(){return Math.abs(this.y2-this.y1)}get w(){return Math.abs(this.x2-this.x1)}get cx(){return(this.x1+this.x2)/2}get cy(){return(this.y1+this.y2)/2}constructor(e,t,o,s){if(e>o){const n=e;e=o,o=n}if(t>s){const n=t;t=s,s=n}this.x1=e,this.y1=t,this.x2=o,this.y2=s}static fromBox(e){return new l(e.min.x,e.min.y,e.max.x,e.max.y)}static fromCxcywh(e,t,o,s){return new l(e-o/2,t-s/2,e+o/2,t+s/2)}contains(e){return e.x1>=this.x1&&e.x2<=this.x2&&e.y1>=this.y1&&e.y2<=this.y2}intersects(e){const t=Math.max(this.x1,e.x1),o=Math.min(this.x2,e.x2),s=Math.max(this.y1,e.y1),n=Math.min(this.y2,e.y2);return o>=t&&n>=s}getIntersection(e){const t=Math.max(this.x1,e.x1),o=Math.min(this.x2,e.x2),s=Math.max(this.y1,e.y1),n=Math.min(this.y2,e.y2);return o>=t&&n>=s?new l(t,s,o,n):new l(0,0,0,0)}getRotated90(){return l.fromCxcywh(this.cx,this.cy,this.h,this.w)}normalize(e,t){return new l(this.x1/e,this.y1/t,this.x2/e,this.y2/t)}withPadding(e,t=e){return this.w<e*2||this.h<t*2?this:l.fromCxcywh(this.cx,this.cy,this.w-e*2,this.h-t*2)}scale(e){return new l(this.x1*e,this.y1*e,this.x2*e,this.y2*e)}getArea(){return this.w*this.h}clone(){return new l(this.x1,this.y1,this.x2,this.y2)}translate(e,t){return this.x1+=e,this.x2+=e,this.y1+=t,this.y2+=t,this}equals(e){return e.x1===this.x1&&e.x2===this.x2&&e.y1===this.y1&&e.y2===this.y2}toString(){return this.x1+","+this.y1+","+this.w+","+this.h}containsPoint(e,t){return e>=this.x1&&e<=this.x2&&t>=this.y1&&t<=this.y2}}
|
|
1
|
+
import{Fragment as I,jsx as x,jsxs as M}from"react/jsx-runtime";import{Box as w}from"@expofp/geometry";import{CameraSchema as R,SessionsFiltersSchema as $}from"@expofp/schema";import{optimizeWaypointOrder as V}from"@expofp/wayfinding";import{ErrorBoundary as z}from"@sentry/react";import j from"debug";import{reaction as G,runInAction as N}from"mobx";import{createRoot as O}from"react-dom/client";import{install as q}from"resize-observer";import D from"./components/Layout";import{bindBoothHitTest as Y}from"./components/Map/booth-by-xy.js";import{MAX_ROUTE_WAYPOINTS as y}from"./constants";import H from"./data";import{getFpGeo as P}from"./data/fpGeo.js";import U from"./floorplan.loader";import{shouldLoadIntercom as W}from"./intercom";import{registerPlanDisposer as S}from"./plan-lifecycle.js";import{BoundsSchema as X,POISelectorsSchema as k,ZoomToOptionsSchema as v}from"./schemas/sdk.schemas";import{applyDeclarativeConfig as K,applyParameters as Q,applyPathway as Z,initUrlRouting as J}from"./services/url-dispatch";import r,{uiState as _}from"./store";import{bindDetailsEvents as ee}from"./store/details-events";import{bindRootElement as te}from"./store/init/init-ui.js";import{findBooth as b,Route as B,separateExternalIds as F}from"./store/RouteStore";import{GaEventActions as C,initGtag as re,sendEventToGa as L,setConsentSettings as oe}from"./tools/gtag.js";import ie from"./tools/track-event.js";import{cameraToMapSettings as se,mapSettingsToCamera as ne}from"./utils/camera-map-settings";import{getStorage as A}from"./utils/entity-storage";import{getMostFrequent as ae}from"./utils/getMostFrequent";import{convertLocalToGps as he,isValidPointCoords as g}from"./utils/gps";import{getLocales as le,hasLocale as ce,setLocale as ue}from"./utils/i18n";import{mapEntity as p}from"./utils/mapEntity";const d=j("efp:api");q();export default class fe extends U{init(){re(),K(),this.ignoreQuery||J(this.offHistory),ie("load"),te(r),r.fp=this,S(ee()),Y(),oe(this.consent),L(C.Load,""),this.root=O(this.renderTarget),this.root.render(x(z,{children:x(D,{offHistory:this.offHistory,consent:this.consent})})),L(C.Rendered,""),S(G(()=>r.layerStore.layersLoaded,()=>{const t=this.renderTarget.getRootNode(),o=t instanceof ShadowRoot?t.host:this.renderTarget.parentElement;for(document.querySelectorAll(".expofp-floorplan-loader").forEach(s=>s.remove());o&&this.element.firstChild&&this.element.firstChild!==o;)this.element.removeChild(this.element.firstChild);this.resolveReady(),r.initialized||this.onInit?.(this),r.initialized=!0})),S(()=>clearTimeout(E));const e=W(H);e&&import("./intercom/bootIntercom").then(({bootIntercom:t})=>t(e)).catch(()=>{})}selectBooth(e){if(typeof e!="string"&&!Array.isArray(e)){a("selectBooth","Parameter must be a string or an array of strings.","EFP000000");return}const t=r.boothStore.booths.filter(o=>typeof e=="string"?o.name===e||o.externalId===e:e.includes(o.name)||e.includes(o.externalId));r.selectBooth(t)}selectExhibitor(e){if(typeof e!="string"&&!Array.isArray(e)){a("selectExhibitor","Parameter must be a string or an array of strings.","EFP000100");return}if(!e?.length){r.uiState.menu=!1,r.searchStore.resetSearchBox(),r.uiState.details=null;return}const t=r.exhibitorStore.exhibitors.filter(i=>typeof e=="string"?i.name===e||i.externalId===e:e.includes(i.name)||e.includes(i.externalId));if(!t?.length)return;if(typeof e=="string"){r.selectExhibitor(t[0]),r.moveToList([t[0]]);return}const o=t.flatMap(i=>i.booths.map(n=>n.layer)),s=ae(o.map(i=>i.description));s&&r.layerStore.updateVisibility(s,!0),r.uiState.menu=!1,r.searchStore.resetSearchBox(),r.uiState.details=null,r.uiState.list={type:"filter",items:t,query:{key:"exhibitors",value:t.map(i=>i.name).join(",")}},r.moveToList()}highlightExhibitors(e){Array.isArray(e)||a("highlightExhibitors","Parameter must be an array of strings.","EFP000200"),r.boothStore.highlightedByExternalIds=[],r.exhibitorStore.highlightedByExternalIds=[...e]}highlightBooths(e){Array.isArray(e)||a("highlightBooths","Parameter must be an array of strings.","EFP000300"),r.exhibitorStore.highlightedByExternalIds=[],r.boothStore.highlightedByExternalIds=[...e]}highlightEntities(e){Array.isArray(e)||a("highlightEntities","Parameter must be an array of strings.","EFP000400");const{boothExternalIds:t,exhibitorExternalIds:o}=F(e);r.boothStore.highlightedByExternalIds=[...t],r.exhibitorStore.highlightedByExternalIds=[...o]}selectRoute(e,t){if(Array.isArray(e)){const o=[...e],s=o.shift(),i=o.pop();if(o.length>y)throw new Error(`The maximum number of waypoints is ${y}.`);if(!s||!i){a("selectRoute","Invalid route format: When providing an array, it must include at least two points: a start and a destination.","EFP000401");return}const n=o.map(m).filter(h=>h!==null);r.routeStore.selectRoute(new B(m(s),m(i),n));return}e||a("selectRoute","At a minimum, the starting point must be passed.","EFP000402"),r.routeStore.selectRoute(new B(m(e),t?m(t):null))}getOptimizedRoutes(e){if(!Array.isArray(e))return a("getOptimizedRoutes","Parameter must be an array.","EFP000500"),[];if(e.length>y)throw new Error(`The maximum number of waypoints is ${y}.`);const t=e.map(m).filter(s=>!!s);if(!t.length)throw new Error("No booths found for the provided waypoints.");const o=new Map;for(const s of t){const i=s.layer?.name??"",n=o.get(i);n?n.push(s):o.set(i,[s])}return Array.from(o.values()).map(s=>({waypoints:V(s.map(i=>[i.name,{x:i.rect.center.x,y:i.rect.center.y}]))}))}selectCurrentPosition(e,t,o){const s=g(e.x)&&g(e.y),i=g(e.lng)&&g(e.lat);!s&&!i&&a("selectCurrentPosition","A point must be passed. Either (x,y) or (lat,lng) are required.","EFP000600"),r.routeStore.selectCurrentPosition(e,t,o),this.onCurrentPositionChanged?.(e)}setBookmarks(e){(!Array.isArray(e)||!e.length)&&a("setBookmarks","Parameter must be an array.","EFP000700"),e.forEach(t=>{const o=r.exhibitorStore.exhibitors.find(s=>s.name===t.name||s.externalId===t.externalId);o&&(o.bookmarked=t.bookmarked)})}setEntitiesBookmarks(e){if(!Array.isArray(e)||!e.length){a("setEntitiesBookmarks","Parameter must be an array.","EFP000701");return}const t=["exhibitor","event","speaker","booth"],o=e.find(n=>!n.type||!t.includes(n.type));if(o){a("setEntitiesBookmarks",`Invalid entity type: ${o.type}. Must be one of: ${t.join(", ")}.`,"EFP000702");return}const s=A("bookmarked"),i={exhibitor:{existingIds:new Set(s.exhibitors||[]),finder:n=>r.exhibitorStore.findExhibitor(n),replacer:n=>r.exhibitorStore.replaceBookmarked(n)},event:{existingIds:new Set(s.events||[]),finder:n=>r.eventStore.findByNameOrSlug(n),replacer:n=>r.eventStore.replaceBookmarked(n)},speaker:{existingIds:new Set(s.speakers||[]),finder:n=>r.speakerStore.speakers.find(h=>h.name===n||h.externalId===n||h.slug===n),replacer:n=>r.speakerStore.replaceBookmarked(n)},booth:{existingIds:new Set(s.booths||[]),finder:n=>{const h=r.boothStore.findBooth(n);return h?.exhibitors.length===0?h:void 0},replacer:n=>r.boothStore.replaceBookmarked(n)}};e.forEach(n=>{const h=i[n.type],u=n.name||n.externalId||"",l=h.finder(u);l?n.bookmarked?h.existingIds.add(l.id):h.existingIds.delete(l.id):console.warn(`Entity not found: ${n.type} with query "${u}"`)}),Object.values(i).forEach(n=>{n.replacer(Array.from(n.existingIds))})}setEntitiesVisited(e){if(!Array.isArray(e)||!e.length){a("setEntitiesVisited","Parameter must be an array.","EFP000703");return}const t=["exhibitor","event"],o=e.find(n=>!n.type||!t.includes(n.type));if(o){a("setEntitiesVisited",`Invalid entity type: ${o.type}. Must be one of: ${t.join(", ")}.`,"EFP000704");return}const s=A("visited"),i={exhibitor:{existingIds:new Set(s.exhibitors||[]),finder:n=>r.exhibitorStore.findExhibitor(n),replacer:n=>r.exhibitorStore.replaceVisited(n)},event:{existingIds:new Set(s.events||[]),finder:n=>r.eventStore.findByNameOrSlug(n),replacer:n=>r.eventStore.replaceVisited(n)}};e.forEach(n=>{const h=i[n.type],u=n.name||n.externalId||"",l=h.finder(u);l?n.visited?h.existingIds.add(l.id):h.existingIds.delete(l.id):console.warn(`Entity not found: ${n.type} with query "${u}"`)}),Object.values(i).forEach(n=>{n.replacer(Array.from(n.existingIds))})}setMarkers(e){if(!e||!Array.isArray(e.icons)||!Array.isArray(e.markers)){a("setMarkers","Invalid input.","EFP000800");return}r.routeStore.setMarkers(e)}selectMarker(e,t=!0){return typeof e!="string"&&a("selectMarker","The identifier must be passed.","EFP000900"),r.routeStore.selectMarker(e,t)}drawCircles(e){Array.isArray(e)||a("drawCircles","Invalid input.","EFP000A00"),r.uiState.debugCircles=e}checkRoutes(){r.routeStore.checkRoutes()}updateLayerVisibility(e,t){typeof e!="string"&&a("updateLayerVisibility","The layer name (string) must be passed.","EFP000B00"),t||a("updateLayerVisibility","Passing a false value to visible will have no effect.","EFP000B01"),r.layerStore.updateVisibility(e,t)}getCenterCoordinates(){return r.fp.getCenterCoordinates()}exhibitorsList(){return r.exhibitorStore.exhibitors.map(e=>p(e))}boothsList(){return r.boothStore.booths.map(e=>p(e))}categoriesList(){return r.categoryStore.categories.map(e=>p(e))}selectCategory(e){if(e==null||typeof e!="string"){r.searchStore.selectSearch();return}const t=e?.toLowerCase(),o=r.categoryStore.categories.find(({name:s,slug:i})=>s?.toLowerCase()===t||i?.toLowerCase()===t);if(!o){a("selectCategory",`Category ${e} not found.`,"EFP000C01");return}r.selectCategory(o)}select(e){if(typeof e!="string"){a("select","Parameter must be a string.","EFP001700");return}const t=e,o=t?.toLowerCase(),s=r.boothStore.booths.find(l=>l.slug?.toLowerCase()===o||l.externalId?.toLowerCase()===o||l.externalId?.toLowerCase()?.replace(/\s+/g,"")===o);if(s){setTimeout(()=>r.selectBooth(s),250);return}const i=r.eventStore.eventItems.find(l=>l.slug?.toLowerCase()===o||l.externalId?.toLowerCase()===o);if(i){r.selectEventItem(i,!0);return}const n=r.exhibitorStore.exhibitors.find(l=>l.slug?.toLowerCase()===o||l.externalId?.toLowerCase()===o);if(n){setTimeout(()=>r.clickExhibitor(n),250);return}const h=r.categoryStore.categories.find(l=>l.slug===t);if(h){r.selectCategory(h);return}const u=r.speakerStore.findBySlug(t);if(u){r.selectSpeaker(u,!0);return}t.includes("heatmap=true")||r.searchStore.selectSearch(t)}showList(e){const t={bookmarks:()=>r.selectBookmarks(),visited:()=>r.selectVisited(),sessions:()=>r.selectSessions(),exhibitors:()=>r.selectExhibitors(),speakers:()=>r.selectSpeakers(),tours:()=>r.selectTours(),language:()=>r.selectLanguage()},o=t[e];if(!o){a("showList",`Unknown list "${e}". Must be one of: ${Object.keys(t).join(", ")}.`,"EFP001800");return}o()}showSessions(e={}){d("showSessions called with filters=%O",e);const t=$.safeParse(e);if(!t.success){a("showSessions",t.error.message,"EFP001C00");return}const o=t.data,{eventStore:s,sessionsFilterStore:i}=r;N(()=>{_.details=null,r.selectSessions(),i.closeFilter(),i.setPending("selectedTracks",T(o.tracks,s.tracks,"track")),i.setPending("selectedVenues",T(o.venues,s.venues,"venue")),i.setPending("date",o.date??"all"),i.setPending("timeOfDay",o.time??"all"),i.setPending("showBookmarksOnly",o.bookmarked??!1),i.setPending("showLiveOnly",o.live??!1),i.commitFilters()})}selectTour(e){if(typeof e!="string"||!e){a("selectTour","A tour id must be passed.","EFP001900");return}const t=r.toursStore.getTourById(e);t?r.toursStore.launchTour(t,t.name,t.description):(console.warn(`Route with id "${e}" not found`),r.selectTours())}openPlanner(e={}){if(typeof e!="object"||e===null){a("openPlanner","An options object must be passed.","EFP001A00");return}const t=e.from?b(e.from):null;e.fromBookmarks?r.routePlannerStore.launchFromBookmarks(t??void 0):r.routePlannerStore.launchFromSlugs(e.items??[],t??void 0)}startBuildRoute(){r.uiState.startBuildRoute()}applyParameters(e){typeof e!="string"&&a("applyParameters","A query string must be passed.","EFP000D00"),Q(e)}getVisibility(){return r.uiState.visibility}setVisibility(e){(typeof e!="object"||!Object.keys(e).length)&&a("setVisibility","The parameter must be passed.","EFP000E00"),r.uiState.setVisibility(e)}findLocation(){r.routeStore.findLocation()}zoomIn(){r.uiState.zoomIn()}zoomOut(){r.uiState.zoomOut()}switchView(){r.maplibreStore.activateMaplibre()}setCamera(e){d("setCamera called with camera=%O",e);const t=R.safeParse(e);if(!t.success){a("setCamera",t.error.message,"EFP001B00");return}r.uiState.setMapSettings(se(t.data))}getCamera(){return ne(r.uiState.mapSettings)}zoomTo(e,t){d("zoomTo called with selectors=%O options=%O",e,t);const o=k.safeParse(e);if(!o.success){a("zoomTo",o.error.message,"EFP001600");return}const s=v.safeParse(t);if(!s.success){a("zoomTo",s.error.message,"EFP001601");return}const i=this.getBounds(e);i&&this.fitBounds(i,t)}getBounds(e){d("getBounds called with selectors=%O",e);const t=k.safeParse(e);if(!t.success){a("getBounds",t.error.message,"EFP001400");return}const o=[];if(e.booths?.forEach(i=>{let n;i.externalId?n=r.boothStore.boothByExternalId.get(i.externalId):i.name&&(n=r.boothStore.boothByName.get(i.name.toLowerCase())),n?.rect&&o.push(n.rect)}),e.exhibitors?.forEach(i=>{let n;i.externalId?n=r.exhibitorStore.exhibitorByExternalId.get(i.externalId):i.name&&(n=r.exhibitorStore.exhibitorByName.get(i.name.toLowerCase())),n?.booths?.forEach(h=>{h.rect&&o.push(h.rect)})}),o.length===0)return;const s=w.fromUnion(...o);return{leftTop:{x:s.min.x,y:s.min.y},rightBottom:{x:s.max.x,y:s.max.y}}}fitBounds(e,t){if(d("fitBounds called with bounds=%O options=%O",e,t),!e){r.uiState.fitBounds();return}const o=X.safeParse(e);if(!o.success){a("fitBounds",o.error.message,"EFP001500");return}const s=v.safeParse(t);if(!s.success){a("fitBounds",s.error.message,"EFP001501");return}const i=w.fromMinMax({x:e.leftTop.x,y:e.leftTop.y},{x:e.rightBottom.x,y:e.rightBottom.y});r.uiState.moveToRect=t?.padding?i.expand(t.padding):i}getBoothRect(e){typeof e!="string"&&a("getBoothRect","A booth name must be passed.","EFP000F00");const t=b(e)?.rect;return t?c.fromBox(t):void 0}convertToGeo(e,t){const o=P()?.properties?.config;if(!o){a("convertToGeo","The coordinates cannot be converted because the GPS configuration is not defined.","EFP001000");return}if(!e||!t){a("convertToGeo","Both coordinates must be passed.","EFP001001");return}return he(e,t,o)}getGeoConfig(){const e=P()?.properties?.config;return e?{bearing:e.bearing??0,p0:e.p0,p1:e.p1,p2:e.p2}:null}releaseResources(){r.maplibreStore.dispose(),this.root?.unmount(),super.releaseResources()}search(e){return typeof e!="string"&&a("search","A search string must be passed.","EFP001100"),r.fuzzySearchEngineStore.loadEngine().then(()=>(r.searchStore.selectSearch(e),r.uiState.fuzzySearchItems.map(t=>({item:p(t.item),score:t.score}))))}getFloors(){return r.layerStore.floors.map(e=>({name:e.name,shortName:e.shortName,description:e.description,active:e.active,disabled:e.disabled,index:e.index}))}activateFloor(e){if(!e?.name&&e?.index==null){a("activateFloor","Invalid floorId. It must contain either a name or an index.","EFP001200");return}const t=this.getFloors();if(e.name){const o=t.find(s=>s.name===e.name||s.shortName===e.name);if(!o){a("activateFloor",`Floor with name "${e.name}" not found.`,"EFP001201");return}if(o.active)return;this.updateLayerVisibility(o.name,!0);return}if(e.index!==null){const o=t.find(i=>i.index===e.index),s=o?.name;if(!s){a("activateFloor",`Floor at index ${e.index} does not exist.`,"EFP001203");return}if(o.active)return;this.updateLayerVisibility(s,!0);return}}showPathway(e,t){const{boothExternalIds:o,exhibitorExternalIds:s}=t?.length?F(t):{boothExternalIds:[],exhibitorExternalIds:[]};Z({pathwayId:e,boothIds:o,exhibitorIds:s})}showPathwayOnly(e,t){this.activateFloor({name:t}),r.layerStore.showPathWay(e),r.uiState.setPathwayOnlyMode(!0);const o=r.layerStore.findLayer(e),s=r.layerStore.findLayer(t),i=o?.rect||o?.viewbox?o:s,n=i?.viewbox??i?.rect;n&&(r.uiState.moveToRect=n.clone())}hidePathways(){this.highlightBooths([]),r.layerStore.hidePathways(),r.uiState.setPathwayOnlyMode(!1)}showSearch(){r.selectSearch("")}changeLanguage(e){const t=e?.toLowerCase?.();if(!ce(t)){a("changeLanguage",`Language "${e}" was not found. Available languages: ${le().map(o=>o.id).join(",")}`,"EFP001300");return}ue(t)}isGpsTrackingEnabled(){return r.routeStore.gpsEnabled}setGpsTrackingEnabled(e){r.routeStore.setGpsTrackingEnabled(e)}deselectCurrentPosition(){r.routeStore.selectCurrentPosition(null,!1)}deselectRoute(){r.routeStore.selectRoute(null),r.routeStore.setOnlyAccessible(!1)}reset(){this.selectBooth(""),this.selectExhibitor(""),this.selectCategory(),this.deselectCurrentPosition(),this.deselectRoute(),this.highlightEntities([]),r.uiState.kioskData&&r.resetCameraFn?r.resetCameraFn?.():this.fitBounds()}selectAccessibleRoute(e){r.routeStore.setOnlyAccessible(!0),this.selectRoute(e)}}function T(f=[],e,t){const o=new Set;for(const s of f){const i=s.toLowerCase(),n=e.find(h=>String(h.id)===s)??e.find(h=>h.externalId?.toLowerCase()===i)??e.find(h=>h.name?.toLowerCase()===i||h.slug?.toLowerCase()===i);n?o.add(n.id):console.warn(`Entity not found: ${t} with query "${s}"`)}return[...o]}function m(f){return(typeof f=="string"?b(f):r.routeStore.getNearestBooth(f))??null}let E=0;function a(f,e,t){const o=`Error calling "${f}" SDK method.`,s=`${e.endsWith(".")?e:e+"."} More information at`;let i="https://js-sdk.expofp.com/api/packages";if(t&&(i+=`#error-${t}`),console.error(`${o} ${s} ${i}`),r.fp.disableRuntimeAlerts)return;r.uiState.setGlobalErrorMessage({title:o,body:M(I,{children:[s," ",x("a",{href:i,target:"_blank",rel:"noreferrer",children:i})]})}),clearTimeout(E);const n=8e3;E=window.setTimeout(()=>{const h=async()=>{r.uiState.globalErrorMessages.length>0&&(r.uiState.popGlobalErrorMessage(),await new Promise(u=>setTimeout(u,n/2)),h())};h()},n)}class c{get h(){return Math.abs(this.y2-this.y1)}get w(){return Math.abs(this.x2-this.x1)}get cx(){return(this.x1+this.x2)/2}get cy(){return(this.y1+this.y2)/2}constructor(e,t,o,s){if(e>o){const i=e;e=o,o=i}if(t>s){const i=t;t=s,s=i}this.x1=e,this.y1=t,this.x2=o,this.y2=s}static fromBox(e){return new c(e.min.x,e.min.y,e.max.x,e.max.y)}static fromCxcywh(e,t,o,s){return new c(e-o/2,t-s/2,e+o/2,t+s/2)}contains(e){return e.x1>=this.x1&&e.x2<=this.x2&&e.y1>=this.y1&&e.y2<=this.y2}intersects(e){const t=Math.max(this.x1,e.x1),o=Math.min(this.x2,e.x2),s=Math.max(this.y1,e.y1),i=Math.min(this.y2,e.y2);return o>=t&&i>=s}getIntersection(e){const t=Math.max(this.x1,e.x1),o=Math.min(this.x2,e.x2),s=Math.max(this.y1,e.y1),i=Math.min(this.y2,e.y2);return o>=t&&i>=s?new c(t,s,o,i):new c(0,0,0,0)}getRotated90(){return c.fromCxcywh(this.cx,this.cy,this.h,this.w)}normalize(e,t){return new c(this.x1/e,this.y1/t,this.x2/e,this.y2/t)}withPadding(e,t=e){return this.w<e*2||this.h<t*2?this:c.fromCxcywh(this.cx,this.cy,this.w-e*2,this.h-t*2)}scale(e){return new c(this.x1*e,this.y1*e,this.x2*e,this.y2*e)}getArea(){return this.w*this.h}clone(){return new c(this.x1,this.y1,this.x2,this.y2)}translate(e,t){return this.x1+=e,this.x2+=e,this.y1+=t,this.y2+=t,this}equals(e){return e.x1===this.x1&&e.x2===this.x2&&e.y1===this.y1&&e.y2===this.y2}toString(){return this.x1+","+this.y1+","+this.w+","+this.h}containsPoint(e,t){return e>=this.x1&&e<=this.x2&&t>=this.y1&&t<=this.y2}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{applyIntents as
|
|
1
|
+
import{applyIntents as v,getConfig as h,parseDeprecatedUrlParams as Y,parseFromUrlTolerant as W,parseIntentsFromUrl as k,parseLegacyQuery as I,serializeIntentToUrl as z,serializeSelection as Q}from"@expofp/config";import{Box as j}from"@expofp/geometry";import{UrlConfigSchema as H}from"@expofp/schema";import{safeDecode as p}from"@expofp/utils";import{runInAction as N}from"mobx";import{applyKioskMode as $}from"../components/Kiosk/kiosk-mode";import{recoverKioskFromUrlPrams as q}from"../components/Kiosk/recoverKioskFromUrlPrams";import{LEGACY_PREVIEW_MODE_STORAGE_KEY as J,LEGACY_VIEWER_MODE_STORAGE_KEY as X,PREVIEW_MODE_STORAGE_KEY as w,VIEWER_MODE_STORAGE_KEY as E}from"../constants";import Z from"../data";import n,{uiState as i}from"../store";import{BoothBase as x}from"../store/BoothStore";import{CurrentPosition as ee,extractRoute as te}from"../store/RouteStore";import{eventScopedValue as oe}from"../tools/event-scoped-cache.js";import{setConsentSettings as re}from"../tools/gtag";import M from"../tools/logger";import{areLayersEnabled as ie}from"../utils/areLayersEnabled";import{brand as F}from"../utils/brand";import{cameraToMapSettings as O}from"../utils/camera-map-settings";import{handleCustomCommand as se}from"../utils/customCommands";import{formatEventTitle as ne,formatPlaceholderTitle as ae}from"../utils/event-title";import{getMostFrequent as le}from"../utils/getMostFrequent";import{heatmapEnabled as ce}from"../utils/heatmap-enabled";import ue from"../utils/is-own-domain";import{isLocalStorageAvailable as B}from"../utils/localStorage";import{planAutorun as L,planWhen as d}from"../utils/plan-reactions.js";import{stripTrackingParams as fe}from"../utils/trackingParams";import{rewriteMultiSlugQuery as me}from"./multi-slug";import{currentSearch as f,disableUrlWrites as pe,initUrlSync as de,pushQuery as he,replaceQuery as m}from"./url-sync";let y=!1;export function applyDeclarativeConfig(){S(h()),d(()=>n.layerStore.layersLoaded,()=>{const e=h().camera;Object.keys(e).length&&G(O(e));const t=h().visibility;Object.keys(t).length&&i.setVisibility(t)})}export function initUrlRouting(e){de({offHistory:e,onNavigate:()=>g({backForward:!0})}),R(),b(),d(()=>n.layerStore.layersLoaded,()=>{n.urlFilterManager&&!n.urlFilterManager.isInitialized&&n.urlFilterManager.initialize(),g(),L(V),L(_),i.viewerMode&&(i.menu=!0)})}export function applyParameters(e=""){m("?"+p(e.toString())),n.layerStore.layersLoaded?P(e):(b(),d(()=>n.layerStore.layersLoaded,()=>P(e)))}function P(e){const t="?"+p(e),o=Se(t),s=[...o.intents??[],...k(t).intents],{intents:l=[],...c}=Y(t,{visibility:o.visibility,consent:o.consent,intents:s});S(o),S(c);const a=o.consent??c.consent;a&&re(a),o.camera&&Object.keys(o.camera).length&&G(O(o.camera)),o.visibility&&Object.keys(o.visibility).length&&i.setVisibility(o.visibility),R(),g();const r=[...s,...l];r.length&&v(n.fp,r)}function b(){const e=f(),t=e.length>1?p(e.substring(1)):"";return se(t)}function g(e={}){y=!0;try{const t=new URLSearchParams(p(window.location.search));q(t);const{primary:o}=I(f()),s=o.type==="select"&&(!o.slug||/^t=[^&]*$/.test(o.slug))&&(i.heatmap||i.heatmapYah);!b()&&!s&&(e.backForward?ye(o):U(o))}finally{y=!1}if(e.backForward){const{exhibitor:t,booth:o,eventItem:s}=D(),l=C();l.exhibitor=t,l.booth=o,l.eventItem=s}_(),V()}function ye(e){e.type==="list"&&e.list==="sessions"?n.fp.showSessions():U(e);const{intents:t}=k(f());v(n.fp,t.filter(o=>o.name==="showSessions"))}function U(e){const t=n.fp;switch(e.type){case"kiosk":e.enabled!==null&&$(i,e.enabled);return;case"list":t.showList(e.list);return;case"tour":t.selectTour(e.tourId);return;case"planner":t.openPlanner({items:e.items,from:e.from,fromBookmarks:e.fromBookmarks});return;case"route":{n.routeStore.setOnlyAccessible(e.accessible),n.routeStore.selectRoute(te(e.from??"",e.to??"",e.waypoints)),n.uiState.setIsMultiPointRoute(e.waypoints.length>0),e.title&&n.uiState.setRouteTitle(e.title);return}case"selectExhibitors":setTimeout(()=>t.selectExhibitor(e.values),250);return;case"ownedByFilters":M.log("Skipping filter parameters in dispatchFromUrl (owned by URLFilterManager)");return;case"ownedByConfig":return;case"select":t.select(e.slug);return}}export function applyPathway(e){const{pathwayId:t,boothIds:o,exhibitorIds:s}=e,l=n.boothStore.booths.filter(r=>o.includes(r.externalId)),c=n.exhibitorStore.exhibitors.filter(r=>s.includes(r.externalId)).flatMap(r=>r.booths),a=[...l,...c];if(ie()){const r=le(a.map(u=>u.layer.name));r&&n.fp.activateFloor({name:r})}(o.length>0||s.length>0)&&n.fp.highlightEntities([...o,...s]),n.layerStore.showPathWay(t),a.length>0&&N(()=>{n.uiState.moveToRect=j.fromUnion(...a.map(r=>r.rect).filter(Boolean)),n.uiState.rollReset=!0})}function R(){const{oneShots:e}=I(f());for(const o of e)be(o);const t=fe(f());t!==null&&m("?"+t),i.previewExhibitor&&m("?"+i.previewExhibitor.slug),ge()}function be(e){switch(e.type){case"heatmap":T(e.yah);return;case"blueDot":{const t=new ee(e.x,e.y,n.layerStore.findLayer(e.layer??"")?.name,void 0,e.lat,e.lng);d(()=>n.layerStore.layersLoaded,()=>n.routeStore.selectCurrentPosition(t,!0,1));return}case"viewerMode":B&&(e.enabled?localStorage.setItem(E,"true"):(localStorage.removeItem(E),localStorage.removeItem(X)));return;case"previewMode":B&&(e.enabled?localStorage.setItem(w,"true"):(localStorage.removeItem(w),localStorage.removeItem(J)));return;case"uiScale":e.scale!==null?n.uiState.setUIScale(e.scale,!0):M.warn(`Invalid ui-scale parameter: ${e.raw}. Must be a number between 0.8 and 1.4.`);return;case"resetUiScale":n.uiState.resetUIScale();return}}function T(e){pe(),e?(i.heatmapYah=!0,i.monochrome=!0,i.hideLogoInBooth=!0,i.hideHeaderLogo=!0,i.disableBookmarked=!0):i.heatmap=!0}function ge(){const e=me(f(),t=>n.exhibitorStore.exhibitors.find(s=>s.slug===t||s.externalId===t)?.name);e!==null&&m(e)}function S(e){e.noOverlay!==void 0&&(i.hideOverlay=e.noOverlay),e.monochrome&&(i.monochrome=!0),e.hideHeaderLogo&&(i.hideHeaderLogo=!0),e.hideLogoInBooth&&(i.hideLogoInBooth=!0),e.disableFeatured&&n.exhibitorStore.exhibitors.forEach(t=>t.featured=!1),e.disableBookmarked&&(i.disableBookmarked=!0),e.disableGps&&n.routeStore.setGpsTrackingEnabled(!1),e.heatmap&&ce(e.heatmap)&&T(e.heatmap.variant==="yah")}function Se(e){return W(H,e).value}const C=oe(()=>({exhibitor:null,booth:null,eventItem:null}));function _(){const{selection:e,exhibitor:t,booth:o,eventItem:s}=D(),l=n.urlFilterManager.filterSearch(),c=ve(e);if(y)return;const a=c||Q(e)||l;if(f()===a)return;const r=C();t!==r.exhibitor||o!==r.booth||s!==r.eventItem?he(a):m(a),r.exhibitor=t,r.booth=o,r.eventItem=s}function ve(e){if(e.type!=="list"||e.list!=="sessions")return"";const{selectedTracks:t,selectedVenues:o,date:s,timeOfDay:l,showBookmarksOnly:c,showLiveOnly:a}=n.sessionsFilterStore.state.filters,r={};return t.value.length&&(r.tracks=A(t.value)),o.value.length&&(r.venues=A(o.value)),s.value!=="all"&&(r.date=s.value),s.value==="today"&&l.value!=="all"&&(r.time=l.value),c.value&&(r.bookmarked=!0),a.value&&(r.live=!0),Object.keys(r).length?"?"+z({name:"showSessions",args:[r]}):""}function A(e){return[...e].sort((t,o)=>t-o).map(String)}function D(){const e=i.selectedExhibitor,t=i.selectedBooth,o=i.selectedEventItem,s=i.selectedRoute,l=i.selectedSpeaker,c=i.setKioskModeEnabled,a=i.list;let r;if(a.type==="route-planner"&&!e&&!t&&!o){const u=n.routePlannerStore;r={type:"planner",fromBookmarks:u.source==="bookmarks",items:u.items.map(K=>K.entity.slug).filter(Boolean),from:u.startPoint?.slug||void 0}}else if(s&&!i.isMultiPointRoute)r={type:"route",to:s.to instanceof x?s.to.slug:void 0,from:s.from instanceof x?s.from.slug:void 0,accessible:n.routeStore.onlyAccessible,waypoints:s.waypoints?.map(u=>u.slug)};else if(e)r={type:"slug",slug:e.slug};else if(t)r={type:"slug",slug:t.slug};else if(o)r={type:"slug",slug:o.slug};else if(l)r={type:"slug",slug:l.slug};else if(c)r={type:"none"};else switch(a.type){case"bookmarks":case"visited":case"sessions":case"exhibitors":case"speakers":case"tours":case"language":r={type:"list",list:a.type};break;case"category":r={type:"slug",slug:i.selectedCategory?.slug??""};break;case"search":r={type:"slug",slug:a.text||""};break;case"filter":r={type:"filter",key:a.query.key,value:a.query.value};break;case"multi-point-tour":r={type:"tour",tourId:a.tourId};break;default:throw new Error("Unkown list.type")}return{selection:r,exhibitor:e,booth:t,eventItem:o}}function V(){if(!ue)return;const e=i.selectedExhibitor,t=i.selectedEventItem,o=i.selectedSpeaker;let s="";e?s=e.name:t?s=t.name:o?s=o.name:i.list.type==="search"&&i.list.text?s="`"+(i.list.text||"")+"`":i.list.type==="multi-point-tour"&&i.tourTitle&&(s=i.tourTitle),s.length&&(s+=" \u2013 "),s+=ne(Z,F)??ae(window.location.hostname,F),document.title=s}function G(e){try{if(i.setMapSettings(e),e.z){const t=n.layerStore.layers.find(o=>o.name===e.z);t&&n.layerStore.updateVisibility(t,!0)}}catch(t){console.error("Failed to process map settings.",t)}}
|
|
@@ -36,7 +36,10 @@ export default class SessionsFilterStore extends BaseFilterStore {
|
|
|
36
36
|
private createInitialFilters;
|
|
37
37
|
setSearchText(text: string): void;
|
|
38
38
|
setPending<K extends FilterKey>(key: K, value: (typeof DEFAULTS)[K]): void;
|
|
39
|
+
/** The filter panel's Apply: commit the pending filters and focus the list. */
|
|
39
40
|
applyFilters(): void;
|
|
41
|
+
/** Commit the pending filters, leaving the list and the search box as they are. */
|
|
42
|
+
commitFilters(): void;
|
|
40
43
|
resetFilters(): void;
|
|
41
44
|
resetAndApplyFilters(): void;
|
|
42
45
|
openFilter(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__decorate as i}from"tslib";import{action as
|
|
1
|
+
import{__decorate as i}from"tslib";import{action as o,computed as p,observable as u}from"mobx";import h from"./BaseFilterStore";const n={selectedTracks:[],selectedVenues:[],selectedSpeakers:[],date:"all",timeOfDay:"all",sortOrder:"desc",use24hFormat:!1,showBookmarksOnly:!1,showLiveOnly:!1};export default class s extends h{constructor(e){super(e),this.state={isOpen:!1,selectedItems:[],pendingItems:[],searchText:"",visibleSections:["tracks","venues","speakers","date","time","sort","settings"],filters:this.createInitialFilters()}}createInitialFilters(){const e={};return Object.keys(n).forEach(t=>{e[t]={value:n[t],pending:n[t]}}),e}setSearchText(e){this.state.searchText=e}setPending(e,t){this.state.filters[e].pending=t}applyFilters(){this.commitFilters(),this.updateUIState()}commitFilters(){const{filters:e}=this.state,t=e.selectedTracks.value.length>0,a=e.selectedVenues.value.length>0;Object.keys(e).forEach(c=>{e[c].value=e[c].pending});const r=e.selectedTracks.value.length>0,l=e.selectedVenues.value.length>0;t!==r&&this.rootStore.shortcutRegistry.updateActivationOrderFromState("sessions","tracks",t,r),a!==l&&this.rootStore.shortcutRegistry.updateActivationOrderFromState("sessions","venues",a,l),this.state.selectedItems=[...this.state.pendingItems],this.state.isOpen=!1}resetFilters(){const{filters:e}=this.state;Object.keys(n).forEach(t=>{e[t].pending=n[t]}),this.state.pendingItems=[],this.state.searchText=""}resetAndApplyFilters(){const{filters:e}=this.state,t=e.selectedTracks.value.length>0,a=e.selectedVenues.value.length>0;this.resetFilters(),Object.keys(e).forEach(c=>{e[c].value=e[c].pending});const r=!1,l=!1;t!==r&&this.rootStore.shortcutRegistry.updateActivationOrderFromState("sessions","tracks",t,r),a!==l&&this.rootStore.shortcutRegistry.updateActivationOrderFromState("sessions","venues",a,l),this.state.selectedItems=[],this.state.isOpen=!1,this.rootStore.uiState.list={type:"sessions",text:"",focused:!1}}openFilter(){this.state.isOpen=!0,this.state.pendingItems=[...this.state.selectedItems];const{filters:e}=this.state;Object.keys(e).forEach(t=>{e[t].pending=e[t].value})}closeFilter(){this.state.isOpen=!1,this.state.pendingItems=[...this.state.selectedItems];const{filters:e}=this.state;Object.keys(e).forEach(t=>{e[t].pending=e[t].value})}openFilterWithSections(e){this.state.visibleSections=e,this.openFilter()}get activeFiltersCount(){const{filters:e}=this.state;let t=0;return Object.keys(n).forEach(a=>{const r=e[a].value,l=n[a];Array.isArray(l)&&Array.isArray(r)?r.length>0&&t++:r!==l&&t++}),t}updateUIState(){this.rootStore.uiState.list={type:"sessions",text:"",focused:!1},this.rootStore.searchStore.setFocused(!0)}getFilteredItems(){return[]}}i([u],s.prototype,"state",void 0),i([o],s.prototype,"setSearchText",null),i([o],s.prototype,"setPending",null),i([o],s.prototype,"applyFilters",null),i([o],s.prototype,"commitFilters",null),i([o],s.prototype,"resetFilters",null),i([o],s.prototype,"resetAndApplyFilters",null),i([o],s.prototype,"openFilter",null),i([o],s.prototype,"closeFilter",null),i([o],s.prototype,"openFilterWithSections",null),i([p],s.prototype,"activeFiltersCount",null);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import RootStore from '../RootStore';
|
|
2
|
-
import { BaseShortcutProvider, ShortcutConfig } from '../ShortcutProvider';
|
|
1
|
+
import type RootStore from '../RootStore';
|
|
2
|
+
import { BaseShortcutProvider, type ShortcutConfig } from '../ShortcutProvider';
|
|
3
3
|
export declare class SessionsShortcutProvider extends BaseShortcutProvider {
|
|
4
4
|
private rootStore;
|
|
5
5
|
readonly id = "sessions";
|
|
@@ -11,7 +11,6 @@ export declare class SessionsShortcutProvider extends BaseShortcutProvider {
|
|
|
11
11
|
shouldShowShortcuts(): boolean;
|
|
12
12
|
private toggleBookmarksFilter;
|
|
13
13
|
private toggleLiveFilter;
|
|
14
|
-
private setDateFilter;
|
|
15
14
|
private toggleDateFilter;
|
|
16
15
|
private toggleSortOrder;
|
|
17
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__decorate as a}from"tslib";import{computed as r}from"mobx";import{BaseShortcutProvider as l}from"../ShortcutProvider";export class SessionsShortcutProvider extends l{constructor(t){super(),this.rootStore=t,this.id="sessions"}get computedShortcuts(){const{sessionsFilterStore:t,eventStore:e}=this.rootStore,{filters:s}=t.state,o=[];return o.push({id:"bookmarks",icon:"icon-bookmark",enabled:!0,active:s.showBookmarksOnly.value,tooltip:"Show bookmarked events only",variant:"default",action:"toggle",showResetButton:!1}),e.tracks.length>0&&o.push({id:"tracks",label:"Tracks",badge:s.selectedTracks.value.length>0?s.selectedTracks.value.length:void 0,enabled:!0,active:s.selectedTracks.value.length>0,tooltip:"Show events by tracks",variant:"default",action:"custom",showResetButton:!0}),this.rootStore.speakerStore.speakers.length>0&&o.push({id:"speakers",label:"Speakers",enabled:!0,active:!1,tooltip:"Open speakers list",variant:"default",action:"custom",showResetButton:!1}),e.liveEvents.length>0&&o.push({id:"live",label:"Live",enabled:!0,active:s.showLiveOnly.value,tooltip:"Show events happening now",variant:"default",action:"toggle",showResetButton:!1}),e.todayEvents.length>0&&o.push({id:"today",label:"Today",enabled:!0,active:s.date.value==="today",tooltip:"Show today's events",variant:"default",action:"toggle",showResetButton:!1}),e.tomorrowEvents.length>0&&o.push({id:"tomorrow",label:"Tomorrow",enabled:!0,active:s.date.value==="tomorrow",tooltip:"Show tomorrow's events",variant:"default",action:"toggle",showResetButton:!1}),e.pastEvents.length>0&&o.push({id:"past",label:"Past",enabled:!0,active:s.date.value==="past",tooltip:"Show past events",variant:"default",action:"toggle",showResetButton:!1}),e.venues.length>0&&o.push({id:"venues",label:"Venues",badge:s.selectedVenues.value.length>0?s.selectedVenues.value.length:void 0,enabled:!0,active:s.selectedVenues.value.length>0,tooltip:"Show events by venues",variant:"default",action:"custom",showResetButton:!0}),o}createShortcuts(){return this.computedShortcuts}handleShortcutClick(t){switch(t){case"live":this.toggleLiveFilter();break;case"bookmarks":this.toggleBookmarksFilter();break;case"tracks":this.rootStore.sessionsFilterStore.openFilterWithSections(["tracks"]);break;case"venues":this.rootStore.sessionsFilterStore.openFilterWithSections(["venues"]);break;case"speakers":this.rootStore.selectSpeakers();break;case"today":this.toggleDateFilter("today");break;case"tomorrow":this.toggleDateFilter("tomorrow");break;case"past":this.toggleDateFilter("past");break;case"earliest":this.toggleSortOrder();break;default:console.warn(`Unknown shortcut ID: ${t}`)}}handleShortcutReset(t){const{sessionsFilterStore:e}=this.rootStore;switch(t){case"live":e.setPending("showLiveOnly",!1),e.applyFilters();break;case"tracks":e.setPending("selectedTracks",[]),e.applyFilters();break;case"venues":e.setPending("selectedVenues",[]),e.applyFilters();break;case"bookmarks":e.setPending("showBookmarksOnly",!1),e.applyFilters();break;case"today":e.setPending("date","all"),e.applyFilters();break;case"tomorrow":e.setPending("date","all"),e.applyFilters();break;case"past":e.setPending("date","all"),e.applyFilters();break;default:console.warn(`Unknown shortcut reset ID: ${t}`)}}shouldShowShortcuts(){return this.rootStore.uiState.list.type==="sessions"&&this.rootStore.uiState.details===null}toggleBookmarksFilter(){const{sessionsFilterStore:t}=this.rootStore,e=!t.state.filters.showBookmarksOnly.value;t.setPending("showBookmarksOnly",e),t.applyFilters()}toggleLiveFilter(){const{sessionsFilterStore:t}=this.rootStore,e=!t.state.filters.showLiveOnly.value;t.setPending("showLiveOnly",e),t.applyFilters()}
|
|
1
|
+
import{__decorate as a}from"tslib";import{computed as r}from"mobx";import{BaseShortcutProvider as l}from"../ShortcutProvider";export class SessionsShortcutProvider extends l{constructor(t){super(),this.rootStore=t,this.id="sessions"}get computedShortcuts(){const{sessionsFilterStore:t,eventStore:e}=this.rootStore,{filters:s}=t.state,o=[];return o.push({id:"bookmarks",icon:"icon-bookmark",enabled:!0,active:s.showBookmarksOnly.value,tooltip:"Show bookmarked events only",variant:"default",action:"toggle",showResetButton:!1}),e.tracks.length>0&&o.push({id:"tracks",label:"Tracks",badge:s.selectedTracks.value.length>0?s.selectedTracks.value.length:void 0,enabled:!0,active:s.selectedTracks.value.length>0,tooltip:"Show events by tracks",variant:"default",action:"custom",showResetButton:!0}),this.rootStore.speakerStore.speakers.length>0&&o.push({id:"speakers",label:"Speakers",enabled:!0,active:!1,tooltip:"Open speakers list",variant:"default",action:"custom",showResetButton:!1}),(e.liveEvents.length>0||s.showLiveOnly.value)&&o.push({id:"live",label:"Live",enabled:!0,active:s.showLiveOnly.value,tooltip:"Show events happening now",variant:"default",action:"toggle",showResetButton:!1}),e.todayEvents.length>0&&o.push({id:"today",label:"Today",enabled:!0,active:s.date.value==="today",tooltip:"Show today's events",variant:"default",action:"toggle",showResetButton:!1}),e.tomorrowEvents.length>0&&o.push({id:"tomorrow",label:"Tomorrow",enabled:!0,active:s.date.value==="tomorrow",tooltip:"Show tomorrow's events",variant:"default",action:"toggle",showResetButton:!1}),e.pastEvents.length>0&&o.push({id:"past",label:"Past",enabled:!0,active:s.date.value==="past",tooltip:"Show past events",variant:"default",action:"toggle",showResetButton:!1}),e.venues.length>0&&o.push({id:"venues",label:"Venues",badge:s.selectedVenues.value.length>0?s.selectedVenues.value.length:void 0,enabled:!0,active:s.selectedVenues.value.length>0,tooltip:"Show events by venues",variant:"default",action:"custom",showResetButton:!0}),o}createShortcuts(){return this.computedShortcuts}handleShortcutClick(t){switch(t){case"live":this.toggleLiveFilter();break;case"bookmarks":this.toggleBookmarksFilter();break;case"tracks":this.rootStore.sessionsFilterStore.openFilterWithSections(["tracks"]);break;case"venues":this.rootStore.sessionsFilterStore.openFilterWithSections(["venues"]);break;case"speakers":this.rootStore.selectSpeakers();break;case"today":this.toggleDateFilter("today");break;case"tomorrow":this.toggleDateFilter("tomorrow");break;case"past":this.toggleDateFilter("past");break;case"earliest":this.toggleSortOrder();break;default:console.warn(`Unknown shortcut ID: ${t}`)}}handleShortcutReset(t){const{sessionsFilterStore:e}=this.rootStore;switch(t){case"live":e.setPending("showLiveOnly",!1),e.applyFilters();break;case"tracks":e.setPending("selectedTracks",[]),e.applyFilters();break;case"venues":e.setPending("selectedVenues",[]),e.applyFilters();break;case"bookmarks":e.setPending("showBookmarksOnly",!1),e.applyFilters();break;case"today":e.setPending("date","all"),e.applyFilters();break;case"tomorrow":e.setPending("date","all"),e.applyFilters();break;case"past":e.setPending("date","all"),e.applyFilters();break;default:console.warn(`Unknown shortcut reset ID: ${t}`)}}shouldShowShortcuts(){return this.rootStore.uiState.list.type==="sessions"&&this.rootStore.uiState.details===null}toggleBookmarksFilter(){const{sessionsFilterStore:t}=this.rootStore,e=!t.state.filters.showBookmarksOnly.value;t.setPending("showBookmarksOnly",e),t.applyFilters()}toggleLiveFilter(){const{sessionsFilterStore:t}=this.rootStore,e=!t.state.filters.showLiveOnly.value;t.setPending("showLiveOnly",e),t.applyFilters()}toggleDateFilter(t){const{sessionsFilterStore:e}=this.rootStore;e.state.filters.date.value===t?e.setPending("date","all"):e.setPending("date",t),e.applyFilters()}toggleSortOrder(){const{sessionsFilterStore:t}=this.rootStore,e=t.state.filters.sortOrder.value==="asc"?"desc":"asc";t.setPending("sortOrder",e),t.applyFilters()}}a([r],SessionsShortcutProvider.prototype,"computedShortcuts",null);
|
package/dist/esm/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Config } from '@expofp/config';
|
|
2
|
-
import { type Camera, type ListPanel, type PlannerOptions } from '@expofp/schema';
|
|
2
|
+
import { type Camera, type ListPanel, type PlannerOptions, type SessionsFilters } from '@expofp/schema';
|
|
3
3
|
/**
|
|
4
4
|
* Represents a floor plan.
|
|
5
5
|
*/
|
|
@@ -77,6 +77,11 @@ export interface FloorPlan {
|
|
|
77
77
|
select(slugOrExternalId: string): void;
|
|
78
78
|
/** Opens one of the named list panels (the `?bookmarks`, `?sessions`, … deep links). */
|
|
79
79
|
showList(list: ListPanel): void;
|
|
80
|
+
/**
|
|
81
|
+
* Opens the sessions list with exactly these filters, the omitted ones off
|
|
82
|
+
* (the `?showSessions[…]` deep link).
|
|
83
|
+
*/
|
|
84
|
+
showSessions(filters?: SessionsFilters): void;
|
|
80
85
|
/** Launches the tour with the given id; unknown ids fall back to the tours list. */
|
|
81
86
|
selectTour(tourId: string): void;
|
|
82
87
|
/** Opens the route planner, optionally pre-filled with slugs or the visitor's bookmarks. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expofp/floorplan",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.44.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/expofp/efp-app.git",
|
|
@@ -69,15 +69,15 @@
|
|
|
69
69
|
"tslib": "^2.3.0",
|
|
70
70
|
"uuid": "^9.0.1",
|
|
71
71
|
"zod": "4.4.3",
|
|
72
|
-
"@expofp/config": "3.
|
|
73
|
-
"@expofp/debug": "3.
|
|
74
|
-
"@expofp/geometry": "3.
|
|
75
|
-
"@expofp/renderer": "3.
|
|
76
|
-
"@expofp/resolve": "3.
|
|
77
|
-
"@expofp/schema": "3.
|
|
78
|
-
"@expofp/ui": "3.
|
|
79
|
-
"@expofp/utils": "3.
|
|
80
|
-
"@expofp/wayfinding": "3.
|
|
72
|
+
"@expofp/config": "3.44.0",
|
|
73
|
+
"@expofp/debug": "3.44.0",
|
|
74
|
+
"@expofp/geometry": "3.44.0",
|
|
75
|
+
"@expofp/renderer": "3.44.0",
|
|
76
|
+
"@expofp/resolve": "3.44.0",
|
|
77
|
+
"@expofp/schema": "3.44.0",
|
|
78
|
+
"@expofp/ui": "3.44.0",
|
|
79
|
+
"@expofp/utils": "3.44.0",
|
|
80
|
+
"@expofp/wayfinding": "3.44.0"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
83
|
"@babel/plugin-proposal-decorators": "^8.0.2",
|