@expofp/floorplan 3.12.3 → 3.13.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.
Files changed (71) hide show
  1. package/dist/browser/{Button-zq3iijlm.js → Button-BhFl-di8.js} +5 -5
  2. package/dist/browser/{CookieConsent-61gA3NcP.js → CookieConsent-sa6NrKxH.js} +7 -7
  3. package/dist/browser/{Debug-CvxxGRSy.js → Debug-C9cxUup2.js} +7 -7
  4. package/dist/browser/{Demo-r7XlbtbS.js → Demo-Ddm9RP_A.js} +9 -9
  5. package/dist/browser/{Free-Cb3Ribl4.js → Free-rUcFT9c4.js} +9 -9
  6. package/dist/browser/{Gallery-BnulBU-C.js → Gallery-DiQ8516Y.js} +9 -9
  7. package/dist/browser/{GpsLoader-DzoewLSm.js → GpsLoader-Dg3oPXFb.js} +10 -10
  8. package/dist/browser/{KioskStore-BeyRpXkw.js → KioskStore-DXzJYJDf.js} +3 -3
  9. package/dist/browser/{MaplibreAdapter-BaBldh68.js → MaplibreAdapter-CyrBeOGN.js} +9 -9
  10. package/dist/browser/{ModalContainer-DMdNt6JT.js → ModalContainer-De7wWR5x.js} +10 -10
  11. package/dist/browser/{PermissionNotice-aZ7Apmab.js → PermissionNotice-CZ2zOZpC.js} +6 -6
  12. package/dist/browser/{SetKioskMode-DtBrSTrp.js → SetKioskMode-CADu-Nec.js} +8 -8
  13. package/dist/browser/{ShowKiosk-BUzsXyMQ.js → ShowKiosk-DCb39wY6.js} +11 -11
  14. package/dist/browser/{TouchHand-D-em9G06.js → TouchHand-BfZmlSSQ.js} +4 -4
  15. package/dist/browser/{ViewerMenuPanel-C0tTM6Ya.js → ViewerMenuPanel-MrTdl0Lk.js} +9 -9
  16. package/dist/browser/{add-debug-secret-listener-BvRmUFV2.js → add-debug-secret-listener-BbMMQOGn.js} +1 -1
  17. package/dist/browser/{boolean-editor-DcqEJ8co.js → boolean-editor-CklOhr36.js} +9 -9
  18. package/dist/browser/{bootIntercom-BQoDztuO.js → bootIntercom-CGiDjnZs.js} +2 -2
  19. package/dist/browser/{booth-by-xy-JBkztXZR.js → booth-by-xy-ByPe7dOB.js} +6 -6
  20. package/dist/browser/bundle.json +66 -66
  21. package/dist/browser/{classnames-k2ThxA-q.js → classnames-Dg3Epqr5.js} +2 -2
  22. package/dist/browser/{client-DKa6p0uc.js → client-BtIR_QJ0.js} +4 -4
  23. package/dist/browser/{components-uVTRWyns.js → components-Ba7imFfV.js} +38 -38
  24. package/dist/browser/{debug-overlay-CmaTXVo_.js → debug-overlay-Mgkh8CCK.js} +10 -10
  25. package/dist/browser/{debug-ui-CrzH3R9z.js → debug-ui-DLG8EKHO.js} +6 -6
  26. package/dist/browser/{dist-BD4zeH3S.js → dist-B2eHvCOU.js} +5 -5
  27. package/dist/browser/{dist-CMKVbNfn.js → dist-ByAJEdRV.js} +3 -3
  28. package/dist/browser/{dist-hAA1hJJn.js → dist-Dd2UZ1cI.js} +6 -6
  29. package/dist/browser/{efp-debug-init-C1vzXVRH.js → efp-debug-init-BCsVUzwy.js} +3 -3
  30. package/dist/browser/{enum-editor-C7MT9uNV.js → enum-editor-DGQxevil.js} +4 -4
  31. package/dist/browser/{es5-BHQLywVb.js → es5-cfKynydw.js} +2 -2
  32. package/dist/browser/{event-not-found-JlOOy6g2.js → event-not-found-BJLLcNqO.js} +1 -1
  33. package/dist/browser/{exports-XffaF1gB.js → exports-BQHYfgvY.js} +1 -1
  34. package/dist/browser/{favicon-DtrHE4kd.js → favicon-C56bzaeG.js} +1 -1
  35. package/dist/browser/{fetch-retry.umd-Cg0U2KAy.js → fetch-retry.umd-DYC2sEmH.js} +2 -2
  36. package/dist/browser/{flex-CXlfxm2E.js → flex-8VuyKxuf.js} +5 -5
  37. package/dist/browser/{floorplan.loader-CxK5ziRT.js → floorplan.loader-B9Jv3g5N.js} +10 -10
  38. package/dist/browser/{floorplan.ready-mXSNjhI9.js → floorplan.ready-Cnxr8xZd.js} +14 -14
  39. package/dist/browser/{fuse-By8pE6hN.js → fuse-DgPaqPDU.js} +2 -2
  40. package/dist/browser/{i18n-DLy_nvsn.js → i18n-DL3k5TYE.js} +5 -5
  41. package/dist/browser/index.js +14 -14
  42. package/dist/browser/{index.module-DVhH3XrB.js → index.module-DvMglRjg.js} +4 -4
  43. package/dist/browser/{integrateKiosk-BnhKdnCb.js → integrateKiosk-DqfQtnQ5.js} +3 -3
  44. package/dist/browser/{is-webview-BVXu9jQP.js → is-webview-CYXkFxGI.js} +1 -1
  45. package/dist/browser/{jsx-runtime-Y_VUlz4y.js → jsx-runtime-Ddgd7eiz.js} +2 -2
  46. package/dist/browser/{lib-T7Q6vtRv.js → lib-Ba7o5H8-.js} +4 -4
  47. package/dist/browser/{loadImage-ulwASCLQ.js → loadImage-sIGoQ_pR.js} +4 -4
  48. package/dist/browser/{logDeviceInfo-CX6gL_1N.js → logDeviceInfo-DlAlNCzD.js} +9 -9
  49. package/dist/browser/{main-DQlzXtpO.js → main-BUG7EnSp.js} +1 -1
  50. package/dist/browser/{mobx-DZXoLfg-.js → mobx-CjGP1jW0.js} +4 -4
  51. package/dist/browser/{optional-boolean-editor-CbOP-pRw.js → optional-boolean-editor-Duqb7gc6.js} +3 -3
  52. package/dist/browser/{optional-enum-editor-BjOgDZsp.js → optional-enum-editor-DsJC_Z9B.js} +4 -4
  53. package/dist/browser/{optional-string-editor-Ck0PPS1E.js → optional-string-editor-CDPA6AbE.js} +4 -4
  54. package/dist/browser/{particles.min-ntH_Jup2.js → particles.min-Cw7MNnR7.js} +2 -2
  55. package/dist/browser/{prop-types-CHr8_AGw.js → prop-types-BYN2smyR.js} +2 -2
  56. package/dist/browser/{react-dom-D6kHIsPR.js → react-dom-Du74Uwxl.js} +3 -3
  57. package/dist/browser/{react-BOOk-FbS.js → react-jeXnPF9E.js} +2 -2
  58. package/dist/browser/{reset-all-settings-BhTY8Yy_.js → reset-all-settings-CSD5_eeL.js} +9 -9
  59. package/dist/browser/{rolldown-runtime-rz90HVle.js → rolldown-runtime-DE59zyqc.js} +1 -1
  60. package/dist/browser/{select-8KX0mpuq.js → select-jZKJ9MVb.js} +10 -10
  61. package/dist/browser/{settings-CWujo8MY.js → settings-CETkuvKR.js} +2 -2
  62. package/dist/browser/{settings-item-DHeFy2lb.js → settings-item-BCaZImcD.js} +6 -6
  63. package/dist/browser/{store-CPfIG9UN.js → store-Sol8yqmO.js} +639 -705
  64. package/dist/browser/{string-editor-Dvjcjkix.js → string-editor-DkEYMW6l.js} +4 -4
  65. package/dist/browser/{text-field-F5TXexZy.js → text-field-CPJjFaAn.js} +5 -5
  66. package/dist/browser/{theme-B9NgQQN9.js → theme-CN0bL8JF.js} +8 -8
  67. package/dist/browser/{ui-AGkDaWif.js → ui-CLJ3PDlT.js} +8 -8
  68. package/dist/browser/{useRenderTarget-9W120Vnp.js → useRenderTarget-BbbTquxP.js} +4 -4
  69. package/dist/esm/store/RouteStore.js +1 -1
  70. package/dist/esm/types.d.ts +7 -0
  71. package/package.json +8 -8
