@expofp/floorplan 3.13.0 → 3.13.2

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 (171) hide show
  1. package/dist/browser/{Button-BhFl-di8.js → Button-C5DLguTW.js} +6 -6
  2. package/dist/browser/{CookieConsent-sa6NrKxH.js → CookieConsent-CPXxoJkz.js} +8 -8
  3. package/dist/browser/{Debug-C9cxUup2.js → Debug-bxMz-HDF.js} +8 -8
  4. package/dist/browser/{Demo-Ddm9RP_A.js → Demo-CGCZqU_8.js} +10 -10
  5. package/dist/browser/{Free-rUcFT9c4.js → Free-I-EGiu3o.js} +10 -10
  6. package/dist/browser/{Gallery-DiQ8516Y.js → Gallery-Bce2fubu.js} +31 -25
  7. package/dist/browser/{GpsLoader-Dg3oPXFb.js → GpsLoader-CnPH3rxE.js} +12 -12
  8. package/dist/browser/{KioskStore-DXzJYJDf.js → KioskStore-K0Ps7wq6.js} +4 -4
  9. package/dist/browser/{MaplibreAdapter-CyrBeOGN.js → MaplibreAdapter-DKa1N9-7.js} +85 -57
  10. package/dist/browser/{ModalContainer-De7wWR5x.js → ModalContainer-BxCJTxBS.js} +11 -11
  11. package/dist/browser/{PermissionNotice-CZ2zOZpC.js → PermissionNotice-BS53dDaS.js} +7 -7
  12. package/dist/browser/{SetKioskMode-CADu-Nec.js → SetKioskMode-P2g_TnCr.js} +10 -10
  13. package/dist/browser/{ShowKiosk-DCb39wY6.js → ShowKiosk-Bz-7t-PL.js} +12 -12
  14. package/dist/browser/{TouchHand-BfZmlSSQ.js → TouchHand-Dm3c6gpk.js} +5 -5
  15. package/dist/browser/{ViewerMenuPanel-MrTdl0Lk.js → ViewerMenuPanel-COyljU8V.js} +10 -10
  16. package/dist/browser/{add-debug-secret-listener-BbMMQOGn.js → add-debug-secret-listener-DQjjtobD.js} +1 -1
  17. package/dist/browser/{reset-all-settings-CSD5_eeL.js → adopt-global-settings-DIJsf94E.js} +12 -17
  18. package/dist/browser/{boolean-editor-CklOhr36.js → boolean-editor-D4Y66mgk.js} +46 -46
  19. package/dist/browser/{bootIntercom-CGiDjnZs.js → bootIntercom-DUPbX22l.js} +3 -3
  20. package/dist/browser/{booth-by-xy-ByPe7dOB.js → booth-by-xy-DKyMJwg9.js} +13 -13
  21. package/dist/browser/bundle.json +67 -70
  22. package/dist/browser/{classnames-Dg3Epqr5.js → classnames-CTiheKEO.js} +2 -2
  23. package/dist/browser/{client-BtIR_QJ0.js → client-B0g0Q0fu.js} +9 -9
  24. package/dist/browser/{components-Ba7imFfV.js → components-DUbHmBQ6.js} +60 -53
  25. package/dist/browser/{debug-overlay-Mgkh8CCK.js → debug-overlay-CKXL3Z9z.js} +470 -464
  26. package/dist/browser/{debug-ui-DLG8EKHO.js → debug-ui-D2GPuJSX.js} +7 -7
  27. package/dist/browser/{dist-B2eHvCOU.js → dist-BFVoy_zB.js} +7 -7
  28. package/dist/browser/{dist-ByAJEdRV.js → dist-CFY_dc-C.js} +5 -5
  29. package/dist/browser/{dist-Dd2UZ1cI.js → dist-CZH-D_bo.js} +66 -67
  30. package/dist/browser/{efp-debug-init-BCsVUzwy.js → efp-debug-init-pd2smy4A.js} +4 -4
  31. package/dist/browser/{enum-editor-DGQxevil.js → enum-editor-a07SOXXi.js} +5 -5
  32. package/dist/browser/{es5-cfKynydw.js → es5-jDwWZhmf.js} +2 -2
  33. package/dist/browser/{event-not-found-BJLLcNqO.js → event-not-found-CPqO_ew-.js} +1 -1
  34. package/dist/browser/{exports-BQHYfgvY.js → exports-8JcxTO7_.js} +567 -566
  35. package/dist/browser/{favicon-C56bzaeG.js → favicon-BhTDecsz.js} +1 -1
  36. package/dist/browser/{fetch-retry.umd-DYC2sEmH.js → fetch-retry.umd-BuEcG130.js} +2 -2
  37. package/dist/browser/{flex-8VuyKxuf.js → flex-FVc6l8VM.js} +17 -17
  38. package/dist/browser/{floorplan.loader-B9Jv3g5N.js → floorplan.loader-DM3BoMUa.js} +1372 -1298
  39. package/dist/browser/{floorplan.ready-Cnxr8xZd.js → floorplan.ready-DQAk0-bE.js} +294 -294
  40. package/dist/browser/{fuse-DgPaqPDU.js → fuse-hiNWVTid.js} +2 -2
  41. package/dist/browser/{i18n-DL3k5TYE.js → i18n-DmUQ2csh.js} +2399 -2412
  42. package/dist/browser/index.js +36 -36
  43. package/dist/browser/{index.module-DvMglRjg.js → index.module-Ce5K5GHH.js} +6 -6
  44. package/dist/browser/{integrateKiosk-DqfQtnQ5.js → integrateKiosk-DLY98yHT.js} +4 -4
  45. package/dist/browser/{is-webview-CYXkFxGI.js → is-webview-DYW7jMPo.js} +1 -1
  46. package/dist/browser/{jsx-runtime-Ddgd7eiz.js → jsx-runtime-Cn7VZCRr.js} +4 -4
  47. package/dist/browser/{lib-Ba7o5H8-.js → lib-DKxIjoGs.js} +155 -112
  48. package/dist/browser/{loadImage-sIGoQ_pR.js → loadImage-CFRF6nKm.js} +5 -5
  49. package/dist/browser/{logDeviceInfo-DlAlNCzD.js → logDeviceInfo-B2xD643p.js} +9 -9
  50. package/dist/browser/{main-BUG7EnSp.js → main-BE7HSdfx.js} +1 -1
  51. package/dist/browser/{mobx-CjGP1jW0.js → mobx-Dss6V0uv.js} +5 -5
  52. package/dist/browser/{optional-boolean-editor-Duqb7gc6.js → optional-boolean-editor-BDWvD6R3.js} +4 -4
  53. package/dist/browser/{optional-enum-editor-DsJC_Z9B.js → optional-enum-editor-DzJSD274.js} +5 -5
  54. package/dist/browser/{optional-string-editor-CDPA6AbE.js → optional-string-editor-DvQrsAvN.js} +5 -5
  55. package/dist/browser/{particles.min-Cw7MNnR7.js → particles.min-0GINFlmD.js} +2 -2
  56. package/dist/browser/{react-jeXnPF9E.js → react-CQIXbbli.js} +5 -5
  57. package/dist/browser/{react-dom-Du74Uwxl.js → react-dom-DB3HP1L3.js} +6 -6
  58. package/dist/browser/{rolldown-runtime-DE59zyqc.js → rolldown-runtime-CBbNE2KV.js} +1 -1
  59. package/dist/browser/select-DkvD6Ont.js +1367 -0
  60. package/dist/browser/{settings-CETkuvKR.js → settings-3RnELfMa.js} +3 -3
  61. package/dist/browser/{settings-item-BCaZImcD.js → settings-item-wgFS4pwq.js} +16 -16
  62. package/dist/browser/{store-Sol8yqmO.js → store-Bh1UUDBZ.js} +3955 -3943
  63. package/dist/browser/{string-editor-DkEYMW6l.js → string-editor-DIG3V4Iv.js} +5 -5
  64. package/dist/browser/{text-field-CPJjFaAn.js → text-field-Ce1nLpTL.js} +25 -25
  65. package/dist/browser/{theme-CN0bL8JF.js → theme-DE94e68B.js} +949 -946
  66. package/dist/browser/{ui-CLJ3PDlT.js → ui-DKrc1LYz.js} +11 -11
  67. package/dist/browser/{useRenderTarget-BbbTquxP.js → useRenderTarget-DwEjrRiD.js} +5 -5
  68. package/dist/esm/components/AutocompleteContainer.d.ts +1 -1
  69. package/dist/esm/components/Bookmarks.d.ts +1 -1
  70. package/dist/esm/components/Bookmarks.js +1 -1
  71. package/dist/esm/components/Booth/Booth.js +1 -1
  72. package/dist/esm/components/Category.d.ts +1 -1
  73. package/dist/esm/components/Debug.d.ts +1 -1
  74. package/dist/esm/components/Debug.js +1 -1
  75. package/dist/esm/components/ErrorBoundary.d.ts +1 -1
  76. package/dist/esm/components/ErrorBoundary.js +1 -1
  77. package/dist/esm/components/Event.js +1 -1
  78. package/dist/esm/components/Exhibitor.d.ts +1 -1
  79. package/dist/esm/components/Exhibitor.js +1 -1
  80. package/dist/esm/components/Filter.d.ts +1 -1
  81. package/dist/esm/components/Filter.js +1 -1
  82. package/dist/esm/components/Gallery/GalleryBadges/GalleryBadges.js +1 -1
  83. package/dist/esm/components/Gallery/GalleryPreLoader.js +1 -1
  84. package/dist/esm/components/Kiosk/KioskStore.js +1 -1
  85. package/dist/esm/components/Kiosk/SetKiosk/SetKioskComponent.js +1 -1
  86. package/dist/esm/components/Map/Map.js +1 -1
  87. package/dist/esm/components/Map/drawing/config/BoothDrawerBase.js +1 -1
  88. package/dist/esm/components/Map/drawing/config/BoothShape.js +1 -1
  89. package/dist/esm/components/Map/drawing/config/TextFitter.js +1 -1
  90. package/dist/esm/components/Map/drawing/config/config-booth-bg.js +1 -1
  91. package/dist/esm/components/Map/drawing/config/config-booth-bookmark.js +1 -1
  92. package/dist/esm/components/Map/drawing/config/config-booth-border.js +1 -1
  93. package/dist/esm/components/Map/drawing/config/config-booth-labels-special.js +2 -2
  94. package/dist/esm/components/Map/drawing/config/config-booth-labels.js +1 -1
  95. package/dist/esm/components/Map/traffic/UpdateQueue.js +1 -1
  96. package/dist/esm/components/Map/traffic/useBuildRoute.js +1 -1
  97. package/dist/esm/components/Menu.d.ts +1 -1
  98. package/dist/esm/components/Menu.js +1 -1
  99. package/dist/esm/components/ModalContainer.d.ts +4 -4
  100. package/dist/esm/components/RebookingNotesContainer.d.ts +1 -1
  101. package/dist/esm/components/RebookingRadioGroupContainer.d.ts +1 -1
  102. package/dist/esm/components/RoutePlanner/RoutePlannerStopItem.js +1 -1
  103. package/dist/esm/components/Schedule.js +1 -1
  104. package/dist/esm/components/Search.d.ts +1 -1
  105. package/dist/esm/components/Search.js +1 -1
  106. package/dist/esm/components/Toast/ToastContainer.d.ts +1 -1
  107. package/dist/esm/components/TourPoints.d.ts +1 -1
  108. package/dist/esm/components/Tours.js +1 -1
  109. package/dist/esm/components/Visited.d.ts +1 -1
  110. package/dist/esm/components/WayfindingTemplate.js +1 -1
  111. package/dist/esm/components/Ws.d.ts +1 -1
  112. package/dist/esm/floorplan.loader.js +1 -1
  113. package/dist/esm/floorplan.ready.js +1 -1
  114. package/dist/esm/renderer/HandlerRegistry.js +1 -1
  115. package/dist/esm/renderer/RendererService.js +1 -1
  116. package/dist/esm/services/URLFilterManager.js +1 -1
  117. package/dist/esm/store/BaseFilterStore.js +1 -1
  118. package/dist/esm/store/BookmarksStore.js +2 -2
  119. package/dist/esm/store/BoothStore.js +1 -1
  120. package/dist/esm/store/CategoryFilterStore.js +1 -1
  121. package/dist/esm/store/CategoryStore.d.ts +1 -1
  122. package/dist/esm/store/CategoryStore.js +1 -1
  123. package/dist/esm/store/EventStore.d.ts +2 -2
  124. package/dist/esm/store/EventStore.js +1 -1
  125. package/dist/esm/store/ExhibitorStore.d.ts +1 -1
  126. package/dist/esm/store/ExhibitorStore.js +1 -1
  127. package/dist/esm/store/FuzzySearchEngineStore.js +1 -1
  128. package/dist/esm/store/HeatmapStore.d.ts +1 -1
  129. package/dist/esm/store/HeatmapStore.js +1 -1
  130. package/dist/esm/store/IntercomStore.js +1 -1
  131. package/dist/esm/store/LayerStore.js +1 -1
  132. package/dist/esm/store/MaplibreStore.js +1 -1
  133. package/dist/esm/store/PoiTypeStore.js +1 -1
  134. package/dist/esm/store/RootStore.js +1 -1
  135. package/dist/esm/store/RoutePlannerStore.js +1 -1
  136. package/dist/esm/store/RouteStore.js +1 -1
  137. package/dist/esm/store/SearchStore.d.ts +1 -1
  138. package/dist/esm/store/SearchStore.js +1 -1
  139. package/dist/esm/store/SessionsFilterStore.js +1 -1
  140. package/dist/esm/store/ShortcutRegistry.js +1 -1
  141. package/dist/esm/store/SpeakerFilterStore.js +1 -1
  142. package/dist/esm/store/SpeakerStore.d.ts +2 -2
  143. package/dist/esm/store/SpeakerStore.js +1 -1
  144. package/dist/esm/store/SubButtonRegistry.js +1 -1
  145. package/dist/esm/store/ToursStore.js +1 -1
  146. package/dist/esm/store/UIState.d.ts +2 -2
  147. package/dist/esm/store/UIState.js +1 -1
  148. package/dist/esm/store/providers/SearchShortcutProvider.js +1 -1
  149. package/dist/esm/store/providers/SessionsShortcutProvider.js +1 -1
  150. package/dist/esm/store/providers/SessionsSubButtonProvider.js +1 -1
  151. package/dist/esm/store/providers/SpeakerShortcutProvider.js +1 -1
  152. package/dist/esm/store/search-buttons/SearchButtonsActions.js +1 -1
  153. package/dist/esm/store/search-buttons/SearchButtonsFactory.js +1 -1
  154. package/dist/esm/store/search-buttons/SearchButtonsFilters.js +1 -1
  155. package/dist/esm/store/search-buttons/SearchButtonsState.js +1 -1
  156. package/dist/esm/store/search-buttons/SearchButtonsStore.js +1 -1
  157. package/dist/esm/store/search-buttons/constants.d.ts +8 -8
  158. package/dist/esm/tools/expofpUrl.d.ts +2 -2
  159. package/dist/esm/tools/logger.js +1 -1
  160. package/dist/esm/tools/settings.js +1 -1
  161. package/dist/esm/ui/Autocomplete/Autocomplete.js +1 -1
  162. package/dist/esm/ui/EntityItem/EntityItem.js +1 -1
  163. package/dist/esm/ui/EventBadge/EventBadge.js +1 -1
  164. package/dist/esm/ui/Share/Share.js +1 -1
  165. package/dist/esm/utils/dimming.d.ts +1 -1
  166. package/dist/esm/utils/is-from-designer.d.ts +1 -1
  167. package/dist/esm/utils/silence-mobx-react-lite-warning.d.ts +1 -0
  168. package/dist/esm/utils/silence-mobx-react-lite-warning.js +1 -1
  169. package/package.json +17 -17
  170. package/dist/browser/prop-types-BYN2smyR.js +0 -57
  171. package/dist/browser/select-jZKJ9MVb.js +0 -1360
