@expofp/floorplan 3.0.0-alpha.15 → 3.0.0-alpha.17

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 (214) hide show
  1. package/dist/browser/Debug-CUZihF0D.js +40 -0
  2. package/dist/browser/{Demo-pwpeopeB.js → Demo-CR3VLKTk.js} +7 -7
  3. package/dist/browser/{Free-CeZSHheC.js → Free-DQNZneql.js} +13 -13
  4. package/dist/browser/Gallery-DuHTiSqx.js +71 -0
  5. package/dist/browser/{GpsLoader-BS8b-Aif.js → GpsLoader-DmtF8nSh.js} +48 -48
  6. package/dist/browser/{KioskStore-_Zcv0Bc0.js → KioskStore-B7BTukd0.js} +10 -10
  7. package/dist/browser/{Mapbox-Cl59-8BN.js → Mapbox-3GevGU_j.js} +14 -14
  8. package/dist/browser/{SetKioskMode-CjjAW8SI.js → SetKioskMode-D3066R7_.js} +51 -51
  9. package/dist/browser/{ShowKiosk-DUcthTIK.js → ShowKiosk-3jaagNzR.js} +9 -9
  10. package/dist/browser/{ThreeComponent-CdelmApV.js → ThreeComponent-DNFBzo3g.js} +7 -7
  11. package/dist/browser/ViewerMenuPanel-BLo85uoZ.js +77 -0
  12. package/dist/browser/{boolean-editor-HetrPeeC.js → boolean-editor-DKH9ubYi.js} +6 -6
  13. package/dist/browser/bundle.json +32 -29
  14. package/dist/browser/{client-BMgLu7eB.js → client-meZ2tCS0.js} +4 -4
  15. package/dist/browser/{data-eO9H1gMa.js → data-SQHwxPrN.js} +6 -6
  16. package/dist/browser/{debug-overlay-DqIeCuHo.js → debug-overlay-C4TVlyAN.js} +9 -9
  17. package/dist/browser/{debug-ui-6t_iunMd.js → debug-ui-CVsP8oRC.js} +14 -14
  18. package/dist/browser/{favicon-CoF9H4Pb.js → favicon-Cimz_lqt.js} +1 -1
  19. package/dist/browser/{fetch-retry.umd-GcX1W9qV.js → fetch-retry.umd-XH7ZZmae.js} +26 -26
  20. package/dist/browser/{flex-BC_JSvaB.js → flex-Bq6tPjvK.js} +5 -5
  21. package/dist/browser/{floorplan.ready-CZn5dvsU.js → floorplan.ready-ClV1c-bq.js} +15179 -16848
  22. package/dist/browser/fonts/efp-symbols.woff +0 -0
  23. package/dist/browser/{index-uGr-_9rk.js → index-3PCrVVmD.js} +12 -12
  24. package/dist/browser/{index-CEVUHq8g.js → index-BuXQKG6_.js} +5 -5
  25. package/dist/browser/{index-Dp-WygGH.js → index-C1A1q6hi.js} +12 -12
  26. package/dist/browser/index-C3wwaChX.js +12498 -0
  27. package/dist/browser/{index-sNwIhVDZ.js → index-CcKlEKDb.js} +5 -5
  28. package/dist/browser/{index-Dba8EyWF.js → index-CfyxM29w.js} +19 -19
  29. package/dist/browser/{index-C1Rwmp91.js → index-DkMgYVuZ.js} +14 -14
  30. package/dist/browser/index.js +4 -4
  31. package/dist/browser/{jsx-runtime-BHfPvO9I.js → jsx-runtime-rSp8ZldI.js} +1 -1
  32. package/dist/browser/locales/ar.json +50 -4
  33. package/dist/browser/locales/de.json +50 -4
  34. package/dist/browser/locales/es.json +50 -4
  35. package/dist/browser/locales/fr.json +50 -4
  36. package/dist/browser/locales/he.json +50 -4
  37. package/dist/browser/locales/it.json +50 -4
  38. package/dist/browser/locales/kk.json +50 -4
  39. package/dist/browser/locales/ko.json +50 -4
  40. package/dist/browser/locales/mn.json +50 -4
  41. package/dist/browser/locales/nl.json +50 -4
  42. package/dist/browser/locales/pl.json +51 -5
  43. package/dist/browser/locales/pt.json +50 -4
  44. package/dist/browser/locales/ru.json +51 -5
  45. package/dist/browser/locales/sv.json +50 -4
  46. package/dist/browser/locales/th.json +50 -4
  47. package/dist/browser/locales/tr.json +50 -4
  48. package/dist/browser/locales/uk.json +50 -4
  49. package/dist/browser/locales/vi.json +50 -4
  50. package/dist/browser/locales/zh.json +50 -4
  51. package/dist/browser/{main-DYasSc7U.js → main-C1uhxJ8U.js} +1 -1
  52. package/dist/browser/{particles.min-B6O6_M_h.js → particles.min-DkmJkLkl.js} +3 -3
  53. package/dist/esm/RouteCutIn.d.ts +0 -1
  54. package/dist/esm/RouteCutIn.js +1 -1
  55. package/dist/esm/components/Alert.d.ts +2 -0
  56. package/dist/esm/components/Alert.js +1 -1
  57. package/dist/esm/components/Badge.d.ts +3 -2
  58. package/dist/esm/components/Badge.js +1 -1
  59. package/dist/esm/components/Booth/BoothOnHold.d.ts +2 -2
  60. package/dist/esm/components/Booth/BoothOnHold.js +1 -1
  61. package/dist/esm/components/Booth/BoothReserved.d.ts +2 -1
  62. package/dist/esm/components/Booth/BoothReserved.js +1 -1
  63. package/dist/esm/components/Booth/BoothWithoutExhibitor.d.ts +2 -2
  64. package/dist/esm/components/Booth/BoothWithoutExhibitor.js +1 -1
  65. package/dist/esm/components/CookieConsent.js +1 -1
  66. package/dist/esm/components/Exhibitor.js +1 -1
  67. package/dist/esm/components/Gallery/GalleryControls/GalleryControls.d.ts +2 -2
  68. package/dist/esm/components/Gallery/GalleryControls/GalleryControls.js +1 -1
  69. package/dist/esm/components/Gallery/GalleryModal/GalleryModal.d.ts +2 -2
  70. package/dist/esm/components/Gallery/GalleryModal/GalleryModal.js +1 -1
  71. package/dist/esm/components/Kiosk/SetKiosk/storage.d.ts +1 -1
  72. package/dist/esm/components/Kiosk/SetKiosk/storage.js +1 -1
  73. package/dist/esm/components/Kiosk/ShowKiosk.js +1 -1
  74. package/dist/esm/components/Language.js +1 -1
  75. package/dist/esm/components/LanguageRow.d.ts +0 -1
  76. package/dist/esm/components/LanguageRow.js +1 -1
  77. package/dist/esm/components/Layout.js +1 -1
  78. package/dist/esm/components/List.js +1 -1
  79. package/dist/esm/components/Map/drawing/config/config-markers.js +1 -1
  80. package/dist/esm/components/Map/drawing/config/config-wf.d.ts +0 -2
  81. package/dist/esm/components/Map/drawing/config/config-wf.js +1 -1
  82. package/dist/esm/components/Map/drawing/config/route-snapping/snapPositionToRoute.d.ts +1 -1
  83. package/dist/esm/components/Map/drawing/config/route-snapping/snapPositionToRoute.js +1 -1
  84. package/dist/esm/components/Map/drawing/config/route-snapping/splitRouteByPoint.d.ts +1 -1
  85. package/dist/esm/components/Map/drawing/config/route-snapping/splitRouteByPoint.js +1 -1
  86. package/dist/esm/components/Map/drawing/config/route-snapping/types.d.ts +1 -1
  87. package/dist/esm/components/Map/drawing/config/route-snapping/utils.d.ts +1 -1
  88. package/dist/esm/components/Map/traffic/useManageTraffic.js +1 -1
  89. package/dist/esm/components/MarketMaterialList.d.ts +3 -3
  90. package/dist/esm/components/MarketMaterialList.js +1 -1
  91. package/dist/esm/components/Menu.js +1 -1
  92. package/dist/esm/components/MobileToggleButton.js +1 -1
  93. package/dist/esm/components/MultiSelectGroups.d.ts +2 -2
  94. package/dist/esm/components/MultiSelectGroups.js +1 -1
  95. package/dist/esm/components/Overlay.d.ts +2 -0
  96. package/dist/esm/components/Overlay.js +1 -1
  97. package/dist/esm/components/OverlayContainer.js +1 -1
  98. package/dist/esm/components/RebookingNotes.d.ts +2 -2
  99. package/dist/esm/components/RebookingNotes.js +1 -1
  100. package/dist/esm/components/RebookingRadioGroup.d.ts +2 -2
  101. package/dist/esm/components/RebookingRadioGroup.js +1 -1
  102. package/dist/esm/components/RoutePlanner/RoutePlanner.js +1 -1
  103. package/dist/esm/components/RoutePlanner/RoutePlannerHeader.js +1 -1
  104. package/dist/esm/components/RoutePlanner/RoutePlannerStopItem.js +1 -1
  105. package/dist/esm/components/RouteQR.d.ts +2 -2
  106. package/dist/esm/components/RouteQR.js +1 -1
  107. package/dist/esm/components/Schedule.js +1 -1
  108. package/dist/esm/components/SearchBox.js +1 -1
  109. package/dist/esm/components/Sessions.js +1 -1
  110. package/dist/esm/components/Share.d.ts +2 -2
  111. package/dist/esm/components/Share.js +1 -1
  112. package/dist/esm/components/SidebarActions.js +1 -1
  113. package/dist/esm/components/ViewerMenuPanel.d.ts +5 -0
  114. package/dist/esm/components/ViewerMenuPanel.js +1 -0
  115. package/dist/esm/components/WayfindingTemplate.d.ts +2 -2
  116. package/dist/esm/components/WayfindingTemplate.js +1 -1
  117. package/dist/esm/components/gps/GpsPermissionRequest.d.ts +4 -2
  118. package/dist/esm/components/gps/GpsPermissionRequest.js +1 -1
  119. package/dist/esm/constants.d.ts +3 -0
  120. package/dist/esm/constants.js +1 -1
  121. package/dist/esm/floorplan.loader.d.ts +2 -0
  122. package/dist/esm/floorplan.loader.js +1 -1
  123. package/dist/esm/floorplan.ready.js +1 -1
  124. package/dist/esm/load.js +3 -3
  125. package/dist/esm/services/routing.js +1 -1
  126. package/dist/esm/store/LayerStore.d.ts +1 -0
  127. package/dist/esm/store/LayerStore.js +1 -1
  128. package/dist/esm/store/RootStore.d.ts +0 -2
  129. package/dist/esm/store/RootStore.js +1 -1
  130. package/dist/esm/store/RoutePlannerStore.d.ts +16 -0
  131. package/dist/esm/store/RoutePlannerStore.js +1 -1
  132. package/dist/esm/store/RouteStore.d.ts +1 -1
  133. package/dist/esm/store/RouteStore.js +1 -1
  134. package/dist/esm/store/SearchStore.js +1 -1
  135. package/dist/esm/store/UIState.d.ts +2 -2
  136. package/dist/esm/store/UIState.js +1 -1
  137. package/dist/esm/store/init/index.js +1 -1
  138. package/dist/esm/store/init/init-layers.js +1 -1
  139. package/dist/esm/store/search-buttons/SearchButtonsStore.d.ts +1 -1
  140. package/dist/esm/store/search-buttons/SearchButtonsStore.js +1 -1
  141. package/dist/esm/store/types.d.ts +0 -2
  142. package/dist/esm/tools/sentry.js +1 -1
  143. package/dist/esm/tools/telemetry.d.ts +35 -0
  144. package/dist/esm/tools/telemetry.js +1 -0
  145. package/dist/esm/tools/track-event.d.ts +3 -1
  146. package/dist/esm/tools/track-event.js +1 -1
  147. package/dist/esm/utils/i18n.d.ts +6 -4
  148. package/dist/esm/utils/i18n.js +1 -1
  149. package/dist/esm/utils/mapEntity.js +1 -1
  150. package/dist/esm/utils/math.d.ts +7 -0
  151. package/dist/esm/utils/math.js +1 -0
  152. package/dist/esm/utils/use-shadow.d.ts +1 -1
  153. package/dist/esm/utils/use-shadow.js +1 -1
  154. package/dist/esm/wayfinding/_PLAN-public-api.d.ts +220 -0
  155. package/dist/esm/wayfinding/_PLAN-public-api.js +1 -0
  156. package/dist/esm/{utils/wayfinding.d.ts → wayfinding/__integration__/legacy/legacyWayfinding.d.ts} +5 -4
  157. package/dist/esm/wayfinding/__integration__/legacy/legacyWayfinding.js +1 -0
  158. package/dist/esm/wayfinding/__tests__/helpers.d.ts +21 -0
  159. package/dist/esm/wayfinding/__tests__/helpers.js +1 -0
  160. package/dist/esm/wayfinding/adapters/boothToWaypoint.d.ts +12 -0
  161. package/dist/esm/wayfinding/adapters/boothToWaypoint.js +1 -0
  162. package/dist/esm/wayfinding/adapters/graphDataSource.d.ts +3 -0
  163. package/dist/esm/wayfinding/adapters/graphDataSource.js +1 -0
  164. package/dist/esm/wayfinding/graph/buildGraph.d.ts +3 -0
  165. package/dist/esm/wayfinding/graph/buildGraph.js +1 -0
  166. package/dist/esm/wayfinding/graph/buildNGraph.d.ts +9 -0
  167. package/dist/esm/wayfinding/graph/buildNGraph.js +1 -0
  168. package/dist/esm/wayfinding/graph/constants.d.ts +3 -0
  169. package/dist/esm/wayfinding/graph/constants.js +1 -0
  170. package/dist/esm/wayfinding/graph/findShortestPath.d.ts +14 -0
  171. package/dist/esm/wayfinding/graph/findShortestPath.js +1 -0
  172. package/dist/esm/wayfinding/graph/graphCache.d.ts +6 -0
  173. package/dist/esm/wayfinding/graph/graphCache.js +1 -0
  174. package/dist/esm/wayfinding/graph/graphHelpers.d.ts +8 -0
  175. package/dist/esm/wayfinding/graph/graphHelpers.js +1 -0
  176. package/dist/esm/wayfinding/graph/linkCost.d.ts +4 -0
  177. package/dist/esm/wayfinding/graph/linkCost.js +1 -0
  178. package/dist/esm/wayfinding/graph/pathfinder/aStarPathFinder.d.ts +3 -0
  179. package/dist/esm/wayfinding/graph/pathfinder/aStarPathFinder.js +1 -0
  180. package/dist/esm/wayfinding/graph/pathfinder/parseNodeId.d.ts +9 -0
  181. package/dist/esm/wayfinding/graph/pathfinder/parseNodeId.js +1 -0
  182. package/dist/esm/wayfinding/index.d.ts +18 -0
  183. package/dist/esm/wayfinding/index.js +1 -0
  184. package/dist/esm/wayfinding/rendering/computeTransitionPoints.d.ts +31 -0
  185. package/dist/esm/wayfinding/rendering/computeTransitionPoints.js +1 -0
  186. package/dist/esm/wayfinding/rendering/normalizeRouteDirection.d.ts +19 -0
  187. package/dist/esm/wayfinding/rendering/normalizeRouteDirection.js +1 -0
  188. package/dist/esm/wayfinding/rendering/routeGeometry.d.ts +16 -0
  189. package/dist/esm/wayfinding/rendering/routeGeometry.js +1 -0
  190. package/dist/esm/wayfinding/routing/buildMultiPointRoute.d.ts +11 -0
  191. package/dist/esm/wayfinding/routing/buildMultiPointRoute.js +1 -0
  192. package/dist/esm/wayfinding/routing/buildRoute.d.ts +9 -0
  193. package/dist/esm/wayfinding/routing/buildRoute.js +1 -0
  194. package/dist/esm/wayfinding/routing/findNearestGraphPoint.d.ts +21 -0
  195. package/dist/esm/wayfinding/routing/findNearestGraphPoint.js +1 -0
  196. package/dist/esm/wayfinding/routing/getGraphLines.d.ts +14 -0
  197. package/dist/esm/wayfinding/routing/getGraphLines.js +1 -0
  198. package/dist/esm/wayfinding/routing/getRouteLength.d.ts +3 -0
  199. package/dist/esm/wayfinding/routing/getRouteLength.js +1 -0
  200. package/dist/esm/wayfinding/routing/routeResult.d.ts +4 -0
  201. package/dist/esm/wayfinding/routing/routeResult.js +1 -0
  202. package/dist/esm/wayfinding/types.d.ts +76 -0
  203. package/dist/esm/wayfinding/types.js +1 -0
  204. package/package.json +3 -3
  205. package/dist/browser/Debug-Bn7mmuWl.js +0 -40
  206. package/dist/browser/Gallery-BTasOfWx.js +0 -288
  207. package/dist/browser/index-DnV82MKb.js +0 -10233
  208. package/dist/esm/store/LanguageStore.d.ts +0 -19
  209. package/dist/esm/store/LanguageStore.js +0 -1
  210. package/dist/esm/store/init/init-language.d.ts +0 -3
  211. package/dist/esm/store/init/init-language.js +0 -1
  212. package/dist/esm/utils/toRadians.d.ts +0 -3
  213. package/dist/esm/utils/toRadians.js +0 -1
  214. package/dist/esm/utils/wayfinding.js +0 -1