@@ -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.12.3" };
4
+ e.SENTRY_RELEASE = { id: "3.13.0" };
5
5
  var t = new e.Error().stack;
6
6
  t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "ebe8f804-597b-4b08-adc4-ca6b63645c83", e._sentryDebugIdIdentifier = "sentry-dbid-ebe8f804-597b-4b08-adc4-ca6b63645c83");
7
7
  } catch {}
8
8
  })();
9
- import { t as e } from "./jsx-runtime-Y_VUlz4y.js";
10
- import { t } from "./settings-item-DHeFy2lb.js";
11
- import { t as n } from "./text-field-F5TXexZy.js";
9
+ import { t as e } from "./jsx-runtime-Ddgd7eiz.js";
10
+ import { t } from "./settings-item-BCaZImcD.js";
11
+ import { t as n } from "./text-field-CPJjFaAn.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.12.3" };
4
+ e.SENTRY_RELEASE = { id: "3.13.0" };
5
5
  var t = new e.Error().stack;
6
6
  t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "651e1a3a-8897-47f8-8a5e-24137d6b0f0d", e._sentryDebugIdIdentifier = "sentry-dbid-651e1a3a-8897-47f8-8a5e-24137d6b0f0d");
7
7
  } catch {}
8
8
  })();
9
- import { r as e } from "./rolldown-runtime-rz90HVle.js";
10
- import { t } from "./react-BOOk-FbS.js";
11
- import { t as n } from "./classnames-k2ThxA-q.js";
12
- import { D as r, i, l as a, n as o, s, u as c, y as l } from "./flex-CXlfxm2E.js";
9
+ import { r as e } from "./rolldown-runtime-DE59zyqc.js";
10
+ import { t } from "./react-jeXnPF9E.js";
11
+ import { t as n } from "./classnames-Dg3Epqr5.js";
12
+ import { D as r, i, l as a, n as o, s, u as c, y as l } from "./flex-8VuyKxuf.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._925f851475345a9e5e368d312bb98178/node_modules/@radix-ui/themes/dist/esm/components/text-field.props.js
14
14
  var u = /* @__PURE__ */ e(t()), d = /* @__PURE__ */ e(n()), 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.12.3" };
4
+ e.SENTRY_RELEASE = { id: "3.13.0" };
5
5
  var t = new e.Error().stack;
6
6
  t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "864c18b1-0ffa-4523-9fe0-93bdf8a9090c", e._sentryDebugIdIdentifier = "sentry-dbid-864c18b1-0ffa-4523-9fe0-93bdf8a9090c");
7
7
  } catch {}
8
8
  })();
9
- import { r as e } from "./rolldown-runtime-rz90HVle.js";
10
- import { t } from "./react-BOOk-FbS.js";
11
- import { t as n } from "./jsx-runtime-Y_VUlz4y.js";
12
- import { t as r } from "./react-dom-D6kHIsPR.js";
13
- import { t as i } from "./classnames-k2ThxA-q.js";
14
- import { a, c as o, i as s, n as c, o as l, r as u, t as d } from "./dist-hAA1hJJn.js";
15
- import { C as f, E as p, O as m, T as h, _ as g, o as _, v, w as y } from "./flex-CXlfxm2E.js";
9
+ import { r as e } from "./rolldown-runtime-DE59zyqc.js";
10
+ import { t } from "./react-jeXnPF9E.js";
11
+ import { t as n } from "./jsx-runtime-Ddgd7eiz.js";
12
+ import { t as r } from "./react-dom-Du74Uwxl.js";
13
+ import { t as i } from "./classnames-Dg3Epqr5.js";
14
+ import { a, c as o, i as s, n as c, o as l, r as u, t as d } from "./dist-Dd2UZ1cI.js";
15
+ import { C as f, E as p, O as m, T as h, _ as g, o as _, v, w as y } from "./flex-8VuyKxuf.js";
16
16
  //#region ../../node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.2.17_react@19.2.7/node_modules/@radix-ui/react-id/dist/index.mjs
17
17
  var b = n(), x = /* @__PURE__ */ e(t(), 1), S = x.useId || (() => void 0), C = 0;
18
18
  function w(e) {
@@ -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.12.3" };
4
+ e.SENTRY_RELEASE = { id: "3.13.0" };
5
5
  var t = new e.Error().stack;
6
6
  t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "05a753ca-f6da-4c1e-acf5-eacf4d461db5", e._sentryDebugIdIdentifier = "sentry-dbid-05a753ca-f6da-4c1e-acf5-eacf4d461db5");
7
7
  } catch {}
8
8
  })();
9
- import { r as e } from "./rolldown-runtime-rz90HVle.js";
10
- import { a as t, i as n, s as r } from "./efp-debug-init-C1vzXVRH.js";
11
- import { a as i, o as a } from "./reset-all-settings-BhTY8Yy_.js";
12
- import { t as o } from "./jsx-runtime-Y_VUlz4y.js";
13
- import "./settings-CWujo8MY.js";
14
- import { t as s } from "./add-debug-secret-listener-BvRmUFV2.js";
9
+ import { r as e } from "./rolldown-runtime-DE59zyqc.js";
10
+ import { a as t, i as n, s as r } from "./efp-debug-init-BCsVUzwy.js";
11
+ import { a as i, o as a } from "./reset-all-settings-CSD5_eeL.js";
12
+ import { t as o } from "./jsx-runtime-Ddgd7eiz.js";
13
+ import "./settings-CETkuvKR.js";
14
+ import { t as s } from "./add-debug-secret-listener-BbMMQOGn.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-CrzH3R9z.js"), { createRoot: i } = await import("./client-DKa6p0uc.js").then((t) => /* @__PURE__ */ e(t.default, 1)), a = document.createElement("div");
29
+ let { DebugUi: n } = await import("./debug-ui-DLG8EKHO.js"), { createRoot: i } = await import("./client-BtIR_QJ0.js").then((t) => /* @__PURE__ */ e(t.default, 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.12.3" };
4
+ e.SENTRY_RELEASE = { id: "3.13.0" };
5
5
  var t = new e.Error().stack;
6
6
  t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "33455732-e070-4a3b-bdf3-a25a1f54c994", e._sentryDebugIdIdentifier = "sentry-dbid-33455732-e070-4a3b-bdf3-a25a1f54c994");
7
7
  } catch {}
8
8
  })();
9
- import { r as e } from "./rolldown-runtime-rz90HVle.js";
10
- import { t } from "./react-BOOk-FbS.js";
11
- import { c as n } from "./store-CPfIG9UN.js";
9
+ import { r as e } from "./rolldown-runtime-DE59zyqc.js";
10
+ import { t } from "./react-jeXnPF9E.js";
11
+ import { c as n } from "./store-Sol8yqmO.js";
12
12
  //#region src/utils/getRenderTargetFromRoot.ts