@@ -38,13 +38,13 @@ export declare class EventItem {
38
38
  readonly speakers: Speaker[];
39
39
  readonly tracks: Track[];
40
40
  readonly entity: {
41
- readonly type: "event";
41
+ readonly type: 'event';
42
42
  };
43
43
  readonly slug: string;
44
44
  bookmarked: boolean;
45
45
  visited: boolean;
46
46
  constructor(id: number, externalId: string, boothId: number, name: string, description: string, startDate: string, endDate: string, logoFile?: string | undefined, speakers?: Speaker[], tracks?: Track[], entity?: {
47
- readonly type: "event";
47
+ readonly type: 'event';
48
48
  });
49
49
  get isEnded(): boolean;
50
50
  get hasSpeakers(): boolean;
@@ -1 +1 @@
1
- import{__esDecorate as o,__runInitializers as g}from"tslib";import{action as D,computed as d,observable as I}from"mobx";import{generateUniqueSlug as w}from"../tools/slug";let y=(()=>{let n=[],m,u,v,h,f,_,i,r,c,k,p;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;m=[d],u=[d],v=[d],h=[d],f=[d],_=[d],i=[d],r=[d],c=[d],k=[D],p=[D],o(this,null,m,{kind:"getter",name:"bookmarked",static:!1,private:!1,access:{has:e=>"bookmarked"in e,get:e=>e.bookmarked},metadata:t},null,n),o(this,null,u,{kind:"getter",name:"visited",static:!1,private:!1,access:{has:e=>"visited"in e,get:e=>e.visited},metadata:t},null,n),o(this,null,v,{kind:"getter",name:"tracks",static:!1,private:!1,access:{has:e=>"tracks"in e,get:e=>e.tracks},metadata:t},null,n),o(this,null,h,{kind:"getter",name:"venues",static:!1,private:!1,access:{has:e=>"venues"in e,get:e=>e.venues},metadata:t},null,n),o(this,null,f,{kind:"getter",name:"pastEvents",static:!1,private:!1,access:{has:e=>"pastEvents"in e,get:e=>e.pastEvents},metadata:t},null,n),o(this,null,_,{kind:"getter",name:"futureEvents",static:!1,private:!1,access:{has:e=>"futureEvents"in e,get:e=>e.futureEvents},metadata:t},null,n),o(this,null,i,{kind:"getter",name:"liveEvents",static:!1,private:!1,access:{has:e=>"liveEvents"in e,get:e=>e.liveEvents},metadata:t},null,n),o(this,null,r,{kind:"getter",name:"todayEvents",static:!1,private:!1,access:{has:e=>"todayEvents"in e,get:e=>e.todayEvents},metadata:t},null,n),o(this,null,c,{kind:"getter",name:"tomorrowEvents",static:!1,private:!1,access:{has:e=>"tomorrowEvents"in e,get:e=>e.tomorrowEvents},metadata:t},null,n),o(this,null,k,{kind:"method",name:"replaceBookmarked",static:!1,private:!1,access:{has:e=>"replaceBookmarked"in e,get:e=>e.replaceBookmarked},metadata:t},null,n),o(this,null,p,{kind:"method",name:"replaceVisited",static:!1,private:!1,access:{has:e=>"replaceVisited"in e,get:e=>e.replaceVisited},metadata:t},null,n),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}rootStore=g(this,n);eventItems=[];constructor(t){this.rootStore=t}findByNameOrSlug(t){return this.eventItems.find(e=>e.name===t||e.slug===t||e.externalId===t)}get bookmarked(){return this.eventItems.filter(t=>t.bookmarked)}get visited(){return this.eventItems.filter(t=>t.visited)}get tracks(){const t=new Map;return this.eventItems.forEach(e=>{e.tracks.forEach(a=>{t.set(a.id,a)})}),Array.from(t.values()).sort((e,a)=>e.name.localeCompare(a.name))}getEventsByTrack(t){return this.eventItems.filter(e=>e.tracks.some(a=>a.id===t))}getEventsBySpeaker(t){return this.eventItems.filter(e=>e.speakers.some(a=>a.id===t))}get venues(){const t=new Map;return this.eventItems.forEach(e=>{if(e.boothId){const a=this.rootStore.boothStore.booths.find(l=>l.id===e.boothId);a&&t.set(a.id,a)}}),Array.from(t.values()).sort((e,a)=>e.name.localeCompare(a.name))}getEventsByVenue(t){return this.eventItems.filter(e=>e.boothId===t)}get pastEvents(){const t=new Date;return this.eventItems.filter(e=>new Date(e.endDate)<t)}get futureEvents(){const t=new Date;return this.eventItems.filter(e=>new Date(e.startDate)>t)}get liveEvents(){const t=new Date;return this.eventItems.filter(e=>{const a=new Date(e.startDate),l=new Date(e.endDate);return a<=t&&t<=l})}get todayEvents(){const t=new Date;return t.setHours(0,0,0,0),this.eventItems.filter(e=>{const a=new Date(e.startDate);return a.setHours(0,0,0,0),a.getTime()===t.getTime()})}get tomorrowEvents(){const t=new Date;return t.setDate(t.getDate()+1),t.setHours(0,0,0,0),this.eventItems.filter(e=>{const a=new Date(e.startDate);return a.setHours(0,0,0,0),a.getTime()===t.getTime()})}replaceBookmarked(t){const e=(t||[]).map(s=>this.eventItems.find(b=>b.id===s)).filter(s=>s),a=new Set(e),l=this.bookmarked.filter(s=>!a.has(s));for(const s of l)s.bookmarked=!1;for(const s of e)s.bookmarked=!0}replaceVisited(t){const e=(t||[]).map(s=>this.eventItems.find(b=>b.id===s)).filter(s=>s),a=new Set(e),l=this.visited.filter(s=>!a.has(s));for(const s of l)s.visited=!1;for(const s of e)s.visited=!0}}})();export default y;let S=(()=>{let n,m=[],u=[],v,h=[],f=[];return class{static{const i=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;n=[I],v=[I],o(null,null,n,{kind:"field",name:"bookmarked",static:!1,private:!1,access:{has:r=>"bookmarked"in r,get:r=>r.bookmarked,set:(r,c)=>{r.bookmarked=c}},metadata:i},m,u),o(null,null,v,{kind:"field",name:"visited",static:!1,private:!1,access:{has:r=>"visited"in r,get:r=>r.visited,set:(r,c)=>{r.visited=c}},metadata:i},h,f),i&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})}id;externalId;boothId;name;description;startDate;endDate;logoFile;speakers;tracks;entity;slug;bookmarked=g(this,m,!1);visited=(g(this,u),g(this,h,!1));constructor(i,r,c,k,p,E,t,e,a=[],l=[],s={type:"event"}){g(this,f),this.id=i,this.externalId=r,this.boothId=c,this.name=k,this.description=p,this.startDate=E,this.endDate=t,this.logoFile=e,this.speakers=a,this.tracks=l,this.entity=s,this.slug=w(k||`event-${i}`)}get isEnded(){return this.endDate&&new Date(this.endDate).getTime()<new Date().getTime()}get hasSpeakers(){return this.speakers.length>0}get hasTracks(){return this.tracks.length>0}get primaryTrack(){return this.tracks.length>0?this.tracks[0]:null}get speakerNames(){return this.speakers.map(i=>i.name).join(", ")}get trackNames(){return this.tracks.map(i=>i.name).join(", ")}}})();export{S as EventItem};
1
+ import{__decorate as o}from"tslib";import{action as m,computed as i,observable as u}from"mobx";import{generateUniqueSlug as k}from"../tools/slug";export default class n{constructor(t){this.eventItems=[],this.rootStore=t}findByNameOrSlug(t){return this.eventItems.find(e=>e.name===t||e.slug===t||e.externalId===t)}get bookmarked(){return this.eventItems.filter(t=>t.bookmarked)}get visited(){return this.eventItems.filter(t=>t.visited)}get tracks(){const t=new Map;return this.eventItems.forEach(e=>{e.tracks.forEach(r=>{t.set(r.id,r)})}),Array.from(t.values()).sort((e,r)=>e.name.localeCompare(r.name))}getEventsByTrack(t){return this.eventItems.filter(e=>e.tracks.some(r=>r.id===t))}getEventsBySpeaker(t){return this.eventItems.filter(e=>e.speakers.some(r=>r.id===t))}get venues(){const t=new Map;return this.eventItems.forEach(e=>{if(e.boothId){const r=this.rootStore.boothStore.booths.find(a=>a.id===e.boothId);r&&t.set(r.id,r)}}),Array.from(t.values()).sort((e,r)=>e.name.localeCompare(r.name))}getEventsByVenue(t){return this.eventItems.filter(e=>e.boothId===t)}get pastEvents(){const t=new Date;return this.eventItems.filter(e=>new Date(e.endDate)<t)}get futureEvents(){const t=new Date;return this.eventItems.filter(e=>new Date(e.startDate)>t)}get liveEvents(){const t=new Date;return this.eventItems.filter(e=>{const r=new Date(e.startDate),a=new Date(e.endDate);return r<=t&&t<=a})}get todayEvents(){const t=new Date;return t.setHours(0,0,0,0),this.eventItems.filter(e=>{const r=new Date(e.startDate);return r.setHours(0,0,0,0),r.getTime()===t.getTime()})}get tomorrowEvents(){const t=new Date;return t.setDate(t.getDate()+1),t.setHours(0,0,0,0),this.eventItems.filter(e=>{const r=new Date(e.startDate);return r.setHours(0,0,0,0),r.getTime()===t.getTime()})}replaceBookmarked(t){const e=(t||[]).map(s=>this.eventItems.find(l=>l.id===s)).filter(s=>s),r=new Set(e),a=this.bookmarked.filter(s=>!r.has(s));for(const s of a)s.bookmarked=!1;for(const s of e)s.bookmarked=!0}replaceVisited(t){const e=(t||[]).map(s=>this.eventItems.find(l=>l.id===s)).filter(s=>s),r=new Set(e),a=this.visited.filter(s=>!r.has(s));for(const s of a)s.visited=!1;for(const s of e)s.visited=!0}}o([i],n.prototype,"bookmarked",null),o([i],n.prototype,"visited",null),o([i],n.prototype,"tracks",null),o([i],n.prototype,"venues",null),o([i],n.prototype,"pastEvents",null),o([i],n.prototype,"futureEvents",null),o([i],n.prototype,"liveEvents",null),o([i],n.prototype,"todayEvents",null),o([i],n.prototype,"tomorrowEvents",null),o([m],n.prototype,"replaceBookmarked",null),o([m],n.prototype,"replaceVisited",null);export class EventItem{constructor(t,e,r,a,s,l,p,d,v=[],c=[],f={type:"event"}){this.id=t,this.externalId=e,this.boothId=r,this.name=a,this.description=s,this.startDate=l,this.endDate=p,this.logoFile=d,this.speakers=v,this.tracks=c,this.entity=f,this.bookmarked=!1,this.visited=!1,this.slug=k(a||`event-${t}`)}get isEnded(){return this.endDate&&new Date(this.endDate).getTime()<new Date().getTime()}get hasSpeakers(){return this.speakers.length>0}get hasTracks(){return this.tracks.length>0}get primaryTrack(){return this.tracks.length>0?this.tracks[0]:null}get speakerNames(){return this.speakers.map(t=>t.name).join(", ")}get trackNames(){return this.tracks.map(t=>t.name).join(", ")}}o([u],EventItem.prototype,"bookmarked",void 0),o([u],EventItem.prototype,"visited",void 0);
@@ -78,7 +78,7 @@ export declare class Exhibitor implements Omit<RawExhibitor, 'categories' | 'boo
78
78
  readonly categories: Category[];
79
79
  readonly schedule: EventItem[];
80
80
  readonly entity: {
81
- readonly type: "exhibitor";
81
+ readonly type: 'exhibitor';
82
82
  };
83
83
  }
84
84
  //# sourceMappingURL=ExhibitorStore.d.ts.map
@@ -1 +1 @@
1
- import{__esDecorate as o,__runInitializers as s}from"tslib";import{action as R,computed as g,observable as h}from"mobx";import{buildRebookingUrl as C,getRebookingToken as U}from"../tools/rebookingUrl";import w from"../tools/settings";import q from"../utils/is-debug";export var RebookingState;(function(a){a[a.Unasked=0]="Unasked",a[a.Accepted=1]="Accepted",a[a.Rejected=2]="Rejected",a[a.Undecided=3]="Undecided"})(RebookingState||(RebookingState={}));let A=(()=>{let a=[],c,u=[],b=[],k,m=[],f=[],_,v=[],p=[],x,S,y,B,I,z,d,i,l,N;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;c=[h],k=[h],_=[h],x=[g({keepAlive:!0})],S=[g({keepAlive:!0})],y=[g({keepAlive:!0})],B=[g({keepAlive:!0})],I=[g],z=[g],d=[g({keepAlive:!0})],i=[R],l=[R],N=[R],o(this,null,x,{kind:"getter",name:"exhibitorById",static:!1,private:!1,access:{has:e=>"exhibitorById"in e,get:e=>e.exhibitorById},metadata:t},null,a),o(this,null,S,{kind:"getter",name:"exhibitorByExternalId",static:!1,private:!1,access:{has:e=>"exhibitorByExternalId"in e,get:e=>e.exhibitorByExternalId},metadata:t},null,a),o(this,null,y,{kind:"getter",name:"exhibitorByName",static:!1,private:!1,access:{has:e=>"exhibitorByName"in e,get:e=>e.exhibitorByName},metadata:t},null,a),o(this,null,B,{kind:"getter",name:"exhibitorBySlug",static:!1,private:!1,access:{has:e=>"exhibitorBySlug"in e,get:e=>e.exhibitorBySlug},metadata:t},null,a),o(this,null,I,{kind:"getter",name:"bookmarked",static:!1,private:!1,access:{has:e=>"bookmarked"in e,get:e=>e.bookmarked},metadata:t},null,a),o(this,null,z,{kind:"getter",name:"visited",static:!1,private:!1,access:{has:e=>"visited"in e,get:e=>e.visited},metadata:t},null,a),o(this,null,d,{kind:"getter",name:"advertised",static:!1,private:!1,access:{has:e=>"advertised"in e,get:e=>e.advertised},metadata:t},null,a),o(this,null,i,{kind:"method",name:"replaceBookmarked",static:!1,private:!1,access:{has:e=>"replaceBookmarked"in e,get:e=>e.replaceBookmarked},metadata:t},null,a),o(this,null,l,{kind:"method",name:"replaceVisited",static:!1,private:!1,access:{has:e=>"replaceVisited"in e,get:e=>e.replaceVisited},metadata:t},null,a),o(this,null,N,{kind:"method",name:"setRebookingState",static:!1,private:!1,access:{has:e=>"setRebookingState"in e,get:e=>e.setRebookingState},metadata:t},null,a),o(null,null,c,{kind:"field",name:"highlightedByExternalIds",static:!1,private:!1,access:{has:e=>"highlightedByExternalIds"in e,get:e=>e.highlightedByExternalIds,set:(e,n)=>{e.highlightedByExternalIds=n}},metadata:t},u,b),o(null,null,k,{kind:"field",name:"rebookingStateChangeRequested",static:!1,private:!1,access:{has:e=>"rebookingStateChangeRequested"in e,get:e=>e.rebookingStateChangeRequested,set:(e,n)=>{e.rebookingStateChangeRequested=n}},metadata:t},m,f),o(null,null,_,{kind:"field",name:"rebookingStateSaved",static:!1,private:!1,access:{has:e=>"rebookingStateSaved"in e,get:e=>e.rebookingStateSaved,set:(e,n)=>{e.rebookingStateSaved=n}},metadata:t},v,p),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}rootStore=s(this,a);exhibitors=[];timeout;constructor(t){s(this,p),this.rootStore=t}highlightedByExternalIds=s(this,u,[]);rebookingStateChangeRequested=(s(this,b),s(this,m,!1));rebookingStateSaved=(s(this,f),s(this,v,!1));get exhibitorById(){return new Map(this.exhibitors.map(t=>[t.id,t]))}get exhibitorByExternalId(){return new Map(this.exhibitors.map(t=>[t.externalId,t]))}get exhibitorByName(){return new Map(this.exhibitors.map(t=>[t.name.toLowerCase(),t]))}get exhibitorBySlug(){return new Map(this.exhibitors.map(t=>[t.slug,t]))}get bookmarked(){return this.exhibitors.filter(t=>t.bookmarked)}get visited(){return this.exhibitors.filter(t=>t.visited)}get advertised(){return this.exhibitors.filter(t=>t.advertise&&t.logo?.url)}replaceBookmarked(t){if(!Array.isArray(t))return;const e=(t||[]).map(r=>this.exhibitorById.get(r)).filter(r=>r),n=new Set(e),E=this.bookmarked.filter(r=>!n.has(r));for(const r of E)r.bookmarked=!1;for(const r of e)r.bookmarked=!0}replaceVisited(t){if(!Array.isArray(t))return;const e=(t||[]).map(r=>this.exhibitorById.get(r)).filter(r=>r),n=new Set(e),E=this.visited.filter(r=>!n.has(r));for(const r of E)r.visited=!1;for(const r of e)r.visited=!0}setRebookingState(t,e,n){clearTimeout(this.timeout),this.rebookingStateChangeRequested=!1,t.rebookingState=e,t.rebookingNote=n;const E=C("api/v1/set-rebooking-state",{rt:U(),expoKey:this.rootStore.fp.eventId});fetch(E,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({expoKey:w.EXPO,exhibitorId:t.id,rebookingState:e,rebookingNote:n})}).then(r=>{r.ok&&(this.rebookingStateSaved=!0),!r.ok&&!q&&(t.rebookingState=RebookingState.Unasked,this.rebookingStateSaved=!1)}).catch(()=>{t.rebookingState=RebookingState.Unasked,this.rebookingStateSaved=!1}).finally(()=>{this.rebookingStateChangeRequested=!0,this.timeout=setTimeout(()=>{this.rebookingStateChangeRequested=!1},5e3)})}findExhibitor(t){return this.exhibitorByExternalId.get(t)||this.exhibitorByName.get(t.toLowerCase())||this.exhibitorBySlug.get(t)}}})();export default A;let T=(()=>{let a,c=[],u=[],b,k=[],m=[],f,_=[],v=[],p,x=[],S=[],y,B=[],I=[];return class{static{const d=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;a=[h],b=[h],f=[h],p=[h],y=[h],o(null,null,a,{kind:"field",name:"featured",static:!1,private:!1,access:{has:i=>"featured"in i,get:i=>i.featured,set:(i,l)=>{i.featured=l}},metadata:d},c,u),o(null,null,b,{kind:"field",name:"bookmarked",static:!1,private:!1,access:{has:i=>"bookmarked"in i,get:i=>i.bookmarked,set:(i,l)=>{i.bookmarked=l}},metadata:d},k,m),o(null,null,f,{kind:"field",name:"visited",static:!1,private:!1,access:{has:i=>"visited"in i,get:i=>i.visited,set:(i,l)=>{i.visited=l}},metadata:d},_,v),o(null,null,p,{kind:"field",name:"rebookingState",static:!1,private:!1,access:{has:i=>"rebookingState"in i,get:i=>i.rebookingState,set:(i,l)=>{i.rebookingState=l}},metadata:d},x,S),o(null,null,y,{kind:"field",name:"rebookingNote",static:!1,private:!1,access:{has:i=>"rebookingNote"in i,get:i=>i.rebookingNote,set:(i,l)=>{i.rebookingNote=l}},metadata:d},B,I),d&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:d})}store;id;name;externalId;featured=s(this,c,void 0);advertise=s(this,u);description;address;address2;city;state;zip;country;phone1;website;facebook;instagram;linkedin;twitter;googlePlus;xing;youtube;email;privateEmail;customButtonTitle;customButtonUrl;customButton2Title;customButton2Url;customButton3Title;customButton3Url;leadingImageUrl;leadingImageLinkUrl;videoUrl;order;logo;logoInBooth;gallery;marketMaterials;slug;bookmarked=s(this,k,void 0);visited=(s(this,m),s(this,_,void 0));rebookingState=(s(this,v),s(this,x,void 0));rebookingNote=(s(this,S),s(this,B,void 0));booths=s(this,I);categories;schedule;entity={type:"exhibitor"}}})();export{T as Exhibitor};
1
+ import{__decorate as o}from"tslib";import{action as h,computed as n,observable as a}from"mobx";import{buildRebookingUrl as l,getRebookingToken as u}from"../tools/rebookingUrl";import b from"../tools/settings";import g from"../utils/is-debug";export var RebookingState;(function(r){r[r.Unasked=0]="Unasked",r[r.Accepted=1]="Accepted",r[r.Rejected=2]="Rejected",r[r.Undecided=3]="Undecided"})(RebookingState||(RebookingState={}));export default class i{constructor(e){this.exhibitors=[],this.highlightedByExternalIds=[],this.rebookingStateChangeRequested=!1,this.rebookingStateSaved=!1,this.rootStore=e}get exhibitorById(){return new Map(this.exhibitors.map(e=>[e.id,e]))}get exhibitorByExternalId(){return new Map(this.exhibitors.map(e=>[e.externalId,e]))}get exhibitorByName(){return new Map(this.exhibitors.map(e=>[e.name.toLowerCase(),e]))}get exhibitorBySlug(){return new Map(this.exhibitors.map(e=>[e.slug,e]))}get bookmarked(){return this.exhibitors.filter(e=>e.bookmarked)}get visited(){return this.exhibitors.filter(e=>e.visited)}get advertised(){return this.exhibitors.filter(e=>e.advertise&&e.logo?.url)}replaceBookmarked(e){if(!Array.isArray(e))return;const s=(e||[]).map(t=>this.exhibitorById.get(t)).filter(t=>t),d=new Set(s),p=this.bookmarked.filter(t=>!d.has(t));for(const t of p)t.bookmarked=!1;for(const t of s)t.bookmarked=!0}replaceVisited(e){if(!Array.isArray(e))return;const s=(e||[]).map(t=>this.exhibitorById.get(t)).filter(t=>t),d=new Set(s),p=this.visited.filter(t=>!d.has(t));for(const t of p)t.visited=!1;for(const t of s)t.visited=!0}setRebookingState(e,s,d){clearTimeout(this.timeout),this.rebookingStateChangeRequested=!1,e.rebookingState=s,e.rebookingNote=d;const p=l("api/v1/set-rebooking-state",{rt:u(),expoKey:this.rootStore.fp.eventId});fetch(p,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({expoKey:b.EXPO,exhibitorId:e.id,rebookingState:s,rebookingNote:d})}).then(t=>{t.ok&&(this.rebookingStateSaved=!0),!t.ok&&!g&&(e.rebookingState=RebookingState.Unasked,this.rebookingStateSaved=!1)}).catch(()=>{e.rebookingState=RebookingState.Unasked,this.rebookingStateSaved=!1}).finally(()=>{this.rebookingStateChangeRequested=!0,this.timeout=setTimeout(()=>{this.rebookingStateChangeRequested=!1},5e3)})}findExhibitor(e){return this.exhibitorByExternalId.get(e)||this.exhibitorByName.get(e.toLowerCase())||this.exhibitorBySlug.get(e)}}o([a],i.prototype,"highlightedByExternalIds",void 0),o([a],i.prototype,"rebookingStateChangeRequested",void 0),o([a],i.prototype,"rebookingStateSaved",void 0),o([n({keepAlive:!0})],i.prototype,"exhibitorById",null),o([n({keepAlive:!0})],i.prototype,"exhibitorByExternalId",null),o([n({keepAlive:!0})],i.prototype,"exhibitorByName",null),o([n({keepAlive:!0})],i.prototype,"exhibitorBySlug",null),o([n],i.prototype,"bookmarked",null),o([n],i.prototype,"visited",null),o([n({keepAlive:!0})],i.prototype,"advertised",null),o([h],i.prototype,"replaceBookmarked",null),o([h],i.prototype,"replaceVisited",null),o([h],i.prototype,"setRebookingState",null);export class Exhibitor{constructor(){this.entity={type:"exhibitor"}}}o([a],Exhibitor.prototype,"featured",void 0),o([a],Exhibitor.prototype,"bookmarked",void 0),o([a],Exhibitor.prototype,"visited",void 0),o([a],Exhibitor.prototype,"rebookingState",void 0),o([a],Exhibitor.prototype,"rebookingNote",void 0);
@@ -1 +1 @@
1
- import{__esDecorate as l,__runInitializers as s}from"tslib";import{observable as a,runInAction as c}from"mobx";let u=(()=>{let i,t=[],r=[];return class{static{const e=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;i=[a],l(null,null,i,{kind:"field",name:"engine",static:!1,private:!1,access:{has:n=>"engine"in n,get:n=>n.engine,set:(n,o)=>{n.engine=o}},metadata:e},t,r),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}keys;engine=s(this,t,void 0);enginePromise=(s(this,r),null);lastCollection=null;constructor(e){this.keys=e}loadEngine(){return this.enginePromise||(this.enginePromise=this.buildEngine()),this.enginePromise}async buildEngine(){try{const{default:e}=await import("fuse.js");c(()=>{this.engine=new e([],{keys:this.keys,ignoreFieldNorm:!0,includeScore:!0,threshold:.3,ignoreLocation:!0})})}catch(e){console.error(e),this.enginePromise=null}}search(e,n){return!this.engine||!e?.length||!n?[]:(this.lastCollection!==e&&(this.engine.setCollection(e),this.lastCollection=e),this.engine.search(n))}}})();export default u;
1
+ import{__decorate as t}from"tslib";import{observable as r,runInAction as o}from"mobx";export default class n{constructor(e){this.keys=e,this.enginePromise=null,this.lastCollection=null}loadEngine(){return this.enginePromise||(this.enginePromise=this.buildEngine()),this.enginePromise}async buildEngine(){try{const{default:e}=await import("fuse.js");o(()=>{this.engine=new e([],{keys:this.keys,ignoreFieldNorm:!0,includeScore:!0,threshold:.3,ignoreLocation:!0})})}catch(e){console.error(e),this.enginePromise=null}}search(e,i){return!this.engine||!e?.length||!i?[]:(this.lastCollection!==e&&(this.engine.setCollection(e),this.lastCollection=e),this.engine.search(i))}}t([r],n.prototype,"engine",void 0);
@@ -31,7 +31,7 @@ export declare class HeatmapYah {
31
31
  readonly y: number;
32
32
  readonly z?: number | string | undefined;
33
33
  readonly entity: {
34
- readonly type: "heatmap-yah";
34
+ readonly type: 'heatmap-yah';
35
35
  };
36
36
  constructor(id: number | string, name: string, viewCount: number, x: number, y: number, z?: number | string | undefined);
37
37
  }
