@expofp/floorplan 3.7.17 → 3.9.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 (193) hide show
  1. package/dist/browser/{Button-CalAncSt.js → Button-D6kSs8oT.js} +5 -5
  2. package/dist/browser/{CookieConsent-ZygvYtDb.js → CookieConsent-COR-7PnR.js} +7 -7
  3. package/dist/browser/{Debug-D0iAX94G.js → Debug-hcVDK_6B.js} +7 -7
  4. package/dist/browser/{Demo-DtZnCrNU.js → Demo-CXfqKcNa.js} +9 -9
  5. package/dist/browser/{Free-CY2ZgfTi.js → Free-UltUjcsW.js} +9 -9
  6. package/dist/browser/{Gallery-BJyU80Q8.js → Gallery-Dw_l4-HJ.js} +9 -9
  7. package/dist/browser/{GpsLoader-C4Az3Ogj.js → GpsLoader-BeUr-tWe.js} +36 -36
  8. package/dist/browser/{KioskStore-D3xv5iMJ.js → KioskStore-rXGF6ISj.js} +67 -67
  9. package/dist/browser/{MaplibreAdapter-BI5hr4DA.js → MaplibreAdapter-DBu4xFLx.js} +941 -960
  10. package/dist/browser/{ModalContainer-CGy7G3W-.js → ModalContainer-CHubcxXg.js} +10 -10
  11. package/dist/browser/{PermissionNotice-BQl-Eh0U.js → PermissionNotice-Dcyf-h-X.js} +6 -6
  12. package/dist/browser/{SetKioskMode-puXODfKF.js → SetKioskMode-Dsaeb_7s.js} +11 -11
  13. package/dist/browser/ShowKiosk-B33TvvNh.js +28 -0
  14. package/dist/browser/{TouchHand-DjRl3mqw.js → TouchHand-BglJHdqZ.js} +4 -4
  15. package/dist/browser/{ViewerMenuPanel-DwpOTh1A.js → ViewerMenuPanel-6hwMrGsD.js} +10 -10
  16. package/dist/browser/{add-debug-secret-listener-0zbOfR23.js → add-debug-secret-listener-CrjDiiDe.js} +1 -1
  17. package/dist/browser/{boolean-editor-Ct-PRF2J.js → boolean-editor-B8TY5r_7.js} +9 -9
  18. package/dist/browser/{bootIntercom-CNJJMQLU.js → bootIntercom-BLVUFUo9.js} +2 -2
  19. package/dist/browser/{browser-Dvk9Y0QP.js → browser-C0ZAqhfq.js} +2 -2
  20. package/dist/browser/bundle.json +61 -61
  21. package/dist/browser/{classnames-N7RelmSW.js → classnames-CORO_J9N.js} +2 -2
  22. package/dist/browser/{client-B3oB_gzf.js → client-B8k3_zlK.js} +4 -4
  23. package/dist/browser/{components-DCWqd4OH.js → components-Br23UmiD.js} +1857 -1861
  24. package/dist/browser/{createWayfinding-DCYv9I1K.js → createWayfinding-CywBuuhE.js} +552 -533
  25. package/dist/browser/{debug-overlay-C1zmn9JP.js → debug-overlay-OnJ9mpi3.js} +10 -10
  26. package/dist/browser/{debug-ui-Dk4TQW1Q.js → debug-ui-BGxXBqCM.js} +6 -6
  27. package/dist/browser/{dist-CZ9F3ShM.js → dist-Bwo0bena.js} +5 -5
  28. package/dist/browser/{dist-Dhhxwn3m.js → dist-DJcDQ9wl.js} +3 -3
  29. package/dist/browser/{dist-BjWXGdvS.js → dist-DeenbCqa.js} +6 -6
  30. package/dist/browser/{efp-debug-init-BY441NPw.js → efp-debug-init-D4xpSVxZ.js} +2 -2
  31. package/dist/browser/{enum-editor-wsFvRjdm.js → enum-editor-BtQ7q_B6.js} +11 -11
  32. package/dist/browser/{es5--a3vRB-s.js → es5-DyYwMIHo.js} +2 -2
  33. package/dist/browser/{event-not-found-C08dNiXm.js → event-not-found-DHZml9YG.js} +1 -1
  34. package/dist/browser/{exports-DnnAyWkZ.js → exports-BSvGPafo.js} +1 -1
  35. package/dist/browser/{favicon-BUBgyUNE.js → favicon-7eGefoDS.js} +1 -1
  36. package/dist/browser/{fetch-retry.umd-DqWbcFb6.js → fetch-retry.umd-D4q_0lN2.js} +2 -2
  37. package/dist/browser/{flex-BJvbUFUw.js → flex-BNMB3s0s.js} +5 -5
  38. package/dist/browser/{floorplan.loader-DtRqhN7h.js → floorplan.loader-C464BfTl.js} +45 -45
  39. package/dist/browser/{floorplan.ready-DU_ul7oy.js → floorplan.ready-F-rEW40x.js} +309 -233
  40. package/dist/browser/{fuse-C1gHDLf6.js → fuse-BOOzXNLy.js} +2 -2
  41. package/dist/browser/{i18n-GqZrkrT3.js → i18n-CJxFIIru.js} +9 -9
  42. package/dist/browser/index.js +12 -12
  43. package/dist/browser/{index.module-ClFPQstA.js → index.module-CkT4oOvs.js} +26 -26
  44. package/dist/browser/{is-webview-Ubd69hDX.js → is-webview-B86RAuQv.js} +1 -1
  45. package/dist/browser/{jsx-runtime-CcqjcKRn.js → jsx-runtime-3_7049j-.js} +2 -2
  46. package/dist/browser/{lib-D-VhTz7u.js → lib-CjZn5G8Q.js} +4 -4
  47. package/dist/browser/{loadImage-BSgOJpEi.js → loadImage-CV72jhce.js} +5 -5
  48. package/dist/browser/locales/ar.json +4 -1
  49. package/dist/browser/locales/da.json +4 -1
  50. package/dist/browser/locales/de.json +4 -1
  51. package/dist/browser/locales/es.json +4 -1
  52. package/dist/browser/locales/fr.json +4 -1
  53. package/dist/browser/locales/he.json +4 -1
  54. package/dist/browser/locales/it.json +4 -1
  55. package/dist/browser/locales/kk.json +4 -1
  56. package/dist/browser/locales/ko.json +4 -1
  57. package/dist/browser/locales/mn.json +4 -1
  58. package/dist/browser/locales/nl.json +4 -1
  59. package/dist/browser/locales/pl.json +4 -1
  60. package/dist/browser/locales/pt.json +4 -1
  61. package/dist/browser/locales/ru.json +4 -1
  62. package/dist/browser/locales/sv.json +4 -1
  63. package/dist/browser/locales/th.json +4 -1
  64. package/dist/browser/locales/tr.json +4 -1
  65. package/dist/browser/locales/uk.json +4 -1
  66. package/dist/browser/locales/vi.json +4 -1
  67. package/dist/browser/locales/zh.json +4 -1
  68. package/dist/browser/{logDeviceInfo-CqPbQalh.js → logDeviceInfo-CH_mwixN.js} +9 -9
  69. package/dist/browser/{main-D02oALU5.js → main-DBcClnTP.js} +1 -1
  70. package/dist/browser/{mobx-9haaaJQN.js → mobx-Cnc_mxKS.js} +8 -8
  71. package/dist/browser/{particles.min-Cy0_xv2F.js → particles.min-Bdddyoyn.js} +2 -2
  72. package/dist/browser/{prop-types-CGmwvRRk.js → prop-types-D9saedjy.js} +2 -2
  73. package/dist/browser/{react-C94g1dWf.js → react-CtAjLpE4.js} +2 -2
  74. package/dist/browser/{react-dom-VzzznUin.js → react-dom-9Z9grXEI.js} +3 -3
  75. package/dist/browser/{reset-all-settings-Bs45R4UK.js → reset-all-settings-D2rGLtD9.js} +7 -7
  76. package/dist/browser/{rolldown-runtime-DDajFMnr.js → rolldown-runtime-6HCGHF5o.js} +1 -1
  77. package/dist/browser/{settings-item-CTgteXDw.js → settings-item-CmuDoi0N.js} +6 -6
  78. package/dist/browser/{settings-B89NEO7Z.js → settings-r2jCygEX.js} +2 -2
  79. package/dist/browser/{store-39MLQcdz.js → store-hsXE5nII.js} +6753 -6669
  80. package/dist/browser/{string-editor-4uawnaDY.js → string-editor-UncyEsWj.js} +7 -7
  81. package/dist/browser/{theme-CWzone56.js → theme-DmuulesT.js} +8 -8
  82. package/dist/browser/{ui-D8Gz1TVh.js → ui-CBeseOX-.js} +8 -8
  83. package/dist/browser/{useRenderTarget-BSjQ_3rd.js → useRenderTarget-C5lcypnV.js} +4 -4
  84. package/dist/esm/components/LevelSelector.js +1 -1
  85. package/dist/esm/components/Map/Map.js +1 -1
  86. package/dist/esm/components/Map/booth-by-xy.js +1 -1
  87. package/dist/esm/components/Map/drawing/config/config-booth-badge.js +1 -1
  88. package/dist/esm/components/Map/drawing/config/config-booth-bg.js +1 -1
  89. package/dist/esm/components/Map/drawing/config/config-booth-bookmark.d.ts +1 -1
  90. package/dist/esm/components/Map/drawing/config/config-booth-bookmark.js +1 -1
  91. package/dist/esm/components/Map/drawing/config/config-booth-border.js +1 -1
  92. package/dist/esm/components/Map/drawing/config/config-booth-labels-special.d.ts +1 -2
  93. package/dist/esm/components/Map/drawing/config/config-booth-labels-special.js +2 -2
  94. package/dist/esm/components/Map/drawing/config/config-booth-labels.d.ts +4 -4
  95. package/dist/esm/components/Map/drawing/config/config-booth-labels.js +1 -1
  96. package/dist/esm/components/Map/drawing/config/config-booths.js +1 -1
  97. package/dist/esm/components/Map/drawing/config/config-load-layer.js +1 -1
  98. package/dist/esm/components/Map/drawing/config/config-markers.js +1 -1
  99. package/dist/esm/components/Map/drawing/config/loadBoothsImages.d.ts +10 -4
  100. package/dist/esm/components/Map/drawing/config/loadBoothsImages.js +1 -1
  101. package/dist/esm/components/Map/traffic/useBuildRoute.js +5 -5
  102. package/dist/esm/components/Map/traffic/useManageTraffic.js +1 -1
  103. package/dist/esm/components/Maplibre/MaplibreAdapter.js +1 -1
  104. package/dist/esm/components/Maplibre/useCameraReactions.d.ts +2 -2
  105. package/dist/esm/components/Maplibre/useCameraReactions.js +1 -1
  106. package/dist/esm/components/Maplibre/useLayerVisibilitySync.d.ts +2 -2
  107. package/dist/esm/components/Maplibre/useLayerVisibilitySync.js +1 -1
  108. package/dist/esm/components/Maplibre/utils/geo-config.d.ts +6 -6
  109. package/dist/esm/components/Maplibre/utils/geo-config.js +1 -1
  110. package/dist/esm/components/Maplibre/utils/solver.js +1 -1
  111. package/dist/esm/components/gps/useUserLocationAndHeading.d.ts +1 -1
  112. package/dist/esm/components/gps/useUserLocationAndHeading.js +1 -1
  113. package/dist/esm/components/gps/utils.d.ts +1 -1
  114. package/dist/esm/components/gps/utils.js +1 -1
  115. package/dist/esm/data/svg.d.ts +4 -4
  116. package/dist/esm/data/svg.js +1 -1
  117. package/dist/esm/floorplan.ready.d.ts +39 -2
  118. package/dist/esm/floorplan.ready.js +1 -1
  119. package/dist/esm/renderer/engine-core/canvases.d.ts +1 -1
  120. package/dist/esm/renderer/engine-core/canvases.js +1 -1
  121. package/dist/esm/renderer/engine-core/defs.d.ts +23 -4
  122. package/dist/esm/renderer/engine-core/defs.js +3 -3
  123. package/dist/esm/renderer/engine-core/types.d.ts +13 -2
  124. package/dist/esm/renderer/engine-core/update-def.d.ts +3 -2
  125. package/dist/esm/renderer/engine-core/update-def.js +1 -1
  126. package/dist/esm/renderer/engine-core/utils/rotation.d.ts +13 -1
  127. package/dist/esm/renderer/index.d.ts +2 -2
  128. package/dist/esm/renderer/index.js +1 -1
  129. package/dist/esm/services/routing.js +1 -1
  130. package/dist/esm/store/BoothStore.d.ts +14 -2
  131. package/dist/esm/store/BoothStore.js +1 -1
  132. package/dist/esm/store/LayerStore.d.ts +4 -4
  133. package/dist/esm/store/LayerStore.js +1 -1
  134. package/dist/esm/store/RouteStore.d.ts +3 -3
  135. package/dist/esm/store/RouteStore.js +1 -1
  136. package/dist/esm/store/UIState.d.ts +6 -7
  137. package/dist/esm/store/UIState.js +1 -1
  138. package/dist/esm/store/init/init-booths.js +1 -1
  139. package/dist/esm/store/init/init-layers.js +1 -1
  140. package/dist/esm/store/init/init-ui.js +1 -1
  141. package/dist/esm/store/search-buttons/SearchButtonsFactory.js +1 -1
  142. package/dist/esm/utils/gps.d.ts +0 -1
  143. package/dist/esm/utils/gps.js +1 -1
  144. package/dist/esm/utils/i18n.d.ts +9 -0
  145. package/dist/esm/utils/i18n.js +1 -1
  146. package/dist/esm/utils/imageloader.d.ts +1 -3
  147. package/dist/esm/utils/imageloader.js +1 -1
  148. package/dist/esm/utils/math.d.ts +0 -1
  149. package/dist/esm/utils/math.js +1 -1
  150. package/dist/esm/wayfinding/adapters/boothToEndpoint.d.ts +4 -0
  151. package/dist/esm/wayfinding/adapters/boothToEndpoint.js +1 -1
  152. package/dist/esm/wayfinding/core/geometry/projectPointOnSegment.d.ts +7 -6
  153. package/dist/esm/wayfinding/core/geometry/projectPointOnSegment.js +1 -1
  154. package/dist/esm/wayfinding/core/graph/graphHelpers.js +1 -1
  155. package/dist/esm/wayfinding/core/graph/linkCost.js +1 -1
  156. package/dist/esm/wayfinding/core/graph/pathfinder/aStarPathFinder.js +1 -1
  157. package/dist/esm/wayfinding/core/index.d.ts +0 -1
  158. package/dist/esm/wayfinding/core/position/distanceToRoute.d.ts +1 -1
  159. package/dist/esm/wayfinding/core/position/distanceToRoute.js +1 -1
  160. package/dist/esm/wayfinding/core/position/gpsThreshold.js +1 -1
  161. package/dist/esm/wayfinding/core/position/rerouteController.d.ts +1 -1
  162. package/dist/esm/wayfinding/core/position/rerouteController.js +1 -1
  163. package/dist/esm/wayfinding/core/position/snapToRoute.js +1 -1
  164. package/dist/esm/wayfinding/core/rendering/computeTrailPoints.d.ts +2 -2
  165. package/dist/esm/wayfinding/core/rendering/computeTrailPoints.js +1 -1
  166. package/dist/esm/wayfinding/core/rendering/normalizeRouteDirection.d.ts +1 -1
  167. package/dist/esm/wayfinding/core/rendering/normalizeRouteDirection.js +1 -1
  168. package/dist/esm/wayfinding/core/rendering/routeGeometry.d.ts +4 -8
  169. package/dist/esm/wayfinding/core/rendering/routeGeometry.js +1 -1
  170. package/dist/esm/wayfinding/core/routing/getRouteLength.js +1 -1
  171. package/dist/esm/wayfinding/createWayfinding.js +1 -1
  172. package/dist/esm/wayfinding/handlers/kioskHandler.js +1 -1
  173. package/dist/esm/wayfinding/renderer/iconManager.js +1 -1
  174. package/dist/esm/wayfinding/runtime/createWayfindingRuntime.js +1 -1
  175. package/dist/esm/wayfinding/runtime/positionView.d.ts +3 -3
  176. package/dist/esm/wayfinding/runtime/positionView.js +1 -1
  177. package/dist/esm/wayfinding/runtime/routeUpdate.d.ts +6 -5
  178. package/dist/esm/wayfinding/runtime/routeUpdate.js +1 -1
  179. package/dist/esm/wayfinding/runtime/types.d.ts +4 -3
  180. package/package.json +4 -4
  181. package/dist/browser/ShowKiosk-78DDAGCM.js +0 -28
  182. package/dist/esm/components/Map/drawing/config/Rect.d.ts +0 -7
  183. package/dist/esm/components/Map/drawing/config/Rect.js +0 -1
  184. package/dist/esm/core/Line.d.ts +0 -12
  185. package/dist/esm/core/Line.js +0 -1
  186. package/dist/esm/core/Polygon.d.ts +0 -16
  187. package/dist/esm/core/Polygon.js +0 -1
  188. package/dist/esm/core/Rect.d.ts +0 -36
  189. package/dist/esm/core/Rect.js +0 -1
  190. package/dist/esm/core/Size.d.ts +0 -7
  191. package/dist/esm/core/Size.js +0 -1
  192. package/dist/esm/utils/haversineDistance.d.ts +0 -7
  193. package/dist/esm/utils/haversineDistance.js +0 -1