13
13
  var r = /* @__PURE__ */ e(t(), 1);
14
14
  function i(e) {
@@ -1 +1 @@
1
- import{__esDecorate as a,__runInitializers as r}from"tslib";import{action as m,computed as E,observable as f}from"mobx";import{Box as S,Point as Ye,boxContainsPoint as He,pointDistance as Fe}from"@expofp/geometry";import c,{layersStore as L}from".";import{fpGeo as P}from"../data/fpGeo";import{getName as Je}from"../components/Kiosk/SetKiosk";import{DEFAULT_UNITS as Ne,ORIENTATION_GRANTED_KEY as Qe}from"../constants";import Be from"../data";import{getLayerSvg as et,svgArea as g}from"../data/svg";import{GaEventActions as tt,sendEventToGa as st}from"../tools/gtag";import Ue from"../tools/logger";import{areLayersEnabled as it}from"../utils/areLayersEnabled";import{calcSpeed as Ze}from"../utils/calcSpeed";import{calcTravelTime as qe}from"../utils/calcTravelTime";import{calculateRelativeBearing as at,convertGpsToLocal as $e,isValidPointCoords as Ve}from"../utils/gps";import{boothToEndpoint as Ke,buildRoute as rt,CURRENT_LOCATION_NAME as nt,CURRENT_POSITION_POINT_ID as ot,isWayfindingReady as lt,KIOSK_ANCHOR_POINT_ID as ct,toArbitraryPoint as je}from"../wayfinding";import{BoothBase as R}from"./BoothStore";import{uiState as _}from"./index";import{LayersMode as ut}from"./LayerStore";const b=s=>typeof s=="string"?Number(s.replace(",",".")):s;let dt=(()=>{let s=[],n,l=[],h=[],y,v=[],k=[],z,D=[],I=[],A,w=[],M=[],C,G=[],O=[],F,N=[],B=[],U,Z=[],q=[],$,V=[],K=[],j,W=[],X=[],Y,H=[],J=[],Q,ee=[],te=[],se,ie=[],ae=[],re,ne=[],oe=[],le,ce=[],ue=[],de,fe,me,he,pe,_e,ye,ke,ge,be,Re,ve,xe,Ee=[],Te=[],Le,Se,Pe,ze,De,Ie,Ae=[],we=[],Me,Ce,Ge;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;n=[f],y=[f],z=[f],A=[f],C=[f],F=[f],U=[f],$=[f],j=[f],Y=[f],Q=[f],se=[f],re=[f],le=[f],de=[E],fe=[m],me=[m],he=[m],pe=[E({keepAlive:!0})],_e=[m],ye=[m],ke=[E({keepAlive:!0})],ge=[E({keepAlive:!0})],be=[m],Re=[m],ve=[m],xe=[f],Le=[E],Se=[m],Pe=[m],ze=[m],De=[m],Ie=[f],Me=[m],Ce=[E({keepAlive:!0})],Ge=[m],a(this,null,de,{kind:"getter",name:"canFindLocation",static:!1,private:!1,access:{has:e=>"canFindLocation"in e,get:e=>e.canFindLocation},metadata:t},null,s),a(this,null,fe,{kind:"method",name:"selectRoute",static:!1,private:!1,access:{has:e=>"selectRoute"in e,get:e=>e.selectRoute},metadata:t},null,s),a(this,null,me,{kind:"method",name:"rebuildRouteFromPosition",static:!1,private:!1,access:{has:e=>"rebuildRouteFromPosition"in e,get:e=>e.rebuildRouteFromPosition},metadata:t},null,s),a(this,null,he,{kind:"method",name:"setStartPoint",static:!1,private:!1,access:{has:e=>"setStartPoint"in e,get:e=>e.setStartPoint},metadata:t},null,s),a(this,null,pe,{kind:"getter",name:"pathLayers",static:!1,private:!1,access:{has:e=>"pathLayers"in e,get:e=>e.pathLayers},metadata:t},null,s),a(this,null,_e,{kind:"method",name:"setMarkers",static:!1,private:!1,access:{has:e=>"setMarkers"in e,get:e=>e.setMarkers},metadata:t},null,s),a(this,null,ye,{kind:"method",name:"selectMarker",static:!1,private:!1,access:{has:e=>"selectMarker"in e,get:e=>e.selectMarker},metadata:t},null,s),a(this,null,ke,{kind:"getter",name:"selectedMarkers",static:!1,private:!1,access:{has:e=>"selectedMarkers"in e,get:e=>e.selectedMarkers},metadata:t},null,s),a(this,null,ge,{kind:"getter",name:"layers",static:!1,private:!1,access:{has:e=>"layers"in e,get:e=>e.layers},metadata:t},null,s),a(this,null,be,{kind:"method",name:"clickRoute",static:!1,private:!1,access:{has:e=>"clickRoute"in e,get:e=>e.clickRoute},metadata:t},null,s),a(this,null,Re,{kind:"method",name:"selectCurrentPosition",static:!1,private:!1,access:{has:e=>"selectCurrentPosition"in e,get:e=>e.selectCurrentPosition},metadata:t},null,s),a(this,null,ve,{kind:"method",name:"findLocation",static:!1,private:!1,access:{has:e=>"findLocation"in e,get:e=>e.findLocation},metadata:t},null,s),a(this,null,Le,{kind:"getter",name:"routeInfo",static:!1,private:!1,access:{has:e=>"routeInfo"in e,get:e=>e.routeInfo},metadata:t},null,s),a(this,null,Se,{kind:"method",name:"updateRoute",static:!1,private:!1,access:{has:e=>"updateRoute"in e,get:e=>e.updateRoute},metadata:t},null,s),a(this,null,Pe,{kind:"method",name:"updateRouteDistance",static:!1,private:!1,access:{has:e=>"updateRouteDistance"in e,get:e=>e.updateRouteDistance},metadata:t},null,s),a(this,null,ze,{kind:"method",name:"updateRoutePoints",static:!1,private:!1,access:{has:e=>"updateRoutePoints"in e,get:e=>e.updateRoutePoints},metadata:t},null,s),a(this,null,De,{kind:"method",name:"checkRoutes",static:!1,private:!1,access:{has:e=>"checkRoutes"in e,get:e=>e.checkRoutes},metadata:t},null,s),a(this,null,Me,{kind:"method",name:"setGpsTrackingEnabled",static:!1,private:!1,access:{has:e=>"setGpsTrackingEnabled"in e,get:e=>e.setGpsTrackingEnabled},metadata:t},null,s),a(this,null,Ce,{kind:"getter",name:"gpsEnabled",static:!1,private:!1,access:{has:e=>"gpsEnabled"in e,get:e=>e.gpsEnabled},metadata:t},null,s),a(this,null,Ge,{kind:"method",name:"setOnlyAccessible",static:!1,private:!1,access:{has:e=>"setOnlyAccessible"in e,get:e=>e.setOnlyAccessible},metadata:t},null,s),a(null,null,n,{kind:"field",name:"routeLines",static:!1,private:!1,access:{has:e=>"routeLines"in e,get:e=>e.routeLines,set:(e,i)=>{e.routeLines=i}},metadata:t},l,h),a(null,null,y,{kind:"field",name:"routeDistance",static:!1,private:!1,access:{has:e=>"routeDistance"in e,get:e=>e.routeDistance,set:(e,i)=>{e.routeDistance=i}},metadata:t},v,k),a(null,null,z,{kind:"field",name:"currentPosition",static:!1,private:!1,access:{has:e=>"currentPosition"in e,get:e=>e.currentPosition,set:(e,i)=>{e.currentPosition=i}},metadata:t},D,I),a(null,null,A,{kind:"field",name:"requestCompass",static:!1,private:!1,access:{has:e=>"requestCompass"in e,get:e=>e.requestCompass,set:(e,i)=>{e.requestCompass=i}},metadata:t},w,M),a(null,null,C,{kind:"field",name:"iconType",static:!1,private:!1,access:{has:e=>"iconType"in e,get:e=>e.iconType,set:(e,i)=>{e.iconType=i}},metadata:t},G,O),a(null,null,F,{kind:"field",name:"tempToBooth",static:!1,private:!1,access:{has:e=>"tempToBooth"in e,get:e=>e.tempToBooth,set:(e,i)=>{e.tempToBooth=i}},metadata:t},N,B),a(null,null,U,{kind:"field",name:"focusEnabled",static:!1,private:!1,access:{has:e=>"focusEnabled"in e,get:e=>e.focusEnabled,set:(e,i)=>{e.focusEnabled=i}},metadata:t},Z,q),a(null,null,$,{kind:"field",name:"prevZ",static:!1,private:!1,access:{has:e=>"prevZ"in e,get:e=>e.prevZ,set:(e,i)=>{e.prevZ=i}},metadata:t},V,K),a(null,null,j,{kind:"field",name:"markersData",static:!1,private:!1,access:{has:e=>"markersData"in e,get:e=>e.markersData,set:(e,i)=>{e.markersData=i}},metadata:t},W,X),a(null,null,Y,{kind:"field",name:"prevMarkers",static:!1,private:!1,access:{has:e=>"prevMarkers"in e,get:e=>e.prevMarkers,set:(e,i)=>{e.prevMarkers=i}},metadata:t},H,J),a(null,null,Q,{kind:"field",name:"showAccessible",static:!1,private:!1,access:{has:e=>"showAccessible"in e,get:e=>e.showAccessible,set:(e,i)=>{e.showAccessible=i}},metadata:t},ee,te),a(null,null,se,{kind:"field",name:"onlyAccessible",static:!1,private:!1,access:{has:e=>"onlyAccessible"in e,get:e=>e.onlyAccessible,set:(e,i)=>{e.onlyAccessible=i}},metadata:t},ie,ae),a(null,null,re,{kind:"field",name:"currentRouteLayer",static:!1,private:!1,access:{has:e=>"currentRouteLayer"in e,get:e=>e.currentRouteLayer,set:(e,i)=>{e.currentRouteLayer=i}},metadata:t},ne,oe),a(null,null,le,{kind:"field",name:"currentRouteExhibitor",static:!1,private:!1,access:{has:e=>"currentRouteExhibitor"in e,get:e=>e.currentRouteExhibitor,set:(e,i)=>{e.currentRouteExhibitor=i}},metadata:t},ce,ue),a(null,null,xe,{kind:"field",name:"routeUnits",static:!1,private:!1,access:{has:e=>"routeUnits"in e,get:e=>e.routeUnits,set:(e,i)=>{e.routeUnits=i}},metadata:t},Ee,Te),a(null,null,Ie,{kind:"field",name:"isGpsTrackingEnabled",static:!1,private:!1,access:{has:e=>"isGpsTrackingEnabled"in e,get:e=>e.isGpsTrackingEnabled,set:(e,i)=>{e.isGpsTrackingEnabled=i}},metadata:t},Ae,we),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}rootStore=r(this,s);cpTimeout;routeLines=r(this,l,[]);routeDistance=(r(this,h),r(this,v,null));currentPosition=(r(this,k),r(this,D,null));requestCompass=(r(this,I),r(this,w,!1));iconType=(r(this,M),r(this,G,0));tempToBooth=(r(this,O),r(this,N,null));focusEnabled=(r(this,B),r(this,Z,!0));prevZ=(r(this,q),r(this,V,null));markersData=(r(this,K),r(this,W,{icons:[],markers:[]}));prevMarkers=(r(this,X),r(this,H,[]));showAccessible=(r(this,J),r(this,ee,!1));onlyAccessible=(r(this,te),r(this,ie,!1));currentRouteLayer=(r(this,ae),r(this,ne,null));currentRouteExhibitor=(r(this,oe),r(this,ce,null));constructor(t){r(this,we),this.rootStore=t,this.focusEnabled=!window.location.search}get canFindLocation(){return!!_.kioskData||!!this.currentPosition}selectRoute(t,e=!0,i=!1){if(e&&(_.list={type:"search",text:"",focused:!1}),t&&!t.from&&t.to){const d=this.resolveFallbackFrom();d&&(t=new Route(d,t.to,t.waypoints))}t?.from&&t?.to&&t.from===t.to&&(t=null);let o=[];t?.from&&t?.to&&window.setTimeout(()=>{this.rootStore.showMap()},navigator.userAgent.toLowerCase().indexOf("android")>-1?400:50),t?.from instanceof R&&t.from.visible&&o.push(t.from),t?.to instanceof R&&t.to.visible&&(this.tempToBooth=null,o.push(t.to)),!t&&c.fp.onDirection&&c.fp.onDirection(null);const u=()=>{if(this.rootStore.moveToList(o),_.details=t,t&&(!t.from||!t.to)&&c.showOverlay(),t?.to&&t?.from){const d=ft(t.from);d&&this.rootStore.layerStore.updateVisibility(d,!0)}if(!this.currentRouteLayer){const d=We(this.rootStore.layerStore,t?.from),p=We(this.rootStore.layerStore,t?.to);d?this.currentRouteLayer=d:p&&(this.currentRouteLayer=p)}e&&t?.from&&t?.to&&st(tt.ClickDirections,`${t?.from?"From "+t.from.name:""} ${t?.to?"To "+t.to.name:""}`)};i?u():setTimeout(u,200)}rebuildRouteFromPosition(t){const e=_.selectedRoute;e?.to&&this.selectRoute(new Route(t,e.to,e.waypoints),!1,!0)}resolveFallbackFrom(){if(this.currentPosition)return je(this.currentPosition,nt,ot);const t=_.kioskData;return t?je({x:t.x,y:t.y,z:t.z},Je(),ct):null}setStartPoint(t){const e=_.selectedRoute;if(e?.to&&!e?.from&&t){const i=new Route(t,e.to,e.waypoints);this.selectRoute(i)}}get pathLayers(){return c.routeStore.routeLines?.map(t=>t.p0.layer)?.filter((t,e,i)=>i.indexOf(t)===e).reverse().map((t,e)=>({id:e+1,layer:c.layerStore.findLayer(t)}))}getNearestBooth(t){if(!t)return null;let e=this.rootStore.layerStore.findLayer(t.z);const i=t.lat&&t.lng?$e(t,P.properties.config):t;return this.rootStore.boothStore.booths.filter(o=>L.mode===ut.Default||!e?o.visible&&o.rect:o.rect&&(typeof t.z!="number"&&!t.z&&o.visible||e.name===o.layer?.name)).sort((o,u)=>Fe(i,o.rect.center)-Fe(i,u.rect.center))[0]||null}setMarkers(t){this.markersData.markers=(t?.markers??[]).map(mt),this.markersData.icons=t?.icons??[]}selectMarker(t,e){const i=this.markersData.markers.find(u=>u.id===t);this.markersData.markers.forEach(u=>u.active=!1),i&&(i.active=!0);let o=c.layerStore.findLayer(i?.z);if(e&&i){const u=c.rendererService.renderer;return o&&!o?.visible&&L.updateVisibility(o,!0),u?u.controls.panTo(i.x,i.y):(Ue.warn("Renderer is not initialized. Cannot pan to marker."),Promise.resolve())}return Promise.resolve()}get selectedMarkers(){return this.markersData.markers.filter(t=>t.active)}get layers(){var t=[];return c.routeStore.routeLines?.map(e=>e.p0.layer).reverse().forEach(e=>{t.indexOf(e)===-1&&t.push(e)}),t.map(e=>c.layerStore.layers.find(i=>i.name===e))}clickRoute(t,e){window.__resett&&window.__resett(),this.rootStore.uiState.menu=null,_.list.type==="route-planner"&&(_.list={type:"search",text:"",focused:!1}),this.selectRoute(new Route(t,e))}selectCurrentPosition(t,e=!0,i){clearTimeout(this.cpTimeout),t&&(t.x=b(t.x),t.y=b(t.y),t.lat=b(t.lat),t.lng=b(t.lng),it()||(t.z=null));const o=e&&this.rootStore.uiState.details&&!(this.rootStore.uiState.details instanceof Route),u=e&&!o&&(this.focusEnabled||this.prevZ!=t?.z);this.focusEnabled&&(this.focusEnabled=!1),this.prevZ=t?.z?.toString(),this.iconType=i?1:0;const d=t?ht(t):null;if(!d){this.currentPosition=null;return}const p=c.layerStore.findLayer(t.z),x=new CurrentPosition(d.x,d.y,p?.name||this.currentRouteLayer?.name,at(d),t.lat,t.lng);let Oe=!this.routeLines?.length;if(p&&this.routeLines?.length&&(Oe=!!this.routeLines.find(T=>T.p0.layer===p.name||T.p1.layer===p.name)),u&&Oe){const T=c.rendererService.renderer;if(p&&!p?.visible&&L.updateVisibility(p,!0),!T){Ue.warn("Renderer is not initialized. Cannot pan to current position.");return}T.controls.panTo(x.x,x.y)}this.currentPosition=x,this.gpsEnabled||(this.cpTimeout=setTimeout(()=>{this.currentPosition&&this.selectCurrentPosition(null,!1)},30*1e3))}findLocation(){if(!this.canFindLocation)return;if(c.maplibreStore.showMaplibre){_.moveToLocation=!0;return}const t=this.currentPosition??_.kioskData;if(!t)return;this.currentPosition&&localStorage.getItem(Qe)==="false"&&(c.routeStore.requestCompass=!0);const e=S.fromCenter(t,{x:100,y:100});let i;if(e.intersects(g))i=e;else{const u=Math.max(g.min.x,Math.min(t.x,g.max.x)),d=Math.max(g.min.y,Math.min(t.y,g.max.y)),p=Math.min(g.size.width,g.size.height)*.3,x=S.fromCenter({x:u,y:d},{x:p,y:p}).intersection(g);i=x?S.fromUnion(e,x):e}_.moveToRect=i;const o=c.layerStore.findLayer(t.z);o&&L.updateVisibility(o,!0)}routeUnits=(r(this,ue),r(this,Ee,Ne));get routeInfo(){const t=this.routeDistance,e=this.routeUnits;return t?{distance:`${t}${e}`,units:e,time:qe(t,Ze(e))}:null}updateRoute(t,e){!t?.length&&!this.routeLines.length||(this.routeLines=t,this.updateRoutePoints())}updateRouteDistance(t){if(t==null)return;const e=et(),i=(e.getAttribute("units")||Ne).toLowerCase?.().trim(),o=e.getAttribute("fp-ver")?.startsWith("5")??!1;this.routeDistance=Math.round(t/(o?1:10)),this.routeUnits=i,this.updateRoutePoints()}updateRoutePoints(){const t=_.selectedRoute,e=this.routeDistance,i=this.routeUnits;c.fp.onDirection&&setTimeout(()=>{c.fp.onDirection({from:Xe(t?.from??null),to:Xe(t?.to??null),lines:this.routeLines,distance:`${e}${i}`,units:i,time:qe(e,Ze(i))})},200)}checkRoutes(){if(!lt()){console.warn("checkRoutes: wayfinding is not initialized \u2014 call createWayfinding() first. Skipping route check.");return}const t=c.boothStore.booths;console.info(`Route check started ${t.length}.... `);for(let e=0;e<t.length;e++){const i=t[e];for(let o=e+1;o<t.length;o++){const u=t[o];rt(Ke(i),Ke(u)).lines.length||console.warn(`No route found from ${i.name} to ${u.name}`)}}console.info("Route check done....")}isGpsTrackingEnabled=(r(this,Te),r(this,Ae,!0));setGpsTrackingEnabled(t){this.isGpsTrackingEnabled=t}get gpsEnabled(){return Be.autoTrackingGps&&this.isGpsTrackingEnabled&&!Be.enableIPS}setOnlyAccessible(t){this.onlyAccessible=t}}})();export default dt;function ft(s){if(s)return s instanceof R?s.layer?.name:s.layer}function We(s,n){return n?n instanceof R?n.layer??null:s.findLayer(n.layer):null}function mt(s){return{...s,x:b(s.x),y:b(s.y),lat:b(s.lat),lng:b(s.lng)}}function ht(s){let n=null,l=null;return P&&(n=P.properties.config),n&&He({min:n.p0,max:n.p2},s)?l={...s}:n&&Ve(s.lat)&&Ve(s.lng)?l=$e(s,n):n||(l=s),l||null}export function findBooth(s){return c.boothStore.findBooth(s)||c.exhibitorStore.findExhibitor(s)?.booths[0]}export function findEntityByExternalId(s){const n=c.boothStore.boothByExternalId.get(s);if(n)return{type:"booth",entity:n};const l=c.exhibitorStore.exhibitorByExternalId.get(s);if(l)return{type:"exhibitor",entity:l}}export function separateExternalIds(s){const n=[],l=[];for(const h of s){const y=findEntityByExternalId(h);y&&(y.type==="booth"?n.push(h):l.push(h))}return{boothExternalIds:n,exhibitorExternalIds:l}}export function extractRoute(s,n,l){return new Route(findBooth(s)??null,findBooth(n)??null,l?.map(h=>findBooth(h)))}export class Route{from;to;waypoints;constructor(n,l,h){this.from=n,this.to=l,this.waypoints=h;const y=n instanceof R?n.id:void 0,v=l instanceof R?l.id:void 0;this.waypoints=h?.filter(k=>k&&k.id!==y&&k.id!==v)}}function Xe(s){return s?s instanceof R?{id:s.id,name:s.name,externalId:s.externalId,layer:{name:s.layer?.name,description:s.layer?.description}}:{id:Number.MAX_SAFE_INTEGER,name:s.name,externalId:void 0,layer:{name:s.layer,description:void 0}}:null}export class CurrentPosition extends Ye{x;y;z;angle;lat;lng;constructor(n,l,h,y,v,k){super(n,l),this.x=n,this.y=l,this.z=h,this.angle=y,this.lat=v,this.lng=k}}
1
+ import{__esDecorate as a,__runInitializers as r}from"tslib";import{action as m,computed as E,observable as f}from"mobx";import{Box as S,Point as Ye,boxContainsPoint as He,pointDistance as Fe}from"@expofp/geometry";import c,{layersStore as L}from".";import{fpGeo as P}from"../data/fpGeo";import{getName as Je}from"../components/Kiosk/SetKiosk";import{DEFAULT_UNITS as Ne,ORIENTATION_GRANTED_KEY as Qe}from"../constants";import Be from"../data";import{getLayerSvg as et,svgArea as g}from"../data/svg";import{GaEventActions as tt,sendEventToGa as st}from"../tools/gtag";import Ue from"../tools/logger";import{areLayersEnabled as it}from"../utils/areLayersEnabled";import{calcSpeed as Ze}from"../utils/calcSpeed";import{calcTravelTime as qe}from"../utils/calcTravelTime";import{calculateRelativeBearing as at,convertGpsToLocal as $e,isValidPointCoords as Ve}from"../utils/gps";import{boothToEndpoint as Ke,buildRoute as rt,CURRENT_LOCATION_NAME as nt,CURRENT_POSITION_POINT_ID as ot,isWayfindingReady as lt,KIOSK_ANCHOR_POINT_ID as ct,toArbitraryPoint as je}from"../wayfinding";import{BoothBase as R}from"./BoothStore";import{uiState as _}from"./index";import{LayersMode as ut}from"./LayerStore";const b=s=>typeof s=="string"?Number(s.replace(",",".")):s;let dt=(()=>{let s=[],n,l=[],h=[],y,v=[],k=[],z,D=[],I=[],A,w=[],M=[],C,G=[],O=[],F,N=[],B=[],U,Z=[],q=[],$,V=[],K=[],j,W=[],X=[],Y,H=[],J=[],Q,ee=[],te=[],se,ie=[],ae=[],re,ne=[],oe=[],le,ce=[],ue=[],de,fe,me,he,pe,_e,ye,ke,ge,be,Re,ve,xe,Ee=[],Te=[],Le,Se,Pe,ze,De,Ie,Ae=[],we=[],Me,Ce,Ge;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;n=[f],y=[f],z=[f],A=[f],C=[f],F=[f],U=[f],$=[f],j=[f],Y=[f],Q=[f],se=[f],re=[f],le=[f],de=[E],fe=[m],me=[m],he=[m],pe=[E({keepAlive:!0})],_e=[m],ye=[m],ke=[E({keepAlive:!0})],ge=[E({keepAlive:!0})],be=[m],Re=[m],ve=[m],xe=[f],Le=[E],Se=[m],Pe=[m],ze=[m],De=[m],Ie=[f],Me=[m],Ce=[E({keepAlive:!0})],Ge=[m],a(this,null,de,{kind:"getter",name:"canFindLocation",static:!1,private:!1,access:{has:e=>"canFindLocation"in e,get:e=>e.canFindLocation},metadata:t},null,s),a(this,null,fe,{kind:"method",name:"selectRoute",static:!1,private:!1,access:{has:e=>"selectRoute"in e,get:e=>e.selectRoute},metadata:t},null,s),a(this,null,me,{kind:"method",name:"rebuildRouteFromPosition",static:!1,private:!1,access:{has:e=>"rebuildRouteFromPosition"in e,get:e=>e.rebuildRouteFromPosition},metadata:t},null,s),a(this,null,he,{kind:"method",name:"setStartPoint",static:!1,private:!1,access:{has:e=>"setStartPoint"in e,get:e=>e.setStartPoint},metadata:t},null,s),a(this,null,pe,{kind:"getter",name:"pathLayers",static:!1,private:!1,access:{has:e=>"pathLayers"in e,get:e=>e.pathLayers},metadata:t},null,s),a(this,null,_e,{kind:"method",name:"setMarkers",static:!1,private:!1,access:{has:e=>"setMarkers"in e,get:e=>e.setMarkers},metadata:t},null,s),a(this,null,ye,{kind:"method",name:"selectMarker",static:!1,private:!1,access:{has:e=>"selectMarker"in e,get:e=>e.selectMarker},metadata:t},null,s),a(this,null,ke,{kind:"getter",name:"selectedMarkers",static:!1,private:!1,access:{has:e=>"selectedMarkers"in e,get:e=>e.selectedMarkers},metadata:t},null,s),a(this,null,ge,{kind:"getter",name:"layers",static:!1,private:!1,access:{has:e=>"layers"in e,get:e=>e.layers},metadata:t},null,s),a(this,null,be,{kind:"method",name:"clickRoute",static:!1,private:!1,access:{has:e=>"clickRoute"in e,get:e=>e.clickRoute},metadata:t},null,s),a(this,null,Re,{kind:"method",name:"selectCurrentPosition",static:!1,private:!1,access:{has:e=>"selectCurrentPosition"in e,get:e=>e.selectCurrentPosition},metadata:t},null,s),a(this,null,ve,{kind:"method",name:"findLocation",static:!1,private:!1,access:{has:e=>"findLocation"in e,get:e=>e.findLocation},metadata:t},null,s),a(this,null,Le,{kind:"getter",name:"routeInfo",static:!1,private:!1,access:{has:e=>"routeInfo"in e,get:e=>e.routeInfo},metadata:t},null,s),a(this,null,Se,{kind:"method",name:"updateRoute",static:!1,private:!1,access:{has:e=>"updateRoute"in e,get:e=>e.updateRoute},metadata:t},null,s),a(this,null,Pe,{kind:"method",name:"updateRouteDistance",static:!1,private:!1,access:{has:e=>"updateRouteDistance"in e,get:e=>e.updateRouteDistance},metadata:t},null,s),a(this,null,ze,{kind:"method",name:"updateRoutePoints",static:!1,private:!1,access:{has:e=>"updateRoutePoints"in e,get:e=>e.updateRoutePoints},metadata:t},null,s),a(this,null,De,{kind:"method",name:"checkRoutes",static:!1,private:!1,access:{has:e=>"checkRoutes"in e,get:e=>e.checkRoutes},metadata:t},null,s),a(this,null,Me,{kind:"method",name:"setGpsTrackingEnabled",static:!1,private:!1,access:{has:e=>"setGpsTrackingEnabled"in e,get:e=>e.setGpsTrackingEnabled},metadata:t},null,s),a(this,null,Ce,{kind:"getter",name:"gpsEnabled",static:!1,private:!1,access:{has:e=>"gpsEnabled"in e,get:e=>e.gpsEnabled},metadata:t},null,s),a(this,null,Ge,{kind:"method",name:"setOnlyAccessible",static:!1,private:!1,access:{has:e=>"setOnlyAccessible"in e,get:e=>e.setOnlyAccessible},metadata:t},null,s),a(null,null,n,{kind:"field",name:"routeLines",static:!1,private:!1,access:{has:e=>"routeLines"in e,get:e=>e.routeLines,set:(e,i)=>{e.routeLines=i}},metadata:t},l,h),a(null,null,y,{kind:"field",name:"routeDistance",static:!1,private:!1,access:{has:e=>"routeDistance"in e,get:e=>e.routeDistance,set:(e,i)=>{e.routeDistance=i}},metadata:t},v,k),a(null,null,z,{kind:"field",name:"currentPosition",static:!1,private:!1,access:{has:e=>"currentPosition"in e,get:e=>e.currentPosition,set:(e,i)=>{e.currentPosition=i}},metadata:t},D,I),a(null,null,A,{kind:"field",name:"requestCompass",static:!1,private:!1,access:{has:e=>"requestCompass"in e,get:e=>e.requestCompass,set:(e,i)=>{e.requestCompass=i}},metadata:t},w,M),a(null,null,C,{kind:"field",name:"iconType",static:!1,private:!1,access:{has:e=>"iconType"in e,get:e=>e.iconType,set:(e,i)=>{e.iconType=i}},metadata:t},G,O),a(null,null,F,{kind:"field",name:"tempToBooth",static:!1,private:!1,access:{has:e=>"tempToBooth"in e,get:e=>e.tempToBooth,set:(e,i)=>{e.tempToBooth=i}},metadata:t},N,B),a(null,null,U,{kind:"field",name:"focusEnabled",static:!1,private:!1,access:{has:e=>"focusEnabled"in e,get:e=>e.focusEnabled,set:(e,i)=>{e.focusEnabled=i}},metadata:t},Z,q),a(null,null,$,{kind:"field",name:"prevZ",static:!1,private:!1,access:{has:e=>"prevZ"in e,get:e=>e.prevZ,set:(e,i)=>{e.prevZ=i}},metadata:t},V,K),a(null,null,j,{kind:"field",name:"markersData",static:!1,private:!1,access:{has:e=>"markersData"in e,get:e=>e.markersData,set:(e,i)=>{e.markersData=i}},metadata:t},W,X),a(null,null,Y,{kind:"field",name:"prevMarkers",static:!1,private:!1,access:{has:e=>"prevMarkers"in e,get:e=>e.prevMarkers,set:(e,i)=>{e.prevMarkers=i}},metadata:t},H,J),a(null,null,Q,{kind:"field",name:"showAccessible",static:!1,private:!1,access:{has:e=>"showAccessible"in e,get:e=>e.showAccessible,set:(e,i)=>{e.showAccessible=i}},metadata:t},ee,te),a(null,null,se,{kind:"field",name:"onlyAccessible",static:!1,private:!1,access:{has:e=>"onlyAccessible"in e,get:e=>e.onlyAccessible,set:(e,i)=>{e.onlyAccessible=i}},metadata:t},ie,ae),a(null,null,re,{kind:"field",name:"currentRouteLayer",static:!1,private:!1,access:{has:e=>"currentRouteLayer"in e,get:e=>e.currentRouteLayer,set:(e,i)=>{e.currentRouteLayer=i}},metadata:t},ne,oe),a(null,null,le,{kind:"field",name:"currentRouteExhibitor",static:!1,private:!1,access:{has:e=>"currentRouteExhibitor"in e,get:e=>e.currentRouteExhibitor,set:(e,i)=>{e.currentRouteExhibitor=i}},metadata:t},ce,ue),a(null,null,xe,{kind:"field",name:"routeUnits",static:!1,private:!1,access:{has:e=>"routeUnits"in e,get:e=>e.routeUnits,set:(e,i)=>{e.routeUnits=i}},metadata:t},Ee,Te),a(null,null,Ie,{kind:"field",name:"isGpsTrackingEnabled",static:!1,private:!1,access:{has:e=>"isGpsTrackingEnabled"in e,get:e=>e.isGpsTrackingEnabled,set:(e,i)=>{e.isGpsTrackingEnabled=i}},metadata:t},Ae,we),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}rootStore=r(this,s);cpTimeout;routeLines=r(this,l,[]);routeDistance=(r(this,h),r(this,v,null));currentPosition=(r(this,k),r(this,D,null));requestCompass=(r(this,I),r(this,w,!1));iconType=(r(this,M),r(this,G,0));tempToBooth=(r(this,O),r(this,N,null));focusEnabled=(r(this,B),r(this,Z,!0));prevZ=(r(this,q),r(this,V,null));markersData=(r(this,K),r(this,W,{icons:[],markers:[]}));prevMarkers=(r(this,X),r(this,H,[]));showAccessible=(r(this,J),r(this,ee,!1));onlyAccessible=(r(this,te),r(this,ie,!1));currentRouteLayer=(r(this,ae),r(this,ne,null));currentRouteExhibitor=(r(this,oe),r(this,ce,null));constructor(t){r(this,we),this.rootStore=t,this.focusEnabled=!window.location.search}get canFindLocation(){return!!_.kioskData||!!this.currentPosition}selectRoute(t,e=!0,i=!1){if(e&&(_.list={type:"search",text:"",focused:!1}),t&&!t.from&&t.to){const d=this.resolveFallbackFrom();d&&(t=new Route(d,t.to,t.waypoints))}t?.from&&t?.to&&t.from===t.to&&(t=null);let o=[];t?.from&&t?.to&&window.setTimeout(()=>{this.rootStore.showMap()},navigator.userAgent.toLowerCase().indexOf("android")>-1?400:50),t?.from instanceof R&&t.from.visible&&o.push(t.from),t?.to instanceof R&&t.to.visible&&(this.tempToBooth=null,o.push(t.to)),!t&&c.fp.onDirection&&c.fp.onDirection(null);const u=()=>{if(this.rootStore.moveToList(o),_.details=t,t&&(!t.from||!t.to)&&c.showOverlay(),t?.to&&t?.from){const d=ft(t.from);d&&this.rootStore.layerStore.updateVisibility(d,!0)}if(!this.currentRouteLayer){const d=We(this.rootStore.layerStore,t?.from),p=We(this.rootStore.layerStore,t?.to);d?this.currentRouteLayer=d:p&&(this.currentRouteLayer=p)}e&&t?.from&&t?.to&&st(tt.ClickDirections,`${t?.from?"From "+t.from.name:""} ${t?.to?"To "+t.to.name:""}`)};i?u():setTimeout(u,200)}rebuildRouteFromPosition(t){const e=_.selectedRoute;e?.to&&this.selectRoute(new Route(t,e.to,e.waypoints),!1,!0)}resolveFallbackFrom(){if(this.currentPosition)return je(this.currentPosition,nt,ot);const t=_.kioskData;return t?je({x:t.x,y:t.y,z:t.z},Je(),ct):null}setStartPoint(t){const e=_.selectedRoute;if(e?.to&&!e?.from&&t){const i=new Route(t,e.to,e.waypoints);this.selectRoute(i)}}get pathLayers(){return c.routeStore.routeLines?.map(t=>t.p0.layer)?.filter((t,e,i)=>i.indexOf(t)===e).map((t,e)=>({id:e+1,layer:c.layerStore.findLayer(t)}))}getNearestBooth(t){if(!t)return null;let e=this.rootStore.layerStore.findLayer(t.z);const i=t.lat&&t.lng?$e(t,P.properties.config):t;return this.rootStore.boothStore.booths.filter(o=>L.mode===ut.Default||!e?o.visible&&o.rect:o.rect&&(typeof t.z!="number"&&!t.z&&o.visible||e.name===o.layer?.name)).sort((o,u)=>Fe(i,o.rect.center)-Fe(i,u.rect.center))[0]||null}setMarkers(t){this.markersData.markers=(t?.markers??[]).map(mt),this.markersData.icons=t?.icons??[]}selectMarker(t,e){const i=this.markersData.markers.find(u=>u.id===t);this.markersData.markers.forEach(u=>u.active=!1),i&&(i.active=!0);let o=c.layerStore.findLayer(i?.z);if(e&&i){const u=c.rendererService.renderer;return o&&!o?.visible&&L.updateVisibility(o,!0),u?u.controls.panTo(i.x,i.y):(Ue.warn("Renderer is not initialized. Cannot pan to marker."),Promise.resolve())}return Promise.resolve()}get selectedMarkers(){return this.markersData.markers.filter(t=>t.active)}get layers(){var t=[];return c.routeStore.routeLines?.map(e=>e.p0.layer).forEach(e=>{t.indexOf(e)===-1&&t.push(e)}),t.map(e=>c.layerStore.layers.find(i=>i.name===e))}clickRoute(t,e){window.__resett&&window.__resett(),this.rootStore.uiState.menu=null,_.list.type==="route-planner"&&(_.list={type:"search",text:"",focused:!1}),this.selectRoute(new Route(t,e))}selectCurrentPosition(t,e=!0,i){clearTimeout(this.cpTimeout),t&&(t.x=b(t.x),t.y=b(t.y),t.lat=b(t.lat),t.lng=b(t.lng),it()||(t.z=null));const o=e&&this.rootStore.uiState.details&&!(this.rootStore.uiState.details instanceof Route),u=e&&!o&&(this.focusEnabled||this.prevZ!=t?.z);this.focusEnabled&&(this.focusEnabled=!1),this.prevZ=t?.z?.toString(),this.iconType=i?1:0;const d=t?ht(t):null;if(!d){this.currentPosition=null;return}const p=c.layerStore.findLayer(t.z),x=new CurrentPosition(d.x,d.y,p?.name||this.currentRouteLayer?.name,at(d),t.lat,t.lng);let Oe=!this.routeLines?.length;if(p&&this.routeLines?.length&&(Oe=!!this.routeLines.find(T=>T.p0.layer===p.name||T.p1.layer===p.name)),u&&Oe){const T=c.rendererService.renderer;if(p&&!p?.visible&&L.updateVisibility(p,!0),!T){Ue.warn("Renderer is not initialized. Cannot pan to current position.");return}T.controls.panTo(x.x,x.y)}this.currentPosition=x,this.gpsEnabled||(this.cpTimeout=setTimeout(()=>{this.currentPosition&&this.selectCurrentPosition(null,!1)},30*1e3))}findLocation(){if(!this.canFindLocation)return;if(c.maplibreStore.showMaplibre){_.moveToLocation=!0;return}const t=this.currentPosition??_.kioskData;if(!t)return;this.currentPosition&&localStorage.getItem(Qe)==="false"&&(c.routeStore.requestCompass=!0);const e=S.fromCenter(t,{x:100,y:100});let i;if(e.intersects(g))i=e;else{const u=Math.max(g.min.x,Math.min(t.x,g.max.x)),d=Math.max(g.min.y,Math.min(t.y,g.max.y)),p=Math.min(g.size.width,g.size.height)*.3,x=S.fromCenter({x:u,y:d},{x:p,y:p}).intersection(g);i=x?S.fromUnion(e,x):e}_.moveToRect=i;const o=c.layerStore.findLayer(t.z);o&&L.updateVisibility(o,!0)}routeUnits=(r(this,ue),r(this,Ee,Ne));get routeInfo(){const t=this.routeDistance,e=this.routeUnits;return t?{distance:`${t}${e}`,units:e,time:qe(t,Ze(e))}:null}updateRoute(t,e){!t?.length&&!this.routeLines.length||(this.routeLines=t,this.updateRoutePoints())}updateRouteDistance(t){if(t==null)return;const e=et(),i=(e.getAttribute("units")||Ne).toLowerCase?.().trim(),o=e.getAttribute("fp-ver")?.startsWith("5")??!1;this.routeDistance=Math.round(t/(o?1:10)),this.routeUnits=i,this.updateRoutePoints()}updateRoutePoints(){const t=_.selectedRoute,e=this.routeDistance,i=this.routeUnits;c.fp.onDirection&&setTimeout(()=>{c.fp.onDirection({from:Xe(t?.from??null),to:Xe(t?.to??null),lines:this.routeLines,distance:`${e}${i}`,units:i,time:qe(e,Ze(i))})},200)}checkRoutes(){if(!lt()){console.warn("checkRoutes: wayfinding is not initialized \u2014 call createWayfinding() first. Skipping route check.");return}const t=c.boothStore.booths;console.info(`Route check started ${t.length}.... `);for(let e=0;e<t.length;e++){const i=t[e];for(let o=e+1;o<t.length;o++){const u=t[o];rt(Ke(i),Ke(u)).lines.length||console.warn(`No route found from ${i.name} to ${u.name}`)}}console.info("Route check done....")}isGpsTrackingEnabled=(r(this,Te),r(this,Ae,!0));setGpsTrackingEnabled(t){this.isGpsTrackingEnabled=t}get gpsEnabled(){return Be.autoTrackingGps&&this.isGpsTrackingEnabled&&!Be.enableIPS}setOnlyAccessible(t){this.onlyAccessible=t}}})();export default dt;function ft(s){if(s)return s instanceof R?s.layer?.name:s.layer}function We(s,n){return n?n instanceof R?n.layer??null:s.findLayer(n.layer):null}function mt(s){return{...s,x:b(s.x),y:b(s.y),lat:b(s.lat),lng:b(s.lng)}}function ht(s){let n=null,l=null;return P&&(n=P.properties.config),n&&He({min:n.p0,max:n.p2},s)?l={...s}:n&&Ve(s.lat)&&Ve(s.lng)?l=$e(s,n):n||(l=s),l||null}export function findBooth(s){return c.boothStore.findBooth(s)||c.exhibitorStore.findExhibitor(s)?.booths[0]}export function findEntityByExternalId(s){const n=c.boothStore.boothByExternalId.get(s);if(n)return{type:"booth",entity:n};const l=c.exhibitorStore.exhibitorByExternalId.get(s);if(l)return{type:"exhibitor",entity:l}}export function separateExternalIds(s){const n=[],l=[];for(const h of s){const y=findEntityByExternalId(h);y&&(y.type==="booth"?n.push(h):l.push(h))}return{boothExternalIds:n,exhibitorExternalIds:l}}export function extractRoute(s,n,l){return new Route(findBooth(s)??null,findBooth(n)??null,l?.map(h=>findBooth(h)))}export class Route{from;to;waypoints;constructor(n,l,h){this.from=n,this.to=l,this.waypoints=h;const y=n instanceof R?n.id:void 0,v=l instanceof R?l.id:void 0;this.waypoints=h?.filter(k=>k&&k.id!==y&&k.id!==v)}}function Xe(s){return s?s instanceof R?{id:s.id,name:s.name,externalId:s.externalId,layer:{name:s.layer?.name,description:s.layer?.description}}:{id:Number.MAX_SAFE_INTEGER,name:s.name,externalId:void 0,layer:{name:s.layer,description:void 0}}:null}export class CurrentPosition extends Ye{x;y;z;angle;lat;lng;constructor(n,l,h,y,v,k){super(n,l),this.x=n,this.y=l,this.z=h,this.angle=y,this.lat=v,this.lng=k}}
@@ -209,6 +209,13 @@ type FloorPlanCategoryClickEvent = FloorPlanCategory;
209
209
  export interface FloorPlanDirectionEvent {
210
210
  from: FloorPlanBoothBase;
211
211
  to: FloorPlanBoothBase;
212
+ /**
213
+ * Route polyline segments in walking order — from the origin (`from`) to the
214
+ * destination (`to`), each `p0 → p1` pointing forward along the route.
215
+ *
216
+ * Changed in v3.12.0: segments run source→target. Earlier versions emitted
217
+ * them reversed (target→source, with `p0`/`p1` swapped).
218
+ */
212
219
  lines: {
213
220
  p0: Point;
214
221
  p1: Point;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expofp/floorplan",
3
- "version": "3.12.3",
3
+ "version": "3.13.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/expofp/efp-app.git",
@@ -72,13 +72,13 @@
72
72
  "tslib": "^2.3.0",
73
73
  "uuid": "^9.0.1",
74
74
  "zod": "4.3.5",
75
- "@expofp/config": "3.12.3",
76
- "@expofp/debug": "3.12.3",
77
- "@expofp/geometry": "3.12.3",
78
- "@expofp/resolve": "3.12.3",
79
- "@expofp/schema": "3.12.3",
80
- "@expofp/utils": "3.12.3",
81
- "@expofp/wayfinding": "3.12.3"
75
+ "@expofp/config": "3.13.0",
76
+ "@expofp/debug": "3.13.0",
77
+ "@expofp/geometry": "3.13.0",
78
+ "@expofp/resolve": "3.13.0",
79
+ "@expofp/schema": "3.13.0",
80
+ "@expofp/utils": "3.13.0",
81
+ "@expofp/wayfinding": "3.13.0"
82
82
  },
83
83
  "devDependencies": {
84
84
  "@babel/plugin-proposal-decorators": "^8.0.2",