@@ -1 +1 @@
1
- import{__esDecorate as C,__runInitializers as p}from"tslib";import{computed as d}from"mobx";import y from"color";import k from"../tools/settings";import{getColorFromGradient as x}from"../utils/color-gradient";import{BoothBase as g}from"./BoothStore";import{Category as v}from"./CategoryStore";import{EventItem as B}from"./EventStore";import{Exhibitor as c}from"./ExhibitorStore";let b=(()=>{let s=[],r;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;r=[d({keepAlive:!0})],C(this,null,r,{kind:"getter",name:"minAndMaxClicks",static:!1,private:!1,access:{has:e=>"minAndMaxClicks"in e,get:e=>e.minAndMaxClicks},metadata:t},null,s),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}heatmapData=(p(this,s),{});forceTrack=null;get minAndMaxClicks(){const{booths:t=[],exhibitors:e=[],yah:i=[]}=this.heatmapData,o=[...t,...e,...i];if(o.length===0)return{min:0,max:0};const h=l=>l.reduce((n,a)=>(a.viewCount>n.max&&(n.max=a.viewCount),a.viewCount<n.min&&(n.min=a.viewCount),n),{min:l[0].viewCount,max:l[0].viewCount}),{min:u,max:f}=h(o);return{min:u,max:f}}getClicksByType(t){return t instanceof v?-1:t instanceof c?this.getClicksByItem(t):t instanceof HeatmapYah?this.getClicksByItem(t):t instanceof B?0:this.getClicksByItem(t)}getClicksByItem(t){return t instanceof c?this.heatmapData?.exhibitors?.find(e=>e.id===t.id)?.viewCount||0:t instanceof g?this.heatmapData?.booths?.find(e=>e.id===t.id)?.viewCount||0:t instanceof HeatmapYah&&this.heatmapData?.yah?.find(e=>e.id===t.id)?.viewCount||0}getTotalClicksByBooth(t){let e=this.getClicksByItem(t);for(const i of t.exhibitors){const o=this.getClicksByItem(i);e+=o}return e}getColorByClicks(t){const{min:e,max:i}=this.minAndMaxClicks;return x(t,e,i,k.heatmapColors)}getHeatmapColorForBooth(t){const e=this.getTotalClicksByBooth(t);return y(this.getColorByClicks(e))}}})();export default b;export class HeatmapYah{id;name;viewCount;x;y;z;entity={type:"heatmap-yah"};constructor(r,m,t,e,i,o){this.id=r,this.name=m,this.viewCount=t,this.x=e,this.y=i,this.z=o}}
1
+ import{__decorate as f}from"tslib";import{computed as C}from"mobx";import p from"color";import y from"../tools/settings";import{getColorFromGradient as k}from"../utils/color-gradient";import{BoothBase as g}from"./BoothStore";import{Category as x}from"./CategoryStore";import{EventItem as d}from"./EventStore";import{Exhibitor as l}from"./ExhibitorStore";export default class m{constructor(){this.heatmapData={},this.forceTrack=null}get minAndMaxClicks(){const{booths:t=[],exhibitors:i=[],yah:o=[]}=this.heatmapData,e=[...t,...i,...o];if(e.length===0)return{min:0,max:0};const s=h=>h.reduce((r,n)=>(n.viewCount>r.max&&(r.max=n.viewCount),n.viewCount<r.min&&(r.min=n.viewCount),r),{min:h[0].viewCount,max:h[0].viewCount}),{min:a,max:u}=s(e);return{min:a,max:u}}getClicksByType(t){return t instanceof x?-1:t instanceof l?this.getClicksByItem(t):t instanceof HeatmapYah?this.getClicksByItem(t):t instanceof d?0:this.getClicksByItem(t)}getClicksByItem(t){return t instanceof l?this.heatmapData?.exhibitors?.find(i=>i.id===t.id)?.viewCount||0:t instanceof g?this.heatmapData?.booths?.find(i=>i.id===t.id)?.viewCount||0:t instanceof HeatmapYah&&this.heatmapData?.yah?.find(i=>i.id===t.id)?.viewCount||0}getTotalClicksByBooth(t){let i=this.getClicksByItem(t);for(const o of t.exhibitors){const e=this.getClicksByItem(o);i+=e}return i}getColorByClicks(t){const{min:i,max:o}=this.minAndMaxClicks;return k(t,i,o,y.heatmapColors)}getHeatmapColorForBooth(t){const i=this.getTotalClicksByBooth(t);return p(this.getColorByClicks(i))}}f([C({keepAlive:!0})],m.prototype,"minAndMaxClicks",null);export class HeatmapYah{constructor(t,i,o,e,s,a){this.id=t,this.name=i,this.viewCount=o,this.x=e,this.y=s,this.z=a,this.entity={type:"heatmap-yah"}}}
@@ -1 +1 @@
1
- import{__esDecorate as n,__runInitializers as a}from"tslib";import{action as _,observable as f}from"mobx";let h=(()=>{let l=[],r,i=[],d=[],o,u=[],c=[],b,m;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;r=[f],o=[f],b=[_],m=[_],n(this,null,b,{kind:"method",name:"setEnabled",static:!1,private:!1,access:{has:e=>"setEnabled"in e,get:e=>e.setEnabled},metadata:t},null,l),n(this,null,m,{kind:"method",name:"setUnreadCount",static:!1,private:!1,access:{has:e=>"setUnreadCount"in e,get:e=>e.setUnreadCount},metadata:t},null,l),n(null,null,r,{kind:"field",name:"enabled",static:!1,private:!1,access:{has:e=>"enabled"in e,get:e=>e.enabled,set:(e,s)=>{e.enabled=s}},metadata:t},i,d),n(null,null,o,{kind:"field",name:"unreadCount",static:!1,private:!1,access:{has:e=>"unreadCount"in e,get:e=>e.unreadCount,set:(e,s)=>{e.unreadCount=s}},metadata:t},u,c),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}enabled=(a(this,l),a(this,i,!1));unreadCount=(a(this,d),a(this,u,0));setEnabled(t){this.enabled=t}setUnreadCount(t){this.unreadCount=t}constructor(){a(this,c)}}})();export default h;
1
+ import{__decorate as e}from"tslib";import{action as n,observable as r}from"mobx";export default class t{constructor(){this.enabled=!1,this.unreadCount=0}setEnabled(o){this.enabled=o}setUnreadCount(o){this.unreadCount=o}}e([r],t.prototype,"enabled",void 0),e([r],t.prototype,"unreadCount",void 0),e([n],t.prototype,"setEnabled",null),e([n],t.prototype,"setUnreadCount",null);
@@ -1 +1 @@
1
- import{__esDecorate as l,__runInitializers as d}from"tslib";import{getFpSvgJs as j}from"../data/fp-payloads";import{Box as W}from"@expofp/geometry";import{action as g,computed as h,observable as m,runInAction as D}from"mobx";import B from"../components/Map/drawing/config/config-load-layer";import N from"../tools/settings";import{areLayersEnabled as U}from"../utils/areLayersEnabled";import{shortenName as H}from"../utils/shortenName";import s from".";const X=["money2020usa","rodion2","possible2025","2025virtuosotravelweek","zscalerskofy26","gamescom2025"];export var LayersMode;(function(i){i[i.Default=0]="Default",i[i.Separated=1]="Separated",i[i.Radio=2]="Radio",i[i.CheckBox=3]="CheckBox"})(LayersMode||(LayersMode={}));export var LayerMode;(function(i){i[i.Unset=0]="Unset",i[i.AlwaysVisible=1]="AlwaysVisible",i[i.AlwaysHidden=2]="AlwaysHidden",i[i.TurnedOn=3]="TurnedOn",i[i.TurnedOff=4]="TurnedOff"})(LayerMode||(LayerMode={}));let C=(()=>{let i,y=[],p=[],v,b=[],_=[];return class{static{const c=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;i=[m],v=[m],l(null,null,i,{kind:"field",name:"loaded",static:!1,private:!1,access:{has:n=>"loaded"in n,get:n=>n.loaded,set:(n,u)=>{n.loaded=u}},metadata:c},y,p),l(null,null,v,{kind:"field",name:"visible",static:!1,private:!1,access:{has:n=>"visible"in n,get:n=>n.visible,set:(n,u)=>{n.visible=u}},metadata:c},b,_),c&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:c})}basePriority;name;description;frozen;rect=null;viewbox=null;configured;childLayers=[];rootParent=null;mode;children=[];pathway;floorIndex;loaded=d(this,y,void 0);visible=(d(this,p),d(this,b,void 0));get shortName(){return H(this.description)}constructor(){d(this,_)}}})();export{C as Layer};let q=(()=>{let i=[],y,p=[],v=[],b,_=[],w=[],c,n=[],u=[],L,x=[],S=[],k,P,T,R,V,I,z,A,E,F;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;y=[m],b=[m],c=[m],L=[m],k=[h({keepAlive:!0})],P=[h({keepAlive:!0})],T=[h({keepAlive:!0})],R=[h({keepAlive:!0})],V=[h],I=[h],z=[g],A=[g],E=[g],F=[g],l(this,null,k,{kind:"getter",name:"visible",static:!1,private:!1,access:{has:e=>"visible"in e,get:e=>e.visible},metadata:t},null,i),l(this,null,P,{kind:"getter",name:"loaded",static:!1,private:!1,access:{has:e=>"loaded"in e,get:e=>e.loaded},metadata:t},null,i),l(this,null,T,{kind:"getter",name:"rectangle",static:!1,private:!1,access:{has:e=>"rectangle"in e,get:e=>e.rectangle},metadata:t},null,i),l(this,null,R,{kind:"getter",name:"viewboxRectangle",static:!1,private:!1,access:{has:e=>"viewboxRectangle"in e,get:e=>e.viewboxRectangle},metadata:t},null,i),l(this,null,V,{kind:"getter",name:"pathwayLayers",static:!1,private:!1,access:{has:e=>"pathwayLayers"in e,get:e=>e.pathwayLayers},metadata:t},null,i),l(this,null,I,{kind:"getter",name:"floors",static:!1,private:!1,access:{has:e=>"floors"in e,get:e=>e.floors},metadata:t},null,i),l(this,null,z,{kind:"method",name:"selectFloor",static:!1,private:!1,access:{has:e=>"selectFloor"in e,get:e=>e.selectFloor},metadata:t},null,i),l(this,null,A,{kind:"method",name:"updateVisibility",static:!1,private:!1,access:{has:e=>"updateVisibility"in e,get:e=>e.updateVisibility},metadata:t},null,i),l(this,null,E,{kind:"method",name:"showPathWay",static:!1,private:!1,access:{has:e=>"showPathWay"in e,get:e=>e.showPathWay},metadata:t},null,i),l(this,null,F,{kind:"method",name:"hidePathways",static:!1,private:!1,access:{has:e=>"hidePathways"in e,get:e=>e.hidePathways},metadata:t},null,i),l(null,null,y,{kind:"field",name:"layers",static:!1,private:!1,access:{has:e=>"layers"in e,get:e=>e.layers,set:(e,a)=>{e.layers=a}},metadata:t},p,v),l(null,null,b,{kind:"field",name:"defaultLayer",static:!1,private:!1,access:{has:e=>"defaultLayer"in e,get:e=>e.defaultLayer,set:(e,a)=>{e.defaultLayer=a}},metadata:t},_,w),l(null,null,c,{kind:"field",name:"mode",static:!1,private:!1,access:{has:e=>"mode"in e,get:e=>e.mode,set:(e,a)=>{e.mode=a}},metadata:t},n,u),l(null,null,L,{kind:"field",name:"layersLoaded",static:!1,private:!1,access:{has:e=>"layersLoaded"in e,get:e=>e.layersLoaded,set:(e,a)=>{e.layersLoaded=a}},metadata:t},x,S),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}layers=(d(this,i),d(this,p,[]));defaultLayer=(d(this,v),d(this,_,void 0));mode=(d(this,w),d(this,n,void 0));layersLoaded=(d(this,u),d(this,x,!1));updateVisibilityTimeout=(d(this,S),0);selectFloorTimeout=0;get visible(){return this.layers.filter(t=>t.frozen||t.visible)}get loaded(){return this.layers.filter(t=>t.loaded)}get rectangle(){var t=this.visible.filter(e=>!e.frozen).map(e=>e.viewbox??e.rect);return this.mode!==LayersMode.Radio||!t.length?null:W.fromUnion(...t)||null}get viewboxRectangle(){var t=this.visible.filter(e=>!e.frozen&&e.viewbox).map(e=>e.viewbox);return t.length&&W.fromUnion(...t)||null}get pathwayLayers(){return this.layers.filter(t=>t.pathway)}get floors(){if(!U())return[];const t=new Set(this.layers.filter(a=>a&&!a.frozen&&!a.rootParent&&!a.pathway).concat(s.routeStore.layers.filter(a=>a&&a.mode!==LayerMode.AlwaysHidden&&a.mode!==LayerMode.AlwaysVisible))),e=Array.from(t).reverse();return e.map((a,r)=>{const o=s.routeStore.layers.length>0&&s.routeStore.layers.indexOf(a)===-1,f=s.toursStore.tourLayers.length>0&&s.toursStore.tourLayers.indexOf(a)===-1;return{layer:a,name:a.name,shortName:a.shortName,description:a.description,active:a.visible,disabled:!!(o||f),index:a.floorIndex??e.length-r-1}})}selectFloor(t){if(this.selectFloorTimeout)return;this.selectFloorTimeout=setTimeout(()=>this.selectFloorTimeout=0,500);const e=this.layers.find(r=>r.description===t.description);if(!e)return;if(this.mode===LayersMode.Radio){if(this.updateVisibility(e,!0),s.maplibreStore.showMaplibre)return;if(!!j().__fpSettings?.fpVer||X.includes(N.EXPO)){const o=e.viewbox??e.rect;s.uiState.moveToRect=o}else{const o=this.layers.indexOf(this.layers.filter(O=>!O.frozen&&O.visible)[0]),f=this.layers.indexOf(e);if(o===f)return;s.uiState.zoomBy=f<o?.95:1.05}}else this.updateVisibility(e,!e.visible);const a=s.toursStore.getTourLayerInfo(e.name)||s.toursStore.getTourLayerInfo(e.description);if(a){this.showPathWay(a.id);return}s.toursStore.stopTour()}updateVisibility(t,e){if(this.mode===LayersMode.Radio&&!e)return;const a=t instanceof C?t:this.findLayer(t);if(!a||a.visible===e){a&&s.routeStore.currentRouteLayer!==a&&(s.routeStore.currentRouteLayer=a);return}B(a,s.rendererService).then(()=>{this.mode===LayersMode.Radio&&this.layers.filter(r=>!r.pathway).forEach(r=>{r.name!==a.name&&!r.frozen&&r.visible&&(r.visible=!1,r.childLayers.forEach(o=>{o.visible=!1}))}),a&&(a.visible=e,a.childLayers.forEach(r=>{r.visible=e}),e&&(s.routeStore.currentRouteLayer=a),typeof s.fp.onFloorActivated=="function"&&(clearTimeout(this.updateVisibilityTimeout),this.updateVisibilityTimeout=setTimeout(()=>{const r=s.fp.getFloors();s.fp.onFloorActivated(r.find(o=>o.name===a.name))})))})}findLayer(t){if(t==null)return null;const e=this.layers.filter(r=>!r.rootParent);if(typeof t=="number"&&(a=e.filter(r=>!r.frozen)[t],a))return a;t=t.toString().toLowerCase();var a=e.find(r=>{const o=(r.name.match(/(-?[0-9]+)/)||"")[0];return t===r?.name.toLowerCase()||t===r?.description.toLowerCase()||t===r?.shortName.toLowerCase()||t===o});return!a&&!/\D/.test(t)&&(a=e.filter(r=>!r.frozen)[parseInt(t)]),a}getPathwayList(){return this.layers.filter(t=>t.pathway)}async showPathWay(t){try{const e=this.findLayer(t);if(!e)throw new Error(`There is no pathway with this name. ${t}`);await B(e,s.rendererService);const a=this.getPathwayList();D(()=>{a.forEach(r=>{const o=r.name===t;r.visible=o,r.childLayers.forEach(f=>{f.visible=o})})})}catch(e){console.error("showPathWay",e)}}hidePathways(){this.getPathwayList().forEach(e=>{e.visible=!1,e.childLayers.forEach(a=>{a.visible=!1})})}}})();export default q;
1
+ import{__decorate as a}from"tslib";import{getFpSvgJs as m}from"../data/fp-payloads";import{Box as y}from"@expofp/geometry";import{action as c,computed as f,observable as h,runInAction as v}from"mobx";import d from"../components/Map/drawing/config/config-load-layer";import w from"../tools/settings";import{areLayersEnabled as b}from"../utils/areLayersEnabled";import{shortenName as g}from"../utils/shortenName";import s from".";const S=["money2020usa","rodion2","possible2025","2025virtuosotravelweek","zscalerskofy26","gamescom2025"];export var LayersMode;(function(i){i[i.Default=0]="Default",i[i.Separated=1]="Separated",i[i.Radio=2]="Radio",i[i.CheckBox=3]="CheckBox"})(LayersMode||(LayersMode={}));export var LayerMode;(function(i){i[i.Unset=0]="Unset",i[i.AlwaysVisible=1]="AlwaysVisible",i[i.AlwaysHidden=2]="AlwaysHidden",i[i.TurnedOn=3]="TurnedOn",i[i.TurnedOff=4]="TurnedOff"})(LayerMode||(LayerMode={}));export class Layer{constructor(){this.rect=null,this.viewbox=null,this.childLayers=[],this.rootParent=null,this.children=[]}get shortName(){return g(this.description)}}a([h],Layer.prototype,"loaded",void 0),a([h],Layer.prototype,"visible",void 0);export default class l{constructor(){this.layers=[],this.layersLoaded=!1,this.updateVisibilityTimeout=0,this.selectFloorTimeout=0}get visible(){return this.layers.filter(t=>t.frozen||t.visible)}get loaded(){return this.layers.filter(t=>t.loaded)}get rectangle(){var t=this.visible.filter(r=>!r.frozen).map(r=>r.viewbox??r.rect);return this.mode!==LayersMode.Radio||!t.length?null:y.fromUnion(...t)||null}get viewboxRectangle(){var t=this.visible.filter(r=>!r.frozen&&r.viewbox).map(r=>r.viewbox);return t.length&&y.fromUnion(...t)||null}get pathwayLayers(){return this.layers.filter(t=>t.pathway)}get floors(){if(!b())return[];const t=new Set(this.layers.filter(e=>e&&!e.frozen&&!e.rootParent&&!e.pathway).concat(s.routeStore.layers.filter(e=>e&&e.mode!==LayerMode.AlwaysHidden&&e.mode!==LayerMode.AlwaysVisible))),r=Array.from(t).reverse();return r.map((e,o)=>{const n=s.routeStore.layers.length>0&&s.routeStore.layers.indexOf(e)===-1,u=s.toursStore.tourLayers.length>0&&s.toursStore.tourLayers.indexOf(e)===-1;return{layer:e,name:e.name,shortName:e.shortName,description:e.description,active:e.visible,disabled:!!(n||u),index:e.floorIndex??r.length-o-1}})}selectFloor(t){if(this.selectFloorTimeout)return;this.selectFloorTimeout=setTimeout(()=>this.selectFloorTimeout=0,500);const r=this.layers.find(o=>o.description===t.description);if(!r)return;if(this.mode===LayersMode.Radio){if(this.updateVisibility(r,!0),s.maplibreStore.showMaplibre)return;if(!!m().__fpSettings?.fpVer||S.includes(w.EXPO)){const n=r.viewbox??r.rect;s.uiState.moveToRect=n}else{const n=this.layers.indexOf(this.layers.filter(p=>!p.frozen&&p.visible)[0]),u=this.layers.indexOf(r);if(n===u)return;s.uiState.zoomBy=u<n?.95:1.05}}else this.updateVisibility(r,!r.visible);const e=s.toursStore.getTourLayerInfo(r.name)||s.toursStore.getTourLayerInfo(r.description);if(e){this.showPathWay(e.id);return}s.toursStore.stopTour()}updateVisibility(t,r){if(this.mode===LayersMode.Radio&&!r)return;const e=t instanceof Layer?t:this.findLayer(t);if(!e||e.visible===r){e&&s.routeStore.currentRouteLayer!==e&&(s.routeStore.currentRouteLayer=e);return}d(e,s.rendererService).then(()=>{this.mode===LayersMode.Radio&&this.layers.filter(o=>!o.pathway).forEach(o=>{o.name!==e.name&&!o.frozen&&o.visible&&(o.visible=!1,o.childLayers.forEach(n=>{n.visible=!1}))}),e&&(e.visible=r,e.childLayers.forEach(o=>{o.visible=r}),r&&(s.routeStore.currentRouteLayer=e),typeof s.fp.onFloorActivated=="function"&&(clearTimeout(this.updateVisibilityTimeout),this.updateVisibilityTimeout=setTimeout(()=>{const o=s.fp.getFloors();s.fp.onFloorActivated(o.find(n=>n.name===e.name))})))})}findLayer(t){if(t==null)return null;const r=this.layers.filter(o=>!o.rootParent);if(typeof t=="number"&&(e=r.filter(o=>!o.frozen)[t],e))return e;t=t.toString().toLowerCase();var e=r.find(o=>{const n=(o.name.match(/(-?[0-9]+)/)||"")[0];return t===o?.name.toLowerCase()||t===o?.description.toLowerCase()||t===o?.shortName.toLowerCase()||t===n});return!e&&!/\D/.test(t)&&(e=r.filter(o=>!o.frozen)[parseInt(t)]),e}getPathwayList(){return this.layers.filter(t=>t.pathway)}async showPathWay(t){try{const r=this.findLayer(t);if(!r)throw new Error(`There is no pathway with this name. ${t}`);await d(r,s.rendererService);const e=this.getPathwayList();v(()=>{e.forEach(o=>{const n=o.name===t;o.visible=n,o.childLayers.forEach(u=>{u.visible=n})})})}catch(r){console.error("showPathWay",r)}}hidePathways(){this.getPathwayList().forEach(r=>{r.visible=!1,r.childLayers.forEach(e=>{e.visible=!1})})}}a([h],l.prototype,"layers",void 0),a([h],l.prototype,"defaultLayer",void 0),a([h],l.prototype,"mode",void 0),a([h],l.prototype,"layersLoaded",void 0),a([f({keepAlive:!0})],l.prototype,"visible",null),a([f({keepAlive:!0})],l.prototype,"loaded",null),a([f({keepAlive:!0})],l.prototype,"rectangle",null),a([f({keepAlive:!0})],l.prototype,"viewboxRectangle",null),a([f],l.prototype,"pathwayLayers",null),a([f],l.prototype,"floors",null),a([c],l.prototype,"selectFloor",null),a([c],l.prototype,"updateVisibility",null),a([c],l.prototype,"showPathWay",null),a([c],l.prototype,"hidePathways",null);
@@ -1 +1 @@
1
- import{__esDecorate as i,__runInitializers as l}from"tslib";import{action as d,computed as r,observable as o}from"mobx";import n from"../data";import{fpGeo as y}from"../data/fpGeo";const I=import.meta.env?.VITE_EXPOFP_DISABLE_3D_TOGGLE!=="false";function z(){return typeof window>"u"||window.navigator.onLine}let B=(()=>{let a=[],p,m=[],c=[],h,f=[],u=[],b,M=[],w=[],_,v,g,O,S,V,E,k;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;p=[o],h=[o],b=[o],_=[d],v=[d],g=[d],O=[r({keepAlive:!0})],S=[r({keepAlive:!0})],V=[r({keepAlive:!0})],E=[r({keepAlive:!0})],k=[r({keepAlive:!0})],i(this,null,_,{kind:"method",name:"setOnline",static:!1,private:!1,access:{has:e=>"setOnline"in e,get:e=>e.setOnline},metadata:t},null,a),i(this,null,v,{kind:"method",name:"activateMaplibre",static:!1,private:!1,access:{has:e=>"activateMaplibre"in e,get:e=>e.activateMaplibre},metadata:t},null,a),i(this,null,g,{kind:"method",name:"deactivateMaplibre",static:!1,private:!1,access:{has:e=>"deactivateMaplibre"in e,get:e=>e.deactivateMaplibre},metadata:t},null,a),i(this,null,O,{kind:"getter",name:"hideModeSwitchButton",static:!1,private:!1,access:{has:e=>"hideModeSwitchButton"in e,get:e=>e.hideModeSwitchButton},metadata:t},null,a),i(this,null,S,{kind:"getter",name:"maplibreEnabled",static:!1,private:!1,access:{has:e=>"maplibreEnabled"in e,get:e=>e.maplibreEnabled},metadata:t},null,a),i(this,null,V,{kind:"getter",name:"useMaplibreMap",static:!1,private:!1,access:{has:e=>"useMaplibreMap"in e,get:e=>e.useMaplibreMap},metadata:t},null,a),i(this,null,E,{kind:"getter",name:"showMaplibre",static:!1,private:!1,access:{has:e=>"showMaplibre"in e,get:e=>e.showMaplibre},metadata:t},null,a),i(this,null,k,{kind:"getter",name:"isMap3d",static:!1,private:!1,access:{has:e=>"isMap3d"in e,get:e=>e.isMap3d},metadata:t},null,a),i(null,null,p,{kind:"field",name:"mapViewMode",static:!1,private:!1,access:{has:e=>"mapViewMode"in e,get:e=>e.mapViewMode,set:(e,s)=>{e.mapViewMode=s}},metadata:t},m,c),i(null,null,h,{kind:"field",name:"maplibreSelected",static:!1,private:!1,access:{has:e=>"maplibreSelected"in e,get:e=>e.maplibreSelected,set:(e,s)=>{e.maplibreSelected=s}},metadata:t},f,u),i(null,null,b,{kind:"field",name:"isOnline",static:!1,private:!1,access:{has:e=>"isOnline"in e,get:e=>e.isOnline,set:(e,s)=>{e.isOnline=s}},metadata:t},M,w),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}rootStore=l(this,a);mapViewMode=l(this,m,"floorplan");maplibreSelected=(l(this,c),l(this,f,!1));isOnline=(l(this,u),l(this,M,z()));handleOnline=(l(this,w),()=>this.setOnline(!0));handleOffline=()=>this.setOnline(!1);constructor(t){this.rootStore=t,this.mapViewMode=this.getInitialViewMode(),this.maplibreSelected=this.mapViewMode!=="floorplan",typeof window<"u"&&(window.addEventListener("online",this.handleOnline),window.addEventListener("offline",this.handleOffline))}dispose(){typeof window>"u"||(window.removeEventListener("online",this.handleOnline),window.removeEventListener("offline",this.handleOffline))}setOnline(t){this.isOnline=t}activateMaplibre(){this.maplibreEnabled&&(this.mapViewMode=n.allow3dView&&this.mapViewMode!=="map3d"?"map3d":"map2d",this.maplibreSelected=!0)}deactivateMaplibre(){this.mapViewMode="floorplan",this.maplibreSelected=!1}get hideModeSwitchButton(){return!this.maplibreEnabled||!n.allow3dView||I||n.hideModeSwitchButton}get maplibreEnabled(){const t=this.rootStore.fp?.maplibre??window.__efpMaplibre,e=!!t?.offline&&(!!t.style||!!t.styleUrl);return this.useMaplibreMap&&!!y?.properties?.config&&!this.rootStore.uiState.kiosk&&(this.isOnline||e)}get useMaplibreMap(){return!!n.enableExperimentalMaplibre}get showMaplibre(){return this.maplibreEnabled&&(this.mapViewMode==="map2d"||this.mapViewMode==="map3d")}get isMap3d(){return this.maplibreEnabled&&this.mapViewMode==="map3d"}getInitialViewMode(){return this.maplibreEnabled?n.allow3dView&&!n.hide3dMapDefault?"map3d":"map2d":"floorplan"}}})();export default B;
1
+ import{__decorate as i}from"tslib";import{action as n,computed as o,observable as a}from"mobx";import l from"../data";import{fpGeo as r}from"../data/fpGeo";const d=import.meta.env?.VITE_EXPOFP_DISABLE_3D_TOGGLE!=="false";function s(){return typeof window>"u"||window.navigator.onLine}export default class e{constructor(t){this.mapViewMode="floorplan",this.maplibreSelected=!1,this.isOnline=s(),this.handleOnline=()=>this.setOnline(!0),this.handleOffline=()=>this.setOnline(!1),this.rootStore=t,this.mapViewMode=this.getInitialViewMode(),this.maplibreSelected=this.mapViewMode!=="floorplan",typeof window<"u"&&(window.addEventListener("online",this.handleOnline),window.addEventListener("offline",this.handleOffline))}dispose(){typeof window>"u"||(window.removeEventListener("online",this.handleOnline),window.removeEventListener("offline",this.handleOffline))}setOnline(t){this.isOnline=t}activateMaplibre(){this.maplibreEnabled&&(this.mapViewMode=l.allow3dView&&this.mapViewMode!=="map3d"?"map3d":"map2d",this.maplibreSelected=!0)}deactivateMaplibre(){this.mapViewMode="floorplan",this.maplibreSelected=!1}get hideModeSwitchButton(){return!this.maplibreEnabled||!l.allow3dView||d||l.hideModeSwitchButton}get maplibreEnabled(){const t=this.rootStore.fp?.maplibre??window.__efpMaplibre,p=!!t?.offline&&(!!t.style||!!t.styleUrl);return this.useMaplibreMap&&!!r?.properties?.config&&!this.rootStore.uiState.kiosk&&(this.isOnline||p)}get useMaplibreMap(){return!!l.enableExperimentalMaplibre}get showMaplibre(){return this.maplibreEnabled&&(this.mapViewMode==="map2d"||this.mapViewMode==="map3d")}get isMap3d(){return this.maplibreEnabled&&this.mapViewMode==="map3d"}getInitialViewMode(){return this.maplibreEnabled?l.allow3dView&&!l.hide3dMapDefault?"map3d":"map2d":"floorplan"}}i([a],e.prototype,"mapViewMode",void 0),i([a],e.prototype,"maplibreSelected",void 0),i([a],e.prototype,"isOnline",void 0),i([n],e.prototype,"setOnline",null),i([n],e.prototype,"activateMaplibre",null),i([n],e.prototype,"deactivateMaplibre",null),i([o({keepAlive:!0})],e.prototype,"hideModeSwitchButton",null),i([o({keepAlive:!0})],e.prototype,"maplibreEnabled",null),i([o({keepAlive:!0})],e.prototype,"useMaplibreMap",null),i([o({keepAlive:!0})],e.prototype,"showMaplibre",null),i([o({keepAlive:!0})],e.prototype,"isMap3d",null);
@@ -1 +1 @@
1
- export default class t{rootStore;poiTypes=[];constructor(o){this.rootStore=o}}
1
+ export default class t{constructor(o){this.poiTypes=[],this.rootStore=o}}
@@ -1 +1 @@
1
- import{__esDecorate as s,__runInitializers as n}from"tslib";import{action as o,computed as he,observable as se,runInAction as ae}from"mobx";import{LANGUAGE_TYPE as ne}from"../constants";import{RendererService as ce}from"../renderer";import{URLFilterManager as ue}from"../services/URLFilterManager";import{GaEventActions as de}from"../tools/gtag";import me from"../tools/logger";import{isWebGlSupported as Se}from"../utils";import{resetLocale as fe}from"../utils/i18n";import h from"../utils/is-mobile";import c from"../utils/is-webview";import{sanitizeSearch as pe}from"../utils/sanitizeText";import ge from"./BookmarksStore";import ke,{BoothBase as oe,RegularBooth as ve}from"./BoothStore";import ye from"./CategoryFilterStore";import _e,{Category as be}from"./CategoryStore";import we,{EventItem as xe}from"./EventStore";import Be,{Exhibitor as re}from"./ExhibitorStore";import Ee from"./FuzzySearchEngineStore";import Le from"./HeatmapStore";import Ce from"./IntercomStore";import Fe,{LayersMode as le}from"./LayerStore";import Ie from"./MaplibreStore";import Te from"./PoiTypeStore";import{SearchShortcutProvider as ze}from"./providers/SearchShortcutProvider";import{SessionsShortcutProvider as Me}from"./providers/SessionsShortcutProvider";import{SpeakerShortcutProvider as Oe}from"./providers/SpeakerShortcutProvider";import Ae from"./RoutePlannerStore";import Re from"./RouteStore";import Pe from"./SearchButtonsStore";import Ve from"./SearchStore";import Ge from"./SessionsFilterStore";import{ShortcutRegistry as Ne}from"./ShortcutRegistry";import qe from"./SpeakerFilterStore";import je from"./SpeakerStore";import{SpeakerItem as Ue}from"./SpeakerStore";import We from"./ToursStore";import De from"./UIState";let He=(()=>{let a=[],u,d=[],m=[],S,f=[],p=[],g,k,v,y,_,b,w,x,B,E,L,C,F,I,T,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=[o],k=[o],v=[o],y=[o],_=[o],b=[o],w=[o],x=[o],B=[o],E=[o],L=[o],C=[o],F=[o],I=[o],T=[o],z=[o],M=[o],O=[o],A=[o],R=[o],P=[o],V=[o],G=[o],N=[o],q=[o],j=[o],U=[o],W=[o],D=[o],H=[o],K=[o],Y=[o],$=[o],J=[he],Q=[o],X=[o],Z=[o],ee=[o],te=[o],ie=[o],s(this,null,g,{kind:"method",name:"setResetCameraFn",static:!1,private:!1,access:{has:e=>"setResetCameraFn"in e,get:e=>e.setResetCameraFn},metadata:t},null,a),s(this,null,k,{kind:"method",name:"selectExhibitor",static:!1,private:!1,access:{has:e=>"selectExhibitor"in e,get:e=>e.selectExhibitor},metadata:t},null,a),s(this,null,v,{kind:"method",name:"selectBooth",static:!1,private:!1,access:{has:e=>"selectBooth"in e,get:e=>e.selectBooth},metadata:t},null,a),s(this,null,y,{kind:"method",name:"reset",static:!1,private:!1,access:{has:e=>"reset"in e,get:e=>e.reset},metadata:t},null,a),s(this,null,_,{kind:"method",name:"selectNone",static:!1,private:!1,access:{has:e=>"selectNone"in e,get:e=>e.selectNone},metadata:t},null,a),s(this,null,b,{kind:"method",name:"selectBookmarks",static:!1,private:!1,access:{has:e=>"selectBookmarks"in e,get:e=>e.selectBookmarks},metadata:t},null,a),s(this,null,w,{kind:"method",name:"selectVisited",static:!1,private:!1,access:{has:e=>"selectVisited"in e,get:e=>e.selectVisited},metadata:t},null,a),s(this,null,x,{kind:"method",name:"selectLanguage",static:!1,private:!1,access:{has:e=>"selectLanguage"in e,get:e=>e.selectLanguage},metadata:t},null,a),s(this,null,B,{kind:"method",name:"selectCategory",static:!1,private:!1,access:{has:e=>"selectCategory"in e,get:e=>e.selectCategory},metadata:t},null,a),s(this,null,E,{kind:"method",name:"selectEventItem",static:!1,private:!1,access:{has:e=>"selectEventItem"in e,get:e=>e.selectEventItem},metadata:t},null,a),s(this,null,L,{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,C,{kind:"method",name:"clickBookmarks",static:!1,private:!1,access:{has:e=>"clickBookmarks"in e,get:e=>e.clickBookmarks},metadata:t},null,a),s(this,null,F,{kind:"method",name:"clickVisited",static:!1,private:!1,access:{has:e=>"clickVisited"in e,get:e=>e.clickVisited},metadata:t},null,a),s(this,null,I,{kind:"method",name:"clickLanguage",static:!1,private:!1,access:{has:e=>"clickLanguage"in e,get:e=>e.clickLanguage},metadata:t},null,a),s(this,null,T,{kind:"method",name:"clickCategory",static:!1,private:!1,access:{has:e=>"clickCategory"in e,get:e=>e.clickCategory},metadata:t},null,a),s(this,null,z,{kind:"method",name:"clickSeminars",static:!1,private:!1,access:{has:e=>"clickSeminars"in e,get:e=>e.clickSeminars},metadata:t},null,a),s(this,null,M,{kind:"method",name:"clickBoothInList",static:!1,private:!1,access:{has:e=>"clickBoothInList"in e,get:e=>e.clickBoothInList},metadata:t},null,a),s(this,null,O,{kind:"method",name:"clickBoothInList2",static:!1,private:!1,access:{has:e=>"clickBoothInList2"in e,get:e=>e.clickBoothInList2},metadata:t},null,a),s(this,null,A,{kind:"method",name:"clickBooth",static:!1,private:!1,access:{has:e=>"clickBooth"in e,get:e=>e.clickBooth},metadata:t},null,a),s(this,null,R,{kind:"method",name:"clickExhibitor2",static:!1,private:!1,access:{has:e=>"clickExhibitor2"in e,get:e=>e.clickExhibitor2},metadata:t},null,a),s(this,null,P,{kind:"method",name:"clickExhibitor",static:!1,private:!1,access:{has:e=>"clickExhibitor"in e,get:e=>e.clickExhibitor},metadata:t},null,a),s(this,null,V,{kind:"method",name:"showMap",static:!1,private:!1,access:{has:e=>"showMap"in e,get:e=>e.showMap},metadata:t},null,a),s(this,null,G,{kind:"method",name:"showOverlay",static:!1,private:!1,access:{has:e=>"showOverlay"in e,get:e=>e.showOverlay},metadata:t},null,a),s(this,null,N,{kind:"method",name:"toggleMapOverlay",static:!1,private:!1,access:{has:e=>"toggleMapOverlay"in e,get:e=>e.toggleMapOverlay},metadata:t},null,a),s(this,null,q,{kind:"method",name:"moveToList",static:!1,private:!1,access:{has:e=>"moveToList"in e,get:e=>e.moveToList},metadata:t},null,a),s(this,null,j,{kind:"method",name:"moveToExhibitor",static:!1,private:!1,access:{has:e=>"moveToExhibitor"in e,get:e=>e.moveToExhibitor},metadata:t},null,a),s(this,null,U,{kind:"method",name:"changeActiveListIndex",static:!1,private:!1,access:{has:e=>"changeActiveListIndex"in e,get:e=>e.changeActiveListIndex},metadata:t},null,a),s(this,null,W,{kind:"method",name:"toggleModal",static:!1,private:!1,access:{has:e=>"toggleModal"in e,get:e=>e.toggleModal},metadata:t},null,a),s(this,null,D,{kind:"method",name:"openGallery",static:!1,private:!1,access:{has:e=>"openGallery"in e,get:e=>e.openGallery},metadata:t},null,a),s(this,null,H,{kind:"method",name:"closeGallery",static:!1,private:!1,access:{has:e=>"closeGallery"in e,get:e=>e.closeGallery},metadata:t},null,a),s(this,null,K,{kind:"method",name:"openActiveListItem",static:!1,private:!1,access:{has:e=>"openActiveListItem"in e,get:e=>e.openActiveListItem},metadata:t},null,a),s(this,null,Y,{kind:"method",name:"toggleCategoryFilter",static:!1,private:!1,access:{has:e=>"toggleCategoryFilter"in e,get:e=>e.toggleCategoryFilter},metadata:t},null,a),s(this,null,$,{kind:"method",name:"applyCategoryFilters",static:!1,private:!1,access:{has:e=>"applyCategoryFilters"in e,get:e=>e.applyCategoryFilters},metadata:t},null,a),s(this,null,J,{kind:"getter",name:"filteredExhibitors",static:!1,private:!1,access:{has:e=>"filteredExhibitors"in e,get:e=>e.filteredExhibitors},metadata:t},null,a),s(this,null,Q,{kind:"method",name:"selectSessions",static:!1,private:!1,access:{has:e=>"selectSessions"in e,get:e=>e.selectSessions},metadata:t},null,a),s(this,null,X,{kind:"method",name:"selectExhibitors",static:!1,private:!1,access:{has:e=>"selectExhibitors"in e,get:e=>e.selectExhibitors},metadata:t},null,a),s(this,null,Z,{kind:"method",name:"selectTours",static:!1,private:!1,access:{has:e=>"selectTours"in e,get:e=>e.selectTours},metadata:t},null,a),s(this,null,ee,{kind:"method",name:"selectSpeakers",static:!1,private:!1,access:{has:e=>"selectSpeakers"in e,get:e=>e.selectSpeakers},metadata:t},null,a),s(this,null,te,{kind:"method",name:"selectSpeaker",static:!1,private:!1,access:{has:e=>"selectSpeaker"in e,get:e=>e.selectSpeaker},metadata:t},null,a),s(this,null,ie,{kind:"method",name:"resetFilters",static:!1,private:!1,access:{has:e=>"resetFilters"in e,get:e=>e.resetFilters},metadata:t},null,a),s(null,null,u,{kind:"field",name:"initialized",static:!1,private:!1,access:{has:e=>"initialized"in e,get:e=>e.initialized,set:(e,i)=>{e.initialized=i}},metadata:t},d,m),s(null,null,S,{kind:"field",name:"resetCameraFn",static:!1,private:!1,access:{has:e=>"resetCameraFn"in e,get:e=>e.resetCameraFn,set:(e,i)=>{e.resetCameraFn=i}},metadata:t},f,p),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}categoryStore=n(this,a);exhibitorStore;boothStore;uiState;routeStore;routePlannerStore;toursStore;maplibreStore;layerStore;intercomStore;eventStore;poiTypeStore;heatmapStore;fuzzySearchEngineStore;categoryFilterStore;sessionsFilterStore;speakerStore;speakerFilterStore;searchStore;searchButtonsStore;bookmarksStore;urlFilterManager;shortcutRegistry;rendererService=new ce;fp;initialized=n(this,d,!1);resetCameraFn=(n(this,m),n(this,f,void 0));setResetCameraFn(t){this.resetCameraFn=t}constructor(){n(this,p),this.categoryStore=new _e(this),this.exhibitorStore=new Be(this),this.boothStore=new ke(this),this.routeStore=new Re(this),this.routePlannerStore=new Ae(this),this.toursStore=new We(this),this.uiState=new De(this),this.maplibreStore=new Ie(this),this.layerStore=new Fe,this.intercomStore=new Ce,this.eventStore=new we(this),this.heatmapStore=new Le,this.poiTypeStore=new Te(this),this.fuzzySearchEngineStore=new Ee(["name","title","fullName","booths.name"]),this.categoryFilterStore=new ye(this),this.sessionsFilterStore=new Ge(this),this.speakerStore=new je(this),this.speakerFilterStore=new qe(this),this.searchStore=new Ve(this),this.searchButtonsStore=new Pe(this),this.bookmarksStore=new ge(this),this.urlFilterManager=new ue(this),this.shortcutRegistry=new Ne,this.registerShortcutProviders()}selectExhibitor(t,e=!0){this.uiState.hoveredExhibitor=null,this.uiState.details=t;var i=t.booths.filter(l=>l.visible),r=t.booths.filter(l=>!l.visible);!i.length&&r.length&&this.layerStore.updateVisibility(r[0].layer,!0),e&&setTimeout(()=>this.moveToList(t.booths.filter(l=>l.visible)),c||h?500:50)}selectBooth(t,e=!0){let i=Array.isArray(t)?t:[t];this.uiState.details=i[0],i.length===1&&i[0].schedule?.length&&(this.uiState.desiredOverlaySize="medium"),i.length===1&&i[0].layer&&!i[0].visible&&this.layerStore.mode===le.Radio&&this.layerStore.updateVisibility(i[0].layer,!0),e&&setTimeout(()=>this.moveToList(i),c||h?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||fe().then(()=>{ae(()=>{this.selectSearch(""),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:ne}}selectCategory(t){window.__resett&&window.__resett(),this.uiState.details=t,this.uiState.list={type:"category",category:t},this.uiState.desiredOverlaySize="full",t.exhibitors.find(i=>i.booths.find(r=>r.visible))||this.layerStore.updateVisibility(t.exhibitors[0]?.booths[0]?.layer,!0),setTimeout(()=>{this.uiState.moveToBooths=t.exhibitors.filter(i=>i.booths.find(r=>r.visible)).flatMap(i=>i.booths)},200)}selectEventItem(t,e=!0){if(this.uiState.hoveredExhibitor=null,this.uiState.details=t,this.uiState.desiredOverlaySize="medium",t.boothId){const i=this.boothStore.booths.find(r=>r.id===t.boothId);i&&i.layer&&!i.visible&&this.layerStore.mode===le.Radio&&this.layerStore.updateVisibility(i.layer,!0)}e&&setTimeout(()=>{if(t.boothId){const i=this.boothStore.booths.find(r=>r.id===t.boothId);i&&this.moveToList([i])}},c||h?500:50)}selectSearch(t){window.__resett&&window.__resett(),this.uiState.details=null,this.speakerStore.clearSelectedSpeaker(),this.uiState.list={type:"search",text:pe(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:""},i={target:{...t,layer:t.layer||e}};this.uiState.onBoothClick(i)}t.exhibitors.length===1&&t instanceof ve?(this.heatmapStore.forceTrack={action:de.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(){this.uiState.overlayPosition==="bottom"&&Se&&(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(i=>{if(i instanceof re)e.push(...i.booths.filter(r=>r.visible));else if(i instanceof oe)i.visible&&e.push(i);else if(i instanceof xe&&i.boothId){const r=this.boothStore.boothById.get(i.boothId);r?.visible&&e.push(r)}else i instanceof Ue&&this.speakerStore.getEventsBySpeaker(i.id).forEach(r=>{if(!r.boothId)return;const l=this.boothStore.boothById.get(r.boothId);l?.visible&&e.push(l)})}),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&&(me.log("Opening",t),t instanceof re?this.clickExhibitor(t):t instanceof be?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(i=>i.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"),h&&(this.uiState.desiredOverlaySize="full")}selectExhibitors(){this.uiState.list={type:"exhibitors",text:"",focused:!1},this.uiState.menu=!1,h&&(this.uiState.desiredOverlaySize="full")}selectTours(){this.uiState.list={type:"tours",text:"",focused:!1},this.uiState.menu=!1,h&&(this.uiState.desiredOverlaySize="full")}selectSpeakers(){this.uiState.list={type:"speakers",text:"",focused:!1},this.uiState.menu=!1,h&&(this.uiState.desiredOverlaySize="full")}selectSpeaker(t,e=!0){this.speakerStore.selectSpeaker(t,e)}resetFilters(){this.searchButtonsStore.clearAllFilters()}registerShortcutProviders(){this.shortcutRegistry.register(new Me(this)),this.shortcutRegistry.register(new Oe(this)),this.shortcutRegistry.register(new ze(this))}}})();export default He;
1
+ import{__decorate as i}from"tslib";import{action as s,computed as m,observable as u,runInAction as S}from"mobx";import{LANGUAGE_TYPE as d}from"../constants";import{RendererService as y}from"../renderer";import{URLFilterManager as b}from"../services/URLFilterManager";import{GaEventActions as w}from"../tools/gtag";import g from"../tools/logger";import{isWebGlSupported as v}from"../utils";import{resetLocale as k}from"../utils/i18n";import h from"../utils/is-mobile";import n from"../utils/is-webview";import{sanitizeSearch as x}from"../utils/sanitizeText";import B from"./BookmarksStore";import _,{BoothBase as c,RegularBooth as L}from"./BoothStore";import C from"./CategoryFilterStore";import E,{Category as T}from"./CategoryStore";import I,{EventItem as F}from"./EventStore";import M,{Exhibitor as p}from"./ExhibitorStore";import O from"./FuzzySearchEngineStore";import z from"./HeatmapStore";import R from"./IntercomStore";import A,{LayersMode as f}from"./LayerStore";import P from"./MaplibreStore";import V from"./PoiTypeStore";import{SearchShortcutProvider as G}from"./providers/SearchShortcutProvider";import{SessionsShortcutProvider as q}from"./providers/SessionsShortcutProvider";import{SpeakerShortcutProvider as N}from"./providers/SpeakerShortcutProvider";import U from"./RoutePlannerStore";import W from"./RouteStore";import j from"./SearchButtonsStore";import H from"./SearchStore";import K from"./SessionsFilterStore";import{ShortcutRegistry as Y}from"./ShortcutRegistry";import $ from"./SpeakerFilterStore";import D from"./SpeakerStore";import{SpeakerItem as J}from"./SpeakerStore";import Q from"./ToursStore";import X from"./UIState";export default class e{setResetCameraFn(t){this.resetCameraFn=t}constructor(){this.rendererService=new y,this.initialized=!1,this.categoryStore=new E(this),this.exhibitorStore=new M(this),this.boothStore=new _(this),this.routeStore=new W(this),this.routePlannerStore=new U(this),this.toursStore=new Q(this),this.uiState=new X(this),this.maplibreStore=new P(this),this.layerStore=new A,this.intercomStore=new R,this.eventStore=new I(this),this.heatmapStore=new z,this.poiTypeStore=new V(this),this.fuzzySearchEngineStore=new O(["name","title","fullName","booths.name"]),this.categoryFilterStore=new C(this),this.sessionsFilterStore=new K(this),this.speakerStore=new D(this),this.speakerFilterStore=new $(this),this.searchStore=new H(this),this.searchButtonsStore=new j(this),this.bookmarksStore=new B(this),this.urlFilterManager=new b(this),this.shortcutRegistry=new Y,this.registerShortcutProviders()}selectExhibitor(t,r=!0){this.uiState.hoveredExhibitor=null,this.uiState.details=t;var o=t.booths.filter(a=>a.visible),l=t.booths.filter(a=>!a.visible);!o.length&&l.length&&this.layerStore.updateVisibility(l[0].layer,!0),r&&setTimeout(()=>this.moveToList(t.booths.filter(a=>a.visible)),n||h?500:50)}selectBooth(t,r=!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===f.Radio&&this.layerStore.updateVisibility(o[0].layer,!0),r&&setTimeout(()=>this.moveToList(o),n||h?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||k().then(()=>{S(()=>{this.selectSearch(""),this.uiState.details=null,this.resetCameraFn?.(),this.uiState.menu=!1,this.searchStore.resetSearchBox(),this.searchButtonsStore.clearAllFilters()}),setTimeout(()=>{S(()=>{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:d}}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,r=!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===f.Radio&&this.layerStore.updateVisibility(o.layer,!0)}r&&setTimeout(()=>{if(t.boothId){const o=this.boothStore.booths.find(l=>l.id===t.boothId);o&&this.moveToList([o])}},n||h?500:50)}selectSearch(t){window.__resett&&window.__resett(),this.uiState.details=null,this.speakerStore.clearSelectedSpeaker(),this.uiState.list={type:"search",text:x(t,Object.keys(this.uiState.mapSettings).map(r=>`${r}=`)),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(r=>r.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 r={name:"",description:""},o={target:{...t,layer:t.layer||r}};this.uiState.onBoothClick(o)}t.exhibitors.length===1&&t instanceof L?(this.heatmapStore.forceTrack={action:w.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(){this.uiState.overlayPosition==="bottom"&&v&&(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 r=[];t.forEach(o=>{if(o instanceof p)r.push(...o.booths.filter(l=>l.visible));else if(o instanceof c)o.visible&&r.push(o);else if(o instanceof F&&o.boothId){const l=this.boothStore.boothById.get(o.boothId);l?.visible&&r.push(l)}else o instanceof J&&this.speakerStore.getEventsBySpeaker(o.id).forEach(l=>{if(!l.boothId)return;const a=this.boothStore.boothById.get(l.boothId);a?.visible&&r.push(a)})}),this.uiState.moveToBooths=r}moveToExhibitor(t){this.moveToList([t])}changeActiveListIndex(t){let r=this.uiState.activeListIndex+t;r=Math.max(0,Math.min(this.uiState.listItems.length-1,r)),this.uiState.activeListIndex=r}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&&(g.log("Opening",t),t instanceof p?this.clickExhibitor(t):t instanceof T?this.clickCategory(t):t instanceof c&&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(r=>t.categories.some(o=>o.id===r.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"),h&&(this.uiState.desiredOverlaySize="full")}selectExhibitors(){this.uiState.list={type:"exhibitors",text:"",focused:!1},this.uiState.menu=!1,h&&(this.uiState.desiredOverlaySize="full")}selectTours(){this.uiState.list={type:"tours",text:"",focused:!1},this.uiState.menu=!1,h&&(this.uiState.desiredOverlaySize="full")}selectSpeakers(){this.uiState.list={type:"speakers",text:"",focused:!1},this.uiState.menu=!1,h&&(this.uiState.desiredOverlaySize="full")}selectSpeaker(t,r=!0){this.speakerStore.selectSpeaker(t,r)}resetFilters(){this.searchButtonsStore.clearAllFilters()}registerShortcutProviders(){this.shortcutRegistry.register(new q(this)),this.shortcutRegistry.register(new N(this)),this.shortcutRegistry.register(new G(this))}}i([u],e.prototype,"initialized",void 0),i([u],e.prototype,"resetCameraFn",void 0),i([s],e.prototype,"setResetCameraFn",null),i([s],e.prototype,"selectExhibitor",null),i([s],e.prototype,"selectBooth",null),i([s],e.prototype,"reset",null),i([s],e.prototype,"selectNone",null),i([s],e.prototype,"selectBookmarks",null),i([s],e.prototype,"selectVisited",null),i([s],e.prototype,"selectLanguage",null),i([s],e.prototype,"selectCategory",null),i([s],e.prototype,"selectEventItem",null),i([s],e.prototype,"selectSearch",null),i([s],e.prototype,"clickBookmarks",null),i([s],e.prototype,"clickVisited",null),i([s],e.prototype,"clickLanguage",null),i([s],e.prototype,"clickCategory",null),i([s],e.prototype,"clickSeminars",null),i([s],e.prototype,"clickBoothInList",null),i([s],e.prototype,"clickBoothInList2",null),i([s],e.prototype,"clickBooth",null),i([s],e.prototype,"clickExhibitor2",null),i([s],e.prototype,"clickExhibitor",null),i([s],e.prototype,"showMap",null),i([s],e.prototype,"showOverlay",null),i([s],e.prototype,"toggleMapOverlay",null),i([s],e.prototype,"moveToList",null),i([s],e.prototype,"moveToExhibitor",null),i([s],e.prototype,"changeActiveListIndex",null),i([s],e.prototype,"toggleModal",null),i([s],e.prototype,"openGallery",null),i([s],e.prototype,"closeGallery",null),i([s],e.prototype,"openActiveListItem",null),i([s],e.prototype,"toggleCategoryFilter",null),i([s],e.prototype,"applyCategoryFilters",null),i([m],e.prototype,"filteredExhibitors",null),i([s],e.prototype,"selectSessions",null),i([s],e.prototype,"selectExhibitors",null),i([s],e.prototype,"selectTours",null),i([s],e.prototype,"selectSpeakers",null),i([s],e.prototype,"selectSpeaker",null),i([s],e.prototype,"resetFilters",null);
@@ -1 +1 @@
1
- import{__esDecorate as a,__runInitializers as u}from"tslib";import{action as c,computed as d,observable as g}from"mobx";import{t as p}from"../utils/i18n";import{findBooth as Q,Route as U}from"./RouteStore";let W=(()=>{let n=[],_,S=[],b=[],y,P=[],v=[],k,x=[],R=[],B,F=[],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],y=[g],k=[g],B=[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],a(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),a(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),a(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),a(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),a(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),a(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),a(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),a(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),a(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),a(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),a(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),a(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),a(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),a(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),a(this,null,$,{kind:"method",name:"removeItem",static:!1,private:!1,access:{has:t=>"removeItem"in t,get:t=>t.removeItem},metadata:e},null,n),a(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),a(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),a(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),a(null,null,y,{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},P,v),a(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},x,R),a(null,null,B,{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},F,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,P,null));source=(u(this,v),u(this,x,null));excludedVisitedCount=(u(this,R),u(this,F,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(){return this.rootStore.boothStore.booths}get startPointAutocompleteOptions(){const{exhibitorStore:e}=this.rootStore,t=this.startPointBoothOptions,o=[],r=new Set;return e.exhibitors.forEach(s=>{s.booths.forEach(l=>{r.add(l.id),o.push({value:l.id.toString(),label:`${s.name} - ${l.name}`})})}),t.filter(s=>!r.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(){const e=this.rootStore.routeStore.pathLayers;return e.map((t,o)=>{const r=e[o+1],i=t.layer?.basePriority??0,s=r?.layer?.basePriority??0,l=r?s<i?"up":"down":void 0;return{id:t.id,name:t.layer?.shortName,description:t.layer?.description,directionToNext:l}})}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(r=>r.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:r}=this.rootStore;r.list={type:"route-planner",source:t},r.details=null,r.menu=!1,this.buildRoute()}launchFromBookmarks(e){const{exhibitorStore:t,eventStore:o,boothStore:r}=this.rootStore,i=[];t.bookmarked.forEach(s=>{i.push({type:"exhibitor",entity:s,booth:s.booths[0]||null})}),r.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:r}=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),r=new Set(t),i=e.length>0&&[...o].every(h=>r.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 r=[];e.forEach(i=>{if(i!==t){const s=o.get(i);s&&s.length>0&&r.push(...s.splice(0))}}),this.items=r}detectStartPoint(){const{boothStore:e,poiTypeStore:t}=this.rootStore,o=["entrance","entrances"],r=t.poiTypes.find(i=>o.includes(i.name.toLowerCase()));return r&&e.booths.find(i=>i.poiTypeId===r.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
+ import{__decorate as u}from"tslib";import{action as a,computed as c,observable as y}from"mobx";import{t as m}from"../utils/i18n";import{findBooth as b,Route as g}from"./RouteStore";export default class n{constructor(t){this.items=[],this.startPoint=null,this.source=null,this.excludedVisitedCount=0,this.rootStore=t}get resolvedBooths(){const t=new Map;return this.startPoint&&t.set(this.startPoint.id,this.startPoint),this.items.forEach(o=>{o.booth&&t.set(o.booth.id,o.booth)}),Array.from(t.values())}get stopsCount(){return this.items.length}get startPointBoothOptions(){return this.rootStore.boothStore.booths}get startPointAutocompleteOptions(){const{exhibitorStore:t}=this.rootStore,o=this.startPointBoothOptions,r=[],i=new Set;return t.exhibitors.forEach(e=>{e.booths.forEach(l=>{i.add(l.id),r.push({value:l.id.toString(),label:`${e.name} - ${l.name}`})})}),o.filter(e=>!i.has(e.id)).forEach(e=>{r.push({value:e.id.toString(),label:e.name})}),r.sort((e,l)=>e.label.localeCompare(l.label,void 0,{sensitivity:"base"}))}get title(){return this.source==="bookmarks"?m("Bookmarks route"):""}get subtitleParts(){const{routeInfo:t}=this.rootStore.routeStore;let o;if(t?.time){const r=t.time;o=r<60?m("< 1 min"):m("~ {{n}} min",{n:Math.round(r/60)})}return{stops:m("{{count}} stops",{count:this.stopsCount}),from:this.startPoint?m("From {{name}}",{name:this.startPoint.name}):void 0,distance:t?t.distance:void 0,travelTime:o}}get routeFloors(){const t=this.rootStore.routeStore.pathLayers;return t.map((o,r)=>{const i=t[r+1],s=o.layer?.basePriority??0,e=i?.layer?.basePriority??0,l=i?e<s?"up":"down":void 0;return{id:o.id,name:o.layer?.shortName,description:o.layer?.description,directionToNext:l}})}get currentRouteFloor(){const t=this.routeFloors,o=this.rootStore.routeStore.currentRouteLayer;if(!t.length)return;if(!o)return t[0]?{id:t[0].id,name:t[0].name}:void 0;const r=t.find(i=>i.description?.toLowerCase()===o.description?.toLowerCase());return r?{id:r.id,name:r.name}:{id:t[0].id,name:t[0].name}}setRouteFloor(t){const o=this.rootStore.routeStore.pathLayers.find(r=>r.id===t.id);o?.layer&&this.rootStore.layerStore.updateVisibility(o.layer,!0)}launch(t,o="custom",r){this.excludedVisitedCount=t.filter(s=>s.type==="exhibitor"&&s.entity.visited).length,this.items=t.filter(s=>s.type==="exhibitor"?!s.entity.visited:!0),this.source=o,this.startPoint=r!==void 0?r:this.detectStartPoint();const{uiState:i}=this.rootStore;i.list={type:"route-planner",source:o},i.details=null,i.menu=!1,this.buildRoute()}launchFromBookmarks(t){const{exhibitorStore:o,eventStore:r,boothStore:i}=this.rootStore,s=[];o.bookmarked.forEach(e=>{s.push({type:"exhibitor",entity:e,booth:e.booths[0]||null})}),i.booths.filter(e=>e.exhibitors.length===0&&e.bookmarkedDirectly).forEach(e=>{s.push({type:"booth",entity:e,booth:e})}),this.launch(s,"bookmarks",t)}launchFromSlugs(t,o){const r=this.resolveSlugs(t);this.launch(r,"custom",o)}resolveSlugs(t){const{exhibitorStore:o,eventStore:r,boothStore:i}=this.rootStore;return t.filter(Boolean).map(s=>{const e=s.toLowerCase(),l=o.exhibitors.find(d=>d.slug?.toLowerCase()===e||d.externalId?.toLowerCase()===e);if(l)return{type:"exhibitor",entity:l,booth:l.booths[0]||null};const p=b(s);return p?{type:"booth",entity:p,booth:p}:null}).filter(s=>s!==null)}buildRoute(){const t=[];if(this.startPoint&&this.startPoint.name&&t.push(this.startPoint.name),this.items.forEach(h=>{h.booth&&h.booth.name&&t.push(h.booth.name)}),t.length<2){this.rootStore.routeStore.updateRoute([]);return}let o;try{const h=this.rootStore.fp?.getOptimizedRoutes?.(t);o=Array.isArray(h)?h.flatMap(S=>S?.waypoints??[]):[]}catch{o=[]}const r=new Set(t),i=new Set(o),s=t.length>0&&[...r].every(h=>i.has(h));(!o.length||!s)&&(o=t.slice()),this.reorderItemsByNames(o);const e=this.resolvedBooths;if(e.length<2){this.rootStore.routeStore.updateRoute([]);return}const l=e[0],p=e[e.length-1],d=e.slice(1,-1),f=new g(l,p,d);this.rootStore.routeStore.selectRoute(f,!1),this.rootStore.uiState.setIsMultiPointRoute(d.length>0)}reorderItemsByNames(t){const o=this.startPoint?this.startPoint.name:null,r=new Map;this.items.forEach(s=>{const e=s.booth?s.booth.name:null;e&&(r.has(e)||r.set(e,[]),r.get(e).push(s))});const i=[];t.forEach(s=>{if(s!==o){const e=r.get(s);e&&e.length>0&&i.push(...e.splice(0))}}),this.items=i}detectStartPoint(){const{boothStore:t,poiTypeStore:o}=this.rootStore,r=["entrance","entrances"],i=o.poiTypes.find(s=>r.includes(s.name.toLowerCase()));return i&&t.booths.find(s=>s.poiTypeId===i.id)||null}setStartPoint(t){this.startPoint=t,this.buildRoute()}removeItem(t){this.items.splice(t,1),this.buildRoute()}reorderItems(t,o){const[r]=this.items.splice(t,1);this.items.splice(o,0,r),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)}}u([y],n.prototype,"items",void 0),u([y],n.prototype,"startPoint",void 0),u([y],n.prototype,"source",void 0),u([y],n.prototype,"excludedVisitedCount",void 0),u([c],n.prototype,"resolvedBooths",null),u([c],n.prototype,"stopsCount",null),u([c],n.prototype,"startPointBoothOptions",null),u([c],n.prototype,"startPointAutocompleteOptions",null),u([c],n.prototype,"title",null),u([c],n.prototype,"subtitleParts",null),u([c],n.prototype,"routeFloors",null),u([c],n.prototype,"currentRouteFloor",null),u([a],n.prototype,"setRouteFloor",null),u([a],n.prototype,"launch",null),u([a],n.prototype,"launchFromBookmarks",null),u([a],n.prototype,"launchFromSlugs",null),u([a],n.prototype,"buildRoute",null),u([a],n.prototype,"setStartPoint",null),u([a],n.prototype,"removeItem",null),u([a],n.prototype,"reorderItems",null),u([a],n.prototype,"close",null);
@@ -1 +1 @@
1
- import{__esDecorate as a,__runInitializers as r}from"tslib";import{action as m,computed as E,observable as f}from"mobx";import{Box as S,Point as Ye,boxContainsPoint as He,pointDistance as Fe}from"@expofp/geometry";import c,{layersStore as L}from".";import{fpGeo as P}from"../data/fpGeo";import{getName as Je}from"../components/Kiosk/SetKiosk";import{DEFAULT_UNITS as Ne,ORIENTATION_GRANTED_KEY as Qe}from"../constants";import Be from"../data";import{getLayerSvg as et,svgArea as g}from"../data/svg";import{GaEventActions as tt,sendEventToGa as st}from"../tools/gtag";import Ue from"../tools/logger";import{areLayersEnabled as it}from"../utils/areLayersEnabled";import{calcSpeed as Ze}from"../utils/calcSpeed";import{calcTravelTime as qe}from"../utils/calcTravelTime";import{calculateRelativeBearing as at,convertGpsToLocal as $e,isValidPointCoords as Ve}from"../utils/gps";import{boothToEndpoint as Ke,buildRoute as rt,CURRENT_LOCATION_NAME as nt,CURRENT_POSITION_POINT_ID as ot,isWayfindingReady as lt,KIOSK_ANCHOR_POINT_ID as ct,toArbitraryPoint as je}from"../wayfinding";import{BoothBase as R}from"./BoothStore";import{uiState as _}from"./index";import{LayersMode as ut}from"./LayerStore";const b=s=>typeof s=="string"?Number(s.replace(",",".")):s;let dt=(()=>{let s=[],n,l=[],h=[],y,v=[],k=[],z,D=[],I=[],A,w=[],M=[],C,G=[],O=[],F,N=[],B=[],U,Z=[],q=[],$,V=[],K=[],j,W=[],X=[],Y,H=[],J=[],Q,ee=[],te=[],se,ie=[],ae=[],re,ne=[],oe=[],le,ce=[],ue=[],de,fe,me,he,pe,_e,ye,ke,ge,be,Re,ve,xe,Ee=[],Te=[],Le,Se,Pe,ze,De,Ie,Ae=[],we=[],Me,Ce,Ge;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;n=[f],y=[f],z=[f],A=[f],C=[f],F=[f],U=[f],$=[f],j=[f],Y=[f],Q=[f],se=[f],re=[f],le=[f],de=[E],fe=[m],me=[m],he=[m],pe=[E({keepAlive:!0})],_e=[m],ye=[m],ke=[E({keepAlive:!0})],ge=[E({keepAlive:!0})],be=[m],Re=[m],ve=[m],xe=[f],Le=[E],Se=[m],Pe=[m],ze=[m],De=[m],Ie=[f],Me=[m],Ce=[E({keepAlive:!0})],Ge=[m],a(this,null,de,{kind:"getter",name:"canFindLocation",static:!1,private:!1,access:{has:e=>"canFindLocation"in e,get:e=>e.canFindLocation},metadata:t},null,s),a(this,null,fe,{kind:"method",name:"selectRoute",static:!1,private:!1,access:{has:e=>"selectRoute"in e,get:e=>e.selectRoute},metadata:t},null,s),a(this,null,me,{kind:"method",name:"rebuildRouteFromPosition",static:!1,private:!1,access:{has:e=>"rebuildRouteFromPosition"in e,get:e=>e.rebuildRouteFromPosition},metadata:t},null,s),a(this,null,he,{kind:"method",name:"setStartPoint",static:!1,private:!1,access:{has:e=>"setStartPoint"in e,get:e=>e.setStartPoint},metadata:t},null,s),a(this,null,pe,{kind:"getter",name:"pathLayers",static:!1,private:!1,access:{has:e=>"pathLayers"in e,get:e=>e.pathLayers},metadata:t},null,s),a(this,null,_e,{kind:"method",name:"setMarkers",static:!1,private:!1,access:{has:e=>"setMarkers"in e,get:e=>e.setMarkers},metadata:t},null,s),a(this,null,ye,{kind:"method",name:"selectMarker",static:!1,private:!1,access:{has:e=>"selectMarker"in e,get:e=>e.selectMarker},metadata:t},null,s),a(this,null,ke,{kind:"getter",name:"selectedMarkers",static:!1,private:!1,access:{has:e=>"selectedMarkers"in e,get:e=>e.selectedMarkers},metadata:t},null,s),a(this,null,ge,{kind:"getter",name:"layers",static:!1,private:!1,access:{has:e=>"layers"in e,get:e=>e.layers},metadata:t},null,s),a(this,null,be,{kind:"method",name:"clickRoute",static:!1,private:!1,access:{has:e=>"clickRoute"in e,get:e=>e.clickRoute},metadata:t},null,s),a(this,null,Re,{kind:"method",name:"selectCurrentPosition",static:!1,private:!1,access:{has:e=>"selectCurrentPosition"in e,get:e=>e.selectCurrentPosition},metadata:t},null,s),a(this,null,ve,{kind:"method",name:"findLocation",static:!1,private:!1,access:{has:e=>"findLocation"in e,get:e=>e.findLocation},metadata:t},null,s),a(this,null,Le,{kind:"getter",name:"routeInfo",static:!1,private:!1,access:{has:e=>"routeInfo"in e,get:e=>e.routeInfo},metadata:t},null,s),a(this,null,Se,{kind:"method",name:"updateRoute",static:!1,private:!1,access:{has:e=>"updateRoute"in e,get:e=>e.updateRoute},metadata:t},null,s),a(this,null,Pe,{kind:"method",name:"updateRouteDistance",static:!1,private:!1,access:{has:e=>"updateRouteDistance"in e,get:e=>e.updateRouteDistance},metadata:t},null,s),a(this,null,ze,{kind:"method",name:"updateRoutePoints",static:!1,private:!1,access:{has:e=>"updateRoutePoints"in e,get:e=>e.updateRoutePoints},metadata:t},null,s),a(this,null,De,{kind:"method",name:"checkRoutes",static:!1,private:!1,access:{has:e=>"checkRoutes"in e,get:e=>e.checkRoutes},metadata:t},null,s),a(this,null,Me,{kind:"method",name:"setGpsTrackingEnabled",static:!1,private:!1,access:{has:e=>"setGpsTrackingEnabled"in e,get:e=>e.setGpsTrackingEnabled},metadata:t},null,s),a(this,null,Ce,{kind:"getter",name:"gpsEnabled",static:!1,private:!1,access:{has:e=>"gpsEnabled"in e,get:e=>e.gpsEnabled},metadata:t},null,s),a(this,null,Ge,{kind:"method",name:"setOnlyAccessible",static:!1,private:!1,access:{has:e=>"setOnlyAccessible"in e,get:e=>e.setOnlyAccessible},metadata:t},null,s),a(null,null,n,{kind:"field",name:"routeLines",static:!1,private:!1,access:{has:e=>"routeLines"in e,get:e=>e.routeLines,set:(e,i)=>{e.routeLines=i}},metadata:t},l,h),a(null,null,y,{kind:"field",name:"routeDistance",static:!1,private:!1,access:{has:e=>"routeDistance"in e,get:e=>e.routeDistance,set:(e,i)=>{e.routeDistance=i}},metadata:t},v,k),a(null,null,z,{kind:"field",name:"currentPosition",static:!1,private:!1,access:{has:e=>"currentPosition"in e,get:e=>e.currentPosition,set:(e,i)=>{e.currentPosition=i}},metadata:t},D,I),a(null,null,A,{kind:"field",name:"requestCompass",static:!1,private:!1,access:{has:e=>"requestCompass"in e,get:e=>e.requestCompass,set:(e,i)=>{e.requestCompass=i}},metadata:t},w,M),a(null,null,C,{kind:"field",name:"iconType",static:!1,private:!1,access:{has:e=>"iconType"in e,get:e=>e.iconType,set:(e,i)=>{e.iconType=i}},metadata:t},G,O),a(null,null,F,{kind:"field",name:"tempToBooth",static:!1,private:!1,access:{has:e=>"tempToBooth"in e,get:e=>e.tempToBooth,set:(e,i)=>{e.tempToBooth=i}},metadata:t},N,B),a(null,null,U,{kind:"field",name:"focusEnabled",static:!1,private:!1,access:{has:e=>"focusEnabled"in e,get:e=>e.focusEnabled,set:(e,i)=>{e.focusEnabled=i}},metadata:t},Z,q),a(null,null,$,{kind:"field",name:"prevZ",static:!1,private:!1,access:{has:e=>"prevZ"in e,get:e=>e.prevZ,set:(e,i)=>{e.prevZ=i}},metadata:t},V,K),a(null,null,j,{kind:"field",name:"markersData",static:!1,private:!1,access:{has:e=>"markersData"in e,get:e=>e.markersData,set:(e,i)=>{e.markersData=i}},metadata:t},W,X),a(null,null,Y,{kind:"field",name:"prevMarkers",static:!1,private:!1,access:{has:e=>"prevMarkers"in e,get:e=>e.prevMarkers,set:(e,i)=>{e.prevMarkers=i}},metadata:t},H,J),a(null,null,Q,{kind:"field",name:"showAccessible",static:!1,private:!1,access:{has:e=>"showAccessible"in e,get:e=>e.showAccessible,set:(e,i)=>{e.showAccessible=i}},metadata:t},ee,te),a(null,null,se,{kind:"field",name:"onlyAccessible",static:!1,private:!1,access:{has:e=>"onlyAccessible"in e,get:e=>e.onlyAccessible,set:(e,i)=>{e.onlyAccessible=i}},metadata:t},ie,ae),a(null,null,re,{kind:"field",name:"currentRouteLayer",static:!1,private:!1,access:{has:e=>"currentRouteLayer"in e,get:e=>e.currentRouteLayer,set:(e,i)=>{e.currentRouteLayer=i}},metadata:t},ne,oe),a(null,null,le,{kind:"field",name:"currentRouteExhibitor",static:!1,private:!1,access:{has:e=>"currentRouteExhibitor"in e,get:e=>e.currentRouteExhibitor,set:(e,i)=>{e.currentRouteExhibitor=i}},metadata:t},ce,ue),a(null,null,xe,{kind:"field",name:"routeUnits",static:!1,private:!1,access:{has:e=>"routeUnits"in e,get:e=>e.routeUnits,set:(e,i)=>{e.routeUnits=i}},metadata:t},Ee,Te),a(null,null,Ie,{kind:"field",name:"isGpsTrackingEnabled",static:!1,private:!1,access:{has:e=>"isGpsTrackingEnabled"in e,get:e=>e.isGpsTrackingEnabled,set:(e,i)=>{e.isGpsTrackingEnabled=i}},metadata:t},Ae,we),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}rootStore=r(this,s);cpTimeout;routeLines=r(this,l,[]);routeDistance=(r(this,h),r(this,v,null));currentPosition=(r(this,k),r(this,D,null));requestCompass=(r(this,I),r(this,w,!1));iconType=(r(this,M),r(this,G,0));tempToBooth=(r(this,O),r(this,N,null));focusEnabled=(r(this,B),r(this,Z,!0));prevZ=(r(this,q),r(this,V,null));markersData=(r(this,K),r(this,W,{icons:[],markers:[]}));prevMarkers=(r(this,X),r(this,H,[]));showAccessible=(r(this,J),r(this,ee,!1));onlyAccessible=(r(this,te),r(this,ie,!1));currentRouteLayer=(r(this,ae),r(this,ne,null));currentRouteExhibitor=(r(this,oe),r(this,ce,null));constructor(t){r(this,we),this.rootStore=t,this.focusEnabled=!window.location.search}get canFindLocation(){return!!_.kioskData||!!this.currentPosition}selectRoute(t,e=!0,i=!1){if(e&&(_.list={type:"search",text:"",focused:!1}),t&&!t.from&&t.to){const d=this.resolveFallbackFrom();d&&(t=new Route(d,t.to,t.waypoints))}t?.from&&t?.to&&t.from===t.to&&(t=null);let o=[];t?.from&&t?.to&&window.setTimeout(()=>{this.rootStore.showMap()},navigator.userAgent.toLowerCase().indexOf("android")>-1?400:50),t?.from instanceof R&&t.from.visible&&o.push(t.from),t?.to instanceof R&&t.to.visible&&(this.tempToBooth=null,o.push(t.to)),!t&&c.fp.onDirection&&c.fp.onDirection(null);const u=()=>{if(this.rootStore.moveToList(o),_.details=t,t&&(!t.from||!t.to)&&c.showOverlay(),t?.to&&t?.from){const d=ft(t.from);d&&this.rootStore.layerStore.updateVisibility(d,!0)}if(!this.currentRouteLayer){const d=We(this.rootStore.layerStore,t?.from),p=We(this.rootStore.layerStore,t?.to);d?this.currentRouteLayer=d:p&&(this.currentRouteLayer=p)}e&&t?.from&&t?.to&&st(tt.ClickDirections,`${t?.from?"From "+t.from.name:""} ${t?.to?"To "+t.to.name:""}`)};i?u():setTimeout(u,200)}rebuildRouteFromPosition(t){const e=_.selectedRoute;e?.to&&this.selectRoute(new Route(t,e.to,e.waypoints),!1,!0)}resolveFallbackFrom(){if(this.currentPosition)return je(this.currentPosition,nt,ot);const t=_.kioskData;return t?je({x:t.x,y:t.y,z:t.z},Je(),ct):null}setStartPoint(t){const e=_.selectedRoute;if(e?.to&&!e?.from&&t){const i=new Route(t,e.to,e.waypoints);this.selectRoute(i)}}get pathLayers(){return c.routeStore.routeLines?.map(t=>t.p0.layer)?.filter((t,e,i)=>i.indexOf(t)===e).map((t,e)=>({id:e+1,layer:c.layerStore.findLayer(t)}))}getNearestBooth(t){if(!t)return null;let e=this.rootStore.layerStore.findLayer(t.z);const i=t.lat&&t.lng?$e(t,P.properties.config):t;return this.rootStore.boothStore.booths.filter(o=>L.mode===ut.Default||!e?o.visible&&o.rect:o.rect&&(typeof t.z!="number"&&!t.z&&o.visible||e.name===o.layer?.name)).sort((o,u)=>Fe(i,o.rect.center)-Fe(i,u.rect.center))[0]||null}setMarkers(t){this.markersData.markers=(t?.markers??[]).map(mt),this.markersData.icons=t?.icons??[]}selectMarker(t,e){const i=this.markersData.markers.find(u=>u.id===t);this.markersData.markers.forEach(u=>u.active=!1),i&&(i.active=!0);let o=c.layerStore.findLayer(i?.z);if(e&&i){const u=c.rendererService.renderer;return o&&!o?.visible&&L.updateVisibility(o,!0),u?u.controls.panTo(i.x,i.y):(Ue.warn("Renderer is not initialized. Cannot pan to marker."),Promise.resolve())}return Promise.resolve()}get selectedMarkers(){return this.markersData.markers.filter(t=>t.active)}get layers(){var t=[];return c.routeStore.routeLines?.map(e=>e.p0.layer).forEach(e=>{t.indexOf(e)===-1&&t.push(e)}),t.map(e=>c.layerStore.layers.find(i=>i.name===e))}clickRoute(t,e){window.__resett&&window.__resett(),this.rootStore.uiState.menu=null,_.list.type==="route-planner"&&(_.list={type:"search",text:"",focused:!1}),this.selectRoute(new Route(t,e))}selectCurrentPosition(t,e=!0,i){clearTimeout(this.cpTimeout),t&&(t.x=b(t.x),t.y=b(t.y),t.lat=b(t.lat),t.lng=b(t.lng),it()||(t.z=null));const o=e&&this.rootStore.uiState.details&&!(this.rootStore.uiState.details instanceof Route),u=e&&!o&&(this.focusEnabled||this.prevZ!=t?.z);this.focusEnabled&&(this.focusEnabled=!1),this.prevZ=t?.z?.toString(),this.iconType=i?1:0;const d=t?ht(t):null;if(!d){this.currentPosition=null;return}const p=c.layerStore.findLayer(t.z),x=new CurrentPosition(d.x,d.y,p?.name||this.currentRouteLayer?.name,at(d),t.lat,t.lng);let Oe=!this.routeLines?.length;if(p&&this.routeLines?.length&&(Oe=!!this.routeLines.find(T=>T.p0.layer===p.name||T.p1.layer===p.name)),u&&Oe){const T=c.rendererService.renderer;if(p&&!p?.visible&&L.updateVisibility(p,!0),!T){Ue.warn("Renderer is not initialized. Cannot pan to current position.");return}T.controls.panTo(x.x,x.y)}this.currentPosition=x,this.gpsEnabled||(this.cpTimeout=setTimeout(()=>{this.currentPosition&&this.selectCurrentPosition(null,!1)},30*1e3))}findLocation(){if(!this.canFindLocation)return;if(c.maplibreStore.showMaplibre){_.moveToLocation=!0;return}const t=this.currentPosition??_.kioskData;if(!t)return;this.currentPosition&&localStorage.getItem(Qe)==="false"&&(c.routeStore.requestCompass=!0);const e=S.fromCenter(t,{x:100,y:100});let i;if(e.intersects(g))i=e;else{const u=Math.max(g.min.x,Math.min(t.x,g.max.x)),d=Math.max(g.min.y,Math.min(t.y,g.max.y)),p=Math.min(g.size.width,g.size.height)*.3,x=S.fromCenter({x:u,y:d},{x:p,y:p}).intersection(g);i=x?S.fromUnion(e,x):e}_.moveToRect=i;const o=c.layerStore.findLayer(t.z);o&&L.updateVisibility(o,!0)}routeUnits=(r(this,ue),r(this,Ee,Ne));get routeInfo(){const t=this.routeDistance,e=this.routeUnits;return t?{distance:`${t}${e}`,units:e,time:qe(t,Ze(e))}:null}updateRoute(t,e){!t?.length&&!this.routeLines.length||(this.routeLines=t,this.updateRoutePoints())}updateRouteDistance(t){if(t==null)return;const e=et(),i=(e.getAttribute("units")||Ne).toLowerCase?.().trim(),o=e.getAttribute("fp-ver")?.startsWith("5")??!1;this.routeDistance=Math.round(t/(o?1:10)),this.routeUnits=i,this.updateRoutePoints()}updateRoutePoints(){const t=_.selectedRoute,e=this.routeDistance,i=this.routeUnits;c.fp.onDirection&&setTimeout(()=>{c.fp.onDirection({from:Xe(t?.from??null),to:Xe(t?.to??null),lines:this.routeLines,distance:`${e}${i}`,units:i,time:qe(e,Ze(i))})},200)}checkRoutes(){if(!lt()){console.warn("checkRoutes: wayfinding is not initialized \u2014 call createWayfinding() first. Skipping route check.");return}const t=c.boothStore.booths;console.info(`Route check started ${t.length}.... `);for(let e=0;e<t.length;e++){const i=t[e];for(let o=e+1;o<t.length;o++){const u=t[o];rt(Ke(i),Ke(u)).lines.length||console.warn(`No route found from ${i.name} to ${u.name}`)}}console.info("Route check done....")}isGpsTrackingEnabled=(r(this,Te),r(this,Ae,!0));setGpsTrackingEnabled(t){this.isGpsTrackingEnabled=t}get gpsEnabled(){return Be.autoTrackingGps&&this.isGpsTrackingEnabled&&!Be.enableIPS}setOnlyAccessible(t){this.onlyAccessible=t}}})();export default dt;function ft(s){if(s)return s instanceof R?s.layer?.name:s.layer}function We(s,n){return n?n instanceof R?n.layer??null:s.findLayer(n.layer):null}function mt(s){return{...s,x:b(s.x),y:b(s.y),lat:b(s.lat),lng:b(s.lng)}}function ht(s){let n=null,l=null;return P&&(n=P.properties.config),n&&He({min:n.p0,max:n.p2},s)?l={...s}:n&&Ve(s.lat)&&Ve(s.lng)?l=$e(s,n):n||(l=s),l||null}export function findBooth(s){return c.boothStore.findBooth(s)||c.exhibitorStore.findExhibitor(s)?.booths[0]}export function findEntityByExternalId(s){const n=c.boothStore.boothByExternalId.get(s);if(n)return{type:"booth",entity:n};const l=c.exhibitorStore.exhibitorByExternalId.get(s);if(l)return{type:"exhibitor",entity:l}}export function separateExternalIds(s){const n=[],l=[];for(const h of s){const y=findEntityByExternalId(h);y&&(y.type==="booth"?n.push(h):l.push(h))}return{boothExternalIds:n,exhibitorExternalIds:l}}export function extractRoute(s,n,l){return new Route(findBooth(s)??null,findBooth(n)??null,l?.map(h=>findBooth(h)))}export class Route{from;to;waypoints;constructor(n,l,h){this.from=n,this.to=l,this.waypoints=h;const y=n instanceof R?n.id:void 0,v=l instanceof R?l.id:void 0;this.waypoints=h?.filter(k=>k&&k.id!==y&&k.id!==v)}}function Xe(s){return s?s instanceof R?{id:s.id,name:s.name,externalId:s.externalId,layer:{name:s.layer?.name,description:s.layer?.description}}:{id:Number.MAX_SAFE_INTEGER,name:s.name,externalId:void 0,layer:{name:s.layer,description:void 0}}:null}export class CurrentPosition extends Ye{x;y;z;angle;lat;lng;constructor(n,l,h,y,v,k){super(n,l),this.x=n,this.y=l,this.z=h,this.angle=y,this.lat=v,this.lng=k}}
1
+ import{__decorate as n}from"tslib";import{action as f,computed as g,observable as u}from"mobx";import{Box as R,Point as _,boxContainsPoint as O,pointDistance as T}from"@expofp/geometry";import c,{layersStore as x}from".";import{fpGeo as S}from"../data/fpGeo";import{getName as F}from"../components/Kiosk/SetKiosk";import{DEFAULT_UNITS as L,ORIENTATION_GRANTED_KEY as G}from"../constants";import E from"../data";import{getLayerSvg as B,svgArea as m}from"../data/svg";import{GaEventActions as U,sendEventToGa as $}from"../tools/gtag";import P from"../tools/logger";import{areLayersEnabled as V}from"../utils/areLayersEnabled";import{calcSpeed as D}from"../utils/calcSpeed";import{calcTravelTime as w}from"../utils/calcTravelTime";import{calculateRelativeBearing as K,convertGpsToLocal as A,isValidPointCoords as I}from"../utils/gps";import{boothToEndpoint as C,buildRoute as W,CURRENT_LOCATION_NAME as Z,CURRENT_POSITION_POINT_ID as q,isWayfindingReady as j,KIOSK_ANCHOR_POINT_ID as X,toArbitraryPoint as M}from"../wayfinding";import{BoothBase as y}from"./BoothStore";import{uiState as h}from"./index";import{LayersMode as Y}from"./LayerStore";const d=o=>typeof o=="string"?Number(o.replace(",",".")):o;export default class i{constructor(t){this.routeLines=[],this.routeDistance=null,this.currentPosition=null,this.requestCompass=!1,this.iconType=0,this.tempToBooth=null,this.focusEnabled=!0,this.prevZ=null,this.markersData={icons:[],markers:[]},this.prevMarkers=[],this.showAccessible=!1,this.onlyAccessible=!1,this.currentRouteLayer=null,this.currentRouteExhibitor=null,this.routeUnits=L,this.isGpsTrackingEnabled=!0,this.rootStore=t,this.focusEnabled=!window.location.search}get canFindLocation(){return!!h.kioskData||!!this.currentPosition}selectRoute(t,e=!0,r=!1){if(e&&(h.list={type:"search",text:"",focused:!1}),t&&!t.from&&t.to){const l=this.resolveFallbackFrom();l&&(t=new Route(l,t.to,t.waypoints))}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 instanceof y&&t.from.visible&&s.push(t.from),t?.to instanceof y&&t.to.visible&&(this.tempToBooth=null,s.push(t.to)),!t&&c.fp.onDirection&&c.fp.onDirection(null);const a=()=>{if(this.rootStore.moveToList(s),h.details=t,t&&(!t.from||!t.to)&&c.showOverlay(),t?.to&&t?.from){const l=H(t.from);l&&this.rootStore.layerStore.updateVisibility(l,!0)}if(!this.currentRouteLayer){const l=N(this.rootStore.layerStore,t?.from),p=N(this.rootStore.layerStore,t?.to);l?this.currentRouteLayer=l:p&&(this.currentRouteLayer=p)}e&&t?.from&&t?.to&&$(U.ClickDirections,`${t?.from?"From "+t.from.name:""} ${t?.to?"To "+t.to.name:""}`)};r?a():setTimeout(a,200)}rebuildRouteFromPosition(t){const e=h.selectedRoute;e?.to&&this.selectRoute(new Route(t,e.to,e.waypoints),!1,!0)}resolveFallbackFrom(){if(this.currentPosition)return M(this.currentPosition,Z,q);const t=h.kioskData;return t?M({x:t.x,y:t.y,z:t.z},F(),X):null}setStartPoint(t){const e=h.selectedRoute;if(e?.to&&!e?.from&&t){const r=new Route(t,e.to,e.waypoints);this.selectRoute(r)}}get pathLayers(){return c.routeStore.routeLines?.map(t=>t.p0.layer)?.filter((t,e,r)=>r.indexOf(t)===e).map((t,e)=>({id:e+1,layer:c.layerStore.findLayer(t)}))}getNearestBooth(t){if(!t)return null;let e=this.rootStore.layerStore.findLayer(t.z);const r=t.lat&&t.lng?A(t,S.properties.config):t;return this.rootStore.boothStore.booths.filter(s=>x.mode===Y.Default||!e?s.visible&&s.rect:s.rect&&(typeof t.z!="number"&&!t.z&&s.visible||e.name===s.layer?.name)).sort((s,a)=>T(r,s.rect.center)-T(r,a.rect.center))[0]||null}setMarkers(t){this.markersData.markers=(t?.markers??[]).map(J),this.markersData.icons=t?.icons??[]}selectMarker(t,e){const r=this.markersData.markers.find(a=>a.id===t);this.markersData.markers.forEach(a=>a.active=!1),r&&(r.active=!0);let s=c.layerStore.findLayer(r?.z);if(e&&r){const a=c.rendererService.renderer;return s&&!s?.visible&&x.updateVisibility(s,!0),a?a.controls.panTo(r.x,r.y):(P.warn("Renderer is not initialized. Cannot pan to marker."),Promise.resolve())}return Promise.resolve()}get selectedMarkers(){return this.markersData.markers.filter(t=>t.active)}get layers(){var t=[];return c.routeStore.routeLines?.map(e=>e.p0.layer).forEach(e=>{t.indexOf(e)===-1&&t.push(e)}),t.map(e=>c.layerStore.layers.find(r=>r.name===e))}clickRoute(t,e){window.__resett&&window.__resett(),this.rootStore.uiState.menu=null,h.list.type==="route-planner"&&(h.list={type:"search",text:"",focused:!1}),this.selectRoute(new Route(t,e))}selectCurrentPosition(t,e=!0,r){clearTimeout(this.cpTimeout),t&&(t.x=d(t.x),t.y=d(t.y),t.lat=d(t.lat),t.lng=d(t.lng),V()||(t.z=null));const s=e&&this.rootStore.uiState.details&&!(this.rootStore.uiState.details instanceof Route),a=e&&!s&&(this.focusEnabled||this.prevZ!=t?.z);this.focusEnabled&&(this.focusEnabled=!1),this.prevZ=t?.z?.toString(),this.iconType=r?1:0;const l=t?Q(t):null;if(!l){this.currentPosition=null;return}const p=c.layerStore.findLayer(t.z),b=new CurrentPosition(l.x,l.y,p?.name||this.currentRouteLayer?.name,K(l),t.lat,t.lng);let v=!this.routeLines?.length;if(p&&this.routeLines?.length&&(v=!!this.routeLines.find(k=>k.p0.layer===p.name||k.p1.layer===p.name)),a&&v){const k=c.rendererService.renderer;if(p&&!p?.visible&&x.updateVisibility(p,!0),!k){P.warn("Renderer is not initialized. Cannot pan to current position.");return}k.controls.panTo(b.x,b.y)}this.currentPosition=b,this.gpsEnabled||(this.cpTimeout=setTimeout(()=>{this.currentPosition&&this.selectCurrentPosition(null,!1)},30*1e3))}findLocation(){if(!this.canFindLocation)return;if(c.maplibreStore.showMaplibre){h.moveToLocation=!0;return}const t=this.currentPosition??h.kioskData;if(!t)return;this.currentPosition&&localStorage.getItem(G)==="false"&&(c.routeStore.requestCompass=!0);const e=R.fromCenter(t,{x:100,y:100});let r;if(e.intersects(m))r=e;else{const a=Math.max(m.min.x,Math.min(t.x,m.max.x)),l=Math.max(m.min.y,Math.min(t.y,m.max.y)),p=Math.min(m.size.width,m.size.height)*.3,b=R.fromCenter({x:a,y:l},{x:p,y:p}).intersection(m);r=b?R.fromUnion(e,b):e}h.moveToRect=r;const s=c.layerStore.findLayer(t.z);s&&x.updateVisibility(s,!0)}get routeInfo(){const t=this.routeDistance,e=this.routeUnits;return t?{distance:`${t}${e}`,units:e,time:w(t,D(e))}:null}updateRoute(t,e){!t?.length&&!this.routeLines.length||(this.routeLines=t,this.updateRoutePoints())}updateRouteDistance(t){if(t==null)return;const e=B(),r=(e.getAttribute("units")||L).toLowerCase?.().trim(),s=e.getAttribute("fp-ver")?.startsWith("5")??!1;this.routeDistance=Math.round(t/(s?1:10)),this.routeUnits=r,this.updateRoutePoints()}updateRoutePoints(){const t=h.selectedRoute,e=this.routeDistance,r=this.routeUnits;c.fp.onDirection&&setTimeout(()=>{c.fp.onDirection({from:z(t?.from??null),to:z(t?.to??null),lines:this.routeLines,distance:`${e}${r}`,units:r,time:w(e,D(r))})},200)}checkRoutes(){if(!j()){console.warn("checkRoutes: wayfinding is not initialized \u2014 call createWayfinding() first. Skipping route check.");return}const t=c.boothStore.booths;console.info(`Route check started ${t.length}.... `);for(let e=0;e<t.length;e++){const r=t[e];for(let s=e+1;s<t.length;s++){const a=t[s];W(C(r),C(a)).lines.length||console.warn(`No route found from ${r.name} to ${a.name}`)}}console.info("Route check done....")}setGpsTrackingEnabled(t){this.isGpsTrackingEnabled=t}get gpsEnabled(){return E.autoTrackingGps&&this.isGpsTrackingEnabled&&!E.enableIPS}setOnlyAccessible(t){this.onlyAccessible=t}}n([u],i.prototype,"routeLines",void 0),n([u],i.prototype,"routeDistance",void 0),n([u],i.prototype,"currentPosition",void 0),n([u],i.prototype,"requestCompass",void 0),n([u],i.prototype,"iconType",void 0),n([u],i.prototype,"tempToBooth",void 0),n([u],i.prototype,"focusEnabled",void 0),n([u],i.prototype,"prevZ",void 0),n([u],i.prototype,"markersData",void 0),n([u],i.prototype,"prevMarkers",void 0),n([u],i.prototype,"showAccessible",void 0),n([u],i.prototype,"onlyAccessible",void 0),n([u],i.prototype,"currentRouteLayer",void 0),n([u],i.prototype,"currentRouteExhibitor",void 0),n([g],i.prototype,"canFindLocation",null),n([f],i.prototype,"selectRoute",null),n([f],i.prototype,"rebuildRouteFromPosition",null),n([f],i.prototype,"setStartPoint",null),n([g({keepAlive:!0})],i.prototype,"pathLayers",null),n([f],i.prototype,"setMarkers",null),n([f],i.prototype,"selectMarker",null),n([g({keepAlive:!0})],i.prototype,"selectedMarkers",null),n([g({keepAlive:!0})],i.prototype,"layers",null),n([f],i.prototype,"clickRoute",null),n([f],i.prototype,"selectCurrentPosition",null),n([f],i.prototype,"findLocation",null),n([u],i.prototype,"routeUnits",void 0),n([g],i.prototype,"routeInfo",null),n([f],i.prototype,"updateRoute",null),n([f],i.prototype,"updateRouteDistance",null),n([f],i.prototype,"updateRoutePoints",null),n([f],i.prototype,"checkRoutes",null),n([u],i.prototype,"isGpsTrackingEnabled",void 0),n([f],i.prototype,"setGpsTrackingEnabled",null),n([g({keepAlive:!0})],i.prototype,"gpsEnabled",null),n([f],i.prototype,"setOnlyAccessible",null);function H(o){if(o)return o instanceof y?o.layer?.name:o.layer}function N(o,t){return t?t instanceof y?t.layer??null:o.findLayer(t.layer):null}function J(o){return{...o,x:d(o.x),y:d(o.y),lat:d(o.lat),lng:d(o.lng)}}function Q(o){let t=null,e=null;return S&&(t=S.properties.config),t&&O({min:t.p0,max:t.p2},o)?e={...o}:t&&I(o.lat)&&I(o.lng)?e=A(o,t):t||(e=o),e||null}export function findBooth(o){return c.boothStore.findBooth(o)||c.exhibitorStore.findExhibitor(o)?.booths[0]}export function findEntityByExternalId(o){const t=c.boothStore.boothByExternalId.get(o);if(t)return{type:"booth",entity:t};const e=c.exhibitorStore.exhibitorByExternalId.get(o);if(e)return{type:"exhibitor",entity:e}}export function separateExternalIds(o){const t=[],e=[];for(const r of o){const s=findEntityByExternalId(r);s&&(s.type==="booth"?t.push(r):e.push(r))}return{boothExternalIds:t,exhibitorExternalIds:e}}export function extractRoute(o,t,e){return new Route(findBooth(o)??null,findBooth(t)??null,e?.map(r=>findBooth(r)))}export class Route{constructor(t,e,r){this.from=t,this.to=e,this.waypoints=r;const s=t instanceof y?t.id:void 0,a=e instanceof y?e.id:void 0;this.waypoints=r?.filter(l=>l&&l.id!==s&&l.id!==a)}}function z(o){return o?o instanceof y?{id:o.id,name:o.name,externalId:o.externalId,layer:{name:o.layer?.name,description:o.layer?.description}}:{id:Number.MAX_SAFE_INTEGER,name:o.name,externalId:void 0,layer:{name:o.layer,description:void 0}}:null}export class CurrentPosition extends _{constructor(t,e,r,s,a,l){super(t,e),this.x=t,this.y=e,this.z=r,this.angle=s,this.lat=a,this.lng=l}}
@@ -58,7 +58,7 @@ export default class SearchStore {
58
58
  syncWithUIState(): void;
59
59
  get actionButtonIcon(): "icon-close" | "icon-search";
60
60
  clearAndSelectSearch(): void;
61
- get backMode(): "menu" | "back";
61
+ get backMode(): "back" | "menu";
62
62
  get isMobileDetailsMode(): boolean;
63
63
  get shouldShowTitle(): boolean;
64
64
  get searchState(): {
@@ -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{LANGUAGE_TYPE as ce,MOBILE_BREAKPOINT as he}from"../constants";import S from"../data";import{goBack as g}from"../services/url-sync";import le from"../tools/settings";import{t as n}from"../utils/i18n";import{sanitizeSearch as ne}from"../utils/sanitizeText";import{Route as f}from"./RouteStore";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,h=!1){r.list={type:"search",text:"",focused:h}}static returnToSessions(r,h=!1){r.list={type:"sessions",text:"",focused:h}}static returnToTours(r,h=!1){r.list={type:"tours",text:"",focused:h}}static openMenu(r){r.menu=!0}static closeMenu(r){r.menu=!1}static clearListScroll(r,h){r.clearListScroll(h)}static resetActiveListIndex(r){r.activeListIndex=-1}}let ue=(()=>{let a=[],r,h=[],x=[],m,_=[],B=[],k,y=[],b=[],v,F=[],T=[],M,I,C,A,w,z,L,O,E,P,W,D,U,R,j,G,K,N,X,Y,H,V,$,q,J,Q,Z,ee,te,se,ae,ie,re,oe;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;r=[d],m=[d],k=[d],v=[d],M=[l],I=[l],C=[l],A=[l],w=[l],z=[l],L=[l],O=[l],E=[l],P=[l],W=[l],D=[l],U=[l],R=[l],j=[c],G=[c],K=[c],N=[c],X=[c],Y=[c],H=[c],V=[c],$=[c],q=[c],J=[c],Q=[c],Z=[c],ee=[c],te=[l],se=[c],ae=[l],ie=[l],re=[l],oe=[l],s(this,null,M,{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,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,L,{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,O,{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,R,{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,X,{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,Y,{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,H,{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,V,{kind:"method",name:"resetSearchButtonState",static:!1,private:!1,access:{has:e=>"resetSearchButtonState"in e,get:e=>e.resetSearchButtonState},metadata:t},null,a),s(this,null,$,{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,q,{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,J,{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,Z,{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,ee,{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,te,{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,se,{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,ae,{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,ie,{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,re,{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,oe,{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},h,x),s(null,null,m,{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},_,B),s(null,null,k,{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,b),s(null,null,v,{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},F,T),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}rootStore=u(this,a);searchText=u(this,h,"");isFocused=(u(this,x),u(this,_,!1));isClearMode=(u(this,B),u(this,y,!1));skipInputFocus=(u(this,b),u(this,F,!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:o}=this.uiState,p=S.isRebooking&&o.type==="exhibitors";return!this.shouldShowSearchInput||o.type==="sessions"||o.type==="tours"||o.type==="speakers"||o.type==="exhibitors"&&!p?!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"&&!S.isRebooking?"close":this.searchText?"clear":"close"}get shouldShowShadow(){const{menu:t,details:e,list:o}=this.uiState,p=o.type==="search"&&!!o.text;return!(this.rootStore.fp.alwaysShowSidebar||t||e!==null||o.type!=="search"||p||this.isFocused||this.uiState.heatmap)}get placeholder(){const{list:t,heatmapYah:e}=this.uiState;return t.type==="sessions"?n("Search sessions"):t.type==="tours"?n("Search Guided Tours"):t.type==="exhibitors"?n("Search exhibitors"):t.type==="speakers"?n("Search speakers"):le.EXPO.startsWith("lenzerheidemotorclassics")?"SUCHE":le.EXPO.startsWith("jetlag")?"Search location or artist":e?n("Find values greater than"):this.uiState.hasAppliedFilters?n("Search"):S.searchText||n("Search")}get searchBoxClass(){return{"is-details":this.searchBoxMode==="details"&&!(this.uiState.details instanceof f),"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 f,"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"?n("Close"):this.searchText?n("Clear search"):n("Close")}selectSearch(t){window.__resett&&window.__resett(),this.uiState.details=null;const e=ne(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",this.backMode==="menu"){this.resetSearchButtonState(),i.openMenu(t);return}if(e.type==="route-planner"){this.rootStore.routePlannerStore.close(),this.rootStore.selectBookmarks(),g();return}if(e.type==="multi-point-tour"&&!t.details){i.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,i.closeMenu(t);return}if(e.type==="tours"&&t.details instanceof f){t.details=null;return}if(e.type==="sessions"||e.type==="tours"||e.type==="exhibitors"){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):g();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 ce: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"){if(S.isRebooking){this.searchBoxMode==="search"&&this.searchText?(this.setSearchText(""),this.isClearMode=!0,this.clearActiveFilters()):this.resetSearchBox();return}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()}resetSearchButtonState(){const{uiState:t}=this;this.rootStore.searchButtonsStore.clearAllFilters(),this.rootStore.searchButtonsStore.setSubButtonId(null),this.rootStore.searchButtonsStore.hideSubButtons(),t.selectedTrack=null,this.searchText="",this.isClearMode=!1}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(){const t=this.uiState.list.type;return(t==="bookmarks"||t==="visited")&&!this.uiState.details&&!this.uiState.menu||this.shouldShowSearchInput&&!this.searchText?"menu":"back"}get isMobileDetailsMode(){return window.innerWidth<he&&this.uiState.details!==null&&this.uiState.overlaySize==="full"&&!(this.uiState.details instanceof f)}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;
1
+ import{__decorate as s}from"tslib";import{action as a,computed as o,observable as u}from"mobx";import{LANGUAGE_TYPE as y,MOBILE_BREAKPOINT as x}from"../constants";import c from"../data";import{goBack as d}from"../services/url-sync";import p from"../tools/settings";import{t as l}from"../utils/i18n";import{sanitizeSearch as B}from"../utils/sanitizeText";import{Route as n}from"./RouteStore";class r{static closeDetails(t){return t.details?(t.details=null,!0):!1}static closeMultiPointTour(t){return t.rootStore.fp.hidePathways(),!0}static clearSearchAndFocus(t){return t.searchText?(t.setSearchText(""),t.setFocused(!0),!0):!1}static returnToSearch(t,i=!1){t.list={type:"search",text:"",focused:i}}static returnToSessions(t,i=!1){t.list={type:"sessions",text:"",focused:i}}static returnToTours(t,i=!1){t.list={type:"tours",text:"",focused:i}}static openMenu(t){t.menu=!0}static closeMenu(t){t.menu=!1}static clearListScroll(t,i){t.clearListScroll(i)}static resetActiveListIndex(t){t.activeListIndex=-1}}export default class e{constructor(t){this.searchText="",this.isFocused=!1,this.isClearMode=!1,this.skipInputFocus=!1,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:i,list:h}=this.uiState,S=c.isRebooking&&h.type==="exhibitors";return!this.shouldShowSearchInput||h.type==="sessions"||h.type==="tours"||h.type==="speakers"||h.type==="exhibitors"&&!S?!0:t||i!==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"&&!c.isRebooking?"close":this.searchText?"clear":"close"}get shouldShowShadow(){const{menu:t,details:i,list:h}=this.uiState,S=h.type==="search"&&!!h.text;return!(this.rootStore.fp.alwaysShowSidebar||t||i!==null||h.type!=="search"||S||this.isFocused||this.uiState.heatmap)}get placeholder(){const{list:t,heatmapYah:i}=this.uiState;return t.type==="sessions"?l("Search sessions"):t.type==="tours"?l("Search Guided Tours"):t.type==="exhibitors"?l("Search exhibitors"):t.type==="speakers"?l("Search speakers"):p.EXPO.startsWith("lenzerheidemotorclassics")?"SUCHE":p.EXPO.startsWith("jetlag")?"Search location or artist":i?l("Find values greater than"):this.uiState.hasAppliedFilters?l("Search"):c.searchText||l("Search")}get searchBoxClass(){return{"is-details":this.searchBoxMode==="details"&&!(this.uiState.details instanceof n),"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 n,"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"?l("Close"):this.searchText?l("Clear search"):l("Close")}selectSearch(t){window.__resett&&window.__resett(),this.uiState.details=null;const i=B(t||"",Object.keys(this.uiState.mapSettings).map(h=>`${h}=`));this.setSearchText(i),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:i}=t;if(t.desiredOverlaySize="full",this.backMode==="menu"){this.resetSearchButtonState(),r.openMenu(t);return}if(i.type==="route-planner"){this.rootStore.routePlannerStore.close(),this.rootStore.selectBookmarks(),d();return}if(i.type==="multi-point-tour"&&!t.details){r.returnToTours(t,!1),this.rootStore.fp.hidePathways();return}if(t.details){t.details=null,d();return}if(t.menu){i.type==="sessions"?t.list={type:"sessions",text:"",focused:!0}:i.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(i.type==="tours"&&t.details instanceof n){t.details=null;return}if(i.type==="sessions"||i.type==="tours"||i.type==="exhibitors"){if(r.closeDetails(t))return;this.clearActiveFilters(),r.returnToSearch(t,!1),this.selectSearchAndFocus();return}switch(i.type){case"filter":t.details=null;return;case"multi-point-tour":this.rootStore.fp.hidePathways(),r.closeDetails(t)?r.returnToTours(t,!1):d();return;case"category":this.rootStore.selectCategory(i.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 y:r.returnToSearch(t,!1),r.openMenu(t);return}r.closeDetails(t)||r.clearSearchAndFocus(this)||r.openMenu(t)}closeSearch(){const{uiState:t}=this,{list:i}=t;if(i.type==="route-planner"){this.rootStore.routePlannerStore.close(),r.returnToSearch(t,!1),this.resetSearchBox();return}if(r.closeDetails(t),r.clearListScroll(t,i.type),r.closeMultiPointTour(t),i.type==="bookmarks"){r.returnToSearch(t,!1),this.resetSearchBox();return}if(t.selectedCategory){r.returnToSearch(t,!1),this.resetSearchBox();return}if(i.type==="sessions"){this.closeSessions();return}if(i.type==="exhibitors"){if(c.isRebooking){this.searchBoxMode==="search"&&this.searchText?(this.setSearchText(""),this.isClearMode=!0,this.clearActiveFilters()):this.resetSearchBox();return}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()}resetSearchButtonState(){const{uiState:t}=this;this.rootStore.searchButtonsStore.clearAllFilters(),this.rootStore.searchButtonsStore.setSubButtonId(null),this.rootStore.searchButtonsStore.hideSubButtons(),t.selectedTrack=null,this.searchText="",this.isClearMode=!1}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(){const t=this.uiState.list.type;return(t==="bookmarks"||t==="visited")&&!this.uiState.details&&!this.uiState.menu||this.shouldShowSearchInput&&!this.searchText?"menu":"back"}get isMobileDetailsMode(){return window.innerWidth<x&&this.uiState.details!==null&&this.uiState.overlaySize==="full"&&!(this.uiState.details instanceof n)}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}}}s([u],e.prototype,"searchText",void 0),s([u],e.prototype,"isFocused",void 0),s([u],e.prototype,"isClearMode",void 0),s([u],e.prototype,"skipInputFocus",void 0),s([o],e.prototype,"searchBoxConfig",null),s([o],e.prototype,"searchBoxMode",null),s([o],e.prototype,"searchBoxTitle",null),s([o],e.prototype,"searchBoxSubtitle",null),s([o],e.prototype,"searchBoxBadge",null),s([o],e.prototype,"searchBoxIcon",null),s([o],e.prototype,"searchBoxActions",null),s([o],e.prototype,"shouldShowSearchInput",null),s([o],e.prototype,"shouldShowCloseButton",null),s([o],e.prototype,"closeButtonAction",null),s([o],e.prototype,"shouldShowShadow",null),s([o],e.prototype,"placeholder",null),s([o],e.prototype,"searchBoxClass",null),s([o],e.prototype,"ariaLabel",null),s([a],e.prototype,"selectSearch",null),s([a],e.prototype,"selectSearchAndFocus",null),s([a],e.prototype,"setSearchText",null),s([a],e.prototype,"setFocused",null),s([a],e.prototype,"handleBackAction",null),s([a],e.prototype,"closeSearch",null),s([a],e.prototype,"clearActiveFilters",null),s([a],e.prototype,"resetSearchButtonState",null),s([a],e.prototype,"handleSearchAction",null),s([a],e.prototype,"openOverlayWithoutInputFocus",null),s([a],e.prototype,"closeSessions",null),s([a],e.prototype,"closeExhibitors",null),s([a],e.prototype,"resetSearchBox",null),s([a],e.prototype,"syncWithUIState",null),s([o],e.prototype,"actionButtonIcon",null),s([a],e.prototype,"clearAndSelectSearch",null),s([o],e.prototype,"backMode",null),s([o],e.prototype,"isMobileDetailsMode",null),s([o],e.prototype,"shouldShowTitle",null),s([o],e.prototype,"searchState",null);
@@ -1 +1 @@
1
- import{__esDecorate as i,__runInitializers as d}from"tslib";import{action as n,computed as O,observable as b}from"mobx";import I from"./BaseFilterStore";const c={selectedTracks:[],selectedVenues:[],selectedSpeakers:[],date:"all",timeOfDay:"all",sortOrder:"desc",use24hFormat:!1,showBookmarksOnly:!1,showLiveOnly:!1};let T=(()=>{let h=I,s=[],u,p=[],f=[],m,F,v,g,S,_,y,A,k;return class extends h{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(h[Symbol.metadata]??null):void 0;u=[b],m=[n],F=[n],v=[n],g=[n],S=[n],_=[n],y=[n],A=[n],k=[O],i(this,null,m,{kind:"method",name:"setSearchText",static:!1,private:!1,access:{has:e=>"setSearchText"in e,get:e=>e.setSearchText},metadata:t},null,s),i(this,null,F,{kind:"method",name:"setPending",static:!1,private:!1,access:{has:e=>"setPending"in e,get:e=>e.setPending},metadata:t},null,s),i(this,null,v,{kind:"method",name:"applyFilters",static:!1,private:!1,access:{has:e=>"applyFilters"in e,get:e=>e.applyFilters},metadata:t},null,s),i(this,null,g,{kind:"method",name:"resetFilters",static:!1,private:!1,access:{has:e=>"resetFilters"in e,get:e=>e.resetFilters},metadata:t},null,s),i(this,null,S,{kind:"method",name:"resetAndApplyFilters",static:!1,private:!1,access:{has:e=>"resetAndApplyFilters"in e,get:e=>e.resetAndApplyFilters},metadata:t},null,s),i(this,null,_,{kind:"method",name:"openFilter",static:!1,private:!1,access:{has:e=>"openFilter"in e,get:e=>e.openFilter},metadata:t},null,s),i(this,null,y,{kind:"method",name:"closeFilter",static:!1,private:!1,access:{has:e=>"closeFilter"in e,get:e=>e.closeFilter},metadata:t},null,s),i(this,null,A,{kind:"method",name:"openFilterWithSections",static:!1,private:!1,access:{has:e=>"openFilterWithSections"in e,get:e=>e.openFilterWithSections},metadata:t},null,s),i(this,null,k,{kind:"getter",name:"activeFiltersCount",static:!1,private:!1,access:{has:e=>"activeFiltersCount"in e,get:e=>e.activeFiltersCount},metadata:t},null,s),i(null,null,u,{kind:"field",name:"state",static:!1,private:!1,access:{has:e=>"state"in e,get:e=>e.state,set:(e,a)=>{e.state=a}},metadata:t},p,f),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}state=(d(this,s),d(this,p,{isOpen:!1,selectedItems:[],pendingItems:[],searchText:"",visibleSections:["tracks","venues","speakers","date","time","sort","settings"],filters:this.createInitialFilters()}));constructor(t){super(t),d(this,f)}createInitialFilters(){const t={};return Object.keys(c).forEach(e=>{t[e]={value:c[e],pending:c[e]}}),t}setSearchText(t){this.state.searchText=t}setPending(t,e){this.state.filters[t].pending=e}applyFilters(){const{filters:t}=this.state,e=t.selectedTracks.value.length>0,a=t.selectedVenues.value.length>0;Object.keys(t).forEach(o=>{t[o].value=t[o].pending});const l=t.selectedTracks.value.length>0,r=t.selectedVenues.value.length>0;e!==l&&this.rootStore.shortcutRegistry.updateActivationOrderFromState("sessions","tracks",e,l),a!==r&&this.rootStore.shortcutRegistry.updateActivationOrderFromState("sessions","venues",a,r),this.state.selectedItems=[...this.state.pendingItems],this.state.isOpen=!1,this.updateUIState()}resetFilters(){const{filters:t}=this.state;Object.keys(c).forEach(e=>{t[e].pending=c[e]}),this.state.pendingItems=[],this.state.searchText=""}resetAndApplyFilters(){const{filters:t}=this.state,e=t.selectedTracks.value.length>0,a=t.selectedVenues.value.length>0;this.resetFilters(),Object.keys(t).forEach(o=>{t[o].value=t[o].pending});const l=!1,r=!1;e!==l&&this.rootStore.shortcutRegistry.updateActivationOrderFromState("sessions","tracks",e,l),a!==r&&this.rootStore.shortcutRegistry.updateActivationOrderFromState("sessions","venues",a,r),this.state.selectedItems=[],this.state.isOpen=!1,this.rootStore.uiState.list={type:"sessions",text:"",focused:!1}}openFilter(){this.state.isOpen=!0,this.state.pendingItems=[...this.state.selectedItems];const{filters:t}=this.state;Object.keys(t).forEach(e=>{t[e].pending=t[e].value})}closeFilter(){this.state.isOpen=!1,this.state.pendingItems=[...this.state.selectedItems];const{filters:t}=this.state;Object.keys(t).forEach(e=>{t[e].pending=t[e].value})}openFilterWithSections(t){this.state.visibleSections=t,this.openFilter()}get activeFiltersCount(){const{filters:t}=this.state;let e=0;return Object.keys(c).forEach(a=>{const l=t[a].value,r=c[a];Array.isArray(r)&&Array.isArray(l)?l.length>0&&e++:l!==r&&e++}),e}updateUIState(){this.rootStore.uiState.list={type:"sessions",text:"",focused:!1},this.rootStore.searchStore.setFocused(!0)}getFilteredItems(){return[]}}})();export default T;
1
+ import{__decorate as i}from"tslib";import{action as l,computed as p,observable as u}from"mobx";import h from"./BaseFilterStore";const n={selectedTracks:[],selectedVenues:[],selectedSpeakers:[],date:"all",timeOfDay:"all",sortOrder:"desc",use24hFormat:!1,showBookmarksOnly:!1,showLiveOnly:!1};export default class s extends h{constructor(e){super(e),this.state={isOpen:!1,selectedItems:[],pendingItems:[],searchText:"",visibleSections:["tracks","venues","speakers","date","time","sort","settings"],filters:this.createInitialFilters()}}createInitialFilters(){const e={};return Object.keys(n).forEach(t=>{e[t]={value:n[t],pending:n[t]}}),e}setSearchText(e){this.state.searchText=e}setPending(e,t){this.state.filters[e].pending=t}applyFilters(){const{filters:e}=this.state,t=e.selectedTracks.value.length>0,o=e.selectedVenues.value.length>0;Object.keys(e).forEach(c=>{e[c].value=e[c].pending});const r=e.selectedTracks.value.length>0,a=e.selectedVenues.value.length>0;t!==r&&this.rootStore.shortcutRegistry.updateActivationOrderFromState("sessions","tracks",t,r),o!==a&&this.rootStore.shortcutRegistry.updateActivationOrderFromState("sessions","venues",o,a),this.state.selectedItems=[...this.state.pendingItems],this.state.isOpen=!1,this.updateUIState()}resetFilters(){const{filters:e}=this.state;Object.keys(n).forEach(t=>{e[t].pending=n[t]}),this.state.pendingItems=[],this.state.searchText=""}resetAndApplyFilters(){const{filters:e}=this.state,t=e.selectedTracks.value.length>0,o=e.selectedVenues.value.length>0;this.resetFilters(),Object.keys(e).forEach(c=>{e[c].value=e[c].pending});const r=!1,a=!1;t!==r&&this.rootStore.shortcutRegistry.updateActivationOrderFromState("sessions","tracks",t,r),o!==a&&this.rootStore.shortcutRegistry.updateActivationOrderFromState("sessions","venues",o,a),this.state.selectedItems=[],this.state.isOpen=!1,this.rootStore.uiState.list={type:"sessions",text:"",focused:!1}}openFilter(){this.state.isOpen=!0,this.state.pendingItems=[...this.state.selectedItems];const{filters:e}=this.state;Object.keys(e).forEach(t=>{e[t].pending=e[t].value})}closeFilter(){this.state.isOpen=!1,this.state.pendingItems=[...this.state.selectedItems];const{filters:e}=this.state;Object.keys(e).forEach(t=>{e[t].pending=e[t].value})}openFilterWithSections(e){this.state.visibleSections=e,this.openFilter()}get activeFiltersCount(){const{filters:e}=this.state;let t=0;return Object.keys(n).forEach(o=>{const r=e[o].value,a=n[o];Array.isArray(a)&&Array.isArray(r)?r.length>0&&t++:r!==a&&t++}),t}updateUIState(){this.rootStore.uiState.list={type:"sessions",text:"",focused:!1},this.rootStore.searchStore.setFocused(!0)}getFilteredItems(){return[]}}i([u],s.prototype,"state",void 0),i([l],s.prototype,"setSearchText",null),i([l],s.prototype,"setPending",null),i([l],s.prototype,"applyFilters",null),i([l],s.prototype,"resetFilters",null),i([l],s.prototype,"resetAndApplyFilters",null),i([l],s.prototype,"openFilter",null),i([l],s.prototype,"closeFilter",null),i([l],s.prototype,"openFilterWithSections",null),i([p],s.prototype,"activeFiltersCount",null);
@@ -1 +1 @@
1
- export class ShortcutRegistry{providers=new Map;activationOrder=new Map;register(t){if(!t?.id)throw new Error("Provider must have a valid id");this.providers.set(t.id,t)}unregister(t){this.providers.delete(t),this.activationOrder.delete(t)}getShortcuts(t){const e=this.providers.get(t);if(!e)return[];const i=e.createShortcuts(),r=this.activationOrder.get(t);return r?this.sortShortcuts(i,r):i}sortShortcuts(t,e){const i=new Map(e.map((r,s)=>[r,s]));return t.sort((r,s)=>{if(r.active!==s.active)return r.active?-1:1;if(r.active&&s.active){const o=i.get(r.id),n=i.get(s.id);return o!==void 0&&n!==void 0?o-n:(o!==void 0?-1:0)-(n!==void 0?-1:0)}return 0})}handleShortcutClick(t,e){const i=this.providers.get(t);if(!i)return;const r=this.isShortcutActive(i,e);i.handleShortcutClick(e);const s=this.isShortcutActive(i,e);r!==s&&this.updateActivationOrder(t,e,r,s)}isShortcutActive(t,e){return t.createShortcuts().find(r=>r.id===e)?.active??!1}handleShortcutReset(t,e){const i=this.providers.get(t);if(!i?.handleShortcutReset)return;i.handleShortcutReset(e),this.activationOrder.get(t)?.includes(e)&&this.updateActivationOrder(t,e,!0,!1)}updateActivationOrder(t,e,i,r){const s=this.activationOrder.get(t)||[];let o;if(!i&&r)o=s.includes(e)?s:[...s,e];else if(i&&!r)o=s.filter(n=>n!==e);else return;o.length>0?this.activationOrder.set(t,o):this.activationOrder.delete(t)}updateActivationOrderFromState(t,e,i,r){this.updateActivationOrder(t,e,i,r)}shouldShowShortcuts(t){return this.providers.get(t)?.shouldShowShortcuts?.()??!0}getRegisteredProviders(){return Array.from(this.providers.keys())}isProviderRegistered(t){return this.providers.has(t)}clear(){this.providers.clear(),this.activationOrder.clear()}}
1
+ export class ShortcutRegistry{constructor(){this.providers=new Map,this.activationOrder=new Map}register(t){if(!t?.id)throw new Error("Provider must have a valid id");this.providers.set(t.id,t)}unregister(t){this.providers.delete(t),this.activationOrder.delete(t)}getShortcuts(t){const e=this.providers.get(t);if(!e)return[];const i=e.createShortcuts(),r=this.activationOrder.get(t);return r?this.sortShortcuts(i,r):i}sortShortcuts(t,e){const i=new Map(e.map((r,s)=>[r,s]));return t.sort((r,s)=>{if(r.active!==s.active)return r.active?-1:1;if(r.active&&s.active){const o=i.get(r.id),n=i.get(s.id);return o!==void 0&&n!==void 0?o-n:(o!==void 0?-1:0)-(n!==void 0?-1:0)}return 0})}handleShortcutClick(t,e){const i=this.providers.get(t);if(!i)return;const r=this.isShortcutActive(i,e);i.handleShortcutClick(e);const s=this.isShortcutActive(i,e);r!==s&&this.updateActivationOrder(t,e,r,s)}isShortcutActive(t,e){return t.createShortcuts().find(r=>r.id===e)?.active??!1}handleShortcutReset(t,e){const i=this.providers.get(t);if(!i?.handleShortcutReset)return;i.handleShortcutReset(e),this.activationOrder.get(t)?.includes(e)&&this.updateActivationOrder(t,e,!0,!1)}updateActivationOrder(t,e,i,r){const s=this.activationOrder.get(t)||[];let o;if(!i&&r)o=s.includes(e)?s:[...s,e];else if(i&&!r)o=s.filter(n=>n!==e);else return;o.length>0?this.activationOrder.set(t,o):this.activationOrder.delete(t)}updateActivationOrderFromState(t,e,i,r){this.updateActivationOrder(t,e,i,r)}shouldShowShortcuts(t){return this.providers.get(t)?.shouldShowShortcuts?.()??!0}getRegisteredProviders(){return Array.from(this.providers.keys())}isProviderRegistered(t){return this.providers.has(t)}clear(){this.providers.clear(),this.activationOrder.clear()}}