@@ -1,4 +1,5 @@
1
- import { Rect, TextDef, TextLineDef } from '@expofp/renderer';
1
+ import { Rect as RendererRect, TextDef, TextLineDef } from '@expofp/renderer';
2
+ import { Rect } from '@expofp/geometry';
2
3
  import { FontSizeFactor } from './types';
3
4
  export declare function updateLinesScale(lines: TextLineDef[], scale: number, fontSizes: [FontSizeFactor[], FontSizeFactor[]], name?: string): boolean;
4
5
  export declare function updateTextDefRotation(textDef: TextDef, rotation: number): TextDef;
@@ -7,5 +8,5 @@ export declare function getRotation(newAngle: number, currentRotation: number):
7
8
  export declare function shouldFlip(newAngle: number, currentRotation: number): boolean;
8
9
  export declare function getAngleDiff(newAngle: number, currentRotation: number, isVertical?: boolean): number | undefined;
9
10
  export declare function flipAngle(angle: number): number;
10
- export declare function getClampedBoundsCanvas(rect: Rect, canvas: HTMLCanvasElement, padding: number, scale: number): Rect;
11
+ export declare function getClampedBoundsCanvas(rect: Rect | RendererRect, canvas: HTMLCanvasElement, padding: number, scale: number): RendererRect;
11
12
  //# sourceMappingURL=update-def.d.ts.map
@@ -1 +1 @@
1
- import{Rect as k}from"@expofp/renderer";import{getBounds as C}from"./canvases";export function updateLinesScale(t,n,o,e=""){let s=!1;return t.forEach((a,i)=>{let c=0;o[i].forEach(({value:h,scaleFactor:u})=>{n<u&&(c=h)}),a.fontSize!==c*n&&(s=!0),a.fontSize=c*n}),s}export function updateTextDefRotation(t,n){const o=t.bounds.size;return t.bounds.rotation+=n,t.bounds.size={x:o.y,y:o.x},t}export function updateRectRotation(t,n){const{size:o,center:e,rotation:s}=t;return new k({x:e.x-o.y/2,y:e.y-o.x/2},{x:e.x+o.y/2,y:e.y+o.x/2},s+n)}export function getRotation(t,n){const o=getAngleDiff(t,n);if(Math.abs(o)>Math.PI/4)return Math.sign(o)*Math.PI/2}export function shouldFlip(t,n){const o=getAngleDiff(t,n),e=Math.PI/2;return Math.abs(o)>e+.1}export function getAngleDiff(t,n,o=!1){const e=Math.PI,s=2*e;return((i,c)=>((i-c+e)%s+s)%s-e)(t,n)}export function flipAngle(t){return(t+Math.PI+Math.PI)%(2*Math.PI)-Math.PI}export function getClampedBoundsCanvas(t,n,o,e){const s=n.width,a=n.height,i=t.size,c=t.center,h=t.rotation,m=i.x/s,M=i.x-o*2,b=(i.y-o*2)*.8,g=0,y=M/s,I=b/a,P=Math.min(y,I,m);e=Math.min(Math.max(e,g),P);const S=s*e,z=a*e,r=Math.sin(h),f=Math.cos(h),x=i.x/2-o,d=-i.y/2+o,R=c.x+x*f-d*r,W=c.y+x*r+d*f,p=S/2,l=-z/2,B=p*f-l*r,H=p*r+l*f,X=R-B,Y=W-H;return C(X,Y,s,a,e,h)}
1
+ import{Rect as k}from"@expofp/geometry";import{getBounds as C}from"./canvases";import{rectToRenderer as T}from"./defs";export function updateLinesScale(t,n,o,e=""){let s=!1;return t.forEach((a,i)=>{let c=0;o[i].forEach(({value:h,scaleFactor:u})=>{n<u&&(c=h)}),a.fontSize!==c*n&&(s=!0),a.fontSize=c*n}),s}export function updateTextDefRotation(t,n){const o=t.bounds.size;return t.bounds.rotation+=n,t.bounds.size={x:o.y,y:o.x},t}export function updateRectRotation(t,n){const{size:o,center:e,rotation:s}=t;return new k(e,{x:o.y,y:o.x},s+n)}export function getRotation(t,n){const o=getAngleDiff(t,n);if(Math.abs(o)>Math.PI/4)return Math.sign(o)*Math.PI/2}export function shouldFlip(t,n){const o=getAngleDiff(t,n),e=Math.PI/2;return Math.abs(o)>e+.1}export function getAngleDiff(t,n,o=!1){const e=Math.PI,s=2*e;return((i,c)=>((i-c+e)%s+s)%s-e)(t,n)}export function flipAngle(t){return(t+Math.PI+Math.PI)%(2*Math.PI)-Math.PI}export function getClampedBoundsCanvas(t,n,o,e){const s=n.width,a=n.height,i=t.size,c=t.center,h=t.rotation,l=i.x/s,M=i.x-o*2,b=(i.y-o*2)*.8,g=0,y=M/s,I=b/a,P=Math.min(y,I,l);e=Math.min(Math.max(e,g),P);const R=s*e,S=a*e,r=Math.sin(h),f=Math.cos(h),d=i.x/2-o,p=-i.y/2+o,z=c.x+d*f-p*r,W=c.y+d*r+p*f,x=R/2,m=-S/2,B=x*f-m*r,H=x*r+m*f,X=z-B,Y=W-H;return T(C(X,Y,s,a,e,h))}
@@ -1,5 +1,17 @@
1
1
  import { ImageDef, Rect } from '@expofp/renderer';
2
- export declare function isInnerInsideOuter(inner: Rect, outer?: Rect): boolean;
2
+ type RectLike = {
3
+ readonly center: {
4
+ readonly x: number;
5
+ readonly y: number;
6
+ };
7
+ readonly size: {
8
+ readonly x: number;
9
+ readonly y: number;
10
+ };
11
+ readonly rotation: number;
12
+ };
13
+ export declare function isInnerInsideOuter(inner: Rect, outer?: RectLike): boolean;
3
14
  export declare function flipImageDef(imageDef: ImageDef, angle: number): ImageDef;
4
15
  export declare function rotateImageDef(imageDef: ImageDef, angle: number): ImageDef;
16
+ export {};
5
17
  //# sourceMappingURL=rotation.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { IndicesType, MeshType, VerticesType, Line, TextLines, DefOptions, Point, FontSizeFactor } from './engine-core/types';
2
- import { rectToShapeDef, meshToShapeDef, createLayerDef, createLineDef, createSceneDef, createImageDef, createShapeDef, createTextDefLines, createTextDef, createShapeDot } from './engine-core/defs';
2
+ import { rectToShapeDef, meshToShapeDef, createLayerDef, createLineDef, createSceneDef, createImageDef, createShapeDef, createTextDefLines, createTextDef, createShapeDot, boxToRenderer, rectToRenderer, polygonToRenderer } from './engine-core/defs';
3
3
  import { updateLinesScale, updateTextDefRotation, getRotation, shouldFlip, getAngleDiff, getClampedBoundsCanvas, flipAngle, updateRectRotation } from './engine-core/update-def';
4
4
  import { createCircleCanvas, createBookmarkCanvas, getBounds } from './engine-core/canvases';
5
5
  import { loadCustomFontsUrls, CustomFonts, DEFAULT_FONT_URL, DEFAULT_FONT_LIGHT_URL } from './engine-core/fonts';
@@ -8,7 +8,7 @@ import { mapRollSetting, getRollValue } from './engine-core/settings';
8
8
  import { ImageDefWithParentBounds } from './engine-core/types';
9
9
  import { RendererService } from './RendererService';
10
10
  export type { IndicesType, MeshType, VerticesType, Line, TextLines, DefOptions, FontSizeFactor, Point, };
11
- export { rectToShapeDef, meshToShapeDef, createLayerDef, createLineDef, createSceneDef, createImageDef, createShapeDef, createTextDef, createTextDefLines, createShapeDot, };
11
+ export { rectToShapeDef, meshToShapeDef, createLayerDef, createLineDef, createSceneDef, createImageDef, createShapeDef, createTextDef, createTextDefLines, createShapeDot, boxToRenderer, rectToRenderer, polygonToRenderer, };
12
12
  export { updateLinesScale, updateTextDefRotation, getRotation, shouldFlip, flipAngle, getAngleDiff, getClampedBoundsCanvas, };
13
13
  export { createCircleCanvas, createBookmarkCanvas, getBounds };
14
14
  export { loadCustomFontsUrls, DEFAULT_FONT_URL, DEFAULT_FONT_LIGHT_URL };