@@ -1 +1 @@
1
- import{__esDecorate as i,__runInitializers as n}from"tslib";import{action as a,observable as se,computed as he,runInAction as ae}from"mobx";import ne from"../tools/logger";import{isWebGlSupported as ce}from"../utils";import ue,{BoothBase as oe,RegularBooth as de}from"./BoothStore";import me,{Category as Se}from"./CategoryStore";import fe,{Exhibitor as le}from"./ExhibitorStore";import ge from"./CategoryFilterStore";import pe from"./EventStore";import{GaEventActions as ke}from"../tools/gtag";import r from"../utils/is-mobile";import c from"../utils/is-webview";import ve from"./HeatmapStore";import ye from"./LanguageStore";import _e,{LayersMode as re}from"./LayerStore";import be from"./MapboxStore";import we from"./RouteStore";import xe from"./RoutePlannerStore";import Be from"./ToursStore";import Le from"./UIState";import Ce from"./PoiTypeStore";import{sanitizeSearch as Ee}from"../utils/sanitizeText";import Fe from"./FuzzySearchEngineStore";import Ie from"./SessionsFilterStore";import{getLocale as Te}from"../utils/i18n";import ze from"./SearchStore";import Me from"./SearchButtonsStore";import Oe from"./BookmarksStore";import{URLFilterManager as Re}from"../services/URLFilterManager";import{ShortcutRegistry as Ae}from"./ShortcutRegistry";import{SessionsShortcutProvider as Ve}from"./providers/SessionsShortcutProvider";import Pe from"./SpeakerStore";import Ge from"./SpeakerFilterStore";import{SpeakerShortcutProvider as Ne}from"./providers/SpeakerShortcutProvider";import{SearchShortcutProvider as qe}from"./providers/SearchShortcutProvider";import{RendererService as je}from"../renderer";let Ue=(()=>{let s=[],u,d=[],m=[],S,f=[],g=[],p,k,v,y,_,b,w,x,B,L,C,E,F,I,T,z,M,O,R,A,V,P,G,N,q,j,U,W,D,H,K,$,J,Q,X,Y,Z,ee,te,ie;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;u=[se],S=[se],p=[a],k=[a],v=[a],y=[a],_=[a],b=[a],w=[a],x=[a],B=[a],L=[a],C=[a],E=[a],F=[a],I=[a],T=[a],z=[a],M=[a],O=[a],R=[a],A=[a],V=[a],P=[a],G=[a],N=[a],q=[a],j=[a],U=[a],W=[a],D=[a],H=[a],K=[a],$=[a],J=[a],Q=[he],X=[a],Y=[a],Z=[a],ee=[a],te=[a],ie=[a],i(this,null,p,{kind:"method",name:"setResetCameraFn",static:!1,private:!1,access:{has:e=>"setResetCameraFn"in e,get:e=>e.setResetCameraFn},metadata:t},null,s),i(this,null,k,{kind:"method",name:"selectExhibitor",static:!1,private:!1,access:{has:e=>"selectExhibitor"in e,get:e=>e.selectExhibitor},metadata:t},null,s),i(this,null,v,{kind:"method",name:"selectBooth",static:!1,private:!1,access:{has:e=>"selectBooth"in e,get:e=>e.selectBooth},metadata:t},null,s),i(this,null,y,{kind:"method",name:"reset",static:!1,private:!1,access:{has:e=>"reset"in e,get:e=>e.reset},metadata:t},null,s),i(this,null,_,{kind:"method",name:"selectNone",static:!1,private:!1,access:{has:e=>"selectNone"in e,get:e=>e.selectNone},metadata:t},null,s),i(this,null,b,{kind:"method",name:"selectBookmarks",static:!1,private:!1,access:{has:e=>"selectBookmarks"in e,get:e=>e.selectBookmarks},metadata:t},null,s),i(this,null,w,{kind:"method",name:"selectVisited",static:!1,private:!1,access:{has:e=>"selectVisited"in e,get:e=>e.selectVisited},metadata:t},null,s),i(this,null,x,{kind:"method",name:"selectLanguage",static:!1,private:!1,access:{has:e=>"selectLanguage"in e,get:e=>e.selectLanguage},metadata:t},null,s),i(this,null,B,{kind:"method",name:"selectCategory",static:!1,private:!1,access:{has:e=>"selectCategory"in e,get:e=>e.selectCategory},metadata:t},null,s),i(this,null,L,{kind:"method",name:"selectEventItem",static:!1,private:!1,access:{has:e=>"selectEventItem"in e,get:e=>e.selectEventItem},metadata:t},null,s),i(this,null,C,{kind:"method",name:"selectSearch",static:!1,private:!1,access:{has:e=>"selectSearch"in e,get:e=>e.selectSearch},metadata:t},null,s),i(this,null,E,{kind:"method",name:"clickBookmarks",static:!1,private:!1,access:{has:e=>"clickBookmarks"in e,get:e=>e.clickBookmarks},metadata:t},null,s),i(this,null,F,{kind:"method",name:"clickVisited",static:!1,private:!1,access:{has:e=>"clickVisited"in e,get:e=>e.clickVisited},metadata:t},null,s),i(this,null,I,{kind:"method",name:"clickLanguage",static:!1,private:!1,access:{has:e=>"clickLanguage"in e,get:e=>e.clickLanguage},metadata:t},null,s),i(this,null,T,{kind:"method",name:"clickCategory",static:!1,private:!1,access:{has:e=>"clickCategory"in e,get:e=>e.clickCategory},metadata:t},null,s),i(this,null,z,{kind:"method",name:"clickSeminars",static:!1,private:!1,access:{has:e=>"clickSeminars"in e,get:e=>e.clickSeminars},metadata:t},null,s),i(this,null,M,{kind:"method",name:"clickBoothInList",static:!1,private:!1,access:{has:e=>"clickBoothInList"in e,get:e=>e.clickBoothInList},metadata:t},null,s),i(this,null,O,{kind:"method",name:"clickBoothInList2",static:!1,private:!1,access:{has:e=>"clickBoothInList2"in e,get:e=>e.clickBoothInList2},metadata:t},null,s),i(this,null,R,{kind:"method",name:"clickBooth",static:!1,private:!1,access:{has:e=>"clickBooth"in e,get:e=>e.clickBooth},metadata:t},null,s),i(this,null,A,{kind:"method",name:"clickExhibitor2",static:!1,private:!1,access:{has:e=>"clickExhibitor2"in e,get:e=>e.clickExhibitor2},metadata:t},null,s),i(this,null,V,{kind:"method",name:"clickExhibitor",static:!1,private:!1,access:{has:e=>"clickExhibitor"in e,get:e=>e.clickExhibitor},metadata:t},null,s),i(this,null,P,{kind:"method",name:"showMap",static:!1,private:!1,access:{has:e=>"showMap"in e,get:e=>e.showMap},metadata:t},null,s),i(this,null,G,{kind:"method",name:"showOverlay",static:!1,private:!1,access:{has:e=>"showOverlay"in e,get:e=>e.showOverlay},metadata:t},null,s),i(this,null,N,{kind:"method",name:"toggleMapOverlay",static:!1,private:!1,access:{has:e=>"toggleMapOverlay"in e,get:e=>e.toggleMapOverlay},metadata:t},null,s),i(this,null,q,{kind:"method",name:"moveToList",static:!1,private:!1,access:{has:e=>"moveToList"in e,get:e=>e.moveToList},metadata:t},null,s),i(this,null,j,{kind:"method",name:"moveToExhibitor",static:!1,private:!1,access:{has:e=>"moveToExhibitor"in e,get:e=>e.moveToExhibitor},metadata:t},null,s),i(this,null,U,{kind:"method",name:"changeActiveListIndex",static:!1,private:!1,access:{has:e=>"changeActiveListIndex"in e,get:e=>e.changeActiveListIndex},metadata:t},null,s),i(this,null,W,{kind:"method",name:"toggleModal",static:!1,private:!1,access:{has:e=>"toggleModal"in e,get:e=>e.toggleModal},metadata:t},null,s),i(this,null,D,{kind:"method",name:"openGallery",static:!1,private:!1,access:{has:e=>"openGallery"in e,get:e=>e.openGallery},metadata:t},null,s),i(this,null,H,{kind:"method",name:"closeGallery",static:!1,private:!1,access:{has:e=>"closeGallery"in e,get:e=>e.closeGallery},metadata:t},null,s),i(this,null,K,{kind:"method",name:"openActiveListItem",static:!1,private:!1,access:{has:e=>"openActiveListItem"in e,get:e=>e.openActiveListItem},metadata:t},null,s),i(this,null,$,{kind:"method",name:"toggleCategoryFilter",static:!1,private:!1,access:{has:e=>"toggleCategoryFilter"in e,get:e=>e.toggleCategoryFilter},metadata:t},null,s),i(this,null,J,{kind:"method",name:"applyCategoryFilters",static:!1,private:!1,access:{has:e=>"applyCategoryFilters"in e,get:e=>e.applyCategoryFilters},metadata:t},null,s),i(this,null,Q,{kind:"getter",name:"filteredExhibitors",static:!1,private:!1,access:{has:e=>"filteredExhibitors"in e,get:e=>e.filteredExhibitors},metadata:t},null,s),i(this,null,X,{kind:"method",name:"selectSessions",static:!1,private:!1,access:{has:e=>"selectSessions"in e,get:e=>e.selectSessions},metadata:t},null,s),i(this,null,Y,{kind:"method",name:"selectExhibitors",static:!1,private:!1,access:{has:e=>"selectExhibitors"in e,get:e=>e.selectExhibitors},metadata:t},null,s),i(this,null,Z,{kind:"method",name:"selectTours",static:!1,private:!1,access:{has:e=>"selectTours"in e,get:e=>e.selectTours},metadata:t},null,s),i(this,null,ee,{kind:"method",name:"selectSpeakers",static:!1,private:!1,access:{has:e=>"selectSpeakers"in e,get:e=>e.selectSpeakers},metadata:t},null,s),i(this,null,te,{kind:"method",name:"selectSpeaker",static:!1,private:!1,access:{has:e=>"selectSpeaker"in e,get:e=>e.selectSpeaker},metadata:t},null,s),i(this,null,ie,{kind:"method",name:"resetFilters",static:!1,private:!1,access:{has:e=>"resetFilters"in e,get:e=>e.resetFilters},metadata:t},null,s),i(null,null,u,{kind:"field",name:"initialized",static:!1,private:!1,access:{has:e=>"initialized"in e,get:e=>e.initialized,set:(e,o)=>{e.initialized=o}},metadata:t},d,m),i(null,null,S,{kind:"field",name:"resetCameraFn",static:!1,private:!1,access:{has:e=>"resetCameraFn"in e,get:e=>e.resetCameraFn,set:(e,o)=>{e.resetCameraFn=o}},metadata:t},f,g),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}categoryStore=n(this,s);exhibitorStore;boothStore;uiState;routeStore;routePlannerStore;toursStore;mapboxStore;layerStore;eventStore;poiTypeStore;heatmapStore;languageStore;fuzzySearchEngineStore;categoryFilterStore;sessionsFilterStore;speakerStore;speakerFilterStore;searchStore;searchButtonsStore;bookmarksStore;urlFilterManager;shortcutRegistry;rendererService=new je;fp;initialized=n(this,d,!1);resetCameraFn=(n(this,m),n(this,f,void 0));setResetCameraFn(t){this.resetCameraFn=t}constructor(){n(this,g),this.categoryStore=new me(this),this.exhibitorStore=new fe(this),this.boothStore=new ue(this),this.routeStore=new we(this),this.routePlannerStore=new xe(this),this.toursStore=new Be(this),this.uiState=new Le(this),this.mapboxStore=new be(this),this.layerStore=new _e,this.eventStore=new pe(this),this.heatmapStore=new ve(this),this.languageStore=new ye(this),this.poiTypeStore=new Ce(this),this.fuzzySearchEngineStore=new Fe,this.categoryFilterStore=new ge(this),this.sessionsFilterStore=new Ie(this),this.speakerStore=new Pe(this),this.speakerFilterStore=new Ge(this),this.searchStore=new ze(this),this.searchButtonsStore=new Me(this),this.bookmarksStore=new Oe(this),this.urlFilterManager=new Re(this),this.shortcutRegistry=new Ae,this.registerShortcutProviders()}selectExhibitor(t,e=!0){this.uiState.hoveredExhibitor=null,this.uiState.details=t;var o=t.booths.filter(h=>h.visible),l=t.booths.filter(h=>!h.visible);!o.length&&l.length&&this.layerStore.updateVisibility(l[0].layer,!0),e&&setTimeout(()=>this.moveToList(t.booths.filter(h=>h.visible)),c||r?500:50)}selectBooth(t,e=!0){let o=Array.isArray(t)?t:[t];this.uiState.details=o[0],o.length===1&&o[0].schedule?.length&&(this.uiState.desiredOverlaySize="medium"),o.length===1&&o[0].layer&&!o[0].visible&&this.layerStore.mode===re.Radio&&this.layerStore.updateVisibility(o[0].layer,!0),e&&setTimeout(()=>this.moveToList(o),c||r?500:50)}reset(){const t=window.__searchi;t&&t.querySelector&&t.querySelector("input[type=search]")&&t.querySelector("input[type=search]").blur&&t.querySelector("input[type=search]").blur(),window.setTimeout(()=>{this.uiState.setKioskModeEnabled||(localStorage.removeItem("language"),this.languageStore.changeLanguage(Te()).then(()=>{ae(()=>{this.selectSearch(""),this.routeStore.defaultFrom&&!this.routeStore.defaultFrom?.visible?this.selectBooth(this.routeStore.defaultFrom):this.uiState.details=null,this.resetCameraFn?.(),this.uiState.menu=!1,this.searchStore.resetSearchBox(),this.searchButtonsStore.clearAllFilters()}),setTimeout(()=>{ae(()=>{this.uiState.inIdle=!0})},100)}))},1e3)}selectNone(){window.__resett&&window.__resett(),this.uiState.details=this.uiState.selectedCategory}selectBookmarks(){this.uiState.details=null,this.uiState.list={type:"bookmarks"}}selectVisited(){this.uiState.details=null,this.uiState.list={type:"visited"}}selectLanguage(){this.uiState.details=null,this.uiState.list={type:"language",id:this.languageStore.language?.id}}selectCategory(t){window.__resett&&window.__resett(),this.uiState.details=t,this.uiState.list={type:"category",category:t},this.uiState.desiredOverlaySize="full",t.exhibitors.find(o=>o.booths.find(l=>l.visible))||this.layerStore.updateVisibility(t.exhibitors[0]?.booths[0]?.layer,!0),setTimeout(()=>{this.uiState.moveToBooths=t.exhibitors.filter(o=>o.booths.find(l=>l.visible)).flatMap(o=>o.booths)},200)}selectEventItem(t,e=!0){if(this.uiState.hoveredExhibitor=null,this.uiState.details=t,this.uiState.desiredOverlaySize="medium",t.boothId){const o=this.boothStore.booths.find(l=>l.id===t.boothId);o&&o.layer&&!o.visible&&this.layerStore.mode===re.Radio&&this.layerStore.updateVisibility(o.layer,!0)}e&&setTimeout(()=>{if(t.boothId){const o=this.boothStore.booths.find(l=>l.id===t.boothId);o&&this.moveToList([o])}},c||r?500:50)}selectSearch(t){window.__resett&&window.__resett(),this.uiState.details=null,this.speakerStore.clearSelectedSpeaker(),this.uiState.list={type:"search",text:Ee(t,Object.keys(this.uiState.mapSettings).map(e=>`${e}=`)),focused:!1},this.uiState.activeListIndex=-1}clickBookmarks(){window.__resett&&window.__resett(),this.uiState.menu=!1,this.selectBookmarks(),this.moveToList(),this.showMap()}clickVisited(){window.__resett&&window.__resett(),this.uiState.menu=!1,this.selectVisited(),this.moveToList(),this.showMap()}clickLanguage(){window.__resett&&window.__resett(),this.uiState.menu=!1,this.selectLanguage()}clickCategory(t){window.__resett&&window.__resett(),this.uiState.menu=!1,this.selectCategory(t),this.uiState.onCategoryClick&&this.uiState.onCategoryClick({id:t.id,name:t.name,exhibitors:t.exhibitors.map(e=>e.id)}),setTimeout(()=>{this.moveToList(),this.showMap()},100)}clickSeminars(){this.clickCategory(this.categoryStore.seminarsCategory)}clickBoothInList(t){window.__resett&&window.__resett(),this.uiState.hoveredBooth=null,this.selectBooth(t),this.moveToList([t]),this.showMap()}clickBoothInList2(t){window.__resett&&window.__resett(),this.uiState.hoveredBooth=null,this.selectBooth(t,!1),window.setTimeout(()=>{this.moveToList([t]),this.showMap()},navigator.userAgent.toLowerCase().indexOf("android")>-1?400:50)}clickBooth(t){if(this.uiState.menu=!1,this.uiState.list.type==="sessions"&&this.searchStore.selectSearch(),this.uiState.list.type==="speakers"&&this.searchStore.selectSearch(),this.uiState.list.type==="tours"&&this.searchStore.selectSearch(),this.uiState.list.type==="multi-point-tour"&&this.searchStore.selectSearch(),!(this.uiState.selectedRoute?.from&&this.uiState.selectedRoute?.to)){if(this.uiState.selectedRoute?.to&&!this.uiState.selectedRoute?.from&&t){this.routeStore.setStartPoint(t);return}if(t)this.routeStore.tempToBooth=t;else{this.uiState.details=null,this.fp.hidePathways(),this.uiState.list={type:"search",text:"",focused:!1},this.uiState.onBoothClick&&this.uiState.onBoothClick({target:null});return}if(this.uiState.onBoothClick){const e={name:"",description:""},o={target:{...t,layer:t.layer||e}};this.uiState.onBoothClick(o)}t.exhibitors.length===1&&t instanceof de?(this.heatmapStore.forceTrack={action:ke.ViewBooth,label:t.name},this.selectExhibitor(t.exhibitors[0],!1)):this.selectBooth(t,!1),this.showMap()}}clickExhibitor2(t){this.selectExhibitor(t,!0),this.showMap()}clickExhibitor(t){window.setTimeout(()=>{this.clickExhibitor2(t)},navigator.userAgent.toLowerCase().indexOf("android")>-1?400:50)}showMap(){const t=this.uiState.details;t&&"schedule"in t&&t.schedule?.length>0?this.uiState.desiredOverlaySize="full":this.uiState.overlayPosition==="bottom"&&ce&&(this.uiState.desiredOverlaySize="medium")}showOverlay(){this.uiState.overlayPosition==="bottom"&&(this.uiState.desiredOverlaySize="full")}toggleMapOverlay(){this.uiState.overlayPosition==="bottom"&&this.uiState.overlaySize==="full"?this.uiState.desiredOverlaySize="medium":this.uiState.overlayPosition==="bottom"&&this.uiState.overlaySize!=="full"&&(this.uiState.desiredOverlaySize="full")}moveToList(t){t=t||this.uiState.listItems;const e=[];t.forEach(o=>{o instanceof le?e.push(...o.booths.filter(l=>l.visible)):o instanceof oe&&e.push(o)}),this.uiState.moveToBooths=e}moveToExhibitor(t){this.moveToList([t])}changeActiveListIndex(t){let e=this.uiState.activeListIndex+t;e=Math.max(0,Math.min(this.uiState.listItems.length-1,e)),this.uiState.activeListIndex=e}toggleModal(t){this.uiState.modalActive[t]=!this.uiState.modalActive[t]}openGallery(){this.uiState.galleryActive=!0}closeGallery(){this.uiState.galleryActive=!1}openActiveListItem(){const t=this.uiState.listItems[this.uiState.activeListIndex];t&&(ne.log("Opening",t),t instanceof le?this.clickExhibitor(t):t instanceof Se?this.clickCategory(t):t instanceof oe&&this.clickBoothInList2(t))}toggleCategoryFilter(){this.uiState.categoryFilterOpen=!this.uiState.categoryFilterOpen}applyCategoryFilters(t){this.uiState.selectedCategoryFilters=t,this.uiState.categoryFilterOpen=!1}get filteredExhibitors(){return this.uiState.selectedCategoryFilters.length===0?this.exhibitorStore.exhibitors:this.exhibitorStore.exhibitors.filter(t=>this.uiState.selectedCategoryFilters.some(e=>t.categories.some(o=>o.id===e.id)))}selectSessions(){this.uiState.list={type:"sessions",text:"",focused:!1},this.uiState.menu=!1,this.uiState.selectedTrack=null,this.searchButtonsStore.setSubButtonId(null),this.searchButtonsStore.subButtonsEnabled&&this.searchButtonsStore.showSubButtons("sessions"),r&&(this.uiState.desiredOverlaySize="full")}selectExhibitors(){this.uiState.list={type:"exhibitors",text:"",focused:!1},this.uiState.menu=!1,r&&(this.uiState.desiredOverlaySize="full")}selectTours(){this.uiState.list={type:"tours",text:"",focused:!1},this.uiState.menu=!1,r&&(this.uiState.desiredOverlaySize="full")}selectSpeakers(){this.uiState.list={type:"speakers",text:"",focused:!1},this.uiState.menu=!1,r&&(this.uiState.desiredOverlaySize="full")}selectSpeaker(t,e=!0){this.speakerStore.selectSpeaker(t,e)}resetFilters(){this.searchButtonsStore.clearAllFilters()}registerShortcutProviders(){this.shortcutRegistry.register(new Ve(this)),this.shortcutRegistry.register(new Ne(this)),this.shortcutRegistry.register(new qe(this))}}})();export default Ue;
1
+ import{__esDecorate as i,__runInitializers as c}from"tslib";import{action as a,observable as se,computed as he,runInAction as ae}from"mobx";import ce from"../tools/logger";import{isWebGlSupported as ne}from"../utils";import ue,{BoothBase as oe,RegularBooth as de}from"./BoothStore";import me,{Category as Se}from"./CategoryStore";import fe,{Exhibitor as le}from"./ExhibitorStore";import pe from"./CategoryFilterStore";import ge from"./EventStore";import{GaEventActions as ke}from"../tools/gtag";import r from"../utils/is-mobile";import n from"../utils/is-webview";import ve from"./HeatmapStore";import{resetLocale as ye}from"../utils/i18n";import{LANGUAGE_TYPE as _e}from"../constants";import be,{LayersMode as re}from"./LayerStore";import we from"./MapboxStore";import xe from"./RouteStore";import Be from"./RoutePlannerStore";import Le from"./ToursStore";import Ce from"./UIState";import Ee from"./PoiTypeStore";import{sanitizeSearch as Fe}from"../utils/sanitizeText";import Te from"./FuzzySearchEngineStore";import Ie from"./SessionsFilterStore";import ze from"./SearchStore";import Me from"./SearchButtonsStore";import Oe from"./BookmarksStore";import{URLFilterManager as Ae}from"../services/URLFilterManager";import{ShortcutRegistry as Re}from"./ShortcutRegistry";import{SessionsShortcutProvider as Pe}from"./providers/SessionsShortcutProvider";import Ve from"./SpeakerStore";import Ge from"./SpeakerFilterStore";import{SpeakerShortcutProvider as Ne}from"./providers/SpeakerShortcutProvider";import{SearchShortcutProvider as qe}from"./providers/SearchShortcutProvider";import{RendererService as je}from"../renderer";let Ue=(()=>{let s=[],u,d=[],m=[],S,f=[],p=[],g,k,v,y,_,b,w,x,B,L,C,E,F,T,I,z,M,O,A,R,P,V,G,N,q,j,U,W,D,H,K,Y,$,J,Q,X,Z,ee,te,ie;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;u=[se],S=[se],g=[a],k=[a],v=[a],y=[a],_=[a],b=[a],w=[a],x=[a],B=[a],L=[a],C=[a],E=[a],F=[a],T=[a],I=[a],z=[a],M=[a],O=[a],A=[a],R=[a],P=[a],V=[a],G=[a],N=[a],q=[a],j=[a],U=[a],W=[a],D=[a],H=[a],K=[a],Y=[a],$=[a],J=[he],Q=[a],X=[a],Z=[a],ee=[a],te=[a],ie=[a],i(this,null,g,{kind:"method",name:"setResetCameraFn",static:!1,private:!1,access:{has:e=>"setResetCameraFn"in e,get:e=>e.setResetCameraFn},metadata:t},null,s),i(this,null,k,{kind:"method",name:"selectExhibitor",static:!1,private:!1,access:{has:e=>"selectExhibitor"in e,get:e=>e.selectExhibitor},metadata:t},null,s),i(this,null,v,{kind:"method",name:"selectBooth",static:!1,private:!1,access:{has:e=>"selectBooth"in e,get:e=>e.selectBooth},metadata:t},null,s),i(this,null,y,{kind:"method",name:"reset",static:!1,private:!1,access:{has:e=>"reset"in e,get:e=>e.reset},metadata:t},null,s),i(this,null,_,{kind:"method",name:"selectNone",static:!1,private:!1,access:{has:e=>"selectNone"in e,get:e=>e.selectNone},metadata:t},null,s),i(this,null,b,{kind:"method",name:"selectBookmarks",static:!1,private:!1,access:{has:e=>"selectBookmarks"in e,get:e=>e.selectBookmarks},metadata:t},null,s),i(this,null,w,{kind:"method",name:"selectVisited",static:!1,private:!1,access:{has:e=>"selectVisited"in e,get:e=>e.selectVisited},metadata:t},null,s),i(this,null,x,{kind:"method",name:"selectLanguage",static:!1,private:!1,access:{has:e=>"selectLanguage"in e,get:e=>e.selectLanguage},metadata:t},null,s),i(this,null,B,{kind:"method",name:"selectCategory",static:!1,private:!1,access:{has:e=>"selectCategory"in e,get:e=>e.selectCategory},metadata:t},null,s),i(this,null,L,{kind:"method",name:"selectEventItem",static:!1,private:!1,access:{has:e=>"selectEventItem"in e,get:e=>e.selectEventItem},metadata:t},null,s),i(this,null,C,{kind:"method",name:"selectSearch",static:!1,private:!1,access:{has:e=>"selectSearch"in e,get:e=>e.selectSearch},metadata:t},null,s),i(this,null,E,{kind:"method",name:"clickBookmarks",static:!1,private:!1,access:{has:e=>"clickBookmarks"in e,get:e=>e.clickBookmarks},metadata:t},null,s),i(this,null,F,{kind:"method",name:"clickVisited",static:!1,private:!1,access:{has:e=>"clickVisited"in e,get:e=>e.clickVisited},metadata:t},null,s),i(this,null,T,{kind:"method",name:"clickLanguage",static:!1,private:!1,access:{has:e=>"clickLanguage"in e,get:e=>e.clickLanguage},metadata:t},null,s),i(this,null,I,{kind:"method",name:"clickCategory",static:!1,private:!1,access:{has:e=>"clickCategory"in e,get:e=>e.clickCategory},metadata:t},null,s),i(this,null,z,{kind:"method",name:"clickSeminars",static:!1,private:!1,access:{has:e=>"clickSeminars"in e,get:e=>e.clickSeminars},metadata:t},null,s),i(this,null,M,{kind:"method",name:"clickBoothInList",static:!1,private:!1,access:{has:e=>"clickBoothInList"in e,get:e=>e.clickBoothInList},metadata:t},null,s),i(this,null,O,{kind:"method",name:"clickBoothInList2",static:!1,private:!1,access:{has:e=>"clickBoothInList2"in e,get:e=>e.clickBoothInList2},metadata:t},null,s),i(this,null,A,{kind:"method",name:"clickBooth",static:!1,private:!1,access:{has:e=>"clickBooth"in e,get:e=>e.clickBooth},metadata:t},null,s),i(this,null,R,{kind:"method",name:"clickExhibitor2",static:!1,private:!1,access:{has:e=>"clickExhibitor2"in e,get:e=>e.clickExhibitor2},metadata:t},null,s),i(this,null,P,{kind:"method",name:"clickExhibitor",static:!1,private:!1,access:{has:e=>"clickExhibitor"in e,get:e=>e.clickExhibitor},metadata:t},null,s),i(this,null,V,{kind:"method",name:"showMap",static:!1,private:!1,access:{has:e=>"showMap"in e,get:e=>e.showMap},metadata:t},null,s),i(this,null,G,{kind:"method",name:"showOverlay",static:!1,private:!1,access:{has:e=>"showOverlay"in e,get:e=>e.showOverlay},metadata:t},null,s),i(this,null,N,{kind:"method",name:"toggleMapOverlay",static:!1,private:!1,access:{has:e=>"toggleMapOverlay"in e,get:e=>e.toggleMapOverlay},metadata:t},null,s),i(this,null,q,{kind:"method",name:"moveToList",static:!1,private:!1,access:{has:e=>"moveToList"in e,get:e=>e.moveToList},metadata:t},null,s),i(this,null,j,{kind:"method",name:"moveToExhibitor",static:!1,private:!1,access:{has:e=>"moveToExhibitor"in e,get:e=>e.moveToExhibitor},metadata:t},null,s),i(this,null,U,{kind:"method",name:"changeActiveListIndex",static:!1,private:!1,access:{has:e=>"changeActiveListIndex"in e,get:e=>e.changeActiveListIndex},metadata:t},null,s),i(this,null,W,{kind:"method",name:"toggleModal",static:!1,private:!1,access:{has:e=>"toggleModal"in e,get:e=>e.toggleModal},metadata:t},null,s),i(this,null,D,{kind:"method",name:"openGallery",static:!1,private:!1,access:{has:e=>"openGallery"in e,get:e=>e.openGallery},metadata:t},null,s),i(this,null,H,{kind:"method",name:"closeGallery",static:!1,private:!1,access:{has:e=>"closeGallery"in e,get:e=>e.closeGallery},metadata:t},null,s),i(this,null,K,{kind:"method",name:"openActiveListItem",static:!1,private:!1,access:{has:e=>"openActiveListItem"in e,get:e=>e.openActiveListItem},metadata:t},null,s),i(this,null,Y,{kind:"method",name:"toggleCategoryFilter",static:!1,private:!1,access:{has:e=>"toggleCategoryFilter"in e,get:e=>e.toggleCategoryFilter},metadata:t},null,s),i(this,null,$,{kind:"method",name:"applyCategoryFilters",static:!1,private:!1,access:{has:e=>"applyCategoryFilters"in e,get:e=>e.applyCategoryFilters},metadata:t},null,s),i(this,null,J,{kind:"getter",name:"filteredExhibitors",static:!1,private:!1,access:{has:e=>"filteredExhibitors"in e,get:e=>e.filteredExhibitors},metadata:t},null,s),i(this,null,Q,{kind:"method",name:"selectSessions",static:!1,private:!1,access:{has:e=>"selectSessions"in e,get:e=>e.selectSessions},metadata:t},null,s),i(this,null,X,{kind:"method",name:"selectExhibitors",static:!1,private:!1,access:{has:e=>"selectExhibitors"in e,get:e=>e.selectExhibitors},metadata:t},null,s),i(this,null,Z,{kind:"method",name:"selectTours",static:!1,private:!1,access:{has:e=>"selectTours"in e,get:e=>e.selectTours},metadata:t},null,s),i(this,null,ee,{kind:"method",name:"selectSpeakers",static:!1,private:!1,access:{has:e=>"selectSpeakers"in e,get:e=>e.selectSpeakers},metadata:t},null,s),i(this,null,te,{kind:"method",name:"selectSpeaker",static:!1,private:!1,access:{has:e=>"selectSpeaker"in e,get:e=>e.selectSpeaker},metadata:t},null,s),i(this,null,ie,{kind:"method",name:"resetFilters",static:!1,private:!1,access:{has:e=>"resetFilters"in e,get:e=>e.resetFilters},metadata:t},null,s),i(null,null,u,{kind:"field",name:"initialized",static:!1,private:!1,access:{has:e=>"initialized"in e,get:e=>e.initialized,set:(e,o)=>{e.initialized=o}},metadata:t},d,m),i(null,null,S,{kind:"field",name:"resetCameraFn",static:!1,private:!1,access:{has:e=>"resetCameraFn"in e,get:e=>e.resetCameraFn,set:(e,o)=>{e.resetCameraFn=o}},metadata:t},f,p),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}categoryStore=c(this,s);exhibitorStore;boothStore;uiState;routeStore;routePlannerStore;toursStore;mapboxStore;layerStore;eventStore;poiTypeStore;heatmapStore;fuzzySearchEngineStore;categoryFilterStore;sessionsFilterStore;speakerStore;speakerFilterStore;searchStore;searchButtonsStore;bookmarksStore;urlFilterManager;shortcutRegistry;rendererService=new je;fp;initialized=c(this,d,!1);resetCameraFn=(c(this,m),c(this,f,void 0));setResetCameraFn(t){this.resetCameraFn=t}constructor(){c(this,p),this.categoryStore=new me(this),this.exhibitorStore=new fe(this),this.boothStore=new ue(this),this.routeStore=new xe(this),this.routePlannerStore=new Be(this),this.toursStore=new Le(this),this.uiState=new Ce(this),this.mapboxStore=new we(this),this.layerStore=new be,this.eventStore=new ge(this),this.heatmapStore=new ve(this),this.poiTypeStore=new Ee(this),this.fuzzySearchEngineStore=new Te,this.categoryFilterStore=new pe(this),this.sessionsFilterStore=new Ie(this),this.speakerStore=new Ve(this),this.speakerFilterStore=new Ge(this),this.searchStore=new ze(this),this.searchButtonsStore=new Me(this),this.bookmarksStore=new Oe(this),this.urlFilterManager=new Ae(this),this.shortcutRegistry=new Re,this.registerShortcutProviders()}selectExhibitor(t,e=!0){this.uiState.hoveredExhibitor=null,this.uiState.details=t;var o=t.booths.filter(h=>h.visible),l=t.booths.filter(h=>!h.visible);!o.length&&l.length&&this.layerStore.updateVisibility(l[0].layer,!0),e&&setTimeout(()=>this.moveToList(t.booths.filter(h=>h.visible)),n||r?500:50)}selectBooth(t,e=!0){let o=Array.isArray(t)?t:[t];this.uiState.details=o[0],o.length===1&&o[0].schedule?.length&&(this.uiState.desiredOverlaySize="medium"),o.length===1&&o[0].layer&&!o[0].visible&&this.layerStore.mode===re.Radio&&this.layerStore.updateVisibility(o[0].layer,!0),e&&setTimeout(()=>this.moveToList(o),n||r?500:50)}reset(){const t=window.__searchi;t&&t.querySelector&&t.querySelector("input[type=search]")&&t.querySelector("input[type=search]").blur&&t.querySelector("input[type=search]").blur(),window.setTimeout(()=>{this.uiState.setKioskModeEnabled||ye().then(()=>{ae(()=>{this.selectSearch(""),this.routeStore.defaultFrom&&!this.routeStore.defaultFrom?.visible?this.selectBooth(this.routeStore.defaultFrom):this.uiState.details=null,this.resetCameraFn?.(),this.uiState.menu=!1,this.searchStore.resetSearchBox(),this.searchButtonsStore.clearAllFilters()}),setTimeout(()=>{ae(()=>{this.uiState.inIdle=!0})},100)})},1e3)}selectNone(){window.__resett&&window.__resett(),this.uiState.details=this.uiState.selectedCategory}selectBookmarks(){this.uiState.details=null,this.uiState.list={type:"bookmarks"}}selectVisited(){this.uiState.details=null,this.uiState.list={type:"visited"}}selectLanguage(){this.uiState.details=null,this.uiState.list={type:_e}}selectCategory(t){window.__resett&&window.__resett(),this.uiState.details=t,this.uiState.list={type:"category",category:t},this.uiState.desiredOverlaySize="full",t.exhibitors.find(o=>o.booths.find(l=>l.visible))||this.layerStore.updateVisibility(t.exhibitors[0]?.booths[0]?.layer,!0),setTimeout(()=>{this.uiState.moveToBooths=t.exhibitors.filter(o=>o.booths.find(l=>l.visible)).flatMap(o=>o.booths)},200)}selectEventItem(t,e=!0){if(this.uiState.hoveredExhibitor=null,this.uiState.details=t,this.uiState.desiredOverlaySize="medium",t.boothId){const o=this.boothStore.booths.find(l=>l.id===t.boothId);o&&o.layer&&!o.visible&&this.layerStore.mode===re.Radio&&this.layerStore.updateVisibility(o.layer,!0)}e&&setTimeout(()=>{if(t.boothId){const o=this.boothStore.booths.find(l=>l.id===t.boothId);o&&this.moveToList([o])}},n||r?500:50)}selectSearch(t){window.__resett&&window.__resett(),this.uiState.details=null,this.speakerStore.clearSelectedSpeaker(),this.uiState.list={type:"search",text:Fe(t,Object.keys(this.uiState.mapSettings).map(e=>`${e}=`)),focused:!1},this.uiState.activeListIndex=-1}clickBookmarks(){window.__resett&&window.__resett(),this.uiState.menu=!1,this.selectBookmarks(),this.moveToList(),this.showMap()}clickVisited(){window.__resett&&window.__resett(),this.uiState.menu=!1,this.selectVisited(),this.moveToList(),this.showMap()}clickLanguage(){window.__resett&&window.__resett(),this.uiState.menu=!1,this.selectLanguage()}clickCategory(t){window.__resett&&window.__resett(),this.uiState.menu=!1,this.selectCategory(t),this.uiState.onCategoryClick&&this.uiState.onCategoryClick({id:t.id,name:t.name,exhibitors:t.exhibitors.map(e=>e.id)}),setTimeout(()=>{this.moveToList(),this.showMap()},100)}clickSeminars(){this.clickCategory(this.categoryStore.seminarsCategory)}clickBoothInList(t){window.__resett&&window.__resett(),this.uiState.hoveredBooth=null,this.selectBooth(t),this.moveToList([t]),this.showMap()}clickBoothInList2(t){window.__resett&&window.__resett(),this.uiState.hoveredBooth=null,this.selectBooth(t,!1),window.setTimeout(()=>{this.moveToList([t]),this.showMap()},navigator.userAgent.toLowerCase().indexOf("android")>-1?400:50)}clickBooth(t){if(this.uiState.menu=!1,this.uiState.list.type==="sessions"&&this.searchStore.selectSearch(),this.uiState.list.type==="speakers"&&this.searchStore.selectSearch(),this.uiState.list.type==="tours"&&this.searchStore.selectSearch(),this.uiState.list.type==="multi-point-tour"&&this.searchStore.selectSearch(),!(this.uiState.selectedRoute?.from&&this.uiState.selectedRoute?.to)){if(this.uiState.selectedRoute?.to&&!this.uiState.selectedRoute?.from&&t){this.routeStore.setStartPoint(t);return}if(t)this.routeStore.tempToBooth=t;else{this.uiState.details=null,this.fp.hidePathways(),this.uiState.list={type:"search",text:"",focused:!1},this.uiState.onBoothClick&&this.uiState.onBoothClick({target:null});return}if(this.uiState.onBoothClick){const e={name:"",description:""},o={target:{...t,layer:t.layer||e}};this.uiState.onBoothClick(o)}t.exhibitors.length===1&&t instanceof de?(this.heatmapStore.forceTrack={action:ke.ViewBooth,label:t.name},this.selectExhibitor(t.exhibitors[0],!1)):this.selectBooth(t,!1),this.showMap()}}clickExhibitor2(t){this.selectExhibitor(t,!0),this.showMap()}clickExhibitor(t){window.setTimeout(()=>{this.clickExhibitor2(t)},navigator.userAgent.toLowerCase().indexOf("android")>-1?400:50)}showMap(){const t=this.uiState.details;t&&"schedule"in t&&t.schedule?.length>0?this.uiState.desiredOverlaySize="full":this.uiState.overlayPosition==="bottom"&&ne&&(this.uiState.desiredOverlaySize="medium")}showOverlay(){this.uiState.overlayPosition==="bottom"&&(this.uiState.desiredOverlaySize="full")}toggleMapOverlay(){this.uiState.overlayPosition==="bottom"&&this.uiState.overlaySize==="full"?this.uiState.desiredOverlaySize="medium":this.uiState.overlayPosition==="bottom"&&this.uiState.overlaySize!=="full"&&(this.uiState.desiredOverlaySize="full")}moveToList(t){t=t||this.uiState.listItems;const e=[];t.forEach(o=>{o instanceof le?e.push(...o.booths.filter(l=>l.visible)):o instanceof oe&&e.push(o)}),this.uiState.moveToBooths=e}moveToExhibitor(t){this.moveToList([t])}changeActiveListIndex(t){let e=this.uiState.activeListIndex+t;e=Math.max(0,Math.min(this.uiState.listItems.length-1,e)),this.uiState.activeListIndex=e}toggleModal(t){this.uiState.modalActive[t]=!this.uiState.modalActive[t]}openGallery(){this.uiState.galleryActive=!0}closeGallery(){this.uiState.galleryActive=!1}openActiveListItem(){const t=this.uiState.listItems[this.uiState.activeListIndex];t&&(ce.log("Opening",t),t instanceof le?this.clickExhibitor(t):t instanceof Se?this.clickCategory(t):t instanceof oe&&this.clickBoothInList2(t))}toggleCategoryFilter(){this.uiState.categoryFilterOpen=!this.uiState.categoryFilterOpen}applyCategoryFilters(t){this.uiState.selectedCategoryFilters=t,this.uiState.categoryFilterOpen=!1}get filteredExhibitors(){return this.uiState.selectedCategoryFilters.length===0?this.exhibitorStore.exhibitors:this.exhibitorStore.exhibitors.filter(t=>this.uiState.selectedCategoryFilters.some(e=>t.categories.some(o=>o.id===e.id)))}selectSessions(){this.uiState.list={type:"sessions",text:"",focused:!1},this.uiState.menu=!1,this.uiState.selectedTrack=null,this.searchButtonsStore.setSubButtonId(null),this.searchButtonsStore.subButtonsEnabled&&this.searchButtonsStore.showSubButtons("sessions"),r&&(this.uiState.desiredOverlaySize="full")}selectExhibitors(){this.uiState.list={type:"exhibitors",text:"",focused:!1},this.uiState.menu=!1,r&&(this.uiState.desiredOverlaySize="full")}selectTours(){this.uiState.list={type:"tours",text:"",focused:!1},this.uiState.menu=!1,r&&(this.uiState.desiredOverlaySize="full")}selectSpeakers(){this.uiState.list={type:"speakers",text:"",focused:!1},this.uiState.menu=!1,r&&(this.uiState.desiredOverlaySize="full")}selectSpeaker(t,e=!0){this.speakerStore.selectSpeaker(t,e)}resetFilters(){this.searchButtonsStore.clearAllFilters()}registerShortcutProviders(){this.shortcutRegistry.register(new Pe(this)),this.shortcutRegistry.register(new Ne(this)),this.shortcutRegistry.register(new qe(this))}}})();export default Ue;
@@ -13,6 +13,7 @@ export default class RoutePlannerStore {
13
13
  items: PlannerItem[];
14
14
  startPoint: Booth | null;
15
15
  source: PlannerSource | null;
16
+ excludedVisitedCount: number;
16
17
  constructor(rootStore: RootStore);
17
18
  get resolvedBooths(): Booth[];
18
19
  get stopsCount(): number;
@@ -26,7 +27,22 @@ export default class RoutePlannerStore {
26
27
  stops: string;
27
28
  from: string | undefined;
28
29
  distance: string | undefined;
30
+ travelTime: string | undefined;
29
31
  };
32
+ get routeFloors(): {
33
+ id: number;
34
+ name: string;
35
+ description?: string;
36
+ basePriority?: number;
37
+ }[];
38
+ get currentRouteFloor(): {
39
+ id: number;
40
+ name: string;
41
+ } | undefined;
42
+ setRouteFloor(floor: {
43
+ id: number;
44
+ name: string;
45
+ }): void;
30
46
  launch(items: PlannerItem[], source?: PlannerSource, initialStartPoint?: Booth | null): void;
31
47
  launchFromBookmarks(initialStartPoint?: Booth | null): void;
32
48
  launchFromSlugs(slugs: string[], initialStartPoint?: Booth | null): void;
@@ -1 +1 @@
1
- import{__esDecorate as r,__runInitializers as c}from"tslib";import{action as h,computed as m,observable as p}from"mobx";import{findBooth as $,Route as G}from"./RouteStore";import{t as b}from"../utils/i18n";let H=(()=>{let n=[],S,g=[],_=[],P,v=[],k=[],y,B=[],I=[],R,x,w,O,F,z,C,E,A,N,L,M,T,j;return class{static{const e=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;S=[p],P=[p],y=[p],R=[m],x=[m],w=[m],O=[m],F=[m],z=[m],C=[h],E=[h],A=[h],N=[h],L=[h],M=[h],T=[h],j=[h],r(this,null,R,{kind:"getter",name:"resolvedBooths",static:!1,private:!1,access:{has:t=>"resolvedBooths"in t,get:t=>t.resolvedBooths},metadata:e},null,n),r(this,null,x,{kind:"getter",name:"stopsCount",static:!1,private:!1,access:{has:t=>"stopsCount"in t,get:t=>t.stopsCount},metadata:e},null,n),r(this,null,w,{kind:"getter",name:"startPointBoothOptions",static:!1,private:!1,access:{has:t=>"startPointBoothOptions"in t,get:t=>t.startPointBoothOptions},metadata:e},null,n),r(this,null,O,{kind:"getter",name:"startPointAutocompleteOptions",static:!1,private:!1,access:{has:t=>"startPointAutocompleteOptions"in t,get:t=>t.startPointAutocompleteOptions},metadata:e},null,n),r(this,null,F,{kind:"getter",name:"title",static:!1,private:!1,access:{has:t=>"title"in t,get:t=>t.title},metadata:e},null,n),r(this,null,z,{kind:"getter",name:"subtitleParts",static:!1,private:!1,access:{has:t=>"subtitleParts"in t,get:t=>t.subtitleParts},metadata:e},null,n),r(this,null,C,{kind:"method",name:"launch",static:!1,private:!1,access:{has:t=>"launch"in t,get:t=>t.launch},metadata:e},null,n),r(this,null,E,{kind:"method",name:"launchFromBookmarks",static:!1,private:!1,access:{has:t=>"launchFromBookmarks"in t,get:t=>t.launchFromBookmarks},metadata:e},null,n),r(this,null,A,{kind:"method",name:"launchFromSlugs",static:!1,private:!1,access:{has:t=>"launchFromSlugs"in t,get:t=>t.launchFromSlugs},metadata:e},null,n),r(this,null,N,{kind:"method",name:"buildRoute",static:!1,private:!1,access:{has:t=>"buildRoute"in t,get:t=>t.buildRoute},metadata:e},null,n),r(this,null,L,{kind:"method",name:"setStartPoint",static:!1,private:!1,access:{has:t=>"setStartPoint"in t,get:t=>t.setStartPoint},metadata:e},null,n),r(this,null,M,{kind:"method",name:"removeItem",static:!1,private:!1,access:{has:t=>"removeItem"in t,get:t=>t.removeItem},metadata:e},null,n),r(this,null,T,{kind:"method",name:"reorderItems",static:!1,private:!1,access:{has:t=>"reorderItems"in t,get:t=>t.reorderItems},metadata:e},null,n),r(this,null,j,{kind:"method",name:"close",static:!1,private:!1,access:{has:t=>"close"in t,get:t=>t.close},metadata:e},null,n),r(null,null,S,{kind:"field",name:"items",static:!1,private:!1,access:{has:t=>"items"in t,get:t=>t.items,set:(t,s)=>{t.items=s}},metadata:e},g,_),r(null,null,P,{kind:"field",name:"startPoint",static:!1,private:!1,access:{has:t=>"startPoint"in t,get:t=>t.startPoint,set:(t,s)=>{t.startPoint=s}},metadata:e},v,k),r(null,null,y,{kind:"field",name:"source",static:!1,private:!1,access:{has:t=>"source"in t,get:t=>t.source,set:(t,s)=>{t.source=s}},metadata:e},B,I),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}rootStore=c(this,n);items=c(this,g,[]);startPoint=(c(this,_),c(this,v,null));source=(c(this,k),c(this,B,null));constructor(e){c(this,I),this.rootStore=e}get resolvedBooths(){const e=new Map;return this.startPoint&&e.set(this.startPoint.id,this.startPoint),this.items.forEach(t=>{t.booth&&e.set(t.booth.id,t.booth)}),Array.from(e.values())}get stopsCount(){return this.items.length}get startPointBoothOptions(){const e=this.rootStore.boothStore.booths,t=this.rootStore.routeStore.defaultFrom;return t?[...e,t]:e}get startPointAutocompleteOptions(){const{exhibitorStore:e}=this.rootStore,t=this.startPointBoothOptions,s=[],i=new Set;return e.exhibitors.forEach(o=>{o.booths.forEach(l=>{i.add(l.id),s.push({value:l.id.toString(),label:`${o.name} - ${l.name}`})})}),t.filter(o=>!i.has(o.id)).forEach(o=>{s.push({value:o.id.toString(),label:o.name})}),s.sort((o,l)=>o.label.localeCompare(l.label,void 0,{sensitivity:"base"}))}get title(){return this.source==="bookmarks"?b("Bookmarks route"):""}get subtitleParts(){const{routeInfo:e}=this.rootStore.routeStore;return{stops:b("{{count}} stops",{count:this.stopsCount}),from:this.startPoint?b("From {{name}}",{name:this.startPoint.name}):void 0,distance:e?e.distance:void 0}}launch(e,t="custom",s){this.items=e.filter(a=>a.type==="exhibitor"?!a.entity.visited:!0),this.source=t,this.startPoint=s!==void 0?s:this.detectStartPoint();const{uiState:i}=this.rootStore;i.list={type:"route-planner",source:t},i.details=null,i.menu=!1,this.buildRoute()}launchFromBookmarks(e){const{exhibitorStore:t,eventStore:s,boothStore:i}=this.rootStore,a=[];t.bookmarked.forEach(o=>{a.push({type:"exhibitor",entity:o,booth:o.booths[0]||null})}),i.booths.filter(o=>o.exhibitors.length===0&&o.bookmarkedDirectly).forEach(o=>{a.push({type:"booth",entity:o,booth:o})}),this.launch(a,"bookmarks",e)}launchFromSlugs(e,t){const s=this.resolveSlugs(e);this.launch(s,"custom",t)}resolveSlugs(e){const{exhibitorStore:t,eventStore:s,boothStore:i}=this.rootStore;return e.filter(Boolean).map(a=>{const o=a.toLowerCase(),l=t.exhibitors.find(f=>f.slug?.toLowerCase()===o||f.externalId?.toLowerCase()===o);if(l)return{type:"exhibitor",entity:l,booth:l.booths[0]||null};const d=$(a);return d?{type:"booth",entity:d,booth:d}:null}).filter(a=>a!==null)}buildRoute(){const e=[];if(this.startPoint&&this.startPoint.name&&e.push(this.startPoint.name),this.items.forEach(u=>{u.booth&&u.booth.name&&e.push(u.booth.name)}),e.length<2){this.rootStore.routeStore.updateRoute([]);return}let t;try{const u=this.rootStore.fp?.getOptimizedRoutes?.(e);t=Array.isArray(u)?u.flatMap(D=>D?.waypoints??[]):[]}catch{t=[]}const s=new Set(e),i=new Set(t),a=e.length>0&&[...s].every(u=>i.has(u));(!t.length||!a)&&(t=e.slice()),this.reorderItemsByNames(t);const o=this.resolvedBooths;if(o.length<2){this.rootStore.routeStore.updateRoute([]);return}const l=o[0],d=o[o.length-1],f=o.slice(1,-1),q=new G(l,d,f);this.rootStore.routeStore.selectRoute(q,!1),this.rootStore.uiState.setIsMultiPointRoute(f.length>0)}reorderItemsByNames(e){const t=this.startPoint?this.startPoint.name:null,s=new Map;this.items.forEach(a=>{const o=a.booth?a.booth.name:null;o&&(s.has(o)||s.set(o,[]),s.get(o).push(a))});const i=[];e.forEach(a=>{if(a!==t){const o=s.get(a);o&&o.length>0&&i.push(...o.splice(0))}}),this.items=i}detectStartPoint(){const{boothStore:e,poiTypeStore:t}=this.rootStore,s=["entrance","entrances"],i=t.poiTypes.find(a=>s.includes(a.name.toLowerCase()));return i&&e.booths.find(a=>a.poiTypeId===i.id)||null}setStartPoint(e){this.startPoint=e,this.buildRoute()}removeItem(e){this.items.splice(e,1),this.buildRoute()}reorderItems(e,t){const[s]=this.items.splice(e,1);this.items.splice(t,0,s),this.buildRoute()}close(){this.items=[],this.startPoint=null,this.source=null,this.rootStore.uiState.details=null,this.rootStore.uiState.list={type:"search",text:"",focused:!1},this.rootStore.routeStore.selectRoute(null,!1)}}})();export default H;
1
+ import{__esDecorate as r,__runInitializers as u}from"tslib";import{action as c,computed as d,observable as g}from"mobx";import{findBooth as Q,Route as U}from"./RouteStore";import{t as p}from"../utils/i18n";let W=(()=>{let n=[],_,S=[],b=[],P,v=[],y=[],k,R=[],x=[],F,B=[],I=[],C,w,O,z,V,E,L,A,N,M,T,j,q,D,$,G,H;return class{static{const e=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;_=[g],P=[g],k=[g],F=[g],C=[d],w=[d],O=[d],z=[d],V=[d],E=[d],L=[d],A=[d],N=[c],M=[c],T=[c],j=[c],q=[c],D=[c],$=[c],G=[c],H=[c],r(this,null,C,{kind:"getter",name:"resolvedBooths",static:!1,private:!1,access:{has:t=>"resolvedBooths"in t,get:t=>t.resolvedBooths},metadata:e},null,n),r(this,null,w,{kind:"getter",name:"stopsCount",static:!1,private:!1,access:{has:t=>"stopsCount"in t,get:t=>t.stopsCount},metadata:e},null,n),r(this,null,O,{kind:"getter",name:"startPointBoothOptions",static:!1,private:!1,access:{has:t=>"startPointBoothOptions"in t,get:t=>t.startPointBoothOptions},metadata:e},null,n),r(this,null,z,{kind:"getter",name:"startPointAutocompleteOptions",static:!1,private:!1,access:{has:t=>"startPointAutocompleteOptions"in t,get:t=>t.startPointAutocompleteOptions},metadata:e},null,n),r(this,null,V,{kind:"getter",name:"title",static:!1,private:!1,access:{has:t=>"title"in t,get:t=>t.title},metadata:e},null,n),r(this,null,E,{kind:"getter",name:"subtitleParts",static:!1,private:!1,access:{has:t=>"subtitleParts"in t,get:t=>t.subtitleParts},metadata:e},null,n),r(this,null,L,{kind:"getter",name:"routeFloors",static:!1,private:!1,access:{has:t=>"routeFloors"in t,get:t=>t.routeFloors},metadata:e},null,n),r(this,null,A,{kind:"getter",name:"currentRouteFloor",static:!1,private:!1,access:{has:t=>"currentRouteFloor"in t,get:t=>t.currentRouteFloor},metadata:e},null,n),r(this,null,N,{kind:"method",name:"setRouteFloor",static:!1,private:!1,access:{has:t=>"setRouteFloor"in t,get:t=>t.setRouteFloor},metadata:e},null,n),r(this,null,M,{kind:"method",name:"launch",static:!1,private:!1,access:{has:t=>"launch"in t,get:t=>t.launch},metadata:e},null,n),r(this,null,T,{kind:"method",name:"launchFromBookmarks",static:!1,private:!1,access:{has:t=>"launchFromBookmarks"in t,get:t=>t.launchFromBookmarks},metadata:e},null,n),r(this,null,j,{kind:"method",name:"launchFromSlugs",static:!1,private:!1,access:{has:t=>"launchFromSlugs"in t,get:t=>t.launchFromSlugs},metadata:e},null,n),r(this,null,q,{kind:"method",name:"buildRoute",static:!1,private:!1,access:{has:t=>"buildRoute"in t,get:t=>t.buildRoute},metadata:e},null,n),r(this,null,D,{kind:"method",name:"setStartPoint",static:!1,private:!1,access:{has:t=>"setStartPoint"in t,get:t=>t.setStartPoint},metadata:e},null,n),r(this,null,$,{kind:"method",name:"removeItem",static:!1,private:!1,access:{has:t=>"removeItem"in t,get:t=>t.removeItem},metadata:e},null,n),r(this,null,G,{kind:"method",name:"reorderItems",static:!1,private:!1,access:{has:t=>"reorderItems"in t,get:t=>t.reorderItems},metadata:e},null,n),r(this,null,H,{kind:"method",name:"close",static:!1,private:!1,access:{has:t=>"close"in t,get:t=>t.close},metadata:e},null,n),r(null,null,_,{kind:"field",name:"items",static:!1,private:!1,access:{has:t=>"items"in t,get:t=>t.items,set:(t,o)=>{t.items=o}},metadata:e},S,b),r(null,null,P,{kind:"field",name:"startPoint",static:!1,private:!1,access:{has:t=>"startPoint"in t,get:t=>t.startPoint,set:(t,o)=>{t.startPoint=o}},metadata:e},v,y),r(null,null,k,{kind:"field",name:"source",static:!1,private:!1,access:{has:t=>"source"in t,get:t=>t.source,set:(t,o)=>{t.source=o}},metadata:e},R,x),r(null,null,F,{kind:"field",name:"excludedVisitedCount",static:!1,private:!1,access:{has:t=>"excludedVisitedCount"in t,get:t=>t.excludedVisitedCount,set:(t,o)=>{t.excludedVisitedCount=o}},metadata:e},B,I),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}rootStore=u(this,n);items=u(this,S,[]);startPoint=(u(this,b),u(this,v,null));source=(u(this,y),u(this,R,null));excludedVisitedCount=(u(this,x),u(this,B,0));constructor(e){u(this,I),this.rootStore=e}get resolvedBooths(){const e=new Map;return this.startPoint&&e.set(this.startPoint.id,this.startPoint),this.items.forEach(t=>{t.booth&&e.set(t.booth.id,t.booth)}),Array.from(e.values())}get stopsCount(){return this.items.length}get startPointBoothOptions(){const e=this.rootStore.boothStore.booths,t=this.rootStore.routeStore.defaultFrom;return t?[...e,t]:e}get startPointAutocompleteOptions(){const{exhibitorStore:e}=this.rootStore,t=this.startPointBoothOptions,o=[],a=new Set;return e.exhibitors.forEach(s=>{s.booths.forEach(l=>{a.add(l.id),o.push({value:l.id.toString(),label:`${s.name} - ${l.name}`})})}),t.filter(s=>!a.has(s.id)).forEach(s=>{o.push({value:s.id.toString(),label:s.name})}),o.sort((s,l)=>s.label.localeCompare(l.label,void 0,{sensitivity:"base"}))}get title(){return this.source==="bookmarks"?p("Bookmarks route"):""}get subtitleParts(){const{routeInfo:e}=this.rootStore.routeStore;let t;if(e?.time){const o=e.time;t=o<60?p("< 1 min"):p("~ {{n}} min",{n:Math.round(o/60)})}return{stops:p("{{count}} stops",{count:this.stopsCount}),from:this.startPoint?p("From {{name}}",{name:this.startPoint.name}):void 0,distance:e?e.distance:void 0,travelTime:t}}get routeFloors(){return this.rootStore.routeStore.pathLayers.map(e=>({id:e.id,name:e.layer?.shortName,description:e.layer?.description,basePriority:e.layer?.basePriority??0}))}get currentRouteFloor(){const e=this.routeFloors,t=this.rootStore.routeStore.currentRouteLayer;if(!e.length)return;if(!t)return e[0]?{id:e[0].id,name:e[0].name}:void 0;const o=e.find(a=>a.description?.toLowerCase()===t.description?.toLowerCase());return o?{id:o.id,name:o.name}:{id:e[0].id,name:e[0].name}}setRouteFloor(e){const t=this.rootStore.routeStore.pathLayers.find(o=>o.id===e.id);t?.layer&&this.rootStore.layerStore.updateVisibility(t.layer,!0)}launch(e,t="custom",o){this.excludedVisitedCount=e.filter(i=>i.type==="exhibitor"&&i.entity.visited).length,this.items=e.filter(i=>i.type==="exhibitor"?!i.entity.visited:!0),this.source=t,this.startPoint=o!==void 0?o:this.detectStartPoint();const{uiState:a}=this.rootStore;a.list={type:"route-planner",source:t},a.details=null,a.menu=!1,this.buildRoute()}launchFromBookmarks(e){const{exhibitorStore:t,eventStore:o,boothStore:a}=this.rootStore,i=[];t.bookmarked.forEach(s=>{i.push({type:"exhibitor",entity:s,booth:s.booths[0]||null})}),a.booths.filter(s=>s.exhibitors.length===0&&s.bookmarkedDirectly).forEach(s=>{i.push({type:"booth",entity:s,booth:s})}),this.launch(i,"bookmarks",e)}launchFromSlugs(e,t){const o=this.resolveSlugs(e);this.launch(o,"custom",t)}resolveSlugs(e){const{exhibitorStore:t,eventStore:o,boothStore:a}=this.rootStore;return e.filter(Boolean).map(i=>{const s=i.toLowerCase(),l=t.exhibitors.find(f=>f.slug?.toLowerCase()===s||f.externalId?.toLowerCase()===s);if(l)return{type:"exhibitor",entity:l,booth:l.booths[0]||null};const m=Q(i);return m?{type:"booth",entity:m,booth:m}:null}).filter(i=>i!==null)}buildRoute(){const e=[];if(this.startPoint&&this.startPoint.name&&e.push(this.startPoint.name),this.items.forEach(h=>{h.booth&&h.booth.name&&e.push(h.booth.name)}),e.length<2){this.rootStore.routeStore.updateRoute([]);return}let t;try{const h=this.rootStore.fp?.getOptimizedRoutes?.(e);t=Array.isArray(h)?h.flatMap(K=>K?.waypoints??[]):[]}catch{t=[]}const o=new Set(e),a=new Set(t),i=e.length>0&&[...o].every(h=>a.has(h));(!t.length||!i)&&(t=e.slice()),this.reorderItemsByNames(t);const s=this.resolvedBooths;if(s.length<2){this.rootStore.routeStore.updateRoute([]);return}const l=s[0],m=s[s.length-1],f=s.slice(1,-1),J=new U(l,m,f);this.rootStore.routeStore.selectRoute(J,!1),this.rootStore.uiState.setIsMultiPointRoute(f.length>0)}reorderItemsByNames(e){const t=this.startPoint?this.startPoint.name:null,o=new Map;this.items.forEach(i=>{const s=i.booth?i.booth.name:null;s&&(o.has(s)||o.set(s,[]),o.get(s).push(i))});const a=[];e.forEach(i=>{if(i!==t){const s=o.get(i);s&&s.length>0&&a.push(...s.splice(0))}}),this.items=a}detectStartPoint(){const{boothStore:e,poiTypeStore:t}=this.rootStore,o=["entrance","entrances"],a=t.poiTypes.find(i=>o.includes(i.name.toLowerCase()));return a&&e.booths.find(i=>i.poiTypeId===a.id)||null}setStartPoint(e){this.startPoint=e,this.buildRoute()}removeItem(e){this.items.splice(e,1),this.buildRoute()}reorderItems(e,t){const[o]=this.items.splice(e,1);this.items.splice(t,0,o),this.buildRoute()}close(){this.items=[],this.startPoint=null,this.source=null,this.excludedVisitedCount=0,this.rootStore.uiState.details=null,this.rootStore.uiState.list={type:"search",text:"",focused:!1},this.rootStore.routeStore.selectRoute(null,!1)}}})();export default W;
@@ -1,5 +1,5 @@
1
1
  import { Point } from "simple-geometry";
2
- import { RouteLine } from "../utils/wayfinding";
2
+ import type { RouteLine } from "../wayfinding";
3
3
  import { Booth } from "./BoothStore";
4
4
  import { Exhibitor } from "./ExhibitorStore";
5
5
  import { Layer } from "./LayerStore";
@@ -1 +1 @@
1
- import{__esDecorate as i,__runInitializers as r}from"tslib";import{action as m,computed as k,observable as d}from"mobx";import{Point as qe,lineLength as Me}from"simple-geometry";import o,{boothStore as $e,layersStore as x}from".";import{fpGeo as S}from"../components/Mapbox/utils/fpGeo";import Ve from"../core/Rect";import{GaEventActions as je,sendEventToGa as We}from"../tools/gtag";import{convertGpsToLocal as Be,isValidPointCoords as Ce,calculateRelativeBearing as Ke}from"../utils/gps";import{getLayerSvg as Ye,svgArea as He}from"../data/svg";import{getGraphLines as Je,sublines as Qe}from"../utils/wayfinding";import{LayersMode as Xe}from"./LayerStore";import{uiState as p}from"./index";import{calcSpeed as Fe}from"../utils/calcSpeed";import{calcTravelTime as Ge}from"../utils/calcTravelTime";import{DEFAULT_UNITS as Ue,ORIENTATION_GRANTED_KEY as et}from"../constants";import{areLayersEnabled as tt}from"../utils/areLayersEnabled";import{distancePointToRouteOnLayer as st,findBoothInRadius as at}from"../components/Map/drawing/config/route-snapping";import Ne from"../data";import Oe from"../tools/logger";const y=a=>typeof a=="string"?Number(a.replace(",",".")):a;let it=(()=>{let a=[],n,l=[],f=[],h,v=[],R=[],L,E=[],z=[],P,D=[],I=[],w,A=[],M=[],B,C=[],F=[],G,U=[],N=[],O,Z=[],q=[],$,V=[],j=[],W,K=[],Y=[],H,J=[],Q=[],X,ee=[],te=[],se,ae=[],ie=[],re,ne=[],oe=[],le,ce,ue,de,fe,he,me,pe,_e,ye,ge,ke,be,ve=[],Re=[],xe,Se,Te,Le,Ee,ze,Pe=[],De=[],Ie,we;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;n=[d],h=[d],L=[d],P=[d],w=[d],B=[d],G=[d],O=[d],$=[d],W=[d],H=[d],X=[d],se=[d],re=[d],le=[k],ce=[m],ue=[m],de=[k({keepAlive:!0})],fe=[k({keepAlive:!0})],he=[m],me=[m],pe=[k({keepAlive:!0})],_e=[k({keepAlive:!0})],ye=[m],ge=[m],ke=[m],be=[d],xe=[k],Se=[m],Te=[m],Le=[m],Ee=[m],ze=[d],Ie=[m],we=[k({keepAlive:!0})],i(this,null,le,{kind:"getter",name:"canFindLocation",static:!1,private:!1,access:{has:e=>"canFindLocation"in e,get:e=>e.canFindLocation},metadata:t},null,a),i(this,null,ce,{kind:"method",name:"selectRoute",static:!1,private:!1,access:{has:e=>"selectRoute"in e,get:e=>e.selectRoute},metadata:t},null,a),i(this,null,ue,{kind:"method",name:"setStartPoint",static:!1,private:!1,access:{has:e=>"setStartPoint"in e,get:e=>e.setStartPoint},metadata:t},null,a),i(this,null,de,{kind:"getter",name:"pathLayers",static:!1,private:!1,access:{has:e=>"pathLayers"in e,get:e=>e.pathLayers},metadata:t},null,a),i(this,null,fe,{kind:"getter",name:"nearestBooth",static:!1,private:!1,access:{has:e=>"nearestBooth"in e,get:e=>e.nearestBooth},metadata:t},null,a),i(this,null,he,{kind:"method",name:"setMarkers",static:!1,private:!1,access:{has:e=>"setMarkers"in e,get:e=>e.setMarkers},metadata:t},null,a),i(this,null,me,{kind:"method",name:"selectMarker",static:!1,private:!1,access:{has:e=>"selectMarker"in e,get:e=>e.selectMarker},metadata:t},null,a),i(this,null,pe,{kind:"getter",name:"selectedMarkers",static:!1,private:!1,access:{has:e=>"selectedMarkers"in e,get:e=>e.selectedMarkers},metadata:t},null,a),i(this,null,_e,{kind:"getter",name:"layers",static:!1,private:!1,access:{has:e=>"layers"in e,get:e=>e.layers},metadata:t},null,a),i(this,null,ye,{kind:"method",name:"clickRoute",static:!1,private:!1,access:{has:e=>"clickRoute"in e,get:e=>e.clickRoute},metadata:t},null,a),i(this,null,ge,{kind:"method",name:"selectCurrentPosition",static:!1,private:!1,access:{has:e=>"selectCurrentPosition"in e,get:e=>e.selectCurrentPosition},metadata:t},null,a),i(this,null,ke,{kind:"method",name:"findLocation",static:!1,private:!1,access:{has:e=>"findLocation"in e,get:e=>e.findLocation},metadata:t},null,a),i(this,null,xe,{kind:"getter",name:"routeInfo",static:!1,private:!1,access:{has:e=>"routeInfo"in e,get:e=>e.routeInfo},metadata:t},null,a),i(this,null,Se,{kind:"method",name:"updateRoute",static:!1,private:!1,access:{has:e=>"updateRoute"in e,get:e=>e.updateRoute},metadata:t},null,a),i(this,null,Te,{kind:"method",name:"updateRouteDistance",static:!1,private:!1,access:{has:e=>"updateRouteDistance"in e,get:e=>e.updateRouteDistance},metadata:t},null,a),i(this,null,Le,{kind:"method",name:"updateRoutePoints",static:!1,private:!1,access:{has:e=>"updateRoutePoints"in e,get:e=>e.updateRoutePoints},metadata:t},null,a),i(this,null,Ee,{kind:"method",name:"checkRoutes",static:!1,private:!1,access:{has:e=>"checkRoutes"in e,get:e=>e.checkRoutes},metadata:t},null,a),i(this,null,Ie,{kind:"method",name:"setGpsTrackingEnabled",static:!1,private:!1,access:{has:e=>"setGpsTrackingEnabled"in e,get:e=>e.setGpsTrackingEnabled},metadata:t},null,a),i(this,null,we,{kind:"getter",name:"gpsEnabled",static:!1,private:!1,access:{has:e=>"gpsEnabled"in e,get:e=>e.gpsEnabled},metadata:t},null,a),i(null,null,n,{kind:"field",name:"routeLines",static:!1,private:!1,access:{has:e=>"routeLines"in e,get:e=>e.routeLines,set:(e,s)=>{e.routeLines=s}},metadata:t},l,f),i(null,null,h,{kind:"field",name:"routeDistance",static:!1,private:!1,access:{has:e=>"routeDistance"in e,get:e=>e.routeDistance,set:(e,s)=>{e.routeDistance=s}},metadata:t},v,R),i(null,null,L,{kind:"field",name:"currentPosition",static:!1,private:!1,access:{has:e=>"currentPosition"in e,get:e=>e.currentPosition,set:(e,s)=>{e.currentPosition=s}},metadata:t},E,z),i(null,null,P,{kind:"field",name:"requestCompass",static:!1,private:!1,access:{has:e=>"requestCompass"in e,get:e=>e.requestCompass,set:(e,s)=>{e.requestCompass=s}},metadata:t},D,I),i(null,null,w,{kind:"field",name:"iconType",static:!1,private:!1,access:{has:e=>"iconType"in e,get:e=>e.iconType,set:(e,s)=>{e.iconType=s}},metadata:t},A,M),i(null,null,B,{kind:"field",name:"tempToBooth",static:!1,private:!1,access:{has:e=>"tempToBooth"in e,get:e=>e.tempToBooth,set:(e,s)=>{e.tempToBooth=s}},metadata:t},C,F),i(null,null,G,{kind:"field",name:"defaultFrom",static:!1,private:!1,access:{has:e=>"defaultFrom"in e,get:e=>e.defaultFrom,set:(e,s)=>{e.defaultFrom=s}},metadata:t},U,N),i(null,null,O,{kind:"field",name:"focusEnabled",static:!1,private:!1,access:{has:e=>"focusEnabled"in e,get:e=>e.focusEnabled,set:(e,s)=>{e.focusEnabled=s}},metadata:t},Z,q),i(null,null,$,{kind:"field",name:"prevZ",static:!1,private:!1,access:{has:e=>"prevZ"in e,get:e=>e.prevZ,set:(e,s)=>{e.prevZ=s}},metadata:t},V,j),i(null,null,W,{kind:"field",name:"markersData",static:!1,private:!1,access:{has:e=>"markersData"in e,get:e=>e.markersData,set:(e,s)=>{e.markersData=s}},metadata:t},K,Y),i(null,null,H,{kind:"field",name:"prevMarkers",static:!1,private:!1,access:{has:e=>"prevMarkers"in e,get:e=>e.prevMarkers,set:(e,s)=>{e.prevMarkers=s}},metadata:t},J,Q),i(null,null,X,{kind:"field",name:"showAccessible",static:!1,private:!1,access:{has:e=>"showAccessible"in e,get:e=>e.showAccessible,set:(e,s)=>{e.showAccessible=s}},metadata:t},ee,te),i(null,null,se,{kind:"field",name:"onlyAccessible",static:!1,private:!1,access:{has:e=>"onlyAccessible"in e,get:e=>e.onlyAccessible,set:(e,s)=>{e.onlyAccessible=s}},metadata:t},ae,ie),i(null,null,re,{kind:"field",name:"currentRouteLayer",static:!1,private:!1,access:{has:e=>"currentRouteLayer"in e,get:e=>e.currentRouteLayer,set:(e,s)=>{e.currentRouteLayer=s}},metadata:t},ne,oe),i(null,null,be,{kind:"field",name:"routeUnits",static:!1,private:!1,access:{has:e=>"routeUnits"in e,get:e=>e.routeUnits,set:(e,s)=>{e.routeUnits=s}},metadata:t},ve,Re),i(null,null,ze,{kind:"field",name:"isGpsTrackingEnabled",static:!1,private:!1,access:{has:e=>"isGpsTrackingEnabled"in e,get:e=>e.isGpsTrackingEnabled,set:(e,s)=>{e.isGpsTrackingEnabled=s}},metadata:t},Pe,De),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}rootStore=r(this,a);cpTimeout;routeLines=r(this,l,[]);routeDistance=(r(this,f),r(this,v,null));currentPosition=(r(this,R),r(this,E,null));requestCompass=(r(this,z),r(this,D,!1));iconType=(r(this,I),r(this,A,0));tempToBooth=(r(this,M),r(this,C,null));defaultFrom=(r(this,F),r(this,U,null));focusEnabled=(r(this,N),r(this,Z,!0));prevZ=(r(this,q),r(this,V,null));markersData=(r(this,j),r(this,K,{icons:[],markers:[]}));prevMarkers=(r(this,Y),r(this,J,[]));showAccessible=(r(this,Q),r(this,ee,!!Qe()?.lines?.find(t=>t.unaccessible)));onlyAccessible=(r(this,te),r(this,ae,!1));currentRouteLayer=(r(this,ie),r(this,ne,null));constructor(t){r(this,De),this.rootStore=t,this.focusEnabled=!window.location.search}get canFindLocation(){return!!this.defaultFrom||!!this.currentPosition}selectRoute(t,e=!0){e&&(p.list={type:"search",text:"",focused:!1}),!t?.from&&t?.to&&this.currentPosition&&(t.from=this.nearestBooth),t?.from&&t?.to&&t.from===t.to&&(t=null);let s=[];t?.from&&t?.to&&window.setTimeout(()=>{this.rootStore.showMap()},navigator.userAgent.toLowerCase().indexOf("android")>-1?400:50),t?.from?.visible&&s.push(t.from),t?.to?.visible&&(this.tempToBooth=null,s.push(t.to)),!t&&o.fp.onDirection&&o.fp.onDirection(null),setTimeout(()=>{this.rootStore.moveToList(s),p.details=t,t&&(!t.from||!t.to)&&o.showOverlay(),t?.to&&t?.from?.layer&&this.rootStore.layerStore.updateVisibility(t.from.layer,!0),!this.currentRouteLayer&&t?.from?.layer&&(this.currentRouteLayer=t?.from?.layer),e&&t?.from&&t?.to&&We(je.ClickDirections,`${t?.from?"From "+t.from.name:""} ${t?.to?"To "+t.to.name:""}`)},200)}setStartPoint(t){const e=p.selectedRoute;if(e?.to&&!e?.from&&t){const s=new Route(t,e.to,e.waypoints);this.selectRoute(s)}}get pathLayers(){return o.routeStore.routeLines?.map(t=>t.p0.layer)?.filter((t,e,s)=>s.indexOf(t)===e).reverse().map((t,e)=>({id:e+1,layer:o.layerStore.findLayer(t)}))}get nearestBooth(){return this.getNearestBooth(this.currentPosition)}getNearestBooth(t){if(!t)return null;let e=this.rootStore.layerStore.findLayer(t.z);const s=t.lat&&t.lng?Be(t,S.properties.config):t;return this.rootStore.boothStore.booths.filter(c=>x.mode===Xe.Default||!e?c.visible&&c.rect:c.rect&&(typeof t.z!="number"&&!t.z&&c.visible||e.name===c.layer?.name)).sort((c,u)=>Me(s,{x:c.rect.cx,y:c.rect.cy})-Me(s,{x:u.rect.cx,y:u.rect.cy}))[0]||null}setMarkers(t){this.markersData.markers=(t?.markers??[]).map(rt),this.markersData.icons=t?.icons??[]}selectMarker(t,e){const s=this.markersData.markers.find(u=>u.id===t);this.markersData.markers.forEach(u=>u.active=!1),s&&(s.active=!0);let c=o.layerStore.findLayer(s?.z);if(e&&s){const u=o.rendererService.renderer;return c&&!c?.visible&&x.updateVisibility(c,!0),u?u.controls.panTo(s.x,s.y):(Oe.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 o.routeStore.routeLines?.map(e=>e.p0.layer).reverse().forEach(e=>{t.indexOf(e)===-1&&t.push(e)}),t.map(e=>o.layerStore.layers.find(s=>s.name===e))}clickRoute(t,e){window.__resett&&window.__resett(),this.rootStore.uiState.menu=null,p.list.type==="route-planner"&&(p.list={type:"search",text:"",focused:!1}),this.selectRoute(new Route(this.defaultFrom||t,e))}selectCurrentPosition(t,e=!0,s){clearTimeout(this.cpTimeout),t&&(t.x=y(t.x),t.y=y(t.y),t.lat=y(t.lat),t.lng=y(t.lng),tt()||(t.z=null)),e=!(e&&this.rootStore.uiState.details&&!(this.rootStore.uiState.details instanceof Route))&&(this.focusEnabled||this.prevZ!=t?.z),this.focusEnabled&&(this.focusEnabled=!1),this.prevZ=t?.z?.toString(),this.iconType=s?1:0;const u=t?nt(t):null;if(!u){this.currentPosition=null;return}const _=o.layerStore.findLayer(t.z),b=new CurrentPosition(u.x,u.y,_?.name||this.currentRouteLayer?.name,Ke(u),t.lat,t.lng),T=p.selectedRoute;let Ae=!this.routeLines?.length;if(_&&this.routeLines?.length&&(Ae=!!this.routeLines.find(g=>g.p0.layer===_.name||g.p1.layer===_.name)),e&&Ae){const g=o.rendererService.renderer;if(_&&!_?.visible&&x.updateVisibility(_,!0),!g){Oe.warn("Renderer is not initialized. Cannot pan to current position.");return}g.controls.panTo(b.x,b.y)}const Ze=!S?.properties?.config?.disableRerouting&&ot(b,this.routeLines)&&!!at(b,$e.booths,[T?.to]);if(T&&Ze){const g=o.routeStore.getNearestBooth(b);o.routeStore.selectRoute(new Route(g,T?.to),!1)}this.currentPosition=b,this.gpsEnabled||(this.cpTimeout=setTimeout(()=>{this.currentPosition&&this.selectCurrentPosition(null,!1)},30*1e3))}findLocation(){if(this.canFindLocation){if(o.mapboxStore.showMapbox){p.moveToLocation=!0;return}if(o.routeStore.currentPosition){const t=o.routeStore.currentPosition,e=Ve.fromCxcywh(t.x,t.y,100,100);if(!e.intersects(He))return;localStorage.getItem(et)==="false"&&(o.routeStore.requestCompass=!0),p.moveToRect=e;const c=o.layerStore.findLayer(o.routeStore.currentPosition?.z);c&&x.updateVisibility(c,!0)}else o.selectBooth(o.routeStore.defaultFrom)}}routeUnits=(r(this,oe),r(this,ve,Ue));get routeInfo(){const t=this.routeDistance,e=this.routeUnits;return t?{distance:`${t}${e}`,units:e,time:Ge(t,Fe(e))}:null}updateRoute(t,e){!t?.length&&!this.routeLines.length||(this.routeLines=t,this.updateRoutePoints())}updateRouteDistance(t){if(t==null)return;const e=Ye(),s=(e.getAttribute("units")||Ue).toLowerCase?.().trim(),c=e.getAttribute("fp-ver")?.startsWith("5")??!1;this.routeDistance=Math.round(t/(c?1:10)),this.routeUnits=s,this.updateRoutePoints()}updateRoutePoints(){const t=p.selectedRoute,e=this.routeDistance,s=this.routeUnits;o.fp.onDirection&&setTimeout(()=>{o.fp.onDirection({from:t?.from?{id:t.from.id,name:t.from.name,externalId:t.from.externalId,layer:{name:t.from?.layer?.name,description:t.from?.layer?.description}}:null,to:t?.to?{id:t.to.id,name:t.to.name,externalId:t.to.externalId,layer:{name:t.to.layer?.name,description:t.to.layer?.description}}:null,lines:this.routeLines,distance:`${e}${s}`,units:s,time:Ge(e,Fe(s))})},200)}checkRoutes(){let t=o.boothStore.booths;console.info(`Route check started ${t.length}.... `);for(let e=0;e<t.length;e++){const s=t[e];for(let c=e+1;c<t.length;c++){const u=t[c];Je(s,u).length||console.warn(`No route found from ${s.name} to ${u.name}`)}}console.info("Route check done....")}isGpsTrackingEnabled=(r(this,Re),r(this,Pe,!0));setGpsTrackingEnabled(t){this.isGpsTrackingEnabled=t}get gpsEnabled(){return Ne.autoTrackingGps&&this.isGpsTrackingEnabled&&!Ne.enableIPS}}})();export default it;function rt(a){return{...a,x:y(a.x),y:y(a.y),lat:y(a.lat),lng:y(a.lng)}}function nt(a){let n=null,l=null;return S&&(n=S.properties.config),n&&a.x>=n.p0.x&&a.x<=n.p2.x&&a.y>=n.p0.y&&a.y<=n.p2.y?l={...a}:n&&Ce(a.lat)&&Ce(a.lng)?l=Be(a,n):n||(l=a),l||null}export function findBooth(a){return o.boothStore.findBooth(a)||o.exhibitorStore.findExhibitor(a)?.booths[0]}export function findEntityByExternalId(a){const n=o.boothStore.boothByExternalId.get(a);if(n)return{type:"booth",entity:n};const l=o.exhibitorStore.exhibitorByExternalId.get(a);if(l)return{type:"exhibitor",entity:l}}export function separateExternalIds(a){const n=[],l=[];for(const f of a){const h=findEntityByExternalId(f);h&&(h.type==="booth"?n.push(f):l.push(f))}return{boothExternalIds:n,exhibitorExternalIds:l}}export function extractRoute(a,n,l){return new Route(findBooth(a)??o.routeStore.defaultFrom??null,findBooth(n),l?.map(f=>findBooth(f)))}export class Route{from;to;waypoints;constructor(n,l,f){this.from=n,this.to=l,this.waypoints=f,this.waypoints=f?.filter(h=>h&&h.id!==n?.id&&h.id!==l?.id)}}export class CurrentPosition extends qe{x;y;z;angle;lat;lng;constructor(n,l,f,h,v,R){super(n,l),this.x=n,this.y=l,this.z=f,this.angle=h,this.lat=v,this.lng=R}}function ot(a,n,l=10){if(!a||!n?.length)return!1;const f={layer:a.z?String(a.z):void 0,x:a.x,y:a.y},h=st(f,n);return isFinite(h)&&h>l}
1
+ import{__esDecorate as i,__runInitializers as r}from"tslib";import{action as m,computed as k,observable as d}from"mobx";import{Point as Ve,lineLength as Me}from"simple-geometry";import o,{boothStore as je,layersStore as x}from".";import{fpGeo as T}from"../components/Mapbox/utils/fpGeo";import We from"../core/Rect";import{GaEventActions as Ke,sendEventToGa as Xe}from"../tools/gtag";import{convertGpsToLocal as Be,isValidPointCoords as Ce,calculateRelativeBearing as Ye}from"../utils/gps";import{getLayerSvg as He,svgArea as Je}from"../data/svg";import{getGraphLines as Qe,boothToWaypoint as Fe,graphDataSource as Ge}from"../wayfinding";import{LayersMode as et}from"./LayerStore";import{uiState as p}from"./index";import{calcSpeed as Ue}from"../utils/calcSpeed";import{calcTravelTime as Oe}from"../utils/calcTravelTime";import{DEFAULT_UNITS as Ne,ORIENTATION_GRANTED_KEY as tt}from"../constants";import{areLayersEnabled as st}from"../utils/areLayersEnabled";import{distancePointToRouteOnLayer as at,findBoothInRadius as it}from"../components/Map/drawing/config/route-snapping";import Ze from"../data";import qe from"../tools/logger";import rt from"../tools/settings";const g=a=>typeof a=="string"?Number(a.replace(",",".")):a;let nt=(()=>{let a=[],n,l=[],f=[],h,v=[],R=[],L,E=[],z=[],P,D=[],I=[],w,A=[],M=[],B,C=[],F=[],G,U=[],O=[],N,Z=[],q=[],$,V=[],j=[],W,K=[],X=[],Y,H=[],J=[],Q,ee=[],te=[],se,ae=[],ie=[],re,ne=[],oe=[],le,ce,ue,de,fe,he,me,pe,_e,ge,ye,ke,be,ve=[],Re=[],xe,Se,Te,Le,Ee,ze,Pe=[],De=[],Ie,we;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;n=[d],h=[d],L=[d],P=[d],w=[d],B=[d],G=[d],N=[d],$=[d],W=[d],Y=[d],Q=[d],se=[d],re=[d],le=[k],ce=[m],ue=[m],de=[k({keepAlive:!0})],fe=[k({keepAlive:!0})],he=[m],me=[m],pe=[k({keepAlive:!0})],_e=[k({keepAlive:!0})],ge=[m],ye=[m],ke=[m],be=[d],xe=[k],Se=[m],Te=[m],Le=[m],Ee=[m],ze=[d],Ie=[m],we=[k({keepAlive:!0})],i(this,null,le,{kind:"getter",name:"canFindLocation",static:!1,private:!1,access:{has:e=>"canFindLocation"in e,get:e=>e.canFindLocation},metadata:t},null,a),i(this,null,ce,{kind:"method",name:"selectRoute",static:!1,private:!1,access:{has:e=>"selectRoute"in e,get:e=>e.selectRoute},metadata:t},null,a),i(this,null,ue,{kind:"method",name:"setStartPoint",static:!1,private:!1,access:{has:e=>"setStartPoint"in e,get:e=>e.setStartPoint},metadata:t},null,a),i(this,null,de,{kind:"getter",name:"pathLayers",static:!1,private:!1,access:{has:e=>"pathLayers"in e,get:e=>e.pathLayers},metadata:t},null,a),i(this,null,fe,{kind:"getter",name:"nearestBooth",static:!1,private:!1,access:{has:e=>"nearestBooth"in e,get:e=>e.nearestBooth},metadata:t},null,a),i(this,null,he,{kind:"method",name:"setMarkers",static:!1,private:!1,access:{has:e=>"setMarkers"in e,get:e=>e.setMarkers},metadata:t},null,a),i(this,null,me,{kind:"method",name:"selectMarker",static:!1,private:!1,access:{has:e=>"selectMarker"in e,get:e=>e.selectMarker},metadata:t},null,a),i(this,null,pe,{kind:"getter",name:"selectedMarkers",static:!1,private:!1,access:{has:e=>"selectedMarkers"in e,get:e=>e.selectedMarkers},metadata:t},null,a),i(this,null,_e,{kind:"getter",name:"layers",static:!1,private:!1,access:{has:e=>"layers"in e,get:e=>e.layers},metadata:t},null,a),i(this,null,ge,{kind:"method",name:"clickRoute",static:!1,private:!1,access:{has:e=>"clickRoute"in e,get:e=>e.clickRoute},metadata:t},null,a),i(this,null,ye,{kind:"method",name:"selectCurrentPosition",static:!1,private:!1,access:{has:e=>"selectCurrentPosition"in e,get:e=>e.selectCurrentPosition},metadata:t},null,a),i(this,null,ke,{kind:"method",name:"findLocation",static:!1,private:!1,access:{has:e=>"findLocation"in e,get:e=>e.findLocation},metadata:t},null,a),i(this,null,xe,{kind:"getter",name:"routeInfo",static:!1,private:!1,access:{has:e=>"routeInfo"in e,get:e=>e.routeInfo},metadata:t},null,a),i(this,null,Se,{kind:"method",name:"updateRoute",static:!1,private:!1,access:{has:e=>"updateRoute"in e,get:e=>e.updateRoute},metadata:t},null,a),i(this,null,Te,{kind:"method",name:"updateRouteDistance",static:!1,private:!1,access:{has:e=>"updateRouteDistance"in e,get:e=>e.updateRouteDistance},metadata:t},null,a),i(this,null,Le,{kind:"method",name:"updateRoutePoints",static:!1,private:!1,access:{has:e=>"updateRoutePoints"in e,get:e=>e.updateRoutePoints},metadata:t},null,a),i(this,null,Ee,{kind:"method",name:"checkRoutes",static:!1,private:!1,access:{has:e=>"checkRoutes"in e,get:e=>e.checkRoutes},metadata:t},null,a),i(this,null,Ie,{kind:"method",name:"setGpsTrackingEnabled",static:!1,private:!1,access:{has:e=>"setGpsTrackingEnabled"in e,get:e=>e.setGpsTrackingEnabled},metadata:t},null,a),i(this,null,we,{kind:"getter",name:"gpsEnabled",static:!1,private:!1,access:{has:e=>"gpsEnabled"in e,get:e=>e.gpsEnabled},metadata:t},null,a),i(null,null,n,{kind:"field",name:"routeLines",static:!1,private:!1,access:{has:e=>"routeLines"in e,get:e=>e.routeLines,set:(e,s)=>{e.routeLines=s}},metadata:t},l,f),i(null,null,h,{kind:"field",name:"routeDistance",static:!1,private:!1,access:{has:e=>"routeDistance"in e,get:e=>e.routeDistance,set:(e,s)=>{e.routeDistance=s}},metadata:t},v,R),i(null,null,L,{kind:"field",name:"currentPosition",static:!1,private:!1,access:{has:e=>"currentPosition"in e,get:e=>e.currentPosition,set:(e,s)=>{e.currentPosition=s}},metadata:t},E,z),i(null,null,P,{kind:"field",name:"requestCompass",static:!1,private:!1,access:{has:e=>"requestCompass"in e,get:e=>e.requestCompass,set:(e,s)=>{e.requestCompass=s}},metadata:t},D,I),i(null,null,w,{kind:"field",name:"iconType",static:!1,private:!1,access:{has:e=>"iconType"in e,get:e=>e.iconType,set:(e,s)=>{e.iconType=s}},metadata:t},A,M),i(null,null,B,{kind:"field",name:"tempToBooth",static:!1,private:!1,access:{has:e=>"tempToBooth"in e,get:e=>e.tempToBooth,set:(e,s)=>{e.tempToBooth=s}},metadata:t},C,F),i(null,null,G,{kind:"field",name:"defaultFrom",static:!1,private:!1,access:{has:e=>"defaultFrom"in e,get:e=>e.defaultFrom,set:(e,s)=>{e.defaultFrom=s}},metadata:t},U,O),i(null,null,N,{kind:"field",name:"focusEnabled",static:!1,private:!1,access:{has:e=>"focusEnabled"in e,get:e=>e.focusEnabled,set:(e,s)=>{e.focusEnabled=s}},metadata:t},Z,q),i(null,null,$,{kind:"field",name:"prevZ",static:!1,private:!1,access:{has:e=>"prevZ"in e,get:e=>e.prevZ,set:(e,s)=>{e.prevZ=s}},metadata:t},V,j),i(null,null,W,{kind:"field",name:"markersData",static:!1,private:!1,access:{has:e=>"markersData"in e,get:e=>e.markersData,set:(e,s)=>{e.markersData=s}},metadata:t},K,X),i(null,null,Y,{kind:"field",name:"prevMarkers",static:!1,private:!1,access:{has:e=>"prevMarkers"in e,get:e=>e.prevMarkers,set:(e,s)=>{e.prevMarkers=s}},metadata:t},H,J),i(null,null,Q,{kind:"field",name:"showAccessible",static:!1,private:!1,access:{has:e=>"showAccessible"in e,get:e=>e.showAccessible,set:(e,s)=>{e.showAccessible=s}},metadata:t},ee,te),i(null,null,se,{kind:"field",name:"onlyAccessible",static:!1,private:!1,access:{has:e=>"onlyAccessible"in e,get:e=>e.onlyAccessible,set:(e,s)=>{e.onlyAccessible=s}},metadata:t},ae,ie),i(null,null,re,{kind:"field",name:"currentRouteLayer",static:!1,private:!1,access:{has:e=>"currentRouteLayer"in e,get:e=>e.currentRouteLayer,set:(e,s)=>{e.currentRouteLayer=s}},metadata:t},ne,oe),i(null,null,be,{kind:"field",name:"routeUnits",static:!1,private:!1,access:{has:e=>"routeUnits"in e,get:e=>e.routeUnits,set:(e,s)=>{e.routeUnits=s}},metadata:t},ve,Re),i(null,null,ze,{kind:"field",name:"isGpsTrackingEnabled",static:!1,private:!1,access:{has:e=>"isGpsTrackingEnabled"in e,get:e=>e.isGpsTrackingEnabled,set:(e,s)=>{e.isGpsTrackingEnabled=s}},metadata:t},Pe,De),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}rootStore=r(this,a);cpTimeout;routeLines=r(this,l,[]);routeDistance=(r(this,f),r(this,v,null));currentPosition=(r(this,R),r(this,E,null));requestCompass=(r(this,z),r(this,D,!1));iconType=(r(this,I),r(this,A,0));tempToBooth=(r(this,M),r(this,C,null));defaultFrom=(r(this,F),r(this,U,null));focusEnabled=(r(this,O),r(this,Z,!0));prevZ=(r(this,q),r(this,V,null));markersData=(r(this,j),r(this,K,{icons:[],markers:[]}));prevMarkers=(r(this,X),r(this,H,[]));showAccessible=(r(this,J),r(this,ee,!!Ge.getLines().find(t=>t.unaccessible)));onlyAccessible=(r(this,te),r(this,ae,!1));currentRouteLayer=(r(this,ie),r(this,ne,null));constructor(t){r(this,De),this.rootStore=t,this.focusEnabled=!window.location.search}get canFindLocation(){return!!this.defaultFrom||!!this.currentPosition}selectRoute(t,e=!0){e&&(p.list={type:"search",text:"",focused:!1}),!t?.from&&t?.to&&this.currentPosition&&(t.from=this.nearestBooth),t?.from&&t?.to&&t.from===t.to&&(t=null);let s=[];t?.from&&t?.to&&window.setTimeout(()=>{this.rootStore.showMap()},navigator.userAgent.toLowerCase().indexOf("android")>-1?400:50),t?.from?.visible&&s.push(t.from),t?.to?.visible&&(this.tempToBooth=null,s.push(t.to)),!t&&o.fp.onDirection&&o.fp.onDirection(null),setTimeout(()=>{this.rootStore.moveToList(s),p.details=t,t&&(!t.from||!t.to)&&o.showOverlay(),t?.to&&t?.from?.layer&&this.rootStore.layerStore.updateVisibility(t.from.layer,!0),!this.currentRouteLayer&&t?.from?.layer&&(this.currentRouteLayer=t?.from?.layer),e&&t?.from&&t?.to&&Xe(Ke.ClickDirections,`${t?.from?"From "+t.from.name:""} ${t?.to?"To "+t.to.name:""}`)},200)}setStartPoint(t){const e=p.selectedRoute;if(e?.to&&!e?.from&&t){const s=new Route(t,e.to,e.waypoints);this.selectRoute(s)}}get pathLayers(){return o.routeStore.routeLines?.map(t=>t.p0.layer)?.filter((t,e,s)=>s.indexOf(t)===e).reverse().map((t,e)=>({id:e+1,layer:o.layerStore.findLayer(t)}))}get nearestBooth(){return this.getNearestBooth(this.currentPosition)}getNearestBooth(t){if(!t)return null;let e=this.rootStore.layerStore.findLayer(t.z);const s=t.lat&&t.lng?Be(t,T.properties.config):t;return this.rootStore.boothStore.booths.filter(c=>x.mode===et.Default||!e?c.visible&&c.rect:c.rect&&(typeof t.z!="number"&&!t.z&&c.visible||e.name===c.layer?.name)).sort((c,u)=>Me(s,{x:c.rect.cx,y:c.rect.cy})-Me(s,{x:u.rect.cx,y:u.rect.cy}))[0]||null}setMarkers(t){this.markersData.markers=(t?.markers??[]).map(ot),this.markersData.icons=t?.icons??[]}selectMarker(t,e){const s=this.markersData.markers.find(u=>u.id===t);this.markersData.markers.forEach(u=>u.active=!1),s&&(s.active=!0);let c=o.layerStore.findLayer(s?.z);if(e&&s){const u=o.rendererService.renderer;return c&&!c?.visible&&x.updateVisibility(c,!0),u?u.controls.panTo(s.x,s.y):(qe.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 o.routeStore.routeLines?.map(e=>e.p0.layer).reverse().forEach(e=>{t.indexOf(e)===-1&&t.push(e)}),t.map(e=>o.layerStore.layers.find(s=>s.name===e))}clickRoute(t,e){window.__resett&&window.__resett(),this.rootStore.uiState.menu=null,p.list.type==="route-planner"&&(p.list={type:"search",text:"",focused:!1}),this.selectRoute(new Route(this.defaultFrom||t,e))}selectCurrentPosition(t,e=!0,s){clearTimeout(this.cpTimeout),t&&(t.x=g(t.x),t.y=g(t.y),t.lat=g(t.lat),t.lng=g(t.lng),st()||(t.z=null)),e=!(e&&this.rootStore.uiState.details&&!(this.rootStore.uiState.details instanceof Route))&&(this.focusEnabled||this.prevZ!=t?.z),this.focusEnabled&&(this.focusEnabled=!1),this.prevZ=t?.z?.toString(),this.iconType=s?1:0;const u=t?lt(t):null;if(!u){this.currentPosition=null;return}const _=o.layerStore.findLayer(t.z),b=new CurrentPosition(u.x,u.y,_?.name||this.currentRouteLayer?.name,Ye(u),t.lat,t.lng),S=p.selectedRoute;let Ae=!this.routeLines?.length;if(_&&this.routeLines?.length&&(Ae=!!this.routeLines.find(y=>y.p0.layer===_.name||y.p1.layer===_.name)),e&&Ae){const y=o.rendererService.renderer;if(_&&!_?.visible&&x.updateVisibility(_,!0),!y){qe.warn("Renderer is not initialized. Cannot pan to current position.");return}y.controls.panTo(b.x,b.y)}const $e=!(rt.EXPO==="cloudnext26")&&ct(b,this.routeLines)&&!!it(b,je.booths,[S?.to]);if(S&&$e){const y=o.routeStore.getNearestBooth(b);o.routeStore.selectRoute(new Route(y,S?.to),!1)}this.currentPosition=b,this.gpsEnabled||(this.cpTimeout=setTimeout(()=>{this.currentPosition&&this.selectCurrentPosition(null,!1)},30*1e3))}findLocation(){if(this.canFindLocation){if(o.mapboxStore.showMapbox){p.moveToLocation=!0;return}if(o.routeStore.currentPosition){const t=o.routeStore.currentPosition,e=We.fromCxcywh(t.x,t.y,100,100);if(!e.intersects(Je))return;localStorage.getItem(tt)==="false"&&(o.routeStore.requestCompass=!0),p.moveToRect=e;const c=o.layerStore.findLayer(o.routeStore.currentPosition?.z);c&&x.updateVisibility(c,!0)}else o.selectBooth(o.routeStore.defaultFrom)}}routeUnits=(r(this,oe),r(this,ve,Ne));get routeInfo(){const t=this.routeDistance,e=this.routeUnits;return t?{distance:`${t}${e}`,units:e,time:Oe(t,Ue(e))}:null}updateRoute(t,e){!t?.length&&!this.routeLines.length||(this.routeLines=t,this.updateRoutePoints())}updateRouteDistance(t){if(t==null)return;const e=He(),s=(e.getAttribute("units")||Ne).toLowerCase?.().trim(),c=e.getAttribute("fp-ver")?.startsWith("5")??!1;this.routeDistance=Math.round(t/(c?1:10)),this.routeUnits=s,this.updateRoutePoints()}updateRoutePoints(){const t=p.selectedRoute,e=this.routeDistance,s=this.routeUnits;o.fp.onDirection&&setTimeout(()=>{o.fp.onDirection({from:t?.from?{id:t.from.id,name:t.from.name,externalId:t.from.externalId,layer:{name:t.from?.layer?.name,description:t.from?.layer?.description}}:null,to:t?.to?{id:t.to.id,name:t.to.name,externalId:t.to.externalId,layer:{name:t.to.layer?.name,description:t.to.layer?.description}}:null,lines:this.routeLines,distance:`${e}${s}`,units:s,time:Oe(e,Ue(s))})},200)}checkRoutes(){let t=o.boothStore.booths;console.info(`Route check started ${t.length}.... `);for(let e=0;e<t.length;e++){const s=t[e];for(let c=e+1;c<t.length;c++){const u=t[c];Qe(Ge,Fe(s),Fe(u)).length||console.warn(`No route found from ${s.name} to ${u.name}`)}}console.info("Route check done....")}isGpsTrackingEnabled=(r(this,Re),r(this,Pe,!0));setGpsTrackingEnabled(t){this.isGpsTrackingEnabled=t}get gpsEnabled(){return Ze.autoTrackingGps&&this.isGpsTrackingEnabled&&!Ze.enableIPS}}})();export default nt;function ot(a){return{...a,x:g(a.x),y:g(a.y),lat:g(a.lat),lng:g(a.lng)}}function lt(a){let n=null,l=null;return T&&(n=T.properties.config),n&&a.x>=n.p0.x&&a.x<=n.p2.x&&a.y>=n.p0.y&&a.y<=n.p2.y?l={...a}:n&&Ce(a.lat)&&Ce(a.lng)?l=Be(a,n):n||(l=a),l||null}export function findBooth(a){return o.boothStore.findBooth(a)||o.exhibitorStore.findExhibitor(a)?.booths[0]}export function findEntityByExternalId(a){const n=o.boothStore.boothByExternalId.get(a);if(n)return{type:"booth",entity:n};const l=o.exhibitorStore.exhibitorByExternalId.get(a);if(l)return{type:"exhibitor",entity:l}}export function separateExternalIds(a){const n=[],l=[];for(const f of a){const h=findEntityByExternalId(f);h&&(h.type==="booth"?n.push(f):l.push(f))}return{boothExternalIds:n,exhibitorExternalIds:l}}export function extractRoute(a,n,l){return new Route(findBooth(a)??o.routeStore.defaultFrom??null,findBooth(n),l?.map(f=>findBooth(f)))}export class Route{from;to;waypoints;constructor(n,l,f){this.from=n,this.to=l,this.waypoints=f,this.waypoints=f?.filter(h=>h&&h.id!==n?.id&&h.id!==l?.id)}}export class CurrentPosition extends Ve{x;y;z;angle;lat;lng;constructor(n,l,f,h,v,R){super(n,l),this.x=n,this.y=l,this.z=f,this.angle=h,this.lat=v,this.lng=R}}function ct(a,n,l=10){if(!a||!n?.length)return!1;const f={layer:a.z?String(a.z):void 0,x:a.x,y:a.y},h=at(f,n);return isFinite(h)&&h>l}
@@ -1 +1 @@
1
- import{__esDecorate as s,__runInitializers as u}from"tslib";import{action as c,computed as l,observable as d}from"mobx";import{t as h}from"../utils/i18n";import p from"../data";import{exhibitorStore as le}from"./index";import oe from"../tools/settings";import{sanitizeSearch as ce}from"../utils/sanitizeText";import{Route as S}from"./RouteStore";import{goBack as g}from"../services/routing";import{MOBILE_BREAKPOINT as he}from"../constants";class r{static closeDetails(o){return o.details?(o.details=null,!0):!1}static closeMultiPointTour(o){return o.rootStore.fp.hidePathways(),!0}static clearSearchAndFocus(o){return o.searchText?(o.setSearchText(""),o.setFocused(!0),!0):!1}static returnToSearch(o,n=!1){o.list={type:"search",text:"",focused:n}}static returnToSessions(o,n=!1){o.list={type:"sessions",text:"",focused:n}}static returnToTours(o,n=!1){o.list={type:"tours",text:"",focused:n}}static openMenu(o){o.menu=!0}static closeMenu(o){o.menu=!1}static clearListScroll(o,n){o.clearListScroll(n)}static resetActiveListIndex(o){o.activeListIndex=-1}}let ne=(()=>{let a=[],o,n=[],m=[],x,_=[],B=[],y,F=[],k=[],b,v=[],T=[],I,M,C,A,w,z,O,L,E,P,W,D,U,j,G,K,R,X,H,N,V,Y,$,q,J,Q,Z,ee,te,se,ae,ie,re;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;o=[d],x=[d],y=[d],b=[d],I=[l],M=[l],C=[l],A=[l],w=[l],z=[l],O=[l],L=[l],E=[l],P=[l],W=[l],D=[l],U=[l],j=[l],G=[c],K=[c],R=[c],X=[c],H=[c],N=[c],V=[c],Y=[c],$=[c],q=[c],J=[c],Q=[c],Z=[c],ee=[l],te=[c],se=[l],ae=[l],ie=[l],re=[l],s(this,null,I,{kind:"getter",name:"searchBoxConfig",static:!1,private:!1,access:{has:e=>"searchBoxConfig"in e,get:e=>e.searchBoxConfig},metadata:t},null,a),s(this,null,M,{kind:"getter",name:"searchBoxMode",static:!1,private:!1,access:{has:e=>"searchBoxMode"in e,get:e=>e.searchBoxMode},metadata:t},null,a),s(this,null,C,{kind:"getter",name:"searchBoxTitle",static:!1,private:!1,access:{has:e=>"searchBoxTitle"in e,get:e=>e.searchBoxTitle},metadata:t},null,a),s(this,null,A,{kind:"getter",name:"searchBoxSubtitle",static:!1,private:!1,access:{has:e=>"searchBoxSubtitle"in e,get:e=>e.searchBoxSubtitle},metadata:t},null,a),s(this,null,w,{kind:"getter",name:"searchBoxBadge",static:!1,private:!1,access:{has:e=>"searchBoxBadge"in e,get:e=>e.searchBoxBadge},metadata:t},null,a),s(this,null,z,{kind:"getter",name:"searchBoxIcon",static:!1,private:!1,access:{has:e=>"searchBoxIcon"in e,get:e=>e.searchBoxIcon},metadata:t},null,a),s(this,null,O,{kind:"getter",name:"searchBoxActions",static:!1,private:!1,access:{has:e=>"searchBoxActions"in e,get:e=>e.searchBoxActions},metadata:t},null,a),s(this,null,L,{kind:"getter",name:"shouldShowSearchInput",static:!1,private:!1,access:{has:e=>"shouldShowSearchInput"in e,get:e=>e.shouldShowSearchInput},metadata:t},null,a),s(this,null,E,{kind:"getter",name:"shouldShowCloseButton",static:!1,private:!1,access:{has:e=>"shouldShowCloseButton"in e,get:e=>e.shouldShowCloseButton},metadata:t},null,a),s(this,null,P,{kind:"getter",name:"closeButtonAction",static:!1,private:!1,access:{has:e=>"closeButtonAction"in e,get:e=>e.closeButtonAction},metadata:t},null,a),s(this,null,W,{kind:"getter",name:"shouldShowShadow",static:!1,private:!1,access:{has:e=>"shouldShowShadow"in e,get:e=>e.shouldShowShadow},metadata:t},null,a),s(this,null,D,{kind:"getter",name:"placeholder",static:!1,private:!1,access:{has:e=>"placeholder"in e,get:e=>e.placeholder},metadata:t},null,a),s(this,null,U,{kind:"getter",name:"searchBoxClass",static:!1,private:!1,access:{has:e=>"searchBoxClass"in e,get:e=>e.searchBoxClass},metadata:t},null,a),s(this,null,j,{kind:"getter",name:"ariaLabel",static:!1,private:!1,access:{has:e=>"ariaLabel"in e,get:e=>e.ariaLabel},metadata:t},null,a),s(this,null,G,{kind:"method",name:"selectSearch",static:!1,private:!1,access:{has:e=>"selectSearch"in e,get:e=>e.selectSearch},metadata:t},null,a),s(this,null,K,{kind:"method",name:"selectSearchAndFocus",static:!1,private:!1,access:{has:e=>"selectSearchAndFocus"in e,get:e=>e.selectSearchAndFocus},metadata:t},null,a),s(this,null,R,{kind:"method",name:"setSearchText",static:!1,private:!1,access:{has:e=>"setSearchText"in e,get:e=>e.setSearchText},metadata:t},null,a),s(this,null,X,{kind:"method",name:"setFocused",static:!1,private:!1,access:{has:e=>"setFocused"in e,get:e=>e.setFocused},metadata:t},null,a),s(this,null,H,{kind:"method",name:"handleBackAction",static:!1,private:!1,access:{has:e=>"handleBackAction"in e,get:e=>e.handleBackAction},metadata:t},null,a),s(this,null,N,{kind:"method",name:"closeSearch",static:!1,private:!1,access:{has:e=>"closeSearch"in e,get:e=>e.closeSearch},metadata:t},null,a),s(this,null,V,{kind:"method",name:"clearActiveFilters",static:!1,private:!1,access:{has:e=>"clearActiveFilters"in e,get:e=>e.clearActiveFilters},metadata:t},null,a),s(this,null,Y,{kind:"method",name:"handleSearchAction",static:!1,private:!1,access:{has:e=>"handleSearchAction"in e,get:e=>e.handleSearchAction},metadata:t},null,a),s(this,null,$,{kind:"method",name:"openOverlayWithoutInputFocus",static:!1,private:!1,access:{has:e=>"openOverlayWithoutInputFocus"in e,get:e=>e.openOverlayWithoutInputFocus},metadata:t},null,a),s(this,null,q,{kind:"method",name:"closeSessions",static:!1,private:!1,access:{has:e=>"closeSessions"in e,get:e=>e.closeSessions},metadata:t},null,a),s(this,null,J,{kind:"method",name:"closeExhibitors",static:!1,private:!1,access:{has:e=>"closeExhibitors"in e,get:e=>e.closeExhibitors},metadata:t},null,a),s(this,null,Q,{kind:"method",name:"resetSearchBox",static:!1,private:!1,access:{has:e=>"resetSearchBox"in e,get:e=>e.resetSearchBox},metadata:t},null,a),s(this,null,Z,{kind:"method",name:"syncWithUIState",static:!1,private:!1,access:{has:e=>"syncWithUIState"in e,get:e=>e.syncWithUIState},metadata:t},null,a),s(this,null,ee,{kind:"getter",name:"actionButtonIcon",static:!1,private:!1,access:{has:e=>"actionButtonIcon"in e,get:e=>e.actionButtonIcon},metadata:t},null,a),s(this,null,te,{kind:"method",name:"clearAndSelectSearch",static:!1,private:!1,access:{has:e=>"clearAndSelectSearch"in e,get:e=>e.clearAndSelectSearch},metadata:t},null,a),s(this,null,se,{kind:"getter",name:"backMode",static:!1,private:!1,access:{has:e=>"backMode"in e,get:e=>e.backMode},metadata:t},null,a),s(this,null,ae,{kind:"getter",name:"isMobileDetailsMode",static:!1,private:!1,access:{has:e=>"isMobileDetailsMode"in e,get:e=>e.isMobileDetailsMode},metadata:t},null,a),s(this,null,ie,{kind:"getter",name:"shouldShowTitle",static:!1,private:!1,access:{has:e=>"shouldShowTitle"in e,get:e=>e.shouldShowTitle},metadata:t},null,a),s(this,null,re,{kind:"getter",name:"searchState",static:!1,private:!1,access:{has:e=>"searchState"in e,get:e=>e.searchState},metadata:t},null,a),s(null,null,o,{kind:"field",name:"searchText",static:!1,private:!1,access:{has:e=>"searchText"in e,get:e=>e.searchText,set:(e,i)=>{e.searchText=i}},metadata:t},n,m),s(null,null,x,{kind:"field",name:"isFocused",static:!1,private:!1,access:{has:e=>"isFocused"in e,get:e=>e.isFocused,set:(e,i)=>{e.isFocused=i}},metadata:t},_,B),s(null,null,y,{kind:"field",name:"isClearMode",static:!1,private:!1,access:{has:e=>"isClearMode"in e,get:e=>e.isClearMode,set:(e,i)=>{e.isClearMode=i}},metadata:t},F,k),s(null,null,b,{kind:"field",name:"skipInputFocus",static:!1,private:!1,access:{has:e=>"skipInputFocus"in e,get:e=>e.skipInputFocus,set:(e,i)=>{e.skipInputFocus=i}},metadata:t},v,T),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}rootStore=u(this,a);searchText=u(this,n,"");isFocused=(u(this,m),u(this,_,!1));isClearMode=(u(this,B),u(this,F,!1));skipInputFocus=(u(this,k),u(this,v,!1));constructor(t){u(this,T),this.rootStore=t}get uiState(){return this.rootStore.uiState}get searchBoxConfig(){return this.uiState.searchBoxConfig}get searchBoxMode(){return this.searchBoxConfig.mode}get searchBoxTitle(){return this.searchBoxConfig.title}get searchBoxSubtitle(){return this.searchBoxConfig.subtitle}get searchBoxBadge(){return this.searchBoxConfig.badge}get searchBoxIcon(){return this.searchBoxConfig.icon}get searchBoxActions(){return this.uiState.searchBoxActions}get shouldShowSearchInput(){return this.searchBoxMode==="search"}get shouldShowCloseButton(){const{menu:t,details:e,list:i}=this.uiState;return!this.shouldShowSearchInput||i.type==="sessions"||i.type==="tours"||i.type==="speakers"||i.type==="exhibitors"?!0:t||e!==null||!!this.searchText||this.isClearMode||this.isFocused}get closeButtonAction(){return!this.shouldShowSearchInput||this.searchBoxMode==="details"||this.uiState.list.type==="sessions"||this.uiState.list.type==="speakers"||this.uiState.list.type==="exhibitors"?"close":this.searchText?"clear":"close"}get shouldShowShadow(){const{menu:t,details:e,list:i}=this.uiState,f=i.type==="search"&&!!i.text;return!(this.rootStore.fp.alwaysShowSidebar||t||e!==null||i.type!=="search"||f||this.isFocused||this.uiState.heatmap)}get placeholder(){const{list:t,heatmapYah:e}=this.uiState,i=this.rootStore.languageStore.language;if(t.type==="sessions")return h("Search sessions",{lng:i.id});if(t.type==="tours")return h("Search Guided Tours",{lng:i.id});if(t.type==="exhibitors")return h("Search exhibitors",{lng:i.id});if(t.type==="speakers")return h("Search speakers",{lng:i.id});if(oe.EXPO.startsWith("lenzerheidemotorclassics"))return"SUCHE";if(oe.EXPO.startsWith("jetlag"))return"Search location or artist";if(e)return h("Find scans above",{lng:i.id});if(this.uiState.hasAppliedFilters)return h("Search",{lng:i.id});const f=p.boothTerm.toLowerCase();return!p.searchText&&le.exhibitors.length===0?h("Search {{boothTerm}}",{boothTerm:f,lng:i.id}):p.searchText||h("Search",{lng:i.id})}get searchBoxClass(){return{"is-details":this.searchBoxMode==="details"&&!(this.uiState.details instanceof S),"is-interface":this.searchBoxMode==="interface","has-shadow":this.shouldShowShadow,"has-subtitle":!!this.searchBoxConfig.subtitle,"has-badge":!!this.searchBoxConfig.badge,"has-icon":!!this.searchBoxConfig.icon,"is-overlay-full":this.uiState.isOverlayOpen&&this.uiState.overlaySize==="full","is-featured-exhibitor":this.uiState.isFeaturedExhibitorActive,"is-route":this.uiState.details instanceof S,"is-guided-tours":this.uiState.isGuidedToursActive,"is-overlay-scrolled":this.uiState.isOverlayScrolled,"overlay-pulse":this.uiState.kiosk&&this.uiState.inIdle&&!this.uiState.setKioskModeEnabled}}get ariaLabel(){return!this.shouldShowSearchInput||this.searchBoxMode==="details"?h("Close"):this.searchText?h("Clear search"):h("Close")}selectSearch(t){window.__resett&&window.__resett(),this.uiState.details=null;const e=ce(t||"",Object.keys(this.uiState.mapSettings).map(i=>`${i}=`));this.setSearchText(e),this.uiState.activeListIndex=-1}selectSearchAndFocus(t){this.selectSearch(t),this.setFocused(!0)}setSearchText(t){this.searchText=t,this.uiState.hasAppliedFilters?this.rootStore.moveToList():this.uiState.centerMap=!0,this.uiState.activeListIndex=t?0:-1,this.uiState.list.type!=="sessions"&&this.uiState.list.type!=="tours"&&this.uiState.list.type!=="speakers"&&this.uiState.list.type!=="exhibitors"?this.uiState.list={type:"search",text:t,focused:this.isFocused}:this.uiState.list.type==="exhibitors"&&(this.uiState.list={type:"exhibitors",text:t,focused:this.isFocused}),this.uiState.searchClearMode=this.isClearMode}setFocused(t){this.isFocused=t,this.isClearMode=!1,this.skipInputFocus=!1,this.uiState.searchFocused=t,this.uiState.searchClearMode=!1,this.uiState.desiredOverlaySize="full"}handleBackAction(){const{uiState:t}=this,{list:e}=t;if(t.desiredOverlaySize="full",e.type==="route-planner"){this.rootStore.routePlannerStore.close(),this.rootStore.selectBookmarks(),g();return}if(e.type==="multi-point-tour"&&!t.details){r.returnToTours(t,!1),this.rootStore.fp.hidePathways();return}if(t.details){t.details=null,g();return}if(t.menu){e.type==="sessions"?t.list={type:"sessions",text:"",focused:!0}:e.type==="exhibitors"?t.list={type:"exhibitors",text:"",focused:!0}:t.list={type:"search",text:"",focused:!0},this.setFocused(!0),this.isClearMode=!0,r.closeMenu(t);return}if(e.type==="tours"&&t.details instanceof S){t.details=null;return}if(e.type==="sessions"||e.type==="tours"||e.type==="exhibitors"||this.uiState.hasAppliedFilters){if(r.closeDetails(t))return;this.clearActiveFilters(),r.returnToSearch(t,!1),this.selectSearchAndFocus();return}switch(e.type){case"filter":t.details=null;return;case"multi-point-tour":this.rootStore.fp.hidePathways(),r.closeDetails(t)?r.returnToTours(t,!1):g();return;case"category":this.rootStore.selectCategory(e.category);return;case"speakers":if(r.closeDetails(t))return;r.returnToSessions(t,!1);return;case"bookmarks":case"visited":if(r.closeDetails(t))return;this.selectSearchAndFocus();return;case"language":r.returnToSearch(t,!1),r.openMenu(t);return}r.closeDetails(t)||r.clearSearchAndFocus(this)||r.openMenu(t)}closeSearch(){const{uiState:t}=this,{list:e}=t;if(e.type==="route-planner"){this.rootStore.routePlannerStore.close(),r.returnToSearch(t,!1),this.resetSearchBox();return}if(r.closeDetails(t),r.clearListScroll(t,e.type),r.closeMultiPointTour(t),e.type==="bookmarks"){r.returnToSearch(t,!1),this.resetSearchBox();return}if(t.selectedCategory){r.returnToSearch(t,!1),this.resetSearchBox();return}if(e.type==="sessions"){this.closeSessions();return}if(e.type==="exhibitors"){this.closeExhibitors();return}if(t.menu){r.closeMenu(t),this.resetSearchBox();return}if(this.searchBoxMode==="search"&&!t.details&&this.searchText){this.setSearchText(""),this.isClearMode=!0,this.clearActiveFilters();return}r.returnToSearch(t,!1),this.searchText="",this.resetSearchBox(),t.details=null,this.clearActiveFilters()}clearActiveFilters(){this.rootStore.searchButtonsStore.setPoiFilterId(null),this.rootStore.uiState.selectedPoiTypeFilters=[],this.rootStore.uiState.selectedCategoryFilters=[],this.rootStore.categoryFilterStore.state.selectedItems=[],this.rootStore.categoryFilterStore.state.pendingItems=[],this.rootStore.searchButtonsStore.searchShortcutState.activeParentId=null,this.rootStore.searchButtonsStore.searchShortcutState.activeChildren.clear(),this.rootStore.searchButtonsStore.searchShortcutState.isShortcutsVisible=!1,this.rootStore.urlFilterManager&&this.rootStore.urlFilterManager.isInitialized&&this.rootStore.urlFilterManager.clearAllFilters()}handleSearchAction(){this.isFocused||this.setFocused(!0)}openOverlayWithoutInputFocus(){this.skipInputFocus=!0,this.isFocused=!0,this.isClearMode=!1,this.uiState.searchFocused=!0,this.uiState.searchClearMode=!1,this.uiState.desiredOverlaySize="full"}closeSessions(){this.searchText="",r.returnToSearch(this.uiState,!1),this.uiState.details=null,r.resetActiveListIndex(this.uiState),this.uiState.selectedTrack=null,this.rootStore.searchButtonsStore.setSubButtonId(null),this.rootStore.searchButtonsStore.hideSubButtons()}closeExhibitors(){this.searchText="",r.returnToSearch(this.uiState,!1),this.uiState.details=null,r.resetActiveListIndex(this.uiState)}resetSearchBox(){this.setFocused(!1),this.isClearMode=!1,this.syncWithUIState()}syncWithUIState(){this.searchText=(this.uiState.list.type==="search"||this.uiState.list.type==="exhibitors")&&this.uiState.list.text||"",this.isFocused=this.uiState.searchFocused,this.isClearMode=this.uiState.searchClearMode}get actionButtonIcon(){return this.shouldShowSearchInput?this.shouldShowCloseButton?"icon-close":"icon-search":"icon-close"}clearAndSelectSearch(){this.selectSearch(""),this.setFocused(!1)}get backMode(){return this.uiState.list.type==="speakers"||this.uiState.list.type==="sessions"||this.uiState.list.type==="tours"||this.uiState.list.type==="exhibitors"||this.uiState.hasAppliedFilters?"back":this.shouldShowSearchInput&&!this.searchText?"menu":"back"}get isMobileDetailsMode(){return window.innerWidth<he&&this.uiState.details!==null&&this.uiState.overlaySize==="full"&&!(this.uiState.details instanceof S)}get shouldShowTitle(){return!this.shouldShowSearchInput}get searchState(){return{text:this.searchText,isFocused:this.isFocused,isClearMode:this.isClearMode,mode:this.searchBoxMode,title:this.searchBoxConfig.title,subtitle:this.searchBoxConfig.subtitle,badge:this.searchBoxConfig.badge,icon:this.searchBoxConfig.icon}}}})();export default ne;
1
+ import{__esDecorate as s,__runInitializers as u}from"tslib";import{action as c,computed as l,observable as d}from"mobx";import{t as h}from"../utils/i18n";import f from"../data";import{exhibitorStore as le}from"./index";import re from"../tools/settings";import{sanitizeSearch as ce}from"../utils/sanitizeText";import{Route as S}from"./RouteStore";import{goBack as p}from"../services/routing";import{MOBILE_BREAKPOINT as he,LANGUAGE_TYPE as ne}from"../constants";class i{static closeDetails(r){return r.details?(r.details=null,!0):!1}static closeMultiPointTour(r){return r.rootStore.fp.hidePathways(),!0}static clearSearchAndFocus(r){return r.searchText?(r.setSearchText(""),r.setFocused(!0),!0):!1}static returnToSearch(r,n=!1){r.list={type:"search",text:"",focused:n}}static returnToSessions(r,n=!1){r.list={type:"sessions",text:"",focused:n}}static returnToTours(r,n=!1){r.list={type:"tours",text:"",focused:n}}static openMenu(r){r.menu=!0}static closeMenu(r){r.menu=!1}static clearListScroll(r,n){r.clearListScroll(n)}static resetActiveListIndex(r){r.activeListIndex=-1}}let ue=(()=>{let a=[],r,n=[],m=[],x,g=[],_=[],B,y=[],F=[],k,b=[],v=[],T,I,M,C,A,w,z,L,O,E,P,W,D,U,j,G,K,N,R,X,Y,H,V,$,q,J,Q,Z,ee,te,se,ae,ie;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;r=[d],x=[d],B=[d],k=[d],T=[l],I=[l],M=[l],C=[l],A=[l],w=[l],z=[l],L=[l],O=[l],E=[l],P=[l],W=[l],D=[l],U=[l],j=[c],G=[c],K=[c],N=[c],R=[c],X=[c],Y=[c],H=[c],V=[c],$=[c],q=[c],J=[c],Q=[c],Z=[l],ee=[c],te=[l],se=[l],ae=[l],ie=[l],s(this,null,T,{kind:"getter",name:"searchBoxConfig",static:!1,private:!1,access:{has:e=>"searchBoxConfig"in e,get:e=>e.searchBoxConfig},metadata:t},null,a),s(this,null,I,{kind:"getter",name:"searchBoxMode",static:!1,private:!1,access:{has:e=>"searchBoxMode"in e,get:e=>e.searchBoxMode},metadata:t},null,a),s(this,null,M,{kind:"getter",name:"searchBoxTitle",static:!1,private:!1,access:{has:e=>"searchBoxTitle"in e,get:e=>e.searchBoxTitle},metadata:t},null,a),s(this,null,C,{kind:"getter",name:"searchBoxSubtitle",static:!1,private:!1,access:{has:e=>"searchBoxSubtitle"in e,get:e=>e.searchBoxSubtitle},metadata:t},null,a),s(this,null,A,{kind:"getter",name:"searchBoxBadge",static:!1,private:!1,access:{has:e=>"searchBoxBadge"in e,get:e=>e.searchBoxBadge},metadata:t},null,a),s(this,null,w,{kind:"getter",name:"searchBoxIcon",static:!1,private:!1,access:{has:e=>"searchBoxIcon"in e,get:e=>e.searchBoxIcon},metadata:t},null,a),s(this,null,z,{kind:"getter",name:"searchBoxActions",static:!1,private:!1,access:{has:e=>"searchBoxActions"in e,get:e=>e.searchBoxActions},metadata:t},null,a),s(this,null,L,{kind:"getter",name:"shouldShowSearchInput",static:!1,private:!1,access:{has:e=>"shouldShowSearchInput"in e,get:e=>e.shouldShowSearchInput},metadata:t},null,a),s(this,null,O,{kind:"getter",name:"shouldShowCloseButton",static:!1,private:!1,access:{has:e=>"shouldShowCloseButton"in e,get:e=>e.shouldShowCloseButton},metadata:t},null,a),s(this,null,E,{kind:"getter",name:"closeButtonAction",static:!1,private:!1,access:{has:e=>"closeButtonAction"in e,get:e=>e.closeButtonAction},metadata:t},null,a),s(this,null,P,{kind:"getter",name:"shouldShowShadow",static:!1,private:!1,access:{has:e=>"shouldShowShadow"in e,get:e=>e.shouldShowShadow},metadata:t},null,a),s(this,null,W,{kind:"getter",name:"placeholder",static:!1,private:!1,access:{has:e=>"placeholder"in e,get:e=>e.placeholder},metadata:t},null,a),s(this,null,D,{kind:"getter",name:"searchBoxClass",static:!1,private:!1,access:{has:e=>"searchBoxClass"in e,get:e=>e.searchBoxClass},metadata:t},null,a),s(this,null,U,{kind:"getter",name:"ariaLabel",static:!1,private:!1,access:{has:e=>"ariaLabel"in e,get:e=>e.ariaLabel},metadata:t},null,a),s(this,null,j,{kind:"method",name:"selectSearch",static:!1,private:!1,access:{has:e=>"selectSearch"in e,get:e=>e.selectSearch},metadata:t},null,a),s(this,null,G,{kind:"method",name:"selectSearchAndFocus",static:!1,private:!1,access:{has:e=>"selectSearchAndFocus"in e,get:e=>e.selectSearchAndFocus},metadata:t},null,a),s(this,null,K,{kind:"method",name:"setSearchText",static:!1,private:!1,access:{has:e=>"setSearchText"in e,get:e=>e.setSearchText},metadata:t},null,a),s(this,null,N,{kind:"method",name:"setFocused",static:!1,private:!1,access:{has:e=>"setFocused"in e,get:e=>e.setFocused},metadata:t},null,a),s(this,null,R,{kind:"method",name:"handleBackAction",static:!1,private:!1,access:{has:e=>"handleBackAction"in e,get:e=>e.handleBackAction},metadata:t},null,a),s(this,null,X,{kind:"method",name:"closeSearch",static:!1,private:!1,access:{has:e=>"closeSearch"in e,get:e=>e.closeSearch},metadata:t},null,a),s(this,null,Y,{kind:"method",name:"clearActiveFilters",static:!1,private:!1,access:{has:e=>"clearActiveFilters"in e,get:e=>e.clearActiveFilters},metadata:t},null,a),s(this,null,H,{kind:"method",name:"handleSearchAction",static:!1,private:!1,access:{has:e=>"handleSearchAction"in e,get:e=>e.handleSearchAction},metadata:t},null,a),s(this,null,V,{kind:"method",name:"openOverlayWithoutInputFocus",static:!1,private:!1,access:{has:e=>"openOverlayWithoutInputFocus"in e,get:e=>e.openOverlayWithoutInputFocus},metadata:t},null,a),s(this,null,$,{kind:"method",name:"closeSessions",static:!1,private:!1,access:{has:e=>"closeSessions"in e,get:e=>e.closeSessions},metadata:t},null,a),s(this,null,q,{kind:"method",name:"closeExhibitors",static:!1,private:!1,access:{has:e=>"closeExhibitors"in e,get:e=>e.closeExhibitors},metadata:t},null,a),s(this,null,J,{kind:"method",name:"resetSearchBox",static:!1,private:!1,access:{has:e=>"resetSearchBox"in e,get:e=>e.resetSearchBox},metadata:t},null,a),s(this,null,Q,{kind:"method",name:"syncWithUIState",static:!1,private:!1,access:{has:e=>"syncWithUIState"in e,get:e=>e.syncWithUIState},metadata:t},null,a),s(this,null,Z,{kind:"getter",name:"actionButtonIcon",static:!1,private:!1,access:{has:e=>"actionButtonIcon"in e,get:e=>e.actionButtonIcon},metadata:t},null,a),s(this,null,ee,{kind:"method",name:"clearAndSelectSearch",static:!1,private:!1,access:{has:e=>"clearAndSelectSearch"in e,get:e=>e.clearAndSelectSearch},metadata:t},null,a),s(this,null,te,{kind:"getter",name:"backMode",static:!1,private:!1,access:{has:e=>"backMode"in e,get:e=>e.backMode},metadata:t},null,a),s(this,null,se,{kind:"getter",name:"isMobileDetailsMode",static:!1,private:!1,access:{has:e=>"isMobileDetailsMode"in e,get:e=>e.isMobileDetailsMode},metadata:t},null,a),s(this,null,ae,{kind:"getter",name:"shouldShowTitle",static:!1,private:!1,access:{has:e=>"shouldShowTitle"in e,get:e=>e.shouldShowTitle},metadata:t},null,a),s(this,null,ie,{kind:"getter",name:"searchState",static:!1,private:!1,access:{has:e=>"searchState"in e,get:e=>e.searchState},metadata:t},null,a),s(null,null,r,{kind:"field",name:"searchText",static:!1,private:!1,access:{has:e=>"searchText"in e,get:e=>e.searchText,set:(e,o)=>{e.searchText=o}},metadata:t},n,m),s(null,null,x,{kind:"field",name:"isFocused",static:!1,private:!1,access:{has:e=>"isFocused"in e,get:e=>e.isFocused,set:(e,o)=>{e.isFocused=o}},metadata:t},g,_),s(null,null,B,{kind:"field",name:"isClearMode",static:!1,private:!1,access:{has:e=>"isClearMode"in e,get:e=>e.isClearMode,set:(e,o)=>{e.isClearMode=o}},metadata:t},y,F),s(null,null,k,{kind:"field",name:"skipInputFocus",static:!1,private:!1,access:{has:e=>"skipInputFocus"in e,get:e=>e.skipInputFocus,set:(e,o)=>{e.skipInputFocus=o}},metadata:t},b,v),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}rootStore=u(this,a);searchText=u(this,n,"");isFocused=(u(this,m),u(this,g,!1));isClearMode=(u(this,_),u(this,y,!1));skipInputFocus=(u(this,F),u(this,b,!1));constructor(t){u(this,v),this.rootStore=t}get uiState(){return this.rootStore.uiState}get searchBoxConfig(){return this.uiState.searchBoxConfig}get searchBoxMode(){return this.searchBoxConfig.mode}get searchBoxTitle(){return this.searchBoxConfig.title}get searchBoxSubtitle(){return this.searchBoxConfig.subtitle}get searchBoxBadge(){return this.searchBoxConfig.badge}get searchBoxIcon(){return this.searchBoxConfig.icon}get searchBoxActions(){return this.uiState.searchBoxActions}get shouldShowSearchInput(){return this.searchBoxMode==="search"}get shouldShowCloseButton(){const{menu:t,details:e,list:o}=this.uiState;return!this.shouldShowSearchInput||o.type==="sessions"||o.type==="tours"||o.type==="speakers"||o.type==="exhibitors"?!0:t||e!==null||!!this.searchText||this.isClearMode||this.isFocused}get closeButtonAction(){return!this.shouldShowSearchInput||this.searchBoxMode==="details"||this.uiState.list.type==="sessions"||this.uiState.list.type==="speakers"||this.uiState.list.type==="exhibitors"?"close":this.searchText?"clear":"close"}get shouldShowShadow(){const{menu:t,details:e,list:o}=this.uiState,oe=o.type==="search"&&!!o.text;return!(this.rootStore.fp.alwaysShowSidebar||t||e!==null||o.type!=="search"||oe||this.isFocused||this.uiState.heatmap)}get placeholder(){const{list:t,heatmapYah:e}=this.uiState;if(t.type==="sessions")return h("Search sessions");if(t.type==="tours")return h("Search Guided Tours");if(t.type==="exhibitors")return h("Search exhibitors");if(t.type==="speakers")return h("Search speakers");if(re.EXPO.startsWith("lenzerheidemotorclassics"))return"SUCHE";if(re.EXPO.startsWith("jetlag"))return"Search location or artist";if(e)return h("Find scans above");if(this.uiState.hasAppliedFilters)return h("Search");const o=f.boothTerm.toLowerCase();return!f.searchText&&le.exhibitors.length===0?h("Search {{boothTerm}}",{boothTerm:o}):f.searchText||h("Search")}get searchBoxClass(){return{"is-details":this.searchBoxMode==="details"&&!(this.uiState.details instanceof S),"is-interface":this.searchBoxMode==="interface","has-shadow":this.shouldShowShadow,"has-subtitle":!!this.searchBoxConfig.subtitle,"has-badge":!!this.searchBoxConfig.badge,"has-icon":!!this.searchBoxConfig.icon,"is-overlay-full":this.uiState.isOverlayOpen&&this.uiState.overlaySize==="full","is-featured-exhibitor":this.uiState.isFeaturedExhibitorActive,"is-route":this.uiState.details instanceof S,"is-guided-tours":this.uiState.isGuidedToursActive,"is-overlay-scrolled":this.uiState.isOverlayScrolled,"overlay-pulse":this.uiState.kiosk&&this.uiState.inIdle&&!this.uiState.setKioskModeEnabled}}get ariaLabel(){return!this.shouldShowSearchInput||this.searchBoxMode==="details"?h("Close"):this.searchText?h("Clear search"):h("Close")}selectSearch(t){window.__resett&&window.__resett(),this.uiState.details=null;const e=ce(t||"",Object.keys(this.uiState.mapSettings).map(o=>`${o}=`));this.setSearchText(e),this.uiState.activeListIndex=-1}selectSearchAndFocus(t){this.selectSearch(t),this.setFocused(!0)}setSearchText(t){this.searchText=t,this.uiState.hasAppliedFilters?this.rootStore.moveToList():this.uiState.centerMap=!0,this.uiState.activeListIndex=t?0:-1,this.uiState.list.type!=="sessions"&&this.uiState.list.type!=="tours"&&this.uiState.list.type!=="speakers"&&this.uiState.list.type!=="exhibitors"?this.uiState.list={type:"search",text:t,focused:this.isFocused}:this.uiState.list.type==="exhibitors"&&(this.uiState.list={type:"exhibitors",text:t,focused:this.isFocused}),this.uiState.searchClearMode=this.isClearMode}setFocused(t){this.isFocused=t,this.isClearMode=!1,this.skipInputFocus=!1,this.uiState.searchFocused=t,this.uiState.searchClearMode=!1,this.uiState.desiredOverlaySize="full"}handleBackAction(){const{uiState:t}=this,{list:e}=t;if(t.desiredOverlaySize="full",e.type==="route-planner"){this.rootStore.routePlannerStore.close(),this.rootStore.selectBookmarks(),p();return}if(e.type==="multi-point-tour"&&!t.details){i.returnToTours(t,!1),this.rootStore.fp.hidePathways();return}if(t.details){t.details=null,p();return}if(t.menu){e.type==="sessions"?t.list={type:"sessions",text:"",focused:!0}:e.type==="exhibitors"?t.list={type:"exhibitors",text:"",focused:!0}:t.list={type:"search",text:"",focused:!0},this.setFocused(!0),this.isClearMode=!0,i.closeMenu(t);return}if(e.type==="tours"&&t.details instanceof S){t.details=null;return}if(e.type==="sessions"||e.type==="tours"||e.type==="exhibitors"||this.uiState.hasAppliedFilters){if(i.closeDetails(t))return;this.clearActiveFilters(),i.returnToSearch(t,!1),this.selectSearchAndFocus();return}switch(e.type){case"filter":t.details=null;return;case"multi-point-tour":this.rootStore.fp.hidePathways(),i.closeDetails(t)?i.returnToTours(t,!1):p();return;case"category":this.rootStore.selectCategory(e.category);return;case"speakers":if(i.closeDetails(t))return;i.returnToSessions(t,!1);return;case"bookmarks":case"visited":if(i.closeDetails(t))return;this.selectSearchAndFocus();return;case ne:i.returnToSearch(t,!1),i.openMenu(t);return}i.closeDetails(t)||i.clearSearchAndFocus(this)||i.openMenu(t)}closeSearch(){const{uiState:t}=this,{list:e}=t;if(e.type==="route-planner"){this.rootStore.routePlannerStore.close(),i.returnToSearch(t,!1),this.resetSearchBox();return}if(i.closeDetails(t),i.clearListScroll(t,e.type),i.closeMultiPointTour(t),e.type==="bookmarks"){i.returnToSearch(t,!1),this.resetSearchBox();return}if(t.selectedCategory){i.returnToSearch(t,!1),this.resetSearchBox();return}if(e.type==="sessions"){this.closeSessions();return}if(e.type==="exhibitors"){this.closeExhibitors();return}if(t.menu){i.closeMenu(t),this.resetSearchBox();return}if(this.searchBoxMode==="search"&&!t.details&&this.searchText){this.setSearchText(""),this.isClearMode=!0,this.clearActiveFilters();return}i.returnToSearch(t,!1),this.searchText="",this.resetSearchBox(),t.details=null,this.clearActiveFilters()}clearActiveFilters(){this.rootStore.searchButtonsStore.setPoiFilterId(null),this.rootStore.uiState.selectedPoiTypeFilters=[],this.rootStore.uiState.selectedCategoryFilters=[],this.rootStore.categoryFilterStore.state.selectedItems=[],this.rootStore.categoryFilterStore.state.pendingItems=[],this.rootStore.searchButtonsStore.searchShortcutState.activeParentId=null,this.rootStore.searchButtonsStore.searchShortcutState.activeChildren.clear(),this.rootStore.searchButtonsStore.searchShortcutState.isShortcutsVisible=!1,this.rootStore.urlFilterManager&&this.rootStore.urlFilterManager.isInitialized&&this.rootStore.urlFilterManager.clearAllFilters()}handleSearchAction(){this.isFocused||this.setFocused(!0)}openOverlayWithoutInputFocus(){this.skipInputFocus=!0,this.isFocused=!0,this.isClearMode=!1,this.uiState.searchFocused=!0,this.uiState.searchClearMode=!1,this.uiState.desiredOverlaySize="full"}closeSessions(){this.searchText="",i.returnToSearch(this.uiState,!1),this.uiState.details=null,i.resetActiveListIndex(this.uiState),this.uiState.selectedTrack=null,this.rootStore.searchButtonsStore.setSubButtonId(null),this.rootStore.searchButtonsStore.hideSubButtons()}closeExhibitors(){this.searchText="",i.returnToSearch(this.uiState,!1),this.uiState.details=null,i.resetActiveListIndex(this.uiState)}resetSearchBox(){this.setFocused(!1),this.isClearMode=!1,this.syncWithUIState()}syncWithUIState(){this.searchText=(this.uiState.list.type==="search"||this.uiState.list.type==="exhibitors")&&this.uiState.list.text||"",this.isFocused=this.uiState.searchFocused,this.isClearMode=this.uiState.searchClearMode}get actionButtonIcon(){return this.shouldShowSearchInput?this.shouldShowCloseButton?"icon-close":"icon-search":"icon-close"}clearAndSelectSearch(){this.selectSearch(""),this.setFocused(!1)}get backMode(){return this.uiState.list.type==="speakers"||this.uiState.list.type==="sessions"||this.uiState.list.type==="tours"||this.uiState.list.type==="exhibitors"||this.uiState.hasAppliedFilters?"back":this.shouldShowSearchInput&&!this.searchText?"menu":"back"}get isMobileDetailsMode(){return window.innerWidth<he&&this.uiState.details!==null&&this.uiState.overlaySize==="full"&&!(this.uiState.details instanceof S)}get shouldShowTitle(){return!this.shouldShowSearchInput}get searchState(){return{text:this.searchText,isFocused:this.isFocused,isClearMode:this.isClearMode,mode:this.searchBoxMode,title:this.searchBoxConfig.title,subtitle:this.searchBoxConfig.subtitle,badge:this.searchBoxConfig.badge,icon:this.searchBoxConfig.icon}}}})();export default ue;
@@ -70,7 +70,6 @@ export default class UIState {
70
70
  monochrome: boolean;
71
71
  heatmap: boolean;
72
72
  heatmapYah: boolean;
73
- rtl: boolean;
74
73
  rootElement: HTMLDivElement;
75
74
  debugCircles: {
76
75
  x: number;
@@ -125,6 +124,7 @@ export default class UIState {
125
124
  get activePathwayLayers(): string[];
126
125
  get highlightedBooths(): ReadonlySet<string>;
127
126
  constructor(rootStore: RootStore);
127
+ get rtl(): boolean;
128
128
  get noOverlay(): boolean;
129
129
  get onBoothClick(): (e: FloorPlanBoothClickEvent) => void;
130
130
  get onMarkerClick(): (e: import("..").FloorPlanMarkerEvent) => void;
@@ -186,12 +186,12 @@ export default class UIState {
186
186
  get visibility(): Visibility;
187
187
  setVisibility(visibility: Visibility): void;
188
188
  toggleMapOverlay(): void;
189
- resetRtl(): void;
190
189
  changeZoom(zoom: number): void;
191
190
  zoomIn(): void;
192
191
  zoomOut(): void;
193
192
  fitBounds(): void;
194
193
  get previewMode(): boolean;
194
+ get viewerMode(): boolean;
195
195
  get selectedEventItem(): EventItem | null;
196
196
  /**
197
197
  * @warning If the property is of a numeric type, set the default value to be numeric, otherwise they will be cast incorrectly.