@@ -1 +1 @@
1
- import{rectToShapeDef as e,meshToShapeDef as t,createLayerDef as r,createLineDef as o,createSceneDef as a,createImageDef as p,createShapeDef as f,createTextDefLines as i,createTextDef as m,createShapeDot as n}from"./engine-core/defs";import{updateLinesScale as c,updateTextDefRotation as l,getRotation as D,shouldFlip as s,getAngleDiff as d,getClampedBoundsCanvas as g,flipAngle as T,updateRectRotation as u}from"./engine-core/update-def";import{createCircleCanvas as x,createBookmarkCanvas as L,getBounds as R}from"./engine-core/canvases";import{loadCustomFontsUrls as S,DEFAULT_FONT_URL as h,DEFAULT_FONT_LIGHT_URL as C}from"./engine-core/fonts";import{isInnerInsideOuter as F,flipImageDef as I}from"./engine-core/utils/rotation";import{mapRollSetting as U,getRollValue as _}from"./engine-core/settings";import{RendererService as v}from"./RendererService";export{e as rectToShapeDef,t as meshToShapeDef,r as createLayerDef,o as createLineDef,a as createSceneDef,p as createImageDef,f as createShapeDef,m as createTextDef,i as createTextDefLines,n as createShapeDot};export{c as updateLinesScale,l as updateTextDefRotation,D as getRotation,s as shouldFlip,T as flipAngle,d as getAngleDiff,g as getClampedBoundsCanvas};export{x as createCircleCanvas,L as createBookmarkCanvas,R as getBounds};export{S as loadCustomFontsUrls,h as DEFAULT_FONT_URL,C as DEFAULT_FONT_LIGHT_URL};export{F as isInnerInsideOuter,U as mapRollSetting,_ as getRollValue,u as updateRectRotation,I as flipImageDef};export{v as RendererService};
1
+ import{rectToShapeDef as e,meshToShapeDef as t,createLayerDef as r,createLineDef as o,createSceneDef as a,createImageDef as p,createShapeDef as n,createTextDefLines as f,createTextDef as i,createShapeDot as m,boxToRenderer as c,rectToRenderer as l,polygonToRenderer as D}from"./engine-core/defs";import{updateLinesScale as s,updateTextDefRotation as d,getRotation as T,shouldFlip as R,getAngleDiff as g,getClampedBoundsCanvas as x,flipAngle as u,updateRectRotation as L}from"./engine-core/update-def";import{createCircleCanvas as S,createBookmarkCanvas as h,getBounds as C}from"./engine-core/canvases";import{loadCustomFontsUrls as F,DEFAULT_FONT_URL as I,DEFAULT_FONT_LIGHT_URL as U}from"./engine-core/fonts";import{isInnerInsideOuter as _,flipImageDef as v}from"./engine-core/utils/rotation";import{mapRollSetting as A,getRollValue as B}from"./engine-core/settings";import{RendererService as O}from"./RendererService";export{e as rectToShapeDef,t as meshToShapeDef,r as createLayerDef,o as createLineDef,a as createSceneDef,p as createImageDef,n as createShapeDef,i as createTextDef,f as createTextDefLines,m as createShapeDot,c as boxToRenderer,l as rectToRenderer,D as polygonToRenderer};export{s as updateLinesScale,d as updateTextDefRotation,T as getRotation,R as shouldFlip,u as flipAngle,g as getAngleDiff,x as getClampedBoundsCanvas};export{S as createCircleCanvas,h as createBookmarkCanvas,C as getBounds};export{F as loadCustomFontsUrls,I as DEFAULT_FONT_URL,U as DEFAULT_FONT_LIGHT_URL};export{_ as isInnerInsideOuter,A as mapRollSetting,B as getRollValue,L as updateRectRotation,v as flipImageDef};export{O as RendererService};
@@ -1 +1 @@
1
- import{createBrowserHistory as oe}from"history";import{autorun as O,reaction as k,runInAction as A}from"mobx";import{recoverKioskFromUrlPrams as se}from"../components/Kiosk/recoverKioskFromUrlPrams";import{BUILD_ROUTE_KEY as re,KIOSK_ENABLE_KEY as F,LANG_KEY as N,LANGUAGE_TYPE as E,MAP_SETTINGS_KEY as ae,PATHWAY_KEY as $,PLANNER_FROM_KEY as Y,PLANNER_KEY as P,PLANNER_SOURCE_KEY as K,PREVIEW_MODE_QUERY as I,PREVIEW_MODE_STORAGE_KEY as W,SEPARATOR as R,UI_SCALE_PARAM_KEY as V,UI_SCALE_RESET_PARAM_KEY as H,VIEWER_MODE_QUERY as x,VIEWER_MODE_STORAGE_KEY as G}from"../constants";import ie from"../core/Rect";import v from"../data";import o,{uiState as n}from"../store";import{BoothBase as D}from"../store/BoothStore";import{CurrentPosition as ne,extractRoute as le,findBooth as ce}from"../store/RouteStore";import{setConsentSettings as z}from"../tools/gtag";import U from"../tools/logger";import{areLayersEnabled as ue}from"../utils/areLayersEnabled";import{handleCustomCommand as he}from"../utils/customCommands";import{getMostFrequent as fe}from"../utils/getMostFrequent";import{hasLocale as de,setLocale as me}from"../utils/i18n";import{isLocalStorageAvailable as L}from"../utils/localStorage";import{stripTrackingParams as pe}from"../utils/trackingParams";let m=!1,C=!1,j=null,q=null,Q=null,J;const h=oe(),B=window.location.pathname,w=[];export function getLocationHistory(){return w}function b(e){return B+e}function ge(e){m||h.push(b(e))}export function historyReplace(e){m||h.push(b(e))}function d(e){return e.replace(/=&/g,"&").replace(/=$/,"")}function X(){let e="";const l=n.selectedExhibitor,i=n.selectedBooth,s=n.selectedEventItem,t=n.selectedRoute,r=n.selectedSpeaker,a=n.setKioskModeEnabled;if(n.list.type==="route-planner"&&!l&&!i&&!s){const u=o.routePlannerStore;if(u.source==="bookmarks")e=`${P}&${K}=bookmarks`;else{const g=u.items.map(S=>S.entity.slug).filter(Boolean).join(R);e=`${P}=${g}`}const p=u.startPoint?.slug;p&&(e+=`&${Y}=${p}`)}else if(t&&!n.isMultiPointRoute){const u=t.from instanceof D?`:${t.from.slug}`:"",p=t.to instanceof D?`:${t.to.slug}`:"",g=o.routeStore.onlyAccessible?":true":":false",S=t.waypoints?.map(f=>`:${f.slug}`).join("");e=`route${p}${u}${g}${S||""}`}else if(l)e=l.slug;else if(i)e=i.slug;else if(s)e=s.slug;else if(r)e=r.slug;else if(a)e="";else switch(n.list.type){case"bookmarks":e="bookmarks";break;case"visited":e="visited";break;case"category":e=n.selectedCategory?.slug??"";break;case"search":e=n.list.text||"";break;case E:e=E;break;case"filter":e=`${n.list.query.key}=${n.list.query.value}`;break;case"sessions":e="sessions";break;case"exhibitors":e="exhibitors";break;case"speakers":e="speakers";break;case"tours":e="tours";break;case"multi-point-tour":e=`tour=${n.list.tourId}`;break;default:throw new Error("Unkown list.type")}if(C)return;const c=e?"?"+encodeURIComponent(e):"";h.location.search!==c&&(l!==j||i!==q||s!==Q?ge(c):historyReplace(c),j=l,q=i,Q=s)}function Z(){const e=n.selectedExhibitor,l=n.selectedEventItem,i=n.selectedSpeaker;let s="";e?s=e.name:l?s=l.name:i?s=i.name:n.list.type==="search"&&n.list.text?s="`"+(n.list.text||"")+"`":n.list.type==="multi-point-tour"&&n.tourTitle&&(s=n.tourTitle),s.length&&(s+=" \u2013 "),s+=v.title,v.subtitle&&(s+=" \u2013 "+v.subtitle),s+=" \u2013 Expo Floor Plan by ExpoFP",document.title=s}function T(){const e=h.location.search.length>1?decodeURIComponent(h.location.search.substring(1)):"";return he(e)}function y(){const e=h.location.search.length>1?decodeURIComponent(h.location.search.substring(1)):"";C=!0;const l=o.boothStore.booths.find(s=>s.slug?.toLowerCase()===e?.toLowerCase()||s.externalId?.toLowerCase()===e?.toLowerCase()||s.externalId?.toLowerCase()?.replace(/\s+/g,"")===e?.toLowerCase()),i=new URLSearchParams(decodeURIComponent(window.location.search));if(se(i),Se(i),!T())if(i.has(F)){const s=i.get(F);s==="1"?n.kiosk=!0:s==="0"&&(n.kiosk=!1,n.resetUIScale())}else if(e==="tours")o.selectTours();else if(e.startsWith("tour=")){const s=e.split("=")[1],t=o.toursStore.getTourById(s);t?o.toursStore.launchTour(t,t.name,t.description):(console.warn(`Route with id "${s}" not found`),o.selectTours())}else if(i.has(P)){const s=i.get(K),t=i.get(Y),r=t?ce(t):null;if(s==="bookmarks")o.routePlannerStore.launchFromBookmarks(r??void 0);else{const a=(i.get(P)||"").split(R).filter(Boolean);o.routePlannerStore.launchFromSlugs(a,r??void 0)}}else if(e.startsWith("route")){const s=e.split(R);o.routeStore.setOnlyAccessible(s[3]==="true");const t=le(s[2],s[1],s.slice(4));o.routeStore.selectRoute(t);const a=s.slice(4).length>0;o.uiState.setIsMultiPointRoute(a);const u=new URLSearchParams(window.location.search).get("title");u&&o.uiState.setRouteTitle(u)}else if(e==="bookmarks")o.selectBookmarks();else if(e==="visited")o.selectVisited();else if(e===E)o.selectLanguage();else if(i.has(N)){const s=i.get(N)?.toLowerCase();de(s)&&me(s)}else if(e==="sessions")o.selectSessions();else if(e==="exhibitors")o.selectExhibitors();else if(e==="speakers")o.selectSpeakers();else if(e==="-pdf")o.uiState.printingPdf=!0;else if(e.startsWith("hide"))o.uiState.setVisibility((new URLSearchParams(e).get("hide")??"").split(",").filter(Boolean).reduce((s,t)=>({...s,[t]:!1}),{}));else if(l)setTimeout(()=>o.selectBooth(l),250);else if(e===re)o.uiState.startBuildRoute();else if(i.get($)){const s=i.get($),t=i.get("booths")?.split(",")||[],r=i.get("exhibitors")?.split(",")||[],a=i.get("tour");if(a){const f=o.toursStore.getTourById(a);f&&A(()=>{o.uiState.setTourTitle(f.name),o.uiState.setTourDescription(f.description??""),o.uiState.setIsMultiPointTour(!0),o.uiState.setMultiPointTourList(f.id)})}const c=o.boothStore.booths,u=o.exhibitorStore.exhibitors,p=c.filter(f=>t.includes(f.externalId)),g=u.filter(f=>r.includes(f.externalId)).flatMap(f=>f.booths),S=[...p,...g];if(ue()){const f=S.map(te=>te.layer.name),M=fe(f);M&&o.fp.activateFloor({name:M})}(t.length>0||r.length>0)&&o.fp.highlightEntities([...t,...r]),o.layerStore.showPathWay(s),S.length>0&&A(()=>{o.uiState.moveToRect=ie.fromMultiple(S.map(f=>f.rect).filter(Boolean)),o.uiState.rollReset=!0})}else{const s=o.eventStore.eventItems.find(t=>t.slug?.toLowerCase()===e?.toLowerCase()||t.externalId?.toLowerCase()===e?.toLowerCase());if(s)o.selectEventItem(s,!0);else{const t=o.exhibitorStore.exhibitors.find(r=>r.slug?.toLowerCase()===e?.toLowerCase()||r.externalId?.toLowerCase()===e?.toLowerCase());if(e.startsWith("exhibitors")){const r=e.split("=")[1].split(",");setTimeout(()=>o.fp.selectExhibitor(r),250)}else if(t)setTimeout(()=>o.clickExhibitor(t),250);else if(e.includes("=")&&(e.startsWith("categories=")||/^poiTypes?=/.test(e)))U.log("Skipping filter parameter in dispatchFromUrl:",e);else{const a=o.categoryStore.categories.find(c=>c.slug===e);if(a)o.selectCategory(a);else{const c=o.speakerStore.findBySlug(e);c?o.selectSpeaker(c,!0):e.includes("heatmap=true")||o.searchStore.selectSearch(e)}}}}C=!1,X(),Z()}function _(){const e=h.location.search;if(e.includes("heatmap")){const t=new URL(window.location.href);if(t.searchParams.get("heatmap")==="true"){const a=t.searchParams.get("type")==="yah";a||t.searchParams.delete("heatmap"),m=!0,historyReplace(d(t.search)),a?(o.uiState.heatmapYah=!0,o.uiState.monochrome=!0,o.uiState.hideLogoInBooth=!0,o.uiState.hideHeaderLogo=!0,o.uiState.disableBookmarked=!0):o.uiState.heatmap=!0}}if(e.startsWith("?preview="))historyReplace("?");else if(e.startsWith("?b="))historyReplace("?bookmarks");else if(e.startsWith("?ba=")){const t=new URL(window.location.href),r=parseInt(t.searchParams.get("ba")),a=o.exhibitorStore.exhibitorById.get(r);historyReplace(a?"?"+a.slug:"?bookmarks")}if(e.includes("blue-dot")){const t=new URL(window.location.href),r=t.searchParams.get("blue-dot");t.searchParams.delete("blue-dot");const a=r?.split(",")??[],c=Number(a[0]),u=Number(a[1]);if(a.length>1&&Number.isFinite(c)&&Number.isFinite(u)){const g=o.layerStore.findLayer(a[2])?.name,S=new ne(c,u,g,void 0,Number(a[3])||void 0,Number(a[4])||void 0);o.layerStore.layersLoaded?o.routeStore.selectCurrentPosition(S,!0,1):k(()=>o.layerStore.layersLoaded,()=>{o.routeStore.selectCurrentPosition(S,!0,1)})}const p=d(t.search);historyReplace(p)}if(e.includes("copy_exh")&&historyReplace("?"),e.includes("noOverlay")){const t=new URL(window.location.href),r=t.searchParams.get("noOverlay");t.searchParams.delete("noOverlay");const a=d(t.search);r==="true"?o.uiState.hideOverlay=!0:r==="false"&&(o.uiState.hideOverlay=!1),historyReplace(a)}if(e.includes("allowConsent")){const t=new URL(window.location.href),r=t.searchParams.get("allowConsent");t.searchParams.delete("allowConsent");const a=d(t.search);r==="true"?z(!0):r==="false"&&z(!1),historyReplace(a)}if(e.includes("hideHeaderLogo")){const t=new URL(window.location.href),r=t.searchParams.get("hideHeaderLogo");t.searchParams.delete("hideHeaderLogo");const a=d(t.search);r==="true"&&(n.hideHeaderLogo=!0),historyReplace(a)}if(e.includes("hideLogoInBooth")){const t=new URL(window.location.href),r=t.searchParams.get("hideLogoInBooth");t.searchParams.delete("hideLogoInBooth");const a=d(t.search);r==="true"&&(n.hideLogoInBooth=!0),historyReplace(a)}if(e.includes("disableFeatured")){const t=new URL(window.location.href),r=t.searchParams.get("disableFeatured");t.searchParams.delete("disableFeatured");const a=d(t.search);r==="true"&&o.exhibitorStore.exhibitors.forEach(c=>c.featured=!1),historyReplace(a)}if(e.includes("disableBookmarked")){const t=new URL(window.location.href),r=t.searchParams.get("disableBookmarked");t.searchParams.delete("disableBookmarked");const a=d(t.search);r==="true"&&(n.disableBookmarked=!0),historyReplace(a)}if(e.includes("disableGps")){const t=new URL(window.location.href),r=t.searchParams.get("disableGps");t.searchParams.delete("disableGps");const a=d(t.search);r==="true"&&o.routeStore.setGpsTrackingEnabled(!1),historyReplace(a)}if(e.includes("monochrome")){const t=new URL(window.location.href),r=t.searchParams.get("monochrome");t.searchParams.delete("monochrome");const a=d(t.search);r==="true"&&(n.monochrome=!0),historyReplace(a)}const l=pe(h.location.search);if(l!==null&&historyReplace("?"+l),e.includes(x)){const t=new URL(window.location.href),r=t.searchParams.get(x);r==="1"||r==="true"?L&&localStorage.setItem(G,"1"):(r==="0"||r==="false")&&L&&localStorage.removeItem(G),t.searchParams.delete(x),historyReplace(d(t.search))}if(e.includes(I)){const t=new URL(window.location.href),r=t.searchParams.get(I);r==="true"?L&&localStorage.setItem(W,"1"):r==="false"&&L&&localStorage.removeItem(W),t.searchParams.delete(I),historyReplace(d(t.search))}if(n.previewExhibitor&&historyReplace("?"+n.previewExhibitor.slug),h.location.search.includes("&")||h.location.search.includes("%26")){let t=h.location.search;t=t.startsWith("?")?t.slice(1):t;const r=t.includes("&")?"&":"%26",c=t.split(r).map(u=>{const p=o.exhibitorStore.exhibitors.find(g=>g.slug===u||g.externalId===u);return p?p.name:u}).join("&");historyReplace("?"+c)}const i=new URLSearchParams(window.location.search);if(i.has(H)){o.uiState.resetUIScale();const t=new URL(window.location.href);t.searchParams.delete(H);const r=d(t.search);m=!0,historyReplace(r),m=!1}const s=i.get(V);if(s){const t=s.replace(",","."),r=parseFloat(t);!isNaN(r)&&r>=.8&&r<=1.4?o.uiState.setUIScale(r,!0):U.warn(`Invalid ui-scale parameter: ${s}. Must be a number between 0.8 and 1.4.`);const a=new URL(window.location.href);a.searchParams.delete(V);const c=d(a.search);m=!0,historyReplace(c),m=!1}}export function initRouting(e=!1){m=e,!m&&b(h.location.search)===B&&w.push(b(h.location.search)),J=h.listen((l,i)=>{m||(w.push(b(l.search)),U.log("history",i,l),i==="POP"&&y())}),_(),T(),k(()=>o.layerStore.layersLoaded,()=>{o.urlFilterManager&&!o.urlFilterManager.isInitialized&&o.urlFilterManager.initialize(),y(),O(Z),O(X),n.viewerMode&&(n.menu=!0)})}export function applyParameters(e=""){historyReplace("?"+decodeURIComponent(e.toString())),o.layerStore.layersLoaded?(_(),y()):(T(),k(()=>o.layerStore.layersLoaded,()=>{_(),y()}))}export function destroyHistory(){J()}export function goBack(){if(console.log("goBack"),w.length>1){w.pop();const l=w[w.length-1].replace(B,"");return m=!0,h.replace(l),m=!1,y(),!0}else return h.go(-1),!1}function Se(e){try{let l={};const i=n.defaultMapSettings;if(new Set(e.keys()).size)l=ee(Object.fromEntries(e.entries()),i);else{const s=sessionStorage.getItem(ae);s&&(l=ee(JSON.parse(s),i))}if(n.setMapSettings(l),l.z){const s=o.layerStore.layers.find(t=>t.name===l.z);s&&o.layerStore.updateVisibility(s,!0)}}catch(l){console.error("Failed to process or save map settings.",l)}}function ee(e,l){const i={};for(const s in e){if(!Object.prototype.hasOwnProperty.call(l,s)||!Object.prototype.hasOwnProperty.call(e,s))continue;const t=e[s];typeof l[s]=="number"?i[s]=parseFloat(t):i[s]=t}return i}
1
+ import{Box as oe}from"@expofp/geometry";import{createBrowserHistory as se}from"history";import{autorun as O,reaction as k,runInAction as A}from"mobx";import{recoverKioskFromUrlPrams as re}from"../components/Kiosk/recoverKioskFromUrlPrams";import{BUILD_ROUTE_KEY as ae,KIOSK_ENABLE_KEY as F,LANG_KEY as N,LANGUAGE_TYPE as E,MAP_SETTINGS_KEY as ie,PATHWAY_KEY as $,PLANNER_FROM_KEY as Y,PLANNER_KEY as P,PLANNER_SOURCE_KEY as K,PREVIEW_MODE_QUERY as I,PREVIEW_MODE_STORAGE_KEY as W,SEPARATOR as R,UI_SCALE_PARAM_KEY as V,UI_SCALE_RESET_PARAM_KEY as H,VIEWER_MODE_QUERY as x,VIEWER_MODE_STORAGE_KEY as G}from"../constants";import U from"../data";import o,{uiState as n}from"../store";import{BoothBase as D}from"../store/BoothStore";import{CurrentPosition as ne,extractRoute as le,findBooth as ce}from"../store/RouteStore";import{setConsentSettings as z}from"../tools/gtag";import v from"../tools/logger";import{areLayersEnabled as ue}from"../utils/areLayersEnabled";import{handleCustomCommand as he}from"../utils/customCommands";import{getMostFrequent as fe}from"../utils/getMostFrequent";import{hasLocale as de,setLocale as me}from"../utils/i18n";import{isLocalStorageAvailable as L}from"../utils/localStorage";import{stripTrackingParams as pe}from"../utils/trackingParams";let m=!1,B=!1,j=null,q=null,Q=null,J;const h=se(),C=window.location.pathname,w=[];export function getLocationHistory(){return w}function b(e){return C+e}function ge(e){m||h.push(b(e))}export function historyReplace(e){m||h.push(b(e))}function d(e){return e.replace(/=&/g,"&").replace(/=$/,"")}function X(){let e="";const l=n.selectedExhibitor,i=n.selectedBooth,s=n.selectedEventItem,t=n.selectedRoute,r=n.selectedSpeaker,a=n.setKioskModeEnabled;if(n.list.type==="route-planner"&&!l&&!i&&!s){const u=o.routePlannerStore;if(u.source==="bookmarks")e=`${P}&${K}=bookmarks`;else{const g=u.items.map(S=>S.entity.slug).filter(Boolean).join(R);e=`${P}=${g}`}const p=u.startPoint?.slug;p&&(e+=`&${Y}=${p}`)}else if(t&&!n.isMultiPointRoute){const u=t.from instanceof D?`:${t.from.slug}`:"",p=t.to instanceof D?`:${t.to.slug}`:"",g=o.routeStore.onlyAccessible?":true":":false",S=t.waypoints?.map(f=>`:${f.slug}`).join("");e=`route${p}${u}${g}${S||""}`}else if(l)e=l.slug;else if(i)e=i.slug;else if(s)e=s.slug;else if(r)e=r.slug;else if(a)e="";else switch(n.list.type){case"bookmarks":e="bookmarks";break;case"visited":e="visited";break;case"category":e=n.selectedCategory?.slug??"";break;case"search":e=n.list.text||"";break;case E:e=E;break;case"filter":e=`${n.list.query.key}=${n.list.query.value}`;break;case"sessions":e="sessions";break;case"exhibitors":e="exhibitors";break;case"speakers":e="speakers";break;case"tours":e="tours";break;case"multi-point-tour":e=`tour=${n.list.tourId}`;break;default:throw new Error("Unkown list.type")}if(B)return;const c=e?"?"+encodeURIComponent(e):"";h.location.search!==c&&(l!==j||i!==q||s!==Q?ge(c):historyReplace(c),j=l,q=i,Q=s)}function Z(){const e=n.selectedExhibitor,l=n.selectedEventItem,i=n.selectedSpeaker;let s="";e?s=e.name:l?s=l.name:i?s=i.name:n.list.type==="search"&&n.list.text?s="`"+(n.list.text||"")+"`":n.list.type==="multi-point-tour"&&n.tourTitle&&(s=n.tourTitle),s.length&&(s+=" \u2013 "),s+=U.title,U.subtitle&&(s+=" \u2013 "+U.subtitle),s+=" \u2013 Expo Floor Plan by ExpoFP",document.title=s}function T(){const e=h.location.search.length>1?decodeURIComponent(h.location.search.substring(1)):"";return he(e)}function y(){const e=h.location.search.length>1?decodeURIComponent(h.location.search.substring(1)):"";B=!0;const l=o.boothStore.booths.find(s=>s.slug?.toLowerCase()===e?.toLowerCase()||s.externalId?.toLowerCase()===e?.toLowerCase()||s.externalId?.toLowerCase()?.replace(/\s+/g,"")===e?.toLowerCase()),i=new URLSearchParams(decodeURIComponent(window.location.search));if(re(i),Se(i),!T())if(i.has(F)){const s=i.get(F);s==="1"?n.kiosk=!0:s==="0"&&(n.kiosk=!1,n.resetUIScale())}else if(e==="tours")o.selectTours();else if(e.startsWith("tour=")){const s=e.split("=")[1],t=o.toursStore.getTourById(s);t?o.toursStore.launchTour(t,t.name,t.description):(console.warn(`Route with id "${s}" not found`),o.selectTours())}else if(i.has(P)){const s=i.get(K),t=i.get(Y),r=t?ce(t):null;if(s==="bookmarks")o.routePlannerStore.launchFromBookmarks(r??void 0);else{const a=(i.get(P)||"").split(R).filter(Boolean);o.routePlannerStore.launchFromSlugs(a,r??void 0)}}else if(e.startsWith("route")){const s=e.split(R);o.routeStore.setOnlyAccessible(s[3]==="true");const t=le(s[2],s[1],s.slice(4));o.routeStore.selectRoute(t);const a=s.slice(4).length>0;o.uiState.setIsMultiPointRoute(a);const u=new URLSearchParams(window.location.search).get("title");u&&o.uiState.setRouteTitle(u)}else if(e==="bookmarks")o.selectBookmarks();else if(e==="visited")o.selectVisited();else if(e===E)o.selectLanguage();else if(i.has(N)){const s=i.get(N)?.toLowerCase();de(s)&&me(s)}else if(e==="sessions")o.selectSessions();else if(e==="exhibitors")o.selectExhibitors();else if(e==="speakers")o.selectSpeakers();else if(e==="-pdf")o.uiState.printingPdf=!0;else if(e.startsWith("hide"))o.uiState.setVisibility((new URLSearchParams(e).get("hide")??"").split(",").filter(Boolean).reduce((s,t)=>({...s,[t]:!1}),{}));else if(l)setTimeout(()=>o.selectBooth(l),250);else if(e===ae)o.uiState.startBuildRoute();else if(i.get($)){const s=i.get($),t=i.get("booths")?.split(",")||[],r=i.get("exhibitors")?.split(",")||[],a=i.get("tour");if(a){const f=o.toursStore.getTourById(a);f&&A(()=>{o.uiState.setTourTitle(f.name),o.uiState.setTourDescription(f.description??""),o.uiState.setIsMultiPointTour(!0),o.uiState.setMultiPointTourList(f.id)})}const c=o.boothStore.booths,u=o.exhibitorStore.exhibitors,p=c.filter(f=>t.includes(f.externalId)),g=u.filter(f=>r.includes(f.externalId)).flatMap(f=>f.booths),S=[...p,...g];if(ue()){const f=S.map(te=>te.layer.name),M=fe(f);M&&o.fp.activateFloor({name:M})}(t.length>0||r.length>0)&&o.fp.highlightEntities([...t,...r]),o.layerStore.showPathWay(s),S.length>0&&A(()=>{o.uiState.moveToRect=oe.fromUnion(...S.map(f=>f.rect).filter(Boolean)),o.uiState.rollReset=!0})}else{const s=o.eventStore.eventItems.find(t=>t.slug?.toLowerCase()===e?.toLowerCase()||t.externalId?.toLowerCase()===e?.toLowerCase());if(s)o.selectEventItem(s,!0);else{const t=o.exhibitorStore.exhibitors.find(r=>r.slug?.toLowerCase()===e?.toLowerCase()||r.externalId?.toLowerCase()===e?.toLowerCase());if(e.startsWith("exhibitors")){const r=e.split("=")[1].split(",");setTimeout(()=>o.fp.selectExhibitor(r),250)}else if(t)setTimeout(()=>o.clickExhibitor(t),250);else if(e.includes("=")&&(e.startsWith("categories=")||/^poiTypes?=/.test(e)))v.log("Skipping filter parameter in dispatchFromUrl:",e);else{const a=o.categoryStore.categories.find(c=>c.slug===e);if(a)o.selectCategory(a);else{const c=o.speakerStore.findBySlug(e);c?o.selectSpeaker(c,!0):e.includes("heatmap=true")||o.searchStore.selectSearch(e)}}}}B=!1,X(),Z()}function _(){const e=h.location.search;if(e.includes("heatmap")){const t=new URL(window.location.href);if(t.searchParams.get("heatmap")==="true"){const a=t.searchParams.get("type")==="yah";a||t.searchParams.delete("heatmap"),m=!0,historyReplace(d(t.search)),a?(o.uiState.heatmapYah=!0,o.uiState.monochrome=!0,o.uiState.hideLogoInBooth=!0,o.uiState.hideHeaderLogo=!0,o.uiState.disableBookmarked=!0):o.uiState.heatmap=!0}}if(e.startsWith("?preview="))historyReplace("?");else if(e.startsWith("?b="))historyReplace("?bookmarks");else if(e.startsWith("?ba=")){const t=new URL(window.location.href),r=parseInt(t.searchParams.get("ba")),a=o.exhibitorStore.exhibitorById.get(r);historyReplace(a?"?"+a.slug:"?bookmarks")}if(e.includes("blue-dot")){const t=new URL(window.location.href),r=t.searchParams.get("blue-dot");t.searchParams.delete("blue-dot");const a=r?.split(",")??[],c=Number(a[0]),u=Number(a[1]);if(a.length>1&&Number.isFinite(c)&&Number.isFinite(u)){const g=o.layerStore.findLayer(a[2])?.name,S=new ne(c,u,g,void 0,Number(a[3])||void 0,Number(a[4])||void 0);o.layerStore.layersLoaded?o.routeStore.selectCurrentPosition(S,!0,1):k(()=>o.layerStore.layersLoaded,()=>{o.routeStore.selectCurrentPosition(S,!0,1)})}const p=d(t.search);historyReplace(p)}if(e.includes("copy_exh")&&historyReplace("?"),e.includes("noOverlay")){const t=new URL(window.location.href),r=t.searchParams.get("noOverlay");t.searchParams.delete("noOverlay");const a=d(t.search);r==="true"?o.uiState.hideOverlay=!0:r==="false"&&(o.uiState.hideOverlay=!1),historyReplace(a)}if(e.includes("allowConsent")){const t=new URL(window.location.href),r=t.searchParams.get("allowConsent");t.searchParams.delete("allowConsent");const a=d(t.search);r==="true"?z(!0):r==="false"&&z(!1),historyReplace(a)}if(e.includes("hideHeaderLogo")){const t=new URL(window.location.href),r=t.searchParams.get("hideHeaderLogo");t.searchParams.delete("hideHeaderLogo");const a=d(t.search);r==="true"&&(n.hideHeaderLogo=!0),historyReplace(a)}if(e.includes("hideLogoInBooth")){const t=new URL(window.location.href),r=t.searchParams.get("hideLogoInBooth");t.searchParams.delete("hideLogoInBooth");const a=d(t.search);r==="true"&&(n.hideLogoInBooth=!0),historyReplace(a)}if(e.includes("disableFeatured")){const t=new URL(window.location.href),r=t.searchParams.get("disableFeatured");t.searchParams.delete("disableFeatured");const a=d(t.search);r==="true"&&o.exhibitorStore.exhibitors.forEach(c=>c.featured=!1),historyReplace(a)}if(e.includes("disableBookmarked")){const t=new URL(window.location.href),r=t.searchParams.get("disableBookmarked");t.searchParams.delete("disableBookmarked");const a=d(t.search);r==="true"&&(n.disableBookmarked=!0),historyReplace(a)}if(e.includes("disableGps")){const t=new URL(window.location.href),r=t.searchParams.get("disableGps");t.searchParams.delete("disableGps");const a=d(t.search);r==="true"&&o.routeStore.setGpsTrackingEnabled(!1),historyReplace(a)}if(e.includes("monochrome")){const t=new URL(window.location.href),r=t.searchParams.get("monochrome");t.searchParams.delete("monochrome");const a=d(t.search);r==="true"&&(n.monochrome=!0),historyReplace(a)}const l=pe(h.location.search);if(l!==null&&historyReplace("?"+l),e.includes(x)){const t=new URL(window.location.href),r=t.searchParams.get(x);r==="1"||r==="true"?L&&localStorage.setItem(G,"1"):(r==="0"||r==="false")&&L&&localStorage.removeItem(G),t.searchParams.delete(x),historyReplace(d(t.search))}if(e.includes(I)){const t=new URL(window.location.href),r=t.searchParams.get(I);r==="true"?L&&localStorage.setItem(W,"1"):r==="false"&&L&&localStorage.removeItem(W),t.searchParams.delete(I),historyReplace(d(t.search))}if(n.previewExhibitor&&historyReplace("?"+n.previewExhibitor.slug),h.location.search.includes("&")||h.location.search.includes("%26")){let t=h.location.search;t=t.startsWith("?")?t.slice(1):t;const r=t.includes("&")?"&":"%26",c=t.split(r).map(u=>{const p=o.exhibitorStore.exhibitors.find(g=>g.slug===u||g.externalId===u);return p?p.name:u}).join("&");historyReplace("?"+c)}const i=new URLSearchParams(window.location.search);if(i.has(H)){o.uiState.resetUIScale();const t=new URL(window.location.href);t.searchParams.delete(H);const r=d(t.search);m=!0,historyReplace(r),m=!1}const s=i.get(V);if(s){const t=s.replace(",","."),r=parseFloat(t);!isNaN(r)&&r>=.8&&r<=1.4?o.uiState.setUIScale(r,!0):v.warn(`Invalid ui-scale parameter: ${s}. Must be a number between 0.8 and 1.4.`);const a=new URL(window.location.href);a.searchParams.delete(V);const c=d(a.search);m=!0,historyReplace(c),m=!1}}export function initRouting(e=!1){m=e,!m&&b(h.location.search)===C&&w.push(b(h.location.search)),J=h.listen((l,i)=>{m||(w.push(b(l.search)),v.log("history",i,l),i==="POP"&&y())}),_(),T(),k(()=>o.layerStore.layersLoaded,()=>{o.urlFilterManager&&!o.urlFilterManager.isInitialized&&o.urlFilterManager.initialize(),y(),O(Z),O(X),n.viewerMode&&(n.menu=!0)})}export function applyParameters(e=""){historyReplace("?"+decodeURIComponent(e.toString())),o.layerStore.layersLoaded?(_(),y()):(T(),k(()=>o.layerStore.layersLoaded,()=>{_(),y()}))}export function destroyHistory(){J()}export function goBack(){if(console.log("goBack"),w.length>1){w.pop();const l=w[w.length-1].replace(C,"");return m=!0,h.replace(l),m=!1,y(),!0}else return h.go(-1),!1}function Se(e){try{let l={};const i=n.defaultMapSettings;if(new Set(e.keys()).size)l=ee(Object.fromEntries(e.entries()),i);else{const s=sessionStorage.getItem(ie);s&&(l=ee(JSON.parse(s),i))}if(n.setMapSettings(l),l.z){const s=o.layerStore.layers.find(t=>t.name===l.z);s&&o.layerStore.updateVisibility(s,!0)}}catch(l){console.error("Failed to process or save map settings.",l)}}function ee(e,l){const i={};for(const s in e){if(!Object.prototype.hasOwnProperty.call(l,s)||!Object.prototype.hasOwnProperty.call(e,s))continue;const t=e[s];typeof l[s]=="number"?i[s]=parseFloat(t):i[s]=t}return i}
@@ -1,5 +1,5 @@
1
+ import { Box } from '@expofp/geometry';
1
2
  import { ImageDef } from '@expofp/renderer';
2
- import Rect from '../core/Rect';
3
3
  import { PathInfo, RawPoiType, RawRegularBooth, ShapeBgDef } from '../data/Data';
4
4
  import { EventItem } from './EventStore';
5
5
  import { Exhibitor } from './ExhibitorStore';
@@ -27,10 +27,22 @@ export declare abstract class BoothBase {
27
27
  readonly name: string;
28
28
  readonly externalId: string;
29
29
  readonly title: string;
30
- readonly rect: Rect;
30
+ /**
31
+ * Unrotated, axis-aligned footprint of the booth (a geometry {@link Box}).
32
+ * The booth's orientation is stored SEPARATELY in {@link rotate}; the two are
33
+ * intentionally kept apart. The dominant access pattern is the unrotated
34
+ * footprint (center, width/height, bounds-union, axis-aligned hit-test), so
35
+ * `rect` stays an AABB and the rotation is only combined with it at the few
36
+ * rotation-sensitive render/geometry sites (a rotated `Rect` is built there
37
+ * from `rect` + `rotate` on demand).
38
+ */
39
+ readonly rect: Box;
31
40
  readonly borderWidth: number;
32
41
  readonly borderColor: string;
33
42
  noLabels: boolean;
43
+ /** Booth orientation in radians, positive = clockwise. Applied to {@link rect}
44
+ * only at the rotation-sensitive render/geometry sites; the footprint
45
+ * itself ({@link rect}) is axis-aligned and never carries this rotation. */
34
46
  readonly rotate: number;
35
47
  readonly paths: PathInfo[];
36
48
  readonly pathsWithRect: boolean;
@@ -1 +1 @@
1
- import{__esDecorate as s,__runInitializers as l}from"tslib";import{action as M,computed as i,observable as S}from"mobx";import{lineLength as C,lineRectangleIntersections as L,pointInsideRectangle as R,Rect as N}from"simple-geometry";import E from"../tools/settings";import{uiState as j}from"./index";let O=(()=>{let o=[],d,c=[],m=[],u,b=[],g=[],k,p,y,f,_,v,B;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;d=[S],u=[S],k=[i({keepAlive:!0})],p=[i({keepAlive:!0})],y=[i({keepAlive:!0})],f=[i({keepAlive:!0})],_=[i({keepAlive:!0})],v=[i],B=[M],s(this,null,k,{kind:"getter",name:"boothById",static:!1,private:!1,access:{has:e=>"boothById"in e,get:e=>e.boothById},metadata:t},null,o),s(this,null,p,{kind:"getter",name:"boothByExternalId",static:!1,private:!1,access:{has:e=>"boothByExternalId"in e,get:e=>e.boothByExternalId},metadata:t},null,o),s(this,null,y,{kind:"getter",name:"boothByName",static:!1,private:!1,access:{has:e=>"boothByName"in e,get:e=>e.boothByName},metadata:t},null,o),s(this,null,f,{kind:"getter",name:"boothBySlug",static:!1,private:!1,access:{has:e=>"boothBySlug"in e,get:e=>e.boothBySlug},metadata:t},null,o),s(this,null,_,{kind:"getter",name:"borderWidth",static:!1,private:!1,access:{has:e=>"borderWidth"in e,get:e=>e.borderWidth},metadata:t},null,o),s(this,null,v,{kind:"getter",name:"bookmarked",static:!1,private:!1,access:{has:e=>"bookmarked"in e,get:e=>e.bookmarked},metadata:t},null,o),s(this,null,B,{kind:"method",name:"replaceBookmarked",static:!1,private:!1,access:{has:e=>"replaceBookmarked"in e,get:e=>e.replaceBookmarked},metadata:t},null,o),s(null,null,d,{kind:"field",name:"booths",static:!1,private:!1,access:{has:e=>"booths"in e,get:e=>e.booths,set:(e,r)=>{e.booths=r}},metadata:t},c,m),s(null,null,u,{kind:"field",name:"highlightedByExternalIds",static:!1,private:!1,access:{has:e=>"highlightedByExternalIds"in e,get:e=>e.highlightedByExternalIds,set:(e,r)=>{e.highlightedByExternalIds=r}},metadata:t},b,g),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}rootStore=l(this,o);booths=l(this,c,[]);highlightedByExternalIds=(l(this,m),l(this,b,[]));get boothById(){return new Map(this.booths.map(t=>[t.id,t]))}get boothByExternalId(){return new Map(this.booths.map(t=>[t.externalId,t]))}get boothByName(){return new Map(this.booths.map(t=>[t.name.toLowerCase(),t]))}get boothBySlug(){return new Map(this.booths.map(t=>[t.slug,t]))}get borderWidth(){if(E.boothBorderWidth)return E.boothBorderWidth;if(E.EXPO==="groomexpo")return .4;const t=this.booths.filter(e=>e.rect).map(e=>e.rect.w+e.rect.h);return t.reduce((e,r)=>e+r,0)/t.length/80}constructor(t){l(this,g),this.rootStore=t}get bookmarked(){return this.booths.filter(t=>t.bookmarkedDirectly)}getNearestBooth(t){var e=null;const x=this.booths.map(a=>{const{x1:n,x2:I,y1:h,y2:D}=a.rect,A=Math.abs(I-n),z=Math.abs(D-h);return{lineLength:C(t,L({p0:t,p1:{x:a.rect.cx,y:a.rect.cy}},new N({x:n,y:h},{x:n+A,y:h},{x:n+A,y:h+z},{x:n,y:h+z}))[0]),name:a.name}}).sort((a,n)=>a.lineLength-n.lineLength)[0];return e=this.booths.find(a=>a.name===x.name),e}getBoothAtPoint(t){return this.booths.find(e=>{const{x1:r,x2:x,y1:a,y2:n}=e.rect,I=Math.abs(x-r),h=Math.abs(n-a),D=new N({x:r,y:a},{x:r+I,y:a},{x:r+I,y:a+h},{x:r,y:a+h});return R(t,D)})}findBooth(t){return this.boothByExternalId.get(t)||this.boothByName.get(t.toLowerCase())||this.boothBySlug.get(t)}replaceBookmarked(t){const e=(t||[]).map(a=>this.boothById.get(a)).filter(a=>a),r=new Set(e),x=this.bookmarked.filter(a=>!r.has(a));for(const a of x)a.bookmarkedDirectly=!1;for(const a of e)a.bookmarkedDirectly=!0}}})();export default O;let w=(()=>{let o=[],d,c=[],m=[],u,b=[],g=[],k,p,y,f,_,v,B;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;d=[S],u=[S],k=[i({keepAlive:!0})],p=[i({keepAlive:!0})],y=[i({keepAlive:!0})],f=[i({keepAlive:!0})],_=[i({keepAlive:!0})],v=[i({keepAlive:!0})],B=[i({keepAlive:!0})],s(this,null,k,{kind:"getter",name:"bookmarked",static:!1,private:!1,access:{has:e=>"bookmarked"in e,get:e=>e.bookmarked},metadata:t},null,o),s(this,null,p,{kind:"getter",name:"uiState",static:!1,private:!1,access:{has:e=>"uiState"in e,get:e=>e.uiState},metadata:t},null,o),s(this,null,y,{kind:"getter",name:"fullName",static:!1,private:!1,access:{has:e=>"fullName"in e,get:e=>e.fullName},metadata:t},null,o),s(this,null,f,{kind:"getter",name:"visible",static:!1,private:!1,access:{has:e=>"visible"in e,get:e=>e.visible},metadata:t},null,o),s(this,null,_,{kind:"getter",name:"hover",static:!1,private:!1,access:{has:e=>"hover"in e,get:e=>e.hover},metadata:t},null,o),s(this,null,v,{kind:"getter",name:"selected",static:!1,private:!1,access:{has:e=>"selected"in e,get:e=>e.selected},metadata:t},null,o),s(this,null,B,{kind:"getter",name:"skipDim",static:!1,private:!1,access:{has:e=>"skipDim"in e,get:e=>e.skipDim},metadata:t},null,o),s(null,null,d,{kind:"field",name:"layer",static:!1,private:!1,access:{has:e=>"layer"in e,get:e=>e.layer,set:(e,r)=>{e.layer=r}},metadata:t},c,m),s(null,null,u,{kind:"field",name:"bookmarkedDirectly",static:!1,private:!1,access:{has:e=>"bookmarkedDirectly"in e,get:e=>e.bookmarkedDirectly,set:(e,r)=>{e.bookmarkedDirectly=r}},metadata:t},b,g),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}store=l(this,o);id;name;externalId;title;rect;borderWidth;borderColor;noLabels;rotate;paths;pathsWithRect;slug;error;description;exhibitors;labelColor;schedule;poiTypeId;poiType;poiIcon;meta;layer=l(this,c,void 0);bookmarkedDirectly=(l(this,m),l(this,b,!1));get bookmarked(){return j.disableBookmarked?!1:this.schedule?.some(t=>t.bookmarked)?!0:this.exhibitors.length>0?!!this.exhibitors.find(t=>t.bookmarked):this.bookmarkedDirectly}get uiState(){return this.store.rootStore.uiState}get fullName(){const t=this.meta?Object.entries(this.meta).filter(([e])=>!e.startsWith("_")).map(([e,r])=>`${e} ${r}`).join(" "):"";return`${this.name} ${t}`.replace(/\s+/g," ").trim()}get visible(){return this.layer?.visible??!0}get hover(){return this.uiState.hoveredBooths.has(this)}get selected(){return this.uiState.selectedBooths.has(this)}get skipDim(){return this.uiState.highlightedBooths.has(this.id.toString())}constructor(){l(this,g)}}})();export{w as BoothBase};export class RegularBooth extends w{buyUrl;reserveUrl;type;status;price;entity={type:"booth",variant:"regular"};size;availColor;soldColor;holdColor;onHold;reserved;shapes}export class SpecialBooth extends w{color;shapes;entity={type:"booth",variant:"special"}}
1
+ import{__esDecorate as r,__runInitializers as l}from"tslib";import{pointDistance as E}from"@expofp/geometry";import{action as z,computed as s,observable as v}from"mobx";import x from"../tools/settings";import{uiState as A}from"./index";let N=(()=>{let a=[],n,h=[],d=[],c,m=[],u=[],b,g,k,p,f,_,y;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;n=[v],c=[v],b=[s({keepAlive:!0})],g=[s({keepAlive:!0})],k=[s({keepAlive:!0})],p=[s({keepAlive:!0})],f=[s({keepAlive:!0})],_=[s],y=[z],r(this,null,b,{kind:"getter",name:"boothById",static:!1,private:!1,access:{has:e=>"boothById"in e,get:e=>e.boothById},metadata:t},null,a),r(this,null,g,{kind:"getter",name:"boothByExternalId",static:!1,private:!1,access:{has:e=>"boothByExternalId"in e,get:e=>e.boothByExternalId},metadata:t},null,a),r(this,null,k,{kind:"getter",name:"boothByName",static:!1,private:!1,access:{has:e=>"boothByName"in e,get:e=>e.boothByName},metadata:t},null,a),r(this,null,p,{kind:"getter",name:"boothBySlug",static:!1,private:!1,access:{has:e=>"boothBySlug"in e,get:e=>e.boothBySlug},metadata:t},null,a),r(this,null,f,{kind:"getter",name:"borderWidth",static:!1,private:!1,access:{has:e=>"borderWidth"in e,get:e=>e.borderWidth},metadata:t},null,a),r(this,null,_,{kind:"getter",name:"bookmarked",static:!1,private:!1,access:{has:e=>"bookmarked"in e,get:e=>e.bookmarked},metadata:t},null,a),r(this,null,y,{kind:"method",name:"replaceBookmarked",static:!1,private:!1,access:{has:e=>"replaceBookmarked"in e,get:e=>e.replaceBookmarked},metadata:t},null,a),r(null,null,n,{kind:"field",name:"booths",static:!1,private:!1,access:{has:e=>"booths"in e,get:e=>e.booths,set:(e,i)=>{e.booths=i}},metadata:t},h,d),r(null,null,c,{kind:"field",name:"highlightedByExternalIds",static:!1,private:!1,access:{has:e=>"highlightedByExternalIds"in e,get:e=>e.highlightedByExternalIds,set:(e,i)=>{e.highlightedByExternalIds=i}},metadata:t},m,u),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}rootStore=l(this,a);booths=l(this,h,[]);highlightedByExternalIds=(l(this,d),l(this,m,[]));get boothById(){return new Map(this.booths.map(t=>[t.id,t]))}get boothByExternalId(){return new Map(this.booths.map(t=>[t.externalId,t]))}get boothByName(){return new Map(this.booths.map(t=>[t.name.toLowerCase(),t]))}get boothBySlug(){return new Map(this.booths.map(t=>[t.slug,t]))}get borderWidth(){if(x.boothBorderWidth)return x.boothBorderWidth;if(x.EXPO==="groomexpo")return .4;const t=this.booths.filter(e=>e.rect).map(e=>e.rect.size.width+e.rect.size.height);return t.reduce((e,i)=>e+i,0)/t.length/80}constructor(t){l(this,u),this.rootStore=t}get bookmarked(){return this.booths.filter(t=>t.bookmarkedDirectly)}getNearestBooth(t){var e=null;const B=this.booths.map(o=>({lineLength:E(t,o.rect.center),name:o.name})).sort((o,D)=>o.lineLength-D.lineLength)[0];return e=this.booths.find(o=>o.name===B.name),e}getBoothAtPoint(t){return this.booths.find(e=>e.rect.containsPoint(t))}findBooth(t){return this.boothByExternalId.get(t)||this.boothByName.get(t.toLowerCase())||this.boothBySlug.get(t)}replaceBookmarked(t){const e=(t||[]).map(o=>this.boothById.get(o)).filter(o=>o),i=new Set(e),B=this.bookmarked.filter(o=>!i.has(o));for(const o of B)o.bookmarkedDirectly=!1;for(const o of e)o.bookmarkedDirectly=!0}}})();export default N;let I=(()=>{let a=[],n,h=[],d=[],c,m=[],u=[],b,g,k,p,f,_,y;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;n=[v],c=[v],b=[s({keepAlive:!0})],g=[s({keepAlive:!0})],k=[s({keepAlive:!0})],p=[s({keepAlive:!0})],f=[s({keepAlive:!0})],_=[s({keepAlive:!0})],y=[s({keepAlive:!0})],r(this,null,b,{kind:"getter",name:"bookmarked",static:!1,private:!1,access:{has:e=>"bookmarked"in e,get:e=>e.bookmarked},metadata:t},null,a),r(this,null,g,{kind:"getter",name:"uiState",static:!1,private:!1,access:{has:e=>"uiState"in e,get:e=>e.uiState},metadata:t},null,a),r(this,null,k,{kind:"getter",name:"fullName",static:!1,private:!1,access:{has:e=>"fullName"in e,get:e=>e.fullName},metadata:t},null,a),r(this,null,p,{kind:"getter",name:"visible",static:!1,private:!1,access:{has:e=>"visible"in e,get:e=>e.visible},metadata:t},null,a),r(this,null,f,{kind:"getter",name:"hover",static:!1,private:!1,access:{has:e=>"hover"in e,get:e=>e.hover},metadata:t},null,a),r(this,null,_,{kind:"getter",name:"selected",static:!1,private:!1,access:{has:e=>"selected"in e,get:e=>e.selected},metadata:t},null,a),r(this,null,y,{kind:"getter",name:"skipDim",static:!1,private:!1,access:{has:e=>"skipDim"in e,get:e=>e.skipDim},metadata:t},null,a),r(null,null,n,{kind:"field",name:"layer",static:!1,private:!1,access:{has:e=>"layer"in e,get:e=>e.layer,set:(e,i)=>{e.layer=i}},metadata:t},h,d),r(null,null,c,{kind:"field",name:"bookmarkedDirectly",static:!1,private:!1,access:{has:e=>"bookmarkedDirectly"in e,get:e=>e.bookmarkedDirectly,set:(e,i)=>{e.bookmarkedDirectly=i}},metadata:t},m,u),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}store=l(this,a);id;name;externalId;title;rect;borderWidth;borderColor;noLabels;rotate;paths;pathsWithRect;slug;error;description;exhibitors;labelColor;schedule;poiTypeId;poiType;poiIcon;meta;layer=l(this,h,void 0);bookmarkedDirectly=(l(this,d),l(this,m,!1));get bookmarked(){return A.disableBookmarked?!1:this.schedule?.some(t=>t.bookmarked)?!0:this.exhibitors.length>0?!!this.exhibitors.find(t=>t.bookmarked):this.bookmarkedDirectly}get uiState(){return this.store.rootStore.uiState}get fullName(){const t=this.meta?Object.entries(this.meta).filter(([e])=>!e.startsWith("_")).map(([e,i])=>`${e} ${i}`).join(" "):"";return`${this.name} ${t}`.replace(/\s+/g," ").trim()}get visible(){return this.layer?.visible??!0}get hover(){return this.uiState.hoveredBooths.has(this)}get selected(){return this.uiState.selectedBooths.has(this)}get skipDim(){return this.uiState.highlightedBooths.has(this.id.toString())}constructor(){l(this,u)}}})();export{I as BoothBase};export class RegularBooth extends I{buyUrl;reserveUrl;type;status;price;entity={type:"booth",variant:"regular"};size;availColor;soldColor;holdColor;onHold;reserved;shapes}export class SpecialBooth extends I{color;shapes;entity={type:"booth",variant:"special"}}
@@ -1,5 +1,5 @@
1
+ import { Box } from '@expofp/geometry';
1
2
  import { LayerDef } from '@expofp/renderer';
2
- import Rect from '../core/Rect';
3
3
  export declare enum LayersMode {
4
4
  Default = 0,// one floor plans
5
5
  Separated = 1,// outdated
@@ -18,8 +18,8 @@ export declare class Layer {
18
18
  name: string;
19
19
  description: string;
20
20
  frozen: boolean;
21
- rect: Rect;
22
- viewbox: Rect;
21
+ rect: Box;
22
+ viewbox: Box;
23
23
  configured: boolean;
24
24
  childLayers: Layer[];
25
25
  rootParent: Layer;
@@ -39,7 +39,7 @@ export default class LayerStore {
39
39
  private updateVisibilityTimeout;
40
40
  get visible(): Layer[];
41
41
  get loaded(): Layer[];
42
- get rectangle(): Rect | null;
42
+ get rectangle(): Box | null;
43
43
  get pathwayLayers(): Layer[];
44
44
  get floors(): (Floor & {
45
45
  layer: Layer;
@@ -1 +1 @@
1
- import{__esDecorate as l,__runInitializers as o}from"tslib";import{action as w,computed as v,observable as u,runInAction as C}from"mobx";import E from"../components/Map/drawing/config/config-load-layer";import W from"../core/Rect";import{areLayersEnabled as j}from"../utils/areLayersEnabled";import{shortenName as D}from"../utils/shortenName";import n from".";export var LayersMode;(function(i){i[i.Default=0]="Default",i[i.Separated=1]="Separated",i[i.Radio=2]="Radio",i[i.CheckBox=3]="CheckBox"})(LayersMode||(LayersMode={}));export var LayerMode;(function(i){i[i.Unset=0]="Unset",i[i.AlwaysVisible=1]="AlwaysVisible",i[i.AlwaysHidden=2]="AlwaysHidden",i[i.TurnedOn=3]="TurnedOn",i[i.TurnedOff=4]="TurnedOff"})(LayerMode||(LayerMode={}));let O=(()=>{let i,h=[],y=[],m,p=[],_=[];return class{static{const c=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;i=[u],m=[u],l(null,null,i,{kind:"field",name:"loaded",static:!1,private:!1,access:{has:s=>"loaded"in s,get:s=>s.loaded,set:(s,f)=>{s.loaded=f}},metadata:c},h,y),l(null,null,m,{kind:"field",name:"visible",static:!1,private:!1,access:{has:s=>"visible"in s,get:s=>s.visible,set:(s,f)=>{s.visible=f}},metadata:c},p,_),c&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:c})}basePriority;name;description;frozen;rect=null;viewbox=null;configured;childLayers=[];rootParent=null;mode;children=[];pathway;floorIndex;loaded=o(this,h,void 0);visible=(o(this,y),o(this,p,void 0));get shortName(){return D(this.description)}constructor(){o(this,_)}}})();export{O as Layer};let N=(()=>{let i=[],h,y=[],m=[],p,_=[],b=[],c,s=[],f=[],L,S=[],x=[],P,k,A,I,R,T,V,z;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;h=[u],p=[u],c=[u],L=[u],P=[v({keepAlive:!0})],k=[v({keepAlive:!0})],A=[v({keepAlive:!0})],I=[v],R=[v],T=[w],V=[w],z=[w],l(this,null,P,{kind:"getter",name:"visible",static:!1,private:!1,access:{has:e=>"visible"in e,get:e=>e.visible},metadata:t},null,i),l(this,null,k,{kind:"getter",name:"loaded",static:!1,private:!1,access:{has:e=>"loaded"in e,get:e=>e.loaded},metadata:t},null,i),l(this,null,A,{kind:"getter",name:"rectangle",static:!1,private:!1,access:{has:e=>"rectangle"in e,get:e=>e.rectangle},metadata:t},null,i),l(this,null,I,{kind:"getter",name:"pathwayLayers",static:!1,private:!1,access:{has:e=>"pathwayLayers"in e,get:e=>e.pathwayLayers},metadata:t},null,i),l(this,null,R,{kind:"getter",name:"floors",static:!1,private:!1,access:{has:e=>"floors"in e,get:e=>e.floors},metadata:t},null,i),l(this,null,T,{kind:"method",name:"updateVisibility",static:!1,private:!1,access:{has:e=>"updateVisibility"in e,get:e=>e.updateVisibility},metadata:t},null,i),l(this,null,V,{kind:"method",name:"showPathWay",static:!1,private:!1,access:{has:e=>"showPathWay"in e,get:e=>e.showPathWay},metadata:t},null,i),l(this,null,z,{kind:"method",name:"hidePathways",static:!1,private:!1,access:{has:e=>"hidePathways"in e,get:e=>e.hidePathways},metadata:t},null,i),l(null,null,h,{kind:"field",name:"layers",static:!1,private:!1,access:{has:e=>"layers"in e,get:e=>e.layers,set:(e,a)=>{e.layers=a}},metadata:t},y,m),l(null,null,p,{kind:"field",name:"defaultLayer",static:!1,private:!1,access:{has:e=>"defaultLayer"in e,get:e=>e.defaultLayer,set:(e,a)=>{e.defaultLayer=a}},metadata:t},_,b),l(null,null,c,{kind:"field",name:"mode",static:!1,private:!1,access:{has:e=>"mode"in e,get:e=>e.mode,set:(e,a)=>{e.mode=a}},metadata:t},s,f),l(null,null,L,{kind:"field",name:"layersLoaded",static:!1,private:!1,access:{has:e=>"layersLoaded"in e,get:e=>e.layersLoaded,set:(e,a)=>{e.layersLoaded=a}},metadata:t},S,x),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}layers=(o(this,i),o(this,y,[]));defaultLayer=(o(this,m),o(this,_,void 0));mode=(o(this,b),o(this,s,void 0));layersLoaded=(o(this,f),o(this,S,!1));updateVisibilityTimeout=(o(this,x),0);get visible(){return this.layers.filter(t=>t.frozen||t.visible)}get loaded(){return this.layers.filter(t=>t.loaded)}get rectangle(){var t=this.visible.filter(e=>!e.frozen).map(e=>e.viewbox??e.rect);return this.mode!==LayersMode.Radio||!t.length?null:W.fromMultiple(t)||null}get pathwayLayers(){return this.layers.filter(t=>t.pathway)}get floors(){if(!j())return[];const t=new Set(this.layers.filter(a=>a&&!a.frozen&&!a.rootParent&&!a.pathway).concat(n.routeStore.layers.filter(a=>a&&a.mode!==LayerMode.AlwaysHidden&&a.mode!==LayerMode.AlwaysVisible))),e=Array.from(t).reverse();return e.map((a,r)=>{const d=n.routeStore.layers.length>0&&n.routeStore.layers.indexOf(a)===-1,g=n.toursStore.tourLayers.length>0&&n.toursStore.tourLayers.indexOf(a)===-1;return{layer:a,name:a.name,shortName:a.shortName,description:a.description,active:a.visible,disabled:!!(d||g),index:a.floorIndex??e.length-r-1}})}updateVisibility(t,e){if(this.mode===LayersMode.Radio&&!e)return;const a=t instanceof O?t:this.findLayer(t);if(!a||a.visible===e){a&&n.routeStore.currentRouteLayer!==a&&(n.routeStore.currentRouteLayer=a);return}E(a,n.rendererService).then(()=>{this.mode===LayersMode.Radio&&this.layers.filter(r=>!r.pathway).forEach(r=>{r.name!==a.name&&!r.frozen&&r.visible&&(r.visible=!1,r.childLayers.forEach(d=>{d.visible=!1}))}),a&&(a.visible=e,a.childLayers.forEach(r=>{r.visible=e}),e&&(n.routeStore.currentRouteLayer=a),typeof n.fp.onFloorActivated=="function"&&(clearTimeout(this.updateVisibilityTimeout),this.updateVisibilityTimeout=setTimeout(()=>{const r=n.fp.getFloors();n.fp.onFloorActivated(r.find(d=>d.name===a.name))})))})}findLayer(t){if(t==null)return null;const e=this.layers.filter(r=>!r.rootParent);if(typeof t=="number"&&(a=e.filter(r=>!r.frozen)[t],a))return a;t=t.toString().toLowerCase();var a=e.find(r=>{const d=(r.name.match(/(-?[0-9]+)/)||"")[0];return t===r?.name.toLowerCase()||t===r?.description.toLowerCase()||t===r?.shortName.toLowerCase()||t===d});return!a&&!/\D/.test(t)&&(a=e.filter(r=>!r.frozen)[parseInt(t)]),a}getPathwayList(){return this.layers.filter(t=>t.pathway)}async showPathWay(t){try{const e=this.findLayer(t);if(!e)throw new Error(`There is no pathway with this name. ${t}`);await E(e,n.rendererService);const a=this.getPathwayList();C(()=>{a.forEach(r=>{const d=r.name===t;r.visible=d,r.childLayers.forEach(g=>{g.visible=d})})})}catch(e){console.error("showPathWay",e)}}hidePathways(){this.getPathwayList().forEach(e=>{e.visible=!1,e.childLayers.forEach(a=>{a.visible=!1})})}}})();export default N;
1
+ import{__esDecorate as l,__runInitializers as o}from"tslib";import{Box as C}from"@expofp/geometry";import{action as w,computed as v,observable as h,runInAction as W}from"mobx";import E from"../components/Map/drawing/config/config-load-layer";import{areLayersEnabled as j}from"../utils/areLayersEnabled";import{shortenName as B}from"../utils/shortenName";import n from".";export var LayersMode;(function(i){i[i.Default=0]="Default",i[i.Separated=1]="Separated",i[i.Radio=2]="Radio",i[i.CheckBox=3]="CheckBox"})(LayersMode||(LayersMode={}));export var LayerMode;(function(i){i[i.Unset=0]="Unset",i[i.AlwaysVisible=1]="AlwaysVisible",i[i.AlwaysHidden=2]="AlwaysHidden",i[i.TurnedOn=3]="TurnedOn",i[i.TurnedOff=4]="TurnedOff"})(LayerMode||(LayerMode={}));let O=(()=>{let i,u=[],y=[],m,p=[],_=[];return class{static{const c=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;i=[h],m=[h],l(null,null,i,{kind:"field",name:"loaded",static:!1,private:!1,access:{has:s=>"loaded"in s,get:s=>s.loaded,set:(s,f)=>{s.loaded=f}},metadata:c},u,y),l(null,null,m,{kind:"field",name:"visible",static:!1,private:!1,access:{has:s=>"visible"in s,get:s=>s.visible,set:(s,f)=>{s.visible=f}},metadata:c},p,_),c&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:c})}basePriority;name;description;frozen;rect=null;viewbox=null;configured;childLayers=[];rootParent=null;mode;children=[];pathway;floorIndex;loaded=o(this,u,void 0);visible=(o(this,y),o(this,p,void 0));get shortName(){return B(this.description)}constructor(){o(this,_)}}})();export{O as Layer};let D=(()=>{let i=[],u,y=[],m=[],p,_=[],b=[],c,s=[],f=[],L,x=[],S=[],P,k,A,I,R,T,V,z;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;u=[h],p=[h],c=[h],L=[h],P=[v({keepAlive:!0})],k=[v({keepAlive:!0})],A=[v({keepAlive:!0})],I=[v],R=[v],T=[w],V=[w],z=[w],l(this,null,P,{kind:"getter",name:"visible",static:!1,private:!1,access:{has:e=>"visible"in e,get:e=>e.visible},metadata:t},null,i),l(this,null,k,{kind:"getter",name:"loaded",static:!1,private:!1,access:{has:e=>"loaded"in e,get:e=>e.loaded},metadata:t},null,i),l(this,null,A,{kind:"getter",name:"rectangle",static:!1,private:!1,access:{has:e=>"rectangle"in e,get:e=>e.rectangle},metadata:t},null,i),l(this,null,I,{kind:"getter",name:"pathwayLayers",static:!1,private:!1,access:{has:e=>"pathwayLayers"in e,get:e=>e.pathwayLayers},metadata:t},null,i),l(this,null,R,{kind:"getter",name:"floors",static:!1,private:!1,access:{has:e=>"floors"in e,get:e=>e.floors},metadata:t},null,i),l(this,null,T,{kind:"method",name:"updateVisibility",static:!1,private:!1,access:{has:e=>"updateVisibility"in e,get:e=>e.updateVisibility},metadata:t},null,i),l(this,null,V,{kind:"method",name:"showPathWay",static:!1,private:!1,access:{has:e=>"showPathWay"in e,get:e=>e.showPathWay},metadata:t},null,i),l(this,null,z,{kind:"method",name:"hidePathways",static:!1,private:!1,access:{has:e=>"hidePathways"in e,get:e=>e.hidePathways},metadata:t},null,i),l(null,null,u,{kind:"field",name:"layers",static:!1,private:!1,access:{has:e=>"layers"in e,get:e=>e.layers,set:(e,a)=>{e.layers=a}},metadata:t},y,m),l(null,null,p,{kind:"field",name:"defaultLayer",static:!1,private:!1,access:{has:e=>"defaultLayer"in e,get:e=>e.defaultLayer,set:(e,a)=>{e.defaultLayer=a}},metadata:t},_,b),l(null,null,c,{kind:"field",name:"mode",static:!1,private:!1,access:{has:e=>"mode"in e,get:e=>e.mode,set:(e,a)=>{e.mode=a}},metadata:t},s,f),l(null,null,L,{kind:"field",name:"layersLoaded",static:!1,private:!1,access:{has:e=>"layersLoaded"in e,get:e=>e.layersLoaded,set:(e,a)=>{e.layersLoaded=a}},metadata:t},x,S),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}layers=(o(this,i),o(this,y,[]));defaultLayer=(o(this,m),o(this,_,void 0));mode=(o(this,b),o(this,s,void 0));layersLoaded=(o(this,f),o(this,x,!1));updateVisibilityTimeout=(o(this,S),0);get visible(){return this.layers.filter(t=>t.frozen||t.visible)}get loaded(){return this.layers.filter(t=>t.loaded)}get rectangle(){var t=this.visible.filter(e=>!e.frozen).map(e=>e.viewbox??e.rect);return this.mode!==LayersMode.Radio||!t.length?null:C.fromUnion(...t)||null}get pathwayLayers(){return this.layers.filter(t=>t.pathway)}get floors(){if(!j())return[];const t=new Set(this.layers.filter(a=>a&&!a.frozen&&!a.rootParent&&!a.pathway).concat(n.routeStore.layers.filter(a=>a&&a.mode!==LayerMode.AlwaysHidden&&a.mode!==LayerMode.AlwaysVisible))),e=Array.from(t).reverse();return e.map((a,r)=>{const d=n.routeStore.layers.length>0&&n.routeStore.layers.indexOf(a)===-1,g=n.toursStore.tourLayers.length>0&&n.toursStore.tourLayers.indexOf(a)===-1;return{layer:a,name:a.name,shortName:a.shortName,description:a.description,active:a.visible,disabled:!!(d||g),index:a.floorIndex??e.length-r-1}})}updateVisibility(t,e){if(this.mode===LayersMode.Radio&&!e)return;const a=t instanceof O?t:this.findLayer(t);if(!a||a.visible===e){a&&n.routeStore.currentRouteLayer!==a&&(n.routeStore.currentRouteLayer=a);return}E(a,n.rendererService).then(()=>{this.mode===LayersMode.Radio&&this.layers.filter(r=>!r.pathway).forEach(r=>{r.name!==a.name&&!r.frozen&&r.visible&&(r.visible=!1,r.childLayers.forEach(d=>{d.visible=!1}))}),a&&(a.visible=e,a.childLayers.forEach(r=>{r.visible=e}),e&&(n.routeStore.currentRouteLayer=a),typeof n.fp.onFloorActivated=="function"&&(clearTimeout(this.updateVisibilityTimeout),this.updateVisibilityTimeout=setTimeout(()=>{const r=n.fp.getFloors();n.fp.onFloorActivated(r.find(d=>d.name===a.name))})))})}findLayer(t){if(t==null)return null;const e=this.layers.filter(r=>!r.rootParent);if(typeof t=="number"&&(a=e.filter(r=>!r.frozen)[t],a))return a;t=t.toString().toLowerCase();var a=e.find(r=>{const d=(r.name.match(/(-?[0-9]+)/)||"")[0];return t===r?.name.toLowerCase()||t===r?.description.toLowerCase()||t===r?.shortName.toLowerCase()||t===d});return!a&&!/\D/.test(t)&&(a=e.filter(r=>!r.frozen)[parseInt(t)]),a}getPathwayList(){return this.layers.filter(t=>t.pathway)}async showPathWay(t){try{const e=this.findLayer(t);if(!e)throw new Error(`There is no pathway with this name. ${t}`);await E(e,n.rendererService);const a=this.getPathwayList();W(()=>{a.forEach(r=>{const d=r.name===t;r.visible=d,r.childLayers.forEach(g=>{g.visible=d})})})}catch(e){console.error("showPathWay",e)}}hidePathways(){this.getPathwayList().forEach(e=>{e.visible=!1,e.childLayers.forEach(a=>{a.visible=!1})})}}})();export default D;
@@ -1,6 +1,6 @@
1
- import { Point } from 'simple-geometry';
2
- import type { ArbitraryPoint } from '../wayfinding/adapters';
3
- import type { RouteLine } from '../wayfinding/core';
1
+ import { Point } from '@expofp/geometry';
2
+ import { ArbitraryPoint } from '../wayfinding/adapters';
3
+ import { RouteLine } from '../wayfinding/core';
4
4
  import { Booth } from './BoothStore';
5
5
  import { Exhibitor } from './ExhibitorStore';
6
6
  import { Layer } from './LayerStore';
@@ -1 +1 @@
1
- import{__esDecorate as a,__runInitializers as r}from"tslib";import{action as m,computed as x,observable as f}from"mobx";import{lineLength as Fe,Point as He}from"simple-geometry";import{getName as Je}from"../components/Kiosk/SetKiosk";import{DEFAULT_UNITS as Ne,ORIENTATION_GRANTED_KEY as Qe}from"../constants";import S from"../core/Rect";import Be from"../data";import{fpGeo as P}from"../data/fpGeo";import{getLayerSvg as et,svgArea as k}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,CURRENT_LOCATION_NAME as rt,CURRENT_POSITION_POINT_ID as nt,graphDataSource as je,KIOSK_ANCHOR_POINT_ID as ot,toArbitraryPoint as We}from"../wayfinding/adapters";import{createWayfindingEngine as lt}from"../wayfinding/core";import u,{layersStore as T}from".";import{BoothBase as R}from"./BoothStore";import{uiState as _}from"./index";import{LayersMode as ct}from"./LayerStore";const b=s=>typeof s=="string"?Number(s.replace(",",".")):s;let ut=(()=>{let s=[],n,l=[],p=[],y,v=[],g=[],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,he,me,pe,_e,ye,ge,ke,be,Re,ve,xe,Ee=[],Le=[],Te,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=[x],fe=[m],he=[m],me=[m],pe=[x({keepAlive:!0})],_e=[m],ye=[m],ge=[x({keepAlive:!0})],ke=[x({keepAlive:!0})],be=[m],Re=[m],ve=[m],xe=[f],Te=[x],Se=[m],Pe=[m],ze=[m],De=[m],Ie=[f],Me=[m],Ce=[x({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,he,{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,me,{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,ge,{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,ke,{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,Te,{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,p),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,g),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,Le),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,p),r(this,v,null));currentPosition=(r(this,g),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,!!je.getLines().find(t=>t.unaccessible)));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&&u.fp.onDirection&&u.fp.onDirection(null);const c=()=>{if(this.rootStore.moveToList(o),_.details=t,t&&(!t.from||!t.to)&&u.showOverlay(),t?.to&&t?.from){const d=dt(t.from);d&&this.rootStore.layerStore.updateVisibility(d,!0)}if(!this.currentRouteLayer){const d=Xe(this.rootStore.layerStore,t?.from),h=Xe(this.rootStore.layerStore,t?.to);d?this.currentRouteLayer=d:h&&(this.currentRouteLayer=h)}e&&t?.from&&t?.to&&st(tt.ClickDirections,`${t?.from?"From "+t.from.name:""} ${t?.to?"To "+t.to.name:""}`)};i?c():setTimeout(c,200)}rebuildRouteFromPosition(t){const e=_.selectedRoute;e?.to&&this.selectRoute(new Route(t,e.to,e.waypoints),!1,!0)}resolveFallbackFrom(){if(this.currentPosition)return We(this.currentPosition,rt,nt);const t=_.kioskData;return t?We({x:t.x,y:t.y,z:t.z},Je(),ot):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 u.routeStore.routeLines?.map(t=>t.p0.layer)?.filter((t,e,i)=>i.indexOf(t)===e).reverse().map((t,e)=>({id:e+1,layer:u.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=>T.mode===ct.Default||!e?o.visible&&o.rect:o.rect&&(typeof t.z!="number"&&!t.z&&o.visible||e.name===o.layer?.name)).sort((o,c)=>Fe(i,{x:o.rect.cx,y:o.rect.cy})-Fe(i,{x:c.rect.cx,y:c.rect.cy}))[0]||null}setMarkers(t){this.markersData.markers=(t?.markers??[]).map(ft),this.markersData.icons=t?.icons??[]}selectMarker(t,e){const i=this.markersData.markers.find(c=>c.id===t);this.markersData.markers.forEach(c=>c.active=!1),i&&(i.active=!0);let o=u.layerStore.findLayer(i?.z);if(e&&i){const c=u.rendererService.renderer;return o&&!o?.visible&&T.updateVisibility(o,!0),c?c.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 u.routeStore.routeLines?.map(e=>e.p0.layer).reverse().forEach(e=>{t.indexOf(e)===-1&&t.push(e)}),t.map(e=>u.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),c=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 h=u.layerStore.findLayer(t.z),E=new CurrentPosition(d.x,d.y,h?.name||this.currentRouteLayer?.name,at(d),t.lat,t.lng);let Oe=!this.routeLines?.length;if(h&&this.routeLines?.length&&(Oe=!!this.routeLines.find(L=>L.p0.layer===h.name||L.p1.layer===h.name)),c&&Oe){const L=u.rendererService.renderer;if(h&&!h?.visible&&T.updateVisibility(h,!0),!L){Ue.warn("Renderer is not initialized. Cannot pan to current position.");return}L.controls.panTo(E.x,E.y)}this.currentPosition=E,this.gpsEnabled||(this.cpTimeout=setTimeout(()=>{this.currentPosition&&this.selectCurrentPosition(null,!1)},30*1e3))}findLocation(){if(!this.canFindLocation)return;if(u.maplibreStore.showMaplibre){_.moveToLocation=!0;return}const t=this.currentPosition??_.kioskData;if(!t)return;this.currentPosition&&localStorage.getItem(Qe)==="false"&&(u.routeStore.requestCompass=!0);const e=S.fromCxcywh(t.x,t.y,100,100);let i;if(e.intersects(k))i=e;else{const c=Math.max(k.x1,Math.min(t.x,k.x2)),d=Math.max(k.y1,Math.min(t.y,k.y2)),h=Math.min(k.w,k.h)*.3,E=S.fromCxcywh(c,d,h,h).getIntersection(k);i=S.fromMultiple([e,E])}_.moveToRect=i;const o=u.layerStore.findLayer(t.z);o&&T.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;u.fp.onDirection&&setTimeout(()=>{u.fp.onDirection({from:Ye(t?.from??null),to:Ye(t?.to??null),lines:this.routeLines,distance:`${e}${i}`,units:i,time:qe(e,Ze(i))})},200)}checkRoutes(){const t=lt(je),e=u.boothStore.booths;console.info(`Route check started ${e.length}.... `);for(let i=0;i<e.length;i++){const o=e[i];for(let c=i+1;c<e.length;c++){const d=e[c];t.buildRoute(Ke(o),Ke(d)).lines.length||console.warn(`No route found from ${o.name} to ${d.name}`)}}console.info("Route check done....")}isGpsTrackingEnabled=(r(this,Le),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 ut;function dt(s){if(s)return s instanceof R?s.layer?.name:s.layer}function Xe(s,n){return n?n instanceof R?n.layer??null:s.findLayer(n.layer):null}function ft(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&&s.x>=n.p0.x&&s.x<=n.p2.x&&s.y>=n.p0.y&&s.y<=n.p2.y?l={...s}:n&&Ve(s.lat)&&Ve(s.lng)?l=$e(s,n):n||(l=s),l||null}export function findBooth(s){return u.boothStore.findBooth(s)||u.exhibitorStore.findExhibitor(s)?.booths[0]}export function findEntityByExternalId(s){const n=u.boothStore.boothByExternalId.get(s);if(n)return{type:"booth",entity:n};const l=u.exhibitorStore.exhibitorByExternalId.get(s);if(l)return{type:"exhibitor",entity:l}}export function separateExternalIds(s){const n=[],l=[];for(const p of s){const y=findEntityByExternalId(p);y&&(y.type==="booth"?n.push(p):l.push(p))}return{boothExternalIds:n,exhibitorExternalIds:l}}export function extractRoute(s,n,l){return new Route(findBooth(s)??null,findBooth(n)??null,l?.map(p=>findBooth(p)))}export class Route{from;to;waypoints;constructor(n,l,p){this.from=n,this.to=l,this.waypoints=p;const y=n instanceof R?n.id:void 0,v=l instanceof R?l.id:void 0;this.waypoints=p?.filter(g=>g&&g.id!==y&&g.id!==v)}}function Ye(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 He{x;y;z;angle;lat;lng;constructor(n,l,p,y,v,g){super(n,l),this.x=n,this.y=l,this.z=p,this.angle=y,this.lat=v,this.lng=g}}
1
+ import{__esDecorate as a,__runInitializers as r}from"tslib";import{action as h,computed as E,observable as f}from"mobx";import{Box as S,Point as He,boxContainsPoint as Je,pointDistance as Fe}from"@expofp/geometry";import c,{layersStore as L}from".";import{fpGeo as P}from"../data/fpGeo";import{getName as Qe}from"../components/Kiosk/SetKiosk";import{DEFAULT_UNITS as Ne,ORIENTATION_GRANTED_KEY as et}from"../constants";import Be from"../data";import{getLayerSvg as tt,svgArea as k}from"../data/svg";import{GaEventActions as st,sendEventToGa as it}from"../tools/gtag";import Ue from"../tools/logger";import{areLayersEnabled as at}from"../utils/areLayersEnabled";import{calcSpeed as Ze}from"../utils/calcSpeed";import{calcTravelTime as qe}from"../utils/calcTravelTime";import{calculateRelativeBearing as rt,convertGpsToLocal as $e,isValidPointCoords as Ve}from"../utils/gps";import{boothToEndpoint as Ke,CURRENT_LOCATION_NAME as nt,CURRENT_POSITION_POINT_ID as ot,graphDataSource as je,KIOSK_ANCHOR_POINT_ID as lt,toArbitraryPoint as We}from"../wayfinding/adapters";import{createWayfindingEngine as ct}from"../wayfinding/core";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=[],p=[],y,v=[],g=[],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,ge,ke,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=[h],me=[h],he=[h],pe=[E({keepAlive:!0})],_e=[h],ye=[h],ge=[E({keepAlive:!0})],ke=[E({keepAlive:!0})],be=[h],Re=[h],ve=[h],xe=[f],Le=[E],Se=[h],Pe=[h],ze=[h],De=[h],Ie=[f],Me=[h],Ce=[E({keepAlive:!0})],Ge=[h],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,ge,{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,ke,{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,p),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,g),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,p),r(this,v,null));currentPosition=(r(this,g),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,!!je.getLines().find(t=>t.unaccessible)));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=Xe(this.rootStore.layerStore,t?.from),m=Xe(this.rootStore.layerStore,t?.to);d?this.currentRouteLayer=d:m&&(this.currentRouteLayer=m)}e&&t?.from&&t?.to&&it(st.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 We(this.currentPosition,nt,ot);const t=_.kioskData;return t?We({x:t.x,y:t.y,z:t.z},Qe(),lt):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),at()||(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 m=c.layerStore.findLayer(t.z),x=new CurrentPosition(d.x,d.y,m?.name||this.currentRouteLayer?.name,rt(d),t.lat,t.lng);let Oe=!this.routeLines?.length;if(m&&this.routeLines?.length&&(Oe=!!this.routeLines.find(T=>T.p0.layer===m.name||T.p1.layer===m.name)),u&&Oe){const T=c.rendererService.renderer;if(m&&!m?.visible&&L.updateVisibility(m,!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(et)==="false"&&(c.routeStore.requestCompass=!0);const e=S.fromCenter(t,{x:100,y:100});let i;if(e.intersects(k))i=e;else{const u=Math.max(k.min.x,Math.min(t.x,k.max.x)),d=Math.max(k.min.y,Math.min(t.y,k.max.y)),m=Math.min(k.size.width,k.size.height)*.3,x=S.fromCenter({x:u,y:d},{x:m,y:m}).intersection(k);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=tt(),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:Ye(t?.from??null),to:Ye(t?.to??null),lines:this.routeLines,distance:`${e}${i}`,units:i,time:qe(e,Ze(i))})},200)}checkRoutes(){const t=ct(je),e=c.boothStore.booths;console.info(`Route check started ${e.length}.... `);for(let i=0;i<e.length;i++){const o=e[i];for(let u=i+1;u<e.length;u++){const d=e[u];t.buildRoute(Ke(o),Ke(d)).lines.length||console.warn(`No route found from ${o.name} to ${d.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 Xe(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&&Je({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 p of s){const y=findEntityByExternalId(p);y&&(y.type==="booth"?n.push(p):l.push(p))}return{boothExternalIds:n,exhibitorExternalIds:l}}export function extractRoute(s,n,l){return new Route(findBooth(s)??null,findBooth(n)??null,l?.map(p=>findBooth(p)))}export class Route{from;to;waypoints;constructor(n,l,p){this.from=n,this.to=l,this.waypoints=p;const y=n instanceof R?n.id:void 0,v=l instanceof R?l.id:void 0;this.waypoints=p?.filter(g=>g&&g.id!==y&&g.id!==v)}}function Ye(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 He{x;y;z;angle;lat;lng;constructor(n,l,p,y,v,g){super(n,l),this.x=n,this.y=l,this.z=p,this.angle=y,this.lat=v,this.lng=g}}
@@ -1,7 +1,6 @@
1
+ import { Box, Point } from '@expofp/geometry';
1
2
  import { ReactNode } from 'react';
2
3
  import { Kiosk } from '../components/Kiosk/SetKiosk';
3
- import Rect from '../core/Rect';
4
- import Size from '../core/Size';
5
4
  import { RawPoiType } from '../data/Data';
6
5
  import { Booth } from './BoothStore';
7
6
  import { Category } from './CategoryStore';
@@ -37,7 +36,7 @@ export default class UIState {
37
36
  zoomBy: number;
38
37
  rollReset: boolean;
39
38
  moveToBooths: Booth[];
40
- moveToRect: Rect;
39
+ moveToRect: Box;
41
40
  moveToLocation: boolean;
42
41
  menu: boolean;
43
42
  searchFocused: boolean;
@@ -45,7 +44,7 @@ export default class UIState {
45
44
  printingPdf: boolean;
46
45
  largeMessage: string;
47
46
  largeMessageLastSet: number;
48
- screenSize: Size;
47
+ screenSize: Point;
49
48
  desiredOverlaySize: OverlaySize;
50
49
  overlayShowsAll: boolean;
51
50
  centerMap: boolean;
@@ -165,11 +164,11 @@ export default class UIState {
165
164
  get searchActionsHeightPx(): number;
166
165
  get fullSizeOffset(): number;
167
166
  get shouldShowSearchButtons(): false;
168
- get canvasVisibleRectPx(): Rect;
167
+ get canvasVisibleRectPx(): Box;
169
168
  get shouldShiftMapRect(): false | Booth | Exhibitor | Category | EventItem | SpeakerItem | Route;
170
169
  get hasAppliedFilters(): boolean;
171
- get canvasVisibleRectPt(): Rect;
172
- get canvasSizePt(): Size;
170
+ get canvasVisibleRectPt(): Box;
171
+ get canvasSizePt(): Point;
173
172
  get shouldUseBackdrop(): boolean | undefined;
174
173
  forceDim: boolean;
175
174
  setForceDim(forceDim: boolean): void;